[Pkg-cli-apps-commits] [monodevelop] 01/01: Imported Upstream version 4.0.12+dfsg
Jo Shields
directhex at alioth.debian.org
Thu Oct 10 13:08:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
directhex pushed a commit to annotated tag upstream/4.0.12+dfsg
in repository monodevelop.
commit 9407830acac1caed32ebf923214de43f98d0a245
Author: Jo Shields <directhex at apebox.org>
Date: Thu Oct 10 11:55:38 2013 +0200
Imported Upstream version 4.0.12+dfsg
---
Main.sln | 486 +-
Makefile.am | 6 +-
Makefile.in | 129 +-
Makefile.include | 2 +-
aclocal.m4 | 313 +-
build/MacOSX/Makefile.in | 9 +-
build/Makefile.in | 60 +-
configure | 124 +-
configure.in | 11 +-
.../Ast/Transforms/IntroduceUsingDeclarations.cs | 8 +-
contrib/ICSharpCode.Decompiler/Makefile.in | 9 +-
...Code.Decompiler.csproj.FilesWrittenAbsolute.txt | 4 +
contrib/Makefile.am | 2 +-
contrib/Makefile.in | 64 +-
contrib/Mono.Debugger.Soft/Makefile.in | 428 -
.../Mono.Debugger.Soft/Mono.Debugger.Soft.csproj | 127 -
.../Mono.Debugger.Soft/Connection.cs | 2373 ---
.../Mono.Debugger.Soft/MethodMirror.cs | 386 -
.../Mono.Debugger.Soft/VirtualMachine.cs | 694 -
external/Makefile.in | 9 +-
external/debugger-libs/.gitignore | 13 +
.../debugger-libs}/Mono.Debugger.Soft/Locale.cs | 0
.../debugger-libs}/Mono.Debugger.Soft/Makefile.am | 0
.../Mono.Debugger.Soft/Mono.Debugger.Soft.csproj | 127 +
.../AbsentInformationException.cs | 0
.../Mono.Debugger.Soft/AppDomainCreateEvent.cs | 0
.../Mono.Debugger.Soft/AppDomainMirror.cs | 0
.../Mono.Debugger.Soft/AppDomainUnloadEvent.cs | 0
.../Mono.Debugger.Soft/ArrayMirror.cs | 0
.../Mono.Debugger.Soft/AssemblyLoadEvent.cs | 0
.../Mono.Debugger.Soft/AssemblyLoadEventRequest.cs | 0
.../Mono.Debugger.Soft/AssemblyMirror.cs | 0
.../Mono.Debugger.Soft/AssemblyUnloadEvent.cs | 0
.../Mono.Debugger.Soft/BreakpointEvent.cs | 0
.../Mono.Debugger.Soft/BreakpointEventRequest.cs | 0
.../Mono.Debugger.Soft/ChangeLog | 210 +
.../Mono.Debugger.Soft/Connection.cs | 2381 +++
.../CustomAttributeDataMirror.cs | 0
.../CustomAttributeNamedArgumentMirror.cs | 0
.../CustomAttributeTypedArgumentMirror.cs | 0
.../Mono.Debugger.Soft/DataConverter.cs | 0
.../Mono.Debugger.Soft/EnumMirror.cs | 0
.../Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs | 0
.../Mono.Debugger.Soft/EventQueueImpl.cs | 0
.../Mono.Debugger.Soft/EventRequest.cs | 0
.../Mono.Debugger.Soft/EventSet.cs | 0
.../Mono.Debugger.Soft/EventType.cs | 0
.../Mono.Debugger.Soft/ExceptionEvent.cs | 0
.../Mono.Debugger.Soft/ExceptionEventRequest.cs | 0
.../Mono.Debugger.Soft/FieldInfoMirror.cs | 0
.../Mono.Debugger.Soft/IInvokeAsyncResult.cs | 0
.../Mono.Debugger.Soft/ILExceptionHandler.cs | 0
.../Mono.Debugger.Soft/ILInstruction.cs | 0
.../Mono.Debugger.Soft/IMirror.cs | 0
.../Mono.Debugger.Soft/ITargetProcess.cs | 0
.../Mono.Debugger.Soft/InterfaceMappingMirror.cs | 0
.../InvalidStackFrameException.cs | 0
.../Mono.Debugger.Soft/InvocationException.cs | 0
.../Mono.Debugger.Soft/InvokeOptions.cs | 0
.../Mono.Debugger.Soft/LocalVariable.cs | 0
.../Mono.Debugger.Soft/Location.cs | 0
.../Mono.Debugger.Soft/MethodBodyMirror.cs | 0
.../Mono.Debugger.Soft/MethodEntryEvent.cs | 0
.../Mono.Debugger.Soft/MethodEntryEventRequest.cs | 0
.../Mono.Debugger.Soft/MethodExitEvent.cs | 0
.../Mono.Debugger.Soft/MethodExitEventRequest.cs | 0
.../Mono.Debugger.Soft/MethodMirror.cs | 411 +
.../Mono.Debugger.Soft/Mirror.cs | 0
.../Mono.Debugger.Soft/ModuleMirror.cs | 0
.../Mono.Debugger.Soft/ObjectCollectedException.cs | 0
.../Mono.Debugger.Soft/ObjectMirror.cs | 0
.../Mono.Debugger.Soft/ParameterInfoMirror.cs | 0
.../Mono.Debugger.Soft/PointerValue.cs | 0
.../Mono.Debugger.Soft/PrimitiveValue.cs | 0
.../Mono.Debugger.Soft/PropertyInfoMirror.cs | 0
.../Mono.Debugger.Soft/StackFrame.cs | 0
.../Mono.Debugger.Soft/StepEvent.cs | 0
.../Mono.Debugger.Soft/StepEventRequest.cs | 0
.../Mono.Debugger.Soft/StringMirror.cs | 0
.../Mono.Debugger.Soft/StructMirror.cs | 0
.../Mono.Debugger.Soft/SuspendPolicy.cs | 0
.../Mono.Debugger.Soft/ThreadDeathEvent.cs | 0
.../Mono.Debugger.Soft/ThreadMirror.cs | 0
.../Mono.Debugger.Soft/ThreadStartEvent.cs | 0
.../Mono.Debugger.Soft/TypeLoadEvent.cs | 0
.../Mono.Debugger.Soft/TypeLoadEventRequest.cs | 0
.../Mono.Debugger.Soft/TypeMirror.cs | 0
.../Mono.Debugger.Soft/UserBreakEvent.cs | 0
.../Mono.Debugger.Soft/UserLogEvent.cs | 0
.../Mono.Debugger.Soft/VMDeathEvent.cs | 0
.../Mono.Debugger.Soft/VMDisconnectEvent.cs | 0
.../Mono.Debugger.Soft/VMDisconnectedException.cs | 0
.../Mono.Debugger.Soft/VMMismatchException.cs | 0
.../Mono.Debugger.Soft/VMStartEvent.cs | 0
.../Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs | 0
.../Mono.Debugger.Soft/VirtualMachine.cs | 701 +
.../Mono.Debugger.Soft/VirtualMachineManager.cs | 0
.../Mono.Debugger.Soft/mono-git-revision | 1 +
.../debugger-libs}/Mono.Debugger.Soft/mono.snk | Bin 596 -> 596 bytes
.../Mono.Debugging.Soft/ArrayAdaptor.cs | 0
.../Mono.Debugging.Soft/AssemblyInfo.cs | 0
.../debugger-libs}/Mono.Debugging.Soft/ChangeLog | 0
.../Mono.Debugging.Soft/FieldValueReference.cs | 0
.../Mono.Debugging.Soft/LoggingService.cs | 0
.../debugger-libs}/Mono.Debugging.Soft/Makefile.am | 0
.../Mono.Debugging.Soft/Mono.Debugging.Soft.csproj | 75 +
.../Mono.Debugging.Soft/PropertyValueReference.cs | 0
.../Mono.Debugging.Soft/SoftDebuggerAdaptor.cs | 1722 ++
.../Mono.Debugging.Soft/SoftDebuggerBacktrace.cs | 215 +
.../Mono.Debugging.Soft/SoftDebuggerSession.cs | 2606 +++
.../Mono.Debugging.Soft/SoftDebuggerStartInfo.cs | 203 +
.../Mono.Debugging.Soft/SoftEvaluationContext.cs | 0
.../Mono.Debugging.Soft/StringAdaptor.cs | 0
.../Mono.Debugging.Soft/VariableValueReference.cs | 0
.../debugger-libs}/Mono.Debugging/ChangeLog | 0
.../debugger-libs}/Mono.Debugging/Makefile.am | 0
.../Mono.Debugging.Backend/DissassemblyBuffer.cs | 0
.../Mono.Debugging.Backend/EvaluationResult.cs | 55 +
.../Mono.Debugging.Backend/IBacktrace.cs | 20 +
.../IDebuggerBackendObject.cs | 34 +
.../IDebuggerSessionFrontend.cs | 0
.../Mono.Debugging.Backend/IObjectValueSource.cs | 43 +
.../IObjectValueUpdateCallback.cs | 0
.../Mono.Debugging.Backend/IObjectValueUpdater.cs | 37 +
.../Mono.Debugging.Backend/IRawValue.cs | 40 +
.../Mono.Debugging.Backend/IRawValueArray.cs | 40 +
.../Mono.Debugging.Backend/IRawValueString.cs | 39 +
.../Mono.Debugging.Backend/UpdateCallback.cs | 0
.../Mono.Debugging.Client/AssemblyLine.cs | 0
.../Mono.Debugging.Client/Backtrace.cs | 67 +
.../Mono.Debugging.Client/BreakEvent.cs | 0
.../Mono.Debugging.Client/BreakEventArgs.cs | 0
.../Mono.Debugging.Client/BreakEventInfo.cs | 164 +
.../Mono.Debugging.Client/BreakEventStatus.cs | 0
.../Mono.Debugging.Client/Breakpoint.cs | 235 +
.../Mono.Debugging.Client/BreakpointEventArgs.cs | 0
.../Mono.Debugging.Client/BreakpointStore.cs | 0
.../Mono.Debugging.Client/Catchpoint.cs | 0
.../Mono.Debugging.Client/CatchpointEventArgs.cs | 0
.../Mono.Debugging.Client/CompletionData.cs | 0
.../Mono.Debugging.Client/DebuggerException.cs | 0
.../Mono.Debugging.Client/DebuggerFeatures.cs | 0
.../Mono.Debugging.Client/DebuggerSession.cs | 1561 ++
.../DebuggerSessionOptions.cs | 0
.../Mono.Debugging.Client/DebuggerStartInfo.cs | 0
.../Mono.Debugging.Client/EvaluationOptions.cs | 117 +
.../Mono.Debugging.Client/ExceptionInfo.cs | 254 +
.../Mono.Debugging.Client/FunctionBreakpoint.cs | 0
.../Mono.Debugging.Client/IExpressionEvaluator.cs | 0
.../Mono.Debugging.Client/ObjectPath.cs | 0
.../Mono.Debugging.Client/ObjectValue.cs | 787 +
.../Mono.Debugging.Client/ObjectValueFlags.cs | 0
.../Mono.Debugging.Client/ProcessEventArgs.cs | 0
.../Mono.Debugging.Client/ProcessInfo.cs | 0
.../Mono.Debugging.Client/RawValue.cs | 265 +
.../Mono.Debugging.Client/SourceLocation.cs | 0
.../Mono.Debugging.Client/StackFrame.cs | 0
.../Mono.Debugging.Client/TargetEventArgs.cs | 0
.../Mono.Debugging.Client/TargetEventType.cs | 0
.../Mono.Debugging.Client/ThreadEventArgs.cs | 0
.../Mono.Debugging.Client/ThreadInfo.cs | 0
.../Mono.Debugging.Evaluation/ArrayElementGroup.cs | 0
.../ArrayValueReference.cs | 0
.../AsyncEvaluationTracker.cs | 0
.../AsyncOperationManager.cs | 0
.../Mono.Debugging.Evaluation/BaseBacktrace.cs | 0
.../BaseTypeViewSource.cs | 89 +
.../Mono.Debugging.Evaluation/EvaluationContext.cs | 0
.../ExceptionInfoSource.cs | 0
.../ExpressionEvaluator.cs | 0
.../FilteredMembersSource.cs | 123 +
.../ICollectionAdaptor.cs | 0
.../Mono.Debugging.Evaluation/IObjectSource.cs | 0
.../Mono.Debugging.Evaluation/IStringAdaptor.cs | 0
.../LiteralValueReference.cs | 0
.../NRefactoryExpressionEvaluator.cs | 0
.../NRefactoryExpressionEvaluatorVisitor.cs | 1371 ++
.../NRefactoryExpressionResolverVisitor.cs | 0
.../NRefactoryExtensions.cs | 0
.../NamespaceValueReference.cs | 0
.../NullValueReference.cs | 0
.../ObjectValueAdaptor.cs | 1374 ++
.../Mono.Debugging.Evaluation/RawViewSource.cs | 83 +
.../Mono.Debugging.Evaluation/RemoteFrameObject.cs | 0
.../Mono.Debugging.Evaluation/RemoteRawValue.cs | 0
.../Mono.Debugging.Evaluation/TimeOutException.cs | 0
.../Mono.Debugging.Evaluation/TimedEvaluator.cs | 0
.../TypeValueReference.cs | 205 +
.../UserVariableReference.cs | 0
.../Mono.Debugging.Evaluation/ValueReference.cs | 0
.../Mono.Debugging/Mono.Debugging.csproj | 134 +
.../Mono.Debugging/mono.debugging.snk | Bin 596 -> 596 bytes
external/debugger-libs/README.md | 15 +
.../UnitTests/UnitTests/DebugTests.cs | 110 +
.../UnitTests/UnitTests/EvaluationTests.cs | 695 +
.../UnitTests/UnitTests/SdbEvaluationTests.cs | 48 +
.../UnitTests/UnitTests/SdbStackFrameTests.cs | 49 +
.../UnitTests/UnitTests/StackFrameTests.cs | 122 +
.../UnitTests/UnitTests/UnitTests.TestApp/Main.cs | 179 +
.../UnitTests.TestApp/Properties/AssemblyInfo.cs | 27 +
.../UnitTests.TestApp/UnitTests.TestApp.csproj | 39 +
.../UnitTests/UnitTests/UnitTests.csproj | 63 +
external/debugger-libs/debugger-libs.sln | 302 +
external/guiunit/.gitignore | 4 +
external/guiunit/CHANGES.txt | 353 +
external/guiunit/LICENSE.txt | 20 +
external/guiunit/NUnitLite.nuspec | 44 +
external/guiunit/NUnitLite.sln | 410 +
external/guiunit/NUnitLiteCF.sln | 79 +
external/guiunit/README.txt | 153 +
external/guiunit/nant.bat | 2 +
external/guiunit/nunitlite.build | 384 +
external/guiunit/nunitlite.build.include | 421 +
.../guiunit/src/TestResultConsole/AssemblyInfo.cs | 33 +
external/guiunit/src/TestResultConsole/Program.cs | 49 +
.../src/TestResultConsole/TestResultConsole.csproj | 91 +
.../src/framework/Api/ExpectedExceptionData.cs | 143 +
external/guiunit/src/framework/Api/FailureSite.cs | 57 +
.../src/framework/Api/IParameterDataSource.cs | 44 +
external/guiunit/src/framework/Api/IPropertyBag.cs | 162 +
external/guiunit/src/framework/Api/ITest.cs | 102 +
.../src/framework/Api/ITestAssemblyBuilder.cs | 56 +
.../src/framework/Api/ITestAssemblyRunner.cs | 83 +
.../guiunit/src/framework/Api/ITestCaseData.cs | 71 +
.../guiunit/src/framework/Api/ITestCaseSource.cs | 50 +
.../src/framework/Api/ITestCaseSourceProvider.cs | 50 +
external/guiunit/src/framework/Api/ITestFilter.cs | 49 +
.../guiunit/src/framework/Api/ITestListener.cs | 52 +
external/guiunit/src/framework/Api/ITestResult.cs | 170 +
.../guiunit/src/framework/Api/IXmlNodeBuilder.cs | 29 +
.../guiunit/src/framework/Api/PropertyEntry.cs | 70 +
external/guiunit/src/framework/Api/ResultState.cs | 139 +
external/guiunit/src/framework/Api/RunState.cs | 60 +
external/guiunit/src/framework/Api/TestOutput.cs | 109 +
external/guiunit/src/framework/Api/TestStatus.cs | 51 +
external/guiunit/src/framework/Api/XmlNode.cs | 352 +
external/guiunit/src/framework/AssemblyInfo.cs | 110 +
external/guiunit/src/framework/Assert.cs | 1923 +++
external/guiunit/src/framework/AssertionHelper.cs | 366 +
external/guiunit/src/framework/Assume.cs | 360 +
.../src/framework/Attributes/CategoryAttribute.cs | 95 +
.../framework/Attributes/CombinatorialAttribute.cs | 42 +
.../src/framework/Attributes/CultureAttribute.cs | 131 +
.../src/framework/Attributes/DataAttribute.cs | 40 +
.../src/framework/Attributes/DatapointAttribute.cs | 36 +
.../Attributes/DatapointSourceAttribute.cs | 39 +
.../framework/Attributes/DatapointsAttribute.cs | 39 +
.../framework/Attributes/DescriptionAttribute.cs | 43 +
.../Attributes/ExpectedExceptionAttribute.cs | 175 +
.../src/framework/Attributes/ExplicitAttribute.cs | 75 +
.../src/framework/Attributes/IgnoreAttribute.cs | 75 +
.../Attributes/IncludeExcludeAttribute.cs | 83 +
.../src/framework/Attributes/MaxTimeAttribute.cs | 63 +
.../src/framework/Attributes/NUnitAttribute.cs | 38 +
.../src/framework/Attributes/PairwiseAttribute.cs | 42 +
.../src/framework/Attributes/PlatformAttribute.cs | 68 +
.../src/framework/Attributes/PropertyAttribute.cs | 113 +
.../src/framework/Attributes/RandomAttribute.cs | 126 +
.../src/framework/Attributes/RangeAttribute.cs | 104 +
.../src/framework/Attributes/RepeatAttribute.cs | 90 +
.../framework/Attributes/SequentialAttribute.cs | 42 +
.../framework/Attributes/SetCultureAttribute.cs | 55 +
.../framework/Attributes/SetUICultureAttribute.cs | 55 +
.../src/framework/Attributes/SetUpAttribute.cs | 54 +
.../src/framework/Attributes/TearDownAttribute.cs | 36 +
.../src/framework/Attributes/TestAttribute.cs | 79 +
.../src/framework/Attributes/TestCaseAttribute.cs | 446 +
.../Attributes/TestCaseSourceAttribute.cs | 212 +
.../framework/Attributes/TestFixtureAttribute.cs | 202 +
.../Attributes/TestFixtureSetUpAttribute.cs | 36 +
.../Attributes/TestFixtureTearDownAttribute.cs | 37 +
.../src/framework/Attributes/TheoryAttribute.cs | 63 +
.../src/framework/Attributes/TimeoutAttribute.cs | 60 +
.../framework/Attributes/ValueSourceAttribute.cs | 146 +
.../src/framework/Attributes/ValuesAttribute.cs | 134 +
.../Compatibility/SerializableAttribute.cs | 35 +
.../framework/Constraints/AllItemsConstraint.cs | 75 +
.../src/framework/Constraints/AndConstraint.cs | 100 +
.../Constraints/AssignableFromConstraint.cs | 61 +
.../Constraints/AssignableToConstraint.cs | 61 +
.../framework/Constraints/AttributeConstraint.cs | 106 +
.../Constraints/AttributeExistsConstraint.cs | 76 +
.../src/framework/Constraints/BasicConstraint.cs | 73 +
.../src/framework/Constraints/BinaryConstraint.cs | 53 +
.../Constraints/BinarySerializableConstraint.cs | 100 +
.../framework/Constraints/CollectionConstraint.cs | 89 +
.../Constraints/CollectionContainsConstraint.cs | 71 +
.../Constraints/CollectionEquivalentConstraint.cs | 73 +
.../Constraints/CollectionItemsEqualConstraint.cs | 150 +
.../Constraints/CollectionOrderedConstraint.cs | 185 +
.../Constraints/CollectionSubsetConstraint.cs | 67 +
.../src/framework/Constraints/CollectionTally.cs | 95 +
.../src/framework/Constraints/ComparisonAdapter.cs | 172 +
.../framework/Constraints/ComparisonConstraint.cs | 83 +
.../src/framework/Constraints/Constraint.cs | 416 +
.../src/framework/Constraints/ConstraintBuilder.cs | 286 +
.../framework/Constraints/ConstraintExpression.cs | 803 +
.../Constraints/ConstraintExpressionBase.cs | 115 +
.../src/framework/Constraints/ConstraintFactory.cs | 804 +
.../framework/Constraints/ContainsConstraint.cs | 183 +
.../src/framework/Constraints/DelayedConstraint.cs | 234 +
.../Constraints/EmptyCollectionConstraint.cs | 52 +
.../src/framework/Constraints/EmptyConstraint.cs | 72 +
.../Constraints/EmptyDirectoryConstraint.cs | 91 +
.../framework/Constraints/EmptyStringConstraint.cs | 52 +
.../framework/Constraints/EndsWithConstraint.cs | 65 +
.../src/framework/Constraints/EqualConstraint.cs | 565 +
.../src/framework/Constraints/EqualityAdapter.cs | 241 +
.../framework/Constraints/ExactCountConstraint.cs | 94 +
.../framework/Constraints/ExactTypeConstraint.cs | 64 +
.../Constraints/ExceptionTypeConstraint.cs | 59 +
.../src/framework/Constraints/FailurePoint.cs | 68 +
.../src/framework/Constraints/FalseConstraint.cs | 36 +
.../framework/Constraints/FloatingPointNumerics.cs | 251 +
.../framework/Constraints/GreaterThanConstraint.cs | 73 +
.../Constraints/GreaterThanOrEqualConstraint.cs | 73 +
.../framework/Constraints/IResolveConstraint.cs | 38 +
.../Constraints/InstanceOfTypeConstraint.cs | 65 +
.../framework/Constraints/LessThanConstraint.cs | 73 +
.../Constraints/LessThanOrEqualConstraint.cs | 73 +
.../src/framework/Constraints/MessageWriter.cs | 154 +
.../guiunit/src/framework/Constraints/MsgUtils.cs | 282 +
.../src/framework/Constraints/NUnitComparer.cs | 80 +
.../framework/Constraints/NUnitEqualityComparer.cs | 482 +
.../src/framework/Constraints/NaNConstraint.cs | 52 +
.../src/framework/Constraints/NoItemConstraint.cs | 75 +
.../src/framework/Constraints/NotConstraint.cs | 68 +
.../src/framework/Constraints/NullConstraint.cs | 36 +
.../Constraints/NullOrEmptyStringConstraint.cs | 72 +
.../guiunit/src/framework/Constraints/Numerics.cs | 380 +
.../framework/Constraints/Operators/AllOperator.cs | 42 +
.../framework/Constraints/Operators/AndOperator.cs | 47 +
.../Constraints/Operators/AttributeOperator.cs | 62 +
.../Constraints/Operators/BinaryOperator.cs | 76 +
.../Constraints/Operators/CollectionOperator.cs | 43 +
.../Constraints/Operators/ConstraintOperator.cs | 96 +
.../Constraints/Operators/ExactCountOperator.cs | 54 +
.../Constraints/Operators/NoneOperator.cs | 42 +
.../framework/Constraints/Operators/NotOperator.cs | 49 +
.../framework/Constraints/Operators/OrOperator.cs | 47 +
.../Constraints/Operators/PrefixOperator.cs | 51 +
.../Constraints/Operators/PropOperator.cs | 69 +
.../Constraints/Operators/SelfResolvingOperator.cs | 33 +
.../Constraints/Operators/SomeOperator.cs | 42 +
.../Constraints/Operators/ThrowsOperator.cs | 57 +
.../Constraints/Operators/WithOperator.cs | 51 +
.../src/framework/Constraints/OrConstraint.cs | 61 +
.../src/framework/Constraints/PathConstraint.cs | 181 +
.../framework/Constraints/PredicateConstraint.cs | 76 +
.../src/framework/Constraints/PrefixConstraint.cs | 46 +
.../framework/Constraints/PropertyConstraint.cs | 110 +
.../Constraints/PropertyExistsConstraint.cs | 102 +
.../src/framework/Constraints/RangeConstraint.cs | 124 +
.../src/framework/Constraints/RegexConstraint.cs | 67 +
.../Constraints/ResolvableConstraintExpression.cs | 153 +
.../framework/Constraints/ReusableConstraint.cs | 76 +
.../src/framework/Constraints/SameAsConstraint.cs | 65 +
.../framework/Constraints/SamePathConstraint.cs | 60 +
.../Constraints/SamePathOrUnderConstraint.cs | 62 +
.../framework/Constraints/SomeItemsConstraint.cs | 75 +
.../framework/Constraints/StartsWithConstraint.cs | 65 +
.../src/framework/Constraints/StringConstraint.cs | 81 +
.../src/framework/Constraints/SubPathConstraint.cs | 60 +
.../framework/Constraints/SubstringConstraint.cs | 63 +
.../src/framework/Constraints/ThrowsConstraint.cs | 267 +
.../Constraints/ThrowsNothingConstraint.cs | 81 +
.../guiunit/src/framework/Constraints/Tolerance.cs | 220 +
.../src/framework/Constraints/ToleranceMode.cs | 54 +
.../src/framework/Constraints/TrueConstraint.cs | 36 +
.../src/framework/Constraints/TypeConstraint.cs | 59 +
.../framework/Constraints/UniqueItemsConstraint.cs | 63 +
.../Constraints/XmlSerializableConstraint.cs | 105 +
external/guiunit/src/framework/Contains.cs | 62 +
external/guiunit/src/framework/Env.cs | 56 +
.../src/framework/Exceptions/AssertionException.cs | 56 +
.../src/framework/Exceptions/IgnoreException.cs | 55 +
.../framework/Exceptions/InconclusiveException.cs | 58 +
.../src/framework/Exceptions/SuccessException.cs | 57 +
.../Extensibility/IParameterDataProvider.cs | 52 +
.../src/framework/Extensibility/ISuiteBuilder.cs | 55 +
.../framework/Extensibility/ITestCaseBuilder.cs | 88 +
.../framework/Extensibility/ITestCaseProvider.cs | 55 +
external/guiunit/src/framework/GlobalSettings.cs | 39 +
external/guiunit/src/framework/Guard.cs | 35 +
external/guiunit/src/framework/GuiUnit.sln | 26 +
.../src/framework/GuiUnit/AdditionalAsserts.cs | 105 +
.../framework/GuiUnit/GtkMainLoopIntegration.cs | 69 +
.../src/framework/GuiUnit/IMainLoopIntegration.cs | 13 +
.../guiunit/src/framework/GuiUnit/InvokerHelper.cs | 27 +
.../GuiUnit/MonoMacMainLoopIntegration.cs | 51 +
.../guiunit/src/framework/GuiUnit/TestRunner.cs | 400 +
.../src/framework/GuiUnit/XmlTestListener.cs | 66 +
.../framework/GuiUnit/XwtMainLoopIntegration.cs | 64 +
.../guiunit/src/framework/GuiUnit_NET_4_0.csproj | 374 +
.../guiunit/src/framework/GuiUnit_NET_4_5.csproj | 375 +
external/guiunit/src/framework/Has.cs | 209 +
external/guiunit/src/framework/IExpectException.cs | 42 +
.../src/framework/Internal/AssemblyHelper.cs | 135 +
.../framework/Internal/AsyncInvocationRegion.cs | 131 +
.../Internal/AsyncSynchronizationContext.cs | 97 +
.../Internal/Builders/CombinatorialStrategy.cs | 92 +
.../Builders/CombinatorialTestCaseProvider.cs | 113 +
.../Internal/Builders/CombiningStrategy.cs | 91 +
.../Builders/DataAttributeTestCaseProvider.cs | 90 +
.../Internal/Builders/DatapointProvider.cs | 186 +
.../Internal/Builders/NUnitTestCaseBuilder.cs | 411 +
.../Internal/Builders/NUnitTestFixtureBuilder.cs | 358 +
.../Internal/Builders/PairwiseStrategy.cs | 754 +
.../Internal/Builders/ParameterDataProvider.cs | 79 +
.../framework/Internal/Builders/ProviderCache.cs | 102 +
.../Internal/Builders/SequentialStrategy.cs | 88 +
.../Commands/ApplyChangesToContextCommand.cs | 65 +
.../Internal/Commands/CommandDecoratorList.cs | 48 +
.../framework/Internal/Commands/CommandStage.cs | 92 +
.../Internal/Commands/DelegatingTestCommand.cs | 46 +
.../Internal/Commands/ExpectedExceptionCommand.cs | 217 +
.../Internal/Commands/ICommandDecorator.cs | 54 +
.../framework/Internal/Commands/MaxTimeCommand.cs | 88 +
.../Internal/Commands/OneTimeSetUpCommand.cs | 74 +
.../Internal/Commands/OneTimeTearDownCommand.cs | 106 +
.../Internal/Commands/RepeatedTestCommand.cs | 72 +
.../Internal/Commands/SetUpTearDownCommand.cs | 143 +
.../src/framework/Internal/Commands/SkipCommand.cs | 79 +
.../src/framework/Internal/Commands/TestCommand.cs | 71 +
.../Internal/Commands/TestMethodCommand.cs | 168 +
.../Internal/Commands/TheoryResultCommand.cs | 72 +
.../src/framework/Internal/CultureDetector.cs | 142 +
.../src/framework/Internal/ExceptionHelper.cs | 95 +
.../Extensibility/ParameterDataProviders.cs | 101 +
.../Internal/Extensibility/TestCaseProviders.cs | 116 +
.../src/framework/Internal/Filters/AndFilter.cs | 96 +
.../Internal/Filters/CategoryExpression.cs | 180 +
.../framework/Internal/Filters/CategoryFilter.cs | 118 +
.../src/framework/Internal/Filters/NotFilter.cs | 97 +
.../src/framework/Internal/Filters/OrFilter.cs | 111 +
.../Internal/Filters/SimpleCategoryExpression.cs | 43 +
.../framework/Internal/Filters/SimpleNameFilter.cs | 98 +
.../src/framework/Internal/IApplyToContext.cs | 39 +
.../guiunit/src/framework/Internal/IApplyToTest.cs | 40 +
.../Internal/InvalidTestFixtureException.cs | 66 +
.../guiunit/src/framework/Internal/MethodHelper.cs | 226 +
.../src/framework/Internal/NUnitException.cs | 71 +
.../Internal/NUnitLiteTestAssemblyBuilder.cs | 192 +
.../Internal/NUnitLiteTestAssemblyRunner.cs | 143 +
.../guiunit/src/framework/Internal/OSPlatform.cs | 386 +
.../guiunit/src/framework/Internal/ParameterSet.cs | 219 +
.../src/framework/Internal/PlatformHelper.cs | 298 +
.../guiunit/src/framework/Internal/PropertyBag.cs | 462 +
.../src/framework/Internal/PropertyNames.cs | 102 +
.../src/framework/Internal/RandomGenerator.cs | 196 +
.../guiunit/src/framework/Internal/Randomizer.cs | 171 +
external/guiunit/src/framework/Internal/Reflect.cs | 288 +
.../framework/Internal/Results/TestCaseResult.cs | 53 +
.../src/framework/Internal/Results/TestResult.cs | 505 +
.../framework/Internal/Results/TestSuiteResult.cs | 97 +
.../src/framework/Internal/RuntimeFramework.cs | 582 +
.../guiunit/src/framework/Internal/StackFilter.cs | 52 +
.../guiunit/src/framework/Internal/StringUtil.cs | 40 +
.../src/framework/Internal/TestExecutionContext.cs | 625 +
.../guiunit/src/framework/Internal/TestFilter.cs | 183 +
.../src/framework/Internal/TestFixtureBuilder.cs | 93 +
.../guiunit/src/framework/Internal/TestListener.cs | 68 +
.../Internal/Tests/ParameterizedFixtureSuite.cs | 71 +
.../Internal/Tests/ParameterizedMethodSuite.cs | 95 +
.../guiunit/src/framework/Internal/Tests/Test.cs | 415 +
.../src/framework/Internal/Tests/TestAssembly.cs | 57 +
.../src/framework/Internal/Tests/TestFixture.cs | 60 +
.../src/framework/Internal/Tests/TestMethod.cs | 252 +
.../src/framework/Internal/Tests/TestSuite.cs | 301 +
.../src/framework/Internal/TextMessageWriter.cs | 489 +
.../src/framework/Internal/ThreadUtility.cs | 74 +
.../guiunit/src/framework/Internal/TypeHelper.cs | 340 +
.../Internal/WorkItems/CompositeWorkItem.cs | 162 +
.../framework/Internal/WorkItems/CountdownEvent.cs | 87 +
.../framework/Internal/WorkItems/SimpleWorkItem.cs | 77 +
.../src/framework/Internal/WorkItems/WorkItem.cs | 273 +
.../framework/Internal/WorkItems/WorkItemState.cs | 46 +
external/guiunit/src/framework/Is.cs | 535 +
external/guiunit/src/framework/Iz.cs | 35 +
external/guiunit/src/framework/ListMapper.cs | 69 +
external/guiunit/src/framework/MessageMatch.cs | 40 +
external/guiunit/src/framework/ObjectList.cs | 52 +
.../src/framework/Runner/CommandLineOptions.cs | 417 +
.../guiunit/src/framework/Runner/ConsoleWriter.cs | 113 +
.../guiunit/src/framework/Runner/DebugWriter.cs | 113 +
.../Runner/OutputWriters/NUnit2XmlOutputWriter.cs | 376 +
.../Runner/OutputWriters/NUnit3XmlOutputWriter.cs | 65 +
.../framework/Runner/OutputWriters/OutputWriter.cs | 57 +
.../guiunit/src/framework/Runner/ResultReporter.cs | 196 +
.../guiunit/src/framework/Runner/ResultSummary.cs | 175 +
.../src/framework/Runner/Silverlight/TestPage.g.cs | 80 +
.../framework/Runner/Silverlight/TestPage.xaml.cs | 74 +
.../Runner/Silverlight/TextBlockWriter.cs | 106 +
external/guiunit/src/framework/Runner/TcpWriter.cs | 126 +
external/guiunit/src/framework/SpecialValue.cs | 40 +
external/guiunit/src/framework/TestCaseData.cs | 389 +
external/guiunit/src/framework/TestContext.cs | 257 +
external/guiunit/src/framework/Throws.cs | 153 +
external/guiunit/src/framework/nunit.snk | Bin 0 -> 490 bytes
.../guiunit/src/framework/nunitlite-2.0.csproj | 387 +
.../guiunit/src/framework/nunitlite-3.5.csproj | 370 +
.../guiunit/src/framework/nunitlite-4.0.csproj | 369 +
.../guiunit/src/framework/nunitlite-4.5.csproj | 374 +
.../src/framework/nunitlite-netcf-2.0.csproj | 335 +
.../src/framework/nunitlite-netcf-3.5.csproj | 338 +
.../guiunit/src/framework/nunitlite-sl-3.0.csproj | 354 +
.../guiunit/src/framework/nunitlite-sl-4.0.csproj | 362 +
.../guiunit/src/framework/nunitlite-sl-5.0.csproj | 357 +
.../src/framework/nunitlite.framework.build | 70 +
.../Debug/sl-3.0/Runner/Silverlight/TestPage.g.cs | 79 +
.../Debug/sl-4.0/Runner/Silverlight/TestPage.g.cs | 80 +
.../sl-4.0/Runner/Silverlight/TestPage.g.i.cs | 80 +
.../Debug/sl-5.0/Runner/Silverlight/TestPage.g.cs | 80 +
.../sl-5.0/Runner/Silverlight/TestPage.g.i.cs | 80 +
.../sl-3.0/Runner/Silverlight/TestPage.g.cs | 80 +
.../sl-4.0/Runner/Silverlight/TestPage.g.cs | 80 +
.../sl-5.0/Runner/Silverlight/TestPage.g.cs | 80 +
external/guiunit/src/mock-assembly/MockAssembly.cs | 300 +
.../src/mock-assembly/Properties/AssemblyInfo.cs | 38 +
.../src/mock-assembly/mock-assembly-2.0.csproj | 56 +
.../src/mock-assembly/mock-assembly-3.5.csproj | 56 +
.../src/mock-assembly/mock-assembly-4.0.csproj | 56 +
.../src/mock-assembly/mock-assembly-4.5.csproj | 58 +
.../mock-assembly/mock-assembly-netcf-2.0.csproj | 79 +
.../mock-assembly/mock-assembly-netcf-3.5.csproj | 82 +
.../src/mock-assembly/mock-assembly-sl-3.0.csproj | 80 +
.../src/mock-assembly/mock-assembly-sl-4.0.csproj | 78 +
.../src/mock-assembly/mock-assembly-sl-5.0.csproj | 79 +
.../guiunit/src/mock-assembly/mock-assembly.build | 32 +
external/guiunit/src/testdata/AssemblyInfo.cs | 44 +
.../guiunit/src/testdata/AssertCountFixture.cs | 51 +
external/guiunit/src/testdata/AssertFailFixture.cs | 50 +
external/guiunit/src/testdata/AssertIgnoreData.cs | 84 +
external/guiunit/src/testdata/AsyncDummyFixture.cs | 92 +
external/guiunit/src/testdata/AsyncRealFixture.cs | 369 +
.../src/testdata/AttributeInheritanceData.cs | 60 +
.../guiunit/src/testdata/CategoryAttributeData.cs | 61 +
.../guiunit/src/testdata/CultureAttributeData.cs | 57 +
external/guiunit/src/testdata/DatapointFixture.cs | 119 +
.../guiunit/src/testdata/DescriptionFixture.cs | 50 +
.../guiunit/src/testdata/ExpectedExceptionData.cs | 279 +
.../src/testdata/FixtureSetUpTearDownData.cs | 360 +
external/guiunit/src/testdata/MaxTimeFixture.cs | 65 +
.../src/testdata/ParameterizedTestFixture.cs | 53 +
.../guiunit/src/testdata/PropertyAttributeTests.cs | 47 +
.../guiunit/src/testdata/RepeatedTestFixture.cs | 135 +
external/guiunit/src/testdata/SetUpData.cs | 192 +
.../src/testdata/TestCaseAttributeFixture.cs | 102 +
.../src/testdata/TestCaseSourceAttributeFixture.cs | 111 +
external/guiunit/src/testdata/TestContextData.cs | 44 +
external/guiunit/src/testdata/TestFixtureData.cs | 447 +
.../src/testdata/TestMethodSignatureFixture.cs | 124 +
external/guiunit/src/testdata/TheoryFixture.cs | 84 +
external/guiunit/src/testdata/TimeoutFixture.cs | 65 +
.../src/testdata/nunitlite.testdata-2.0.csproj | 124 +
.../src/testdata/nunitlite.testdata-3.5.csproj | 124 +
.../src/testdata/nunitlite.testdata-4.0.csproj | 124 +
.../src/testdata/nunitlite.testdata-4.5.csproj | 130 +
.../testdata/nunitlite.testdata-netcf-2.0.csproj | 97 +
.../testdata/nunitlite.testdata-netcf-3.5.csproj | 98 +
.../src/testdata/nunitlite.testdata-sl-3.0.csproj | 103 +
.../src/testdata/nunitlite.testdata-sl-4.0.csproj | 108 +
.../src/testdata/nunitlite.testdata-sl-5.0.csproj | 102 +
.../guiunit/src/testdata/nunitlite.testdata.build | 32 +
external/guiunit/src/tests/Api/ResultStateTests.cs | 176 +
external/guiunit/src/tests/App.g.cs | 53 +
external/guiunit/src/tests/App.xaml.cs | 57 +
external/guiunit/src/tests/AssemblyInfo.cs | 47 +
.../Assertions/ArrayEqualsFailureMessageFixture.cs | 257 +
.../src/tests/Assertions/ArrayEqualsFixture.cs | 220 +
.../src/tests/Assertions/ArrayNotEqualFixture.cs | 68 +
.../src/tests/Assertions/AssertFailTests.cs | 83 +
.../src/tests/Assertions/AssertIgnoreTests.cs | 151 +
.../tests/Assertions/AssertInconclusiveTests.cs | 49 +
.../src/tests/Assertions/AssertPassTests.cs | 62 +
.../src/tests/Assertions/AssertThatTests.cs | 279 +
.../src/tests/Assertions/AssertThrowsTests.cs | 164 +
.../src/tests/Assertions/AssumeThatTests.cs | 236 +
.../src/tests/Assertions/AsyncThrowsTests.cs | 185 +
.../src/tests/Assertions/CollectionTests.cs | 56 +
.../src/tests/Assertions/ConditionAssertTests.cs | 224 +
.../guiunit/src/tests/Assertions/EqualsFixture.cs | 568 +
.../guiunit/src/tests/Assertions/MessageChecker.cs | 70 +
.../src/tests/Assertions/NotEqualFixture.cs | 134 +
.../guiunit/src/tests/Assertions/NotSameFixture.cs | 49 +
.../src/tests/Assertions/NullableTypesTests.cs | 252 +
.../guiunit/src/tests/Assertions/SameFixture.cs | 61 +
.../src/tests/Attributes/ApplyToTestTests.cs | 331 +
.../tests/Attributes/AttributeInheritanceTests.cs | 47 +
.../src/tests/Attributes/CategoryAttributeTests.cs | 90 +
.../src/tests/Attributes/CombinatorialTests.cs | 100 +
.../guiunit/src/tests/Attributes/DatapointTests.cs | 70 +
.../src/tests/Attributes/DescriptionTests.cs | 87 +
.../src/tests/Attributes/ExpectedExceptionTests.cs | 447 +
.../tests/Attributes/FixtureSetUpTearDownTests.cs | 336 +
.../guiunit/src/tests/Attributes/MaxTimeTests.cs | 86 +
.../guiunit/src/tests/Attributes/PairwiseTests.cs | 145 +
.../Attributes/ParameterizedTestFixtureTests.cs | 199 +
.../src/tests/Attributes/PropertyAttributeTests.cs | 71 +
.../src/tests/Attributes/RepeatedTestTests.cs | 115 +
.../tests/Attributes/SetCultureAttributeTests.cs | 129 +
.../src/tests/Attributes/TestCaseAttributeTests.cs | 322 +
.../src/tests/Attributes/TestCaseSourceTests.cs | 354 +
external/guiunit/src/tests/Attributes/TestDummy.cs | 78 +
.../tests/Attributes/TestFixtureAttributeTests.cs | 92 +
.../guiunit/src/tests/Attributes/TheoryTests.cs | 163 +
.../guiunit/src/tests/Attributes/TimeoutTests.cs | 91 +
.../src/tests/Attributes/ValueSourceTests.cs | 142 +
.../src/tests/Attributes/ValuesAttributeTests.cs | 157 +
.../tests/Constraints/AllItemsConstraintTests.cs | 109 +
.../src/tests/Constraints/AndConstraintTests.cs | 47 +
.../Constraints/AssignableFromConstraintTests.cs | 48 +
.../Constraints/AssignableToConstraintTests.cs | 48 +
.../Constraints/AsyncDelayedConstraintTests.cs | 87 +
.../Constraints/AttributeExistsConstraintTests.cs | 70 +
.../src/tests/Constraints/BasicConstraintTests.cs | 106 +
.../tests/Constraints/BinarySerializableTest.cs | 48 +
.../CollectionContainsConstraintTests.cs | 220 +
.../CollectionEquivalentConstraintTests.cs | 169 +
.../CollectionOrderedConstraintTests.cs | 227 +
.../Constraints/CollectionSubsetConstraintTests.cs | 42 +
.../tests/Constraints/ComparisonConstraintTest.cs | 138 +
.../src/tests/Constraints/ConstraintTestBase.cs | 103 +
.../src/tests/Constraints/DelayedConstraintTest.cs | 212 +
.../src/tests/Constraints/EmptyConstraintTest.cs | 91 +
.../tests/Constraints/EndsWithConstraintTests.cs | 71 +
.../src/tests/Constraints/EqualConstraintTests.cs | 459 +
.../tests/Constraints/ExactCountConstraintTests.cs | 83 +
.../tests/Constraints/ExactTypeConstraintTests.cs | 50 +
.../tests/Constraints/FloatingPointNumericsTest.cs | 120 +
.../Constraints/GreaterThanConstraintTests.cs | 67 +
.../GreaterThanOrEqualConstraintTests.cs | 67 +
.../Constraints/InstanceOfTypeConstraintTests.cs | 49 +
.../tests/Constraints/LessThanConstraintTests.cs | 67 +
.../Constraints/LessThanOrEqualConstraintTests.cs | 67 +
.../src/tests/Constraints/MessageWriterTests.cs | 129 +
.../guiunit/src/tests/Constraints/MsgUtilTests.cs | 128 +
.../src/tests/Constraints/NUnitComparerTests.cs | 78 +
.../Constraints/NUnitEqualityComparerTests.cs | 208 +
.../src/tests/Constraints/NotConstraintTests.cs | 67 +
.../guiunit/src/tests/Constraints/NumericsTest.cs | 112 +
.../src/tests/Constraints/OrConstraintTests.cs | 47 +
.../src/tests/Constraints/PathConstraintTests.cs | 252 +
.../tests/Constraints/PredicateConstraintTests.cs | 58 +
.../guiunit/src/tests/Constraints/PropertyTests.cs | 104 +
.../src/tests/Constraints/RangeConstraintTests.cs | 117 +
.../guiunit/src/tests/Constraints/RangeTests.cs | 79 +
.../tests/Constraints/ReusableConstraintTests.cs | 45 +
.../guiunit/src/tests/Constraints/SameAsTest.cs | 47 +
.../tests/Constraints/StartsWithConstraintTests.cs | 72 +
.../tests/Constraints/SubstringConstraintTests.cs | 96 +
.../guiunit/src/tests/Constraints/TestDelegates.cs | 35 +
.../src/tests/Constraints/ThrowsConstraintTests.cs | 107 +
.../guiunit/src/tests/Constraints/ToStringTests.cs | 69 +
.../Constraints/UniqueItemsConstraintTests.cs | 42 +
.../src/tests/Constraints/XmlSerializableTest.cs | 65 +
.../guiunit/src/tests/Framework/StackFilterTest.cs | 80 +
.../guiunit/src/tests/Framework/SyntaxTests.cs | 196 +
.../src/tests/Framework/TestContextTests.cs | 103 +
.../guiunit/src/tests/Framework/TestResultTests.cs | 83 +
.../src/tests/Internal/AssemblyHelperTests.cs | 84 +
.../src/tests/Internal/AsyncTestMethodTests.cs | 113 +
.../Internal/CultureSettingAndDetectionTests.cs | 181 +
.../src/tests/Internal/DeduceTypeArgsFromArgs.cs | 51 +
.../src/tests/Internal/GenericTestFixtureTests.cs | 64 +
.../src/tests/Internal/GenericTestMethodTests.cs | 67 +
.../tests/Internal/NUnitTestCaseBuilderTests.cs | 41 +
.../src/tests/Internal/PlatformDetectionTests.cs | 443 +
.../guiunit/src/tests/Internal/PropertyBagTests.cs | 184 +
.../src/tests/Internal/RandomGeneratorTests.cs | 132 +
.../guiunit/src/tests/Internal/RandomizerTests.cs | 185 +
.../src/tests/Internal/RuntimeFrameworkTests.cs | 287 +
external/guiunit/src/tests/Internal/SetUpTest.cs | 161 +
.../src/tests/Internal/SimpleGenericMethods.cs | 67 +
.../tests/Internal/TestExecutionContextTests.cs | 242 +
.../guiunit/src/tests/Internal/TestFixtureTests.cs | 406 +
.../src/tests/Internal/TestMethodSignatureTests.cs | 198 +
.../guiunit/src/tests/Internal/TestResultTests.cs | 680 +
.../guiunit/src/tests/Internal/TestXmlTests.cs | 171 +
.../src/tests/Internal/TextMessageWriterTests.cs | 164 +
.../Internal/TypeParameterUsedWithTestMethod.cs | 41 +
external/guiunit/src/tests/Program.cs | 81 +
.../guiunit/src/tests/RecordingTestListener.cs | 29 +
.../src/tests/Runner/CommandLineOptionTests.cs | 133 +
.../src/tests/Runner/NUnit2XmlOutputWriterTests.cs | 217 +
external/guiunit/src/tests/Syntax/AfterTests.cs | 184 +
.../tests/Syntax/ArbitraryConstraintMatching.cs | 81 +
.../guiunit/src/tests/Syntax/CollectionTests.cs | 275 +
.../guiunit/src/tests/Syntax/ComparisonTests.cs | 99 +
external/guiunit/src/tests/Syntax/EqualityTests.cs | 158 +
.../guiunit/src/tests/Syntax/InvalidCodeTests.cs | 78 +
.../guiunit/src/tests/Syntax/OperatorOverrides.cs | 128 +
external/guiunit/src/tests/Syntax/OperatorTests.cs | 271 +
.../src/tests/Syntax/PathConstraintTests.cs | 172 +
external/guiunit/src/tests/Syntax/PropertyTests.cs | 131 +
.../src/tests/Syntax/SerializableConstraints.cs | 55 +
.../guiunit/src/tests/Syntax/SimpleConstraints.cs | 111 +
.../guiunit/src/tests/Syntax/StringConstraints.cs | 137 +
external/guiunit/src/tests/Syntax/SyntaxTest.cs | 70 +
external/guiunit/src/tests/Syntax/TestCompiler.cs | 57 +
external/guiunit/src/tests/Syntax/ThrowsTests.cs | 241 +
.../guiunit/src/tests/Syntax/TypeConstraints.cs | 172 +
.../Collections/SimpleObjectCollection.cs | 81 +
.../TestUtilities/Collections/SimpleObjectList.cs | 119 +
.../TestUtilities/Comparers/AlwaysEqualComparer.cs | 41 +
.../Comparers/SimpleEqualityComparer.cs | 43 +
.../Comparers/SimpleObjectComparer.cs | 19 +
.../src/tests/TestUtilities/ResultSummary.cs | 207 +
.../guiunit/src/tests/TestUtilities/TestAssert.cs | 144 +
.../guiunit/src/tests/TestUtilities/TestBuilder.cs | 174 +
.../src/tests/TestUtilities/TestComparer.cs | 51 +
.../src/tests/TestUtilities/TestDelegates.cs | 66 +
.../guiunit/src/tests/TestUtilities/TestFinder.cs | 98 +
.../guiunit/src/tests/nunitlite.tests-2.0.csproj | 262 +
.../guiunit/src/tests/nunitlite.tests-3.5.csproj | 260 +
.../guiunit/src/tests/nunitlite.tests-4.0.csproj | 260 +
.../guiunit/src/tests/nunitlite.tests-4.5.csproj | 272 +
.../src/tests/nunitlite.tests-netcf-2.0.csproj | 217 +
.../src/tests/nunitlite.tests-netcf-3.5.csproj | 211 +
.../src/tests/nunitlite.tests-sl-3.0.csproj | 270 +
.../src/tests/nunitlite.tests-sl-4.0.csproj | 277 +
.../src/tests/nunitlite.tests-sl-5.0.csproj | 272 +
external/guiunit/src/tests/nunitlite.tests.build | 83 +
.../guiunit/src/tests/obj/Debug/sl-3.0/App.g.cs | 52 +
.../guiunit/src/tests/obj/Debug/sl-4.0/App.g.cs | 53 +
.../guiunit/src/tests/obj/Debug/sl-4.0/App.g.i.cs | 53 +
.../guiunit/src/tests/obj/Debug/sl-5.0/App.g.cs | 53 +
.../guiunit/src/tests/obj/Debug/sl-5.0/App.g.i.cs | 53 +
.../guiunit/src/tests/obj/release/sl-3.0/App.g.cs | 53 +
.../guiunit/src/tests/obj/release/sl-4.0/App.g.cs | 53 +
.../guiunit/src/tests/obj/release/sl-5.0/App.g.cs | 53 +
external/guiunit/tools/nant/COPYING.txt | 340 +
external/guiunit/tools/nant/README.txt | 158 +
.../tools/nant/bin/NAnt.CompressionTasks.xml | 725 +
external/guiunit/tools/nant/bin/NAnt.Core.xml |17156 ++++++++++++++++++++
.../guiunit/tools/nant/bin/NAnt.DotNetTasks.xml | 5373 ++++++
.../guiunit/tools/nant/bin/NAnt.MSNetTasks.xml | 579 +
external/guiunit/tools/nant/bin/NAnt.NUnit.xml | 353 +
.../guiunit/tools/nant/bin/NAnt.NUnit1Tasks.xml | 538 +
.../guiunit/tools/nant/bin/NAnt.NUnit2Tasks.xml | 516 +
.../tools/nant/bin/NAnt.SourceControlTasks.xml | 1289 ++
.../guiunit/tools/nant/bin/NAnt.VSNetTasks.xml | 3986 +++++
.../guiunit/tools/nant/bin/NAnt.VisualCppTasks.xml | 1211 ++
.../guiunit/tools/nant/bin/NAnt.Win32Tasks.xml | 800 +
external/guiunit/tools/nant/bin/NAnt.exe.config | 3343 ++++
external/guiunit/tools/nant/bin/NAnt.xml | 78 +
.../tools/nant/bin/NDoc.Documenter.NAnt.xml | 373 +
.../bin/extensions/common/2.0/NAnt.MSBuild.xml | 112 +
.../bin/extensions/common/4.0/NAnt.MSBuild.xml | 112 +
.../bin/lib/common/2.0/nunit-console.exe.config | 31 +
external/ikvm/CommonAssemblyInfo.cs.in | 2 +-
external/ikvm/awt/awt.build | 16 +-
external/ikvm/awt/graphics.cs | 116 +-
external/ikvm/awt/images.cs | 9 +-
external/ikvm/awt/toolkit-0.95.cs | 9 +-
.../gnu/java/net/protocol/ikvmres/Handler.java | 5 +-
.../ikvm/internal/AssemblyClassLoader.java | 211 +-
.../ikvm/internal/stubgen/StubGenerator.java | 1603 --
.../classpath/ikvm/runtime/EnumerationWrapper.java | 55 +
external/ikvm/ikvm-fork.snk | Bin 0 -> 596 bytes
external/ikvm/ikvm.build | 2 +
external/ikvm/ikvm.include | 15 +-
external/ikvm/ikvm/ikvm.build | 6 +-
external/ikvm/ikvm/starter.cs | 89 +-
external/ikvm/ikvm9.sln | 7 +
external/ikvm/ikvmc/AotTypeWrapper.cs | 15 +-
external/ikvm/ikvmc/AssemblyResolver.cs | 85 +-
external/ikvm/ikvmc/Compiler.cs | 416 +-
external/ikvm/ikvmc/CompilerClassLoader.cs | 636 +-
external/ikvm/ikvmc/Proxy.cs | 22 +-
external/ikvm/ikvmc/ikvmc.build | 10 +-
external/ikvm/ikvmc/remapper.cs | 8 +-
external/ikvm/ikvmstub/ClassFileWriter.cs | 927 --
external/ikvm/ikvmstub/SerialVersionUID.cs | 181 -
external/ikvm/ikvmstub/ikvmstub.8.csproj | 5 +-
external/ikvm/ikvmstub/ikvmstub.build | 11 +-
external/ikvm/ikvmstub/ikvmstub.cs | 462 +-
external/ikvm/jvm/jvm.build | 49 +-
external/ikvm/jvm/jvm.rc.in | 28 -
external/ikvm/msbuild/AssemblyInfo.cs | 2 +-
external/ikvm/msbuild/IKVM.MSBuild.Java.Targets | 11 +-
external/ikvm/msbuild/IKVM.MSBuild.csproj | 36 +-
external/ikvm/msbuild/JavaTask.cs | 398 +-
external/ikvm/msbuild/msbuild.build | 13 +-
external/ikvm/openjdk/AssemblyInfo.java.in | 25 +-
external/ikvm/openjdk/allsources.lst | 6 +-
external/ikvm/openjdk/exclude.lst | 8 +-
.../ikvm/openjdk/java/awt/image/BufferedImage.java | 2 +-
external/ikvm/openjdk/java/lang/ClassLoader.java | 45 +-
external/ikvm/openjdk/java/lang/LangHelper.java | 19 +-
external/ikvm/openjdk/java/lang/Shutdown.java | 24 +-
.../openjdk/java/lang/invoke/MethodHandles.java | 9 +
.../openjdk/java/util/zip/ClassStubZipEntry.java | 98 +
external/ikvm/openjdk/java/util/zip/ZipFile.java | 6 +-
external/ikvm/openjdk/map.xml | 18 +-
external/ikvm/openjdk/openjdk.build | 10 +-
external/ikvm/openjdk/response.txt | 38 +-
.../ikvm/openjdk/sun/font/StandardGlyphVector.java | 13 +-
external/ikvm/reflect/Assembly.cs | 6 +-
external/ikvm/reflect/CustomAttributeData.cs | 61 +-
external/ikvm/reflect/CustomModifiers.cs | 5 +
external/ikvm/reflect/Emit/MethodBuilder.cs | 2 +-
external/ikvm/reflect/Emit/ModuleBuilder.cs | 22 +-
external/ikvm/reflect/Fusion.cs | 102 +-
external/ikvm/reflect/IKVM.Reflection.csproj | 2 +
external/ikvm/reflect/MarshalSpec.cs | 2 +-
external/ikvm/reflect/MethodBody.cs | 5 +-
external/ikvm/reflect/MethodSignature.cs | 15 +
external/ikvm/reflect/Missing.cs | 32 +-
external/ikvm/reflect/Module.cs | 22 +-
external/ikvm/reflect/Reader/AssemblyReader.cs | 2 +-
.../ikvm/reflect/Reader/GenericTypeParameter.cs | 52 +-
external/ikvm/reflect/Reader/ModuleReader.cs | 91 +-
external/ikvm/reflect/Reader/PEReader.cs | 16 +-
external/ikvm/reflect/StandAloneMethodSig.cs | 11 +
external/ikvm/reflect/Type.cs | 81 +-
external/ikvm/reflect/TypeNameParser.cs | 16 +-
external/ikvm/reflect/Universe.cs | 142 +-
external/ikvm/reflect/Writer/ModuleWriter.cs | 20 +-
external/ikvm/reflect/Writer/PEWriter.cs | 13 +-
external/ikvm/reflect/Writer/TextSection.cs | 195 +-
external/ikvm/reflect/Writer/VersionInfo.cs | 2 +-
external/ikvm/reflect/reflect.build | 7 +-
external/ikvm/runtime/AssemblyClassLoader.cs | 442 +-
external/ikvm/runtime/ByteCodeHelper.cs | 238 +-
external/ikvm/runtime/ClassFile.cs | 37 +-
external/ikvm/runtime/ClassLoaderWrapper.cs | 289 +-
external/ikvm/runtime/CoreClasses.cs | 19 +
external/ikvm/runtime/DotNetTypeWrapper.cs | 195 +-
external/ikvm/runtime/DynamicClassLoader.cs | 237 +-
external/ikvm/runtime/DynamicTypeWrapper.cs | 267 +-
external/ikvm/runtime/IKVM.Runtime.8.csproj | 3 +
external/ikvm/runtime/JavaException.cs | 8 +-
external/ikvm/runtime/LocalVars.cs | 6 +-
external/ikvm/runtime/MemberWrapper.cs | 31 +-
external/ikvm/runtime/ReflectUtil.cs | 33 +
external/ikvm/runtime/Serialization.cs | 7 +-
external/ikvm/runtime/TypeWrapper.cs | 371 +-
external/ikvm/runtime/attributes.cs | 39 +
external/ikvm/runtime/common.cs | 282 +-
external/ikvm/runtime/compiler.cs | 597 +-
external/ikvm/runtime/openjdk.cs | 290 +-
external/ikvm/runtime/openjdk/java.lang.invoke.cs | 70 +-
external/ikvm/runtime/runtime.build | 15 +-
external/ikvm/runtime/stubgen/ClassFileWriter.cs | 1048 ++
external/ikvm/runtime/stubgen/SerialVersionUID.cs | 183 +
external/ikvm/runtime/stubgen/StubGenerator.cs | 636 +
external/ikvm/runtime/verifier.cs | 164 +-
external/ikvm/runtime/vfs.cs | 19 +-
external/ikvm/runtime/vm.cs | 56 +-
external/ikvm/tools/SourceLicenseAnalyzer.cs | 209 +
external/ikvm/tools/implib.cs | 230 +
external/ikvm/tools/tools.build | 6 +
external/ikvm/update_from_cvs | 3 +-
external/maccore/src/AddressBook/ABAddressBook.cs | 15 +-
external/maccore/src/AudioUnit/AUGraph.cs | 2 +-
external/maccore/src/AudioUnit/AudioComponent.cs | 2 +-
.../src/AudioUnit/AudioComponentDescription.cs | 2 +-
.../maccore/src/AudioUnit/AudioGraphEventArgs.cs | 2 +-
external/maccore/src/AudioUnit/AudioUnit.cs | 2 +-
.../maccore/src/AudioUnit/AudioUnitEventArgs.cs | 2 +-
external/maccore/src/AudioUnit/ExtAudioFile.cs | 2 +-
external/maccore/src/CoreFoundation/CFArray.cs | 3 +
external/maccore/src/CoreFoundation/CFBoolean.cs | 3 +
external/maccore/src/CoreFoundation/CFData.cs | 3 +
.../maccore/src/CoreFoundation/CFDictionary.cs | 3 +
external/maccore/src/CoreGraphics/CGContext.cs | 11 +-
external/maccore/src/CoreMedia/CMSampleBuffer.cs | 87 +-
external/maccore/src/CoreMidi/MidiServices.cs | 13 +-
external/maccore/src/Foundation/Enum.cs | 16 +-
external/maccore/src/Foundation/NSOrderedSet.cs | 161 +
external/maccore/src/Foundation/NSUuid.cs | 6 +-
.../maccore/src/ObjCRuntime/AdoptsAttribute.cs | 1 -
external/maccore/src/ObjCRuntime/Blocks.cs | 2 +-
external/maccore/src/avfoundation.cs | 4 +-
external/maccore/src/btouch.cs | 5 +-
external/maccore/src/coredata.cs | 1 -
external/maccore/src/foundation.cs | 143 +-
external/maccore/src/generator.cs | 20 +-
.../tools/docfixer/document-generated-code.cs | 281 +-
.../Mono.Addins.CecilReflector/Reflector.cs | 13 +-
.../Mono.Cecil/Mono.Cecil.Cil/Code.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs | 16 +-
.../Mono.Cecil/Mono.Cecil.Cil/CodeWriter.cs | 23 +-
.../Mono.Cecil/Mono.Cecil.Cil/Document.cs | 3 +-
.../Mono.Cecil/Mono.Cecil.Cil/ExceptionHandler.cs | 8 +-
.../Mono.Cecil/Mono.Cecil.Cil/ILProcessor.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/Instruction.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/MethodBody.cs | 15 +-
.../Mono.Cecil/Mono.Cecil.Cil/OpCode.cs | 549 +-
.../Mono.Cecil/Mono.Cecil.Cil/OpCodes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/SequencePoint.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/Symbols.cs | 9 +-
.../Mono.Cecil.Cil/VariableDefinition.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Cil/VariableReference.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/BlobHeap.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/Buffers.cs | 6 +-
.../Mono.Cecil/Mono.Cecil.Metadata/CodedIndex.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/ElementType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/GuidHeap.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/Heap.cs | 2 +-
.../Mono.Cecil.Metadata/MetadataToken.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/Row.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/StringHeap.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/TableHeap.cs | 52 +-
.../Mono.Cecil/Mono.Cecil.Metadata/TokenType.cs | 2 +-
.../Mono.Cecil.Metadata/UserStringHeap.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.Metadata/Utilities.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/BinaryStreamReader.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/BinaryStreamWriter.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/ByteBuffer.cs | 31 +-
.../Mono.Cecil.PE/ByteBufferEqualityComparer.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/DataDirectory.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/Image.cs | 4 +-
.../Mono.Cecil/Mono.Cecil.PE/ImageReader.cs | 41 +-
.../Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs | 122 +-
.../Mono.Cecil/Mono.Cecil.PE/Section.cs | 2 +-
.../Mono.Cecil/Mono.Cecil.PE/TextMap.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/ArrayType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/AssemblyDefinition.cs | 4 +-
.../Mono.Cecil/Mono.Cecil/AssemblyFlags.cs | 3 +-
.../Mono.Cecil/Mono.Cecil/AssemblyHashAlgorithm.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/AssemblyInfo.cs | 8 +-
.../Mono.Cecil/AssemblyLinkedResource.cs | 2 +-
.../Mono.Cecil/AssemblyNameDefinition.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs | 32 +-
.../Mono.Cecil/Mono.Cecil/AssemblyReader.cs | 433 +-
.../Mono.Cecil/Mono.Cecil/AssemblyWriter.cs | 104 +-
.../Mono.Cecil/Mono.Cecil/BaseAssemblyResolver.cs | 40 +-
.../Mono.Cecil/Mono.Cecil/CallSite.cs | 85 +-
.../Mono.Cecil/Mono.Cecil/CustomAttribute.cs | 31 +-
.../Mono.Cecil/DefaultAssemblyResolver.cs | 9 +-
.../Mono.Cecil/Mono.Cecil/EmbeddedResource.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/EventAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/EventDefinition.cs | 11 +-
.../Mono.Cecil/Mono.Cecil/EventReference.cs | 4 +-
.../Mono.Cecil/Mono.Cecil/ExportedType.cs | 18 +-
.../Mono.Cecil/Mono.Cecil/FieldAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/FieldDefinition.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/FieldReference.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/FileAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/FunctionPointerType.cs | 3 +-
.../Mono.Cecil/Mono.Cecil/GenericInstanceMethod.cs | 19 +-
.../Mono.Cecil/Mono.Cecil/GenericInstanceType.cs | 9 +-
.../Mono.Cecil/Mono.Cecil/GenericParameter.cs | 120 +-
.../Mono.Cecil/GenericParameterAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/IConstantProvider.cs | 2 +-
.../Mono.Cecil/ICustomAttributeProvider.cs | 6 +-
.../Mono.Cecil/Mono.Cecil/IGenericInstance.cs | 2 +-
.../Mono.Cecil/IGenericParameterProvider.cs | 8 +-
.../Mono.Cecil/Mono.Cecil/IMarshalInfoProvider.cs | 6 +-
.../Mono.Cecil/Mono.Cecil/IMemberDefinition.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/IMetadataScope.cs | 2 +-
.../Mono.Cecil/IMetadataTokenProvider.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/IMethodSignature.cs | 7 +-
.../Mono.Cecil/Mono.Cecil/Import.cs | 241 +-
.../Mono.Cecil/Mono.Cecil/LinkedResource.cs | 2 +-
.../Mono.Cecil/ManifestResourceAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MarshalInfo.cs | 2 +-
.../Mono.Cecil/MemberDefinitionCollection.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MemberReference.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MetadataResolver.cs | 141 +-
.../Mono.Cecil/Mono.Cecil/MetadataSystem.cs | 64 +-
.../Mono.Cecil/Mono.Cecil/MethodAttributes.cs | 2 +-
.../Mono.Cecil/MethodCallingConvention.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MethodDefinition.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MethodImplAttributes.cs | 3 +-
.../Mono.Cecil/Mono.Cecil/MethodReference.cs | 10 +-
.../Mono.Cecil/Mono.Cecil/MethodReturnType.cs | 10 +-
.../Mono.Cecil/MethodSemanticsAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/MethodSpecification.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/Modifiers.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/ModuleDefinition.cs | 244 +-
.../Mono.Cecil/Mono.Cecil/ModuleKind.cs | 14 +-
.../Mono.Cecil/Mono.Cecil/ModuleReference.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/NativeType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/PInvokeAttributes.cs | 4 +-
.../Mono.Cecil/Mono.Cecil/PInvokeInfo.cs | 10 +-
.../Mono.Cecil/Mono.Cecil/ParameterAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/ParameterDefinition.cs | 17 +-
.../Mono.Cecil/ParameterDefinitionCollection.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/ParameterReference.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/PinnedType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/PointerType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/PropertyAttributes.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/PropertyDefinition.cs | 9 +-
.../Mono.Cecil/Mono.Cecil/PropertyReference.cs | 4 +-
.../Mono.Cecil/Mono.Cecil/ReferenceType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/Resource.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs | 19 +-
.../Mono.Cecil/Mono.Cecil/SentinelType.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/TargetRuntime.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/TypeAttributes.cs | 3 +-
.../Mono.Cecil/Mono.Cecil/TypeDefinition.cs | 29 +-
.../Mono.Cecil/TypeDefinitionCollection.cs | 2 +-
.../Mono.Cecil/Mono.Cecil/TypeParser.cs | 13 +-
.../Mono.Cecil/Mono.Cecil/TypeReference.cs | 62 +-
.../Mono.Cecil/Mono.Cecil/TypeSpecification.cs | 7 +-
.../Mono.Cecil/Mono.Cecil/TypeSystem.cs | 47 +-
.../Mono.Cecil/Mono.Cecil/VariantType.cs | 2 +-
.../Mono.Collections.Generic/Collection.cs | 5 +-
.../Mono.Collections.Generic/ReadOnlyCollection.cs | 26 +-
.../Mono.Security.Cryptography/CryptoService.cs | 2 +-
.../Mono.Cecil/Mono/Actions.cs | 4 +-
.../Mono.Cecil/Mono/Empty.cs | 22 +-
.../Mono.Cecil/Mono/Funcs.cs | 2 +-
.../ExtensionAttribute.cs | 2 +-
.../Mono.Addins.Gui/AddinInfoView.cs | 2 +-
.../Mono.Addins.Gui/Mono.Addins.Gui/HeaderBox.cs | 18 +-
.../Mono.Addins.Setup/RepositoryRegistry.cs | 59 +-
.../Mono.Addins/Mono.Addins/AddinEngine.cs | 266 +-
.../Mono.Addins/Mono.Addins/ExtensionContext.cs | 2 +
.../Mono.Addins/Mono.Addins/RuntimeAddin.cs | 2 +-
external/monomac/samples/macdoc/AppDelegate.cs | 6 +-
external/monomac/samples/macdoc/AppleDocHandler.cs | 16 +-
external/monomac/samples/macdoc/Makefile | 10 +-
external/monomac/samples/macdoc/MyDocument.cs | 3 +-
external/monomac/src/AppKit/BeginSheet.cs | 2 +-
external/monomac/src/AppKit/NSGraphics.cs | 35 +-
external/monomac/src/AppKit/NSImage.cs | 131 +-
external/monomac/src/AppKit/NSMenu.cs | 2 +
external/monomac/src/AppKit/NSPageLayout.cs | 13 +
external/monomac/src/AppKit/NSPrintPanel.cs | 13 +
external/monomac/src/AppKit/NSView.cs | 13 +
external/monomac/src/Make.shared | 6 +
external/monomac/src/Makefile | 7 +-
.../monomac/src/ObjCRuntime/NativeMethodBuilder.cs | 4 +-
external/monomac/src/ObjCRuntime/Selector.cs | 22 +-
external/monomac/src/OpenGL/FrameEventArgs.cs | 2 +-
external/monomac/src/OpenGL/INativeWindow.cs | 2 +-
.../src/OpenGL/OpenTK/Audio/ContextHandle.cs | 2 +-
.../src/OpenGL/OpenTK/Audio/OpenAL/AL/AL.cs | 2 +-
.../src/OpenGL/OpenTK/Audio/OpenAL/AL/ALEnums.cs | 2 +-
.../OpenTK/Audio/OpenAL/AL/EffectsExtension.cs | 2 +-
.../Audio/OpenAL/AL/EffectsExtensionEnums.cs | 2 +-
.../Audio/OpenAL/AL/EffectsExtensionPresets.cs | 2 +-
.../OpenGL/OpenTK/Audio/OpenAL/AL/XRamExtension.cs | 2 +-
.../src/OpenGL/OpenTK/Audio/OpenAL/Alc/Alc.cs | 4 +-
.../src/OpenGL/OpenTK/Audio/OpenAL/Alc/AlcEnums.cs | 2 +-
.../monomac/src/OpenGL/OpenTK/Graphics/Color4.cs | 2 +-
.../monomac/src/OpenGL/OpenTK/Math/MathHelper.cs | 2 +-
external/monomac/src/OpenGL/WindowBorder.cs | 2 +-
external/monomac/src/OpenGL/WindowState.cs | 2 +-
external/monomac/src/TODO | 1 -
external/monomac/src/appkit.cs | 355 +-
external/monomac/src/webkit.cs | 149 +-
external/nrefactory/.gitignore | 1 +
...CSharpCode.NRefactory.CSharp.AstVerifier.csproj | 12 +-
.../Main.cs | 4 +-
.../Analysis/AbiComparer.cs | 248 -
.../Analysis/ControlFlow.cs | 4 +-
.../Analysis/SemanticHighlightingVisitor.cs | 69 +-
.../ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs | 64 +-
.../Ast/AstNodeCollection.cs | 11 +-
.../ICSharpCode.NRefactory.CSharp/Ast/AstType.cs | 9 +
.../Ast/DepthFirstAstVisitor.cs | 17 +-
.../Ast/DocumentationReference.cs | 28 +-
.../Ast/Expressions/EmptyExpression.cs | 79 -
.../Ast/Expressions/ErrorExpression.cs | 54 +-
.../Ast/Expressions/PrimitiveExpression.cs | 26 +-
.../Ast/Expressions/UnaryOperatorExpression.cs | 5 +-
.../Ast/GeneralScope/Attribute.cs | 12 +-
.../Ast/GeneralScope/DelegateDeclaration.cs | 4 +-
.../Ast/GeneralScope/NamespaceDeclaration.cs | 41 +-
.../Ast/GeneralScope/NewLineNode.cs | 45 +-
.../Ast/GeneralScope/PreProcessorDirective.cs | 55 +
.../Ast/GeneralScope/TypeDeclaration.cs | 4 +-
.../Ast/IAstVisitor.cs | 9 +-
.../Ast/ObservableAstVisitor.cs | 7 -
.../Ast/Statements/BreakStatement.cs | 2 +-
.../Ast/SyntaxTree.cs | 4 +
.../Ast/TypeMembers/Accessor.cs | 4 +-
.../Ast/TypeMembers/ConstructorDeclaration.cs | 13 +-
.../Ast/TypeMembers/DestructorDeclaration.cs | 4 +-
.../Ast/TypeMembers/EntityDeclaration.cs | 8 +-
.../Ast/TypeMembers/EnumMemberDeclaration.cs | 10 +-
.../Ast/TypeMembers/EventDeclaration.cs | 14 +-
.../Ast/TypeMembers/FieldDeclaration.cs | 4 +-
.../Ast/TypeMembers/FixedFieldDeclaration.cs | 4 +-
.../Ast/TypeMembers/IndexerDeclaration.cs | 4 +-
.../Ast/TypeMembers/MethodDeclaration.cs | 4 +-
.../Ast/TypeMembers/OperatorDeclaration.cs | 4 +-
.../Ast/TypeMembers/PropertyDeclaration.cs | 4 +-
.../Completion/CSharpCompletionEngine.cs | 440 +-
.../Completion/CSharpCompletionEngineBase.cs | 48 +-
.../Completion/CompletionDataWrapper.cs | 68 +-
.../Completion/ICompletionContextProvider.cs | 9 +-
.../Completion/ICompletionDataFactory.cs | 6 +-
.../Formatter/CSharpFormatter.cs | 1 -
.../Formatter/CSharpIndentEngine.cs | 62 +-
.../Formatter/FormattingVisitor.cs | 24 +-
.../Formatter/FormattingVisitor_Expressions.cs | 46 +-
.../Formatter/FormattingVisitor_Global.cs | 124 +-
.../Formatter/FormattingVisitor_Statements.cs | 2 +-
.../Formatter/FormattingVisitor_TypeMembers.cs | 48 +-
.../Formatter/Indent.cs | 2 +-
.../ICSharpCode.NRefactory.CSharp.csproj | 212 +-
.../OutputVisitor/CSharpAmbience.cs | 39 +-
.../OutputVisitor/CSharpOutputVisitor.cs | 20 +-
.../OutputVisitor/CodeDomConvertVisitor.cs | 31 +-
.../Parser/CSharpParser.cs | 285 +-
.../Parser/mcs/anonymous.cs | 94 +-
.../Parser/mcs/argument.cs | 4 +-
.../Parser/mcs/assembly.cs | 56 +-
.../Parser/mcs/assign.cs | 13 +-
.../Parser/mcs/async.cs | 60 +-
.../Parser/mcs/attribute.cs | 51 +-
.../Parser/mcs/cfold.cs | 46 +-
.../Parser/mcs/class.cs | 77 +-
.../Parser/mcs/codegen.cs | 24 +-
.../Parser/mcs/complete.cs | 50 +-
.../Parser/mcs/const.cs | 4 +-
.../Parser/mcs/constant.cs | 12 +-
.../Parser/mcs/context.cs | 2 +-
.../Parser/mcs/convert.cs | 59 +-
.../Parser/mcs/cs-parser.cs | 7217 ++++----
.../Parser/mcs/cs-parser.jay | 329 +-
.../Parser/mcs/cs-tokenizer.cs | 197 +-
.../Parser/mcs/decl.cs | 11 +-
.../Parser/mcs/delegate.cs | 22 +-
.../Parser/mcs/driver.cs | 4 +-
.../Parser/mcs/dynamic.cs | 1 +
.../Parser/mcs/ecore.cs | 184 +-
.../Parser/mcs/enum.cs | 2 +-
.../Parser/mcs/eval.cs | 109 +-
.../Parser/mcs/expression.cs | 1599 +-
.../Parser/mcs/field.cs | 15 +-
.../Parser/mcs/flowanalysis.cs | 2 +-
.../Parser/mcs/generic.cs | 73 +-
.../Parser/mcs/import.cs | 69 +-
.../Parser/mcs/iterators.cs | 31 +-
.../Parser/mcs/linq.cs | 2 +-
.../Parser/mcs/literal.cs | 2 +-
.../Parser/mcs/location.cs | 48 +-
.../Parser/mcs/membercache.cs | 16 +-
.../Parser/mcs/method.cs | 280 +-
.../Parser/mcs/modifiers.cs | 2 +-
.../Parser/mcs/module.cs | 29 +
.../Parser/mcs/namespace.cs | 27 +-
.../Parser/mcs/nullable.cs | 744 +-
.../Parser/mcs/parameter.cs | 8 +-
.../Parser/mcs/pending.cs | 34 +-
.../Parser/mcs/property.cs | 20 +-
.../Parser/mcs/report.cs | 23 +
.../Parser/mcs/settings.cs | 26 +-
.../Parser/mcs/statement.cs | 427 +-
.../Parser/mcs/support.cs | 34 +
.../Parser/mcs/typemanager.cs | 45 +-
.../Parser/mcs/typespec.cs | 14 +
.../Parser/mcs/visit.cs | 10 +-
.../Refactoring/BaseRefactoringContext.cs | 10 +-
.../Refactoring/CodeAction.cs | 5 +
.../CodeActions/AddAnotherAccessorAction.cs | 2 +-
.../Refactoring/CodeActions/AddUsingAction.cs | 2 +-
.../Refactoring/CodeActions/AutoLinqSumAction.cs | 436 +
.../ConvertAnonymousDelegateToLambdaAction.cs | 2 +-
.../CodeActions/ConvertIfToNullCoalescingAction.cs | 171 +
.../CodeActions/ConvertIfToSwitchAction.cs | 24 +-
.../CodeActions/CreateBackingStoreAction.cs | 6 +-
.../CodeActions/CreateClassDeclarationAction.cs | 2 +-
.../Refactoring/CodeActions/CreateFieldAction.cs | 8 +-
.../CodeActions/DeclareLocalVariableAction.cs | 11 +
.../CodeActions/ExtractAnonymousMethodAction.cs | 5 +-
.../Refactoring/CodeActions/ExtractFieldAction.cs | 4 +-
.../CodeActions/ExtractMethod/StaticVisitor.cs | 6 +-
.../ExtractMethod/VariableLookupVisitor.cs | 39 +-
.../CodeActions/FlipOperatorArgumentsAction.cs | 2 +-
.../CodeActions/ImplementAbstractMembersAction.cs | 10 +-
.../CodeActions/ImplementInterfaceAction.cs | 2 +-
.../CodeActions/ImplementNotImplementedProperty.cs | 101 +
.../CodeActions/RemoveBackingStoreAction.cs | 2 +-
.../RemoveFieldRefactoryActionRefactoringAction.cs | 2 +-
.../CodeActions/SimplifyIfFlowAction.cs | 3 -
.../CodeActions/SimplifyIfInLoopsFlowAction.cs | 4 -
.../SplitDeclarationAndAssignmentAction.cs | 2 +-
.../CodeActions/UseExplicitTypeAction.cs | 6 +-
.../Refactoring/CodeActions/UseVarKeywordAction.cs | 8 +-
.../AccessToClosureIssues/AccessToClosureIssue.cs | 319 -
.../AssignmentMadeToSameVariableIssue.cs | 99 -
.../BitwiseOperationOnNonFlagsEnumIssue.cs | 120 -
.../CodeIssues/CallToObjectEqualsViaBaseIssue.cs | 91 -
.../CallToVirtualFunctionFromConstructorIssue.cs | 161 -
.../CastExpressionOfIncompatibleTypeIssue.cs | 82 -
.../CompareBooleanWithTrueOrFalseIssue.cs | 90 -
.../CompareFloatWithEqualityOperatorIssue.cs | 143 -
...CS0127ReturnMustNotBeFollowedByAnyExpression.cs | 116 -
.../CodeIssues/ConditionalToNullCoalescingIssue.cs | 88 -
.../CodeIssues/ConstantConditionIssue.cs | 149 -
.../PublicConstructorInAbstractClass.cs | 79 -
.../ConstructorIssues/RedudantConstructorIssue.cs | 85 -
.../StaticConstructorAccessModifierIssue.cs | 70 -
.../StaticConstructorParameterIssue.cs | 68 -
.../CodeIssues/ConvertToStaticMethodIssue.cs | 121 -
.../Refactoring/CodeIssues/Custom/LockThisIssue.cs | 388 +
.../CodeIssues/Custom/MethodNeverReturnsIssue.cs | 75 +
.../Custom/NegativeRelationalExpressionIssue.cs | 100 +
.../Custom/NotImplementedExceptionIssue.cs | 64 +
.../CodeIssues/Custom/RedundantInternalIssue.cs | 72 +
.../CodeIssues/Custom/RedundantPrivateIssue.cs | 131 +
.../Refactoring/CodeIssues/DoubleNegationIssue.cs | 79 -
.../CodeIssues/DuplicateBodyMethodIssue.cs | 188 -
.../DuplicateExpressionsInConditionsIssue.cs | 122 -
.../CodeIssues/DuplicateIfInIfChainIssue.cs | 111 -
.../CodeIssues/ExceptionRethrowIssue.cs | 131 -
.../CodeIssues/ExplicitConversionInForEachIssue.cs | 76 -
.../ExpressionIsAlwaysOfProvidedTypeIssue.cs | 83 -
.../ExpressionIsNeverOfProvidedTypeIssue.cs | 91 -
.../ExpressionOfCompatibleTypeCastIssue.cs | 90 -
.../ForControlVariableNotModifiedIssue.cs | 131 -
.../FormatStringIssues/FormatStringHelper.cs | 70 -
.../FormatStringIssues/FormatStringIssue.cs | 119 -
.../Refactoring/CodeIssues/GatherVisitorBase.cs | 448 +-
.../CodeIssues/IdenticalConditionalBranchIssue.cs | 66 -
.../InconsistentNamingIssue/AffectedEntity.cs | 78 -
.../InconsistentNamingIssue/DefaultRules.cs | 135 -
.../InconsistentNamingIssue.cs | 368 -
.../NamingConventionService.cs | 99 -
.../InconsistentNamingIssue/NamingRule.cs | 397 -
.../InconsistentNamingIssue/NamingStyle.cs | 59 -
.../InconsistentNamingIssue/WordParser.cs | 70 -
.../IncorrectCallToObjectGetHashCodeIssue.cs | 78 -
.../IncorrectExceptionParameterOrderingIssue.cs | 97 -
.../Refactoring/CodeIssues/IssueCategories.cs | 86 +-
.../CodeIssues/MethodNeverReturnsIssue.cs | 74 -
.../MethodOverloadHidesOptionalParameterIssue.cs | 85 -
.../CodeIssues/MissingStringComparisonIssue.cs | 106 -
.../CodeIssues/MultipleEnumerationIssue.cs | 365 -
.../NegativeRelationalExpressionIssue.cs | 99 -
.../CodeIssues/NoDefaultConstructorIssue.cs | 101 -
.../CodeIssues/NotImplementedExceptionIssue.cs | 63 -
.../AccessToClosureIssues/AccessToClosureIssue.cs | 319 +
.../AccessToDisposedClosureIssue.cs | 0
.../AccessToModifiedClosureIssue.cs | 0
.../LocalVariableNamePicker.cs | 0
.../NotWorking/ConvertToStaticMethodIssue.cs | 139 +
.../NotWorking/DuplicateBodyMethodIssue.cs | 176 +
.../NotWorking/ParameterCanBeIEnumerableIssue.cs | 156 +
.../NotWorking/VariableDeclaredInWideScopeIssue.cs | 383 +
.../OptionalParameterCouldBeSkippedIssue.cs | 173 -
.../HasMemberCriterion.cs | 88 -
.../ParameterCanBeDemotedIssue/ITypeCriterion.cs | 44 -
.../IsArrayTypeCriterion.cs | 43 -
.../ParameterCanBeDemotedIssue/IsTypeCriterion.cs | 50 -
.../ParameterCanBeDemotedIssue.cs | 219 -
.../ParameterCanBeIEnumerableIssue.cs | 156 -
.../SupportsIndexingCriterion.cs | 107 -
.../TypeCriteriaCollector.cs | 212 -
.../RedundantArrayInitializerCommaIssue.cs | 76 -
.../CodeIssues/RedundantAssignmentIssue.cs | 454 -
.../RedundantAttributeParenthesesIssue.cs | 64 -
.../CodeIssues/RedundantBaseConstructorIssue.cs | 85 -
.../CodeIssues/RedundantCaseLabelIssue.cs | 71 -
.../Refactoring/CodeIssues/RedundantCatchIssue.cs | 140 -
.../Refactoring/CodeIssues/RedundantElseIssue.cs | 96 -
.../CodeIssues/RedundantFieldInitializerIssue.cs | 123 -
.../CodeIssues/RedundantInternalIssue.cs | 71 -
.../CodeIssues/RedundantNamespaceUsageIssue.cs | 98 -
.../CodeIssues/RedundantNullCheckIssue.cs | 111 -
.../RedundantObjectCreationArgumentListIssue.cs | 72 -
.../RedundantObjectOrCollectionInitializerIssue.cs | 66 -
.../CodeIssues/RedundantPrivateIssue.cs | 132 -
.../Refactoring/CodeIssues/RedundantThisIssue.cs | 129 -
.../CodeIssues/RedundantToStringIssue.cs | 241 -
.../CodeIssues/RedundantTypeCastIssue.cs | 136 -
.../Refactoring/CodeIssues/RedundantUsingIssue.cs | 154 -
.../CodeIssues/RedundantWhereWithPredicateIssue.cs | 101 -
.../ReferenceEqualsCalledWithValueTypeIssue.cs | 79 -
.../ReferenceToStaticMemberViaDerivedTypeIssue.cs | 135 -
.../ResultOfAsyncCallShouldNotBeIgnoredIssue.cs | 58 -
.../SimplifyAnonymousMethodToDelegateIssue.cs | 117 -
.../CodeIssues/StaticFieldInGenericTypeIssue.cs | 107 -
.../CodeIssues/StringIsNullOrEmptyIssue.cs | 143 -
.../ConditionalTernaryEqualBranchIssue.cs | 67 +
...oNotCallOverridableMethodsInConstructorIssue.cs | 167 +
.../ForControlVariableIsNeverModifiedIssue.cs | 134 +
.../CodeQuality/LocalVariableHidesMemberIssue.cs | 182 +
.../CodeQuality/ParameterHidesMemberIssue.cs | 85 +
.../CodeQuality/StaticFieldInGenericTypeIssue.cs | 107 +
.../ThreadStaticAtInstanceFieldIssue.cs | 108 +
.../CodeQuality/ValueParameterNotUsedIssue.cs | 109 +
.../CS1717AssignmentMadeToSameVariableIssue.cs | 102 +
.../InconsistentNamingIssue/AffectedEntity.cs | 78 +
.../InconsistentNamingIssue/DefaultRules.cs | 135 +
.../InconsistentNamingIssue.cs | 374 +
.../NamingConventionService.cs | 99 +
.../InconsistentNamingIssue/NamingRule.cs | 397 +
.../InconsistentNamingIssue/NamingStyle.cs | 59 +
.../InconsistentNamingIssue/WordParser.cs | 70 +
...nvertConditionalTernaryToNullCoalescingIssue.cs | 89 +
.../SuggestUseVarKeywordEvidentIssue.cs | 105 +
.../AccessToStaticMemberViaDerivedTypeIssue.cs | 136 +
.../PublicConstructorInAbstractClass.cs | 80 +
.../ReplaceWithSingleCallToAnyIssue.cs | 119 +
.../ReplaceWithSingleCallToCountIssue.cs | 45 +
.../ReplaceWithSingleCallToFirstIssue.cs | 45 +
.../ReplaceWithSingleCallToFirstOrDefaultIssue.cs | 45 +
.../ReplaceWithSingleCallToLastIssue.cs | 45 +
.../ReplaceWithSingleCallToLastOrDefaultIssue.cs | 45 +
.../ReplaceWithSingleCallToLongCountIssue.cs | 45 +
.../ReplaceWithSingleCallToSingleIssue.cs | 45 +
.../ReplaceWithSingleCallToSingleOrDefaultIssue.cs | 45 +
.../ReplaceWithStringIsNullOrEmptyIssue.cs | 134 +
.../DoubleNegationOperatorIssue.cs | 81 +
.../RedundanciesInCode/RedundantCaseLabelIssue.cs | 72 +
.../RedundanciesInCode/RedundantCastIssue.cs | 138 +
.../RedundanciesInCode/RedundantCatchIssue.cs | 160 +
.../RedundantCommaInArrayInitializerIssue.cs | 78 +
.../RedundantComparisonWithNullIssue.cs | 101 +
.../RedundantIfElseBlockIssue.cs | 97 +
.../RedundantNameQualifierIssue.cs | 100 +
.../RedundantObjectOrCollectionInitializerIssue.cs | 67 +
.../RedundantThisQualifierIssue.cs | 129 +
.../RedundantToStringCallIssue.cs | 242 +
.../RedundantUsingDirectiveIssue.cs | 155 +
.../EmptyConstructorIssue.cs | 81 +
.../LocalVariableNotUsedIssue.cs | 112 +
.../RedundantBaseConstructorCallIssue.cs | 86 +
.../RedundantDefaultFieldInitializerIssue.cs | 126 +
.../UnusedTypeParameterIssue.cs | 100 +
.../CodeIssues/ThreadStaticOnInstanceFieldIssue.cs | 104 -
.../CodeIssues/TypeParameterNotUsedIssue.cs | 96 -
.../BitwiseOperationOnNonFlagsEnumIssue.cs | 121 +
.../CallToObjectEqualsViaBaseIssue.cs | 92 +
.../CastExpressionOfIncompatibleTypeIssue.cs | 83 +
.../CompareBooleanWithTrueOrFalseIssue.cs | 91 +
.../CompareFloatWithEqualityOperatorIssue.cs | 144 +
.../CompilerErrors/CS0029InvalidConversionIssue.cs | 149 +
...CS0127ReturnMustNotBeFollowedByAnyExpression.cs | 117 +
...S1729TypeHasNoConstructorWithNArgumentsIssue.cs | 113 +
.../Uncategorized/ConstantConditionIssue.cs | 150 +
.../StaticConstructorAccessModifierIssue.cs | 71 +
.../StaticConstructorParameterIssue.cs | 68 +
.../DisposeMethodInNonIDisposableTypeIssue.cs | 186 +
.../DuplicateExpressionsInConditionsIssue.cs | 123 +
.../Uncategorized/DuplicateIfInIfChainIssue.cs | 112 +
.../Uncategorized/ExceptionRethrowIssue.cs | 132 +
.../ExplicitConversionInForEachIssue.cs | 77 +
.../ExpressionIsAlwaysOfProvidedTypeIssue.cs | 86 +
.../ExpressionIsNeverOfProvidedTypeIssue.cs | 92 +
.../FormatStringIssues/FormatStringHelper.cs | 76 +
.../FormatStringIssues/FormatStringIssue.cs | 119 +
.../IncorrectCallToObjectGetHashCodeIssue.cs | 79 +
.../IncorrectExceptionParameterOrderingIssue.cs | 98 +
.../MethodOverloadHidesOptionalParameterIssue.cs | 86 +
.../Uncategorized/MissingStringComparisonIssue.cs | 107 +
.../Uncategorized/MultipleEnumerationIssue.cs | 366 +
.../OptionalParameterCouldBeSkippedIssue.cs | 174 +
.../HasMemberCriterion.cs | 88 +
.../ParameterCanBeDemotedIssue/ITypeCriterion.cs | 44 +
.../IsArrayTypeCriterion.cs | 43 +
.../ParameterCanBeDemotedIssue/IsTypeCriterion.cs | 50 +
.../ParameterCanBeDemotedIssue.cs | 220 +
.../SupportsIndexingCriterion.cs | 107 +
.../TypeCriteriaCollector.cs | 212 +
.../Uncategorized/RedundantAssignmentIssue.cs | 464 +
.../RedundantAttributeParenthesesIssue.cs | 65 +
.../RedundantObjectCreationArgumentListIssue.cs | 73 +
.../ReferenceEqualsCalledWithValueTypeIssue.cs | 80 +
.../ResultOfAsyncCallShouldNotBeIgnoredIssue.cs | 68 +
.../SimplifyAnonymousMethodToDelegateIssue.cs | 147 +
.../Uncategorized/UnreachableCodeIssue.cs | 189 +
.../Uncategorized/UseBlockInsteadColonIssue.cs | 106 +
.../VariableNotUsedIssues/ParameterNotUsedIssue.cs | 162 +
.../ParameterOnlyAssignedIssue.cs | 68 +
.../VariableOnlyAssignedIssue.cs | 86 +
.../Refactoring/CodeIssues/UnreachableCodeIssue.cs | 188 -
.../Refactoring/CodeIssues/UseVarKeywordIssue.cs | 103 -
.../CodeIssues/ValueParameterUnusedIssue.cs | 107 -
.../CodeIssues/VariableDeclaredInWideScopeIssue.cs | 382 -
.../LocalVariableHidesMemberIssue.cs | 72 -
.../ParameterHidesMemberIssue.cs | 60 -
.../VariableHidesMemberIssue.cs | 100 -
.../LocalVariableNotUsedIssue.cs | 109 -
.../VariableNotUsedIssues/ParameterNotUsedIssue.cs | 157 -
.../ParameterOnlyAssignedIssue.cs | 67 -
.../VariableOnlyAssignedIssue.cs | 86 -
.../Refactoring/IssueAttribute.cs | 2 +
.../Refactoring/IssueMarker.cs | 52 -
.../Refactoring/LambdaHelper.cs | 29 +-
.../Refactoring/PatternHelper.cs | 24 +
.../Refactoring/RefactoringContext.cs | 14 +-
.../Refactoring/Script.cs | 122 +-
.../Refactoring/Severity.cs | 61 -
.../Refactoring/TypeSystemAstBuilder.cs | 44 +-
.../Refactoring/VariableReferenceGraph.cs | 4 -
.../Resolver/CSharpAstResolver.cs | 4 +-
.../Resolver/CSharpConversions.cs | 25 +-
.../Resolver/CSharpOperators.cs | 7 +-
.../Resolver/CSharpResolver.cs | 38 +-
.../Resolver/FindReferences.cs | 196 +-
.../Resolver/LambdaResolveResult.cs | 11 +
.../Resolver/MemberLookup.cs | 10 +-
.../Resolver/OverloadResolution.cs | 2 +-
.../Resolver/ReducedExtensionMethod.cs | 9 +-
.../Resolver/RenameCallbackArguments.cs | 31 +
.../Resolver/ResolveVisitor.cs | 118 +-
.../Resolver/TypeInference.cs | 2 +-
.../TypeSystem/CSharpAssembly.cs | 6 +-
.../TypeSystem/CSharpAttribute.cs | 2 +-
.../TypeSystem/CSharpUnresolvedFile.cs | 26 +-
.../MethodTypeParameterWithInheritedConstraints.cs | 2 +-
.../TypeSystem/ResolvedUsingScope.cs | 6 +-
.../TypeSystem/TypeSystemConvertVisitor.cs | 91 +-
.../ICSharpCode.NRefactory.Cecil/CecilLoader.cs | 1685 ++
.../ICSharpCode.NRefactory.Cecil.csproj | 55 +
.../Properties/AssemblyInfo.cs | 36 +
.../FindReferencesConsistencyCheck.cs | 16 +-
.../ICSharpCode.NRefactory.ConsistencyCheck.csproj | 34 +-
.../Program.cs | 2 +-
.../Solution.cs | 2 +-
.../Xml/XmlReaderTest.cs | 22 +-
.../ICSharpCode.NRefactory.Demo/CSDemo.cs | 4 +-
.../ICSharpCode.NRefactory.Demo.csproj | 6 +-
.../SemanticTreeDialog.cs | 7 +-
.../ICSharpCode.NRefactory.GtkDemo.csproj | 36 +-
.../ICSharpCode.NRefactory.GtkDemo/MainWindow.cs | 4 +-
.../ICSharpCode.NRefactory.IKVM.csproj | 54 +
.../ICSharpCode.NRefactory.IKVM/IkvmLoader.cs | 1485 ++
.../Properties/AssemblyInfo.cs | 37 +
.../Analysis/AbiComparerTests.cs | 105 +
.../Analysis/SymbolCollectorTests.cs | 232 +
.../CSharp/Analysis/AbiComparerTests.cs | 108 -
.../CSharp/Analysis/SemanticHighlightingTests.cs | 32 +
.../CSharp/AstStructureTests.cs | 2 +
.../CSharp/AstTests.cs | 77 +
.../CSharp/CodeActions/AddAnotherAccessorTests.cs | 31 +
.../CSharp/CodeActions/AutoLinqSumTests.cs | 775 +
.../CSharp/CodeActions/ContextActionTestBase.cs | 8 +-
.../CodeActions/ConvertIfToNullCoalescingTests.cs | 276 +
.../CSharp/CodeActions/ConvertIfToSwtichTests.cs | 37 +-
.../CSharp/CodeActions/CreateFieldTests.cs | 101 +
.../CodeActions/DeclareLocalVariableTests.cs | 24 +
.../CSharp/CodeActions/ExtractMethodTests.cs | 33 +
.../CodeActions/ImplementAbstractMembersTest.cs | 91 +-
.../ImplementNotImplementedPropertyTests.cs | 80 +
.../CSharp/CodeActions/IterateViaForeachTests.cs | 2 +-
.../CSharp/CodeActions/MetaTests.cs | 123 +
.../CSharp/CodeActions/TestRefactoringContext.cs | 197 +-
.../CodeCompletion/BrowsableAttributeTests.cs | 60 +
.../CodeCompletion/CodeCompletionBugTests.cs | 92 +-
.../CSharp/CodeCompletion/CompletionDataList.cs | 4 +-
.../CSharp/CodeCompletion/FormatItemTests.cs | 181 +
.../GetCurrentParameterIndexTests.cs | 2 +-
.../CSharp/CodeCompletion/ImportCompletionTests.cs | 81 +-
.../CodeCompletion/ParameterCompletionTests.cs | 114 +-
.../CSharp/CodeDomConvertVisitorTests.cs | 4 +-
...AccessToStaticMemberViaDerivedTypeIssueTests.cs | 346 +
.../AssignmentMadeToSameVariableIssueTests.cs | 230 -
.../CS0029InvalidConversionIssueTests.cs | 446 +
...CS1717AssignmentMadeToSameVariableIssueTests.cs | 266 +
...TypeHasNoConstructorWithNArgumentsIssueTests.cs | 243 +
.../CallToVirtualFunctionFromConstructorTests.cs | 137 -
.../ConditionalTernaryEqualBranchTests.cs | 142 +
.../ConditionalToNullCoalescingInspectorTests.cs | 133 -
...ConditionalTernaryToNullCoalescingIssueTests.cs | 148 +
.../CodeIssues/ConvertToStaticMethodIssueTests.cs | 118 +-
.../DisposeMethodInNonIDisposableTypeTests.cs | 256 +
...allOverridableMethodsInConstructorIssueTests.cs | 157 +
.../CSharp/CodeIssues/DoubleNegationIssueTests.cs | 63 -
.../CodeIssues/DoubleNegationOperatorIssueTests.cs | 63 +
.../CodeIssues/DuplicateBodyMethodIssueTests.cs | 49 +-
.../CodeIssues/DuplicateIfInIfChainIssueTests.cs | 20 +-
.../CodeIssues/EmptyConstructorIssueTests.cs | 106 +
.../ExpressionIsAlwaysOfProvidedTypeIssueTests.cs | 14 +
.../ExpressionOfCompatibleTypeCastIssueTests.cs | 122 -
.../ForControlVariableIsNeverModifiedIssueTests.cs | 133 +
.../ForControlVariableNotModifiedIssueTests.cs | 133 -
.../FormatStringIssues/FormatStringTests.cs | 51 +
.../IdenticalConditionalBranchIssueTests.cs | 59 -
.../LocalVariableHidesMemberIssueTests.cs | 36 +-
.../CSharp/CodeIssues/LockThisTests.cs | 742 +
.../CodeIssues/NoDefaultConstructorIssueTests.cs | 169 -
.../ParameterCanBeIEnumerableTests.cs | 18 +
.../CodeIssues/ParameterHidesMemberIssueTests.cs | 18 +
.../CodeIssues/ParameterNotUsedIssueTests.cs | 14 +
.../PublicConstructorInAbstractClassIssueTest.cs | 2 +
.../RedundantArrayInitializerCommaIssueTests.cs | 110 -
.../CodeIssues/RedundantAssignmentIssueTests.cs | 32 +
.../RedundantBaseConstructorIssueTests.cs | 21 +-
.../CodeIssues/RedundantCaseLabelIssueTests.cs | 20 +
.../CSharp/CodeIssues/RedundantCastIssueTests.cs | 174 +
.../CSharp/CodeIssues/RedundantCatchIssueTests.cs | 314 +
.../CSharp/CodeIssues/RedundantCatchTests.cs | 223 -
.../RedundantCommaInArrayInitializerIssueTests.cs | 125 +
.../RedundantComparisonWithNullIssueTests.cs | 163 +
.../CSharp/CodeIssues/RedundantConstructorTests.cs | 96 -
.../RedundantDefaultFieldInitializerIssueTests.cs | 198 +
.../CSharp/CodeIssues/RedundantElseIssueTests.cs | 229 -
.../RedundantFieldInitializerIssueTests.cs | 182 -
.../CodeIssues/RedundantIfElseBlockIssueTests.cs | 245 +
.../CodeIssues/RedundantNameQualifierIssueTests.cs | 114 +
.../RedundantNamespaceUsageInspectorTests.cs | 95 -
.../CSharp/CodeIssues/RedundantNullCheckTests.cs | 143 -
...ndantObjectOrCollectionInitializerIssueTests.cs | 16 +-
.../CodeIssues/RedundantThisInspectorTests.cs | 79 -
.../CodeIssues/RedundantThisQualifierIssueTests.cs | 79 +
.../CodeIssues/RedundantToStringCallIssueTests.cs | 271 +
.../CSharp/CodeIssues/RedundantToStringTests.cs | 271 -
.../CodeIssues/RedundantTypeCastIssueTests.cs | 174 -
.../RedundantUsingDirectiveIssueTests.cs | 172 +
.../CodeIssues/RedundantUsingInspectorTests.cs | 156 -
.../RedundantWhereWithPredicateIssueTests.cs | 64 +-
.../ReferenceToStaticMemberViaDerivedTypeTests.cs | 326 -
.../ReplaceWithSingleCallToCountIssueTests.cs | 78 +
.../ReplaceWithSingleCallToFirstIssueTests.cs | 78 +
...laceWithSingleCallToFirstOrDefaultIssueTests.cs | 78 +
.../ReplaceWithSingleCallToLastIssueTests.cs | 78 +
...placeWithSingleCallToLastOrDefaultIssueTests.cs | 78 +
.../ReplaceWithSingleCallToLongCountIssueTests.cs | 78 +
.../ReplaceWithSingleCallToSingleIssueTests.cs | 78 +
...aceWithSingleCallToSingleOrDefaultIssueTests.cs | 78 +
.../ReplaceWithStringIsNullOrEmptyIssueTests.cs | 515 +
.../SimplifyAnonymousMethodToDelegateIssueTests.cs | 210 +-
.../StaticConstructorAccessModifierTest.cs | 6 +-
.../CodeIssues/StaticFieldInGenericTypeTests.cs | 15 +
.../StringIsNullOrEmptyInspectorTests.cs | 521 -
.../CodeIssues/SuggestUseVarKeywordEvidentTests.cs | 54 +
.../CodeIssues/ThreadStaticAtInstanceFieldTests.cs | 180 +
.../CodeIssues/ThreadStaticOnInstanceFieldTests.cs | 102 -
.../CodeIssues/TypeParameterNotUsedIssueTests.cs | 68 -
.../CodeIssues/UnusedTypeParameterIssueTests.cs | 68 +
.../CodeIssues/UseBlockInsteadColonIssueTests.cs | 81 +
.../CodeIssues/UseVarKeywordInspectorTests.cs | 54 -
.../CodeIssues/ValueParameterNotUsedIssueTests.cs | 228 +
.../CSharp/CodeIssues/ValueParameterUnusedTests.cs | 184 -
.../CSharp/Parser/Bugs/ParserBugTests.cs | 71 +-
.../Parser/Expression/QueryExpressionTests.cs | 16 +
.../GeneralScope/PreprocessorDirectiveTests.cs | 72 +-
.../CSharp/Parser/ParseUtil.cs | 2 +-
.../Parser/Statements/InvalidStatementsTests.cs | 2 +-
.../CSharp/Parser/TypeSystemConvertVisitorTests.cs | 16 +
.../CSharp/QueryExpressionExpanderTests.cs | 2 +-
.../CSharp/Refactoring/LambdaHelperTests.cs | 65 +
.../Refactoring/RefactoringStructureTests.cs | 51 +
.../CSharp/Resolver/AnonymousTypeTests.cs | 4 +-
.../CSharp/Resolver/BinaryOperatorTests.cs | 46 +-
.../CSharp/Resolver/ConversionsTest.cs | 181 +-
.../CSharp/Resolver/FindReferencesTest.cs | 100 +
.../CSharp/Resolver/LambdaTests.cs | 58 +
.../CSharp/Resolver/MemberLookupTests.cs | 34 +-
.../CSharp/Resolver/OverloadResolutionTests.cs | 16 +-
.../CSharp/Resolver/ResolveAtLocationTests.cs | 2 +-
.../CSharp/Resolver/TypeInferenceTests.cs | 32 +-
.../Documentation/CSharpCrefParserTests.cs | 34 +-
.../Documentation/IDStringTests.cs | 14 +-
.../FormattingTests/TestExpressionFormatting.cs | 21 +
.../FormattingTests/TestFormattingBugs.cs | 26 +
.../FormattingTests/TestGlobalLevelFormatting.cs | 46 +
.../FormattingTests/TestSpacingVisitor.cs | 4 +-
.../FormattingTests/TestStatementIndentation.cs | 31 +
.../FormattingTests/TestTypeLevelIndentation.cs | 461 +-
.../FormattingTests/TestWrapping.cs | 83 +-
.../FormattingTests/TextEditorTestAdapter.cs | 17 +-
.../ICSharpCode.NRefactory.Tests.csproj | 78 +-
.../TypeSystem/GetAllBaseTypesTest.cs | 4 +-
.../TypeSystem/GetMembersTests.cs | 4 +-
.../TypeSystem/TypeParameterTests.cs | 24 +-
.../TypeSystem/TypeSystemHelper.cs | 2 +-
.../TypeSystem/TypeSystemTests.TestCase.cs | 51 +-
.../TypeSystem/TypeSystemTests.cs | 144 +-
.../ICSharpCode.NRefactory.VB/Ast/Enums.cs | 2 +-
.../Ast/VBModifierToken.cs | 6 +-
.../Visitors/CSharpToVBConverterVisitor.cs | 2 +-
.../ICSharpCode.NRefactory.Xml/AXmlAttribute.cs | 2 +-
.../ICSharpCode.NRefactory.Xml/AXmlDocument.cs | 12 +-
.../ICSharpCode.NRefactory.Xml/AXmlElement.cs | 81 +-
.../ICSharpCode.NRefactory.Xml/AXmlObject.cs | 53 +-
.../ICSharpCode.NRefactory.Xml/AXmlReader.cs | 171 +-
.../ICSharpCode.NRefactory.Xml.csproj | 4 +-
.../ICSharpCode.NRefactory.Xml/TagReader.cs | 2 +-
.../ICSharpCode.NRefactory/Analysis/AbiComparer.cs | 248 +
.../Analysis/SymbolCollector.cs | 160 +
.../ICSharpCode.NRefactory/Analysis/TypeGraph.cs | 82 +
.../Analysis/TypeGraphNode.cs | 51 +
.../Completion/DisplayFlags.cs | 3 +-
.../Completion/FrameworkLookup.cs | 485 +
.../GetPotentiallyNestedClassTypeReference.cs | 7 +-
.../Documentation/IdStringMemberReference.cs | 20 +-
.../Documentation/IdStringProvider.cs | 21 +-
.../Editor/UnicodeNewline.cs | 251 +
.../ICSharpCode.NRefactory/IAnnotatable.cs | 12 +-
.../ICSharpCode.NRefactory.csproj | 28 +-
.../Properties/AssemblyInfo.cs | 4 +
.../Properties/GlobalAssemblyInfo.cs | 2 +-
.../Refactoring/IssueMarker.cs | 52 +
.../ICSharpCode.NRefactory/Refactoring/Severity.cs | 61 +
external/nrefactory/ICSharpCode.NRefactory/Role.cs | 2 +-
.../ICSharpCode.NRefactory/Semantics/Conversion.cs | 26 +-
.../Semantics/MemberResolveResult.cs | 4 +-
.../TypeSystem/AssemblyLoader.cs | 94 +
.../TypeSystem/AssemblyQualifiedTypeName.cs | 79 +
.../TypeSystem/CecilLoader.cs | 2354 ---
.../ICSharpCode.NRefactory/TypeSystem/DomRegion.cs | 14 +-
.../TypeSystem/EntityType.cs | 48 +-
.../ICSharpCode.NRefactory/TypeSystem/IAmbience.cs | 1 +
.../ICSharpCode.NRefactory/TypeSystem/IEntity.cs | 11 +-
.../ICSharpCode.NRefactory/TypeSystem/IField.cs | 15 +-
.../TypeSystem/INamespace.cs | 4 +-
.../TypeSystem/IParameter.cs | 6 +
.../ICSharpCode.NRefactory/TypeSystem/ISymbol.cs | 90 +
.../TypeSystem/ITypeParameter.cs | 15 +-
.../ICSharpCode.NRefactory/TypeSystem/IVariable.cs | 4 +-
.../Implementation/AbstractResolvedEntity.cs | 9 +-
.../Implementation/AbstractResolvedMember.cs | 7 +-
.../AbstractResolvedTypeParameter.cs | 18 +-
.../Implementation/AbstractUnresolvedEntity.cs | 9 +-
.../Implementation/AbstractUnresolvedMember.cs | 14 +-
.../TypeSystem/Implementation/BlobReader.cs | 387 +
.../Implementation/DefaultMemberReference.cs | 20 +-
.../TypeSystem/Implementation/DefaultParameter.cs | 12 +-
.../Implementation/DefaultResolvedField.cs | 6 +-
.../Implementation/DefaultResolvedMethod.cs | 4 +-
.../Implementation/DefaultResolvedProperty.cs | 2 +-
.../DefaultResolvedTypeDefinition.cs | 23 +-
.../Implementation/DefaultResolvedTypeParameter.cs | 4 +-
.../Implementation/DefaultUnresolvedAssembly.cs | 6 +-
.../Implementation/DefaultUnresolvedAttribute.cs | 4 +-
.../Implementation/DefaultUnresolvedEvent.cs | 4 +-
.../Implementation/DefaultUnresolvedField.cs | 14 +-
.../Implementation/DefaultUnresolvedMethod.cs | 18 +-
.../Implementation/DefaultUnresolvedParameter.cs | 7 +-
.../Implementation/DefaultUnresolvedProperty.cs | 8 +-
.../DefaultUnresolvedTypeDefinition.cs | 8 +-
.../DefaultUnresolvedTypeParameter.cs | 14 +-
.../TypeSystem/Implementation/DefaultVariable.cs | 77 +
.../Implementation/DummyTypeParameter.cs | 30 +-
...plicitInterfaceImplementationMemberReference.cs | 4 +-
.../TypeSystem/Implementation/MergedNamespace.cs | 4 +
.../TypeSystem/Implementation/MinimalCorlib.cs | 2 +-
.../Implementation/ResolvedAttributeBlob.cs | 164 +
.../TypeSystem/Implementation/SimpleCompilation.cs | 7 +-
.../TypeSystem/Implementation/SpecializedField.cs | 6 +-
.../TypeSystem/Implementation/SpecializedMember.cs | 78 +-
.../Implementation/TypeParameterReference.cs | 24 +-
.../Implementation/UnresolvedAttributeBlob.cs | 78 +
.../UnresolvedSecurityDeclarationBlob.cs | 152 +
.../TypeSystem/InheritanceHelper.cs | 2 +-
.../TypeSystem/ParameterListComparer.cs | 4 +-
.../TypeSystem/ReflectionHelper.cs | 8 +-
.../TypeSystem/TypeParameterSubstitution.cs | 4 +-
.../TypeSystem/TypeSystemExtensions.cs | 194 +-
.../Utils/ExtensionMethods.cs | 2 +-
external/nrefactory/NRefactory.sln | 65 +-
external/nrefactory/NRefactory.suo | Bin 3072 -> 0 bytes
.../Packages/ICSharpCode.NRefactory.nuspec | 4 +
external/nrefactory/README | 4 +-
external/xwt/.gitignore | 1 +
external/xwt/MacTest/MacTest.csproj | 7 +-
external/xwt/MixedGtkMacTest/AppWindow.cs | 69 +
external/xwt/MixedGtkMacTest/AssemblyInfo.cs | 52 +
external/xwt/MixedGtkMacTest/Main.cs | 43 +
.../xwt/MixedGtkMacTest/MixedGtkMacTest.csproj | 58 +
external/xwt/Samples/App.cs | 5 +-
external/xwt/Samples/MainWindow.cs | 90 +-
.../MonoDevelop.Components.Chart/BasicChart.cs | 6 +-
external/xwt/Samples/Samples.csproj | 28 +-
external/xwt/Samples/Samples/Boxes.cs | 47 +-
external/xwt/Samples/Samples/ButtonSample.cs | 11 +-
external/xwt/Samples/Samples/CanvasWithWidget.cs | 6 +-
external/xwt/Samples/Samples/ChartSample.cs | 2 +-
external/xwt/Samples/Samples/ComboBoxes.cs | 13 +-
external/xwt/Samples/Samples/DatePickerSample.cs | 46 +
external/xwt/Samples/Samples/Designer.cs | 2 +-
external/xwt/Samples/Samples/DragDrop.cs | 4 +-
external/xwt/Samples/Samples/DrawingFigures.cs | 39 +-
.../Samples/Samples/DrawingPatternsAndImages.cs | 7 +-
external/xwt/Samples/Samples/DrawingText.cs | 21 +-
external/xwt/Samples/Samples/ExpanderSample.cs | 4 +
external/xwt/Samples/Samples/ImageScaling.cs | 90 +
external/xwt/Samples/Samples/Images.cs | 6 +-
external/xwt/Samples/Samples/Labels.cs | 3 +
external/xwt/Samples/Samples/ListBoxSample.cs | 4 +-
external/xwt/Samples/Samples/ListView1.cs | 45 +-
external/xwt/Samples/Samples/ListView2.cs | 37 +
external/xwt/Samples/Samples/Markdown.cs | 4 +-
external/xwt/Samples/Samples/NotebookSample.cs | 2 +-
external/xwt/Samples/Samples/OpacitySample.cs | 73 +
external/xwt/Samples/Samples/PartialImages.cs | 2 +-
external/xwt/Samples/Samples/PopoverSample.cs | 20 +-
external/xwt/Samples/Samples/ProgressBarSample.cs | 4 +-
external/xwt/Samples/Samples/RadioButtonSample.cs | 65 +
external/xwt/Samples/Samples/ReliefFrameSample.cs | 19 -
external/xwt/Samples/Samples/ScreensSample.cs | 129 +
external/xwt/Samples/Samples/ScrollWindowSample.cs | 16 +-
external/xwt/Samples/Samples/ScrollbarSample.cs | 78 +
external/xwt/Samples/Samples/SliderSample.cs | 40 +
external/xwt/Samples/Samples/Tables.cs | 30 +-
external/xwt/Samples/Samples/TextEntries.cs | 5 +
external/xwt/Samples/Samples/TreeViews.cs | 7 +-
external/xwt/Samples/Samples/WidgetRendering.cs | 47 +
external/xwt/Samples/Samples/Windows.cs | 20 +-
external/xwt/Samples/document-generic.png | Bin 0 -> 423 bytes
external/xwt/Samples/document-generic at 2x.png | Bin 0 -> 918 bytes
external/xwt/Test/ButtonTests.cs | 38 +
external/xwt/Test/CanvasTests.cs | 38 +
external/xwt/Test/CheckBoxTests.cs | 38 +
external/xwt/Test/ComboBoxEntryTests.cs | 40 +
external/xwt/Test/ComboBoxTests.cs | 39 +
external/xwt/Test/FrameTests.cs | 39 +
external/xwt/Test/HBoxTests.cs | 38 +
external/xwt/Test/HPanedTests.cs | 38 +
external/xwt/Test/HSeparatorTests.cs | 38 +
external/xwt/Test/ImageViewTests.cs | 38 +
external/xwt/Test/LabelTests.cs | 38 +
external/xwt/Test/ListBoxTests.cs | 38 +
external/xwt/Test/ListViewTests.cs | 38 +
external/xwt/Test/NotebookTests.cs | 38 +
external/xwt/Test/ProgressBarTests.cs | 38 +
external/xwt/Test/ScrollViewTests.cs | 38 +
external/xwt/Test/Setup.cs | 46 +
external/xwt/Test/SpinButtonTests.cs | 38 +
external/xwt/Test/TableTests.cs | 38 +
external/xwt/Test/Test.csproj | 74 +
external/xwt/Test/TextEntryTests.cs | 38 +
external/xwt/Test/VBoxTests.cs | 38 +
external/xwt/Test/VPanedTests.cs | 38 +
external/xwt/Test/VSeparatorTests.cs | 38 +
external/xwt/Test/WidgetTests.cs | 239 +
external/xwt/Testing/GtkTestRunner.csproj | 75 +
external/xwt/Testing/GtkTestRunner/AssemblyInfo.cs | 52 +
external/xwt/Testing/GtkTestRunner/Main.cs | 48 +
external/xwt/Testing/Info.plist | 5 +
external/xwt/Testing/MacTestRunner.csproj | 239 +
external/xwt/Testing/MacTestRunner/Info.plist | 16 +
external/xwt/Testing/MacTestRunner/Main.cs | 24 +
.../Testing/MacTestRunner/ReferenceImages/Arc.png | Bin 0 -> 594 bytes
.../MacTestRunner/ReferenceImages/ArcClosePath.png | Bin 0 -> 983 bytes
.../MacTestRunner/ReferenceImages/ArcFill.png | Bin 0 -> 710 bytes
.../ReferenceImages/ArcMultipleLoops.png | Bin 0 -> 1188 bytes
.../MacTestRunner/ReferenceImages/ArcNegative.png | Bin 0 -> 1061 bytes
.../ReferenceImages/ArcNegativeClosePath.png | Bin 0 -> 1167 bytes
.../ReferenceImages/ArcNegativeFill.png | Bin 0 -> 849 bytes
.../ReferenceImages/ArcNegativeMultipleLoops.png | Bin 0 -> 904 bytes
.../ReferenceImages/ArcNegativePathConnection.png | Bin 0 -> 1063 bytes
.../ArcNegativeStartingNegative.png | Bin 0 -> 1081 bytes
.../ReferenceImages/ArcNegativeSwappedAngles.png | Bin 0 -> 1252 bytes
.../ReferenceImages/ArcPathConnection.png | Bin 0 -> 889 bytes
.../ReferenceImages/ArcStartingNegative.png | Bin 0 -> 642 bytes
.../ReferenceImages/ArcSwappedAngles.png | Bin 0 -> 554 bytes
.../MacTestRunner/ReferenceImages/Curve.png | Bin 0 -> 952 bytes
.../ReferenceImages/CurveClosePath.png | Bin 0 -> 2249 bytes
.../ReferenceImages/CurveFillWithHoles.png | Bin 0 -> 2042 bytes
.../ReferenceImages/CurvePathConnection.png | Bin 0 -> 1317 bytes
.../ReferenceImages/DrawPathTwoTimes.png | Bin 0 -> 1393 bytes
.../ReferenceImages/ImagePatternInCircle.png | Bin 0 -> 725 bytes
.../ReferenceImages/ImagePatternInTriangle.png | Bin 0 -> 795 bytes
.../ImagePatternWithRotateTransform.png | Bin 0 -> 2599 bytes
.../ImagePatternWithRotateTransformWithAlpha.png | Bin 0 -> 2509 bytes
.../ImagePatternWithScaleTransform.png | Bin 0 -> 545 bytes
.../ImagePatternWithScaleTransformWithAlpha.png | Bin 0 -> 543 bytes
.../ReferenceImages/LineClosePath.png | Bin 0 -> 356 bytes
.../ReferenceImages/LinearGradient.png | Bin 0 -> 1284 bytes
.../ReferenceImages/LinearGradientDiagonal.png | Bin 0 -> 2113 bytes
.../ReferenceImages/LinearGradientInternalBox.png | Bin 0 -> 1831 bytes
.../ReferenceImages/LinearGradientReverse.png | Bin 0 -> 1209 bytes
.../MacTestRunner/ReferenceImages/NewPath.png | Bin 0 -> 277 bytes
.../ReferenceImages/RadialGradient.png | Bin 0 -> 2660 bytes
.../ReferenceImages/RadialGradientReverse.png | Bin 0 -> 2713 bytes
.../ReferenceImages/RadialGradientSmall.png | Bin 0 -> 1714 bytes
.../MacTestRunner/ReferenceImages/Rectangle.png | Bin 0 -> 259 bytes
.../ReferenceImages/RectanglePathConnection.png | Bin 0 -> 346 bytes
.../ReferenceImages/StrokePreserve.png | Bin 0 -> 269 bytes
.../Testing/MacTestRunner/ReferenceImages/Text.png | Bin 0 -> 1247 bytes
.../ReferenceImages/TextLineBreak.png | Bin 0 -> 1391 bytes
.../MacTestRunner/ReferenceImages/TextSize.png | Bin 0 -> 1291 bytes
.../ReferenceImages/TextTrimmingEllipsis.png | Bin 0 -> 1015 bytes
.../ReferenceImages/TextWithBlankLines.png | Bin 0 -> 1686 bytes
.../MacTestRunner/ReferenceImages/TextWordWrap.png | Bin 0 -> 3835 bytes
external/xwt/Testing/Tests/BoxTests.cs | 93 +
external/xwt/Testing/Tests/ButtonTests.cs | 38 +
external/xwt/Testing/Tests/CanvasTests.cs | 54 +
external/xwt/Testing/Tests/CheckBoxTests.cs | 38 +
external/xwt/Testing/Tests/ColorTests.cs | 161 +
external/xwt/Testing/Tests/ComboBoxEntryTests.cs | 39 +
external/xwt/Testing/Tests/ComboBoxTests.cs | 39 +
external/xwt/Testing/Tests/ConsoleTestRunner.cs | 37 +
external/xwt/Testing/Tests/ContainerTests.cs | 64 +
external/xwt/Testing/Tests/DatePickerTests.cs | 38 +
external/xwt/Testing/Tests/DrawingTests.cs | 1017 ++
external/xwt/Testing/Tests/ExpanderTests.cs | 45 +
external/xwt/Testing/Tests/FontTests.cs | 233 +
external/xwt/Testing/Tests/FrameTests.cs | 44 +
external/xwt/Testing/Tests/HBoxTests.cs | 43 +
external/xwt/Testing/Tests/HPanedTests.cs | 38 +
external/xwt/Testing/Tests/HSeparatorTests.cs | 38 +
external/xwt/Testing/Tests/ImageViewTests.cs | 38 +
external/xwt/Testing/Tests/LabelTests.cs | 38 +
external/xwt/Testing/Tests/ListBoxTests.cs | 48 +
external/xwt/Testing/Tests/ListViewTests.cs | 38 +
external/xwt/Testing/Tests/MatrixTests.cs | 443 +
external/xwt/Testing/Tests/NotebookTests.cs | 43 +
external/xwt/Testing/Tests/PanedTests.cs | 45 +
external/xwt/Testing/Tests/ProgressBarTests.cs | 38 +
external/xwt/Testing/Tests/RadioButtonTests.cs | 217 +
.../xwt/Testing/Tests/ReferenceImageManager.cs | 205 +
.../Testing/Tests/ReferenceImageVerifierDialog.cs | 113 +
external/xwt/Testing/Tests/ReferenceImages/Arc.png | Bin 0 -> 548 bytes
.../Testing/Tests/ReferenceImages/ArcClosePath.png | Bin 0 -> 976 bytes
.../xwt/Testing/Tests/ReferenceImages/ArcFill.png | Bin 0 -> 666 bytes
.../Tests/ReferenceImages/ArcMultipleLoops.png | Bin 0 -> 1673 bytes
.../Testing/Tests/ReferenceImages/ArcNegative.png | Bin 0 -> 1208 bytes
.../Tests/ReferenceImages/ArcNegativeClosePath.png | Bin 0 -> 1237 bytes
.../Tests/ReferenceImages/ArcNegativeFill.png | Bin 0 -> 867 bytes
.../ReferenceImages/ArcNegativeMultipleLoops.png | Bin 0 -> 1017 bytes
.../ReferenceImages/ArcNegativePathConnection.png | Bin 0 -> 1206 bytes
.../ArcNegativeStartingNegative.png | Bin 0 -> 1114 bytes
.../ReferenceImages/ArcNegativeSwappedAngles.png | Bin 0 -> 1332 bytes
.../Tests/ReferenceImages/ArcPathConnection.png | Bin 0 -> 854 bytes
.../Tests/ReferenceImages/ArcStartingNegative.png | Bin 0 -> 635 bytes
.../Tests/ReferenceImages/ArcSwappedAngles.png | Bin 0 -> 530 bytes
.../xwt/Testing/Tests/ReferenceImages/Clip.png | Bin 0 -> 202 bytes
.../Tests/ReferenceImages/ClipAccumulated.png | Bin 0 -> 183 bytes
.../Testing/Tests/ReferenceImages/ClipPreserve.png | Bin 0 -> 234 bytes
.../Tests/ReferenceImages/ClipSaveRestore.png | Bin 0 -> 202 bytes
.../xwt/Testing/Tests/ReferenceImages/Curve.png | Bin 0 -> 950 bytes
.../Tests/ReferenceImages/CurveClosePath.png | Bin 0 -> 2168 bytes
.../Tests/ReferenceImages/CurveFillWithHoles.png | Bin 0 -> 2324 bytes
.../Tests/ReferenceImages/CurvePathConnection.png | Bin 0 -> 1382 bytes
.../Tests/ReferenceImages/DrawPathTwoTimes.png | Bin 0 -> 1454 bytes
.../Testing/Tests/ReferenceImages/FillPreserve.png | Bin 0 -> 195 bytes
.../Testing/Tests/ReferenceImages/ImagePattern.png | Bin 0 -> 305 bytes
.../Tests/ReferenceImages/ImagePatternInCircle.png | Bin 0 -> 763 bytes
.../ReferenceImages/ImagePatternInTriangle.png | Bin 0 -> 686 bytes
.../ReferenceImages/ImagePatternWithAlpha.png | Bin 0 -> 293 bytes
.../ImagePatternWithRotateTransform.png | Bin 0 -> 1724 bytes
.../ImagePatternWithRotateTransformWithAlpha.png | Bin 0 -> 1595 bytes
.../ImagePatternWithScaleTransform.png | Bin 0 -> 387 bytes
.../ImagePatternWithScaleTransformWithAlpha.png | Bin 0 -> 394 bytes
.../ImagePatternWithTranslateTransform.png | Bin 0 -> 293 bytes
...ImagePatternWithTranslateTransformWithAlpha.png | Bin 0 -> 283 bytes
.../xwt/Testing/Tests/ReferenceImages/Line.png | Bin 0 -> 173 bytes
.../Tests/ReferenceImages/LineClosePath.png | Bin 0 -> 303 bytes
.../Testing/Tests/ReferenceImages/LineWidth.png | Bin 0 -> 190 bytes
.../Tests/ReferenceImages/LinearGradient.png | Bin 0 -> 249 bytes
.../ReferenceImages/LinearGradientDiagonal.png | Bin 0 -> 372 bytes
.../ReferenceImages/LinearGradientInternalBox.png | Bin 0 -> 397 bytes
.../ReferenceImages/LinearGradientReverse.png | Bin 0 -> 254 bytes
.../xwt/Testing/Tests/ReferenceImages/NewPath.png | Bin 0 -> 277 bytes
.../Tests/ReferenceImages/RadialGradient.png | Bin 0 -> 2016 bytes
.../ReferenceImages/RadialGradientReverse.png | Bin 0 -> 2042 bytes
.../Tests/ReferenceImages/RadialGradientSmall.png | Bin 0 -> 968 bytes
.../Testing/Tests/ReferenceImages/Rectangle.png | Bin 0 -> 195 bytes
.../Tests/ReferenceImages/RectangleFill.png | Bin 0 -> 180 bytes
.../ReferenceImages/RectanglePathConnection.png | Bin 0 -> 265 bytes
.../Tests/ReferenceImages/SaveRestoreColor.png | Bin 0 -> 182 bytes
.../ReferenceImages/SaveRestoreImagePattern.png | Bin 0 -> 257 bytes
.../Tests/ReferenceImages/SaveRestoreLineWidth.png | Bin 0 -> 202 bytes
.../ReferenceImages/SaveRestoreLinearGradient.png | Bin 0 -> 188 bytes
.../Tests/ReferenceImages/SaveRestorePath.png | Bin 0 -> 197 bytes
.../ReferenceImages/SaveRestoreRadialGradient.png | Bin 0 -> 188 bytes
.../Tests/ReferenceImages/SaveRestoreTransform.png | Bin 0 -> 185 bytes
.../Tests/ReferenceImages/StrokePreserve.png | Bin 0 -> 217 bytes
.../xwt/Testing/Tests/ReferenceImages/Text.png | Bin 0 -> 1263 bytes
.../Tests/ReferenceImages/TextLineBreak.png | Bin 0 -> 1256 bytes
.../xwt/Testing/Tests/ReferenceImages/TextSize.png | Bin 0 -> 1219 bytes
.../Tests/ReferenceImages/TextTrimmingEllipsis.png | Bin 0 -> 861 bytes
.../Tests/ReferenceImages/TextWithBlankLines.png | Bin 0 -> 1373 bytes
.../Testing/Tests/ReferenceImages/TextWordWrap.png | Bin 0 -> 3453 bytes
.../Tests/ReferenceImages/pattern-sample.png | Bin 0 -> 178 bytes
external/xwt/Testing/Tests/ScrollViewTests.cs | 43 +
external/xwt/Testing/Tests/ScrollbarTests.cs | 56 +
external/xwt/Testing/Tests/SegmentedButtonTests.cs | 38 +
external/xwt/Testing/Tests/SliderTests.cs | 56 +
external/xwt/Testing/Tests/SpinButtonTests.cs | 38 +
external/xwt/Testing/Tests/SpinnerTests.cs | 38 +
external/xwt/Testing/Tests/TableTests.cs | 46 +
external/xwt/Testing/Tests/Test.csproj | 74 +
external/xwt/Testing/Tests/Tests.csproj | 288 +
external/xwt/Testing/Tests/TextEntryTests.cs | 38 +
external/xwt/Testing/Tests/ToggleButtonTests.cs | 38 +
external/xwt/Testing/Tests/TransformTests.cs | 162 +
external/xwt/Testing/Tests/TreeViewTests.cs | 38 +
external/xwt/Testing/Tests/VBoxTests.cs | 45 +
external/xwt/Testing/Tests/VPanedTests.cs | 38 +
external/xwt/Testing/Tests/VScrollbar.cs | 37 +
external/xwt/Testing/Tests/VSeparatorTests.cs | 38 +
external/xwt/Testing/Tests/WidgetTests.cs | 335 +
external/xwt/Testing/Tests/WindowTests.cs | 259 +
external/xwt/Testing/Tests/XwtTest.cs | 88 +
external/xwt/Testing/WpfTestRunner.csproj | 116 +
external/xwt/Testing/WpfTestRunner/Program.cs | 29 +
.../WpfTestRunner/Properties/AssemblyInfo.cs | 36 +
.../Testing/WpfTestRunner/ReferenceImages/Arc.png | Bin 0 -> 597 bytes
.../WpfTestRunner/ReferenceImages/ArcClosePath.png | Bin 0 -> 861 bytes
.../WpfTestRunner/ReferenceImages/ArcFill.png | Bin 0 -> 679 bytes
.../ReferenceImages/ArcMultipleLoops.png | Bin 0 -> 1456 bytes
.../WpfTestRunner/ReferenceImages/ArcNegative.png | Bin 0 -> 1025 bytes
.../ReferenceImages/ArcNegativeClosePath.png | Bin 0 -> 1043 bytes
.../ReferenceImages/ArcNegativeFill.png | Bin 0 -> 858 bytes
.../ReferenceImages/ArcNegativeMultipleLoops.png | Bin 0 -> 987 bytes
.../ReferenceImages/ArcNegativePathConnection.png | Bin 0 -> 1038 bytes
.../ArcNegativeStartingNegative.png | Bin 0 -> 1057 bytes
.../ReferenceImages/ArcNegativeSwappedAngles.png | Bin 0 -> 1139 bytes
.../ReferenceImages/ArcPathConnection.png | Bin 0 -> 783 bytes
.../ReferenceImages/ArcStartingNegative.png | Bin 0 -> 621 bytes
.../ReferenceImages/ArcSwappedAngles.png | Bin 0 -> 591 bytes
.../WpfTestRunner/ReferenceImages/Curve.png | Bin 0 -> 860 bytes
.../ReferenceImages/CurveClosePath.png | Bin 0 -> 1840 bytes
.../ReferenceImages/CurveFillWithHoles.png | Bin 0 -> 1912 bytes
.../ReferenceImages/CurvePathConnection.png | Bin 0 -> 1138 bytes
.../ReferenceImages/ImagePatternInCircle.png | Bin 0 -> 925 bytes
.../ReferenceImages/ImagePatternInTriangle.png | Bin 0 -> 800 bytes
.../ImagePatternWithScaleTransform.png | Bin 0 -> 573 bytes
.../ReferenceImages/LineClosePath.png | Bin 0 -> 367 bytes
.../ReferenceImages/LinearGradient.png | Bin 0 -> 513 bytes
.../ReferenceImages/LinearGradientDiagonal.png | Bin 0 -> 541 bytes
.../ReferenceImages/LinearGradientInternalBox.png | Bin 0 -> 795 bytes
.../ReferenceImages/LinearGradientReverse.png | Bin 0 -> 513 bytes
.../WpfTestRunner/ReferenceImages/NewPath.png | Bin 0 -> 340 bytes
.../ReferenceImages/RectanglePathConnection.png | Bin 0 -> 372 bytes
.../ReferenceImages/SaveRestorePath.png | Bin 0 -> 311 bytes
.../Testing/WpfTestRunner/ReferenceImages/Text.png | Bin 0 -> 1263 bytes
.../ReferenceImages/TextLineBreak.png | Bin 0 -> 1256 bytes
.../WpfTestRunner/ReferenceImages/TextSize.png | Bin 0 -> 1219 bytes
.../WpfTestRunner/ReferenceImages/TextWordWrap.png | Bin 0 -> 3453 bytes
external/xwt/Xwt.Gtk.Mac/Xwt.Gtk.Mac.csproj | 86 +
.../Xwt.CairoBackend/CairoContextBackendHandler.cs | 272 +-
.../CairoGradientBackendHandler.cs | 19 +-
.../CairoTextLayoutBackendHandler.cs | 269 -
external/xwt/Xwt.Gtk/Xwt.Gtk.csproj | 19 +-
.../Xwt.Gtk/Xwt.GtkBackend.CellViews/CellUtil.cs | 76 +-
.../Xwt.GtkBackend.CellViews/CustomCellRenderer.cs | 84 +
.../CustomCellRendererImage.cs | 93 +
.../CustomCellRendererText.cs | 79 +
.../CustomCellRendererToggle.cs | 70 +
.../Xwt.Gtk/Xwt.GtkBackend/AlertDialogBackend.cs | 16 +-
external/xwt/Xwt.Gtk/Xwt.GtkBackend/BoxBackend.cs | 2 -
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs | 20 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs | 25 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/CheckBoxBackend.cs | 13 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ClipboardBackend.cs | 27 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs | 25 +-
.../Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs | 9 +-
.../Xwt.GtkBackend/ContextBackendHandler.cs | 78 -
.../Xwt.Gtk/Xwt.GtkBackend/CustomWidgetBackend.cs | 7 +-
.../Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs | 4 +-
.../Xwt.GtkBackend/DesignerSurfaceBackend.cs | 4 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs | 22 +-
.../Xwt.GtkBackend/EmbeddedWidgetBackend.cs | 54 +
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ExpanderBackend.cs | 9 +-
.../Xwt.Gtk/Xwt.GtkBackend/FileDialogBackend.cs | 27 +-
.../Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs | 49 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/FrameBackend.cs | 37 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs | 19 +-
.../Xwt.Gtk/Xwt.GtkBackend/GtkDesktopBackend.cs | 87 +
external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs | 213 +-
external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkInterop.cs | 257 +
.../xwt/Xwt.Gtk/Xwt.GtkBackend/GtkMacInterop.cs | 47 +
.../xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWorkarounds.cs | 354 +-
external/xwt/Xwt.Gtk/Xwt.GtkBackend/HeaderBox.cs | 68 +-
.../Xwt.Gtk/Xwt.GtkBackend/ImageBuilderBackend.cs | 26 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs | 411 +-
.../Xwt.GtkBackend/ImagePatternBackendHandler.cs | 66 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ImageViewBackend.cs | 19 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/LabelBackend.cs | 14 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs | 4 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ListBoxBackend.cs | 14 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ListStoreBackend.cs | 15 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ListViewBackend.cs | 29 +
external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs | 3 +-
.../Xwt.Gtk/Xwt.GtkBackend/MenuButtonBackend.cs | 4 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs | 17 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/NotebookBackend.cs | 8 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/PanedBackend.cs | 18 +-
external/xwt/Xwt.Gtk/Xwt.GtkBackend/PangoUtil.cs | 198 -
.../xwt/Xwt.Gtk/Xwt.GtkBackend/PopoverBackend.cs | 15 +-
.../Xwt.Gtk/Xwt.GtkBackend/ProgressBarBackend.cs | 2 +-
.../Xwt.Gtk/Xwt.GtkBackend/RadioButtonBackend.cs | 158 +
.../Xwt.Gtk/Xwt.GtkBackend/RichTextViewBackend.cs | 4 +-
.../Xwt.GtkBackend/ScrollAdjustmentBackend.cs | 61 +-
.../Xwt.Gtk/Xwt.GtkBackend/ScrollViewBackend.cs | 10 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollbarBackend.cs | 52 +
.../Xwt.GtkBackend/SegmentedButtonBackend.cs | 111 +
.../xwt/Xwt.Gtk/Xwt.GtkBackend/SliderBackend.cs | 102 +
.../Xwt.Gtk/Xwt.GtkBackend/SpinButtonBackend.cs | 42 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs | 15 +-
.../Xwt.Gtk/Xwt.GtkBackend/StatusIconBackend.cs | 17 +-
.../Xwt.Gtk/Xwt.GtkBackend/TableStoreBackend.cs | 33 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/TableViewBackend.cs | 23 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/TextEntryBackend.cs | 26 +-
.../Xwt.GtkBackend/TextLayoutBackendHandler.cs | 173 +-
.../Xwt.Gtk/Xwt.GtkBackend/ToggleButtonBackend.cs | 4 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/TreeStoreBackend.cs | 2 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/TreeViewBackend.cs | 70 +
external/xwt/Xwt.Gtk/Xwt.GtkBackend/Util.cs | 116 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs | 505 +-
.../xwt/Xwt.Gtk/Xwt.GtkBackend/WindowBackend.cs | 58 +-
.../Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs | 135 +-
.../Xwt.Mac/Xwt.Mac.CellViews/CanvasTableCell.cs | 95 +
external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CellUtil.cs | 25 +-
.../Xwt.Mac/Xwt.Mac.CellViews/CheckBoxTableCell.cs | 108 +
.../xwt/Xwt.Mac/Xwt.Mac.CellViews/CompositeCell.cs | 185 +-
.../xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellRenderer.cs | 6 +-
.../xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellSource.cs | 1 +
.../Xwt.Mac/Xwt.Mac.CellViews/ImageTableCell.cs | 28 +-
.../xwt/Xwt.Mac/Xwt.Mac.CellViews/TextTableCell.cs | 27 +-
external/xwt/Xwt.Mac/Xwt.Mac.csproj | 43 +-
external/xwt/Xwt.Mac/Xwt.Mac/AlertDialogBackend.cs | 6 +-
external/xwt/Xwt.Mac/Xwt.Mac/BoxBackend.cs | 24 +-
external/xwt/Xwt.Mac/Xwt.Mac/ButtonBackend.cs | 65 +-
external/xwt/Xwt.Mac/Xwt.Mac/CanvasBackend.cs | 105 +-
external/xwt/Xwt.Mac/Xwt.Mac/CheckBoxBackend.cs | 5 +-
external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxBackend.cs | 25 +-
.../xwt/Xwt.Mac/Xwt.Mac/ComboBoxEntryBackend.cs | 13 +-
.../xwt/Xwt.Mac/Xwt.Mac/ContextBackendHandler.cs | 251 +-
.../xwt/Xwt.Mac/Xwt.Mac/CustomWidgetBackend.cs | 190 +
external/xwt/Xwt.Mac/Xwt.Mac/DatePickerBackend.cs | 84 +
external/xwt/Xwt.Mac/Xwt.Mac/DialogBackend.cs | 134 +
external/xwt/Xwt.Mac/Xwt.Mac/ExpanderBackend.cs | 150 +-
external/xwt/Xwt.Mac/Xwt.Mac/FileDialogBackend.cs | 3 +-
external/xwt/Xwt.Mac/Xwt.Mac/FontBackendHandler.cs | 91 +-
external/xwt/Xwt.Mac/Xwt.Mac/FrameBackend.cs | 80 +-
.../xwt/Xwt.Mac/Xwt.Mac/GradientBackendHandler.cs | 14 +-
external/xwt/Xwt.Mac/Xwt.Mac/IViewObject.cs | 2 +-
.../Xwt.Mac/Xwt.Mac/ImageBuilderBackendHandler.cs | 28 +-
external/xwt/Xwt.Mac/Xwt.Mac/ImageHandler.cs | 188 +-
.../Xwt.Mac/Xwt.Mac/ImagePatternBackendHandler.cs | 24 +-
external/xwt/Xwt.Mac/Xwt.Mac/ImageViewBackend.cs | 26 +-
external/xwt/Xwt.Mac/Xwt.Mac/LabelBackend.cs | 96 +-
external/xwt/Xwt.Mac/Xwt.Mac/LinkLabelBackend.cs | 4 +-
external/xwt/Xwt.Mac/Xwt.Mac/ListBoxBackend.cs | 58 +
external/xwt/Xwt.Mac/Xwt.Mac/ListViewBackend.cs | 7 +-
.../xwt/Xwt.Mac/Xwt.Mac/MacClipboardBackend.cs | 124 +
external/xwt/Xwt.Mac/Xwt.Mac/MacDesktopBackend.cs | 113 +
external/xwt/Xwt.Mac/Xwt.Mac/MacEngine.cs | 174 +-
.../xwt/Xwt.Mac/Xwt.Mac/MacSystemInformation.cs | 63 +
external/xwt/Xwt.Mac/Xwt.Mac/MenuBackend.cs | 12 +-
external/xwt/Xwt.Mac/Xwt.Mac/MenuButtonBackend.cs | 112 +
external/xwt/Xwt.Mac/Xwt.Mac/MenuItemBackend.cs | 13 +-
external/xwt/Xwt.Mac/Xwt.Mac/NotebookBackend.cs | 14 +-
external/xwt/Xwt.Mac/Xwt.Mac/ObjcHelper.cs | 4 +-
external/xwt/Xwt.Mac/Xwt.Mac/PanedBackend.cs | 47 +-
external/xwt/Xwt.Mac/Xwt.Mac/PathBackendHandler.cs | 135 +
external/xwt/Xwt.Mac/Xwt.Mac/PopoverBackend.cs | 13 +-
external/xwt/Xwt.Mac/Xwt.Mac/ProgressBarBackend.cs | 5 +-
external/xwt/Xwt.Mac/Xwt.Mac/RadioButtonBackend.cs | 149 +
.../xwt/Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs | 410 +
.../xwt/Xwt.Mac/Xwt.Mac/ScrollAdjustmentBackend.cs | 85 +-
external/xwt/Xwt.Mac/Xwt.Mac/ScrollViewBackend.cs | 124 +-
external/xwt/Xwt.Mac/Xwt.Mac/ScrollbarBackend.cs | 191 +
.../Xwt.Mac/Xwt.Mac/SelectFolderDialogBackend.cs | 10 +
external/xwt/Xwt.Mac/Xwt.Mac/SeparatorBackend.cs | 4 +-
.../Xwt.Mac/Xwt.Mac/SeparatorMenuItemBackend.cs | 3 +-
external/xwt/Xwt.Mac/Xwt.Mac/SliderBackend.cs | 123 +
external/xwt/Xwt.Mac/Xwt.Mac/SpinButtonBackend.cs | 38 +-
external/xwt/Xwt.Mac/Xwt.Mac/SpinnerBackend.cs | 3 +-
external/xwt/Xwt.Mac/Xwt.Mac/StatusIconBackend.cs | 12 +-
external/xwt/Xwt.Mac/Xwt.Mac/TableViewBackend.cs | 20 +-
external/xwt/Xwt.Mac/Xwt.Mac/TextEntryBackend.cs | 61 +-
.../Xwt.Mac/Xwt.Mac/TextLayoutBackendHandler.cs | 162 +-
.../xwt/Xwt.Mac/Xwt.Mac/ToggleButtonBackend.cs | 9 +-
external/xwt/Xwt.Mac/Xwt.Mac/TreeViewBackend.cs | 30 +-
external/xwt/Xwt.Mac/Xwt.Mac/Util.cs | 202 +-
external/xwt/Xwt.Mac/Xwt.Mac/ViewBackend.cs | 425 +-
external/xwt/Xwt.Mac/Xwt.Mac/WindowBackend.cs | 157 +-
external/xwt/Xwt.Mac/icons/magnifier-zoom-in.png | Bin 758 -> 0 bytes
external/xwt/Xwt.Mac/icons/magnifier-zoom-out.png | Bin 736 -> 0 bytes
external/xwt/Xwt.Mac/icons/zoom-actual.png | Bin 0 -> 716 bytes
external/xwt/Xwt.Mac/icons/zoom-actual at 2x.png | Bin 0 -> 2054 bytes
external/xwt/Xwt.Mac/icons/zoom-in.png | Bin 0 -> 715 bytes
external/xwt/Xwt.Mac/icons/zoom-in at 2x.png | Bin 0 -> 2024 bytes
external/xwt/Xwt.Mac/icons/zoom-out.png | Bin 0 -> 707 bytes
external/xwt/Xwt.Mac/icons/zoom-out at 2x.png | Bin 0 -> 1940 bytes
external/xwt/Xwt.Mac/icons/zoom-to-fit.png | Bin 0 -> 733 bytes
external/xwt/Xwt.Mac/icons/zoom-to-fit at 2x.png | Bin 0 -> 2018 bytes
external/xwt/Xwt.WPF/Xwt.WPF.csproj | 44 +-
.../CanvasCellViewBackend.cs | 111 +
.../Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs | 15 +-
.../ImageToImageSourceConverter.cs | 5 +-
.../Xwt.WPF/Xwt.WPFBackend/AlertDialogBackend.cs | 23 +-
external/xwt/Xwt.WPF/Xwt.WPFBackend/Backend.cs | 6 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs | 17 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/CanvasBackend.cs | 216 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/CheckBoxBackend.cs | 14 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs | 54 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxBackend.cs | 2 +-
.../Xwt.WPFBackend/ComboBoxTextEntryBackend.cs | 12 +-
.../Xwt.WPFBackend/ContextBackendHandler.cs | 446 +-
.../Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs | 13 +-
.../Xwt.WPF/Xwt.WPFBackend/CustomWidgetBackend.cs | 19 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/DataConverter.cs | 162 +-
.../Xwt.WPF/Xwt.WPFBackend/DatePickerBackend.cs | 93 +
.../xwt/Xwt.WPF/Xwt.WPFBackend/DialogBackend.cs | 6 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/DrawingContext.cs | 310 +-
.../Xwt.WPFBackend/EmbedNativeWidgetBackend.cs | 21 +
external/xwt/Xwt.WPF/Xwt.WPFBackend/ExCanvas.cs | 7 +-
external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeView.cs | 177 +
.../xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeViewItem.cs | 143 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ExpanderBackend.cs | 120 +
.../Xwt.WPF/Xwt.WPFBackend/FontBackendHandler.cs | 95 +-
.../Xwt.WPFBackend/GradientBackendHandler.cs | 103 +-
.../Xwt.WPFBackend/ImageBuilderBackendHandler.cs | 45 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ImageHandler.cs | 474 +-
.../Xwt.WPFBackend/ImagePatternBackendHandler.cs | 51 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ImageViewBackend.cs | 22 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/LabelBackend.cs | 12 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/LinkLabelBackend.cs | 6 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ListBoxBackend.cs | 12 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs | 4 +-
external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuBackend.cs | 13 +-
.../Xwt.WPF/Xwt.WPFBackend/MenuButtonBackend.cs | 4 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/MenuItemBackend.cs | 28 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/NotebookBackend.cs | 4 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/PanedBackend.cs | 135 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/PopoverBackend.cs | 19 +-
.../Xwt.WPF/Xwt.WPFBackend/RadioButtonBackend.cs | 194 +
.../Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs | 2 +-
.../Xwt.WPFBackend/SaveFileDialogBackend.cs | 42 +
.../Xwt.WPFBackend/ScrollAdjustmentBackend.cs | 21 +-
.../Xwt.WPF/Xwt.WPFBackend/ScrollViewBackend.cs | 16 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/ScrollbarBackend.cs | 62 +
.../Xwt.WPFBackend/SelectColorDialogBackend.cs | 108 +
.../Xwt.WPFBackend/SelectFolderDialogBackend.cs | 8 +
.../xwt/Xwt.WPF/Xwt.WPFBackend/SeparatorBackend.cs | 16 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/SliderBackend.cs | 88 +
.../Xwt.WPF/Xwt.WPFBackend/SpinButtonBackend.cs | 201 +
.../xwt/Xwt.WPF/Xwt.WPFBackend/TextEntryBackend.cs | 13 +-
.../Xwt.WPFBackend/TextLayoutBackendHandler.cs | 160 +-
.../Xwt.WPF/Xwt.WPFBackend/TextLayoutContext.cs | 60 -
.../Xwt.WPF/Xwt.WPFBackend/ToggleButtonBackend.cs | 2 +-
external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml | 14 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/TreeViewBackend.cs | 26 +-
external/xwt/Xwt.WPF/Xwt.WPFBackend/Util.cs | 10 +
external/xwt/Xwt.WPF/Xwt.WPFBackend/WPFEngine.cs | 124 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs | 269 +-
.../xwt/Xwt.WPF/Xwt.WPFBackend/WindowBackend.cs | 13 +-
.../Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs | 60 +-
.../Xwt.WPFBackend/WindowsSpinButton.xaml.cs | 457 +
.../Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs | 81 +
external/xwt/Xwt.XamMac/Xwt.XamMac.csproj | 53 +
external/xwt/Xwt.sln | 341 +-
.../xwt/Xwt/Xwt.Backends/ApplicationContext.cs | 60 +
external/xwt/Xwt/Xwt.Backends/BackendHandler.cs | 42 +
external/xwt/Xwt/Xwt.Backends/BackendHost.cs | 46 +-
.../xwt/Xwt/Xwt.Backends/BackendTypeAttribute.cs | 44 +
external/xwt/Xwt/Xwt.Backends/ClipboardBackend.cs | 41 +
.../xwt/Xwt/Xwt.Backends/ContextBackendHandler.cs | 84 +
external/xwt/Xwt/Xwt.Backends/DesktopBackend.cs | 96 +
.../DisposableResourceBackendHandler.cs | 41 +
.../Xwt/Xwt.Backends/DrawingPathBackendHandler.cs | 63 +
external/xwt/Xwt/Xwt.Backends/EngineBackend.cs | 180 -
external/xwt/Xwt/Xwt.Backends/ExtensionMethods.cs | 75 +
.../xwt/Xwt/Xwt.Backends/FontBackendHandler.cs | 141 +
.../xwt/Xwt/Xwt.Backends/GnomeSystemBackend.cs | 37 +
.../xwt/Xwt/Xwt.Backends/GradientBackendHandler.cs | 39 +
.../xwt/Xwt/Xwt.Backends/IAlertDialogBackend.cs | 2 +
external/xwt/Xwt/Xwt.Backends/IBackend.cs | 5 +-
external/xwt/Xwt/Xwt.Backends/IBackendHandler.cs | 35 -
external/xwt/Xwt/Xwt.Backends/IButtonBackend.cs | 3 +-
.../Xwt/Xwt.Backends/ICanvasCellViewFrontend.cs | 39 +
external/xwt/Xwt/Xwt.Backends/ICellViewFrontend.cs | 36 +
.../Xwt/Xwt.Backends/ICheckBoxCellViewFrontend.cs | 40 +
.../xwt/Xwt/Xwt.Backends/IChildPlacementHandler.cs | 38 +
external/xwt/Xwt/Xwt.Backends/IClipboardBackend.cs | 41 -
.../xwt/Xwt/Xwt.Backends/IContextBackendHandler.cs | 114 -
.../xwt/Xwt/Xwt.Backends/ICustomWidgetBackend.cs | 2 +-
.../xwt/Xwt/Xwt.Backends/IEmbeddedWidgetBackend.cs | 70 +
external/xwt/Xwt/Xwt.Backends/IExpandBackend.cs | 2 +-
.../xwt/Xwt/Xwt.Backends/IFontBackendHandler.cs | 51 -
external/xwt/Xwt/Xwt.Backends/IFrameBackend.cs | 2 +-
external/xwt/Xwt/Xwt.Backends/IFrontend.cs | 4 +-
.../Xwt/Xwt.Backends/IGradientBackendHandler.cs | 39 -
.../Xwt.Backends/IImageBuilderBackendHandler.cs | 39 -
.../xwt/Xwt/Xwt.Backends/IImageCellViewFrontend.cs | 36 +
.../Xwt.Backends/IImagePatternBackendHandler.cs | 35 -
external/xwt/Xwt/Xwt.Backends/IImageViewBackend.cs | 7 +-
external/xwt/Xwt/Xwt.Backends/ILabelBackend.cs | 1 +
external/xwt/Xwt/Xwt.Backends/IListBoxBackend.cs | 19 +-
external/xwt/Xwt/Xwt.Backends/IListViewBackend.cs | 6 +
.../xwt/Xwt/Xwt.Backends/IMenuButtonBackend.cs | 2 +-
external/xwt/Xwt/Xwt.Backends/IMenuItemBackend.cs | 4 +-
external/xwt/Xwt/Xwt.Backends/INotebookBackend.cs | 2 +-
external/xwt/Xwt/Xwt.Backends/IPanedBackend.cs | 2 +-
.../xwt/Xwt/Xwt.Backends/IRadioButtonBackend.cs | 68 +
.../xwt/Xwt/Xwt.Backends/ISaveFileDialogBackend.cs | 2 +-
.../Xwt/Xwt.Backends/IScrollAdjustmentBackend.cs | 53 +-
.../xwt/Xwt/Xwt.Backends/IScrollViewBackend.cs | 2 +-
external/xwt/Xwt/Xwt.Backends/IScrollbarBackend.cs | 47 +
.../Xwt/Xwt.Backends/ISegmentedButtonBackend.cs | 37 +
.../Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs | 6 +
external/xwt/Xwt/Xwt.Backends/ISliderBackend.cs | 56 +
.../xwt/Xwt/Xwt.Backends/ISpinButtonBackend.cs | 2 +
.../xwt/Xwt/Xwt.Backends/IStatusIconBackend.cs | 2 +-
.../xwt/Xwt/Xwt.Backends/ITextCellViewFrontend.cs | 41 +
external/xwt/Xwt/Xwt.Backends/ITextEntryBackend.cs | 2 +
.../Xwt/Xwt.Backends/ITextLayoutBackendHandler.cs | 46 -
external/xwt/Xwt/Xwt.Backends/ITreeViewBackend.cs | 16 +-
external/xwt/Xwt/Xwt.Backends/IWidgetBackend.cs | 48 +-
external/xwt/Xwt/Xwt.Backends/IWindowBackend.cs | 17 +-
.../xwt/Xwt/Xwt.Backends/IWindowFrameBackend.cs | 21 +-
.../xwt/Xwt/Xwt.Backends/ImageBackendHandler.cs | 101 +-
.../Xwt/Xwt.Backends/ImageBuilderBackendHandler.cs | 38 +
.../Xwt/Xwt.Backends/ImagePatternBackendHandler.cs | 35 +
external/xwt/Xwt/Xwt.Backends/MacSystemBackend.cs | 37 +
external/xwt/Xwt/Xwt.Backends/ResourceManager.cs | 103 +
external/xwt/Xwt/Xwt.Backends/StockIconId.cs | 46 +
external/xwt/Xwt/Xwt.Backends/SystemBackend.cs | 50 +
.../Xwt/Xwt.Backends/TextLayoutBackendHandler.cs | 51 +
.../xwt/Xwt/Xwt.Backends/ToolkitEngineBackend.cs | 323 +
external/xwt/Xwt/Xwt.Backends/TransferDataStore.cs | 2 +-
.../xwt/Xwt/Xwt.Backends/WindowsSystemBackend.cs | 37 +
external/xwt/Xwt/Xwt.Backends/XwtWidgetBackend.cs | 38 +-
.../xwt/Xwt/Xwt.Drawing/BackgroundTextAttribute.cs | 51 +
external/xwt/Xwt/Xwt.Drawing/BitmapImage.cs | 82 +
external/xwt/Xwt/Xwt.Drawing/Color.cs | 65 +-
external/xwt/Xwt/Xwt.Drawing/ColorTextAttribute.cs | 51 +
external/xwt/Xwt/Xwt.Drawing/Context.cs | 392 +-
external/xwt/Xwt/Xwt.Drawing/DrawingImage.cs | 55 +
external/xwt/Xwt/Xwt.Drawing/DrawingPath.cs | 348 +
external/xwt/Xwt/Xwt.Drawing/Font.cs | 278 +-
.../xwt/Xwt/Xwt.Drawing/FontStyleTextAttribute.cs | 50 +
external/xwt/Xwt/Xwt.Drawing/FontTextAttribute.cs | 59 +
.../xwt/Xwt/Xwt.Drawing/FontWeightTextAttribute.cs | 50 +
external/xwt/Xwt/Xwt.Drawing/Gradient.cs | 17 +-
external/xwt/Xwt/Xwt.Drawing/Image.cs | 549 +-
external/xwt/Xwt/Xwt.Drawing/ImageBuilder.cs | 73 +-
external/xwt/Xwt/Xwt.Drawing/ImageFileType.cs | 37 +
external/xwt/Xwt/Xwt.Drawing/ImagePattern.cs | 19 +-
external/xwt/Xwt/Xwt.Drawing/LinearGradient.cs | 2 +-
external/xwt/Xwt/Xwt.Drawing/LinkTextAttribute.cs | 49 +
external/xwt/Xwt/Xwt.Drawing/Matrix.cs | 247 +-
external/xwt/Xwt/Xwt.Drawing/Pattern.cs | 29 +-
external/xwt/Xwt/Xwt.Drawing/RadialGradient.cs | 2 +-
.../Xwt/Xwt.Drawing/StrikethroughTextAttribute.cs | 56 +
external/xwt/Xwt/Xwt.Drawing/TextAttribute.cs | 60 +
external/xwt/Xwt/Xwt.Drawing/TextLayout.cs | 259 +-
.../xwt/Xwt/Xwt.Drawing/UnderlineTextAttribute.cs | 56 +
external/xwt/Xwt/Xwt.Drawing/VectorImage.cs | 720 +
external/xwt/Xwt/Xwt.Engine/Toolkit.cs | 115 -
external/xwt/Xwt/Xwt.Engine/WidgetRegistry.cs | 105 -
external/xwt/Xwt/Xwt.Formats/MarkdownTextFormat.cs | 21 +-
external/xwt/Xwt/Xwt.Formats/PlainTextFormat.cs | 17 +
external/xwt/Xwt/Xwt.Formats/TextFormat.cs | 1 +
external/xwt/Xwt/Xwt.Motion/Animation.cs | 134 +
external/xwt/Xwt/Xwt.Motion/AnimationExtensions.cs | 218 +
external/xwt/Xwt/Xwt.Motion/Easing.cs | 96 +
external/xwt/Xwt/Xwt.Motion/IAnimatable.cs | 39 +
external/xwt/Xwt/Xwt.Motion/ObjectTransforms.cs | 66 +
external/xwt/Xwt/Xwt.Motion/Tweener.cs | 215 +
external/xwt/Xwt/Xwt.csproj | 100 +-
external/xwt/Xwt/Xwt/Application.cs | 179 +-
external/xwt/Xwt/Xwt/Box.cs | 313 +-
external/xwt/Xwt/Xwt/Button.cs | 17 +-
external/xwt/Xwt/Xwt/Canvas.cs | 34 +-
external/xwt/Xwt/Xwt/CanvasCellView.cs | 85 +
external/xwt/Xwt/Xwt/CellView.cs | 60 +-
external/xwt/Xwt/Xwt/CheckBox.cs | 9 +-
external/xwt/Xwt/Xwt/CheckBoxCellView.cs | 46 +-
external/xwt/Xwt/Xwt/CheckBoxMenuItem.cs | 1 +
external/xwt/Xwt/Xwt/Clipboard.cs | 12 +-
external/xwt/Xwt/Xwt/ColorSelector.cs | 59 +-
external/xwt/Xwt/Xwt/ComboBox.cs | 24 +-
external/xwt/Xwt/Xwt/ComboBoxCellView.cs | 2 +-
external/xwt/Xwt/Xwt/ComboBoxEntry.cs | 5 +-
external/xwt/Xwt/Xwt/Command.cs | 3 +-
external/xwt/Xwt/Xwt/CursorType.cs | 72 +-
external/xwt/Xwt/Xwt/DataField.cs | 26 +-
external/xwt/Xwt/Xwt/DatePicker.cs | 1 +
external/xwt/Xwt/Xwt/Desktop.cs | 204 +
external/xwt/Xwt/Xwt/DesktopType.cs | 37 +
external/xwt/Xwt/Xwt/Dialog.cs | 10 +-
external/xwt/Xwt/Xwt/Distance.cs | 81 +-
external/xwt/Xwt/Xwt/DragOperation.cs | 7 +-
external/xwt/Xwt/Xwt/Expander.cs | 10 +-
external/xwt/Xwt/Xwt/FileDialog.cs | 12 +-
external/xwt/Xwt/Xwt/FormattedText.cs | 288 +
external/xwt/Xwt/Xwt/Frame.cs | 24 +-
external/xwt/Xwt/Xwt/HScrollbar.cs | 37 +
external/xwt/Xwt/Xwt/HSlider.cs | 38 +
external/xwt/Xwt/Xwt/IListDataSource.cs | 14 +
external/xwt/Xwt/Xwt/IWidgetSurface.cs | 58 +-
external/xwt/Xwt/Xwt/IconTextCellView.cs | 40 -
external/xwt/Xwt/Xwt/ImageCellView.cs | 22 +-
external/xwt/Xwt/Xwt/ImageView.cs | 7 +-
external/xwt/Xwt/Xwt/ItemCollection.cs | 20 +
external/xwt/Xwt/Xwt/Label.cs | 20 +-
external/xwt/Xwt/Xwt/LinkLabel.cs | 7 +-
external/xwt/Xwt/Xwt/ListBox.cs | 51 +-
external/xwt/Xwt/Xwt/ListStore.cs | 14 +-
external/xwt/Xwt/Xwt/ListView.cs | 41 +-
external/xwt/Xwt/Xwt/ListViewColumn.cs | 81 +
external/xwt/Xwt/Xwt/ListViewColumnCollection.cs | 20 +-
external/xwt/Xwt/Xwt/ListViewRowEventArgs.cs | 40 +
external/xwt/Xwt/Xwt/Menu.cs | 22 +-
external/xwt/Xwt/Xwt/MenuButton.cs | 9 +-
external/xwt/Xwt/Xwt/MenuItem.cs | 10 +-
external/xwt/Xwt/Xwt/MessageDialog.cs | 15 +-
external/xwt/Xwt/Xwt/ModifierKeys.cs | 11 +-
external/xwt/Xwt/Xwt/Notebook.cs | 1 +
external/xwt/Xwt/Xwt/OpenFileDialog.cs | 2 +
external/xwt/Xwt/Xwt/Paned.cs | 5 +-
external/xwt/Xwt/Xwt/Placement.cs | 83 +-
external/xwt/Xwt/Xwt/Point.cs | 9 +-
external/xwt/Xwt/Xwt/Popover.cs | 3 +-
external/xwt/Xwt/Xwt/ProgressBar.cs | 6 +-
external/xwt/Xwt/Xwt/RadioButton.cs | 285 +
external/xwt/Xwt/Xwt/RadioButtonMenuItem.cs | 7 +-
external/xwt/Xwt/Xwt/Rectangle.cs | 24 +-
external/xwt/Xwt/Xwt/ReliefFrame.cs | 287 -
external/xwt/Xwt/Xwt/RichTextView.cs | 8 +-
external/xwt/Xwt/Xwt/SaveFileDialog.cs | 2 +
external/xwt/Xwt/Xwt/Screen.cs | 94 +
external/xwt/Xwt/Xwt/ScrollAdjustment.cs | 150 +-
external/xwt/Xwt/Xwt/ScrollView.cs | 14 +-
external/xwt/Xwt/Xwt/Scrollbar.cs | 164 +
external/xwt/Xwt/Xwt/SegmentedButton.cs | 123 +
external/xwt/Xwt/Xwt/SelectColorDialog.cs | 6 +-
external/xwt/Xwt/Xwt/SelectFolderDialog.cs | 23 +-
external/xwt/Xwt/Xwt/Separator.cs | 1 +
external/xwt/Xwt/Xwt/SeparatorMenuItem.cs | 2 +
external/xwt/Xwt/Xwt/Size.cs | 15 +-
external/xwt/Xwt/Xwt/SizeConstraint.cs | 112 +
external/xwt/Xwt/Xwt/SizeRequestMode.cs | 37 -
external/xwt/Xwt/Xwt/Slider.cs | 99 +
external/xwt/Xwt/Xwt/SpinButton.cs | 11 +
external/xwt/Xwt/Xwt/Spinner.cs | 3 +
external/xwt/Xwt/Xwt/StatusIcon.cs | 3 +-
external/xwt/Xwt/Xwt/StockIcons.cs | 31 +-
external/xwt/Xwt/Xwt/Table.cs | 550 +-
external/xwt/Xwt/Xwt/TableCalc.cs | 521 +
external/xwt/Xwt/Xwt/TextCellView.cs | 67 +-
external/xwt/Xwt/Xwt/TextEntry.cs | 14 +-
external/xwt/Xwt/Xwt/ToggleButton.cs | 1 +
external/xwt/Xwt/Xwt/Toolkit.cs | 445 +
external/xwt/Xwt/Xwt/TransferDataSource.cs | 2 +-
external/xwt/Xwt/Xwt/TransferDataType.cs | 11 +-
external/xwt/Xwt/Xwt/TreeNavigator.cs | 4 +-
external/xwt/Xwt/Xwt/TreeStore.cs | 10 +-
external/xwt/Xwt/Xwt/TreeView.cs | 115 +-
external/xwt/Xwt/Xwt/TreeViewRowEventArgs.cs | 40 +
external/xwt/Xwt/Xwt/VScrollbar.cs | 37 +
external/xwt/Xwt/Xwt/VSlider.cs | 38 +
external/xwt/Xwt/Xwt/Widget.cs | 560 +-
external/xwt/Xwt/Xwt/WidgetAlignment.cs | 38 +
external/xwt/Xwt/Xwt/WidgetEventArgs.cs | 40 +
external/xwt/Xwt/Xwt/WidgetSize.cs | 102 -
external/xwt/Xwt/Xwt/WidgetSpacing.cs | 85 +-
external/xwt/Xwt/Xwt/Window.cs | 99 +-
external/xwt/Xwt/Xwt/WindowFrame.cs | 70 +-
external/xwt/Xwt/Xwt/WindowLocation.cs | 48 +
external/xwt/Xwt/Xwt/XwtComponent.cs | 10 +-
external/xwt/Xwt/Xwt/XwtObject.cs | 20 +-
external/xwt/Xwt/Xwt/XwtTaskScheduler.cs | 9 +-
install-sh | 14 +-
man/Makefile.in | 13 +-
missing | 99 +-
monodevelop | 5 +
monodevelop.in | 5 +
po/Makefile | 75 +-
po/Makefile.in | 11 +-
src/Makefile.in | 62 +-
src/addins/AspNet/Makefile.in | 62 +-
.../AspNet/MonoDevelop.AspNet.Mvc/Makefile.in | 9 +-
.../MonoDevelop.AspNet.Mvc.addin.xml | 14 +-
.../Parser/RazorCSharpParser.cs | 42 +-
...lop.AspNet.Mvc.MonoDevelop.AspNet.Mvc.addin.xml | 215 +
...elop.AspNet.Mvc.csproj.FilesWrittenAbsolute.txt | 41 +
.../MonoDevelop.AspNet.Mvc.gtk-gui.gui.stetic | 638 +
src/addins/AspNet/MonoDevelop.AspNet/Makefile.in | 9 +-
.../HtmlClosingTagState.cs | 48 +-
.../HtmlScriptBodyState.cs | 1 +
.../MonoDevelop.AspNet.StateEngine/HtmlTagState.cs | 59 +-
.../MonoDevelop.AspNet.addin.xml | 14 +-
.../MonoDevelop.AspNet/MonoDevelop.AspNet.csproj | 15 +-
.../MonoDevelop.AspNet/CodeBehind.cs | 17 +-
.../MonoDevelop.Html/ElementTypes.cs | 6 +-
...noDevelop.AspNet.MD1Serialization.md1format.xml | 13 +
...MonoDevelop.AspNet.MonoDevelop.AspNet.addin.xml | 280 +
....AspNet.Templates.GlobalAsax-CodeBehind.xft.xml | 82 +
...velop.AspNet.Templates.GlobalAsax-Empty.xft.xml | 86 +
....AspNet.Templates.MasterPage-CodeBehind.xft.xml | 66 +
...mplates.MasterPage-CodeBehindNonPartial.xft.xml | 54 +
...velop.AspNet.Templates.MasterPage-Empty.xft.xml | 41 +
...t.Templates.NestedMasterPage-CodeBehind.xft.xml | 56 +
...velop.AspNet.Templates.NestedMasterPage.xft.xml | 31 +
...p.AspNet.Templates.WebApplication-Empty.xpt.xml | 37 +
...Develop.AspNet.Templates.WebApplication.xpt.xml | 90 +
....AspNet.Templates.WebConfig-Application.xft.xml | 87 +
...velop.AspNet.Templates.WebConfig-SubDir.xft.xml | 42 +
...Net.Templates.WebContentForm-CodeBehind.xft.xml | 54 +
...Develop.AspNet.Templates.WebContentForm.xft.xml | 30 +
....AspNet.Templates.WebControl-CodeBehind.xft.xml | 54 +
...mplates.WebControl-CodeBehindNonPartial.xft.xml | 41 +
...velop.AspNet.Templates.WebControl-Empty.xft.xml | 28 +
...lop.AspNet.Templates.WebForm-CodeBehind.xft.xml | 66 +
....Templates.WebForm-CodeBehindNonPartial.xft.xml | 52 +
...oDevelop.AspNet.Templates.WebForm-Empty.xft.xml | 38 +
....AspNet.Templates.WebHandler-CodeBehind.xft.xml | 49 +
...velop.AspNet.Templates.WebHandler-Empty.xft.xml | 47 +
....AspNet.Templates.WebService-CodeBehind.xft.xml | 38 +
...velop.AspNet.Templates.WebService-Empty.xft.xml | 37 +
...oDevelop.AspNet.csproj.FilesWrittenAbsolute.txt | 35 +
.../Debug/MonoDevelop.AspNet.gtk-gui.gui.stetic | 1115 ++
...nding.Autotools.csproj.FilesWrittenAbsolute.txt | 4 +
src/addins/CBinding/CBinding.addin.xml | 18 +-
src/addins/CBinding/CBinding.csproj | 10 +-
src/addins/CBinding/Makefile.in | 9 +-
.../CBinding/obj/Debug/CBinding.CBinding.addin.xml | 262 +
.../Debug/CBinding.csproj.FilesWrittenAbsolute.txt | 45 +
.../CBinding/obj/Debug/CBinding.gtk-gui.gui.stetic | 2218 +++
.../obj/Debug/CBinding.icons.c-icon-32.png | Bin 0 -> 311 bytes
.../obj/Debug/CBinding.icons.cpp-icon-32.png | Bin 0 -> 1052 bytes
.../Debug/CBinding.icons.text-x-c++hdr.16x16.png | Bin 0 -> 400 bytes
.../Debug/CBinding.icons.text-x-c++hdr.22x22.png | Bin 0 -> 737 bytes
.../Debug/CBinding.icons.text-x-c++hdr.32x32.png | Bin 0 -> 1518 bytes
.../Debug/CBinding.icons.text-x-c++hdr.48x48.png | Bin 0 -> 1903 bytes
.../Debug/CBinding.icons.text-x-c++src.16x16.png | Bin 0 -> 395 bytes
.../Debug/CBinding.icons.text-x-c++src.22x22.png | Bin 0 -> 729 bytes
.../Debug/CBinding.icons.text-x-c++src.32x32.png | Bin 0 -> 1681 bytes
.../Debug/CBinding.icons.text-x-c++src.48x48.png | Bin 0 -> 1844 bytes
.../obj/Debug/CBinding.icons.text-x-chdr.16x16.png | Bin 0 -> 429 bytes
.../obj/Debug/CBinding.icons.text-x-chdr.22x22.png | Bin 0 -> 657 bytes
.../obj/Debug/CBinding.icons.text-x-chdr.32x32.png | Bin 0 -> 1606 bytes
.../obj/Debug/CBinding.icons.text-x-chdr.48x48.png | Bin 0 -> 1885 bytes
.../obj/Debug/CBinding.icons.text-x-csrc.16x16.png | Bin 0 -> 506 bytes
.../obj/Debug/CBinding.icons.text-x-csrc.22x22.png | Bin 0 -> 712 bytes
.../obj/Debug/CBinding.icons.text-x-csrc.32x32.png | Bin 0 -> 1575 bytes
.../obj/Debug/CBinding.icons.text-x-csrc.48x48.png | Bin 0 -> 1878 bytes
.../CBinding/obj/Debug/CBinding.md1format.xml | 27 +
.../CBinding.templates.ConsoleCProject.xpt.xml | 39 +
.../CBinding.templates.ConsoleCppProject.xpt.xml | 40 +
.../CBinding.templates.ConsoleObjCProject.xpt.xml | 37 +
.../CBinding.templates.EmptyCHeaderFile.xft.xml | 23 +
.../Debug/CBinding.templates.EmptyCProject.xpt.xml | 27 +
.../CBinding.templates.EmptyCSourceFile.xft.xml | 23 +
.../CBinding.templates.EmptyCppHeaderFile.xft.xml | 23 +
.../CBinding.templates.EmptyCppProject.xpt.xml | 27 +
.../CBinding.templates.EmptyCppSourceFile.xft.xml | 23 +
.../CBinding.templates.EmptyObjCSourceFile.xft.xml | 23 +
...Binding.templates.EmptyObjCppSourceFile.xft.xml | 23 +
...Binding.templates.SharedLibraryCProject.xpt.xml | 42 +
...nding.templates.SharedLibraryCppProject.xpt.xml | 41 +
...Binding.templates.StaticLibraryCProject.xpt.xml | 42 +
...nding.templates.StaticLibraryCppProject.xpt.xml | 42 +
.../CBinding/templates/ConsoleCProject.xpt.xml | 1 +
.../CBinding/templates/ConsoleCppProject.xpt.xml | 3 +-
.../CBinding/templates/ConsoleObjCProject.xpt.xml | 1 +
.../CBinding/templates/EmptyCHeaderFile.xft.xml | 3 +-
.../CBinding/templates/EmptyCProject.xpt.xml | 1 +
.../CBinding/templates/EmptyCSourceFile.xft.xml | 3 +-
.../CBinding/templates/EmptyCppHeaderFile.xft.xml | 3 +-
.../CBinding/templates/EmptyCppProject.xpt.xml | 1 +
.../CBinding/templates/EmptyCppSourceFile.xft.xml | 3 +-
.../CBinding/templates/EmptyObjCSourceFile.xft.xml | 1 +
.../templates/EmptyObjCppSourceFile.xft.xml | 1 +
.../templates/SharedLibraryCProject.xpt.xml | 1 +
.../templates/SharedLibraryCppProject.xpt.xml | 1 +
.../templates/StaticLibraryCProject.xpt.xml | 1 +
.../templates/StaticLibraryCppProject.xpt.xml | 1 +
.../AspNet/CSharpBinding.AspNet.csproj | 2 +-
src/addins/CSharpBinding/AspNet/Makefile.in | 9 +-
...pBinding.AspNet.csproj.FilesWrittenAbsolute.txt | 4 +
src/addins/CSharpBinding/AssemblyInfo.cs | 2 +
src/addins/CSharpBinding/Autotools/Makefile.in | 9 +-
.../Autotools.csproj.FilesWrittenAbsolute.txt | 4 +
src/addins/CSharpBinding/CSharpBinding.addin.xml | 22 +-
src/addins/CSharpBinding/CSharpBinding.csproj | 29 +-
src/addins/CSharpBinding/Makefile.in | 62 +-
.../CSharpCompletionTextEditorExtension.cs | 413 +-
.../EventCreationCompletionData.cs | 2 +-
.../MemberCompletionData.cs | 494 +-
.../CSharpFormattingPolicyPanel.cs | 8 +-
.../CSharpFormattingPolicyPanelWidget.cs | 31 +-
.../CSharpTextEditorIndentation.cs | 18 +-
.../OnTheFlyFormatter.cs | 8 +-
.../CSharpSyntaxMode.cs | 11 +-
.../HighlightUsagesExtension.cs | 94 +-
.../MoveToUsagesHandler.cs | 8 +-
.../TypeSystemProvider.cs | 2 +-
.../Actions/ConvertToEnumAction.cs | 508 +
.../Actions/ConvertToEnumDialog.cs | 122 +
.../MDRefactoringScript.cs | 80 +-
.../CSharpCodeGenerator.cs | 6 +-
.../CSharpReferenceFinder.cs | 43 +-
.../LanguageItemTooltipProvider.cs | 8 +
.../UnitTestTextEditorExtension.cs | 503 +
.../MonoDevelop.CSharp/AstAmbience.cs | 10 +
.../CSharpBindingCompilerManager.cs | 18 +-
.../CSharpEnhancedCodeProvider.cs | 7 +-
.../MonoDevelop.CSharp/CSharpLanguageBinding.cs | 4 +-
.../PathedDocumentTextEditorExtension.cs | 50 +-
.../MonoDevelop.CSharp/SignatureMarkupCreator.cs | 52 +-
.../Debug/CSharpBinding.CSharpBinding.addin.xml | 300 +
...harp.Formatting.policies.AllmanCSharpPolicy.xml | 158 +
....CSharp.Formatting.policies.GNUCSharpPolicy.xml | 159 +
...harp.Formatting.policies.GNUTextStylePolicy.xml | 37 +
...ormatting.policies.InvariantTextStylePolicy.xml | 9 +
...p.CSharp.Formatting.policies.KRCSharpPolicy.xml | 158 +
...CSharp.Formatting.policies.MonoCSharpPolicy.xml | 158 +
...ormatting.policies.SharpDevelopCSharpPolicy.xml | 158 +
...Formatting.policies.WhitesmithsCSharpPolicy.xml | 158 +
.../CSharpBinding.csproj.FilesWrittenAbsolute.txt | 26 +
.../obj/Debug/CSharpBinding.gtk-gui.gui.stetic | 2582 +++
.../Debug/CSharpBinding.icons.csharp-icon-32.png | Bin 0 -> 1038 bytes
.../CSharpBinding.icons.csharp-project-16.png | Bin 0 -> 1171 bytes
.../obj/Debug/CSharpBinding.md1format.xml | 20 +
.../CSharpBinding.templates.AssemblyInfo.xft.xml | 52 +
.../CSharpBinding.templates.ConsoleProject.xpt.xml | 49 +
...CSharpBinding.templates.EmptyCSharpFile.xft.xml | 20 +
.../CSharpBinding.templates.EmptyProject.xpt.xml | 19 +
...SharpBinding.templates.GtkSharp2Project.xpt.xml | 103 +
.../Debug/CSharpBinding.templates.Library.xpt.xml | 38 +
...CSharpBinding.templates.PortableLibrary.xpt.xml | 40 +
.../CSharpBinding/templates/ConsoleProject.xpt.xml | 1 +
.../templates/EmptyCSharpFile.xft.xml | 1 +
.../CSharpBinding/templates/EmptyProject.xpt.xml | 1 +
.../templates/GtkSharp2Project.xpt.xml | 1 +
src/addins/CSharpBinding/templates/Library.xpt.xml | 1 +
.../templates/PortableLibrary.xpt.xml | 7 +-
src/addins/ChangeLogAddIn/ChangeLogAddIn.addin.xml | 8 +-
src/addins/ChangeLogAddIn/ChangeLogAddIn.csproj | 10 +-
src/addins/ChangeLogAddIn/Makefile.in | 9 +-
.../Debug/ChangeLogAddIn.ChangeLogAddIn.addin.xml | 65 +
.../obj/Debug/ChangeLogAddIn.Policies.xml | 3 +
.../ChangeLogAddIn.csproj.FilesWrittenAbsolute.txt | 7 +
.../obj/Debug/ChangeLogAddIn.gtk-gui.gui.stetic | 534 +
src/addins/Deployment/Makefile.in | 62 +-
.../MonoDevelop.Deployment.Linux/Makefile.in | 9 +-
.../MonoDevelop.Deployment.Linux.addin.xml | 8 +-
.../app.desktop.xft.xml | 3 +-
...ux.MonoDevelop.Deployment.Linux.DesktopInfo.xml | 146 +
...nt.Linux.MonoDevelop.Deployment.Linux.addin.xml | 101 +
...onoDevelop.Deployment.Linux.app.desktop.xft.xml | 22 +
...eployment.Linux.csproj.FilesWrittenAbsolute.txt | 8 +
...MonoDevelop.Deployment.Linux.gtk-gui.gui.stetic | 1285 ++
.../Deployment/MonoDevelop.Deployment/Makefile.in | 9 +-
.../BinariesZipPackageBuilder.cs | 14 +-
.../MonoDevelop.Deployment.addin.xml | 8 +-
...lop.Deployment.MonoDevelop.Deployment.addin.xml | 203 +
...elop.Deployment.csproj.FilesWrittenAbsolute.txt | 11 +
.../MonoDevelop.Deployment.gtk-gui.gui.stetic | 2470 +++
...oDevelop.Deployment.icons.package-x-generic.png | Bin 0 -> 2095 bytes
.../MonoDevelop.Deployment.icons.packaging-16.png | Bin 0 -> 730 bytes
.../MonoDevelop.Deployment.icons.packaging-32.png | Bin 0 -> 1161 bytes
.../obj/Debug/MonoDevelop.Deployment.md1format.xml | 11 +
...p.Deployment.templates.PackagingProject.xpt.xml | 21 +
src/addins/GnomePlatform/GnomePlatform.addin.xml | 6 +-
src/addins/GnomePlatform/GnomePlatform.cs | 59 +-
src/addins/GnomePlatform/Makefile.in | 9 +-
.../Debug/GnomePlatform.GnomePlatform.addin.xml | 24 +
.../GnomePlatform.csproj.FilesWrittenAbsolute.txt | 6 +
src/addins/ILAsmBinding/ILAsmBinding.addin.xml | 6 +-
.../ILAsmBinding/ILAsmConsoleProject.xpt.xml | 1 +
src/addins/ILAsmBinding/Makefile.in | 9 +-
.../obj/Debug/ILAsmBinding.ILAsmBinding.addin.xml | 45 +
.../Debug/ILAsmBinding.ILAsmConsoleProject.xpt.xml | 53 +
.../ILAsmBinding.csproj.FilesWrittenAbsolute.txt | 7 +
.../obj/Debug/ILAsmBinding.gtk-gui.gui.stetic | 123 +
.../MacPlatform/MacInterop/LaunchServices.cs | 45 +-
src/addins/MacPlatform/MacMenu/MDLinkMenuItem.cs | 4 +-
src/addins/MacPlatform/MacMenu/MDMenu.cs | 10 +-
src/addins/MacPlatform/MacMenu/MDMenuItem.cs | 7 +-
src/addins/MacPlatform/MacPlatform.addin.xml | 4 +-
src/addins/MacPlatform/MacPlatform.cs | 17 +-
src/addins/MacPlatform/MacPlatform.csproj | 9 +
src/addins/MacPlatform/Makefile.in | 9 +-
src/addins/Makefile.in | 62 +-
src/addins/MonoDevelop.AssemblyBrowser/Makefile.in | 9 +-
.../MonoDevelop.AssemblyBrowser.addin.xml | 10 +-
.../MonoDevelop.AssemblyBrowser.csproj | 4 +
.../AssemblyBrowserViewContent.cs | 2 +-
.../AssemblyBrowserWidget.cs | 138 +-
.../IAssemblyBrowserNodeBuilder.cs | 1 -
.../TreeNodes/AssemblyBrowserTypeNodeBuilder.cs | 4 +-
.../TreeNodes/AssemblyNodeBuilder.cs | 15 -
.../TreeNodes/DomEventNodeBuilder.cs | 22 +-
.../TreeNodes/DomFieldNodeBuilder.cs | 24 +-
.../TreeNodes/DomMethodNodeBuilder.cs | 22 +-
.../TreeNodes/DomPropertyNodeBuilder.cs | 23 +-
.../TreeNodes/DomTypeNodeBuilder.cs | 8 +-
.../TreeNodes/NamespaceBuilder.cs | 15 +-
...evelop.AssemblyBrowser.AssemblyBrowserWidget.cs | 2 +-
.../gtk-gui/generated.cs | 20 +-
...lyBrowser.MonoDevelop.AssemblyBrowser.addin.xml | 44 +
...AssemblyBrowser.csproj.FilesWrittenAbsolute.txt | 6 +
.../MonoDevelop.AssemblyBrowser.gtk-gui.gui.stetic | 116 +
src/addins/MonoDevelop.Autotools/Makefile.in | 9 +-
.../MakefileProjectServiceExtension.cs | 4 -
.../MonoDevelop.Autotools.addin.xml | 10 +-
...velop.Autotools.MonoDevelop.Autotools.addin.xml | 148 +
...velop.Autotools.csproj.FilesWrittenAbsolute.txt | 18 +
.../Debug/MonoDevelop.Autotools.gtk-gui.gui.stetic | 2271 +++
src/addins/MonoDevelop.Debugger.Soft/Makefile.am | 1 -
src/addins/MonoDevelop.Debugger.Soft/Makefile.in | 63 +-
.../Mono.Debugging.Soft/Makefile.in | 427 -
.../Mono.Debugging.Soft/Mono.Debugging.Soft.csproj | 75 -
.../Mono.Debugging.Soft/SoftDebuggerAdaptor.cs | 1628 --
.../Mono.Debugging.Soft/SoftDebuggerBacktrace.cs | 213 -
.../Mono.Debugging.Soft/SoftDebuggerSession.cs | 2580 ---
.../Mono.Debugging.Soft/SoftDebuggerStartInfo.cs | 206 -
.../MonoDevelop.Debugger.Soft.AspNet/Makefile.in | 9 +-
.../Manifest.addin.xml | 10 +-
.../MonoDevelop.Debugger.Soft.AspNet.csproj | 30 +-
...Develop.Debugger.Soft.AspNet.Manifest.addin.xml | 24 +
...ger.Soft.AspNet.csproj.FilesWrittenAbsolute.txt | 5 +
.../MonoDevelop.Debugger.Soft/Makefile.in | 9 +-
.../MonoDevelop.Debugger.Soft/Manifest.addin.xml | 6 +-
.../MonoDevelop.Debugger.Soft.csproj | 26 +-
.../MonoDevelop.Debugger.Soft.Manifest.addin.xml | 35 +
...p.Debugger.Soft.csproj.FilesWrittenAbsolute.txt | 5 +
src/addins/MonoDevelop.Debugger/Makefile.in | 9 +-
...r.Tests.TestApp.csproj.FilesWrittenAbsolute.txt | 4 +
.../MonoDevelop.Debugger.Tests.csproj | 15 +-
....Debugger.Tests.csproj.FilesWrittenAbsolute.txt | 4 +
.../MonoDevelop.Debugger.addin.xml | 8 +-
.../MonoDevelop.Debugger.csproj | 16 +-
.../MonoDevelop.Debugger/AttachToProcessDialog.cs | 83 +-
.../MonoDevelop.Debugger/BreakpointPad.cs | 80 +-
.../MonoDevelop.Debugger/DebugCommands.cs | 156 +-
.../MonoDevelop.Debugger/DebugTextMarker.cs | 10 +-
.../MonoDevelop.Debugger/DebuggingService.cs | 47 +-
.../MonoDevelop.Debugger/DisassemblyView.cs | 16 +-
.../MonoDevelop.Debugger/ExceptionCaughtDialog.cs | 11 +-
.../MonoDevelop.Debugger/ExceptionsDialog.cs | 32 +-
.../ExpressionEvaluatorDialog.cs | 12 +-
.../MonoDevelop.Debugger/Extensions.cs | 43 +-
.../MonoDevelop.Debugger/LocalsPad.cs | 2 +-
.../MonoDevelop.Debugger/ObjectValuePad.cs | 5 +-
.../MonoDevelop.Debugger/ObjectValueTreeView.cs | 249 +-
.../MonoDevelop.Debugger/StackTracePad.cs | 103 +-
.../MonoDevelop.Debugger/ThreadsPad.cs | 8 +-
.../MonoDevelop.Debugger/WatchPad.cs | 6 -
.../MonoDevelop.Debugger.AttachToProcessDialog.cs | 2 +-
...oDevelop.Debugger.BreakpointPropertiesDialog.cs | 1 +
.../MonoDevelop.Debugger.ExceptionCaughtWidget.cs | 102 +-
.../MonoDevelop.Debugger/gtk-gui/generated.cs | 22 +-
src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic | 140 +-
.../MonoDevelop.Debugger/icons/exception-icon.png | Bin 0 -> 3634 bytes
.../icons/exception-icon at 2x.png | Bin 0 -> 9883 bytes
...Develop.Debugger.MonoDevelop.Debugger.addin.xml | 251 +
...evelop.Debugger.csproj.FilesWrittenAbsolute.txt | 26 +
.../Debug/MonoDevelop.Debugger.gtk-gui.gui.stetic | 1996 +++
...ugger.icons.MonoDevelop.Close.Selected.Over.png | Bin 0 -> 404 bytes
...p.Debugger.icons.MonoDevelop.Close.Selected.png | Bin 0 -> 229 bytes
.../Debug/MonoDevelop.Debugger.icons.bug-16.png | Bin 0 -> 682 bytes
...MonoDevelop.Debugger.icons.debug-overlay-16.png | Bin 0 -> 395 bytes
...MonoDevelop.Debugger.icons.debug-overlay-22.png | Bin 0 -> 537 bytes
...MonoDevelop.Debugger.icons.debug-overlay-24.png | Bin 0 -> 563 bytes
...MonoDevelop.Debugger.icons.debug-overlay-32.png | Bin 0 -> 839 bytes
.../MonoDevelop.Debugger.icons.exception-icon.png | Bin 0 -> 3634 bytes
...onoDevelop.Debugger.icons.exception-icon at 2x.png | Bin 0 -> 9883 bytes
...onoDevelop.Debugger.icons.icoDebug-Continue.png | Bin 0 -> 2941 bytes
.../MonoDevelop.Debugger.icons.icoDebug-Pause.png | Bin 0 -> 1072 bytes
.../MonoDevelop.Debugger.icons.icoDebug-StepIn.png | Bin 0 -> 1196 bytes
...MonoDevelop.Debugger.icons.icoDebug-StepOut.png | Bin 0 -> 1198 bytes
...onoDevelop.Debugger.icons.icoDebug-StepOver.png | Bin 0 -> 1313 bytes
.../Debug/MonoDevelop.Debugger.icons.lightning.png | Bin 0 -> 631 bytes
...op.Debugger.icons.view-debug-breakpoints-16.png | Bin 0 -> 716 bytes
...lop.Debugger.icons.view-debug-call-stack-16.png | Bin 0 -> 664 bytes
...Develop.Debugger.icons.view-debug-locals-16.png | Bin 0 -> 609 bytes
...evelop.Debugger.icons.view-debug-threads-16.png | Bin 0 -> 724 bytes
...oDevelop.Debugger.icons.view-debug-watch-16.png | Bin 0 -> 595 bytes
src/addins/MonoDevelop.DesignerSupport/Makefile.in | 9 +-
.../ProjectFileDescriptor.cs | 6 +-
.../ToolboxWidget.cs | 19 +-
.../MonoDevelop.DesignerSupport.addin.xml | 6 +-
.../ClassOutlineTextEditorExtension.cs | 16 +-
...erSupport.MonoDevelop.DesignerSupport.addin.xml | 150 +
...DesignerSupport.csproj.FilesWrittenAbsolute.txt | 11 +
.../MonoDevelop.DesignerSupport.gtk-gui.gui.stetic | 273 +
...lop.DesignerSupport.icons.group-by-category.png | Bin 0 -> 472 bytes
...signerSupport.icons.md-design-listboxtoggle.png | Bin 0 -> 495 bytes
...signerSupport.icons.pad-document-outline-16.png | Bin 0 -> 580 bytes
...lop.DesignerSupport.icons.properties-pad-16.png | Bin 0 -> 445 bytes
...evelop.DesignerSupport.icons.toolbox-pad-16.png | Bin 0 -> 488 bytes
src/addins/MonoDevelop.DocFood/DocFood.addin.xml | 8 +-
src/addins/MonoDevelop.DocFood/Makefile.in | 9 +-
.../MonoDevelop.DocFood/MonoDevelop.DocFood.csproj | 10 +-
.../MonoDevelop.DocFood/DocGenerator.cs | 22 +-
.../Debug/MonoDevelop.DocFood.DocFood.addin.xml | 59 +
.../Debug/MonoDevelop.DocFood.DocFood.config.xml | 562 +
...Develop.DocFood.csproj.FilesWrittenAbsolute.txt | 7 +
.../Debug/MonoDevelop.DocFood.gtk-gui.gui.stetic | 998 ++
src/addins/MonoDevelop.Gettext/Makefile.in | 9 +-
.../MonoDevelop.Gettext.addin.xml | 12 +-
...noDevelop.Gettext.MonoDevelop.Gettext.addin.xml | 196 +
...Develop.Gettext.csproj.FilesWrittenAbsolute.txt | 22 +
.../Debug/MonoDevelop.Gettext.gtk-gui.gui.stetic | 1848 +++
...onoDevelop.Gettext.icons.gettext-overlay-16.png | Bin 0 -> 546 bytes
...onoDevelop.Gettext.icons.gettext-overlay-32.png | Bin 0 -> 1565 bytes
.../MonoDevelop.Gettext.icons.locale_16x16.png | Bin 0 -> 777 bytes
.../MonoDevelop.Gettext.icons.locale_22x22.png | Bin 0 -> 1210 bytes
.../MonoDevelop.Gettext.icons.locale_32x32.png | Bin 0 -> 1769 bytes
.../MonoDevelop.Gettext.icons.silk_accept.png | Bin 0 -> 731 bytes
.../Debug/MonoDevelop.Gettext.icons.silk_error.png | Bin 0 -> 656 bytes
.../MonoDevelop.Gettext.icons.silk_exclamation.png | Bin 0 -> 697 bytes
...oDevelop.Gettext.icons.translation-fuzzy-16.png | Bin 0 -> 729 bytes
...evelop.Gettext.icons.translation-missing-16.png | Bin 0 -> 697 bytes
...oDevelop.Gettext.icons.translation-valid-16.png | Bin 0 -> 718 bytes
...MonoDevelop.Gettext.templates.Makefile.template | 30 +
...op.Gettext.templates.TranslationProject.xpt.xml | 23 +
...MonoDevelop.Gettext.templates.Makefile.template | 32 +
.../templates/TranslationProject.xpt.xml | 1 +
src/addins/MonoDevelop.GtkCore/Makefile.in | 62 +-
.../GuiBuilderDisplayBinding.cs | 2 +-
.../MonoDevelop.GtkCore.addin.xml | 8 +-
.../MonoDevelop.GtkCore/GtkDesignInfo.cs | 1 -
.../MonoDevelop.GtkCore/libstetic/GladeUtils.cs | 12 +-
.../MonoDevelop.GtkCore/libstetic/Makefile.in | 9 +-
.../MonoDevelop.GtkCore/libstetic/Placeholder.cs | 11 +-
.../MonoDevelop.GtkCore/libstetic/Registry.cs | 14 +-
.../libstetic/obj/Debug/Stetic.stetic.glade | 2107 +++
.../libstetic/obj/Debug/Stetic.wrapper.objects.xml | 2292 +++
.../Debug/Stetic.wrapper.pixmaps.accellabel.png | Bin 0 -> 489 bytes
.../Debug/Stetic.wrapper.pixmaps.actiongroup.png | Bin 0 -> 274 bytes
.../Stetic.wrapper.pixmaps.add-check-label.png | Bin 0 -> 626 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.add-menu.png | Bin 0 -> 381 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.alignment.png | Bin 0 -> 213 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.arrow.png | Bin 0 -> 378 bytes
.../Debug/Stetic.wrapper.pixmaps.box-expand.png | Bin 0 -> 338 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.box-fill.png | Bin 0 -> 357 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.button.png | Bin 0 -> 374 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.calendar.png | Bin 0 -> 478 bytes
.../Debug/Stetic.wrapper.pixmaps.cell-expand-h.png | Bin 0 -> 332 bytes
.../Debug/Stetic.wrapper.pixmaps.cell-expand-v.png | Bin 0 -> 341 bytes
.../Debug/Stetic.wrapper.pixmaps.cell-fill-h.png | Bin 0 -> 296 bytes
.../Debug/Stetic.wrapper.pixmaps.cell-fill-v.png | Bin 0 -> 332 bytes
.../Debug/Stetic.wrapper.pixmaps.checkbutton.png | Bin 0 -> 360 bytes
.../Debug/Stetic.wrapper.pixmaps.colorbutton.png | Bin 0 -> 1136 bytes
.../Stetic.wrapper.pixmaps.colorselection.png | Bin 0 -> 1136 bytes
...Stetic.wrapper.pixmaps.colorselectiondialog.png | Bin 0 -> 1136 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.combo.png | Bin 0 -> 456 bytes
.../Debug/Stetic.wrapper.pixmaps.comboentry.png | Bin 0 -> 529 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.custom.png | Bin 0 -> 212 bytes
.../Debug/Stetic.wrapper.pixmaps.dec-border.png | Bin 0 -> 363 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.dialog.png | Bin 0 -> 671 bytes
.../Debug/Stetic.wrapper.pixmaps.drawingarea.png | Bin 0 -> 926 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.entry.png | Bin 0 -> 606 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.eventbox.png | Bin 0 -> 565 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.expander.png | Bin 0 -> 536 bytes
.../Debug/Stetic.wrapper.pixmaps.fileselection.png | Bin 0 -> 1230 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.fixed.png | Bin 0 -> 122 bytes
.../Debug/Stetic.wrapper.pixmaps.fontbutton.png | Bin 0 -> 774 bytes
.../Debug/Stetic.wrapper.pixmaps.fontselection.png | Bin 0 -> 774 bytes
.../Stetic.wrapper.pixmaps.fontselectiondialog.png | Bin 0 -> 605 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.frame.png | Bin 0 -> 307 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.globe-not.png | Bin 0 -> 795 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.globe.png | Bin 0 -> 715 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.handlebox.png | Bin 0 -> 339 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.hbox.png | Bin 0 -> 397 bytes
.../Debug/Stetic.wrapper.pixmaps.hbuttonbox.png | Bin 0 -> 274 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.hpaned.png | Bin 0 -> 655 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.hscale.png | Bin 0 -> 255 bytes
.../Debug/Stetic.wrapper.pixmaps.hscrollbar.png | Bin 0 -> 324 bytes
.../Debug/Stetic.wrapper.pixmaps.hseparator.png | Bin 0 -> 315 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.iconview.png | Bin 0 -> 590 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.image.png | Bin 0 -> 594 bytes
.../Debug/Stetic.wrapper.pixmaps.inc-border.png | Bin 0 -> 370 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.label.png | Bin 0 -> 420 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.menu.png | Bin 0 -> 284 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.menubar.png | Bin 0 -> 593 bytes
.../Debug/Stetic.wrapper.pixmaps.messagedialog.png | Bin 0 -> 726 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.missing.png | Bin 0 -> 357 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.notebook.png | Bin 0 -> 752 bytes
.../Debug/Stetic.wrapper.pixmaps.optionmenu.png | Bin 0 -> 501 bytes
.../Debug/Stetic.wrapper.pixmaps.progressbar.png | Bin 0 -> 194 bytes
.../Debug/Stetic.wrapper.pixmaps.radiobutton.png | Bin 0 -> 560 bytes
.../Stetic.wrapper.pixmaps.remove-check-label.png | Bin 0 -> 593 bytes
.../Debug/Stetic.wrapper.pixmaps.remove-menu.png | Bin 0 -> 324 bytes
.../Stetic.wrapper.pixmaps.scrolledwindow.png | Bin 0 -> 667 bytes
.../Debug/Stetic.wrapper.pixmaps.spinbutton.png | Bin 0 -> 523 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.statusbar.png | Bin 0 -> 199 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.table.png | Bin 0 -> 499 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.textview.png | Bin 0 -> 592 bytes
.../Debug/Stetic.wrapper.pixmaps.togglebutton.png | Bin 0 -> 612 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.toolbar.png | Bin 0 -> 788 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.treeview.png | Bin 0 -> 556 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.vbox.png | Bin 0 -> 373 bytes
.../Debug/Stetic.wrapper.pixmaps.vbuttonbox.png | Bin 0 -> 268 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.viewport.png | Bin 0 -> 204 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.vpaned.png | Bin 0 -> 787 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.vscale.png | Bin 0 -> 279 bytes
.../Debug/Stetic.wrapper.pixmaps.vscrollbar.png | Bin 0 -> 362 bytes
.../Debug/Stetic.wrapper.pixmaps.vseparator.png | Bin 0 -> 327 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.widget.png | Bin 0 -> 337 bytes
.../obj/Debug/Stetic.wrapper.pixmaps.window.png | Bin 0 -> 321 bytes
.../libstetic.csproj.FilesWrittenAbsolute.txt | 80 +
.../MonoDevelop.GtkCore/libsteticui/Makefile.in | 9 +-
.../libsteticui/PropertyTree.cs | 3 +-
.../libsteticui/obj/Debug/libsteticui.action.png | Bin 0 -> 319 bytes
.../libsteticui.csproj.FilesWrittenAbsolute.txt | 7 +
.../libsteticui/obj/Debug/libsteticui.missing.png | Bin 0 -> 357 bytes
...noDevelop.GtkCore.MonoDevelop.GtkCore.addin.xml | 186 +
...Develop.GtkCore.csproj.FilesWrittenAbsolute.txt | 19 +
.../Debug/MonoDevelop.GtkCore.gtk-gui.gui.stetic | 44 +
.../obj/Debug/MonoDevelop.GtkCore.gui.glade | 710 +
.../MonoDevelop.GtkCore.icons.actiongroup.png | Bin 0 -> 274 bytes
.../MonoDevelop.GtkCore.icons.image-x-generic.png | Bin 0 -> 558 bytes
.../obj/Debug/MonoDevelop.GtkCore.icons.widget.png | Bin 0 -> 337 bytes
...noDevelop.GtkCore.templates.ActionGroup.xft.xml | 68 +
...op.GtkCore.templates.ActionGroupPartial.xft.xml | 64 +
.../MonoDevelop.GtkCore.templates.Dialog.xft.xml | 128 +
...Develop.GtkCore.templates.DialogPartial.xft.xml | 124 +
...noDevelop.GtkCore.templates.DrawingArea.xft.xml | 173 +
.../MonoDevelop.GtkCore.templates.Widget.xft.xml | 78 +
...Develop.GtkCore.templates.WidgetPartial.xft.xml | 78 +
.../MonoDevelop.GtkCore.templates.Window.xft.xml | 77 +
...Develop.GtkCore.templates.WindowPartial.xft.xml | 73 +
.../templates/ActionGroup.xft.xml | 1 +
.../templates/ActionGroupPartial.xft.xml | 1 +
.../MonoDevelop.GtkCore/templates/Dialog.xft.xml | 1 +
.../templates/DialogPartial.xft.xml | 1 +
.../templates/DrawingArea.xft.xml | 1 +
.../MonoDevelop.GtkCore/templates/Widget.xft.xml | 1 +
.../templates/WidgetPartial.xft.xml | 1 +
.../MonoDevelop.GtkCore/templates/Window.xft.xml | 1 +
.../templates/WindowPartial.xft.xml | 1 +
src/addins/MonoDevelop.HexEditor/Makefile.in | 9 +-
.../MonoDevelop.HexEditor.addin.xml | 8 +-
.../MonoDevelop.HexEditor.csproj | 10 +-
.../obj/Debug/MHex.MonoDevelop.HexEditor.addin.xml | 42 +
.../obj/Debug/MHex.gtk-gui.gui.stetic | 13 +
...velop.HexEditor.csproj.FilesWrittenAbsolute.txt | 6 +
src/addins/MonoDevelop.Refactoring/Makefile.in | 9 +-
.../MonoDevelop.AnalysisCore/AnalysisCommands.cs | 1 +
.../MonoDevelop.AnalysisCore/AnalysisOptions.cs | 3 +
.../MonoDevelop.AnalysisCore/FixableResult.cs | 1 +
.../MonoDevelop.AnalysisCore/Fixes/GenericFix.cs | 1 +
.../Gui/AnalysisOptionsPanel.cs | 157 +-
.../MonoDevelop.AnalysisCore/Gui/ResultMarker.cs | 1 +
.../Gui/ResultsEditorExtension.cs | 1 +
.../MonoDevelop.AnalysisCore/Result.cs | 1 +
.../CodeActionEditorExtension.cs | 8 +-
.../MonoDevelop.CodeActions/CodeActionWidget.cs | 20 +-
.../MonoDevelop.CodeIssues/CodeAnalysisRunner.cs | 1 +
.../MonoDevelop.CodeIssues/CodeIssueAddinNode.cs | 1 +
.../CodeIssueOptionsDialog.cs | 1 +
.../MonoDevelop.CodeIssues/CodeIssuePad.cs | 3 +-
.../MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs | 1 +
.../MonoDevelop.CodeIssues/CodeIssueProvider.cs | 3 +-
.../RenameItemDialog.cs | 2 +-
.../RenameRefactoring.cs | 2 +-
.../MonoDevelop.Refactoring.addin.xml | 10 +-
.../MonoDevelop.Refactoring.csproj | 11 +-
.../MonoDevelop.Refactoring/ExtensionMethods.cs | 57 +-
.../MonoDevelop.Refactoring/ImportSymbolHandler.cs | 299 +-
.../MonoDevelop.Refactoring/RefactoryCommands.cs | 27 +-
.../ResolveCommandHandler.cs | 165 +-
...p.Refactoring.MonoDevelop.Refactoring.addin.xml | 217 +
...lop.Refactoring.csproj.FilesWrittenAbsolute.txt | 6 +
.../MonoDevelop.Refactoring.gtk-gui.gui.stetic | 1025 ++
src/addins/MonoDevelop.RegexToolkit/Makefile.in | 9 +-
.../MonoDevelop.RegexToolkit.addin.xml | 6 +-
...RegexToolkit.MonoDevelop.RegexToolkit.addin.xml | 35 +
.../MonoDevelop.RegexToolkit.RegexElements.xml | 208 +
...op.RegexToolkit.csproj.FilesWrittenAbsolute.txt | 7 +
.../MonoDevelop.RegexToolkit.gtk-gui.gui.stetic | 396 +
src/addins/MonoDevelop.SourceEditor2/Makefile.in | 9 +-
.../CompletionAppearancePanel.cs | 83 +
.../CompletionOptionsPanel.cs | 90 +
.../GeneralOptionsPanel.cs | 23 +-
.../QuickTask.cs | 2 +-
.../QuickTaskOverviewMode.cs | 2 +-
.../MonoDevelop.SourceEditor.addin.xml | 12 +-
.../MonoDevelop.SourceEditor.csproj | 22 +-
.../DebugValueTooltipProvider.cs | 178 +-
.../MonoDevelop.SourceEditor/ErrorText.cs | 60 +
.../ExtensibleTextEditor.cs | 41 +-
.../MonoDevelop.SourceEditor/FileRegistry.cs | 2 +-
.../MonoDevelop.SourceEditor/LanguageItemWindow.cs | 1 -
.../MonoDevelop.SourceEditor/MessageBubbleCache.cs | 233 +-
.../MessageBubbleHighlightPopupWindow.cs | 170 -
.../MessageBubbleTextMarker.cs | 890 +-
.../MessageBubbleTextMarker_TextBackground.cs | 39 +
.../MonoDevelop.SourceEditor/PinnedWatchWidget.cs | 9 +-
.../SearchAndReplaceWidget.cs | 3 +-
.../MonoDevelop.SourceEditor/SourceEditorView.cs | 223 +-
.../MonoDevelop.SourceEditor/SourceEditorWidget.cs | 14 +-
...ditor.OptionPanels.CompletionAppearancePanel.cs | 197 +
...ceEditor.OptionPanels.CompletionOptionsPanel.cs | 195 +
...ourceEditor.OptionPanels.GeneralOptionsPanel.cs | 221 +-
.../MonoDevelop.SourceEditor2/gtk-gui/gui.stetic | 571 +-
...SourceEditor.MonoDevelop.SourceEditor.addin.xml | 218 +
...itor.MonoDevelop.SourceEditor.searchoptions.png | Bin 0 -> 765 bytes
...op.SourceEditor.csproj.FilesWrittenAbsolute.txt | 7 +
.../MonoDevelop.SourceEditor.gtk-gui.gui.stetic | 2667 +++
src/addins/MonoDevelop.WebReferences/Makefile.in | 9 +-
.../WebServiceDiscoveryResultWS.cs | 18 +-
.../MonoDevelop.WebReferences.addin.xml | 6 +-
...op.WebReferences.Resources.WebReferenceItem.png | Bin 0 -> 4515 bytes
....MonoDevelop.WebReferences.Resources.disco.html | 27 +
...s.MonoDevelop.WebReferences.Resources.wsdl.html | 40 +
...bReferences.MonoDevelop.WebReferences.addin.xml | 87 +
...p.WebReferences.csproj.FilesWrittenAbsolute.txt | 8 +
src/addins/MonoDevelop.XmlEditor/Makefile.in | 9 +-
.../MonoDevelop.XmlEditor.addin.xml | 10 +-
.../MonoDevelop.XmlEditor.csproj | 15 +-
.../MonoDevelop.XmlEditor/XmlEditorService.cs | 54 +-
.../MonoDevelop.XmlEditor/XmlFileAssociation.cs | 5 +-
.../XmlTextEditorExtension.cs | 2 +-
.../XmlCompletionDataImageTestFixture.cs | 32 +-
.../XmlCompletionDataStringTestFixture.cs | 16 +-
.../AttributeGroupReferenceSelectedTestFixture.cs | 9 +-
.../AttributeReferenceSelectedTestFixture.cs | 9 +-
.../AttributeSelectedTestFixture.cs | 9 +-
.../AttributeTypeSelectedTestFixture.cs | 9 +-
.../ElementReferenceSelectedTestFixture.cs | 9 +-
...lementReferenceWithPrefixSelectedTestFixture.cs | 9 +-
.../FindSchemaObject/ElementSelectedTestFixture.cs | 9 +-
.../ElementTypeSelectedTestFixture.cs | 9 +-
.../ElementTypeWithPrefixSelectedTestFixture.cs | 9 +-
.../GroupReferenceSelectedTestFixture.cs | 9 +-
.../Tests/MimeTypeHandledTests.cs | 9 +-
.../Tests/MonoDevelop.XmlEditor.Tests.csproj | 12 +-
.../Parser/ActiveElementStartPathTestFixture.cs | 3 -
.../Tests/Parser/ActiveElementUnderCursorTests.cs | 5 +-
.../Tests/Parser/AttributeNameTestFixture.cs | 2 -
.../Tests/Parser/AttributeNameUnderCursorTests.cs | 4 +-
.../Parser/InsideAttributeValueTestFixture.cs | 1 -
.../Parser/NamespaceDeclarationTestFixture.cs | 2 -
.../Tests/Parser/ParentElementPathTestFixture.cs | 2 -
.../Tests/Parser/QualifiedNameTestFixture.cs | 3 +-
.../Tests/Paths/NoElementPathTestFixture.cs | 1 -
.../Tests/Paths/SingleElementPathTestFixture.cs | 1 -
.../Tests/Paths/TwoElementPathTestFixture.cs | 1 -
.../AttributeGroupRefSchemaIncludeTestFixture.cs | 79 +-
.../TwoElementSchemaIncludeTestFixture.cs | 77 +-
.../Tests/Schema.Uri/GetUriTestFixture.cs | 10 +-
.../Tests/Schema/AbstractElementTestFixture.cs | 15 +-
.../Tests/Schema/AllElementTestFixture.cs | 17 +-
.../Tests/Schema/AttributeAnnotationTestFixture.cs | 8 +-
.../Tests/Schema/AttributeGroupRefTestFixture.cs | 7 +-
.../Tests/Schema/AttributeRefTestFixture.cs | 7 +-
.../Schema/AttributeValueAnnotationTestFixture.cs | 6 +-
.../Schema/ChildElementAttributesTestFixture.cs | 7 +-
.../Tests/Schema/ChoiceTestFixture.cs | 11 +-
.../Schema/ComplexContentExtensionTestFixture.cs | 15 +-
.../Tests/Schema/DuplicateElementTestFixture.cs | 7 +-
.../Tests/Schema/ElementAnnotationTestFixture.cs | 8 +-
.../Schema/ElementRefAnnotationTestFixture.cs | 6 +-
.../ElementWithAttributeSchemaTestFixture.cs | 23 +-
.../Tests/Schema/EnumAttributeValueTestFixture.cs | 7 +-
.../Tests/Schema/ExtensionElementTestFixture.cs | 27 +-
.../FindAttributeFromComplexTypeTestFixture.cs | 4 -
.../Schema/GetSchemaFromFileNameTestFixture.cs | 10 +-
.../Tests/Schema/GroupRefCompositorTestFixture.cs | 9 +-
.../Tests/Schema/GroupRefTestFixture.cs | 9 +-
.../Schema/MissingSchemaElementTestFixture.cs | 7 +-
.../Tests/Schema/NamespaceCompletionTestFixture.cs | 10 +-
.../Schema/NestedAttributeGroupRefTestFixture.cs | 7 +-
.../Tests/Schema/NestedChoiceTestFixture.cs | 13 +-
.../Tests/Schema/NestedElementSchemaTestFixture.cs | 7 +-
.../Tests/Schema/NestedSequenceTestFixture.cs | 11 +-
.../Tests/Schema/ReferencedElementsTestFixture.cs | 21 +-
.../Tests/Schema/RestrictionElementTestFixture.cs | 11 +-
.../Tests/Schema/SchemaAssociationTests.cs | 23 +-
.../Tests/Schema/SchemaTestFixtureBase.cs | 18 +-
.../Tests/Schema/SequencedChoiceTestFixture.cs | 11 +-
.../SimpleContentWithAttributeTestFixture.cs | 5 +-
.../Tests/Schema/SingleElementSchemaTestFixture.cs | 11 +-
.../Tests/Schema/TwoElementSchemaTestFixture.cs | 24 +-
.../Tests/Schema/XhtmlStrictSchemaTestFixture.cs | 10 +-
.../Tests/Schema/XmlSchemaNamespaceTests.cs | 1 -
.../Tests/Schema/XsdSchemaTestFixture.cs | 495 +-
.../Tests/Utils/ResourceManager.cs | 2 -
.../Tests/Utils/SchemaIncludeTestFixtureHelper.cs | 3 +-
.../Tests/XPathQuery/RunXPathQueryTests.cs | 6 +-
.../Tests/XPathQuery/XPathHistoryListTests.cs | 7 +-
.../Tests/XPathQuery/XPathNamespaceListTests.cs | 4 +-
.../Tests/XPathQuery/XmlNamespaceTests.cs | 1 -
...or.MonoDevelop.Xml.Formatting.MonoXmlPolicy.xml | 19 +
...velop.XmlEditor.MonoDevelop.XmlEditor.addin.xml | 157 +
...velop.XmlEditor.csproj.FilesWrittenAbsolute.txt | 15 +
.../Debug/MonoDevelop.XmlEditor.gtk-gui.gui.stetic | 491 +
src/addins/MonoDeveloperExtensions/Makefile.in | 62 +-
.../MonoDeveloperExtensions.addin.xml | 8 +-
.../MonoSolutionItemHandler.cs | 4 +
.../MonoDeveloperExtensions/NUnit/Makefile.in | 9 +-
.../Debug/NUnit.csproj.FilesWrittenAbsolute.txt | 4 +
...perExtensions.MonoDeveloperExtensions.addin.xml | 60 +
...loperExtensions.csproj.FilesWrittenAbsolute.txt | 5 +
src/addins/NUnit/Commands/NUnitCommands.cs | 1 +
src/addins/NUnit/Gui/CircleImage.cs | 15 +-
src/addins/NUnit/Gui/TestNodeBuilder.cs | 13 +-
src/addins/NUnit/Gui/TestPad.cs | 30 +-
src/addins/NUnit/Gui/TestResultsPad.cs | 17 +-
src/addins/NUnit/Makefile.in | 62 +-
src/addins/NUnit/MonoDevelop.NUnit.csproj | 2 +
src/addins/NUnit/MonoDevelopNUnit.addin.xml | 18 +-
src/addins/NUnit/NUnitRunner/Makefile.in | 9 +-
.../NUnitRunner.csproj.FilesWrittenAbsolute.txt | 4 +
src/addins/NUnit/Services/ExternalTestRunner.cs | 2 +-
src/addins/NUnit/Services/ITestProgressMonitor.cs | 1 +
.../NUnit/Services/NUnitAssemblyTestSuite.cs | 171 +-
src/addins/NUnit/Services/NUnitProjectTestSuite.cs | 11 +-
src/addins/NUnit/Services/NUnitService.cs | 77 +-
src/addins/NUnit/Services/UnitTest.cs | 18 +-
src/addins/NUnit/Services/UnitTestResult.cs | 1 +
.../Debug/MonoDevelop.NUnit.Gui.NUnit.Failed.png | Bin 0 -> 306 bytes
.../MonoDevelop.NUnit.Gui.NUnit.Inconclusive.png | Bin 0 -> 301 bytes
.../Debug/MonoDevelop.NUnit.Gui.NUnit.Loading.png | Bin 0 -> 322 bytes
.../obj/Debug/MonoDevelop.NUnit.Gui.NUnit.None.png | Bin 0 -> 311 bytes
.../Debug/MonoDevelop.NUnit.Gui.NUnit.NotRun.png | Bin 0 -> 324 bytes
.../Debug/MonoDevelop.NUnit.Gui.NUnit.Running.png | Bin 0 -> 414 bytes
.../Debug/MonoDevelop.NUnit.Gui.NUnit.Success.png | Bin 0 -> 315 bytes
...onoDevelop.NUnit.Gui.NUnit.SuccessAndFailed.png | Bin 0 -> 422 bytes
.../MonoDevelop.NUnit.Gui.nunit-overlay-32.png | Bin 0 -> 685 bytes
.../obj/Debug/MonoDevelop.NUnit.Gui.nunit.png | Bin 0 -> 1404 bytes
.../Debug/MonoDevelop.NUnit.Gui.unit-test-16.png | Bin 0 -> 620 bytes
.../Debug/MonoDevelop.NUnit.Gui.unit-test-24.png | Bin 0 -> 1082 bytes
.../MonoDevelop.NUnit.MonoDevelopNUnit.addin.xml | 230 +
...noDevelop.NUnit.csproj.FilesWrittenAbsolute.txt | 22 +
.../obj/Debug/MonoDevelop.NUnit.gtk-gui.gui.stetic | 245 +
.../obj/Debug/MonoDevelop.NUnit.md1format.xml | 18 +
...elop.NUnit.templates.NUnitAssemblyGroup.xpt.xml | 24 +
...onoDevelop.NUnit.templates.NUnitProject.xpt.xml | 65 +
...oDevelop.NUnit.templates.NUnitTestClass.xft.xml | 47 +
.../NUnit/templates/NUnitAssemblyGroup.xpt.xml | 1 +
src/addins/NUnit/templates/NUnitProject.xpt.xml | 1 +
src/addins/NUnit/templates/NUnitTestClass.xft.xml | 1 +
src/addins/TextTemplating/Makefile.in | 62 +-
.../Mono.TextTemplating.Tests/GenerationTests.cs | 7 +-
.../Mono.TextTemplating.Tests/Makefile.in | 9 +-
.../Mono.TextTemplating.Tests.csproj | 16 +-
.../TemplateEnginePreprocessTemplateTests.cs | 8 +-
.../TemplatingEngineHelper.cs | 29 +-
...emplating.Tests.csproj.FilesWrittenAbsolute.txt | 4 +
.../TextTemplating/Mono.TextTemplating/Makefile.in | 9 +-
.../Mono.TextTemplating/ParsedTemplate.cs | 2 +-
.../Mono.TextTemplating/TemplatingEngine.cs | 20 +-
....TextTemplating.csproj.FilesWrittenAbsolute.txt | 4 +
.../MonoDevelop.TextTemplating/Makefile.in | 9 +-
.../MonoDevelop.TextTemplating.addin.xml | 8 +-
.../MonoDevelop.TextTemplating.csproj | 1 -
.../Templates/T4PreprocessedTemplateCSharp.xft.xml | 1 +
.../Templates/T4TemplateCSharp.xft.xml | 1 +
.../TextTemplatingFileGenerator.cs | 2 +-
.../TextTemplatingFilePreprocessor.cs | 13 +-
.../ThreadAsyncOperation.cs | 94 -
...Templating.MonoDevelop.TextTemplating.addin.xml | 56 +
.../MonoDevelop.TextTemplating.T4SyntaxMode.xml | 242 +
....TextTemplating.csproj.FilesWrittenAbsolute.txt | 8 +
.../TextTemplating/TextTransform/Makefile.in | 9 +-
.../TextTransform.csproj.FilesWrittenAbsolute.txt | 4 +
src/addins/VBNetBinding/Makefile.in | 9 +-
src/addins/VBNetBinding/VBNetBinding.addin.xml | 6 +-
.../obj/Debug/VBNetBinding.VBNetBinding.addin.xml | 91 +
.../VBNetBinding.csproj.FilesWrittenAbsolute.txt | 14 +
.../obj/Debug/VBNetBinding.gtk-gui.gui.stetic | 1172 ++
.../obj/Debug/VBNetBinding.icons.vb-icon-32.png | Bin 0 -> 431 bytes
.../obj/Debug/VBNetBinding.md1format.xml | 16 +
.../VBNetBinding.templates.AssemblyInfo.xft.xml | 51 +
.../VBNetBinding.templates.EmptyVBFile.xft.xml | 20 +
.../VBNetBinding.templates.EmptyVBProject.xpt.xml | 20 +
...g.templates.VBConsoleApplicationProject.xpt.xml | 46 +
...NetBinding.templates.VBGtkSharp2Project.xpt.xml | 78 +
.../VBNetBinding/templates/EmptyVBFile.xft.xml | 3 +-
.../VBNetBinding/templates/EmptyVBProject.xpt.xml | 1 +
.../templates/VBConsoleApplicationProject.xpt.xml | 1 +
.../templates/VBGtkSharp2Project.xpt.xml | 1 +
src/addins/VersionControl/Makefile.am | 8 +-
src/addins/VersionControl/Makefile.in | 71 +-
.../BaseGitRepositoryTests.cs | 220 +
.../BaseRepositoryTests.cs | 92 +
.../Makefile.am | 5 +
.../Makefile.in | 429 +
.../MonoDevelop.VersionControl.Git.Tests.csproj | 82 +
...ntrol.Git.Tests.csproj.FilesWrittenAbsolute.txt | 4 +
.../MonoDevelop.VersionControl.Git/Makefile.in | 9 +-
.../MonoDevelop.VersionControl.Git.addin.xml | 8 +-
.../MonoDevelop.VersionControl.Git.csproj | 2 +
.../EditBranchDialog.cs | 18 +-
.../FilteredStatus.cs | 9 +-
.../GitCommitDialogExtension.cs | 24 +-
.../GitRepository.cs | 196 +-
.../MonoDevelop.VersionControl.Git/GitService.cs | 14 +-
.../MonoDevelop.VersionControl.Git/MergeDialog.cs | 7 +-
.../UserGitConfigDialog.cs | 55 +
...velop.VersionControl.Git.UserGitConfigDialog.cs | 171 +
.../gtk-gui/generated.cs | 23 +-
.../gtk-gui/gui.stetic | 146 +-
...ol.Git.MonoDevelop.VersionControl.Git.addin.xml | 109 +
...sionControl.Git.csproj.FilesWrittenAbsolute.txt | 9 +
...noDevelop.VersionControl.Git.gtk-gui.gui.stetic | 2027 +++
...velop.VersionControl.Git.icons.arrow_branch.png | Bin 0 -> 582 bytes
...MonoDevelop.VersionControl.Git.icons.server.png | Bin 0 -> 530 bytes
...noDevelop.VersionControl.Git.icons.tag_blue.png | Bin 0 -> 586 bytes
.../BaseSvnRepositoryTests.cs | 185 +
.../Makefile.am | 5 +
.../Makefile.in | 429 +
...oDevelop.VersionControl.Subversion.Tests.csproj | 73 +
.../RepositoryTests.cs | 96 +
...ubversion.Tests.csproj.FilesWrittenAbsolute.txt | 4 +
.../Makefile.in | 9 +-
...evelop.VersionControl.Subversion.Unix.addin.xml | 10 +-
.../LibApr.cs | 25 +-
.../LibSvnClient.cs | 145 +-
.../LibSvnClient0.cs | 120 +-
.../LibSvnClient1.cs | 121 +-
.../SvnClient.cs | 281 +-
...evelop.VersionControl.Subversion.Unix.addin.xml | 23 +
...Subversion.Unix.csproj.FilesWrittenAbsolute.txt | 6 +
.../Makefile.in | 9 +-
...MonoDevelop.VersionControl.Subversion.addin.xml | 8 +-
.../MonoDevelop.VersionControl.Subversion.csproj | 25 -
.../SubversionRepository.cs | 131 +-
.../SubversionVersionControl.cs | 109 +-
...MonoDevelop.VersionControl.Subversion.addin.xml | 37 +
...trol.Subversion.csproj.FilesWrittenAbsolute.txt | 7 +
...op.VersionControl.Subversion.gtk-gui.gui.stetic | 1036 ++
...p.VersionControl.Subversion.gtk-gui.objects.xml | 2 +
.../MonoDevelop.VersionControl/Makefile.in | 9 +-
.../CommitDialog.cs | 74 +-
.../BlameWidget.cs | 45 +-
.../MonoDevelop.VersionControl.Views/DiffWidget.cs | 2 +-
.../EditorCompareWidgetBase.cs | 45 +-
.../MonoDevelop.VersionControl.Views/LogView.cs | 19 +-
.../MonoDevelop.VersionControl.Views/LogWidget.cs | 72 +-
.../MonoDevelop.VersionControl.Views/StatusView.cs | 34 +-
.../VersionControlDocumentInfo.cs | 4 +-
.../MonoDevelop.VersionControl.csproj | 11 +-
.../AddRemoveMoveCommand.cs | 6 +-
.../MonoDevelop.VersionControl/Commands.cs | 76 +-
.../MonoDevelop.VersionControl/CommitCommand.cs | 61 +-
.../CreatePatchCommand.cs | 25 +-
.../MonoDevelop.VersionControl/IgnoreCommand.cs | 161 +
.../MonoDevelop.VersionControl/Repository.cs | 99 +-
.../UnknownRepository.cs | 8 +
.../VersionControlCommandHandler.cs | 20 +-
.../VersionControlFileSystemExtension.cs | 18 +-
.../VersionControlItemList.cs | 7 +
.../VersionControlNodeExtension.cs | 56 +-
.../VersionControlService.cs | 2 +-
.../MonoDevelop.VersionControl/VersionInfo.cs | 3 +-
.../VersionControl.addin.xml | 23 +-
...oDevelop.VersionControl.Dialogs.CommitDialog.cs | 123 +-
...elop.VersionControl.UrlBasedRepositoryEditor.cs | 13 +-
.../MonoDevelop.VersionControl/gtk-gui/gui.stetic | 60 +-
.../Debug/MonoDevelop.VersionControl.Policies.xml | 3 +
...Develop.VersionControl.VersionControl.addin.xml | 361 +
....VersionControl.csproj.FilesWrittenAbsolute.txt | 30 +
.../MonoDevelop.VersionControl.gtk-gui.gui.stetic | 1824 +++
.../MonoDevelop.VersionControl.overlay_added.png | Bin 0 -> 198 bytes
...noDevelop.VersionControl.overlay_conflicted.png | Bin 0 -> 218 bytes
...onoDevelop.VersionControl.overlay_controled.png | Bin 0 -> 219 bytes
...evelop.VersionControl.overlay_lock_required.png | Bin 0 -> 232 bytes
.../MonoDevelop.VersionControl.overlay_locked.png | Bin 0 -> 232 bytes
...MonoDevelop.VersionControl.overlay_modified.png | Bin 0 -> 218 bytes
.../MonoDevelop.VersionControl.overlay_normal.png | Bin 0 -> 196 bytes
.../MonoDevelop.VersionControl.overlay_removed.png | Bin 0 -> 256 bytes
...MonoDevelop.VersionControl.overlay_unlocked.png | Bin 0 -> 237 bytes
...oDevelop.VersionControl.overlay_unversioned.png | Bin 0 -> 213 bytes
.../MonoDevelop.VersionControl.repository.png | Bin 0 -> 988 bytes
...noDevelop.VersionControl.version-control-16.png | Bin 0 -> 929 bytes
.../Dialogs/OpenFileDialogHandler.cs | 2 +-
src/addins/WindowsPlatform/GdkWin32.cs | 216 +
src/addins/WindowsPlatform/Makefile.in | 9 +-
.../WindowsPlatform/WindowsPlatform.addin.xml | 6 +-
src/addins/WindowsPlatform/WindowsPlatform.cs | 95 +-
src/addins/WindowsPlatform/WindowsPlatform.csproj | 7 +-
src/addins/prj2make-sharp-lib/Makefile.in | 9 +-
...2make-sharp-lib.csproj.FilesWrittenAbsolute.txt | 5 +
.../prj2makesharplib.prj2make-sharp-lib.addin.xml | 23 +
.../prj2make-sharp-lib.addin.xml | 10 +-
src/core/Makefile.am | 1 -
src/core/Makefile.in | 63 +-
src/core/Mono.Debugging/Makefile.in | 427 -
.../Mono.Debugging.Backend/IBacktrace.cs | 20 -
.../Mono.Debugging.Backend/IObjectValueSource.cs | 88 -
.../Mono.Debugging.Backend/IObjectValueUpdater.cs | 37 -
.../Mono.Debugging.Client/Backtrace.cs | 64 -
.../Mono.Debugging.Client/BreakEventInfo.cs | 162 -
.../Mono.Debugging.Client/Breakpoint.cs | 234 -
.../Mono.Debugging.Client/DebuggerSession.cs | 1522 --
.../Mono.Debugging.Client/EvaluationOptions.cs | 116 -
.../Mono.Debugging.Client/ExceptionInfo.cs | 254 -
.../Mono.Debugging.Client/ObjectValue.cs | 784 -
.../Mono.Debugging.Client/RawValue.cs | 244 -
.../BaseTypeViewSource.cs | 89 -
.../FilteredMembersSource.cs | 123 -
.../NRefactoryExpressionEvaluatorVisitor.cs | 1317 --
.../ObjectValueAdaptor.cs | 1329 --
.../Mono.Debugging.Evaluation/RawViewSource.cs | 83 -
.../TypeValueReference.cs | 205 -
src/core/Mono.Debugging/Mono.Debugging.csproj | 129 -
src/core/Mono.Texteditor/Makefile.in | 9 +-
.../Mono.TextEditor.Highlighting/Chunk.cs | 6 +-
.../Mono.TextEditor.Highlighting/ColorScheme.cs | 40 +-
.../Mono.TextEditor.Highlighting/Match.cs | 7 +-
.../Mono.TextEditor.Highlighting/Rule.cs | 37 +-
.../Mono.TextEditor.Highlighting/Span.cs | 38 +-
.../Mono.TextEditor.Highlighting/SyntaxMode.cs | 37 +-
.../SyntaxModeService.cs | 40 +-
.../Mono.Texteditor/Mono.TextEditor.Utils/Diff.cs | 119 +-
.../Mono.TextEditor.Vi/NewViEditMode.cs | 125 +
.../Mono.TextEditor.Vi/ViBuilderContext.cs | 9 +-
.../Mono.TextEditor.Vi/ViBuilders.cs | 7 +
.../Mono.Texteditor/Mono.TextEditor.Vi/ViEditor.cs | 34 +-
.../Mono.TextEditor.Vi/ViEditorActions.cs | 5 +
.../Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs | 191 +-
.../Mono.TextEditor.Vi/ViStatusArea.cs | 159 +
src/core/Mono.Texteditor/Mono.TextEditor.csproj | 11 +
.../Mono.TextEditor/Actions/ClipboardActions.cs | 62 +-
.../Mono.Texteditor/Mono.TextEditor/Annotatable.cs | 150 +-
.../Mono.TextEditor/BookmarkMarker.cs | 7 +
.../Mono.TextEditor/Document/IWordFindStrategy.cs | 180 +-
.../Mono.TextEditor/Document/LineSplitter.cs | 15 +-
.../Mono.TextEditor/Document/TextDocument.cs | 6 +-
.../Mono.TextEditor/Gui/ActionMargin.cs | 128 +
.../Mono.TextEditor/Gui/CodeSegmentEditorWindow.cs | 3 +
.../Mono.TextEditor/Gui/FoldMarkerMargin.cs | 40 +-
.../Mono.TextEditor/Gui/GtkWorkarounds.cs | 208 +-
.../Mono.TextEditor/Gui/GutterMargin.cs | 32 +-
.../Mono.TextEditor/Gui/IconMargin.cs | 55 +-
.../Mono.TextEditor/Gui/PangoUtil.cs | 60 +
.../Mono.TextEditor/Gui/TextArea.cs | 120 +-
.../Mono.TextEditor/Gui/TextEditor.cs | 15 +-
.../Mono.TextEditor/Gui/TextViewMargin.cs | 357 +-
.../Mono.Texteditor/Mono.TextEditor/HeightTree.cs | 2 +
.../Mono.TextEditor/IBackgroundMarker.cs | 49 +
.../Mono.TextEditor/IIconBarMarker.cs | 49 +
.../Mono.TextEditor/LineBackgroundMarker.cs | 54 +
.../Mono.TextEditor/MarginMarker.cs | 174 +
.../Mono.TextEditor/SimpleEditMode.cs | 12 +-
.../Mono.TextEditor/Standalone/UnicodeNewline.cs | 255 +
.../Mono.TextEditor/StyleTextLineMarker.cs | 121 +
.../Mono.TextEditor/TextEditorData.cs | 38 +-
.../Mono.TextEditor/TextLineMarker.cs | 379 +-
.../Mono.TextEditor/TextLinkEditMode.cs | 175 +-
.../Mono.TextEditor/UnderlineMarker.cs | 141 +
.../Mono.Texteditor/Mono.TextEditor/UrlMarker.cs | 141 +
src/core/Mono.Texteditor/Styles/DefaultStyle.json | 42 +-
src/core/Mono.Texteditor/Styles/MonokaiStyle.json | 46 +-
.../Mono.Texteditor/Styles/NightshadeStyle.json | 47 +-
src/core/Mono.Texteditor/Styles/OblivionStyle.json | 48 +-
.../Mono.Texteditor/Styles/SolarizedDarkStyle.json | 48 +-
.../Styles/SolarizedLightStyle.json | 50 +-
src/core/Mono.Texteditor/Styles/TangoStyle.json | 163 +-
.../Mono.Texteditor/Styles/VisualStudioStyle.json | 7 +-
.../SyntaxModes/CSharpSyntaxMode.xml | 2 -
.../SyntaxModes/FSharpSyntaxMode.xml | 34 +-
...xtEditor.SyntaxModes.ActionScriptSyntaxMode.xml | 122 +
...TextEditor.SyntaxModes.AspNetAshxSyntaxMode.xml | 80 +
...ono.TextEditor.SyntaxModes.AspNetSyntaxMode.xml | 141 +
.../Mono.TextEditor.SyntaxModes.BooSyntaxMode.xml | 251 +
.../Mono.TextEditor.SyntaxModes.CGSyntaxMode.xml | 462 +
.../Mono.TextEditor.SyntaxModes.CPPSyntaxMode.xml | 139 +
...ono.TextEditor.SyntaxModes.CSharpSyntaxMode.xml | 342 +
.../Mono.TextEditor.SyntaxModes.CSyntaxMode.xml | 154 +
....TextEditor.SyntaxModes.ChangeLogSyntaxMode.xml | 44 +
.../Mono.TextEditor.SyntaxModes.CssSyntaxMode.xml | 377 +
.../Mono.TextEditor.SyntaxModes.DiffSyntaxMode.xml | 46 +
...ono.TextEditor.SyntaxModes.FSharpSyntaxMode.xml | 300 +
.../Mono.TextEditor.SyntaxModes.HtmlSyntaxMode.xml | 191 +
.../Mono.TextEditor.SyntaxModes.ILSyntaxMode.xml | 578 +
.../Mono.TextEditor.SyntaxModes.JavaSyntaxMode.xml | 169 +
...TextEditor.SyntaxModes.JavascriptSyntaxMode.xml | 84 +
.../Mono.TextEditor.SyntaxModes.JaySyntaxMode.xml | 65 +
.../Mono.TextEditor.SyntaxModes.JsonSyntaxMode.xml | 76 +
.../Mono.TextEditor.SyntaxModes.LessSyntaxMode.xml | 395 +
.../Mono.TextEditor.SyntaxModes.LuaSyntaxMode.xml | 132 +
...o.TextEditor.SyntaxModes.MakefileSyntaxMode.xml | 103 +
...ono.TextEditor.SyntaxModes.PythonSyntaxMode.xml | 384 +
...Mono.TextEditor.SyntaxModes.RazorSyntaxMode.xml | 83 +
.../Mono.TextEditor.SyntaxModes.RubySyntaxMode.xml | 180 +
...extEditor.SyntaxModes.ShellScriptSyntaxMode.xml | 90 +
...no.TextEditor.SyntaxModes.StringsSyntaxMode.xml | 55 +
...TextEditor.SyntaxModes.TypescriptSyntaxMode.xml | 108 +
...Mono.TextEditor.SyntaxModes.VBNetSyntaxMode.xml | 283 +
.../Mono.TextEditor.SyntaxModes.ValaSyntaxMode.xml | 206 +
.../Mono.TextEditor.SyntaxModes.XmlSyntaxMode.xml | 116 +
...Mono.TextEditor.csproj.FilesWrittenAbsolute.txt | 44 +
.../obj/Debug/Mono.TextEditor.gtk-gui.gui.stetic | 6 +
src/core/MonoDevelop.Core/Makefile.in | 9 +-
.../MonoDevelop.Core.Assemblies/AssemblyContext.cs | 8 +-
.../MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs | 13 +
.../MsNetFrameworkBackend.cs | 1 +
.../SystemAssemblyService.cs | 18 +
.../MonoDevelop.Core.Assemblies/TargetRuntime.cs | 15 +-
.../DotNetCommandFactory.cs | 42 +
.../MonoDevelop.Core.Execution/ICommandFactory.cs | 43 +
.../MonoDevelop.Core.Execution/LocalConsole.cs | 16 +
.../MonoDevelop.Core.Execution/ProcessService.cs | 32 +-
.../DefaultFileSystemExtension.cs | 4 +-
.../FileSystemExtension.cs | 28 +-
.../MonoDevelop.Core/MonoDevelop.Core.addin.xml | 30 +-
src/core/MonoDevelop.Core/MonoDevelop.Core.csproj | 9 +-
.../MonoDevelop.Core/ApplicationService.cs | 9 +-
.../MonoDevelop.Core/FileEventArgs.cs | 29 +-
.../MonoDevelop.Core/MonoDevelop.Core/FilePath.cs | 6 +
.../MonoDevelop.Core/FileService.cs | 66 +-
.../MonoDevelop.Core/InternalTestRunner.cs | 51 -
.../MonoDevelop.Core/UserException.cs | 6 +
.../MD1DotNetProjectHandler.cs | 7 +-
.../MSBuildProject.cs | 28 +-
.../MSBuildProjectHandler.cs | 124 +-
.../MSBuildProjectService.cs | 41 +-
.../MonoDevelop.Projects.Text/TextFile.cs | 79 +-
.../MonoDevelop.Projects/BuildAction.cs | 1 +
.../MonoDevelop.Projects/BuildTool.cs | 70 +-
.../MonoDevelop.Projects/DotNetAssemblyProject.cs | 4 +-
.../MonoDevelop.Projects/DotNetProject.cs | 2 -
.../MonoDevelop.Projects/HelpService.cs | 8 +-
.../MonoDevelop.Projects/PortableDotNetProject.cs | 6 +-
.../MonoDevelop.Projects/Project.cs | 36 +-
.../MonoDevelop.Projects/ProjectFile.cs | 197 +-
.../MonoDevelop.Projects/ProjectFileCollection.cs | 218 +-
.../MonoDevelop.Projects/ProjectFileEventArgs.cs | 31 +-
.../MonoDevelop.Projects/ProjectItemCollection.cs | 36 +-
.../MonoDevelop.Projects/ProjectReference.cs | 39 +-
.../MonoDevelop.Projects/ProjectService.cs | 6 +-
.../MonoDevelop.Projects/Solution.cs | 12 +-
.../MonoDevelop.Projects/SolutionEntityItem.cs | 4 +-
.../MonoDevelop.Projects/SolutionFolder.cs | 20 +-
.../MonoDevelop.Projects/SolutionItem.cs | 33 +-
.../MonoDevelop.Projects/Workspace.cs | 15 -
.../MonoDevelop.Projects/WorkspaceItem.cs | 15 +-
.../frameworks/framework_NET_4_0_client.xml | 2 +-
src/core/MonoDevelop.Core/md1format.xml | 2 +-
.../MonoDevelop.Core.MonoDevelop.Core.addin.xml | 349 +
...onoDevelop.Core.csproj.FilesWrittenAbsolute.txt | 15 +
...noDevelop.Core.frameworks.framework_NET_1_1.xml | 60 +
...noDevelop.Core.frameworks.framework_NET_2_0.xml | 78 +
...noDevelop.Core.frameworks.framework_NET_3_0.xml | 29 +
...noDevelop.Core.frameworks.framework_NET_3_5.xml | 34 +
...op.Core.frameworks.framework_NET_3_5_client.xml | 58 +
...noDevelop.Core.frameworks.framework_NET_4_0.xml | 155 +
...op.Core.frameworks.framework_NET_4_0_client.xml | 84 +
...noDevelop.Core.frameworks.framework_NET_4_5.xml | 171 +
.../obj/Debug/MonoDevelop.Core.md1format.xml | 91 +
src/core/MonoDevelop.Ide/BuildVariables.cs | 4 +-
.../ExtensionModel/Commands.addin.xml | 11 +-
.../ExtensionModel/ItemOptionPanels.addin.xml | 4 +-
.../ExtensionModel/MainMenu.addin.xml | 11 +-
.../ExtensionModel/MonoDevelop.Ide.addin.xml | 14 +-
.../ExtensionModel/StockIcons.addin.xml | 3 +
src/core/MonoDevelop.Ide/Makefile.in | 9 +-
.../MonoDevelop.Components.Chart/BasicChart.cs | 13 +-
.../CommandCheckMenuItem.cs | 7 +
.../CommandManager.cs | 22 +-
.../CommandMenuItem.cs | 10 +-
.../MonoDevelop.Components.Docking/DockBarItem.cs | 36 +-
.../MonoDevelop.Components.Docking/DockFrame.cs | 17 +-
.../MonoDevelop.Components.Docking/DockItem.cs | 5 +
.../DockItemBehavior.cs | 2 +-
.../DockItemContainer.cs | 18 +-
.../DockItemTitleTab.cs | 12 +-
.../MainToolbar.cs | 40 +-
.../ProjectSearchCategory.cs | 16 +-
.../RoundButton.cs | 49 +-
.../SearchPopupWindow.cs | 8 +-
.../SearchResult.cs | 24 +-
.../StatusArea.cs | 40 +-
.../StatusAreaTheme.cs | 22 +-
.../PropertyGridTable.cs | 35 +-
.../MonoDevelop.Components.Theming/GtkTheme.cs | 62 +-
.../MonoDevelop.Components/CairoExtensions.cs | 60 +-
.../DropDownBoxListWindow.cs | 3 +
.../MonoDevelop.Components/FixedWidthWrapLabel.cs | 31 +-
.../MonoDevelop.Components/GtkUtil.cs | 2 +-
.../MonoDevelop.Components/HeaderBox.cs | 29 +-
.../MonoDevelop.Components/PopoverWidget.cs | 12 +-
.../MonoDevelop.Components/PopoverWindow.cs | 12 +-
.../MonoDevelop.Components/SectionList.cs | 97 +-
.../MonoDevelop.Components/Tweener.cs | 430 -
.../CompletionData.cs | 37 +-
.../CompletionListWindow.cs | 74 +-
.../CompletionWindowManager.cs | 18 +-
.../MonoDevelop.Ide.CodeCompletion/ListWidget.cs | 47 +-
.../MonoDevelop.Ide.CodeCompletion/ListWindow.cs | 47 +-
.../ParameterInformationWindow.cs | 2 +
.../ParameterInformationWindowManager.cs | 4 +-
.../TooltipInformationWindow.cs | 3 +
.../MonoDevelop.Ide.Commands/FileCommands.cs | 14 +-
.../MonoDevelop.Ide.Commands/FileTabCommands.cs | 18 +-
.../MonoDevelop.Ide.Commands/ProjectCommands.cs | 3 +-
.../CustomToolService.cs | 13 +-
.../ResXFileCodeGenerator.cs | 80 +
.../ThreadAsyncOperation.cs | 91 +
.../MonoDevelop.Ide.Desktop/PlatformService.cs | 15 +
.../MonoDevelop.Ide.FindInFiles/FilterOptions.cs | 6 +-
.../FindInFilesDialog.cs | 1 -
.../MonoDevelop.Ide.FindInFiles/MemberCollector.cs | 9 +-
.../MonoDevelop.Ide.FindInFiles/MemberReference.cs | 11 +-
.../ReferencesFinder.cs | 4 +-
.../MonoDevelop.Ide.FindInFiles/Scope.cs | 5 +-
.../SearchResultWidget.cs | 6 +-
.../MonoDevelop.Ide.Fonts/FontDescriptionCodon.cs | 17 +-
.../MonoDevelop.Ide.Fonts/FontService.cs | 12 +-
.../CompletionTextEditorExtension.cs | 52 +-
.../AboutMonoDevelopTabPage.cs | 4 +-
.../FileSelectorDialog.cs | 7 +-
.../MimeTypePolicyOptionsPanel.cs | 25 +-
.../MimeTypePolicyOptionsSection.cs | 11 +-
.../MultiMessageDialog.cs | 1 +
.../MonoDevelop.Ide.Gui.Dialogs/TipOfTheDay.cs | 15 +-
.../SdkLocationPanel.cs | 7 +-
.../SolutionNodeBuilder.cs | 2 +-
.../FolderNodeBuilder.cs | 21 +-
.../ProjectFileNodeBuilder.cs | 2 +-
.../ProjectNodeBuilder.cs | 21 +-
.../ProjectPadContextMenu.addin.xml | 3 +
.../UnknownEntryNodeBuilder.cs | 15 +
.../MonoDevelop.Ide.Gui/DefaultWorkbench.cs | 13 +-
.../MonoDevelop.Ide.Gui/DockNotebook.cs | 68 +-
.../MonoDevelop.Ide.Gui/Document.cs | 66 +-
.../MonoDevelop.Ide.Gui/DocumentSwitcher.cs | 6 +-
.../MonoDevelop.Ide.Gui/DocumentToolbar.cs | 11 +-
.../MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs | 45 +-
.../MonoDevelop.Ide.Gui/ViewCommandHandlers.cs | 15 +
.../MonoDevelop.Ide.Gui/Workbench.cs | 16 +-
.../ClosedDocumentNavigationPoint.cs | 95 +
.../NavigationHistoryItem.cs | 6 +-
.../NavigationHistoryService.cs | 46 +-
.../PortableRuntimeOptionsPanel.cs | 45 +-
.../RuntimeOptionsPanel.cs | 7 +-
.../ConfirmProjectDeleteDialog.cs | 14 +-
.../IdeFileSystemExtensionExtension.cs | 77 +
.../MonoDevelop.Ide.Projects/NewFileDialog.cs | 2 +-
.../ProjectFileSelectorDialog.cs | 6 +-
.../SelectReferenceDialog.cs | 33 +-
.../MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs | 1 +
.../MonoDevelop.Ide.TypeSystem/Ambience.cs | 22 +-
.../MonoDevelop.Ide.TypeSystem/AmbienceService.cs | 4 +-
.../CodeGenerationService.cs | 75 +-
.../MonoDocDocumentationProvider.cs | 24 +-
.../MonoDevelop.Ide.TypeSystem/StockIcons.cs | 40 +-
.../TypeSystemService.cs | 308 +-
.../WelcomePageFirstRun.cs | 22 +-
.../WelcomePageNewsFeed.cs | 13 +-
src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj | 27 +-
.../MonoDevelop.Ide/DesktopService.cs | 25 +
.../MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs | 5 +-
.../MonoDevelop.Ide/ImageService.cs | 159 +-
.../MonoDevelop.Ide/MessageService.cs | 3 +
.../MonoDevelop.Ide/ProjectOperations.cs | 9 +-
.../MonoDevelop.Ide/RootWorkspace.cs | 13 +-
src/core/MonoDevelop.Ide/gtk-gui/generated.cs | 22 +-
.../MonoDevelop.Ide/icons/bubble-error-icon.png | Bin 0 -> 186 bytes
.../MonoDevelop.Ide/icons/bubble-warning-icon.png | Bin 0 -> 275 bytes
...noDevelop.Ide.ExtensionModel.Commands.addin.xml | 988 ++
...de.ExtensionModel.DefaultPolicyPanels.addin.xml | 27 +
...de.ExtensionModel.GlobalOptionsDialog.addin.xml | 53 +
...p.Ide.ExtensionModel.ItemOptionPanels.addin.xml | 98 +
...noDevelop.Ide.ExtensionModel.MainMenu.addin.xml | 273 +
...evelop.Ide.ExtensionModel.MainToolbar.addin.xml | 11 +
...oDevelop.Ide.ExtensionModel.MimeTypes.addin.xml | 83 +
...op.Ide.ExtensionModel.MonoDevelop.Ide.addin.xml | 311 +
.../MonoDevelop.Ide.ExtensionModel.Pads.addin.xml | 89 +
...noDevelop.Ide.ExtensionModel.Policies.addin.xml | 47 +
...Develop.Ide.ExtensionModel.StockIcons.addin.xml | 301 +
...oDevelop.Ide.ExtensionModel.Templates.addin.xml | 58 +
...nents.Commands.CommandsExtensionModel.addin.xml | 15 +
...oDevelop.Components.Docking.stock-auto-hide.png | Bin 0 -> 228 bytes
...noDevelop.Components.Docking.stock-close-12.png | Bin 0 -> 239 bytes
...e.MonoDevelop.Components.Docking.stock-dock.png | Bin 0 -> 237 bytes
...velop.Components.Docking.stock-menu-left-12.png | Bin 0 -> 195 bytes
...elop.Components.Docking.stock-menu-right-12.png | Bin 0 -> 191 bytes
...ainToolbar.Theme.btDebugBase-LeftCap-Normal.png | Bin 0 -> 309 bytes
...inToolbar.Theme.btDebugBase-LeftCap-Pressed.png | Bin 0 -> 430 bytes
...MainToolbar.Theme.btDebugBase-MidCap-Normal.png | Bin 0 -> 233 bytes
...ainToolbar.Theme.btDebugBase-MidCap-Pressed.png | Bin 0 -> 359 bytes
...inToolbar.Theme.btDebugBase-RightCap-Normal.png | Bin 0 -> 332 bytes
...nToolbar.Theme.btDebugBase-RightCap-Pressed.png | Bin 0 -> 440 bytes
...ts.MainToolbar.Theme.btExecuteBase-Disabled.png | Bin 0 -> 2110 bytes
...nents.MainToolbar.Theme.btExecuteBase-Hover.png | Bin 0 -> 2033 bytes
...ents.MainToolbar.Theme.btExecuteBase-Normal.png | Bin 0 -> 2076 bytes
...nts.MainToolbar.Theme.btExecuteBase-Pressed.png | Bin 0 -> 2192 bytes
...ponents.MainToolbar.Theme.icoBuild-Disabled.png | Bin 0 -> 1721 bytes
...omponents.MainToolbar.Theme.icoBuild-Normal.png | Bin 0 -> 1699 bytes
...nents.MainToolbar.Theme.icoExecute-Disabled.png | Bin 0 -> 1325 bytes
...ponents.MainToolbar.Theme.icoExecute-Normal.png | Bin 0 -> 1330 bytes
...mponents.MainToolbar.Theme.icoStop-Disabled.png | Bin 0 -> 1159 bytes
...Components.MainToolbar.Theme.icoStop-Normal.png | Bin 0 -> 1159 bytes
....MainToolbar.Theme.notificationBuildingIcon.png | Bin 0 -> 1092 bytes
...Toolbar.Theme.notificationDisclosure-Active.png | Bin 0 -> 1128 bytes
...Toolbar.Theme.notificationDisclosure-Normal.png | Bin 0 -> 1157 bytes
...nts.MainToolbar.Theme.notificationErrorIcon.png | Bin 0 -> 1277 bytes
...velop.Ide.MonoDevelop.Components.SearchEntry.cs | 732 +
...Ide.CodeFormatting.InvariantTextStylePolicy.xml | 9 +
...elop.Ide.CodeFormatting.MonoTextStylePolicy.xml | 9 +
....CodeFormatting.VisualStudioTextStylePolicy.xml | 9 +
...lop.Ide.CodeTemplates.MonoDevelop-templates.xml | 1241 ++
...Gui.Pads.ClassPad.ClassPadContextMenu.addin.xml | 49 +
...Pads.ProjectPad.ProjectPadContextMenu.addin.xml | 154 +
...lop.Ide.StandardHeader.Apache2LicencePolicy.xml | 1 +
...evelop.Ide.StandardHeader.GPL2LicencePolicy.xml | 1 +
...evelop.Ide.StandardHeader.GPL3LicencePolicy.xml | 1 +
...lop.Ide.StandardHeader.LGPL2-1LicencePolicy.xml | 1 +
...velop.Ide.StandardHeader.LGPL3LicencePolicy.xml | 1 +
...elop.Ide.StandardHeader.MITX11LicencePolicy.xml | 1 +
...elop.Ide.StandardHeader.NewBSDLicencePolicy.xml | 1 +
...MonoDevelop.Ide.WelcomePage.icons.link-chat.png | Bin 0 -> 1545 bytes
...onoDevelop.Ide.WelcomePage.icons.link-cloud.png | Bin 0 -> 1396 bytes
...onoDevelop.Ide.WelcomePage.icons.link-heart.png | Bin 0 -> 1520 bytes
...MonoDevelop.Ide.WelcomePage.icons.link-info.png | Bin 0 -> 1707 bytes
...oDevelop.Ide.WelcomePage.icons.new_solution.png | Bin 0 -> 1191 bytes
...Develop.Ide.WelcomePage.icons.open_solution.png | Bin 0 -> 1085 bytes
...lop.Ide.WelcomePage.icons.star-normal-hover.png | Bin 0 -> 1411 bytes
...noDevelop.Ide.WelcomePage.icons.star-normal.png | Bin 0 -> 1407 bytes
...lop.Ide.WelcomePage.icons.star-pinned-hover.png | Bin 0 -> 1598 bytes
...noDevelop.Ide.WelcomePage.icons.star-pinned.png | Bin 0 -> 1584 bytes
...MonoDevelop.Ide.WelcomePage.icons.starburst.png | Bin 0 -> 154299 bytes
.../Debug/MonoDevelop.Ide.branding.AboutImage.png | Bin 0 -> 107951 bytes
.../MonoDevelop.Ide.branding.SplashScreen.png | Bin 0 -> 107982 bytes
.../MonoDevelop.Ide.branding.WelcomePage_Logo.png | Bin 0 -> 46887 bytes
...op.Ide.branding.WelcomePage_TopBorderRepeat.png | Bin 0 -> 1426 bytes
...MonoDevelop.Ide.csproj.FilesWrittenAbsolute.txt | 332 +
.../obj/Debug/MonoDevelop.Ide.gtk-gui.gui.stetic |12022 ++++++++++++++
...Ide.icons-components.MonoDevelop.Close.Over.png | Bin 0 -> 402 bytes
...-components.MonoDevelop.Close.Selected.Over.png | Bin 0 -> 404 bytes
...icons-components.MonoDevelop.Close.Selected.png | Bin 0 -> 229 bytes
...elop.Ide.icons-components.MonoDevelop.Close.png | Bin 0 -> 229 bytes
....Components.PropertyGrid.DefaultPropertyTab.bmp | Bin 0 -> 566 bytes
...op.Components.PropertyGrid.EventPropertyTab.bmp | Bin 0 -> 590 bytes
...noDevelop.Components.PropertyGrid.SortByCat.png | Bin 0 -> 472 bytes
.../MonoDevelop.Ide.icons.ExecutionMarker.png | Bin 0 -> 388 bytes
.../MonoDevelop.Ide.icons.add-namespace-16.png | Bin 0 -> 680 bytes
.../MonoDevelop.Ide.icons.assembly-project-16.png | Bin 0 -> 1401 bytes
.../obj/Debug/MonoDevelop.Ide.icons.balloon.png | Bin 0 -> 593 bytes
...onoDevelop.Ide.icons.breadcrumb-next-normal.png | Bin 0 -> 2951 bytes
...onoDevelop.Ide.icons.breadcrumb-prev-normal.png | Bin 0 -> 2941 bytes
.../Debug/MonoDevelop.Ide.icons.breakpoint-16.png | Bin 0 -> 716 bytes
...Develop.Ide.icons.breakpoint-disable-all-16.png | Bin 0 -> 1557 bytes
...onoDevelop.Ide.icons.breakpoint-disabled-16.png | Bin 0 -> 498 bytes
...MonoDevelop.Ide.icons.breakpoint-invalid-16.png | Bin 0 -> 1600 bytes
.../MonoDevelop.Ide.icons.breakpoint-new-16.png | Bin 0 -> 1575 bytes
.../MonoDevelop.Ide.icons.breakpoint-on-off-16.png | Bin 0 -> 1589 bytes
...oDevelop.Ide.icons.breakpoint-remove-all-16.png | Bin 0 -> 684 bytes
.../obj/Debug/MonoDevelop.Ide.icons.broom-16.png | Bin 0 -> 737 bytes
.../MonoDevelop.Ide.icons.bubble-error-icon.png | Bin 0 -> 186 bytes
.../MonoDevelop.Ide.icons.bubble-warning-icon.png | Bin 0 -> 275 bytes
.../MonoDevelop.Ide.icons.build-project-16.png | Bin 0 -> 614 bytes
.../MonoDevelop.Ide.icons.build-project-22.png | Bin 0 -> 751 bytes
.../MonoDevelop.Ide.icons.build-solution-16.png | Bin 0 -> 589 bytes
.../MonoDevelop.Ide.icons.build-solution-22.png | Bin 0 -> 799 bytes
.../MonoDevelop.Ide.icons.chain-overlay-16.png | Bin 0 -> 327 bytes
...onoDevelop.Ide.icons.clear-all-bookmarks-16.png | Bin 0 -> 535 bytes
...onoDevelop.Ide.icons.clear-all-bookmarks-22.png | Bin 0 -> 702 bytes
...onoDevelop.Ide.icons.close-all-documents-16.png | Bin 0 -> 429 bytes
.../MonoDevelop.Ide.icons.close-solution-16.png | Bin 0 -> 1307 bytes
.../MonoDevelop.Ide.icons.closed-folder-16.png | Bin 0 -> 366 bytes
...Develop.Ide.icons.closed-resource-folder-16.png | Bin 0 -> 390 bytes
.../MonoDevelop.Ide.icons.code-template-16.png | Bin 0 -> 590 bytes
.../MonoDevelop.Ide.icons.code-template-24.png | Bin 0 -> 835 bytes
.../obj/Debug/MonoDevelop.Ide.icons.command.png | Bin 0 -> 996 bytes
.../obj/Debug/MonoDevelop.Ide.icons.comment.png | Bin 0 -> 1338 bytes
.../MonoDevelop.Ide.icons.compiler-options-16.png | Bin 0 -> 721 bytes
.../MonoDevelop.Ide.icons.compiler-options-24.png | Bin 0 -> 1236 bytes
.../obj/Debug/MonoDevelop.Ide.icons.console-16.png | Bin 0 -> 520 bytes
.../MonoDevelop.Ide.icons.custom-commands-16.png | Bin 0 -> 996 bytes
.../MonoDevelop.Ide.icons.custom-commands-24.png | Bin 0 -> 1935 bytes
.../MonoDevelop.Ide.icons.disclose-arrow-down.png | Bin 0 -> 432 bytes
.../MonoDevelop.Ide.icons.disclose-arrow-up.png | Bin 0 -> 479 bytes
.../obj/Debug/MonoDevelop.Ide.icons.drive-16.png | Bin 0 -> 424 bytes
.../MonoDevelop.Ide.icons.edit-find-next-16.png | Bin 0 -> 869 bytes
.../MonoDevelop.Ide.icons.edit-find-next-24.png | Bin 0 -> 1417 bytes
.../MonoDevelop.Ide.icons.edit-select-all.png | Bin 0 -> 441 bytes
.../MonoDevelop.Ide.icons.edit-select-all_22.png | Bin 0 -> 645 bytes
.../MonoDevelop.Ide.icons.element-class-16.png | Bin 0 -> 690 bytes
.../MonoDevelop.Ide.icons.element-delegate-16.png | Bin 0 -> 587 bytes
...onoDevelop.Ide.icons.element-enumeration-16.png | Bin 0 -> 476 bytes
.../MonoDevelop.Ide.icons.element-event-16.png | Bin 0 -> 519 bytes
...evelop.Ide.icons.element-extensionmethod-16.png | Bin 0 -> 605 bytes
.../MonoDevelop.Ide.icons.element-field-16.png | Bin 0 -> 462 bytes
.../MonoDevelop.Ide.icons.element-interface-16.png | Bin 0 -> 585 bytes
.../MonoDevelop.Ide.icons.element-literal-16.png | Bin 0 -> 686 bytes
.../MonoDevelop.Ide.icons.element-method-16.png | Bin 0 -> 536 bytes
...MonoDevelop.Ide.icons.element-method-new-16.png | Bin 0 -> 620 bytes
.../MonoDevelop.Ide.icons.element-namespace-16.png | Bin 0 -> 606 bytes
.../MonoDevelop.Ide.icons.element-property-16.png | Bin 0 -> 562 bytes
.../MonoDevelop.Ide.icons.element-structure-16.png | Bin 0 -> 667 bytes
.../obj/Debug/MonoDevelop.Ide.icons.empty-16.png | Bin 0 -> 174 bytes
.../MonoDevelop.Ide.icons.empty-category-16.png | Bin 0 -> 996 bytes
.../MonoDevelop.Ide.icons.empty-category-22.png | Bin 0 -> 996 bytes
.../Debug/MonoDevelop.Ide.icons.empty-file-32.png | Bin 0 -> 2991 bytes
.../obj/Debug/MonoDevelop.Ide.icons.error-16.png | Bin 0 -> 658 bytes
.../obj/Debug/MonoDevelop.Ide.icons.errors-pad.png | Bin 0 -> 699 bytes
.../Debug/MonoDevelop.Ide.icons.file-addin-16.png | Bin 0 -> 676 bytes
.../Debug/MonoDevelop.Ide.icons.file-class-32.png | Bin 0 -> 3380 bytes
.../Debug/MonoDevelop.Ide.icons.file-enum-32.png | Bin 0 -> 3318 bytes
.../MonoDevelop.Ide.icons.file-interface-32.png | Bin 0 -> 3311 bytes
.../Debug/MonoDevelop.Ide.icons.file-struct-32.png | Bin 0 -> 3377 bytes
.../Debug/MonoDevelop.Ide.icons.file-xml-16.png | Bin 0 -> 464 bytes
.../Debug/MonoDevelop.Ide.icons.file-xml-32.png | Bin 0 -> 3340 bytes
.../MonoDevelop.Ide.icons.find-in-files-16.png | Bin 0 -> 671 bytes
.../Debug/MonoDevelop.Ide.icons.folder-new-16.png | Bin 0 -> 669 bytes
.../MonoDevelop.Ide.icons.folder-overlay-16.png | Bin 0 -> 306 bytes
.../Debug/MonoDevelop.Ide.icons.formatting-16.png | Bin 0 -> 732 bytes
.../Debug/MonoDevelop.Ide.icons.formatting-24.png | Bin 0 -> 1191 bytes
.../MonoDevelop.Ide.icons.gnome-fs-regular.png | Bin 0 -> 1851 bytes
...MonoDevelop.Ide.icons.goto-next-bookmark-16.png | Bin 0 -> 578 bytes
...MonoDevelop.Ide.icons.goto-next-bookmark-22.png | Bin 0 -> 989 bytes
...MonoDevelop.Ide.icons.goto-prev-bookmark-16.png | Bin 0 -> 601 bytes
...MonoDevelop.Ide.icons.goto-prev-bookmark-22.png | Bin 0 -> 969 bytes
.../obj/Debug/MonoDevelop.Ide.icons.hammer-16.png | Bin 0 -> 575 bytes
...p.Ide.icons.hicolor_status_16x16_pin-active.png | Bin 0 -> 386 bytes
...lop.Ide.icons.hicolor_status_16x16_pin-down.png | Bin 0 -> 486 bytes
...velop.Ide.icons.hicolor_status_16x16_pin-up.png | Bin 0 -> 408 bytes
...MonoDevelop.Ide.icons.keyboard-shortcuts-16.png | Bin 0 -> 461 bytes
...MonoDevelop.Ide.icons.keyboard-shortcuts-22.png | Bin 0 -> 1903 bytes
.../obj/Debug/MonoDevelop.Ide.icons.keyword-16.png | Bin 0 -> 560 bytes
.../obj/Debug/MonoDevelop.Ide.icons.letters-16.png | Bin 0 -> 312 bytes
.../Debug/MonoDevelop.Ide.icons.locale_16x16.png | Bin 0 -> 410 bytes
.../obj/Debug/MonoDevelop.Ide.icons.magnify-16.png | Bin 0 -> 681 bytes
.../MonoDevelop.Ide.icons.markers-rulers-16.png | Bin 0 -> 729 bytes
.../MonoDevelop.Ide.icons.markers-rulers-24.png | Bin 0 -> 652 bytes
.../Debug/MonoDevelop.Ide.icons.misc-files-16.png | Bin 0 -> 446 bytes
.../obj/Debug/MonoDevelop.Ide.icons.monkey-16.png | Bin 0 -> 1677 bytes
.../Debug/MonoDevelop.Ide.icons.mono-powered.png | Bin 0 -> 4051 bytes
.../Debug/MonoDevelop.Ide.icons.monodevelop-16.png | Bin 0 -> 973 bytes
.../Debug/MonoDevelop.Ide.icons.monodevelop-22.png | Bin 0 -> 1415 bytes
.../Debug/MonoDevelop.Ide.icons.monodevelop-32.png | Bin 0 -> 2593 bytes
.../Debug/MonoDevelop.Ide.icons.monodevelop-48.png | Bin 0 -> 4272 bytes
.../MonoDevelop.Ide.icons.navigate-next-16.png | Bin 0 -> 848 bytes
.../MonoDevelop.Ide.icons.navigate-next-24.png | Bin 0 -> 1505 bytes
.../MonoDevelop.Ide.icons.navigate-previous-16.png | Bin 0 -> 862 bytes
.../MonoDevelop.Ide.icons.navigate-previous-24.png | Bin 0 -> 1441 bytes
.../Debug/MonoDevelop.Ide.icons.open-folder-16.png | Bin 0 -> 366 bytes
.../MonoDevelop.Ide.icons.open-project-16.png | Bin 0 -> 739 bytes
...noDevelop.Ide.icons.open-resource-folder-16.png | Bin 0 -> 390 bytes
.../Debug/MonoDevelop.Ide.icons.output-icon-16.png | Bin 0 -> 421 bytes
.../MonoDevelop.Ide.icons.package-x-generic.png | Bin 0 -> 2095 bytes
.../MonoDevelop.Ide.icons.package-x-generic_22.png | Bin 0 -> 695 bytes
.../MonoDevelop.Ide.icons.package-x-generic_32.png | Bin 0 -> 1400 bytes
.../MonoDevelop.Ide.icons.pad-task-list-16.png | Bin 0 -> 605 bytes
.../MonoDevelop.Ide.icons.pad-task-list-24.png | Bin 0 -> 689 bytes
.../obj/Debug/MonoDevelop.Ide.icons.parsing.png | Bin 0 -> 696 bytes
.../obj/Debug/MonoDevelop.Ide.icons.pindown.png | Bin 0 -> 501 bytes
.../obj/Debug/MonoDevelop.Ide.icons.pinup.png | Bin 0 -> 527 bytes
.../obj/Debug/MonoDevelop.Ide.icons.plugin-16.png | Bin 0 -> 654 bytes
.../obj/Debug/MonoDevelop.Ide.icons.plugin-22.png | Bin 0 -> 1014 bytes
.../obj/Debug/MonoDevelop.Ide.icons.plugin-32.png | Bin 0 -> 1510 bytes
.../obj/Debug/MonoDevelop.Ide.icons.project-16.png | Bin 0 -> 1171 bytes
.../obj/Debug/MonoDevelop.Ide.icons.project-32.png | Bin 0 -> 1429 bytes
.../MonoDevelop.Ide.icons.project-console-32.png | Bin 0 -> 1355 bytes
.../Debug/MonoDevelop.Ide.icons.project-gui-32.png | Bin 0 -> 1306 bytes
...MonoDevelop.Ide.icons.project-item-group-16.png | Bin 0 -> 390 bytes
.../MonoDevelop.Ide.icons.project-library-32.png | Bin 0 -> 1392 bytes
.../Debug/MonoDevelop.Ide.icons.project-new-16.png | Bin 0 -> 1318 bytes
.../MonoDevelop.Ide.icons.project-overlay-16.png | Bin 0 -> 311 bytes
.../MonoDevelop.Ide.icons.project-reference-16.png | Bin 0 -> 448 bytes
.../MonoDevelop.Ide.icons.remove-namespace-16.png | Bin 0 -> 741 bytes
.../MonoDevelop.Ide.icons.replace-in-files-16.png | Bin 0 -> 732 bytes
.../MonoDevelop.Ide.icons.resource-file-16.png | Bin 0 -> 371 bytes
.../MonoDevelop.Ide.icons.resource-file-32.png | Bin 0 -> 1472 bytes
.../Debug/MonoDevelop.Ide.icons.save-all-16.png | Bin 0 -> 471 bytes
.../Debug/MonoDevelop.Ide.icons.save-all-24.png | Bin 0 -> 638 bytes
.../MonoDevelop.Ide.icons.sdk-locations-16.png | Bin 0 -> 488 bytes
.../MonoDevelop.Ide.icons.searchbox-clear-16.png | Bin 0 -> 1149 bytes
.../MonoDevelop.Ide.icons.searchbox-search-16.png | Bin 0 -> 2990 bytes
...Develop.Ide.icons.software-update-available.png | Bin 0 -> 750 bytes
.../Debug/MonoDevelop.Ide.icons.solution-16.png | Bin 0 -> 382 bytes
.../Debug/MonoDevelop.Ide.icons.solution-32.png | Bin 0 -> 619 bytes
...Develop.Ide.icons.solution-folder-closed-16.png | Bin 0 -> 1204 bytes
...onoDevelop.Ide.icons.solution-folder-new-16.png | Bin 0 -> 1328 bytes
...noDevelop.Ide.icons.solution-folder-open-16.png | Bin 0 -> 1204 bytes
.../MonoDevelop.Ide.icons.solution-new-16.png | Bin 0 -> 1315 bytes
.../MonoDevelop.Ide.icons.sort-namespace-16.png | Bin 0 -> 734 bytes
.../MonoDevelop.Ide.icons.split-window-16.png | Bin 0 -> 354 bytes
.../obj/Debug/MonoDevelop.Ide.icons.static-16.png | Bin 0 -> 635 bytes
.../Debug/MonoDevelop.Ide.icons.statusBuild-01.png | Bin 0 -> 2833 bytes
.../Debug/MonoDevelop.Ide.icons.statusBuild-02.png | Bin 0 -> 2834 bytes
.../Debug/MonoDevelop.Ide.icons.statusBuild-03.png | Bin 0 -> 2835 bytes
.../Debug/MonoDevelop.Ide.icons.statusBuild-04.png | Bin 0 -> 2820 bytes
.../Debug/MonoDevelop.Ide.icons.statusBuild-05.png | Bin 0 -> 2799 bytes
.../MonoDevelop.Ide.icons.statusConnecting-01.png | Bin 0 -> 2773 bytes
.../MonoDevelop.Ide.icons.statusConnecting-02.png | Bin 0 -> 2831 bytes
.../MonoDevelop.Ide.icons.statusConnecting-03.png | Bin 0 -> 2871 bytes
.../MonoDevelop.Ide.icons.statusConnecting-04.png | Bin 0 -> 2899 bytes
.../MonoDevelop.Ide.icons.statusConnecting-05.png | Bin 0 -> 2961 bytes
.../MonoDevelop.Ide.icons.statusConnecting-06.png | Bin 0 -> 2967 bytes
.../Debug/MonoDevelop.Ide.icons.statusError.png | Bin 0 -> 1042 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-01.png | Bin 0 -> 2798 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-02.png | Bin 0 -> 2922 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-03.png | Bin 0 -> 2818 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-04.png | Bin 0 -> 2822 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-05.png | Bin 0 -> 2819 bytes
.../Debug/MonoDevelop.Ide.icons.statusOpen-06.png | Bin 0 -> 2837 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-01.png | Bin 0 -> 2824 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-02.png | Bin 0 -> 2847 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-03.png | Bin 0 -> 2850 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-04.png | Bin 0 -> 2811 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-05.png | Bin 0 -> 2801 bytes
.../Debug/MonoDevelop.Ide.icons.statusPull-06.png | Bin 0 -> 2783 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-01.png | Bin 0 -> 2831 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-02.png | Bin 0 -> 2867 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-03.png | Bin 0 -> 2868 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-04.png | Bin 0 -> 2789 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-05.png | Bin 0 -> 2770 bytes
.../Debug/MonoDevelop.Ide.icons.statusPush-06.png | Bin 0 -> 2772 bytes
.../MonoDevelop.Ide.icons.statusSearch-01.png | Bin 0 -> 3090 bytes
.../MonoDevelop.Ide.icons.statusSearch-02.png | Bin 0 -> 3106 bytes
.../MonoDevelop.Ide.icons.statusSearch-03.png | Bin 0 -> 3100 bytes
.../MonoDevelop.Ide.icons.statusSearch-04.png | Bin 0 -> 3088 bytes
.../Debug/MonoDevelop.Ide.icons.statusSteady.png | Bin 0 -> 3053 bytes
.../Debug/MonoDevelop.Ide.icons.statusSuccess.png | Bin 0 -> 1116 bytes
.../Debug/MonoDevelop.Ide.icons.statusWarning.png | Bin 0 -> 1093 bytes
.../obj/Debug/MonoDevelop.Ide.icons.stop-16.png | Bin 0 -> 589 bytes
...onoDevelop.Ide.icons.syntax-highlighting-16.png | Bin 0 -> 573 bytes
...onoDevelop.Ide.icons.syntax-highlighting-24.png | Bin 0 -> 830 bytes
.../MonoDevelop.Ide.icons.system-file-manager.png | Bin 0 -> 378 bytes
...onoDevelop.Ide.icons.system-software-update.png | Bin 0 -> 3840 bytes
...Develop.Ide.icons.system-software-update_22.png | Bin 0 -> 1464 bytes
.../Debug/MonoDevelop.Ide.icons.tabbar-next.png | Bin 0 -> 2847 bytes
.../Debug/MonoDevelop.Ide.icons.tabbar-popdown.png | Bin 0 -> 3031 bytes
.../Debug/MonoDevelop.Ide.icons.tabbar-prev.png | Bin 0 -> 2856 bytes
.../Debug/MonoDevelop.Ide.icons.template-16.png | Bin 0 -> 406 bytes
...oDevelop.Ide.icons.template-surroundwith-16.png | Bin 0 -> 406 bytes
.../Debug/MonoDevelop.Ide.icons.text-editor-16.png | Bin 0 -> 574 bytes
.../Debug/MonoDevelop.Ide.icons.text-editor-22.png | Bin 0 -> 995 bytes
...noDevelop.Ide.icons.text-editor-behavior-16.png | Bin 0 -> 750 bytes
...noDevelop.Ide.icons.text-editor-behavior-24.png | Bin 0 -> 1172 bytes
.../Debug/MonoDevelop.Ide.icons.text-file-16.png | Bin 0 -> 333 bytes
.../Debug/MonoDevelop.Ide.icons.text-file-32.png | Bin 0 -> 2991 bytes
.../MonoDevelop.Ide.icons.text-quickfix-16.png | Bin 0 -> 739 bytes
.../MonoDevelop.Ide.icons.tip-of-the-day-16.png | Bin 0 -> 673 bytes
.../MonoDevelop.Ide.icons.toggle-bookmark-16.png | Bin 0 -> 608 bytes
.../MonoDevelop.Ide.icons.toggle-bookmark-22.png | Bin 0 -> 999 bytes
.../MonoDevelop.Ide.icons.toolbar-pauseButton.png | Bin 0 -> 259 bytes
.../MonoDevelop.Ide.icons.toolbar-runButton.png | Bin 0 -> 426 bytes
.../MonoDevelop.Ide.icons.toolbar-skipButton.png | Bin 0 -> 483 bytes
.../MonoDevelop.Ide.icons.toolbar-stepInButton.png | Bin 0 -> 353 bytes
...MonoDevelop.Ide.icons.toolbar-stepOutButton.png | Bin 0 -> 346 bytes
...noDevelop.Ide.icons.tools-external-tools-16.png | Bin 0 -> 907 bytes
...noDevelop.Ide.icons.tools-external-tools-24.png | Bin 0 -> 1057 bytes
...onoDevelop.Ide.icons.tree-popup-button-down.png | Bin 0 -> 1582 bytes
...noDevelop.Ide.icons.tree-popup-button-hover.png | Bin 0 -> 1565 bytes
.../MonoDevelop.Ide.icons.tree-popup-button.png | Bin 0 -> 1549 bytes
.../obj/Debug/MonoDevelop.Ide.icons.uncomment.png | Bin 0 -> 1422 bytes
.../Debug/MonoDevelop.Ide.icons.user-package.png | Bin 0 -> 964 bytes
.../Debug/MonoDevelop.Ide.icons.variable-16.png | Bin 0 -> 626 bytes
.../MonoDevelop.Ide.icons.view-message-log-16.png | Bin 0 -> 510 bytes
...de.icons.visibility-InternalAndProtected-16.png | Bin 0 -> 384 bytes
...Ide.icons.visibility-ProtectedOrInternal-16.png | Bin 0 -> 426 bytes
...onoDevelop.Ide.icons.visibility-internal-16.png | Bin 0 -> 426 bytes
...MonoDevelop.Ide.icons.visibility-private-16.png | Bin 0 -> 387 bytes
...noDevelop.Ide.icons.visibility-protected-16.png | Bin 0 -> 446 bytes
.../Debug/MonoDevelop.Ide.icons.visual-studio.png | Bin 0 -> 825 bytes
.../MonoDevelop.Ide.icons.visual-style-16.png | Bin 0 -> 783 bytes
.../MonoDevelop.Ide.icons.visual-style-24.png | Bin 0 -> 1471 bytes
.../obj/Debug/MonoDevelop.Ide.icons.warning-16.png | Bin 0 -> 613 bytes
.../MonoDevelop.Ide.icons.warning-overlay.png | Bin 0 -> 422 bytes
.../Debug/MonoDevelop.Ide.icons.web-overlay-16.png | Bin 0 -> 563 bytes
.../Debug/MonoDevelop.Ide.icons.web-overlay-32.png | Bin 0 -> 1623 bytes
.../Debug/MonoDevelop.Ide.icons.web-search-16.png | Bin 0 -> 849 bytes
.../Debug/MonoDevelop.Ide.icons.workspace-16.png | Bin 0 -> 617 bytes
.../Debug/MonoDevelop.Ide.icons.workspace-32.png | Bin 0 -> 3890 bytes
...noDevelop.Ide.options.KeyBindingSchemeEmacs.xml | 41 +
...op.Ide.options.KeyBindingSchemeMonoDevelop1.xml | 7 +
...op.Ide.options.KeyBindingSchemeMonoDevelop2.xml | 28 +
...op.Ide.options.KeyBindingSchemeVisualStudio.xml | 58 +
...MonoDevelop.Ide.templates.AppConfigFile.xft.xml | 23 +
.../MonoDevelop.Ide.templates.BlankCombine.xpt.xml | 18 +
.../MonoDevelop.Ide.templates.EmptyClass.xft.xml | 38 +
.../MonoDevelop.Ide.templates.EmptyEnum.xft.xml | 37 +
...MonoDevelop.Ide.templates.EmptyHTMLFile.xft.xml | 26 +
...onoDevelop.Ide.templates.EmptyInterface.xft.xml | 37 +
...Develop.Ide.templates.EmptyResourceFile.xft.xml | 26 +
.../MonoDevelop.Ide.templates.EmptyStruct.xft.xml | 37 +
...MonoDevelop.Ide.templates.EmptyTextFile.xft.xml | 18 +
.../MonoDevelop.Ide.templates.EmptyXMLFile.xft.xml | 21 +
...onoDevelop.Ide.templates.GenericProject.xpt.xml | 17 +
.../MonoDevelop.Ide.templates.Workspace.xpt.xml | 16 +
.../options/KeyBindingSchemeVisualStudio.xml | 2 +-
.../templates/AppConfigFile.xft.xml | 45 +-
.../MonoDevelop.Ide/templates/EmptyClass.xft.xml | 1 +
.../MonoDevelop.Ide/templates/EmptyEnum.xft.xml | 1 +
.../templates/EmptyHTMLFile.xft.xml | 3 +-
.../templates/EmptyInterface.xft.xml | 1 +
.../templates/EmptyResourceFile.xft.xml | 8 +-
.../MonoDevelop.Ide/templates/EmptyStruct.xft.xml | 1 +
.../templates/EmptyTextFile.xft.xml | 3 +-
.../MonoDevelop.Ide/templates/EmptyXMLFile.xft.xml | 3 +-
.../Makefile.in | 9 +-
.../BuildEngine.v4.0.cs | 2 +-
.../ProjectBuilder.v4.0.cs | 6 +-
...ts.MSBuild.v2.0.csproj.FilesWrittenAbsolute.txt | 5 +
...ts.MSBuild.v3.5.csproj.FilesWrittenAbsolute.txt | 5 +
...Formats.MSBuild.csproj.FilesWrittenAbsolute.txt | 5 +
...ts.MSBuild.v4.0.csproj.FilesWrittenAbsolute.txt | 5 +
src/core/MonoDevelop.Startup/Makefile.in | 9 +-
.../MonoDevelop.Startup/MonoDevelop.Startup.csproj | 7 +-
.../MonoDevelop.Startup/MonoDevelopMain.cs | 1 +
...Develop.Startup.csproj.FilesWrittenAbsolute.txt | 6 +
src/tools/Makefile.in | 62 +-
src/tools/SharpCoco/Makefile.in | 11 +-
src/tools/mdhost/Makefile.in | 9 +-
.../Debug/mdhost.csproj.FilesWrittenAbsolute.txt | 5 +
src/tools/mdmonitor/Makefile.in | 9 +-
...Mono.Instrumentation.Monitor.gtk-gui.gui.stetic | 1003 ++
.../mdmonitor.csproj.FilesWrittenAbsolute.txt | 5 +
src/tools/mdtool/Makefile.in | 9 +-
src/tools/mdtool/app.config | 3 +
.../Debug/mdtool.csproj.FilesWrittenAbsolute.txt | 5 +
src/tools/mdtool/src/mdtool.cs | 8 +-
tests/MacPlatform.Tests/MacPlatform.Tests.csproj | 14 +-
tests/MacPlatform.Tests/Makefile.in | 9 +-
tests/Makefile.am | 5 +
tests/Makefile.in | 69 +-
tests/UnitTests/Makefile.in | 9 +-
.../CompletionTests.cs | 237 +-
.../ResolveNamespaceTests.cs | 1 +
.../AutomaticBracketInsertionTests.cs | 330 +
.../CSharpTextEditorIndentationTests.cs | 13 +
.../NamedArgumentCompletionTests.cs | 225 +
.../MemberCollectorTests.cs | 6 +-
.../SearchCollectorTests.cs | 390 +-
.../MonoDevelop.Projects/FileServiceTests.cs | 12 +
.../MonoDevelop.Projects/SolutionTests.cs | 15 +-
.../MonoDevelop.Projects/TestProjectsChecks.cs | 2 +
.../HtmlParsingTests.cs | 4 +
.../MonoDevelop.Xml.StateEngine/ParsingTests.cs | 3 +-
tests/UnitTests/UnitTests.csproj | 49 +-
.../UnitTests.csproj.FilesWrittenAbsolute.txt | 4 +
tests/UserInterfaceTests/Makefile.in | 9 +-
.../csharp-console-mdp/csharp-console-mdp.mdp | 2 +-
.../generated-console-project/TestProject.csproj | 2 +-
.../generated-console-project/TestProject.mdp | 6 +-
.../console-project/console-project.mdp | 2 +-
.../nested-solution1/library1/library1.mdp | 2 +-
.../nested-solution1/library2/library2.mdp | 2 +-
.../console-project2/console-project2.mdp | 2 +-
.../nested-solution3/library3/library3.mdp | 2 +-
.../nested-solution3/library4/library4.mdp | 2 +-
theme-icons/Makefile.in | 9 +-
vcrevision | 2 +-
3817 files changed, 299584 insertions(+), 66571 deletions(-)
diff --git a/Main.sln b/Main.sln
index f030e3a..a9663ce 100644
--- a/Main.sln
+++ b/Main.sln
@@ -1,6 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{9D360D43-0C05-49D6-84DB-4E7AB2F38F82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Core", "src\core\MonoDevelop.Core\MonoDevelop.Core.csproj", "{7525BB88-6142-4A26-93B9-A30C6983390A}"
@@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Ide", "src\core
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Startup", "src\core\MonoDevelop.Startup\MonoDevelop.Startup.csproj", "{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging", "src\core\Mono.Debugging\Mono.Debugging.csproj", "{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging", "external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj", "{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.TextEditor", "src\core\Mono.Texteditor\Mono.TextEditor.csproj", "{A2329308-3751-4DBD-9A75-5F7B8B024625}"
EndProject
@@ -39,6 +39,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.VersionControl.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.VersionControl.Subversion.Unix", "src\addins\VersionControl\MonoDevelop.VersionControl.Subversion.Unix\MonoDevelop.VersionControl.Subversion.Unix.csproj", "{E2CAB397-D00C-4D11-8F5F-E3A052092969}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.VersionControl.Subversion.Tests", "src\addins\VersionControl\MonoDevelop.VersionControl.Subversion.Tests\MonoDevelop.VersionControl.Subversion.Tests.csproj", "{ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.VersionControl.Git.Tests", "src\addins\VersionControl\MonoDevelop.VersionControl.Git.Tests\MonoDevelop.VersionControl.Git.Tests.csproj", "{F3AC14B0-3D1F-4B9B-95E8-384056060F33}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonoDevelop.GtkCore", "MonoDevelop.GtkCore", "{02280E65-C507-4931-AE68-AA2E89E15EEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.GtkCore", "src\addins\MonoDevelop.GtkCore\MonoDevelop.GtkCore.csproj", "{7FCDB0D9-AA7D-44E4-BE74-55312B432389}"
@@ -139,7 +143,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.Soft",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.Soft.AspNet", "src\addins\MonoDevelop.Debugger.Soft\MonoDevelop.Debugger.Soft.AspNet\MonoDevelop.Debugger.Soft.AspNet.csproj", "{F5390DA4-08B7-47E3-B6F3-D50683316AB4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Soft", "src\addins\MonoDevelop.Debugger.Soft\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj", "{DE40756E-57F6-4AF2-B155-55E3A88CCED8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Soft", "external\debugger-libs\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj", "{DE40756E-57F6-4AF2-B155-55E3A88CCED8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.HexEditor", "src\addins\MonoDevelop.HexEditor\MonoDevelop.HexEditor.csproj", "{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}"
EndProject
@@ -153,7 +157,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.Tests.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contrib", "contrib", "{F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugger.Soft", "contrib\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj", "{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugger.Soft", "external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj", "{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Decompiler", "contrib\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj", "{984CC812-9470-4A13-AFF9-CC44068D666C}"
EndProject
@@ -167,6 +171,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt", "external\xwt\Xwt\Xwt
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Gtk", "external\xwt\Xwt.Gtk\Xwt.Gtk.csproj", "{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Mac", "external\xwt\Xwt.Mac\Xwt.Mac.csproj", "{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.WPF", "external\xwt\Xwt.WPF\Xwt.WPF.csproj", "{C93D746E-1586-4D4F-B411-BF5A966E6A08}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NGit", "NGit", "{08AC1C52-707A-46D1-AD72-36D747991592}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NGit", "external\ngit\NGit\NGit.csproj", "{E3BFF8B4-189C-496A-A817-7E8B31E22B91}"
@@ -201,6 +209,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory", "e
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.CSharp", "external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj", "{53DCA265-3C3C-42F9-B647-F72BA678122B}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.IKVM", "external\nrefactory\ICSharpCode.NRefactory.IKVM\ICSharpCode.NRefactory.IKVM.csproj", "{A727169F-D94F-443F-B305-B057D7F3B420}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Cecil", "external\nrefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj", "{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}"
+EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "po", "po\po.mdproj", "{AC7D119C-980B-4712-8811-5368C14412D7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{5D3F7E65-E55B-45CA-A83B-D1E10040281E}"
@@ -212,6 +224,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mdmonitor", "src\tools\mdmonitor\mdmonitor.csproj", "{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}"
+ ProjectSection(MonoDevelopProperties) = preProject
+ BaseDirectory = tests
+ EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "tests\UnitTests\UnitTests.csproj", "{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}"
EndProject
@@ -226,679 +241,638 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- DebugWin32|x86 = DebugWin32|x86
DebugMac|Any CPU = DebugMac|Any CPU
+ DebugWin32|Any CPU = DebugWin32|Any CPU
+ Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01206AB0-8871-42E7-9355-52E4CF1B7B9A}.Debug|Any CPU.ActiveCfg = Debug|x86
{01206AB0-8871-42E7-9355-52E4CF1B7B9A}.Debug|Any CPU.Build.0 = Debug|x86
{01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugMac|Any CPU.Build.0 = Debug|x86
- {01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugWin32|x86.ActiveCfg = Debug|x86
- {01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugWin32|x86.Build.0 = Debug|x86
+ {01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {01206AB0-8871-42E7-9355-52E4CF1B7B9A}.DebugWin32|Any CPU.Build.0 = Debug|x86
{01206AB0-8871-42E7-9355-52E4CF1B7B9A}.Release|Any CPU.ActiveCfg = Release|x86
- {01206AB0-8871-42E7-9355-52E4CF1B7B9A}.Release|Any CPU.Build.0 = Release|x86
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0413DB7D-8B35-423F-9752-D75C9225E7DE}.Release|Any CPU.Build.0 = Release|Any CPU
{05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {05EDFE55-C8D1-47E4-BB61-0BC809CD82E2}.Release|Any CPU.Build.0 = Release|Any CPU
{07CC7654-27D6-421D-A64C-0FFA40456FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07CC7654-27D6-421D-A64C-0FFA40456FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {07CC7654-27D6-421D-A64C-0FFA40456FA2}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{07CC7654-27D6-421D-A64C-0FFA40456FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {07CC7654-27D6-421D-A64C-0FFA40456FA2}.Release|Any CPU.Build.0 = Release|Any CPU
{07F55155-51A8-4072-9F80-FA473666F086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07F55155-51A8-4072-9F80-FA473666F086}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {07F55155-51A8-4072-9F80-FA473666F086}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {07F55155-51A8-4072-9F80-FA473666F086}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{07F55155-51A8-4072-9F80-FA473666F086}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {07F55155-51A8-4072-9F80-FA473666F086}.Release|Any CPU.Build.0 = Release|Any CPU
{0AF16AF1-0876-413E-9803-08BD33C19E00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AF16AF1-0876-413E-9803-08BD33C19E00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AF16AF1-0876-413E-9803-08BD33C19E00}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{0AF16AF1-0876-413E-9803-08BD33C19E00}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0AF16AF1-0876-413E-9803-08BD33C19E00}.Release|Any CPU.Build.0 = Release|Any CPU
{0EA3AD14-404A-4D3F-979B-F087E2E70C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EA3AD14-404A-4D3F-979B-F087E2E70C82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0EA3AD14-404A-4D3F-979B-F087E2E70C82}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{0EA3AD14-404A-4D3F-979B-F087E2E70C82}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0EA3AD14-404A-4D3F-979B-F087E2E70C82}.Release|Any CPU.Build.0 = Release|Any CPU
{0F57E572-2359-4BAF-B302-6478C2E42FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F57E572-2359-4BAF-B302-6478C2E42FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0F57E572-2359-4BAF-B302-6478C2E42FA2}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{0F57E572-2359-4BAF-B302-6478C2E42FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0F57E572-2359-4BAF-B302-6478C2E42FA2}.Release|Any CPU.Build.0 = Release|Any CPU
{100568FC-F4E8-439B-94AD-41D11724E45B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{100568FC-F4E8-439B-94AD-41D11724E45B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{100568FC-F4E8-439B-94AD-41D11724E45B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{100568FC-F4E8-439B-94AD-41D11724E45B}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {100568FC-F4E8-439B-94AD-41D11724E45B}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {100568FC-F4E8-439B-94AD-41D11724E45B}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {100568FC-F4E8-439B-94AD-41D11724E45B}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {100568FC-F4E8-439B-94AD-41D11724E45B}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{100568FC-F4E8-439B-94AD-41D11724E45B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {100568FC-F4E8-439B-94AD-41D11724E45B}.Release|Any CPU.Build.0 = Release|Any CPU
{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1497D0A8-AFF1-4938-BC22-BE79B358BA5B}.Release|Any CPU.Build.0 = Release|Any CPU
{174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {174E6044-DD3A-49AB-9A5C-2A1F341B7B4F}.Release|Any CPU.Build.0 = Release|Any CPU
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}.Release|Any CPU.Build.0 = Release|Any CPU
{19DE0F35-D204-4FD8-A553-A19ECE05E24D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19DE0F35-D204-4FD8-A553-A19ECE05E24D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {19DE0F35-D204-4FD8-A553-A19ECE05E24D}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{19DE0F35-D204-4FD8-A553-A19ECE05E24D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {19DE0F35-D204-4FD8-A553-A19ECE05E24D}.Release|Any CPU.Build.0 = Release|Any CPU
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1CF94D07-5480-4D10-A3CD-2EBD5E87B02E}.Release|Any CPU.Build.0 = Release|Any CPU
{1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F29B0A7-458F-4093-85DE-52E36EA2FC0E}.Release|Any CPU.Build.0 = Release|Any CPU
{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}.Release|Any CPU.Build.0 = Release|Any CPU
{27096E7F-C91C-4AC6-B289-6897A701DF21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27096E7F-C91C-4AC6-B289-6897A701DF21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{27096E7F-C91C-4AC6-B289-6897A701DF21}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {27096E7F-C91C-4AC6-B289-6897A701DF21}.Release|Any CPU.Build.0 = Release|Any CPU
{2A00A871-C641-4116-ADFD-29B7799952B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A00A871-C641-4116-ADFD-29B7799952B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A00A871-C641-4116-ADFD-29B7799952B4}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{2A00A871-C641-4116-ADFD-29B7799952B4}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {2A00A871-C641-4116-ADFD-29B7799952B4}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {2A00A871-C641-4116-ADFD-29B7799952B4}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {2A00A871-C641-4116-ADFD-29B7799952B4}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {2A00A871-C641-4116-ADFD-29B7799952B4}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{2A00A871-C641-4116-ADFD-29B7799952B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2A00A871-C641-4116-ADFD-29B7799952B4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|Any CPU.Build.0 = Release|Any CPU
{2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.Build.0 = Release|Any CPU
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Release|Any CPU.Build.0 = Release|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {376889B5-6504-46A1-9D18-A9E4B4A50F49}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {376889B5-6504-46A1-9D18-A9E4B4A50F49}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {376889B5-6504-46A1-9D18-A9E4B4A50F49}.Release|Any CPU.Build.0 = Release|Any CPU
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Release|Any CPU.Build.0 = Release|Any CPU
{3D363F0C-5731-42AA-9022-B7F4657F298A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D363F0C-5731-42AA-9022-B7F4657F298A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {3D363F0C-5731-42AA-9022-B7F4657F298A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{3D363F0C-5731-42AA-9022-B7F4657F298A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3D363F0C-5731-42AA-9022-B7F4657F298A}.Release|Any CPU.Build.0 = Release|Any CPU
{40A31ADE-6F26-4D99-A3C7-87BB8236151D}.Debug|Any CPU.ActiveCfg = Debug|x86
{40A31ADE-6F26-4D99-A3C7-87BB8236151D}.Debug|Any CPU.Build.0 = Debug|x86
{40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugMac|Any CPU.Build.0 = Debug|x86
- {40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugWin32|x86.ActiveCfg = Debug|x86
- {40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugWin32|x86.Build.0 = Debug|x86
+ {40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {40A31ADE-6F26-4D99-A3C7-87BB8236151D}.DebugWin32|Any CPU.Build.0 = Debug|x86
{40A31ADE-6F26-4D99-A3C7-87BB8236151D}.Release|Any CPU.ActiveCfg = Release|x86
- {40A31ADE-6F26-4D99-A3C7-87BB8236151D}.Release|Any CPU.Build.0 = Release|x86
{42D1CE65-A14B-4218-B787-58AD7AA68513}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42D1CE65-A14B-4218-B787-58AD7AA68513}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {42D1CE65-A14B-4218-B787-58AD7AA68513}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{42D1CE65-A14B-4218-B787-58AD7AA68513}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {42D1CE65-A14B-4218-B787-58AD7AA68513}.Release|Any CPU.Build.0 = Release|Any CPU
{459868D2-54DC-415B-B1AB-BE39BDBD352F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{459868D2-54DC-415B-B1AB-BE39BDBD352F}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {459868D2-54DC-415B-B1AB-BE39BDBD352F}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {459868D2-54DC-415B-B1AB-BE39BDBD352F}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {459868D2-54DC-415B-B1AB-BE39BDBD352F}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {459868D2-54DC-415B-B1AB-BE39BDBD352F}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{459868D2-54DC-415B-B1AB-BE39BDBD352F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {459868D2-54DC-415B-B1AB-BE39BDBD352F}.Release|Any CPU.Build.0 = Release|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|Any CPU.Build.0 = Release|Any CPU
{50D6768C-C072-4E79-AFC5-C1C40767EF45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50D6768C-C072-4E79-AFC5-C1C40767EF45}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{50D6768C-C072-4E79-AFC5-C1C40767EF45}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {50D6768C-C072-4E79-AFC5-C1C40767EF45}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {50D6768C-C072-4E79-AFC5-C1C40767EF45}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{50D6768C-C072-4E79-AFC5-C1C40767EF45}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {50D6768C-C072-4E79-AFC5-C1C40767EF45}.Release|Any CPU.Build.0 = Release|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.Build.0 = Release|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugMac|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugMac|Any CPU.Build.0 = net_4_0_Debug|Any CPU
- {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugWin32|x86.ActiveCfg = net_4_0_Debug|Any CPU
- {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugWin32|x86.Build.0 = net_4_0_Debug|Any CPU
+ {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugWin32|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.DebugWin32|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
- {63E6915C-7EA4-4D76-AB28-0D7191EEA626}.Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{72944A6C-45FF-4EF8-B349-8C9CABF519D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72944A6C-45FF-4EF8-B349-8C9CABF519D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {72944A6C-45FF-4EF8-B349-8C9CABF519D4}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{72944A6C-45FF-4EF8-B349-8C9CABF519D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {72944A6C-45FF-4EF8-B349-8C9CABF519D4}.Release|Any CPU.Build.0 = Release|Any CPU
{7525BB88-6142-4A26-93B9-A30C6983390A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7525BB88-6142-4A26-93B9-A30C6983390A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7525BB88-6142-4A26-93B9-A30C6983390A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{7525BB88-6142-4A26-93B9-A30C6983390A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {7525BB88-6142-4A26-93B9-A30C6983390A}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {7525BB88-6142-4A26-93B9-A30C6983390A}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {7525BB88-6142-4A26-93B9-A30C6983390A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {7525BB88-6142-4A26-93B9-A30C6983390A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{7525BB88-6142-4A26-93B9-A30C6983390A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7525BB88-6142-4A26-93B9-A30C6983390A}.Release|Any CPU.Build.0 = Release|Any CPU
{75B9F2DF-4DEA-4007-965D-339563735EBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75B9F2DF-4DEA-4007-965D-339563735EBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {75B9F2DF-4DEA-4007-965D-339563735EBE}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{75B9F2DF-4DEA-4007-965D-339563735EBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {75B9F2DF-4DEA-4007-965D-339563735EBE}.Release|Any CPU.Build.0 = Release|Any CPU
{7926DB5B-96A7-47A7-9870-DB42FA5C3548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7926DB5B-96A7-47A7-9870-DB42FA5C3548}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {7926DB5B-96A7-47A7-9870-DB42FA5C3548}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{7926DB5B-96A7-47A7-9870-DB42FA5C3548}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7926DB5B-96A7-47A7-9870-DB42FA5C3548}.Release|Any CPU.Build.0 = Release|Any CPU
{7B57882B-AD46-469B-84E7-06DF98D11468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B57882B-AD46-469B-84E7-06DF98D11468}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B57882B-AD46-469B-84E7-06DF98D11468}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{7B57882B-AD46-469B-84E7-06DF98D11468}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {7B57882B-AD46-469B-84E7-06DF98D11468}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {7B57882B-AD46-469B-84E7-06DF98D11468}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{7B57882B-AD46-469B-84E7-06DF98D11468}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7B57882B-AD46-469B-84E7-06DF98D11468}.Release|Any CPU.Build.0 = Release|Any CPU
{7FCDB0D9-AA7D-44E4-BE74-55312B432389}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FCDB0D9-AA7D-44E4-BE74-55312B432389}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {7FCDB0D9-AA7D-44E4-BE74-55312B432389}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{7FCDB0D9-AA7D-44E4-BE74-55312B432389}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FCDB0D9-AA7D-44E4-BE74-55312B432389}.Release|Any CPU.Build.0 = Release|Any CPU
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {849AE05D-0058-4A8C-A0E8-77DC6BB12E52}.Release|Any CPU.Build.0 = Release|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugMac|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugMac|Any CPU.Build.0 = net_4_0_Debug|Any CPU
- {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugWin32|x86.ActiveCfg = net_4_0_Debug|Any CPU
- {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugWin32|x86.Build.0 = net_4_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugWin32|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.DebugWin32|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
- {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {86DFC74A-B0B6-4C73-9E05-9098DA8FA5F1}.Release|Any CPU.Build.0 = Release|Any CPU
{875D389F-48D1-4D46-BFC6-998837DD6AE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{875D389F-48D1-4D46-BFC6-998837DD6AE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {875D389F-48D1-4D46-BFC6-998837DD6AE0}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{875D389F-48D1-4D46-BFC6-998837DD6AE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {875D389F-48D1-4D46-BFC6-998837DD6AE0}.Release|Any CPU.Build.0 = Release|Any CPU
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.Debug|Any CPU.ActiveCfg = Debug|x86
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.Debug|Any CPU.Build.0 = Debug|x86
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugMac|Any CPU.Build.0 = Debug|x86
- {8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugWin32|x86.ActiveCfg = Debug|x86
- {8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugWin32|x86.Build.0 = Debug|x86
+ {8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.DebugWin32|Any CPU.Build.0 = Debug|x86
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.Release|Any CPU.ActiveCfg = Release|x86
- {8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6}.Release|Any CPU.Build.0 = Release|x86
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8CCA39DD-8412-4547-BE7F-0C3D3ACC6FAC}.Release|Any CPU.Build.0 = Release|Any CPU
{8E47B77A-A649-494C-9BF2-B845E39CADE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E47B77A-A649-494C-9BF2-B845E39CADE9}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {8E47B77A-A649-494C-9BF2-B845E39CADE9}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {8E47B77A-A649-494C-9BF2-B845E39CADE9}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {8E47B77A-A649-494C-9BF2-B845E39CADE9}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E47B77A-A649-494C-9BF2-B845E39CADE9}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{8E47B77A-A649-494C-9BF2-B845E39CADE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8EE34CBC-5D7C-4BB3-8B19-26D5522770F6}.Release|Any CPU.Build.0 = Release|Any CPU
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.Build.0 = Release|Any CPU
{91DD5A2D-9FE3-4C3C-9253-876141874DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91DD5A2D-9FE3-4C3C-9253-876141874DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {91DD5A2D-9FE3-4C3C-9253-876141874DAD}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{91DD5A2D-9FE3-4C3C-9253-876141874DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {91DD5A2D-9FE3-4C3C-9253-876141874DAD}.Release|Any CPU.Build.0 = Release|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Any CPU.Build.0 = Release|Any CPU
{961B9266-C44A-42B6-BA3D-3FB229C9C417}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{961B9266-C44A-42B6-BA3D-3FB229C9C417}.Debug|Any CPU.Build.0 = Debug|Any CPU
{961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {961B9266-C44A-42B6-BA3D-3FB229C9C417}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{961B9266-C44A-42B6-BA3D-3FB229C9C417}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {961B9266-C44A-42B6-BA3D-3FB229C9C417}.Release|Any CPU.Build.0 = Release|Any CPU
{984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{984CC812-9470-4A13-AFF9-CC44068D666C}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{984CC812-9470-4A13-AFF9-CC44068D666C}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {984CC812-9470-4A13-AFF9-CC44068D666C}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {984CC812-9470-4A13-AFF9-CC44068D666C}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {984CC812-9470-4A13-AFF9-CC44068D666C}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {984CC812-9470-4A13-AFF9-CC44068D666C}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.Build.0 = Release|Any CPU
{9A415695-CF80-4845-AA80-0DA26CF1E256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A415695-CF80-4845-AA80-0DA26CF1E256}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A415695-CF80-4845-AA80-0DA26CF1E256}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{9A415695-CF80-4845-AA80-0DA26CF1E256}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {9A415695-CF80-4845-AA80-0DA26CF1E256}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {9A415695-CF80-4845-AA80-0DA26CF1E256}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{9A415695-CF80-4845-AA80-0DA26CF1E256}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9A415695-CF80-4845-AA80-0DA26CF1E256}.Release|Any CPU.Build.0 = Release|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {9BC670A8-1851-40EC-9685-279F4C98433D}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {9BC670A8-1851-40EC-9685-279F4C98433D}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {9BC670A8-1851-40EC-9685-279F4C98433D}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BC670A8-1851-40EC-9685-279F4C98433D}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9BC670A8-1851-40EC-9685-279F4C98433D}.Release|Any CPU.Build.0 = Release|Any CPU
{9E4BA410-8338-42EC-AF9C-422C35ECED81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E4BA410-8338-42EC-AF9C-422C35ECED81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {9E4BA410-8338-42EC-AF9C-422C35ECED81}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{9E4BA410-8338-42EC-AF9C-422C35ECED81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9E4BA410-8338-42EC-AF9C-422C35ECED81}.Release|Any CPU.Build.0 = Release|Any CPU
{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A19E6F3F-A25B-4B01-8922-CF0CC35C781D}.Release|Any CPU.Build.0 = Release|Any CPU
{A2329308-3751-4DBD-9A75-5F7B8B024625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2329308-3751-4DBD-9A75-5F7B8B024625}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A2329308-3751-4DBD-9A75-5F7B8B024625}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A2329308-3751-4DBD-9A75-5F7B8B024625}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A2329308-3751-4DBD-9A75-5F7B8B024625}.Release|Any CPU.Build.0 = Release|Any CPU
{A2364D6A-00EF-417C-80A6-815726C70032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2364D6A-00EF-417C-80A6-815726C70032}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2364D6A-00EF-417C-80A6-815726C70032}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A2364D6A-00EF-417C-80A6-815726C70032}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A2364D6A-00EF-417C-80A6-815726C70032}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A2364D6A-00EF-417C-80A6-815726C70032}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A2364D6A-00EF-417C-80A6-815726C70032}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A2364D6A-00EF-417C-80A6-815726C70032}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A2364D6A-00EF-417C-80A6-815726C70032}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A2364D6A-00EF-417C-80A6-815726C70032}.Release|Any CPU.Build.0 = Release|Any CPU
{A437F1A3-78DF-4F00-8053-D32A8B1EB679}.Debug|Any CPU.ActiveCfg = Debug|x86
{A437F1A3-78DF-4F00-8053-D32A8B1EB679}.Debug|Any CPU.Build.0 = Debug|x86
{A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugMac|Any CPU.Build.0 = Debug|x86
- {A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|x86.ActiveCfg = Debug|x86
- {A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|x86.Build.0 = Debug|x86
+ {A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {A437F1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|Any CPU.Build.0 = Debug|x86
{A437F1A3-78DF-4F00-8053-D32A8B1EB679}.Release|Any CPU.ActiveCfg = Release|x86
- {A437F1A3-78DF-4F00-8053-D32A8B1EB679}.Release|Any CPU.Build.0 = Release|x86
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|Any CPU.Build.0 = Release|Any CPU
{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}.Release|Any CPU.Build.0 = Release|Any CPU
{A85C9721-C054-4BD8-A1F3-0227615F0A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A85C9721-C054-4BD8-A1F3-0227615F0A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A85C9721-C054-4BD8-A1F3-0227615F0A36}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A85C9721-C054-4BD8-A1F3-0227615F0A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A85C9721-C054-4BD8-A1F3-0227615F0A36}.Release|Any CPU.Build.0 = Release|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}.Release|Any CPU.Build.0 = Release|Any CPU
{AC7D119C-980B-4712-8811-5368C14412D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC7D119C-980B-4712-8811-5368C14412D7}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {AC7D119C-980B-4712-8811-5368C14412D7}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {AC7D119C-980B-4712-8811-5368C14412D7}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {AC7D119C-980B-4712-8811-5368C14412D7}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {AC7D119C-980B-4712-8811-5368C14412D7}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{AC7D119C-980B-4712-8811-5368C14412D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {ADDC9D20-83C5-4245-9B46-2C5F6642CFBC}.Release|Any CPU.Build.0 = Release|Any CPU
{AE84B4A7-E6B1-4565-8904-16284DCE41B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE84B4A7-E6B1-4565-8904-16284DCE41B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE84B4A7-E6B1-4565-8904-16284DCE41B6}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {AE84B4A7-E6B1-4565-8904-16284DCE41B6}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {AE84B4A7-E6B1-4565-8904-16284DCE41B6}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{AE84B4A7-E6B1-4565-8904-16284DCE41B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AE84B4A7-E6B1-4565-8904-16284DCE41B6}.Release|Any CPU.Build.0 = Release|Any CPU
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.Debug|Any CPU.ActiveCfg = Debug|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.Debug|Any CPU.Build.0 = Debug|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugMac|Any CPU.Build.0 = Debug|x86
- {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|x86.ActiveCfg = Debug|x86
- {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|x86.Build.0 = Debug|x86
+ {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.DebugWin32|Any CPU.Build.0 = Debug|x86
{B257A1A3-78DF-4F00-8053-D32A8B1EB679}.Release|Any CPU.ActiveCfg = Release|x86
- {B257A1A3-78DF-4F00-8053-D32A8B1EB679}.Release|Any CPU.Build.0 = Release|x86
{B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B32AD0DD-5247-437B-A2EF-1A4676C1B072}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B841F25D-4F6D-4E0D-885F-212B54381F28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B841F25D-4F6D-4E0D-885F-212B54381F28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B841F25D-4F6D-4E0D-885F-212B54381F28}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{B841F25D-4F6D-4E0D-885F-212B54381F28}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {B841F25D-4F6D-4E0D-885F-212B54381F28}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {B841F25D-4F6D-4E0D-885F-212B54381F28}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{B841F25D-4F6D-4E0D-885F-212B54381F28}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B841F25D-4F6D-4E0D-885F-212B54381F28}.Release|Any CPU.Build.0 = Release|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BA9020AD-A2D1-47C8-9A7C-756162C38296}.Release|Any CPU.Build.0 = Release|Any CPU
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.ActiveCfg = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.Build.0 = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.DebugMac|Any CPU.ActiveCfg = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.DebugMac|Any CPU.Build.0 = Debug|x86
- {BFE8691A-D323-4622-9021-7B8B27F81599}.DebugWin32|x86.ActiveCfg = Debug|x86
- {BFE8691A-D323-4622-9021-7B8B27F81599}.DebugWin32|x86.Build.0 = Debug|x86
+ {BFE8691A-D323-4622-9021-7B8B27F81599}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {BFE8691A-D323-4622-9021-7B8B27F81599}.DebugWin32|Any CPU.Build.0 = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.Release|Any CPU.ActiveCfg = Release|x86
- {BFE8691A-D323-4622-9021-7B8B27F81599}.Release|Any CPU.Build.0 = Release|x86
{C05AAB7A-523F-4109-966B-6675BE0975BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C05AAB7A-523F-4109-966B-6675BE0975BA}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{C05AAB7A-523F-4109-966B-6675BE0975BA}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {C05AAB7A-523F-4109-966B-6675BE0975BA}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {C05AAB7A-523F-4109-966B-6675BE0975BA}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{C05AAB7A-523F-4109-966B-6675BE0975BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C05AAB7A-523F-4109-966B-6675BE0975BA}.Release|Any CPU.Build.0 = Release|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB590106-8331-4CBE-8131-B154E7BF79E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB590106-8331-4CBE-8131-B154E7BF79E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {CB590106-8331-4CBE-8131-B154E7BF79E1}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{CB590106-8331-4CBE-8131-B154E7BF79E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CB590106-8331-4CBE-8131-B154E7BF79E1}.Release|Any CPU.Build.0 = Release|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Release|Any CPU.Build.0 = Release|Any CPU
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925}.Release|Any CPU.Build.0 = Release|Any CPU
{D1D35409-C814-47F6-B038-B9B5BF0FE490}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1D35409-C814-47F6-B038-B9B5BF0FE490}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1D35409-C814-47F6-B038-B9B5BF0FE490}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{D1D35409-C814-47F6-B038-B9B5BF0FE490}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D1D35409-C814-47F6-B038-B9B5BF0FE490}.Release|Any CPU.Build.0 = Release|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugMac|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugMac|Any CPU.Build.0 = net_4_0_Debug|Any CPU
- {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugWin32|x86.ActiveCfg = net_4_0_Debug|Any CPU
- {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugWin32|x86.Build.0 = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugWin32|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.DebugWin32|Any CPU.Build.0 = net_4_0_Debug|Any CPU
{D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
- {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugWin32|x86.ActiveCfg = Debug|x86
- {DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugWin32|x86.Build.0 = Debug|x86
+ {DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.DebugWin32|Any CPU.Build.0 = Debug|x86
{DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DA8EDEA6-7DA8-435D-B1A0-F3A0CA07F424}.Release|Any CPU.Build.0 = Release|Any CPU
{DB96F55E-41C5-4330-A427-15A4EC028BBE}.Debug|Any CPU.ActiveCfg = Debug|x86
{DB96F55E-41C5-4330-A427-15A4EC028BBE}.DebugMac|Any CPU.ActiveCfg = Debug|x86
- {DB96F55E-41C5-4330-A427-15A4EC028BBE}.DebugWin32|x86.ActiveCfg = Debug|x86
- {DB96F55E-41C5-4330-A427-15A4EC028BBE}.DebugWin32|x86.Build.0 = Debug|x86
+ {DB96F55E-41C5-4330-A427-15A4EC028BBE}.DebugWin32|Any CPU.ActiveCfg = Debug|x86
+ {DB96F55E-41C5-4330-A427-15A4EC028BBE}.DebugWin32|Any CPU.Build.0 = Debug|x86
{DB96F55E-41C5-4330-A427-15A4EC028BBE}.Release|Any CPU.ActiveCfg = Release|x86
- {DB96F55E-41C5-4330-A427-15A4EC028BBE}.Release|Any CPU.Build.0 = Release|x86
{DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Release|Any CPU.Build.0 = Release|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {E2CAB397-D00C-4D11-8F5F-E3A052092969}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
+ {E2CAB397-D00C-4D11-8F5F-E3A052092969}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E2CAB397-D00C-4D11-8F5F-E3A052092969}.Release|Any CPU.Build.0 = Release|Any CPU
{E3BFF8B4-189C-496A-A817-7E8B31E22B91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3BFF8B4-189C-496A-A817-7E8B31E22B91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3BFF8B4-189C-496A-A817-7E8B31E22B91}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{E3BFF8B4-189C-496A-A817-7E8B31E22B91}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E3BFF8B4-189C-496A-A817-7E8B31E22B91}.Release|Any CPU.Build.0 = Release|Any CPU
{EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EBFC7F90-C2E5-4A4C-A327-E35021BEC181}.Release|Any CPU.Build.0 = Release|Any CPU
{EF91D0B8-53F6-4622-9F26-3ED27815878A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF91D0B8-53F6-4622-9F26-3ED27815878A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF91D0B8-53F6-4622-9F26-3ED27815878A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{EF91D0B8-53F6-4622-9F26-3ED27815878A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EF91D0B8-53F6-4622-9F26-3ED27815878A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Release|Any CPU.Build.0 = Release|Any CPU
{F426CBB2-77FC-4E14-9E28-E667C2D1299A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F426CBB2-77FC-4E14-9E28-E667C2D1299A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F426CBB2-77FC-4E14-9E28-E667C2D1299A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{F426CBB2-77FC-4E14-9E28-E667C2D1299A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F426CBB2-77FC-4E14-9E28-E667C2D1299A}.Release|Any CPU.Build.0 = Release|Any CPU
{F5390DA4-08B7-47E3-B6F3-D50683316AB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5390DA4-08B7-47E3-B6F3-D50683316AB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F5390DA4-08B7-47E3-B6F3-D50683316AB4}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{F5390DA4-08B7-47E3-B6F3-D50683316AB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F5390DA4-08B7-47E3-B6F3-D50683316AB4}.Release|Any CPU.Build.0 = Release|Any CPU
{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F79A67A1-4BA2-48F8-A7DD-A72E316EF6CD}.Release|Any CPU.Build.0 = Release|Any CPU
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F870E2E7-FA64-4B2F-968A-90B36AB7AAA9}.Release|Any CPU.Build.0 = Release|Any CPU
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F8F92AA4-A376-4679-A9D4-60E7B7FBF477}.Release|Any CPU.Build.0 = Release|Any CPU
{FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugWin32|x86.ActiveCfg = Debug|Any CPU
- {FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugWin32|x86.Build.0 = Debug|Any CPU
+ {FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
{FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FEC19BDA-4904-4005-8C09-68E82E8BEF6A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7525BB88-6142-4A26-93B9-A30C6983390A} = {9D360D43-0C05-49D6-84DB-4E7AB2F38F82}
@@ -944,6 +918,8 @@ Global
{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC} = {DEEB9163-3966-4E5E-9AB5-FBB3E01AC82A}
{0413DB7D-8B35-423F-9752-D75C9225E7DE} = {DEEB9163-3966-4E5E-9AB5-FBB3E01AC82A}
{E2CAB397-D00C-4D11-8F5F-E3A052092969} = {DEEB9163-3966-4E5E-9AB5-FBB3E01AC82A}
+ {ABB21D58-6EFA-49EA-9555-EDDEC8123DD6} = {DEEB9163-3966-4E5E-9AB5-FBB3E01AC82A}
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33} = {DEEB9163-3966-4E5E-9AB5-FBB3E01AC82A}
{7FCDB0D9-AA7D-44E4-BE74-55312B432389} = {02280E65-C507-4931-AE68-AA2E89E15EEF}
{F870E2E7-FA64-4B2F-968A-90B36AB7AAA9} = {02280E65-C507-4931-AE68-AA2E89E15EEF}
{7926DB5B-96A7-47A7-9870-DB42FA5C3548} = {02280E65-C507-4931-AE68-AA2E89E15EEF}
@@ -985,6 +961,8 @@ Global
{2D711139-8765-4929-BC7A-AA2DEE6F615D} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
{E3BFF8B4-189C-496A-A817-7E8B31E22B91} = {08AC1C52-707A-46D1-AD72-36D747991592}
{849AE05D-0058-4A8C-A0E8-77DC6BB12E52} = {08AC1C52-707A-46D1-AD72-36D747991592}
{72944A6C-45FF-4EF8-B349-8C9CABF519D4} = {08AC1C52-707A-46D1-AD72-36D747991592}
@@ -998,6 +976,8 @@ Global
{A85C9721-C054-4BD8-A1F3-0227615F0A36} = {B8897B76-1A12-4DFA-8B60-7944CC4C9654}
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
{53DCA265-3C3C-42F9-B647-F72BA678122B} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
+ {A727169F-D94F-443F-B305-B057D7F3B420} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
{BFE8691A-D323-4622-9021-7B8B27F81599} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
diff --git a/Makefile.am b/Makefile.am
index 4c12f94..544c2f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -112,7 +112,9 @@ apidocs:
MD_LAUNCH=$(MD_LAUNCH_SETUP) UBUNTU_MENUPROXY=0 LIBOVERLAY_SCROLLBAR=0 exec -a "monodevelop" $(RUNTIME)
-run: runmd-sgen
+run: run-sgen
+
+run-boehm: runmd
run-sgen: runmd-sgen
@@ -149,7 +151,7 @@ plot-trace:
python plot-timeline.py -o md-trace.png md.strace
run-profile-heap: $(PROGRAM)
- $(MD_LAUNCH) -O=inline --profile=heap:heaplog $(MD_BIN_PATH)/MonoDevelop.exe --no-redirect
+ $(MD_LAUNCH) --profile=log:heapshot=900000ms $(MD_BIN_PATH)/MonoDevelop.exe --no-redirect
check-addins:
$(MDTOOL_RUN) setup reg-build -v
diff --git a/Makefile.in b/Makefile.in
index d242090..baaf9fe 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -121,9 +120,10 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+ cscope distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
@@ -134,6 +134,7 @@ am__remove_distdir = \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -161,6 +162,7 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
ACLOCAL = @ACLOCAL@
@@ -382,7 +384,7 @@ MD_LAUNCH_SETUP = \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN = $(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
@@ -570,11 +572,11 @@ uninstall-xdgmimeDATA:
dir='$(DESTDIR)$(xdgmimedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -638,6 +640,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -701,8 +707,32 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -770,40 +800,36 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -814,8 +840,6 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -827,7 +851,7 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
@@ -861,7 +885,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -1004,29 +1028,30 @@ uninstall-am: uninstall-binSCRIPTS uninstall-buildinfoDATA \
uninstall-xdgmimeDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-data-am install-strip tags-recursive \
- uninstall-am
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am \
+ install-data-am install-strip tags-recursive uninstall-am
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local am--refresh check check-am clean \
- clean-generic clean-local ctags ctags-recursive dist dist-all \
- dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ \
- dist-xz dist-zip distcheck distclean distclean-generic \
- distclean-tags distcleancheck distdir distuninstallcheck dvi \
- dvi-am html html-am info info-am install install-am \
- install-binSCRIPTS install-buildinfoDATA install-data \
- install-data-am install-data-hook install-desktopDATA \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-pkgconfigDATA \
- install-ps install-ps-am install-strip install-xdgmimeDATA \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-binSCRIPTS \
- uninstall-buildinfoDATA uninstall-desktopDATA uninstall-hook \
- uninstall-pkgconfigDATA uninstall-xdgmimeDATA
+ clean-cscope clean-generic clean-local cscope cscopelist \
+ cscopelist-recursive ctags ctags-recursive dist dist-all \
+ dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-binSCRIPTS \
+ install-buildinfoDATA install-data install-data-am \
+ install-data-hook install-desktopDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip install-xdgmimeDATA installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-binSCRIPTS uninstall-buildinfoDATA \
+ uninstall-desktopDATA uninstall-hook uninstall-pkgconfigDATA \
+ uninstall-xdgmimeDATA
all: csproj_build
@@ -1107,7 +1132,9 @@ apidocs:
mautil -reg build/bin -p build/bin info --all --xml > docs/extension-model.xml
mdassembler --out docs/sources/monodevelop-extension-guide --addins docs/extension-model.xml
-run: runmd-sgen
+run: run-sgen
+
+run-boehm: runmd
run-sgen: runmd-sgen
@@ -1144,7 +1171,7 @@ plot-trace:
python plot-timeline.py -o md-trace.png md.strace
run-profile-heap: $(PROGRAM)
- $(MD_LAUNCH) -O=inline --profile=heap:heaplog $(MD_BIN_PATH)/MonoDevelop.exe --no-redirect
+ $(MD_LAUNCH) --profile=log:heapshot=900000ms $(MD_BIN_PATH)/MonoDevelop.exe --no-redirect
check-addins:
$(MDTOOL_RUN) setup reg-build -v
diff --git a/Makefile.include b/Makefile.include
index 2b2758e..9a4ca5a 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -16,6 +16,6 @@ MD_LAUNCH_SETUP= \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN=$(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
diff --git a/aclocal.m4 b/aclocal.m4
index 1014524..e8421c4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -18,7 +17,7 @@ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
@@ -180,14 +179,53 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 8
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@@ -195,10 +233,10 @@ fi[]dnl
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.6], [],
+m4_if([$1], [1.12.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -214,24 +252,24 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.6])dnl
+[AM_AUTOMAKE_VERSION([1.12.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
@@ -250,7 +288,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -276,22 +314,21 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
+# serial 10
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -312,14 +349,13 @@ fi])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
+# serial 19
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -365,31 +401,37 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated. For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
@@ -400,28 +442,35 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
@@ -449,14 +498,13 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 8
# AM_PROG_INSTALL_SH
# ------------------
@@ -471,9 +519,9 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -497,20 +545,19 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 7
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well. Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
@@ -521,10 +568,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
@@ -536,14 +584,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 7
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -573,49 +620,19 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -626,7 +643,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
@@ -640,7 +657,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -661,22 +678,18 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 9
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -687,32 +700,40 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$[2]" = conftest.file
)
then
@@ -722,39 +743,55 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -775,18 +812,18 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
@@ -809,7 +846,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
+# Solaris sh will not grok spaces in the rhs of '-'.
for _am_tool in $_am_tools
do
case $_am_tool in
diff --git a/build/MacOSX/Makefile.in b/build/MacOSX/Makefile.in
index b66c605..7463fe5 100644
--- a/build/MacOSX/Makefile.in
+++ b/build/MacOSX/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -246,6 +245,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/build/Makefile.in b/build/Makefile.in
index 60b4ee7..b15e464 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -261,11 +260,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -329,6 +328,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -392,6 +395,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -550,21 +567,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-local \
- ctags ctags-recursive distclean distclean-generic \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ cscopelist cscopelist-recursive ctags ctags-recursive \
+ distclean distclean-generic distclean-tags distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all:
diff --git a/configure b/configure
index f840ef2..21433ae 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for monodevelop 4.0.5.
+# Generated by GNU Autoconf 2.69 for monodevelop 4.0.12.
#
# Report bugs to <monodevelop-list at lists.ximian.com>.
#
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='monodevelop'
PACKAGE_TARNAME='monodevelop'
-PACKAGE_VERSION='4.0.5'
-PACKAGE_STRING='monodevelop 4.0.5'
+PACKAGE_VERSION='4.0.12'
+PACKAGE_STRING='monodevelop 4.0.12'
PACKAGE_BUGREPORT='monodevelop-list at lists.ximian.com'
PACKAGE_URL=''
@@ -1295,7 +1295,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures monodevelop 4.0.5 to adapt to many kinds of systems.
+\`configure' configures monodevelop 4.0.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1361,7 +1361,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of monodevelop 4.0.5:";;
+ short | recursive ) echo "Configuration of monodevelop 4.0.12:";;
esac
cat <<\_ACEOF
@@ -1369,8 +1369,9 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
--disable-update-mimedb disable the update-mime-database after install
[default=no]
--disable-update-desktopdb
@@ -1497,7 +1498,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-monodevelop configure 4.0.5
+monodevelop configure 4.0.12
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1514,7 +1515,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by monodevelop $as_me 4.0.5, which was
+It was created by monodevelop $as_me 4.0.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1863,7 +1864,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version='1.11'
+am__api_version='1.12'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -1989,9 +1990,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2002,32 +2000,40 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$2" = conftest.file
)
then
@@ -2039,6 +2045,16 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -2065,8 +2081,8 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
@@ -2078,10 +2094,10 @@ if test x"${install_sh}" != xset; then
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -2220,12 +2236,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -2330,7 +2340,7 @@ fi
# Define the identity of the package.
PACKAGE='monodevelop'
- VERSION='4.0.5'
+ VERSION='4.0.12'
cat >>confdefs.h <<_ACEOF
@@ -2358,6 +2368,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+mkdir_p="$MKDIR_P"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
@@ -2371,7 +2382,7 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
_am_tools='gnutar plaintar pax cpio none'
_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
+# Solaris sh will not grok spaces in the rhs of '-'.
for _am_tool in $_am_tools
do
case $_am_tool in
@@ -2478,13 +2489,13 @@ fi
#capture aclocal flags for autoreconf
-ASSEMBLY_VERSION=4.0.0.0
+ASSEMBLY_VERSION=4.0.12.0
# This is parsed in BuildVariables.cs. Keep the format consistent to avoid breaking
# the C# side of things. It should be one of the following two formats:
# 1) "VERSION_NUMBER" "2.0"
# 2) "VERSION_NUMBER BUILD_TYPE BUILD_NUMBER" "2.0 Alpha 1"
-PACKAGE_VERSION_LABEL="4.0.5"
+PACKAGE_VERSION_LABEL="4.0.12"
# Extract the first word of "mono", so it can be a program name with args.
set dummy mono; ac_word=$2
@@ -4097,7 +4108,7 @@ fi
echo PACKAGE_VERSION=$PACKAGE_VERSION > monodevelop_version
-ac_config_files="$ac_config_files build/Makefile build/MacOSX/Makefile contrib/Makefile contrib/Mono.Debugger.Soft/Makefile contrib/ICSharpCode.Decompiler/Makefile external/Makefile src/Makefile src/core/Makefile src/core/Mono.Texteditor/Makefile src/core/Mono.Debugging/Makefile src/core/MonoDevelop.Core/Makefile src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile src/core/MonoDevelop.Ide/Makefile src/core/MonoDevelop.Ide/BuildVariables.cs src/core/MonoDevelop.Startup/Makefile src/too [...]
+ac_config_files="$ac_config_files build/Makefile build/MacOSX/Makefile contrib/Makefile contrib/ICSharpCode.Decompiler/Makefile external/Makefile src/Makefile src/core/Makefile src/core/Mono.Texteditor/Makefile src/core/MonoDevelop.Core/Makefile src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile src/core/MonoDevelop.Ide/Makefile src/core/MonoDevelop.Ide/BuildVariables.cs src/core/MonoDevelop.Startup/Makefile src/tools/Makefile src/tools/mdhost/Makefile src/tools/mdtool/Makefile src/t [...]
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -4244,6 +4255,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
@@ -4690,7 +4709,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by monodevelop $as_me 4.0.5, which was
+This file was extended by monodevelop $as_me 4.0.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4743,7 +4762,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-monodevelop config.status 4.0.5
+monodevelop config.status 4.0.12
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -4859,13 +4878,11 @@ do
"build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;;
"build/MacOSX/Makefile") CONFIG_FILES="$CONFIG_FILES build/MacOSX/Makefile" ;;
"contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
- "contrib/Mono.Debugger.Soft/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Mono.Debugger.Soft/Makefile" ;;
"contrib/ICSharpCode.Decompiler/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/ICSharpCode.Decompiler/Makefile" ;;
"external/Makefile") CONFIG_FILES="$CONFIG_FILES external/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/core/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/Makefile" ;;
"src/core/Mono.Texteditor/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/Mono.Texteditor/Makefile" ;;
- "src/core/Mono.Debugging/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/Mono.Debugging/Makefile" ;;
"src/core/MonoDevelop.Core/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/MonoDevelop.Core/Makefile" ;;
"src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile" ;;
"src/core/MonoDevelop.Ide/Makefile") CONFIG_FILES="$CONFIG_FILES src/core/MonoDevelop.Ide/Makefile" ;;
@@ -4884,7 +4901,9 @@ do
"src/addins/VersionControl/MonoDevelop.VersionControl/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl/Makefile" ;;
"src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile" ;;
"src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile" ;;
+ "src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile" ;;
"src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile" ;;
+ "src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile" ;;
"src/addins/VersionControl/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/VersionControl/Makefile" ;;
"src/addins/CSharpBinding/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/CSharpBinding/Makefile" ;;
"src/addins/CSharpBinding/Autotools/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/CSharpBinding/Autotools/Makefile" ;;
@@ -4922,7 +4941,6 @@ do
"src/addins/MonoDevelop.Refactoring/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Refactoring/Makefile" ;;
"src/addins/MonoDevelop.Debugger/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Debugger/Makefile" ;;
"src/addins/MonoDevelop.Debugger.Soft/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Debugger.Soft/Makefile" ;;
- "src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile" ;;
"src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile" ;;
"src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile" ;;
"src/addins/MonoDevelop.HexEditor/Makefile") CONFIG_FILES="$CONFIG_FILES src/addins/MonoDevelop.HexEditor/Makefile" ;;
diff --git a/configure.in b/configure.in
index 40b2ee7..7276b18 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-AC_INIT([monodevelop], 4.0.5, [monodevelop-list at lists.ximian.com])
+AC_INIT([monodevelop], 4.0.12, [monodevelop-list at lists.ximian.com])
AC_PREREQ(2.53)
AM_INIT_AUTOMAKE([1.10 tar-ustar])
AM_MAINTAINER_MODE
@@ -6,13 +6,13 @@ AM_MAINTAINER_MODE
#capture aclocal flags for autoreconf
AC_SUBST(ACLOCAL_FLAGS)
-ASSEMBLY_VERSION=4.0.0.0
+ASSEMBLY_VERSION=4.0.12.0
# This is parsed in BuildVariables.cs. Keep the format consistent to avoid breaking
# the C# side of things. It should be one of the following two formats:
# 1) "VERSION_NUMBER" "2.0"
# 2) "VERSION_NUMBER BUILD_TYPE BUILD_NUMBER" "2.0 Alpha 1"
-PACKAGE_VERSION_LABEL="4.0.5"
+PACKAGE_VERSION_LABEL="4.0.12"
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, gmcs)
@@ -276,13 +276,11 @@ AC_OUTPUT([
build/Makefile
build/MacOSX/Makefile
contrib/Makefile
-contrib/Mono.Debugger.Soft/Makefile
contrib/ICSharpCode.Decompiler/Makefile
external/Makefile
src/Makefile
src/core/Makefile
src/core/Mono.Texteditor/Makefile
-src/core/Mono.Debugging/Makefile
src/core/MonoDevelop.Core/Makefile
src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile
src/core/MonoDevelop.Ide/Makefile
@@ -301,7 +299,9 @@ src/addins/NUnit/NUnitRunner/Makefile
src/addins/VersionControl/MonoDevelop.VersionControl/Makefile
src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile
src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile
+src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile
src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile
+src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile
src/addins/VersionControl/Makefile
src/addins/CSharpBinding/Makefile
src/addins/CSharpBinding/Autotools/Makefile
@@ -339,7 +339,6 @@ src/addins/MonoDevelop.XmlEditor/Makefile
src/addins/MonoDevelop.Refactoring/Makefile
src/addins/MonoDevelop.Debugger/Makefile
src/addins/MonoDevelop.Debugger.Soft/Makefile
-src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile
src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile
src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile
src/addins/MonoDevelop.HexEditor/Makefile
diff --git a/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUsingDeclarations.cs b/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUsingDeclarations.cs
index 3d4a8e7..bb188d3 100644
--- a/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUsingDeclarations.cs
+++ b/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUsingDeclarations.cs
@@ -115,8 +115,8 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
{
string oldNamespace = currentNamespace;
- foreach (Identifier ident in namespaceDeclaration.Identifiers) {
- currentNamespace = NamespaceDeclaration.BuildQualifiedName(currentNamespace, ident.Name);
+ foreach (var ident in namespaceDeclaration.Identifiers) {
+ currentNamespace = NamespaceDeclaration.BuildQualifiedName(currentNamespace, ident);
transform.declaredNamespaces.Add(currentNamespace);
}
base.VisitNamespaceDeclaration(namespaceDeclaration, data);
@@ -154,8 +154,8 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
{
string oldNamespace = currentNamespace;
- foreach (Identifier ident in namespaceDeclaration.Identifiers) {
- currentNamespace = NamespaceDeclaration.BuildQualifiedName(currentNamespace, ident.Name);
+ foreach (var ident in namespaceDeclaration.Identifiers) {
+ currentNamespace = NamespaceDeclaration.BuildQualifiedName(currentNamespace, ident);
}
base.VisitNamespaceDeclaration(namespaceDeclaration, data);
currentNamespace = oldNamespace;
diff --git a/contrib/ICSharpCode.Decompiler/Makefile.in b/contrib/ICSharpCode.Decompiler/Makefile.in
index 614a2de..a3b8947 100644
--- a/contrib/ICSharpCode.Decompiler/Makefile.in
+++ b/contrib/ICSharpCode.Decompiler/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/contrib/ICSharpCode.Decompiler/obj/Debug/ICSharpCode.Decompiler.csproj.FilesWrittenAbsolute.txt b/contrib/ICSharpCode.Decompiler/obj/Debug/ICSharpCode.Decompiler.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..016e678
--- /dev/null
+++ b/contrib/ICSharpCode.Decompiler/obj/Debug/ICSharpCode.Decompiler.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/ICSharpCode.Decompiler.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/ICSharpCode.Decompiler.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/contrib/ICSharpCode.Decompiler/obj/Debug/ICSharpCode.Decompiler.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/contrib/ICSharpCode.Decompiler/obj/Debug/ICSharpCode.Decompiler.dll.mdb
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 2206143..2509f9c 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = Mono.Debugger.Soft ICSharpCode.Decompiler
+SUBDIRS = ICSharpCode.Decompiler
EXTRA_DIST = $(srcdir)/extract_makefile_variable.sh
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index 961ebcc..8cc00f6 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -224,7 +223,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = Mono.Debugger.Soft ICSharpCode.Decompiler
+SUBDIRS = ICSharpCode.Decompiler
EXTRA_DIST = $(srcdir)/extract_makefile_variable.sh
all: all-recursive
@@ -261,11 +260,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -329,6 +328,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -392,6 +395,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -551,21 +568,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/Mono.Debugger.Soft/Makefile.in b/contrib/Mono.Debugger.Soft/Makefile.in
deleted file mode 100644
index a505a44..0000000
--- a/contrib/Mono.Debugger.Soft/Makefile.in
+++ /dev/null
@@ -1,428 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/xbuild.include
-subdir = contrib/Mono.Debugger.Soft
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ACLOCAL_FLAGS = @ACLOCAL_FLAGS@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CSC = @CSC@
-CSC_FLAGS = @CSC_FLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DYLD_FALLBACK_LIBRARY_PATH = @DYLD_FALLBACK_LIBRARY_PATH@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
-GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
-GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
-GLIB_SHARP_CFLAGS = @GLIB_SHARP_CFLAGS@
-GLIB_SHARP_LIBS = @GLIB_SHARP_LIBS@
-GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
-GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
-GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
-GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
-GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
-GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_PREFIX = @LIB_PREFIX@
-LIB_SUFFIX = @LIB_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MCS = @MCS@
-MD_ADDIN_DIR = @MD_ADDIN_DIR@
-MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
-MD_DIR = @MD_DIR@
-MKDIR_P = @MKDIR_P@
-MONO = @MONO@
-MONODOC_CFLAGS = @MONODOC_CFLAGS@
-MONODOC_LIBS = @MONODOC_LIBS@
-MONO_GAC_PREFIX = @MONO_GAC_PREFIX@
-MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
-MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
-MSGFMT = @MSGFMT@
-MSGMERGE = @MSGMERGE@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PACKAGE_VERSION_LABEL = @PACKAGE_VERSION_LABEL@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RUNTIME = @RUNTIME@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SQLITE_XML = @SQLITE_XML@
-STRIP = @STRIP@
-UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
-UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
-UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
-UPDATE_MIME_DB = @UPDATE_MIME_DB@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gtksharp_prefix = @gtksharp_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ALL_CSPROJ = $(wildcard *.csproj)
-MAIN_SLN = $(top_builddir)/Main.sln
- at ENABLE_GNOMEPLATFORM_TRUE@PROFILE_NAME = Debug
- at ENABLE_MACPLATFORM_TRUE@PROFILE_NAME = DebugMac
- at ENABLE_WINDOWSPLATFORM_TRUE@PROFILE_NAME = DebugWin32
-XBUILD = xbuild
-XBUILD_VERBOSITY = quiet
-XBUILD_ARGS = /verbosity:$(XBUILD_VERBOSITY) /nologo /property:CodePage=65001
-XBUILD_PROFILE = /property:Configuration=$(PROFILE_NAME)
-
-# Figure out how far we are from top_builddir
-DEPTH = $(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..')
-EXTS := *.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt
-ALL_FILES := $(EXTS) \
- $(addprefix */,$(EXTS)) \
- $(addprefix */*/,$(EXTS)) \
- $(addprefix */*/*/,$(EXTS)) \
- $(addprefix */*/*/*/,$(EXTS)) \
- $(addprefix */*/*/*/*/,$(EXTS)) \
- $(wildcard icons/*) \
- $(wildcard templates/*)
-
-WILDCARDED_FILES := $(wildcard $(ALL_FILES))
-EXTRA_DIST = \
- $(wildcard $(ALL_FILES))
-
-XBUILD_OUTPUT = $(XBUILD_OUTPUT_BIN)/MonoDevelop.Debugger.Soft
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/xbuild.include $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Mono.Debugger.Soft/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign contrib/Mono.Debugger.Soft/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-$(top_srcdir)/xbuild.include:
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-all: csproj_build
-
-clean: csproj_clean
-
-csproj_build:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Building $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \
- fi
-
-csproj_clean:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Cleaning $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \
- fi
-
-sln_build:
- @echo Building $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE)
-
-sln_clean:
- @echo Cleaning $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE) /t:Clean
-
-print_extradist:
- @echo $(WILDCARDED_FILES)
-
-.PHONY: all clean csproj_build csproj_clean sln_build sln_clean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj b/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
deleted file mode 100644
index 21ff2e2..0000000
--- a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.Debugger.Soft</RootNamespace>
- <AssemblyName>Mono.Debugger.Soft</AssemblyName>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>mono.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>True</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\build\AddIns\MonoDevelop.Debugger.Soft</OutputPath>
- <DefineConstants>MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\build\AddIns\MonoDevelop.Debugger.Soft</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- <DefineConstants>MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
- <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
- <Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\Connection.cs" />
- <Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\CustomAttributeTypedArgumentMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
- <Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\Event.cs" />
- <Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
- <Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\EventSet.cs" />
- <Compile Include="Mono.Debugger.Soft\EventType.cs" />
- <Compile Include="Mono.Debugger.Soft\ExceptionEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
- <Compile Include="Mono.Debugger.Soft\ILExceptionHandler.cs" />
- <Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
- <Compile Include="Mono.Debugger.Soft\IMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
- <Compile Include="Mono.Debugger.Soft\InvocationException.cs" />
- <Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
- <Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
- <Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
- <Compile Include="Mono.Debugger.Soft\Location.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodBodyMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodEntryEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodEntryEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodExitEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodExitEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\Mirror.cs" />
- <Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
- <Compile Include="Mono.Debugger.Soft\ObjectMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
- <Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
- <Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
- <Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
- <Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
- <Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\Value.cs" />
- <Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
- <Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
- <Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
- <Compile Include="Mono.Debugger.Soft\VMDisconnectEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
- <Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
- <Compile Include="Mono.Debugger.Soft\AssemblyLoadEventRequest.cs" />
- <Compile Include="Locale.cs" />
- <Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Makefile.am" />
- <None Include="mono-git-revision" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System.Core" />
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\external\cecil\Mono.Cecil.csproj">
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
- <Name>Mono.Cecil</Name>
- <Private>False</Private>
- </ProjectReference>
- </ItemGroup>
-</Project>
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
deleted file mode 100644
index e8d5f58..0000000
--- a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ /dev/null
@@ -1,2373 +0,0 @@
-using System;
-using System.IO;
-using System.Net;
-using System.Net.Sockets;
-using System.Threading;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
-using Mono.Cecil.Metadata;
-
-namespace Mono.Debugger.Soft
-{
- public class VersionInfo {
- public string VMVersion {
- get; set;
- }
-
- public int MajorVersion {
- get; set;
- }
-
- public int MinorVersion {
- get; set;
- }
-
- /*
- * Check that this version is at least major:minor
- */
- public bool AtLeast (int major, int minor) {
- if ((MajorVersion > major) || ((MajorVersion == major && MinorVersion >= minor)))
- return true;
- else
- return false;
- }
- }
-
- struct SourceInfo {
- public string source_file;
- public byte[] guid, hash;
- }
-
- class DebugInfo {
- public int max_il_offset;
- public int[] il_offsets;
- public int[] line_numbers;
- public int[] column_numbers;
- public SourceInfo[] source_files;
- }
-
- struct FrameInfo {
- public long id;
- public long method;
- public int il_offset;
- public StackFrameFlags flags;
- }
-
- class TypeInfo {
- public string ns, name, full_name;
- public long assembly, module, base_type, element_type;
- public int token, rank, attributes;
- public bool is_byref, is_pointer, is_primitive, is_valuetype, is_enum;
- public bool is_gtd, is_generic_type;
- public long[] nested;
- public long gtd;
- public long[] type_args;
- }
-
- struct IfaceMapInfo {
- public long iface_id;
- public long[] iface_methods;
- public long[] target_methods;
- }
-
- class MethodInfo {
- public int attributes, iattributes, token;
- public bool is_gmd, is_generic_method;
- public long gmd;
- public long[] type_args;
- }
-
- class MethodBodyInfo {
- public byte[] il;
- public ExceptionClauseInfo[] clauses;
- }
-
- struct ExceptionClauseInfo {
- public ExceptionClauseFlags flags;
- public int try_offset;
- public int try_length;
- public int handler_offset;
- public int handler_length;
- public int filter_offset;
- public long catch_type_id;
- }
-
- enum ExceptionClauseFlags {
- None = 0x0,
- Filter = 0x1,
- Finally = 0x2,
- Fault = 0x4,
- }
-
- struct ParamInfo {
- public int call_conv;
- public int param_count;
- public int generic_param_count;
- public long ret_type;
- public long[] param_types;
- public string[] param_names;
- }
-
- struct LocalsInfo {
- public long[] types;
- public string[] names;
- public int[] live_range_start;
- public int[] live_range_end;
- }
-
- struct PropInfo {
- public long id;
- public string name;
- public long get_method, set_method;
- public int attrs;
- }
-
- class CattrNamedArgInfo {
- public bool is_property;
- public long id;
- public ValueImpl value;
- }
-
- class CattrInfo {
- public long ctor_id;
- public ValueImpl[] ctor_args;
- public CattrNamedArgInfo[] named_args;
- }
-
- class ThreadInfo {
- public bool is_thread_pool;
- }
-
- struct ObjectRefInfo {
- public long type_id;
- public long domain_id;
- }
-
- enum ValueTypeId {
- VALUE_TYPE_ID_NULL = 0xf0,
- VALUE_TYPE_ID_TYPE = 0xf1
- }
-
- enum InvokeFlags {
- NONE = 0x0,
- DISABLE_BREAKPOINTS = 0x1,
- SINGLE_THREADED = 0x2
- }
-
- enum ElementType {
- End = 0x00,
- Void = 0x01,
- Boolean = 0x02,
- Char = 0x03,
- I1 = 0x04,
- U1 = 0x05,
- I2 = 0x06,
- U2 = 0x07,
- I4 = 0x08,
- U4 = 0x09,
- I8 = 0x0a,
- U8 = 0x0b,
- R4 = 0x0c,
- R8 = 0x0d,
- String = 0x0e,
- Ptr = 0x0f,
- ByRef = 0x10,
- ValueType = 0x11,
- Class = 0x12,
- Var = 0x13,
- Array = 0x14,
- GenericInst = 0x15,
- TypedByRef = 0x16,
- I = 0x18,
- U = 0x19,
- FnPtr = 0x1b,
- Object = 0x1c,
- SzArray = 0x1d,
- MVar = 0x1e,
- CModReqD = 0x1f,
- CModOpt = 0x20,
- Internal = 0x21,
- Modifier = 0x40,
- Sentinel = 0x41,
- Pinned = 0x45,
-
- Type = 0x50,
- Boxed = 0x51,
- Enum = 0x55
- }
-
- class ValueImpl {
- public ElementType Type; /* or one of the VALUE_TYPE_ID constants */
- public long Objid;
- public object Value;
- public long Klass; // For ElementType.ValueType
- public ValueImpl[] Fields; // for ElementType.ValueType
- public bool IsEnum; // For ElementType.ValueType
- public long Id; /* For VALUE_TYPE_ID_TYPE */
- }
-
- class ModuleInfo {
- public string Name, ScopeName, FQName, Guid;
- public long Assembly;
- }
-
- enum TokenType {
- STRING = 0,
- TYPE = 1,
- FIELD = 2,
- METHOD = 3,
- UNKNOWN = 4
- }
-
- enum StackFrameFlags {
- NONE = 0,
- DEBUGGER_INVOKE = 1,
- NATIVE_TRANSITION = 2
- }
-
- class ResolvedToken {
- public TokenType Type;
- public string Str;
- public long Id;
- }
-
- class Modifier {
- }
-
- class CountModifier : Modifier {
- public int Count {
- get; set;
- }
- }
-
- class LocationModifier : Modifier {
- public long Method {
- get; set;
- }
-
- public long Location {
- get; set;
- }
- }
-
- class StepModifier : Modifier {
- public long Thread {
- get; set;
- }
-
- public int Depth {
- get; set;
- }
-
- public int Size {
- get; set;
- }
-
- public int Filter {
- get; set;
- }
- }
-
- class ThreadModifier : Modifier {
- public long Thread {
- get; set;
- }
- }
-
- class ExceptionModifier : Modifier {
- public long Type {
- get; set;
- }
- public bool Caught {
- get; set;
- }
- public bool Uncaught {
- get; set;
- }
- }
-
- class AssemblyModifier : Modifier {
- public long[] Assemblies {
- get; set;
- }
- }
-
- class SourceFileModifier : Modifier {
- public string[] SourceFiles {
- get; set;
- }
- }
-
- class TypeNameModifier : Modifier {
- public string[] TypeNames {
- get; set;
- }
- }
-
- class EventInfo {
- public EventType EventType {
- get; set;
- }
-
- public int ReqId {
- get; set;
- }
-
- public SuspendPolicy SuspendPolicy {
- get; set;
- }
-
- public long ThreadId {
- get; set;
- }
-
- public long Id {
- get; set;
- }
-
- public long Location {
- get; set;
- }
-
- public int Level {
- get; set;
- }
-
- public string Category {
- get; set;
- }
-
- public string Message {
- get; set;
- }
-
- public EventInfo (EventType type, int req_id) {
- EventType = type;
- ReqId = req_id;
- }
- }
-
- public enum ErrorCode {
- NONE = 0,
- INVALID_OBJECT = 20,
- INVALID_FIELDID = 25,
- INVALID_FRAMEID = 30,
- NOT_IMPLEMENTED = 100,
- NOT_SUSPENDED = 101,
- INVALID_ARGUMENT = 102,
- ERR_UNLOADED = 103,
- ERR_NO_INVOCATION = 104,
- ABSENT_INFORMATION = 105,
- NO_SEQ_POINT_AT_IL_OFFSET = 106
- }
-
- public class ErrorHandlerEventArgs : EventArgs {
-
- public ErrorCode ErrorCode {
- get; set;
- }
- }
-
- /*
- * Represents the connection to the debuggee
- */
- public abstract class Connection
- {
- /*
- * The protocol and the packet format is based on JDWP, the differences
- * are in the set of supported events, and the commands.
- */
- internal const string HANDSHAKE_STRING = "DWP-Handshake";
-
- internal const int HEADER_LENGTH = 11;
-
- static readonly bool EnableConnectionLogging = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_SDB_LOG"));
- static int ConnectionId;
- readonly StreamWriter LoggingStream = EnableConnectionLogging ?
- new StreamWriter (string.Format ("/tmp/sdb_conn_log_{0}", ConnectionId++), false) : null;
-
- /*
- * Th version of the wire-protocol implemented by the library. The library
- * and the debuggee can communicate if they implement the same major version.
- * If they implement a different minor version, they can communicate, but some
- * features might not be available. This allows older clients to communicate
- * with newer runtimes, and vice versa.
- */
- internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 23;
-
- enum WPSuspendPolicy {
- NONE = 0,
- EVENT_THREAD = 1,
- ALL = 2
- }
-
- enum CommandSet {
- VM = 1,
- OBJECT_REF = 9,
- STRING_REF = 10,
- THREAD = 11,
- ARRAY_REF = 13,
- EVENT_REQUEST = 15,
- STACK_FRAME = 16,
- APPDOMAIN = 20,
- ASSEMBLY = 21,
- METHOD = 22,
- TYPE = 23,
- MODULE = 24,
- EVENT = 64
- }
-
- enum EventKind {
- VM_START = 0,
- VM_DEATH = 1,
- THREAD_START = 2,
- THREAD_DEATH = 3,
- APPDOMAIN_CREATE = 4, // Not in JDI
- APPDOMAIN_UNLOAD = 5, // Not in JDI
- METHOD_ENTRY = 6,
- METHOD_EXIT = 7,
- ASSEMBLY_LOAD = 8,
- ASSEMBLY_UNLOAD = 9,
- BREAKPOINT = 10,
- STEP = 11,
- TYPE_LOAD = 12,
- EXCEPTION = 13,
- KEEPALIVE = 14,
- USER_BREAK = 15,
- USER_LOG = 16
- }
-
- enum ModifierKind {
- COUNT = 1,
- THREAD_ONLY = 3,
- LOCATION_ONLY = 7,
- EXCEPTION_ONLY = 8,
- STEP = 10,
- ASSEMBLY_ONLY = 11,
- SOURCE_FILE_ONLY = 12,
- TYPE_NAME_ONLY = 13
- }
-
- enum CmdVM {
- VERSION = 1,
- ALL_THREADS = 2,
- SUSPEND = 3,
- RESUME = 4,
- EXIT = 5,
- DISPOSE = 6,
- INVOKE_METHOD = 7,
- SET_PROTOCOL_VERSION = 8,
- ABORT_INVOKE = 9,
- SET_KEEPALIVE = 10,
- GET_TYPES_FOR_SOURCE_FILE = 11,
- GET_TYPES = 12,
- INVOKE_METHODS = 13
- }
-
- enum CmdEvent {
- COMPOSITE = 100
- }
-
- enum CmdThread {
- GET_FRAME_INFO = 1,
- GET_NAME = 2,
- GET_STATE = 3,
- GET_INFO = 4,
- /* FIXME: Merge into GET_INFO when the major protocol version is increased */
- GET_ID = 5,
- /* Ditto */
- GET_TID = 6
- }
-
- enum CmdEventRequest {
- SET = 1,
- CLEAR = 2,
- CLEAR_ALL_BREAKPOINTS = 3
- }
-
- enum CmdAppDomain {
- GET_ROOT_DOMAIN = 1,
- GET_FRIENDLY_NAME = 2,
- GET_ASSEMBLIES = 3,
- GET_ENTRY_ASSEMBLY = 4,
- CREATE_STRING = 5,
- GET_CORLIB = 6,
- CREATE_BOXED_VALUE = 7
- }
-
- enum CmdAssembly {
- GET_LOCATION = 1,
- GET_ENTRY_POINT = 2,
- GET_MANIFEST_MODULE = 3,
- GET_OBJECT = 4,
- GET_TYPE = 5,
- GET_NAME = 6
- }
-
- enum CmdModule {
- GET_INFO = 1,
- }
-
- enum CmdMethod {
- GET_NAME = 1,
- GET_DECLARING_TYPE = 2,
- GET_DEBUG_INFO = 3,
- GET_PARAM_INFO = 4,
- GET_LOCALS_INFO = 5,
- GET_INFO = 6,
- GET_BODY = 7,
- RESOLVE_TOKEN = 8,
- GET_CATTRS = 9
- }
-
- enum CmdType {
- GET_INFO = 1,
- GET_METHODS = 2,
- GET_FIELDS = 3,
- GET_VALUES = 4,
- GET_OBJECT = 5,
- GET_SOURCE_FILES = 6,
- SET_VALUES = 7,
- IS_ASSIGNABLE_FROM = 8,
- GET_PROPERTIES = 9,
- GET_CATTRS = 10,
- GET_FIELD_CATTRS = 11,
- GET_PROPERTY_CATTRS = 12,
- /* FIXME: Merge into GET_SOURCE_FILES when the major protocol version is increased */
- GET_SOURCE_FILES_2 = 13,
- /* FIXME: Merge into GET_VALUES when the major protocol version is increased */
- GET_VALUES_2 = 14,
- CMD_TYPE_GET_METHODS_BY_NAME_FLAGS = 15,
- GET_INTERFACES = 16,
- GET_INTERFACE_MAP = 17,
- IS_INITIALIZED = 18
- }
-
- enum BindingFlagsExtensions {
- BINDING_FLAGS_IGNORE_CASE = 0x70000000,
- }
-
- enum CmdStackFrame {
- GET_VALUES = 1,
- GET_THIS = 2,
- SET_VALUES = 3
- }
-
- enum CmdArrayRef {
- GET_LENGTH = 1,
- GET_VALUES = 2,
- SET_VALUES = 3
- }
-
- enum CmdStringRef {
- GET_VALUE = 1,
- GET_LENGTH = 2,
- GET_CHARS = 3
- }
-
- enum CmdObjectRef {
- GET_TYPE = 1,
- GET_VALUES = 2,
- IS_COLLECTED = 3,
- GET_ADDRESS = 4,
- GET_DOMAIN = 5,
- SET_VALUES = 6,
- GET_INFO = 7,
- }
-
- class Header {
- public int id;
- public int command_set;
- public int command;
- public int flags;
- }
-
- internal static int GetPacketLength (byte[] header) {
- int offset = 0;
- return decode_int (header, ref offset);
- }
-
- internal static bool IsReplyPacket (byte[] packet) {
- int offset = 8;
- return decode_byte (packet, ref offset) == 0x80;
- }
-
- internal static int GetPacketId (byte[] packet) {
- int offset = 4;
- return decode_int (packet, ref offset);
- }
-
- static int decode_byte (byte[] packet, ref int offset) {
- return packet [offset++];
- }
-
- static int decode_short (byte[] packet, ref int offset) {
- int res = ((int)packet [offset] << 8) | (int)packet [offset + 1];
- offset += 2;
- return res;
- }
-
- static int decode_int (byte[] packet, ref int offset) {
- int res = ((int)packet [offset] << 24) | ((int)packet [offset + 1] << 16) | ((int)packet [offset + 2] << 8) | (int)packet [offset + 3];
- offset += 4;
- return res;
- }
-
- static long decode_id (byte[] packet, ref int offset) {
- return decode_int (packet, ref offset);
- }
-
- static long decode_long (byte[] packet, ref int offset) {
- uint high = (uint)decode_int (packet, ref offset);
- uint low = (uint)decode_int (packet, ref offset);
-
- return (long)(((ulong)high << 32) | (ulong)low);
- }
-
- internal static SuspendPolicy decode_suspend_policy (int suspend_policy) {
- switch ((WPSuspendPolicy)suspend_policy) {
- case WPSuspendPolicy.NONE:
- return SuspendPolicy.None;
- case WPSuspendPolicy.EVENT_THREAD:
- return SuspendPolicy.EventThread;
- case WPSuspendPolicy.ALL:
- return SuspendPolicy.All;
- default:
- throw new NotImplementedException ();
- }
- }
-
- static Header decode_command_header (byte[] packet) {
- int offset = 0;
- Header res = new Header ();
-
- decode_int (packet, ref offset);
- res.id = decode_int (packet, ref offset);
- res.flags = decode_byte (packet, ref offset);
- res.command_set = decode_byte (packet, ref offset);
- res.command = decode_byte (packet, ref offset);
-
- return res;
- }
-
- static void encode_byte (byte[] buf, int b, ref int offset) {
- buf [offset] = (byte)b;
- offset ++;
- }
-
- static void encode_int (byte[] buf, int i, ref int offset) {
- buf [offset] = (byte)((i >> 24) & 0xff);
- buf [offset + 1] = (byte)((i >> 16) & 0xff);
- buf [offset + 2] = (byte)((i >> 8) & 0xff);
- buf [offset + 3] = (byte)((i >> 0) & 0xff);
- offset += 4;
- }
-
- static void encode_id (byte[] buf, long id, ref int offset) {
- encode_int (buf, (int)id, ref offset);
- }
-
- static void encode_long (byte[] buf, long l, ref int offset) {
- encode_int (buf, (int)((l >> 32) & 0xffffffff), ref offset);
- encode_int (buf, (int)(l & 0xffffffff), ref offset);
- }
-
- internal static byte[] EncodePacket (int id, int commandSet, int command, byte[] data, int dataLen) {
- byte[] buf = new byte [dataLen + 11];
- int offset = 0;
-
- encode_int (buf, buf.Length, ref offset);
- encode_int (buf, id, ref offset);
- encode_byte (buf, 0, ref offset);
- encode_byte (buf, commandSet, ref offset);
- encode_byte (buf, command, ref offset);
-
- for (int i = 0; i < dataLen; ++i)
- buf [offset + i] = data [i];
-
- return buf;
- }
-
- class PacketReader {
- byte[] packet;
- int offset;
-
- public PacketReader (byte[] packet) {
- this.packet = packet;
-
- // For event packets
- Header header = decode_command_header (packet);
- CommandSet = (CommandSet)header.command_set;
- Command = header.command;
-
- // For reply packets
- offset = 0;
- ReadInt (); // length
- ReadInt (); // id
- ReadByte (); // flags
- ErrorCode = ReadShort ();
- }
-
- public CommandSet CommandSet {
- get; set;
- }
-
- public int Command {
- get; set;
- }
-
- public int ErrorCode {
- get; set;
- }
-
- public int Offset {
- get {
- return offset;
- }
- }
-
- public int ReadByte () {
- return decode_byte (packet, ref offset);
- }
-
- public int ReadShort () {
- return decode_short (packet, ref offset);
- }
-
- public int ReadInt () {
- return decode_int (packet, ref offset);
- }
-
- public long ReadId () {
- return decode_id (packet, ref offset);
- }
-
- public long ReadLong () {
- return decode_long (packet, ref offset);
- }
-
- public float ReadFloat () {
- float f = DataConverter.FloatFromBE (packet, offset);
- offset += 4;
- return f;
- }
-
- public double ReadDouble () {
- double d = DataConverter.DoubleFromBE (packet, offset);
- offset += 8;
- return d;
- }
-
- public string ReadString () {
- int len = decode_int (packet, ref offset);
- string res = new String (Encoding.UTF8.GetChars (packet, offset, len));
- offset += len;
- return res;
- }
-
- public ValueImpl ReadValue () {
- ElementType etype = (ElementType)ReadByte ();
-
- switch (etype) {
- case ElementType.Void:
- return new ValueImpl { Type = etype };
- case ElementType.I1:
- return new ValueImpl { Type = etype, Value = (sbyte)ReadInt () };
- case ElementType.U1:
- return new ValueImpl { Type = etype, Value = (byte)ReadInt () };
- case ElementType.Boolean:
- return new ValueImpl { Type = etype, Value = ReadInt () != 0 };
- case ElementType.I2:
- return new ValueImpl { Type = etype, Value = (short)ReadInt () };
- case ElementType.U2:
- return new ValueImpl { Type = etype, Value = (ushort)ReadInt () };
- case ElementType.Char:
- return new ValueImpl { Type = etype, Value = (char)ReadInt () };
- case ElementType.I4:
- return new ValueImpl { Type = etype, Value = ReadInt () };
- case ElementType.U4:
- return new ValueImpl { Type = etype, Value = (uint)ReadInt () };
- case ElementType.I8:
- return new ValueImpl { Type = etype, Value = ReadLong () };
- case ElementType.U8:
- return new ValueImpl { Type = etype, Value = (ulong)ReadLong () };
- case ElementType.R4:
- return new ValueImpl { Type = etype, Value = ReadFloat () };
- case ElementType.R8:
- return new ValueImpl { Type = etype, Value = ReadDouble () };
- case ElementType.I:
- case ElementType.U:
- case ElementType.Ptr:
- // FIXME: The client and the debuggee might have different word sizes
- return new ValueImpl { Type = etype, Value = ReadLong () };
- case ElementType.String:
- case ElementType.SzArray:
- case ElementType.Class:
- case ElementType.Array:
- case ElementType.Object:
- long objid = ReadId ();
- return new ValueImpl () { Type = etype, Objid = objid };
- case ElementType.ValueType:
- bool is_enum = ReadByte () == 1;
- long klass = ReadId ();
- long nfields = ReadInt ();
- ValueImpl[] fields = new ValueImpl [nfields];
- for (int i = 0; i < nfields; ++i)
- fields [i] = ReadValue ();
- return new ValueImpl () { Type = etype, Klass = klass, Fields = fields, IsEnum = is_enum };
- case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
- return new ValueImpl { Type = etype };
- case (ElementType)ValueTypeId.VALUE_TYPE_ID_TYPE:
- return new ValueImpl () { Type = etype, Id = ReadId () };
- default:
- throw new NotImplementedException ("Unable to handle type " + etype);
- }
- }
-
- public long[] ReadIds (int n) {
- long[] res = new long [n];
- for (int i = 0; i < n; ++i)
- res [i] = ReadId ();
- return res;
- }
- }
-
- class PacketWriter {
-
- byte[] data;
- int offset;
-
- public PacketWriter () {
- data = new byte [1024];
- offset = 0;
- }
-
- void MakeRoom (int size) {
- if (offset + size >= data.Length) {
- int new_len = data.Length * 2;
- while (new_len < offset + size) {
- new_len *= 2;
- }
- byte[] new_data = new byte [new_len];
- Array.Copy (data, new_data, data.Length);
- data = new_data;
- }
- }
-
- public PacketWriter WriteByte (byte val) {
- MakeRoom (1);
- encode_byte (data, val, ref offset);
- return this;
- }
-
- public PacketWriter WriteInt (int val) {
- MakeRoom (4);
- encode_int (data, val, ref offset);
- return this;
- }
-
- public PacketWriter WriteId (long id) {
- MakeRoom (8);
- encode_id (data, id, ref offset);
- return this;
- }
-
- public PacketWriter WriteLong (long val) {
- MakeRoom (8);
- encode_long (data, val, ref offset);
- return this;
- }
-
- public PacketWriter WriteFloat (float f) {
- MakeRoom (8);
- byte[] b = DataConverter.GetBytesBE (f);
- for (int i = 0; i < 4; ++i)
- data [offset + i] = b [i];
- offset += 4;
- return this;
- }
-
- public PacketWriter WriteDouble (double d) {
- MakeRoom (8);
- byte[] b = DataConverter.GetBytesBE (d);
- for (int i = 0; i < 8; ++i)
- data [offset + i] = b [i];
- offset += 8;
- return this;
- }
-
- public PacketWriter WriteInts (int[] ids) {
- for (int i = 0; i < ids.Length; ++i)
- WriteInt (ids [i]);
- return this;
- }
-
- public PacketWriter WriteIds (long[] ids) {
- for (int i = 0; i < ids.Length; ++i)
- WriteId (ids [i]);
- return this;
- }
-
- public PacketWriter WriteString (string s) {
- if (s == null)
- return WriteInt (-1);
-
- byte[] b = Encoding.UTF8.GetBytes (s);
- MakeRoom (4);
- encode_int (data, b.Length, ref offset);
- MakeRoom (b.Length);
- Buffer.BlockCopy (b, 0, data, offset, b.Length);
- offset += b.Length;
- return this;
- }
-
- public PacketWriter WriteBool (bool val) {
- WriteByte (val ? (byte)1 : (byte)0);
- return this;
- }
-
- public PacketWriter WriteValue (ValueImpl v) {
- ElementType t;
-
- if (v.Value != null)
- t = TypeCodeToElementType (Type.GetTypeCode (v.Value.GetType ()));
- else
- t = v.Type;
- WriteByte ((byte)t);
- switch (t) {
- case ElementType.Boolean:
- WriteInt ((bool)v.Value ? 1 : 0);
- break;
- case ElementType.Char:
- WriteInt ((int)(char)v.Value);
- break;
- case ElementType.I1:
- WriteInt ((int)(sbyte)v.Value);
- break;
- case ElementType.U1:
- WriteInt ((int)(byte)v.Value);
- break;
- case ElementType.I2:
- WriteInt ((int)(short)v.Value);
- break;
- case ElementType.U2:
- WriteInt ((int)(ushort)v.Value);
- break;
- case ElementType.I4:
- WriteInt ((int)(int)v.Value);
- break;
- case ElementType.U4:
- WriteInt ((int)(uint)v.Value);
- break;
- case ElementType.I8:
- WriteLong ((long)(long)v.Value);
- break;
- case ElementType.U8:
- WriteLong ((long)(ulong)v.Value);
- break;
- case ElementType.R4:
- WriteFloat ((float)v.Value);
- break;
- case ElementType.R8:
- WriteDouble ((double)v.Value);
- break;
- case ElementType.String:
- case ElementType.SzArray:
- case ElementType.Class:
- case ElementType.Array:
- case ElementType.Object:
- WriteId (v.Objid);
- break;
- case ElementType.ValueType:
- // FIXME:
- if (v.IsEnum)
- throw new NotImplementedException ();
- WriteByte (0);
- WriteId (v.Klass);
- WriteInt (v.Fields.Length);
- for (int i = 0; i < v.Fields.Length; ++i)
- WriteValue (v.Fields [i]);
- break;
- case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
- break;
- default:
- throw new NotImplementedException ();
- }
-
- return this;
- }
-
- public PacketWriter WriteValues (ValueImpl[] values) {
- for (int i = 0; i < values.Length; ++i)
- WriteValue (values [i]);
- return this;
- }
-
- public byte[] Data {
- get {
- return data;
- }
- }
-
- public int Offset {
- get {
- return offset;
- }
- }
- }
-
- delegate void ReplyCallback (int packet_id, byte[] packet);
-
- bool closed;
- Thread receiver_thread;
- Dictionary<int, byte[]> reply_packets;
- Dictionary<int, ReplyCallback> reply_cbs;
- Dictionary<int, int> reply_cb_counts;
- object reply_packets_monitor;
-
- internal event EventHandler<ErrorHandlerEventArgs> ErrorHandler;
-
- protected Connection () {
- closed = false;
- reply_packets = new Dictionary<int, byte[]> ();
- reply_cbs = new Dictionary<int, ReplyCallback> ();
- reply_cb_counts = new Dictionary<int, int> ();
- reply_packets_monitor = new Object ();
- }
-
- protected abstract int TransportReceive (byte[] buf, int buf_offset, int len);
- protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
- protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);
- protected abstract void TransportClose ();
-
- internal VersionInfo Version;
-
- int Receive (byte[] buf, int buf_offset, int len) {
- int offset = 0;
-
- while (offset < len) {
- int n = TransportReceive (buf, buf_offset + offset, len - offset);
-
- if (n == 0)
- return offset;
- offset += n;
- }
-
- return offset;
- }
-
- // Do the wire protocol handshake
- internal void Connect () {
- byte[] buf = new byte [HANDSHAKE_STRING.Length];
- char[] cbuf = new char [buf.Length];
-
- // FIXME: Add a timeout
- int n = Receive (buf, 0, buf.Length);
- if (n == 0)
- throw new IOException ("DWP Handshake failed.");
- for (int i = 0; i < buf.Length; ++i)
- cbuf [i] = (char)buf [i];
-
- if (new String (cbuf) != HANDSHAKE_STRING)
- throw new IOException ("DWP Handshake failed.");
-
- TransportSend (buf, 0, buf.Length);
-
- receiver_thread = new Thread (new ThreadStart (receiver_thread_main));
- receiver_thread.Name = "SDB Receiver";
- receiver_thread.IsBackground = true;
- receiver_thread.Start ();
-
- Version = VM_GetVersion ();
-
- //
- // Tell the debuggee our protocol version, so newer debuggees can work
- // with older clients
- //
-
- //
- // Older debuggees might not support this request
- EventHandler<ErrorHandlerEventArgs> OrigErrorHandler = ErrorHandler;
- ErrorHandler = null;
- ErrorHandler += delegate (object sender, ErrorHandlerEventArgs args) {
- throw new NotSupportedException ();
- };
- try {
- VM_SetProtocolVersion (MAJOR_VERSION, MINOR_VERSION);
- } catch (NotSupportedException) {
- }
- ErrorHandler = OrigErrorHandler;
- }
-
- internal byte[] ReadPacket () {
- // FIXME: Throw ClosedConnectionException () if the connection is closed
- // FIXME: Throw ClosedConnectionException () if another thread closes the connection
- // FIXME: Locking
- byte[] header = new byte [HEADER_LENGTH];
-
- int len = Receive (header, 0, header.Length);
- if (len == 0)
- return new byte [0];
- if (len != HEADER_LENGTH) {
- // FIXME:
- throw new IOException ("Packet of length " + len + " is read.");
- }
-
- int packetLength = GetPacketLength (header);
- if (packetLength < 11)
- throw new IOException ("Invalid packet length.");
-
- if (packetLength == 11) {
- return header;
- } else {
- byte[] buf = new byte [packetLength];
- for (int i = 0; i < header.Length; ++i)
- buf [i] = header [i];
- len = Receive (buf, header.Length, packetLength - header.Length);
- if (len != packetLength - header.Length)
- throw new IOException ();
- return buf;
- }
- }
-
- internal void WritePacket (byte[] packet) {
- // FIXME: Throw ClosedConnectionException () if the connection is closed
- // FIXME: Throw ClosedConnectionException () if another thread closes the connection
- // FIXME: Locking
- TransportSend (packet, 0, packet.Length);
- }
-
- internal void Close () {
- closed = true;
- }
-
- internal bool IsClosed {
- get {
- return closed;
- }
- }
-
- bool disconnected;
-
- void receiver_thread_main () {
- while (!closed) {
- try {
- bool res = ReceivePacket ();
- if (!res)
- break;
- } catch (Exception ex) {
- if (!closed) {
- Console.WriteLine (ex);
- }
- break;
- }
- }
-
- lock (reply_packets_monitor) {
- disconnected = true;
- Monitor.PulseAll (reply_packets_monitor);
- TransportClose ();
- }
- EventHandler.VMDisconnect (0, 0, null);
- }
-
- bool ReceivePacket () {
- byte[] packet = ReadPacket ();
-
- if (packet.Length == 0) {
- return false;
- }
-
- if (IsReplyPacket (packet)) {
- int id = GetPacketId (packet);
- ReplyCallback cb = null;
- lock (reply_packets_monitor) {
- reply_cbs.TryGetValue (id, out cb);
- if (cb == null) {
- reply_packets [id] = packet;
- Monitor.PulseAll (reply_packets_monitor);
- } else {
- int c = reply_cb_counts [id];
- c --;
- if (c == 0) {
- reply_cbs.Remove (id);
- reply_cb_counts.Remove (id);
- }
- }
- }
-
- if (cb != null)
- cb.Invoke (id, packet);
- } else {
- PacketReader r = new PacketReader (packet);
-
- if (r.CommandSet == CommandSet.EVENT && r.Command == (int)CmdEvent.COMPOSITE) {
- int spolicy = r.ReadByte ();
- int nevents = r.ReadInt ();
-
- SuspendPolicy suspend_policy = decode_suspend_policy (spolicy);
-
- EventInfo[] events = new EventInfo [nevents];
-
- for (int i = 0; i < nevents; ++i) {
- EventKind kind = (EventKind)r.ReadByte ();
- int req_id = r.ReadInt ();
-
- EventType etype = (EventType)kind;
-
- if (kind == EventKind.VM_START) {
- long thread_id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id };
- //EventHandler.VMStart (req_id, thread_id, null);
- } else if (kind == EventKind.VM_DEATH) {
- //EventHandler.VMDeath (req_id, 0, null);
- events [i] = new EventInfo (etype, req_id) { };
- } else if (kind == EventKind.THREAD_START) {
- long thread_id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = thread_id };
- //EventHandler.ThreadStart (req_id, thread_id, thread_id);
- } else if (kind == EventKind.THREAD_DEATH) {
- long thread_id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = thread_id };
- //EventHandler.ThreadDeath (req_id, thread_id, thread_id);
- } else if (kind == EventKind.ASSEMBLY_LOAD) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.AssemblyLoad (req_id, thread_id, id);
- } else if (kind == EventKind.ASSEMBLY_UNLOAD) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.AssemblyUnload (req_id, thread_id, id);
- } else if (kind == EventKind.TYPE_LOAD) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.TypeLoad (req_id, thread_id, id);
- } else if (kind == EventKind.METHOD_ENTRY) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.MethodEntry (req_id, thread_id, id);
- } else if (kind == EventKind.METHOD_EXIT) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.MethodExit (req_id, thread_id, id);
- } else if (kind == EventKind.BREAKPOINT) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- long loc = r.ReadLong ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
- //EventHandler.Breakpoint (req_id, thread_id, id, loc);
- } else if (kind == EventKind.STEP) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- long loc = r.ReadLong ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
- //EventHandler.Step (req_id, thread_id, id, loc);
- } else if (kind == EventKind.EXCEPTION) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- long loc = 0; // FIXME
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
- //EventHandler.Exception (req_id, thread_id, id, loc);
- } else if (kind == EventKind.APPDOMAIN_CREATE) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.AppDomainCreate (req_id, thread_id, id);
- } else if (kind == EventKind.APPDOMAIN_UNLOAD) {
- long thread_id = r.ReadId ();
- long id = r.ReadId ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
- //EventHandler.AppDomainUnload (req_id, thread_id, id);
- } else if (kind == EventKind.USER_BREAK) {
- long thread_id = r.ReadId ();
- long id = 0;
- long loc = 0;
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
- //EventHandler.Exception (req_id, thread_id, id, loc);
- } else if (kind == EventKind.USER_LOG) {
- long thread_id = r.ReadId ();
- int level = r.ReadInt ();
- string category = r.ReadString ();
- string message = r.ReadString ();
- events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Level = level, Category = category, Message = message };
- //EventHandler.Exception (req_id, thread_id, id, loc);
- } else if (kind == EventKind.KEEPALIVE) {
- events [i] = new EventInfo (etype, req_id) { };
- } else {
- throw new NotImplementedException ("Unknown event kind: " + kind);
- }
- }
-
- EventHandler.Events (suspend_policy, events);
- }
- }
-
- return true;
- }
-
- internal IEventHandler EventHandler {
- get; set;
- }
-
- static String CommandString (CommandSet command_set, int command)
- {
- string cmd;
- switch (command_set) {
- case CommandSet.VM:
- cmd = ((CmdVM)command).ToString ();
- break;
- case CommandSet.OBJECT_REF:
- cmd = ((CmdObjectRef)command).ToString ();
- break;
- case CommandSet.STRING_REF:
- cmd = ((CmdStringRef)command).ToString ();
- break;
- case CommandSet.THREAD:
- cmd = ((CmdThread)command).ToString ();
- break;
- case CommandSet.ARRAY_REF:
- cmd = ((CmdArrayRef)command).ToString ();
- break;
- case CommandSet.EVENT_REQUEST:
- cmd = ((CmdEventRequest)command).ToString ();
- break;
- case CommandSet.STACK_FRAME:
- cmd = ((CmdStackFrame)command).ToString ();
- break;
- case CommandSet.APPDOMAIN:
- cmd = ((CmdAppDomain)command).ToString ();
- break;
- case CommandSet.ASSEMBLY:
- cmd = ((CmdAssembly)command).ToString ();
- break;
- case CommandSet.METHOD:
- cmd = ((CmdMethod)command).ToString ();
- break;
- case CommandSet.TYPE:
- cmd = ((CmdType)command).ToString ();
- break;
- case CommandSet.MODULE:
- cmd = ((CmdModule)command).ToString ();
- break;
- case CommandSet.EVENT:
- cmd = ((CmdEvent)command).ToString ();
- break;
- default:
- cmd = command.ToString ();
- break;
- }
- return string.Format ("[{0} {1}]", command_set, cmd);
- }
-
- long total_protocol_ticks;
-
- void LogPacket (int packet_id, byte[] encoded_packet, byte[] reply_packet, CommandSet command_set, int command, Stopwatch watch) {
- watch.Stop ();
- total_protocol_ticks += watch.ElapsedTicks;
- var ts = TimeSpan.FromTicks (total_protocol_ticks);
- string msg = string.Format ("Packet: {0} sent: {1} received: {2} ms: {3} total ms: {4} {5}",
- packet_id, encoded_packet.Length, reply_packet.Length, watch.ElapsedMilliseconds,
- (ts.Seconds * 1000) + ts.Milliseconds,
- CommandString (command_set, command));
-
- LoggingStream.WriteLine (msg);
- LoggingStream.Flush ();
- }
-
- /* Send a request and call cb when a result is received */
- int Send (CommandSet command_set, int command, PacketWriter packet, Action<PacketReader> cb, int count) {
- int id = IdGenerator;
-
- Stopwatch watch = null;
- if (EnableConnectionLogging)
- watch = Stopwatch.StartNew ();
-
- byte[] encoded_packet;
- if (packet == null)
- encoded_packet = EncodePacket (id, (int)command_set, command, null, 0);
- else
- encoded_packet = EncodePacket (id, (int)command_set, command, packet.Data, packet.Offset);
-
- lock (reply_packets_monitor) {
- reply_cbs [id] = delegate (int packet_id, byte[] p) {
- if (EnableConnectionLogging)
- LogPacket (packet_id, encoded_packet, p, command_set, command, watch);
- /* Run the callback on a tp thread to avoid blocking the receive thread */
- PacketReader r = new PacketReader (p);
- cb.BeginInvoke (r, null, null);
- };
- reply_cb_counts [id] = count;
- }
-
- WritePacket (encoded_packet);
-
- return id;
- }
-
- PacketReader SendReceive (CommandSet command_set, int command, PacketWriter packet) {
- int id = IdGenerator;
- Stopwatch watch = null;
-
- if (disconnected)
- throw new VMDisconnectedException ();
-
- if (EnableConnectionLogging)
- watch = Stopwatch.StartNew ();
-
- byte[] encoded_packet;
-
- if (packet == null)
- encoded_packet = EncodePacket (id, (int)command_set, command, null, 0);
- else
- encoded_packet = EncodePacket (id, (int)command_set, command, packet.Data, packet.Offset);
-
- WritePacket (encoded_packet);
-
- int packetId = id;
-
- /* Wait for the reply packet */
- while (true) {
- lock (reply_packets_monitor) {
- if (reply_packets.ContainsKey (packetId)) {
- byte[] reply = reply_packets [packetId];
- reply_packets.Remove (packetId);
- PacketReader r = new PacketReader (reply);
-
- if (EnableConnectionLogging)
- LogPacket (packetId, encoded_packet, reply, command_set, command, watch);
- if (r.ErrorCode != 0) {
- if (ErrorHandler != null)
- ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode });
- throw new NotImplementedException ("No error handler set.");
- } else {
- return r;
- }
- } else {
- if (disconnected)
- throw new VMDisconnectedException ();
- Monitor.Wait (reply_packets_monitor);
- }
- }
- }
- }
-
- PacketReader SendReceive (CommandSet command_set, int command) {
- return SendReceive (command_set, command, null);
- }
-
- int packet_id_generator;
-
- int IdGenerator {
- get {
- return Interlocked.Increment (ref packet_id_generator);
- }
- }
-
- CattrInfo[] ReadCattrs (PacketReader r) {
- CattrInfo[] res = new CattrInfo [r.ReadInt ()];
- for (int i = 0; i < res.Length; ++i) {
- CattrInfo info = new CattrInfo ();
- info.ctor_id = r.ReadId ();
- info.ctor_args = new ValueImpl [r.ReadInt ()];
- for (int j = 0; j < info.ctor_args.Length; ++j) {
- info.ctor_args [j] = r.ReadValue ();
- }
- info.named_args = new CattrNamedArgInfo [r.ReadInt ()];
- for (int j = 0; j < info.named_args.Length; ++j) {
- CattrNamedArgInfo arg = new CattrNamedArgInfo ();
- int arg_type = r.ReadByte ();
- arg.is_property = arg_type == 0x54;
- arg.id = r.ReadId ();
- arg.value = r.ReadValue ();
- info.named_args [j] = arg;
- }
- res [i] = info;
- }
- return res;
- }
-
- static ElementType TypeCodeToElementType (TypeCode c) {
- switch (c) {
- case TypeCode.Boolean:
- return ElementType.Boolean;
- case TypeCode.Char:
- return ElementType.Char;
- case TypeCode.SByte:
- return ElementType.I1;
- case TypeCode.Byte:
- return ElementType.U1;
- case TypeCode.Int16:
- return ElementType.I2;
- case TypeCode.UInt16:
- return ElementType.U2;
- case TypeCode.Int32:
- return ElementType.I4;
- case TypeCode.UInt32:
- return ElementType.U4;
- case TypeCode.Int64:
- return ElementType.I8;
- case TypeCode.UInt64:
- return ElementType.U8;
- case TypeCode.Single:
- return ElementType.R4;
- case TypeCode.Double:
- return ElementType.R8;
- default:
- throw new NotImplementedException ();
- }
- }
-
- /*
- * Implementation of debugger commands
- */
-
- internal VersionInfo VM_GetVersion () {
- var res = SendReceive (CommandSet.VM, (int)CmdVM.VERSION, null);
- VersionInfo info = new VersionInfo ();
- info.VMVersion = res.ReadString ();
- info.MajorVersion = res.ReadInt ();
- info.MinorVersion = res.ReadInt ();
- return info;
- }
-
- internal void VM_SetProtocolVersion (int major, int minor) {
- SendReceive (CommandSet.VM, (int)CmdVM.SET_PROTOCOL_VERSION, new PacketWriter ().WriteInt (major).WriteInt (minor));
- }
-
- internal long[] VM_GetThreads () {
- var res = SendReceive (CommandSet.VM, (int)CmdVM.ALL_THREADS, null);
- int len = res.ReadInt ();
- long[] arr = new long [len];
- for (int i = 0; i < len; ++i)
- arr [i] = res.ReadId ();
- return arr;
- }
-
- internal void VM_Suspend () {
- SendReceive (CommandSet.VM, (int)CmdVM.SUSPEND);
- }
-
- internal void VM_Resume () {
- SendReceive (CommandSet.VM, (int)CmdVM.RESUME);
- }
-
- internal void VM_Exit (int exitCode) {
- SendReceive (CommandSet.VM, (int)CmdVM.EXIT, new PacketWriter ().WriteInt (exitCode));
- }
-
- internal void VM_Dispose () {
- SendReceive (CommandSet.VM, (int)CmdVM.DISPOSE);
- }
-
- internal ValueImpl VM_InvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, out ValueImpl exc) {
- exc = null;
- PacketReader r = SendReceive (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments));
- if (r.ReadByte () == 0) {
- exc = r.ReadValue ();
- return null;
- } else {
- return r.ReadValue ();
- }
- }
-
- internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state);
-
- internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
- return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) {
- ValueImpl v, exc;
-
- if (r.ErrorCode != 0) {
- callback (null, null, (ErrorCode)r.ErrorCode, state);
- } else {
- if (r.ReadByte () == 0) {
- exc = r.ReadValue ();
- v = null;
- } else {
- v = r.ReadValue ();
- exc = null;
- }
-
- callback (v, exc, 0, state);
- }
- }, 1);
- }
-
- internal int VM_BeginInvokeMethods (long thread, long[] methods, ValueImpl this_arg, List<ValueImpl[]> arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
- // FIXME: Merge this with INVOKE_METHOD
- var w = new PacketWriter ();
- w.WriteId (thread);
- w.WriteInt ((int)flags);
- w.WriteInt (methods.Length);
- for (int i = 0; i < methods.Length; ++i) {
- w.WriteId (methods [i]);
- w.WriteValue (this_arg);
- w.WriteInt (arguments [i].Length);
- w.WriteValues (arguments [i]);
- }
- return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) {
- ValueImpl v, exc;
-
- if (r.ErrorCode != 0) {
- callback (null, null, (ErrorCode)r.ErrorCode, state);
- } else {
- if (r.ReadByte () == 0) {
- exc = r.ReadValue ();
- v = null;
- } else {
- v = r.ReadValue ();
- exc = null;
- }
-
- callback (v, exc, 0, state);
- }
- }, methods.Length);
- }
-
- internal void VM_AbortInvoke (long thread, int id)
- {
- SendReceive (CommandSet.VM, (int)CmdVM.ABORT_INVOKE, new PacketWriter ().WriteId (thread).WriteInt (id));
- }
-
- internal void SetSocketTimeouts (int send_timeout, int receive_timeout, int keepalive_interval)
- {
- TransportSetTimeouts (send_timeout, receive_timeout);
- SendReceive (CommandSet.VM, (int)CmdVM.SET_KEEPALIVE, new PacketWriter ().WriteId (keepalive_interval));
- }
-
- internal long[] VM_GetTypesForSourceFile (string fname, bool ignoreCase) {
- var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES_FOR_SOURCE_FILE, new PacketWriter ().WriteString (fname).WriteBool (ignoreCase));
- int count = res.ReadInt ();
- long[] types = new long [count];
- for (int i = 0; i < count; ++i)
- types [i] = res.ReadId ();
- return types;
- }
-
- internal long[] VM_GetTypes (string name, bool ignoreCase) {
- var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES, new PacketWriter ().WriteString (name).WriteBool (ignoreCase));
- int count = res.ReadInt ();
- long[] types = new long [count];
- for (int i = 0; i < count; ++i)
- types [i] = res.ReadId ();
- return types;
- }
-
- /*
- * DOMAIN
- */
-
- internal long RootDomain {
- get {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ROOT_DOMAIN, null).ReadId ();
- }
- }
-
- internal string Domain_GetName (long id) {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_FRIENDLY_NAME, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- internal long[] Domain_GetAssemblies (long id) {
- var res = SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ASSEMBLIES, new PacketWriter ().WriteId (id));
- int count = res.ReadInt ();
- long[] assemblies = new long [count];
- for (int i = 0; i < count; ++i)
- assemblies [i] = res.ReadId ();
- return assemblies;
- }
-
- internal long Domain_GetEntryAssembly (long id) {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ENTRY_ASSEMBLY, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Domain_GetCorlib (long id) {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_CORLIB, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Domain_CreateString (long id, string s) {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.CREATE_STRING, new PacketWriter ().WriteId (id).WriteString (s)).ReadId ();
- }
-
- internal long Domain_CreateBoxedValue (long id, long type_id, ValueImpl v) {
- return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.CREATE_BOXED_VALUE, new PacketWriter ().WriteId (id).WriteId (type_id).WriteValue (v)).ReadId ();
- }
-
- /*
- * METHOD
- */
-
- internal string Method_GetName (long id) {
- return SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- internal long Method_GetDeclaringType (long id) {
- return SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_DECLARING_TYPE, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal DebugInfo Method_GetDebugInfo (long id) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_DEBUG_INFO, new PacketWriter ().WriteId (id));
-
- DebugInfo info = new DebugInfo ();
- info.max_il_offset = res.ReadInt ();
-
- SourceInfo[] sources = null;
- if (Version.AtLeast (2, 13)) {
- int n = res.ReadInt ();
- sources = new SourceInfo [n];
- for (int i = 0; i < n; ++i) {
- sources [i].source_file = res.ReadString ();
- if (Version.AtLeast (2, 14)) {
- sources [i].hash = new byte [16];
- for (int j = 0; j < 16; ++j)
- sources [i].hash [j] = (byte)res.ReadByte ();
- }
- }
- } else {
- sources = new SourceInfo [1];
- sources [0].source_file = res.ReadString ();
- }
-
- int n_il_offsets = res.ReadInt ();
- info.il_offsets = new int [n_il_offsets];
- info.line_numbers = new int [n_il_offsets];
- info.source_files = new SourceInfo [n_il_offsets];
- info.column_numbers = new int [n_il_offsets];
- for (int i = 0; i < n_il_offsets; ++i) {
- info.il_offsets [i] = res.ReadInt ();
- info.line_numbers [i] = res.ReadInt ();
- if (Version.AtLeast (2, 12)) {
- int idx = res.ReadInt ();
- info.source_files [i] = idx >= 0 ? sources [idx] : default (SourceInfo);
- } else {
- info.source_files [i] = sources [0];
- }
- if (Version.AtLeast (2, 19))
- info.column_numbers [i] = res.ReadInt ();
- else
- info.column_numbers [i] = 0;
- }
-
- return info;
- }
-
- internal ParamInfo Method_GetParamInfo (long id) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_PARAM_INFO, new PacketWriter ().WriteId (id));
-
- ParamInfo info = new ParamInfo ();
- info.call_conv = res.ReadInt ();
- info.param_count = res.ReadInt ();
- info.generic_param_count = res.ReadInt ();
- info.ret_type = res.ReadId ();
- info.param_types = new long [info.param_count];
- for (int i = 0; i < info.param_count; ++i)
- info.param_types [i] = res.ReadId ();
- info.param_names = new string [info.param_count];
- for (int i = 0; i < info.param_count; ++i)
- info.param_names [i] = res.ReadString ();
-
- return info;
- }
-
- internal LocalsInfo Method_GetLocalsInfo (long id) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_LOCALS_INFO, new PacketWriter ().WriteId (id));
-
- LocalsInfo info = new LocalsInfo ();
- int nlocals = res.ReadInt ();
- info.types = new long [nlocals];
- for (int i = 0; i < nlocals; ++i)
- info.types [i] = res.ReadId ();
- info.names = new string [nlocals];
- for (int i = 0; i < nlocals; ++i)
- info.names [i] = res.ReadString ();
- info.live_range_start = new int [nlocals];
- info.live_range_end = new int [nlocals];
- for (int i = 0; i < nlocals; ++i) {
- info.live_range_start [i] = res.ReadInt ();
- info.live_range_end [i] = res.ReadInt ();
- }
-
- return info;
- }
-
- internal MethodInfo Method_GetInfo (long id) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_INFO, new PacketWriter ().WriteId (id));
-
- MethodInfo info = new MethodInfo ();
- info.attributes = res.ReadInt ();
- info.iattributes = res.ReadInt ();
- info.token = res.ReadInt ();
- if (Version.AtLeast (2, 12)) {
- int attrs = res.ReadByte ();
- if ((attrs & (1 << 0)) != 0)
- info.is_gmd = true;
- if ((attrs & (1 << 1)) != 0)
- info.is_generic_method = true;
- info.gmd = res.ReadId ();
- if (Version.AtLeast (2, 15)) {
- if (info.is_generic_method) {
- int n = res.ReadInt ();
- info.type_args = res.ReadIds (n);
- }
- }
- }
- return info;
- }
-
- internal MethodBodyInfo Method_GetBody (long id) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_BODY, new PacketWriter ().WriteId (id));
-
- MethodBodyInfo info = new MethodBodyInfo ();
- info.il = new byte [res.ReadInt ()];
- for (int i = 0; i < info.il.Length; ++i)
- info.il [i] = (byte)res.ReadByte ();
-
- if (Version.AtLeast (2, 18)) {
- info.clauses = new ExceptionClauseInfo [res.ReadInt ()];
-
- for (int i = 0; i < info.clauses.Length; ++i) {
- var clause = new ExceptionClauseInfo {
- flags = (ExceptionClauseFlags) res.ReadInt (),
- try_offset = res.ReadInt (),
- try_length = res.ReadInt (),
- handler_offset = res.ReadInt (),
- handler_length = res.ReadInt (),
- };
-
- if (clause.flags == ExceptionClauseFlags.None)
- clause.catch_type_id = res.ReadId ();
- else if (clause.flags == ExceptionClauseFlags.Filter)
- clause.filter_offset = res.ReadInt ();
-
- info.clauses [i] = clause;
- }
- } else
- info.clauses = new ExceptionClauseInfo [0];
-
- return info;
- }
-
- internal ResolvedToken Method_ResolveToken (long id, int token) {
- var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.RESOLVE_TOKEN, new PacketWriter ().WriteId (id).WriteInt (token));
-
- TokenType type = (TokenType)res.ReadByte ();
- switch (type) {
- case TokenType.STRING:
- return new ResolvedToken () { Type = type, Str = res.ReadString () };
- case TokenType.TYPE:
- case TokenType.METHOD:
- case TokenType.FIELD:
- return new ResolvedToken () { Type = type, Id = res.ReadId () };
- case TokenType.UNKNOWN:
- return new ResolvedToken () { Type = type };
- default:
- throw new NotImplementedException ();
- }
- }
-
- internal CattrInfo[] Method_GetCustomAttributes (long id, long attr_type_id, bool inherit) {
- PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_CATTRS, new PacketWriter ().WriteId (id).WriteId (attr_type_id));
- return ReadCattrs (r);
- }
-
- /*
- * THREAD
- */
-
- internal string Thread_GetName (long id) {
- return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- internal FrameInfo[] Thread_GetFrameInfo (long id, int start_frame, int length) {
- var res = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length));
- int count = res.ReadInt ();
-
- var frames = new FrameInfo [count];
- for (int i = 0; i < count; ++i) {
- var f = new FrameInfo ();
- f.id = res.ReadInt ();
- f.method = res.ReadId ();
- f.il_offset = res.ReadInt ();
- f.flags = (StackFrameFlags)res.ReadByte ();
- frames [i] = f;
- }
-
- return frames;
- }
-
- internal int Thread_GetState (long id) {
- return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_STATE, new PacketWriter ().WriteId (id)).ReadInt ();
- }
-
- internal ThreadInfo Thread_GetInfo (long id) {
- PacketReader r = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_INFO, new PacketWriter ().WriteId (id));
-
- ThreadInfo res = new ThreadInfo () { is_thread_pool = r.ReadByte () > 0 ? true : false };
-
- return res;
- }
-
- internal long Thread_GetId (long id) {
- return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_ID, new PacketWriter ().WriteId (id)).ReadLong ();
- }
-
- internal long Thread_GetTID (long id) {
- return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_TID, new PacketWriter ().WriteId (id)).ReadLong ();
- }
-
- /*
- * MODULE
- */
-
- internal ModuleInfo Module_GetInfo (long id) {
- PacketReader r = SendReceive (CommandSet.MODULE, (int)CmdModule.GET_INFO, new PacketWriter ().WriteId (id));
- ModuleInfo info = new ModuleInfo { Name = r.ReadString (), ScopeName = r.ReadString (), FQName = r.ReadString (), Guid = r.ReadString (), Assembly = r.ReadId () };
- return info;
- }
-
- /*
- * ASSEMBLY
- */
-
- internal string Assembly_GetLocation (long id) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_LOCATION, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- internal long Assembly_GetEntryPoint (long id) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_ENTRY_POINT, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Assembly_GetManifestModule (long id) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_MANIFEST_MODULE, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Assembly_GetObject (long id) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_OBJECT, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Assembly_GetType (long id, string name, bool ignoreCase) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_TYPE, new PacketWriter ().WriteId (id).WriteString (name).WriteBool (ignoreCase)).ReadId ();
- }
-
- internal string Assembly_GetName (long id) {
- return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- /*
- * TYPE
- */
-
- internal TypeInfo Type_GetInfo (long id) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INFO, new PacketWriter ().WriteId (id));
- TypeInfo res = new TypeInfo ();
-
- res.ns = r.ReadString ();
- res.name = r.ReadString ();
- res.full_name = r.ReadString ();
- res.assembly = r.ReadId ();
- res.module = r.ReadId ();
- res.base_type = r.ReadId ();
- res.element_type = r.ReadId ();
- res.token = r.ReadInt ();
- res.rank = r.ReadByte ();
- res.attributes = r.ReadInt ();
- int b = r.ReadByte ();
- res.is_byref = (b & 1) != 0;
- res.is_pointer = (b & 2) != 0;
- res.is_primitive = (b & 4) != 0;
- res.is_valuetype = (b & 8) != 0;
- res.is_enum = (b & 16) != 0;
- res.is_gtd = (b & 32) != 0;
- res.is_generic_type = (b & 64) != 0;
-
- int nested_len = r.ReadInt ();
- res.nested = new long [nested_len];
- for (int i = 0; i < nested_len; ++i)
- res.nested [i] = r.ReadId ();
-
- if (Version.AtLeast (2, 12))
- res.gtd = r.ReadId ();
- if (Version.AtLeast (2, 15) && res.is_generic_type) {
- int n = r.ReadInt ();
- res.type_args = r.ReadIds (n);
- }
-
- return res;
- }
-
- internal long[] Type_GetMethods (long id) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_METHODS, new PacketWriter ().WriteId (id));
-
- int n = r.ReadInt ();
- long[] res = new long [n];
- for (int i = 0; i < n; ++i)
- res [i] = r.ReadId ();
- return res;
- }
-
- internal long[] Type_GetFields (long id, out string[] names, out long[] types, out int[] attrs) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_FIELDS, new PacketWriter ().WriteId (id));
-
- int n = r.ReadInt ();
- long[] res = new long [n];
- names = new string [n];
- types = new long [n];
- attrs = new int [n];
- for (int i = 0; i < n; ++i) {
- res [i] = r.ReadId ();
- names [i] = r.ReadString ();
- types [i] = r.ReadId ();
- attrs [i] = r.ReadInt ();
- }
- return res;
- }
-
- internal PropInfo[] Type_GetProperties (long id) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_PROPERTIES, new PacketWriter ().WriteId (id));
-
- int n = r.ReadInt ();
- PropInfo[] res = new PropInfo [n];
- for (int i = 0; i < n; ++i) {
- res [i] = new PropInfo ();
- res [i].id = r.ReadId ();
- res [i].name = r.ReadString ();
- res [i].get_method = r.ReadId ();
- res [i].set_method = r.ReadId ();
- res [i].attrs = r.ReadInt ();
- }
-
- return res;
- }
-
- internal long Type_GetObject (long id) {
- return SendReceive (CommandSet.TYPE, (int)CmdType.GET_OBJECT, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
- int len = fields.Length;
- PacketReader r;
- if (thread_id != 0)
- r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
- else
- r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
-
- ValueImpl[] res = new ValueImpl [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadValue ();
- return res;
- }
-
- internal void Type_SetValues (long id, long[] fields, ValueImpl[] values) {
- SendReceive (CommandSet.TYPE, (int)CmdType.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (fields.Length).WriteIds (fields).WriteValues (values));
- }
-
- internal string[] Type_GetSourceFiles (long id, bool return_full_paths) {
- var r = SendReceive (CommandSet.TYPE, return_full_paths ? (int)CmdType.GET_SOURCE_FILES_2 : (int)CmdType.GET_SOURCE_FILES, new PacketWriter ().WriteId (id));
- int len = r.ReadInt ();
- string[] res = new string [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadString ();
- return res;
- }
-
- internal bool Type_IsAssignableFrom (long id, long c_id) {
- return SendReceive (CommandSet.TYPE, (int)CmdType.IS_ASSIGNABLE_FROM, new PacketWriter ().WriteId (id).WriteId (c_id)).ReadByte () > 0;
- }
-
- internal CattrInfo[] Type_GetCustomAttributes (long id, long attr_type_id, bool inherit) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_CATTRS, new PacketWriter ().WriteId (id).WriteId (attr_type_id));
- return ReadCattrs (r);
- }
-
- internal CattrInfo[] Type_GetFieldCustomAttributes (long id, long field_id, long attr_type_id, bool inherit) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_FIELD_CATTRS, new PacketWriter ().WriteId (id).WriteId (field_id).WriteId (attr_type_id));
- return ReadCattrs (r);
- }
-
- internal CattrInfo[] Type_GetPropertyCustomAttributes (long id, long field_id, long attr_type_id, bool inherit) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_PROPERTY_CATTRS, new PacketWriter ().WriteId (id).WriteId (field_id).WriteId (attr_type_id));
- return ReadCattrs (r);
- }
-
- public long[] Type_GetMethodsByNameFlags (long id, string name, int flags, bool ignoreCase) {
- flags |= ignoreCase ? (int)BindingFlagsExtensions.BINDING_FLAGS_IGNORE_CASE : 0;
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.CMD_TYPE_GET_METHODS_BY_NAME_FLAGS, new PacketWriter ().WriteId (id).WriteString (name).WriteInt (flags));
- int len = r.ReadInt ();
- long[] res = new long [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadId ();
- return res;
- }
-
- internal long[] Type_GetInterfaces (long id) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INTERFACES, new PacketWriter ().WriteId (id));
- int len = r.ReadInt ();
- return r.ReadIds (len);
- }
-
- internal IfaceMapInfo[] Type_GetInterfaceMap (long id, long[] ids) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INTERFACE_MAP, new PacketWriter ().WriteId (id).WriteInt (ids.Length).WriteIds (ids));
- var res = new IfaceMapInfo [ids.Length];
- for (int i = 0; i < ids.Length; ++i) {
- int n = r.ReadInt ();
-
- res [i].iface_id = ids [i];
- res [i].iface_methods = r.ReadIds (n);
- res [i].target_methods = r.ReadIds (n);
- }
-
- return res;
- }
-
- internal bool Type_IsInitialized (long id) {
- PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.IS_INITIALIZED, new PacketWriter ().WriteId (id));
- return r.ReadInt () == 1;
- }
-
- /*
- * EVENTS
- */
-
- internal int EnableEvent (EventType etype, SuspendPolicy suspend_policy, List<Modifier> mods) {
- var w = new PacketWriter ().WriteByte ((byte)etype).WriteByte ((byte)suspend_policy);
- if (mods != null) {
- if (mods.Count > 255)
- throw new NotImplementedException ();
- w.WriteByte ((byte)mods.Count);
- foreach (Modifier mod in mods) {
- if (mod is CountModifier) {
- w.WriteByte ((byte)ModifierKind.COUNT);
- w.WriteInt ((mod as CountModifier).Count);
- } else if (mod is LocationModifier) {
- w.WriteByte ((byte)ModifierKind.LOCATION_ONLY);
- w.WriteId ((mod as LocationModifier).Method);
- w.WriteLong ((mod as LocationModifier).Location);
- } else if (mod is StepModifier) {
- w.WriteByte ((byte)ModifierKind.STEP);
- w.WriteId ((mod as StepModifier).Thread);
- w.WriteInt ((mod as StepModifier).Size);
- w.WriteInt ((mod as StepModifier).Depth);
- if (Version.AtLeast (2, 16))
- w.WriteInt ((mod as StepModifier).Filter);
- } else if (mod is ThreadModifier) {
- w.WriteByte ((byte)ModifierKind.THREAD_ONLY);
- w.WriteId ((mod as ThreadModifier).Thread);
- } else if (mod is ExceptionModifier) {
- var em = mod as ExceptionModifier;
- w.WriteByte ((byte)ModifierKind.EXCEPTION_ONLY);
- w.WriteId (em.Type);
- if (Version.MajorVersion > 2 || Version.MinorVersion > 0) {
- /* This is only supported in protocol version 2.1 */
- w.WriteBool (em.Caught);
- w.WriteBool (em.Uncaught);
- } else if (!em.Caught || !em.Uncaught) {
- throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
- }
- } else if (mod is AssemblyModifier) {
- w.WriteByte ((byte)ModifierKind.ASSEMBLY_ONLY);
- var amod = (mod as AssemblyModifier);
- w.WriteInt (amod.Assemblies.Length);
- foreach (var id in amod.Assemblies)
- w.WriteId (id);
- } else if (mod is SourceFileModifier) {
- w.WriteByte ((byte)ModifierKind.SOURCE_FILE_ONLY);
- var smod = (mod as SourceFileModifier);
- w.WriteInt (smod.SourceFiles.Length);
- foreach (var s in smod.SourceFiles)
- w.WriteString (s);
- } else if (mod is TypeNameModifier) {
- w.WriteByte ((byte)ModifierKind.TYPE_NAME_ONLY);
- var tmod = (mod as TypeNameModifier);
- w.WriteInt (tmod.TypeNames.Length);
- foreach (var s in tmod.TypeNames)
- w.WriteString (s);
- } else {
- throw new NotImplementedException ();
- }
- }
- } else {
- w.WriteByte (0);
- }
- return SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.SET, w).ReadInt ();
- }
-
- internal void ClearEventRequest (EventType etype, int req_id) {
- SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.CLEAR, new PacketWriter ().WriteByte ((byte)etype).WriteInt (req_id));
- }
-
- internal void ClearAllBreakpoints () {
- SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.CLEAR_ALL_BREAKPOINTS, new PacketWriter ());
- }
-
- /*
- * STACK FRAME
- */
- internal ValueImpl StackFrame_GetThis (long thread_id, long id) {
- PacketReader r = SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id));
- return r.ReadValue ();
- }
-
- internal ValueImpl[] StackFrame_GetValues (long thread_id, long id, int[] pos) {
- /* pos < 0 -> argument at pos (-pos) - 1 */
- /* pos >= 0 -> local at pos */
- int len = pos.Length;
- PacketReader r = SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos));
-
- ValueImpl[] res = new ValueImpl [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadValue ();
- return res;
- }
-
- internal void StackFrame_SetValues (long thread_id, long id, int[] pos, ValueImpl[] values) {
- /* pos < 0 -> argument at pos (-pos) - 1 */
- /* pos >= 0 -> local at pos */
- int len = pos.Length;
- SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos).WriteValues (values));
- }
-
- /*
- * ARRAYS
- */
- internal int[] Array_GetLength (long id, out int rank, out int[] lower_bounds) {
- var r = SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.GET_LENGTH, new PacketWriter ().WriteId (id));
- rank = r.ReadInt ();
- int[] res = new int [rank];
- lower_bounds = new int [rank];
- for (int i = 0; i < rank; ++i) {
- res [i] = r.ReadInt ();
- lower_bounds [i] = r.ReadInt ();
- }
- return res;
- }
-
- internal ValueImpl[] Array_GetValues (long id, int index, int len) {
- var r = SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (len));
- ValueImpl[] res = new ValueImpl [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadValue ();
- return res;
- }
-
- internal void Array_SetValues (long id, int index, ValueImpl[] values) {
- SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (values.Length).WriteValues (values));
- }
-
- /*
- * STRINGS
- */
- internal string String_GetValue (long id) {
- return SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_VALUE, new PacketWriter ().WriteId (id)).ReadString ();
- }
-
- internal int String_GetLength (long id) {
- return (int)SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_LENGTH, new PacketWriter ().WriteId (id)).ReadLong ();
- }
-
- internal char[] String_GetChars (long id, int index, int length) {
- var r = SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_CHARS, new PacketWriter ().WriteId (id).WriteLong (index).WriteLong (length));
- var res = new char [length];
- for (int i = 0; i < length; ++i)
- res [i] = (char)r.ReadShort ();
- return res;
- }
-
- /*
- * OBJECTS
- */
- internal long Object_GetType (long id) {
- return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_TYPE, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal long Object_GetDomain (long id) {
- return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
- }
-
- internal ValueImpl[] Object_GetValues (long id, long[] fields) {
- int len = fields.Length;
- PacketReader r = SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
-
- ValueImpl[] res = new ValueImpl [len];
- for (int i = 0; i < len; ++i)
- res [i] = r.ReadValue ();
- return res;
- }
-
- internal void Object_SetValues (long id, long[] fields, ValueImpl[] values) {
- SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (fields.Length).WriteIds (fields).WriteValues (values));
- }
-
- internal bool Object_IsCollected (long id) {
- return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.IS_COLLECTED, new PacketWriter ().WriteId (id)).ReadInt () == 1;
- }
-
- internal long Object_GetAddress (long id) {
- return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_ADDRESS, new PacketWriter ().WriteId (id)).ReadLong ();
- }
-
- internal ObjectRefInfo Object_GetInfo (long id) {
- ObjectRefInfo res = new ObjectRefInfo ();
- PacketReader r = SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_INFO, new PacketWriter ().WriteId (id));
-
- res.type_id = r.ReadId ();
- res.domain_id = r.ReadId ();
- return res;
- }
-
- public void ForceDisconnect ()
- {
- TransportClose ();
- }
- }
-
- class TcpConnection : Connection
- {
- Socket socket;
-
- internal TcpConnection (Socket socket)
- {
- this.socket = socket;
- //socket.SetSocketOption (SocketOptionLevel.IP, SocketOptionName.NoDelay, 1);
- }
-
- internal EndPoint EndPoint {
- get {
- return socket.RemoteEndPoint;
- }
- }
-
- protected override int TransportSend (byte[] buf, int buf_offset, int len)
- {
- return socket.Send (buf, buf_offset, len, SocketFlags.None);
- }
-
- protected override int TransportReceive (byte[] buf, int buf_offset, int len)
- {
- return socket.Receive (buf, buf_offset, len, SocketFlags.None);
- }
-
- protected override void TransportSetTimeouts (int send_timeout, int receive_timeout)
- {
- socket.SendTimeout = send_timeout;
- socket.ReceiveTimeout = receive_timeout;
- }
-
- protected override void TransportClose ()
- {
- socket.Close ();
- }
- }
-
- /* This is the interface exposed by the debugger towards the debugger agent */
- interface IEventHandler
- {
- void Events (SuspendPolicy suspend_policy, EventInfo[] events);
-
- void VMDisconnect (int req_id, long thread_id, string vm_uri);
- }
-}
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs b/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
deleted file mode 100644
index ac97cb0..0000000
--- a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
+++ /dev/null
@@ -1,386 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-using C = Mono.Cecil;
-using Mono.Cecil.Metadata;
-
-namespace Mono.Debugger.Soft
-{
- public class MethodMirror : Mirror
- {
- string name;
- MethodInfo info;
- TypeMirror declaring_type;
- DebugInfo debug_info;
- C.MethodDefinition meta;
- CustomAttributeDataMirror[] cattrs;
- ParameterInfoMirror[] param_info;
- ParameterInfoMirror ret_param;
- LocalVariable[] locals;
- IList<Location> locations;
- MethodBodyMirror body;
- MethodMirror gmd;
- TypeMirror[] type_args;
-
- internal MethodMirror (VirtualMachine vm, long id) : base (vm, id) {
- }
-
- public string Name {
- get {
- if (name == null)
- name = vm.conn.Method_GetName (id);
- return name;
- }
- }
-
- public TypeMirror DeclaringType {
- get {
- if (declaring_type == null)
- declaring_type = vm.GetType (vm.conn.Method_GetDeclaringType (id));
- return declaring_type;
- }
- }
-
- public TypeMirror ReturnType {
- get {
- return ReturnParameter.ParameterType;
- }
- }
-
- // FIXME:
- public string FullName {
- get {
- string type_namespace = DeclaringType.Namespace;
- string type_name = DeclaringType.Name;
- StringBuilder sb = new StringBuilder ();
- sb.Append (ReturnType.Name);
- sb.Append (' ');
- if (type_namespace != String.Empty)
- sb.Append (type_namespace + ".");
- sb.Append(type_name);
- sb.Append(":");
- sb.Append(Name);
- sb.Append(" ");
- sb.Append("(");
- for (var i = 0; i < param_info.Length; i++) {
- sb.Append(param_info[i].ParameterType.Name);
- if (i != param_info.Length - 1)
- sb.Append(", ");
- }
- sb.Append(")");
- return sb.ToString ();
- }
- }
-
- /*
- * Creating the custom attributes themselves could modify the behavior of the
- * debuggee, so we return objects similar to the CustomAttributeData objects
- * used by the reflection-only functionality on .net.
- * Since protocol version 2.21
- */
- public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
- return GetCAttrs (null, inherit);
- }
-
- /* Since protocol version 2.21 */
- public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) {
- if (attributeType == null)
- throw new ArgumentNullException ("attributeType");
- return GetCAttrs (attributeType, inherit);
- }
-
- CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
- if (cattrs == null && meta != null && !Metadata.HasCustomAttributes)
- cattrs = new CustomAttributeDataMirror [0];
-
- // FIXME: Handle inherit
- if (cattrs == null) {
- CattrInfo[] info = vm.conn.Method_GetCustomAttributes (id, 0, false);
- cattrs = CustomAttributeDataMirror.Create (vm, info);
- }
- var res = new List<CustomAttributeDataMirror> ();
- foreach (var attr in cattrs)
- if (type == null || attr.Constructor.DeclaringType == type)
- res.Add (attr);
- return res.ToArray ();
- }
-
- MethodInfo GetInfo () {
- if (info == null)
- info = vm.conn.Method_GetInfo (id);
-
- return info;
- }
-
- public int MetadataToken {
- get {
- return GetInfo ().token;
- }
- }
-
- public MethodAttributes Attributes {
- get {
- return (MethodAttributes) GetInfo ().attributes;
- }
- }
-
- public bool IsPublic {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Public;
- }
- }
- public bool IsPrivate {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Private;
- }
- }
- public bool IsFamily {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Family;
- }
- }
- public bool IsAssembly {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Assembly;
- }
- }
- public bool IsFamilyAndAssembly {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.FamANDAssem;
- }
- }
- public bool IsFamilyOrAssembly {
- get {
- return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.FamORAssem;
- }
- }
- public bool IsStatic {
- get {
- return (Attributes & MethodAttributes.Static) != 0;
- }
- }
- public bool IsFinal {
- get {
- return (Attributes & MethodAttributes.Final) != 0;
- }
- }
- public bool IsVirtual {
- get {
- return (Attributes & MethodAttributes.Virtual) != 0;
- }
- }
- public bool IsHideBySig {
- get {
- return (Attributes & MethodAttributes.HideBySig) != 0;
- }
- }
- public bool IsAbstract {
- get {
- return (Attributes & MethodAttributes.Abstract) != 0;
- }
- }
- public bool IsSpecialName {
- get {
- return (Attributes & MethodAttributes.SpecialName) != 0;
- }
- }
-
- public bool IsConstructor {
- get {
- int attr = (int)Attributes;
- return ((attr & (int)MethodAttributes.RTSpecialName) != 0
- && (Name == ".ctor"));
- }
- }
-
- // Since protocol version 2.12
- public bool IsGenericMethodDefinition {
- get {
- vm.CheckProtocolVersion (2, 12);
- return GetInfo ().is_gmd;
- }
- }
-
- // Since protocol version 2.12
- public bool IsGenericMethod {
- get {
- vm.CheckProtocolVersion (2, 12);
- return GetInfo ().is_generic_method;
- }
- }
-
- public MethodImplAttributes GetMethodImplementationFlags() {
- return (MethodImplAttributes)GetInfo ().iattributes;
- }
-
- public ParameterInfoMirror[] GetParameters () {
- if (param_info == null) {
- var pi = vm.conn.Method_GetParamInfo (id);
- param_info = new ParameterInfoMirror [pi.param_count];
- // Return
- ret_param = new ParameterInfoMirror (this, -1, vm.GetType (pi.ret_type), null, ParameterAttributes.Retval);
- // FIXME: this
- // FIXME: Attributes
- for (int i = 0; i < pi.param_count; ++i) {
- param_info [i] = new ParameterInfoMirror (this, i, vm.GetType (pi.param_types [i]), pi.param_names [i], 0);
- }
- }
-
- return param_info;
- }
-
- public ParameterInfoMirror ReturnParameter {
- get {
- if (ret_param == null)
- GetParameters ();
- return ret_param;
- }
- }
-
- public LocalVariable[] GetLocals () {
- if (locals == null) {
- LocalsInfo li = new LocalsInfo ();
- try {
- li = vm.conn.Method_GetLocalsInfo (id);
- } catch (CommandException) {
- throw new AbsentInformationException ();
- }
-
- // Add the arguments as well
- var pi = vm.conn.Method_GetParamInfo (id);
-
- locals = new LocalVariable [pi.param_count + li.names.Length];
-
- for (int i = 0; i < pi.param_count; ++i)
- locals [i] = new LocalVariable (vm, this, i, pi.param_types [i], pi.param_names [i], -1, -1, true);
-
- for (int i = 0; i < li.names.Length; ++i)
- locals [i + pi.param_count] = new LocalVariable (vm, this, i, li.types [i], li.names [i], li.live_range_start [i], li.live_range_end [i], false);
- }
- return locals;
- }
-
- public LocalVariable GetLocal (string name) {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- GetLocals ();
-
- LocalVariable res = null;
- for (int i = 0; i < locals.Length; ++i) {
- if (locals [i].Name == name) {
- if (res != null)
- throw new AmbiguousMatchException ("More that one local has the name '" + name + "'.");
- res = locals [i];
- }
- }
-
- return res;
- }
-
- public MethodBodyMirror GetMethodBody () {
- if (body == null) {
- MethodBodyInfo info = vm.conn.Method_GetBody (id);
-
- body = new MethodBodyMirror (vm, this, info);
- }
- return body;
- }
-
- public MethodMirror GetGenericMethodDefinition () {
- vm.CheckProtocolVersion (2, 12);
- if (gmd == null) {
- if (info.gmd == 0)
- throw new InvalidOperationException ();
- gmd = vm.GetMethod (info.gmd);
- }
- return gmd;
- }
-
- // Since protocol version 2.15
- public TypeMirror[] GetGenericArguments () {
- vm.CheckProtocolVersion (2, 15);
- if (type_args == null)
- type_args = vm.GetTypes (GetInfo ().type_args);
- return type_args;
- }
-
- public IList<int> ILOffsets {
- get {
- if (debug_info == null)
- debug_info = vm.conn.Method_GetDebugInfo (id);
- return Array.AsReadOnly (debug_info.il_offsets);
- }
- }
-
- public IList<int> LineNumbers {
- get {
- if (debug_info == null)
- debug_info = vm.conn.Method_GetDebugInfo (id);
- return Array.AsReadOnly (debug_info.line_numbers);
- }
- }
-
- public string SourceFile {
- get {
- if (debug_info == null)
- debug_info = vm.conn.Method_GetDebugInfo (id);
- return debug_info.source_files.Length > 0 ? debug_info.source_files [0].source_file : null;
- }
- }
-
- public IList<Location> Locations {
- get {
- if (locations == null) {
- var il_offsets = ILOffsets;
- var line_numbers = LineNumbers;
- IList<Location> res = new Location [ILOffsets.Count];
- for (int i = 0; i < il_offsets.Count; ++i)
- res [i] = new Location (vm, this, -1, il_offsets [i], debug_info.source_files [i].source_file, line_numbers [i], debug_info.column_numbers [i], debug_info.source_files [i].hash);
- locations = res;
- }
- return locations;
- }
- }
-
- internal int il_offset_to_line_number (int il_offset, out string src_file, out byte[] src_hash, out int column_number) {
- if (debug_info == null)
- debug_info = vm.conn.Method_GetDebugInfo (id);
-
- // FIXME: Optimize this
- src_file = null;
- src_hash = null;
- column_number = 0;
- for (int i = debug_info.il_offsets.Length - 1; i >= 0; --i) {
- if (debug_info.il_offsets [i] <= il_offset) {
- src_file = debug_info.source_files [i].source_file;
- src_hash = debug_info.source_files [i].hash;
- column_number = debug_info.column_numbers [i];
- return debug_info.line_numbers [i];
- }
- }
- return -1;
- }
-
- public Location LocationAtILOffset (int il_offset) {
- IList<Location> locs = Locations;
-
- // FIXME: Optimize this
- for (int i = locs.Count - 1; i >= 0; --i) {
- if (locs [i].ILOffset <= il_offset)
- return locs [i];
- }
-
- return null;
- }
-
- public C.MethodDefinition Metadata {
- get {
- if (meta == null)
- meta = (C.MethodDefinition)DeclaringType.Assembly.Metadata.MainModule.LookupToken (MetadataToken);
- return meta;
- }
- }
- }
-}
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
deleted file mode 100644
index d6a2a78..0000000
--- a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
+++ /dev/null
@@ -1,694 +0,0 @@
-using System;
-using System.IO;
-using System.Threading;
-using System.Net;
-using System.Diagnostics;
-using System.Collections;
-using System.Collections.Generic;
-using Mono.Cecil.Metadata;
-
-namespace Mono.Debugger.Soft
-{
- public class VirtualMachine : Mirror
- {
- Queue queue;
- object queue_monitor;
- object startup_monitor;
- AppDomainMirror root_domain;
- Dictionary<int, EventRequest> requests;
- ITargetProcess process;
-
- internal Connection conn;
-
- VersionInfo version;
-
- internal VirtualMachine (ITargetProcess process, Connection conn) : base () {
- SetVirtualMachine (this);
- queue = new Queue ();
- queue_monitor = new Object ();
- startup_monitor = new Object ();
- requests = new Dictionary <int, EventRequest> ();
- this.conn = conn;
- this.process = process;
- conn.ErrorHandler += ErrorHandler;
- }
-
- // The standard output of the process is available normally through Process
- public StreamReader StandardOutput { get; set; }
- public StreamReader StandardError { get; set; }
-
-
- public Process Process {
- get {
- ProcessWrapper pw = process as ProcessWrapper;
- if (pw == null)
- throw new InvalidOperationException ("Process instance not available");
- return pw.Process;
- }
- }
-
- public ITargetProcess TargetProcess {
- get {
- return process;
- }
- }
-
- public AppDomainMirror RootDomain {
- get {
- return root_domain;
- }
- }
-
- public EndPoint EndPoint {
- get {
- var tcpConn = conn as TcpConnection;
- if (tcpConn != null)
- return tcpConn.EndPoint;
- return null;
- }
- }
-
- public VersionInfo Version {
- get {
- return version;
- }
- }
-
- EventSet current_es;
- int current_es_index;
-
- /*
- * It is impossible to determine when to resume when using this method, since
- * the debuggee is suspended only once per event-set, not event.
- */
- [Obsolete ("Use GetNextEventSet () instead")]
- public Event GetNextEvent () {
- lock (queue_monitor) {
- if (current_es == null || current_es_index == current_es.Events.Length) {
- if (queue.Count == 0)
- Monitor.Wait (queue_monitor);
- current_es = (EventSet)queue.Dequeue ();
- current_es_index = 0;
- }
- return current_es.Events [current_es_index ++];
- }
- }
-
- public Event GetNextEvent (int timeout) {
- throw new NotImplementedException ();
- }
-
- public EventSet GetNextEventSet () {
- lock (queue_monitor) {
- if (queue.Count == 0)
- Monitor.Wait (queue_monitor);
-
- current_es = null;
- current_es_index = 0;
-
- return (EventSet)queue.Dequeue ();
- }
- }
-
- [Obsolete ("Use GetNextEventSet () instead")]
- public T GetNextEvent<T> () where T : Event {
- return GetNextEvent () as T;
- }
-
- public void Suspend () {
- conn.VM_Suspend ();
- }
-
- public void Resume () {
- try {
- conn.VM_Resume ();
- } catch (CommandException ex) {
- if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
- throw new InvalidOperationException ("The vm is not suspended.");
- else
- throw;
- }
- }
-
- public void Exit (int exitCode) {
- conn.VM_Exit (exitCode);
- }
-
- public void Detach () {
- conn.VM_Dispose ();
- conn.Close ();
- notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null);
- }
-
- [Obsolete ("This method was poorly named; use the Detach() method instead")]
- public void Dispose ()
- {
- Detach ();
- }
-
- public void ForceDisconnect ()
- {
- conn.ForceDisconnect ();
- }
-
- public IList<ThreadMirror> GetThreads () {
- long[] ids = vm.conn.VM_GetThreads ();
- ThreadMirror[] res = new ThreadMirror [ids.Length];
- for (int i = 0; i < ids.Length; ++i)
- res [i] = GetThread (ids [i]);
- return res;
- }
-
- // Same as the mirrorOf methods in JDI
- public PrimitiveValue CreateValue (object value) {
- if (value == null)
- return new PrimitiveValue (vm, null);
-
- if (!value.GetType ().IsPrimitive)
- throw new ArgumentException ("value must be of a primitive type instead of '" + value.GetType () + "'", "value");
-
- return new PrimitiveValue (vm, value);
- }
-
- public EnumMirror CreateEnumMirror (TypeMirror type, PrimitiveValue value) {
- return new EnumMirror (this, type, value);
- }
-
- //
- // Enable send and receive timeouts on the connection and send a keepalive event
- // every 'keepalive_interval' milliseconds.
- //
-
- public void SetSocketTimeouts (int send_timeout, int receive_timeout, int keepalive_interval)
- {
- conn.SetSocketTimeouts (send_timeout, receive_timeout, keepalive_interval);
- }
-
- //
- // Methods to create event request objects
- //
- public BreakpointEventRequest CreateBreakpointRequest (MethodMirror method, long il_offset) {
- return new BreakpointEventRequest (this, method, il_offset);
- }
-
- public BreakpointEventRequest CreateBreakpointRequest (Location loc) {
- if (loc == null)
- throw new ArgumentNullException ("loc");
- CheckMirror (loc);
- return new BreakpointEventRequest (this, loc.Method, loc.ILOffset);
- }
-
- public StepEventRequest CreateStepRequest (ThreadMirror thread) {
- return new StepEventRequest (this, thread);
- }
-
- public MethodEntryEventRequest CreateMethodEntryRequest () {
- return new MethodEntryEventRequest (this);
- }
-
- public MethodExitEventRequest CreateMethodExitRequest () {
- return new MethodExitEventRequest (this);
- }
-
- public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type) {
- return new ExceptionEventRequest (this, exc_type, true, true);
- }
-
- public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type, bool caught, bool uncaught) {
- return new ExceptionEventRequest (this, exc_type, caught, uncaught);
- }
-
- public AssemblyLoadEventRequest CreateAssemblyLoadRequest () {
- return new AssemblyLoadEventRequest (this);
- }
-
- public TypeLoadEventRequest CreateTypeLoadRequest () {
- return new TypeLoadEventRequest (this);
- }
-
- public void EnableEvents (params EventType[] events) {
- foreach (EventType etype in events) {
- if (etype == EventType.Breakpoint)
- throw new ArgumentException ("Breakpoint events cannot be requested using EnableEvents", "events");
- conn.EnableEvent (etype, SuspendPolicy.All, null);
- }
- }
-
- public BreakpointEventRequest SetBreakpoint (MethodMirror method, long il_offset) {
- BreakpointEventRequest req = CreateBreakpointRequest (method, il_offset);
-
- req.Enable ();
-
- return req;
- }
-
- public void ClearAllBreakpoints () {
- conn.ClearAllBreakpoints ();
- }
-
- public void Disconnect () {
- conn.Close ();
- }
-
- //
- // Return a list of TypeMirror objects for all loaded types which reference the
- // source file FNAME. Might return false positives.
- // Since protocol version 2.7.
- //
- public IList<TypeMirror> GetTypesForSourceFile (string fname, bool ignoreCase) {
- long[] ids = conn.VM_GetTypesForSourceFile (fname, ignoreCase);
- var res = new TypeMirror [ids.Length];
- for (int i = 0; i < ids.Length; ++i)
- res [i] = GetType (ids [i]);
- return res;
- }
-
- //
- // Return a list of TypeMirror objects for all loaded types named 'NAME'.
- // NAME should be in the the same for as with Assembly.GetType ().
- // Since protocol version 2.9.
- //
- public IList<TypeMirror> GetTypes (string name, bool ignoreCase) {
- long[] ids = conn.VM_GetTypes (name, ignoreCase);
- var res = new TypeMirror [ids.Length];
- for (int i = 0; i < ids.Length; ++i)
- res [i] = GetType (ids [i]);
- return res;
- }
-
- internal void queue_event_set (EventSet es) {
- lock (queue_monitor) {
- queue.Enqueue (es);
- Monitor.Pulse (queue_monitor);
- }
- }
-
- internal void ErrorHandler (object sender, ErrorHandlerEventArgs args) {
- switch (args.ErrorCode) {
- case ErrorCode.INVALID_OBJECT:
- throw new ObjectCollectedException ();
- case ErrorCode.INVALID_FRAMEID:
- throw new InvalidStackFrameException ();
- case ErrorCode.NOT_SUSPENDED:
- throw new InvalidOperationException ("The vm is not suspended.");
- case ErrorCode.NOT_IMPLEMENTED:
- throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
- case ErrorCode.ABSENT_INFORMATION:
- throw new AbsentInformationException ();
- case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET:
- throw new ArgumentException ("Cannot set breakpoint on the specified IL offset.");
- default:
- throw new CommandException (args.ErrorCode);
- }
- }
-
- /* Wait for the debuggee to start up and connect to it */
- internal void connect () {
- conn.Connect ();
-
- // Test the connection
- version = conn.Version;
- if (version.MajorVersion != Connection.MAJOR_VERSION)
- throw new NotSupportedException (String.Format ("The debuggee implements protocol version {0}.{1}, while {2}.{3} is required.", version.MajorVersion, version.MinorVersion, Connection.MAJOR_VERSION, Connection.MINOR_VERSION));
-
- long root_domain_id = conn.RootDomain;
- root_domain = GetDomain (root_domain_id);
- }
-
- internal void notify_vm_event (EventType evtype, SuspendPolicy spolicy, int req_id, long thread_id, string vm_uri) {
- //Console.WriteLine ("Event: " + evtype + "(" + vm_uri + ")");
-
- switch (evtype) {
- case EventType.VMStart:
- /* Notify the main thread that the debuggee started up */
- lock (startup_monitor) {
- Monitor.Pulse (startup_monitor);
- }
- queue_event_set (new EventSet (this, spolicy, new Event[] { new VMStartEvent (vm, req_id, thread_id) }));
- break;
- case EventType.VMDeath:
- queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDeathEvent (vm, req_id) }));
- break;
- case EventType.VMDisconnect:
- queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDisconnectEvent (vm, req_id) }));
- break;
- default:
- throw new Exception ();
- }
- }
-
- //
- // Methods to create instances of mirror objects
- //
-
- /*
- class MirrorCache<T> {
- static Dictionary <long, T> mirrors;
- static object mirror_lock = new object ();
-
- internal static T GetMirror (VirtualMachine vm, long id) {
- lock (mirror_lock) {
- if (mirrors == null)
- mirrors = new Dictionary <long, T> ();
- T obj;
- if (!mirrors.TryGetValue (id, out obj)) {
- obj = CreateMirror (vm, id);
- mirrors [id] = obj;
- }
- return obj;
- }
- }
-
- internal static T CreateMirror (VirtualMachine vm, long id) {
- }
- }
- */
-
- // FIXME: When to remove items from the cache ?
-
- Dictionary <long, MethodMirror> methods;
- object methods_lock = new object ();
-
- internal MethodMirror GetMethod (long id) {
- lock (methods_lock) {
- if (methods == null)
- methods = new Dictionary <long, MethodMirror> ();
- MethodMirror obj;
- if (id == 0)
- return null;
- if (!methods.TryGetValue (id, out obj)) {
- obj = new MethodMirror (this, id);
- methods [id] = obj;
- }
- return obj;
- }
- }
-
- Dictionary <long, AssemblyMirror> assemblies;
- object assemblies_lock = new object ();
-
- internal AssemblyMirror GetAssembly (long id) {
- lock (assemblies_lock) {
- if (assemblies == null)
- assemblies = new Dictionary <long, AssemblyMirror> ();
- AssemblyMirror obj;
- if (id == 0)
- return null;
- if (!assemblies.TryGetValue (id, out obj)) {
- obj = new AssemblyMirror (this, id);
- assemblies [id] = obj;
- }
- return obj;
- }
- }
-
- Dictionary <long, ModuleMirror> modules;
- object modules_lock = new object ();
-
- internal ModuleMirror GetModule (long id) {
- lock (modules_lock) {
- if (modules == null)
- modules = new Dictionary <long, ModuleMirror> ();
- ModuleMirror obj;
- if (id == 0)
- return null;
- if (!modules.TryGetValue (id, out obj)) {
- obj = new ModuleMirror (this, id);
- modules [id] = obj;
- }
- return obj;
- }
- }
-
- Dictionary <long, AppDomainMirror> domains;
- object domains_lock = new object ();
-
- internal AppDomainMirror GetDomain (long id) {
- lock (domains_lock) {
- if (domains == null)
- domains = new Dictionary <long, AppDomainMirror> ();
- AppDomainMirror obj;
- if (id == 0)
- return null;
- if (!domains.TryGetValue (id, out obj)) {
- obj = new AppDomainMirror (this, id);
- domains [id] = obj;
- }
- return obj;
- }
- }
-
- Dictionary <long, TypeMirror> types;
- object types_lock = new object ();
-
- internal TypeMirror GetType (long id) {
- lock (types_lock) {
- if (types == null)
- types = new Dictionary <long, TypeMirror> ();
- TypeMirror obj;
- if (id == 0)
- return null;
- if (!types.TryGetValue (id, out obj)) {
- obj = new TypeMirror (this, id);
- types [id] = obj;
- }
- return obj;
- }
- }
-
- internal TypeMirror[] GetTypes (long[] ids) {
- var res = new TypeMirror [ids.Length];
- for (int i = 0; i < ids.Length; ++i)
- res [i] = GetType (ids [i]);
- return res;
- }
-
- Dictionary <long, ObjectMirror> objects;
- object objects_lock = new object ();
-
- internal T GetObject<T> (long id, long domain_id, long type_id) where T : ObjectMirror {
- lock (objects_lock) {
- if (objects == null)
- objects = new Dictionary <long, ObjectMirror> ();
- ObjectMirror obj;
- if (!objects.TryGetValue (id, out obj)) {
- /*
- * Obtain the domain/type of the object to determine the type of
- * object we need to create.
- */
- if (domain_id == 0 || type_id == 0) {
- if (conn.Version.AtLeast (2, 5)) {
- var info = conn.Object_GetInfo (id);
- domain_id = info.domain_id;
- type_id = info.type_id;
- } else {
- if (domain_id == 0)
- domain_id = conn.Object_GetDomain (id);
- if (type_id == 0)
- type_id = conn.Object_GetType (id);
- }
- }
- AppDomainMirror d = GetDomain (domain_id);
- TypeMirror t = GetType (type_id);
-
- if (t.Assembly == d.Corlib && t.Namespace == "System.Threading" && t.Name == "Thread")
- obj = new ThreadMirror (this, id, t, d);
- else if (t.Assembly == d.Corlib && t.Namespace == "System" && t.Name == "String")
- obj = new StringMirror (this, id, t, d);
- else if (typeof (T) == typeof (ArrayMirror))
- obj = new ArrayMirror (this, id, t, d);
- else
- obj = new ObjectMirror (this, id, t, d);
- objects [id] = obj;
- }
- return (T)obj;
- }
- }
-
- internal T GetObject<T> (long id) where T : ObjectMirror {
- return GetObject<T> (id, 0, 0);
- }
-
- internal ObjectMirror GetObject (long objid) {
- return GetObject<ObjectMirror> (objid);
- }
-
- internal ThreadMirror GetThread (long id) {
- return GetObject <ThreadMirror> (id);
- }
-
- object requests_lock = new object ();
-
- internal void AddRequest (EventRequest req, int id) {
- lock (requests_lock) {
- requests [id] = req;
- }
- }
-
- internal void RemoveRequest (EventRequest req, int id) {
- lock (requests_lock) {
- requests.Remove (id);
- }
- }
-
- internal EventRequest GetRequest (int id) {
- lock (requests_lock) {
- return requests [id];
- }
- }
-
- internal Value DecodeValue (ValueImpl v) {
- if (v.Value != null)
- return new PrimitiveValue (this, v.Value);
-
- switch (v.Type) {
- case ElementType.Void:
- return null;
- case ElementType.SzArray:
- case ElementType.Array:
- return GetObject<ArrayMirror> (v.Objid);
- case ElementType.String:
- return GetObject<StringMirror> (v.Objid);
- case ElementType.Class:
- case ElementType.Object:
- return GetObject (v.Objid);
- case ElementType.ValueType:
- if (v.IsEnum)
- return new EnumMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
- else
- return new StructMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
- case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
- return new PrimitiveValue (this, null);
- default:
- throw new NotImplementedException ("" + v.Type);
- }
- }
-
- internal Value[] DecodeValues (ValueImpl[] values) {
- Value[] res = new Value [values.Length];
- for (int i = 0; i < values.Length; ++i)
- res [i] = DecodeValue (values [i]);
- return res;
- }
-
- internal ValueImpl EncodeValue (Value v) {
- if (v is PrimitiveValue) {
- object val = (v as PrimitiveValue).Value;
- if (val == null)
- return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
- else
- return new ValueImpl { Value = val };
- } else if (v is ObjectMirror) {
- return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
- } else if (v is StructMirror) {
- return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
- } else {
- throw new NotSupportedException ();
- }
- }
-
- internal ValueImpl[] EncodeValues (IList<Value> values) {
- ValueImpl[] res = new ValueImpl [values.Count];
- for (int i = 0; i < values.Count; ++i)
- res [i] = EncodeValue (values [i]);
- return res;
- }
-
- internal void CheckProtocolVersion (int major, int minor) {
- if (!conn.Version.AtLeast (major, minor))
- throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
- }
- }
-
- class EventHandler : MarshalByRefObject, IEventHandler
- {
- VirtualMachine vm;
-
- public EventHandler (VirtualMachine vm) {
- this.vm = vm;
- }
-
- public void Events (SuspendPolicy suspend_policy, EventInfo[] events) {
- var l = new List<Event> ();
-
- for (int i = 0; i < events.Length; ++i) {
- EventInfo ei = events [i];
- int req_id = ei.ReqId;
- long thread_id = ei.ThreadId;
- long id = ei.Id;
- long loc = ei.Location;
-
- switch (ei.EventType) {
- case EventType.VMStart:
- vm.notify_vm_event (EventType.VMStart, suspend_policy, req_id, thread_id, null);
- break;
- case EventType.VMDeath:
- vm.notify_vm_event (EventType.VMDeath, suspend_policy, req_id, thread_id, null);
- break;
- case EventType.ThreadStart:
- l.Add (new ThreadStartEvent (vm, req_id, id));
- break;
- case EventType.ThreadDeath:
- l.Add (new ThreadDeathEvent (vm, req_id, id));
- break;
- case EventType.AssemblyLoad:
- l.Add (new AssemblyLoadEvent (vm, req_id, thread_id, id));
- break;
- case EventType.AssemblyUnload:
- l.Add (new AssemblyUnloadEvent (vm, req_id, thread_id, id));
- break;
- case EventType.TypeLoad:
- l.Add (new TypeLoadEvent (vm, req_id, thread_id, id));
- break;
- case EventType.MethodEntry:
- l.Add (new MethodEntryEvent (vm, req_id, thread_id, id));
- break;
- case EventType.MethodExit:
- l.Add (new MethodExitEvent (vm, req_id, thread_id, id));
- break;
- case EventType.Breakpoint:
- l.Add (new BreakpointEvent (vm, req_id, thread_id, id, loc));
- break;
- case EventType.Step:
- l.Add (new StepEvent (vm, req_id, thread_id, id, loc));
- break;
- case EventType.Exception:
- l.Add (new ExceptionEvent (vm, req_id, thread_id, id, loc));
- break;
- case EventType.AppDomainCreate:
- l.Add (new AppDomainCreateEvent (vm, req_id, thread_id, id));
- break;
- case EventType.AppDomainUnload:
- l.Add (new AppDomainUnloadEvent (vm, req_id, thread_id, id));
- break;
- case EventType.UserBreak:
- l.Add (new UserBreakEvent (vm, req_id, thread_id));
- break;
- case EventType.UserLog:
- l.Add (new UserLogEvent (vm, req_id, thread_id, ei.Level, ei.Category, ei.Message));
- break;
- default:
- break;
- }
- }
-
- if (l.Count > 0)
- vm.queue_event_set (new EventSet (vm, suspend_policy, l.ToArray ()));
- }
-
- public void VMDisconnect (int req_id, long thread_id, string vm_uri) {
- vm.notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, req_id, thread_id, vm_uri);
- }
- }
-
- public class CommandException : Exception {
-
- internal CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") {
- ErrorCode = error_code;
- }
-
- public ErrorCode ErrorCode {
- get; set;
- }
- }
-}
diff --git a/external/Makefile.in b/external/Makefile.in
index 759d558..b4ec44b 100644
--- a/external/Makefile.in
+++ b/external/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -224,6 +223,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
check-am: all-am
check: check-am
all-am: Makefile
diff --git a/external/debugger-libs/.gitignore b/external/debugger-libs/.gitignore
new file mode 100644
index 0000000..3ab4775
--- /dev/null
+++ b/external/debugger-libs/.gitignore
@@ -0,0 +1,13 @@
+bin
+obj
+*~
+*.sln.cache
+*.suo
+*.user
+*.dotCover
+*.pidb
+*.userprefs
+*.usertasks
+*.mdb
+.DS_Store
+Makefile.in
diff --git a/contrib/Mono.Debugger.Soft/Locale.cs b/external/debugger-libs/Mono.Debugger.Soft/Locale.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Locale.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Locale.cs
diff --git a/contrib/Mono.Debugger.Soft/Makefile.am b/external/debugger-libs/Mono.Debugger.Soft/Makefile.am
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Makefile.am
rename to external/debugger-libs/Mono.Debugger.Soft/Makefile.am
diff --git a/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
new file mode 100644
index 0000000..7278c3f
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft.csproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Mono.Debugger.Soft</RootNamespace>
+ <AssemblyName>Mono.Debugger.Soft</AssemblyName>
+ <SignAssembly>True</SignAssembly>
+ <AssemblyOriginatorKeyFile>mono.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <DefineConstants>MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
+ <Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\Connection.cs" />
+ <Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\CustomAttributeTypedArgumentMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
+ <Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\Event.cs" />
+ <Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
+ <Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\EventSet.cs" />
+ <Compile Include="Mono.Debugger.Soft\EventType.cs" />
+ <Compile Include="Mono.Debugger.Soft\ExceptionEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
+ <Compile Include="Mono.Debugger.Soft\ILExceptionHandler.cs" />
+ <Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
+ <Compile Include="Mono.Debugger.Soft\IMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
+ <Compile Include="Mono.Debugger.Soft\InvocationException.cs" />
+ <Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
+ <Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
+ <Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
+ <Compile Include="Mono.Debugger.Soft\Location.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodBodyMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodEntryEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodEntryEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodExitEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodExitEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\Mirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
+ <Compile Include="Mono.Debugger.Soft\ObjectMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
+ <Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
+ <Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
+ <Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
+ <Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
+ <Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\Value.cs" />
+ <Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
+ <Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
+ <Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
+ <Compile Include="Mono.Debugger.Soft\VMDisconnectEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
+ <Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
+ <Compile Include="Mono.Debugger.Soft\AssemblyLoadEventRequest.cs" />
+ <Compile Include="Locale.cs" />
+ <Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Makefile.am" />
+ <None Include="mono-git-revision" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
+ <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
+ <Name>Mono.Cecil</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AbsentInformationException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AbsentInformationException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AbsentInformationException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AbsentInformationException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyUnloadEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyUnloadEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyUnloadEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyUnloadEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs
diff --git a/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog
new file mode 100644
index 0000000..47f2476
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog
@@ -0,0 +1,210 @@
+2010-06-17 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachine.cs Connection.cs: Group events received together into an EventSet,
+ like it is done in JDI. Add a GetNextEventSet () method.
+
+2010-06-04 Zoltan Varga <vargaz at gmail.com>
+
+ * StackFrame.cs (GetVisibleVariables): New method to return the set of variables
+ visible at the current stack frame.
+
+2010-05-24 Martin Baulig <martin at ximian.com>
+
+ * Connection.cs (VersionInfo): Make this public.
+
+ * VirtualMachine.cs (Version): New public property.
+
+2010-05-07 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachine.cs (ErrorHandler): Convert ABSENT_INFORMATION to
+ AbsentInformationException.
+
+ * AbsentInformationException.cs: New file.
+
+2010-04-30 Zoltan Varga <vargaz at gmail.com>
+
+ * TypeMirror.cs: Add new overload for GetSourceFiles () which returns full paths.
+
+2010-04-27 Lluis Sanchez <lluis at novell.com>
+
+ * ITargetProcess.cs:
+ * VirtualMachine.cs:
+ * VirtualMachineManager.cs:
+ Restored old API. Renamed IProcess to ITargetProcess everywhere
+ to avoid naming conflicts.
+
+2010-04-26 Lluis Sanchez <lluis at novell.com>
+
+ * IProcess.cs:
+ * VirtualMachine.cs:
+ * VirtualMachineManager.cs:
+ Added new IProcess interface which wraps the debugged process.
+ This abstraction makes it easier to support debugging processes
+ for which we don't have a direct Process reference (for example,
+ if the process is remote).
+
+2010-04-10 Zoltan Varga <vargaz at gmail.com>
+
+ * ThreadMirror.cs: Add a ThreadId property.
+
+2010-03-05 Martin Baulig <martin at ximian.com>
+
+ Add support for aborting invocations.
+
+ * IInvokeAsyncResult.cs: New file.
+ (IInvokeAsyncResult): New public interface; derives from
+ `IAsyncResult' and contains an Abort() method.
+
+ * Connection.cs
+ (Connection.VM_BeginInvokeMethod): Return the `id'.
+ (Connection.VM_AbortInvoke): New method.
+
+ * ObjectMirror.cs
+ (ObjectMirror.AbortInvoke): New internal static method.
+
+2010-03-01 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachine.cs: Allow working with runtimes implementing a different
+ minor version of the debugger protocol.
+
+2010-03-01 Zoltan Varga <vargaz at gmail.com>
+
+ * Connection.cs: Send the protocol version used by the client to the debuggee
+ after the handshake.
+
+2010-03-01 Zoltan Varga <vargaz at gmail.com>
+
+ * Location.cs: Implement ToString ().
+
+ * AppDomainMirror.cs (CreateBoxedValue): New method to create a boxed value from
+ a primitive value or struct.
+
+2010-02-26 Zoltan Varga <vargaz at gmail.com>
+
+ * Connection.cs: Throw a NotSupportedException if the protocol version doesn't
+ support the caught/uncaught flags in an exception modifier.
+
+2010-02-20 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachine.cs (CreateExceptionRequest): Add an overload taking two
+ booleans which specify whenever to report caught/uncaught exceptions.
+
+ * ExceptionRequest.cs: Add public properties for them.
+
+ * Connections.cs: Pass the caught/uncaught flags to the debuggee. Bump protocol
+ minor version.
+
+2010-02-11 Zoltan Varga <vargaz at gmail.com>
+
+ * AssemblyMirror.cs: Add missing GetType () overloads.
+
+2010-02-04 Zoltan Varga <vargaz at gmail.com>
+
+ * TypeMirror.cs (EnumUnderlyingType): New property.
+
+ * EnumMirror.cs: Use it.
+
+ * VirtualMachine.cs (CreateEnumMirror): New method to create an EnumMirror.
+
+ * AppDomainMirror.cs (GetCorrespondingType): New method to return a TypeMirror
+ corresponding to a primitive type.
+
+ * TypeMirror.cs (IsEnum): Implement.
+
+ * EnumMirror.cs (.ctor): New internal constructor called from CreateEnumMirror
+ which does lots of error checking.
+
+2010-01-28 Zoltan Varga <vargaz at gmail.com>
+
+ * AssemblyUnloadEvent: New file.
+
+ * VirtualMachine.cs Connection.cs: Add support for assembly unload events.
+
+2009-12-05 Lluis Sanchez <lluis at novell.com>
+
+ * StructMirror.cs: Fix field indexer for structs with static fields.
+ * VirtualMachineManager.cs: Added an option to LaunchOptions which
+ allows providing a custom method for launching the process. This
+ allows launching mono in a wrapper process.
+
+2009-12-03 Zoltan Varga <vargaz at gmail.com>
+
+ * StructMirror.cs (this): Ignore static fields.
+
+2009-12-02 Geoff Norton <gnorton at novell.com>
+
+ * VirtualMachineManager.cs: We might get a SocketException (interrupted)
+ here, so lets just handle all Exceptions to our Accept pattern the same
+ way
+
+2009-12-01 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachine.cs (ErrorHandler): Handle NOT_SUSPENDED error code too.
+
+2009-11-24 Zoltan Varga <vargaz at gmail.com>
+
+ * ObjectMirror.cs TypeMirror.cs StructMirror.cs: Make the BeginInvokeMethod
+ which takes a 'vm' argument obsolete, it was added by mistake, add a version
+ without that argument instead.
+
+2009-11-19 Zoltan Varga <vargaz at gmail.com>
+
+ * AssemblyMirror.cs: Add a GetName () method.
+
+2009-11-17 Zoltan Varga <vargaz at gmail.com>
+
+ * Connection.cs ObjectMirror.cs: Implement invokes in a real asynchronous way,
+ without waiting.
+
+2009-11-14 Zoltan Varga <vargaz at gmail.com>
+
+ * InvokeOptions.cs: Add SingleThreaded option, not yet works.
+
+ * VirtualMachineManager.cs (Launch): Pass options to BeginLaunch.
+
+ * ObjectMirror.cs TypeMirror.cs StructMirror.cs: Implement an async version of
+ InvokeMethod ().
+
+2009-11-13 Zoltan Varga <vargaz at gmail.com>
+
+ * InvokeOptions.cs: New file.
+
+ * ObjectMirror.cs TypeMirror.cs StructMirror.cs: Add support for passing flags
+ to InvokeMethod ().
+
+ * Connection.cs: Bump protocol version.
+
+2009-11-12 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachineManager.cs: Put back the old Launch (string[], LaunchOptions)
+ overload.
+
+2009-11-11 Geoff Norton <gnorton at novell.com>
+
+ * VirtualMachineManager.cs: Refactor the APIs to have async methods.
+ Remove a bunch of Listen overloads that are pointless. Refactor
+ Launch to take a ProcessStartInfo instead of string arguments.
+
+2009-11-10 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachineManager.cs (Launch): Close the listening socket instead of
+ shutting it down since Shutdown throws on exception on non-connected sockets
+ in ms.net.
+
+2009-11-05 Zoltan Varga <vargaz at gmail.com>
+
+ * VirtualMachineManager.cs (Listen): Resurrect the old listen method.
+
+ * VirtualMachineManager.cs (Connect): New method to connect to a runtime
+ listening at the provided address.
+
+2009-11-04 Lluis Sanchez <lluis at novell.com>
+
+ * VirtualMachineManager.cs: Properly redirect standard output.
+
+2009-11-03 Zoltan Varga <vargaz at gmail.com>
+
+ * EventRequest.cs (AssemblyFilter): New property to filter
+ events based on a list of assemblies.
+
+ * Connection.cs: Add assembly filters to the protocol implementation.
diff --git a/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
new file mode 100644
index 0000000..105ff4f
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -0,0 +1,2381 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using System.Collections.Generic;
+using System.Text;
+using System.Diagnostics;
+using Mono.Cecil.Metadata;
+
+namespace Mono.Debugger.Soft
+{
+ public class VersionInfo {
+ public string VMVersion {
+ get; set;
+ }
+
+ public int MajorVersion {
+ get; set;
+ }
+
+ public int MinorVersion {
+ get; set;
+ }
+
+ /*
+ * Check that this version is at least major:minor
+ */
+ public bool AtLeast (int major, int minor) {
+ if ((MajorVersion > major) || ((MajorVersion == major && MinorVersion >= minor)))
+ return true;
+ else
+ return false;
+ }
+ }
+
+ struct SourceInfo {
+ public string source_file;
+ public byte[] guid, hash;
+ }
+
+ class DebugInfo {
+ public int max_il_offset;
+ public int[] il_offsets;
+ public int[] line_numbers;
+ public int[] column_numbers;
+ public SourceInfo[] source_files;
+ }
+
+ struct FrameInfo {
+ public long id;
+ public long method;
+ public int il_offset;
+ public StackFrameFlags flags;
+ }
+
+ class TypeInfo {
+ public string ns, name, full_name;
+ public long assembly, module, base_type, element_type;
+ public int token, rank, attributes;
+ public bool is_byref, is_pointer, is_primitive, is_valuetype, is_enum;
+ public bool is_gtd, is_generic_type;
+ public long[] nested;
+ public long gtd;
+ public long[] type_args;
+ }
+
+ struct IfaceMapInfo {
+ public long iface_id;
+ public long[] iface_methods;
+ public long[] target_methods;
+ }
+
+ class MethodInfo {
+ public int attributes, iattributes, token;
+ public bool is_gmd, is_generic_method;
+ public long gmd;
+ public long[] type_args;
+ }
+
+ class MethodBodyInfo {
+ public byte[] il;
+ public ExceptionClauseInfo[] clauses;
+ }
+
+ struct ExceptionClauseInfo {
+ public ExceptionClauseFlags flags;
+ public int try_offset;
+ public int try_length;
+ public int handler_offset;
+ public int handler_length;
+ public int filter_offset;
+ public long catch_type_id;
+ }
+
+ enum ExceptionClauseFlags {
+ None = 0x0,
+ Filter = 0x1,
+ Finally = 0x2,
+ Fault = 0x4,
+ }
+
+ struct ParamInfo {
+ public int call_conv;
+ public int param_count;
+ public int generic_param_count;
+ public long ret_type;
+ public long[] param_types;
+ public string[] param_names;
+ }
+
+ struct LocalsInfo {
+ public long[] types;
+ public string[] names;
+ public int[] live_range_start;
+ public int[] live_range_end;
+ }
+
+ struct PropInfo {
+ public long id;
+ public string name;
+ public long get_method, set_method;
+ public int attrs;
+ }
+
+ class CattrNamedArgInfo {
+ public bool is_property;
+ public long id;
+ public ValueImpl value;
+ }
+
+ class CattrInfo {
+ public long ctor_id;
+ public ValueImpl[] ctor_args;
+ public CattrNamedArgInfo[] named_args;
+ }
+
+ class ThreadInfo {
+ public bool is_thread_pool;
+ }
+
+ struct ObjectRefInfo {
+ public long type_id;
+ public long domain_id;
+ }
+
+ enum ValueTypeId {
+ VALUE_TYPE_ID_NULL = 0xf0,
+ VALUE_TYPE_ID_TYPE = 0xf1
+ }
+
+ enum InvokeFlags {
+ NONE = 0x0,
+ DISABLE_BREAKPOINTS = 0x1,
+ SINGLE_THREADED = 0x2
+ }
+
+ enum ElementType {
+ End = 0x00,
+ Void = 0x01,
+ Boolean = 0x02,
+ Char = 0x03,
+ I1 = 0x04,
+ U1 = 0x05,
+ I2 = 0x06,
+ U2 = 0x07,
+ I4 = 0x08,
+ U4 = 0x09,
+ I8 = 0x0a,
+ U8 = 0x0b,
+ R4 = 0x0c,
+ R8 = 0x0d,
+ String = 0x0e,
+ Ptr = 0x0f,
+ ByRef = 0x10,
+ ValueType = 0x11,
+ Class = 0x12,
+ Var = 0x13,
+ Array = 0x14,
+ GenericInst = 0x15,
+ TypedByRef = 0x16,
+ I = 0x18,
+ U = 0x19,
+ FnPtr = 0x1b,
+ Object = 0x1c,
+ SzArray = 0x1d,
+ MVar = 0x1e,
+ CModReqD = 0x1f,
+ CModOpt = 0x20,
+ Internal = 0x21,
+ Modifier = 0x40,
+ Sentinel = 0x41,
+ Pinned = 0x45,
+
+ Type = 0x50,
+ Boxed = 0x51,
+ Enum = 0x55
+ }
+
+ class ValueImpl {
+ public ElementType Type; /* or one of the VALUE_TYPE_ID constants */
+ public long Objid;
+ public object Value;
+ public long Klass; // For ElementType.ValueType
+ public ValueImpl[] Fields; // for ElementType.ValueType
+ public bool IsEnum; // For ElementType.ValueType
+ public long Id; /* For VALUE_TYPE_ID_TYPE */
+ }
+
+ class ModuleInfo {
+ public string Name, ScopeName, FQName, Guid;
+ public long Assembly;
+ }
+
+ enum TokenType {
+ STRING = 0,
+ TYPE = 1,
+ FIELD = 2,
+ METHOD = 3,
+ UNKNOWN = 4
+ }
+
+ enum StackFrameFlags {
+ NONE = 0,
+ DEBUGGER_INVOKE = 1,
+ NATIVE_TRANSITION = 2
+ }
+
+ class ResolvedToken {
+ public TokenType Type;
+ public string Str;
+ public long Id;
+ }
+
+ class Modifier {
+ }
+
+ class CountModifier : Modifier {
+ public int Count {
+ get; set;
+ }
+ }
+
+ class LocationModifier : Modifier {
+ public long Method {
+ get; set;
+ }
+
+ public long Location {
+ get; set;
+ }
+ }
+
+ class StepModifier : Modifier {
+ public long Thread {
+ get; set;
+ }
+
+ public int Depth {
+ get; set;
+ }
+
+ public int Size {
+ get; set;
+ }
+
+ public int Filter {
+ get; set;
+ }
+ }
+
+ class ThreadModifier : Modifier {
+ public long Thread {
+ get; set;
+ }
+ }
+
+ class ExceptionModifier : Modifier {
+ public long Type {
+ get; set;
+ }
+ public bool Caught {
+ get; set;
+ }
+ public bool Uncaught {
+ get; set;
+ }
+ }
+
+ class AssemblyModifier : Modifier {
+ public long[] Assemblies {
+ get; set;
+ }
+ }
+
+ class SourceFileModifier : Modifier {
+ public string[] SourceFiles {
+ get; set;
+ }
+ }
+
+ class TypeNameModifier : Modifier {
+ public string[] TypeNames {
+ get; set;
+ }
+ }
+
+ class EventInfo {
+ public EventType EventType {
+ get; set;
+ }
+
+ public int ReqId {
+ get; set;
+ }
+
+ public SuspendPolicy SuspendPolicy {
+ get; set;
+ }
+
+ public long ThreadId {
+ get; set;
+ }
+
+ public long Id {
+ get; set;
+ }
+
+ public long Location {
+ get; set;
+ }
+
+ public int Level {
+ get; set;
+ }
+
+ public string Category {
+ get; set;
+ }
+
+ public string Message {
+ get; set;
+ }
+
+ public EventInfo (EventType type, int req_id) {
+ EventType = type;
+ ReqId = req_id;
+ }
+ }
+
+ public enum ErrorCode {
+ NONE = 0,
+ INVALID_OBJECT = 20,
+ INVALID_FIELDID = 25,
+ INVALID_FRAMEID = 30,
+ NOT_IMPLEMENTED = 100,
+ NOT_SUSPENDED = 101,
+ INVALID_ARGUMENT = 102,
+ ERR_UNLOADED = 103,
+ ERR_NO_INVOCATION = 104,
+ ABSENT_INFORMATION = 105,
+ NO_SEQ_POINT_AT_IL_OFFSET = 106
+ }
+
+ public class ErrorHandlerEventArgs : EventArgs {
+
+ public ErrorCode ErrorCode {
+ get; set;
+ }
+ }
+
+ /*
+ * Represents the connection to the debuggee
+ */
+ public abstract class Connection
+ {
+ /*
+ * The protocol and the packet format is based on JDWP, the differences
+ * are in the set of supported events, and the commands.
+ */
+ internal const string HANDSHAKE_STRING = "DWP-Handshake";
+
+ internal const int HEADER_LENGTH = 11;
+
+ static readonly bool EnableConnectionLogging = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_SDB_LOG"));
+ static int ConnectionId;
+ readonly StreamWriter LoggingStream = EnableConnectionLogging ?
+ new StreamWriter (string.Format ("/tmp/sdb_conn_log_{0}", ConnectionId++), false) : null;
+
+ /*
+ * Th version of the wire-protocol implemented by the library. The library
+ * and the debuggee can communicate if they implement the same major version.
+ * If they implement a different minor version, they can communicate, but some
+ * features might not be available. This allows older clients to communicate
+ * with newer runtimes, and vice versa.
+ */
+ internal const int MAJOR_VERSION = 2;
+ internal const int MINOR_VERSION = 24;
+
+ enum WPSuspendPolicy {
+ NONE = 0,
+ EVENT_THREAD = 1,
+ ALL = 2
+ }
+
+ enum CommandSet {
+ VM = 1,
+ OBJECT_REF = 9,
+ STRING_REF = 10,
+ THREAD = 11,
+ ARRAY_REF = 13,
+ EVENT_REQUEST = 15,
+ STACK_FRAME = 16,
+ APPDOMAIN = 20,
+ ASSEMBLY = 21,
+ METHOD = 22,
+ TYPE = 23,
+ MODULE = 24,
+ EVENT = 64
+ }
+
+ enum EventKind {
+ VM_START = 0,
+ VM_DEATH = 1,
+ THREAD_START = 2,
+ THREAD_DEATH = 3,
+ APPDOMAIN_CREATE = 4, // Not in JDI
+ APPDOMAIN_UNLOAD = 5, // Not in JDI
+ METHOD_ENTRY = 6,
+ METHOD_EXIT = 7,
+ ASSEMBLY_LOAD = 8,
+ ASSEMBLY_UNLOAD = 9,
+ BREAKPOINT = 10,
+ STEP = 11,
+ TYPE_LOAD = 12,
+ EXCEPTION = 13,
+ KEEPALIVE = 14,
+ USER_BREAK = 15,
+ USER_LOG = 16
+ }
+
+ enum ModifierKind {
+ COUNT = 1,
+ THREAD_ONLY = 3,
+ LOCATION_ONLY = 7,
+ EXCEPTION_ONLY = 8,
+ STEP = 10,
+ ASSEMBLY_ONLY = 11,
+ SOURCE_FILE_ONLY = 12,
+ TYPE_NAME_ONLY = 13
+ }
+
+ enum CmdVM {
+ VERSION = 1,
+ ALL_THREADS = 2,
+ SUSPEND = 3,
+ RESUME = 4,
+ EXIT = 5,
+ DISPOSE = 6,
+ INVOKE_METHOD = 7,
+ SET_PROTOCOL_VERSION = 8,
+ ABORT_INVOKE = 9,
+ SET_KEEPALIVE = 10,
+ GET_TYPES_FOR_SOURCE_FILE = 11,
+ GET_TYPES = 12,
+ INVOKE_METHODS = 13
+ }
+
+ enum CmdEvent {
+ COMPOSITE = 100
+ }
+
+ enum CmdThread {
+ GET_FRAME_INFO = 1,
+ GET_NAME = 2,
+ GET_STATE = 3,
+ GET_INFO = 4,
+ /* FIXME: Merge into GET_INFO when the major protocol version is increased */
+ GET_ID = 5,
+ /* Ditto */
+ GET_TID = 6
+ }
+
+ enum CmdEventRequest {
+ SET = 1,
+ CLEAR = 2,
+ CLEAR_ALL_BREAKPOINTS = 3
+ }
+
+ enum CmdAppDomain {
+ GET_ROOT_DOMAIN = 1,
+ GET_FRIENDLY_NAME = 2,
+ GET_ASSEMBLIES = 3,
+ GET_ENTRY_ASSEMBLY = 4,
+ CREATE_STRING = 5,
+ GET_CORLIB = 6,
+ CREATE_BOXED_VALUE = 7
+ }
+
+ enum CmdAssembly {
+ GET_LOCATION = 1,
+ GET_ENTRY_POINT = 2,
+ GET_MANIFEST_MODULE = 3,
+ GET_OBJECT = 4,
+ GET_TYPE = 5,
+ GET_NAME = 6
+ }
+
+ enum CmdModule {
+ GET_INFO = 1,
+ }
+
+ enum CmdMethod {
+ GET_NAME = 1,
+ GET_DECLARING_TYPE = 2,
+ GET_DEBUG_INFO = 3,
+ GET_PARAM_INFO = 4,
+ GET_LOCALS_INFO = 5,
+ GET_INFO = 6,
+ GET_BODY = 7,
+ RESOLVE_TOKEN = 8,
+ GET_CATTRS = 9,
+ MAKE_GENERIC_METHOD = 10
+ }
+
+ enum CmdType {
+ GET_INFO = 1,
+ GET_METHODS = 2,
+ GET_FIELDS = 3,
+ GET_VALUES = 4,
+ GET_OBJECT = 5,
+ GET_SOURCE_FILES = 6,
+ SET_VALUES = 7,
+ IS_ASSIGNABLE_FROM = 8,
+ GET_PROPERTIES = 9,
+ GET_CATTRS = 10,
+ GET_FIELD_CATTRS = 11,
+ GET_PROPERTY_CATTRS = 12,
+ /* FIXME: Merge into GET_SOURCE_FILES when the major protocol version is increased */
+ GET_SOURCE_FILES_2 = 13,
+ /* FIXME: Merge into GET_VALUES when the major protocol version is increased */
+ GET_VALUES_2 = 14,
+ CMD_TYPE_GET_METHODS_BY_NAME_FLAGS = 15,
+ GET_INTERFACES = 16,
+ GET_INTERFACE_MAP = 17,
+ IS_INITIALIZED = 18
+ }
+
+ enum BindingFlagsExtensions {
+ BINDING_FLAGS_IGNORE_CASE = 0x70000000,
+ }
+
+ enum CmdStackFrame {
+ GET_VALUES = 1,
+ GET_THIS = 2,
+ SET_VALUES = 3
+ }
+
+ enum CmdArrayRef {
+ GET_LENGTH = 1,
+ GET_VALUES = 2,
+ SET_VALUES = 3
+ }
+
+ enum CmdStringRef {
+ GET_VALUE = 1,
+ GET_LENGTH = 2,
+ GET_CHARS = 3
+ }
+
+ enum CmdObjectRef {
+ GET_TYPE = 1,
+ GET_VALUES = 2,
+ IS_COLLECTED = 3,
+ GET_ADDRESS = 4,
+ GET_DOMAIN = 5,
+ SET_VALUES = 6,
+ GET_INFO = 7,
+ }
+
+ class Header {
+ public int id;
+ public int command_set;
+ public int command;
+ public int flags;
+ }
+
+ internal static int GetPacketLength (byte[] header) {
+ int offset = 0;
+ return decode_int (header, ref offset);
+ }
+
+ internal static bool IsReplyPacket (byte[] packet) {
+ int offset = 8;
+ return decode_byte (packet, ref offset) == 0x80;
+ }
+
+ internal static int GetPacketId (byte[] packet) {
+ int offset = 4;
+ return decode_int (packet, ref offset);
+ }
+
+ static int decode_byte (byte[] packet, ref int offset) {
+ return packet [offset++];
+ }
+
+ static int decode_short (byte[] packet, ref int offset) {
+ int res = ((int)packet [offset] << 8) | (int)packet [offset + 1];
+ offset += 2;
+ return res;
+ }
+
+ static int decode_int (byte[] packet, ref int offset) {
+ int res = ((int)packet [offset] << 24) | ((int)packet [offset + 1] << 16) | ((int)packet [offset + 2] << 8) | (int)packet [offset + 3];
+ offset += 4;
+ return res;
+ }
+
+ static long decode_id (byte[] packet, ref int offset) {
+ return decode_int (packet, ref offset);
+ }
+
+ static long decode_long (byte[] packet, ref int offset) {
+ uint high = (uint)decode_int (packet, ref offset);
+ uint low = (uint)decode_int (packet, ref offset);
+
+ return (long)(((ulong)high << 32) | (ulong)low);
+ }
+
+ internal static SuspendPolicy decode_suspend_policy (int suspend_policy) {
+ switch ((WPSuspendPolicy)suspend_policy) {
+ case WPSuspendPolicy.NONE:
+ return SuspendPolicy.None;
+ case WPSuspendPolicy.EVENT_THREAD:
+ return SuspendPolicy.EventThread;
+ case WPSuspendPolicy.ALL:
+ return SuspendPolicy.All;
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ static Header decode_command_header (byte[] packet) {
+ int offset = 0;
+ Header res = new Header ();
+
+ decode_int (packet, ref offset);
+ res.id = decode_int (packet, ref offset);
+ res.flags = decode_byte (packet, ref offset);
+ res.command_set = decode_byte (packet, ref offset);
+ res.command = decode_byte (packet, ref offset);
+
+ return res;
+ }
+
+ static void encode_byte (byte[] buf, int b, ref int offset) {
+ buf [offset] = (byte)b;
+ offset ++;
+ }
+
+ static void encode_int (byte[] buf, int i, ref int offset) {
+ buf [offset] = (byte)((i >> 24) & 0xff);
+ buf [offset + 1] = (byte)((i >> 16) & 0xff);
+ buf [offset + 2] = (byte)((i >> 8) & 0xff);
+ buf [offset + 3] = (byte)((i >> 0) & 0xff);
+ offset += 4;
+ }
+
+ static void encode_id (byte[] buf, long id, ref int offset) {
+ encode_int (buf, (int)id, ref offset);
+ }
+
+ static void encode_long (byte[] buf, long l, ref int offset) {
+ encode_int (buf, (int)((l >> 32) & 0xffffffff), ref offset);
+ encode_int (buf, (int)(l & 0xffffffff), ref offset);
+ }
+
+ internal static byte[] EncodePacket (int id, int commandSet, int command, byte[] data, int dataLen) {
+ byte[] buf = new byte [dataLen + 11];
+ int offset = 0;
+
+ encode_int (buf, buf.Length, ref offset);
+ encode_int (buf, id, ref offset);
+ encode_byte (buf, 0, ref offset);
+ encode_byte (buf, commandSet, ref offset);
+ encode_byte (buf, command, ref offset);
+
+ for (int i = 0; i < dataLen; ++i)
+ buf [offset + i] = data [i];
+
+ return buf;
+ }
+
+ class PacketReader {
+ byte[] packet;
+ int offset;
+
+ public PacketReader (byte[] packet) {
+ this.packet = packet;
+
+ // For event packets
+ Header header = decode_command_header (packet);
+ CommandSet = (CommandSet)header.command_set;
+ Command = header.command;
+
+ // For reply packets
+ offset = 0;
+ ReadInt (); // length
+ ReadInt (); // id
+ ReadByte (); // flags
+ ErrorCode = ReadShort ();
+ }
+
+ public CommandSet CommandSet {
+ get; set;
+ }
+
+ public int Command {
+ get; set;
+ }
+
+ public int ErrorCode {
+ get; set;
+ }
+
+ public int Offset {
+ get {
+ return offset;
+ }
+ }
+
+ public int ReadByte () {
+ return decode_byte (packet, ref offset);
+ }
+
+ public int ReadShort () {
+ return decode_short (packet, ref offset);
+ }
+
+ public int ReadInt () {
+ return decode_int (packet, ref offset);
+ }
+
+ public long ReadId () {
+ return decode_id (packet, ref offset);
+ }
+
+ public long ReadLong () {
+ return decode_long (packet, ref offset);
+ }
+
+ public float ReadFloat () {
+ float f = DataConverter.FloatFromBE (packet, offset);
+ offset += 4;
+ return f;
+ }
+
+ public double ReadDouble () {
+ double d = DataConverter.DoubleFromBE (packet, offset);
+ offset += 8;
+ return d;
+ }
+
+ public string ReadString () {
+ int len = decode_int (packet, ref offset);
+ string res = new String (Encoding.UTF8.GetChars (packet, offset, len));
+ offset += len;
+ return res;
+ }
+
+ public ValueImpl ReadValue () {
+ ElementType etype = (ElementType)ReadByte ();
+
+ switch (etype) {
+ case ElementType.Void:
+ return new ValueImpl { Type = etype };
+ case ElementType.I1:
+ return new ValueImpl { Type = etype, Value = (sbyte)ReadInt () };
+ case ElementType.U1:
+ return new ValueImpl { Type = etype, Value = (byte)ReadInt () };
+ case ElementType.Boolean:
+ return new ValueImpl { Type = etype, Value = ReadInt () != 0 };
+ case ElementType.I2:
+ return new ValueImpl { Type = etype, Value = (short)ReadInt () };
+ case ElementType.U2:
+ return new ValueImpl { Type = etype, Value = (ushort)ReadInt () };
+ case ElementType.Char:
+ return new ValueImpl { Type = etype, Value = (char)ReadInt () };
+ case ElementType.I4:
+ return new ValueImpl { Type = etype, Value = ReadInt () };
+ case ElementType.U4:
+ return new ValueImpl { Type = etype, Value = (uint)ReadInt () };
+ case ElementType.I8:
+ return new ValueImpl { Type = etype, Value = ReadLong () };
+ case ElementType.U8:
+ return new ValueImpl { Type = etype, Value = (ulong)ReadLong () };
+ case ElementType.R4:
+ return new ValueImpl { Type = etype, Value = ReadFloat () };
+ case ElementType.R8:
+ return new ValueImpl { Type = etype, Value = ReadDouble () };
+ case ElementType.I:
+ case ElementType.U:
+ case ElementType.Ptr:
+ // FIXME: The client and the debuggee might have different word sizes
+ return new ValueImpl { Type = etype, Value = ReadLong () };
+ case ElementType.String:
+ case ElementType.SzArray:
+ case ElementType.Class:
+ case ElementType.Array:
+ case ElementType.Object:
+ long objid = ReadId ();
+ return new ValueImpl () { Type = etype, Objid = objid };
+ case ElementType.ValueType:
+ bool is_enum = ReadByte () == 1;
+ long klass = ReadId ();
+ long nfields = ReadInt ();
+ ValueImpl[] fields = new ValueImpl [nfields];
+ for (int i = 0; i < nfields; ++i)
+ fields [i] = ReadValue ();
+ return new ValueImpl () { Type = etype, Klass = klass, Fields = fields, IsEnum = is_enum };
+ case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
+ return new ValueImpl { Type = etype };
+ case (ElementType)ValueTypeId.VALUE_TYPE_ID_TYPE:
+ return new ValueImpl () { Type = etype, Id = ReadId () };
+ default:
+ throw new NotImplementedException ("Unable to handle type " + etype);
+ }
+ }
+
+ public long[] ReadIds (int n) {
+ long[] res = new long [n];
+ for (int i = 0; i < n; ++i)
+ res [i] = ReadId ();
+ return res;
+ }
+ }
+
+ class PacketWriter {
+
+ byte[] data;
+ int offset;
+
+ public PacketWriter () {
+ data = new byte [1024];
+ offset = 0;
+ }
+
+ void MakeRoom (int size) {
+ if (offset + size >= data.Length) {
+ int new_len = data.Length * 2;
+ while (new_len < offset + size) {
+ new_len *= 2;
+ }
+ byte[] new_data = new byte [new_len];
+ Array.Copy (data, new_data, data.Length);
+ data = new_data;
+ }
+ }
+
+ public PacketWriter WriteByte (byte val) {
+ MakeRoom (1);
+ encode_byte (data, val, ref offset);
+ return this;
+ }
+
+ public PacketWriter WriteInt (int val) {
+ MakeRoom (4);
+ encode_int (data, val, ref offset);
+ return this;
+ }
+
+ public PacketWriter WriteId (long id) {
+ MakeRoom (8);
+ encode_id (data, id, ref offset);
+ return this;
+ }
+
+ public PacketWriter WriteLong (long val) {
+ MakeRoom (8);
+ encode_long (data, val, ref offset);
+ return this;
+ }
+
+ public PacketWriter WriteFloat (float f) {
+ MakeRoom (8);
+ byte[] b = DataConverter.GetBytesBE (f);
+ for (int i = 0; i < 4; ++i)
+ data [offset + i] = b [i];
+ offset += 4;
+ return this;
+ }
+
+ public PacketWriter WriteDouble (double d) {
+ MakeRoom (8);
+ byte[] b = DataConverter.GetBytesBE (d);
+ for (int i = 0; i < 8; ++i)
+ data [offset + i] = b [i];
+ offset += 8;
+ return this;
+ }
+
+ public PacketWriter WriteInts (int[] ids) {
+ for (int i = 0; i < ids.Length; ++i)
+ WriteInt (ids [i]);
+ return this;
+ }
+
+ public PacketWriter WriteIds (long[] ids) {
+ for (int i = 0; i < ids.Length; ++i)
+ WriteId (ids [i]);
+ return this;
+ }
+
+ public PacketWriter WriteString (string s) {
+ if (s == null)
+ return WriteInt (-1);
+
+ byte[] b = Encoding.UTF8.GetBytes (s);
+ MakeRoom (4);
+ encode_int (data, b.Length, ref offset);
+ MakeRoom (b.Length);
+ Buffer.BlockCopy (b, 0, data, offset, b.Length);
+ offset += b.Length;
+ return this;
+ }
+
+ public PacketWriter WriteBool (bool val) {
+ WriteByte (val ? (byte)1 : (byte)0);
+ return this;
+ }
+
+ public PacketWriter WriteValue (ValueImpl v) {
+ ElementType t;
+
+ if (v.Value != null)
+ t = TypeCodeToElementType (Type.GetTypeCode (v.Value.GetType ()));
+ else
+ t = v.Type;
+ WriteByte ((byte)t);
+ switch (t) {
+ case ElementType.Boolean:
+ WriteInt ((bool)v.Value ? 1 : 0);
+ break;
+ case ElementType.Char:
+ WriteInt ((int)(char)v.Value);
+ break;
+ case ElementType.I1:
+ WriteInt ((int)(sbyte)v.Value);
+ break;
+ case ElementType.U1:
+ WriteInt ((int)(byte)v.Value);
+ break;
+ case ElementType.I2:
+ WriteInt ((int)(short)v.Value);
+ break;
+ case ElementType.U2:
+ WriteInt ((int)(ushort)v.Value);
+ break;
+ case ElementType.I4:
+ WriteInt ((int)(int)v.Value);
+ break;
+ case ElementType.U4:
+ WriteInt ((int)(uint)v.Value);
+ break;
+ case ElementType.I8:
+ WriteLong ((long)(long)v.Value);
+ break;
+ case ElementType.U8:
+ WriteLong ((long)(ulong)v.Value);
+ break;
+ case ElementType.R4:
+ WriteFloat ((float)v.Value);
+ break;
+ case ElementType.R8:
+ WriteDouble ((double)v.Value);
+ break;
+ case ElementType.String:
+ case ElementType.SzArray:
+ case ElementType.Class:
+ case ElementType.Array:
+ case ElementType.Object:
+ WriteId (v.Objid);
+ break;
+ case ElementType.ValueType:
+ // FIXME:
+ if (v.IsEnum)
+ throw new NotImplementedException ();
+ WriteByte (0);
+ WriteId (v.Klass);
+ WriteInt (v.Fields.Length);
+ for (int i = 0; i < v.Fields.Length; ++i)
+ WriteValue (v.Fields [i]);
+ break;
+ case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
+ break;
+ default:
+ throw new NotImplementedException ();
+ }
+
+ return this;
+ }
+
+ public PacketWriter WriteValues (ValueImpl[] values) {
+ for (int i = 0; i < values.Length; ++i)
+ WriteValue (values [i]);
+ return this;
+ }
+
+ public byte[] Data {
+ get {
+ return data;
+ }
+ }
+
+ public int Offset {
+ get {
+ return offset;
+ }
+ }
+ }
+
+ delegate void ReplyCallback (int packet_id, byte[] packet);
+
+ bool closed;
+ Thread receiver_thread;
+ Dictionary<int, byte[]> reply_packets;
+ Dictionary<int, ReplyCallback> reply_cbs;
+ Dictionary<int, int> reply_cb_counts;
+ object reply_packets_monitor;
+
+ internal event EventHandler<ErrorHandlerEventArgs> ErrorHandler;
+
+ protected Connection () {
+ closed = false;
+ reply_packets = new Dictionary<int, byte[]> ();
+ reply_cbs = new Dictionary<int, ReplyCallback> ();
+ reply_cb_counts = new Dictionary<int, int> ();
+ reply_packets_monitor = new Object ();
+ }
+
+ protected abstract int TransportReceive (byte[] buf, int buf_offset, int len);
+ protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
+ protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);
+ protected abstract void TransportClose ();
+
+ internal VersionInfo Version;
+
+ int Receive (byte[] buf, int buf_offset, int len) {
+ int offset = 0;
+
+ while (offset < len) {
+ int n = TransportReceive (buf, buf_offset + offset, len - offset);
+
+ if (n == 0)
+ return offset;
+ offset += n;
+ }
+
+ return offset;
+ }
+
+ // Do the wire protocol handshake
+ internal void Connect () {
+ byte[] buf = new byte [HANDSHAKE_STRING.Length];
+ char[] cbuf = new char [buf.Length];
+
+ // FIXME: Add a timeout
+ int n = Receive (buf, 0, buf.Length);
+ if (n == 0)
+ throw new IOException ("DWP Handshake failed.");
+ for (int i = 0; i < buf.Length; ++i)
+ cbuf [i] = (char)buf [i];
+
+ if (new String (cbuf) != HANDSHAKE_STRING)
+ throw new IOException ("DWP Handshake failed.");
+
+ TransportSend (buf, 0, buf.Length);
+
+ receiver_thread = new Thread (new ThreadStart (receiver_thread_main));
+ receiver_thread.Name = "SDB Receiver";
+ receiver_thread.IsBackground = true;
+ receiver_thread.Start ();
+
+ Version = VM_GetVersion ();
+
+ //
+ // Tell the debuggee our protocol version, so newer debuggees can work
+ // with older clients
+ //
+
+ //
+ // Older debuggees might not support this request
+ EventHandler<ErrorHandlerEventArgs> OrigErrorHandler = ErrorHandler;
+ ErrorHandler = null;
+ ErrorHandler += delegate (object sender, ErrorHandlerEventArgs args) {
+ throw new NotSupportedException ();
+ };
+ try {
+ VM_SetProtocolVersion (MAJOR_VERSION, MINOR_VERSION);
+ } catch (NotSupportedException) {
+ }
+ ErrorHandler = OrigErrorHandler;
+ }
+
+ internal byte[] ReadPacket () {
+ // FIXME: Throw ClosedConnectionException () if the connection is closed
+ // FIXME: Throw ClosedConnectionException () if another thread closes the connection
+ // FIXME: Locking
+ byte[] header = new byte [HEADER_LENGTH];
+
+ int len = Receive (header, 0, header.Length);
+ if (len == 0)
+ return new byte [0];
+ if (len != HEADER_LENGTH) {
+ // FIXME:
+ throw new IOException ("Packet of length " + len + " is read.");
+ }
+
+ int packetLength = GetPacketLength (header);
+ if (packetLength < 11)
+ throw new IOException ("Invalid packet length.");
+
+ if (packetLength == 11) {
+ return header;
+ } else {
+ byte[] buf = new byte [packetLength];
+ for (int i = 0; i < header.Length; ++i)
+ buf [i] = header [i];
+ len = Receive (buf, header.Length, packetLength - header.Length);
+ if (len != packetLength - header.Length)
+ throw new IOException ();
+ return buf;
+ }
+ }
+
+ internal void WritePacket (byte[] packet) {
+ // FIXME: Throw ClosedConnectionException () if the connection is closed
+ // FIXME: Throw ClosedConnectionException () if another thread closes the connection
+ // FIXME: Locking
+ TransportSend (packet, 0, packet.Length);
+ }
+
+ internal void Close () {
+ closed = true;
+ }
+
+ internal bool IsClosed {
+ get {
+ return closed;
+ }
+ }
+
+ bool disconnected;
+
+ void receiver_thread_main () {
+ while (!closed) {
+ try {
+ bool res = ReceivePacket ();
+ if (!res)
+ break;
+ } catch (Exception ex) {
+ if (!closed) {
+ Console.WriteLine (ex);
+ }
+ break;
+ }
+ }
+
+ lock (reply_packets_monitor) {
+ disconnected = true;
+ Monitor.PulseAll (reply_packets_monitor);
+ TransportClose ();
+ }
+ EventHandler.VMDisconnect (0, 0, null);
+ }
+
+ bool ReceivePacket () {
+ byte[] packet = ReadPacket ();
+
+ if (packet.Length == 0) {
+ return false;
+ }
+
+ if (IsReplyPacket (packet)) {
+ int id = GetPacketId (packet);
+ ReplyCallback cb = null;
+ lock (reply_packets_monitor) {
+ reply_cbs.TryGetValue (id, out cb);
+ if (cb == null) {
+ reply_packets [id] = packet;
+ Monitor.PulseAll (reply_packets_monitor);
+ } else {
+ int c = reply_cb_counts [id];
+ c --;
+ if (c == 0) {
+ reply_cbs.Remove (id);
+ reply_cb_counts.Remove (id);
+ }
+ }
+ }
+
+ if (cb != null)
+ cb.Invoke (id, packet);
+ } else {
+ PacketReader r = new PacketReader (packet);
+
+ if (r.CommandSet == CommandSet.EVENT && r.Command == (int)CmdEvent.COMPOSITE) {
+ int spolicy = r.ReadByte ();
+ int nevents = r.ReadInt ();
+
+ SuspendPolicy suspend_policy = decode_suspend_policy (spolicy);
+
+ EventInfo[] events = new EventInfo [nevents];
+
+ for (int i = 0; i < nevents; ++i) {
+ EventKind kind = (EventKind)r.ReadByte ();
+ int req_id = r.ReadInt ();
+
+ EventType etype = (EventType)kind;
+
+ if (kind == EventKind.VM_START) {
+ long thread_id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id };
+ //EventHandler.VMStart (req_id, thread_id, null);
+ } else if (kind == EventKind.VM_DEATH) {
+ //EventHandler.VMDeath (req_id, 0, null);
+ events [i] = new EventInfo (etype, req_id) { };
+ } else if (kind == EventKind.THREAD_START) {
+ long thread_id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = thread_id };
+ //EventHandler.ThreadStart (req_id, thread_id, thread_id);
+ } else if (kind == EventKind.THREAD_DEATH) {
+ long thread_id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = thread_id };
+ //EventHandler.ThreadDeath (req_id, thread_id, thread_id);
+ } else if (kind == EventKind.ASSEMBLY_LOAD) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.AssemblyLoad (req_id, thread_id, id);
+ } else if (kind == EventKind.ASSEMBLY_UNLOAD) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.AssemblyUnload (req_id, thread_id, id);
+ } else if (kind == EventKind.TYPE_LOAD) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.TypeLoad (req_id, thread_id, id);
+ } else if (kind == EventKind.METHOD_ENTRY) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.MethodEntry (req_id, thread_id, id);
+ } else if (kind == EventKind.METHOD_EXIT) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.MethodExit (req_id, thread_id, id);
+ } else if (kind == EventKind.BREAKPOINT) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ long loc = r.ReadLong ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
+ //EventHandler.Breakpoint (req_id, thread_id, id, loc);
+ } else if (kind == EventKind.STEP) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ long loc = r.ReadLong ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
+ //EventHandler.Step (req_id, thread_id, id, loc);
+ } else if (kind == EventKind.EXCEPTION) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ long loc = 0; // FIXME
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
+ //EventHandler.Exception (req_id, thread_id, id, loc);
+ } else if (kind == EventKind.APPDOMAIN_CREATE) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.AppDomainCreate (req_id, thread_id, id);
+ } else if (kind == EventKind.APPDOMAIN_UNLOAD) {
+ long thread_id = r.ReadId ();
+ long id = r.ReadId ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id };
+ //EventHandler.AppDomainUnload (req_id, thread_id, id);
+ } else if (kind == EventKind.USER_BREAK) {
+ long thread_id = r.ReadId ();
+ long id = 0;
+ long loc = 0;
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Id = id, Location = loc };
+ //EventHandler.Exception (req_id, thread_id, id, loc);
+ } else if (kind == EventKind.USER_LOG) {
+ long thread_id = r.ReadId ();
+ int level = r.ReadInt ();
+ string category = r.ReadString ();
+ string message = r.ReadString ();
+ events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id, Level = level, Category = category, Message = message };
+ //EventHandler.Exception (req_id, thread_id, id, loc);
+ } else if (kind == EventKind.KEEPALIVE) {
+ events [i] = new EventInfo (etype, req_id) { };
+ } else {
+ throw new NotImplementedException ("Unknown event kind: " + kind);
+ }
+ }
+
+ EventHandler.Events (suspend_policy, events);
+ }
+ }
+
+ return true;
+ }
+
+ internal IEventHandler EventHandler {
+ get; set;
+ }
+
+ static String CommandString (CommandSet command_set, int command)
+ {
+ string cmd;
+ switch (command_set) {
+ case CommandSet.VM:
+ cmd = ((CmdVM)command).ToString ();
+ break;
+ case CommandSet.OBJECT_REF:
+ cmd = ((CmdObjectRef)command).ToString ();
+ break;
+ case CommandSet.STRING_REF:
+ cmd = ((CmdStringRef)command).ToString ();
+ break;
+ case CommandSet.THREAD:
+ cmd = ((CmdThread)command).ToString ();
+ break;
+ case CommandSet.ARRAY_REF:
+ cmd = ((CmdArrayRef)command).ToString ();
+ break;
+ case CommandSet.EVENT_REQUEST:
+ cmd = ((CmdEventRequest)command).ToString ();
+ break;
+ case CommandSet.STACK_FRAME:
+ cmd = ((CmdStackFrame)command).ToString ();
+ break;
+ case CommandSet.APPDOMAIN:
+ cmd = ((CmdAppDomain)command).ToString ();
+ break;
+ case CommandSet.ASSEMBLY:
+ cmd = ((CmdAssembly)command).ToString ();
+ break;
+ case CommandSet.METHOD:
+ cmd = ((CmdMethod)command).ToString ();
+ break;
+ case CommandSet.TYPE:
+ cmd = ((CmdType)command).ToString ();
+ break;
+ case CommandSet.MODULE:
+ cmd = ((CmdModule)command).ToString ();
+ break;
+ case CommandSet.EVENT:
+ cmd = ((CmdEvent)command).ToString ();
+ break;
+ default:
+ cmd = command.ToString ();
+ break;
+ }
+ return string.Format ("[{0} {1}]", command_set, cmd);
+ }
+
+ long total_protocol_ticks;
+
+ void LogPacket (int packet_id, byte[] encoded_packet, byte[] reply_packet, CommandSet command_set, int command, Stopwatch watch) {
+ watch.Stop ();
+ total_protocol_ticks += watch.ElapsedTicks;
+ var ts = TimeSpan.FromTicks (total_protocol_ticks);
+ string msg = string.Format ("Packet: {0} sent: {1} received: {2} ms: {3} total ms: {4} {5}",
+ packet_id, encoded_packet.Length, reply_packet.Length, watch.ElapsedMilliseconds,
+ (ts.Seconds * 1000) + ts.Milliseconds,
+ CommandString (command_set, command));
+
+ LoggingStream.WriteLine (msg);
+ LoggingStream.Flush ();
+ }
+
+ /* Send a request and call cb when a result is received */
+ int Send (CommandSet command_set, int command, PacketWriter packet, Action<PacketReader> cb, int count) {
+ int id = IdGenerator;
+
+ Stopwatch watch = null;
+ if (EnableConnectionLogging)
+ watch = Stopwatch.StartNew ();
+
+ byte[] encoded_packet;
+ if (packet == null)
+ encoded_packet = EncodePacket (id, (int)command_set, command, null, 0);
+ else
+ encoded_packet = EncodePacket (id, (int)command_set, command, packet.Data, packet.Offset);
+
+ lock (reply_packets_monitor) {
+ reply_cbs [id] = delegate (int packet_id, byte[] p) {
+ if (EnableConnectionLogging)
+ LogPacket (packet_id, encoded_packet, p, command_set, command, watch);
+ /* Run the callback on a tp thread to avoid blocking the receive thread */
+ PacketReader r = new PacketReader (p);
+ cb.BeginInvoke (r, null, null);
+ };
+ reply_cb_counts [id] = count;
+ }
+
+ WritePacket (encoded_packet);
+
+ return id;
+ }
+
+ PacketReader SendReceive (CommandSet command_set, int command, PacketWriter packet) {
+ int id = IdGenerator;
+ Stopwatch watch = null;
+
+ if (disconnected)
+ throw new VMDisconnectedException ();
+
+ if (EnableConnectionLogging)
+ watch = Stopwatch.StartNew ();
+
+ byte[] encoded_packet;
+
+ if (packet == null)
+ encoded_packet = EncodePacket (id, (int)command_set, command, null, 0);
+ else
+ encoded_packet = EncodePacket (id, (int)command_set, command, packet.Data, packet.Offset);
+
+ WritePacket (encoded_packet);
+
+ int packetId = id;
+
+ /* Wait for the reply packet */
+ while (true) {
+ lock (reply_packets_monitor) {
+ if (reply_packets.ContainsKey (packetId)) {
+ byte[] reply = reply_packets [packetId];
+ reply_packets.Remove (packetId);
+ PacketReader r = new PacketReader (reply);
+
+ if (EnableConnectionLogging)
+ LogPacket (packetId, encoded_packet, reply, command_set, command, watch);
+ if (r.ErrorCode != 0) {
+ if (ErrorHandler != null)
+ ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode });
+ throw new NotImplementedException ("No error handler set.");
+ } else {
+ return r;
+ }
+ } else {
+ if (disconnected)
+ throw new VMDisconnectedException ();
+ Monitor.Wait (reply_packets_monitor);
+ }
+ }
+ }
+ }
+
+ PacketReader SendReceive (CommandSet command_set, int command) {
+ return SendReceive (command_set, command, null);
+ }
+
+ int packet_id_generator;
+
+ int IdGenerator {
+ get {
+ return Interlocked.Increment (ref packet_id_generator);
+ }
+ }
+
+ CattrInfo[] ReadCattrs (PacketReader r) {
+ CattrInfo[] res = new CattrInfo [r.ReadInt ()];
+ for (int i = 0; i < res.Length; ++i) {
+ CattrInfo info = new CattrInfo ();
+ info.ctor_id = r.ReadId ();
+ info.ctor_args = new ValueImpl [r.ReadInt ()];
+ for (int j = 0; j < info.ctor_args.Length; ++j) {
+ info.ctor_args [j] = r.ReadValue ();
+ }
+ info.named_args = new CattrNamedArgInfo [r.ReadInt ()];
+ for (int j = 0; j < info.named_args.Length; ++j) {
+ CattrNamedArgInfo arg = new CattrNamedArgInfo ();
+ int arg_type = r.ReadByte ();
+ arg.is_property = arg_type == 0x54;
+ arg.id = r.ReadId ();
+ arg.value = r.ReadValue ();
+ info.named_args [j] = arg;
+ }
+ res [i] = info;
+ }
+ return res;
+ }
+
+ static ElementType TypeCodeToElementType (TypeCode c) {
+ switch (c) {
+ case TypeCode.Boolean:
+ return ElementType.Boolean;
+ case TypeCode.Char:
+ return ElementType.Char;
+ case TypeCode.SByte:
+ return ElementType.I1;
+ case TypeCode.Byte:
+ return ElementType.U1;
+ case TypeCode.Int16:
+ return ElementType.I2;
+ case TypeCode.UInt16:
+ return ElementType.U2;
+ case TypeCode.Int32:
+ return ElementType.I4;
+ case TypeCode.UInt32:
+ return ElementType.U4;
+ case TypeCode.Int64:
+ return ElementType.I8;
+ case TypeCode.UInt64:
+ return ElementType.U8;
+ case TypeCode.Single:
+ return ElementType.R4;
+ case TypeCode.Double:
+ return ElementType.R8;
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ /*
+ * Implementation of debugger commands
+ */
+
+ internal VersionInfo VM_GetVersion () {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.VERSION, null);
+ VersionInfo info = new VersionInfo ();
+ info.VMVersion = res.ReadString ();
+ info.MajorVersion = res.ReadInt ();
+ info.MinorVersion = res.ReadInt ();
+ return info;
+ }
+
+ internal void VM_SetProtocolVersion (int major, int minor) {
+ SendReceive (CommandSet.VM, (int)CmdVM.SET_PROTOCOL_VERSION, new PacketWriter ().WriteInt (major).WriteInt (minor));
+ }
+
+ internal long[] VM_GetThreads () {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.ALL_THREADS, null);
+ int len = res.ReadInt ();
+ long[] arr = new long [len];
+ for (int i = 0; i < len; ++i)
+ arr [i] = res.ReadId ();
+ return arr;
+ }
+
+ internal void VM_Suspend () {
+ SendReceive (CommandSet.VM, (int)CmdVM.SUSPEND);
+ }
+
+ internal void VM_Resume () {
+ SendReceive (CommandSet.VM, (int)CmdVM.RESUME);
+ }
+
+ internal void VM_Exit (int exitCode) {
+ SendReceive (CommandSet.VM, (int)CmdVM.EXIT, new PacketWriter ().WriteInt (exitCode));
+ }
+
+ internal void VM_Dispose () {
+ SendReceive (CommandSet.VM, (int)CmdVM.DISPOSE);
+ }
+
+ internal ValueImpl VM_InvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, out ValueImpl exc) {
+ exc = null;
+ PacketReader r = SendReceive (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments));
+ if (r.ReadByte () == 0) {
+ exc = r.ReadValue ();
+ return null;
+ } else {
+ return r.ReadValue ();
+ }
+ }
+
+ internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state);
+
+ internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
+ return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) {
+ ValueImpl v, exc;
+
+ if (r.ErrorCode != 0) {
+ callback (null, null, (ErrorCode)r.ErrorCode, state);
+ } else {
+ if (r.ReadByte () == 0) {
+ exc = r.ReadValue ();
+ v = null;
+ } else {
+ v = r.ReadValue ();
+ exc = null;
+ }
+
+ callback (v, exc, 0, state);
+ }
+ }, 1);
+ }
+
+ internal int VM_BeginInvokeMethods (long thread, long[] methods, ValueImpl this_arg, List<ValueImpl[]> arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
+ // FIXME: Merge this with INVOKE_METHOD
+ var w = new PacketWriter ();
+ w.WriteId (thread);
+ w.WriteInt ((int)flags);
+ w.WriteInt (methods.Length);
+ for (int i = 0; i < methods.Length; ++i) {
+ w.WriteId (methods [i]);
+ w.WriteValue (this_arg);
+ w.WriteInt (arguments [i].Length);
+ w.WriteValues (arguments [i]);
+ }
+ return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) {
+ ValueImpl v, exc;
+
+ if (r.ErrorCode != 0) {
+ callback (null, null, (ErrorCode)r.ErrorCode, state);
+ } else {
+ if (r.ReadByte () == 0) {
+ exc = r.ReadValue ();
+ v = null;
+ } else {
+ v = r.ReadValue ();
+ exc = null;
+ }
+
+ callback (v, exc, 0, state);
+ }
+ }, methods.Length);
+ }
+
+ internal void VM_AbortInvoke (long thread, int id)
+ {
+ SendReceive (CommandSet.VM, (int)CmdVM.ABORT_INVOKE, new PacketWriter ().WriteId (thread).WriteInt (id));
+ }
+
+ internal void SetSocketTimeouts (int send_timeout, int receive_timeout, int keepalive_interval)
+ {
+ TransportSetTimeouts (send_timeout, receive_timeout);
+ SendReceive (CommandSet.VM, (int)CmdVM.SET_KEEPALIVE, new PacketWriter ().WriteId (keepalive_interval));
+ }
+
+ internal long[] VM_GetTypesForSourceFile (string fname, bool ignoreCase) {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES_FOR_SOURCE_FILE, new PacketWriter ().WriteString (fname).WriteBool (ignoreCase));
+ int count = res.ReadInt ();
+ long[] types = new long [count];
+ for (int i = 0; i < count; ++i)
+ types [i] = res.ReadId ();
+ return types;
+ }
+
+ internal long[] VM_GetTypes (string name, bool ignoreCase) {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.GET_TYPES, new PacketWriter ().WriteString (name).WriteBool (ignoreCase));
+ int count = res.ReadInt ();
+ long[] types = new long [count];
+ for (int i = 0; i < count; ++i)
+ types [i] = res.ReadId ();
+ return types;
+ }
+
+ /*
+ * DOMAIN
+ */
+
+ internal long RootDomain {
+ get {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ROOT_DOMAIN, null).ReadId ();
+ }
+ }
+
+ internal string Domain_GetName (long id) {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_FRIENDLY_NAME, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ internal long[] Domain_GetAssemblies (long id) {
+ var res = SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ASSEMBLIES, new PacketWriter ().WriteId (id));
+ int count = res.ReadInt ();
+ long[] assemblies = new long [count];
+ for (int i = 0; i < count; ++i)
+ assemblies [i] = res.ReadId ();
+ return assemblies;
+ }
+
+ internal long Domain_GetEntryAssembly (long id) {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_ENTRY_ASSEMBLY, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Domain_GetCorlib (long id) {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.GET_CORLIB, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Domain_CreateString (long id, string s) {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.CREATE_STRING, new PacketWriter ().WriteId (id).WriteString (s)).ReadId ();
+ }
+
+ internal long Domain_CreateBoxedValue (long id, long type_id, ValueImpl v) {
+ return SendReceive (CommandSet.APPDOMAIN, (int)CmdAppDomain.CREATE_BOXED_VALUE, new PacketWriter ().WriteId (id).WriteId (type_id).WriteValue (v)).ReadId ();
+ }
+
+ /*
+ * METHOD
+ */
+
+ internal string Method_GetName (long id) {
+ return SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ internal long Method_GetDeclaringType (long id) {
+ return SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_DECLARING_TYPE, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal DebugInfo Method_GetDebugInfo (long id) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_DEBUG_INFO, new PacketWriter ().WriteId (id));
+
+ DebugInfo info = new DebugInfo ();
+ info.max_il_offset = res.ReadInt ();
+
+ SourceInfo[] sources = null;
+ if (Version.AtLeast (2, 13)) {
+ int n = res.ReadInt ();
+ sources = new SourceInfo [n];
+ for (int i = 0; i < n; ++i) {
+ sources [i].source_file = res.ReadString ();
+ if (Version.AtLeast (2, 14)) {
+ sources [i].hash = new byte [16];
+ for (int j = 0; j < 16; ++j)
+ sources [i].hash [j] = (byte)res.ReadByte ();
+ }
+ }
+ } else {
+ sources = new SourceInfo [1];
+ sources [0].source_file = res.ReadString ();
+ }
+
+ int n_il_offsets = res.ReadInt ();
+ info.il_offsets = new int [n_il_offsets];
+ info.line_numbers = new int [n_il_offsets];
+ info.source_files = new SourceInfo [n_il_offsets];
+ info.column_numbers = new int [n_il_offsets];
+ for (int i = 0; i < n_il_offsets; ++i) {
+ info.il_offsets [i] = res.ReadInt ();
+ info.line_numbers [i] = res.ReadInt ();
+ if (Version.AtLeast (2, 12)) {
+ int idx = res.ReadInt ();
+ info.source_files [i] = idx >= 0 ? sources [idx] : default (SourceInfo);
+ } else {
+ info.source_files [i] = sources [0];
+ }
+ if (Version.AtLeast (2, 19))
+ info.column_numbers [i] = res.ReadInt ();
+ else
+ info.column_numbers [i] = 0;
+ }
+
+ return info;
+ }
+
+ internal ParamInfo Method_GetParamInfo (long id) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_PARAM_INFO, new PacketWriter ().WriteId (id));
+
+ ParamInfo info = new ParamInfo ();
+ info.call_conv = res.ReadInt ();
+ info.param_count = res.ReadInt ();
+ info.generic_param_count = res.ReadInt ();
+ info.ret_type = res.ReadId ();
+ info.param_types = new long [info.param_count];
+ for (int i = 0; i < info.param_count; ++i)
+ info.param_types [i] = res.ReadId ();
+ info.param_names = new string [info.param_count];
+ for (int i = 0; i < info.param_count; ++i)
+ info.param_names [i] = res.ReadString ();
+
+ return info;
+ }
+
+ internal LocalsInfo Method_GetLocalsInfo (long id) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_LOCALS_INFO, new PacketWriter ().WriteId (id));
+
+ LocalsInfo info = new LocalsInfo ();
+ int nlocals = res.ReadInt ();
+ info.types = new long [nlocals];
+ for (int i = 0; i < nlocals; ++i)
+ info.types [i] = res.ReadId ();
+ info.names = new string [nlocals];
+ for (int i = 0; i < nlocals; ++i)
+ info.names [i] = res.ReadString ();
+ info.live_range_start = new int [nlocals];
+ info.live_range_end = new int [nlocals];
+ for (int i = 0; i < nlocals; ++i) {
+ info.live_range_start [i] = res.ReadInt ();
+ info.live_range_end [i] = res.ReadInt ();
+ }
+
+ return info;
+ }
+
+ internal MethodInfo Method_GetInfo (long id) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_INFO, new PacketWriter ().WriteId (id));
+
+ MethodInfo info = new MethodInfo ();
+ info.attributes = res.ReadInt ();
+ info.iattributes = res.ReadInt ();
+ info.token = res.ReadInt ();
+ if (Version.AtLeast (2, 12)) {
+ int attrs = res.ReadByte ();
+ if ((attrs & (1 << 0)) != 0)
+ info.is_gmd = true;
+ if ((attrs & (1 << 1)) != 0)
+ info.is_generic_method = true;
+ info.gmd = res.ReadId ();
+ if (Version.AtLeast (2, 15)) {
+ if (info.is_generic_method) {
+ int n = res.ReadInt ();
+ info.type_args = res.ReadIds (n);
+ }
+ }
+ }
+ return info;
+ }
+
+ internal MethodBodyInfo Method_GetBody (long id) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_BODY, new PacketWriter ().WriteId (id));
+
+ MethodBodyInfo info = new MethodBodyInfo ();
+ info.il = new byte [res.ReadInt ()];
+ for (int i = 0; i < info.il.Length; ++i)
+ info.il [i] = (byte)res.ReadByte ();
+
+ if (Version.AtLeast (2, 18)) {
+ info.clauses = new ExceptionClauseInfo [res.ReadInt ()];
+
+ for (int i = 0; i < info.clauses.Length; ++i) {
+ var clause = new ExceptionClauseInfo {
+ flags = (ExceptionClauseFlags) res.ReadInt (),
+ try_offset = res.ReadInt (),
+ try_length = res.ReadInt (),
+ handler_offset = res.ReadInt (),
+ handler_length = res.ReadInt (),
+ };
+
+ if (clause.flags == ExceptionClauseFlags.None)
+ clause.catch_type_id = res.ReadId ();
+ else if (clause.flags == ExceptionClauseFlags.Filter)
+ clause.filter_offset = res.ReadInt ();
+
+ info.clauses [i] = clause;
+ }
+ } else
+ info.clauses = new ExceptionClauseInfo [0];
+
+ return info;
+ }
+
+ internal ResolvedToken Method_ResolveToken (long id, int token) {
+ var res = SendReceive (CommandSet.METHOD, (int)CmdMethod.RESOLVE_TOKEN, new PacketWriter ().WriteId (id).WriteInt (token));
+
+ TokenType type = (TokenType)res.ReadByte ();
+ switch (type) {
+ case TokenType.STRING:
+ return new ResolvedToken () { Type = type, Str = res.ReadString () };
+ case TokenType.TYPE:
+ case TokenType.METHOD:
+ case TokenType.FIELD:
+ return new ResolvedToken () { Type = type, Id = res.ReadId () };
+ case TokenType.UNKNOWN:
+ return new ResolvedToken () { Type = type };
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ internal CattrInfo[] Method_GetCustomAttributes (long id, long attr_type_id, bool inherit) {
+ PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.GET_CATTRS, new PacketWriter ().WriteId (id).WriteId (attr_type_id));
+ return ReadCattrs (r);
+ }
+
+ internal long Method_MakeGenericMethod (long id, long[] args) {
+ PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.MAKE_GENERIC_METHOD, new PacketWriter ().WriteId (id).WriteInt (args.Length).WriteIds (args));
+ return r.ReadId ();
+ }
+
+ /*
+ * THREAD
+ */
+
+ internal string Thread_GetName (long id) {
+ return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ internal FrameInfo[] Thread_GetFrameInfo (long id, int start_frame, int length) {
+ var res = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length));
+ int count = res.ReadInt ();
+
+ var frames = new FrameInfo [count];
+ for (int i = 0; i < count; ++i) {
+ var f = new FrameInfo ();
+ f.id = res.ReadInt ();
+ f.method = res.ReadId ();
+ f.il_offset = res.ReadInt ();
+ f.flags = (StackFrameFlags)res.ReadByte ();
+ frames [i] = f;
+ }
+
+ return frames;
+ }
+
+ internal int Thread_GetState (long id) {
+ return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_STATE, new PacketWriter ().WriteId (id)).ReadInt ();
+ }
+
+ internal ThreadInfo Thread_GetInfo (long id) {
+ PacketReader r = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_INFO, new PacketWriter ().WriteId (id));
+
+ ThreadInfo res = new ThreadInfo () { is_thread_pool = r.ReadByte () > 0 ? true : false };
+
+ return res;
+ }
+
+ internal long Thread_GetId (long id) {
+ return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_ID, new PacketWriter ().WriteId (id)).ReadLong ();
+ }
+
+ internal long Thread_GetTID (long id) {
+ return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_TID, new PacketWriter ().WriteId (id)).ReadLong ();
+ }
+
+ /*
+ * MODULE
+ */
+
+ internal ModuleInfo Module_GetInfo (long id) {
+ PacketReader r = SendReceive (CommandSet.MODULE, (int)CmdModule.GET_INFO, new PacketWriter ().WriteId (id));
+ ModuleInfo info = new ModuleInfo { Name = r.ReadString (), ScopeName = r.ReadString (), FQName = r.ReadString (), Guid = r.ReadString (), Assembly = r.ReadId () };
+ return info;
+ }
+
+ /*
+ * ASSEMBLY
+ */
+
+ internal string Assembly_GetLocation (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_LOCATION, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ internal long Assembly_GetEntryPoint (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_ENTRY_POINT, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Assembly_GetManifestModule (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_MANIFEST_MODULE, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Assembly_GetObject (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_OBJECT, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Assembly_GetType (long id, string name, bool ignoreCase) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_TYPE, new PacketWriter ().WriteId (id).WriteString (name).WriteBool (ignoreCase)).ReadId ();
+ }
+
+ internal string Assembly_GetName (long id) {
+ return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ /*
+ * TYPE
+ */
+
+ internal TypeInfo Type_GetInfo (long id) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INFO, new PacketWriter ().WriteId (id));
+ TypeInfo res = new TypeInfo ();
+
+ res.ns = r.ReadString ();
+ res.name = r.ReadString ();
+ res.full_name = r.ReadString ();
+ res.assembly = r.ReadId ();
+ res.module = r.ReadId ();
+ res.base_type = r.ReadId ();
+ res.element_type = r.ReadId ();
+ res.token = r.ReadInt ();
+ res.rank = r.ReadByte ();
+ res.attributes = r.ReadInt ();
+ int b = r.ReadByte ();
+ res.is_byref = (b & 1) != 0;
+ res.is_pointer = (b & 2) != 0;
+ res.is_primitive = (b & 4) != 0;
+ res.is_valuetype = (b & 8) != 0;
+ res.is_enum = (b & 16) != 0;
+ res.is_gtd = (b & 32) != 0;
+ res.is_generic_type = (b & 64) != 0;
+
+ int nested_len = r.ReadInt ();
+ res.nested = new long [nested_len];
+ for (int i = 0; i < nested_len; ++i)
+ res.nested [i] = r.ReadId ();
+
+ if (Version.AtLeast (2, 12))
+ res.gtd = r.ReadId ();
+ if (Version.AtLeast (2, 15) && res.is_generic_type) {
+ int n = r.ReadInt ();
+ res.type_args = r.ReadIds (n);
+ }
+
+ return res;
+ }
+
+ internal long[] Type_GetMethods (long id) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_METHODS, new PacketWriter ().WriteId (id));
+
+ int n = r.ReadInt ();
+ long[] res = new long [n];
+ for (int i = 0; i < n; ++i)
+ res [i] = r.ReadId ();
+ return res;
+ }
+
+ internal long[] Type_GetFields (long id, out string[] names, out long[] types, out int[] attrs) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_FIELDS, new PacketWriter ().WriteId (id));
+
+ int n = r.ReadInt ();
+ long[] res = new long [n];
+ names = new string [n];
+ types = new long [n];
+ attrs = new int [n];
+ for (int i = 0; i < n; ++i) {
+ res [i] = r.ReadId ();
+ names [i] = r.ReadString ();
+ types [i] = r.ReadId ();
+ attrs [i] = r.ReadInt ();
+ }
+ return res;
+ }
+
+ internal PropInfo[] Type_GetProperties (long id) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_PROPERTIES, new PacketWriter ().WriteId (id));
+
+ int n = r.ReadInt ();
+ PropInfo[] res = new PropInfo [n];
+ for (int i = 0; i < n; ++i) {
+ res [i] = new PropInfo ();
+ res [i].id = r.ReadId ();
+ res [i].name = r.ReadString ();
+ res [i].get_method = r.ReadId ();
+ res [i].set_method = r.ReadId ();
+ res [i].attrs = r.ReadInt ();
+ }
+
+ return res;
+ }
+
+ internal long Type_GetObject (long id) {
+ return SendReceive (CommandSet.TYPE, (int)CmdType.GET_OBJECT, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
+ int len = fields.Length;
+ PacketReader r;
+ if (thread_id != 0)
+ r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
+ else
+ r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
+
+ ValueImpl[] res = new ValueImpl [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadValue ();
+ return res;
+ }
+
+ internal void Type_SetValues (long id, long[] fields, ValueImpl[] values) {
+ SendReceive (CommandSet.TYPE, (int)CmdType.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (fields.Length).WriteIds (fields).WriteValues (values));
+ }
+
+ internal string[] Type_GetSourceFiles (long id, bool return_full_paths) {
+ var r = SendReceive (CommandSet.TYPE, return_full_paths ? (int)CmdType.GET_SOURCE_FILES_2 : (int)CmdType.GET_SOURCE_FILES, new PacketWriter ().WriteId (id));
+ int len = r.ReadInt ();
+ string[] res = new string [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadString ();
+ return res;
+ }
+
+ internal bool Type_IsAssignableFrom (long id, long c_id) {
+ return SendReceive (CommandSet.TYPE, (int)CmdType.IS_ASSIGNABLE_FROM, new PacketWriter ().WriteId (id).WriteId (c_id)).ReadByte () > 0;
+ }
+
+ internal CattrInfo[] Type_GetCustomAttributes (long id, long attr_type_id, bool inherit) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_CATTRS, new PacketWriter ().WriteId (id).WriteId (attr_type_id));
+ return ReadCattrs (r);
+ }
+
+ internal CattrInfo[] Type_GetFieldCustomAttributes (long id, long field_id, long attr_type_id, bool inherit) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_FIELD_CATTRS, new PacketWriter ().WriteId (id).WriteId (field_id).WriteId (attr_type_id));
+ return ReadCattrs (r);
+ }
+
+ internal CattrInfo[] Type_GetPropertyCustomAttributes (long id, long field_id, long attr_type_id, bool inherit) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_PROPERTY_CATTRS, new PacketWriter ().WriteId (id).WriteId (field_id).WriteId (attr_type_id));
+ return ReadCattrs (r);
+ }
+
+ public long[] Type_GetMethodsByNameFlags (long id, string name, int flags, bool ignoreCase) {
+ flags |= ignoreCase ? (int)BindingFlagsExtensions.BINDING_FLAGS_IGNORE_CASE : 0;
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.CMD_TYPE_GET_METHODS_BY_NAME_FLAGS, new PacketWriter ().WriteId (id).WriteString (name).WriteInt (flags));
+ int len = r.ReadInt ();
+ long[] res = new long [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadId ();
+ return res;
+ }
+
+ internal long[] Type_GetInterfaces (long id) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INTERFACES, new PacketWriter ().WriteId (id));
+ int len = r.ReadInt ();
+ return r.ReadIds (len);
+ }
+
+ internal IfaceMapInfo[] Type_GetInterfaceMap (long id, long[] ids) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_INTERFACE_MAP, new PacketWriter ().WriteId (id).WriteInt (ids.Length).WriteIds (ids));
+ var res = new IfaceMapInfo [ids.Length];
+ for (int i = 0; i < ids.Length; ++i) {
+ int n = r.ReadInt ();
+
+ res [i].iface_id = ids [i];
+ res [i].iface_methods = r.ReadIds (n);
+ res [i].target_methods = r.ReadIds (n);
+ }
+
+ return res;
+ }
+
+ internal bool Type_IsInitialized (long id) {
+ PacketReader r = SendReceive (CommandSet.TYPE, (int)CmdType.IS_INITIALIZED, new PacketWriter ().WriteId (id));
+ return r.ReadInt () == 1;
+ }
+
+ /*
+ * EVENTS
+ */
+
+ internal int EnableEvent (EventType etype, SuspendPolicy suspend_policy, List<Modifier> mods) {
+ var w = new PacketWriter ().WriteByte ((byte)etype).WriteByte ((byte)suspend_policy);
+ if (mods != null) {
+ if (mods.Count > 255)
+ throw new NotImplementedException ();
+ w.WriteByte ((byte)mods.Count);
+ foreach (Modifier mod in mods) {
+ if (mod is CountModifier) {
+ w.WriteByte ((byte)ModifierKind.COUNT);
+ w.WriteInt ((mod as CountModifier).Count);
+ } else if (mod is LocationModifier) {
+ w.WriteByte ((byte)ModifierKind.LOCATION_ONLY);
+ w.WriteId ((mod as LocationModifier).Method);
+ w.WriteLong ((mod as LocationModifier).Location);
+ } else if (mod is StepModifier) {
+ w.WriteByte ((byte)ModifierKind.STEP);
+ w.WriteId ((mod as StepModifier).Thread);
+ w.WriteInt ((mod as StepModifier).Size);
+ w.WriteInt ((mod as StepModifier).Depth);
+ if (Version.AtLeast (2, 16))
+ w.WriteInt ((mod as StepModifier).Filter);
+ } else if (mod is ThreadModifier) {
+ w.WriteByte ((byte)ModifierKind.THREAD_ONLY);
+ w.WriteId ((mod as ThreadModifier).Thread);
+ } else if (mod is ExceptionModifier) {
+ var em = mod as ExceptionModifier;
+ w.WriteByte ((byte)ModifierKind.EXCEPTION_ONLY);
+ w.WriteId (em.Type);
+ if (Version.MajorVersion > 2 || Version.MinorVersion > 0) {
+ /* This is only supported in protocol version 2.1 */
+ w.WriteBool (em.Caught);
+ w.WriteBool (em.Uncaught);
+ } else if (!em.Caught || !em.Uncaught) {
+ throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
+ }
+ } else if (mod is AssemblyModifier) {
+ w.WriteByte ((byte)ModifierKind.ASSEMBLY_ONLY);
+ var amod = (mod as AssemblyModifier);
+ w.WriteInt (amod.Assemblies.Length);
+ foreach (var id in amod.Assemblies)
+ w.WriteId (id);
+ } else if (mod is SourceFileModifier) {
+ w.WriteByte ((byte)ModifierKind.SOURCE_FILE_ONLY);
+ var smod = (mod as SourceFileModifier);
+ w.WriteInt (smod.SourceFiles.Length);
+ foreach (var s in smod.SourceFiles)
+ w.WriteString (s);
+ } else if (mod is TypeNameModifier) {
+ w.WriteByte ((byte)ModifierKind.TYPE_NAME_ONLY);
+ var tmod = (mod as TypeNameModifier);
+ w.WriteInt (tmod.TypeNames.Length);
+ foreach (var s in tmod.TypeNames)
+ w.WriteString (s);
+ } else {
+ throw new NotImplementedException ();
+ }
+ }
+ } else {
+ w.WriteByte (0);
+ }
+ return SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.SET, w).ReadInt ();
+ }
+
+ internal void ClearEventRequest (EventType etype, int req_id) {
+ SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.CLEAR, new PacketWriter ().WriteByte ((byte)etype).WriteInt (req_id));
+ }
+
+ internal void ClearAllBreakpoints () {
+ SendReceive (CommandSet.EVENT_REQUEST, (int)CmdEventRequest.CLEAR_ALL_BREAKPOINTS, new PacketWriter ());
+ }
+
+ /*
+ * STACK FRAME
+ */
+ internal ValueImpl StackFrame_GetThis (long thread_id, long id) {
+ PacketReader r = SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id));
+ return r.ReadValue ();
+ }
+
+ internal ValueImpl[] StackFrame_GetValues (long thread_id, long id, int[] pos) {
+ /* pos < 0 -> argument at pos (-pos) - 1 */
+ /* pos >= 0 -> local at pos */
+ int len = pos.Length;
+ PacketReader r = SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos));
+
+ ValueImpl[] res = new ValueImpl [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadValue ();
+ return res;
+ }
+
+ internal void StackFrame_SetValues (long thread_id, long id, int[] pos, ValueImpl[] values) {
+ /* pos < 0 -> argument at pos (-pos) - 1 */
+ /* pos >= 0 -> local at pos */
+ int len = pos.Length;
+ SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos).WriteValues (values));
+ }
+
+ /*
+ * ARRAYS
+ */
+ internal int[] Array_GetLength (long id, out int rank, out int[] lower_bounds) {
+ var r = SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.GET_LENGTH, new PacketWriter ().WriteId (id));
+ rank = r.ReadInt ();
+ int[] res = new int [rank];
+ lower_bounds = new int [rank];
+ for (int i = 0; i < rank; ++i) {
+ res [i] = r.ReadInt ();
+ lower_bounds [i] = r.ReadInt ();
+ }
+ return res;
+ }
+
+ internal ValueImpl[] Array_GetValues (long id, int index, int len) {
+ var r = SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (len));
+ ValueImpl[] res = new ValueImpl [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadValue ();
+ return res;
+ }
+
+ internal void Array_SetValues (long id, int index, ValueImpl[] values) {
+ SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (values.Length).WriteValues (values));
+ }
+
+ /*
+ * STRINGS
+ */
+ internal string String_GetValue (long id) {
+ return SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_VALUE, new PacketWriter ().WriteId (id)).ReadString ();
+ }
+
+ internal int String_GetLength (long id) {
+ return (int)SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_LENGTH, new PacketWriter ().WriteId (id)).ReadLong ();
+ }
+
+ internal char[] String_GetChars (long id, int index, int length) {
+ var r = SendReceive (CommandSet.STRING_REF, (int)CmdStringRef.GET_CHARS, new PacketWriter ().WriteId (id).WriteLong (index).WriteLong (length));
+ var res = new char [length];
+ for (int i = 0; i < length; ++i)
+ res [i] = (char)r.ReadShort ();
+ return res;
+ }
+
+ /*
+ * OBJECTS
+ */
+ internal long Object_GetType (long id) {
+ return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_TYPE, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal long Object_GetDomain (long id) {
+ return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
+ }
+
+ internal ValueImpl[] Object_GetValues (long id, long[] fields) {
+ int len = fields.Length;
+ PacketReader r = SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
+
+ ValueImpl[] res = new ValueImpl [len];
+ for (int i = 0; i < len; ++i)
+ res [i] = r.ReadValue ();
+ return res;
+ }
+
+ internal void Object_SetValues (long id, long[] fields, ValueImpl[] values) {
+ SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (fields.Length).WriteIds (fields).WriteValues (values));
+ }
+
+ internal bool Object_IsCollected (long id) {
+ return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.IS_COLLECTED, new PacketWriter ().WriteId (id)).ReadInt () == 1;
+ }
+
+ internal long Object_GetAddress (long id) {
+ return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_ADDRESS, new PacketWriter ().WriteId (id)).ReadLong ();
+ }
+
+ internal ObjectRefInfo Object_GetInfo (long id) {
+ ObjectRefInfo res = new ObjectRefInfo ();
+ PacketReader r = SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_INFO, new PacketWriter ().WriteId (id));
+
+ res.type_id = r.ReadId ();
+ res.domain_id = r.ReadId ();
+ return res;
+ }
+
+ public void ForceDisconnect ()
+ {
+ closed = true;
+ disconnected = true;
+ TransportClose ();
+ }
+ }
+
+ class TcpConnection : Connection
+ {
+ Socket socket;
+
+ internal TcpConnection (Socket socket)
+ {
+ this.socket = socket;
+ //socket.SetSocketOption (SocketOptionLevel.IP, SocketOptionName.NoDelay, 1);
+ }
+
+ internal EndPoint EndPoint {
+ get {
+ return socket.RemoteEndPoint;
+ }
+ }
+
+ protected override int TransportSend (byte[] buf, int buf_offset, int len)
+ {
+ return socket.Send (buf, buf_offset, len, SocketFlags.None);
+ }
+
+ protected override int TransportReceive (byte[] buf, int buf_offset, int len)
+ {
+ return socket.Receive (buf, buf_offset, len, SocketFlags.None);
+ }
+
+ protected override void TransportSetTimeouts (int send_timeout, int receive_timeout)
+ {
+ socket.SendTimeout = send_timeout;
+ socket.ReceiveTimeout = receive_timeout;
+ }
+
+ protected override void TransportClose ()
+ {
+ socket.Close ();
+ }
+ }
+
+ /* This is the interface exposed by the debugger towards the debugger agent */
+ interface IEventHandler
+ {
+ void Events (SuspendPolicy suspend_policy, EventInfo[] events);
+
+ void VMDisconnect (int req_id, long thread_id, string vm_uri);
+ }
+}
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventSet.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventSet.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventSet.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventSet.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/IInvokeAsyncResult.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/IInvokeAsyncResult.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/IInvokeAsyncResult.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/IInvokeAsyncResult.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ILExceptionHandler.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ILExceptionHandler.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ILExceptionHandler.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ILExceptionHandler.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ITargetProcess.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ITargetProcess.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ITargetProcess.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ITargetProcess.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs
diff --git a/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
new file mode 100644
index 0000000..04717c6
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
@@ -0,0 +1,411 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+using C = Mono.Cecil;
+using Mono.Cecil.Metadata;
+
+namespace Mono.Debugger.Soft
+{
+ public class MethodMirror : Mirror
+ {
+ string name;
+ MethodInfo info;
+ TypeMirror declaring_type;
+ DebugInfo debug_info;
+ C.MethodDefinition meta;
+ CustomAttributeDataMirror[] cattrs;
+ ParameterInfoMirror[] param_info;
+ ParameterInfoMirror ret_param;
+ LocalVariable[] locals;
+ IList<Location> locations;
+ MethodBodyMirror body;
+ MethodMirror gmd;
+ TypeMirror[] type_args;
+
+ internal MethodMirror (VirtualMachine vm, long id) : base (vm, id) {
+ }
+
+ public string Name {
+ get {
+ if (name == null)
+ name = vm.conn.Method_GetName (id);
+ return name;
+ }
+ }
+
+ public TypeMirror DeclaringType {
+ get {
+ if (declaring_type == null)
+ declaring_type = vm.GetType (vm.conn.Method_GetDeclaringType (id));
+ return declaring_type;
+ }
+ }
+
+ public TypeMirror ReturnType {
+ get {
+ return ReturnParameter.ParameterType;
+ }
+ }
+
+ // FIXME:
+ public string FullName {
+ get {
+ string type_namespace = DeclaringType.Namespace;
+ string type_name = DeclaringType.Name;
+ StringBuilder sb = new StringBuilder ();
+ sb.Append (ReturnType.Name);
+ sb.Append (' ');
+ if (type_namespace != String.Empty)
+ sb.Append (type_namespace + ".");
+ sb.Append(type_name);
+ sb.Append(":");
+ sb.Append(Name);
+ sb.Append(" ");
+ sb.Append("(");
+ for (var i = 0; i < param_info.Length; i++) {
+ sb.Append(param_info[i].ParameterType.Name);
+ if (i != param_info.Length - 1)
+ sb.Append(", ");
+ }
+ sb.Append(")");
+ return sb.ToString ();
+ }
+ }
+
+ /*
+ * Creating the custom attributes themselves could modify the behavior of the
+ * debuggee, so we return objects similar to the CustomAttributeData objects
+ * used by the reflection-only functionality on .net.
+ * Since protocol version 2.21
+ */
+ public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
+ return GetCAttrs (null, inherit);
+ }
+
+ /* Since protocol version 2.21 */
+ public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) {
+ if (attributeType == null)
+ throw new ArgumentNullException ("attributeType");
+ return GetCAttrs (attributeType, inherit);
+ }
+
+ CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
+ if (cattrs == null && meta != null && !Metadata.HasCustomAttributes)
+ cattrs = new CustomAttributeDataMirror [0];
+
+ // FIXME: Handle inherit
+ if (cattrs == null) {
+ CattrInfo[] info = vm.conn.Method_GetCustomAttributes (id, 0, false);
+ cattrs = CustomAttributeDataMirror.Create (vm, info);
+ }
+ var res = new List<CustomAttributeDataMirror> ();
+ foreach (var attr in cattrs)
+ if (type == null || attr.Constructor.DeclaringType == type)
+ res.Add (attr);
+ return res.ToArray ();
+ }
+
+ MethodInfo GetInfo () {
+ if (info == null)
+ info = vm.conn.Method_GetInfo (id);
+
+ return info;
+ }
+
+ public int MetadataToken {
+ get {
+ return GetInfo ().token;
+ }
+ }
+
+ public MethodAttributes Attributes {
+ get {
+ return (MethodAttributes) GetInfo ().attributes;
+ }
+ }
+
+ public bool IsPublic {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Public;
+ }
+ }
+ public bool IsPrivate {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Private;
+ }
+ }
+ public bool IsFamily {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Family;
+ }
+ }
+ public bool IsAssembly {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.Assembly;
+ }
+ }
+ public bool IsFamilyAndAssembly {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.FamANDAssem;
+ }
+ }
+ public bool IsFamilyOrAssembly {
+ get {
+ return (Attributes & MethodAttributes.MemberAccessMask) == MethodAttributes.FamORAssem;
+ }
+ }
+ public bool IsStatic {
+ get {
+ return (Attributes & MethodAttributes.Static) != 0;
+ }
+ }
+ public bool IsFinal {
+ get {
+ return (Attributes & MethodAttributes.Final) != 0;
+ }
+ }
+ public bool IsVirtual {
+ get {
+ return (Attributes & MethodAttributes.Virtual) != 0;
+ }
+ }
+ public bool IsHideBySig {
+ get {
+ return (Attributes & MethodAttributes.HideBySig) != 0;
+ }
+ }
+ public bool IsAbstract {
+ get {
+ return (Attributes & MethodAttributes.Abstract) != 0;
+ }
+ }
+ public bool IsSpecialName {
+ get {
+ return (Attributes & MethodAttributes.SpecialName) != 0;
+ }
+ }
+
+ public bool IsConstructor {
+ get {
+ int attr = (int)Attributes;
+ return ((attr & (int)MethodAttributes.RTSpecialName) != 0
+ && (Name == ".ctor"));
+ }
+ }
+
+ // Since protocol version 2.12
+ public bool IsGenericMethodDefinition {
+ get {
+ vm.CheckProtocolVersion (2, 12);
+ return GetInfo ().is_gmd;
+ }
+ }
+
+ // Since protocol version 2.12
+ public bool IsGenericMethod {
+ get {
+ vm.CheckProtocolVersion (2, 12);
+ return GetInfo ().is_generic_method;
+ }
+ }
+
+ public MethodImplAttributes GetMethodImplementationFlags() {
+ return (MethodImplAttributes)GetInfo ().iattributes;
+ }
+
+ public ParameterInfoMirror[] GetParameters () {
+ if (param_info == null) {
+ var pi = vm.conn.Method_GetParamInfo (id);
+ param_info = new ParameterInfoMirror [pi.param_count];
+ // Return
+ ret_param = new ParameterInfoMirror (this, -1, vm.GetType (pi.ret_type), null, ParameterAttributes.Retval);
+ // FIXME: this
+ // FIXME: Attributes
+ for (int i = 0; i < pi.param_count; ++i) {
+ param_info [i] = new ParameterInfoMirror (this, i, vm.GetType (pi.param_types [i]), pi.param_names [i], 0);
+ }
+ }
+
+ return param_info;
+ }
+
+ public ParameterInfoMirror ReturnParameter {
+ get {
+ if (ret_param == null)
+ GetParameters ();
+ return ret_param;
+ }
+ }
+
+ public LocalVariable[] GetLocals () {
+ if (locals == null) {
+ LocalsInfo li = new LocalsInfo ();
+ try {
+ li = vm.conn.Method_GetLocalsInfo (id);
+ } catch (CommandException) {
+ throw new AbsentInformationException ();
+ }
+
+ // Add the arguments as well
+ var pi = vm.conn.Method_GetParamInfo (id);
+
+ locals = new LocalVariable [pi.param_count + li.names.Length];
+
+ for (int i = 0; i < pi.param_count; ++i)
+ locals [i] = new LocalVariable (vm, this, i, pi.param_types [i], pi.param_names [i], -1, -1, true);
+
+ for (int i = 0; i < li.names.Length; ++i)
+ locals [i + pi.param_count] = new LocalVariable (vm, this, i, li.types [i], li.names [i], li.live_range_start [i], li.live_range_end [i], false);
+ }
+ return locals;
+ }
+
+ public LocalVariable GetLocal (string name) {
+ if (name == null)
+ throw new ArgumentNullException ("name");
+
+ GetLocals ();
+
+ LocalVariable res = null;
+ for (int i = 0; i < locals.Length; ++i) {
+ if (locals [i].Name == name) {
+ if (res != null)
+ throw new AmbiguousMatchException ("More that one local has the name '" + name + "'.");
+ res = locals [i];
+ }
+ }
+
+ return res;
+ }
+
+ public MethodBodyMirror GetMethodBody () {
+ if (body == null) {
+ MethodBodyInfo info = vm.conn.Method_GetBody (id);
+
+ body = new MethodBodyMirror (vm, this, info);
+ }
+ return body;
+ }
+
+ public MethodMirror GetGenericMethodDefinition () {
+ vm.CheckProtocolVersion (2, 12);
+ if (gmd == null) {
+ if (info.gmd == 0)
+ throw new InvalidOperationException ();
+ gmd = vm.GetMethod (info.gmd);
+ }
+ return gmd;
+ }
+
+ // Since protocol version 2.15
+ public TypeMirror[] GetGenericArguments () {
+ vm.CheckProtocolVersion (2, 15);
+ if (type_args == null)
+ type_args = vm.GetTypes (GetInfo ().type_args);
+ return type_args;
+ }
+
+ // Since protocol version 2.24
+ public MethodMirror MakeGenericMethod (TypeMirror[] args) {
+ if (args == null)
+ throw new ArgumentNullException ("args");
+ foreach (var a in args)
+ if (a == null)
+ throw new ArgumentNullException ("args");
+
+ if (!IsGenericMethodDefinition)
+ throw new InvalidOperationException ("not a generic method definition");
+
+ if (GetGenericArguments ().Length != args.Length)
+ throw new ArgumentException ("Incorrect length");
+
+ vm.CheckProtocolVersion (2, 24);
+ long id = -1;
+ try {
+ id = vm.conn.Method_MakeGenericMethod (Id, args.Select (t => t.Id).ToArray ());
+ } catch (CommandException) {
+ throw new InvalidOperationException ();
+ }
+ return vm.GetMethod (id);
+ }
+
+ public IList<int> ILOffsets {
+ get {
+ if (debug_info == null)
+ debug_info = vm.conn.Method_GetDebugInfo (id);
+ return Array.AsReadOnly (debug_info.il_offsets);
+ }
+ }
+
+ public IList<int> LineNumbers {
+ get {
+ if (debug_info == null)
+ debug_info = vm.conn.Method_GetDebugInfo (id);
+ return Array.AsReadOnly (debug_info.line_numbers);
+ }
+ }
+
+ public string SourceFile {
+ get {
+ if (debug_info == null)
+ debug_info = vm.conn.Method_GetDebugInfo (id);
+ return debug_info.source_files.Length > 0 ? debug_info.source_files [0].source_file : null;
+ }
+ }
+
+ public IList<Location> Locations {
+ get {
+ if (locations == null) {
+ var il_offsets = ILOffsets;
+ var line_numbers = LineNumbers;
+ IList<Location> res = new Location [ILOffsets.Count];
+ for (int i = 0; i < il_offsets.Count; ++i)
+ res [i] = new Location (vm, this, -1, il_offsets [i], debug_info.source_files [i].source_file, line_numbers [i], debug_info.column_numbers [i], debug_info.source_files [i].hash);
+ locations = res;
+ }
+ return locations;
+ }
+ }
+
+ internal int il_offset_to_line_number (int il_offset, out string src_file, out byte[] src_hash, out int column_number) {
+ if (debug_info == null)
+ debug_info = vm.conn.Method_GetDebugInfo (id);
+
+ // FIXME: Optimize this
+ src_file = null;
+ src_hash = null;
+ column_number = 0;
+ for (int i = debug_info.il_offsets.Length - 1; i >= 0; --i) {
+ if (debug_info.il_offsets [i] <= il_offset) {
+ src_file = debug_info.source_files [i].source_file;
+ src_hash = debug_info.source_files [i].hash;
+ column_number = debug_info.column_numbers [i];
+ return debug_info.line_numbers [i];
+ }
+ }
+ return -1;
+ }
+
+ public Location LocationAtILOffset (int il_offset) {
+ IList<Location> locs = Locations;
+
+ // FIXME: Optimize this
+ for (int i = locs.Count - 1; i >= 0; --i) {
+ if (locs [i].ILOffset <= il_offset)
+ return locs [i];
+ }
+
+ return null;
+ }
+
+ public C.MethodDefinition Metadata {
+ get {
+ if (meta == null)
+ meta = (C.MethodDefinition)DeclaringType.Assembly.Metadata.MainModule.LookupToken (MetadataToken);
+ return meta;
+ }
+ }
+ }
+}
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEventRequest.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEventRequest.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEventRequest.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEventRequest.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/UserBreakEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/UserBreakEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/UserBreakEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/UserBreakEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/UserLogEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/UserLogEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/UserLogEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/UserLogEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs
diff --git a/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
new file mode 100644
index 0000000..b77458b
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
@@ -0,0 +1,701 @@
+using System;
+using System.IO;
+using System.Threading;
+using System.Net;
+using System.Diagnostics;
+using System.Collections;
+using System.Collections.Generic;
+using Mono.Cecil.Metadata;
+
+namespace Mono.Debugger.Soft
+{
+ public class VirtualMachine : Mirror
+ {
+ Queue queue;
+ object queue_monitor;
+ object startup_monitor;
+ AppDomainMirror root_domain;
+ Dictionary<int, EventRequest> requests;
+ ITargetProcess process;
+
+ internal Connection conn;
+
+ VersionInfo version;
+
+ internal VirtualMachine (ITargetProcess process, Connection conn) : base () {
+ SetVirtualMachine (this);
+ queue = new Queue ();
+ queue_monitor = new Object ();
+ startup_monitor = new Object ();
+ requests = new Dictionary <int, EventRequest> ();
+ this.conn = conn;
+ this.process = process;
+ conn.ErrorHandler += ErrorHandler;
+ }
+
+ // The standard output of the process is available normally through Process
+ public StreamReader StandardOutput { get; set; }
+ public StreamReader StandardError { get; set; }
+
+
+ public Process Process {
+ get {
+ ProcessWrapper pw = process as ProcessWrapper;
+ if (pw == null)
+ throw new InvalidOperationException ("Process instance not available");
+ return pw.Process;
+ }
+ }
+
+ public ITargetProcess TargetProcess {
+ get {
+ return process;
+ }
+ }
+
+ public AppDomainMirror RootDomain {
+ get {
+ return root_domain;
+ }
+ }
+
+ public EndPoint EndPoint {
+ get {
+ var tcpConn = conn as TcpConnection;
+ if (tcpConn != null)
+ return tcpConn.EndPoint;
+ return null;
+ }
+ }
+
+ public VersionInfo Version {
+ get {
+ return version;
+ }
+ }
+
+ EventSet current_es;
+ int current_es_index;
+
+ /*
+ * It is impossible to determine when to resume when using this method, since
+ * the debuggee is suspended only once per event-set, not event.
+ */
+ [Obsolete ("Use GetNextEventSet () instead")]
+ public Event GetNextEvent () {
+ lock (queue_monitor) {
+ if (current_es == null || current_es_index == current_es.Events.Length) {
+ if (queue.Count == 0)
+ Monitor.Wait (queue_monitor);
+ current_es = (EventSet)queue.Dequeue ();
+ current_es_index = 0;
+ }
+ return current_es.Events [current_es_index ++];
+ }
+ }
+
+ public Event GetNextEvent (int timeout) {
+ throw new NotImplementedException ();
+ }
+
+ public EventSet GetNextEventSet () {
+ lock (queue_monitor) {
+ if (queue.Count == 0)
+ Monitor.Wait (queue_monitor);
+
+ current_es = null;
+ current_es_index = 0;
+
+ return (EventSet)queue.Dequeue ();
+ }
+ }
+
+ [Obsolete ("Use GetNextEventSet () instead")]
+ public T GetNextEvent<T> () where T : Event {
+ return GetNextEvent () as T;
+ }
+
+ public void Suspend () {
+ conn.VM_Suspend ();
+ }
+
+ public void Resume () {
+ try {
+ conn.VM_Resume ();
+ } catch (CommandException ex) {
+ if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
+ throw new VMNotSuspendedException ();
+ else
+ throw;
+ }
+ }
+
+ public void Exit (int exitCode) {
+ conn.VM_Exit (exitCode);
+ }
+
+ public void Detach () {
+ conn.VM_Dispose ();
+ conn.Close ();
+ notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null);
+ }
+
+ [Obsolete ("This method was poorly named; use the Detach() method instead")]
+ public void Dispose ()
+ {
+ Detach ();
+ }
+
+ public void ForceDisconnect ()
+ {
+ conn.ForceDisconnect ();
+ }
+
+ public IList<ThreadMirror> GetThreads () {
+ long[] ids = vm.conn.VM_GetThreads ();
+ ThreadMirror[] res = new ThreadMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetThread (ids [i]);
+ return res;
+ }
+
+ // Same as the mirrorOf methods in JDI
+ public PrimitiveValue CreateValue (object value) {
+ if (value == null)
+ return new PrimitiveValue (vm, null);
+
+ if (!value.GetType ().IsPrimitive)
+ throw new ArgumentException ("value must be of a primitive type instead of '" + value.GetType () + "'", "value");
+
+ return new PrimitiveValue (vm, value);
+ }
+
+ public EnumMirror CreateEnumMirror (TypeMirror type, PrimitiveValue value) {
+ return new EnumMirror (this, type, value);
+ }
+
+ //
+ // Enable send and receive timeouts on the connection and send a keepalive event
+ // every 'keepalive_interval' milliseconds.
+ //
+
+ public void SetSocketTimeouts (int send_timeout, int receive_timeout, int keepalive_interval)
+ {
+ conn.SetSocketTimeouts (send_timeout, receive_timeout, keepalive_interval);
+ }
+
+ //
+ // Methods to create event request objects
+ //
+ public BreakpointEventRequest CreateBreakpointRequest (MethodMirror method, long il_offset) {
+ return new BreakpointEventRequest (this, method, il_offset);
+ }
+
+ public BreakpointEventRequest CreateBreakpointRequest (Location loc) {
+ if (loc == null)
+ throw new ArgumentNullException ("loc");
+ CheckMirror (loc);
+ return new BreakpointEventRequest (this, loc.Method, loc.ILOffset);
+ }
+
+ public StepEventRequest CreateStepRequest (ThreadMirror thread) {
+ return new StepEventRequest (this, thread);
+ }
+
+ public MethodEntryEventRequest CreateMethodEntryRequest () {
+ return new MethodEntryEventRequest (this);
+ }
+
+ public MethodExitEventRequest CreateMethodExitRequest () {
+ return new MethodExitEventRequest (this);
+ }
+
+ public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type) {
+ return new ExceptionEventRequest (this, exc_type, true, true);
+ }
+
+ public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type, bool caught, bool uncaught) {
+ return new ExceptionEventRequest (this, exc_type, caught, uncaught);
+ }
+
+ public AssemblyLoadEventRequest CreateAssemblyLoadRequest () {
+ return new AssemblyLoadEventRequest (this);
+ }
+
+ public TypeLoadEventRequest CreateTypeLoadRequest () {
+ return new TypeLoadEventRequest (this);
+ }
+
+ public void EnableEvents (params EventType[] events) {
+ foreach (EventType etype in events) {
+ if (etype == EventType.Breakpoint)
+ throw new ArgumentException ("Breakpoint events cannot be requested using EnableEvents", "events");
+ conn.EnableEvent (etype, SuspendPolicy.All, null);
+ }
+ }
+
+ public BreakpointEventRequest SetBreakpoint (MethodMirror method, long il_offset) {
+ BreakpointEventRequest req = CreateBreakpointRequest (method, il_offset);
+
+ req.Enable ();
+
+ return req;
+ }
+
+ public void ClearAllBreakpoints () {
+ conn.ClearAllBreakpoints ();
+ }
+
+ public void Disconnect () {
+ conn.Close ();
+ }
+
+ //
+ // Return a list of TypeMirror objects for all loaded types which reference the
+ // source file FNAME. Might return false positives.
+ // Since protocol version 2.7.
+ //
+ public IList<TypeMirror> GetTypesForSourceFile (string fname, bool ignoreCase) {
+ long[] ids = conn.VM_GetTypesForSourceFile (fname, ignoreCase);
+ var res = new TypeMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetType (ids [i]);
+ return res;
+ }
+
+ //
+ // Return a list of TypeMirror objects for all loaded types named 'NAME'.
+ // NAME should be in the the same for as with Assembly.GetType ().
+ // Since protocol version 2.9.
+ //
+ public IList<TypeMirror> GetTypes (string name, bool ignoreCase) {
+ long[] ids = conn.VM_GetTypes (name, ignoreCase);
+ var res = new TypeMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetType (ids [i]);
+ return res;
+ }
+
+ internal void queue_event_set (EventSet es) {
+ lock (queue_monitor) {
+ queue.Enqueue (es);
+ Monitor.Pulse (queue_monitor);
+ }
+ }
+
+ internal void ErrorHandler (object sender, ErrorHandlerEventArgs args) {
+ switch (args.ErrorCode) {
+ case ErrorCode.INVALID_OBJECT:
+ throw new ObjectCollectedException ();
+ case ErrorCode.INVALID_FRAMEID:
+ throw new InvalidStackFrameException ();
+ case ErrorCode.NOT_SUSPENDED:
+ throw new VMNotSuspendedException ();
+ case ErrorCode.NOT_IMPLEMENTED:
+ throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
+ case ErrorCode.ABSENT_INFORMATION:
+ throw new AbsentInformationException ();
+ case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET:
+ throw new ArgumentException ("Cannot set breakpoint on the specified IL offset.");
+ default:
+ throw new CommandException (args.ErrorCode);
+ }
+ }
+
+ /* Wait for the debuggee to start up and connect to it */
+ internal void connect () {
+ conn.Connect ();
+
+ // Test the connection
+ version = conn.Version;
+ if (version.MajorVersion != Connection.MAJOR_VERSION)
+ throw new NotSupportedException (String.Format ("The debuggee implements protocol version {0}.{1}, while {2}.{3} is required.", version.MajorVersion, version.MinorVersion, Connection.MAJOR_VERSION, Connection.MINOR_VERSION));
+
+ long root_domain_id = conn.RootDomain;
+ root_domain = GetDomain (root_domain_id);
+ }
+
+ internal void notify_vm_event (EventType evtype, SuspendPolicy spolicy, int req_id, long thread_id, string vm_uri) {
+ //Console.WriteLine ("Event: " + evtype + "(" + vm_uri + ")");
+
+ switch (evtype) {
+ case EventType.VMStart:
+ /* Notify the main thread that the debuggee started up */
+ lock (startup_monitor) {
+ Monitor.Pulse (startup_monitor);
+ }
+ queue_event_set (new EventSet (this, spolicy, new Event[] { new VMStartEvent (vm, req_id, thread_id) }));
+ break;
+ case EventType.VMDeath:
+ queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDeathEvent (vm, req_id) }));
+ break;
+ case EventType.VMDisconnect:
+ queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDisconnectEvent (vm, req_id) }));
+ break;
+ default:
+ throw new Exception ();
+ }
+ }
+
+ //
+ // Methods to create instances of mirror objects
+ //
+
+ /*
+ class MirrorCache<T> {
+ static Dictionary <long, T> mirrors;
+ static object mirror_lock = new object ();
+
+ internal static T GetMirror (VirtualMachine vm, long id) {
+ lock (mirror_lock) {
+ if (mirrors == null)
+ mirrors = new Dictionary <long, T> ();
+ T obj;
+ if (!mirrors.TryGetValue (id, out obj)) {
+ obj = CreateMirror (vm, id);
+ mirrors [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ internal static T CreateMirror (VirtualMachine vm, long id) {
+ }
+ }
+ */
+
+ // FIXME: When to remove items from the cache ?
+
+ Dictionary <long, MethodMirror> methods;
+ object methods_lock = new object ();
+
+ internal MethodMirror GetMethod (long id) {
+ lock (methods_lock) {
+ if (methods == null)
+ methods = new Dictionary <long, MethodMirror> ();
+ MethodMirror obj;
+ if (id == 0)
+ return null;
+ if (!methods.TryGetValue (id, out obj)) {
+ obj = new MethodMirror (this, id);
+ methods [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ Dictionary <long, AssemblyMirror> assemblies;
+ object assemblies_lock = new object ();
+
+ internal AssemblyMirror GetAssembly (long id) {
+ lock (assemblies_lock) {
+ if (assemblies == null)
+ assemblies = new Dictionary <long, AssemblyMirror> ();
+ AssemblyMirror obj;
+ if (id == 0)
+ return null;
+ if (!assemblies.TryGetValue (id, out obj)) {
+ obj = new AssemblyMirror (this, id);
+ assemblies [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ Dictionary <long, ModuleMirror> modules;
+ object modules_lock = new object ();
+
+ internal ModuleMirror GetModule (long id) {
+ lock (modules_lock) {
+ if (modules == null)
+ modules = new Dictionary <long, ModuleMirror> ();
+ ModuleMirror obj;
+ if (id == 0)
+ return null;
+ if (!modules.TryGetValue (id, out obj)) {
+ obj = new ModuleMirror (this, id);
+ modules [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ Dictionary <long, AppDomainMirror> domains;
+ object domains_lock = new object ();
+
+ internal AppDomainMirror GetDomain (long id) {
+ lock (domains_lock) {
+ if (domains == null)
+ domains = new Dictionary <long, AppDomainMirror> ();
+ AppDomainMirror obj;
+ if (id == 0)
+ return null;
+ if (!domains.TryGetValue (id, out obj)) {
+ obj = new AppDomainMirror (this, id);
+ domains [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ Dictionary <long, TypeMirror> types;
+ object types_lock = new object ();
+
+ internal TypeMirror GetType (long id) {
+ lock (types_lock) {
+ if (types == null)
+ types = new Dictionary <long, TypeMirror> ();
+ TypeMirror obj;
+ if (id == 0)
+ return null;
+ if (!types.TryGetValue (id, out obj)) {
+ obj = new TypeMirror (this, id);
+ types [id] = obj;
+ }
+ return obj;
+ }
+ }
+
+ internal TypeMirror[] GetTypes (long[] ids) {
+ var res = new TypeMirror [ids.Length];
+ for (int i = 0; i < ids.Length; ++i)
+ res [i] = GetType (ids [i]);
+ return res;
+ }
+
+ Dictionary <long, ObjectMirror> objects;
+ object objects_lock = new object ();
+
+ internal T GetObject<T> (long id, long domain_id, long type_id) where T : ObjectMirror {
+ lock (objects_lock) {
+ if (objects == null)
+ objects = new Dictionary <long, ObjectMirror> ();
+ ObjectMirror obj;
+ if (!objects.TryGetValue (id, out obj)) {
+ /*
+ * Obtain the domain/type of the object to determine the type of
+ * object we need to create.
+ */
+ if (domain_id == 0 || type_id == 0) {
+ if (conn.Version.AtLeast (2, 5)) {
+ var info = conn.Object_GetInfo (id);
+ domain_id = info.domain_id;
+ type_id = info.type_id;
+ } else {
+ if (domain_id == 0)
+ domain_id = conn.Object_GetDomain (id);
+ if (type_id == 0)
+ type_id = conn.Object_GetType (id);
+ }
+ }
+ AppDomainMirror d = GetDomain (domain_id);
+ TypeMirror t = GetType (type_id);
+
+ if (t.Assembly == d.Corlib && t.Namespace == "System.Threading" && t.Name == "Thread")
+ obj = new ThreadMirror (this, id, t, d);
+ else if (t.Assembly == d.Corlib && t.Namespace == "System" && t.Name == "String")
+ obj = new StringMirror (this, id, t, d);
+ else if (typeof (T) == typeof (ArrayMirror))
+ obj = new ArrayMirror (this, id, t, d);
+ else
+ obj = new ObjectMirror (this, id, t, d);
+ objects [id] = obj;
+ }
+ return (T)obj;
+ }
+ }
+
+ internal T GetObject<T> (long id) where T : ObjectMirror {
+ return GetObject<T> (id, 0, 0);
+ }
+
+ internal ObjectMirror GetObject (long objid) {
+ return GetObject<ObjectMirror> (objid);
+ }
+
+ internal ThreadMirror GetThread (long id) {
+ return GetObject <ThreadMirror> (id);
+ }
+
+ object requests_lock = new object ();
+
+ internal void AddRequest (EventRequest req, int id) {
+ lock (requests_lock) {
+ requests [id] = req;
+ }
+ }
+
+ internal void RemoveRequest (EventRequest req, int id) {
+ lock (requests_lock) {
+ requests.Remove (id);
+ }
+ }
+
+ internal EventRequest GetRequest (int id) {
+ lock (requests_lock) {
+ return requests [id];
+ }
+ }
+
+ internal Value DecodeValue (ValueImpl v) {
+ if (v.Value != null)
+ return new PrimitiveValue (this, v.Value);
+
+ switch (v.Type) {
+ case ElementType.Void:
+ return null;
+ case ElementType.SzArray:
+ case ElementType.Array:
+ return GetObject<ArrayMirror> (v.Objid);
+ case ElementType.String:
+ return GetObject<StringMirror> (v.Objid);
+ case ElementType.Class:
+ case ElementType.Object:
+ return GetObject (v.Objid);
+ case ElementType.ValueType:
+ if (v.IsEnum)
+ return new EnumMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
+ else
+ return new StructMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
+ case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
+ return new PrimitiveValue (this, null);
+ default:
+ throw new NotImplementedException ("" + v.Type);
+ }
+ }
+
+ internal Value[] DecodeValues (ValueImpl[] values) {
+ Value[] res = new Value [values.Length];
+ for (int i = 0; i < values.Length; ++i)
+ res [i] = DecodeValue (values [i]);
+ return res;
+ }
+
+ internal ValueImpl EncodeValue (Value v) {
+ if (v is PrimitiveValue) {
+ object val = (v as PrimitiveValue).Value;
+ if (val == null)
+ return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
+ else
+ return new ValueImpl { Value = val };
+ } else if (v is ObjectMirror) {
+ return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
+ } else if (v is StructMirror) {
+ return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
+ } else {
+ throw new NotSupportedException ();
+ }
+ }
+
+ internal ValueImpl[] EncodeValues (IList<Value> values) {
+ ValueImpl[] res = new ValueImpl [values.Count];
+ for (int i = 0; i < values.Count; ++i)
+ res [i] = EncodeValue (values [i]);
+ return res;
+ }
+
+ internal void CheckProtocolVersion (int major, int minor) {
+ if (!conn.Version.AtLeast (major, minor))
+ throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
+ }
+ }
+
+ class EventHandler : MarshalByRefObject, IEventHandler
+ {
+ VirtualMachine vm;
+
+ public EventHandler (VirtualMachine vm) {
+ this.vm = vm;
+ }
+
+ public void Events (SuspendPolicy suspend_policy, EventInfo[] events) {
+ var l = new List<Event> ();
+
+ for (int i = 0; i < events.Length; ++i) {
+ EventInfo ei = events [i];
+ int req_id = ei.ReqId;
+ long thread_id = ei.ThreadId;
+ long id = ei.Id;
+ long loc = ei.Location;
+
+ switch (ei.EventType) {
+ case EventType.VMStart:
+ vm.notify_vm_event (EventType.VMStart, suspend_policy, req_id, thread_id, null);
+ break;
+ case EventType.VMDeath:
+ vm.notify_vm_event (EventType.VMDeath, suspend_policy, req_id, thread_id, null);
+ break;
+ case EventType.ThreadStart:
+ l.Add (new ThreadStartEvent (vm, req_id, id));
+ break;
+ case EventType.ThreadDeath:
+ l.Add (new ThreadDeathEvent (vm, req_id, id));
+ break;
+ case EventType.AssemblyLoad:
+ l.Add (new AssemblyLoadEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.AssemblyUnload:
+ l.Add (new AssemblyUnloadEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.TypeLoad:
+ l.Add (new TypeLoadEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.MethodEntry:
+ l.Add (new MethodEntryEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.MethodExit:
+ l.Add (new MethodExitEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.Breakpoint:
+ l.Add (new BreakpointEvent (vm, req_id, thread_id, id, loc));
+ break;
+ case EventType.Step:
+ l.Add (new StepEvent (vm, req_id, thread_id, id, loc));
+ break;
+ case EventType.Exception:
+ l.Add (new ExceptionEvent (vm, req_id, thread_id, id, loc));
+ break;
+ case EventType.AppDomainCreate:
+ l.Add (new AppDomainCreateEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.AppDomainUnload:
+ l.Add (new AppDomainUnloadEvent (vm, req_id, thread_id, id));
+ break;
+ case EventType.UserBreak:
+ l.Add (new UserBreakEvent (vm, req_id, thread_id));
+ break;
+ case EventType.UserLog:
+ l.Add (new UserLogEvent (vm, req_id, thread_id, ei.Level, ei.Category, ei.Message));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (l.Count > 0)
+ vm.queue_event_set (new EventSet (vm, suspend_policy, l.ToArray ()));
+ }
+
+ public void VMDisconnect (int req_id, long thread_id, string vm_uri) {
+ vm.notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, req_id, thread_id, vm_uri);
+ }
+ }
+
+ public class CommandException : Exception {
+
+ internal CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") {
+ ErrorCode = error_code;
+ }
+
+ public ErrorCode ErrorCode {
+ get; set;
+ }
+ }
+
+ public class VMNotSuspendedException : InvalidOperationException
+ {
+ public VMNotSuspendedException () : base ("The vm is not suspended.")
+ {
+ }
+ }
+}
diff --git a/contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs b/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
similarity index 100%
rename from contrib/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
rename to external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
diff --git a/external/debugger-libs/Mono.Debugger.Soft/mono-git-revision b/external/debugger-libs/Mono.Debugger.Soft/mono-git-revision
new file mode 100644
index 0000000..a016d76
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugger.Soft/mono-git-revision
@@ -0,0 +1 @@
+f39dc2adcde0f67de0079c883d3ea691b2b29e82
diff --git a/contrib/Mono.Debugger.Soft/mono.snk b/external/debugger-libs/Mono.Debugger.Soft/mono.snk
similarity index 100%
rename from contrib/Mono.Debugger.Soft/mono.snk
rename to external/debugger-libs/Mono.Debugger.Soft/mono.snk
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/ArrayAdaptor.cs b/external/debugger-libs/Mono.Debugging.Soft/ArrayAdaptor.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/ArrayAdaptor.cs
rename to external/debugger-libs/Mono.Debugging.Soft/ArrayAdaptor.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/AssemblyInfo.cs b/external/debugger-libs/Mono.Debugging.Soft/AssemblyInfo.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/AssemblyInfo.cs
rename to external/debugger-libs/Mono.Debugging.Soft/AssemblyInfo.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/ChangeLog b/external/debugger-libs/Mono.Debugging.Soft/ChangeLog
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/ChangeLog
rename to external/debugger-libs/Mono.Debugging.Soft/ChangeLog
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/FieldValueReference.cs b/external/debugger-libs/Mono.Debugging.Soft/FieldValueReference.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/FieldValueReference.cs
rename to external/debugger-libs/Mono.Debugging.Soft/FieldValueReference.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/LoggingService.cs b/external/debugger-libs/Mono.Debugging.Soft/LoggingService.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/LoggingService.cs
rename to external/debugger-libs/Mono.Debugging.Soft/LoggingService.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile.am b/external/debugger-libs/Mono.Debugging.Soft/Makefile.am
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile.am
rename to external/debugger-libs/Mono.Debugging.Soft/Makefile.am
diff --git a/external/debugger-libs/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj b/external/debugger-libs/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj
new file mode 100644
index 0000000..92a576d
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Mono.Debugging.Soft</RootNamespace>
+ <AssemblyName>Mono.Debugging.Soft</AssemblyName>
+ <SignAssembly>True</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\Mono.Debugging\mono.debugging.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
+ <Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
+ <Name>Mono.Debugger.Soft</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
+ <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
+ <Name>Mono.Cecil</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj">
+ <Project>{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}</Project>
+ <Name>Mono.Cecil.Mdb</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ArrayAdaptor.cs" />
+ <Compile Include="FieldValueReference.cs" />
+ <Compile Include="PropertyValueReference.cs" />
+ <Compile Include="SoftDebuggerSession.cs" />
+ <Compile Include="VariableValueReference.cs" />
+ <Compile Include="SoftEvaluationContext.cs" />
+ <Compile Include="SoftDebuggerAdaptor.cs" />
+ <Compile Include="SoftDebuggerBacktrace.cs" />
+ <Compile Include="SoftDebuggerStartInfo.cs" />
+ <Compile Include="LoggingService.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="StringAdaptor.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <None Include="Makefile.am" />
+ </ItemGroup>
+</Project>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/PropertyValueReference.cs b/external/debugger-libs/Mono.Debugging.Soft/PropertyValueReference.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/PropertyValueReference.cs
rename to external/debugger-libs/Mono.Debugging.Soft/PropertyValueReference.cs
diff --git a/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
new file mode 100644
index 0000000..af840a2
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
@@ -0,0 +1,1722 @@
+//
+// SoftDebuggerAdaptor.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2011,2012 Xamain Inc. (http://www.xamarin.com)
+//
+// 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.Linq;
+using System.Diagnostics;
+using Mono.Debugger.Soft;
+using Mono.Debugging.Evaluation;
+using Mono.Debugging.Client;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using System.Reflection.Emit;
+using ST = System.Threading;
+using Mono.Debugging.Backend;
+
+namespace Mono.Debugging.Soft
+{
+ public class SoftDebuggerAdaptor : ObjectValueAdaptor
+ {
+ static Dictionary<Type, OpCode> convertOps = new Dictionary<Type, OpCode> ();
+ delegate object TypeCastDelegate (object value);
+
+ static SoftDebuggerAdaptor ()
+ {
+ convertOps.Add (typeof (double), OpCodes.Conv_R8);
+ convertOps.Add (typeof (float), OpCodes.Conv_R4);
+ convertOps.Add (typeof (ulong), OpCodes.Conv_U8);
+ convertOps.Add (typeof (uint), OpCodes.Conv_U4);
+ convertOps.Add (typeof (ushort), OpCodes.Conv_U2);
+ convertOps.Add (typeof (char), OpCodes.Conv_U2);
+ convertOps.Add (typeof (byte), OpCodes.Conv_U1);
+ convertOps.Add (typeof (long), OpCodes.Conv_I8);
+ convertOps.Add (typeof (int), OpCodes.Conv_I4);
+ convertOps.Add (typeof (short), OpCodes.Conv_I2);
+ convertOps.Add (typeof (sbyte), OpCodes.Conv_I1);
+ }
+
+ public SoftDebuggerAdaptor ()
+ {
+ }
+
+ public override string CallToString (EvaluationContext ctx, object obj)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+
+ if (obj == null)
+ return null;
+
+ if (obj is StringMirror)
+ return ((StringMirror)obj).Value;
+
+ if (obj is EnumMirror)
+ return ((EnumMirror) obj).StringValue;
+
+ if (obj is PrimitiveValue)
+ return ((PrimitiveValue)obj).Value.ToString ();
+
+ if (obj is PointerValue)
+ return string.Format ("0x{0:x}", ((PointerValue)obj).Address);
+
+ if ((obj is StructMirror) && ((StructMirror)obj).Type.IsPrimitive) {
+ // Boxed primitive
+ StructMirror sm = (StructMirror) obj;
+ if (sm.Fields.Length > 0 && (sm.Fields[0] is PrimitiveValue))
+ return ((PrimitiveValue)sm.Fields[0]).Value.ToString ();
+ } else if ((obj is ObjectMirror) && cx.Options.AllowTargetInvoke) {
+ ObjectMirror ob = (ObjectMirror) obj;
+ MethodMirror method = OverloadResolve (cx, ob.Type, "ToString", null, new TypeMirror[0], true, false, false);
+ if (method != null && method.DeclaringType.FullName != "System.Object") {
+ StringMirror res = cx.RuntimeInvoke (method, obj, new Value[0]) as StringMirror;
+ return res != null ? res.Value : null;
+ }
+ } else if ((obj is StructMirror) && cx.Options.AllowTargetInvoke) {
+ StructMirror ob = (StructMirror) obj;
+ MethodMirror method = OverloadResolve (cx, ob.Type, "ToString", null, new TypeMirror[0], true, false, false);
+ if (method != null && method.DeclaringType.FullName != "System.ValueType") {
+ StringMirror res = cx.RuntimeInvoke (method, obj, new Value[0]) as StringMirror;
+ return res != null ? res.Value : null;
+ }
+ }
+
+ return GetDisplayTypeName (GetValueTypeName (ctx, obj));
+ }
+
+ public override object TryConvert (EvaluationContext ctx, object obj, object targetType)
+ {
+ object res = TryCast (ctx, obj, targetType);
+
+ if (res != null || obj == null)
+ return res;
+
+ object otype = GetValueType (ctx, obj);
+ if (otype is Type) {
+ if (targetType is TypeMirror)
+ targetType = Type.GetType (((TypeMirror)targetType).FullName, false);
+
+ Type tt = targetType as Type;
+ if (tt != null) {
+ try {
+ if (obj is PrimitiveValue)
+ obj = ((PrimitiveValue)obj).Value;
+ res = System.Convert.ChangeType (obj, tt);
+ return CreateValue (ctx, res);
+ } catch {
+ }
+ }
+ }
+ return null;
+ }
+
+ static TypeCastDelegate GenerateTypeCastDelegate (string methodName, Type fromType, Type toType)
+ {
+ var argTypes = new Type[] {
+ typeof (object)
+ };
+ var method = new DynamicMethod (methodName, typeof (object), argTypes, true);
+ ILGenerator il = method.GetILGenerator ();
+ ConstructorInfo ctorInfo;
+ MethodInfo methodInfo;
+ OpCode conv;
+
+ il.Emit (OpCodes.Ldarg_0);
+ il.Emit (OpCodes.Unbox_Any, fromType);
+
+ if (fromType.IsSubclassOf (typeof (System.Nullable))) {
+ PropertyInfo propInfo = fromType.GetProperty ("Value");
+ methodInfo = propInfo.GetGetMethod ();
+
+ il.Emit (OpCodes.Stloc_0);
+ il.Emit (OpCodes.Ldloca_S);
+ il.Emit (OpCodes.Call, methodInfo);
+
+ fromType = methodInfo.ReturnType;
+ }
+
+ if (!convertOps.TryGetValue (toType, out conv)) {
+ argTypes = new Type[] {
+ fromType
+ };
+
+ if (toType == typeof (string)) {
+ methodInfo = fromType.GetMethod ("ToString", new Type[0]);
+ il.Emit (OpCodes.Call, methodInfo);
+ } else if ((methodInfo = toType.GetMethod ("op_Explicit", argTypes)) != null) {
+ il.Emit (OpCodes.Call, methodInfo);
+ } else if ((methodInfo = toType.GetMethod ("op_Implicit", argTypes)) != null) {
+ il.Emit (OpCodes.Call, methodInfo);
+ } else if ((ctorInfo = toType.GetConstructor (argTypes)) != null) {
+ il.Emit (OpCodes.Call, ctorInfo);
+ } else {
+ // No idea what else to try...
+ throw new InvalidCastException ();
+ }
+ } else {
+ il.Emit (conv);
+ }
+
+ il.Emit (OpCodes.Box, toType);
+ il.Emit (OpCodes.Ret);
+
+ return (TypeCastDelegate) method.CreateDelegate (typeof (TypeCastDelegate));
+ }
+
+ static object DynamicCast (object value, Type target)
+ {
+ string methodName = string.Format ("CastFrom{0}To{1}", value.GetType ().Name, target.Name);
+ TypeCastDelegate method = GenerateTypeCastDelegate (methodName, value.GetType (), target);
+
+ return method.Invoke (value);
+ }
+
+ object TryForceCast (EvaluationContext ctx, Value value, TypeMirror fromType, TypeMirror toType)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ MethodMirror method;
+
+ method = OverloadResolve (cx, toType, "op_Explicit", null, new TypeMirror[] { fromType }, false, true, false);
+ if (method != null)
+ return cx.RuntimeInvoke (method, toType, new Value[] { value });
+
+ method = OverloadResolve (cx, toType, "op_Implicit", null, new TypeMirror[] { fromType }, false, true, false);
+ if (method != null)
+ return cx.RuntimeInvoke (method, toType, new Value[] { value });
+
+ // Finally, try a ctor...
+ try {
+ return CreateValue (ctx, toType, value);
+ } catch {
+ return null;
+ }
+ }
+
+ public override object TryCast (EvaluationContext ctx, object obj, object targetType)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ TypeMirror toType = targetType as TypeMirror;
+ TypeMirror fromType;
+
+ if (obj == null)
+ return null;
+
+ object valueType = GetValueType (ctx, obj);
+ if (valueType is TypeMirror) {
+ fromType = (TypeMirror) valueType;
+
+ if (toType != null && toType.IsAssignableFrom (fromType))
+ return obj;
+
+ // Try casting the primitive type of the enum
+ EnumMirror em = obj as EnumMirror;
+ if (em != null)
+ return TryCast (ctx, CreateValue (ctx, em.Value), targetType);
+
+ if (toType == null)
+ return null;
+
+ MethodMirror method;
+
+ if (toType.CSharpName == "string") {
+ method = OverloadResolve (cx, fromType, "ToString", null, new TypeMirror[0], true, false, false);
+ if (method != null)
+ return cx.RuntimeInvoke (method, obj, new Value[0]);
+ }
+
+ if (fromType.IsGenericType && fromType.FullName.StartsWith ("System.Nullable`1", StringComparison.Ordinal)) {
+ method = OverloadResolve (cx, fromType, "get_Value", null, new TypeMirror[0], true, false, false);
+ if (method != null) {
+ obj = cx.RuntimeInvoke (method, obj, new Value[0]);
+ return TryCast (ctx, obj, targetType);
+ }
+ }
+
+ return TryForceCast (ctx, (Value) obj, fromType, toType);
+ } else if (valueType is Type) {
+ if (toType != null) {
+ if (toType.IsEnum) {
+ PrimitiveValue casted = TryCast (ctx, obj, toType.EnumUnderlyingType) as PrimitiveValue;
+ if (casted == null)
+ return null;
+ return cx.Session.VirtualMachine.CreateEnumMirror (toType, casted);
+ }
+
+ targetType = Type.GetType (toType.FullName, false);
+ }
+
+ Type tt = targetType as Type;
+ if (tt != null) {
+ if (tt.IsAssignableFrom ((Type) valueType))
+ return obj;
+
+ try {
+ if (tt.IsPrimitive || tt == typeof (string)) {
+ if (obj is PrimitiveValue)
+ obj = ((PrimitiveValue) obj).Value;
+
+ if (obj == null)
+ return null;
+
+ object res;
+
+ try {
+ res = System.Convert.ChangeType (obj, tt);
+ } catch {
+ res = DynamicCast (obj, tt);
+ }
+
+ return CreateValue (ctx, res);
+ } else {
+ fromType = (TypeMirror) ForceLoadType (ctx, ((Type) valueType).FullName);
+ if (toType == null)
+ toType = (TypeMirror) ForceLoadType (ctx, tt.FullName);
+
+ return TryForceCast (ctx, (Value) obj, fromType, toType);
+ }
+ } catch {
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public override IStringAdaptor CreateStringAdaptor (EvaluationContext ctx, object str)
+ {
+ return new StringAdaptor ((StringMirror) str);
+ }
+
+ public override ICollectionAdaptor CreateArrayAdaptor (EvaluationContext ctx, object arr)
+ {
+ return new ArrayAdaptor ((ArrayMirror) arr);
+ }
+
+ public override object CreateNullValue (EvaluationContext ctx, object type)
+ {
+ return null;
+ }
+
+ public override object CreateTypeObject (EvaluationContext ctx, object type)
+ {
+ TypeMirror t = (TypeMirror) type;
+ return t.GetTypeObject ();
+ }
+
+ public override object CreateValue (EvaluationContext ctx, object type, params object[] args)
+ {
+ ctx.AssertTargetInvokeAllowed ();
+
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ TypeMirror t = (TypeMirror) type;
+
+ TypeMirror[] types = new TypeMirror [args.Length];
+ Value[] values = new Value[args.Length];
+ for (int n = 0; n < args.Length; n++) {
+ types[n] = ToTypeMirror (ctx, GetValueType (ctx, args[n]));
+ values[n] = (Value) args[n];
+ }
+
+ MethodMirror ctor = OverloadResolve (cx, t, ".ctor", null, types, true, true, true);
+ if (ctor == null)
+ return null;
+
+ return t.NewInstance (cx.Thread, ctor, values);
+ }
+
+ public override object CreateValue (EvaluationContext ctx, object value)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ if (value is string)
+ return cx.Thread.Domain.CreateString ((string)value);
+ else
+ return cx.Session.VirtualMachine.CreateValue (value);
+ }
+
+ public override object GetBaseValue (EvaluationContext ctx, object val)
+ {
+ return val;
+ }
+
+ public override bool NullableHasValue (EvaluationContext ctx, object type, object obj)
+ {
+ ValueReference hasValue = GetMember (ctx, type, obj, "has_value");
+
+ return (bool) hasValue.ObjectValue;
+ }
+
+ public override ValueReference NullableGetValue (EvaluationContext ctx, object type, object obj)
+ {
+ return GetMember (ctx, type, obj, "value");
+ }
+
+ public override object GetEnclosingType (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ return cx.Frame.Method.DeclaringType;
+ }
+
+ public override string[] GetImportedNamespaces (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ HashSet<string> namespaces = new HashSet<string> ();
+ foreach (TypeMirror type in cx.Session.GetAllTypes ())
+ namespaces.Add (type.Namespace);
+
+ string[] nss = new string [namespaces.Count];
+ namespaces.CopyTo (nss);
+ return nss;
+ }
+
+ public override ValueReference GetIndexerReference (EvaluationContext ctx, object target, object[] indices)
+ {
+ object valueType = GetValueType (ctx, target);
+ TypeMirror targetType = null;
+
+ if (valueType is Type)
+ targetType = (TypeMirror) ForceLoadType (ctx, ((Type) valueType).FullName);
+ else if (valueType is TypeMirror)
+ targetType = (TypeMirror) valueType;
+ else
+ return null;
+
+ Value[] values = new Value [indices.Length];
+ TypeMirror[] types = new TypeMirror [indices.Length];
+ for (int n=0; n<indices.Length; n++) {
+ types [n] = ToTypeMirror (ctx, GetValueType (ctx, indices [n]));
+ values [n] = (Value) indices [n];
+ }
+
+ List<MethodMirror> candidates = new List<MethodMirror> ();
+ List<PropertyInfoMirror> props = new List<PropertyInfoMirror> ();
+
+ TypeMirror type = targetType;
+ while (type != null) {
+ foreach (PropertyInfoMirror prop in type.GetProperties ()) {
+ MethodMirror met = prop.GetGetMethod (true);
+ if (met != null && !met.IsStatic && met.GetParameters ().Length > 0) {
+ candidates.Add (met);
+ props.Add (prop);
+ }
+ }
+ type = type.BaseType;
+ }
+
+ MethodMirror idx = OverloadResolve ((SoftEvaluationContext) ctx, targetType, null, null, types, candidates, true);
+ int i = candidates.IndexOf (idx);
+
+ MethodMirror getter = props[i].GetGetMethod (true);
+ if (getter == null)
+ return null;
+
+ return new PropertyValueReference (ctx, props[i], target, null, getter, values);
+ }
+
+ static bool InGeneratedClosureOrIteratorType (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ if (cx.Frame.Method.IsStatic)
+ return false;
+ TypeMirror tm = cx.Frame.Method.DeclaringType;
+ return IsGeneratedType (tm);
+ }
+
+ internal static bool IsGeneratedType (TypeMirror tm)
+ {
+ //
+ // This should cover all C# generated special containers
+ // - anonymous methods
+ // - lambdas
+ // - iterators
+ // - async methods
+ //
+ // which allow stepping into
+ //
+ return tm.Name[0] == '<' &&
+ // mcs is of the form <${NAME}>.c__{KIND}${NUMBER}
+ (tm.Name.IndexOf (">c__", StringComparison.Ordinal) > 0 ||
+ // csc is of form <${NAME}>d__${NUMBER}
+ tm.Name.IndexOf (">d__", StringComparison.Ordinal) > 0);
+ }
+
+ internal static string GetNameFromGeneratedType (TypeMirror tm)
+ {
+ return tm.Name.Substring (1, tm.Name.IndexOf ('>') - 1);
+ }
+
+ static bool IsHoistedThisReference (FieldInfoMirror field)
+ {
+ // mcs is "<>f__this" or "$this" (if in an async compiler generated type)
+ // csc is "<>4__this"
+ return field.Name == "$this" ||
+ (field.Name.StartsWith ("<>", StringComparison.Ordinal) &&
+ field.Name.EndsWith ("__this", StringComparison.Ordinal));
+ }
+
+ static bool IsClosureReferenceField (FieldInfoMirror field)
+ {
+ // mcs is "<>f__ref"
+ // csc is "CS$<>"
+ return field.Name.StartsWith ("CS$<>", StringComparison.Ordinal) ||
+ field.Name.StartsWith ("<>f__ref", StringComparison.Ordinal);
+ }
+
+ static bool IsClosureReferenceLocal (LocalVariable local)
+ {
+ if (local.Name == null)
+ return false;
+
+ // mcs is "$locvar" or starts with '<'
+ // csc is "CS$<>"
+ return local.Name.Length == 0 || local.Name[0] == '<' || local.Name.StartsWith ("$locvar", StringComparison.Ordinal) ||
+ local.Name.StartsWith ("CS$<>", StringComparison.Ordinal);
+ }
+
+ static bool IsGeneratedTemporaryLocal (LocalVariable local)
+ {
+ return local.Name != null && local.Name.StartsWith ("CS$", StringComparison.Ordinal);
+ }
+
+ static string GetHoistedIteratorLocalName (FieldInfoMirror field)
+ {
+ //mcs captured args, of form <$>name
+ if (field.Name.StartsWith ("<$>", StringComparison.Ordinal)) {
+ return field.Name.Substring (3);
+ }
+
+ // csc, mcs locals of form <name>__0
+ if (field.Name.StartsWith ("<", StringComparison.Ordinal)) {
+ int i = field.Name.IndexOf ('>');
+ if (i > 1) {
+ return field.Name.Substring (1, i - 1);
+ }
+ }
+ return null;
+ }
+
+ IEnumerable<ValueReference> GetHoistedLocalVariables (SoftEvaluationContext cx, ValueReference vthis)
+ {
+ if (vthis == null)
+ return new ValueReference [0];
+
+ object val = vthis.Value;
+ if (IsNull (cx, val))
+ return new ValueReference [0];
+
+ TypeMirror tm = (TypeMirror) vthis.Type;
+ bool isIterator = IsGeneratedType (tm);
+
+ var list = new List<ValueReference> ();
+ TypeMirror type = (TypeMirror) vthis.Type;
+ foreach (FieldInfoMirror field in type.GetFields ()) {
+ if (IsHoistedThisReference (field))
+ continue;
+ if (IsClosureReferenceField (field)) {
+ list.AddRange (GetHoistedLocalVariables (cx, new FieldValueReference (cx, field, val, type)));
+ continue;
+ }
+ if (field.Name.StartsWith ("<", StringComparison.Ordinal)) {
+ if (isIterator) {
+ var name = GetHoistedIteratorLocalName (field);
+ if (!string.IsNullOrEmpty (name)) {
+ list.Add (new FieldValueReference (cx, field, val, type, name, ObjectValueFlags.Variable));
+ }
+ }
+ } else if (!field.Name.Contains ("$")) {
+ list.Add (new FieldValueReference (cx, field, val, type, field.Name, ObjectValueFlags.Variable));
+ }
+ }
+ return list;
+ }
+
+ ValueReference GetHoistedThisReference (SoftEvaluationContext cx)
+ {
+ try {
+ Value val = cx.Frame.GetThis ();
+ TypeMirror type = (TypeMirror) GetValueType (cx, val);
+ return GetHoistedThisReference (cx, type, val);
+ } catch (AbsentInformationException) {
+ }
+ return null;
+ }
+
+ ValueReference GetHoistedThisReference (SoftEvaluationContext cx, TypeMirror type, object val)
+ {
+ foreach (FieldInfoMirror field in type.GetFields ()) {
+ if (IsHoistedThisReference (field))
+ return new FieldValueReference (cx, field, val, type, "this", ObjectValueFlags.Literal);
+
+ if (IsClosureReferenceField (field)) {
+ var fieldRef = new FieldValueReference (cx, field, val, type);
+ var thisRef = GetHoistedThisReference (cx, field.FieldType, fieldRef.Value);
+ if (thisRef != null)
+ return thisRef;
+ }
+ }
+
+ return null;
+ }
+
+ // if the local does not have a name, constructs one from the index
+ static string GetLocalName (SoftEvaluationContext cx, LocalVariable local)
+ {
+ if (!string.IsNullOrEmpty (local.Name) || cx.SourceCodeAvailable)
+ return local.Name;
+ return "loc" + local.Index;
+ }
+
+ protected override ValueReference OnGetLocalVariable (EvaluationContext ctx, string name)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ if (InGeneratedClosureOrIteratorType (cx))
+ return FindByName (OnGetLocalVariables (cx), v => v.Name, name, ctx.CaseSensitive);
+
+ try {
+ LocalVariable local = null;
+ if (!cx.SourceCodeAvailable) {
+ if (name.StartsWith ("loc", StringComparison.Ordinal)) {
+ int idx;
+ if (int.TryParse (name.Substring (3), out idx))
+ local = cx.Frame.Method.GetLocals ().FirstOrDefault (loc => loc.Index == idx);
+ }
+ } else {
+ local = ctx.CaseSensitive
+ ? cx.Frame.GetVisibleVariableByName (name)
+ : FindByName (cx.Frame.GetVisibleVariables(), v => v.Name, name, false);
+ }
+ if (local != null) {
+ return new VariableValueReference (ctx, GetLocalName (cx, local), local);
+ }
+ return FindByName (OnGetLocalVariables (ctx), v => v.Name, name, ctx.CaseSensitive);
+ } catch (AbsentInformationException) {
+ return null;
+ }
+ }
+
+ protected override IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ if (InGeneratedClosureOrIteratorType (cx)) {
+ ValueReference vthis = GetThisReference (cx);
+ return GetHoistedLocalVariables (cx, vthis).Union (GetLocalVariables (cx));
+ }
+
+ return GetLocalVariables (cx);
+ }
+
+ IEnumerable<ValueReference> GetLocalVariables (SoftEvaluationContext cx)
+ {
+ IList<LocalVariable> locals;
+ try {
+ locals = cx.Frame.GetVisibleVariables ();
+ } catch (AbsentInformationException) {
+ yield break;
+ }
+ foreach (LocalVariable local in locals) {
+ if (local.IsArg)
+ continue;
+ if (IsClosureReferenceLocal (local) && IsGeneratedType (local.Type)) {
+ foreach (var gv in GetHoistedLocalVariables (cx, new VariableValueReference (cx, local.Name, local))) {
+ yield return gv;
+ }
+ } else if (!IsGeneratedTemporaryLocal (local)) {
+ yield return new VariableValueReference (cx, GetLocalName (cx, local), local);
+ }
+ }
+ }
+
+ public override bool HasMember (EvaluationContext ctx, object type, string memberName, BindingFlags bindingFlags)
+ {
+ TypeMirror tm = (TypeMirror) type;
+
+ while (tm != null) {
+ FieldInfoMirror field = FindByName (tm.GetFields (), f => f.Name, memberName, ctx.CaseSensitive);
+ if (field != null)
+ return true;
+
+ PropertyInfoMirror prop = FindByName (tm.GetProperties (), p => p.Name, memberName, ctx.CaseSensitive);
+ if (prop != null) {
+ MethodMirror getter = prop.GetGetMethod (bindingFlags.HasFlag (BindingFlags.NonPublic));
+ if (getter != null)
+ return true;
+ }
+
+ if (bindingFlags.HasFlag (BindingFlags.DeclaredOnly))
+ break;
+
+ tm = tm.BaseType;
+ }
+
+ return false;
+ }
+
+ static bool IsAnonymousType (TypeMirror type)
+ {
+ return type.Name.StartsWith ("<>__AnonType", StringComparison.Ordinal);
+ }
+
+ protected override ValueReference GetMember (EvaluationContext ctx, object t, object co, string name)
+ {
+ TypeMirror type = t as TypeMirror;
+
+ while (type != null) {
+ FieldInfoMirror field = FindByName (type.GetFields (), f => f.Name, name, ctx.CaseSensitive);
+ if (field != null && (field.IsStatic || co != null))
+ return new FieldValueReference (ctx, field, co, type);
+
+ PropertyInfoMirror prop = FindByName (type.GetProperties (), p => p.Name, name, ctx.CaseSensitive);
+ if (prop != null && (IsStatic (prop) || co != null)) {
+ // Optimization: if the property has a CompilerGenerated backing field, use that instead.
+ // This way we avoid overhead of invoking methods on the debugee when the value is requested.
+ string cgFieldName = string.Format ("<{0}>{1}", prop.Name, IsAnonymousType (type) ? "" : "k__BackingField");
+ if ((field = FindByName (type.GetFields (), f => f.Name, cgFieldName, true)) != null && IsCompilerGenerated (field))
+ return new FieldValueReference (ctx, field, co, type, prop.Name, ObjectValueFlags.Property);
+
+ // Backing field not available, so do things the old fashioned way.
+ MethodMirror getter = prop.GetGetMethod (true);
+ if (getter == null)
+ return null;
+
+ return new PropertyValueReference (ctx, prop, co, type, getter, null);
+ }
+
+ type = type.BaseType;
+ }
+
+ return null;
+ }
+
+ static bool IsCompilerGenerated (FieldInfoMirror field)
+ {
+ CustomAttributeDataMirror[] attrs = field.GetCustomAttributes (true);
+ var cga = GetAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute> (attrs);
+ return cga != null;
+ }
+
+ static bool IsStatic (PropertyInfoMirror prop)
+ {
+ MethodMirror met = prop.GetGetMethod (true) ?? prop.GetSetMethod (true);
+ return met.IsStatic;
+ }
+
+ static T FindByName<T> (IEnumerable<T> elems, Func<T,string> getName, string name, bool caseSensitive)
+ {
+ T best = default(T);
+ foreach (T t in elems) {
+ string n = getName (t);
+ if (n == name)
+ return t;
+ if (!caseSensitive && n.Equals (name, StringComparison.CurrentCultureIgnoreCase))
+ best = t;
+ }
+ return best;
+ }
+
+ protected override IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags)
+ {
+ Dictionary<string, PropertyInfoMirror> subProps = new Dictionary<string, PropertyInfoMirror> ();
+ TypeMirror type = t as TypeMirror;
+ TypeMirror realType = null;
+ if (co != null && (bindingFlags & BindingFlags.Instance) != 0)
+ realType = GetValueType (ctx, co) as TypeMirror;
+
+ // First of all, get a list of properties overriden in sub-types
+ while (realType != null && realType != type) {
+ foreach (PropertyInfoMirror prop in realType.GetProperties (bindingFlags | BindingFlags.DeclaredOnly)) {
+ MethodMirror met = prop.GetGetMethod (true);
+ if (met == null || met.GetParameters ().Length != 0 || met.IsAbstract || !met.IsVirtual || met.IsStatic)
+ continue;
+ if (met.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
+ continue;
+ if (!met.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
+ continue;
+ subProps [prop.Name] = prop;
+ }
+ realType = realType.BaseType;
+ }
+
+ while (type != null) {
+ foreach (FieldInfoMirror field in type.GetFields ()) {
+ if (field.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
+ continue;
+ if (!field.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
+ continue;
+ if (field.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
+ continue;
+ if (!field.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
+ continue;
+ yield return new FieldValueReference (ctx, field, co, type);
+ }
+ foreach (PropertyInfoMirror prop in type.GetProperties (bindingFlags)) {
+ MethodMirror getter = prop.GetGetMethod (true);
+ if (getter == null || getter.GetParameters ().Length != 0 || getter.IsAbstract)
+ continue;
+ if (getter.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
+ continue;
+ if (!getter.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
+ continue;
+ if (getter.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
+ continue;
+ if (!getter.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
+ continue;
+
+ // If a property is overriden, return the override instead of the base property
+ PropertyInfoMirror overridden;
+ if (getter.IsVirtual && subProps.TryGetValue (prop.Name, out overridden)) {
+ getter = overridden.GetGetMethod (true);
+ if (getter == null)
+ continue;
+
+ yield return new PropertyValueReference (ctx, overridden, co, overridden.DeclaringType, getter, null);
+ } else {
+ yield return new PropertyValueReference (ctx, prop, co, type, getter, null);
+ }
+ }
+ if ((bindingFlags & BindingFlags.DeclaredOnly) != 0)
+ break;
+ type = type.BaseType;
+ }
+ }
+
+ public override void GetNamespaceContents (EvaluationContext ctx, string namspace, out string[] childNamespaces, out string[] childTypes)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ HashSet<string> types = new HashSet<string> ();
+ HashSet<string> namespaces = new HashSet<string> ();
+ string namspacePrefix = namspace.Length > 0 ? namspace + "." : "";
+ foreach (TypeMirror type in cx.Session.GetAllTypes ()) {
+ if (type.Namespace == namspace || type.Namespace.StartsWith (namspacePrefix, StringComparison.InvariantCulture)) {
+ namespaces.Add (type.Namespace);
+ types.Add (type.FullName);
+ }
+ }
+ childNamespaces = new string [namespaces.Count];
+ namespaces.CopyTo (childNamespaces);
+
+ childTypes = new string [types.Count];
+ types.CopyTo (childTypes);
+ }
+
+ protected override IEnumerable<ValueReference> OnGetParameters (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ LocalVariable[] locals;
+ try {
+ locals = cx.Frame.Method.GetLocals ();
+ } catch (AbsentInformationException) {
+ yield break;
+ }
+
+ foreach (LocalVariable var in locals) {
+ if (var.IsArg) {
+ string name = !string.IsNullOrEmpty (var.Name) ? var.Name : "arg" + var.Index;
+ yield return new VariableValueReference (ctx, name, var);
+ }
+ }
+ }
+
+ protected override ValueReference OnGetThisReference (EvaluationContext ctx)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ if (InGeneratedClosureOrIteratorType (cx))
+ return GetHoistedThisReference (cx);
+
+ return GetThisReference (cx);
+ }
+
+ ValueReference GetThisReference (SoftEvaluationContext cx)
+ {
+ try {
+ if (cx.Frame.Method.IsStatic)
+ return null;
+ Value val = cx.Frame.GetThis ();
+ return LiteralValueReference.CreateTargetObjectLiteral (cx, "this", val);
+ } catch (AbsentInformationException) {
+ return null;
+ }
+ }
+
+ public override ValueReference GetCurrentException (EvaluationContext ctx)
+ {
+ try {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ ObjectMirror exc = cx.Session.GetExceptionObject (cx.Thread);
+ if (exc != null)
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, ctx.Options.CurrentExceptionTag, exc);
+
+ return null;
+ } catch (AbsentInformationException) {
+ return null;
+ }
+ }
+
+ public override bool IsGenericType (EvaluationContext ctx, object type)
+ {
+ return type != null && ((TypeMirror) type).IsGenericType;
+ }
+
+ public override object[] GetTypeArgs (EvaluationContext ctx, object type)
+ {
+ TypeMirror tm = (TypeMirror) type;
+
+ if (tm.VirtualMachine.Version.AtLeast (2, 15))
+ return tm.GetGenericArguments ();
+
+ // fall back to parsing them from the from the FullName
+ List<string> names = new List<string> ();
+ string s = tm.FullName;
+ int i = s.IndexOf ('`');
+
+ if (i != -1) {
+ i = s.IndexOf ('[', i);
+ if (i == -1)
+ return new object [0];
+ int si = ++i;
+ int nt = 0;
+ for (; i < s.Length && (nt > 0 || s[i] != ']'); i++) {
+ if (s[i] == '[')
+ nt++;
+ else if (s[i] == ']')
+ nt--;
+ else if (s[i] == ',' && nt == 0) {
+ names.Add (s.Substring (si, i - si));
+ si = i + 1;
+ }
+ }
+ names.Add (s.Substring (si, i - si));
+ object[] types = new object [names.Count];
+ for (int n=0; n<names.Count; n++) {
+ string tn = names [n];
+ if (tn.StartsWith ("[", StringComparison.Ordinal))
+ tn = tn.Substring (1, tn.Length - 2);
+ types [n] = GetType (ctx, tn);
+ if (types [n] == null)
+ return new object [0];
+ }
+ return types;
+ }
+
+ return new object [0];
+ }
+
+ public override object GetType (EvaluationContext ctx, string name, object[] typeArgs)
+ {
+ SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
+ int i = name.IndexOf (',');
+ if (i != -1) {
+ // Find first comma outside brackets
+ int nest = 0;
+ for (int n=0; n<name.Length; n++) {
+ char c = name [n];
+ if (c == '[')
+ nest++;
+ else if (c == ']')
+ nest--;
+ else if (c == ',' && nest == 0) {
+ name = name.Substring (0, n).Trim ();
+ break;
+ }
+ }
+ }
+
+ if (typeArgs != null && typeArgs.Length > 0){
+ string args = "";
+ foreach (object t in typeArgs) {
+ if (args.Length > 0)
+ args += ",";
+ string tn;
+ if (t is TypeMirror) {
+ TypeMirror atm = (TypeMirror) t;
+ tn = atm.FullName + "," + atm.Assembly.GetName ();
+ } else {
+ Type atm = (Type) t;
+ tn = atm.FullName + "," + atm.Assembly.GetName ();
+ }
+ if (tn.IndexOf (',') != -1)
+ tn = "[" + tn + "]";
+ args += tn;
+ }
+ name += "[" +args + "]";
+ }
+
+ TypeMirror tm = cx.Session.GetType (name);
+ if (tm != null)
+ return tm;
+ foreach (AssemblyMirror asm in cx.Thread.Domain.GetAssemblies ()) {
+ tm = asm.GetType (name, false, false);
+ if (tm != null)
+ return tm;
+ }
+ return null;
+ }
+
+ public override object GetParentType (EvaluationContext ctx, object type)
+ {
+ TypeMirror tm = type as TypeMirror;
+
+ if (tm != null) {
+ int plus = tm.FullName.LastIndexOf ('+');
+
+ return plus != -1 ? GetType (ctx, tm.FullName.Substring (0, plus)) : null;
+ }
+
+ return ((Type) type).DeclaringType;
+ }
+
+ public override IEnumerable<object> GetNestedTypes (EvaluationContext ctx, object type)
+ {
+ TypeMirror t = (TypeMirror) type;
+ foreach (TypeMirror nt in t.GetNestedTypes ())
+ yield return nt;
+ }
+
+ public override string GetTypeName (EvaluationContext ctx, object type)
+ {
+ TypeMirror tm = type as TypeMirror;
+ if (tm != null) {
+ if (IsGeneratedType (tm)) {
+ // Return the name of the container-type.
+ return tm.FullName.Substring (0, tm.FullName.LastIndexOf ('+'));
+ }
+
+ return tm.FullName;
+ }
+
+ return ((Type)type).FullName;
+ }
+
+ public override object GetValueType (EvaluationContext ctx, object val)
+ {
+ if (val == null)
+ return typeof (Object);
+ if (val is ArrayMirror)
+ return ((ArrayMirror)val).Type;
+ if (val is ObjectMirror)
+ return ((ObjectMirror)val).Type;
+ if (val is EnumMirror)
+ return ((EnumMirror)val).Type;
+ if (val is StructMirror)
+ return ((StructMirror)val).Type;
+ if (val is PointerValue)
+ return ((PointerValue) val).Type;
+ if (val is PrimitiveValue) {
+ PrimitiveValue pv = (PrimitiveValue) val;
+ if (pv.Value == null)
+ return typeof(Object);
+
+ return pv.Value.GetType ();
+ }
+
+ throw new NotSupportedException ();
+ }
+
+ public override object GetBaseType (EvaluationContext ctx, object type)
+ {
+ if (type is TypeMirror)
+ return ((TypeMirror)type).BaseType;
+
+ return null;
+ }
+
+ public override bool HasMethod (EvaluationContext gctx, object targetType, string methodName, object[] genericTypeArgs, object[] argTypes, BindingFlags flags)
+ {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+ TypeMirror[] typeArgs = null;
+ TypeMirror[] types = null;
+
+ if (genericTypeArgs != null) {
+ typeArgs = new TypeMirror [genericTypeArgs.Length];
+ for (int n = 0; n < genericTypeArgs.Length; n++) {
+ if (genericTypeArgs[n] is TypeMirror)
+ typeArgs[n] = (TypeMirror) genericTypeArgs[n];
+ else
+ typeArgs[n] = (TypeMirror) GetType (ctx, ((Type) genericTypeArgs[n]).FullName);
+ }
+ }
+
+ if (argTypes != null) {
+ types = new TypeMirror [argTypes.Length];
+ for (int n = 0; n < argTypes.Length; n++) {
+ if (argTypes[n] is TypeMirror)
+ types[n] = (TypeMirror) argTypes[n];
+ else
+ types[n] = (TypeMirror) GetType (ctx, ((Type) argTypes[n]).FullName);
+ }
+ }
+
+ MethodMirror method = OverloadResolve (ctx, (TypeMirror) targetType, methodName, typeArgs, types, (flags & BindingFlags.Instance) != 0, (flags & BindingFlags.Static) != 0, false);
+ return method != null;
+ }
+
+ public override bool IsExternalType (EvaluationContext ctx, object type)
+ {
+ TypeMirror tm = type as TypeMirror;
+
+ if (tm != null)
+ return ((SoftEvaluationContext) ctx).Session.IsExternalCode (tm);
+
+ return true;
+ }
+
+ public override bool IsString (EvaluationContext ctx, object val)
+ {
+ return val is StringMirror;
+ }
+
+ public override bool IsArray (EvaluationContext ctx, object val)
+ {
+ return val is ArrayMirror;
+ }
+
+ public override bool IsValueType (object type)
+ {
+ TypeMirror t = type as TypeMirror;
+ return t != null && t.IsValueType;
+ }
+
+ public override bool IsClass (object type)
+ {
+ TypeMirror t = type as TypeMirror;
+ return t != null && (t.IsClass || t.IsValueType) && !t.IsPrimitive;
+ }
+
+ public override bool IsNull (EvaluationContext ctx, object val)
+ {
+ return val == null || ((val is PrimitiveValue) && ((PrimitiveValue)val).Value == null) || ((val is PointerValue) && ((PointerValue)val).Address == 0);
+ }
+
+ public override bool IsPrimitive (EvaluationContext ctx, object val)
+ {
+ return val is PrimitiveValue || val is StringMirror || ((val is StructMirror) && ((StructMirror)val).Type.IsPrimitive) || val is PointerValue;
+ }
+
+ public override bool IsPointer (EvaluationContext ctx, object val)
+ {
+ return val is PointerValue;
+ }
+
+ public override bool IsEnum (EvaluationContext ctx, object val)
+ {
+ return val is EnumMirror;
+ }
+
+ protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext gctx, object type)
+ {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+
+ bool isCompilerGenerated = false;
+ string nameString = null;
+ string typeString = null;
+ string valueString = null;
+ string proxyType = null;
+ Dictionary<string, DebuggerBrowsableState> memberData = null;
+
+ try {
+ TypeMirror t = (TypeMirror) type;
+ foreach (CustomAttributeDataMirror attr in t.GetCustomAttributes (true)) {
+ string attName = attr.Constructor.DeclaringType.FullName;
+ if (attName == "System.Diagnostics.DebuggerDisplayAttribute") {
+ DebuggerDisplayAttribute at = BuildAttribute<DebuggerDisplayAttribute> (attr);
+ nameString = at.Name;
+ typeString = at.Type;
+ valueString = at.Value;
+ }
+ else if (attName == "System.Diagnostics.DebuggerTypeProxyAttribute") {
+ DebuggerTypeProxyAttribute at = BuildAttribute<DebuggerTypeProxyAttribute> (attr);
+ proxyType = at.ProxyTypeName;
+ if (!string.IsNullOrEmpty (proxyType))
+ ForceLoadType (ctx, proxyType);
+ }
+ else if (attName == "System.Runtime.CompilerServices.CompilerGeneratedAttribute")
+ isCompilerGenerated = true;
+ }
+ foreach (FieldInfoMirror fi in t.GetFields ()) {
+ CustomAttributeDataMirror[] attrs = fi.GetCustomAttributes (true);
+ DebuggerBrowsableAttribute att = GetAttribute <DebuggerBrowsableAttribute> (attrs);
+ if (att == null) {
+ var cga = GetAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute> (attrs);
+ if (cga != null)
+ att = new DebuggerBrowsableAttribute (DebuggerBrowsableState.Never);
+ }
+ if (att != null) {
+ if (memberData == null)
+ memberData = new Dictionary<string, DebuggerBrowsableState> ();
+ memberData [fi.Name] = att.State;
+ }
+ }
+ foreach (PropertyInfoMirror pi in t.GetProperties ()) {
+ DebuggerBrowsableAttribute att = GetAttribute <DebuggerBrowsableAttribute> (pi.GetCustomAttributes (true));
+ if (att != null) {
+ if (memberData == null)
+ memberData = new Dictionary<string, DebuggerBrowsableState> ();
+ memberData [pi.Name] = att.State;
+ }
+ }
+ } catch (Exception ex) {
+ ctx.Session.WriteDebuggerOutput (true, ex.ToString ());
+ }
+ return new TypeDisplayData (proxyType, valueString, typeString, nameString, isCompilerGenerated, memberData);
+ }
+
+ static T GetAttribute<T> (CustomAttributeDataMirror[] attrs)
+ {
+ foreach (CustomAttributeDataMirror attr in attrs) {
+ if (attr.Constructor.DeclaringType.FullName == typeof(T).FullName)
+ return BuildAttribute<T> (attr);
+ }
+ return default(T);
+ }
+
+ public override bool IsTypeLoaded (EvaluationContext gctx, string typeName)
+ {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+
+ return ctx.Session.GetType (typeName) != null;
+ }
+
+ public override bool IsTypeLoaded (EvaluationContext ctx, object type)
+ {
+ TypeMirror tm = (TypeMirror) type;
+
+ if (tm.VirtualMachine.Version.AtLeast (2, 23))
+ return tm.IsInitialized;
+
+ return IsTypeLoaded (ctx, tm.FullName);
+ }
+
+ public override bool ForceLoadType (EvaluationContext gctx, object type)
+ {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+ TypeMirror tm = (TypeMirror) type;
+
+ if (!tm.VirtualMachine.Version.AtLeast (2, 23))
+ return IsTypeLoaded (gctx, tm.FullName);
+
+ if (tm.IsInitialized)
+ return true;
+
+ if (!tm.Attributes.HasFlag (TypeAttributes.BeforeFieldInit))
+ return false;
+
+ MethodMirror cctor = OverloadResolve (ctx, tm, ".cctor", null, new TypeMirror[0], false, true, false);
+ if (cctor == null)
+ return true;
+
+ try {
+ tm.InvokeMethod (ctx.Thread, cctor, new Value[0], InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded);
+ } catch {
+ return false;
+ } finally {
+ ctx.Session.StackVersion++;
+ }
+
+ return true;
+ }
+
+ static T BuildAttribute<T> (CustomAttributeDataMirror attr)
+ {
+ List<object> args = new List<object> ();
+ foreach (CustomAttributeTypedArgumentMirror arg in attr.ConstructorArguments) {
+ object val = arg.Value;
+ if (val is TypeMirror) {
+ // The debugger attributes that take a type as parameter of the constructor have
+ // a corresponding constructor overload that takes a type name. We'll use that
+ // constructor because we can't load target types in the debugger process.
+ // So what we do here is convert the Type to a String.
+ TypeMirror tm = (TypeMirror) val;
+ val = tm.FullName + ", " + tm.Assembly.ManifestModule.Name;
+ } else if (val is EnumMirror) {
+ EnumMirror em = (EnumMirror) val;
+ val = em.Value;
+ }
+ args.Add (val);
+ }
+ Type type = typeof(T);
+ object at = Activator.CreateInstance (type, args.ToArray ());
+ foreach (CustomAttributeNamedArgumentMirror arg in attr.NamedArguments) {
+ object val = arg.TypedValue.Value;
+ string postFix = "";
+ if (arg.TypedValue.ArgumentType == typeof(Type))
+ postFix = "TypeName";
+ if (arg.Field != null)
+ type.GetField (arg.Field.Name + postFix).SetValue (at, val);
+ else if (arg.Property != null)
+ type.GetProperty (arg.Property.Name + postFix).SetValue (at, val, null);
+ }
+ return (T) at;
+ }
+
+ TypeMirror ToTypeMirror (EvaluationContext ctx, object type)
+ {
+ TypeMirror t = type as TypeMirror;
+ if (t != null)
+ return t;
+ return (TypeMirror) GetType (ctx, ((Type)type).FullName);
+ }
+
+ public override object RuntimeInvoke (EvaluationContext ctx, object targetType, object target, string methodName, object[] argTypes, object[] argValues)
+ {
+ return RuntimeInvoke (ctx, targetType, target, methodName, new object [0], argTypes, argValues);
+ }
+
+ public override object RuntimeInvoke (EvaluationContext gctx, object targetType, object target, string methodName, object[] genericTypeArgs, object[] argTypes, object[] argValues)
+ {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+ TypeMirror type = ToTypeMirror (ctx, targetType);
+
+ ctx.AssertTargetInvokeAllowed ();
+
+ TypeMirror[] genericTypes = new TypeMirror [genericTypeArgs != null ? genericTypeArgs.Length : 0];
+ for (int n = 0; n < genericTypes.Length; n++)
+ genericTypes[n] = ToTypeMirror (ctx, genericTypeArgs[n]);
+
+ TypeMirror[] types = new TypeMirror [argTypes.Length];
+ for (int n = 0; n < argTypes.Length; n++)
+ types[n] = ToTypeMirror (ctx, argTypes[n]);
+
+ MethodMirror method = OverloadResolve (ctx, type, methodName, genericTypes, types, target != null, target == null, true);
+
+ ParameterInfoMirror[] mparams = method.GetParameters ();
+ Value[] values = new Value [argValues.Length];
+ for (int n = 0; n < argValues.Length; n++) {
+ var param_type = mparams[n].ParameterType;
+
+ if (param_type.FullName != types[n].FullName && !param_type.IsAssignableFrom (types[n]) && param_type.IsGenericType) {
+ bool throwCastException = true;
+
+ if (method.VirtualMachine.Version.AtLeast (2, 15)) {
+ var args = param_type.GetGenericArguments ();
+
+ if (args.Length == genericTypes.Length) {
+ var real_type = ctx.Adapter.GetType (ctx, param_type.GetGenericTypeDefinition ().FullName, genericTypes);
+
+ values[n] = (Value) TryCast (ctx, (Value) argValues[n], real_type);
+ if (!(values[n] == null && argValues[n] != null && !ctx.Adapter.IsNull (ctx, argValues[n])))
+ throwCastException = false;
+ }
+ }
+
+ if (throwCastException) {
+ string fromType = !IsGeneratedType (types[n]) ? ctx.Adapter.GetDisplayTypeName (ctx, types[n]) : types[n].FullName;
+ string toType = ctx.Adapter.GetDisplayTypeName (ctx, param_type);
+
+ throw new EvaluatorException ("Argument {0}: Cannot implicitly convert `{1}' to `{2}'", n, fromType, toType);
+ }
+ } else {
+ values[n] = (Value) argValues[n];
+ }
+ }
+
+ return ctx.RuntimeInvoke (method, target ?? targetType, values);
+ }
+
+ public static MethodMirror OverloadResolve (SoftEvaluationContext ctx, TypeMirror type, string methodName, TypeMirror[] genericTypeArgs, TypeMirror[] argTypes, bool allowInstance, bool allowStatic, bool throwIfNotFound)
+ {
+ List<MethodMirror> candidates = new List<MethodMirror> ();
+ var cache = ctx.Session.OverloadResolveCache;
+ TypeMirror currentType = type;
+
+ while (currentType != null) {
+ MethodMirror[] methods = null;
+
+ if (ctx.CaseSensitive) {
+ lock (cache) {
+ cache.TryGetValue (Tuple.Create (currentType, methodName), out methods);
+ }
+ }
+
+ if (methods == null) {
+ if (currentType.VirtualMachine.Version.AtLeast (2, 7))
+ methods = currentType.GetMethodsByNameFlags (methodName, BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.Static, !ctx.CaseSensitive);
+ else
+ methods = currentType.GetMethods ();
+
+ if (ctx.CaseSensitive) {
+ lock (cache) {
+ cache [Tuple.Create (currentType, methodName)] = methods;
+ }
+ }
+ }
+
+ foreach (MethodMirror method in methods) {
+ if (method.Name == methodName || (!ctx.CaseSensitive && method.Name.Equals (methodName, StringComparison.CurrentCultureIgnoreCase))) {
+ MethodMirror actualMethod;
+
+ if (genericTypeArgs != null && genericTypeArgs.Length > 0 && method.VirtualMachine.Version.AtLeast (2, 24) && method.IsGenericMethod) {
+ actualMethod = method.GetGenericMethodDefinition ().MakeGenericMethod (genericTypeArgs);
+ } else {
+ actualMethod = method;
+ }
+
+ ParameterInfoMirror[] parms = actualMethod.GetParameters ();
+ if (argTypes == null || parms.Length == argTypes.Length && ((actualMethod.IsStatic && allowStatic) || (!actualMethod.IsStatic && allowInstance)))
+ candidates.Add (actualMethod);
+ }
+ }
+
+ if (argTypes == null && candidates.Count > 0)
+ break; // when argtypes is null, we are just looking for *any* match (not a specific match)
+
+ if (methodName == ".ctor")
+ break; // Can't create objects using constructor from base classes
+
+ // Make sure that we always pull in at least System.Object methods (this is mostly needed for cases where 'type' was an interface)
+ if (currentType.BaseType == null && currentType.FullName != "System.Object")
+ currentType = ctx.Session.GetType ("System.Object");
+ else
+ currentType = currentType.BaseType;
+ }
+
+ return OverloadResolve (ctx, type, methodName, genericTypeArgs, argTypes, candidates, throwIfNotFound);
+ }
+
+ static bool IsApplicable (SoftEvaluationContext ctx, MethodMirror method, TypeMirror[] genericTypeArgs, TypeMirror[] types, out string error, out int matchCount)
+ {
+ ParameterInfoMirror[] mparams = method.GetParameters ();
+ matchCount = 0;
+
+ for (int i = 0; i < types.Length; i++) {
+ TypeMirror param_type = mparams[i].ParameterType;
+
+ if (param_type.FullName == types[i].FullName) {
+ matchCount++;
+ continue;
+ }
+
+ if (param_type.IsAssignableFrom (types[i]))
+ continue;
+
+ if (param_type.IsGenericType) {
+ if (genericTypeArgs != null && method.VirtualMachine.Version.AtLeast (2, 12)) {
+ // FIXME: how can we make this more definitive?
+ if (param_type.GetGenericArguments ().Length == genericTypeArgs.Length)
+ continue;
+ } else {
+ // no way to check... assume it'll work?
+ continue;
+ }
+ }
+
+ string fromType = !IsGeneratedType (types[i]) ? ctx.Adapter.GetDisplayTypeName (ctx, types[i]) : types[i].FullName;
+ string toType = ctx.Adapter.GetDisplayTypeName (ctx, param_type);
+
+ error = String.Format ("Argument {0}: Cannot implicitly convert `{1}' to `{2}'", i, fromType, toType);
+ return false;
+ }
+
+ error = null;
+ return true;
+ }
+
+ static MethodMirror OverloadResolve (SoftEvaluationContext ctx, TypeMirror type, string methodName, TypeMirror[] genericTypeArgs, TypeMirror[] argTypes, List<MethodMirror> candidates, bool throwIfNotFound)
+ {
+ if (candidates.Count == 0) {
+ if (throwIfNotFound) {
+ string typeName = ctx.Adapter.GetDisplayTypeName (ctx, type);
+
+ if (methodName == null)
+ throw new EvaluatorException ("Indexer not found in type `{0}'.", typeName);
+
+ if (genericTypeArgs != null && genericTypeArgs.Length > 0) {
+ var types = string.Join (", ", genericTypeArgs.Select (t => ctx.Adapter.GetDisplayTypeName (ctx, t)));
+
+ throw new EvaluatorException ("Method `{0}<{1}>' not found in type `{2}'.", methodName, types, typeName);
+ }
+
+ throw new EvaluatorException ("Method `{0}' not found in type `{1}'.", methodName, typeName);
+ }
+
+ return null;
+ }
+
+ if (argTypes == null) {
+ // This is just a probe to see if the type contains *any* methods of the given name
+ return candidates[0];
+ }
+
+ if (candidates.Count == 1) {
+ string error;
+ int matchCount;
+
+ if (IsApplicable (ctx, candidates[0], genericTypeArgs, argTypes, out error, out matchCount))
+ return candidates[0];
+
+ if (throwIfNotFound)
+ throw new EvaluatorException ("Invalid arguments for method `{0}': {1}", methodName, error);
+
+ return null;
+ }
+
+ // Ok, now we need to find an exact match.
+ MethodMirror match = null;
+ int bestCount = -1;
+ bool repeatedBestCount = false;
+
+ foreach (MethodMirror method in candidates) {
+ string error;
+ int matchCount;
+
+ if (!IsApplicable (ctx, method, genericTypeArgs, argTypes, out error, out matchCount))
+ continue;
+
+ if (matchCount == bestCount) {
+ repeatedBestCount = true;
+ } else if (matchCount > bestCount) {
+ match = method;
+ bestCount = matchCount;
+ repeatedBestCount = false;
+ }
+ }
+
+ if (match == null) {
+ if (!throwIfNotFound)
+ return null;
+
+ if (methodName != null)
+ throw new EvaluatorException ("Invalid arguments for method `{0}'.", methodName);
+
+ throw new EvaluatorException ("Invalid arguments for indexer.");
+ }
+
+ if (repeatedBestCount) {
+ // If there is an ambiguous match, just pick the first match. If the user was expecting
+ // something else, he can provide more specific arguments
+
+/* if (!throwIfNotFound)
+ return null;
+ if (methodName != null)
+ throw new EvaluatorException ("Ambiguous method `{0}'; need to use full name", methodName);
+ else
+ throw new EvaluatorException ("Ambiguous arguments for indexer.", methodName);
+*/ }
+
+ return match;
+ }
+
+ public override object TargetObjectToObject (EvaluationContext gctx, object obj)
+ {
+ if (obj is StringMirror) {
+ StringMirror mirror = (StringMirror) obj;
+ string str;
+
+ if (gctx.Options.EllipsizeStrings) {
+ if (mirror.VirtualMachine.Version.AtLeast (2, 10)) {
+ int length = mirror.Length;
+
+ if (length > gctx.Options.EllipsizedLength)
+ str = new string (mirror.GetChars (0, gctx.Options.EllipsizedLength)) + EvaluationOptions.Ellipsis;
+ else
+ str = mirror.Value;
+ } else {
+ str = mirror.Value;
+ if (str.Length > gctx.Options.EllipsizedLength)
+ str = str.Substring (0, gctx.Options.EllipsizedLength) + EvaluationOptions.Ellipsis;
+ }
+ } else {
+ str = mirror.Value;
+ }
+
+ return str;
+ } else if (obj is PrimitiveValue) {
+ return ((PrimitiveValue)obj).Value;
+ } else if (obj is PointerValue) {
+ return new IntPtr (((PointerValue)obj).Address);
+ } else if (obj is StructMirror) {
+ StructMirror sm = (StructMirror) obj;
+
+ if (sm.Type.IsPrimitive) {
+ // Boxed primitive
+ if (sm.Type.FullName == "System.IntPtr")
+ return new IntPtr ((long)((PrimitiveValue)sm.Fields[0]).Value);
+ if (sm.Fields.Length > 0 && (sm.Fields[0] is PrimitiveValue))
+ return ((PrimitiveValue)sm.Fields[0]).Value;
+ } else if (sm.Type.FullName == "System.Decimal") {
+ SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
+ MethodMirror method = OverloadResolve (ctx, sm.Type, "GetBits", null, new TypeMirror[1] { sm.Type }, false, true, false);
+ if (method != null) {
+ ArrayMirror array;
+
+ try {
+ array = sm.Type.InvokeMethod (ctx.Thread, method, new Value[1] { sm }, InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded) as ArrayMirror;
+ } catch {
+ array = null;
+ } finally {
+ ctx.Session.StackVersion++;
+ }
+
+ if (array != null) {
+ int[] bits = new int [4];
+ for (int i = 0; i < 4; i++)
+ bits[i] = (int) TargetObjectToObject (gctx, array[i]);
+
+ return new decimal (bits);
+ }
+ }
+ }
+ }
+ return base.TargetObjectToObject (gctx, obj);
+ }
+ }
+
+ class MethodCall: AsyncOperation
+ {
+ SoftEvaluationContext ctx;
+ MethodMirror function;
+ object obj;
+ Value[] args;
+ Value result;
+ IAsyncResult handle;
+ Exception exception;
+ ST.ManualResetEvent shutdownEvent = new ST.ManualResetEvent (false);
+ const InvokeOptions options = InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded;
+
+ public MethodCall (SoftEvaluationContext ctx, MethodMirror function, object obj, Value[] args)
+ {
+ this.ctx = ctx;
+ this.function = function;
+ this.obj = obj;
+ this.args = args;
+ }
+
+ public override string Description {
+ get {
+ return function.DeclaringType.FullName + "." + function.Name;
+ }
+ }
+
+ public override void Invoke ()
+ {
+ try {
+ if (obj is ObjectMirror)
+ handle = ((ObjectMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
+ else if (obj is TypeMirror)
+ handle = ((TypeMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
+ else if (obj is StructMirror)
+ handle = ((StructMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
+ else if (obj is PrimitiveValue)
+ handle = ((PrimitiveValue)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
+ else
+ throw new ArgumentException ("Soft debugger method calls cannot be invoked on objects of type " + obj.GetType ().Name);
+ } catch (InvocationException ex) {
+ ctx.Session.StackVersion++;
+ exception = ex;
+ } catch (Exception ex) {
+ ctx.Session.StackVersion++;
+ LoggingService.LogError ("Error in soft debugger method call thread on " + GetInfo (), ex);
+ exception = ex;
+ }
+ }
+
+ public override void Abort ()
+ {
+ if (handle is IInvokeAsyncResult) {
+ var info = GetInfo ();
+ LoggingService.LogMessage ("Aborting invocation of " + info);
+ ((IInvokeAsyncResult) handle).Abort ();
+ // Don't wait for the abort to finish. The engine will do it.
+ } else {
+ throw new NotSupportedException ();
+ }
+ }
+
+ public override void Shutdown ()
+ {
+ shutdownEvent.Set ();
+ }
+
+ void EndInvoke ()
+ {
+ try {
+ if (obj is ObjectMirror)
+ result = ((ObjectMirror)obj).EndInvokeMethod (handle);
+ else if (obj is TypeMirror)
+ result = ((TypeMirror)obj).EndInvokeMethod (handle);
+ else if (obj is StructMirror)
+ result = ((StructMirror)obj).EndInvokeMethod (handle);
+ else
+ result = ((PrimitiveValue)obj).EndInvokeMethod (handle);
+ } catch (InvocationException ex) {
+ if (!Aborting && ex.Exception != null) {
+ string ename = ctx.Adapter.GetValueTypeName (ctx, ex.Exception);
+ ValueReference vref = ctx.Adapter.GetMember (ctx, null, ex.Exception, "Message");
+ if (vref != null) {
+ exception = new Exception (ename + ": " + (string)vref.ObjectValue);
+ return;
+ } else {
+ exception = new Exception (ename);
+ return;
+ }
+ }
+ exception = ex;
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error in soft debugger method call thread on " + GetInfo (), ex);
+ exception = ex;
+ } finally {
+ ctx.Session.StackVersion++;
+ }
+ }
+
+ string GetInfo ()
+ {
+ try {
+ TypeMirror type = null;
+ if (obj is ObjectMirror)
+ type = ((ObjectMirror)obj).Type;
+ else if (obj is TypeMirror)
+ type = (TypeMirror)obj;
+ else if (obj is StructMirror)
+ type = ((StructMirror)obj).Type;
+ return string.Format ("method {0} on object {1}",
+ function == null? "[null]" : function.FullName,
+ type == null? "[null]" : type.FullName);
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error getting info for SDB MethodCall", ex);
+ return "";
+ }
+ }
+
+ public override bool WaitForCompleted (int timeout)
+ {
+ if (handle == null)
+ return true;
+ int res = ST.WaitHandle.WaitAny (new ST.WaitHandle[] { handle.AsyncWaitHandle, shutdownEvent }, timeout);
+ if (res == 0) {
+ EndInvoke ();
+ return true;
+ }
+ // Return true if shut down.
+ return res == 1;
+ }
+
+ public Value ReturnValue {
+ get {
+ if (exception != null)
+ throw new EvaluatorException (exception.Message);
+ return result;
+ }
+ }
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
new file mode 100644
index 0000000..caf7546
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
@@ -0,0 +1,215 @@
+//
+// SoftDebuggerBacktrace.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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.Linq;
+using System.Text;
+using System.Collections.Generic;
+using Mono.Debugging.Client;
+using Mono.Debugging.Backend;
+using MDB = Mono.Debugger.Soft;
+using DC = Mono.Debugging.Client;
+using Mono.Debugging.Evaluation;
+
+namespace Mono.Debugging.Soft
+{
+ internal class SoftDebuggerStackFrame : Mono.Debugging.Client.StackFrame {
+ public Mono.Debugger.Soft.StackFrame StackFrame {
+ get; private set;
+ }
+
+ public SoftDebuggerStackFrame (Mono.Debugger.Soft.StackFrame frame, string addressSpace, SourceLocation location, string language, bool isExternalCode, bool hasDebugInfo, bool isDebuggerHidden, string fullModuleName, string fullTypeName)
+ : base (frame.ILOffset, addressSpace, location, language, isExternalCode, hasDebugInfo, isDebuggerHidden, fullModuleName, fullTypeName)
+ {
+ StackFrame = frame;
+ }
+ }
+
+ public class SoftDebuggerBacktrace: BaseBacktrace
+ {
+ MDB.StackFrame[] frames;
+ SoftDebuggerSession session;
+ MDB.ThreadMirror thread;
+ int stackVersion;
+
+ public SoftDebuggerBacktrace (SoftDebuggerSession session, MDB.ThreadMirror thread): base (session.Adaptor)
+ {
+ this.session = session;
+ this.thread = thread;
+ stackVersion = session.StackVersion;
+ if (thread != null)
+ this.frames = thread.GetFrames ();
+ else
+ this.frames = new MDB.StackFrame[0];
+ }
+
+ void ValidateStack ()
+ {
+ if (stackVersion != session.StackVersion && thread != null)
+ frames = thread.GetFrames ();
+ }
+
+ public override DC.StackFrame[] GetStackFrames (int firstIndex, int lastIndex)
+ {
+ ValidateStack ();
+
+ if (lastIndex < 0)
+ lastIndex = frames.Length - 1;
+
+ List<DC.StackFrame> list = new List<DC.StackFrame> ();
+ for (int n = firstIndex; n <= lastIndex && n < frames.Length; n++)
+ list.Add (CreateStackFrame (frames[n], n));
+
+ return list.ToArray ();
+ }
+
+ public override int FrameCount {
+ get {
+ ValidateStack ();
+ return frames.Length;
+ }
+ }
+
+ DC.StackFrame CreateStackFrame (MDB.StackFrame frame, int frameIndex)
+ {
+ MDB.MethodMirror method = frame.Method;
+ MDB.TypeMirror type = method.DeclaringType;
+ string fileName = frame.FileName;
+ string typeFullName = null;
+ string typeFQN = null;
+ string methodName;
+
+ if (fileName != null)
+ fileName = SoftDebuggerSession.NormalizePath (fileName);
+
+ if (method.VirtualMachine.Version.AtLeast (2, 12) && method.IsGenericMethod) {
+ StringBuilder name = new StringBuilder (method.Name);
+
+ name.Append ('<');
+
+ if (method.VirtualMachine.Version.AtLeast (2, 15)) {
+ bool first = true;
+
+ foreach (var argumentType in method.GetGenericArguments ()) {
+ if (!first)
+ name.Append (", ");
+
+ name.Append (session.Adaptor.GetDisplayTypeName (argumentType.FullName));
+ first = false;
+ }
+ }
+
+ name.Append ('>');
+
+ methodName = name.ToString ();
+ } else {
+ methodName = method.Name;
+ }
+
+ // Compiler generated anonymous/lambda methods
+ bool special_method = false;
+ if (methodName [0] == '<' && methodName.Contains (">m__")) {
+ int nidx = methodName.IndexOf (">m__", StringComparison.Ordinal) + 2;
+ methodName = "AnonymousMethod" + methodName.Substring (nidx, method.Name.Length - nidx);
+ special_method = true;
+ }
+
+ if (type != null) {
+ string typeDisplayName = session.Adaptor.GetDisplayTypeName (type.FullName);
+
+ if (SoftDebuggerAdaptor.IsGeneratedType (type)) {
+ // The user-friendly method name is embedded in the generated type name
+ var mn = SoftDebuggerAdaptor.GetNameFromGeneratedType (type);
+
+ // Strip off the generated type name
+ int dot = typeDisplayName.LastIndexOf ('.');
+ var tname = typeDisplayName.Substring (0, dot);
+
+ // Keep any type arguments
+ int targs = typeDisplayName.LastIndexOf ('<');
+ if (targs > dot + 1)
+ mn += typeDisplayName.Substring (targs, typeDisplayName.Length - targs);
+
+ typeDisplayName = tname;
+
+ if (special_method)
+ typeDisplayName += "." + mn;
+ else
+ methodName = mn;
+ }
+
+ methodName = typeDisplayName + "." + methodName;
+
+ typeFQN = type.Module.FullyQualifiedName;
+ typeFullName = type.FullName;
+ }
+
+ bool hidden = false;
+ if (session.VirtualMachine.Version.AtLeast (2, 21)) {
+ var ctx = GetEvaluationContext (frameIndex, session.EvaluationOptions);
+ var hiddenAttr = session.Adaptor.GetType (ctx, "System.Diagnostics.DebuggerHiddenAttribute") as MDB.TypeMirror;
+
+ hidden = method.GetCustomAttributes (hiddenAttr, true).Any ();
+ }
+
+ var location = new DC.SourceLocation (methodName, fileName, frame.LineNumber, frame.ColumnNumber);
+ var external = session.IsExternalCode (frame);
+ string addressSpace = string.Empty;
+ bool hasDebugInfo = false;
+ string language;
+
+ if (frame.Method != null) {
+ if (frame.IsNativeTransition) {
+ language = "Transition";
+ } else {
+ addressSpace = method.FullName;
+ language = "Managed";
+ hasDebugInfo = true;
+ }
+ } else {
+ language = "Native";
+ }
+
+ return new SoftDebuggerStackFrame (frame, addressSpace, location, language, external, hasDebugInfo, hidden, typeFQN, typeFullName);
+ }
+
+ protected override EvaluationContext GetEvaluationContext (int frameIndex, EvaluationOptions options)
+ {
+ ValidateStack ();
+ if (frameIndex >= frames.Length)
+ return null;
+
+ MDB.StackFrame frame = frames [frameIndex];
+ return new SoftEvaluationContext (session, frame, options);
+ }
+
+ public override AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count)
+ {
+ return session.Disassemble (frames [frameIndex], firstLine, count);
+ }
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs
new file mode 100644
index 0000000..df46619
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs
@@ -0,0 +1,2606 @@
+//
+// SoftDebuggerSession.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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.
+
+//#define DEBUG_EVENT_QUEUEING
+
+using System;
+using System.IO;
+using System.Net;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Reflection;
+using System.Net.Sockets;
+using System.Globalization;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+using Mono.Cecil.Mdb;
+using Mono.CompilerServices.SymbolWriter;
+using Mono.Debugging.Client;
+using Mono.Debugger.Soft;
+using Mono.Debugging.Evaluation;
+using MDB = Mono.Debugger.Soft;
+
+namespace Mono.Debugging.Soft
+{
+ public class SoftDebuggerSession : DebuggerSession
+ {
+ VirtualMachine vm;
+ Thread eventHandler;
+ Dictionary<string, List<TypeMirror>> source_to_type = new Dictionary<string, List<TypeMirror>> (PathComparer);
+ Dictionary<TypeMirror, string[]> type_to_source = new Dictionary<TypeMirror, string[]> ();
+ bool useFullPaths = true;
+ Dictionary<string,TypeMirror> types = new Dictionary<string, TypeMirror> ();
+ Dictionary<string, MonoSymbolFile> symbolFiles = new Dictionary<string, MonoSymbolFile> ();
+ Dictionary<EventRequest,BreakInfo> breakpoints = new Dictionary<EventRequest,BreakInfo> ();
+ List<BreakInfo> pending_bes = new List<BreakInfo> ();
+ ThreadMirror current_thread, recent_thread;
+ ProcessInfo[] procs;
+ ThreadInfo[] current_threads;
+ bool started;
+ bool autoStepInto;
+ internal int StackVersion;
+ StepEventRequest currentStepRequest;
+ long currentAddress = -1;
+ ExceptionEventRequest unhandledExceptionRequest;
+ string remoteProcessName;
+ Dictionary<long,long> localThreadIds = new Dictionary<long, long> ();
+ IConnectionDialog connectionDialog;
+ TypeLoadEventRequest typeLoadReq, typeLoadTypeNameReq;
+
+ Dictionary<long,ObjectMirror> activeExceptionsByThread = new Dictionary<long, ObjectMirror> ();
+
+ Thread outputReader;
+ Thread errorReader;
+
+ IAsyncResult connectionHandle;
+ SoftDebuggerStartArgs startArgs;
+
+ LinkedList<List<Event>> queuedEventSets = new LinkedList<List<Event>> ();
+
+ List<string> userAssemblyNames;
+ List<AssemblyMirror> assemblyFilters;
+ Dictionary<string, string> assemblyPathMap;
+
+ bool loggedSymlinkedRuntimesBug = false;
+
+ Dictionary<Tuple<TypeMirror,string>, MethodMirror[]> overloadResolveCache;
+
+ public SoftDebuggerAdaptor Adaptor {
+ get { return adaptor; }
+ }
+
+ readonly SoftDebuggerAdaptor adaptor = new SoftDebuggerAdaptor ();
+
+ public SoftDebuggerSession ()
+ {
+ Adaptor.BusyStateChanged += delegate(object sender, BusyStateEventArgs e) {
+ SetBusyState (e);
+ };
+ overloadResolveCache = new Dictionary<Tuple<TypeMirror,string>, MethodMirror[]> ();
+ }
+
+ protected override void OnRun (DebuggerStartInfo startInfo)
+ {
+ if (HasExited)
+ throw new InvalidOperationException ("Already exited");
+
+ var dsi = (SoftDebuggerStartInfo) startInfo;
+ if (dsi.StartArgs is SoftDebuggerLaunchArgs) {
+ StartLaunching (dsi);
+ } else if (dsi.StartArgs is SoftDebuggerConnectArgs) {
+ StartConnecting (dsi);
+ } else if (dsi.StartArgs is SoftDebuggerListenArgs) {
+ StartListening (dsi);
+ } else if (dsi.StartArgs.ConnectionProvider != null) {
+ StartConnection (dsi);
+ } else {
+ throw new ArgumentException ("StartArgs has no ConnectionProvider");
+ }
+ }
+
+ void StartConnection (SoftDebuggerStartInfo dsi)
+ {
+ startArgs = dsi.StartArgs;
+
+ RegisterUserAssemblies (dsi);
+
+ if (!String.IsNullOrEmpty (dsi.LogMessage))
+ LogWriter (false, dsi.LogMessage + "\n");
+
+ AsyncCallback callback = null;
+ int attemptNumber = 0;
+ int maxAttempts = startArgs.MaxConnectionAttempts;
+ int timeBetweenAttempts = startArgs.TimeBetweenConnectionAttempts;
+ callback = delegate (IAsyncResult ar) {
+ try {
+ string appName;
+ VirtualMachine vm;
+ startArgs.ConnectionProvider.EndConnect (ar, out vm, out appName);
+ remoteProcessName = appName;
+ ConnectionStarted (vm);
+ return;
+ } catch (Exception ex) {
+ attemptNumber++;
+ if (!ShouldRetryConnection (ex, attemptNumber)
+ || !startArgs.ConnectionProvider.ShouldRetryConnection (ex)
+ || attemptNumber == maxAttempts
+ || HasExited)
+ {
+ OnConnectionError (ex);
+ return;
+ }
+ }
+ try {
+ if (timeBetweenAttempts > 0)
+ Thread.Sleep (timeBetweenAttempts);
+ ConnectionStarting (startArgs.ConnectionProvider.BeginConnect (dsi, callback), dsi, false, 0);
+ } catch (Exception ex2) {
+ OnConnectionError (ex2);
+ }
+ };
+ //the "listening" value is never used, pass a dummy value
+ ConnectionStarting (startArgs.ConnectionProvider.BeginConnect (dsi, callback), dsi, false, 0);
+ }
+
+ void StartLaunching (SoftDebuggerStartInfo dsi)
+ {
+ var args = (SoftDebuggerLaunchArgs) dsi.StartArgs;
+ var runtime = string.IsNullOrEmpty (args.MonoRuntimePrefix) ? "mono" : Path.Combine (Path.Combine (args.MonoRuntimePrefix, "bin"), "mono");
+ RegisterUserAssemblies (dsi);
+
+ var psi = new System.Diagnostics.ProcessStartInfo (runtime) {
+ Arguments = string.Format ("\"{0}\" {1}", dsi.Command, dsi.Arguments),
+ WorkingDirectory = dsi.WorkingDirectory,
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ };
+
+ LaunchOptions options = null;
+
+ if (dsi.UseExternalConsole && args.ExternalConsoleLauncher != null) {
+ options = new LaunchOptions ();
+ options.CustomTargetProcessLauncher = args.ExternalConsoleLauncher;
+ psi.RedirectStandardOutput = false;
+ psi.RedirectStandardError = false;
+ }
+
+ var sdbLog = Environment.GetEnvironmentVariable ("MONODEVELOP_SDB_LOG");
+ if (!String.IsNullOrEmpty (sdbLog)) {
+ options = options ?? new LaunchOptions ();
+ options.AgentArgs = string.Format ("loglevel=1,logfile='{0}'", sdbLog);
+ }
+
+ foreach (var env in args.MonoRuntimeEnvironmentVariables)
+ psi.EnvironmentVariables[env.Key] = env.Value;
+
+ foreach (var env in dsi.EnvironmentVariables)
+ psi.EnvironmentVariables[env.Key] = env.Value;
+
+ if (!String.IsNullOrEmpty (dsi.LogMessage))
+ OnDebuggerOutput (false, dsi.LogMessage + "\n");
+
+ var callback = HandleConnectionCallbackErrors ((IAsyncResult ar) => {
+ ConnectionStarted (VirtualMachineManager.EndLaunch (ar));
+ });
+ ConnectionStarting (VirtualMachineManager.BeginLaunch (psi, callback, options), dsi, true, 0);
+ }
+
+ /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
+ protected void StartListening (SoftDebuggerStartInfo dsi)
+ {
+ int dp, cp;
+ StartListening (dsi, out dp, out cp);
+ }
+
+ /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
+ protected void StartListening (SoftDebuggerStartInfo dsi, out int assignedDebugPort)
+ {
+ int cp;
+ StartListening (dsi, out assignedDebugPort, out cp);
+ }
+
+ /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
+ protected void StartListening (SoftDebuggerStartInfo dsi,
+ out int assignedDebugPort, out int assignedConsolePort)
+ {
+
+ IPEndPoint dbgEP, conEP;
+ InitForRemoteSession (dsi, out dbgEP, out conEP);
+
+ var callback = HandleConnectionCallbackErrors (delegate (IAsyncResult ar) {
+ ConnectionStarted (VirtualMachineManager.EndListen (ar));
+ });
+ var a = VirtualMachineManager.BeginListen (dbgEP, conEP, callback, out assignedDebugPort, out assignedConsolePort);
+ ConnectionStarting (a, dsi, true, 0);
+ }
+
+ protected virtual bool ShouldRetryConnection (Exception ex, int attemptNumber)
+ {
+ var sx = ex as SocketException;
+ if (sx != null) {
+ if (sx.ErrorCode == 10061) //connection refused
+ return true;
+ }
+ return false;
+ }
+
+ protected void StartConnecting (SoftDebuggerStartInfo dsi)
+ {
+ StartConnecting (dsi, dsi.StartArgs.MaxConnectionAttempts, dsi.StartArgs.TimeBetweenConnectionAttempts);
+ }
+
+ /// <summary>Starts the debugger connecting to a remote IP</summary>
+ protected void StartConnecting (SoftDebuggerStartInfo dsi, int maxAttempts, int timeBetweenAttempts)
+ {
+ if (timeBetweenAttempts < 0 || timeBetweenAttempts > 10000)
+ throw new ArgumentException ("timeBetweenAttempts");
+
+ IPEndPoint dbgEP, conEP;
+ InitForRemoteSession (dsi, out dbgEP, out conEP);
+
+ AsyncCallback callback = null;
+ int attemptNumber = 0;
+ callback = delegate (IAsyncResult ar) {
+ try {
+ ConnectionStarted (VirtualMachineManager.EndConnect (ar));
+ return;
+ } catch (Exception ex) {
+ attemptNumber++;
+ if (!ShouldRetryConnection (ex, attemptNumber) || attemptNumber == maxAttempts || HasExited) {
+ OnConnectionError (ex);
+ return;
+ }
+ }
+ try {
+ if (timeBetweenAttempts > 0)
+ System.Threading.Thread.Sleep (timeBetweenAttempts);
+
+ ConnectionStarting (VirtualMachineManager.BeginConnect (dbgEP, conEP, callback), dsi, false, attemptNumber);
+
+ } catch (Exception ex2) {
+ OnConnectionError (ex2);
+ }
+ };
+
+ ConnectionStarting (VirtualMachineManager.BeginConnect (dbgEP, conEP, callback), dsi, false, 0);
+ }
+
+ void InitForRemoteSession (SoftDebuggerStartInfo dsi, out IPEndPoint dbgEP, out IPEndPoint conEP)
+ {
+ if (remoteProcessName != null)
+ throw new InvalidOperationException ("Cannot initialize connection more than once");
+
+ var args = (SoftDebuggerRemoteArgs) dsi.StartArgs;
+
+ remoteProcessName = args.AppName;
+
+ RegisterUserAssemblies (dsi);
+
+ dbgEP = new IPEndPoint (args.Address, args.DebugPort);
+ conEP = args.RedirectOutput? new IPEndPoint (args.Address, args.OutputPort) : null;
+
+ if (!String.IsNullOrEmpty (dsi.LogMessage))
+ LogWriter (false, dsi.LogMessage + "\n");
+ }
+
+ ///<summary>Catches errors in async callbacks and hands off to OnConnectionError</summary>
+ AsyncCallback HandleConnectionCallbackErrors (AsyncCallback callback)
+ {
+ return delegate (IAsyncResult ar) {
+ connectionHandle = null;
+ try {
+ callback (ar);
+ } catch (Exception ex) {
+ OnConnectionError (ex);
+ }
+ };
+ }
+
+ /// <summary>
+ /// Called if an error happens while making the connection. Default terminates the session.
+ /// </summary>
+ protected virtual void OnConnectionError (Exception ex)
+ {
+ //if the exception was caused by cancelling the session
+ if (HasExited)
+ return;
+
+ if (!HandleException (new ConnectionException (ex))) {
+ LoggingService.LogAndShowException ("Unhandled error launching soft debugger", ex);
+ }
+
+ // The session is dead
+ // HandleException doesn't actually handle exceptions, it just displays them.
+ EndSession ();
+ }
+
+ void ConnectionStarting (IAsyncResult connectionHandle, DebuggerStartInfo dsi, bool listening, int attemptNumber)
+ {
+ if (this.connectionHandle != null && (attemptNumber == 0 || !this.connectionHandle.IsCompleted))
+ throw new InvalidOperationException ("Already connecting");
+
+ this.connectionHandle = connectionHandle;
+
+ if (ConnectionDialogCreator != null && attemptNumber == 0) {
+ connectionDialog = ConnectionDialogCreator ();
+ connectionDialog.UserCancelled += delegate {
+ EndSession ();
+ };
+ }
+ if (connectionDialog != null)
+ connectionDialog.SetMessage (dsi, GetConnectingMessage (dsi), listening, attemptNumber);
+ }
+
+ protected virtual string GetConnectingMessage (DebuggerStartInfo dsi)
+ {
+ return null;
+ }
+
+ void EndLaunch ()
+ {
+ HideConnectionDialog ();
+ if (connectionHandle != null) {
+ if (startArgs != null && startArgs.ConnectionProvider != null) {
+ startArgs.ConnectionProvider.CancelConnect (connectionHandle);
+ startArgs = null;
+ } else {
+ VirtualMachineManager.CancelConnection (connectionHandle);
+ }
+ connectionHandle = null;
+ }
+ }
+
+ protected virtual void EndSession ()
+ {
+ if (!HasExited) {
+ EndLaunch ();
+ OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
+ }
+ }
+
+ public Dictionary<Tuple<TypeMirror, string>, MethodMirror[]> OverloadResolveCache {
+ get {
+ return overloadResolveCache;
+ }
+ }
+
+ void HideConnectionDialog ()
+ {
+ if (connectionDialog != null) {
+ connectionDialog.Dispose ();
+ connectionDialog = null;
+ }
+ }
+
+ /// <summary>
+ /// If subclasses do an async connect in OnRun, they should pass the resulting VM to this method.
+ /// If the vm is null, the session will be closed.
+ /// </summary>
+ void ConnectionStarted (VirtualMachine vm)
+ {
+ if (this.vm != null)
+ throw new InvalidOperationException ("The VM has already connected");
+
+ if (vm == null) {
+ EndSession ();
+ return;
+ }
+
+ connectionHandle = null;
+
+ this.vm = vm;
+
+ //full paths, from GetSourceFiles (true), are only supported by sdb protocol 2.2 and later
+ useFullPaths = vm.Version.AtLeast (2, 2);
+
+ ConnectOutput (vm.StandardOutput, false);
+ ConnectOutput (vm.StandardError, true);
+
+ HideConnectionDialog ();
+
+ vm.EnableEvents (EventType.AssemblyLoad, EventType.ThreadStart, EventType.ThreadDeath,
+ EventType.AssemblyUnload, EventType.UserBreak, EventType.UserLog);
+ try {
+ unhandledExceptionRequest = vm.CreateExceptionRequest (null, false, true);
+ unhandledExceptionRequest.Enable ();
+ } catch (NotSupportedException) {
+ //Mono < 2.6.3 doesn't support catching unhandled exceptions
+ }
+
+ if (vm.Version.AtLeast (2, 9)) {
+ /* Created later */
+ } else {
+ vm.EnableEvents (EventType.TypeLoad);
+ }
+
+ started = true;
+
+ /* Wait for the VMStart event */
+ HandleEventSet (vm.GetNextEventSet ());
+
+ eventHandler = new Thread (EventHandler);
+ eventHandler.Name = "SDB Event Handler";
+ eventHandler.IsBackground = true;
+ eventHandler.Start ();
+ }
+
+ void RegisterUserAssemblies (SoftDebuggerStartInfo dsi)
+ {
+ if (Options.ProjectAssembliesOnly && dsi.UserAssemblyNames != null) {
+ assemblyFilters = new List<AssemblyMirror> ();
+ userAssemblyNames = dsi.UserAssemblyNames.Select (x => x.ToString ()).ToList ();
+ }
+
+ assemblyPathMap = dsi.AssemblyPathMap;
+ if (assemblyPathMap == null)
+ assemblyPathMap = new Dictionary<string, string> ();
+ }
+
+ protected bool SetSocketTimeouts (int sendTimeout, int receiveTimeout, int keepaliveInterval)
+ {
+ try {
+ if (vm.Version.AtLeast (2, 4)) {
+ vm.EnableEvents (EventType.KeepAlive);
+ vm.SetSocketTimeouts (sendTimeout, receiveTimeout, keepaliveInterval);
+ return true;
+ }
+
+ return false;
+ } catch {
+ return false;
+ }
+ }
+
+ protected void ConnectOutput (StreamReader reader, bool error)
+ {
+ Thread t = (error ? errorReader : outputReader);
+ if (t != null || reader == null)
+ return;
+ t = new Thread (delegate () {
+ ReadOutput (reader, error);
+ });
+ t.Name = error? "SDB error reader" : "SDB output reader";
+ t.IsBackground = true;
+ t.Start ();
+
+ if (error)
+ errorReader = t;
+ else
+ outputReader = t;
+ }
+
+ void ReadOutput (StreamReader reader, bool isError)
+ {
+ try {
+ var buffer = new char [1024];
+ while (!HasExited) {
+ int c = reader.Read (buffer, 0, buffer.Length);
+ if (c > 0) {
+ OnTargetOutput (isError, new string (buffer, 0, c));
+ } else {
+ //FIXME: workaround for buggy console stream that never blocks
+ Thread.Sleep (250);
+ }
+ }
+ } catch {
+ // Ignore
+ }
+ }
+
+ protected virtual void OnResumed ()
+ {
+ current_threads = null;
+ current_thread = null;
+ procs = null;
+ activeExceptionsByThread.Clear ();
+ }
+
+ public VirtualMachine VirtualMachine {
+ get { return vm; }
+ }
+
+ public TypeMirror GetType (string fullName)
+ {
+ TypeMirror tm;
+ types.TryGetValue (fullName, out tm);
+ return tm;
+ }
+
+ public IEnumerable<TypeMirror> GetAllTypes ()
+ {
+ return types.Values;
+ }
+
+ protected override bool AllowBreakEventChanges {
+ get { return true; }
+ }
+
+ public override void Dispose ()
+ {
+ base.Dispose ();
+
+ if (symbolFiles == null)
+ return;
+
+ if (!HasExited)
+ EndLaunch ();
+
+ foreach (var symfile in symbolFiles)
+ symfile.Value.Dispose ();
+
+ symbolFiles.Clear ();
+ symbolFiles = null;
+
+ if (!HasExited) {
+ if (vm != null) {
+ ThreadPool.QueueUserWorkItem (delegate {
+ try {
+ vm.Exit (0);
+ } catch (VMDisconnectedException) {
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error exiting SDB VM:", ex);
+ }
+ });
+ }
+ }
+
+ Adaptor.Dispose ();
+ }
+
+ protected override void OnAttachToProcess (long processId)
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override void OnContinue ()
+ {
+ ThreadPool.QueueUserWorkItem (delegate {
+ try {
+ Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock
+ OnResumed ();
+ vm.Resume ();
+ DequeueEventsForFirstThread ();
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ OnDebuggerOutput (true, ex.ToString ());
+ }
+ });
+ }
+
+ protected override void OnDetach ()
+ {
+ throw new NotSupportedException ();
+ }
+
+ protected override void OnExit ()
+ {
+ HasExited = true;
+ EndLaunch ();
+ if (vm != null) {
+ try {
+ vm.Exit (0);
+ } catch (VMDisconnectedException) {
+ // The VM was already disconnected, ignore.
+ } catch (SocketException se) {
+ // This will often happen during normal operation
+ LoggingService.LogError ("Error closing debugger session", se);
+ } catch (IOException ex) {
+ // This will often happen during normal operation
+ LoggingService.LogError ("Error closing debugger session", ex);
+ }
+ }
+ QueueEnsureExited ();
+ }
+
+ void QueueEnsureExited ()
+ {
+ if (vm != null) {
+ //FIXME: this might never get reached if the IDE is Exited first
+ try {
+ if (vm.Process != null) {
+ ThreadPool.QueueUserWorkItem (delegate {
+ // This is a workaround for a mono bug
+ // Without this call, the process may become zombie in mono < 2.10.2
+ vm.Process.WaitForExit ();
+ });
+ }
+ } catch {
+ // Ignore
+ }
+ var t = new System.Timers.Timer ();
+ t.Interval = 3000;
+ t.Elapsed += delegate {
+ try {
+ t.Enabled = false;
+ t.Dispose ();
+ EnsureExited ();
+ } catch (Exception ex) {
+ LoggingService.LogError ("Failed to force-terminate process", ex);
+ }
+ try {
+ if (vm != null) {
+ //this is a no-op if it already closed
+ vm.ForceDisconnect ();
+ }
+ } catch (Exception ex) {
+ LoggingService.LogError ("Failed to force-close debugger connection", ex);
+ }
+ };
+ t.Enabled = true;
+ }
+ }
+
+ /// <summary>This is a fallback in case the debugger agent doesn't respond to an exit call</summary>
+ protected virtual void EnsureExited ()
+ {
+ try {
+ if (vm != null && vm.TargetProcess != null && !vm.TargetProcess.HasExited)
+ vm.TargetProcess.Kill ();
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error force-terminating soft debugger process", ex);
+ }
+ }
+
+ protected override void OnFinish ()
+ {
+ Step (StepDepth.Out, StepSize.Line);
+ }
+
+ protected override ProcessInfo[] OnGetProcesses ()
+ {
+ if (procs == null) {
+ if (remoteProcessName != null || vm.TargetProcess == null) {
+ procs = new ProcessInfo[] { new ProcessInfo (0, remoteProcessName ?? "mono") };
+ } else {
+ try {
+ procs = new ProcessInfo[] { new ProcessInfo (vm.TargetProcess.Id, vm.TargetProcess.ProcessName) };
+ } catch (Exception ex) {
+ if (!loggedSymlinkedRuntimesBug) {
+ loggedSymlinkedRuntimesBug = true;
+ LoggingService.LogError ("Error getting debugger process info. Known Mono bug with symlinked runtimes.", ex);
+ }
+ procs = new ProcessInfo[] { new ProcessInfo (0, "mono") };
+ }
+ }
+ }
+ return new ProcessInfo[] { new ProcessInfo (procs[0].Id, procs[0].Name) };
+ }
+
+ protected override Backtrace OnGetThreadBacktrace (long processId, long threadId)
+ {
+ return GetThreadBacktrace (GetThread (processId, threadId));
+ }
+
+ Backtrace GetThreadBacktrace (ThreadMirror thread)
+ {
+ return new Backtrace (new SoftDebuggerBacktrace (this, thread));
+ }
+
+ string GetThreadName (ThreadMirror t)
+ {
+ string name = t.Name;
+ if (string.IsNullOrEmpty (name)) {
+ try {
+ if (t.IsThreadPoolThread)
+ return "<Thread Pool>";
+ } catch (ObjectCollectedException e) {
+ if (vm.Version.AtLeast (2, 2)) {
+ throw e;
+ }
+ return "<Thread>";
+ }
+ }
+ return name;
+ }
+
+ protected override ThreadInfo[] OnGetThreads (long processId)
+ {
+ if (current_threads == null) {
+ IList<ThreadMirror> mirrors = vm.GetThreads ();
+ var threads = new ThreadInfo[mirrors.Count];
+ for (int i = 0; i < mirrors.Count; i++) {
+ ThreadMirror t = mirrors [i];
+ threads[i] = new ThreadInfo (processId, GetId (t), GetThreadName (t), null);
+ }
+ current_threads = threads;
+ }
+ return current_threads;
+ }
+
+ ThreadMirror GetThread (long processId, long threadId)
+ {
+ foreach (ThreadMirror t in vm.GetThreads ())
+ if (GetId (t) == threadId)
+ return t;
+ return null;
+ }
+
+ ThreadInfo GetThread (ProcessInfo process, ThreadMirror thread)
+ {
+ long tid = GetId (thread);
+ foreach (var t in OnGetThreads (process.Id))
+ if (t.Id == tid)
+ return t;
+ return null;
+ }
+
+ protected override BreakEventInfo OnInsertBreakEvent (BreakEvent ev)
+ {
+ lock (pending_bes) {
+ var bi = new BreakInfo ();
+
+ if (HasExited) {
+ bi.SetStatus (BreakEventStatus.Disconnected, null);
+ return bi;
+ }
+
+ if (ev is FunctionBreakpoint) {
+ var fb = (FunctionBreakpoint) ev;
+ bool resolved = false;
+
+ foreach (var location in FindFunctionLocations (fb.FunctionName, fb.ParamTypes)) {
+ string paramList = string.Empty;
+
+ if (fb.ParamTypes != null)
+ paramList = "(" + string.Join (", ", fb.ParamTypes) + ")";
+
+ OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint for '{0}{1}' to {2}:{3} [0x{4:x5}].\n",
+ fb.FunctionName, paramList, location.SourceFile, location.LineNumber, location.ILOffset));
+
+ bi.FileName = location.SourceFile;
+ bi.Location = location;
+
+ InsertBreakpoint (fb, bi);
+ bi.SetStatus (BreakEventStatus.Bound, null);
+ resolved = true;
+ }
+
+ if (!resolved) {
+ // FIXME: handle types like GenericType<>, GenericType<SomeOtherType>, and GenericType<...>+NestedGenricType<...>
+ int dot = fb.FunctionName.LastIndexOf ('.');
+ if (dot != -1)
+ bi.TypeName = fb.FunctionName.Substring (0, dot);
+
+ bi.SetStatus (BreakEventStatus.NotBound, null);
+ pending_bes.Add (bi);
+ }
+ } else if (ev is Breakpoint) {
+ var bp = (Breakpoint) ev;
+ bool insideLoadedRange;
+ bool resolved = false;
+ bool generic;
+
+ bi.FileName = bp.FileName;
+
+ foreach (var location in FindLocationsByFile (bp.FileName, bp.Line, bp.Column, out generic, out insideLoadedRange)) {
+ OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint at '{0}:{1},{2}' to {3} [0x{4:x5}].\n",
+ bp.FileName, bp.Line, bp.Column, GetPrettyMethodName (location.Method), location.ILOffset));
+
+ bi.Location = location;
+ InsertBreakpoint (bp, bi);
+ bi.SetStatus (BreakEventStatus.Bound, null);
+ resolved = true;
+ }
+
+ if (resolved) {
+ // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
+ if (generic)
+ pending_bes.Add (bi);
+ } else {
+ pending_bes.Add (bi);
+ if (insideLoadedRange)
+ bi.SetStatus (BreakEventStatus.Invalid, null);
+ else
+ bi.SetStatus (BreakEventStatus.NotBound, null);
+ }
+ } else if (ev is Catchpoint) {
+ var cp = (Catchpoint) ev;
+ TypeMirror type;
+
+ if (!types.TryGetValue (cp.ExceptionName, out type)) {
+ //
+ // Same as in FindLocationByFile (), fetch types matching the type name
+ if (vm.Version.AtLeast (2, 9)) {
+ foreach (TypeMirror t in vm.GetTypes (cp.ExceptionName, false))
+ ProcessType (t);
+ }
+ }
+
+ if (types.TryGetValue (cp.ExceptionName, out type)) {
+ InsertCatchpoint (cp, bi, type);
+ bi.SetStatus (BreakEventStatus.Bound, null);
+ } else {
+ bi.TypeName = cp.ExceptionName;
+ pending_bes.Add (bi);
+ bi.SetStatus (BreakEventStatus.NotBound, null);
+ }
+ }
+
+ /*
+ * TypeLoad events lead to too much wire traffic + suspend/resume work, so
+ * filter them using the file names used by pending breakpoints.
+ */
+ if (vm.Version.AtLeast (2, 9)) {
+ var sourceFileList = pending_bes.Where (b => b.FileName != null).Select (b => b.FileName).ToArray ();
+ if (sourceFileList.Length > 0) {
+ //HACK: explicitly try lowercased drivename on windows, since csc (when not hosted in VS) lowercases
+ //the drivename in the pdb files that get converted to mdbs as-is
+ //FIXME: we should really do a case-insensitive request on Win/Mac, when sdb supports that
+ if (IsWindows) {
+ int originalCount = sourceFileList.Length;
+ Array.Resize (ref sourceFileList, originalCount * 2);
+ for (int i = 0; i < originalCount; i++) {
+ string n = sourceFileList[i];
+ sourceFileList[originalCount + i] = char.ToLower (n[0]) + n.Substring (1);
+ }
+ }
+
+ if (typeLoadReq == null) {
+ typeLoadReq = vm.CreateTypeLoadRequest ();
+ }
+ typeLoadReq.Enabled = false;
+ typeLoadReq.SourceFileFilter = sourceFileList;
+ typeLoadReq.Enabled = true;
+ }
+
+ var typeNameList = pending_bes.Where (b => b.TypeName != null).Select (b => b.TypeName).ToArray ();
+ if (typeNameList.Length > 0) {
+ // Use a separate request since the filters are ANDed together
+ if (typeLoadTypeNameReq == null) {
+ typeLoadTypeNameReq = vm.CreateTypeLoadRequest ();
+ }
+ typeLoadTypeNameReq.Enabled = false;
+ typeLoadTypeNameReq.TypeNameFilter = typeNameList;
+ typeLoadTypeNameReq.Enabled = true;
+ }
+ }
+
+ return bi;
+ }
+ }
+
+ protected override void OnRemoveBreakEvent (BreakEventInfo binfo)
+ {
+ if (HasExited)
+ return;
+
+ lock (pending_bes) {
+ var bi = (BreakInfo) binfo;
+ if (bi.Requests.Count != 0) {
+ foreach (var request in bi.Requests)
+ request.Enabled = false;
+
+ RemoveQueuedBreakEvents (bi.Requests);
+ }
+
+ pending_bes.Remove (bi);
+ }
+ }
+
+ protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
+ {
+ if (HasExited)
+ return;
+
+ lock (pending_bes) {
+ var bi = (BreakInfo) binfo;
+ if (bi.Requests.Count != 0) {
+ foreach (var request in bi.Requests)
+ request.Enabled = enable;
+
+ if (!enable)
+ RemoveQueuedBreakEvents (bi.Requests);
+ }
+ }
+ }
+
+ protected override void OnUpdateBreakEvent (BreakEventInfo binfo)
+ {
+ }
+
+ void InsertBreakpoint (Breakpoint bp, BreakInfo bi)
+ {
+ EventRequest request;
+
+ request = vm.SetBreakpoint (bi.Location.Method, bi.Location.ILOffset);
+ request.Enabled = bp.Enabled;
+ bi.Requests.Add (request);
+
+ breakpoints[request] = bi;
+
+ if (bi.Location.LineNumber != bp.Line || bi.Location.ColumnNumber != bp.Column)
+ bi.AdjustBreakpointLocation (bi.Location.LineNumber, bi.Location.ColumnNumber);
+ }
+
+ void InsertCatchpoint (Catchpoint cp, BreakInfo bi, TypeMirror excType)
+ {
+ EventRequest request;
+
+ request = vm.CreateExceptionRequest (excType, true, true);
+ request.Count = cp.HitCount; // Note: need to set HitCount *before* enabling
+ request.Enabled = cp.Enabled;
+
+ bi.Requests.Add (request);
+ }
+
+ static bool CheckTypeName (string typeName, string name)
+ {
+ // if the name provided is empty, it matches anything.
+ if (name.Length == 0)
+ return true;
+
+ if (name.StartsWith ("global::", StringComparison.Ordinal)) {
+ if (typeName != name.Substring ("global::".Length))
+ return false;
+ } else if (name.StartsWith ("::", StringComparison.Ordinal)) {
+ if (typeName != name.Substring ("::".Length))
+ return false;
+ } else {
+ // be a little more flexible with what we match... i.e. "Console" should match "System.Console"
+ if (typeName.Length > name.Length) {
+ if (!typeName.EndsWith (name, StringComparison.InvariantCulture))
+ return false;
+
+ char delim = typeName[typeName.Length - name.Length];
+ if (delim != '.' && delim != '+')
+ return false;
+ } else if (typeName != name) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ static bool CheckTypeName (TypeMirror type, string name)
+ {
+ if (name.Length == 0) {
+ // empty name matches anything
+ return true;
+ }
+
+ if (name[name.Length - 1] == '?') {
+ // canonicalize the user-specified nullable type
+ return CheckTypeName (type, string.Format ("System.Nullable<{0}>", name.Substring (0, name.Length - 1)));
+ }
+
+ if (type.IsArray) {
+ int startIndex = name.LastIndexOf ('[');
+ int endIndex = name.Length - 1;
+
+ if (startIndex == -1 || name[endIndex] != ']') {
+ // the user-specified type is not an array
+ return false;
+ }
+
+ var rank = name.Substring (startIndex + 1, endIndex - (startIndex + 1)).Split (new char[] { ',' });
+ if (rank.Length != type.GetArrayRank ())
+ return false;
+
+ return CheckTypeName (type.GetElementType (), name.Substring (0, startIndex).TrimEnd ());
+ }
+
+ if (type.IsPointer) {
+ if (name.Length < 2 || name[name.Length - 1] != '*')
+ return false;
+
+ return CheckTypeName (type.GetElementType (), name.Substring (0, name.Length - 1).TrimEnd ());
+ }
+
+ if (type.IsGenericType) {
+ int startIndex = name.IndexOf ('<');
+ int endIndex = name.Length - 1;
+
+ if (startIndex == -1 || name[endIndex] != '>') {
+ // the user-specified type is not a generic type
+ return false;
+ }
+
+ // make sure that the type name matches (minus generics)
+ string subName = name.Substring (0, startIndex);
+ string typeName = type.FullName;
+ int tick;
+
+ if ((tick = typeName.IndexOf ('`')) != -1)
+ typeName = typeName.Substring (0, tick);
+
+ if (!CheckTypeName (typeName, subName))
+ return false;
+
+ string[] paramTypes;
+ if (!FunctionBreakpoint.TryParseParameters (name, startIndex + 1, endIndex, out paramTypes))
+ return false;
+
+ TypeMirror[] argTypes = type.GetGenericArguments ();
+ if (paramTypes.Length != argTypes.Length)
+ return false;
+
+ for (int i = 0; i < paramTypes.Length; i++) {
+ if (!CheckTypeName (argTypes[i], paramTypes[i]))
+ return false;
+ }
+ } else if (!CheckTypeName (type.CSharpName, name)) {
+ if (!CheckTypeName (type.FullName, name))
+ return false;
+ }
+
+ return true;
+ }
+
+ static bool CheckMethodParams (MethodMirror method, string[] paramTypes)
+ {
+ if (paramTypes == null) {
+ // User supplied no params to match against, match anything we find.
+ return true;
+ }
+
+ var parameters = method.GetParameters ();
+ if (parameters.Length != paramTypes.Length)
+ return false;
+
+ for (int i = 0; i < paramTypes.Length; i++) {
+ if (!CheckTypeName (parameters[i].ParameterType, paramTypes[i]))
+ return false;
+ }
+
+ return true;
+ }
+
+ bool IsGenericMethod (MethodMirror method)
+ {
+ return vm.Version.AtLeast (2, 12) && method.IsGenericMethod;
+ }
+
+ IEnumerable<Location> FindFunctionLocations (string function, string[] paramTypes)
+ {
+ if (!started)
+ yield break;
+
+ if (vm.Version.AtLeast (2, 9)) {
+ int dot = function.LastIndexOf ('.');
+ if (dot == -1 || dot + 1 == function.Length)
+ yield break;
+
+ // FIXME: handle types like GenericType<>, GenericType<SomeOtherType>, and GenericType<...>+NestedGenricType<...>
+ string methodName = function.Substring (dot + 1);
+ string typeName = function.Substring (0, dot);
+
+ // FIXME: need a way of querying all types so we can substring match typeName (e.g. user may have typed "Console" instead of "System.Console")
+ foreach (var type in vm.GetTypes (typeName, false)) {
+ ProcessType (type);
+
+ foreach (var method in type.GetMethodsByNameFlags (methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, false)) {
+ if (!CheckMethodParams (method, paramTypes))
+ continue;
+
+ Location location = GetLocFromMethod (method);
+ if (location != null)
+ yield return location;
+ }
+ }
+ }
+
+ yield break;
+ }
+
+ IList<Location> FindLocationsByFile (string file, int line, int column, out bool genericTypeOrMethod, out bool insideLoadedRange)
+ {
+ List<Location> locations = new List<Location> ();
+
+ genericTypeOrMethod = false;
+ insideLoadedRange = false;
+
+ if (!started)
+ return locations;
+
+ string filename = PathToFileName (file);
+
+ //
+ // Fetch types matching the source file from the debuggee, and add them
+ // to the source file->type mapping tables.
+ // This is needed because we don't receive type load events for all types,
+ // just the ones which match a source file with an existing breakpoint.
+ //
+ if (vm.Version.AtLeast (2, 9)) {
+ //FIXME: do a case insensitive request on Win/Mac when sdb supports it (currently asserts NOTIMPLEMENTED)
+ var typesInFile = vm.GetTypesForSourceFile (filename, false);
+
+ //HACK: explicitly try lowercased drivename on windows, since csc (when not hosted in VS) lowercases
+ //the drivename in the pdb files that get converted to mdbs as-is
+ if (typesInFile.Count == 0 && IsWindows) {
+ string alternateCaseFilename = char.ToLower (filename[0]) + filename.Substring (1);
+ typesInFile = vm.GetTypesForSourceFile (alternateCaseFilename, false);
+ }
+
+ foreach (TypeMirror t in typesInFile)
+ ProcessType (t);
+ }
+
+ // Try already loaded types in the current source file
+ List<TypeMirror> types;
+
+ if (source_to_type.TryGetValue (filename, out types)) {
+ foreach (TypeMirror type in types) {
+ bool genericMethod;
+ bool insideRange;
+
+ var loc = GetLocFromType (type, filename, line, column, out genericMethod, out insideRange);
+ if (insideRange)
+ insideLoadedRange = true;
+
+ if (loc != null) {
+ if (genericMethod || type.IsGenericType)
+ genericTypeOrMethod = true;
+
+ locations.Add (loc);
+ }
+ }
+ }
+
+ return locations;
+ }
+
+ public override bool CanCancelAsyncEvaluations {
+ get {
+ return Adaptor.IsEvaluating;
+ }
+ }
+
+ protected override void OnCancelAsyncEvaluations ()
+ {
+ Adaptor.CancelAsyncOperations ();
+ }
+
+ protected override void OnNextInstruction ()
+ {
+ Step (StepDepth.Over, StepSize.Min);
+ }
+
+ protected override void OnNextLine ()
+ {
+ Step (StepDepth.Over, StepSize.Line);
+ }
+
+ void Step (StepDepth depth, StepSize size)
+ {
+ ThreadPool.QueueUserWorkItem (delegate {
+ try {
+ Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock
+ var req = vm.CreateStepRequest (current_thread);
+ req.Depth = depth;
+ req.Size = size;
+ req.Filter = StepFilter.StaticCtor | StepFilter.DebuggerHidden;
+ if (assemblyFilters != null && assemblyFilters.Count > 0)
+ req.AssemblyFilter = assemblyFilters;
+ req.Enabled = true;
+ currentStepRequest = req;
+ OnResumed ();
+ vm.Resume ();
+ DequeueEventsForFirstThread ();
+ } catch (CommandException ex) {
+ string reason;
+
+ switch (ex.ErrorCode) {
+ case ErrorCode.INVALID_FRAMEID: reason = "invalid frame id"; break;
+ case ErrorCode.NOT_SUSPENDED: reason = "VM not suspended"; break;
+ case ErrorCode.ERR_UNLOADED: reason = "AppDomain has been unloaded"; break;
+ case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET: reason = "no sequence point at the specified IL offset"; break;
+ default: reason = ex.ErrorCode.ToString (); break;
+ }
+
+ OnDebuggerOutput (true, string.Format ("Step request failed: {0}.", reason));
+ LoggingService.LogError ("Step request failed", ex);
+ } catch (Exception ex) {
+ OnDebuggerOutput (true, string.Format ("Step request failed: {0}", ex.Message));
+ LoggingService.LogError ("Step request failed", ex);
+ }
+ });
+ }
+
+ void EventHandler ()
+ {
+ while (true) {
+ try {
+ EventSet e = vm.GetNextEventSet ();
+ var type = e[0].EventType;
+ if (type == EventType.VMDeath || type == EventType.VMDisconnect) {
+ break;
+ }
+ HandleEventSet (e);
+ } catch (Exception ex) {
+ if (HasExited)
+ break;
+
+ if (!HandleException (ex))
+ OnDebuggerOutput (true, ex.ToString ());
+
+ if (ex is VMDisconnectedException || ex is IOException || ex is SocketException)
+ break;
+ }
+ }
+
+ try {
+ // This is a workaround for a mono bug
+ // Without this call, the process may become zombie in mono < 2.10.2
+ if (vm.Process != null)
+ vm.Process.WaitForExit (1);
+ } catch {
+ // Ignore
+ }
+
+ OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
+ }
+
+ protected override bool HandleException (Exception ex)
+ {
+ HideConnectionDialog ();
+
+ if (HasExited)
+ return true;
+
+ if (ex is VMDisconnectedException || ex is IOException) {
+ ex = new DisconnectedException (ex);
+ HasExited = true;
+ } else if (ex is SocketException) {
+ ex = new DebugSocketException (ex);
+ HasExited = true;
+ }
+
+ return base.HandleException (ex);
+ }
+
+ // This method dispatches an event set.
+ //
+ // Based on the subset of events for which we register, and the contract for EventSet contents (equivalent to
+ // Java - http://download.oracle.com/javase/1.5.0/docs/guide/jpda/jdi/com/sun/jdi/event/EventSet.html)
+ // we know that event sets we receive are either:
+ // 1) Set of step and break events for a location in a single thread.
+ // 2) Set of catchpoints for a single exception.
+ // 3) A single event of any other kind.
+ // We verify these assumptions where possible, because things will break in horrible ways if they are wrong.
+ //
+ // If we are currently stopped on a thread, and the break events are on a different thread, we must queue
+ // that event set and dequeue it next time we resume. This eliminates race conditions when multiple threads
+ // hit breakpoints or catchpoints simultaneously.
+ //
+ void HandleEventSet (EventSet es)
+ {
+#if DEBUG_EVENT_QUEUEING
+ if (!(es[0] is TypeLoadEvent))
+ Console.WriteLine ("pp eventset({0}): {1}", es.Events.Length, es[0]);
+#endif
+ var type = es[0].EventType;
+ bool isBreakEvent = type == EventType.Step || type == EventType.Breakpoint || type == EventType.Exception || type == EventType.UserBreak;
+
+ if (isBreakEvent) {
+ if (current_thread != null && es[0].Thread.Id != current_thread.Id) {
+ QueueBreakEventSet (es.Events);
+ } else {
+ HandleBreakEventSet (es.Events, false);
+ }
+ } else {
+ if (es.Events.Length != 1)
+ throw new InvalidOperationException ("EventSet has unexpected combination of events");
+ HandleEvent (es[0]);
+
+ try {
+ vm.Resume ();
+ } catch (VMNotSuspendedException) {
+ var eventType = es [0].EventType;
+ var isTolerantEvent = eventType == EventType.VMStart || eventType == EventType.AssemblyLoad || eventType == EventType.TypeLoad
+ || eventType == EventType.ThreadStart || eventType == EventType.ThreadDeath;
+
+ if (eventType != EventType.VMStart && (vm.Version.AtLeast (2, 2) || !isTolerantEvent)) {
+ throw;
+ }
+ }
+ }
+ }
+
+ static bool IsStepIntoRequest (StepEventRequest stepRequest)
+ {
+ return stepRequest.Depth == StepDepth.Into;
+ }
+
+ static bool IsStepOutRequest (StepEventRequest stepRequest)
+ {
+ return stepRequest.Depth == StepDepth.Out;
+ }
+
+ static bool IsPropertyOrOperatorMethod (MDB.MethodMirror method)
+ {
+ string name = method.Name;
+
+ return method.IsSpecialName &&
+ name.StartsWith ("get_", StringComparison.Ordinal) ||
+ name.StartsWith ("set_", StringComparison.Ordinal) ||
+ name.StartsWith ("op_", StringComparison.Ordinal);
+ }
+
+ void HandleBreakEventSet (Event[] es, bool dequeuing)
+ {
+ if (dequeuing && HasExited)
+ return;
+
+ bool resume = true;
+ bool steppedOut = false;
+ bool steppedInto = false;
+ bool redoCurrentStep = false;
+ ObjectMirror exception = null;
+ TargetEventType etype = TargetEventType.TargetStopped;
+ BreakEvent breakEvent = null;
+
+ if (es[0] is ExceptionEvent) {
+ var bad = es.FirstOrDefault (ee => ee.EventType != EventType.Exception);
+ if (bad != null)
+ throw new Exception ("Catchpoint eventset had unexpected event type " + bad.GetType ());
+ var ev = (ExceptionEvent)es[0];
+ if (ev.Request == unhandledExceptionRequest)
+ etype = TargetEventType.UnhandledException;
+ else
+ etype = TargetEventType.ExceptionThrown;
+ exception = ev.Exception;
+ if (ev.Request != unhandledExceptionRequest || exception.Type.FullName != "System.Threading.ThreadAbortException")
+ resume = false;
+ }
+ else {
+ //always need to evaluate all breakpoints, some might be tracepoints or conditional bps with counters
+ foreach (Event e in es) {
+ if (e.EventType == EventType.Breakpoint) {
+ var be = e as BreakpointEvent;
+ BreakInfo binfo;
+
+ if (!HandleBreakpoint (e.Thread, be.Request)) {
+ etype = TargetEventType.TargetHitBreakpoint;
+ autoStepInto = false;
+ resume = false;
+ }
+
+ if (breakpoints.TryGetValue (be.Request, out binfo)) {
+ if (currentStepRequest != null &&
+ binfo.Location.ILOffset == currentAddress &&
+ e.Thread.Id == currentStepRequest.Thread.Id)
+ redoCurrentStep = true;
+
+ breakEvent = binfo.BreakEvent;
+ }
+ } else if (e.EventType == EventType.Step) {
+ var stepRequest = e.Request as StepEventRequest;
+ steppedInto = IsStepIntoRequest (stepRequest);
+ steppedOut = IsStepOutRequest (stepRequest);
+ etype = TargetEventType.TargetStopped;
+ resume = false;
+ } else if (e.EventType == EventType.UserBreak) {
+ etype = TargetEventType.TargetStopped;
+ autoStepInto = false;
+ resume = false;
+ } else {
+ throw new Exception ("Break eventset had unexpected event type " + e.GetType ());
+ }
+ }
+ }
+
+ if (redoCurrentStep) {
+ StepDepth depth = currentStepRequest.Depth;
+ StepSize size = currentStepRequest.Size;
+
+ current_thread = recent_thread = es[0].Thread;
+ currentStepRequest.Enabled = false;
+ currentStepRequest = null;
+
+ Step (depth, size);
+ } else if (resume) {
+ //all breakpoints were conditional and evaluated as false
+ vm.Resume ();
+ DequeueEventsForFirstThread ();
+ } else {
+ if (currentStepRequest != null) {
+ currentStepRequest.Enabled = false;
+ currentStepRequest = null;
+ }
+
+ current_thread = recent_thread = es[0].Thread;
+
+ if (exception != null)
+ activeExceptionsByThread [current_thread.ThreadId] = exception;
+
+ var backtrace = GetThreadBacktrace (current_thread);
+ bool stepOut = false;
+
+ if (backtrace.FrameCount > 0) {
+ var frame = backtrace.GetFrame (0) as SoftDebuggerStackFrame;
+ currentAddress = frame != null ? frame.Address : -1;
+ if (frame != null) {
+ if (steppedInto) {
+ if (Options.StepOverPropertiesAndOperators && IsPropertyOrOperatorMethod (frame.StackFrame.Method)) {
+ // We will want to call StepInto once StepOut returns...
+ autoStepInto = true;
+ stepOut = true;
+ } else if (SoftDebuggerAdaptor.IsGeneratedType (frame.StackFrame.Method.DeclaringType)) {
+ // User asked to step in, but we landed in an autogenerated type (probably an iterator)
+ autoStepInto = true;
+ stepOut = true;
+ }
+ }
+ }
+ }
+
+ if (stepOut) {
+ Step (StepDepth.Out, StepSize.Min);
+ } else if (steppedOut && autoStepInto) {
+ autoStepInto = false;
+ Step (StepDepth.Into, StepSize.Min);
+ } else {
+ var args = new TargetEventArgs (etype);
+ args.Process = OnGetProcesses () [0];
+ args.Thread = GetThread (args.Process, current_thread);
+ args.Backtrace = backtrace;
+ args.BreakEvent = breakEvent;
+
+ OnTargetEvent (args);
+ }
+ }
+ }
+
+ void HandleEvent (Event e)
+ {
+ lock (pending_bes) {
+ switch (e.EventType) {
+ case EventType.AssemblyLoad: {
+ var ae = (AssemblyLoadEvent) e;
+ bool isExternal = !UpdateAssemblyFilters (ae.Assembly) && userAssemblyNames != null;
+ string flagExt = isExternal? " [External]" : "";
+ OnDebuggerOutput (false, string.Format ("Loaded assembly: {0}{1}\n", ae.Assembly.Location, flagExt));
+ break;
+ }
+ case EventType.AssemblyUnload: {
+ var aue = (AssemblyUnloadEvent) e;
+
+ if (assemblyFilters != null) {
+ int index = assemblyFilters.IndexOf (aue.Assembly);
+ if (index != -1)
+ assemblyFilters.RemoveAt (index);
+ }
+
+ // Mark affected breakpoints as pending again
+ var affectedBreakpoints = new List<KeyValuePair<EventRequest, BreakInfo>> (
+ breakpoints.Where (x=> (x.Value.Location.Method.DeclaringType.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase)))
+ );
+ foreach (KeyValuePair<EventRequest,BreakInfo> breakpoint in affectedBreakpoints) {
+ string file = PathToFileName (breakpoint.Value.Location.SourceFile);
+ int line = breakpoint.Value.Location.LineNumber;
+ OnDebuggerOutput (false, string.Format ("Re-pending breakpoint at {0}:{1}\n", file, line));
+ breakpoints.Remove (breakpoint.Key);
+ pending_bes.Add (breakpoint.Value);
+ }
+
+ // Remove affected types from the loaded types list
+ var affectedTypes = new List<string> (
+ from pair in types
+ where pair.Value.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase)
+ select pair.Key
+ );
+ foreach (string typename in affectedTypes) {
+ types.Remove (typename);
+ }
+
+ foreach (var pair in source_to_type) {
+ pair.Value.RemoveAll (delegate (TypeMirror mirror){
+ return mirror.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase);
+ });
+ }
+ OnDebuggerOutput (false, string.Format ("Unloaded assembly: {0}\n", aue.Assembly.Location));
+ break;
+ }
+ case EventType.VMStart: {
+ OnStarted (new ThreadInfo (0, GetId (e.Thread), GetThreadName (e.Thread), null));
+ //HACK: 2.6.1 VM doesn't emit type load event, so work around it
+ var t = vm.RootDomain.Corlib.GetType ("System.Exception", false, false);
+ if (t != null)
+ ResolveBreakpoints (t);
+ break;
+ }
+ case EventType.TypeLoad: {
+ var t = ((TypeLoadEvent)e).Type;
+ string typeName = t.FullName;
+
+ if (types.ContainsKey (typeName)) {
+ /* This can happen since we manually add entries to 'types' */
+ /*
+ if (typeName != "System.Exception" && typeName != "<Module>")
+ LoggingService.LogError ("Type '" + typeName + "' loaded more than once", null);
+ */
+ } else {
+ ResolveBreakpoints (t);
+ }
+ break;
+ }
+ case EventType.ThreadStart: {
+ var ts = (ThreadStartEvent) e;
+ var name = GetThreadName (ts.Thread);
+ var id = GetId (ts.Thread);
+ OnDebuggerOutput (false, string.Format ("Thread started: {0} #{1}\n", name, id));
+ OnTargetEvent (new TargetEventArgs (TargetEventType.ThreadStarted) {
+ Thread = new ThreadInfo (0, id, name, null),
+ });
+ break;
+ }
+ case EventType.ThreadDeath: {
+ var ts = (ThreadDeathEvent) e;
+ var name = GetThreadName (ts.Thread);
+ var id = GetId (ts.Thread);
+ OnDebuggerOutput (false, string.Format ("Thread finished: {0} #{1}\n", name, id));
+ OnTargetEvent (new TargetEventArgs (TargetEventType.ThreadStopped) {
+ Thread = new ThreadInfo (0, id, ts.Thread.Name, null),
+ });
+ break;
+ }
+ case EventType.UserLog: {
+ var ul = (UserLogEvent) e;
+ OnDebuggerOutput (false, string.Format ("[{0}:{1}] {2}\n", ul.Level, ul.Category, ul.Message));
+ break;
+ }
+ default:
+ LoggingService.LogMessage ("Unknown debugger event type {0}", e.GetType ());
+ break;
+ }
+ }
+ }
+
+ public ObjectMirror GetExceptionObject (ThreadMirror thread)
+ {
+ ObjectMirror obj;
+ if (activeExceptionsByThread.TryGetValue (thread.ThreadId, out obj))
+ return obj;
+
+ return null;
+ }
+
+ void QueueBreakEventSet (Event[] eventSet)
+ {
+#if DEBUG_EVENT_QUEUEING
+ Console.WriteLine ("qq eventset({0}): {1}", eventSet.Length, eventSet[0]);
+#endif
+ var events = new List<Event> (eventSet);
+ lock (queuedEventSets) {
+ queuedEventSets.AddLast (events);
+ }
+ }
+
+ void RemoveQueuedBreakEvents (List<EventRequest> requests)
+ {
+ int resume = 0;
+
+ lock (queuedEventSets) {
+ var node = queuedEventSets.First;
+
+ while (node != null) {
+ List<Event> q = node.Value;
+
+ for (int i = 0; i < q.Count; i++) {
+ foreach (var request in requests) {
+ if (q[i].Request == request) {
+ q.RemoveAt (i--);
+ break;
+ }
+ }
+ }
+
+ if (q.Count == 0) {
+ var d = node;
+ node = node.Next;
+ queuedEventSets.Remove (d);
+ resume++;
+ } else {
+ node = node.Next;
+ }
+ }
+ }
+
+ for (int i = 0; i < resume; i++)
+ vm.Resume ();
+ }
+
+ void DequeueEventsForFirstThread ()
+ {
+ List<List<Event>> dequeuing;
+ lock (queuedEventSets) {
+ if (queuedEventSets.Count < 1)
+ return;
+
+ dequeuing = new List<List<Event>> ();
+ var node = queuedEventSets.First;
+
+ //making this the current thread means that all events from other threads will get queued
+ current_thread = node.Value[0].Thread;
+ while (node != null) {
+ if (node.Value[0].Thread.Id == current_thread.Id) {
+ var d = node;
+ node = node.Next;
+ dequeuing.Add (d.Value);
+ queuedEventSets.Remove (d);
+ } else {
+ node = node.Next;
+ }
+ }
+ }
+
+#if DEBUG_EVENT_QUEUEING
+ foreach (var e in dequeuing)
+ Console.WriteLine ("dq eventset({0}): {1}", e.Count, e[0]);
+#endif
+
+ //firing this off in a thread prevents possible infinite recursion
+ ThreadPool.QueueUserWorkItem (delegate {
+ if (!HasExited) {
+ foreach (var es in dequeuing) {
+ try {
+ HandleBreakEventSet (es.ToArray (), true);
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ OnDebuggerOutput (true, ex.ToString ());
+
+ if (ex is VMDisconnectedException || ex is IOException || ex is SocketException) {
+ OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
+ break;
+ }
+ }
+ }
+ }
+ });
+ }
+
+ bool HandleBreakpoint (ThreadMirror thread, EventRequest er)
+ {
+ BreakInfo binfo;
+ if (!breakpoints.TryGetValue (er, out binfo))
+ return false;
+
+ var bp = binfo.BreakEvent as Breakpoint;
+ if (bp == null)
+ return false;
+
+ binfo.IncrementHitCount ();
+ if (!binfo.HitCountReached)
+ return true;
+
+ if (!string.IsNullOrEmpty (bp.ConditionExpression)) {
+ string res = EvaluateExpression (thread, bp.ConditionExpression, bp);
+ if (bp.BreakIfConditionChanges) {
+ if (res == binfo.LastConditionValue)
+ return true;
+ binfo.LastConditionValue = res;
+ } else {
+ if (res == null || res.ToLowerInvariant () != "true")
+ return true;
+ }
+ }
+ switch (bp.HitAction) {
+ case HitAction.CustomAction:
+ // If custom action returns true, execution must continue
+ return binfo.RunCustomBreakpointAction (bp.CustomActionId);
+ case HitAction.PrintExpression: {
+ string exp = EvaluateTrace (thread, bp.TraceExpression);
+ binfo.UpdateLastTraceValue (exp);
+ return true;
+ }
+ case HitAction.Break:
+ return false;
+ }
+ return false;
+ }
+
+ string EvaluateTrace (ThreadMirror thread, string exp)
+ {
+ var sb = new StringBuilder ();
+ int last = 0;
+ int i = exp.IndexOf ('{');
+ while (i != -1) {
+ if (i < exp.Length - 1 && exp [i+1] == '{') {
+ sb.Append (exp.Substring (last, i - last + 1));
+ last = i + 2;
+ i = exp.IndexOf ('{', i + 2);
+ continue;
+ }
+ int j = exp.IndexOf ('}', i + 1);
+ if (j == -1)
+ break;
+ string se = exp.Substring (i + 1, j - i - 1);
+ se = EvaluateExpression (thread, se, null);
+ sb.Append (exp.Substring (last, i - last));
+ sb.Append (se);
+ last = j + 1;
+ i = exp.IndexOf ('{', last);
+ }
+ sb.Append (exp.Substring (last, exp.Length - last));
+ return sb.ToString ();
+ }
+
+ static SourceLocation GetSourceLocation (MDB.StackFrame frame)
+ {
+ return new SourceLocation (frame.Method.Name, frame.FileName, frame.LineNumber, frame.ColumnNumber);
+ }
+
+ static string FormatSourceLocation (Breakpoint bp)
+ {
+ if (string.IsNullOrEmpty (bp.FileName))
+ return null;
+
+ var location = Path.GetFileName (bp.FileName);
+ if (bp.OriginalLine > 0) {
+ location += ":" + bp.OriginalLine;
+ if (bp.OriginalColumn > 0)
+ location += "," + bp.OriginalColumn;
+ }
+
+ return location;
+ }
+
+ static bool IsBoolean (ValueReference vr)
+ {
+ if (vr.Type is Type && ((Type) vr.Type) == typeof (bool))
+ return true;
+
+ if (vr.Type is TypeMirror && ((TypeMirror) vr.Type).FullName == "System.Boolean")
+ return true;
+
+ return false;
+ }
+
+ string EvaluateExpression (ThreadMirror thread, string expression, Breakpoint bp)
+ {
+ try {
+ var frames = thread.GetFrames ();
+ if (frames.Length == 0)
+ return string.Empty;
+
+ EvaluationOptions ops = Options.EvaluationOptions.Clone ();
+ ops.AllowTargetInvoke = true;
+
+ var ctx = new SoftEvaluationContext (this, frames[0], ops);
+
+ if (bp != null) {
+ // validate conditional breakpoint expressions so that we can provide error reporting to the user
+ var vr = ctx.Evaluator.ValidateExpression (ctx, expression);
+ if (!vr.IsValid) {
+ string message = string.Format ("Invalid expression in conditional breakpoint. {0}", vr.Message);
+ string location = FormatSourceLocation (bp);
+
+ if (!string.IsNullOrEmpty (location))
+ message = location + ": " + message;
+
+ OnDebuggerOutput (true, message);
+ return string.Empty;
+ }
+
+ // resolve types...
+ if (ctx.SourceCodeAvailable)
+ expression = ctx.Evaluator.Resolve (this, GetSourceLocation (frames[0]), expression);
+ }
+
+ ValueReference val = ctx.Evaluator.Evaluate (ctx, expression);
+ if (bp != null && !bp.BreakIfConditionChanges && !IsBoolean (val)) {
+ string message = string.Format ("Expression in conditional breakpoint did not evaluate to a boolean value: {0}", bp.ConditionExpression);
+ string location = FormatSourceLocation (bp);
+
+ if (!string.IsNullOrEmpty (location))
+ message = location + ": " + message;
+
+ OnDebuggerOutput (true, message);
+ return string.Empty;
+ }
+
+ return val.CreateObjectValue (false).Value;
+ } catch (EvaluatorException ex) {
+ string message;
+
+ if (bp != null) {
+ message = string.Format ("Failed to evaluate expression in conditional breakpoint. {0}", ex.Message);
+ string location = FormatSourceLocation (bp);
+
+ if (!string.IsNullOrEmpty (location))
+ message = location + ": " + message;
+ } else {
+ message = ex.ToString ();
+ }
+
+ OnDebuggerOutput (true, message);
+ return string.Empty;
+ } catch (Exception ex) {
+ OnDebuggerOutput (true, ex.ToString ());
+ return string.Empty;
+ }
+ }
+
+ void ProcessType (TypeMirror t)
+ {
+ string typeName = t.FullName;
+
+ if (types.ContainsKey (typeName))
+ return;
+ types [typeName] = t;
+
+ //get the source file paths
+ //full paths, from GetSourceFiles (true), are only supported by sdb protocol 2.2 and later
+ string[] sourceFiles;
+ if (useFullPaths) {
+ sourceFiles = t.GetSourceFiles (true);
+ } else {
+ sourceFiles = t.GetSourceFiles ();
+
+ //HACK: if mdb paths are windows paths but the sdb agent is on unix, it won't map paths to filenames correctly
+ if (IsWindows) {
+ for (int i = 0; i < sourceFiles.Length; i++) {
+ string s = sourceFiles[i];
+ if (s != null && !s.StartsWith ("/", StringComparison.Ordinal))
+ sourceFiles[i] = Path.GetFileName (s);
+ }
+ }
+ }
+
+ for (int n=0; n<sourceFiles.Length; n++)
+ sourceFiles[n] = NormalizePath (sourceFiles[n]);
+
+ foreach (string s in sourceFiles) {
+ List<TypeMirror> typesList;
+
+ if (source_to_type.TryGetValue (s, out typesList)) {
+ typesList.Add (t);
+ } else {
+ typesList = new List<TypeMirror> ();
+ typesList.Add (t);
+ source_to_type[s] = typesList;
+ }
+ }
+
+ type_to_source [t] = sourceFiles;
+ }
+
+ static string[] GetParamTypes (MethodMirror method)
+ {
+ List<string> paramTypes = new List<string> ();
+
+ foreach (var param in method.GetParameters ())
+ paramTypes.Add (param.ParameterType.CSharpName);
+
+ return paramTypes.ToArray ();
+ }
+
+ string GetPrettyMethodName (MethodMirror method)
+ {
+ var name = new StringBuilder ();
+
+ name.Append (Adaptor.GetDisplayTypeName (method.ReturnType.FullName));
+ name.Append (" ");
+ name.Append (Adaptor.GetDisplayTypeName (method.DeclaringType.FullName));
+ name.Append (".");
+ name.Append (method.Name);
+
+ if (method.VirtualMachine.Version.AtLeast (2, 12)) {
+ if (method.IsGenericMethodDefinition || method.IsGenericMethod) {
+ name.Append ("<");
+ if (method.VirtualMachine.Version.AtLeast (2, 15)) {
+ var types = method.GetGenericArguments ();
+ for (int i = 0; i < types.Length; i++) {
+ if (i != 0)
+ name.Append (", ");
+ name.Append (Adaptor.GetDisplayTypeName (types[i].FullName));
+ }
+ }
+ name.Append (">");
+ }
+ }
+
+ name.Append (" (");
+ var @params = method.GetParameters ();
+ for (int i = 0; i < @params.Length; i++) {
+ if (i != 0)
+ name.Append (", ");
+ if (@params[i].Attributes.HasFlag (ParameterAttributes.Out)) {
+ if (@params[i].Attributes.HasFlag (ParameterAttributes.In))
+ name.Append ("ref ");
+ else
+ name.Append ("out ");
+ }
+ name.Append (Adaptor.GetDisplayTypeName (@params[i].ParameterType.FullName));
+ name.Append (" ");
+ name.Append (@params[i].Name);
+ }
+ name.Append (")");
+
+ return name.ToString ();
+ }
+
+ void ResolveBreakpoints (TypeMirror type)
+ {
+ var resolved = new List<BreakInfo> ();
+ Location loc;
+
+ ProcessType (type);
+
+ // First, resolve FunctionBreakpoints
+ foreach (var bi in pending_bes.Where (b => b.BreakEvent is FunctionBreakpoint)) {
+ if (CheckTypeName (type, bi.TypeName)) {
+ var bp = (FunctionBreakpoint) bi.BreakEvent;
+ string methodName = bp.FunctionName.Substring (bi.TypeName.Length + 1);
+
+ foreach (var method in type.GetMethodsByNameFlags (methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, false)) {
+ if (!CheckMethodParams (method, bp.ParamTypes))
+ continue;
+
+ loc = GetLocFromMethod (method);
+ if (loc != null) {
+ string paramList = "(" + string.Join (", ", bp.ParamTypes ?? GetParamTypes (method)) + ")";
+ OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint for '{0}{1}' to {2}:{3} [0x{4:x5}].\n",
+ bp.FunctionName, paramList, loc.SourceFile, loc.LineNumber, loc.ILOffset));
+
+ ResolvePendingBreakpoint (bi, loc);
+
+ // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
+ if (bp.ParamTypes != null && !type.IsGenericType && !IsGenericMethod (method))
+ resolved.Add (bi);
+ }
+ }
+ }
+ }
+
+ foreach (var be in resolved)
+ pending_bes.Remove (be);
+ resolved.Clear ();
+
+ // Now resolve normal Breakpoints
+ foreach (string s in type_to_source [type]) {
+ foreach (var bi in pending_bes.Where (b => (b.BreakEvent is Breakpoint) && !(b.BreakEvent is FunctionBreakpoint))) {
+ var bp = (Breakpoint) bi.BreakEvent;
+ if (PathsAreEqual (PathToFileName (bp.FileName), s)) {
+ bool insideLoadedRange;
+ bool genericMethod;
+
+ loc = GetLocFromType (type, s, bp.Line, bp.Column, out genericMethod, out insideLoadedRange);
+ if (loc != null) {
+ OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint at '{0}:{1},{2}' to {3} [0x{4:x5}].\n",
+ s, bp.Line, bp.Column, GetPrettyMethodName (loc.Method), loc.ILOffset));
+ ResolvePendingBreakpoint (bi, loc);
+
+ // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
+ if (!genericMethod && !type.IsGenericType)
+ resolved.Add (bi);
+ } else {
+ if (insideLoadedRange) {
+ bi.SetStatus (BreakEventStatus.Invalid, null);
+ }
+ }
+ }
+ }
+
+ foreach (var be in resolved)
+ pending_bes.Remove (be);
+ resolved.Clear ();
+ }
+
+ // Thirdly, resolve pending catchpoints
+ foreach (var bi in pending_bes.Where (b => b.BreakEvent is Catchpoint)) {
+ var cp = (Catchpoint) bi.BreakEvent;
+ if (cp.ExceptionName == type.FullName) {
+ ResolvePendingCatchpoint (bi, type);
+ resolved.Add (bi);
+ }
+ }
+
+ foreach (var be in resolved)
+ pending_bes.Remove (be);
+ }
+
+ internal static string NormalizePath (string path)
+ {
+ if (!IsWindows && path.StartsWith ("\\", StringComparison.Ordinal))
+ return path.Replace ('\\', '/');
+
+ return path;
+ }
+
+ string PathToFileName (string path)
+ {
+ if (useFullPaths)
+ return path;
+
+ return Path.GetFileName (path);
+ }
+
+ [DllImport ("libc")]
+ static extern IntPtr realpath (string path, IntPtr buffer);
+
+ static string ResolveFullPath (string path)
+ {
+ if (IsWindows)
+ return Path.GetFullPath (path);
+
+ const int PATHMAX = 4096 + 1;
+ IntPtr buffer = IntPtr.Zero;
+
+ try {
+ buffer = Marshal.AllocHGlobal (PATHMAX);
+ var result = realpath (path, buffer);
+ return result == IntPtr.Zero ? "" : Marshal.PtrToStringAuto (buffer);
+ } finally {
+ if (buffer != IntPtr.Zero)
+ Marshal.FreeHGlobal (buffer);
+ }
+ }
+
+ static bool PathsAreEqual (string p1, string p2)
+ {
+ if (string.IsNullOrWhiteSpace (p1) || string.IsNullOrWhiteSpace (p2))
+ return false;
+
+ if (PathComparer.Compare (p1, p2) == 0)
+ return true;
+
+ var rp1 = ResolveFullPath (p1);
+ var rp2 = ResolveFullPath (p2);
+
+ return PathComparer.Compare (rp1, rp2) == 0;
+ }
+
+ Location GetLocFromMethod (MethodMirror method)
+ {
+ // Return the location of the method.
+ return method.Locations.Count > 0 ? method.Locations[0] : null;
+ }
+
+ bool CheckBetterMatch (TypeMirror type, string file, int line, Location found)
+ {
+ if (type.Assembly == null)
+ return false;
+
+ string assemblyFileName;
+ if (!assemblyPathMap.TryGetValue (type.Assembly.GetName ().FullName, out assemblyFileName))
+ assemblyFileName = type.Assembly.Location;
+
+ if (assemblyFileName == null)
+ return false;
+
+ string mdbFileName = assemblyFileName + ".mdb";
+ int foundDelta = found.LineNumber - line;
+ MonoSymbolFile mdb;
+ int fileId = -1;
+
+ try {
+ if (!symbolFiles.TryGetValue (mdbFileName, out mdb)) {
+ if (!File.Exists (mdbFileName))
+ return false;
+
+ mdb = MonoSymbolFile.ReadSymbolFile (mdbFileName);
+ symbolFiles.Add (mdbFileName, mdb);
+ }
+
+ foreach (var src in mdb.Sources) {
+ if (src.FileName == file) {
+ fileId = src.Index;
+ break;
+ }
+ }
+
+ if (fileId == -1)
+ return false;
+
+ foreach (var method in mdb.Methods) {
+ var table = method.GetLineNumberTable ();
+ foreach (var entry in table.LineNumbers) {
+ if (entry.File != fileId)
+ continue;
+
+ if (entry.Row >= line && (entry.Row - line) < foundDelta)
+ return true;
+ }
+ }
+ } catch {
+ }
+
+ return false;
+ }
+
+ Location GetLocFromType (TypeMirror type, string file, int line, int column, out bool genericMethod, out bool insideTypeRange)
+ {
+ Location target_loc = null;
+ bool fuzzy = true;
+
+ insideTypeRange = false;
+ genericMethod = false;
+
+ //Console.WriteLine ("Trying to resolve {0}:{1},{2} in type {3}", file, line, column, type.Name);
+ foreach (MethodMirror method in type.GetMethods ()) {
+ List<Location> locations = new List<Location> ();
+ int rangeFirstLine = int.MaxValue;
+ int rangeLastLine = -1;
+
+ foreach (Location location in method.Locations) {
+ string srcFile = location.SourceFile;
+
+ //Console.WriteLine ("\tExamining {0}:{1}...", srcFile, location.LineNumber);
+
+ if (srcFile != null && PathsAreEqual (PathToFileName (NormalizePath (srcFile)), file)) {
+ if (location.LineNumber < rangeFirstLine)
+ rangeFirstLine = location.LineNumber;
+
+ if (location.LineNumber > rangeLastLine)
+ rangeLastLine = location.LineNumber;
+
+ if (line >= rangeFirstLine && line <= rangeLastLine)
+ insideTypeRange = true;
+
+ if (location.LineNumber >= line && line >= rangeFirstLine) {
+ if (target_loc != null) {
+ if (location.LineNumber > line) {
+ if (target_loc.LineNumber - line > location.LineNumber - line) {
+ // Grab the location closest to the requested line
+ //Console.WriteLine ("\t\tLocation is closest match. (ILOffset = 0x{0:x5})", location.ILOffset);
+ locations.Clear ();
+ locations.Add (location);
+ target_loc = location;
+ }
+ } else if (target_loc.LineNumber != line) {
+ // Previous match was a fuzzy match, but now we've found an exact line match
+ //Console.WriteLine ("\t\tLocation is exact line match. (ILOffset = 0x{0:x5})", location.ILOffset);
+ locations.Clear ();
+ locations.Add (location);
+ target_loc = location;
+ fuzzy = false;
+ } else {
+ // Line number matches exactly, use the location with the lowest ILOffset
+ if (location.ILOffset < target_loc.ILOffset)
+ target_loc = location;
+
+ locations.Add (location);
+ fuzzy = false;
+ }
+ } else {
+ //Console.WriteLine ("\t\tLocation is first possible match. (ILOffset = 0x{0:x5})", location.ILOffset);
+ fuzzy = location.LineNumber != line;
+ locations.Add (location);
+ target_loc = location;
+ }
+ }
+ } else {
+ rangeFirstLine = int.MaxValue;
+ rangeLastLine = -1;
+ }
+ }
+
+ if (target_loc != null) {
+ genericMethod = IsGenericMethod (method);
+
+ // If we got a fuzzy match, then we need to make sure that there isn't a better
+ // match in another method (e.g. code might have been extracted out into another
+ // method by the compiler.
+ if (!fuzzy) {
+ // Exact line match... now find the best column match.
+ locations.Sort (new LocationComparer ());
+
+ // Find the closest-matching location based on column.
+ target_loc = locations[0];
+ for (int i = 1; i < locations.Count; i++) {
+ if (locations[i].ColumnNumber > column)
+ break;
+
+ // if the column numbers match, then target_loc should have the lower ILOffset (which we want)
+ if (target_loc.ColumnNumber == locations[i].ColumnNumber)
+ continue;
+
+ target_loc = locations[i];
+ }
+
+ return target_loc;
+ }
+ }
+ }
+
+ if (target_loc != null && fuzzy && CheckBetterMatch (type, file, line, target_loc)) {
+ insideTypeRange = false;
+ return null;
+ }
+
+ return target_loc;
+ }
+
+ void ResolvePendingBreakpoint (BreakInfo bi, Location l)
+ {
+ bi.Location = l;
+ InsertBreakpoint ((Breakpoint) bi.BreakEvent, bi);
+ bi.SetStatus (BreakEventStatus.Bound, null);
+ }
+
+ void ResolvePendingCatchpoint (BreakInfo bi, TypeMirror type)
+ {
+ InsertCatchpoint ((Catchpoint) bi.BreakEvent, bi, type);
+ bi.SetStatus (BreakEventStatus.Bound, null);
+ }
+
+ bool UpdateAssemblyFilters (AssemblyMirror asm)
+ {
+ var name = asm.GetName ().FullName;
+ bool found = false;
+ if (userAssemblyNames != null) {
+ //HACK: not sure how else to handle xsp-compiled pages
+ if (name.StartsWith ("App_", StringComparison.Ordinal)) {
+ found = true;
+ } else {
+ foreach (var n in userAssemblyNames) {
+ if (n == name) {
+ found = true;
+ }
+ }
+ }
+ }
+
+ if (found) {
+ assemblyFilters.Add (asm);
+ return true;
+ }
+
+ return false;
+ }
+
+ internal void WriteDebuggerOutput (bool isError, string msg)
+ {
+ OnDebuggerOutput (isError, msg);
+ }
+
+ protected override void OnSetActiveThread (long processId, long threadId)
+ {
+ }
+
+ protected override void OnStepInstruction ()
+ {
+ Step (StepDepth.Into, StepSize.Min);
+ }
+
+ protected override void OnStepLine ()
+ {
+ Step (StepDepth.Into, StepSize.Line);
+ }
+
+ protected override void OnStop ()
+ {
+ vm.Suspend ();
+
+ //emit a stop event at the current position of the most recent thread
+ //we use "getprocesses" instead of "ongetprocesses" because it attaches the process to the session
+ //using private Mono.Debugging API, so our thread/backtrace calls will cache stuff that will get used later
+ var process = GetProcesses () [0];
+ EnsureRecentThreadIsValid (process);
+ current_thread = recent_thread;
+ OnTargetEvent (new TargetEventArgs (TargetEventType.TargetStopped) {
+ Process = process,
+ Thread = GetThread (process, recent_thread),
+ Backtrace = GetThreadBacktrace (recent_thread)});
+ }
+
+ void EnsureRecentThreadIsValid (ProcessInfo process)
+ {
+ var infos = process.GetThreads ();
+
+ if (ThreadIsAlive (recent_thread) && HasUserFrame (GetId (recent_thread), infos))
+ return;
+
+ var threads = vm.GetThreads ();
+ foreach (var thread in threads) {
+ if (ThreadIsAlive (thread) && HasUserFrame (GetId (thread), infos)) {
+ recent_thread = thread;
+ return;
+ }
+ }
+ recent_thread = threads[0];
+ }
+
+ long GetId (ThreadMirror thread)
+ {
+ long id;
+ if (!localThreadIds.TryGetValue (thread.ThreadId, out id)) {
+ id = localThreadIds.Count + 1;
+ localThreadIds [thread.ThreadId] = id;
+ }
+ return id;
+ }
+
+ static bool ThreadIsAlive (ThreadMirror thread)
+ {
+ if (thread == null)
+ return false;
+ var state = thread.ThreadState;
+ return state != ThreadState.Stopped && state != ThreadState.Aborted;
+ }
+
+ //we use the Mono.Debugging classes because they are cached
+ bool HasUserFrame (long tid, ThreadInfo[] infos)
+ {
+ foreach (var t in infos) {
+ if (t.Id != tid)
+ continue;
+ var bt = t.Backtrace;
+ for (int i = 0; i < bt.FrameCount; i++) {
+ var frame = bt.GetFrame (i);
+ if (frame != null && !frame.IsExternalCode)
+ return true;
+ }
+ return false;
+ }
+ return false;
+ }
+
+ public bool IsExternalCode (Mono.Debugger.Soft.StackFrame frame)
+ {
+ return frame.Method == null || string.IsNullOrEmpty (frame.FileName)
+ || (assemblyFilters != null && !assemblyFilters.Contains (frame.Method.DeclaringType.Assembly));
+ }
+
+ public bool IsExternalCode (TypeMirror type)
+ {
+ return assemblyFilters != null && !assemblyFilters.Contains (type.Assembly);
+ }
+
+ protected override AssemblyLine[] OnDisassembleFile (string file)
+ {
+ List<TypeMirror> types;
+ if (!source_to_type.TryGetValue (file, out types))
+ return new AssemblyLine [0];
+
+ var lines = new List<AssemblyLine> ();
+ foreach (TypeMirror type in types) {
+ foreach (MethodMirror met in type.GetMethods ()) {
+ string srcFile = met.SourceFile != null ? NormalizePath (met.SourceFile) : null;
+
+ if (srcFile == null || !PathsAreEqual (srcFile, file))
+ continue;
+
+ var body = met.GetMethodBody ();
+ int lastLine = -1;
+ int firstPos = lines.Count;
+ string addrSpace = met.FullName;
+
+ foreach (var ins in body.Instructions) {
+ Location loc = met.LocationAtILOffset (ins.Offset);
+ if (loc != null && lastLine == -1) {
+ lastLine = loc.LineNumber;
+ for (int n=firstPos; n<lines.Count; n++) {
+ AssemblyLine old = lines [n];
+ lines [n] = new AssemblyLine (old.Address, old.AddressSpace, old.Code, loc.LineNumber);
+ }
+ }
+ lines.Add (new AssemblyLine (ins.Offset, addrSpace, Disassemble (ins), loc != null ? loc.LineNumber : lastLine));
+ }
+ }
+ }
+ lines.Sort (delegate (AssemblyLine a1, AssemblyLine a2) {
+ int res = a1.SourceLine.CompareTo (a2.SourceLine);
+ if (res != 0)
+ return res;
+
+ return a1.Address.CompareTo (a2.Address);
+ });
+ return lines.ToArray ();
+ }
+
+ public AssemblyLine[] Disassemble (Mono.Debugger.Soft.StackFrame frame, int firstLine, int count)
+ {
+ MethodBodyMirror body = frame.Method.GetMethodBody ();
+ var instructions = body.Instructions;
+ ILInstruction current = null;
+ foreach (var ins in instructions) {
+ if (ins.Offset >= frame.ILOffset) {
+ current = ins;
+ break;
+ }
+ }
+ if (current == null)
+ return new AssemblyLine [0];
+
+ var result = new List<AssemblyLine> ();
+
+ int pos = firstLine;
+
+ while (firstLine < 0 && count > 0) {
+ if (current.Previous == null) {
+// result.Add (new AssemblyLine (99999, "<" + (pos++) + ">"));
+ result.Add (AssemblyLine.OutOfRange);
+ count--;
+ firstLine++;
+ } else {
+ current = current.Previous;
+ firstLine++;
+ }
+ }
+
+ while (current != null && firstLine > 0) {
+ current = current.Next;
+ firstLine--;
+ }
+
+ while (count > 0) {
+ if (current != null) {
+ Location loc = frame.Method.LocationAtILOffset (current.Offset);
+ result.Add (new AssemblyLine (current.Offset, frame.Method.FullName, Disassemble (current), loc != null ? loc.LineNumber : -1));
+ current = current.Next;
+ pos++;
+ } else
+ result.Add (AssemblyLine.OutOfRange);
+// result.Add (new AssemblyLine (99999, "<" + (pos++) + ">"));
+ count--;
+ }
+ return result.ToArray ();
+ }
+
+ static string EscapeString (string text)
+ {
+ StringBuilder sb = new StringBuilder ();
+
+ sb.Append ('"');
+ for (int i = 0; i < text.Length; i++) {
+ char c = text[i];
+ string txt;
+ switch (c) {
+ case '"': txt = "\\\""; break;
+ case '\0': txt = @"\0"; break;
+ case '\\': txt = @"\\"; break;
+ case '\a': txt = @"\a"; break;
+ case '\b': txt = @"\b"; break;
+ case '\f': txt = @"\f"; break;
+ case '\v': txt = @"\v"; break;
+ case '\n': txt = @"\n"; break;
+ case '\r': txt = @"\r"; break;
+ case '\t': txt = @"\t"; break;
+ default:
+ if (char.GetUnicodeCategory (c) == UnicodeCategory.OtherNotAssigned) {
+ sb.AppendFormat ("\\u{0:X4}", c);
+ } else {
+ sb.Append (c);
+ }
+ continue;
+ }
+ sb.Append (txt);
+ }
+ sb.Append ('"');
+
+ return sb.ToString ();
+ }
+
+ string Disassemble (ILInstruction ins)
+ {
+ string oper;
+ if (ins.Operand is MethodMirror)
+ oper = ((MethodMirror)ins.Operand).FullName;
+ else if (ins.Operand is TypeMirror)
+ oper = ((TypeMirror)ins.Operand).FullName;
+ else if (ins.Operand is ILInstruction)
+ oper = ((ILInstruction)ins.Operand).Offset.ToString ("x8");
+ else if (ins.Operand is string)
+ oper = EscapeString ((string) ins.Operand);
+ else if (ins.Operand == null)
+ oper = string.Empty;
+ else
+ oper = ins.Operand.ToString ();
+
+ return ins.OpCode + " " + oper;
+ }
+
+ readonly static bool IsWindows;
+ readonly static bool IsMac;
+ readonly static StringComparer PathComparer;
+
+ static bool IgnoreFilenameCase {
+ get {
+ return IsMac || IsWindows;
+ }
+ }
+
+ static SoftDebuggerSession ()
+ {
+ IsWindows = Path.DirectorySeparatorChar == '\\';
+ IsMac = !IsWindows && IsRunningOnMac();
+ PathComparer = (IgnoreFilenameCase)? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal;
+ ThreadMirror.NativeTransitions = true;
+ }
+
+ //From Managed.Windows.Forms/XplatUI
+ static bool IsRunningOnMac ()
+ {
+ IntPtr buf = IntPtr.Zero;
+ try {
+ buf = Marshal.AllocHGlobal (8192);
+ // This is a hacktastic way of getting sysname from uname ()
+ if (uname (buf) == 0) {
+ string os = Marshal.PtrToStringAnsi (buf);
+ if (os == "Darwin")
+ return true;
+ }
+ } catch {
+ } finally {
+ if (buf != IntPtr.Zero)
+ Marshal.FreeHGlobal (buf);
+ }
+ return false;
+ }
+
+ [System.Runtime.InteropServices.DllImport ("libc")]
+ static extern int uname (IntPtr buf);
+ }
+
+ class LocationComparer : IComparer<Location>
+ {
+ public int Compare (Location loc0, Location loc1)
+ {
+ if (loc0.LineNumber < loc1.LineNumber)
+ return -1;
+ if (loc0.LineNumber > loc1.LineNumber)
+ return 1;
+
+ if (loc0.ColumnNumber < loc1.ColumnNumber)
+ return -1;
+ if (loc0.ColumnNumber > loc1.ColumnNumber)
+ return 1;
+
+ return loc0.ILOffset - loc1.ILOffset;
+ }
+ }
+
+ class BreakInfo: BreakEventInfo
+ {
+ public Location Location;
+ public List<EventRequest> Requests = new List<EventRequest> ();
+ public string LastConditionValue;
+ public string FileName;
+ public string TypeName;
+ }
+
+ class DisconnectedException: DebuggerException
+ {
+ public DisconnectedException (Exception ex):
+ base ("The connection with the debugger has been lost. The target application may have exited.", ex)
+ {
+ }
+ }
+
+ class DebugSocketException: DebuggerException
+ {
+ public DebugSocketException (Exception ex):
+ base ("Could not open port for debugger. Another process may be using the port.", ex)
+ {
+ }
+ }
+
+ class ConnectionException : DebuggerException
+ {
+ public ConnectionException (Exception ex):
+ base ("Could not connect to the debugger.", ex)
+ {
+ }
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs
new file mode 100644
index 0000000..d51e603
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs
@@ -0,0 +1,203 @@
+//
+// SoftDebuggerStartInfo.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
+//
+// 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 Mono.Debugging.Client;
+using System.Collections.Generic;
+using System.Reflection;
+using System.IO;
+using System.Net;
+using Mono.Debugger.Soft;
+
+namespace Mono.Debugging.Soft
+{
+ public class SoftDebuggerStartInfo : DebuggerStartInfo
+ {
+ public SoftDebuggerStartInfo (string monoRuntimePrefix, Dictionary<string,string> monoRuntimeEnvironmentVariables)
+ : this (new SoftDebuggerLaunchArgs (monoRuntimePrefix, monoRuntimeEnvironmentVariables))
+ {
+ }
+
+ public SoftDebuggerStartInfo (SoftDebuggerStartArgs startArgs)
+ {
+ if (startArgs == null)
+ throw new ArgumentNullException ("startArgs");
+ this.StartArgs = startArgs;
+ }
+
+ /// <summary>
+ /// Names of assemblies that are user code.
+ /// </summary>
+ public List<AssemblyName> UserAssemblyNames { get; set; }
+
+ /// <summary>
+ /// A mapping of AssemblyNames to their paths.
+ /// </summary>
+ public Dictionary<string, string> AssemblyPathMap { get; set; }
+
+ /// <summary>
+ /// The session will output this to the debug log as soon as it starts. It can be used to log warnings from
+ /// creating the SoftDebuggerStartInfo
+ /// </summary>
+ public string LogMessage { get; set; }
+
+ /// <summary>
+ /// Args for starting the debugger connection.
+ /// </summary>
+ public SoftDebuggerStartArgs StartArgs { get; set; }
+ }
+
+ public interface ISoftDebuggerConnectionProvider
+ {
+ IAsyncResult BeginConnect (DebuggerStartInfo dsi, AsyncCallback callback);
+ void EndConnect (IAsyncResult result, out VirtualMachine vm, out string appName);
+ void CancelConnect (IAsyncResult result);
+ bool ShouldRetryConnection (Exception ex);
+ }
+
+ public abstract class SoftDebuggerStartArgs
+ {
+ public SoftDebuggerStartArgs ()
+ {
+ MaxConnectionAttempts = 1;
+ TimeBetweenConnectionAttempts = 500;
+ }
+
+ public abstract ISoftDebuggerConnectionProvider ConnectionProvider { get; }
+
+ /// <summary>
+ /// Maximum number of connection attempts. Zero or less means infinite attempts. Default is 1.
+ /// </summary>
+ public int MaxConnectionAttempts { get; set; }
+
+ /// <summary>
+ /// The time between connection attempts, in milliseconds. Default is 500.
+ /// </summary>
+ public int TimeBetweenConnectionAttempts { get; set; }
+ }
+
+ public abstract class SoftDebuggerRemoteArgs : SoftDebuggerStartArgs
+ {
+ public SoftDebuggerRemoteArgs (string appName, IPAddress address, int debugPort, int outputPort)
+ {
+ if (address == null)
+ throw new ArgumentNullException ("address");
+ if (debugPort < 0)
+ throw new ArgumentException ("Debug port cannot be less than zero", "debugPort");
+
+ this.AppName = appName;
+ this.Address = address;
+ this.DebugPort = debugPort;
+ this.OutputPort = outputPort;
+ }
+
+ /// <summary>
+ /// The IP address for the connection.
+ /// </summary>
+ public IPAddress Address { get; private set; }
+
+ /// <summary>
+ /// Port for the debugger connection. Zero means random port.
+ /// </summary>
+ public int DebugPort { get; private set; }
+
+ /// <summary>
+ /// Port for the console connection. Zero means random port, less than zero means that output is not redirected.
+ /// </summary>
+ public int OutputPort { get; private set; }
+
+ /// <summary>
+ /// Application name that will be shown in the debugger.
+ /// </summary>
+ public string AppName { get; private set; }
+
+ public bool RedirectOutput { get { return OutputPort >= 0; } }
+ }
+
+ /// <summary>
+ /// Args for the debugger to listen for an incoming connection from a debuggee.
+ /// </summary>
+ public sealed class SoftDebuggerListenArgs : SoftDebuggerRemoteArgs
+ {
+ public SoftDebuggerListenArgs (string appName, IPAddress address, int debugPort)
+ : this (appName, address, debugPort, -1) {}
+
+ public SoftDebuggerListenArgs (string appName, IPAddress address, int debugPort, int outputPort)
+ : base (appName, address, debugPort, outputPort)
+ {
+ }
+
+ public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
+ }
+
+ /// <summary>
+ /// Args for the debugger to connect to target that is listening.
+ /// </summary>
+ public sealed class SoftDebuggerConnectArgs : SoftDebuggerRemoteArgs
+ {
+ public SoftDebuggerConnectArgs (string appName, IPAddress address, int debugPort)
+ : this (appName, address, debugPort, -1) {}
+
+ public SoftDebuggerConnectArgs (string appName, IPAddress address, int debugPort, int outputPort)
+ : base (appName, address, debugPort, outputPort)
+ {
+ if (debugPort == 0)
+ throw new ArgumentException ("Debug port cannot be zero when connecting", "debugPort");
+ if (outputPort == 0)
+ throw new ArgumentException ("Output port cannot be zero when connecting", "outputPort");
+ }
+
+ public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
+ }
+
+ /// <summary>
+ /// Options for the debugger to start a process directly.
+ /// </summary>
+ public sealed class SoftDebuggerLaunchArgs : SoftDebuggerStartArgs
+ {
+ public SoftDebuggerLaunchArgs (string monoRuntimePrefix, Dictionary<string,string> monoRuntimeEnvironmentVariables)
+ {
+ this.MonoRuntimePrefix = monoRuntimePrefix;
+ this.MonoRuntimeEnvironmentVariables = monoRuntimeEnvironmentVariables;
+ }
+
+ /// <summary>
+ /// Prefix into which the target Mono runtime is installed.
+ /// </summary>
+ public string MonoRuntimePrefix { get; private set; }
+
+ /// <summary>
+ /// Environment variables for the Mono runtime.
+ /// </summary>
+ public Dictionary<string,string> MonoRuntimeEnvironmentVariables { get; private set; }
+
+ /// <summary>
+ /// Launcher for the external console. May be null if the app does not run on an external console.
+ /// </summary>
+ public Mono.Debugger.Soft.LaunchOptions.TargetProcessLauncher ExternalConsoleLauncher { get; set; }
+
+ public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
+ }
+}
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftEvaluationContext.cs b/external/debugger-libs/Mono.Debugging.Soft/SoftEvaluationContext.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftEvaluationContext.cs
rename to external/debugger-libs/Mono.Debugging.Soft/SoftEvaluationContext.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/StringAdaptor.cs b/external/debugger-libs/Mono.Debugging.Soft/StringAdaptor.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/StringAdaptor.cs
rename to external/debugger-libs/Mono.Debugging.Soft/StringAdaptor.cs
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs b/external/debugger-libs/Mono.Debugging.Soft/VariableValueReference.cs
similarity index 100%
rename from src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs
rename to external/debugger-libs/Mono.Debugging.Soft/VariableValueReference.cs
diff --git a/src/core/Mono.Debugging/ChangeLog b/external/debugger-libs/Mono.Debugging/ChangeLog
similarity index 100%
rename from src/core/Mono.Debugging/ChangeLog
rename to external/debugger-libs/Mono.Debugging/ChangeLog
diff --git a/src/core/Mono.Debugging/Makefile.am b/external/debugger-libs/Mono.Debugging/Makefile.am
similarity index 100%
rename from src/core/Mono.Debugging/Makefile.am
rename to external/debugger-libs/Mono.Debugging/Makefile.am
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/DissassemblyBuffer.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/DissassemblyBuffer.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Backend/DissassemblyBuffer.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/DissassemblyBuffer.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/EvaluationResult.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/EvaluationResult.cs
new file mode 100644
index 0000000..4ec7746
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/EvaluationResult.cs
@@ -0,0 +1,55 @@
+//
+// EvaluationResult.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+
+ [Serializable]
+ public class EvaluationResult
+ {
+ public EvaluationResult (string value)
+ {
+ Value = value;
+ }
+
+ public EvaluationResult (string value, string displayValue)
+ {
+ Value = value;
+ DisplayValue = displayValue;
+ }
+
+ public string Value { get; private set; }
+ public string DisplayValue { get; private set; }
+
+ public override string ToString ()
+ {
+ return Value;
+ }
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs
new file mode 100644
index 0000000..7ace999
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs
@@ -0,0 +1,20 @@
+
+using Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IBacktrace: IDebuggerBackendObject
+ {
+ int FrameCount { get; }
+ StackFrame[] GetStackFrames (int firstIndex, int lastIndex);
+ ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options);
+ ObjectValue[] GetParameters (int frameIndex, EvaluationOptions options);
+ ObjectValue GetThisReference (int frameIndex, EvaluationOptions options);
+ ExceptionInfo GetException (int frameIndex, EvaluationOptions options);
+ ObjectValue[] GetAllLocals (int frameIndex, EvaluationOptions options);
+ ObjectValue[] GetExpressionValues (int frameIndex, string[] expressions, EvaluationOptions options);
+ CompletionData GetExpressionCompletionData (int frameIndex, string exp);
+ AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count);
+ ValidationResult ValidateExpression (int frameIndex, string expression, EvaluationOptions options);
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IDebuggerBackendObject.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IDebuggerBackendObject.cs
new file mode 100644
index 0000000..2fcfc84
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IDebuggerBackendObject.cs
@@ -0,0 +1,34 @@
+//
+// IDebuggerBackendObject.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IDebuggerBackendObject
+ {
+ }
+}
+
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/IDebuggerSessionFrontend.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IDebuggerSessionFrontend.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Backend/IDebuggerSessionFrontend.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IDebuggerSessionFrontend.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs
new file mode 100644
index 0000000..c9018e5
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs
@@ -0,0 +1,43 @@
+// IObjectValueSource.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IObjectValueSource: IDebuggerBackendObject
+ {
+ ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options);
+ EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options);
+ ObjectValue GetValue (ObjectPath path, EvaluationOptions options);
+
+ object GetRawValue (ObjectPath path, EvaluationOptions options);
+ void SetRawValue (ObjectPath path, object value, EvaluationOptions options);
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdateCallback.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdateCallback.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdateCallback.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdateCallback.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs
new file mode 100644
index 0000000..5bc67dd
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs
@@ -0,0 +1,37 @@
+// IObjectValueUpdater.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IObjectValueUpdater: IDebuggerBackendObject
+ {
+ void RegisterUpdateCallbacks (UpdateCallback[] callbacks);
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValue.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValue.cs
new file mode 100644
index 0000000..7391e97
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValue.cs
@@ -0,0 +1,40 @@
+//
+// IRawValue.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+
+ public interface IRawValue: IDebuggerBackendObject
+ {
+ object CallMethod (string name, object[] parameters, EvaluationOptions options);
+ object GetMemberValue (string name, EvaluationOptions options);
+ void SetMemberValue (string name, object value, EvaluationOptions options);
+ }
+
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueArray.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueArray.cs
new file mode 100644
index 0000000..9f51c7e
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueArray.cs
@@ -0,0 +1,40 @@
+//
+// IRawValueArray.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IRawValueArray: IDebuggerBackendObject
+ {
+ object GetValue (int[] index);
+ void SetValue (int[] index, object value);
+ int[] Dimensions { get; }
+ Array ToArray ();
+ }
+
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueString.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueString.cs
new file mode 100644
index 0000000..f1b77fe
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/IRawValueString.cs
@@ -0,0 +1,39 @@
+//
+// IRawValueString.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Mono.Debugging.Client;
+
+namespace Mono.Debugging.Backend
+{
+ public interface IRawValueString: IDebuggerBackendObject
+ {
+ string Substring (int index, int length);
+ string Value { get; }
+ int Length { get; }
+ }
+
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/UpdateCallback.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/UpdateCallback.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Backend/UpdateCallback.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Backend/UpdateCallback.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/AssemblyLine.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/AssemblyLine.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/AssemblyLine.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/AssemblyLine.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs
new file mode 100644
index 0000000..72ebf82
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using Mono.Debugging.Backend;
+
+namespace Mono.Debugging.Client
+{
+ [Serializable]
+ public class Backtrace
+ {
+ IBacktrace serverBacktrace;
+ int count;
+
+ [NonSerialized]
+ DebuggerSession session;
+
+ List<StackFrame> frames;
+
+ public Backtrace (IBacktrace serverBacktrace)
+ {
+ this.serverBacktrace = serverBacktrace;
+
+ count = serverBacktrace.FrameCount;
+
+ // Get some initial frames
+ if (count > 0)
+ GetFrame (0);
+ }
+
+ internal void Attach (DebuggerSession session)
+ {
+ this.session = session;
+ serverBacktrace = session.WrapDebuggerObject (serverBacktrace);
+ if (frames != null) {
+ foreach (StackFrame f in frames) {
+ f.Attach (session);
+ f.SourceBacktrace = serverBacktrace;
+ }
+ }
+ }
+
+ public int FrameCount
+ {
+ get { return count; }
+ }
+
+ public StackFrame GetFrame (int n)
+ {
+ if (frames == null)
+ frames = new List<StackFrame>();
+
+ if (n >= frames.Count) {
+ StackFrame[] newSet = serverBacktrace.GetStackFrames(frames.Count, n + 20);
+ foreach (StackFrame sf in newSet) {
+ sf.SourceBacktrace = serverBacktrace;
+ sf.Index = frames.Count;
+ frames.Add (sf);
+ sf.Attach (session);
+ }
+ }
+
+ if (frames.Count > 0)
+ return frames[System.Math.Min (System.Math.Max (0, n), frames.Count - 1)];
+
+ return null;
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventArgs.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs
new file mode 100644
index 0000000..9d29f92
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs
@@ -0,0 +1,164 @@
+//
+// BreakEventInfo.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
+//
+// 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;
+
+namespace Mono.Debugging.Client
+{
+ /// <summary>
+ /// This class can be used to manage and get information about a breakpoint
+ /// at debug-time. It is intended to be used by DebuggerSession subclasses.
+ /// </summary>
+ public class BreakEventInfo
+ {
+ DebuggerSession session;
+ int adjustedColumn = -1;
+ int adjustedLine = -1;
+
+ /// <summary>
+ /// Gets or sets the implementation specific handle of the breakpoint
+ /// </summary>
+ public object Handle { get; set; }
+
+ /// <summary>
+ /// Break event that this instance represents
+ /// </summary>
+ public BreakEvent BreakEvent { get; internal set; }
+
+ /// <summary>
+ /// Gets the status of the break event
+ /// </summary>
+ public BreakEventStatus Status { get; private set; }
+
+ /// <summary>
+ /// Gets a description of the status
+ /// </summary>
+ public string StatusMessage { get; private set; }
+
+ internal void AttachSession (DebuggerSession s, BreakEvent ev)
+ {
+ session = s;
+ BreakEvent = ev;
+ session.NotifyBreakEventStatusChanged (BreakEvent);
+ if (adjustedLine != -1 || adjustedColumn != -1)
+ session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, adjustedLine, adjustedColumn);
+ }
+
+ /// <summary>
+ /// Adjusts the location of a breakpoint
+ /// </summary>
+ /// <param name='newLine'>
+ /// New line.
+ /// </param>
+ /// <remarks>
+ /// This method can be used to temporarily change source code line of the breakpoint.
+ /// This is useful, for example, when two adjacent lines are mapped to a single
+ /// native offset. If the breakpoint is set to the first of those lines, the debugger
+ /// might end stopping in the second line, because it has the same native offset.
+ /// To avoid this confusion situation, the debugger implementation may decide to
+ /// adjust the position of the breakpoint, and move it to the second line.
+ /// This line adjustment has effect only during the debug session, and is automatically
+ /// reset when it terminates.
+ /// </remarks>
+ public void AdjustBreakpointLocation (int newLine, int newColumn)
+ {
+ if (session != null) {
+ session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, newLine, newColumn);
+ } else {
+ adjustedColumn = newColumn;
+ adjustedLine = newLine;
+ }
+ }
+
+ /// <summary>
+ /// Increments the hit count.
+ /// </summary>
+ /// <returns><c>true</c> if the break event should trigger, or <c>false</c> otherwise.</returns>
+ public bool HitCountReached
+ {
+ get {
+ switch (BreakEvent.HitCountMode) {
+ case HitCountMode.LessThan:
+ return BreakEvent.CurrentHitCount < BreakEvent.HitCount;
+ case HitCountMode.LessThanOrEqualTo:
+ return BreakEvent.CurrentHitCount <= BreakEvent.HitCount;
+ case HitCountMode.EqualTo:
+ return BreakEvent.CurrentHitCount == BreakEvent.HitCount;
+ case HitCountMode.GreaterThan:
+ return BreakEvent.CurrentHitCount > BreakEvent.HitCount;
+ case HitCountMode.GreaterThanOrEqualTo:
+ return BreakEvent.CurrentHitCount >= BreakEvent.HitCount;
+ case HitCountMode.MultipleOf:
+ return (BreakEvent.CurrentHitCount % BreakEvent.HitCount) == 0;
+ default:
+ return true;
+ }
+ }
+ }
+
+ public void IncrementHitCount ()
+ {
+ if (BreakEvent.HitCountMode != HitCountMode.None) {
+ BreakEvent.CurrentHitCount++;
+ BreakEvent.NotifyUpdate ();
+ }
+ }
+
+ [Obsolete ("Use IncrementHitCount() instead")]
+ public void UpdateHitCount (int count)
+ {
+ BreakEvent.CurrentHitCount = count;
+ BreakEvent.NotifyUpdate ();
+ }
+
+ public void SetStatus (BreakEventStatus s, string statusMessage)
+ {
+ if (s != Status) {
+ Status = s;
+ StatusMessage = statusMessage;
+ if (session != null)
+ session.NotifyBreakEventStatusChanged (BreakEvent);
+ }
+ }
+
+ public bool RunCustomBreakpointAction (string actionId)
+ {
+ BreakEventHitHandler h = session.CustomBreakEventHitHandler;
+ return h != null && h (actionId, BreakEvent);
+ }
+
+ public void UpdateLastTraceValue (string value)
+ {
+ BreakEvent.LastTraceValue = value;
+ BreakEvent.NotifyUpdate ();
+ if (value != null) {
+ if (session.BreakpointTraceHandler != null)
+ session.BreakpointTraceHandler (BreakEvent, value);
+ else
+ session.OnDebuggerOutput (false, value + "\n");
+ }
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventStatus.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventStatus.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventStatus.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakEventStatus.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
new file mode 100644
index 0000000..cffac99
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
@@ -0,0 +1,235 @@
+// Breakpoint.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// 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.Xml;
+
+namespace Mono.Debugging.Client
+{
+ [Serializable]
+ public class Breakpoint: BreakEvent
+ {
+ bool breakIfConditionChanges;
+ string conditionExpression;
+ string lastConditionValue;
+ int adjustedColumn = -1;
+ int adjustedLine = -1;
+ string fileName;
+ int column;
+ int line;
+
+ public Breakpoint (string fileName, int line, int column)
+ {
+ FileName = fileName;
+ Column = column;
+ Line = line;
+ }
+
+ public Breakpoint (string fileName, int line) : this (fileName, line, 1)
+ {
+ }
+
+ internal Breakpoint (XmlElement elem): base (elem)
+ {
+ string s = elem.GetAttribute ("file");
+ if (!string.IsNullOrEmpty (s))
+ fileName = s;
+
+ s = elem.GetAttribute ("line");
+ if (string.IsNullOrEmpty (s) || !int.TryParse (s, out line))
+ line = 1;
+
+ s = elem.GetAttribute ("column");
+ if (string.IsNullOrEmpty (s) || !int.TryParse (s, out column))
+ column = 1;
+
+ s = elem.GetAttribute ("conditionExpression");
+ if (!string.IsNullOrEmpty (s))
+ conditionExpression = s;
+
+ s = elem.GetAttribute ("breakIfConditionChanges");
+ if (!string.IsNullOrEmpty (s) && !bool.TryParse (s, out breakIfConditionChanges))
+ breakIfConditionChanges = false;
+ }
+
+ internal override XmlElement ToXml (XmlDocument doc)
+ {
+ XmlElement elem = base.ToXml (doc);
+
+ if (!string.IsNullOrEmpty (fileName))
+ elem.SetAttribute ("file", fileName);
+
+ elem.SetAttribute ("line", line.ToString ());
+ elem.SetAttribute ("column", column.ToString ());
+
+ if (!string.IsNullOrEmpty (conditionExpression)) {
+ elem.SetAttribute ("conditionExpression", conditionExpression);
+ if (breakIfConditionChanges)
+ elem.SetAttribute ("breakIfConditionChanges", "True");
+ }
+
+ return elem;
+ }
+
+ public string FileName {
+ get { return fileName; }
+ protected set { fileName = value; }
+ }
+
+ public int OriginalColumn {
+ get { return column; }
+ }
+
+ public int Column {
+ get { return adjustedColumn == -1 ? column : adjustedColumn; }
+ protected set { column = value; }
+ }
+
+ public int OriginalLine {
+ get { return line; }
+ }
+
+ public int Line {
+ get { return adjustedLine == -1 ? line : adjustedLine; }
+ protected set { line = value; }
+ }
+
+ public void SetColumn (int newColumn)
+ {
+ ResetAdjustedColumn ();
+ column = newColumn;
+ }
+
+ public void SetLine (int newLine)
+ {
+ ResetAdjustedLine ();
+ line = newLine;
+ }
+
+ internal void SetAdjustedColumn (int newColumn)
+ {
+ adjustedColumn = newColumn;
+ }
+
+ internal void SetAdjustedLine (int newLine)
+ {
+ adjustedLine = newLine;
+ }
+
+ // FIXME: make this private
+ internal void ResetAdjustedColumn ()
+ {
+ adjustedColumn = -1;
+ }
+
+ // FIXME: make this private
+ internal void ResetAdjustedLine ()
+ {
+ adjustedLine = -1;
+ }
+
+ public override bool Reset ()
+ {
+ bool changed = base.Reset () || HasAdjustedLine || HasAdjustedColumn;
+
+ lastConditionValue = null;
+ adjustedColumn = -1;
+ adjustedLine = -1;
+
+ return changed;
+ }
+
+ // FIXME: make this private
+ internal bool HasAdjustedColumn {
+ get { return adjustedColumn != -1; }
+ }
+
+ // FIXME: make this private
+ internal bool HasAdjustedLine {
+ get { return adjustedLine != -1; }
+ }
+
+ public string ConditionExpression {
+ get {
+ return conditionExpression;
+ }
+ set {
+ conditionExpression = value;
+ }
+ }
+
+ public string LastConditionValue {
+ get {
+ return lastConditionValue;
+ }
+ set {
+ lastConditionValue = value;
+ }
+ }
+
+ public bool BreakIfConditionChanges {
+ get {
+ return breakIfConditionChanges;
+ }
+ set {
+ breakIfConditionChanges = value;
+ }
+ }
+
+ public override void CopyFrom (BreakEvent ev)
+ {
+ base.CopyFrom (ev);
+
+ Breakpoint bp = (Breakpoint) ev;
+
+ breakIfConditionChanges = bp.breakIfConditionChanges;
+ conditionExpression = bp.conditionExpression;
+ fileName = bp.fileName;
+ column = bp.column;
+ line = bp.line;
+ }
+ }
+
+ public enum HitCountMode {
+ None,
+ LessThan,
+ LessThanOrEqualTo,
+ EqualTo,
+ GreaterThan,
+ GreaterThanOrEqualTo,
+ MultipleOf
+ }
+
+ public enum HitAction
+ {
+ Break,
+ PrintExpression,
+ CustomAction
+ }
+
+ public delegate bool BreakEventHitHandler (string actionId, BreakEvent be);
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakpointEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakpointEventArgs.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/Catchpoint.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Catchpoint.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/Catchpoint.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/Catchpoint.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/CatchpointEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/CatchpointEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/CatchpointEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/CatchpointEventArgs.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/CompletionData.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/CompletionData.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/CompletionData.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/CompletionData.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerException.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerException.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerException.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerException.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerFeatures.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerFeatures.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerFeatures.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerFeatures.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
new file mode 100644
index 0000000..d414af6
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
@@ -0,0 +1,1561 @@
+// DebuggerSession.cs
+//
+// Author:
+// Ankit Jain <jankit at novell.com>
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// 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 Mono.Debugging.Backend;
+using System.Diagnostics;
+using System.Threading;
+
+namespace Mono.Debugging.Client
+{
+ public delegate void TargetEventHandler (object sender, TargetEventArgs args);
+ public delegate void ProcessEventHandler(int process_id);
+ public delegate void ThreadEventHandler(int thread_id);
+ public delegate bool ExceptionHandler (Exception ex);
+ public delegate string TypeResolverHandler (string identifier, SourceLocation location);
+ public delegate void BreakpointTraceHandler (BreakEvent be, string trace);
+ public delegate IExpressionEvaluator GetExpressionEvaluatorHandler (string extension);
+ public delegate IConnectionDialog ConnectionDialogCreator ();
+
+ public abstract class DebuggerSession: IDisposable
+ {
+ InternalDebuggerSession frontend;
+ Dictionary<BreakEvent,BreakEventInfo> breakpoints = new Dictionary<BreakEvent,BreakEventInfo> ();
+ BreakpointStore breakpointStore;
+ OutputWriterDelegate outputWriter;
+ OutputWriterDelegate logWriter;
+ bool disposed;
+ bool attached;
+ bool ownedBreakpointStore;
+ object slock = new object ();
+ object olock = new object ();
+ ThreadInfo activeThread;
+ BreakEventHitHandler customBreakpointHitHandler;
+ ExceptionHandler exceptionHandler;
+ DebuggerSessionOptions options;
+ Dictionary<string,string> resolvedExpressionCache = new Dictionary<string, string> ();
+ bool adjustingBreakpoints;
+
+ ProcessInfo[] currentProcesses;
+
+ /// <summary>
+ /// Reports a debugger event
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetEvent;
+
+ /// <summary>
+ /// Raised when the debugger resumes execution after being stopped
+ /// </summary>
+ public event EventHandler TargetStarted;
+
+ /// <summary>
+ /// Raised when the underlying debugging engine has been initialized and it is ready to start execution.
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetReady;
+
+ /// <summary>
+ /// Raised when the debugging session is paused
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetStopped;
+
+ /// <summary>
+ /// Raised when the execution is interrupted by an external event
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetInterrupted;
+
+ /// <summary>
+ /// Raised when a breakpoint is hit
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetHitBreakpoint;
+
+ /// <summary>
+ /// Raised when the execution is interrupted due to receiving a signal
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetSignaled;
+
+ /// <summary>
+ /// Raised when the debugged process exits
+ /// </summary>
+ public event EventHandler TargetExited;
+
+ /// <summary>
+ /// Raised when an exception for which there is a catchpoint is thrown
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetExceptionThrown;
+
+ /// <summary>
+ /// Raised when an exception is unhandled
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetUnhandledException;
+
+ /// <summary>
+ /// Raised when a thread is started in the debugged process
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetThreadStarted;
+
+ /// <summary>
+ /// Raised when a thread is stopped in the debugged process
+ /// </summary>
+ public event EventHandler<TargetEventArgs> TargetThreadStopped;
+
+ /// <summary>
+ /// Raised when the 'busy state' of the debugger changes.
+ /// The debugger may switch to busy state if it is in the middle
+ /// of an expression evaluation which can't be aborted.
+ /// </summary>
+ public event EventHandler<BusyStateEventArgs> BusyStateChanged;
+
+ public DebuggerSession ()
+ {
+ UseOperationThread = true;
+ frontend = new InternalDebuggerSession (this);
+ }
+
+ /// <summary>
+ /// Releases all resource used by the <see cref="Mono.Debugging.Client.DebuggerSession"/> object.
+ /// </summary>
+ /// <remarks>
+ /// Call <see cref="Dispose"/> when you are finished using the <see cref="Mono.Debugging.Client.DebuggerSession"/>.
+ /// The <see cref="Dispose"/> method leaves the <see cref="Mono.Debugging.Client.DebuggerSession"/> in an unusable
+ /// state. After calling <see cref="Dispose"/>, you must release all references to the
+ /// <see cref="Mono.Debugging.Client.DebuggerSession"/> so the garbage collector can reclaim the memory that the
+ /// <see cref="Mono.Debugging.Client.DebuggerSession"/> was occupying.
+ /// </remarks>
+ public virtual void Dispose ()
+ {
+ Dispatch (delegate {
+ if (!disposed) {
+ disposed = true;
+ if (!ownedBreakpointStore)
+ Breakpoints = null;
+ }
+ });
+ }
+
+ /// <summary>
+ /// Gets or sets an exception handler to be invoked when an exception is raised by the debugger engine.
+ /// </summary>
+ /// <remarks>
+ /// Notice that this handler will be used to report exceptions in the debugger, not exceptions raised
+ /// in the debugged process.
+ /// </remarks>
+ public ExceptionHandler ExceptionHandler {
+ get { return exceptionHandler; }
+ set { exceptionHandler = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the connection dialog creator callback.
+ /// </summary>
+ public ConnectionDialogCreator ConnectionDialogCreator { get; set; }
+
+ /// <summary>
+ /// Gets or sets the breakpoint trace handler.
+ /// </summary>
+ /// <remarks>
+ /// This handler is invoked when the value of a tracepoint has to be printed
+ /// </remarks>
+ public BreakpointTraceHandler BreakpointTraceHandler { get; set; }
+
+ /// <summary>
+ /// Gets or sets the type resolver handler.
+ /// </summary>
+ /// <remarks>
+ /// This handler is invoked when the expression evaluator needs to resolve a type name.
+ /// </remarks>
+ public TypeResolverHandler TypeResolverHandler { get; set; }
+
+ /// <summary>
+ /// Gets or sets the an expression evaluator provider
+ /// </summary>
+ /// <remarks>
+ /// This handler is invoked when the debugger needs to get an evaluator for a specific type of file
+ /// </remarks>
+ public GetExpressionEvaluatorHandler GetExpressionEvaluator { get; set; }
+
+ /// <summary>
+ /// Gets or sets the custom break event hit handler.
+ /// </summary>
+ /// <remarks>
+ /// This handler is invoked when a custom breakpoint is hit to determine if the debug session should
+ /// continue or stop.
+ /// </remarks>
+ public BreakEventHitHandler CustomBreakEventHitHandler {
+ get {
+ return customBreakpointHitHandler;
+ }
+ set {
+ customBreakpointHitHandler = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the breakpoint store for the debugger session.
+ /// </summary>
+ public BreakpointStore Breakpoints {
+ get {
+ lock (slock) {
+ if (breakpointStore == null) {
+ Breakpoints = new BreakpointStore ();
+ ownedBreakpointStore = true;
+ }
+ return breakpointStore;
+ }
+ }
+ set {
+ lock (slock) {
+ if (breakpointStore != null) {
+ lock (breakpointStore) {
+ foreach (BreakEvent bp in breakpointStore) {
+ RemoveBreakEvent (bp);
+ NotifyBreakEventStatusChanged (bp);
+ }
+ }
+ breakpointStore.BreakEventAdded -= OnBreakpointAdded;
+ breakpointStore.BreakEventRemoved -= OnBreakpointRemoved;
+ breakpointStore.BreakEventModified -= OnBreakpointModified;
+ breakpointStore.BreakEventEnableStatusChanged -= OnBreakpointStatusChanged;
+ breakpointStore.CheckingReadOnly -= BreakpointStoreCheckingReadOnly;
+ breakpointStore.ResetAdjustedBreakpoints ();
+ }
+
+ breakpointStore = value;
+ ownedBreakpointStore = false;
+
+ if (breakpointStore != null) {
+ if (IsConnected) {
+ Dispatch (delegate {
+ lock (slock) {
+ if (IsConnected) {
+ lock (breakpointStore) {
+ foreach (BreakEvent bp in breakpointStore)
+ AddBreakEvent (bp);
+ }
+ }
+ }
+ });
+ }
+ breakpointStore.BreakEventAdded += OnBreakpointAdded;
+ breakpointStore.BreakEventRemoved += OnBreakpointRemoved;
+ breakpointStore.BreakEventModified += OnBreakpointModified;
+ breakpointStore.BreakEventEnableStatusChanged += OnBreakpointStatusChanged;
+ breakpointStore.CheckingReadOnly += BreakpointStoreCheckingReadOnly;
+ }
+ }
+ }
+ }
+
+ void Dispatch (Action action)
+ {
+ if (UseOperationThread) {
+ ThreadPool.QueueUserWorkItem (delegate {
+ lock (slock) {
+ action ();
+ }
+ });
+ } else {
+ lock (slock) {
+ action ();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Starts a debugging session
+ /// </summary>
+ /// <param name='startInfo'>
+ /// Startup information
+ /// </param>
+ /// <param name='options'>
+ /// Session options
+ /// </param>
+ /// <exception cref='ArgumentNullException'>
+ /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
+ /// </exception>
+ public void Run (DebuggerStartInfo startInfo, DebuggerSessionOptions options)
+ {
+ if (startInfo == null)
+ throw new ArgumentNullException ("startInfo");
+ if (options == null)
+ throw new ArgumentNullException ("options");
+
+ lock (slock) {
+ this.options = options;
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnRun (startInfo);
+ } catch (Exception ex) {
+ ForceExit ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Starts a debugging session by attaching the debugger to a running process
+ /// </summary>
+ /// <param name='proc'>
+ /// Process information
+ /// </param>
+ /// <param name='options'>
+ /// Debugging options
+ /// </param>
+ /// <exception cref='ArgumentNullException'>
+ /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
+ /// </exception>
+ public void AttachToProcess (ProcessInfo proc, DebuggerSessionOptions options)
+ {
+ if (proc == null)
+ throw new ArgumentNullException ("proc");
+ if (options == null)
+ throw new ArgumentNullException ("options");
+
+ lock (slock) {
+ this.options = options;
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnAttachToProcess (proc.Id);
+ attached = true;
+ } catch (Exception ex) {
+ ForceExit ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Detaches this debugging session from the debugged process
+ /// </summary>
+ public void Detach ()
+ {
+ lock (slock) {
+ try {
+ OnDetach ();
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ throw;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this <see cref="Mono.Debugging.Client.DebuggerSession"/> has been attached to a process using the Attach method.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if attached to process; otherwise, <c>false</c>.
+ /// </value>
+ public bool AttachedToProcess {
+ get {
+ lock (slock) {
+ return attached;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the active thread.
+ /// </summary>
+ /// <remarks>
+ /// This property can only be used when the debugger is paused
+ /// </remarks>
+ public ThreadInfo ActiveThread {
+ get {
+ lock (slock) {
+ return activeThread;
+ }
+ }
+ set {
+ lock (slock) {
+ try {
+ activeThread = value;
+ OnSetActiveThread (activeThread.ProcessId, activeThread.Id);
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ throw;
+ }
+ }
+ }
+ }
+
+
+ /// <summary>
+ /// Executes one line of code
+ /// </summary>
+ public void NextLine ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnNextLine ();
+ } catch (Exception ex) {
+ ForceStop ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Executes one line of code, stepping into method invocations
+ /// </summary>
+ public void StepLine ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnStepLine ();
+ } catch (Exception ex) {
+ ForceStop ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Executes one low level instruction
+ /// </summary>
+ public void NextInstruction ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnNextInstruction ();
+ } catch (Exception ex) {
+ ForceStop ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Executes one low level instruction, stepping into method invocations
+ /// </summary>
+ public void StepInstruction ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnStepInstruction ();
+ } catch (Exception ex) {
+ ForceStop ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Resumes the execution of the debugger and stops when the current method is exited
+ /// </summary>
+ public void Finish ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnFinish ();
+ } catch (Exception ex) {
+ ForceExit ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Returns the status of a breakpoint for this debugger session.
+ /// </summary>
+ public BreakEventStatus GetBreakEventStatus (BreakEvent be)
+ {
+ if (IsConnected) {
+ BreakEventInfo binfo;
+ lock (breakpoints) {
+ if (breakpoints.TryGetValue (be, out binfo))
+ return binfo.Status;
+ }
+ }
+ return BreakEventStatus.NotBound;
+ }
+
+ /// <summary>
+ /// Returns a status message of a breakpoint for this debugger session.
+ /// </summary>
+ public string GetBreakEventStatusMessage (BreakEvent be)
+ {
+ if (IsConnected) {
+ BreakEventInfo binfo;
+ lock (breakpoints) {
+ if (breakpoints.TryGetValue (be, out binfo)) {
+ if (binfo.StatusMessage != null)
+ return binfo.StatusMessage;
+ switch (binfo.Status) {
+ case BreakEventStatus.BindError: return "The breakpoint could not be bound";
+ case BreakEventStatus.Bound: return "";
+ case BreakEventStatus.Disconnected: return "";
+ case BreakEventStatus.Invalid: return "The breakpoint location is invalid. Perhaps the source line does " +
+ "not contain any statements, or the source does not correspond to the current binary";
+ case BreakEventStatus.NotBound: return "The breakpoint could not yet be bound to a valid location";
+ }
+ }
+ }
+ }
+ return "The breakpoint will not currently be hit";
+ }
+
+ void AddBreakEvent (BreakEvent be)
+ {
+ try {
+ var eventInfo = OnInsertBreakEvent (be);
+ if (eventInfo == null)
+ throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
+ lock (breakpoints) {
+ breakpoints [be] = eventInfo;
+ }
+ eventInfo.AttachSession (this, be);
+ } catch (Exception ex) {
+ string msg;
+
+ if (be is FunctionBreakpoint)
+ msg = "Could not set breakpoint at location '" + ((FunctionBreakpoint) be).FunctionName + ":" + ((FunctionBreakpoint) be).Line + "'";
+ else if (be is Breakpoint)
+ msg = "Could not set breakpoint at location '" + ((Breakpoint) be).FileName + ":" + ((Breakpoint) be).Line + "'";
+ else
+ msg = "Could not set catchpoint for exception '" + ((Catchpoint) be).ExceptionName + "'";
+
+ msg += " (" + ex.Message + ")";
+ OnDebuggerOutput (false, msg + "\n");
+ HandleException (ex);
+ }
+ }
+
+ bool RemoveBreakEvent (BreakEvent be)
+ {
+ lock (breakpoints) {
+ BreakEventInfo binfo;
+ if (breakpoints.TryGetValue (be, out binfo)) {
+ try {
+ OnRemoveBreakEvent (binfo);
+ } catch (Exception ex) {
+ if (IsConnected)
+ OnDebuggerOutput (false, ex.Message);
+ HandleException (ex);
+ return false;
+ }
+ breakpoints.Remove (be);
+ }
+ return true;
+ }
+ }
+
+ void UpdateBreakEventStatus (BreakEvent be)
+ {
+ lock (breakpoints) {
+ BreakEventInfo binfo;
+ if (breakpoints.TryGetValue (be, out binfo)) {
+ try {
+ OnEnableBreakEvent (binfo, be.Enabled);
+ } catch (Exception ex) {
+ if (IsConnected)
+ OnDebuggerOutput (false, ex.Message);
+ HandleException (ex);
+ }
+ }
+ }
+ }
+
+ void UpdateBreakEvent (BreakEvent be)
+ {
+ lock (breakpoints) {
+ BreakEventInfo binfo;
+ if (breakpoints.TryGetValue (be, out binfo))
+ OnUpdateBreakEvent (binfo);
+ }
+ }
+
+ void OnBreakpointAdded (object s, BreakEventArgs args)
+ {
+ lock (breakpoints) {
+ if (adjustingBreakpoints)
+ return;
+ }
+
+ lock (slock) {
+ if (IsConnected) {
+ Dispatch (delegate {
+ lock (slock) {
+ if (IsConnected)
+ AddBreakEvent (args.BreakEvent);
+ }
+ });
+ }
+ }
+ }
+
+ void OnBreakpointRemoved (object s, BreakEventArgs args)
+ {
+ lock (breakpoints) {
+ if (adjustingBreakpoints)
+ return;
+ }
+
+ lock (slock) {
+ if (IsConnected) {
+ Dispatch (delegate {
+ lock (slock) {
+ if (IsConnected)
+ RemoveBreakEvent (args.BreakEvent);
+ }
+ });
+ }
+ }
+ }
+
+ void OnBreakpointModified (object s, BreakEventArgs args)
+ {
+ lock (slock) {
+ if (IsConnected) {
+ Dispatch (delegate {
+ lock (slock) {
+ if (IsConnected)
+ UpdateBreakEvent (args.BreakEvent);
+ }
+ });
+ }
+ }
+ }
+
+ void OnBreakpointStatusChanged (object s, BreakEventArgs args)
+ {
+ lock (slock) {
+ if (IsConnected) {
+ Dispatch (delegate {
+ lock (slock) {
+ if (IsConnected)
+ UpdateBreakEventStatus (args.BreakEvent);
+ }
+ });
+ }
+ }
+ }
+
+ void BreakpointStoreCheckingReadOnly (object sender, ReadOnlyCheckEventArgs e)
+ {
+ e.SetReadOnly (!AllowBreakEventChanges);
+ }
+
+ /// <summary>
+ /// Gets the debugger options object
+ /// </summary>
+ public DebuggerSessionOptions Options {
+ get { return options; }
+ }
+
+ /// <summary>
+ /// Gets or sets the evaluation options.
+ /// </summary>
+ public EvaluationOptions EvaluationOptions {
+ get { return options.EvaluationOptions; }
+ set { options.EvaluationOptions = value; }
+ }
+
+ /// <summary>
+ /// Resumes the execution of the debugger
+ /// </summary>
+ public void Continue ()
+ {
+ lock (slock) {
+ OnRunning ();
+ Dispatch (delegate {
+ try {
+ OnContinue ();
+ } catch (Exception ex) {
+ ForceStop ();
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// Pauses the execution of the debugger
+ /// </summary>
+ public void Stop ()
+ {
+ Dispatch (delegate {
+ try {
+ OnStop ();
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+
+ /// <summary>
+ /// Stops the execution of the debugger by killing the debugged process
+ /// </summary>
+ public void Exit ()
+ {
+ Dispatch (delegate {
+ try {
+ OnExit ();
+ } catch (Exception ex) {
+ if (!HandleException (ex))
+ throw;
+ }
+ });
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the debuggee is currently connected
+ /// </summary>
+ public bool IsConnected {
+ get; private set;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the debuggee is currently running (not paused by the debugger)
+ /// </summary>
+ public bool IsRunning {
+ get; private set;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the debuggee has exited.
+ /// </summary>
+ public bool HasExited {
+ get; protected set;
+ }
+
+ /// <summary>
+ /// Gets a list of all processes
+ /// </summary>
+ /// <remarks>
+ /// This method can only be used when the debuggee is stopped by the debugger
+ /// </remarks>
+ public ProcessInfo[] GetProcesses ()
+ {
+ lock (slock) {
+ if (currentProcesses == null) {
+ currentProcesses = OnGetProcesses ();
+ foreach (ProcessInfo p in currentProcesses)
+ p.Attach (this);
+ }
+ return currentProcesses;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the output writer callback.
+ /// </summary>
+ /// <remarks>
+ /// This callback is invoked to print debuggee output
+ /// </remarks>
+ public OutputWriterDelegate OutputWriter {
+ get { return outputWriter; }
+ set {
+ lock (olock) {
+ outputWriter = value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the log writer.
+ /// </summary>
+ /// <remarks>
+ /// This callback is invoked to print debugger log messages
+ /// </remarks>
+ public OutputWriterDelegate LogWriter {
+ get { return logWriter; }
+ set {
+ lock (olock) {
+ logWriter = value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets the disassembly of a source code file
+ /// </summary>
+ /// <returns>
+ /// An array of AssemblyLine, with one element for each source code line that could be disassembled
+ /// </returns>
+ /// <param name='file'>
+ /// The file.
+ /// </param>
+ /// <remarks>
+ /// This method can only be used when the debuggee is stopped by the debugger
+ /// </remarks>
+ public AssemblyLine[] DisassembleFile (string file)
+ {
+ lock (slock) {
+ return OnDisassembleFile (file);
+ }
+ }
+
+ public string ResolveExpression (string expression, string file, int line, int column)
+ {
+ return ResolveExpression (expression, new SourceLocation (null, file, line, column));
+ }
+
+ public virtual string ResolveExpression (string expression, SourceLocation location)
+ {
+ if (TypeResolverHandler == null)
+ return expression;
+
+ string key = expression + " " + location;
+ string resolved;
+ if (!resolvedExpressionCache.TryGetValue (key, out resolved)) {
+ try {
+ resolved = OnResolveExpression (expression, location);
+ } catch (Exception ex) {
+ OnDebuggerOutput (true, "Error while resolving expression: " + ex.Message);
+ }
+ resolvedExpressionCache [key] = resolved;
+ }
+ return resolved ?? expression;
+ }
+
+ /// <summary>
+ /// Stops the execution of background evaluations being done by the debugger
+ /// </summary>
+ /// <remarks>
+ /// This method can only be used when the debuggee is stopped by the debugger
+ /// </remarks>
+ public void CancelAsyncEvaluations ()
+ {
+ if (UseOperationThread) {
+ ThreadPool.QueueUserWorkItem (delegate {
+ OnCancelAsyncEvaluations ();
+ });
+ } else
+ OnCancelAsyncEvaluations ();
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether there are background evaluations being done by the debugger
+ /// which can be cancelled.
+ /// </summary>
+ /// <remarks>
+ /// This method can only be used when the debuggee is stopped by the debugger
+ /// </remarks>
+ public virtual bool CanCancelAsyncEvaluations {
+ get { return false; }
+ }
+
+ /// <summary>
+ /// Override to stop the execution of background evaluations being done by the debugger
+ /// </summary>
+ protected virtual void OnCancelAsyncEvaluations ()
+ {
+ }
+
+ Mono.Debugging.Evaluation.ExpressionEvaluator defaultResolver = new Mono.Debugging.Evaluation.NRefactoryExpressionEvaluator ();
+ Dictionary <string, IExpressionEvaluator> evaluators = new Dictionary <string, IExpressionEvaluator> ();
+
+ internal IExpressionEvaluator FindExpressionEvaluator (StackFrame frame)
+ {
+ if (GetExpressionEvaluator == null)
+ return null;
+
+ string fn = frame.SourceLocation == null ? null : frame.SourceLocation.FileName;
+ if (String.IsNullOrEmpty (fn))
+ return null;
+
+ fn = System.IO.Path.GetExtension (fn);
+ IExpressionEvaluator result;
+ if (evaluators.TryGetValue (fn, out result))
+ return result;
+
+ result = GetExpressionEvaluator(fn);
+
+ evaluators[fn] = result;
+
+ return result;
+ }
+
+ public Mono.Debugging.Evaluation.ExpressionEvaluator GetEvaluator (StackFrame frame)
+ {
+ IExpressionEvaluator result = FindExpressionEvaluator (frame);
+ if (result == null)
+ return defaultResolver;
+ return result.Evaluator;
+ }
+
+
+ /// <summary>
+ /// Called when an expression needs to be resolved
+ /// </summary>
+ /// <param name='expression'>
+ /// The expression
+ /// </param>
+ /// <param name='location'>
+ /// The source code location
+ /// </param>
+ /// <returns>
+ /// The resolved expression
+ /// </returns>
+ protected virtual string OnResolveExpression (string expression, SourceLocation location)
+ {
+ return defaultResolver.Resolve (this, location, expression);
+ }
+
+ internal protected string ResolveIdentifierAsType (string identifier, SourceLocation location)
+ {
+ if (TypeResolverHandler != null)
+ return TypeResolverHandler (identifier, location);
+
+ return null;
+ }
+
+ internal ThreadInfo[] GetThreads (long processId)
+ {
+ lock (slock) {
+ ThreadInfo[] threads = OnGetThreads (processId);
+ foreach (ThreadInfo t in threads)
+ t.Attach (this);
+ return threads;
+ }
+ }
+
+ internal Backtrace GetBacktrace (long processId, long threadId)
+ {
+ lock (slock) {
+ Backtrace bt = OnGetThreadBacktrace (processId, threadId);
+ if (bt != null)
+ bt.Attach (this);
+ return bt;
+ }
+ }
+
+ void ForceStop ()
+ {
+ TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetStopped);
+ OnTargetEvent (args);
+ }
+
+ void ForceExit ()
+ {
+ TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetExited);
+ OnTargetEvent (args);
+ }
+
+ internal protected void OnTargetEvent (TargetEventArgs args)
+ {
+ currentProcesses = null;
+
+ if (args.Process != null)
+ args.Process.Attach (this);
+ if (args.Thread != null) {
+ args.Thread.Attach (this);
+ activeThread = args.Thread;
+ }
+ if (args.Backtrace != null)
+ args.Backtrace.Attach (this);
+
+ EventHandler<TargetEventArgs> evnt = null;
+ switch (args.Type) {
+ case TargetEventType.ExceptionThrown:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetExceptionThrown;
+ break;
+ case TargetEventType.TargetExited:
+ lock (slock) {
+ IsRunning = false;
+ IsConnected = false;
+ HasExited = true;
+ }
+ EventHandler handler = TargetExited;
+ if (handler != null)
+ handler (this, args);
+ break;
+ case TargetEventType.TargetHitBreakpoint:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetHitBreakpoint;
+ break;
+ case TargetEventType.TargetInterrupted:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetInterrupted;
+ break;
+ case TargetEventType.TargetSignaled:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetSignaled;
+ break;
+ case TargetEventType.TargetStopped:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetStopped;
+ break;
+ case TargetEventType.UnhandledException:
+ lock (slock) {
+ IsRunning = false;
+ args.IsStopEvent = true;
+ }
+ evnt = TargetUnhandledException;
+ break;
+ case TargetEventType.TargetReady:
+ evnt = TargetReady;
+ break;
+ case TargetEventType.ThreadStarted:
+ evnt = TargetThreadStarted;
+ break;
+ case TargetEventType.ThreadStopped:
+ evnt = TargetThreadStopped;
+ break;
+ }
+
+ if (evnt != null)
+ evnt (this, args);
+
+ EventHandler<TargetEventArgs> targetEvent = TargetEvent;
+ if (targetEvent != null)
+ targetEvent (this, args);
+ }
+
+ internal void OnRunning ()
+ {
+ IsRunning = true;
+ if (TargetStarted != null)
+ TargetStarted (this, EventArgs.Empty);
+ }
+
+ internal protected void OnStarted ()
+ {
+ OnStarted (null);
+ }
+
+ internal protected virtual void OnStarted (ThreadInfo t)
+ {
+ if (HasExited)
+ return;
+
+ OnTargetEvent (new TargetEventArgs (TargetEventType.TargetReady) { Thread = t });
+
+ lock (slock) {
+ if (!HasExited) {
+ IsConnected = true;
+ lock (breakpointStore) {
+ foreach (BreakEvent bp in breakpointStore)
+ AddBreakEvent (bp);
+ }
+ }
+ }
+ }
+
+ internal protected void OnTargetOutput (bool isStderr, string text)
+ {
+ lock (olock) {
+ if (outputWriter != null)
+ outputWriter (isStderr, text);
+ }
+ }
+
+ internal protected void OnDebuggerOutput (bool isStderr, string text)
+ {
+ lock (olock) {
+ if (logWriter != null)
+ logWriter (isStderr, text);
+ }
+ }
+
+ internal protected void SetBusyState (BusyStateEventArgs args)
+ {
+ if (BusyStateChanged != null)
+ BusyStateChanged (this, args);
+ }
+
+ /// <summary>
+ /// Tries to bind all unbound breakpoints of a source file
+ /// </summary>
+ /// <param name='fullFilePath'>
+ /// Source file path
+ /// </param>
+ /// <remarks>
+ /// This method can be called by a subclass to ask the debugger session to attempt
+ /// to bind all unbound breakpoints defined on the given file. This method could
+ /// be called, for example, when a new assembly that contains this file is loaded
+ /// into memory. It is not necessary to use this method if the subclass keeps
+ /// track of unbound breakpoints by itself.
+ /// </remarks>
+ internal protected void BindSourceFileBreakpoints (string fullFilePath)
+ {
+ lock (breakpoints) {
+ // Make a copy of the breakpoints table since it can be modified while iterating
+ Dictionary<BreakEvent, BreakEventInfo> breakpointsCopy = new Dictionary<BreakEvent, BreakEventInfo> (breakpoints);
+ foreach (KeyValuePair<BreakEvent, BreakEventInfo> bps in breakpointsCopy) {
+ Breakpoint bp = bps.Key as Breakpoint;
+ if (bp != null && bps.Value.Status == BreakEventStatus.NotBound) {
+ if (string.Compare (System.IO.Path.GetFullPath (bp.FileName), fullFilePath, System.IO.Path.DirectorySeparatorChar == '\\') == 0)
+ RetryEventBind (bps.Value);
+ }
+ }
+ }
+ }
+
+ void RetryEventBind (BreakEventInfo binfo)
+ {
+ // Try inserting the breakpoint again
+ BreakEvent be = binfo.BreakEvent;
+ try {
+ binfo = OnInsertBreakEvent (be);
+ if (binfo == null)
+ throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
+ lock (breakpoints) {
+ breakpoints [be] = binfo;
+ }
+ binfo.AttachSession (this, be);
+ } catch (Exception ex) {
+ Breakpoint bp = be as Breakpoint;
+ if (bp != null)
+ OnDebuggerOutput (false, "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + " (" + ex.Message + ")\n");
+ else
+ OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "' (" + ex.Message + ")\n");
+ HandleException (ex);
+ }
+ }
+
+ /// <summary>
+ /// Unbinds all bound breakpoints of a source file
+ /// </summary>
+ /// <param name='fullFilePath'>
+ /// The source file path
+ /// </param>
+ /// <remarks>
+ /// This method can be called by a subclass to ask the debugger session to
+ /// unbind all bound breakpoints defined on the given file. This method could
+ /// be called, for example, when an assembly that contains this file is unloaded
+ /// from memory. It is not necessary to use this method if the subclass keeps
+ /// track of unbound breakpoints by itself.
+ /// </remarks>
+ internal protected void UnbindSourceFileBreakpoints (string fullFilePath)
+ {
+ List<BreakEventInfo> toUpdate = new List<BreakEventInfo> ();
+ lock (breakpoints) {
+ // Make a copy of the breakpoints table since it can be modified while iterating
+ Dictionary<BreakEvent, BreakEventInfo> breakpointsCopy = new Dictionary<BreakEvent, BreakEventInfo> (breakpoints);
+ foreach (KeyValuePair<BreakEvent, BreakEventInfo> bps in breakpointsCopy) {
+ Breakpoint bp = bps.Key as Breakpoint;
+ if (bp != null && bps.Value.Status == BreakEventStatus.Bound) {
+ if (System.IO.Path.GetFullPath (bp.FileName) == fullFilePath)
+ toUpdate.Add (bps.Value);
+ }
+ }
+ foreach (BreakEventInfo be in toUpdate) {
+ breakpoints.Remove (be.BreakEvent);
+ NotifyBreakEventStatusChanged (be.BreakEvent);
+ }
+ }
+ }
+
+ internal void NotifyBreakEventStatusChanged (BreakEvent be)
+ {
+ var s = GetBreakEventStatus (be);
+ if (s == BreakEventStatus.BindError || s == BreakEventStatus.Invalid)
+ OnDebuggerOutput (true, GetBreakEventErrorMessage (be) + ": " + GetBreakEventStatusMessage (be) + "\n");
+ Breakpoints.NotifyStatusChanged (be);
+ }
+
+ string GetBreakEventErrorMessage (BreakEvent be)
+ {
+ Breakpoint bp = be as Breakpoint;
+ if (bp != null)
+ return string.Format ("Could not insert breakpoint at '{0}:{1}'", bp.FileName, bp.Line);
+ Catchpoint cp = (Catchpoint) be;
+ return string.Format ("Could not enable catchpoint for exception '{0}'", cp.ExceptionName);
+ }
+
+ /// <summary>
+ /// Reports an unhandled exception in the debugger
+ /// </summary>
+ /// <returns>
+ /// True if the debugger engine handles the exception. False otherwise.
+ /// </returns>
+ /// <param name='ex'>
+ /// The exception
+ /// </param>
+ /// <remarks>
+ /// This method can be used by subclasses to report errors in the debugger that must be reported
+ /// to the user.
+ /// </remarks>
+ protected virtual bool HandleException (Exception ex)
+ {
+ if (exceptionHandler != null)
+ return exceptionHandler (ex);
+
+ return false;
+ }
+
+ internal void AdjustBreakpointLocation (Breakpoint b, int newLine, int newColumn)
+ {
+ lock (breakpoints) {
+ try {
+ adjustingBreakpoints = true;
+ Breakpoints.AdjustBreakpointLine (b, newLine, newColumn);
+ } finally {
+ adjustingBreakpoints = false;
+ }
+ }
+ }
+
+ /// <summary>
+ /// When set, operations such as OnRun, OnAttachToProcess, OnStepLine, etc, are run in
+ /// a background thread, so it will not block the caller of the corresponding public methods.
+ /// </summary>
+ protected bool UseOperationThread { get; set; }
+
+ /// <summary>
+ /// Called to start the execution of the debugger
+ /// </summary>
+ /// <param name='startInfo'>
+ /// Startup information
+ /// </param>
+ protected abstract void OnRun (DebuggerStartInfo startInfo);
+
+ /// <summary>
+ /// Called to attach the debugger to a running process
+ /// </summary>
+ /// <param name='processId'>
+ /// Process identifier.
+ /// </param>
+ protected abstract void OnAttachToProcess (long processId);
+
+ /// <summary>
+ /// Called to detach the debugging session from the running process
+ /// </summary>
+ protected abstract void OnDetach ();
+
+ /// <summary>
+ /// Called when the active thread has to be changed
+ /// </summary>
+ /// <param name='processId'>
+ /// Process identifier.
+ /// </param>
+ /// <param name='threadId'>
+ /// Thread identifier.
+ /// </param>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnSetActiveThread (long processId, long threadId);
+
+ /// <summary>
+ /// Called when the debug session has to be paused
+ /// </summary>
+ protected abstract void OnStop ();
+
+ /// <summary>
+ /// Called when the target process has to be exited
+ /// </summary>
+ protected abstract void OnExit ();
+
+
+ /// <summary>
+ /// Called to step one source code line
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnStepLine ();
+
+ /// <summary>
+ /// Called to step one source line, but step over method calls
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnNextLine ();
+
+ /// <summary>
+ /// Called to step one instruction
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnStepInstruction ();
+
+ /// <summary>
+ // Called to step one instruction, but step over method calls
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnNextInstruction ();
+
+ /// <summary>
+ /// Called to continue execution until leaving the current method
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnFinish ();
+
+ /// <summary>
+ /// Called to resume execution
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract void OnContinue ();
+
+ //breakpoints etc
+
+ /// <summary>
+ /// Called to insert a new breakpoint or catchpoint
+ /// </summary>
+ /// <param name='breakEvent'>
+ /// The break event.
+ /// </param>
+ /// <remarks>
+ /// Implementations of this method must: (1) create (and return) an instance of BreakEventInfo
+ /// (or a subclass of it). (2) Attempt to activate a breakpoint at the location
+ /// specified in breakEvent. If the breakpoint cannot be activated at the time this
+ /// method is called, it is the responsibility of the DebuggerSession subclass
+ /// to attempt it later on.
+ /// The BreakEventInfo object can be used to change the status of the breakpoint,
+ /// update the hit point, etc.
+ /// </remarks>
+ protected abstract BreakEventInfo OnInsertBreakEvent (BreakEvent breakEvent);
+
+ /// <summary>
+ /// Called when a breakpoint has been removed.
+ /// </summary>
+ /// <param name='eventInfo'>
+ /// The breakpoint
+ /// </param>
+ /// <remarks>
+ /// Implementations of this method should remove or disable the breakpoint
+ /// in the debugging engine.
+ /// </remarks>
+ protected abstract void OnRemoveBreakEvent (BreakEventInfo eventInfo);
+
+ /// <summary>
+ /// Called when information about a breakpoint has changed
+ /// </summary>
+ /// <param name='eventInfo'>
+ /// The break event
+ /// </param>
+ /// <remarks>
+ /// This method is called when some information about the breakpoint changes.
+ /// Notice that the file and line of a breakpoint or the exception name of
+ /// a catchpoint can't be modified. Changes of the Enabled property are
+ /// notified by calling OnEnableBreakEvent.
+ /// </remarks>
+ protected abstract void OnUpdateBreakEvent (BreakEventInfo eventInfo);
+
+ /// <summary>
+ /// Called when a break event is enabled or disabled
+ /// </summary>
+ /// <param name='eventInfo'>
+ /// The break event
+ /// </param>
+ /// <param name='enable'>
+ /// The new status
+ /// </param>
+ protected abstract void OnEnableBreakEvent (BreakEventInfo eventInfo, bool enable);
+
+ /// <summary>
+ /// Queried when the debugger session has to check if changes in breakpoints are allowed or not
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if break event changes are allowed; otherwise, <c>false</c>.
+ /// </value>
+ /// <remarks>
+ /// This property should return false if at the time it is invoked the debugger engine doesn't support
+ /// adding, removing or doing changes in breakpoints.
+ /// </remarks>
+ protected virtual bool AllowBreakEventChanges { get { return true; } }
+
+ /// <summary>
+ /// Called to get a list of the threads of a process
+ /// </summary>
+ /// <param name='processId'>
+ /// Process identifier.
+ /// </param>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract ThreadInfo[] OnGetThreads (long processId);
+
+ /// <summary>
+ /// Called to get a list of all debugee processes
+ /// </summary>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract ProcessInfo[] OnGetProcesses ();
+
+ /// <summary>
+ /// Called to get the backtrace of a thread
+ /// </summary>
+ /// <param name='processId'>
+ /// Process identifier.
+ /// </param>
+ /// <param name='threadId'>
+ /// Thread identifier.
+ /// </param>
+ /// <remarks>
+ /// This method can only be called when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected abstract Backtrace OnGetThreadBacktrace (long processId, long threadId);
+
+ /// <summary>
+ /// Called to gets the disassembly of a source code file
+ /// </summary>
+ /// <returns>
+ /// An array of AssemblyLine, with one element for each source code line that could be disassembled
+ /// </returns>
+ /// <param name='file'>
+ /// The file.
+ /// </param>
+ /// <remarks>
+ /// This method can only be used when the debuggee is stopped by the debugger
+ /// </remarks>
+ protected virtual AssemblyLine[] OnDisassembleFile (string file)
+ {
+ return null;
+ }
+
+ internal T WrapDebuggerObject<T> (T obj) where T:class,IDebuggerBackendObject
+ {
+ return obj != null ? OnWrapDebuggerObject (obj) : null;
+ }
+
+ /// <summary>
+ /// Called for every object that is obtained from the debugger engine.
+ /// Subclasses may want to create wrappers for some of those objects
+ /// </summary>
+ protected virtual T OnWrapDebuggerObject<T> (T obj) where T:class,IDebuggerBackendObject
+ {
+ return obj;
+ }
+
+ protected IDebuggerSessionFrontend Frontend {
+ get {
+ return frontend;
+ }
+ }
+ }
+
+ class InternalDebuggerSession: IDebuggerSessionFrontend
+ {
+ DebuggerSession session;
+
+ public InternalDebuggerSession (DebuggerSession session)
+ {
+ this.session = session;
+ }
+
+ public void NotifyTargetEvent (TargetEventArgs args)
+ {
+ session.OnTargetEvent (args);
+ }
+
+ public void NotifyTargetOutput (bool isStderr, string text)
+ {
+ session.OnTargetOutput (isStderr, text);
+ }
+
+ public void NotifyDebuggerOutput (bool isStderr, string text)
+ {
+ session.OnDebuggerOutput (isStderr, text);
+ }
+
+ public void NotifyStarted (ThreadInfo t)
+ {
+ session.OnStarted (t);
+ }
+
+ public void NotifyStarted ()
+ {
+ session.OnStarted ();
+ }
+
+ public void BindSourceFileBreakpoints (string fullFilePath)
+ {
+ session.BindSourceFileBreakpoints (fullFilePath);
+ }
+
+ public void UnbindSourceFileBreakpoints (string fullFilePath)
+ {
+ session.UnbindSourceFileBreakpoints (fullFilePath);
+ }
+ }
+
+ public delegate void OutputWriterDelegate (bool isStderr, string text);
+
+ public class BusyStateEventArgs: EventArgs
+ {
+ public bool IsBusy { get; internal set; }
+
+ public string Description { get; internal set; }
+ }
+
+ public interface IConnectionDialog : IDisposable
+ {
+ event EventHandler UserCancelled;
+
+ //message may be null in which case the dialog should construct a default
+ void SetMessage (DebuggerStartInfo dsi, string message, bool listening, int attemptNumber);
+ }
+}
+
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerSessionOptions.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerStartInfo.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerStartInfo.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerStartInfo.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/DebuggerStartInfo.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs
new file mode 100644
index 0000000..04e543d
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs
@@ -0,0 +1,117 @@
+//
+// EvaluationOptions.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// 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;
+
+namespace Mono.Debugging.Client
+{
+ [Serializable]
+ public class EvaluationOptions
+ {
+ bool allowMethodEvaluation;
+ bool allowToStringCalls;
+
+ public static readonly char Ellipsis = '…';
+
+ public static EvaluationOptions DefaultOptions {
+ get {
+ EvaluationOptions ops = new EvaluationOptions ();
+ ops.EvaluationTimeout = 1000;
+ ops.MemberEvaluationTimeout = 5000;
+ ops.AllowTargetInvoke = true;
+ ops.AllowMethodEvaluation = true;
+ ops.AllowToStringCalls = true;
+ ops.FlattenHierarchy = true;
+ ops.GroupPrivateMembers = true;
+ ops.GroupStaticMembers = true;
+ ops.GroupUserPrivateMembers = false;
+ ops.UseExternalTypeResolver = true;
+ ops.IntegerDisplayFormat = IntegerDisplayFormat.Decimal;
+ ops.CurrentExceptionTag = "$exception";
+ ops.EllipsizeStrings = true;
+ ops.EllipsizedLength = 100;
+ ops.ChunkRawStrings = false;
+ return ops;
+ }
+ }
+
+ public EvaluationOptions Clone ()
+ {
+ return (EvaluationOptions) MemberwiseClone ();
+ }
+
+ public bool ChunkRawStrings { get; set; }
+
+ public bool EllipsizeStrings { get; set; }
+ public int EllipsizedLength { get; set; }
+
+ public int EvaluationTimeout { get; set; }
+ public int MemberEvaluationTimeout { get; set; }
+ public bool AllowTargetInvoke { get; set; }
+
+ public bool AllowMethodEvaluation {
+ get { return allowMethodEvaluation && AllowTargetInvoke; }
+ set { allowMethodEvaluation = value; }
+ }
+
+ public bool AllowToStringCalls {
+ get { return allowToStringCalls && AllowTargetInvoke; }
+ set { allowToStringCalls = value; }
+ }
+
+ public bool AllowDisplayStringEvaluation {
+ get { return AllowTargetInvoke; }
+ }
+
+ public bool AllowDebuggerProxy {
+ get { return AllowTargetInvoke; }
+ }
+
+ public bool FlattenHierarchy { get; set; }
+
+ public bool GroupPrivateMembers { get; set; }
+
+ [Obsolete ("I don't see a point in even having this property")]
+ public bool GroupUserPrivateMembers { get; set; }
+
+ public bool GroupStaticMembers { get; set; }
+
+ public bool UseExternalTypeResolver { get; set; }
+
+ [Obsolete ("Use the type's BeforeFieldInit attribute instead")]
+ public bool AllowImplicitTypeLoading { get { return true; } set { } }
+
+ public IntegerDisplayFormat IntegerDisplayFormat { get; set; }
+
+ public string CurrentExceptionTag { get; set; }
+ }
+
+ public enum IntegerDisplayFormat
+ {
+ Decimal,
+ Hexadecimal
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs
new file mode 100644
index 0000000..6745dfc
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs
@@ -0,0 +1,254 @@
+//
+// ExceptionInfo.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// 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.Text;
+
+namespace Mono.Debugging.Client
+{
+ [Serializable]
+ public class ExceptionInfo
+ {
+ ObjectValue exception;
+ ObjectValue messageObject;
+
+ [NonSerialized]
+ ExceptionStackFrame[] frames;
+
+ [NonSerialized]
+ ExceptionInfo innerException;
+
+ /// <summary>
+ /// The provided value can have the following members:
+ /// Type of the object: type of the exception
+ /// Message: Message of the exception
+ /// Instance: Raw instance of the exception
+ /// StackTrace: an array of frames. Each frame must have:
+ /// Value of the object: display text of the frame
+ /// File: name of the file
+ /// Line: line
+ /// Col: column
+ /// InnerException: inner exception, following the same format described above.
+ /// </summary>
+ public ExceptionInfo (ObjectValue exception)
+ {
+ this.exception = exception;
+ if (exception.IsEvaluating || exception.IsEvaluatingGroup)
+ exception.ValueChanged += HandleExceptionValueChanged;
+ }
+
+ void LoadMessage ()
+ {
+ if (messageObject == null) {
+ messageObject = exception.GetChild ("Message");
+ if (messageObject != null && messageObject.IsEvaluating)
+ messageObject.ValueChanged += HandleMessageValueChanged;
+ }
+ }
+
+ void HandleMessageValueChanged (object sender, EventArgs e)
+ {
+ frames = null;
+ NotifyChanged ();
+ }
+
+ void HandleExceptionValueChanged (object sender, EventArgs e)
+ {
+ frames = null;
+ if (exception.IsEvaluatingGroup)
+ exception = exception.GetArrayItem (0);
+ LoadMessage ();
+ NotifyChanged ();
+ }
+
+ void NotifyChanged ()
+ {
+ EventHandler evnt = Changed;
+ if (evnt != null)
+ evnt (this, EventArgs.Empty);
+ }
+
+ public string Type {
+ get { return exception.TypeName; }
+ }
+
+ public string Message {
+ get {
+ LoadMessage ();
+ if (messageObject != null && messageObject.IsEvaluating)
+ return "Loading...";
+ return messageObject != null ? messageObject.Value : null;
+ }
+ }
+
+ public ObjectValue Instance {
+ get {
+ return exception.GetChild ("Instance");
+ }
+ }
+
+ public bool IsEvaluating {
+ get { return exception.IsEvaluating || exception.IsEvaluatingGroup; }
+ }
+
+ public bool StackIsEvaluating {
+ get {
+ ObjectValue stackTrace = exception.GetChild ("StackTrace");
+ if (stackTrace != null)
+ return stackTrace.IsEvaluating;
+ else
+ return false;
+ }
+ }
+
+ public ExceptionStackFrame[] StackTrace {
+ get {
+ if (frames != null)
+ return frames;
+
+ ObjectValue stackTrace = exception.GetChild ("StackTrace");
+ if (stackTrace == null)
+ return frames = new ExceptionStackFrame [0];
+
+ if (stackTrace.IsEvaluating) {
+ frames = new ExceptionStackFrame [0];
+ stackTrace.ValueChanged += HandleExceptionValueChanged;
+ return frames;
+ }
+ List<ExceptionStackFrame> list = new List<ExceptionStackFrame> ();
+ foreach (ObjectValue val in stackTrace.GetAllChildren ())
+ list.Add (new ExceptionStackFrame (val));
+ frames = list.ToArray ();
+ return frames;
+ }
+ }
+
+ public ExceptionInfo InnerException {
+ get {
+ if (innerException == null) {
+ ObjectValue innerVal = exception.GetChild ("InnerException");
+ if (innerVal == null || innerVal.IsError || innerVal.IsUnknown)
+ return null;
+ if (innerVal.IsEvaluating) {
+ innerVal.ValueChanged += delegate { NotifyChanged (); };
+ return null;
+ }
+ innerException = new ExceptionInfo (innerVal);
+ innerException.Changed += delegate {
+ NotifyChanged ();
+ };
+ }
+ return innerException;
+ }
+ }
+
+ public event EventHandler Changed;
+
+ internal void ConnectCallback (StackFrame parentFrame)
+ {
+ ObjectValue.ConnectCallbacks (parentFrame, exception);
+ }
+
+ public override string ToString ()
+ {
+ StringBuilder sb = new StringBuilder ();
+ var chain = new List<ExceptionInfo> ();
+ ExceptionInfo e = this;
+ while (e != null) {
+ chain.Insert (0, e);
+ if (sb.Length > 0)
+ sb.Append (" ---> ");
+ sb.Append (e.Type).Append (": ").Append (e.Message);
+ e = e.InnerException;
+ }
+ sb.AppendLine ();
+ foreach (var ex in chain) {
+ if (ex != chain[0])
+ sb.AppendLine (" --- End of inner exception stack trace ---");
+ foreach (var f in ex.StackTrace) {
+ sb.Append (" at ").Append (f.DisplayText);
+ if (!string.IsNullOrEmpty (f.File))
+ sb.Append (" in ").Append (f.File).Append (":").Append (f.Line);
+ sb.AppendLine ();
+ }
+ }
+ return sb.ToString ();
+ }
+ }
+
+ public class ExceptionStackFrame
+ {
+ ObjectValue frame;
+
+ /// <summary>
+ /// The provided value must have a specific structure.
+ /// The Value property is the display text.
+ /// A child "File" member must be the name of the file.
+ /// A child "Line" member must be the line.
+ /// A child "Col" member must be the column.
+ /// </summary>
+ public ExceptionStackFrame (ObjectValue value)
+ {
+ frame = value;
+ }
+
+ public string File {
+ get {
+ ObjectValue file = frame.GetChild ("File");
+ if (file != null)
+ return file.Value;
+
+ return null;
+ }
+ }
+
+ public int Line {
+ get {
+ ObjectValue val = frame.GetChild ("Line");
+ if (val != null)
+ return int.Parse (val.Value);
+
+ return 0;
+ }
+ }
+
+ public int Column {
+ get {
+ ObjectValue val = frame.GetChild ("Column");
+ if (val != null)
+ return int.Parse (val.Value);
+
+ return 0;
+ }
+ }
+
+ public string DisplayText {
+ get { return frame.Value; }
+ }
+ }
+}
+
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/FunctionBreakpoint.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/FunctionBreakpoint.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/FunctionBreakpoint.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/FunctionBreakpoint.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/IExpressionEvaluator.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/IExpressionEvaluator.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/IExpressionEvaluator.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/IExpressionEvaluator.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectPath.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectPath.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ObjectPath.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectPath.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs
new file mode 100644
index 0000000..e05995a
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs
@@ -0,0 +1,787 @@
+// ObjectValue.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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.Text;
+using Mono.Debugging.Backend;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Mono.Debugging.Client
+{
+ [Serializable]
+ public class ObjectValue
+ {
+ ObjectPath path;
+ int arrayCount = -1;
+ bool isNull;
+ string name;
+ string value;
+ string typeName;
+ string displayValue;
+ string childSelector;
+ ObjectValueFlags flags;
+ IObjectValueSource source;
+ IObjectValueUpdater updater;
+ List<ObjectValue> children;
+ ManualResetEvent evaluatedEvent;
+
+ [NonSerialized]
+ UpdateCallback updateCallback;
+
+ [NonSerialized]
+ EventHandler valueChanged;
+
+ [NonSerialized]
+ StackFrame parentFrame;
+
+ static ObjectValue Create (IObjectValueSource source, ObjectPath path, string typeName)
+ {
+ ObjectValue ob = new ObjectValue ();
+ ob.source = source;
+ ob.path = path;
+ ob.typeName = typeName;
+ return ob;
+ }
+
+ public static ObjectValue CreateObject (IObjectValueSource source, ObjectPath path, string typeName, string value, ObjectValueFlags flags, ObjectValue[] children)
+ {
+ return CreateObject (source, path, typeName, new EvaluationResult (value), flags, children);
+ }
+
+ public static ObjectValue CreateObject (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags, ObjectValue[] children)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.path = path;
+ ob.flags = flags | ObjectValueFlags.Object;
+ ob.value = value.Value;
+ ob.displayValue = value.DisplayValue;
+ if (children != null) {
+ ob.children = new List<ObjectValue> ();
+ ob.children.AddRange (children);
+ }
+ return ob;
+ }
+
+ public static ObjectValue CreateNullObject (IObjectValueSource source, string name, string typeName, ObjectValueFlags flags)
+ {
+ return CreateNullObject (source, new ObjectPath (name), typeName, flags);
+ }
+
+ public static ObjectValue CreateNullObject (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.flags = flags | ObjectValueFlags.Object;
+ ob.value = "(null)";
+ ob.isNull = true;
+ return ob;
+ }
+
+ public static ObjectValue CreatePrimitive (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.flags = flags | ObjectValueFlags.Primitive;
+ ob.value = value.Value;
+ ob.displayValue = value.DisplayValue;
+ return ob;
+ }
+
+ public static ObjectValue CreateArray (IObjectValueSource source, ObjectPath path, string typeName, int arrayCount, ObjectValueFlags flags, ObjectValue[] children)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.arrayCount = arrayCount;
+ ob.flags = flags | ObjectValueFlags.Array;
+ ob.value = "[" + arrayCount + "]";
+ if (children != null && children.Length > 0) {
+ ob.children = new List<ObjectValue> ();
+ ob.children.AddRange (children);
+ }
+ return ob;
+ }
+
+ public static ObjectValue CreateUnknown (IObjectValueSource source, ObjectPath path, string typeName)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.flags = ObjectValueFlags.Unknown | ObjectValueFlags.ReadOnly;
+ return ob;
+ }
+
+ public static ObjectValue CreateUnknown (string name)
+ {
+ return CreateUnknown (null, new ObjectPath (name), "");
+ }
+
+ public static ObjectValue CreateError (IObjectValueSource source, ObjectPath path, string typeName, string value, ObjectValueFlags flags)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.flags = flags | ObjectValueFlags.Error;
+ ob.value = value;
+ return ob;
+ }
+
+ public static ObjectValue CreateImplicitNotSupported (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
+ {
+ return CreateNotSupported (source, path, typeName, "Implicit evaluation is disabled", flags);
+ }
+
+ public static ObjectValue CreateNotSupported (IObjectValueSource source, ObjectPath path, string typeName, string message, ObjectValueFlags flags)
+ {
+ ObjectValue ob = Create (source, path, typeName);
+ ob.flags = flags | ObjectValueFlags.NotSupported;
+ ob.value = message;
+ return ob;
+ }
+
+ public static ObjectValue CreateFatalError (string name, string message, ObjectValueFlags flags)
+ {
+ ObjectValue ob = new ObjectValue ();
+ ob.flags = flags | ObjectValueFlags.Error;
+ ob.value = message;
+ ob.name = name;
+ return ob;
+ }
+
+ public static ObjectValue CreateEvaluating (IObjectValueUpdater updater, ObjectPath path, ObjectValueFlags flags)
+ {
+ ObjectValue ob = Create (null, path, null);
+ ob.updater = updater;
+ ob.path = path;
+ ob.flags = flags | ObjectValueFlags.Evaluating;
+ return ob;
+ }
+
+ /// <summary>
+ /// Gets the flags of the value
+ /// </summary>
+ public ObjectValueFlags Flags {
+ get { return flags; }
+ }
+
+ /// <summary>
+ /// Name of the value (for example, the property name)
+ /// </summary>
+ public string Name {
+ get {
+ if (name == null)
+ return path [path.Length - 1];
+
+ return name;
+ }
+ set {
+ name = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the value of the object
+ /// </summary>
+ /// <value>
+ /// The value.
+ /// </value>
+ /// <exception cref='InvalidOperationException'>
+ /// Is thrown when trying to set a value on a read-only ObjectValue
+ /// </exception>
+ /// <remarks>
+ /// This value is a string representation of the ObjectValue. The content depends on several evaluation
+ /// options. For example, if ToString calls are enabled, this value will be the result of calling
+ /// ToString.
+ /// If the object is a primitive type, in general the Value will be an expression that represents the
+ /// value in the target language. For example, when debugging C#, if the property is an string, the value
+ /// will include the quotation marks and chars like '\' will be properly escaped.
+ /// If you need to get the real CLR value of the object, use GetRawValue.
+ /// </remarks>
+ public virtual string Value {
+ get {
+ return value;
+ }
+ set {
+ if (IsReadOnly || source == null)
+ throw new InvalidOperationException ("Value is not editable");
+ EvaluationResult res = source.SetValue (path, value, null);
+ if (res != null) {
+ this.value = res.Value;
+ displayValue = res.DisplayValue;
+ isNull = value == null;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the display value of this object
+ /// </summary>
+ /// <remarks>
+ /// This method returns a string to be used when showing the value of this object.
+ /// In most cases, the Value and DisplayValue properties return the same text, but there are some cases
+ /// in which DisplayValue may return a more convenient textual representation of the value, which
+ /// may not be a valid target language expression.
+ /// For example in C#, an enum Value includes the full enum type name (e.g. "Gtk.ResponseType.OK"),
+ /// while DisplayValue only has the enum value name ("OK").
+ /// </remarks>
+ public string DisplayValue {
+ get { return displayValue ?? Value; }
+ set { displayValue = value; }
+ }
+
+ /// <summary>
+ /// Sets the value of this object, using the default evaluation options
+ /// </summary>
+ public void SetValue (string value)
+ {
+ SetValue (value, parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Sets the value of this object, using the specified evaluation options
+ /// </summary>
+ /// <param name='value'>
+ /// The value
+ /// </param>
+ /// <param name='options'>
+ /// The options
+ /// </param>
+ /// <exception cref='InvalidOperationException'>
+ /// Is thrown if the value is read-only
+ /// </exception>
+ public void SetValue (string value, EvaluationOptions options)
+ {
+ if (IsReadOnly || source == null)
+ throw new InvalidOperationException ("Value is not editable");
+ EvaluationResult res = source.SetValue (path, value, options);
+ if (res != null) {
+ this.value = res.Value;
+ displayValue = res.DisplayValue;
+ }
+ }
+
+ /// <summary>
+ /// Gets the raw value of this object
+ /// </summary>
+ /// <returns>
+ /// The raw value.
+ /// </returns>
+ /// <remarks>
+ /// This method can be used to get the CLR value of the object. For example, if this ObjectValue is
+ /// a property of type String, this method will return the System.String value of the property.
+ /// If this ObjectValue refers to an object instead of a primitive value, then a RawValue object
+ /// will be returned. RawValue can be used to get and set members of an object, and to call methods.
+ /// If this ObjectValue refers to an array, then a RawValueArray object will be returned.
+ /// </remarks>
+ public object GetRawValue ()
+ {
+ EvaluationOptions ops = parentFrame.DebuggerSession.EvaluationOptions.Clone ();
+ ops.EllipsizeStrings = false;
+
+ return GetRawValue (ops);
+ }
+
+ /// <summary>
+ /// Gets the raw value of this object
+ /// </summary>
+ /// <param name='options'>
+ /// The evaluation options
+ /// </param>
+ /// <returns>
+ /// The raw value.
+ /// </returns>
+ /// <remarks>
+ /// This method can be used to get the CLR value of the object. For example, if this ObjectValue is
+ /// a property of type String, this method will return the System.String value of the property.
+ /// If this ObjectValue refers to an object instead of a primitive value, then a RawValue object
+ /// will be returned. RawValue can be used to get and set members of an object, and to call methods.
+ /// If this ObjectValue refers to an array, then a RawValueArray object will be returned.
+ /// </remarks>
+ public object GetRawValue (EvaluationOptions options)
+ {
+ object res = source.GetRawValue (path, options);
+ IRawObject val = res as IRawObject;
+ if (val != null)
+ val.Connect (parentFrame.DebuggerSession, options);
+ return res;
+ }
+
+ /// <summary>
+ /// Sets the raw value of this object
+ /// </summary>
+ /// <param name='value'>
+ /// The value
+ /// </param>
+ /// <remarks>
+ /// The provided value can be a primitive type, a RawValue object or a RawValueArray object.
+ /// </remarks>
+ public void SetRawValue (object value)
+ {
+ SetRawValue (value, parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Sets the raw value of this object
+ /// </summary>
+ /// <param name='value'>
+ /// The value
+ /// </param>
+ /// <param name='options'>
+ /// The evaluation options
+ /// </param>
+ /// <remarks>
+ /// The provided value can be a primitive type, a RawValue object or a RawValueArray object.
+ /// </remarks>
+ public void SetRawValue (object value, EvaluationOptions options)
+ {
+ source.SetRawValue (path, value, options);
+ }
+
+ /// <summary>
+ /// Full name of the type of the object
+ /// </summary>
+ public string TypeName {
+ get { return typeName; }
+ set { typeName = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the child selector.
+ /// </summary>
+ /// <remarks>
+ /// The child selector is an expression which can be concatenated to a parent expression to get this child.
+ /// For example, if this object is a reference to a field named 'foo' of an object, the child
+ /// selector is '.foo'.
+ /// </remarks>
+ public string ChildSelector {
+ get {
+ if (childSelector != null)
+ return childSelector;
+ if ((flags & ObjectValueFlags.ArrayElement) != 0)
+ return Name;
+ else
+ return "." + Name;
+ }
+ set { childSelector = value; }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this object has children.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance has children; otherwise, <c>false</c>.
+ /// </value>
+ public bool HasChildren {
+ get {
+ if (isNull)
+ return false;
+ if (IsEvaluating)
+ return false;
+ if (children != null)
+ return children.Count > 0;
+ else if (source == null)
+ return false;
+ else if (IsArray)
+ return arrayCount > 0;
+ else if (IsObject)
+ return true;
+ else
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Gets a child value
+ /// </summary>
+ /// <returns>
+ /// The child.
+ /// </returns>
+ /// <param name='name'>
+ /// Name of the member
+ /// </param>
+ /// <remarks>
+ /// This method can be used to get a member of an object (such as a field or property)
+ /// </remarks>
+ public ObjectValue GetChild (string name)
+ {
+ return GetChild (name, parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Gets a child value
+ /// </summary>
+ /// <returns>
+ /// The child.
+ /// </returns>
+ /// <param name='name'>
+ /// Name of the member
+ /// </param>
+ /// <param name='options'>
+ /// Options to be used to evaluate the child
+ /// </param>
+ /// <remarks>
+ /// This method can be used to get a member of an object (such as a field or property)
+ /// </remarks>
+ public ObjectValue GetChild (string name, EvaluationOptions options)
+ {
+ if (IsArray)
+ throw new InvalidOperationException ("Object is an array.");
+ if (IsEvaluating)
+ return null;
+
+ if (children == null) {
+ children = new List<ObjectValue> ();
+ if (source != null) {
+ try {
+ ObjectValue[] cs = source.GetChildren (path, -1, -1, options);
+ ConnectCallbacks (parentFrame, cs);
+ children.AddRange (cs);
+ } catch (Exception ex) {
+ children = null;
+ return CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly);
+ }
+ }
+ }
+
+ foreach (ObjectValue ob in children) {
+ if (ob.Name == name)
+ return ob;
+ }
+
+ return null;
+ }
+
+ /// <summary>
+ /// Gets all children of the object
+ /// </summary>
+ /// <returns>
+ /// An array of all child values
+ /// </returns>
+ public ObjectValue[] GetAllChildren ()
+ {
+ return GetAllChildren (parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Gets all children of the object
+ /// </summary>
+ /// <returns>
+ /// An array of all child values
+ /// </returns>
+ /// <param name='options'>
+ /// Options to be used to evaluate the children
+ /// </param>
+ public ObjectValue[] GetAllChildren (EvaluationOptions options)
+ {
+ if (IsEvaluating)
+ return new ObjectValue[0];
+
+ if (IsArray) {
+ GetArrayItem (arrayCount - 1);
+ return children.ToArray ();
+ }
+
+ if (children == null) {
+ children = new List<ObjectValue> ();
+ if (source != null) {
+ try {
+ ObjectValue[] cs = source.GetChildren (path, -1, -1, options);
+ ConnectCallbacks (parentFrame, cs);
+ children.AddRange (cs);
+ } catch (Exception ex) {
+ if (parentFrame != null)
+ parentFrame.DebuggerSession.OnDebuggerOutput (true, ex.ToString ());
+ children.Add (CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly));
+ }
+ }
+ }
+
+ return children.ToArray ();
+ }
+
+ /// <summary>
+ /// Gets an item of an array
+ /// </summary>
+ /// <returns>
+ /// The array item.
+ /// </returns>
+ /// <param name='index'>
+ /// Item index
+ /// </param>
+ /// <exception cref='InvalidOperationException'>
+ /// Is thrown if this object is not an array (IsArray returns false)
+ /// </exception>
+ public ObjectValue GetArrayItem (int index)
+ {
+ return GetArrayItem (index, parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Gets an item of an array
+ /// </summary>
+ /// <returns>
+ /// The array item.
+ /// </returns>
+ /// <param name='index'>
+ /// Item index
+ /// </param>
+ /// <param name='options'>
+ /// Options to be used to evaluate the item
+ /// </param>
+ /// <exception cref='InvalidOperationException'>
+ /// Is thrown if this object is not an array (IsArray returns false)
+ /// </exception>
+ public ObjectValue GetArrayItem (int index, EvaluationOptions options)
+ {
+ if (!IsArray)
+ throw new InvalidOperationException ("Object is not an array.");
+ if (index >= arrayCount || index < 0 || IsEvaluating)
+ throw new IndexOutOfRangeException ();
+
+ if (children == null)
+ children = new List<ObjectValue> ();
+ if (index >= children.Count) {
+ int nc = (index + 50);
+ if (nc > arrayCount) nc = arrayCount;
+ nc = nc - children.Count;
+ try {
+ ObjectValue[] items = source.GetChildren (path, children.Count, nc, options);
+ ConnectCallbacks (parentFrame, items);
+ children.AddRange (items);
+ } catch (Exception ex) {
+ return CreateFatalError ("", ex.Message, ObjectValueFlags.ArrayElement | ObjectValueFlags.ReadOnly);
+ }
+ }
+ return children [index];
+ }
+
+ /// <summary>
+ /// Gets the number of items of an array
+ /// </summary>
+ /// <exception cref='InvalidOperationException'>
+ /// Is thrown if this object is not an array (IsArray returns false)
+ /// </exception>
+ public int ArrayCount {
+ get {
+ if (!IsArray)
+ throw new InvalidOperationException ("Object is not an array.");
+ if (IsEvaluating)
+ return 0;
+ return arrayCount;
+ }
+ }
+
+ public bool IsReadOnly {
+ get { return HasFlag (ObjectValueFlags.ReadOnly); }
+ }
+
+ public bool IsArray {
+ get { return HasFlag (ObjectValueFlags.Array); }
+ }
+
+ public bool IsObject {
+ get { return HasFlag (ObjectValueFlags.Object); }
+ }
+
+ public bool IsPrimitive {
+ get { return HasFlag (ObjectValueFlags.Primitive); }
+ }
+
+ public bool IsUnknown {
+ get { return HasFlag (ObjectValueFlags.Unknown); }
+ }
+
+ public bool IsNotSupported {
+ get { return HasFlag (ObjectValueFlags.NotSupported); }
+ }
+
+ public bool IsError {
+ get { return HasFlag (ObjectValueFlags.Error); }
+ }
+
+ public bool IsEvaluating {
+ get { return HasFlag (ObjectValueFlags.Evaluating); }
+ }
+
+ public bool IsEvaluatingGroup {
+ get { return HasFlag (ObjectValueFlags.EvaluatingGroup); }
+ }
+
+ public bool CanRefresh {
+ get { return source != null && !HasFlag (ObjectValueFlags.NoRefresh); }
+ }
+
+ public bool HasFlag (ObjectValueFlags flag)
+ {
+ return (flags & flag) != 0;
+ }
+
+ public event EventHandler ValueChanged {
+ add {
+ lock (this) {
+ if (IsEvaluating)
+ valueChanged += value;
+ else
+ value (this, EventArgs.Empty);
+ }
+ }
+ remove {
+ lock (this) {
+ valueChanged -= value;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Refreshes the value of this object
+ /// </summary>
+ /// <remarks>
+ /// This method can be called to get a more up-to-date value for this object.
+ /// </remarks>
+ public void Refresh ()
+ {
+ Refresh (parentFrame.DebuggerSession.EvaluationOptions);
+ }
+
+ /// <summary>
+ /// Refreshes the value of this object
+ /// </summary>
+ /// <remarks>
+ /// This method can be called to get a more up-to-date value for this object.
+ /// </remarks>
+ public void Refresh (EvaluationOptions options)
+ {
+ if (!CanRefresh)
+ return;
+ ObjectValue val = source.GetValue (path, options);
+ UpdateFrom (val, false);
+ }
+
+ /// <summary>
+ /// Gets a wait handle which can be used to wait for the evaluation of this object to end
+ /// </summary>
+ /// <value>
+ /// The wait handle.
+ /// </value>
+ public WaitHandle WaitHandle {
+ get {
+ lock (this) {
+ if (evaluatedEvent == null)
+ evaluatedEvent = new ManualResetEvent (!IsEvaluating);
+ return evaluatedEvent;
+ }
+ }
+ }
+
+ internal IObjectValueUpdater Updater {
+ get { return updater; }
+ }
+
+ internal void UpdateFrom (ObjectValue val, bool notify)
+ {
+ lock (this) {
+ arrayCount = val.arrayCount;
+ if (val.name != null)
+ name = val.name;
+ value = val.value;
+ displayValue = val.displayValue;
+ typeName = val.typeName;
+ flags = val.flags;
+ source = val.source;
+ children = val.children;
+ path = val.path;
+ updater = val.updater;
+ ConnectCallbacks (parentFrame, this);
+ if (evaluatedEvent != null)
+ evaluatedEvent.Set ();
+ if (notify && valueChanged != null)
+ valueChanged (this, EventArgs.Empty);
+ }
+ }
+
+ internal UpdateCallback GetUpdateCallback ()
+ {
+ if (IsEvaluating) {
+ if (updateCallback == null)
+ updateCallback = new UpdateCallback (new UpdateCallbackProxy (this), path);
+ return updateCallback;
+ }
+
+ return null;
+ }
+
+ ~ObjectValue ()
+ {
+ if (updateCallback != null)
+ System.Runtime.Remoting.RemotingServices.Disconnect ((UpdateCallbackProxy)updateCallback.Callback);
+ }
+
+ internal static void ConnectCallbacks (StackFrame parentFrame, params ObjectValue[] values)
+ {
+ Dictionary<IObjectValueUpdater, List<UpdateCallback>> callbacks = null;
+ List<ObjectValue> valueList = new List<ObjectValue> (values);
+ for (int n=0; n<valueList.Count; n++) {
+ ObjectValue val = valueList [n];
+ val.source = parentFrame.DebuggerSession.WrapDebuggerObject (val.source);
+ val.updater = parentFrame.DebuggerSession.WrapDebuggerObject (val.updater);
+ val.parentFrame = parentFrame;
+ UpdateCallback cb = val.GetUpdateCallback ();
+ if (cb != null) {
+ if (callbacks == null)
+ callbacks = new Dictionary<IObjectValueUpdater, List<UpdateCallback>> ();
+ List<UpdateCallback> list;
+ if (!callbacks.TryGetValue (val.Updater, out list)) {
+ list = new List<UpdateCallback> ();
+ callbacks [val.Updater] = list;
+ }
+ list.Add (cb);
+ }
+ if (val.children != null)
+ valueList.AddRange (val.children);
+ }
+ if (callbacks != null) {
+ // Do the callback connection in a background thread
+ System.Threading.ThreadPool.QueueUserWorkItem (delegate {
+ foreach (KeyValuePair<IObjectValueUpdater, List<UpdateCallback>> cbs in callbacks) {
+ cbs.Key.RegisterUpdateCallbacks (cbs.Value.ToArray ());
+ }
+ });
+ }
+ }
+ }
+
+ class UpdateCallbackProxy: MarshalByRefObject, IObjectValueUpdateCallback
+ {
+ WeakReference valRef;
+
+ public void UpdateValue (ObjectValue newValue)
+ {
+ ObjectValue val = valRef.Target as ObjectValue;
+ if (val != null)
+ val.UpdateFrom (newValue, true);
+ }
+
+ public UpdateCallbackProxy (ObjectValue val)
+ {
+ valRef = new WeakReference (val);
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValueFlags.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectValueFlags.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValueFlags.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ObjectValueFlags.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ProcessEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ProcessEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ProcessEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ProcessEventArgs.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ProcessInfo.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/RawValue.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/RawValue.cs
new file mode 100644
index 0000000..a5e8774
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/RawValue.cs
@@ -0,0 +1,265 @@
+//
+// RawValue.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// 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 Mono.Debugging.Backend;
+
+namespace Mono.Debugging.Client
+{
+ /// <summary>
+ /// Represents an object in the process being debugged
+ /// </summary>
+ [Serializable]
+ public class RawValue: IRawObject
+ {
+ IRawValue source;
+ EvaluationOptions options;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValue"/> class.
+ /// </summary>
+ /// <param name='source'>
+ /// Value source
+ /// </param>
+ public RawValue (IRawValue source)
+ {
+ this.source = source;
+ }
+
+ void IRawObject.Connect (DebuggerSession session, EvaluationOptions options)
+ {
+ this.options = options;
+ source = session.WrapDebuggerObject (source);
+ }
+
+ internal IRawValue Source {
+ get { return this.source; }
+ }
+
+ /// <summary>
+ /// Full name of the type of the object
+ /// </summary>
+ public string TypeName { get; set; }
+
+ /// <summary>
+ /// Invokes a method on the object
+ /// </summary>
+ /// <returns>
+ /// The result of the invocation
+ /// </returns>
+ /// <param name='methodName'>
+ /// The name of the method
+ /// </param>
+ /// <param name='parameters'>
+ /// The parameters (primitive type values, RawValue instances or RawValueArray instances)
+ /// </param>
+ public object CallMethod (string methodName, params object[] parameters)
+ {
+ object res = source.CallMethod (methodName, parameters, options);
+ RawValue val = res as RawValue;
+ if (val != null)
+ val.options = options;
+ return res;
+ }
+
+ /// <summary>
+ /// Gets the value of a field or property
+ /// </summary>
+ /// <returns>
+ /// The value (a primitive type value, a RawValue instance or a RawValueArray instance)
+ /// </returns>
+ /// <param name='name'>
+ /// Name of the field or property
+ /// </param>
+ public object GetMemberValue (string name)
+ {
+ object res = source.GetMemberValue (name, options);
+ RawValue val = res as RawValue;
+ if (val != null)
+ val.options = options;
+ return res;
+ }
+
+ /// <summary>
+ /// Sets the value of a field or property
+ /// </summary>
+ /// <param name='name'>
+ /// Name of the field or property
+ /// </param>
+ /// <param name='value'>
+ /// The value (a primitive type value, a RawValue instance or a RawValueArray instance)
+ /// </param>
+ public void SetMemberValue (string name, object value)
+ {
+ source.SetMemberValue (name, value, options);
+ }
+ }
+
+ /// <summary>
+ /// Represents an array of objects in the process being debugged
+ /// </summary>
+ [Serializable]
+ public class RawValueArray: IRawObject
+ {
+ IRawValueArray source;
+ int[] dimensions;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValueArray"/> class.
+ /// </summary>
+ /// <param name='source'>
+ /// Value source.
+ /// </param>
+ public RawValueArray (IRawValueArray source)
+ {
+ this.source = source;
+ }
+
+ void IRawObject.Connect (DebuggerSession session, EvaluationOptions options)
+ {
+ source = session.WrapDebuggerObject (source);
+ }
+
+ internal IRawValueArray Source {
+ get { return this.source; }
+ }
+
+ /// <summary>
+ /// Full type name of the array items
+ /// </summary>
+ public string ElementTypeName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the item at the specified index.
+ /// </summary>
+ /// <param name='index'>
+ /// The index
+ /// </param>
+ /// <remarks>
+ /// The item value can be a primitive type value, a RawValue instance or a RawValueArray instance.
+ /// </remarks>
+ public object this [int index] {
+ get {
+ return source.GetValue (new int[] { index });
+ }
+ set {
+ source.SetValue (new int[] { index }, value);
+ }
+ }
+
+ /// <summary>
+ /// Returns an array with all items of the RawValueArray
+ /// </summary>
+ /// <remarks>
+ /// This method is useful to avoid unnecessary debugger-debuggee roundtrips
+ /// when processing all items of an array. For example, if a RawValueArray
+ /// represents an image encoded in a byte[], getting the values one by one
+ /// using the indexer is very slow. The ToArray() will return the whole byte[]
+ /// in a single call.
+ /// </remarks>
+ public Array ToArray ()
+ {
+ return source.ToArray ();
+ }
+
+ /// <summary>
+ /// Gets the length of the array
+ /// </summary>
+ public int Length {
+ get {
+ if (dimensions == null)
+ dimensions = source.Dimensions;
+ return dimensions[0];
+ }
+ }
+ }
+
+ /// <summary>
+ /// Represents a string object in the process being debugged
+ /// </summary>
+ [Serializable]
+ public class RawValueString: IRawObject
+ {
+ IRawValueString source;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValueString"/> class.
+ /// </summary>
+ /// <param name='source'>
+ /// Value source.
+ /// </param>
+ public RawValueString (IRawValueString source)
+ {
+ this.source = source;
+ }
+
+ void IRawObject.Connect (DebuggerSession session, EvaluationOptions options)
+ {
+ source = session.WrapDebuggerObject (source);
+ }
+
+ internal IRawValueString Source {
+ get { return this.source; }
+ }
+
+ /// <summary>
+ /// Gets the length of the string
+ /// </summary>
+ public int Length {
+ get { return source.Length; }
+ }
+
+ /// <summary>
+ /// Gets a substring of the string
+ /// </summary>
+ /// <param name='index'>
+ /// The starting index of the requested substring.
+ /// </param>
+ /// <param name='length'>
+ /// The length of the requested substring.
+ /// </param>
+ public string Substring (int index, int length)
+ {
+ return source.Substring (index, length);
+ }
+
+ /// <summary>
+ /// Gets the value.
+ /// </summary>
+ /// <value>
+ /// The value.
+ /// </value>
+ public string Value {
+ get { return source.Value; }
+ }
+ }
+
+ internal interface IRawObject
+ {
+ void Connect (DebuggerSession session, EvaluationOptions options);
+ }
+}
+
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/SourceLocation.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/SourceLocation.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/SourceLocation.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/SourceLocation.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/StackFrame.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/StackFrame.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/StackFrame.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/StackFrame.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/TargetEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/TargetEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/TargetEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/TargetEventArgs.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/TargetEventType.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/TargetEventType.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/TargetEventType.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/TargetEventType.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ThreadEventArgs.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ThreadEventArgs.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ThreadEventArgs.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ThreadEventArgs.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ThreadInfo.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ThreadInfo.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Client/ThreadInfo.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Client/ThreadInfo.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ArrayElementGroup.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ArrayValueReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ArrayValueReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ArrayValueReference.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/AsyncEvaluationTracker.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/AsyncEvaluationTracker.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/AsyncEvaluationTracker.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/AsyncEvaluationTracker.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/AsyncOperationManager.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/AsyncOperationManager.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/AsyncOperationManager.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/AsyncOperationManager.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseBacktrace.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/BaseBacktrace.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseBacktrace.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/BaseBacktrace.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs
new file mode 100644
index 0000000..fd871e9
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs
@@ -0,0 +1,89 @@
+//
+// BaseTypeViewSource.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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 Mono.Debugging.Backend;
+using Mono.Debugging.Client;
+
+namespace Mono.Debugging.Evaluation
+{
+ public class BaseTypeViewSource: RemoteFrameObject, IObjectValueSource
+ {
+ EvaluationContext ctx;
+ object type;
+ object obj;
+ IObjectSource objectSource;
+
+ public BaseTypeViewSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
+ {
+ this.ctx = ctx;
+ this.type = type;
+ this.obj = obj;
+ this.objectSource = objectSource;
+ }
+
+ public static ObjectValue CreateBaseTypeView (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
+ {
+ BaseTypeViewSource src = new BaseTypeViewSource (ctx, objectSource, type, obj);
+ src.Connect ();
+ string tname = ctx.Adapter.GetDisplayTypeName (ctx, type);
+ ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("base"), tname, "{" + tname + "}", ObjectValueFlags.Type|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
+ val.ChildSelector = "";
+ return val;
+ }
+
+ #region IObjectValueSource implementation
+
+ public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
+ {
+ EvaluationContext cctx = ctx.WithOptions (options);
+ return cctx.Adapter.GetObjectValueChildren (cctx, objectSource, type, obj, index, count, false);
+ }
+
+ public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public object GetRawValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/EvaluationContext.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ExceptionInfoSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ExceptionInfoSource.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ExceptionInfoSource.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ExceptionInfoSource.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ExpressionEvaluator.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ExpressionEvaluator.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ExpressionEvaluator.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ExpressionEvaluator.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs
new file mode 100644
index 0000000..b45028b
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs
@@ -0,0 +1,123 @@
+//
+// FilteredMembersSource.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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.Linq;
+using System.Text;
+using System.Reflection;
+using Mono.Debugging.Client;
+using Mono.Debugging.Backend;
+using System.Diagnostics;
+
+namespace Mono.Debugging.Evaluation
+{
+ public class FilteredMembersSource: RemoteFrameObject, IObjectValueSource
+ {
+ object obj;
+ object type;
+ EvaluationContext ctx;
+ BindingFlags bindingFlags;
+ IObjectSource objectSource;
+
+ public FilteredMembersSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
+ {
+ this.ctx = ctx;
+ this.obj = obj;
+ this.type = type;
+ this.bindingFlags = bindingFlags;
+ this.objectSource = objectSource;
+ }
+
+ public static ObjectValue CreateNonPublicsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
+ {
+ return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Non-public members");
+ }
+
+ public static ObjectValue CreateStaticsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
+ {
+ return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Static members");
+ }
+
+ static ObjectValue CreateNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags, string label)
+ {
+ FilteredMembersSource src = new FilteredMembersSource (ctx, objectSource, type, obj, bindingFlags);
+ src.Connect ();
+ ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
+ val.ChildSelector = "";
+ return val;
+ }
+
+ public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
+ {
+ EvaluationContext cctx = ctx.WithOptions (options);
+ var names = new ObjectValueNameTracker (cctx);
+ object tdataType = null;
+ TypeDisplayData tdata = null;
+ List<ObjectValue> list = new List<ObjectValue> ();
+ foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
+ object decType = val.DeclaringType;
+ if (decType != null && decType != tdataType) {
+ tdataType = decType;
+ tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
+ }
+ DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
+ if (state == DebuggerBrowsableState.Never)
+ continue;
+ ObjectValue oval = val.CreateObjectValue (options);
+ names.Disambiguate (val, oval);
+ list.Add (oval);
+ }
+ if ((bindingFlags & BindingFlags.NonPublic) == 0) {
+ BindingFlags newFlags = bindingFlags | BindingFlags.NonPublic;
+ newFlags &= ~BindingFlags.Public;
+ list.Add (CreateNonPublicsNode (cctx, objectSource, type, obj, newFlags));
+ }
+ return list.ToArray ();
+ }
+
+ public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public object GetRawValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ICollectionAdaptor.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ICollectionAdaptor.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ICollectionAdaptor.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ICollectionAdaptor.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/IObjectSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/IObjectSource.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/IObjectSource.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/IObjectSource.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/IStringAdaptor.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/IStringAdaptor.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/IStringAdaptor.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/IStringAdaptor.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/LiteralValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/LiteralValueReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/LiteralValueReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/LiteralValueReference.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluator.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluator.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluator.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluator.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
new file mode 100644
index 0000000..9e7b5a8
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
@@ -0,0 +1,1371 @@
+//
+// NRefactoryExpressionEvaluatorVisitor.cs
+//
+// Author: Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Runtime.InteropServices;
+using System.Reflection;
+
+using Mono.Debugging.Client;
+
+using ICSharpCode.NRefactory.CSharp;
+
+namespace Mono.Debugging.Evaluation
+{
+ public class NRefactoryExpressionEvaluatorVisitor : IAstVisitor<ValueReference>
+ {
+ Dictionary<string,ValueReference> userVariables;
+ EvaluationOptions options;
+ EvaluationContext ctx;
+ object expectedType;
+ string expression;
+
+ public NRefactoryExpressionEvaluatorVisitor (EvaluationContext ctx, string expression, object expectedType, Dictionary<string,ValueReference> userVariables)
+ {
+ this.ctx = ctx;
+ this.expression = expression;
+ this.expectedType = expectedType;
+ this.userVariables = userVariables;
+ this.options = ctx.Options;
+ }
+
+ static Exception ParseError (string message, params object[] args)
+ {
+ return new EvaluatorException (message, args);
+ }
+
+ static Exception NotSupported ()
+ {
+ return new NotSupportedExpressionException ();
+ }
+
+ static string ResolveTypeName (AstType type)
+ {
+ string name = type.ToString ();
+ if (name.StartsWith ("global::", StringComparison.Ordinal))
+ name = name.Substring ("global::".Length);
+ return name;
+ }
+
+ static long GetInteger (object val)
+ {
+ try {
+ return Convert.ToInt64 (val);
+ } catch {
+ throw ParseError ("Expected integer value.");
+ }
+ }
+
+ static string GetCommonOperationType (object v1, object v2)
+ {
+ if (v1 is double || v2 is double)
+ return "System.Double";
+
+ if (v1 is float || v2 is float)
+ return "System.Double";
+
+ return "System.Int64";
+ }
+
+ static Type GetCommonType (object v1, object v2)
+ {
+ int s1 = Marshal.SizeOf (v1);
+ if (IsUnsigned (s1))
+ s1 += 8;
+ int s2 = Marshal.SizeOf (v2);
+ if (IsUnsigned (s2))
+ s2 += 8;
+ if (s1 > s2)
+ return v1.GetType ();
+ return v2.GetType ();
+ }
+
+ static bool IsUnsigned (object v)
+ {
+ return (v is byte) || (v is ushort) || (v is uint) || (v is ulong);
+ }
+
+ static object EvaluateOperation (BinaryOperatorType op, double v1, double v2)
+ {
+ switch (op) {
+ case BinaryOperatorType.Add: return v1 + v2;
+ case BinaryOperatorType.Divide: return v1 / v2;
+ case BinaryOperatorType.Multiply: return v1 * v2;
+ case BinaryOperatorType.Subtract: return v1 - v2;
+ case BinaryOperatorType.GreaterThan: return v1 > v2;
+ case BinaryOperatorType.GreaterThanOrEqual: return v1 >= v2;
+ case BinaryOperatorType.LessThan: return v1 < v2;
+ case BinaryOperatorType.LessThanOrEqual: return v1 <= v2;
+ case BinaryOperatorType.Equality: return v1 == v2;
+ case BinaryOperatorType.InEquality: return v1 != v2;
+ default: throw ParseError ("Invalid binary operator.");
+ }
+ }
+
+ static object EvaluateOperation (BinaryOperatorType op, long v1, long v2)
+ {
+ switch (op) {
+ case BinaryOperatorType.Add: return v1 + v2;
+ case BinaryOperatorType.BitwiseAnd: return v1 & v2;
+ case BinaryOperatorType.BitwiseOr: return v1 | v2;
+ case BinaryOperatorType.ExclusiveOr: return v1 ^ v2;
+ case BinaryOperatorType.Divide: return v1 / v2;
+ case BinaryOperatorType.Modulus: return v1 % v2;
+ case BinaryOperatorType.Multiply: return v1 * v2;
+ case BinaryOperatorType.ShiftLeft: return v1 << (int) v2;
+ case BinaryOperatorType.ShiftRight: return v1 >> (int) v2;
+ case BinaryOperatorType.Subtract: return v1 - v2;
+ case BinaryOperatorType.GreaterThan: return v1 > v2;
+ case BinaryOperatorType.GreaterThanOrEqual: return v1 >= v2;
+ case BinaryOperatorType.LessThan: return v1 < v2;
+ case BinaryOperatorType.LessThanOrEqual: return v1 <= v2;
+ case BinaryOperatorType.Equality: return v1 == v2;
+ case BinaryOperatorType.InEquality: return v1 != v2;
+ default: throw ParseError ("Invalid binary operator.");
+ }
+ }
+
+ static object EvaluateStringOperation (BinaryOperatorType op, object v1, object v2)
+ {
+ switch (op) {
+ case BinaryOperatorType.Equality:
+ if (!(v1 == null || v1 is string) || !(v2 == null || v2 is string))
+ throw ParseError ("Invalid operands in binary operator.");
+ return ((string) v1) == ((string) v2);
+ case BinaryOperatorType.InEquality:
+ if (!(v1 == null || v1 is string) || !(v2 == null || v2 is string))
+ throw ParseError ("Invalid operands in binary operator.");
+ return ((string) v1) != ((string) v2);
+ case BinaryOperatorType.Add:
+ if (v1 == null) return v2.ToString ();
+ if (v2 == null) return v1.ToString ();
+ return v1.ToString () + v2.ToString ();
+ default:
+ throw ParseError ("Invalid operands in binary operator.");
+ }
+ }
+
+ static void ConvertValues<T> (EvaluationContext ctx, object actualV1, object actualV2, object toType, out T v1, out T v2)
+ {
+ try {
+ object c1 = ctx.Adapter.Cast (ctx, actualV1, toType);
+ v1 = (T) ctx.Adapter.TargetObjectToObject (ctx, c1);
+
+ object c2 = ctx.Adapter.Cast (ctx, actualV2, toType);
+ v2 = (T) ctx.Adapter.TargetObjectToObject (ctx, c2);
+ } catch {
+ throw ParseError ("Invalid operands in binary operator.");
+ }
+ }
+
+ static bool CheckReferenceEquality (EvaluationContext ctx, object v1, object v2)
+ {
+ if (v1 == null && v2 == null)
+ return true;
+
+ if (v1 == null || v2 == null)
+ return false;
+
+ object objectType = ctx.Adapter.GetType (ctx, "System.Object");
+ object[] argTypes = new object[] {
+ objectType, objectType
+ };
+ object[] args = new object[] {
+ v1, v2
+ };
+
+ object result = ctx.Adapter.RuntimeInvoke (ctx, objectType, null, "ReferenceEquals", argTypes, args);
+ var literal = LiteralValueReference.CreateTargetObjectLiteral (ctx, "result", result);
+
+ return (bool) literal.ObjectValue;
+ }
+
+ static bool CheckEquality (EvaluationContext ctx, bool negate, object v1, object v2)
+ {
+ if (v1 == null && v2 == null)
+ return true;
+
+ if (v1 == null || v2 == null)
+ return false;
+
+ string method = negate ? "op_Inequality" : "op_Equality";
+ object v1type = ctx.Adapter.GetValueType (ctx, v1);
+ object v2type = ctx.Adapter.GetValueType (ctx, v2);
+ object[] argTypes = new object[] { v2type };
+ object target, targetType;
+ object[] args;
+
+ if (ctx.Adapter.HasMethod (ctx, v1type, method, argTypes, BindingFlags.Instance | BindingFlags.Public)) {
+ args = new object[] { v2 };
+ targetType = v1type;
+ negate = false;
+ target = v1;
+ } else {
+ method = ctx.Adapter.IsValueType (v1type) ? "Equals" : "ReferenceEquals";
+ targetType = ctx.Adapter.GetType (ctx, "System.Object");
+ argTypes = new object[] { targetType, targetType };
+ args = new object[] { v1, v2 };
+ target = null;
+ }
+
+ object result = ctx.Adapter.RuntimeInvoke (ctx, targetType, target, method, argTypes, args);
+ var literal = LiteralValueReference.CreateTargetObjectLiteral (ctx, "result", result);
+ bool retval = (bool) literal.ObjectValue;
+
+ return negate ? !retval : retval;
+ }
+
+ ValueReference EvaluateBinaryOperatorExpression (BinaryOperatorType op, ValueReference left, Expression rightExp)
+ {
+ if (op == BinaryOperatorType.ConditionalAnd) {
+ object val = left.ObjectValue;
+ if (!(val is bool))
+ throw ParseError ("Left operand of logical And must be a boolean.");
+ if (!(bool)val)
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, false);
+ ValueReference vr = rightExp.AcceptVisitor<ValueReference> (this);
+ if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
+ throw ParseError ("Right operand of logical And must be a boolean.");
+ return vr;
+ } else if (op == BinaryOperatorType.ConditionalOr) {
+ object val = left.ObjectValue;
+ if (!(val is bool))
+ throw ParseError ("Left operand of logical Or must be a boolean.");
+ if ((bool)val)
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, true);
+ ValueReference vr = rightExp.AcceptVisitor<ValueReference> (this);
+ if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
+ throw ParseError ("Right operand of logical Or must be a boolean.");
+ return vr;
+ }
+
+ ValueReference right = rightExp.AcceptVisitor<ValueReference> (this);
+ object targetVal1 = left.Value;
+ object targetVal2 = right.Value;
+ object val1 = left.ObjectValue;
+ object val2 = right.ObjectValue;
+
+ if (op == BinaryOperatorType.Add) {
+ if (val1 is string || val2 is string) {
+ if (!(val1 is string) && val1 != null)
+ val1 = ctx.Adapter.CallToString (ctx, targetVal1);
+ if (!(val2 is string) && val2 != null)
+ val2 = ctx.Adapter.CallToString (ctx, targetVal2);
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, (string) val1 + (string) val2);
+ }
+ }
+
+ if ((op == BinaryOperatorType.ExclusiveOr) && (val1 is bool) && (val2 is bool))
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, (bool) val1 ^ (bool) val2);
+
+ if ((val1 == null || !ctx.Adapter.IsPrimitive (ctx, targetVal1)) && (val2 == null || !ctx.Adapter.IsPrimitive (ctx, targetVal2))) {
+ switch (op) {
+ case BinaryOperatorType.Equality:
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, CheckEquality (ctx, false, targetVal1, targetVal2));
+ case BinaryOperatorType.InEquality:
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, CheckEquality (ctx, true, targetVal1, targetVal2));
+ }
+ }
+
+ object res;
+
+ if (val1 is string || val2 is string) {
+ res = EvaluateStringOperation (op, val1, val2);
+ } else {
+ if (val1 == null || val2 == null || (val1 is bool) || (val2 is bool))
+ throw ParseError ("Invalid operands in binary operator.");
+
+ string opTypeName = GetCommonOperationType (val1, val2);
+ object opType = ctx.Adapter.GetType (ctx, opTypeName);
+
+ if (opTypeName == "System.Double") {
+ double v1, v2;
+
+ ConvertValues<double> (ctx, targetVal1, targetVal2, opType, out v1, out v2);
+ res = EvaluateOperation (op, v1, v2);
+ } else {
+ long v1, v2;
+
+ ConvertValues<long> (ctx, targetVal1, targetVal2, opType, out v1, out v2);
+ res = EvaluateOperation (op, v1, v2);
+ }
+ }
+
+ if (!(res is bool) && !(res is string)) {
+ if (ctx.Adapter.IsEnum (ctx, targetVal1)) {
+ object tval = ctx.Adapter.Cast (ctx, ctx.Adapter.CreateValue (ctx, res), ctx.Adapter.GetValueType (ctx, targetVal1));
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, tval);
+ }
+
+ if (ctx.Adapter.IsEnum (ctx, targetVal2)) {
+ object tval = ctx.Adapter.Cast (ctx, ctx.Adapter.CreateValue (ctx, res), ctx.Adapter.GetValueType (ctx, targetVal2));
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, tval);
+ }
+
+ res = Convert.ChangeType (res, GetCommonType (val1, val2));
+ }
+
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, res);
+ }
+
+ static string ResolveType (EvaluationContext ctx, MemberReferenceExpression mre, List<object> args)
+ {
+ string parent, name;
+
+ if (mre.Target is MemberReferenceExpression) {
+ parent = ResolveType (ctx, (MemberReferenceExpression) mre.Target, args);
+ } else if (mre.Target is IdentifierExpression) {
+ parent = ((IdentifierExpression) mre.Target).Identifier;
+ } else {
+ return null;
+ }
+
+ name = parent + "." + mre.MemberName;
+ if (mre.TypeArguments.Count > 0) {
+ name += "`" + mre.TypeArguments.Count;
+ foreach (var arg in mre.TypeArguments) {
+ object resolved = arg.Resolve (ctx);
+
+ if (resolved == null)
+ return null;
+
+ args.Add (resolved);
+ }
+ }
+
+ return name;
+ }
+
+ static object ResolveType (EvaluationContext ctx, MemberReferenceExpression mre)
+ {
+ var args = new List<object> ();
+ var name = ResolveType (ctx, mre, args);
+
+ if (name == null)
+ return null;
+
+ if (args.Count > 0)
+ return ctx.Adapter.GetType (ctx, name, args.ToArray ());
+
+ return ctx.Adapter.GetType (ctx, name);
+ }
+
+ static ValueReference ResolveTypeValueReference (EvaluationContext ctx, MemberReferenceExpression mre)
+ {
+ object resolved = ResolveType (ctx, mre);
+
+ if (resolved != null) {
+ ctx.Adapter.ForceLoadType (ctx, resolved);
+
+ return new TypeValueReference (ctx, resolved);
+ }
+
+ throw ParseError ("Could not resolve type: {0}", mre);
+ }
+
+ static ValueReference ResolveTypeValueReference (EvaluationContext ctx, AstType type)
+ {
+ object resolved = type.Resolve (ctx);
+
+ if (resolved != null) {
+ ctx.Adapter.ForceLoadType (ctx, resolved);
+
+ return new TypeValueReference (ctx, resolved);
+ }
+
+ throw ParseError ("Could not resolve type: {0}", ResolveTypeName (type));
+ }
+
+ #region IAstVisitor implementation
+
+ public ValueReference VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUndocumentedExpression (UndocumentedExpression undocumentedExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitArrayCreateExpression (ArrayCreateExpression arrayCreateExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitArrayInitializerExpression (ArrayInitializerExpression arrayInitializerExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitAsExpression (AsExpression asExpression)
+ {
+ var type = asExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
+ if (type == null)
+ throw ParseError ("Invalid type in cast.");
+
+ var val = asExpression.Expression.AcceptVisitor<ValueReference> (this);
+ var result = ctx.Adapter.TryCast (ctx, val.Value, type.Type);
+
+ if (result == null)
+ return new NullValueReference (ctx, type.Type);
+
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, result);
+ }
+
+ public ValueReference VisitAssignmentExpression (AssignmentExpression assignmentExpression)
+ {
+ if (!options.AllowMethodEvaluation)
+ throw NotSupported ();
+
+ var left = assignmentExpression.Left.AcceptVisitor<ValueReference> (this);
+
+ if (assignmentExpression.Operator == AssignmentOperatorType.Assign) {
+ var right = assignmentExpression.Right.AcceptVisitor<ValueReference> (this);
+ left.Value = right.Value;
+ } else {
+ BinaryOperatorType op;
+
+ switch (assignmentExpression.Operator) {
+ case AssignmentOperatorType.Add: op = BinaryOperatorType.Add; break;
+ case AssignmentOperatorType.Subtract: op = BinaryOperatorType.Subtract; break;
+ case AssignmentOperatorType.Multiply: op = BinaryOperatorType.Multiply; break;
+ case AssignmentOperatorType.Divide: op = BinaryOperatorType.Divide; break;
+ case AssignmentOperatorType.Modulus: op = BinaryOperatorType.Modulus; break;
+ case AssignmentOperatorType.ShiftLeft: op = BinaryOperatorType.ShiftLeft; break;
+ case AssignmentOperatorType.ShiftRight: op = BinaryOperatorType.ShiftRight; break;
+ case AssignmentOperatorType.BitwiseAnd: op = BinaryOperatorType.BitwiseAnd; break;
+ case AssignmentOperatorType.BitwiseOr: op = BinaryOperatorType.BitwiseOr; break;
+ case AssignmentOperatorType.ExclusiveOr: op = BinaryOperatorType.ExclusiveOr; break;
+ default: throw ParseError ("Invalid operator in assignment.");
+ }
+
+ var result = EvaluateBinaryOperatorExpression (op, left, assignmentExpression.Right);
+ left.Value = result.Value;
+ }
+
+ return left;
+ }
+
+ public ValueReference VisitBaseReferenceExpression (BaseReferenceExpression baseReferenceExpression)
+ {
+ var self = ctx.Adapter.GetThisReference (ctx);
+
+ if (self != null)
+ return LiteralValueReference.CreateTargetBaseObjectLiteral (ctx, expression, self.Value);
+
+ throw ParseError ("'base' reference not available in static methods.");
+ }
+
+ public ValueReference VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
+ {
+ var left = binaryOperatorExpression.Left.AcceptVisitor<ValueReference> (this);
+
+ return EvaluateBinaryOperatorExpression (binaryOperatorExpression.Operator, left, binaryOperatorExpression.Right);
+ }
+
+ public ValueReference VisitCastExpression (CastExpression castExpression)
+ {
+ var type = castExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
+ if (type == null)
+ throw ParseError ("Invalid type in cast.");
+
+ var val = castExpression.Expression.AcceptVisitor<ValueReference> (this);
+ object result = ctx.Adapter.TryCast (ctx, val.Value, type.Type);
+ if (result == null)
+ throw ParseError ("Invalid cast.");
+
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, result);
+ }
+
+ public ValueReference VisitCheckedExpression (CheckedExpression checkedExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitConditionalExpression (ConditionalExpression conditionalExpression)
+ {
+ ValueReference val = conditionalExpression.Condition.AcceptVisitor<ValueReference> (this);
+ if (val is TypeValueReference)
+ throw NotSupported ();
+
+ if ((bool) val.ObjectValue)
+ return conditionalExpression.TrueExpression.AcceptVisitor<ValueReference> (this);
+
+ return conditionalExpression.FalseExpression.AcceptVisitor<ValueReference> (this);
+ }
+
+ public ValueReference VisitDefaultValueExpression (DefaultValueExpression defaultValueExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitDirectionExpression (DirectionExpression directionExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitIdentifierExpression (IdentifierExpression identifierExpression)
+ {
+ var name = identifierExpression.Identifier;
+
+ if (name == "__EXCEPTION_OBJECT__")
+ return ctx.Adapter.GetCurrentException (ctx);
+
+ // Look in user defined variables
+
+ ValueReference userVar;
+ if (userVariables.TryGetValue (name, out userVar))
+ return userVar;
+
+ // Look in variables
+
+ ValueReference var = ctx.Adapter.GetLocalVariable (ctx, name);
+ if (var != null)
+ return var;
+
+ // Look in parameters
+
+ var = ctx.Adapter.GetParameter (ctx, name);
+ if (var != null)
+ return var;
+
+ // Look in instance fields and properties
+
+ ValueReference self = ctx.Adapter.GetThisReference (ctx);
+
+ if (self != null) {
+ // check for fields and properties in this instance
+ var = ctx.Adapter.GetMember (ctx, self, self.Type, self.Value, name);
+ if (var != null)
+ return var;
+ }
+
+ // Look in static fields & properties of the enclosing type and all parent types
+
+ object type = ctx.Adapter.GetEnclosingType (ctx);
+ object vtype = type;
+
+ while (vtype != null) {
+ // check for static fields and properties
+ var = ctx.Adapter.GetMember (ctx, null, vtype, null, name);
+ if (var != null)
+ return var;
+
+ vtype = ctx.Adapter.GetParentType (ctx, vtype);
+ }
+
+ // Look in types
+
+ vtype = ctx.Adapter.GetType (ctx, name);
+ if (vtype != null)
+ return new TypeValueReference (ctx, vtype);
+
+ // Look in nested types
+
+ if (type != null) {
+ foreach (object ntype in ctx.Adapter.GetNestedTypes (ctx, type)) {
+ if (TypeValueReference.GetTypeName (ctx.Adapter.GetTypeName (ctx, ntype)) == name)
+ return new TypeValueReference (ctx, ntype);
+ }
+
+ string[] namespaces = ctx.Adapter.GetImportedNamespaces (ctx);
+ if (namespaces.Length > 0) {
+ // Look in namespaces
+ foreach (string ns in namespaces) {
+ string nm = ns + "." + name;
+ vtype = ctx.Adapter.ForceLoadType (ctx, nm);
+ if (vtype != null)
+ return new TypeValueReference (ctx, vtype);
+ }
+
+ foreach (string ns in namespaces) {
+ if (ns == name || ns.StartsWith (name + ".", StringComparison.InvariantCulture))
+ return new NamespaceValueReference (ctx, name);
+ }
+ }
+ }
+
+ if (self == null && ctx.Adapter.HasMember (ctx, type, name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
+ string message = string.Format ("An object reference is required for the non-static field, method, or property '{0}.{1}'.",
+ ctx.Adapter.GetDisplayTypeName (ctx, type), name);
+ throw ParseError (message);
+ }
+
+ throw ParseError ("Unknown identifier: {0}", name);
+ }
+
+ public ValueReference VisitIndexerExpression (IndexerExpression indexerExpression)
+ {
+ int n = 0;
+
+ var target = indexerExpression.Target.AcceptVisitor<ValueReference> (this);
+ if (target is TypeValueReference)
+ throw NotSupported ();
+
+ if (ctx.Adapter.IsArray (ctx, target.Value)) {
+ int[] indexes = new int [indexerExpression.Arguments.Count];
+
+ foreach (var arg in indexerExpression.Arguments) {
+ var index = arg.AcceptVisitor<ValueReference> (this);
+ indexes[n++] = (int) Convert.ChangeType (index.ObjectValue, typeof (int));
+ }
+
+ return new ArrayValueReference (ctx, target.Value, indexes);
+ }
+
+ object[] args = new object [indexerExpression.Arguments.Count];
+ foreach (var arg in indexerExpression.Arguments)
+ args[n++] = arg.AcceptVisitor<ValueReference> (this).Value;
+
+ var indexer = ctx.Adapter.GetIndexerReference (ctx, target.Value, args);
+ if (indexer == null)
+ throw NotSupported ();
+
+ return indexer;
+ }
+
+ string ResolveMethodName (MemberReferenceExpression mre, out object[] typeArgs)
+ {
+ if (mre.TypeArguments.Count > 0) {
+ List<object> args = new List<object> ();
+
+ foreach (var arg in mre.TypeArguments) {
+ var type = arg.AcceptVisitor (this);
+ args.Add (type.Type);
+ }
+
+ typeArgs = args.ToArray ();
+ } else {
+ typeArgs = null;
+ }
+
+ return mre.MemberName;
+ }
+
+ public ValueReference VisitInvocationExpression (InvocationExpression invocationExpression)
+ {
+ if (!options.AllowMethodEvaluation)
+ throw NotSupported ();
+
+ bool invokeBaseMethod = false;
+ ValueReference target = null;
+ string methodName;
+
+ object[] types = new object [invocationExpression.Arguments.Count];
+ object[] args = new object [invocationExpression.Arguments.Count];
+ object[] typeArgs = null;
+ int n = 0;
+
+ foreach (var arg in invocationExpression.Arguments) {
+ var vref = arg.AcceptVisitor<ValueReference> (this);
+ args[n] = vref.Value;
+ types[n] = ctx.Adapter.GetValueType (ctx, args[n]);
+ n++;
+ }
+
+ if (invocationExpression.Target is MemberReferenceExpression) {
+ var field = (MemberReferenceExpression) invocationExpression.Target;
+ target = field.Target.AcceptVisitor<ValueReference> (this);
+ if (field.Target is BaseReferenceExpression)
+ invokeBaseMethod = true;
+ methodName = ResolveMethodName (field, out typeArgs);
+ } else if (invocationExpression.Target is IdentifierExpression) {
+ methodName = ((IdentifierExpression) invocationExpression.Target).Identifier;
+ var vref = ctx.Adapter.GetThisReference (ctx);
+
+ if (vref != null && ctx.Adapter.HasMethod (ctx, vref.Type, methodName, BindingFlags.Instance)) {
+ // There is an instance method for 'this', although it may not have an exact signature match. Check it now.
+ if (ctx.Adapter.HasMethod (ctx, vref.Type, methodName, types, BindingFlags.Instance)) {
+ target = vref;
+ } else {
+ // There isn't an instance method with exact signature match.
+ // If there isn't a static method, then use the instance method,
+ // which will report the signature match error when invoked
+ object etype = ctx.Adapter.GetEnclosingType (ctx);
+ if (!ctx.Adapter.HasMethod (ctx, etype, methodName, types, BindingFlags.Static))
+ target = vref;
+ }
+ } else {
+ if (ctx.Adapter.HasMethod (ctx, ctx.Adapter.GetEnclosingType (ctx), methodName, types, BindingFlags.Instance))
+ throw new EvaluatorException ("Cannot invoke an instance method from a static method.");
+ target = null;
+ }
+ } else {
+ throw NotSupported ();
+ }
+
+ object vtype = target != null ? target.Type : ctx.Adapter.GetEnclosingType (ctx);
+ object vtarget = (target is TypeValueReference) || target == null ? null : target.Value;
+
+ if (invokeBaseMethod) {
+ vtype = ctx.Adapter.GetBaseType (ctx, vtype);
+ } else if (target != null && !ctx.Adapter.HasMethod (ctx, vtype, methodName, typeArgs, types, BindingFlags.Instance | BindingFlags.Static)) {
+ // Look for LINQ extension methods...
+ var linq = ctx.Adapter.GetType (ctx, "System.Linq.Enumerable");
+ if (linq != null) {
+ object[] xtypeArgs = typeArgs;
+
+ if (xtypeArgs == null) {
+ // try to infer the generic type arguments from the type of the object...
+ object xtype = vtype;
+ while (xtype != null && !ctx.Adapter.IsGenericType (ctx, xtype))
+ xtype = ctx.Adapter.GetBaseType (ctx, xtype);
+
+ if (xtype != null)
+ xtypeArgs = ctx.Adapter.GetTypeArgs (ctx, xtype);
+ }
+
+ if (xtypeArgs != null) {
+ var xtypes = new object[types.Length + 1];
+ Array.Copy (types, 0, xtypes, 1, types.Length);
+ xtypes[0] = vtype;
+
+ var xargs = new object[args.Length + 1];
+ Array.Copy (args, 0, xargs, 1, args.Length);
+ xargs[0] = vtarget;
+
+ if (ctx.Adapter.HasMethod (ctx, linq, methodName, xtypeArgs, xtypes, BindingFlags.Static)) {
+ vtarget = null;
+ vtype = linq;
+
+ typeArgs = xtypeArgs;
+ types = xtypes;
+ args = xargs;
+ }
+ }
+ }
+ }
+
+ object result = ctx.Adapter.RuntimeInvoke (ctx, vtype, vtarget, methodName, typeArgs, types, args);
+ if (result != null)
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, result);
+
+ return LiteralValueReference.CreateVoidReturnLiteral (ctx, expression);
+ }
+
+ public ValueReference VisitIsExpression (IsExpression isExpression)
+ {
+ // FIXME: we could probably implement this one...
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitLambdaExpression (LambdaExpression lambdaExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitMemberReferenceExpression (MemberReferenceExpression memberReferenceExpression)
+ {
+ if (memberReferenceExpression.TypeArguments.Count > 0)
+ return ResolveTypeValueReference (ctx, memberReferenceExpression);
+
+ var target = memberReferenceExpression.Target.AcceptVisitor<ValueReference> (this);
+ var member = target.GetChild (memberReferenceExpression.MemberName, ctx.Options);
+
+ if (member == null) {
+ if (ctx.Adapter.IsNull (ctx, target.Value))
+ throw new EvaluatorException ("{0} is null", target.Name);
+
+ throw ParseError ("Unknown member: {0}", memberReferenceExpression.MemberName);
+ }
+
+ return member;
+ }
+
+ public ValueReference VisitNamedArgumentExpression (NamedArgumentExpression namedArgumentExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitNamedExpression (NamedExpression namedExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitNullReferenceExpression (NullReferenceExpression nullReferenceExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
+ {
+ var type = objectCreateExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
+ var args = new List<object> ();
+
+ foreach (var arg in objectCreateExpression.Arguments) {
+ var val = arg.AcceptVisitor<ValueReference> (this);
+ args.Add (val != null ? val.Value : null);
+ }
+
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, ctx.Adapter.CreateValue (ctx, type.Type, args.ToArray ()));
+ }
+
+ public ValueReference VisitAnonymousTypeCreateExpression (AnonymousTypeCreateExpression anonymousTypeCreateExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitParenthesizedExpression (ParenthesizedExpression parenthesizedExpression)
+ {
+ return parenthesizedExpression.Expression.AcceptVisitor<ValueReference> (this);
+ }
+
+ public ValueReference VisitPointerReferenceExpression (PointerReferenceExpression pointerReferenceExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitPrimitiveExpression (PrimitiveExpression primitiveExpression)
+ {
+ if (primitiveExpression.Value != null)
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, primitiveExpression.Value);
+
+ if (expectedType != null)
+ return new NullValueReference (ctx, expectedType);
+
+ return new NullValueReference (ctx, ctx.Adapter.GetType (ctx, "System.Object"));
+ }
+
+ public ValueReference VisitSizeOfExpression (SizeOfExpression sizeOfExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitStackAllocExpression (StackAllocExpression stackAllocExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitThisReferenceExpression (ThisReferenceExpression thisReferenceExpression)
+ {
+ var self = ctx.Adapter.GetThisReference (ctx);
+
+ if (self == null)
+ throw ParseError ("'this' reference not available in the current evaluation context.");
+
+ return self;
+ }
+
+ public ValueReference VisitTypeOfExpression (TypeOfExpression typeOfExpression)
+ {
+ var name = ResolveTypeName (typeOfExpression.Type);
+ var type = typeOfExpression.Type.Resolve (ctx);
+
+ if (type == null)
+ throw ParseError ("Could not load type: {0}", name);
+
+ object result = ctx.Adapter.CreateTypeObject (ctx, type);
+ if (result == null)
+ throw NotSupported ();
+
+ return LiteralValueReference.CreateTargetObjectLiteral (ctx, name, result);
+ }
+
+ public ValueReference VisitTypeReferenceExpression (TypeReferenceExpression typeReferenceExpression)
+ {
+ var type = typeReferenceExpression.Type.Resolve (ctx);
+
+ if (type != null) {
+ ctx.Adapter.ForceLoadType (ctx, type);
+
+ return new TypeValueReference (ctx, type);
+ }
+
+ var name = ResolveTypeName (typeReferenceExpression.Type);
+
+ // Assume it is a namespace.
+ return new NamespaceValueReference (ctx, name);
+ }
+
+ public ValueReference VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
+ {
+ var vref = unaryOperatorExpression.Expression.AcceptVisitor<ValueReference> (this);
+ var val = vref.ObjectValue;
+ object newVal;
+ long num;
+
+ switch (unaryOperatorExpression.Operator) {
+ case UnaryOperatorType.BitNot:
+ num = ~GetInteger (val);
+ val = Convert.ChangeType (num, val.GetType ());
+ break;
+ case UnaryOperatorType.Minus:
+ num = -GetInteger (val);
+ val = Convert.ChangeType (num, val.GetType ());
+ break;
+ case UnaryOperatorType.Not:
+ if (!(val is bool))
+ throw ParseError ("Expected boolean type in Not operator.");
+
+ val = !(bool) val;
+ break;
+ case UnaryOperatorType.PostDecrement:
+ num = GetInteger (val) - 1;
+ newVal = Convert.ChangeType (num, val.GetType ());
+ vref.Value = ctx.Adapter.CreateValue (ctx, newVal);
+ break;
+ case UnaryOperatorType.Decrement:
+ num = GetInteger (val) - 1;
+ val = Convert.ChangeType (num, val.GetType ());
+ vref.Value = ctx.Adapter.CreateValue (ctx, val);
+ break;
+ case UnaryOperatorType.PostIncrement:
+ num = GetInteger (val) + 1;
+ newVal = Convert.ChangeType (num, val.GetType ());
+ vref.Value = ctx.Adapter.CreateValue (ctx, newVal);
+ break;
+ case UnaryOperatorType.Increment:
+ num = GetInteger (val) + 1;
+ val = Convert.ChangeType (num, val.GetType ());
+ vref.Value = ctx.Adapter.CreateValue (ctx, val);
+ break;
+ case UnaryOperatorType.Plus:
+ break;
+ default:
+ throw NotSupported ();
+ }
+
+ return LiteralValueReference.CreateObjectLiteral (ctx, expression, val);
+ }
+
+ public ValueReference VisitUncheckedExpression (UncheckedExpression uncheckedExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitEmptyExpression (EmptyExpression emptyExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryExpression (QueryExpression queryExpression)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryFromClause (QueryFromClause queryFromClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryLetClause (QueryLetClause queryLetClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryWhereClause (QueryWhereClause queryWhereClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryJoinClause (QueryJoinClause queryJoinClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryOrderClause (QueryOrderClause queryOrderClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryOrdering (QueryOrdering queryOrdering)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQuerySelectClause (QuerySelectClause querySelectClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitQueryGroupClause (QueryGroupClause queryGroupClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitAttribute (ICSharpCode.NRefactory.CSharp.Attribute attribute)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitAttributeSection (AttributeSection attributeSection)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitDelegateDeclaration (DelegateDeclaration delegateDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitTypeDeclaration (TypeDeclaration typeDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUsingAliasDeclaration (UsingAliasDeclaration usingAliasDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUsingDeclaration (UsingDeclaration usingDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitExternAliasDeclaration (ExternAliasDeclaration externAliasDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitBlockStatement (BlockStatement blockStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitBreakStatement (BreakStatement breakStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitCheckedStatement (CheckedStatement checkedStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitContinueStatement (ContinueStatement continueStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitDoWhileStatement (DoWhileStatement doWhileStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitEmptyStatement (EmptyStatement emptyStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitExpressionStatement (ExpressionStatement expressionStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitFixedStatement (FixedStatement fixedStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitForeachStatement (ForeachStatement foreachStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitForStatement (ForStatement forStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitGotoCaseStatement (GotoCaseStatement gotoCaseStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitGotoDefaultStatement (GotoDefaultStatement gotoDefaultStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitGotoStatement (GotoStatement gotoStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitIfElseStatement (IfElseStatement ifElseStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitLabelStatement (LabelStatement labelStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitLockStatement (LockStatement lockStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitReturnStatement (ReturnStatement returnStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitSwitchStatement (SwitchStatement switchStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitSwitchSection (SwitchSection switchSection)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitCaseLabel (CaseLabel caseLabel)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitThrowStatement (ThrowStatement throwStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitTryCatchStatement (TryCatchStatement tryCatchStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitCatchClause (CatchClause catchClause)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUncheckedStatement (UncheckedStatement uncheckedStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUnsafeStatement (UnsafeStatement unsafeStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitUsingStatement (UsingStatement usingStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitVariableDeclarationStatement (VariableDeclarationStatement variableDeclarationStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitWhileStatement (WhileStatement whileStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitYieldBreakStatement (YieldBreakStatement yieldBreakStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitYieldReturnStatement (YieldReturnStatement yieldReturnStatement)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitAccessor (Accessor accessor)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitConstructorInitializer (ConstructorInitializer constructorInitializer)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitEventDeclaration (EventDeclaration eventDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitCustomEventDeclaration (CustomEventDeclaration customEventDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitFieldDeclaration (FieldDeclaration fieldDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitIndexerDeclaration (IndexerDeclaration indexerDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitVariableInitializer (VariableInitializer variableInitializer)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitFixedVariableInitializer (FixedVariableInitializer fixedVariableInitializer)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitSyntaxTree (SyntaxTree syntaxTree)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitSimpleType (SimpleType simpleType)
+ {
+ return ResolveTypeValueReference (ctx, simpleType);
+ }
+
+ public ValueReference VisitMemberType (MemberType memberType)
+ {
+ return ResolveTypeValueReference (ctx, memberType);
+ }
+
+ public ValueReference VisitComposedType (ComposedType composedType)
+ {
+ return ResolveTypeValueReference (ctx, composedType);
+ }
+
+ public ValueReference VisitArraySpecifier (ArraySpecifier arraySpecifier)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitPrimitiveType (PrimitiveType primitiveType)
+ {
+ return ResolveTypeValueReference (ctx, primitiveType);
+ }
+
+ public ValueReference VisitComment (Comment comment)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitWhitespace (WhitespaceNode whitespaceNode)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitText (TextNode textNode)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitNewLine (NewLineNode newLineNode)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitPreProcessorDirective (PreProcessorDirective preProcessorDirective)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitDocumentationReference (DocumentationReference documentationReference)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitTypeParameterDeclaration (TypeParameterDeclaration typeParameterDeclaration)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitConstraint (Constraint constraint)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitCSharpTokenNode (CSharpTokenNode cSharpTokenNode)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitIdentifier (Identifier identifier)
+ {
+ throw NotSupported ();
+ }
+
+ public ValueReference VisitPatternPlaceholder (AstNode placeholder, ICSharpCode.NRefactory.PatternMatching.Pattern pattern)
+ {
+ throw NotSupported ();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionResolverVisitor.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionResolverVisitor.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionResolverVisitor.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionResolverVisitor.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExtensions.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExtensions.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExtensions.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExtensions.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NamespaceValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NamespaceValueReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/NamespaceValueReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NamespaceValueReference.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NullValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NullValueReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/NullValueReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/NullValueReference.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
new file mode 100644
index 0000000..0acdff4
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
@@ -0,0 +1,1374 @@
+//
+// ObjectValueAdaptor.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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.Linq;
+using System.Text;
+using System.Reflection;
+using System.Diagnostics;
+using System.Collections.Generic;
+
+using Mono.Debugging.Client;
+using Mono.Debugging.Backend;
+
+namespace Mono.Debugging.Evaluation
+{
+ public abstract class ObjectValueAdaptor: IDisposable
+ {
+ Dictionary<string, TypeDisplayData> typeDisplayData = new Dictionary<string, TypeDisplayData> ();
+
+ // Time to wait while evaluating before switching to async mode
+ public int DefaultEvaluationWaitTime { get; set; }
+
+ public event EventHandler<BusyStateEventArgs> BusyStateChanged;
+
+ AsyncEvaluationTracker asyncEvaluationTracker = new AsyncEvaluationTracker ();
+ AsyncOperationManager asyncOperationManager = new AsyncOperationManager ();
+ static Dictionary<string, string> netToCSharpTypes = new Dictionary<string, string> ();
+
+ static ObjectValueAdaptor ()
+ {
+ netToCSharpTypes["System.Void"] = "void";
+ netToCSharpTypes["System.Object"] = "object";
+ netToCSharpTypes["System.Boolean"] = "bool";
+ netToCSharpTypes["System.Byte"] = "byte";
+ netToCSharpTypes["System.SByte"] = "sbyte";
+ netToCSharpTypes["System.Char"] = "char";
+ netToCSharpTypes["System.Enum"] = "enum";
+ netToCSharpTypes["System.Int16"] = "short";
+ netToCSharpTypes["System.Int32"] = "int";
+ netToCSharpTypes["System.Int64"] = "long";
+ netToCSharpTypes["System.UInt16"] = "ushort";
+ netToCSharpTypes["System.UInt32"] = "uint";
+ netToCSharpTypes["System.UInt64"] = "ulong";
+ netToCSharpTypes["System.Single"] = "float";
+ netToCSharpTypes["System.Double"] = "double";
+ netToCSharpTypes["System.Decimal"] = "decimal";
+ netToCSharpTypes["System.String"] = "string";
+ }
+
+ public ObjectValueAdaptor ()
+ {
+ DefaultEvaluationWaitTime = 100;
+
+ asyncOperationManager.BusyStateChanged += delegate(object sender, BusyStateEventArgs e) {
+ OnBusyStateChanged (e);
+ };
+ asyncEvaluationTracker.WaitTime = DefaultEvaluationWaitTime;
+ }
+
+ public void Dispose ()
+ {
+ asyncEvaluationTracker.Dispose ();
+ asyncOperationManager.Dispose ();
+ }
+
+ public ObjectValue CreateObjectValue (EvaluationContext ctx, IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
+ {
+ try {
+ return CreateObjectValueImpl (ctx, source, path, obj, flags);
+ } catch (EvaluatorAbortedException ex) {
+ return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
+ } catch (EvaluatorException ex) {
+ return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
+ } catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
+ }
+ }
+
+ public virtual string GetDisplayTypeName (string typeName)
+ {
+ return GetDisplayTypeName (typeName.Replace ('+', '.'), 0, typeName.Length);
+ }
+
+ public string GetDisplayTypeName (EvaluationContext ctx, object type)
+ {
+ return GetDisplayTypeName (GetTypeName (ctx, type));
+ }
+
+ string GetDisplayTypeName (string typeName, int startIndex, int endIndex)
+ {
+ // Note: '[' denotes the start of an array
+ // '`' denotes a generic type
+ // ',' denotes the start of the assembly name
+ int tokenIndex = typeName.IndexOfAny (new char [] { '[', '`', ',' }, startIndex, endIndex - startIndex);
+ List<string> genericArgs = null;
+ string array = string.Empty;
+ int genericEndIndex = -1;
+ int typeEndIndex;
+
+ retry:
+ if (tokenIndex == -1) // Simple type
+ return GetShortTypeName (typeName.Substring (startIndex, endIndex - startIndex));
+
+ if (typeName[tokenIndex] == ',') // Simple type with an assembly name
+ return GetShortTypeName (typeName.Substring (startIndex, tokenIndex - startIndex));
+
+ // save the index of the end of the type name
+ typeEndIndex = tokenIndex;
+
+ // decode generic args first, if this is a generic type
+ if (typeName[tokenIndex] == '`') {
+ genericEndIndex = typeName.IndexOf ('[', tokenIndex, endIndex - tokenIndex);
+ if (genericEndIndex == -1) {
+ // Mono's compiler seems to generate non-generic types with '`'s in the name
+ // e.g. __EventHandler`1_FileCopyEventArgs_DelegateFactory_2
+ tokenIndex = typeName.IndexOfAny (new char [] { '[', ',' }, tokenIndex, endIndex - tokenIndex);
+ goto retry;
+ }
+
+ tokenIndex = genericEndIndex;
+ genericArgs = GetGenericArguments (typeName, ref tokenIndex, endIndex);
+ }
+
+ // decode array rank info
+ while (tokenIndex < endIndex && typeName[tokenIndex] == '[') {
+ int arrayEndIndex = typeName.IndexOf (']', tokenIndex, endIndex - tokenIndex);
+ if (arrayEndIndex == -1)
+ break;
+ arrayEndIndex++;
+ array += typeName.Substring (tokenIndex, arrayEndIndex - tokenIndex);
+ tokenIndex = arrayEndIndex;
+ }
+
+ string name = typeName.Substring (startIndex, typeEndIndex - startIndex);
+
+ if (genericArgs == null)
+ return GetShortTypeName (name) + array;
+
+ // Use the prettier name for nullable types
+ if (name == "System.Nullable" && genericArgs.Count == 1)
+ return genericArgs[0] + "?" + array;
+
+ // Insert the generic arguments next to each type.
+ // for example: Foo`1+Bar`1[System.Int32,System.String]
+ // is converted to: Foo<int>.Bar<string>
+ StringBuilder sb = new StringBuilder (name);
+ int i = typeEndIndex + 1;
+ int genericIndex = 0;
+ int argCount, next;
+
+ while (i < genericEndIndex) {
+ // decode the argument count
+ argCount = 0;
+ while (i < genericEndIndex && char.IsDigit (typeName[i])) {
+ argCount = (argCount * 10) + (typeName[i] - '0');
+ i++;
+ }
+
+ // insert the argument types
+ sb.Append ('<');
+ while (argCount > 0 && genericIndex < genericArgs.Count) {
+ sb.Append (genericArgs[genericIndex++]);
+ if (--argCount > 0)
+ sb.Append (',');
+ }
+ sb.Append ('>');
+
+ // Find the end of the next generic type component
+ if ((next = typeName.IndexOf ('`', i, genericEndIndex - i)) == -1)
+ next = genericEndIndex;
+
+ // Append the next generic type component
+ sb.Append (typeName.Substring (i, next - i));
+
+ i = next + 1;
+ }
+
+ return sb.ToString () + array;
+ }
+
+ List<string> GetGenericArguments (string typeName, ref int i, int endIndex)
+ {
+ // Get a list of the generic arguments.
+ // When returning, i points to the next char after the closing ']'
+ List<string> genericArgs = new List<string> ();
+ i++;
+ while (i < endIndex && typeName [i] != ']') {
+ int pend = FindTypeEnd (typeName, i, endIndex);
+ bool escaped = typeName [i] == '[';
+ genericArgs.Add (GetDisplayTypeName (typeName, escaped ? i + 1 : i, escaped ? pend - 1 : pend));
+ i = pend;
+ if (i < endIndex && typeName[i] == ',')
+ i++;
+ }
+ i++;
+ return genericArgs;
+ }
+
+ int FindTypeEnd (string s, int i, int endIndex)
+ {
+ int bc = 0;
+ while (i < endIndex) {
+ char c = s[i];
+ if (c == '[')
+ bc++;
+ else if (c == ']') {
+ if (bc > 0)
+ bc--;
+ else
+ return i;
+ }
+ else if (c == ',' && bc == 0)
+ return i;
+ i++;
+ }
+ return i;
+ }
+
+ public virtual string GetShortTypeName (string typeName)
+ {
+ int star = typeName.IndexOf ('*');
+ string name, ptr, csharp;
+
+ if (star != -1) {
+ name = typeName.Substring (0, star);
+ ptr = typeName.Substring (star);
+ } else {
+ ptr = string.Empty;
+ name = typeName;
+ }
+
+ if (netToCSharpTypes.TryGetValue (name, out csharp))
+ return csharp + ptr;
+
+ return typeName;
+ }
+
+ public virtual void OnBusyStateChanged (BusyStateEventArgs e)
+ {
+ EventHandler<BusyStateEventArgs> evnt = BusyStateChanged;
+ if (evnt != null)
+ evnt (this, e);
+ }
+
+ public abstract ICollectionAdaptor CreateArrayAdaptor (EvaluationContext ctx, object arr);
+ public abstract IStringAdaptor CreateStringAdaptor (EvaluationContext ctx, object str);
+
+ public abstract bool IsNull (EvaluationContext ctx, object val);
+ public abstract bool IsPrimitive (EvaluationContext ctx, object val);
+ public abstract bool IsPointer (EvaluationContext ctx, object val);
+ public abstract bool IsString (EvaluationContext ctx, object val);
+ public abstract bool IsArray (EvaluationContext ctx, object val);
+ public abstract bool IsEnum (EvaluationContext ctx, object val);
+ public abstract bool IsValueType (object type);
+ public abstract bool IsClass (object type);
+ public abstract object TryCast (EvaluationContext ctx, object val, object type);
+
+ public abstract object GetValueType (EvaluationContext ctx, object val);
+ public abstract string GetTypeName (EvaluationContext ctx, object type);
+ public abstract object[] GetTypeArgs (EvaluationContext ctx, object type);
+ public abstract object GetBaseType (EvaluationContext ctx, object type);
+
+ public virtual bool IsGenericType (EvaluationContext ctx, object type)
+ {
+ return type != null && GetTypeName (ctx, type).IndexOf ('`') != -1;
+ }
+
+ public virtual bool IsNullableType (EvaluationContext ctx, object type)
+ {
+ return type != null && GetTypeName (ctx, type).StartsWith ("System.Nullable`1", StringComparison.Ordinal);
+ }
+
+ public virtual bool NullableHasValue (EvaluationContext ctx, object type, object obj)
+ {
+ ValueReference hasValue = GetMember (ctx, type, obj, "HasValue");
+
+ return (bool) hasValue.ObjectValue;
+ }
+
+ public virtual ValueReference NullableGetValue (EvaluationContext ctx, object type, object obj)
+ {
+ return GetMember (ctx, type, obj, "Value");
+ }
+
+ public virtual bool IsFlagsEnumType (EvaluationContext ctx, object type)
+ {
+ return true;
+ }
+
+ public virtual IEnumerable<EnumMember> GetEnumMembers (EvaluationContext ctx, object type)
+ {
+ object longType = GetType (ctx, "System.Int64");
+ TypeValueReference tref = new TypeValueReference (ctx, type);
+ foreach (ValueReference cr in tref.GetChildReferences (ctx.Options)) {
+ object c = TryCast (ctx, cr.Value, longType);
+ if (c == null)
+ continue;
+ long val = (long) TargetObjectToObject (ctx, c);
+ EnumMember em = new EnumMember () { Name = cr.Name, Value = val };
+ yield return em;
+ }
+ }
+
+ public object GetBaseType (EvaluationContext ctx, object type, bool includeObjectClass)
+ {
+ object bt = GetBaseType (ctx, type);
+ string tn = bt != null ? GetTypeName (ctx, bt) : null;
+ if (!includeObjectClass && bt != null && (tn == "System.Object" || tn == "System.ValueType"))
+ return null;
+ else
+ return bt;
+ }
+
+ public virtual bool IsClassInstance (EvaluationContext ctx, object val)
+ {
+ return IsClass (GetValueType (ctx, val));
+ }
+
+ public virtual bool IsExternalType (EvaluationContext ctx, object type)
+ {
+ return false;
+ }
+
+ public object GetType (EvaluationContext ctx, string name)
+ {
+ return GetType (ctx, name, null);
+ }
+
+ public abstract object GetType (EvaluationContext ctx, string name, object[] typeArgs);
+
+ public virtual string GetValueTypeName (EvaluationContext ctx, object val)
+ {
+ return GetTypeName (ctx, GetValueType (ctx, val));
+ }
+
+ public virtual object CreateTypeObject (EvaluationContext ctx, object type)
+ {
+ return default (object);
+ }
+
+ public virtual bool IsTypeLoaded (EvaluationContext ctx, string typeName)
+ {
+ object t = GetType (ctx, typeName);
+
+ if (t == null)
+ return false;
+
+ return IsTypeLoaded (ctx, t);
+ }
+
+ public virtual bool IsTypeLoaded (EvaluationContext ctx, object type)
+ {
+ return true;
+ }
+
+ public virtual object ForceLoadType (EvaluationContext ctx, string typeName)
+ {
+ object t = GetType (ctx, typeName);
+
+ if (t == null || IsTypeLoaded (ctx, t))
+ return t;
+
+ if (ForceLoadType (ctx, t))
+ return t;
+
+ return null;
+ }
+
+ public virtual bool ForceLoadType (EvaluationContext ctx, object type)
+ {
+ return true;
+ }
+
+ public abstract object CreateValue (EvaluationContext ctx, object value);
+
+ public abstract object CreateValue (EvaluationContext ctx, object type, params object[] args);
+
+ public abstract object CreateNullValue (EvaluationContext ctx, object type);
+
+ public virtual object GetBaseValue (EvaluationContext ctx, object val)
+ {
+ return val;
+ }
+
+ public virtual string[] GetImportedNamespaces (EvaluationContext ctx)
+ {
+ return new string[0];
+ }
+
+ public virtual void GetNamespaceContents (EvaluationContext ctx, string namspace, out string[] childNamespaces, out string[] childTypes)
+ {
+ childTypes = childNamespaces = new string[0];
+ }
+
+ protected virtual ObjectValue CreateObjectValueImpl (EvaluationContext ctx, Mono.Debugging.Backend.IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
+ {
+ object type = obj != null ? GetValueType (ctx, obj) : null;
+ string typeName = type != null ? GetTypeName (ctx, type) : "";
+
+ if (obj == null || IsNull (ctx, obj)) {
+ return ObjectValue.CreateNullObject (source, path, GetDisplayTypeName (typeName), flags);
+ }
+ else if (IsPrimitive (ctx, obj) || IsEnum (ctx,obj)) {
+ return ObjectValue.CreatePrimitive (source, path, GetDisplayTypeName (typeName), ctx.Evaluator.TargetObjectToExpression (ctx, obj), flags);
+ }
+ else if (IsArray (ctx, obj)) {
+ return ObjectValue.CreateObject (source, path, GetDisplayTypeName (typeName), ctx.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
+ }
+ else {
+ EvaluationResult tvalue = null;
+ TypeDisplayData tdata = null;
+ string tname;
+
+ if (IsNullableType (ctx, type)) {
+ if (NullableHasValue (ctx, type, obj)) {
+ ValueReference value = NullableGetValue (ctx, type, obj);
+
+ tdata = GetTypeDisplayData (ctx, value.Type);
+ obj = value.Value;
+ } else {
+ tdata = GetTypeDisplayData (ctx, type);
+ tvalue = new EvaluationResult ("null");
+ }
+
+ tname = GetDisplayTypeName (typeName);
+ } else {
+ tdata = GetTypeDisplayData (ctx, type);
+
+ if (!string.IsNullOrEmpty (tdata.TypeDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
+ tname = EvaluateDisplayString (ctx, obj, tdata.TypeDisplayString);
+ else
+ tname = GetDisplayTypeName (typeName);
+ }
+
+ if (tvalue == null) {
+ if (!string.IsNullOrEmpty (tdata.ValueDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
+ tvalue = new EvaluationResult (EvaluateDisplayString (ctx, obj, tdata.ValueDisplayString));
+ else
+ tvalue = ctx.Evaluator.TargetObjectToExpression (ctx, obj);
+ }
+
+ ObjectValue oval = ObjectValue.CreateObject (source, path, tname, tvalue, flags, null);
+ if (!string.IsNullOrEmpty (tdata.NameDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
+ oval.Name = EvaluateDisplayString (ctx, obj, tdata.NameDisplayString);
+ return oval;
+ }
+ }
+
+ public ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object obj, int firstItemIndex, int count)
+ {
+ return GetObjectValueChildren (ctx, objectSource, GetValueType (ctx, obj), obj, firstItemIndex, count, true);
+ }
+
+ public virtual ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, int firstItemIndex, int count, bool dereferenceProxy)
+ {
+ if (obj is EvaluationResult)
+ return new ObjectValue[0];
+
+ if (IsArray (ctx, obj)) {
+ ArrayElementGroup agroup = new ArrayElementGroup (ctx, CreateArrayAdaptor (ctx, obj));
+ return agroup.GetChildren (ctx.Options);
+ }
+
+ if (IsPrimitive (ctx, obj))
+ return new ObjectValue[0];
+
+ if (IsNullableType (ctx, type)) {
+ if (NullableHasValue (ctx, type, obj)) {
+ ValueReference value = NullableGetValue (ctx, type, obj);
+
+ return GetObjectValueChildren (ctx, objectSource, value.Type, value.Value, firstItemIndex, count, dereferenceProxy);
+ } else {
+ return new ObjectValue[0];
+ }
+ }
+
+ bool showRawView = false;
+
+ // If there is a proxy, it has to show the members of the proxy
+ object proxy = obj;
+ if (dereferenceProxy) {
+ proxy = GetProxyObject (ctx, obj);
+ if (proxy != obj) {
+ type = GetValueType (ctx, proxy);
+ showRawView = true;
+ }
+ }
+
+ TypeDisplayData tdata = GetTypeDisplayData (ctx, type);
+ bool groupPrivateMembers = ctx.Options.GroupPrivateMembers || IsExternalType (ctx, type);
+
+ List<ObjectValue> values = new List<ObjectValue> ();
+ BindingFlags flattenFlag = ctx.Options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly;
+ BindingFlags nonPublicFlag = !(groupPrivateMembers || showRawView) ? BindingFlags.NonPublic : (BindingFlags) 0;
+ BindingFlags staticFlag = ctx.Options.GroupStaticMembers ? (BindingFlags)0 : BindingFlags.Static;
+ BindingFlags access = BindingFlags.Public | BindingFlags.Instance | flattenFlag | nonPublicFlag | staticFlag;
+
+ // Load all members to a list before creating the object values,
+ // to avoid problems with objects being invalidated due to evaluations in the target,
+ List<ValueReference> list = new List<ValueReference> ();
+ list.AddRange (GetMembersSorted (ctx, objectSource, type, proxy, access));
+ var names = new ObjectValueNameTracker (ctx);
+ object tdataType = type;
+
+ foreach (ValueReference val in list) {
+ try {
+ object decType = val.DeclaringType;
+ if (decType != null && decType != tdataType) {
+ tdataType = decType;
+ tdata = GetTypeDisplayData (ctx, decType);
+ }
+ DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
+ if (state == DebuggerBrowsableState.Never)
+ continue;
+
+ if (state == DebuggerBrowsableState.RootHidden && dereferenceProxy) {
+ object ob = val.Value;
+ if (ob != null) {
+ values.Clear ();
+ values.AddRange (GetObjectValueChildren (ctx, val, ob, -1, -1));
+ showRawView = true;
+ break;
+ }
+ }
+ else {
+ ObjectValue oval = val.CreateObjectValue (true);
+ names.Disambiguate (val, oval);
+ values.Add (oval);
+ }
+
+ }
+ catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ values.Add (ObjectValue.CreateError (null, new ObjectPath (val.Name), GetDisplayTypeName (GetTypeName (ctx, val.Type)), ex.Message, val.Flags));
+ }
+ }
+
+ if (showRawView) {
+ values.Add (RawViewSource.CreateRawView (ctx, objectSource, obj));
+ }
+ else {
+ if (IsArray (ctx, proxy)) {
+ ICollectionAdaptor col = CreateArrayAdaptor (ctx, proxy);
+ ArrayElementGroup agroup = new ArrayElementGroup (ctx, col);
+ ObjectValue val = ObjectValue.CreateObject (null, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.ReadOnly, values.ToArray ());
+ values = new List<ObjectValue> ();
+ values.Add (val);
+ values.AddRange (agroup.GetChildren (ctx.Options));
+ }
+ else {
+ if (ctx.Options.GroupStaticMembers && HasMembers (ctx, type, proxy, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | flattenFlag)) {
+ access = BindingFlags.Static | BindingFlags.Public | flattenFlag | nonPublicFlag;
+ values.Add (FilteredMembersSource.CreateStaticsNode (ctx, objectSource, type, proxy, access));
+ }
+ if (groupPrivateMembers && HasMembers (ctx, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag))
+ values.Add (FilteredMembersSource.CreateNonPublicsNode (ctx, objectSource, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag));
+
+ if (!ctx.Options.FlattenHierarchy) {
+ object baseType = GetBaseType (ctx, type, false);
+ if (baseType != null)
+ values.Insert (0, BaseTypeViewSource.CreateBaseTypeView (ctx, objectSource, baseType, proxy));
+ }
+ }
+ }
+ return values.ToArray ();
+ }
+
+ public ObjectValue[] GetExpressionValuesAsync (EvaluationContext ctx, string[] expressions)
+ {
+ ObjectValue[] values = new ObjectValue[expressions.Length];
+ for (int n = 0; n < values.Length; n++) {
+ string exp = expressions[n];
+ // This is a workaround to a bug in mono 2.0. That mono version fails to compile
+ // an anonymous method here
+ ExpData edata = new ExpData (ctx, exp, this);
+ values[n] = asyncEvaluationTracker.Run (exp, ObjectValueFlags.Literal, edata.Run);
+ }
+ return values;
+ }
+
+ class ExpData
+ {
+ ObjectValueAdaptor adaptor;
+ EvaluationContext ctx;
+ string exp;
+
+ public ExpData (EvaluationContext ctx, string exp, ObjectValueAdaptor adaptor)
+ {
+ this.ctx = ctx;
+ this.exp = exp;
+ this.adaptor = adaptor;
+ }
+
+ public ObjectValue Run ()
+ {
+ return adaptor.GetExpressionValue (ctx, exp);
+ }
+ }
+
+ public virtual ValueReference GetIndexerReference (EvaluationContext ctx, object target, object[] indices)
+ {
+ return null;
+ }
+
+ public ValueReference GetLocalVariable (EvaluationContext ctx, string name)
+ {
+ return OnGetLocalVariable (ctx, name);
+ }
+
+ protected virtual ValueReference OnGetLocalVariable (EvaluationContext ctx, string name)
+ {
+ ValueReference best = null;
+ foreach (ValueReference var in GetLocalVariables (ctx)) {
+ if (var.Name == name)
+ return var;
+ if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
+ best = var;
+ }
+ return best;
+ }
+
+ public virtual ValueReference GetParameter (EvaluationContext ctx, string name)
+ {
+ return OnGetParameter (ctx, name);
+ }
+
+ protected virtual ValueReference OnGetParameter (EvaluationContext ctx, string name)
+ {
+ ValueReference best = null;
+ foreach (ValueReference var in GetParameters (ctx)) {
+ if (var.Name == name)
+ return var;
+ if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
+ best = var;
+ }
+ return best;
+ }
+
+ public IEnumerable<ValueReference> GetLocalVariables (EvaluationContext ctx)
+ {
+ return OnGetLocalVariables (ctx);
+ }
+
+ public ValueReference GetThisReference (EvaluationContext ctx)
+ {
+ return OnGetThisReference (ctx);
+ }
+
+ public IEnumerable<ValueReference> GetParameters (EvaluationContext ctx)
+ {
+ return OnGetParameters (ctx);
+ }
+
+ protected virtual IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext ctx)
+ {
+ yield break;
+ }
+
+ protected virtual IEnumerable<ValueReference> OnGetParameters (EvaluationContext ctx)
+ {
+ yield break;
+ }
+
+ protected virtual ValueReference OnGetThisReference (EvaluationContext ctx)
+ {
+ return null;
+ }
+
+ public virtual ValueReference GetCurrentException (EvaluationContext ctx)
+ {
+ return null;
+ }
+
+ public virtual object GetEnclosingType (EvaluationContext ctx)
+ {
+ return null;
+ }
+
+ public virtual CompletionData GetExpressionCompletionData (EvaluationContext ctx, string exp)
+ {
+ int i;
+ if (exp.Length == 0)
+ return null;
+
+ if (exp [exp.Length - 1] == '.') {
+ exp = exp.Substring (0, exp.Length - 1);
+ i = 0;
+ while (i < exp.Length) {
+ ValueReference vr = null;
+ try {
+ vr = ctx.Evaluator.Evaluate (ctx, exp.Substring (i), null);
+ if (vr != null) {
+ CompletionData data = new CompletionData ();
+ foreach (ValueReference cv in vr.GetChildReferences (ctx.Options))
+ data.Items.Add (new CompletionItem (cv.Name, cv.Flags));
+ data.ExpressionLength = 0;
+ return data;
+ }
+ } catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ }
+ i++;
+ }
+ return null;
+ }
+
+ i = exp.Length - 1;
+ bool lastWastLetter = false;
+ while (i >= 0) {
+ char c = exp [i--];
+ if (!char.IsLetterOrDigit (c) && c != '_')
+ break;
+ lastWastLetter = !char.IsDigit (c);
+ }
+ if (lastWastLetter) {
+ string partialWord = exp.Substring (i+1);
+
+ CompletionData data = new CompletionData ();
+ data.ExpressionLength = partialWord.Length;
+
+ // Local variables
+
+ foreach (ValueReference vc in GetLocalVariables (ctx))
+ if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
+ data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
+
+ // Parameters
+
+ foreach (ValueReference vc in GetParameters (ctx))
+ if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
+ data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
+
+ // Members
+
+ ValueReference thisobj = GetThisReference (ctx);
+
+ if (thisobj != null)
+ data.Items.Add (new CompletionItem ("this", ObjectValueFlags.Field | ObjectValueFlags.ReadOnly));
+
+ object type = GetEnclosingType (ctx);
+
+ foreach (ValueReference vc in GetMembers (ctx, null, type, thisobj != null ? thisobj.Value : null))
+ if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
+ data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
+
+ if (data.Items.Count > 0)
+ return data;
+ }
+ return null;
+ }
+
+ public IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, IObjectSource objectSource, object t, object co)
+ {
+ foreach (ValueReference val in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
+ val.ParentSource = objectSource;
+ yield return val;
+ }
+ }
+
+ public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object co, string name)
+ {
+ return GetMember (ctx, objectSource, GetValueType (ctx, co), co, name);
+ }
+
+ public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object t, object co, string name)
+ {
+ ValueReference m = GetMember (ctx, t, co, name);
+ if (m != null)
+ m.ParentSource = objectSource;
+ return m;
+ }
+
+ protected virtual ValueReference GetMember (EvaluationContext ctx, object t, object co, string name)
+ {
+ ValueReference best = null;
+ foreach (ValueReference var in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
+ if (var.Name == name)
+ return var;
+ if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
+ best = var;
+ }
+ return best;
+ }
+
+ internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co)
+ {
+ return GetMembersSorted (ctx, objectSource, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
+ }
+
+ internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags)
+ {
+ List<ValueReference> list = new List<ValueReference> ();
+ foreach (ValueReference vr in GetMembers (ctx, t, co, bindingFlags)) {
+ vr.ParentSource = objectSource;
+ list.Add (vr);
+ }
+ list.Sort (delegate (ValueReference v1, ValueReference v2) {
+ return v1.Name.CompareTo (v2.Name);
+ });
+ return list;
+ }
+
+ public bool HasMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags)
+ {
+ return GetMembers (ctx, t, co, bindingFlags).Any ();
+ }
+
+ public bool HasMember (EvaluationContext ctx, object type, string memberName)
+ {
+ return HasMember (ctx, type, memberName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
+ }
+
+ public abstract bool HasMember (EvaluationContext ctx, object type, string memberName, BindingFlags bindingFlags);
+
+ /// <summary>
+ /// Returns all members of a type. The following binding flags have to be honored:
+ /// BindingFlags.Static, BindingFlags.Instance, BindingFlags.Public, BindingFlags.NonPublic, BindingFlags.DeclareOnly
+ /// </summary>
+ protected abstract IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags);
+
+ public virtual IEnumerable<object> GetNestedTypes (EvaluationContext ctx, object type)
+ {
+ yield break;
+ }
+
+ public virtual object GetParentType (EvaluationContext ctx, object type)
+ {
+ if ((type is Type))
+ return ((Type) type).DeclaringType;
+
+ var name = GetTypeName (ctx, type);
+ int plus = name.LastIndexOf ('+');
+
+ return plus != -1 ? GetType (ctx, name.Substring (0, plus)) : null;
+ }
+
+ public virtual object CreateArray (EvaluationContext ctx, object type, object[] values)
+ {
+ object arrType = GetType (ctx, "System.Collections.ArrayList");
+ object arrayList = CreateValue (ctx, arrType, new object[0]);
+ object[] objTypes = new object[] { GetType (ctx, "System.Object") };
+ foreach (object value in values)
+ RuntimeInvoke (ctx, arrType, arrayList, "Add", objTypes, new object[] { value });
+
+ object typof = CreateTypeObject (ctx, type);
+ objTypes = new object[] { GetType (ctx, "System.Type") };
+ return RuntimeInvoke (ctx, arrType, arrayList, "ToArray", objTypes, new object[] { typof });
+ }
+
+ public virtual object ToRawValue (EvaluationContext ctx, IObjectSource source, object obj)
+ {
+ if (IsEnum (ctx, obj)) {
+ object longType = GetType (ctx, "System.Int64");
+ object c = Cast (ctx, obj, longType);
+ return TargetObjectToObject (ctx, c);
+ }
+
+ if (ctx.Options.ChunkRawStrings && IsString (ctx, obj)) {
+ IStringAdaptor adaptor = CreateStringAdaptor (ctx, obj);
+ return new RawValueString (new RemoteRawValueString (adaptor, obj));
+ }
+
+ if (IsPrimitive (ctx, obj))
+ return TargetObjectToObject (ctx, obj);
+
+ if (IsArray (ctx, obj)) {
+ ICollectionAdaptor adaptor = CreateArrayAdaptor (ctx, obj);
+ return new RawValueArray (new RemoteRawValueArray (ctx, source, adaptor, obj));
+ }
+
+ return new RawValue (new RemoteRawValue (ctx, source, obj));
+ }
+
+ public virtual object FromRawValue (EvaluationContext ctx, object obj)
+ {
+ if (obj is RawValue) {
+ RemoteRawValue val = ((RawValue)obj).Source as RemoteRawValue;
+ if (val == null)
+ throw new InvalidOperationException ("Unknown RawValue source: " + ((RawValue)obj).Source);
+ return val.TargetObject;
+ }
+ else if (obj is RawValueArray) {
+ RemoteRawValueArray val = ((RawValueArray)obj).Source as RemoteRawValueArray;
+ if (val == null)
+ throw new InvalidOperationException ("Unknown RawValueArray source: " + ((RawValueArray)obj).Source);
+ return val.TargetObject;
+ }
+ else if (obj is RawValueString) {
+ RemoteRawValueString val = ((RawValueString)obj).Source as RemoteRawValueString;
+ if (val == null)
+ throw new InvalidOperationException ("Unknown RawValueString source: " + ((RawValueString)obj).Source);
+ return val.TargetObject;
+ }
+ else {
+ if (obj is Array) {
+ Array arr = (Array) obj;
+ if (obj.GetType ().GetElementType () == typeof(RawValue)) {
+ throw new NotSupportedException ();
+ } else {
+ object elemType = GetType (ctx, obj.GetType ().GetElementType ().FullName);
+ if (elemType == null)
+ throw new EvaluatorException ("Unknown target type: {0}", obj.GetType ().GetElementType ().FullName);
+ object[] values = new object [arr.Length];
+ for (int n=0; n<values.Length; n++)
+ values [n] = FromRawValue (ctx, arr.GetValue (n));
+ return CreateArray (ctx, elemType, values);
+ }
+ }
+ return CreateValue (ctx, obj);
+ }
+ }
+
+ public virtual object TargetObjectToObject (EvaluationContext ctx, object obj)
+ {
+ if (IsNull (ctx, obj))
+ return null;
+
+ if (IsArray (ctx, obj)) {
+ ICollectionAdaptor adaptor = CreateArrayAdaptor (ctx, obj);
+ string ename = GetDisplayTypeName (GetTypeName (ctx, adaptor.ElementType));
+ int[] dims = adaptor.GetDimensions ();
+ StringBuilder tn = new StringBuilder ("[");
+ for (int n=0; n<dims.Length; n++) {
+ if (n>0)
+ tn.Append (',');
+ tn.Append (dims[n]);
+ }
+ tn.Append ("]");
+ int i = ename.LastIndexOf ('>');
+ if (i == -1) i = 0;
+ i = ename.IndexOf ('[', i);
+ if (i != -1)
+ return new EvaluationResult ("{" + ename.Substring (0, i) + tn + ename.Substring (i) + "}");
+
+ return new EvaluationResult ("{" + ename + tn + "}");
+ }
+
+ if (IsEnum (ctx, obj)) {
+ object type = GetValueType (ctx, obj);
+ object longType = GetType (ctx, "System.Int64");
+ object c = Cast (ctx, obj, longType);
+ long val = (long) TargetObjectToObject (ctx, c);
+ long rest = val;
+ string typeName = GetTypeName (ctx, type);
+ string composed = string.Empty;
+ string composedDisplay = string.Empty;
+ foreach (EnumMember em in GetEnumMembers (ctx, type)) {
+ if (em.Value == val)
+ return new EvaluationResult (typeName + "." + em.Name, em.Name);
+ else {
+ if (em.Value != 0 && (rest & em.Value) == em.Value) {
+ rest &= ~em.Value;
+ if (composed.Length > 0) {
+ composed += "|";
+ composedDisplay += "|";
+ }
+ composed += typeName + "." + em.Name;
+ composedDisplay += em.Name;
+ }
+ }
+ }
+
+ if (IsFlagsEnumType (ctx, type) && rest == 0 && composed.Length > 0)
+ return new EvaluationResult (composed, composedDisplay);
+
+ return new EvaluationResult (val.ToString ());
+ }
+
+ if (GetValueTypeName (ctx, obj) == "System.Decimal") {
+ string res = CallToString (ctx, obj);
+ // This returns the decimal formatted using the current culture. It has to be converted to invariant culture.
+ decimal dec = decimal.Parse (res);
+ res = dec.ToString (System.Globalization.CultureInfo.InvariantCulture);
+ return new EvaluationResult (res);
+ }
+
+ if (IsClassInstance (ctx, obj)) {
+ TypeDisplayData tdata = GetTypeDisplayData (ctx, GetValueType (ctx, obj));
+ if (!string.IsNullOrEmpty (tdata.ValueDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
+ return new EvaluationResult (EvaluateDisplayString (ctx, obj, tdata.ValueDisplayString));
+
+ // Return the type name
+ if (ctx.Options.AllowToStringCalls) {
+ try {
+ return new EvaluationResult ("{" + CallToString (ctx, obj) + "}");
+ } catch (TimeOutException) {
+ // ToString() timed out, fall back to default behavior.
+ }
+ }
+
+ if (!string.IsNullOrEmpty (tdata.TypeDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
+ return new EvaluationResult ("{" + EvaluateDisplayString (ctx, obj, tdata.TypeDisplayString) + "}");
+
+ return new EvaluationResult ("{" + GetDisplayTypeName (GetValueTypeName (ctx, obj)) + "}");
+ }
+
+ return new EvaluationResult ("{" + CallToString (ctx, obj) + "}");
+ }
+
+ public object Convert (EvaluationContext ctx, object obj, object targetType)
+ {
+ if (obj == null)
+ return null;
+
+ object res = TryConvert (ctx, obj, targetType);
+ if (res != null)
+ return res;
+
+ throw new EvaluatorException ("Can't convert an object of type '{0}' to type '{1}'", GetValueTypeName (ctx, obj), GetTypeName (ctx, targetType));
+ }
+
+ public virtual object TryConvert (EvaluationContext ctx, object obj, object targetType)
+ {
+ return TryCast (ctx, obj, targetType);
+ }
+
+ public virtual object Cast (EvaluationContext ctx, object obj, object targetType)
+ {
+ if (obj == null)
+ return null;
+
+ object res = TryCast (ctx, obj, targetType);
+ if (res != null)
+ return res;
+
+ throw new EvaluatorException ("Can't cast an object of type '{0}' to type '{1}'", GetValueTypeName (ctx, obj), GetTypeName (ctx, targetType));
+ }
+
+ public virtual string CallToString (EvaluationContext ctx, object obj)
+ {
+ return GetValueTypeName (ctx, obj);
+ }
+
+ public object GetProxyObject (EvaluationContext ctx, object obj)
+ {
+ TypeDisplayData data = GetTypeDisplayData (ctx, GetValueType (ctx, obj));
+ if (string.IsNullOrEmpty (data.ProxyType) || !ctx.Options.AllowDebuggerProxy)
+ return obj;
+
+ string proxyType = data.ProxyType;
+ object[] typeArgs = null;
+
+ int index = proxyType.IndexOf ('`');
+ if (index != -1) {
+ // The proxy type is an uninstantiated generic type.
+ // The number of type args of the proxy must match the args of the target object
+ int startIndex = index + 1;
+ int endIndex = index + 1;
+
+ while (endIndex < proxyType.Length && char.IsDigit (proxyType[endIndex]))
+ endIndex++;
+
+ int num = int.Parse (proxyType.Substring (startIndex, endIndex - startIndex));
+ typeArgs = GetTypeArgs (ctx, GetValueType (ctx, obj));
+ if (typeArgs.Length != num)
+ return obj;
+
+ if (endIndex < proxyType.Length) {
+ // chop off the []'d list of generic type arguments
+ proxyType = proxyType.Substring (0, endIndex);
+ }
+ }
+
+ object ttype = GetType (ctx, proxyType, typeArgs);
+ if (ttype == null) {
+ // the proxy type string might be in the form: "Namespace.TypeName, Assembly...", chop off the ", Assembly..." bit.
+ if ((index = proxyType.IndexOf (',')) != -1)
+ ttype = GetType (ctx, proxyType.Substring (0, index).Trim (), typeArgs);
+ }
+ if (ttype == null)
+ throw new EvaluatorException ("Unknown type '{0}'", data.ProxyType);
+
+ try {
+ object val = CreateValue (ctx, ttype, obj);
+ return val ?? obj;
+ } catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ return obj;
+ }
+ }
+
+ public TypeDisplayData GetTypeDisplayData (EvaluationContext ctx, object type)
+ {
+ if (!IsClass (type))
+ return TypeDisplayData.Default;
+
+ TypeDisplayData td;
+ string tname = GetTypeName (ctx, type);
+ if (typeDisplayData.TryGetValue (tname, out td))
+ return td;
+
+ try {
+ td = OnGetTypeDisplayData (ctx, type);
+ }
+ catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ }
+ if (td == null)
+ typeDisplayData[tname] = td = TypeDisplayData.Default;
+ else
+ typeDisplayData[tname] = td;
+ return td;
+ }
+
+ protected virtual TypeDisplayData OnGetTypeDisplayData (EvaluationContext ctx, object type)
+ {
+ return null;
+ }
+
+ static bool IsQuoted (string str)
+ {
+ return str.Length >= 2 && str[0] == '"' && str[str.Length - 1] == '"';
+ }
+
+ public string EvaluateDisplayString (EvaluationContext ctx, object obj, string expr)
+ {
+ StringBuilder sb = new StringBuilder ();
+ int i = expr.IndexOf ('{');
+ int last = 0;
+
+ while (i != -1 && i < expr.Length) {
+ sb.Append (expr.Substring (last, i - last));
+ i++;
+
+ int j = expr.IndexOf ('}', i);
+ if (j == -1)
+ return expr;
+
+ string memberExpr = expr.Substring (i, j - i).Trim ();
+ if (memberExpr.Length == 0)
+ return expr;
+
+ int comma = memberExpr.LastIndexOf (',');
+ bool noquotes = false;
+ if (comma != -1) {
+ var option = memberExpr.Substring (comma + 1).Trim ();
+ memberExpr = memberExpr.Substring (0, comma).Trim ();
+ if (option == "nq")
+ noquotes = true;
+ }
+
+ string[] props = memberExpr.Split (new char[] { '.' });
+ ValueReference member = null;
+ object val = obj;
+
+ for (int k = 0; k < props.Length; k++) {
+ member = GetMember (ctx, null, GetValueType (ctx, val), val, props[k]);
+ if (member == null)
+ break;
+
+ val = member.Value;
+ }
+
+ if (member != null) {
+ var str = ctx.Evaluator.TargetObjectToString (ctx, val);
+ if (str == null)
+ sb.Append ("null");
+ else if (noquotes && IsQuoted (str))
+ sb.Append (str.Substring (1, str.Length - 2));
+ else
+ sb.Append (str);
+ } else {
+ sb.Append ("{Unknown member '" + memberExpr + "'}");
+ }
+
+ last = j + 1;
+ i = expr.IndexOf ('{', last);
+ }
+
+ sb.Append (expr.Substring (last));
+
+ return sb.ToString ();
+ }
+
+ public void AsyncExecute (AsyncOperation operation, int timeout)
+ {
+ asyncOperationManager.Invoke (operation, timeout);
+ }
+
+ public ObjectValue CreateObjectValueAsync (string name, ObjectValueFlags flags, ObjectEvaluatorDelegate evaluator)
+ {
+ return asyncEvaluationTracker.Run (name, flags, evaluator);
+ }
+
+ public bool IsEvaluating {
+ get { return asyncEvaluationTracker.IsEvaluating; }
+ }
+
+ public void CancelAsyncOperations ( )
+ {
+ asyncEvaluationTracker.Stop ();
+ asyncOperationManager.AbortAll ();
+ asyncEvaluationTracker.WaitForStopped ();
+ }
+
+ public ObjectValue GetExpressionValue (EvaluationContext ctx, string exp)
+ {
+ try {
+ ValueReference var = ctx.Evaluator.Evaluate (ctx, exp);
+ if (var != null)
+ return var.CreateObjectValue (ctx.Options);
+
+ return ObjectValue.CreateUnknown (exp);
+ }
+ catch (ImplicitEvaluationDisabledException) {
+ return ObjectValue.CreateImplicitNotSupported (ctx.ExpressionValueSource, new ObjectPath (exp), "", ObjectValueFlags.None);
+ }
+ catch (NotSupportedExpressionException ex) {
+ return ObjectValue.CreateNotSupported (ctx.ExpressionValueSource, new ObjectPath (exp), ex.Message, "", ObjectValueFlags.None);
+ }
+ catch (EvaluatorException ex) {
+ return ObjectValue.CreateError (ctx.ExpressionValueSource, new ObjectPath (exp), "", ex.Message, ObjectValueFlags.None);
+ }
+ catch (Exception ex) {
+ ctx.WriteDebuggerError (ex);
+ return ObjectValue.CreateUnknown (exp);
+ }
+ }
+
+ public bool HasMethod (EvaluationContext ctx, object targetType, string methodName)
+ {
+ BindingFlags flags = BindingFlags.Instance | BindingFlags.Static;
+ if (!ctx.Evaluator.CaseSensitive)
+ flags |= BindingFlags.IgnoreCase;
+ return HasMethod (ctx, targetType, methodName, null, null, flags);
+ }
+
+ public bool HasMethod (EvaluationContext ctx, object targetType, string methodName, BindingFlags flags)
+ {
+ return HasMethod (ctx, targetType, methodName, null, null, flags);
+ }
+
+ // argTypes can be null, meaning that it has to return true if there is any method with that name
+ // flags will only contain Static or Instance flags
+ // FIXME: this should become non-virtual
+ public virtual bool HasMethod (EvaluationContext ctx, object targetType, string methodName, object[] argTypes, BindingFlags flags)
+ {
+ return HasMethod (ctx, targetType, methodName, null, argTypes, flags);
+ }
+
+ // argTypes can be null, meaning that it has to return true if there is any method with that name
+ // flags will only contain Static or Instance flags
+ public virtual bool HasMethod (EvaluationContext ctx, object targetType, string methodName, object[] genericTypeArgs, object[] argTypes, BindingFlags flags)
+ {
+ return false;
+ }
+
+ // FIXME: this should become non-virtual and simply call the newer method
+ public virtual object RuntimeInvoke (EvaluationContext ctx, object targetType, object target, string methodName, object[] argTypes, object[] argValues)
+ {
+ return null;
+ }
+
+ public virtual object RuntimeInvoke (EvaluationContext ctx, object targetType, object target, string methodName, object[] genericTypeArgs, object[] argTypes, object[] argValues)
+ {
+ // Note: this is for backward compatibility with debugger backends that haven't yet implemented this particular overload
+ return RuntimeInvoke (ctx, targetType, target, methodName, argTypes, argValues);
+ }
+
+ public virtual ValidationResult ValidateExpression (EvaluationContext ctx, string expression)
+ {
+ return ctx.Evaluator.ValidateExpression (ctx, expression);
+ }
+ }
+
+ public class TypeDisplayData
+ {
+ public string ProxyType { get; internal set; }
+ public string ValueDisplayString { get; internal set; }
+ public string TypeDisplayString { get; internal set; }
+ public string NameDisplayString { get; internal set; }
+ public bool IsCompilerGenerated { get; internal set; }
+
+ public bool IsProxyType {
+ get { return ProxyType != null; }
+ }
+
+ public static readonly TypeDisplayData Default = new TypeDisplayData (null, null, null, null, false, null);
+
+ public Dictionary<string, DebuggerBrowsableState> MemberData { get; internal set; }
+
+ public TypeDisplayData (string proxyType, string valueDisplayString, string typeDisplayString,
+ string nameDisplayString, bool isCompilerGenerated, Dictionary<string, DebuggerBrowsableState> memberData)
+ {
+ ProxyType = proxyType;
+ ValueDisplayString = valueDisplayString;
+ TypeDisplayString = typeDisplayString;
+ NameDisplayString = nameDisplayString;
+ IsCompilerGenerated = isCompilerGenerated;
+ MemberData = memberData;
+ }
+
+ public DebuggerBrowsableState GetMemberBrowsableState (string name)
+ {
+ if (MemberData == null)
+ return DebuggerBrowsableState.Collapsed;
+
+ DebuggerBrowsableState state;
+ if (MemberData.TryGetValue (name, out state))
+ return state;
+
+ return DebuggerBrowsableState.Collapsed;
+ }
+ }
+
+ class ObjectValueNameTracker
+ {
+ Dictionary<string,KeyValuePair<ObjectValue, ValueReference>> names = new Dictionary<string,KeyValuePair<ObjectValue, ValueReference>> ();
+ EvaluationContext ctx;
+
+ public ObjectValueNameTracker (EvaluationContext ctx)
+ {
+ this.ctx = ctx;
+ }
+
+ /// <summary>
+ /// Disambiguate the ObjectValue's name (in the case where the property name also exists in a base class).
+ /// </summary>
+ /// <param name='val'>
+ /// The ValueReference.
+ /// </param>
+ /// <param name='oval'>
+ /// The ObjectValue.
+ /// </param>
+ public void Disambiguate (ValueReference val, ObjectValue oval)
+ {
+ KeyValuePair<ObjectValue, ValueReference> other;
+ if (names.TryGetValue (oval.Name, out other)) {
+ object tn = val.DeclaringType;
+
+ if (tn != null)
+ oval.Name += " (" + ctx.Adapter.GetDisplayTypeName (ctx, tn) + ")";
+ if (!other.Key.Name.EndsWith (")", StringComparison.Ordinal)) {
+ tn = other.Value.DeclaringType;
+ if (tn != null)
+ other.Key.Name += " (" + ctx.Adapter.GetDisplayTypeName (ctx, tn) + ")";
+ }
+ }
+
+ names [oval.Name] = new KeyValuePair<ObjectValue, ValueReference> (oval, val);
+ }
+ }
+
+ public struct EnumMember
+ {
+ public string Name { get; set; }
+ public long Value { get; set; }
+ }
+}
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs
new file mode 100644
index 0000000..5c063c9
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs
@@ -0,0 +1,83 @@
+// RawViewSource.cs
+//
+// Authors: Lluis Sanchez Gual <lluis at novell.com>
+// Jeffrey Stedfast <jeff at xamarin.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+// 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 Mono.Debugging.Backend;
+using Mono.Debugging.Client;
+
+namespace Mono.Debugging.Evaluation
+{
+ public class RawViewSource: RemoteFrameObject, IObjectValueSource
+ {
+ object obj;
+ EvaluationContext ctx;
+ IObjectSource objectSource;
+
+ public RawViewSource (EvaluationContext ctx, IObjectSource objectSource, object obj)
+ {
+ this.ctx = ctx;
+ this.obj = obj;
+ this.objectSource = objectSource;
+ }
+
+ public static ObjectValue CreateRawView (EvaluationContext ctx, IObjectSource objectSource, object obj)
+ {
+ RawViewSource src = new RawViewSource (ctx, objectSource, obj);
+ src.Connect ();
+ ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
+ val.ChildSelector = "";
+ return val;
+ }
+
+ public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
+ {
+ EvaluationContext cctx = ctx.WithOptions (options);
+ return cctx.Adapter.GetObjectValueChildren (cctx, objectSource, cctx.Adapter.GetValueType (cctx, obj), obj, index, count, false);
+ }
+
+ public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public object GetRawValue (ObjectPath path, EvaluationOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RemoteFrameObject.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RemoteFrameObject.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/RemoteFrameObject.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RemoteFrameObject.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RemoteRawValue.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RemoteRawValue.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/RemoteRawValue.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/RemoteRawValue.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TimeOutException.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TimeOutException.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/TimeOutException.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TimeOutException.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TimedEvaluator.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TimedEvaluator.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/TimedEvaluator.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TimedEvaluator.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs
new file mode 100644
index 0000000..8c04072
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs
@@ -0,0 +1,205 @@
+// TypeValueReference.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// 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.Linq;
+using System.Diagnostics;
+using System.Collections.Generic;
+using System.Reflection;
+
+using Mono.Debugging.Client;
+
+namespace Mono.Debugging.Evaluation
+{
+ public class TypeValueReference: ValueReference
+ {
+ object type;
+ string name;
+ string fullName;
+
+ public TypeValueReference (EvaluationContext ctx, object type)
+ : base (ctx)
+ {
+ this.type = type;
+ fullName = ctx.Adapter.GetDisplayTypeName (ctx, type);
+ name = GetTypeName (fullName);
+ }
+
+ internal static string GetTypeName (string tname)
+ {
+ tname = tname.Replace ('+','.');
+ int sep1 = tname.IndexOf ('<');
+ int sep2 = tname.IndexOf ('[');
+ if (sep2 != -1 && (sep2 < sep1 || sep1 == -1))
+ sep1 = sep2;
+ if (sep1 == -1)
+ sep1 = tname.Length - 1;
+ int i = tname.LastIndexOf ('.', sep1);
+ if (i != -1)
+ return tname.Substring (i + 1);
+ else
+ return tname;
+ }
+
+ public override object Value {
+ get {
+ throw new NotSupportedException ();
+ }
+ set {
+ throw new NotSupportedException();
+ }
+ }
+
+
+ public override object Type {
+ get {
+ return type;
+ }
+ }
+
+ public override object ObjectValue {
+ get {
+ throw new NotSupportedException ();
+ }
+ }
+
+
+ public override string Name {
+ get {
+ return name;
+ }
+ }
+
+ public override ObjectValueFlags Flags {
+ get {
+ return ObjectValueFlags.Type;
+ }
+ }
+
+ protected override ObjectValue OnCreateObjectValue (EvaluationOptions options)
+ {
+ return Mono.Debugging.Client.ObjectValue.CreateObject (this, new ObjectPath (Name), "<type>", fullName, Flags, null);
+ }
+
+ public override ValueReference GetChild (string name, EvaluationOptions options)
+ {
+ EvaluationContext ctx = GetContext (options);
+ foreach (ValueReference val in ctx.Adapter.GetMembers (ctx, this, type, null)) {
+ if (val.Name == name)
+ return val;
+ }
+ foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type)) {
+ string tn = ctx.Adapter.GetTypeName (ctx, t);
+ if (GetTypeName (tn) == name)
+ return new TypeValueReference (ctx, t);
+ }
+ return null;
+ }
+
+ public override ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
+ {
+ EvaluationContext ctx = GetContext (options);
+ try {
+ List<ObjectValue> list = new List<ObjectValue> ();
+ BindingFlags flattenFlag = options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly;
+ BindingFlags flags = BindingFlags.Static | BindingFlags.Public | flattenFlag;
+ bool groupPrivateMembers = options.GroupPrivateMembers || ctx.Adapter.IsExternalType (ctx, type);
+ if (!groupPrivateMembers)
+ flags |= BindingFlags.NonPublic;
+
+ TypeDisplayData tdata = ctx.Adapter.GetTypeDisplayData (ctx, type);
+ object tdataType = type;
+
+ foreach (ValueReference val in ctx.Adapter.GetMembersSorted (ctx, this, type, null, flags)) {
+ object decType = val.DeclaringType;
+ if (decType != null && decType != tdataType) {
+ tdataType = decType;
+ tdata = ctx.Adapter.GetTypeDisplayData (ctx, decType);
+ }
+ DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
+ if (state == DebuggerBrowsableState.Never)
+ continue;
+
+ ObjectValue oval = val.CreateObjectValue (options);
+ list.Add (oval);
+ }
+
+ List<ObjectValue> nestedTypes = new List<ObjectValue> ();
+ foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type))
+ nestedTypes.Add (new TypeValueReference (ctx, t).CreateObjectValue (options));
+
+ nestedTypes.Sort (delegate (ObjectValue v1, ObjectValue v2) {
+ return v1.Name.CompareTo (v2.Name);
+ });
+
+ list.AddRange (nestedTypes);
+
+ if (groupPrivateMembers)
+ list.Add (FilteredMembersSource.CreateNonPublicsNode (ctx, this, type, null, BindingFlags.NonPublic | BindingFlags.Static | flattenFlag));
+
+ if (!options.FlattenHierarchy) {
+ object baseType = ctx.Adapter.GetBaseType (ctx, type, false);
+ if (baseType != null) {
+ TypeValueReference baseRef = new TypeValueReference (ctx, baseType);
+ ObjectValue baseVal = baseRef.CreateObjectValue (false);
+ baseVal.Name = "base";
+ list.Insert (0, baseVal);
+ }
+ }
+
+ return list.ToArray ();
+ } catch (Exception ex) {
+ Console.WriteLine (ex);
+ ctx.WriteDebuggerOutput (ex.Message);
+ return new ObjectValue [0];
+ }
+ }
+
+ public override IEnumerable<ValueReference> GetChildReferences (EvaluationOptions options)
+ {
+ EvaluationContext ctx = GetContext (options);
+ try {
+ List<ValueReference> list = new List<ValueReference> ();
+ list.AddRange (ctx.Adapter.GetMembersSorted (ctx, this, type, null, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static));
+
+ List<ValueReference> nestedTypes = new List<ValueReference> ();
+ foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type))
+ nestedTypes.Add (new TypeValueReference (ctx, t));
+
+ nestedTypes.Sort (delegate (ValueReference v1, ValueReference v2) {
+ return v1.Name.CompareTo (v2.Name);
+ });
+ list.AddRange (nestedTypes);
+ return list;
+ } catch (Exception ex) {
+ Console.WriteLine (ex);
+ ctx.WriteDebuggerOutput (ex.Message);
+ return new ValueReference[0];
+ }
+ }
+ }
+}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/UserVariableReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/UserVariableReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/UserVariableReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/UserVariableReference.cs
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs b/external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
similarity index 100%
rename from src/core/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
rename to external/debugger-libs/Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
diff --git a/external/debugger-libs/Mono.Debugging/Mono.Debugging.csproj b/external/debugger-libs/Mono.Debugging/Mono.Debugging.csproj
new file mode 100644
index 0000000..62c9899
--- /dev/null
+++ b/external/debugger-libs/Mono.Debugging/Mono.Debugging.csproj
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Mono.Debugging</RootNamespace>
+ <SignAssembly>True</SignAssembly>
+ <AssemblyOriginatorKeyFile>mono.debugging.snk</AssemblyOriginatorKeyFile>
+ <AssemblyName>Mono.Debugging</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <Execution>
+ <Execution clr-version="Net_2_0" />
+ </Execution>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ <Execution>
+ <Execution clr-version="Net_2_0" />
+ </Execution>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Mono.Debugging.Client\IExpressionEvaluator.cs" />
+ <Compile Include="Mono.Debugging.Client\Breakpoint.cs" />
+ <Compile Include="Mono.Debugging.Client\DebuggerSession.cs" />
+ <Compile Include="Mono.Debugging.Client\Backtrace.cs" />
+ <Compile Include="Mono.Debugging.Client\DebuggerStartInfo.cs" />
+ <Compile Include="Mono.Debugging.Client\ProcessEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Client\SourceLocation.cs" />
+ <Compile Include="Mono.Debugging.Client\StackFrame.cs" />
+ <Compile Include="Mono.Debugging.Client\TargetEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Client\TargetEventType.cs" />
+ <Compile Include="Mono.Debugging.Client\ThreadEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Backend\IBacktrace.cs" />
+ <Compile Include="Mono.Debugging.Backend\IDebuggerSessionFrontend.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakpointStore.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakpointEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Client\ObjectValue.cs" />
+ <Compile Include="Mono.Debugging.Backend\IObjectValueSource.cs" />
+ <Compile Include="Mono.Debugging.Client\ObjectValueFlags.cs" />
+ <Compile Include="Mono.Debugging.Client\ObjectPath.cs" />
+ <Compile Include="Mono.Debugging.Client\ThreadInfo.cs" />
+ <Compile Include="Mono.Debugging.Client\ProcessInfo.cs" />
+ <Compile Include="Mono.Debugging.Client\AssemblyLine.cs" />
+ <Compile Include="Mono.Debugging.Backend\DissassemblyBuffer.cs" />
+ <Compile Include="Mono.Debugging.Client\CompletionData.cs" />
+ <Compile Include="Mono.Debugging.Client\Catchpoint.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakEvent.cs" />
+ <Compile Include="Mono.Debugging.Client\CatchpointEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakEventArgs.cs" />
+ <Compile Include="Mono.Debugging.Client\DebuggerFeatures.cs" />
+ <Compile Include="Mono.Debugging.Backend\IObjectValueUpdater.cs" />
+ <Compile Include="Mono.Debugging.Backend\IObjectValueUpdateCallback.cs" />
+ <Compile Include="Mono.Debugging.Backend\UpdateCallback.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ArrayElementGroup.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ArrayValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\AsyncEvaluationTracker.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\AsyncOperationManager.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\EvaluationContext.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ExpressionEvaluator.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\FilteredMembersSource.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ICollectionAdaptor.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\LiteralValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NamespaceValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NullValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ObjectValueAdaptor.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\RawViewSource.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\RemoteFrameObject.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\TimedEvaluator.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\TimeOutException.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\TypeValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ValueReference.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\UserVariableReference.cs" />
+ <Compile Include="Mono.Debugging.Client\DebuggerException.cs" />
+ <Compile Include="Mono.Debugging.Client\DebuggerSessionOptions.cs" />
+ <Compile Include="Mono.Debugging.Client\EvaluationOptions.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\BaseBacktrace.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\BaseTypeViewSource.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\IObjectSource.cs" />
+ <Compile Include="Mono.Debugging.Client\RawValue.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\RemoteRawValue.cs" />
+ <Compile Include="Mono.Debugging.Client\ExceptionInfo.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\ExceptionInfoSource.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakEventStatus.cs" />
+ <Compile Include="Mono.Debugging.Client\BreakEventInfo.cs" />
+ <Compile Include="Mono.Debugging.Client\FunctionBreakpoint.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\IStringAdaptor.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionEvaluator.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionEvaluatorVisitor.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionResolverVisitor.cs" />
+ <Compile Include="Mono.Debugging.Evaluation\NRefactoryExtensions.cs" />
+ <Compile Include="Mono.Debugging.Backend\IDebuggerBackendObject.cs" />
+ <Compile Include="Mono.Debugging.Backend\IRawValue.cs" />
+ <Compile Include="Mono.Debugging.Backend\IRawValueArray.cs" />
+ <Compile Include="Mono.Debugging.Backend\IRawValueString.cs" />
+ <Compile Include="Mono.Debugging.Backend\EvaluationResult.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Folder Include="Mono.Debugging.Evaluation\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
+ <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
+ <Name>ICSharpCode.NRefactory</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
+ <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
+ <Name>ICSharpCode.NRefactory.CSharp</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/src/core/Mono.Debugging/mono.debugging.snk b/external/debugger-libs/Mono.Debugging/mono.debugging.snk
similarity index 100%
rename from src/core/Mono.Debugging/mono.debugging.snk
rename to external/debugger-libs/Mono.Debugging/mono.debugging.snk
diff --git a/external/debugger-libs/README.md b/external/debugger-libs/README.md
new file mode 100644
index 0000000..7050d5c
--- /dev/null
+++ b/external/debugger-libs/README.md
@@ -0,0 +1,15 @@
+This repository contains several libraries which can be used to control the Mono debugger.
+
+* Mono.Debugger.Soft: The Mono Soft Debugger low level API
+* Mono.Debugging: Pluggable debugger API abstraction. It provides a common API to be used as frontend to different debuggers.
+* Mono.Debugging.Soft: Mono.Debugging backend for the Mono Soft Debugger.
+
+Dependencies
+============
+
+The libraries in this repository have external dependencies, specifically:
+
+* cecil (git://github.com/mono/cecil.git)
+* nrefactory (git://github.com/icsharpcode/NRefactory.git)
+
+Those libraries must be cloned side by side with debugger-libs.
\ No newline at end of file
diff --git a/external/debugger-libs/UnitTests/UnitTests/DebugTests.cs b/external/debugger-libs/UnitTests/UnitTests/DebugTests.cs
new file mode 100644
index 0000000..cdcdfa9
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/DebugTests.cs
@@ -0,0 +1,110 @@
+//
+// DebugTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// 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 NUnit.Framework;
+using Mono.Debugging.Client;
+using System.IO;
+using System.Threading;
+
+namespace Mono.Debugging.UnitTests
+{
+ public abstract class DebugTests
+ {
+ protected abstract DebuggerStartInfo CreateDebuggerStartInfo ();
+ protected abstract DebuggerSession CreateDebuggerSession ();
+
+ protected DebuggerSession Start (string test)
+ {
+ try {
+ DebuggerStartInfo si = CreateDebuggerStartInfo ();
+ si.Command = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location), "UnitTests.TestApp.exe");
+ si.Arguments = test;
+
+ DebuggerSessionOptions ops = new DebuggerSessionOptions ();
+ ops.EvaluationOptions = EvaluationOptions.DefaultOptions;
+ ops.EvaluationOptions.EvaluationTimeout = 100000;
+
+ DebuggerSession session = CreateDebuggerSession ();
+ string path = Path.Combine (GetTestsDir (), "UnitTests.TestApp", "Main.cs");
+ path = Path.GetFullPath (path);
+
+ ManualResetEvent done = new ManualResetEvent (false);
+
+ session.OutputWriter = delegate (bool isStderr, string text) {
+ Console.WriteLine ("PROC:" + text);
+ };
+
+ session.TargetStopped += delegate {
+ done.Set ();
+ };
+
+ session.Run (si, ops);
+ if (!done.WaitOne (3000))
+ throw new Exception ("Timeout while waiting for initial breakpoint");
+
+ return session;
+ } catch (Exception ex) {
+ Console.WriteLine (ex);
+ throw;
+ }
+ }
+
+ public static string GetTestsDir ()
+ {
+ var p = typeof(DebugTests).Assembly.Location;
+ return Path.Combine (Path.GetDirectoryName (p), "..", "..", "..");
+ }
+ }
+
+ static class EvalHelper
+ {
+ public static ObjectValue Sync (this ObjectValue val)
+ {
+ if (!val.IsEvaluating)
+ return val;
+
+ object locker = new object ();
+ EventHandler h = delegate {
+ lock (locker) {
+ Monitor.PulseAll (locker);
+ }
+ };
+
+ val.ValueChanged += h;
+
+ lock (locker) {
+ while (val.IsEvaluating) {
+ if (!Monitor.Wait (locker, 4000))
+ throw new Exception ("Timeout while waiting for value evaluation");
+ }
+ }
+
+ val.ValueChanged -= h;
+ return val;
+ }
+ }
+}
diff --git a/external/debugger-libs/UnitTests/UnitTests/EvaluationTests.cs b/external/debugger-libs/UnitTests/UnitTests/EvaluationTests.cs
new file mode 100644
index 0000000..69037f2
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/EvaluationTests.cs
@@ -0,0 +1,695 @@
+//
+// EvaluationTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// 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 Mono.Debugging.Client;
+using NUnit.Framework;
+
+namespace Mono.Debugging.UnitTests
+{
+ public abstract class EvaluationTests: DebugTests
+ {
+ DebuggerSession ds;
+ StackFrame frame;
+
+ [TestFixtureSetUp]
+ public void Setup ()
+ {
+ ds = Start ("TestEvaluation");
+ frame = ds.ActiveThread.Backtrace.GetFrame (0);
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown ()
+ {
+ ds.Exit ();
+ ds.Dispose ();
+ }
+
+
+ ObjectValue Eval (string exp)
+ {
+ return frame.GetExpressionValue (exp, true).Sync ();
+ }
+
+ [Test()]
+ public void This ()
+ {
+ ObjectValue val = Eval ("this");
+ Assert.AreEqual ("{UnitTests.TestApp.MainClass}", val.Value);
+ Assert.AreEqual ("UnitTests.TestApp.MainClass", val.TypeName);
+ }
+
+ [Test()]
+ public void UnaryOperators ()
+ {
+ ObjectValue val = Eval ("~1234");
+ Assert.AreEqual ((~1234).ToString (), val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("!true");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("!false");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("-1234");
+ Assert.AreEqual ("-1234", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("+1234");
+ Assert.AreEqual ("1234", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+ }
+
+ [Test()]
+ public void TypeReference ()
+ {
+ ObjectValue val = Eval ("System.String");
+ Assert.AreEqual ("string", val.Value);
+ Assert.AreEqual ("<type>", val.TypeName);
+ Assert.AreEqual (ObjectValueFlags.Type, val.Flags & ObjectValueFlags.OriginMask);
+
+ val = Eval ("MainClass");
+ Assert.AreEqual ("UnitTests.TestApp.MainClass", val.Value);
+ Assert.AreEqual ("<type>", val.TypeName);
+ Assert.AreEqual (ObjectValueFlags.Type, val.Flags & ObjectValueFlags.OriginMask);
+
+ val = Eval ("UnitTests.TestApp.MainClass");
+ Assert.AreEqual ("MonoDevelop.Debugger.Tests.TestApp.MainClass", val.Value);
+ Assert.AreEqual ("<type>", val.TypeName);
+ Assert.AreEqual (ObjectValueFlags.Type, val.Flags & ObjectValueFlags.OriginMask);
+ }
+
+ [Test()]
+ public virtual void TypeReferenceGeneric ()
+ {
+ ObjectValue val = Eval ("System.Collections.Generic.Dictionary<string,int>");
+ Assert.AreEqual ("System.Collections.Generic.Dictionary<string,int>", val.Value);
+ Assert.AreEqual ("<type>", val.TypeName);
+ Assert.AreEqual (ObjectValueFlags.Type, val.Flags & ObjectValueFlags.OriginMask);
+ }
+
+ [Test()]
+ public virtual void Typeof ()
+ {
+ ObjectValue val = Eval ("typeof(System.Console)");
+ Assert.IsTrue (val.TypeName == "System.MonoType" || val.TypeName == "System.RuntimeType", "Incorrect type name: " + val.TypeName);
+ Assert.AreEqual ("{System.Console}", val.Value);
+ }
+
+ [Test()]
+ public void MethodInvoke ()
+ {
+ ObjectValue val;
+ val = Eval ("TestMethod ()");
+ Assert.AreEqual ("1", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("TestMethod (\"23\")");
+ Assert.AreEqual ("24", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("TestMethod (42)");
+ Assert.AreEqual ("43", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("TestMethod (false)");
+ Assert.AreEqual ("2", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("this.TestMethod ()");
+ Assert.AreEqual ("1", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("this.TestMethod (\"23\")");
+ Assert.AreEqual ("24", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("this.TestMethod (42)");
+ Assert.AreEqual ("43", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("System.Int32.Parse (\"67\")");
+ Assert.AreEqual ("67", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("this.BoxingTestMethod (43)");
+ Assert.AreEqual ("\"43\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ }
+
+ [Test()]
+ public void Indexers ()
+ {
+ ObjectValue val = Eval ("numbers[0]");
+ Assert.AreEqual ("\"one\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("numbers[1]");
+ Assert.AreEqual ("\"two\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("numbers[2]");
+ Assert.AreEqual ("\"three\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("staticString[2]");
+ Assert.AreEqual ("'m'", val.Value);
+ Assert.AreEqual ("char", val.TypeName);
+
+ val = Eval ("alist[0]");
+ Assert.AreEqual ("1", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("alist[1]");
+ Assert.AreEqual ("\"two\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("alist[2]");
+ Assert.AreEqual ("3", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+ }
+
+ [Test()]
+ public void MemberReference ()
+ {
+ ObjectValue val = Eval ("alist.Count");
+ Assert.AreEqual ("3", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ Eval ("var tt = this");
+
+ val = Eval ("tt.someString");
+ Assert.AreEqual ("\"hi\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("UnitTests");
+ Assert.AreEqual ("UnitTests", val.Value);
+ Assert.AreEqual ("<namespace>", val.TypeName);
+
+ val = Eval ("UnitTests.TestApp.MainClass");
+ Assert.AreEqual ("UnitTests.TestApp.MainClass", val.Value);
+ Assert.AreEqual ("<type>", val.TypeName);
+
+ val = Eval ("UnitTests.TestApp.MainClass.staticString");
+ Assert.AreEqual ("\"some static\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ }
+
+ [Test()]
+ public void ConditionalExpression ()
+ {
+ ObjectValue val = Eval ("true ? \"yes\" : \"no\"");
+ Assert.AreEqual ("\"yes\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("false ? \"yes\" : \"no\"");
+ Assert.AreEqual ("\"no\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ }
+
+ [Test()]
+ public void Cast ()
+ {
+ ObjectValue val;
+ val = Eval ("(byte)n");
+ Assert.AreEqual ("32", val.Value);
+ Assert.AreEqual ("byte", val.TypeName);
+
+ val = Eval ("(int)n");
+ Assert.AreEqual ("32", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("(long)n");
+ Assert.AreEqual ("32", val.Value);
+ Assert.AreEqual ("long", val.TypeName);
+
+ val = Eval ("(float)n");
+ Assert.AreEqual ("32", val.Value);
+ Assert.AreEqual ("float", val.TypeName);
+
+ val = Eval ("(double)n");
+ Assert.AreEqual ("32", val.Value);
+ Assert.AreEqual ("double", val.TypeName);
+
+ val = Eval ("(string)staticString");
+ Assert.AreEqual ("\"some static\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("(int)numbers");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("(int)this");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("(C)a");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("(C)b");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("(C)c");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("(B)a");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("(B)b");
+ Assert.AreEqual ("{B}", val.Value);
+ Assert.AreEqual ("B", val.TypeName);
+
+ val = Eval ("(B)c");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("(A)a");
+ Assert.AreEqual ("{A}", val.Value);
+ Assert.AreEqual ("A", val.TypeName);
+
+ val = Eval ("(A)b");
+ Assert.AreEqual ("{B}", val.Value);
+ Assert.AreEqual ("B", val.TypeName);
+
+ val = Eval ("(A)c");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ // Try cast
+
+ val = Eval ("c as A");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("c as B");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("c as C");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("b as A");
+ Assert.AreEqual ("{B}", val.Value);
+ Assert.AreEqual ("B", val.TypeName);
+
+ val = Eval ("b as B");
+ Assert.AreEqual ("{B}", val.Value);
+ Assert.AreEqual ("B", val.TypeName);
+
+ val = Eval ("b as C");
+ Assert.AreEqual ("null", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("a as A");
+ Assert.AreEqual ("{A}", val.Value);
+ Assert.AreEqual ("A", val.TypeName);
+
+ val = Eval ("a as B");
+ Assert.AreEqual ("null", val.Value);
+ Assert.AreEqual ("B", val.TypeName);
+
+ val = Eval ("a as C");
+ Assert.AreEqual ("null", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ // Enum cast
+
+ val = Eval ("(int)SomeEnum.two");
+ Assert.AreEqual ("2", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+
+ val = Eval ("(long)SomeEnum.two");
+ Assert.AreEqual ("2", val.Value);
+ Assert.AreEqual ("long", val.TypeName);
+
+ val = Eval ("(SomeEnum)2");
+ Assert.AreEqual ("SomeEnum.two", val.Value);
+ Assert.AreEqual ("two", val.DisplayValue);
+ Assert.AreEqual ("SomeEnum", val.TypeName);
+
+ val = Eval ("(SomeEnum)3");
+ Assert.AreEqual ("SomeEnum.one|SomeEnum.two", val.Value);
+ Assert.AreEqual ("one|two", val.DisplayValue);
+ Assert.AreEqual ("SomeEnum", val.TypeName);
+ }
+
+ [Test()]
+ public void BinaryOperators ()
+ {
+ ObjectValue val;
+
+ // Boolean
+
+ val = Eval ("true && true");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("true && false");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("false && true");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("false && false");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("false || false");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("false || true");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("true || false");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("true || true");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("false || 1");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("1 || true");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("true && 1");
+ Assert.IsTrue (val.IsError);
+
+ val = Eval ("1 && true");
+ Assert.IsTrue (val.IsError);
+
+ // Concat string
+
+ val = Eval ("\"a\" + \"b\"");
+ Assert.AreEqual ("\"ab\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("\"a\" + 2");
+ Assert.AreEqual ("\"a2\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("2 + \"a\"");
+ Assert.AreEqual ("\"2a\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ val = Eval ("this + \"a\"");
+ Assert.AreEqual ("\"UnitTests.TestApp.MainClassa\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+
+ // Equality
+
+ val = Eval ("2 == 2");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("2 == 3");
+ Assert.AreEqual ("false", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ val = Eval ("(long)2 == (int)2");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+
+ // Arithmetic
+
+ val = Eval ("2 + 3");
+ Assert.AreEqual ("5", val.Value);
+
+ val = Eval ("2 + 2 == 4");
+ Assert.AreEqual ("true", val.Value);
+ Assert.AreEqual ("bool", val.TypeName);
+ }
+
+ [Test()]
+ public virtual void Assignment ()
+ {
+ ObjectValue val;
+ Eval ("n = 6");
+ val = Eval ("n");
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+ Eval ("n = 32");
+ val = Eval ("n");
+ Assert.AreEqual ("32", val.Value);
+
+ Eval ("someString = \"test\"");
+ val = Eval ("someString");
+ Assert.AreEqual ("\"test\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ Eval ("someString = \"hi\"");
+ val = Eval ("someString");
+ Assert.AreEqual ("\"hi\"", val.Value);
+
+ Eval ("numbers[0] = \"test\"");
+ val = Eval ("numbers[0]");
+ Assert.AreEqual ("\"test\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ Eval ("numbers[0] = \"one\"");
+ val = Eval ("numbers[0]");
+ Assert.AreEqual ("\"one\"", val.Value);
+
+ Eval ("alist[0] = 6");
+ val = Eval ("alist[0]");
+ Assert.AreEqual ("6", val.Value);
+ Assert.AreEqual ("int", val.TypeName);
+ Eval ("alist[0] = 1");
+ val = Eval ("alist[0]");
+ Assert.AreEqual ("1", val.Value);
+ }
+
+ [Test()]
+ public virtual void AssignmentStatic ()
+ {
+ ObjectValue val;
+
+ Eval ("staticString = \"test\"");
+ val = Eval ("staticString");
+ Assert.AreEqual ("\"test\"", val.Value);
+ Assert.AreEqual ("string", val.TypeName);
+ Eval ("staticString = \"some static\"");
+ val = Eval ("staticString");
+ Assert.AreEqual ("\"some static\"", val.Value);
+ }
+
+ [Test()]
+ public void FormatBool ()
+ {
+ ObjectValue val;
+ val = Eval ("true");
+ Assert.AreEqual ("true", val.Value);
+ val = Eval ("false");
+ Assert.AreEqual ("false", val.Value);
+ }
+
+ [Test()]
+ public void FormatNumber ()
+ {
+ ObjectValue val;
+ val = Eval ("(int)123");
+ Assert.AreEqual ("123", val.Value);
+ val = Eval ("(int)-123");
+ Assert.AreEqual ("-123", val.Value);
+
+ val = Eval ("(long)123");
+ Assert.AreEqual ("123", val.Value);
+ val = Eval ("(long)-123");
+ Assert.AreEqual ("-123", val.Value);
+
+ val = Eval ("(byte)123");
+ Assert.AreEqual ("123", val.Value);
+
+ val = Eval ("(uint)123");
+ Assert.AreEqual ("123", val.Value);
+
+ val = Eval ("(ulong)123");
+ Assert.AreEqual ("123", val.Value);
+
+ val = Eval ("dec");
+ Assert.AreEqual ("123.456", val.Value);
+ }
+
+ [Test()]
+ public void FormatString ()
+ {
+ ObjectValue val;
+ val = Eval ("\"hi\"");
+ Assert.AreEqual ("\"hi\"", val.Value);
+
+ val = Eval ("EscapedStrings");
+ Assert.AreEqual ("\" \\\" \\\\ \\a \\b \\f \\v \\n \\r \\t\"", val.Value);
+
+ val = Eval ("\" \\\" \\\\ \\a \\b \\f \\v \\n \\r \\t\"");
+ Assert.AreEqual ("\" \\\" \\\\ \\a \\b \\f \\v \\n \\r \\t\"", val.Value);
+ }
+
+ [Test()]
+ public void FormatChar ()
+ {
+ ObjectValue val;
+ val = Eval ("'A'");
+ Assert.AreEqual ("'A'", val.Value);
+ Assert.AreEqual ("65 'A'", val.DisplayValue);
+
+ val = Eval ("'\\0'");
+ Assert.AreEqual ("'\\0'", val.Value);
+ Assert.AreEqual ("0 '\\0'", val.DisplayValue);
+
+ val = Eval ("'\"'");
+ Assert.AreEqual ("'\"'", val.Value);
+ Assert.AreEqual ("34 '\"'", val.DisplayValue);
+
+ val = Eval ("'\\''");
+ Assert.AreEqual ("'\\''", val.Value);
+ Assert.AreEqual ("39 '\\''", val.DisplayValue);
+
+ val = Eval ("'\\\\'");
+ Assert.AreEqual ("'\\\\'", val.Value);
+ Assert.AreEqual ("92 '\\\\'", val.DisplayValue);
+
+ val = Eval ("'\\a'");
+ Assert.AreEqual ("'\\a'", val.Value);
+ Assert.AreEqual ("7 '\\a'", val.DisplayValue);
+
+ val = Eval ("'\\b'");
+ Assert.AreEqual ("'\\b'", val.Value);
+ Assert.AreEqual ("8 '\\b'", val.DisplayValue);
+
+ val = Eval ("'\\f'");
+ Assert.AreEqual ("'\\f'", val.Value);
+ Assert.AreEqual ("12 '\\f'", val.DisplayValue);
+
+ val = Eval ("'\\v'");
+ Assert.AreEqual ("'\\v'", val.Value);
+ Assert.AreEqual ("11 '\\v'", val.DisplayValue);
+
+ val = Eval ("'\\n'");
+ Assert.AreEqual ("'\\n'", val.Value);
+ Assert.AreEqual ("10 '\\n'", val.DisplayValue);
+
+ val = Eval ("'\\r'");
+ Assert.AreEqual ("'\\r'", val.Value);
+ Assert.AreEqual ("13 '\\r'", val.DisplayValue);
+
+ val = Eval ("'\\t'");
+ Assert.AreEqual ("'\\t'", val.Value);
+ Assert.AreEqual ("9 '\\t'", val.DisplayValue);
+ }
+
+ [Test()]
+ public void FormatObject ()
+ {
+ ObjectValue val;
+
+ val = Eval ("c");
+ Assert.AreEqual ("{C}", val.Value);
+ Assert.AreEqual ("C", val.TypeName);
+
+ val = Eval ("withDisplayString");
+ Assert.AreEqual ("Some one Value 2 End", val.Value);
+ Assert.AreEqual ("WithDisplayString", val.TypeName);
+
+ val = Eval ("withProxy");
+ Assert.AreEqual ("{WithProxy}", val.Value);
+ Assert.AreEqual ("WithProxy", val.TypeName);
+
+/* val = Eval ("withToString");
+ Assert.AreEqual ("{SomeString}", val.Value);
+ Assert.AreEqual ("WithToString", val.TypeName);*/
+ }
+
+ [Test()]
+ public void FormatArray ()
+ {
+ ObjectValue val;
+
+ val = Eval ("numbers");
+ Assert.AreEqual ("{string[3]}", val.Value);
+ Assert.AreEqual ("string[]", val.TypeName);
+
+ val = Eval ("numbersArrays");
+ Assert.AreEqual ("{int[2][]}", val.Value);
+ Assert.AreEqual ("int[][]", val.TypeName);
+
+ val = Eval ("numbersMulti");
+ Assert.AreEqual ("{int[3,4,5]}", val.Value);
+ Assert.AreEqual ("int[,,]", val.TypeName);
+ }
+
+ [Test()]
+ public void FormatGeneric ()
+ {
+ ObjectValue val;
+
+ ds.Options.EvaluationOptions.AllowTargetInvoke = false;
+ val = Eval ("dict");
+ ds.Options.EvaluationOptions.AllowTargetInvoke = true;
+ Assert.AreEqual ("{System.Collections.Generic.Dictionary<int,string[]>}", val.Value);
+ Assert.AreEqual ("System.Collections.Generic.Dictionary<int,string[]>", val.TypeName);
+
+ ds.Options.EvaluationOptions.AllowTargetInvoke = false;
+ val = Eval ("dictArray");
+ ds.Options.EvaluationOptions.AllowTargetInvoke = true;
+ Assert.AreEqual ("{System.Collections.Generic.Dictionary<int,string[]>[2,3]}", val.Value);
+ Assert.AreEqual ("System.Collections.Generic.Dictionary<int,string[]>[,]", val.TypeName);
+
+ val = Eval ("thing.done");
+ Assert.AreEqual ("{Thing<string>.Done<int>[1]}", val.Value);
+ Assert.AreEqual ("Thing<string>.Done<int>[]", val.TypeName);
+
+ val = Eval ("done");
+ Assert.AreEqual ("{Thing<string>.Done<int>}", val.Value);
+ Assert.AreEqual ("Thing<string>.Done<int>", val.TypeName);
+ }
+
+ [Test()]
+ public void FormatEnum ()
+ {
+ ObjectValue val;
+
+ val = Eval ("SomeEnum.one");
+ Assert.AreEqual ("SomeEnum.one", val.Value);
+ Assert.AreEqual ("one", val.DisplayValue);
+
+ val = Eval ("SomeEnum.two");
+ Assert.AreEqual ("SomeEnum.two", val.Value);
+ Assert.AreEqual ("two", val.DisplayValue);
+
+ val = Eval ("SomeEnum.one | SomeEnum.two");
+ Assert.AreEqual ("SomeEnum.one|SomeEnum.two", val.Value);
+ Assert.AreEqual ("one|two", val.DisplayValue);
+ }
+ }
+}
diff --git a/external/debugger-libs/UnitTests/UnitTests/SdbEvaluationTests.cs b/external/debugger-libs/UnitTests/UnitTests/SdbEvaluationTests.cs
new file mode 100644
index 0000000..ed26d34
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/SdbEvaluationTests.cs
@@ -0,0 +1,48 @@
+//
+// SdbEvaluationTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// 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 NUnit.Framework;
+using Mono.Debugging.Client;
+using Mono.Debugging.Soft;
+using System.Collections.Generic;
+
+namespace Mono.Debugging.UnitTests
+{
+ [TestFixture()]
+ public class SdbEvaluationTests: EvaluationTests
+ {
+ protected override DebuggerSession CreateDebuggerSession ()
+ {
+ return new SoftDebuggerSession ();
+ }
+
+ protected override DebuggerStartInfo CreateDebuggerStartInfo ()
+ {
+ return new SoftDebuggerStartInfo (null, new Dictionary<string,string> ());
+ }
+ }
+}
diff --git a/external/debugger-libs/UnitTests/UnitTests/SdbStackFrameTests.cs b/external/debugger-libs/UnitTests/UnitTests/SdbStackFrameTests.cs
new file mode 100644
index 0000000..70b271b
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/SdbStackFrameTests.cs
@@ -0,0 +1,49 @@
+//
+// SdbStackFrameTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// 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 NUnit.Framework;
+using Mono.Debugging.Client;
+using Mono.Debugging.Soft;
+using System.Collections.Generic;
+
+namespace Mono.Debugging.UnitTests
+{
+ [TestFixture()]
+ public class SdbStackFrameTests: StackFrameTests
+ {
+ protected override DebuggerSession CreateDebuggerSession ()
+ {
+ return new SoftDebuggerSession ();
+ }
+
+ protected override DebuggerStartInfo CreateDebuggerStartInfo ()
+ {
+ return new SoftDebuggerStartInfo (null, new Dictionary<string,string> ());
+ }
+ }
+}
+
diff --git a/external/debugger-libs/UnitTests/UnitTests/StackFrameTests.cs b/external/debugger-libs/UnitTests/UnitTests/StackFrameTests.cs
new file mode 100644
index 0000000..59127a8
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/StackFrameTests.cs
@@ -0,0 +1,122 @@
+//
+// StackFrameTests.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// 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 Mono.Debugging.Client;
+using NUnit.Framework;
+
+namespace Mono.Debugging.UnitTests
+{
+ public abstract class StackFrameTests: DebugTests
+ {
+ DebuggerSession ds;
+ StackFrame frame;
+
+ [TestFixtureSetUp]
+ public void Setup ()
+ {
+ ds = Start ("TestEvaluation");
+ frame = ds.ActiveThread.Backtrace.GetFrame (0);
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown ()
+ {
+ ds.Exit ();
+ ds.Dispose ();
+ }
+
+ public StackFrame Frame {
+ get { return frame; }
+ }
+
+ [Test]
+ public void VirtualProperty ()
+ {
+ EvaluationOptions ops = EvaluationOptions.DefaultOptions.Clone ();
+ ops.FlattenHierarchy = false;
+
+ ObjectValue val = Frame.GetExpressionValue ("c", ops);
+ Assert.IsNotNull (val);
+ val.WaitHandle.WaitOne ();
+ Assert.IsFalse (val.IsError);
+ Assert.IsFalse (val.IsUnknown);
+
+ // The C class does not have a Prop property
+
+ ObjectValue prop = val.GetChild ("Prop", ops);
+ Assert.IsNull (prop);
+
+ prop = val.GetChild ("PropNoVirt1", ops);
+ Assert.IsNull (prop);
+
+ prop = val.GetChild ("PropNoVirt2", ops);
+ Assert.IsNull (prop);
+
+ val = val.GetChild ("base", ops);
+ Assert.IsNotNull (val);
+ val.WaitHandle.WaitOne ();
+ Assert.IsFalse (val.IsError);
+ Assert.IsFalse (val.IsUnknown);
+
+ // The B class has a Prop property, value is 2
+
+ prop = val.GetChild ("Prop", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("2", prop.Value);
+
+ prop = val.GetChild ("PropNoVirt1", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("2", prop.Value);
+
+ prop = val.GetChild ("PropNoVirt2", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("2", prop.Value);
+
+ val = val.GetChild ("base", ops);
+ Assert.IsNotNull (val);
+ val.WaitHandle.WaitOne ();
+ Assert.IsFalse (val.IsError);
+ Assert.IsFalse (val.IsUnknown);
+
+ // The A class has a Prop property, value is 1, but must return 2 becasue it is overriden
+
+ prop = val.GetChild ("Prop", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("2", prop.Value);
+
+ prop = val.GetChild ("PropNoVirt1", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("1", prop.Value);
+
+ prop = val.GetChild ("PropNoVirt2", ops);
+ Assert.IsNotNull (prop);
+ Assert.AreEqual ("1", prop.Value);
+ }
+
+ }
+}
+
diff --git a/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Main.cs b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Main.cs
new file mode 100644
index 0000000..8de7934
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Main.cs
@@ -0,0 +1,179 @@
+//
+// Main.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// 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;
+using System.Collections.Generic;
+using System.Diagnostics;
+
+namespace UnitTests.TestApp
+{
+ class MainClass
+ {
+ public static void Main (string[] args)
+ {
+ MainClass mc = new MainClass ();
+ typeof (MainClass).GetMethod (args[0]).Invoke (mc, null);
+ }
+
+ // Tests
+
+ static string staticString = "some static";
+ string someString = "hi";
+ string[] numbers = new string[] { "one","two","three" };
+
+ public void TestEvaluation ()
+ {
+ int n = 32;
+ decimal dec = 123.456m;
+ ArrayList alist = new ArrayList ();
+ alist.Add (1);
+ alist.Add ("two");
+ alist.Add (3);
+
+ A c = new C ();
+ A b = new B ();
+ A a = new A ();
+
+ WithDisplayString withDisplayString = new WithDisplayString ();
+ WithProxy withProxy = new WithProxy ();
+ WithToString withToString = new WithToString ();
+
+ int[][] numbersArrays = new int [2][];
+ int[,,] numbersMulti = new int [3,4,5];
+
+ var dict = new Dictionary<int, string[]> ();
+ var dictArray = new Dictionary<int, string[]> [2,3];
+ var thing = new Thing<string> ();
+ var done = new Thing<string>.Done<int> ();
+
+ Console.WriteLine (n); Debugger.Break ();
+ }
+
+ public int TestMethod ()
+ {
+ float c = 4;
+ return 1;
+ }
+
+ public int TestMethod (string a)
+ {
+ return int.Parse (a) + 1;
+ }
+
+ public int TestMethod (int a)
+ {
+ return a + 1;
+ }
+
+ public static int TestMethod (bool b)
+ {
+ return b ? 1 : 2;
+ }
+
+ public string BoxingTestMethod (object a)
+ {
+ return a.ToString ();
+ }
+
+ public string EscapedStrings {
+ get { return " \" \\ \a \b \f \v \n \r \t"; }
+ }
+ }
+}
+
+class A
+{
+ public virtual int Prop { get { return 1; } }
+ public int PropNoVirt1 { get { return 1; } }
+ public virtual int PropNoVirt2 { get { return 1; } }
+}
+
+class B: A
+{
+ public override int Prop { get { return 2; } }
+ public new int PropNoVirt1 { get { return 2; } }
+ public new int PropNoVirt2 { get { return 2; } }
+}
+
+class C: B
+{
+}
+
+[DebuggerDisplay ("Some {Val1} Value {Val2} End")]
+class WithDisplayString
+{
+ internal string Val1 = "one";
+ public int Val2 { get { return 2; } }
+}
+
+class WithToString
+{
+ public override string ToString ()
+ {
+ return "SomeString";
+ }
+}
+
+[DebuggerTypeProxy (typeof(TheProxy))]
+class WithProxy
+{
+ public string Val1 {
+ get { return "one"; }
+ }
+}
+
+class TheProxy
+{
+ WithProxy wp;
+
+ public TheProxy (WithProxy wp)
+ {
+ this.wp = wp;
+ }
+
+ public string Val1 {
+ get { return wp.Val1; }
+ }
+}
+
+class Thing<T>
+{
+ public class Done<U>
+ {
+ }
+
+ public Done<int>[] done = new Done<int> [1];
+}
+
+[Flags]
+enum SomeEnum
+{
+ none=0,
+ one=1,
+ two=2,
+ four=4
+}
diff --git a/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Properties/AssemblyInfo.cs b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..c1fb439
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/Properties/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("UnitTests.TestApp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Xamarin Inc.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/UnitTests.TestApp.csproj b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/UnitTests.TestApp.csproj
new file mode 100644
index 0000000..f3b415a
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/UnitTests.TestApp/UnitTests.TestApp.csproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{19C3E201-4625-48B7-8E89-4ED9BA3BBD52}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>UnitTests.TestApp</RootNamespace>
+ <AssemblyName>UnitTests.TestApp</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Main.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/external/debugger-libs/UnitTests/UnitTests/UnitTests.csproj b/external/debugger-libs/UnitTests/UnitTests/UnitTests.csproj
new file mode 100644
index 0000000..37be7da
--- /dev/null
+++ b/external/debugger-libs/UnitTests/UnitTests/UnitTests.csproj
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0349A5CF-1F90-4055-A3B2-BDAA347AED71}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>UnitTests</RootNamespace>
+ <AssemblyName>UnitTests</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework">
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="DebugTests.cs" />
+ <Compile Include="EvaluationTests.cs" />
+ <Compile Include="SdbEvaluationTests.cs" />
+ <Compile Include="SdbStackFrameTests.cs" />
+ <Compile Include="StackFrameTests.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
+ <Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
+ <Name>Mono.Debugging.Soft</Name>
+ </ProjectReference>
+ <ProjectReference Include="UnitTests.TestApp\UnitTests.TestApp.csproj">
+ <Project>{19C3E201-4625-48B7-8E89-4ED9BA3BBD52}</Project>
+ <Name>UnitTests.TestApp</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
+ <Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
+ <Name>Mono.Debugger.Soft</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/debugger-libs/debugger-libs.sln b/external/debugger-libs/debugger-libs.sln
new file mode 100644
index 0000000..649b0e0
--- /dev/null
+++ b/external/debugger-libs/debugger-libs.sln
@@ -0,0 +1,302 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugger.Soft", "Mono.Debugger.Soft\Mono.Debugger.Soft.csproj", "{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "..\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory", "..\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj", "{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.CSharp", "..\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj", "{53DCA265-3C3C-42F9-B647-F72BA678122B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging", "Mono.Debugging\Mono.Debugging.csproj", "{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb", "..\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj", "{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Soft", "Mono.Debugging.Soft\Mono.Debugging.Soft.csproj", "{DE40756E-57F6-4AF2-B155-55E3A88CCED8}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit Tests", "Unit Tests", "{66CF303B-09F8-4123-B869-0608D54B1970}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests\UnitTests.csproj", "{0349A5CF-1F90-4055-A3B2-BDAA347AED71}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.TestApp", "UnitTests\UnitTests\UnitTests.TestApp\UnitTests.TestApp.csproj", "{19C3E201-4625-48B7-8E89-4ED9BA3BBD52}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ net_2_0_Debug|Any CPU = net_2_0_Debug|Any CPU
+ net_2_0_Release|Any CPU = net_2_0_Release|Any CPU
+ net_3_5_Debug|Any CPU = net_3_5_Debug|Any CPU
+ net_3_5_Release|Any CPU = net_3_5_Release|Any CPU
+ net_4_0_Debug|Any CPU = net_4_0_Debug|Any CPU
+ net_4_0_Release|Any CPU = net_4_0_Release|Any CPU
+ silverlight_Debug|Any CPU = silverlight_Debug|Any CPU
+ silverlight_Release|Any CPU = silverlight_Release|Any CPU
+ winphone_Debug|Any CPU = winphone_Debug|Any CPU
+ winphone_Release|Any CPU = winphone_Release|Any CPU
+ net_4_5_Debug|Any CPU = net_4_5_Debug|Any CPU
+ net_4_5_Release|Any CPU = net_4_5_Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.net_4_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.net_4_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.net_4_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {372E8E3E-29D5-4B4D-88A2-4711CD628C4E}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_5_Debug|Any CPU.ActiveCfg = net_4_5_Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_5_Debug|Any CPU.Build.0 = net_4_5_Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_5_Release|Any CPU.ActiveCfg = net_4_5_Release|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.net_4_5_Release|Any CPU.Build.0 = net_4_5_Release|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B2A5653-EC97-4001-BB9B-D90F1AF2C371}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_5_Debug|Any CPU.ActiveCfg = net_4_5_Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_5_Debug|Any CPU.Build.0 = net_4_5_Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_5_Release|Any CPU.ActiveCfg = net_4_5_Release|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.net_4_5_Release|Any CPU.Build.0 = net_4_5_Release|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {53DCA265-3C3C-42F9-B647-F72BA678122B}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Debug|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Debug|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_2_0_Debug|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_2_0_Debug|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_2_0_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_2_0_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Debug|Any CPU.Build.0 = net_3_5_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_3_5_Release|Any CPU.Build.0 = net_3_5_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_0_Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_0_Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_5_Debug|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_5_Debug|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_5_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.net_4_5_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.silverlight_Debug|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.silverlight_Debug|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.silverlight_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.silverlight_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.winphone_Debug|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.winphone_Debug|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.winphone_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}.winphone_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.net_4_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Debug|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Debug|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Debug|Any CPU.Build.0 = net_3_5_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Release|Any CPU.Build.0 = net_3_5_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_5_Debug|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_5_Debug|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_5_Release|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_5_Release|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Debug|Any CPU.ActiveCfg = silverlight_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Debug|Any CPU.Build.0 = silverlight_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Release|Any CPU.ActiveCfg = silverlight_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Release|Any CPU.Build.0 = silverlight_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Debug|Any CPU.ActiveCfg = winphone_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Debug|Any CPU.Build.0 = winphone_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Release|Any CPU.ActiveCfg = winphone_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Release|Any CPU.Build.0 = winphone_Release|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.net_4_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE40756E-57F6-4AF2-B155-55E3A88CCED8}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {0349A5CF-1F90-4055-A3B2-BDAA347AED71} = {66CF303B-09F8-4123-B869-0608D54B1970}
+ {19C3E201-4625-48B7-8E89-4ED9BA3BBD52} = {66CF303B-09F8-4123-B869-0608D54B1970}
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Mono.Debugger.Soft\Mono.Debugger.Soft.csproj
+ EndGlobalSection
+EndGlobal
diff --git a/external/guiunit/.gitignore b/external/guiunit/.gitignore
new file mode 100644
index 0000000..0170ed7
--- /dev/null
+++ b/external/guiunit/.gitignore
@@ -0,0 +1,4 @@
+.DS_Store
+bin
+src/framework/GuiUnit.userprefs
+src/framework/obj/*
diff --git a/external/guiunit/CHANGES.txt b/external/guiunit/CHANGES.txt
new file mode 100755
index 0000000..fd650fb
--- /dev/null
+++ b/external/guiunit/CHANGES.txt
@@ -0,0 +1,353 @@
+NUnitLite Version 0.9 - May 5, 2013
+
+Framework
+
+* A .NET 4.5 build is included. When using the 4.5 package,
+ C# 5.0 async methods may be used as tests, as the target of
+ a Throws constraint and as an ActualValueDelegate returning
+ the value to be tested.
+
+* Experimental builds for Silverlight 3.0, 4.0 and 5.0 are included.
+
+* TestContext.Random may be used to provide random values of various
+ types for use in your tests.
+
+* The experimental Asynchronous attribute has been removed.
+
+Runner
+
+* The runner now supports the -include and -exclude options, which
+ are used to specify categories of tests to be included in a run.
+
+* Test execution time is now reported at a higher resolution on
+ systems that support it.
+
+Bug Fixes
+
+* 501784 Theory tests do not work correctly when using null parameters
+* 671432 Upgrade NAnt to Latest Release
+* 1028188 Add Support for Silverlight
+* 1029785 Test loaded from remote folder failed to run with exception System.IO.Directory Not Found
+* 1057981 C#5 async tests are not supported
+* 1060631 Add .NET 4.5 build
+* 1064014 Simple async tests should not return Task<T>
+* 1071164 Support async methods in usage scenarios of Throws constraints
+* 1071714 TestContext is broken when a previous version of the runner is used alongside a new version of the framework
+* 1071861 Error in Path Constraints
+* 1072379 Report test execution time at a higher resolution
+* 1073750 Remove Asynchronous Attribute
+* 1074568 Assert/Assume should support an async method for the ActualValueDelegate
+* 1082330 Better Exception if SetCulture attribute is applied multiple times
+* 1111834 Expose Random Object as part of the test context
+* 1172979 Add Category Support to nunitlite Runner
+* 1174741 sl-4.0 csproj file is corrupt
+
+NUnitLite Version 0.8 - September 13, 2012
+
+Runner
+
+* The runner now displays the framework version for which it
+was built in the header, in addition to the framework under
+which it is currently running.
+
+* The new -explore option will list all the tests to a file
+in XML format, without running them.
+
+* The runner now supports the -test option, which allows
+selecting specific tests to be executed.
+
+Attributes
+
+* The new AsynchronousAttribute marks test methods that are
+to be run asynchronously. An asynchronous test runs on a
+separate thread and continues to run to completion while
+other tests run. Asynchronous tests must be written to
+avoid accessing common data, which may be changed by
+other tests.
+
+* RandomAttribute can now provide random enumeration data
+
+* PlatformAttribute now recognizes MacOsX, Xbox and MonoTouch
+
+* The following attributes from full NUnit are now supported
+by NUnitLite:
+ DataPoint
+ DataPoints
+ Theory
+ Timeout
+ Value
+ ValueSource
+
+Constraints
+
+* The following constraints from full NUnit are now supported
+by NUnitLite:
+ DelayedConstraint
+ ExactCountConstraint
+ PredicateConstraint
+ ReusableConstraint
+
+* New Syntax Helpers are supported in conjunction with the
+above constraints:
+ After
+ Exactly
+ Matching
+
+Bug Fixes
+
+* 999133 Comments in Program.cs document non-existing classes
+* 999136 NUGet adds all three assemblies to the project
+* 999137 result:path missing filename could use better error report
+* 1000213 Inconclusive message Not in report output
+* 1020295 add v2 results output for continuous integration server support
+* 1023003 -explore does not work unless a path is specified
+* 1023084 Add Enum support to RandomAttribute
+* 1023673 -test:<testName> argument does not work
+* 1028181 TextUi class does not make use of TextWriter passed to constructor
+* 1028252 Implement PredicateConstraint in NUnitLite
+* 1028253 Implement Theories in NUnitLite
+* 1029170 Implement ReusableConstraint in NUnitLite
+* 1029216 Implement ExactCountConstraint in NUnitLite
+* 1037144 Add MonoTouch support to PlatformAttribute
+* 1041365 Add MaxOsX and Xbox support to platform attribute
+* 1047585 Add Asynchronous attribute
+
+NUnitLite Version 0.7 - May 11, 2012
+
+This release brings NUnitLite to a point where it is functionally
+equivalent to the NUnit 3.0 build of NUnitLite and has most of the
+same capabilities as the full version of NUnit.
+
+Obsolete methods and classes have been removed and the code has been
+reorganized to facilitate code sharing with NUnit 3.0.
+
+NUnitLite is now built for the desktop using Visual Studio 2010. A VS 2008 project is still used for the compact framework builds.
+
+Separate builds are now created for .NET 2.0, 3.5 and 4.0
+
+A nuspec file is now provided and NUnitLite is distributed under NuGet.
+
+New Features and Enhancements
+
+* An An XML result file may be saved using the --result option of the runner.
+
+* The --explore option will create a list of tests contained in the assembly.
+
+* The --out option allows redirecting the final result to a report file. It must be used when running the test on a device without a Console.
+
+* Assume.That is now supported
+
+* ExpectedExceptionAttribute now supports the same properties as for full NUnit.
+
+* New Constraints
+ EmptyDirectoryConstraint
+ ExceptionTypeConstraint
+
+* New Asserts
+ ByVal
+ Throws
+ DoesNotThrow
+ Catch
+ AreEqual
+ AreNotEqual
+ AreSame
+ AreNotSame
+
+* New Syntax Helpers:
+
+ Is: Positive
+ Negative
+
+ Has: Exactly
+
+* New Attributes
+ CategoryAttribute
+ CombinatorialAttribute
+ CultureAttribute
+ DataAttribute
+ ExplicitAttribute
+ IncludeExcludeAttribute
+ MaxTimeAttribute
+ NUnitAttribute
+ PairwiseAttribute
+ PlatformAttribute
+ RandomAttribute
+ RangeAttribute
+ RepeatAttribute
+ SequentialAttribute
+ SetCultureAttribute (not available on compact framework)
+ SetUICultureAttribute (not available on compact framework)
+ TestCaseAttribute
+ TestCaseSourceAttribute
+ TestFixtureSetUpAttribute
+ TestFixtureTearDownAttribute
+ TestModificationAttribute
+ ValueSourceAttribute
+ ValuesAttribute
+
+
+Bug Fixes
+
+* 554633 NUnitLite.csproj doesn't have required constants for Release
+* 742473 Assert.Pass is treated as a test failure
+* 742625 TestLoader.Load fails when run under Unity's web-player
+* 996055 NUnitLite runner should allow redirecting output via command line
+* 996059 Need a VS project for compact framework
+
+NUnitLite Version 0.6 - January 13, 2010
+
+This is the first release of NUnitLite under the MIT license.
+
+New Features and Enhancements
+
+* New Asserts
+ Pass
+ Ignore
+ Inconclusive
+
+* New Syntax Helpers:
+
+ Throws: InnerException
+ InvalidOperationException
+ ArgumentException
+ TargetInvocationException
+
+ Has: InnerException
+
+ ConstraintExpression:
+ BinarySerializable
+ XmlSerializable
+ ContainsSubstring
+ StartsWith
+ EndsWith
+ Matches
+
+Bug fixes:
+
+* Additional control characters are now escaped in message output
+
+* A Stream now compares correctly as equal to itself
+
+
+NUnitLite Version 0.5 - June 14, 2009
+
+This is the first release from our new Launchpad.net project
+and aims at improved compatibility with NUnit 2.5.
+
+New Features and Enhancements
+
+* New Constraints:
+ AssignableToConstraint
+ AttributeConstraint
+ AttributeExistsConstraint,
+ BinarySerializableConstraint (not available on compact framework)
+ CollectionOrderedConstraint
+ EmptyCollectionConstraint
+ EmptyStringConstraint
+ EqualConstraint
+ FalseConstraint
+ NaNConstraint
+ NullConstraint
+ NullOrEmptyStringConstraint
+ RangeConstraint
+ SamePathConstraint
+ SamePathOrUnderConstraint
+ ThrowsConstraint
+ ThrowsNothingConstraint
+ TrueConstraint
+ XmlSerializableConstraint (not available on compact framework 1.0)
+
+* New Syntax Helpers
+
+ Is: AssignableTo
+ BinarySerializable (not available on compact framework)
+ TypeOf (replacing Type)
+ InRange
+ InstanceOf (replacing InstanceOfType)
+ Ordered
+ SamePath
+ SamePathOrUnder
+ XmlSerializable (not available on compact framework 1.0)
+
+ Has: Attribute
+ Message
+
+
+----------------------------------------------------------------------------
+NUnitLite Version 0.2 - November 3, 2007
+
+New Features and Enhancements
+
+* New attributes: PropertyAttribute, DescriptionAttribute, IgnoreAttribute
+* Text runner output may now be redirected (issue 12449)
+* Added VS solution for building under the compact framework (issue 14447)
+* Solutions are no longer bound to Source Control and anonymous access is now possible using several clients
+
+Bug fixes:
+
+* Fixed incorrect preprocessor constants (12361, 12411)
+* Fixed StackFilter to use correct namespace (12372)
+* Expected Exception is now handled corretly on Compact Framework (1446)
+
+----------------------------------------------------------------------------
+NUnitLite Version 0.1 - August 20, 2007
+
+The initial release of NUnitLite includes the following features:
+
+* Builds and runs on .NET 1.0, 1.1 and 2.0, .NET CF 1.0 and 2.0 and Mono 1.0 and 2.0 profiles. Since only a console runner is provided, it is not yet possible to run on devices that do not include a console.
+
+* Attributes recognized:
+ TestFixtureAttribute
+ TestAttribute
+ SetUpAttribute
+ TearDownAttribute
+ ExpectedExceptionAttribute
+
+* Tests may be identified by inheritance from TestCase or using attributes.
+
+* Assert methods:
+ Assert.Null
+ Assert.NotNull
+ Assert.True
+ Assert.False
+ Assert.Fail
+ Assert.That
+
+* Constraint classes (excluding abstract classes):
+ AllItemsConstraint
+ AndConstraint
+ AssignableFromConstraint
+ CollectionContainsConstraint
+ CollectionEquivalentConstraint
+ CollectionSubsetConstraint
+ ContainsConstraint
+ EmptyConstraint
+ EndsWithConstraint
+ ExactTypeConstraint
+ GreaterThanConstraint
+ GreaterThanOrEqualConstraint
+ InstanceOfTypeConstraint
+ LessThanConstraint
+ LessThanOrEqualConstraint
+ NoItemConstraint
+ NotConstraint
+ OrConstraint
+ PropertyConstraint
+ RegexConstraint (not available on compact framework)
+ SameAsConstraint
+ SomeItemsConstraint
+ StartsWithConstraint
+ SubstringConstraint
+ UniqueItemsConstraint
+
+* Syntax helpers:
+ Is: Not, All, Null, True, False, NaN, Empty, Unique, EqualTo, SameAs,
+ GreaterThan, GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo,
+ AtLeast, AtMost, Type, InstanceOfType, AssignableFrom, StringContaining,
+ StringStarting, StringEnding, StringMatching (except compact framework),
+ EquivalentTo, SubsetOf
+
+ Contains: Substring, Item
+
+ Has: No, All, Some, None,Property, Length, Count, Member
+
diff --git a/external/guiunit/LICENSE.txt b/external/guiunit/LICENSE.txt
new file mode 100755
index 0000000..ec77837
--- /dev/null
+++ b/external/guiunit/LICENSE.txt
@@ -0,0 +1,20 @@
+Copyright (c) 2004-2013 Charlie Poole
+
+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.
+
diff --git a/external/guiunit/NUnitLite.nuspec b/external/guiunit/NUnitLite.nuspec
new file mode 100755
index 0000000..44e6855
--- /dev/null
+++ b/external/guiunit/NUnitLite.nuspec
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+ <id>NUnitLite</id>
+ <version>0.9.0</version>
+ <authors>Charlie Poole</authors>
+ <owners>Charlie Poole</owners>
+ <licenseUrl>http://nunit.org/nuget/nunitlite-license.txt</licenseUrl>
+ <projectUrl>http://nunitlite.org</projectUrl>
+ <iconUrl>http://nunit.org/nuget/nunit_32x32.png</iconUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <summary>NUnitLite is a lightweight testing framework for .NET, based on NUnit.</summary>
+ <description>NUnitLite provides a subset of the features of NUnit, uses minimal resources and runs on resource-restricted platforms used in embedded and mobile development.
How to use this package:
1. Create a console application for your tests and delete the generated class containing Main().
2. Install the NUnitLite package, which creates a new Main() as well as adding a reference to NUnitLite.
3. Add your tests to the test project and start the pr [...]
+ <copyright>Copyright (c) 2004-2012 Charlie Poole</copyright>
+ <language>en-US</language>
+ <tags>test testing tdd framework fluent assert device phone compact embedded</tags>
+ </metadata>
+ <files>
+ <file src="LICENSE.txt" />
+ <file src="README.txt" />
+ <file src="CHANGES.txt" />
+ <file src="package\NUnitLite-0.9.0\net-4.5\nunitlite.dll" target="lib/net45" />
+ <file src="package\NUnitLite-0.9.0\net-4.5\nunitlite.xml" target="lib/net45" />
+ <file src="package\NUnitLite-0.9.0\net-4.0\nunitlite.dll" target="lib/net40" />
+ <file src="package\NUnitLite-0.9.0\net-4.0\nunitlite.xml" target="lib/net40" />
+ <file src="package\NUnitLite-0.9.0\net-3.5\nunitlite.dll" target="lib/net35" />
+ <file src="package\NUnitLite-0.9.0\net-3.5\nunitlite.xml" target="lib/net35" />
+ <file src="package\NUnitLite-0.9.0\net-2.0\nunitlite.dll" target="lib/net20" />
+ <file src="package\NUnitLite-0.9.0\net-2.0\nunitlite.xml" target="lib/net20" />
+ <file src="package\NUnitLite-0.9.0\net-1.1\nunitlite.dll" target="lib/net11" />
+ <file src="package\NUnitLite-0.9.0\net-1.1\nunitlite.xml" target="lib/net11" />
+ <file src="package\NUnitLite-0.9.0\netcf-3.5\nunitlite.dll" target="lib/net35-cf" />
+ <file src="package\NUnitLite-0.9.0\netcf-3.5\nunitlite.xml" target="lib/net35-cf" />
+ <file src="package\NUnitLite-0.9.0\netcf-2.0\nunitlite.dll" target="lib/net20-cf" />
+ <file src="package\NUnitLite-0.9.0\netcf-2.0\nunitlite.xml" target="lib/net20-cf" />
+ <file src="package\NUnitLite-0.9.0\silverlight-5.0\nunitlite.dll" target="lib/sl50" />
+ <file src="package\NUnitLite-0.9.0\silverlight-5.0\nunitlite.xml" target="lib/sl50" />
+ <file src="package\NUnitLite-0.9.0\silverlight-4.0\nunitlite.dll" target="lib/sl40" />
+ <file src="package\NUnitLite-0.9.0\silverlight-4.0\nunitlite.xml" target="lib/sl40" />
+ <file src="package\NUnitLite-0.9.0\silverlight-3.0\nunitlite.dll" target="lib/sl30" />
+ <file src="package\NUnitLite-0.9.0\silverlight-3.0\nunitlite.xml" target="lib/sl30" />
+ <file src="src\tests\Program.cs" target="content" />
+ </files>
+</package>
\ No newline at end of file
diff --git a/external/guiunit/NUnitLite.sln b/external/guiunit/NUnitLite.sln
new file mode 100755
index 0000000..50637e3
--- /dev/null
+++ b/external/guiunit/NUnitLite.sln
@@ -0,0 +1,410 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-2.0", "src\framework\nunitlite-2.0.csproj", "{C24A3FC4-2541-4E9C-BADD-564777610B75}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-2.0", "src\tests\nunitlite.tests-2.0.csproj", "{C8FA4073-B24E-4178-93A1-5E1256C8B528}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestResultConsole", "src\TestResultConsole\TestResultConsole.csproj", "{8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-2.0", "src\testdata\nunitlite.testdata-2.0.csproj", "{442DAB16-3063-4FE3-90B6-C29C3D85360D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NET-2.0", "NET-2.0", "{A466054B-B601-46A2-8D7B-03DE10A94F09}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NET-3.5", "NET-3.5", "{08B11E56-AB8C-4374-8709-45631094B29B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NET-4.0", "NET-4.0", "{D0ED3F4D-113E-4858-8042-C657CAC0CF46}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-3.5", "src\framework\nunitlite-3.5.csproj", "{43B24DC5-16D6-45EF-93F1-B021B785A892}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-3.5", "src\testdata\nunitlite.testdata-3.5.csproj", "{652AFEEB-B19C-4C67-A014-2248EA72F229}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-3.5", "src\tests\nunitlite.tests-3.5.csproj", "{94A4E298-F324-4531-856F-127505F766E5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-4.0", "src\framework\nunitlite-4.0.csproj", "{1567BCCE-7BE9-4815-84D7-7F794DB39081}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-4.0", "src\testdata\nunitlite.testdata-4.0.csproj", "{5C77A144-3CD1-42FC-B622-410E1945CA1E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-4.0", "src\tests\nunitlite.tests-4.0.csproj", "{497A578E-EF93-4190-96E0-B7F22E08027B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{601BC853-DE7B-47EB-A92B-AEDE16A17FCF}"
+ ProjectSection(SolutionItems) = preProject
+ CHANGES.txt = CHANGES.txt
+ LICENSE.txt = LICENSE.txt
+ NOTES.txt = NOTES.txt
+ nunitlite.build = nunitlite.build
+ nunitlite.build.include = nunitlite.build.include
+ NUnitLite.nuspec = NUnitLite.nuspec
+ nunitlite.projects.common = nunitlite.projects.common
+ README.txt = README.txt
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-2.0", "src\mock-assembly\mock-assembly-2.0.csproj", "{1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-3.5", "src\mock-assembly\mock-assembly-3.5.csproj", "{1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-4.0", "src\mock-assembly\mock-assembly-4.0.csproj", "{961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SL-4.0", "SL-4.0", "{B4F52628-112A-4C09-A597-2DC7B5AEE818}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-sl-4.0", "src\framework\nunitlite-sl-4.0.csproj", "{41326141-EB24-4984-9D9B-5CFAA55946BA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-sl-4.0", "src\mock-assembly\mock-assembly-sl-4.0.csproj", "{3C1249FC-B5DF-4E3A-ADDD-817526254876}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-sl-4.0", "src\testdata\nunitlite.testdata-sl-4.0.csproj", "{E97412B5-8C91-4236-8E9A-24C8E20BC675}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-sl-4.0", "src\tests\nunitlite.tests-sl-4.0.csproj", "{0B899C26-9114-440A-A8A1-615CDE7EE6BD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SL-5.0", "SL-5.0", "{AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-sl-5.0", "src\framework\nunitlite-sl-5.0.csproj", "{5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-sl-5.0", "src\mock-assembly\mock-assembly-sl-5.0.csproj", "{3C19A734-11BB-48FD-81D0-042B6A8D4CFC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-sl-5.0", "src\testdata\nunitlite.testdata-sl-5.0.csproj", "{A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-sl-5.0", "src\tests\nunitlite.tests-sl-5.0.csproj", "{7107C352-7F42-497E-A26C-25E9AAE8E54C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SL-3.0", "SL-3.0", "{035EFB6B-82E9-4510-AC99-B586E6381B25}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-sl-3.0", "src\framework\nunitlite-sl-3.0.csproj", "{02B02379-2596-4E45-8B10-835D62EA2D9E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-sl-3.0", "src\mock-assembly\mock-assembly-sl-3.0.csproj", "{BB355D2C-FB4F-4526-9B40-7944C40FDFDA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-sl-3.0", "src\testdata\nunitlite.testdata-sl-3.0.csproj", "{6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-sl-3.0", "src\tests\nunitlite.tests-sl-3.0.csproj", "{FFEA1F81-9631-43A8-8368-FBC14B1E7B02}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ci-test-runner-sl-5.0", "src\runner\ci-test-runner-sl-5.0.csproj", "{71848958-61FC-49B1-986B-CD824F9C3D9C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ci-test-runner-sl-4.0", "src\runner\ci-test-runner-sl-4.0.csproj", "{6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ci-test-runner-sl-3.0", "src\runner\ci-test-runner-sl-3.0.csproj", "{AA4E9904-77D0-406B-A50C-A0508DDB56A7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C24A3FC4-2541-4E9C-BADD-564777610B75}.Release|x86.ActiveCfg = Release|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528}.Release|x86.ActiveCfg = Release|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}.Release|x86.ActiveCfg = Release|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D}.Release|x86.ActiveCfg = Release|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|Any CPU.Build.0 = Release|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|x86.ActiveCfg = Release|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Release|Any CPU.Build.0 = Release|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {652AFEEB-B19C-4C67-A014-2248EA72F229}.Release|x86.ActiveCfg = Release|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {94A4E298-F324-4531-856F-127505F766E5}.Release|x86.ActiveCfg = Release|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081}.Release|x86.ActiveCfg = Release|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E}.Release|x86.ActiveCfg = Release|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {497A578E-EF93-4190-96E0-B7F22E08027B}.Release|x86.ActiveCfg = Release|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}.Release|x86.ActiveCfg = Release|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}.Release|x86.ActiveCfg = Release|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}.Release|x86.ActiveCfg = Release|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {41326141-EB24-4984-9D9B-5CFAA55946BA}.Release|x86.ActiveCfg = Release|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876}.Release|x86.ActiveCfg = Release|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675}.Release|x86.ActiveCfg = Release|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD}.Release|x86.ActiveCfg = Release|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}.Release|x86.ActiveCfg = Release|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC}.Release|x86.ActiveCfg = Release|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}.Release|x86.ActiveCfg = Release|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C}.Release|x86.ActiveCfg = Release|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {02B02379-2596-4E45-8B10-835D62EA2D9E}.Release|x86.ActiveCfg = Release|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA}.Release|x86.ActiveCfg = Release|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}.Release|x86.ActiveCfg = Release|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02}.Release|x86.ActiveCfg = Release|Any CPU
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Debug|x86.ActiveCfg = Debug|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Debug|x86.Build.0 = Debug|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Release|Any CPU.ActiveCfg = Release|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Release|Mixed Platforms.Build.0 = Release|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Release|x86.ActiveCfg = Release|x86
+ {71848958-61FC-49B1-986B-CD824F9C3D9C}.Release|x86.Build.0 = Release|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Debug|x86.ActiveCfg = Debug|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Debug|x86.Build.0 = Debug|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Release|Any CPU.ActiveCfg = Release|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Release|Mixed Platforms.Build.0 = Release|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Release|x86.ActiveCfg = Release|x86
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA}.Release|x86.Build.0 = Release|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Debug|x86.ActiveCfg = Debug|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Debug|x86.Build.0 = Debug|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Release|Any CPU.ActiveCfg = Release|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Release|Mixed Platforms.Build.0 = Release|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Release|x86.ActiveCfg = Release|x86
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {C8FA4073-B24E-4178-93A1-5E1256C8B528} = {A466054B-B601-46A2-8D7B-03DE10A94F09}
+ {442DAB16-3063-4FE3-90B6-C29C3D85360D} = {A466054B-B601-46A2-8D7B-03DE10A94F09}
+ {C24A3FC4-2541-4E9C-BADD-564777610B75} = {A466054B-B601-46A2-8D7B-03DE10A94F09}
+ {1516338A-F26B-4BA7-AF6E-C3F6A39DC45B} = {A466054B-B601-46A2-8D7B-03DE10A94F09}
+ {43B24DC5-16D6-45EF-93F1-B021B785A892} = {08B11E56-AB8C-4374-8709-45631094B29B}
+ {652AFEEB-B19C-4C67-A014-2248EA72F229} = {08B11E56-AB8C-4374-8709-45631094B29B}
+ {94A4E298-F324-4531-856F-127505F766E5} = {08B11E56-AB8C-4374-8709-45631094B29B}
+ {1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7} = {08B11E56-AB8C-4374-8709-45631094B29B}
+ {1567BCCE-7BE9-4815-84D7-7F794DB39081} = {D0ED3F4D-113E-4858-8042-C657CAC0CF46}
+ {5C77A144-3CD1-42FC-B622-410E1945CA1E} = {D0ED3F4D-113E-4858-8042-C657CAC0CF46}
+ {497A578E-EF93-4190-96E0-B7F22E08027B} = {D0ED3F4D-113E-4858-8042-C657CAC0CF46}
+ {961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A} = {D0ED3F4D-113E-4858-8042-C657CAC0CF46}
+ {41326141-EB24-4984-9D9B-5CFAA55946BA} = {B4F52628-112A-4C09-A597-2DC7B5AEE818}
+ {3C1249FC-B5DF-4E3A-ADDD-817526254876} = {B4F52628-112A-4C09-A597-2DC7B5AEE818}
+ {E97412B5-8C91-4236-8E9A-24C8E20BC675} = {B4F52628-112A-4C09-A597-2DC7B5AEE818}
+ {0B899C26-9114-440A-A8A1-615CDE7EE6BD} = {B4F52628-112A-4C09-A597-2DC7B5AEE818}
+ {6414BA5A-8CB7-4022-AABB-7E38BB6DB5EA} = {B4F52628-112A-4C09-A597-2DC7B5AEE818}
+ {5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3} = {AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}
+ {3C19A734-11BB-48FD-81D0-042B6A8D4CFC} = {AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}
+ {A2B5D1FA-D865-4B30-A82D-30BB1C8C474E} = {AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}
+ {7107C352-7F42-497E-A26C-25E9AAE8E54C} = {AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}
+ {71848958-61FC-49B1-986B-CD824F9C3D9C} = {AEB97450-F9CF-4CF4-90D0-6CD5EDAB8588}
+ {02B02379-2596-4E45-8B10-835D62EA2D9E} = {035EFB6B-82E9-4510-AC99-B586E6381B25}
+ {BB355D2C-FB4F-4526-9B40-7944C40FDFDA} = {035EFB6B-82E9-4510-AC99-B586E6381B25}
+ {6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB} = {035EFB6B-82E9-4510-AC99-B586E6381B25}
+ {FFEA1F81-9631-43A8-8368-FBC14B1E7B02} = {035EFB6B-82E9-4510-AC99-B586E6381B25}
+ {AA4E9904-77D0-406B-A50C-A0508DDB56A7} = {035EFB6B-82E9-4510-AC99-B586E6381B25}
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = NUnitLiteTests\NUnitLiteTests.csproj
+ EndGlobalSection
+EndGlobal
diff --git a/external/guiunit/NUnitLiteCF.sln b/external/guiunit/NUnitLiteCF.sln
new file mode 100755
index 0000000..bd48935
--- /dev/null
+++ b/external/guiunit/NUnitLiteCF.sln
@@ -0,0 +1,79 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NETCF-2.0", "NETCF-2.0", "{DE0F317D-55BD-4924-8B52-3D9BCD4E9CBF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NETCF-3.5", "NETCF-3.5", "{25D97EA0-F781-4AF9-AB39-EA380B929F9E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-netcf-2.0", "src\framework\nunitlite-netcf-2.0.csproj", "{BED999D7-F594-4CE4-A037-E40E2B9C1288}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-netcf-2.0", "src\testdata\nunitlite.testdata-netcf-2.0.csproj", "{F67E80E8-DF9F-4C66-9142-5002FA638EB7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-netcf-2.0", "src\tests\nunitlite.tests-netcf-2.0.csproj", "{4B518BF0-D523-4F75-AF3B-9B41865E634A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-netcf-3.5", "src\framework\nunitlite-netcf-3.5.csproj", "{5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.testdata-netcf-3.5", "src\testdata\nunitlite.testdata-netcf-3.5.csproj", "{0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite.tests-netcf-3.5", "src\tests\nunitlite.tests-netcf-3.5.csproj", "{80A9EC94-2C42-44AC-9D2C-E1418D712C48}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-netcf-2.0", "src\mock-assembly\mock-assembly-netcf-2.0.csproj", "{33EA4538-3452-42ED-92A9-4CC3B25032AD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mock-assembly-netcf-3.5", "src\mock-assembly\mock-assembly-netcf-3.5.csproj", "{B0C85907-1103-44F4-ACFF-6A1B9170C0B1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BED999D7-F594-4CE4-A037-E40E2B9C1288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BED999D7-F594-4CE4-A037-E40E2B9C1288}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BED999D7-F594-4CE4-A037-E40E2B9C1288}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BED999D7-F594-4CE4-A037-E40E2B9C1288}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F67E80E8-DF9F-4C66-9142-5002FA638EB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F67E80E8-DF9F-4C66-9142-5002FA638EB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F67E80E8-DF9F-4C66-9142-5002FA638EB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F67E80E8-DF9F-4C66-9142-5002FA638EB7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48}.Release|Any CPU.Build.0 = Release|Any CPU
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {33EA4538-3452-42ED-92A9-4CC3B25032AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {33EA4538-3452-42ED-92A9-4CC3B25032AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {33EA4538-3452-42ED-92A9-4CC3B25032AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {33EA4538-3452-42ED-92A9-4CC3B25032AD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B0C85907-1103-44F4-ACFF-6A1B9170C0B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C85907-1103-44F4-ACFF-6A1B9170C0B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C85907-1103-44F4-ACFF-6A1B9170C0B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C85907-1103-44F4-ACFF-6A1B9170C0B1}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {BED999D7-F594-4CE4-A037-E40E2B9C1288} = {DE0F317D-55BD-4924-8B52-3D9BCD4E9CBF}
+ {F67E80E8-DF9F-4C66-9142-5002FA638EB7} = {DE0F317D-55BD-4924-8B52-3D9BCD4E9CBF}
+ {4B518BF0-D523-4F75-AF3B-9B41865E634A} = {DE0F317D-55BD-4924-8B52-3D9BCD4E9CBF}
+ {33EA4538-3452-42ED-92A9-4CC3B25032AD} = {DE0F317D-55BD-4924-8B52-3D9BCD4E9CBF}
+ {5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC} = {25D97EA0-F781-4AF9-AB39-EA380B929F9E}
+ {0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C} = {25D97EA0-F781-4AF9-AB39-EA380B929F9E}
+ {80A9EC94-2C42-44AC-9D2C-E1418D712C48} = {25D97EA0-F781-4AF9-AB39-EA380B929F9E}
+ {B0C85907-1103-44F4-ACFF-6A1B9170C0B1} = {25D97EA0-F781-4AF9-AB39-EA380B929F9E}
+ EndGlobalSection
+EndGlobal
diff --git a/external/guiunit/README.txt b/external/guiunit/README.txt
new file mode 100755
index 0000000..5676b0d
--- /dev/null
+++ b/external/guiunit/README.txt
@@ -0,0 +1,153 @@
+NUnitLite Version 0.9 - May 5, 2013
+
+NUnitLite is a small-footprint implementation of much of the current NUnit framework. It is distributed in source form and is intended for use in situations where NUnit is too large or complex. In particular, it targets mobile and embedded environments as well as testing of applications that require "embedding" the framework in another piece of software, as when testing plugin architectures.
+
+This file provides basic information about NUnitLite. For more info see the NUnitLite web site at http://nunitlite.com.
+
+COPYRIGHT AND LICENSE
+
+NUnitLite is Copyright � 2013, Charlie Poole and is licensed under the MIT license.
+
+A copy of the license is distributed with the program in the file LICENSE.txt and is also available at http://www.opensource.org/licenses/mit-license.php.
+
+NUNitLite is based on ideas in NUnit, but not on the NUnit implementation. In addition, some code developed in NUnitLite was subsequently contributed to the NUnit project, where it is available under the NUnit license. Subsequently, some (but not all) of the newer NUnit features were ported back to NUnitLite.
+
+ATTRIBUTES
+
+NUnitLite supports most of the same attributes as NUnit 2.6.
+ CategoryAttribute
+ CombinatorialAttribute
+ CultureAttribute
+ DatapointAttribute
+ DatapointsAttribute
+ DescriptionAttribute
+ ExpectedExceptionAttribute
+ ExplicitAttribute
+ IgnoreAttribute
+ MaxTimeAttribute
+ PairwiseAttribute
+ PlatformAttribute
+ PropertyAttribute
+ RandomAttribute
+ RangeAttribute
+ SequentialAttribute
+ SetCultureAttribute
+ SetUICultureAttribute
+ SetUpAttribute
+ TearDownAttribute
+ TestAttribute
+ TestCaseAttribute
+ TestCaseSourceAttribute
+ TestFixtureAttribute
+ TestFixtureSetUpAttribute
+ TestFixtureTearDownAttribute
+ TheoryAttribute
+ TimeoutAttribute
+ ValuesAttribute
+ ValueSourceAttribute
+
+ASSERTS
+
+The programmer expresses expected test conditions using the Assert class. The existing functionality of most current NUnit Assert methods is supported, but the syntax has been changed to use the more extensible constraint-based format. The following methods are supported:
+ Assert.Pass
+ Assert.Fail
+ Assert.Ignore
+ Assert.Inconclusive
+ Assert.That
+ Assert.ByVal
+ Assert.Throws
+ Assert.DoesNotThrow
+ Assert.Catch
+ Assert.Null
+ Assert.NotNull
+ Assert.True
+ Assert.False
+ Assert.AreEqual
+ Assert.AreNotEqual
+ Assert.AreSame
+ Assert.AreNotSame
+
+ASSUMPTIONS
+
+The programmer may express assumptions in the test using Assume.That() A failure in Assume.That causes an Inconclusive result.
+
+CONSTRAINTS
+
+NUnitLite supports most of the same built-in constraints as NUnit. Users may also derive custom constraints from the abstract Constraint class. The following built-in constraints are provided:
+ AllItemsConstraint
+ AndConstraint
+ AssignableFromConstraint
+ AssignableToConstraint
+ AttributeConstraint
+ AttributeExistsConstraint
+ BinarySerializableConstraint (not available on compact framework)
+ CollectionContainsConstraint
+ CollectionEquivalentConstraint
+ CollectionOrderedConstraint
+ CollectionSubsetConstraint
+ ContainsConstraint
+ DelayedConstraint
+ EmptyCollectionConstraint
+ EmptyConstraint
+ EmptyDirectoryConstraint
+ EmptyStringConstraint
+ EndsWithConstraint
+ EqualConstraint
+ ExactCountConstraint
+ ExactTypeConstraint
+ ExceptionTypeConstraint
+ FalseConstraint
+ GreaterThanConstraint
+ GreaterThanOrEqualConstraint
+ InstanceOfTypeConstraint
+ LessThanConstraint
+ LessThanOrEqualConstraint
+ NaNConstraint
+ NoItemConstraint
+ NotConstraint
+ NullConstraint
+ NullOrEmptyStringConstraint
+ OrConstraint
+ PredicateConstraint
+ PropertyConstraint
+ PropertyExistsConstraint
+ RangeConstraint
+ RegexConstraint (not available on compact framework)
+ ReusableConstraint
+ SameAsConstraint
+ SamePathConstraint
+ SamePathOrUnderConstraint
+ SomeItemsConstraint
+ StartsWithConstraint
+ SubstringConstraint
+ ThrowsConstraint
+ ThrowsNothingConstraint
+ TrueConstraint
+ UniqueItemsConstraint
+ XmlSerializableConstraint (not available on compact framework 1.0)
+
+Although constraints may be created using their constructors, the more usual approach is to make use of one or more of the NUnitLite SyntaxHelpers. The following helpers are provided:
+
+ Is: Not, All, Null, True, False, NaN, Empty, Unique, EqualTo, SameAs,
+ GreaterThan, GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo,
+ AtLeast, AtMost, TypeOf, InstanceOf, InstanceOfType, AssignableFrom,
+ AssignableTo, StringContaining, StringStarting, StringEnding,
+ StringMatching, EquivalentTo, SubsetOf, BinarySerializable, XmlSerializable,
+ Ordered, SamePath, SamePathOrUnder, InRange
+
+ Contains: Substring, Item
+
+ Has: No, All, Some, None,Property, Length, Count, Message, Member, Attribute
+
+Tests are loaded as a list of fixtures, without any additional hierarchy. Each fixture contains it's tests. Tests are executed in the order found, without any guarantees of ordering. A separate instance of the fixture object is created for each test case executed by NUnitLite. The embedded console runner produces a summary of tests run and lists any errors or failures.
+
+USAGE
+
+NUnitLite is not "installed" in your system. Instead, you should include nunitlite.dll in your project. Your test assembly should be an exe file and should reference the nunitlite assembly. If you place a call like this in your Main
+ new TextUI().Execute(args);
+then NUnitLite will run all the tests in the test project, using the args provided. Use -help to see the available options.
+
+DOCUMENTATION
+
+NUnitLite uses the NUnit.Framework namespace, which allows relatively easy portability between NUnit and NUnitLite. Currently, there is no separate set of documentation for NUnitLite so you should use the docs for NUnit 2.6 or later in conjunction with the information in this file.
+
diff --git a/external/guiunit/nant.bat b/external/guiunit/nant.bat
new file mode 100755
index 0000000..a32134a
--- /dev/null
+++ b/external/guiunit/nant.bat
@@ -0,0 +1,2 @@
+tools\nant\bin\nant.exe %*
+
diff --git a/external/guiunit/nunitlite.build b/external/guiunit/nunitlite.build
new file mode 100755
index 0000000..0838fc9
--- /dev/null
+++ b/external/guiunit/nunitlite.build
@@ -0,0 +1,384 @@
+<?xml version="1.0"?>
+<project name="NUnit" default="help" basedir=".">
+
+<!-- ***************************************************************** -->
+<!-- This script has been tested using NAnt 0.92. At least -->
+<!-- one of the supported runtimes and sdk must be installed. In -->
+<!-- order to build the msi, WiX 2.0 and the WiX tasks for NAnt -->
+<!-- are required. To run the test coverage target, NCover is -->
+<!-- required. -->
+<!-- ***************************************************************** -->
+<!-- TODO: Edit above to reflect actual targets -->
+
+<!-- ***************************************************************** -->
+<!-- *** Default Help Target *** -->
+<!-- ***************************************************************** -->
+
+<target name="help">
+ <echo>
+This build file will build NUnitLite for any of the supported
+runtime frameworks which are actually installed. To add support
+for a framework, edit this script
+
+Running on the current system, the following runtime frameworks
+are available for building and testing NUnit:
+ </echo>
+
+ <foreach item="String" delim=","
+ property="framework" in="${installed.frameworks}">
+ <echo message=" ${string::pad-right(framework,18,' ')}${framework::get-description(framework)}"/>
+ </foreach>
+
+ <echo>
+Note that targets that set the build configuration or runtime
+to be used must come before action targets. For example:
+
+ nant net-2.0 release build
+ nant build-all
+ nant debug clean build
+
+Use nant -projecthelp to see a full list of targets.
+ </echo>
+</target>
+
+<!-- ***************************************************************** -->
+<!-- ********* Common properties that control the build ************** -->
+<!-- ***************************************************************** -->
+
+ <!-- Project name - used as a prefix for packages -->
+ <property name="project.name" value="NUnitLite"/>
+
+ <!-- NUnit version for packaging -->
+ <property name="package.version" value="0.9.0"/>
+
+ <!-- Additional suffix used to distinguish files with the same version -->
+ <property name="package.suffix" value=""/>
+
+ <!-- Nominal version used for install directory and program
+ files menu. Normally the same as the package version,
+ but may differ when we are in alpha or beta. -->
+ <property name="nominal.version" value="0.9.0" />
+
+ <!-- Frameworks supported by this build script -->
+ <property name="supported.frameworks"
+ value="net-1.1,net-2.0,net-3.5,net-4.0,net-4.5,netcf-2.0,netcf-3.5,mono-2.0,mono-3.5,mono-4.0,silverlight-3.0,silverlight-4.0,silverlight-5.0"/>
+
+ <!-- Framework versions for which packages are normally created -->
+ <property name="standard.packages"
+ value="net-1.1,net-2.0,net-3.5,net-4.0,net-4.5,netcf-2.0,netcf-3.5,silverlight-3.0,silverlight-4.0,silverlight-5.0" />
+
+ <!-- Additional internal properties are set in the include file -->
+ <include buildfile="nunitlite.build.include"/>
+
+
+<!-- ***************************************************************** -->
+<!-- *** Targets that set the build configuration *** -->
+<!-- *** These must come before actions like build or test *** -->
+<!-- ***************************************************************** -->
+
+ <target name="debug" description="Set config to debug for commands that follow">
+ <call target="set-debug-build-config" />
+ </target>
+
+ <target name="release" description="Set config to release for commands that follow">
+ <call target="set-release-build-config" />
+ </target>
+
+<!-- ***************************************************************** -->
+<!-- *** Targets that set the runtime configuration *** -->
+<!-- *** These must come before actions like build or test *** -->
+<!-- ***************************************************************** -->
+
+ <target name="net-1.1"
+ description="Set runtime to .NET 1.1 for targets that follow"
+ depends="set-net-1.1-runtime-config"/>
+
+ <target name="net-2.0"
+ description="Set runtime to .NET 2.0 for targets that follow"
+ depends="set-net-2.0-runtime-config"/>
+
+ <target name="net-3.5"
+ description="Set runtime to .NET 3.5 for targets that follow"
+ depends="set-net-3.5-runtime-config"/>
+
+ <target name="net-4.0"
+ description="Set runtime to .NET 4.0 for targets that follow"
+ depends="set-net-4.0-runtime-config"/>
+
+ <target name="net-4.5"
+ description="Set runtime to .NET 4.5 for targets that follow"
+ depends="set-net-4.5-runtime-config"/>
+
+ <target name="netcf-2.0"
+ description="Set runtime to .NET CF 2.0 for targets that follow"
+ depends="set-netcf-2.0-runtime-config"/>
+
+ <target name="netcf-3.5"
+ description="Set runtime to .NET CF 3.5 for targets that follow"
+ depends="set-netcf-3.5-runtime-config"/>
+
+ <target name="mono-2.0"
+ description="Set runtime to Mono 2.0 for targets that follow"
+ depends="set-mono-2.0-runtime-config"/>
+
+ <target name="mono-3.5"
+ description="Set runtime to Mono 3.5 for targets that follow"
+ depends="set-mono-3.5-runtime-config"/>
+
+ <target name="mono-4.0"
+ description="Set runtime to Mono 4.0 for targets that follow"
+ depends="set-mono-4.0-runtime-config"/>
+
+ <target name="sl-3.0"
+ description="Set runtime to Silverlight 3.0 for targets that follow"
+ depends="set-silverlight-3.0-runtime-config"/>
+
+ <target name="sl-4.0"
+ description="Set runtime to Silverlight 4.0 for targets that follow"
+ depends="set-silverlight-4.0-runtime-config"/>
+
+ <target name="sl-5.0"
+ description="Set runtime to Silverlight 5.0 for targets that follow"
+ depends="set-silverlight-5.0-runtime-config"/>
+
+<!-- ***************************************************************** -->
+<!-- *** Targets that clean directories *** -->
+<!-- ***************************************************************** -->
+
+ <target name="clean" depends="set-build-dir"
+ description="Removes the current build directory">
+
+ <property name="current.target" value="clean"/>
+ <call target="run-subprojects"/>
+
+ </target>
+
+ <target name="clean-all" description="Removes all build directories">
+ <delete dir="${project.build.dir}"
+ if="${directory::exists( project.build.dir )}"/>
+ </target>
+
+ <target name="clean-package-dir"
+ description="Removes the current package working directory">
+ <delete dir="${package.working.dir}"
+ if="${directory::exists( package.working.dir )}"/>
+ </target>
+
+ <target name="clean-source-dirs">
+ <delete>
+ <fileset>
+ <include name="*/*/obj/**/*"/>
+ <include name="*/*/bin/**/*"/>
+ </fileset>
+ </delete>
+ </target>
+.
+<!-- ***************************************************************** -->
+<!-- *** Targets that perform builds *** -->
+<!-- ***************************************************************** -->
+
+ <target name="build" depends="make-build-dir"
+ description="Build NUnit for default runtime version and config">
+
+ <echo message="*"/>
+ <echo message="* Starting ${runtime.config} ${build.config} build"/>
+ <echo message="* Current Build Directory = ${current.build.dir}"/>
+ <echo message="*"/>
+
+ <property name="nant.settings.currentframework" value="${build.framework}"/>
+
+ <property name="current.target" value="build"/>
+ <call target="run-subprojects"/>
+
+ </target>
+
+ <target name="build-all"
+ description="Build current config for all available runtimes">
+ <foreach item="String" delim=","
+ property="framework" in="${installed.frameworks}">
+ <call target="set-${framework}-runtime-config"/>
+ <call target="build"/>
+ </foreach>
+ </target>
+
+ <target name="rebuild" depends="make-build-dir"
+ description="Rebuild NUnit for default runtime version and config">
+
+ <echo message="*"/>
+ <echo message="* Starting ${runtime.config} ${build.config} rebuild"/>
+ <echo message="* Current Build Directory = ${current.build.dir}"/>
+ <echo message="*"/>
+
+ <property name="nant.settings.currentframework" value="${build.framework}"/>
+
+ <property name="current.target" value="rebuild"/>
+ <call target="run-subprojects"/>
+
+ </target>
+
+ <target name="rebuild-all" depends="clean-all,build-all"
+ description="Rebuild current config for all available runtimes">
+ <foreach item="String" delim=","
+ property="framework" in="${installed.frameworks}">
+ <call target="set-${framework}-runtime-config"/>
+ <call target="rebuild"/>
+ </foreach>
+ </target>
+
+<!-- ***************************************************************** -->
+<!-- *** Targets for running tests *** -->
+<!-- ***************************************************************** -->
+
+ <target name="test" depends="build"
+ description="Build and run tests for selected config and runtime">
+
+ <call target="run-test" unless="${runtime.platform == 'silverlight'}"/>
+ <call target="run-silverlight-test" if="${runtime.platform == 'silverlight'}"/>
+
+ </target>
+
+ <target name="ci-test" depends="build"
+ description="Build and run CI test (no gui) for selected config and runtime">
+
+ <call target="run-test" unless="${runtime.platform == 'silverlight'}"/>
+ <call target="run-silverlight-ci-test" if="${runtime.platform == 'silverlight'}"/>
+
+ </target>
+
+ <target name="run-test"
+ description="Run tests for selected config and runtime (no rebuild)">
+
+ <property name="nant.settings.currentframework" value="${runtime.config}"/>
+
+ <echo message="*"/>
+ <echo message="* Testing ${runtime.config} ${build.config} build"/>
+ <echo message="*"/>
+
+ <exec basedir="${current.build.dir}"
+ workingdir="${current.build.dir}"
+ program="nunitlite.tests.exe"
+ managed="Strict"/>
+
+ </target>
+
+ <target name="run-silverlight-test">
+
+ <property name="xap.file.name" value="nunitlite.tests-${msbuild.proj.suffix}.xap"/>
+
+ <exec program="sllauncher.exe"
+ basedir="C:\Program Files\Microsoft Silverlight"
+ workingdir="${current.build.dir}">
+
+ <arg value="/emulate:${xap.file.name}"/>
+ <arg value="/origin:file://TestPage.html"/>
+
+ </exec>
+
+ </target>
+
+ <target name="run-silverlight-ci-test">
+
+ <echo message="*"/>
+ <echo message="* Testing ${runtime.config} ${build.config} build"/>
+ <echo message="*"/>
+
+ <exec basedir="${current.build.dir}"
+ workingdir="${current.build.dir}"
+ program="ci-test-runner.exe"
+ commandline="nunitlite.tests"
+ managed="Strict"/>
+
+ </target>
+
+ <target name="test-all"
+ description="Build and test all runtimes for current config">
+
+ <foreach item="String" delim=","
+ property="framework" in="${installed.frameworks}">
+ <call target="set-${framework}-runtime-config"/>
+ <call target="test" />
+ </foreach>
+
+ </target>
+
+<!-- ***************************************************************** -->
+<!-- *** Targets for packaging the NUnitLite distribution *** -->
+<!-- ***************************************************************** -->
+
+ <target name="package" description="Create package for a release">
+
+ <call target="package-bins"/>
+ <call target="package-src"/>
+
+ </target>
+
+ <target name="package-bins" depends="clean-package-dir"
+ description="Package binaries for all supported frameworks">
+
+ <foreach item="String" delim=","
+ property="framework" in="${standard.packages}">
+
+ <if test="${framework::exists(framework)}">
+ <if test="${string::starts-with(framework, 'silverlight') or framework::sdk-exists(framework)}">
+ <call target="set-${framework}-runtime-config"/>
+ <call target="package-build"/>
+ </if>
+ </if>
+
+ </foreach>
+
+ <!-- Create the zip file -->
+ <zip zipfile="${project.package.dir}/${package.name}.zip" ziplevel="9">
+ <fileset basedir="${package.working.dir}" prefix="${package.name}">
+ <include name="**"/>
+ </fileset>
+ </zip>
+
+ <!-- Create the NuGet package -->
+ <exec program="NuGet.exe"
+ commandline="pack NUnitLite.nuspec -OutputDirectory package -Version ${package.version}"
+ workingdir="."/>
+
+ </target>
+
+ <target name="package-build" depends="build"
+ description="Helper that packages the binaries for a single build">
+
+ <copy todir="${package.working.dir}/${runtime.config}">
+ <fileset basedir="${current.build.dir}">
+ <include name="*"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="package-src" depends="clean-package-dir"
+ description="Create full source package for developer use">
+
+ <copy todir="${package.working.dir}">
+ <fileset basedir="${project.base.dir}">
+ <include name="README.txt"/>
+ <include name="CHANGES.txt"/>
+ <include name="LICENSE.txt"/>
+ <include name="nant.bat"/>
+ <include name="nunitlite.build"/>
+ <include name="nunitlite.build.include"/>
+ <include name="NUnitLite.nuspec"/>
+ <include name="NUnitLite.sln"/>
+ <include name="NUnitLiteCF.sln"/>
+ </fileset>
+ </copy>
+
+ <call target="copy-src"/>
+ <call target="copy-tools"/>
+
+ <!-- Create the zip file -->
+ <zip zipfile="${project.package.dir}/${package.name}-src.zip" ziplevel="9">
+ <fileset basedir="${package.working.dir}" prefix="${package.name}">
+ <include name="**"/>
+ </fileset>
+ </zip>
+
+ </target>
+
+</project>
diff --git a/external/guiunit/nunitlite.build.include b/external/guiunit/nunitlite.build.include
new file mode 100755
index 0000000..f25484b
--- /dev/null
+++ b/external/guiunit/nunitlite.build.include
@@ -0,0 +1,421 @@
+<?xml version="1.0"?>
+<project name="NUnit" default="build" basedir=".">
+
+<!-- ***************************************************************** -->
+<!-- **********Set Properties used by Various targets **************** -->
+<!-- ***************************************************************** -->
+
+ <!-- Project base dir is nant project base dir -->
+ <property name="project.base.dir"
+ value="${project::get-base-directory()}"/>
+
+ <!-- Other directories are derived from base -->
+ <property name="project.src.dir"
+ value="${path::combine(project.base.dir,'src')}"/>
+ <property name="project.tools.dir"
+ value="${path::combine(project.base.dir,'tools')}"/>
+ <property name="project.build.dir"
+ value="${path::combine(project.base.dir,'build')}"/>
+ <property name="project.package.dir"
+ value="${path::combine(project.base.dir,'package')}"/>
+
+ <!-- Root of the package file name -->
+ <property name="package.name"
+ value="${project.name}-${package.version}${package.suffix}"/>
+
+ <!-- Package directories -->
+ <property name="package.working.dir"
+ value="${path::combine(project.package.dir,package.name)}"/>
+ <property name="package.src.dir"
+ value="${path::combine(package.working.dir,'src')}"/>
+ <property name="package.tools.dir"
+ value="${path::combine(package.working.dir,'tools')}"/>
+
+ <!-- Default build configuration -->
+ <property name="build.config" value="debug"/>
+ <property name="build.defines" value=""/>
+
+ <!-- Default runtime configuration -->
+ <property name="runtime.config" value="${framework::get-target-framework()}"/>
+
+ <!-- Collect list of installed frameworks -->
+ <foreach item="String" delim=","
+ property="framework" in="${supported.frameworks}">
+ <if test="${framework::exists( framework )}">
+ <if test="${string::starts-with(framework, 'silverlight') or framework::sdk-exists( framework )}">
+ <property name="installed.frameworks" value="${installed.frameworks},${framework}"
+ if="${property::exists('installed.frameworks')}"/>
+ <property name="installed.frameworks" value="${framework}"
+ unless="${property::exists('installed.frameworks')}"/>
+ </if>
+ </if>
+ </foreach>
+
+<!-- ***************************************************************** -->
+<!-- ********* FileSets Used by Various Targets *********** -->
+<!-- ***************************************************************** -->
+
+ <!-- Files to be copied to source directories -->
+ <fileset id="source-files" >
+ <include name="**/*.sln" />
+ <include name="**/*.csproj" />
+ <include name="**/*.config" />
+ <include name="**/*.build" />
+ <include name="**/*.cs" />
+ <include name="**/*.xsd" />
+ <include name="**/*.xslt" />
+ <include name="**/*.resx" />
+ <include name="**/*.jpg" />
+ <include name="**/*.gif" />
+ <include name="**/*.ico" />
+ <include name="**/*.txt" />
+ <include name="**/resources/*" />
+
+ <exclude name="**/CVS/**" />
+ <exclude name="**/bin/**" />
+ <exclude name="**/obj/**" />
+ <exclude name="**/Debug/**" />
+ <exclude name="**/Release/**" />
+ </fileset>
+
+<!-- ***************************************************************** -->
+<!-- ********* Targets for setting the build configuration *********** -->
+<!-- ***************************************************************** -->
+
+ <target name="set-build-config">
+ <call target="set-${build.config}-build-config"/>
+ </target>
+
+ <target name="set-debug-build-config">
+ <property name="build.config" value="debug"/>
+ <property name="build.debug" value="true"/>
+ <property name="build.defines" value="DEBUG,TRACE,NUNITLITE,${runtime.defines}"
+ dynamic="true"/>
+ </target>
+
+ <target name="set-release-build-config">
+ <property name="build.config" value="release"/>
+ <property name="build.debug" value="false"/>
+ <property name="build.defines" value="TRACE,NUNITLITE,${runtime.defines}"
+ dynamic="true"/>
+ </target>
+
+<!-- ***************************************************************** -->
+<!-- *** Targets for setting the runtime configuration *** -->
+<!-- ***************************************************************** -->
+
+ <target name="set-runtime-config">
+ <call target="set-${runtime.config}-runtime-config"/>
+ </target>
+
+ <target name="set-net-1.1-runtime-config">
+ <fail unless="${framework::exists( 'net-1.1' )}"
+ message=".NET 1.1 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-1.1' )}"
+ message="The .NET 1.1 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="net"/>
+ <property name="runtime.version" value="1.1"/>
+ <property name="runtime.config" value="net-1.1"/>
+ <property name="runtime.defines" value="NET,NET_1_1,CLR_1_1"/>
+ <property name="build.framework" value="net-1.1"/>
+ <property name="build.method" value="nant"/>
+ <property name="msbuild.proj.suffix" value=""/>c
+ </target>
+
+ <target name="set-net-2.0-runtime-config">
+ <fail unless="${framework::exists( 'net-2.0' )}"
+ message=".NET 2.0 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-2.0' )}"
+ message="The .NET 2.0 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="net"/>
+ <property name="runtime.version" value="2.0"/>
+ <property name="runtime.config" value="net-2.0"/>
+ <property name="runtime.defines" value="NET,NET_2_0,CLR_2_0"/>
+ <property name="build.framework" value="net-3.5"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="2.0"/>
+ </target>
+
+ <target name="set-net-3.5-runtime-config">
+ <fail unless="${framework::exists( 'net-3.5' )}"
+ message=".NET 3.5 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-3.5' )}"
+ message="The .NET 3.5 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="net"/>
+ <property name="runtime.version" value="3.5"/>
+ <property name="runtime.config" value="net-3.5"/>
+ <property name="runtime.defines" value="NET,NET_3_5,CLR_2_0"/>
+ <property name="build.framework" value="net-4.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="3.5"/>
+ </target>
+
+ <target name="set-net-4.0-runtime-config">
+ <fail unless="${framework::exists( 'net-4.0' )}"
+ message=".NET 4.0 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-4.0' )}"
+ message="The .NET 4.0 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="net"/>
+ <property name="runtime.version" value="4.0"/>
+ <property name="runtime.config" value="net-4.0"/>
+ <property name="runtime.defines" value="NET,NET_4_0,CLR_4_0"/>
+ <property name="build.framework" value="net-4.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="4.0"/>
+ </target>
+
+ <target name="set-net-4.5-runtime-config">
+ <fail unless="${framework::exists( 'net-4.5' )}"
+ message=".NET 4.5 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-4.5' )}"
+ message="The .NET 4.5 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="net"/>
+ <property name="runtime.version" value="4.5"/>
+ <property name="runtime.config" value="net-4.5"/>
+ <property name="runtime.defines" value="NET,NET_4_5,CLR_4_0"/>
+ <property name="build.framework" value="net-4.5"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="4.5"/>
+ </target>
+
+ <target name="set-netcf-2.0-runtime-config">
+ <fail unless="${framework::exists( 'netcf-2.0' )}"
+ message=".NET CF 2.0 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'netcf-2.0' )}"
+ message="The .NET CF 2.0 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="netcf"/>
+ <property name="runtime.version" value="2.0"/>
+ <property name="runtime.config" value="netcf-2.0"/>
+ <property name="runtime.defines" value="NETCF,NETCF_2_0,CLR_2_0"/>
+ <property name="build.framework" value="netcf-2.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="netcf-2.0"/>
+ </target>
+
+ <target name="set-netcf-3.5-runtime-config">
+ <!--<fail unless="${framework::exists( 'netcf-3.5' )}"
+ message=".NET CF 3.5 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'net-3.5' )}"
+ message="The .NET 3.5 SDK is not configured or not installed"/>-->
+
+ <property name="runtime.platform" value="netcf"/>
+ <property name="runtime.version" value="3.5"/>
+ <property name="runtime.config" value="netcf-3.5"/>
+ <property name="runtime.defines" value="NETCF,NETCF_3_5,CLR_2_0"/>
+ <property name="build.framework" value="net-3.5"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="netcf-3.5"/>
+ </target>
+
+ <target name="set-mono-2.0-runtime-config">
+ <fail unless="${framework::exists( 'mono-2.0' )}"
+ message="Mono 2.0 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'mono-2.0' )}"
+ message="The Mono 2.0 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="mono"/>
+ <property name="runtime.version" value="2.0"/>
+ <property name="runtime.config" value="mono-2.0"/>
+ <property name="runtime.defines" value="MONO,MONO_2_0,CLR_2_0"/>
+ <property name="build.framework" value="mono-3.5"/>
+ <property name="build.method" value="nant"/>
+ <property name="msbuild.proj.suffix" value="2.0"/>
+ </target>
+
+ <target name="set-mono-3.5-runtime-config">
+ <fail unless="${framework::exists( 'mono-3.5' )}"
+ message="Mono 3.5 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'mono-3.5' )}"
+ message="The Mono 3.5 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="mono"/>
+ <property name="runtime.version" value="3.5"/>
+ <property name="runtime.config" value="mono-3.5"/>
+ <property name="runtime.defines" value="MONO,MONO_3_5,CLR_2_0"/>
+ <property name="build.framework" value="mono-3.5"/>
+ <property name="build.method" value="nant"/>
+ <property name="msbuild.proj.suffix" value="3.5"/>
+ </target>
+
+ <target name="set-mono-4.0-runtime-config">
+ <fail unless="${framework::exists( 'mono-4.0' )}"
+ message="Mono 4.0 is not installed"/>
+ <fail unless="${framework::sdk-exists( 'mono-4.0' )}"
+ message="The Mono 4.0 SDK is not configured or not installed"/>
+
+ <property name="runtime.platform" value="mono"/>
+ <property name="runtime.version" value="4.0"/>
+ <property name="runtime.config" value="mono-4.0"/>
+ <property name="runtime.defines" value="MONO,MONO_4_0,CLR_4_0"/>
+ <property name="build.framework" value="mono-4.0"/>
+ <property name="build.method" value="nant"/>
+ <property name="msbuild.proj.suffix" value="4.0"/>
+ </target>
+
+ <target name="set-silverlight-3.0-runtime-config">
+ <fail unless="${framework::exists( 'silverlight-3.0' )}"
+ message="Silverlight 3.0 is not installed"/>
+
+ <property name="runtime.platform" value="silverlight"/>
+ <property name="runtime.version" value="3.0"/>
+ <property name="runtime.config" value="silverlight-3.0"/>
+ <property name="runtime.defines" value="SILVERLIGHT,SL_3_0,CLR_2_0"/>
+ <property name="build.framework" value="silverlight-3.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="sl-3.0"/>
+ </target>
+
+ <target name="set-silverlight-4.0-runtime-config">
+ <fail unless="${framework::exists( 'silverlight-4.0' )}"
+ message="Silverlight 4.0 is not installed"/>
+
+ <property name="runtime.platform" value="silverlight"/>
+ <property name="runtime.version" value="4.0"/>
+ <property name="runtime.config" value="silverlight-4.0"/>
+ <property name="runtime.defines" value="SILVERLIGHT,SL_4_0,CLR_4_0"/>
+ <property name="build.framework" value="silverlight-4.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="sl-4.0"/>
+ </target>
+
+ <target name="set-silverlight-5.0-runtime-config">
+ <fail unless="${framework::exists( 'silverlight-5.0' )}"
+ message="Silverlight 5.0 is not installed"/>
+
+ <property name="runtime.platform" value="silverlight"/>
+ <property name="runtime.version" value="5.0"/>
+ <property name="runtime.config" value="silverlight-5.0"/>
+ <property name="runtime.defines" value="SILVERLIGHT,SL_5_0,CLR_4_0"/>
+ <property name="build.framework" value="silverlight-5.0"/>
+ <property name="build.method" value="msbuild"/>
+ <property name="msbuild.proj.suffix" value="sl-5.0"/>
+ </target>
+
+<!-- ***************************************************************** -->
+<!-- **************** Internally used targets ************************ -->
+<!-- ***************************************************************** -->
+
+ <!-- Set up the build directory -->
+ <target name="set-build-dir"
+ depends="set-build-config,set-runtime-config">
+ <property name="runtime.platform.dir"
+ value="${path::combine(project.build.dir,runtime.platform)}"/>
+ <property name="runtime.version.dir"
+ value="${path::combine(runtime.platform.dir,runtime.version)}"/>
+ <property name="current.build.dir"
+ value="${path::combine(runtime.version.dir,build.config)}"/>
+
+ <property name="msbuild.dir" value="${framework::get-framework-directory(build.framework)}"/>
+ <property name="msbuild.exe" value="MSBuild.exe" unless="${runtime.platform == 'mono'}"/>
+ <property name="msbuild.exe" value="xbuild.exe" if="${runtime.platform == 'mono'}"/>
+ <property name="msbuild.path" value="${msbuild.dir}/${msbuild.exe}"/>
+ </target>
+
+ <target name="make-build-dir" depends="set-build-dir">
+ <mkdir dir="${current.build.dir}"
+ unless="${directory::exists(current.build.dir)}"/>
+ </target>
+
+ <target name="create-zip" description="Create zip from existing image">
+ <!-- Create the zip file -->
+ <zip zipfile="${project.package.dir}/${zip.file.name}" ziplevel="9">
+ <fileset basedir="${package.working.dir}">
+ <include name="**"/>
+ </fileset>
+ </zip>
+ </target>
+
+ <target name="copy-src">
+ <delete dir="${package.src.dir}" />
+ <mkdir dir="${package.src.dir}"/>
+
+ <copy todir="${package.src.dir}">
+ <fileset basedir="${project.src.dir}">
+ <include name="framework/*.csproj"/>
+ <include name="framework/*.snk"/>
+ <include name="framework/*.build"/>
+ <include name="framework/**/*.cs"/>
+ <include name="tests/*.csproj"/>
+ <include name="tests/**/*.cs"/>
+ <include name="tests/*.build"/>
+ <include name="testdata/*.csproj"/>
+ <include name="testdata/**/*.cs"/>
+ <include name="testdata/*.build"/>
+ <include name="mock-assembly/*.csproj"/>
+ <include name="mock-assembly/**/*.cs"/>
+ <include name="mock-assembly/*.build"/>
+ <include name="TestResultConsole/*.csproj"/>
+ <include name="TestResultConsole/**/*.cs"/>
+ <include name="TestResultConsole/*.build"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="copy-tools">
+
+ <delete dir="${package.tools.dir}" />
+ <mkdir dir="${package.tools.dir}"/>
+
+ <copy todir="${package.tools.dir}">
+ <fileset basedir="${project.tools.dir}">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="run-subprojects">
+
+ <nant target="${current.target}" buildfile="src/framework/nunitlite.framework.build"/>
+ <nant target="${current.target}" buildfile="src/mock-assembly/mock-assembly.build"/>
+ <nant target="${current.target}" buildfile="src/testdata/nunitlite.testdata.build"/>
+ <nant target="${current.target}" buildfile="src/tests/nunitlite.tests.build"/>
+ <nant target="${current.target}" buildfile="src/runner/ci-test-runner.build"
+ if="${runtime.platform=='silverlight'}"/>
+
+ </target>
+
+ <!-- ***************************************************************** -->
+<!-- *** Dump configuration settings for debugging *** -->
+<!-- ***************************************************************** -->
+
+ <target name="dump-settings" depends="set-build-dir">
+ <echo>Project Directories</echo>
+ <echo> Base: ${project.base.dir}</echo>
+ <echo> Source: ${project.src.dir}</echo>
+ <echo> Build: ${project.build.dir}</echo>
+ <echo> Package: ${project.package.dir}</echo>
+ <echo></echo>
+ <echo>Supported Framework Versions</echo>
+ <echo> ${supported.frameworks}</echo>
+ <echo></echo>
+ <echo>Installed Framework Versions</echo>
+ <echo> ${installed.frameworks}</echo>
+ <echo></echo>
+ <echo>Current Configuration</echo>
+ <echo> Config: ${build.config}</echo>
+ <echo> Runtime: ${runtime.config}</echo>
+ <echo> VS Proj: nunitlite-${msbuild.proj.suffix}.csproj</echo>
+ <echo> Defines: ${build.defines}</echo>
+ <echo> Builder: ${msbuild.exe}</echo>
+ <echo> Version: ${package.version}</echo>
+ <echo> Package: ${package.name}</echo>
+ <echo></echo>
+ <echo>Current Working Directories</echo>
+ <echo> Build: ${current.build.dir}</echo>
+ <echo> Package: ${package.working.dir}</echo>
+ <echo> Source: ${package.src.dir}</echo>
+ <echo></echo>
+ <echo>Current Framework and SDK Directories</echo>
+ <echo> ${framework::get-framework-directory(runtime.config)}</echo>
+ <echo> ${framework::get-sdk-directory(runtime.config)}</echo>
+ </target>
+
+</project>
\ No newline at end of file
diff --git a/external/guiunit/src/TestResultConsole/AssemblyInfo.cs b/external/guiunit/src/TestResultConsole/AssemblyInfo.cs
new file mode 100755
index 0000000..967586f
--- /dev/null
+++ b/external/guiunit/src/TestResultConsole/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("TestResultConsole.cs")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TestResultConsole.cs")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0245d9d3-40c9-47f0-a109-31131cc0ea53")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/external/guiunit/src/TestResultConsole/Program.cs b/external/guiunit/src/TestResultConsole/Program.cs
new file mode 100755
index 0000000..3aa2c67
--- /dev/null
+++ b/external/guiunit/src/TestResultConsole/Program.cs
@@ -0,0 +1,49 @@
+using System;
+using System.IO;
+using System.Net.Sockets;
+using System.Text;
+
+namespace TestResultConsole.cs
+{
+ class Program
+ {
+ static int port = 9000;
+
+ static void Main(string[] args)
+ {
+ TcpListener listener = new TcpListener(port);
+
+ listener.Start();
+ Console.WriteLine("Waiting for test to begin...");
+ TcpClient client = listener.AcceptTcpClient();
+
+ Console.WriteLine("Connected to test runner...");
+ Console.WriteLine();
+
+ NetworkStream ns = client.GetStream();
+ TextReader rdr = new StreamReader(ns);
+
+ try
+ {
+ while (client.Connected)
+ {
+ string data = rdr.ReadLine();
+ Console.WriteLine(data);
+ }
+ }
+ catch (IOException e)
+ {
+ if (client.Connected)
+ Console.WriteLine(e.ToString());
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+
+ client.Close();
+ listener.Stop();
+ }
+ }
+}
+
diff --git a/external/guiunit/src/TestResultConsole/TestResultConsole.csproj b/external/guiunit/src/TestResultConsole/TestResultConsole.csproj
new file mode 100755
index 0000000..5ea4f59
--- /dev/null
+++ b/external/guiunit/src/TestResultConsole/TestResultConsole.csproj
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8CB31CE4-639A-4A34-B04D-A8CE3FEBECB3}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>TestResultConsole</RootNamespace>
+ <AssemblyName>TestResultConsole</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Program.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Api/ExpectedExceptionData.cs b/external/guiunit/src/framework/Api/ExpectedExceptionData.cs
new file mode 100755
index 0000000..cf92ff4
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ExpectedExceptionData.cs
@@ -0,0 +1,143 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// ExpectedExceptionData is a struct used within the framework
+ /// to encapsulate information about an expected exception.
+ /// </summary>
+ public struct ExpectedExceptionData
+ {
+ #region Fields
+
+ private Type expectedExceptionType;
+ private string expectedExceptionName;
+ private string expectedMessage;
+ private MessageMatch matchType;
+ private string userMessage;
+ private string handlerName;
+ private MethodInfo exceptionHandler;
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// The Type of any exception that is expected.
+ /// </summary>
+ public Type ExpectedExceptionType
+ {
+ get { return expectedExceptionType; }
+ set
+ {
+ expectedExceptionType = value;
+ expectedExceptionName = value.FullName;
+ }
+ }
+
+ /// <summary>
+ /// The FullName of any exception that is expected
+ /// </summary>
+ public string ExpectedExceptionName
+ {
+ get { return expectedExceptionName; }
+ set
+ {
+ expectedExceptionName = value;
+ expectedExceptionType = null;
+ }
+ }
+
+ /// <summary>
+ /// The Message of any exception that is expected
+ /// </summary>
+ public string ExpectedMessage
+ {
+ get { return expectedMessage; }
+ set { expectedMessage = value; }
+ }
+
+ /// <summary>
+ /// The type of match to be performed on the expected message
+ /// </summary>
+ public MessageMatch MatchType
+ {
+ get { return matchType; }
+ set { matchType = value; }
+ }
+
+ /// <summary>
+ /// A user message to be issued in case of error
+ /// </summary>
+ public string UserMessage
+ {
+ get { return userMessage; }
+ set { userMessage = value; }
+ }
+
+ /// <summary>
+ /// The name of an alternate exception handler to be
+ /// used to validate the exception.
+ /// </summary>
+ public string HandlerName
+ {
+ get { return handlerName; }
+ set
+ {
+ handlerName = value;
+ exceptionHandler = null;
+ }
+ }
+
+ #endregion
+
+ #region Methods
+
+ /// <summary>
+ /// Returns a MethodInfo for the handler to be used to
+ /// validate any exception thrown.
+ /// </summary>
+ /// <param name="fixtureType">The Type of the fixture.</param>
+ /// <returns>A MethodInfo.</returns>
+ public MethodInfo GetExceptionHandler(Type fixtureType)
+ {
+ if (exceptionHandler == null && handlerName != null)
+ {
+ exceptionHandler = fixtureType.GetMethod(
+ handlerName,
+ BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
+ null,
+ new Type[] { typeof(System.Exception) },
+ null);
+ }
+
+ return exceptionHandler;
+ }
+
+ #endregion
+ };
+}
diff --git a/external/guiunit/src/framework/Api/FailureSite.cs b/external/guiunit/src/framework/Api/FailureSite.cs
new file mode 100755
index 0000000..778b486
--- /dev/null
+++ b/external/guiunit/src/framework/Api/FailureSite.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The FailureSite enum indicates the stage of a test
+ /// in which an error or failure occured.
+ /// </summary>
+ public enum FailureSite
+ {
+ /// <summary>
+ /// Failure in the test itself
+ /// </summary>
+ Test,
+
+ /// <summary>
+ /// Failure in the SetUp method
+ /// </summary>
+ SetUp,
+
+ /// <summary>
+ /// Failure in the TearDown method
+ /// </summary>
+ TearDown,
+
+ /// <summary>
+ /// Failure of a parent test
+ /// </summary>
+ Parent,
+
+ /// <summary>
+ /// Failure of a child test
+ /// </summary>
+ Child
+ }
+}
diff --git a/external/guiunit/src/framework/Api/IParameterDataSource.cs b/external/guiunit/src/framework/Api/IParameterDataSource.cs
new file mode 100755
index 0000000..59bc686
--- /dev/null
+++ b/external/guiunit/src/framework/Api/IParameterDataSource.cs
@@ -0,0 +1,44 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The IParameterDataSource interface is implemented by types
+ /// that can provide data for a test method parameter.
+ /// </summary>
+ public interface IParameterDataSource
+ {
+ /// <summary>
+ /// Gets an enumeration of data items for use as arguments
+ /// for a test method parameter.
+ /// </summary>
+ /// <param name="parameter">The parameter for which data is needed</param>
+ /// <returns>An enumeration containing individual data items</returns>
+ IEnumerable GetData(ParameterInfo parameter);
+ }
+}
diff --git a/external/guiunit/src/framework/Api/IPropertyBag.cs b/external/guiunit/src/framework/Api/IPropertyBag.cs
new file mode 100755
index 0000000..50095ff
--- /dev/null
+++ b/external/guiunit/src/framework/Api/IPropertyBag.cs
@@ -0,0 +1,162 @@
+using System;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// A PropertyBag represents a collection of name/value pairs
+ /// that allows duplicate entries with the same key. Methods
+ /// are provided for adding a new pair as well as for setting
+ /// a key to a single value. All keys are strings but values
+ /// may be of any type. Null values are not permitted, since
+ /// a null entry represents the absence of the key.
+ ///
+ /// The entries in a PropertyBag are of two kinds: those that
+ /// take a single value and those that take multiple values.
+ /// However, the PropertyBag has no knowledge of which entries
+ /// fall into each category and the distinction is entirely
+ /// up to the code using the PropertyBag.
+ ///
+ /// When working with multi-valued properties, client code
+ /// should use the Add method to add name/value pairs and
+ /// indexing to retrieve a list of all values for a given
+ /// key. For example:
+ ///
+ /// bag.Add("Tag", "one");
+ /// bag.Add("Tag", "two");
+ /// Assert.That(bag["Tag"],
+ /// Is.EqualTo(new string[] { "one", "two" }));
+ ///
+ /// When working with single-valued propeties, client code
+ /// should use the Set method to set the value and Get to
+ /// retrieve the value. The GetSetting methods may also be
+ /// used to retrieve the value in a type-safe manner while
+ /// also providing default. For example:
+ ///
+ /// bag.Set("Priority", "low");
+ /// bag.Set("Priority", "high"); // replaces value
+ /// Assert.That(bag.Get("Priority"),
+ /// Is.EqualTo("high"));
+ /// Assert.That(bag.GetSetting("Priority", "low"),
+ /// Is.EqualTo("high"));
+ /// </summary>
+ public interface IPropertyBag : IXmlNodeBuilder, System.Collections.IEnumerable
+ {
+ /// <summary>
+ /// Get the number of key/value pairs in the property bag
+ /// </summary>
+ int Count { get; }
+
+ /// <summary>
+ /// Adds a key/value pair to the property bag
+ /// </summary>
+ /// <param name="key">The key</param>
+ /// <param name="value">The value</param>
+ void Add(string key, object value);
+
+
+ /// <summary>
+ /// Sets the value for a key, removing any other
+ /// values that are already in the property set.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ void Set(string key, object value);
+
+ /// <summary>
+ /// Gets a single value for a key, using the first
+ /// one if multiple values are present and returning
+ /// null if the value is not found.
+ /// </summary>
+ object Get(string key);
+
+ /// <summary>
+ /// Gets a single string value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ string GetSetting(string key, string defaultValue);
+
+ /// <summary>
+ /// Gets a single int value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ int GetSetting(string key, int defaultValue);
+
+ /// <summary>
+ /// Gets a single boolean value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ bool GetSetting(string key, bool defaultValue);
+
+ /// <summary>
+ /// Gets a single enum value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ System.Enum GetSetting(string key, System.Enum defaultValue);
+
+ /// <summary>
+ /// Removes all entries for a key from the property set.
+ /// If the key is not found, no error occurs.
+ /// </summary>
+ /// <param name="key">The key for which the entries are to be removed</param>
+ void Remove(string key);
+
+ /// <summary>
+ /// Removes a single entry if present. If not found,
+ /// no error occurs.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ void Remove(string key, object value);
+
+ /// <summary>
+ /// Removes a specific PropertyEntry. If the entry is not
+ /// found, no errr occurs.
+ /// </summary>
+ /// <param name="entry">The property entry to remove</param>
+ void Remove(PropertyEntry entry);
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key has
+ /// any entries in the property set.
+ /// </summary>
+ /// <param name="key">The key to be checked</param>
+ /// <returns>True if their are values present, otherwise false</returns>
+ bool ContainsKey(string key);
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key and
+ /// value are present in the property set.
+ /// </summary>
+ /// <param name="key">The key to be checked</param>
+ /// <param name="value">The value to be checked</param>
+ /// <returns>True if the key and value are present, otherwise false</returns>
+ bool Contains(string key, object value);
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key and
+ /// value are present in the property set.
+ /// </summary>
+ /// <param name="entry">The property entry to be checked</param>
+ /// <returns>True if the entry is present, otherwise false</returns>
+ bool Contains(PropertyEntry entry);
+
+ /// <summary>
+ /// Gets or sets the list of values for a particular key
+ /// </summary>
+ /// <param name="key">The key for which the values are to be retrieved or set</param>
+ System.Collections.IList this[string key] { get; set; }
+
+ /// <summary>
+ /// Gets a collection containing all the keys in the property set
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ System.Collections.Generic.ICollection<string> Keys { get; }
+#else
+ System.Collections.ICollection Keys { get; }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITest.cs b/external/guiunit/src/framework/Api/ITest.cs
new file mode 100755
index 0000000..e75b6b8
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITest.cs
@@ -0,0 +1,102 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// Common interface supported by all representations
+ /// of a test. Only includes informational fields.
+ /// The Run method is specifically excluded to allow
+ /// for data-only representations of a test.
+ /// </summary>
+ public interface ITest : IXmlNodeBuilder
+ {
+ /// <summary>
+ /// Gets or sets the id of the test
+ /// </summary>
+ int Id { get; set; }
+
+ /// <summary>
+ /// Gets the name of the test
+ /// </summary>
+ string Name { get; }
+
+ /// <summary>
+ /// Gets the fully qualified name of the test
+ /// </summary>
+ string FullName { get; }
+
+ /// <summary>
+ /// Gets the Type of the test fixture, if applicable, or
+ /// null if no fixture type is associated with this test.
+ /// </summary>
+ Type FixtureType { get; }
+
+ /// <summary>
+ /// Indicates whether the test can be run using
+ /// the RunState enum.
+ /// </summary>
+ RunState RunState { get; set; }
+
+ /// <summary>
+ /// Count of the test cases ( 1 if this is a test case )
+ /// </summary>
+ int TestCaseCount { get; }
+
+ /// <summary>
+ /// Gets the properties of the test
+ /// </summary>
+ IPropertyBag Properties { get; }
+
+ /// <summary>
+ /// Gets the parent test, if any.
+ /// </summary>
+ /// <value>The parent test or null if none exists.</value>
+ ITest Parent { get; }
+
+ /// <summary>
+ /// Gets a bool indicating whether the current test
+ /// has any descendant tests.
+ /// </summary>
+ bool HasChildren { get; }
+
+ /// <summary>
+ /// Gets the Int value representing the seed for the RandomGenerator
+ /// </summary>
+ /// <value></value>
+ int Seed { get; }
+
+ /// <summary>
+ /// Gets this test's child tests
+ /// </summary>
+ /// <value>A list of child tests</value>
+#if CLR_2_0 || CLR_4_0
+ System.Collections.Generic.IList<ITest> Tests { get; }
+#else
+ System.Collections.IList Tests { get; }
+#endif
+ }
+}
+
diff --git a/external/guiunit/src/framework/Api/ITestAssemblyBuilder.cs b/external/guiunit/src/framework/Api/ITestAssemblyBuilder.cs
new file mode 100755
index 0000000..c569a9c
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestAssemblyBuilder.cs
@@ -0,0 +1,56 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestAssemblyBuilder interface is implemented by a class
+ /// that is able to build a suite of tests given an assembly or
+ /// an assembly filename.
+ /// </summary>
+ public interface ITestAssemblyBuilder
+ {
+ // TODO: Remove use of TestSuite after tests are not self-running
+
+ /// <summary>
+ /// Build a suite of tests from a provided assembly
+ /// </summary>
+ /// <param name="assembly">The assembly from which tests are to be built</param>
+ /// <param name="options">A dictionary of options to use in building the suite</param>
+ /// <returns>A TestSuite containing the tests found in the assembly</returns>
+ TestSuite Build(Assembly assembly, IDictionary options);
+
+ /// <summary>
+ /// Build a suite of tests given the filename of an assembly
+ /// </summary>
+ /// <param name="assemblyName">The filename of the assembly from which tests are to be built</param>
+ /// <param name="options">A dictionary of options to use in building the suite</param>
+ /// <returns>A TestSuite containing the tests found in the assembly</returns>
+ TestSuite Build(string assemblyName, IDictionary options);
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestAssemblyRunner.cs b/external/guiunit/src/framework/Api/ITestAssemblyRunner.cs
new file mode 100755
index 0000000..184c78d
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestAssemblyRunner.cs
@@ -0,0 +1,83 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestAssemblyRunner interface is implemented by classes
+ /// that are able to execute a suite of tests loaded
+ /// from an assembly.
+ /// </summary>
+ public interface ITestAssemblyRunner
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets the tree of loaded tests, or null if
+ /// no tests have been loaded.
+ /// </summary>
+ ITest LoadedTest { get; }
+
+ #endregion
+
+ #region Methods
+
+ /// <summary>
+ /// Loads the tests found in an Assembly, returning an
+ /// indication of whether or not the load succeeded.
+ /// </summary>
+ /// <param name="assemblyName">File name of the assembly to load</param>
+ /// <param name="settings">Dictionary of settings to use in loading the test</param>
+ /// <returns>True if the load was successful</returns>
+ bool Load(string assemblyName, System.Collections.IDictionary settings);
+
+ /// <summary>
+ /// Loads the tests found in an Assembly, returning an
+ /// indication of whether or not the load succeeded.
+ /// </summary>
+ /// <param name="assembly">The assembly to load</param>
+ /// <param name="settings">Dictionary of settings to use in loading the test</param>
+ /// <returns>True if the load was successful</returns>
+ bool Load(Assembly assembly, System.Collections.IDictionary settings);
+
+ ///// <summary>
+ ///// Count Test Cases using a filter
+ ///// </summary>
+ ///// <param name="filter">The filter to apply</param>
+ ///// <returns>The number of test cases found</returns>
+ //int CountTestCases(TestFilter filter);
+
+ /// <summary>
+ /// Run selected tests and return a test result. The test is run synchronously,
+ /// and the listener interface is notified as it progresses.
+ /// </summary>
+ /// <param name="listener">Interface to receive ITestListener notifications.</param>
+ /// <param name="filter">A test filter used to select tests to be run</param>
+ ITestResult Run(ITestListener listener, ITestFilter filter);
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestCaseData.cs b/external/guiunit/src/framework/Api/ITestCaseData.cs
new file mode 100755
index 0000000..565a710
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestCaseData.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 OFn
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestCaseData interface is implemented by a class
+ /// that is able to return complete testcases for use by
+ /// a parameterized test method.
+ /// </summary>
+ public interface ITestCaseData
+ {
+ /// <summary>
+ /// Gets the name to be used for the test
+ /// </summary>
+ string TestName { get; }
+
+ /// <summary>
+ /// Gets the RunState for this test case.
+ /// </summary>
+ RunState RunState { get; }
+
+ /// <summary>
+ /// Gets the argument list to be provided to the test
+ /// </summary>
+ object[] Arguments { get; }
+
+ /// <summary>
+ /// Gets the expected result of the test case
+ /// </summary>
+ object ExpectedResult { get; }
+
+ /// <summary>
+ /// Returns true if an expected result has been set
+ /// </summary>
+ bool HasExpectedResult { get; }
+
+ /// <summary>
+ /// Gets data about any expected exception.
+ /// </summary>
+ ExpectedExceptionData ExceptionData { get; }
+
+ /// <summary>
+ /// Gets the property dictionary for the test case
+ /// </summary>
+ IPropertyBag Properties { get; }
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestCaseSource.cs b/external/guiunit/src/framework/Api/ITestCaseSource.cs
new file mode 100755
index 0000000..74cb7bb
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestCaseSource.cs
@@ -0,0 +1,50 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 OFn
+// 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.Reflection;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// ITestCaseSource interface is implemented by Types that know how to
+ /// return a set of ITestCaseData items for use by a test method.
+ /// </summary>
+ /// <remarks>
+ /// This method is defined differently depending on the version of .NET.
+ /// </remarks>
+ public interface ITestCaseSource
+ {
+ /// <summary>
+ /// Returns a set of ITestCaseDataItems for use as arguments
+ /// to a parameterized test method.
+ /// </summary>
+ /// <param name="method">The method for which data is needed.</param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method);
+#else
+ System.Collections.IEnumerable GetTestCasesFor(MethodInfo method);
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestCaseSourceProvider.cs b/external/guiunit/src/framework/Api/ITestCaseSourceProvider.cs
new file mode 100755
index 0000000..9442e9d
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestCaseSourceProvider.cs
@@ -0,0 +1,50 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 OFn
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestCaseSourceProvider interface is implemented by Types that
+ /// are able to provide a test case source for use by a test method.
+ /// </summary>
+ public interface IDynamicTestCaseSource
+ {
+ /// <summary>
+ /// Returns a test case source. May be called on a provider
+ /// implementing the source internally or able to create
+ /// a source instance on it's own.
+ /// </summary>
+ /// <returns></returns>
+ ITestCaseSource GetTestCaseSource();
+
+ /// <summary>
+ /// Returns a test case source based on an instance of a
+ /// source object.
+ /// </summary>
+ /// <param name="instance"></param>
+ /// <returns></returns>
+ ITestCaseSource GetTestCaseSource(object instance);
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestFilter.cs b/external/guiunit/src/framework/Api/ITestFilter.cs
new file mode 100755
index 0000000..06a59b7
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestFilter.cs
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// Interface to be implemented by filters applied to tests.
+ /// The filter applies when running the test, after it has been
+ /// loaded, since this is the only time an ITest exists.
+ /// </summary>
+ public interface ITestFilter
+ {
+ /// <summary>
+ /// Indicates whether this is the EmptyFilter
+ /// </summary>
+ bool IsEmpty { get; }
+
+ /// <summary>
+ /// Determine if a particular test passes the filter criteria. Pass
+ /// may examine the parents and/or descendants of a test, depending
+ /// on the semantics of the particular filter
+ /// </summary>
+ /// <param name="test">The test to which the filter is applied</param>
+ /// <returns>True if the test passes the fFilter, otherwise false</returns>
+ bool Pass( ITest test );
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestListener.cs b/external/guiunit/src/framework/Api/ITestListener.cs
new file mode 100755
index 0000000..5fb2593
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestListener.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestListener interface is used internally to receive
+ /// notifications of significant events while a test is being
+ /// run. The events are propogated to clients by means of an
+ /// AsyncCallback. NUnit extensions may also monitor these events.
+ /// </summary>
+ public interface ITestListener
+ {
+ /// <summary>
+ /// Called when a test has just started
+ /// </summary>
+ /// <param name="test">The test that is starting</param>
+ void TestStarted(ITest test);
+
+ /// <summary>
+ /// Called when a test has finished
+ /// </summary>
+ /// <param name="result">The result of the test</param>
+ void TestFinished(ITestResult result);
+
+ /// <summary>
+ /// Called when the test creates text output.
+ /// </summary>
+ /// <param name="testOutput">A console message</param>
+ void TestOutput(TestOutput testOutput);
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ITestResult.cs b/external/guiunit/src/framework/Api/ITestResult.cs
new file mode 100755
index 0000000..c41974a
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ITestResult.cs
@@ -0,0 +1,170 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ITestResult interface represents the result of a test.
+ /// </summary>
+ public interface ITestResult : IXmlNodeBuilder
+ {
+ /// <summary>
+ /// Gets the ResultState of the test result, which
+ /// indicates the success or failure of the test.
+ /// </summary>
+ ResultState ResultState
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the name of the test result
+ /// </summary>
+ string Name
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the full name of the test result
+ /// </summary>
+ string FullName
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the elapsed time for running the test
+ /// </summary>
+ TimeSpan Duration
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the message associated with a test
+ /// failure or with not running the test
+ /// </summary>
+ string Message
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets any stacktrace associated with an
+ /// error or failure. Not available in
+ /// the Compact Framework 1.0.
+ /// </summary>
+ string StackTrace
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the failure site, which indicates the point
+ /// in the processing of the test where it failed.
+ /// </summary>
+ FailureSite FailureSite
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the number of asserts executed
+ /// when running the test and all its children.
+ /// </summary>
+ int AssertCount
+ {
+ get;
+ }
+
+
+ /// <summary>
+ /// Gets the number of test cases that failed
+ /// when running the test and all its children.
+ /// </summary>
+ int FailCount
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that passed
+ /// when running the test and all its children.
+ /// </summary>
+ int PassCount
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were skipped
+ /// when running the test and all its children.
+ /// </summary>
+ int SkipCount
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were inconclusive
+ /// when running the test and all its children.
+ /// </summary>
+ int InconclusiveCount
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Indicates whether this result has any child results.
+ /// Accessing HasChildren should not force creation of the
+ /// Children collection in classes implementing this interface.
+ /// </summary>
+ bool HasChildren
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the the collection of child results.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ System.Collections.Generic.IList<ITestResult> Children
+#else
+ System.Collections.IList Children
+#endif
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets the Test to which this result applies.
+ /// </summary>
+ ITest Test
+ {
+ get;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Api/IXmlNodeBuilder.cs b/external/guiunit/src/framework/Api/IXmlNodeBuilder.cs
new file mode 100755
index 0000000..f2ef058
--- /dev/null
+++ b/external/guiunit/src/framework/Api/IXmlNodeBuilder.cs
@@ -0,0 +1,29 @@
+using System;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// An object implementing IXmlNodeBuilder is able to build
+ /// an XmlResult representation of itself and any children.
+ /// Note that the interface refers to the implementation
+ /// of XmlNode in the NUnit.Framework.Api namespace.
+ /// </summary>
+ public interface IXmlNodeBuilder
+ {
+ /// <summary>
+ /// Returns an XmlNode representating the current object.
+ /// </summary>
+ /// <param name="recursive">If true, children are included where applicable</param>
+ /// <returns>An XmlNode representing the result</returns>
+ XmlNode ToXml(bool recursive);
+
+ /// <summary>
+ /// Returns an XmlNode representing the current object after
+ /// adding it as a child of the supplied parent node.
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">If true, children are included, where applicable</param>
+ /// <returns></returns>
+ XmlNode AddToXml(XmlNode parentNode, bool recursive);
+ }
+}
diff --git a/external/guiunit/src/framework/Api/PropertyEntry.cs b/external/guiunit/src/framework/Api/PropertyEntry.cs
new file mode 100755
index 0000000..5b9d6fd
--- /dev/null
+++ b/external/guiunit/src/framework/Api/PropertyEntry.cs
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// Immutable class that stores a property entry as a Name/Value pair.
+ /// </summary>
+ public class PropertyEntry
+ {
+ private readonly string name;
+ private readonly object value;
+
+ /// <summary>
+ /// Initializes a new immutable instance of the <see cref="PropertyEntry"/> class.
+ /// </summary>
+ /// <param name="name"></param>
+ /// <param name="value"></param>
+ public PropertyEntry(string name, object value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ /// <summary>Name of the PropertyEntry.</summary>
+ public string Name
+ {
+ get { return name; }
+ }
+
+ /// <summary>Value of the PropertyEntry.</summary>
+ public object Value
+ {
+ get { return value; }
+ }
+
+ /// <summary>
+ /// Returns a <see cref="System.String"/> that represents this instance.
+ /// </summary>
+ /// <returns>
+ /// A <see cref="System.String"/> that represents this instance.
+ /// </returns>
+ public override string ToString()
+ {
+ return string.Format("{0}={1}", name, value);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Api/ResultState.cs b/external/guiunit/src/framework/Api/ResultState.cs
new file mode 100755
index 0000000..9b0a7d5
--- /dev/null
+++ b/external/guiunit/src/framework/Api/ResultState.cs
@@ -0,0 +1,139 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The ResultState class represents the outcome of running a test.
+ /// It contains two pieces of information. The Status of the test
+ /// is an enum indicating whether the test passed, failed, was
+ /// skipped or was inconclusive. The Label provides a more
+ /// detailed breakdown for use by client runners.
+ /// </summary>
+ public class ResultState
+ {
+ private readonly TestStatus status;
+ private readonly string label;
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ResultState"/> class.
+ /// </summary>
+ /// <param name="status">The TestStatus.</param>
+ public ResultState(TestStatus status) : this (status, string.Empty)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ResultState"/> class.
+ /// </summary>
+ /// <param name="status">The TestStatus.</param>
+ /// <param name="label">The label.</param>
+ public ResultState(TestStatus status, string label)
+ {
+ this.status = status;
+ this.label = label == null ? string.Empty : label;
+ }
+
+ #endregion
+
+ #region Predefined ResultStates
+
+ /// <summary>
+ /// The result is inconclusive
+ /// </summary>
+ public readonly static ResultState Inconclusive = new ResultState(TestStatus.Inconclusive);
+
+ /// <summary>
+ /// The test was not runnable.
+ /// </summary>
+ public readonly static ResultState NotRunnable = new ResultState(TestStatus.Skipped, "Invalid");
+
+ /// <summary>
+ /// The test has been skipped.
+ /// </summary>
+ public readonly static ResultState Skipped = new ResultState(TestStatus.Skipped);
+
+ /// <summary>
+ /// The test has been ignored.
+ /// </summary>
+ public readonly static ResultState Ignored = new ResultState(TestStatus.Skipped, "Ignored");
+
+ /// <summary>
+ /// The test succeeded
+ /// </summary>
+ public readonly static ResultState Success = new ResultState(TestStatus.Passed);
+
+ /// <summary>
+ /// The test failed
+ /// </summary>
+ public readonly static ResultState Failure = new ResultState(TestStatus.Failed);
+
+ /// <summary>
+ /// The test encountered an unexpected exception
+ /// </summary>
+ public readonly static ResultState Error = new ResultState(TestStatus.Failed, "Error");
+
+ /// <summary>
+ /// The test was cancelled by the user
+ /// </summary>
+ public readonly static ResultState Cancelled = new ResultState(TestStatus.Failed, "Cancelled");
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the TestStatus for the test.
+ /// </summary>
+ /// <value>The status.</value>
+ public TestStatus Status
+ {
+ get { return status; }
+ }
+
+ /// <summary>
+ /// Gets the label under which this test resullt is
+ /// categorized, if any.
+ /// </summary>
+ public string Label
+ {
+ get { return label; }
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Returns a <see cref="System.String"/> that represents this instance.
+ /// </summary>
+ /// <returns>
+ /// A <see cref="System.String"/> that represents this instance.
+ /// </returns>
+ public override string ToString()
+ {
+ string s = status.ToString();
+ return label == null || label.Length == 0 ? s : string.Format("{0}:{1}", s, label);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Api/RunState.cs b/external/guiunit/src/framework/Api/RunState.cs
new file mode 100755
index 0000000..5db73ad
--- /dev/null
+++ b/external/guiunit/src/framework/Api/RunState.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The RunState enum indicates whether a test
+ /// can be executed.
+ /// </summary>
+ public enum RunState
+ {
+ /// <summary>
+ /// The test is not runnable.
+ /// </summary>
+ NotRunnable,
+
+ /// <summary>
+ /// The test is runnable.
+ /// </summary>
+ Runnable,
+
+ /// <summary>
+ /// The test can only be run explicitly.
+ /// </summary>
+ Explicit,
+
+ /// <summary>
+ /// The test has been skipped. This value may
+ /// appear on a Test when certain attributes
+ /// are used to skip the test.
+ /// </summary>
+ Skipped,
+
+ /// <summary>
+ /// The test has been ignored. May appear on
+ /// a Test, when the IgnoreAttribute is used.
+ /// </summary>
+ Ignored
+ }
+}
diff --git a/external/guiunit/src/framework/Api/TestOutput.cs b/external/guiunit/src/framework/Api/TestOutput.cs
new file mode 100755
index 0000000..31aad6d
--- /dev/null
+++ b/external/guiunit/src/framework/Api/TestOutput.cs
@@ -0,0 +1,109 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ using System;
+
+ /// <summary>
+ /// The TestOutput class holds a unit of output from
+ /// a test to either stdOut or stdErr
+ /// </summary>
+ public class TestOutput
+ {
+ string text;
+ TestOutputType type;
+
+ /// <summary>
+ /// Construct with text and an ouput destination type
+ /// </summary>
+ /// <param name="text">Text to be output</param>
+ /// <param name="type">Destination of output</param>
+ public TestOutput(string text, TestOutputType type)
+ {
+ this.text = text;
+ this.type = type;
+ }
+
+ /// <summary>
+ /// Return string representation of the object for debugging
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString()
+ {
+ return type + ": " + text;
+ }
+
+ /// <summary>
+ /// Get the text
+ /// </summary>
+ public string Text
+ {
+ get
+ {
+ return this.text;
+ }
+ }
+
+ /// <summary>
+ /// Get the output type
+ /// </summary>
+ public TestOutputType Type
+ {
+ get
+ {
+ return this.type;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Enum representing the output destination
+ /// It uses combinable flags so that a given
+ /// output control can accept multiple types
+ /// of output. Normally, each individual
+ /// output uses a single flag value.
+ /// </summary>
+ public enum TestOutputType
+ {
+ /// <summary>
+ /// Send output to stdOut
+ /// </summary>
+ Out,
+
+ /// <summary>
+ /// Send output to stdErr
+ /// </summary>
+ Error,
+
+ /// <summary>
+ /// Send output to Trace
+ /// </summary>
+ Trace,
+
+ /// <summary>
+ /// Send output to Log
+ /// </summary>
+ Log
+ }
+}
diff --git a/external/guiunit/src/framework/Api/TestStatus.cs b/external/guiunit/src/framework/Api/TestStatus.cs
new file mode 100755
index 0000000..8c403c7
--- /dev/null
+++ b/external/guiunit/src/framework/Api/TestStatus.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// The TestStatus enum indicates the result of running a test
+ /// </summary>
+ public enum TestStatus
+ {
+ /// <summary>
+ /// The test was inconclusive
+ /// </summary>
+ Inconclusive,
+
+ /// <summary>
+ /// The test has skipped
+ /// </summary>
+ Skipped,
+
+ /// <summary>
+ /// The test succeeded
+ /// </summary>
+ Passed,
+
+ /// <summary>
+ /// The test failed
+ /// </summary>
+ Failed
+ }
+}
diff --git a/external/guiunit/src/framework/Api/XmlNode.cs b/external/guiunit/src/framework/Api/XmlNode.cs
new file mode 100755
index 0000000..138fbcf
--- /dev/null
+++ b/external/guiunit/src/framework/Api/XmlNode.cs
@@ -0,0 +1,352 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Api
+{
+ /// <summary>
+ /// XmlNode represents a single node in the XML representation
+ /// of a Test or TestResult. It replaces System.Xml.XmlNode and
+ /// provides a minimal set of methods for operating on the XML
+ /// in a platform-independent manner.
+ /// </summary>
+ public class XmlNode
+ {
+ #region Private Fields
+
+ private string name;
+
+ private AttributeDictionary attributes;
+
+ private NodeList childNodes;
+
+ private string textContent;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Constructs a new instance of XmlNode
+ /// </summary>
+ /// <param name="name">The name of the node</param>
+ public XmlNode(string name)
+ {
+ this.name = name;
+ this.attributes = new AttributeDictionary();
+ this.childNodes = new NodeList();
+ }
+
+ #endregion
+
+ #region Static Methods
+
+ /// <summary>
+ /// Creates a new top level element node.
+ /// </summary>
+ /// <param name="name">The element name.</param>
+ /// <returns></returns>
+ public static XmlNode CreateTopLevelElement(string name)
+ {
+ return new XmlNode(name);
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the name of the node
+ /// </summary>
+ public string Name
+ {
+ get { return name; }
+ }
+
+ /// <summary>
+ /// Gets the text content of the node
+ /// </summary>
+ public string TextContent
+ {
+ get { return textContent; }
+ set { textContent = value; }
+ }
+
+ /// <summary>
+ /// Gets the text content of the node escaped as needed.
+ /// This is for use in writing out the XML representation.
+ /// </summary>
+ public string EscapedTextContent
+ {
+ get { return Escape(textContent); }
+ }
+
+ /// <summary>
+ /// Gets the dictionary of attributes
+ /// </summary>
+ public AttributeDictionary Attributes
+ {
+ get { return attributes; }
+ }
+
+ /// <summary>
+ /// Gets a list of child nodes
+ /// </summary>
+ public NodeList ChildNodes
+ {
+ get { return childNodes; }
+ }
+
+ /// <summary>
+ /// Gets the first child of this node, or null
+ /// </summary>
+ public XmlNode FirstChild
+ {
+ get
+ {
+ return ChildNodes.Count > 0
+ ? ChildNodes[0] as XmlNode
+ : null;
+ }
+ }
+
+ #endregion
+
+ #region Instance Methods
+
+ /// <summary>
+ /// Adds a new element as a child of the current node and returns it.
+ /// </summary>
+ /// <param name="name">The element name.</param>
+ /// <returns>The newly created child element</returns>
+ public XmlNode AddElement(string name)
+ {
+ XmlNode childResult = new XmlNode(name);
+ ChildNodes.Add(childResult);
+ return childResult;
+ }
+
+ /// <summary>
+ /// Adds an attribute with a specified name and value to the XmlNode.
+ /// </summary>
+ /// <param name="name">The name of the attribute.</param>
+ /// <param name="value">The value of the attribute.</param>
+ public void AddAttribute(string name, string value)
+ {
+ this.Attributes.Add(name, value);
+ }
+
+ /// <summary>
+ /// Finds a single descendant of this node matching an xpath
+ /// specification. The format of the specification is
+ /// limited to what is needed by NUnit and its tests.
+ /// </summary>
+ /// <param name="xpath"></param>
+ /// <returns></returns>
+ public XmlNode FindDescendant(string xpath)
+ {
+ NodeList nodes = FindDescendants(xpath);
+
+ return nodes.Count > 0
+ ? nodes[0] as XmlNode
+ : null;
+ }
+
+ /// <summary>
+ /// Finds all descendants of this node matching an xpath
+ /// specification. The format of the specification is
+ /// limited to what is needed by NUnit and its tests.
+ /// </summary>
+ /// <param name="xpath"></param>
+ /// <returns></returns>
+ public NodeList FindDescendants(string xpath)
+ {
+ NodeList nodeList = new NodeList();
+ nodeList.Add(this);
+
+ return ApplySelection(nodeList, xpath);
+ }
+
+ /// <summary>
+ /// Writes the XML representation of the node to an XmlWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public void WriteTo(System.Xml.XmlWriter writer)
+ {
+ writer.WriteStartElement(this.Name);
+
+ foreach (string name in this.Attributes.Keys)
+ writer.WriteAttributeString(name, Attributes[name]);
+
+ if (this.TextContent != null)
+ writer.WriteChars(this.TextContent.ToCharArray(), 0, this.TextContent.Length);
+
+ foreach (XmlNode node in this.ChildNodes)
+ node.WriteTo(writer);
+
+ writer.WriteEndElement();
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private static NodeList ApplySelection(NodeList nodeList, string xpath)
+ {
+ Guard.ArgumentNotNullOrEmpty(xpath, "xpath");
+ if (xpath[0] == '/')
+ throw new ArgumentException("XPath expressions starting with '/' are not supported", "xpath");
+ if (xpath.IndexOf("//") >= 0)
+ throw new ArgumentException("XPath expressions with '//' are not supported", "xpath");
+
+ string head = xpath;
+ string tail = null;
+
+ int slash = xpath.IndexOf('/');
+ if (slash >= 0)
+ {
+ head = xpath.Substring(0, slash);
+ tail = xpath.Substring(slash + 1);
+ }
+
+ NodeList resultNodes = new NodeList();
+ NodeFilter filter = new NodeFilter(head);
+
+ foreach(XmlNode node in nodeList)
+ foreach (XmlNode childNode in node.ChildNodes)
+ if (filter.Pass(childNode))
+ resultNodes.Add(childNode);
+
+ return tail != null
+ ? ApplySelection(resultNodes, tail)
+ : resultNodes;
+ }
+
+ private static string Escape(string original)
+ {
+ return original
+ .Replace("&", "&")
+ .Replace("\"", """)
+ .Replace("'", "'")
+ .Replace("<", "<")
+ .Replace(">", ">");
+ }
+
+ #endregion
+
+ #region Nested NodeFilter class
+
+ class NodeFilter
+ {
+ private string nodeName;
+ private string propName;
+ private string propValue;
+
+ public NodeFilter(string xpath)
+ {
+ this.nodeName = xpath;
+
+ int lbrack = xpath.IndexOf('[');
+ if (lbrack >= 0)
+ {
+ if (!xpath.EndsWith("]"))
+ throw new ArgumentException("Invalid property expression", "xpath");
+
+ nodeName = xpath.Substring(0, lbrack);
+ string filter = xpath.Substring(lbrack+1, xpath.Length - lbrack - 2);
+
+ int equals = filter.IndexOf('=');
+ if (equals < 0 || filter[0] != '@')
+ throw new ArgumentException("Invalid property expression", "xpath");
+
+ this.propName = filter.Substring(1, equals - 1).Trim();
+ this.propValue = filter.Substring(equals + 1).Trim(new char[] { ' ', '"', '\'' });
+ }
+ }
+
+ public bool Pass(XmlNode node)
+ {
+ if (node.Name != nodeName)
+ return false;
+
+ if (propName == null)
+ return true;
+
+ return (string)node.Attributes[propName] == propValue;
+ }
+ }
+
+ #endregion
+ }
+
+ /// <summary>
+ /// Class used to represent a list of XmlResults
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class NodeList : System.Collections.Generic.List<XmlNode>
+ {
+ }
+#else
+ public class NodeList : System.Collections.ArrayList
+ {
+ }
+#endif
+
+ /// <summary>
+ /// Class used to represent the attributes of a node
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class AttributeDictionary : System.Collections.Generic.Dictionary<string, string>
+ {
+ }
+#else
+ public class AttributeDictionary : System.Collections.Specialized.StringDictionary
+ {
+ private System.Collections.ArrayList orderedKeys = new System.Collections.ArrayList();
+
+ /// <summary>
+ /// Adds a key and value to the dictionary. Overridden to
+ /// save the order in which keys are added.
+ /// </summary>
+ /// <param name="key">The attribute key</param>
+ /// <param name="value">The attribute value</param>
+ public override void Add(string key, string value)
+ {
+ base.Add(key, value);
+ orderedKeys.Add(key);
+ }
+
+ /// <summary>
+ /// Gets the keys in the same order they were added.
+ /// </summary>
+ public override System.Collections.ICollection Keys
+ {
+ get
+ {
+ return orderedKeys;
+ }
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/framework/AssemblyInfo.cs b/external/guiunit/src/framework/AssemblyInfo.cs
new file mode 100755
index 0000000..c61e405
--- /dev/null
+++ b/external/guiunit/src/framework/AssemblyInfo.cs
@@ -0,0 +1,110 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NUnitLite")]
+[assembly: AssemblyDescription("NUnitLite unit-testing framework")]
+[assembly: AssemblyCompany("NUnit Software")]
+[assembly: AssemblyProduct("NUnitLite")]
+[assembly: AssemblyCopyright("Copyright 2012, Charlie Poole")]
+[assembly: AssemblyTrademark("NUnitLite")]
+[assembly: AssemblyCulture("")]
+
+// Set AssemblyConfiguration attribute depending on
+// how we are building the assembly.
+#if DEBUG
+#if NET_4_5
+[assembly: AssemblyConfiguration(".NET 4.5 Debug")]
+#elif NET_4_0
+[assembly: AssemblyConfiguration(".NET 4.0 Debug")]
+#elif NET_3_5
+[assembly: AssemblyConfiguration(".NET 3.5 Debug")]
+#elif NET_2_0
+[assembly: AssemblyConfiguration(".NET 2.0 Debug")]
+#elif NET_1_1
+[assembly: AssemblyConfiguration(".NET 1.1 Debug")]
+#elif NETCF_3_5
+[assembly: AssemblyConfiguration(".NET CF 3.5 Debug")]
+#elif NETCF_2_0
+[assembly: AssemblyConfiguration(".NET CF 2.0 Debug")]
+#elif SL_5_0
+[assembly: AssemblyConfiguration("Silverlight 5.0 Debug")]
+#elif SL_4_0
+[assembly: AssemblyConfiguration("Silverlight 4.0 Debug")]
+#elif SL_3_0
+[assembly: AssemblyConfiguration("Silverlight 3.0 Debug")]
+#endif
+#else
+#if NET_4_5
+[assembly: AssemblyConfiguration(".NET 4.5")]
+#elif NET_4_0
+[assembly: AssemblyConfiguration(".NET 4.0")]
+#elif NET_3_5
+[assembly: AssemblyConfiguration(".NET 3.5")]
+#elif NET_2_0
+[assembly: AssemblyConfiguration(".NET 2.0")]
+#elif NET_1_1
+[assembly: AssemblyConfiguration(".NET 1.1")]
+#elif NETCF_3_5
+[assembly: AssemblyConfiguration(".NET CF 3.5")]
+#elif NETCF_2_0
+[assembly: AssemblyConfiguration(".NET CF 2.0")]
+#elif SL_5_0
+[assembly: AssemblyConfiguration("Silverlight 5.0")]
+#elif SL_4_0
+[assembly: AssemblyConfiguration("Silverlight 4.0")]
+#elif SL_3_0
+[assembly: AssemblyConfiguration("Silverlight 3.0")]
+#endif
+#endif
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+[assembly: CLSCompliant(true)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0be367fd-d825-4039-a70b-54a3557170ec")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("0.9.0.0")]
+#if !PocketPC && !WindowsCE && !NETCF
+[assembly: AssemblyFileVersion("0.9.0.0")]
+#endif
diff --git a/external/guiunit/src/framework/Assert.cs b/external/guiunit/src/framework/Assert.cs
new file mode 100755
index 0000000..10f41a1
--- /dev/null
+++ b/external/guiunit/src/framework/Assert.cs
@@ -0,0 +1,1923 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.ComponentModel;
+using NUnit.Framework.Constraints;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Delegate used by tests that execute code and
+ /// capture any thrown exception.
+ /// </summary>
+ public delegate void TestDelegate();
+
+ /// <summary>
+ /// The Assert class contains a collection of static methods that
+ /// implement the most common assertions used in NUnit.
+ /// </summary>
+ public partial class Assert
+ {
+ #region Constructor
+
+ /// <summary>
+ /// We don't actually want any instances of this object, but some people
+ /// like to inherit from it to add other static methods. Hence, the
+ /// protected constructor disallows any instances of this object.
+ /// </summary>
+ protected Assert() { }
+
+ #endregion
+
+ #region Equals and ReferenceEquals
+
+#if !NETCF
+ /// <summary>
+ /// The Equals method throws an AssertionException. This is done
+ /// to make sure there is no mistake by calling this function.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new bool Equals(object a, object b)
+ {
+ throw new InvalidOperationException("Assert.Equals should not be used for Assertions");
+ }
+
+ /// <summary>
+ /// override the default ReferenceEquals to throw an AssertionException. This
+ /// implementation makes sure there is no mistake in calling this function
+ /// as part of Assert.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ public static new void ReferenceEquals(object a, object b)
+ {
+ throw new InvalidOperationException("Assert.ReferenceEquals should not be used for Assertions");
+ }
+#endif
+
+ #endregion
+
+ #region Utility Asserts
+
+ #region Pass
+
+ /// <summary>
+ /// Throws a <see cref="SuccessException"/> with the message and arguments
+ /// that are passed in. This allows a test to be cut short, with a result
+ /// of success returned to NUnit.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void Pass(string message, params object[] args)
+ {
+ if (message == null) message = string.Empty;
+ else if (args != null && args.Length > 0)
+ message = string.Format(message, args);
+
+ throw new SuccessException(message);
+ }
+
+ /// <summary>
+ /// Throws a <see cref="SuccessException"/> with the message and arguments
+ /// that are passed in. This allows a test to be cut short, with a result
+ /// of success returned to NUnit.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ static public void Pass(string message)
+ {
+ Assert.Pass(message, null);
+ }
+
+ /// <summary>
+ /// Throws a <see cref="SuccessException"/> with the message and arguments
+ /// that are passed in. This allows a test to be cut short, with a result
+ /// of success returned to NUnit.
+ /// </summary>
+ static public void Pass()
+ {
+ Assert.Pass(string.Empty, null);
+ }
+
+ #endregion
+
+ #region Fail
+
+ /// <summary>
+ /// Throws an <see cref="AssertionException"/> with the message and arguments
+ /// that are passed in. This is used by the other Assert functions.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void Fail(string message, params object[] args)
+ {
+ if (message == null) message = string.Empty;
+ else if (args != null && args.Length > 0)
+ message = string.Format(message, args);
+
+ throw new AssertionException(message);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="AssertionException"/> with the message that is
+ /// passed in. This is used by the other Assert functions.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ static public void Fail(string message)
+ {
+ Assert.Fail(message, null);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="AssertionException"/>.
+ /// This is used by the other Assert functions.
+ /// </summary>
+ static public void Fail()
+ {
+ Assert.Fail(string.Empty, null);
+ }
+
+ #endregion
+
+ #region Ignore
+
+ /// <summary>
+ /// Throws an <see cref="IgnoreException"/> with the message and arguments
+ /// that are passed in. This causes the test to be reported as ignored.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void Ignore(string message, params object[] args)
+ {
+ if (message == null) message = string.Empty;
+ else if (args != null && args.Length > 0)
+ message = string.Format(message, args);
+
+ throw new IgnoreException(message);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="IgnoreException"/> with the message that is
+ /// passed in. This causes the test to be reported as ignored.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="AssertionException"/> with.</param>
+ static public void Ignore(string message)
+ {
+ Assert.Ignore(message, null);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="IgnoreException"/>.
+ /// This causes the test to be reported as ignored.
+ /// </summary>
+ static public void Ignore()
+ {
+ Assert.Ignore(string.Empty, null);
+ }
+
+ #endregion
+
+ #region InConclusive
+
+ /// <summary>
+ /// Throws an <see cref="InconclusiveException"/> with the message and arguments
+ /// that are passed in. This causes the test to be reported as inconclusive.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="InconclusiveException"/> with.</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void Inconclusive(string message, params object[] args)
+ {
+ if (message == null) message = string.Empty;
+ else if (args != null && args.Length > 0)
+ message = string.Format(message, args);
+
+ throw new InconclusiveException(message);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="InconclusiveException"/> with the message that is
+ /// passed in. This causes the test to be reported as inconclusive.
+ /// </summary>
+ /// <param name="message">The message to initialize the <see cref="InconclusiveException"/> with.</param>
+ static public void Inconclusive(string message)
+ {
+ Assert.Inconclusive(message, null);
+ }
+
+ /// <summary>
+ /// Throws an <see cref="InconclusiveException"/>.
+ /// This causes the test to be reported as Inconclusive.
+ /// </summary>
+ static public void Inconclusive()
+ {
+ Assert.Inconclusive(string.Empty, null);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region Assert.That
+
+ #region Object
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ static public void That(object actual, IResolveConstraint expression)
+ {
+ Assert.That(actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(object actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(object actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ IncrementAssertCount();
+ if (!constraint.Matches(actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new AssertionException(writer.ToString());
+ }
+ }
+
+ #endregion
+
+ #region Boolean
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.True, message, args);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ static public void That(bool condition, string message)
+ {
+ Assert.That(condition, Is.True, message, null);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ static public void That(bool condition)
+ {
+ Assert.That(condition, Is.True, null, null);
+ }
+
+ #endregion
+
+ #region ref Boolean
+
+#if !CLR_2_0 && !CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced boolean, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="constraint">A Constraint to be applied</param>
+ static public void That(ref bool actual, IResolveConstraint constraint)
+ {
+ Assert.That(ref actual, constraint.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="constraint">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(ref bool actual, IResolveConstraint constraint, string message)
+ {
+ Assert.That(ref actual, constraint.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(ref bool actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ IncrementAssertCount();
+ if (!constraint.Matches(ref actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new AssertionException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region ActualValueDelegate
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr)
+ {
+ Assert.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message)
+ {
+ Assert.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Constraint constraint = expr.Resolve();
+
+ IncrementAssertCount();
+ if (!constraint.Matches(del))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new AssertionException(writer.ToString());
+ }
+ }
+#else
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr)
+ {
+ Assert.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr, string message)
+ {
+ Assert.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Constraint constraint = expr.Resolve();
+
+ IncrementAssertCount();
+ if (!constraint.Matches(del))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new AssertionException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region ref Object
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression)
+ {
+ Assert.That(ref actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(ref actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ IncrementAssertCount();
+ if (!constraint.Matches(ref actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new AssertionException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region TestDelegate
+
+ /// <summary>
+ /// Asserts that the code represented by a delegate throws an exception
+ /// that satisfies the constraint provided.
+ /// </summary>
+ /// <param name="code">A TestDelegate to be executed</param>
+ /// <param name="constraint">A ThrowsConstraint used in the test</param>
+ static public void That(TestDelegate code, IResolveConstraint constraint)
+ {
+ Assert.That((object)code, constraint);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region Assert.ByVal
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// Used as a synonym for That in rare cases where a private setter
+ /// causes a Visual Basic compilation error.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ static public void ByVal(object actual, IResolveConstraint expression)
+ {
+ Assert.That(actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// Used as a synonym for That in rare cases where a private setter
+ /// causes a Visual Basic compilation error.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void ByVal(object actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// Used as a synonym for That in rare cases where a private setter
+ /// causes a Visual Basic compilation error.
+ /// </summary>
+ /// <remarks>
+ /// This method is provided for use by VB developers needing to test
+ /// the value of properties with private setters.
+ /// </remarks>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void ByVal(object actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Assert.That(actual, expression, message, args);
+ }
+
+ #endregion
+
+ #region Throws, Catch and DoesNotThrow
+
+ #region Throws
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expression">A constraint to be satisfied by the exception</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message, params object[] args)
+ {
+ Exception caughtException = null;
+
+#if NET_4_5
+ if (AsyncInvocationRegion.IsAsyncOperation(code))
+ {
+ using (AsyncInvocationRegion region = AsyncInvocationRegion.Create(code))
+ {
+ code();
+
+ try
+ {
+ region.WaitForPendingOperationsToComplete(null);
+ }
+ catch (Exception e)
+ {
+ caughtException = e;
+ }
+ }
+ }
+ else
+#endif
+ try
+ {
+ code();
+ }
+ catch (Exception ex)
+ {
+ caughtException = ex;
+ }
+
+ Assert.That(caughtException, expression, message, args);
+
+ return caughtException;
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expression">A constraint to be satisfied by the exception</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static Exception Throws(IResolveConstraint expression, TestDelegate code, string message)
+ {
+ return Throws(expression, code, message, null);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expression">A constraint to be satisfied by the exception</param>
+ /// <param name="code">A TestDelegate</param>
+ public static Exception Throws(IResolveConstraint expression, TestDelegate code)
+ {
+ return Throws(expression, code, string.Empty, null);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expectedExceptionType">The exception Type expected</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
+ {
+ return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expectedExceptionType">The exception Type expected</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static Exception Throws(Type expectedExceptionType, TestDelegate code, string message)
+ {
+ return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, message, null);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <param name="expectedExceptionType">The exception Type expected</param>
+ /// <param name="code">A TestDelegate</param>
+ public static Exception Throws(Type expectedExceptionType, TestDelegate code)
+ {
+ return Throws(new ExceptionTypeConstraint(expectedExceptionType), code, string.Empty, null);
+ }
+
+ #endregion
+
+ #region Throws<T>
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <typeparam name="T">Type of the expected exception</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static T Throws<T>(TestDelegate code, string message, params object[] args) where T : Exception
+ {
+ return (T)Throws(typeof(T), code, message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <typeparam name="T">Type of the expected exception</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static T Throws<T>(TestDelegate code, string message) where T : Exception
+ {
+ return Throws<T>(code, message, null);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws a particular exception when called.
+ /// </summary>
+ /// <typeparam name="T">Type of the expected exception</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ public static T Throws<T>(TestDelegate code) where T : Exception
+ {
+ return Throws<T>(code, string.Empty, null);
+ }
+#endif
+
+ #endregion
+
+ #region Catch
+ /// <summary>
+ /// Verifies that a delegate throws an exception when called
+ /// and returns it.
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static Exception Catch(TestDelegate code, string message, params object[] args)
+ {
+ return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception when called
+ /// and returns it.
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static Exception Catch(TestDelegate code, string message)
+ {
+ return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code, message);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception when called
+ /// and returns it.
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ public static Exception Catch(TestDelegate code)
+ {
+ return Throws(new InstanceOfTypeConstraint(typeof(Exception)), code);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <param name="expectedExceptionType">The expected Exception Type</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message, params object[] args)
+ {
+ return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <param name="expectedExceptionType">The expected Exception Type</param>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static Exception Catch(Type expectedExceptionType, TestDelegate code, string message)
+ {
+ return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code, message);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <param name="expectedExceptionType">The expected Exception Type</param>
+ /// <param name="code">A TestDelegate</param>
+ public static Exception Catch(Type expectedExceptionType, TestDelegate code)
+ {
+ return Throws(new InstanceOfTypeConstraint(expectedExceptionType), code);
+ }
+ #endregion
+
+ #region Catch<T>
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <typeparam name="T">The expected Exception Type</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static T Catch<T>(TestDelegate code, string message, params object[] args) where T : System.Exception
+ {
+ return (T)Throws(new InstanceOfTypeConstraint(typeof(T)), code, message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <typeparam name="T">The expected Exception Type</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static T Catch<T>(TestDelegate code, string message) where T : System.Exception
+ {
+ return (T)Throws(new InstanceOfTypeConstraint(typeof(T)), code, message);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate throws an exception of a certain Type
+ /// or one derived from it when called and returns it.
+ /// </summary>
+ /// <typeparam name="T">The expected Exception Type</typeparam>
+ /// <param name="code">A TestDelegate</param>
+ public static T Catch<T>(TestDelegate code) where T : System.Exception
+ {
+ return (T)Throws(new InstanceOfTypeConstraint(typeof(T)), code);
+ }
+#endif
+
+ #endregion
+
+ #region DoesNotThrow
+
+ /// <summary>
+ /// Verifies that a delegate does not throw an exception
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public static void DoesNotThrow(TestDelegate code, string message, params object[] args)
+ {
+ Assert.That(code, new ThrowsNothingConstraint(), message, args);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate does not throw an exception.
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public static void DoesNotThrow(TestDelegate code, string message)
+ {
+ DoesNotThrow(code, message, null);
+ }
+
+ /// <summary>
+ /// Verifies that a delegate does not throw an exception.
+ /// </summary>
+ /// <param name="code">A TestDelegate</param>
+ public static void DoesNotThrow(TestDelegate code)
+ {
+ DoesNotThrow(code, string.Empty, null);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region True
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void True(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.True ,message, args);
+ }
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void True(bool condition, string message)
+ {
+ Assert.That(condition, Is.True ,message, null);
+ }
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ public static void True(bool condition)
+ {
+ Assert.That(condition, Is.True ,null, null);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void IsTrue(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.True ,message, args);
+ }
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void IsTrue(bool condition, string message)
+ {
+ Assert.That(condition, Is.True ,message, null);
+ }
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ public static void IsTrue(bool condition)
+ {
+ Assert.That(condition, Is.True ,null, null);
+ }
+
+ #endregion
+
+ #region False
+
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void False(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.False ,message, args);
+ }
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void False(bool condition, string message)
+ {
+ Assert.That(condition, Is.False ,message, null);
+ }
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ public static void False(bool condition)
+ {
+ Assert.That(condition, Is.False ,null, null);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void IsFalse(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.False ,message, args);
+ }
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void IsFalse(bool condition, string message)
+ {
+ Assert.That(condition, Is.False ,message, null);
+ }
+ /// <summary>
+ /// Asserts that a condition is false. If the condition is true the method throws
+ /// an <see cref="AssertionException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ public static void IsFalse(bool condition)
+ {
+ Assert.That(condition, Is.False ,null, null);
+ }
+
+ #endregion
+
+ #region NotNull
+
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void NotNull(object anObject, string message, params object[] args)
+ {
+ Assert.That(anObject, Is.Not.Null ,message, args);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void NotNull(object anObject, string message)
+ {
+ Assert.That(anObject, Is.Not.Null ,message, null);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ public static void NotNull(object anObject)
+ {
+ Assert.That(anObject, Is.Not.Null ,null, null);
+ }
+
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void IsNotNull(object anObject, string message, params object[] args)
+ {
+ Assert.That(anObject, Is.Not.Null ,message, args);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void IsNotNull(object anObject, string message)
+ {
+ Assert.That(anObject, Is.Not.Null ,message, null);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is not equal to <code>null</code>
+ /// If the object is <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ public static void IsNotNull(object anObject)
+ {
+ Assert.That(anObject, Is.Not.Null ,null, null);
+ }
+
+ #endregion
+
+ #region Null
+
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void Null(object anObject, string message, params object[] args)
+ {
+ Assert.That(anObject, Is.Null ,message, args);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void Null(object anObject, string message)
+ {
+ Assert.That(anObject, Is.Null ,message, null);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ public static void Null(object anObject)
+ {
+ Assert.That(anObject, Is.Null ,null, null);
+ }
+
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void IsNull(object anObject, string message, params object[] args)
+ {
+ Assert.That(anObject, Is.Null ,message, args);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void IsNull(object anObject, string message)
+ {
+ Assert.That(anObject, Is.Null ,message, null);
+ }
+ /// <summary>
+ /// Verifies that the object that is passed in is equal to <code>null</code>
+ /// If the object is not <code>null</code> then an <see cref="AssertionException"/>
+ /// is thrown.
+ /// </summary>
+ /// <param name="anObject">The object that is to be tested</param>
+ public static void IsNull(object anObject)
+ {
+ Assert.That(anObject, Is.Null ,null, null);
+ }
+
+ #endregion
+
+ #region AreEqual
+
+ #region Ints
+
+ /// <summary>
+ /// Verifies that two ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(int expected, int actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(int expected, int actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreEqual(int expected, int actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Longs
+
+ /// <summary>
+ /// Verifies that two longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(long expected, long actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(long expected, long actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreEqual(long expected, long actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Unsigned Ints
+
+ /// <summary>
+ /// Verifies that two unsigned ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(uint expected, uint actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two unsigned ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(uint expected, uint actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two unsigned ints are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(uint expected, uint actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Unsigned Longs
+
+ /// <summary>
+ /// Verifies that two unsigned longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(ulong expected, ulong actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two unsigned longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(ulong expected, ulong actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two unsigned longs are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ [CLSCompliant(false)]
+ public static void AreEqual(ulong expected, ulong actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Decimals
+
+ /// <summary>
+ /// Verifies that two decimals are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(decimal expected, decimal actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two decimals are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(decimal expected, decimal actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two decimals are equal. If they are not, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreEqual(decimal expected, decimal actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Doubles
+
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(double expected, double actual, double delta, string message, params object[] args)
+ {
+ AssertDoublesAreEqual(expected, actual, delta, message, args);
+ }
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(double expected, double actual, double delta, string message)
+ {
+ AssertDoublesAreEqual(expected, actual, delta, message, null);
+ }
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ public static void AreEqual(double expected, double actual, double delta)
+ {
+ AssertDoublesAreEqual(expected, actual, delta, null, null);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(double expected, double? actual, double delta, string message, params object[] args)
+ {
+ AssertDoublesAreEqual(expected, (double)actual, delta, message, args);
+ }
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(double expected, double? actual, double delta, string message)
+ {
+ AssertDoublesAreEqual(expected, (double)actual, delta, message, null);
+ }
+ /// <summary>
+ /// Verifies that two doubles are equal considering a delta. If the
+ /// expected value is infinity then the delta value is ignored. If
+ /// they are not equal then an <see cref="AssertionException"/> is
+ /// thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ public static void AreEqual(double expected, double? actual, double delta)
+ {
+ AssertDoublesAreEqual(expected, (double)actual, delta, null, null);
+ }
+#endif
+
+ #endregion
+
+ #region Objects
+
+ /// <summary>
+ /// Verifies that two objects are equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are not equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreEqual(object expected, object actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two objects are equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are not equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreEqual(object expected, object actual, string message)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two objects are equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are not equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreEqual(object expected, object actual)
+ {
+ Assert.That(actual, Is.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region AreNotEqual
+
+ #region Ints
+
+ /// <summary>
+ /// Verifies that two ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(int expected, int actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(int expected, int actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(int expected, int actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Longs
+
+ /// <summary>
+ /// Verifies that two longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(long expected, long actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(long expected, long actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(long expected, long actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Unsigned Ints
+
+ /// <summary>
+ /// Verifies that two unsigned ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(uint expected, uint actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two unsigned ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(uint expected, uint actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two unsigned ints are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(uint expected, uint actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Unsigned Longs
+
+ /// <summary>
+ /// Verifies that two unsigned longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(ulong expected, ulong actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two unsigned longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(ulong expected, ulong actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two unsigned longs are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ [CLSCompliant(false)]
+ public static void AreNotEqual(ulong expected, ulong actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Decimals
+
+ /// <summary>
+ /// Verifies that two decimals are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(decimal expected, decimal actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two decimals are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(decimal expected, decimal actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two decimals are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(decimal expected, decimal actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Floats
+
+ /// <summary>
+ /// Verifies that two floats are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(float expected, float actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two floats are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(float expected, float actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two floats are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(float expected, float actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Doubles
+
+ /// <summary>
+ /// Verifies that two doubles are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(double expected, double actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two doubles are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(double expected, double actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two doubles are not equal. If they are equal, then an
+ /// <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(double expected, double actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #region Objects
+
+ /// <summary>
+ /// Verifies that two objects are not equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotEqual(object expected, object actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, args);
+ }
+ /// <summary>
+ /// Verifies that two objects are not equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotEqual(object expected, object actual, string message)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), message, null);
+ }
+ /// <summary>
+ /// Verifies that two objects are not equal. Two objects are considered
+ /// equal if both are null, or if both have the same value. NUnit
+ /// has special semantics for some object types.
+ /// If they are equal an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The value that is expected</param>
+ /// <param name="actual">The actual value</param>
+ public static void AreNotEqual(object expected, object actual)
+ {
+ Assert.That(actual, Is.Not.EqualTo(expected), null, null);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region AreSame
+
+ /// <summary>
+ /// Asserts that two objects refer to the same object. If they
+ /// are not the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreSame(object expected, object actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.SameAs(expected), message, args);
+ }
+ /// <summary>
+ /// Asserts that two objects refer to the same object. If they
+ /// are not the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreSame(object expected, object actual, string message)
+ {
+ Assert.That(actual, Is.SameAs(expected), message, null);
+ }
+ /// <summary>
+ /// Asserts that two objects refer to the same object. If they
+ /// are not the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ public static void AreSame(object expected, object actual)
+ {
+ Assert.That(actual, Is.SameAs(expected), null, null);
+ }
+
+ #endregion
+
+ #region AreNotSame
+
+ /// <summary>
+ /// Asserts that two objects do not refer to the same object. If they
+ /// are the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ public static void AreNotSame(object expected, object actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.Not.SameAs(expected), message, args);
+ }
+ /// <summary>
+ /// Asserts that two objects do not refer to the same object. If they
+ /// are the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ /// <param name="message">The message to display in case of failure</param>
+ public static void AreNotSame(object expected, object actual, string message)
+ {
+ Assert.That(actual, Is.Not.SameAs(expected), message, null);
+ }
+ /// <summary>
+ /// Asserts that two objects do not refer to the same object. If they
+ /// are the same an <see cref="AssertionException"/> is thrown.
+ /// </summary>
+ /// <param name="expected">The expected object</param>
+ /// <param name="actual">The actual object</param>
+ public static void AreNotSame(object expected, object actual)
+ {
+ Assert.That(actual, Is.Not.SameAs(expected), null, null);
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ /// <summary>
+ /// Helper for Assert.AreEqual(double expected, double actual, ...)
+ /// allowing code generation to work consistently.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="delta">The maximum acceptable difference between the
+ /// the expected and the actual</param>
+ /// <param name="message">The message to display in case of failure</param>
+ /// <param name="args">Array of objects to be used in formatting the message</param>
+ protected static void AssertDoublesAreEqual(double expected, double actual, double delta, string message, object[] args)
+ {
+ if (double.IsNaN(expected) || double.IsInfinity(expected))
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ else
+ Assert.That(actual, Is.EqualTo(expected).Within(delta), message, args);
+ }
+
+ private static void IncrementAssertCount()
+ {
+ TestExecutionContext.CurrentContext.IncrementAssertCount();
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/AssertionHelper.cs b/external/guiunit/src/framework/AssertionHelper.cs
new file mode 100755
index 0000000..38869af
--- /dev/null
+++ b/external/guiunit/src/framework/AssertionHelper.cs
@@ -0,0 +1,366 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// AssertionHelper is an optional base class for user tests,
+ /// allowing the use of shorter names for constraints and
+ /// asserts and avoiding conflict with the definition of
+ /// <see cref="Is"/>, from which it inherits much of its
+ /// behavior, in certain mock object frameworks.
+ /// </summary>
+ public class AssertionHelper : ConstraintFactory
+ {
+ #region Assert
+ //private Assertions assert = new Assertions();
+ //public virtual Assertions Assert
+ //{
+ // get { return assert; }
+ //}
+ #endregion
+
+ #region Expect
+
+ #region Object
+
+#if !CLR_2_0 && !CLR_4_0
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure. Works
+ /// identically to Assert.That.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ public void Expect(object actual, IResolveConstraint expression)
+ {
+ Assert.That(actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure. Works
+ /// identically to Assert.That.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message to be displayed in case of failure</param>
+ public void Expect(object actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure. Works
+ /// identically to Assert.That.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message to be displayed in case of failure</param>
+ /// <param name="args">Arguments to use in formatting the message</param>
+ public void Expect(object actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Assert.That(actual, expression, message, args);
+ }
+#endif
+
+ #endregion
+
+ #region Boolean
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>. Works Identically to
+ /// <see cref="Assert.That(bool, string, object[])"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public void Expect(bool condition, string message, params object[] args)
+ {
+ Assert.That(condition, Is.True, message, args);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>. Works Identically to
+ /// <see cref="Assert.That(bool, string)"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ public void Expect(bool condition, string message)
+ {
+ Assert.That(condition, Is.True, message, null);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="AssertionException"/>. Works Identically to <see cref="Assert.That(bool)"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ public void Expect(bool condition)
+ {
+ Assert.That(condition, Is.True, null, null);
+ }
+
+ #endregion
+
+ #region ref Boolean
+
+#if !CLR_2_0 && !CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced boolean, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="constraint">A Constraint to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ public void Expect(ref bool actual, IResolveConstraint constraint)
+ {
+ Assert.That(ref actual, constraint.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="constraint">A Constraint to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public void Expect(ref bool actual, IResolveConstraint constraint, string message)
+ {
+ Assert.That(ref actual, constraint.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public void Expect(ref bool actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Assert.That(ref actual, expression, message, args);
+ }
+#endif
+
+ #endregion
+
+ #region ActualValueDelegate
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ public void Expect<T>(ActualValueDelegate<T> del, IResolveConstraint expr)
+ {
+ Assert.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public void Expect<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message)
+ {
+ Assert.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public void Expect<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Assert.That(del, expr, message, args);
+ }
+#else
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ public void Expect(ActualValueDelegate del, IResolveConstraint expr)
+ {
+ Assert.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public void Expect(ActualValueDelegate del, IResolveConstraint expr, string message)
+ {
+ Assert.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public void Expect(ActualValueDelegate del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Assert.That(del, expr, message, args);
+ }
+#endif
+
+ #endregion
+
+ #region ref Object
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ public void Expect<T>(ref T actual, IResolveConstraint expression)
+ {
+ Assert.That(ref actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ public void Expect<T>(ref T actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(ref actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ public void Expect<T>(ref T actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Assert.That(ref actual, expression, message, args);
+ }
+#endif
+
+ #endregion
+
+ #region TestDelegate
+
+ /// <summary>
+ /// Asserts that the code represented by a delegate throws an exception
+ /// that satisfies the constraint provided.
+ /// </summary>
+ /// <param name="code">A TestDelegate to be executed</param>
+ /// <param name="constraint">A ThrowsConstraint used in the test</param>
+ public void Expect(TestDelegate code, IResolveConstraint constraint)
+ {
+ Assert.That((object)code, constraint);
+ }
+
+ #endregion
+
+ #endregion
+
+ #region Expect<T>
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ static public void Expect<T>(T actual, IResolveConstraint expression)
+ {
+ Assert.That(actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void Expect<T>(T actual, IResolveConstraint expression, string message)
+ {
+ Assert.That(actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an assertion exception on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void Expect<T>(T actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Assert.That(actual, expression, message, args);
+ }
+
+#endif
+
+ #endregion
+
+ #region Map
+ /// <summary>
+ /// Returns a ListMapper based on a collection.
+ /// </summary>
+ /// <param name="original">The original collection</param>
+ /// <returns></returns>
+ public ListMapper Map( ICollection original )
+ {
+ return new ListMapper( original );
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Assume.cs b/external/guiunit/src/framework/Assume.cs
new file mode 100755
index 0000000..d1581c4
--- /dev/null
+++ b/external/guiunit/src/framework/Assume.cs
@@ -0,0 +1,360 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.ComponentModel;
+using NUnit.Framework.Constraints;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Provides static methods to express the assumptions
+ /// that must be met for a test to give a meaningful
+ /// result. If an assumption is not met, the test
+ /// should produce an inconclusive result.
+ /// </summary>
+ public class Assume
+ {
+ #region Equals and ReferenceEquals
+
+ /// <summary>
+ /// The Equals method throws an AssertionException. This is done
+ /// to make sure there is no mistake by calling this function.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new bool Equals(object a, object b)
+ {
+ // TODO: This should probably be InvalidOperationException
+ throw new AssertionException("Assert.Equals should not be used for Assertions");
+ }
+
+ /// <summary>
+ /// override the default ReferenceEquals to throw an AssertionException. This
+ /// implementation makes sure there is no mistake in calling this function
+ /// as part of Assert.
+ /// </summary>
+ /// <param name="a"></param>
+ /// <param name="b"></param>
+ public static new void ReferenceEquals(object a, object b)
+ {
+ throw new AssertionException("Assert.ReferenceEquals should not be used for Assertions");
+ }
+
+ #endregion
+
+ #region Assume.That
+
+ #region Object
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ static public void That(object actual, IResolveConstraint expression)
+ {
+ Assume.That(actual, expression, null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(object actual, IResolveConstraint expression, string message)
+ {
+ Assume.That(actual, expression, message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(object actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ if (!constraint.Matches(actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new InconclusiveException(writer.ToString());
+ }
+ }
+ #endregion
+
+ #region Boolean
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="InconclusiveException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(bool condition, string message, params object[] args)
+ {
+ Assume.That(condition, Is.True, message, args);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the method throws
+ /// an <see cref="InconclusiveException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ /// <param name="message">The message to display if the condition is false</param>
+ static public void That(bool condition, string message)
+ {
+ Assume.That(condition, Is.True, message, null);
+ }
+
+ /// <summary>
+ /// Asserts that a condition is true. If the condition is false the
+ /// method throws an <see cref="InconclusiveException"/>.
+ /// </summary>
+ /// <param name="condition">The evaluated condition</param>
+ static public void That(bool condition)
+ {
+ Assume.That(condition, Is.True, null, null);
+ }
+
+ #endregion
+
+ #region ref Boolean
+
+#if !CLR_2_0 && !CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced boolean, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ static public void That(ref bool actual, IResolveConstraint expression)
+ {
+ Assume.That(ref actual, expression.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced boolean, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(ref bool actual, IResolveConstraint expression, string message)
+ {
+ Assume.That(ref actual, expression.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced boolean, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(ref bool actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ if (!constraint.Matches(ref actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new InconclusiveException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region ActualValueDelegate
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr)
+ {
+ Assume.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message)
+ {
+ Assume.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That<T>(ActualValueDelegate<T> del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Constraint constraint = expr.Resolve();
+
+ if (!constraint.Matches(del))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new InconclusiveException(writer.ToString());
+ }
+ }
+#else
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr)
+ {
+ Assume.That(del, expr.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr, string message)
+ {
+ Assume.That(del, expr.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to an actual value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
+ /// <param name="expr">A Constraint expression to be applied</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That(ActualValueDelegate del, IResolveConstraint expr, string message, params object[] args)
+ {
+ Constraint constraint = expr.Resolve();
+
+ if (!constraint.Matches(del))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new InconclusiveException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region ref Object
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression)
+ {
+ Assume.That(ref actual, expression.Resolve(), null, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression, string message)
+ {
+ Assume.That(ref actual, expression.Resolve(), message, null);
+ }
+
+ /// <summary>
+ /// Apply a constraint to a referenced value, succeeding if the constraint
+ /// is satisfied and throwing an InconclusiveException on failure.
+ /// </summary>
+ /// <param name="expression">A Constraint expression to be applied</param>
+ /// <param name="actual">The actual value to test</param>
+ /// <param name="message">The message that will be displayed on failure</param>
+ /// <param name="args">Arguments to be used in formatting the message</param>
+ static public void That<T>(ref T actual, IResolveConstraint expression, string message, params object[] args)
+ {
+ Constraint constraint = expression.Resolve();
+
+ if (!constraint.Matches(ref actual))
+ {
+ MessageWriter writer = new TextMessageWriter(message, args);
+ constraint.WriteMessageTo(writer);
+ throw new InconclusiveException(writer.ToString());
+ }
+ }
+#endif
+
+ #endregion
+
+ #region TestDelegate
+
+ /// <summary>
+ /// Asserts that the code represented by a delegate throws an exception
+ /// that satisfies the constraint provided.
+ /// </summary>
+ /// <param name="code">A TestDelegate to be executed</param>
+ /// <param name="constraint">A ThrowsConstraint used in the test</param>
+ static public void That(TestDelegate code, IResolveConstraint constraint)
+ {
+ Assume.That((object)code, constraint);
+ }
+
+ #endregion
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/CategoryAttribute.cs b/external/guiunit/src/framework/Attributes/CategoryAttribute.cs
new file mode 100755
index 0000000..d859b4a
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/CategoryAttribute.cs
@@ -0,0 +1,95 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Attribute used to apply a category to a test
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=true, Inherited=true)]
+ public class CategoryAttribute : NUnitAttribute, IApplyToTest
+ {
+ /// <summary>
+ /// The name of the category
+ /// </summary>
+ protected string categoryName;
+
+ /// <summary>
+ /// Construct attribute for a given category based on
+ /// a name. The name may not contain the characters ',',
+ /// '+', '-' or '!'. However, this is not checked in the
+ /// constructor since it would cause an error to arise at
+ /// as the test was loaded without giving a clear indication
+ /// of where the problem is located. The error is handled
+ /// in NUnitFramework.cs by marking the test as not
+ /// runnable.
+ /// </summary>
+ /// <param name="name">The name of the category</param>
+ public CategoryAttribute(string name)
+ {
+ this.categoryName = name.Trim();
+ }
+
+ /// <summary>
+ /// Protected constructor uses the Type name as the name
+ /// of the category.
+ /// </summary>
+ protected CategoryAttribute()
+ {
+ this.categoryName = this.GetType().Name;
+ if ( categoryName.EndsWith( "Attribute" ) )
+ categoryName = categoryName.Substring( 0, categoryName.Length - 9 );
+ }
+
+ /// <summary>
+ /// The name of the category
+ /// </summary>
+ public string Name
+ {
+ get { return categoryName; }
+ }
+
+ #region IApplyToTest Members
+
+ /// <summary>
+ /// Modifies a test by adding a category to it.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ test.Properties.Add(PropertyNames.Category, this.Name);
+
+ if (this.Name.IndexOfAny(new char[] { ',', '!', '+', '-' }) >= 0)
+ {
+ test.RunState = RunState.NotRunnable;
+ test.Properties.Set(PropertyNames.SkipReason, "Category name must not contain ',', '!', '+' or '-'");
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/CombinatorialAttribute.cs b/external/guiunit/src/framework/Attributes/CombinatorialAttribute.cs
new file mode 100755
index 0000000..4f5c911
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/CombinatorialAttribute.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Marks a test to use a combinatorial join of any argument
+ /// data provided. Since this is the default, the attribute is
+ /// not needed.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
+ public class CombinatorialAttribute : PropertyAttribute
+ {
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public CombinatorialAttribute() : base(PropertyNames.JoinType, "Combinatorial") { }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/CultureAttribute.cs b/external/guiunit/src/framework/Attributes/CultureAttribute.cs
new file mode 100755
index 0000000..ca5e57a
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/CultureAttribute.cs
@@ -0,0 +1,131 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Globalization;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// CultureAttribute is used to mark a test fixture or an
+ /// individual method as applying to a particular Culture only.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Assembly, AllowMultiple = false, Inherited=false)]
+ public class CultureAttribute : IncludeExcludeAttribute, IApplyToTest
+ {
+ private CultureDetector cultureDetector = new CultureDetector();
+ private CultureInfo currentCulture = CultureInfo.CurrentCulture;
+
+ /// <summary>
+ /// Constructor with no cultures specified, for use
+ /// with named property syntax.
+ /// </summary>
+ public CultureAttribute() { }
+
+ /// <summary>
+ /// Constructor taking one or more cultures
+ /// </summary>
+ /// <param name="cultures">Comma-deliminted list of cultures</param>
+ public CultureAttribute(string cultures) : base(cultures) { }
+
+ #region IApplyToTest members
+
+ /// <summary>
+ /// Causes a test to be skipped if this CultureAttribute is not satisfied.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (test.RunState != RunState.NotRunnable && !IsCultureSupported())
+ {
+ test.RunState = RunState.Skipped;
+ test.Properties.Set(PropertyNames.SkipReason, Reason);
+ }
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Tests to determine if the current culture is supported
+ /// based on the properties of this attribute.
+ /// </summary>
+ /// <returns>True, if the current culture is supported</returns>
+ private bool IsCultureSupported()
+ {
+ if (Include != null && !cultureDetector.IsCultureSupported(Include))
+ {
+ Reason = string.Format("Only supported under culture {0}", Include);
+ return false;
+ }
+
+ if (Exclude != null && cultureDetector.IsCultureSupported(Exclude))
+ {
+ Reason = string.Format("Not supported under culture {0}", Exclude);
+ return false;
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Test to determine if the a particular culture or comma-
+ /// delimited set of cultures is in use.
+ /// </summary>
+ /// <param name="culture">Name of the culture or comma-separated list of culture names</param>
+ /// <returns>True if the culture is in use on the system</returns>
+ public bool IsCultureSupported(string culture)
+ {
+ culture = culture.Trim();
+
+ if (culture.IndexOf(',') >= 0)
+ {
+ if (IsCultureSupported(culture.Split(new char[] { ',' })))
+ return true;
+ }
+ else
+ {
+ if (currentCulture.Name == culture || currentCulture.TwoLetterISOLanguageName == culture)
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Test to determine if one of a collection of culturess
+ /// is being used currently.
+ /// </summary>
+ /// <param name="cultures"></param>
+ /// <returns></returns>
+ public bool IsCultureSupported(string[] cultures)
+ {
+ foreach (string culture in cultures)
+ if (IsCultureSupported(culture))
+ return true;
+
+ return false;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/DataAttribute.cs b/external/guiunit/src/framework/Attributes/DataAttribute.cs
new file mode 100755
index 0000000..28a7a7c
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/DataAttribute.cs
@@ -0,0 +1,40 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// The abstract base class for all data-providing attributes
+ /// defined by NUnit. Used to select all data sources for a
+ /// method, class or parameter.
+ /// </summary>
+ public abstract class DataAttribute : NUnitAttribute
+ {
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public DataAttribute() { }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/DatapointAttribute.cs b/external/guiunit/src/framework/Attributes/DatapointAttribute.cs
new file mode 100755
index 0000000..5e386ee
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/DatapointAttribute.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Used to mark a field for use as a datapoint when executing a theory
+ /// within the same fixture that requires an argument of the field's Type.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
+ public class DatapointAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/DatapointSourceAttribute.cs b/external/guiunit/src/framework/Attributes/DatapointSourceAttribute.cs
new file mode 100755
index 0000000..f00b512
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/DatapointSourceAttribute.cs
@@ -0,0 +1,39 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Used to mark a field, property or method providing a set of datapoints to
+ /// be used in executing any theories within the same fixture that require an
+ /// argument of the Type provided. The data source may provide an array of
+ /// the required Type or an IEnumerable<T>.
+ /// Synonymous with DatapointsAttribute.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public class DatapointSourceAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/DatapointsAttribute.cs b/external/guiunit/src/framework/Attributes/DatapointsAttribute.cs
new file mode 100755
index 0000000..cbf120a
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/DatapointsAttribute.cs
@@ -0,0 +1,39 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Used to mark a field, property or method providing a set of datapoints to
+ /// be used in executing any theories within the same fixture that require an
+ /// argument of the Type provided. The data source may provide an array of
+ /// the required Type or an IEnumerable<T>.
+ /// Synonymous with DatapointSourceAttribute.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public class DatapointsAttribute : DatapointSourceAttribute
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/DescriptionAttribute.cs b/external/guiunit/src/framework/Attributes/DescriptionAttribute.cs
new file mode 100755
index 0000000..224ed09
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/DescriptionAttribute.cs
@@ -0,0 +1,43 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Attribute used to provide descriptive text about a
+ /// test case or fixture.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = false, Inherited=false)]
+ public sealed class DescriptionAttribute : PropertyAttribute
+ {
+ /// <summary>
+ /// Construct a description Attribute
+ /// </summary>
+ /// <param name="description">The text of the description</param>
+ public DescriptionAttribute(string description) : base(PropertyNames.Description, description) { }
+ }
+
+}
diff --git a/external/guiunit/src/framework/Attributes/ExpectedExceptionAttribute.cs b/external/guiunit/src/framework/Attributes/ExpectedExceptionAttribute.cs
new file mode 100755
index 0000000..790cd1c
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/ExpectedExceptionAttribute.cs
@@ -0,0 +1,175 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// ExpectedExceptionAttribute
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
+ public class ExpectedExceptionAttribute : NUnitAttribute
+ {
+ private ExpectedExceptionData exceptionData = new ExpectedExceptionData();
+
+ /// <summary>
+ /// Constructor for a non-specific exception
+ /// </summary>
+ public ExpectedExceptionAttribute()
+ {
+ }
+
+ /// <summary>
+ /// Constructor for a given type of exception
+ /// </summary>
+ /// <param name="exceptionType">The type of the expected exception</param>
+ public ExpectedExceptionAttribute(Type exceptionType)
+ {
+ exceptionData.ExpectedExceptionType = exceptionType;
+ }
+
+ /// <summary>
+ /// Constructor for a given exception name
+ /// </summary>
+ /// <param name="exceptionName">The full name of the expected exception</param>
+ public ExpectedExceptionAttribute(string exceptionName)
+ {
+ exceptionData.ExpectedExceptionName = exceptionName;
+ }
+
+ /// <summary>
+ /// Gets or sets the expected exception type
+ /// </summary>
+ public Type ExpectedException
+ {
+ get { return exceptionData.ExpectedExceptionType; }
+ set { exceptionData.ExpectedExceptionType = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the full Type name of the expected exception
+ /// </summary>
+ public string ExpectedExceptionName
+ {
+ get { return exceptionData.ExpectedExceptionName; }
+ set { exceptionData.ExpectedExceptionName = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the expected message text
+ /// </summary>
+ public string ExpectedMessage
+ {
+ get { return exceptionData.ExpectedMessage; }
+ set { exceptionData.ExpectedMessage = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the user message displayed in case of failure
+ /// </summary>
+ public string UserMessage
+ {
+ get { return exceptionData.UserMessage; }
+ set { exceptionData.UserMessage = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the type of match to be performed on the expected message
+ /// </summary>
+ public MessageMatch MatchType
+ {
+ get { return exceptionData.MatchType; }
+ set { exceptionData.MatchType = value; }
+ }
+
+ /// <summary>
+ /// Gets the name of a method to be used as an exception handler
+ /// </summary>
+ public string Handler
+ {
+ get { return exceptionData.HandlerName; }
+ set { exceptionData.HandlerName = value; }
+ }
+
+ /// <summary>
+ /// Gets all data about the expected exception.
+ /// </summary>
+ public ExpectedExceptionData ExceptionData
+ {
+ get { return exceptionData; }
+ }
+
+ //#region IApplyToTest Members
+
+ //void IApplyToTest.ApplyToTest(ITest test)
+ //{
+ // TestMethod testMethod = test as TestMethod;
+ // if (testMethod != null)
+ // testMethod.CustomDecorators.Add(new ExpectedExceptionDecorator());
+ //}
+
+ //#endregion
+ }
+
+ /// <summary>
+ /// ExpectedExceptionDecorator applies to a TestCommand and returns
+ /// a success result only if the expected exception is thrown.
+ /// Otherwise, an appropriate failure result is returned.
+ /// </summary>
+ public class ExpectedExceptionDecorator : ICommandDecorator
+ {
+ private ExpectedExceptionData exceptionData;
+
+ /// <summary>
+ /// Construct an ExpectedExceptionDecorator using specified data.
+ /// </summary>
+ /// <param name="exceptionData">Data describing the expected exception</param>
+ public ExpectedExceptionDecorator(ExpectedExceptionData exceptionData)
+ {
+ this.exceptionData = exceptionData;
+ }
+
+ #region ICommandDecorator Members
+
+ CommandStage ICommandDecorator.Stage
+ {
+ get { return CommandStage.BelowSetUpTearDown; }
+ }
+
+ int ICommandDecorator.Priority
+ {
+ get { return 0; }
+ }
+
+ TestCommand ICommandDecorator.Decorate(TestCommand command)
+ {
+ return new ExpectedExceptionCommand(command, exceptionData);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/ExplicitAttribute.cs b/external/guiunit/src/framework/Attributes/ExplicitAttribute.cs
new file mode 100755
index 0000000..3c466db
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/ExplicitAttribute.cs
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// ExplicitAttribute marks a test or test fixture so that it will
+ /// only be run if explicitly executed from the gui or command line
+ /// or if it is included by use of a filter. The test will not be
+ /// run simply because an enclosing suite is run.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
+ public class ExplicitAttribute : NUnitAttribute, IApplyToTest
+ {
+ private string reason;
+
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public ExplicitAttribute()
+ {
+ this.reason = "";
+ }
+
+ /// <summary>
+ /// Constructor with a reason
+ /// </summary>
+ /// <param name="reason">The reason test is marked explicit</param>
+ public ExplicitAttribute(string reason)
+ {
+ this.reason = reason;
+ }
+
+ #region IApplyToTest members
+
+ /// <summary>
+ /// Modifies a test by marking it as explicit.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (test.RunState != RunState.NotRunnable)
+ {
+ test.RunState = RunState.Explicit;
+ test.Properties.Set(PropertyNames.SkipReason, reason);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/IgnoreAttribute.cs b/external/guiunit/src/framework/Attributes/IgnoreAttribute.cs
new file mode 100755
index 0000000..48fdb5a
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/IgnoreAttribute.cs
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Attribute used to mark a test that is to be ignored.
+ /// Ignored tests result in a warning message when the
+ /// tests are run.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method|AttributeTargets.Class|AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
+ public class IgnoreAttribute : NUnitAttribute, IApplyToTest
+ {
+ private string reason;
+
+ /// <summary>
+ /// Constructs the attribute without giving a reason
+ /// for ignoring the test.
+ /// </summary>
+ public IgnoreAttribute()
+ {
+ this.reason = "";
+ }
+
+ /// <summary>
+ /// Constructs the attribute giving a reason for ignoring the test
+ /// </summary>
+ /// <param name="reason">The reason for ignoring the test</param>
+ public IgnoreAttribute(string reason)
+ {
+ this.reason = reason;
+ }
+
+ #region IApplyToTest members
+
+ /// <summary>
+ /// Modifies a test by marking it as Ignored.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (test.RunState != RunState.NotRunnable)
+ {
+ test.RunState = RunState.Ignored;
+ test.Properties.Set(PropertyNames.SkipReason, reason);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/IncludeExcludeAttribute.cs b/external/guiunit/src/framework/Attributes/IncludeExcludeAttribute.cs
new file mode 100755
index 0000000..762d911
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/IncludeExcludeAttribute.cs
@@ -0,0 +1,83 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Abstract base for Attributes that are used to include tests
+ /// in the test run based on environmental settings.
+ /// </summary>
+ public abstract class IncludeExcludeAttribute : NUnitAttribute
+ {
+ private string include;
+ private string exclude;
+ private string reason;
+
+ /// <summary>
+ /// Constructor with no included items specified, for use
+ /// with named property syntax.
+ /// </summary>
+ public IncludeExcludeAttribute() { }
+
+ /// <summary>
+ /// Constructor taking one or more included items
+ /// </summary>
+ /// <param name="include">Comma-delimited list of included items</param>
+ public IncludeExcludeAttribute( string include )
+ {
+ this.include = include;
+ }
+
+ /// <summary>
+ /// Name of the item that is needed in order for
+ /// a test to run. Multiple itemss may be given,
+ /// separated by a comma.
+ /// </summary>
+ public string Include
+ {
+ get { return this.include; }
+ set { include = value; }
+ }
+
+ /// <summary>
+ /// Name of the item to be excluded. Multiple items
+ /// may be given, separated by a comma.
+ /// </summary>
+ public string Exclude
+ {
+ get { return this.exclude; }
+ set { this.exclude = value; }
+ }
+
+ /// <summary>
+ /// The reason for including or excluding the test
+ /// </summary>
+ public string Reason
+ {
+ get { return reason; }
+ set { reason = value; }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/MaxTimeAttribute.cs b/external/guiunit/src/framework/Attributes/MaxTimeAttribute.cs
new file mode 100755
index 0000000..4e29722
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/MaxTimeAttribute.cs
@@ -0,0 +1,63 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Summary description for MaxTimeAttribute.
+ /// </summary>
+ [AttributeUsage( AttributeTargets.Method, AllowMultiple=false, Inherited=false )]
+ public sealed class MaxTimeAttribute : PropertyAttribute, ICommandDecorator
+ {
+ /// <summary>
+ /// Construct a MaxTimeAttribute, given a time in milliseconds.
+ /// </summary>
+ /// <param name="milliseconds">The maximum elapsed time in milliseconds</param>
+ public MaxTimeAttribute( int milliseconds )
+ : base( milliseconds ) { }
+
+ #region ICommandDecorator Members
+
+ CommandStage ICommandDecorator.Stage
+ {
+ get { return CommandStage.AboveSetUpTearDown; }
+ }
+
+ int ICommandDecorator.Priority
+ {
+ get { return 0; }
+ }
+
+ TestCommand ICommandDecorator.Decorate(TestCommand command)
+ {
+ return new MaxTimeCommand(command);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/NUnitAttribute.cs b/external/guiunit/src/framework/Attributes/NUnitAttribute.cs
new file mode 100755
index 0000000..dac58dc
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/NUnitAttribute.cs
@@ -0,0 +1,38 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// The abstract base class for all custom attributes defined by NUnit.
+ /// </summary>
+ public abstract class NUnitAttribute : Attribute
+ {
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public NUnitAttribute() { }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/PairwiseAttribute.cs b/external/guiunit/src/framework/Attributes/PairwiseAttribute.cs
new file mode 100755
index 0000000..73d342c
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/PairwiseAttribute.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Marks a test to use a pairwise join of any argument
+ /// data provided. Arguments will be combined in such a
+ /// way that all possible pairs of arguments are used.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
+ public class PairwiseAttribute : PropertyAttribute
+ {
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public PairwiseAttribute() : base(PropertyNames.JoinType, "Pairwise") { }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/PlatformAttribute.cs b/external/guiunit/src/framework/Attributes/PlatformAttribute.cs
new file mode 100755
index 0000000..4ab68fb
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/PlatformAttribute.cs
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// PlatformAttribute is used to mark a test fixture or an
+ /// individual method as applying to a particular platform only.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Assembly, AllowMultiple = true, Inherited=false)]
+ public class PlatformAttribute : IncludeExcludeAttribute, IApplyToTest
+ {
+ private PlatformHelper platformHelper = new PlatformHelper();
+
+ /// <summary>
+ /// Constructor with no platforms specified, for use
+ /// with named property syntax.
+ /// </summary>
+ public PlatformAttribute() { }
+
+ /// <summary>
+ /// Constructor taking one or more platforms
+ /// </summary>
+ /// <param name="platforms">Comma-deliminted list of platforms</param>
+ public PlatformAttribute(string platforms) : base(platforms) { }
+
+ #region IApplyToTest members
+
+ /// <summary>
+ /// Causes a test to be skipped if this PlatformAttribute is not satisfied.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (test.RunState != RunState.NotRunnable && !platformHelper.IsPlatformSupported(this))
+ {
+ test.RunState = RunState.Skipped;
+ test.Properties.Add(PropertyNames.SkipReason, platformHelper.Reason);
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/PropertyAttribute.cs b/external/guiunit/src/framework/Attributes/PropertyAttribute.cs
new file mode 100755
index 0000000..39a8133
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/PropertyAttribute.cs
@@ -0,0 +1,113 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// PropertyAttribute is used to attach information to a test as a name/value pair..
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=true, Inherited=true)]
+ public class PropertyAttribute : NUnitAttribute, IApplyToTest
+ {
+ private PropertyBag properties = new PropertyBag();
+
+ /// <summary>
+ /// Construct a PropertyAttribute with a name and string value
+ /// </summary>
+ /// <param name="propertyName">The name of the property</param>
+ /// <param name="propertyValue">The property value</param>
+ public PropertyAttribute(string propertyName, string propertyValue)
+ {
+ this.properties.Add(propertyName, propertyValue);
+ }
+
+ /// <summary>
+ /// Construct a PropertyAttribute with a name and int value
+ /// </summary>
+ /// <param name="propertyName">The name of the property</param>
+ /// <param name="propertyValue">The property value</param>
+ public PropertyAttribute(string propertyName, int propertyValue)
+ {
+ this.properties.Add(propertyName, propertyValue);
+ }
+
+ /// <summary>
+ /// Construct a PropertyAttribute with a name and double value
+ /// </summary>
+ /// <param name="propertyName">The name of the property</param>
+ /// <param name="propertyValue">The property value</param>
+ public PropertyAttribute(string propertyName, double propertyValue)
+ {
+ this.properties.Add(propertyName, propertyValue);
+ }
+
+ /// <summary>
+ /// Constructor for derived classes that set the
+ /// property dictionary directly.
+ /// </summary>
+ protected PropertyAttribute() { }
+
+ /// <summary>
+ /// Constructor for use by derived classes that use the
+ /// name of the type as the property name. Derived classes
+ /// must ensure that the Type of the property value is
+ /// a standard type supported by the BCL. Any custom
+ /// types will cause a serialization Exception when
+ /// in the client.
+ /// </summary>
+ protected PropertyAttribute( object propertyValue )
+ {
+ string propertyName = this.GetType().Name;
+ if ( propertyName.EndsWith( "Attribute" ) )
+ propertyName = propertyName.Substring( 0, propertyName.Length - 9 );
+ this.properties.Add(propertyName, propertyValue);
+ }
+
+ /// <summary>
+ /// Gets the property dictionary for this attribute
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get { return properties; }
+ }
+
+ #region IApplyToTest Members
+
+ /// <summary>
+ /// Modifies a test by adding properties to it.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public virtual void ApplyToTest(Test test)
+ {
+ foreach (string key in Properties.Keys)
+ foreach(object value in Properties[key])
+ test.Properties.Add(key, value);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/RandomAttribute.cs b/external/guiunit/src/framework/Attributes/RandomAttribute.cs
new file mode 100755
index 0000000..33813fd
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/RandomAttribute.cs
@@ -0,0 +1,126 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// RandomAttribute is used to supply a set of random values
+ /// to a single parameter of a parameterized test.
+ /// </summary>
+ public class RandomAttribute : ValuesAttribute, IParameterDataSource
+ {
+ enum SampleType
+ {
+ Auto,
+ Raw,
+ IntRange,
+ DoubleRange
+ }
+
+ SampleType sampleType;
+ private int count;
+ private int min, max;
+ private double dmin, dmax;
+
+ /// <summary>
+ /// Construct a set of Enums if the type is an Enum otherwise
+ /// Construct a set of doubles from 0.0 to 1.0,
+ /// specifying only the count.
+ /// </summary>
+ /// <param name="count"></param>
+ public RandomAttribute(int count)
+ {
+ this.count = count;
+ this.sampleType = SampleType.Raw;
+ }
+
+ /// <summary>
+ /// Construct a set of doubles from min to max
+ /// </summary>
+ /// <param name="min"></param>
+ /// <param name="max"></param>
+ /// <param name="count"></param>
+ public RandomAttribute(double min, double max, int count)
+ {
+ this.count = count;
+ this.dmin = min;
+ this.dmax = max;
+ this.sampleType = SampleType.DoubleRange;
+ }
+
+ /// <summary>
+ /// Construct a set of ints from min to max
+ /// </summary>
+ /// <param name="min"></param>
+ /// <param name="max"></param>
+ /// <param name="count"></param>
+ public RandomAttribute(int min, int max, int count)
+ {
+ this.count = count;
+ this.min = min;
+ this.max = max;
+ this.sampleType = SampleType.IntRange;
+ }
+
+ /// <summary>
+ /// Get the collection of values to be used as arguments
+ /// </summary>
+ public new IEnumerable GetData(ParameterInfo parameter)
+ {
+ Randomizer r = Randomizer.GetRandomizer(parameter);
+ IList values;
+
+ switch (sampleType)
+ {
+ default:
+ case SampleType.Raw:
+ if (parameter.ParameterType.IsEnum)
+ values = r.GetEnums(count,parameter.ParameterType);
+ else
+ values = r.GetDoubles(count);
+ break;
+ case SampleType.IntRange:
+ values = r.GetInts(min, max, count);
+ break;
+ case SampleType.DoubleRange:
+ values = r.GetDoubles(dmin, dmax, count);
+ break;
+ }
+
+ // Copy the random values into the data array
+ // and call the base class which may need to
+ // convert them to another type.
+ this.data = new object[values.Count];
+ for (int i = 0; i < values.Count; i++)
+ this.data[i] = values[i];
+
+ return base.GetData(parameter);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/RangeAttribute.cs b/external/guiunit/src/framework/Attributes/RangeAttribute.cs
new file mode 100755
index 0000000..0425298
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/RangeAttribute.cs
@@ -0,0 +1,104 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// RangeAttribute is used to supply a range of values to an
+ /// individual parameter of a parameterized test.
+ /// </summary>
+ public class RangeAttribute : ValuesAttribute
+ {
+ /// <summary>
+ /// Construct a range of ints using default step of 1
+ /// </summary>
+ /// <param name="from"></param>
+ /// <param name="to"></param>
+ public RangeAttribute(int from, int to) : this(from, to, 1) { }
+
+ /// <summary>
+ /// Construct a range of ints specifying the step size
+ /// </summary>
+ /// <param name="from"></param>
+ /// <param name="to"></param>
+ /// <param name="step"></param>
+ public RangeAttribute(int from, int to, int step)
+ {
+ int count = (to - from) / step + 1;
+ this.data = new object[count];
+ int index = 0;
+ for (int val = from; index < count; val += step)
+ this.data[index++] = val;
+ }
+
+ /// <summary>
+ /// Construct a range of longs
+ /// </summary>
+ /// <param name="from"></param>
+ /// <param name="to"></param>
+ /// <param name="step"></param>
+ public RangeAttribute(long from, long to, long step)
+ {
+ long count = (to - from) / step + 1;
+ this.data = new object[count];
+ int index = 0;
+ for (long val = from; index < count; val += step)
+ this.data[index++] = val;
+ }
+
+ /// <summary>
+ /// Construct a range of doubles
+ /// </summary>
+ /// <param name="from"></param>
+ /// <param name="to"></param>
+ /// <param name="step"></param>
+ public RangeAttribute(double from, double to, double step)
+ {
+ double tol = step / 1000;
+ int count = (int)((to - from) / step + tol + 1);
+ this.data = new object[count];
+ int index = 0;
+ for (double val = from; index < count; val += step)
+ this.data[index++] = val;
+ }
+
+ /// <summary>
+ /// Construct a range of floats
+ /// </summary>
+ /// <param name="from"></param>
+ /// <param name="to"></param>
+ /// <param name="step"></param>
+ public RangeAttribute(float from, float to, float step)
+ {
+ float tol = step / 1000;
+ int count = (int)((to - from) / step + tol + 1);
+ this.data = new object[count];
+ int index = 0;
+ for (float val = from; index < count; val += step)
+ this.data[index++] = val;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/RepeatAttribute.cs b/external/guiunit/src/framework/Attributes/RepeatAttribute.cs
new file mode 100755
index 0000000..91a7a7d
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/RepeatAttribute.cs
@@ -0,0 +1,90 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if false
+// TODO: Rework this
+// RepeatAttribute should either
+// 1) Apply at load time to create the exact number of tests, or
+// 2) Apply at run time, generating tests or results dynamically
+//
+// #1 is feasible but doesn't provide much benefit
+// #2 requires infrastructure for dynamic test cases first
+using System;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal.Commands;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// RepeatAttribute may be applied to test case in order
+ /// to run it multiple times.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
+ public class RepeatAttribute : PropertyAttribute, ICommandDecorator
+ {
+ /// <summary>
+ /// Construct a RepeatAttribute
+ /// </summary>
+ /// <param name="count">The number of times to run the test</param>
+ public RepeatAttribute(int count) : base(count) { }
+
+ //private int count;
+
+ ///// <summary>
+ ///// Construct a RepeatAttribute
+ ///// </summary>
+ ///// <param name="count">The number of times to run the test</param>
+ //public RepeatAttribute(int count)
+ //{
+ // this.count = count;
+ //}
+
+ ///// <summary>
+ ///// Gets the number of times to run the test.
+ ///// </summary>
+ //public int Count
+ //{
+ // get { return count; }
+ //}
+
+ #region ICommandDecorator Members
+
+ CommandStage ICommandDecorator.Stage
+ {
+ get { return CommandStage.Repeat; }
+ }
+
+ int ICommandDecorator.Priority
+ {
+ get { return 0; }
+ }
+
+ TestCommand ICommandDecorator.Decorate(TestCommand command)
+ {
+ return new RepeatedTestCommand(command);
+ }
+
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Attributes/SequentialAttribute.cs b/external/guiunit/src/framework/Attributes/SequentialAttribute.cs
new file mode 100755
index 0000000..f8a8da3
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/SequentialAttribute.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Marks a test to use a Sequential join of any argument
+ /// data provided. Arguments will be combined into test cases,
+ /// taking the next value of each argument until all are used.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=false)]
+ public class SequentialAttribute : PropertyAttribute
+ {
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public SequentialAttribute() : base(PropertyNames.JoinType, "Sequential") { }
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/SetCultureAttribute.cs b/external/guiunit/src/framework/Attributes/SetCultureAttribute.cs
new file mode 100755
index 0000000..47a6725
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/SetCultureAttribute.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Summary description for SetCultureAttribute.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Assembly, AllowMultiple=false, Inherited=true)]
+ public class SetCultureAttribute : PropertyAttribute, IApplyToContext
+ {
+ private string _culture;
+
+ /// <summary>
+ /// Construct given the name of a culture
+ /// </summary>
+ /// <param name="culture"></param>
+ public SetCultureAttribute( string culture ) : base( PropertyNames.SetCulture, culture )
+ {
+ _culture = culture;
+ }
+
+ #region IApplyToContext Members
+
+ void IApplyToContext.ApplyToContext(TestExecutionContext context)
+ {
+ context.CurrentCulture = new System.Globalization.CultureInfo(_culture);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/SetUICultureAttribute.cs b/external/guiunit/src/framework/Attributes/SetUICultureAttribute.cs
new file mode 100755
index 0000000..cf514b8
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/SetUICultureAttribute.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Summary description for SetUICultureAttribute.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Assembly, AllowMultiple = false, Inherited=true)]
+ public class SetUICultureAttribute : PropertyAttribute, IApplyToContext
+ {
+ private string _culture;
+
+ /// <summary>
+ /// Construct given the name of a culture
+ /// </summary>
+ /// <param name="culture"></param>
+ public SetUICultureAttribute(string culture) : base("SetUICulture", culture)
+ {
+ _culture = culture;
+ }
+
+ #region IApplyToContext Members
+
+ void IApplyToContext.ApplyToContext(TestExecutionContext context)
+ {
+ context.CurrentUICulture = new System.Globalization.CultureInfo(_culture);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/SetUpAttribute.cs b/external/guiunit/src/framework/Attributes/SetUpAttribute.cs
new file mode 100755
index 0000000..e7f45dd
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/SetUpAttribute.cs
@@ -0,0 +1,54 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Attribute used to mark a class that contains one-time SetUp
+ /// and/or TearDown methods that apply to all the tests in a
+ /// namespace or an assembly.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=true)]
+ public class SetUpAttribute : NUnitAttribute
+ { }
+
+ /// <summary>
+ /// Attribute used to mark a class that contains one-time SetUp
+ /// and/or TearDown methods that apply to all the tests in a
+ /// namespace or an assembly.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=true)]
+ public class PreTestAttribute : NUnitAttribute
+ { }
+
+ /// <summary>
+ /// Attribute used to mark a class that contains one-time SetUp
+ /// and/or TearDown methods that apply to all the tests in a
+ /// namespace or an assembly.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=true)]
+ public class PostTestAttribute : NUnitAttribute
+ { }
+}
diff --git a/external/guiunit/src/framework/Attributes/TearDownAttribute.cs b/external/guiunit/src/framework/Attributes/TearDownAttribute.cs
new file mode 100755
index 0000000..c16b903
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TearDownAttribute.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Attribute used to identify a method that is called
+ /// immediately after each test is run. The method is
+ /// guaranteed to be called, even if an exception is thrown.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
+ public class TearDownAttribute : NUnitAttribute
+ {}
+}
diff --git a/external/guiunit/src/framework/Attributes/TestAttribute.cs b/external/guiunit/src/framework/Attributes/TestAttribute.cs
new file mode 100755
index 0000000..b92e45e
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestAttribute.cs
@@ -0,0 +1,79 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+ using NUnit.Framework.Api;
+ using NUnit.Framework.Internal;
+
+ /// <summary>
+ /// Adding this attribute to a method within a <seealso cref="TestFixtureAttribute"/>
+ /// class makes the method callable from the NUnit test runner. There is a property
+ /// called Description which is optional which you can provide a more detailed test
+ /// description. This class cannot be inherited.
+ /// </summary>
+ ///
+ /// <example>
+ /// [TestFixture]
+ /// public class Fixture
+ /// {
+ /// [Test]
+ /// public void MethodToTest()
+ /// {}
+ ///
+ /// [Test(Description = "more detailed description")]
+ /// publc void TestDescriptionMethod()
+ /// {}
+ /// }
+ /// </example>
+ ///
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
+ public class TestAttribute : NUnitAttribute, IApplyToTest
+ {
+ private string description;
+
+ /// <summary>
+ /// Descriptive text for this test
+ /// </summary>
+ public string Description
+ {
+ get { return description; }
+ set { description = value; }
+ }
+
+ #region IApplyToTest Members
+
+ /// <summary>
+ /// Modifies a test by adding a description, if not already set.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (!test.Properties.ContainsKey(PropertyNames.Description) && description != null)
+ test.Properties.Set(PropertyNames.Description, description);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TestCaseAttribute.cs b/external/guiunit/src/framework/Attributes/TestCaseAttribute.cs
new file mode 100755
index 0000000..92e86a7
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestCaseAttribute.cs
@@ -0,0 +1,446 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// TestCaseAttribute is used to mark parameterized test cases
+ /// and provide them with their arguments.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited=false)]
+ public class TestCaseAttribute : DataAttribute, ITestCaseData, ITestCaseSource
+ {
+ #region Instance variables
+
+ private object[] arguments;
+ // NOTE: Ignore unsupressed warning about exceptionData in .NET 1.1 build
+ private ExpectedExceptionData exceptionData;
+ private object expectedResult;
+ private bool hasExpectedResult;
+ private IPropertyBag properties;
+ private RunState runState;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Construct a TestCaseAttribute with a list of arguments.
+ /// This constructor is not CLS-Compliant
+ /// </summary>
+ /// <param name="arguments"></param>
+ public TestCaseAttribute(params object[] arguments)
+ {
+ this.runState = RunState.Runnable;
+
+ if (arguments == null)
+ this.arguments = new object[] { null };
+ else
+ this.arguments = arguments;
+ }
+
+ /// <summary>
+ /// Construct a TestCaseAttribute with a single argument
+ /// </summary>
+ /// <param name="arg"></param>
+ public TestCaseAttribute(object arg)
+ {
+ this.runState = RunState.Runnable;
+ this.arguments = new object[] { arg };
+ }
+
+ /// <summary>
+ /// Construct a TestCaseAttribute with a two arguments
+ /// </summary>
+ /// <param name="arg1"></param>
+ /// <param name="arg2"></param>
+ public TestCaseAttribute(object arg1, object arg2)
+ {
+ this.runState = RunState.Runnable;
+ this.arguments = new object[] { arg1, arg2 };
+ }
+
+ /// <summary>
+ /// Construct a TestCaseAttribute with a three arguments
+ /// </summary>
+ /// <param name="arg1"></param>
+ /// <param name="arg2"></param>
+ /// <param name="arg3"></param>
+ public TestCaseAttribute(object arg1, object arg2, object arg3)
+ {
+ this.runState = RunState.Runnable;
+ this.arguments = new object[] { arg1, arg2, arg3 };
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the list of arguments to a test case
+ /// </summary>
+ public object[] Arguments
+ {
+ get { return arguments; }
+ }
+
+ /// <summary>
+ /// Gets or sets the expected result.
+ /// </summary>
+ /// <value>The result.</value>
+ public object ExpectedResult
+ {
+ get { return expectedResult; }
+ set
+ {
+ expectedResult = value;
+ hasExpectedResult = true;
+ }
+ }
+
+ /// <summary>
+ /// Gets the expected result (alias for use
+ /// by NUnit 2.6.x runners and for use
+ /// in legacy code. Remove the setter
+ /// after a time.)
+ /// </summary>
+ [Obsolete("Use ExpectedResult")]
+ public object Result
+ {
+ get { return ExpectedResult; }
+ set { ExpectedResult = value; }
+ }
+
+ /// <summary>
+ /// Returns true if the expected result has been set
+ /// </summary>
+ public bool HasExpectedResult
+ {
+ get { return hasExpectedResult; }
+ }
+
+ /// <summary>
+ /// Gets data about any expected exception for this test case.
+ /// </summary>
+ public ExpectedExceptionData ExceptionData
+ {
+ get { return exceptionData; }
+ }
+
+ /// <summary>
+ /// Gets or sets the expected exception.
+ /// </summary>
+ /// <value>The expected exception.</value>
+ public Type ExpectedException
+ {
+ get { return exceptionData.ExpectedExceptionType; }
+ set { exceptionData.ExpectedExceptionType = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the name the expected exception.
+ /// </summary>
+ /// <value>The expected name of the exception.</value>
+ public string ExpectedExceptionName
+ {
+ get { return exceptionData.ExpectedExceptionName; }
+ set { exceptionData.ExpectedExceptionName = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the expected message of the expected exception
+ /// </summary>
+ /// <value>The expected message of the exception.</value>
+ public string ExpectedMessage
+ {
+ get { return exceptionData.ExpectedMessage; }
+ set { exceptionData.ExpectedMessage = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the type of match to be performed on the expected message
+ /// </summary>
+ public MessageMatch MatchType
+ {
+ get { return exceptionData.MatchType; }
+ set { exceptionData.MatchType = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the description.
+ /// </summary>
+ /// <value>The description.</value>
+ public string Description
+ {
+ get { return this.Properties.Get(PropertyNames.Description) as string; }
+ set { this.Properties.Set(PropertyNames.Description, value); }
+ }
+
+ private string testName;
+ /// <summary>
+ /// Gets or sets the name of the test.
+ /// </summary>
+ /// <value>The name of the test.</value>
+ public string TestName
+ {
+ get { return testName; }
+ set { testName = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the ignored status of the test
+ /// </summary>
+ public bool Ignore
+ {
+ get { return this.RunState == RunState.Ignored; }
+ set { this.runState = value ? RunState.Ignored : RunState.Runnable; }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this <see cref="NUnit.Framework.TestCaseAttribute"/> is explicit.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if explicit; otherwise, <c>false</c>.
+ /// </value>
+ public bool Explicit
+ {
+ get { return this.RunState == RunState.Explicit; }
+ set { this.runState = value ? RunState.Explicit : RunState.Runnable; }
+ }
+
+ /// <summary>
+ /// Gets the RunState of this test case.
+ /// </summary>
+ public RunState RunState
+ {
+ get { return runState; }
+ }
+
+ /// <summary>
+ /// Gets or sets the reason for not running the test.
+ /// </summary>
+ /// <value>The reason.</value>
+ public string Reason
+ {
+ get { return this.Properties.Get(PropertyNames.SkipReason) as string; }
+ set { this.Properties.Set(PropertyNames.SkipReason, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets the ignore reason. When set to a non-null
+ /// non-empty value, the test is marked as ignored.
+ /// </summary>
+ /// <value>The ignore reason.</value>
+ public string IgnoreReason
+ {
+ get { return this.Reason; }
+ set
+ {
+ this.runState = RunState.Ignored;
+ this.Reason = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and sets the category for this fixture.
+ /// May be a comma-separated list of categories.
+ /// </summary>
+ public string Category
+ {
+ get { return Properties.Get(PropertyNames.Category) as string; }
+ set
+ {
+ foreach (string cat in value.Split(new char[] { ',' }) )
+ Properties.Add(PropertyNames.Category, cat);
+ }
+ }
+
+ /// <summary>
+ /// Gets a list of categories for this fixture
+ /// </summary>
+ public IList Categories
+ {
+ get { return Properties[PropertyNames.Category] as IList; }
+ }
+
+ /// <summary>
+ /// NYI
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get
+ {
+ if (properties == null)
+ properties = new PropertyBag();
+
+ return properties;
+ }
+ }
+
+ #endregion
+
+ #region ITestCaseSource Members
+
+ /// <summary>
+ /// Returns an collection containing a single ITestCaseData item,
+ /// constructed from the arguments provided in the constructor and
+ /// possibly converted to match the specified method.
+ /// </summary>
+ /// <param name="method">The method for which data is being provided</param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ public System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCasesFor(System.Reflection.MethodInfo method)
+#else
+ public System.Collections.IEnumerable GetTestCasesFor(System.Reflection.MethodInfo method)
+#endif
+ {
+ ParameterSet parms;
+
+ try
+ {
+ ParameterInfo[] parameters = method.GetParameters();
+ int argsNeeded = parameters.Length;
+ int argsProvided = Arguments.Length;
+
+ parms = new ParameterSet(this);
+
+ // Special handling for params arguments
+ if (argsNeeded > 0 && argsProvided >= argsNeeded - 1)
+ {
+ ParameterInfo lastParameter = parameters[argsNeeded - 1];
+ Type lastParameterType = lastParameter.ParameterType;
+ Type elementType = lastParameterType.GetElementType();
+
+ if (lastParameterType.IsArray && lastParameter.IsDefined(typeof(ParamArrayAttribute), false))
+ {
+ if (argsProvided == argsNeeded)
+ {
+ Type lastArgumentType = parms.Arguments[argsProvided - 1].GetType();
+ if (!lastParameterType.IsAssignableFrom(lastArgumentType))
+ {
+ Array array = Array.CreateInstance(elementType, 1);
+ array.SetValue(parms.Arguments[argsProvided - 1], 0);
+ parms.Arguments[argsProvided - 1] = array;
+ }
+ }
+ else
+ {
+ object[] newArglist = new object[argsNeeded];
+ for (int i = 0; i < argsNeeded && i < argsProvided; i++)
+ newArglist[i] = parms.Arguments[i];
+
+ int length = argsProvided - argsNeeded + 1;
+ Array array = Array.CreateInstance(elementType, length);
+ for (int i = 0; i < length; i++)
+ array.SetValue(parms.Arguments[argsNeeded + i - 1], i);
+
+ newArglist[argsNeeded - 1] = array;
+ parms.Arguments = newArglist;
+ argsProvided = argsNeeded;
+ }
+ }
+ }
+
+ //if (method.GetParameters().Length == 1 && method.GetParameters()[0].ParameterType == typeof(object[]))
+ // parms.Arguments = new object[]{parms.Arguments};
+
+ // Special handling when sole argument is an object[]
+ if (argsNeeded == 1 && method.GetParameters()[0].ParameterType == typeof(object[]))
+ {
+ if (argsProvided > 1 ||
+ argsProvided == 1 && parms.Arguments[0].GetType() != typeof(object[]))
+ {
+ parms.Arguments = new object[] { parms.Arguments };
+ }
+ }
+
+ if (argsProvided == argsNeeded)
+ PerformSpecialConversions(parms.Arguments, parameters);
+ }
+ catch (Exception ex)
+ {
+ parms = new ParameterSet(ex);
+ }
+
+ return new ITestCaseData[] { parms };
+ }
+
+ #endregion
+
+ #region Helper Methods
+ /// <summary>
+ /// Performs several special conversions allowed by NUnit in order to
+ /// permit arguments with types that cannot be used in the constructor
+ /// of an Attribute such as TestCaseAttribute or to simplify their use.
+ /// </summary>
+ /// <param name="arglist">The arguments to be converted</param>
+ /// <param name="parameters">The ParameterInfo array for the method</param>
+ private static void PerformSpecialConversions(object[] arglist, ParameterInfo[] parameters)
+ {
+ for (int i = 0; i < arglist.Length; i++)
+ {
+ object arg = arglist[i];
+ Type targetType = parameters[i].ParameterType;
+
+ if (arg == null)
+ continue;
+
+ if (arg is SpecialValue && (SpecialValue)arg == SpecialValue.Null)
+ {
+ arglist[i] = null;
+ continue;
+ }
+
+ if (targetType.IsAssignableFrom(arg.GetType()))
+ continue;
+
+ if (arg is DBNull)
+ {
+ arglist[i] = null;
+ continue;
+ }
+
+ bool convert = false;
+
+ if (targetType == typeof(short) || targetType == typeof(byte) || targetType == typeof(sbyte))
+ convert = arg is int;
+ else
+ if (targetType == typeof(decimal))
+ convert = arg is double || arg is string || arg is int;
+ else
+ if (targetType == typeof(DateTime) || targetType == typeof(TimeSpan))
+ convert = arg is string;
+
+ if (convert)
+ arglist[i] = Convert.ChangeType(arg, targetType, System.Globalization.CultureInfo.InvariantCulture);
+ }
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TestCaseSourceAttribute.cs b/external/guiunit/src/framework/Attributes/TestCaseSourceAttribute.cs
new file mode 100755
index 0000000..a2e9ef5
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestCaseSourceAttribute.cs
@@ -0,0 +1,212 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// TestCaseSourceAttribute indicates the source to be used to
+ /// provide test cases for a test method.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
+ public class TestCaseSourceAttribute : DataAttribute, ITestCaseSource
+ {
+ private readonly string sourceName;
+ private readonly Type sourceType;
+
+ /// <summary>
+ /// Construct with the name of the method, property or field that will prvide data
+ /// </summary>
+ /// <param name="sourceName">The name of the method, property or field that will provide data</param>
+ public TestCaseSourceAttribute(string sourceName)
+ {
+ this.sourceName = sourceName;
+ }
+
+ /// <summary>
+ /// Construct with a Type and name
+ /// </summary>
+ /// <param name="sourceType">The Type that will provide data</param>
+ /// <param name="sourceName">The name of the method, property or field that will provide data</param>
+ public TestCaseSourceAttribute(Type sourceType, string sourceName)
+ {
+ this.sourceType = sourceType;
+ this.sourceName = sourceName;
+ }
+
+ /// <summary>
+ /// Construct with a Type
+ /// </summary>
+ /// <param name="sourceType">The type that will provide data</param>
+ public TestCaseSourceAttribute(Type sourceType)
+ {
+ this.sourceType = sourceType;
+ }
+
+ /// <summary>
+ /// The name of a the method, property or fiend to be used as a source
+ /// </summary>
+ public string SourceName
+ {
+ get { return sourceName; }
+ }
+
+ /// <summary>
+ /// A Type to be used as a source
+ /// </summary>
+ public Type SourceType
+ {
+ get { return sourceType; }
+ }
+
+ private string category;
+ /// <summary>
+ /// Gets or sets the category associated with this test.
+ /// May be a single category or a comma-separated list.
+ /// </summary>
+ public string Category
+ {
+ get { return category; }
+ set { category = value; }
+ }
+
+ #region ITestCaseSource Members
+ /// <summary>
+ /// Returns a set of ITestCaseDataItems for use as arguments
+ /// to a parameterized test method.
+ /// </summary>
+ /// <param name="method">The method for which data is needed.</param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ public IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method)
+ {
+ List<ITestCaseData> data = new List<ITestCaseData>();
+#else
+ public IEnumerable GetTestCasesFor(MethodInfo method)
+ {
+ ArrayList data = new ArrayList();
+#endif
+ IEnumerable source = GetTestCaseSource(method);
+
+ if (source != null)
+ {
+ ParameterInfo[] parameters = method.GetParameters();
+
+ foreach (object item in source)
+ {
+ ParameterSet parms = new ParameterSet();
+ ITestCaseData testCaseData = item as ITestCaseData;
+
+ if (testCaseData != null)
+ parms = new ParameterSet(testCaseData);
+ else if (item is object[])
+ {
+ object[] array = item as object[];
+ parms.Arguments = array.Length == parameters.Length
+ ? array
+ : new object[] { item };
+ }
+ //else if (parameters.Length == 1 && parameters[0].ParameterType.IsAssignableFrom(item.GetType()))
+ //{
+ // parms.Arguments = new object[] { item };
+ //}
+ else if (item is Array)
+ {
+ Array array = item as Array;
+
+ if (array.Rank == 1 && array.Length == parameters.Length)
+ {
+ parms.Arguments = new object[array.Length];
+ for (int i = 0; i < array.Length; i++)
+ parms.Arguments[i] = (object)array.GetValue(i);
+ }
+ else
+ {
+ parms.Arguments = new object[] { item };
+ }
+ }
+ else
+ {
+ parms.Arguments = new object[] { item };
+ }
+
+ if (this.Category != null)
+ foreach (string cat in this.Category.Split(new char[] { ',' }))
+ parms.Properties.Add(PropertyNames.Category, cat);
+
+ data.Add(parms);
+ }
+ }
+
+ return data;
+ }
+
+ private IEnumerable GetTestCaseSource(MethodInfo method)
+ {
+ IEnumerable source = null;
+
+ Type sourceType = this.sourceType;
+ if (sourceType == null)
+ sourceType = method.ReflectedType;
+
+ if (this.sourceName == null)
+ {
+ return Reflect.Construct(sourceType) as IEnumerable;
+ }
+
+ MemberInfo[] members = sourceType.GetMember(sourceName,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
+ if (members.Length == 1)
+ {
+ MemberInfo member = members[0];
+ object sourceobject = Internal.Reflect.Construct(sourceType);
+ switch (member.MemberType)
+ {
+ case MemberTypes.Field:
+ FieldInfo field = member as FieldInfo;
+ source = (IEnumerable)field.GetValue(sourceobject);
+ break;
+ case MemberTypes.Property:
+ PropertyInfo property = member as PropertyInfo;
+ source = (IEnumerable)property.GetValue(sourceobject, null);
+ break;
+ case MemberTypes.Method:
+ MethodInfo m = member as MethodInfo;
+ source = (IEnumerable)m.Invoke(sourceobject, null);
+ break;
+ }
+ }
+ return source;
+ }
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TestFixtureAttribute.cs b/external/guiunit/src/framework/Attributes/TestFixtureAttribute.cs
new file mode 100755
index 0000000..25f6dd7
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestFixtureAttribute.cs
@@ -0,0 +1,202 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <example>
+ /// [TestFixture]
+ /// public class ExampleClass
+ /// {}
+ /// </example>
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
+ public class TestFixtureAttribute : NUnitAttribute, IApplyToTest
+ {
+ private string description;
+
+ private object[] originalArgs;
+ private object[] constructorArgs;
+ private Type[] typeArgs;
+ private bool argsInitialized;
+
+ private bool isIgnored;
+ private string ignoreReason;
+ private string category;
+
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public TestFixtureAttribute() : this( null ) { }
+
+ /// <summary>
+ /// Construct with a object[] representing a set of arguments.
+ /// In .NET 2.0, the arguments may later be separated into
+ /// type arguments and constructor arguments.
+ /// </summary>
+ /// <param name="arguments"></param>
+ public TestFixtureAttribute(params object[] arguments)
+ {
+ this.originalArgs = arguments == null
+ ? new object[0]
+ : arguments;
+ this.constructorArgs = this.originalArgs;
+ this.typeArgs = new Type[0];
+ }
+
+ /// <summary>
+ /// Descriptive text for this fixture
+ /// </summary>
+ public string Description
+ {
+ get { return description; }
+ set { description = value; }
+ }
+
+ /// <summary>
+ /// The arguments originally provided to the attribute
+ /// </summary>
+ public object[] Arguments
+ {
+ get
+ {
+ if (!argsInitialized)
+ InitializeArgs();
+ return constructorArgs;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this <see cref="TestFixtureAttribute"/> should be ignored.
+ /// </summary>
+ /// <value><c>true</c> if ignore; otherwise, <c>false</c>.</value>
+ public bool Ignore
+ {
+ get { return isIgnored; }
+ set { isIgnored = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the ignore reason. May set Ignored as a side effect.
+ /// </summary>
+ /// <value>The ignore reason.</value>
+ public string IgnoreReason
+ {
+ get { return ignoreReason; }
+ set
+ {
+ ignoreReason = value;
+ isIgnored = ignoreReason != null && ignoreReason != string.Empty;
+ }
+ }
+
+ /// <summary>
+ /// Get or set the type arguments. If not set
+ /// explicitly, any leading arguments that are
+ /// Types are taken as type arguments.
+ /// </summary>
+ public Type[] TypeArgs
+ {
+ get
+ {
+ if (!argsInitialized)
+ InitializeArgs();
+ return typeArgs;
+ }
+ set
+ {
+ typeArgs = value;
+ argsInitialized = true;
+ }
+ }
+
+ /// <summary>
+ /// Gets and sets the category for this fixture.
+ /// May be a comma-separated list of categories.
+ /// </summary>
+ public string Category
+ {
+ get { return category; }
+ set { category = value; }
+ }
+
+ /// <summary>
+ /// Gets a list of categories for this fixture
+ /// </summary>
+ public IList Categories
+ {
+ get { return category == null ? null : category.Split(','); }
+ }
+
+ /// <summary>
+ /// Helper method to split the original argument list
+ /// into type arguments and constructor arguments.
+ /// This action has to be delayed rather than done in
+ /// the constructor, since TypeArgs may be set by
+ /// menas of a named parameter.
+ /// </summary>
+ private void InitializeArgs()
+ {
+ int typeArgCount = 0;
+
+ if (this.originalArgs != null)
+ {
+ foreach (object o in this.originalArgs)
+ if (o is Type) typeArgCount++;
+ else break;
+ }
+
+ this.typeArgs = new Type[typeArgCount];
+ for (int i = 0; i < typeArgCount; i++)
+ this.typeArgs[i] = (Type)this.originalArgs[i];
+
+ int constructorArgCount = originalArgs.Length - typeArgCount;
+ this.constructorArgs = new object[constructorArgCount];
+ for (int i = 0; i < constructorArgCount; i++)
+ this.constructorArgs[i] = this.originalArgs[typeArgCount + i];
+
+ argsInitialized = true;
+ }
+
+ #region IApplyToTest Members
+
+ /// <summary>
+ /// Modifies a test by adding a description, if not already set.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ public void ApplyToTest(Test test)
+ {
+ if (!test.Properties.ContainsKey(PropertyNames.Description) && description != null)
+ test.Properties.Set(PropertyNames.Description, description);
+
+ if (category != null)
+ foreach (string cat in category.Split(new char[] { ',' }) )
+ test.Properties.Add(PropertyNames.Category, cat);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TestFixtureSetUpAttribute.cs b/external/guiunit/src/framework/Attributes/TestFixtureSetUpAttribute.cs
new file mode 100755
index 0000000..57116a6
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestFixtureSetUpAttribute.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Attribute used to identify a method that is
+ /// called before any tests in a fixture are run.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
+ public class TestFixtureSetUpAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TestFixtureTearDownAttribute.cs b/external/guiunit/src/framework/Attributes/TestFixtureTearDownAttribute.cs
new file mode 100755
index 0000000..27feb84
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TestFixtureTearDownAttribute.cs
@@ -0,0 +1,37 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Attribute used to identify a method that is called after
+ /// all the tests in a fixture have run. The method is
+ /// guaranteed to be called, even if an exception is thrown.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
+ public class TestFixtureTearDownAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TheoryAttribute.cs b/external/guiunit/src/framework/Attributes/TheoryAttribute.cs
new file mode 100755
index 0000000..aed00d1
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TheoryAttribute.cs
@@ -0,0 +1,63 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Adding this attribute to a method within a <seealso cref="TestFixtureAttribute"/>
+ /// class makes the method callable from the NUnit test runner. There is a property
+ /// called Description which is optional which you can provide a more detailed test
+ /// description. This class cannot be inherited.
+ /// </summary>
+ ///
+ /// <example>
+ /// [TestFixture]
+ /// public class Fixture
+ /// {
+ /// [Test]
+ /// public void MethodToTest()
+ /// {}
+ ///
+ /// [Test(Description = "more detailed description")]
+ /// publc void TestDescriptionMethod()
+ /// {}
+ /// }
+ /// </example>
+ ///
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited=true)]
+ public class TheoryAttribute : NUnitAttribute
+ {
+ //private string description;
+
+ ///// <summary>
+ ///// Descriptive text for this test
+ ///// </summary>
+ //public string Description
+ //{
+ // get { return description; }
+ // set { description = value; }
+ //}
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/TimeoutAttribute.cs b/external/guiunit/src/framework/Attributes/TimeoutAttribute.cs
new file mode 100755
index 0000000..d4a09a3
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/TimeoutAttribute.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Used on a method, marks the test with a timeout value in milliseconds.
+ /// The test will be run in a separate thread and is cancelled if the timeout
+ /// is exceeded. Used on a class or assembly, sets the default timeout
+ /// for all contained test methods.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = false, Inherited=false)]
+ public class TimeoutAttribute : PropertyAttribute, IApplyToContext
+ {
+ private int _timeout;
+
+ /// <summary>
+ /// Construct a TimeoutAttribute given a time in milliseconds
+ /// </summary>
+ /// <param name="timeout">The timeout value in milliseconds</param>
+ public TimeoutAttribute(int timeout)
+ : base(timeout)
+ {
+ _timeout = timeout;
+ }
+
+ void IApplyToContext.ApplyToContext(TestExecutionContext context)
+ {
+ context.TestCaseTimeout = _timeout;
+ }
+ }
+}
+#endif
+
diff --git a/external/guiunit/src/framework/Attributes/ValueSourceAttribute.cs b/external/guiunit/src/framework/Attributes/ValueSourceAttribute.cs
new file mode 100755
index 0000000..24d3d96
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/ValueSourceAttribute.cs
@@ -0,0 +1,146 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// ValueSourceAttribute indicates the source to be used to
+ /// provide data for one parameter of a test method.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]
+ public class ValueSourceAttribute : DataAttribute, Api.IParameterDataSource
+ {
+ private readonly string sourceName;
+ private readonly Type sourceType;
+
+ /// <summary>
+ /// Construct with the name of the factory - for use with languages
+ /// that don't support params arrays.
+ /// </summary>
+ /// <param name="sourceName">The name of the data source to be used</param>
+ public ValueSourceAttribute(string sourceName)
+ {
+ this.sourceName = sourceName;
+ }
+
+ /// <summary>
+ /// Construct with a Type and name - for use with languages
+ /// that don't support params arrays.
+ /// </summary>
+ /// <param name="sourceType">The Type that will provide data</param>
+ /// <param name="sourceName">The name of the method, property or field that will provide data</param>
+ public ValueSourceAttribute(Type sourceType, string sourceName)
+ {
+ this.sourceType = sourceType;
+ this.sourceName = sourceName;
+ }
+
+ /// <summary>
+ /// The name of a the method, property or fiend to be used as a source
+ /// </summary>
+ public string SourceName
+ {
+ get { return sourceName; }
+ }
+
+ /// <summary>
+ /// A Type to be used as a source
+ /// </summary>
+ public Type SourceType
+ {
+ get { return sourceType; }
+ }
+
+ #region IParameterDataSource Members
+
+ /// <summary>
+ /// Gets an enumeration of data items for use as arguments
+ /// for a test method parameter.
+ /// </summary>
+ /// <param name="parameter">The parameter for which data is needed</param>
+ /// <returns>
+ /// An enumeration containing individual data items
+ /// </returns>
+ public IEnumerable GetData(ParameterInfo parameter)
+ {
+ ObjectList data = new ObjectList();
+ IEnumerable source = GetDataSource(parameter);
+
+ if (source != null)
+ foreach (object item in source)
+ data.Add(item);
+
+ return source;
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private IEnumerable GetDataSource(ParameterInfo parameter)
+ {
+ IEnumerable source = null;
+
+ Type sourceType = this.sourceType;
+ if (sourceType == null)
+ sourceType = parameter.Member.ReflectedType;
+
+ // TODO: Test this
+ if (this.sourceName == null)
+ {
+ return Reflect.Construct(sourceType) as IEnumerable;
+ }
+
+ MemberInfo[] members = sourceType.GetMember(sourceName,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
+ if (members.Length == 1)
+ {
+ MemberInfo member = members[0];
+ object sourceobject = Internal.Reflect.Construct(sourceType);
+ switch (member.MemberType)
+ {
+ case MemberTypes.Field:
+ FieldInfo field = member as FieldInfo;
+ source = (IEnumerable)field.GetValue(sourceobject);
+ break;
+ case MemberTypes.Property:
+ PropertyInfo property = member as PropertyInfo;
+ source = (IEnumerable)property.GetValue(sourceobject, null);
+ break;
+ case MemberTypes.Method:
+ MethodInfo m = member as MethodInfo;
+ source = (IEnumerable)m.Invoke(sourceobject, null);
+ break;
+ }
+ }
+ return source;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Attributes/ValuesAttribute.cs b/external/guiunit/src/framework/Attributes/ValuesAttribute.cs
new file mode 100755
index 0000000..bd5c119
--- /dev/null
+++ b/external/guiunit/src/framework/Attributes/ValuesAttribute.cs
@@ -0,0 +1,134 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// ValuesAttribute is used to provide literal arguments for
+ /// an individual parameter of a test.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
+ public class ValuesAttribute : DataAttribute, Api.IParameterDataSource
+ {
+ /// <summary>
+ /// The collection of data to be returned. Must
+ /// be set by any derived attribute classes.
+ /// We use an object[] so that the individual
+ /// elements may have their type changed in GetData
+ /// if necessary
+ /// </summary>
+ // TODO: This causes a lot of boxing so we should eliminate it
+ protected object[] data;
+
+ /// <summary>
+ /// Construct with one argument
+ /// </summary>
+ /// <param name="arg1"></param>
+ public ValuesAttribute(object arg1)
+ {
+ data = new object[] { arg1 };
+ }
+
+ /// <summary>
+ /// Construct with two arguments
+ /// </summary>
+ /// <param name="arg1"></param>
+ /// <param name="arg2"></param>
+ public ValuesAttribute(object arg1, object arg2)
+ {
+ data = new object[] { arg1, arg2 };
+ }
+
+ /// <summary>
+ /// Construct with three arguments
+ /// </summary>
+ /// <param name="arg1"></param>
+ /// <param name="arg2"></param>
+ /// <param name="arg3"></param>
+ public ValuesAttribute(object arg1, object arg2, object arg3)
+ {
+ data = new object[] { arg1, arg2, arg3 };
+ }
+
+ /// <summary>
+ /// Construct with an array of arguments
+ /// </summary>
+ /// <param name="args"></param>
+ public ValuesAttribute(params object[] args)
+ {
+ data = args;
+ }
+
+ /// <summary>
+ /// Get the collection of values to be used as arguments
+ /// </summary>
+ public IEnumerable GetData(ParameterInfo parameter)
+ {
+ Type targetType = parameter.ParameterType;
+
+ for (int i = 0; i < data.Length; i++)
+ {
+ object arg = data[i];
+
+ if (arg == null)
+ continue;
+
+ if (arg.GetType().FullName == "NUnit.Framework.SpecialValue" &&
+ arg.ToString() == "Null")
+ {
+ data[i] = null;
+ continue;
+ }
+
+ if (targetType.IsAssignableFrom(arg.GetType()))
+ continue;
+
+ if (arg is DBNull)
+ {
+ data[i] = null;
+ continue;
+ }
+
+ bool convert = false;
+
+ if (targetType == typeof(short) || targetType == typeof(byte) || targetType == typeof(sbyte))
+ convert = arg is int;
+ else
+ if (targetType == typeof(decimal))
+ convert = arg is double || arg is string || arg is int;
+ else
+ if (targetType == typeof(DateTime) || targetType == typeof(TimeSpan))
+ convert = arg is string;
+
+ if (convert)
+ data[i] = Convert.ChangeType(arg, targetType, System.Globalization.CultureInfo.InvariantCulture);
+ }
+
+ return data;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Compatibility/SerializableAttribute.cs b/external/guiunit/src/framework/Compatibility/SerializableAttribute.cs
new file mode 100755
index 0000000..87b53d5
--- /dev/null
+++ b/external/guiunit/src/framework/Compatibility/SerializableAttribute.cs
@@ -0,0 +1,35 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if NETCF_1_0 || SILVERLIGHT
+namespace System
+{
+ /// <summary>
+ /// Replacement for the SerializableAttribute so we compile
+ /// under Silverlight.
+ /// </summary>
+ public class SerializableAttribute : Attribute
+ {
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Constraints/AllItemsConstraint.cs b/external/guiunit/src/framework/Constraints/AllItemsConstraint.cs
new file mode 100755
index 0000000..c940f3f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AllItemsConstraint.cs
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AllItemsConstraint applies another constraint to each
+ /// item in a collection, succeeding if they all succeed.
+ /// </summary>
+ public class AllItemsConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct an AllItemsConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public AllItemsConstraint(Constraint itemConstraint)
+ : base(itemConstraint)
+ {
+ this.DisplayName = "all";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// failing if any item fails.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is IEnumerable))
+ throw new ArgumentException("The actual value must be an IEnumerable", "actual");
+
+ foreach (object item in (IEnumerable)actual)
+ if (!baseConstraint.Matches(item))
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("all items");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/AndConstraint.cs b/external/guiunit/src/framework/Constraints/AndConstraint.cs
new file mode 100755
index 0000000..818e078
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AndConstraint.cs
@@ -0,0 +1,100 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AndConstraint succeeds only if both members succeed.
+ /// </summary>
+ public class AndConstraint : BinaryConstraint
+ {
+ private enum FailurePoint
+ {
+ None,
+ Left,
+ Right
+ };
+
+ private FailurePoint failurePoint;
+
+ /// <summary>
+ /// Create an AndConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ public AndConstraint(Constraint left, Constraint right) : base(left, right) { }
+
+ /// <summary>
+ /// Apply both member constraints to an actual value, succeeding
+ /// succeeding only if both of them succeed.
+ /// </summary>
+ /// <param name="actual">The actual value</param>
+ /// <returns>True if the constraints both succeeded</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ failurePoint = left.Matches(actual)
+ ? right.Matches(actual)
+ ? FailurePoint.None
+ : FailurePoint.Right
+ : FailurePoint.Left;
+
+ return failurePoint == FailurePoint.None;
+ }
+
+ /// <summary>
+ /// Write a description for this contraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to receive the description</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ left.WriteDescriptionTo(writer);
+ writer.WriteConnector("and");
+ right.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ switch (failurePoint)
+ {
+ case FailurePoint.Left:
+ left.WriteActualValueTo(writer);
+ break;
+ case FailurePoint.Right:
+ right.WriteActualValueTo(writer);
+ break;
+ default:
+ base.WriteActualValueTo(writer);
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/AssignableFromConstraint.cs b/external/guiunit/src/framework/Constraints/AssignableFromConstraint.cs
new file mode 100755
index 0000000..d674b02
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AssignableFromConstraint.cs
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AssignableFromConstraint is used to test that an object
+ /// can be assigned from a given Type.
+ /// </summary>
+ public class AssignableFromConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an AssignableFromConstraint for the type provided
+ /// </summary>
+ /// <param name="type"></param>
+ public AssignableFromConstraint(Type type) : base(type) { }
+
+ /// <summary>
+ /// Test whether an object can be assigned from the specified type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && actual.GetType().IsAssignableFrom(expectedType);
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("assignable from");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/AssignableToConstraint.cs b/external/guiunit/src/framework/Constraints/AssignableToConstraint.cs
new file mode 100755
index 0000000..66b3ffd
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AssignableToConstraint.cs
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AssignableToConstraint is used to test that an object
+ /// can be assigned to a given Type.
+ /// </summary>
+ public class AssignableToConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an AssignableToConstraint for the type provided
+ /// </summary>
+ /// <param name="type"></param>
+ public AssignableToConstraint(Type type) : base(type) { }
+
+ /// <summary>
+ /// Test whether an object can be assigned to the specified type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && expectedType.IsAssignableFrom(actual.GetType());
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("assignable to");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/AttributeConstraint.cs b/external/guiunit/src/framework/Constraints/AttributeConstraint.cs
new file mode 100755
index 0000000..8773357
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AttributeConstraint.cs
@@ -0,0 +1,106 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AttributeConstraint tests that a specified attribute is present
+ /// on a Type or other provider and that the value of the attribute
+ /// satisfies some other constraint.
+ /// </summary>
+ public class AttributeConstraint : PrefixConstraint
+ {
+ private readonly Type expectedType;
+ private Attribute attrFound;
+
+ /// <summary>
+ /// Constructs an AttributeConstraint for a specified attriute
+ /// Type and base constraint.
+ /// </summary>
+ /// <param name="type"></param>
+ /// <param name="baseConstraint"></param>
+ public AttributeConstraint(Type type, Constraint baseConstraint)
+ : base(baseConstraint)
+ {
+ this.expectedType = type;
+
+ if (!typeof(Attribute).IsAssignableFrom(expectedType))
+ throw new ArgumentException(string.Format(
+ "Type {0} is not an attribute", expectedType), "type");
+ }
+
+ /// <summary>
+ /// Determines whether the Type or other provider has the
+ /// expected attribute and if its value matches the
+ /// additional constraint specified.
+ /// </summary>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ System.Reflection.ICustomAttributeProvider attrProvider =
+ actual as System.Reflection.ICustomAttributeProvider;
+
+ if (attrProvider == null)
+ throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
+
+ Attribute[] attrs = (Attribute[])attrProvider.GetCustomAttributes(expectedType, true);
+ if (attrs.Length == 0)
+ throw new ArgumentException(string.Format("Attribute {0} was not found", expectedType), "actual");
+
+ attrFound = attrs[0];
+ return baseConstraint.Matches(attrFound);
+ }
+
+ /// <summary>
+ /// Writes a description of the attribute to the specified writer.
+ /// </summary>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("attribute " + expectedType.FullName);
+ if (baseConstraint != null)
+ {
+ if (baseConstraint is EqualConstraint)
+ writer.WritePredicate("equal to");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+
+ /// <summary>
+ /// Writes the actual value supplied to the specified writer.
+ /// </summary>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(attrFound);
+ }
+
+ /// <summary>
+ /// Returns a string representation of the constraint.
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<attribute {0} {1}>", expectedType, baseConstraint);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/AttributeExistsConstraint.cs b/external/guiunit/src/framework/Constraints/AttributeExistsConstraint.cs
new file mode 100755
index 0000000..5e1109f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/AttributeExistsConstraint.cs
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// AttributeExistsConstraint tests for the presence of a
+ /// specified attribute on a Type.
+ /// </summary>
+ public class AttributeExistsConstraint : Constraint
+ {
+ private Type expectedType;
+
+ /// <summary>
+ /// Constructs an AttributeExistsConstraint for a specific attribute Type
+ /// </summary>
+ /// <param name="type"></param>
+ public AttributeExistsConstraint(Type type)
+ : base(type)
+ {
+ this.expectedType = type;
+
+ if (!typeof(Attribute).IsAssignableFrom(expectedType))
+ throw new ArgumentException(string.Format(
+ "Type {0} is not an attribute", expectedType), "type");
+ }
+
+ /// <summary>
+ /// Tests whether the object provides the expected attribute.
+ /// </summary>
+ /// <param name="actual">A Type, MethodInfo, or other ICustomAttributeProvider</param>
+ /// <returns>True if the expected attribute is present, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ System.Reflection.ICustomAttributeProvider attrProvider =
+ actual as System.Reflection.ICustomAttributeProvider;
+
+ if (attrProvider == null)
+ throw new ArgumentException(string.Format("Actual value {0} does not implement ICustomAttributeProvider", actual), "actual");
+
+ return attrProvider.GetCustomAttributes(expectedType, true).Length > 0;
+ }
+
+ /// <summary>
+ /// Writes the description of the constraint to the specified writer
+ /// </summary>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("type with attribute");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/BasicConstraint.cs b/external/guiunit/src/framework/Constraints/BasicConstraint.cs
new file mode 100755
index 0000000..383a790
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/BasicConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// BasicConstraint is the abstract base for constraints that
+ /// perform a simple comparison to a constant value.
+ /// </summary>
+ public abstract class BasicConstraint : Constraint
+ {
+ private readonly object expected;
+ private readonly string description;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:BasicConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected.</param>
+ /// <param name="description">The description.</param>
+ protected BasicConstraint(object expected, string description)
+ {
+ this.expected = expected;
+ this.description = description;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null && expected == null)
+ return true;
+
+ if (actual == null || expected == null)
+ return false;
+
+ return expected.Equals(actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write(description);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/BinaryConstraint.cs b/external/guiunit/src/framework/Constraints/BinaryConstraint.cs
new file mode 100755
index 0000000..3d3c2b1
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/BinaryConstraint.cs
@@ -0,0 +1,53 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// BinaryConstraint is the abstract base of all constraints
+ /// that combine two other constraints in some fashion.
+ /// </summary>
+ public abstract class BinaryConstraint : Constraint
+ {
+ /// <summary>
+ /// The first constraint being combined
+ /// </summary>
+ protected Constraint left;
+ /// <summary>
+ /// The second constraint being combined
+ /// </summary>
+ protected Constraint right;
+
+ /// <summary>
+ /// Construct a BinaryConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ protected BinaryConstraint(Constraint left, Constraint right)
+ : base(left, right)
+ {
+ this.left = left;
+ this.right = right;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/BinarySerializableConstraint.cs b/external/guiunit/src/framework/Constraints/BinarySerializableConstraint.cs
new file mode 100755
index 0000000..916c570
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/BinarySerializableConstraint.cs
@@ -0,0 +1,100 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF && !SILVERLIGHT
+using System;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// BinarySerializableConstraint tests whether
+ /// an object is serializable in binary format.
+ /// </summary>
+ public class BinarySerializableConstraint : Constraint
+ {
+ readonly BinaryFormatter serializer = new BinaryFormatter();
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null)
+ throw new ArgumentException();
+
+ MemoryStream stream = new MemoryStream();
+
+ try
+ {
+ serializer.Serialize(stream, actual);
+
+ stream.Seek(0, SeekOrigin.Begin);
+
+ object value = serializer.Deserialize(stream);
+
+ return value != null;
+ }
+ catch (SerializationException)
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("binary serializable");
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.Write("<{0}>", actual.GetType().Name);
+ }
+
+ /// <summary>
+ /// Returns the string representation
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return "<binaryserializable>";
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionConstraint.cs
new file mode 100755
index 0000000..3f3b383
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionConstraint.cs
@@ -0,0 +1,89 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionConstraint is the abstract base class for
+ /// constraints that operate on collections.
+ /// </summary>
+ public abstract class CollectionConstraint : Constraint
+ {
+ /// <summary>
+ /// Construct an empty CollectionConstraint
+ /// </summary>
+ protected CollectionConstraint() { }
+
+ /// <summary>
+ /// Construct a CollectionConstraint
+ /// </summary>
+ /// <param name="arg"></param>
+ protected CollectionConstraint(object arg) : base(arg) { }
+
+ /// <summary>
+ /// Determines whether the specified enumerable is empty.
+ /// </summary>
+ /// <param name="enumerable">The enumerable.</param>
+ /// <returns>
+ /// <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>.
+ /// </returns>
+ protected static bool IsEmpty(IEnumerable enumerable)
+ {
+ ICollection collection = enumerable as ICollection;
+ if (collection != null)
+ return collection.Count == 0;
+
+ // NOTE: Ignore unsuppressed warning about o in .NET 1.1 build
+ foreach (object o in enumerable)
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ IEnumerable enumerable = actual as IEnumerable;
+ if (enumerable == null)
+ throw new ArgumentException("The actual value must be an IEnumerable", "actual");
+
+ return doMatch(enumerable);
+ }
+
+ /// <summary>
+ /// Protected method to be implemented by derived classes
+ /// </summary>
+ /// <param name="collection"></param>
+ /// <returns></returns>
+ protected abstract bool doMatch(IEnumerable collection);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionContainsConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionContainsConstraint.cs
new file mode 100755
index 0000000..0ba8c32
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionContainsConstraint.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionContainsConstraint is used to test whether a collection
+ /// contains an expected object as a member.
+ /// </summary>
+ public class CollectionContainsConstraint : CollectionItemsEqualConstraint
+ {
+ private readonly object expected;
+
+ /// <summary>
+ /// Construct a CollectionContainsConstraint
+ /// </summary>
+ /// <param name="expected"></param>
+ public CollectionContainsConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "contains";
+ }
+
+ /// <summary>
+ /// Test whether the expected item is contained in the collection
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ foreach (object obj in actual)
+ if (ItemsEqual(obj, expected))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Write a descripton of the constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("collection containing");
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionEquivalentConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionEquivalentConstraint.cs
new file mode 100755
index 0000000..81a0215
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionEquivalentConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionEquivalentCOnstraint is used to determine whether two
+ /// collections are equivalent.
+ /// </summary>
+ public class CollectionEquivalentConstraint : CollectionItemsEqualConstraint
+ {
+ private readonly IEnumerable expected;
+
+ /// <summary>
+ /// Construct a CollectionEquivalentConstraint
+ /// </summary>
+ /// <param name="expected"></param>
+ public CollectionEquivalentConstraint(IEnumerable expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "equivalent";
+ }
+
+ /// <summary>
+ /// Test whether two collections are equivalent
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ // This is just an optimization
+ if (expected is ICollection && actual is ICollection)
+ if (((ICollection)actual).Count != ((ICollection)expected).Count)
+ return false;
+
+ CollectionTally tally = Tally(expected);
+ return tally.TryRemove(actual) && tally.Count == 0;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("equivalent to");
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionItemsEqualConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionItemsEqualConstraint.cs
new file mode 100755
index 0000000..2d64343
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionItemsEqualConstraint.cs
@@ -0,0 +1,150 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionItemsEqualConstraint is the abstract base class for all
+ /// collection constraints that apply some notion of item equality
+ /// as a part of their operation.
+ /// </summary>
+ public abstract class CollectionItemsEqualConstraint : CollectionConstraint
+ {
+ private readonly NUnitEqualityComparer comparer = NUnitEqualityComparer.Default;
+
+ /// <summary>
+ /// Construct an empty CollectionConstraint
+ /// </summary>
+ protected CollectionItemsEqualConstraint() { }
+
+ /// <summary>
+ /// Construct a CollectionConstraint
+ /// </summary>
+ /// <param name="arg"></param>
+ protected CollectionItemsEqualConstraint(object arg) : base(arg) { }
+
+ #region Modifiers
+
+ /// <summary>
+ /// Flag the constraint to ignore case and return self.
+ /// </summary>
+ public CollectionItemsEqualConstraint IgnoreCase
+ {
+ get
+ {
+ comparer.IgnoreCase = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied EqualityAdapter.
+ /// NOTE: For internal use only.
+ /// </summary>
+ /// <param name="adapter">The EqualityAdapter to use.</param>
+ /// <returns>Self.</returns>
+ internal CollectionItemsEqualConstraint Using(EqualityAdapter adapter)
+ {
+ this.comparer.ExternalComparers.Add(adapter);
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using(IComparer comparer)
+ {
+ return Using(EqualityAdapter.For(comparer));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(IComparer<T> comparer)
+ {
+ return Using(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied Comparison object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(Comparison<T> comparer)
+ {
+ return Using(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
+ {
+ return Using(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public CollectionItemsEqualConstraint Using<T>(IEqualityComparer<T> comparer)
+ {
+ return Using(EqualityAdapter.For(comparer));
+ }
+#endif
+
+ #endregion
+
+ /// <summary>
+ /// Compares two collection members for equality
+ /// </summary>
+ protected bool ItemsEqual(object x, object y)
+ {
+ Tolerance tolerance = Tolerance.Zero;
+ return comparer.AreEqual(x, y, ref tolerance);
+ }
+
+ /// <summary>
+ /// Return a new CollectionTally for use in making tests
+ /// </summary>
+ /// <param name="c">The collection to be included in the tally</param>
+ protected CollectionTally Tally(IEnumerable c)
+ {
+ return new CollectionTally(comparer, c);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionOrderedConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionOrderedConstraint.cs
new file mode 100755
index 0000000..f8c62b0
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionOrderedConstraint.cs
@@ -0,0 +1,185 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using System.Text;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionOrderedConstraint is used to test whether a collection is ordered.
+ /// </summary>
+ public class CollectionOrderedConstraint : CollectionConstraint
+ {
+ private ComparisonAdapter comparer = ComparisonAdapter.Default;
+ private string comparerName;
+ private string propertyName;
+ private bool descending;
+
+ /// <summary>
+ /// Construct a CollectionOrderedConstraint
+ /// </summary>
+ public CollectionOrderedConstraint()
+ {
+ this.DisplayName = "ordered";
+ }
+
+ ///<summary>
+ /// If used performs a reverse comparison
+ ///</summary>
+ public CollectionOrderedConstraint Descending
+ {
+ get
+ {
+ descending = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use an IComparer and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using(IComparer comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Modifies the constraint to use an IComparer<T> and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use a Comparison<T> and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ this.comparerName = comparer.GetType().FullName;
+ return this;
+ }
+#endif
+
+ /// <summary>
+ /// Modifies the constraint to test ordering by the value of
+ /// a specified property and returns self.
+ /// </summary>
+ public CollectionOrderedConstraint By(string propertyName)
+ {
+ this.propertyName = propertyName;
+ return this;
+ }
+
+ /// <summary>
+ /// Test whether the collection is ordered
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ object previous = null;
+ int index = 0;
+ foreach (object obj in actual)
+ {
+ object objToCompare = obj;
+ if (obj == null)
+ throw new ArgumentNullException("actual", "Null value at index " + index.ToString());
+
+ if (this.propertyName != null)
+ {
+ PropertyInfo prop = obj.GetType().GetProperty(propertyName);
+ objToCompare = prop.GetValue(obj, null);
+ if (objToCompare == null)
+ throw new ArgumentNullException("actual", "Null property value at index " + index.ToString());
+ }
+
+ if (previous != null)
+ {
+ //int comparisonResult = comparer.Compare(al[i], al[i + 1]);
+ int comparisonResult = comparer.Compare(previous, objToCompare);
+
+ if (descending && comparisonResult < 0)
+ return false;
+ if (!descending && comparisonResult > 0)
+ return false;
+ }
+
+ previous = objToCompare;
+ index++;
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of the constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ if (propertyName == null)
+ writer.Write("collection ordered");
+ else
+ {
+ writer.WritePredicate("collection ordered by");
+ writer.WriteExpectedValue(propertyName);
+ }
+
+ if (descending)
+ writer.WriteModifier("descending");
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GetStringRepresentation()
+ {
+ StringBuilder sb = new StringBuilder("<ordered");
+
+ if (propertyName != null)
+ sb.Append("by " + propertyName);
+ if (descending)
+ sb.Append(" descending");
+ if (comparerName != null)
+ sb.Append(" " + comparerName);
+
+ sb.Append(">");
+
+ return sb.ToString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionSubsetConstraint.cs b/external/guiunit/src/framework/Constraints/CollectionSubsetConstraint.cs
new file mode 100755
index 0000000..2cbb0da
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionSubsetConstraint.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionSubsetConstraint is used to determine whether
+ /// one collection is a subset of another
+ /// </summary>
+ public class CollectionSubsetConstraint : CollectionItemsEqualConstraint
+ {
+ private IEnumerable expected;
+
+ /// <summary>
+ /// Construct a CollectionSubsetConstraint
+ /// </summary>
+ /// <param name="expected">The collection that the actual value is expected to be a subset of</param>
+ public CollectionSubsetConstraint(IEnumerable expected) : base(expected)
+ {
+ this.expected = expected;
+ this.DisplayName = "subsetof";
+ }
+
+ /// <summary>
+ /// Test whether the actual collection is a subset of
+ /// the expected collection provided.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ return Tally(expected).TryRemove( actual );
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate( "subset of" );
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/CollectionTally.cs b/external/guiunit/src/framework/Constraints/CollectionTally.cs
new file mode 100755
index 0000000..94e02a5
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/CollectionTally.cs
@@ -0,0 +1,95 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// CollectionTally counts (tallies) the number of
+ /// occurences of each object in one or more enumerations.
+ /// </summary>
+ public class CollectionTally
+ {
+ // Internal list used to track occurences
+ private readonly ObjectList list = new ObjectList();
+
+ private readonly NUnitEqualityComparer comparer;
+
+ /// <summary>
+ /// Construct a CollectionTally object from a comparer and a collection
+ /// </summary>
+ public CollectionTally(NUnitEqualityComparer comparer, IEnumerable c)
+ {
+ this.comparer = comparer;
+
+ foreach (object o in c)
+ list.Add(o);
+ }
+
+ /// <summary>
+ /// The number of objects remaining in the tally
+ /// </summary>
+ public int Count
+ {
+ get { return list.Count; }
+ }
+
+ private bool ItemsEqual(object expected, object actual)
+ {
+ Tolerance tolerance = Tolerance.Zero;
+ return comparer.AreEqual(expected, actual, ref tolerance);
+ }
+
+ /// <summary>
+ /// Try to remove an object from the tally
+ /// </summary>
+ /// <param name="o">The object to remove</param>
+ /// <returns>True if successful, false if the object was not found</returns>
+ public bool TryRemove(object o)
+ {
+ for (int index = 0; index < list.Count; index++)
+ if (ItemsEqual(list[index], o))
+ {
+ list.RemoveAt(index);
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Try to remove a set of objects from the tally
+ /// </summary>
+ /// <param name="c">The objects to remove</param>
+ /// <returns>True if successful, false if any object was not found</returns>
+ public bool TryRemove(IEnumerable c)
+ {
+ foreach (object o in c)
+ if (!TryRemove(o))
+ return false;
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ComparisonAdapter.cs b/external/guiunit/src/framework/Constraints/ComparisonAdapter.cs
new file mode 100755
index 0000000..b09f51f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ComparisonAdapter.cs
@@ -0,0 +1,172 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ComparisonAdapter class centralizes all comparisons of
+ /// values in NUnit, adapting to the use of any provided
+ /// IComparer, IComparer<T> or Comparison<T>
+ /// </summary>
+ public abstract class ComparisonAdapter
+ {
+ /// <summary>
+ /// Gets the default ComparisonAdapter, which wraps an
+ /// NUnitComparer object.
+ /// </summary>
+ public static ComparisonAdapter Default
+ {
+ get { return new DefaultComparisonAdapter(); }
+ }
+
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps an IComparer
+ /// </summary>
+ public static ComparisonAdapter For(IComparer comparer)
+ {
+ return new ComparerAdapter(comparer);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps an IComparer<T>
+ /// </summary>
+ public static ComparisonAdapter For<T>(IComparer<T> comparer)
+ {
+ return new ComparerAdapter<T>(comparer);
+ }
+
+ /// <summary>
+ /// Returns a ComparisonAdapter that wraps a Comparison<T>
+ /// </summary>
+ public static ComparisonAdapter For<T>(Comparison<T> comparer)
+ {
+ return new ComparisonAdapterForComparison<T>(comparer);
+ }
+#endif
+
+ /// <summary>
+ /// Compares two objects
+ /// </summary>
+ public abstract int Compare(object expected, object actual);
+
+ class DefaultComparisonAdapter : ComparerAdapter
+ {
+ /// <summary>
+ /// Construct a default ComparisonAdapter
+ /// </summary>
+ public DefaultComparisonAdapter() : base( NUnitComparer.Default ) { }
+ }
+
+ class ComparerAdapter : ComparisonAdapter
+ {
+ private readonly IComparer comparer;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for an IComparer
+ /// </summary>
+ public ComparerAdapter(IComparer comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ /// <summary>
+ /// Compares two objects
+ /// </summary>
+ /// <param name="expected"></param>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override int Compare(object expected, object actual)
+ {
+ return comparer.Compare(expected, actual);
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// ComparisonAdapter<T> extends ComparisonAdapter and
+ /// allows use of an IComparer<T> or Comparison<T>
+ /// to actually perform the comparison.
+ /// </summary>
+ class ComparerAdapter<T> : ComparisonAdapter
+ {
+ private readonly IComparer<T> comparer;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for an IComparer<T>
+ /// </summary>
+ public ComparerAdapter(IComparer<T> comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ /// <summary>
+ /// Compare a Type T to an object
+ /// </summary>
+ public override int Compare(object expected, object actual)
+ {
+ if (!typeof(T).IsAssignableFrom(expected.GetType()))
+ throw new ArgumentException("Cannot compare " + expected.ToString());
+
+ if (!typeof(T).IsAssignableFrom(actual.GetType()))
+ throw new ArgumentException("Cannot compare to " + actual.ToString());
+
+ return comparer.Compare((T)expected, (T)actual);
+ }
+ }
+
+ class ComparisonAdapterForComparison<T> : ComparisonAdapter
+ {
+ private readonly Comparison<T> comparison;
+
+ /// <summary>
+ /// Construct a ComparisonAdapter for a Comparison<T>
+ /// </summary>
+ public ComparisonAdapterForComparison(Comparison<T> comparer)
+ {
+ this.comparison = comparer;
+ }
+
+ /// <summary>
+ /// Compare a Type T to an object
+ /// </summary>
+ public override int Compare(object expected, object actual)
+ {
+ if (!typeof(T).IsAssignableFrom(expected.GetType()))
+ throw new ArgumentException("Cannot compare " + expected.ToString());
+
+ if (!typeof(T).IsAssignableFrom(actual.GetType()))
+ throw new ArgumentException("Cannot compare to " + actual.ToString());
+
+ return comparison.Invoke((T)expected, (T)actual);
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ComparisonConstraint.cs b/external/guiunit/src/framework/Constraints/ComparisonConstraint.cs
new file mode 100755
index 0000000..8b7d678
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ComparisonConstraint.cs
@@ -0,0 +1,83 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for constraints that compare values to
+ /// determine if one is greater than, equal to or less than
+ /// the other. This class supplies the Using modifiers.
+ /// </summary>
+ public abstract class ComparisonConstraint : Constraint
+ {
+ /// <summary>
+ /// ComparisonAdapter to be used in making the comparison
+ /// </summary>
+ protected ComparisonAdapter comparer = ComparisonAdapter.Default;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class.
+ /// </summary>
+ public ComparisonConstraint(object arg) : base(arg) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class.
+ /// </summary>
+ public ComparisonConstraint(object arg1, object arg2) : base(arg1, arg2) { }
+
+ /// <summary>
+ /// Modifies the constraint to use an IComparer and returns self
+ /// </summary>
+ public ComparisonConstraint Using(IComparer comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Modifies the constraint to use an IComparer<T> and returns self
+ /// </summary>
+ public ComparisonConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+
+ /// <summary>
+ /// Modifies the constraint to use a Comparison<T> and returns self
+ /// </summary>
+ public ComparisonConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer = ComparisonAdapter.For(comparer);
+ return this;
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/Constraint.cs b/external/guiunit/src/framework/Constraints/Constraint.cs
new file mode 100755
index 0000000..cdf29b5
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Constraint.cs
@@ -0,0 +1,416 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Delegate used to delay evaluation of the actual value
+ /// to be used in evaluating a constraint
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public delegate T ActualValueDelegate<T>();
+#else
+ public delegate object ActualValueDelegate();
+#endif
+
+ /// <summary>
+ /// The Constraint class is the base of all built-in constraints
+ /// within NUnit. It provides the operator overloads used to combine
+ /// constraints.
+ /// </summary>
+ public abstract class Constraint : IResolveConstraint
+ {
+ #region UnsetObject Class
+ /// <summary>
+ /// Class used to detect any derived constraints
+ /// that fail to set the actual value in their
+ /// Matches override.
+ /// </summary>
+ private class UnsetObject
+ {
+ public override string ToString()
+ {
+ return "UNSET";
+ }
+ }
+ #endregion
+
+ #region Static and Instance Fields
+ /// <summary>
+ /// Static UnsetObject used to detect derived constraints
+ /// failing to set the actual value.
+ /// </summary>
+ protected static object UNSET = new UnsetObject();
+
+ /// <summary>
+ /// The actual value being tested against a constraint
+ /// </summary>
+ protected object actual = UNSET;
+
+ /// <summary>
+ /// The display name of this Constraint for use by ToString()
+ /// </summary>
+ private string displayName;
+
+ /// <summary>
+ /// Argument fields used by ToString();
+ /// </summary>
+ private readonly int argcnt;
+ private readonly object arg1;
+ private readonly object arg2;
+
+ /// <summary>
+ /// The builder holding this constraint
+ /// </summary>
+ private ConstraintBuilder builder;
+ #endregion
+
+ #region Constructors
+ /// <summary>
+ /// Construct a constraint with no arguments
+ /// </summary>
+ protected Constraint()
+ {
+ argcnt = 0;
+ }
+
+ /// <summary>
+ /// Construct a constraint with one argument
+ /// </summary>
+ protected Constraint(object arg)
+ {
+ argcnt = 1;
+ this.arg1 = arg;
+ }
+
+ /// <summary>
+ /// Construct a constraint with two arguments
+ /// </summary>
+ protected Constraint(object arg1, object arg2)
+ {
+ argcnt = 2;
+ this.arg1 = arg1;
+ this.arg2 = arg2;
+ }
+ #endregion
+
+ #region Set Containing ConstraintBuilder
+ /// <summary>
+ /// Sets the ConstraintBuilder holding this constraint
+ /// </summary>
+ internal void SetBuilder(ConstraintBuilder builder)
+ {
+ this.builder = builder;
+ }
+ #endregion
+
+ #region Properties
+ /// <summary>
+ /// The display name of this Constraint for use by ToString().
+ /// The default value is the name of the constraint with
+ /// trailing "Constraint" removed. Derived classes may set
+ /// this to another name in their constructors.
+ /// </summary>
+ protected string DisplayName
+ {
+ get
+ {
+ if (displayName == null)
+ {
+ displayName = this.GetType().Name.ToLower();
+ if (displayName.EndsWith("`1") || displayName.EndsWith("`2"))
+ displayName = displayName.Substring(0, displayName.Length - 2);
+ if (displayName.EndsWith("constraint"))
+ displayName = displayName.Substring(0, displayName.Length - 10);
+ }
+
+ return displayName;
+ }
+
+ set { displayName = value; }
+ }
+ #endregion
+
+ #region Abstract and Virtual Methods
+ /// <summary>
+ /// Write the failure message to the MessageWriter provided
+ /// as an argument. The default implementation simply passes
+ /// the constraint and the actual value to the writer, which
+ /// then displays the constraint description and the value.
+ ///
+ /// Constraints that need to provide additional details,
+ /// such as where the error occured can override this.
+ /// </summary>
+ /// <param name="writer">The MessageWriter on which to display the message</param>
+ public virtual void WriteMessageTo(MessageWriter writer)
+ {
+ writer.DisplayDifferences(this);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public abstract bool Matches(object actual);
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Test whether the constraint is satisfied by an
+ /// ActualValueDelegate that returns the value to be tested.
+ /// The default implementation simply evaluates the delegate
+ /// but derived classes may override it to provide for delayed
+ /// processing.
+ /// </summary>
+ /// <param name="del">An <see cref="ActualValueDelegate{T}" /></param>
+ /// <returns>True for success, false for failure</returns>
+ public virtual bool Matches<T>(ActualValueDelegate<T> del)
+ {
+#if NET_4_5
+ if (AsyncInvocationRegion.IsAsyncOperation(del))
+ using (var region = AsyncInvocationRegion.Create(del))
+ return Matches(region.WaitForPendingOperationsToComplete(del()));
+#endif
+ return Matches(del());
+ }
+#else
+ /// <summary>
+ /// Test whether the constraint is satisfied by an
+ /// ActualValueDelegate that returns the value to be tested.
+ /// The default implementation simply evaluates the delegate
+ /// but derived classes may override it to provide for delayed
+ /// processing.
+ /// </summary>
+ /// <param name="del">An <see cref="ActualValueDelegate" /></param>
+ /// <returns>True for success, false for failure</returns>
+ public virtual bool Matches(ActualValueDelegate del)
+ {
+ return Matches(del());
+ }
+#endif
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given reference.
+ /// The default implementation simply dereferences the value but
+ /// derived classes may override it to provide for delayed processing.
+ /// </summary>
+ /// <param name="actual">A reference to the value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+#if CLR_2_0 || CLR_4_0
+ public virtual bool Matches<T>(ref T actual)
+#else
+ public virtual bool Matches(ref bool actual)
+#endif
+ {
+ return Matches(actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public abstract void WriteDescriptionTo(MessageWriter writer);
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public virtual void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(actual);
+ }
+ #endregion
+
+ #region ToString Override
+ /// <summary>
+ /// Default override of ToString returns the constraint DisplayName
+ /// followed by any arguments within angle brackets.
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString()
+ {
+ string rep = GetStringRepresentation();
+
+ return this.builder == null ? rep : string.Format("<unresolved {0}>", rep);
+ }
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected virtual string GetStringRepresentation()
+ {
+ switch (argcnt)
+ {
+ default:
+ case 0:
+ return string.Format("<{0}>", DisplayName);
+ case 1:
+ return string.Format("<{0} {1}>", DisplayName, _displayable(arg1));
+ case 2:
+ return string.Format("<{0} {1} {2}>", DisplayName, _displayable(arg1), _displayable(arg2));
+ }
+ }
+
+ private static string _displayable(object o)
+ {
+ if (o == null) return "null";
+
+ string fmt = o is string ? "\"{0}\"" : "{0}";
+ return string.Format(System.Globalization.CultureInfo.InvariantCulture, fmt, o);
+ }
+ #endregion
+
+ #region Operator Overloads
+ /// <summary>
+ /// This operator creates a constraint that is satisfied only if both
+ /// argument constraints are satisfied.
+ /// </summary>
+ public static Constraint operator &(Constraint left, Constraint right)
+ {
+ IResolveConstraint l = (IResolveConstraint)left;
+ IResolveConstraint r = (IResolveConstraint)right;
+ return new AndConstraint(l.Resolve(), r.Resolve());
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if either
+ /// of the argument constraints is satisfied.
+ /// </summary>
+ public static Constraint operator |(Constraint left, Constraint right)
+ {
+ IResolveConstraint l = (IResolveConstraint)left;
+ IResolveConstraint r = (IResolveConstraint)right;
+ return new OrConstraint(l.Resolve(), r.Resolve());
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if the
+ /// argument constraint is not satisfied.
+ /// </summary>
+ public static Constraint operator !(Constraint constraint)
+ {
+ IResolveConstraint r = constraint as IResolveConstraint;
+ return new NotConstraint(r == null ? new NullConstraint() : r.Resolve());
+ }
+ #endregion
+
+ #region Binary Operators
+ /// <summary>
+ /// Returns a ConstraintExpression by appending And
+ /// to the current constraint.
+ /// </summary>
+ public ConstraintExpression And
+ {
+ get
+ {
+ ConstraintBuilder builder = this.builder;
+ if (builder == null)
+ {
+ builder = new ConstraintBuilder();
+ builder.Append(this);
+ }
+
+ builder.Append(new AndOperator());
+
+ return new ConstraintExpression(builder);
+ }
+ }
+
+ /// <summary>
+ /// Returns a ConstraintExpression by appending And
+ /// to the current constraint.
+ /// </summary>
+ public ConstraintExpression With
+ {
+ get { return this.And; }
+ }
+
+ /// <summary>
+ /// Returns a ConstraintExpression by appending Or
+ /// to the current constraint.
+ /// </summary>
+ public ConstraintExpression Or
+ {
+ get
+ {
+ ConstraintBuilder builder = this.builder;
+ if (builder == null)
+ {
+ builder = new ConstraintBuilder();
+ builder.Append(this);
+ }
+
+ builder.Append(new OrOperator());
+
+ return new ConstraintExpression(builder);
+ }
+ }
+ #endregion
+
+ #region After Modifier
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Returns a DelayedConstraint with the specified delay time.
+ /// </summary>
+ /// <param name="delayInMilliseconds">The delay in milliseconds.</param>
+ /// <returns></returns>
+ public DelayedConstraint After(int delayInMilliseconds)
+ {
+ return new DelayedConstraint(
+ builder == null ? this : builder.Resolve(),
+ delayInMilliseconds);
+ }
+
+ /// <summary>
+ /// Returns a DelayedConstraint with the specified delay time
+ /// and polling interval.
+ /// </summary>
+ /// <param name="delayInMilliseconds">The delay in milliseconds.</param>
+ /// <param name="pollingInterval">The interval at which to test the constraint.</param>
+ /// <returns></returns>
+ public DelayedConstraint After(int delayInMilliseconds, int pollingInterval)
+ {
+ return new DelayedConstraint(
+ builder == null ? this : builder.Resolve(),
+ delayInMilliseconds,
+ pollingInterval);
+ }
+#endif
+
+ #endregion
+
+ #region IResolveConstraint Members
+ Constraint IResolveConstraint.Resolve()
+ {
+ return builder == null ? this : builder.Resolve();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ConstraintBuilder.cs b/external/guiunit/src/framework/Constraints/ConstraintBuilder.cs
new file mode 100755
index 0000000..7d6af14
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ConstraintBuilder.cs
@@ -0,0 +1,286 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ConstraintBuilder maintains the stacks that are used in
+ /// processing a ConstraintExpression. An OperatorStack
+ /// is used to hold operators that are waiting for their
+ /// operands to be reognized. a ConstraintStack holds
+ /// input constraints as well as the results of each
+ /// operator applied.
+ /// </summary>
+ public class ConstraintBuilder
+ {
+ #region Nested Operator Stack Class
+ /// <summary>
+ /// OperatorStack is a type-safe stack for holding ConstraintOperators
+ /// </summary>
+ public class OperatorStack
+ {
+#if CLR_2_0 || CLR_4_0
+ private Stack<ConstraintOperator> stack = new Stack<ConstraintOperator>();
+#else
+ private Stack stack = new Stack();
+#endif
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:OperatorStack"/> class.
+ /// </summary>
+ /// <param name="builder">The builder.</param>
+ public OperatorStack(ConstraintBuilder builder)
+ {
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this <see cref="T:OpStack"/> is empty.
+ /// </summary>
+ /// <value><c>true</c> if empty; otherwise, <c>false</c>.</value>
+ public bool Empty
+ {
+ get { return stack.Count == 0; }
+ }
+
+ /// <summary>
+ /// Gets the topmost operator without modifying the stack.
+ /// </summary>
+ /// <value>The top.</value>
+ public ConstraintOperator Top
+ {
+ get { return (ConstraintOperator)stack.Peek(); }
+ }
+
+ /// <summary>
+ /// Pushes the specified operator onto the stack.
+ /// </summary>
+ /// <param name="op">The op.</param>
+ public void Push(ConstraintOperator op)
+ {
+ stack.Push(op);
+ }
+
+ /// <summary>
+ /// Pops the topmost operator from the stack.
+ /// </summary>
+ /// <returns></returns>
+ public ConstraintOperator Pop()
+ {
+ return (ConstraintOperator)stack.Pop();
+ }
+ }
+ #endregion
+
+ #region Nested Constraint Stack Class
+ /// <summary>
+ /// ConstraintStack is a type-safe stack for holding Constraints
+ /// </summary>
+ public class ConstraintStack
+ {
+#if CLR_2_0 || CLR_4_0
+ private Stack<Constraint> stack = new Stack<Constraint>();
+#else
+ private Stack stack = new Stack();
+#endif
+ private ConstraintBuilder builder;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintStack"/> class.
+ /// </summary>
+ /// <param name="builder">The builder.</param>
+ public ConstraintStack(ConstraintBuilder builder)
+ {
+ this.builder = builder;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this <see cref="T:ConstraintStack"/> is empty.
+ /// </summary>
+ /// <value><c>true</c> if empty; otherwise, <c>false</c>.</value>
+ public bool Empty
+ {
+ get { return stack.Count == 0; }
+ }
+
+ /// <summary>
+ /// Gets the topmost constraint without modifying the stack.
+ /// </summary>
+ /// <value>The topmost constraint</value>
+ public Constraint Top
+ {
+ get { return (Constraint)stack.Peek(); }
+ }
+
+ /// <summary>
+ /// Pushes the specified constraint. As a side effect,
+ /// the constraint's builder field is set to the
+ /// ConstraintBuilder owning this stack.
+ /// </summary>
+ /// <param name="constraint">The constraint.</param>
+ public void Push(Constraint constraint)
+ {
+ stack.Push(constraint);
+ constraint.SetBuilder( this.builder );
+ }
+
+ /// <summary>
+ /// Pops this topmost constrait from the stack.
+ /// As a side effect, the constraint's builder
+ /// field is set to null.
+ /// </summary>
+ /// <returns></returns>
+ public Constraint Pop()
+ {
+ Constraint constraint = (Constraint)stack.Pop();
+ constraint.SetBuilder( null );
+ return constraint;
+ }
+ }
+ #endregion
+
+ #region Instance Fields
+ private readonly OperatorStack ops;
+
+ private readonly ConstraintStack constraints;
+
+ private object lastPushed;
+ #endregion
+
+ #region Constructor
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintBuilder"/> class.
+ /// </summary>
+ public ConstraintBuilder()
+ {
+ this.ops = new OperatorStack(this);
+ this.constraints = new ConstraintStack(this);
+ }
+ #endregion
+
+ #region Properties
+ /// <summary>
+ /// Gets a value indicating whether this instance is resolvable.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is resolvable; otherwise, <c>false</c>.
+ /// </value>
+ public bool IsResolvable
+ {
+ get { return lastPushed is Constraint || lastPushed is SelfResolvingOperator; }
+ }
+ #endregion
+
+ #region Public Methods
+ /// <summary>
+ /// Appends the specified operator to the expression by first
+ /// reducing the operator stack and then pushing the new
+ /// operator on the stack.
+ /// </summary>
+ /// <param name="op">The operator to push.</param>
+ public void Append(ConstraintOperator op)
+ {
+ op.LeftContext = lastPushed;
+ if (lastPushed is ConstraintOperator)
+ SetTopOperatorRightContext(op);
+
+ // Reduce any lower precedence operators
+ ReduceOperatorStack(op.LeftPrecedence);
+
+ ops.Push(op);
+ lastPushed = op;
+ }
+
+ /// <summary>
+ /// Appends the specified constraint to the expresson by pushing
+ /// it on the constraint stack.
+ /// </summary>
+ /// <param name="constraint">The constraint to push.</param>
+ public void Append(Constraint constraint)
+ {
+ if (lastPushed is ConstraintOperator)
+ SetTopOperatorRightContext(constraint);
+
+ constraints.Push(constraint);
+ lastPushed = constraint;
+ constraint.SetBuilder( this );
+ }
+
+ /// <summary>
+ /// Sets the top operator right context.
+ /// </summary>
+ /// <param name="rightContext">The right context.</param>
+ private void SetTopOperatorRightContext(object rightContext)
+ {
+ // Some operators change their precedence based on
+ // the right context - save current precedence.
+ int oldPrecedence = ops.Top.LeftPrecedence;
+
+ ops.Top.RightContext = rightContext;
+
+ // If the precedence increased, we may be able to
+ // reduce the region of the stack below the operator
+ if (ops.Top.LeftPrecedence > oldPrecedence)
+ {
+ ConstraintOperator changedOp = ops.Pop();
+ ReduceOperatorStack(changedOp.LeftPrecedence);
+ ops.Push(changedOp);
+ }
+ }
+
+ /// <summary>
+ /// Reduces the operator stack until the topmost item
+ /// precedence is greater than or equal to the target precedence.
+ /// </summary>
+ /// <param name="targetPrecedence">The target precedence.</param>
+ private void ReduceOperatorStack(int targetPrecedence)
+ {
+ while (!ops.Empty && ops.Top.RightPrecedence < targetPrecedence)
+ ops.Pop().Reduce(constraints);
+ }
+
+ /// <summary>
+ /// Resolves this instance, returning a Constraint. If the builder
+ /// is not currently in a resolvable state, an exception is thrown.
+ /// </summary>
+ /// <returns>The resolved constraint</returns>
+ public Constraint Resolve()
+ {
+ if (!IsResolvable)
+ throw new InvalidOperationException("A partial expression may not be resolved");
+
+ while (!ops.Empty)
+ {
+ ConstraintOperator op = ops.Pop();
+ op.Reduce(constraints);
+ }
+
+ return constraints.Pop();
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ConstraintExpression.cs b/external/guiunit/src/framework/Constraints/ConstraintExpression.cs
new file mode 100755
index 0000000..53a9180
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ConstraintExpression.cs
@@ -0,0 +1,803 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ConstraintExpression represents a compound constraint in the
+ /// process of being constructed from a series of syntactic elements.
+ ///
+ /// Individual elements are appended to the expression as they are
+ /// reognized. Once an actual Constraint is appended, the expression
+ /// returns a resolvable Constraint.
+ /// </summary>
+ public class ConstraintExpression : ConstraintExpressionBase
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintExpression"/> class.
+ /// </summary>
+ public ConstraintExpression() { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintExpression"/>
+ /// class passing in a ConstraintBuilder, which may be pre-populated.
+ /// </summary>
+ /// <param name="builder">The builder.</param>
+ public ConstraintExpression(ConstraintBuilder builder)
+ : base( builder ) { }
+
+ #region Not
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public ConstraintExpression Not
+ {
+ get { return this.Append(new NotOperator()); }
+ }
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public ConstraintExpression No
+ {
+ get { return this.Append(new NotOperator()); }
+ }
+
+ #endregion
+
+ #region All
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them succeed.
+ /// </summary>
+ public ConstraintExpression All
+ {
+ get { return this.Append(new AllOperator()); }
+ }
+
+ #endregion
+
+ #region Some
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if at least one of them succeeds.
+ /// </summary>
+ public ConstraintExpression Some
+ {
+ get { return this.Append(new SomeOperator()); }
+ }
+
+ #endregion
+
+ #region None
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them fail.
+ /// </summary>
+ public ConstraintExpression None
+ {
+ get { return this.Append(new NoneOperator()); }
+ }
+
+ #endregion
+
+ #region Exactly(n)
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding only if a specified number of them succeed.
+ /// </summary>
+ public ConstraintExpression Exactly(int expectedCount)
+ {
+ return this.Append(new ExactCountOperator(expectedCount));
+ }
+
+ #endregion
+
+ #region Property
+
+ /// <summary>
+ /// Returns a new PropertyConstraintExpression, which will either
+ /// test for the existence of the named property on the object
+ /// being tested or apply any following constraint to that property.
+ /// </summary>
+ public ResolvableConstraintExpression Property(string name)
+ {
+ return this.Append(new PropOperator(name));
+ }
+
+ #endregion
+
+ #region Length
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Length property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Length
+ {
+ get { return Property("Length"); }
+ }
+
+ #endregion
+
+ #region Count
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Count property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Count
+ {
+ get { return Property("Count"); }
+ }
+
+ #endregion
+
+ #region Message
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Message property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Message
+ {
+ get { return Property("Message"); }
+ }
+
+ #endregion
+
+ #region InnerException
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the InnerException property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression InnerException
+ {
+ get { return Property("InnerException"); }
+ }
+
+ #endregion
+
+ #region Attribute
+
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public ResolvableConstraintExpression Attribute(Type expectedType)
+ {
+ return this.Append(new AttributeOperator(expectedType));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public ResolvableConstraintExpression Attribute<T>()
+ {
+ return Attribute(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region With
+
+ /// <summary>
+ /// With is currently a NOP - reserved for future use.
+ /// </summary>
+ public ConstraintExpression With
+ {
+ get { return this.Append(new WithOperator()); }
+ }
+
+ #endregion
+
+ #region Matches
+
+ /// <summary>
+ /// Returns the constraint provided as an argument - used to allow custom
+ /// custom constraints to easily participate in the syntax.
+ /// </summary>
+ public Constraint Matches(Constraint constraint)
+ {
+ return this.Append(constraint);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns the constraint provided as an argument - used to allow custom
+ /// custom constraints to easily participate in the syntax.
+ /// </summary>
+ public Constraint Matches<T>(Predicate<T> predicate)
+ {
+ return this.Append(new PredicateConstraint<T>(predicate));
+ }
+#endif
+
+ #endregion
+
+ #region Null
+
+ /// <summary>
+ /// Returns a constraint that tests for null
+ /// </summary>
+ public NullConstraint Null
+ {
+ get { return (NullConstraint)this.Append(new NullConstraint()); }
+ }
+
+ #endregion
+
+ #region True
+
+ /// <summary>
+ /// Returns a constraint that tests for True
+ /// </summary>
+ public TrueConstraint True
+ {
+ get { return (TrueConstraint)this.Append(new TrueConstraint()); }
+ }
+
+ #endregion
+
+ #region False
+
+ /// <summary>
+ /// Returns a constraint that tests for False
+ /// </summary>
+ public FalseConstraint False
+ {
+ get { return (FalseConstraint)this.Append(new FalseConstraint()); }
+ }
+
+ #endregion
+
+ #region Positive
+
+ /// <summary>
+ /// Returns a constraint that tests for a positive value
+ /// </summary>
+ public GreaterThanConstraint Positive
+ {
+ get { return (GreaterThanConstraint)this.Append(new GreaterThanConstraint(0)); }
+ }
+
+ #endregion
+
+ #region Negative
+
+ /// <summary>
+ /// Returns a constraint that tests for a negative value
+ /// </summary>
+ public LessThanConstraint Negative
+ {
+ get { return (LessThanConstraint)this.Append(new LessThanConstraint(0)); }
+ }
+
+ #endregion
+
+ #region NaN
+
+ /// <summary>
+ /// Returns a constraint that tests for NaN
+ /// </summary>
+ public NaNConstraint NaN
+ {
+ get { return (NaNConstraint)this.Append(new NaNConstraint()); }
+ }
+
+ #endregion
+
+ #region Empty
+
+ /// <summary>
+ /// Returns a constraint that tests for empty
+ /// </summary>
+ public EmptyConstraint Empty
+ {
+ get { return (EmptyConstraint)this.Append(new EmptyConstraint()); }
+ }
+
+ #endregion
+
+ #region Unique
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection
+ /// contains all unique items.
+ /// </summary>
+ public UniqueItemsConstraint Unique
+ {
+ get { return (UniqueItemsConstraint)this.Append(new UniqueItemsConstraint()); }
+ }
+
+ #endregion
+
+ #region BinarySerializable
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in binary format.
+ /// </summary>
+ public BinarySerializableConstraint BinarySerializable
+ {
+ get { return (BinarySerializableConstraint)this.Append(new BinarySerializableConstraint()); }
+ }
+#endif
+
+ #endregion
+
+ #region XmlSerializable
+
+#if !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in xml format.
+ /// </summary>
+ public XmlSerializableConstraint XmlSerializable
+ {
+ get { return (XmlSerializableConstraint)this.Append(new XmlSerializableConstraint()); }
+ }
+#endif
+
+ #endregion
+
+ #region EqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests two items for equality
+ /// </summary>
+ public EqualConstraint EqualTo(object expected)
+ {
+ return (EqualConstraint)this.Append(new EqualConstraint(expected));
+ }
+
+ #endregion
+
+ #region SameAs
+
+ /// <summary>
+ /// Returns a constraint that tests that two references are the same object
+ /// </summary>
+ public SameAsConstraint SameAs(object expected)
+ {
+ return (SameAsConstraint)this.Append(new SameAsConstraint(expected));
+ }
+
+ #endregion
+
+ #region GreaterThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than the suppled argument
+ /// </summary>
+ public GreaterThanConstraint GreaterThan(object expected)
+ {
+ return (GreaterThanConstraint)this.Append(new GreaterThanConstraint(expected));
+ }
+
+ #endregion
+
+ #region GreaterThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public GreaterThanOrEqualConstraint GreaterThanOrEqualTo(object expected)
+ {
+ return (GreaterThanOrEqualConstraint)this.Append(new GreaterThanOrEqualConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public GreaterThanOrEqualConstraint AtLeast(object expected)
+ {
+ return (GreaterThanOrEqualConstraint)this.Append(new GreaterThanOrEqualConstraint(expected));
+ }
+
+ #endregion
+
+ #region LessThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than the suppled argument
+ /// </summary>
+ public LessThanConstraint LessThan(object expected)
+ {
+ return (LessThanConstraint)this.Append(new LessThanConstraint(expected));
+ }
+
+ #endregion
+
+ #region LessThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public LessThanOrEqualConstraint LessThanOrEqualTo(object expected)
+ {
+ return (LessThanOrEqualConstraint)this.Append(new LessThanOrEqualConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public LessThanOrEqualConstraint AtMost(object expected)
+ {
+ return (LessThanOrEqualConstraint)this.Append(new LessThanOrEqualConstraint(expected));
+ }
+
+ #endregion
+
+ #region TypeOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public ExactTypeConstraint TypeOf(Type expectedType)
+ {
+ return (ExactTypeConstraint)this.Append(new ExactTypeConstraint(expectedType));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public ExactTypeConstraint TypeOf<T>()
+ {
+ return (ExactTypeConstraint)this.Append(new ExactTypeConstraint(typeof(T)));
+ }
+#endif
+
+ #endregion
+
+ #region InstanceOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public InstanceOfTypeConstraint InstanceOf(Type expectedType)
+ {
+ return (InstanceOfTypeConstraint)this.Append(new InstanceOfTypeConstraint(expectedType));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public InstanceOfTypeConstraint InstanceOf<T>()
+ {
+ return (InstanceOfTypeConstraint)this.Append(new InstanceOfTypeConstraint(typeof(T)));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableFrom
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableFromConstraint AssignableFrom(Type expectedType)
+ {
+ return (AssignableFromConstraint)this.Append(new AssignableFromConstraint(expectedType));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableFromConstraint AssignableFrom<T>()
+ {
+ return (AssignableFromConstraint)this.Append(new AssignableFromConstraint(typeof(T)));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableToConstraint AssignableTo(Type expectedType)
+ {
+ return (AssignableToConstraint)this.Append(new AssignableToConstraint(expectedType));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableToConstraint AssignableTo<T>()
+ {
+ return (AssignableToConstraint)this.Append(new AssignableToConstraint(typeof(T)));
+ }
+#endif
+
+ #endregion
+
+ #region EquivalentTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a collection containing the same elements as the
+ /// collection supplied as an argument.
+ /// </summary>
+ public CollectionEquivalentConstraint EquivalentTo(IEnumerable expected)
+ {
+ return (CollectionEquivalentConstraint)this.Append(new CollectionEquivalentConstraint(expected));
+ }
+
+ #endregion
+
+ #region SubsetOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a subset of the collection supplied as an argument.
+ /// </summary>
+ public CollectionSubsetConstraint SubsetOf(IEnumerable expected)
+ {
+ return (CollectionSubsetConstraint)this.Append(new CollectionSubsetConstraint(expected));
+ }
+
+ #endregion
+
+ #region Ordered
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection is ordered
+ /// </summary>
+ public CollectionOrderedConstraint Ordered
+ {
+ get { return (CollectionOrderedConstraint)this.Append(new CollectionOrderedConstraint()); }
+ }
+
+ #endregion
+
+ #region Member
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public CollectionContainsConstraint Member(object expected)
+ {
+ return (CollectionContainsConstraint)this.Append(new CollectionContainsConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public CollectionContainsConstraint Contains(object expected)
+ {
+ return (CollectionContainsConstraint)this.Append(new CollectionContainsConstraint(expected));
+ }
+
+ #endregion
+
+ #region Contains
+
+ /// <summary>
+ /// Returns a new ContainsConstraint. This constraint
+ /// will, in turn, make use of the appropriate second-level
+ /// constraint, depending on the type of the actual argument.
+ /// This overload is only used if the item sought is a string,
+ /// since any other type implies that we are looking for a
+ /// collection member.
+ /// </summary>
+ public ContainsConstraint Contains(string expected)
+ {
+ return (ContainsConstraint)this.Append(new ContainsConstraint(expected));
+ }
+
+ #endregion
+
+ #region StringContaining
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public SubstringConstraint StringContaining(string expected)
+ {
+ return (SubstringConstraint)this.Append(new SubstringConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public SubstringConstraint ContainsSubstring(string expected)
+ {
+ return (SubstringConstraint)this.Append(new SubstringConstraint(expected));
+ }
+
+ #endregion
+
+ #region StartsWith
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public StartsWithConstraint StartsWith(string expected)
+ {
+ return (StartsWithConstraint)this.Append(new StartsWithConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public StartsWithConstraint StringStarting(string expected)
+ {
+ return (StartsWithConstraint)this.Append(new StartsWithConstraint(expected));
+ }
+
+ #endregion
+
+ #region EndsWith
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public EndsWithConstraint EndsWith(string expected)
+ {
+ return (EndsWithConstraint)this.Append(new EndsWithConstraint(expected));
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public EndsWithConstraint StringEnding(string expected)
+ {
+ return (EndsWithConstraint)this.Append(new EndsWithConstraint(expected));
+ }
+
+ #endregion
+
+ #region Matches
+
+#if !NETCF
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value matches the regular expression supplied as an argument.
+ /// </summary>
+ public RegexConstraint Matches(string pattern)
+ {
+ return (RegexConstraint)this.Append(new RegexConstraint(pattern));
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value matches the regular expression supplied as an argument.
+ /// </summary>
+ public RegexConstraint StringMatching(string pattern)
+ {
+ return (RegexConstraint)this.Append(new RegexConstraint(pattern));
+ }
+#endif
+
+ #endregion
+
+ #region SamePath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same as an expected path after canonicalization.
+ /// </summary>
+ public SamePathConstraint SamePath(string expected)
+ {
+ return (SamePathConstraint)this.Append(new SamePathConstraint(expected));
+ }
+
+ #endregion
+
+ #region SubPath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same path or under an expected path after canonicalization.
+ /// </summary>
+ public SubPathConstraint SubPath(string expected)
+ {
+ return (SubPathConstraint)this.Append(new SubPathConstraint(expected));
+ }
+
+ #endregion
+
+ #region SamePathOrUnder
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same path or under an expected path after canonicalization.
+ /// </summary>
+ public SamePathOrUnderConstraint SamePathOrUnder(string expected)
+ {
+ return (SamePathOrUnderConstraint)this.Append(new SamePathOrUnderConstraint(expected));
+ }
+
+ #endregion
+
+ #region InRange
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public RangeConstraint<T> InRange<T>(T from, T to) where T : IComparable<T>
+ {
+ return (RangeConstraint<T>)this.Append(new RangeConstraint<T>(from, to));
+ }
+#else
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public RangeConstraint InRange(IComparable from, IComparable to)
+ {
+ return (RangeConstraint)this.Append(new RangeConstraint(from, to));
+ }
+#endif
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ConstraintExpressionBase.cs b/external/guiunit/src/framework/Constraints/ConstraintExpressionBase.cs
new file mode 100755
index 0000000..bbd892e
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ConstraintExpressionBase.cs
@@ -0,0 +1,115 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ConstraintExpressionBase is the abstract base class for the
+ /// ConstraintExpression class, which represents a
+ /// compound constraint in the process of being constructed
+ /// from a series of syntactic elements.
+ ///
+ /// NOTE: ConstraintExpressionBase is separate because the
+ /// ConstraintExpression class was generated in earlier
+ /// versions of NUnit. The two classes may be combined
+ /// in a future version.
+ /// </summary>
+ public abstract class ConstraintExpressionBase
+ {
+ #region Instance Fields
+ /// <summary>
+ /// The ConstraintBuilder holding the elements recognized so far
+ /// </summary>
+ protected ConstraintBuilder builder;
+ #endregion
+
+ #region Constructors
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/> class.
+ /// </summary>
+ public ConstraintExpressionBase()
+ {
+ this.builder = new ConstraintBuilder();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/>
+ /// class passing in a ConstraintBuilder, which may be pre-populated.
+ /// </summary>
+ /// <param name="builder">The builder.</param>
+ public ConstraintExpressionBase(ConstraintBuilder builder)
+ {
+ this.builder = builder;
+ }
+ #endregion
+
+ #region ToString()
+ /// <summary>
+ /// Returns a string representation of the expression as it
+ /// currently stands. This should only be used for testing,
+ /// since it has the side-effect of resolving the expression.
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString()
+ {
+ return builder.Resolve().ToString();
+ }
+ #endregion
+
+ #region Append Methods
+ /// <summary>
+ /// Appends an operator to the expression and returns the
+ /// resulting expression itself.
+ /// </summary>
+ public ConstraintExpression Append(ConstraintOperator op)
+ {
+ builder.Append(op);
+ return (ConstraintExpression)this;
+ }
+
+ /// <summary>
+ /// Appends a self-resolving operator to the expression and
+ /// returns a new ResolvableConstraintExpression.
+ /// </summary>
+ public ResolvableConstraintExpression Append(SelfResolvingOperator op)
+ {
+ builder.Append(op);
+ return new ResolvableConstraintExpression(builder);
+ }
+
+ /// <summary>
+ /// Appends a constraint to the expression and returns that
+ /// constraint, which is associated with the current state
+ /// of the expression being built.
+ /// </summary>
+ public Constraint Append(Constraint constraint)
+ {
+ builder.Append(constraint);
+ return constraint;
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ConstraintFactory.cs b/external/guiunit/src/framework/Constraints/ConstraintFactory.cs
new file mode 100755
index 0000000..84dd449
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ConstraintFactory.cs
@@ -0,0 +1,804 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Helper class with properties and methods that supply
+ /// a number of constraints used in Asserts.
+ /// </summary>
+ public class ConstraintFactory
+ {
+ #region Not
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public ConstraintExpression Not
+ {
+ get { return Is.Not; }
+ }
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public ConstraintExpression No
+ {
+ get { return Has.No; }
+ }
+
+ #endregion
+
+ #region All
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them succeed.
+ /// </summary>
+ public ConstraintExpression All
+ {
+ get { return Is.All; }
+ }
+
+ #endregion
+
+ #region Some
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if at least one of them succeeds.
+ /// </summary>
+ public ConstraintExpression Some
+ {
+ get { return Has.Some; }
+ }
+
+ #endregion
+
+ #region None
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them fail.
+ /// </summary>
+ public ConstraintExpression None
+ {
+ get { return Has.None; }
+ }
+
+ #endregion
+
+ #region Exactly(n)
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding only if a specified number of them succeed.
+ /// </summary>
+ public static ConstraintExpression Exactly(int expectedCount)
+ {
+ return Has.Exactly(expectedCount);
+ }
+
+ #endregion
+
+ #region Property
+
+ /// <summary>
+ /// Returns a new PropertyConstraintExpression, which will either
+ /// test for the existence of the named property on the object
+ /// being tested or apply any following constraint to that property.
+ /// </summary>
+ public ResolvableConstraintExpression Property(string name)
+ {
+ return Has.Property(name);
+ }
+
+ #endregion
+
+ #region Length
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Length property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Length
+ {
+ get { return Has.Length; }
+ }
+
+ #endregion
+
+ #region Count
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Count property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Count
+ {
+ get { return Has.Count; }
+ }
+
+ #endregion
+
+ #region Message
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Message property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression Message
+ {
+ get { return Has.Message; }
+ }
+
+ #endregion
+
+ #region InnerException
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the InnerException property of the object being tested.
+ /// </summary>
+ public ResolvableConstraintExpression InnerException
+ {
+ get { return Has.InnerException; }
+ }
+
+ #endregion
+
+ #region Attribute
+
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public ResolvableConstraintExpression Attribute(Type expectedType)
+ {
+ return Has.Attribute(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public ResolvableConstraintExpression Attribute<T>()
+ {
+ return Attribute(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region Null
+
+ /// <summary>
+ /// Returns a constraint that tests for null
+ /// </summary>
+ public NullConstraint Null
+ {
+ get { return new NullConstraint(); }
+ }
+
+ #endregion
+
+ #region True
+
+ /// <summary>
+ /// Returns a constraint that tests for True
+ /// </summary>
+ public TrueConstraint True
+ {
+ get { return new TrueConstraint(); }
+ }
+
+ #endregion
+
+ #region False
+
+ /// <summary>
+ /// Returns a constraint that tests for False
+ /// </summary>
+ public FalseConstraint False
+ {
+ get { return new FalseConstraint(); }
+ }
+
+ #endregion
+
+ #region Positive
+
+ /// <summary>
+ /// Returns a constraint that tests for a positive value
+ /// </summary>
+ public GreaterThanConstraint Positive
+ {
+ get { return new GreaterThanConstraint(0); }
+ }
+
+ #endregion
+
+ #region Negative
+
+ /// <summary>
+ /// Returns a constraint that tests for a negative value
+ /// </summary>
+ public LessThanConstraint Negative
+ {
+ get { return new LessThanConstraint(0); }
+ }
+
+ #endregion
+
+ #region NaN
+
+ /// <summary>
+ /// Returns a constraint that tests for NaN
+ /// </summary>
+ public NaNConstraint NaN
+ {
+ get { return new NaNConstraint(); }
+ }
+
+ #endregion
+
+ #region Empty
+
+ /// <summary>
+ /// Returns a constraint that tests for empty
+ /// </summary>
+ public EmptyConstraint Empty
+ {
+ get { return new EmptyConstraint(); }
+ }
+
+ #endregion
+
+ #region Unique
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection
+ /// contains all unique items.
+ /// </summary>
+ public UniqueItemsConstraint Unique
+ {
+ get { return new UniqueItemsConstraint(); }
+ }
+
+ #endregion
+
+ #region BinarySerializable
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in binary format.
+ /// </summary>
+ public BinarySerializableConstraint BinarySerializable
+ {
+ get { return new BinarySerializableConstraint(); }
+ }
+#endif
+
+ #endregion
+
+ #region XmlSerializable
+
+#if !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in xml format.
+ /// </summary>
+ public XmlSerializableConstraint XmlSerializable
+ {
+ get { return new XmlSerializableConstraint(); }
+ }
+#endif
+
+ #endregion
+
+ #region EqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests two items for equality
+ /// </summary>
+ public EqualConstraint EqualTo(object expected)
+ {
+ return new EqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region SameAs
+
+ /// <summary>
+ /// Returns a constraint that tests that two references are the same object
+ /// </summary>
+ public SameAsConstraint SameAs(object expected)
+ {
+ return new SameAsConstraint(expected);
+ }
+
+ #endregion
+
+ #region GreaterThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than the suppled argument
+ /// </summary>
+ public GreaterThanConstraint GreaterThan(object expected)
+ {
+ return new GreaterThanConstraint(expected);
+ }
+
+ #endregion
+
+ #region GreaterThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public GreaterThanOrEqualConstraint GreaterThanOrEqualTo(object expected)
+ {
+ return new GreaterThanOrEqualConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public GreaterThanOrEqualConstraint AtLeast(object expected)
+ {
+ return new GreaterThanOrEqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region LessThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than the suppled argument
+ /// </summary>
+ public LessThanConstraint LessThan(object expected)
+ {
+ return new LessThanConstraint(expected);
+ }
+
+ #endregion
+
+ #region LessThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public LessThanOrEqualConstraint LessThanOrEqualTo(object expected)
+ {
+ return new LessThanOrEqualConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public LessThanOrEqualConstraint AtMost(object expected)
+ {
+ return new LessThanOrEqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region TypeOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public ExactTypeConstraint TypeOf(Type expectedType)
+ {
+ return new ExactTypeConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public ExactTypeConstraint TypeOf<T>()
+ {
+ return new ExactTypeConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region InstanceOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public InstanceOfTypeConstraint InstanceOf(Type expectedType)
+ {
+ return new InstanceOfTypeConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public InstanceOfTypeConstraint InstanceOf<T>()
+ {
+ return new InstanceOfTypeConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableFrom
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableFromConstraint AssignableFrom(Type expectedType)
+ {
+ return new AssignableFromConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableFromConstraint AssignableFrom<T>()
+ {
+ return new AssignableFromConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableToConstraint AssignableTo(Type expectedType)
+ {
+ return new AssignableToConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public AssignableToConstraint AssignableTo<T>()
+ {
+ return new AssignableToConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region EquivalentTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a collection containing the same elements as the
+ /// collection supplied as an argument.
+ /// </summary>
+ public CollectionEquivalentConstraint EquivalentTo(IEnumerable expected)
+ {
+ return new CollectionEquivalentConstraint(expected);
+ }
+
+ #endregion
+
+ #region SubsetOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a subset of the collection supplied as an argument.
+ /// </summary>
+ public CollectionSubsetConstraint SubsetOf(IEnumerable expected)
+ {
+ return new CollectionSubsetConstraint(expected);
+ }
+
+ #endregion
+
+ #region Ordered
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection is ordered
+ /// </summary>
+ public CollectionOrderedConstraint Ordered
+ {
+ get { return new CollectionOrderedConstraint(); }
+ }
+
+ #endregion
+
+ #region Member
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public CollectionContainsConstraint Member(object expected)
+ {
+ return new CollectionContainsConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public CollectionContainsConstraint Contains(object expected)
+ {
+ return new CollectionContainsConstraint(expected);
+ }
+
+ #endregion
+
+ #region Contains
+
+ /// <summary>
+ /// Returns a new ContainsConstraint. This constraint
+ /// will, in turn, make use of the appropriate second-level
+ /// constraint, depending on the type of the actual argument.
+ /// This overload is only used if the item sought is a string,
+ /// since any other type implies that we are looking for a
+ /// collection member.
+ /// </summary>
+ public ContainsConstraint Contains(string expected)
+ {
+ return new ContainsConstraint(expected);
+ }
+
+ #endregion
+
+ #region StringContaining
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public SubstringConstraint StringContaining(string expected)
+ {
+ return new SubstringConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public SubstringConstraint ContainsSubstring(string expected)
+ {
+ return new SubstringConstraint(expected);
+ }
+
+ #endregion
+
+ #region DoesNotContain
+
+ /// <summary>
+ /// Returns a constraint that fails if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public SubstringConstraint DoesNotContain(string expected)
+ {
+ return new ConstraintExpression().Not.ContainsSubstring(expected);
+ }
+
+ #endregion
+
+ #region StartsWith
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public StartsWithConstraint StartsWith(string expected)
+ {
+ return new StartsWithConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public StartsWithConstraint StringStarting(string expected)
+ {
+ return new StartsWithConstraint(expected);
+ }
+
+ #endregion
+
+ #region DoesNotStartWith
+
+ /// <summary>
+ /// Returns a constraint that fails if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public StartsWithConstraint DoesNotStartWith(string expected)
+ {
+ return new ConstraintExpression().Not.StartsWith(expected);
+ }
+
+ #endregion
+
+ #region EndsWith
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public EndsWithConstraint EndsWith(string expected)
+ {
+ return new EndsWithConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public EndsWithConstraint StringEnding(string expected)
+ {
+ return new EndsWithConstraint(expected);
+ }
+
+ #endregion
+
+ #region DoesNotEndWith
+
+ /// <summary>
+ /// Returns a constraint that fails if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public EndsWithConstraint DoesNotEndWith(string expected)
+ {
+ return new ConstraintExpression().Not.EndsWith(expected);
+ }
+
+ #endregion
+
+ #region Matches
+
+#if !NETCF
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value matches the regular expression supplied as an argument.
+ /// </summary>
+ public RegexConstraint Matches(string pattern)
+ {
+ return new RegexConstraint(pattern);
+ }
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value matches the regular expression supplied as an argument.
+ /// </summary>
+ public RegexConstraint StringMatching(string pattern)
+ {
+ return new RegexConstraint(pattern);
+ }
+#endif
+
+ #endregion
+
+ #region DoesNotMatch
+
+#if !NETCF
+ /// <summary>
+ /// Returns a constraint that fails if the actual
+ /// value matches the pattern supplied as an argument.
+ /// </summary>
+ public RegexConstraint DoesNotMatch(string pattern)
+ {
+ return new ConstraintExpression().Not.Matches(pattern);
+ }
+#endif
+
+ #endregion
+
+ #region SamePath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same as an expected path after canonicalization.
+ /// </summary>
+ public SamePathConstraint SamePath(string expected)
+ {
+ return new SamePathConstraint(expected);
+ }
+
+ #endregion
+
+ #region SubPath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same path or under an expected path after canonicalization.
+ /// </summary>
+ public SubPathConstraint SubPath(string expected)
+ {
+ return new SubPathConstraint(expected);
+ }
+
+ #endregion
+
+ #region SamePathOrUnder
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same path or under an expected path after canonicalization.
+ /// </summary>
+ public SamePathOrUnderConstraint SamePathOrUnder(string expected)
+ {
+ return new SamePathOrUnderConstraint(expected);
+ }
+
+ #endregion
+
+ #region InRange
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public RangeConstraint<T> InRange<T>(T from, T to) where T : IComparable<T>
+ {
+ return new RangeConstraint<T>(from, to);
+ }
+#else
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public RangeConstraint InRange(IComparable from, IComparable to)
+ {
+ return new RangeConstraint(from, to);
+ }
+#endif
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ContainsConstraint.cs b/external/guiunit/src/framework/Constraints/ContainsConstraint.cs
new file mode 100755
index 0000000..da8012a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ContainsConstraint.cs
@@ -0,0 +1,183 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ // TODO Needs tests
+ /// <summary>
+ /// ContainsConstraint tests a whether a string contains a substring
+ /// or a collection contains an object. It postpones the decision of
+ /// which test to use until the type of the actual argument is known.
+ /// This allows testing whether a string is contained in a collection
+ /// or as a substring of another string using the same syntax.
+ /// </summary>
+ public class ContainsConstraint : Constraint
+ {
+ readonly object expected;
+ Constraint realConstraint;
+ bool ignoreCase;
+
+#if CLR_2_0 || CLR_4_0
+ private List<EqualityAdapter> equalityAdapters = new List<EqualityAdapter>();
+#else
+ private ArrayList equalityAdapters = new ArrayList();
+#endif
+
+ private Constraint RealConstraint
+ {
+ get
+ {
+ if ( realConstraint == null )
+ {
+ if (actual is string)
+ {
+ StringConstraint constraint = new SubstringConstraint((string)expected);
+ if (this.ignoreCase)
+ constraint = constraint.IgnoreCase;
+ this.realConstraint = constraint;
+ }
+ else
+ {
+ CollectionItemsEqualConstraint constraint = new CollectionContainsConstraint(expected);
+
+ foreach (EqualityAdapter adapter in equalityAdapters)
+ constraint = constraint.Using(adapter);
+
+ this.realConstraint = constraint;
+ }
+ }
+
+ return realConstraint;
+ }
+ set
+ {
+ realConstraint = value;
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ContainsConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected.</param>
+ public ContainsConstraint( object expected ) : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Flag the constraint to ignore case and return self.
+ /// </summary>
+ public ContainsConstraint IgnoreCase
+ {
+ get { this.ignoreCase = true; return this; }
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return this.RealConstraint.Matches( actual );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ this.RealConstraint.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public ContainsConstraint Using(IComparer comparer)
+ {
+ return AddAdapter(EqualityAdapter.For(comparer));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public ContainsConstraint Using<T>(IComparer<T> comparer)
+ {
+ return AddAdapter(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied Comparison object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public ContainsConstraint Using<T>(Comparison<T> comparer)
+ {
+ return AddAdapter(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public ContainsConstraint Using(IEqualityComparer comparer)
+ {
+ return AddAdapter(EqualityAdapter.For(comparer));
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public ContainsConstraint Using<T>(IEqualityComparer<T> comparer)
+ {
+ return AddAdapter(EqualityAdapter.For(comparer));
+ }
+#endif
+
+ #region Helper Methods
+
+ private ContainsConstraint AddAdapter(EqualityAdapter adapter)
+ {
+ this.equalityAdapters.Add(adapter);
+ return this;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/DelayedConstraint.cs b/external/guiunit/src/framework/Constraints/DelayedConstraint.cs
new file mode 100755
index 0000000..355fe31
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/DelayedConstraint.cs
@@ -0,0 +1,234 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF
+using System;
+using System.Threading;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ ///<summary>
+ /// Applies a delay to the match so that a match can be evaluated in the future.
+ ///</summary>
+ public class DelayedConstraint : PrefixConstraint
+ {
+ private readonly int delayInMilliseconds;
+ private readonly int pollingInterval;
+
+ ///<summary>
+ /// Creates a new DelayedConstraint
+ ///</summary>
+ ///<param name="baseConstraint">The inner constraint two decorate</param>
+ ///<param name="delayInMilliseconds">The time interval after which the match is performed</param>
+ ///<exception cref="InvalidOperationException">If the value of <paramref name="delayInMilliseconds"/> is less than 0</exception>
+ public DelayedConstraint(Constraint baseConstraint, int delayInMilliseconds)
+ : this(baseConstraint, delayInMilliseconds, 0) { }
+
+ ///<summary>
+ /// Creates a new DelayedConstraint
+ ///</summary>
+ ///<param name="baseConstraint">The inner constraint two decorate</param>
+ ///<param name="delayInMilliseconds">The time interval after which the match is performed</param>
+ ///<param name="pollingInterval">The time interval used for polling</param>
+ ///<exception cref="InvalidOperationException">If the value of <paramref name="delayInMilliseconds"/> is less than 0</exception>
+ public DelayedConstraint(Constraint baseConstraint, int delayInMilliseconds, int pollingInterval)
+ : base(baseConstraint)
+ {
+ if (delayInMilliseconds < 0)
+ throw new ArgumentException("Cannot check a condition in the past", "delayInMilliseconds");
+
+ this.delayInMilliseconds = delayInMilliseconds;
+ this.pollingInterval = pollingInterval;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for if the base constraint fails, false if it succeeds</returns>
+ public override bool Matches(object actual)
+ {
+ int remainingDelay = delayInMilliseconds;
+
+ while (pollingInterval > 0 && pollingInterval < remainingDelay)
+ {
+ remainingDelay -= pollingInterval;
+ Thread.Sleep(pollingInterval);
+ this.actual = actual;
+ if (baseConstraint.Matches(actual))
+ return true;
+ }
+
+ if (remainingDelay > 0)
+ Thread.Sleep(remainingDelay);
+ this.actual = actual;
+ return baseConstraint.Matches(actual);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a delegate
+ /// </summary>
+ /// <param name="del">The delegate whose value is to be tested</param>
+ /// <returns>True for if the base constraint fails, false if it succeeds</returns>
+#if CLR_2_0 || CLR_4_0
+ public override bool Matches<T>(ActualValueDelegate<T> del)
+#else
+ public override bool Matches(ActualValueDelegate del)
+#endif
+ {
+ int remainingDelay = delayInMilliseconds;
+
+ while (pollingInterval > 0 && pollingInterval < remainingDelay)
+ {
+ remainingDelay -= pollingInterval;
+ Thread.Sleep(pollingInterval);
+ this.actual = InvokeDelegate(del);
+
+ try
+ {
+ if (baseConstraint.Matches(actual))
+ return true;
+ }
+ catch
+ {
+ // Ignore any exceptions when polling
+ }
+ }
+
+ if (remainingDelay > 0)
+ Thread.Sleep(remainingDelay);
+ this.actual = InvokeDelegate(del);
+ return baseConstraint.Matches(actual);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ private static object InvokeDelegate<T>(ActualValueDelegate<T> del)
+ {
+#if NET_4_5
+ if (AsyncInvocationRegion.IsAsyncOperation(del))
+ using (AsyncInvocationRegion region = AsyncInvocationRegion.Create(del))
+ return region.WaitForPendingOperationsToComplete(del());
+#endif
+
+ return del();
+ }
+#else
+ private static object InvokeDelegate(ActualValueDelegate del)
+ {
+ return del();
+ }
+#endif
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given reference.
+ /// Overridden to wait for the specified delay period before
+ /// calling the base constraint with the dereferenced value.
+ /// </summary>
+ /// <param name="actual">A reference to the value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches<T>(ref T actual)
+ {
+ int remainingDelay = delayInMilliseconds;
+
+ while (pollingInterval > 0 && pollingInterval < remainingDelay)
+ {
+ remainingDelay -= pollingInterval;
+ Thread.Sleep(pollingInterval);
+ this.actual = actual;
+
+ try
+ {
+ if (baseConstraint.Matches(actual))
+ return true;
+ }
+ catch (Exception)
+ {
+ // Ignore any exceptions when polling
+ }
+ }
+
+ if (remainingDelay > 0)
+ Thread.Sleep(remainingDelay);
+ this.actual = actual;
+ return baseConstraint.Matches(actual);
+ }
+#else
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given boolean reference.
+ /// Overridden to wait for the specified delay period before
+ /// calling the base constraint with the dereferenced value.
+ /// </summary>
+ /// <param name="actual">A reference to the value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(ref bool actual)
+ {
+ int remainingDelay = delayInMilliseconds;
+
+ while (pollingInterval > 0 && pollingInterval < remainingDelay)
+ {
+ remainingDelay -= pollingInterval;
+ Thread.Sleep(pollingInterval);
+ this.actual = actual;
+
+ if (baseConstraint.Matches(actual))
+ return true;
+ }
+
+ if (remainingDelay > 0)
+ Thread.Sleep(remainingDelay);
+ this.actual = actual;
+ return baseConstraint.Matches(actual);
+ }
+#endif
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ baseConstraint.WriteDescriptionTo(writer);
+ writer.Write(string.Format(" after {0} millisecond delay", delayInMilliseconds));
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a MessageWriter.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ baseConstraint.WriteActualValueTo(writer);
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<after {0} {1}>", delayInMilliseconds, baseConstraint);
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Constraints/EmptyCollectionConstraint.cs b/external/guiunit/src/framework/Constraints/EmptyCollectionConstraint.cs
new file mode 100755
index 0000000..35dd7f8
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EmptyCollectionConstraint.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyCollectionConstraint tests whether a collection is empty.
+ /// </summary>
+ public class EmptyCollectionConstraint : CollectionConstraint
+ {
+ /// <summary>
+ /// Check that the collection is empty
+ /// </summary>
+ /// <param name="collection"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable collection)
+ {
+ return IsEmpty(collection);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("<empty>");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/EmptyConstraint.cs b/external/guiunit/src/framework/Constraints/EmptyConstraint.cs
new file mode 100755
index 0000000..28779d2
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EmptyConstraint.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyConstraint tests a whether a string or collection is empty,
+ /// postponing the decision about which test is applied until the
+ /// type of the actual argument is known.
+ /// </summary>
+ public class EmptyConstraint : Constraint
+ {
+ private Constraint RealConstraint
+ {
+ get
+ {
+ if (actual is string)
+ return new EmptyStringConstraint();
+ else if (actual is System.IO.DirectoryInfo)
+ return new EmptyDirectoryConstraint();
+ else
+ return new EmptyCollectionConstraint();
+ }
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (actual == null)
+ throw new ArgumentException("The actual value must be a non-null string, IEnumerable or DirectoryInfo", "actual");
+
+ return this.RealConstraint.Matches( actual );
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ this.RealConstraint.WriteDescriptionTo( writer );
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/EmptyDirectoryConstraint.cs b/external/guiunit/src/framework/Constraints/EmptyDirectoryConstraint.cs
new file mode 100755
index 0000000..092aa61
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EmptyDirectoryConstraint.cs
@@ -0,0 +1,91 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.IO;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyDirectoryConstraint is used to test that a directory is empty
+ /// </summary>
+ public class EmptyDirectoryConstraint : Constraint
+ {
+ private int files = 0;
+ private int subdirs = 0;
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ DirectoryInfo dirInfo = actual as DirectoryInfo;
+ if (dirInfo == null)
+ throw new ArgumentException("The actual value must be a DirectoryInfo", "actual");
+
+#if SL_4_0 || SL_5_0
+ foreach (FileInfo file in dirInfo.EnumerateFiles())
+ files++;
+ foreach (DirectoryInfo dir in dirInfo.EnumerateDirectories())
+ subdirs++;
+#else
+ files = dirInfo.GetFiles().Length;
+ subdirs = dirInfo.GetDirectories().Length;
+#endif
+
+ return files == 0 && subdirs == 0;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write( "An empty directory" );
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ DirectoryInfo dir = actual as DirectoryInfo;
+ if (dir == null)
+ base.WriteActualValueTo(writer);
+ else
+ {
+ writer.WriteActualValue(dir);
+ writer.Write(" with {0} files and {1} directories", files, subdirs);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/EmptyStringConstraint.cs b/external/guiunit/src/framework/Constraints/EmptyStringConstraint.cs
new file mode 100755
index 0000000..48c9314
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EmptyStringConstraint.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EmptyStringConstraint tests whether a string is empty.
+ /// </summary>
+ public class EmptyStringConstraint : Constraint
+ {
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return actual as string == string.Empty;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("<empty>");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/EndsWithConstraint.cs b/external/guiunit/src/framework/Constraints/EndsWithConstraint.cs
new file mode 100755
index 0000000..7cf5ab3
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EndsWithConstraint.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EndsWithConstraint can test whether a string ends
+ /// with an expected substring.
+ /// </summary>
+ public class EndsWithConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected string</param>
+ public EndsWithConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is matched by the actual value.
+ /// This is a template method, which calls the IsMatch method
+ /// of the derived class.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool Matches(string actual)
+ {
+ if (this.caseInsensitive)
+ return actual.ToLower().EndsWith(expected.ToLower());
+ else
+ return actual.EndsWith(expected);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String ending with");
+ writer.WriteExpectedValue(expected);
+ if (this.caseInsensitive)
+ writer.WriteModifier("ignoring case");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/EqualConstraint.cs b/external/guiunit/src/framework/Constraints/EqualConstraint.cs
new file mode 100755
index 0000000..e791c3e
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EqualConstraint.cs
@@ -0,0 +1,565 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.IO;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EqualConstraint is able to compare an actual value with the
+ /// expected value provided in its constructor. Two objects are
+ /// considered equal if both are null, or if both have the same
+ /// value. NUnit has special semantics for some object types.
+ /// </summary>
+ public class EqualConstraint : Constraint
+ {
+ #region Static and Instance Fields
+
+ private readonly object expected;
+
+ private Tolerance tolerance = Tolerance.Empty;
+
+ /// <summary>
+ /// If true, strings in error messages will be clipped
+ /// </summary>
+ private bool clipStrings = true;
+
+ /// <summary>
+ /// NUnitEqualityComparer used to test equality.
+ /// </summary>
+ private NUnitEqualityComparer comparer = new NUnitEqualityComparer();
+
+ #region Message Strings
+ private static readonly string StringsDiffer_1 =
+ "String lengths are both {0}. Strings differ at index {1}.";
+ private static readonly string StringsDiffer_2 =
+ "Expected string length {0} but was {1}. Strings differ at index {2}.";
+ private static readonly string StreamsDiffer_1 =
+ "Stream lengths are both {0}. Streams differ at offset {1}.";
+ private static readonly string StreamsDiffer_2 =
+ "Expected Stream length {0} but was {1}.";// Streams differ at offset {2}.";
+ private static readonly string CollectionType_1 =
+ "Expected and actual are both {0}";
+ private static readonly string CollectionType_2 =
+ "Expected is {0}, actual is {1}";
+ private static readonly string ValuesDiffer_1 =
+ "Values differ at index {0}";
+ private static readonly string ValuesDiffer_2 =
+ "Values differ at expected index {0}, actual index {1}";
+ #endregion
+
+ #endregion
+
+ #region Constructor
+ /// <summary>
+ /// Initializes a new instance of the <see cref="EqualConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public EqualConstraint(object expected) : base(expected)
+ {
+ this.expected = expected;
+ }
+ #endregion
+
+ #region Constraint Modifiers
+ /// <summary>
+ /// Flag the constraint to ignore case and return self.
+ /// </summary>
+ public EqualConstraint IgnoreCase
+ {
+ get
+ {
+ comparer.IgnoreCase = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to suppress string clipping
+ /// and return self.
+ /// </summary>
+ public EqualConstraint NoClip
+ {
+ get
+ {
+ clipStrings = false;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to compare arrays as collections
+ /// and return self.
+ /// </summary>
+ public EqualConstraint AsCollection
+ {
+ get
+ {
+ comparer.CompareAsCollection = true;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to use a tolerance when determining equality.
+ /// </summary>
+ /// <param name="amount">Tolerance value to be used</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Within(object amount)
+ {
+ if (!tolerance.IsEmpty)
+ throw new InvalidOperationException("Within modifier may appear only once in a constraint expression");
+
+ tolerance = new Tolerance(amount);
+ return this;
+ }
+
+ /// <summary>
+ /// Switches the .Within() modifier to interpret its tolerance as
+ /// a distance in representable values (see remarks).
+ /// </summary>
+ /// <returns>Self.</returns>
+ /// <remarks>
+ /// Ulp stands for "unit in the last place" and describes the minimum
+ /// amount a given value can change. For any integers, an ulp is 1 whole
+ /// digit. For floating point values, the accuracy of which is better
+ /// for smaller numbers and worse for larger numbers, an ulp depends
+ /// on the size of the number. Using ulps for comparison of floating
+ /// point results instead of fixed tolerances is safer because it will
+ /// automatically compensate for the added inaccuracy of larger numbers.
+ /// </remarks>
+ public EqualConstraint Ulps
+ {
+ get
+ {
+ tolerance = tolerance.Ulps;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Switches the .Within() modifier to interpret its tolerance as
+ /// a percentage that the actual values is allowed to deviate from
+ /// the expected value.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Percent
+ {
+ get
+ {
+ tolerance = tolerance.Percent;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in days.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Days
+ {
+ get
+ {
+ tolerance = tolerance.Days;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in hours.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Hours
+ {
+ get
+ {
+ tolerance = tolerance.Hours;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in minutes.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Minutes
+ {
+ get
+ {
+ tolerance = tolerance.Minutes;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in seconds.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Seconds
+ {
+ get
+ {
+ tolerance = tolerance.Seconds;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in milliseconds.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Milliseconds
+ {
+ get
+ {
+ tolerance = tolerance.Milliseconds;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Causes the tolerance to be interpreted as a TimeSpan in clock ticks.
+ /// </summary>
+ /// <returns>Self</returns>
+ public EqualConstraint Ticks
+ {
+ get
+ {
+ tolerance = tolerance.Ticks;
+ return this;
+ }
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Using(IComparer comparer)
+ {
+ this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
+ return this;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Flag the constraint to use the supplied IComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Using<T>(IComparer<T> comparer)
+ {
+ this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied Comparison object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Using<T>(Comparison<T> comparer)
+ {
+ this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Using(IEqualityComparer comparer)
+ {
+ this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
+ return this;
+ }
+
+ /// <summary>
+ /// Flag the constraint to use the supplied IEqualityComparer object.
+ /// </summary>
+ /// <param name="comparer">The IComparer object to use.</param>
+ /// <returns>Self.</returns>
+ public EqualConstraint Using<T>(IEqualityComparer<T> comparer)
+ {
+ this.comparer.ExternalComparers.Add(EqualityAdapter.For(comparer));
+ return this;
+ }
+#endif
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return comparer.AreEqual(expected, actual, ref tolerance);
+ }
+
+ /// <summary>
+ /// Write a failure message. Overridden to provide custom
+ /// failure messages for EqualConstraint.
+ /// </summary>
+ /// <param name="writer">The MessageWriter to write to</param>
+ public override void WriteMessageTo(MessageWriter writer)
+ {
+ DisplayDifferences(writer, expected, actual, 0);
+ }
+
+
+ /// <summary>
+ /// Write description of this constraint
+ /// </summary>
+ /// <param name="writer">The MessageWriter to write to</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WriteExpectedValue(expected);
+
+ if (tolerance != null && !tolerance.IsEmpty)
+ {
+ writer.WriteConnector("+/-");
+ writer.WriteExpectedValue(tolerance.Value);
+ if (tolerance.Mode != ToleranceMode.Linear)
+ writer.Write(" {0}", tolerance.Mode);
+ }
+
+ if (comparer.IgnoreCase)
+ writer.WriteModifier("ignoring case");
+ }
+
+ private void DisplayDifferences(MessageWriter writer, object expected, object actual, int depth)
+ {
+ if (expected is string && actual is string)
+ DisplayStringDifferences(writer, (string)expected, (string)actual);
+ else if (expected is ICollection && actual is ICollection)
+ DisplayCollectionDifferences(writer, (ICollection)expected, (ICollection)actual, depth);
+ else if (expected is IEnumerable && actual is IEnumerable)
+ DisplayEnumerableDifferences(writer, (IEnumerable)expected, (IEnumerable)actual, depth);
+ else if (expected is Stream && actual is Stream)
+ DisplayStreamDifferences(writer, (Stream)expected, (Stream)actual, depth);
+ else if (tolerance != null)
+ writer.DisplayDifferences(expected, actual, tolerance);
+ else
+ writer.DisplayDifferences(expected, actual);
+ }
+ #endregion
+
+ #region DisplayStringDifferences
+ private void DisplayStringDifferences(MessageWriter writer, string expected, string actual)
+ {
+ int mismatch = MsgUtils.FindMismatchPosition(expected, actual, 0, comparer.IgnoreCase);
+
+ if (expected.Length == actual.Length)
+ writer.WriteMessageLine(StringsDiffer_1, expected.Length, mismatch);
+ else
+ writer.WriteMessageLine(StringsDiffer_2, expected.Length, actual.Length, mismatch);
+
+ writer.DisplayStringDifferences(expected, actual, mismatch, comparer.IgnoreCase, clipStrings);
+ }
+ #endregion
+
+ #region DisplayStreamDifferences
+ private void DisplayStreamDifferences(MessageWriter writer, Stream expected, Stream actual, int depth)
+ {
+ if (expected.Length == actual.Length)
+ {
+ FailurePoint fp = (FailurePoint)comparer.FailurePoints[depth];
+ long offset = fp.Position;
+ writer.WriteMessageLine(StreamsDiffer_1, expected.Length, offset);
+ }
+ else
+ writer.WriteMessageLine(StreamsDiffer_2, expected.Length, actual.Length);
+ }
+ #endregion
+
+ #region DisplayCollectionDifferences
+ /// <summary>
+ /// Display the failure information for two collections that did not match.
+ /// </summary>
+ /// <param name="writer">The MessageWriter on which to display</param>
+ /// <param name="expected">The expected collection.</param>
+ /// <param name="actual">The actual collection</param>
+ /// <param name="depth">The depth of this failure in a set of nested collections</param>
+ private void DisplayCollectionDifferences(MessageWriter writer, ICollection expected, ICollection actual, int depth)
+ {
+ DisplayTypesAndSizes(writer, expected, actual, depth);
+
+ if (comparer.FailurePoints.Count > depth)
+ {
+ FailurePoint failurePoint = (FailurePoint)comparer.FailurePoints[depth];
+
+ DisplayFailurePoint(writer, expected, actual, failurePoint, depth);
+
+ if (failurePoint.ExpectedHasData && failurePoint.ActualHasData)
+ DisplayDifferences(
+ writer,
+ failurePoint.ExpectedValue,
+ failurePoint.ActualValue,
+ ++depth);
+ else if (failurePoint.ActualHasData)
+ {
+ writer.Write(" Extra: ");
+ writer.WriteCollectionElements(actual, failurePoint.Position, 3);
+ }
+ else
+ {
+ writer.Write(" Missing: ");
+ writer.WriteCollectionElements(expected, failurePoint.Position, 3);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Displays a single line showing the types and sizes of the expected
+ /// and actual enumerations, collections or arrays. If both are identical,
+ /// the value is only shown once.
+ /// </summary>
+ /// <param name="writer">The MessageWriter on which to display</param>
+ /// <param name="expected">The expected collection or array</param>
+ /// <param name="actual">The actual collection or array</param>
+ /// <param name="indent">The indentation level for the message line</param>
+ private void DisplayTypesAndSizes(MessageWriter writer, IEnumerable expected, IEnumerable actual, int indent)
+ {
+ string sExpected = MsgUtils.GetTypeRepresentation(expected);
+ if (expected is ICollection && !(expected is Array))
+ sExpected += string.Format(" with {0} elements", ((ICollection)expected).Count);
+
+ string sActual = MsgUtils.GetTypeRepresentation(actual);
+ if (actual is ICollection && !(actual is Array))
+ sActual += string.Format(" with {0} elements", ((ICollection)actual).Count);
+
+ if (sExpected == sActual)
+ writer.WriteMessageLine(indent, CollectionType_1, sExpected);
+ else
+ writer.WriteMessageLine(indent, CollectionType_2, sExpected, sActual);
+ }
+
+ /// <summary>
+ /// Displays a single line showing the point in the expected and actual
+ /// arrays at which the comparison failed. If the arrays have different
+ /// structures or dimensions, both values are shown.
+ /// </summary>
+ /// <param name="writer">The MessageWriter on which to display</param>
+ /// <param name="expected">The expected array</param>
+ /// <param name="actual">The actual array</param>
+ /// <param name="failurePoint">Index of the failure point in the underlying collections</param>
+ /// <param name="indent">The indentation level for the message line</param>
+ private void DisplayFailurePoint(MessageWriter writer, IEnumerable expected, IEnumerable actual, FailurePoint failurePoint, int indent)
+ {
+ Array expectedArray = expected as Array;
+ Array actualArray = actual as Array;
+
+ int expectedRank = expectedArray != null ? expectedArray.Rank : 1;
+ int actualRank = actualArray != null ? actualArray.Rank : 1;
+
+ bool useOneIndex = expectedRank == actualRank;
+
+ if (expectedArray != null && actualArray != null)
+ for (int r = 1; r < expectedRank && useOneIndex; r++)
+ if (expectedArray.GetLength(r) != actualArray.GetLength(r))
+ useOneIndex = false;
+
+ int[] expectedIndices = MsgUtils.GetArrayIndicesFromCollectionIndex(expected, failurePoint.Position);
+ if (useOneIndex)
+ {
+ writer.WriteMessageLine(indent, ValuesDiffer_1, MsgUtils.GetArrayIndicesAsString(expectedIndices));
+ }
+ else
+ {
+ int[] actualIndices = MsgUtils.GetArrayIndicesFromCollectionIndex(actual, failurePoint.Position);
+ writer.WriteMessageLine(indent, ValuesDiffer_2,
+ MsgUtils.GetArrayIndicesAsString(expectedIndices), MsgUtils.GetArrayIndicesAsString(actualIndices));
+ }
+ }
+
+ private static object GetValueFromCollection(ICollection collection, int index)
+ {
+ Array array = collection as Array;
+
+ if (array != null && array.Rank > 1)
+ return array.GetValue(MsgUtils.GetArrayIndicesFromCollectionIndex(array, index));
+
+ if (collection is IList)
+ return ((IList)collection)[index];
+
+ foreach (object obj in collection)
+ if (--index < 0)
+ return obj;
+
+ return null;
+ }
+ #endregion
+
+ #region DisplayEnumerableDifferences
+
+ /// <summary>
+ /// Display the failure information for two IEnumerables that did not match.
+ /// </summary>
+ /// <param name="writer">The MessageWriter on which to display</param>
+ /// <param name="expected">The expected enumeration.</param>
+ /// <param name="actual">The actual enumeration</param>
+ /// <param name="depth">The depth of this failure in a set of nested collections</param>
+ private void DisplayEnumerableDifferences(MessageWriter writer, IEnumerable expected, IEnumerable actual, int depth)
+ {
+ DisplayTypesAndSizes(writer, expected, actual, depth);
+
+ if (comparer.FailurePoints.Count > depth)
+ {
+ FailurePoint failurePoint = (FailurePoint)comparer.FailurePoints[depth];
+
+ DisplayFailurePoint(writer, expected, actual, failurePoint, depth);
+
+ if (failurePoint.ExpectedHasData && failurePoint.ActualHasData)
+ DisplayDifferences(
+ writer,
+ failurePoint.ExpectedValue,
+ failurePoint.ActualValue,
+ ++depth);
+ //else if (failurePoint.ActualHasData)
+ //{
+ // writer.Write(" Extra: ");
+ // writer.WriteCollectionElements(actual, failurePoint.Position, 3);
+ //}
+ //else
+ //{
+ // writer.Write(" Missing: ");
+ // writer.WriteCollectionElements(expected, failurePoint.Position, 3);
+ //}
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/EqualityAdapter.cs b/external/guiunit/src/framework/Constraints/EqualityAdapter.cs
new file mode 100755
index 0000000..04d103c
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/EqualityAdapter.cs
@@ -0,0 +1,241 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// EqualityAdapter class handles all equality comparisons
+ /// that use an IEqualityComparer, IEqualityComparer<T>
+ /// or a ComparisonAdapter.
+ /// </summary>
+ public abstract class EqualityAdapter
+ {
+ /// <summary>
+ /// Compares two objects, returning true if they are equal
+ /// </summary>
+ public abstract bool AreEqual(object x, object y);
+
+ /// <summary>
+ /// Returns true if the two objects can be compared by this adapter.
+ /// The base adapter cannot handle IEnumerables except for strings.
+ /// </summary>
+ public virtual bool CanCompare(object x, object y)
+ {
+ if (x is string && y is string)
+ return true;
+
+ if (x is IEnumerable || y is IEnumerable)
+ return false;
+
+ return true;
+ }
+
+ #region Nested IComparer Adapter
+
+ /// <summary>
+ /// Returns an EqualityAdapter that wraps an IComparer.
+ /// </summary>
+ public static EqualityAdapter For(IComparer comparer)
+ {
+ return new ComparerAdapter(comparer);
+ }
+
+ /// <summary>
+ /// EqualityAdapter that wraps an IComparer.
+ /// </summary>
+ class ComparerAdapter : EqualityAdapter
+ {
+ private IComparer comparer;
+
+ public ComparerAdapter(IComparer comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ public override bool AreEqual(object x, object y)
+ {
+ return comparer.Compare(x, y) == 0;
+ }
+ }
+
+ #endregion
+
+#if CLR_2_0 || CLR_4_0
+ #region Nested IEqualityComparer Adapter
+
+ /// <summary>
+ /// Returns an EqualityAdapter that wraps an IEqualityComparer.
+ /// </summary>
+ public static EqualityAdapter For(IEqualityComparer comparer)
+ {
+ return new EqualityComparerAdapter(comparer);
+ }
+
+ class EqualityComparerAdapter : EqualityAdapter
+ {
+ private IEqualityComparer comparer;
+
+ public EqualityComparerAdapter(IEqualityComparer comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ public override bool AreEqual(object x, object y)
+ {
+ return comparer.Equals(x, y);
+ }
+ }
+
+ #endregion
+
+ #region Nested GenericEqualityAdapter<T>
+
+ abstract class GenericEqualityAdapter<T> : EqualityAdapter
+ {
+ /// <summary>
+ /// Returns true if the two objects can be compared by this adapter.
+ /// Generic adapter requires objects of the specified type.
+ /// </summary>
+ public override bool CanCompare(object x, object y)
+ {
+ return typeof(T).IsAssignableFrom(x.GetType())
+ && typeof(T).IsAssignableFrom(y.GetType());
+ }
+
+ protected void ThrowIfNotCompatible(object x, object y)
+ {
+ if (!typeof(T).IsAssignableFrom(x.GetType()))
+ throw new ArgumentException("Cannot compare " + x.ToString());
+
+ if (!typeof(T).IsAssignableFrom(y.GetType()))
+ throw new ArgumentException("Cannot compare " + y.ToString());
+ }
+ }
+
+ #endregion
+
+ #region Nested IEqualityComparer<T> Adapter
+
+ /// <summary>
+ /// Returns an EqualityAdapter that wraps an IEqualityComparer<T>.
+ /// </summary>
+ public static EqualityAdapter For<T>(IEqualityComparer<T> comparer)
+ {
+ return new EqualityComparerAdapter<T>(comparer);
+ }
+
+ class EqualityComparerAdapter<T> : GenericEqualityAdapter<T>
+ {
+ private IEqualityComparer<T> comparer;
+
+ public EqualityComparerAdapter(IEqualityComparer<T> comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ public override bool AreEqual(object x, object y)
+ {
+ ThrowIfNotCompatible(x, y);
+ return comparer.Equals((T)x, (T)y);
+ }
+ }
+
+ #endregion
+
+ #region Nested IComparer<T> Adapter
+
+ /// <summary>
+ /// Returns an EqualityAdapter that wraps an IComparer<T>.
+ /// </summary>
+ public static EqualityAdapter For<T>(IComparer<T> comparer)
+ {
+ return new ComparerAdapter<T>(comparer);
+ }
+
+ /// <summary>
+ /// EqualityAdapter that wraps an IComparer.
+ /// </summary>
+ class ComparerAdapter<T> : GenericEqualityAdapter<T>
+ {
+ private IComparer<T> comparer;
+
+ public ComparerAdapter(IComparer<T> comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ public override bool AreEqual(object x, object y)
+ {
+ ThrowIfNotCompatible(x, y);
+ return comparer.Compare((T)x, (T)y) == 0;
+ }
+ }
+
+ #endregion
+
+ #region Nested Comparison<T> Adapter
+
+ /// <summary>
+ /// Returns an EqualityAdapter that wraps a Comparison<T>.
+ /// </summary>
+ public static EqualityAdapter For<T>(Comparison<T> comparer)
+ {
+ return new ComparisonAdapter<T>(comparer);
+ }
+
+ class ComparisonAdapter<T> : GenericEqualityAdapter<T>
+ {
+ private Comparison<T> comparer;
+
+ public ComparisonAdapter(Comparison<T> comparer)
+ {
+ this.comparer = comparer;
+ }
+
+ public override bool AreEqual(object x, object y)
+ {
+ ThrowIfNotCompatible(x, y);
+ return comparer.Invoke((T)x, (T)y) == 0;
+ }
+ }
+
+ #endregion
+#endif
+ }
+
+ /// <summary>
+ /// EqualityAdapterList represents a list of EqualityAdapters
+ /// in a common class across platforms.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ class EqualityAdapterList : System.Collections.Generic.List<EqualityAdapter> { }
+#else
+ class EqualityAdapterList : ArrayList { }
+#endif
+}
diff --git a/external/guiunit/src/framework/Constraints/ExactCountConstraint.cs b/external/guiunit/src/framework/Constraints/ExactCountConstraint.cs
new file mode 100755
index 0000000..2c85e7c
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ExactCountConstraint.cs
@@ -0,0 +1,94 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ExactCountConstraint applies another constraint to each
+ /// item in a collection, succeeding only if a specified
+ /// number of items succeed.
+ /// </summary>
+ public class ExactCountConstraint : PrefixConstraint
+ {
+ private int expectedCount;
+
+ /// <summary>
+ /// Construct an ExactCountConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="expectedCount"></param>
+ /// <param name="itemConstraint"></param>
+ public ExactCountConstraint(int expectedCount, Constraint itemConstraint)
+ : base(itemConstraint)
+ {
+ this.DisplayName = "one";
+ this.expectedCount = expectedCount;
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// succeeding only if the expected number of items pass.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is IEnumerable))
+ throw new ArgumentException("The actual value must be an IEnumerable", "actual");
+
+ int count = 0;
+ foreach (object item in (IEnumerable)actual)
+ if (baseConstraint.Matches(item))
+ count++;
+
+ return count == expectedCount;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ switch(expectedCount)
+ {
+ case 0:
+ writer.WritePredicate("no item");
+ break;
+ case 1:
+ writer.WritePredicate("exactly one item");
+ break;
+ default:
+ writer.WritePredicate("exactly " + expectedCount.ToString() + " items");
+ break;
+ }
+
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/Constraints/ExactTypeConstraint.cs b/external/guiunit/src/framework/Constraints/ExactTypeConstraint.cs
new file mode 100755
index 0000000..fda8e72
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ExactTypeConstraint.cs
@@ -0,0 +1,64 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ExactTypeConstraint is used to test that an object
+ /// is of the exact type provided in the constructor
+ /// </summary>
+ public class ExactTypeConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an ExactTypeConstraint for a given Type
+ /// </summary>
+ /// <param name="type">The expected Type.</param>
+ public ExactTypeConstraint(Type type)
+ : base(type)
+ {
+ this.DisplayName = "typeof";
+ }
+
+ /// <summary>
+ /// Test that an object is of the exact type specified
+ /// </summary>
+ /// <param name="actual">The actual value.</param>
+ /// <returns>True if the tested object is of the exact type provided, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && actual.GetType() == this.expectedType;
+ }
+
+ /// <summary>
+ /// Write the description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ExceptionTypeConstraint.cs b/external/guiunit/src/framework/Constraints/ExceptionTypeConstraint.cs
new file mode 100755
index 0000000..2d62db5
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ExceptionTypeConstraint.cs
@@ -0,0 +1,59 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ExceptionTypeConstraint is a special version of ExactTypeConstraint
+ /// used to provided detailed info about the exception thrown in
+ /// an error message.
+ /// </summary>
+ public class ExceptionTypeConstraint : ExactTypeConstraint
+ {
+ /// <summary>
+ /// Constructs an ExceptionTypeConstraint
+ /// </summary>
+ public ExceptionTypeConstraint(Type type) : base(type) { }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. Overriden to write additional information
+ /// in the case of an Exception.
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ Exception ex = actual as Exception;
+ base.WriteActualValueTo(writer);
+
+ if (ex != null)
+ {
+ writer.WriteLine(" ({0})", ex.Message);
+ writer.Write(ex.StackTrace);
+ }
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/Constraints/FailurePoint.cs b/external/guiunit/src/framework/Constraints/FailurePoint.cs
new file mode 100755
index 0000000..f726ce9
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/FailurePoint.cs
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// FailurePoint class represents one point of failure
+ /// in an equality test.
+ /// </summary>
+ public class FailurePoint
+ {
+ /// <summary>
+ /// The location of the failure
+ /// </summary>
+ public int Position;
+
+ /// <summary>
+ /// The expected value
+ /// </summary>
+ public object ExpectedValue;
+
+ /// <summary>
+ /// The actual value
+ /// </summary>
+ public object ActualValue;
+
+ /// <summary>
+ /// Indicates whether the expected value is valid
+ /// </summary>
+ public bool ExpectedHasData;
+
+ /// <summary>
+ /// Indicates whether the actual value is valid
+ /// </summary>
+ public bool ActualHasData;
+ }
+
+ /// <summary>
+ /// FailurePointList represents a set of FailurePoints
+ /// in a cross-platform way.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ class FailurePointList : System.Collections.Generic.List<FailurePoint> { }
+#else
+ class FailurePointList : System.Collections.ArrayList { }
+#endif
+
+}
diff --git a/external/guiunit/src/framework/Constraints/FalseConstraint.cs b/external/guiunit/src/framework/Constraints/FalseConstraint.cs
new file mode 100755
index 0000000..64b82de
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/FalseConstraint.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// FalseConstraint tests that the actual value is false
+ /// </summary>
+ public class FalseConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:FalseConstraint"/> class.
+ /// </summary>
+ public FalseConstraint() : base(false, "False") { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/FloatingPointNumerics.cs b/external/guiunit/src/framework/Constraints/FloatingPointNumerics.cs
new file mode 100755
index 0000000..2870a95
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/FloatingPointNumerics.cs
@@ -0,0 +1,251 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Runtime.InteropServices;
+
+namespace NUnit.Framework.Constraints
+{
+
+ /// <summary>Helper routines for working with floating point numbers</summary>
+ /// <remarks>
+ /// <para>
+ /// The floating point comparison code is based on this excellent article:
+ /// http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
+ /// </para>
+ /// <para>
+ /// "ULP" means Unit in the Last Place and in the context of this library refers to
+ /// the distance between two adjacent floating point numbers. IEEE floating point
+ /// numbers can only represent a finite subset of natural numbers, with greater
+ /// accuracy for smaller numbers and lower accuracy for very large numbers.
+ /// </para>
+ /// <para>
+ /// If a comparison is allowed "2 ulps" of deviation, that means the values are
+ /// allowed to deviate by up to 2 adjacent floating point values, which might be
+ /// as low as 0.0000001 for small numbers or as high as 10.0 for large numbers.
+ /// </para>
+ /// </remarks>
+ public class FloatingPointNumerics
+ {
+
+ #region struct FloatIntUnion
+
+ /// <summary>Union of a floating point variable and an integer</summary>
+ [StructLayout(LayoutKind.Explicit)]
+ private struct FloatIntUnion
+ {
+ /// <summary>The union's value as a floating point variable</summary>
+ [FieldOffset(0)]
+ public float Float;
+
+ /// <summary>The union's value as an integer</summary>
+ [FieldOffset(0)]
+ public int Int;
+
+ /// <summary>The union's value as an unsigned integer</summary>
+ [FieldOffset(0)]
+ public uint UInt;
+ }
+
+ #endregion // struct FloatIntUnion
+
+ #region struct DoubleLongUnion
+
+ /// <summary>Union of a double precision floating point variable and a long</summary>
+ [StructLayout(LayoutKind.Explicit)]
+ private struct DoubleLongUnion
+ {
+ /// <summary>The union's value as a double precision floating point variable</summary>
+ [FieldOffset(0)]
+ public double Double;
+
+ /// <summary>The union's value as a long</summary>
+ [FieldOffset(0)]
+ public long Long;
+
+ /// <summary>The union's value as an unsigned long</summary>
+ [FieldOffset(0)]
+ public ulong ULong;
+ }
+
+ #endregion // struct DoubleLongUnion
+
+ /// <summary>Compares two floating point values for equality</summary>
+ /// <param name="left">First floating point value to be compared</param>
+ /// <param name="right">Second floating point value t be compared</param>
+ /// <param name="maxUlps">
+ /// Maximum number of representable floating point values that are allowed to
+ /// be between the left and the right floating point values
+ /// </param>
+ /// <returns>True if both numbers are equal or close to being equal</returns>
+ /// <remarks>
+ /// <para>
+ /// Floating point values can only represent a finite subset of natural numbers.
+ /// For example, the values 2.00000000 and 2.00000024 can be stored in a float,
+ /// but nothing inbetween them.
+ /// </para>
+ /// <para>
+ /// This comparison will count how many possible floating point values are between
+ /// the left and the right number. If the number of possible values between both
+ /// numbers is less than or equal to maxUlps, then the numbers are considered as
+ /// being equal.
+ /// </para>
+ /// <para>
+ /// Implementation partially follows the code outlined here:
+ /// http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/
+ /// </para>
+ /// </remarks>
+ public static bool AreAlmostEqualUlps(float left, float right, int maxUlps)
+ {
+ FloatIntUnion leftUnion = new FloatIntUnion();
+ FloatIntUnion rightUnion = new FloatIntUnion();
+
+ leftUnion.Float = left;
+ rightUnion.Float = right;
+
+ uint leftSignMask = (leftUnion.UInt >> 31);
+ uint rightSignMask = (rightUnion.UInt >> 31);
+
+ uint leftTemp = ((0x80000000 - leftUnion.UInt) & leftSignMask);
+ leftUnion.UInt = leftTemp | (leftUnion.UInt & ~leftSignMask);
+
+ uint rightTemp = ((0x80000000 - rightUnion.UInt) & rightSignMask);
+ rightUnion.UInt = rightTemp | (rightUnion.UInt & ~rightSignMask);
+
+ return (Math.Abs(leftUnion.Int - rightUnion.Int) <= maxUlps);
+ }
+
+ /// <summary>Compares two double precision floating point values for equality</summary>
+ /// <param name="left">First double precision floating point value to be compared</param>
+ /// <param name="right">Second double precision floating point value t be compared</param>
+ /// <param name="maxUlps">
+ /// Maximum number of representable double precision floating point values that are
+ /// allowed to be between the left and the right double precision floating point values
+ /// </param>
+ /// <returns>True if both numbers are equal or close to being equal</returns>
+ /// <remarks>
+ /// <para>
+ /// Double precision floating point values can only represent a limited series of
+ /// natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004
+ /// can be stored in a double, but nothing inbetween them.
+ /// </para>
+ /// <para>
+ /// This comparison will count how many possible double precision floating point
+ /// values are between the left and the right number. If the number of possible
+ /// values between both numbers is less than or equal to maxUlps, then the numbers
+ /// are considered as being equal.
+ /// </para>
+ /// <para>
+ /// Implementation partially follows the code outlined here:
+ /// http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/
+ /// </para>
+ /// </remarks>
+ public static bool AreAlmostEqualUlps(double left, double right, long maxUlps)
+ {
+ DoubleLongUnion leftUnion = new DoubleLongUnion();
+ DoubleLongUnion rightUnion = new DoubleLongUnion();
+
+ leftUnion.Double = left;
+ rightUnion.Double = right;
+
+ ulong leftSignMask = (leftUnion.ULong >> 63);
+ ulong rightSignMask = (rightUnion.ULong >> 63);
+
+ ulong leftTemp = ((0x8000000000000000 - leftUnion.ULong) & leftSignMask);
+ leftUnion.ULong = leftTemp | (leftUnion.ULong & ~leftSignMask);
+
+ ulong rightTemp = ((0x8000000000000000 - rightUnion.ULong) & rightSignMask);
+ rightUnion.ULong = rightTemp | (rightUnion.ULong & ~rightSignMask);
+
+ return (Math.Abs(leftUnion.Long - rightUnion.Long) <= maxUlps);
+ }
+
+ /// <summary>
+ /// Reinterprets the memory contents of a floating point value as an integer value
+ /// </summary>
+ /// <param name="value">
+ /// Floating point value whose memory contents to reinterpret
+ /// </param>
+ /// <returns>
+ /// The memory contents of the floating point value interpreted as an integer
+ /// </returns>
+ public static int ReinterpretAsInt(float value)
+ {
+ FloatIntUnion union = new FloatIntUnion();
+ union.Float = value;
+ return union.Int;
+ }
+
+ /// <summary>
+ /// Reinterprets the memory contents of a double precision floating point
+ /// value as an integer value
+ /// </summary>
+ /// <param name="value">
+ /// Double precision floating point value whose memory contents to reinterpret
+ /// </param>
+ /// <returns>
+ /// The memory contents of the double precision floating point value
+ /// interpreted as an integer
+ /// </returns>
+ public static long ReinterpretAsLong(double value)
+ {
+ DoubleLongUnion union = new DoubleLongUnion();
+ union.Double = value;
+ return union.Long;
+ }
+
+ /// <summary>
+ /// Reinterprets the memory contents of an integer as a floating point value
+ /// </summary>
+ /// <param name="value">Integer value whose memory contents to reinterpret</param>
+ /// <returns>
+ /// The memory contents of the integer value interpreted as a floating point value
+ /// </returns>
+ public static float ReinterpretAsFloat(int value)
+ {
+ FloatIntUnion union = new FloatIntUnion();
+ union.Int = value;
+ return union.Float;
+ }
+
+ /// <summary>
+ /// Reinterprets the memory contents of an integer value as a double precision
+ /// floating point value
+ /// </summary>
+ /// <param name="value">Integer whose memory contents to reinterpret</param>
+ /// <returns>
+ /// The memory contents of the integer interpreted as a double precision
+ /// floating point value
+ /// </returns>
+ public static double ReinterpretAsDouble(long value)
+ {
+ DoubleLongUnion union = new DoubleLongUnion();
+ union.Long = value;
+ return union.Double;
+ }
+
+ private FloatingPointNumerics()
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/GreaterThanConstraint.cs b/external/guiunit/src/framework/Constraints/GreaterThanConstraint.cs
new file mode 100755
index 0000000..bcf4aef
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/GreaterThanConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is greater than the value supplied to its constructor
+ /// </summary>
+ public class GreaterThanConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// The value against which a comparison is to be made
+ /// </summary>
+ private object expected;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public GreaterThanConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("greater than");
+ writer.WriteExpectedValue(expected);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (expected == null || actual == null)
+ throw new ArgumentException("Cannot compare using a null reference");
+
+ return comparer.Compare(actual, expected) > 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/GreaterThanOrEqualConstraint.cs b/external/guiunit/src/framework/Constraints/GreaterThanOrEqualConstraint.cs
new file mode 100755
index 0000000..a885858
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/GreaterThanOrEqualConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is greater than or equal to the value supplied to its constructor
+ /// </summary>
+ public class GreaterThanOrEqualConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// The value against which a comparison is to be made
+ /// </summary>
+ private object expected;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public GreaterThanOrEqualConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("greater than or equal to");
+ writer.WriteExpectedValue(expected);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (expected == null || actual == null)
+ throw new ArgumentException("Cannot compare using a null reference");
+
+ return comparer.Compare(actual, expected) >= 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/IResolveConstraint.cs b/external/guiunit/src/framework/Constraints/IResolveConstraint.cs
new file mode 100755
index 0000000..eb19988
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/IResolveConstraint.cs
@@ -0,0 +1,38 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// The IConstraintExpression interface is implemented by all
+ /// complete and resolvable constraints and expressions.
+ /// </summary>
+ public interface IResolveConstraint
+ {
+ /// <summary>
+ /// Return the top-level constraint for this expression
+ /// </summary>
+ /// <returns></returns>
+ Constraint Resolve();
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/InstanceOfTypeConstraint.cs b/external/guiunit/src/framework/Constraints/InstanceOfTypeConstraint.cs
new file mode 100755
index 0000000..435e081
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/InstanceOfTypeConstraint.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// InstanceOfTypeConstraint is used to test that an object
+ /// is of the same type provided or derived from it.
+ /// </summary>
+ public class InstanceOfTypeConstraint : TypeConstraint
+ {
+ /// <summary>
+ /// Construct an InstanceOfTypeConstraint for the type provided
+ /// </summary>
+ /// <param name="type">The expected Type</param>
+ public InstanceOfTypeConstraint(Type type)
+ : base(type)
+ {
+ this.DisplayName = "instanceof";
+ }
+
+ /// <summary>
+ /// Test whether an object is of the specified type or a derived type
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True if the object is of the provided type or derives from it, otherwise false.</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual != null && expectedType.IsInstanceOfType(actual);
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to use</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("instance of");
+ writer.WriteExpectedValue(expectedType);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/LessThanConstraint.cs b/external/guiunit/src/framework/Constraints/LessThanConstraint.cs
new file mode 100755
index 0000000..87651a9
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/LessThanConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is less than the value supplied to its constructor
+ /// </summary>
+ public class LessThanConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// The value against which a comparison is to be made
+ /// </summary>
+ private object expected;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:LessThanConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public LessThanConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("less than");
+ writer.WriteExpectedValue(expected);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (expected == null || actual == null)
+ throw new ArgumentException("Cannot compare using a null reference");
+
+ return comparer.Compare(actual, expected) < 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/LessThanOrEqualConstraint.cs b/external/guiunit/src/framework/Constraints/LessThanOrEqualConstraint.cs
new file mode 100755
index 0000000..829e62e
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/LessThanOrEqualConstraint.cs
@@ -0,0 +1,73 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Tests whether a value is less than or equal to the value supplied to its constructor
+ /// </summary>
+ public class LessThanOrEqualConstraint : ComparisonConstraint
+ {
+ /// <summary>
+ /// The value against which a comparison is to be made
+ /// </summary>
+ private object expected;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public LessThanOrEqualConstraint(object expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("less than or equal to");
+ writer.WriteExpectedValue(expected);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (expected == null || actual == null)
+ throw new ArgumentException("Cannot compare using a null reference");
+
+ return comparer.Compare(actual, expected) <= 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/MessageWriter.cs b/external/guiunit/src/framework/Constraints/MessageWriter.cs
new file mode 100755
index 0000000..11adc87
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/MessageWriter.cs
@@ -0,0 +1,154 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.IO;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// MessageWriter is the abstract base for classes that write
+ /// constraint descriptions and messages in some form. The
+ /// class has separate methods for writing various components
+ /// of a message, allowing implementations to tailor the
+ /// presentation as needed.
+ /// </summary>
+ public abstract class MessageWriter : StringWriter
+ {
+
+ /// <summary>
+ /// Construct a MessageWriter given a culture
+ /// </summary>
+ protected MessageWriter() : base(System.Globalization.CultureInfo.InvariantCulture) { }
+
+ /// <summary>
+ /// Abstract method to get the max line length
+ /// </summary>
+ public abstract int MaxLineLength { get; set; }
+
+ /// <summary>
+ /// Method to write single line message with optional args, usually
+ /// written to precede the general failure message.
+ /// </summary>
+ /// <param name="message">The message to be written</param>
+ /// <param name="args">Any arguments used in formatting the message</param>
+ public void WriteMessageLine(string message, params object[] args)
+ {
+ WriteMessageLine(0, message, args);
+ }
+
+ /// <summary>
+ /// Method to write single line message with optional args, usually
+ /// written to precede the general failure message, at a givel
+ /// indentation level.
+ /// </summary>
+ /// <param name="level">The indentation level of the message</param>
+ /// <param name="message">The message to be written</param>
+ /// <param name="args">Any arguments used in formatting the message</param>
+ public abstract void WriteMessageLine(int level, string message, params object[] args);
+
+ /// <summary>
+ /// Display Expected and Actual lines for a constraint. This
+ /// is called by MessageWriter's default implementation of
+ /// WriteMessageTo and provides the generic two-line display.
+ /// </summary>
+ /// <param name="constraint">The constraint that failed</param>
+ public abstract void DisplayDifferences(Constraint constraint);
+
+ /// <summary>
+ /// Display Expected and Actual lines for given values. This
+ /// method may be called by constraints that need more control over
+ /// the display of actual and expected values than is provided
+ /// by the default implementation.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value causing the failure</param>
+ public abstract void DisplayDifferences(object expected, object actual);
+
+ /// <summary>
+ /// Display Expected and Actual lines for given values, including
+ /// a tolerance value on the Expected line.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value causing the failure</param>
+ /// <param name="tolerance">The tolerance within which the test was made</param>
+ public abstract void DisplayDifferences(object expected, object actual, Tolerance tolerance);
+
+ /// <summary>
+ /// Display the expected and actual string values on separate lines.
+ /// If the mismatch parameter is >=0, an additional line is displayed
+ /// line containing a caret that points to the mismatch point.
+ /// </summary>
+ /// <param name="expected">The expected string value</param>
+ /// <param name="actual">The actual string value</param>
+ /// <param name="mismatch">The point at which the strings don't match or -1</param>
+ /// <param name="ignoreCase">If true, case is ignored in locating the point where the strings differ</param>
+ /// <param name="clipping">If true, the strings should be clipped to fit the line</param>
+ public abstract void DisplayStringDifferences(string expected, string actual, int mismatch, bool ignoreCase, bool clipping);
+
+ /// <summary>
+ /// Writes the text for a connector.
+ /// </summary>
+ /// <param name="connector">The connector.</param>
+ public abstract void WriteConnector(string connector);
+
+ /// <summary>
+ /// Writes the text for a predicate.
+ /// </summary>
+ /// <param name="predicate">The predicate.</param>
+ public abstract void WritePredicate(string predicate);
+
+ /// <summary>
+ /// Writes the text for an expected value.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public abstract void WriteExpectedValue(object expected);
+
+ /// <summary>
+ /// Writes the text for a modifier
+ /// </summary>
+ /// <param name="modifier">The modifier.</param>
+ public abstract void WriteModifier(string modifier);
+
+ /// <summary>
+ /// Writes the text for an actual value.
+ /// </summary>
+ /// <param name="actual">The actual value.</param>
+ public abstract void WriteActualValue(object actual);
+
+ /// <summary>
+ /// Writes the text for a generalized value.
+ /// </summary>
+ /// <param name="val">The value.</param>
+ public abstract void WriteValue(object val);
+
+ /// <summary>
+ /// Writes the text for a collection value,
+ /// starting at a particular point, to a max length
+ /// </summary>
+ /// <param name="collection">The collection containing elements to write.</param>
+ /// <param name="start">The starting point of the elements to write</param>
+ /// <param name="max">The maximum number of elements to write</param>
+ public abstract void WriteCollectionElements(IEnumerable collection, int start, int max);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/MsgUtils.cs b/external/guiunit/src/framework/Constraints/MsgUtils.cs
new file mode 100755
index 0000000..c6e1fe1
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/MsgUtils.cs
@@ -0,0 +1,282 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Text;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Static methods used in creating messages
+ /// </summary>
+ public class MsgUtils
+ {
+ /// <summary>
+ /// Static string used when strings are clipped
+ /// </summary>
+ private const string ELLIPSIS = "...";
+
+ /// <summary>
+ /// Returns the representation of a type as used in NUnitLite.
+ /// This is the same as Type.ToString() except for arrays,
+ /// which are displayed with their declared sizes.
+ /// </summary>
+ /// <param name="obj"></param>
+ /// <returns></returns>
+ public static string GetTypeRepresentation(object obj)
+ {
+ Array array = obj as Array;
+ if (array == null)
+ return string.Format("<{0}>", obj.GetType());
+
+ StringBuilder sb = new StringBuilder();
+ Type elementType = array.GetType();
+ int nest = 0;
+ while (elementType.IsArray)
+ {
+ elementType = elementType.GetElementType();
+ ++nest;
+ }
+ sb.Append(elementType.ToString());
+ sb.Append('[');
+ for (int r = 0; r < array.Rank; r++)
+ {
+ if (r > 0) sb.Append(',');
+ sb.Append(array.GetLength(r));
+ }
+ sb.Append(']');
+
+ while (--nest > 0)
+ sb.Append("[]");
+
+ return string.Format("<{0}>", sb.ToString());
+ }
+ /// <summary>
+ /// Converts any control characters in a string
+ /// to their escaped representation.
+ /// </summary>
+ /// <param name="s">The string to be converted</param>
+ /// <returns>The converted string</returns>
+ public static string EscapeControlChars(string s)
+ {
+ if (s != null)
+ {
+ StringBuilder sb = new StringBuilder();
+
+ foreach (char c in s)
+ {
+ switch (c)
+ {
+ //case '\'':
+ // sb.Append("\\\'");
+ // break;
+ //case '\"':
+ // sb.Append("\\\"");
+ // break;
+ case '\\':
+ sb.Append("\\\\");
+ break;
+ case '\0':
+ sb.Append("\\0");
+ break;
+ case '\a':
+ sb.Append("\\a");
+ break;
+ case '\b':
+ sb.Append("\\b");
+ break;
+ case '\f':
+ sb.Append("\\f");
+ break;
+ case '\n':
+ sb.Append("\\n");
+ break;
+ case '\r':
+ sb.Append("\\r");
+ break;
+ case '\t':
+ sb.Append("\\t");
+ break;
+ case '\v':
+ sb.Append("\\v");
+ break;
+
+ case '\x0085':
+ case '\x2028':
+ case '\x2029':
+ sb.Append(string.Format("\\x{0:X4}", (int)c));
+ break;
+
+ default:
+ sb.Append(c);
+ break;
+ }
+ }
+
+ s = sb.ToString();
+ }
+
+ return s;
+ }
+
+ /// <summary>
+ /// Return the a string representation for a set of indices into an array
+ /// </summary>
+ /// <param name="indices">Array of indices for which a string is needed</param>
+ public static string GetArrayIndicesAsString(int[] indices)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append('[');
+ for (int r = 0; r < indices.Length; r++)
+ {
+ if (r > 0) sb.Append(',');
+ sb.Append(indices[r].ToString());
+ }
+ sb.Append(']');
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// Get an array of indices representing the point in a enumerable,
+ /// collection or array corresponding to a single int index into the
+ /// collection.
+ /// </summary>
+ /// <param name="collection">The collection to which the indices apply</param>
+ /// <param name="index">Index in the collection</param>
+ /// <returns>Array of indices</returns>
+ public static int[] GetArrayIndicesFromCollectionIndex(IEnumerable collection, int index)
+ {
+ Array array = collection as Array;
+
+ int rank = array == null ? 1 : array.Rank;
+ int[] result = new int[rank];
+
+ for (int r = rank; --r > 0; )
+ {
+ int l = array.GetLength(r);
+ result[r] = index % l;
+ index /= l;
+ }
+
+ result[0] = index;
+ return result;
+ }
+
+ /// <summary>
+ /// Clip a string to a given length, starting at a particular offset, returning the clipped
+ /// string with ellipses representing the removed parts
+ /// </summary>
+ /// <param name="s">The string to be clipped</param>
+ /// <param name="maxStringLength">The maximum permitted length of the result string</param>
+ /// <param name="clipStart">The point at which to start clipping</param>
+ /// <returns>The clipped string</returns>
+ public static string ClipString(string s, int maxStringLength, int clipStart)
+ {
+ int clipLength = maxStringLength;
+ StringBuilder sb = new StringBuilder();
+
+ if (clipStart > 0)
+ {
+ clipLength -= ELLIPSIS.Length;
+ sb.Append(ELLIPSIS);
+ }
+
+ if (s.Length - clipStart > clipLength)
+ {
+ clipLength -= ELLIPSIS.Length;
+ sb.Append(s.Substring(clipStart, clipLength));
+ sb.Append(ELLIPSIS);
+ }
+ else if (clipStart > 0)
+ sb.Append(s.Substring(clipStart));
+ else
+ sb.Append(s);
+
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// Clip the expected and actual strings in a coordinated fashion,
+ /// so that they may be displayed together.
+ /// </summary>
+ /// <param name="expected"></param>
+ /// <param name="actual"></param>
+ /// <param name="maxDisplayLength"></param>
+ /// <param name="mismatch"></param>
+ public static void ClipExpectedAndActual(ref string expected, ref string actual, int maxDisplayLength, int mismatch)
+ {
+ // Case 1: Both strings fit on line
+ int maxStringLength = Math.Max(expected.Length, actual.Length);
+ if (maxStringLength <= maxDisplayLength)
+ return;
+
+ // Case 2: Assume that the tail of each string fits on line
+ int clipLength = maxDisplayLength - ELLIPSIS.Length;
+ int clipStart = maxStringLength - clipLength;
+
+ // Case 3: If it doesn't, center the mismatch position
+ if (clipStart > mismatch)
+ clipStart = Math.Max(0, mismatch - clipLength / 2);
+
+ expected = ClipString(expected, maxDisplayLength, clipStart);
+ actual = ClipString(actual, maxDisplayLength, clipStart);
+ }
+
+ /// <summary>
+ /// Shows the position two strings start to differ. Comparison
+ /// starts at the start index.
+ /// </summary>
+ /// <param name="expected">The expected string</param>
+ /// <param name="actual">The actual string</param>
+ /// <param name="istart">The index in the strings at which comparison should start</param>
+ /// <param name="ignoreCase">Boolean indicating whether case should be ignored</param>
+ /// <returns>-1 if no mismatch found, or the index where mismatch found</returns>
+ static public int FindMismatchPosition(string expected, string actual, int istart, bool ignoreCase)
+ {
+ int length = Math.Min(expected.Length, actual.Length);
+
+ string s1 = ignoreCase ? expected.ToLower() : expected;
+ string s2 = ignoreCase ? actual.ToLower() : actual;
+
+ for (int i = istart; i < length; i++)
+ {
+ if (s1[i] != s2[i])
+ return i;
+ }
+
+ //
+ // Strings have same content up to the length of the shorter string.
+ // Mismatch occurs because string lengths are different, so show
+ // that they start differing where the shortest string ends
+ //
+ if (expected.Length != actual.Length)
+ return length;
+
+ //
+ // Same strings : We shouldn't get here
+ //
+ return -1;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NUnitComparer.cs b/external/guiunit/src/framework/Constraints/NUnitComparer.cs
new file mode 100755
index 0000000..d774f0a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NUnitComparer.cs
@@ -0,0 +1,80 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using System.Reflection;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NUnitComparer encapsulates NUnit's default behavior
+ /// in comparing two objects.
+ /// </summary>
+ public class NUnitComparer : IComparer
+ {
+ /// <summary>
+ /// Returns the default NUnitComparer.
+ /// </summary>
+ public static NUnitComparer Default
+ {
+ get { return new NUnitComparer(); }
+ }
+
+ /// <summary>
+ /// Compares two objects
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ /// <returns></returns>
+ public int Compare(object x, object y)
+ {
+ if (x == null)
+ return y == null ? 0 : -1;
+ else if (y == null)
+ return +1;
+
+ if (Numerics.IsNumericType(x) && Numerics.IsNumericType(y))
+ return Numerics.Compare(x, y);
+
+ if (x is IComparable)
+ return ((IComparable)x).CompareTo(y);
+
+ if (y is IComparable)
+ return -((IComparable)y).CompareTo(x);
+
+ Type xType = x.GetType();
+ Type yType = y.GetType();
+
+ MethodInfo method = xType.GetMethod("CompareTo", new Type[] { yType });
+ if (method != null)
+ return (int)method.Invoke(x, new object[] { y });
+
+ method = yType.GetMethod("CompareTo", new Type[] { xType });
+ if (method != null)
+ return -(int)method.Invoke(y, new object[] { x });
+
+ throw new ArgumentException("Neither value implements IComparable or IComparable<T>");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NUnitEqualityComparer.cs b/external/guiunit/src/framework/Constraints/NUnitEqualityComparer.cs
new file mode 100755
index 0000000..d3bc1bd
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NUnitEqualityComparer.cs
@@ -0,0 +1,482 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.IO;
+using System.Collections;
+using System.Reflection;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NUnitEqualityComparer encapsulates NUnit's handling of
+ /// equality tests between objects.
+ /// </summary>
+ public class NUnitEqualityComparer
+ {
+ #region Static and Instance Fields
+
+ /// <summary>
+ /// If true, all string comparisons will ignore case
+ /// </summary>
+ private bool caseInsensitive;
+
+ /// <summary>
+ /// If true, arrays will be treated as collections, allowing
+ /// those of different dimensions to be compared
+ /// </summary>
+ private bool compareAsCollection;
+
+ /// <summary>
+ /// Comparison objects used in comparisons for some constraints.
+ /// </summary>
+ private EqualityAdapterList externalComparers = new EqualityAdapterList();
+
+ /// <summary>
+ /// List of points at which a failure occured.
+ /// </summary>
+ private FailurePointList failurePoints;
+
+ /// <summary>
+ /// RecursionDetector used to check for recursion when
+ /// evaluating self-referencing enumerables.
+ /// </summary>
+ private RecursionDetector recursionDetector;
+
+ private static readonly int BUFFER_SIZE = 4096;
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Returns the default NUnitEqualityComparer
+ /// </summary>
+ public static NUnitEqualityComparer Default
+ {
+ get { return new NUnitEqualityComparer(); }
+ }
+ /// <summary>
+ /// Gets and sets a flag indicating whether case should
+ /// be ignored in determining equality.
+ /// </summary>
+ public bool IgnoreCase
+ {
+ get { return caseInsensitive; }
+ set { caseInsensitive = value; }
+ }
+
+ /// <summary>
+ /// Gets and sets a flag indicating that arrays should be
+ /// compared as collections, without regard to their shape.
+ /// </summary>
+ public bool CompareAsCollection
+ {
+ get { return compareAsCollection; }
+ set { compareAsCollection = value; }
+ }
+
+ /// <summary>
+ /// Gets the list of external comparers to be used to
+ /// test for equality. They are applied to members of
+ /// collections, in place of NUnit's own logic.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public IList<EqualityAdapter> ExternalComparers
+#else
+ public IList ExternalComparers
+#endif
+ {
+ get { return externalComparers; }
+ }
+
+ /// <summary>
+ /// Gets the list of failure points for the last Match performed.
+ /// The list consists of objects to be interpreted by the caller.
+ /// This generally means that the caller may only make use of
+ /// objects it has placed on the list at a particular depthy.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public IList<FailurePoint> FailurePoints
+#else
+ public IList FailurePoints
+#endif
+ {
+ get { return failurePoints; }
+ }
+ #endregion
+
+ #region Public Methods
+ /// <summary>
+ /// Compares two objects for equality within a tolerance, setting
+ /// the tolerance to the actual tolerance used if an empty
+ /// tolerance is supplied.
+ /// </summary>
+ public bool AreEqual(object expected, object actual, ref Tolerance tolerance)
+ {
+ this.failurePoints = new FailurePointList();
+ this.recursionDetector = new RecursionDetector();
+
+ return ObjectsEqual(expected, actual, ref tolerance);
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private bool ObjectsEqual(object expected, object actual, ref Tolerance tolerance)
+ {
+ if (expected == null && actual == null)
+ return true;
+
+ if (expected == null || actual == null)
+ return false;
+
+ if (object.ReferenceEquals(expected, actual))
+ return true;
+
+ Type xType = expected.GetType();
+ Type yType = actual.GetType();
+
+ EqualityAdapter externalComparer = GetExternalComparer(expected, actual);
+ if (externalComparer != null)
+ return externalComparer.AreEqual(expected, actual);
+
+ if (xType.IsArray && yType.IsArray && !compareAsCollection)
+ return ArraysEqual((Array)expected, (Array)actual, ref tolerance);
+
+ if (expected is IDictionary && actual is IDictionary)
+ return DictionariesEqual((IDictionary)expected, (IDictionary)actual, ref tolerance);
+
+ if (expected is IEnumerable && actual is IEnumerable && !(expected is string && actual is string))
+ return EnumerablesEqual((IEnumerable)expected, (IEnumerable)actual, ref tolerance);
+
+ if (expected is string && actual is string)
+ return StringsEqual((string)expected, (string)actual);
+
+ if (expected is Stream && actual is Stream)
+ return StreamsEqual((Stream)expected, (Stream)actual);
+
+ if (expected is DirectoryInfo && actual is DirectoryInfo)
+ return DirectoriesEqual((DirectoryInfo)expected, (DirectoryInfo)actual);
+
+ if (Numerics.IsNumericType(expected) && Numerics.IsNumericType(actual))
+ return Numerics.AreEqual(expected, actual, ref tolerance);
+
+ if (tolerance != null && tolerance.Value is TimeSpan)
+ {
+ TimeSpan amount = (TimeSpan)tolerance.Value;
+
+ if (expected is DateTime && actual is DateTime)
+ return ((DateTime)expected - (DateTime)actual).Duration() <= amount;
+
+ if (expected is TimeSpan && actual is TimeSpan)
+ return ((TimeSpan)expected - (TimeSpan)actual).Duration() <= amount;
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ if (FirstImplementsIEquatableOfSecond(xType, yType))
+ return InvokeFirstIEquatableEqualsSecond(expected, actual);
+ else if (FirstImplementsIEquatableOfSecond(yType, xType))
+ return InvokeFirstIEquatableEqualsSecond(actual, expected);
+#endif
+
+ return expected.Equals(actual);
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ private static bool FirstImplementsIEquatableOfSecond(Type first, Type second)
+ {
+ Type[] equatableArguments = GetEquatableGenericArguments(first);
+
+ foreach (var xEquatableArgument in equatableArguments)
+ if (xEquatableArgument.Equals(second))
+ return true;
+
+ return false;
+ }
+
+ private static Type[] GetEquatableGenericArguments(Type type)
+ {
+ foreach (Type @interface in type.GetInterfaces())
+ if (@interface.IsGenericType && @interface.GetGenericTypeDefinition().Equals(typeof(IEquatable<>)))
+ return @interface.GetGenericArguments();
+
+ return new Type[0];
+ }
+
+ private static bool InvokeFirstIEquatableEqualsSecond(object first, object second)
+ {
+ MethodInfo equals = typeof(IEquatable<>).MakeGenericType(second.GetType()).GetMethod("Equals");
+
+ return (bool)equals.Invoke(first, new object[] { second });
+ }
+#endif
+
+ private EqualityAdapter GetExternalComparer(object x, object y)
+ {
+ foreach (EqualityAdapter adapter in externalComparers)
+ if (adapter.CanCompare(x, y))
+ return adapter;
+
+ return null;
+ }
+
+ /// <summary>
+ /// Helper method to compare two arrays
+ /// </summary>
+ private bool ArraysEqual(Array expected, Array actual, ref Tolerance tolerance)
+ {
+ int rank = expected.Rank;
+
+ if (rank != actual.Rank)
+ return false;
+
+ for (int r = 1; r < rank; r++)
+ if (expected.GetLength(r) != actual.GetLength(r))
+ return false;
+
+ return EnumerablesEqual((IEnumerable)expected, (IEnumerable)actual, ref tolerance);
+ }
+
+ private bool DictionariesEqual(IDictionary expected, IDictionary actual, ref Tolerance tolerance)
+ {
+ if (expected.Count != actual.Count)
+ return false;
+
+ CollectionTally tally = new CollectionTally(this, expected.Keys);
+ if (!tally.TryRemove(actual.Keys) || tally.Count > 0)
+ return false;
+
+ foreach (object key in expected.Keys)
+ if (!ObjectsEqual(expected[key], actual[key], ref tolerance))
+ return false;
+
+ return true;
+ }
+
+ private bool StringsEqual(string expected, string actual)
+ {
+ string s1 = caseInsensitive ? expected.ToLower() : expected;
+ string s2 = caseInsensitive ? actual.ToLower() : actual;
+
+ return s1.Equals(s2);
+ }
+
+ private bool EnumerablesEqual(IEnumerable expected, IEnumerable actual, ref Tolerance tolerance)
+ {
+ if (recursionDetector.CheckRecursion(expected, actual))
+ return false;
+
+ IEnumerator expectedEnum = expected.GetEnumerator();
+ IEnumerator actualEnum = actual.GetEnumerator();
+
+ int count;
+ for (count = 0; ; count++)
+ {
+ bool expectedHasData = expectedEnum.MoveNext();
+ bool actualHasData = actualEnum.MoveNext();
+
+ if (!expectedHasData && !actualHasData)
+ return true;
+
+ if (expectedHasData != actualHasData ||
+ !ObjectsEqual(expectedEnum.Current, actualEnum.Current, ref tolerance))
+ {
+ FailurePoint fp = new FailurePoint();
+ fp.Position = count;
+ fp.ExpectedHasData = expectedHasData;
+ if (expectedHasData)
+ fp.ExpectedValue = expectedEnum.Current;
+ fp.ActualHasData = actualHasData;
+ if (actualHasData)
+ fp.ActualValue = actualEnum.Current;
+ failurePoints.Insert(0, fp);
+ return false;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Method to compare two DirectoryInfo objects
+ /// </summary>
+ /// <param name="expected">first directory to compare</param>
+ /// <param name="actual">second directory to compare</param>
+ /// <returns>true if equivalent, false if not</returns>
+ private static bool DirectoriesEqual(DirectoryInfo expected, DirectoryInfo actual)
+ {
+ // Do quick compares first
+ if (expected.Attributes != actual.Attributes ||
+ expected.CreationTime != actual.CreationTime ||
+ expected.LastAccessTime != actual.LastAccessTime)
+ {
+ return false;
+ }
+
+ // TODO: Find a cleaner way to do this
+ return new SamePathConstraint(expected.FullName).Matches(actual.FullName);
+ }
+
+ private bool StreamsEqual(Stream expected, Stream actual)
+ {
+ if (expected == actual) return true;
+
+ if (!expected.CanRead)
+ throw new ArgumentException("Stream is not readable", "expected");
+ if (!actual.CanRead)
+ throw new ArgumentException("Stream is not readable", "actual");
+ if (!expected.CanSeek)
+ throw new ArgumentException("Stream is not seekable", "expected");
+ if (!actual.CanSeek)
+ throw new ArgumentException("Stream is not seekable", "actual");
+
+ if (expected.Length != actual.Length) return false;
+
+ byte[] bufferExpected = new byte[BUFFER_SIZE];
+ byte[] bufferActual = new byte[BUFFER_SIZE];
+
+ BinaryReader binaryReaderExpected = new BinaryReader(expected);
+ BinaryReader binaryReaderActual = new BinaryReader(actual);
+
+ long expectedPosition = expected.Position;
+ long actualPosition = actual.Position;
+
+ try
+ {
+ binaryReaderExpected.BaseStream.Seek(0, SeekOrigin.Begin);
+ binaryReaderActual.BaseStream.Seek(0, SeekOrigin.Begin);
+
+ for (long readByte = 0; readByte < expected.Length; readByte += BUFFER_SIZE)
+ {
+ binaryReaderExpected.Read(bufferExpected, 0, BUFFER_SIZE);
+ binaryReaderActual.Read(bufferActual, 0, BUFFER_SIZE);
+
+ for (int count = 0; count < BUFFER_SIZE; ++count)
+ {
+ if (bufferExpected[count] != bufferActual[count])
+ {
+ FailurePoint fp = new FailurePoint();
+ fp.Position = (int)readByte + count;
+ failurePoints.Insert(0, fp);
+ return false;
+ }
+ }
+ }
+ }
+ finally
+ {
+ expected.Position = expectedPosition;
+ actual.Position = actualPosition;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ #region Nested RecursionDetector class
+
+ /// <summary>
+ /// RecursionDetector detects when a comparison
+ /// between two enumerables has reached a point
+ /// where the same objects that were previously
+ /// compared are again being compared. This allows
+ /// the caller to stop the comparison if desired.
+ /// </summary>
+ class RecursionDetector
+ {
+#if CLR_2_0 || CLR_4_0
+ readonly Dictionary<UnorderedReferencePair, object> table = new Dictionary<UnorderedReferencePair, object>();
+#else
+ readonly Hashtable table = new Hashtable();
+#endif
+
+ /// <summary>
+ /// Check whether two objects have previously
+ /// been compared, returning true if they have.
+ /// The two objects are remembered, so that a
+ /// second call will always return true.
+ /// </summary>
+ public bool CheckRecursion(IEnumerable expected, IEnumerable actual)
+ {
+ UnorderedReferencePair pair = new UnorderedReferencePair(expected, actual);
+
+ if (ContainsPair(pair))
+ return true;
+
+ table.Add(pair, null);
+ return false;
+ }
+
+ private bool ContainsPair(UnorderedReferencePair pair)
+ {
+#if CLR_2_0 || CLR_4_0
+ return table.ContainsKey(pair);
+#else
+ return table.Contains(pair);
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ class UnorderedReferencePair : IEquatable<UnorderedReferencePair>
+#else
+ class UnorderedReferencePair
+#endif
+ {
+ private readonly object first;
+ private readonly object second;
+
+ public UnorderedReferencePair(object first, object second)
+ {
+ this.first = first;
+ this.second = second;
+ }
+
+ public bool Equals(UnorderedReferencePair other)
+ {
+ return (Equals(first, other.first) && Equals(second, other.second)) ||
+ (Equals(first, other.second) && Equals(second, other.first));
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ return obj is UnorderedReferencePair && Equals((UnorderedReferencePair)obj);
+ }
+
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ return ((first != null ? first.GetHashCode() : 0) * 397) ^ ((second != null ? second.GetHashCode() : 0) * 397);
+ }
+ }
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NaNConstraint.cs b/external/guiunit/src/framework/Constraints/NaNConstraint.cs
new file mode 100755
index 0000000..0f087d7
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NaNConstraint.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NaNConstraint tests that the actual value is a double or float NaN
+ /// </summary>
+ public class NaNConstraint : Constraint
+ {
+ /// <summary>
+ /// Test that the actual value is an NaN
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return actual is double && double.IsNaN((double)actual)
+ || actual is float && float.IsNaN((float)actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a specified writer
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("NaN");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NoItemConstraint.cs b/external/guiunit/src/framework/Constraints/NoItemConstraint.cs
new file mode 100755
index 0000000..9431144
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NoItemConstraint.cs
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NoItemConstraint applies another constraint to each
+ /// item in a collection, failing if any of them succeeds.
+ /// </summary>
+ public class NoItemConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct a NoItemConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public NoItemConstraint(Constraint itemConstraint)
+ : base(itemConstraint)
+ {
+ this.DisplayName = "none";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// failing if any item fails.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is IEnumerable))
+ throw new ArgumentException("The actual value must be an IEnumerable", "actual");
+
+ foreach (object item in (IEnumerable)actual)
+ if (baseConstraint.Matches(item))
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("no item");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NotConstraint.cs b/external/guiunit/src/framework/Constraints/NotConstraint.cs
new file mode 100755
index 0000000..36f1196
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NotConstraint.cs
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NotConstraint negates the effect of some other constraint
+ /// </summary>
+ public class NotConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NotConstraint"/> class.
+ /// </summary>
+ /// <param name="baseConstraint">The base constraint to be negated.</param>
+ public NotConstraint(Constraint baseConstraint)
+ : base(baseConstraint) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for if the base constraint fails, false if it succeeds</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ return !baseConstraint.Matches(actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("not");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a MessageWriter.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ baseConstraint.WriteActualValueTo(writer);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NullConstraint.cs b/external/guiunit/src/framework/Constraints/NullConstraint.cs
new file mode 100755
index 0000000..a8bfe04
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NullConstraint.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NullConstraint tests that the actual value is null
+ /// </summary>
+ public class NullConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:NullConstraint"/> class.
+ /// </summary>
+ public NullConstraint() : base(null, "null") { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/NullOrEmptyStringConstraint.cs b/external/guiunit/src/framework/Constraints/NullOrEmptyStringConstraint.cs
new file mode 100755
index 0000000..7731d74
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/NullOrEmptyStringConstraint.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// NullEmptyStringConstraint tests whether a string is either null or empty.
+ /// </summary>
+ public class NullOrEmptyStringConstraint : Constraint
+ {
+ /// <summary>
+ /// Constructs a new NullOrEmptyStringConstraint
+ /// </summary>
+ public NullOrEmptyStringConstraint()
+ {
+ this.DisplayName = "nullorempty";
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ // NOTE: Do not change this to use string.IsNullOrEmpty
+ // since that won't work in earlier versions of .NET
+
+ this.actual = actual;
+
+ if (actual == null) return true;
+
+ string actualAsString = actual as string;
+
+ if (actualAsString == null)
+ throw new ArgumentException("Actual value must be a string", "actual");
+
+ return actualAsString == string.Empty;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("null or empty string");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Numerics.cs b/external/guiunit/src/framework/Constraints/Numerics.cs
new file mode 100755
index 0000000..20ada05
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Numerics.cs
@@ -0,0 +1,380 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// The Numerics class contains common operations on numeric values.
+ /// </summary>
+ public class Numerics
+ {
+ #region Numeric Type Recognition
+ /// <summary>
+ /// Checks the type of the object, returning true if
+ /// the object is a numeric type.
+ /// </summary>
+ /// <param name="obj">The object to check</param>
+ /// <returns>true if the object is a numeric type</returns>
+ public static bool IsNumericType(Object obj)
+ {
+ return IsFloatingPointNumeric(obj) || IsFixedPointNumeric(obj);
+ }
+
+ /// <summary>
+ /// Checks the type of the object, returning true if
+ /// the object is a floating point numeric type.
+ /// </summary>
+ /// <param name="obj">The object to check</param>
+ /// <returns>true if the object is a floating point numeric type</returns>
+ public static bool IsFloatingPointNumeric(Object obj)
+ {
+ if (null != obj)
+ {
+ if (obj is System.Double) return true;
+ if (obj is System.Single) return true;
+ }
+ return false;
+ }
+ /// <summary>
+ /// Checks the type of the object, returning true if
+ /// the object is a fixed point numeric type.
+ /// </summary>
+ /// <param name="obj">The object to check</param>
+ /// <returns>true if the object is a fixed point numeric type</returns>
+ public static bool IsFixedPointNumeric(Object obj)
+ {
+ if (null != obj)
+ {
+ if (obj is System.Byte) return true;
+ if (obj is System.SByte) return true;
+ if (obj is System.Decimal) return true;
+ if (obj is System.Int32) return true;
+ if (obj is System.UInt32) return true;
+ if (obj is System.Int64) return true;
+ if (obj is System.UInt64) return true;
+ if (obj is System.Int16) return true;
+ if (obj is System.UInt16) return true;
+ }
+ return false;
+ }
+ #endregion
+
+ #region Numeric Equality
+ /// <summary>
+ /// Test two numeric values for equality, performing the usual numeric
+ /// conversions and using a provided or default tolerance. If the tolerance
+ /// provided is Empty, this method may set it to a default tolerance.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <param name="tolerance">A reference to the tolerance in effect</param>
+ /// <returns>True if the values are equal</returns>
+ public static bool AreEqual(object expected, object actual, ref Tolerance tolerance)
+ {
+ if (expected is double || actual is double)
+ return AreEqual(Convert.ToDouble(expected), Convert.ToDouble(actual), ref tolerance);
+
+ if (expected is float || actual is float)
+ return AreEqual(Convert.ToSingle(expected), Convert.ToSingle(actual), ref tolerance);
+
+ if (tolerance.Mode == ToleranceMode.Ulps)
+ throw new InvalidOperationException("Ulps may only be specified for floating point arguments");
+
+ if (expected is decimal || actual is decimal)
+ return AreEqual(Convert.ToDecimal(expected), Convert.ToDecimal(actual), tolerance);
+
+ if (expected is ulong || actual is ulong)
+ return AreEqual(Convert.ToUInt64(expected), Convert.ToUInt64(actual), tolerance);
+
+ if (expected is long || actual is long)
+ return AreEqual(Convert.ToInt64(expected), Convert.ToInt64(actual), tolerance);
+
+ if (expected is uint || actual is uint)
+ return AreEqual(Convert.ToUInt32(expected), Convert.ToUInt32(actual), tolerance);
+
+ return AreEqual(Convert.ToInt32(expected), Convert.ToInt32(actual), tolerance);
+ }
+
+ private static bool AreEqual(double expected, double actual, ref Tolerance tolerance)
+ {
+ if (double.IsNaN(expected) && double.IsNaN(actual))
+ return true;
+
+ // Handle infinity specially since subtracting two infinite values gives
+ // NaN and the following test fails. mono also needs NaN to be handled
+ // specially although ms.net could use either method. Also, handle
+ // situation where no tolerance is used.
+ if (double.IsInfinity(expected) || double.IsNaN(expected) || double.IsNaN(actual))
+ {
+ return expected.Equals(actual);
+ }
+
+ if (tolerance.IsEmpty && GlobalSettings.DefaultFloatingPointTolerance > 0.0d)
+ tolerance = new Tolerance(GlobalSettings.DefaultFloatingPointTolerance);
+
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ return Math.Abs(expected - actual) <= Convert.ToDouble(tolerance.Value);
+
+ case ToleranceMode.Percent:
+ if (expected == 0.0)
+ return expected.Equals(actual);
+
+ double relativeError = Math.Abs((expected - actual) / expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ case ToleranceMode.Ulps:
+ return FloatingPointNumerics.AreAlmostEqualUlps(
+ expected, actual, Convert.ToInt64(tolerance.Value));
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+ private static bool AreEqual(float expected, float actual, ref Tolerance tolerance)
+ {
+ if (float.IsNaN(expected) && float.IsNaN(actual))
+ return true;
+
+ // handle infinity specially since subtracting two infinite values gives
+ // NaN and the following test fails. mono also needs NaN to be handled
+ // specially although ms.net could use either method.
+ if (float.IsInfinity(expected) || float.IsNaN(expected) || float.IsNaN(actual))
+ {
+ return expected.Equals(actual);
+ }
+
+ if (tolerance.IsEmpty && GlobalSettings.DefaultFloatingPointTolerance > 0.0d)
+ tolerance = new Tolerance(GlobalSettings.DefaultFloatingPointTolerance);
+
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ return Math.Abs(expected - actual) <= Convert.ToDouble(tolerance.Value);
+
+ case ToleranceMode.Percent:
+ if (expected == 0.0f)
+ return expected.Equals(actual);
+ float relativeError = Math.Abs((expected - actual) / expected);
+ return (relativeError <= Convert.ToSingle(tolerance.Value) / 100.0f);
+
+ case ToleranceMode.Ulps:
+ return FloatingPointNumerics.AreAlmostEqualUlps(
+ expected, actual, Convert.ToInt32(tolerance.Value));
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+
+ private static bool AreEqual(decimal expected, decimal actual, Tolerance tolerance)
+ {
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ decimal decimalTolerance = Convert.ToDecimal(tolerance.Value);
+ if (decimalTolerance > 0m)
+ return Math.Abs(expected - actual) <= decimalTolerance;
+
+ return expected.Equals(actual);
+
+ case ToleranceMode.Percent:
+ if (expected == 0m)
+ return expected.Equals(actual);
+
+ double relativeError = Math.Abs(
+ (double)(expected - actual) / (double)expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+ private static bool AreEqual(ulong expected, ulong actual, Tolerance tolerance)
+ {
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ ulong ulongTolerance = Convert.ToUInt64(tolerance.Value);
+ if (ulongTolerance > 0ul)
+ {
+ ulong diff = expected >= actual ? expected - actual : actual - expected;
+ return diff <= ulongTolerance;
+ }
+
+ return expected.Equals(actual);
+
+ case ToleranceMode.Percent:
+ if (expected == 0ul)
+ return expected.Equals(actual);
+
+ // Can't do a simple Math.Abs() here since it's unsigned
+ ulong difference = Math.Max(expected, actual) - Math.Min(expected, actual);
+ double relativeError = Math.Abs((double)difference / (double)expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+ private static bool AreEqual(long expected, long actual, Tolerance tolerance)
+ {
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ long longTolerance = Convert.ToInt64(tolerance.Value);
+ if (longTolerance > 0L)
+ return Math.Abs(expected - actual) <= longTolerance;
+
+ return expected.Equals(actual);
+
+ case ToleranceMode.Percent:
+ if (expected == 0L)
+ return expected.Equals(actual);
+
+ double relativeError = Math.Abs(
+ (double)(expected - actual) / (double)expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+ private static bool AreEqual(uint expected, uint actual, Tolerance tolerance)
+ {
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ uint uintTolerance = Convert.ToUInt32(tolerance.Value);
+ if (uintTolerance > 0)
+ {
+ uint diff = expected >= actual ? expected - actual : actual - expected;
+ return diff <= uintTolerance;
+ }
+
+ return expected.Equals(actual);
+
+ case ToleranceMode.Percent:
+ if (expected == 0u)
+ return expected.Equals(actual);
+
+ // Can't do a simple Math.Abs() here since it's unsigned
+ uint difference = Math.Max(expected, actual) - Math.Min(expected, actual);
+ double relativeError = Math.Abs((double)difference / (double)expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+
+ private static bool AreEqual(int expected, int actual, Tolerance tolerance)
+ {
+ switch (tolerance.Mode)
+ {
+ case ToleranceMode.None:
+ return expected.Equals(actual);
+
+ case ToleranceMode.Linear:
+ int intTolerance = Convert.ToInt32(tolerance.Value);
+ if (intTolerance > 0)
+ return Math.Abs(expected - actual) <= intTolerance;
+
+ return expected.Equals(actual);
+
+ case ToleranceMode.Percent:
+ if (expected == 0)
+ return expected.Equals(actual);
+
+ double relativeError = Math.Abs(
+ (double)(expected - actual) / (double)expected);
+ return (relativeError <= Convert.ToDouble(tolerance.Value) / 100.0);
+
+ default:
+ throw new ArgumentException("Unknown tolerance mode specified", "mode");
+ }
+ }
+ #endregion
+
+ #region Numeric Comparisons
+ /// <summary>
+ /// Compare two numeric values, performing the usual numeric conversions.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value</param>
+ /// <returns>The relationship of the values to each other</returns>
+ public static int Compare(object expected, object actual)
+ {
+ if (!IsNumericType(expected) || !IsNumericType(actual))
+ throw new ArgumentException("Both arguments must be numeric");
+
+ if (IsFloatingPointNumeric(expected) || IsFloatingPointNumeric(actual))
+ return Convert.ToDouble(expected).CompareTo(Convert.ToDouble(actual));
+
+ if (expected is decimal || actual is decimal)
+ return Convert.ToDecimal(expected).CompareTo(Convert.ToDecimal(actual));
+
+ if (expected is ulong || actual is ulong)
+ return Convert.ToUInt64(expected).CompareTo(Convert.ToUInt64(actual));
+
+ if (expected is long || actual is long)
+ return Convert.ToInt64(expected).CompareTo(Convert.ToInt64(actual));
+
+ if (expected is uint || actual is uint)
+ return Convert.ToUInt32(expected).CompareTo(Convert.ToUInt32(actual));
+
+ return Convert.ToInt32(expected).CompareTo(Convert.ToInt32(actual));
+ }
+ #endregion
+
+ private Numerics()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/AllOperator.cs b/external/guiunit/src/framework/Constraints/Operators/AllOperator.cs
new file mode 100755
index 0000000..128ba6a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/AllOperator.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that succeeds if all the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class AllOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// they all succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new AllItemsConstraint(constraint);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/Operators/AndOperator.cs b/external/guiunit/src/framework/Constraints/Operators/AndOperator.cs
new file mode 100755
index 0000000..c01d165
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/AndOperator.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that requires both it's arguments to succeed
+ /// </summary>
+ public class AndOperator : BinaryOperator
+ {
+ /// <summary>
+ /// Construct an AndOperator
+ /// </summary>
+ public AndOperator()
+ {
+ this.left_precedence = this.right_precedence = 2;
+ }
+
+ /// <summary>
+ /// Apply the operator to produce an AndConstraint
+ /// </summary>
+ public override Constraint ApplyOperator(Constraint left, Constraint right)
+ {
+ return new AndConstraint(left, right);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/AttributeOperator.cs b/external/guiunit/src/framework/Constraints/Operators/AttributeOperator.cs
new file mode 100755
index 0000000..eaa9ac0
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/AttributeOperator.cs
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that tests for the presence of a particular attribute
+ /// on a type and optionally applies further tests to the attribute.
+ /// </summary>
+ public class AttributeOperator : SelfResolvingOperator
+ {
+ private readonly Type type;
+
+ /// <summary>
+ /// Construct an AttributeOperator for a particular Type
+ /// </summary>
+ /// <param name="type">The Type of attribute tested</param>
+ public AttributeOperator(Type type)
+ {
+ this.type = type;
+
+ // Attribute stacks on anything and allows only
+ // prefix operators to stack on it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new AttributeExistsConstraint(type));
+ else
+ stack.Push(new AttributeConstraint(type, stack.Pop()));
+ }
+ }
+ }
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/BinaryOperator.cs b/external/guiunit/src/framework/Constraints/Operators/BinaryOperator.cs
new file mode 100755
index 0000000..c0c5531
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/BinaryOperator.cs
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for all binary operators
+ /// </summary>
+ public abstract class BinaryOperator : ConstraintOperator
+ {
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ Constraint right = stack.Pop();
+ Constraint left = stack.Pop();
+ stack.Push(ApplyOperator(left, right));
+ }
+
+ /// <summary>
+ /// Gets the left precedence of the operator
+ /// </summary>
+ public override int LeftPrecedence
+ {
+ get
+ {
+ return RightContext is CollectionOperator
+ ? base.LeftPrecedence + 10
+ : base.LeftPrecedence;
+ }
+ }
+
+ /// <summary>
+ /// Gets the right precedence of the operator
+ /// </summary>
+ public override int RightPrecedence
+ {
+ get
+ {
+ return RightContext is CollectionOperator
+ ? base.RightPrecedence + 10
+ : base.RightPrecedence;
+ }
+ }
+
+ /// <summary>
+ /// Abstract method that produces a constraint by applying
+ /// the operator to its left and right constraint arguments.
+ /// </summary>
+ public abstract Constraint ApplyOperator(Constraint left, Constraint right);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/CollectionOperator.cs b/external/guiunit/src/framework/Constraints/Operators/CollectionOperator.cs
new file mode 100755
index 0000000..00c94c9
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/CollectionOperator.cs
@@ -0,0 +1,43 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base for operators that indicate how to
+ /// apply a constraint to items in a collection.
+ /// </summary>
+ public abstract class CollectionOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructs a CollectionOperator
+ /// </summary>
+ protected CollectionOperator()
+ {
+ // Collection Operators stack on everything
+ // and allow all other ops to stack on them
+ this.left_precedence = 1;
+ this.right_precedence = 10;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/ConstraintOperator.cs b/external/guiunit/src/framework/Constraints/Operators/ConstraintOperator.cs
new file mode 100755
index 0000000..d33d09d
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/ConstraintOperator.cs
@@ -0,0 +1,96 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// The ConstraintOperator class is used internally by a
+ /// ConstraintBuilder to represent an operator that
+ /// modifies or combines constraints.
+ ///
+ /// Constraint operators use left and right precedence
+ /// values to determine whether the top operator on the
+ /// stack should be reduced before pushing a new operator.
+ /// </summary>
+ public abstract class ConstraintOperator
+ {
+ private object leftContext;
+ private object rightContext;
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is about to be pushed to the stack.
+ /// </summary>
+ protected int left_precedence;
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is on the top of the stack.
+ /// </summary>
+ protected int right_precedence;
+
+ /// <summary>
+ /// The syntax element preceding this operator
+ /// </summary>
+ public object LeftContext
+ {
+ get { return leftContext; }
+ set { leftContext = value; }
+ }
+
+ /// <summary>
+ /// The syntax element folowing this operator
+ /// </summary>
+ public object RightContext
+ {
+ get { return rightContext; }
+ set { rightContext = value; }
+ }
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is about to be pushed to the stack.
+ /// </summary>
+ public virtual int LeftPrecedence
+ {
+ get { return left_precedence; }
+ }
+
+ /// <summary>
+ /// The precedence value used when the operator
+ /// is on the top of the stack.
+ /// </summary>
+ public virtual int RightPrecedence
+ {
+ get { return right_precedence; }
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public abstract void Reduce(ConstraintBuilder.ConstraintStack stack);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/ExactCountOperator.cs b/external/guiunit/src/framework/Constraints/Operators/ExactCountOperator.cs
new file mode 100755
index 0000000..ddc1f6a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/ExactCountOperator.cs
@@ -0,0 +1,54 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that succeeds if the specified
+ /// count of members of a collection match a base constraint.
+ /// </summary>
+ public class ExactCountOperator : CollectionOperator
+ {
+ private int expectedCount;
+
+ /// <summary>
+ /// Construct an ExactCountOperator for a specified count
+ /// </summary>
+ /// <param name="expectedCount">The expected count</param>
+ public ExactCountOperator(int expectedCount)
+ {
+ this.expectedCount = expectedCount;
+ }
+
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// none of them succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new ExactCountConstraint(expectedCount, constraint);
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/Constraints/Operators/NoneOperator.cs b/external/guiunit/src/framework/Constraints/Operators/NoneOperator.cs
new file mode 100755
index 0000000..8c5a04d
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/NoneOperator.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that succeeds if none of the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class NoneOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// none of them succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new NoItemConstraint(constraint);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/Operators/NotOperator.cs b/external/guiunit/src/framework/Constraints/Operators/NotOperator.cs
new file mode 100755
index 0000000..eed0f55
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/NotOperator.cs
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Negates the test of the constraint it wraps.
+ /// </summary>
+ public class NotOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructs a new NotOperator
+ /// </summary>
+ public NotOperator()
+ {
+ // Not stacks on anything and only allows other
+ // prefix ops to stack on top of it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Returns a NotConstraint applied to its argument.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new NotConstraint(constraint);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/OrOperator.cs b/external/guiunit/src/framework/Constraints/Operators/OrOperator.cs
new file mode 100755
index 0000000..c945c23
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/OrOperator.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that requires at least one of it's arguments to succeed
+ /// </summary>
+ public class OrOperator : BinaryOperator
+ {
+ /// <summary>
+ /// Construct an OrOperator
+ /// </summary>
+ public OrOperator()
+ {
+ this.left_precedence = this.right_precedence = 3;
+ }
+
+ /// <summary>
+ /// Apply the operator to produce an OrConstraint
+ /// </summary>
+ public override Constraint ApplyOperator(Constraint left, Constraint right)
+ {
+ return new OrConstraint(left, right);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/PrefixOperator.cs b/external/guiunit/src/framework/Constraints/Operators/PrefixOperator.cs
new file mode 100755
index 0000000..97e4b2f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/PrefixOperator.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PrefixOperator takes a single constraint and modifies
+ /// it's action in some way.
+ /// </summary>
+ public abstract class PrefixOperator : ConstraintOperator
+ {
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ stack.Push(ApplyPrefix(stack.Pop()));
+ }
+
+ /// <summary>
+ /// Returns the constraint created by applying this
+ /// prefix to another constraint.
+ /// </summary>
+ /// <param name="constraint"></param>
+ /// <returns></returns>
+ public abstract Constraint ApplyPrefix(Constraint constraint);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/PropOperator.cs b/external/guiunit/src/framework/Constraints/Operators/PropOperator.cs
new file mode 100755
index 0000000..582e01b
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/PropOperator.cs
@@ -0,0 +1,69 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator used to test for the presence of a named Property
+ /// on an object and optionally apply further tests to the
+ /// value of that property.
+ /// </summary>
+ public class PropOperator : SelfResolvingOperator
+ {
+ private readonly string name;
+
+ /// <summary>
+ /// Gets the name of the property to which the operator applies
+ /// </summary>
+ public string Name
+ {
+ get { return name; }
+ }
+
+ /// <summary>
+ /// Constructs a PropOperator for a particular named property
+ /// </summary>
+ public PropOperator(string name)
+ {
+ this.name = name;
+
+ // Prop stacks on anything and allows only
+ // prefix operators to stack on it.
+ this.left_precedence = this.right_precedence = 1;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ /// <param name="stack"></param>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new PropertyExistsConstraint(name));
+ else
+ stack.Push(new PropertyConstraint(name, stack.Pop()));
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/Operators/SelfResolvingOperator.cs b/external/guiunit/src/framework/Constraints/Operators/SelfResolvingOperator.cs
new file mode 100755
index 0000000..ac231d3
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/SelfResolvingOperator.cs
@@ -0,0 +1,33 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class for operators that are able to reduce to a
+ /// constraint whether or not another syntactic element follows.
+ /// </summary>
+ public abstract class SelfResolvingOperator : ConstraintOperator
+ {
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/SomeOperator.cs b/external/guiunit/src/framework/Constraints/Operators/SomeOperator.cs
new file mode 100755
index 0000000..58990d1
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/SomeOperator.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that succeeds if any of the
+ /// members of a collection match a base constraint.
+ /// </summary>
+ public class SomeOperator : CollectionOperator
+ {
+ /// <summary>
+ /// Returns a constraint that will apply the argument
+ /// to the members of a collection, succeeding if
+ /// any of them succeed.
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return new SomeItemsConstraint(constraint);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/Operators/ThrowsOperator.cs b/external/guiunit/src/framework/Constraints/Operators/ThrowsOperator.cs
new file mode 100755
index 0000000..b2e407a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/ThrowsOperator.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Operator that tests that an exception is thrown and
+ /// optionally applies further tests to the exception.
+ /// </summary>
+ public class ThrowsOperator : SelfResolvingOperator
+ {
+ /// <summary>
+ /// Construct a ThrowsOperator
+ /// </summary>
+ public ThrowsOperator()
+ {
+ // ThrowsOperator stacks on everything but
+ // it's always the first item on the stack
+ // anyway. It is evaluated last of all ops.
+ this.left_precedence = 1;
+ this.right_precedence = 100;
+ }
+
+ /// <summary>
+ /// Reduce produces a constraint from the operator and
+ /// any arguments. It takes the arguments from the constraint
+ /// stack and pushes the resulting constraint on it.
+ /// </summary>
+ public override void Reduce(ConstraintBuilder.ConstraintStack stack)
+ {
+ if (RightContext == null || RightContext is BinaryOperator)
+ stack.Push(new ThrowsConstraint(null));
+ else
+ stack.Push(new ThrowsConstraint(stack.Pop()));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Operators/WithOperator.cs b/external/guiunit/src/framework/Constraints/Operators/WithOperator.cs
new file mode 100755
index 0000000..126e122
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Operators/WithOperator.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Represents a constraint that simply wraps the
+ /// constraint provided as an argument, without any
+ /// further functionality, but which modifes the
+ /// order of evaluation because of its precedence.
+ /// </summary>
+ public class WithOperator : PrefixOperator
+ {
+ /// <summary>
+ /// Constructor for the WithOperator
+ /// </summary>
+ public WithOperator()
+ {
+ this.left_precedence = 1;
+ this.right_precedence = 4;
+ }
+
+ /// <summary>
+ /// Returns a constraint that wraps its argument
+ /// </summary>
+ public override Constraint ApplyPrefix(Constraint constraint)
+ {
+ return constraint;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/OrConstraint.cs b/external/guiunit/src/framework/Constraints/OrConstraint.cs
new file mode 100755
index 0000000..2cc71c9
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/OrConstraint.cs
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// OrConstraint succeeds if either member succeeds
+ /// </summary>
+ public class OrConstraint : BinaryConstraint
+ {
+ /// <summary>
+ /// Create an OrConstraint from two other constraints
+ /// </summary>
+ /// <param name="left">The first constraint</param>
+ /// <param name="right">The second constraint</param>
+ public OrConstraint(Constraint left, Constraint right) : base(left, right) { }
+
+ /// <summary>
+ /// Apply the member constraints to an actual value, succeeding
+ /// succeeding as soon as one of them succeeds.
+ /// </summary>
+ /// <param name="actual">The actual value</param>
+ /// <returns>True if either constraint succeeded</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return left.Matches(actual) || right.Matches(actual);
+ }
+
+ /// <summary>
+ /// Write a description for this contraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The MessageWriter to receive the description</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ left.WriteDescriptionTo(writer);
+ writer.WriteConnector("or");
+ right.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/PathConstraint.cs b/external/guiunit/src/framework/Constraints/PathConstraint.cs
new file mode 100755
index 0000000..da5f515
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/PathConstraint.cs
@@ -0,0 +1,181 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.IO;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PathConstraint serves as the abstract base of constraints
+ /// that operate on paths and provides several helper methods.
+ /// </summary>
+ public abstract class PathConstraint : Constraint
+ {
+ private static readonly char[] DirectorySeparatorChars = new char[] { '\\', '/' };
+
+ /// <summary>
+ /// The expected path used in the constraint
+ /// </summary>
+ protected string expectedPath;
+
+ /// <summary>
+ /// Flag indicating whether a caseInsensitive comparison should be made
+ /// </summary>
+ protected bool caseInsensitive = Path.DirectorySeparatorChar == '\\';
+
+ /// <summary>
+ /// Construct a PathConstraint for a give expected path
+ /// </summary>
+ /// <param name="expectedPath">The expected path</param>
+ protected PathConstraint(string expectedPath) : base(expectedPath)
+ {
+ this.expectedPath = expectedPath;
+ }
+
+ /// <summary>
+ /// Modifies the current instance to be case-insensitve
+ /// and returns it.
+ /// </summary>
+ public PathConstraint IgnoreCase
+ {
+ get { caseInsensitive = true; return this; }
+ }
+
+ /// <summary>
+ /// Modifies the current instance to be case-sensitve
+ /// and returns it.
+ /// </summary>
+ public PathConstraint RespectCase
+ {
+ get { caseInsensitive = false; return this; }
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+ string actualPath = actual as string;
+
+ return actualPath != null && IsMatch(expectedPath, actualPath);
+ }
+
+ /// <summary>
+ /// Returns true if the expected path and actual path match
+ /// </summary>
+ protected abstract bool IsMatch(string expectedPath, string actualPath);
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<{0} \"{1}\" {2}>", DisplayName, expectedPath, caseInsensitive ? "ignorecase" : "respectcase");
+ }
+
+ #region Static Helper Methods
+
+ /// <summary>
+ /// Transform the provided path to its canonical form so that it
+ /// may be more easily be compared with other paths.
+ /// </summary>
+ /// <param name="path">The original path</param>
+ /// <returns>The path in canonical form</returns>
+ protected static string Canonicalize(string path)
+ {
+ if (Path.DirectorySeparatorChar != Path.AltDirectorySeparatorChar)
+ path = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+ string leadingSeparators = "";
+ foreach (char c in path)
+ {
+ if (c == Path.DirectorySeparatorChar)
+ leadingSeparators += c;
+ else break;
+ }
+
+#if (CLR_2_0x || CLR_4_0) && !NETCF
+ string[] parts = path.Split(DirectorySeparatorChars, StringSplitOptions.RemoveEmptyEntries);
+#else
+ string[] parts = path.Split(DirectorySeparatorChars);
+#endif
+ int count = 0;
+ bool shifting = false;
+ foreach (string part in parts)
+ {
+ switch (part)
+ {
+ case "":
+ case ".":
+ shifting = true;
+ break;
+
+ case "..":
+ shifting = true;
+ if (count > 0)
+ --count;
+ break;
+
+ default:
+ if (shifting)
+ parts[count] = part;
+ ++count;
+ break;
+ }
+ }
+
+ return leadingSeparators + String.Join(Path.DirectorySeparatorChar.ToString(), parts, 0, count);
+ }
+
+ /// <summary>
+ /// Test whether one path in canonical form is under another.
+ /// </summary>
+ /// <param name="path1">The first path - supposed to be the parent path</param>
+ /// <param name="path2">The second path - supposed to be the child path</param>
+ /// <param name="ignoreCase">Indicates whether case should be ignored</param>
+ /// <returns></returns>
+ protected static bool IsSubPath(string path1, string path2, bool ignoreCase)
+ {
+ int length1 = path1.Length;
+ int length2 = path2.Length;
+
+ // if path1 is longer or equal, then path2 can't be under it
+ if (length1 >= length2)
+ return false;
+
+ // path 2 is longer than path 1: see if initial parts match
+ if (!StringUtil.StringsEqual(path1, path2.Substring(0, length1), ignoreCase))
+ return false;
+
+ // must match through or up to a directory separator boundary
+ return path2[length1 - 1] == Path.DirectorySeparatorChar ||
+ length2 > length1 && path2[length1] == Path.DirectorySeparatorChar;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/PredicateConstraint.cs b/external/guiunit/src/framework/Constraints/PredicateConstraint.cs
new file mode 100755
index 0000000..231b6db
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/PredicateConstraint.cs
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if CLR_2_0 || CLR_4_0
+using System;
+using System.Collections.Generic;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Predicate constraint wraps a Predicate in a constraint,
+ /// returning success if the predicate is true.
+ /// </summary>
+ public class PredicateConstraint<T> : Constraint
+ {
+ readonly Predicate<T> predicate;
+
+ /// <summary>
+ /// Construct a PredicateConstraint from a predicate
+ /// </summary>
+ public PredicateConstraint(Predicate<T> predicate)
+ {
+ this.predicate = predicate;
+ }
+
+ /// <summary>
+ /// Determines whether the predicate succeeds when applied
+ /// to the actual value.
+ /// </summary>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is T))
+ throw new ArgumentException("The actual value is not of type " + typeof(T).Name, "actual");
+
+ return predicate((T)actual);
+ }
+
+ /// <summary>
+ /// Writes the description to a MessageWriter
+ /// </summary>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+#if NETCF_2_0
+ writer.Write("value matching predicate");
+#else
+ writer.WritePredicate("value matching");
+ writer.Write(predicate.Method.Name.StartsWith("<")
+ ? "lambda expression"
+ : predicate.Method.Name);
+#endif
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Constraints/PrefixConstraint.cs b/external/guiunit/src/framework/Constraints/PrefixConstraint.cs
new file mode 100755
index 0000000..7d5a527
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/PrefixConstraint.cs
@@ -0,0 +1,46 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Abstract base class used for prefixes
+ /// </summary>
+ public abstract class PrefixConstraint : Constraint
+ {
+ /// <summary>
+ /// The base constraint
+ /// </summary>
+ protected Constraint baseConstraint;
+
+ /// <summary>
+ /// Construct given a base constraint
+ /// </summary>
+ /// <param name="resolvable"></param>
+ protected PrefixConstraint(IResolveConstraint resolvable) : base(resolvable)
+ {
+ if (resolvable != null)
+ this.baseConstraint = resolvable.Resolve();
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/PropertyConstraint.cs b/external/guiunit/src/framework/Constraints/PropertyConstraint.cs
new file mode 100755
index 0000000..42592c6
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/PropertyConstraint.cs
@@ -0,0 +1,110 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PropertyConstraint extracts a named property and uses
+ /// its value as the actual value for a chained constraint.
+ /// </summary>
+ public class PropertyConstraint : PrefixConstraint
+ {
+ private readonly string name;
+ private object propValue;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:PropertyConstraint"/> class.
+ /// </summary>
+ /// <param name="name">The name.</param>
+ /// <param name="baseConstraint">The constraint to apply to the property.</param>
+ public PropertyConstraint(string name, Constraint baseConstraint)
+ : base(baseConstraint)
+ {
+ this.name = name;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ Guard.ArgumentNotNull(actual, "actual");
+
+ Type actualType = actual as Type;
+ if (actualType == null)
+ actualType = actual.GetType();
+
+ PropertyInfo property = actualType.GetProperty(name,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
+
+ if (property == null)
+ throw new ArgumentException(string.Format("Property {0} was not found", name), "name");
+
+ propValue = property.GetValue(actual, null);
+ return baseConstraint.Matches(propValue);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("property " + name);
+ if (baseConstraint != null)
+ {
+ if (baseConstraint is EqualConstraint)
+ writer.WritePredicate("equal to");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(propValue);
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<property {0} {1}>", name, baseConstraint);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/PropertyExistsConstraint.cs b/external/guiunit/src/framework/Constraints/PropertyExistsConstraint.cs
new file mode 100755
index 0000000..d863cf2
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/PropertyExistsConstraint.cs
@@ -0,0 +1,102 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// PropertyExistsConstraint tests that a named property
+ /// exists on the object provided through Match.
+ ///
+ /// Originally, PropertyConstraint provided this feature
+ /// in addition to making optional tests on the vaue
+ /// of the property. The two constraints are now separate.
+ /// </summary>
+ public class PropertyExistsConstraint : Constraint
+ {
+ private readonly string name;
+
+ Type actualType;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:PropertyExistConstraint"/> class.
+ /// </summary>
+ /// <param name="name">The name of the property.</param>
+ public PropertyExistsConstraint(string name)
+ : base(name)
+ {
+ this.name = name;
+ }
+
+ /// <summary>
+ /// Test whether the property exists for a given object
+ /// </summary>
+ /// <param name="actual">The object to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ Guard.ArgumentNotNull(actual, "actual");
+
+ this.actualType = actual as Type;
+ if (actualType == null)
+ actualType = actual.GetType();
+
+ PropertyInfo property = actualType.GetProperty(name,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
+
+ return property != null;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("property " + name);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(actualType);
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GetStringRepresentation()
+ {
+ return string.Format("<propertyexists {0}>", name);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/RangeConstraint.cs b/external/guiunit/src/framework/Constraints/RangeConstraint.cs
new file mode 100755
index 0000000..7eb7cd1
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/RangeConstraint.cs
@@ -0,0 +1,124 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// RangeConstraint tests whether two values are within a
+ /// specified range.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class RangeConstraint<T> : ComparisonConstraint where T : IComparable<T>
+ {
+ private readonly T from;
+ private readonly T to;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:RangeConstraint"/> class.
+ /// </summary>
+ /// <param name="from">From.</param>
+ /// <param name="to">To.</param>
+ public RangeConstraint(T from, T to)
+ : base(from, to)
+ {
+ this.from = from;
+ this.to = to;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (from == null || to == null || actual == null)
+ throw new ArgumentException("Cannot compare using a null reference", "actual");
+
+ return comparer.Compare(from, actual) <= 0 &&
+ comparer.Compare(to, actual) >= 0;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+
+ writer.Write("in range ({0},{1})", from, to);
+ }
+ }
+#else
+ public class RangeConstraint : ComparisonConstraint
+ {
+ private readonly IComparable from;
+ private readonly IComparable to;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:RangeConstraint"/> class.
+ /// </summary>
+ /// <param name="from">From.</param>
+ /// <param name="to">To.</param>
+ public RangeConstraint(IComparable from, IComparable to) : base( from, to )
+ {
+ this.from = from;
+ this.to = to;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if ( from == null || to == null || actual == null)
+ throw new ArgumentException( "Cannot compare using a null reference", "actual" );
+
+ return comparer.Compare(from, actual) <= 0 &&
+ comparer.Compare(to, actual) >= 0;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+
+ writer.Write("in range ({0},{1})", from, to);
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/framework/Constraints/RegexConstraint.cs b/external/guiunit/src/framework/Constraints/RegexConstraint.cs
new file mode 100755
index 0000000..5e0ab3a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/RegexConstraint.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF
+using System.Text.RegularExpressions;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// RegexConstraint can test whether a string matches
+ /// the pattern provided.
+ /// </summary>
+ public class RegexConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:RegexConstraint"/> class.
+ /// </summary>
+ /// <param name="pattern">The pattern.</param>
+ public RegexConstraint(string pattern) : base(pattern) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ protected override bool Matches(string actual)
+ {
+ return Regex.IsMatch(
+ actual,
+ this.expected,
+ this.caseInsensitive ? RegexOptions.IgnoreCase : RegexOptions.None);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String matching");
+ writer.WriteExpectedValue(this.expected);
+ if (this.caseInsensitive)
+ writer.WriteModifier("ignoring case");
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Constraints/ResolvableConstraintExpression.cs b/external/guiunit/src/framework/Constraints/ResolvableConstraintExpression.cs
new file mode 100755
index 0000000..25d7f3f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ResolvableConstraintExpression.cs
@@ -0,0 +1,153 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ResolvableConstraintExpression is used to represent a compound
+ /// constraint being constructed at a point where the last operator
+ /// may either terminate the expression or may have additional
+ /// qualifying constraints added to it.
+ ///
+ /// It is used, for example, for a Property element or for
+ /// an Exception element, either of which may be optionally
+ /// followed by constraints that apply to the property or
+ /// exception.
+ /// </summary>
+ public class ResolvableConstraintExpression : ConstraintExpression, IResolveConstraint
+ {
+ /// <summary>
+ /// Create a new instance of ResolvableConstraintExpression
+ /// </summary>
+ public ResolvableConstraintExpression() { }
+
+ /// <summary>
+ /// Create a new instance of ResolvableConstraintExpression,
+ /// passing in a pre-populated ConstraintBuilder.
+ /// </summary>
+ public ResolvableConstraintExpression(ConstraintBuilder builder)
+ : base(builder) { }
+
+ /// <summary>
+ /// Appends an And Operator to the expression
+ /// </summary>
+ public ConstraintExpression And
+ {
+ get { return this.Append(new AndOperator()); }
+ }
+
+ /// <summary>
+ /// Appends an Or operator to the expression.
+ /// </summary>
+ public ConstraintExpression Or
+ {
+ get { return this.Append(new OrOperator()); }
+ }
+
+ #region IResolveConstraint Members
+ /// <summary>
+ /// Resolve the current expression to a Constraint
+ /// </summary>
+ Constraint IResolveConstraint.Resolve()
+ {
+ return builder.Resolve();
+ }
+ #endregion
+
+ #region Operator Overloads
+ /// <summary>
+ /// This operator creates a constraint that is satisfied only if both
+ /// argument constraints are satisfied.
+ /// </summary>
+ public static Constraint operator &(ResolvableConstraintExpression left, ResolvableConstraintExpression right)
+ {
+ return OperatorAndImplementation(left, right);
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied only if both
+ /// argument constraints are satisfied.
+ /// </summary>
+ public static Constraint operator &(Constraint left, ResolvableConstraintExpression right)
+ {
+ return OperatorAndImplementation(left, right);
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied only if both
+ /// argument constraints are satisfied.
+ /// </summary>
+ public static Constraint operator &(ResolvableConstraintExpression left, Constraint right)
+ {
+ return OperatorAndImplementation(left, right);
+ }
+
+ private static Constraint OperatorAndImplementation(IResolveConstraint left, IResolveConstraint right)
+ {
+ return new AndConstraint(left.Resolve(), right.Resolve());
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if either
+ /// of the argument constraints is satisfied.
+ /// </summary>
+ public static Constraint operator |(ResolvableConstraintExpression left, ResolvableConstraintExpression right)
+ {
+ return OperatorOrImplementation(left, right);
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if either
+ /// of the argument constraints is satisfied.
+ /// </summary>
+ public static Constraint operator |(ResolvableConstraintExpression left, Constraint right)
+ {
+ return OperatorOrImplementation(left, right);
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if either
+ /// of the argument constraints is satisfied.
+ /// </summary>
+ public static Constraint operator |(Constraint left, ResolvableConstraintExpression right)
+ {
+ return OperatorOrImplementation(left, right);
+ }
+
+ private static Constraint OperatorOrImplementation(IResolveConstraint left, IResolveConstraint right)
+ {
+ return new OrConstraint(left.Resolve(), right.Resolve());
+ }
+
+ /// <summary>
+ /// This operator creates a constraint that is satisfied if the
+ /// argument constraint is not satisfied.
+ /// </summary>
+ public static Constraint operator !(ResolvableConstraintExpression constraint)
+ {
+ IResolveConstraint r = constraint as IResolveConstraint;
+ return new NotConstraint(r == null ? new NullConstraint() : r.Resolve());
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/ReusableConstraint.cs b/external/guiunit/src/framework/Constraints/ReusableConstraint.cs
new file mode 100755
index 0000000..0b6d994
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ReusableConstraint.cs
@@ -0,0 +1,76 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ReusableConstraint wraps a constraint expression after
+ /// resolving it so that it can be reused consistently.
+ /// </summary>
+ public class ReusableConstraint : IResolveConstraint
+ {
+ private readonly Constraint constraint;
+
+ /// <summary>
+ /// Construct a ReusableConstraint from a constraint expression
+ /// </summary>
+ /// <param name="c">The expression to be resolved and reused</param>
+ public ReusableConstraint(IResolveConstraint c)
+ {
+ this.constraint = c.Resolve();
+ }
+
+ /// <summary>
+ /// Converts a constraint to a ReusableConstraint
+ /// </summary>
+ /// <param name="c">The constraint to be converted</param>
+ /// <returns>A ReusableConstraint</returns>
+ public static implicit operator ReusableConstraint(Constraint c)
+ {
+ return new ReusableConstraint(c);
+ }
+
+ /// <summary>
+ /// Returns the string representation of the constraint.
+ /// </summary>
+ /// <returns>A string representing the constraint</returns>
+ public override string ToString()
+ {
+ return constraint.ToString();
+ }
+
+ #region IResolveConstraint Members
+
+ /// <summary>
+ /// Resolves the ReusableConstraint by returning the constraint
+ /// that it originally wrapped.
+ /// </summary>
+ /// <returns>A resolved constraint</returns>
+ public Constraint Resolve()
+ {
+ return constraint;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/SameAsConstraint.cs b/external/guiunit/src/framework/Constraints/SameAsConstraint.cs
new file mode 100755
index 0000000..6946c4b
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SameAsConstraint.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SameAsConstraint tests whether an object is identical to
+ /// the object passed to its constructor
+ /// </summary>
+ public class SameAsConstraint : Constraint
+ {
+ private readonly object expected;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SameAsConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected object.</param>
+ public SameAsConstraint(object expected) : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ return ReferenceEquals(expected, actual);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("same as");
+ writer.WriteExpectedValue(expected);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/SamePathConstraint.cs b/external/guiunit/src/framework/Constraints/SamePathConstraint.cs
new file mode 100755
index 0000000..a640979
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SamePathConstraint.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Summary description for SamePathConstraint.
+ /// </summary>
+ public class SamePathConstraint : PathConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SamePathConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ public SamePathConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="expectedPath">The expected path</param>
+ /// <param name="actualPath">The actual path</param>
+ /// <returns>True for success, false for failure</returns>
+ protected override bool IsMatch(string expectedPath, string actualPath)
+ {
+ return StringUtil.StringsEqual(Canonicalize(expectedPath), Canonicalize(actualPath), caseInsensitive);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("Path matching");
+ writer.WriteExpectedValue(expectedPath);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/SamePathOrUnderConstraint.cs b/external/guiunit/src/framework/Constraints/SamePathOrUnderConstraint.cs
new file mode 100755
index 0000000..bb0321f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SamePathOrUnderConstraint.cs
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SamePathOrUnderConstraint tests that one path is under another
+ /// </summary>
+ public class SamePathOrUnderConstraint : PathConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SamePathOrUnderConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ public SamePathOrUnderConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="expectedPath">The expected path</param>
+ /// <param name="actualPath">The actual path</param>
+ /// <returns>True for success, false for failure</returns>
+ protected override bool IsMatch(string expectedPath, string actualPath)
+ {
+ string path1 = Canonicalize(expectedPath);
+ string path2 = Canonicalize(actualPath);
+ return StringUtil.StringsEqual(path1, path2, caseInsensitive) || IsSubPath(path1, path2, caseInsensitive);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("Path under or matching");
+ writer.WriteExpectedValue(expectedPath);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/SomeItemsConstraint.cs b/external/guiunit/src/framework/Constraints/SomeItemsConstraint.cs
new file mode 100755
index 0000000..607bd32
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SomeItemsConstraint.cs
@@ -0,0 +1,75 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SomeItemsConstraint applies another constraint to each
+ /// item in a collection, succeeding if any of them succeeds.
+ /// </summary>
+ public class SomeItemsConstraint : PrefixConstraint
+ {
+ /// <summary>
+ /// Construct a SomeItemsConstraint on top of an existing constraint
+ /// </summary>
+ /// <param name="itemConstraint"></param>
+ public SomeItemsConstraint(Constraint itemConstraint)
+ : base(itemConstraint)
+ {
+ this.DisplayName = "some";
+ }
+
+ /// <summary>
+ /// Apply the item constraint to each item in the collection,
+ /// succeeding if any item succeeds.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if (!(actual is IEnumerable))
+ throw new ArgumentException("The actual value must be an IEnumerable", "actual");
+
+ foreach (object item in (IEnumerable)actual)
+ if (baseConstraint.Matches(item))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("some item");
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/StartsWithConstraint.cs b/external/guiunit/src/framework/Constraints/StartsWithConstraint.cs
new file mode 100755
index 0000000..51be3de
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/StartsWithConstraint.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// StartsWithConstraint can test whether a string starts
+ /// with an expected substring.
+ /// </summary>
+ public class StartsWithConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected string</param>
+ public StartsWithConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is matched by the actual value.
+ /// This is a template method, which calls the IsMatch method
+ /// of the derived class.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool Matches(string actual)
+ {
+ if (this.caseInsensitive)
+ return actual.ToLower().StartsWith(expected.ToLower());
+ else
+ return actual.StartsWith(expected);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String starting with");
+ writer.WriteExpectedValue(MsgUtils.ClipString(expected, writer.MaxLineLength - 40, 0));
+ if (this.caseInsensitive)
+ writer.WriteModifier("ignoring case");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/StringConstraint.cs b/external/guiunit/src/framework/Constraints/StringConstraint.cs
new file mode 100755
index 0000000..f9e7a0f
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/StringConstraint.cs
@@ -0,0 +1,81 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// StringConstraint is the abstract base for constraints
+ /// that operate on strings. It supports the IgnoreCase
+ /// modifier for string operations.
+ /// </summary>
+ public abstract class StringConstraint : Constraint
+ {
+ /// <summary>
+ /// The expected value
+ /// </summary>
+ protected readonly string expected;
+
+ /// <summary>
+ /// Indicates whether tests should be case-insensitive
+ /// </summary>
+ protected bool caseInsensitive;
+
+ /// <summary>
+ /// Constructs a StringConstraint given an expected value
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ protected StringConstraint(string expected)
+ : base(expected)
+ {
+ this.expected = expected;
+ }
+
+ /// <summary>
+ /// Modify the constraint to ignore case in matching.
+ /// </summary>
+ public StringConstraint IgnoreCase
+ {
+ get { caseInsensitive = true; return this; }
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ string actualAsString = actual as string;
+ return actualAsString != null && Matches(actualAsString);
+ }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given string
+ /// </summary>
+ /// <param name="actual">The string to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ protected abstract bool Matches(string actual);
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/SubPathConstraint.cs b/external/guiunit/src/framework/Constraints/SubPathConstraint.cs
new file mode 100755
index 0000000..4c3528b
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SubPathConstraint.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SubPathConstraint tests that the actual path is under the expected path
+ /// </summary>
+ public class SubPathConstraint : PathConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SubPathConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected path</param>
+ public SubPathConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="expectedPath">The expected path</param>
+ /// <param name="actualPath">The actual path</param>
+ /// <returns>True for success, false for failure</returns>
+ protected override bool IsMatch(string expectedPath, string actualPath)
+ {
+ return IsSubPath(Canonicalize(expectedPath), Canonicalize(actualPath), caseInsensitive);
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("Path under");
+ writer.WriteExpectedValue(expectedPath);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Constraints/SubstringConstraint.cs b/external/guiunit/src/framework/Constraints/SubstringConstraint.cs
new file mode 100755
index 0000000..716abae
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/SubstringConstraint.cs
@@ -0,0 +1,63 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// SubstringConstraint can test whether a string contains
+ /// the expected substring.
+ /// </summary>
+ public class SubstringConstraint : StringConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:SubstringConstraint"/> class.
+ /// </summary>
+ /// <param name="expected">The expected.</param>
+ public SubstringConstraint(string expected) : base(expected) { }
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ protected override bool Matches(string actual)
+ {
+ if (this.caseInsensitive)
+ return actual.ToLower().IndexOf(expected.ToLower()) >= 0;
+ else
+ return actual.IndexOf(expected) >= 0;
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.WritePredicate("String containing");
+ writer.WriteExpectedValue(expected);
+ if (this.caseInsensitive)
+ writer.WriteModifier("ignoring case");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ThrowsConstraint.cs b/external/guiunit/src/framework/Constraints/ThrowsConstraint.cs
new file mode 100755
index 0000000..1ddb5cb
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ThrowsConstraint.cs
@@ -0,0 +1,267 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ThrowsConstraint is used to test the exception thrown by
+ /// a delegate by applying a constraint to it.
+ /// </summary>
+ public class ThrowsConstraint : PrefixConstraint
+ {
+ private Exception caughtException;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ThrowsConstraint"/> class,
+ /// using a constraint to be applied to the exception.
+ /// </summary>
+ /// <param name="baseConstraint">A constraint to apply to the caught exception.</param>
+ public ThrowsConstraint(Constraint baseConstraint)
+ : base(baseConstraint) { }
+
+ /// <summary>
+ /// Get the actual exception thrown - used by Assert.Throws.
+ /// </summary>
+ public Exception ActualException
+ {
+ get { return caughtException; }
+ }
+
+ #region Constraint Overrides
+
+ /// <summary>
+ /// Executes the code of the delegate and captures any exception.
+ /// If a non-null base constraint was provided, it applies that
+ /// constraint to the exception.
+ /// </summary>
+ /// <param name="actual">A delegate representing the code to be tested</param>
+ /// <returns>True if an exception is thrown and the constraint succeeds, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ caughtException = ExceptionInterceptor.Intercept(actual);
+
+ if (caughtException == null)
+ return false;
+
+ return baseConstraint == null || baseConstraint.Matches(caughtException);
+ }
+
+ /// <summary>
+ /// Converts an ActualValueDelegate to a TestDelegate
+ /// before calling the primary overload.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public override bool Matches<T>(ActualValueDelegate<T> del)
+ {
+ return Matches(new GenericInvocationDescriptor<T>(del));
+ }
+#else
+ public override bool Matches(ActualValueDelegate del)
+ {
+ return Matches(new ObjectInvocationDescriptor(del));
+ }
+#endif
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ if (baseConstraint == null)
+ writer.WritePredicate("an exception");
+ else
+ baseConstraint.WriteDescriptionTo(writer);
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ if (caughtException == null)
+ writer.Write("no exception thrown");
+ else if (baseConstraint != null)
+ baseConstraint.WriteActualValueTo(writer);
+ else
+ writer.WriteActualValue(caughtException);
+ }
+ #endregion
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ if (baseConstraint == null)
+ return "<throws>";
+
+ return base.GetStringRepresentation();
+ }
+ }
+
+ #region ExceptionInterceptor
+
+ internal class ExceptionInterceptor
+ {
+ private ExceptionInterceptor() { }
+
+ internal static Exception Intercept(object invocation)
+ {
+ IInvocationDescriptor invocationDescriptor = GetInvocationDescriptor(invocation);
+
+#if NET_4_5
+ if (AsyncInvocationRegion.IsAsyncOperation(invocationDescriptor.Delegate))
+ {
+ using (AsyncInvocationRegion region = AsyncInvocationRegion.Create(invocationDescriptor.Delegate))
+ {
+ object result = invocationDescriptor.Invoke();
+
+ try
+ {
+ region.WaitForPendingOperationsToComplete(result);
+ return null;
+ }
+ catch (Exception ex)
+ {
+ return ex;
+ }
+ }
+ }
+ else
+#endif
+ {
+ try
+ {
+ invocationDescriptor.Invoke();
+ return null;
+ }
+ catch (Exception ex)
+ {
+ return ex;
+ }
+ }
+ }
+
+ private static IInvocationDescriptor GetInvocationDescriptor(object actual)
+ {
+ IInvocationDescriptor invocationDescriptor = actual as IInvocationDescriptor;
+
+ if (invocationDescriptor == null)
+ {
+ TestDelegate testDelegate = actual as TestDelegate;
+
+ if (testDelegate == null)
+ throw new ArgumentException(
+ String.Format("The actual value must be a TestDelegate or ActualValueDelegate but was {0}", actual.GetType().Name),
+ "actual");
+
+ invocationDescriptor = new VoidInvocationDescriptor(testDelegate);
+ }
+
+ return invocationDescriptor;
+ }
+ }
+
+ #endregion
+
+ #region InvocationDescriptor
+
+ internal class VoidInvocationDescriptor : IInvocationDescriptor
+ {
+ private readonly TestDelegate _del;
+
+ public VoidInvocationDescriptor(TestDelegate del)
+ {
+ _del = del;
+ }
+
+ public object Invoke()
+ {
+ _del();
+ return null;
+ }
+
+ public Delegate Delegate
+ {
+ get { return _del; }
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ internal class GenericInvocationDescriptor<T> : IInvocationDescriptor
+ {
+ private readonly ActualValueDelegate<T> _del;
+
+ public GenericInvocationDescriptor(ActualValueDelegate<T> del)
+ {
+ _del = del;
+ }
+
+ public object Invoke()
+ {
+ return _del();
+ }
+
+ public Delegate Delegate
+ {
+ get { return _del; }
+ }
+ }
+#else
+ internal class ObjectInvocationDescriptor : IInvocationDescriptor
+ {
+ private readonly ActualValueDelegate _del;
+
+ public ObjectInvocationDescriptor(ActualValueDelegate del)
+ {
+ _del = del;
+ }
+
+ public object Invoke()
+ {
+ return _del();
+ }
+
+ public Delegate Delegate
+ {
+ get { return _del; }
+ }
+ }
+#endif
+
+ internal interface IInvocationDescriptor
+ {
+ object Invoke();
+ Delegate Delegate { get; }
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ThrowsNothingConstraint.cs b/external/guiunit/src/framework/Constraints/ThrowsNothingConstraint.cs
new file mode 100755
index 0000000..2877fc6
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ThrowsNothingConstraint.cs
@@ -0,0 +1,81 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// ThrowsNothingConstraint tests that a delegate does not
+ /// throw an exception.
+ /// </summary>
+ public class ThrowsNothingConstraint : Constraint
+ {
+ private Exception caughtException;
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True if no exception is thrown, otherwise false</returns>
+ public override bool Matches(object actual)
+ {
+ caughtException = ExceptionInterceptor.Intercept(actual);
+
+ return caughtException == null;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public override bool Matches<T>(ActualValueDelegate<T> del)
+ {
+ return Matches(new GenericInvocationDescriptor<T>(del));
+ }
+#else
+ public override bool Matches(ActualValueDelegate del)
+ {
+ return Matches(new ObjectInvocationDescriptor(del));
+ }
+#endif
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write(string.Format("No Exception to be thrown"));
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. Overridden in ThrowsNothingConstraint to write
+ /// information about the exception that was actually caught.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteLine(" ({0})", caughtException.Message);
+ writer.Write(caughtException.StackTrace);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/Tolerance.cs b/external/guiunit/src/framework/Constraints/Tolerance.cs
new file mode 100755
index 0000000..40318fc
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/Tolerance.cs
@@ -0,0 +1,220 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// The Tolerance class generalizes the notion of a tolerance
+ /// within which an equality test succeeds. Normally, it is
+ /// used with numeric types, but it can be used with any
+ /// type that supports taking a difference between two
+ /// objects and comparing that difference to a value.
+ /// </summary>
+ public class Tolerance
+ {
+ private readonly ToleranceMode mode;
+ private readonly object amount;
+
+ private const string ModeMustFollowTolerance = "Tolerance amount must be specified before setting mode";
+ private const string MultipleToleranceModes = "Tried to use multiple tolerance modes at the same time";
+ private const string NumericToleranceRequired = "A numeric tolerance is required";
+
+ /// <summary>
+ /// Returns an empty Tolerance object, equivalent to
+ /// specifying no tolerance. In most cases, it results
+ /// in an exact match but for floats and doubles a
+ /// default tolerance may be used.
+ /// </summary>
+ public static Tolerance Empty
+ {
+ get { return new Tolerance(0, ToleranceMode.None); }
+ }
+
+ /// <summary>
+ /// Returns a zero Tolerance object, equivalent to
+ /// specifying an exact match.
+ /// </summary>
+ public static Tolerance Zero
+ {
+ get { return new Tolerance(0, ToleranceMode.Linear); }
+ }
+
+ /// <summary>
+ /// Constructs a linear tolerance of a specdified amount
+ /// </summary>
+ public Tolerance(object amount) : this(amount, ToleranceMode.Linear) { }
+
+ /// <summary>
+ /// Constructs a tolerance given an amount and ToleranceMode
+ /// </summary>
+ private Tolerance(object amount, ToleranceMode mode)
+ {
+ this.amount = amount;
+ this.mode = mode;
+ }
+
+ /// <summary>
+ /// Gets the ToleranceMode for the current Tolerance
+ /// </summary>
+ public ToleranceMode Mode
+ {
+ get { return this.mode; }
+ }
+
+
+ /// <summary>
+ /// Tests that the current Tolerance is linear with a
+ /// numeric value, throwing an exception if it is not.
+ /// </summary>
+ private void CheckLinearAndNumeric()
+ {
+ if (mode != ToleranceMode.Linear)
+ throw new InvalidOperationException(mode == ToleranceMode.None
+ ? ModeMustFollowTolerance
+ : MultipleToleranceModes);
+
+ if (!Numerics.IsNumericType(amount))
+ throw new InvalidOperationException(NumericToleranceRequired);
+ }
+
+ /// <summary>
+ /// Gets the value of the current Tolerance instance.
+ /// </summary>
+ public object Value
+ {
+ get { return this.amount; }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance, using the current amount as a percentage.
+ /// </summary>
+ public Tolerance Percent
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(this.amount, ToleranceMode.Percent);
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance, using the current amount in Ulps.
+ /// </summary>
+ public Tolerance Ulps
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(this.amount, ToleranceMode.Ulps);
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of days.
+ /// </summary>
+ public Tolerance Days
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromDays(Convert.ToDouble(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of hours.
+ /// </summary>
+ public Tolerance Hours
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromHours(Convert.ToDouble(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of minutes.
+ /// </summary>
+ public Tolerance Minutes
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromMinutes(Convert.ToDouble(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of seconds.
+ /// </summary>
+ public Tolerance Seconds
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromSeconds(Convert.ToDouble(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of milliseconds.
+ /// </summary>
+ public Tolerance Milliseconds
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromMilliseconds(Convert.ToDouble(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns a new tolerance with a TimeSpan as the amount, using
+ /// the current amount as a number of clock ticks.
+ /// </summary>
+ public Tolerance Ticks
+ {
+ get
+ {
+ CheckLinearAndNumeric();
+ return new Tolerance(TimeSpan.FromTicks(Convert.ToInt64(amount)));
+ }
+ }
+
+ /// <summary>
+ /// Returns true if the current tolerance is empty.
+ /// </summary>
+ public bool IsEmpty
+ {
+ get { return mode == ToleranceMode.None; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/ToleranceMode.cs b/external/guiunit/src/framework/Constraints/ToleranceMode.cs
new file mode 100755
index 0000000..c5600bb
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/ToleranceMode.cs
@@ -0,0 +1,54 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// Modes in which the tolerance value for a comparison can be interpreted.
+ /// </summary>
+ public enum ToleranceMode
+ {
+ /// <summary>
+ /// The tolerance was created with a value, without specifying
+ /// how the value would be used. This is used to prevent setting
+ /// the mode more than once and is generally changed to Linear
+ /// upon execution of the test.
+ /// </summary>
+ None,
+ /// <summary>
+ /// The tolerance is used as a numeric range within which
+ /// two compared values are considered to be equal.
+ /// </summary>
+ Linear,
+ /// <summary>
+ /// Interprets the tolerance as the percentage by which
+ /// the two compared values my deviate from each other.
+ /// </summary>
+ Percent,
+ /// <summary>
+ /// Compares two values based in their distance in
+ /// representable numbers.
+ /// </summary>
+ Ulps
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/TrueConstraint.cs b/external/guiunit/src/framework/Constraints/TrueConstraint.cs
new file mode 100755
index 0000000..8ea492a
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/TrueConstraint.cs
@@ -0,0 +1,36 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// TrueConstraint tests that the actual value is true
+ /// </summary>
+ public class TrueConstraint : BasicConstraint
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TrueConstraint"/> class.
+ /// </summary>
+ public TrueConstraint() : base(true, "True") { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/TypeConstraint.cs b/external/guiunit/src/framework/Constraints/TypeConstraint.cs
new file mode 100755
index 0000000..2455348
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/TypeConstraint.cs
@@ -0,0 +1,59 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// TypeConstraint is the abstract base for constraints
+ /// that take a Type as their expected value.
+ /// </summary>
+ public abstract class TypeConstraint : Constraint
+ {
+ /// <summary>
+ /// The expected Type used by the constraint
+ /// </summary>
+ protected readonly Type expectedType;
+
+ /// <summary>
+ /// Construct a TypeConstraint for a given Type
+ /// </summary>
+ /// <param name="type"></param>
+ protected TypeConstraint(Type type) : base(type)
+ {
+ this.expectedType = type;
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. TypeConstraints override this method to write
+ /// the name of the type.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.WriteActualValue(actual == null ? null : actual.GetType());
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/UniqueItemsConstraint.cs b/external/guiunit/src/framework/Constraints/UniqueItemsConstraint.cs
new file mode 100755
index 0000000..6d62b26
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/UniqueItemsConstraint.cs
@@ -0,0 +1,63 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Collections;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// UniqueItemsConstraint tests whether all the items in a
+ /// collection are unique.
+ /// </summary>
+ public class UniqueItemsConstraint : CollectionItemsEqualConstraint
+ {
+ /// <summary>
+ /// Check that all items are unique.
+ /// </summary>
+ /// <param name="actual"></param>
+ /// <returns></returns>
+ protected override bool doMatch(IEnumerable actual)
+ {
+ ObjectList list = new ObjectList();
+
+ foreach (object o1 in actual)
+ {
+ foreach (object o2 in list)
+ if (ItemsEqual(o1, o2))
+ return false;
+ list.Add(o1);
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Write a description of this constraint to a MessageWriter
+ /// </summary>
+ /// <param name="writer"></param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("all items unique");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Constraints/XmlSerializableConstraint.cs b/external/guiunit/src/framework/Constraints/XmlSerializableConstraint.cs
new file mode 100755
index 0000000..9443d32
--- /dev/null
+++ b/external/guiunit/src/framework/Constraints/XmlSerializableConstraint.cs
@@ -0,0 +1,105 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !SILVERLIGHT
+using System;
+using System.IO;
+using System.Xml.Serialization;
+
+namespace NUnit.Framework.Constraints
+{
+ /// <summary>
+ /// XmlSerializableConstraint tests whether
+ /// an object is serializable in XML format.
+ /// </summary>
+ public class XmlSerializableConstraint : Constraint
+ {
+ private XmlSerializer serializer;
+
+ /// <summary>
+ /// Test whether the constraint is satisfied by a given value
+ /// </summary>
+ /// <param name="actual">The value to be tested</param>
+ /// <returns>True for success, false for failure</returns>
+ public override bool Matches(object actual)
+ {
+ this.actual = actual;
+
+ if(actual == null)
+ throw new ArgumentException();
+
+ MemoryStream stream = new MemoryStream();
+
+ try
+ {
+ serializer = new XmlSerializer(actual.GetType());
+
+ serializer.Serialize(stream, actual);
+
+ stream.Seek(0, SeekOrigin.Begin);
+
+ object value = serializer.Deserialize(stream);
+
+ return value != null;
+ }
+ catch (NotSupportedException)
+ {
+ return false;
+ }
+ catch (InvalidOperationException)
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// Write the constraint description to a MessageWriter
+ /// </summary>
+ /// <param name="writer">The writer on which the description is displayed</param>
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ writer.Write("xml serializable");
+ }
+
+ /// <summary>
+ /// Write the actual value for a failing constraint test to a
+ /// MessageWriter. The default implementation simply writes
+ /// the raw value of actual, leaving it to the writer to
+ /// perform any formatting.
+ /// </summary>
+ /// <param name="writer">The writer on which the actual value is displayed</param>
+ public override void WriteActualValueTo(MessageWriter writer)
+ {
+ writer.Write("<{0}>", actual.GetType().Name);
+ }
+
+ /// <summary>
+ /// Returns the string representation of this constraint
+ /// </summary>
+ protected override string GetStringRepresentation()
+ {
+ return "<xmlserializable>";
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Contains.cs b/external/guiunit/src/framework/Contains.cs
new file mode 100755
index 0000000..b81ef81
--- /dev/null
+++ b/external/guiunit/src/framework/Contains.cs
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Helper class with properties and methods that supply
+ /// a number of constraints used in Asserts.
+ /// </summary>
+ public class Contains
+ {
+ #region Item
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public static CollectionContainsConstraint Item(object expected)
+ {
+ return new CollectionContainsConstraint(expected);
+ }
+
+ #endregion
+
+ #region Substring
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public static SubstringConstraint Substring(string expected)
+ {
+ return new SubstringConstraint(expected);;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Env.cs b/external/guiunit/src/framework/Env.cs
new file mode 100755
index 0000000..b069d43
--- /dev/null
+++ b/external/guiunit/src/framework/Env.cs
@@ -0,0 +1,56 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Text;
+
+namespace NUnit
+{
+ /// <summary>
+ /// Env is a static class that provides some of the features of
+ /// System.Environment that are not available under all runtimes
+ /// </summary>
+ public class Env
+ {
+ // Define NewLine to be used for this system
+ // NOTE: Since this is done at compile time for .NET CF,
+ // these binaries are not yet currently portable.
+ /// <summary>
+ /// The newline sequence in the current environmemt.
+ /// </summary>
+#if PocketPC || WindowsCE || NETCF
+ public static readonly string NewLine = "\r\n";
+#else
+ public static readonly string NewLine = Environment.NewLine;
+#endif
+
+ /// <summary>
+ /// Path to the 'My Documents' folder
+ /// </summary>
+#if SILVERLIGHT
+ public static string DocumentFolder = @"\My Documents";
+#else
+ public static string DocumentFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Exceptions/AssertionException.cs b/external/guiunit/src/framework/Exceptions/AssertionException.cs
new file mode 100755
index 0000000..424190d
--- /dev/null
+++ b/external/guiunit/src/framework/Exceptions/AssertionException.cs
@@ -0,0 +1,56 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Thrown when an assertion failed.
+ /// </summary>
+ [Serializable]
+ public class AssertionException : System.Exception
+ {
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ public AssertionException (string message) : base(message)
+ {}
+
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ /// <param name="inner">The exception that caused the
+ /// current exception</param>
+ public AssertionException(string message, Exception inner) :
+ base(message, inner)
+ {}
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected AssertionException(System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info,context)
+ {}
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Exceptions/IgnoreException.cs b/external/guiunit/src/framework/Exceptions/IgnoreException.cs
new file mode 100755
index 0000000..442b759
--- /dev/null
+++ b/external/guiunit/src/framework/Exceptions/IgnoreException.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2004 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Thrown when an assertion failed.
+ /// </summary>
+ [Serializable]
+ public class IgnoreException : System.Exception
+ {
+ /// <param name="message"></param>
+ public IgnoreException (string message) : base(message)
+ {}
+
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ /// <param name="inner">The exception that caused the
+ /// current exception</param>
+ public IgnoreException(string message, Exception inner) :
+ base(message, inner)
+ {}
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected IgnoreException(System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info,context)
+ {}
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Exceptions/InconclusiveException.cs b/external/guiunit/src/framework/Exceptions/InconclusiveException.cs
new file mode 100755
index 0000000..d24c8b2
--- /dev/null
+++ b/external/guiunit/src/framework/Exceptions/InconclusiveException.cs
@@ -0,0 +1,58 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Thrown when a test executes inconclusively.
+ /// </summary>
+ [Serializable]
+ public class InconclusiveException : System.Exception
+ {
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ public InconclusiveException(string message)
+ : base(message)
+ { }
+
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ /// <param name="inner">The exception that caused the
+ /// current exception</param>
+ public InconclusiveException(string message, Exception inner)
+ :
+ base(message, inner)
+ { }
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected InconclusiveException(System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context)
+ { }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Exceptions/SuccessException.cs b/external/guiunit/src/framework/Exceptions/SuccessException.cs
new file mode 100755
index 0000000..1c469eb
--- /dev/null
+++ b/external/guiunit/src/framework/Exceptions/SuccessException.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ using System;
+
+ /// <summary>
+ /// Thrown when an assertion failed.
+ /// </summary>
+ [Serializable]
+ public class SuccessException : System.Exception
+ {
+ /// <param name="message"></param>
+ public SuccessException(string message)
+ : base(message)
+ { }
+
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ /// <param name="inner">The exception that caused the
+ /// current exception</param>
+ public SuccessException(string message, Exception inner)
+ :
+ base(message, inner)
+ { }
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected SuccessException(System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context)
+ { }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Extensibility/IParameterDataProvider.cs b/external/guiunit/src/framework/Extensibility/IParameterDataProvider.cs
new file mode 100755
index 0000000..2bc9a81
--- /dev/null
+++ b/external/guiunit/src/framework/Extensibility/IParameterDataProvider.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Collections;
+using System.Reflection;
+
+namespace NUnit.Framework.Extensibility
+{
+ /// <summary>
+ /// The IDataPointProvider interface is used by extensions
+ /// that provide data for a single test parameter.
+ /// </summary>
+ public interface IParameterDataProvider
+ {
+ /// <summary>
+ /// Determine whether any data is available for a parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>True if any data is available, otherwise false.</returns>
+ bool HasDataFor(ParameterInfo parameter);
+
+ /// <summary>
+ /// Return an IEnumerable providing data for use with the
+ /// supplied parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>An IEnumerable providing the required data</returns>
+ IEnumerable GetDataFor(ParameterInfo parameter);
+ }
+}
diff --git a/external/guiunit/src/framework/Extensibility/ISuiteBuilder.cs b/external/guiunit/src/framework/Extensibility/ISuiteBuilder.cs
new file mode 100755
index 0000000..485e5ce
--- /dev/null
+++ b/external/guiunit/src/framework/Extensibility/ISuiteBuilder.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Extensibility
+{
+ /// <summary>
+ /// The ISuiteBuilder interface is exposed by a class that knows how to
+ /// build a suite from one or more Types.
+ /// </summary>
+ public interface ISuiteBuilder
+ {
+ /// <summary>
+ /// Examine the type and determine if it is suitable for
+ /// this builder to use in building a TestSuite.
+ ///
+ /// Note that returning false will cause the type to be ignored
+ /// in loading the tests. If it is desired to load the suite
+ /// but label it as non-runnable, ignored, etc., then this
+ /// method must return true.
+ /// </summary>
+ /// <param name="type">The type of the fixture to be used</param>
+ /// <returns>True if the type can be used to build a TestSuite</returns>
+ bool CanBuildFrom( Type type );
+
+ /// <summary>
+ /// Build a TestSuite from type provided.
+ /// </summary>
+ /// <param name="type">The type of the fixture to be used</param>
+ /// <returns>A TestSuite</returns>
+ Test BuildFrom( Type type );
+ }
+}
diff --git a/external/guiunit/src/framework/Extensibility/ITestCaseBuilder.cs b/external/guiunit/src/framework/Extensibility/ITestCaseBuilder.cs
new file mode 100755
index 0000000..7b5c901
--- /dev/null
+++ b/external/guiunit/src/framework/Extensibility/ITestCaseBuilder.cs
@@ -0,0 +1,88 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Extensibility
+{
+ /// <summary>
+ /// The ITestCaseBuilder interface is exposed by a class that knows how to
+ /// build a test case from certain methods.
+ /// </summary>
+ public interface ITestCaseBuilder
+ {
+ /// <summary>
+ /// Examine the method and determine if it is suitable for
+ /// this builder to use in building a TestCase.
+ ///
+ /// Note that returning false will cause the method to be ignored
+ /// in loading the tests. If it is desired to load the method
+ /// but label it as non-runnable, ignored, etc., then this
+ /// method must return true.
+ /// </summary>
+ /// <param name="method">The test method to examine</param>
+ /// <returns>True is the builder can use this method</returns>
+ bool CanBuildFrom(MethodInfo method);
+
+ /// <summary>
+ /// Build a TestCase from the provided MethodInfo.
+ /// </summary>
+ /// <param name="method">The method to be used as a test case</param>
+ /// <returns>A TestCase or null</returns>
+ Test BuildFrom(MethodInfo method);
+ }
+
+ /// <summary>
+ /// ITestCaseBuilder2 extends ITestCaseBuilder with methods
+ /// that include the suite for which the test case is being
+ /// built. Test case builders not needing the suite can
+ /// continue to implement ITestCaseBuilder.
+ /// </summary>
+ public interface ITestCaseBuilder2 : ITestCaseBuilder
+ {
+ /// <summary>
+ /// Examine the method and determine if it is suitable for
+ /// this builder to use in building a TestCase to be
+ /// included in the suite being populated.
+ ///
+ /// Note that returning false will cause the method to be ignored
+ /// in loading the tests. If it is desired to load the method
+ /// but label it as non-runnable, ignored, etc., then this
+ /// method must return true.
+ /// </summary>
+ /// <param name="method">The test method to examine</param>
+ /// <param name="suite">The suite being populated</param>
+ /// <returns>True is the builder can use this method</returns>
+ bool CanBuildFrom(MethodInfo method, Test suite);
+
+ /// <summary>
+ /// Build a TestCase from the provided MethodInfo for
+ /// inclusion in the suite being constructed.
+ /// </summary>
+ /// <param name="method">The method to be used as a test case</param>
+ /// <param name="suite">The test suite being populated, or null</param>
+ /// <returns>A TestCase or null</returns>
+ Test BuildFrom(MethodInfo method, Test suite);
+ }
+}
diff --git a/external/guiunit/src/framework/Extensibility/ITestCaseProvider.cs b/external/guiunit/src/framework/Extensibility/ITestCaseProvider.cs
new file mode 100755
index 0000000..69e0ec4
--- /dev/null
+++ b/external/guiunit/src/framework/Extensibility/ITestCaseProvider.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Extensibility
+{
+ /// <summary>
+ /// The ITestCaseProvider interface is used by extensions
+ /// that provide data for parameterized tests, along with
+ /// certain flags and other indicators used in the test.
+ /// </summary>
+ public interface ITestCaseProvider
+ {
+ /// <summary>
+ /// Determine whether any test cases are available for a parameterized method.
+ /// </summary>
+ /// <param name="method">A MethodInfo representing a parameterized test</param>
+ /// <returns>True if any cases are available, otherwise false.</returns>
+ bool HasTestCasesFor(MethodInfo method);
+
+ /// <summary>
+ /// Return an IEnumerable providing test cases for use in
+ /// running a paramterized test.
+ /// </summary>
+ /// <param name="method"></param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method);
+#else
+ System.Collections.IEnumerable GetTestCasesFor(MethodInfo method);
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/GlobalSettings.cs b/external/guiunit/src/framework/GlobalSettings.cs
new file mode 100755
index 0000000..1e0e5ea
--- /dev/null
+++ b/external/guiunit/src/framework/GlobalSettings.cs
@@ -0,0 +1,39 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// GlobalSettings is a place for setting default values used
+ /// by the framework in performing asserts.
+ /// </summary>
+ public class GlobalSettings
+ {
+ /// <summary>
+ /// Default tolerance for floating point equality
+ /// </summary>
+ public static double DefaultFloatingPointTolerance = 0.0d;
+ }
+}
diff --git a/external/guiunit/src/framework/Guard.cs b/external/guiunit/src/framework/Guard.cs
new file mode 100755
index 0000000..2528583
--- /dev/null
+++ b/external/guiunit/src/framework/Guard.cs
@@ -0,0 +1,35 @@
+using System;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Class used to guard against unexpected argument values
+ /// by throwing an appropriate exception.
+ /// </summary>
+ public class Guard
+ {
+ /// <summary>
+ /// Throws an exception if an argument is null
+ /// </summary>
+ /// <param name="value">The value to be tested</param>
+ /// <param name="name">The name of the argument</param>
+ public static void ArgumentNotNull(object value, string name)
+ {
+ if (value == null)
+ throw new ArgumentNullException("Argument " + name + " must not be null", name);
+ }
+
+ /// <summary>
+ /// Throws an exception if a string argument is null or empty
+ /// </summary>
+ /// <param name="value">The value to be tested</param>
+ /// <param name="name">The name of the argument</param>
+ public static void ArgumentNotNullOrEmpty(string value, string name)
+ {
+ ArgumentNotNull(value, name);
+
+ if (value == string.Empty)
+ throw new ArgumentException("Argument " + name +" must not be the empty string", name);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/GuiUnit.sln b/external/guiunit/src/framework/GuiUnit.sln
new file mode 100644
index 0000000..5e7fe7c
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_5", "GuiUnit_NET_4_5.csproj", "{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_0", "GuiUnit_NET_4_0.csproj", "{E13A0A7B-4DE6-43ED-A139-41052D065A9B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E13A0A7B-4DE6-43ED-A139-41052D065A9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = GuiUnit_NET_4_5.csproj
+ EndGlobalSection
+EndGlobal
diff --git a/external/guiunit/src/framework/GuiUnit/AdditionalAsserts.cs b/external/guiunit/src/framework/GuiUnit/AdditionalAsserts.cs
new file mode 100644
index 0000000..f09f614
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/AdditionalAsserts.cs
@@ -0,0 +1,105 @@
+using System;
+
+namespace NUnit.Framework
+{
+ public partial class Assert
+ {
+ #region Greater
+
+ #region int
+ public static void Greater(int expected, int actual, string message, params object[] args)
+ {
+ Assert.That(expected, Is.GreaterThan (actual), message, args);
+ }
+
+ public static void Greater(int expected, int actual, string message)
+ {
+ Assert.That(expected, Is.GreaterThan (actual), message, null);
+ }
+
+ public static void Greater(int expected, int actual)
+ {
+ Assert.That(expected, Is.GreaterThan (actual));
+ }
+ #endregion
+
+ #region double
+
+ public static void Greater(double expected, double actual, string message, params object[] args)
+ {
+ Assert.That(expected, Is.GreaterThan (actual), message, args);
+ }
+
+ public static void Greater(double expected, double actual, string message)
+ {
+ Assert.That(expected, Is.GreaterThan (actual), message, null);
+ }
+
+ public static void Greater(double expected, double actual)
+ {
+ Assert.That(expected, Is.GreaterThan (actual));
+ }
+ #endregion
+
+ #endregion
+
+ #region Less
+
+ #region int
+ public static void Less(int expected, int actual, string message, params object[] args)
+ {
+ Assert.That(expected, Is.LessThan (actual), message, args);
+ }
+
+ public static void Less(int expected, int actual, string message)
+ {
+ Assert.That(expected, Is.LessThan (actual), message, null);
+ }
+
+ public static void Less(int expected, int actual)
+ {
+ Assert.That(expected, Is.LessThan (actual));
+ }
+ #endregion
+
+ #region double
+
+ public static void Less(double expected, double actual, string message, params object[] args)
+ {
+ Assert.That(expected, Is.LessThan (actual), message, args);
+ }
+
+ public static void Less(double expected, double actual, string message)
+ {
+ Assert.That(expected, Is.LessThan (actual), message, null);
+ }
+
+ public static void Less(double expected, double actual)
+ {
+ Assert.That(expected, Is.LessThan (actual));
+ }
+ #endregion
+
+ #endregion
+
+ #region IsInstanceOf
+
+ public static void IsInstanceOf<T>(object actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.InstanceOf<T> (), message, args);
+ }
+
+ public static void IsInstanceOf<T>(object actual, string message)
+ {
+ Assert.That(actual, Is.InstanceOf<T> (), message, null);
+ }
+
+ public static void IsInstanceOf<T>(object actual)
+ {
+ Assert.That(actual, Is.InstanceOf<T> ());
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/GtkMainLoopIntegration.cs b/external/guiunit/src/framework/GuiUnit/GtkMainLoopIntegration.cs
new file mode 100644
index 0000000..80ab3f5
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/GtkMainLoopIntegration.cs
@@ -0,0 +1,69 @@
+//
+// GtkMainLoopIntegration.cs
+//
+// Author:
+// alan <>
+//
+// Copyright (c) 2013 alan
+//
+// 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.Linq;
+
+namespace GuiUnit
+{
+ public class GtkMainLoopIntegration : IMainLoopIntegration
+ {
+ Type Application {
+ get; set;
+ }
+
+ public GtkMainLoopIntegration ()
+ {
+ Application = Type.GetType ("Gtk.Application, gtk-sharp");
+ if (Application == null)
+ throw new NotSupportedException ();
+ }
+
+ public void InitializeToolkit ()
+ {
+ var initMethods = Application.GetMethods (System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ var initMethod = initMethods.First (m => m.Name == "Init" && m.GetParameters ().Length == 0);
+ initMethod.Invoke (null, null);
+ }
+ public void InvokeOnMainLoop (GuiUnit.InvokerHelper helper)
+ {
+ var invokeOnMainThreadMethods = Application.GetMethods (System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ var invokeOnMainThreadMethod = invokeOnMainThreadMethods.First (d => d.Name == "Invoke" && d.GetParameters ().Length == 1);
+ EventHandler invoker = delegate { helper.Invoke (); };
+ invokeOnMainThreadMethod.Invoke (null, new [] { invoker });
+ }
+
+ public void RunMainLoop ()
+ {
+ Application.GetMethod ("Run").Invoke (null, null);
+ }
+
+ public void Shutdown ()
+ {
+ Application.GetMethod ("Quit").Invoke (null, null);
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/IMainLoopIntegration.cs b/external/guiunit/src/framework/GuiUnit/IMainLoopIntegration.cs
new file mode 100644
index 0000000..4121c50
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/IMainLoopIntegration.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace GuiUnit
+{
+ public interface IMainLoopIntegration
+ {
+ void InitializeToolkit ();
+ void InvokeOnMainLoop (InvokerHelper helper);
+ void RunMainLoop ();
+ void Shutdown ();
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs b/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs
new file mode 100644
index 0000000..2e48ff9
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs
@@ -0,0 +1,27 @@
+using System;
+using NUnit.Framework.Internal;
+
+namespace GuiUnit
+{
+ public class InvokerHelper
+ {
+ internal object Result;
+ internal Func<object> Func;
+ internal Exception ex;
+ internal TestExecutionContext Context;
+ internal System.Threading.ManualResetEvent Waiter = new System.Threading.ManualResetEvent(false);
+
+ public void Invoke ()
+ {
+ TestExecutionContext.SetCurrentContext (Context);
+ try {
+ Result = Func ();
+ } catch (Exception e) {
+ ex = e;
+ } finally {
+ Waiter.Set ();
+ }
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/MainLoopCommand.cs b/external/guiunit/src/framework/GuiUnit/MainLoopCommand.cs
new file mode 100644
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs b/external/guiunit/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs
new file mode 100644
index 0000000..6d93639
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Linq;
+
+namespace GuiUnit
+{
+ public class MonoMacMainLoopIntegration : IMainLoopIntegration
+ {
+ Type Application {
+ get; set;
+ }
+
+ object SharedApplication {
+ get; set;
+ }
+
+ public MonoMacMainLoopIntegration ()
+ {
+ Application = Type.GetType ("MonoMac.AppKit.NSApplication, MonoMac");
+ if (Application == null)
+ throw new NotSupportedException ();
+ }
+
+ public void InitializeToolkit ()
+ {
+ var initMethod = Application.GetMethod ("Init", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ initMethod.Invoke (null, null);
+
+ var sharedAppProperty = Application.GetProperty ("SharedApplication", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ SharedApplication = sharedAppProperty.GetValue (null, null);
+ }
+
+ public void InvokeOnMainLoop (InvokerHelper helper)
+ {
+ var potentialMethods = Application.GetMethods (System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
+ var invokeOnMainThreadMethod = potentialMethods.First (m => m.Name == "InvokeOnMainThread" && m.GetParameters ().Length == 1);
+ var invoker = Delegate.CreateDelegate (invokeOnMainThreadMethod.GetParameters () [0].ParameterType, helper, "Invoke");
+ invokeOnMainThreadMethod.Invoke (SharedApplication, new [] { invoker });
+ }
+
+ public void RunMainLoop ()
+ {
+ Application.GetMethod ("Run").Invoke (SharedApplication, null);
+ }
+
+ public void Shutdown ()
+ {
+ Application.GetMethod ("Terminate").Invoke (SharedApplication, new [] { SharedApplication });
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/TestRunner.cs b/external/guiunit/src/framework/GuiUnit/TestRunner.cs
new file mode 100644
index 0000000..d82a7ce
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/TestRunner.cs
@@ -0,0 +1,400 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.IO;
+using System.Linq;
+using System.Collections;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Filters;
+using System.Diagnostics;
+using NUnitLite.Runner;
+using System.Net;
+
+namespace GuiUnit
+{
+ public class TestRunner : ITestListener
+ {
+ internal static MethodInfo LoadFileMethod;
+ static int ExitCode = 0;
+ static bool initialized = false;
+ static IMainLoopIntegration mainLoop;
+
+ static TestRunner ()
+ {
+ LoadFileMethod = typeof(Assembly).GetMethods ().FirstOrDefault (m => {
+ return m.Name == "LoadFile" && m.GetParameters ().Length == 1 && m.GetParameters () [0].ParameterType == typeof(string);
+ });
+ }
+
+ public static IMainLoopIntegration MainLoop {
+ get {
+ if (initialized)
+ return mainLoop;
+
+ initialized = true;
+ try { mainLoop = mainLoop ?? new XwtMainLoopIntegration (); } catch { }
+ try { mainLoop = mainLoop ?? new MonoMacMainLoopIntegration (); } catch { }
+ try { mainLoop = mainLoop ?? new GtkMainLoopIntegration (); } catch { }
+ return mainLoop;
+ } set {
+ mainLoop = value;
+ }
+ }
+
+ public static int Main (string[] args)
+ {
+ new TestRunner ().Execute (args);
+ return ExitCode;
+ }
+
+ private CommandLineOptions commandLineOptions;
+
+ private NUnit.ObjectList assemblies = new NUnit.ObjectList();
+
+ private TextWriter writer;
+
+ private ITestListener listener;
+
+ private ITestAssemblyRunner runner;
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TextUI"/> class.
+ /// </summary>
+ public TestRunner() : this(ConsoleWriter.Out, TestListener.NULL) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TextUI"/> class.
+ /// </summary>
+ /// <param name="writer">The TextWriter to use.</param>
+ public TestRunner(TextWriter writer) : this(writer, TestListener.NULL) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TextUI"/> class.
+ /// </summary>
+ /// <param name="writer">The TextWriter to use.</param>
+ /// <param name="listener">The Test listener to use.</param>
+ public TestRunner(TextWriter writer, ITestListener listener)
+ {
+ // Set the default writer - may be overridden by the args specified
+ this.writer = writer;
+ this.runner = new NUnitLiteTestAssemblyRunner(new NUnitLiteTestAssemblyBuilder());
+ this.listener = listener;
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Execute a test run based on the aruments passed
+ /// from Main.
+ /// </summary>
+ /// <param name="args">An array of arguments</param>
+ public void Execute(string[] args)
+ {
+ // NOTE: Execute must be directly called from the
+ // test assembly in order for the mechanism to work.
+ Assembly callingAssembly = Assembly.GetCallingAssembly();
+
+ this.commandLineOptions = new CommandLineOptions();
+ commandLineOptions.Parse(args);
+
+ if (commandLineOptions.OutFile != null)
+ this.writer = new StreamWriter(commandLineOptions.OutFile);
+
+ if (listener == TestListener.NULL && commandLineOptions.Port != -1) {
+ listener = new XmlTestListener (new TcpWriter (new IPEndPoint (IPAddress.Loopback, commandLineOptions.Port)));
+ }
+
+ if (!commandLineOptions.NoHeader)
+ WriteHeader(this.writer);
+
+ if (commandLineOptions.ShowHelp)
+ writer.Write(commandLineOptions.HelpText);
+ else if (commandLineOptions.Error)
+ {
+ writer.WriteLine(commandLineOptions.ErrorMessage);
+ writer.WriteLine(commandLineOptions.HelpText);
+ }
+ else
+ {
+ WriteRuntimeEnvironment(this.writer);
+
+ if (commandLineOptions.Wait && commandLineOptions.OutFile != null)
+ writer.WriteLine("Ignoring /wait option - only valid for Console");
+
+ #if SILVERLIGHT
+ IDictionary loadOptions = new System.Collections.Generic.Dictionary<string, string>();
+ #else
+ IDictionary loadOptions = new Hashtable();
+ #endif
+ //if (options.Load.Count > 0)
+ // loadOptions["LOAD"] = options.Load;
+
+ //IDictionary runOptions = new Hashtable();
+ //if (commandLineOptions.TestCount > 0)
+ // runOptions["RUN"] = commandLineOptions.Tests;
+
+ ITestFilter filter = commandLineOptions.TestCount > 0
+ ? new SimpleNameFilter(commandLineOptions.Tests)
+ : TestFilter.Empty;
+
+ try
+ {
+ if (TestRunner.LoadFileMethod != null) {
+ foreach (string name in commandLineOptions.Parameters)
+ assemblies.Add (TestRunner.LoadFileMethod.Invoke (null, new[] { name }));
+ }
+
+ if (assemblies.Count == 0)
+ assemblies.Add(callingAssembly);
+
+ // TODO: For now, ignore all but first assembly
+ Assembly assembly = assemblies[0] as Assembly;
+
+ if (!runner.Load(assembly, loadOptions))
+ {
+ AssemblyName assemblyName = AssemblyHelper.GetAssemblyName(assembly);
+ Console.WriteLine("No tests found in assembly {0}", assemblyName.Name);
+ return;
+ }
+
+ if (commandLineOptions.Explore)
+ ExploreTests();
+ else
+ {
+ if (commandLineOptions.Include != null && commandLineOptions.Include != string.Empty)
+ {
+ TestFilter includeFilter = new SimpleCategoryExpression(commandLineOptions.Include).Filter;
+
+ if (filter.IsEmpty)
+ filter = includeFilter;
+ else
+ filter = new AndFilter(filter, includeFilter);
+ }
+
+ if (commandLineOptions.Exclude != null && commandLineOptions.Exclude != string.Empty)
+ {
+ TestFilter excludeFilter = new NotFilter(new SimpleCategoryExpression(commandLineOptions.Exclude).Filter);
+
+ if (filter.IsEmpty)
+ filter = excludeFilter;
+ else if (filter is AndFilter)
+ ((AndFilter)filter).Add(excludeFilter);
+ else
+ filter = new AndFilter(filter, excludeFilter);
+ }
+
+ if (MainLoop == null) {
+ RunTests (filter);
+ } else {
+ MainLoop.InitializeToolkit ();
+ System.Threading.ThreadPool.QueueUserWorkItem (d => {
+ RunTests (filter);
+ Shutdown ();
+ });
+ MainLoop.RunMainLoop ();
+ }
+ }
+ }
+ catch (FileNotFoundException ex)
+ {
+ writer.WriteLine(ex.Message);
+ }
+ catch (Exception ex)
+ {
+ writer.WriteLine(ex.ToString());
+ }
+ finally
+ {
+ if (commandLineOptions.OutFile == null)
+ {
+ if (commandLineOptions.Wait)
+ {
+ Console.WriteLine("Press Enter key to continue . . .");
+ Console.ReadLine();
+ }
+ }
+ else
+ {
+ writer.Close();
+ }
+ }
+ }
+ }
+
+ static void Shutdown ()
+ {
+ // Run the shutdown method on the main thread
+ var helper = new InvokerHelper {
+ Func = () => {
+ MainLoop.Shutdown ();
+ return null;
+ }
+ };
+ MainLoop.InvokeOnMainLoop (helper);
+ }
+
+ /// <summary>
+ /// Write the standard header information to a TextWriter.
+ /// </summary>
+ /// <param name="writer">The TextWriter to use</param>
+ public static void WriteHeader(TextWriter writer)
+ {
+ Assembly executingAssembly = Assembly.GetExecutingAssembly();
+ #if NUNITLITE
+ string title = "NUnitLite";
+ #else
+ string title = "NUNit Framework";
+ #endif
+ AssemblyName assemblyName = AssemblyHelper.GetAssemblyName(executingAssembly);
+ System.Version version = assemblyName.Version;
+ string copyright = "Copyright (C) 2012, Charlie Poole";
+ string build = "";
+
+ object[] attrs = executingAssembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
+ if (attrs.Length > 0)
+ {
+ AssemblyTitleAttribute titleAttr = (AssemblyTitleAttribute)attrs[0];
+ title = titleAttr.Title;
+ }
+
+ attrs = executingAssembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
+ if (attrs.Length > 0)
+ {
+ AssemblyCopyrightAttribute copyrightAttr = (AssemblyCopyrightAttribute)attrs[0];
+ copyright = copyrightAttr.Copyright;
+ }
+
+ attrs = executingAssembly.GetCustomAttributes(typeof(AssemblyConfigurationAttribute), false);
+ if (attrs.Length > 0)
+ {
+ AssemblyConfigurationAttribute configAttr = (AssemblyConfigurationAttribute)attrs[0];
+ if (configAttr.Configuration.Length > 0)
+ build = string.Format("({0})", configAttr.Configuration);
+ }
+
+ writer.WriteLine(String.Format("{0} {1} {2}", title, version.ToString(3), build));
+ writer.WriteLine(copyright);
+ writer.WriteLine();
+ }
+
+ /// <summary>
+ /// Write information about the current runtime environment
+ /// </summary>
+ /// <param name="writer">The TextWriter to be used</param>
+ public static void WriteRuntimeEnvironment(TextWriter writer)
+ {
+ string clrPlatform = Type.GetType("Mono.Runtime", false) == null ? ".NET" : "Mono";
+
+ writer.WriteLine("Runtime Environment -");
+ writer.WriteLine(" OS Version: {0}", Environment.OSVersion);
+ writer.WriteLine(" {0} Version: {1}", clrPlatform, Environment.Version);
+ writer.WriteLine();
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private void RunTests(ITestFilter filter)
+ {
+ ITestResult result = runner.Run(this, filter);
+ ExitCode = result.FailCount;
+ new ResultReporter(result, writer).ReportResults();
+ if (commandLineOptions.ResultFile != null)
+ {
+ new NUnit2XmlOutputWriter().WriteResultFile (result, commandLineOptions.ResultFile);
+
+ Console.WriteLine();
+ Console.WriteLine("Results saved as {0}.", commandLineOptions.ResultFile);
+ }
+ }
+
+ private void ExploreTests()
+ {
+ XmlNode testNode = runner.LoadedTest.ToXml(true);
+
+ string listFile = commandLineOptions.ExploreFile;
+ TextWriter textWriter = listFile != null && listFile.Length > 0
+ ? new StreamWriter(listFile)
+ : Console.Out;
+
+ #if CLR_2_0 || CLR_4_0
+ System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings();
+ settings.Indent = true;
+ settings.Encoding = System.Text.Encoding.UTF8;
+ System.Xml.XmlWriter testWriter = System.Xml.XmlWriter.Create(textWriter, settings);
+ #else
+ System.Xml.XmlTextWriter testWriter = new System.Xml.XmlTextWriter(textWriter);
+ testWriter.Formatting = System.Xml.Formatting.Indented;
+ #endif
+
+ testNode.WriteTo(testWriter);
+ testWriter.Close();
+
+ Console.WriteLine();
+ Console.WriteLine("Test info saved as {0}.", listFile);
+ }
+
+ #endregion
+
+ #region ITestListener Members
+
+ /// <summary>
+ /// A test has just started
+ /// </summary>
+ /// <param name="test">The test</param>
+ public void TestStarted(ITest test)
+ {
+ if (commandLineOptions.LabelTestsInOutput)
+ writer.WriteLine("***** {0}", test.Name);
+ listener.TestStarted (test);
+ }
+
+ /// <summary>
+ /// A test has just finished
+ /// </summary>
+ /// <param name="result">The result of the test</param>
+ public void TestFinished(ITestResult result)
+ {
+ listener.TestFinished (result);
+ }
+
+ /// <summary>
+ /// A test has produced some text output
+ /// </summary>
+ /// <param name="testOutput">A TestOutput object holding the text that was written</param>
+ public void TestOutput(TestOutput testOutput)
+ {
+ listener.TestOutput (testOutput);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/GuiUnit/XmlTestListener.cs b/external/guiunit/src/framework/GuiUnit/XmlTestListener.cs
new file mode 100644
index 0000000..af8ca2f
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/XmlTestListener.cs
@@ -0,0 +1,66 @@
+using System;
+using NUnit.Framework.Api;
+using System.Xml.Linq;
+using System.IO;
+
+namespace GuiUnit
+{
+ public class XmlTestListener : ITestListener
+ {
+ TextWriter Writer {
+ get; set;
+ }
+
+ public XmlTestListener (TextWriter writer)
+ {
+ Writer = writer;
+ }
+
+ public void TestStarted (ITest test)
+ {
+ if (test.HasChildren)
+ Write (new XElement ("suite-started", new XAttribute ("name", test.FullName)));
+ else
+ Write (new XElement ("test-started", new XAttribute ("name", test.FullName)));
+ }
+
+ public void TestFinished (ITestResult result)
+ {
+ var element = new XElement (result.Test.HasChildren ? "suite-finished" : "test-finished",
+ new XAttribute ("name", result.Test.FullName),
+ new XAttribute ("result", ToXmlString (result.ResultState)),
+ new XAttribute ("passed", result.PassCount),
+ new XAttribute ("failures", result.FailCount),
+ new XAttribute ("ignored", result.SkipCount),
+ new XAttribute ("inconclusive", result.InconclusiveCount)
+ );
+ Write (element);
+ }
+
+ public void TestOutput (TestOutput testOutput)
+ {
+ // Ignore
+ }
+
+ object ToXmlString (ResultState resultState)
+ {
+ if (resultState == ResultState.Success)
+ return "Success";
+ else if (resultState == ResultState.Inconclusive)
+ return "Inconclusive";
+ else if (resultState == ResultState.Ignored)
+ return "Ignored";
+ else
+ return "Failure";
+ }
+
+ void Write (XElement element)
+ {
+ try {
+ Writer.WriteLine (element.ToString ());
+ } catch {
+ }
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit/XwtMainLoopIntegration.cs b/external/guiunit/src/framework/GuiUnit/XwtMainLoopIntegration.cs
new file mode 100644
index 0000000..c3918a0
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit/XwtMainLoopIntegration.cs
@@ -0,0 +1,64 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+
+namespace GuiUnit
+{
+ public class XwtMainLoopIntegration : IMainLoopIntegration
+ {
+ Type Application {
+ get; set;
+ }
+
+ public XwtMainLoopIntegration ()
+ {
+ Application = Type.GetType ("Xwt.Application, Xwt");
+ if (Application == null)
+ throw new NotSupportedException ();
+ }
+
+ public void InitializeToolkit ()
+ {
+ Type assemblyType = typeof (Assembly);
+ PropertyInfo locationProperty = assemblyType.GetProperty ("Location");
+ if (locationProperty == null)
+ throw new NotSupportedException();
+
+ if (TestRunner.LoadFileMethod == null)
+ throw new NotSupportedException();
+
+ string assemblyDirectory = Path.GetDirectoryName ((string)locationProperty.GetValue (Application.Assembly, null));
+
+ // Firstly init Xwt
+ foreach (var impl in new [] { "Xwt.Gtk.dll", "Xwt.Mac.dll", "Xwt.Wpf.dll"}) {
+ var xwtImpl = Path.Combine (assemblyDirectory, impl);
+ if (File.Exists (xwtImpl))
+ TestRunner.LoadFileMethod.Invoke (null, new[] { xwtImpl });
+ }
+
+ var initMethods = Application.GetMethods (System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ var initMethod = initMethods.First (m => m.Name == "Initialize" && m.GetParameters ().Length == 1 && m.GetParameters () [0].ParameterType == typeof(string));
+ initMethod.Invoke (null, new [] { "Xwt.GtkBackend.GtkEngine, Xwt.Gtk" });
+ }
+
+ public void InvokeOnMainLoop (InvokerHelper helper)
+ {
+ var application = Type.GetType ("Xwt.Application, Xwt");
+ var invokeOnMainThreadMethod = application.GetMethod ("Invoke", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
+ var invoker = Delegate.CreateDelegate (invokeOnMainThreadMethod.GetParameters () [0].ParameterType, helper, "Invoke");
+ invokeOnMainThreadMethod.Invoke (null, new [] { invoker });
+ }
+
+ public void RunMainLoop ()
+ {
+ Application.GetMethod ("Run").Invoke (null, null);
+ }
+
+ public void Shutdown ()
+ {
+ Application.GetMethod ("Exit").Invoke (null, null);
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/GuiUnit_NET_4_0.csproj b/external/guiunit/src/framework/GuiUnit_NET_4_0.csproj
new file mode 100644
index 0000000..2921274
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit_NET_4_0.csproj
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E13A0A7B-4DE6-43ED-A139-41052D065A9B}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>GuiUnit</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\net_4_0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG; CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\net_4_0\</OutputPath>
+ <DefineConstants>TRACE;NET_4_5, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\AsyncInvocationRegion.cs" />
+ <Compile Include="Internal\AsyncSynchronizationContext.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ <Compile Include="GuiUnit\TestRunner.cs" />
+ <Compile Include="GuiUnit\MainLoopCommand.cs" />
+ <Compile Include="GuiUnit\IMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\XwtMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\InvokerHelper.cs" />
+ <Compile Include="GuiUnit\MonoMacMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\XmlTestListener.cs" />
+ <Compile Include="GuiUnit\AdditionalAsserts.cs" />
+ <Compile Include="GuiUnit\GtkMainLoopIntegration.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ <Folder Include="GuiUnit\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
diff --git a/external/guiunit/src/framework/GuiUnit_NET_4_5.csproj b/external/guiunit/src/framework/GuiUnit_NET_4_5.csproj
new file mode 100644
index 0000000..2bad514
--- /dev/null
+++ b/external/guiunit/src/framework/GuiUnit_NET_4_5.csproj
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>GuiUnit</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ <SignAssembly>true</SignAssembly>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\net_4_5</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_5; CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\net_4_5</OutputPath>
+ <DefineConstants>TRACE;NET_4_5, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\AsyncInvocationRegion.cs" />
+ <Compile Include="Internal\AsyncSynchronizationContext.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ <Compile Include="GuiUnit\TestRunner.cs" />
+ <Compile Include="GuiUnit\MainLoopCommand.cs" />
+ <Compile Include="GuiUnit\IMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\XwtMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\InvokerHelper.cs" />
+ <Compile Include="GuiUnit\MonoMacMainLoopIntegration.cs" />
+ <Compile Include="GuiUnit\XmlTestListener.cs" />
+ <Compile Include="GuiUnit\AdditionalAsserts.cs" />
+ <Compile Include="GuiUnit\GtkMainLoopIntegration.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ <Folder Include="GuiUnit\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
diff --git a/external/guiunit/src/framework/Has.cs b/external/guiunit/src/framework/Has.cs
new file mode 100755
index 0000000..5f7877d
--- /dev/null
+++ b/external/guiunit/src/framework/Has.cs
@@ -0,0 +1,209 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Helper class with properties and methods that supply
+ /// a number of constraints used in Asserts.
+ /// </summary>
+ public class Has
+ {
+ #region No
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public static ConstraintExpression No
+ {
+ get { return new ConstraintExpression().Not; }
+ }
+
+ #endregion
+
+ #region All
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them succeed.
+ /// </summary>
+ public static ConstraintExpression All
+ {
+ get { return new ConstraintExpression().All; }
+ }
+
+ #endregion
+
+ #region Some
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if at least one of them succeeds.
+ /// </summary>
+ public static ConstraintExpression Some
+ {
+ get { return new ConstraintExpression().Some; }
+ }
+
+ #endregion
+
+ #region None
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them fail.
+ /// </summary>
+ public static ConstraintExpression None
+ {
+ get { return new ConstraintExpression().None; }
+ }
+
+ #endregion
+
+ #region Exactly(n)
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding only if a specified number of them succeed.
+ /// </summary>
+ public static ConstraintExpression Exactly(int expectedCount)
+ {
+ return new ConstraintExpression().Exactly(expectedCount);
+ }
+
+ #endregion
+
+ #region Property
+
+ /// <summary>
+ /// Returns a new PropertyConstraintExpression, which will either
+ /// test for the existence of the named property on the object
+ /// being tested or apply any following constraint to that property.
+ /// </summary>
+ public static ResolvableConstraintExpression Property(string name)
+ {
+ return new ConstraintExpression().Property(name);
+ }
+
+ #endregion
+
+ #region Length
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Length property of the object being tested.
+ /// </summary>
+ public static ResolvableConstraintExpression Length
+ {
+ get { return Property("Length"); }
+ }
+
+ #endregion
+
+ #region Count
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Count property of the object being tested.
+ /// </summary>
+ public static ResolvableConstraintExpression Count
+ {
+ get { return Property("Count"); }
+ }
+
+ #endregion
+
+ #region Message
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the Message property of the object being tested.
+ /// </summary>
+ public static ResolvableConstraintExpression Message
+ {
+ get { return Property("Message"); }
+ }
+
+ #endregion
+
+ #region InnerException
+
+ /// <summary>
+ /// Returns a new ConstraintExpression, which will apply the following
+ /// constraint to the InnerException property of the object being tested.
+ /// </summary>
+ public static ResolvableConstraintExpression InnerException
+ {
+ get { return Property("InnerException"); }
+ }
+
+ #endregion
+
+ #region Attribute
+
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public static ResolvableConstraintExpression Attribute(Type expectedType)
+ {
+ return new ConstraintExpression().Attribute(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a new AttributeConstraint checking for the
+ /// presence of a particular attribute on an object.
+ /// </summary>
+ public static ResolvableConstraintExpression Attribute<T>()
+ {
+ return Attribute(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region Member
+
+ /// <summary>
+ /// Returns a new CollectionContainsConstraint checking for the
+ /// presence of a particular object in the collection.
+ /// </summary>
+ public static CollectionContainsConstraint Member(object expected)
+ {
+ return new CollectionContainsConstraint(expected);
+ }
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/IExpectException.cs b/external/guiunit/src/framework/IExpectException.cs
new file mode 100755
index 0000000..adcdca7
--- /dev/null
+++ b/external/guiunit/src/framework/IExpectException.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Interface implemented by a user fixture in order to
+ /// validate any expected exceptions. It is only called
+ /// for test methods marked with the ExpectedException
+ /// attribute.
+ /// </summary>
+ public interface IExpectException
+ {
+ /// <summary>
+ /// Method to handle an expected exception
+ /// </summary>
+ /// <param name="ex">The exception to be handled</param>
+ void HandleException(Exception ex);
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/AssemblyHelper.cs b/external/guiunit/src/framework/Internal/AssemblyHelper.cs
new file mode 100755
index 0000000..c9b8593
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/AssemblyHelper.cs
@@ -0,0 +1,135 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// AssemblyHelper provides static methods for working
+ /// with assemblies.
+ /// </summary>
+ public class AssemblyHelper
+ {
+ #region GetAssemblyPath
+
+#if !NETCF
+ /// <summary>
+ /// Gets the path from which the assembly defining a Type was loaded.
+ /// </summary>
+ /// <param name="assembly">The Type.</param>
+ /// <returns>The path.</returns>
+ public static string GetAssemblyPath(Type type)
+ {
+ return GetAssemblyPath(type.Assembly);
+ }
+
+ /// <summary>
+ /// Gets the path from which an assembly was loaded.
+ /// </summary>
+ /// <param name="assembly">The assembly.</param>
+ /// <returns>The path.</returns>
+ public static string GetAssemblyPath(Assembly assembly)
+ {
+ string codeBase = assembly.CodeBase;
+
+ if (IsFileUri(codeBase))
+ return GetAssemblyPathFromCodeBase(codeBase);
+
+ return assembly.Location;
+ }
+#endif
+
+ #endregion
+
+ #region GetDirectoryName
+
+#if !NETCF
+ /// <summary>
+ /// Gets the path to the directory from which an assembly was loaded.
+ /// </summary>
+ /// <param name="assembly">The assembly.</param>
+ /// <returns>The path.</returns>
+ public static string GetDirectoryName( Assembly assembly )
+ {
+ return System.IO.Path.GetDirectoryName(GetAssemblyPath(assembly));
+ }
+#endif
+
+ #endregion
+
+ #region GetAssemblyName
+
+ /// <summary>
+ /// Gets the AssemblyName of an assembly.
+ /// </summary>
+ /// <param name="assembly">The assembly</param>
+ /// <returns>An AssemblyName</returns>
+ public static AssemblyName GetAssemblyName(Assembly assembly)
+ {
+#if SILVERLIGHT
+ return new AssemblyName(assembly.FullName);
+#else
+ return assembly.GetName();
+#endif
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+#if !NETCF
+ private static bool IsFileUri(string uri)
+ {
+ return uri.ToLower().StartsWith(Uri.UriSchemeFile);
+ }
+
+ // Public for testing purposes
+ public static string GetAssemblyPathFromCodeBase(string codeBase)
+ {
+ // Skip over the file:// part
+ int start = Uri.UriSchemeFile.Length + Uri.SchemeDelimiter.Length;
+
+ bool isWindows = System.IO.Path.DirectorySeparatorChar == '\\';
+
+ if (codeBase[start] == '/') // third slash means a local path
+ {
+ // Handle Windows Drive specifications
+ if (isWindows && codeBase[start + 2] == ':')
+ ++start;
+ // else leave the last slash so path is absolute
+ }
+ else // It's either a Windows Drive spec or a share
+ {
+ if (!isWindows || codeBase[start + 1] != ':')
+ start -= 2; // Back up to include two slashes
+ }
+
+ return codeBase.Substring(start);
+ }
+#endif
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/AsyncInvocationRegion.cs b/external/guiunit/src/framework/Internal/AsyncInvocationRegion.cs
new file mode 100755
index 0000000..8c04006
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/AsyncInvocationRegion.cs
@@ -0,0 +1,131 @@
+#if NET_4_5
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Threading;
+
+namespace NUnit.Framework.Internal
+{
+ internal abstract class AsyncInvocationRegion : IDisposable
+ {
+ private static readonly Type AsyncStateMachineAttribute = Type.GetType("System.Runtime.CompilerServices.AsyncStateMachineAttribute");
+ //private static readonly MethodInfo PreserveStackTraceMethod = typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic);
+ //private static readonly Action<Exception> PreserveStackTrace;
+
+ static AsyncInvocationRegion()
+ {
+ //PreserveStackTrace = (Action<Exception>)Delegate.CreateDelegate(typeof(Action<Exception>), PreserveStackTraceMethod);
+ }
+
+ private AsyncInvocationRegion()
+ {
+ }
+
+ public static AsyncInvocationRegion Create(Delegate @delegate)
+ {
+ return Create(@delegate.Method);
+ }
+
+ public static AsyncInvocationRegion Create(MethodInfo method)
+ {
+ if (!IsAsyncOperation(method))
+ throw new InvalidOperationException(@"Either asynchronous support is not available or an attempt
+at wrapping a non-async method invocation in an async region was done");
+
+ if (method.ReturnType == typeof(void))
+ return new AsyncVoidInvocationRegion();
+
+ return new AsyncTaskInvocationRegion();
+ }
+
+ public static bool IsAsyncOperation(MethodInfo method)
+ {
+ return AsyncStateMachineAttribute != null && method.IsDefined(AsyncStateMachineAttribute, false);
+ }
+
+ public static bool IsAsyncOperation(Delegate @delegate)
+ {
+ return IsAsyncOperation(@delegate.Method);
+ }
+
+ /// <summary>
+ /// Waits for pending asynchronous operations to complete, if appropriate,
+ /// and returns a proper result of the invocation by unwrapping task results
+ /// </summary>
+ /// <param name="invocationResult">The raw result of the method invocation</param>
+ /// <returns>The unwrapped result, if necessary</returns>
+ public abstract object WaitForPendingOperationsToComplete(object invocationResult);
+
+ public virtual void Dispose()
+ { }
+
+ private class AsyncVoidInvocationRegion : AsyncInvocationRegion
+ {
+ private readonly SynchronizationContext _previousContext;
+ private readonly AsyncSynchronizationContext _currentContext;
+
+ public AsyncVoidInvocationRegion()
+ {
+ _previousContext = SynchronizationContext.Current;
+ _currentContext = new AsyncSynchronizationContext();
+ SynchronizationContext.SetSynchronizationContext(_currentContext);
+ }
+
+ public override void Dispose()
+ {
+ SynchronizationContext.SetSynchronizationContext(_previousContext);
+ }
+
+ public override object WaitForPendingOperationsToComplete(object invocationResult)
+ {
+ try
+ {
+ _currentContext.WaitForPendingOperationsToComplete();
+ return invocationResult;
+ }
+ catch (Exception e)
+ {
+ //PreserveStackTrace(e);
+ throw;
+ }
+ }
+ }
+
+ private class AsyncTaskInvocationRegion : AsyncInvocationRegion
+ {
+ private const string TaskWaitMethod = "Wait";
+ private const string TaskResultProperty = "Result";
+ private const string SystemAggregateException = "System.AggregateException";
+ private const string InnerExceptionsProperty = "InnerExceptions";
+ private const BindingFlags TaskResultPropertyBindingFlags = BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public;
+
+ public override object WaitForPendingOperationsToComplete(object invocationResult)
+ {
+ try
+ {
+ invocationResult.GetType().GetMethod(TaskWaitMethod, new Type[0]).Invoke(invocationResult, null);
+ }
+ catch (TargetInvocationException e)
+ {
+ IList<Exception> innerExceptions = GetAllExceptions(e.InnerException);
+
+ //PreserveStackTrace(innerExceptions[0]);
+ throw innerExceptions[0];
+ }
+
+ PropertyInfo taskResultProperty = invocationResult.GetType().GetProperty(TaskResultProperty, TaskResultPropertyBindingFlags);
+
+ return taskResultProperty != null ? taskResultProperty.GetValue(invocationResult, null) : invocationResult;
+ }
+
+ private static IList<Exception> GetAllExceptions(Exception exception)
+ {
+ if (SystemAggregateException.Equals(exception.GetType().FullName))
+ return (IList<Exception>)exception.GetType().GetProperty(InnerExceptionsProperty).GetValue(exception, null);
+
+ return new Exception[] { exception };
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/AsyncSynchronizationContext.cs b/external/guiunit/src/framework/Internal/AsyncSynchronizationContext.cs
new file mode 100755
index 0000000..6187a2c
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/AsyncSynchronizationContext.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Collections;
+using System.Threading;
+
+namespace NUnit.Framework.Internal
+{
+ internal class AsyncSynchronizationContext : SynchronizationContext
+ {
+ private int _operationCount;
+ private readonly AsyncOperationQueue _operations = new AsyncOperationQueue();
+
+ public override void Send(SendOrPostCallback d, object state)
+ {
+ throw new InvalidOperationException("Sending to this synchronization context is not supported");
+ }
+
+ public override void Post(SendOrPostCallback d, object state)
+ {
+ _operations.Enqueue(new AsyncOperation(d, state));
+ }
+
+ public override void OperationStarted()
+ {
+ Interlocked.Increment(ref _operationCount);
+ base.OperationStarted();
+ }
+
+ public override void OperationCompleted()
+ {
+ if (Interlocked.Decrement(ref _operationCount) == 0)
+ _operations.MarkAsComplete();
+
+ base.OperationCompleted();
+ }
+
+ public void WaitForPendingOperationsToComplete()
+ {
+ _operations.InvokeAll();
+ }
+
+ private class AsyncOperationQueue
+ {
+ private bool _run = true;
+ private readonly Queue _operations = Queue.Synchronized(new Queue());
+ private readonly AutoResetEvent _operationsAvailable = new AutoResetEvent(false);
+
+ public void Enqueue(AsyncOperation asyncOperation)
+ {
+ _operations.Enqueue(asyncOperation);
+ _operationsAvailable.Set();
+ }
+
+ public void MarkAsComplete()
+ {
+ _run = false;
+ _operationsAvailable.Set();
+ }
+
+ public void InvokeAll()
+ {
+ while (_run)
+ {
+ InvokePendingOperations();
+ _operationsAvailable.WaitOne();
+ }
+
+ InvokePendingOperations();
+ }
+
+ private void InvokePendingOperations()
+ {
+ while (_operations.Count > 0)
+ {
+ AsyncOperation operation = (AsyncOperation)_operations.Dequeue();
+ operation.Invoke();
+ }
+ }
+ }
+
+ private class AsyncOperation
+ {
+ private readonly SendOrPostCallback _action;
+ private readonly object _state;
+
+ public AsyncOperation(SendOrPostCallback action, object state)
+ {
+ _action = action;
+ _state = state;
+ }
+
+ public void Invoke()
+ {
+ _action(_state);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Builders/CombinatorialStrategy.cs b/external/guiunit/src/framework/Internal/Builders/CombinatorialStrategy.cs
new file mode 100755
index 0000000..9f2bae1
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/CombinatorialStrategy.cs
@@ -0,0 +1,92 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// CombinatorialStrategy creates test cases by using all possible
+ /// combinations of the parameter data.
+ /// </summary>
+ public class CombinatorialStrategy : CombiningStrategy
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CombinatorialStrategy"/> class.
+ /// </summary>
+ /// <param name="sources">The sources.</param>
+ public CombinatorialStrategy(IEnumerable[] sources) : base(sources) { }
+
+ /// <summary>
+ /// Gets the test cases generated by the CombiningStrategy.
+ /// </summary>
+ /// <returns>The test cases.</returns>
+#if CLR_2_0 || CLR_4_0
+ public override IEnumerable<ITestCaseData> GetTestCases()
+ {
+ List<ITestCaseData> testCases = new List<ITestCaseData>();
+#else
+ public override IEnumerable GetTestCases()
+ {
+ ArrayList testCases = new ArrayList();
+#endif
+ IEnumerator[] enumerators = new IEnumerator[Sources.Length];
+ int index = -1;
+
+ for (; ; )
+ {
+ while (++index < Sources.Length)
+ {
+ enumerators[index] = Sources[index].GetEnumerator();
+ if (!enumerators[index].MoveNext())
+ return testCases;
+ }
+
+ object[] testdata = new object[Sources.Length];
+
+ for (int i = 0; i < Sources.Length; i++)
+ testdata[i] = enumerators[i].Current;
+
+ ParameterSet parms = new ParameterSet();
+ parms.Arguments = testdata;
+ testCases.Add(parms);
+
+ index = Sources.Length;
+
+ while (--index >= 0 && !enumerators[index].MoveNext()) ;
+
+ if (index < 0) break;
+ }
+
+ return testCases;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/CombinatorialTestCaseProvider.cs b/external/guiunit/src/framework/Internal/Builders/CombinatorialTestCaseProvider.cs
new file mode 100755
index 0000000..8455cc7
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/CombinatorialTestCaseProvider.cs
@@ -0,0 +1,113 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using System.Collections;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// CombinatorialTestCaseProvider creates test cases from individual
+ /// parameter data values, combining them using the CombiningStrategy
+ /// indicated by an Attribute used on the test method.
+ /// </summary>
+ public class CombinatorialTestCaseProvider : ITestCaseProvider
+ {
+ #region Static Members
+ static IParameterDataProvider dataPointProvider =
+#if NUNITLITE
+ new ParameterDataProviders();
+#else
+ (IParameterDataProvider)CoreExtensions.Host.GetExtensionPoint("ParameterDataProviders");
+#endif
+
+ #endregion
+
+ #region ITestCaseProvider Members
+
+ /// <summary>
+ /// Determine whether any test cases are available for a parameterized method.
+ /// </summary>
+ /// <param name="method">A MethodInfo representing a parameterized test</param>
+ /// <returns>
+ /// True if any cases are available, otherwise false.
+ /// </returns>
+ public bool HasTestCasesFor(System.Reflection.MethodInfo method)
+ {
+ if (method.GetParameters().Length == 0)
+ return false;
+
+ foreach (ParameterInfo parameter in method.GetParameters())
+ if (!dataPointProvider.HasDataFor(parameter))
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Return an IEnumerable providing test cases for use in
+ /// running a paramterized test.
+ /// </summary>
+ /// <param name="method"></param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ public System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method)
+#else
+ public IEnumerable GetTestCasesFor(MethodInfo method)
+#endif
+ {
+ return GetStrategy(method).GetTestCases();
+ }
+ #endregion
+
+ #region GetStrategy
+
+ /// <summary>
+ /// Gets the strategy to be used in building test cases for this test.
+ /// </summary>
+ /// <param name="method">The method for which test cases are being built.</param>
+ /// <returns></returns>
+ private CombiningStrategy GetStrategy(MethodInfo method)
+ {
+ ParameterInfo[] parameters = method.GetParameters();
+ IEnumerable[] sources = new IEnumerable[parameters.Length];
+ for (int i = 0; i < parameters.Length; i++)
+ sources[i] = dataPointProvider.GetDataFor(parameters[i]);
+
+ if (method.IsDefined(typeof(NUnit.Framework.SequentialAttribute), false))
+ return new SequentialStrategy(sources);
+
+ if (method.IsDefined(typeof(NUnit.Framework.PairwiseAttribute), false) &&
+ method.GetParameters().Length > 2)
+ return new PairwiseStrategy(sources);
+
+ return new CombinatorialStrategy(sources);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/CombiningStrategy.cs b/external/guiunit/src/framework/Internal/Builders/CombiningStrategy.cs
new file mode 100755
index 0000000..7dcdac0
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/CombiningStrategy.cs
@@ -0,0 +1,91 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// CombiningStrategy is the abstract base for classes that
+ /// know how to combine values provided for individual test
+ /// parameters to create a set of test cases.
+ /// </summary>
+ public abstract class CombiningStrategy
+ {
+ private IEnumerable[] sources;
+ private IEnumerator[] enumerators;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="CombiningStrategy"/>
+ /// class using a set of parameter sources.
+ /// </summary>
+ /// <param name="sources">The sources.</param>
+ public CombiningStrategy(IEnumerable[] sources)
+ {
+ this.sources = sources;
+ }
+
+ /// <summary>
+ /// Gets the sources used by this strategy.
+ /// </summary>
+ /// <value>The sources.</value>
+ public IEnumerable[] Sources
+ {
+ get { return sources; }
+ }
+
+ /// <summary>
+ /// Gets the enumerators for the sources.
+ /// </summary>
+ /// <value>The enumerators.</value>
+ public IEnumerator[] Enumerators
+ {
+ get
+ {
+ if (enumerators == null)
+ {
+ enumerators = new IEnumerator[Sources.Length];
+ for (int i = 0; i < Sources.Length; i++)
+ enumerators[i] = Sources[i].GetEnumerator();
+ }
+
+ return enumerators;
+ }
+ }
+
+ /// <summary>
+ /// Gets the test cases generated by the CombiningStrategy.
+ /// </summary>
+ /// <returns>The test cases.</returns>
+#if CLR_2_0 || CLR_4_0
+ public abstract System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCases();
+#else
+ public abstract System.Collections.IEnumerable GetTestCases();
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/DataAttributeTestCaseProvider.cs b/external/guiunit/src/framework/Internal/Builders/DataAttributeTestCaseProvider.cs
new file mode 100755
index 0000000..3632dd3
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/DataAttributeTestCaseProvider.cs
@@ -0,0 +1,90 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// DataAttributeTestCaseProvider provides data for methods
+ /// annotated with any DataAttribute. For correct operation,
+ /// any new or custom Attributes must implement one of the
+ /// following interfaces:
+ /// ITestCaseData
+ /// ITestCaseSource
+ /// </summary>
+ public class DataAttributeTestCaseProvider : ITestCaseProvider
+ {
+ #region ITestCaseProvider Members
+
+ /// <summary>
+ /// Determine whether any test cases are available for a parameterized method.
+ /// </summary>
+ /// <param name="method">A MethodInfo representing a parameterized test</param>
+ /// <returns>True if any cases are available, otherwise false.</returns>
+ public bool HasTestCasesFor(MethodInfo method)
+ {
+ return method.IsDefined(typeof(DataAttribute), false);
+ }
+
+ /// <summary>
+ /// Return an IEnumerable providing test cases for use in
+ /// running a parameterized test.
+ /// </summary>
+ /// <param name="method"></param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ public IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method)
+ {
+ List<ITestCaseData> testCases = new List<ITestCaseData>();
+#else
+ public IEnumerable GetTestCasesFor(MethodInfo method)
+ {
+ ArrayList testCases = new ArrayList();
+#endif
+
+ foreach (DataAttribute attr in method.GetCustomAttributes(typeof(DataAttribute), false))
+ {
+ ITestCaseSource source = attr as ITestCaseSource;
+ if (source != null)
+ {
+ // TODO: Create a class to handle exceptions for NUnitLite
+ foreach (ITestCaseData testCase in ((ITestCaseSource)attr).GetTestCasesFor(method))
+ testCases.Add(testCase);
+ continue;
+ }
+ }
+
+ return testCases;
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/DatapointProvider.cs b/external/guiunit/src/framework/Internal/Builders/DatapointProvider.cs
new file mode 100755
index 0000000..d471291
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/DatapointProvider.cs
@@ -0,0 +1,186 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using System.Collections;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// Provides data from fields marked with the DatapointAttribute or the
+ /// DatapointsAttribute.
+ /// </summary>
+ public class DatapointProvider : IParameterDataProvider
+ {
+ #region IDataPointProvider Members
+
+ /// <summary>
+ /// Determine whether any data is available for a parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>
+ /// True if any data is available, otherwise false.
+ /// </returns>
+ public bool HasDataFor(System.Reflection.ParameterInfo parameter)
+ {
+ Type parameterType = parameter.ParameterType;
+ MemberInfo method = parameter.Member;
+ Type fixtureType = method.ReflectedType;
+
+ if (!method.IsDefined(typeof(TheoryAttribute), true))
+ return false;
+
+ if (parameterType == typeof(bool) || parameterType.IsEnum)
+ return true;
+
+ foreach (MemberInfo member in fixtureType.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance))
+ {
+ if (member.IsDefined(typeof(DatapointAttribute), true) &&
+ GetTypeFromMemberInfo(member) == parameterType)
+ return true;
+ else if (member.IsDefined(typeof(DatapointSourceAttribute), true) &&
+ GetElementTypeFromMemberInfo(member) == parameterType)
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
+ /// Return an IEnumerable providing data for use with the
+ /// supplied parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>
+ /// An IEnumerable providing the required data
+ /// </returns>
+ public System.Collections.IEnumerable GetDataFor(System.Reflection.ParameterInfo parameter)
+ {
+ ObjectList datapoints = new ObjectList();
+
+ Type parameterType = parameter.ParameterType;
+ Type fixtureType = parameter.Member.ReflectedType;
+
+ foreach (MemberInfo member in fixtureType.GetMembers(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance))
+ {
+ if (member.IsDefined(typeof(DatapointAttribute), true))
+ {
+ if (GetTypeFromMemberInfo(member) == parameterType &&
+ member.MemberType == MemberTypes.Field)
+ {
+ FieldInfo field = member as FieldInfo;
+ if (field.IsStatic)
+ datapoints.Add(field.GetValue(null));
+ else
+ datapoints.Add(field.GetValue(ProviderCache.GetInstanceOf(fixtureType)));
+ }
+ }
+ else if (member.IsDefined(typeof(DatapointSourceAttribute), true))
+ {
+ if (GetElementTypeFromMemberInfo(member) == parameterType)
+ {
+ object instance;
+
+ switch(member.MemberType)
+ {
+ case MemberTypes.Field:
+ FieldInfo field = member as FieldInfo;
+ instance = field.IsStatic ? null : ProviderCache.GetInstanceOf(fixtureType);
+ foreach (object data in (IEnumerable)field.GetValue(instance))
+ datapoints.Add(data);
+ break;
+ case MemberTypes.Property:
+ PropertyInfo property = member as PropertyInfo;
+ MethodInfo getMethod = property.GetGetMethod(true);
+ instance = getMethod.IsStatic ? null : ProviderCache.GetInstanceOf(fixtureType);
+ foreach (object data in (IEnumerable)property.GetValue(instance,null))
+ datapoints.Add(data);
+ break;
+ case MemberTypes.Method:
+ MethodInfo method = member as MethodInfo;
+ instance = method.IsStatic ? null : ProviderCache.GetInstanceOf(fixtureType);
+ foreach (object data in (IEnumerable)method.Invoke(instance, new Type[0]))
+ datapoints.Add(data);
+ break;
+ }
+ }
+ }
+ }
+
+ if (datapoints.Count == 0)
+ {
+ if (parameterType == typeof(bool))
+ {
+ datapoints.Add(true);
+ datapoints.Add(false);
+ }
+ else if (parameterType.IsEnum)
+ {
+ datapoints.AddRange(TypeHelper.GetEnumValues(parameterType));
+ }
+ }
+
+ return datapoints;
+ }
+
+ private Type GetTypeFromMemberInfo(MemberInfo member)
+ {
+ switch (member.MemberType)
+ {
+ case MemberTypes.Field:
+ return ((FieldInfo)member).FieldType;
+ case MemberTypes.Property:
+ return ((PropertyInfo)member).PropertyType;
+ case MemberTypes.Method:
+ return ((MethodInfo)member).ReturnType;
+ default:
+ return null;
+ }
+ }
+
+ private Type GetElementTypeFromMemberInfo(MemberInfo member)
+ {
+ Type type = GetTypeFromMemberInfo(member);
+
+ if (type == null)
+ return null;
+
+ if (type.IsArray)
+ return type.GetElementType();
+
+#if CLR_2_0 || CLR_4_0
+ if (type.IsGenericType && type.Name == "IEnumerable`1")
+ return type.GetGenericArguments()[0];
+#endif
+
+ return null;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/NUnitTestCaseBuilder.cs b/external/guiunit/src/framework/Internal/Builders/NUnitTestCaseBuilder.cs
new file mode 100755
index 0000000..aecfc07
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/NUnitTestCaseBuilder.cs
@@ -0,0 +1,411 @@
+// ***********************************************************************
+// Copyright (c) 2008-2012 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal.Commands;
+
+#if NET_4_5
+using System.Threading.Tasks;
+#endif
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// Class to build ether a parameterized or a normal NUnitTestMethod.
+ /// There are four cases that the builder must deal with:
+ /// 1. The method needs no params and none are provided
+ /// 2. The method needs params and they are provided
+ /// 3. The method needs no params but they are provided in error
+ /// 4. The method needs params but they are not provided
+ /// This could have been done using two different builders, but it
+ /// turned out to be simpler to have just one. The BuildFrom method
+ /// takes a different branch depending on whether any parameters are
+ /// provided, but all four cases are dealt with in lower-level methods
+ /// </summary>
+ public class NUnitTestCaseBuilder : ITestCaseBuilder2
+ {
+ private Randomizer random;
+#if NUNITLITE
+ private ITestCaseProvider testCaseProvider = new TestCaseProviders();
+#else
+ private ITestCaseProvider testCaseProvider = CoreExtensions.Host.TestCaseProviders;
+#endif
+ /// <summary>
+ /// Default no argument constructor for NUnitTestCaseBuilder
+ /// </summary>
+ public NUnitTestCaseBuilder()
+ {
+ //MethodBase.GetCurrentMethod does not compile on NETCF so this method is used instead
+ random = Randomizer.GetRandomizer(typeof(NUnitTestCaseBuilder).GetConstructor(new Type[0]));
+ }
+
+ #region ITestCaseBuilder Methods
+ /// <summary>
+ /// Determines if the method can be used to build an NUnit test
+ /// test method of some kind. The method must normally be marked
+ /// with an identifying attriute for this to be true.
+ ///
+ /// Note that this method does not check that the signature
+ /// of the method for validity. If we did that here, any
+ /// test methods with invalid signatures would be passed
+ /// over in silence in the test run. Since we want such
+ /// methods to be reported, the check for validity is made
+ /// in BuildFrom rather than here.
+ /// </summary>
+ /// <param name="method">A MethodInfo for the method being used as a test method</param>
+ /// <returns>True if the builder can create a test case from this method</returns>
+ public bool CanBuildFrom(MethodInfo method)
+ {
+ return method.IsDefined(typeof(TestAttribute), false)
+ || method.IsDefined(typeof(ITestCaseSource), false)
+ || method.IsDefined(typeof(TheoryAttribute), false);
+ }
+
+ /// <summary>
+ /// Build a Test from the provided MethodInfo. Depending on
+ /// whether the method takes arguments and on the availability
+ /// of test case data, this method may return a single test
+ /// or a group of tests contained in a ParameterizedMethodSuite.
+ /// </summary>
+ /// <param name="method">The MethodInfo for which a test is to be built</param>
+ /// <returns>A Test representing one or more method invocations</returns>
+ public Test BuildFrom(MethodInfo method)
+ {
+ return BuildFrom(method, null);
+ }
+
+ #endregion
+
+ #region ITestCaseBuilder2 Members
+
+ /// <summary>
+ /// Determines if the method can be used to build an NUnit test
+ /// test method of some kind. The method must normally be marked
+ /// with an identifying attriute for this to be true.
+ ///
+ /// Note that this method does not check that the signature
+ /// of the method for validity. If we did that here, any
+ /// test methods with invalid signatures would be passed
+ /// over in silence in the test run. Since we want such
+ /// methods to be reported, the check for validity is made
+ /// in BuildFrom rather than here.
+ /// </summary>
+ /// <param name="method">A MethodInfo for the method being used as a test method</param>
+ /// <param name="parentSuite">The test suite being built, to which the new test would be added</param>
+ /// <returns>True if the builder can create a test case from this method</returns>
+ public bool CanBuildFrom(MethodInfo method, Test parentSuite)
+ {
+ return CanBuildFrom(method);
+ }
+
+ /// <summary>
+ /// Build a Test from the provided MethodInfo. Depending on
+ /// whether the method takes arguments and on the availability
+ /// of test case data, this method may return a single test
+ /// or a group of tests contained in a ParameterizedMethodSuite.
+ /// </summary>
+ /// <param name="method">The MethodInfo for which a test is to be built</param>
+ /// <param name="parentSuite">The test fixture being populated, or null</param>
+ /// <returns>A Test representing one or more method invocations</returns>
+ public Test BuildFrom(MethodInfo method, Test parentSuite)
+ {
+ return testCaseProvider.HasTestCasesFor(method)
+ ? BuildParameterizedMethodSuite(method, parentSuite)
+ : BuildSingleTestMethod(method, parentSuite, null);
+ }
+
+ #endregion
+
+ #region Implementation
+
+ /// <summary>
+ /// Builds a ParameterizedMetodSuite containing individual
+ /// test cases for each set of parameters provided for
+ /// this method.
+ /// </summary>
+ /// <param name="method">The MethodInfo for which a test is to be built</param>
+ /// <param name="parentSuite">The test suite for which the method is being built</param>
+ /// <returns>A ParameterizedMethodSuite populated with test cases</returns>
+ public Test BuildParameterizedMethodSuite(MethodInfo method, Test parentSuite)
+ {
+ ParameterizedMethodSuite methodSuite = new ParameterizedMethodSuite(method);
+ methodSuite.ApplyAttributesToTest(method);
+
+ foreach (ITestCaseData testcase in testCaseProvider.GetTestCasesFor(method))
+ {
+ ParameterSet parms = testcase as ParameterSet;
+ if (parms == null)
+ parms = new ParameterSet(testcase);
+
+ TestMethod test = BuildSingleTestMethod(method, parentSuite, parms);
+
+ methodSuite.Add(test);
+ }
+
+ return methodSuite;
+ }
+
+ /// <summary>
+ /// Builds a single NUnitTestMethod, either as a child of the fixture
+ /// or as one of a set of test cases under a ParameterizedTestMethodSuite.
+ /// </summary>
+ /// <param name="method">The MethodInfo from which to construct the TestMethod</param>
+ /// <param name="parentSuite">The suite or fixture to which the new test will be added</param>
+ /// <param name="parms">The ParameterSet to be used, or null</param>
+ /// <returns></returns>
+ private TestMethod BuildSingleTestMethod(MethodInfo method, Test parentSuite, ParameterSet parms)
+ {
+ TestMethod testMethod = new TestMethod(method, parentSuite);
+
+ testMethod.Seed = random.Next();
+
+ string prefix = method.ReflectedType.FullName;
+
+ // Needed to give proper fullname to test in a parameterized fixture.
+ // Without this, the arguments to the fixture are not included.
+ if (parentSuite != null)
+ {
+ prefix = parentSuite.FullName;
+ //testMethod.FullName = prefix + "." + testMethod.Name;
+ }
+
+ if (CheckTestMethodSignature(testMethod, parms))
+ {
+ if (parms == null)
+ testMethod.ApplyAttributesToTest(method);
+
+ foreach (ICommandDecorator decorator in method.GetCustomAttributes(typeof(ICommandDecorator), true))
+ testMethod.CustomDecorators.Add(decorator);
+
+ ExpectedExceptionAttribute[] attributes =
+ (ExpectedExceptionAttribute[])method.GetCustomAttributes(typeof(ExpectedExceptionAttribute), false);
+
+ if (attributes.Length > 0)
+ {
+ ExpectedExceptionAttribute attr = attributes[0];
+ string handlerName = attr.Handler;
+ if (handlerName != null && GetExceptionHandler(testMethod.FixtureType, handlerName) == null)
+ MarkAsNotRunnable(
+ testMethod,
+ string.Format("The specified exception handler {0} was not found", handlerName));
+
+ testMethod.CustomDecorators.Add(new ExpectedExceptionDecorator(attr.ExceptionData));
+ }
+ }
+
+ if (parms != null)
+ {
+ // NOTE: After the call to CheckTestMethodSignature, the Method
+ // property of testMethod may no longer be the same as the
+ // original MethodInfo, so we reassign it here.
+ method = testMethod.Method;
+
+ if (parms.TestName != null)
+ {
+ testMethod.Name = parms.TestName;
+ testMethod.FullName = prefix + "." + parms.TestName;
+ }
+ else if (parms.OriginalArguments != null)
+ {
+ string name = MethodHelper.GetDisplayName(method, parms.OriginalArguments);
+ testMethod.Name = name;
+ testMethod.FullName = prefix + "." + name;
+ }
+
+ parms.ApplyToTest(testMethod);
+ }
+
+ return testMethod;
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ /// <summary>
+ /// Helper method that checks the signature of a TestMethod and
+ /// any supplied parameters to determine if the test is valid.
+ ///
+ /// Currently, NUnitTestMethods are required to be public,
+ /// non-abstract methods, either static or instance,
+ /// returning void. They may take arguments but the values must
+ /// be provided or the TestMethod is not considered runnable.
+ ///
+ /// Methods not meeting these criteria will be marked as
+ /// non-runnable and the method will return false in that case.
+ /// </summary>
+ /// <param name="testMethod">The TestMethod to be checked. If it
+ /// is found to be non-runnable, it will be modified.</param>
+ /// <param name="parms">Parameters to be used for this test, or null</param>
+ /// <returns>True if the method signature is valid, false if not</returns>
+ private static bool CheckTestMethodSignature(TestMethod testMethod, ParameterSet parms)
+ {
+ if (testMethod.Method.IsAbstract)
+ {
+ return MarkAsNotRunnable(testMethod, "Method is abstract");
+ }
+
+ if (!testMethod.Method.IsPublic)
+ {
+ return MarkAsNotRunnable(testMethod, "Method is not public");
+ }
+
+#if NETCF
+ // TODO: Get this to work
+ if (testMethod.Method.IsGenericMethodDefinition)
+ {
+ return MarkAsNotRunnable(testMethod, "Generic test methods are not yet supported under .NET CF");
+ }
+#endif
+
+ ParameterInfo[] parameters = testMethod.Method.GetParameters();
+ int argsNeeded = parameters.Length;
+
+ object[] arglist = null;
+ int argsProvided = 0;
+
+ if (parms != null)
+ {
+ testMethod.parms = parms;
+ testMethod.RunState = parms.RunState;
+
+ arglist = parms.Arguments;
+
+ if (arglist != null)
+ argsProvided = arglist.Length;
+
+ if (testMethod.RunState != RunState.Runnable)
+ return false;
+ }
+
+ Type returnType = testMethod.Method.ReturnType;
+ if (returnType.Equals(typeof(void)))
+ {
+ if (parms != null && parms.HasExpectedResult)
+ return MarkAsNotRunnable(testMethod, "Method returning void cannot have an expected result");
+ }
+ else
+ {
+#if NET_4_5
+ if (MethodHelper.IsAsyncMethod(testMethod.Method))
+ {
+ bool returnsGenericTask = returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Task<>);
+ if (returnsGenericTask && (parms == null|| !parms.HasExpectedResult && !parms.ExceptionExpected))
+ return MarkAsNotRunnable(testMethod, "Async test method must have Task or void return type when no result is expected");
+ else if (!returnsGenericTask && parms != null && parms.HasExpectedResult)
+ return MarkAsNotRunnable(testMethod, "Async test method must have Task<T> return type when a result is expected");
+ }
+ else
+#endif
+ if (parms == null || !parms.HasExpectedResult && !parms.ExceptionExpected)
+ return MarkAsNotRunnable(testMethod, "Method has non-void return value, but no result is expected");
+ }
+
+ if (argsProvided > 0 && argsNeeded == 0)
+ {
+ return MarkAsNotRunnable(testMethod, "Arguments provided for method not taking any");
+ }
+
+ if (argsProvided == 0 && argsNeeded > 0)
+ {
+ return MarkAsNotRunnable(testMethod, "No arguments were provided");
+ }
+
+ if (argsProvided != argsNeeded)
+ {
+ return MarkAsNotRunnable(testMethod, "Wrong number of arguments provided");
+ }
+
+#if CLR_2_0 || CLR_4_0
+#if !NETCF
+ if (testMethod.Method.IsGenericMethodDefinition)
+ {
+ Type[] typeArguments = GetTypeArgumentsForMethod(testMethod.Method, arglist);
+ foreach (object o in typeArguments)
+ if (o == null)
+ {
+ return MarkAsNotRunnable(testMethod, "Unable to determine type arguments for method");
+ }
+
+ testMethod.method = testMethod.Method.MakeGenericMethod(typeArguments);
+ parameters = testMethod.Method.GetParameters();
+ }
+#endif
+#endif
+
+ if (arglist != null && parameters != null)
+ TypeHelper.ConvertArgumentList(arglist, parameters);
+
+ return true;
+ }
+
+#if CLR_2_0 || CLR_4_0
+#if !NETCF
+ private static Type[] GetTypeArgumentsForMethod(MethodInfo method, object[] arglist)
+ {
+ Type[] typeParameters = method.GetGenericArguments();
+ Type[] typeArguments = new Type[typeParameters.Length];
+ ParameterInfo[] parameters = method.GetParameters();
+
+ for (int typeIndex = 0; typeIndex < typeArguments.Length; typeIndex++)
+ {
+ Type typeParameter = typeParameters[typeIndex];
+
+ for (int argIndex = 0; argIndex < parameters.Length; argIndex++)
+ {
+ if (parameters[argIndex].ParameterType.Equals(typeParameter))
+ typeArguments[typeIndex] = TypeHelper.BestCommonType(
+ typeArguments[typeIndex],
+ arglist[argIndex].GetType());
+ }
+ }
+
+ return typeArguments;
+ }
+#endif
+#endif
+
+ private static MethodInfo GetExceptionHandler(Type fixtureType, string name)
+ {
+ return fixtureType.GetMethod(
+ name,
+ BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
+ null,
+ new Type[] { typeof(System.Exception) },
+ null);
+ }
+
+ private static bool MarkAsNotRunnable(TestMethod testMethod, string reason)
+ {
+ testMethod.RunState = RunState.NotRunnable;
+ testMethod.Properties.Set(PropertyNames.SkipReason, reason);
+ return false;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/NUnitTestFixtureBuilder.cs b/external/guiunit/src/framework/Internal/Builders/NUnitTestFixtureBuilder.cs
new file mode 100755
index 0000000..e79d2c7
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/NUnitTestFixtureBuilder.cs
@@ -0,0 +1,358 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using System.Text;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Extensibility;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// Built-in SuiteBuilder for NUnit TestFixture
+ /// </summary>
+ public class NUnitTestFixtureBuilder : ISuiteBuilder
+ {
+ #region Static Fields
+
+ static readonly string NO_TYPE_ARGS_MSG =
+ "Fixture type contains generic parameters. You must either provide " +
+ "Type arguments or specify constructor arguments that allow NUnit " +
+ "to deduce the Type arguments.";
+
+ #endregion
+
+ #region Instance Fields
+ /// <summary>
+ /// The NUnitTestFixture being constructed;
+ /// </summary>
+ private TestFixture fixture;
+
+#if NUNITLITE
+ private Extensibility.ITestCaseBuilder2 testBuilder = new NUnitTestCaseBuilder();
+#else
+ private Extensibility.ITestCaseBuilder2 testBuilder = CoreExtensions.Host.TestBuilders;
+ private Extensibility.ITestDecorator testDecorators = CoreExtensions.Host.TestDecorators;
+#endif
+
+ #endregion
+
+ #region ISuiteBuilder Methods
+ /// <summary>
+ /// Checks to see if the fixture type has the TestFixtureAttribute
+ /// </summary>
+ /// <param name="type">The fixture type to check</param>
+ /// <returns>True if the fixture can be built, false if not</returns>
+ public bool CanBuildFrom(Type type)
+ {
+ if ( type.IsAbstract && !type.IsSealed )
+ return false;
+
+ if (type.IsDefined(typeof(TestFixtureAttribute), true))
+ return true;
+
+#if CLR_2_0 || CLR_4_0
+ // Generics must have a TestFixtureAttribute
+ if (type.IsGenericTypeDefinition)
+ return false;
+#endif
+
+ return Reflect.HasMethodWithAttribute(type, typeof(NUnit.Framework.TestAttribute), true) ||
+ Reflect.HasMethodWithAttribute(type, typeof(NUnit.Framework.TestCaseAttribute), true) ||
+ Reflect.HasMethodWithAttribute(type, typeof(NUnit.Framework.TestCaseSourceAttribute), true) ||
+ Reflect.HasMethodWithAttribute(type, typeof(NUnit.Framework.TheoryAttribute), true);
+ }
+
+ /// <summary>
+ /// Build a TestSuite from type provided.
+ /// </summary>
+ /// <param name="type"></param>
+ /// <returns></returns>
+ public Test BuildFrom(Type type)
+ {
+ TestFixtureAttribute[] attrs = GetTestFixtureAttributes(type);
+
+#if CLR_2_0 || CLR_4_0
+ if (type.IsGenericType)
+ return BuildMultipleFixtures(type, attrs);
+#endif
+
+ switch (attrs.Length)
+ {
+ case 0:
+ return BuildSingleFixture(type, null);
+ case 1:
+ object[] args = (object[])attrs[0].Arguments;
+ return args == null || args.Length == 0
+ ? BuildSingleFixture(type, attrs[0])
+ : BuildMultipleFixtures(type, attrs);
+ default:
+ return BuildMultipleFixtures(type, attrs);
+ }
+ }
+ #endregion
+
+ #region Helper Methods
+
+ private Test BuildMultipleFixtures(Type type, TestFixtureAttribute[] attrs)
+ {
+ TestSuite suite = new ParameterizedFixtureSuite(type);
+
+ if (attrs.Length > 0)
+ {
+ foreach (TestFixtureAttribute attr in attrs)
+ suite.Add(BuildSingleFixture(type, attr));
+ }
+ else
+ {
+ suite.RunState = RunState.NotRunnable;
+ suite.Properties.Set(PropertyNames.SkipReason, NO_TYPE_ARGS_MSG);
+ }
+
+ return suite;
+ }
+
+ private Test BuildSingleFixture(Type type, TestFixtureAttribute attr)
+ {
+ object[] arguments = null;
+
+ if (attr != null)
+ {
+ arguments = (object[])attr.Arguments;
+
+#if CLR_2_0 || CLR_4_0
+ if (type.ContainsGenericParameters)
+ {
+ Type[] typeArgs = (Type[])attr.TypeArgs;
+ if( typeArgs.Length > 0 ||
+ TypeHelper.CanDeduceTypeArgsFromArgs(type, arguments, ref typeArgs))
+ {
+ type = TypeHelper.MakeGenericType(type, typeArgs);
+ }
+ }
+#endif
+ }
+
+ this.fixture = new TestFixture(type, arguments);
+ CheckTestFixtureIsValid(fixture);
+
+ fixture.ApplyAttributesToTest(type);
+
+ if (fixture.RunState == RunState.Runnable && attr != null)
+ {
+ if (attr.Ignore)
+ {
+ fixture.RunState = RunState.Ignored;
+ fixture.Properties.Set(PropertyNames.SkipReason, attr.IgnoreReason);
+ }
+ }
+
+ AddTestCases(type);
+
+ return this.fixture;
+ }
+
+ /// <summary>
+ /// Method to add test cases to the newly constructed fixture.
+ /// </summary>
+ /// <param name="fixtureType"></param>
+ private void AddTestCases( Type fixtureType )
+ {
+ IList methods = fixtureType.GetMethods(
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static );
+
+ foreach(MethodInfo method in methods)
+ {
+ Test test = BuildTestCase(method, this.fixture);
+
+ if(test != null)
+ {
+ this.fixture.Add( test );
+ }
+ }
+ }
+
+ /// <summary>
+ /// Method to create a test case from a MethodInfo and add
+ /// it to the fixture being built. It first checks to see if
+ /// any global TestCaseBuilder addin wants to build the
+ /// test case. If not, it uses the internal builder
+ /// collection maintained by this fixture builder. After
+ /// building the test case, it applies any decorators
+ /// that have been installed.
+ ///
+ /// The default implementation has no test case builders.
+ /// Derived classes should add builders to the collection
+ /// in their constructor.
+ /// </summary>
+ /// <param name="method">The MethodInfo for which a test is to be created</param>
+ /// <param name="suite">The test suite being built.</param>
+ /// <returns>A newly constructed Test</returns>
+ private Test BuildTestCase( MethodInfo method, TestSuite suite )
+ {
+#if NUNITLITE
+ return testBuilder.CanBuildFrom(method, suite)
+ ? testBuilder.BuildFrom(method, suite)
+ : null;
+#else
+ Test test = testBuilder.BuildFrom( method, suite );
+
+ if ( test != null )
+ test = testDecorators.Decorate( test, method );
+
+ return test;
+#endif
+ }
+
+ private void CheckTestFixtureIsValid(TestFixture fixture)
+ {
+ Type fixtureType = fixture.FixtureType;
+
+#if CLR_2_0 || CLR_4_0
+ if (fixtureType.ContainsGenericParameters)
+ {
+ SetNotRunnable(fixture, NO_TYPE_ARGS_MSG);
+ return;
+ }
+#endif
+ if( !IsStaticClass(fixtureType) && !HasValidConstructor(fixtureType, fixture.arguments) )
+ {
+ SetNotRunnable(fixture, "No suitable constructor was found");
+ return;
+ }
+
+ if (!CheckSetUpTearDownMethods(fixture, fixture.SetUpMethods))
+ return;
+ if (!CheckSetUpTearDownMethods(fixture, fixture.TearDownMethods))
+ return;
+ if (!CheckSetUpTearDownMethods(fixture, Reflect.GetMethodsWithAttribute(fixture.FixtureType, typeof(TestFixtureSetUpAttribute), true)))
+ return;
+ CheckSetUpTearDownMethods(fixture, Reflect.GetMethodsWithAttribute(fixture.FixtureType, typeof(TestFixtureTearDownAttribute), true));
+ }
+
+ private static bool HasValidConstructor(Type fixtureType, object[] args)
+ {
+ Type[] argTypes;
+
+ // Note: This could be done more simply using
+ // Type.EmptyTypes and Type.GetTypeArray() but
+ // they don't exist in all runtimes we support.
+ if (args == null)
+ argTypes = new Type[0];
+ else
+ {
+ argTypes = new Type[args.Length];
+
+ int index = 0;
+ foreach (object arg in args)
+ argTypes[index++] = arg.GetType();
+ }
+
+ return fixtureType.GetConstructor(argTypes) != null;
+ }
+
+ private void SetNotRunnable(TestFixture fixture, string reason)
+ {
+ fixture.RunState = RunState.NotRunnable;
+ fixture.Properties.Set(PropertyNames.SkipReason, reason);
+ }
+
+ private static bool IsStaticClass(Type type)
+ {
+ return type.IsAbstract && type.IsSealed;
+ }
+
+ private bool CheckSetUpTearDownMethods(TestFixture fixture, MethodInfo[] methods)
+ {
+ foreach (MethodInfo method in methods) {
+ if (method.IsAbstract ||
+ !method.IsPublic && !method.IsFamily ||
+ method.GetParameters().Length > 0 ||
+ !method.ReturnType.Equals(typeof(void)))
+ {
+#if NET_4_5
+ if (MethodHelper.IsAsyncMethod (method))
+ return true;
+#endif
+ SetNotRunnable(fixture, string.Format("Invalid signature for Setup or TearDown method: {0}", method.Name));
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /// <summary>
+ /// Get TestFixtureAttributes following a somewhat obscure
+ /// set of rules to eliminate spurious duplication of fixtures.
+ /// 1. If there are any attributes with args, they are the only
+ /// ones returned and those without args are ignored.
+ /// 2. No more than one attribute without args is ever returned.
+ /// </summary>
+ private TestFixtureAttribute[] GetTestFixtureAttributes(Type type)
+ {
+ TestFixtureAttribute[] attrs =
+ (TestFixtureAttribute[])type.GetCustomAttributes(typeof(TestFixtureAttribute), true);
+
+ // Just return - no possibility of duplication
+ if (attrs.Length <= 1)
+ return attrs;
+
+ int withArgs = 0;
+ bool[] hasArgs = new bool[attrs.Length];
+
+ // Count and record those attrs with arguments
+ for (int i = 0; i < attrs.Length; i++)
+ {
+ TestFixtureAttribute attr = attrs[i];
+
+ if (attr.Arguments.Length > 0 || attr.TypeArgs.Length > 0)
+ {
+ withArgs++;
+ hasArgs[i] = true;
+ }
+ }
+
+ // If all attributes have args, just return them
+ if (withArgs == attrs.Length)
+ return attrs;
+
+ // If all attributes are without args, just return the first found
+ if (withArgs == 0)
+ return new TestFixtureAttribute[] { attrs[0] };
+
+ // Some of each type, so extract those with args
+ int count = 0;
+ TestFixtureAttribute[] result = new TestFixtureAttribute[withArgs];
+ for (int i = 0; i < attrs.Length; i++)
+ if (hasArgs[i])
+ result[count++] = attrs[i];
+
+ return result;
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Builders/PairwiseStrategy.cs b/external/guiunit/src/framework/Internal/Builders/PairwiseStrategy.cs
new file mode 100755
index 0000000..19f79a7
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/PairwiseStrategy.cs
@@ -0,0 +1,754 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using System.Text;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// PairwiseStrategy creates test cases by combining the parameter
+ /// data so that all possible pairs of data items are used.
+ /// </summary>
+ public class PairwiseStrategy : CombiningStrategy
+ {
+ internal class FleaRand
+ {
+ private const int FleaRandSize = 256;
+
+ private uint b;
+ private uint c;
+ private uint d;
+ private uint z;
+
+ private uint[] m = new uint[FleaRandSize];
+ private uint[] r = new uint[FleaRandSize];
+
+ private uint q;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="FleaRand"/> class.
+ /// </summary>
+ /// <param name="seed">The seed.</param>
+ public FleaRand(uint seed)
+ {
+ this.b = seed;
+ this.c = seed;
+ this.d = seed;
+ this.z = seed;
+
+ for (int i = 0; i < this.m.Length; i++)
+ {
+ this.m[i] = seed;
+ }
+
+ for (int i = 0; i < 10; i++)
+ {
+ this.Batch();
+ }
+
+ this.q = 0;
+ }
+
+ public uint Next()
+ {
+ if (this.q == 0)
+ {
+ this.Batch();
+ this.q = (uint)this.r.Length - 1;
+ }
+ else
+ {
+ this.q--;
+ }
+
+ return this.r[this.q];
+ }
+
+ private void Batch()
+ {
+ uint a;
+ uint b = this.b;
+ uint c = this.c + (++this.z);
+ uint d = this.d;
+
+ for (int i = 0; i < this.r.Length; i++)
+ {
+ a = this.m[b % this.m.Length];
+ this.m[b % this.m.Length] = d;
+ d = (c << 19) + (c >> 13) + b;
+ c = b ^ this.m[i];
+ b = a + d;
+ this.r[i] = c;
+ }
+
+ this.b = b;
+ this.c = c;
+ this.d = d;
+ }
+ }
+
+ internal class FeatureInfo
+ {
+ public const string Names = "abcdefghijklmnopqrstuvwxyz";
+
+ public readonly int Dimension;
+ public readonly int Feature;
+
+ public FeatureInfo(int dimension, int feature)
+ {
+ this.Dimension = dimension;
+ this.Feature = feature;
+ }
+
+#if DEBUG
+ public override string ToString()
+ {
+ return (this.Dimension + 1).ToString() + FeatureInfo.Names[this.Feature];
+ }
+#endif
+ }
+
+ internal class Tuple
+ {
+#if CLR_2_0 || CLR_4_0
+ private readonly List<FeatureInfo> features = new List<FeatureInfo>();
+#else
+ private readonly ArrayList features = new ArrayList();
+#endif
+
+ public int Count
+ {
+ get
+ {
+ return this.features.Count;
+ }
+ }
+
+ public FeatureInfo this[int index]
+ {
+ get
+ {
+ return (FeatureInfo)this.features[index];
+ }
+ }
+
+ public void Add(FeatureInfo feature)
+ {
+ this.features.Add(feature);
+ }
+
+#if DEBUG
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+
+ sb.Append('(');
+
+ for (int i = 0; i < this.features.Count; i++)
+ {
+ if (i > 0)
+ {
+ sb.Append(' ');
+ }
+
+ sb.Append(this.features[i].ToString());
+ }
+
+ sb.Append(')');
+
+ return sb.ToString();
+ }
+#endif
+ }
+
+ internal class TupleCollection
+ {
+#if CLR_2_0 || CLR_4_0
+ private readonly List<Tuple> tuples = new List<Tuple>();
+#else
+ private readonly ArrayList tuples = new ArrayList();
+#endif
+
+ public int Count
+ {
+ get
+ {
+ return this.tuples.Count;
+ }
+ }
+
+ public Tuple this[int index]
+ {
+ get
+ {
+ return (Tuple)this.tuples[index];
+ }
+ }
+
+ public void Add(Tuple tuple)
+ {
+ this.tuples.Add(tuple);
+ }
+
+ public void RemoveAt(int index)
+ {
+ this.tuples.RemoveAt(index);
+ }
+ }
+
+ internal class TestCase
+ {
+ public readonly int[] Features;
+
+ public TestCase(int numberOfDimensions)
+ {
+ this.Features = new int[numberOfDimensions];
+ }
+
+ public bool IsTupleCovered(Tuple tuple)
+ {
+ for (int i = 0; i < tuple.Count; i++)
+ {
+ if (this.Features[tuple[i].Dimension] != tuple[i].Feature)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+#if DEBUG
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+
+ for (int i = 0; i < this.Features.Length; i++)
+ {
+ if (i > 0)
+ {
+ sb.Append(' ');
+ }
+
+ sb.Append(i + 1);
+ sb.Append(FeatureInfo.Names[this.Features[i]]);
+ }
+
+ return sb.ToString();
+ }
+#endif
+ }
+
+ internal class TestCaseCollection : IEnumerable
+ {
+#if CLR_2_0 || CLR_4_0
+ private readonly List<TestCase> testCases = new List<TestCase>();
+#else
+ private readonly ArrayList testCases = new ArrayList();
+#endif
+
+ public void Add(TestCase testCase)
+ {
+ this.testCases.Add(testCase);
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ return this.testCases.GetEnumerator();
+ }
+
+ public bool IsTupleCovered(Tuple tuple)
+ {
+ foreach (TestCase testCase in this.testCases)
+ {
+ if (testCase.IsTupleCovered(tuple))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+
+ internal class PairwiseTestCaseGenerator
+ {
+ private const int MaxTupleLength = 2;
+
+ private readonly FleaRand random = new FleaRand(0);
+
+ private readonly int[] dimensions;
+
+ private readonly TupleCollection[][] uncoveredTuples;
+
+ private readonly int[][] currentTupleLength;
+
+ private readonly TestCaseCollection testCases = new TestCaseCollection();
+
+ public PairwiseTestCaseGenerator(int[] dimensions)
+ {
+ this.dimensions = dimensions;
+
+ this.uncoveredTuples = new TupleCollection[this.dimensions.Length][];
+
+ for (int d = 0; d < this.uncoveredTuples.Length; d++)
+ {
+ this.uncoveredTuples[d] = new TupleCollection[this.dimensions[d]];
+
+ for (int f = 0; f < this.dimensions[d]; f++)
+ {
+ this.uncoveredTuples[d][f] = new TupleCollection();
+ }
+ }
+
+ this.currentTupleLength = new int[this.dimensions.Length][];
+
+ for (int d = 0; d < this.dimensions.Length; d++)
+ {
+ this.currentTupleLength[d] = new int[this.dimensions[d]];
+ }
+ }
+
+ public IEnumerable GetTestCases()
+ {
+ this.CreateTestCases();
+
+ this.SelfTest();
+
+ return this.testCases;
+ }
+
+ private void CreateTestCases()
+ {
+ while (true)
+ {
+ this.ExtendTupleSet();
+
+ Tuple tuple = this.FindTupleToCover();
+
+ if (tuple == null)
+ {
+ return;
+ }
+
+ TestCase testCase = this.FindGoodTestCase(tuple);
+
+ this.RemoveTuplesCoveredBy(testCase);
+
+ this.testCases.Add(testCase);
+ }
+ }
+
+ private void ExtendTupleSet()
+ {
+ for (int d = 0; d < this.dimensions.Length; d++)
+ {
+ for (int f = 0; f < this.dimensions[d]; f++)
+ {
+ this.ExtendTupleSet(d, f);
+ }
+ }
+ }
+
+ private void ExtendTupleSet(int dimension, int feature)
+ {
+ // If tuples for [dimension][feature] already exists, it's no needs to add more tuples.
+ if (this.uncoveredTuples[dimension][feature].Count > 0)
+ {
+ return;
+ }
+
+ // If maximum tuple length for [dimension][feature] is reached, it's no needs to add more tuples.
+ if (this.currentTupleLength[dimension][feature] == MaxTupleLength)
+ {
+ return;
+ }
+
+ this.currentTupleLength[dimension][feature]++;
+
+ int tupleLength = this.currentTupleLength[dimension][feature];
+
+ if (tupleLength == 1)
+ {
+ Tuple tuple = new Tuple();
+
+ tuple.Add(new FeatureInfo(dimension, feature));
+
+ if (this.testCases.IsTupleCovered(tuple))
+ {
+ return;
+ }
+
+ this.uncoveredTuples[dimension][feature].Add(tuple);
+ }
+ else
+ {
+ for (int d = 0; d < this.dimensions.Length; d++)
+ {
+ for (int f = 0; f < this.dimensions[d]; f++)
+ {
+ Tuple tuple = new Tuple();
+ tuple.Add(new FeatureInfo(d, f));
+
+ if (tuple[0].Dimension == dimension)
+ {
+ continue;
+ }
+
+ tuple.Add(new FeatureInfo(dimension, feature));
+
+ if (this.testCases.IsTupleCovered(tuple))
+ {
+ continue;
+ }
+
+ this.uncoveredTuples[dimension][feature].Add(tuple);
+ }
+ }
+ }
+ }
+
+ private Tuple FindTupleToCover()
+ {
+ int tupleLength = MaxTupleLength;
+ int tupleCount = 0;
+ Tuple tuple = null;
+
+ for (int d = 0; d < this.dimensions.Length; d++)
+ {
+ for (int f = 0; f < this.dimensions[d]; f++)
+ {
+ if (this.currentTupleLength[d][f] < tupleLength)
+ {
+ tupleLength = this.currentTupleLength[d][f];
+ tupleCount = this.uncoveredTuples[d][f].Count;
+ tuple = this.uncoveredTuples[d][f][0];
+ }
+ else
+ {
+ if (this.currentTupleLength[d][f] == tupleLength && this.uncoveredTuples[d][f].Count > tupleCount)
+ {
+ tupleCount = this.uncoveredTuples[d][f].Count;
+ tuple = this.uncoveredTuples[d][f][0];
+ }
+ }
+ }
+ }
+
+ return tuple;
+ }
+
+ private TestCase FindGoodTestCase(Tuple tuple)
+ {
+ TestCase bestTest = null;
+ int bestCoverage = -1;
+
+ for (int i = 0; i < 5; i++)
+ {
+ TestCase test = new TestCase(this.dimensions.Length);
+
+ int coverage = this.CreateTestCase(tuple, test);
+
+ if (coverage > bestCoverage)
+ {
+ bestTest = test;
+ bestCoverage = coverage;
+ }
+ }
+
+ return bestTest;
+ }
+
+ private int CreateTestCase(Tuple tuple, TestCase test)
+ {
+ // Create a random test case...
+ for (int i = 0; i < test.Features.Length; i++)
+ {
+ test.Features[i] = (int)(this.random.Next() % this.dimensions[i]);
+ }
+
+ // ...and inject the tuple into it!
+ for (int i = 0; i < tuple.Count; i++)
+ {
+ test.Features[tuple[i].Dimension] = tuple[i].Feature;
+ }
+
+ return this.MaximizeCoverage(test, tuple);
+ }
+
+ private int MaximizeCoverage(TestCase test, Tuple tuple)
+ {
+ int[] dimensionOrder = this.GetMutableDimensions(tuple);
+
+ while (true)
+ {
+ bool progress = false;
+ int totalCoverage = 1;
+
+ // Scramble dimensions.
+ for (int i = dimensionOrder.Length; i > 1; i--)
+ {
+ int j = (int)(this.random.Next() % i);
+ int t = dimensionOrder[i - 1];
+ dimensionOrder[i - 1] = dimensionOrder[j];
+ dimensionOrder[j] = t;
+ }
+
+ // For each dimension that can be modified...
+ for (int i = 0; i < dimensionOrder.Length; i++)
+ {
+ int d = dimensionOrder[i];
+
+#if CLR_2_0 || CLR_4_0
+ List<int> bestFeatures = new List<int>();
+#else
+ ArrayList bestFeatures = new ArrayList();
+#endif
+
+ int bestCoverage = this.CountTuplesCovered(test, d, test.Features[d]);
+
+ int bestTupleLength = this.currentTupleLength[d][test.Features[d]];
+
+ // For each feature that can be modified, check if it can extend coverage.
+ for (int f = 0; f < this.dimensions[d]; f++)
+ {
+ test.Features[d] = f;
+
+ int coverage = this.CountTuplesCovered(test, d, f);
+
+ if (this.currentTupleLength[d][f] < bestTupleLength)
+ {
+ progress = true;
+ bestTupleLength = this.currentTupleLength[d][f];
+ bestCoverage = coverage;
+ bestFeatures.Clear();
+ bestFeatures.Add(f);
+ }
+ else
+ {
+ if (this.currentTupleLength[d][f] == bestTupleLength && coverage >= bestCoverage)
+ {
+ if (coverage > bestCoverage)
+ {
+ progress = true;
+ bestCoverage = coverage;
+ bestFeatures.Clear();
+ }
+
+ bestFeatures.Add(f);
+ }
+ }
+ }
+
+ if (bestFeatures.Count == 1)
+ {
+ test.Features[d] = (int)bestFeatures[0];
+ }
+ else
+ {
+ test.Features[d] = (int)bestFeatures[(int)(this.random.Next() % bestFeatures.Count)];
+ }
+
+ totalCoverage += bestCoverage;
+ }
+
+ if (!progress)
+ {
+ return totalCoverage;
+ }
+ }
+ }
+
+ private int[] GetMutableDimensions(Tuple tuple)
+ {
+ bool[] immutableDimensions = new bool[this.dimensions.Length];
+
+ for (int i = 0; i < tuple.Count; i++)
+ {
+ immutableDimensions[tuple[i].Dimension] = true;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ List<int> mutableDimensions = new List<int>();
+#else
+ ArrayList mutableDimensions = new ArrayList();
+#endif
+
+ for (int i = 0; i < this.dimensions.Length; i++)
+ {
+ if (!immutableDimensions[i])
+ {
+ mutableDimensions.Add(i);
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ return mutableDimensions.ToArray();
+#else
+ return (int[])mutableDimensions.ToArray(typeof(int));
+#endif
+ }
+
+ private int CountTuplesCovered(TestCase test, int dimension, int feature)
+ {
+ int tuplesCovered = 0;
+
+ TupleCollection tuples = this.uncoveredTuples[dimension][feature];
+
+ for (int i = 0; i < tuples.Count; i++)
+ {
+ if (test.IsTupleCovered(tuples[i]))
+ {
+ tuplesCovered++;
+ }
+ }
+
+ return tuplesCovered;
+ }
+
+ private void RemoveTuplesCoveredBy(TestCase testCase)
+ {
+ for (int d = 0; d < this.uncoveredTuples.Length; d++)
+ {
+ for (int f = 0; f < this.uncoveredTuples[d].Length; f++)
+ {
+ TupleCollection tuples = this.uncoveredTuples[d][f];
+
+ for (int i = tuples.Count - 1; i >= 0; i--)
+ {
+ if (testCase.IsTupleCovered(tuples[i]))
+ {
+ tuples.RemoveAt(i);
+ }
+ }
+ }
+ }
+ }
+
+ private void SelfTest()
+ {
+ for (int d1 = 0; d1 < this.dimensions.Length - 1; d1++)
+ {
+ for (int d2 = d1 + 1; d2 < this.dimensions.Length; d2++)
+ {
+ for (int f1 = 0; f1 < this.dimensions[d1]; f1++)
+ {
+ for (int f2 = 0; f2 < this.dimensions[d2]; f2++)
+ {
+ Tuple tuple = new Tuple();
+ tuple.Add(new FeatureInfo(d1, f1));
+ tuple.Add(new FeatureInfo(d2, f2));
+
+ if (!this.testCases.IsTupleCovered(tuple))
+ {
+ throw new Exception("PairwiseStrategy self-test failed : Not all pairs are covered!");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PairwiseStrategy"/> class.
+ /// </summary>
+ /// <param name="sources">The sources.</param>
+ public PairwiseStrategy(IEnumerable[] sources) : base(sources) { }
+
+ /// <summary>
+ /// Gets the test cases generated by this strategy instance.
+ /// </summary>
+ /// <returns>The test cases.</returns>
+#if CLR_2_0 || CLR_4_0
+ public override IEnumerable<ITestCaseData> GetTestCases()
+ {
+ List<ITestCaseData> testCases = new List<ITestCaseData>();
+#else
+ public override IEnumerable GetTestCases()
+ {
+ ArrayList testCases = new ArrayList();
+#endif
+ ObjectList[] valueSet = CreateValueSet();
+ int[] dimensions = CreateDimensions(valueSet);
+
+ IEnumerable pairwiseTestCases = new PairwiseTestCaseGenerator(dimensions).GetTestCases();
+
+ foreach (TestCase pairwiseTestCase in pairwiseTestCases)
+ {
+ object[] testData = new object[pairwiseTestCase.Features.Length];
+
+ for (int i = 0; i < pairwiseTestCase.Features.Length; i++)
+ {
+ testData[i] = valueSet[i][pairwiseTestCase.Features[i]];
+ }
+
+ ParameterSet parms = new ParameterSet();
+ parms.Arguments = testData;
+ testCases.Add(parms);
+ }
+
+ return testCases;
+ }
+
+ private ObjectList[] CreateValueSet()
+ {
+ ObjectList[] valueSet = new ObjectList[Sources.Length];
+
+ for (int i = 0; i < valueSet.Length; i++)
+ {
+ ObjectList values = new ObjectList();
+
+ foreach (object value in Sources[i])
+ {
+ values.Add(value);
+ }
+
+ valueSet[i] = values;
+ }
+
+ return valueSet;
+ }
+
+ private int[] CreateDimensions(ObjectList[] valueSet)
+ {
+ int[] dimensions = new int[valueSet.Length];
+
+ for (int i = 0; i < valueSet.Length; i++)
+ {
+ dimensions[i] = valueSet[i].Count;
+ }
+
+ return dimensions;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/ParameterDataProvider.cs b/external/guiunit/src/framework/Internal/Builders/ParameterDataProvider.cs
new file mode 100755
index 0000000..54d02f4
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/ParameterDataProvider.cs
@@ -0,0 +1,79 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using System.Collections;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// ParameterDataProvider supplies individual argument values for
+ /// single parameters using attributes derived from DataAttribute.
+ /// </summary>
+ public class ParameterDataProvider : IParameterDataProvider
+ {
+ #region IDataPointProvider Members
+
+ /// <summary>
+ /// Determine whether any data is available for a parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>
+ /// True if any data is available, otherwise false.
+ /// </returns>
+ public bool HasDataFor(ParameterInfo parameter)
+ {
+ return parameter.IsDefined(typeof(DataAttribute), false);
+ }
+
+ /// <summary>
+ /// Return an IEnumerable providing data for use with the
+ /// supplied parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>
+ /// An IEnumerable providing the required data
+ /// </returns>
+ public IEnumerable GetDataFor(ParameterInfo parameter)
+ {
+ ObjectList data = new ObjectList();
+
+ foreach (Attribute attr in parameter.GetCustomAttributes(typeof(DataAttribute), false))
+ {
+ IParameterDataSource source = attr as IParameterDataSource;
+ if (source != null)
+ foreach (object item in source.GetData(parameter))
+ data.Add(item);
+ }
+
+ return data;
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/ProviderCache.cs b/external/guiunit/src/framework/Internal/Builders/ProviderCache.cs
new file mode 100755
index 0000000..316bb86
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/ProviderCache.cs
@@ -0,0 +1,102 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Text;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ class ProviderCache
+ {
+#if CLR_2_0 || CLR_4_0
+ private static Dictionary<CacheEntry, object> instances = new Dictionary<CacheEntry, object>();
+#else
+ private static IDictionary instances = new Hashtable();
+#endif
+
+ public static object GetInstanceOf(Type providerType)
+ {
+ return GetInstanceOf(providerType, null);
+ }
+
+ public static object GetInstanceOf(Type providerType, object[] providerArgs)
+ {
+ CacheEntry entry = new CacheEntry(providerType, providerArgs);
+
+#if CLR_2_0 || CLR_4_0
+ object instance = instances.ContainsKey(entry)
+#else
+ object instance = instances.Contains(entry)
+#endif
+ ?instances[entry]
+ : null;
+
+ if (instance == null)
+ instances[entry] = instance = Reflect.Construct(providerType, providerArgs);
+
+ return instance;
+ }
+
+ public static void Clear()
+ {
+ foreach (CacheEntry key in instances.Keys)
+ {
+ IDisposable provider = instances[key] as IDisposable;
+ if (provider != null)
+ provider.Dispose();
+ }
+
+ instances.Clear();
+ }
+
+ class CacheEntry
+ {
+ private Type providerType;
+ private object[] providerArgs;
+
+ public CacheEntry(Type providerType, object[] providerArgs)
+ {
+ this.providerType = providerType;
+ this.providerArgs = providerArgs;
+ }
+
+ public override bool Equals(object obj)
+ {
+ CacheEntry other = obj as CacheEntry;
+ if (other == null) return false;
+
+ return this.providerType == other.providerType;
+ }
+
+ public override int GetHashCode()
+ {
+ return providerType.GetHashCode();
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Builders/SequentialStrategy.cs b/external/guiunit/src/framework/Internal/Builders/SequentialStrategy.cs
new file mode 100755
index 0000000..10db34b
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Builders/SequentialStrategy.cs
@@ -0,0 +1,88 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Builders
+{
+ /// <summary>
+ /// SequentialStrategy creates test cases by using all of the
+ /// parameter data sources in parallel, substituting <c>null</c>
+ /// when any of them run out of data.
+ /// </summary>
+ public class SequentialStrategy : CombiningStrategy
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SequentialStrategy"/> class.
+ /// </summary>
+ /// <param name="sources">The sources.</param>
+ public SequentialStrategy(IEnumerable[] sources) : base(sources) { }
+
+ /// <summary>
+ /// Gets the test cases generated by the CombiningStrategy.
+ /// </summary>
+ /// <returns>The test cases.</returns>
+#if CLR_2_0 || CLR_4_0
+ public override IEnumerable<ITestCaseData> GetTestCases()
+ {
+ List<ITestCaseData> testCases = new List<ITestCaseData>();
+#else
+ public override IEnumerable GetTestCases()
+ {
+ ArrayList testCases = new ArrayList();
+#endif
+
+ for (; ; )
+ {
+ bool gotData = false;
+ object[] testdata = new object[Sources.Length];
+
+ for (int i = 0; i < Sources.Length; i++)
+ if (Enumerators[i].MoveNext())
+ {
+ testdata[i] = Enumerators[i].Current;
+ gotData = true;
+ }
+ else
+ testdata[i] = null;
+
+ if (!gotData)
+ break;
+
+ ParameterSet parms = new ParameterSet();
+ parms.Arguments = testdata;
+ testCases.Add(parms);
+ }
+
+ return testCases;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/ApplyChangesToContextCommand.cs b/external/guiunit/src/framework/Internal/Commands/ApplyChangesToContextCommand.cs
new file mode 100755
index 0000000..14c09cc
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/ApplyChangesToContextCommand.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Threading;
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// ContextSettingsCommand applies specified changes to the
+ /// TestExecutionContext prior to running a test. No special
+ /// action is needed after the test runs, since the prior
+ /// context will be restored automatically.
+ /// </summary>
+ class ApplyChangesToContextCommand : DelegatingTestCommand
+ {
+ private IApplyToContext[] _changes;
+
+ public ApplyChangesToContextCommand(TestCommand innerCommand, IApplyToContext[] changes)
+ : base(innerCommand)
+ {
+ _changes = changes;
+ }
+
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ try
+ {
+ foreach (IApplyToContext change in _changes)
+ change.ApplyToContext(context);
+
+ context.CurrentResult = innerCommand.Execute(context);
+ }
+ catch (Exception ex)
+ {
+#if !NETCF && !SILVERLIGHT
+ if (ex is ThreadAbortException)
+ Thread.ResetAbort();
+#endif
+ context.CurrentResult.RecordException(ex);
+ }
+
+ return context.CurrentResult;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/CommandDecoratorList.cs b/external/guiunit/src/framework/Internal/Commands/CommandDecoratorList.cs
new file mode 100755
index 0000000..5b77b85
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/CommandDecoratorList.cs
@@ -0,0 +1,48 @@
+using System;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// CommandDecoratorList maintains a list of ICommandDecorators
+ /// and is able to sort them by level so that they are applied
+ /// in the proper order.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class CommandDecoratorList : System.Collections.Generic.List<ICommandDecorator>
+#else
+ public class CommandDecoratorList : System.Collections.ArrayList
+#endif
+ {
+ /// <summary>
+ /// Order command decorators by the stage at which they apply.
+ /// </summary>
+ public void OrderByStage()
+ {
+ Sort(CommandDecoratorComparison);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ private int CommandDecoratorComparison(ICommandDecorator x, ICommandDecorator y)
+ {
+ return x.Stage.CompareTo(y.Stage);
+ }
+#else
+ private CommandDecoratorComparer CommandDecoratorComparison = new CommandDecoratorComparer();
+
+ private class CommandDecoratorComparer : System.Collections.IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ ICommandDecorator xDecorator = x as ICommandDecorator;
+ ICommandDecorator yDecorator = y as ICommandDecorator;
+
+ if (xDecorator == null || yDecorator == null)
+ return 0;
+
+ return xDecorator.Stage.CompareTo(yDecorator.Stage);
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/CommandStage.cs b/external/guiunit/src/framework/Internal/Commands/CommandStage.cs
new file mode 100755
index 0000000..d61f163
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/CommandStage.cs
@@ -0,0 +1,92 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// The CommandStage enumeration represents the defined stages
+ /// of execution for a series of TestCommands. The int values
+ /// of the enum are used to apply decorators in the proper
+ /// order. Lower values are applied first and are therefore
+ /// "closer" to the actual test execution.
+ /// </summary>
+ /// <remarks>
+ /// No CommandStage is defined for actual invocation of the test or
+ /// for creation of the context. Execution may be imagined as
+ /// proceeding from the bottom of the list upwards, with cleanup
+ /// after the test running in the opposite order.
+ /// </remarks>
+ public enum CommandStage
+ {
+ /// <summary>
+ /// Use an application-defined default value.
+ /// </summary>
+ Default,
+
+ // NOTE: The test is actually invoked here.
+
+ /// <summary>
+ /// Make adjustments needed before and after running
+ /// the raw test - that is, after any SetUp has run
+ /// and before TearDown.
+ /// </summary>
+ BelowSetUpTearDown,
+
+ /// <summary>
+ /// Run SetUp and TearDown for the test. This stage is used
+ /// internally by NUnit and should not normally appear
+ /// in user-defined decorators.
+ /// </summary>
+ SetUpTearDown,
+
+ /// <summary>
+ /// Make adjustments needed before and after running
+ /// the entire test - including SetUp and TearDown.
+ /// </summary>
+ AboveSetUpTearDown
+
+ ///// <summary>
+ ///// Create any thread needed for execution of the test
+ ///// and destroy it afterwards
+ ///// </summary>
+ //CreateThread,
+
+ ///// <summary>
+ ///// Run the test repeatedly, returning a single result
+ ///// </summary>
+ //Repeat,
+
+ // Note: The context is created here and destroyed
+ // after the test has run.
+
+ // Command Stages
+ // Create/Destroy Context
+ // Modify/Restore Context
+ // Create/Destroy fixture object
+ // Repeat test
+ // Create/Destroy thread
+ // Modify overall result
+ // SetUp/TearDown
+ // Modify raw result
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/DelegatingTestCommand.cs b/external/guiunit/src/framework/Internal/Commands/DelegatingTestCommand.cs
new file mode 100755
index 0000000..76ac551
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/DelegatingTestCommand.cs
@@ -0,0 +1,46 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public abstract class DelegatingTestCommand : TestCommand
+ {
+ /// <summary>TODO: Documentation needed for field</summary>
+ protected TestCommand innerCommand;
+
+ /// <summary>
+ /// TODO: Documentation needed for constructor
+ /// </summary>
+ /// <param name="innerCommand"></param>
+ protected DelegatingTestCommand(TestCommand innerCommand)
+ : base(innerCommand.Test)
+ {
+ this.innerCommand = innerCommand;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/ExpectedExceptionCommand.cs b/external/guiunit/src/framework/Internal/Commands/ExpectedExceptionCommand.cs
new file mode 100755
index 0000000..496e229
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/ExpectedExceptionCommand.cs
@@ -0,0 +1,217 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.Reflection;
+using System.Text.RegularExpressions;
+using System.Threading;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public class ExpectedExceptionCommand : DelegatingTestCommand
+ {
+ private ExpectedExceptionData exceptionData;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ExpectedExceptionCommand"/> class.
+ /// </summary>
+ /// <param name="innerCommand">The inner command.</param>
+ /// <param name="exceptionData">The exception data.</param>
+ public ExpectedExceptionCommand(TestCommand innerCommand, ExpectedExceptionData exceptionData)
+ : base(innerCommand)
+ {
+ this.exceptionData = exceptionData;
+ }
+
+
+ /// <summary>
+ /// Runs the test, saving a TestResult in the supplied TestExecutionContext
+ /// </summary>
+ /// <param name="context">The context in which the test is to be run.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ try
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+
+ if (context.CurrentResult.ResultState == ResultState.Success)
+ ProcessNoException(context);
+ }
+ catch (Exception ex)
+ {
+#if !NETCF && !SILVERLIGHT
+ if (ex is ThreadAbortException)
+ Thread.ResetAbort();
+#endif
+ ProcessException(ex, context);
+ }
+
+ return context.CurrentResult;
+ }
+
+ /// <summary>
+ /// Handles processing when no exception was thrown.
+ /// </summary>
+ /// <param name="context">The execution context.</param>
+ public void ProcessNoException(TestExecutionContext context)
+ {
+ context.CurrentResult.SetResult(ResultState.Failure, NoExceptionMessage());
+ }
+
+ /// <summary>
+ /// Handles processing when an exception was thrown.
+ /// </summary>
+ /// <param name="exception">The exception.</param>
+ /// <param name="context">The execution context.</param>
+ public void ProcessException(Exception exception, TestExecutionContext context)
+ {
+ if (exception is NUnitException)
+ exception = exception.InnerException;
+
+ if (IsExpectedExceptionType(exception))
+ {
+ if (IsExpectedMessageMatch(exception))
+ {
+ MethodInfo exceptionMethod = exceptionData.GetExceptionHandler(context.TestObject.GetType());
+ if (exceptionMethod != null)
+ {
+ Reflect.InvokeMethod(exceptionMethod, context.TestObject, exception);
+ }
+ else
+ {
+ IExpectException handler = context.TestObject as IExpectException;
+ if (handler != null)
+ handler.HandleException(exception);
+ }
+
+ context.CurrentResult.SetResult(ResultState.Success);
+ }
+ else
+ {
+ context.CurrentResult.SetResult(ResultState.Failure, WrongTextMessage(exception), GetStackTrace(exception));
+ }
+ }
+ else
+ {
+ context.CurrentResult.RecordException(exception);
+
+ // If it shows as an error, change it to a failure due to the wrong type
+ if (context.CurrentResult.ResultState == ResultState.Error)
+ context.CurrentResult.SetResult(ResultState.Failure, WrongTypeMessage(exception), GetStackTrace(exception));
+ }
+ }
+
+ #region Helper Methods
+
+ private bool IsExpectedExceptionType(Exception exception)
+ {
+ return exceptionData.ExpectedExceptionName == null ||
+ exceptionData.ExpectedExceptionName.Equals(exception.GetType().FullName);
+ }
+
+ private bool IsExpectedMessageMatch(Exception exception)
+ {
+ if (exceptionData.ExpectedMessage == null)
+ return true;
+
+ switch (exceptionData.MatchType)
+ {
+ case MessageMatch.Exact:
+ default:
+ return exceptionData.ExpectedMessage.Equals(exception.Message);
+ case MessageMatch.Contains:
+ return exception.Message.IndexOf(exceptionData.ExpectedMessage) >= 0;
+ case MessageMatch.Regex:
+ return Regex.IsMatch(exception.Message, exceptionData.ExpectedMessage);
+ case MessageMatch.StartsWith:
+ return exception.Message.StartsWith(exceptionData.ExpectedMessage);
+ }
+ }
+
+ private string NoExceptionMessage()
+ {
+ string expectedType = exceptionData.ExpectedExceptionName == null ? "An Exception" : exceptionData.ExpectedExceptionName;
+ return CombineWithUserMessage(expectedType + " was expected");
+ }
+
+ private string WrongTypeMessage(Exception exception)
+ {
+ return CombineWithUserMessage(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: " + exceptionData.ExpectedExceptionName + Env.NewLine +
+ " but was: " + exception.GetType().FullName + " : " + exception.Message);
+ }
+
+ private string WrongTextMessage(Exception exception)
+ {
+ string expectedText;
+ switch (exceptionData.MatchType)
+ {
+ default:
+ case MessageMatch.Exact:
+ expectedText = "Expected: ";
+ break;
+ case MessageMatch.Contains:
+ expectedText = "Expected message containing: ";
+ break;
+ case MessageMatch.Regex:
+ expectedText = "Expected message matching: ";
+ break;
+ case MessageMatch.StartsWith:
+ expectedText = "Expected message starting: ";
+ break;
+ }
+
+ return CombineWithUserMessage(
+ "The exception message text was incorrect" + Env.NewLine +
+ expectedText + exceptionData.ExpectedMessage + Env.NewLine +
+ " but was: " + exception.Message);
+ }
+
+ private string CombineWithUserMessage(string message)
+ {
+ if (exceptionData.UserMessage == null)
+ return message;
+ return exceptionData.UserMessage + Env.NewLine + message;
+ }
+
+ private string GetStackTrace(Exception exception)
+ {
+ try
+ {
+ return exception.StackTrace;
+ }
+ catch (Exception)
+ {
+ return "No stack trace available";
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/ICommandDecorator.cs b/external/guiunit/src/framework/Internal/Commands/ICommandDecorator.cs
new file mode 100755
index 0000000..68f7690
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/ICommandDecorator.cs
@@ -0,0 +1,54 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// ICommandDecorator is implemented by attributes and other
+ /// objects able to decorate a TestCommand, usually by wrapping
+ /// it with an outer command.
+ /// </summary>
+ public interface ICommandDecorator
+ {
+ /// <summary>
+ /// The stage of command execution to which this decorator applies.
+ /// </summary>
+ CommandStage Stage { get; }
+
+ /// <summary>
+ /// The priority of this decorator as compared to other decorators
+ /// in the same Stage. Lower values are applied first.
+ /// </summary>
+ int Priority { get; }
+
+ /// <summary>
+ /// Decorate a command, usually by wrapping it with another
+ /// command, and return the decorated command.
+ /// </summary>
+ /// <param name="command">The command to be decorated</param>
+ /// <returns>The decorated command</returns>
+ TestCommand Decorate(TestCommand command);
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/MaxTimeCommand.cs b/external/guiunit/src/framework/Internal/Commands/MaxTimeCommand.cs
new file mode 100755
index 0000000..4886fe9
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/MaxTimeCommand.cs
@@ -0,0 +1,88 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Diagnostics;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public class MaxTimeCommand : DelegatingTestCommand
+ {
+ private int maxTime;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MaxTimeCommand"/> class.
+ /// TODO: Add a comment about where the max time is retrieved.
+ /// </summary>
+ /// <param name="innerCommand">The inner command.</param>
+ public MaxTimeCommand(TestCommand innerCommand)
+ : base(innerCommand)
+ {
+ this.maxTime = Test.Properties.GetSetting(PropertyNames.MaxTime, 0);
+ }
+
+ /// <summary>
+ /// Runs the test, saving a TestResult in the supplied TestExecutionContext
+ /// </summary>
+ /// <param name="context">The context in which the test should run.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ // TODO: This command duplicates the calculation of the
+ // duration of the test because that calculation is
+ // normally performed at a higher level. Most likely,
+ // we should move the maxtime calculation to the
+ // higher level eventually.
+#if (CLR_2_0 || CLR_4_0) && !SILVERLIGHT && !NETCF_2_0
+ long startTicks = Stopwatch.GetTimestamp();
+#endif
+
+ TestResult testResult = innerCommand.Execute(context);
+
+#if (CLR_2_0 || CLR_4_0) && !SILVERLIGHT && !NETCF_2_0
+ long tickCount = Stopwatch.GetTimestamp() - startTicks;
+ double seconds = (double)tickCount / Stopwatch.Frequency;
+ testResult.Duration = TimeSpan.FromSeconds(seconds);
+#else
+ testResult.Duration = DateTime.Now - context.StartTime;
+#endif
+
+ if (testResult.ResultState == ResultState.Success)
+ {
+ //int elapsedTime = (int)Math.Round(testResult.Time * 1000.0);
+ double elapsedTime = testResult.Duration.TotalMilliseconds;
+
+ if (elapsedTime > maxTime)
+ testResult.SetResult(ResultState.Failure,
+ string.Format("Elapsed time of {0}ms exceeds maximum of {1}ms",
+ elapsedTime, maxTime));
+ }
+
+ return testResult;
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/OneTimeSetUpCommand.cs b/external/guiunit/src/framework/Internal/Commands/OneTimeSetUpCommand.cs
new file mode 100755
index 0000000..5f0112b
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/OneTimeSetUpCommand.cs
@@ -0,0 +1,74 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// OneTimeSetUpCommand runs any one-time setup methods for a suite,
+ /// constructing the user test object if necessary.
+ /// </summary>
+ public class OneTimeSetUpCommand : TestCommand
+ {
+ private readonly TestSuite suite;
+ private readonly Type fixtureType;
+ private readonly object[] arguments;
+
+ /// <summary>
+ /// Constructs a OneTimeSetUpComand for a suite
+ /// </summary>
+ /// <param name="suite">The suite to which the command applies</param>
+ public OneTimeSetUpCommand(TestSuite suite) : base(suite)
+ {
+ this.suite = suite;
+ this.fixtureType = suite.FixtureType;
+ this.arguments = suite.arguments;
+ }
+
+ /// <summary>
+ /// Overridden to run the one-time setup for a suite.
+ /// </summary>
+ /// <param name="context">The TestExecutionContext to be used.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ if (fixtureType != null)
+ {
+ if (context.TestObject == null && !IsStaticClass(fixtureType))
+ context.TestObject = Reflect.Construct(fixtureType, arguments);
+
+ foreach (MethodInfo method in Reflect.GetMethodsWithAttribute(fixtureType, typeof(TestFixtureSetUpAttribute), true))
+ Reflect.InvokeMethod(method, method.IsStatic ? null : context.TestObject);
+ }
+
+ return context.CurrentResult;
+ }
+
+ private static bool IsStaticClass(Type type)
+ {
+ return type.IsAbstract && type.IsSealed;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/OneTimeTearDownCommand.cs b/external/guiunit/src/framework/Internal/Commands/OneTimeTearDownCommand.cs
new file mode 100755
index 0000000..8ba497f
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/OneTimeTearDownCommand.cs
@@ -0,0 +1,106 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// OneTimeTearDownCommand performs any teardown actions
+ /// specified for a suite and calls Dispose on the user
+ /// test object, if any.
+ /// </summary>
+ public class OneTimeTearDownCommand : TestCommand
+ {
+ private readonly TestSuite suite;
+ private readonly Type fixtureType;
+
+ /// <summary>
+ /// Construct a OneTimeTearDownCommand
+ /// </summary>
+ /// <param name="suite">The test suite to which the command applies</param>
+ public OneTimeTearDownCommand(TestSuite suite)
+ : base(suite)
+ {
+ this.suite = suite;
+ this.fixtureType = suite.FixtureType;
+ }
+
+ /// <summary>
+ /// Overridden to run the teardown methods specified on the test.
+ /// </summary>
+ /// <param name="context">The TestExecutionContext to be used.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ TestResult suiteResult = context.CurrentResult;
+
+ if (fixtureType != null)
+ {
+ MethodInfo[] teardownMethods =
+ Reflect.GetMethodsWithAttribute(fixtureType, typeof(TestFixtureTearDownAttribute), true);
+
+ try
+ {
+ int index = teardownMethods.Length;
+ while (--index >= 0)
+ {
+ MethodInfo fixtureTearDown = teardownMethods[index];
+ if (!fixtureTearDown.IsStatic && context.TestObject == null)
+ Console.WriteLine("TestObject should not be null!!!");
+ Reflect.InvokeMethod(fixtureTearDown, fixtureTearDown.IsStatic ? null : context.TestObject);
+ }
+
+ IDisposable disposable = context.TestObject as IDisposable;
+ if (disposable != null)
+ disposable.Dispose();
+ }
+ catch (Exception ex)
+ {
+ // Error in TestFixtureTearDown or Dispose causes the
+ // suite to be marked as a error, even if
+ // all the contained tests passed.
+ NUnitException nex = ex as NUnitException;
+ if (nex != null)
+ ex = nex.InnerException;
+
+ // TODO: Can we move this logic into TestResult itself?
+ string message = "TearDown : " + ExceptionHelper.BuildMessage(ex);
+ if (suiteResult.Message != null)
+ message = suiteResult.Message + NUnit.Env.NewLine + message;
+
+ string stackTrace = "--TearDown" + NUnit.Env.NewLine + ExceptionHelper.BuildStackTrace(ex);
+ if (suiteResult.StackTrace != null)
+ stackTrace = suiteResult.StackTrace + NUnit.Env.NewLine + stackTrace;
+
+ // TODO: What about ignore exceptions in teardown?
+ suiteResult.SetResult(ResultState.Error, message, stackTrace);
+ }
+ }
+
+ return suiteResult;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/RepeatedTestCommand.cs b/external/guiunit/src/framework/Internal/Commands/RepeatedTestCommand.cs
new file mode 100755
index 0000000..48b7467
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/RepeatedTestCommand.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+#if false
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public class RepeatedTestCommand : DelegatingTestCommand
+ {
+ private int repeatCount;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RepeatedTestCommand"/> class.
+ /// TODO: Add a comment about where the repeat count is retrieved.
+ /// </summary>
+ /// <param name="innerCommand">The inner command.</param>
+ public RepeatedTestCommand(TestCommand innerCommand)
+ : base(innerCommand)
+ {
+ this.repeatCount = Test.Properties.GetSetting(PropertyNames.RepeatCount, 1);
+ }
+
+ /// <summary>
+ /// Runs the test, saving a TestResult in the supplied TestExecutionContext.
+ /// </summary>
+ /// <param name="context">The context in which the test should run.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ int count = repeatCount;
+
+ while (count-- > 0)
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+
+ // TODO: We may want to change this so that all iterations are run
+ if (context.CurrentResult.ResultState == ResultState.Failure ||
+ context.CurrentResult.ResultState == ResultState.Error ||
+ context.CurrentResult.ResultState == ResultState.Cancelled)
+ {
+ break;
+ }
+ }
+
+ return context.CurrentResult;
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/SetUpTearDownCommand.cs b/external/guiunit/src/framework/Internal/Commands/SetUpTearDownCommand.cs
new file mode 100755
index 0000000..4cae066
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/SetUpTearDownCommand.cs
@@ -0,0 +1,143 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Reflection;
+using System.Threading;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// SetUpTearDownDecorator decorates a test command by running
+ /// a setup method before the original command and a teardown
+ /// method after it has executed.
+ /// </summary>
+ public class SetUpTearDownDecorator : ICommandDecorator
+ {
+ CommandStage ICommandDecorator.Stage
+ {
+ get { return CommandStage.SetUpTearDown; }
+ }
+
+ int ICommandDecorator.Priority
+ {
+ get { return 0; }
+ }
+
+ TestCommand ICommandDecorator.Decorate(TestCommand command)
+ {
+ return new SetUpTearDownCommand(command);
+ }
+ }
+
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public class SetUpTearDownCommand : DelegatingTestCommand
+ {
+ private readonly MethodInfo[] setUpMethods;
+ private readonly MethodInfo[] tearDownMethods;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SetUpTearDownCommand"/> class.
+ /// </summary>
+ /// <param name="innerCommand">The inner command.</param>
+ public SetUpTearDownCommand(TestCommand innerCommand)
+ : base(innerCommand)
+ {
+ this.setUpMethods = Test.SetUpMethods;
+ this.tearDownMethods = Test.TearDownMethods;
+ }
+
+ /// <summary>
+ /// Runs the test, saving a TestResult in the supplied TestExecutionContext.
+ /// </summary>
+ /// <param name="context">The context in which the test should run.</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ try
+ {
+ RunSetUpMethods(context);
+
+ context.CurrentResult = innerCommand.Execute(context);
+ }
+ catch (Exception ex)
+ {
+#if !NETCF && !SILVERLIGHT
+ if (ex is ThreadAbortException)
+ Thread.ResetAbort();
+#endif
+ context.CurrentResult.RecordException(ex);
+ }
+ finally
+ {
+ RunTearDownMethods(context);
+ }
+
+ return context.CurrentResult;
+ }
+
+ private void RunSetUpMethods(TestExecutionContext context)
+ {
+ if (setUpMethods != null)
+ foreach (MethodInfo setUpMethod in setUpMethods)
+ Reflect.InvokeMethod(setUpMethod, setUpMethod.IsStatic ? null : context.TestObject);
+ }
+
+ private void RunTearDownMethods(TestExecutionContext context)
+ {
+ try
+ {
+ if (tearDownMethods != null)
+ {
+ int index = tearDownMethods.Length;
+ while (--index >= 0)
+ Reflect.InvokeMethod(tearDownMethods[index], tearDownMethods[index].IsStatic ? null : context.TestObject);
+ }
+ }
+ catch (Exception ex)
+ {
+ if (ex is NUnitException)
+ ex = ex.InnerException;
+
+ // TODO: What about ignore exceptions in teardown?
+ ResultState resultState = context.CurrentResult.ResultState == ResultState.Cancelled
+ ? ResultState.Cancelled
+ : ResultState.Error;
+
+ // TODO: Can we move this logic into TestResult itself?
+ string message = "TearDown : " + ExceptionHelper.BuildMessage(ex);
+ if (context.CurrentResult.Message != null)
+ message = context.CurrentResult.Message + NUnit.Env.NewLine + message;
+
+ string stackTrace = "--TearDown" + NUnit.Env.NewLine + ExceptionHelper.BuildStackTrace(ex);
+ if (context.CurrentResult.StackTrace != null)
+ stackTrace = context.CurrentResult.StackTrace + NUnit.Env.NewLine + stackTrace;
+
+ context.CurrentResult.SetResult(resultState, message, stackTrace);
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/SkipCommand.cs b/external/guiunit/src/framework/Internal/Commands/SkipCommand.cs
new file mode 100755
index 0000000..ed7367e
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/SkipCommand.cs
@@ -0,0 +1,79 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+ public class SkipCommand : TestCommand
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SkipCommand"/> class.
+ /// </summary>
+ /// <param name="test">The test being skipped.</param>
+ public SkipCommand(Test test) : base(test)
+ {
+ }
+
+ /// <summary>
+ /// Overridden to simply set the CurrentResult to the
+ /// appropriate Skipped state.
+ /// </summary>
+ /// <param name="context">The execution context for the test</param>
+ /// <returns>A TestResult</returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ TestResult testResult = this.Test.MakeTestResult();
+
+ switch (Test.RunState)
+ {
+ default:
+ case RunState.Skipped:
+ testResult.SetResult(ResultState.Skipped, GetSkipReason());
+ break;
+ case RunState.Ignored:
+ testResult.SetResult(ResultState.Ignored, GetSkipReason());
+ break;
+ case RunState.NotRunnable:
+ testResult.SetResult(ResultState.NotRunnable, GetSkipReason(), GetProviderStackTrace());
+ break;
+ }
+
+ return testResult;
+ }
+
+ private string GetSkipReason()
+ {
+ return (string)Test.Properties.Get(PropertyNames.SkipReason);
+ }
+
+ private string GetProviderStackTrace()
+ {
+ return (string)Test.Properties.Get(PropertyNames.ProviderStackTrace);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/TestCommand.cs b/external/guiunit/src/framework/Internal/Commands/TestCommand.cs
new file mode 100755
index 0000000..ea7a8da
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/TestCommand.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TestCommand is the abstract base class for all test commands
+ /// in the framework. A TestCommand represents a single stage in
+ /// the execution of a test, e.g.: SetUp/TearDown, checking for
+ /// Timeout, verifying the returned result from a method, etc.
+ ///
+ /// TestCommands may decorate other test commands so that the
+ /// execution of a lower-level command is nested within that
+ /// of a higher level command. All nested commands are executed
+ /// synchronously, as a single unit. Scheduling test execution
+ /// on separate threads is handled at a higher level, using the
+ /// task dispatcher.
+ /// </summary>
+ public abstract class TestCommand
+ {
+ private Test test;
+
+ /// <summary>
+ /// Construct a TestCommand for a test.
+ /// </summary>
+ /// <param name="test">The test to be executed</param>
+ public TestCommand(Test test)
+ {
+ this.test = test;
+ }
+
+ #region ITestCommandMembers
+
+ /// <summary>
+ /// Gets the test associated with this command.
+ /// </summary>
+ public Test Test
+ {
+ get { return test; }
+ }
+
+ /// <summary>
+ /// Runs the test in a specified context, returning a TestResult.
+ /// </summary>
+ /// <param name="context">The TestExecutionContext to be used for running the test.</param>
+ /// <returns>A TestResult</returns>
+ public abstract TestResult Execute(TestExecutionContext context);
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Commands/TestMethodCommand.cs b/external/guiunit/src/framework/Internal/Commands/TestMethodCommand.cs
new file mode 100755
index 0000000..743e188
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/TestMethodCommand.cs
@@ -0,0 +1,168 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TestMethodCommand is the lowest level concrete command
+ /// used to run actual test cases.
+ /// </summary>
+ public class TestMethodCommand : TestCommand
+ {
+ private const string TaskWaitMethod = "Wait";
+ private const string TaskResultProperty = "Result";
+ private const string SystemAggregateException = "System.AggregateException";
+ private const string InnerExceptionsProperty = "InnerExceptions";
+ private const BindingFlags TaskResultPropertyBindingFlags = BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public;
+ private readonly TestMethod testMethod;
+ private readonly object[] arguments;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestMethodCommand"/> class.
+ /// </summary>
+ /// <param name="testMethod">The test.</param>
+ public TestMethodCommand(TestMethod testMethod) : base(testMethod)
+ {
+ this.testMethod = testMethod;
+ this.arguments = testMethod.Arguments;
+ }
+
+ /// <summary>
+ /// Runs the test, saving a TestResult in the execution context, as
+ /// well as returning it. If the test has an expected result, it
+ /// is asserts on that value. Since failed tests and errors throw
+ /// an exception, this command must be wrapped in an outer command,
+ /// will handle that exception and records the failure. This role
+ /// is usually played by the SetUpTearDown command.
+ /// </summary>
+ /// <param name="context">The execution context</param>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ // TODO: Decide if we should handle exceptions here
+ object result = RunTestMethod(context);
+
+ if (testMethod.HasExpectedResult)
+ NUnit.Framework.Assert.AreEqual(testMethod.ExpectedResult, result);
+
+ context.CurrentResult.SetResult(ResultState.Success);
+ // TODO: Set assert count here?
+ //context.CurrentResult.AssertCount = context.AssertCount;
+ return context.CurrentResult;
+ }
+
+ private object RunTestMethod(TestExecutionContext context)
+ {
+#if NET_4_5
+ if (MethodHelper.IsAsyncMethod(testMethod.Method))
+ return RunAsyncTestMethod(context);
+ //{
+ // if (testMethod.Method.ReturnType == typeof(void))
+ // return RunAsyncVoidTestMethod(context);
+ // else
+ // return RunAsyncTaskTestMethod(context);
+ //}
+ else
+#endif
+ return RunNonAsyncTestMethod(context);
+ }
+
+#if NET_4_5
+ private object RunAsyncTestMethod(TestExecutionContext context)
+ {
+ using (AsyncInvocationRegion region = AsyncInvocationRegion.Create(testMethod.Method))
+ {
+ object result = Reflect.InvokeMethod(testMethod.Method, context.TestObject, arguments);
+
+ try
+ {
+ return region.WaitForPendingOperationsToComplete(result);
+ }
+ catch (Exception e)
+ {
+ throw new NUnitException("Rethrown", e);
+ }
+ }
+ }
+#endif
+
+ private object RunNonAsyncTestMethod(TestExecutionContext context)
+ {
+ return Reflect.InvokeMethod(testMethod.Method, context.TestObject, arguments);
+ }
+
+#if NET_4_5x
+ private object RunAsyncVoidTestMethod(TestExecutionContext context)
+ {
+ var previousContext = SynchronizationContext.Current;
+ var currentContext = new AsyncSynchronizationContext();
+ SynchronizationContext.SetSynchronizationContext(currentContext);
+
+ try
+ {
+ object result = Reflect.InvokeMethod(testMethod.Method, context.TestObject, arguments);
+
+ currentContext.WaitForOperationCompleted();
+
+ if (currentContext.Exceptions.Count > 0)
+ throw new NUnitException("Rethrown", currentContext.Exceptions[0]);
+
+ return result;
+ }
+ finally
+ {
+ SynchronizationContext.SetSynchronizationContext(previousContext);
+ }
+ }
+
+ private object RunAsyncTaskTestMethod(TestExecutionContext context)
+ {
+ try
+ {
+ object task = Reflect.InvokeMethod(testMethod.Method, context.TestObject, arguments);
+
+ Reflect.InvokeMethod(testMethod.Method.ReturnType.GetMethod(TaskWaitMethod, new Type[0]), task);
+ PropertyInfo resultProperty = testMethod.Method.ReturnType.GetProperty(TaskResultProperty, TaskResultPropertyBindingFlags);
+
+ return resultProperty != null ? resultProperty.GetValue(task, null) : null;
+ }
+ catch (NUnitException e)
+ {
+ if (e.InnerException != null &&
+ e.InnerException.GetType().FullName.Equals(SystemAggregateException))
+ {
+ IList<Exception> inner = (IList<Exception>)e.InnerException.GetType()
+ .GetProperty(InnerExceptionsProperty).GetValue(e.InnerException, null);
+
+ throw new NUnitException("Rethrown", inner[0]);
+ }
+
+ throw;
+ }
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/Commands/TheoryResultCommand.cs b/external/guiunit/src/framework/Internal/Commands/TheoryResultCommand.cs
new file mode 100755
index 0000000..c1a0e11
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Commands/TheoryResultCommand.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Commands
+{
+ /// <summary>
+ /// TheoryResultCommand adjusts the result of a Theory so that
+ /// it fails if all the results were inconclusive.
+ /// </summary>
+ public class TheoryResultCommand : DelegatingTestCommand
+ {
+ /// <summary>
+ /// Constructs a TheoryResultCommand
+ /// </summary>
+ /// <param name="command">The command to be wrapped by this one</param>
+ public TheoryResultCommand(TestCommand command) : base(command) { }
+
+ /// <summary>
+ /// Overridden to call the inner command and adjust the result
+ /// in case all chlid results were inconclusive.
+ /// </summary>
+ /// <param name="context"></param>
+ /// <returns></returns>
+ public override TestResult Execute(TestExecutionContext context)
+ {
+ TestResult theoryResult = innerCommand.Execute(context);
+
+ if (theoryResult.ResultState == ResultState.Success)
+ {
+ if (!theoryResult.HasChildren)
+ theoryResult.SetResult(ResultState.Failure, "No test cases were provided", null);
+ else
+ {
+ bool wasInconclusive = true;
+ foreach (TestResult childResult in theoryResult.Children)
+ if (childResult.ResultState == ResultState.Success)
+ {
+ wasInconclusive = false;
+ break;
+ }
+
+ if (wasInconclusive)
+ theoryResult.SetResult(ResultState.Failure, "All test cases were inconclusive", null);
+ }
+ }
+
+ return theoryResult;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/CultureDetector.cs b/external/guiunit/src/framework/Internal/CultureDetector.cs
new file mode 100755
index 0000000..cda504c
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/CultureDetector.cs
@@ -0,0 +1,142 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+using System.Globalization;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// CultureDetector is a helper class used by NUnit to determine
+ /// whether a test should be run based on the current culture.
+ /// </summary>
+ public class CultureDetector
+ {
+ private CultureInfo currentCulture;
+
+ // Set whenever we fail to support a list of platforms
+ private string reason = string.Empty;
+
+ /// <summary>
+ /// Default constructor uses the current culutre.
+ /// </summary>
+ public CultureDetector()
+ {
+ this.currentCulture = CultureInfo.CurrentCulture;
+ }
+
+ /// <summary>
+ /// Contruct a CultureDetector for a particular culture for testing.
+ /// </summary>
+ /// <param name="culture">The culture to be used</param>
+ public CultureDetector( string culture )
+ {
+ this.currentCulture = new CultureInfo( culture );
+ }
+
+ /// <summary>
+ /// Test to determine if one of a collection of culturess
+ /// is being used currently.
+ /// </summary>
+ /// <param name="cultures"></param>
+ /// <returns></returns>
+ public bool IsCultureSupported( string[] cultures )
+ {
+ foreach( string culture in cultures )
+ if ( IsCultureSupported( culture ) )
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Tests to determine if the current culture is supported
+ /// based on a culture attribute.
+ /// </summary>
+ /// <param name="cultureAttribute">The attribute to examine</param>
+ /// <returns></returns>
+ public bool IsCultureSupported( CultureAttribute cultureAttribute )
+ {
+ string include = cultureAttribute.Include;
+ string exclude = cultureAttribute.Exclude;
+
+ //try
+ //{
+ if (include != null && !IsCultureSupported(include))
+ {
+ reason = string.Format("Only supported under culture {0}", include);
+ return false;
+ }
+
+ if (exclude != null && IsCultureSupported(exclude))
+ {
+ reason = string.Format("Not supported under culture {0}", exclude);
+ return false;
+ }
+ //}
+ //catch( ArgumentException ex )
+ //{
+ // reason = string.Format( "Invalid culture: {0}", ex.ParamName );
+ // return false;
+ //}
+
+ return true;
+ }
+
+ /// <summary>
+ /// Test to determine if the a particular culture or comma-
+ /// delimited set of cultures is in use.
+ /// </summary>
+ /// <param name="culture">Name of the culture or comma-separated list of culture names</param>
+ /// <returns>True if the culture is in use on the system</returns>
+ public bool IsCultureSupported( string culture )
+ {
+ culture = culture.Trim();
+
+ if ( culture.IndexOf( ',' ) >= 0 )
+ {
+ if ( IsCultureSupported( culture.Split( new char[] { ',' } ) ) )
+ return true;
+ }
+ else
+ {
+ if( this.currentCulture.Name == culture || this.currentCulture.TwoLetterISOLanguageName == culture)
+ return true;
+ }
+
+ this.reason = "Only supported under culture " + culture;
+ return false;
+ }
+
+ /// <summary>
+ /// Return the last failure reason. Results are not
+ /// defined if called before IsSupported( Attribute )
+ /// is called.
+ /// </summary>
+ public string Reason
+ {
+ get { return reason; }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/ExceptionHelper.cs b/external/guiunit/src/framework/Internal/ExceptionHelper.cs
new file mode 100755
index 0000000..09058ab
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/ExceptionHelper.cs
@@ -0,0 +1,95 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Globalization;
+using System.Text;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// ExceptionHelper provides static methods for working with exceptions
+ /// </summary>
+ public class ExceptionHelper
+ {
+ // TODO: Move to a utility class
+ /// <summary>
+ /// Builds up a message, using the Message field of the specified exception
+ /// as well as any InnerExceptions.
+ /// </summary>
+ /// <param name="exception">The exception.</param>
+ /// <returns>A combined message string.</returns>
+ public static string BuildMessage(Exception exception)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat(CultureInfo.CurrentCulture, "{0} : {1}", exception.GetType().ToString(), exception.Message);
+
+ Exception inner = exception.InnerException;
+ while (inner != null)
+ {
+ sb.Append(NUnit.Env.NewLine);
+ sb.AppendFormat(CultureInfo.CurrentCulture, " ----> {0} : {1}", inner.GetType().ToString(), inner.Message);
+ inner = inner.InnerException;
+ }
+
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// Builds up a message, using the Message field of the specified exception
+ /// as well as any InnerExceptions.
+ /// </summary>
+ /// <param name="exception">The exception.</param>
+ /// <returns>A combined stack trace.</returns>
+ public static string BuildStackTrace(Exception exception)
+ {
+ StringBuilder sb = new StringBuilder(GetStackTrace(exception));
+
+ Exception inner = exception.InnerException;
+ while (inner != null)
+ {
+ sb.Append(NUnit.Env.NewLine);
+ sb.Append("--");
+ sb.Append(inner.GetType().Name);
+ sb.Append(NUnit.Env.NewLine);
+ sb.Append(GetStackTrace(inner));
+
+ inner = inner.InnerException;
+ }
+
+ return sb.ToString();
+ }
+
+ private static string GetStackTrace(Exception exception)
+ {
+ try
+ {
+ return exception.StackTrace;
+ }
+ catch (Exception)
+ {
+ return "No stack trace available";
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Extensibility/ParameterDataProviders.cs b/external/guiunit/src/framework/Internal/Extensibility/ParameterDataProviders.cs
new file mode 100755
index 0000000..07e5176
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Extensibility/ParameterDataProviders.cs
@@ -0,0 +1,101 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Builders;
+
+namespace NUnit.Framework.Extensibility
+{
+#if NUNITLITE
+ class ParameterDataProviders : IParameterDataProvider
+ {
+#if CLR_2_0 || CLR_4_0
+ private List<IParameterDataProvider> Extensions = new List<IParameterDataProvider>();
+#else
+ private ArrayList Extensions = new ArrayList();
+#endif
+
+ public ParameterDataProviders()
+ {
+ Extensions.Add(new ParameterDataProvider());
+ Extensions.Add(new DatapointProvider());
+ }
+#else
+ class ParameterDataProviders : ExtensionPoint, IParameterDataProvider
+ {
+ public ParameterDataProviders(ExtensionHost host)
+ : base("ParameterDataProviders", host) { }
+#endif
+
+ #region IDataPointProvider Members
+
+ /// <summary>
+ /// Determine whether any data is available for a parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>True if any data is available, otherwise false.</returns>
+ public bool HasDataFor(ParameterInfo parameter)
+ {
+ foreach (IParameterDataProvider provider in Extensions)
+ if (provider.HasDataFor(parameter))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Return an IEnumerable providing data for use with the
+ /// supplied parameter.
+ /// </summary>
+ /// <param name="parameter">A ParameterInfo representing one
+ /// argument to a parameterized test</param>
+ /// <returns>An IEnumerable providing the required data</returns>
+ public IEnumerable GetDataFor(ParameterInfo parameter)
+ {
+ ObjectList list = new ObjectList();
+
+ foreach (IParameterDataProvider provider in Extensions)
+ if (provider.HasDataFor(parameter))
+ foreach (object o in provider.GetDataFor(parameter))
+ list.Add(o);
+
+ return list;
+ }
+ #endregion
+
+#if !NUNITLITE
+ #region ExtensionPoint Overrides
+ protected override bool IsValidExtension(object extension)
+ {
+ return extension is IParameterDataProvider;
+ }
+ #endregion
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Extensibility/TestCaseProviders.cs b/external/guiunit/src/framework/Internal/Extensibility/TestCaseProviders.cs
new file mode 100755
index 0000000..a989416
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Extensibility/TestCaseProviders.cs
@@ -0,0 +1,116 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Builders;
+
+namespace NUnit.Framework.Extensibility
+{
+#if NUNITLITE
+ class TestCaseProviders : ITestCaseProvider
+ {
+#if CLR_2_0 || CLR_4_0
+ private List<ITestCaseProvider> Extensions = new List<ITestCaseProvider>();
+#else
+ private System.Collections.ArrayList Extensions = new System.Collections.ArrayList();
+#endif
+
+ public TestCaseProviders()
+ {
+ this.Extensions.Add(new DataAttributeTestCaseProvider());
+ this.Extensions.Add(new CombinatorialTestCaseProvider());
+ }
+#else
+ class TestCaseProviders : ExtensionPoint, ITestCaseProvider
+ {
+ public TestCaseProviders(IExtensionHost host) : base( "TestCaseProviders", host ) { }
+#endif
+
+ #region ITestCaseProvider Members
+
+ /// <summary>
+ /// Determine whether any test cases are available for a parameterized method.
+ /// </summary>
+ /// <param name="method">A MethodInfo representing a parameterized test</param>
+ /// <returns>True if any cases are available, otherwise false.</returns>
+ public bool HasTestCasesFor(MethodInfo method)
+ {
+ foreach (ITestCaseProvider provider in Extensions)
+ if (provider.HasTestCasesFor(method))
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Return an enumeration providing test cases for use in
+ /// running a parameterized test.
+ /// </summary>
+ /// <param name="method"></param>
+ /// <returns></returns>
+#if CLR_2_0 || CLR_4_0
+ public System.Collections.Generic.IEnumerable<ITestCaseData> GetTestCasesFor(MethodInfo method)
+ {
+ List<ITestCaseData> testcases = new List<ITestCaseData>();
+#else
+ public System.Collections.IEnumerable GetTestCasesFor(MethodInfo method)
+ {
+ System.Collections.ArrayList testcases = new System.Collections.ArrayList();
+#endif
+
+ foreach (ITestCaseProvider provider in Extensions)
+ try
+ {
+ if (provider.HasTestCasesFor(method))
+ foreach (ITestCaseData testcase in provider.GetTestCasesFor(method))
+ testcases.Add(testcase);
+ }
+ catch (System.Reflection.TargetInvocationException ex)
+ {
+ testcases.Add(new ParameterSet(ex.InnerException));
+ }
+ catch (System.Exception ex)
+ {
+ testcases.Add(new ParameterSet(ex));
+ }
+
+ return testcases;
+ }
+
+ #endregion
+
+#if !NUNITLITE
+ #region IsValidExtension
+ protected override bool IsValidExtension(object extension)
+ {
+ return extension is ITestCaseProvider;
+ }
+ #endregion
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/AndFilter.cs b/external/guiunit/src/framework/Internal/Filters/AndFilter.cs
new file mode 100755
index 0000000..fa16110
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/AndFilter.cs
@@ -0,0 +1,96 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// Combines multiple filters so that a test must pass all
+ /// of them in order to pass this filter.
+ /// </summary>
+ [Serializable]
+ public class AndFilter : TestFilter
+ {
+#if CLR_2_0 || CLR_4_0
+ private List<ITestFilter> filters = new List<ITestFilter>();
+#else
+ private System.Collections.ArrayList filters = new System.Collections.ArrayList();
+#endif
+
+ /// <summary>
+ /// Constructs an empty AndFilter
+ /// </summary>
+ public AndFilter() { }
+
+ /// <summary>
+ /// Constructs an AndFilter from an array of filters
+ /// </summary>
+ /// <param name="filters"></param>
+ public AndFilter( params ITestFilter[] filters )
+ {
+ this.filters.AddRange( filters );
+ }
+
+ /// <summary>
+ /// Adds a filter to the list of filters
+ /// </summary>
+ /// <param name="filter">The filter to be added</param>
+ public void Add( ITestFilter filter )
+ {
+ this.filters.Add( filter );
+ }
+
+ /// <summary>
+ /// Checks whether the AndFilter is matched by a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if all the component filters pass, otherwise false</returns>
+ public override bool Pass( ITest test )
+ {
+ foreach( ITestFilter filter in filters )
+ if ( !filter.Pass( test ) )
+ return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Checks whether the AndFilter is matched by a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if all the component filters match, otherwise false</returns>
+ public override bool Match( ITest test )
+ {
+ foreach( TestFilter filter in filters )
+ if ( !filter.Match( test ) )
+ return false;
+
+ return true;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/CategoryExpression.cs b/external/guiunit/src/framework/Internal/Filters/CategoryExpression.cs
new file mode 100755
index 0000000..5b6eb8f
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/CategoryExpression.cs
@@ -0,0 +1,180 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// CategoryExpression parses strings representing boolean
+ /// combinations of categories according to the following
+ /// grammar:
+ /// CategoryName ::= string not containing any of ',', '&', '+', '-'
+ /// CategoryFilter ::= CategoryName | CategoryFilter ',' CategoryName
+ /// CategoryPrimitive ::= CategoryFilter | '-' CategoryPrimitive
+ /// CategoryTerm ::= CategoryPrimitive | CategoryTerm '&' CategoryPrimitive
+ /// </summary>
+ public class CategoryExpression
+ {
+ static readonly char[] ops = new char[] { ',', ';', '-', '|', '+', '(', ')' };
+
+ private string text;
+ private int next;
+ private string token;
+
+ private TestFilter filter;
+
+ /// <summary>
+ /// Construct expression from a text string
+ /// </summary>
+ /// <param name="text">The text of the expression</param>
+ public CategoryExpression(string text)
+ {
+ this.text = text;
+ this.next = 0;
+ }
+
+ /// <summary>
+ /// Gets the TestFilter represented by the expression
+ /// </summary>
+ public TestFilter Filter
+ {
+ get
+ {
+ if( filter == null )
+ {
+ filter = GetToken() == null
+ ? TestFilter.Empty
+ : GetExpression();
+ }
+
+ return filter;
+ }
+ }
+
+ private TestFilter GetExpression()
+ {
+ TestFilter term = GetTerm();
+ if ( token != "|" )
+ return term;
+
+ OrFilter filter = new OrFilter( term );
+
+ while ( token == "|" )
+ {
+ GetToken();
+ filter.Add( GetTerm() );
+ }
+
+ return filter;
+ }
+
+ private TestFilter GetTerm()
+ {
+ TestFilter prim = GetPrimitive();
+ if ( token != "+" && token != "-" )
+ return prim;
+
+ AndFilter filter = new AndFilter( prim );
+
+ while ( token == "+"|| token == "-" )
+ {
+ string tok = token;
+ GetToken();
+ prim = GetPrimitive();
+ filter.Add( tok == "-" ? new NotFilter( prim ) : prim );
+ }
+
+ return filter;
+ }
+
+ private TestFilter GetPrimitive()
+ {
+ if( token == "-" )
+ {
+ GetToken();
+ return new NotFilter( GetPrimitive() );
+ }
+ else if( token == "(" )
+ {
+ GetToken();
+ TestFilter expr = GetExpression();
+ GetToken(); // Skip ')'
+ return expr;
+ }
+
+ return GetCategoryFilter();
+ }
+
+ private CategoryFilter GetCategoryFilter()
+ {
+ CategoryFilter filter = new CategoryFilter( token );
+
+ while( GetToken() == "," || token == ";" )
+ filter.AddCategory( GetToken() );
+
+ return filter;
+ }
+
+ private string GetToken()
+ {
+ SkipWhiteSpace();
+
+ if ( EndOfText() )
+ token = null;
+ else if ( NextIsOperator() )
+ token = text.Substring(next++, 1);
+ else
+ {
+ int index2 = text.IndexOfAny( ops, next );
+ if ( index2 < 0 ) index2 = text.Length;
+
+ token = text.Substring( next, index2 - next ).TrimEnd();
+ next = index2;
+ }
+
+ return token;
+ }
+
+ private void SkipWhiteSpace()
+ {
+ while( next < text.Length && Char.IsWhiteSpace( text[next] ) )
+ ++next;
+ }
+
+ private bool EndOfText()
+ {
+ return next >= text.Length;
+ }
+
+ private bool NextIsOperator()
+ {
+ foreach( char op in ops )
+ if( op == text[next] )
+ return true;
+
+ return false;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/CategoryFilter.cs b/external/guiunit/src/framework/Internal/Filters/CategoryFilter.cs
new file mode 100755
index 0000000..1eac74a
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/CategoryFilter.cs
@@ -0,0 +1,118 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Text;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// CategoryFilter is able to select or exclude tests
+ /// based on their categories.
+ /// </summary>
+ ///
+ [Serializable]
+ public class CategoryFilter : TestFilter
+ {
+#if CLR_2_0 || CLR_4_0
+ List<string> categories = new List<string>();
+#else
+ ArrayList categories = new ArrayList();
+#endif
+
+ /// <summary>
+ /// Construct an empty CategoryFilter
+ /// </summary>
+ public CategoryFilter()
+ {
+ }
+
+ /// <summary>
+ /// Construct a CategoryFilter using a single category name
+ /// </summary>
+ /// <param name="name">A category name</param>
+ public CategoryFilter( string name )
+ {
+ if ( name != null && name != string.Empty )
+ categories.Add( name );
+ }
+
+ /// <summary>
+ /// Construct a CategoryFilter using an array of category names
+ /// </summary>
+ /// <param name="names">An array of category names</param>
+ public CategoryFilter( string[] names )
+ {
+ if ( names != null )
+ categories.AddRange( names );
+ }
+
+ /// <summary>
+ /// Add a category name to the filter
+ /// </summary>
+ /// <param name="name">A category name</param>
+ public void AddCategory(string name)
+ {
+ categories.Add( name );
+ }
+
+ /// <summary>
+ /// Check whether the filter matches a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns></returns>
+ public override bool Match(ITest test)
+ {
+ IList testCategories = test.Properties[PropertyNames.Category] as IList;
+
+ if ( testCategories == null || testCategories.Count == 0)
+ return false;
+
+ foreach( string cat in this.categories )
+ if ( testCategories.Contains( cat ) )
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Return the string representation of a category filter
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ for( int i = 0; i < categories.Count; i++ )
+ {
+ if ( i > 0 ) sb.Append( ',' );
+ sb.Append( categories[i] );
+ }
+ return sb.ToString();
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/NotFilter.cs b/external/guiunit/src/framework/Internal/Filters/NotFilter.cs
new file mode 100755
index 0000000..7a16fe6
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/NotFilter.cs
@@ -0,0 +1,97 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// NotFilter negates the operation of another filter
+ /// </summary>
+ [Serializable]
+ public class NotFilter : TestFilter
+ {
+ ITestFilter baseFilter;
+ bool topLevel = false;
+
+ /// <summary>
+ /// Construct a not filter on another filter
+ /// </summary>
+ /// <param name="baseFilter">The filter to be negated</param>
+ public NotFilter( ITestFilter baseFilter)
+ {
+ this.baseFilter = baseFilter;
+ }
+
+ /// <summary>
+ /// Indicates whether this is a top-level NotFilter,
+ /// requiring special handling of Explicit
+ /// </summary>
+ public bool TopLevel
+ {
+ get { return topLevel; }
+ set { topLevel = value; }
+ }
+
+ /// <summary>
+ /// Gets the base filter
+ /// </summary>
+ public ITestFilter BaseFilter
+ {
+ get { return baseFilter; }
+ }
+
+ /// <summary>
+ /// Check whether the filter matches a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if it matches, otherwise false</returns>
+ public override bool Match( ITest test )
+ {
+ if (topLevel && test.RunState == RunState.Explicit)
+ return false;
+
+ return !baseFilter.Pass( test );
+ }
+
+ /// <summary>
+ /// Determine whether any descendant of the test matches the filter criteria.
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if at least one descendant matches the filter criteria</returns>
+ protected override bool MatchDescendant(ITest test)
+ {
+ if (!test.HasChildren || test.Tests == null || topLevel && test.RunState == RunState.Explicit)
+ return false;
+
+ foreach (ITest child in test.Tests)
+ {
+ if (Match(child) || MatchDescendant(child))
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/OrFilter.cs b/external/guiunit/src/framework/Internal/Filters/OrFilter.cs
new file mode 100755
index 0000000..74171cb
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/OrFilter.cs
@@ -0,0 +1,111 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// Combines multiple filters so that a test must pass one
+ /// of them in order to pass this filter.
+ /// </summary>
+ [Serializable]
+ public class OrFilter : TestFilter
+ {
+#if CLR_2_0 || CLR_4_0
+ private List<ITestFilter> filters = new List<ITestFilter>();
+#else
+ private System.Collections.ArrayList filters = new System.Collections.ArrayList();
+#endif
+
+ /// <summary>
+ /// Constructs an empty OrFilter
+ /// </summary>
+ public OrFilter() { }
+
+ /// <summary>
+ /// Constructs an AndFilter from an array of filters
+ /// </summary>
+ /// <param name="filters"></param>
+ public OrFilter( params ITestFilter[] filters )
+ {
+ this.filters.AddRange( filters );
+ }
+
+ /// <summary>
+ /// Adds a filter to the list of filters
+ /// </summary>
+ /// <param name="filter">The filter to be added</param>
+ public void Add( ITestFilter filter )
+ {
+ this.filters.Add( filter );
+ }
+
+ /// <summary>
+ /// Return an array of the composing filters
+ /// </summary>
+ public ITestFilter[] Filters
+ {
+ get
+ {
+#if CLR_2_0 || CLR_4_0
+ return filters.ToArray();
+#else
+ return (ITestFilter[])filters.ToArray(typeof(ITestFilter));
+#endif
+ }
+ }
+
+ /// <summary>
+ /// Checks whether the OrFilter is matched by a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if any of the component filters pass, otherwise false</returns>
+ public override bool Pass( ITest test )
+ {
+ foreach( ITestFilter filter in filters )
+ if ( filter.Pass( test ) )
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Checks whether the OrFilter is matched by a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if any of the component filters match, otherwise false</returns>
+ public override bool Match( ITest test )
+ {
+ foreach( TestFilter filter in filters )
+ if ( filter.Match( test ) )
+ return true;
+
+ return false;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/SimpleCategoryExpression.cs b/external/guiunit/src/framework/Internal/Filters/SimpleCategoryExpression.cs
new file mode 100755
index 0000000..aa579ee
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/SimpleCategoryExpression.cs
@@ -0,0 +1,43 @@
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// SimpleCategoryFilter parses a basic string representing a
+ /// single category or a list of categories separated by commas
+ /// </summary>
+ public class SimpleCategoryExpression
+ {
+ private string text;
+
+ private TestFilter filter;
+
+ /// <summary>
+ /// Construct category filter from a text string
+ /// </summary>
+ /// <param name="text">A list of categories to parse</param>
+ public SimpleCategoryExpression(string text)
+ {
+ this.text = text;
+ }
+
+ /// <summary>
+ /// Gets the TestFilter represented by the expression
+ /// </summary>
+ public TestFilter Filter
+ {
+ get
+ {
+ if (filter == null)
+ {
+ filter = GetCategories();
+ }
+ return filter;
+ }
+ }
+
+ private TestFilter GetCategories()
+ {
+ string[] categories = text.Split(',');
+ return new CategoryFilter(categories);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Filters/SimpleNameFilter.cs b/external/guiunit/src/framework/Internal/Filters/SimpleNameFilter.cs
new file mode 100755
index 0000000..9945e3a
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Filters/SimpleNameFilter.cs
@@ -0,0 +1,98 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.Filters
+{
+ /// <summary>
+ /// SimpleName filter selects tests based on their name
+ /// </summary>
+ [Serializable]
+ public class SimpleNameFilter : TestFilter
+ {
+#if CLR_2_0 || CLR_4_0
+ private List<string> names = new List<string>();
+#else
+ private System.Collections.ArrayList names = new System.Collections.ArrayList();
+#endif
+
+ /// <summary>
+ /// Construct an empty SimpleNameFilter
+ /// </summary>
+ public SimpleNameFilter() { }
+
+ /// <summary>
+ /// Construct a SimpleNameFilter for a single name
+ /// </summary>
+ /// <param name="nameToAdd">The name the filter will recognize.</param>
+ public SimpleNameFilter(string nameToAdd)
+ {
+ Add(nameToAdd);
+ }
+
+ /// <summary>
+ /// Construct a SimpleNameFilter for an array of names
+ /// </summary>
+ /// <param name="namesToAdd">The names the filter will recognize.</param>
+ public SimpleNameFilter(string[] namesToAdd)
+ {
+ foreach (string name in namesToAdd)
+ Add(name);
+ }
+
+ /// <summary>
+ /// Add a name to a SimpleNameFilter
+ /// </summary>
+ /// <param name="name">The name to be added.</param>
+ public void Add(string name)
+ {
+ Guard.ArgumentNotNullOrEmpty(name, "name");
+
+ names.Add(name);
+ }
+
+ /// <summary>
+ /// Check whether the filter matches a test
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if it matches, otherwise false</returns>
+ public override bool Match( ITest test )
+ {
+ if (names.Contains (test.FullName))
+ return true;
+
+ while (test != null) {
+ if (names.Contains (test.FullName) && test.HasChildren)
+ return true;
+ test = test.Parent;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/IApplyToContext.cs b/external/guiunit/src/framework/Internal/IApplyToContext.cs
new file mode 100755
index 0000000..7d71e79
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/IApplyToContext.cs
@@ -0,0 +1,39 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The IApplyToContext interface is implemented by attributes
+ /// that want to make changes to the execution context before
+ /// a test is run.
+ /// </summary>
+ public interface IApplyToContext
+ {
+ /// <summary>
+ /// Apply changes to the execution context
+ /// </summary>
+ /// <param name="context">The execution context</param>
+ void ApplyToContext(TestExecutionContext context);
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/IApplyToTest.cs b/external/guiunit/src/framework/Internal/IApplyToTest.cs
new file mode 100755
index 0000000..2612280
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/IApplyToTest.cs
@@ -0,0 +1,40 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The IApplyToTest interface is implemented by self-applying
+ /// attributes that modify the state of a test in some way.
+ /// </summary>
+ public interface IApplyToTest
+ {
+ /// <summary>
+ /// Modifies a test as defined for the specific attribute.
+ /// </summary>
+ /// <param name="test">The test to modify</param>
+ void ApplyToTest(Test test);
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/InvalidTestFixtureException.cs b/external/guiunit/src/framework/Internal/InvalidTestFixtureException.cs
new file mode 100755
index 0000000..c17e92b
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/InvalidTestFixtureException.cs
@@ -0,0 +1,66 @@
+// ***********************************************************************
+// Copyright (c) 2006 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal
+{
+ using System;
+#if !NETCF
+ using System.Runtime.Serialization;
+#endif
+
+ /// <summary>
+ /// InvalidTestFixtureException is thrown when an appropriate test
+ /// fixture constructor using the provided arguments cannot be found.
+ /// </summary>
+ [Serializable]
+ public class InvalidTestFixtureException : Exception
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InvalidTestFixtureException"/> class.
+ /// </summary>
+ public InvalidTestFixtureException() : base() {}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InvalidTestFixtureException"/> class.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ public InvalidTestFixtureException(string message) : base(message)
+ {}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="InvalidTestFixtureException"/> class.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <param name="inner">The inner.</param>
+ public InvalidTestFixtureException(string message, Exception inner) : base(message, inner)
+ {}
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected InvalidTestFixtureException(SerializationInfo info,
+ StreamingContext context) : base(info,context){}
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/framework/Internal/MethodHelper.cs b/external/guiunit/src/framework/Internal/MethodHelper.cs
new file mode 100755
index 0000000..780eaf8
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/MethodHelper.cs
@@ -0,0 +1,226 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Reflection;
+using System.Text;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// MethodHelper provides static methods for working with methods.
+ /// </summary>
+ public class MethodHelper
+ {
+ /// <summary>
+ /// Gets the display name for a method as used by NUnit.
+ /// </summary>
+ /// <param name="method">The method for which a display name is needed.</param>
+ /// <param name="arglist">The arguments provided.</param>
+ /// <returns>The display name for the method</returns>
+ public static string GetDisplayName(MethodInfo method, object[] arglist)
+ {
+ StringBuilder sb = new StringBuilder(method.Name);
+
+#if CLR_2_0 || CLR_4_0
+ if (method.IsGenericMethod)
+ {
+ sb.Append("<");
+ int cnt = 0;
+ foreach (Type t in method.GetGenericArguments())
+ {
+ if (cnt++ > 0) sb.Append(",");
+ sb.Append(t.Name);
+ }
+ sb.Append(">");
+ }
+#endif
+
+ if (arglist != null)
+ {
+ sb.Append("(");
+
+ for (int i = 0; i < arglist.Length; i++)
+ {
+ if (i > 0) sb.Append(",");
+ sb.Append(GetDisplayString(arglist[i]));
+ }
+
+ sb.Append(")");
+ }
+
+ return sb.ToString();
+ }
+
+ private static string GetDisplayString(object arg)
+ {
+ string display = arg == null
+ ? "null"
+ : Convert.ToString(arg, System.Globalization.CultureInfo.InvariantCulture);
+
+ if (arg is double)
+ {
+ double d = (double)arg;
+
+ if (double.IsNaN(d))
+ display = "double.NaN";
+ else if (double.IsPositiveInfinity(d))
+ display = "double.PositiveInfinity";
+ else if (double.IsNegativeInfinity(d))
+ display = "double.NegativeInfinity";
+ else if (d == double.MaxValue)
+ display = "double.MaxValue";
+ else if (d == double.MinValue)
+ display = "double.MinValue";
+ else
+ {
+ if (display.IndexOf('.') == -1)
+ display += ".0";
+ display += "d";
+ }
+ }
+ else if (arg is float)
+ {
+ float f = (float)arg;
+
+ if (float.IsNaN(f))
+ display = "float.NaN";
+ else if (float.IsPositiveInfinity(f))
+ display = "float.PositiveInfinity";
+ else if (float.IsNegativeInfinity(f))
+ display = "float.NegativeInfinity";
+ else if (f == float.MaxValue)
+ display = "float.MaxValue";
+ else if (f == float.MinValue)
+ display = "float.MinValue";
+ else
+ {
+ if (display.IndexOf('.') == -1)
+ display += ".0";
+ display += "f";
+ }
+ }
+ else if (arg is decimal)
+ {
+ decimal d = (decimal)arg;
+ if (d == decimal.MinValue)
+ display = "decimal.MinValue";
+ else if (d == decimal.MaxValue)
+ display = "decimal.MaxValue";
+ else
+ display += "m";
+ }
+ else if (arg is long)
+ {
+ long l = (long)arg;
+ if (l == long.MinValue)
+ display = "long.MinValue";
+ else if (l == long.MinValue)
+ display = "long.MaxValue";
+ else
+ display += "L";
+ }
+ else if (arg is ulong)
+ {
+ ulong ul = (ulong)arg;
+ if (ul == ulong.MinValue)
+ display = "ulong.MinValue";
+ else if (ul == ulong.MinValue)
+ display = "ulong.MaxValue";
+ else
+ display += "UL";
+ }
+ else if (arg is string)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("\"");
+ foreach (char c in (string)arg)
+ sb.Append(EscapeControlChar(c));
+ sb.Append("\"");
+ display = sb.ToString();
+ }
+ else if (arg is char)
+ {
+ display = "\'" + EscapeControlChar((char)arg) + "\'";
+ }
+ else if (arg is int)
+ {
+ int ival = (int)arg;
+ if (ival == int.MaxValue)
+ display = "int.MaxValue";
+ else if (ival == int.MinValue)
+ display = "int.MinValue";
+ }
+
+ return display;
+ }
+
+ private static string EscapeControlChar(char c)
+ {
+ switch (c)
+ {
+ case '\'':
+ return "\\\'";
+ case '\"':
+ return "\\\"";
+ case '\\':
+ return "\\\\";
+ case '\0':
+ return "\\0";
+ case '\a':
+ return "\\a";
+ case '\b':
+ return "\\b";
+ case '\f':
+ return "\\f";
+ case '\n':
+ return "\\n";
+ case '\r':
+ return "\\r";
+ case '\t':
+ return "\\t";
+ case '\v':
+ return "\\v";
+
+ case '\x0085':
+ case '\x2028':
+ case '\x2029':
+ return string.Format("\\x{0:X4}", (int)c);
+
+ default:
+ return c.ToString();
+ }
+ }
+
+#if NET_4_5
+ /// <summary>
+ /// Returns true if the method specified by the argument
+ /// is an async method.
+ /// </summary>
+ public static bool IsAsyncMethod(MethodInfo method)
+ {
+ return method.IsDefined(typeof(System.Runtime.CompilerServices.AsyncStateMachineAttribute));
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/NUnitException.cs b/external/guiunit/src/framework/Internal/NUnitException.cs
new file mode 100755
index 0000000..2665b54
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/NUnitException.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal
+{
+ using System;
+#if !NETCF
+ using System.Runtime.Serialization;
+#endif
+
+ /// <summary>
+ /// Thrown when an assertion failed. Here to preserve the inner
+ /// exception and hence its stack trace.
+ /// </summary>
+ [Serializable]
+ public class NUnitException : Exception
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NUnitException"/> class.
+ /// </summary>
+ public NUnitException () : base()
+ {}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NUnitException"/> class.
+ /// </summary>
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ public NUnitException(string message) : base (message)
+ {}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NUnitException"/> class.
+ /// </summary>
+ /// <param name="message">The error message that explains
+ /// the reason for the exception</param>
+ /// <param name="inner">The exception that caused the
+ /// current exception</param>
+ public NUnitException(string message, Exception inner) :
+ base(message, inner)
+ {}
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Serialization Constructor
+ /// </summary>
+ protected NUnitException(SerializationInfo info,
+ StreamingContext context) : base(info,context){}
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyBuilder.cs b/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyBuilder.cs
new file mode 100755
index 0000000..a4ce58c
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyBuilder.cs
@@ -0,0 +1,192 @@
+using System;
+using System.Collections;
+using System.IO;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Builders;
+using NUnit.Framework.Extensibility;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite
+ /// containing test fixtures present in the assembly.
+ /// </summary>
+ public class NUnitLiteTestAssemblyBuilder : ITestAssemblyBuilder
+ {
+ #region Instance Fields
+
+ /// <summary>
+ /// The loaded assembly
+ /// </summary>
+ Assembly assembly;
+
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NUnitLiteTestAssemblyBuilder"/> class.
+ /// </summary>
+ public NUnitLiteTestAssemblyBuilder()
+ {
+ }
+
+ #endregion
+
+ #region Build Methods
+ /// <summary>
+ /// Build a suite of tests from a provided assembly
+ /// </summary>
+ /// <param name="assembly">The assembly from which tests are to be built</param>
+ /// <param name="options">A dictionary of options to use in building the suite</param>
+ /// <returns>
+ /// A TestSuite containing the tests found in the assembly
+ /// </returns>
+ public TestSuite Build(Assembly assembly, IDictionary options)
+ {
+ this.assembly = assembly;
+
+ IList fixtureNames = options["LOAD"] as IList;
+
+ IList fixtures = GetFixtures(assembly, fixtureNames);
+
+ if (fixtures.Count > 0)
+ {
+ AssemblyName assemblyName = AssemblyHelper.GetAssemblyName(assembly);
+ return BuildTestAssembly(assemblyName.Name, fixtures);
+ }
+
+ return null;
+ }
+
+ /// <summary>
+ /// Build a suite of tests given the filename of an assembly
+ /// </summary>
+ /// <param name="assemblyName">The filename of the assembly from which tests are to be built</param>
+ /// <param name="options">A dictionary of options to use in building the suite</param>
+ /// <returns>
+ /// A TestSuite containing the tests found in the assembly
+ /// </returns>
+ public TestSuite Build(string assemblyName, IDictionary options)
+ {
+ this.assembly = Load(assemblyName);
+ if (assembly == null) return null;
+
+ IList fixtureNames = options["LOAD"] as IList;
+
+ IList fixtures = GetFixtures(assembly, fixtureNames);
+ if (fixtures.Count > 0)
+ return BuildTestAssembly(assemblyName, fixtures);
+
+ return null;
+ }
+ #endregion
+
+ #region Helper Methods
+
+ private Assembly Load(string path)
+ {
+#if NETCF || SILVERLIGHT
+ return Assembly.Load(path);
+#else
+ // Throws if this isn't a managed assembly or if it was built
+ // with a later version of the same assembly.
+ AssemblyName assemblyName = AssemblyName.GetAssemblyName(Path.GetFileName(path));
+
+ return Assembly.Load(assemblyName);
+#endif
+ }
+
+ private IList GetFixtures(Assembly assembly, IList names)
+ {
+ ObjectList fixtures = new ObjectList();
+
+ IList testTypes = GetCandidateFixtureTypes(assembly, names);
+
+ foreach (Type testType in testTypes)
+ {
+ if (TestFixtureBuilder.CanBuildFrom(testType))
+ fixtures.Add(TestFixtureBuilder.BuildFrom(testType));
+ }
+
+ return fixtures;
+ }
+
+ private IList GetCandidateFixtureTypes(Assembly assembly, IList names)
+ {
+ IList types = assembly.GetTypes();
+
+ if (names == null || names.Count == 0)
+ return types;
+
+ ObjectList result = new ObjectList();
+
+ foreach (string name in names)
+ {
+ Type fixtureType = assembly.GetType(name);
+ if (fixtureType != null)
+ result.Add(fixtureType);
+ else
+ {
+ string prefix = name + ".";
+
+ foreach (Type type in types)
+ if (type.FullName.StartsWith(prefix))
+ result.Add(type);
+ }
+ }
+
+ return result;
+ }
+
+ private TestSuite BuildFromFixtureType(string assemblyName, Type testType)
+ {
+ ISuiteBuilder testFixtureBuilder = new NUnitTestFixtureBuilder();
+
+ // TODO: This is the only situation in which we currently
+ // recognize and load legacy suites. We need to determine
+ // whether to allow them in more places.
+ //if (legacySuiteBuilder.CanBuildFrom(testType))
+ // return (TestSuite)legacySuiteBuilder.BuildFrom(testType);
+ //else
+ if (testFixtureBuilder.CanBuildFrom(testType))
+ return BuildTestAssembly(assemblyName,
+ new Test[] { testFixtureBuilder.BuildFrom(testType) });
+ return null;
+ }
+
+ private TestSuite BuildTestAssembly(string assemblyName, IList fixtures)
+ {
+ TestSuite testAssembly = new TestAssembly(this.assembly, assemblyName);
+
+ //NamespaceTreeBuilder treeBuilder =
+ // new NamespaceTreeBuilder(testAssembly);
+ //treeBuilder.Add(fixtures);
+ //testAssembly = treeBuilder.RootSuite;
+
+ foreach (Test fixture in fixtures)
+ testAssembly.Add(fixture);
+
+ if (fixtures.Count == 0)
+ {
+ testAssembly.RunState = RunState.NotRunnable;
+ testAssembly.Properties.Set(PropertyNames.SkipReason, "Has no TestFixtures");
+ }
+
+ testAssembly.ApplyAttributesToTest(assembly);
+
+#if !SILVERLIGHT
+ testAssembly.Properties.Set(PropertyNames.ProcessID, System.Diagnostics.Process.GetCurrentProcess().Id);
+#endif
+ testAssembly.Properties.Set(PropertyNames.AppDomain, AppDomain.CurrentDomain.FriendlyName);
+
+
+ // TODO: Make this an option? Add Option to sort assemblies as well?
+ testAssembly.Sort();
+
+ return testAssembly;
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyRunner.cs b/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyRunner.cs
new file mode 100755
index 0000000..716ad1e
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/NUnitLiteTestAssemblyRunner.cs
@@ -0,0 +1,143 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal.WorkItems;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Default implementation of ITestAssemblyRunner
+ /// </summary>
+ public class NUnitLiteTestAssemblyRunner : ITestAssemblyRunner
+ {
+ private IDictionary settings;
+ private ITestAssemblyBuilder builder;
+ private TestSuite loadedTest;
+ //private Thread runThread;
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NUnitLiteTestAssemblyRunner"/> class.
+ /// </summary>
+ /// <param name="builder">The builder.</param>
+ public NUnitLiteTestAssemblyRunner(ITestAssemblyBuilder builder)
+ {
+ this.builder = builder;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// TODO: Documentation needed for property
+ /// </summary>
+ public ITest LoadedTest
+ {
+ get
+ {
+ return this.loadedTest;
+ }
+ }
+
+ #endregion
+
+ #region Methods
+
+ /// <summary>
+ /// Loads the tests found in an Assembly
+ /// </summary>
+ /// <param name="assemblyName">File name of the assembly to load</param>
+ /// <param name="settings">Dictionary of option settings for loading the assembly</param>
+ /// <returns>True if the load was successful</returns>
+ public bool Load(string assemblyName, IDictionary settings)
+ {
+ this.settings = settings;
+ this.loadedTest = this.builder.Build(assemblyName, settings);
+ if (loadedTest == null) return false;
+
+ return true;
+ }
+
+ /// <summary>
+ /// Loads the tests found in an Assembly
+ /// </summary>
+ /// <param name="assembly">The assembly to load</param>
+ /// <param name="settings">Dictionary of option settings for loading the assembly</param>
+ /// <returns>True if the load was successful</returns>
+ public bool Load(Assembly assembly, IDictionary settings)
+ {
+ this.settings = settings;
+ this.loadedTest = this.builder.Build(assembly, settings);
+ if (loadedTest == null) return false;
+
+ return true;
+ }
+
+ ///// <summary>
+ ///// Count Test Cases using a filter
+ ///// </summary>
+ ///// <param name="filter">The filter to apply</param>
+ ///// <returns>The number of test cases found</returns>
+ //public int CountTestCases(TestFilter filter)
+ //{
+ // return this.suite.CountTestCases(filter);
+ //}
+
+ /// <summary>
+ /// Run selected tests and return a test result. The test is run synchronously,
+ /// and the listener interface is notified as it progresses.
+ /// </summary>
+ /// <param name="listener">Interface to receive EventListener notifications.</param>
+ /// <param name="filter">A test filter used to select tests to be run</param>
+ /// <returns></returns>
+ public ITestResult Run(ITestListener listener, ITestFilter filter)
+ {
+ TestExecutionContext context = new TestExecutionContext();
+
+ if (this.settings.Contains("WorkDirectory"))
+ context.WorkDirectory = (string)this.settings["WorkDirectory"];
+ else
+#if NETCF || SILVERLIGHT
+ context.WorkDirectory = Env.DocumentFolder;
+#else
+ context.WorkDirectory = Environment.CurrentDirectory;
+#endif
+ context.Listener = listener;
+
+ WorkItem workItem = WorkItem.CreateWorkItem(loadedTest, context, filter);
+ workItem.Execute();
+
+ while (workItem.State != WorkItemState.Complete)
+ System.Threading.Thread.Sleep(5);
+ return workItem.Result;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/OSPlatform.cs b/external/guiunit/src/framework/Internal/OSPlatform.cs
new file mode 100755
index 0000000..0ced8cd
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/OSPlatform.cs
@@ -0,0 +1,386 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Runtime.InteropServices;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// OSPlatform represents a particular operating system platform
+ /// </summary>
+ public class OSPlatform
+ {
+ PlatformID platform;
+ Version version;
+ ProductType product;
+
+ #region Static Members
+ private static OSPlatform currentPlatform;
+
+
+ /// <summary>
+ /// Platform ID for Unix as defined by Microsoft .NET 2.0 and greater
+ /// </summary>
+ public static readonly PlatformID UnixPlatformID_Microsoft = (PlatformID)4;
+
+ /// <summary>
+ /// Platform ID for Unix as defined by Mono
+ /// </summary>
+ public static readonly PlatformID UnixPlatformID_Mono = (PlatformID)128;
+
+ /// <summary>
+ /// Get the OSPlatform under which we are currently running
+ /// </summary>
+ public static OSPlatform CurrentPlatform
+ {
+ get
+ {
+ if (currentPlatform == null)
+ {
+ OperatingSystem os = Environment.OSVersion;
+
+#if SILVERLIGHT
+ // TODO: Runtime silverlight detection?
+ currentPlatform = new OSPlatform(os.Platform, os.Version);
+#else
+ if (os.Platform == PlatformID.Win32NT && os.Version.Major >= 5)
+ {
+ OSVERSIONINFOEX osvi = new OSVERSIONINFOEX();
+ osvi.dwOSVersionInfoSize = (uint)Marshal.SizeOf(osvi);
+ GetVersionEx(ref osvi);
+ currentPlatform = new OSPlatform(os.Platform, os.Version, (ProductType)osvi.ProductType);
+ }
+ else
+ currentPlatform = new OSPlatform(os.Platform, os.Version);
+#endif
+ }
+
+ return currentPlatform;
+ }
+ }
+ #endregion
+
+ #region Members used for Win32NT platform only
+ /// <summary>
+ /// Product Type Enumeration used for Windows
+ /// </summary>
+ public enum ProductType
+ {
+ /// <summary>
+ /// Product type is unknown or unspecified
+ /// </summary>
+ Unknown,
+
+ /// <summary>
+ /// Product type is Workstation
+ /// </summary>
+ WorkStation,
+
+ /// <summary>
+ /// Product type is Domain Controller
+ /// </summary>
+ DomainController,
+
+ /// <summary>
+ /// Product type is Server
+ /// </summary>
+ Server,
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct OSVERSIONINFOEX
+ {
+ public uint dwOSVersionInfoSize;
+ public uint dwMajorVersion;
+ public uint dwMinorVersion;
+ public uint dwBuildNumber;
+ public uint dwPlatformId;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string szCSDVersion;
+ public Int16 wServicePackMajor;
+ public Int16 wServicePackMinor;
+ public Int16 wSuiteMask;
+ public Byte ProductType;
+ public Byte Reserved;
+ }
+
+ [DllImport("Kernel32.dll")]
+ private static extern bool GetVersionEx(ref OSVERSIONINFOEX osvi);
+ #endregion
+
+ /// <summary>
+ /// Construct from a platform ID and version
+ /// </summary>
+ public OSPlatform(PlatformID platform, Version version)
+ {
+ this.platform = platform;
+ this.version = version;
+ }
+
+ /// <summary>
+ /// Construct from a platform ID, version and product type
+ /// </summary>
+ public OSPlatform(PlatformID platform, Version version, ProductType product)
+ : this( platform, version )
+ {
+ this.product = product;
+ }
+
+ /// <summary>
+ /// Get the platform ID of this instance
+ /// </summary>
+ public PlatformID Platform
+ {
+ get { return platform; }
+ }
+
+ /// <summary>
+ /// Get the Version of this instance
+ /// </summary>
+ public Version Version
+ {
+ get { return version; }
+ }
+
+ /// <summary>
+ /// Get the Product Type of this instance
+ /// </summary>
+ public ProductType Product
+ {
+ get { return product; }
+ }
+
+ /// <summary>
+ /// Return true if this is a windows platform
+ /// </summary>
+ public bool IsWindows
+ {
+ get
+ {
+ return platform == PlatformID.Win32NT
+ || platform == PlatformID.Win32Windows
+ || platform == PlatformID.Win32S
+ || platform == PlatformID.WinCE;
+ }
+ }
+
+ /// <summary>
+ /// Return true if this is a Unix or Linux platform
+ /// </summary>
+ public bool IsUnix
+ {
+ get
+ {
+ return platform == UnixPlatformID_Microsoft
+ || platform == UnixPlatformID_Mono;
+ }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Win32S
+ /// </summary>
+ public bool IsWin32S
+ {
+ get { return platform == PlatformID.Win32S; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Win32Windows
+ /// </summary>
+ public bool IsWin32Windows
+ {
+ get { return platform == PlatformID.Win32Windows; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Win32NT
+ /// </summary>
+ public bool IsWin32NT
+ {
+ get { return platform == PlatformID.Win32NT; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows CE
+ /// </summary>
+ public bool IsWinCE
+ {
+ get { return (int)platform == 3; } // PlatformID.WinCE not defined in .NET 1.0
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ /// <summary>
+ /// Return true if the platform is Xbox
+ /// </summary>
+ public bool IsXbox
+ {
+ get { return platform == PlatformID.Xbox; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is MacOSX
+ /// </summary>
+ public bool IsMacOSX
+ {
+ get { return platform == PlatformID.MacOSX; }
+ }
+#endif
+
+ /// <summary>
+ /// Return true if the platform is Windows 95
+ /// </summary>
+ public bool IsWin95
+ {
+ get { return platform == PlatformID.Win32Windows && version.Major == 4 && version.Minor == 0; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 98
+ /// </summary>
+ public bool IsWin98
+ {
+ get { return platform == PlatformID.Win32Windows && version.Major == 4 && version.Minor == 10; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows ME
+ /// </summary>
+ public bool IsWinME
+ {
+ get { return platform == PlatformID.Win32Windows && version.Major == 4 && version.Minor == 90; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is NT 3
+ /// </summary>
+ public bool IsNT3
+ {
+ get { return platform == PlatformID.Win32NT && version.Major == 3; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is NT 4
+ /// </summary>
+ public bool IsNT4
+ {
+ get { return platform == PlatformID.Win32NT && version.Major == 4; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is NT 5
+ /// </summary>
+ public bool IsNT5
+ {
+ get { return platform == PlatformID.Win32NT && version.Major == 5; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2000
+ /// </summary>
+ public bool IsWin2K
+ {
+ get { return IsNT5 && version.Minor == 0; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows XP
+ /// </summary>
+ public bool IsWinXP
+ {
+ get { return IsNT5 && (version.Minor == 1 || version.Minor == 2 && Product == ProductType.WorkStation); }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2003 Server
+ /// </summary>
+ public bool IsWin2003Server
+ {
+ get { return IsNT5 && version.Minor == 2 && Product == ProductType.Server; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is NT 6
+ /// </summary>
+ public bool IsNT6
+ {
+ get { return platform == PlatformID.Win32NT && version.Major == 6; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Vista
+ /// </summary>
+ public bool IsVista
+ {
+ get { return IsNT6 && version.Minor == 0 && Product == ProductType.WorkStation; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2008 Server (original or R2)
+ /// </summary>
+ public bool IsWin2008Server
+ {
+ get { return IsNT6 && Product == ProductType.Server; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2008 Server (original)
+ /// </summary>
+ public bool IsWin2008ServerR1
+ {
+ get { return IsNT6 && version.Minor == 0 && Product == ProductType.Server; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2008 Server R2
+ /// </summary>
+ public bool IsWin2008ServerR2
+ {
+ get { return IsNT6 && version.Minor == 1 && Product == ProductType.Server; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 2012 Server
+ /// </summary>
+ public bool IsWin2012Server
+ {
+ get { return IsNT6 && version.Minor == 2 && Product == ProductType.Server; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 7
+ /// </summary>
+ public bool IsWindows7
+ {
+ get { return IsNT6 && version.Minor == 1 && Product == ProductType.WorkStation; }
+ }
+
+ /// <summary>
+ /// Return true if the platform is Windows 8
+ /// </summary>
+ public bool IsWindows8
+ {
+ get { return IsNT6 && version.Minor == 8 && Product == ProductType.WorkStation; }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/ParameterSet.cs b/external/guiunit/src/framework/Internal/ParameterSet.cs
new file mode 100755
index 0000000..68277eb
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/ParameterSet.cs
@@ -0,0 +1,219 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// ParameterSet encapsulates method arguments and
+ /// other selected parameters needed for constructing
+ /// a parameterized test case.
+ /// </summary>
+ public class ParameterSet : ITestCaseData, IApplyToTest
+ {
+ #region Instance Fields
+
+ private object[] arguments;
+ private object[] originalArguments;
+ private object result;
+ private bool hasExpectedResult;
+ private ExpectedExceptionData exceptionData;
+
+ /// <summary>
+ /// A dictionary of properties, used to add information
+ /// to tests without requiring the class to change.
+ /// </summary>
+ private IPropertyBag properties;
+
+ #endregion
+
+ #region Properties
+
+ private RunState runState;
+ /// <summary>
+ /// The RunState for this set of parameters.
+ /// </summary>
+ public RunState RunState
+ {
+ get { return runState; }
+ set { runState = value; }
+ }
+
+ /// <summary>
+ /// The arguments to be used in running the test,
+ /// which must match the method signature.
+ /// </summary>
+ public object[] Arguments
+ {
+ get { return arguments; }
+ set
+ {
+ arguments = value;
+
+ if (originalArguments == null)
+ originalArguments = value;
+ }
+ }
+
+ /// <summary>
+ /// The original arguments provided by the user,
+ /// used for display purposes.
+ /// </summary>
+ public object[] OriginalArguments
+ {
+ get { return originalArguments; }
+ }
+
+ /// <summary>
+ /// Gets a flag indicating whether an exception is expected.
+ /// </summary>
+ public bool ExceptionExpected
+ {
+ get { return exceptionData.ExpectedExceptionName != null; }
+ }
+
+ /// <summary>
+ /// Data about any expected exception
+ /// </summary>
+ public ExpectedExceptionData ExceptionData
+ {
+ get { return exceptionData; }
+ }
+
+ /// <summary>
+ /// The expected result of the test, which
+ /// must match the method return type.
+ /// </summary>
+ public object ExpectedResult
+ {
+ get { return result; }
+ set
+ {
+ result = value;
+ hasExpectedResult = true;
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether an expected result was specified.
+ /// </summary>
+ public bool HasExpectedResult
+ {
+ get { return hasExpectedResult; }
+ }
+
+ private string testName;
+ /// <summary>
+ /// A name to be used for this test case in lieu
+ /// of the standard generated name containing
+ /// the argument list.
+ /// </summary>
+ public string TestName
+ {
+ get { return testName; }
+ set { testName = value; }
+ }
+
+ /// <summary>
+ /// Gets the property dictionary for this test
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get
+ {
+ if (properties == null)
+ properties = new PropertyBag();
+
+ return properties;
+ }
+ }
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Construct a non-runnable ParameterSet, specifying
+ /// the provider exception that made it invalid.
+ /// </summary>
+ public ParameterSet(Exception exception)
+ {
+ this.RunState = RunState.NotRunnable;
+ this.Properties.Set(PropertyNames.SkipReason, ExceptionHelper.BuildMessage(exception));
+ this.Properties.Set(PropertyNames.ProviderStackTrace, ExceptionHelper.BuildStackTrace(exception));
+ }
+
+ /// <summary>
+ /// Construct an empty parameter set, which
+ /// defaults to being Runnable.
+ /// </summary>
+ public ParameterSet()
+ {
+ this.RunState = RunState.Runnable;
+ }
+
+ /// <summary>
+ /// Construct a ParameterSet from an object implementing ITestCaseData
+ /// </summary>
+ /// <param name="data"></param>
+ public ParameterSet(ITestCaseData data)
+ {
+ this.TestName = data.TestName;
+ this.RunState = data.RunState;
+ this.Arguments = data.Arguments;
+ this.exceptionData = data.ExceptionData;
+
+ if (data.HasExpectedResult)
+ this.ExpectedResult = data.ExpectedResult;
+
+ foreach (string key in data.Properties.Keys)
+ this.Properties[key] = data.Properties[key];
+ }
+
+ #endregion
+
+ #region IApplyToTest Members
+
+ /// <summary>
+ /// Applies ParameterSet values to the test itself.
+ /// </summary>
+ /// <param name="test">A test.</param>
+ public void ApplyToTest(Test test)
+ {
+ if (this.RunState != RunState.Runnable)
+ test.RunState = this.RunState;
+
+ foreach (string key in Properties.Keys)
+ foreach (object value in Properties[key])
+ test.Properties.Add(key, value);
+
+ TestMethod testMethod = test as TestMethod;
+ if (testMethod != null && exceptionData.ExpectedExceptionName != null)
+ testMethod.CustomDecorators.Add(new ExpectedExceptionDecorator(this.ExceptionData));
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/PlatformHelper.cs b/external/guiunit/src/framework/Internal/PlatformHelper.cs
new file mode 100755
index 0000000..9ff4fa7
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/PlatformHelper.cs
@@ -0,0 +1,298 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// PlatformHelper class is used by the PlatformAttribute class to
+ /// determine whether a platform is supported.
+ /// </summary>
+ public class PlatformHelper
+ {
+ private OSPlatform os;
+ private RuntimeFramework rt;
+
+ // Set whenever we fail to support a list of platforms
+ private string reason = string.Empty;
+
+ /// <summary>
+ /// Comma-delimited list of all supported OS platform constants
+ /// </summary>
+ public static readonly string OSPlatforms =
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ "Win,Win32,Win32S,Win32NT,Win32Windows,WinCE,Win95,Win98,WinMe,NT3,NT4,NT5,NT6,Win2K,WinXP,Win2003Server,Vista,Win2008Server,Win2008ServerR2,Win2012Server,Windows7,Windows8,Unix,Linux,Xbox,MacOSX";
+#else
+ "Win,Win32,Win32S,Win32NT,Win32Windows,WinCE,Win95,Win98,WinMe,NT3,NT4,NT5,NT6,Win2K,WinXP,Win2003Server,Vista,Win2008Server,Win2008ServerR2,Win2012Server,Windows7,Windows8,Unix,Linux";
+#endif
+
+ /// <summary>
+ /// Comma-delimited list of all supported Runtime platform constants
+ /// </summary>
+ public static readonly string RuntimePlatforms =
+ "Net,NetCF,SSCLI,Rotor,Mono,MonoTouch";
+
+ /// <summary>
+ /// Default constructor uses the operating system and
+ /// common language runtime of the system.
+ /// </summary>
+ public PlatformHelper()
+ {
+ this.os = OSPlatform.CurrentPlatform;
+ this.rt = RuntimeFramework.CurrentFramework;
+ }
+
+ /// <summary>
+ /// Contruct a PlatformHelper for a particular operating
+ /// system and common language runtime. Used in testing.
+ /// </summary>
+ /// <param name="os">OperatingSystem to be used</param>
+ /// <param name="rt">RuntimeFramework to be used</param>
+ public PlatformHelper( OSPlatform os, RuntimeFramework rt )
+ {
+ this.os = os;
+ this.rt = rt;
+ }
+
+ /// <summary>
+ /// Test to determine if one of a collection of platforms
+ /// is being used currently.
+ /// </summary>
+ /// <param name="platforms"></param>
+ /// <returns></returns>
+ public bool IsPlatformSupported( string[] platforms )
+ {
+ foreach( string platform in platforms )
+ if ( IsPlatformSupported( platform ) )
+ return true;
+
+ return false;
+ }
+
+ /// <summary>
+ /// Tests to determine if the current platform is supported
+ /// based on a platform attribute.
+ /// </summary>
+ /// <param name="platformAttribute">The attribute to examine</param>
+ /// <returns></returns>
+ public bool IsPlatformSupported( PlatformAttribute platformAttribute )
+ {
+ string include = platformAttribute.Include;
+ string exclude = platformAttribute.Exclude;
+
+ try
+ {
+ if (include != null && !IsPlatformSupported(include))
+ {
+ reason = string.Format("Only supported on {0}", include);
+ return false;
+ }
+
+ if (exclude != null && IsPlatformSupported(exclude))
+ {
+ reason = string.Format("Not supported on {0}", exclude);
+ return false;
+ }
+ }
+ catch (Exception ex)
+ {
+ reason = ex.Message;
+ return false;
+ }
+
+ return true;
+ }
+
+ /// <summary>
+ /// Test to determine if the a particular platform or comma-
+ /// delimited set of platforms is in use.
+ /// </summary>
+ /// <param name="platform">Name of the platform or comma-separated list of platform names</param>
+ /// <returns>True if the platform is in use on the system</returns>
+ public bool IsPlatformSupported( string platform )
+ {
+ if ( platform.IndexOf( ',' ) >= 0 )
+ return IsPlatformSupported( platform.Split( new char[] { ',' } ) );
+
+ string platformName = platform.Trim();
+ bool isSupported = false;
+
+// string versionSpecification = null;
+//
+// string[] parts = platformName.Split( new char[] { '-' } );
+// if ( parts.Length == 2 )
+// {
+// platformName = parts[0];
+// versionSpecification = parts[1];
+// }
+
+ switch( platformName.ToUpper() )
+ {
+ case "WIN":
+ case "WIN32":
+ isSupported = os.IsWindows;
+ break;
+ case "WIN32S":
+ isSupported = os.IsWin32S;
+ break;
+ case "WIN32WINDOWS":
+ isSupported = os.IsWin32Windows;
+ break;
+ case "WIN32NT":
+ isSupported = os.IsWin32NT;
+ break;
+ case "WINCE":
+ isSupported = os.IsWinCE;
+ break;
+ case "WIN95":
+ isSupported = os.IsWin95;
+ break;
+ case "WIN98":
+ isSupported = os.IsWin98;
+ break;
+ case "WINME":
+ isSupported = os.IsWinME;
+ break;
+ case "NT3":
+ isSupported = os.IsNT3;
+ break;
+ case "NT4":
+ isSupported = os.IsNT4;
+ break;
+ case "NT5":
+ isSupported = os.IsNT5;
+ break;
+ case "WIN2K":
+ isSupported = os.IsWin2K;
+ break;
+ case "WINXP":
+ isSupported = os.IsWinXP;
+ break;
+ case "WIN2003SERVER":
+ isSupported = os.IsWin2003Server;
+ break;
+ case "NT6":
+ isSupported = os.IsNT6;
+ break;
+ case "VISTA":
+ isSupported = os.IsVista;
+ break;
+ case "WIN2008SERVER":
+ isSupported = os.IsWin2008Server;
+ break;
+ case "WIN2008SERVERR2":
+ isSupported = os.IsWin2008ServerR2;
+ break;
+ case "WIN2012SERVER":
+ isSupported = os.IsWin2012Server;
+ break;
+ case "WINDOWS7":
+ isSupported = os.IsWindows7;
+ break;
+ case "WINDOWS8":
+ isSupported = os.IsWindows8;
+ break;
+ case "UNIX":
+ case "LINUX":
+ isSupported = os.IsUnix;
+ break;
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ case "XBOX":
+ isSupported = os.IsXbox;
+ break;
+ case "MACOSX":
+ isSupported = os.IsMacOSX;
+ break;
+#endif
+
+ default:
+ isSupported = IsRuntimeSupported(platformName);
+ break;
+ }
+
+ if (!isSupported)
+ this.reason = "Only supported on " + platform;
+
+ return isSupported;
+ }
+
+ /// <summary>
+ /// Return the last failure reason. Results are not
+ /// defined if called before IsSupported( Attribute )
+ /// is called.
+ /// </summary>
+ public string Reason
+ {
+ get { return reason; }
+ }
+
+ private bool IsRuntimeSupported(string platformName)
+ {
+ string versionSpecification = null;
+ string[] parts = platformName.Split(new char[] { '-' });
+ if (parts.Length == 2)
+ {
+ platformName = parts[0];
+ versionSpecification = parts[1];
+ }
+
+ switch (platformName.ToUpper())
+ {
+ case "NET":
+ return IsRuntimeSupported(RuntimeType.Net, versionSpecification);
+
+ case "NETCF":
+ return IsRuntimeSupported(RuntimeType.NetCF, versionSpecification);
+
+ case "SSCLI":
+ case "ROTOR":
+ return IsRuntimeSupported(RuntimeType.SSCLI, versionSpecification);
+
+ case "MONO":
+ return IsRuntimeSupported(RuntimeType.Mono, versionSpecification);
+
+ case "SL":
+ case "SILVERLIGHT":
+ return IsRuntimeSupported(RuntimeType.Silverlight, versionSpecification);
+
+ case "MONOTOUCH":
+ return IsRuntimeSupported(RuntimeType.MonoTouch, versionSpecification);
+
+ default:
+ throw new ArgumentException("Invalid platform name", platformName);
+ }
+ }
+
+ private bool IsRuntimeSupported(RuntimeType runtime, string versionSpecification)
+ {
+ Version version = versionSpecification == null
+ ? RuntimeFramework.DefaultVersion
+ : new Version(versionSpecification);
+
+ RuntimeFramework target = new RuntimeFramework(runtime, version);
+
+ return rt.Supports(target);
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/PropertyBag.cs b/external/guiunit/src/framework/Internal/PropertyBag.cs
new file mode 100755
index 0000000..7557957
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/PropertyBag.cs
@@ -0,0 +1,462 @@
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// A PropertyBag represents a collection of name value pairs
+ /// that allows duplicate entries with the same key. Methods
+ /// are provided for adding a new pair as well as for setting
+ /// a key to a single value. All keys are strings but values
+ /// may be of any type. Null values are not permitted, since
+ /// a null entry represents the absence of the key.
+ /// </summary>
+ public class PropertyBag : IPropertyBag
+ {
+#if CLR_2_0 || CLR_4_0
+ private Dictionary<string, IList> inner = new Dictionary<string, IList>();
+
+ private bool TryGetValue(string key, out IList list)
+ {
+ return inner.TryGetValue(key, out list);
+ }
+#else
+ private Hashtable inner = new Hashtable();
+
+ private bool TryGetValue(string key, out IList list)
+ {
+ list = inner.ContainsKey(key)
+ ? (IList)inner[key]
+ : null;
+
+ return list != null;
+ }
+#endif
+
+ /// <summary>
+ /// Adds a key/value pair to the property set
+ /// </summary>
+ /// <param name="key">The key</param>
+ /// <param name="value">The value</param>
+ public void Add(string key, object value)
+ {
+ IList list;
+ if (!TryGetValue(key, out list))
+ {
+ list = new ObjectList();
+ inner.Add(key, list);
+ }
+ list.Add(value);
+ }
+
+ /// <summary>
+ /// Sets the value for a key, removing any other
+ /// values that are already in the property set.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ public void Set(string key, object value)
+ {
+ IList list = new ObjectList();
+ list.Add(value);
+ inner[key] = list;
+ }
+
+ /// <summary>
+ /// Gets a single value for a key, using the first
+ /// one if multiple values are present and returning
+ /// null if the value is not found.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <returns></returns>
+ public object Get(string key)
+ {
+ IList list;
+ return TryGetValue(key, out list) && list.Count > 0
+ ? list[0]
+ : null;
+ }
+
+ /// <summary>
+ /// Gets a single boolean value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="defaultValue"></param>
+ /// <returns></returns>
+ public bool GetSetting(string key, bool defaultValue)
+ {
+ object value = Get(key);
+ return value == null
+ ? defaultValue
+ : (bool)value;
+ }
+
+ /// <summary>
+ /// Gets a single string value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="defaultValue"></param>
+ /// <returns></returns>
+ public string GetSetting(string key, string defaultValue)
+ {
+ object value = Get(key);
+ return value == null
+ ? defaultValue
+ : (string)value;
+ }
+
+ /// <summary>
+ /// Gets a single int value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="defaultValue"></param>
+ /// <returns></returns>
+ public int GetSetting(string key, int defaultValue)
+ {
+ object value = Get(key);
+ return value == null
+ ? defaultValue
+ : (int)value;
+ }
+
+ /// <summary>
+ /// Gets a single Enum value for a key, using the first
+ /// one if multiple values are present and returning the
+ /// default value if no entry is found.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="defaultValue"></param>
+ /// <returns></returns>
+ public Enum GetSetting(string key, Enum defaultValue)
+ {
+ object value = Get(key);
+ return value == null
+ ? defaultValue
+ : (Enum)value;
+ }
+
+ /// <summary>
+ /// Clears this instance.
+ /// </summary>
+ public void Clear()
+ {
+ inner.Clear();
+ }
+
+ /// <summary>
+ /// Removes all entries for a key from the property set
+ /// </summary>
+ /// <param name="key">The key for which the entries are to be removed</param>
+ public void Remove(string key)
+ {
+ inner.Remove(key);
+ }
+
+ /// <summary>
+ /// Removes a single entry if present. If not found,
+ /// no error occurs.
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ public void Remove(string key, object value)
+ {
+ IList list;
+ if (TryGetValue(key, out list))
+ list.Remove(value);
+ }
+
+ /// <summary>
+ /// Removes a specific PropertyEntry. If the entry is not
+ /// found, no errr occurs.
+ /// </summary>
+ /// <param name="entry">The property entry to remove</param>
+ public void Remove(PropertyEntry entry)
+ {
+ Remove(entry.Name, entry.Value);
+ }
+
+ /// <summary>
+ /// Get the number of key/value pairs in the property set
+ /// </summary>
+ /// <value></value>
+ public int Count
+ {
+ get
+ {
+ int count = 0;
+
+ foreach (string key in inner.Keys)
+ count += ((IList)inner[key]).Count;
+
+ return count;
+ }
+ }
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key has
+ /// any entries in the property set.
+ /// </summary>
+ /// <param name="key">The key to be checked</param>
+ /// <returns>
+ /// True if their are values present, otherwise false
+ /// </returns>
+ public bool ContainsKey(string key)
+ {
+ return inner.ContainsKey(key);
+ }
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key and
+ /// value are present in the property set.
+ /// </summary>
+ /// <param name="key">The key to be checked</param>
+ /// <param name="value">The value to be checked</param>
+ /// <returns>
+ /// True if the key and value are present, otherwise false
+ /// </returns>
+ public bool Contains(string key, object value)
+ {
+ IList list;
+ return TryGetValue(key, out list) && list.Contains(value);
+ }
+
+ /// <summary>
+ /// Gets a flag indicating whether the specified key and
+ /// value are present in the property set.
+ /// </summary>
+ /// <param name="entry">The property entry to be checked</param>
+ /// <returns>
+ /// True if the entry is present, otherwise false
+ /// </returns>
+ public bool Contains(PropertyEntry entry)
+ {
+ return Contains(entry.Name, entry.Value);
+ }
+
+ /// <summary>
+ /// Gets a collection containing all the keys in the property set
+ /// </summary>
+ /// <value></value>
+#if CLR_2_0 || CLR_4_0
+ public ICollection<string> Keys
+#else
+ public ICollection Keys
+#endif
+ {
+ get { return inner.Keys; }
+ }
+
+ /// <summary>
+ /// Gets an enumerator for all properties in the property bag
+ /// </summary>
+ /// <returns></returns>
+ public IEnumerator GetEnumerator()
+ {
+ return new PropertyBagEnumerator(this);
+ }
+
+ /// <summary>
+ /// Gets or sets the list of values for a particular key
+ /// </summary>
+ public IList this[string key]
+ {
+ get
+ {
+ IList list;
+ if (!TryGetValue(key, out list))
+ {
+ list = new ObjectList();
+ inner.Add(key, list);
+ }
+ return list;
+ }
+ set
+ {
+ inner[key] = value;
+ }
+ }
+
+ #region IXmlNodeBuilder Members
+
+ /// <summary>
+ /// Returns an XmlNode representating the current PropertyBag.
+ /// </summary>
+ /// <param name="recursive">Not used</param>
+ /// <returns>An XmlNode representing the PropertyBag</returns>
+ public XmlNode ToXml(bool recursive)
+ {
+ //XmlResult topNode = XmlResult.CreateTopLevelElement("dummy");
+
+ XmlNode thisNode = AddToXml(new XmlNode("dummy"), recursive);
+
+ return thisNode;
+ }
+
+ /// <summary>
+ /// Returns an XmlNode representing the PropertyBag after
+ /// adding it as a child of the supplied parent node.
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">Not used</param>
+ /// <returns></returns>
+ public XmlNode AddToXml(XmlNode parentNode, bool recursive)
+ {
+ XmlNode properties = parentNode.AddElement("properties");
+
+ foreach (string key in Keys)
+ {
+ foreach (object value in this[key])
+ {
+ XmlNode prop = properties.AddElement("property");
+
+ // TODO: Format as string
+ prop.AddAttribute("name", key.ToString());
+ prop.AddAttribute("value", value.ToString());
+ }
+ }
+
+ return properties;
+ }
+
+ #endregion
+
+ #region Nested PropertyBagEnumerator Class
+
+ /// <summary>
+ /// TODO: Documentation needed for class
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class PropertyBagEnumerator : IEnumerator<PropertyEntry>
+ {
+ private IEnumerator<KeyValuePair<string, IList>> innerEnum;
+#else
+ public class PropertyBagEnumerator : IEnumerator
+ {
+ private IEnumerator innerEnum;
+#endif
+ private PropertyBag bag;
+ private IEnumerator valueEnum;
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="bag"></param>
+ public PropertyBagEnumerator(PropertyBag bag)
+ {
+ this.bag = bag;
+
+ Initialize();
+ }
+
+ private void Initialize()
+ {
+ innerEnum = bag.inner.GetEnumerator();
+ valueEnum = null;
+
+ if (innerEnum.MoveNext())
+ {
+#if CLR_2_0 || CLR_4_0
+ valueEnum = innerEnum.Current.Value.GetEnumerator();
+#else
+ DictionaryEntry entry = (DictionaryEntry)innerEnum.Current;
+ valueEnum = ((IList)entry.Value).GetEnumerator();
+#endif
+ }
+ }
+
+ private PropertyEntry GetCurrentEntry()
+ {
+ if (valueEnum == null)
+ throw new InvalidOperationException();
+
+#if CLR_2_0 || CLR_4_0
+ string key = innerEnum.Current.Key;
+#else
+ DictionaryEntry entry = (DictionaryEntry)innerEnum.Current;
+ string key = (string)entry.Key;
+#endif
+
+ object value = valueEnum.Current;
+
+ return new PropertyEntry(key, value);
+ }
+
+ #region IEnumerator<PropertyEntry> Members
+
+#if CLR_2_0 || CLR_4_0
+ PropertyEntry IEnumerator<PropertyEntry>.Current
+ {
+ get
+ {
+ return GetCurrentEntry();
+ }
+ }
+#endif
+
+ #endregion
+
+ #region IDisposable Members
+
+#if CLR_2_0 || CLR_4_0
+ void IDisposable.Dispose()
+ {
+ }
+#endif
+
+ #endregion
+
+ #region IEnumerator Members
+
+ object IEnumerator.Current
+ {
+ get
+ {
+ return GetCurrentEntry();
+ }
+ }
+
+ bool IEnumerator.MoveNext()
+ {
+ if (valueEnum == null)
+ return false;
+
+ while (!valueEnum.MoveNext())
+ {
+ if (!innerEnum.MoveNext())
+ {
+ valueEnum = null;
+ return false;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ valueEnum = innerEnum.Current.Value.GetEnumerator();
+#else
+ DictionaryEntry entry = (DictionaryEntry)innerEnum.Current;
+ valueEnum = ((IList)entry.Value).GetEnumerator();
+#endif
+ }
+
+ return true;
+ }
+
+ void IEnumerator.Reset()
+ {
+ Initialize();
+ }
+
+ #endregion
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/PropertyNames.cs b/external/guiunit/src/framework/Internal/PropertyNames.cs
new file mode 100755
index 0000000..13cc572
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/PropertyNames.cs
@@ -0,0 +1,102 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The PropertyNames class provides static constants for the
+ /// standard property names that NUnit uses on tests.
+ /// </summary>
+ public class PropertyNames
+ {
+ /// <summary>
+ /// The Description of a test
+ /// </summary>
+ public static readonly string Description = "Description";
+
+ /// <summary>
+ /// The reason a test was not run
+ /// </summary>
+ public static readonly string SkipReason = "_SKIPREASON";
+
+ /// <summary>
+ /// The stack trace from any data provider that threw
+ /// an exception.
+ /// </summary>
+ public static readonly string ProviderStackTrace = "_PROVIDERSTACKTRACE";
+
+ /// <summary>
+ /// The culture to be set for a test
+ /// </summary>
+ public static readonly string SetCulture = "SetCulture";
+
+ /// <summary>
+ /// The UI culture to be set for a test
+ /// </summary>
+ public static readonly string SetUICulture = "SetUICulture";
+
+ /// <summary>
+ /// The categories applying to a test
+ /// </summary>
+ public static readonly string Category = "Category";
+
+#if !NUNITLITE
+ /// <summary>
+ /// The ApartmentState required for running the test
+ /// </summary>
+ public static readonly string ApartmentState = "ApartmentState";
+#endif
+
+ /// <summary>
+ /// The timeout value for the test
+ /// </summary>
+ public static readonly string Timeout = "Timeout";
+
+ /// <summary>
+ /// The number of times the test should be repeated
+ /// </summary>
+ public static readonly string RepeatCount = "Repeat";
+
+ /// <summary>
+ /// The maximum time in ms, above which the test is considered to have failed
+ /// </summary>
+ public static readonly string MaxTime = "MaxTime";
+
+ /// <summary>
+ /// The selected strategy for joining parameter data into test cases
+ /// </summary>
+ public static readonly string JoinType = "_JOINTYPE";
+
+ /// <summary>
+ /// The process ID of the executing assembly
+ /// </summary>
+ public static readonly string ProcessID = "_PID";
+
+ /// <summary>
+ /// The FriendlyName of the AppDomain in which the assembly is running
+ /// </summary>
+ public static readonly string AppDomain = "_APPDOMAIN";
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/RandomGenerator.cs b/external/guiunit/src/framework/Internal/RandomGenerator.cs
new file mode 100755
index 0000000..4b37287
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/RandomGenerator.cs
@@ -0,0 +1,196 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// RandomGenerator returns a set of random values in a repeatable
+ /// way, to allow re-running of tests if necessary.
+ ///
+ /// This class is internal to the framework but exposed externally to through the TestContext
+ /// the class is used to allow for obtaining repeatable random values during a tests execution.
+ /// this class should not be used inside the framework only with a TestMethod.
+ /// </summary>
+ public class RandomGenerator
+ {
+ #region Members & Constructor
+ /// <summary>
+ /// Seed for the wrapped Random
+ /// </summary>
+ public readonly int seed;
+
+ private Random random;
+
+ /// <summary>
+ /// Lazy-loaded Random built on the readonly Seed
+ /// </summary>
+ private Random Rand
+ {
+ get
+ {
+ random = random == null ? new Random(seed) : random;
+ return random;
+ }
+ }
+
+ /// <summary>
+ /// Constructor requires Seed value in order to store it for use in Random creation
+ /// </summary>
+ /// <param name="seed"></param>
+ public RandomGenerator(int seed)
+ {
+ this.seed = seed;
+ }
+ #endregion
+
+ #region Ints
+ /// <summary>
+ /// Get Next Integer from Random
+ /// </summary>
+ /// <returns> int </returns>
+ public int GetInt()
+ {
+ return Rand.Next();
+ }
+ /// <summary>
+ /// Get Next Integer within the specified min & max from Random
+ /// </summary>
+ /// <param name="min"></param>
+ /// <param name="max"></param>
+ /// <returns> int </returns>
+ public int GetInt(int min, int max)
+ {
+ return Rand.Next(min, max);
+ }
+ #endregion
+
+ #region Shorts
+ /// <summary>
+ /// Get Next Short from Random
+ /// </summary>
+ /// <returns> short </returns>
+ public short GetShort()
+ {
+ return (short)Rand.Next(short.MinValue, short.MaxValue);
+ }
+ /// <summary>
+ /// Get Next Short within the specified min & max from Random
+ /// </summary>
+ /// <param name="min"></param>
+ /// <param name="max"></param>
+ /// <returns> short </returns>
+ public short GetShort(short min, short max)
+ {
+ return (short)Rand.Next(min, max);
+ }
+ #endregion
+
+ #region Bytes
+ /// <summary>
+ /// Get Next Byte from Random
+ /// </summary>
+ /// <returns> byte </returns>
+ public byte GetByte()
+ {
+ return (byte)Rand.Next(Byte.MinValue, Byte.MaxValue);
+ }
+ /// <summary>
+ /// Get Next Byte within the specified min & max from Random
+ /// </summary>
+ /// <param name="min"></param>
+ /// <param name="max"></param>
+ /// <returns> byte </returns>
+ public byte GetByte(byte min, byte max)
+ {
+ return (byte)Rand.Next(min, max);
+ }
+ #endregion
+
+ #region Bools
+ /// <summary>
+ /// Get Random Boolean value
+ /// </summary>
+ /// <returns> bool </returns>
+ public bool GetBool()
+ {
+ return Rand.Next(0, 2) == 0;
+ }
+ /// <summary>
+ /// Get Random Boolean value based on the probability of that value being true
+ /// </summary>
+ /// <param name="probability"></param>
+ /// <returns> bool </returns>
+ public bool GetBool(double probability)
+ {
+ return Rand.NextDouble() < Math.Abs(probability % 1.0);
+ }
+ #endregion
+
+ #region Double & Float
+ /// <summary>
+ /// Get Next Double from Random
+ /// </summary>
+ /// <returns></returns>
+ public double GetDouble()
+ {
+ return Rand.NextDouble();
+ }
+ /// <summary>
+ /// Get Next Float from Random
+ /// </summary>
+ /// <returns></returns>
+ public float GetFloat()
+ {
+ return (float)Rand.NextDouble();
+ }
+ #endregion
+
+ #region Enums
+#if CLR_2_0
+ /// <summary>
+ /// Return a random enum value representation of the specified Type
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <returns> T </returns>
+ public T GetEnum<T>()
+ {
+ Array enums = TypeHelper.GetEnumValues(typeof(T));
+ return (T)enums.GetValue(Rand.Next(0, enums.Length));
+ }
+#else
+ /// <summary>
+ /// Return a random enum value from the specified type
+ /// </summary>
+ /// <param name="enumType"></param>
+ /// <returns> object </returns>
+ public object GetEnum(Type enumType)
+ {
+ Array enums = TypeHelper.GetEnumValues(enumType);
+ return enums.GetValue(Rand.Next(0, enums.Length));
+ }
+#endif
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Randomizer.cs b/external/guiunit/src/framework/Internal/Randomizer.cs
new file mode 100755
index 0000000..0c6fc1c
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Randomizer.cs
@@ -0,0 +1,171 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Randomizer returns a set of random values in a repeatable
+ /// way, to allow re-running of tests if necessary.
+ ///
+ /// This class is an internal framework class used for setting up tests.
+ /// It is used to generate random test parameters, for an external Randomizer please see
+ /// RandomGenerator which allows for repeatable random during test execution
+ /// </summary>
+ public class Randomizer : Random
+ {
+ #region Static Members
+ private static Random seedGenerator = new Random();
+
+#if CLR_2_0 || CLR_4_0
+ private static Dictionary<MemberInfo, Randomizer> randomizers = new Dictionary<MemberInfo, Randomizer>();
+#else
+ private static System.Collections.Hashtable randomizers = new System.Collections.Hashtable();
+#endif
+
+ /// <summary>
+ /// Get a random seed for use in creating a randomizer.
+ /// </summary>
+ public static int RandomSeed
+ {
+ get { return seedGenerator.Next(); }
+ }
+
+ /// <summary>
+ /// Get a randomizer for a particular member, returning
+ /// one that has already been created if it exists.
+ /// This ensures that the same values are generated
+ /// each time the tests are reloaded.
+ /// </summary>
+ public static Randomizer GetRandomizer(MemberInfo member)
+ {
+ if (randomizers.ContainsKey(member))
+ return (Randomizer)randomizers[member];
+ else
+ {
+ Randomizer r = new Randomizer();
+ randomizers[member] = r;
+ return (Randomizer)r;
+ }
+ }
+
+
+ /// <summary>
+ /// Get a randomizer for a particular parameter, returning
+ /// one that has already been created if it exists.
+ /// This ensures that the same values are generated
+ /// each time the tests are reloaded.
+ /// </summary>
+ public static Randomizer GetRandomizer(ParameterInfo parameter)
+ {
+ return GetRandomizer(parameter.Member);
+ }
+ #endregion
+
+ #region Constructors
+ /// <summary>
+ /// Construct a randomizer using a random seed
+ /// </summary>
+ public Randomizer() : base(RandomSeed) { }
+
+ /// <summary>
+ /// Construct a randomizer using a specified seed
+ /// </summary>
+ public Randomizer(int seed) : base(seed) { }
+ #endregion
+
+ #region Public Methods
+ /// <summary>
+ /// Return an array of random doubles between 0.0 and 1.0.
+ /// </summary>
+ /// <param name="count"></param>
+ /// <returns></returns>
+ public double[] GetDoubles(int count)
+ {
+ double[] rvals = new double[count];
+
+ for (int index = 0; index < count; index++)
+ rvals[index] = NextDouble();
+
+ return rvals;
+ }
+
+ /// <summary>
+ /// Return an array of random Enums
+ /// </summary>
+ /// <param name="count"></param>
+ /// <param name="enumType"></param>
+ /// <returns></returns>
+ public object[] GetEnums(int count, Type enumType)
+ {
+ if (!enumType.IsEnum)
+ throw new ArgumentException(string.Format("The specified type: {0} was not an enum", enumType));
+
+#if !NETCF && !SILVERLIGHT
+ Array values = Enum.GetValues(enumType);
+#else
+ Array values = TypeHelper.GetEnumValues(enumType);
+#endif
+ object[] rvals = new Enum[count];
+
+ for (int index = 0; index < count; index++)
+ rvals[index] = values.GetValue(Next(values.Length));
+
+ return rvals;
+ }
+
+ /// <summary>
+ /// Return an array of random doubles with values in a specified range.
+ /// </summary>
+ public double[] GetDoubles(double min, double max, int count)
+ {
+ double range = max - min;
+ double[] rvals = new double[count];
+
+ for (int index = 0; index < count; index++)
+ rvals[index] = NextDouble() * range + min;
+
+ return rvals;
+ }
+
+ /// <summary>
+ /// Return an array of random ints with values in a specified range.
+ /// </summary>
+ public int[] GetInts(int min, int max, int count)
+ {
+ int[] ivals = new int[count];
+
+ for (int index = 0; index < count; index++)
+ ivals[index] = Next(min, max);
+
+ return ivals;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Reflect.cs b/external/guiunit/src/framework/Internal/Reflect.cs
new file mode 100755
index 0000000..f5bcd00
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Reflect.cs
@@ -0,0 +1,288 @@
+// ***********************************************************************
+// Copyright (c) 2007-2012 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Helper methods for inspecting a type by reflection.
+ ///
+ /// Many of these methods take ICustomAttributeProvider as an
+ /// argument to avoid duplication, even though certain attributes can
+ /// only appear on specific types of members, like MethodInfo or Type.
+ ///
+ /// In the case where a type is being examined for the presence of
+ /// an attribute, interface or named member, the Reflect methods
+ /// operate with the full name of the member being sought. This
+ /// removes the necessity of the caller having a reference to the
+ /// assembly that defines the item being sought and allows the
+ /// NUnit core to inspect assemblies that reference an older
+ /// version of the NUnit framework.
+ /// </summary>
+ public class Reflect
+ {
+ private static readonly BindingFlags AllMembers = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.FlattenHierarchy;
+
+ // A zero-length Type array - not provided by System.Type for all CLR versions we support.
+ private static readonly Type[] EmptyTypes = new Type[0];
+
+ #region Get Methods of a type
+
+ /// <summary>
+ /// Examine a fixture type and return an array of methods having a
+ /// particular attribute. The array is order with base methods first.
+ /// </summary>
+ /// <param name="fixtureType">The type to examine</param>
+ /// <param name="attributeType">The attribute Type to look for</param>
+ /// <param name="inherit">Specifies whether to search the fixture type inheritance chain</param>
+ /// <returns>The array of methods found</returns>
+ public static MethodInfo[] GetMethodsWithAttribute(Type fixtureType, Type attributeType, bool inherit)
+ {
+ MethodInfoList list = new MethodInfoList();
+
+ foreach (MethodInfo method in fixtureType.GetMethods(AllMembers))
+ {
+ if (method.IsDefined(attributeType, inherit))
+ list.Add(method);
+ }
+
+ list.Sort(new BaseTypesFirstComparer());
+
+ return list.ToArray();
+ }
+
+#if CLR_2_0 || CLR_4_0
+ private class BaseTypesFirstComparer : IComparer<MethodInfo>
+ {
+ public int Compare(MethodInfo m1, MethodInfo m2)
+ {
+ if (m1 == null || m2 == null) return 0;
+
+ Type m1Type = m1.DeclaringType;
+ Type m2Type = m2.DeclaringType;
+
+ if ( m1Type == m2Type ) return 0;
+ if ( m1Type.IsAssignableFrom(m2Type) ) return -1;
+
+ return 1;
+ }
+ }
+#else
+ private class BaseTypesFirstComparer : IComparer
+ {
+ public int Compare(object x, object y)
+ {
+ MethodInfo m1 = x as MethodInfo;
+ MethodInfo m2 = y as MethodInfo;
+
+ if (m1 == null || m2 == null) return 0;
+
+ Type m1Type = m1.DeclaringType;
+ Type m2Type = m2.DeclaringType;
+
+ if (m1Type == m2Type) return 0;
+ if (m1Type.IsAssignableFrom(m2Type)) return -1;
+
+ return 1;
+ }
+ }
+#endif
+
+ /// <summary>
+ /// Examine a fixture type and return true if it has a method with
+ /// a particular attribute.
+ /// </summary>
+ /// <param name="fixtureType">The type to examine</param>
+ /// <param name="attributeType">The attribute Type to look for</param>
+ /// <param name="inherit">Specifies whether to search the fixture type inheritance chain</param>
+ /// <returns>True if found, otherwise false</returns>
+ public static bool HasMethodWithAttribute(Type fixtureType, Type attributeType, bool inherit)
+ {
+ foreach (MethodInfo method in fixtureType.GetMethods(AllMembers))
+ {
+ if (method.IsDefined(attributeType, inherit))
+ return true;
+ }
+
+ return false;
+ }
+
+ #endregion
+
+ #region Invoke Constructors
+
+ /// <summary>
+ /// Invoke the default constructor on a Type
+ /// </summary>
+ /// <param name="type">The Type to be constructed</param>
+ /// <returns>An instance of the Type</returns>
+ public static object Construct(Type type)
+ {
+ ConstructorInfo ctor = type.GetConstructor(EmptyTypes);
+ if (ctor == null)
+ throw new InvalidTestFixtureException(type.FullName + " does not have a default constructor");
+
+ return ctor.Invoke(null);
+ }
+
+ /// <summary>
+ /// Invoke a constructor on a Type with arguments
+ /// </summary>
+ /// <param name="type">The Type to be constructed</param>
+ /// <param name="arguments">Arguments to the constructor</param>
+ /// <returns>An instance of the Type</returns>
+ public static object Construct(Type type, object[] arguments)
+ {
+ if (arguments == null) return Construct(type);
+
+ Type[] argTypes = GetTypeArray(arguments);
+ ConstructorInfo ctor = type.GetConstructor(argTypes);
+ if (ctor == null)
+ throw new InvalidTestFixtureException(type.FullName + " does not have a suitable constructor");
+
+ return ctor.Invoke(arguments);
+ }
+
+ /// <summary>
+ /// Returns an array of types from an array of objects.
+ /// Used because the compact framework doesn't support
+ /// Type.GetTypeArray()
+ /// </summary>
+ /// <param name="objects">An array of objects</param>
+ /// <returns>An array of Types</returns>
+ private static Type[] GetTypeArray(object[] objects)
+ {
+ Type[] types = new Type[objects.Length];
+ int index = 0;
+ foreach (object o in objects)
+ types[index++] = o.GetType();
+ return types;
+ }
+
+ #endregion
+
+ #region Invoke Methods
+
+ /// <summary>
+ /// Invoke a parameterless method returning void on an object.
+ /// </summary>
+ /// <param name="method">A MethodInfo for the method to be invoked</param>
+ /// <param name="fixture">The object on which to invoke the method</param>
+ public static object InvokeMethod( MethodInfo method, object fixture )
+ {
+ return InvokeMethod( method, fixture, null );
+ }
+
+ /// <summary>
+ /// Invoke a method, converting any TargetInvocationException to an NUnitException.
+ /// </summary>
+ /// <param name="method">A MethodInfo for the method to be invoked</param>
+ /// <param name="fixture">The object on which to invoke the method</param>
+ /// <param name="args">The argument list for the method</param>
+ /// <returns>The return value from the invoked method</returns>
+ public static object InvokeMethod( MethodInfo method, object fixture, params object[] args )
+ {
+ if(method != null)
+ {
+ if (fixture == null && !method.IsStatic)
+ Console.WriteLine("Trying to call {0} without an instance", method.Name);
+ try
+ {
+ if (LocationProperty != null)
+ Environment.CurrentDirectory = System.IO.Path.GetDirectoryName ((string)LocationProperty.GetValue (method.DeclaringType.Assembly, null));
+
+ object result = null;
+ if (GuiUnit.TestRunner.MainLoop == null) {
+ result = method.Invoke (fixture, args);
+ } else {
+ var invokeHelper = new GuiUnit.InvokerHelper {
+ Context = TestExecutionContext.CurrentContext,
+ Func = () => method.Invoke( fixture, args )
+ };
+
+ GuiUnit.TestRunner.MainLoop.InvokeOnMainLoop (invokeHelper);
+ invokeHelper.Waiter.WaitOne ();
+ if (invokeHelper.ex != null)
+ Rethrow (invokeHelper.ex);
+ result = invokeHelper.Result;
+ }
+
+ if (result is System.Threading.Tasks.Task)
+ ((System.Threading.Tasks.Task) result).Wait ();
+ return result;
+ }
+ catch(Exception e)
+ {
+ Rethrow (e);
+ }
+ }
+
+ return null;
+ }
+
+ private static readonly PropertyInfo LocationProperty;
+
+ static Reflect()
+ {
+ Type assemblyType = typeof (Assembly);
+ LocationProperty = assemblyType.GetProperty ("Location");
+ }
+
+ static void Rethrow (Exception e)
+ {
+ string Rethrown = "Rethrown";
+ if (e is NUnitException && e.Message == Rethrown)
+ throw e;
+
+ if (e is TargetInvocationException || e is AggregateException)
+ throw new NUnitException(Rethrown, e.InnerException);
+ else
+ throw new NUnitException(Rethrown, e);
+ }
+ #endregion
+
+ #region Private Constructor for static-only class
+
+ private Reflect() { }
+
+ #endregion
+
+#if CLR_2_0 || CLR_4_0
+ class MethodInfoList : List<MethodInfo> { }
+#else
+ class MethodInfoList : ArrayList
+ {
+ public new MethodInfo[] ToArray()
+ {
+ return (MethodInfo[])base.ToArray(typeof(MethodInfo));
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Results/TestCaseResult.cs b/external/guiunit/src/framework/Internal/Results/TestCaseResult.cs
new file mode 100755
index 0000000..b3c67fc
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Results/TestCaseResult.cs
@@ -0,0 +1,53 @@
+using System;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Represents the result of running a single test case.
+ /// </summary>
+ public class TestCaseResult : TestResult
+ {
+ /// <summary>
+ /// Construct a TestCaseResult based on a TestMethod
+ /// </summary>
+ /// <param name="test">A TestMethod to which the result applies.</param>
+ public TestCaseResult(TestMethod test) : base(test) { }
+
+ /// <summary>
+ /// Gets the number of test cases that failed
+ /// when running the test and all its children.
+ /// </summary>
+ public override int FailCount
+ {
+ get { return ResultState.Status == TestStatus.Failed ? 1 : 0; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that passed
+ /// when running the test and all its children.
+ /// </summary>
+ public override int PassCount
+ {
+ get { return ResultState.Status == TestStatus.Passed ? 1 : 0; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were skipped
+ /// when running the test and all its children.
+ /// </summary>
+ public override int SkipCount
+ {
+ get { return ResultState.Status == TestStatus.Skipped ? 1 : 0; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were inconclusive
+ /// when running the test and all its children.
+ /// </summary>
+ public override int InconclusiveCount
+ {
+ get { return ResultState.Status == TestStatus.Inconclusive ? 1 : 0; }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Results/TestResult.cs b/external/guiunit/src/framework/Internal/Results/TestResult.cs
new file mode 100755
index 0000000..524841f
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Results/TestResult.cs
@@ -0,0 +1,505 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The TestResult class represents the result of a test.
+ /// </summary>
+ public abstract class TestResult : ITestResult
+ {
+ #region Fields
+
+ /// <summary>
+ /// Indicates the result of the test
+ /// </summary>
+ [CLSCompliant(false)]
+ protected ResultState resultState;
+
+ /// <summary>
+ /// The elapsed time for executing this test
+ /// </summary>
+ private TimeSpan time = TimeSpan.Zero;
+
+ /// <summary>
+ /// The test that this result pertains to
+ /// </summary>
+ [CLSCompliant(false)]
+ protected readonly ITest test;
+
+ /// <summary>
+ /// The stacktrace at the point of failure
+ /// </summary>
+ private string stackTrace;
+
+ /// <summary>
+ /// Message giving the reason for failure, error or skipping the test
+ /// </summary>
+ [CLSCompliant(false)]
+ protected string message;
+
+ /// <summary>
+ /// Number of asserts executed by this test
+ /// </summary>
+ [CLSCompliant(false)]
+ protected int assertCount = 0;
+
+ /// <summary>
+ /// The point in processing at which a failure occured
+ /// </summary>
+ private FailureSite failureSite;
+
+ /// <summary>
+ /// List of child results
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ private System.Collections.Generic.List<ITestResult> children;
+#else
+ private System.Collections.ArrayList children;
+#endif
+
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct a test result given a Test
+ /// </summary>
+ /// <param name="test">The test to be used</param>
+ public TestResult(ITest test)
+ {
+ this.test = test;
+ this.resultState = ResultState.Inconclusive;
+ }
+
+ #endregion
+
+ #region ITestResult Members
+
+ /// <summary>
+ /// Gets the test with which this result is associated.
+ /// </summary>
+ public ITest Test
+ {
+ get { return test; }
+ }
+
+ /// <summary>
+ /// Gets the ResultState of the test result, which
+ /// indicates the success or failure of the test.
+ /// </summary>
+ public ResultState ResultState
+ {
+ get { return resultState; }
+ }
+
+ /// <summary>
+ /// Gets the name of the test result
+ /// </summary>
+ public virtual string Name
+ {
+ get { return test.Name; }
+ }
+
+ /// <summary>
+ /// Gets the full name of the test result
+ /// </summary>
+ public virtual string FullName
+ {
+ get { return test.FullName; }
+ }
+
+ /// <summary>
+ /// Gets or sets the elapsed time for running the test
+ /// </summary>
+ public TimeSpan Duration
+ {
+ get { return time; }
+ set { time = value; }
+ }
+
+ /// <summary>
+ /// Gets the message associated with a test
+ /// failure or with not running the test
+ /// </summary>
+ public string Message
+ {
+ get { return message; }
+ }
+
+ /// <summary>
+ /// Gets any stacktrace associated with an
+ /// error or failure. Not available in
+ /// the Compact Framework 1.0.
+ /// </summary>
+ public virtual string StackTrace
+ {
+ get { return stackTrace; }
+ }
+
+ /// <summary>
+ /// Gets the failure site, which indicates the point
+ /// in the processing of the test where it failed.
+ /// </summary>
+ public FailureSite FailureSite
+ {
+ get { return failureSite; }
+ }
+
+ /// <summary>
+ /// Gets or sets the count of asserts executed
+ /// when running the test.
+ /// </summary>
+ public int AssertCount
+ {
+ get { return assertCount; }
+ set { assertCount = value; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that failed
+ /// when running the test and all its children.
+ /// </summary>
+ public abstract int FailCount { get; }
+
+ /// <summary>
+ /// Gets the number of test cases that passed
+ /// when running the test and all its children.
+ /// </summary>
+ public abstract int PassCount { get; }
+
+ /// <summary>
+ /// Gets the number of test cases that were skipped
+ /// when running the test and all its children.
+ /// </summary>
+ public abstract int SkipCount { get; }
+
+ /// <summary>
+ /// Gets the number of test cases that were inconclusive
+ /// when running the test and all its children.
+ /// </summary>
+ public abstract int InconclusiveCount { get; }
+
+ /// <summary>
+ /// Indicates whether this result has any child results.
+ /// Test HasChildren before accessing Children to avoid
+ /// the creation of an empty collection.
+ /// </summary>
+ public bool HasChildren
+ {
+ get { return children != null && children.Count > 0; }
+ }
+
+ /// <summary>
+ /// Gets the collection of child results.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public System.Collections.Generic.IList<ITestResult> Children
+ {
+ get
+ {
+ if (children == null)
+ children = new System.Collections.Generic.List<ITestResult>();
+
+ return children;
+ }
+ }
+#else
+ public System.Collections.IList Children
+ {
+ get
+ {
+ if (children == null)
+ children = new System.Collections.ArrayList();
+
+ return children;
+ }
+ }
+#endif
+
+ #endregion
+
+ #region IXmlNodeBuilder Members
+
+ /// <summary>
+ /// Returns the Xml representation of the result.
+ /// </summary>
+ /// <param name="recursive">If true, descendant results are included</param>
+ /// <returns>An XmlNode representing the result</returns>
+ public XmlNode ToXml(bool recursive)
+ {
+ XmlNode topNode = XmlNode.CreateTopLevelElement("dummy");
+
+ AddToXml(topNode, recursive);
+
+ return topNode.FirstChild;
+ }
+
+ /// <summary>
+ /// Adds the XML representation of the result as a child of the
+ /// supplied parent node..
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">If true, descendant results are included</param>
+ /// <returns></returns>
+ public virtual XmlNode AddToXml(XmlNode parentNode, bool recursive)
+ {
+ // A result node looks like a test node with extra info added
+ XmlNode thisNode = this.test.AddToXml(parentNode, false);
+
+ thisNode.AddAttribute("result", ResultState.Status.ToString());
+ if (ResultState.Label != string.Empty) // && ResultState.Label != ResultState.Status.ToString())
+ thisNode.AddAttribute("label", ResultState.Label);
+
+ thisNode.AddAttribute("time", this.Duration.ToString());
+
+ if (this.test is TestSuite)
+ {
+ thisNode.AddAttribute("total", (PassCount + FailCount + SkipCount + InconclusiveCount).ToString());
+ thisNode.AddAttribute("passed", PassCount.ToString());
+ thisNode.AddAttribute("failed", FailCount.ToString());
+ thisNode.AddAttribute("inconclusive", InconclusiveCount.ToString());
+ thisNode.AddAttribute("skipped", SkipCount.ToString());
+ }
+
+ thisNode.AddAttribute("asserts", this.AssertCount.ToString());
+
+ switch (ResultState.Status)
+ {
+ case TestStatus.Failed:
+ AddFailureElement(thisNode);
+ break;
+ case TestStatus.Skipped:
+ AddReasonElement(thisNode);
+ break;
+ case TestStatus.Passed:
+ case TestStatus.Inconclusive:
+ if (this.Message != null)
+ AddReasonElement(thisNode);
+ break;
+ }
+
+ if (recursive && HasChildren)
+ foreach (TestResult child in Children)
+ child.AddToXml(thisNode, recursive);
+
+ return thisNode;
+ }
+
+ #endregion
+
+ #region Other Public Methods
+
+ /// <summary>
+ /// Add a child result
+ /// </summary>
+ /// <param name="result">The child result to be added</param>
+ public virtual void AddResult(TestResult result)
+ {
+ this.Children.Add(result);
+
+ this.assertCount += result.AssertCount;
+
+ switch (result.ResultState.Status)
+ {
+ case TestStatus.Passed:
+
+ if (this.resultState.Status == TestStatus.Inconclusive)
+ SetResult(ResultState.Success);
+
+ break;
+
+ case TestStatus.Failed:
+
+ if (this.resultState.Status != TestStatus.Failed)
+ SetResult(ResultState.Failure, "One or more child tests had errors");
+
+ break;
+
+ case TestStatus.Skipped:
+
+ switch (result.ResultState.Label)
+ {
+ case "Invalid":
+
+ if (this.ResultState != ResultState.NotRunnable && this.ResultState.Status != TestStatus.Failed)
+ SetResult(ResultState.Failure, "One or more child tests had errors");
+
+ break;
+
+ case "Ignored":
+
+ if (this.ResultState.Status == TestStatus.Inconclusive || this.ResultState.Status == TestStatus.Passed)
+ SetResult(ResultState.Ignored, "One or more child tests were ignored");
+
+ break;
+
+ default:
+
+ // Tests skipped for other reasons do not change the outcome
+ // of the containing suite when added.
+
+ break;
+ }
+
+ break;
+
+ case TestStatus.Inconclusive:
+
+ // An inconclusive result does not change the outcome
+ // of the containing suite when added.
+
+ break;
+ }
+ }
+
+ /// <summary>
+ /// Set the result of the test
+ /// </summary>
+ /// <param name="resultState">The ResultState to use in the result</param>
+ public void SetResult(ResultState resultState)
+ {
+ SetResult(resultState, null, null, FailureSite.Test);
+ }
+
+ /// <summary>
+ /// Set the result of the test
+ /// </summary>
+ /// <param name="resultState">The ResultState to use in the result</param>
+ /// <param name="message">A message associated with the result state</param>
+ public void SetResult(ResultState resultState, string message)
+ {
+ SetResult(resultState, message, null, FailureSite.Test);
+ }
+
+ /// <summary>
+ /// Set the result of the test
+ /// </summary>
+ /// <param name="resultState">The ResultState to use in the result</param>
+ /// <param name="message">A message associated with the result state</param>
+ /// <param name="stackTrace">Stack trace giving the location of the command</param>
+ public void SetResult(ResultState resultState, string message, string stackTrace)
+ {
+ SetResult(resultState, message, stackTrace, FailureSite.Test);
+ }
+
+ /// <summary>
+ /// Set the result of the test
+ /// </summary>
+ /// <param name="resultState">The ResultState to use in the result</param>
+ /// <param name="message">A message associated with the result state</param>
+ /// <param name="stackTrace">Stack trace giving the location of the command</param>
+ /// <param name="site">The FailureSite for any failure or error</param>
+ public void SetResult(ResultState resultState, string message, string stackTrace, FailureSite site)
+ {
+ this.resultState = resultState;
+ this.message = message;
+ this.stackTrace = stackTrace;
+ this.failureSite = site;
+ }
+
+ /// <summary>
+ /// Set the test result based on the type of exception thrown
+ /// and the site of the Failure.
+ /// </summary>
+ /// <param name="ex">The exception that was thrown</param>
+ /// <param name="site">The FailureSite</param>
+ public virtual void RecordException(Exception ex, FailureSite site)
+ {
+ RecordException(ex);
+ }
+
+ /// <summary>
+ /// Set the test result based on the type of exception thrown
+ /// </summary>
+ /// <param name="ex">The exception that was thrown</param>
+ public void RecordException(Exception ex)
+ {
+ if (ex is NUnitException)
+ ex = ex.InnerException;
+
+ if (ex is System.Threading.ThreadAbortException)
+ SetResult(ResultState.Cancelled, "Test cancelled by user", ex.StackTrace);
+ else if (ex is AssertionException)
+ SetResult(ResultState.Failure, ex.Message, StackFilter.Filter(ex.StackTrace));
+ else if (ex is IgnoreException)
+ SetResult(ResultState.Ignored, ex.Message, StackFilter.Filter(ex.StackTrace));
+ else if (ex is InconclusiveException)
+ SetResult(ResultState.Inconclusive, ex.Message, StackFilter.Filter(ex.StackTrace));
+ else if (ex is SuccessException)
+ SetResult(ResultState.Success, ex.Message, StackFilter.Filter(ex.StackTrace));
+ else
+ SetResult(ResultState.Error,
+ ExceptionHelper.BuildMessage(ex),
+ ExceptionHelper.BuildStackTrace(ex));
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ /// <summary>
+ /// Adds a reason element to a node and returns it.
+ /// </summary>
+ /// <param name="targetNode">The target node.</param>
+ /// <returns>The new reason element.</returns>
+ private XmlNode AddReasonElement(XmlNode targetNode)
+ {
+ XmlNode reasonNode = targetNode.AddElement("reason");
+ reasonNode.AddElement("message").TextContent = this.Message;
+ return reasonNode;
+ }
+
+ /// <summary>
+ /// Adds a failure element to a node and returns it.
+ /// </summary>
+ /// <param name="targetNode">The target node.</param>
+ /// <returns>The new failure element.</returns>
+ private XmlNode AddFailureElement(XmlNode targetNode)
+ {
+ XmlNode failureNode = targetNode.AddElement("failure");
+
+ if (this.Message != null)
+ {
+ failureNode.AddElement("message").TextContent = this.Message;
+ }
+
+ if (this.StackTrace != null)
+ {
+ failureNode.AddElement("stack-trace").TextContent = this.StackTrace;
+ }
+
+ return failureNode;
+ }
+
+ //private static bool IsTestCase(ITest test)
+ //{
+ // return !(test is TestSuite);
+ //}
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Results/TestSuiteResult.cs b/external/guiunit/src/framework/Internal/Results/TestSuiteResult.cs
new file mode 100755
index 0000000..6df4cb6
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Results/TestSuiteResult.cs
@@ -0,0 +1,97 @@
+using System;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Represents the result of running a test suite
+ /// </summary>
+ public class TestSuiteResult : TestResult
+ {
+ private int passCount = 0;
+ private int failCount = 0;
+ private int skipCount = 0;
+ private int inconclusiveCount = 0;
+
+ /// <summary>
+ /// Construct a TestSuiteResult base on a TestSuite
+ /// </summary>
+ /// <param name="suite">The TestSuite to which the result applies</param>
+ public TestSuiteResult(TestSuite suite) : base(suite) { }
+
+ /// <summary>
+ /// Gets the number of test cases that failed
+ /// when running the test and all its children.
+ /// </summary>
+ public override int FailCount
+ {
+ get { return this.failCount; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that passed
+ /// when running the test and all its children.
+ /// </summary>
+ public override int PassCount
+ {
+ get { return this.passCount; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were skipped
+ /// when running the test and all its children.
+ /// </summary>
+ public override int SkipCount
+ {
+ get { return this.skipCount; }
+ }
+
+ /// <summary>
+ /// Gets the number of test cases that were inconclusive
+ /// when running the test and all its children.
+ /// </summary>
+ public override int InconclusiveCount
+ {
+ get { return this.inconclusiveCount; }
+ }
+
+ /// <summary>
+ /// Add a child result
+ /// </summary>
+ /// <param name="result">The child result to be added</param>
+ public override void AddResult(TestResult result)
+ {
+ base.AddResult(result);
+
+ this.passCount += result.PassCount;
+ this.failCount += result.FailCount;
+ this.skipCount += result.SkipCount;
+ this.inconclusiveCount += result.InconclusiveCount;
+ }
+
+ /// <summary>
+ /// Set the test result based on the type of exception thrown
+ /// and the site of the Failure.
+ /// </summary>
+ /// <param name="ex">The exception that was thrown</param>
+ /// <param name="site">The FailureSite</param>
+ public override void RecordException(Exception ex, FailureSite site)
+ {
+ RecordException(ex);
+
+ if (site == FailureSite.SetUp)
+ {
+ switch (ResultState.Status)
+ {
+ case TestStatus.Skipped:
+ this.skipCount = this.test.TestCaseCount;
+ break;
+
+ case TestStatus.Failed:
+ this.failCount = this.test.TestCaseCount;
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/RuntimeFramework.cs b/external/guiunit/src/framework/Internal/RuntimeFramework.cs
new file mode 100755
index 0000000..a34c390
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/RuntimeFramework.cs
@@ -0,0 +1,582 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.IO;
+using System.Reflection;
+using Microsoft.Win32;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Enumeration identifying a common language
+ /// runtime implementation.
+ /// </summary>
+ public enum RuntimeType
+ {
+ /// <summary>Any supported runtime framework</summary>
+ Any,
+ /// <summary>Microsoft .NET Framework</summary>
+ Net,
+ /// <summary>Microsoft .NET Compact Framework</summary>
+ NetCF,
+ /// <summary>Microsoft Shared Source CLI</summary>
+ SSCLI,
+ /// <summary>Mono</summary>
+ Mono,
+ /// <summary>Silverlight</summary>
+ Silverlight,
+ /// <summary>MonoTouch</summary>
+ MonoTouch
+ }
+
+ /// <summary>
+ /// RuntimeFramework represents a particular version
+ /// of a common language runtime implementation.
+ /// </summary>
+ [Serializable]
+ public sealed class RuntimeFramework
+ {
+ #region Static and Instance Fields
+
+ /// <summary>
+ /// DefaultVersion is an empty Version, used to indicate that
+ /// NUnit should select the CLR version to use for the test.
+ /// </summary>
+ public static readonly Version DefaultVersion = new Version(0,0);
+
+ private static RuntimeFramework currentFramework;
+
+ private RuntimeType runtime;
+ private Version frameworkVersion;
+ private Version clrVersion;
+ private string displayName;
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct from a runtime type and version. If the version has
+ /// two parts, it is taken as a framework version. If it has three
+ /// or more, it is taken as a CLR version. In either case, the other
+ /// version is deduced based on the runtime type and provided version.
+ /// </summary>
+ /// <param name="runtime">The runtime type of the framework</param>
+ /// <param name="version">The version of the framework</param>
+ public RuntimeFramework( RuntimeType runtime, Version version)
+ {
+ this.runtime = runtime;
+
+ this.frameworkVersion = runtime == RuntimeType.Mono && version.Major == 1
+ ? new Version(1, 0)
+ : new Version(version.Major, version.Minor);
+ this.clrVersion = version;
+
+ if (version.Build < 0)
+ this.clrVersion = GetClrVersion(runtime, version);
+
+ this.displayName = GetDefaultDisplayName(runtime, version);
+ }
+
+ private static Version GetClrVersion(RuntimeType runtime, Version version)
+ {
+ switch (runtime)
+ {
+ case RuntimeType.Silverlight:
+ return version.Major >= 4
+ ? new Version(4, 0, 60310)
+ : new Version(2, 0, 50727);
+
+ default:
+ switch (version.Major)
+ {
+ case 4:
+ return new Version(4, 0, 30319);
+
+ case 2:
+ case 3:
+ return new Version(2, 0, 50727);
+
+ case 1:
+ return version.Minor == 0 && runtime != RuntimeType.Mono
+ ? new Version(1, 0, 3705)
+ : new Version(1, 1, 4322);
+
+ default:
+ return version;
+ }
+ }
+ }
+
+ #endregion
+
+ #region Properties
+ /// <summary>
+ /// Static method to return a RuntimeFramework object
+ /// for the framework that is currently in use.
+ /// </summary>
+ public static RuntimeFramework CurrentFramework
+ {
+ get
+ {
+ if (currentFramework == null)
+ {
+#if SILVERLIGHT
+ currentFramework = new RuntimeFramework(
+ RuntimeType.Silverlight,
+ new Version(Environment.Version.Major, Environment.Version.Minor));
+#else
+ Type monoRuntimeType = Type.GetType("Mono.Runtime", false);
+ Type monoTouchType = Type.GetType("MonoTouch.UIKit.UIApplicationDelegate, monotouch");
+ bool isMonoTouch = monoTouchType != null;
+ bool isMono = monoRuntimeType != null;
+
+ RuntimeType runtime = isMonoTouch
+ ? RuntimeType.MonoTouch
+ : isMono
+ ? RuntimeType.Mono
+ : Environment.OSVersion.Platform == PlatformID.WinCE
+ ? RuntimeType.NetCF
+ : RuntimeType.Net;
+
+ int major = Environment.Version.Major;
+ int minor = Environment.Version.Minor;
+
+ if (isMono)
+ {
+ switch (major)
+ {
+ case 1:
+ minor = 0;
+ break;
+ case 2:
+ major = 3;
+ minor = 5;
+ break;
+ }
+ }
+ else /* It's windows */
+ if (major == 2)
+ {
+ RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework");
+ if (key != null)
+ {
+ string installRoot = key.GetValue("InstallRoot") as string;
+ if (installRoot != null)
+ {
+ if (Directory.Exists(Path.Combine(installRoot, "v3.5")))
+ {
+ major = 3;
+ minor = 5;
+ }
+ else if (Directory.Exists(Path.Combine(installRoot, "v3.0")))
+ {
+ major = 3;
+ minor = 0;
+ }
+ }
+ }
+ }
+
+ currentFramework = new RuntimeFramework(runtime, new Version(major, minor));
+ currentFramework.clrVersion = Environment.Version;
+
+ if (isMono)
+ {
+ MethodInfo getDisplayNameMethod = monoRuntimeType.GetMethod(
+ "GetDisplayName", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.DeclaredOnly | BindingFlags.ExactBinding);
+ if (getDisplayNameMethod != null)
+ currentFramework.displayName = (string)getDisplayNameMethod.Invoke(null, new object[0]);
+ }
+#endif
+ }
+
+ return currentFramework;
+ }
+ }
+
+ /// <summary>
+ /// The type of this runtime framework
+ /// </summary>
+ public RuntimeType Runtime
+ {
+ get { return runtime; }
+ }
+
+ /// <summary>
+ /// The framework version for this runtime framework
+ /// </summary>
+ public Version FrameworkVersion
+ {
+ get { return frameworkVersion; }
+ }
+
+ /// <summary>
+ /// The CLR version for this runtime framework
+ /// </summary>
+ public Version ClrVersion
+ {
+ get { return clrVersion; }
+ }
+
+ /// <summary>
+ /// Return true if any CLR version may be used in
+ /// matching this RuntimeFramework object.
+ /// </summary>
+ public bool AllowAnyVersion
+ {
+ get { return this.clrVersion == DefaultVersion; }
+ }
+
+ /// <summary>
+ /// Returns the Display name for this framework
+ /// </summary>
+ public string DisplayName
+ {
+ get { return displayName; }
+ }
+
+#if !NUNITLITE
+ private static RuntimeFramework[] availableFrameworks;
+
+ /// <summary>
+ /// Gets an array of all available frameworks
+ /// </summary>
+ // TODO: Special handling for netcf
+ public static RuntimeFramework[] AvailableFrameworks
+ {
+ get
+ {
+ if (availableFrameworks == null)
+ {
+ FrameworkList frameworks = new FrameworkList();
+
+ AppendDotNetFrameworks(frameworks);
+ AppendDefaultMonoFramework(frameworks);
+
+ // NYI
+ //AppendMonoFrameworks(frameworks);
+
+ availableFrameworks = frameworks.ToArray();
+ }
+
+ return availableFrameworks;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if the current RuntimeFramework is available.
+ /// In the current implementation, only Mono and Microsoft .NET
+ /// are supported.
+ /// </summary>
+ /// <returns>True if it's available, false if not</returns>
+ public bool IsAvailable
+ {
+ get
+ {
+ foreach (RuntimeFramework framework in AvailableFrameworks)
+ if (this.Supports(framework))
+ return true;
+
+ return false;
+ }
+ }
+#endif
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Parses a string representing a RuntimeFramework.
+ /// The string may be just a RuntimeType name or just
+ /// a Version or a hyphentated RuntimeType-Version or
+ /// a Version prefixed by 'v'.
+ /// </summary>
+ /// <param name="s"></param>
+ /// <returns></returns>
+ public static RuntimeFramework Parse(string s)
+ {
+ RuntimeType runtime = RuntimeType.Any;
+ Version version = DefaultVersion;
+
+ string[] parts = s.Split(new char[] { '-' });
+ if (parts.Length == 2)
+ {
+ runtime = (RuntimeType)System.Enum.Parse(typeof(RuntimeType), parts[0], true);
+ string vstring = parts[1];
+ if (vstring != "")
+ version = new Version(vstring);
+ }
+ else if (char.ToLower(s[0]) == 'v')
+ {
+ version = new Version(s.Substring(1));
+ }
+ else if (IsRuntimeTypeName(s))
+ {
+ runtime = (RuntimeType)System.Enum.Parse(typeof(RuntimeType), s, true);
+ }
+ else
+ {
+ version = new Version(s);
+ }
+
+ return new RuntimeFramework(runtime, version);
+ }
+
+#if !NUNITLITE
+ /// <summary>
+ /// Returns the best available framework that matches a target framework.
+ /// If the target framework has a build number specified, then an exact
+ /// match is needed. Otherwise, the matching framework with the highest
+ /// build number is used.
+ /// </summary>
+ /// <param name="target"></param>
+ /// <returns></returns>
+ public static RuntimeFramework GetBestAvailableFramework(RuntimeFramework target)
+ {
+ RuntimeFramework result = target;
+
+ if (target.ClrVersion.Build < 0)
+ {
+ foreach (RuntimeFramework framework in AvailableFrameworks)
+ if (framework.Supports(target) &&
+ framework.ClrVersion.Build > result.ClrVersion.Build)
+ {
+ result = framework;
+ }
+ }
+
+ return result;
+ }
+#endif
+
+ /// <summary>
+ /// Overridden to return the short name of the framework
+ /// </summary>
+ /// <returns></returns>
+ public override string ToString()
+ {
+ if (this.AllowAnyVersion)
+ {
+ return runtime.ToString().ToLower();
+ }
+ else
+ {
+ string vstring = frameworkVersion.ToString();
+ if (runtime == RuntimeType.Any)
+ return "v" + vstring;
+ else
+ return runtime.ToString().ToLower() + "-" + vstring;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if the current framework matches the
+ /// one supplied as an argument. Two frameworks match
+ /// if their runtime types are the same or either one
+ /// is RuntimeType.Any and all specified version components
+ /// are equal. Negative (i.e. unspecified) version
+ /// components are ignored.
+ /// </summary>
+ /// <param name="target">The RuntimeFramework to be matched.</param>
+ /// <returns>True on match, otherwise false</returns>
+ public bool Supports(RuntimeFramework target)
+ {
+ if (this.Runtime != RuntimeType.Any
+ && target.Runtime != RuntimeType.Any
+ && this.Runtime != target.Runtime)
+ return false;
+
+ if (this.AllowAnyVersion || target.AllowAnyVersion)
+ return true;
+
+ if (!VersionsMatch(this.ClrVersion, target.ClrVersion))
+ return false;
+
+ return Runtime == RuntimeType.Silverlight
+ ? this.frameworkVersion.Major == target.FrameworkVersion.Major && this.frameworkVersion.Minor == target.FrameworkVersion.Minor
+ : this.FrameworkVersion.Major >= target.FrameworkVersion.Major && this.FrameworkVersion.Minor >= target.FrameworkVersion.Minor;
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private static bool IsRuntimeTypeName(string name)
+ {
+ foreach (string item in TypeHelper.GetEnumNames(typeof(RuntimeType)))
+ if (item.ToLower() == name.ToLower())
+ return true;
+
+ return false;
+ }
+
+ private static string GetDefaultDisplayName(RuntimeType runtime, Version version)
+ {
+ if (version == DefaultVersion)
+ return runtime.ToString();
+ else if (runtime == RuntimeType.Any)
+ return "v" + version.ToString();
+ else
+ return runtime.ToString() + " " + version.ToString();
+ }
+
+ private static bool VersionsMatch(Version v1, Version v2)
+ {
+ return v1.Major == v2.Major &&
+ v1.Minor == v2.Minor &&
+ (v1.Build < 0 || v2.Build < 0 || v1.Build == v2.Build) &&
+ (v1.Revision < 0 || v2.Revision < 0 || v1.Revision == v2.Revision);
+ }
+
+#if !NUNITLITE
+ private static void AppendMonoFrameworks(FrameworkList frameworks)
+ {
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ AppendAllMonoFrameworks(frameworks);
+ else
+ AppendDefaultMonoFramework(frameworks);
+ }
+
+ private static void AppendAllMonoFrameworks(FrameworkList frameworks)
+ {
+ // TODO: Find multiple installed Mono versions under Linux
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ // Use registry to find alternate versions
+ RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Novell\Mono");
+ if (key == null) return;
+
+ foreach (string version in key.GetSubKeyNames())
+ {
+ RegistryKey subKey = key.OpenSubKey(version);
+ string monoPrefix = subKey.GetValue("SdkInstallRoot") as string;
+
+ AppendMonoFramework(frameworks, monoPrefix, version);
+ }
+ }
+ else
+ AppendDefaultMonoFramework(frameworks);
+ }
+
+ // This method works for Windows and Linux but currently
+ // is only called under Linux.
+ private static void AppendDefaultMonoFramework(FrameworkList frameworks)
+ {
+ string monoPrefix = null;
+ string version = null;
+
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Novell\Mono");
+ if (key != null)
+ {
+ version = key.GetValue("DefaultCLR") as string;
+ if (version != null && version != "")
+ {
+ key = key.OpenSubKey(version);
+ if (key != null)
+ monoPrefix = key.GetValue("SdkInstallRoot") as string;
+ }
+ }
+ }
+ else // Assuming we're currently running Mono - change if more runtimes are added
+ {
+ string libMonoDir = Path.GetDirectoryName(typeof(object).Assembly.Location);
+ monoPrefix = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(libMonoDir)));
+ }
+
+ AppendMonoFramework(frameworks, monoPrefix, version);
+ }
+
+ private static void AppendMonoFramework(FrameworkList frameworks, string monoPrefix, string version)
+ {
+ if (monoPrefix != null)
+ {
+ string displayFmt = version != null
+ ? "Mono " + version + " - {0} Profile"
+ : "Mono {0} Profile";
+
+ if (File.Exists(Path.Combine(monoPrefix, "lib/mono/1.0/mscorlib.dll")))
+ {
+ RuntimeFramework framework = new RuntimeFramework(RuntimeType.Mono, new Version(1, 1, 4322));
+ framework.displayName = string.Format(displayFmt, "1.0");
+ frameworks.Add(framework);
+ }
+
+ if (File.Exists(Path.Combine(monoPrefix, "lib/mono/2.0/mscorlib.dll")))
+ {
+ RuntimeFramework framework = new RuntimeFramework(RuntimeType.Mono, new Version(2, 0, 50727));
+ framework.displayName = string.Format(displayFmt, "2.0");
+ frameworks.Add(framework);
+ }
+
+ if (File.Exists(Path.Combine(monoPrefix, "lib/mono/4.0/mscorlib.dll")))
+ {
+ RuntimeFramework framework = new RuntimeFramework(RuntimeType.Mono, new Version(4, 0, 30319));
+ framework.displayName = string.Format(displayFmt, "4.0");
+ frameworks.Add(framework);
+ }
+ }
+ }
+
+ private static void AppendDotNetFrameworks(FrameworkList frameworks)
+ {
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ {
+ RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\.NETFramework\policy");
+ if (key != null)
+ {
+ foreach (string name in key.GetSubKeyNames())
+ {
+ if (name.StartsWith("v"))
+ {
+ RegistryKey key2 = key.OpenSubKey(name);
+ foreach (string build in key2.GetValueNames())
+ frameworks.Add(new RuntimeFramework(RuntimeType.Net, new Version(name.Substring(1) + "." + build)));
+ }
+ }
+ }
+ }
+ }
+#endif
+
+#if CLR_2_0 || CLR_4_0
+ class FrameworkList : System.Collections.Generic.List<RuntimeFramework> { }
+#else
+ class FrameworkList : System.Collections.ArrayList
+ {
+ public new RuntimeFramework[] ToArray()
+ {
+ return (RuntimeFramework[])base.ToArray(typeof(RuntimeFramework));
+ }
+ }
+#endif
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/StackFilter.cs b/external/guiunit/src/framework/Internal/StackFilter.cs
new file mode 100755
index 0000000..34d571b
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/StackFilter.cs
@@ -0,0 +1,52 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using System.IO;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// StackFilter class is used to remove internal NUnit
+ /// entries from a stack trace so that the resulting
+ /// trace provides better information about the test.
+ /// </summary>
+ public class StackFilter
+ {
+ /// <summary>
+ /// Filters a raw stack trace and returns the result.
+ /// </summary>
+ /// <param name="rawTrace">The original stack trace</param>
+ /// <returns>A filtered stack trace</returns>
+ public static string Filter(string rawTrace)
+ {
+ if (rawTrace == null) return null;
+
+ StringReader sr = new StringReader(rawTrace);
+ StringWriter sw = new StringWriter();
+
+ try
+ {
+ string line;
+ while ((line = sr.ReadLine()) != null && line.IndexOf("NUnit.Framework.Assert") >= 0)
+ /*Skip*/
+ ;
+
+ while (line != null)
+ {
+ sw.WriteLine(line);
+ line = sr.ReadLine();
+ }
+ }
+ catch (Exception)
+ {
+ return rawTrace;
+ }
+
+ return sw.ToString();
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/StringUtil.cs b/external/guiunit/src/framework/Internal/StringUtil.cs
new file mode 100755
index 0000000..c98bc60
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/StringUtil.cs
@@ -0,0 +1,40 @@
+using System;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Provides methods to support legacy string comparison methods.
+ /// </summary>
+ public class StringUtil
+ {
+ /// <summary>
+ /// Compares two strings for equality, ignoring case if requested.
+ /// </summary>
+ /// <param name="strA">The first string.</param>
+ /// <param name="strB">The second string..</param>
+ /// <param name="ignoreCase">if set to <c>true</c>, the case of the letters in the strings is ignored.</param>
+ /// <returns>Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if
+ /// strB is sorted first</returns>
+ public static int Compare(string strA, string strB, bool ignoreCase)
+ {
+#if SILVERLIGHT
+ StringComparison comparison = ignoreCase ? StringComparison.InvariantCultureIgnoreCase : StringComparison.InvariantCulture;
+ return string.Compare(strA, strB, comparison);
+#else
+ return string.Compare(strA, strB, ignoreCase);
+#endif
+ }
+
+ /// <summary>
+ /// Compares two strings for equality, ignoring case if requested.
+ /// </summary>
+ /// <param name="strA">The first string.</param>
+ /// <param name="strB">The second string..</param>
+ /// <param name="ignoreCase">if set to <c>true</c>, the case of the letters in the strings is ignored.</param>
+ /// <returns>True if the strings are equivalent, false if not.</returns>
+ public static bool StringsEqual(string strA, string strB, bool ignoreCase)
+ {
+ return Compare(strA, strB, ignoreCase) == 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/TestExecutionContext.cs b/external/guiunit/src/framework/Internal/TestExecutionContext.cs
new file mode 100755
index 0000000..9796cdc
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TestExecutionContext.cs
@@ -0,0 +1,625 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+using System.Collections.Specialized;
+using System.IO;
+using System.Diagnostics;
+using System.Globalization;
+using System.Threading;
+
+#if !NUNITLITE
+using System.Security.Principal;
+#endif
+
+using NUnit.Framework.Api;
+#if !NETCF
+using System.Runtime.Remoting.Messaging;
+#endif
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Helper class used to save and restore certain static or
+ /// singleton settings in the environment that affect tests
+ /// or which might be changed by the user tests.
+ ///
+ /// An internal class is used to hold settings and a stack
+ /// of these objects is pushed and popped as Save and Restore
+ /// are called.
+ ///
+ /// Static methods for each setting forward to the internal
+ /// object on the top of the stack.
+ /// </summary>
+ public class TestExecutionContext
+#if !SILVERLIGHT && !NETCF
+ //: ILogicalThreadAffinative
+#endif
+ {
+ #region Instance Fields
+
+ /// <summary>
+ /// Link to a prior saved context
+ /// </summary>
+ public TestExecutionContext prior;
+
+ /// <summary>
+ /// The currently executing test
+ /// </summary>
+ private Test currentTest;
+
+ /// <summary>
+ /// The time the test began execution
+ /// </summary>
+ private DateTime startTime;
+
+ /// <summary>
+ /// The active TestResult for the current test
+ /// </summary>
+ private TestResult currentResult;
+
+ /// <summary>
+ /// The work directory to receive test output
+ /// </summary>
+ private string workDirectory;
+
+ /// <summary>
+ /// The object on which tests are currently being executed - i.e. the user fixture object
+ /// </summary>
+ private object testObject;
+
+ /// <summary>
+ /// The event listener currently receiving notifications
+ /// </summary>
+ private ITestListener listener = TestListener.NULL;
+
+ /// <summary>
+ /// The number of assertions for the current test
+ /// </summary>
+ private int assertCount;
+
+ /// <summary>
+ /// Indicates whether execution should terminate after the first error
+ /// </summary>
+ private bool stopOnError;
+
+ /// <summary>
+ /// Default timeout for test cases
+ /// </summary>
+ private int testCaseTimeout;
+
+ private RandomGenerator random;
+
+#if !NETCF
+ /// <summary>
+ /// The current culture
+ /// </summary>
+ private CultureInfo currentCulture;
+
+ /// <summary>
+ /// The current UI culture
+ /// </summary>
+ private CultureInfo currentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Destination for standard output
+ /// </summary>
+ private TextWriter outWriter;
+
+ /// <summary>
+ /// Destination for standard error
+ /// </summary>
+ private TextWriter errorWriter;
+
+ /// <summary>
+ /// Indicates whether trace is enabled
+ /// </summary>
+ private bool tracing;
+
+ /// <summary>
+ /// Destination for Trace output
+ /// </summary>
+ private TextWriter traceWriter;
+#endif
+
+#if !NUNITLITE
+ /// <summary>
+ /// Indicates whether logging is enabled
+ /// </summary>
+ private bool logging;
+
+ /// <summary>
+ /// The current working directory
+ /// </summary>
+ private string currentDirectory;
+
+ private Log4NetCapture logCapture;
+
+ /// <summary>
+ /// The current Principal.
+ /// </summary>
+ private IPrincipal currentPrincipal;
+#endif
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestExecutionContext"/> class.
+ /// </summary>
+ public TestExecutionContext()
+ {
+ this.prior = null;
+ this.testCaseTimeout = 0;
+
+#if !NETCF
+ this.currentCulture = CultureInfo.CurrentCulture;
+ this.currentUICulture = CultureInfo.CurrentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ this.outWriter = Console.Out;
+ this.errorWriter = Console.Error;
+ this.traceWriter = null;
+ this.tracing = false;
+#endif
+
+#if !NUNITLITE
+ this.logging = false;
+ this.currentDirectory = Environment.CurrentDirectory;
+ this.logCapture = new Log4NetCapture();
+ this.currentPrincipal = Thread.CurrentPrincipal;
+#endif
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestExecutionContext"/> class.
+ /// </summary>
+ /// <param name="other">An existing instance of TestExecutionContext.</param>
+ public TestExecutionContext( TestExecutionContext other )
+ {
+ this.prior = other;
+
+ this.currentTest = other.currentTest;
+ this.currentResult = other.currentResult;
+ this.testObject = other.testObject;
+ this.workDirectory = other.workDirectory;
+ this.listener = other.listener;
+ this.stopOnError = other.stopOnError;
+ this.testCaseTimeout = other.testCaseTimeout;
+
+#if !NETCF
+ this.currentCulture = CultureInfo.CurrentCulture;
+ this.currentUICulture = CultureInfo.CurrentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ this.outWriter = other.outWriter;
+ this.errorWriter = other.errorWriter;
+ this.traceWriter = other.traceWriter;
+ this.tracing = other.tracing;
+#endif
+
+#if !NUNITLITE
+ this.logging = other.logging;
+ this.currentDirectory = Environment.CurrentDirectory;
+ this.logCapture = other.logCapture;
+ this.currentPrincipal = Thread.CurrentPrincipal;
+#endif
+ }
+
+ #endregion
+
+ #region Static Singleton Instance
+
+ /// <summary>
+ /// The current context, head of the list of saved contexts.
+ /// </summary>
+#if SILVERLIGHT || NETCF
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ [ThreadStatic]
+#endif
+ private static TestExecutionContext current;
+#endif
+
+ /// <summary>
+ /// Gets the current context.
+ /// </summary>
+ /// <value>The current context.</value>
+ public static TestExecutionContext CurrentContext
+ {
+ get
+ {
+#if SILVERLIGHT || NETCF
+ if (current == null)
+ current = new TestExecutionContext();
+
+ return current;
+#else
+ return CallContext.GetData("NUnit.Framework.TestContext") as TestExecutionContext;
+#endif
+ }
+ }
+
+ #endregion
+
+ #region Static Methods
+
+ internal static void SetCurrentContext(TestExecutionContext ec)
+ {
+#if SILVERLIGHT || NETCF
+ current = ec;
+#else
+ CallContext.SetData("NUnit.Framework.TestContext", ec);
+#endif
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the current test
+ /// </summary>
+ public Test CurrentTest
+ {
+ get { return currentTest; }
+ set { currentTest = value; }
+ }
+
+ /// <summary>
+ /// The time the current test started execution
+ /// </summary>
+ public DateTime StartTime
+ {
+ get { return startTime; }
+ set { startTime = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the current test result
+ /// </summary>
+ public TestResult CurrentResult
+ {
+ get { return currentResult; }
+ set { currentResult = value; }
+ }
+
+ /// <summary>
+ /// The current test object - that is the user fixture
+ /// object on which tests are being executed.
+ /// </summary>
+ public object TestObject
+ {
+ get { return testObject; }
+ set { testObject = value; }
+ }
+
+ /// <summary>
+ /// Get or set the working directory
+ /// </summary>
+ public string WorkDirectory
+ {
+ get { return workDirectory; }
+ set { workDirectory = value; }
+ }
+
+ /// <summary>
+ /// Get or set indicator that run should stop on the first error
+ /// </summary>
+ public bool StopOnError
+ {
+ get { return stopOnError; }
+ set { stopOnError = value; }
+ }
+
+ /// <summary>
+ /// The current test event listener
+ /// </summary>
+ internal ITestListener Listener
+ {
+ get { return listener; }
+ set { listener = value; }
+ }
+
+ /// <summary>
+ /// Gets the RandomGenerator specific to this Test
+ /// </summary>
+ public RandomGenerator Random
+ {
+ get
+ {
+ if (random == null)
+ {
+ random = new RandomGenerator(currentTest.Seed);
+ }
+ return random;
+ }
+ }
+
+ /// <summary>
+ /// Gets the assert count.
+ /// </summary>
+ /// <value>The assert count.</value>
+ internal int AssertCount
+ {
+ get { return assertCount; }
+ set { assertCount = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the test case timeout vaue
+ /// </summary>
+ public int TestCaseTimeout
+ {
+ get { return testCaseTimeout; }
+ set { testCaseTimeout = value; }
+ }
+
+#if !NETCF
+ /// <summary>
+ /// Saves or restores the CurrentCulture
+ /// </summary>
+ public CultureInfo CurrentCulture
+ {
+ get { return currentCulture; }
+ set
+ {
+ currentCulture = value;
+ Thread.CurrentThread.CurrentCulture = currentCulture;
+ }
+ }
+
+ /// <summary>
+ /// Saves or restores the CurrentUICulture
+ /// </summary>
+ public CultureInfo CurrentUICulture
+ {
+ get { return currentUICulture; }
+ set
+ {
+ currentUICulture = value;
+ Thread.CurrentThread.CurrentUICulture = currentUICulture;
+ }
+ }
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Controls where Console.Out is directed
+ /// </summary>
+ internal TextWriter Out
+ {
+ get { return outWriter; }
+ set
+ {
+ if ( outWriter != value )
+ {
+ outWriter = value;
+ Console.Out.Flush();
+ Console.SetOut( outWriter );
+ }
+ }
+ }
+
+ /// <summary>
+ /// Controls where Console.Error is directed
+ /// </summary>
+ internal TextWriter Error
+ {
+ get { return errorWriter; }
+ set
+ {
+ if ( errorWriter != value )
+ {
+ errorWriter = value;
+ Console.Error.Flush();
+ Console.SetError( errorWriter );
+ }
+ }
+ }
+
+ /// <summary>
+ /// Controls whether trace and debug output are written
+ /// to the standard output.
+ /// </summary>
+ internal bool Tracing
+ {
+ get { return tracing; }
+ set
+ {
+ if (tracing != value)
+ {
+ if (traceWriter != null && tracing)
+ StopTracing();
+
+ tracing = value;
+
+ if (traceWriter != null && tracing)
+ StartTracing();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Controls where Trace output is directed
+ /// </summary>
+ internal TextWriter TraceWriter
+ {
+ get { return traceWriter; }
+ set
+ {
+ if ( traceWriter != value )
+ {
+ if ( traceWriter != null && tracing )
+ StopTracing();
+
+ traceWriter = value;
+
+ if ( traceWriter != null && tracing )
+ StartTracing();
+ }
+ }
+ }
+
+ private void StopTracing()
+ {
+ traceWriter.Close();
+ System.Diagnostics.Trace.Listeners.Remove( "NUnit" );
+ }
+
+ private void StartTracing()
+ {
+ System.Diagnostics.Trace.Listeners.Add( new TextWriterTraceListener( traceWriter, "NUnit" ) );
+ }
+#endif
+
+#if !NUNITLITE
+ /// <summary>
+ /// Controls whether log output is captured
+ /// </summary>
+ public bool Logging
+ {
+ get { return logCapture.Enabled; }
+ set { logCapture.Enabled = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the Log writer, which is actually held by a log4net
+ /// TextWriterAppender. When first set, the appender will be created
+ /// and will thereafter send any log events to the writer.
+ ///
+ /// In normal operation, LogWriter is set to an EventListenerTextWriter
+ /// connected to the EventQueue in the test domain. The events are
+ /// subsequently captured in the Gui an the output displayed in
+ /// the Log tab. The application under test does not need to define
+ /// any additional appenders.
+ /// </summary>
+ public TextWriter LogWriter
+ {
+ get { return logCapture.Writer; }
+ set { logCapture.Writer = value; }
+ }
+
+ /// <summary>
+ /// Saves and restores the CurrentDirectory
+ /// </summary>
+ public string CurrentDirectory
+ {
+ get { return currentDirectory; }
+ set
+ {
+ currentDirectory = value;
+ Environment.CurrentDirectory = currentDirectory;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the current <see cref="IPrincipal"/> for the Thread.
+ /// </summary>
+ public IPrincipal CurrentPrincipal
+ {
+ get { return this.currentPrincipal; }
+ set
+ {
+ this.currentPrincipal = value;
+ Thread.CurrentPrincipal = this.currentPrincipal;
+ }
+ }
+#endif
+
+ #endregion
+
+ #region Instance Methods
+
+ /// <summary>
+ /// Saves the old context and returns a fresh one
+ /// with the same settings.
+ /// </summary>
+ public TestExecutionContext Save()
+ {
+ return new TestExecutionContext(this);
+ }
+
+ /// <summary>
+ /// Restores the last saved context and puts
+ /// any saved settings back into effect.
+ /// </summary>
+ public TestExecutionContext Restore()
+ {
+ if (prior == null)
+ throw new InvalidOperationException("TestContext: too many Restores");
+
+ this.TestCaseTimeout = prior.TestCaseTimeout;
+
+#if !NETCF
+ this.CurrentCulture = prior.CurrentCulture;
+ this.CurrentUICulture = prior.CurrentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ this.Out = prior.Out;
+ this.Error = prior.Error;
+ this.Tracing = prior.Tracing;
+#endif
+
+#if !NUNITLITE
+ this.CurrentDirectory = prior.CurrentDirectory;
+ this.CurrentPrincipal = prior.CurrentPrincipal;
+#endif
+
+ return prior;
+ }
+
+ /// <summary>
+ /// Record any changes in the environment made by
+ /// the test code in the execution context so it
+ /// will be passed on to lower level tests.
+ /// </summary>
+ public void UpdateContext()
+ {
+#if !NETCF
+ this.currentCulture = CultureInfo.CurrentCulture;
+ this.currentUICulture = CultureInfo.CurrentUICulture;
+#endif
+#if !NUNITLITE
+ this.currentDirectory = Environment.CurrentDirectory;
+ this.currentPrincipal = System.Threading.Thread.CurrentPrincipal;
+#endif
+ }
+
+ /// <summary>
+ /// Increments the assert count.
+ /// </summary>
+ public void IncrementAssertCount()
+ {
+ System.Threading.Interlocked.Increment(ref assertCount);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/TestFilter.cs b/external/guiunit/src/framework/Internal/TestFilter.cs
new file mode 100755
index 0000000..8611f8d
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TestFilter.cs
@@ -0,0 +1,183 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Interface to be implemented by filters applied to tests.
+ /// The filter applies when running the test, after it has been
+ /// loaded, since this is the only time an ITest exists.
+ /// </summary>
+ [Serializable]
+ public abstract class TestFilter : ITestFilter
+ {
+ /// <summary>
+ /// Unique Empty filter.
+ /// </summary>
+ public static TestFilter Empty = new EmptyFilter();
+
+ /// <summary>
+ /// Indicates whether this is the EmptyFilter
+ /// </summary>
+ public bool IsEmpty
+ {
+ get { return this is TestFilter.EmptyFilter; }
+ }
+
+ /// <summary>
+ /// Determine if a particular test passes the filter criteria. The default
+ /// implementation checks the test itself, its parents and any descendants.
+ ///
+ /// Derived classes may override this method or any of the Match methods
+ /// to change the behavior of the filter.
+ /// </summary>
+ /// <param name="test">The test to which the filter is applied</param>
+ /// <returns>True if the test passes the filter, otherwise false</returns>
+ public virtual bool Pass( ITest test )
+ {
+ return Match(test) || MatchParent(test) || MatchDescendant(test);
+ }
+
+ /// <summary>
+ /// Determine whether the test itself matches the filter criteria, without
+ /// examining either parents or descendants.
+ /// </summary>
+ /// <param name="test">The test to which the filter is applied</param>
+ /// <returns>True if the filter matches the any parent of the test</returns>
+ public abstract bool Match(ITest test);
+
+ /// <summary>
+ /// Determine whether any ancestor of the test matches the filter criteria
+ /// </summary>
+ /// <param name="test">The test to which the filter is applied</param>
+ /// <returns>True if the filter matches the an ancestor of the test</returns>
+ protected virtual bool MatchParent(ITest test)
+ {
+ return (test.RunState != RunState.Explicit && test.Parent != null &&
+ (Match(test.Parent) || MatchParent(test.Parent)));
+ }
+
+ /// <summary>
+ /// Determine whether any descendant of the test matches the filter criteria.
+ /// </summary>
+ /// <param name="test">The test to be matched</param>
+ /// <returns>True if at least one descendant matches the filter criteria</returns>
+ protected virtual bool MatchDescendant(ITest test)
+ {
+ if (test.Tests == null)
+ return false;
+
+ foreach (ITest child in test.Tests)
+ {
+ if (Match(child) || MatchDescendant(child))
+ return true;
+ }
+
+ return false;
+ }
+
+#if !NUNITLITE
+ public static TestFilter FromXml(string xmlText)
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.LoadXml(xmlText);
+ XmlNode topNode = doc.FirstChild;
+
+ if (topNode.Name != "filter")
+ throw new Exception("Expected filter element at top level");
+
+ // Initially, an empty filter
+ TestFilter result = TestFilter.Empty;
+ bool isEmptyResult = true;
+
+ XmlNodeList testNodes = topNode.SelectNodes("tests/test");
+ XmlNodeList includeNodes = topNode.SelectNodes("include/category");
+ XmlNodeList excludeNodes = topNode.SelectNodes("exclude/category");
+
+ if (testNodes.Count > 0)
+ {
+ SimpleNameFilter nameFilter = new SimpleNameFilter();
+ foreach (XmlNode testNode in topNode.SelectNodes("tests/test"))
+ nameFilter.Add(testNode.InnerText);
+
+ result = nameFilter;
+ isEmptyResult = false;
+ }
+
+ if (includeNodes.Count > 0)
+ {
+ //CategoryFilter includeFilter = new CategoryFilter();
+ //foreach (XmlNode includeNode in includeNodes)
+ // includeFilter.AddCategory(includeNode.InnerText);
+
+ // Temporarily just look at the first element
+ XmlNode includeNode = includeNodes[0];
+ TestFilter includeFilter = new CategoryExpression(includeNode.InnerText).Filter;
+
+ if (isEmptyResult)
+ result = includeFilter;
+ else
+ result = new AndFilter(result, includeFilter);
+ isEmptyResult = false;
+ }
+
+ if (excludeNodes.Count > 0)
+ {
+ CategoryFilter categoryFilter = new CategoryFilter();
+ foreach (XmlNode excludeNode in excludeNodes)
+ categoryFilter.AddCategory(excludeNode.InnerText);
+ TestFilter excludeFilter = new NotFilter(categoryFilter);
+
+ if (isEmptyResult)
+ result = excludeFilter;
+ else
+ result = new AndFilter(result, excludeFilter);
+ isEmptyResult = false;
+ }
+
+ return result;
+ }
+#endif
+
+ /// <summary>
+ /// Nested class provides an empty filter - one that always
+ /// returns true when called, unless the test is marked explicit.
+ /// </summary>
+ [Serializable]
+ private class EmptyFilter : TestFilter
+ {
+ public override bool Match( ITest test )
+ {
+ return test.RunState != RunState.Explicit;
+ }
+
+ public override bool Pass( ITest test )
+ {
+ return test.RunState != RunState.Explicit;
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/TestFixtureBuilder.cs b/external/guiunit/src/framework/Internal/TestFixtureBuilder.cs
new file mode 100755
index 0000000..66a17c8
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TestFixtureBuilder.cs
@@ -0,0 +1,93 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+#if NUNITLITE
+using NUnit.Framework.Builders;
+#endif
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TestFixtureBuilder contains static methods for building
+ /// TestFixtures from types. It uses builtin SuiteBuilders
+ /// and any installed extensions to do it.
+ /// </summary>
+ public class TestFixtureBuilder
+ {
+#if NUNITLITE
+ private static Extensibility.ISuiteBuilder builder = new NUnitTestFixtureBuilder();
+#else
+ private static Extensibility.ISuiteBuilder builder = CoreExtensions.Host.SuiteBuilders;
+#endif
+
+ /// <summary>
+ /// Determines whether this instance [can build from] the specified type.
+ /// </summary>
+ /// <param name="type">The type.</param>
+ /// <returns>
+ /// <c>true</c> if this instance [can build from] the specified type; otherwise, <c>false</c>.
+ /// </returns>
+ public static bool CanBuildFrom( Type type )
+ {
+ return builder.CanBuildFrom(type);
+ }
+
+ /// <summary>
+ /// Build a test fixture from a given type.
+ /// </summary>
+ /// <param name="type">The type to be used for the fixture</param>
+ /// <returns>A TestSuite if the fixture can be built, null if not</returns>
+ public static Test BuildFrom( Type type )
+ {
+ Test suite = builder.BuildFrom( type );
+
+#if !NUNITLITE
+ if ( suite != null )
+ suite = CoreExtensions.Host.TestDecorators.Decorate( suite, type );
+#endif
+
+ return suite;
+ }
+
+ /// <summary>
+ /// Build a fixture from an object.
+ /// </summary>
+ /// <param name="fixture">The object to be used for the fixture</param>
+ /// <returns>A TestSuite if fixture type can be built, null if not</returns>
+ public static Test BuildFrom( object fixture )
+ {
+ Test suite = BuildFrom( fixture.GetType() );
+ if( suite != null)
+ suite.Fixture = fixture;
+ return suite;
+ }
+
+ /// <summary>
+ /// Private constructor to prevent instantiation
+ /// </summary>
+ private TestFixtureBuilder() { }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/TestListener.cs b/external/guiunit/src/framework/Internal/TestListener.cs
new file mode 100755
index 0000000..92c1528
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TestListener.cs
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TestListener provides an implementation of ITestListener that
+ /// does nothing. It is used only throught its NULL property.
+ /// </summary>
+ public class TestListener : ITestListener
+ {
+ static readonly TestListener NullListener = new TestListener ();
+
+ /// <summary>
+ /// Called when a test has just started
+ /// </summary>
+ /// <param name="test">The test that is starting</param>
+ public void TestStarted(ITest test){}
+
+ /// <summary>
+ /// Called when a test case has finished
+ /// </summary>
+ /// <param name="result">The result of the test</param>
+ public void TestFinished(ITestResult result){}
+
+ /// <summary>
+ /// Called when the test creates text output.
+ /// </summary>
+ /// <param name="testOutput">A console message</param>
+ public void TestOutput(TestOutput testOutput) {}
+
+ /// <summary>
+ /// Construct a new TestListener - private so it may not be used.
+ /// </summary>
+ private TestListener() { }
+
+ /// <summary>
+ /// Get a listener that does nothing
+ /// </summary>
+ public static ITestListener NULL
+ {
+ get { return NullListener; }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/ParameterizedFixtureSuite.cs b/external/guiunit/src/framework/Internal/Tests/ParameterizedFixtureSuite.cs
new file mode 100755
index 0000000..d925799
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/ParameterizedFixtureSuite.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// ParameterizedFixtureSuite serves as a container for the set of test
+ /// fixtures created from a given Type using various parameters.
+ /// </summary>
+ public class ParameterizedFixtureSuite : TestSuite
+ {
+ private Type type;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ParameterizedFixtureSuite"/> class.
+ /// </summary>
+ /// <param name="type">The type.</param>
+ public ParameterizedFixtureSuite(Type type) : base(type.Namespace, TypeHelper.GetDisplayName(type))
+ {
+ this.type = type;
+ }
+
+ /// <summary>
+ /// Gets the Type represented by this suite.
+ /// </summary>
+ /// <value>A Sysetm.Type.</value>
+ public Type ParameterizedType
+ {
+ get { return type; }
+ }
+
+ /// <summary>
+ /// Gets a string representing the type of test
+ /// </summary>
+ /// <value></value>
+ public override string TestType
+ {
+ get
+ {
+#if CLR_2_0 || CLR_4_0
+ if (this.ParameterizedType.ContainsGenericParameters)
+ return "GenericFixture";
+#endif
+
+ return "ParameterizedFixture";
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/ParameterizedMethodSuite.cs b/external/guiunit/src/framework/Internal/Tests/ParameterizedMethodSuite.cs
new file mode 100755
index 0000000..444fbe3
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/ParameterizedMethodSuite.cs
@@ -0,0 +1,95 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Internal.Commands;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// ParameterizedMethodSuite holds a collection of individual
+ /// TestMethods with their arguments applied.
+ /// </summary>
+ public class ParameterizedMethodSuite : TestSuite
+ {
+ private MethodInfo _method;
+ private bool _isTheory;
+
+ /// <summary>
+ /// Construct from a MethodInfo
+ /// </summary>
+ /// <param name="method"></param>
+ public ParameterizedMethodSuite(MethodInfo method)
+ : base(method.ReflectedType.FullName, method.Name)
+ {
+ _method = method;
+ _isTheory = method.IsDefined(typeof(TheoryAttribute), true);
+ this.maintainTestOrder = true;
+ }
+
+ /// <summary>
+ /// Gets the MethodInfo for which this suite is being built.
+ /// </summary>
+ public MethodInfo Method
+ {
+ get { return _method; }
+ }
+
+ /// <summary>
+ /// Gets a string representing the type of test
+ /// </summary>
+ /// <value></value>
+ public override string TestType
+ {
+ get
+ {
+ if (_isTheory)
+ return "Theory";
+
+#if CLR_2_0 || CLR_4_0
+ if (this.Method.ContainsGenericParameters)
+ return "GenericMethod";
+#endif
+
+ return "ParameterizedMethod";
+ }
+ }
+
+ /// <summary>
+ /// Gets the command to be executed after all the child
+ /// tests are run. Overridden in ParameterizedMethodSuite
+ /// to set the result to failure if all the child tests
+ /// were inconclusive.
+ /// </summary>
+ /// <returns></returns>
+ public override TestCommand GetOneTimeTearDownCommand()
+ {
+ TestCommand command = base.GetOneTimeTearDownCommand();
+
+ if (_isTheory)
+ command = new TheoryResultCommand(command);
+
+ return command;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/Test.cs b/external/guiunit/src/framework/Internal/Tests/Test.cs
new file mode 100755
index 0000000..35493cf
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/Test.cs
@@ -0,0 +1,415 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.WorkItems;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The Test abstract class represents a test within the framework.
+ /// </summary>
+ public abstract class Test : ITest, IComparable
+ {
+ #region Fields
+
+ /// <summary>
+ /// Static value to seed ids. It's started at 1000 so any
+ /// uninitialized ids will stand out.
+ /// </summary>
+ private static int nextID = 1000;
+
+ private int id;
+ private string name;
+ private string fullName;
+ private int seed;
+
+ /// <summary>
+ /// Indicates whether the test should be executed
+ /// </summary>
+ private RunState runState;
+
+ /// <summary>
+ /// Test suite containing this test, or null
+ /// </summary>
+ private ITest parent;
+
+ /// <summary>
+ /// A dictionary of properties, used to add information
+ /// to tests without requiring the class to change.
+ /// </summary>
+ private PropertyBag properties;
+
+ /// <summary>
+ /// The System.Type of the fixture for this test, if there is one
+ /// </summary>
+ private Type fixtureType;
+
+ /// <summary>
+ /// The fixture object, if it has been created
+ /// </summary>
+ private object fixture;
+
+ /// <summary>
+ /// The SetUp methods.
+ /// </summary>
+ protected MethodInfo[] setUpMethods;
+
+ /// <summary>
+ /// The teardown methods
+ /// </summary>
+ protected MethodInfo[] tearDownMethods;
+
+ #endregion
+
+ #region Construction
+
+ /// <summary>
+ /// Constructs a test given its name
+ /// </summary>
+ /// <param name="name">The name of the test</param>
+ protected Test( string name )
+ {
+ this.fullName = name;
+ this.name = name;
+ this.id = unchecked(nextID++);
+
+ this.runState = RunState.Runnable;
+ }
+
+ /// <summary>
+ /// Constructs a test given the path through the
+ /// test hierarchy to its parent and a name.
+ /// </summary>
+ /// <param name="pathName">The parent tests full name</param>
+ /// <param name="name">The name of the test</param>
+ protected Test( string pathName, string name )
+ {
+ this.fullName = pathName == null || pathName == string.Empty
+ ? name : pathName + "." + name;
+ this.name = name;
+ this.id = unchecked(nextID++);
+
+ this.runState = RunState.Runnable;
+ }
+
+ /// <summary>
+ /// TODO: Documentation needed for constructor
+ /// </summary>
+ /// <param name="fixtureType"></param>
+ protected Test(Type fixtureType) : this(fixtureType.FullName)
+ {
+ this.fixtureType = fixtureType;
+ }
+
+ #endregion
+
+ #region ITest Members
+
+ /// <summary>
+ /// Gets or sets the id of the test
+ /// </summary>
+ /// <value></value>
+ public int Id
+ {
+ get { return id; }
+ set { id = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the name of the test
+ /// </summary>
+ public string Name
+ {
+ get { return name; }
+ set { name = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the fully qualified name of the test
+ /// </summary>
+ /// <value></value>
+ public string FullName
+ {
+ get { return fullName; }
+ set { fullName = value; }
+ }
+
+ /// <summary>
+ /// Gets the Type of the fixture used in running this test
+ /// or null if no fixture type is associated with it.
+ /// </summary>
+ public Type FixtureType
+ {
+ get { return fixtureType; }
+ }
+
+ /// <summary>
+ /// Whether or not the test should be run
+ /// </summary>
+ public RunState RunState
+ {
+ get { return runState; }
+ set { runState = value; }
+ }
+
+ /// <summary>
+ /// Gets the name used for the top-level element in the
+ /// XML representation of this test
+ /// </summary>
+ public abstract string XmlElementName
+ {
+ get;
+ }
+
+ /// <summary>
+ /// Gets a string representing the type of test. Used as an attribute
+ /// value in the XML representation of a test and has no other
+ /// function in the framework.
+ /// </summary>
+ public virtual string TestType
+ {
+ get { return this.GetType().Name; }
+ }
+
+ /// <summary>
+ /// Gets a count of test cases represented by
+ /// or contained under this test.
+ /// </summary>
+ public virtual int TestCaseCount
+ {
+ get { return 1; }
+ }
+
+ /// <summary>
+ /// Gets the properties for this test
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get
+ {
+ if ( properties == null )
+ properties = new PropertyBag();
+
+ return properties;
+ }
+ }
+
+ /// <summary>
+ /// Gets a bool indicating whether the current test
+ /// has any descendant tests.
+ /// </summary>
+ public abstract bool HasChildren { get; }
+
+ /// <summary>
+ /// Gets the parent as a Test object.
+ /// Used by the core to set the parent.
+ /// </summary>
+ public ITest Parent
+ {
+ get { return parent; }
+ set { parent = value; }
+ }
+
+ /// <summary>
+ /// Gets or Sets the Int value representing the seed for the RandomGenerator
+ /// </summary>
+ /// <value></value>
+ public int Seed
+ {
+ get { return seed; }
+ set { seed = value; }
+ }
+
+ /// <summary>
+ /// Gets this test's child tests
+ /// </summary>
+ /// <value>A list of child tests</value>
+
+#if CLR_2_0 || CLR_4_0
+ public abstract System.Collections.Generic.IList<ITest> Tests { get; }
+#else
+ public abstract System.Collections.IList Tests { get; }
+#endif
+
+ #endregion
+
+ #region IXmlNodeBuilder Members
+
+ /// <summary>
+ /// Returns the Xml representation of the test
+ /// </summary>
+ /// <param name="recursive">If true, include child tests recursively</param>
+ /// <returns></returns>
+ public XmlNode ToXml(bool recursive)
+ {
+ XmlNode topNode = XmlNode.CreateTopLevelElement("dummy");
+
+ XmlNode thisNode = AddToXml(topNode, recursive);
+
+ return thisNode;
+ }
+
+ /// <summary>
+ /// Returns an XmlNode representing the current result after
+ /// adding it as a child of the supplied parent node.
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">If true, descendant results are included</param>
+ /// <returns></returns>
+ public abstract XmlNode AddToXml(XmlNode parentNode, bool recursive);
+
+ #endregion
+
+ #region IComparable Members
+
+ /// <summary>
+ /// Compares this test to another test for sorting purposes
+ /// </summary>
+ /// <param name="obj">The other test</param>
+ /// <returns>Value of -1, 0 or +1 depending on whether the current test is less than, equal to or greater than the other test</returns>
+ public int CompareTo(object obj)
+ {
+ Test other = obj as Test;
+
+ if (other == null)
+ return -1;
+
+ return this.FullName.CompareTo(other.FullName);
+ }
+
+ #endregion
+
+ #region Other Public Methods
+
+ /// <summary>
+ /// Creates a TestResult for this test.
+ /// </summary>
+ /// <returns>A TestResult suitable for this type of test.</returns>
+ public abstract TestResult MakeTestResult();
+
+ ///// <summary>
+ ///// Gets a count of test cases that would be run using
+ ///// the specified filter.
+ ///// </summary>
+ ///// <param name="filter"></param>
+ ///// <returns></returns>
+ //public virtual int CountTestCases(TestFilter filter)
+ //{
+ // if (filter.Pass(this))
+ // return 1;
+
+ // return 0;
+ //}
+
+ /// <summary>
+ /// Modify a newly constructed test by applying any of NUnit's common
+ /// attributes, based on a supplied ICustomAttributeProvider, which is
+ /// usually the reflection element from which the test was constructed,
+ /// but may not be in some instances. The attributes retrieved are
+ /// saved for use in subsequent operations.
+ /// </summary>
+ /// <param name="provider">An object implementing ICustomAttributeProvider</param>
+ public void ApplyAttributesToTest(ICustomAttributeProvider provider)
+ {
+ foreach (IApplyToTest iApply in provider.GetCustomAttributes(typeof(IApplyToTest), true))
+ iApply.ApplyToTest(this);
+ }
+
+ #endregion
+
+ #region Protected Methods
+
+ /// <summary>
+ /// Add standard attributes and members to a test node.
+ /// </summary>
+ /// <param name="thisNode"></param>
+ /// <param name="recursive"></param>
+ protected void PopulateTestNode(XmlNode thisNode, bool recursive)
+ {
+ thisNode.AddAttribute("id", this.Id.ToString());
+ thisNode.AddAttribute("name", this.Name);
+ thisNode.AddAttribute("fullname", this.FullName);
+
+ if (Properties.Count > 0)
+ Properties.AddToXml(thisNode, recursive);
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ /// <summary>
+ /// Gets or sets a fixture object for running this test.
+ /// Provided for use by LegacySuiteBuilder.
+ /// </summary>
+ internal object Fixture
+ {
+ get { return fixture; }
+ set { fixture = value; }
+ }
+
+ /// <summary>
+ /// Gets the set up methods.
+ /// </summary>
+ /// <returns></returns>
+ internal virtual MethodInfo[] SetUpMethods
+ {
+ get
+ {
+ if (setUpMethods == null && this.Parent != null)
+ {
+ TestSuite suite = this.Parent as TestSuite;
+ if (suite != null)
+ setUpMethods = suite.SetUpMethods;
+ }
+
+ return setUpMethods;
+ }
+ }
+
+ /// <summary>
+ /// Gets the tear down methods.
+ /// </summary>
+ /// <returns></returns>
+ internal virtual MethodInfo[] TearDownMethods
+ {
+ get
+ {
+ if (tearDownMethods == null && this.Parent != null)
+ {
+ TestSuite suite = this.Parent as TestSuite;
+ if (suite != null)
+ tearDownMethods = suite.TearDownMethods;
+ }
+
+ return tearDownMethods;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/TestAssembly.cs b/external/guiunit/src/framework/Internal/Tests/TestAssembly.cs
new file mode 100755
index 0000000..b50ec7d
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/TestAssembly.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.IO;
+using System.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TestAssembly is a TestSuite that represents the execution
+ /// of tests in a managed assembly.
+ /// </summary>
+ public class TestAssembly : TestSuite
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestAssembly"/> class.
+ /// </summary>
+ /// <param name="assembly">The assembly containing the tests.</param>
+ /// <param name="path">The path used to load the assembly.</param>
+ public TestAssembly(Assembly assembly, string path) : base(path)
+ {
+ this.Name = Path.GetFileName(path);
+ }
+
+ /// <summary>
+ /// Gets the name used for the top-level element in the
+ /// XML representation of this test
+ /// </summary>
+ public override string TestType
+ {
+ get
+ {
+ return "Assembly";
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/TestFixture.cs b/external/guiunit/src/framework/Internal/Tests/TestFixture.cs
new file mode 100755
index 0000000..d5c6d73
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/TestFixture.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TestFixture is a surrogate for a user test fixture class,
+ /// containing one or more tests.
+ /// </summary>
+ public class TestFixture : TestSuite
+ {
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestFixture"/> class.
+ /// </summary>
+ /// <param name="fixtureType">Type of the fixture.</param>
+ public TestFixture(Type fixtureType)
+ : this(fixtureType, null) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestFixture"/> class.
+ /// </summary>
+ /// <param name="fixtureType">Type of the fixture.</param>
+ /// <param name="arguments">The arguments.</param>
+ public TestFixture(Type fixtureType, object[] arguments)
+ : base(fixtureType, arguments)
+ {
+ this.setUpMethods = Reflect.GetMethodsWithAttribute(FixtureType, typeof(SetUpAttribute), true);
+ this.tearDownMethods = Reflect.GetMethodsWithAttribute(FixtureType, typeof(TearDownAttribute), true);
+ }
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/TestMethod.cs b/external/guiunit/src/framework/Internal/Tests/TestMethod.cs
new file mode 100755
index 0000000..89a3f14
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/TestMethod.cs
@@ -0,0 +1,252 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.WorkItems;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The TestMethod class represents a Test implemented as a method.
+ /// Because of how exceptions are handled internally, this class
+ /// must incorporate processing of expected exceptions. A change to
+ /// the Test interface might make it easier to process exceptions
+ /// in an object that aggregates a TestMethod in the future.
+ /// </summary>
+ public class TestMethod : Test
+ {
+ #region Fields
+
+ /// <summary>
+ /// The test method
+ /// </summary>
+ internal MethodInfo method;
+
+ /// <summary>
+ /// A list of all decorators applied to the test by attributes or parameterset arguments
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ private List<ICommandDecorator> decorators = new List<ICommandDecorator>();
+#else
+ private System.Collections.ArrayList decorators = new System.Collections.ArrayList();
+#endif
+
+ /// <summary>
+ /// The ParameterSet used to create this test method
+ /// </summary>
+ internal ParameterSet parms;
+
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestMethod"/> class.
+ /// </summary>
+ /// <param name="method">The method to be used as a test.</param>
+ /// <param name="parentSuite">The suite or fixture to which the new test will be added</param>
+ public TestMethod(MethodInfo method, Test parentSuite)
+ : base( method.ReflectedType )
+ {
+ this.Name = method.Name;
+ this.FullName += "." + this.Name;
+
+ // Disambiguate call to base class methods
+ // TODO: This should not be here - it's a presentation issue
+ if( method.DeclaringType != method.ReflectedType)
+ this.Name = method.DeclaringType.Name + "." + method.Name;
+
+ // Needed to give proper fullname to test in a parameterized fixture.
+ // Without this, the arguments to the fixture are not included.
+ string prefix = method.ReflectedType.FullName;
+ if (parentSuite != null)
+ {
+ prefix = parentSuite.FullName;
+ this.FullName = prefix + "." + this.Name;
+ }
+
+ this.method = method;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the method.
+ /// </summary>
+ /// <value>The method that performs the test.</value>
+ public MethodInfo Method
+ {
+ get { return method; }
+ }
+
+ /// <summary>
+ /// Gets a list of custom decorators for this test.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public IList<ICommandDecorator> CustomDecorators
+#else
+ public System.Collections.IList CustomDecorators
+#endif
+ {
+ get { return decorators; }
+ }
+
+ internal bool HasExpectedResult
+ {
+ get { return parms != null && parms.HasExpectedResult; }
+ }
+
+ internal object ExpectedResult
+ {
+ get { return parms != null ? parms.ExpectedResult : null; }
+ }
+
+ internal object[] Arguments
+ {
+ get { return parms != null ? parms.Arguments : null; }
+ }
+
+ internal bool IsAsync
+ {
+ get
+ {
+#if NET_4_5
+ return method.IsDefined(typeof(System.Runtime.CompilerServices.AsyncStateMachineAttribute), false);
+#else
+ return false;
+#endif
+ }
+ }
+
+ #endregion
+
+ #region Test Overrides
+
+ /// <summary>
+ /// Overridden to return a TestCaseResult.
+ /// </summary>
+ /// <returns>A TestResult for this test.</returns>
+ public override TestResult MakeTestResult()
+ {
+ return new TestCaseResult(this);
+ }
+
+ /// <summary>
+ /// Gets a bool indicating whether the current test
+ /// has any descendant tests.
+ /// </summary>
+ public override bool HasChildren
+ {
+ get { return false; }
+ }
+
+ /// <summary>
+ /// Returns an XmlNode representing the current result after
+ /// adding it as a child of the supplied parent node.
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">If true, descendant results are included</param>
+ /// <returns></returns>
+ public override XmlNode AddToXml(XmlNode parentNode, bool recursive)
+ {
+ XmlNode thisNode = parentNode.AddElement(XmlElementName);
+
+ PopulateTestNode(thisNode, recursive);
+
+ return thisNode;
+ }
+
+ /// <summary>
+ /// Gets this test's child tests
+ /// </summary>
+ /// <value>A list of child tests</value>
+#if CLR_2_0 || CLR_4_0
+ public override IList<ITest> Tests
+#else
+ public override System.Collections.IList Tests
+#endif
+ {
+ get { return new ITest[0]; }
+ }
+
+ /// <summary>
+ /// Gets the name used for the top-level element in the
+ /// XML representation of this test
+ /// </summary>
+ public override string XmlElementName
+ {
+ get { return "test-case"; }
+ }
+
+ /// <summary>
+ /// Creates a test command for use in running this test.
+ /// </summary>
+ /// <returns></returns>
+ public virtual TestCommand GetTestCommand()
+ {
+ TestCommand command = new TestMethodCommand(this);
+
+ command = ApplyDecoratorsToCommand(command);
+
+ IApplyToContext[] changes = (IApplyToContext[])this.Method.GetCustomAttributes(typeof(IApplyToContext), true);
+ if (changes.Length > 0)
+ command = new ApplyChangesToContextCommand(command, changes);
+
+ return command;
+ }
+
+ #endregion
+
+ #region Helper Methods
+
+ private TestCommand ApplyDecoratorsToCommand(TestCommand command)
+ {
+ CommandDecoratorList decorators = new CommandDecoratorList();
+
+ // Add Standard stuff
+ decorators.Add(new SetUpTearDownDecorator());
+
+ // Add Decorators supplied by attributes and parameter sets
+ foreach (ICommandDecorator decorator in CustomDecorators)
+ decorators.Add(decorator);
+
+ decorators.OrderByStage();
+
+ foreach (ICommandDecorator decorator in decorators)
+ {
+ command = decorator.Decorate(command);
+ }
+
+ return command;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/Tests/TestSuite.cs b/external/guiunit/src/framework/Internal/Tests/TestSuite.cs
new file mode 100755
index 0000000..0736299
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/Tests/TestSuite.cs
@@ -0,0 +1,301 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#else
+using System.Collections;
+#endif
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.WorkItems;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TestSuite represents a composite test, which contains other tests.
+ /// </summary>
+ public class TestSuite : Test
+ {
+ #region Fields
+
+ /// <summary>
+ /// Our collection of child tests
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ private List<ITest> tests = new List<ITest>();
+#else
+ private ArrayList tests = new ArrayList();
+#endif
+
+ /// <summary>
+ /// Set to true to suppress sorting this suite's contents
+ /// </summary>
+ protected bool maintainTestOrder;
+
+ /// <summary>
+ /// Argument list for use in creating the fixture.
+ /// </summary>
+ internal object[] arguments;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestSuite"/> class.
+ /// </summary>
+ /// <param name="name">The name of the suite.</param>
+ public TestSuite( string name )
+ : base( name ) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestSuite"/> class.
+ /// </summary>
+ /// <param name="parentSuiteName">Name of the parent suite.</param>
+ /// <param name="name">The name of the suite.</param>
+ public TestSuite( string parentSuiteName, string name )
+ : base( parentSuiteName, name ) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestSuite"/> class.
+ /// </summary>
+ /// <param name="fixtureType">Type of the fixture.</param>
+ public TestSuite(Type fixtureType)
+ : this(fixtureType, null) { }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="TestSuite"/> class.
+ /// </summary>
+ /// <param name="fixtureType">Type of the fixture.</param>
+ /// <param name="arguments">The arguments.</param>
+ public TestSuite(Type fixtureType, object[] arguments)
+ : base(fixtureType)
+ {
+ string name = TypeHelper.GetDisplayName(fixtureType, arguments);
+ this.Name = name;
+
+ this.FullName = name;
+ string nspace = fixtureType.Namespace;
+ if (nspace != null && nspace != "")
+ this.FullName = nspace + "." + name;
+ this.arguments = arguments;
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Sorts tests under this suite.
+ /// </summary>
+ public void Sort()
+ {
+ if (!maintainTestOrder)
+ {
+ this.tests.Sort();
+
+ foreach (Test test in Tests)
+ {
+ TestSuite suite = test as TestSuite;
+ if (suite != null)
+ suite.Sort();
+ }
+ }
+ }
+
+#if false
+ /// <summary>
+ /// Sorts tests under this suite using the specified comparer.
+ /// </summary>
+ /// <param name="comparer">The comparer.</param>
+ public void Sort(IComparer comparer)
+ {
+ this.tests.Sort(comparer);
+
+ foreach( Test test in Tests )
+ {
+ TestSuite suite = test as TestSuite;
+ if ( suite != null )
+ suite.Sort(comparer);
+ }
+ }
+#endif
+
+ /// <summary>
+ /// Adds a test to the suite.
+ /// </summary>
+ /// <param name="test">The test.</param>
+ public void Add( Test test )
+ {
+// if( test.RunState == RunState.Runnable )
+// {
+// test.RunState = this.RunState;
+// test.IgnoreReason = this.IgnoreReason;
+// }
+ test.Parent = this;
+ tests.Add(test);
+ }
+
+#if !NUNITLITE
+ /// <summary>
+ /// Adds a pre-constructed test fixture to the suite.
+ /// </summary>
+ /// <param name="fixture">The fixture.</param>
+ public void Add( object fixture )
+ {
+ Test test = TestFixtureBuilder.BuildFrom( fixture );
+ if ( test != null )
+ Add( test );
+ }
+#endif
+
+ /// <summary>
+ /// Gets the command to be executed before any of
+ /// the child tests are run.
+ /// </summary>
+ /// <returns>A TestCommand</returns>
+ public virtual TestCommand GetOneTimeSetUpCommand()
+ {
+ TestCommand command = new OneTimeSetUpCommand(this);
+
+ if (this.FixtureType != null)
+ {
+ IApplyToContext[] changes = (IApplyToContext[])this.FixtureType.GetCustomAttributes(typeof(IApplyToContext), true);
+ if (changes.Length > 0)
+ command = new ApplyChangesToContextCommand(command, changes);
+ }
+
+ return command;
+ }
+
+ /// <summary>
+ /// Gets the command to be executed after all of the
+ /// child tests are run.
+ /// </summary>
+ /// <returns>A TestCommand</returns>
+ public virtual TestCommand GetOneTimeTearDownCommand()
+ {
+ TestCommand command = new OneTimeTearDownCommand(this);
+
+ return command;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets this test's child tests
+ /// </summary>
+ /// <value>The list of child tests</value>
+#if CLR_2_0 || CLR_4_0
+ public override IList<ITest> Tests
+#else
+ public override IList Tests
+#endif
+ {
+ get { return tests; }
+ }
+
+ /// <summary>
+ /// Gets a count of test cases represented by
+ /// or contained under this test.
+ /// </summary>
+ /// <value></value>
+ public override int TestCaseCount
+ {
+ get
+ {
+ int count = 0;
+
+ foreach(Test test in Tests)
+ {
+ count += test.TestCaseCount;
+ }
+ return count;
+ }
+ }
+
+ #endregion
+
+ #region Test Overrides
+
+ /// <summary>
+ /// Overridden to return a TestSuiteResult.
+ /// </summary>
+ /// <returns>A TestResult for this test.</returns>
+ public override TestResult MakeTestResult()
+ {
+ return new TestSuiteResult(this);
+ }
+
+ /// <summary>
+ /// Gets a bool indicating whether the current test
+ /// has any descendant tests.
+ /// </summary>
+ public override bool HasChildren
+ {
+ get
+ {
+ return tests.Count > 0;
+ }
+ }
+
+ /// <summary>
+ /// Gets the name used for the top-level element in the
+ /// XML representation of this test
+ /// </summary>
+ public override string XmlElementName
+ {
+ get { return "test-suite"; }
+ }
+
+ /// <summary>
+ /// Returns an XmlNode representing the current result after
+ /// adding it as a child of the supplied parent node.
+ /// </summary>
+ /// <param name="parentNode">The parent node.</param>
+ /// <param name="recursive">If true, descendant results are included</param>
+ /// <returns></returns>
+ public override XmlNode AddToXml(XmlNode parentNode, bool recursive)
+ {
+ XmlNode thisNode = parentNode.AddElement("test-suite");
+ thisNode.AddAttribute("type", this.TestType);
+
+ PopulateTestNode(thisNode, recursive);
+ thisNode.AddAttribute("testcasecount", this.TestCaseCount.ToString());
+
+
+ if (recursive)
+ foreach (Test test in this.Tests)
+ test.AddToXml(thisNode, recursive);
+
+ return thisNode;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/TextMessageWriter.cs b/external/guiunit/src/framework/Internal/TextMessageWriter.cs
new file mode 100755
index 0000000..1de2ca4
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TextMessageWriter.cs
@@ -0,0 +1,489 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using System.Globalization;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TextMessageWriter writes constraint descriptions and messages
+ /// in displayable form as a text stream. It tailors the display
+ /// of individual message components to form the standard message
+ /// format of NUnit assertion failure messages.
+ /// </summary>
+ public class TextMessageWriter : MessageWriter
+ {
+ #region Message Formats and Constants
+ private static readonly int DEFAULT_LINE_LENGTH = 78;
+
+ // Prefixes used in all failure messages. All must be the same
+ // length, which is held in the PrefixLength field. Should not
+ // contain any tabs or newline characters.
+ /// <summary>
+ /// Prefix used for the expected value line of a message
+ /// </summary>
+ public static readonly string Pfx_Expected = " Expected: ";
+ /// <summary>
+ /// Prefix used for the actual value line of a message
+ /// </summary>
+ public static readonly string Pfx_Actual = " But was: ";
+ /// <summary>
+ /// Length of a message prefix
+ /// </summary>
+ public static readonly int PrefixLength = Pfx_Expected.Length;
+
+ private static readonly string Fmt_Connector = " {0} ";
+ private static readonly string Fmt_Predicate = "{0} ";
+ //private static readonly string Fmt_Label = "{0}";
+ private static readonly string Fmt_Modifier = ", {0}";
+
+ private static readonly string Fmt_Null = "null";
+ private static readonly string Fmt_EmptyString = "<string.Empty>";
+ private static readonly string Fmt_EmptyCollection = "<empty>";
+
+ private static readonly string Fmt_String = "\"{0}\"";
+ private static readonly string Fmt_Char = "'{0}'";
+ private static readonly string Fmt_DateTime = "yyyy-MM-dd HH:mm:ss.fff";
+ private static readonly string Fmt_ValueType = "{0}";
+ private static readonly string Fmt_Default = "<{0}>";
+ #endregion
+
+ private int maxLineLength = DEFAULT_LINE_LENGTH;
+
+ #region Constructors
+ /// <summary>
+ /// Construct a TextMessageWriter
+ /// </summary>
+ public TextMessageWriter() { }
+
+ /// <summary>
+ /// Construct a TextMessageWriter, specifying a user message
+ /// and optional formatting arguments.
+ /// </summary>
+ /// <param name="userMessage"></param>
+ /// <param name="args"></param>
+ public TextMessageWriter(string userMessage, params object[] args)
+ {
+ if ( userMessage != null && userMessage != string.Empty)
+ this.WriteMessageLine(userMessage, args);
+ }
+ #endregion
+
+ #region Properties
+ /// <summary>
+ /// Gets or sets the maximum line length for this writer
+ /// </summary>
+ public override int MaxLineLength
+ {
+ get { return maxLineLength; }
+ set { maxLineLength = value; }
+ }
+ #endregion
+
+ #region Public Methods - High Level
+ /// <summary>
+ /// Method to write single line message with optional args, usually
+ /// written to precede the general failure message, at a givel
+ /// indentation level.
+ /// </summary>
+ /// <param name="level">The indentation level of the message</param>
+ /// <param name="message">The message to be written</param>
+ /// <param name="args">Any arguments used in formatting the message</param>
+ public override void WriteMessageLine(int level, string message, params object[] args)
+ {
+ if (message != null)
+ {
+ while (level-- >= 0) Write(" ");
+
+ if (args != null && args.Length > 0)
+ message = string.Format(message, args);
+
+ WriteLine(message);
+ }
+ }
+
+ /// <summary>
+ /// Display Expected and Actual lines for a constraint. This
+ /// is called by MessageWriter's default implementation of
+ /// WriteMessageTo and provides the generic two-line display.
+ /// </summary>
+ /// <param name="constraint">The constraint that failed</param>
+ public override void DisplayDifferences(Constraint constraint)
+ {
+ WriteExpectedLine(constraint);
+ WriteActualLine(constraint);
+ }
+
+ /// <summary>
+ /// Display Expected and Actual lines for given values. This
+ /// method may be called by constraints that need more control over
+ /// the display of actual and expected values than is provided
+ /// by the default implementation.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value causing the failure</param>
+ public override void DisplayDifferences(object expected, object actual)
+ {
+ WriteExpectedLine(expected);
+ WriteActualLine(actual);
+ }
+
+ /// <summary>
+ /// Display Expected and Actual lines for given values, including
+ /// a tolerance value on the expected line.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="actual">The actual value causing the failure</param>
+ /// <param name="tolerance">The tolerance within which the test was made</param>
+ public override void DisplayDifferences(object expected, object actual, Tolerance tolerance)
+ {
+ WriteExpectedLine(expected, tolerance);
+ WriteActualLine(actual);
+ }
+
+ /// <summary>
+ /// Display the expected and actual string values on separate lines.
+ /// If the mismatch parameter is >=0, an additional line is displayed
+ /// line containing a caret that points to the mismatch point.
+ /// </summary>
+ /// <param name="expected">The expected string value</param>
+ /// <param name="actual">The actual string value</param>
+ /// <param name="mismatch">The point at which the strings don't match or -1</param>
+ /// <param name="ignoreCase">If true, case is ignored in string comparisons</param>
+ /// <param name="clipping">If true, clip the strings to fit the max line length</param>
+ public override void DisplayStringDifferences(string expected, string actual, int mismatch, bool ignoreCase, bool clipping)
+ {
+ // Maximum string we can display without truncating
+ int maxDisplayLength = MaxLineLength
+ - PrefixLength // Allow for prefix
+ - 2; // 2 quotation marks
+
+ if ( clipping )
+ MsgUtils.ClipExpectedAndActual(ref expected, ref actual, maxDisplayLength, mismatch);
+
+ expected = MsgUtils.EscapeControlChars(expected);
+ actual = MsgUtils.EscapeControlChars(actual);
+
+ // The mismatch position may have changed due to clipping or white space conversion
+ mismatch = MsgUtils.FindMismatchPosition(expected, actual, 0, ignoreCase);
+
+ Write( Pfx_Expected );
+ WriteExpectedValue( expected );
+ if ( ignoreCase )
+ WriteModifier( "ignoring case" );
+ WriteLine();
+ WriteActualLine( actual );
+ //DisplayDifferences(expected, actual);
+ if (mismatch >= 0)
+ WriteCaretLine(mismatch);
+ }
+ #endregion
+
+ #region Public Methods - Low Level
+ /// <summary>
+ /// Writes the text for a connector.
+ /// </summary>
+ /// <param name="connector">The connector.</param>
+ public override void WriteConnector(string connector)
+ {
+ Write(Fmt_Connector, connector);
+ }
+
+ /// <summary>
+ /// Writes the text for a predicate.
+ /// </summary>
+ /// <param name="predicate">The predicate.</param>
+ public override void WritePredicate(string predicate)
+ {
+ Write(Fmt_Predicate, predicate);
+ }
+
+ //public override void WriteLabel(string label)
+ //{
+ // Write(Fmt_Label, label);
+ //}
+
+ /// <summary>
+ /// Write the text for a modifier.
+ /// </summary>
+ /// <param name="modifier">The modifier.</param>
+ public override void WriteModifier(string modifier)
+ {
+ Write(Fmt_Modifier, modifier);
+ }
+
+
+ /// <summary>
+ /// Writes the text for an expected value.
+ /// </summary>
+ /// <param name="expected">The expected value.</param>
+ public override void WriteExpectedValue(object expected)
+ {
+ WriteValue(expected);
+ }
+
+ /// <summary>
+ /// Writes the text for an actual value.
+ /// </summary>
+ /// <param name="actual">The actual value.</param>
+ public override void WriteActualValue(object actual)
+ {
+ WriteValue(actual);
+ }
+
+ /// <summary>
+ /// Writes the text for a generalized value.
+ /// </summary>
+ /// <param name="val">The value.</param>
+ public override void WriteValue(object val)
+ {
+ if (val == null)
+ Write(Fmt_Null);
+ else if (val.GetType().IsArray)
+ WriteArray((Array)val);
+ else if (val is string)
+ WriteString((string)val);
+ else if (val is IEnumerable)
+ WriteCollectionElements((IEnumerable)val, 0, 10);
+ else if (val is char)
+ WriteChar((char)val);
+ else if (val is double)
+ WriteDouble((double)val);
+ else if (val is float)
+ WriteFloat((float)val);
+ else if (val is decimal)
+ WriteDecimal((decimal)val);
+ else if (val is DateTime)
+ WriteDateTime((DateTime)val);
+ else if (val.GetType().IsValueType)
+ Write(Fmt_ValueType, val);
+ else
+ Write(Fmt_Default, val);
+ }
+
+ /// <summary>
+ /// Writes the text for a collection value,
+ /// starting at a particular point, to a max length
+ /// </summary>
+ /// <param name="collection">The collection containing elements to write.</param>
+ /// <param name="start">The starting point of the elements to write</param>
+ /// <param name="max">The maximum number of elements to write</param>
+ public override void WriteCollectionElements(IEnumerable collection, int start, int max)
+ {
+ int count = 0;
+ int index = 0;
+
+ foreach (object obj in collection)
+ {
+ if ( index++ >= start)
+ {
+ if (++count > max)
+ break;
+ Write(count == 1 ? "< " : ", ");
+ WriteValue(obj);
+ }
+ }
+
+ if (count == 0)
+ {
+ Write(Fmt_EmptyCollection);
+ return;
+ }
+
+ if (count > max)
+ Write("...");
+
+ Write(" >");
+ }
+
+ private void WriteArray(Array array)
+ {
+ if ( array.Length == 0 )
+ {
+ Write( Fmt_EmptyCollection );
+ return;
+ }
+
+ int rank = array.Rank;
+ int[] products = new int[rank];
+
+ for (int product = 1, r = rank; --r >= 0; )
+ products[r] = product *= array.GetLength(r);
+
+ int count = 0;
+ foreach (object obj in array)
+ {
+ if (count > 0)
+ Write(", ");
+
+ bool startSegment = false;
+ for (int r = 0; r < rank; r++)
+ {
+ startSegment = startSegment || count % products[r] == 0;
+ if (startSegment) Write("< ");
+ }
+
+ WriteValue(obj);
+
+ ++count;
+
+ bool nextSegment = false;
+ for (int r = 0; r < rank; r++)
+ {
+ nextSegment = nextSegment || count % products[r] == 0;
+ if (nextSegment) Write(" >");
+ }
+ }
+ }
+
+ private void WriteString(string s)
+ {
+ if (s == string.Empty)
+ Write(Fmt_EmptyString);
+ else
+ Write(Fmt_String, s);
+ }
+
+ private void WriteChar(char c)
+ {
+ Write(Fmt_Char, c);
+ }
+
+ private void WriteDouble(double d)
+ {
+
+ if (double.IsNaN(d) || double.IsInfinity(d))
+ Write(d);
+ else
+ {
+ string s = d.ToString("G17", CultureInfo.InvariantCulture);
+
+ if (s.IndexOf('.') > 0)
+ Write(s + "d");
+ else
+ Write(s + ".0d");
+ }
+ }
+
+ private void WriteFloat(float f)
+ {
+ if (float.IsNaN(f) || float.IsInfinity(f))
+ Write(f);
+ else
+ {
+ string s = f.ToString("G9", CultureInfo.InvariantCulture);
+
+ if (s.IndexOf('.') > 0)
+ Write(s + "f");
+ else
+ Write(s + ".0f");
+ }
+ }
+
+ private void WriteDecimal(Decimal d)
+ {
+ Write(d.ToString("G29", CultureInfo.InvariantCulture) + "m");
+ }
+
+ private void WriteDateTime(DateTime dt)
+ {
+ Write(dt.ToString(Fmt_DateTime, CultureInfo.InvariantCulture));
+ }
+ #endregion
+
+ #region Helper Methods
+ /// <summary>
+ /// Write the generic 'Expected' line for a constraint
+ /// </summary>
+ /// <param name="constraint">The constraint that failed</param>
+ private void WriteExpectedLine(Constraint constraint)
+ {
+ Write(Pfx_Expected);
+ constraint.WriteDescriptionTo(this);
+ WriteLine();
+ }
+
+ /// <summary>
+ /// Write the generic 'Expected' line for a given value
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ private void WriteExpectedLine(object expected)
+ {
+ WriteExpectedLine(expected, null);
+ }
+
+ /// <summary>
+ /// Write the generic 'Expected' line for a given value
+ /// and tolerance.
+ /// </summary>
+ /// <param name="expected">The expected value</param>
+ /// <param name="tolerance">The tolerance within which the test was made</param>
+ private void WriteExpectedLine(object expected, Tolerance tolerance)
+ {
+ Write(Pfx_Expected);
+ WriteExpectedValue(expected);
+
+ if (tolerance != null && !tolerance.IsEmpty)
+ {
+ WriteConnector("+/-");
+ WriteExpectedValue(tolerance.Value);
+ if (tolerance.Mode != ToleranceMode.Linear)
+ Write(" {0}", tolerance.Mode);
+ }
+
+ WriteLine();
+ }
+
+ /// <summary>
+ /// Write the generic 'Actual' line for a constraint
+ /// </summary>
+ /// <param name="constraint">The constraint for which the actual value is to be written</param>
+ private void WriteActualLine(Constraint constraint)
+ {
+ Write(Pfx_Actual);
+ constraint.WriteActualValueTo(this);
+ WriteLine();
+ }
+
+ /// <summary>
+ /// Write the generic 'Actual' line for a given value
+ /// </summary>
+ /// <param name="actual">The actual value causing a failure</param>
+ private void WriteActualLine(object actual)
+ {
+ Write(Pfx_Actual);
+ WriteActualValue(actual);
+ WriteLine();
+ }
+
+ private void WriteCaretLine(int mismatch)
+ {
+ // We subtract 2 for the initial 2 blanks and add back 1 for the initial quote
+ WriteLine(" {0}^", new string('-', PrefixLength + mismatch - 2 + 1));
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/ThreadUtility.cs b/external/guiunit/src/framework/Internal/ThreadUtility.cs
new file mode 100755
index 0000000..f526247
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/ThreadUtility.cs
@@ -0,0 +1,74 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF && !SILVERLIGHT
+using System;
+using System.Threading;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// The ThreadUtility class encapsulates several static methods
+ /// useful when working with threads.
+ /// </summary>
+ public class ThreadUtility
+ {
+ /// <summary>
+ /// Do our best to Kill a thread
+ /// </summary>
+ /// <param name="thread">The thread to kill</param>
+ public static void Kill(Thread thread)
+ {
+ Kill(thread, null);
+ }
+
+ /// <summary>
+ /// Do our best to kill a thread, passing state info
+ /// </summary>
+ /// <param name="thread">The thread to kill</param>
+ /// <param name="stateInfo">Info for the ThreadAbortException handler</param>
+ public static void Kill(Thread thread, object stateInfo)
+ {
+ try
+ {
+ if (stateInfo == null)
+ thread.Abort();
+ else
+ thread.Abort(stateInfo);
+ }
+ catch (ThreadStateException)
+ {
+ // Although obsolete, this use of Resume() takes care of
+ // the odd case where a ThreadStateException is received
+ // so we continue to use it.
+ thread.Resume();
+ }
+
+ if ( (thread.ThreadState & ThreadState.WaitSleepJoin) != 0 )
+ thread.Interrupt();
+ }
+
+ private ThreadUtility() { }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Internal/TypeHelper.cs b/external/guiunit/src/framework/Internal/TypeHelper.cs
new file mode 100755
index 0000000..9a0ed06
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/TypeHelper.cs
@@ -0,0 +1,340 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.Reflection;
+using System.Text;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// TypeHelper provides static methods that operate on Types.
+ /// </summary>
+ public class TypeHelper
+ {
+ /// <summary>
+ /// Gets the display name for a Type as used by NUnit.
+ /// </summary>
+ /// <param name="type">The Type for which a display name is needed.</param>
+ /// <returns>The display name for the Type</returns>
+ public static string GetDisplayName(Type type)
+ {
+#if CLR_2_0 || CLR_4_0
+ if (type.IsGenericParameter)
+ return type.Name;
+
+ if (type.IsGenericType)
+ {
+ string name = type.FullName;
+ int index = name.IndexOf('[');
+ if (index >= 0) name = name.Substring(0, index);
+
+ index = name.LastIndexOf('.');
+ if (index >= 0) name = name.Substring(index+1);
+
+ index = name.IndexOf('`');
+ if (index >= 0) name = name.Substring(0, index);
+
+ StringBuilder sb = new StringBuilder(name);
+
+ sb.Append("<");
+ int cnt = 0;
+ foreach (Type t in type.GetGenericArguments())
+ {
+ if (cnt++ > 0) sb.Append(",");
+ sb.Append(GetDisplayName(t));
+ }
+ sb.Append(">");
+
+ return sb.ToString();
+ }
+#endif
+
+ int lastdot = type.FullName.LastIndexOf('.');
+ return lastdot >= 0
+ ? type.FullName.Substring(lastdot+1)
+ : type.FullName;
+ }
+
+ /// <summary>
+ /// Gets the display name for a Type as used by NUnit.
+ /// </summary>
+ /// <param name="type">The Type for which a display name is needed.</param>
+ /// <param name="arglist">The arglist provided.</param>
+ /// <returns>The display name for the Type</returns>
+ public static string GetDisplayName(Type type, object[] arglist)
+ {
+ string baseName = GetDisplayName(type);
+ if (arglist == null || arglist.Length == 0)
+ return baseName;
+
+ StringBuilder sb = new StringBuilder( baseName );
+
+ sb.Append("(");
+ for (int i = 0; i < arglist.Length; i++)
+ {
+ if (i > 0) sb.Append(",");
+
+ object arg = arglist[i];
+ string display = arg == null ? "null" : arg.ToString();
+
+ if (arg is double || arg is float)
+ {
+ if (display.IndexOf('.') == -1)
+ display += ".0";
+ display += arg is double ? "d" : "f";
+ }
+ else if (arg is decimal) display += "m";
+ else if (arg is long) display += "L";
+ else if (arg is ulong) display += "UL";
+ else if (arg is string) display = "\"" + display + "\"";
+
+ sb.Append(display);
+ }
+ sb.Append(")");
+
+ return sb.ToString();
+ }
+
+ /// <summary>
+ /// Returns the best fit for a common type to be used in
+ /// matching actual arguments to a methods Type parameters.
+ /// </summary>
+ /// <param name="type1">The first type.</param>
+ /// <param name="type2">The second type.</param>
+ /// <returns>Either type1 or type2, depending on which is more general.</returns>
+ public static Type BestCommonType(Type type1, Type type2)
+ {
+ if (type1 == type2) return type1;
+ if (type1 == null) return type2;
+ if (type2 == null) return type1;
+
+ if (TypeHelper.IsNumeric(type1) && TypeHelper.IsNumeric(type2))
+ {
+ if (type1 == typeof(double)) return type1;
+ if (type2 == typeof(double)) return type2;
+
+ if (type1 == typeof(float)) return type1;
+ if (type2 == typeof(float)) return type2;
+
+ if (type1 == typeof(decimal)) return type1;
+ if (type2 == typeof(decimal)) return type2;
+
+ if (type1 == typeof(UInt64)) return type1;
+ if (type2 == typeof(UInt64)) return type2;
+
+ if (type1 == typeof(Int64)) return type1;
+ if (type2 == typeof(Int64)) return type2;
+
+ if (type1 == typeof(UInt32)) return type1;
+ if (type2 == typeof(UInt32)) return type2;
+
+ if (type1 == typeof(Int32)) return type1;
+ if (type2 == typeof(Int32)) return type2;
+
+ if (type1 == typeof(UInt16)) return type1;
+ if (type2 == typeof(UInt16)) return type2;
+
+ if (type1 == typeof(Int16)) return type1;
+ if (type2 == typeof(Int16)) return type2;
+
+ if (type1 == typeof(byte)) return type1;
+ if (type2 == typeof(byte)) return type2;
+
+ if (type1 == typeof(sbyte)) return type1;
+ if (type2 == typeof(sbyte)) return type2;
+ }
+
+ return type1;
+ }
+
+ /// <summary>
+ /// Determines whether the specified type is numeric.
+ /// </summary>
+ /// <param name="type">The type to be examined.</param>
+ /// <returns>
+ /// <c>true</c> if the specified type is numeric; otherwise, <c>false</c>.
+ /// </returns>
+ public static bool IsNumeric(Type type)
+ {
+ return type == typeof(double) ||
+ type == typeof(float) ||
+ type == typeof(decimal) ||
+ type == typeof(Int64) ||
+ type == typeof(Int32) ||
+ type == typeof(Int16) ||
+ type == typeof(UInt64) ||
+ type == typeof(UInt32) ||
+ type == typeof(UInt16) ||
+ type == typeof(byte) ||
+ type == typeof(sbyte);
+ }
+
+ /// <summary>
+ /// Convert an argument list to the required paramter types.
+ /// Currently, only widening numeric conversions are performed.
+ /// </summary>
+ /// <param name="arglist">An array of args to be converted</param>
+ /// <param name="parameters">A ParamterInfo[] whose types will be used as targets</param>
+ public static void ConvertArgumentList(object[] arglist, ParameterInfo[] parameters)
+ {
+ System.Diagnostics.Debug.Assert(arglist.Length == parameters.Length);
+
+ for (int i = 0; i < parameters.Length; i++)
+ {
+ object arg = arglist[i];
+
+ if (arg != null && arg is IConvertible)
+ {
+ Type argType = arg.GetType();
+ Type targetType = parameters[i].ParameterType;
+ bool convert = false;
+
+ if (argType != targetType && !argType.IsAssignableFrom(targetType))
+ {
+ if (IsNumeric(argType) && IsNumeric(targetType))
+ {
+ if (targetType == typeof(double) || targetType == typeof(float))
+ convert = arg is int || arg is long || arg is short || arg is byte || arg is sbyte;
+ else
+ if (targetType == typeof(long))
+ convert = arg is int || arg is short || arg is byte || arg is sbyte;
+ else
+ if (targetType == typeof(short))
+ convert = arg is byte || arg is sbyte;
+ }
+ }
+
+ if (convert)
+ arglist[i] = Convert.ChangeType(arg, targetType,
+ System.Globalization.CultureInfo.InvariantCulture);
+ }
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Creates an instance of a generic Type using the supplied Type arguments
+ /// </summary>
+ /// <param name="type">The generic type to be specialized.</param>
+ /// <param name="typeArgs">The type args.</param>
+ /// <returns>An instance of the generic type.</returns>
+ public static Type MakeGenericType(Type type, Type[] typeArgs)
+ {
+ // TODO: Add error handling
+ return type.MakeGenericType(typeArgs);
+ }
+
+ /// <summary>
+ /// Determines whether this instance can deduce type args for a generic type from the supplied arguments.
+ /// </summary>
+ /// <param name="type">The type to be examined.</param>
+ /// <param name="arglist">The arglist.</param>
+ /// <param name="typeArgsOut">The type args to be used.</param>
+ /// <returns>
+ /// <c>true</c> if this the provided args give sufficient information to determine the type args to be used; otherwise, <c>false</c>.
+ /// </returns>
+ public static bool CanDeduceTypeArgsFromArgs(Type type, object[] arglist, ref Type[] typeArgsOut)
+ {
+ Type[] typeParameters = type.GetGenericArguments();
+
+ foreach (ConstructorInfo ctor in type.GetConstructors())
+ {
+ ParameterInfo[] parameters = ctor.GetParameters();
+ if (parameters.Length != arglist.Length)
+ continue;
+
+ Type[] typeArgs = new Type[typeParameters.Length];
+ for (int i = 0; i < typeArgs.Length; i++)
+ {
+ for (int j = 0; j < arglist.Length; j++)
+ {
+ if (parameters[j].ParameterType.Equals(typeParameters[i]))
+ typeArgs[i] = TypeHelper.BestCommonType(
+ typeArgs[i],
+ arglist[j].GetType());
+ }
+
+ if (typeArgs[i] == null)
+ {
+ typeArgs = null;
+ break;
+ }
+ }
+
+ if (typeArgs != null)
+ {
+ typeArgsOut = typeArgs;
+ return true;
+ }
+ }
+
+ return false;
+ }
+#endif
+
+ /// <summary>
+ /// Gets the values for an enumeration, using Enum.GetTypes
+ /// where available, otherwise through reflection.
+ /// </summary>
+ /// <param name="enumType"></param>
+ /// <returns></returns>
+ public static Array GetEnumValues(Type enumType)
+ {
+#if NETCF || SILVERLIGHT
+ FieldInfo[] fields = enumType.GetFields(BindingFlags.Public | BindingFlags.Static);
+
+ Array enumValues = Array.CreateInstance(enumType, fields.Length);
+
+ for (int index = 0; index < fields.Length; index++)
+ enumValues.SetValue(fields[index].GetValue(enumType), index);
+
+ return enumValues;
+#else
+ return Enum.GetValues(enumType);
+#endif
+ }
+
+ /// <summary>
+ /// Gets the names defined for an enumeration, using Enum.GetNames
+ /// where available, otherwise through reflection.
+ /// </summary>
+ /// <param name="enumType"></param>
+ /// <returns></returns>
+ public static string[] GetEnumNames(Type enumType)
+ {
+#if NETCF || SILVERLIGHT
+ FieldInfo[] fields = enumType.GetFields(BindingFlags.Public | BindingFlags.Static);
+
+ string[] names = new string[fields.Length];
+
+ for (int index = 0; index < fields.Length; index++)
+ names[index] = fields[index].Name;
+
+ return names;
+#else
+ return Enum.GetNames(enumType);
+#endif
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/WorkItems/CompositeWorkItem.cs b/external/guiunit/src/framework/Internal/WorkItems/CompositeWorkItem.cs
new file mode 100755
index 0000000..0438fad
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/WorkItems/CompositeWorkItem.cs
@@ -0,0 +1,162 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Threading;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.WorkItems
+{
+ /// <summary>
+ /// A CompositeWorkItem represents a test suite and
+ /// encapsulates the execution of the suite as well
+ /// as all its child tests.
+ /// </summary>
+ public class CompositeWorkItem : WorkItem
+ {
+ private TestSuite _suite;
+ private ITestFilter _childFilter;
+#if CLR_2_0 || CLR_4_0
+ private System.Collections.Generic.Queue<WorkItem> _children = new System.Collections.Generic.Queue<WorkItem>();
+#else
+ private System.Collections.Queue _children = new System.Collections.Queue();
+#endif
+ private TestCommand _setupCommand;
+ private TestCommand _teardownCommand;
+
+ private CountdownEvent _childTestCountdown;
+
+ /// <summary>
+ /// Construct a CompositeWorkItem for executing a test suite
+ /// using a filter to select child tests.
+ /// </summary>
+ /// <param name="suite">The TestSuite to be executed</param>
+ /// <param name="context">The execution context in which to run the suite</param>
+ /// <param name="childFilter">A filter used to select child tests</param>
+ public CompositeWorkItem(TestSuite suite, TestExecutionContext context, ITestFilter childFilter)
+ : base(suite, context)
+ {
+ _suite = suite;
+ _setupCommand = suite.GetOneTimeSetUpCommand();
+ _teardownCommand = suite.GetOneTimeTearDownCommand();
+ _childFilter = childFilter;
+ }
+
+ /// <summary>
+ /// Method that actually performs the work. Overridden
+ /// in CompositeWorkItem to do setup, run all child
+ /// items and then do teardown.
+ /// </summary>
+ protected override void PerformWork()
+ {
+ // Assume success, since the result will be inconclusive
+ // if there is no setup method to run or if the
+ // context initialization fails.
+ Result.SetResult(ResultState.Success);
+
+ PerformOneTimeSetUp();
+
+ if (Result.ResultState.Status == TestStatus.Passed && _suite.HasChildren)
+ {
+ foreach (Test test in _suite.Tests)
+ if (_childFilter.Pass(test))
+ _children.Enqueue(CreateWorkItem(test, this.Context, _childFilter));
+
+ if (_children.Count > 0)
+ {
+ RunChildren();
+ return;
+ }
+ }
+
+ // Fall through in case there were no child tests to run.
+ // Otherwise, this is done in the completion event.
+ PerformOneTimeTearDown();
+
+ WorkItemComplete();
+ }
+
+ #region Helper Methods
+
+ private void PerformOneTimeSetUp()
+ {
+ try
+ {
+ _setupCommand.Execute(Context);
+
+ // SetUp may have changed some things
+ Context.UpdateContext();
+ }
+ catch (Exception ex)
+ {
+ if (ex is NUnitException || ex is System.Reflection.TargetInvocationException)
+ ex = ex.InnerException;
+
+ Result.RecordException(ex, FailureSite.SetUp);
+ }
+ }
+
+ private void RunChildren()
+ {
+ _childTestCountdown = new CountdownEvent(_children.Count);
+
+ while (_children.Count > 0)
+ {
+ WorkItem child = (WorkItem)_children.Dequeue();
+ child.Completed += new EventHandler(OnChildCompleted);
+ child.Execute();
+ }
+ }
+
+ private void PerformOneTimeTearDown()
+ {
+ TestExecutionContext.SetCurrentContext(Context);
+ _teardownCommand.Execute(Context);
+ }
+
+ private object _completionLock = new object();
+
+ private void OnChildCompleted(object sender, EventArgs e)
+ {
+ lock (_completionLock)
+ {
+ WorkItem childTask = sender as WorkItem;
+ if (childTask != null)
+ {
+ childTask.Completed -= new EventHandler(OnChildCompleted);
+ Result.AddResult(childTask.Result);
+ _childTestCountdown.Signal();
+
+ if (_childTestCountdown.CurrentCount == 0)
+ {
+ PerformOneTimeTearDown();
+ WorkItemComplete();
+ }
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/WorkItems/CountdownEvent.cs b/external/guiunit/src/framework/Internal/WorkItems/CountdownEvent.cs
new file mode 100755
index 0000000..3c7c7c7
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/WorkItems/CountdownEvent.cs
@@ -0,0 +1,87 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !CLR_4_0 || SILVERLIGHT
+using System.Threading;
+
+namespace NUnit.Framework.Internal.WorkItems
+{
+ /// <summary>
+ /// A simplified implementation of .NET 4 CountdownEvent
+ /// for use in earlier versions of .NET. Only the methods
+ /// used by NUnit are implemented.
+ /// </summary>
+ public class CountdownEvent
+ {
+ int _initialCount;
+ int _remainingCount;
+ object _lock = new object();
+ ManualResetEvent _event = new ManualResetEvent(false);
+
+ /// <summary>
+ /// Construct a CountdownEvent
+ /// </summary>
+ /// <param name="initialCount">The initial count</param>
+ public CountdownEvent(int initialCount)
+ {
+ _initialCount = _remainingCount = initialCount;
+ }
+
+ /// <summary>
+ /// Gets the initial count established for the CountdownEvent
+ /// </summary>
+ public int InitialCount
+ {
+ get { return _initialCount; }
+ }
+
+ /// <summary>
+ /// Gets the current count remaining for the CountdownEvent
+ /// </summary>
+ public int CurrentCount
+ {
+ get { return _remainingCount; }
+ }
+
+ /// <summary>
+ /// Decrement the count by one
+ /// </summary>
+ public void Signal()
+ {
+ lock (_lock)
+ {
+ if (--_remainingCount == 0)
+ _event.Set();
+ }
+ }
+
+ /// <summary>
+ /// Block the thread until the count reaches zero
+ /// </summary>
+ public void Wait()
+ {
+ _event.WaitOne();
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Internal/WorkItems/SimpleWorkItem.cs b/external/guiunit/src/framework/Internal/WorkItems/SimpleWorkItem.cs
new file mode 100755
index 0000000..4718c96
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/WorkItems/SimpleWorkItem.cs
@@ -0,0 +1,77 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Threading;
+using NUnit.Framework.Internal.Commands;
+
+namespace NUnit.Framework.Internal.WorkItems
+{
+ /// <summary>
+ /// A SimpleWorkItem represents a single test case and is
+ /// marked as completed immediately upon execution. This
+ /// class is also used for skipped or ignored test suites.
+ /// </summary>
+ public class SimpleWorkItem : WorkItem
+ {
+ private TestCommand _command;
+
+ /// <summary>
+ /// Construct a simple work item for a test.
+ /// </summary>
+ /// <param name="test">The test to be executed</param>
+ /// <param name="context">The execution context in which the test is to be run</param>
+ public SimpleWorkItem(TestMethod test, TestExecutionContext context)
+ : base(test, context)
+ {
+ _command = test.GetTestCommand();
+ }
+
+ /// <summary>
+ /// Construct a simple work item for a test command.
+ /// </summary>
+ /// <param name="command">The command to be executed</param>
+ /// <param name="context">The execution context in which the test is to be run</param>
+ public SimpleWorkItem(TestCommand command, TestExecutionContext context)
+ : base(command.Test, context)
+ {
+ _command = command;
+ }
+
+ /// <summary>
+ /// Method that performs actually performs the work.
+ /// </summary>
+ protected override void PerformWork()
+ {
+ try
+ {
+ testResult = _command.Execute(Context);
+ }
+ finally
+ {
+ WorkItemComplete();
+ }
+ }
+
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/WorkItems/WorkItem.cs b/external/guiunit/src/framework/Internal/WorkItems/WorkItem.cs
new file mode 100755
index 0000000..10ad210
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/WorkItems/WorkItem.cs
@@ -0,0 +1,273 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.Diagnostics;
+using System.Threading;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal.WorkItems
+{
+ /// <summary>
+ /// A WorkItem may be an individual test case, a fixture or
+ /// a higher level grouping of tests. All WorkItems inherit
+ /// from the abstract WorkItem class, which uses the template
+ /// pattern to allow derived classes to perform work in
+ /// whatever way is needed.
+ /// </summary>
+ public abstract class WorkItem
+ {
+ // The test this WorkItem represents
+ private readonly Test _test;
+
+ // The TestCommand for that test
+ //private readonly TestCommand _command;
+
+ // The execution context used by this work item
+ private TestExecutionContext _context;
+
+ // The current state of the WorkItem
+ private WorkItemState _state;
+
+ /// <summary>
+ /// The result of running the test
+ /// </summary>
+ protected TestResult testResult;
+
+ #region Static Factory Method
+
+ /// <summary>
+ /// Create a WorkItem appropriate for the test to be run
+ /// </summary>
+ /// <param name="test">The test to be executed</param>
+ /// <param name="context">The execution context in which the test will be run</param>
+ /// <param name="filter">A filter for selecting chind tests</param>
+ /// <returns></returns>
+ public static WorkItem CreateWorkItem(Test test, TestExecutionContext context, ITestFilter filter)
+ {
+ if (test.RunState != RunState.Runnable && test.RunState != RunState.Explicit)
+ return new SimpleWorkItem(new SkipCommand(test), context);
+
+ TestSuite suite = test as TestSuite;
+ if (suite != null)
+ return new CompositeWorkItem(suite, context, filter);
+
+ return new SimpleWorkItem((TestMethod)test, context);
+ }
+
+ #endregion
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct a WorkItem for a particular test.
+ /// </summary>
+ /// <param name="test">The test that the WorkItem will run</param>
+ /// <param name="context">The context to be used for running this test</param>
+ public WorkItem(Test test, TestExecutionContext context)
+ {
+ _test = test;
+ _context = context.Save();
+ testResult = test.MakeTestResult();
+ //_command = test.GetTestCommand();
+ _state = WorkItemState.Ready;
+ }
+
+ #endregion
+
+ #region Properties and Events
+
+ /// <summary>
+ /// Event triggered when the item is complete
+ /// </summary>
+ public event EventHandler Completed;
+
+ /// <summary>
+ /// Gets the current state of the WorkItem
+ /// </summary>
+ public WorkItemState State
+ {
+ get { return _state; }
+ }
+
+ /// <summary>
+ /// The test being executed by the work item
+ /// </summary>
+ public Test Test
+ {
+ get { return _test; }
+ }
+
+ /// <summary>
+ /// The execution context in use
+ /// </summary>
+ protected TestExecutionContext Context
+ {
+ get { return _context; }
+ }
+
+ /// <summary>
+ /// The original context supplied from the fixture
+ /// or other higher-level test
+ /// </summary>
+ protected TestExecutionContext PriorContext
+ {
+ get { return _context.prior; }
+ }
+
+ ///// <summary>
+ ///// The command used to run the test
+ ///// </summary>
+ //protected TestCommand Command
+ //{
+ // get { return _command; }
+ //}
+
+ /// <summary>
+ /// The test result
+ /// </summary>
+ public TestResult Result
+ {
+ get { return testResult; }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Execute the current work item, including any
+ /// child work items.
+ /// </summary>
+ public virtual void Execute()
+ {
+#if (CLR_2_0 || CLR_4_0) && !NETCF && !SILVERLIGHT
+ // Timeout set at a higher level
+ int timeout = _context.TestCaseTimeout;
+
+ // Timeout set on this test
+ if (Test.Properties.ContainsKey(PropertyNames.Timeout))
+ timeout = (int)Test.Properties.Get(PropertyNames.Timeout);
+
+ if (Test is TestMethod && timeout > 0)
+ RunTestWithTimeout(timeout);
+ else
+ RunTest();
+#else
+ RunTest();
+#endif
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF && !SILVERLIGHT
+ private void RunTestWithTimeout(int timeout)
+ {
+ Thread thread = new Thread(new ThreadStart(RunTest));
+
+ thread.Start();
+
+ if (timeout <= 0)
+ timeout = Timeout.Infinite;
+
+ thread.Join(timeout);
+
+ if (thread.IsAlive)
+ {
+ ThreadUtility.Kill(thread);
+
+ // NOTE: Without the use of Join, there is a race condition here.
+ // The thread sets the result to Cancelled and our code below sets
+ // it to Failure. In order for the result to be shown as a failure,
+ // we need to ensure that the following code executes after the
+ // thread has terminated. There is a risk here: the test code might
+ // refuse to terminate. However, it's more important to deal with
+ // the normal rather than a pathological case.
+ thread.Join();
+
+ Result.SetResult(ResultState.Failure,
+ string.Format("Test exceeded Timeout value of {0}ms", timeout));
+
+ WorkItemComplete();
+ }
+ }
+#endif
+
+ private void RunTest()
+ {
+ _context.CurrentTest = this.Test;
+ _context.CurrentResult = this.Result;
+ _context.Listener.TestStarted(this.Test);
+ _context.StartTime = DateTime.Now;
+
+ TestExecutionContext.SetCurrentContext(_context);
+
+#if (CLR_2_0 || CLR_4_0) && !SILVERLIGHT && !NETCF_2_0
+ long startTicks = Stopwatch.GetTimestamp();
+#endif
+
+ try
+ {
+ PerformWork();
+ }
+ finally
+ {
+#if (CLR_2_0 || CLR_4_0) && !SILVERLIGHT && !NETCF_2_0
+ long tickCount = Stopwatch.GetTimestamp() - startTicks;
+ double seconds = (double)tickCount / Stopwatch.Frequency;
+ Result.Duration = TimeSpan.FromSeconds(seconds);
+#else
+ Result.Duration = DateTime.Now - Context.StartTime;
+#endif
+
+ Result.AssertCount = _context.AssertCount;
+
+ _context.Listener.TestFinished(Result);
+
+ _context = _context.Restore();
+ _context.AssertCount += Result.AssertCount;
+ }
+ }
+
+ #endregion
+
+ #region Protected Methods
+
+ /// <summary>
+ /// Method that performs actually performs the work. It should
+ /// set the State to WorkItemState.Complete when done.
+ /// </summary>
+ protected abstract void PerformWork();
+
+ /// <summary>
+ /// Method called by the derived class when all work is complete
+ /// </summary>
+ protected void WorkItemComplete()
+ {
+ _state = WorkItemState.Complete;
+ if (Completed != null)
+ Completed(this, EventArgs.Empty);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Internal/WorkItems/WorkItemState.cs b/external/guiunit/src/framework/Internal/WorkItems/WorkItemState.cs
new file mode 100755
index 0000000..581006e
--- /dev/null
+++ b/external/guiunit/src/framework/Internal/WorkItems/WorkItemState.cs
@@ -0,0 +1,46 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Internal.WorkItems
+{
+ /// <summary>
+ /// The current state of a work item
+ /// </summary>
+ public enum WorkItemState
+ {
+ /// <summary>
+ /// Ready to run or continue
+ /// </summary>
+ Ready,
+
+ /// <summary>
+ /// Waiting for a dependency to complete
+ /// </summary>
+ Waiting,
+
+ /// <summary>
+ /// Complete
+ /// </summary>
+ Complete
+ }
+}
diff --git a/external/guiunit/src/framework/Is.cs b/external/guiunit/src/framework/Is.cs
new file mode 100755
index 0000000..fe32db8
--- /dev/null
+++ b/external/guiunit/src/framework/Is.cs
@@ -0,0 +1,535 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Helper class with properties and methods that supply
+ /// a number of constraints used in Asserts.
+ /// </summary>
+ public class Is
+ {
+ #region Not
+
+ /// <summary>
+ /// Returns a ConstraintExpression that negates any
+ /// following constraint.
+ /// </summary>
+ public static ConstraintExpression Not
+ {
+ get { return new ConstraintExpression().Not; }
+ }
+
+ #endregion
+
+ #region All
+
+ /// <summary>
+ /// Returns a ConstraintExpression, which will apply
+ /// the following constraint to all members of a collection,
+ /// succeeding if all of them succeed.
+ /// </summary>
+ public static ConstraintExpression All
+ {
+ get { return new ConstraintExpression().All; }
+ }
+
+ #endregion
+
+ #region Null
+
+ /// <summary>
+ /// Returns a constraint that tests for null
+ /// </summary>
+ public static NullConstraint Null
+ {
+ get { return new NullConstraint(); }
+ }
+
+ #endregion
+
+ #region True
+
+ /// <summary>
+ /// Returns a constraint that tests for True
+ /// </summary>
+ public static TrueConstraint True
+ {
+ get { return new TrueConstraint(); }
+ }
+
+ #endregion
+
+ #region False
+
+ /// <summary>
+ /// Returns a constraint that tests for False
+ /// </summary>
+ public static FalseConstraint False
+ {
+ get { return new FalseConstraint(); }
+ }
+
+ #endregion
+
+ #region Positive
+
+ /// <summary>
+ /// Returns a constraint that tests for a positive value
+ /// </summary>
+ public static GreaterThanConstraint Positive
+ {
+ get { return new GreaterThanConstraint(0); }
+ }
+
+ #endregion
+
+ #region Negative
+
+ /// <summary>
+ /// Returns a constraint that tests for a negative value
+ /// </summary>
+ public static LessThanConstraint Negative
+ {
+ get { return new LessThanConstraint(0); }
+ }
+
+ #endregion
+
+ #region NaN
+
+ /// <summary>
+ /// Returns a constraint that tests for NaN
+ /// </summary>
+ public static NaNConstraint NaN
+ {
+ get { return new NaNConstraint(); }
+ }
+
+ #endregion
+
+ #region Empty
+
+ /// <summary>
+ /// Returns a constraint that tests for empty
+ /// </summary>
+ public static EmptyConstraint Empty
+ {
+ get { return new EmptyConstraint(); }
+ }
+
+ #endregion
+
+ #region Unique
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection
+ /// contains all unique items.
+ /// </summary>
+ public static UniqueItemsConstraint Unique
+ {
+ get { return new UniqueItemsConstraint(); }
+ }
+
+ #endregion
+
+ #region BinarySerializable
+
+#if !NETCF && !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in binary format.
+ /// </summary>
+ public static BinarySerializableConstraint BinarySerializable
+ {
+ get { return new BinarySerializableConstraint(); }
+ }
+#endif
+
+ #endregion
+
+ #region XmlSerializable
+
+#if !SILVERLIGHT
+ /// <summary>
+ /// Returns a constraint that tests whether an object graph is serializable in xml format.
+ /// </summary>
+ public static XmlSerializableConstraint XmlSerializable
+ {
+ get { return new XmlSerializableConstraint(); }
+ }
+#endif
+
+ #endregion
+
+ #region EqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests two items for equality
+ /// </summary>
+ public static EqualConstraint EqualTo(object expected)
+ {
+ return new EqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region SameAs
+
+ /// <summary>
+ /// Returns a constraint that tests that two references are the same object
+ /// </summary>
+ public static SameAsConstraint SameAs(object expected)
+ {
+ return new SameAsConstraint(expected);
+ }
+
+ #endregion
+
+ #region GreaterThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than the suppled argument
+ /// </summary>
+ public static GreaterThanConstraint GreaterThan(object expected)
+ {
+ return new GreaterThanConstraint(expected);
+ }
+
+ #endregion
+
+ #region GreaterThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public static GreaterThanOrEqualConstraint GreaterThanOrEqualTo(object expected)
+ {
+ return new GreaterThanOrEqualConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is greater than or equal to the suppled argument
+ /// </summary>
+ public static GreaterThanOrEqualConstraint AtLeast(object expected)
+ {
+ return new GreaterThanOrEqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region LessThan
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than the suppled argument
+ /// </summary>
+ public static LessThanConstraint LessThan(object expected)
+ {
+ return new LessThanConstraint(expected);
+ }
+
+ #endregion
+
+ #region LessThanOrEqualTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public static LessThanOrEqualConstraint LessThanOrEqualTo(object expected)
+ {
+ return new LessThanOrEqualConstraint(expected);
+ }
+
+ /// <summary>
+ /// Returns a constraint that tests whether the
+ /// actual value is less than or equal to the suppled argument
+ /// </summary>
+ public static LessThanOrEqualConstraint AtMost(object expected)
+ {
+ return new LessThanOrEqualConstraint(expected);
+ }
+
+ #endregion
+
+ #region TypeOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public static ExactTypeConstraint TypeOf(Type expectedType)
+ {
+ return new ExactTypeConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual
+ /// value is of the exact type supplied as an argument.
+ /// </summary>
+ public static ExactTypeConstraint TypeOf<T>()
+ {
+ return new ExactTypeConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region InstanceOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public static InstanceOfTypeConstraint InstanceOf(Type expectedType)
+ {
+ return new InstanceOfTypeConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is of the type supplied as an argument or a derived type.
+ /// </summary>
+ public static InstanceOfTypeConstraint InstanceOf<T>()
+ {
+ return new InstanceOfTypeConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableFrom
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public static AssignableFromConstraint AssignableFrom(Type expectedType)
+ {
+ return new AssignableFromConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public static AssignableFromConstraint AssignableFrom<T>()
+ {
+ return new AssignableFromConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region AssignableTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public static AssignableToConstraint AssignableTo(Type expectedType)
+ {
+ return new AssignableToConstraint(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is assignable from the type supplied as an argument.
+ /// </summary>
+ public static AssignableToConstraint AssignableTo<T>()
+ {
+ return new AssignableToConstraint(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region EquivalentTo
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a collection containing the same elements as the
+ /// collection supplied as an argument.
+ /// </summary>
+ public static CollectionEquivalentConstraint EquivalentTo(IEnumerable expected)
+ {
+ return new CollectionEquivalentConstraint(expected);
+ }
+
+ #endregion
+
+ #region SubsetOf
+
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value
+ /// is a subset of the collection supplied as an argument.
+ /// </summary>
+ public static CollectionSubsetConstraint SubsetOf(IEnumerable expected)
+ {
+ return new CollectionSubsetConstraint(expected);
+ }
+
+ #endregion
+
+ #region Ordered
+
+ /// <summary>
+ /// Returns a constraint that tests whether a collection is ordered
+ /// </summary>
+ public static CollectionOrderedConstraint Ordered
+ {
+ get { return new CollectionOrderedConstraint(); }
+ }
+
+ #endregion
+
+ #region StringContaining
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value contains the substring supplied as an argument.
+ /// </summary>
+ public static SubstringConstraint StringContaining(string expected)
+ {
+ return new SubstringConstraint(expected);
+ }
+
+ #endregion
+
+ #region StringStarting
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value starts with the substring supplied as an argument.
+ /// </summary>
+ public static StartsWithConstraint StringStarting(string expected)
+ {
+ return new StartsWithConstraint(expected);
+ }
+
+ #endregion
+
+ #region StringEnding
+
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value ends with the substring supplied as an argument.
+ /// </summary>
+ public static EndsWithConstraint StringEnding(string expected)
+ {
+ return new EndsWithConstraint(expected);
+ }
+
+ #endregion
+
+ #region StringMatching
+
+#if !NETCF
+ /// <summary>
+ /// Returns a constraint that succeeds if the actual
+ /// value matches the regular expression supplied as an argument.
+ /// </summary>
+ public static RegexConstraint StringMatching(string pattern)
+ {
+ return new RegexConstraint(pattern);
+ }
+#endif
+
+ #endregion
+
+ #region SamePath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same as an expected path after canonicalization.
+ /// </summary>
+ public static SamePathConstraint SamePath(string expected)
+ {
+ return new SamePathConstraint(expected);
+ }
+
+ #endregion
+
+ #region SubPath
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is under an expected path after canonicalization.
+ /// </summary>
+ public static SubPathConstraint SubPath(string expected)
+ {
+ return new SubPathConstraint(expected);
+ }
+
+ #endregion
+
+ #region SamePathOrUnder
+
+ /// <summary>
+ /// Returns a constraint that tests whether the path provided
+ /// is the same path or under an expected path after canonicalization.
+ /// </summary>
+ public static SamePathOrUnderConstraint SamePathOrUnder(string expected)
+ {
+ return new SamePathOrUnderConstraint(expected);
+ }
+
+ #endregion
+
+ #region InRange
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public static RangeConstraint<T> InRange<T>(T from, T to) where T : IComparable<T>
+ {
+ return new RangeConstraint<T>(from, to);
+ }
+#else
+ /// <summary>
+ /// Returns a constraint that tests whether the actual value falls
+ /// within a specified range.
+ /// </summary>
+ public static RangeConstraint InRange(IComparable from, IComparable to)
+ {
+ return new RangeConstraint(from, to);
+ }
+#endif
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/Iz.cs b/external/guiunit/src/framework/Iz.cs
new file mode 100755
index 0000000..8041458
--- /dev/null
+++ b/external/guiunit/src/framework/Iz.cs
@@ -0,0 +1,35 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// The Iz class is a synonym for Is intended for use in VB,
+ /// which regards Is as a keyword.
+ /// </summary>
+ public class Iz : Is
+ {
+ }
+}
diff --git a/external/guiunit/src/framework/ListMapper.cs b/external/guiunit/src/framework/ListMapper.cs
new file mode 100755
index 0000000..00d00f0
--- /dev/null
+++ b/external/guiunit/src/framework/ListMapper.cs
@@ -0,0 +1,69 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Reflection;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// ListMapper is used to transform a collection used as an actual argument
+ /// producing another collection to be used in the assertion.
+ /// </summary>
+ public class ListMapper
+ {
+ ICollection original;
+
+ /// <summary>
+ /// Construct a ListMapper based on a collection
+ /// </summary>
+ /// <param name="original">The collection to be transformed</param>
+ public ListMapper( ICollection original )
+ {
+ this.original = original;
+ }
+
+ /// <summary>
+ /// Produces a collection containing all the values of a property
+ /// </summary>
+ /// <param name="name">The collection of property values</param>
+ /// <returns></returns>
+ public ICollection Property( string name )
+ {
+ ObjectList propList = new ObjectList();
+ foreach( object item in original )
+ {
+ PropertyInfo property = item.GetType().GetProperty( name,
+ BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance );
+ if ( property == null )
+ throw new ArgumentException( string.Format(
+ "{0} does not have a {1} property", item, name ) );
+
+ propList.Add( property.GetValue( item, null ) );
+ }
+
+ return propList;
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/MessageMatch.cs b/external/guiunit/src/framework/MessageMatch.cs
new file mode 100755
index 0000000..c90a088
--- /dev/null
+++ b/external/guiunit/src/framework/MessageMatch.cs
@@ -0,0 +1,40 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Enumeration indicating how the expected message parameter is to be used
+ /// </summary>
+ public enum MessageMatch
+ {
+ /// Expect an exact match
+ Exact,
+ /// Expect a message containing the parameter string
+ Contains,
+ /// Match the regular expression provided as a parameter
+ Regex,
+ /// Expect a message that starts with the parameter string
+ StartsWith
+ }
+}
diff --git a/external/guiunit/src/framework/ObjectList.cs b/external/guiunit/src/framework/ObjectList.cs
new file mode 100755
index 0000000..3ba6f0e
--- /dev/null
+++ b/external/guiunit/src/framework/ObjectList.cs
@@ -0,0 +1,52 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit
+{
+ /// <summary>
+ /// ObjectList represents a collection of objects. It is implemented
+ /// as a List<object> in .NET 2.0 or higher and as an ArrayList otherwise.
+ /// ObjectList does not attempt to be a general replacement for either of
+ /// these classes but only implements what is needed within the framework.
+ /// </summary>
+#if CLR_2_0 || CLR_4_0
+ public class ObjectList : System.Collections.Generic.List<object>
+ {
+ /// <summary>
+ /// Adds a range of values to the collection.
+ /// </summary>
+ /// <param name="collection">The collection.</param>
+ public void AddRange(System.Collections.ICollection collection)
+ {
+ foreach (object item in collection)
+ Add(item);
+ }
+ }
+#else
+ public class ObjectList : System.Collections.ArrayList
+ {
+ }
+#endif
+}
diff --git a/external/guiunit/src/framework/Runner/CommandLineOptions.cs b/external/guiunit/src/framework/Runner/CommandLineOptions.cs
new file mode 100755
index 0000000..dd47de3
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/CommandLineOptions.cs
@@ -0,0 +1,417 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.IO;
+using System.Text;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// The CommandLineOptions class parses and holds the values of
+ /// any options entered at the command line.
+ /// </summary>
+ public class CommandLineOptions
+ {
+ private string optionChars;
+ private static string NL = NUnit.Env.NewLine;
+
+ private int port = -1;
+ private bool wait = false;
+ private bool noheader = false;
+ private bool help = false;
+ private bool full = false;
+ private bool explore = false;
+ private bool labelTestsInOutput = false;
+
+ private string exploreFile;
+ private string resultFile;
+ private string resultFormat;
+ private string outFile;
+ private string includeCategory;
+ private string excludeCategory;
+
+ private bool error = false;
+
+ private StringList tests = new StringList();
+ private StringList invalidOptions = new StringList();
+ private StringList parameters = new StringList();
+
+ #region Properties
+
+ /// <summary>
+ /// Gets a value indicating whether the 'wait' option was used.
+ /// </summary>
+ public bool Wait
+ {
+ get { return wait; }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the 'nologo' option was used.
+ /// </summary>
+ public bool NoHeader
+ {
+ get { return noheader; }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the 'help' option was used.
+ /// </summary>
+ public bool ShowHelp
+ {
+ get { return help; }
+ }
+
+ /// <summary>
+ /// Gets a list of all tests specified on the command line
+ /// </summary>
+ public string[] Tests
+ {
+ get { return (string[])tests.ToArray(); }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether a full report should be displayed
+ /// </summary>
+ public bool Full
+ {
+ get { return full; }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether tests should be listed
+ /// rather than run.
+ /// </summary>
+ public bool Explore
+ {
+ get { return explore; }
+ }
+
+ /// <summary>
+ /// Gets the name of the file to be used for listing tests
+ /// </summary>
+ public string ExploreFile
+ {
+ get { return ExpandToFullPath(exploreFile.Length < 1 ? "tests.xml" : exploreFile); }
+ }
+
+ /// <summary>
+ /// Gets the name of the file to be used for test results
+ /// </summary>
+ public string ResultFile
+ {
+ get { return ExpandToFullPath(resultFile); }
+ }
+
+ /// <summary>
+ /// Gets the format to be used for test results
+ /// </summary>
+ public string ResultFormat
+ {
+ get { return resultFormat; }
+ }
+
+ /// <summary>
+ /// Gets the full path of the file to be used for output
+ /// </summary>
+ public string OutFile
+ {
+ get
+ {
+ return ExpandToFullPath(outFile);
+ }
+ }
+
+ /// <summary>
+ /// The port to create a TCP connection to and write test output
+ /// </summary>
+ /// <value>The port.</value>
+ public int Port
+ {
+ get
+ {
+ return port;
+ }
+ }
+
+ /// <summary>
+ /// Gets the list of categories to include
+ /// </summary>
+ public string Include
+ {
+ get
+ {
+ return includeCategory;
+ }
+ }
+
+ /// <summary>
+ /// Gets the list of categories to exclude
+ /// </summary>
+ public string Exclude
+ {
+ get
+ {
+ return excludeCategory;
+ }
+ }
+
+ /// <summary>
+ /// Gets a flag indicating whether each test should
+ /// be labeled in the output.
+ /// </summary>
+ public bool LabelTestsInOutput
+ {
+ get { return labelTestsInOutput; }
+ }
+
+ private string ExpandToFullPath(string path)
+ {
+ if (path == null) return null;
+
+#if NETCF
+ return Path.Combine(NUnit.Env.DocumentFolder, path);
+#else
+ return Path.GetFullPath(path);
+#endif
+ }
+
+ /// <summary>
+ /// Gets the test count
+ /// </summary>
+ public int TestCount
+ {
+ get { return tests.Count; }
+ }
+
+ #endregion
+
+ /// <summary>
+ /// Construct a CommandLineOptions object using default option chars
+ /// </summary>
+ public CommandLineOptions()
+ {
+ this.optionChars = System.IO.Path.DirectorySeparatorChar == '/' ? "-" : "/-";
+ }
+
+ /// <summary>
+ /// Construct a CommandLineOptions object using specified option chars
+ /// </summary>
+ /// <param name="optionChars"></param>
+ public CommandLineOptions(string optionChars)
+ {
+ this.optionChars = optionChars;
+ }
+
+ /// <summary>
+ /// Parse command arguments and initialize option settings accordingly
+ /// </summary>
+ /// <param name="args">The argument list</param>
+ public void Parse(params string[] args)
+ {
+ foreach( string arg in args )
+ {
+ if (optionChars.IndexOf(arg[0]) >= 0 )
+ ProcessOption(arg);
+ else
+ ProcessParameter(arg);
+ }
+ }
+
+ /// <summary>
+ /// Gets the parameters provided on the commandline
+ /// </summary>
+ public string[] Parameters
+ {
+ get { return (string[])parameters.ToArray(); }
+ }
+
+ private void ProcessOption(string opt)
+ {
+ int pos = opt.IndexOfAny( new char[] { ':', '=' } );
+ string val = string.Empty;
+
+ if (pos >= 0)
+ {
+ val = opt.Substring(pos + 1);
+ opt = opt.Substring(0, pos);
+ }
+
+ switch (opt.Substring(1))
+ {
+ case "wait":
+ wait = true;
+ break;
+ case "port":
+ port = int.Parse (val);
+ break;
+ case "noheader":
+ case "noh":
+ noheader = true;
+ break;
+ case "help":
+ case "h":
+ help = true;
+ break;
+ case "run":
+ case "test":
+ tests.Add(val);
+ break;
+ case "full":
+ full = true;
+ break;
+ case "explore":
+ explore = true;
+ exploreFile = val;
+ break;
+ case "xml":
+ case "result":
+ resultFile = val;
+ break;
+ case "format":
+ resultFormat = val;
+ if (resultFormat != "nunit3" && resultFormat != "nunit2")
+ error = true;
+ break;
+ case "out":
+ outFile = val;
+ break;
+ case "labels":
+ labelTestsInOutput = true;
+ break;
+ case "include":
+ includeCategory = val;
+ break;
+ case "exclude":
+ excludeCategory = val;
+ break;
+ default:
+ error = true;
+ invalidOptions.Add(opt);
+ break;
+ }
+ }
+
+ private void ProcessParameter(string param)
+ {
+ parameters.Add(param);
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether there was an error in parsing the options.
+ /// </summary>
+ /// <value><c>true</c> if error; otherwise, <c>false</c>.</value>
+ public bool Error
+ {
+ get { return error; }
+ }
+
+ /// <summary>
+ /// Gets the error message.
+ /// </summary>
+ /// <value>The error message.</value>
+ public string ErrorMessage
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ foreach (string opt in invalidOptions)
+ sb.Append( "Invalid option: " + opt + NL );
+ if (resultFormat != null && resultFormat != "nunit3" && resultFormat != "nunit2")
+ sb.Append("Invalid result format: " + resultFormat + NL);
+ return sb.ToString();
+ }
+ }
+
+ /// <summary>
+ /// Gets the help text.
+ /// </summary>
+ /// <value>The help text.</value>
+ public string HelpText
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+
+#if PocketPC || WindowsCE || NETCF || SILVERLIGHT
+ string name = "NUnitLite";
+#else
+ string name = System.Reflection.Assembly.GetEntryAssembly().GetName().Name;
+#endif
+
+ sb.Append("Usage: " + name + " [assemblies] [options]" + NL + NL);
+ sb.Append("Runs a set of NUnitLite tests from the console." + NL + NL);
+ sb.Append("You may specify one or more test assemblies by name, without a path or" + NL);
+ sb.Append("extension. They must be in the same in the same directory as the exe" + NL);
+ sb.Append("or on the probing path. If no assemblies are provided, tests in the" + NL);
+ sb.Append("executing assembly itself are run." + NL + NL);
+ sb.Append("Options:" + NL);
+ sb.Append(" -test:testname Provides the name of a test to run. This option may be" + NL);
+ sb.Append(" repeated. If no test names are given, all tests are run." + NL + NL);
+ sb.Append(" -out:FILE File to which output is redirected. If this option is not" + NL);
+ sb.Append(" used, output is to the Console, which means it is lost" + NL);
+ sb.Append(" on devices without a Console." + NL + NL);
+ sb.Append(" -full Prints full report of all test results." + NL + NL);
+ sb.Append(" -result:FILE File to which the xml test result is written." + NL + NL);
+ sb.Append(" -format:FORMAT Format in which the result is to be written. FORMAT must be" + NL);
+ sb.Append(" either nunit3 or nunit2. The default is nunit3." + NL + NL);
+ sb.Append(" -explore:FILE If provided, this option indicates that the tests" + NL);
+ sb.Append(" should be listed rather than executed. They are listed" + NL);
+ sb.Append(" to the specified file in XML format." + NL);
+ sb.Append(" -help,-h Displays this help" + NL + NL);
+ sb.Append(" -noheader,-noh Suppresses display of the initial message" + NL + NL);
+ sb.Append(" -labels Displays the name of each test when it starts" + NL + NL);
+ sb.Append(" -wait Waits for a key press before exiting" + NL + NL);
+
+ sb.Append("Notes:" + NL);
+ sb.Append(" * File names may be listed by themselves, with a relative path or " + NL);
+ sb.Append(" using an absolute path. Any relative path is based on the current " + NL);
+ sb.Append(" directory or on the Documents folder if running on a under the " +NL);
+ sb.Append(" compact framework." + NL + NL);
+ if (System.IO.Path.DirectorySeparatorChar != '/')
+ sb.Append(" * On Windows, options may be prefixed by a '/' character if desired" + NL + NL);
+ sb.Append(" * Options that take values may use an equal sign or a colon" + NL);
+ sb.Append(" to separate the option from its value." + NL + NL);
+
+ return sb.ToString();
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ class StringList : List<string> { }
+#else
+ class StringList : ArrayList
+ {
+ public new string[] ToArray()
+ {
+ return (string[])ToArray(typeof(string));
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/ConsoleWriter.cs b/external/guiunit/src/framework/Runner/ConsoleWriter.cs
new file mode 100755
index 0000000..0d2038d
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/ConsoleWriter.cs
@@ -0,0 +1,113 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.IO;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// Provide an alternative to Console.Out for
+ /// version 1.0 of the compact framework.
+ /// </summary>
+ public class ConsoleWriter : TextWriter
+ {
+ private static TextWriter writer;
+
+ /// <summary>
+ /// Gets the underlying TextWriter, creating it if it does not already exist.
+ /// </summary>
+ /// <value>The underlying TextWriter.</value>
+ public static TextWriter Out
+ {
+ get
+ {
+ if ( writer == null )
+ writer = new ConsoleWriter();
+
+ return writer;
+ }
+ }
+
+ /// <summary>
+ /// Writes a character to the text stream.
+ /// </summary>
+ /// <param name="value">The character to write to the text stream.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(char value)
+ {
+ Console.Write(value);
+ }
+
+ /// <summary>
+ /// Writes a string to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(string value)
+ {
+ Console.Write(value);
+ }
+
+ /// <summary>
+ /// Writes a string followed by a line terminator to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write. If <paramref name="value"/> is null, only the line termination characters are written.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void WriteLine(string value)
+ {
+ Console.WriteLine(value);
+ }
+
+ /// <summary>
+ /// When overridden in a derived class, returns the <see cref="T:System.Text.Encoding"/> in which the output is written.
+ /// </summary>
+ /// <value></value>
+ /// <returns>
+ /// The Encoding in which the output is written.
+ /// </returns>
+ public override System.Text.Encoding Encoding
+ {
+#if SILVERLIGHT
+ get { return System.Text.Encoding.UTF8; }
+#else
+ get { return System.Text.Encoding.Default; }
+#endif
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/DebugWriter.cs b/external/guiunit/src/framework/Runner/DebugWriter.cs
new file mode 100755
index 0000000..b6d9909
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/DebugWriter.cs
@@ -0,0 +1,113 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !SILVERLIGHT
+using System;
+using System.Diagnostics;
+using System.IO;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// DebugWriter is a TextWriter that sends it's
+ /// output to Debug. We don't use Trace because
+ /// writing to it is not supported in CF.
+ /// </summary>
+ public class DebugWriter : TextWriter
+ {
+ private static TextWriter writer;
+
+ /// <summary>
+ /// Singleon instance of a DebugWriter.
+ /// </summary>
+ /// <value>The DebugWriter singleton.</value>
+ public static TextWriter Out
+ {
+ get
+ {
+ if (writer == null)
+ writer = new DebugWriter();
+
+ return writer;
+ }
+ }
+
+ /// <summary>
+ /// Writes a character to the text stream.
+ /// </summary>
+ /// <param name="value">The character to write to the text stream.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(char value)
+ {
+ Debug.Write(value);
+ }
+
+ /// <summary>
+ /// Writes a string to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(string value)
+ {
+ Debug.Write(value);
+ }
+
+ /// <summary>
+ /// Writes a string followed by a line terminator to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write. If <paramref name="value"/> is null, only the line termination characters are written.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void WriteLine(string value)
+ {
+ Debug.WriteLine(value);
+ }
+
+ /// <summary>
+ /// When overridden in a derived class, returns the <see cref="T:System.Text.Encoding"/> in which the output is written.
+ /// </summary>
+ /// <value></value>
+ /// <returns>
+ /// The Encoding in which the output is written.
+ /// </returns>
+ public override System.Text.Encoding Encoding
+ {
+ get { return System.Text.Encoding.Default; }
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Runner/OutputWriters/NUnit2XmlOutputWriter.cs b/external/guiunit/src/framework/Runner/OutputWriters/NUnit2XmlOutputWriter.cs
new file mode 100755
index 0000000..063e7ef
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/OutputWriters/NUnit2XmlOutputWriter.cs
@@ -0,0 +1,376 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.Globalization;
+using System.Reflection;
+using System.Xml;
+using System.IO;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#else
+using System.Collections.Specialized;
+#endif
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// NUnit2XmlOutputWriter is able to create an xml file representing
+ /// the result of a test run in NUnit 2.x format.
+ /// </summary>
+ public class NUnit2XmlOutputWriter : OutputWriter
+ {
+ private XmlWriter xmlWriter;
+
+#if CLR_2_0 || CLR_4_0
+ private static Dictionary<string, string> resultStates = new Dictionary<string, string>();
+#else
+ private static StringDictionary resultStates = new StringDictionary();
+#endif
+
+ static NUnit2XmlOutputWriter()
+ {
+ resultStates["Passed"] = "Success";
+ resultStates["Failed"] = "Failure";
+ resultStates["Failed:Error"] = "Error";
+ resultStates["Failed:Cancelled"] = "Cancelled";
+ resultStates["Inconclusive"] = "Inconclusive";
+ resultStates["Skipped"] = "Skipped";
+ resultStates["Skipped:Ignored"] = "Ignored";
+ resultStates["Skipped:Invalid"] = "NotRunnable";
+ }
+
+ /// <summary>
+ /// Writes the result of a test run to a specified TextWriter.
+ /// </summary>
+ /// <param name="result">The test result for the run</param>
+ /// <param name="writer">The TextWriter to which the xml will be written</param>
+ public override void WriteResultFile(ITestResult result, TextWriter writer)
+ {
+ // NOTE: Under .NET 1.1, XmlTextWriter does not implement IDisposable,
+ // but does implement Close(). Hence we cannot use a 'using' clause.
+ //using (XmlTextWriter xmlWriter = new XmlTextWriter(writer))
+#if SILVERLIGHT
+ XmlWriter xmlWriter = XmlWriter.Create(writer);
+#else
+ XmlTextWriter xmlWriter = new XmlTextWriter(writer);
+ xmlWriter.Formatting = Formatting.Indented;
+#endif
+
+ try
+ {
+ WriteXmlOutput(result, xmlWriter);
+ }
+ finally
+ {
+ writer.Close();
+ }
+ }
+
+ private void WriteXmlOutput(ITestResult result, XmlWriter xmlWriter)
+ {
+ this.xmlWriter = xmlWriter;
+
+ InitializeXmlFile(result);
+ WriteResultElement(result);
+ TerminateXmlFile();
+ }
+
+ private void InitializeXmlFile(ITestResult result)
+ {
+ ResultSummary summaryResults = new ResultSummary(result);
+
+ xmlWriter.WriteStartDocument(false);
+ xmlWriter.WriteComment("This file represents the results of running a test suite");
+
+ xmlWriter.WriteStartElement("test-results");
+
+ xmlWriter.WriteAttributeString("name", result.FullName);
+ xmlWriter.WriteAttributeString("total", summaryResults.TestCount.ToString());
+ xmlWriter.WriteAttributeString("errors", summaryResults.ErrorCount.ToString());
+ xmlWriter.WriteAttributeString("failures", summaryResults.FailureCount.ToString());
+ xmlWriter.WriteAttributeString("not-run", summaryResults.NotRunCount.ToString());
+ xmlWriter.WriteAttributeString("inconclusive", summaryResults.InconclusiveCount.ToString());
+ xmlWriter.WriteAttributeString("ignored", summaryResults.IgnoreCount.ToString());
+ xmlWriter.WriteAttributeString("skipped", summaryResults.SkipCount.ToString());
+ xmlWriter.WriteAttributeString("invalid", summaryResults.InvalidCount.ToString());
+
+ DateTime now = DateTime.Now;
+ xmlWriter.WriteAttributeString("date", XmlConvert.ToString(now, "yyyy-MM-dd"));
+ xmlWriter.WriteAttributeString("time", XmlConvert.ToString(now, "HH:mm:ss"));
+ WriteEnvironment();
+ WriteCultureInfo();
+ }
+
+ private void WriteCultureInfo()
+ {
+ xmlWriter.WriteStartElement("culture-info");
+ xmlWriter.WriteAttributeString("current-culture",
+ CultureInfo.CurrentCulture.ToString());
+ xmlWriter.WriteAttributeString("current-uiculture",
+ CultureInfo.CurrentUICulture.ToString());
+ xmlWriter.WriteEndElement();
+ }
+
+ private void WriteEnvironment()
+ {
+ xmlWriter.WriteStartElement("environment");
+ AssemblyName assemblyName = AssemblyHelper.GetAssemblyName(Assembly.GetExecutingAssembly());
+ xmlWriter.WriteAttributeString("macunit-version",
+ assemblyName.Version.ToString());
+ xmlWriter.WriteAttributeString("clr-version",
+ Environment.Version.ToString());
+ xmlWriter.WriteAttributeString("os-version",
+ Environment.OSVersion.ToString());
+ xmlWriter.WriteAttributeString("platform",
+ Environment.OSVersion.Platform.ToString());
+#if !NETCF
+ xmlWriter.WriteAttributeString("cwd",
+ Environment.CurrentDirectory);
+#if !SILVERLIGHT
+ xmlWriter.WriteAttributeString("machine-name",
+ Environment.MachineName);
+ xmlWriter.WriteAttributeString("user",
+ Environment.UserName);
+ xmlWriter.WriteAttributeString("user-domain",
+ Environment.UserDomainName);
+#endif
+#endif
+ xmlWriter.WriteEndElement();
+ }
+
+ private void WriteResultElement(ITestResult result)
+ {
+ StartTestElement(result);
+
+ WriteCategories(result);
+ WriteProperties(result);
+
+ switch (result.ResultState.Status)
+ {
+ case TestStatus.Skipped:
+ WriteReasonElement(result.Message);
+ break;
+ case TestStatus.Failed:
+ WriteFailureElement(result.Message, result.StackTrace);
+ break;
+ }
+
+ if (result.Test is TestSuite)
+ WriteChildResults(result);
+
+ xmlWriter.WriteEndElement(); // test element
+ }
+
+ private void TerminateXmlFile()
+ {
+ xmlWriter.WriteEndElement(); // test-results
+ xmlWriter.WriteEndDocument();
+ xmlWriter.Flush();
+ xmlWriter.Close();
+ }
+
+
+ #region Element Creation Helpers
+
+ private void StartTestElement(ITestResult result)
+ {
+ ITest test = result.Test;
+ TestSuite suite = test as TestSuite;
+
+ if (suite != null)
+ {
+ xmlWriter.WriteStartElement("test-suite");
+ xmlWriter.WriteAttributeString("type", suite.TestType);
+ xmlWriter.WriteAttributeString("name", suite.TestType == "Assembly"
+ ? result.Test.FullName
+ : result.Test.FullName);
+ }
+ else
+ {
+ xmlWriter.WriteStartElement("test-case");
+ xmlWriter.WriteAttributeString("name", result.FullName);
+ }
+
+ if (test.Properties.ContainsKey(PropertyNames.Description))
+ {
+ string description = (string)test.Properties.Get(PropertyNames.Description);
+ xmlWriter.WriteAttributeString("description", description);
+ }
+
+ TestStatus status = result.ResultState.Status;
+ string translatedResult = resultStates[result.ResultState.ToString()];
+
+ if (status != TestStatus.Skipped)
+ {
+ xmlWriter.WriteAttributeString("executed", "True");
+ xmlWriter.WriteAttributeString("result", translatedResult);
+ xmlWriter.WriteAttributeString("success", status == TestStatus.Passed ? "True" : "False");
+ xmlWriter.WriteAttributeString("time", result.Duration.TotalSeconds.ToString());
+ xmlWriter.WriteAttributeString("asserts", result.AssertCount.ToString());
+ }
+ else
+ {
+ xmlWriter.WriteAttributeString("executed", "False");
+ xmlWriter.WriteAttributeString("result", translatedResult);
+ }
+ }
+
+ private void WriteCategories(ITestResult result)
+ {
+ IPropertyBag properties = result.Test.Properties;
+
+ if (properties.ContainsKey(PropertyNames.Category))
+ {
+ xmlWriter.WriteStartElement("categories");
+
+ foreach (string category in properties[PropertyNames.Category])
+ {
+ xmlWriter.WriteStartElement("category");
+ xmlWriter.WriteAttributeString("name", category);
+ xmlWriter.WriteEndElement();
+ }
+
+ xmlWriter.WriteEndElement();
+ }
+ }
+
+ private void WriteProperties(ITestResult result)
+ {
+ IPropertyBag properties = result.Test.Properties;
+ int nprops = 0;
+
+ foreach (string key in properties.Keys)
+ {
+ if (key != PropertyNames.Category)
+ {
+ if (nprops++ == 0)
+ xmlWriter.WriteStartElement("properties");
+
+ foreach (object prop in properties[key])
+ {
+ xmlWriter.WriteStartElement("property");
+ xmlWriter.WriteAttributeString("name", key);
+ xmlWriter.WriteAttributeString("value", prop.ToString());
+ xmlWriter.WriteEndElement();
+ }
+ }
+ }
+
+ if (nprops > 0)
+ xmlWriter.WriteEndElement();
+ }
+
+ private void WriteReasonElement(string message)
+ {
+ xmlWriter.WriteStartElement("reason");
+ xmlWriter.WriteStartElement("message");
+ xmlWriter.WriteCData(message);
+ xmlWriter.WriteEndElement();
+ xmlWriter.WriteEndElement();
+ }
+
+ private void WriteFailureElement(string message, string stackTrace)
+ {
+ xmlWriter.WriteStartElement("failure");
+ xmlWriter.WriteStartElement("message");
+ WriteCData(message);
+ xmlWriter.WriteEndElement();
+ xmlWriter.WriteStartElement("stack-trace");
+ if (stackTrace != null)
+ WriteCData(stackTrace);
+ xmlWriter.WriteEndElement();
+ xmlWriter.WriteEndElement();
+ }
+
+ private void WriteChildResults(ITestResult result)
+ {
+ xmlWriter.WriteStartElement("results");
+
+ foreach (ITestResult childResult in result.Children)
+ WriteResultElement(childResult);
+
+ xmlWriter.WriteEndElement();
+ }
+
+ #endregion
+
+ #region Output Helpers
+ ///// <summary>
+ ///// Makes string safe for xml parsing, replacing control chars with '?'
+ ///// </summary>
+ ///// <param name="encodedString">string to make safe</param>
+ ///// <returns>xml safe string</returns>
+ //private static string CharacterSafeString(string encodedString)
+ //{
+ // /*The default code page for the system will be used.
+ // Since all code pages use the same lower 128 bytes, this should be sufficient
+ // for finding uprintable control characters that make the xslt processor error.
+ // We use characters encoded by the default code page to avoid mistaking bytes as
+ // individual characters on non-latin code pages.*/
+ // char[] encodedChars = System.Text.Encoding.Default.GetChars(System.Text.Encoding.Default.GetBytes(encodedString));
+
+ // System.Collections.ArrayList pos = new System.Collections.ArrayList();
+ // for (int x = 0; x < encodedChars.Length; x++)
+ // {
+ // char currentChar = encodedChars[x];
+ // //unprintable characters are below 0x20 in Unicode tables
+ // //some control characters are acceptable. (carriage return 0x0D, line feed 0x0A, horizontal tab 0x09)
+ // if (currentChar < 32 && (currentChar != 9 && currentChar != 10 && currentChar != 13))
+ // {
+ // //save the array index for later replacement.
+ // pos.Add(x);
+ // }
+ // }
+ // foreach (int index in pos)
+ // {
+ // encodedChars[index] = '?';//replace unprintable control characters with ?(3F)
+ // }
+ // return System.Text.Encoding.Default.GetString(System.Text.Encoding.Default.GetBytes(encodedChars));
+ //}
+
+ private void WriteCData(string text)
+ {
+ int start = 0;
+ while (true)
+ {
+ int illegal = text.IndexOf("]]>", start);
+ if (illegal < 0)
+ break;
+ xmlWriter.WriteCData(text.Substring(start, illegal - start + 2));
+ start = illegal + 2;
+ if (start >= text.Length)
+ return;
+ }
+
+ if (start > 0)
+ xmlWriter.WriteCData(text.Substring(start));
+ else
+ xmlWriter.WriteCData(text);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/OutputWriters/NUnit3XmlOutputWriter.cs b/external/guiunit/src/framework/Runner/OutputWriters/NUnit3XmlOutputWriter.cs
new file mode 100755
index 0000000..d3b300a
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/OutputWriters/NUnit3XmlOutputWriter.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.Xml;
+using System.IO;
+using NUnit.Framework.Api;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// NUnit3XmlOutputWriter is responsible for writing the results
+ /// of a test to a file in NUnit 3.0 format.
+ /// </summary>
+ public class NUnit3XmlOutputWriter : OutputWriter
+ {
+ /// <summary>
+ /// Writes the test result to the specified TextWriter
+ /// </summary>
+ /// <param name="result">The result to be written to a file</param>
+ /// <param name="writer">A TextWriter to which the result is written</param>
+ public override void WriteResultFile(ITestResult result, TextWriter writer)
+ {
+ // NOTE: Under .NET 1.1, XmlTextWriter does not implement IDisposable,
+ // but does implement Close(). Hence we cannot use a 'using' clause.
+#if CLR_2_0 || CLR_4_0
+ XmlWriterSettings settings = new XmlWriterSettings();
+ settings.Indent = true;
+ XmlWriter xmlWriter = XmlWriter.Create(writer, settings);
+#else
+ XmlTextWriter xmlWriter = new XmlTextWriter(writer);
+ xmlWriter.Formatting = Formatting.Indented;
+#endif
+
+ try
+ {
+ xmlWriter.WriteStartDocument(false);
+ result.ToXml(true).WriteTo(xmlWriter);
+ }
+ finally
+ {
+ xmlWriter.Close();
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/OutputWriters/OutputWriter.cs b/external/guiunit/src/framework/Runner/OutputWriters/OutputWriter.cs
new file mode 100755
index 0000000..3f4d5c3
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/OutputWriters/OutputWriter.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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.IO;
+using System.Text;
+using NUnit.Framework.Api;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// OutputWriter is an abstract class used to write test
+ /// results to a file in various formats. Specific
+ /// OutputWriters are derived from this class.
+ /// </summary>
+ public abstract class OutputWriter
+ {
+ /// <summary>
+ /// Writes a test result to a file
+ /// </summary>
+ /// <param name="result">The result to be written</param>
+ /// <param name="outputPath">Path to the file to which the result is written</param>
+ public void WriteResultFile(ITestResult result, string outputPath)
+ {
+ using (StreamWriter writer = new StreamWriter(outputPath, false, Encoding.UTF8))
+ {
+ WriteResultFile(result, writer);
+ }
+ }
+
+ /// <summary>
+ /// Abstract method that writes a test result to a TextWriter
+ /// </summary>
+ /// <param name="result">The result to be written</param>
+ /// <param name="writer">A TextWriter to which the result is written</param>
+ public abstract void WriteResultFile(ITestResult result, TextWriter writer);
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/ResultReporter.cs b/external/guiunit/src/framework/Runner/ResultReporter.cs
new file mode 100755
index 0000000..1a3b2b6
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/ResultReporter.cs
@@ -0,0 +1,196 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.IO;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// ResultReporter writes the NUnitLite results to a TextWriter.
+ /// </summary>
+ public class ResultReporter
+ {
+ private TextWriter writer;
+ private ITestResult result;
+ private ResultSummary summary;
+ private int reportCount = 0;
+
+ /// <summary>
+ /// Constructs an instance of ResultReporter
+ /// </summary>
+ /// <param name="result">The top-level result being reported</param>
+ /// <param name="writer">A TextWriter to which the report is written</param>
+ public ResultReporter(ITestResult result, TextWriter writer)
+ {
+ this.result = result;
+ this.writer = writer;
+
+ this.summary = new ResultSummary(this.result);
+ }
+
+ /// <summary>
+ /// Gets the ResultSummary created by the ResultReporter
+ /// </summary>
+ public ResultSummary Summary
+ {
+ get { return summary; }
+ }
+
+ /// <summary>
+ /// Produces the standard output reports.
+ /// </summary>
+ public void ReportResults()
+ {
+ PrintSummaryReport();
+
+ if (summary.FailureCount > 0 || summary.ErrorCount > 0)
+ PrintErrorReport();
+
+ if (summary.NotRunCount > 0)
+ PrintNotRunReport();
+
+ //if (commandLineOptions.Full)
+ // PrintFullReport(result);
+ }
+
+ /// <summary>
+ /// Prints the Summary Report
+ /// </summary>
+ public void PrintSummaryReport()
+ {
+ writer.WriteLine(
+ "Tests run: {0}, Passed: {1}, Errors: {2}, Failures: {3}, Inconclusive: {4}",
+ summary.TestCount, summary.PassCount, summary.ErrorCount, summary.FailureCount, summary.InconclusiveCount);
+ writer.WriteLine(
+ " Not run: {0}, Invalid: {1}, Ignored: {2}, Skipped: {3}",
+ summary.NotRunCount, summary.InvalidCount, summary.IgnoreCount, summary.SkipCount);
+ writer.WriteLine("Elapsed time: {0}", result.Duration);
+ }
+
+ /// <summary>
+ /// Prints the Error Report
+ /// </summary>
+ public void PrintErrorReport()
+ {
+ reportCount = 0;
+ writer.WriteLine();
+ writer.WriteLine("Errors and Failures:");
+ PrintErrorResults(this.result);
+ }
+
+ /// <summary>
+ /// Prints the Not Run Report
+ /// </summary>
+ public void PrintNotRunReport()
+ {
+ reportCount = 0;
+ writer.WriteLine();
+ writer.WriteLine("Tests Not Run:");
+ PrintNotRunResults(this.result);
+ }
+
+ /// <summary>
+ /// Prints a full report of all results
+ /// </summary>
+ public void PrintFullReport()
+ {
+ writer.WriteLine();
+ writer.WriteLine("All Test Results:");
+ PrintAllResults(this.result, " ");
+ }
+
+ #region Helper Methods
+
+ private void PrintErrorResults(ITestResult result)
+ {
+ if (result.ResultState.Status == TestStatus.Failed)
+ if (!result.HasChildren || result.FailureSite == FailureSite.SetUp || result.FailureSite == FailureSite.TearDown)
+ WriteSingleResult(result);
+
+ if (result.HasChildren)
+ foreach (ITestResult childResult in result.Children)
+ PrintErrorResults(childResult);
+ }
+
+ private void PrintNotRunResults(ITestResult result)
+ {
+ if (result.HasChildren)
+ foreach (ITestResult childResult in result.Children)
+ PrintNotRunResults(childResult);
+ else if (result.ResultState.Status == TestStatus.Skipped)
+ WriteSingleResult(result);
+ }
+
+ private void PrintTestProperties(ITest test)
+ {
+ foreach (PropertyEntry entry in test.Properties)
+ writer.WriteLine(" {0}: {1}", entry.Name, entry.Value);
+ }
+
+ private void PrintAllResults(ITestResult result, string indent)
+ {
+ string status = null;
+ switch (result.ResultState.Status)
+ {
+ case TestStatus.Failed:
+ status = "FAIL";
+ break;
+ case TestStatus.Skipped:
+ status = "SKIP";
+ break;
+ case TestStatus.Inconclusive:
+ status = "INC ";
+ break;
+ case TestStatus.Passed:
+ status = "OK ";
+ break;
+ }
+
+ writer.Write(status);
+ writer.Write(indent);
+ writer.WriteLine(result.Name);
+
+ if (result.HasChildren)
+ foreach (ITestResult childResult in result.Children)
+ PrintAllResults(childResult, indent + " ");
+ }
+
+ private void WriteSingleResult(ITestResult result)
+ {
+ writer.WriteLine();
+ writer.WriteLine("{0}) {1} ({2})", ++reportCount, result.Name, result.FullName);
+
+ if (result.Message != null && result.Message != string.Empty)
+ writer.WriteLine(" {0}", result.Message);
+
+ if (result.StackTrace != null && result.StackTrace != string.Empty)
+ writer.WriteLine(result.ResultState == ResultState.Failure
+ ? StackFilter.Filter(result.StackTrace)
+ : result.StackTrace + NUnit.Env.NewLine);
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/ResultSummary.cs b/external/guiunit/src/framework/Runner/ResultSummary.cs
new file mode 100755
index 0000000..8848377
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/ResultSummary.cs
@@ -0,0 +1,175 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// Helper class used to summarize the result of a test run
+ /// </summary>
+ public class ResultSummary
+ {
+ private int testCount;
+ private int passCount;
+ private int errorCount;
+ private int failureCount;
+ private int notRunCount;
+ private int inconclusiveCount;
+ private int ignoreCount;
+ private int skipCount;
+ private int invalidCount;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ResultSummary"/> class.
+ /// </summary>
+ /// <param name="result">The result.</param>
+ public ResultSummary(ITestResult result)
+ {
+ Visit(result);
+ }
+
+ /// <summary>
+ /// Gets the test count.
+ /// </summary>
+ /// <value>The test count.</value>
+ public int TestCount
+ {
+ get { return testCount; }
+ }
+
+ /// <summary>
+ /// Gets the count of passed tests
+ /// </summary>
+ public int PassCount
+ {
+ get { return passCount; }
+ }
+
+ /// <summary>
+ /// Gets the error count.
+ /// </summary>
+ /// <value>The error count.</value>
+ public int ErrorCount
+ {
+ get { return errorCount; }
+ }
+
+ /// <summary>
+ /// Gets the failure count.
+ /// </summary>
+ /// <value>The failure count.</value>
+ public int FailureCount
+ {
+ get { return failureCount; }
+ }
+
+ /// <summary>
+ /// Gets the not run count.
+ /// </summary>
+ /// <value>The not run count.</value>
+ public int NotRunCount
+ {
+ get { return notRunCount; }
+ }
+
+ /// <summary>
+ /// Gets the ignore count
+ /// </summary>
+ public int IgnoreCount
+ {
+ get { return ignoreCount; }
+ }
+
+ /// <summary>
+ /// Gets the skip count
+ /// </summary>
+ public int SkipCount
+ {
+ get { return skipCount; }
+ }
+
+ /// <summary>
+ /// Gets the invalid count
+ /// </summary>
+ public int InvalidCount
+ {
+ get { return invalidCount; }
+ }
+
+ /// <summary>
+ /// Gets the count of inconclusive results
+ /// </summary>
+ public int InconclusiveCount
+ {
+ get { return inconclusiveCount; }
+ }
+
+ private void Visit(ITestResult result)
+ {
+ if (result.HasChildren)
+ {
+ if (result.ResultState.Status == TestStatus.Failed)
+ if (result.FailureSite == FailureSite.SetUp || result.FailureSite == FailureSite.TearDown)
+ if (result.ResultState == ResultState.Failure)
+ failureCount++;
+ else
+ errorCount++;
+
+ foreach (ITestResult r in result.Children)
+ Visit(r);
+ }
+ else
+ {
+ testCount++;
+
+ switch (result.ResultState.Status)
+ {
+ case TestStatus.Passed:
+ passCount++;
+ break;
+ case TestStatus.Skipped:
+ if (result.ResultState == ResultState.Ignored)
+ ignoreCount++;
+ else if (result.ResultState == ResultState.Skipped)
+ skipCount++;
+ else if (result.ResultState == ResultState.NotRunnable)
+ invalidCount++;
+ notRunCount++;
+ break;
+ case TestStatus.Failed:
+ if (result.ResultState == ResultState.Failure)
+ failureCount++;
+ else
+ errorCount++;
+ break;
+ case TestStatus.Inconclusive:
+ inconclusiveCount++;
+ break;
+ }
+
+ return;
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..4a74714
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "D:\Dev\NUnit\nunitlite\silverlight\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "6F6202F16BB641581768BCB53F5200C8"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17626
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/Runner/Silverlight/TestPage.xaml.cs b/external/guiunit/src/framework/Runner/Silverlight/TestPage.xaml.cs
new file mode 100755
index 0000000..161bdff
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/Silverlight/TestPage.xaml.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Controls;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Runner.Silverlight
+{
+ /// <summary>
+ /// TestPage is the display page for the test results
+ /// </summary>
+ public partial class TestPage : UserControl
+ {
+ private Assembly callingAssembly;
+ private ITestAssemblyRunner runner;
+ private TextWriter writer;
+
+ public TestPage()
+ {
+ InitializeComponent();
+
+ this.runner = new NUnitLiteTestAssemblyRunner(new NUnitLiteTestAssemblyBuilder());
+ this.callingAssembly = Assembly.GetCallingAssembly();
+ this.writer = new TextBlockWriter(this.ScratchArea);
+ }
+
+ private void UserControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ TextUI.WriteHeader(this.writer);
+ TextUI.WriteRuntimeEnvironment(this.writer);
+
+ if (!LoadTestAssembly())
+ writer.WriteLine("No tests found in assembly {0}", GetAssemblyName(callingAssembly));
+ else
+ Dispatcher.BeginInvoke(() => ExecuteTests());
+ }
+
+ #region Helper Methods
+
+ private bool LoadTestAssembly()
+ {
+ return runner.Load(callingAssembly, new Dictionary<string, string>());
+ }
+
+ private string GetAssemblyName(Assembly assembly)
+ {
+ return new AssemblyName(assembly.FullName).Name;
+ }
+
+ private void ExecuteTests()
+ {
+ ITestResult result = runner.Run(TestListener.NULL, TestFilter.Empty);
+ ResultReporter reporter = new ResultReporter(result, writer);
+
+ reporter.ReportResults();
+
+ ResultSummary summary = reporter.Summary;
+
+ this.Total.Text = summary.TestCount.ToString();
+ this.Failures.Text = summary.FailureCount.ToString();
+ this.Errors.Text = summary.ErrorCount.ToString();
+ this.NotRun.Text = summary.NotRunCount.ToString();
+ this.Passed.Text = summary.PassCount.ToString();
+ this.Inconclusive.Text = summary.InconclusiveCount.ToString();
+
+ this.Notice.Visibility = Visibility.Collapsed;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Runner/Silverlight/TextBlockWriter.cs b/external/guiunit/src/framework/Runner/Silverlight/TextBlockWriter.cs
new file mode 100755
index 0000000..740294f
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/Silverlight/TextBlockWriter.cs
@@ -0,0 +1,106 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if SILVERLIGHT
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Windows.Controls;
+using System.Windows.Documents;
+
+namespace NUnitLite.Runner.Silverlight
+{
+ /// <summary>
+ /// TextBlockWriter is a TextWriter that sends it's
+ /// output to a Silverlight TextBlock.
+ /// </summary>
+ public class TextBlockWriter : TextWriter
+ {
+ private TextBlock textBlock;
+
+ public TextBlockWriter(TextBlock textBlock)
+ {
+ this.textBlock = textBlock;
+ }
+
+ /// <summary>
+ /// Writes a character to the text stream.
+ /// </summary>
+ /// <param name="value">The character to write to the text stream.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(char value)
+ {
+ textBlock.Text += value;
+ }
+
+ /// <summary>
+ /// Writes a string to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void Write(string value)
+ {
+ textBlock.Text += value;
+ }
+
+ /// <summary>
+ /// Writes a string followed by a line terminator to the text stream.
+ /// </summary>
+ /// <param name="value">The string to write. If <paramref name="value"/> is null, only the line termination characters are written.</param>
+ /// <exception cref="T:System.ObjectDisposedException">
+ /// The <see cref="T:System.IO.TextWriter"/> is closed.
+ /// </exception>
+ /// <exception cref="T:System.IO.IOException">
+ /// An I/O error occurs.
+ /// </exception>
+ public override void WriteLine(string value)
+ {
+ textBlock.Inlines.Add(value);
+ textBlock.Inlines.Add(new LineBreak());
+ Debug.WriteLine(value);
+ }
+
+ /// <summary>
+ /// When overridden in a derived class, returns the <see cref="T:System.Text.Encoding"/> in which the output is written.
+ /// </summary>
+ /// <value></value>
+ /// <returns>
+ /// The Encoding in which the output is written.
+ /// </returns>
+ public override System.Text.Encoding Encoding
+ {
+ get { return System.Text.Encoding.UTF8; }
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/framework/Runner/TcpWriter.cs b/external/guiunit/src/framework/Runner/TcpWriter.cs
new file mode 100755
index 0000000..44cb642
--- /dev/null
+++ b/external/guiunit/src/framework/Runner/TcpWriter.cs
@@ -0,0 +1,126 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+// Copyright 2013 Xamarin Inc.
+//
+// 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.IO;
+using System.Net.Sockets;
+using System.Net;
+using System.Threading;
+
+namespace NUnitLite.Runner
+{
+ /// <summary>
+ /// Redirects output to a Tcp connection
+ /// </summary>
+ class TcpWriter : TextWriter
+ {
+ public TcpWriter(IPEndPoint endpoint)
+ {
+ if (endpoint == null)
+ throw new ArgumentNullException ("endpoint");
+
+ this.socket = new Socket (endpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
+
+ var args = new SocketAsyncEventArgs { RemoteEndPoint = endpoint };
+ args.Completed += OnConnectCompleted;
+
+ if (!socket.ConnectAsync (args))
+ OnConnectCompleted (this, args);
+
+ writer = new StreamWriter (stream, Encoding);
+ }
+
+ public override void Write(char value)
+ {
+ writer.Write(value);
+ }
+
+ public override void Write(string value)
+ {
+ writer.Write(value);
+ }
+
+ public override void WriteLine(string value)
+ {
+ writer.WriteLine(value);
+ writer.Flush ();
+ Flush();
+ }
+
+ public override System.Text.Encoding Encoding
+ {
+ get { return System.Text.Encoding.UTF8; }
+ }
+
+ private readonly Socket socket;
+
+ private readonly StreamWriter writer;
+ private readonly MemoryStream stream = new MemoryStream();
+
+ private readonly ManualResetEvent connectWait = new ManualResetEvent (false);
+ private readonly AutoResetEvent wait = new AutoResetEvent (false);
+ private SocketAsyncEventArgs args;
+
+ SocketError error = SocketError.Success;
+
+
+ public override void Flush ()
+ {
+ connectWait.WaitOne();
+
+ if (error != SocketError.Success)
+ throw new SocketException ((int)error);
+
+ if (args == null) {
+ args = new SocketAsyncEventArgs();
+ args.Completed += OnSocketCompleted;
+ }
+
+ byte[] buffer = this.stream.GetBuffer();
+
+ args.SetBuffer (buffer, 0, (int)this.stream.Position);
+ if (!this.socket.SendAsync (args))
+ OnSocketCompleted (this, args);
+
+ wait.WaitOne();
+ this.stream.Position = 0;
+ }
+
+ private void OnConnectCompleted (object sender, SocketAsyncEventArgs e)
+ {
+ if (e.SocketError != SocketError.Success)
+ this.error = e.SocketError;
+ connectWait.Set();
+ }
+
+ private void OnSocketCompleted (object sender, SocketAsyncEventArgs e)
+ {
+ if (e.SocketError != SocketError.Success)
+ this.error = e.SocketError;
+ else if (e.BytesTransferred == 0)
+ this.error = SocketError.Disconnecting;
+ wait.Set();
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/SpecialValue.cs b/external/guiunit/src/framework/SpecialValue.cs
new file mode 100755
index 0000000..15eb1c6
--- /dev/null
+++ b/external/guiunit/src/framework/SpecialValue.cs
@@ -0,0 +1,40 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// The SpecialValue enum is used to represent TestCase arguments
+ /// that cannot be used as arguments to an Attribute.
+ /// </summary>
+ public enum SpecialValue
+ {
+ /// <summary>
+ /// Null represents a null value, which cannot be used as an
+ /// argument to an attribute under .NET 1.x
+ /// </summary>
+ Null
+ }
+}
diff --git a/external/guiunit/src/framework/TestCaseData.cs b/external/guiunit/src/framework/TestCaseData.cs
new file mode 100755
index 0000000..dd14de6
--- /dev/null
+++ b/external/guiunit/src/framework/TestCaseData.cs
@@ -0,0 +1,389 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using System.Collections.Specialized;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+// TODO: Remove conditional code
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// The TestCaseData class represents a set of arguments
+ /// and other parameter info to be used for a parameterized
+ /// test case. It provides a number of instance modifiers
+ /// for use in initializing the test case.
+ ///
+ /// Note: Instance modifiers are getters that return
+ /// the same instance after modifying it's state.
+ /// </summary>
+ public class TestCaseData : ITestCaseData
+ {
+
+ #region Instance Fields
+
+ /// <summary>
+ /// The argument list to be provided to the test
+ /// </summary>
+ private object[] arguments;
+
+ /// <summary>
+ /// The expected result to be returned
+ /// </summary>
+ private object expectedResult;
+
+ /// <summary>
+ /// Data about any expected exception.
+ /// </summary>
+ private ExpectedExceptionData exceptionData;
+
+ /// <summary>
+ /// A dictionary of properties, used to add information
+ /// to tests without requiring the class to change.
+ /// </summary>
+ private IPropertyBag properties;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TestCaseData"/> class.
+ /// </summary>
+ /// <param name="args">The arguments.</param>
+ public TestCaseData(params object[] args)
+ {
+ this.RunState = RunState.Runnable;
+
+ if (args == null)
+ this.arguments = new object[] { null };
+ else
+ this.arguments = args;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TestCaseData"/> class.
+ /// </summary>
+ /// <param name="arg">The argument.</param>
+ public TestCaseData(object arg)
+ {
+ this.RunState = RunState.Runnable;
+ this.arguments = new object[] { arg };
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TestCaseData"/> class.
+ /// </summary>
+ /// <param name="arg1">The first argument.</param>
+ /// <param name="arg2">The second argument.</param>
+ public TestCaseData(object arg1, object arg2)
+ {
+ this.RunState = RunState.Runnable;
+ this.arguments = new object[] { arg1, arg2 };
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:TestCaseData"/> class.
+ /// </summary>
+ /// <param name="arg1">The first argument.</param>
+ /// <param name="arg2">The second argument.</param>
+ /// <param name="arg3">The third argument.</param>
+ public TestCaseData(object arg1, object arg2, object arg3)
+ {
+ this.RunState = RunState.Runnable;
+ this.arguments = new object[] { arg1, arg2, arg3 };
+ }
+
+ #endregion
+
+ #region ITestCaseData Members
+
+ /// <summary>
+ /// Gets the argument list to be provided to the test
+ /// </summary>
+ public object[] Arguments
+ {
+ get { return arguments; }
+ }
+
+ /// <summary>
+ /// Gets the expected result
+ /// </summary>
+ public object ExpectedResult
+ {
+ get { return expectedResult; }
+ set
+ {
+ expectedResult = value;
+ HasExpectedResult = true;
+ }
+ }
+
+ private bool hasExpectedResult;
+ /// <summary>
+ /// Returns true if the expected result has been set
+ /// </summary>
+ public bool HasExpectedResult
+ {
+ get { return hasExpectedResult; }
+ set { hasExpectedResult = value; }
+ }
+
+ /// <summary>
+ /// Gets data about any expected exception.
+ /// </summary>
+ public ExpectedExceptionData ExceptionData
+ {
+ get { return exceptionData; }
+ }
+
+ private string testName;
+ /// <summary>
+ /// Gets the name to be used for the test
+ /// </summary>
+ public string TestName
+ {
+ get { return testName; }
+ set { testName = value; }
+ }
+
+ private RunState runState;
+ /// <summary>
+ /// Gets the RunState for this test case.
+ /// </summary>
+ public RunState RunState
+ {
+ get { return runState; }
+ set { runState = value; }
+ }
+
+ /// <summary>
+ /// Gets the property dictionary for this test
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get
+ {
+ if (properties == null)
+ properties = new NUnit.Framework.Internal.PropertyBag();
+
+ return properties;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties - NUnit 2.6 Compatibility
+
+ /// <summary>
+ /// Gets the expected result.
+ /// </summary>
+ public object Result
+ {
+ get { return expectedResult; }
+ }
+
+ /// <summary>
+ /// The type of exception expected
+ /// </summary>
+ public Type ExpectedException
+ {
+ get { return exceptionData.ExpectedExceptionType; }
+ }
+
+ /// <summary>
+ /// The full name of the expected exception type
+ /// </summary>
+ public string ExpectedExceptionName
+ {
+ get { return exceptionData.ExpectedExceptionName; }
+ }
+
+ /// <summary>
+ /// The message to expect on any exception
+ /// </summary>
+ public string ExpectedExceptionMessage
+ {
+ get { return exceptionData.ExpectedMessage; }
+ }
+
+ /// <summary>
+ /// The type of match to be made on the message
+ /// </summary>
+ public MessageMatch MatchType
+ {
+ get { return exceptionData.MatchType; }
+ }
+
+ #endregion
+
+ #region Fluent Instance Modifiers
+
+ /// <summary>
+ /// Sets the expected result for the test
+ /// </summary>
+ /// <param name="result">The expected result</param>
+ /// <returns>A modified TestCaseData</returns>
+ public TestCaseData Returns(object result)
+ {
+ this.ExpectedResult = result;
+ return this;
+ }
+
+ /// <summary>
+ /// Sets the expected exception type for the test
+ /// </summary>
+ /// <param name="exceptionType">Type of the expected exception.</param>
+ /// <returns>The modified TestCaseData instance</returns>
+ public TestCaseData Throws(Type exceptionType)
+ {
+ //this.expectedExceptionType = exceptionType;
+ exceptionData.ExpectedExceptionName = exceptionType.FullName;
+ return this;
+ }
+
+ /// <summary>
+ /// Sets the expected exception type for the test
+ /// </summary>
+ /// <param name="exceptionName">FullName of the expected exception.</param>
+ /// <returns>The modified TestCaseData instance</returns>
+ public TestCaseData Throws(string exceptionName)
+ {
+ exceptionData.ExpectedExceptionName = exceptionName;
+ return this;
+ }
+
+ /// <summary>
+ /// Sets the name of the test case
+ /// </summary>
+ /// <returns>The modified TestCaseData instance</returns>
+ public TestCaseData SetName(string name)
+ {
+ this.TestName = name;
+ return this;
+ }
+
+ /// <summary>
+ /// Sets the description for the test case
+ /// being constructed.
+ /// </summary>
+ /// <param name="description">The description.</param>
+ /// <returns>The modified TestCaseData instance.</returns>
+ public TestCaseData SetDescription(string description)
+ {
+ this.Properties.Set(PropertyNames.Description, description);
+ return this;
+ }
+
+ /// <summary>
+ /// Applies a category to the test
+ /// </summary>
+ /// <param name="category"></param>
+ /// <returns></returns>
+ public TestCaseData SetCategory(string category)
+ {
+ this.Properties.Add(PropertyNames.Category, category);
+ return this;
+ }
+
+ /// <summary>
+ /// Applies a named property to the test
+ /// </summary>
+ /// <param name="propName"></param>
+ /// <param name="propValue"></param>
+ /// <returns></returns>
+ public TestCaseData SetProperty(string propName, string propValue)
+ {
+ this.Properties.Add(propName, propValue);
+ return this;
+ }
+
+ /// <summary>
+ /// Applies a named property to the test
+ /// </summary>
+ /// <param name="propName"></param>
+ /// <param name="propValue"></param>
+ /// <returns></returns>
+ public TestCaseData SetProperty(string propName, int propValue)
+ {
+ this.Properties.Add(propName, propValue);
+ return this;
+ }
+
+ /// <summary>
+ /// Applies a named property to the test
+ /// </summary>
+ /// <param name="propName"></param>
+ /// <param name="propValue"></param>
+ /// <returns></returns>
+ public TestCaseData SetProperty(string propName, double propValue)
+ {
+ this.Properties.Add(propName, propValue);
+ return this;
+ }
+
+ /// <summary>
+ /// Ignores this TestCase.
+ /// </summary>
+ /// <returns></returns>
+ public TestCaseData Ignore()
+ {
+ this.RunState = RunState.Ignored;
+ return this;
+ }
+
+ /// <summary>
+ /// Marks the test case as explicit.
+ /// </summary>
+ public TestCaseData Explicit() {
+ this.RunState = RunState.Explicit;
+ return this;
+ }
+
+ /// <summary>
+ /// Marks the test case as explicit, specifying the reason.
+ /// </summary>
+ public TestCaseData Explicit(string reason)
+ {
+ this.RunState = RunState.Explicit;
+ this.Properties.Set(PropertyNames.SkipReason, reason);
+ return this;
+ }
+
+ /// <summary>
+ /// Ignores this TestCase, specifying the reason.
+ /// </summary>
+ /// <param name="reason">The reason.</param>
+ /// <returns></returns>
+ public TestCaseData Ignore(string reason)
+ {
+ this.RunState = RunState.Ignored;
+ this.Properties.Set(PropertyNames.SkipReason, reason);
+ return this;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/TestContext.cs b/external/guiunit/src/framework/TestContext.cs
new file mode 100755
index 0000000..6d2891d
--- /dev/null
+++ b/external/guiunit/src/framework/TestContext.cs
@@ -0,0 +1,257 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Provide the context information of the current test.
+ /// This is an adapter for the internal ExecutionContext
+ /// class, hiding the internals from the user test.
+ /// </summary>
+ public class TestContext
+ {
+ private TestExecutionContext ec;
+ private TestAdapter test;
+ private ResultAdapter result;
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct a TestContext for an ExecutionContext
+ /// </summary>
+ /// <param name="ec">The ExecutionContext to adapt</param>
+ public TestContext(TestExecutionContext ec)
+ {
+ this.ec = ec;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Get the current test context. This is created
+ /// as needed. The user may save the context for
+ /// use within a test, but it should not be used
+ /// outside the test for which it is created.
+ /// </summary>
+ public static TestContext CurrentContext
+ {
+ get { return new TestContext(TestExecutionContext.CurrentContext); }
+ }
+
+ /// <summary>
+ /// Get a representation of the current test.
+ /// </summary>
+ public TestAdapter Test
+ {
+ get
+ {
+ if (test == null)
+ test = new TestAdapter(ec.CurrentTest);
+
+ return test;
+ }
+ }
+
+ /// <summary>
+ /// Gets a Representation of the TestResult for the current test.
+ /// </summary>
+ public ResultAdapter Result
+ {
+ get
+ {
+ if (result == null)
+ result = new ResultAdapter(ec.CurrentResult);
+
+ return result;
+ }
+ }
+
+#if !NETCF
+ /// <summary>
+ /// Gets the directory containing the current test assembly.
+ /// </summary>
+ public string TestDirectory
+ {
+ get
+ {
+ return AssemblyHelper.GetDirectoryName(ec.CurrentTest.FixtureType.Assembly);
+ }
+ }
+#endif
+
+ /// <summary>
+ /// Gets the directory to be used for outputing files created
+ /// by this test run.
+ /// </summary>
+ public string WorkDirectory
+ {
+ get
+ {
+ return ec.WorkDirectory;
+ }
+ }
+
+ public RandomGenerator Random
+ {
+ get
+ {
+ return ec.Random;
+ }
+ }
+
+ #endregion
+
+ #region Nested TestAdapter Class
+
+ /// <summary>
+ /// TestAdapter adapts a Test for consumption by
+ /// the user test code.
+ /// </summary>
+ public class TestAdapter
+ {
+ private Test test;
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct a TestAdapter for a Test
+ /// </summary>
+ /// <param name="test">The Test to be adapted</param>
+ public TestAdapter(Test test)
+ {
+ this.test = test;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets the unique Id of a test
+ /// </summary>
+ public int ID
+ {
+ get { return test.Id; }
+ }
+
+ /// <summary>
+ /// The name of the test, which may or may not be
+ /// the same as the method name.
+ /// </summary>
+ public string Name
+ {
+ get
+ {
+ return test.Name;
+ }
+ }
+
+ /// <summary>
+ /// The name of the method representing the test.
+ /// </summary>
+ public string MethodName
+ {
+ get
+ {
+ return test is TestMethod
+ ? ((TestMethod)test).Method.Name
+ : null;
+ }
+ }
+
+ /// <summary>
+ /// The FullName of the test
+ /// </summary>
+ public string FullName
+ {
+ get
+ {
+ return test.FullName;
+ }
+ }
+
+ /// <summary>
+ /// The properties of the test.
+ /// </summary>
+ public IPropertyBag Properties
+ {
+ get
+ {
+ return test.Properties;
+ }
+ }
+
+ #endregion
+ }
+
+ #endregion
+
+ #region Nested ResultAdapter Class
+
+ /// <summary>
+ /// ResultAdapter adapts a TestResult for consumption by
+ /// the user test code.
+ /// </summary>
+ public class ResultAdapter
+ {
+ private TestResult result;
+
+ #region Constructor
+
+ /// <summary>
+ /// Construct a ResultAdapter for a TestResult
+ /// </summary>
+ /// <param name="result">The TestResult to be adapted</param>
+ public ResultAdapter(TestResult result)
+ {
+ this.result = result;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets a ResultState representing the outcome of the test.
+ /// </summary>
+ public ResultState Outcome
+ {
+ get
+ {
+ return result.ResultState;
+ }
+ }
+
+ #endregion
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/framework/Throws.cs b/external/guiunit/src/framework/Throws.cs
new file mode 100755
index 0000000..eee90b3
--- /dev/null
+++ b/external/guiunit/src/framework/Throws.cs
@@ -0,0 +1,153 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ /// <summary>
+ /// Helper class with properties and methods that supply
+ /// constraints that operate on exceptions.
+ /// </summary>
+ public class Throws
+ {
+ #region Exception
+
+ /// <summary>
+ /// Creates a constraint specifying an expected exception
+ /// </summary>
+ public static ResolvableConstraintExpression Exception
+ {
+ get { return new ConstraintExpression().Append(new ThrowsOperator()); }
+ }
+
+ #endregion
+
+ #region InnerException
+
+ /// <summary>
+ /// Creates a constraint specifying an exception with a given InnerException
+ /// </summary>
+ public static ResolvableConstraintExpression InnerException
+ {
+ get { return Exception.InnerException; }
+ }
+
+ #endregion
+
+ #region TargetInvocationException
+
+ /// <summary>
+ /// Creates a constraint specifying an expected TargetInvocationException
+ /// </summary>
+ public static ExactTypeConstraint TargetInvocationException
+ {
+ get { return TypeOf(typeof(System.Reflection.TargetInvocationException)); }
+ }
+
+ #endregion
+
+ #region ArgumentException
+
+ /// <summary>
+ /// Creates a constraint specifying an expected TargetInvocationException
+ /// </summary>
+ public static ExactTypeConstraint ArgumentException
+ {
+ get { return TypeOf(typeof(System.ArgumentException)); }
+ }
+
+ #endregion
+
+ #region InvalidOperationException
+
+ /// <summary>
+ /// Creates a constraint specifying an expected TargetInvocationException
+ /// </summary>
+ public static ExactTypeConstraint InvalidOperationException
+ {
+ get { return TypeOf(typeof(System.InvalidOperationException)); }
+ }
+
+ #endregion
+
+ #region Nothing
+
+ /// <summary>
+ /// Creates a constraint specifying that no exception is thrown
+ /// </summary>
+ public static ThrowsNothingConstraint Nothing
+ {
+ get { return new ThrowsNothingConstraint(); }
+ }
+
+ #endregion
+
+ #region TypeOf
+
+ /// <summary>
+ /// Creates a constraint specifying the exact type of exception expected
+ /// </summary>
+ public static ExactTypeConstraint TypeOf(Type expectedType)
+ {
+ return Exception.TypeOf(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Creates a constraint specifying the exact type of exception expected
+ /// </summary>
+ public static ExactTypeConstraint TypeOf<T>()
+ {
+ return TypeOf(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ #region InstanceOf
+
+ /// <summary>
+ /// Creates a constraint specifying the type of exception expected
+ /// </summary>
+ public static InstanceOfTypeConstraint InstanceOf(Type expectedType)
+ {
+ return Exception.InstanceOf(expectedType);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ /// <summary>
+ /// Creates a constraint specifying the type of exception expected
+ /// </summary>
+ public static InstanceOfTypeConstraint InstanceOf<T>()
+ {
+ return InstanceOf(typeof(T));
+ }
+#endif
+
+ #endregion
+
+ }
+}
diff --git a/external/guiunit/src/framework/nunit.snk b/external/guiunit/src/framework/nunit.snk
new file mode 100755
index 0000000..733af42
Binary files /dev/null and b/external/guiunit/src/framework/nunit.snk differ
diff --git a/external/guiunit/src/framework/nunitlite-2.0.csproj b/external/guiunit/src/framework/nunitlite-2.0.csproj
new file mode 100755
index 0000000..edb4208
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-2.0.csproj
@@ -0,0 +1,387 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C24A3FC4-2541-4E9C-BADD-564777610B75}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <IntermediateOutputPath>obj\$(Configuration)\net-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <DefineConstants>TRACE;DEBUG;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-2.0\nunitlite.xml</DocumentationFile>
+ <OutputPath>..\..\bin\Debug\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-2.0\nunitlite.xml</DocumentationFile>
+ <OutputPath>..\..\bin\Release\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Attributes\DatapointsAttribute.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Attributes\DatapointSourceAttribute.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-3.5.csproj b/external/guiunit/src/framework/nunitlite-3.5.csproj
new file mode 100755
index 0000000..f05e414
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-3.5.csproj
@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{43B24DC5-16D6-45EF-93F1-B021B785A892}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-3.5\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-3.5\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-4.0.csproj b/external/guiunit/src/framework/nunitlite-4.0.csproj
new file mode 100755
index 0000000..a171a40
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-4.0.csproj
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1567BCCE-7BE9-4815-84D7-7F794DB39081}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-4.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-4.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-4.5.csproj b/external/guiunit/src/framework/nunitlite-4.5.csproj
new file mode 100644
index 0000000..38010c3
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-4.5.csproj
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite</RootNamespace>
+ <AssemblyName>GuiUnit</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_5, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Debug\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin</OutputPath>
+ <DefineConstants>TRACE;NET_4_5, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <DocumentationFile>..\..\bin\Release\net-4.5\nunitlite.xml</DocumentationFile>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\DelayedConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\AsyncInvocationRegion.cs" />
+ <Compile Include="Internal\AsyncSynchronizationContext.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ <Compile Include="MacTestListener.cs" />
+ <Compile Include="MainLoopCommand.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/external/guiunit/src/framework/nunitlite-netcf-2.0.csproj b/external/guiunit/src/framework/nunitlite-netcf-2.0.csproj
new file mode 100755
index 0000000..68122ec
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-netcf-2.0.csproj
@@ -0,0 +1,335 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{BED999D7-F594-4CE4-A037-E40E2B9C1288}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>NUnitLite</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <DocumentationFile>..\..\bin\Debug\netcf-2.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <DocumentationFile>..\..\bin\Release\netcf-2.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-netcf-3.5.csproj b/external/guiunit/src/framework/nunitlite-netcf-3.5.csproj
new file mode 100755
index 0000000..fdd79e7
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-netcf-3.5.csproj
@@ -0,0 +1,338 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>nunitlite_netcf_3._5</DeployDirSuffix>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <DocumentationFile>..\..\bin\Debug\netcf-3.5\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <DocumentationFile>..\..\bin\Release\netcf-3.5\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\TcpWriter.cs" />
+ <Compile Include="Runner\TextUI.cs" />
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-sl-3.0.csproj b/external/guiunit/src/framework/nunitlite-sl-3.0.csproj
new file mode 100755
index 0000000..edba75f
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-sl-3.0.csproj
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{02B02379-2596-4E45-8B10-835D62EA2D9E}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <SignManifests>false</SignManifests>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-3.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Debug\sl-3.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Release\sl-3.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Compatibility\SerializableAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\Silverlight\TestPage.xaml.cs">
+ <DependentUpon>TestPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Runner\Silverlight\TextBlockWriter.cs" />
+ <Compile Include="Runner\TextUI.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Runner\Silverlight\TestPage.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-sl-4.0.csproj b/external/guiunit/src/framework/nunitlite-sl-4.0.csproj
new file mode 100755
index 0000000..864ffbb
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-sl-4.0.csproj
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{41326141-EB24-4984-9D9B-5CFAA55946BA}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <IntermediateOutputPath>obj\$(Configuration)\sl-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Debug\sl-4.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Release\sl-4.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Windows" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Compatibility\SerializableAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\Silverlight\TestPage.xaml.cs">
+ <DependentUpon>TestPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\Silverlight\TextBlockWriter.cs" />
+ <Compile Include="Runner\TextUI.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunit.snk" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Runner\Silverlight\TestPage.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite-sl-5.0.csproj b/external/guiunit/src/framework/nunitlite-sl-5.0.csproj
new file mode 100755
index 0000000..88b5437
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite-sl-5.0.csproj
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework</RootNamespace>
+ <AssemblyName>nunitlite</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-5.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_5_0;CLR_4_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Debug\sl-5.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_5_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\bin\Release\sl-5.0\nunitlite.xml</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ExpectedExceptionData.cs" />
+ <Compile Include="Api\FailureSite.cs" />
+ <Compile Include="Api\IParameterDataSource.cs" />
+ <Compile Include="Api\IPropertyBag.cs" />
+ <Compile Include="Api\ITest.cs" />
+ <Compile Include="Api\ITestAssemblyBuilder.cs" />
+ <Compile Include="Api\ITestAssemblyRunner.cs" />
+ <Compile Include="Api\ITestCaseData.cs" />
+ <Compile Include="Api\ITestCaseSource.cs" />
+ <Compile Include="Api\ITestFilter.cs" />
+ <Compile Include="Api\ITestListener.cs" />
+ <Compile Include="Api\ITestResult.cs" />
+ <Compile Include="Api\IXmlNodeBuilder.cs" />
+ <Compile Include="Api\PropertyEntry.cs" />
+ <Compile Include="Api\ResultState.cs" />
+ <Compile Include="Api\RunState.cs" />
+ <Compile Include="Api\TestOutput.cs" />
+ <Compile Include="Api\TestStatus.cs" />
+ <Compile Include="Api\XmlNode.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assert.cs" />
+ <Compile Include="AssertionHelper.cs" />
+ <Compile Include="Assume.cs" />
+ <Compile Include="Attributes\CategoryAttribute.cs" />
+ <Compile Include="Attributes\CombinatorialAttribute.cs" />
+ <Compile Include="Attributes\CultureAttribute.cs" />
+ <Compile Include="Attributes\DataAttribute.cs" />
+ <Compile Include="Attributes\DatapointAttribute.cs" />
+ <Compile Include="Attributes\DatapointsAttribute.cs" />
+ <Compile Include="Attributes\DatapointSourceAttribute.cs" />
+ <Compile Include="Attributes\DescriptionAttribute.cs" />
+ <Compile Include="Attributes\ExpectedExceptionAttribute.cs" />
+ <Compile Include="Attributes\ExplicitAttribute.cs" />
+ <Compile Include="Attributes\IgnoreAttribute.cs" />
+ <Compile Include="Attributes\IncludeExcludeAttribute.cs" />
+ <Compile Include="Attributes\MaxTimeAttribute.cs" />
+ <Compile Include="Attributes\NUnitAttribute.cs" />
+ <Compile Include="Attributes\PairwiseAttribute.cs" />
+ <Compile Include="Attributes\PlatformAttribute.cs" />
+ <Compile Include="Attributes\PropertyAttribute.cs" />
+ <Compile Include="Attributes\RandomAttribute.cs" />
+ <Compile Include="Attributes\RangeAttribute.cs" />
+ <Compile Include="Attributes\RepeatAttribute.cs" />
+ <Compile Include="Attributes\SequentialAttribute.cs" />
+ <Compile Include="Attributes\SetCultureAttribute.cs" />
+ <Compile Include="Attributes\SetUICultureAttribute.cs" />
+ <Compile Include="Attributes\SetUpAttribute.cs" />
+ <Compile Include="Attributes\TearDownAttribute.cs" />
+ <Compile Include="Attributes\TestAttribute.cs" />
+ <Compile Include="Attributes\TestCaseAttribute.cs" />
+ <Compile Include="Attributes\TestCaseSourceAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureSetUpAttribute.cs" />
+ <Compile Include="Attributes\TestFixtureTearDownAttribute.cs" />
+ <Compile Include="Attributes\TheoryAttribute.cs" />
+ <Compile Include="Attributes\TimeoutAttribute.cs" />
+ <Compile Include="Attributes\ValuesAttribute.cs" />
+ <Compile Include="Attributes\ValueSourceAttribute.cs" />
+ <Compile Include="Compatibility\SerializableAttribute.cs" />
+ <Compile Include="Constraints\AllItemsConstraint.cs" />
+ <Compile Include="Constraints\AndConstraint.cs" />
+ <Compile Include="Constraints\AssignableFromConstraint.cs" />
+ <Compile Include="Constraints\AssignableToConstraint.cs" />
+ <Compile Include="Constraints\AttributeConstraint.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraint.cs" />
+ <Compile Include="Constraints\BasicConstraint.cs" />
+ <Compile Include="Constraints\BinaryConstraint.cs" />
+ <Compile Include="Constraints\BinarySerializableConstraint.cs" />
+ <Compile Include="Constraints\CollectionConstraint.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraint.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraint.cs" />
+ <Compile Include="Constraints\CollectionItemsEqualConstraint.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraint.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraint.cs" />
+ <Compile Include="Constraints\CollectionTally.cs" />
+ <Compile Include="Constraints\ComparisonAdapter.cs" />
+ <Compile Include="Constraints\ComparisonConstraint.cs" />
+ <Compile Include="Constraints\Constraint.cs" />
+ <Compile Include="Constraints\ConstraintBuilder.cs" />
+ <Compile Include="Constraints\ConstraintExpression.cs" />
+ <Compile Include="Constraints\ConstraintExpressionBase.cs" />
+ <Compile Include="Constraints\ConstraintFactory.cs" />
+ <Compile Include="Constraints\ContainsConstraint.cs" />
+ <Compile Include="Constraints\EmptyCollectionConstraint.cs" />
+ <Compile Include="Constraints\EmptyConstraint.cs" />
+ <Compile Include="Constraints\EmptyDirectoryConstraint.cs" />
+ <Compile Include="Constraints\EmptyStringConstraint.cs" />
+ <Compile Include="Constraints\EndsWithConstraint.cs" />
+ <Compile Include="Constraints\EqualConstraint.cs" />
+ <Compile Include="Constraints\EqualityAdapter.cs" />
+ <Compile Include="Constraints\ExactCountConstraint.cs" />
+ <Compile Include="Constraints\ExactTypeConstraint.cs" />
+ <Compile Include="Constraints\ExceptionTypeConstraint.cs" />
+ <Compile Include="Constraints\FailurePoint.cs" />
+ <Compile Include="Constraints\FalseConstraint.cs" />
+ <Compile Include="Constraints\FloatingPointNumerics.cs" />
+ <Compile Include="Constraints\GreaterThanConstraint.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraint.cs" />
+ <Compile Include="Constraints\IResolveConstraint.cs" />
+ <Compile Include="Constraints\LessThanConstraint.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraint.cs" />
+ <Compile Include="Constraints\MessageWriter.cs" />
+ <Compile Include="Constraints\MsgUtils.cs" />
+ <Compile Include="Constraints\NaNConstraint.cs" />
+ <Compile Include="Constraints\NoItemConstraint.cs" />
+ <Compile Include="Constraints\NotConstraint.cs" />
+ <Compile Include="Constraints\NullConstraint.cs" />
+ <Compile Include="Constraints\NullOrEmptyStringConstraint.cs" />
+ <Compile Include="Constraints\Numerics.cs" />
+ <Compile Include="Constraints\NUnitComparer.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparer.cs" />
+ <Compile Include="Constraints\Operators\AllOperator.cs" />
+ <Compile Include="Constraints\Operators\AndOperator.cs" />
+ <Compile Include="Constraints\Operators\AttributeOperator.cs" />
+ <Compile Include="Constraints\Operators\BinaryOperator.cs" />
+ <Compile Include="Constraints\Operators\CollectionOperator.cs" />
+ <Compile Include="Constraints\Operators\ConstraintOperator.cs" />
+ <Compile Include="Constraints\Operators\ExactCountOperator.cs" />
+ <Compile Include="Constraints\Operators\NoneOperator.cs" />
+ <Compile Include="Constraints\Operators\NotOperator.cs" />
+ <Compile Include="Constraints\Operators\OrOperator.cs" />
+ <Compile Include="Constraints\Operators\PrefixOperator.cs" />
+ <Compile Include="Constraints\Operators\PropOperator.cs" />
+ <Compile Include="Constraints\Operators\SelfResolvingOperator.cs" />
+ <Compile Include="Constraints\Operators\SomeOperator.cs" />
+ <Compile Include="Constraints\Operators\ThrowsOperator.cs" />
+ <Compile Include="Constraints\Operators\WithOperator.cs" />
+ <Compile Include="Constraints\OrConstraint.cs" />
+ <Compile Include="Constraints\PathConstraint.cs" />
+ <Compile Include="Constraints\PredicateConstraint.cs" />
+ <Compile Include="Constraints\PrefixConstraint.cs" />
+ <Compile Include="Constraints\PropertyConstraint.cs" />
+ <Compile Include="Constraints\PropertyExistsConstraint.cs" />
+ <Compile Include="Constraints\RangeConstraint.cs" />
+ <Compile Include="Constraints\RegexConstraint.cs" />
+ <Compile Include="Constraints\ResolvableConstraintExpression.cs" />
+ <Compile Include="Constraints\ReusableConstraint.cs" />
+ <Compile Include="Constraints\SameAsConstraint.cs" />
+ <Compile Include="Constraints\SamePathConstraint.cs" />
+ <Compile Include="Constraints\SamePathOrUnderConstraint.cs" />
+ <Compile Include="Constraints\SomeItemsConstraint.cs" />
+ <Compile Include="Constraints\StartsWithConstraint.cs" />
+ <Compile Include="Constraints\StringConstraint.cs" />
+ <Compile Include="Constraints\SubPathConstraint.cs" />
+ <Compile Include="Constraints\SubstringConstraint.cs" />
+ <Compile Include="Constraints\ThrowsConstraint.cs" />
+ <Compile Include="Constraints\ThrowsNothingConstraint.cs" />
+ <Compile Include="Constraints\Tolerance.cs" />
+ <Compile Include="Constraints\ToleranceMode.cs" />
+ <Compile Include="Constraints\TrueConstraint.cs" />
+ <Compile Include="Constraints\TypeConstraint.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraint.cs" />
+ <Compile Include="Constraints\XmlSerializableConstraint.cs" />
+ <Compile Include="Contains.cs" />
+ <Compile Include="Env.cs" />
+ <Compile Include="Exceptions\AssertionException.cs" />
+ <Compile Include="Exceptions\IgnoreException.cs" />
+ <Compile Include="Exceptions\InconclusiveException.cs" />
+ <Compile Include="Exceptions\SuccessException.cs" />
+ <Compile Include="Extensibility\IParameterDataProvider.cs" />
+ <Compile Include="Extensibility\ISuiteBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseBuilder.cs" />
+ <Compile Include="Extensibility\ITestCaseProvider.cs" />
+ <Compile Include="GlobalSettings.cs" />
+ <Compile Include="Guard.cs" />
+ <Compile Include="Has.cs" />
+ <Compile Include="IExpectException.cs" />
+ <Compile Include="Internal\AssemblyHelper.cs" />
+ <Compile Include="Internal\Builders\CombinatorialStrategy.cs" />
+ <Compile Include="Internal\Builders\CombinatorialTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\CombiningStrategy.cs" />
+ <Compile Include="Internal\Builders\DataAttributeTestCaseProvider.cs" />
+ <Compile Include="Internal\Builders\DatapointProvider.cs" />
+ <Compile Include="Internal\Builders\NUnitTestCaseBuilder.cs" />
+ <Compile Include="Internal\Builders\NUnitTestFixtureBuilder.cs" />
+ <Compile Include="Internal\Builders\PairwiseStrategy.cs" />
+ <Compile Include="Internal\Builders\ParameterDataProvider.cs" />
+ <Compile Include="Internal\Builders\ProviderCache.cs" />
+ <Compile Include="Internal\Builders\SequentialStrategy.cs" />
+ <Compile Include="Internal\Commands\ApplyChangesToContextCommand.cs" />
+ <Compile Include="Internal\Commands\CommandDecoratorList.cs" />
+ <Compile Include="Internal\Commands\CommandStage.cs" />
+ <Compile Include="Internal\Commands\DelegatingTestCommand.cs" />
+ <Compile Include="Internal\Commands\ExpectedExceptionCommand.cs" />
+ <Compile Include="Internal\Commands\ICommandDecorator.cs" />
+ <Compile Include="Internal\Commands\MaxTimeCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeSetUpCommand.cs" />
+ <Compile Include="Internal\Commands\OneTimeTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\RepeatedTestCommand.cs" />
+ <Compile Include="Internal\Commands\SetUpTearDownCommand.cs" />
+ <Compile Include="Internal\Commands\SkipCommand.cs" />
+ <Compile Include="Internal\Commands\TestCommand.cs" />
+ <Compile Include="Internal\Commands\TestMethodCommand.cs" />
+ <Compile Include="Internal\Commands\TheoryResultCommand.cs" />
+ <Compile Include="Internal\CultureDetector.cs" />
+ <Compile Include="Internal\ExceptionHelper.cs" />
+ <Compile Include="Internal\Extensibility\ParameterDataProviders.cs" />
+ <Compile Include="Internal\Extensibility\TestCaseProviders.cs" />
+ <Compile Include="Internal\Filters\AndFilter.cs" />
+ <Compile Include="Internal\Filters\CategoryExpression.cs" />
+ <Compile Include="Internal\Filters\CategoryFilter.cs" />
+ <Compile Include="Internal\Filters\NotFilter.cs" />
+ <Compile Include="Internal\Filters\OrFilter.cs" />
+ <Compile Include="Internal\Filters\SimpleCategoryExpression.cs" />
+ <Compile Include="Internal\Filters\SimpleNameFilter.cs" />
+ <Compile Include="Internal\IApplyToContext.cs" />
+ <Compile Include="Internal\IApplyToTest.cs" />
+ <Compile Include="Internal\InvalidTestFixtureException.cs" />
+ <Compile Include="Internal\MethodHelper.cs" />
+ <Compile Include="Internal\NUnitException.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyBuilder.cs" />
+ <Compile Include="Internal\NUnitLiteTestAssemblyRunner.cs" />
+ <Compile Include="Internal\OSPlatform.cs" />
+ <Compile Include="Internal\ParameterSet.cs" />
+ <Compile Include="Internal\PlatformHelper.cs" />
+ <Compile Include="Internal\PropertyBag.cs" />
+ <Compile Include="Internal\PropertyNames.cs" />
+ <Compile Include="Internal\RandomGenerator.cs" />
+ <Compile Include="Internal\Randomizer.cs" />
+ <Compile Include="Internal\Reflect.cs" />
+ <Compile Include="Internal\Results\TestCaseResult.cs" />
+ <Compile Include="Internal\Results\TestResult.cs" />
+ <Compile Include="Internal\Results\TestSuiteResult.cs" />
+ <Compile Include="Internal\RuntimeFramework.cs" />
+ <Compile Include="Internal\StackFilter.cs" />
+ <Compile Include="Internal\StringUtil.cs" />
+ <Compile Include="Internal\TestExecutionContext.cs" />
+ <Compile Include="Internal\TestFilter.cs" />
+ <Compile Include="Internal\TestFixtureBuilder.cs" />
+ <Compile Include="Internal\TestListener.cs" />
+ <Compile Include="Internal\Tests\ParameterizedFixtureSuite.cs" />
+ <Compile Include="Internal\Tests\ParameterizedMethodSuite.cs" />
+ <Compile Include="Internal\Tests\Test.cs" />
+ <Compile Include="Internal\Tests\TestAssembly.cs" />
+ <Compile Include="Internal\Tests\TestFixture.cs" />
+ <Compile Include="Internal\Tests\TestMethod.cs" />
+ <Compile Include="Internal\Tests\TestSuite.cs" />
+ <Compile Include="Internal\TextMessageWriter.cs" />
+ <Compile Include="Internal\ThreadUtility.cs" />
+ <Compile Include="Internal\TypeHelper.cs" />
+ <Compile Include="Internal\WorkItems\CompositeWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\CountdownEvent.cs" />
+ <Compile Include="Internal\WorkItems\SimpleWorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItem.cs" />
+ <Compile Include="Internal\WorkItems\WorkItemState.cs" />
+ <Compile Include="Is.cs" />
+ <Compile Include="Iz.cs" />
+ <Compile Include="ListMapper.cs" />
+ <Compile Include="MessageMatch.cs" />
+ <Compile Include="ObjectList.cs" />
+ <Compile Include="Runner\CommandLineOptions.cs" />
+ <Compile Include="Runner\ConsoleWriter.cs" />
+ <Compile Include="Runner\DebugWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit2XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\NUnit3XmlOutputWriter.cs" />
+ <Compile Include="Runner\OutputWriters\OutputWriter.cs" />
+ <Compile Include="Runner\ResultReporter.cs" />
+ <Compile Include="Runner\ResultSummary.cs" />
+ <Compile Include="Runner\Silverlight\TestPage.xaml.cs">
+ <DependentUpon>TestPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Runner\Silverlight\TextBlockWriter.cs" />
+ <Compile Include="Runner\TextUI.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SpecialValue.cs" />
+ <Compile Include="TestCaseData.cs" />
+ <Compile Include="TestContext.cs" />
+ <Compile Include="Throws.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Runner\Silverlight\TestPage.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunitlite.framework.build" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/framework/nunitlite.framework.build b/external/guiunit/src/framework/nunitlite.framework.build
new file mode 100755
index 0000000..84b28dd
--- /dev/null
+++ b/external/guiunit/src/framework/nunitlite.framework.build
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<project name="NUnitLiteFramework" default="build" basedir=".">
+
+ <property name="msbuild.project" value="nunitlite-${msbuild.proj.suffix}.csproj"/>
+
+ <include buildfile="../../nunitlite.projects.common"/>
+
+ <target name="nant-clean">
+
+ <delete file="${current.build.dir}/nunitlite.dll"/>
+ <delete file="${current.build.dir}/nunitlite.pdb"/>
+ <delete file="${current.build.dir}/nunitlite.xml"/>
+
+ </target>
+
+ <target name="nant-build">
+
+ <csc target="library"
+ output="${current.build.dir}/nunitlite.dll"
+ doc="${current.build.dir}/nunitlite.xml"
+ debug="${build.debug}"
+ define="${build.defines};NUNITLITE">
+ <sources basedir="${project.src.dir}/framework">
+ <patternset refid="source-files"/>
+ </sources>
+ <references>
+ <include name="mscorlib.dll"/>
+ <include name="System.dll"/>
+ <include name="System.Xml.dll"/>
+ <include name="System.Windows.dll" if="${runtime.platform == 'silverlight'}"/>
+ </references>
+ </csc>
+
+ </target>
+
+ <patternset id="source-files">
+ <include name="*.cs"/>
+
+ <include name="Api/*.cs"/>
+ <exclude name="Api/ITestCaseSourceProvider.cs"/>
+
+ <include name="Attributes/*.cs"/>
+ <exclude name="Attributes/SetCultureAttribute.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Attributes/SetUICultureAttribute.cs" if="${runtime.platform == 'netcf'}"/>
+
+ <include name="Compatibility/*.cs" if="${runtime.platform == 'silverlight'}"/>
+ <include name="Compatibility/*.cs" if="${runtime.config == 'netcf-1.0'}"/>
+
+ <include name="Constraints/**/*.cs"/>
+ <exclude name="Constraints/BinarySerializableConstraint.cs" if="${runtime.platform == 'silverlight'}"/>
+ <exclude name="Constraints/BinarySerializableConstraint.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Constraints/DelayedConstraint.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Constraints/XmlSerializableConstraint.cs" if="${runtime.platform == 'silverlight'}"/>
+ <exclude name="Constraints/XmlSerializableConstraint.cs" if="${runtime.config == 'netcf-1.0'}"/>
+
+ <include name="Exceptions/*.cs"/>
+ <include name="Extensibility/*.cs"/>
+
+ <include name="Internal/**/*.cs"/>
+ <exclude name="Internal/AsyncSynchronizationContext.cs" unless="${runtime.config == 'net-4.5'}"/>
+ <exclude name="Internal/AsyncInvocationRegion.cs" unless="${runtime.config == 'net-4.5'}"/>
+ <exclude name="Internal/XmlHelper.cs"/>
+
+ <include name="Runner/**/*.cs"/>
+ <exclude name="Runner/TcpWriter.cs"/>
+ <exclude name="Runner/Silverlight/*.cs" unless="${runtime.platform == 'silverlight'}"/>
+ </patternset>
+
+</project>
+
diff --git a/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/framework/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-3.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/Debug/sl-3.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..82de33b
--- /dev/null
+++ b/external/guiunit/src/framework/obj/Debug/sl-3.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,79 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
diff --git a/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/framework/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.i.cs b/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.i.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/Debug/sl-4.0/Runner/Silverlight/TestPage.g.i.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.i.cs b/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.i.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/Debug/sl-5.0/Runner/Silverlight/TestPage.g.i.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/framework/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-3.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/release/sl-3.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..32795e8
--- /dev/null
+++ b/external/guiunit/src/framework/obj/release/sl-3.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "404BC7861A8670733F37E5708303C6F6"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.5420
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/framework/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-4.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/release/sl-4.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/release/sl-4.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/release/sl-5.0/Runner/Silverlight/TestPage.g.cs b/external/guiunit/src/framework/obj/release/sl-5.0/Runner/Silverlight/TestPage.g.cs
new file mode 100755
index 0000000..b96673c
--- /dev/null
+++ b/external/guiunit/src/framework/obj/release/sl-5.0/Runner/Silverlight/TestPage.g.cs
@@ -0,0 +1,80 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\framework\Runner\Silverlight\TestPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D1DD5835B95B554DBE59625C339B3531"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Runner.Silverlight {
+
+
+ public partial class TestPage : System.Windows.Controls.UserControl {
+
+ internal System.Windows.Controls.Grid LayoutRoot;
+
+ internal System.Windows.Controls.TextBlock Total;
+
+ internal System.Windows.Controls.TextBlock Passed;
+
+ internal System.Windows.Controls.TextBlock Failures;
+
+ internal System.Windows.Controls.TextBlock Errors;
+
+ internal System.Windows.Controls.TextBlock Inconclusive;
+
+ internal System.Windows.Controls.TextBlock NotRun;
+
+ internal System.Windows.Controls.TextBlock ScratchArea;
+
+ internal System.Windows.Controls.TextBlock Notice;
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite;component/Runner/Silverlight/TestPage.xaml", System.UriKind.Relative));
+ this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
+ this.Total = ((System.Windows.Controls.TextBlock)(this.FindName("Total")));
+ this.Passed = ((System.Windows.Controls.TextBlock)(this.FindName("Passed")));
+ this.Failures = ((System.Windows.Controls.TextBlock)(this.FindName("Failures")));
+ this.Errors = ((System.Windows.Controls.TextBlock)(this.FindName("Errors")));
+ this.Inconclusive = ((System.Windows.Controls.TextBlock)(this.FindName("Inconclusive")));
+ this.NotRun = ((System.Windows.Controls.TextBlock)(this.FindName("NotRun")));
+ this.ScratchArea = ((System.Windows.Controls.TextBlock)(this.FindName("ScratchArea")));
+ this.Notice = ((System.Windows.Controls.TextBlock)(this.FindName("Notice")));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/framework/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/MockAssembly.cs b/external/guiunit/src/mock-assembly/MockAssembly.cs
new file mode 100755
index 0000000..11b2840
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/MockAssembly.cs
@@ -0,0 +1,300 @@
+// ****************************************************************
+// This is free software licensed under the NUnit license. You
+// may obtain a copy of the license as well as information regarding
+// copyright ownership at http://nunit.org.
+// ****************************************************************
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Tests
+{
+ namespace Assemblies
+ {
+ /// <summary>
+ /// Constant definitions for the mock-assembly dll.
+ /// </summary>
+ public class MockAssembly
+ {
+ public static int Classes = 9;
+ public static int NamespaceSuites = 6; // assembly, NUnit, Tests, Assemblies, Singletons, TestAssembly
+
+ public static int Tests = MockTestFixture.Tests
+ + Singletons.OneTestCase.Tests
+ + TestAssembly.MockTestFixture.Tests
+ + IgnoredFixture.Tests
+ + ExplicitFixture.Tests
+ + BadFixture.Tests
+ + FixtureWithTestCases.Tests
+ + ParameterizedFixture.Tests
+ + GenericFixtureConstants.Tests;
+
+ public static int Suites = MockTestFixture.Suites
+ + Singletons.OneTestCase.Suites
+ + TestAssembly.MockTestFixture.Suites
+ + IgnoredFixture.Suites
+ + ExplicitFixture.Suites
+ + BadFixture.Suites
+ + FixtureWithTestCases.Suites
+ + ParameterizedFixture.Suites
+ + GenericFixtureConstants.Suites
+ + NamespaceSuites;
+
+ public static readonly int Nodes = Tests + Suites;
+
+ public static int ExplicitFixtures = 1;
+ public static int SuitesRun = Suites - ExplicitFixtures;
+
+ public static int Ignored = MockTestFixture.Ignored + IgnoredFixture.Tests;
+ public static int Explicit = MockTestFixture.Explicit + ExplicitFixture.Tests;
+ public static int NotRunnable = MockTestFixture.NotRunnable + BadFixture.Tests;
+ public static int NotRun = Ignored + Explicit + NotRunnable;
+ public static int TestsRun = Tests - NotRun;
+ public static int ResultCount = Tests - Explicit;
+
+ public static int Errors = MockTestFixture.Errors;
+ public static int Failures = MockTestFixture.Failures;
+ public static int ErrorsAndFailures = Errors + Failures;
+
+ public static int Categories = MockTestFixture.Categories;
+
+#if !NETCF
+ public static string AssemblyPath = AssemblyHelper.GetAssemblyPath(typeof(MockAssembly).Assembly);
+#endif
+ }
+
+ //public class MockSuite
+ //{
+ // [Suite]
+ // public static TestSuite Suite
+ // {
+ // get
+ // {
+ // return new TestSuite( "MockSuite" );
+ // }
+ // }
+ //}
+
+ [TestFixture(Description="Fake Test Fixture")]
+ [Category("FixtureCategory")]
+ public class MockTestFixture
+ {
+ public const int Tests = 11;
+ public const int Suites = 1;
+
+ public const int Ignored = 1;
+ public const int Explicit = 1;
+ public const int NotRunnable = 2;
+ public const int NotRun = Ignored + Explicit + NotRunnable;
+ public const int TestsRun = Tests - NotRun;
+ public const int ResultCount = Tests - Explicit;
+
+ public const int Failures = 1;
+ public const int Errors = 1;
+ public const int ErrorsAndFailures = Errors + Failures;
+ public const int Inconclusive = 1;
+
+ public const int Categories = 5;
+ public const int MockCategoryTests = 2;
+
+ [Test(Description="Mock Test #1")]
+ public void MockTest1()
+ {}
+
+ [Test]
+ [Category("MockCategory")]
+ [Property("Severity","Critical")]
+ [Description("This is a really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really long description")]
+ public void MockTest2()
+ {}
+
+ [Test]
+ [Category("MockCategory")]
+ [Category("AnotherCategory")]
+ public void MockTest3()
+ { Assert.Pass("Succeeded!"); }
+
+ [Test]
+ protected static void MockTest5()
+ {}
+
+ [Test]
+ public void FailingTest()
+ {
+ Assert.Fail("Intentional failure");
+ }
+
+ [Test, Property("TargetMethod", "SomeClassName"), Property("Size", 5), /*Property("TargetType", typeof( System.Threading.Thread ))*/]
+ public void TestWithManyProperties()
+ {}
+
+ [Test]
+ [Ignore("ignoring this test method for now")]
+ [Category("Foo")]
+ public void MockTest4()
+ {}
+
+ [Test, Explicit]
+ [Category( "Special" )]
+ public void ExplicitlyRunTest()
+ {}
+
+ [Test]
+ public void NotRunnableTest( int a, int b)
+ {
+ }
+
+ [Test]
+ public void InconclusiveTest()
+ {
+ Assert.Inconclusive("No valid data");
+ }
+
+ [Test]
+ public void TestWithException()
+ {
+ MethodThrowsException();
+ }
+
+ private void MethodThrowsException()
+ {
+ throw new Exception("Intentional Exception");
+ }
+ }
+ }
+
+ namespace Singletons
+ {
+ [TestFixture]
+ public class OneTestCase
+ {
+ public static readonly int Tests = 1;
+ public static readonly int Suites = 1;
+
+ [Test]
+ public virtual void TestCase()
+ {}
+ }
+ }
+
+ namespace TestAssembly
+ {
+ [TestFixture]
+ public class MockTestFixture
+ {
+ public static readonly int Tests = 1;
+ public static readonly int Suites = 1;
+
+ [Test]
+ public void MyTest()
+ {
+ }
+ }
+ }
+
+ [TestFixture, Ignore]
+ public class IgnoredFixture
+ {
+ public static readonly int Tests = 3;
+ public static readonly int Suites = 1;
+
+ [Test]
+ public void Test1() { }
+
+ [Test]
+ public void Test2() { }
+
+ [Test]
+ public void Test3() { }
+ }
+
+ [TestFixture,Explicit]
+ public class ExplicitFixture
+ {
+ public static readonly int Tests = 2;
+ public static readonly int Suites = 1;
+ public static readonly int Nodes = Tests + Suites;
+
+ [Test]
+ public void Test1() { }
+
+ [Test]
+ public void Test2() { }
+ }
+
+ [TestFixture]
+ public class BadFixture
+ {
+ public static readonly int Tests = 1;
+ public static readonly int Suites = 1;
+
+ public BadFixture(int val) { }
+
+ [Test]
+ public void SomeTest() { }
+ }
+
+ [TestFixture]
+ public class FixtureWithTestCases
+ {
+ public static readonly int Tests = 4;
+ public static readonly int Suites = 3;
+
+ [TestCase(2, 2, ExpectedResult=4)]
+ [TestCase(9, 11, ExpectedResult=20)]
+ public int MethodWithParameters(int x, int y)
+ {
+ return x+y;
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestCase(2, 4)]
+ [TestCase(9.2, 11.7)]
+ public void GenericMethod<T>(T x, T y)
+ {
+ }
+#endif
+ }
+
+ [TestFixture(5)]
+ [TestFixture(42)]
+ public class ParameterizedFixture
+ {
+ public static readonly int Tests = 4;
+ public static readonly int Suites = 3;
+
+ public ParameterizedFixture(int num) { }
+
+ [Test]
+ public void Test1() { }
+
+ [Test]
+ public void Test2() { }
+ }
+
+ public class GenericFixtureConstants
+ {
+#if CLR_2_0 || CLR_4_0
+ public static readonly int Tests = 4;
+ public static readonly int Suites = 3;
+#else
+ public static readonly int Tests = 0;
+ public static readonly int Suites = 0;
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestFixture(5)]
+ [TestFixture(11.5)]
+ public class GenericFixture<T>
+ {
+ public GenericFixture(T num){ }
+
+ [Test]
+ public void Test1() { }
+
+ [Test]
+ public void Test2() { }
+ }
+#endif
+}
diff --git a/external/guiunit/src/mock-assembly/Properties/AssemblyInfo.cs b/external/guiunit/src/mock-assembly/Properties/AssemblyInfo.cs
new file mode 100755
index 0000000..bd542a5
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/Properties/AssemblyInfo.cs
@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("mock-assembly")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("mock-assembly")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e33f0417-0b18-4d8c-9142-6ac47cd6c29a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+#if !PocketPC && !WindowsCE && !NETCF
+[assembly: AssemblyFileVersion("1.0.0.0")]
+#endif
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-2.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-2.0.csproj
new file mode 100755
index 0000000..41d6d11
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-2.0.csproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <OutputPath>..\..\bin\Debug\net-2.0\</OutputPath>
+ <Optimize>false</Optimize>
+ <DefineConstants>TRACE;DEBUG;CLR_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;CLR_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <OutputPath>..\..\bin\Release\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-2.0.csproj">
+ <Project>{C24A3FC4-2541-4E9C-BADD-564777610B75}</Project>
+ <Name>nunitlite-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-3.5.csproj b/external/guiunit/src/mock-assembly/mock-assembly-3.5.csproj
new file mode 100755
index 0000000..321f0ca
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-3.5.csproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;CLR_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;CLR_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-3.5.csproj">
+ <Project>{43B24DC5-16D6-45EF-93F1-B021B785A892}</Project>
+ <Name>nunitlite-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-4.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-4.0.csproj
new file mode 100755
index 0000000..d6118f9
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-4.0.csproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;CLR_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;CLR_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.0.csproj">
+ <Project>{1567BCCE-7BE9-4815-84D7-7F794DB39081}</Project>
+ <Name>nunitlite-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-4.5.csproj b/external/guiunit/src/mock-assembly/mock-assembly-4.5.csproj
new file mode 100755
index 0000000..ee4b2a1
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-4.5.csproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A57FFBD8-684A-4868-A4E1-A5D28EC6EA3B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;CLR_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;CLR_4_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.5.csproj">
+ <Project>{d12f0f7b-8de3-43ec-ba49-41052d065a9b}</Project>
+ <Name>nunitlite-4.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-netcf-2.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-netcf-2.0.csproj
new file mode 100755
index 0000000..6c05f85
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-netcf-2.0.csproj
@@ -0,0 +1,79 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{33EA4538-3452-42ED-92A9-4CC3B25032AD}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly_netcf_2._0</RootNamespace>
+ <AssemblyName>mock-assembly-netcf-2.0</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>PocketPC</PlatformFamilyName>
+ <PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID>
+ <OSVersion>4.20</OSVersion>
+ <DeployDirSuffix>mock_assembly_netcf_2._0</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <NativePlatformName>Pocket PC 2003</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-2.0.csproj">
+ <Project>{BED999D7-F594-4CE4-A037-E40E2B9C1288}</Project>
+ <Name>nunitlite-netcf-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-netcf-3.5.csproj b/external/guiunit/src/mock-assembly/mock-assembly-netcf-3.5.csproj
new file mode 100755
index 0000000..d822b50
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-netcf-3.5.csproj
@@ -0,0 +1,82 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B0C85907-1103-44F4-ACFF-6A1B9170C0B1}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly_netcf_3._5</RootNamespace>
+ <AssemblyName>mock-assembly-netcf-3.5</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>PocketPC</PlatformFamilyName>
+ <PlatformID>4118C335-430C-497f-BE48-11C3316B135E</PlatformID>
+ <OSVersion>5.1</OSVersion>
+ <DeployDirSuffix>mock_assembly_netcf_3._5</DeployDirSuffix>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NativePlatformName>Windows Mobile 5.0 Pocket PC SDK</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-3.5.csproj">
+ <Project>{5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}</Project>
+ <Name>nunitlite-netcf-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-sl-3.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-sl-3.0.csproj
new file mode 100755
index 0000000..c3abba8
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-sl-3.0.csproj
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{BB355D2C-FB4F-4526-9B40-7944C40FDFDA}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <SignManifests>false</SignManifests>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-3.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-3.0.csproj">
+ <Project>{02B02379-2596-4E45-8B10-835D62EA2D9E}</Project>
+ <Name>nunitlite-sl-3.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-sl-4.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-sl-4.0.csproj
new file mode 100755
index 0000000..2857954
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-sl-4.0.csproj
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3C1249FC-B5DF-4E3A-ADDD-817526254876}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <IntermediateOutputPath>obj\$(Configuration)\sl-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-4.0.csproj">
+ <Project>{41326141-EB24-4984-9D9B-5CFAA55946BA}</Project>
+ <Name>nunitlite-sl-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly-sl-5.0.csproj b/external/guiunit/src/mock-assembly/mock-assembly-sl-5.0.csproj
new file mode 100755
index 0000000..2a4b022
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly-sl-5.0.csproj
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3C19A734-11BB-48FD-81D0-042B6A8D4CFC}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>mock_assembly</RootNamespace>
+ <AssemblyName>mock-assembly</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-5.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_5_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_5_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MockAssembly.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-5.0.csproj">
+ <Project>{5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}</Project>
+ <Name>nunitlite-sl-5.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/mock-assembly/mock-assembly.build b/external/guiunit/src/mock-assembly/mock-assembly.build
new file mode 100755
index 0000000..bc8550b
--- /dev/null
+++ b/external/guiunit/src/mock-assembly/mock-assembly.build
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<project name="MockAssembly" default="build" basedir=".">
+
+ <property name="msbuild.project" value="mock-assembly-${msbuild.proj.suffix}.csproj"/>
+
+ <include buildfile="../../nunitlite.projects.common"/>
+
+ <target name="nant-clean">
+
+ <delete file="${current.build.dir}/mock-assembly.dll"/>
+ <delete file="${current.build.dir}/mock-assembly.pdb"/>
+
+ </target>
+
+ <target name="nant-build">
+
+ <csc target="library"
+ output="${current.build.dir}/mock-assembly.dll"
+ debug="${build.debug}"
+ define="${build.defines};NUNITLITE">
+ <sources basedir=".">
+ <include name="**/*.cs"/>
+ </sources>
+ <references basedir="${current.build.dir}">
+ <include name="mscorlib.dll"/>
+ <include name="nunitlite.dll"/>
+ </references>
+ </csc>
+
+ </target>
+
+</project>
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/mock-assembly/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/mock-assembly/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/mock-assembly/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/mock-assembly/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/AssemblyInfo.cs b/external/guiunit/src/testdata/AssemblyInfo.cs
new file mode 100755
index 0000000..fd9e52a
--- /dev/null
+++ b/external/guiunit/src/testdata/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NUnitLite Test Data")]
+[assembly: AssemblyDescription("Data for the tests of the NUnitLite testing framework")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NUnitLite")]
+[assembly: AssemblyCopyright("Copyright © 2007-2012, Charlie Poole")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+#if !PocketPC && !WindowsCE && !NETCF
+[assembly: AssemblyFileVersion("1.0.0.0")]
+#endif
+
+// Under Silverlight, it's only possible to reflect
+// over members that would be accessible normally.
+#if SILVERLIGHT
+[assembly: InternalsVisibleTo("nunitlite")]
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/AssertCountFixture.cs b/external/guiunit/src/testdata/AssertCountFixture.cs
new file mode 100755
index 0000000..2b20764
--- /dev/null
+++ b/external/guiunit/src/testdata/AssertCountFixture.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData
+{
+ [TestFixture]
+ public class AssertCountFixture
+ {
+ public static readonly int ExpectedAssertCount = 5;
+
+ [Test]
+ public void BooleanAssert()
+ {
+ Assert.That(2 + 2 == 4);
+ }
+ [Test]
+ public void ConstraintAssert()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4));
+ }
+ [Test]
+ public void ThreeAsserts()
+ {
+ Assert.That(2 + 2 == 4);
+ Assert.That(2 + 2, Is.EqualTo(4));
+ Assert.That(2 + 2, Is.EqualTo(5));
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/AssertFailFixture.cs b/external/guiunit/src/testdata/AssertFailFixture.cs
new file mode 100755
index 0000000..6b3b893
--- /dev/null
+++ b/external/guiunit/src/testdata/AssertFailFixture.cs
@@ -0,0 +1,50 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.AssertFailFixture
+{
+ [TestFixture]
+ public class AssertFailFixture
+ {
+ [Test]
+ public void CallAssertFail()
+ {
+ Assert.Fail();
+ }
+
+ [Test]
+ public void CallAssertFailWithMessage()
+ {
+ Assert.Fail("MESSAGE");
+ }
+
+ [Test]
+ public void CallAssertFailWithMessageAndArgs()
+ {
+ Assert.Fail("MESSAGE: {0}+{1}={2}", 2, 2, 4);
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/AssertIgnoreData.cs b/external/guiunit/src/testdata/AssertIgnoreData.cs
new file mode 100755
index 0000000..fc3ff0c
--- /dev/null
+++ b/external/guiunit/src/testdata/AssertIgnoreData.cs
@@ -0,0 +1,84 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.AssertIgnoreData
+{
+ [TestFixture]
+ public class IgnoredTestCaseFixture
+ {
+ [Test]
+ public void CallsIgnore()
+ {
+ Assert.Ignore("Ignore me");
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void CallsIgnoreWithExpectedException()
+ {
+ Assert.Ignore("Ignore me");
+ }
+ }
+
+ [TestFixture]
+ public class IgnoredTestSuiteFixture
+ {
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ Assert.Ignore("Ignore this fixture");
+ }
+
+ [Test]
+ public void ATest()
+ {
+ }
+
+ [Test]
+ public void AnotherTest()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class IgnoreInSetUpFixture
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ Assert.Ignore( "Ignore this test" );
+ }
+
+ [Test]
+ public void Test1()
+ {
+ }
+
+ [Test]
+ public void Test2()
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/AsyncDummyFixture.cs b/external/guiunit/src/testdata/AsyncDummyFixture.cs
new file mode 100755
index 0000000..c1f8e5f
--- /dev/null
+++ b/external/guiunit/src/testdata/AsyncDummyFixture.cs
@@ -0,0 +1,92 @@
+#if NET_4_5
+using System.Threading.Tasks;
+using NUnit.Framework;
+using System;
+
+namespace NUnit.TestData
+{
+ public class AsyncDummyFixture
+ {
+ [Test]
+ public async void AsyncVoid()
+ {
+ await Task.Delay(0); // To avoid warning message
+ }
+
+ [Test]
+ public async Task AsyncTask()
+ {
+ await Task.Yield();
+ }
+
+ [Test]
+ public async Task<int> AsyncGenericTask()
+ {
+ return await Task.FromResult(1);
+ }
+
+ [Test]
+ public Task NonAsyncTask()
+ {
+ return Task.Delay(0);
+ }
+
+ [Test]
+ public Task<int> NonAsyncGenericTask()
+ {
+ return Task.FromResult(1);
+ }
+
+ [TestCase(4)]
+ public async void AsyncVoidTestCase(int x)
+ {
+ await Task.Delay(0);
+ }
+
+ [TestCase(ExpectedResult = 1)]
+ public async void AsyncVoidTestCaseWithExpectedResult()
+ {
+ await Task.Run(() => 1);
+ }
+
+ [TestCase(4)]
+ public async Task AsyncTaskTestCase(int x)
+ {
+ await Task.Delay(0);
+ }
+
+ [TestCase(ExpectedResult = 1)]
+ public async Task AsyncTaskTestCaseWithExpectedResult()
+ {
+ await Task.Run(() => 1);
+ }
+
+ [TestCase(4)]
+ public async Task<int> AsyncGenericTaskTestCase()
+ {
+ return await Task.Run(() => 1);
+ }
+
+ [TestCase(ExpectedResult = 1)]
+ public async Task<int> AsyncGenericTaskTestCaseWithExpectedResult()
+ {
+ return await Task.Run(() => 1);
+ }
+
+ [TestCase(ExpectedException = typeof(Exception))]
+ public async Task<int> AsyncGenericTaskTestCaseWithExpectedException()
+ {
+ return await Throw();
+ }
+
+ private async Task<int> Throw()
+ {
+ return await Task.Run(() =>
+ {
+ throw new InvalidOperationException();
+ return 1;
+ });
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/AsyncRealFixture.cs b/external/guiunit/src/testdata/AsyncRealFixture.cs
new file mode 100755
index 0000000..5a94b92
--- /dev/null
+++ b/external/guiunit/src/testdata/AsyncRealFixture.cs
@@ -0,0 +1,369 @@
+#if NET_4_5
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace NUnit.TestData
+{
+ public class AsyncRealFixture
+ {
+ [Test]
+ public async void AsyncVoidSuccess()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(1, result);
+ }
+
+ [Test]
+ public async void AsyncVoidFailure()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(2, result);
+ }
+
+ [Test]
+ public async void AsyncVoidError()
+ {
+ await ThrowException();
+
+ Assert.Fail("Should never get here");
+ }
+
+ [Test]
+ public async Task AsyncTaskSuccess()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(1, result);
+ }
+
+ [Test]
+ public async Task AsyncTaskFailure()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(2, result);
+ }
+
+ [Test]
+ public async Task AsyncTaskError()
+ {
+ await ThrowException();
+
+ Assert.Fail("Should never get here");
+ }
+
+ [Test] // Not Runnable
+ public async Task<int> AsyncTaskResultSuccess()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(1, result);
+
+ return result;
+ }
+
+ [Test] // Not Runnable
+ public async Task<int> AsyncTaskResultFailure()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(2, result);
+
+ return result;
+ }
+
+ [Test] // Not Runnable
+ public async Task<int> AsyncTaskResultError()
+ {
+ await ThrowException();
+
+ Assert.Fail("Should never get here");
+
+ return 0;
+ }
+
+ [TestCase(ExpectedResult = 1)]
+ public async Task<int> AsyncTaskResultCheckSuccess()
+ {
+ return await ReturnOne();
+ }
+
+ [TestCase(ExpectedResult = 2)]
+ public async Task<int> AsyncTaskResultCheckFailure()
+ {
+ return await ReturnOne();
+ }
+
+ [TestCase(ExpectedResult = 0)]
+ public async Task<int> AsyncTaskResultCheckError()
+ {
+ return await ThrowException();
+ }
+
+ [TestCase(ExpectedResult = null)]
+ public async Task<object> AsyncTaskResultCheckSuccessReturningNull()
+ {
+ return await Task.Run(() => (object)null);
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public async void AsyncVoidExpectedException()
+ {
+ await ThrowException();
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public async Task AsyncTaskExpectedException()
+ {
+ await ThrowException();
+ }
+
+ [Test] // Not Runnable
+ [ExpectedException(typeof(InvalidOperationException))]
+ public async Task<int> AsyncTaskResultExpectedException()
+ {
+ return await ThrowException();
+ }
+
+ [Test]
+ public async void AsyncVoidAssertSynchronizationContext()
+ {
+ await Task.Yield();
+ }
+
+ [Test]
+ public async void NestedAsyncVoidSuccess()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(1, result);
+ }
+
+ [Test]
+ public async void NestedAsyncVoidFailure()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(2, result);
+ }
+
+ [Test]
+ public async void NestedAsyncVoidError()
+ {
+ await Task.Run(async () => await ThrowException());
+
+ Assert.Fail("Should not get here");
+ }
+
+ [Test]
+ public async Task NestedAsyncTaskSuccess()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(1, result);
+ }
+
+ [Test]
+ public async Task NestedAsyncTaskFailure()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(2, result);
+ }
+
+ [Test]
+ public async Task NestedAsyncTaskError()
+ {
+ await Task.Run(async () => await ThrowException());
+
+ Assert.Fail("Should never get here");
+ }
+
+ [Test]
+ public async Task<int> NestedAsyncTaskResultSuccess()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(1, result);
+
+ return result;
+ }
+
+ [Test]
+ public async Task<int> NestedAsyncTaskResultFailure()
+ {
+ var result = await Task.Run(async () => await ReturnOne());
+
+ Assert.AreEqual(2, result);
+
+ return result;
+ }
+
+ [Test]
+ public async Task<int> NestedAsyncTaskResultError()
+ {
+ var result = await Task.Run(async () => await ThrowException());
+
+ Assert.Fail("Should never get here");
+
+ return result;
+ }
+
+ [Test]
+ public async void AsyncVoidMultipleSuccess()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(await ReturnOne(), result);
+ }
+
+ [Test]//
+ public async void AsyncVoidMultipleFailure()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(await ReturnOne() + 1, result);
+ }
+
+ [Test]
+ public async void AsyncVoidMultipleError()
+ {
+ var result = await ReturnOne();
+ await ThrowException();
+
+ Assert.Fail("Should never get here");
+ }
+
+ [Test]
+ public async void AsyncTaskMultipleSuccess()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(await ReturnOne(), result);
+ }
+
+ [Test]
+ public async void AsyncTaskMultipleFailure()
+ {
+ var result = await ReturnOne();
+
+ Assert.AreEqual(await ReturnOne() + 1, result);
+ }
+
+ [Test]
+ public async void AsyncTaskMultipleError()
+ {
+ var result = await ReturnOne();
+ await ThrowException();
+
+ Assert.Fail("Should never get here");
+ }
+
+ [TestCase(1, 2)]
+ public async void AsyncVoidTestCaseWithParametersSuccess(int a, int b)
+ {
+ Assert.AreEqual(await ReturnOne(), b - a);
+ }
+
+ [Test]
+ public async void VoidCheckTestContextAcrossTasks()
+ {
+ var testName = await GetTestNameFromContext();
+
+ Assert.IsNotNull(testName);
+ Assert.AreEqual(testName, TestContext.CurrentContext.Test.Name);
+ }
+
+ [Test]
+ public async Task TaskCheckTestContextAcrossTasks()
+ {
+ var testName = await GetTestNameFromContext();
+
+ Assert.IsNotNull(testName);
+ Assert.AreEqual(testName, TestContext.CurrentContext.Test.Name);
+ }
+
+ [Test]
+ public async void VoidCheckTestContextWithinTestBody()
+ {
+ var testName = TestContext.CurrentContext.Test.Name;
+
+ await ReturnOne();
+
+ Assert.IsNotNull(testName);
+ Assert.AreEqual(testName, TestContext.CurrentContext.Test.Name);
+ }
+
+ [Test]
+ public async Task TaskCheckTestContextWithinTestBody()
+ {
+ var testName = TestContext.CurrentContext.Test.Name;
+
+ await ReturnOne();
+
+ Assert.IsNotNull(testName);
+ Assert.AreEqual(testName, TestContext.CurrentContext.Test.Name);
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public async void VoidAsyncVoidChildCompletingEarlierThanTest()
+ {
+ AsyncVoidMethod();
+
+ await ThrowExceptionIn(TimeSpan.FromSeconds(1));
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public async void VoidAsyncVoidChildThrowingImmediately()
+ {
+ AsyncVoidThrowException();
+
+ await Task.Run(() => Assert.Fail("Should never invoke this"));
+ }
+
+ private static async void AsyncVoidThrowException()
+ {
+ await Task.Run(() => { throw new InvalidOperationException(); });
+ }
+
+ private static async Task ThrowExceptionIn(TimeSpan delay)
+ {
+ await Task.Delay(delay);
+ throw new InvalidOperationException();
+ }
+
+ private static async void AsyncVoidMethod()
+ {
+ await Task.Yield();
+ }
+
+ private static Task<string> GetTestNameFromContext()
+ {
+ return Task.Run(() => TestContext.CurrentContext.Test.Name);
+ }
+
+ private static Task<int> ReturnOne()
+ {
+ return Task.Run(() => 1);
+ }
+
+ private static Task<int> ThrowException()
+ {
+ return Task.Run(() =>
+ {
+ throw new InvalidOperationException();
+ return 1;
+ });
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/testdata/AttributeInheritanceData.cs b/external/guiunit/src/testdata/AttributeInheritanceData.cs
new file mode 100755
index 0000000..1d6cb15
--- /dev/null
+++ b/external/guiunit/src/testdata/AttributeInheritanceData.cs
@@ -0,0 +1,60 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.AttributeInheritanceData
+{
+ // Sample Test from a post by Scott Bellware
+
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple=false)]
+ class ConcernAttribute : TestFixtureAttribute
+ {
+ private Type typeOfConcern;
+
+ public ConcernAttribute( Type typeOfConcern )
+ {
+ this.typeOfConcern = typeOfConcern;
+ }
+ }
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
+ class SpecAttribute : TestAttribute
+ {
+ }
+
+ /// <summary>
+ /// Summary description for AttributeInheritance.
+ /// </summary>
+ [Concern(typeof(ClassUnderTest))]
+ public class When_collecting_test_fixtures
+ {
+ [Spec]
+ public void should_include_classes_with_an_attribute_derived_from_TestFixtureAttribute()
+ {
+ }
+ }
+
+ class ClassUnderTest { }
+}
diff --git a/external/guiunit/src/testdata/CategoryAttributeData.cs b/external/guiunit/src/testdata/CategoryAttributeData.cs
new file mode 100755
index 0000000..a70c093
--- /dev/null
+++ b/external/guiunit/src/testdata/CategoryAttributeData.cs
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.CategoryAttributeData
+{
+ [TestFixture, InheritableCategory("MyCategory")]
+ public abstract class AbstractBase { }
+
+ [TestFixture, Category( "DataBase" )]
+ public class FixtureWithCategories : AbstractBase
+ {
+ [Test, Category("Long")]
+ public void Test1() { }
+
+ [Test, Critical]
+ public void Test2() { }
+
+ [Test, Category("Top")]
+ [TestCaseSource("Test3Data")]
+ public void Test3(int x) { }
+
+ [Test, Category("A-B")]
+ public void Test4() { }
+
+ internal TestCaseData[] Test3Data = new TestCaseData[] {
+ new TestCaseData(5).SetCategory("Bottom")
+ };
+ }
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
+ public class CriticalAttribute : CategoryAttribute { }
+
+ [AttributeUsage(AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
+ public class InheritableCategoryAttribute : CategoryAttribute
+ {
+ public InheritableCategoryAttribute(string name) : base(name) { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/CultureAttributeData.cs b/external/guiunit/src/testdata/CultureAttributeData.cs
new file mode 100755
index 0000000..29956b3
--- /dev/null
+++ b/external/guiunit/src/testdata/CultureAttributeData.cs
@@ -0,0 +1,57 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.CultureAttributeData
+{
+ [TestFixture, Culture( "en,fr,de" )]
+ public class FixtureWithCultureAttribute
+ {
+ [Test, Culture("en,de")]
+ public void EnglishAndGermanTest() { }
+
+ [Test, Culture("fr")]
+ public void FrenchTest() { }
+
+ [Test, Culture("fr-CA")]
+ public void FrenchCanadaTest() { }
+ }
+
+#if !NETCF
+ [TestFixture, SetCulture("xx-XX")]
+ public class FixtureWithInvalidSetCultureAttribute
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ [TestFixture]
+ public class FixtureWithInvalidSetCultureAttributeOnTest
+ {
+ [Test, SetCulture("xx-XX")]
+ public void InvalidCultureSet() { }
+ }
+#endif
+}
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/DatapointFixture.cs b/external/guiunit/src/testdata/DatapointFixture.cs
new file mode 100755
index 0000000..cf631d3
--- /dev/null
+++ b/external/guiunit/src/testdata/DatapointFixture.cs
@@ -0,0 +1,119 @@
+using System;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework;
+
+namespace NUnit.TestData.DatapointFixture
+{
+ public abstract class SquareRootTest
+ {
+ [Theory]
+ public void SqrtTimesItselfGivesOriginal(double num)
+ {
+ Assume.That(num >= 0.0 && num < double.MaxValue);
+
+ double sqrt = Math.Sqrt(num);
+
+ Assert.That(sqrt >= 0.0);
+ Assert.That(sqrt * sqrt, Is.EqualTo(num).Within(0.000001));
+ }
+ }
+
+ public class SquareRootTest_Field_Double : SquareRootTest
+ {
+ [Datapoint]
+ public double zero = 0;
+
+ [Datapoint]
+ public double positive = 1;
+
+ [Datapoint]
+ public double negative = -1;
+
+ [Datapoint]
+ public double max = double.MaxValue;
+
+ [Datapoint]
+ public double infinity = double.PositiveInfinity;
+ }
+
+ public class SquareRootTest_Field_ArrayOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public double[] values = new double[] { 0.0, 1.0, -1.0, double.MaxValue, double.PositiveInfinity };
+ }
+
+ public class SquareRootTest_Property_ArrayOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public double[] Values
+ {
+ get { return new double[] { 0.0, 1.0, -1.0, double.MaxValue, double.PositiveInfinity }; }
+ }
+ }
+
+ public class SquareRootTest_Method_ArrayOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public double[] GetValues()
+ {
+ return new double[] { 0.0, 1.0, -1.0, double.MaxValue, double.PositiveInfinity };
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public class SquareRootTest_Field_IEnumerableOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public IEnumerable<double> values = new List<double>( new double[] { 0.0, 1.0, -1.0, double.MaxValue, double.PositiveInfinity } );
+ }
+
+ public class SquareRootTest_Property_IEnumerableOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public IEnumerable<double> Values
+ {
+ get
+ {
+ List<double> list = new List<double>();
+ list.Add(0.0);
+ list.Add(1.0);
+ list.Add(-1.0);
+ list.Add(double.MaxValue);
+ list.Add(double.PositiveInfinity);
+ return list;
+ }
+ }
+ }
+
+ public class SquareRootTest_Method_IEnumerableOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public IEnumerable<double> GetValues()
+ {
+ List<double> list = new List<double>();
+ list.Add(0.0);
+ list.Add(1.0);
+ list.Add(-1.0);
+ list.Add(double.MaxValue);
+ list.Add(double.PositiveInfinity);
+ return list;
+ }
+ }
+
+ public class SquareRootTest_Iterator_IEnumerableOfDouble : SquareRootTest
+ {
+ [Datapoints]
+ public IEnumerable<double> GetValues()
+ {
+ yield return 0.0;
+
+ yield return 1.0;
+ yield return -1.0;
+ yield return double.MaxValue;
+ yield return double.PositiveInfinity;
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/testdata/DescriptionFixture.cs b/external/guiunit/src/testdata/DescriptionFixture.cs
new file mode 100755
index 0000000..079a10e
--- /dev/null
+++ b/external/guiunit/src/testdata/DescriptionFixture.cs
@@ -0,0 +1,50 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.DescriptionFixture
+{
+ [TestFixture(Description = "Fixture Description")]
+ public class DescriptionFixture
+ {
+ [Test(Description = "Test Description")]
+ public void Method()
+ {}
+
+ [Test]
+ public void NoDescriptionMethod()
+ {}
+
+ [Test]
+ [Description("Separate Description")]
+ public void SeparateDescriptionMethod()
+ { }
+
+ [Test, Description("method description")]
+ [TestCase(5, Description = "case description")]
+ public void TestCaseWithDescription(int x)
+ { }
+ }
+}
diff --git a/external/guiunit/src/testdata/ExpectedExceptionData.cs b/external/guiunit/src/testdata/ExpectedExceptionData.cs
new file mode 100755
index 0000000..6b92aad
--- /dev/null
+++ b/external/guiunit/src/testdata/ExpectedExceptionData.cs
@@ -0,0 +1,279 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.ExpectedExceptionData
+{
+ [TestFixture]
+ public class BaseException
+ {
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void BaseExceptionTest()
+ {
+ throw new Exception();
+ }
+ }
+
+ [TestFixture]
+ public class DerivedException
+ {
+ [Test]
+ [ExpectedException(typeof(Exception))]
+ public void DerivedExceptionTest()
+ {
+ throw new ArgumentException();
+ }
+ }
+
+ [TestFixture]
+ public class MismatchedException
+ {
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void MismatchedExceptionType()
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ [Test]
+ [ExpectedException(ExpectedException=typeof(ArgumentException))]
+ public void MismatchedExceptionTypeAsNamedParameter()
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException), UserMessage="custom message")]
+ public void MismatchedExceptionTypeWithUserMessage()
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException")]
+ public void MismatchedExceptionName()
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException", UserMessage="custom message")]
+ public void MismatchedExceptionNameWithUserMessage()
+ {
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+
+ [TestFixture]
+ public class SetUpExceptionTests
+ {
+ [SetUp]
+ public void Init()
+ {
+ throw new ArgumentException("SetUp Exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void Test()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class TearDownExceptionTests
+ {
+ [TearDown]
+ public void CleanUp()
+ {
+ throw new ArgumentException("TearDown Exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void Test()
+ {}
+ }
+
+ [TestFixture]
+ public class TestThrowsExceptionFixture
+ {
+ [Test]
+ public void TestThrow()
+ {
+ throw new Exception();
+ }
+ }
+
+ [TestFixture]
+ public class TestDoesNotThrowExceptionFixture
+ {
+ [Test, ExpectedException("System.ArgumentException")]
+ public void TestDoesNotThrowExceptionName()
+ {
+ }
+
+ [Test, ExpectedException("System.ArgumentException", UserMessage="custom message")]
+ public void TestDoesNotThrowExceptionNameWithUserMessage()
+ {
+ }
+
+ [Test, ExpectedException( typeof( System.ArgumentException ) )]
+ public void TestDoesNotThrowExceptionType()
+ {
+ }
+
+ [Test, ExpectedException( typeof( System.ArgumentException ), UserMessage="custom message" )]
+ public void TestDoesNotThrowExceptionTypeWithUserMessage()
+ {
+ }
+
+ [Test, ExpectedException]
+ public void TestDoesNotThrowUnspecifiedException()
+ {
+ }
+
+ [Test, ExpectedException( UserMessage="custom message" )]
+ public void TestDoesNotThrowUnspecifiedExceptionWithUserMessage()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class TestThrowsExceptionWithRightMessage
+ {
+ [Test]
+ [ExpectedException(typeof(Exception), ExpectedMessage="the message")]
+ public void TestThrow()
+ {
+ throw new Exception("the message");
+ }
+ }
+
+ [TestFixture]
+ public class TestThrowsArgumentOutOfRangeException
+ {
+ [Test]
+ [ExpectedException(typeof(ArgumentOutOfRangeException)) ]
+ public void TestThrow()
+ {
+#if NETCF || SILVERLIGHT
+ throw new ArgumentOutOfRangeException("param", "the message");
+#else
+ throw new ArgumentOutOfRangeException("param", "actual value", "the message");
+#endif
+ }
+ }
+
+ [TestFixture]
+ public class TestThrowsExceptionWithWrongMessage
+ {
+ [Test]
+ [ExpectedException(typeof(Exception), ExpectedMessage="not the message")]
+ public void TestThrow()
+ {
+ throw new Exception("the message");
+ }
+
+ [Test]
+ [ExpectedException( typeof(Exception), ExpectedMessage="not the message", UserMessage="custom message" )]
+ public void TestThrowWithUserMessage()
+ {
+ throw new Exception("the message");
+ }
+ }
+
+ [TestFixture]
+ public class TestAssertsBeforeThrowingException
+ {
+ [Test]
+ [ExpectedException(typeof(Exception))]
+ public void TestAssertFail()
+ {
+ Assert.Fail( "private message" );
+ }
+ }
+
+ public class ExceptionHandlerCalledClass : IExpectException
+ {
+ public bool HandlerCalled = false;
+ public bool AlternateHandlerCalled = false;
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void ThrowsArgumentException()
+ {
+ throw new ArgumentException();
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void ThrowsCustomException()
+ {
+ throw new CustomException();
+ }
+
+ class CustomException : Exception { }
+
+ [Test, ExpectedException(typeof(ArgumentException), Handler = "AlternateExceptionHandler")]
+ public void ThrowsArgumentException_AlternateHandler()
+ {
+ throw new ArgumentException();
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException), Handler = "AlternateExceptionHandler")]
+ public void ThrowsCustomException_AlternateHandler()
+ {
+ throw new CustomException();
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void ThrowsSystemException()
+ {
+ throw new Exception();
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException), Handler = "AlternateExceptionHandler")]
+ public void ThrowsSystemException_AlternateHandler()
+ {
+ throw new Exception();
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException), Handler = "DeliberatelyMissingHandler")]
+ public void MethodWithBadHandler()
+ {
+ throw new ArgumentException();
+ }
+
+ public void HandleException(Exception ex)
+ {
+ HandlerCalled = true;
+ }
+
+ public void AlternateExceptionHandler(Exception ex)
+ {
+ AlternateHandlerCalled = true;
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/FixtureSetUpTearDownData.cs b/external/guiunit/src/testdata/FixtureSetUpTearDownData.cs
new file mode 100755
index 0000000..2b0828e
--- /dev/null
+++ b/external/guiunit/src/testdata/FixtureSetUpTearDownData.cs
@@ -0,0 +1,360 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.FixtureSetUpTearDownData
+{
+ [TestFixture]
+ public class SetUpAndTearDownFixture
+ {
+ public int setUpCount = 0;
+ public int tearDownCount = 0;
+
+ [TestFixtureSetUp]
+ public virtual void Init()
+ {
+ setUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public virtual void Destroy()
+ {
+ tearDownCount++;
+ }
+
+ [Test]
+ public void Success(){}
+
+ [Test]
+ public void EvenMoreSuccess(){}
+ }
+
+ [TestFixture, Explicit]
+ public class ExplicitSetUpAndTearDownFixture
+ {
+ public int setUpCount = 0;
+ public int tearDownCount = 0;
+
+ [TestFixtureSetUp]
+ public virtual void Init()
+ {
+ setUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public virtual void Destroy()
+ {
+ tearDownCount++;
+ }
+
+ [Test]
+ public void Success() { }
+
+ [Test]
+ public void EvenMoreSuccess() { }
+ }
+
+ [TestFixture]
+ public class InheritSetUpAndTearDown : SetUpAndTearDownFixture
+ {
+ [Test]
+ public void AnotherTest(){}
+
+ [Test]
+ public void YetAnotherTest(){}
+ }
+
+ [TestFixture]
+ public class DefineInheritSetUpAndTearDown : SetUpAndTearDownFixture
+ {
+ public int derivedSetUpCount;
+ public int derivedTearDownCount;
+
+ [TestFixtureSetUp]
+ public override void Init()
+ {
+ derivedSetUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public override void Destroy()
+ {
+ derivedTearDownCount++;
+ }
+
+ [Test]
+ public void AnotherTest() { }
+
+ [Test]
+ public void YetAnotherTest() { }
+ }
+
+ [TestFixture]
+ public class DerivedSetUpAndTearDownFixture : SetUpAndTearDownFixture
+ {
+ public int derivedSetUpCount;
+ public int derivedTearDownCount;
+
+ public bool baseSetUpCalledFirst;
+ public bool baseTearDownCalledLast;
+
+ [TestFixtureSetUp]
+ public void Init2()
+ {
+ derivedSetUpCount++;
+ baseSetUpCalledFirst = this.setUpCount > 0;
+ }
+
+ [TestFixtureTearDown]
+ public void Destroy2()
+ {
+ derivedTearDownCount++;
+ baseTearDownCalledLast = this.tearDownCount == 0;
+ }
+
+ [Test]
+ public void AnotherTest() { }
+
+ [Test]
+ public void YetAnotherTest() { }
+ }
+
+ [TestFixture]
+ public class StaticSetUpAndTearDownFixture
+ {
+ public static int setUpCount = 0;
+ public static int tearDownCount = 0;
+
+ [TestFixtureSetUp]
+ public static void Init()
+ {
+ setUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public static void Destroy()
+ {
+ tearDownCount++;
+ }
+ }
+
+ [TestFixture]
+ public class DerivedStaticSetUpAndTearDownFixture : StaticSetUpAndTearDownFixture
+ {
+ public static int derivedSetUpCount;
+ public static int derivedTearDownCount;
+
+ public static bool baseSetUpCalledFirst;
+ public static bool baseTearDownCalledLast;
+
+
+ [TestFixtureSetUp]
+ public static void Init2()
+ {
+ derivedSetUpCount++;
+ baseSetUpCalledFirst = setUpCount > 0;
+ }
+
+ [TestFixtureTearDown]
+ public static void Destroy2()
+ {
+ derivedTearDownCount++;
+ baseTearDownCalledLast = tearDownCount == 0;
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestFixture]
+ public static class StaticClassSetUpAndTearDownFixture
+ {
+ public static int setUpCount = 0;
+ public static int tearDownCount = 0;
+
+ [TestFixtureSetUp]
+ public static void Init()
+ {
+ setUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public static void Destroy()
+ {
+ tearDownCount++;
+ }
+ }
+#endif
+
+ [TestFixture]
+ public class MisbehavingFixture
+ {
+ public bool blowUpInSetUp = false;
+ public bool blowUpInTearDown = false;
+
+ public int setUpCount = 0;
+ public int tearDownCount = 0;
+
+ public void Reinitialize()
+ {
+ setUpCount = 0;
+ tearDownCount = 0;
+
+ blowUpInSetUp = false;
+ blowUpInTearDown = false;
+ }
+
+ [TestFixtureSetUp]
+ public void BlowUpInSetUp()
+ {
+ setUpCount++;
+ if (blowUpInSetUp)
+ throw new Exception("This was thrown from fixture setup");
+ }
+
+ [TestFixtureTearDown]
+ public void BlowUpInTearDown()
+ {
+ tearDownCount++;
+ if ( blowUpInTearDown )
+ throw new Exception("This was thrown from fixture teardown");
+ }
+
+ [Test]
+ public void nothingToTest()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class ExceptionInConstructor
+ {
+ public ExceptionInConstructor()
+ {
+ throw new Exception( "This was thrown in constructor" );
+ }
+
+ [Test]
+ public void nothingToTest()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class IgnoreInFixtureSetUp
+ {
+ [TestFixtureSetUp]
+ public void SetUpCallsIgnore()
+ {
+ Assert.Ignore( "TestFixtureSetUp called Ignore" );
+ }
+
+ [Test]
+ public void nothingToTest()
+ {
+ }
+ }
+
+ [TestFixture]
+ public class SetUpAndTearDownWithTestInName
+ {
+ public int setUpCount = 0;
+ public int tearDownCount = 0;
+
+ [TestFixtureSetUp]
+ public virtual void TestFixtureSetUp()
+ {
+ setUpCount++;
+ }
+
+ [TestFixtureTearDown]
+ public virtual void TestFixtureTearDown()
+ {
+ tearDownCount++;
+ }
+
+ [Test]
+ public void Success(){}
+
+ [Test]
+ public void EvenMoreSuccess(){}
+ }
+
+ [TestFixture, Ignore( "Do Not Run This" )]
+ public class IgnoredFixture
+ {
+ public bool setupCalled = false;
+ public bool teardownCalled = false;
+
+ [TestFixtureSetUp]
+ public virtual void ShouldNotRun()
+ {
+ setupCalled = true;
+ }
+
+ [TestFixtureTearDown]
+ public virtual void NeitherShouldThis()
+ {
+ teardownCalled = true;
+ }
+
+ [Test]
+ public void Success(){}
+
+ [Test]
+ public void EvenMoreSuccess(){}
+ }
+
+ [TestFixture]
+ public class FixtureWithNoTests
+ {
+ public bool setupCalled = false;
+ public bool teardownCalled = false;
+
+ [TestFixtureSetUp]
+ public virtual void Init()
+ {
+ setupCalled = true;
+ }
+
+ [TestFixtureTearDown]
+ public virtual void Destroy()
+ {
+ teardownCalled = true;
+ }
+ }
+
+ [TestFixture]
+ public class DisposableFixture : IDisposable
+ {
+ public bool disposeCalled = false;
+
+ [Test]
+ public void OneTest() { }
+
+ public void Dispose()
+ {
+ disposeCalled = true;
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/MaxTimeFixture.cs b/external/guiunit/src/testdata/MaxTimeFixture.cs
new file mode 100755
index 0000000..4c01914
--- /dev/null
+++ b/external/guiunit/src/testdata/MaxTimeFixture.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData
+{
+ [TestFixture]
+ public class MaxTimeFixture
+ {
+ [Test, MaxTime(1)]
+ public void MaxTimeExceeded()
+ {
+#if NETCF
+ long endTime = DateTime.Now.Ticks + TimeSpan.TicksPerMillisecond * 20;
+ while (endTime > DateTime.Now.Ticks) ;
+#else
+ System.Threading.Thread.Sleep(20);
+#endif
+ }
+ }
+
+ [TestFixture]
+ public class MaxTimeFixtureWithFailure
+ {
+ [Test, MaxTime(1)]
+ public void MaxTimeExceeded()
+ {
+ System.Threading.Thread.Sleep(20);
+ Assert.Fail("Intentional Failure");
+ }
+ }
+
+ [TestFixture]
+ public class MaxTimeFixtureWithError
+ {
+ [Test, MaxTime(1)]
+ public void MaxTimeExceeded()
+ {
+ System.Threading.Thread.Sleep(20);
+ throw new Exception("Exception message");
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/ParameterizedTestFixture.cs b/external/guiunit/src/testdata/ParameterizedTestFixture.cs
new file mode 100755
index 0000000..62b54a1
--- /dev/null
+++ b/external/guiunit/src/testdata/ParameterizedTestFixture.cs
@@ -0,0 +1,53 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData
+{
+ [TestFixture(1)]
+ [TestFixture(2)]
+ public class ParameterizedTestFixture
+ {
+ [Test]
+ public void MethodWithoutParams()
+ {
+ }
+
+ [TestCase(10,20)]
+ public void MethodWithParams(int x, int y)
+ {
+ }
+ }
+
+ [TestFixture(Category = "XYZ")]
+ public class TestFixtureWithSingleCategory
+ {
+ }
+
+ [TestFixture(Category = "X,Y,Z")]
+ public class TestFixtureWithMultipleCategories
+ {
+ }
+}
diff --git a/external/guiunit/src/testdata/PropertyAttributeTests.cs b/external/guiunit/src/testdata/PropertyAttributeTests.cs
new file mode 100755
index 0000000..84c10aa
--- /dev/null
+++ b/external/guiunit/src/testdata/PropertyAttributeTests.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.PropertyAttributeTests
+{
+ [TestFixture, Property("ClassUnderTest","SomeClass" )]
+ public class FixtureWithProperties
+ {
+ [Test, Property("user","Charlie")]
+ public void Test1() { }
+
+ [Test, Property("X",10.0), Property("Y",17.0)]
+ public void Test2() { }
+
+ [Test, Priority(5)]
+ public void Test3() { }
+ }
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
+ public class PriorityAttribute : PropertyAttribute
+ {
+ public PriorityAttribute( int level ) : base( level ) { }
+ }
+}
diff --git a/external/guiunit/src/testdata/RepeatedTestFixture.cs b/external/guiunit/src/testdata/RepeatedTestFixture.cs
new file mode 100755
index 0000000..0e421a1
--- /dev/null
+++ b/external/guiunit/src/testdata/RepeatedTestFixture.cs
@@ -0,0 +1,135 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+#if false
+using System;
+using NUnit.Framework;
+
+namespace NUnit.TestData.RepeatedTestFixture
+{
+ [TestFixture]
+ public class RepeatingTestsBase
+ {
+ private int fixtureSetupCount;
+ private int fixtureTeardownCount;
+ private int setupCount;
+ private int teardownCount;
+ protected int count;
+
+ [TestFixtureSetUp]
+ public void FixtureSetUp()
+ {
+ fixtureSetupCount++;
+ }
+
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ fixtureTeardownCount++;
+ }
+
+ [SetUp]
+ public void SetUp()
+ {
+ setupCount++;
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ teardownCount++;
+ }
+
+ public int FixtureSetupCount
+ {
+ get { return fixtureSetupCount; }
+ }
+ public int FixtureTeardownCount
+ {
+ get { return fixtureTeardownCount; }
+ }
+ public int SetupCount
+ {
+ get { return setupCount; }
+ }
+ public int TeardownCount
+ {
+ get { return teardownCount; }
+ }
+ public int Count
+ {
+ get { return count; }
+ }
+ }
+
+ public class RepeatSuccessFixture : RepeatingTestsBase
+ {
+ [Test, Repeat(3)]
+ public void RepeatSuccess()
+ {
+ count++;
+ Assert.IsTrue (true);
+ }
+ }
+
+ public class RepeatFailOnFirstFixture : RepeatingTestsBase
+ {
+ [Test, Repeat(3)]
+ public void RepeatFailOnFirst()
+ {
+ count++;
+ Assert.IsFalse (true);
+ }
+ }
+
+ public class RepeatFailOnThirdFixture : RepeatingTestsBase
+ {
+ [Test, Repeat(3)]
+ public void RepeatFailOnThird()
+ {
+ count++;
+
+ if (count == 3)
+ Assert.IsTrue (false);
+ }
+ }
+
+ public class RepeatedTestWithIgnore : RepeatingTestsBase
+ {
+ [Test, Repeat(3), Ignore("Ignore this test")]
+ public void RepeatShouldIgnore()
+ {
+ Assert.Fail("Ignored test executed");
+ }
+ }
+
+ public class RepeatedTestWithCategory : RepeatingTestsBase
+ {
+ [Test, Repeat(3), Category("SAMPLE")]
+ public void TestWithCategory()
+ {
+ count++;
+ Assert.IsTrue(true);
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/SetUpData.cs b/external/guiunit/src/testdata/SetUpData.cs
new file mode 100755
index 0000000..7376cea
--- /dev/null
+++ b/external/guiunit/src/testdata/SetUpData.cs
@@ -0,0 +1,192 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.SetUpData
+{
+ [TestFixture]
+ public class SetUpAndTearDownFixture
+ {
+ public bool wasSetUpCalled;
+ public bool wasTearDownCalled;
+
+ [SetUp]
+ public virtual void Init()
+ {
+ wasSetUpCalled = true;
+ }
+
+ [TearDown]
+ public virtual void Destroy()
+ {
+ wasTearDownCalled = true;
+ }
+
+ [Test]
+ public void Success() { }
+ }
+
+
+ [TestFixture]
+ public class SetUpAndTearDownCounterFixture
+ {
+ public int setUpCounter;
+ public int tearDownCounter;
+
+ [SetUp]
+ public virtual void Init()
+ {
+ setUpCounter++;
+ }
+
+ [TearDown]
+ public virtual void Destroy()
+ {
+ tearDownCounter++;
+ }
+
+ [Test]
+ public void TestOne(){}
+
+ [Test]
+ public void TestTwo(){}
+
+ [Test]
+ public void TestThree(){}
+ }
+
+ [TestFixture]
+ public class InheritSetUpAndTearDown : SetUpAndTearDownFixture
+ {
+ [Test]
+ public void AnotherTest(){}
+ }
+
+ [TestFixture]
+ public class DefineInheritSetUpAndTearDown : SetUpAndTearDownFixture
+ {
+ public bool derivedSetUpCalled;
+ public bool derivedTearDownCalled;
+
+ [SetUp]
+ public override void Init()
+ {
+ derivedSetUpCalled = true;
+ }
+
+ [TearDown]
+ public override void Destroy()
+ {
+ derivedTearDownCalled = true;
+ }
+
+ [Test]
+ public void AnotherTest(){}
+ }
+
+ public class MultipleSetUpTearDownFixture
+ {
+ public bool wasSetUp1Called;
+ public bool wasSetUp2Called;
+ public bool wasSetUp3Called;
+ public bool wasTearDown1Called;
+ public bool wasTearDown2Called;
+
+ [SetUp]
+ public virtual void Init1()
+ {
+ wasSetUp1Called = true;
+ }
+ [SetUp]
+ public virtual void Init2()
+ {
+ wasSetUp2Called = true;
+ }
+ [SetUp]
+ public virtual void Init3()
+ {
+ wasSetUp3Called = true;
+ }
+
+ [TearDown]
+ public virtual void TearDown1()
+ {
+ wasTearDown1Called = true;
+ }
+ [TearDown]
+ public virtual void TearDown2()
+ {
+ wasTearDown2Called = true;
+ }
+
+ [Test]
+ public void Success() { }
+ }
+
+ [TestFixture]
+ public class DerivedClassWithSeparateSetUp : SetUpAndTearDownFixture
+ {
+ public bool wasDerivedSetUpCalled;
+ public bool wasDerivedTearDownCalled;
+ public bool wasBaseSetUpCalledFirst;
+ public bool wasBaseTearDownCalledLast;
+
+ [SetUp]
+ public void DerivedInit()
+ {
+ wasDerivedSetUpCalled = true;
+ wasBaseSetUpCalledFirst = wasSetUpCalled;
+ }
+
+ [TearDown]
+ public void DerivedTearDown()
+ {
+ wasDerivedTearDownCalled = true;
+ wasBaseTearDownCalledLast = !wasTearDownCalled;
+ }
+ }
+
+ [TestFixture]
+ public class SetupAndTearDownExceptionFixture
+ {
+ public Exception setupException;
+ public Exception tearDownException;
+
+ [SetUp]
+ public void SetUp()
+ {
+ if (setupException != null) throw setupException;
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ if (tearDownException!=null) throw tearDownException;
+ }
+
+ [Test]
+ public void TestOne() {}
+ }
+}
diff --git a/external/guiunit/src/testdata/TestCaseAttributeFixture.cs b/external/guiunit/src/testdata/TestCaseAttributeFixture.cs
new file mode 100755
index 0000000..cd19df6
--- /dev/null
+++ b/external/guiunit/src/testdata/TestCaseAttributeFixture.cs
@@ -0,0 +1,102 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.TestCaseAttributeFixture
+{
+ [TestFixture]
+ public class TestCaseAttributeFixture
+ {
+ [TestCase("12-Octobar-1942")]
+ public void MethodHasInvalidDateFormat(DateTime dt)
+ {}
+
+ [TestCase(2,3,4,Description="My Description")]
+ public void MethodHasDescriptionSpecified(int x, int y, int z)
+ {}
+
+ [TestCase(2,3,4,TestName="XYZ")]
+ public void MethodHasTestNameSpecified(int x, int y, int z)
+ {}
+
+ [TestCase(2, 3, 4, Category = "XYZ")]
+ public void MethodHasSingleCategory(int x, int y, int z)
+ { }
+
+ [TestCase(2, 3, 4, Category = "X,Y,Z")]
+ public void MethodHasMultipleCategories(int x, int y, int z)
+ { }
+
+ [TestCase(2, 2000000, ExpectedResult=4)]
+ public int MethodCausesConversionOverflow(short x, short y)
+ {
+ return x + y;
+ }
+
+ [TestCase(2, 3, 4, ExpectedException = typeof(ArgumentNullException))]
+ public void MethodThrowsExpectedException(int x, int y, int z)
+ {
+ throw new ArgumentNullException();
+ }
+
+ [TestCase(2, 3, 4, ExpectedException = typeof(ArgumentNullException))]
+ public void MethodThrowsWrongException(int x, int y, int z)
+ {
+ throw new ArgumentException();
+ }
+
+ [TestCase(2, 3, 4, ExpectedException = typeof(ArgumentNullException))]
+ public void MethodThrowsNoException(int x, int y, int z)
+ {
+ }
+
+ [TestCase(2, 3, 4, ExpectedException = typeof(Exception),
+ ExpectedMessage="Test Exception")]
+ public void MethodThrowsExpectedExceptionWithWrongMessage(int x, int y, int z)
+ {
+ throw new Exception("Wrong Test Exception");
+ }
+
+ [TestCase(2, 3, 4, ExpectedException = typeof(ArgumentNullException))]
+ public void MethodCallsIgnore(int x, int y, int z)
+ {
+ Assert.Ignore("Ignore this");
+ }
+
+ [TestCase(1)]
+ [TestCase(2, Ignore = true)]
+ [TestCase(3, IgnoreReason = "Don't Run Me!")]
+ public void MethodWithIgnoredTestCases(int num)
+ {
+ }
+
+ [TestCase(1)]
+ [TestCase(2, Explicit = true)]
+ [TestCase(3, Explicit = true, Reason = "Connection failing")]
+ public void MethodWithExplicitTestCases(int num)
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/TestCaseSourceAttributeFixture.cs b/external/guiunit/src/testdata/TestCaseSourceAttributeFixture.cs
new file mode 100755
index 0000000..25b30a4
--- /dev/null
+++ b/external/guiunit/src/testdata/TestCaseSourceAttributeFixture.cs
@@ -0,0 +1,111 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework;
+
+namespace NUnit.TestData.TestCaseSourceAttributeFixture
+{
+ [TestFixture]
+ public class TestCaseSourceAttributeFixture
+ {
+ [TestCaseSource("source")]
+ public void MethodThrowsExpectedException(int x, int y, int z)
+ {
+ throw new ArgumentNullException();
+ }
+
+ [TestCaseSource("source")]
+ public void MethodThrowsWrongException(int x, int y, int z)
+ {
+ throw new ArgumentException();
+ }
+
+ [TestCaseSource("source")]
+ public void MethodThrowsNoException(int x, int y, int z)
+ {
+ }
+
+ [TestCaseSource("source")]
+ public void MethodCallsIgnore(int x, int y, int z)
+ {
+ Assert.Ignore("Ignore this");
+ }
+
+ internal static object[] source = new object[] {
+ new TestCaseData( 2, 3, 4 ).Throws(typeof(ArgumentNullException)) };
+
+ [TestCaseSource("ignored_source")]
+ public void MethodWithIgnoredTestCases(int num)
+ {
+ }
+
+ [TestCaseSource("explicit_source")]
+ public void MethodWithExplicitTestCases(int num)
+ {
+ }
+
+ internal static IEnumerable ignored_source
+ {
+ get
+ {
+ return new object[] {
+ new TestCaseData(1),
+ new TestCaseData(2).Ignore(),
+ new TestCaseData(3).Ignore("Don't Run Me!")
+ };
+ }
+ }
+
+ internal static IEnumerable explicit_source
+ {
+ get
+ {
+ return new object[] {
+ new TestCaseData(1),
+ new TestCaseData(2).Explicit(),
+ new TestCaseData(3).Explicit("Connection failing")
+ };
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestCaseSource("exception_source")]
+ public void MethodWithSourceThrowingException(string lhs, string rhs)
+ {
+ }
+
+ internal static IEnumerable exception_source
+ {
+ get
+ {
+ yield return new TestCaseData("a", "a");
+ yield return new TestCaseData("b", "b");
+
+ throw new System.Exception("my message");
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/testdata/TestContextData.cs b/external/guiunit/src/testdata/TestContextData.cs
new file mode 100755
index 0000000..b627cd5
--- /dev/null
+++ b/external/guiunit/src/testdata/TestContextData.cs
@@ -0,0 +1,44 @@
+using System;
+using NUnit.Framework;
+
+namespace NUnit.TestData.TestContextData
+{
+ [TestFixture]
+ public class TestStateRecordingFixture
+ {
+ public string stateList;
+
+ public bool testFailure;
+ public bool testInconclusive;
+ public bool setUpFailure;
+ public bool setUpIgnore;
+
+ [SetUp]
+ public void SetUp()
+ {
+ stateList = TestContext.CurrentContext.Result.Outcome + "=>";
+
+ if (setUpFailure)
+ Assert.Fail("Failure in SetUp");
+ if (setUpIgnore)
+ Assert.Ignore("Ignored in SetUp");
+ }
+
+ [Test]
+ public void TheTest()
+ {
+ stateList += TestContext.CurrentContext.Result.Outcome;
+
+ if (testFailure)
+ Assert.Fail("Deliberate failure");
+ if (testInconclusive)
+ Assert.Inconclusive("Inconclusive test");
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ stateList += "=>" + TestContext.CurrentContext.Result.Outcome;
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/TestFixtureData.cs b/external/guiunit/src/testdata/TestFixtureData.cs
new file mode 100755
index 0000000..16aa54a
--- /dev/null
+++ b/external/guiunit/src/testdata/TestFixtureData.cs
@@ -0,0 +1,447 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+#if !NETCF
+using System.Security.Principal;
+#endif
+
+namespace NUnit.TestData.TestFixtureData
+{
+ /// <summary>
+ /// Classes used for testing NUnit
+ /// </summary>
+
+ [TestFixture]
+ public class NoDefaultCtorFixture
+ {
+ public NoDefaultCtorFixture(int index) { }
+
+ [Test]
+ public void OneTest() { }
+ }
+
+ [TestFixture(7,3)]
+ public class FixtureWithArgsSupplied
+ {
+ public FixtureWithArgsSupplied(int x, int y) { }
+
+ [Test]
+ public void OneTest() { }
+ }
+
+ [TestFixture]
+ public class BadCtorFixture
+ {
+ BadCtorFixture()
+ {
+ throw new Exception();
+ }
+
+ [Test] public void OneTest()
+ {}
+ }
+
+ [TestFixture]
+ public class FixtureWithTestFixtureAttribute
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ public class FixtureWithoutTestFixtureAttributeContainingTest
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ public class FixtureWithoutTestFixtureAttributeContainingTestCase
+ {
+ [TestCase(42)]
+ public void SomeTest(int x) { }
+ }
+
+ public class FixtureWithoutTestFixtureAttributeContainingTestCaseSource
+ {
+ [TestCaseSource("data")]
+ public void SomeTest(int x) { }
+ }
+
+#if !NUNITLITE
+ public class FixtureWithoutTestFixtureAttributeContainingTheory
+ {
+ [Theory]
+ public void SomeTest(int x) { }
+ }
+#endif
+
+#if CLR_2_0 || CLR_4_0
+ public static class StaticFixtureWithoutTestFixtureAttribute
+ {
+ [Test]
+ public static void StaticTest() { }
+ }
+#endif
+
+ [TestFixture]
+ public class MultipleSetUpAttributes
+ {
+ [SetUp]
+ public void Init1()
+ {}
+
+ [SetUp]
+ public void Init2()
+ {}
+
+ [Test] public void OneTest()
+ {}
+ }
+
+ [TestFixture]
+ public class MultipleTearDownAttributes
+ {
+ [TearDown]
+ public void Destroy1()
+ {}
+
+ [TearDown]
+ public void Destroy2()
+ {}
+
+ [Test] public void OneTest()
+ {}
+ }
+
+ [TestFixture]
+ [Ignore("testing ignore a fixture")]
+ public class IgnoredFixture
+ {
+ [Test]
+ public void Success()
+ {}
+ }
+
+ [TestFixture]
+ public class OuterClass
+ {
+ [TestFixture]
+ public class NestedTestFixture
+ {
+ [TestFixture]
+ public class DoublyNestedTestFixture
+ {
+ [Test]
+ public void Test()
+ {
+ }
+ }
+ }
+ }
+
+ [TestFixture]
+ public abstract class AbstractTestFixture
+ {
+ [TearDown]
+ public void Destroy1()
+ {}
+
+ [Test]
+ public void SomeTest()
+ {
+ }
+ }
+
+ public class DerivedFromAbstractTestFixture : AbstractTestFixture
+ {
+ }
+
+ [TestFixture]
+ public class BaseClassTestFixture
+ {
+ [Test]
+ public void Success() { }
+ }
+
+ public abstract class AbstractDerivedTestFixture : BaseClassTestFixture
+ {
+ [Test]
+ public void Test()
+ {
+ }
+ }
+
+ public class DerivedFromAbstractDerivedTestFixture : AbstractDerivedTestFixture
+ {
+ }
+
+ [TestFixture]
+ public abstract class AbstractBaseFixtureWithAttribute
+ {
+ }
+
+ [TestFixture]
+ public abstract class AbstractDerivedFixtureWithSecondAttribute
+ : AbstractBaseFixtureWithAttribute
+ {
+ }
+
+ public class DoubleDerivedClassWithTwoInheritedAttributes
+ : AbstractDerivedFixtureWithSecondAttribute
+ {
+ }
+
+ [TestFixture]
+ public class MultipleFixtureSetUpAttributes
+ {
+ [TestFixtureSetUp]
+ public void Init1()
+ {}
+
+ [TestFixtureSetUp]
+ public void Init2()
+ {}
+
+ [Test] public void OneTest()
+ {}
+ }
+
+ [TestFixture]
+ public class MultipleFixtureTearDownAttributes
+ {
+ [TestFixtureTearDown]
+ public void Destroy1()
+ {}
+
+ [TestFixtureTearDown]
+ public void Destroy2()
+ {}
+
+ [Test] public void OneTest()
+ {}
+ }
+
+ // Base class used to ensure following classes
+ // all have at least one test
+ public class OneTestBase
+ {
+ [Test] public void OneTest() { }
+ }
+
+ [TestFixture]
+ public class PrivateSetUp : OneTestBase
+ {
+ [SetUp]
+ private void Setup() {}
+ }
+
+ [TestFixture]
+ public class ProtectedSetUp : OneTestBase
+ {
+ [SetUp]
+ protected void Setup() {}
+ }
+
+ [TestFixture]
+ public class StaticSetUp : OneTestBase
+ {
+ [SetUp]
+ public static void Setup() {}
+ }
+
+ [TestFixture]
+ public class SetUpWithReturnValue : OneTestBase
+ {
+ [SetUp]
+ public int Setup() { return 0; }
+ }
+
+ [TestFixture]
+ public class SetUpWithParameters : OneTestBase
+ {
+ [SetUp]
+ public void Setup(int j) { }
+ }
+
+ [TestFixture]
+ public class PrivateTearDown : OneTestBase
+ {
+ [TearDown]
+ private void Teardown() {}
+ }
+
+ [TestFixture]
+ public class ProtectedTearDown : OneTestBase
+ {
+ [TearDown]
+ protected void Teardown() {}
+ }
+
+ [TestFixture]
+ public class StaticTearDown : OneTestBase
+ {
+ [SetUp]
+ public static void TearDown() {}
+ }
+
+ [TestFixture]
+ public class TearDownWithReturnValue : OneTestBase
+ {
+ [TearDown]
+ public int Teardown() { return 0; }
+ }
+
+ [TestFixture]
+ public class TearDownWithParameters : OneTestBase
+ {
+ [TearDown]
+ public void Teardown(int j) { }
+ }
+
+ [TestFixture]
+ public class PrivateFixtureSetUp : OneTestBase
+ {
+ [TestFixtureSetUp]
+ private void Setup() {}
+ }
+
+ [TestFixture]
+ public class ProtectedFixtureSetUp : OneTestBase
+ {
+ [TestFixtureSetUp]
+ protected void Setup() {}
+ }
+
+ [TestFixture]
+ public class StaticFixtureSetUp : OneTestBase
+ {
+ [TestFixtureSetUp]
+ public static void Setup() {}
+ }
+
+ [TestFixture]
+ public class FixtureSetUpWithReturnValue : OneTestBase
+ {
+ [TestFixtureSetUp]
+ public int Setup() { return 0; }
+ }
+
+ [TestFixture]
+ public class FixtureSetUpWithParameters : OneTestBase
+ {
+ [SetUp]
+ public void Setup(int j) { }
+ }
+
+ [TestFixture]
+ public class PrivateFixtureTearDown : OneTestBase
+ {
+ [TestFixtureTearDown]
+ private void Teardown() {}
+ }
+
+ [TestFixture]
+ public class ProtectedFixtureTearDown : OneTestBase
+ {
+ [TestFixtureTearDown]
+ protected void Teardown() {}
+ }
+
+ [TestFixture]
+ public class StaticFixtureTearDown : OneTestBase
+ {
+ [TestFixtureTearDown]
+ public static void Teardown() {}
+ }
+
+ [TestFixture]
+ public class FixtureTearDownWithReturnValue : OneTestBase
+ {
+ [TestFixtureTearDown]
+ public int Teardown() { return 0; }
+ }
+
+ [TestFixture]
+ public class FixtureTearDownWithParameters : OneTestBase
+ {
+ [TestFixtureTearDown]
+ public void Teardown(int j) { }
+ }
+
+#if !NETCF && !SILVERLIGHT
+ [TestFixture]
+ public class FixtureThatChangesTheCurrentPrincipal
+ {
+ [Test]
+ public void ChangeCurrentPrincipal()
+ {
+ WindowsIdentity identity = WindowsIdentity.GetCurrent();
+ GenericPrincipal principal = new GenericPrincipal( identity, new string[] { } );
+ System.Threading.Thread.CurrentPrincipal = principal;
+ }
+ }
+#endif
+
+#if CLR_2_0 || CLR_4_0
+#if !NETCF
+ [TestFixture(typeof(int))]
+ [TestFixture(typeof(string))]
+ public class GenericFixtureWithProperArgsProvided<T>
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ public class GenericFixtureWithNoTestFixtureAttribute<T>
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ [TestFixture]
+ public class GenericFixtureWithNoArgsProvided<T>
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ [TestFixture]
+ public abstract class AbstractFixtureBase
+ {
+ [Test]
+ public void SomeTest() { }
+ }
+
+ public class GenericFixtureDerivedFromAbstractFixtureWithNoArgsProvided<T> : AbstractFixtureBase
+ {
+ }
+
+ [TestFixture(typeof(int))]
+ [TestFixture(typeof(string))]
+ public class GenericFixtureDerivedFromAbstractFixtureWithArgsProvided<T> : AbstractFixtureBase
+ {
+ }
+#endif
+#endif
+}
diff --git a/external/guiunit/src/testdata/TestMethodSignatureFixture.cs b/external/guiunit/src/testdata/TestMethodSignatureFixture.cs
new file mode 100755
index 0000000..2c97bd5
--- /dev/null
+++ b/external/guiunit/src/testdata/TestMethodSignatureFixture.cs
@@ -0,0 +1,124 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.TestMethodSignatureFixture
+{
+ [TestFixture]
+ public class TestMethodSignatureFixture
+ {
+ public static int Tests = 19;
+ public static int Runnable = 11;
+ public static int NotRunnable = 8;
+ public static int Errors = 3;
+ public static int Failures = 0;
+
+ [Test]
+ public void InstanceTestMethod() { }
+
+ [Test]
+ public static void StaticTestMethod() { }
+
+ [Test]
+ public void TestMethodWithArgumentsNotProvided(int x, int y, string label) { }
+
+ [Test]
+ public static void StaticTestMethodWithArgumentsNotProvided(int x, int y, string label) { }
+
+ [TestCase(5, 2, "ABC")]
+ public void TestMethodWithoutParametersWithArgumentsProvided() { }
+
+ [TestCase(5, 2, "ABC")]
+ public void TestMethodWithArgumentsProvided(int x, int y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(5, 2, "ABC")]
+ public static void StaticTestMethodWithArgumentsProvided(int x, int y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(2, 2)]
+ public void TestMethodWithWrongNumberOfArgumentsProvided(int x, int y, string label)
+ {
+ }
+
+ [TestCase(2, 2, 3.5)]
+ public void TestMethodWithWrongArgumentTypesProvided(int x, int y, string label)
+ {
+ }
+
+ [TestCase(2, 2)]
+ public static void StaticTestMethodWithWrongNumberOfArgumentsProvided(int x, int y, string label)
+ {
+ }
+
+ [TestCase(2, 2, 3.5)]
+ public static void StaticTestMethodWithWrongArgumentTypesProvided(int x, int y, string label)
+ {
+ }
+
+ [TestCase(3.7, 2, 5.7)]
+ public void TestMethodWithConvertibleArguments(double x, double y, double sum)
+ {
+ Assert.AreEqual(sum, x + y, 0.0001);
+ }
+
+ [TestCase(3.7, 2, 5.7)]
+ public void TestMethodWithNonConvertibleArguments(int x, int y, int sum)
+ {
+ Assert.AreEqual(sum, x + y, 0.0001);
+ }
+
+ [TestCase(12, 3, 4)]
+ [TestCase( 12, 2, 6 )]
+ [TestCase( 12, 4, 3 )]
+ public void TestMethodWithMultipleTestCases( int n, int d, int q )
+ {
+ Assert.AreEqual( q, n / d );
+ }
+
+// [Test]
+// public abstract void AbstractTestMethod() { }
+
+ [Test]
+ protected void ProtectedTestMethod() { }
+
+ [Test]
+ private void PrivateTestMethod() { }
+
+ [Test]
+ public bool TestMethodWithReturnType()
+ {
+ return true;
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/TheoryFixture.cs b/external/guiunit/src/testdata/TheoryFixture.cs
new file mode 100755
index 0000000..8d4dc89
--- /dev/null
+++ b/external/guiunit/src/testdata/TheoryFixture.cs
@@ -0,0 +1,84 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework;
+
+namespace NUnit.TestData.TheoryFixture
+{
+ [TestFixture]
+ public class TheoryFixture
+ {
+ [Datapoint]
+ internal int i0 = 0;
+ [Datapoint]
+ internal static int i1 = 1;
+ [Datapoint]
+ public int i100 = 100;
+
+ private void Dummy()
+ {
+ int x = i0; // Suppress Compiler Warnings
+ int y = i1; //
+ }
+
+ [Theory]
+ public void TheoryWithNoArguments()
+ {
+ }
+
+ [Theory]
+ public void TheoryWithArgumentsButNoDatapoints(decimal x, decimal y)
+ {
+ }
+
+ [Theory]
+ public void TheoryWithArgumentsAndDatapoints(int x, int y)
+ {
+ }
+
+ [TestCase(5, 10)]
+ [TestCase(3, 12)]
+ public void TestWithArguments(int x, int y)
+ {
+ }
+
+ [Theory]
+ public void TestWithBooleanArguments(bool a, bool b)
+ {
+ }
+
+ [Theory]
+ public void TestWithEnumAsArgument(System.AttributeTargets targets)
+ {
+ }
+
+ [Theory]
+ public void TestWithAllBadValues(
+ [Values(-12.0, -4.0, -9.0)] double d)
+ {
+ Assume.That(d > 0);
+ Assert.Pass();
+ }
+ }
+}
diff --git a/external/guiunit/src/testdata/TimeoutFixture.cs b/external/guiunit/src/testdata/TimeoutFixture.cs
new file mode 100755
index 0000000..66c2d1d
--- /dev/null
+++ b/external/guiunit/src/testdata/TimeoutFixture.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+using NUnit.Framework;
+
+namespace NUnit.TestData
+{
+ [TestFixture]
+ public class TimeoutFixture
+ {
+ public bool TearDownWasRun;
+
+ [SetUp]
+ public void SetUp()
+ {
+ TearDownWasRun = false;
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ TearDownWasRun = true;
+ }
+
+ [Test, Timeout(50)]
+ public void InfiniteLoopWith50msTimeout()
+ {
+ while (true) { }
+ }
+ }
+
+ [TestFixture, Timeout(50)]
+ public class ThreadingFixtureWithTimeout
+ {
+ [Test]
+ public void Test1() { }
+ [Test]
+ public void Test2WithInfiniteLoop() { while (true) { } }
+ [Test]
+ public void Test3() { }
+ }
+}
+#endif
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-2.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-2.0.csproj
new file mode 100755
index 0000000..b16f8f8
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-2.0.csproj
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{442DAB16-3063-4FE3-90B6-C29C3D85360D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <DefineConstants>TRACE;DEBUG;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <OutputPath>..\..\bin\Debug\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <OutputPath>..\..\bin\Release\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ <Compile Include="TimeoutFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunitlite.testdata.build">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-2.0.csproj">
+ <Project>{C24A3FC4-2541-4E9C-BADD-564777610B75}</Project>
+ <Name>nunitlite-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-3.5.csproj b/external/guiunit/src/testdata/nunitlite.testdata-3.5.csproj
new file mode 100755
index 0000000..70945c2
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-3.5.csproj
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{652AFEEB-B19C-4C67-A014-2248EA72F229}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ <Compile Include="TimeoutFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunitlite.testdata.build">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-3.5.csproj">
+ <Project>{43B24DC5-16D6-45EF-93F1-B021B785A892}</Project>
+ <Name>nunitlite-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-4.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-4.0.csproj
new file mode 100755
index 0000000..45c28fb
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-4.0.csproj
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{5C77A144-3CD1-42FC-B622-410E1945CA1E}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ <Compile Include="TimeoutFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunitlite.testdata.build">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.0.csproj">
+ <Project>{1567BCCE-7BE9-4815-84D7-7F794DB39081}</Project>
+ <Name>nunitlite-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-4.5.csproj b/external/guiunit/src/testdata/nunitlite.testdata-4.5.csproj
new file mode 100755
index 0000000..f8f82a4
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-4.5.csproj
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6358FBCA-9CA2-4A70-AF87-18B916400CEE}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_5,CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;NET_4_5,CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AsyncDummyFixture.cs" />
+ <Compile Include="AsyncRealFixture.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ <Compile Include="TimeoutFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="nunitlite.testdata.build">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.5.csproj">
+ <Project>{d12f0f7b-8de3-43ec-ba49-41052d065a9b}</Project>
+ <Name>nunitlite-4.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-netcf-2.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-netcf-2.0.csproj
new file mode 100755
index 0000000..e67cf8c
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-netcf-2.0.csproj
@@ -0,0 +1,97 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F67E80E8-DF9F-4C66-9142-5002FA638EB7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>NUnitLite</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-2.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-2.0.csproj">
+ <Project>{BED999D7-F594-4CE4-A037-E40E2B9C1288}</Project>
+ <Name>nunitlite-netcf-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-netcf-3.5.csproj b/external/guiunit/src/testdata/nunitlite.testdata-netcf-3.5.csproj
new file mode 100755
index 0000000..992d643
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-netcf-3.5.csproj
@@ -0,0 +1,98 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>nunitlite.testdata_netcf_3._5</DeployDirSuffix>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-3.5.csproj">
+ <Project>{5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}</Project>
+ <Name>nunitlite-netcf-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-sl-3.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-sl-3.0.csproj
new file mode 100755
index 0000000..bd4d24c
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-sl-3.0.csproj
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <SignManifests>false</SignManifests>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-3.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-3.0.csproj">
+ <Project>{02B02379-2596-4E45-8B10-835D62EA2D9E}</Project>
+ <Name>nunitlite-sl-3.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-sl-4.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-sl-4.0.csproj
new file mode 100755
index 0000000..73cc533
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-sl-4.0.csproj
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E97412B5-8C91-4236-8E9A-24C8E20BC675}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <IntermediateOutputPath>obj\$(Configuration)\sl-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>false</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-4.0.csproj">
+ <Project>{41326141-EB24-4984-9D9B-5CFAA55946BA}</Project>
+ <Name>nunitlite-sl-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata-sl-5.0.csproj b/external/guiunit/src/testdata/nunitlite.testdata-sl-5.0.csproj
new file mode 100755
index 0000000..f1a2b77
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata-sl-5.0.csproj
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.TestData</RootNamespace>
+ <AssemblyName>nunitlite.testdata</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-5.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_5_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_5_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AssertCountFixture.cs" />
+ <Compile Include="AssertFailFixture.cs" />
+ <Compile Include="AssertIgnoreData.cs" />
+ <Compile Include="AttributeInheritanceData.cs" />
+ <Compile Include="CategoryAttributeData.cs" />
+ <Compile Include="CultureAttributeData.cs" />
+ <Compile Include="DatapointFixture.cs" />
+ <Compile Include="DescriptionFixture.cs" />
+ <Compile Include="ExpectedExceptionData.cs" />
+ <Compile Include="FixtureSetUpTearDownData.cs" />
+ <Compile Include="MaxTimeFixture.cs" />
+ <Compile Include="ParameterizedTestFixture.cs" />
+ <Compile Include="PropertyAttributeTests.cs" />
+ <Compile Include="RepeatedTestFixture.cs" />
+ <Compile Include="SetUpData.cs" />
+ <Compile Include="TestCaseAttributeFixture.cs" />
+ <Compile Include="TestCaseSourceAttributeFixture.cs" />
+ <Compile Include="TestContextData.cs" />
+ <Compile Include="TestFixtureData.cs" />
+ <Compile Include="TestMethodSignatureFixture.cs" />
+ <Compile Include="TheoryFixture.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-5.0.csproj">
+ <Project>{5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}</Project>
+ <Name>nunitlite-sl-5.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/testdata/nunitlite.testdata.build b/external/guiunit/src/testdata/nunitlite.testdata.build
new file mode 100755
index 0000000..5ab089e
--- /dev/null
+++ b/external/guiunit/src/testdata/nunitlite.testdata.build
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<project name="TestData" default="build" basedir=".">
+
+ <property name="msbuild.project" value="nunitlite.testdata-${msbuild.proj.suffix}.csproj"/>
+
+ <include buildfile="../../nunitlite.projects.common"/>
+
+ <target name="nant-clean">
+
+ <delete file="${current.build.dir}/nunitlite.testdata.dll"/>
+ <delete file="${current.build.dir}/nunitlite.testdata.pdb"/>
+
+ </target>
+
+ <target name="nant-build">
+
+ <csc target="library"
+ output="${current.build.dir}/nunitlite.testdata.dll"
+ debug="${build.debug}"
+ define="${build.defines};NUNITLITE">
+ <sources basedir=".">
+ <include name="**/*.cs"/>
+ </sources>
+ <references basedir="${current.build.dir}">
+ <include name="mscorlib.dll"/>
+ <include name="nunitlite.dll"/>
+ </references>
+ </csc>
+
+ </target>
+
+</project>
diff --git a/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/testdata/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/testdata/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/testdata/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/testdata/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/testdata/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/Api/ResultStateTests.cs b/external/guiunit/src/tests/Api/ResultStateTests.cs
new file mode 100755
index 0000000..8c813d3
--- /dev/null
+++ b/external/guiunit/src/tests/Api/ResultStateTests.cs
@@ -0,0 +1,176 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class ResultStateTests
+ {
+ [TestCase(TestStatus.Failed)]
+ [TestCase(TestStatus.Skipped)]
+ [TestCase(TestStatus.Inconclusive)]
+ [TestCase(TestStatus.Passed)]
+ public void Status_ConstructorWithOneArguments_ReturnsConstructorArgumentStatus(TestStatus status)
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(status);
+
+ Assert.AreEqual(status, resultState.Status);
+ }
+
+ [Test]
+ public void Label_ConstructorWithOneArguments_ReturnsStringEmpty()
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(TestStatus.Failed);
+
+ Assert.AreEqual(string.Empty, resultState.Label);
+ }
+
+ [TestCase(TestStatus.Failed)]
+ [TestCase(TestStatus.Skipped)]
+ [TestCase(TestStatus.Inconclusive)]
+ [TestCase(TestStatus.Passed)]
+ public void Status_ConstructorWithTwoArguments_ReturnsConstructorArgumentStatus(TestStatus status)
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(status, string.Empty);
+
+ Assert.AreEqual(status, resultState.Status);
+ }
+
+ [TestCase("")]
+ [TestCase("label")]
+ public void Label_ConstructorWithTwoArguments_ReturnsConstructorArgumentLabel(string label)
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(TestStatus.Failed, label);
+
+ Assert.AreEqual(label, resultState.Label);
+ }
+
+ [Test]
+ public void Label_ConstructorWithTwoArgumentsLabelArgumentIsNull_ReturnsEmptyString()
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(TestStatus.Failed, null);
+
+ Assert.AreEqual(string.Empty, resultState.Label);
+ }
+
+ [TestCase(TestStatus.Skipped, SpecialValue.Null, "Skipped")]
+ [TestCase(TestStatus.Passed, "", "Passed")]
+ [TestCase(TestStatus.Passed, "testLabel", "Passed:testLabel")]
+ public void ToString_Constructor_ReturnsExepectedString(TestStatus status, string label, string expected)
+ {
+ // Arrange N/A
+
+ ResultState resultState = new ResultState(status, label);
+
+ Assert.AreEqual(expected, resultState.ToString());
+ }
+
+ #region Test Fields
+
+ [Test]
+ public void Inconclusive_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Inconclusive;
+
+ Assert.AreEqual(TestStatus.Inconclusive, resultState.Status, "Status not correct.");
+ Assert.AreEqual(string.Empty, resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void NotRunnable_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.NotRunnable;
+
+ Assert.AreEqual(TestStatus.Skipped, resultState.Status, "Status not correct.");
+ Assert.AreEqual("Invalid", resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Skipped_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Skipped;
+
+ Assert.AreEqual(TestStatus.Skipped, resultState.Status, "Status not correct.");
+ Assert.AreEqual(string.Empty, resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Ignored_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Ignored;
+
+ Assert.AreEqual(TestStatus.Skipped, resultState.Status, "Status not correct.");
+ Assert.AreEqual("Ignored", resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Success_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Success;
+
+ Assert.AreEqual(TestStatus.Passed, resultState.Status, "Status not correct.");
+ Assert.AreEqual(string.Empty, resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Failure_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Failure;
+
+ Assert.AreEqual(TestStatus.Failed, resultState.Status, "Status not correct.");
+ Assert.AreEqual(string.Empty, resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Error_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Error;
+
+ Assert.AreEqual(TestStatus.Failed, resultState.Status, "Status not correct.");
+ Assert.AreEqual("Error", resultState.Label, "Label not correct.");
+ }
+
+ [Test]
+ public void Cancelled_NA_ReturnsResultStateWithPropertiesCorrectlySet()
+ {
+ ResultState resultState = ResultState.Cancelled;
+
+ Assert.AreEqual(TestStatus.Failed, resultState.Status, "Status not correct.");
+ Assert.AreEqual("Cancelled", resultState.Label, "Label not correct.");
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/App.g.cs b/external/guiunit/src/tests/App.g.cs
new file mode 100755
index 0000000..7fb3902
--- /dev/null
+++ b/external/guiunit/src/tests/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "D:\Dev\NUnit\nunitlite\silverlight\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "7F705B1DDE1B06450160A1EECA2F6007"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17626
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/App.xaml.cs b/external/guiunit/src/tests/App.xaml.cs
new file mode 100755
index 0000000..f7401fe
--- /dev/null
+++ b/external/guiunit/src/tests/App.xaml.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Windows;
+
+namespace NUnitLite.Tests
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ RootVisual = new NUnitLite.Runner.Silverlight.TestPage();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/AssemblyInfo.cs b/external/guiunit/src/tests/AssemblyInfo.cs
new file mode 100755
index 0000000..93c175d
--- /dev/null
+++ b/external/guiunit/src/tests/AssemblyInfo.cs
@@ -0,0 +1,47 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("NUnitLiteTests")]
+[assembly: AssemblyDescription("Tests of the NUnitLite testing framework")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NUnitLite")]
+[assembly: AssemblyCopyright("Copyright © 2007, Charlie Poole")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e7a2d0a1-69b5-40a6-bbfa-4c2e77335d8d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+#if !PocketPC && !WindowsCE && !NETCF
+[assembly: AssemblyFileVersion("1.0.0.0")]
+#endif
+
+// Under Silverlight, it's only possible to reflect
+// over members that would be accessible normally.
+#if SILVERLIGHT
+[assembly: InternalsVisibleTo("nunitlite")]
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Assertions/ArrayEqualsFailureMessageFixture.cs b/external/guiunit/src/tests/Assertions/ArrayEqualsFailureMessageFixture.cs
new file mode 100755
index 0000000..2cbd421
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/ArrayEqualsFailureMessageFixture.cs
@@ -0,0 +1,257 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Assertions
+{
+ /// <summary>
+ /// Summary description for ArrayEqualsFailureMessageFixture.
+ /// </summary>
+ [TestFixture]
+ public class ArrayEqualsFailureMessageFixture : MessageChecker
+ {
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ArraysHaveDifferentRanks()
+ {
+ int[] expected = new int[] { 1, 2, 3, 4 };
+ int[,] actual = new int[,] { { 1, 2 }, { 3, 4 } };
+
+ expectedMessage =
+ " Expected is <System.Int32[4]>, actual is <System.Int32[2,2]>" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ExpectedArrayIsLonger()
+ {
+ int[] expected = new int[] { 1, 2, 3, 4, 5 };
+ int[] actual = new int[] { 1, 2, 3 };
+
+ expectedMessage =
+ " Expected is <System.Int32[5]>, actual is <System.Int32[3]>" + NL +
+ " Values differ at index [3]" + NL +
+ " Missing: < 4, 5 >";
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ActualArrayIsLonger()
+ {
+ int[] expected = new int[] { 1, 2, 3 };
+ int[] actual = new int[] { 1, 2, 3, 4, 5, 6, 7 };
+
+ expectedMessage =
+ " Expected is <System.Int32[3]>, actual is <System.Int32[7]>" + NL +
+ " Values differ at index [3]" + NL +
+ " Extra: < 4, 5, 6... >";
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureOnSingleDimensionedArrays()
+ {
+ int[] expected = new int[] { 1, 2, 3 };
+ int[] actual = new int[] { 1, 5, 3 };
+
+ expectedMessage =
+ " Expected and actual are both <System.Int32[3]>" + NL +
+ " Values differ at index [1]" + NL +
+ TextMessageWriter.Pfx_Expected + "2" + NL +
+ TextMessageWriter.Pfx_Actual + "5" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void DoubleDimensionedArrays()
+ {
+ int[,] expected = new int[,] { { 1, 2, 3 }, { 4, 5, 6 } };
+ int[,] actual = new int[,] { { 1, 3, 2 }, { 4, 0, 6 } };
+
+ expectedMessage =
+ " Expected and actual are both <System.Int32[2,3]>" + NL +
+ " Values differ at index [0,1]" + NL +
+ TextMessageWriter.Pfx_Expected + "2" + NL +
+ TextMessageWriter.Pfx_Actual + "3" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void TripleDimensionedArrays()
+ {
+ int[, ,] expected = new int[,,] { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } };
+ int[, ,] actual = new int[,,] { { { 1, 2 }, { 3, 4 } }, { { 0, 6 }, { 7, 8 } } };
+
+ expectedMessage =
+ " Expected and actual are both <System.Int32[2,2,2]>" + NL +
+ " Values differ at index [1,0,0]" + NL +
+ TextMessageWriter.Pfx_Expected + "5" + NL +
+ TextMessageWriter.Pfx_Actual + "0" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FiveDimensionedArrays()
+ {
+ int[, , , ,] expected = new int[2, 2, 2, 2, 2] { { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } }, { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } } };
+ int[, , , ,] actual = new int[2, 2, 2, 2, 2] { { { { { 1, 2 }, { 4, 3 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } }, { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } } };
+
+ expectedMessage =
+ " Expected and actual are both <System.Int32[2,2,2,2,2]>" + NL +
+ " Values differ at index [0,0,0,1,0]" + NL +
+ TextMessageWriter.Pfx_Expected + "3" + NL +
+ TextMessageWriter.Pfx_Actual + "4" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void JaggedArrays()
+ {
+ int[][] expected = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6, 7 }, new int[] { 8, 9 } };
+ int[][] actual = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 0, 7 }, new int[] { 8, 9 } };
+
+ expectedMessage =
+ " Expected and actual are both <System.Int32[3][]>" + NL +
+ " Values differ at index [1]" + NL +
+ " Expected and actual are both <System.Int32[4]>" + NL +
+ " Values differ at index [2]" + NL +
+ TextMessageWriter.Pfx_Expected + "6" + NL +
+ TextMessageWriter.Pfx_Actual + "0" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void JaggedArrayComparedToSimpleArray()
+ {
+ int[] expected = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ int[][] actual = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 0, 7 }, new int[] { 8, 9 } };
+
+ expectedMessage =
+ " Expected is <System.Int32[9]>, actual is <System.Int32[3][]>" + NL +
+ " Values differ at index [0]" + NL +
+ TextMessageWriter.Pfx_Expected + "1" + NL +
+ TextMessageWriter.Pfx_Actual + "< 1, 2, 3 >" + NL;
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ArraysWithDifferentRanksAsCollection()
+ {
+ int[] expected = new int[] { 1, 2, 3, 4 };
+ int[,] actual = new int[,] { { 1, 0 }, { 3, 4 } };
+
+ expectedMessage =
+ " Expected is <System.Int32[4]>, actual is <System.Int32[2,2]>" + NL +
+ " Values differ at expected index [1], actual index [0,1]" + NL +
+ TextMessageWriter.Pfx_Expected + "2" + NL +
+ TextMessageWriter.Pfx_Actual + "0" + NL;
+ Assert.That(actual, Is.EqualTo(expected).AsCollection);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ArraysWithDifferentDimensionsAsCollection()
+ {
+ int[,] expected = new int[,] { { 1, 2, 3 }, { 4, 5, 6 } };
+ int[,] actual = new int[,] { { 1, 2 }, { 3, 0 }, { 5, 6 } };
+
+ expectedMessage =
+ " Expected is <System.Int32[2,3]>, actual is <System.Int32[3,2]>" + NL +
+ " Values differ at expected index [1,0], actual index [1,1]" + NL +
+ TextMessageWriter.Pfx_Expected + "4" + NL +
+ TextMessageWriter.Pfx_Actual + "0" + NL;
+ Assert.That(actual, Is.EqualTo(expected).AsCollection);
+ }
+
+ // [Test,ExpectedException(typeof(AssertionException))]
+ // public void ExpectedArrayIsLonger()
+ // {
+ // string[] array1 = { "one", "two", "three" };
+ // string[] array2 = { "one", "two", "three", "four", "five" };
+ //
+ // expectedMessage =
+ // " Expected is <System.String[5]>, actual is <System.String[3]>" + NL +
+ // " Values differ at index [3]" + NL +
+ // " Missing: < \"four\", \"five\" >";
+ // Assert.That(array1, Is.EqualTo(array2));
+ // }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void SameLengthDifferentContent()
+ {
+ string[] array1 = { "one", "two", "three" };
+ string[] array2 = { "one", "two", "ten" };
+
+ expectedMessage =
+ " Expected and actual are both <System.String[3]>" + NL +
+ " Values differ at index [2]" + NL +
+ " Expected string length 3 but was 5. Strings differ at index 1." + NL +
+ " Expected: \"ten\"" + NL +
+ " But was: \"three\"" + NL +
+ " ------------^" + NL;
+ Assert.That(array1, Is.EqualTo(array2));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ArraysDeclaredAsDifferentTypes()
+ {
+ string[] array1 = { "one", "two", "three" };
+ object[] array2 = { "one", "three", "two" };
+
+ expectedMessage =
+ " Expected is <System.Object[3]>, actual is <System.String[3]>" + NL +
+ " Values differ at index [1]" + NL +
+ " Expected string length 5 but was 3. Strings differ at index 1." + NL +
+ " Expected: \"three\"" + NL +
+ " But was: \"two\"" + NL +
+ " ------------^" + NL;
+ Assert.That(array1, Is.EqualTo(array2));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ArrayAndCollection_Failure()
+ {
+ int[] a = new int[] { 1, 2, 3 };
+ ICollection b = new SimpleObjectCollection(1, 3);
+ Assert.AreEqual(a, b);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void DifferentArrayTypesEqualFails()
+ {
+ string[] array1 = { "one", "two", "three" };
+ object[] array2 = { "one", "three", "two" };
+
+ expectedMessage =
+ " Expected is <System.String[3]>, actual is <System.Object[3]>" + NL +
+ " Values differ at index [1]" + NL +
+ " Expected string length 3 but was 5. Strings differ at index 1." + NL +
+ " Expected: \"two\"" + NL +
+ " But was: \"three\"" + NL +
+ " ------------^" + NL;
+ Assert.AreEqual(array1, array2);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/ArrayEqualsFixture.cs b/external/guiunit/src/tests/Assertions/ArrayEqualsFixture.cs
new file mode 100755
index 0000000..16b36bd
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/ArrayEqualsFixture.cs
@@ -0,0 +1,220 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 ACTIONA
+// 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;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Assertions
+{
+ /// <summary>
+ /// Summary description for ArrayEqualTests.
+ /// </summary>
+ [TestFixture]
+ public class ArrayEqualsFixture : AssertionHelper
+ {
+ [Test]
+ public void ArrayIsEqualToItself()
+ {
+ string[] array = { "one", "two", "three" };
+ Assert.That( array, Is.SameAs(array) );
+ Assert.AreEqual( array, array );
+ Expect(array, EqualTo(array));
+ }
+
+ [Test]
+ public void ArraysOfString()
+ {
+ string[] array1 = { "one", "two", "three" };
+ string[] array2 = { "one", "two", "three" };
+ Assert.IsFalse( array1 == array2 );
+ Assert.AreEqual(array1, array2);
+ Expect(array1, EqualTo(array2));
+ Assert.AreEqual(array2, array1);
+ Expect(array2, EqualTo(array1));
+ }
+
+ [Test]
+ public void ArraysOfInt()
+ {
+ int[] a = new int[] { 1, 2, 3 };
+ int[] b = new int[] { 1, 2, 3 };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArraysOfDouble()
+ {
+ double[] a = new double[] { 1.0, 2.0, 3.0 };
+ double[] b = new double[] { 1.0, 2.0, 3.0 };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArraysOfDecimal()
+ {
+ decimal[] a = new decimal[] { 1.0m, 2.0m, 3.0m };
+ decimal[] b = new decimal[] { 1.0m, 2.0m, 3.0m };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArrayOfIntAndArrayOfDouble()
+ {
+ int[] a = new int[] { 1, 2, 3 };
+ double[] b = new double[] { 1.0, 2.0, 3.0 };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArraysDeclaredAsDifferentTypes()
+ {
+ string[] array1 = { "one", "two", "three" };
+ object[] array2 = { "one", "two", "three" };
+ Assert.AreEqual( array1, array2, "String[] not equal to Object[]" );
+ Assert.AreEqual( array2, array1, "Object[] not equal to String[]" );
+ Expect(array1, EqualTo(array2), "String[] not equal to Object[]");
+ Expect(array2, EqualTo(array1), "Object[] not equal to String[]");
+ }
+
+ [Test]
+ public void ArraysOfMixedTypes()
+ {
+ DateTime now = DateTime.Now;
+ object[] array1 = new object[] { 1, 2.0f, 3.5d, 7.000m, "Hello", now };
+ object[] array2 = new object[] { 1.0d, 2, 3.5, 7, "Hello", now };
+ Assert.AreEqual( array1, array2 );
+ Assert.AreEqual(array2, array1);
+ Expect(array1, EqualTo(array2));
+ Expect(array2, EqualTo(array1));
+ }
+
+ [Test]
+ public void DoubleDimensionedArrays()
+ {
+ int[,] a = new int[,] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
+ int[,] b = new int[,] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void TripleDimensionedArrays()
+ {
+ int[, ,] expected = new int[,,] { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } };
+ int[,,] actual = new int[,,] { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } };
+
+ Assert.AreEqual(expected, actual);
+ Expect(actual, EqualTo(expected));
+ }
+
+ [Test]
+ public void FiveDimensionedArrays()
+ {
+ int[, , , ,] expected = new int[2, 2, 2, 2, 2] { { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } }, { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } } };
+ int[, , , ,] actual = new int[2, 2, 2, 2, 2] { { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } }, { { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } }, { { { 1, 2 }, { 3, 4 } }, { { 5, 6 }, { 7, 8 } } } } };
+
+ Assert.AreEqual(expected, actual);
+ Expect(actual, EqualTo(expected));
+ }
+
+ [Test]
+ public void ArraysOfArrays()
+ {
+ int[][] a = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6 }, new int[] { 7, 8, 9 } };
+ int[][] b = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6 }, new int[] { 7, 8, 9 } };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void JaggedArrays()
+ {
+ int[][] expected = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6, 7 }, new int[] { 8, 9 } };
+ int[][] actual = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6, 7 }, new int[] { 8, 9 } };
+
+ Assert.AreEqual(expected, actual);
+ Expect(actual, EqualTo(expected));
+ }
+
+ [Test]
+ public void ArraysPassedAsObjects()
+ {
+ object a = new int[] { 1, 2, 3 };
+ object b = new double[] { 1.0, 2.0, 3.0 };
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArrayAndCollection()
+ {
+ int[] a = new int[] { 1, 2, 3 };
+ ICollection b = new SimpleObjectCollection( a );
+ Assert.AreEqual(a, b);
+ Assert.AreEqual(b, a);
+ Expect(a, EqualTo(b));
+ Expect(b, EqualTo(a));
+ }
+
+ [Test]
+ public void ArraysWithDifferentRanksComparedAsCollection()
+ {
+ int[] expected = new int[] { 1, 2, 3, 4 };
+ int[,] actual = new int[,] { { 1, 2 }, { 3, 4 } };
+
+ Assert.AreNotEqual(expected, actual);
+ Expect(actual, Not.EqualTo(expected));
+ Expect(actual, EqualTo(expected).AsCollection);
+ }
+
+ [Test]
+ public void ArraysWithDifferentDimensionsMatchedAsCollection()
+ {
+ int[,] expected = new int[,] { { 1, 2, 3 }, { 4, 5, 6 } };
+ int[,] actual = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 } };
+
+ Assert.AreNotEqual(expected, actual);
+ Expect(actual, Not.EqualTo(expected));
+ Expect(actual, EqualTo(expected).AsCollection);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/ArrayNotEqualFixture.cs b/external/guiunit/src/tests/Assertions/ArrayNotEqualFixture.cs
new file mode 100755
index 0000000..cad638c
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/ArrayNotEqualFixture.cs
@@ -0,0 +1,68 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ /// <summary>
+ /// Summary description for ArrayNotEqualFixture.
+ /// </summary>
+ [TestFixture]
+ public class ArrayNotEqualFixture : AssertionHelper
+ {
+ [Test]
+ public void DifferentLengthArrays()
+ {
+ string[] array1 = { "one", "two", "three" };
+ string[] array2 = { "one", "two", "three", "four", "five" };
+
+ Assert.AreNotEqual(array1, array2);
+ Assert.AreNotEqual(array2, array1);
+ Expect(array1, Not.EqualTo(array2));
+ Expect(array2, Not.EqualTo(array1));
+ }
+
+ [Test]
+ public void SameLengthDifferentContent()
+ {
+ string[] array1 = { "one", "two", "three" };
+ string[] array2 = { "one", "two", "ten" };
+ Assert.AreNotEqual(array1, array2);
+ Assert.AreNotEqual(array2, array1);
+ Expect(array1, Not.EqualTo(array2));
+ Expect(array2, Not.EqualTo(array1));
+ }
+
+ [Test]
+ public void ArraysDeclaredAsDifferentTypes()
+ {
+ string[] array1 = { "one", "two", "three" };
+ object[] array2 = { "one", "three", "two" };
+ Assert.AreNotEqual(array1, array2);
+ Expect(array1, Not.EqualTo(array2));
+ Expect(array2, Not.EqualTo(array1));
+ }
+
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertFailTests.cs b/external/guiunit/src/tests/Assertions/AssertFailTests.cs
new file mode 100755
index 0000000..3bb5112
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertFailTests.cs
@@ -0,0 +1,83 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.TestData.AssertFailFixture;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssertFailTests
+ {
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ThrowsAssertionException()
+ {
+ Assert.Fail();
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "MESSAGE")]
+ public void ThrowsAssertionExceptionWithMessage()
+ {
+ Assert.Fail("MESSAGE");
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "MESSAGE: 2+2=4")]
+ public void ThrowsAssertionExceptionWithMessageAndArgs()
+ {
+ Assert.Fail("MESSAGE: {0}+{1}={2}", 2, 2, 4);
+ }
+
+ [Test]
+ public void AssertFailWorks()
+ {
+ ITestResult result = TestBuilder.RunTestCase(
+ typeof(AssertFailFixture),
+ "CallAssertFail");
+
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ }
+
+ [Test]
+ public void AssertFailWorksWithMessage()
+ {
+ ITestResult result = TestBuilder.RunTestCase(
+ typeof(AssertFailFixture),
+ "CallAssertFailWithMessage");
+
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.AreEqual("MESSAGE", result.Message);
+ }
+
+ [Test]
+ public void AssertFailWorksWithMessageAndArgs()
+ {
+ ITestResult result = TestBuilder.RunTestCase(
+ typeof(AssertFailFixture),
+ "CallAssertFailWithMessageAndArgs");
+
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.AreEqual("MESSAGE: 2+2=4", result.Message);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertIgnoreTests.cs b/external/guiunit/src/tests/Assertions/AssertIgnoreTests.cs
new file mode 100755
index 0000000..581498f
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertIgnoreTests.cs
@@ -0,0 +1,151 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.AssertIgnoreData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Assertions
+{
+ /// <summary>
+ /// Tests of IgnoreException and Assert.Ignore
+ /// </summary>
+ [TestFixture]
+ public class AssertIgnoreTests
+ {
+ [Test, ExpectedException(typeof(IgnoreException))]
+ public void ThrowsIgnoreException()
+ {
+ Assert.Ignore();
+ }
+
+ [Test, ExpectedException(typeof(IgnoreException), ExpectedMessage = "MESSAGE")]
+ public void ThrowsIgnoreExceptionWithMessage()
+ {
+ Assert.Ignore("MESSAGE");
+ }
+
+ [Test, ExpectedException(typeof(IgnoreException), ExpectedMessage = "MESSAGE: 2+2=4")]
+ public void ThrowsIgnoreExceptionWithMessageAndArgs()
+ {
+ Assert.Ignore("MESSAGE: {0}+{1}={2}", 2, 2, 4);
+ }
+
+ [Test]
+ public void IgnoreWorksForTestCase()
+ {
+ Type fixtureType = typeof(IgnoredTestCaseFixture);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "CallsIgnore");
+ Assert.AreEqual(ResultState.Ignored, result.ResultState);
+ Assert.AreEqual("Ignore me", result.Message);
+ }
+
+ [Test]
+ public void IgnoreTakesPrecedenceOverExpectedException()
+ {
+ Type fixtureType = typeof(IgnoredTestCaseFixture);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "CallsIgnoreWithExpectedException");
+ Assert.AreEqual(ResultState.Ignored, result.ResultState);
+ Assert.AreEqual("Ignore me", result.Message);
+ }
+
+ [Test]
+ public void IgnoreWorksForTestSuite()
+ {
+ TestSuite suite = new TestSuite("IgnoredTestFixture");
+ suite.Add(TestBuilder.MakeFixture(typeof(IgnoredTestSuiteFixture)));
+ ITestResult fixtureResult = (ITestResult)TestBuilder.RunTest(suite, null).Children[0];
+
+ Assert.AreEqual(ResultState.Ignored, fixtureResult.ResultState);
+
+ foreach (ITestResult testResult in fixtureResult.Children)
+ Assert.AreEqual(ResultState.Ignored, testResult.ResultState);
+ }
+
+ [Test]
+ public void IgnoreWorksFromSetUp()
+ {
+ ITestResult fixtureResult = TestBuilder.RunTestFixture(typeof(IgnoreInSetUpFixture));
+
+ // TODO: Decide how Ignored tests impact the containing suite result
+ //Assert.AreEqual(ResultState.Ignored, fixtureResult.ResultState);
+
+ foreach (TestResult testResult in fixtureResult.Children)
+ Assert.AreEqual(ResultState.Ignored, testResult.ResultState);
+ }
+
+ [Test]
+ public void IgnoreWithUserMessage()
+ {
+ try
+ {
+ Assert.Ignore("my message");
+ }
+ catch (IgnoreException ex)
+ {
+ Assert.AreEqual("my message", ex.Message);
+ }
+ }
+
+ [Test]
+ public void IgnoreWithUserMessage_OneArg()
+ {
+ try
+ {
+ Assert.Ignore("The number is {0}", 5);
+ }
+ catch (IgnoreException ex)
+ {
+ Assert.AreEqual("The number is 5", ex.Message);
+ }
+ }
+
+ [Test]
+ public void IgnoreWithUserMessage_ThreeArgs()
+ {
+ try
+ {
+ Assert.Ignore("The numbers are {0}, {1} and {2}", 1, 2, 3);
+ }
+ catch (IgnoreException ex)
+ {
+ Assert.AreEqual("The numbers are 1, 2 and 3", ex.Message);
+ }
+ }
+
+ [Test]
+ public void IgnoreWithUserMessage_ArrayOfArgs()
+ {
+ try
+ {
+ Assert.Ignore("The numbers are {0}, {1} and {2}", new object[] { 1, 2, 3 });
+ }
+ catch (IgnoreException ex)
+ {
+ Assert.AreEqual("The numbers are 1, 2 and 3", ex.Message);
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertInconclusiveTests.cs b/external/guiunit/src/tests/Assertions/AssertInconclusiveTests.cs
new file mode 100755
index 0000000..155d799
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertInconclusiveTests.cs
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssertInconclusiveTests
+ {
+ [Test, ExpectedException(typeof(InconclusiveException))]
+ public void ThrowsInconclusiveException()
+ {
+ Assert.Inconclusive();
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage = "MESSAGE")]
+ public void ThrowsInconclusiveExceptionWithMessage()
+ {
+ Assert.Inconclusive("MESSAGE");
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage = "MESSAGE: 2+2=4")]
+ public void ThrowsInconclusiveExceptionWithMessageAndArgs()
+ {
+ Assert.Inconclusive("MESSAGE: {0}+{1}={2}", 2, 2, 4);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertPassTests.cs b/external/guiunit/src/tests/Assertions/AssertPassTests.cs
new file mode 100755
index 0000000..2736940
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertPassTests.cs
@@ -0,0 +1,62 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssertPassTests
+ {
+ [Test, ExpectedException(typeof(SuccessException))]
+ public void ThrowsSuccessException()
+ {
+ Assert.Pass();
+ }
+
+ [Test, ExpectedException(typeof(SuccessException), ExpectedMessage = "MESSAGE")]
+ public void ThrowsSuccessExceptionWithMessage()
+ {
+ Assert.Pass("MESSAGE");
+ }
+
+ [Test, ExpectedException(typeof(SuccessException), ExpectedMessage = "MESSAGE: 2+2=4")]
+ public void ThrowsSuccessExceptionWithMessageAndArgs()
+ {
+ Assert.Pass("MESSAGE: {0}+{1}={2}", 2, 2, 4);
+ }
+
+ [Test]
+ public void AssertPassReturnsSuccess()
+ {
+ Assert.Pass("This test is OK!");
+ }
+
+ [Test]
+ public void SubsequentFailureIsIrrelevant()
+ {
+ Assert.Pass("This test is OK!");
+ Assert.Fail("No it's NOT!");
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertThatTests.cs b/external/guiunit/src/tests/Assertions/AssertThatTests.cs
new file mode 100755
index 0000000..517308e
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertThatTests.cs
@@ -0,0 +1,279 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+using NUnit.Framework.Internal;
+using NUnit.TestData;
+using NUnit.TestUtilities;
+#if NET_4_5
+using System.Threading.Tasks;
+#endif
+
+#if CLR_2_0 || CLR_4_0
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate<object>;
+#else
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate;
+#endif
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssertThatTests
+ {
+ [Test]
+ public void AssertionPasses_Boolean()
+ {
+ Assert.That(2 + 2 == 4);
+ }
+
+ [Test]
+ public void AssertionPasses_BooleanWithMessage()
+ {
+ Assert.That(2 + 2 == 4, "Not Equal");
+ }
+
+ [Test]
+ public void AssertionPasses_BooleanWithMessageAndArgs()
+ {
+ Assert.That(2 + 2 == 4, "Not Equal to {0}", 4);
+ }
+
+ [Test]
+ public void AssertionPasses_ActualAndConstraint()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4));
+ }
+
+ [Test]
+ public void AssertionPasses_ActualAndConstraintWithMessage()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4), "Should be 4");
+ }
+
+ [Test]
+ public void AssertionPasses_ActualAndConstraintWithMessageAndArgs()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ [Test]
+ public void AssertionPasses_ReferenceAndConstraint()
+ {
+ bool value = true;
+ Assert.That(ref value, Is.True);
+ }
+
+ [Test]
+ public void AssertionPasses_ReferenceAndConstraintWithMessage()
+ {
+ bool value = true;
+ Assert.That(ref value, Is.True, "Message");
+ }
+
+ [Test]
+ public void AssertionPasses_ReferenceAndConstraintWithMessageAndArgs()
+ {
+ bool value = true;
+ Assert.That(ref value, Is.True, "Message", 42);
+ }
+
+ [Test]
+ public void AssertionPasses_DelegateAndConstraint()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4));
+ }
+
+ [Test]
+ public void AssertionPasses_DelegateAndConstraintWithMessage()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4), "Message");
+ }
+
+ [Test]
+ public void AssertionPasses_DelegateAndConstraintWithMessageAndArgs()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ private object ReturnsFour()
+ {
+ return 4;
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureThrowsAssertionException_Boolean()
+ {
+ Assert.That(2 + 2 == 5);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "message", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_BooleanWithMessage()
+ {
+ Assert.That(2 + 2 == 5, "message");
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "got 5", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_BooleanWithMessageAndArgs()
+ {
+ Assert.That(2 + 2 == 5, "got {0}", 5);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureThrowsAssertionException_ActualAndConstraint()
+ {
+ Assert.That(2 + 2, Is.EqualTo(5));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "Error", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_ActualAndConstraintWithMessage()
+ {
+ Assert.That(2 + 2, Is.EqualTo(5), "Error");
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "Should be 5", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_ActualAndConstraintWithMessageAndArgs()
+ {
+ Assert.That(2 + 2, Is.EqualTo(5), "Should be {0}", 5);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureThrowsAssertionException_ReferenceAndConstraint()
+ {
+ bool value = false;
+ Assert.That(ref value, Is.True);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "message", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_ReferenceAndConstraintWithMessage()
+ {
+ bool value = false;
+ Assert.That(ref value, Is.True, "message");
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "message is 42", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_ReferenceAndConstraintWithMessageAndArgs()
+ {
+ bool value = false;
+ Assert.That(ref value, Is.True, "message is {0}", 42);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureThrowsAssertionException_DelegateAndConstraint()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "Error", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_DelegateAndConstraintWithMessage()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4), "Error");
+ }
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "Should be 4", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsAssertionException_DelegateAndConstraintWithMessageAndArgs()
+ {
+ Assert.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ [Test]
+ public void AssertionsAreCountedCorrectly()
+ {
+ TestResult result = TestBuilder.RunTestFixture(typeof(AssertCountFixture));
+
+ int totalCount = 0;
+ foreach (TestResult childResult in result.Children)
+ {
+ int expectedCount = childResult.Name == "ThreeAsserts" ? 3 : 1;
+ Assert.That(childResult.AssertCount, Is.EqualTo(expectedCount), "Bad count for {0}", childResult.Name);
+ totalCount += expectedCount;
+ }
+
+ Assert.That(result.AssertCount, Is.EqualTo(totalCount), "Fixture count is not correct");
+ }
+
+ private object ReturnsFive()
+ {
+ return 5;
+ }
+
+#if NET_4_5
+ [Test]
+ public void AssertThatSuccess()
+ {
+ Assert.That(async () => await One(), Is.EqualTo(1));
+ }
+
+ [Test]
+ public void AssertThatFailure()
+ {
+ var exception = Assert.Throws<AssertionException>(() =>
+ Assert.That(async () => await One(), Is.EqualTo(2)));
+ }
+
+ [Test]
+ public void AssertThatErrorTask()
+ {
+ var exception = Assert.Throws<InvalidOperationException>(() =>
+ Assert.That(async () => await ThrowExceptionTask(), Is.EqualTo(1)));
+
+ Assert.That(exception.StackTrace, Contains.Substring("ThrowExceptionTask"));
+ }
+
+ [Test]
+ public void AssertThatErrorGenericTask()
+ {
+ var exception = Assert.Throws<InvalidOperationException>(() =>
+ Assert.That(async () => await ThrowExceptionGenericTask(), Is.EqualTo(1)));
+
+ Assert.That(exception.StackTrace, Contains.Substring("ThrowExceptionGenericTask"));
+ }
+
+ [Test]
+ public void AssertThatErrorVoid()
+ {
+ var exception = Assert.Throws<InvalidOperationException>(() =>
+ Assert.That(async () => { await ThrowExceptionGenericTask(); }, Is.EqualTo(1)));
+
+ Assert.That(exception.StackTrace, Contains.Substring("ThrowExceptionGenericTask"));
+ }
+
+ private static Task<int> One()
+ {
+ return Task.Run(() => 1);
+ }
+
+ private static async Task<int> ThrowExceptionGenericTask()
+ {
+ await One();
+ throw new InvalidOperationException();
+ }
+
+ private static async Task ThrowExceptionTask()
+ {
+ await One();
+ throw new InvalidOperationException();
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssertThrowsTests.cs b/external/guiunit/src/tests/Assertions/AssertThrowsTests.cs
new file mode 100755
index 0000000..222deed
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssertThrowsTests.cs
@@ -0,0 +1,164 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.TestUtilities;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssertThrowsTests
+ {
+ [Test]
+ public void CorrectExceptionThrown()
+ {
+ Assert.Throws(typeof(ArgumentException), new TestDelegate(TestDelegates.ThrowsArgumentException));
+
+#if CLR_2_0 || CLR_4_0
+ Assert.Throws(typeof(ArgumentException), TestDelegates.ThrowsArgumentException);
+
+ Assert.Throws(typeof(ArgumentException),
+ delegate { throw new ArgumentException(); });
+
+ Assert.Throws<ArgumentException>(
+ delegate { throw new ArgumentException(); });
+ Assert.Throws<ArgumentException>(TestDelegates.ThrowsArgumentException);
+
+ // Without cast, delegate is ambiguous before C# 3.0.
+ Assert.That((TestDelegate)delegate { throw new ArgumentException(); },
+ Throws.Exception.TypeOf<ArgumentException>() );
+ //Assert.Throws( Is.TypeOf(typeof(ArgumentException)),
+ // delegate { throw new ArgumentException(); } );
+#endif
+ }
+
+ [Test]
+ public void CorrectExceptionIsReturnedToMethod()
+ {
+ ArgumentException ex = Assert.Throws(typeof(ArgumentException),
+ new TestDelegate(TestDelegates.ThrowsArgumentException)) as ArgumentException;
+
+ Assert.IsNotNull(ex, "No ArgumentException thrown");
+ Assert.That(ex.Message, Is.StringStarting("myMessage"));
+#if !NETCF && !SILVERLIGHT
+ Assert.That(ex.ParamName, Is.EqualTo("myParam"));
+#endif
+
+#if CLR_2_0 || CLR_4_0
+ ex = Assert.Throws<ArgumentException>(
+ delegate { throw new ArgumentException("myMessage", "myParam"); }) as ArgumentException;
+
+ Assert.IsNotNull(ex, "No ArgumentException thrown");
+ Assert.That(ex.Message, Is.StringStarting("myMessage"));
+#if !NETCF && !SILVERLIGHT
+ Assert.That(ex.ParamName, Is.EqualTo("myParam"));
+#endif
+
+ ex = Assert.Throws(typeof(ArgumentException),
+ delegate { throw new ArgumentException("myMessage", "myParam"); } ) as ArgumentException;
+
+ Assert.IsNotNull(ex, "No ArgumentException thrown");
+ Assert.That(ex.Message, Is.StringStarting("myMessage"));
+#if !NETCF && !SILVERLIGHT
+ Assert.That(ex.ParamName, Is.EqualTo("myParam"));
+#endif
+
+ ex = Assert.Throws<ArgumentException>(TestDelegates.ThrowsArgumentException) as ArgumentException;
+
+ Assert.IsNotNull(ex, "No ArgumentException thrown");
+ Assert.That(ex.Message, Is.StringStarting("myMessage"));
+#if !NETCF && !SILVERLIGHT
+ Assert.That(ex.ParamName, Is.EqualTo("myParam"));
+#endif
+#endif
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void NoExceptionThrown()
+ {
+#if CLR_2_0 || CLR_4_0
+ ArgumentException ex = Assert.Throws<ArgumentException>(TestDelegates.ThrowsNothing);
+#else
+ Exception ex = Assert.Throws(typeof(ArgumentException), new TestDelegate(TestDelegates.ThrowsNothing));
+#endif
+ Assert.That(ex.Message, Is.EqualTo(
+ " Expected: <System.ArgumentException>" + Env.NewLine +
+ " But was: null" + Env.NewLine));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void UnrelatedExceptionThrown()
+ {
+#if CLR_2_0 || CLR_4_0
+ ArgumentException ex = Assert.Throws<ArgumentException>(TestDelegates.ThrowsCustomException);
+#else
+ ArgumentException ex = (ArgumentException)Assert.Throws(typeof(ArgumentException), new TestDelegate(TestDelegates.ThrowsCustomException));
+#endif
+ Assert.That(ex.Message, Is.StringStarting(
+ " Expected: <System.ArgumentException>" + Env.NewLine +
+ " But was: <System.ApplicationException> (my message)" + Env.NewLine));
+ Assert.That(ex.Message, Contains.Substring(" at "));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void BaseExceptionThrown()
+ {
+#if CLR_2_0 || CLR_4_0
+ ArgumentException ex = Assert.Throws<ArgumentException>(TestDelegates.ThrowsSystemException);
+#else
+ Exception ex = Assert.Throws(typeof(ArgumentException), new TestDelegate(TestDelegates.ThrowsSystemException));
+#endif
+ Assert.That(ex.Message, Is.StringStarting(
+ " Expected: <System.ArgumentException>" + Env.NewLine +
+ " But was: <NUnit.TestUtilities.TestDelegates+CustomException> (my message)" + Env.NewLine));
+ Assert.That(ex.Message, Contains.Substring(" at "));
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void DerivedExceptionThrown()
+ {
+#if CLR_2_0 || CLR_4_0
+ Exception ex = Assert.Throws<Exception>(TestDelegates.ThrowsArgumentException);
+#else
+ Exception ex = Assert.Throws(typeof(Exception), new TestDelegate(TestDelegates.ThrowsArgumentException));
+#endif
+ Assert.That(ex.Message, Is.StringStarting(
+ " Expected: <System.Exception>" + Env.NewLine +
+ " But was: <System.ArgumentException> (myMessage" + Env.NewLine +
+ "Parameter name: myParam)" + Env.NewLine));
+ Assert.That(ex.Message, Contains.Substring(" at "));
+ }
+
+ [Test]
+ public void DoesNotThrowSuceeds()
+ {
+ Assert.DoesNotThrow(new TestDelegate(TestDelegates.ThrowsNothing));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void DoesNotThrowFails()
+ {
+ Assert.DoesNotThrow(new TestDelegate(TestDelegates.ThrowsArgumentException));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AssumeThatTests.cs b/external/guiunit/src/tests/Assertions/AssumeThatTests.cs
new file mode 100755
index 0000000..8b9efdd
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AssumeThatTests.cs
@@ -0,0 +1,236 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+#if NET_4_5
+using System.Threading.Tasks;
+#endif
+
+#if CLR_2_0 || CLR_4_0
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate<object>;
+#else
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate;
+#endif
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AssumeThatTests
+ {
+ [Test]
+ public void AssumptionPasses_Boolean()
+ {
+ Assume.That(2 + 2 == 4);
+ }
+
+ [Test]
+ public void AssumptionPasses_BooleanWithMessage()
+ {
+ Assume.That(2 + 2 == 4, "Not Equal");
+ }
+
+ [Test]
+ public void AssumptionPasses_BooleanWithMessageAndArgs()
+ {
+ Assume.That(2 + 2 == 4, "Not Equal to {0}", 4);
+ }
+
+ [Test]
+ public void AssumptionPasses_ActualAndConstraint()
+ {
+ Assume.That(2 + 2, Is.EqualTo(4));
+ }
+
+ [Test]
+ public void AssumptionPasses_ActualAndConstraintWithMessage()
+ {
+ Assume.That(2 + 2, Is.EqualTo(4), "Should be 4");
+ }
+
+ [Test]
+ public void AssumptionPasses_ActualAndConstraintWithMessageAndArgs()
+ {
+ Assume.That(2 + 2, Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ [Test]
+ public void AssumptionPasses_ReferenceAndConstraint()
+ {
+ bool value = true;
+ Assume.That(ref value, Is.True);
+ }
+
+ [Test]
+ public void AssumptionPasses_ReferenceAndConstraintWithMessage()
+ {
+ bool value = true;
+ Assume.That(ref value, Is.True, "Message");
+ }
+
+ [Test]
+ public void AssumptionPasses_ReferenceAndConstraintWithMessageAndArgs()
+ {
+ bool value = true;
+ Assume.That(ref value, Is.True, "Message", 42);
+ }
+
+ [Test]
+ public void AssumptionPasses_DelegateAndConstraint()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4));
+ }
+
+ [Test]
+ public void AssumptionPasses_DelegateAndConstraintWithMessage()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4), "Message");
+ }
+
+ [Test]
+ public void AssumptionPasses_DelegateAndConstraintWithMessageAndArgs()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFour), Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ private object ReturnsFour()
+ {
+ return 4;
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException))]
+ public void FailureThrowsInconclusiveException_Boolean()
+ {
+ Assume.That(2 + 2 == 5);
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="message", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_BooleanWithMessage()
+ {
+ Assume.That(2 + 2 == 5, "message");
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage= "got 5", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_BooleanWithMessageAndArgs()
+ {
+ Assume.That(2 + 2 == 5, "got {0}", 5);
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException))]
+ public void FailureThrowsInconclusiveException_ActualAndConstraint()
+ {
+ Assume.That(2 + 2, Is.EqualTo(5));
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="Error", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_ActualAndConstraintWithMessage()
+ {
+ Assume.That(2 + 2, Is.EqualTo(5), "Error");
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="Should be 5", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_ActualAndConstraintWithMessageAndArgs()
+ {
+ Assume.That(2 + 2, Is.EqualTo(5), "Should be {0}", 5);
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException))]
+ public void FailureThrowsInconclusiveException_ReferenceAndConstraint()
+ {
+ bool value = false;
+ Assume.That(ref value, Is.True);
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="message", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_ReferenceAndConstraintWithMessage()
+ {
+ bool value = false;
+ Assume.That(ref value, Is.True, "message");
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="message is 42", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_ReferenceAndConstraintWithMessageAndArgs()
+ {
+ bool value = false;
+ Assume.That(ref value, Is.True, "message is {0}", 42);
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException))]
+ public void FailureThrowsInconclusiveException_DelegateAndConstraint()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4));
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage = "Error", MatchType = MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_DelegateAndConstraintWithMessage()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4), "Error");
+ }
+
+ [Test, ExpectedException(typeof(InconclusiveException), ExpectedMessage="Should be 4", MatchType=MessageMatch.Contains)]
+ public void FailureThrowsInconclusiveException_DelegateAndConstraintWithMessageAndArgs()
+ {
+ Assume.That(new ActualValueDelegate(ReturnsFive), Is.EqualTo(4), "Should be {0}", 4);
+ }
+
+ private object ReturnsFive()
+ {
+ return 5;
+ }
+
+#if NET_4_5
+ [Test]
+ public void AssumeThatSuccess()
+ {
+ Assume.That(async () => await One(), Is.EqualTo(1));
+ }
+
+ [Test]
+ public void AssumeThatFailure()
+ {
+ var exception = Assert.Throws<InconclusiveException>(() =>
+ Assume.That(async () => await One(), Is.EqualTo(2)));
+ }
+
+ [Test]
+ public void AssumeThatError()
+ {
+ var exception = Assert.Throws<InvalidOperationException>(() =>
+ Assume.That(async () => await ThrowExceptionGenericTask(), Is.EqualTo(1)));
+
+ Assert.That(exception.StackTrace, Contains.Substring("ThrowExceptionGenericTask"));
+ }
+
+ private static Task<int> One()
+ {
+ return Task.Run(() => 1);
+ }
+
+ private static async Task<int> ThrowExceptionGenericTask()
+ {
+ await One();
+ throw new InvalidOperationException();
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/AsyncThrowsTests.cs b/external/guiunit/src/tests/Assertions/AsyncThrowsTests.cs
new file mode 100755
index 0000000..c194df8
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/AsyncThrowsTests.cs
@@ -0,0 +1,185 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if NET_4_5
+using System;
+using System.Threading.Tasks;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class AsyncThrowsTests
+ {
+ private readonly TestDelegate _noThrowsVoid = new TestDelegate(async () => await Task.Yield());
+ private readonly ActualValueDelegate<Task> _noThrowsAsyncTask = async () => await Task.Yield();
+ private readonly ActualValueDelegate<Task<int>> _noThrowsAsyncGenericTask = async () => await ReturnOne();
+ private readonly TestDelegate _throwsAsyncVoid = new TestDelegate(async () => await ThrowAsyncTask());
+ private readonly TestDelegate _throwsSyncVoid = new TestDelegate(async () => { throw new InvalidOperationException(); });
+ private readonly ActualValueDelegate<Task> _throwsAsyncTask = async () => await ThrowAsyncTask();
+ private readonly ActualValueDelegate<Task<int>> _throwsAsyncGenericTask = async () => await ThrowAsyncGenericTask();
+
+ private static ThrowsConstraint ThrowsInvalidOperationExceptionConstraint
+ {
+ get { return new ThrowsConstraint(new ExactTypeConstraint(typeof(InvalidOperationException))); }
+ }
+
+ [Test]
+ public void ThrowsConstraintVoid()
+ {
+ Assert.IsTrue(ThrowsInvalidOperationExceptionConstraint.Matches(_throwsAsyncVoid));
+ }
+
+ [Test]
+ public void ThrowsConstraintVoidRunSynchronously()
+ {
+ Assert.IsTrue(ThrowsInvalidOperationExceptionConstraint.Matches(_throwsSyncVoid));
+ }
+
+ [Test]
+ public void ThrowsConstraintAsyncTask()
+ {
+ Assert.IsTrue(ThrowsInvalidOperationExceptionConstraint.Matches(_throwsAsyncTask));
+ }
+
+ [Test]
+ public void ThrowsConstraintAsyncGenericTask()
+ {
+ Assert.IsTrue(ThrowsInvalidOperationExceptionConstraint.Matches(_throwsAsyncGenericTask));
+ }
+
+ [Test]
+ public void ThrowsNothingConstraintVoidSuccess()
+ {
+ Assert.IsTrue(new ThrowsNothingConstraint().Matches(_noThrowsVoid));
+ }
+
+ [Test]
+ public void ThrowsNothingConstraintVoidFailure()
+ {
+ Assert.IsFalse(new ThrowsNothingConstraint().Matches(_throwsAsyncVoid));
+ }
+
+ [Test]
+ public void ThrowsNothingConstraintTaskVoidSuccess()
+ {
+ Assert.IsTrue(new ThrowsNothingConstraint().Matches(_noThrowsAsyncTask));
+ }
+
+ [Test]
+ public void ThrowsNothingConstraintTaskFailure()
+ {
+ Assert.IsFalse(new ThrowsNothingConstraint().Matches(_throwsAsyncTask));
+ }
+
+ [Test]
+ public void AssertThrowsVoid()
+ {
+ Assert.Throws(typeof(InvalidOperationException), _throwsAsyncVoid);
+ }
+
+ [Test]
+ public void AssertThatThrowsVoid()
+ {
+ Assert.That(_throwsAsyncVoid, Throws.TypeOf<InvalidOperationException>());
+ }
+
+ [Test]
+ public void AssertThatThrowsTask()
+ {
+ Assert.That(_throwsAsyncTask, Throws.TypeOf<InvalidOperationException>());
+ }
+
+ [Test]
+ public void AssertThatThrowsGenericTask()
+ {
+ Assert.That(_throwsAsyncGenericTask, Throws.TypeOf<InvalidOperationException>());
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingVoidSuccess()
+ {
+ Assert.That(_noThrowsVoid, Throws.Nothing);
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingTaskSuccess()
+ {
+ Assert.That(_noThrowsAsyncTask, Throws.Nothing);
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingGenericTaskSuccess()
+ {
+ Assert.That(_noThrowsAsyncGenericTask, Throws.Nothing);
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingVoidFailure()
+ {
+ Assert.Throws<AssertionException>(() => Assert.That(_throwsAsyncVoid, Throws.Nothing));
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingTaskFailure()
+ {
+ Assert.Throws<AssertionException>(() => Assert.That(_throwsAsyncTask, Throws.Nothing));
+ }
+
+ [Test]
+ public void AssertThatThrowsNothingGenericTaskFailure()
+ {
+ Assert.Throws<AssertionException>(() => Assert.That(_throwsAsyncGenericTask, Throws.Nothing));
+ }
+
+ [Test]
+ public void AssertThrowsAsync()
+ {
+ Assert.Throws<InvalidOperationException>(_throwsAsyncVoid);
+ }
+
+ [Test]
+ public void AssertThrowsSync()
+ {
+ Assert.Throws<InvalidOperationException>(_throwsSyncVoid);
+ }
+
+ private static async Task ThrowAsyncTask()
+ {
+ await ReturnOne();
+ throw new InvalidOperationException();
+ }
+
+ private static async Task<int> ThrowAsyncGenericTask()
+ {
+ await ThrowAsyncTask();
+ return await ReturnOne();
+ }
+
+ private static Task<int> ReturnOne()
+ {
+ return Task.Run(() => 1);
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Assertions/CollectionTests.cs b/external/guiunit/src/tests/Assertions/CollectionTests.cs
new file mode 100755
index 0000000..d8a6ad2
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/CollectionTests.cs
@@ -0,0 +1,56 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using System.Collections;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using Env = NUnit.Env;
+using NUnit.TestUtilities;
+
+namespace NUnitLite.Tests
+{
+ [TestFixture]
+ class CollectionTests : IExpectException
+ {
+ [Test]
+ public void CanMatchTwoCollections()
+ {
+ ICollection expected = new SimpleObjectCollection(1, 2, 3);
+ ICollection actual = new SimpleObjectCollection(1, 2, 3);
+
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ [Test]
+ public void CanMatchAnArrayWithACollection()
+ {
+ ICollection collection = new SimpleObjectCollection(1, 2, 3);
+ int[] array = new int[] { 1, 2, 3 };
+
+ Assert.That(collection, Is.EqualTo(array));
+ Assert.That(array, Is.EqualTo(collection));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailureMatchingArrayAndCollection()
+ {
+ int[] expected = new int[] { 1, 2, 3 };
+ ICollection actual = new SimpleObjectCollection(1, 5, 3);
+
+ Assert.That(actual, Is.EqualTo(expected));
+ }
+
+ public void HandleException(Exception ex)
+ {
+ Assert.That(ex.Message, Is.EqualTo(
+ " Expected is <System.Int32[3]>, actual is <NUnit.TestUtilities.SimpleObjectCollection> with 3 elements" + Env.NewLine +
+ " Values differ at index [1]" + Env.NewLine +
+ TextMessageWriter.Pfx_Expected + "2" + Env.NewLine +
+ TextMessageWriter.Pfx_Actual + "5" + Env.NewLine));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/ConditionAssertTests.cs b/external/guiunit/src/tests/Assertions/ConditionAssertTests.cs
new file mode 100755
index 0000000..876746e
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/ConditionAssertTests.cs
@@ -0,0 +1,224 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using System.Threading;
+using System.Globalization;
+using NUnit.Framework;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class ConditionAssertTests : MessageChecker
+ {
+ [Test]
+ public void IsTrue()
+ {
+ Assert.IsTrue(true);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void IsTrueFails()
+ {
+ expectedMessage =
+ " Expected: True" + Env.NewLine +
+ " But was: False" + Env.NewLine;
+ Assert.IsTrue(false);
+ }
+
+ [Test]
+ public void IsFalse()
+ {
+ Assert.IsFalse(false);
+ }
+
+ [Test]
+ [ExpectedException(typeof(AssertionException))]
+ public void IsFalseFails()
+ {
+ expectedMessage =
+ " Expected: False" + Env.NewLine +
+ " But was: True" + Env.NewLine;
+ Assert.IsFalse(true);
+ }
+
+ [Test]
+ public void IsNull()
+ {
+ Assert.IsNull(null);
+ }
+
+ [Test]
+ [ExpectedException(typeof(AssertionException))]
+ public void IsNullFails()
+ {
+ String s1 = "S1";
+ expectedMessage =
+ " Expected: null" + Env.NewLine +
+ " But was: \"S1\"" + Env.NewLine;
+ Assert.IsNull(s1);
+ }
+
+ [Test]
+ public void IsNotNull()
+ {
+ String s1 = "S1";
+ Assert.IsNotNull(s1);
+ }
+
+ [Test]
+ [ExpectedException(typeof(AssertionException))]
+ public void IsNotNullFails()
+ {
+ expectedMessage =
+ " Expected: not null" + Env.NewLine +
+ " But was: null" + Env.NewLine;
+ Assert.IsNotNull(null);
+ }
+
+#if !NUNITLITE
+ [Test]
+ public void IsNaN()
+ {
+ Assert.IsNaN(double.NaN);
+ }
+
+ [Test]
+ [ExpectedException(typeof(AssertionException))]
+ public void IsNaNFails()
+ {
+ expectedMessage =
+ " Expected: NaN" + Env.NewLine +
+ " But was: 10.0d" + Env.NewLine;
+ Assert.IsNaN(10.0);
+ }
+
+ [Test]
+ public void IsEmpty()
+ {
+ Assert.IsEmpty( "", "Failed on empty String" );
+ Assert.IsEmpty( new int[0], "Failed on empty Array" );
+ Assert.IsEmpty( new ArrayList(), "Failed on empty ArrayList" );
+ Assert.IsEmpty( new Hashtable(), "Failed on empty Hashtable" );
+ Assert.IsEmpty( (IEnumerable)new int[0], "Failed on empty IEnumerable" );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsEmptyFailsOnString()
+ {
+ expectedMessage =
+ " Expected: <empty>" + Env.NewLine +
+ " But was: \"Hi!\"" + Env.NewLine;
+ Assert.IsEmpty( "Hi!" );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsEmptyFailsOnNullString()
+ {
+ expectedMessage =
+ " Expected: <empty>" + Env.NewLine +
+ " But was: null" + Env.NewLine;
+ Assert.IsEmpty( (string)null );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsEmptyFailsOnNonEmptyArray()
+ {
+ expectedMessage =
+ " Expected: <empty>" + Env.NewLine +
+ " But was: < 1, 2, 3 >" + Env.NewLine;
+ Assert.IsEmpty( new int[] { 1, 2, 3 } );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsEmptyFailsOnNonEmptyIEnumerable()
+ {
+ expectedMessage =
+ " Expected: <empty>" + Environment.NewLine +
+ " But was: < 1, 2, 3 >" + Environment.NewLine;
+ Assert.IsEmpty((IEnumerable)new int[] { 1, 2, 3 });
+ }
+
+ [Test]
+ public void IsNotEmpty()
+ {
+ int[] array = new int[] { 1, 2, 3 };
+ ArrayList list = new ArrayList( array );
+ Hashtable hash = new Hashtable();
+ hash.Add( "array", array );
+
+ Assert.IsNotEmpty( "Hi!", "Failed on String" );
+ Assert.IsNotEmpty( array, "Failed on Array" );
+ Assert.IsNotEmpty( list, "Failed on ArrayList" );
+ Assert.IsNotEmpty( hash, "Failed on Hashtable" );
+ Assert.IsNotEmpty( (IEnumerable)array, "Failed on IEnumerable" );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsNotEmptyFailsOnEmptyString()
+ {
+ expectedMessage =
+ " Expected: not <empty>" + Env.NewLine +
+ " But was: <string.Empty>" + Env.NewLine;
+ Assert.IsNotEmpty( "" );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsNotEmptyFailsOnEmptyArray()
+ {
+ expectedMessage =
+ " Expected: not <empty>" + Env.NewLine +
+ " But was: <empty>" + Env.NewLine;
+ Assert.IsNotEmpty( new int[0] );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsNotEmptyFailsOnEmptyArrayList()
+ {
+ expectedMessage =
+ " Expected: not <empty>" + Env.NewLine +
+ " But was: <empty>" + Env.NewLine;
+ Assert.IsNotEmpty( new ArrayList() );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsNotEmptyFailsOnEmptyHashTable()
+ {
+ expectedMessage =
+ " Expected: not <empty>" + Env.NewLine +
+ " But was: <empty>" + Env.NewLine;
+ Assert.IsNotEmpty( new Hashtable() );
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsNotEmptyFailsOnEmptyIEnumerable()
+ {
+ expectedMessage =
+ " Expected: not <empty>" + Environment.NewLine +
+ " But was: <empty>" + Environment.NewLine;
+ Assert.IsNotEmpty((IEnumerable)new int[0]);
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/EqualsFixture.cs b/external/guiunit/src/tests/Assertions/EqualsFixture.cs
new file mode 100755
index 0000000..6681126
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/EqualsFixture.cs
@@ -0,0 +1,568 @@
+// ***********************************************************************
+// Copyright (c) 2004 Charlie Poole
+//
+// 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.Globalization;
+using System.Threading;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class EqualsFixture : MessageChecker
+ {
+ [Test]
+ public void Equals()
+ {
+ string nunitString = "Hello NUnit";
+ string expected = nunitString;
+ string actual = nunitString;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void EqualsNull()
+ {
+ Assert.AreEqual(null, null);
+ }
+
+ [Test]
+ public void Bug575936Int32Int64Comparison()
+ {
+ long l64 = 0;
+ int i32 = 0;
+ Assert.AreEqual(i32, l64);
+ }
+
+ [Test]
+ public void IntegerLongComparison()
+ {
+ Assert.AreEqual(1, 1L);
+ Assert.AreEqual(1L, 1);
+ }
+
+ [Test]
+ public void IntegerEquals()
+ {
+ int val = 42;
+ Assert.AreEqual(val, 42);
+ }
+
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void EqualsFail()
+ {
+ string junitString = "Goodbye JUnit";
+ string expected = "Hello NUnit";
+
+ expectedMessage =
+ " Expected string length 11 but was 13. Strings differ at index 0." + Env.NewLine +
+ " Expected: \"Hello NUnit\"" + Env.NewLine +
+ " But was: \"Goodbye JUnit\"" + Env.NewLine +
+ " -----------^" + Env.NewLine;
+ Assert.AreEqual(expected, junitString);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void EqualsNaNFails()
+ {
+ expectedMessage =
+ " Expected: 1.234d +/- 0.0d" + Env.NewLine +
+ " But was: NaN" + Env.NewLine;
+ Assert.AreEqual(1.234, Double.NaN, 0.0);
+ }
+
+
+ [Test]
+ [ExpectedException(typeof(AssertionException))]
+ public void NanEqualsFails()
+ {
+ expectedMessage =
+ " Expected: NaN" + Env.NewLine +
+ " But was: 1.234d" + Env.NewLine;
+ Assert.AreEqual(Double.NaN, 1.234, 0.0);
+ }
+
+ [Test]
+ public void NanEqualsNaNSucceeds()
+ {
+ Assert.AreEqual(Double.NaN, Double.NaN, 0.0);
+ }
+
+ [Test]
+ public void NegInfinityEqualsInfinity()
+ {
+ Assert.AreEqual(Double.NegativeInfinity, Double.NegativeInfinity, 0.0);
+ }
+
+ [Test]
+ public void PosInfinityEqualsInfinity()
+ {
+ Assert.AreEqual(Double.PositiveInfinity, Double.PositiveInfinity, 0.0);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void PosInfinityNotEquals()
+ {
+ expectedMessage =
+ " Expected: Infinity" + Env.NewLine +
+ " But was: 1.23d" + Env.NewLine;
+ Assert.AreEqual(Double.PositiveInfinity, 1.23, 0.0);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void PosInfinityNotEqualsNegInfinity()
+ {
+ expectedMessage =
+ " Expected: Infinity" + Env.NewLine +
+ " But was: -Infinity" + Env.NewLine;
+ Assert.AreEqual(Double.PositiveInfinity, Double.NegativeInfinity, 0.0);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void SinglePosInfinityNotEqualsNegInfinity()
+ {
+ expectedMessage =
+ " Expected: Infinity" + Env.NewLine +
+ " But was: -Infinity" + Env.NewLine;
+ Assert.AreEqual(float.PositiveInfinity, float.NegativeInfinity, (float)0.0);
+ }
+
+#if !NETCF
+ [Test,ExpectedException(typeof(InvalidOperationException))]
+ public void EqualsThrowsException()
+ {
+ object o = new object();
+ Assert.Equals(o, o);
+ }
+
+ [Test,ExpectedException(typeof(InvalidOperationException))]
+ public void ReferenceEqualsThrowsException()
+ {
+ object o = new object();
+ Assert.ReferenceEquals(o, o);
+ }
+#endif
+
+ [Test]
+ public void Float()
+ {
+ float val = (float)1.0;
+ float expected = val;
+ float actual = val;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual, (float)0.0);
+ }
+
+ [Test]
+ public void Byte()
+ {
+ byte val = 1;
+ byte expected = val;
+ byte actual = val;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void String()
+ {
+ string s1 = "test";
+ string s2 = new System.Text.StringBuilder(s1).ToString();
+
+ Assert.IsTrue(s1.Equals(s2));
+ Assert.AreEqual(s1,s2);
+ }
+
+ [Test]
+ public void Short()
+ {
+ short val = 1;
+ short expected = val;
+ short actual = val;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void Int()
+ {
+ int val = 1;
+ int expected = val;
+ int actual = val;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void UInt()
+ {
+ uint val = 1;
+ uint expected = val;
+ uint actual = val;
+
+ Assert.IsTrue(expected == actual);
+ Assert.AreEqual(expected, actual);
+ }
+
+ [Test]
+ public void Decimal()
+ {
+ decimal expected = 100m;
+ decimal actual = 100.0m;
+ int integer = 100;
+
+ Assert.IsTrue( expected == actual );
+ Assert.AreEqual(expected, actual);
+ Assert.IsTrue(expected == integer);
+ Assert.AreEqual(expected, integer);
+ Assert.IsTrue(actual == integer);
+ Assert.AreEqual(actual, integer);
+ }
+
+
+
+ /// <summary>
+ /// Checks to see that a value comparison works with all types.
+ /// Current version has problems when value is the same but the
+ /// types are different...C# is not like Java, and doesn't automatically
+ /// perform value type conversion to simplify this type of comparison.
+ ///
+ /// Related to Bug575936Int32Int64Comparison, but covers all numeric
+ /// types.
+ /// </summary>
+ [Test]
+ public void EqualsSameTypes()
+ {
+ byte b1 = 35;
+ sbyte sb2 = 35;
+ decimal d4 = 35;
+ double d5 = 35;
+ float f6 = 35;
+ int i7 = 35;
+ uint u8 = 35;
+ long l9 = 35;
+ short s10 = 35;
+ ushort us11 = 35;
+
+ System.Byte b12 = 35;
+ System.SByte sb13 = 35;
+ System.Decimal d14 = 35;
+ System.Double d15 = 35;
+ System.Single s16 = 35;
+ System.Int32 i17 = 35;
+ System.UInt32 ui18 = 35;
+ System.Int64 i19 = 35;
+ System.UInt64 ui20 = 35;
+ System.Int16 i21 = 35;
+ System.UInt16 i22 = 35;
+
+ Assert.AreEqual(35, b1);
+ Assert.AreEqual(35, sb2);
+ Assert.AreEqual(35, d4);
+ Assert.AreEqual(35, d5);
+ Assert.AreEqual(35, f6);
+ Assert.AreEqual(35, i7);
+ Assert.AreEqual(35, u8);
+ Assert.AreEqual(35, l9);
+ Assert.AreEqual(35, s10);
+ Assert.AreEqual(35, us11);
+
+ Assert.AreEqual( 35, b12 );
+ Assert.AreEqual( 35, sb13 );
+ Assert.AreEqual( 35, d14 );
+ Assert.AreEqual( 35, d15 );
+ Assert.AreEqual( 35, s16 );
+ Assert.AreEqual( 35, i17 );
+ Assert.AreEqual( 35, ui18 );
+ Assert.AreEqual( 35, i19 );
+ Assert.AreEqual( 35, ui20 );
+ Assert.AreEqual( 35, i21 );
+ Assert.AreEqual( 35, i22 );
+
+#if CLR_2_0 || CLR_4_0
+ byte? b23 = 35;
+ sbyte? sb24 = 35;
+ decimal? d25 = 35;
+ double? d26 = 35;
+ float? f27 = 35;
+ int? i28 = 35;
+ uint? u29 = 35;
+ long? l30 = 35;
+ short? s31 = 35;
+ ushort? us32 = 35;
+
+ Assert.AreEqual(35, b23);
+ Assert.AreEqual(35, sb24);
+ Assert.AreEqual(35, d25);
+ Assert.AreEqual(35, d26);
+ Assert.AreEqual(35, f27);
+ Assert.AreEqual(35, i28);
+ Assert.AreEqual(35, u29);
+ Assert.AreEqual(35, l30);
+ Assert.AreEqual(35, s31);
+ Assert.AreEqual(35, us32);
+#endif
+ }
+
+ [Test]
+ public void EnumsEqual()
+ {
+ MyEnum actual = MyEnum.a;
+ Assert.AreEqual( MyEnum.a, actual );
+ }
+
+ [Test, ExpectedException( typeof(AssertionException) )]
+ public void EnumsNotEqual()
+ {
+ MyEnum actual = MyEnum.a;
+ expectedMessage =
+ " Expected: c" + Env.NewLine +
+ " But was: a" + Env.NewLine;
+ Assert.AreEqual( MyEnum.c, actual );
+ }
+
+ [Test]
+ public void DateTimeEqual()
+ {
+ DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
+ DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 ) + TimeSpan.FromHours( 7.0 );
+ Assert.AreEqual( dt1, dt2 );
+ }
+
+ [Test, ExpectedException( typeof (AssertionException) )]
+ public void DateTimeNotEqual()
+ {
+ DateTime dt1 = new DateTime( 2005, 6, 1, 7, 0, 0 );
+ DateTime dt2 = new DateTime( 2005, 6, 1, 0, 0, 0 );
+ expectedMessage =
+ " Expected: 2005-06-01 07:00:00.000" + Env.NewLine +
+ " But was: 2005-06-01 00:00:00.000" + Env.NewLine;
+ Assert.AreEqual(dt1, dt2);
+ }
+
+ private enum MyEnum
+ {
+ a, b, c
+ }
+
+ [Test]
+ public void DoubleNotEqualMessageDisplaysAllDigits()
+ {
+ string message = "";
+
+ try
+ {
+ double d1 = 36.1;
+ double d2 = 36.099999999999994;
+ Assert.AreEqual( d1, d2 );
+ }
+ catch(AssertionException ex)
+ {
+ message = ex.Message;
+ }
+
+ if ( message == "" )
+ Assert.Fail( "Should have thrown an AssertionException" );
+
+ int i = message.IndexOf('3');
+ int j = message.IndexOf( 'd', i );
+ string expected = message.Substring( i, j - i + 1 );
+ i = message.IndexOf( '3', j );
+ j = message.IndexOf( 'd', i );
+ string actual = message.Substring( i , j - i + 1 );
+ Assert.AreNotEqual( expected, actual );
+ }
+
+ [Test]
+ public void FloatNotEqualMessageDisplaysAllDigits()
+ {
+ string message = "";
+
+ try
+ {
+ float f1 = 36.125F;
+ float f2 = 36.125004F;
+ Assert.AreEqual( f1, f2 );
+ }
+ catch(AssertionException ex)
+ {
+ message = ex.Message;
+ }
+
+ if ( message == "" )
+ Assert.Fail( "Should have thrown an AssertionException" );
+
+ int i = message.IndexOf( '3' );
+ int j = message.IndexOf( 'f', i );
+ string expected = message.Substring( i, j - i + 1 );
+ i = message.IndexOf( '3', j );
+ j = message.IndexOf( 'f', i );
+ string actual = message.Substring( i, j - i + 1 );
+ Assert.AreNotEqual( expected, actual );
+ }
+
+ [Test]
+ public void DoubleNotEqualMessageDisplaysTolerance()
+ {
+ string message = "";
+
+ try
+ {
+ double d1 = 0.15;
+ double d2 = 0.12;
+ double tol = 0.005;
+ Assert.AreEqual(d1, d2, tol);
+ }
+ catch (AssertionException ex)
+ {
+ message = ex.Message;
+ }
+
+ if (message == "")
+ Assert.Fail("Should have thrown an AssertionException");
+
+ Assert.That(message, Contains.Substring("+/- 0.005"));
+ }
+
+ [Test]
+ public void FloatNotEqualMessageDisplaysTolerance()
+ {
+ string message = "";
+
+ try
+ {
+ float f1 = 0.15F;
+ float f2 = 0.12F;
+ float tol = 0.001F;
+ Assert.AreEqual( f1, f2, tol );
+ }
+ catch( AssertionException ex )
+ {
+ message = ex.Message;
+ }
+
+ if ( message == "" )
+ Assert.Fail( "Should have thrown an AssertionException" );
+
+ Assert.That(message, Contains.Substring( "+/- 0.001"));
+ }
+
+ [Test]
+ public void DoubleNotEqualMessageDisplaysDefaultTolerance()
+ {
+ string message = "";
+ GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
+
+ try
+ {
+ double d1 = 0.15;
+ double d2 = 0.12;
+ Assert.AreEqual(d1, d2);
+ }
+ catch (AssertionException ex)
+ {
+ message = ex.Message;
+ }
+ finally
+ {
+ GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
+ }
+
+ if (message == "")
+ Assert.Fail("Should have thrown an AssertionException");
+
+ Assert.That(message, Contains.Substring("+/- 0.005"));
+ }
+
+ [Test]
+ public void DoubleNotEqualWithNanDoesNotDisplayDefaultTolerance()
+ {
+ string message = "";
+ GlobalSettings.DefaultFloatingPointTolerance = 0.005d;
+
+ try
+ {
+ double d1 = double.NaN;
+ double d2 = 0.12;
+ Assert.AreEqual(d1, d2);
+ }
+ catch (AssertionException ex)
+ {
+ message = ex.Message;
+ }
+ finally
+ {
+ GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
+ }
+
+ if (message == "")
+ Assert.Fail("Should have thrown an AssertionException");
+
+ Assert.That(message.IndexOf("+/-") == -1);
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ [Test]
+ public void IEquatableSuccess_OldSyntax()
+ {
+ IntEquatable a = new IntEquatable(1);
+
+ Assert.AreEqual(1, a);
+ Assert.AreEqual(a, 1);
+ }
+
+ [Test]
+ public void IEquatableSuccess_ConstraintSyntax()
+ {
+ IntEquatable a = new IntEquatable(1);
+
+ Assert.That(a, Is.EqualTo(1));
+ Assert.That(1, Is.EqualTo(a));
+ }
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public class IntEquatable : IEquatable<int>
+ {
+ private int i;
+
+ public IntEquatable(int i)
+ {
+ this.i = i;
+ }
+
+ public bool Equals(int other)
+ {
+ return i.Equals(other);
+ }
+ }
+#endif
+}
+
diff --git a/external/guiunit/src/tests/Assertions/MessageChecker.cs b/external/guiunit/src/tests/Assertions/MessageChecker.cs
new file mode 100755
index 0000000..dc8cf05
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/MessageChecker.cs
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ /// <summary>
+ /// MessageCheckingTest is an abstract base for tests
+ /// that check for an expected message in the exception
+ /// handler.
+ /// </summary>
+ public abstract class MessageChecker : IExpectException
+ {
+ protected string expectedMessage;
+ protected MessageMatch matchType = MessageMatch.Exact;
+ protected readonly string NL = NUnit.Env.NewLine;
+
+ [SetUp]
+ public void SetUp()
+ {
+ expectedMessage = null;
+ }
+
+ public void HandleException( Exception ex )
+ {
+ if ( expectedMessage != null )
+ {
+ switch(matchType)
+ {
+ default:
+ case MessageMatch.Exact:
+ Assert.AreEqual( expectedMessage, ex.Message );
+ break;
+ case MessageMatch.Contains:
+ Assert.That(ex.Message, Is.StringContaining(expectedMessage));
+ break;
+ case MessageMatch.StartsWith:
+ Assert.That(ex.Message, Is.StringStarting(expectedMessage));
+ break;
+#if !NETCF
+ case MessageMatch.Regex:
+ Assert.That(ex.Message, Is.StringMatching(expectedMessage));
+ break;
+#endif
+ }
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/NotEqualFixture.cs b/external/guiunit/src/tests/Assertions/NotEqualFixture.cs
new file mode 100755
index 0000000..72c67c8
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/NotEqualFixture.cs
@@ -0,0 +1,134 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class NotEqualFixture : MessageChecker
+ {
+ [Test]
+ public void NotEqual()
+ {
+ Assert.AreNotEqual( 5, 3 );
+ }
+
+ [Test, ExpectedException( typeof( AssertionException ) )]
+ public void NotEqualFails()
+ {
+ expectedMessage =
+ " Expected: not 5" + Env.NewLine +
+ " But was: 5" + Env.NewLine;
+ Assert.AreNotEqual( 5, 5 );
+ }
+
+ [Test]
+ public void NullNotEqualToNonNull()
+ {
+ Assert.AreNotEqual( null, 3 );
+ }
+
+ [Test, ExpectedException( typeof( AssertionException ) )]
+ public void NullEqualsNull()
+ {
+ expectedMessage =
+ " Expected: not null" + Env.NewLine +
+ " But was: null" + Env.NewLine;
+ Assert.AreNotEqual( null, null );
+ }
+
+ [Test]
+ public void ArraysNotEqual()
+ {
+ Assert.AreNotEqual( new object[] { 1, 2, 3 }, new object[] { 1, 3, 2 } );
+ }
+
+ [Test, ExpectedException( typeof( AssertionException ) )]
+ public void ArraysNotEqualFails()
+ {
+ expectedMessage =
+ " Expected: not < 1, 2, 3 >" + Env.NewLine +
+ " But was: < 1, 2, 3 >" + Env.NewLine;
+ Assert.AreNotEqual( new object[] { 1, 2, 3 }, new object[] { 1, 2, 3 } );
+ }
+
+ [Test]
+ public void UInt()
+ {
+ uint u1 = 5;
+ uint u2 = 8;
+ Assert.AreNotEqual( u1, u2 );
+ }
+
+ [Test]
+ public void NotEqualSameTypes()
+ {
+ byte b1 = 35;
+ sbyte sb2 = 35;
+ decimal d4 = 35;
+ double d5 = 35;
+ float f6 = 35;
+ int i7 = 35;
+ uint u8 = 35;
+ long l9 = 35;
+ short s10 = 35;
+ ushort us11 = 35;
+
+ System.Byte b12 = 35;
+ System.SByte sb13 = 35;
+ System.Decimal d14 = 35;
+ System.Double d15 = 35;
+ System.Single s16 = 35;
+ System.Int32 i17 = 35;
+ System.UInt32 ui18 = 35;
+ System.Int64 i19 = 35;
+ System.UInt64 ui20 = 35;
+ System.Int16 i21 = 35;
+ System.UInt16 i22 = 35;
+
+ Assert.AreNotEqual(23, b1);
+ Assert.AreNotEqual(23, sb2);
+ Assert.AreNotEqual(23, d4);
+ Assert.AreNotEqual(23, d5);
+ Assert.AreNotEqual(23, f6);
+ Assert.AreNotEqual(23, i7);
+ Assert.AreNotEqual(23, u8);
+ Assert.AreNotEqual(23, l9);
+ Assert.AreNotEqual(23, s10);
+ Assert.AreNotEqual(23, us11);
+
+ Assert.AreNotEqual(23, b12);
+ Assert.AreNotEqual(23, sb13);
+ Assert.AreNotEqual(23, d14);
+ Assert.AreNotEqual(23, d15);
+ Assert.AreNotEqual(23, s16);
+ Assert.AreNotEqual(23, i17);
+ Assert.AreNotEqual(23, ui18);
+ Assert.AreNotEqual(23, i19);
+ Assert.AreNotEqual(23, ui20);
+ Assert.AreNotEqual(23, i21);
+ Assert.AreNotEqual(23, i22);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Assertions/NotSameFixture.cs b/external/guiunit/src/tests/Assertions/NotSameFixture.cs
new file mode 100755
index 0000000..dcc8ed9
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/NotSameFixture.cs
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class NotSameFixture : MessageChecker
+ {
+ private readonly string s1 = "S1";
+ private readonly string s2 = "S2";
+
+ [Test]
+ public void NotSame()
+ {
+ Assert.AreNotSame(s1, s2);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void NotSameFails()
+ {
+ expectedMessage =
+ " Expected: not same as \"S1\"" + Env.NewLine +
+ " But was: \"S1\"" + Env.NewLine;
+ Assert.AreNotSame( s1, s1 );
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Assertions/NullableTypesTests.cs b/external/guiunit/src/tests/Assertions/NullableTypesTests.cs
new file mode 100755
index 0000000..76193c9
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/NullableTypesTests.cs
@@ -0,0 +1,252 @@
+// ****************************************************************
+// Copyright 2008, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org.
+// ****************************************************************
+using System;
+
+namespace NUnit.Framework.Tests
+{
+#if CLR_2_0 || CLR_4_0
+#if !MONO
+ [TestFixture, Category("Generics")]
+ public class NullableTypesTests
+ {
+ [Test]
+ public void CanTestForNull()
+ {
+ int? nullInt = null;
+ int? five = 5;
+
+ Assert.IsNull(nullInt);
+ Assert.IsNotNull(five);
+ Assert.That(nullInt, Is.Null);
+ Assert.That(five, Is.Not.Null);
+ }
+
+#if false
+ [Test]
+ public void CanCompareNullableInts()
+ {
+ int? five = 5;
+ int? answer = 2 + 3;
+
+ Assert.AreEqual(five, answer);
+ Assert.AreEqual(five, 5);
+ Assert.AreEqual(5, five);
+
+ Assert.That(five, Is.EqualTo(answer));
+ Assert.That(five, Is.EqualTo(5));
+ Assert.That(5, Is.EqualTo(five));
+
+ Assert.Greater(five, 3);
+ Assert.GreaterOrEqual(five, 5);
+ Assert.Less(3, five);
+ Assert.LessOrEqual(5, five);
+
+ Assert.That(five, Is.GreaterThan(3));
+ Assert.That(five, Is.GreaterThanOrEqualTo(5));
+ //Assert.That(3, Is.LessThan(five));
+ //Assert.That(5, Is.LessThanOrEqualTo(five));
+ }
+
+ [Test]
+ public void CanCompareNullableDoubles()
+ {
+ double? five = 5.0;
+ double? answer = 2.0 + 3.0;
+
+ Assert.AreEqual(five, answer);
+ Assert.AreEqual(five, 5.0);
+ Assert.AreEqual(5.0, five);
+
+ Assert.That(five, Is.EqualTo(answer));
+ Assert.That(five, Is.EqualTo(5.0));
+ Assert.That(5.0, Is.EqualTo(five));
+
+ Assert.Greater(five, 3.0);
+ Assert.GreaterOrEqual(five, 5.0);
+ Assert.Less(3.0, five);
+ Assert.LessOrEqual(5.0, five);
+
+ Assert.That(five, Is.GreaterThan(3.0));
+ Assert.That(five, Is.GreaterThanOrEqualTo(5.0));
+ //Assert.That(3.0, Is.LessThan(five));
+ //Assert.That(5.0, Is.LessThanOrEqualTo(five));
+ }
+#endif
+
+ [Test]
+ public void CanTestForNaN()
+ {
+ double? anNaN = Double.NaN;
+ Assert.That(anNaN, Is.NaN);
+ }
+
+#if false
+ [Test]
+ public void CanCompareNullableDecimals()
+ {
+ decimal? five = 5m;
+ decimal? answer = 2m + 3m;
+
+ Assert.AreEqual(five, answer);
+ Assert.AreEqual(five, 5m);
+ Assert.AreEqual(5m, five);
+
+ Assert.That(five, Is.EqualTo(answer));
+ Assert.That(five, Is.EqualTo(5m));
+ Assert.That(5m, Is.EqualTo(five));
+
+ Assert.Greater(five, 3m);
+ Assert.GreaterOrEqual(five, 5m);
+ Assert.Less(3m, five);
+ Assert.LessOrEqual(5m, five);
+
+ Assert.That(five, Is.GreaterThan(3m));
+ Assert.That(five, Is.GreaterThanOrEqualTo(5m));
+ //Assert.That(3m, Is.LessThan(five));
+ //Assert.That(5m, Is.LessThanOrEqualTo(five));
+ }
+#endif
+
+ [Test]
+ public void CanCompareWithTolerance()
+ {
+ double? five = 5.0;
+
+ Assert.AreEqual(5.0000001, five, .0001);
+ Assert.That( five, Is.EqualTo(5.0000001).Within(.0001));
+
+ float? three = 3.0f;
+
+ Assert.AreEqual(3.00001f, three, .001);
+ Assert.That( three, Is.EqualTo(3.00001f).Within(.001));
+ }
+
+ private enum Colors
+ {
+ Red,
+ Blue,
+ Green
+ }
+
+ [Test]
+ public void CanCompareNullableEnums()
+ {
+ Colors? color = Colors.Red;
+ Colors? other = Colors.Red;
+
+ Assert.AreEqual(color, other);
+ Assert.AreEqual(color, Colors.Red);
+ Assert.AreEqual(Colors.Red, color);
+ }
+
+ [Test]
+ public void CanCompareNullableMixedNumerics()
+ {
+ int? int5 = 5;
+ double? double5 = 5.0;
+ decimal? decimal5 = 5.00m;
+
+ Assert.AreEqual(int5, double5);
+ Assert.AreEqual(int5, decimal5);
+ Assert.AreEqual(double5, int5);
+ Assert.AreEqual(double5, decimal5);
+ Assert.AreEqual(decimal5, int5);
+ Assert.AreEqual(decimal5, double5);
+
+ Assert.That(int5, Is.EqualTo(double5));
+ Assert.That(int5, Is.EqualTo(decimal5));
+ Assert.That(double5, Is.EqualTo(int5));
+ Assert.That(double5, Is.EqualTo(decimal5));
+ Assert.That(decimal5, Is.EqualTo(int5));
+ Assert.That(decimal5, Is.EqualTo(double5));
+
+ Assert.AreEqual(5, double5);
+ Assert.AreEqual(5, decimal5);
+ Assert.AreEqual(5.0, int5);
+ Assert.AreEqual(5.0, decimal5);
+ Assert.AreEqual(5m, int5);
+ Assert.AreEqual(5m, double5);
+
+ Assert.That(5, Is.EqualTo(double5));
+ Assert.That(5, Is.EqualTo(decimal5));
+ Assert.That(5.0, Is.EqualTo(int5));
+ Assert.That(5.0, Is.EqualTo(decimal5));
+ Assert.That(5m, Is.EqualTo(int5));
+ Assert.That(5m, Is.EqualTo(double5));
+
+ Assert.AreEqual(double5, 5);
+ Assert.AreEqual(decimal5, 5);
+ Assert.AreEqual(int5, 5.0);
+ Assert.AreEqual(decimal5, 5.0);
+ Assert.AreEqual(int5, 5m);
+ Assert.AreEqual(double5, 5m);
+
+ Assert.That(double5, Is.EqualTo(5));
+ Assert.That(decimal5, Is.EqualTo(5));
+ Assert.That(int5, Is.EqualTo(5.0));
+ Assert.That(decimal5, Is.EqualTo(5.0));
+ Assert.That(int5, Is.EqualTo(5m));
+ Assert.That(double5, Is.EqualTo(5m));
+
+#if false
+ Assert.Greater(int5, 3.0);
+ Assert.Greater(int5, 3m);
+ Assert.Greater(double5, 3);
+ Assert.Greater(double5, 3m);
+ Assert.Greater(decimal5, 3);
+ Assert.Greater(decimal5, 3.0);
+
+ Assert.That(int5, Is.GreaterThan(3.0));
+ Assert.That(int5, Is.GreaterThan(3m));
+ Assert.That(double5, Is.GreaterThan(3));
+ Assert.That(double5, Is.GreaterThan(3m));
+ Assert.That(decimal5, Is.GreaterThan(3));
+ Assert.That(decimal5, Is.GreaterThan(3.0));
+
+ Assert.Less(3.0, int5);
+ Assert.Less(3m, int5);
+ Assert.Less(3, double5);
+ Assert.Less(3m, double5);
+ Assert.Less(3, decimal5);
+ Assert.Less(3.0, decimal5);
+#endif
+ //Assert.That(3.0, Is.LessThan(int5));
+ //Assert.That(3m, Is.LessThan(int5));
+ //Assert.That(3, Is.LessThan(double5));
+ //Assert.That(3m, Is.LessThan(double5));
+ //Assert.That(3, Is.LessThan(decimal5));
+ //Assert.That(3.0, Is.LessThan(decimal5));
+ }
+
+ private struct MyStruct
+ {
+ int i;
+ string s;
+
+ public MyStruct(int i, string s)
+ {
+ this.i = i;
+ this.s = s;
+ }
+ }
+
+ [Test]
+ public void CanCompareNullableStructs()
+ {
+ MyStruct struct1 = new MyStruct(5, "Hello");
+ MyStruct struct2 = new MyStruct(5, "Hello");
+ Nullable<MyStruct> one = new MyStruct(5, "Hello");
+ Nullable<MyStruct> two = new MyStruct(5, "Hello");
+
+ Assert.AreEqual(struct1, struct2); // Control
+ Assert.AreEqual(one, two);
+ Assert.AreEqual(one, struct1);
+ Assert.AreEqual(struct2, two);
+ }
+ }
+#endif
+#endif
+}
diff --git a/external/guiunit/src/tests/Assertions/SameFixture.cs b/external/guiunit/src/tests/Assertions/SameFixture.cs
new file mode 100755
index 0000000..2ec97ca
--- /dev/null
+++ b/external/guiunit/src/tests/Assertions/SameFixture.cs
@@ -0,0 +1,61 @@
+// ***********************************************************************
+// Copyright (c) 2004 Charlie Poole
+//
+// 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.Text;
+using NUnit.Framework;
+
+namespace NUnit.Framework.Assertions
+{
+ [TestFixture]
+ public class SameFixture : MessageChecker
+ {
+ [Test]
+ public void Same()
+ {
+ string s1 = "S1";
+ Assert.AreSame(s1, s1);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void SameFails()
+ {
+ Exception ex1 = new Exception( "one" );
+ Exception ex2 = new Exception( "two" );
+ expectedMessage =
+ " Expected: same as <System.Exception: one>" + Env.NewLine +
+ " But was: <System.Exception: two>" + Env.NewLine;
+ Assert.AreSame(ex1, ex2);
+ }
+
+ [Test,ExpectedException(typeof(AssertionException))]
+ public void SameValueTypes()
+ {
+ int index = 2;
+ expectedMessage =
+ " Expected: same as 2" + Env.NewLine +
+ " But was: 2" + Env.NewLine;
+ Assert.AreSame(index, index);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/ApplyToTestTests.cs b/external/guiunit/src/tests/Attributes/ApplyToTestTests.cs
new file mode 100755
index 0000000..075f97d
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/ApplyToTestTests.cs
@@ -0,0 +1,331 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class ApplyToTestTests
+ {
+ Test test;
+
+ [SetUp]
+ public void SetUp()
+ {
+ test = new TestDummy();
+ test.RunState = RunState.Runnable;
+ }
+
+ #region CategoryAttribute
+
+ [Test]
+ public void CategoryAttributeSetsCategory()
+ {
+ new CategoryAttribute("database").ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.Category), Is.EqualTo("database"));
+ }
+
+ [Test]
+ public void CategoryAttributeSetsMultipleCategories()
+ {
+ new CategoryAttribute("group1").ApplyToTest(test);
+ new CategoryAttribute("group2").ApplyToTest(test);
+ Assert.That(test.Properties[PropertyNames.Category],
+ Is.EquivalentTo(new string[] { "group1", "group2" }));
+ }
+
+ #endregion
+
+ #region DescriptionAttribute
+
+ [Test]
+ public void DescriptionAttributeSetsDescription()
+ {
+ new DescriptionAttribute("Cool test!").ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.Description), Is.EqualTo("Cool test!"));
+ }
+
+ #endregion
+
+ #region IgnoreAttribute
+
+ [Test]
+ public void IgnoreAttributeIgnoresTest()
+ {
+ new IgnoreAttribute().ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Ignored));
+ }
+
+ [Test]
+ public void IgnoreAttributeSetsIgnoreReason()
+ {
+ new IgnoreAttribute("BECAUSE").ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Ignored));
+ Assert.That(test.Properties.Get(PropertyNames.SkipReason), Is.EqualTo("BECAUSE"));
+ }
+
+ #endregion
+
+ #region ExplicitAttribute
+
+ [Test]
+ public void ExplicitAttributeMakesTestExplicit()
+ {
+ new ExplicitAttribute().ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Explicit));
+ }
+
+ [Test]
+ public void ExplicitAttributeSetsIgnoreReason()
+ {
+ new ExplicitAttribute("BECAUSE").ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Explicit));
+ Assert.That(test.Properties.Get(PropertyNames.SkipReason), Is.EqualTo("BECAUSE"));
+ }
+
+ #endregion
+
+ #region CombinatorialAttribute
+
+ [Test]
+ public void CombinatorialAttributeSetsJoinType()
+ {
+ new CombinatorialAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.JoinType), Is.EqualTo("Combinatorial"));
+ }
+
+ #endregion
+
+ #region CultureAttribute
+
+ [Test]
+ public void CultureAttributeIncludingCurrentCultureRunsTest()
+ {
+ string name = System.Globalization.CultureInfo.CurrentCulture.Name;
+ new CultureAttribute(name).ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ }
+
+ [Test]
+ public void CultureAttributeExcludingCurrentCultureSkipsTest()
+ {
+ string name = System.Globalization.CultureInfo.CurrentCulture.Name;
+ CultureAttribute attr = new CultureAttribute(name);
+ attr.Exclude = name;
+ attr.ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Skipped));
+ Assert.That(test.Properties.Get(PropertyNames.SkipReason),
+ Is.EqualTo("Not supported under culture " + name));
+ }
+
+ [Test]
+ public void CultureAttributeIncludingOtherCultureSkipsTest()
+ {
+ string name = "fr-FR";
+ if (System.Globalization.CultureInfo.CurrentCulture.Name == name)
+ name = "en-US";
+
+ new CultureAttribute(name).ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Skipped));
+ Assert.That(test.Properties.Get(PropertyNames.SkipReason),
+ Is.EqualTo("Only supported under culture " + name));
+ }
+
+ [Test]
+ public void CultureAttributeExcludingOtherCultureRunsTest()
+ {
+ string other = "fr-FR";
+ if (System.Globalization.CultureInfo.CurrentCulture.Name == other)
+ other = "en-US";
+
+ CultureAttribute attr = new CultureAttribute();
+ attr.Exclude = other;
+ attr.ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ }
+
+ [Test]
+ public void CultureAttributeWithMultipleCulturesIncluded()
+ {
+ string current = System.Globalization.CultureInfo.CurrentCulture.Name;
+ string other = current == "fr-FR" ? "en-US" : "fr-FR";
+ string cultures = current + "," + "other";
+
+ new CultureAttribute(cultures).ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ }
+
+ #endregion
+
+ #region MaxTimeAttribute
+
+ [Test]
+ public void MaxTimeAttributeSetsMaxTime()
+ {
+ new MaxTimeAttribute(2000).ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.MaxTime), Is.EqualTo(2000));
+ }
+
+ #endregion
+
+ #region PairwiseAttribute
+
+ [Test]
+ public void PairwiseAttributeSetsJoinType()
+ {
+ new PairwiseAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.JoinType), Is.EqualTo("Pairwise"));
+ }
+
+ #endregion
+
+ #region PlatformAttribute
+
+ [Test]
+ public void PlatformAttributeRunsTest()
+ {
+ string myPlatform = System.IO.Path.DirectorySeparatorChar == '/'
+ ? "Linux" : "Win";
+ new PlatformAttribute(myPlatform).ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ }
+
+ [Test]
+ public void PlatformAttributeSkipsTest()
+ {
+ string notMyPlatform = System.IO.Path.DirectorySeparatorChar == '/'
+ ? "Win" : "Linux";
+ new PlatformAttribute(notMyPlatform).ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Skipped));
+ }
+
+ #endregion
+
+#if !NUNITLITE
+
+ #region RepeatAttribute
+
+ public void RepeatAttributeSetsRepeatCount()
+ {
+ new RepeatAttribute(5).ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.RepeatCount), Is.EqualTo(5));
+ }
+
+ #endregion
+
+ #region RequiredAddinAttribute
+
+ [Test, Ignore("NYI")]
+ public void RequiredAddinAttributeSkipsTest()
+ {
+ new RequiredAddinAttribute("JUNK").ApplyToTest(test);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Skipped));
+ }
+
+ #endregion
+
+ #region RequiresMTAAttribute
+
+ [Test]
+ public void RequiresMTAAttributeSetsApartmentState()
+ {
+ new RequiresMTAAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.ApartmentState),
+ Is.EqualTo(System.Threading.ApartmentState.MTA));
+ }
+
+ #endregion
+
+ #region RequiresSTAAttribute
+
+ [Test]
+ public void RequiresSTAAttributeSetsApartmentState()
+ {
+ new RequiresSTAAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.ApartmentState),
+ Is.EqualTo(System.Threading.ApartmentState.STA));
+ }
+
+ #endregion
+
+ #region RequiresThreadAttribute
+
+ [Test]
+ public void RequiresThreadAttributeSetsRequiresThread()
+ {
+ new RequiresThreadAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.RequiresThread), Is.EqualTo(true));
+ }
+
+ [Test]
+ public void RequiresThreadAttributeMaySetApartmentState()
+ {
+ new RequiresThreadAttribute(System.Threading.ApartmentState.STA).ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.RequiresThread), Is.EqualTo(true));
+ Assert.That(test.Properties.Get(PropertyNames.ApartmentState),
+ Is.EqualTo(System.Threading.ApartmentState.STA));
+ }
+
+ #endregion
+
+#endif
+
+ #region SequentialAttribute
+
+ [Test]
+ public void SequentialAttributeSetsJoinType()
+ {
+ new SequentialAttribute().ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.JoinType), Is.EqualTo("Sequential"));
+ }
+
+ #endregion
+
+#if !NETCF
+
+ #region SetCultureAttribute
+
+ public void SetCultureAttributeSetsSetCultureProperty()
+ {
+ new SetCultureAttribute("fr-FR").ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.SetCulture), Is.EqualTo("fr-FR"));
+ }
+
+ #endregion
+
+ #region SetUICultureAttribute
+
+ public void SetUICultureAttributeSetsSetUICultureProperty()
+ {
+ new SetUICultureAttribute("fr-FR").ApplyToTest(test);
+ Assert.That(test.Properties.Get(PropertyNames.SetUICulture), Is.EqualTo("fr-FR"));
+ }
+
+ #endregion
+
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/AttributeInheritanceTests.cs b/external/guiunit/src/tests/Attributes/AttributeInheritanceTests.cs
new file mode 100755
index 0000000..a272fed
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/AttributeInheritanceTests.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+using NUnit.TestData.AttributeInheritanceData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Tests
+{
+ [TestFixture]
+ public class AttributeInheritanceTests
+ {
+ [Test]
+ public void InheritedFixtureAttributeIsRecognized()
+ {
+ Assert.That( TestBuilder.MakeFixture( typeof (When_collecting_test_fixtures) ) != null );
+ }
+
+ [Test]
+ public void InheritedTestAttributeIsRecognized()
+ {
+ Test fixture = TestBuilder.MakeFixture( typeof( When_collecting_test_fixtures ) );
+ Assert.AreEqual( 1, fixture.TestCaseCount );
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/CategoryAttributeTests.cs b/external/guiunit/src/tests/Attributes/CategoryAttributeTests.cs
new file mode 100755
index 0000000..5d750f1
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/CategoryAttributeTests.cs
@@ -0,0 +1,90 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.CategoryAttributeData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ /// <summary>
+ /// Summary description for CategoryAttributeTests.
+ /// </summary>
+ [TestFixture]
+ public class CategoryAttributeTests
+ {
+ TestSuite fixture;
+
+ [SetUp]
+ public void CreateFixture()
+ {
+ fixture = TestBuilder.MakeFixture( typeof( FixtureWithCategories ) );
+ }
+
+ [Test]
+ public void CategoryOnFixture()
+ {
+ Assert.That( fixture.Properties.Contains("Category", "DataBase"));
+ }
+
+ [Test]
+ public void CategoryOnTestMethod()
+ {
+ Test test1 = (Test)fixture.Tests[0];
+ Assert.That( test1.Properties.Contains("Category", "Long") );
+ }
+
+ [Test]
+ public void CanDeriveFromCategoryAttribute()
+ {
+ Test test2 = (Test)fixture.Tests[1];
+ Assert.That(test2.Properties["Category"], Contains.Item("Critical") );
+ }
+
+ [Test]
+ public void DerivedCategoryMayBeInherited()
+ {
+ Assert.That(fixture.Properties.Contains("Category", "MyCategory"));
+ }
+
+ [Test]
+ public void CanSpecifyOnMethodAndTestCase()
+ {
+ TestSuite test3 = (TestSuite)fixture.Tests[2];
+ Assert.That(test3.Name, Is.EqualTo("Test3"));
+ Assert.That(test3.Properties["Category"], Contains.Item("Top"));
+ Test testCase = (Test)test3.Tests[0];
+ Assert.That(testCase.Name, Is.EqualTo("Test3(5)"));
+ Assert.That(testCase.Properties["Category"], Contains.Item("Bottom"));
+ }
+
+ [Test]
+ public void TestWithInvalidCategoryNameIsNotRunnable()
+ {
+ Test test4 = (Test)fixture.Tests[3];
+ Assert.That(test4.RunState, Is.EqualTo(RunState.NotRunnable));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/CombinatorialTests.cs b/external/guiunit/src/tests/Attributes/CombinatorialTests.cs
new file mode 100755
index 0000000..3ad46b4
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/CombinatorialTests.cs
@@ -0,0 +1,100 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class CombinatorialTests
+ {
+ [Test]
+ public void SingleArgument(
+ [Values(1.3, 1.7, 1.5)] double x)
+ {
+ Assert.That(x > 1.0 && x < 2.0);
+ }
+
+ [Test, Combinatorial]
+ public void TwoArguments_Combinatorial(
+ [Values(1, 2, 3)] int x,
+ [Values(10, 20)] int y)
+ {
+ Assert.That(x > 0 && x < 4 && y % 10 == 0);
+ }
+
+ [Test, Sequential]
+ public void TwoArguments_Sequential(
+ [Values(1, 2, 3)] int x,
+ [Values(10, 20)] int y)
+ {
+ Assert.That(x > 0 && x < 4 && y % 10 == 0);
+ }
+
+ [Test, Combinatorial]
+ public void ThreeArguments_Combinatorial(
+ [Values(1, 2, 3)] int x,
+ [Values(10, 20)] int y,
+ [Values("Charlie", "Joe", "Frank")] string name)
+ {
+ Assert.That(x > 0 && x < 4 && y % 10 == 0);
+ Assert.That(name.Length >= 2);
+ }
+
+ [Test, Sequential]
+ public void ThreeArguments_Sequential(
+ [Values(1, 2, 3)] int x,
+ [Values(10, 20)] int y,
+ [Values("Charlie", "Joe", "Frank")] string name)
+ {
+ Assert.That(x > 0 && x < 4 && y % 10 == 0);
+ Assert.That(name.Length >= 2);
+ }
+
+ [Test]
+ public void RangeTest(
+ [Range(0.2, 0.6, 0.2)] double a,
+ [Range(10, 20, 5)] int b)
+ {
+ }
+
+ [Test, Sequential]
+ public void RandomTest(
+ [Random(32, 212, 5)] int x,
+ [Random(5)] double y,
+ [Random(5)] AttributeTargets z)
+ {
+ Assert.That(x,Is.InRange(32,212));
+ Assert.That(y,Is.InRange(0.0,1.0));
+ Assert.That(z, Is.TypeOf(typeof(AttributeTargets)));
+ }
+
+ [Test, Sequential]
+ public void RandomArgsAreIndependent(
+ [Random(1)] double x,
+ [Random(1)] double y)
+ {
+ Assert.AreNotEqual(x, y);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/DatapointTests.cs b/external/guiunit/src/tests/Attributes/DatapointTests.cs
new file mode 100755
index 0000000..742cf1f
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/DatapointTests.cs
@@ -0,0 +1,70 @@
+using System;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.DatapointFixture;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ public class DatapointTests
+ {
+ private void RunTestOnFixture(Type fixtureType)
+ {
+ TestResult result = TestBuilder.RunTestFixture(fixtureType);
+ ResultSummary summary = new ResultSummary(result);
+ Assert.That(summary.Passed, Is.EqualTo(2));
+ Assert.That(summary.Inconclusive, Is.EqualTo(3));
+ Assert.That(result.ResultState, Is.EqualTo(ResultState.Success));
+ }
+
+ [Test]
+ public void WorksOnField()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Field_Double));
+ }
+
+ [Test]
+ public void WorksOnArray()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Field_ArrayOfDouble));
+ }
+
+ [Test]
+ public void WorksOnPropertyReturningArray()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Property_ArrayOfDouble));
+ }
+
+ [Test]
+ public void WorksOnMethodReturningArray()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Method_ArrayOfDouble));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void WorksOnIEnumerableOfT()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Field_IEnumerableOfDouble));
+ }
+
+ [Test]
+ public void WorksOnPropertyReturningIEnumerableOfT()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Property_IEnumerableOfDouble));
+ }
+
+ [Test]
+ public void WorksOnMethodReturningIEnumerableOfT()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Method_IEnumerableOfDouble));
+ }
+
+ [Test]
+ public void WorksOnEnumeratorReturningIEnumerableOfT()
+ {
+ RunTestOnFixture(typeof(SquareRootTest_Iterator_IEnumerableOfDouble));
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/DescriptionTests.cs b/external/guiunit/src/tests/Attributes/DescriptionTests.cs
new file mode 100755
index 0000000..eb1bbde
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/DescriptionTests.cs
@@ -0,0 +1,87 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.TestData.DescriptionFixture;
+using NUnit.TestUtilities;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Attributes
+{
+ // TODO: Review to see if we need these tests
+
+ [TestFixture]
+ public class DescriptionTests
+ {
+ static readonly Type FixtureType = typeof( DescriptionFixture );
+
+ [Test]
+ public void ReflectionTest()
+ {
+ Test testCase = TestBuilder.MakeTestCase( FixtureType, "Method" );
+ Assert.AreEqual( RunState.Runnable, testCase.RunState );
+ }
+
+ [Test]
+ public void Description()
+ {
+ Test testCase = TestBuilder.MakeTestCase(FixtureType, "Method");
+ Assert.AreEqual("Test Description", testCase.Properties.Get(PropertyNames.Description));
+ }
+
+ [Test]
+ public void NoDescription()
+ {
+ Test testCase = TestBuilder.MakeTestCase( FixtureType, "NoDescriptionMethod" );
+ Assert.IsNull(testCase.Properties.Get(PropertyNames.Description));
+ }
+
+ [Test]
+ public void FixtureDescription()
+ {
+ TestSuite suite = new TestSuite("suite");
+ suite.Add( TestBuilder.MakeFixture( typeof( DescriptionFixture ) ) );
+
+ TestSuite mockFixtureSuite = (TestSuite)suite.Tests[0];
+
+ Assert.AreEqual("Fixture Description", mockFixtureSuite.Properties.Get(PropertyNames.Description));
+ }
+
+ [Test]
+ public void SeparateDescriptionAttribute()
+ {
+ Test testCase = TestBuilder.MakeTestCase(FixtureType, "SeparateDescriptionMethod");
+ Assert.AreEqual("Separate Description", testCase.Properties.Get(PropertyNames.Description));
+ }
+
+ [Test]
+ public void DescriptionOnTestCase()
+ {
+ TestSuite parameterizedMethodSuite = TestBuilder.MakeParameterizedMethodSuite(FixtureType, "TestCaseWithDescription");
+ Assert.AreEqual("method description", parameterizedMethodSuite.Properties.Get(PropertyNames.Description));
+ Test testCase = (Test)parameterizedMethodSuite.Tests[0];
+ Assert.AreEqual("case description", testCase.Properties.Get(PropertyNames.Description));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/ExpectedExceptionTests.cs b/external/guiunit/src/tests/Attributes/ExpectedExceptionTests.cs
new file mode 100755
index 0000000..e456126
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/ExpectedExceptionTests.cs
@@ -0,0 +1,447 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+using NUnit.TestData.ExpectedExceptionData;
+#if !NETCF
+using System.Runtime.Serialization;
+#endif
+
+namespace NUnit.Framework.Attributes
+{
+ /// <summary>
+ ///
+ /// </summary>
+ [TestFixture]
+ public class ExpectedExceptionTests
+ {
+ [Test, ExpectedException]
+ public void CanExpectUnspecifiedException()
+ {
+ throw new ArgumentException();
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void TestSucceedsWithSpecifiedExceptionType()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException(ExpectedException=typeof(ArgumentException))]
+ public void TestSucceedsWithSpecifiedExceptionTypeAsNamedParameter()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException")]
+ public void TestSucceedsWithSpecifiedExceptionName()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException(ExpectedExceptionName="System.ArgumentException")]
+ public void TestSucceedsWithSpecifiedExceptionNameAsNamedParameter()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException),ExpectedMessage="argument exception")]
+ public void TestSucceedsWithSpecifiedExceptionTypeAndMessage()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException), ExpectedMessage="argument exception", MatchType=MessageMatch.Exact)]
+ public void TestSucceedsWithSpecifiedExceptionTypeAndExactMatch()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException),ExpectedMessage="invalid", MatchType=MessageMatch.Contains)]
+ public void TestSucceedsWithSpecifiedExceptionTypeAndContainsMatch()
+ {
+ throw new ArgumentException("argument invalid exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException),ExpectedMessage="exception$", MatchType=MessageMatch.Regex)]
+ public void TestSucceedsWithSpecifiedExceptionTypeAndRegexMatch()
+ {
+ throw new ArgumentException("argument invalid exception");
+ }
+
+ [Test]
+ [ExpectedException(typeof(ArgumentException), ExpectedMessage = "argument invalid", MatchType = MessageMatch.StartsWith)]
+ public void TestSucceedsWithSpecifiedExceptionTypeAndStartsWithMatch()
+ {
+ throw new ArgumentException("argument invalid exception");
+ }
+
+// [Test]
+// [ExpectedException("System.ArgumentException", "argument exception")]
+// public void TestSucceedsWithSpecifiedExceptionNameAndMessage_OldFormat()
+// {
+// throw new ArgumentException("argument exception");
+// }
+
+ [Test]
+ [ExpectedException("System.ArgumentException", ExpectedMessage = "argument exception")]
+ public void TestSucceedsWithSpecifiedExceptionNameAndMessage_NewFormat()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException",ExpectedMessage="argument exception",MatchType=MessageMatch.Exact)]
+ public void TestSucceedsWithSpecifiedExceptionNameAndExactMatch()
+ {
+ throw new ArgumentException("argument exception");
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException",ExpectedMessage="invalid", MatchType=MessageMatch.Contains)]
+ public void TestSucceedsWhenSpecifiedExceptionNameAndContainsMatch()
+ {
+ throw new ArgumentException("argument invalid exception");
+ }
+
+ [Test]
+ [ExpectedException("System.ArgumentException",ExpectedMessage="exception$", MatchType=MessageMatch.Regex)]
+ public void TestSucceedsWhenSpecifiedExceptionNameAndRegexMatch()
+ {
+ throw new ArgumentException("argument invalid exception");
+ }
+
+ [Test]
+ public void TestFailsWhenBaseExceptionIsThrown()
+ {
+ Type fixtureType = typeof(BaseException);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "BaseExceptionTest" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "BaseExceptionTest should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.Exception"));
+ }
+
+ [Test]
+ public void TestFailsWhenDerivedExceptionIsThrown()
+ {
+ Type fixtureType = typeof(DerivedException);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "DerivedExceptionTest");
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "DerivedExceptionTest should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.Exception" + Env.NewLine +
+ " but was: System.ArgumentException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionType()
+ {
+ Type fixtureType = typeof(MismatchedException);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "MismatchedExceptionType");
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "MismatchedExceptionType should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.ArgumentOutOfRangeException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionTypeAsNamedParameter()
+ {
+ Type fixtureType = typeof(MismatchedException);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "MismatchedExceptionTypeAsNamedParameter");
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "MismatchedExceptionType should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.ArgumentOutOfRangeException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionTypeWithUserMessage()
+ {
+ Type fixtureType = typeof(MismatchedException);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "MismatchedExceptionTypeWithUserMessage" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "custom message" + Env.NewLine +
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.ArgumentOutOfRangeException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionName()
+ {
+ Type fixtureType = typeof(MismatchedException);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "MismatchedExceptionName" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "MismatchedExceptionName should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.ArgumentOutOfRangeException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionNameWithUserMessage()
+ {
+ Type fixtureType = typeof(MismatchedException);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "MismatchedExceptionNameWithUserMessage");
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.That(result.Message, Is.StringStarting(
+ "custom message" + Env.NewLine +
+ "An unexpected exception type was thrown" + Env.NewLine +
+ "Expected: System.ArgumentException" + Env.NewLine +
+ " but was: System.ArgumentOutOfRangeException"));
+ }
+
+ [Test]
+ public void TestMismatchedExceptionMessage()
+ {
+ Type fixtureType = typeof(TestThrowsExceptionWithWrongMessage);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestThrow" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "TestThrow should have failed");
+ Assert.AreEqual(
+ "The exception message text was incorrect" + Env.NewLine +
+ "Expected: not the message" + Env.NewLine +
+ " but was: the message",
+ result.Message);
+ }
+
+ [Test]
+ public void TestMismatchedExceptionMessageWithUserMessage()
+ {
+ Type fixtureType = typeof(TestThrowsExceptionWithWrongMessage);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestThrowWithUserMessage" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "TestThrow should have failed");
+ Assert.AreEqual(
+ "custom message" + Env.NewLine +
+ "The exception message text was incorrect" + Env.NewLine +
+ "Expected: not the message" + Env.NewLine +
+ " but was: the message",
+ result.Message);
+ }
+
+ [Test]
+ public void TestUnspecifiedExceptionNotThrown()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestDoesNotThrowUnspecifiedException" );
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.AreEqual("An Exception was expected", result.Message);
+ }
+
+ [Test]
+ public void TestUnspecifiedExceptionNotThrownWithUserMessage()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "TestDoesNotThrowUnspecifiedExceptionWithUserMessage");
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.AreEqual("custom message" + Env.NewLine + "An Exception was expected", result.Message);
+ }
+
+ [Test]
+ public void TestExceptionTypeNotThrown()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestDoesNotThrowExceptionType" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.AreEqual("System.ArgumentException was expected", result.Message);
+ }
+
+ [Test]
+ public void TestExceptionTypeNotThrownWithUserMessage()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestDoesNotThrowExceptionTypeWithUserMessage" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.AreEqual("custom message" + Env.NewLine + "System.ArgumentException was expected", result.Message);
+ }
+
+ [Test]
+ public void TestExceptionNameNotThrown()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestDoesNotThrowExceptionName" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.AreEqual("System.ArgumentException was expected", result.Message);
+ }
+
+ [Test]
+ public void TestExceptionNameNotThrownWithUserMessage()
+ {
+ Type fixtureType = typeof(TestDoesNotThrowExceptionFixture);
+ ITestResult result = TestBuilder.RunTestCase( fixtureType, "TestDoesNotThrowExceptionNameWithUserMessage" );
+ Assert.IsTrue(result.ResultState == ResultState.Failure, "Test method should have failed");
+ Assert.AreEqual("custom message" + Env.NewLine + "System.ArgumentException was expected", result.Message);
+ }
+
+ [Test]
+ public void MethodThrowsException()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( TestThrowsExceptionFixture ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Failure);
+ }
+
+ [Test]
+ public void MethodThrowsRightExceptionMessage()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( TestThrowsExceptionWithRightMessage ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Success);
+ }
+
+ [Test]
+ public void MethodThrowsArgumentOutOfRange()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( TestThrowsArgumentOutOfRangeException ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Success);
+ }
+
+ [Test]
+ public void MethodThrowsWrongExceptionMessage()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( TestThrowsExceptionWithWrongMessage ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Failure);
+ }
+
+ [Test]
+ public void SetUpThrowsSameException()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( SetUpExceptionTests ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Failure);
+ }
+
+ [Test]
+ public void TearDownThrowsSameException()
+ {
+ TestResult result = TestBuilder.RunTestFixture( typeof( TearDownExceptionTests ) );
+ Assert.AreEqual(true, result.ResultState == ResultState.Failure);
+ }
+
+ [Test]
+ public void AssertFailBeforeException()
+ {
+ TestResult suiteResult = TestBuilder.RunTestFixture( typeof (TestAssertsBeforeThrowingException) );
+ Assert.AreEqual( ResultState.Failure, suiteResult.ResultState );
+ TestResult result = (TestResult)suiteResult.Children[0];
+ Assert.AreEqual( "private message", result.Message );
+ }
+
+ internal class MyAppException : System.Exception
+ {
+ public MyAppException (string message) : base(message)
+ {}
+
+ public MyAppException(string message, Exception inner) :
+ base(message, inner)
+ {}
+
+#if !NETCF && !SILVERLIGHT
+ protected MyAppException(SerializationInfo info,
+ StreamingContext context) : base(info,context)
+ {}
+#endif
+ }
+
+ [Test]
+ [ExpectedException(typeof(MyAppException))]
+ public void ThrowingMyAppException()
+ {
+ throw new MyAppException("my app");
+ }
+
+ [Test]
+ [ExpectedException(typeof(MyAppException), ExpectedMessage="my app")]
+ public void ThrowingMyAppExceptionWithMessage()
+ {
+ throw new MyAppException("my app");
+ }
+
+ [Test]
+ [ExpectedException(typeof(NUnitException))]
+ public void ThrowNUnitException()
+ {
+ throw new NUnitException("Nunit exception");
+ }
+
+ [Test]
+ public void ExceptionHandlerIsCalledWhenExceptionMatches_AlternateHandler()
+ {
+ ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
+ TestBuilder.RunTestCase( fixture, "ThrowsArgumentException_AlternateHandler" );
+ Assert.IsFalse(fixture.HandlerCalled, "Base Handler should not be called" );
+ Assert.IsTrue(fixture.AlternateHandlerCalled, "Alternate Handler should be called" );
+ }
+
+ [Test]
+ public void ExceptionHandlerIsCalledWhenExceptionMatches()
+ {
+ ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
+ TestBuilder.RunTestCase( fixture, "ThrowsArgumentException" );
+ Assert.IsTrue(fixture.HandlerCalled, "Base Handler should be called");
+ Assert.IsFalse(fixture.AlternateHandlerCalled, "Alternate Handler should not be called");
+ }
+
+ [Test]
+ public void ExceptionHandlerIsNotCalledWhenExceptionDoesNotMatch()
+ {
+ ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
+ TestBuilder.RunTestCase( fixture, "ThrowsCustomException" );
+ Assert.IsFalse( fixture.HandlerCalled, "Base Handler should not be called" );
+ Assert.IsFalse( fixture.AlternateHandlerCalled, "Alternate Handler should not be called" );
+ }
+
+ [Test]
+ public void ExceptionHandlerIsNotCalledWhenExceptionDoesNotMatch_AlternateHandler()
+ {
+ ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
+ TestBuilder.RunTestCase(fixture, "ThrowsCustomException_AlternateHandler");
+ Assert.IsFalse(fixture.HandlerCalled, "Base Handler should not be called");
+ Assert.IsFalse(fixture.AlternateHandlerCalled, "Alternate Handler should not be called");
+ }
+
+ [Test]
+ public void TestIsNotRunnableWhenAlternateHandlerIsNotFound()
+ {
+ ExceptionHandlerCalledClass fixture = new ExceptionHandlerCalledClass();
+ Test test = TestBuilder.MakeTestCase( fixture, "MethodWithBadHandler" );
+ Assert.AreEqual( RunState.NotRunnable, test.RunState );
+ Assert.AreEqual(
+ "The specified exception handler DeliberatelyMissingHandler was not found",
+ test.Properties.Get(PropertyNames.SkipReason) );
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/FixtureSetUpTearDownTests.cs b/external/guiunit/src/tests/Attributes/FixtureSetUpTearDownTests.cs
new file mode 100755
index 0000000..972fa86
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/FixtureSetUpTearDownTests.cs
@@ -0,0 +1,336 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if !NETCF
+using System.Security.Principal;
+#endif
+using System.Threading;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Builders;
+using NUnit.TestData.FixtureSetUpTearDownData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class FixtureSetupTearDownTest
+ {
+ [Test]
+ public void MakeSureSetUpAndTearDownAreCalled()
+ {
+ SetUpAndTearDownFixture fixture = new SetUpAndTearDownFixture();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, fixture.setUpCount, "SetUp");
+ Assert.AreEqual(1, fixture.tearDownCount, "TearDown");
+ }
+
+ [Test]
+ public void MakeSureSetUpAndTearDownAreCalledOnExplicitFixture()
+ {
+ ExplicitSetUpAndTearDownFixture fixture = new ExplicitSetUpAndTearDownFixture();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, fixture.setUpCount, "SetUp");
+ Assert.AreEqual(1, fixture.tearDownCount, "TearDown");
+ }
+
+ [Test]
+ public void CheckInheritedSetUpAndTearDownAreCalled()
+ {
+ InheritSetUpAndTearDown fixture = new InheritSetUpAndTearDown();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, fixture.setUpCount);
+ Assert.AreEqual(1, fixture.tearDownCount);
+ }
+
+ [Test]
+ public static void StaticSetUpAndTearDownAreCalled()
+ {
+ StaticSetUpAndTearDownFixture.setUpCount = 0;
+ StaticSetUpAndTearDownFixture.tearDownCount = 0;
+ TestBuilder.RunTestFixture(typeof(StaticSetUpAndTearDownFixture));
+
+ Assert.AreEqual(1, StaticSetUpAndTearDownFixture.setUpCount);
+ Assert.AreEqual(1, StaticSetUpAndTearDownFixture.tearDownCount);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public static void StaticClassSetUpAndTearDownAreCalled()
+ {
+ StaticClassSetUpAndTearDownFixture.setUpCount = 0;
+ StaticClassSetUpAndTearDownFixture.tearDownCount = 0;
+
+ TestBuilder.RunTestFixture(typeof(StaticClassSetUpAndTearDownFixture));
+
+ Assert.AreEqual(1, StaticClassSetUpAndTearDownFixture.setUpCount);
+ Assert.AreEqual(1, StaticClassSetUpAndTearDownFixture.tearDownCount);
+ }
+#endif
+
+ [Test]
+ public void OverriddenSetUpAndTearDownAreNotCalled()
+ {
+ DefineInheritSetUpAndTearDown fixture = new DefineInheritSetUpAndTearDown();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(0, fixture.setUpCount);
+ Assert.AreEqual(0, fixture.tearDownCount);
+ Assert.AreEqual(1, fixture.derivedSetUpCount);
+ Assert.AreEqual(1, fixture.derivedTearDownCount);
+ }
+
+ [Test]
+ public void BaseSetUpCalledFirstAndTearDownCalledLast()
+ {
+ DerivedSetUpAndTearDownFixture fixture = new DerivedSetUpAndTearDownFixture();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, fixture.setUpCount);
+ Assert.AreEqual(1, fixture.tearDownCount);
+ Assert.AreEqual(1, fixture.derivedSetUpCount);
+ Assert.AreEqual(1, fixture.derivedTearDownCount);
+ Assert.That(fixture.baseSetUpCalledFirst, "Base SetUp called first");
+ Assert.That(fixture.baseTearDownCalledLast, "Base TearDown called last");
+ }
+
+ [Test]
+ public void StaticBaseSetUpCalledFirstAndTearDownCalledLast()
+ {
+ StaticSetUpAndTearDownFixture.setUpCount = 0;
+ StaticSetUpAndTearDownFixture.tearDownCount = 0;
+ DerivedStaticSetUpAndTearDownFixture.derivedSetUpCount = 0;
+ DerivedStaticSetUpAndTearDownFixture.derivedTearDownCount = 0;
+
+ DerivedStaticSetUpAndTearDownFixture fixture = new DerivedStaticSetUpAndTearDownFixture();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, DerivedStaticSetUpAndTearDownFixture.setUpCount);
+ Assert.AreEqual(1, DerivedStaticSetUpAndTearDownFixture.tearDownCount);
+ Assert.AreEqual(1, DerivedStaticSetUpAndTearDownFixture.derivedSetUpCount);
+ Assert.AreEqual(1, DerivedStaticSetUpAndTearDownFixture.derivedTearDownCount);
+ Assert.That(DerivedStaticSetUpAndTearDownFixture.baseSetUpCalledFirst, "Base SetUp called first");
+ Assert.That(DerivedStaticSetUpAndTearDownFixture.baseTearDownCalledLast, "Base TearDown called last");
+ }
+
+ [Test]
+ public void HandleErrorInFixtureSetup()
+ {
+ MisbehavingFixture fixture = new MisbehavingFixture();
+ fixture.blowUpInSetUp = true;
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual( 1, fixture.setUpCount, "setUpCount" );
+ Assert.AreEqual( 1, fixture.tearDownCount, "tearDownCOunt" );
+
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+ Assert.AreEqual("System.Exception : This was thrown from fixture setup", result.Message, "TestSuite Message");
+ Assert.IsNotNull(result.StackTrace, "TestSuite StackTrace should not be null");
+
+ Assert.AreEqual(0, result.Children.Count, "Result should have no children");
+ Assert.AreEqual(1, result.FailCount, "Failure count");
+ }
+
+ [Test]
+ public void RerunFixtureAfterSetUpFixed()
+ {
+ MisbehavingFixture fixture = new MisbehavingFixture();
+ fixture.blowUpInSetUp = true;
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+
+ //fix the blow up in setup
+ fixture.Reinitialize();
+ result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual( 1, fixture.setUpCount, "setUpCount" );
+ Assert.AreEqual( 1, fixture.tearDownCount, "tearDownCOunt" );
+
+ Assert.AreEqual(ResultState.Success, result.ResultState);
+ }
+
+ [Test]
+ public void HandleIgnoreInFixtureSetup()
+ {
+ IgnoreInFixtureSetUp fixture = new IgnoreInFixtureSetUp();
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ // should have one suite and one fixture
+ Assert.AreEqual(ResultState.Ignored, result.ResultState, "Suite should be ignored");
+ Assert.AreEqual("TestFixtureSetUp called Ignore", result.Message);
+ Assert.IsNotNull(result.StackTrace, "StackTrace should not be null");
+
+ Assert.AreEqual(0, result.Children.Count);
+ Assert.AreEqual(1, result.SkipCount);
+ }
+
+ [Test]
+ public void HandleErrorInFixtureTearDown()
+ {
+ MisbehavingFixture fixture = new MisbehavingFixture();
+ fixture.blowUpInTearDown = true;
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+ Assert.AreEqual(1, result.Children.Count);
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+
+ Assert.AreEqual( 1, fixture.setUpCount, "setUpCount" );
+ Assert.AreEqual( 1, fixture.tearDownCount, "tearDownCOunt" );
+
+ Assert.AreEqual("TearDown : System.Exception : This was thrown from fixture teardown", result.Message);
+ Assert.IsNotNull(result.StackTrace, "StackTrace should not be null");
+ }
+
+ [Test]
+ public void HandleExceptionInFixtureConstructor()
+ {
+ ITestResult result = TestBuilder.RunTestFixture( typeof( ExceptionInConstructor ) );
+
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+ Assert.AreEqual("System.Exception : This was thrown in constructor", result.Message, "TestSuite Message");
+ Assert.IsNotNull(result.StackTrace, "TestSuite StackTrace should not be null");
+
+ Assert.AreEqual(0, result.Children.Count, "Result should have no children");
+ Assert.AreEqual(1, result.FailCount, "Failure count");
+ }
+
+ [Test]
+ public void RerunFixtureAfterTearDownFixed()
+ {
+ MisbehavingFixture fixture = new MisbehavingFixture();
+ fixture.blowUpInTearDown = true;
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+ Assert.AreEqual(1, result.Children.Count);
+
+ fixture.Reinitialize();
+ result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual( 1, fixture.setUpCount, "setUpCount" );
+ Assert.AreEqual( 1, fixture.tearDownCount, "tearDownCOunt" );
+ }
+
+ [Test]
+ public void HandleSetUpAndTearDownWithTestInName()
+ {
+ SetUpAndTearDownWithTestInName fixture = new SetUpAndTearDownWithTestInName();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual(1, fixture.setUpCount);
+ Assert.AreEqual(1, fixture.tearDownCount);
+ }
+
+ //[Test]
+ //public void RunningSingleMethodCallsSetUpAndTearDown()
+ //{
+ // SetUpAndTearDownFixture fixture = new SetUpAndTearDownFixture();
+ // TestSuite suite = TestBuilder.MakeFixture(fixture.GetType());
+ // suite.Fixture = fixture;
+ // Test test = (Test)suite.Tests[0];
+
+ // suite.Run(TestListener.NULL, new NameFilter(test.TestName));
+
+ // Assert.AreEqual(1, fixture.setUpCount);
+ // Assert.AreEqual(1, fixture.tearDownCount);
+ //}
+
+ [Test]
+ public void IgnoredFixtureShouldNotCallFixtureSetUpOrTearDown()
+ {
+ IgnoredFixture fixture = new IgnoredFixture();
+ TestSuite suite = new TestSuite("IgnoredFixtureSuite");
+ TestSuite fixtureSuite = TestBuilder.MakeFixture( fixture.GetType() );
+ Test test = (Test)fixtureSuite.Tests[0];
+ suite.Add( fixtureSuite );
+
+ TestBuilder.RunTest(fixtureSuite, fixture);
+ Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running fixture" );
+ Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running fixture" );
+
+ TestBuilder.RunTest(suite, fixture);
+ Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running enclosing suite" );
+ Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running enclosing suite" );
+
+ TestBuilder.RunTest(test, fixture);
+ Assert.IsFalse( fixture.setupCalled, "TestFixtureSetUp called running a test case" );
+ Assert.IsFalse( fixture.teardownCalled, "TestFixtureTearDown called running a test case" );
+ }
+
+ [Test]
+ public void FixtureWithNoTestsShouldCallFixtureSetUpOrTearDown()
+ {
+ FixtureWithNoTests fixture = new FixtureWithNoTests();
+
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.That( fixture.setupCalled, Is.True, "SetUp should be called for a fixture with no tests" );
+ Assert.That( fixture.teardownCalled, Is.True, "TearDown should be called for a fixture with no tests" );
+ }
+
+ [Test]
+ public void DisposeCalledWhenFixtureImplementsIDisposable()
+ {
+ DisposableFixture fixture = new DisposableFixture();
+ TestBuilder.RunTestFixture(fixture);
+ Assert.IsTrue(fixture.disposeCalled);
+ }
+ }
+
+#if !SILVERLIGHT && !NETCF
+ [TestFixture]
+ class ChangesMadeInFixtureSetUp
+ {
+ [TestFixtureSetUp]
+ public void TestFixtureSetUp()
+ {
+ GenericIdentity identity = new GenericIdentity("foo");
+ Thread.CurrentPrincipal = new GenericPrincipal(identity, new string[0]);
+
+ System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-GB");
+ Thread.CurrentThread.CurrentCulture = culture;
+ Thread.CurrentThread.CurrentUICulture = culture;
+ }
+
+ [Test]
+ public void TestThatChangesPersistUsingSameThread()
+ {
+ Assert.AreEqual("foo", Thread.CurrentPrincipal.Identity.Name);
+ Assert.AreEqual("en-GB", Thread.CurrentThread.CurrentCulture.Name);
+ Assert.AreEqual("en-GB", Thread.CurrentThread.CurrentUICulture.Name);
+ }
+
+#if !NUNITLITE
+ [Test, RequiresThread]
+ public void TestThatChangesPersistUsingSeparateThread()
+ {
+ Assert.AreEqual("foo", Thread.CurrentPrincipal.Identity.Name);
+ Assert.AreEqual("en-GB", Thread.CurrentThread.CurrentCulture.Name);
+ Assert.AreEqual("en-GB", Thread.CurrentThread.CurrentUICulture.Name);
+ }
+#endif
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/Attributes/MaxTimeTests.cs b/external/guiunit/src/tests/Attributes/MaxTimeTests.cs
new file mode 100755
index 0000000..5af83bf
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/MaxTimeTests.cs
@@ -0,0 +1,86 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Tests
+{
+ /// <summary>
+ /// Tests for MaxTime decoration.
+ /// </summary>
+ [TestFixture]
+ public class MaxTimeTests
+ {
+ [Test,MaxTime(1000)]
+ public void MaxTimeNotExceeded()
+ {
+ }
+
+ // TODO: We need a way to simulate the clock reliably
+ [Test]
+ public void MaxTimeExceeded()
+ {
+ ITestResult suiteResult = TestBuilder.RunTestFixture(typeof(MaxTimeFixture));
+ Assert.AreEqual(ResultState.Failure, suiteResult.ResultState);
+ TestResult result = (TestResult)suiteResult.Children[0];
+ Assert.That(result.Message, Contains.Substring("exceeds maximum of 1ms"));
+ }
+
+ [Test, MaxTime(1000)]
+ [ExpectedException(typeof(AssertionException), ExpectedMessage = "Intentional Failure")]
+ public void FailureReport()
+ {
+ Assert.Fail("Intentional Failure");
+ }
+
+ [Test]
+ public void FailureReportHasPriorityOverMaxTime()
+ {
+ ITestResult result = TestBuilder.RunTestFixture(typeof(MaxTimeFixtureWithFailure));
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ result = (TestResult)result.Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.That(result.Message, Is.EqualTo("Intentional Failure"));
+ }
+
+ [Test, MaxTime(1000), ExpectedException]
+ public void ErrorReport()
+ {
+ throw new Exception();
+ }
+
+ [Test]
+ public void ErrorReportHasPriorityOverMaxTime()
+ {
+ ITestResult result = TestBuilder.RunTestFixture(typeof(MaxTimeFixtureWithError));
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ result = (ITestResult)result.Children[0];
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+ Assert.That(result.Message, Contains.Substring("Exception message"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/PairwiseTests.cs b/external/guiunit/src/tests/Attributes/PairwiseTests.cs
new file mode 100755
index 0000000..b2bffaf
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/PairwiseTests.cs
@@ -0,0 +1,145 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework;
+using NUnit.Framework.Builders;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class PairwiseTest
+ {
+ [TestFixture]
+ public class LiveTest
+ {
+ private PairCounter pairsTested = new PairCounter();
+
+ [TestFixtureSetUp]
+ public void TestFixtureSetUp()
+ {
+ pairsTested = new PairCounter();
+ }
+
+ [TestFixtureTearDown]
+ public void TestFixtureTearDown()
+ {
+ Assert.That(pairsTested.Count, Is.EqualTo(16));
+ }
+
+ [Test, Pairwise]
+ public void Test(
+ [Values("a", "b", "c")] string a,
+ [Values("+", "-")] string b,
+ [Values("x", "y")] string c)
+ {
+ Console.WriteLine("Pairwise: {0} {1} {2}", a, b, c);
+
+ pairsTested[a + b] = null;
+ pairsTested[a + c] = null;
+ pairsTested[b + c] = null;
+ }
+ }
+
+ // Test data is taken from various sources. See "Lessons Learned
+ // in Software Testing" pp 53-59, for example. For orthogonal cases, see
+ // http://www.freequality.org/sites/www_freequality_org/documents/tools/Tagarray_files/tamatrix.htm
+ static internal object[] cases = new object[]
+ {
+#if ORIGINAL
+ new TestCaseData( new int[] { 2, 4 }, 8, 8 ).SetName("Test 2x4"),
+ new TestCaseData( new int[] { 2, 2, 2 }, 5, 4 ).SetName("Test 2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2 }, 6, 6 ).SetName("Test 3x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2 }, 7, 6 ).SetName("Test 3x2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2, 2 }, 8, 6 ).SetName("Test 3x2x2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2, 2, 2 }, 9, 8 ).SetName("Test 3x2x2x2x2x2"),
+ new TestCaseData( new int[] { 3, 3, 3 }, 12, 9 ).SetName("Test 3x3x3"),
+ new TestCaseData( new int[] { 4, 4, 4 }, 22, 16 ).SetName("Test 4x4x4"),
+ new TestCaseData( new int[] { 5, 5, 5 }, 34, 25 ).SetName("Test 5x5x5")
+#else
+ new TestCaseData( new int[] { 2, 4 }, 8, 8 ).SetName("Test 2x4"),
+ new TestCaseData( new int[] { 2, 2, 2 }, 5, 4 ).SetName("Test 2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2 }, 7, 6 ).SetName("Test 3x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2 }, 8, 6 ).SetName("Test 3x2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2, 2 }, 9, 6 ).SetName("Test 3x2x2x2x2"),
+ new TestCaseData( new int[] { 3, 2, 2, 2, 2, 2 }, 9, 8 ).SetName("Test 3x2x2x2x2x2"),
+ new TestCaseData( new int[] { 3, 3, 3 }, 9, 9 ).SetName("Test 3x3x3"),
+ new TestCaseData( new int[] { 4, 4, 4 }, 17, 16 ).SetName("Test 4x4x4"),
+ new TestCaseData( new int[] { 5, 5, 5 }, 27, 25 ).SetName("Test 5x5x5")
+#endif
+ };
+
+ [Test, TestCaseSource("cases")]
+ public void Test(int[] dimensions, int bestSoFar, int targetCases)
+ {
+ int features = dimensions.Length;
+
+ string[][] sources = new string[features][];
+
+ for (int i = 0; i < features; i++)
+ {
+ string featureName = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".Substring(i, 1);
+
+ int n = dimensions[i];
+ sources[i] = new string[n];
+ for (int j = 0; j < n; j++)
+ sources[i][j] = featureName + j.ToString();
+ }
+
+ CombiningStrategy strategy = new PairwiseStrategy(sources);
+
+ PairCounter pairs = new PairCounter();
+ int cases = 0;
+ foreach (NUnit.Framework.Internal.ParameterSet parms in strategy.GetTestCases())
+ {
+ for (int i = 1; i < features; i++)
+ for (int j = 0; j < i; j++)
+ {
+ string a = parms.Arguments[i] as string;
+ string b = parms.Arguments[j] as string;
+ pairs[a + b] = null;
+ }
+
+ ++cases;
+ }
+
+ int expectedPairs = 0;
+ for (int i = 1; i < features; i++)
+ for (int j = 0; j < i; j++)
+ expectedPairs += dimensions[i] * dimensions[j];
+
+ Assert.That(pairs.Count, Is.EqualTo(expectedPairs), "Number of pairs is incorrect");
+ Assert.That(cases, Is.AtMost(bestSoFar), "Regression: Number of test cases exceeded target previously reached");
+#if DEBUG
+ //Assert.That(cases, Is.AtMost(targetCases), "Number of test cases exceeded target");
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ class PairCounter : System.Collections.Generic.Dictionary<string, object> {}
+#else
+ class PairCounter : Hashtable { }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/ParameterizedTestFixtureTests.cs b/external/guiunit/src/tests/Attributes/ParameterizedTestFixtureTests.cs
new file mode 100755
index 0000000..2d12864
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/ParameterizedTestFixtureTests.cs
@@ -0,0 +1,199 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture("hello", "hello", "goodbye")]
+ [TestFixture("zip", "zip")]
+ [TestFixture(42, 42, 99)]
+ public class ParameterizedTestFixture
+ {
+ private string eq1;
+ private string eq2;
+ private string neq;
+
+ public ParameterizedTestFixture(string eq1, string eq2, string neq)
+ {
+ this.eq1 = eq1;
+ this.eq2 = eq2;
+ this.neq = neq;
+ }
+
+ public ParameterizedTestFixture(string eq1, string eq2)
+ : this(eq1, eq2, null) { }
+
+ public ParameterizedTestFixture(int eq1, int eq2, int neq)
+ {
+ this.eq1 = eq1.ToString();
+ this.eq2 = eq2.ToString();
+ this.neq = neq.ToString();
+ }
+
+ [Test]
+ public void TestEquality()
+ {
+ Assert.AreEqual(eq1, eq2);
+ if (eq1 != null && eq2 != null)
+ Assert.AreEqual(eq1.GetHashCode(), eq2.GetHashCode());
+ }
+
+ [Test]
+ public void TestInequality()
+ {
+ Assert.AreNotEqual(eq1, neq);
+ if (eq1 != null && neq != null)
+ Assert.AreNotEqual(eq1.GetHashCode(), neq.GetHashCode());
+ }
+ }
+
+#if DYNAMIC_DATA
+ [TestFixture(42)]
+ public class ParameterizedTestFixtureWithDataSources
+ {
+ private int answer;
+
+ object[] myData = { new int[] { 6, 7 }, new int[] { 3, 14 } };
+
+ public ParameterizedTestFixtureWithDataSources(int val)
+ {
+ this.answer = val;
+ }
+
+ [Test, TestCaseSource("myData")]
+ public void CanAccessTestCaseSource(int x, int y)
+ {
+ Assert.That(x * y, Is.EqualTo(answer));
+ }
+
+ IEnumerable GenerateData()
+ {
+ for(int i = 1; i <= answer; i++)
+ if ( answer%i == 0 )
+ yield return new int[] { i, answer/i };
+ }
+
+ [Test, TestCaseSource("GenerateData")]
+ public void CanGenerateDataFromParameter(int x, int y)
+ {
+ Assert.That(x * y, Is.EqualTo(answer));
+ }
+
+ int[] intvals = new int[] { 1, 2, 3 };
+
+ [Test]
+ public void CanAccessValueSource(
+ [ValueSource("intvals")] int x)
+ {
+ Assert.That(answer % x == 0);
+ }
+ }
+#endif
+
+ public class ParameterizedTestFixtureNamingTests
+ {
+ TestSuite fixture;
+
+ [SetUp]
+ public void MakeFixture()
+ {
+ fixture = TestBuilder.MakeFixture(typeof(NUnit.TestData.ParameterizedTestFixture));
+ }
+
+ [Test]
+ public void TopLevelSuiteIsNamedCorrectly()
+ {
+ Assert.That(fixture.Name, Is.EqualTo("ParameterizedTestFixture"));
+ Assert.That(fixture.FullName, Is.EqualTo("NUnit.TestData.ParameterizedTestFixture"));
+ }
+
+ [Test]
+ public void SuiteHasCorrectNumberOfInstances()
+ {
+ Assert.That(fixture.Tests.Count, Is.EqualTo(2));
+ }
+
+ [Test]
+ public void FixtureInstancesAreNamedCorrectly()
+ {
+ string[] names = new string[fixture.Tests.Count];
+ string[] fullnames = new string[fixture.Tests.Count];
+ int index = 0;
+ foreach (Test test in fixture.Tests)
+ {
+ names[index] = test.Name;
+ fullnames[index] = test.FullName;
+ index++;
+ }
+
+ Assert.That(names, Is.EquivalentTo(new string[] {
+ "ParameterizedTestFixture(1)", "ParameterizedTestFixture(2)" }));
+ Assert.That(fullnames, Is.EquivalentTo(new string[] {
+ "NUnit.TestData.ParameterizedTestFixture(1)", "NUnit.TestData.ParameterizedTestFixture(2)" }));
+ }
+
+ [Test]
+ public void MethodWithoutParamsIsNamedCorrectly()
+ {
+ TestSuite instance = (TestSuite)fixture.Tests[0];
+ Test method = TestFinder.Find("MethodWithoutParams", instance, false);
+ Assert.That(method, Is.Not.Null );
+ Assert.That(method.FullName, Is.EqualTo(instance.FullName + ".MethodWithoutParams"));
+ }
+
+ [Test]
+ public void MethodWithParamsIsNamedCorrectly()
+ {
+ TestSuite instance = (TestSuite)fixture.Tests[0];
+ TestSuite method = (TestSuite)TestFinder.Find("MethodWithParams", instance, false);
+ Assert.That(method, Is.Not.Null);
+
+ Test testcase = (Test)method.Tests[0];
+ Assert.That(testcase.Name, Is.EqualTo("MethodWithParams(10,20)"));
+ Assert.That(testcase.FullName, Is.EqualTo(instance.FullName + ".MethodWithParams(10,20)"));
+ }
+ }
+
+ public class ParameterizedTestFixtureTests
+ {
+ [Test]
+ public void CanSpecifyCategory()
+ {
+ Test fixture = TestBuilder.MakeFixture(typeof(NUnit.TestData.TestFixtureWithSingleCategory));
+ Assert.AreEqual("XYZ", fixture.Properties.Get(PropertyNames.Category));
+ }
+
+ [Test]
+ public void CanSpecifyMultipleCategories()
+ {
+ Test fixture = TestBuilder.MakeFixture(typeof(NUnit.TestData.TestFixtureWithMultipleCategories));
+ Assert.AreEqual(new string[] { "X", "Y", "Z" }, fixture.Properties[PropertyNames.Category]);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/PropertyAttributeTests.cs b/external/guiunit/src/tests/Attributes/PropertyAttributeTests.cs
new file mode 100755
index 0000000..e8025df
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/PropertyAttributeTests.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+using NUnit.TestData.PropertyAttributeTests;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class PropertyAttributeTests
+ {
+ TestSuite fixture;
+
+ [SetUp]
+ public void CreateFixture()
+ {
+ fixture = TestBuilder.MakeFixture( typeof( FixtureWithProperties ) );
+ }
+
+ [Test]
+ public void PropertyWithStringValue()
+ {
+ Test test1 = (Test)fixture.Tests[0];
+ Assert.That( test1.Properties["user"].Contains("Charlie"));
+ }
+
+ [Test]
+ public void PropertiesWithNumericValues()
+ {
+ Test test2 = (Test)fixture.Tests[1];
+ Assert.AreEqual( 10.0, test2.Properties.Get("X") );
+ Assert.AreEqual( 17.0, test2.Properties.Get("Y") );
+ }
+
+ [Test]
+ public void PropertyWorksOnFixtures()
+ {
+ Assert.AreEqual( "SomeClass", fixture.Properties.Get("ClassUnderTest") );
+ }
+
+ [Test]
+ public void CanDeriveFromPropertyAttribute()
+ {
+ Test test3 = (Test)fixture.Tests[2];
+ Assert.AreEqual( 5, test3.Properties.Get("Priority") );
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/RepeatedTestTests.cs b/external/guiunit/src/tests/Attributes/RepeatedTestTests.cs
new file mode 100755
index 0000000..34e4e9f
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/RepeatedTestTests.cs
@@ -0,0 +1,115 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+#if false
+using System;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.RepeatedTestFixture;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class RepeatedTestTests
+ {
+ private MethodInfo successMethod;
+ private MethodInfo failOnFirstMethod;
+ private MethodInfo failOnThirdMethod;
+
+ [SetUp]
+ public void SetUp()
+ {
+ Type testType = typeof(RepeatSuccessFixture);
+ successMethod = testType.GetMethod ("RepeatSuccess");
+ testType = typeof(RepeatFailOnFirstFixture);
+ failOnFirstMethod = testType.GetMethod("RepeatFailOnFirst");
+ testType = typeof(RepeatFailOnThirdFixture);
+ failOnThirdMethod = testType.GetMethod("RepeatFailOnThird");
+ }
+
+ [Test]
+ public void RepeatSuccess()
+ {
+ Assert.IsNotNull (successMethod);
+ RepeatSuccessFixture fixture = new RepeatSuccessFixture();
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.IsTrue(result.ResultState == ResultState.Success);
+ Assert.AreEqual(1, fixture.FixtureSetupCount);
+ Assert.AreEqual(1, fixture.FixtureTeardownCount);
+ Assert.AreEqual(3, fixture.SetupCount);
+ Assert.AreEqual(3, fixture.TeardownCount);
+ Assert.AreEqual(3, fixture.Count);
+ }
+
+ [Test]
+ public void RepeatFailOnFirst()
+ {
+ Assert.IsNotNull (failOnFirstMethod);
+ RepeatFailOnFirstFixture fixture = new RepeatFailOnFirstFixture();
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.IsFalse(result.ResultState == ResultState.Success);
+ Assert.AreEqual(1, fixture.SetupCount);
+ Assert.AreEqual(1, fixture.TeardownCount);
+ Assert.AreEqual(1, fixture.Count);
+ }
+
+ [Test]
+ public void RepeatFailOnThird()
+ {
+ Assert.IsNotNull (failOnThirdMethod);
+ RepeatFailOnThirdFixture fixture = new RepeatFailOnThirdFixture();
+ ITestResult result = TestBuilder.RunTestFixture(fixture);
+
+ Assert.IsFalse(result.ResultState == ResultState.Success);
+ Assert.AreEqual(3, fixture.SetupCount);
+ Assert.AreEqual(3, fixture.TeardownCount);
+ Assert.AreEqual(3, fixture.Count);
+ }
+
+ [Test]
+ public void IgnoreWorksWithRepeatedTest()
+ {
+ RepeatedTestWithIgnore fixture = new RepeatedTestWithIgnore();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.AreEqual( 0, fixture.SetupCount );
+ Assert.AreEqual( 0, fixture.TeardownCount );
+ Assert.AreEqual( 0, fixture.Count );
+ }
+
+ [Test]
+ public void CategoryWorksWithRepeatedTest()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(typeof(RepeatedTestWithCategory));
+ Test test = suite.Tests[0] as Test;
+ System.Collections.IList categories = test.Properties["Category"];
+ Assert.IsNotNull(categories);
+ Assert.AreEqual(1, categories.Count);
+ Assert.AreEqual("SAMPLE", categories[0]);
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Attributes/SetCultureAttributeTests.cs b/external/guiunit/src/tests/Attributes/SetCultureAttributeTests.cs
new file mode 100755
index 0000000..84bd92c
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/SetCultureAttributeTests.cs
@@ -0,0 +1,129 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Threading;
+using System.Globalization;
+using NUnit.Framework;
+using NUnit.TestData.CultureAttributeData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class SetCultureAttributeTests
+ {
+ private CultureInfo originalCulture;
+ private CultureInfo originalUICulture;
+
+ [SetUp]
+ public void Setup()
+ {
+ originalCulture = CultureInfo.CurrentCulture;
+ originalUICulture = CultureInfo.CurrentUICulture;
+ }
+
+ [Test, SetUICulture("fr-FR")]
+ public void SetUICultureOnlyToFrench()
+ {
+ Assert.AreEqual(CultureInfo.CurrentCulture, originalCulture, "Culture should not change");
+ Assert.AreEqual("fr-FR", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetUICulture("fr-CA")]
+ public void SetUICultureOnlyToFrenchCanadian()
+ {
+ Assert.AreEqual(CultureInfo.CurrentCulture, originalCulture, "Culture should not change");
+ Assert.AreEqual("fr-CA", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetUICulture("ru-RU")]
+ public void SetUICultureOnlyToRussian()
+ {
+ Assert.AreEqual(CultureInfo.CurrentCulture, originalCulture, "Culture should not change");
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetCulture("fr-FR"), SetUICulture("fr-FR")]
+ public void SetBothCulturesToFrench()
+ {
+ Assert.AreEqual("fr-FR", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("fr-FR", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetCulture("fr-CA"), SetUICulture("fr-CA")]
+ public void SetBothCulturesToFrenchCanadian()
+ {
+ Assert.AreEqual("fr-CA", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("fr-CA", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetCulture("ru-RU"), SetUICulture("ru-RU")]
+ public void SetBothCulturesToRussian()
+ {
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetCulture("fr-FR"), SetUICulture("fr-CA")]
+ public void SetMixedCulturesToFrenchAndUIFrenchCanadian()
+ {
+ Assert.AreEqual("fr-FR", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("fr-CA", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetCulture("ru-RU"), SetUICulture("en-US")]
+ public void SetMixedCulturesToRussianAndUIEnglishUS()
+ {
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("en-US", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [TestFixture, SetCulture("ru-RU"), SetUICulture("ru-RU")]
+ public class NestedBehavior
+ {
+ [Test]
+ public void InheritedRussian()
+ {
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+
+ [Test, SetUICulture("fr-FR")]
+ public void InheritedRussianWithUIFrench()
+ {
+ Assert.AreEqual("ru-RU", CultureInfo.CurrentCulture.Name, "Culture not set correctly");
+ Assert.AreEqual("fr-FR", CultureInfo.CurrentUICulture.Name, "UICulture not set correctly");
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test, SetCulture("de-DE")]
+ [TestCase(ExpectedResult="01.06.2010 00:00:00")]
+ public string UseWithParameterizedTest()
+ {
+ return new DateTime(2010, 6, 1).ToString();
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TestCaseAttributeTests.cs b/external/guiunit/src/tests/Attributes/TestCaseAttributeTests.cs
new file mode 100755
index 0000000..0aa5c8a
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TestCaseAttributeTests.cs
@@ -0,0 +1,322 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.TestCaseAttributeFixture;
+using NUnit.TestUtilities;
+using System.Collections;
+
+namespace NUnit.Framework.Tests
+{
+ [TestFixture]
+ public class TestCaseAttributeTests
+ {
+ [TestCase(12, 3, 4)]
+ [TestCase(12, 2, 6)]
+ [TestCase(12, 4, 3)]
+ [TestCase(12, 0, 0, ExpectedException = typeof(System.DivideByZeroException))]
+ [TestCase(12, 0, 0, ExpectedExceptionName = "System.DivideByZeroException")]
+ public void IntegerDivisionWithResultPassedToTest(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ [TestCase(12, 3, ExpectedResult = 4)]
+ [TestCase(12, 2, ExpectedResult = 6)]
+ [TestCase(12, 4, ExpectedResult = 3)]
+ [TestCase(12, 0, ExpectedException = typeof(System.DivideByZeroException))]
+ [TestCase(12, 0, ExpectedExceptionName = "System.DivideByZeroException",
+ TestName = "DivisionByZeroThrowsException")]
+ public int IntegerDivisionWithResultCheckedByNUnit(int n, int d)
+ {
+ return n / d;
+ }
+
+ [TestCase(2, 2, ExpectedResult=4)]
+ public double CanConvertIntToDouble(double x, double y)
+ {
+ return x + y;
+ }
+
+ [TestCase("2.2", "3.3", ExpectedResult = 5.5)]
+ public decimal CanConvertStringToDecimal(decimal x, decimal y)
+ {
+ return x + y;
+ }
+
+ [TestCase(2.2, 3.3, ExpectedResult = 5.5)]
+ public decimal CanConvertDoubleToDecimal(decimal x, decimal y)
+ {
+ return x + y;
+ }
+
+ [TestCase(5, 2, ExpectedResult = 7)]
+ public decimal CanConvertIntToDecimal(decimal x, decimal y)
+ {
+ return x + y;
+ }
+
+ [TestCase(5, 2, ExpectedResult = 7)]
+ public short CanConvertSmallIntsToShort(short x, short y)
+ {
+ return (short)(x + y);
+ }
+
+ [TestCase(5, 2, ExpectedResult = 7)]
+ public byte CanConvertSmallIntsToByte(byte x, byte y)
+ {
+ return (byte)(x + y);
+ }
+
+ [TestCase(5, 2, ExpectedResult = 7)]
+ public sbyte CanConvertSmallIntsToSByte(sbyte x, sbyte y)
+ {
+ return (sbyte)(x + y);
+ }
+
+ [Test]
+ public void ConversionOverflowMakesTestNotRunnable()
+ {
+ Test test = (Test)TestBuilder.MakeParameterizedMethodSuite(
+ typeof(TestCaseAttributeFixture), "MethodCausesConversionOverflow").Tests[0];
+ Assert.AreEqual(RunState.NotRunnable, test.RunState);
+ }
+
+ [TestCase("12-October-1942")]
+ public void CanConvertStringToDateTime(DateTime dt)
+ {
+ Assert.AreEqual(1942, dt.Year);
+ }
+
+ [TestCase(42, ExpectedException = typeof(System.Exception),
+ ExpectedMessage = "Test Exception")]
+ public void CanSpecifyExceptionMessage(int a)
+ {
+ throw new System.Exception("Test Exception");
+ }
+
+ [TestCase(42, ExpectedException = typeof(System.Exception),
+ ExpectedMessage = "Test Exception",
+ MatchType=MessageMatch.StartsWith)]
+ public void CanSpecifyExceptionMessageAndMatchType(int a)
+ {
+ throw new System.Exception("Test Exception thrown here");
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestCase(null)]
+ public void CanPassNullAsFirstArgument(object a)
+ {
+ Assert.IsNull(a);
+ }
+#endif
+
+ [TestCase(new object[] { 1, "two", 3.0 })]
+ [TestCase(new object[] { "zip" })]
+ public void CanPassObjectArrayAsFirstArgument(object[] a)
+ {
+ }
+
+ [TestCase(new object[] { "a", "b" })]
+ public void CanPassArrayAsArgument(object[] array)
+ {
+ Assert.AreEqual("a", array[0]);
+ Assert.AreEqual("b", array[1]);
+ }
+
+ [TestCase("a", "b")]
+ public void ArgumentsAreCoalescedInObjectArray(object[] array)
+ {
+ Assert.AreEqual("a", array[0]);
+ Assert.AreEqual("b", array[1]);
+ }
+
+ [TestCase(1, "b")]
+ public void ArgumentsOfDifferentTypeAreCoalescedInObjectArray(object[] array)
+ {
+ Assert.AreEqual(1, array[0]);
+ Assert.AreEqual("b", array[1]);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestCase(ExpectedResult = null)]
+ public object ResultCanBeNull()
+ {
+ return null;
+ }
+#endif
+
+ [TestCase("a", "b")]
+ public void HandlesParamsArrayAsSoleArgument(params string[] array)
+ {
+ Assert.AreEqual("a", array[0]);
+ Assert.AreEqual("b", array[1]);
+ }
+
+ [TestCase("a")]
+ public void HandlesParamsArrayWithOneItemAsSoleArgument(params string[] array)
+ {
+ Assert.AreEqual("a", array[0]);
+ }
+
+ [TestCase("a", "b", "c", "d")]
+ public void HandlesParamsArrayAsLastArgument(string s1, string s2, params object[] array)
+ {
+ Assert.AreEqual("a", s1);
+ Assert.AreEqual("b", s2);
+ Assert.AreEqual("c", array[0]);
+ Assert.AreEqual("d", array[1]);
+ }
+
+ [TestCase("a", "b")]
+ public void HandlesParamsArrayWithNoItemsAsLastArgument(string s1, string s2, params object[] array)
+ {
+ Assert.AreEqual("a", s1);
+ Assert.AreEqual("b", s2);
+ Assert.AreEqual(0, array.Length);
+ }
+
+ [TestCase("a", "b", "c")]
+ public void HandlesParamsArrayWithOneItemAsLastArgument(string s1, string s2, params object[] array)
+ {
+ Assert.AreEqual("a", s1);
+ Assert.AreEqual("b", s2);
+ Assert.AreEqual("c", array[0]);
+ }
+
+ [Test]
+ public void CanSpecifyDescription()
+ {
+ Test test = (Test)TestBuilder.MakeParameterizedMethodSuite(
+ typeof(TestCaseAttributeFixture), "MethodHasDescriptionSpecified").Tests[0];
+ Assert.AreEqual("My Description", test.Properties.Get(PropertyNames.Description));
+ }
+
+ [Test]
+ public void CanSpecifyTestName()
+ {
+ Test test = (Test)TestBuilder.MakeParameterizedMethodSuite(
+ typeof(TestCaseAttributeFixture), "MethodHasTestNameSpecified").Tests[0];
+ Assert.AreEqual("XYZ", test.Name);
+ Assert.AreEqual("NUnit.TestData.TestCaseAttributeFixture.TestCaseAttributeFixture.XYZ", test.FullName);
+ }
+
+ [Test]
+ public void CanSpecifyCategory()
+ {
+ Test test = (Test)TestBuilder.MakeTestCase(
+ typeof(TestCaseAttributeFixture), "MethodHasSingleCategory").Tests[0];
+ IList categories = test.Properties["Category"];
+ Assert.AreEqual(new string[] { "XYZ" }, categories);
+ }
+
+ [Test]
+ public void CanSpecifyMultipleCategories()
+ {
+ Test test = (Test)TestBuilder.MakeTestCase(
+ typeof(TestCaseAttributeFixture), "MethodHasMultipleCategories").Tests[0];
+ IList categories = test.Properties["Category"];
+ Assert.AreEqual(new string[] { "X", "Y", "Z" }, categories);
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseAttributeFixture), "MethodThrowsExpectedException").Children[0];
+ Assert.AreEqual(ResultState.Success, result.ResultState);
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException_WrongException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseAttributeFixture), "MethodThrowsWrongException").Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.That(result.Message, Is.StringStarting("An unexpected exception type was thrown"));
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException_WrongMessage()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseAttributeFixture), "MethodThrowsExpectedExceptionWithWrongMessage").Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.That(result.Message, Is.StringStarting("The exception message text was incorrect"));
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException_NoneThrown()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseAttributeFixture), "MethodThrowsNoException").Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.AreEqual("System.ArgumentNullException was expected", result.Message);
+ }
+
+ [Test]
+ public void IgnoreTakesPrecedenceOverExpectedException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseAttributeFixture), "MethodCallsIgnore").Children[0];
+ Assert.AreEqual(ResultState.Ignored, result.ResultState);
+ Assert.AreEqual("Ignore this", result.Message);
+ }
+
+ [Test]
+ public void CanIgnoreIndividualTestCases()
+ {
+ TestSuite test = (TestSuite)TestBuilder.MakeTestCase(
+ typeof(TestCaseAttributeFixture), "MethodWithIgnoredTestCases");
+
+ Test testCase = TestFinder.Find("MethodWithIgnoredTestCases(1)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Runnable));
+
+ testCase = TestFinder.Find("MethodWithIgnoredTestCases(2)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Ignored));
+
+ testCase = TestFinder.Find("MethodWithIgnoredTestCases(3)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Ignored));
+ Assert.That(testCase.Properties.GetSetting(PropertyNames.SkipReason, ""), Is.EqualTo("Don't Run Me!"));
+ }
+
+ [Test]
+ public void CanMarkIndividualTestCasesExplicit()
+ {
+ TestSuite test = (TestSuite)TestBuilder.MakeTestCase(
+ typeof(TestCaseAttributeFixture), "MethodWithExplicitTestCases");
+
+ Test testCase = TestFinder.Find("MethodWithExplicitTestCases(1)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Runnable));
+
+ testCase = TestFinder.Find("MethodWithExplicitTestCases(2)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Explicit));
+
+ testCase = TestFinder.Find("MethodWithExplicitTestCases(3)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Explicit));
+ Assert.That(testCase.Properties.GetSetting(PropertyNames.SkipReason, ""), Is.EqualTo("Connection failing"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TestCaseSourceTests.cs b/external/guiunit/src/tests/Attributes/TestCaseSourceTests.cs
new file mode 100755
index 0000000..8402c03
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TestCaseSourceTests.cs
@@ -0,0 +1,354 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Collections;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData.TestCaseSourceAttributeFixture;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Tests
+{
+ [TestFixture]
+ public class TestCaseSourceTests
+ {
+ [Test, TestCaseSource("StaticProperty")]
+ public void SourceCanBeStaticProperty(string source)
+ {
+ Assert.AreEqual("StaticProperty", source);
+ }
+
+ internal static IEnumerable StaticProperty
+ {
+ get { return new object[] { new object[] { "StaticProperty" } }; }
+ }
+
+ [Test, TestCaseSource("InstanceProperty")]
+ public void SourceCanBeInstanceProperty(string source)
+ {
+ Assert.AreEqual("InstanceProperty", source);
+ }
+
+ internal IEnumerable InstanceProperty
+ {
+ get { return new object[] { new object[] { "InstanceProperty" } }; }
+ }
+
+ [Test, TestCaseSource("StaticMethod")]
+ public void SourceCanBeStaticMethod(string source)
+ {
+ Assert.AreEqual("StaticMethod", source);
+ }
+
+ internal static IEnumerable StaticMethod()
+ {
+ return new object[] { new object[] { "StaticMethod" } };
+ }
+
+ [Test, TestCaseSource("InstanceMethod")]
+ public void SourceCanBeInstanceMethod(string source)
+ {
+ Assert.AreEqual("InstanceMethod", source);
+ }
+
+ internal IEnumerable InstanceMethod()
+ {
+ return new object[] { new object[] { "InstanceMethod" } };
+ }
+
+ [Test, TestCaseSource("StaticField")]
+ public void SourceCanBeStaticField(string source)
+ {
+ Assert.AreEqual("StaticField", source);
+ }
+
+ internal static object[] StaticField =
+ { new object[] { "StaticField" } };
+
+ [Test, TestCaseSource("InstanceField")]
+ public void SourceCanBeInstanceField(string source)
+ {
+ Assert.AreEqual("InstanceField", source);
+ }
+
+ internal static object[] InstanceField =
+ { new object[] { "InstanceField" } };
+
+#if CLR_2_0 || CLR_4_0
+ [Test, TestCaseSource(typeof(DataSourceClass))]
+ public void SourceCanBeInstanceOfIEnumerable(string source)
+ {
+ Assert.AreEqual("DataSourceClass", source);
+ }
+
+ internal class DataSourceClass : IEnumerable
+ {
+ public IEnumerator GetEnumerator()
+ {
+ yield return "DataSourceClass";
+ }
+ }
+#endif
+
+ [Test, TestCaseSource("MyData")]
+ public void SourceMayReturnArgumentsAsObjectArray(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ [TestCaseSource("MyData")]
+ public void TestAttributeIsOptional(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ [Test, TestCaseSource("MyIntData")]
+ public void SourceMayReturnArgumentsAsIntArray(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ [Test, TestCaseSource("EvenNumbers")]
+ public void SourceMayReturnSinglePrimitiveArgumentAlone(int n)
+ {
+ Assert.AreEqual(0, n % 2);
+ }
+
+ [Test, TestCaseSource("Params")]
+ public int SourceMayReturnArgumentsAsParamSet(int n, int d)
+ {
+ return n / d;
+ }
+
+ [Test]
+ [TestCaseSource("MyData")]
+ [TestCaseSource("MoreData", Category="Extra")]
+ [TestCase(12, 0, 0, ExpectedException = typeof(System.DivideByZeroException))]
+ public void TestMayUseMultipleSourceAttributes(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ [Test, TestCaseSource("FourArgs")]
+ public void TestWithFourArguments(int n, int d, int q, int r)
+ {
+ Assert.AreEqual(q, n / d);
+ Assert.AreEqual(r, n % d);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test, TestCaseSource(typeof(DivideDataProvider), "HereIsTheData")]
+ //[Category("Top")]
+ public void SourceMayBeInAnotherClass(int n, int d, int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+#endif
+
+ [Test, TestCaseSource(typeof(DivideDataProviderWithReturnValue), "TestCases")]
+ public int SourceMayBeInAnotherClassWithReturn(int n, int d)
+ {
+ return n / d;
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodThrowsExpectedException").Children[0];
+ Assert.AreEqual(ResultState.Success, result.ResultState);
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException_WrongException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodThrowsWrongException").Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.That(result.Message, Is.StringStarting("An unexpected exception type was thrown"));
+ }
+
+ [Test]
+ public void CanSpecifyExpectedException_NoneThrown()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodThrowsNoException").Children[0];
+ Assert.AreEqual(ResultState.Failure, result.ResultState);
+ Assert.AreEqual("System.ArgumentNullException was expected", result.Message);
+ }
+
+ [Test]
+ public void IgnoreTakesPrecedenceOverExpectedException()
+ {
+ ITestResult result = (ITestResult)TestBuilder.RunTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodCallsIgnore").Children[0];
+ Assert.AreEqual(ResultState.Ignored, result.ResultState);
+ Assert.AreEqual("Ignore this", result.Message);
+ }
+
+ [Test]
+ public void CanIgnoreIndividualTestCases()
+ {
+ TestSuite test = (TestSuite)TestBuilder.MakeTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodWithIgnoredTestCases");
+
+ Test testCase = TestFinder.MustFind("MethodWithIgnoredTestCases(1)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Runnable));
+
+ testCase = TestFinder.MustFind("MethodWithIgnoredTestCases(2)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Ignored));
+
+ testCase = TestFinder.MustFind("MethodWithIgnoredTestCases(3)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Ignored));
+ Assert.That(testCase.Properties.GetSetting(PropertyNames.SkipReason, ""), Is.EqualTo("Don't Run Me!"));
+ }
+
+ [Test]
+ public void CanMarkIndividualTestCasesExplicit()
+ {
+ TestSuite test = (TestSuite)TestBuilder.MakeTestCase(
+ typeof(TestCaseSourceAttributeFixture), "MethodWithExplicitTestCases");
+
+ Test testCase = TestFinder.Find("MethodWithExplicitTestCases(1)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Runnable));
+
+ testCase = TestFinder.Find("MethodWithExplicitTestCases(2)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Explicit));
+
+ testCase = TestFinder.Find("MethodWithExplicitTestCases(3)", test, false);
+ Assert.That(testCase.RunState, Is.EqualTo(RunState.Explicit));
+ Assert.That(testCase.Properties.GetSetting(PropertyNames.SkipReason, ""), Is.EqualTo("Connection failing"));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void HandlesExceptionInTestCaseSource()
+ {
+ Test test = (Test)TestBuilder.MakeParameterizedMethodSuite(
+ typeof(TestCaseSourceAttributeFixture), "MethodWithSourceThrowingException").Tests[0];
+ Assert.AreEqual(RunState.NotRunnable, test.RunState);
+ ITestResult result = TestBuilder.RunTest(test, null);
+ Assert.AreEqual(ResultState.NotRunnable, result.ResultState);
+ Assert.AreEqual("System.Exception : my message", result.Message);
+ }
+#endif
+
+#if !NUNITLITE
+ [TestCaseSource("exception_source"), Explicit]
+ public void HandlesExceptioninTestCaseSource_GuiDisplay(string lhs, string rhs)
+ {
+ Assert.AreEqual(lhs, rhs);
+ }
+#endif
+
+ internal object[] testCases =
+ {
+ new TestCaseData(
+ new string[] { "A" },
+ new string[] { "B" })
+ };
+
+ [Test, TestCaseSource("testCases")]
+ public void MethodTakingTwoStringArrays(string[] a, string[] b)
+ {
+ Assert.That(a, Is.TypeOf(typeof(string[])));
+ Assert.That(b, Is.TypeOf(typeof(string[])));
+ }
+
+ #region Sources used by the tests
+ internal static object[] MyData = new object[] {
+ new object[] { 12, 3, 4 },
+ new object[] { 12, 4, 3 },
+ new object[] { 12, 6, 2 } };
+
+ internal static object[] MyIntData = new object[] {
+ new int[] { 12, 3, 4 },
+ new int[] { 12, 4, 3 },
+ new int[] { 12, 6, 2 } };
+
+ internal static object[] FourArgs = new object[] {
+ new TestCaseData( 12, 3, 4, 0 ),
+ new TestCaseData( 12, 4, 3, 0 ),
+ new TestCaseData( 12, 5, 2, 2 ) };
+
+ internal static int[] EvenNumbers = new int[] { 2, 4, 6, 8 };
+
+ internal static object[] MoreData = new object[] {
+ new object[] { 12, 1, 12 },
+ new object[] { 12, 2, 6 } };
+
+ internal static object[] Params = new object[] {
+ new TestCaseData(24, 3).Returns(8),
+ new TestCaseData(24, 2).Returns(12) };
+
+#if CLR_2_0 || CLR_4_0
+ public class DivideDataProvider
+ {
+ public static IEnumerable HereIsTheData
+ {
+ get
+ {
+ yield return new TestCaseData(0, 0, 0)
+ .SetName("ThisOneShouldThrow")
+ .SetDescription("Demonstrates use of ExpectedException")
+ .SetCategory("Junk")
+ .SetProperty("MyProp", "zip")
+ .Throws(typeof(System.DivideByZeroException));
+ yield return new object[] { 100, 20, 5 };
+ yield return new object[] { 100, 4, 25 };
+ }
+ }
+ }
+#endif
+
+ public class DivideDataProviderWithReturnValue
+ {
+ public static IEnumerable TestCases
+ {
+ get
+ {
+ return new object[] {
+ new TestCaseData(12, 3).Returns(5).Throws(typeof(AssertionException)).SetName("TC1"),
+ new TestCaseData(12, 2).Returns(6).SetName("TC2"),
+ new TestCaseData(12, 4).Returns(3).SetName("TC3")
+ };
+ }
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ internal static IEnumerable exception_source
+ {
+ get
+ {
+ yield return new TestCaseData("a", "a");
+ yield return new TestCaseData("b", "b");
+
+ throw new System.Exception("my message");
+ }
+ }
+#endif
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TestDummy.cs b/external/guiunit/src/tests/Attributes/TestDummy.cs
new file mode 100755
index 0000000..075bbb8
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TestDummy.cs
@@ -0,0 +1,78 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Attributes
+{
+ public class TestDummy : Test
+ {
+ public TestDummy() : base("TestDummy") { }
+
+ #region Overrides
+
+ public string TestKind
+ {
+ get { return "dummy-test"; }
+ }
+
+ public override bool HasChildren
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public override System.Collections.Generic.IList<ITest> Tests
+#else
+ public override System.Collections.IList Tests
+#endif
+ {
+ get
+ {
+ return new ITest[0];
+ }
+ }
+
+ public override XmlNode AddToXml(XmlNode parentNode, bool recursive)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override TestResult MakeTestResult()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override string XmlElementName
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TestFixtureAttributeTests.cs b/external/guiunit/src/tests/Attributes/TestFixtureAttributeTests.cs
new file mode 100755
index 0000000..be81aae
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TestFixtureAttributeTests.cs
@@ -0,0 +1,92 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Attributes
+{
+ public class TestFixtureAttributeTests
+ {
+ static object[] fixtureArgs = new object[] { 10, 20, "Charlie" };
+#if CLR_2_0 || CLR_4_0
+ static Type[] typeArgs = new Type[] { typeof(int), typeof(string) };
+ static object[] combinedArgs = new object[] { typeof(int), typeof(string), 10, 20, "Charlie" };
+#endif
+
+ [Test]
+ public void ConstructWithoutArguments()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute();
+ Assert.That(attr.Arguments.Length == 0);
+#if CLR_2_0 || CLR_4_0
+ Assert.That(attr.TypeArgs.Length == 0);
+#endif
+ }
+
+ [Test]
+ public void ConstructWithFixtureArgs()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute(fixtureArgs);
+ Assert.That(attr.Arguments, Is.EqualTo( fixtureArgs ) );
+#if CLR_2_0 || CLR_4_0
+ Assert.That(attr.TypeArgs.Length == 0 );
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void ConstructWithJustTypeArgs()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute(typeArgs);
+ Assert.That(attr.Arguments.Length == 0);
+ Assert.That(attr.TypeArgs, Is.EqualTo(typeArgs));
+ }
+
+ [Test]
+ public void ConstructWithNoArgumentsAndSetTypeArgs()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute();
+ attr.TypeArgs = typeArgs;
+ Assert.That(attr.Arguments.Length == 0);
+ Assert.That(attr.TypeArgs, Is.EqualTo(typeArgs));
+ }
+
+ [Test]
+ public void ConstructWithFixtureArgsAndSetTypeArgs()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute(fixtureArgs);
+ attr.TypeArgs = typeArgs;
+ Assert.That(attr.Arguments, Is.EqualTo(fixtureArgs));
+ Assert.That(attr.TypeArgs, Is.EqualTo(typeArgs));
+ }
+
+ [Test]
+ public void ConstructWithCombinedArgs()
+ {
+ TestFixtureAttribute attr = new TestFixtureAttribute(combinedArgs);
+ Assert.That(attr.Arguments, Is.EqualTo(fixtureArgs));
+ Assert.That(attr.TypeArgs, Is.EqualTo(typeArgs));
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TheoryTests.cs b/external/guiunit/src/tests/Attributes/TheoryTests.cs
new file mode 100755
index 0000000..30ad0e3
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TheoryTests.cs
@@ -0,0 +1,163 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+using NUnit.TestData.TheoryFixture;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Tests
+{
+ public class TheoryTests
+ {
+ static readonly Type fixtureType = typeof(TheoryFixture);
+
+ [Test]
+ public void TheoryWithNoArgumentsIsTreatedAsTest()
+ {
+ TestAssert.IsRunnable(fixtureType, "TheoryWithNoArguments", ResultState.Success);
+ }
+
+ [Test]
+ public void TheoryWithNoDatapointsIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable(fixtureType, "TheoryWithArgumentsButNoDatapoints");
+ }
+
+ [Test]
+ public void TheoryWithDatapointsIsRunnable()
+ {
+ Test test = TestBuilder.MakeTestCase(fixtureType, "TheoryWithArgumentsAndDatapoints");
+ TestAssert.IsRunnable(test);
+ Assert.That(test.TestCaseCount, Is.EqualTo(9));
+ }
+
+ [Test]
+ public void BooleanArgumentsAreSuppliedAutomatically()
+ {
+ Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithBooleanArguments");
+ TestAssert.IsRunnable(test);
+ Assert.That(test.TestCaseCount, Is.EqualTo(4));
+ }
+
+ [Datapoint]
+ internal object nullObj = null;
+
+ [Theory]
+ public void NullDatapointIsOK(object o)
+ {
+ Assert.Null(o);
+ Assert.Null(nullObj); // to avoid a warning
+ }
+
+
+ [Test]
+ public void EnumArgumentsAreSuppliedAutomatically()
+ {
+ Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithEnumAsArgument");
+ TestAssert.IsRunnable(test);
+#if CLR_2_0 || CLR_4_0
+ Assert.That(test.TestCaseCount, Is.EqualTo(16));
+#else
+ Assert.That(test.TestCaseCount, Is.EqualTo(15)); // No GenericParameter member
+#endif
+ Assert.That(test.TestCaseCount, Is.EqualTo(TypeHelper.GetEnumValues(typeof(AttributeTargets)).Length));
+ }
+
+ [Theory]
+ public void SquareRootWithAllGoodValues(
+ [Values(12.0, 4.0, 9.0)] double d)
+ {
+ SquareRootTest(d);
+ }
+
+ [Theory]
+ public void SquareRootWithOneBadValue(
+ [Values(12.0, -4.0, 9.0)] double d)
+ {
+ SquareRootTest(d);
+ }
+
+ [Datapoints]
+ internal string[] vals = new string[] { "xyz1", "xyz2", "xyz3" };
+
+ [Theory]
+ public void ArrayWithDatapointsAttributeIsUsed(string s)
+ {
+ Assert.That(s.StartsWith("xyz"));
+ }
+
+ private static void SquareRootTest(double d)
+ {
+ Assume.That(d > 0);
+ double root = Math.Sqrt(d);
+ Assert.That(root * root, Is.EqualTo(d).Within(0.000001));
+ Assert.That(root > 0);
+ }
+
+ [Test]
+ public void SimpleTestIgnoresDataPoints()
+ {
+ Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithArguments");
+ Assert.That(test.TestCaseCount, Is.EqualTo(2));
+ }
+
+ [Theory]
+ public void TheoryFailsIfAllTestsAreInconclusive()
+ {
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "TestWithAllBadValues");
+ Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure));
+ Assert.That(result.Message, Is.EqualTo("All test cases were inconclusive"));
+ }
+
+ public class SqrtTests
+ {
+ [Datapoint]
+ public double zero = 0;
+
+ [Datapoint]
+ public double positive = 1;
+
+ [Datapoint]
+ public double negative = -1;
+
+ [Datapoint]
+ public double max = double.MaxValue;
+
+ [Datapoint]
+ public double infinity = double.PositiveInfinity;
+
+ [Theory]
+ public void SqrtTimesItselfGivesOriginal(double num)
+ {
+ Assume.That(num >= 0.0 && num < double.MaxValue);
+
+ double sqrt = Math.Sqrt(num);
+
+ Assert.That(sqrt >= 0.0);
+ Assert.That(sqrt * sqrt, Is.EqualTo(num).Within(0.000001));
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/TimeoutTests.cs b/external/guiunit/src/tests/Attributes/TimeoutTests.cs
new file mode 100755
index 0000000..ce4b599
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/TimeoutTests.cs
@@ -0,0 +1,91 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+using System.Threading;
+using NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+using NUnit.TestData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Attributes
+{
+ public class TimeoutTests
+ {
+ Thread parentThread;
+ Thread setupThread;
+
+ [TestFixtureSetUp]
+ public void GetParentThreadInfo()
+ {
+ this.parentThread = Thread.CurrentThread;
+ }
+
+ [SetUp]
+ public void GetSetUpThreadInfo()
+ {
+ this.setupThread = Thread.CurrentThread;
+ }
+
+ [Test, Timeout(50)]
+ public void TestWithTimeoutRunsOnSeparateThread()
+ {
+ Assert.That(Thread.CurrentThread, Is.Not.EqualTo(parentThread));
+ }
+
+ [Test, Timeout(50)]
+ public void TestWithTimeoutRunsSetUpAndTestOnSameThread()
+ {
+ Assert.That(Thread.CurrentThread, Is.EqualTo(setupThread));
+ }
+
+ [Test]
+ [Platform(Exclude = "Mono", Reason = "Runner hangs at end when this is run")]
+ [Platform(Exclude = "Net-1.1,Net-1.0", Reason = "Cancels the run when executed")]
+ public void TestWithInfiniteLoopTimesOut()
+ {
+ TimeoutFixture fixture = new TimeoutFixture();
+ TestSuite suite = TestBuilder.MakeFixture(fixture);
+ Test test = TestFinder.Find("InfiniteLoopWith50msTimeout", suite, false);
+ ITestResult result = TestBuilder.RunTest(test, fixture);
+ Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure));
+ Assert.That(result.Message, Contains.Substring("50ms"));
+ Assert.That(fixture.TearDownWasRun, "TearDown was not run");
+ }
+
+ [Test]
+ [Platform(Exclude = "Mono", Reason = "Runner hangs at end when this is run")]
+ public void TimeoutCanBeSetOnTestFixture()
+ {
+ TestResult suiteResult = TestBuilder.RunTestFixture(typeof(ThreadingFixtureWithTimeout));
+ Assert.That(suiteResult.ResultState, Is.EqualTo(ResultState.Failure));
+ Assert.That(suiteResult.Message, Is.EqualTo("One or more child tests had errors"));
+ ITestResult result = TestFinder.Find("Test2WithInfiniteLoop", suiteResult, false);
+ Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure));
+ Assert.That(result.Message, Contains.Substring("50ms"));
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Attributes/ValueSourceTests.cs b/external/guiunit/src/tests/Attributes/ValueSourceTests.cs
new file mode 100755
index 0000000..0d5bd8d
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/ValueSourceTests.cs
@@ -0,0 +1,142 @@
+// ****************************************************************
+// Copyright 2009, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Attributes
+{
+ [TestFixture]
+ public class ValueSourceTests
+ {
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void ValueSourceCanBeStaticProperty(
+ [ValueSource("StaticProperty")] string source)
+ {
+ Assert.AreEqual("StaticProperty", source);
+ }
+
+ internal static IEnumerable StaticProperty
+ {
+ get
+ {
+ yield return "StaticProperty";
+ }
+ }
+#endif
+
+ [Test]
+ public void ValueSourceCanBeInstanceProperty(
+ [ValueSource("InstanceProperty")] string source)
+ {
+ Assert.AreEqual("InstanceProperty", source);
+ }
+
+ internal IEnumerable InstanceProperty
+ {
+ get { return new object[] { "InstanceProperty" }; }
+ }
+
+ [Test]
+ public void ValueSourceCanBeStaticMethod(
+ [ValueSource("StaticMethod")] string source)
+ {
+ Assert.AreEqual("StaticMethod", source);
+ }
+
+ internal static IEnumerable StaticMethod()
+ {
+ return new object[] { "StaticMethod" };
+ }
+
+ [Test]
+ public void ValueSourceCanBeInstanceMethod(
+ [ValueSource("InstanceMethod")] string source)
+ {
+ Assert.AreEqual("InstanceMethod", source);
+ }
+
+ internal IEnumerable InstanceMethod()
+ {
+ return new object[] { "InstanceMethod" };
+ }
+
+ [Test]
+ public void ValueSourceCanBeStaticField(
+ [ValueSource("StaticField")] string source)
+ {
+ Assert.AreEqual("StaticField", source);
+ }
+
+ internal static object[] StaticField = { "StaticField" };
+
+ [Test]
+ public void ValueSourceCanBeInstanceField(
+ [ValueSource("InstanceField")] string source)
+ {
+ Assert.AreEqual("InstanceField", source);
+ }
+
+ internal object[] InstanceField = { "InstanceField" };
+
+ [Test, Sequential]
+ public void MultipleArguments(
+ [ValueSource("Numerators")] int n,
+ [ValueSource("Denominators")] int d,
+ [ValueSource("Quotients")] int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ internal static int[] Numerators = new int[] { 12, 12, 12 };
+ internal static int[] Denominators = new int[] { 3, 4, 6 };
+ internal static int[] Quotients = new int[] { 4, 3, 2 };
+
+ [Test, Sequential]
+ public void ValueSourceMayBeInAnotherClass(
+ [ValueSource(typeof(DivideDataProvider), "Numerators")] int n,
+ [ValueSource(typeof(DivideDataProvider), "Denominators")] int d,
+ [ValueSource(typeof(DivideDataProvider), "Quotients")] int q)
+ {
+ Assert.AreEqual(q, n / d);
+ }
+
+ public class DivideDataProvider
+ {
+ internal static int[] Numerators = new int[] { 12, 12, 12 };
+ internal static int[] Denominators = new int[] { 3, 4, 6 };
+ internal static int[] Quotients = new int[] { 4, 3, 2 };
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void ValueSourceMayBeGeneric(
+ [ValueSourceAttribute(typeof(ValueProvider), "IntegerProvider")] int val)
+ {
+ Assert.That(2 * val, Is.EqualTo(val + val));
+ }
+
+ public class ValueProvider
+ {
+ public IEnumerable<int> IntegerProvider()
+ {
+ List<int> dataList = new List<int>();
+
+ dataList.Add(1);
+ dataList.Add(2);
+ dataList.Add(4);
+ dataList.Add(8);
+
+ return dataList;
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Attributes/ValuesAttributeTests.cs b/external/guiunit/src/tests/Attributes/ValuesAttributeTests.cs
new file mode 100755
index 0000000..57e3bcb
--- /dev/null
+++ b/external/guiunit/src/tests/Attributes/ValuesAttributeTests.cs
@@ -0,0 +1,157 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Attributes
+{
+ public class ValuesAttributeTests
+ {
+ [Test]
+ public void ValuesAttributeProvidesSpecifiedValues()
+ {
+ CheckValues("MethodWithValues", 1, 2, 3);
+ }
+
+ private void MethodWithValues( [Values(1, 2, 3)] int x) { }
+
+ [Test]
+ public void CanConvertSmallIntsToShort([Values(5)]short x)
+ {
+ }
+
+ [Test]
+ public void CanConvertSmallIntsToByte([Values(5)]byte x)
+ {
+ }
+
+ [Test]
+ public void CanConvertSmallIntsToSByte([Values(5)]sbyte x)
+ {
+ }
+
+ [Test]
+ public void CanConvertIntToDecimal([Values(12)]decimal x)
+ {
+ }
+
+ [Test]
+ public void CanConverDoubleToDecimal([Values(12.5)]decimal x)
+ {
+ }
+
+ [Test]
+ public void CanConvertStringToDecimal([Values("12.5")]decimal x)
+ {
+ }
+
+ [Test]
+ public void RangeAttributeWithIntRange()
+ {
+ CheckValues("MethodWithIntRange", 11, 12, 13, 14, 15);
+ }
+
+ private void MethodWithIntRange([Range(11, 15)] int x) { }
+
+ [Test]
+ public void RangeAttributeWithIntRangeAndStep()
+ {
+ CheckValues("MethodWithIntRangeAndStep", 11, 13, 15);
+ }
+
+ private void MethodWithIntRangeAndStep([Range(11, 15, 2)] int x) { }
+
+ [Test]
+ public void RangeAttributeWithLongRangeAndStep()
+ {
+ CheckValues("MethodWithLongRangeAndStep", 11L, 13L, 15L);
+ }
+
+ private void MethodWithLongRangeAndStep([Range(11L, 15L, 2)] long x) { }
+
+ [Test]
+ public void RangeAttributeWithDoubleRangeAndStep()
+ {
+ CheckValuesWithinTolerance("MethodWithDoubleRangeAndStep", 0.7, 0.9, 1.1);
+ }
+
+ private void MethodWithDoubleRangeAndStep([Range(0.7, 1.2, 0.2)] double x) { }
+
+ [Test]
+ public void RangeAttributeWithFloatRangeAndStep()
+ {
+ CheckValuesWithinTolerance("MethodWithFloatRangeAndStep", 0.7f, 0.9f, 1.1f);
+ }
+
+ private void MethodWithFloatRangeAndStep([Range(0.7f, 1.2f, 0.2f)] float x) { }
+
+ [Test]
+ public void CanConvertIntRangeToShort([Range(1, 3)] short x) { }
+
+ [Test]
+ public void CanConvertIntRangeToByte([Range(1, 3)] byte x) { }
+
+ [Test]
+ public void CanConvertIntRangeToSByte([Range(1, 3)] sbyte x) { }
+
+ [Test]
+ public void CanConvertIntRangeToDecimal([Range(1, 3)] decimal x) { }
+
+ [Test]
+ public void CanConvertDoubleRangeToDecimal([Range(1.0, 1.3, 0.1)] decimal x) { }
+
+ [Test]
+ public void CanConvertRandomIntToShort([Random(1, 10, 3)] short x) { }
+
+ [Test]
+ public void CanConvertRandomIntToByte([Random(1, 10, 3)] byte x) { }
+
+ [Test]
+ public void CanConvertRandomIntToSByte([Random(1, 10, 3)] sbyte x) { }
+
+ [Test]
+ public void CanConvertRandomIntToDecimal([Random(1, 10, 3)] decimal x) { }
+
+ [Test]
+ public void CanConvertRandomDoubleToDecimal([Random(1.0, 10.0, 3)] decimal x) { }
+
+ #region Helper Methods
+ private void CheckValues(string methodName, params object[] expected)
+ {
+ MethodInfo method = GetType().GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Instance);
+ ParameterInfo param = method.GetParameters()[0];
+ ValuesAttribute attr = param.GetCustomAttributes(typeof(ValuesAttribute), false)[0] as ValuesAttribute;
+ Assert.That(attr.GetData(param), Is.EqualTo(expected));
+ }
+
+ private void CheckValuesWithinTolerance(string methodName, params object[] expected)
+ {
+ MethodInfo method = GetType().GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Instance);
+ ParameterInfo param = method.GetParameters()[0];
+ ValuesAttribute attr = param.GetCustomAttributes(typeof(ValuesAttribute), false)[0] as ValuesAttribute;
+ Assert.That(attr.GetData(param), Is.EqualTo(expected).Within(0.000001));
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/AllItemsConstraintTests.cs b/external/guiunit/src/tests/Constraints/AllItemsConstraintTests.cs
new file mode 100755
index 0000000..d7c69d4
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AllItemsConstraintTests.cs
@@ -0,0 +1,109 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+#if CLR_2_0 || CLR_4_0
+using RangeConstraint = NUnit.Framework.Constraints.RangeConstraint<int>;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AllItemsConstraintTests : NUnit.Framework.Assertions.MessageChecker
+ {
+ [Test]
+ public void AllItemsAreNotNull()
+ {
+ object[] c = new object[] { 1, "hello", 3, Environment.OSVersion };
+ Assert.That(c, new AllItemsConstraint(Is.Not.Null));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void AllItemsAreNotNullFails()
+ {
+ object[] c = new object[] { 1, "hello", null, 3 };
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "all items not null" + NL +
+ TextMessageWriter.Pfx_Actual + "< 1, \"hello\", null, 3 >" + NL;
+ Assert.That(c, new AllItemsConstraint(new NotConstraint(new EqualConstraint(null))));
+ }
+
+ [Test]
+ public void AllItemsAreInRange()
+ {
+ int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 };
+ Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100)));
+ }
+
+ [Test]
+ public void AllItemsAreInRange_UsingIComparer()
+ {
+ int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 };
+ Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100).Using(new SimpleObjectComparer())));
+ }
+
+ [Test]
+ public void AllItemsAreInRange_UsingIComparerOfT()
+ {
+ int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 };
+ Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100).Using(new SimpleObjectComparer())));
+ }
+
+ [Test]
+ public void AllItemsAreInRange_UsingComparisonOfT()
+ {
+ int[] c = new int[] { 12, 27, 19, 32, 45, 99, 26 };
+ Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100).Using(new SimpleObjectComparer())));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void AllItemsAreInRangeFailureMessage()
+ {
+ int[] c = new int[] { 12, 27, 19, 32, 107, 99, 26 };
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "all items in range (10,100)" + NL +
+ TextMessageWriter.Pfx_Actual + "< 12, 27, 19, 32, 107, 99, 26 >" + NL;
+ Assert.That(c, new AllItemsConstraint(new RangeConstraint(10, 100)));
+ }
+
+ [Test]
+ public void AllItemsAreInstancesOfType()
+ {
+ object[] c = new object[] { 'a', 'b', 'c' };
+ Assert.That(c, new AllItemsConstraint(new InstanceOfTypeConstraint(typeof(char))));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void AllItemsAreInstancesOfTypeFailureMessage()
+ {
+ object[] c = new object[] { 'a', "b", 'c' };
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "all items instance of <System.Char>" + NL +
+ TextMessageWriter.Pfx_Actual + "< 'a', \"b\", 'c' >" + NL;
+ Assert.That(c, new AllItemsConstraint(new InstanceOfTypeConstraint(typeof(char))));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/AndConstraintTests.cs b/external/guiunit/src/tests/Constraints/AndConstraintTests.cs
new file mode 100755
index 0000000..9938b7c
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AndConstraintTests.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AndConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new AndConstraint(new GreaterThanConstraint(40), new LessThanConstraint(50));
+ expectedDescription = "greater than 40 and less than 50";
+ stringRepresentation = "<and <greaterthan 40> <lessthan 50>>";
+ }
+
+ internal object[] SuccessData = new object[] { 42 };
+
+ internal object[] FailureData = new object[] { new object[] { 37, "37" }, new object[] { 53, "53" } };
+
+ [Test]
+ public void CanCombineTestsWithAndOperator()
+ {
+ Assert.That(42, new GreaterThanConstraint(40) & new LessThanConstraint(50));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/AssignableFromConstraintTests.cs b/external/guiunit/src/tests/Constraints/AssignableFromConstraintTests.cs
new file mode 100755
index 0000000..8e207e3
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AssignableFromConstraintTests.cs
@@ -0,0 +1,48 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AssignableFromConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new AssignableFromConstraint(typeof(D1));
+ expectedDescription = string.Format("assignable from <{0}>", typeof(D1));
+ stringRepresentation = string.Format("<assignablefrom {0}>", typeof(D1));
+ }
+
+ internal object[] SuccessData = new object[] { new D1(), new B() };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( new D2(), "<NUnit.Framework.Constraints.Tests.AssignableFromConstraintTests+D2>" ) };
+
+ class B { }
+
+ class D1 : B { }
+
+ class D2 : D1 { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/AssignableToConstraintTests.cs b/external/guiunit/src/tests/Constraints/AssignableToConstraintTests.cs
new file mode 100755
index 0000000..e16a978
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AssignableToConstraintTests.cs
@@ -0,0 +1,48 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AssignableToConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new AssignableToConstraint(typeof(D1));
+ expectedDescription = string.Format("assignable to <{0}>", typeof(D1));
+ stringRepresentation = string.Format("<assignableto {0}>", typeof(D1));
+ }
+
+ internal object[] SuccessData = new object[] { new D1(), new D2() };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( new B(), "<NUnit.Framework.Constraints.Tests.AssignableToConstraintTests+B>" ) };
+
+ class B { }
+
+ class D1 : B { }
+
+ class D2 : D1 { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/AsyncDelayedConstraintTests.cs b/external/guiunit/src/tests/Constraints/AsyncDelayedConstraintTests.cs
new file mode 100755
index 0000000..fd2cc3d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AsyncDelayedConstraintTests.cs
@@ -0,0 +1,87 @@
+#if NET_4_5
+using System;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AsyncDelayedConstraintTests
+ {
+ [Test]
+ public void ConstraintSuccess()
+ {
+ Assert.IsTrue(new DelayedConstraint(new EqualConstraint(1), 100)
+ .Matches(async () => await One()));
+ }
+
+ [Test]
+ public void ConstraintFailure()
+ {
+ Assert.IsFalse(new DelayedConstraint(new EqualConstraint(2), 100)
+ .Matches(async () => await One()));
+ }
+
+ [Test]
+ public void ConstraintError()
+ {
+ Assert.Throws<InvalidOperationException>(() =>
+ new DelayedConstraint(new EqualConstraint(1), 100).Matches(async () => await Throw()));
+ }
+
+ [Test]
+ public void ConstraintVoidDelegateFailureAsDelegateIsNotCalled()
+ {
+ Assert.IsFalse(new DelayedConstraint(new EqualConstraint(1), 100)
+ .Matches(new TestDelegate(async () => { await One(); })));
+ }
+
+ [Test]
+ public void ConstraintVoidDelegateExceptionIsFailureAsDelegateIsNotCalled()
+ {
+ Assert.IsFalse(new DelayedConstraint(new EqualConstraint(1), 100)
+ .Matches(new TestDelegate(async () => { await Throw(); })));
+ }
+
+ [Test]
+ public void SyntaxSuccess()
+ {
+ Assert.That(async () => await One(), Is.EqualTo(1).After(100));
+ }
+
+
+ [Test]
+ public void SyntaxFailure()
+ {
+ Assert.Throws<AssertionException>(() =>
+ Assert.That(async () => await One(), Is.EqualTo(2).After(100)));
+ }
+
+ [Test]
+ public void SyntaxError()
+ {
+ Assert.Throws<InvalidOperationException>(() =>
+ Assert.That(async () => await Throw(), Is.EqualTo(1).After(100)));
+ }
+
+ [Test]
+ public void SyntaxVoidDelegateExceptionIsFailureAsCodeIsNotCalled()
+ {
+ Assert.Throws<AssertionException>(() =>
+ Assert.That(new TestDelegate(async () => await Throw()), Is.EqualTo(1).After(100)));
+ }
+
+ private static async Task<int> One()
+ {
+ return await Task.Run(() => 1);
+ }
+
+ private static async Task Throw()
+ {
+ await One();
+ throw new InvalidOperationException();
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/AttributeExistsConstraintTests.cs b/external/guiunit/src/tests/Constraints/AttributeExistsConstraintTests.cs
new file mode 100755
index 0000000..9d795cf
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/AttributeExistsConstraintTests.cs
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class AttributeExistsConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new AttributeExistsConstraint(typeof(TestFixtureAttribute));
+ expectedDescription = "type with attribute <NUnit.Framework.TestFixtureAttribute>";
+ stringRepresentation = "<attributeexists NUnit.Framework.TestFixtureAttribute>";
+ }
+
+ internal object[] SuccessData = new object[] { typeof(AttributeExistsConstraintTests) };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( typeof(D2), "<NUnit.Framework.Constraints.Tests.AttributeExistsConstraintTests+D2>" ) };
+
+ [Test, ExpectedException(typeof(System.ArgumentException))]
+ public void NonAttributeThrowsException()
+ {
+ new AttributeExistsConstraint(typeof(string));
+ }
+
+ [Test]
+ public void AttributeExistsOnMethodInfo()
+ {
+ Assert.That(
+ GetType().GetMethod("AttributeExistsOnMethodInfo"),
+ new AttributeExistsConstraint(typeof(TestAttribute)));
+ }
+
+ [Test, Description("my description")]
+ public void AttributeTestPropertyValueOnMethodInfo()
+ {
+ Assert.That(
+ GetType().GetMethod("AttributeTestPropertyValueOnMethodInfo"),
+ Has.Attribute(typeof(DescriptionAttribute)).Property("Properties").Property("Keys").Contains("Description"));
+ }
+
+ class B { }
+
+ class D1 : B { }
+
+ class D2 : D1 { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/BasicConstraintTests.cs b/external/guiunit/src/tests/Constraints/BasicConstraintTests.cs
new file mode 100755
index 0000000..57b535b
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/BasicConstraintTests.cs
@@ -0,0 +1,106 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class NullConstraintTest : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new NullConstraint();
+ stringRepresentation = "<null>";
+ expectedDescription = "null";
+ }
+
+ internal object[] SuccessData = new object[] { null };
+
+ internal object[] FailureData = new object[] { new object[] { "hello", "\"hello\"" } };
+ }
+
+ [TestFixture]
+ public class TrueConstraintTest : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new TrueConstraint();
+ stringRepresentation = "<true>";
+ expectedDescription = "True";
+ }
+
+ internal object[] SuccessData = new object[] { true, 2 + 2 == 4 };
+
+ internal object[] FailureData = new object[] {
+ new object[] { null, "null" },
+ new object[] { "hello", "\"hello\"" },
+ new object[] { false, "False" },
+ new object[] { 2 + 2 == 5, "False" } };
+ }
+
+ [TestFixture]
+ public class FalseConstraintTest : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new FalseConstraint();
+ stringRepresentation = "<false>";
+ expectedDescription = "False";
+ }
+
+ internal object[] SuccessData = new object[] { false, 2 + 2 == 5 };
+
+ internal object[] FailureData = new object[] {
+ new object[] { null, "null" },
+ new object[] { "hello", "\"hello\"" },
+ new object[] { true, "True" },
+ new object[] { 2 + 2 == 4, "True" } };
+ }
+
+ [TestFixture]
+ public class NaNConstraintTest : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new NaNConstraint();
+ stringRepresentation = "<nan>";
+ expectedDescription = "NaN";
+ }
+
+ internal object[] SuccessData = new object[] { double.NaN, float.NaN };
+
+ internal object[] FailureData = new object[] {
+ new object[] { null, "null" },
+ new object[] { "hello", "\"hello\"" },
+ new object[] { 42, "42" },
+ new object[] { double.PositiveInfinity, "Infinity" },
+ new object[] { double.NegativeInfinity, "-Infinity" },
+ new object[] { float.PositiveInfinity, "Infinity" },
+ new object[] { float.NegativeInfinity, "-Infinity" } };
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/BinarySerializableTest.cs b/external/guiunit/src/tests/Constraints/BinarySerializableTest.cs
new file mode 100755
index 0000000..1d2b97a
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/BinarySerializableTest.cs
@@ -0,0 +1,48 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF && !SILVERLIGHT
+using System;
+using System.Collections;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class BinarySerializableTest : ConstraintTestBaseWithArgumentException
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new BinarySerializableConstraint();
+ expectedDescription = "binary serializable";
+ stringRepresentation = "<binaryserializable>";
+ }
+
+ object[] SuccessData = new object[] { 1, "a", new ArrayList(), new InternalWithSerializableAttributeClass() };
+
+ object[] FailureData = new object[] { new TestCaseData( new InternalClass(), "<InternalClass>" ) };
+
+ object[] InvalidData = new object[] { null };
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/CollectionContainsConstraintTests.cs b/external/guiunit/src/tests/Constraints/CollectionContainsConstraintTests.cs
new file mode 100755
index 0000000..8654566
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/CollectionContainsConstraintTests.cs
@@ -0,0 +1,220 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class CollectionContainsConstraintTests
+ {
+ [Test]
+ public void CanTestContentsOfArray()
+ {
+ object item = "xyz";
+ object[] c = new object[] { 123, item, "abc" };
+ Assert.That(c, new CollectionContainsConstraint(item));
+ }
+
+#if !SILVERLIGHT
+ [Test]
+ public void CanTestContentsOfArrayList()
+ {
+ object item = "xyz";
+ ArrayList list = new ArrayList(new object[] { 123, item, "abc" });
+ Assert.That(list, new CollectionContainsConstraint(item));
+ }
+
+ [Test]
+ public void CanTestContentsOfSortedList()
+ {
+ object item = "xyz";
+ SortedList list = new SortedList();
+ list.Add("a", 123);
+ list.Add("b", item);
+ list.Add("c", "abc");
+ Assert.That(list.Values, new CollectionContainsConstraint(item));
+ Assert.That(list.Keys, new CollectionContainsConstraint("b"));
+ }
+#endif
+
+ [Test]
+ public void CanTestContentsOfCollectionNotImplementingIList()
+ {
+ SimpleObjectCollection ints = new SimpleObjectCollection(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+ Assert.That(ints, new CollectionContainsConstraint(9));
+ }
+
+ [Test]
+ public void IgnoreCaseIsHonored()
+ {
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("WORLD").IgnoreCase);
+ }
+ [Test]
+ public void UsesProvidedIComparer()
+ {
+ MyComparer comparer = new MyComparer();
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparer : IComparer
+ {
+ public bool Called;
+
+ public int Compare(object x, object y)
+ {
+ Called = true;
+ return 0;
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void UsesProvidedEqualityComparer()
+ {
+ MyEqualityComparer comparer = new MyEqualityComparer();
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyEqualityComparer : IEqualityComparer
+ {
+ public bool Called;
+
+ bool IEqualityComparer.Equals(object x, object y)
+ {
+ Called = true;
+ return x == y;
+ }
+
+ int IEqualityComparer.GetHashCode(object x)
+ {
+ return x.GetHashCode();
+ }
+ }
+
+ [Test]
+ public void UsesProvidedEqualityComparerOfT()
+ {
+ MyEqualityComparerOfT<string> comparer = new MyEqualityComparerOfT<string>();
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyEqualityComparerOfT<T> : IEqualityComparer<T>
+ {
+ public bool Called;
+
+ bool IEqualityComparer<T>.Equals(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y) == 0;
+ }
+
+ int IEqualityComparer<T>.GetHashCode(T x)
+ {
+ return x.GetHashCode();
+ }
+ }
+
+ [Test]
+ public void UsesProvidedComparerOfT()
+ {
+ MyComparer<string> comparer = new MyComparer<string>();
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparer<T> : IComparer<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+ [Test]
+ public void UsesProvidedComparisonOfT()
+ {
+ MyComparison<string> comparer = new MyComparison<string>();
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("World").Using(new Comparison<string>(comparer.Compare)));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparison<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+ [Test]
+ public void ContainsWithRecursiveStructure()
+ {
+ SelfRecursiveEnumerable item = new SelfRecursiveEnumerable();
+ SelfRecursiveEnumerable[] container = new SelfRecursiveEnumerable[] { new SelfRecursiveEnumerable(), item };
+
+ Assert.That(container, new CollectionContainsConstraint(item));
+ }
+
+ class SelfRecursiveEnumerable : IEnumerable
+ {
+ public IEnumerator GetEnumerator()
+ {
+ yield return this;
+ }
+ }
+
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedLambdaExpression()
+ {
+ Assert.That(new string[] { "Hello", "World" },
+ new CollectionContainsConstraint("WORLD").Using<string>((x, y) => StringUtil.Compare(x, y, true)));
+ }
+#endif
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/CollectionEquivalentConstraintTests.cs b/external/guiunit/src/tests/Constraints/CollectionEquivalentConstraintTests.cs
new file mode 100755
index 0000000..b12e051
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/CollectionEquivalentConstraintTests.cs
@@ -0,0 +1,169 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ public class CollectionEquivalentConstraintTests
+ {
+ [Test]
+ public void EqualCollectionsAreEquivalent()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "z");
+ ICollection set2 = new SimpleObjectCollection("x", "y", "z");
+
+ Assert.That(new CollectionEquivalentConstraint(set1).Matches(set2));
+ }
+
+ [Test]
+ public void WorksWithCollectionsOfArrays()
+ {
+ byte[] array1 = new byte[] { 0x20, 0x44, 0x56, 0x76, 0x1e, 0xff };
+ byte[] array2 = new byte[] { 0x42, 0x52, 0x72, 0xef };
+ byte[] array3 = new byte[] { 0x20, 0x44, 0x56, 0x76, 0x1e, 0xff };
+ byte[] array4 = new byte[] { 0x42, 0x52, 0x72, 0xef };
+
+ ICollection set1 = new SimpleObjectCollection(array1, array2);
+ ICollection set2 = new SimpleObjectCollection(array3, array4);
+
+ Constraint constraint = new CollectionEquivalentConstraint(set1);
+ Assert.That(constraint.Matches(set2));
+
+ set2 = new SimpleObjectCollection(array4, array3);
+ Assert.That(constraint.Matches(set2));
+ }
+
+ [Test]
+ public void EquivalentIgnoresOrder()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "z");
+ ICollection set2 = new SimpleObjectCollection("z", "y", "x");
+
+ Assert.That(new CollectionEquivalentConstraint(set1).Matches(set2));
+ }
+
+ [Test]
+ public void EquivalentFailsWithDuplicateElementInActual()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "z");
+ ICollection set2 = new SimpleObjectCollection("x", "y", "x");
+
+ Assert.False(new CollectionEquivalentConstraint(set1).Matches(set2));
+ }
+
+ [Test]
+ public void EquivalentFailsWithDuplicateElementInExpected()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "x");
+ ICollection set2 = new SimpleObjectCollection("x", "y", "z");
+
+ Assert.False(new CollectionEquivalentConstraint(set1).Matches(set2));
+ }
+
+ [Test]
+ public void EquivalentHandlesNull()
+ {
+ ICollection set1 = new SimpleObjectCollection(null, "x", null, "z");
+ ICollection set2 = new SimpleObjectCollection("z", null, "x", null);
+
+ Assert.That(new CollectionEquivalentConstraint(set1).Matches(set2));
+ }
+
+ [Test]
+ public void EquivalentHonorsIgnoreCase()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "z");
+ ICollection set2 = new SimpleObjectCollection("z", "Y", "X");
+
+ Assert.That(new CollectionEquivalentConstraint(set1).IgnoreCase.Matches(set2));
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF_2_0
+ [Test]
+ public void EquivalentHonorsUsing()
+ {
+ ICollection set1 = new SimpleObjectCollection("x", "y", "z");
+ ICollection set2 = new SimpleObjectCollection("z", "Y", "X");
+
+ Assert.That(new CollectionEquivalentConstraint(set1)
+ .Using<string>((x, y) => StringUtil.Compare(x, y, true))
+ .Matches(set2));
+ }
+#endif
+
+#if NET_3_5 || NET_4_0
+ [Test, Platform("Net-3.5,Mono-3.5,Net-4.0,Mono-4.0,Silverlight")]
+ public void WorksWithHashSets()
+ {
+ var hash1 = new HashSet<string>(new string[] { "presto", "abracadabra", "hocuspocus" });
+ var hash2 = new HashSet<string>(new string[] { "abracadabra", "presto", "hocuspocus" });
+
+ Assert.That(new CollectionEquivalentConstraint(hash1).Matches(hash2));
+ }
+
+ [Test, Platform("Net-3.5,Mono-3.5,Net-4.0,Mono-4.0,Silverlight")]
+ public void WorksWithHashSetAndArray()
+ {
+ var hash = new HashSet<string>(new string[] { "presto", "abracadabra", "hocuspocus" });
+ var array = new string[] { "abracadabra", "presto", "hocuspocus" };
+
+ var constraint = new CollectionEquivalentConstraint(hash);
+ Assert.That(constraint.Matches(array));
+ }
+
+ [Test, Platform("Net-3.5,Mono-3.5,Net-4.0,Mono-4.0,Silverlight")]
+ public void WorksWithArrayAndHashSet()
+ {
+ var hash = new HashSet<string>(new string[] { "presto", "abracadabra", "hocuspocus" });
+ var array = new string[] { "abracadabra", "presto", "hocuspocus" };
+
+ var constraint = new CollectionEquivalentConstraint(array);
+ Assert.That(constraint.Matches(hash));
+ }
+
+ [Test, Platform("Net-3.5,Mono-3.5,Net-4.0,Mono-4.0,Silverlight")]
+ public void FailureMessageWithHashSetAndArray()
+ {
+ var hash = new HashSet<string>(new string[] { "presto", "abracadabra", "hocuspocus" });
+ var array = new string[] { "abracadabra", "presto", "hocusfocus" };
+
+ var constraint = new CollectionEquivalentConstraint(hash);
+ Assert.False(constraint.Matches(array));
+
+ TextMessageWriter writer = new TextMessageWriter();
+ constraint.WriteMessageTo(writer);
+ Assert.That(writer.ToString(), Is.EqualTo(
+ " Expected: equivalent to < \"presto\", \"abracadabra\", \"hocuspocus\" >" + Environment.NewLine +
+ " But was: < \"abracadabra\", \"presto\", \"hocusfocus\" >" + Environment.NewLine));
+ Console.WriteLine(writer.ToString());
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/CollectionOrderedConstraintTests.cs b/external/guiunit/src/tests/Constraints/CollectionOrderedConstraintTests.cs
new file mode 100755
index 0000000..82325d9
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/CollectionOrderedConstraintTests.cs
@@ -0,0 +1,227 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class CollectionOrderedConstraintTests : NUnit.Framework.Assertions.MessageChecker
+ {
+ [Test]
+ public void IsOrdered()
+ {
+ ICollection collection = new SimpleObjectCollection("x", "y", "z");
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test]
+ public void IsOrderedDescending()
+ {
+ ICollection collection = new SimpleObjectCollection("z", "y", "x");
+ Assert.That(collection, Is.Ordered.Descending);
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void IsOrdered_Fails()
+ {
+ ICollection collection = new SimpleObjectCollection("x", "z", "y");
+ expectedMessage =
+ " Expected: collection ordered" + NL +
+ " But was: < \"x\", \"z\", \"y\" >" + NL;
+
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test]
+ public void IsOrdered_Allows_adjacent_equal_values()
+ {
+ ICollection collection = new SimpleObjectCollection("x", "x", "z");
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test, ExpectedException(typeof(ArgumentNullException),
+ ExpectedMessage = "index 1", MatchType = MessageMatch.Contains)]
+ public void IsOrdered_Handles_null()
+ {
+ ICollection collection = new SimpleObjectCollection("x", null, "z");
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void IsOrdered_TypesMustBeComparable()
+ {
+ ICollection collection = new SimpleObjectCollection(1, "x");
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void IsOrdered_AtLeastOneArgMustImplementIComparable()
+ {
+ ICollection collection = new SimpleObjectCollection(new object(), new object());
+ Assert.That(collection, Is.Ordered);
+ }
+
+ [Test]
+ public void IsOrdered_Handles_custom_comparison()
+ {
+ ICollection collection = new SimpleObjectCollection(new object(), new object());
+
+ AlwaysEqualComparer comparer = new AlwaysEqualComparer();
+ Assert.That(collection, Is.Ordered.Using(comparer));
+ Assert.That(comparer.Called, "TestComparer was not called");
+ }
+
+ [Test]
+ public void IsOrdered_Handles_custom_comparison2()
+ {
+ ICollection collection = new SimpleObjectCollection(2, 1);
+
+ TestComparer comparer = new TestComparer();
+ Assert.That(collection, Is.Ordered.Using(comparer));
+ Assert.That(comparer.Called, "TestComparer was not called");
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void UsesProvidedComparerOfT()
+ {
+ ICollection al = new SimpleObjectCollection(1, 2);
+
+ MyComparer<int> comparer = new MyComparer<int>();
+ Assert.That(al, Is.Ordered.Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparer<T> : IComparer<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+ [Test]
+ public void UsesProvidedComparisonOfT()
+ {
+ ICollection al = new SimpleObjectCollection(1, 2);
+
+ MyComparison<int> comparer = new MyComparison<int>();
+ Assert.That(al, Is.Ordered.Using(new Comparison<int>(comparer.Compare)));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparison<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedLambda()
+ {
+ ICollection al = new SimpleObjectCollection(1, 2);
+
+ Comparison<int> comparer = (x, y) => x.CompareTo(y);
+ Assert.That(al, Is.Ordered.Using(comparer));
+ }
+#endif
+#endif
+
+ [Test]
+ public void IsOrderedBy()
+ {
+ ICollection collection = new SimpleObjectCollection(
+ new OrderedByTestClass(1),
+ new OrderedByTestClass(2));
+
+ Assert.That(collection, Is.Ordered.By("Value"));
+ }
+
+ [Test]
+ public void IsOrderedBy_Comparer()
+ {
+ ICollection collection = new SimpleObjectCollection(
+ new OrderedByTestClass(1),
+ new OrderedByTestClass(2));
+
+ Assert.That(collection, Is.Ordered.By("Value").Using(new SimpleObjectComparer()));
+ }
+
+ [Test]
+ public void IsOrderedBy_Handles_heterogeneous_classes_as_long_as_the_property_is_of_same_type()
+ {
+ ICollection al = new SimpleObjectCollection(
+ new OrderedByTestClass(1),
+ new OrderedByTestClass2(2));
+
+ Assert.That(al, Is.Ordered.By("Value"));
+ }
+
+ public class OrderedByTestClass
+ {
+ private int myValue;
+
+ public int Value
+ {
+ get { return myValue; }
+ set { myValue = value; }
+ }
+
+ public OrderedByTestClass(int value)
+ {
+ Value = value;
+ }
+ }
+
+ public class OrderedByTestClass2
+ {
+ private int myValue;
+ public int Value
+ {
+ get { return myValue; }
+ set { myValue = value; }
+ }
+
+ public OrderedByTestClass2(int value)
+ {
+ Value = value;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/CollectionSubsetConstraintTests.cs b/external/guiunit/src/tests/Constraints/CollectionSubsetConstraintTests.cs
new file mode 100755
index 0000000..6e18f5d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/CollectionSubsetConstraintTests.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class CollectionSubsetConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new CollectionSubsetConstraint(new int[] { 1, 2, 3, 4, 5 });
+ stringRepresentation = "<subsetof System.Int32[]>";
+ expectedDescription = "subset of < 1, 2, 3, 4, 5 >";
+ }
+
+ internal object[] SuccessData = new object[] { new int[] { 1, 3, 5 }, new int[] { 1, 2, 3, 4, 5 } };
+ internal object[] FailureData = new object[] {
+ new object[] { new int[] { 1, 3, 7 }, "< 1, 3, 7 >" },
+ new object[] { new int[] { 1, 2, 2, 2, 5 }, "< 1, 2, 2, 2, 5 >" } };
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/ComparisonConstraintTest.cs b/external/guiunit/src/tests/Constraints/ComparisonConstraintTest.cs
new file mode 100755
index 0000000..c8ba195
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ComparisonConstraintTest.cs
@@ -0,0 +1,138 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ #region ComparisonConstraintTest
+
+ public abstract class ComparisonConstraintTest : ConstraintTestBaseWithArgumentException
+ {
+ protected ComparisonConstraint comparisonConstraint;
+
+ [Test]
+ public void UsesProvidedIComparer()
+ {
+ SimpleObjectComparer comparer = new SimpleObjectComparer();
+ comparisonConstraint.Using(comparer).Matches(0);
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void UsesProvidedComparerOfT()
+ {
+ MyComparer<int> comparer = new MyComparer<int>();
+ comparisonConstraint.Using(comparer).Matches(0);
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparer<T> : IComparer<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+ [Test]
+ public void UsesProvidedComparisonOfT()
+ {
+ MyComparison<int> comparer = new MyComparison<int>();
+ comparisonConstraint.Using(new Comparison<int>(comparer.Compare)).Matches(0);
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparison<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedLambda()
+ {
+ Comparison<int> comparer = (x, y) => x.CompareTo(y);
+ comparisonConstraint.Using(comparer).Matches(0);
+ }
+#endif
+#endif
+ }
+
+ #endregion
+
+ #region Comparison Test Classes
+
+ class ClassWithIComparable : IComparable
+ {
+ private int val;
+
+ public ClassWithIComparable(int val)
+ {
+ this.val = val;
+ }
+
+ public int CompareTo(object x)
+ {
+ ClassWithIComparable other = x as ClassWithIComparable;
+ if (x is ClassWithIComparable)
+ return val.CompareTo(other.val);
+
+ throw new ArgumentException();
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ class ClassWithIComparableOfT : IComparable<ClassWithIComparableOfT>
+ {
+ private int val;
+
+ public ClassWithIComparableOfT(int val)
+ {
+ this.val = val;
+ }
+
+ public int CompareTo(ClassWithIComparableOfT other)
+ {
+ return val.CompareTo(other.val);
+ }
+ }
+#endif
+
+ #endregion
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/ConstraintTestBase.cs b/external/guiunit/src/tests/Constraints/ConstraintTestBase.cs
new file mode 100755
index 0000000..44dce2a
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ConstraintTestBase.cs
@@ -0,0 +1,103 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ public abstract class ConstraintTestBaseNoData
+ {
+ protected Constraint theConstraint;
+ protected string expectedDescription = "<NOT SET>";
+ protected string stringRepresentation = "<NOT SET>";
+
+ [Test]
+ public void ProvidesProperDescription()
+ {
+ TextMessageWriter writer = new TextMessageWriter();
+ theConstraint.WriteDescriptionTo(writer);
+ Assert.That(writer.ToString(), Is.EqualTo(expectedDescription));
+ }
+
+ [Test]
+ public void ProvidesProperStringRepresentation()
+ {
+ Assert.That(theConstraint.ToString(), Is.EqualTo(stringRepresentation));
+ }
+ }
+
+ public abstract class ConstraintTestBase : ConstraintTestBaseNoData
+ {
+ [Test, TestCaseSource("SuccessData")]
+ public void SucceedsWithGoodValues(object value)
+ {
+ if (!theConstraint.Matches(value))
+ {
+ MessageWriter writer = new TextMessageWriter();
+ theConstraint.WriteMessageTo(writer);
+ Assert.Fail(writer.ToString());
+ }
+ }
+
+ [Test, TestCaseSource("FailureData")]
+ public void FailsWithBadValues(object badValue, string message)
+ {
+ string NL = Env.NewLine;
+
+ Assert.IsFalse(theConstraint.Matches(badValue));
+
+ TextMessageWriter writer = new TextMessageWriter();
+ theConstraint.WriteMessageTo(writer);
+ Assert.That( writer.ToString(), Is.EqualTo(
+ TextMessageWriter.Pfx_Expected + expectedDescription + NL +
+ TextMessageWriter.Pfx_Actual + message + NL ));
+ }
+ }
+
+ /// <summary>
+ /// Base class for testing constraints that can throw an ArgumentException
+ /// </summary>
+ public abstract class ConstraintTestBaseWithArgumentException : ConstraintTestBase
+ {
+ [Test, TestCaseSource("InvalidData")]
+ [ExpectedException(typeof(ArgumentException))]
+ public void InvalidDataThrowsArgumentException(object value)
+ {
+ theConstraint.Matches(value);
+ }
+ }
+
+ /// <summary>
+ /// Base class for tests that can throw multiple exceptions. Use
+ /// TestCaseData class to specify the expected exception type.
+ /// </summary>
+ public abstract class ConstraintTestBaseWithExceptionTests : ConstraintTestBase
+ {
+ [Test, TestCaseSource("InvalidData")]
+ public void InvalidDataThrowsException(object value)
+ {
+ theConstraint.Matches(value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/DelayedConstraintTest.cs b/external/guiunit/src/tests/Constraints/DelayedConstraintTest.cs
new file mode 100755
index 0000000..753879d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/DelayedConstraintTest.cs
@@ -0,0 +1,212 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF
+using System;
+using System.ComponentModel;
+using System.Threading;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate<object>;
+#else
+using ActualValueDelegate = NUnit.Framework.Constraints.ActualValueDelegate;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class DelayedConstraintTest : ConstraintTestBase
+ {
+ private static bool value;
+
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new DelayedConstraint(new EqualConstraint(true), 500);
+ expectedDescription = "True after 500 millisecond delay";
+ stringRepresentation = "<after 500 <equal True>>";
+
+ value = false;
+ //SetValueTrueAfterDelay(300);
+ }
+
+ object[] SuccessData = new object[] { true };
+ object[] FailureData = new object[] {
+ new TestCaseData( false, "False" ),
+ new TestCaseData( 0, "0" ),
+ new TestCaseData( null, "null" ) };
+
+ object[] InvalidData = new object[] { InvalidDelegate };
+
+ ActualValueDelegate[] SuccessDelegates = new ActualValueDelegate[] { DelegateReturningValue };
+ ActualValueDelegate[] FailureDelegates = new ActualValueDelegate[] { DelegateReturningFalse, DelegateReturningZero };
+
+ [Test, TestCaseSource("SuccessDelegates")]
+ public void SucceedsWithGoodDelegates(ActualValueDelegate del)
+ {
+ SetValueTrueAfterDelay(300);
+ Assert.That(theConstraint.Matches(del));
+ }
+
+ [Test, TestCaseSource("FailureDelegates")]
+ public void FailsWithBadDelegates(ActualValueDelegate del)
+ {
+ Assert.IsFalse(theConstraint.Matches(del));
+ }
+
+ [Test]
+ public void SimpleTest()
+ {
+ SetValueTrueAfterDelay(500);
+ Assert.That(DelegateReturningValue, new DelayedConstraint(new EqualConstraint(true), 5000, 200));
+ }
+
+ [Test]
+ public void SimpleTestUsingReference()
+ {
+ SetValueTrueAfterDelay(500);
+ Assert.That(ref value, new DelayedConstraint(new EqualConstraint(true), 5000, 200));
+ }
+
+ [Test]
+ public void ThatOverload_ZeroDelayIsAllowed()
+ {
+ Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), 0));
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void ThatOverload_DoesNotAcceptNegativeDelayValues()
+ {
+ Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), -1));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void SimpleTestBoolDelegate()
+ {
+ SetValueTrueAfterDelay(500);
+ Assert.That(DelegateReturningValue, new DelayedConstraint(new EqualConstraint(true), 5000, 200));
+ }
+
+ [Test]
+ public void ThatOverload_ZeroDelayIsAllowed_IntDelegate()
+ {
+ Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), 0));
+ }
+
+ [Test, ExpectedException(typeof(ArgumentException))]
+ public void ThatOverload_DoesNotAcceptNegativeDelayValues_IntDelegate()
+ {
+ Assert.That(DelegateReturningZero, new DelayedConstraint(new EqualConstraint(0), -1));
+ }
+
+ [Test]
+ public void CanTestContentsOfList()
+ {
+ BackgroundWorker worker = new BackgroundWorker();
+ List<int> list = new System.Collections.Generic.List<int>();
+ worker.RunWorkerCompleted += delegate { list.Add(1); };
+ worker.DoWork += delegate { Thread.Sleep(1); };
+ worker.RunWorkerAsync();
+ Assert.That(list, Has.Count.EqualTo(1).After(5000, 100));
+ }
+
+ [Test]
+ public void CanTestContentsOfRefList()
+ {
+ BackgroundWorker worker = new BackgroundWorker();
+ List<int> list = new List<int>();
+ worker.RunWorkerCompleted += delegate { list.Add(1); };
+ worker.DoWork += delegate { Thread.Sleep(1); };
+ worker.RunWorkerAsync();
+ Assert.That(ref list, Has.Count.EqualTo(1).After(5000, 100));
+ }
+
+ [Test]
+ public void CanTestContentsOfDelegateReturningList()
+ {
+ var worker = new BackgroundWorker();
+ var list = new List<int>();
+ worker.RunWorkerCompleted += delegate { list.Add(1); };
+ worker.DoWork += delegate { Thread.Sleep(1); };
+ worker.RunWorkerAsync();
+ Assert.That(() => list, Has.Count.EqualTo(1).After(5000, 100));
+ }
+
+ [Test]
+ public void CanTestInitiallyNullReference()
+ {
+ string statusString = null; // object starts off as null
+
+ BackgroundWorker worker = new BackgroundWorker();
+ worker.RunWorkerCompleted += delegate { statusString = "finished"; /* object non-null after work */ };
+ worker.DoWork += delegate { Thread.Sleep(TimeSpan.FromSeconds(1)); /* simulate work */ };
+ worker.RunWorkerAsync();
+
+ Assert.That(ref statusString, Has.Length.GreaterThan(0).After(3000, 100));
+ }
+
+ [Test]
+ public void CanTestInitiallyNullDelegate()
+ {
+ string statusString = null; // object starts off as null
+
+ BackgroundWorker worker = new BackgroundWorker();
+ worker.RunWorkerCompleted += delegate { statusString = "finished"; /* object non-null after work */ };
+ worker.DoWork += delegate { Thread.Sleep(TimeSpan.FromSeconds(1)); /* simulate work */ };
+ worker.RunWorkerAsync();
+
+ Assert.That(() => statusString, Has.Length.GreaterThan(0).After(3000, 100));
+ }
+#endif
+
+ private static int setValueTrueDelay;
+
+ private void SetValueTrueAfterDelay(int delay)
+ {
+ setValueTrueDelay = delay;
+ Thread thread = new Thread(SetValueTrueDelegate);
+ thread.Start();
+ }
+
+ private static void MethodReturningVoid() { }
+ private static TestDelegate InvalidDelegate = new TestDelegate(MethodReturningVoid);
+
+ private static object MethodReturningValue() { return value; }
+ private static ActualValueDelegate DelegateReturningValue = new ActualValueDelegate(MethodReturningValue);
+
+ private static object MethodReturningFalse() { return false; }
+ private static ActualValueDelegate DelegateReturningFalse = new ActualValueDelegate(MethodReturningFalse);
+
+ private static object MethodReturningZero() { return 0; }
+ private static ActualValueDelegate DelegateReturningZero = new ActualValueDelegate(MethodReturningZero);
+
+ private static void MethodSetsValueTrue()
+ {
+ Thread.Sleep(setValueTrueDelay);
+ value = true;
+ }
+ private ThreadStart SetValueTrueDelegate = new ThreadStart(MethodSetsValueTrue);
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Constraints/EmptyConstraintTest.cs b/external/guiunit/src/tests/Constraints/EmptyConstraintTest.cs
new file mode 100755
index 0000000..0ab94c3
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/EmptyConstraintTest.cs
@@ -0,0 +1,91 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class EmptyConstraintTest : ConstraintTestBaseWithArgumentException
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new EmptyConstraint();
+ expectedDescription = "<empty>";
+ stringRepresentation = "<empty>";
+ }
+
+ internal static object[] SuccessData = new object[]
+ {
+#if CLR_2_0 || CLR_4_0
+ new System.Collections.Generic.List<int>(),
+#endif
+ string.Empty,
+ new object[0],
+ new SimpleObjectCollection()
+ };
+
+ internal static object[] FailureData = new object[]
+ {
+ new TestCaseData( "Hello", "\"Hello\"" ),
+ new TestCaseData( new object[] { 1, 2, 3 }, "< 1, 2, 3 >" )
+ };
+
+ internal static object[] InvalidData = new object[]
+ {
+ null,
+ 5
+ };
+ }
+
+ [TestFixture]
+ public class NullOrEmptyStringConstraintTest : ConstraintTestBaseWithArgumentException
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new NullOrEmptyStringConstraint();
+ expectedDescription = "null or empty string";
+ stringRepresentation = "<nullorempty>";
+ }
+
+ internal static object[] SuccessData = new object[]
+ {
+ string.Empty,
+ null
+ };
+
+ internal static object[] FailureData = new object[]
+ {
+ new TestCaseData( "Hello", "\"Hello\"" )
+ };
+
+ internal static object[] InvalidData = new object[]
+ {
+ 5
+ };
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/EndsWithConstraintTests.cs b/external/guiunit/src/tests/Constraints/EndsWithConstraintTests.cs
new file mode 100755
index 0000000..1aca9eb
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/EndsWithConstraintTests.cs
@@ -0,0 +1,71 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class EndsWithConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new EndsWithConstraint("hello");
+ expectedDescription = "String ending with \"hello\"";
+ stringRepresentation = "<endswith \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "hello", "I said hello" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "hello there", "\"hello there\"" ),
+ new TestCaseData( "say hello to Fred", "\"say hello to Fred\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null , "null" ) };
+ }
+
+ [TestFixture]
+ public class EndsWithConstraintTestsIgnoringCase : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new EndsWithConstraint("hello").IgnoreCase;
+ expectedDescription = "String ending with \"hello\", ignoring case";
+ stringRepresentation = "<endswith \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "HELLO", "I said Hello" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "What the hell?", "\"What the hell?\"" ),
+ new TestCaseData( "hello there", "\"hello there\"" ),
+ new TestCaseData( "say hello to Fred", "\"say hello to Fred\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null , "null" ) };
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/EqualConstraintTests.cs b/external/guiunit/src/tests/Constraints/EqualConstraintTests.cs
new file mode 100755
index 0000000..7ab346c
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/EqualConstraintTests.cs
@@ -0,0 +1,459 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class EqualConstraintTest : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new EqualConstraint(4);
+ expectedDescription = "4";
+ stringRepresentation = "<equal 4>";
+ }
+
+ internal object[] SuccessData = new object[] { 4, 4.0f, 4.0d, 4.0000m };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( 5, "5" ),
+ new TestCaseData( null, "null" ),
+ new TestCaseData( "Hello", "\"Hello\"" ),
+ new TestCaseData( double.NaN, "NaN" ),
+ new TestCaseData( double.PositiveInfinity, "Infinity" ) };
+
+ [TestCase(double.NaN)]
+ [TestCase(double.PositiveInfinity)]
+ [TestCase(double.NegativeInfinity)]
+ [TestCase(float.NaN)]
+ [TestCase(float.PositiveInfinity)]
+ [TestCase(float.NegativeInfinity)]
+ public void CanMatchSpecialFloatingPointValues(object value)
+ {
+ Assert.That(value, new EqualConstraint(value));
+ }
+
+ [Test]
+ public void CanMatchDates()
+ {
+ DateTime expected = new DateTime(2007, 4, 1);
+ DateTime actual = new DateTime(2007, 4, 1);
+ Assert.That(actual, new EqualConstraint(expected));
+ }
+
+ [Test]
+ public void CanMatchDatesWithinTimeSpan()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 13, 1, 0);
+ TimeSpan tolerance = TimeSpan.FromMinutes(5.0);
+ Assert.That(actual, new EqualConstraint(expected).Within(tolerance));
+ }
+
+ [Test]
+ public void CanMatchDatesWithinDays()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 4, 13, 0, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(5).Days);
+ }
+
+ [Test]
+ public void CanMatchDatesWithinHours()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 16, 0, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(5).Hours);
+ }
+
+ [Test]
+ public void CanMatchDatesWithinMinutes()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 13, 1, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(5).Minutes);
+ }
+
+ [Test]
+ public void CanMatchTimeSpanWithinMinutes()
+ {
+ TimeSpan expected = new TimeSpan(10, 0, 0);
+ TimeSpan actual = new TimeSpan(10, 2, 30);
+ Assert.That(actual, new EqualConstraint(expected).Within(5).Minutes);
+ }
+
+ [Test]
+ public void CanMatchDatesWithinSeconds()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 13, 1, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(300).Seconds);
+ }
+
+ [Test]
+ public void CanMatchDatesWithinMilliseconds()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 13, 1, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(300000).Milliseconds);
+ }
+
+ [Test]
+ public void CanMatchDatesWithinTicks()
+ {
+ DateTime expected = new DateTime(2007, 4, 1, 13, 0, 0);
+ DateTime actual = new DateTime(2007, 4, 1, 13, 1, 0);
+ Assert.That(actual, new EqualConstraint(expected).Within(TimeSpan.TicksPerMinute * 5).Ticks);
+ }
+
+ #region Dictionary Tests
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF_2_0
+#if !SILVERLIGHT
+ // TODO: Move these to a separate fixture
+ [Test]
+ public void CanMatchHashtables_SameOrder()
+ {
+ Assert.AreEqual(new Hashtable { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Hashtable { { 0, 0 }, { 1, 1 }, { 2, 2 } });
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void CanMatchHashtables_Failure()
+ {
+ Assert.AreEqual(new Hashtable { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Hashtable { { 0, 0 }, { 1, 5 }, { 2, 2 } });
+ }
+
+ [Test]
+ public void CanMatchHashtables_DifferentOrder()
+ {
+ Assert.AreEqual(new Hashtable { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Hashtable { { 0, 0 }, { 2, 2 }, { 1, 1 } });
+ }
+#endif
+
+ [Test]
+ public void CanMatchDictionaries_SameOrder()
+ {
+ Assert.AreEqual(new Dictionary<int, int> { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Dictionary<int, int> { { 0, 0 }, { 1, 1 }, { 2, 2 } });
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void CanMatchDictionaries_Failure()
+ {
+ Assert.AreEqual(new Dictionary<int, int> { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Dictionary<int, int> { { 0, 0 }, { 1, 5 }, { 2, 2 } });
+ }
+
+ [Test]
+ public void CanMatchDictionaries_DifferentOrder()
+ {
+ Assert.AreEqual(new Dictionary<int, int> { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Dictionary<int, int> { { 0, 0 }, { 2, 2 }, { 1, 1 } });
+ }
+
+#if !SILVERLIGHT
+ [Test]
+ public void CanMatchHashtableWithDictionary()
+ {
+ Assert.AreEqual(new Hashtable { { 0, 0 }, { 1, 1 }, { 2, 2 } },
+ new Dictionary<int, int> { { 0, 0 }, { 2, 2 }, { 1, 1 } });
+ }
+#endif
+#endif
+
+ #endregion
+
+ [TestCase(20000000000000004.0)]
+ [TestCase(19999999999999996.0)]
+ public void CanMatchDoublesWithUlpTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(20000000000000000.0).Within(1).Ulps);
+ }
+
+ [ExpectedException(typeof(AssertionException), ExpectedMessage = "+/- 1 Ulps", MatchType = MessageMatch.Contains)]
+ [TestCase(20000000000000008.0)]
+ [TestCase(19999999999999992.0)]
+ public void FailsOnDoublesOutsideOfUlpTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(20000000000000000.0).Within(1).Ulps);
+ }
+
+ [TestCase(19999998.0f)]
+ [TestCase(20000002.0f)]
+ public void CanMatchSinglesWithUlpTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(20000000.0f).Within(1).Ulps);
+ }
+
+ [ExpectedException(typeof(AssertionException), ExpectedMessage = "+/- 1 Ulps", MatchType = MessageMatch.Contains)]
+ [TestCase(19999996.0f)]
+ [TestCase(20000004.0f)]
+ public void FailsOnSinglesOutsideOfUlpTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(20000000.0f).Within(1).Ulps);
+ }
+
+ [TestCase(9500.0)]
+ [TestCase(10000.0)]
+ [TestCase(10500.0)]
+ public void CanMatchDoublesWithRelativeTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(10000.0).Within(10.0).Percent);
+ }
+
+ [ExpectedException(typeof(AssertionException), ExpectedMessage = "+/- 10.0d Percent", MatchType = MessageMatch.Contains)]
+ [TestCase(8500.0)]
+ [TestCase(11500.0)]
+ public void FailsOnDoublesOutsideOfRelativeTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(10000.0).Within(10.0).Percent);
+ }
+
+ [TestCase(9500.0f)]
+ [TestCase(10000.0f)]
+ [TestCase(10500.0f)]
+ public void CanMatchSinglesWithRelativeTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(10000.0f).Within(10.0f).Percent);
+ }
+
+ [ExpectedException(typeof(AssertionException), ExpectedMessage = "+/- 10.0f Percent", MatchType = MessageMatch.Contains)]
+ [TestCase(8500.0f)]
+ [TestCase(11500.0f)]
+ public void FailsOnSinglesOutsideOfRelativeTolerance(object value)
+ {
+ Assert.That(value, new EqualConstraint(10000.0f).Within(10.0f).Percent);
+ }
+
+ /// <summary>Applies both the Percent and Ulps modifiers to cause an exception</summary>
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorWithPercentAndUlpsToleranceModes()
+ {
+ EqualConstraint shouldFail = new EqualConstraint(100.0f).Within(10.0f).Percent.Ulps;
+ }
+
+ /// <summary>Applies both the Ulps and Percent modifiers to cause an exception</summary>
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorWithUlpsAndPercentToleranceModes()
+ {
+ EqualConstraint shouldFail = new EqualConstraint(100.0f).Within(10.0f).Ulps.Percent;
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfPercentPrecedesWithin()
+ {
+ Assert.That(1010, Is.EqualTo(1000).Percent.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfUlpsPrecedesWithin()
+ {
+ Assert.That(1010.0, Is.EqualTo(1000.0).Ulps.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfDaysPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Days.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfHoursPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Hours.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfMinutesPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Minutes.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfSecondsPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Seconds.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfMillisecondsPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Milliseconds.Within(5));
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfTicksPrecedesWithin()
+ {
+ Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now).Ticks.Within(5));
+ }
+
+ [ExpectedException(typeof(InvalidOperationException))]
+ [TestCase(1000, 1010)]
+ [TestCase(1000U, 1010U)]
+ [TestCase(1000L, 1010L)]
+ [TestCase(1000UL, 1010UL)]
+ public void ErrorIfUlpsIsUsedOnIntegralType(object x, object y)
+ {
+ Assert.That(y, Is.EqualTo(x).Within(2).Ulps);
+ }
+
+ [Test, ExpectedException(typeof(InvalidOperationException))]
+ public void ErrorIfUlpsIsUsedOnDecimal()
+ {
+ Assert.That(100m, Is.EqualTo(100m).Within(2).Ulps);
+ }
+
+ [Test]
+ public void UsesProvidedIComparer()
+ {
+ SimpleObjectComparer comparer = new SimpleObjectComparer();
+ Assert.That(2 + 2, Is.EqualTo(4).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void UsesProvidedEqualityComparer()
+ {
+ SimpleEqualityComparer comparer = new SimpleEqualityComparer();
+ Assert.That(2 + 2, Is.EqualTo(4).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ [Test]
+ public void UsesProvidedEqualityComparerOfT()
+ {
+ SimpleEqualityComparer<int> comparer = new SimpleEqualityComparer<int>();
+ Assert.That(2 + 2, Is.EqualTo(4).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ [Test]
+ public void UsesProvidedComparerOfT()
+ {
+ SimpleEqualityComparer<int> comparer = new SimpleEqualityComparer<int>();
+ Assert.That(2 + 2, Is.EqualTo(4).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ [Test]
+ public void UsesProvidedComparisonOfT()
+ {
+ MyComparison<int> comparer = new MyComparison<int>();
+ Assert.That(2 + 2, Is.EqualTo(4).Using(new Comparison<int>(comparer.Compare)));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparison<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedLambda_IntArgs()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4).Using<int>((x, y) => x.CompareTo(y)));
+ }
+
+ [Test]
+ public void UsesProvidedLambda_StringArgs()
+ {
+ Assert.That("hello", Is.EqualTo("HELLO").Using<string>((x, y) => StringUtil.Compare(x, y, true)));
+ }
+
+ [Test]
+ public void UsesProvidedListComparer()
+ {
+ var list1 = new List<int>() { 2, 3 };
+ var list2 = new List<int>() { 3, 4 };
+
+ var list11 = new List<List<int>>() { list1 };
+ var list22 = new List<List<int>>() { list2 };
+ var comparer = new IntListEqualComparer();
+
+ Assert.That(list11, new CollectionEquivalentConstraint(list22).Using(comparer));
+ }
+#endif
+
+ public class IntListEqualComparer : IEqualityComparer<List<int>>
+ {
+ public bool Equals(List<int> x, List<int> y)
+ {
+ return x.Count == y.Count;
+ }
+
+ public int GetHashCode(List<int> obj)
+ {
+ return obj.Count.GetHashCode();
+ }
+ }
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedArrayComparer()
+ {
+ var array1 = new int[] { 2, 3 };
+ var array2 = new int[] { 3, 4 };
+
+ var list11 = new List<int[]>() { array1 };
+ var list22 = new List<int[]>() { array2 };
+ var comparer = new IntArrayEqualComparer();
+
+ Assert.That(list11, new CollectionEquivalentConstraint(list22).Using(comparer));
+ }
+
+ public class IntArrayEqualComparer : IEqualityComparer<int[]>
+ {
+ public bool Equals(int[] x, int[] y)
+ {
+ return x.Length == y.Length;
+ }
+
+ public int GetHashCode(int[] obj)
+ {
+ return obj.Length.GetHashCode();
+ }
+ }
+#endif
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/ExactCountConstraintTests.cs b/external/guiunit/src/tests/Constraints/ExactCountConstraintTests.cs
new file mode 100755
index 0000000..685e77d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ExactCountConstraintTests.cs
@@ -0,0 +1,83 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Assertions;
+using NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ public class ExactCountConstraintTests : MessageChecker
+ {
+ private static readonly string[] names = new string[] { "Charlie", "Fred", "Joe", "Charlie" };
+
+ [Test]
+ public void ZeroItemsMatch()
+ {
+ Assert.That(names, new ExactCountConstraint(0, Is.EqualTo("Sam")));
+ Assert.That(names, Has.Exactly(0).EqualTo("Sam"));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ZeroItemsMatchFails()
+ {
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "no item \"Charlie\"" + Env.NewLine +
+ TextMessageWriter.Pfx_Actual + "< \"Charlie\", \"Fred\", \"Joe\", \"Charlie\" >" + Env.NewLine;
+ Assert.That(names, new ExactCountConstraint(0, Is.EqualTo("Charlie")));
+ }
+
+ [Test]
+ public void ExactlyOneItemMatches()
+ {
+ Assert.That(names, new ExactCountConstraint(1, Is.EqualTo("Fred")));
+ Assert.That(names, Has.Exactly(1).EqualTo("Fred"));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ExactlyOneItemMatchFails()
+ {
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "exactly one item \"Charlie\"" + Env.NewLine +
+ TextMessageWriter.Pfx_Actual + "< \"Charlie\", \"Fred\", \"Joe\", \"Charlie\" >" + Env.NewLine;
+ Assert.That(names, new ExactCountConstraint(1, Is.EqualTo("Charlie")));
+ }
+
+ [Test]
+ public void ExactlyTwoItemsMatch()
+ {
+ Assert.That(names, new ExactCountConstraint(2, Is.EqualTo("Charlie")));
+ Assert.That(names, Has.Exactly(2).EqualTo("Charlie"));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void ExactlyTwoItemsMatchFails()
+ {
+ expectedMessage =
+ TextMessageWriter.Pfx_Expected + "exactly 2 items \"Fred\"" + Env.NewLine +
+ TextMessageWriter.Pfx_Actual + "< \"Charlie\", \"Fred\", \"Joe\", \"Charlie\" >" + Env.NewLine;
+ Assert.That(names, new ExactCountConstraint(2, Is.EqualTo("Fred")));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/ExactTypeConstraintTests.cs b/external/guiunit/src/tests/Constraints/ExactTypeConstraintTests.cs
new file mode 100755
index 0000000..3221c10
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ExactTypeConstraintTests.cs
@@ -0,0 +1,50 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class ExactTypeConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new ExactTypeConstraint(typeof(D1));
+ expectedDescription = string.Format("<{0}>", typeof(D1));
+ stringRepresentation = string.Format("<typeof {0}>", typeof(D1));
+ }
+
+ internal object[] SuccessData = new object[] { new D1() };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( new B(), "<NUnit.Framework.Constraints.Tests.ExactTypeConstraintTests+B>" ),
+ new TestCaseData( new D2(), "<NUnit.Framework.Constraints.Tests.ExactTypeConstraintTests+D2>" )
+ };
+
+ class B { }
+
+ class D1 : B { }
+
+ class D2 : D1 { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/FloatingPointNumericsTest.cs b/external/guiunit/src/tests/Constraints/FloatingPointNumericsTest.cs
new file mode 100755
index 0000000..b5871a1
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/FloatingPointNumericsTest.cs
@@ -0,0 +1,120 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class FloatingPointNumericsTest
+ {
+
+ /// <summary>Tests the floating point value comparison helper</summary>
+ [Test]
+ public void FloatEqualityWithUlps()
+ {
+ Assert.IsTrue(
+ FloatingPointNumerics.AreAlmostEqualUlps(0.00000001f, 0.0000000100000008f, 1)
+ );
+ Assert.IsFalse(
+ FloatingPointNumerics.AreAlmostEqualUlps(0.00000001f, 0.0000000100000017f, 1)
+ );
+
+ Assert.IsTrue(
+ FloatingPointNumerics.AreAlmostEqualUlps(1000000.00f, 1000000.06f, 1)
+ );
+ Assert.IsFalse(
+ FloatingPointNumerics.AreAlmostEqualUlps(1000000.00f, 1000000.13f, 1)
+ );
+ }
+
+ /// <summary>Tests the double precision floating point value comparison helper</summary>
+ [Test]
+ public void DoubleEqualityWithUlps()
+ {
+ Assert.IsTrue(
+ FloatingPointNumerics.AreAlmostEqualUlps(0.00000001, 0.000000010000000000000002, 1)
+ );
+ Assert.IsFalse(
+ FloatingPointNumerics.AreAlmostEqualUlps(0.00000001, 0.000000010000000000000004, 1)
+ );
+
+ Assert.IsTrue(
+ FloatingPointNumerics.AreAlmostEqualUlps(1000000.00, 1000000.0000000001, 1)
+ );
+ Assert.IsFalse(
+ FloatingPointNumerics.AreAlmostEqualUlps(1000000.00, 1000000.0000000002, 1)
+ );
+ }
+
+ /// <summary>Tests the integer reinterpretation functions</summary>
+ [Test]
+ public void MirroredIntegerReinterpretation()
+ {
+ Assert.AreEqual(
+ 12345.0f,
+ FloatingPointNumerics.ReinterpretAsFloat(
+ FloatingPointNumerics.ReinterpretAsInt(12345.0f)
+ )
+ );
+ }
+
+ /// <summary>Tests the long reinterpretation functions</summary>
+ [Test]
+ public void MirroredLongReinterpretation()
+ {
+ Assert.AreEqual(
+ 12345.67890,
+ FloatingPointNumerics.ReinterpretAsDouble(
+ FloatingPointNumerics.ReinterpretAsLong(12345.67890)
+ )
+ );
+ }
+
+ /// <summary>Tests the floating point reinterpretation functions</summary>
+ [Test]
+ public void MirroredFloatReinterpretation()
+ {
+ Assert.AreEqual(
+ 12345,
+ FloatingPointNumerics.ReinterpretAsInt(
+ FloatingPointNumerics.ReinterpretAsFloat(12345)
+ )
+ );
+ }
+
+
+ /// <summary>
+ /// Tests the double prevision floating point reinterpretation functions
+ /// </summary>
+ [Test]
+ public void MirroredDoubleReinterpretation()
+ {
+ Assert.AreEqual(
+ 1234567890,
+ FloatingPointNumerics.ReinterpretAsLong(
+ FloatingPointNumerics.ReinterpretAsDouble(1234567890)
+ )
+ );
+ }
+
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/GreaterThanConstraintTests.cs b/external/guiunit/src/tests/Constraints/GreaterThanConstraintTests.cs
new file mode 100755
index 0000000..4762b34
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/GreaterThanConstraintTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class GreaterThanConstraintTests : ComparisonConstraintTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = comparisonConstraint = new GreaterThanConstraint(5);
+ expectedDescription = "greater than 5";
+ stringRepresentation = "<greaterthan 5>";
+ }
+
+ internal object[] SuccessData = new object[] { 6, 5.001 };
+
+ internal object[] FailureData = new object[] { new object[] { 4, "4" }, new object[] { 5, "5" } };
+
+ internal object[] InvalidData = new object[] { null, "xxx" };
+
+ [Test]
+ public void CanCompareIComparables()
+ {
+ ClassWithIComparable expected = new ClassWithIComparable(0);
+ ClassWithIComparable actual = new ClassWithIComparable(42);
+ Assert.That(actual, Is.GreaterThan(expected));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void CanCompareIComparablesOfT()
+ {
+ ClassWithIComparableOfT expected = new ClassWithIComparableOfT(0);
+ ClassWithIComparableOfT actual = new ClassWithIComparableOfT(42);
+ Assert.That(actual, Is.GreaterThan(expected));
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/GreaterThanOrEqualConstraintTests.cs b/external/guiunit/src/tests/Constraints/GreaterThanOrEqualConstraintTests.cs
new file mode 100755
index 0000000..3c679d0
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/GreaterThanOrEqualConstraintTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class GreaterThanOrEqualConstraintTests : ComparisonConstraintTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = comparisonConstraint = new GreaterThanOrEqualConstraint(5);
+ expectedDescription = "greater than or equal to 5";
+ stringRepresentation = "<greaterthanorequal 5>";
+ }
+
+ internal object[] SuccessData = new object[] { 6, 5 };
+
+ internal object[] FailureData = new object[] { new object[] { 4, "4" } };
+
+ internal object[] InvalidData = new object[] { null, "xxx" };
+
+ [Test]
+ public void CanCompareIComparables()
+ {
+ ClassWithIComparable expected = new ClassWithIComparable(0);
+ ClassWithIComparable actual = new ClassWithIComparable(42);
+ Assert.That(actual, Is.GreaterThanOrEqualTo(expected));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void CanCompareIComparablesOfT()
+ {
+ ClassWithIComparableOfT expected = new ClassWithIComparableOfT(0);
+ ClassWithIComparableOfT actual = new ClassWithIComparableOfT(42);
+ Assert.That(actual, Is.GreaterThanOrEqualTo(expected));
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/InstanceOfTypeConstraintTests.cs b/external/guiunit/src/tests/Constraints/InstanceOfTypeConstraintTests.cs
new file mode 100755
index 0000000..32e3f25
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/InstanceOfTypeConstraintTests.cs
@@ -0,0 +1,49 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class InstanceOfTypeConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new InstanceOfTypeConstraint(typeof(D1));
+ expectedDescription = string.Format("instance of <{0}>", typeof(D1));
+ stringRepresentation = string.Format("<instanceof {0}>", typeof(D1));
+ }
+
+ internal object[] SuccessData = new object[] { new D1(), new D2() };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( new B(), "<NUnit.Framework.Constraints.Tests.InstanceOfTypeConstraintTests+B>" )
+ };
+
+ class B { }
+
+ class D1 : B { }
+
+ class D2 : D1 { }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/LessThanConstraintTests.cs b/external/guiunit/src/tests/Constraints/LessThanConstraintTests.cs
new file mode 100755
index 0000000..d7e155d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/LessThanConstraintTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class LessThanConstraintTests : ComparisonConstraintTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = comparisonConstraint = new LessThanConstraint(5);
+ expectedDescription = "less than 5";
+ stringRepresentation = "<lessthan 5>";
+ }
+
+ internal object[] SuccessData = new object[] { 4, 4.999 };
+
+ internal object[] FailureData = new object[] { new object[] { 6, "6" }, new object[] { 5, "5" } };
+
+ internal object[] InvalidData = new object[] { null, "xxx" };
+
+ [Test]
+ public void CanCompareIComparables()
+ {
+ ClassWithIComparable expected = new ClassWithIComparable(42);
+ ClassWithIComparable actual = new ClassWithIComparable(0);
+ Assert.That(actual, Is.LessThan(expected));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void CanCompareIComparablesOfT()
+ {
+ ClassWithIComparableOfT expected = new ClassWithIComparableOfT(42);
+ ClassWithIComparableOfT actual = new ClassWithIComparableOfT(0);
+ Assert.That(actual, Is.LessThan(expected));
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/LessThanOrEqualConstraintTests.cs b/external/guiunit/src/tests/Constraints/LessThanOrEqualConstraintTests.cs
new file mode 100755
index 0000000..fdb2e50
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/LessThanOrEqualConstraintTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class LessThanOrEqualConstraintTests : ComparisonConstraintTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = comparisonConstraint = new LessThanOrEqualConstraint(5);
+ expectedDescription = "less than or equal to 5";
+ stringRepresentation = "<lessthanorequal 5>";
+ }
+
+ internal object[] SuccessData = new object[] { 4, 5 };
+
+ internal object[] FailureData = new object[] { new object[] { 6, "6" } };
+
+ internal object[] InvalidData = new object[] { null, "xxx" };
+
+ [Test]
+ public void CanCompareIComparables()
+ {
+ ClassWithIComparable expected = new ClassWithIComparable(42);
+ ClassWithIComparable actual = new ClassWithIComparable(0);
+ Assert.That(actual, Is.LessThanOrEqualTo(expected));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void CanCompareIComparablesOfT()
+ {
+ ClassWithIComparableOfT expected = new ClassWithIComparableOfT(42);
+ ClassWithIComparableOfT actual = new ClassWithIComparableOfT(0);
+ Assert.That(actual, Is.LessThanOrEqualTo(expected));
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/MessageWriterTests.cs b/external/guiunit/src/tests/Constraints/MessageWriterTests.cs
new file mode 100755
index 0000000..3718a83
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/MessageWriterTests.cs
@@ -0,0 +1,129 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Tests
+{
+ class MessageWriterTests
+ {
+ protected TextMessageWriter writer;
+
+ [SetUp]
+ public void SetUp()
+ {
+ writer = new TextMessageWriter();
+ }
+ }
+
+ [TestFixture]
+ class TestMessageWriterTests : MessageWriterTests
+ {
+ [Test]
+ public void ConnectorIsWrittenWithSurroundingSpaces()
+ {
+ writer.WriteConnector("and");
+ Assert.That(writer.ToString(), Is.EqualTo(" and "));
+ }
+
+ [Test]
+ public void PredicateIsWrittenWithTrailingSpace()
+ {
+ writer.WritePredicate("contains");
+ Assert.That(writer.ToString(), Is.EqualTo("contains "));
+ }
+
+ [TestFixture]
+ public class ExpectedValueTests : ValueTests
+ {
+ protected override void WriteValue(object obj)
+ {
+ writer.WriteExpectedValue(obj);
+ }
+ }
+
+ [TestFixture]
+ public class ActualValueTests : ValueTests
+ {
+ protected override void WriteValue(object obj)
+ {
+ writer.WriteActualValue( obj );
+ }
+ }
+
+ public abstract class ValueTests : MessageWriterTests
+ {
+ protected abstract void WriteValue( object obj);
+
+ [Test]
+ public void IntegerIsWrittenAsIs()
+ {
+ WriteValue(42);
+ Assert.That(writer.ToString(), Is.EqualTo("42"));
+ }
+
+ [Test]
+ public void StringIsWrittenWithQuotes()
+ {
+ WriteValue("Hello");
+ Assert.That(writer.ToString(), Is.EqualTo("\"Hello\""));
+ }
+
+ //[Test]
+ //public void ControlCharactersInStringsAreEscaped()
+ //{
+ // WriteValue("Best Wishes,\r\n\tCharlie\r\n");
+ // Assert.That(writer.ToString(), Is.EqualTo("\"Best Wishes,\\r\\n\\tCharlie\\r\\n\""));
+ //}
+
+ [Test]
+ public void FloatIsWrittenWithTrailingF()
+ {
+ WriteValue(0.5f);
+ Assert.That(writer.ToString(), Is.EqualTo("0.5f"));
+ }
+
+ [Test]
+ public void FloatIsWrittenToNineDigits()
+ {
+ WriteValue(0.33333333333333f);
+ int digits = writer.ToString().Length - 3; // 0.dddddddddf
+ Assert.That(digits, Is.EqualTo(9));
+ }
+
+ [Test]
+ public void DoubleIsWrittenWithTrailingD()
+ {
+ WriteValue(0.5d);
+ Assert.That(writer.ToString(), Is.EqualTo("0.5d"));
+ }
+
+ [Test]
+ public void DoubleIsWrittenToSeventeenDigits()
+ {
+ WriteValue(0.33333333333333333333333333333333333333333333d);
+ int digits = writer.ToString().Length - 3;
+ Assert.That(digits, Is.EqualTo(17));
+ }
+
+ [Test]
+ public void DecimalIsWrittenWithTrailingM()
+ {
+ WriteValue(0.5m);
+ Assert.That(writer.ToString(), Is.EqualTo("0.5m"));
+ }
+
+ [Test]
+ public void DecimalIsWrittenToTwentyNineDigits()
+ {
+ WriteValue(12345678901234567890123456789m);
+ Assert.That(writer.ToString(), Is.EqualTo("12345678901234567890123456789m"));
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/MsgUtilTests.cs b/external/guiunit/src/tests/Constraints/MsgUtilTests.cs
new file mode 100755
index 0000000..65d207e
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/MsgUtilTests.cs
@@ -0,0 +1,128 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ /// <summary>
+ /// Summary description for MsgUtilTests.
+ /// </summary>
+ [TestFixture]
+ public class MsgUtilTests
+ {
+ [TestCase("\n", "\\n")]
+ [TestCase("\n\n", "\\n\\n")]
+ [TestCase("\n\n\n", "\\n\\n\\n")]
+ [TestCase("\r", "\\r")]
+ [TestCase("\r\r", "\\r\\r")]
+ [TestCase("\r\r\r", "\\r\\r\\r")]
+ [TestCase("\r\n", "\\r\\n")]
+ [TestCase("\n\r", "\\n\\r")]
+ [TestCase("This is a\rtest message", "This is a\\rtest message")]
+ [TestCase("", "")]
+#if CLR_2_0 || CLR_4_0
+ [TestCase(null, null)]
+#endif
+ [TestCase("\t", "\\t")]
+ [TestCase("\t\n", "\\t\\n")]
+ [TestCase("\\r\\n", "\\\\r\\\\n")]
+ // TODO: Figure out why this fails in Mono
+ //[TestCase("\0", "\\0")]
+ [TestCase("\a", "\\a")]
+ [TestCase("\b", "\\b")]
+ [TestCase("\f", "\\f")]
+ [TestCase("\v", "\\v")]
+ [TestCase("\x0085", "\\x0085", Description = "Next line character")]
+ [TestCase("\x2028", "\\x2028", Description = "Line separator character")]
+ [TestCase("\x2029", "\\x2029", Description = "Paragraph separator character")]
+ public void EscapeControlCharsTest(string input, string expected)
+ {
+ Assert.That( MsgUtils.EscapeControlChars(input), Is.EqualTo(expected) );
+ }
+
+ [Test]
+ public void EscapeNullCharInString()
+ {
+ Assert.That(MsgUtils.EscapeControlChars("\0"), Is.EqualTo("\\0"));
+ }
+
+ private const string s52 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+ [TestCase(s52, 52, 0, s52, TestName="NoClippingNeeded")]
+ [TestCase(s52, 29, 0, "abcdefghijklmnopqrstuvwxyz...", TestName="ClipAtEnd")]
+ [TestCase(s52, 29, 26, "...ABCDEFGHIJKLMNOPQRSTUVWXYZ", TestName="ClipAtStart")]
+ [TestCase(s52, 28, 26, "...ABCDEFGHIJKLMNOPQRSTUV...", TestName="ClipAtStartAndEnd")]
+ public void TestClipString(string input, int max, int start, string result)
+ {
+ System.Console.WriteLine("input= \"{0}\"", input);
+ System.Console.WriteLine("result= \"{0}\"", result);
+ Assert.That(MsgUtils.ClipString(input, max, start), Is.EqualTo(result));
+ }
+
+ //[TestCase('\0')]
+ //[TestCase('\r')]
+ //public void CharacterArgumentTest(char c)
+ //{
+ //}
+
+ [Test]
+ public void ClipExpectedAndActual_StringsFitInLine()
+ {
+ string eClip = s52;
+ string aClip = "abcde";
+ MsgUtils.ClipExpectedAndActual(ref eClip, ref aClip, 52, 5);
+ Assert.That(eClip, Is.EqualTo(s52));
+ Assert.That(aClip, Is.EqualTo("abcde"));
+
+ eClip = s52;
+ aClip = "abcdefghijklmno?qrstuvwxyz";
+ MsgUtils.ClipExpectedAndActual(ref eClip, ref aClip, 52, 15);
+ Assert.That(eClip, Is.EqualTo(s52));
+ Assert.That(aClip, Is.EqualTo("abcdefghijklmno?qrstuvwxyz"));
+ }
+
+ [Test]
+ public void ClipExpectedAndActual_StringTailsFitInLine()
+ {
+ string s1 = s52;
+ string s2 = s52.Replace('Z', '?');
+ MsgUtils.ClipExpectedAndActual(ref s1, ref s2, 29, 51);
+ Assert.That(s1, Is.EqualTo("...ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
+ }
+
+ [Test]
+ public void ClipExpectedAndActual_StringsDoNotFitInLine()
+ {
+ string s1 = s52;
+ string s2 = "abcdefghij";
+ MsgUtils.ClipExpectedAndActual(ref s1, ref s2, 29, 10);
+ Assert.That(s1, Is.EqualTo("abcdefghijklmnopqrstuvwxyz..."));
+ Assert.That(s2, Is.EqualTo("abcdefghij"));
+
+ s1 = s52;
+ s2 = "abcdefghijklmno?qrstuvwxyz";
+ MsgUtils.ClipExpectedAndActual(ref s1, ref s2, 25, 15);
+ Assert.That(s1, Is.EqualTo("...efghijklmnopqrstuvw..."));
+ Assert.That(s2, Is.EqualTo("...efghijklmno?qrstuvwxyz"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/NUnitComparerTests.cs b/external/guiunit/src/tests/Constraints/NUnitComparerTests.cs
new file mode 100755
index 0000000..e068739
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/NUnitComparerTests.cs
@@ -0,0 +1,78 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class NUnitComparerTests
+ {
+ private Tolerance tolerance;
+ private NUnitComparer comparer;
+
+ [SetUp]
+ public void SetUp()
+ {
+ tolerance = Tolerance.Empty;
+ comparer = new NUnitComparer();
+ }
+
+ [TestCase(4, 4)]
+ [TestCase(4.0d, 4.0d)]
+ [TestCase(4.0f, 4.0f)]
+ [TestCase(4, 4.0d)]
+ [TestCase(4, 4.0f)]
+ [TestCase(4.0d, 4)]
+ [TestCase(4.0d, 4.0f)]
+ [TestCase(4.0f, 4)]
+ [TestCase(4.0f, 4.0d)]
+ [TestCase(SpecialValue.Null, SpecialValue.Null)]
+#if CLR_2_0 || CLR_4_0
+ [TestCase(null, null)]
+#endif
+ public void EqualItems(object x, object y)
+ {
+ Assert.That(comparer.Compare(x, y) == 0);
+ }
+
+ [TestCase(4, 2)]
+ [TestCase(4.0d, 2.0d)]
+ [TestCase(4.0f, 2.0f)]
+ [TestCase(4, 2.0d)]
+ [TestCase(4, 2.0f)]
+ [TestCase(4.0d, 2)]
+ [TestCase(4.0d, 2.0f)]
+ [TestCase(4.0f, 2)]
+ [TestCase(4.0f, 2.0d)]
+ [TestCase(4, SpecialValue.Null)]
+#if CLR_2_0 || CLR_4_0
+ [TestCase(4, null)]
+#endif
+ public void UnequalItems(object greater, object lesser)
+ {
+ Assert.That(comparer.Compare(greater, lesser) > 0);
+ Assert.That(comparer.Compare(lesser, greater) < 0);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/NUnitEqualityComparerTests.cs b/external/guiunit/src/tests/Constraints/NUnitEqualityComparerTests.cs
new file mode 100755
index 0000000..411fef1
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/NUnitEqualityComparerTests.cs
@@ -0,0 +1,208 @@
+// ***********************************************************************
+// Copyright (c) 2011 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints
+{
+ [TestFixture]
+ public class EqualityComparerTests
+ {
+ private Tolerance tolerance;
+ private NUnitEqualityComparer comparer;
+
+ [SetUp]
+ public void Setup()
+ {
+ tolerance = Tolerance.Empty;
+ comparer = new NUnitEqualityComparer();
+ }
+
+ [TestCase(4, 4)]
+ [TestCase(4.0d, 4.0d)]
+ [TestCase(4.0f, 4.0f)]
+ [TestCase(4, 4.0d)]
+ [TestCase(4, 4.0f)]
+ [TestCase(4.0d, 4)]
+ [TestCase(4.0d, 4.0f)]
+ [TestCase(4.0f, 4)]
+ [TestCase(4.0f, 4.0d)]
+ [TestCase(SpecialValue.Null, SpecialValue.Null)]
+#if CLR_2_0 || CLR_4_0
+ [TestCase(null, null)]
+#endif
+ public void EqualItems(object x, object y)
+ {
+ Assert.That(comparer.AreEqual(x, y, ref tolerance));
+ }
+
+ [TestCase(4, 2)]
+ [TestCase(4.0d, 2.0d)]
+ [TestCase(4.0f, 2.0f)]
+ [TestCase(4, 2.0d)]
+ [TestCase(4, 2.0f)]
+ [TestCase(4.0d, 2)]
+ [TestCase(4.0d, 2.0f)]
+ [TestCase(4.0f, 2)]
+ [TestCase(4.0f, 2.0d)]
+ [TestCase(4, SpecialValue.Null)]
+#if CLR_2_0 || CLR_4_0
+ [TestCase(4, null)]
+#endif
+ public void UnequalItems(object greater, object lesser)
+ {
+ Assert.False(comparer.AreEqual(greater, lesser, ref tolerance));
+ Assert.False(comparer.AreEqual(lesser, greater, ref tolerance));
+ }
+
+ [TestCase(double.PositiveInfinity, double.PositiveInfinity)]
+ [TestCase(double.NegativeInfinity, double.NegativeInfinity)]
+ [TestCase(double.NaN, double.NaN)]
+ [TestCase(float.PositiveInfinity, float.PositiveInfinity)]
+ [TestCase(float.NegativeInfinity, float.NegativeInfinity)]
+ [TestCase(float.NaN, float.NaN)]
+ public void SpecialFloatingPointValuesCompareAsEqual(object x, object y)
+ {
+ Assert.That(comparer.AreEqual(x, y, ref tolerance));
+ }
+
+ [Test]
+ public void CanCompareArrayContainingSelfToSelf()
+ {
+ object[] array = new object[1];
+ array[0] = array;
+
+ Assert.True(comparer.AreEqual(array, array, ref tolerance));
+ }
+
+#if CLR_2_0 || CLR_4_0
+#if !NETCF
+ [Test]
+ public void IEquatableSuccess()
+ {
+ IEquatableWithoutEqualsOverridden x = new IEquatableWithoutEqualsOverridden(1);
+ IEquatableWithoutEqualsOverridden y = new IEquatableWithoutEqualsOverridden(1);
+
+ Assert.IsTrue(comparer.AreEqual(x, y, ref tolerance));
+ }
+
+ [Test]
+ public void IEquatableDifferentTypesSuccess_WhenActualImplementsIEquatable()
+ {
+ int x = 1;
+ Int32IEquatable y = new Int32IEquatable(1);
+
+ // y.Equals(x) is what gets actually called
+ // TODO: This should work both ways
+ Assert.IsTrue(comparer.AreEqual(x, y, ref tolerance));
+ }
+
+ [Test]
+ public void IEquatableDifferentTypesSuccess_WhenExpectedImplementsIEquatable()
+ {
+ int x = 1;
+ Int32IEquatable y = new Int32IEquatable(1);
+
+ // y.Equals(x) is what gets actually called
+ // TODO: This should work both ways
+ Assert.IsTrue(comparer.AreEqual(y, x, ref tolerance));
+ }
+
+ [Test]
+ public void IEquatableHasPrecedenceOverDefaultEquals()
+ {
+ NeverEqualIEquatableWithOverriddenAlwaysTrueEquals x = new NeverEqualIEquatableWithOverriddenAlwaysTrueEquals();
+ NeverEqualIEquatableWithOverriddenAlwaysTrueEquals y = new NeverEqualIEquatableWithOverriddenAlwaysTrueEquals();
+
+ Assert.IsFalse(comparer.AreEqual(x, y, ref tolerance));
+ }
+#endif
+
+ [Test]
+ public void ReferenceEqualityHasPrecedenceOverIEquatable()
+ {
+ NeverEqualIEquatable z = new NeverEqualIEquatable();
+
+ Assert.IsTrue(comparer.AreEqual(z, z, ref tolerance));
+ }
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public class NeverEqualIEquatableWithOverriddenAlwaysTrueEquals : IEquatable<NeverEqualIEquatableWithOverriddenAlwaysTrueEquals>
+ {
+ public bool Equals(NeverEqualIEquatableWithOverriddenAlwaysTrueEquals other)
+ {
+ return false;
+ }
+
+ public override bool Equals(object obj)
+ {
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+ }
+
+ public class Int32IEquatable : IEquatable<int>
+ {
+ private readonly int value;
+
+ public Int32IEquatable(int value)
+ {
+ this.value = value;
+ }
+
+ public bool Equals(int other)
+ {
+ return value.Equals(other);
+ }
+ }
+
+ public class NeverEqualIEquatable : IEquatable<NeverEqualIEquatable>
+ {
+ public bool Equals(NeverEqualIEquatable other)
+ {
+ return false;
+ }
+ }
+
+ public class IEquatableWithoutEqualsOverridden : IEquatable<IEquatableWithoutEqualsOverridden>
+ {
+ private readonly int value;
+
+ public IEquatableWithoutEqualsOverridden(int value)
+ {
+ this.value = value;
+ }
+
+ public bool Equals(IEquatableWithoutEqualsOverridden other)
+ {
+ return value.Equals(other.value);
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/Constraints/NotConstraintTests.cs b/external/guiunit/src/tests/Constraints/NotConstraintTests.cs
new file mode 100755
index 0000000..72656e9
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/NotConstraintTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class NotConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new NotConstraint( new EqualConstraint(null) );
+ expectedDescription = "not null";
+ stringRepresentation = "<not <equal null>>";
+ }
+
+ internal object[] SuccessData = new object[] { 42, "Hello" };
+
+ internal object[] FailureData = new object[] { new object[] { null, "null" } };
+
+ [Test, ExpectedException(typeof(AssertionException), ExpectedMessage = "ignoring case", MatchType = MessageMatch.Contains)]
+ public void NotHonorsIgnoreCaseUsingConstructors()
+ {
+ Assert.That("abc", new NotConstraint(new EqualConstraint("ABC").IgnoreCase));
+ }
+
+ [Test,ExpectedException(typeof(AssertionException),ExpectedMessage="ignoring case",MatchType=MessageMatch.Contains)]
+ public void NotHonorsIgnoreCaseUsingPrefixNotation()
+ {
+ Assert.That( "abc", Is.Not.EqualTo( "ABC" ).IgnoreCase );
+ }
+
+ [Test,ExpectedException(typeof(AssertionException),ExpectedMessage="+/-",MatchType=MessageMatch.Contains)]
+ public void NotHonorsTolerance()
+ {
+ Assert.That( 4.99d, Is.Not.EqualTo( 5.0d ).Within( .05d ) );
+ }
+
+ [Test]
+ public void CanUseNotOperator()
+ {
+ Assert.That(42, !new EqualConstraint(99));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/NumericsTest.cs b/external/guiunit/src/tests/Constraints/NumericsTest.cs
new file mode 100755
index 0000000..64baa38
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/NumericsTest.cs
@@ -0,0 +1,112 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class NumericsTest
+ {
+ private Tolerance tenPercent, zeroTolerance;
+
+ [SetUp]
+ public void SetUp()
+ {
+ tenPercent = new Tolerance(10.0).Percent;
+ zeroTolerance = new Tolerance(0);
+ }
+
+ [TestCase(123456789)]
+ [TestCase(123456789U)]
+ [TestCase(123456789L)]
+ [TestCase(123456789UL)]
+ [TestCase(1234.5678f)]
+ [TestCase(1234.5678)]
+ [Test]
+ public void CanMatchWithoutToleranceMode(object value)
+ {
+ Assert.IsTrue(Numerics.AreEqual(value, value, ref zeroTolerance));
+ }
+
+ // Separate test case because you can't use decimal in an attribute (24.1.3)
+ [Test]
+ public void CanMatchDecimalWithoutToleranceMode()
+ {
+ Assert.IsTrue(Numerics.AreEqual(123m, 123m, ref zeroTolerance));
+ }
+
+ [TestCase((int)9500)]
+ [TestCase((int)10000)]
+ [TestCase((int)10500)]
+ [TestCase((uint)9500)]
+ [TestCase((uint)10000)]
+ [TestCase((uint)10500)]
+ [TestCase((long)9500)]
+ [TestCase((long)10000)]
+ [TestCase((long)10500)]
+ [TestCase((ulong)9500)]
+ [TestCase((ulong)10000)]
+ [TestCase((ulong)10500)]
+ [Test]
+ public void CanMatchIntegralsWithPercentage(object value)
+ {
+ Assert.IsTrue(Numerics.AreEqual(10000, value, ref tenPercent));
+ }
+
+ [Test]
+ public void CanMatchDecimalWithPercentage()
+ {
+ Assert.IsTrue(Numerics.AreEqual(10000m, 9500m, ref tenPercent));
+ Assert.IsTrue(Numerics.AreEqual(10000m, 10000m, ref tenPercent));
+ Assert.IsTrue(Numerics.AreEqual(10000m, 10500m, ref tenPercent));
+ }
+
+ [TestCase((int)8500)]
+ [TestCase((int)11500)]
+ [TestCase((uint)8500)]
+ [TestCase((uint)11500)]
+ [TestCase((long)8500)]
+ [TestCase((long)11500)]
+ [TestCase((ulong)8500)]
+ [TestCase((ulong)11500)]
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailsOnIntegralsOutsideOfPercentage(object value)
+ {
+ Assert.IsTrue(Numerics.AreEqual(10000, value, ref tenPercent));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailsOnDecimalBelowPercentage()
+ {
+ Assert.IsTrue(Numerics.AreEqual(10000m, 8500m, ref tenPercent));
+ }
+
+ [Test, ExpectedException(typeof(AssertionException))]
+ public void FailsOnDecimalAbovePercentage()
+ {
+ Assert.IsTrue(Numerics.AreEqual(10000m, 11500m, ref tenPercent));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/OrConstraintTests.cs b/external/guiunit/src/tests/Constraints/OrConstraintTests.cs
new file mode 100755
index 0000000..23b61f3
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/OrConstraintTests.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class OrConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new OrConstraint(new EqualConstraint(42), new EqualConstraint(99));
+ expectedDescription = "42 or 99";
+ stringRepresentation = "<or <equal 42> <equal 99>>";
+ }
+
+ internal object[] SuccessData = new object[] { 99, 42 };
+
+ internal object[] FailureData = new object[] { new object[] { 37, "37" } };
+
+ [Test]
+ public void CanCombineTestsWithOrOperator()
+ {
+ Assert.That(99, new EqualConstraint(42) | new EqualConstraint(99) );
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/PathConstraintTests.cs b/external/guiunit/src/tests/Constraints/PathConstraintTests.cs
new file mode 100755
index 0000000..6b06ba8
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/PathConstraintTests.cs
@@ -0,0 +1,252 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ /// <summary>
+ /// Summary description for PathConstraintTests.
+ /// </summary>]
+ [TestFixture]
+ public class SamePathTest_Windows : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SamePathConstraint( @"C:\folder1\file.tmp" ).IgnoreCase;
+ expectedDescription = @"Path matching ""C:\folder1\file.tmp""";
+ stringRepresentation = "<samepath \"C:\\folder1\\file.tmp\" ignorecase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"C:\folder1\file.tmp",
+ @"C:\Folder1\File.TMP",
+ @"C:\folder1\.\file.tmp",
+ @"C:\folder1\folder2\..\file.tmp",
+ @"C:\FOLDER1\.\folder2\..\File.TMP",
+ @"C:/folder1/file.tmp"
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData( 123, "123" ),
+ new TestCaseData( @"C:\folder2\file.tmp", "\"C:\\folder2\\file.tmp\"" ),
+ new TestCaseData( @"C:\folder1\.\folder2\..\file.temp", "\"C:\\folder1\\.\\folder2\\..\\file.temp\"" )
+ };
+
+ [Test]
+ public void RootPathEquality()
+ {
+ Assert.That("c:\\", Is.SamePath("C:\\junk\\..\\").IgnoreCase);
+ }
+ }
+
+ [TestFixture]
+ public class SamePathTest_Linux : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SamePathConstraint(@"/folder1/folder2").RespectCase;
+ expectedDescription = @"Path matching ""/folder1/folder2""";
+ stringRepresentation = @"<samepath ""/folder1/folder2"" respectcase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"/folder1/folder2",
+ @"/folder1/folder2/",
+ @"/folder1/./folder2",
+ @"/folder1/./folder2/",
+ @"/folder1/junk/../folder2",
+ @"/folder1/junk/../folder2/",
+ @"/folder1/./junk/../folder2",
+ @"/folder1/./junk/../folder2/",
+ @"\folder1\folder2",
+ @"\folder1\folder2\"
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData( 123, "123" ),
+ new TestCaseData("folder1/folder2", "\"folder1/folder2\""),
+ new TestCaseData("//folder1/folder2", "\"//folder1/folder2\""),
+ new TestCaseData( @"/junk/folder2", "\"/junk/folder2\"" ),
+ new TestCaseData( @"/folder1/./junk/../file.temp", "\"/folder1/./junk/../file.temp\"" ),
+ new TestCaseData( @"/Folder1/FOLDER2", "\"/Folder1/FOLDER2\"" ),
+ new TestCaseData( @"/FOLDER1/./junk/../FOLDER2", "\"/FOLDER1/./junk/../FOLDER2\"" )
+ };
+
+ [Test]
+ public void RootPathEquality()
+ {
+ Assert.That("/", Is.SamePath("/junk/../"));
+ }
+ }
+
+ [TestFixture]
+ public class SubPathTest_Windows : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SubPathConstraint(@"C:\folder1\folder2").IgnoreCase;
+ expectedDescription = @"Path under ""C:\folder1\folder2""";
+ stringRepresentation = @"<subpath ""C:\folder1\folder2"" ignorecase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"C:\folder1\folder2\folder3",
+ @"C:\folder1\.\folder2\folder3",
+ @"C:\folder1\junk\..\folder2\folder3",
+ @"C:\FOLDER1\.\junk\..\Folder2\temp\..\Folder3",
+ @"C:/folder1/folder2/folder3",
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData(123, "123"),
+ new TestCaseData(@"C:\folder1\folder3", "\"C:\\folder1\\folder3\""),
+ new TestCaseData(@"C:\folder1\.\folder2\..\file.temp", "\"C:\\folder1\\.\\folder2\\..\\file.temp\""),
+ new TestCaseData(@"C:\folder1\folder2", "\"C:\\folder1\\folder2\""),
+ new TestCaseData(@"C:\Folder1\Folder2", "\"C:\\Folder1\\Folder2\""),
+ new TestCaseData(@"C:\folder1\.\folder2", "\"C:\\folder1\\.\\folder2\""),
+ new TestCaseData(@"C:\folder1\junk\..\folder2", "\"C:\\folder1\\junk\\..\\folder2\""),
+ new TestCaseData(@"C:\FOLDER1\.\junk\..\Folder2", "\"C:\\FOLDER1\\.\\junk\\..\\Folder2\""),
+ new TestCaseData(@"C:/folder1/folder2", "\"C:/folder1/folder2\"")
+ };
+
+ [Test]
+ public void SubPathOfRoot()
+ {
+ Assert.That("C:\\junk\\file.temp", new SubPathConstraint("C:\\"));
+ }
+ }
+
+ [TestFixture]
+ public class SubPathTest_Linux : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SubPathConstraint(@"/folder1/folder2").RespectCase;
+ expectedDescription = @"Path under ""/folder1/folder2""";
+ stringRepresentation = @"<subpath ""/folder1/folder2"" respectcase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"/folder1/folder2/folder3",
+ @"/folder1/./folder2/folder3",
+ @"/folder1/junk/../folder2/folder3",
+ @"\folder1\folder2\folder3",
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData(123, "123"),
+ new TestCaseData("/Folder1/Folder2", "\"/Folder1/Folder2\""),
+ new TestCaseData("/FOLDER1/./junk/../Folder2", "\"/FOLDER1/./junk/../Folder2\""),
+ new TestCaseData("/FOLDER1/./junk/../Folder2/temp/../Folder3", "\"/FOLDER1/./junk/../Folder2/temp/../Folder3\""),
+ new TestCaseData("/folder1/folder3", "\"/folder1/folder3\""),
+ new TestCaseData("/folder1/./folder2/../folder3", "\"/folder1/./folder2/../folder3\""),
+ new TestCaseData("/folder1", "\"/folder1\""),
+ new TestCaseData("/folder1/folder2", "\"/folder1/folder2\""),
+ new TestCaseData("/folder1/./folder2", "\"/folder1/./folder2\""),
+ new TestCaseData("/folder1/junk/../folder2", "\"/folder1/junk/../folder2\""),
+ new TestCaseData(@"\folder1\folder2", "\"\\folder1\\folder2\"")
+ };
+
+ [Test]
+ public void SubPathOfRoot()
+ {
+ Assert.That("/junk/file.temp", new SubPathConstraint("/"));
+ }
+ }
+
+ [TestFixture]
+ public class SamePathOrUnderTest_Windows : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SamePathOrUnderConstraint( @"C:\folder1\folder2" ).IgnoreCase;
+ expectedDescription = @"Path under or matching ""C:\folder1\folder2""";
+ stringRepresentation = @"<samepathorunder ""C:\folder1\folder2"" ignorecase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"C:\folder1\folder2",
+ @"C:\Folder1\Folder2",
+ @"C:\folder1\.\folder2",
+ @"C:\folder1\junk\..\folder2",
+ @"C:\FOLDER1\.\junk\..\Folder2",
+ @"C:/folder1/folder2",
+ @"C:\folder1\folder2\folder3",
+ @"C:\folder1\.\folder2\folder3",
+ @"C:\folder1\junk\..\folder2\folder3",
+ @"C:\FOLDER1\.\junk\..\Folder2\temp\..\Folder3",
+ @"C:/folder1/folder2/folder3",
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData( 123, "123" ),
+ new TestCaseData( @"C:\folder1\folder3", "\"C:\\folder1\\folder3\"" ),
+ new TestCaseData( @"C:\folder1\.\folder2\..\file.temp", "\"C:\\folder1\\.\\folder2\\..\\file.temp\"" )
+ };
+ }
+
+ [TestFixture]
+ public class SamePathOrUnderTest_Linux : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SamePathOrUnderConstraint( @"/folder1/folder2" ).RespectCase;
+ expectedDescription = @"Path under or matching ""/folder1/folder2""";
+ stringRepresentation = @"<samepathorunder ""/folder1/folder2"" respectcase>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ @"/folder1/folder2",
+ @"/folder1/./folder2",
+ @"/folder1/junk/../folder2",
+ @"\folder1\folder2",
+ @"/folder1/folder2/folder3",
+ @"/folder1/./folder2/folder3",
+ @"/folder1/junk/../folder2/folder3",
+ @"\folder1\folder2\folder3",
+ };
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData( 123, "123" ),
+ new TestCaseData( "/Folder1/Folder2", "\"/Folder1/Folder2\"" ),
+ new TestCaseData( "/FOLDER1/./junk/../Folder2", "\"/FOLDER1/./junk/../Folder2\"" ),
+ new TestCaseData( "/FOLDER1/./junk/../Folder2/temp/../Folder3", "\"/FOLDER1/./junk/../Folder2/temp/../Folder3\"" ),
+ new TestCaseData( "/folder1/folder3", "\"/folder1/folder3\"" ),
+ new TestCaseData( "/folder1/./folder2/../folder3", "\"/folder1/./folder2/../folder3\"" ),
+ new TestCaseData( "/folder1", "\"/folder1\"" )
+ };
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/PredicateConstraintTests.cs b/external/guiunit/src/tests/Constraints/PredicateConstraintTests.cs
new file mode 100755
index 0000000..aa36533
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/PredicateConstraintTests.cs
@@ -0,0 +1,58 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF_2_0
+using System;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class PredicateConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new PredicateConstraint<int>((x) => x < 5 );
+ expectedDescription = @"value matching lambda expression";
+ stringRepresentation = "<predicate>";
+ }
+
+ internal object[] SuccessData = new object[]
+ {
+ 0,
+ -5
+ };
+
+ internal object[] FailureData = new object[]
+ {
+ new TestCaseData(123, "123")
+ };
+
+ [Test]
+ public void CanUseConstraintExpressionSyntax()
+ {
+ Assert.That(123, Is.TypeOf<int>().And.Matches<int>((int x) => x > 100));
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Constraints/PropertyTests.cs b/external/guiunit/src/tests/Constraints/PropertyTests.cs
new file mode 100755
index 0000000..e4b2d8d
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/PropertyTests.cs
@@ -0,0 +1,104 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+// TODO: Remove NUNITLITE conditional code
+using System;
+using System.Collections;
+using NUnit.Framework.Internal;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ public class PropertyExistsTest
+#if NUNITLITE
+ : ConstraintTestBase
+#else
+ : ConstraintTestBaseWithExceptionTests
+#endif
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new PropertyExistsConstraint("Length");
+ expectedDescription = "property Length";
+ stringRepresentation = "<propertyexists Length>";
+ }
+
+ internal static object[] SuccessData = new object[] { new int[0], "hello", typeof(Array) };
+
+ internal static object[] FailureData = new object[] {
+ new TestCaseData( 42, "<System.Int32>" ),
+ new TestCaseData( new SimpleObjectCollection(), "<NUnit.TestUtilities.SimpleObjectCollection>" ),
+ new TestCaseData( typeof(Int32), "<System.Int32>" ) };
+#if !NUNITLITE
+ internal static object[] InvalidData = new TestCaseData[]
+ {
+ new TestCaseData(null).Throws(typeof(ArgumentNullException))
+ };
+#endif
+ }
+
+ public class PropertyTest
+#if NUNITLITE
+ : ConstraintTestBase
+#else
+ : ConstraintTestBaseWithExceptionTests
+#endif
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new PropertyConstraint("Length", new EqualConstraint(5));
+ expectedDescription = "property Length equal to 5";
+ stringRepresentation = "<property Length <equal 5>>";
+ }
+
+ internal static object[] SuccessData = new object[] { new int[5], "hello" };
+
+ internal static object[] FailureData = new object[] {
+ new TestCaseData( new int[3], "3" ),
+ new TestCaseData( "goodbye", "7" ) };
+#if !NUNITLITE
+ internal static object[] InvalidData = new object[]
+ {
+ new TestCaseData(null).Throws(typeof(ArgumentNullException)),
+ new TestCaseData(42).Throws(typeof(ArgumentException)),
+ new TestCaseData(new System.Collections.ArrayList()).Throws(typeof(ArgumentException))
+ };
+#endif
+
+ [Test]
+ public void PropertyEqualToValueWithTolerance()
+ {
+ Constraint c = new EqualConstraint(105m).Within(0.1m);
+ TextMessageWriter w = new TextMessageWriter();
+ c.WriteDescriptionTo(w);
+ Assert.That(w.ToString(), Is.EqualTo("105m +/- 0.1m"));
+
+ c = new PropertyConstraint("D", new EqualConstraint(105m).Within(0.1m));
+ w = new TextMessageWriter();
+ c.WriteDescriptionTo(w);
+ Assert.That(w.ToString(), Is.EqualTo("property D equal to 105m +/- 0.1m"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/RangeConstraintTests.cs b/external/guiunit/src/tests/Constraints/RangeConstraintTests.cs
new file mode 100755
index 0000000..eab4e4e
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/RangeConstraintTests.cs
@@ -0,0 +1,117 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class RangeConstraintTest : ConstraintTestBaseWithArgumentException
+ {
+#if CLR_2_0 || CLR_4_0
+ RangeConstraint<int> rangeConstraint;
+#else
+ RangeConstraint rangeConstraint;
+#endif
+
+ [SetUp]
+ public void SetUp()
+ {
+#if CLR_2_0 || CLR_4_0
+ theConstraint = rangeConstraint = new RangeConstraint<int>(5, 42);
+#else
+ theConstraint = rangeConstraint = new RangeConstraint(5, 42);
+#endif
+ expectedDescription = "in range (5,42)";
+ stringRepresentation = "<range 5 42>";
+ }
+
+ internal object[] SuccessData = new object[] { 5, 23, 42 };
+
+ internal object[] FailureData = new object[] { new object[] { 4, "4" }, new object[] { 43, "43" } };
+
+ internal object[] InvalidData = new object[] { null, "xxx" };
+
+ [Test]
+ public void UsesProvidedIComparer()
+ {
+ SimpleObjectComparer comparer = new SimpleObjectComparer();
+ Assert.That(rangeConstraint.Using(comparer).Matches(19));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void UsesProvidedComparerOfT()
+ {
+ MyComparer<int> comparer = new MyComparer<int>();
+ Assert.That(rangeConstraint.Using(comparer).Matches(19));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparer<T> : IComparer<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+ [Test]
+ public void UsesProvidedComparisonOfT()
+ {
+ MyComparison<int> comparer = new MyComparison<int>();
+ Assert.That(rangeConstraint.Using(new Comparison<int>(comparer.Compare)).Matches(19));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ class MyComparison<T>
+ {
+ public bool Called;
+
+ public int Compare(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y);
+ }
+ }
+
+#if !NETCF_2_0
+ [Test]
+ public void UsesProvidedLambda()
+ {
+ Comparison<int> comparer = (x, y) => x.CompareTo(y);
+ Assert.That(rangeConstraint.Using(comparer).Matches(19));
+ }
+#endif
+#endif
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/RangeTests.cs b/external/guiunit/src/tests/Constraints/RangeTests.cs
new file mode 100755
index 0000000..15b6884
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/RangeTests.cs
@@ -0,0 +1,79 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class RangeTests
+ {
+ [Test]
+ public void InRangeSucceeds()
+ {
+ Assert.That( 7, Is.InRange(5, 10) );
+ Assert.That(0.23, Is.InRange(-1.0, 1.0));
+ Assert.That(DateTime.Parse("12-December-2008"),
+ Is.InRange(DateTime.Parse("1-October-2008"), DateTime.Parse("31-December-2008")));
+ }
+
+ [Test]
+ public void InRangeFails()
+ {
+ string expectedMessage = string.Format(" Expected: in range (5,10){0} But was: 12{0}",
+ Env.NewLine);
+
+ Assert.That(
+ new TestDelegate( FailingInRangeMethod ),
+ Throws.TypeOf(typeof(AssertionException)).With.Message.EqualTo(expectedMessage));
+ }
+
+ private void FailingInRangeMethod()
+ {
+ Assert.That(12, Is.InRange(5, 10));
+ }
+
+ [Test]
+ public void NotInRangeSucceeds()
+ {
+ Assert.That(12, Is.Not.InRange(5, 10));
+ Assert.That(2.57, Is.Not.InRange(-1.0, 1.0));
+ }
+
+ [Test]
+ public void NotInRangeFails()
+ {
+ string expectedMessage = string.Format(" Expected: not in range (5,10){0} But was: 7{0}",
+ Env.NewLine);
+
+ Assert.That(
+ new TestDelegate(FailingNotInRangeMethod),
+ Throws.TypeOf(typeof(AssertionException)).With.Message.EqualTo(expectedMessage));
+ }
+
+ private void FailingNotInRangeMethod()
+ {
+ Assert.That(7, Is.Not.InRange(5, 10));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/ReusableConstraintTests.cs b/external/guiunit/src/tests/Constraints/ReusableConstraintTests.cs
new file mode 100755
index 0000000..209a840
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ReusableConstraintTests.cs
@@ -0,0 +1,45 @@
+// ****************************************************************
+// Copyright 2012, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ [TestFixture]
+ public class ReusableConstraintTests
+ {
+ [Datapoints]
+ internal static readonly ReusableConstraint[] constraints = new ReusableConstraint[] {
+ Is.Not.Empty,
+ Is.Not.Null,
+ Has.Length.GreaterThan(3),
+ Has.Property("Length").EqualTo(4).And.StartsWith("te")
+ };
+
+ [Theory]
+ public void CanReuseReusableConstraintMultipleTimes(ReusableConstraint c)
+ {
+ string s = "test";
+
+ Assume.That(s, c);
+
+ Assert.That(s, c, "Should pass first time");
+ Assert.That(s, c, "Should pass second time");
+ Assert.That(s, c, "Should pass third time");
+ }
+
+ [Test]
+ public void CanCreateReusableConstraintByImplicitConversion()
+ {
+ ReusableConstraint c = Is.Not.Null;
+
+ string s = "test";
+ Assert.That(s, c, "Should pass first time");
+ Assert.That(s, c, "Should pass second time");
+ Assert.That(s, c, "Should pass third time");
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/SameAsTest.cs b/external/guiunit/src/tests/Constraints/SameAsTest.cs
new file mode 100755
index 0000000..8d41d94
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/SameAsTest.cs
@@ -0,0 +1,47 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class SameAsTest : ConstraintTestBase
+ {
+ private static readonly object obj1 = new object();
+ private static readonly object obj2 = new object();
+
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SameAsConstraint(obj1);
+ expectedDescription = "same as <System.Object>";
+ stringRepresentation = "<sameas System.Object>";
+ }
+
+ internal static object[] SuccessData = new object[] { obj1 };
+
+ internal static object[] FailureData = new object[] {
+ new TestCaseData( obj2, "<System.Object>" ),
+ new TestCaseData( 3, "3" ),
+ new TestCaseData( "Hello", "\"Hello\"" ) };
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Constraints/StartsWithConstraintTests.cs b/external/guiunit/src/tests/Constraints/StartsWithConstraintTests.cs
new file mode 100755
index 0000000..566df12
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/StartsWithConstraintTests.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class StartsWithConstraintTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new StartsWithConstraint("hello");
+ expectedDescription = "String starting with \"hello\"";
+ stringRepresentation = "<startswith \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "hello", "hello there" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "HELLO THERE", "\"HELLO THERE\"" ),
+ new TestCaseData( "I said hello", "\"I said hello\"" ),
+ new TestCaseData( "say hello to Fred", "\"say hello to Fred\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null , "null" ) };
+ }
+
+ [TestFixture]
+ public class StartsWithConstraintTestsIgnoringCase : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new StartsWithConstraint("hello").IgnoreCase;
+ expectedDescription = "String starting with \"hello\", ignoring case";
+ stringRepresentation = "<startswith \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "Hello", "HELLO there" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "What the hell?", "\"What the hell?\"" ),
+ new TestCaseData( "I said hello", "\"I said hello\"" ),
+ new TestCaseData( "say hello to Fred", "\"say hello to Fred\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null , "null" ) };
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/SubstringConstraintTests.cs b/external/guiunit/src/tests/Constraints/SubstringConstraintTests.cs
new file mode 100755
index 0000000..f61b856
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/SubstringConstraintTests.cs
@@ -0,0 +1,96 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class SubstringConstraintTests : ConstraintTestBase, IExpectException
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SubstringConstraint("hello");
+ expectedDescription = "String containing \"hello\"";
+ stringRepresentation = "<substring \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "hello", "hello there", "I said hello", "say hello to fred" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "HELLO", "\"HELLO\"" ),
+ new TestCaseData( "What the hell?", "\"What the hell?\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null, "null" ) };
+
+ public void HandleException(Exception ex)
+ {
+ string NL = Env.NewLine;
+
+ Assert.That(ex.Message, new EqualConstraint(
+ TextMessageWriter.Pfx_Expected + "String containing \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...\"" + NL +
+ TextMessageWriter.Pfx_Actual + "\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...\"" + NL));
+ }
+ }
+
+ [TestFixture]
+ public class SubstringConstraintTestsIgnoringCase : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new SubstringConstraint("hello").IgnoreCase;
+ expectedDescription = "String containing \"hello\", ignoring case";
+ stringRepresentation = "<substring \"hello\">";
+ }
+
+ internal object[] SuccessData = new object[] { "Hello", "HellO there", "I said HELLO", "say hello to fred" };
+
+ internal object[] FailureData = new object[] {
+ new TestCaseData( "goodbye", "\"goodbye\"" ),
+ new TestCaseData( "What the hell?", "\"What the hell?\"" ),
+ new TestCaseData( string.Empty, "<string.Empty>" ),
+ new TestCaseData( null, "null" ) };
+ }
+
+ //[TestFixture]
+ //public class EqualIgnoringCaseTest : ConstraintTest
+ //{
+ // [SetUp]
+ // public void SetUp()
+ // {
+ // Matcher = new EqualConstraint("Hello World!").IgnoreCase;
+ // Description = "\"Hello World!\", ignoring case";
+ // }
+
+ // internal object[] SuccessData = new object[] { "hello world!", "Hello World!", "HELLO world!" };
+
+ // internal object[] FailureData = new object[] { "goodbye", "Hello Friends!", string.Empty, null };
+
+
+ // internal string[] ActualValues = new string[] { "\"goodbye\"", "\"Hello Friends!\"", "<string.Empty>", "null" };
+ //}
+}
diff --git a/external/guiunit/src/tests/Constraints/TestDelegates.cs b/external/guiunit/src/tests/Constraints/TestDelegates.cs
new file mode 100755
index 0000000..d1d45eb
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/TestDelegates.cs
@@ -0,0 +1,35 @@
+// ****************************************************************
+// Copyright 2008, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org/?p=license&r=2.4
+// ****************************************************************
+using System;
+
+namespace NUnitLite.Tests
+{
+ public class TestDelegates
+ {
+ public static void ThrowsArgumentException()
+ {
+ throw new ArgumentException("myMessage", "myParam");
+ }
+
+ public static void ThrowsSystemException()
+ {
+ throw new Exception();
+ }
+
+ public static void ThrowsNothing()
+ {
+ }
+
+ public static void ThrowsDerivedException()
+ {
+ throw new DerivedException();
+ }
+
+ public class DerivedException : Exception
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/ThrowsConstraintTests.cs b/external/guiunit/src/tests/Constraints/ThrowsConstraintTests.cs
new file mode 100755
index 0000000..472a908
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ThrowsConstraintTests.cs
@@ -0,0 +1,107 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.TestUtilities;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class ThrowsConstraintTest_ExactType : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new ThrowsConstraint(
+ new ExactTypeConstraint(typeof(ArgumentException)));
+ expectedDescription = "<System.ArgumentException>";
+ stringRepresentation = "<throws <typeof System.ArgumentException>>";
+ }
+
+ internal static object[] SuccessData = new object[]
+ {
+ new TestDelegate( TestDelegates.ThrowsArgumentException )
+ };
+
+ internal static object[] FailureData = new object[]
+ {
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsNothing ), "no exception thrown" ),
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsSystemException ), "<System.Exception>" )
+ };
+ }
+
+ [TestFixture]
+ public class ThrowsConstraintTest_InstanceOfType : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new ThrowsConstraint(
+ new InstanceOfTypeConstraint(typeof(TestDelegates.CustomException)));
+ expectedDescription = "instance of <NUnit.TestUtilities.TestDelegates+CustomException>";
+ stringRepresentation = "<throws <instanceof NUnit.TestUtilities.TestDelegates+CustomException>>";
+ }
+
+ internal static object[] SuccessData = new object[]
+ {
+ new TestDelegate( TestDelegates.ThrowsCustomException ),
+ new TestDelegate( TestDelegates.ThrowsDerivedCustomException )
+ };
+
+ internal static object[] FailureData = new object[]
+ {
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsArgumentException ), "<System.ArgumentException>" ),
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsNothing ), "no exception thrown" ),
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsSystemException ), "<System.Exception>" )
+ };
+ }
+
+// TODO: Find a different example for use with NETCF - ArgumentException does not have a ParamName member
+#if !NETCF && !SILVERLIGHT
+ public class ThrowsConstraintTest_WithConstraint : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new ThrowsConstraint(
+ new AndConstraint(
+ new ExactTypeConstraint(typeof(ArgumentException)),
+ new PropertyConstraint("ParamName", new EqualConstraint("myParam"))));
+ expectedDescription = @"<System.ArgumentException> and property ParamName equal to ""myParam""";
+ stringRepresentation = @"<throws <and <typeof System.ArgumentException> <property ParamName <equal ""myParam"">>>>";
+ }
+
+ internal static object[] SuccessData = new object[]
+ {
+ new TestDelegate( TestDelegates.ThrowsArgumentException )
+ };
+
+ internal static object[] FailureData = new object[]
+ {
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsCustomException ), "<NUnit.TestUtilities.TestDelegates+CustomException>" ),
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsNothing ), "no exception thrown" ),
+ new TestCaseData( new TestDelegate( TestDelegates.ThrowsSystemException ), "<System.Exception>" )
+ };
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/Constraints/ToStringTests.cs b/external/guiunit/src/tests/Constraints/ToStringTests.cs
new file mode 100755
index 0000000..efdec05
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/ToStringTests.cs
@@ -0,0 +1,69 @@
+// ****************************************************************
+// Copyright 2010, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+
+namespace NUnit.Framework.Constraints
+{
+ public class ToStringTests
+ {
+ [Test]
+ public void CanDisplaySimpleConstraints_Unresolved()
+ {
+ Assert.That(Is.EqualTo(5).ToString(), Is.EqualTo("<equal 5>"));
+ Assert.That(Has.Property("X").ToString(), Is.EqualTo("<propertyexists X>"));
+ Assert.That(Has.Attribute(typeof(TestAttribute)).ToString(),
+ Is.EqualTo("<attributeexists NUnit.Framework.TestAttribute>"));
+ }
+
+ [Test]
+ public void CanDisplaySimpleConstraints_Resolved()
+ {
+ IResolveConstraint constraint = Is.EqualTo(5);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<equal 5>"));
+ constraint = Has.Property("X");
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<propertyexists X>"));
+ constraint = Has.Attribute(typeof(TestAttribute)).With.Property("Description").EqualTo("smoke");
+ Assert.That(constraint.Resolve().ToString(),
+ Is.EqualTo("<attribute NUnit.Framework.TestAttribute <property Description <equal \"smoke\">>>"));
+ }
+
+ [Test]
+ public void DisplayPrefixConstraints_Unresolved()
+ {
+ Assert.That(Is.Not.EqualTo(5).ToString(), Is.EqualTo("<unresolved <equal 5>>"));
+ Assert.That(Is.Not.All.EqualTo(5).ToString(), Is.EqualTo("<unresolved <equal 5>>"));
+ Assert.That(Has.Property("X").EqualTo(5).ToString(), Is.EqualTo("<unresolved <equal 5>>"));
+ Assert.That(Has.Attribute(typeof(TestAttribute)).With.Property("Description").EqualTo("smoke").ToString(),
+ Is.EqualTo("<unresolved <equal \"smoke\">>"));
+ }
+
+ [Test]
+ public void CanDisplayPrefixConstraints_Resolved()
+ {
+ IResolveConstraint constraint = Is.Not.EqualTo(5);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<not <equal 5>>"));
+ constraint = Is.Not.All.EqualTo(5);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<not <all <equal 5>>>"));
+ constraint = Has.Property("X").EqualTo(5);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<property X <equal 5>>"));
+ }
+
+ [Test]
+ public void DisplayBinaryConstraints_Resolved()
+ {
+ IResolveConstraint constraint = Is.GreaterThan(0).And.LessThan(100);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<and <greaterthan 0> <lessthan 100>>"));
+ }
+
+ [Test]
+ public void DisplayBinaryConstraints_UnResolved()
+ {
+ IResolveConstraint constraint = Is.GreaterThan(0).And.LessThan(100);
+ Assert.That(constraint.ToString(), Is.EqualTo("<unresolved <lessthan 100>>"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/UniqueItemsConstraintTests.cs b/external/guiunit/src/tests/Constraints/UniqueItemsConstraintTests.cs
new file mode 100755
index 0000000..41bcc8c
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/UniqueItemsConstraintTests.cs
@@ -0,0 +1,42 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Internal;
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class UniqueItemsTests : ConstraintTestBase
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new UniqueItemsConstraint();
+ stringRepresentation = "<uniqueitems>";
+ expectedDescription = "all items unique";
+ }
+
+ internal object[] SuccessData = new object[] { new int[] { 1, 3, 17, -2, 34 }, new object[0] };
+ internal object[] FailureData = new object[] { new object[] { new int[] { 1, 3, 17, 3, 34 }, "< 1, 3, 17, 3, 34 >" } };
+ }
+}
diff --git a/external/guiunit/src/tests/Constraints/XmlSerializableTest.cs b/external/guiunit/src/tests/Constraints/XmlSerializableTest.cs
new file mode 100755
index 0000000..cfe4c14
--- /dev/null
+++ b/external/guiunit/src/tests/Constraints/XmlSerializableTest.cs
@@ -0,0 +1,65 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !SILVERLIGHT
+
+using System;
+using System.Collections;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Constraints.Tests
+{
+ [TestFixture]
+ public class XmlSerializableTest : ConstraintTestBaseWithArgumentException
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ theConstraint = new XmlSerializableConstraint();
+ expectedDescription = "xml serializable";
+ stringRepresentation = "<xmlserializable>";
+ }
+
+ internal object[] SuccessData = new object[] { 1, "a", new ArrayList() };
+
+ internal object[] FailureData = new object[] {
+#if CLR_2_0 || CLR_4_0
+ new TestCaseData( new Dictionary<string, string>(), "<Dictionary`2>" ),
+#endif
+ new TestCaseData( new InternalClass(), "<InternalClass>" ),
+ new TestCaseData( new InternalWithSerializableAttributeClass(), "<InternalWithSerializableAttributeClass>" )
+ };
+
+ internal object[] InvalidData = new object[] { null };
+ }
+
+ internal class InternalClass
+ { }
+
+ [Serializable]
+ internal class InternalWithSerializableAttributeClass
+ { }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Framework/StackFilterTest.cs b/external/guiunit/src/tests/Framework/StackFilterTest.cs
new file mode 100755
index 0000000..1fc6381
--- /dev/null
+++ b/external/guiunit/src/tests/Framework/StackFilterTest.cs
@@ -0,0 +1,80 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Tests
+{
+ [TestFixture]
+ class StackFilterTest
+ {
+ private static readonly string NL = NUnit.Env.NewLine;
+
+ private static readonly string rawTrace1 =
+ @" at NUnit.Framework.Assert.Fail(String message) in D:\Dev\NUnitLite\NUnitLite\Framework\Assert.cs:line 56" + NL +
+ @" at NUnit.Framework.Assert.That(String label, Object actual, Matcher expectation, String message) in D:\Dev\NUnitLite\NUnitLite\Framework\Assert.cs:line 50" + NL +
+ @" at NUnit.Framework.Assert.That(Object actual, Matcher expectation) in D:\Dev\NUnitLite\NUnitLite\Framework\Assert.cs:line 19" + NL +
+ @" at NUnit.Tests.GreaterThanMatcherTest.MatchesGoodValue() in D:\Dev\NUnitLite\NUnitLiteTests\GreaterThanMatcherTest.cs:line 12" + NL;
+
+ private static readonly string filteredTrace1 =
+ @" at NUnit.Tests.GreaterThanMatcherTest.MatchesGoodValue() in D:\Dev\NUnitLite\NUnitLiteTests\GreaterThanMatcherTest.cs:line 12" + NL;
+
+ private static readonly string rawTrace2 =
+ @" at NUnit.Framework.Assert.Fail(String message, Object[] args)" + NL +
+ @" at MyNamespace.MyAppsTests.AssertFailTest()" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess, StackCrawlMark& stackMark)" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)" + NL +
+ @" at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)" + NL +
+ @" at NUnitLite.ProxyTestCase.InvokeMethod(MethodInfo method, Object[] args)" + NL +
+ @" at NUnit.Framework.TestCase.RunTest()" + NL +
+ @" at NUnit.Framework.TestCase.RunBare()" + NL +
+ @" at NUnit.Framework.TestCase.Run(TestResult result, TestListener listener)" + NL +
+ @" at NUnit.Framework.TestCase.Run(TestListener listener)" + NL +
+ @" at NUnit.Framework.TestSuite.Run(TestListener listener)" + NL +
+ @" at NUnit.Framework.TestSuite.Run(TestListener listener)" + NL +
+ @" at NUnitLite.Runner.TestRunner.Run(ITest test)" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Run(ITest test)" + NL +
+ @" at NUnitLite.Runner.TestRunner.Run(Assembly assembly)" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Run()" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Main(String[] args)" + NL +
+ @" at OpenNETCF.Linq.Demo.Program.Main(String[] args)" + NL;
+
+ private static readonly string filteredTrace2 =
+ @" at MyNamespace.MyAppsTests.AssertFailTest()" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess, StackCrawlMark& stackMark)" + NL +
+ @" at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)" + NL +
+ @" at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)" + NL +
+ @" at NUnitLite.ProxyTestCase.InvokeMethod(MethodInfo method, Object[] args)" + NL +
+ @" at NUnit.Framework.TestCase.RunTest()" + NL +
+ @" at NUnit.Framework.TestCase.RunBare()" + NL +
+ @" at NUnit.Framework.TestCase.Run(TestResult result, TestListener listener)" + NL +
+ @" at NUnit.Framework.TestCase.Run(TestListener listener)" + NL +
+ @" at NUnit.Framework.TestSuite.Run(TestListener listener)" + NL +
+ @" at NUnit.Framework.TestSuite.Run(TestListener listener)" + NL +
+ @" at NUnitLite.Runner.TestRunner.Run(ITest test)" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Run(ITest test)" + NL +
+ @" at NUnitLite.Runner.TestRunner.Run(Assembly assembly)" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Run()" + NL +
+ @" at NUnitLite.Runner.ConsoleUI.Main(String[] args)" + NL +
+ @" at OpenNETCF.Linq.Demo.Program.Main(String[] args)" + NL;
+
+ [Test]
+ public void FilterFailureTrace1()
+ {
+ Assert.That(StackFilter.Filter(rawTrace1), Is.EqualTo(filteredTrace1));
+ }
+
+ [Test]
+ public void FilterFailureTrace2()
+ {
+ Assert.That(StackFilter.Filter(rawTrace2), Is.EqualTo(filteredTrace2));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Framework/SyntaxTests.cs b/external/guiunit/src/tests/Framework/SyntaxTests.cs
new file mode 100755
index 0000000..9d845c4
--- /dev/null
+++ b/external/guiunit/src/tests/Framework/SyntaxTests.cs
@@ -0,0 +1,196 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+namespace NUnitLite.Tests
+{
+ [TestFixture]
+ public class SyntaxTests
+ {
+ [Test]
+ public void NullTests()
+ {
+ object myObject = null;
+ Assert.That(myObject, Is.Null);
+ Assert.Null(null);
+ }
+
+ [Test]
+ public void NotNullTests()
+ {
+ Assert.That(42, Is.Not.Null);
+ Assert.NotNull(42);
+ }
+
+ [Test]
+ public void TrueTests()
+ {
+ Assert.That(true, Is.True);
+ Assert.True(true);
+ }
+
+ [Test]
+ public void FalseTests()
+ {
+ Assert.That(false, Is.False);
+ Assert.False(false);
+ }
+
+ [Test]
+ public void NaNTests()
+ {
+ Assert.That(double.NaN, Is.NaN);
+ Assert.That(float.NaN, Is.NaN);
+ }
+
+ [Test]
+ public void EmptyTests()
+ {
+ Assert.That("", Is.Empty);
+ Assert.That(new bool[0], Is.Empty);
+ Assert.That(new int[] { 1, 2, 3 }, Is.Not.Empty);
+ }
+
+ [Test]
+ public void TypeTests()
+ {
+ Assert.That("Hello", Is.TypeOf(typeof(string)));
+ Assert.That("Hello", Is.InstanceOf(typeof(string)));
+ Assert.That("Hello".GetType(), Is.EqualTo(typeof(string)));
+ Assert.That("Hello".GetType().FullName, Is.EqualTo("System.String"));
+ }
+
+ [Test]
+ public void StringTests()
+ {
+ string phrase = "Hello World!";
+ Assert.That(phrase, Is.Not.Empty);
+ Assert.That(phrase, Is.StringContaining("World"));
+ Assert.That(phrase, Is.StringStarting("Hello"));
+ Assert.That(phrase, Is.StringEnding("!"));
+ Assert.That(phrase, Is.EqualTo("hello world!").IgnoreCase);
+ Assert.That(new string[] { "Hello", "World" }, Is.EqualTo( new object[] { "HELLO", "WORLD" } ).IgnoreCase);
+ Assert.That("", Is.Empty);
+ }
+
+ [Test]
+ public void EqualToTests()
+ {
+ Assert.That(2 + 2, Is.EqualTo(4));
+ Assert.That(2 + 2 == 4);
+ Assert.That(new int[] { 1, 2, 3 }, Is.EqualTo(new double[] { 1.0, 2.0, 3.0 }));
+ }
+
+ [Test]
+ public void ComparisonTests()
+ {
+ Assert.That(7, Is.GreaterThan(3));
+ Assert.That(7, Is.GreaterThanOrEqualTo(3));
+ Assert.That(7, Is.AtLeast(3));
+ Assert.That(7, Is.GreaterThanOrEqualTo(7));
+ Assert.That(7, Is.AtLeast(7));
+
+ Assert.That(3, Is.LessThan(7));
+ Assert.That(3, Is.LessThanOrEqualTo(7));
+ Assert.That(3, Is.AtMost(7));
+ Assert.That(3, Is.LessThanOrEqualTo(3));
+ Assert.That(3, Is.AtMost(3));
+ }
+
+ [Test]
+ public void AllItemsTests()
+ {
+ object[] c = new object[] { 1, 2, 3, 4 };
+ Assert.That(c, Is.All.Not.Null);
+ Assert.That(c, Is.All.InstanceOf(typeof(int)));
+ }
+
+ [Test]
+ public void CollectionContainsTests()
+ {
+ Assert.That(new int[] { 1, 2, 3 }, Contains.Item(3));
+ Assert.That(new string[] { "a", "b", "c" }, Contains.Item("b"));
+ }
+
+ [Test]
+ public void CollectionEquivalenceTests()
+ {
+ int[] ints1to5 = new int[] { 1, 2, 3, 4, 5 };
+ Assert.That(new int[] { 2, 1, 4, 3, 5 }, Is.EquivalentTo(ints1to5));
+ Assert.That(new int[] { 2, 2, 4, 3, 5 }, Is.Not.EquivalentTo(ints1to5));
+ Assert.That(new int[] { 2, 4, 3, 5 }, Is.Not.EquivalentTo(ints1to5));
+ Assert.That(new int[] { 2, 2, 1, 1, 4, 3, 5 }, Is.Not.EquivalentTo(ints1to5));
+ Assert.That(new int[] { 1, 2, 2, 2, 5 }, Is.Not.EquivalentTo(ints1to5));
+ }
+
+ [Test]
+ public void SubsetTests()
+ {
+ int[] ints1to5 = new int[] { 1, 2, 3, 4, 5 };
+ Assert.That(new int[] { 1, 3, 5 }, Is.SubsetOf(ints1to5));
+ Assert.That(new int[] { 1, 2, 3, 4, 5 }, Is.SubsetOf(ints1to5));
+ Assert.That(new int[] { 2, 4, 6 }, Is.Not.SubsetOf(ints1to5));
+ }
+
+ [Test]
+ public void NotTests()
+ {
+ Assert.That(42, Is.Not.Null);
+ Assert.That(42, Is.Not.True);
+ Assert.That(42, Is.Not.False);
+ Assert.That(42, !Is.Null);
+ Assert.That(2.5, Is.Not.NaN);
+ Assert.That(2 + 2, Is.Not.EqualTo(3));
+ Assert.That(2 + 2, Is.Not.Not.EqualTo(4));
+ Assert.That(2 + 2, Is.Not.Not.Not.EqualTo(5));
+ }
+
+ [Test]
+ public void AndTests()
+ {
+ Assert.That(7, Is.GreaterThan(5) & Is.LessThan(10));
+ }
+
+ [Test]
+ public void OrTests()
+ {
+ Assert.That(3, Is.LessThan(5) | Is.GreaterThan(10));
+ }
+
+ [Test]
+ public void ComplexTests()
+ {
+ Assert.That(7, Is.Not.Null & Is.Not.LessThan(5) & Is.Not.GreaterThan(10));
+ Assert.That(7, !Is.Null & !Is.LessThan(5) & !Is.GreaterThan(10));
+// TODO: Remove #if when mono compiler can handle null
+#if MONO
+ Constraint x = null;
+ Assert.That(7, !x & !Is.LessThan(5) & !Is.GreaterThan(10));
+#else
+ Assert.That(7, !(Constraint)null & !Is.LessThan(5) & !Is.GreaterThan(10));
+#endif
+ }
+
+ // This method contains assertions that should not compile
+ // You can check by uncommenting it.
+ //public void WillNotCompile()
+ //{
+ // Assert.That(42, Is.Not);
+ // Assert.That(42, Is.All);
+ // Assert.That(42, Is.Null.Not);
+ // Assert.That(42, Is.Not.Null.GreaterThan(10));
+ // Assert.That(42, Is.GreaterThan(10).LessThan(99));
+
+ // object[] c = new object[0];
+ // Assert.That(c, Is.Null.All);
+ // Assert.That(c, Is.Not.All);
+ // Assert.That(c, Is.All.Not);
+ //}
+ }
+}
diff --git a/external/guiunit/src/tests/Framework/TestContextTests.cs b/external/guiunit/src/tests/Framework/TestContextTests.cs
new file mode 100755
index 0000000..64a8d8c
--- /dev/null
+++ b/external/guiunit/src/tests/Framework/TestContextTests.cs
@@ -0,0 +1,103 @@
+// ****************************************************************
+// Copyright 2012, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+using System.IO;
+using NUnit.Framework;
+using NUnit.TestData.TestContextData;
+using NUnit.TestUtilities;
+using System.Reflection;
+
+namespace NUnit.Framework.Tests
+{
+ [TestFixture]
+ public class TestContextTests
+ {
+ [Test]
+ public void TestCanAccessItsOwnName()
+ {
+ Assert.That(TestContext.CurrentContext.Test.Name, Is.EqualTo("TestCanAccessItsOwnName"));
+ }
+
+ [Test]
+ public void TestCanAccessItsOwnFullName()
+ {
+ Assert.That(TestContext.CurrentContext.Test.FullName,
+ Is.EqualTo("NUnit.Framework.Tests.TestContextTests.TestCanAccessItsOwnFullName"));
+ }
+
+ [Test]
+ [Property("Answer", 42)]
+ public void TestCanAccessItsOwnProperties()
+ {
+ Assert.That(TestContext.CurrentContext.Test.Properties.Get("Answer"), Is.EqualTo(42));
+ }
+
+#if !NETCF
+ [Test]
+ public void TestCanAccessTestDirectory()
+ {
+ string testDirectory = TestContext.CurrentContext.TestDirectory;
+ Assert.NotNull(testDirectory);
+ Assert.That(Directory.Exists(testDirectory), "Directory not found: {0}", testDirectory);
+ Assert.That(File.Exists(Path.Combine(testDirectory, "nunitlite.tests.exe")));
+ }
+#endif
+
+ [Test]
+ public void TestCanAccessWorkDirectory()
+ {
+ string workDirectory = TestContext.CurrentContext.WorkDirectory;
+ Assert.NotNull(workDirectory);
+ Assert.That(Directory.Exists(workDirectory), string.Format("Directory {0} does not exist", workDirectory));
+ }
+
+ [Test]
+ public void TestCanAccessTestState_PassingTest()
+ {
+ TestStateRecordingFixture fixture = new TestStateRecordingFixture();
+ TestBuilder.RunTestFixture(fixture);
+ Assert.That(fixture.stateList, Is.EqualTo("Inconclusive=>Inconclusive=>Passed"));
+ //Assert.That(fixture.statusList, Is.EqualTo("Inconclusive=>Inconclusive=>Passed"));
+ }
+
+ [Test]
+ public void TestCanAccessTestState_FailureInSetUp()
+ {
+ TestStateRecordingFixture fixture = new TestStateRecordingFixture();
+ fixture.setUpFailure = true;
+ TestBuilder.RunTestFixture(fixture);
+ Assert.That(fixture.stateList, Is.EqualTo("Inconclusive=>=>Failed"));
+ //Assert.That(fixture.statusList, Is.EqualTo("Inconclusive=>=>Failed"));
+ }
+
+ [Test]
+ public void TestCanAccessTestState_FailingTest()
+ {
+ TestStateRecordingFixture fixture = new TestStateRecordingFixture();
+ fixture.testFailure = true;
+ TestBuilder.RunTestFixture(fixture);
+ Assert.That(fixture.stateList, Is.EqualTo("Inconclusive=>Inconclusive=>Failed"));
+ //Assert.That(fixture.statusList, Is.EqualTo("Inconclusive=>Inconclusive=>Failed"));
+ }
+
+ [Test]
+ public void TestCanAccessTestState_IgnoredInSetUp()
+ {
+ TestStateRecordingFixture fixture = new TestStateRecordingFixture();
+ fixture.setUpIgnore = true;
+ TestBuilder.RunTestFixture(fixture);
+ Assert.That(fixture.stateList, Is.EqualTo("Inconclusive=>=>Skipped:Ignored"));
+ //Assert.That(fixture.statusList, Is.EqualTo("Inconclusive=>=>Skipped"));
+ }
+
+ //[Test, RequiresThread]
+ //public void CanAccessTestContextOnSeparateThread()
+ //{
+ // Assert.That(TestContext.CurrentContext.Test.Name, Is.EqualTo("CanAccessTestContextOnSeparateThread"));
+ //}
+ }
+}
diff --git a/external/guiunit/src/tests/Framework/TestResultTests.cs b/external/guiunit/src/tests/Framework/TestResultTests.cs
new file mode 100755
index 0000000..8de0089
--- /dev/null
+++ b/external/guiunit/src/tests/Framework/TestResultTests.cs
@@ -0,0 +1,83 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Tests
+{
+ [TestFixture]
+ public class TestResultTests
+ {
+ private static readonly string MESSAGE = "my message";
+ private static readonly string STACKTRACE = "stack trace";
+
+ private TestResult result;
+
+ [SetUp]
+ public void SetUp()
+ {
+ result = new TestCaseResult(null);
+ }
+
+ void VerifyResultState(ResultState expectedState, string message )
+ {
+ Assert.That( result.ResultState , Is.EqualTo( expectedState ) );
+ //if ( expectedState == ResultState.Error )
+ // Assert.That(result.Message, Is.EqualTo("System.Exception : " + message));
+ //else
+ Assert.That(result.Message, Is.EqualTo(message));
+ }
+
+ [Test]
+ public void DefaultStateIsInconclusive()
+ {
+ VerifyResultState(ResultState.Inconclusive, null);
+ }
+
+ [Test]
+ public void CanMarkAsSuccess()
+ {
+ result.SetResult(ResultState.Success);
+ VerifyResultState(ResultState.Success, null);
+ }
+
+ [Test]
+ public void CanMarkAsFailure()
+ {
+ result.SetResult(ResultState.Failure, MESSAGE, STACKTRACE);
+ VerifyResultState(ResultState.Failure, MESSAGE);
+ Assert.That( result.StackTrace, Is.EqualTo( STACKTRACE ) );
+ }
+
+ [Test]
+ public void CanMarkAsError()
+ {
+ Exception caught;
+ try
+ {
+ throw new Exception(MESSAGE);
+ }
+ catch(Exception ex)
+ {
+ caught = ex;
+ }
+
+ result.SetResult(ResultState.Error, caught.Message, caught.StackTrace);
+ VerifyResultState(ResultState.Error, MESSAGE);
+ Assert.That( result.StackTrace, Is.EqualTo( caught.StackTrace ) );
+ }
+
+ [Test]
+ public void CanMarkAsIgnored()
+ {
+ result.SetResult(ResultState.Ignored, MESSAGE);
+ VerifyResultState(ResultState.Ignored, MESSAGE);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/AssemblyHelperTests.cs b/external/guiunit/src/tests/Internal/AssemblyHelperTests.cs
new file mode 100755
index 0000000..01803fb
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/AssemblyHelperTests.cs
@@ -0,0 +1,84 @@
+// ***********************************************************************
+// Copyright (c) 2012 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if !NETCF
+using System;
+using System.IO;
+using System.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class AssemblyHelperTests
+ {
+ [Test]
+ public void GetPathForAssembly()
+ {
+ string path = AssemblyHelper.GetAssemblyPath(this.GetType().Assembly);
+ Assert.That(Path.GetFileName(path), Is.EqualTo("nunitlite.tests.exe").IgnoreCase);
+ Assert.That(File.Exists(path));
+ }
+
+ //[Test]
+ //public void GetPathForType()
+ //{
+ // string path = AssemblyHelper.GetAssemblyPath(this.GetType());
+ // Assert.That(Path.GetFileName(path), Is.EqualTo("nunitlite.tests.exe").IgnoreCase);
+ // Assert.That(File.Exists(path));
+ //}
+
+ // The following tests are only useful to the extent that the test cases
+ // match what will actually be provided to the method in production.
+ // As currently used, NUnit's codebase can only use the file: schema,
+ // since we don't load assemblies from anything but files. The uri's
+ // provided can be absolute file paths or UNC paths.
+
+ // Local paths - Windows Drive
+ [TestCase(@"file:///C:/path/to/assembly.dll", @"C:\path\to\assembly.dll")]
+ [TestCase(@"file:///C:/my path/to my/assembly.dll", @"C:/my path/to my/assembly.dll")]
+ [TestCase(@"file:///C:/dev/C#/assembly.dll", @"C:\dev\C#\assembly.dll")]
+ [TestCase(@"file:///C:/dev/funnychars?:=/assembly.dll", @"C:\dev\funnychars?:=\assembly.dll")]
+ // Local paths - Linux or Windows absolute without a drive
+ [TestCase(@"file:///path/to/assembly.dll", @"/path/to/assembly.dll")]
+ [TestCase(@"file:///my path/to my/assembly.dll", @"/my path/to my/assembly.dll")]
+ [TestCase(@"file:///dev/C#/assembly.dll", @"/dev/C#/assembly.dll")]
+ [TestCase(@"file:///dev/funnychars?:=/assembly.dll", @"/dev/funnychars?:=/assembly.dll")]
+ // Windows drive specified as if it were a server - odd case, sometimes seen
+ [TestCase(@"file://C:/path/to/assembly.dll", @"C:\path\to\assembly.dll")]
+ [TestCase(@"file://C:/my path/to my/assembly.dll", @"C:\my path\to my\assembly.dll")]
+ [TestCase(@"file://C:/dev/C#/assembly.dll", @"C:\dev\C#\assembly.dll")]
+ [TestCase(@"file://C:/dev/funnychars?:=/assembly.dll", @"C:\dev\funnychars?:=\assembly.dll")]
+ // UNC format with server and path
+ [TestCase(@"file://server/path/to/assembly.dll", @"//server/path/to/assembly.dll")]
+ [TestCase(@"file://server/my path/to my/assembly.dll", @"//server/my path/to my/assembly.dll")]
+ [TestCase(@"file://server/dev/C#/assembly.dll", @"//server/dev/C#/assembly.dll")]
+ [TestCase(@"file://server/dev/funnychars?:=/assembly.dll", @"//server/dev/funnychars?:=/assembly.dll")]
+ //[TestCase(@"http://server/path/to/assembly.dll", "//server/path/to/assembly.dll")]
+ public void GetAssemblyPathFromCodeBase(string uri, string expectedPath)
+ {
+ string localPath = AssemblyHelper.GetAssemblyPathFromCodeBase(uri);
+ Assert.That(localPath, Is.SamePath(expectedPath));
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Internal/AsyncTestMethodTests.cs b/external/guiunit/src/tests/Internal/AsyncTestMethodTests.cs
new file mode 100755
index 0000000..08491de
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/AsyncTestMethodTests.cs
@@ -0,0 +1,113 @@
+#if NET_4_5
+using System.Collections;
+using System.Reflection;
+using System.Threading;
+using NUnit.Framework.Api;
+using NUnit.Framework.Builders;
+using NUnit.TestData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class NUnitAsyncTestMethodTests
+ {
+ private NUnitTestCaseBuilder _builder;
+ private object _testObject;
+
+ [SetUp]
+ public void Setup()
+ {
+ _builder = new NUnitTestCaseBuilder();
+ _testObject = new AsyncRealFixture();
+ }
+
+ public IEnumerable TestCases
+ {
+ get
+ {
+ yield return new object[] { Method("AsyncVoidSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncVoidFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("AsyncVoidError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("AsyncTaskSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncTaskFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("AsyncTaskError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("AsyncTaskResultSuccess"), ResultState.NotRunnable, 0 };
+ yield return new object[] { Method("AsyncTaskResultFailure"), ResultState.NotRunnable, 0 };
+ yield return new object[] { Method("AsyncTaskResultError"), ResultState.NotRunnable, 0 };
+
+ yield return new object[] { Method("AsyncTaskResultCheckSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncVoidTestCaseWithParametersSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncTaskResultCheckSuccessReturningNull"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncTaskResultCheckFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("AsyncTaskResultCheckError"), ResultState.Failure, 0 };
+
+ yield return new object[] { Method("AsyncVoidExpectedException"), ResultState.Success, 0 };
+ yield return new object[] { Method("AsyncTaskExpectedException"), ResultState.Success, 0 };
+ yield return new object[] { Method("AsyncTaskResultExpectedException"), ResultState.NotRunnable, 0 };
+
+ yield return new object[] { Method("NestedAsyncVoidSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("NestedAsyncVoidFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("NestedAsyncVoidError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("NestedAsyncTaskSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("NestedAsyncTaskFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("NestedAsyncTaskError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("AsyncVoidMultipleSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncVoidMultipleFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("AsyncVoidMultipleError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("AsyncTaskMultipleSuccess"), ResultState.Success, 1 };
+ yield return new object[] { Method("AsyncTaskMultipleFailure"), ResultState.Failure, 1 };
+ yield return new object[] { Method("AsyncTaskMultipleError"), ResultState.Error, 0 };
+
+ yield return new object[] { Method("VoidCheckTestContextAcrossTasks"), ResultState.Success, 2 };
+ yield return new object[] { Method("VoidCheckTestContextWithinTestBody"), ResultState.Success, 2 };
+ yield return new object[] { Method("TaskCheckTestContextAcrossTasks"), ResultState.Success, 2 };
+ yield return new object[] { Method("TaskCheckTestContextWithinTestBody"), ResultState.Success, 2 };
+
+ yield return new object[] { Method("VoidAsyncVoidChildCompletingEarlierThanTest"), ResultState.Success, 0 };
+ yield return new object[] { Method("VoidAsyncVoidChildThrowingImmediately"), ResultState.Success, 0 };
+ }
+ }
+
+ [Test]
+ [TestCaseSource("TestCases")]
+ public void RunTests(MethodInfo method, ResultState resultState, int assertionCount)
+ {
+ var test = _builder.BuildFrom(method);
+ var result = TestBuilder.RunTest(test, _testObject);
+
+ Assert.That(result.ResultState, Is.EqualTo(resultState), "Wrong result state");
+ Assert.That(result.AssertCount, Is.EqualTo(assertionCount), "Wrong assertion count");
+ }
+
+ [Test]
+ public void SynchronizationContextSwitching()
+ {
+ var context = new CustomSynchronizationContext();
+
+ SynchronizationContext.SetSynchronizationContext(context);
+
+ var test = _builder.BuildFrom(Method("AsyncVoidAssertSynchronizationContext"));
+ var result = TestBuilder.RunTest(test, _testObject);
+
+ Assert.AreSame(context, SynchronizationContext.Current);
+ Assert.That(result.ResultState, Is.EqualTo(ResultState.Success), "Wrong result state");
+ Assert.That(result.AssertCount, Is.EqualTo(0), "Wrong assertion count");
+ }
+
+ private static MethodInfo Method(string name)
+ {
+ return typeof (AsyncRealFixture).GetMethod(name);
+ }
+
+ public class CustomSynchronizationContext : SynchronizationContext
+ {
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Internal/CultureSettingAndDetectionTests.cs b/external/guiunit/src/tests/Internal/CultureSettingAndDetectionTests.cs
new file mode 100755
index 0000000..7b50729
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/CultureSettingAndDetectionTests.cs
@@ -0,0 +1,181 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Threading;
+using System.Globalization;
+using NUnit.Framework.Api;
+using NUnit.TestData.CultureAttributeData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Summary description for CultureDetectionTests.
+ /// </summary>
+ [TestFixture]
+ public class CultureSettingAndDetectionTests
+ {
+ private NUnit.Framework.Internal.CultureDetector detector = new NUnit.Framework.Internal.CultureDetector("fr-FR");
+
+ private void ExpectMatch( string culture )
+ {
+ if ( !detector.IsCultureSupported( culture ) )
+ Assert.Fail( string.Format( "Failed to match \"{0}\"" , culture ) );
+ }
+
+ private void ExpectMatch( CultureAttribute attr )
+ {
+ if ( !detector.IsCultureSupported( attr ) )
+ Assert.Fail( string.Format( "Failed to match attribute with Include=\"{0}\",Exclude=\"{1}\"", attr.Include, attr.Exclude ) );
+ }
+
+ private void ExpectFailure( string culture )
+ {
+ if ( detector.IsCultureSupported( culture ) )
+ Assert.Fail( string.Format( "Should not match \"{0}\"" , culture ) );
+ Assert.AreEqual( "Only supported under culture " + culture, detector.Reason );
+ }
+
+ private void ExpectFailure( CultureAttribute attr, string msg )
+ {
+ if ( detector.IsCultureSupported( attr ) )
+ Assert.Fail( string.Format( "Should not match attribute with Include=\"{0}\",Exclude=\"{1}\"",
+ attr.Include, attr.Exclude ) );
+ Assert.AreEqual( msg, detector.Reason );
+ }
+
+ [Test]
+ public void CanMatchStrings()
+ {
+ ExpectMatch( "fr-FR" );
+ ExpectMatch( "fr" );
+ ExpectMatch( "fr-FR,fr-BE,fr-CA" );
+ ExpectMatch( "en,de,fr,it" );
+ ExpectFailure( "en-GB" );
+ ExpectFailure( "en" );
+ ExpectFailure( "fr-CA" );
+ ExpectFailure( "fr-BE,fr-CA" );
+ ExpectFailure( "en,de,it" );
+ }
+
+ [Test]
+ public void CanMatchAttributeWithInclude()
+ {
+ ExpectMatch( new CultureAttribute( "fr-FR" ) );
+ ExpectMatch( new CultureAttribute( "fr-FR,fr-BE,fr-CA" ) );
+ ExpectFailure( new CultureAttribute( "en" ), "Only supported under culture en" );
+ ExpectFailure( new CultureAttribute( "en,de,it" ), "Only supported under culture en,de,it" );
+ }
+
+ [Test]
+ public void CanMatchAttributeWithExclude()
+ {
+ CultureAttribute attr = new CultureAttribute();
+ attr.Exclude = "en";
+ ExpectMatch( attr );
+ attr.Exclude = "en,de,it";
+ ExpectMatch( attr );
+ attr.Exclude = "fr";
+ ExpectFailure( attr, "Not supported under culture fr");
+ attr.Exclude = "fr-FR,fr-BE,fr-CA";
+ ExpectFailure( attr, "Not supported under culture fr-FR,fr-BE,fr-CA" );
+ }
+
+ [Test]
+ public void CanMatchAttributeWithIncludeAndExclude()
+ {
+ CultureAttribute attr = new CultureAttribute( "en,fr,de,it" );
+ attr.Exclude="fr-CA,fr-BE";
+ ExpectMatch( attr );
+ attr.Exclude = "fr-FR";
+ ExpectFailure( attr, "Not supported under culture fr-FR" );
+ }
+
+#if !NETCF
+ [Test,SetCulture("fr-FR")]
+ public void LoadWithFrenchCulture()
+ {
+ Assert.AreEqual( "fr-FR", CultureInfo.CurrentCulture.Name, "Culture not set correctly" );
+ TestSuite fixture = TestBuilder.MakeFixture( typeof( FixtureWithCultureAttribute ) );
+ Assert.AreEqual( RunState.Runnable, fixture.RunState, "Fixture" );
+ foreach( Test test in fixture.Tests )
+ {
+ RunState expected = test.Name == "FrenchTest" ? RunState.Runnable : RunState.Skipped;
+ Assert.AreEqual( expected, test.RunState, test.Name );
+ }
+ }
+
+ [Test,SetCulture("fr-CA")]
+ public void LoadWithFrenchCanadianCulture()
+ {
+ Assert.AreEqual( "fr-CA", CultureInfo.CurrentCulture.Name, "Culture not set correctly" );
+ TestSuite fixture = TestBuilder.MakeFixture( typeof( FixtureWithCultureAttribute ) );
+ Assert.AreEqual( RunState.Runnable, fixture.RunState, "Fixture" );
+ foreach( Test test in fixture.Tests )
+ {
+ RunState expected = test.Name.StartsWith( "French" ) ? RunState.Runnable : RunState.Skipped;
+ Assert.AreEqual( expected, test.RunState, test.Name );
+ }
+ }
+
+ [Test,SetCulture("ru-RU")]
+ public void LoadWithRussianCulture()
+ {
+ Assert.AreEqual( "ru-RU", CultureInfo.CurrentCulture.Name, "Culture not set correctly" );
+ TestSuite fixture = TestBuilder.MakeFixture( typeof( FixtureWithCultureAttribute ) );
+ Assert.AreEqual( RunState.Skipped, fixture.RunState, "Fixture" );
+ foreach( Test test in fixture.Tests )
+ Assert.AreEqual( RunState.Skipped, test.RunState, test.Name );
+ }
+
+ [Test]
+ public void SettingInvalidCultureOnFixtureGivesError()
+ {
+ ITestResult result = TestBuilder.RunTestFixture(typeof(FixtureWithInvalidSetCultureAttribute));
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+ Assert.That(result.Message, Is.StringStarting("System.ArgumentException").Or.StringStarting("System.Globalization.CultureNotFoundException"));
+ Assert.That(result.Message, Is.StringContaining("xx-XX").IgnoreCase);
+ }
+
+ [Test]
+ public void SettingInvalidCultureOnTestGivesError()
+ {
+ ITestResult result = TestBuilder.RunTestCase(typeof(FixtureWithInvalidSetCultureAttributeOnTest), "InvalidCultureSet");
+ Assert.AreEqual(ResultState.Error, result.ResultState);
+ Assert.That(result.Message, Is.StringStarting("System.ArgumentException").Or.StringStarting("System.Globalization.CultureNotFoundException"));
+ Assert.That(result.Message, Is.StringContaining("xx-XX").IgnoreCase);
+ }
+
+ [TestFixture, SetCulture("en-GB")]
+ public class NestedFixture
+ {
+ [Test]
+ public void CanSetCultureOnFixture()
+ {
+ Assert.AreEqual( "en-GB", CultureInfo.CurrentCulture.Name );
+ }
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/DeduceTypeArgsFromArgs.cs b/external/guiunit/src/tests/Internal/DeduceTypeArgsFromArgs.cs
new file mode 100755
index 0000000..a495f83
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/DeduceTypeArgsFromArgs.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+
+namespace NUnit.Framework.Internal
+{
+ [Category("Generics")]
+ [TestFixture(100.0, 42)]
+ [TestFixture(42, 100.0)]
+ public class DeduceTypeArgsFromArgs<T1, T2>
+ {
+ T1 t1;
+ T2 t2;
+
+ public DeduceTypeArgsFromArgs(T1 t1, T2 t2)
+ {
+ this.t1 = t1;
+ this.t2 = t2;
+ }
+
+ [TestCase(5, 7)]
+ public void TestMyArgTypes(T1 t1, T2 t2)
+ {
+ Assert.That(t1, Is.TypeOf<T1>());
+ Assert.That(t2, Is.TypeOf<T2>());
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Internal/GenericTestFixtureTests.cs b/external/guiunit/src/tests/Internal/GenericTestFixtureTests.cs
new file mode 100755
index 0000000..ddce40d
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/GenericTestFixtureTests.cs
@@ -0,0 +1,64 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if CLR_2_0 || CLR_4_0
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture(typeof(List<int>))]
+ [TestFixture(TypeArgs = new Type[] { typeof(List<object>) })]
+#if !SILVERLIGHT
+ [TestFixture(typeof(ArrayList))]
+#endif
+ // TODO: Why doesn't this work?
+ //[TestFixture(TypeArgs = new Type[] { typeof(SimpleObjectList) })]
+ public class GenericTestFixture_IList<T> where T : IList, new()
+ {
+ [Test]
+ public void TestCollectionCount()
+ {
+ IList list = new T();
+ list.Add(1);
+ list.Add(2);
+ list.Add(3);
+ Assert.AreEqual(3, list.Count);
+ }
+ }
+
+ [TestFixture(typeof(double))]
+ public class GenericTestFixture_Numeric<T>
+ {
+ [TestCase(5)]
+ [TestCase(1.23)]
+ public void TestMyArgType(T x)
+ {
+ Assert.That(x, Is.TypeOf(typeof(T)));
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Internal/GenericTestMethodTests.cs b/external/guiunit/src/tests/Internal/GenericTestMethodTests.cs
new file mode 100755
index 0000000..70d8097
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/GenericTestMethodTests.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+using System.Collections.Generic;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ class GenericTestMethodTests
+ {
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithOneTypeParameter<T>(T x, T y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithTwoTypeParameters<T1, T2>(T1 x, T2 y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithTwoTypeParameters_Reversed<T1, T2>(T2 x, T1 y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Internal/NUnitTestCaseBuilderTests.cs b/external/guiunit/src/tests/Internal/NUnitTestCaseBuilderTests.cs
new file mode 100755
index 0000000..01ed8f0
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/NUnitTestCaseBuilderTests.cs
@@ -0,0 +1,41 @@
+#if NET_4_5
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Builders;
+using NUnit.TestData;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class NUnitTestCaseBuilderTests
+ {
+ private static readonly System.Type fixtureType = typeof(AsyncDummyFixture);
+
+ [TestCase("AsyncVoid", RunState.Runnable)]
+ [TestCase("AsyncTask", RunState.Runnable)]
+ [TestCase("AsyncGenericTask", RunState.NotRunnable)]
+ [TestCase("NonAsyncTask", RunState.NotRunnable)]
+ [TestCase("NonAsyncGenericTask", RunState.NotRunnable)]
+ public void AsyncTests(string methodName, RunState expectedState)
+ {
+ var test = TestBuilder.MakeTestCase(fixtureType, methodName);
+ Assert.That(test.RunState, Is.EqualTo(expectedState));
+ }
+
+ [TestCase("AsyncVoidTestCase", RunState.Runnable)]
+ [TestCase("AsyncVoidTestCaseWithExpectedResult", RunState.NotRunnable)]
+ [TestCase("AsyncTaskTestCase", RunState.Runnable)]
+ [TestCase("AsyncTaskTestCaseWithExpectedResult", RunState.NotRunnable)]
+ [TestCase("AsyncGenericTaskTestCase", RunState.NotRunnable)]
+ [TestCase("AsyncGenericTaskTestCaseWithExpectedResult", RunState.Runnable)]
+ [TestCase("AsyncGenericTaskTestCaseWithExpectedException", RunState.Runnable)]
+ public void AsyncTestCases(string methodName, RunState expectedState)
+ {
+ var suite = TestBuilder.MakeTestCase(fixtureType, methodName);
+ var testCase = (Test)suite.Tests[0];
+ Assert.That(testCase.RunState, Is.EqualTo(expectedState));
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Internal/PlatformDetectionTests.cs b/external/guiunit/src/tests/Internal/PlatformDetectionTests.cs
new file mode 100755
index 0000000..0d0668a
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/PlatformDetectionTests.cs
@@ -0,0 +1,443 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Summary description for PlatformHelperTests.
+ /// </summary>
+ [TestFixture]
+ public class PlatformDetectionTests
+ {
+ private static readonly PlatformHelper win95Helper = new PlatformHelper(
+ new OSPlatform( PlatformID.Win32Windows , new Version( 4, 0 ) ),
+ new RuntimeFramework( RuntimeType.Net, new Version( 1, 1, 4322, 0 ) ) );
+
+ private static readonly PlatformHelper winXPHelper = new PlatformHelper(
+ new OSPlatform( PlatformID.Win32NT , new Version( 5,1 ) ),
+ new RuntimeFramework( RuntimeType.Net, new Version( 1, 1, 4322, 0 ) ) );
+
+ private void CheckOSPlatforms( OSPlatform os,
+ string expectedPlatforms )
+ {
+ CheckPlatforms(
+ new PlatformHelper( os, RuntimeFramework.CurrentFramework ),
+ expectedPlatforms,
+ PlatformHelper.OSPlatforms );
+ }
+
+ private void CheckRuntimePlatforms( RuntimeFramework runtimeFramework,
+ string expectedPlatforms )
+ {
+ CheckPlatforms(
+ new PlatformHelper( OSPlatform.CurrentPlatform, runtimeFramework ),
+ expectedPlatforms,
+ PlatformHelper.RuntimePlatforms + ",NET-1.0,NET-1.1,NET-2.0,NET-3.0,NET-3.5,NET-4.0,MONO-1.0,MONO-2.0,MONO-3.0,MONO-3.5,MONO-4.0,MONOTOUCH,SL-3.0,SL-4.0,SL-5.0" );
+ }
+
+ private void CheckPlatforms( PlatformHelper helper,
+ string expectedPlatforms, string checkPlatforms )
+ {
+ string[] expected = expectedPlatforms.Split( new char[] { ',' } );
+ string[] check = checkPlatforms.Split( new char[] { ',' } );
+
+ //foreach (string platform in expected)
+ //{
+ // bool isValid = false;
+
+ // foreach (string testPlatform in check)
+ // if (isValid = platform.ToLower() == testPlatform.ToLower())
+ // break;
+
+ // if (!isValid)
+ // Assert.Fail("Invalid platform: {0}", platform);
+ //}
+
+ foreach( string testPlatform in check )
+ {
+ bool shouldPass = false;
+
+ foreach( string platform in expected )
+ if ( shouldPass = platform.ToLower() == testPlatform.ToLower() )
+ break;
+
+ bool didPass = helper.IsPlatformSupported( testPlatform );
+
+ if ( shouldPass && !didPass )
+ Assert.Fail( "Failed to detect {0}", testPlatform );
+ else if ( didPass && !shouldPass )
+ Assert.Fail( "False positive on {0}", testPlatform );
+ else if ( !shouldPass && !didPass )
+ Assert.AreEqual( "Only supported on " + testPlatform, helper.Reason );
+ }
+ }
+
+ [Test]
+ public void DetectWin95()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32Windows, new Version( 4, 0 ) ),
+ "Win95,Win32Windows,Win32,Win" );
+ }
+
+ [Test]
+ public void DetectWin98()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32Windows, new Version( 4, 10 ) ),
+ "Win98,Win32Windows,Win32,Win" );
+ }
+
+ [Test]
+ public void DetectWinMe()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32Windows, new Version( 4, 90 ) ),
+ "WinMe,Win32Windows,Win32,Win" );
+ }
+
+ // WinCE isn't defined in .NET 1.0.
+ [Test, Platform(Exclude="Net-1.0")]
+ public void DetectWinCE()
+ {
+ PlatformID winCE = (PlatformID)Enum.Parse(typeof(PlatformID), "WinCE", false);
+ CheckOSPlatforms(
+ new OSPlatform(winCE, new Version(1, 0)),
+ "WinCE,Win32,Win" );
+ }
+
+ [Test]
+ public void DetectNT3()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32NT, new Version( 3, 51 ) ),
+ "NT3,Win32NT,Win32,Win" );
+ }
+
+ [Test]
+ public void DetectNT4()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32NT, new Version( 4, 0 ) ),
+ "NT4,Win32NT,Win32,Win,Win-4.0" );
+ }
+
+ [Test]
+ public void DetectWin2K()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32NT, new Version( 5, 0 ) ),
+ "Win2K,NT5,Win32NT,Win32,Win,Win-5.0" );
+ }
+
+ [Test]
+ public void DetectWinXP()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32NT, new Version( 5, 1 ) ),
+ "WinXP,NT5,Win32NT,Win32,Win,Win-5.1" );
+ }
+
+ [Test]
+ public void DetectWinXPProfessionalX64()
+ {
+ CheckOSPlatforms(
+ new OSPlatform( PlatformID.Win32NT, new Version( 5, 2 ), OSPlatform.ProductType.WorkStation ),
+ "WinXP,NT5,Win32NT,Win32,Win,Win-5.1" );
+ }
+
+ [Test]
+ public void DetectWin2003Server()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Win32NT, new Version(5, 2), OSPlatform.ProductType.Server),
+ "Win2003Server,NT5,Win32NT,Win32,Win,Win-5.2");
+ }
+
+ [Test]
+ public void DetectVista()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Win32NT, new Version(6, 0), OSPlatform.ProductType.WorkStation),
+ "Vista,NT6,Win32NT,Win32,Win,Win-6.0");
+ }
+
+ [Test]
+ public void DetectWin2008ServerOriginal()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Win32NT, new Version(6, 0), OSPlatform.ProductType.Server),
+ "Win2008Server,NT6,Win32NT,Win32,Win,Win-6.0");
+ }
+
+ [Test]
+ public void DetectWin2008ServerR2()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Win32NT, new Version(6, 1), OSPlatform.ProductType.Server),
+ "Win2008Server,Win2008ServerR2,NT6,Win32NT,Win32,Win,Win-6.0");
+ }
+
+ [Test]
+ public void DetectWindows7()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Win32NT, new Version(6, 1), OSPlatform.ProductType.WorkStation),
+ "Windows7,NT6,Win32NT,Win32,Win,Win-6.1");
+ }
+
+ [Test]
+ public void DetectUnixUnderMicrosoftDotNet()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(OSPlatform.UnixPlatformID_Microsoft, new Version(0,0)),
+ "UNIX,Linux");
+ }
+
+ // This throws under Microsoft .Net due to the invlaid enumeration value of 128
+ [Test]
+ public void DetectUnixUnderMono()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(OSPlatform.UnixPlatformID_Mono, new Version(0,0)),
+ "UNIX,Linux");
+ }
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ [Test]
+ public void DetectXbox()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.Xbox, new Version(0,0)),
+ "Xbox");
+ }
+
+ [Test]
+ public void DetectMacOSX()
+ {
+ CheckOSPlatforms(
+ new OSPlatform(PlatformID.MacOSX, new Version(0, 0)),
+ "MacOSX");
+ }
+#endif
+
+ [Test]
+ public void DetectNet10()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.Net, new Version( 1, 0, 3705, 0 ) ),
+ "NET,NET-1.0" );
+ }
+
+ [Test]
+ public void DetectNet11()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.Net, new Version( 1, 1, 4322, 0 ) ),
+ "NET,NET-1.1" );
+ }
+
+ [Test]
+ public void DetectNet20()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.Net, new Version( 2, 0, 50727, 0 ) ),
+ "Net,Net-2.0" );
+ }
+
+ [Test]
+ public void DetectNet30()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Net, new Version(3, 0)),
+ "Net,Net-2.0,Net-3.0");
+ }
+
+ [Test]
+ public void DetectNet35()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Net, new Version(3, 5)),
+ "Net,Net-2.0,Net-3.0,Net-3.5");
+ }
+
+ [Test]
+ public void DetectNet40()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Net, new Version(4, 0, 30319, 0)),
+ "Net,Net-4.0");
+ }
+
+ [Test]
+ public void DetectNetCF()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.NetCF, new Version( 1, 1, 4322, 0 ) ),
+ "NetCF" );
+ }
+
+ [Test]
+ public void DetectSSCLI()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.SSCLI, new Version( 1, 0, 3, 0 ) ),
+ "SSCLI,Rotor" );
+ }
+
+ [Test]
+ public void DetectMono10()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.Mono, new Version( 1, 1, 4322, 0 ) ),
+ "Mono,Mono-1.0" );
+ }
+
+ [Test]
+ public void DetectMono20()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework( RuntimeType.Mono, new Version( 2, 0, 50727, 0 ) ),
+ "Mono,Mono-2.0" );
+ }
+
+ [Test]
+ public void DetectMono30()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Mono, new Version(3, 0)),
+ "Mono,Mono-2.0,Mono-3.0");
+ }
+
+ [Test]
+ public void DetectMono35()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Mono, new Version(3, 5)),
+ "Mono,Mono-2.0,Mono-3.0,Mono-3.5");
+ }
+
+ [Test]
+ public void DetectMono40()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Mono, new Version(4, 0, 30319)),
+ "Mono,Mono-4.0");
+ }
+
+ [Test]
+ public void DetectMonoTouch()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.MonoTouch, new Version(4, 0, 30319)),
+ "MonoTouch");
+ }
+
+ [Test]
+ public void DetectSilverlight30()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Silverlight, new Version(3, 0)),
+ "Silverlight,SL-3.0");
+ }
+
+ [Test]
+ public void DetectSilverlight40()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Silverlight, new Version(4, 0)),
+ "Silverlight,SL-4.0");
+ }
+
+ [Test]
+ public void DetectSilverlight50()
+ {
+ CheckRuntimePlatforms(
+ new RuntimeFramework(RuntimeType.Silverlight, new Version(5, 0)),
+ "Silverlight,SL-5.0");
+ }
+
+ [Test]
+ public void DetectExactVersion()
+ {
+ Assert.IsTrue( winXPHelper.IsPlatformSupported( "net-1.1.4322" ) );
+ Assert.IsTrue( winXPHelper.IsPlatformSupported( "net-1.1.4322.0" ) );
+ Assert.IsFalse( winXPHelper.IsPlatformSupported( "net-1.1.4323.0" ) );
+ Assert.IsFalse( winXPHelper.IsPlatformSupported( "net-1.1.4322.1" ) );
+ }
+
+ [Test]
+ public void ArrayOfPlatforms()
+ {
+ string[] platforms = new string[] { "NT4", "Win2K", "WinXP" };
+ Assert.IsTrue( winXPHelper.IsPlatformSupported( platforms ) );
+ Assert.IsFalse( win95Helper.IsPlatformSupported( platforms ) );
+ }
+
+ [Test]
+ public void PlatformAttribute_Include()
+ {
+ PlatformAttribute attr = new PlatformAttribute( "Win2K,WinXP,NT4" );
+ Assert.IsTrue( winXPHelper.IsPlatformSupported( attr ) );
+ Assert.IsFalse( win95Helper.IsPlatformSupported( attr ) );
+ Assert.AreEqual("Only supported on Win2K,WinXP,NT4", win95Helper.Reason);
+ }
+
+ [Test]
+ public void PlatformAttribute_Exclude()
+ {
+ PlatformAttribute attr = new PlatformAttribute();
+ attr.Exclude = "Win2K,WinXP,NT4";
+ Assert.IsFalse( winXPHelper.IsPlatformSupported( attr ) );
+ Assert.AreEqual( "Not supported on Win2K,WinXP,NT4", winXPHelper.Reason );
+ Assert.IsTrue( win95Helper.IsPlatformSupported( attr ) );
+ }
+
+ [Test]
+ public void PlatformAttribute_IncludeAndExclude()
+ {
+ PlatformAttribute attr = new PlatformAttribute( "Win2K,WinXP,NT4" );
+ attr.Exclude = "Mono";
+ Assert.IsFalse( win95Helper.IsPlatformSupported( attr ) );
+ Assert.AreEqual( "Only supported on Win2K,WinXP,NT4", win95Helper.Reason );
+ Assert.IsTrue( winXPHelper.IsPlatformSupported( attr ) );
+ attr.Exclude = "Net";
+ Assert.IsFalse( win95Helper.IsPlatformSupported( attr ) );
+ Assert.AreEqual( "Only supported on Win2K,WinXP,NT4", win95Helper.Reason );
+ Assert.IsFalse( winXPHelper.IsPlatformSupported( attr ) );
+ Assert.AreEqual( "Not supported on Net", winXPHelper.Reason );
+ }
+
+ [Test]
+ public void PlatformAttribute_InvalidPlatform()
+ {
+ PlatformAttribute attr = new PlatformAttribute( "Net-1.0,Net11,Mono" );
+ Assert.IsFalse( winXPHelper.IsPlatformSupported( attr ) );
+ Assert.That( winXPHelper.Reason, Is.StringStarting("Invalid platform name"));
+ Assert.That( winXPHelper.Reason, Is.StringContaining("Net11"));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/PropertyBagTests.cs b/external/guiunit/src/tests/Internal/PropertyBagTests.cs
new file mode 100755
index 0000000..0595454
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/PropertyBagTests.cs
@@ -0,0 +1,184 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class PropertyBagTests
+ {
+ PropertyBag bag;
+
+ [SetUp]
+ public void SetUp()
+ {
+ bag = new PropertyBag();
+ bag.Add("Answer", 42);
+ bag.Add("Tag", "bug");
+ bag.Add("Tag", "easy");
+ }
+
+ [Test]
+ public void CountReflectsNumberOfPairs()
+ {
+ Assert.That(bag.Count, Is.EqualTo(3));
+ }
+
+ [Test]
+ public void IndexGetsListOfValues()
+ {
+ Assert.That(bag["Answer"].Count, Is.EqualTo(1));
+ Assert.That(bag["Answer"], Contains.Item(42));
+
+ Assert.That(bag["Tag"].Count, Is.EqualTo(2));
+ Assert.That(bag["Tag"], Contains.Item("bug"));
+ Assert.That(bag["Tag"], Contains.Item("easy"));
+ }
+
+ [Test]
+ public void IndexGetsEmptyListIfNameIsNotPresent()
+ {
+ Assert.That(bag["Level"].Count, Is.EqualTo(0));
+ }
+
+ [Test]
+ public void IndexSetsListOfValues()
+ {
+ bag["Zip"] = new string[] {"junk", "more junk"};
+ Assert.That(bag["Zip"].Count, Is.EqualTo(2));
+ Assert.That(bag["Zip"], Contains.Item("junk"));
+ Assert.That(bag["Zip"], Contains.Item("more junk"));
+ }
+
+ [Test]
+ public void CanClearTheBag()
+ {
+ bag.Clear();
+ Assert.That(bag.Keys.Count, Is.EqualTo(0));
+ Assert.That(bag.Count, Is.EqualTo(0));
+ }
+
+ [Test]
+ public void AllKeysAreListed()
+ {
+ Assert.That(bag.Keys.Count, Is.EqualTo(2));
+ Assert.That(bag.Keys, Has.Member("Answer"));
+ Assert.That(bag.Keys, Has.Member("Tag"));
+ }
+
+ [Test]
+ public void ContainsKey()
+ {
+ Assert.That(bag.ContainsKey("Answer"));
+ Assert.That(bag.ContainsKey("Tag"));
+ Assert.False(bag.ContainsKey("Target"));
+ }
+
+ [Test]
+ public void ContainsKeyAndValue()
+ {
+ Assert.That(bag.Contains("Answer", 42));
+ }
+
+ [Test]
+ public void ContainsPropertyEntry()
+ {
+ Assert.That(bag.Contains(new PropertyEntry("Answer", 42)));
+ }
+
+ [Test]
+ public void CanRemoveKey()
+ {
+ bag.Remove("Tag");
+ Assert.That(bag.Keys.Count, Is.EqualTo(1));
+ Assert.That(bag.Count, Is.EqualTo(1));
+ Assert.That(bag.Keys, Has.No.Member("Tag"));
+ }
+
+ [Test]
+ public void CanRemoveMissingKeyWithoutError()
+ {
+ bag.Remove("Zip");
+ }
+
+ [Test]
+ public void CanRemoveNameAndValue()
+ {
+ bag.Remove("Tag", "easy");
+ Assert.That(bag["Tag"].Contains("bug"));
+ Assert.False(bag["Tag"].Contains("easy"));
+ Assert.That(bag.Count, Is.EqualTo(2));
+ }
+
+ [Test]
+ public void CanRemoveNameAndMissingValueWithoutError()
+ {
+ bag.Remove("Tag", "wishlist");
+ }
+
+ [Test]
+ public void CanRemovePropertyEntry()
+ {
+ bag.Remove(new PropertyEntry("Tag", "easy"));
+ Assert.That(bag["Tag"].Contains("bug"));
+ Assert.False(bag["Tag"].Contains("easy"));
+ Assert.That(bag.Count, Is.EqualTo(2));
+ }
+
+ [Test]
+ public void GetReturnsSingleValue()
+ {
+ Assert.That(bag.Get("Answer"), Is.EqualTo(42));
+ Assert.That(bag.Get("Tag"), Is.EqualTo("bug"));
+ }
+
+ [Test]
+ public void SetAddsNewSingleValue()
+ {
+ bag.Set("Zip", "ZAP");
+ Assert.That(bag["Zip"].Count, Is.EqualTo(1));
+ Assert.That(bag["Zip"], Has.Member("ZAP"));
+ Assert.That(bag.Get("Zip"), Is.EqualTo("ZAP"));
+ }
+
+ [Test]
+ public void SetReplacesOldValues()
+ {
+ bag.Set("Tag", "ZAPPED");
+ Assert.That(bag["Tag"].Count, Is.EqualTo(1));
+ Assert.That(bag.Get("Tag"), Is.EqualTo("ZAPPED"));
+ }
+
+ [Test]
+ public void EnumeratorReturnsAllEntries()
+ {
+ int count = 0;
+ // NOTE: Ignore unsuppressed warning about entry in .NET 1.1 build
+ foreach (PropertyEntry entry in bag)
+ ++count;
+ Assert.That(count, Is.EqualTo(3));
+
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/RandomGeneratorTests.cs b/external/guiunit/src/tests/Internal/RandomGeneratorTests.cs
new file mode 100755
index 0000000..beaac31
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/RandomGeneratorTests.cs
@@ -0,0 +1,132 @@
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Tests.Internal
+{
+ public class RandomGeneratorTests
+ {
+ #region Properties & Constructor
+ public RandomGeneratorTests()
+ {
+ }
+ #endregion
+
+ #region Ints
+ [Test]
+ public void RandomIntsAreUnique()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ int[] values = new int[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetInt();
+
+ Assert.That(values, Is.Unique);
+ }
+ [TestCase(-300,300)]
+ public void RandomIntsAreUnique(int min, int max)
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ int[] values = new int[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetInt(min,max);
+
+ Assert.That(values, Is.Unique);
+ }
+ #endregion
+
+ #region Shorts
+ [Test]
+ public void RandomShortsAreUnique()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ short[] values = new short[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetShort();
+
+ Assert.That(values, Is.Unique);
+ }
+ [TestCase(short.MinValue,short.MaxValue)]
+ public void RandomShortsAreUnique(short min, short max)
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ short[] values = new short[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetShort(min, max);
+
+ Assert.That(values, Is.Unique);
+ }
+ #endregion
+
+ #region Btyes
+ [Test]
+ public void RandomBytesAreUnique()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ byte[] values = new byte[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetByte();
+
+ Assert.That(values, Is.Unique);
+ }
+
+ [TestCase(byte.MinValue,byte.MaxValue)]
+ public void RandomBytesAreUnique(byte min, byte max)
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ byte[] values = new byte[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetByte();
+
+ Assert.That(values, Is.Unique);
+ }
+ #endregion
+
+ #region Bool
+ [Test]
+ public void CanGetRandomBool()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ bool[] values = new bool[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetBool();
+ Assert.That(values, Contains.Item(true));
+ Assert.That(values, Contains.Item(false));
+ }
+
+ public void CanGetRandomBoolWithProbability()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ for (int i = 0; i < 10; i++)
+ {
+ Assert.True(r.GetBool(.0));
+ Assert.False(r.GetBool(1.0));
+ }
+ }
+ #endregion
+
+ #region Doubles & Floats
+ [Test]
+ public void RandomDoublesAreUnique()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ double[] values = new double[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetDouble();
+
+ Assert.That(values, Is.Unique);
+ }
+
+ [Test]
+ public void RandomFloatsAreUnique()
+ {
+ RandomGenerator r = new RandomGenerator(new Random().Next());
+ double[] values = new double[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.GetFloat();
+
+ Assert.That(values, Is.Unique);
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/RandomizerTests.cs b/external/guiunit/src/tests/Internal/RandomizerTests.cs
new file mode 100755
index 0000000..6799eee
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/RandomizerTests.cs
@@ -0,0 +1,185 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Reflection;
+
+namespace NUnit.Framework.Internal
+{
+ public class RandomizerTests
+ {
+ [Test]
+ public void RandomSeedsAreUnique()
+ {
+ int[] seeds = new int[10];
+ for (int i = 0; i < 10; i++)
+ seeds[i] = Randomizer.RandomSeed;
+
+ Assert.That(seeds, Is.Unique);
+ }
+
+ [Test]
+ public void RandomIntsAreUnique()
+ {
+ Randomizer r = new Randomizer();
+
+ int[] values = new int[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.Next();
+
+ Assert.That(values, Is.Unique);
+ }
+
+ [Test]
+ public void RandomDoublesAreUnique()
+ {
+ Randomizer r = new Randomizer();
+
+ double[] values = new double[10];
+ for (int i = 0; i < 10; i++)
+ values[i] = r.NextDouble();
+
+ Assert.That(values, Is.Unique);
+ }
+
+ [Test]
+ public void CanGetArrayOfRandomInts()
+ {
+ Randomizer r = new Randomizer();
+
+ int[] ints = r.GetInts(1, 100, 10);
+ Assert.That(ints.Length, Is.EqualTo(10));
+ foreach (int i in ints)
+ Assert.That(i, Is.InRange(1, 100));
+ }
+
+ [Test]
+ public void CanGetArrayOfRandomDoubles()
+ {
+ Randomizer r = new Randomizer();
+
+ double[] doubles = r.GetDoubles(0.5, 1.5, 10);
+ Assert.That(doubles.Length, Is.EqualTo(10));
+ foreach (double d in doubles)
+ Assert.That(d, Is.InRange(0.5, 1.5));
+
+ // Heuristic: Could fail occasionally
+ Assert.That(doubles, Is.Unique);
+ }
+
+ [Test]
+ public void CanGetArrayOfRandomEnums()
+ {
+ Randomizer r = new Randomizer();
+
+ object[] enums = r.GetEnums(10, typeof(AttributeTargets));
+ Assert.That(enums.Length, Is.EqualTo(10));
+ foreach (object e in enums)
+ Assert.That(e, Is.TypeOf(typeof(AttributeTargets)));
+ }
+
+ [Test]
+ public void RandomizersWithSameSeedsReturnSameValues()
+ {
+ Randomizer r1 = new Randomizer(1234);
+ Randomizer r2 = new Randomizer(1234);
+
+ for (int i = 0; i < 10; i++)
+ Assert.That(r1.NextDouble(), Is.EqualTo(r2.NextDouble()));
+ }
+
+ [Test]
+ public void RandomizersWithDifferentSeedsReturnDifferentValues()
+ {
+ Randomizer r1 = new Randomizer(1234);
+ Randomizer r2 = new Randomizer(4321);
+
+ for (int i = 0; i < 10; i++)
+ Assert.That(r1.NextDouble(), Is.Not.EqualTo(r2.NextDouble()));
+ }
+
+ [Test]
+ public void ReturnsSameRandomizerForSameParameter()
+ {
+ ParameterInfo p = testMethod1.GetParameters()[0];
+ Randomizer r1 = Randomizer.GetRandomizer(p);
+ Randomizer r2 = Randomizer.GetRandomizer(p);
+ Assert.That(r1, Is.SameAs(r2));
+ }
+
+ [Test]
+ public void ReturnsSameRandomizerForDifferentParametersOfSameMethod()
+ {
+ ParameterInfo p1 = testMethod1.GetParameters()[0];
+ ParameterInfo p2 = testMethod1.GetParameters()[1];
+ Randomizer r1 = Randomizer.GetRandomizer(p1);
+ Randomizer r2 = Randomizer.GetRandomizer(p2);
+ Assert.That(r1, Is.SameAs(r2));
+ }
+
+ [Test]
+ public void ReturnsSameRandomizerForSameMethod()
+ {
+ Randomizer r1 = Randomizer.GetRandomizer(testMethod1);
+ Randomizer r2 = Randomizer.GetRandomizer(testMethod1);
+ Assert.That(r1, Is.SameAs(r2));
+ }
+
+ [Test]
+ public void ReturnsDifferentRandomizersForDifferentMethods()
+ {
+ Randomizer r1 = Randomizer.GetRandomizer(testMethod1);
+ Randomizer r2 = Randomizer.GetRandomizer(testMethod2);
+ Assert.That(r1, Is.Not.SameAs(r2));
+ }
+
+ static readonly MethodInfo testMethod1 =
+ typeof(RandomizerTests).GetMethod("TestMethod1", BindingFlags.NonPublic | BindingFlags.Instance);
+ private void TestMethod1(int x, int y)
+ {
+ }
+
+ static readonly MethodInfo testMethod2 =
+ typeof(RandomizerTests).GetMethod("TestMethod2", BindingFlags.NonPublic | BindingFlags.Instance);
+ private void TestMethod2(int x, int y)
+ {
+ }
+
+ private int CountUniqueValues(Array array)
+ {
+ int uniqueCount = 0;
+
+ for (int index = 0; index < array.Length; index++)
+ {
+ bool isUnique = true;
+ for (int index2 = 0; index2 < index; index2++)
+ if (array.GetValue(index).Equals(array.GetValue(index2)))
+ isUnique = false;
+ if (isUnique)
+ uniqueCount++;
+ }
+
+ return uniqueCount;
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/RuntimeFrameworkTests.cs b/external/guiunit/src/tests/Internal/RuntimeFrameworkTests.cs
new file mode 100755
index 0000000..8e48898
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/RuntimeFrameworkTests.cs
@@ -0,0 +1,287 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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.IO;
+using Microsoft.Win32;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class RuntimeFrameworkTests
+ {
+ [Test]
+ public void CanGetCurrentFramework()
+ {
+ Version expectedClrVersion = Environment.Version;
+ Version expectedFrameworkVersion = new Version(expectedClrVersion.Major, expectedClrVersion.Minor);
+
+#if SILVERLIGHT
+ RuntimeType expectedRuntime = RuntimeType.Silverlight;
+ expectedClrVersion = new RuntimeFramework(expectedRuntime, expectedFrameworkVersion).ClrVersion;
+#else
+ RuntimeType expectedRuntime = Type.GetType("Mono.Runtime", false) != null
+ ? RuntimeType.Mono
+ : Environment.OSVersion.Platform == PlatformID.WinCE
+ ? RuntimeType.NetCF
+ : RuntimeType.Net;
+
+ // TODO: Remove duplication of RuntimeFramework code
+ switch (expectedRuntime)
+ {
+ case RuntimeType.Mono:
+ if (expectedFrameworkVersion.Major == 1)
+ expectedFrameworkVersion = new Version(1,0);
+ else if (expectedFrameworkVersion.Major == 2)
+ expectedFrameworkVersion = new Version(3,5);
+ break;
+
+ case RuntimeType.Net:
+ case RuntimeType.NetCF:
+ if (expectedFrameworkVersion.Major == 2)
+ {
+ RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\.NETFramework");
+ if (key != null)
+ {
+ string installRoot = key.GetValue("InstallRoot") as string;
+ if (installRoot != null)
+ {
+ if (Directory.Exists(Path.Combine(installRoot, "v3.5")))
+ expectedFrameworkVersion = new Version(3,5);
+ else if (Directory.Exists(Path.Combine(installRoot, "v3.0")))
+ expectedFrameworkVersion = new Version(3,0);
+ }
+ }
+ }
+ break;
+ }
+#endif
+
+ RuntimeFramework framework = RuntimeFramework.CurrentFramework;
+
+ Assert.That(framework.Runtime, Is.EqualTo(expectedRuntime));
+ Assert.That(framework.ClrVersion, Is.EqualTo(expectedClrVersion));
+ Assert.That(framework.FrameworkVersion, Is.EqualTo(expectedFrameworkVersion));
+ }
+
+ [Test]
+ public void CurrentFrameworkHasBuildSpecified()
+ {
+ Assert.That(RuntimeFramework.CurrentFramework.ClrVersion.Build, Is.GreaterThan(0));
+ }
+
+#if !NUNITLITE
+ [Test, Platform(Exclude="NETCF", Reason="NYI")]
+ public void CurrentFrameworkMustBeAvailable()
+ {
+ Assert.That(RuntimeFramework.CurrentFramework.IsAvailable);
+ }
+
+ [Test, Platform(Exclude="NETCF", Reason="NYI")]
+ public void CanListAvailableFrameworks()
+ {
+ RuntimeFramework[] available = RuntimeFramework.AvailableFrameworks;
+ Assert.That(available, Has.Length.GreaterThan(0) );
+ bool foundCurrent = false;
+ foreach (RuntimeFramework framework in available)
+ {
+ Console.WriteLine("Available: {0}", framework.DisplayName);
+ foundCurrent |= RuntimeFramework.CurrentFramework.Supports(framework);
+ }
+ Assert.That(foundCurrent, "CurrentFramework not listed");
+ }
+#endif
+
+ [TestCaseSource("frameworkData")]
+ public void CanCreateUsingFrameworkVersion(FrameworkData data)
+ {
+ RuntimeFramework framework = new RuntimeFramework(data.runtime, data.frameworkVersion);
+ Assert.AreEqual(data.runtime, framework.Runtime);
+ Assert.AreEqual(data.frameworkVersion, framework.FrameworkVersion);
+ Assert.AreEqual(data.clrVersion, framework.ClrVersion);
+ }
+
+ [TestCaseSource("frameworkData")]
+ public void CanCreateUsingClrVersion(FrameworkData data)
+ {
+ Assume.That(data.frameworkVersion.Major != 3);
+
+ RuntimeFramework framework = new RuntimeFramework(data.runtime, data.clrVersion);
+ Assert.AreEqual(data.runtime, framework.Runtime);
+ Assert.AreEqual(data.frameworkVersion, framework.FrameworkVersion);
+ Assert.AreEqual(data.clrVersion, framework.ClrVersion);
+ }
+
+ [TestCaseSource("frameworkData")]
+ public void CanParseRuntimeFramework(FrameworkData data)
+ {
+ RuntimeFramework framework = RuntimeFramework.Parse(data.representation);
+ Assert.AreEqual(data.runtime, framework.Runtime);
+ Assert.AreEqual(data.clrVersion, framework.ClrVersion);
+ }
+
+ [TestCaseSource("frameworkData")]
+ public void CanDisplayFrameworkAsString(FrameworkData data)
+ {
+ RuntimeFramework framework = new RuntimeFramework(data.runtime, data.frameworkVersion);
+ Assert.AreEqual(data.representation, framework.ToString());
+ Assert.AreEqual(data.displayName, framework.DisplayName);
+ }
+
+ [TestCaseSource("matchData")]
+ public bool CanMatchRuntimes(RuntimeFramework f1, RuntimeFramework f2)
+ {
+ return f1.Supports(f2);
+ }
+
+ internal static TestCaseData[] matchData = new TestCaseData[] {
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(3,5)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Net, new Version(3,5)))
+ .Returns(false),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(3,5)),
+ new RuntimeFramework(RuntimeType.Net, new Version(3,5)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0,50727)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0,50727)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0,50727)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Mono, new Version(2,0)))
+ .Returns(false),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Net, new Version(1,1)))
+ .Returns(false),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0,50727)),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0,40607)))
+ .Returns(false),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Mono, new Version(1,1)), // non-existent version but it works
+ new RuntimeFramework(RuntimeType.Mono, new Version(1,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Mono, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Any, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Any, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Mono, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Any, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Any, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Any, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Any, new Version(4,0)))
+ .Returns(false),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, RuntimeFramework.DefaultVersion),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Net, RuntimeFramework.DefaultVersion))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Any, RuntimeFramework.DefaultVersion),
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)))
+ .Returns(true),
+ new TestCaseData(
+ new RuntimeFramework(RuntimeType.Net, new Version(2,0)),
+ new RuntimeFramework(RuntimeType.Any, RuntimeFramework.DefaultVersion))
+ .Returns(true)
+ };
+
+ public struct FrameworkData
+ {
+ public RuntimeType runtime;
+ public Version frameworkVersion;
+ public Version clrVersion;
+ public string representation;
+ public string displayName;
+
+ public FrameworkData(RuntimeType runtime, Version frameworkVersion, Version clrVersion,
+ string representation, string displayName)
+ {
+ this.runtime = runtime;
+ this.frameworkVersion = frameworkVersion;
+ this.clrVersion = clrVersion;
+ this.representation = representation;
+ this.displayName = displayName;
+ }
+
+ public override string ToString()
+ {
+ return string.Format("<{0},{1},{2}>", this.runtime, this.frameworkVersion, this.clrVersion);
+ }
+ }
+
+ internal FrameworkData[] frameworkData = new FrameworkData[] {
+ new FrameworkData(RuntimeType.Net, new Version(1,0), new Version(1,0,3705), "net-1.0", "Net 1.0"),
+ //new FrameworkData(RuntimeType.Net, new Version(1,0,3705), new Version(1,0,3705), "net-1.0.3705", "Net 1.0.3705"),
+ //new FrameworkData(RuntimeType.Net, new Version(1,0), new Version(1,0,3705), "net-1.0.3705", "Net 1.0.3705"),
+ new FrameworkData(RuntimeType.Net, new Version(1,1), new Version(1,1,4322), "net-1.1", "Net 1.1"),
+ //new FrameworkData(RuntimeType.Net, new Version(1,1,4322), new Version(1,1,4322), "net-1.1.4322", "Net 1.1.4322"),
+ new FrameworkData(RuntimeType.Net, new Version(2,0), new Version(2,0,50727), "net-2.0", "Net 2.0"),
+ //new FrameworkData(RuntimeType.Net, new Version(2,0,40607), new Version(2,0,40607), "net-2.0.40607", "Net 2.0.40607"),
+ //new FrameworkData(RuntimeType.Net, new Version(2,0,50727), new Version(2,0,50727), "net-2.0.50727", "Net 2.0.50727"),
+ new FrameworkData(RuntimeType.Net, new Version(3,0), new Version(2,0,50727), "net-3.0", "Net 3.0"),
+ new FrameworkData(RuntimeType.Net, new Version(3,5), new Version(2,0,50727), "net-3.5", "Net 3.5"),
+ new FrameworkData(RuntimeType.Net, new Version(4,0), new Version(4,0,30319), "net-4.0", "Net 4.0"),
+ new FrameworkData(RuntimeType.Net, RuntimeFramework.DefaultVersion, RuntimeFramework.DefaultVersion, "net", "Net"),
+ new FrameworkData(RuntimeType.Mono, new Version(1,0), new Version(1,1,4322), "mono-1.0", "Mono 1.0"),
+ new FrameworkData(RuntimeType.Mono, new Version(2,0), new Version(2,0,50727), "mono-2.0", "Mono 2.0"),
+ //new FrameworkData(RuntimeType.Mono, new Version(2,0,50727), new Version(2,0,50727), "mono-2.0.50727", "Mono 2.0.50727"),
+ new FrameworkData(RuntimeType.Mono, new Version(3,5), new Version(2,0,50727), "mono-3.5", "Mono 3.5"),
+ new FrameworkData(RuntimeType.Mono, new Version(4,0), new Version(4,0,30319), "mono-4.0", "Mono 4.0"),
+ new FrameworkData(RuntimeType.Mono, RuntimeFramework.DefaultVersion, RuntimeFramework.DefaultVersion, "mono", "Mono"),
+ new FrameworkData(RuntimeType.Any, new Version(1,1), new Version(1,1,4322), "v1.1", "v1.1"),
+ new FrameworkData(RuntimeType.Any, new Version(2,0), new Version(2,0,50727), "v2.0", "v2.0"),
+ //new FrameworkData(RuntimeType.Any, new Version(2,0,50727), new Version(2,0,50727), "v2.0.50727", "v2.0.50727"),
+ new FrameworkData(RuntimeType.Any, new Version(3,5), new Version(2,0,50727), "v3.5", "v3.5"),
+ new FrameworkData(RuntimeType.Any, new Version(4,0), new Version(4,0,30319), "v4.0", "v4.0"),
+ new FrameworkData(RuntimeType.Any, RuntimeFramework.DefaultVersion, RuntimeFramework.DefaultVersion, "any", "Any")
+ };
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/SetUpTest.cs b/external/guiunit/src/tests/Internal/SetUpTest.cs
new file mode 100755
index 0000000..30285e8
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/SetUpTest.cs
@@ -0,0 +1,161 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.TestUtilities;
+using NUnit.TestData.SetUpData;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class SetUpTest
+ {
+ [Test]
+ public void SetUpAndTearDownCounter()
+ {
+ SetUpAndTearDownCounterFixture fixture = new SetUpAndTearDownCounterFixture();
+ TestBuilder.RunTestFixture( fixture );
+
+ Assert.AreEqual(3, fixture.setUpCounter);
+ Assert.AreEqual(3, fixture.tearDownCounter);
+ }
+
+
+ [Test]
+ public void MakeSureSetUpAndTearDownAreCalled()
+ {
+ SetUpAndTearDownFixture fixture = new SetUpAndTearDownFixture();
+ TestBuilder.RunTestFixture( fixture );
+
+ Assert.IsTrue(fixture.wasSetUpCalled);
+ Assert.IsTrue(fixture.wasTearDownCalled);
+ }
+
+ [Test]
+ public void CheckInheritedSetUpAndTearDownAreCalled()
+ {
+ InheritSetUpAndTearDown fixture = new InheritSetUpAndTearDown();
+ TestBuilder.RunTestFixture( fixture );
+
+ Assert.IsTrue(fixture.wasSetUpCalled);
+ Assert.IsTrue(fixture.wasTearDownCalled);
+ }
+
+ [Test]
+ public void CheckOverriddenSetUpAndTearDownAreNotCalled()
+ {
+ DefineInheritSetUpAndTearDown fixture = new DefineInheritSetUpAndTearDown();
+ TestBuilder.RunTestFixture( fixture );
+
+ Assert.IsFalse(fixture.wasSetUpCalled);
+ Assert.IsFalse(fixture.wasTearDownCalled);
+ Assert.IsTrue(fixture.derivedSetUpCalled);
+ Assert.IsTrue(fixture.derivedTearDownCalled);
+ }
+
+ [Test]
+ public void MultipleSetUpAndTearDownMethodsAreCalled()
+ {
+ MultipleSetUpTearDownFixture fixture = new MultipleSetUpTearDownFixture();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.IsTrue(fixture.wasSetUp1Called, "SetUp1");
+ Assert.IsTrue(fixture.wasSetUp2Called, "SetUp2");
+ Assert.IsTrue(fixture.wasSetUp3Called, "SetUp3");
+ Assert.IsTrue(fixture.wasTearDown1Called, "TearDown1");
+ Assert.IsTrue(fixture.wasTearDown2Called, "TearDown2");
+ }
+
+ [Test]
+ public void BaseSetUpIsCalledFirstTearDownLast()
+ {
+ DerivedClassWithSeparateSetUp fixture = new DerivedClassWithSeparateSetUp();
+ TestBuilder.RunTestFixture(fixture);
+
+ Assert.IsTrue(fixture.wasSetUpCalled, "Base SetUp Called");
+ Assert.IsTrue(fixture.wasTearDownCalled, "Base TearDown Called");
+ Assert.IsTrue(fixture.wasDerivedSetUpCalled, "Derived SetUp Called");
+ Assert.IsTrue(fixture.wasDerivedTearDownCalled, "Derived TearDown Called");
+ Assert.IsTrue(fixture.wasBaseSetUpCalledFirst, "SetUp Order");
+ Assert.IsTrue(fixture.wasBaseTearDownCalledLast, "TearDown Order");
+ }
+
+ [Test]
+ public void SetupRecordsOriginalExceptionThownByTestCase()
+ {
+ Exception e = new Exception("Test message for exception thrown from setup");
+ SetupAndTearDownExceptionFixture fixture = new SetupAndTearDownExceptionFixture();
+ fixture.setupException = e;
+ TestResult suiteResult = TestBuilder.RunTestFixture(fixture);
+ Assert.IsTrue(suiteResult.HasChildren, "Fixture test should have child result.");
+ TestResult result = (TestResult)suiteResult.Children[0];
+ Assert.AreEqual(result.ResultState, ResultState.Error, "Test should be in error state");
+ string expected = string.Format("{0} : {1}", e.GetType().FullName, e.Message);
+ Assert.AreEqual(expected, result.Message);
+ }
+
+ [Test]
+ public void TearDownRecordsOriginalExceptionThownByTestCase()
+ {
+ Exception e = new Exception("Test message for exception thrown from tear down");
+ SetupAndTearDownExceptionFixture fixture = new SetupAndTearDownExceptionFixture();
+ fixture.tearDownException = e;
+ TestResult suiteResult = TestBuilder.RunTestFixture(fixture);
+ Assert.That(suiteResult.HasChildren, "Fixture test should have child result.");
+ TestResult result = (TestResult)suiteResult.Children[0];
+ Assert.AreEqual(result.ResultState, ResultState.Error, "Test should be in error state");
+ string expected = string.Format("TearDown : {0} : {1}", e.GetType().FullName, e.Message);
+ Assert.AreEqual(expected, result.Message);
+ }
+
+ public class SetupCallBase
+ {
+ protected int setupCount = 0;
+ public virtual void Init()
+ {
+ setupCount++;
+ }
+ public virtual void AssertCount()
+ {
+ }
+ }
+
+ [TestFixture]
+ // Test for bug 441022
+ public class SetupCallDerived : SetupCallBase
+ {
+ [SetUp]
+ public override void Init()
+ {
+ setupCount++;
+ base.Init();
+ }
+ [Test]
+ public override void AssertCount()
+ {
+ Assert.AreEqual(2, setupCount);
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/SimpleGenericMethods.cs b/external/guiunit/src/tests/Internal/SimpleGenericMethods.cs
new file mode 100755
index 0000000..86f9213
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/SimpleGenericMethods.cs
@@ -0,0 +1,67 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+using System;
+using System.Collections.Generic;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture,Category("Generics")]
+ class SimpleGenericMethods
+ {
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithOneTypeParameter<T>(T x, T y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithTwoTypeParameters<T1, T2>(T1 x, T2 y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+
+ [TestCase(5, 2, "ABC")]
+ [TestCase(5.0, 2.0, "ABC")]
+ [TestCase(5, 2.0, "ABC")]
+ [TestCase(5.0, 2L, "ABC")]
+ public void GenericTestMethodWithTwoTypeParameters_Reversed<T1, T2>(T2 x, T1 y, string label)
+ {
+ Assert.AreEqual(5, x);
+ Assert.AreEqual(2, y);
+ Assert.AreEqual("ABC", label);
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Internal/TestExecutionContextTests.cs b/external/guiunit/src/tests/Internal/TestExecutionContextTests.cs
new file mode 100755
index 0000000..9f8cac7
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TestExecutionContextTests.cs
@@ -0,0 +1,242 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.Threading;
+using System.Globalization;
+using NUnit.Framework;
+#if !NETCF && !SILVERLIGHT
+using System.Security.Principal;
+#endif
+#if !NUNITLITE
+using NUnit.TestData.TestContextData;
+using NUnit.TestUtilities;
+#endif
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Summary description for TestExecutionContextTests.
+ /// </summary>
+ [TestFixture][Property("Question", "Why?")]
+ public class TestExecutionContextTests
+ {
+ TestExecutionContext fixtureContext;
+ TestExecutionContext setupContext;
+
+#if !NETCF
+ CultureInfo currentCulture;
+ CultureInfo currentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ string currentDirectory;
+ IPrincipal currentPrincipal;
+#endif
+
+ [TestFixtureSetUp]
+ public void OneTimeSetUp()
+ {
+ fixtureContext = TestExecutionContext.CurrentContext;
+ }
+
+ [TestFixtureTearDown]
+ public void OneTimeTearDown()
+ {
+ // TODO: We put some tests in one time teardown to verify that
+ // the context is still valid. It would be better if these tests
+ // were placed in a second-level test, invoked from this test class.
+ TestExecutionContext ec = TestExecutionContext.CurrentContext;
+ Assert.That(ec.CurrentTest.Name, Is.EqualTo("TestExecutionContextTests"));
+ Assert.That(ec.CurrentTest.FullName,
+ Is.EqualTo("NUnit.Framework.Internal.TestExecutionContextTests"));
+ Assert.That(fixtureContext.CurrentTest.Id, Is.GreaterThan(0));
+ Assert.That(fixtureContext.CurrentTest.Properties.Get("Question"), Is.EqualTo("Why?"));
+ }
+
+ /// <summary>
+ /// Since we are testing the mechanism that saves and
+ /// restores contexts, we save manually here
+ /// </summary>
+ [SetUp]
+ public void Initialize()
+ {
+ setupContext = new TestExecutionContext(TestExecutionContext.CurrentContext);
+#if !NETCF
+ currentCulture = CultureInfo.CurrentCulture;
+ currentUICulture = CultureInfo.CurrentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ currentDirectory = Environment.CurrentDirectory;
+ currentPrincipal = Thread.CurrentPrincipal;
+#endif
+ }
+
+ [TearDown]
+ public void Cleanup()
+ {
+#if !NETCF
+ Thread.CurrentThread.CurrentCulture = currentCulture;
+ Thread.CurrentThread.CurrentUICulture = currentUICulture;
+#endif
+
+#if !NETCF && !SILVERLIGHT
+ Environment.CurrentDirectory = currentDirectory;
+ Thread.CurrentPrincipal = currentPrincipal;
+#endif
+
+ Assert.That(
+ TestExecutionContext.CurrentContext.CurrentTest.FullName,
+ Is.EqualTo(setupContext.CurrentTest.FullName),
+ "Context at TearDown failed to match that saved from SetUp");
+ }
+
+ [Test]
+ public void FixtureSetUpCanAccessFixtureName()
+ {
+ Assert.That(fixtureContext.CurrentTest.Name, Is.EqualTo("TestExecutionContextTests"));
+ }
+
+ [Test]
+ public void FixtureSetUpCanAccessFixtureFullName()
+ {
+ Assert.That(fixtureContext.CurrentTest.FullName,
+ Is.EqualTo("NUnit.Framework.Internal.TestExecutionContextTests"));
+ }
+
+ [Test]
+ public void FixtureSetUpCanAccessFixtureId()
+ {
+ Assert.That(fixtureContext.CurrentTest.Id, Is.GreaterThan(0));
+ }
+
+ [Test]
+ public void FixtureSetUpCanAccessFixtureProperties()
+ {
+ Assert.That(fixtureContext.CurrentTest.Properties.Get("Question"), Is.EqualTo("Why?"));
+ }
+
+ [Test]
+ public void SetUpCanAccessTestName()
+ {
+ Assert.That(setupContext.CurrentTest.Name, Is.EqualTo("SetUpCanAccessTestName"));
+ }
+
+ [Test]
+ public void SetUpCanAccessTestFullName()
+ {
+ Assert.That(setupContext.CurrentTest.FullName,
+ Is.EqualTo("NUnit.Framework.Internal.TestExecutionContextTests.SetUpCanAccessTestFullName"));
+ }
+
+ [Test]
+ public void SetUpCanAccessTestId()
+ {
+ Assert.That(setupContext.CurrentTest.Id, Is.GreaterThan(0));
+ }
+
+ [Test]
+ [Property("Answer", 42)]
+ public void SetUpCanAccessTestProperties()
+ {
+ Assert.That(setupContext.CurrentTest.Properties.Get("Answer"), Is.EqualTo(42));
+ }
+
+ [Test]
+ public void TestCanAccessItsOwnName()
+ {
+ Assert.That(TestExecutionContext.CurrentContext.CurrentTest.Name, Is.EqualTo("TestCanAccessItsOwnName"));
+ }
+
+ [Test]
+ public void TestCanAccessItsOwnFullName()
+ {
+ Assert.That(TestExecutionContext.CurrentContext.CurrentTest.FullName,
+ Is.EqualTo("NUnit.Framework.Internal.TestExecutionContextTests.TestCanAccessItsOwnFullName"));
+ }
+
+ [Test]
+ public void TestCanAccessItsOwnId()
+ {
+ Assert.That(TestExecutionContext.CurrentContext.CurrentTest.Id, Is.GreaterThan(0));
+ }
+
+ [Test]
+ [Property("Answer", 42)]
+ public void TestCanAccessItsOwnProperties()
+ {
+ Assert.That(TestExecutionContext.CurrentContext.CurrentTest.Properties.Get("Answer"), Is.EqualTo(42));
+ }
+
+#if !NETCF
+ [Test]
+ public void SetAndRestoreCurrentCulture()
+ {
+ Assert.AreEqual(setupContext.CurrentCulture, CultureInfo.CurrentCulture, "Culture not in initial context");
+
+ TestExecutionContext context = setupContext.Save();
+
+ try
+ {
+ CultureInfo otherCulture =
+ new CultureInfo(currentCulture.Name == "fr-FR" ? "en-GB" : "fr-FR");
+ context.CurrentCulture = otherCulture;
+ Assert.AreEqual(otherCulture, CultureInfo.CurrentCulture, "Culture was not set");
+ Assert.AreEqual(otherCulture, context.CurrentCulture, "Culture not in new context");
+ }
+ finally
+ {
+ context = context.Restore();
+ }
+
+ Assert.AreEqual(currentCulture, CultureInfo.CurrentCulture, "Culture was not restored");
+ Assert.AreEqual(currentCulture, context.CurrentCulture, "Culture not in final context");
+ }
+
+ [Test]
+ public void SetAndRestoreCurrentUICulture()
+ {
+ Assert.AreEqual(currentUICulture, setupContext.CurrentUICulture, "UICulture not in initial context");
+
+ TestExecutionContext context = setupContext.Save();
+
+ try
+ {
+ CultureInfo otherCulture =
+ new CultureInfo(currentUICulture.Name == "fr-FR" ? "en-GB" : "fr-FR");
+ context.CurrentUICulture = otherCulture;
+ Assert.AreEqual(otherCulture, CultureInfo.CurrentUICulture, "UICulture was not set");
+ Assert.AreEqual(otherCulture, context.CurrentUICulture, "UICulture not in new context");
+ }
+ finally
+ {
+ context = context.Restore();
+ }
+
+ Assert.AreEqual(currentUICulture, CultureInfo.CurrentUICulture, "UICulture was not restored");
+ Assert.AreEqual(currentUICulture, context.CurrentUICulture, "UICulture not in final context");
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TestFixtureTests.cs b/external/guiunit/src/tests/Internal/TestFixtureTests.cs
new file mode 100755
index 0000000..382d9aa
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TestFixtureTests.cs
@@ -0,0 +1,406 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework.Api;
+using NUnit.TestData.FixtureSetUpTearDownData;
+using NUnit.TestUtilities;
+using NUnit.TestData.TestFixtureData;
+using IgnoredFixture = NUnit.TestData.TestFixtureData.IgnoredFixture;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Tests of the NUnitTestFixture class
+ /// </summary>
+ [TestFixture]
+ public class TestFixtureTests
+ {
+ private static void CanConstructFrom(Type fixtureType)
+ {
+ CanConstructFrom(fixtureType, fixtureType.Name);
+ }
+
+ private static void CanConstructFrom(Type fixtureType, string expectedName)
+ {
+ TestSuite fixture = TestBuilder.MakeFixture(fixtureType);
+ Assert.AreEqual(expectedName, fixture.Name);
+ Assert.AreEqual(fixtureType.FullName, fixture.FullName);
+ }
+
+ [Test]
+ public void ConstructFromType()
+ {
+ CanConstructFrom(typeof(FixtureWithTestFixtureAttribute));
+ }
+
+ [Test]
+ public void ConstructFromNestedType()
+ {
+ CanConstructFrom(typeof(OuterClass.NestedTestFixture), "OuterClass+NestedTestFixture");
+ }
+
+ [Test]
+ public void ConstructFromDoublyNestedType()
+ {
+ CanConstructFrom(typeof(OuterClass.NestedTestFixture.DoublyNestedTestFixture),
+ "OuterClass+NestedTestFixture+DoublyNestedTestFixture");
+ }
+
+ public void ConstructFromTypeWithoutTestFixtureAttributeContainingTest()
+ {
+ CanConstructFrom(typeof(FixtureWithoutTestFixtureAttributeContainingTest));
+ }
+
+ [Test]
+ public void ConstructFromTypeWithoutTestFixtureAttributeContainingTestCase()
+ {
+ CanConstructFrom(typeof(FixtureWithoutTestFixtureAttributeContainingTestCase));
+ }
+
+ [Test]
+ public void ConstructFromTypeWithoutTestFixtureAttributeContainingTestCaseSource()
+ {
+ CanConstructFrom(typeof(FixtureWithoutTestFixtureAttributeContainingTestCaseSource));
+ }
+
+#if !NUNITLITE
+ [Test]
+ public void ConstructFromTypeWithoutTestFixtureAttributeContainingTheory()
+ {
+ CanConstructFrom(typeof(FixtureWithoutTestFixtureAttributeContainingTheory));
+ }
+#endif
+
+ [Test]
+ public void CannotRunConstructorWithArgsNotSupplied()
+ {
+ TestAssert.IsNotRunnable(typeof(NoDefaultCtorFixture));
+ }
+
+ [Test]
+ public void CanRunConstructorWithArgsSupplied()
+ {
+ TestAssert.IsRunnable(typeof(FixtureWithArgsSupplied), ResultState.Success);
+ }
+
+ [Test]
+ public void CannotRunBadConstructor()
+ {
+ TestAssert.IsNotRunnable(typeof(BadCtorFixture));
+ }
+
+ [Test]
+ public void CanRunMultipleSetUp()
+ {
+ TestAssert.IsRunnable(typeof(MultipleSetUpAttributes), ResultState.Success);
+ }
+
+ [Test]
+ public void CanRunMultipleTearDown()
+ {
+ TestAssert.IsRunnable(typeof(MultipleTearDownAttributes), ResultState.Success);
+ }
+
+ [Test]
+ public void CannotRunIgnoredFixture()
+ {
+ TestSuite suite = TestBuilder.MakeFixture( typeof( IgnoredFixture ) );
+ Assert.AreEqual( RunState.Ignored, suite.RunState );
+ Assert.AreEqual( "testing ignore a fixture", suite.Properties.Get(PropertyNames.SkipReason) );
+ }
+
+// [Test]
+// public void CannotRunAbstractFixture()
+// {
+// TestAssert.IsNotRunnable(typeof(AbstractTestFixture));
+// }
+
+ [Test]
+ public void CanRunFixtureDerivedFromAbstractTestFixture()
+ {
+ TestAssert.IsRunnable(typeof(DerivedFromAbstractTestFixture), ResultState.Success);
+ }
+
+ [Test]
+ public void CanRunFixtureDerivedFromAbstractDerivedTestFixture()
+ {
+ TestAssert.IsRunnable(typeof(DerivedFromAbstractDerivedTestFixture), ResultState.Success);
+ }
+
+// [Test]
+// public void CannotRunAbstractDerivedFixture()
+// {
+// TestAssert.IsNotRunnable(typeof(AbstractDerivedTestFixture));
+// }
+
+ [Test]
+ public void FixtureInheritingTwoTestFixtureAttributesIsLoadedOnlyOnce()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(typeof(DoubleDerivedClassWithTwoInheritedAttributes));
+ Assert.That(suite, Is.TypeOf(typeof(TestFixture)));
+ Assert.That(suite.Tests.Count, Is.EqualTo(0));
+ }
+
+ [Test]
+ public void CanRunMultipleTestFixtureSetUp()
+ {
+ TestAssert.IsRunnable(typeof(MultipleFixtureSetUpAttributes), ResultState.Success);
+ }
+
+ [Test]
+ public void CanRunMultipleTestFixtureTearDown()
+ {
+ TestAssert.IsRunnable(typeof(MultipleFixtureTearDownAttributes), ResultState.Success);
+ }
+
+ [Test]
+ public void CanRunTestFixtureWithNoTests()
+ {
+ TestAssert.IsRunnable(typeof(FixtureWithNoTests), ResultState.Success);
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void ConstructFromStaticTypeWithoutTestFixtureAttribute()
+ {
+ CanConstructFrom(typeof(StaticFixtureWithoutTestFixtureAttribute));
+ }
+
+ [Test]
+ public void CanRunStaticFixture()
+ {
+ TestAssert.IsRunnable(typeof(StaticFixtureWithoutTestFixtureAttribute), ResultState.Success);
+ }
+
+#if !NETCF
+ [Test, Platform(Exclude = "NETCF", Reason = "NYI")]
+ public void CanRunGenericFixtureWithProperArgsProvided()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(
+ typeof(NUnit.TestData.TestFixtureData.GenericFixtureWithProperArgsProvided<>));
+ Assert.That(suite.RunState, Is.EqualTo(RunState.Runnable));
+ Assert.That(suite is ParameterizedFixtureSuite);
+ Assert.That(suite.Tests.Count, Is.EqualTo(2));
+ }
+
+// [Test]
+// public void CannotRunGenericFixtureWithNoTestFixtureAttribute()
+// {
+// TestSuite suite = TestBuilder.MakeFixture(
+// GetTestDataType("NUnit.TestData.TestFixtureData.GenericFixtureWithNoTestFixtureAttribute`1"));
+//
+// Assert.That(suite.RunState, Is.EqualTo(RunState.NotRunnable));
+// Assert.That(suite.Properties.Get(PropertyNames.SkipReason),
+// Is.StringStarting("Fixture type contains generic parameters"));
+// }
+
+ [Test, Platform(Exclude = "NETCF", Reason = "NYI")]
+ public void CannotRunGenericFixtureWithNoArgsProvided()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(
+ typeof(NUnit.TestData.TestFixtureData.GenericFixtureWithNoArgsProvided<>));
+
+ Test fixture = (Test)suite.Tests[0];
+ Assert.That(fixture.RunState, Is.EqualTo(RunState.NotRunnable));
+ Assert.That((string)fixture.Properties.Get(PropertyNames.SkipReason), Is.StringStarting("Fixture type contains generic parameters"));
+ }
+
+ [Test, Platform(Exclude = "NETCF", Reason = "NYI")]
+ public void CannotRunGenericFixtureDerivedFromAbstractFixtureWithNoArgsProvided()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(
+ typeof(NUnit.TestData.TestFixtureData.GenericFixtureDerivedFromAbstractFixtureWithNoArgsProvided<>));
+ TestAssert.IsNotRunnable((Test)suite.Tests[0]);
+ }
+
+ [Test, Platform(Exclude = "NETCF", Reason = "NYI")]
+ public void CanRunGenericFixtureDerivedFromAbstractFixtureWithArgsProvided()
+ {
+ TestSuite suite = TestBuilder.MakeFixture(
+ typeof(NUnit.TestData.TestFixtureData.GenericFixtureDerivedFromAbstractFixtureWithArgsProvided<>));
+ Assert.That(suite.RunState, Is.EqualTo(RunState.Runnable));
+ Assert.That(suite is ParameterizedFixtureSuite);
+ Assert.That(suite.Tests.Count, Is.EqualTo(2));
+ }
+#endif
+#endif
+
+ #region SetUp Signature
+ [Test]
+ public void CannotRunPrivateSetUp()
+ {
+ TestAssert.IsNotRunnable(typeof(PrivateSetUp));
+ }
+
+#if !SL_3_0 && !SL_4_0
+ [Test]
+ public void CanRunProtectedSetUp()
+ {
+ TestAssert.IsRunnable(typeof(ProtectedSetUp), ResultState.Success);
+ }
+#endif
+
+ /// <summary>
+ /// Determines whether this instance [can run static set up].
+ /// </summary>
+ [Test]
+ public void CanRunStaticSetUp()
+ {
+ TestAssert.IsRunnable(typeof(StaticSetUp), ResultState.Success);
+ }
+
+ [Test]
+ public void CannotRunSetupWithReturnValue()
+ {
+ TestAssert.IsNotRunnable(typeof(SetUpWithReturnValue));
+ }
+
+ [Test]
+ public void CannotRunSetupWithParameters()
+ {
+ TestAssert.IsNotRunnable(typeof(SetUpWithParameters));
+ }
+ #endregion
+
+ #region TearDown Signature
+ [Test]
+ public void CannotRunPrivateTearDown()
+ {
+ TestAssert.IsNotRunnable(typeof(PrivateTearDown));
+ }
+
+#if !SL_3_0 && !SL_4_0
+ [Test]
+ public void CanRunProtectedTearDown()
+ {
+ TestAssert.IsRunnable(typeof(ProtectedTearDown), ResultState.Success);
+ }
+#endif
+
+ [Test]
+ public void CanRunStaticTearDown()
+ {
+ TestAssert.IsRunnable(typeof(StaticTearDown), ResultState.Success);
+ }
+
+ [Test]
+ public void CannotRunTearDownWithReturnValue()
+ {
+ TestAssert.IsNotRunnable(typeof(TearDownWithReturnValue));
+ }
+
+ [Test]
+ public void CannotRunTearDownWithParameters()
+ {
+ TestAssert.IsNotRunnable(typeof(TearDownWithParameters));
+ }
+ #endregion
+
+ #region TestFixtureSetUp Signature
+ [Test]
+ public void CannotRunPrivateFixtureSetUp()
+ {
+ TestAssert.IsNotRunnable(typeof(PrivateFixtureSetUp));
+ }
+
+#if !SL_3_0 && !SL_4_0
+ [Test]
+ public void CanRunProtectedFixtureSetUp()
+ {
+ TestAssert.IsRunnable(typeof(ProtectedFixtureSetUp), ResultState.Success);
+ }
+#endif
+
+ [Test]
+ public void CanRunStaticFixtureSetUp()
+ {
+ TestAssert.IsRunnable(typeof(StaticFixtureSetUp), ResultState.Success);
+ }
+
+ [Test]
+ public void CannotRunFixtureSetupWithReturnValue()
+ {
+ TestAssert.IsNotRunnable(typeof(FixtureSetUpWithReturnValue));
+ }
+
+ [Test]
+ public void CannotRunFixtureSetupWithParameters()
+ {
+ TestAssert.IsNotRunnable(typeof(FixtureSetUpWithParameters));
+ }
+ #endregion
+
+ #region TestFixtureTearDown Signature
+
+ [Test]
+ public void CannotRunPrivateFixtureTearDown()
+ {
+ TestAssert.IsNotRunnable(typeof(PrivateFixtureTearDown));
+ }
+
+#if !SL_3_0 && !SL_4_0
+ [Test]
+ public void CanRunProtectedFixtureTearDown()
+ {
+ TestAssert.IsRunnable(typeof(ProtectedFixtureTearDown), ResultState.Success);
+ }
+#endif
+
+ [Test]
+ public void CanRunStaticFixtureTearDown()
+ {
+ TestAssert.IsRunnable(typeof(StaticFixtureTearDown), ResultState.Success);
+ }
+
+// [TestFixture]
+// [Category("fixture category")]
+// [Category("second")]
+// private class HasCategories
+// {
+// [Test] public void OneTest()
+// {}
+// }
+//
+// [Test]
+// public void LoadCategories()
+// {
+// TestSuite fixture = LoadFixture("NUnit.Core.Tests.TestFixtureBuilderTests+HasCategories");
+// Assert.IsNotNull(fixture);
+// Assert.AreEqual(2, fixture.Categories.Count);
+// }
+
+ [Test]
+ public void CannotRunFixtureTearDownWithReturnValue()
+ {
+ TestAssert.IsNotRunnable(typeof(FixtureTearDownWithReturnValue));
+ }
+
+ [Test]
+ public void CannotRunFixtureTearDownWithParameters()
+ {
+ TestAssert.IsNotRunnable(typeof(FixtureTearDownWithParameters));
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TestMethodSignatureTests.cs b/external/guiunit/src/tests/Internal/TestMethodSignatureTests.cs
new file mode 100755
index 0000000..125f4be
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TestMethodSignatureTests.cs
@@ -0,0 +1,198 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+using NUnit.Framework.Api;
+using NUnit.TestData.TestMethodSignatureFixture;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class TestMethodSignatureTests
+ {
+ private static Type fixtureType = typeof(TestMethodSignatureFixture);
+
+ [Test]
+ public void InstanceTestMethodIsRunnable()
+ {
+ TestAssert.IsRunnable(fixtureType, "InstanceTestMethod", ResultState.Success);
+ }
+
+ [Test]
+ public void StaticTestMethodIsRunnable()
+ {
+ TestAssert.IsRunnable(fixtureType, "StaticTestMethod", ResultState.Success);
+ }
+
+ [Test]
+ public void TestMethodWithoutParametersWithArgumentsProvidedIsNotRunnable()
+ {
+ TestAssert.FirstChildIsNotRunnable(fixtureType, "TestMethodWithoutParametersWithArgumentsProvided");
+ }
+
+ [Test]
+ public void TestMethodWithArgumentsNotProvidedIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable(fixtureType, "TestMethodWithArgumentsNotProvided");
+ }
+
+ [Test]
+ public void TestMethodWithArgumentsProvidedIsRunnable()
+ {
+ TestAssert.IsRunnable(fixtureType, "TestMethodWithArgumentsProvided", ResultState.Success);
+ }
+
+ [Test]
+ public void TestMethodWithWrongNumberOfArgumentsProvidedIsNotRunnable()
+ {
+ TestAssert.FirstChildIsNotRunnable(fixtureType, "TestMethodWithWrongNumberOfArgumentsProvided");
+ }
+
+ [Test]
+ public void TestMethodWithWrongArgumentTypesProvidedGivesError()
+ {
+ TestAssert.IsRunnable(fixtureType, "TestMethodWithWrongArgumentTypesProvided", ResultState.Error);
+ }
+
+ [Test]
+ public void StaticTestMethodWithArgumentsNotProvidedIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable(fixtureType, "StaticTestMethodWithArgumentsNotProvided");
+ }
+
+ [Test]
+ public void StaticTestMethodWithArgumentsProvidedIsRunnable()
+ {
+ TestAssert.IsRunnable(fixtureType, "StaticTestMethodWithArgumentsProvided", ResultState.Success);
+ }
+
+ [Test]
+ public void StaticTestMethodWithWrongNumberOfArgumentsProvidedIsNotRunnable()
+ {
+ TestAssert.FirstChildIsNotRunnable(fixtureType, "StaticTestMethodWithWrongNumberOfArgumentsProvided");
+ }
+
+ [Test]
+ public void StaticTestMethodWithWrongArgumentTypesProvidedGivesError()
+ {
+ TestAssert.IsRunnable(fixtureType, "StaticTestMethodWithWrongArgumentTypesProvided", ResultState.Error);
+ }
+
+ [Test]
+ public void TestMethodWithConvertibleArgumentsIsRunnable()
+ {
+ TestAssert.IsRunnable(fixtureType, "TestMethodWithConvertibleArguments", ResultState.Success);
+ }
+
+ [Test]
+ public void TestMethodWithNonConvertibleArgumentsGivesError()
+ {
+ TestAssert.IsRunnable(fixtureType, "TestMethodWithNonConvertibleArguments", ResultState.Error);
+ }
+
+ [Test]
+ public void ProtectedTestMethodIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable( fixtureType, "ProtectedTestMethod" );
+ }
+
+ [Test]
+ public void PrivateTestMethodIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable( fixtureType, "PrivateTestMethod" );
+ }
+
+ [Test]
+ public void TestMethodWithReturnTypeIsNotRunnable()
+ {
+ TestAssert.IsNotRunnable( fixtureType, "TestMethodWithReturnType" );
+ }
+
+ [Test]
+ public void TestMethodWithMultipleTestCasesExecutesMultipleTimes()
+ {
+ ITestResult result = TestBuilder.RunTestCase(fixtureType, "TestMethodWithMultipleTestCases");
+
+ Assert.That( result.ResultState, Is.EqualTo(ResultState.Success) );
+ ResultSummary summary = new ResultSummary(result);
+ Assert.That(summary.TestsRun, Is.EqualTo(3));
+ }
+
+ [Test]
+ public void TestMethodWithMultipleTestCasesUsesCorrectNames()
+ {
+ string name = "TestMethodWithMultipleTestCases";
+ string fullName = typeof (TestMethodSignatureFixture).FullName + "." + name;
+
+ TestSuite suite = TestBuilder.MakeParameterizedMethodSuite(fixtureType, name);
+ Assert.That(suite.TestCaseCount, Is.EqualTo(3));
+
+ string[] names = new string[suite.Tests.Count];
+ string[] fullNames = new string[suite.Tests.Count];
+
+ int index = 0;
+ foreach (Test test in suite.Tests)
+ {
+ names[index] = test.Name;
+ fullNames[index] = test.FullName;
+ index++;
+ }
+
+ Assert.That(names, Has.Member(name + "(12,3,4)"));
+ Assert.That(names, Has.Member(name + "(12,2,6)"));
+ Assert.That(names, Has.Member(name + "(12,4,3)"));
+
+ Assert.That(fullNames, Has.Member(fullName + "(12,3,4)"));
+ Assert.That(fullNames, Has.Member(fullName + "(12,2,6)"));
+ Assert.That(fullNames, Has.Member(fullName + "(12,4,3)"));
+ }
+
+ [Test]
+ public void RunningTestsThroughFixtureGivesCorrectResults()
+ {
+ ITestResult result = TestBuilder.RunTestFixture(fixtureType);
+ ResultSummary summary = new ResultSummary(result);
+
+ Assert.That(
+ summary.ResultCount,
+ Is.EqualTo(TestMethodSignatureFixture.Tests));
+ Assert.That(
+ summary.TestsRun,
+ Is.EqualTo(TestMethodSignatureFixture.Runnable));
+ //Assert.That(
+ // summary.NotRunnable,
+ // Is.EqualTo(TestMethodSignatureFixture.NotRunnable));
+ //Assert.That(
+ // summary.Errors,
+ // Is.EqualTo(TestMethodSignatureFixture.Errors));
+ Assert.That(
+ summary.Failures,
+ Is.EqualTo(TestMethodSignatureFixture.Failures + TestMethodSignatureFixture.Errors));
+ Assert.That(
+ summary.TestsNotRun,
+ Is.EqualTo(TestMethodSignatureFixture.NotRunnable));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TestResultTests.cs b/external/guiunit/src/tests/Internal/TestResultTests.cs
new file mode 100755
index 0000000..89ab1f2
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TestResultTests.cs
@@ -0,0 +1,680 @@
+// ***********************************************************************
+// Copyright (c) 2010 Charlie Poole
+//
+// 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.IO;
+using System.Text;
+using NUnit.Framework.Api;
+using NUnit.TestUtilities;
+using System;
+
+namespace NUnit.Framework.Internal
+{
+ /// <summary>
+ /// Summary description for TestResultTests.
+ /// </summary>
+ [TestFixture]
+ public abstract class TestResultTests
+ {
+ protected TestResult testResult;
+ protected TestResult suiteResult;
+ protected TestMethod test;
+
+ protected string ignoredChildMessage = "One or more child tests were ignored";
+ protected string failingChildMessage = "One or more child tests had errors";
+
+ [SetUp]
+ public void SetUp()
+ {
+ TestSuite suite = new TestSuite(typeof(DummySuite));
+ suite.Properties.Set(PropertyNames.Description, "Suite description");
+ suite.Properties.Add(PropertyNames.Category, "Fast");
+ suite.Properties.Add("Value", 3);
+ suiteResult = suite.MakeTestResult();
+
+ test = new TestMethod(typeof(DummySuite).GetMethod("DummyMethod"), suite);
+ test.Properties.Set(PropertyNames.Description, "Test description");
+ test.Properties.Add(PropertyNames.Category, "Dubious");
+ test.Properties.Set("Priority", "low");
+ testResult = test.MakeTestResult();
+
+ SimulateTestRun();
+ }
+
+ [Test]
+ public void TestResultBasicInfo()
+ {
+ Assert.AreEqual("DummyMethod", testResult.Name);
+ Assert.AreEqual("NUnit.Framework.Internal.TestResultTests+DummySuite.DummyMethod", testResult.FullName);
+ }
+
+ [Test]
+ public void SuiteResultBasicInfo()
+ {
+ Assert.AreEqual("TestResultTests+DummySuite", suiteResult.Name);
+ Assert.AreEqual("NUnit.Framework.Internal.TestResultTests+DummySuite", suiteResult.FullName);
+ }
+
+ [Test]
+ public void TestResultBasicInfo_XmlNode()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ //Assert.True(testNode is XmlElement);
+ Assert.NotNull(testNode.Attributes["id"]);
+ Assert.AreEqual("test-case", testNode.Name);
+ Assert.AreEqual("DummyMethod", testNode.Attributes["name"]);
+ Assert.AreEqual("NUnit.Framework.Internal.TestResultTests+DummySuite.DummyMethod", testNode.Attributes["fullname"]);
+
+ Assert.AreEqual("Test description", testNode.FindDescendant("properties/property[@name='Description']").Attributes["value"]);
+ Assert.AreEqual("Dubious", testNode.FindDescendant("properties/property[@name='Category']").Attributes["value"]);
+ Assert.AreEqual("low", testNode.FindDescendant("properties/property[@name='Priority']").Attributes["value"]);
+
+ Assert.AreEqual(0, testNode.FindDescendants("test-case").Count);
+ }
+
+ [Test]
+ public void TestResultBasicInfo_WriteXml()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ string expected = GenerateExpectedXml(testResult);
+
+ StringBuilder actual = new StringBuilder();
+ StringWriter sw = new StringWriter(actual);
+#if CLR_2_0 || CLR_4_0
+ System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings();
+ settings.CloseOutput = true;
+ settings.ConformanceLevel = System.Xml.ConformanceLevel.Fragment;
+ System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(sw, settings);
+#else
+ System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(sw);
+#endif
+ testNode.WriteTo(writer);
+ writer.Close();
+
+ Assert.That(actual.ToString(), Is.EqualTo(expected));
+ }
+
+ [Test]
+ public void SuiteResultBasicInfo_XmlNode()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ //Assert.True(suiteNode is XmlElement);
+ Assert.NotNull(suiteNode.Attributes["id"]);
+ Assert.AreEqual("test-suite", suiteNode.Name);
+ Assert.AreEqual("TestResultTests+DummySuite", suiteNode.Attributes["name"]);
+ Assert.AreEqual("NUnit.Framework.Internal.TestResultTests+DummySuite", suiteNode.Attributes["fullname"]);
+
+ Assert.AreEqual("Suite description", suiteNode.FindDescendant("properties/property[@name='Description']").Attributes["value"]);
+ Assert.AreEqual("Fast", suiteNode.FindDescendant("properties/property[@name='Category']").Attributes["value"]);
+ Assert.AreEqual("3", suiteNode.FindDescendant("properties/property[@name='Value']").Attributes["value"]);
+ }
+
+ [Test]
+ public void SuiteResultBasicInfo_WriteXml()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ string expected = GenerateExpectedXml(suiteResult);
+
+ StringBuilder actual = new StringBuilder();
+ StringWriter sw = new StringWriter(actual);
+#if CLR_2_0 || CLR_4_0
+ System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings();
+ settings.CloseOutput = true;
+ settings.ConformanceLevel = System.Xml.ConformanceLevel.Fragment;
+ System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(sw, settings);
+#else
+ System.Xml.XmlWriter writer = new System.Xml.XmlTextWriter(sw);
+#endif
+ suiteNode.WriteTo(writer);
+ writer.Close();
+
+ Assert.That(actual.ToString(), Is.EqualTo(expected));
+ }
+
+ protected abstract void SimulateTestRun();
+
+ private static string GenerateExpectedXml(TestResult result)
+ {
+ StringBuilder expected = new StringBuilder();
+ TestSuiteResult suiteResult = result as TestSuiteResult;
+
+ if(suiteResult != null)
+ expected.Append("<test-suite type=" + Quoted("TestSuite"));
+ else
+ expected.Append("<test-case");
+
+ expected.Append(" id=" + Quoted(result.Test.Id));
+ expected.Append(" name=" + Quoted(result.Name));
+ expected.Append(" fullname=" + Quoted(result.FullName));
+
+ if (suiteResult != null)
+ expected.Append(" testcasecount=" + Quoted(result.Test.TestCaseCount));
+
+ expected.Append(" result=" + Quoted(result.ResultState.Status));
+ if (result.ResultState.Label != null && result.ResultState.Label != "")
+ expected.Append(" label=" + Quoted(result.ResultState.Label));
+
+ expected.Append(" time=" + Quoted(result.Duration.ToString()));
+
+ if (suiteResult != null)
+ {
+ ResultSummary summary = new ResultSummary(suiteResult);
+ expected.Append(" total=" + Quoted(suiteResult.PassCount+suiteResult.FailCount+suiteResult.InconclusiveCount+suiteResult.SkipCount));
+ expected.Append(" passed=" + Quoted(suiteResult.PassCount));
+ expected.Append(" failed=" + Quoted(suiteResult.FailCount));
+ expected.Append(" inconclusive=" + Quoted(suiteResult.InconclusiveCount));
+ expected.Append(" skipped=" + Quoted(suiteResult.SkipCount));
+ }
+
+ expected.Append(" asserts=" + Quoted(result.AssertCount) + ">");
+
+ if (result.Test.Properties.Count > 0)
+ {
+ expected.Append("<properties>");
+ foreach (string key in result.Test.Properties.Keys)
+ foreach (object value in result.Test.Properties[key])
+ expected.Append("<property name=" + Quoted(key) + " value=" + Quoted(value) + " />");
+ expected.Append("</properties>");
+ }
+
+ if (result.ResultState.Status == TestStatus.Failed)
+ {
+ expected.Append("<failure>");
+ if (result.Message != null)
+ expected.Append("<message>" + Escape(result.Message) + "</message>");
+
+ if (result.StackTrace != null)
+ expected.Append("<stack-trace>" + Escape(result.StackTrace) + "</stack-trace>");
+
+ expected.Append("</failure>");
+ }
+ else if (result.Message != null)
+ {
+ expected.Append("<reason><message>" + Escape(result.Message) + "</message></reason>");
+ }
+
+ if (suiteResult != null)
+ {
+ foreach (TestResult childResult in suiteResult.Children)
+ expected.Append(GenerateExpectedXml(childResult));
+
+ expected.Append("</test-suite>");
+ }
+ else
+ expected.Append("</test-case>");
+
+ return expected.ToString();
+ }
+
+ private static string Quoted(object o)
+ {
+ return "\"" + o.ToString() + "\"";
+ }
+
+ private static string Escape(string s)
+ {
+ return s
+ .Replace("&", "&")
+ .Replace(">", ">")
+ .Replace("<", "<")
+ .Replace("\"", """)
+ .Replace("'", "'");
+ }
+
+ public class DummySuite
+ {
+ public void DummyMethod() { }
+ }
+ }
+
+ public class DefaultResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void TestResultIsInconclusive()
+ {
+ Assert.AreEqual(ResultState.Inconclusive, testResult.ResultState);
+ Assert.AreEqual(TestStatus.Inconclusive, testResult.ResultState.Status);
+ Assert.That(testResult.ResultState.Label, Is.Empty);
+ Assert.That(testResult.Duration, Is.EqualTo(TimeSpan.Zero));
+ }
+
+ [Test]
+ public void SuiteResultIsInconclusive()
+ {
+ Assert.AreEqual(ResultState.Inconclusive, suiteResult.ResultState);
+ Assert.AreEqual(0, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void TestResultXmlNodeIsInconclusive()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ Assert.AreEqual("Inconclusive", testNode.Attributes["result"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsInconclusive()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Inconclusive", suiteNode.Attributes["result"]);
+ Assert.AreEqual("0", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("1", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("0", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasOneChildTest()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(1, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+
+ public class SuccessResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ testResult.SetResult(ResultState.Success, "Test passed!");
+ testResult.Duration = TimeSpan.FromSeconds(0.125);
+ suiteResult.Duration = TimeSpan.FromSeconds(0.125);
+ testResult.AssertCount = 2;
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void TestResultIsSuccess()
+ {
+ Assert.True(testResult.ResultState == ResultState.Success);
+ Assert.AreEqual(TestStatus.Passed, testResult.ResultState.Status);
+ Assert.That(testResult.ResultState.Label, Is.Empty);
+ Assert.AreEqual("Test passed!", testResult.Message);
+ Assert.That(testResult.Duration.TotalSeconds, Is.EqualTo(0.125));
+ }
+
+ [Test]
+ public void SuiteResultIsSuccess()
+ {
+ Assert.True(suiteResult.ResultState == ResultState.Success);
+ Assert.AreEqual(TestStatus.Passed, suiteResult.ResultState.Status);
+ Assert.That(suiteResult.ResultState.Label, Is.Empty);
+
+ Assert.AreEqual(1, suiteResult.PassCount);
+ Assert.AreEqual(0, suiteResult.FailCount);
+ Assert.AreEqual(0, suiteResult.SkipCount);
+ Assert.AreEqual(0, suiteResult.InconclusiveCount);
+ Assert.AreEqual(2, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void TestResultXmlNodeIsSuccess()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ Assert.AreEqual("Passed", testNode.Attributes["result"]);
+ Assert.AreEqual("00:00:00.1250000", testNode.Attributes["time"]);
+ Assert.AreEqual("2", testNode.Attributes["asserts"]);
+
+ XmlNode reason = testNode.FindDescendant("reason");
+ Assert.NotNull(reason);
+ Assert.NotNull(reason.FindDescendant("message"));
+ Assert.AreEqual("Test passed!", reason.FindDescendant("message").TextContent);
+ Assert.AreEqual("Test passed!", reason.FindDescendant("message").EscapedTextContent);
+ Assert.Null(reason.FindDescendant("stack-trace"));
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsSuccess()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Passed", suiteNode.Attributes["result"]);
+ Assert.AreEqual("00:00:00.1250000", suiteNode.Attributes["time"]);
+ Assert.AreEqual("1", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("0", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("2", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasOneChildTest()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(1, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+
+ public class IgnoredResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ testResult.SetResult(ResultState.Ignored, "because");
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void TestResultIsIgnored()
+ {
+ Assert.AreEqual(ResultState.Ignored, testResult.ResultState);
+ Assert.AreEqual(TestStatus.Skipped, testResult.ResultState.Status);
+ Assert.AreEqual("Ignored", testResult.ResultState.Label);
+ Assert.AreEqual("because", testResult.Message);
+ }
+
+ [Test]
+ public void SuiteResultIsIgnored()
+ {
+ Assert.AreEqual(ResultState.Ignored, suiteResult.ResultState);
+ Assert.AreEqual(TestStatus.Skipped, suiteResult.ResultState.Status);
+ Assert.AreEqual(ignoredChildMessage, suiteResult.Message);
+
+ Assert.AreEqual(0, suiteResult.PassCount);
+ Assert.AreEqual(0, suiteResult.FailCount);
+ Assert.AreEqual(1, suiteResult.SkipCount);
+ Assert.AreEqual(0, suiteResult.InconclusiveCount);
+ Assert.AreEqual(0, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void TestResultXmlNodeIsIgnored()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ Assert.AreEqual("Skipped", testNode.Attributes["result"]);
+ Assert.AreEqual("Ignored", testNode.Attributes["label"]);
+ XmlNode reason = testNode.FindDescendant("reason");
+ Assert.NotNull(reason);
+ Assert.NotNull(reason.FindDescendant("message"));
+ Assert.AreEqual("because", reason.FindDescendant("message").TextContent);
+ Assert.AreEqual("because", reason.FindDescendant("message").EscapedTextContent);
+ Assert.Null(reason.FindDescendant("stack-trace"));
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsIgnored()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Skipped", suiteNode.Attributes["result"]);
+ Assert.AreEqual("Ignored", suiteNode.Attributes["label"]);
+ Assert.AreEqual("0", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("1", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("0", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("0", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasOneChildTest()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(1, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+
+ public class FailedResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ testResult.SetResult(ResultState.Failure, "message with <xml> & straight text", "stack trace");
+ testResult.Duration = TimeSpan.FromSeconds(0.125);
+ suiteResult.Duration = TimeSpan.FromSeconds(0.125);
+ testResult.AssertCount = 3;
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void TestResultIsFailure()
+ {
+ Assert.AreEqual(ResultState.Failure, testResult.ResultState);
+ Assert.AreEqual(TestStatus.Failed, testResult.ResultState.Status);
+ Assert.AreEqual("message with <xml> & straight text", testResult.Message);
+ Assert.AreEqual("stack trace", testResult.StackTrace);
+ Assert.AreEqual(0.125, testResult.Duration.TotalSeconds);
+ }
+
+ [Test]
+ public void SuiteResultIsFailure()
+ {
+ Assert.AreEqual(ResultState.Failure, suiteResult.ResultState);
+ Assert.AreEqual(TestStatus.Failed, suiteResult.ResultState.Status);
+ Assert.AreEqual(failingChildMessage, suiteResult.Message);
+ Assert.Null(suiteResult.StackTrace);
+
+ Assert.AreEqual(0, suiteResult.PassCount);
+ Assert.AreEqual(1, suiteResult.FailCount);
+ Assert.AreEqual(0, suiteResult.SkipCount);
+ Assert.AreEqual(0, suiteResult.InconclusiveCount);
+ Assert.AreEqual(3, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void TestResultXmlNodeIsFailure()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ Assert.AreEqual("Failed", testNode.Attributes["result"]);
+ Assert.AreEqual("00:00:00.1250000", testNode.Attributes["time"]);
+
+ XmlNode failureNode = testNode.FindDescendant("failure");
+ Assert.NotNull(failureNode, "No <failure> element found");
+
+ XmlNode messageNode = failureNode.FindDescendant("message");
+ Assert.NotNull(messageNode, "No <message> element found");
+ Assert.AreEqual("message with <xml> & straight text", messageNode.TextContent);
+ Assert.AreEqual("message with <xml> & straight text", messageNode.EscapedTextContent);
+
+ XmlNode stacktraceNode = failureNode.FindDescendant("stack-trace");
+ Assert.NotNull(stacktraceNode, "No <stack-trace> element found");
+ Assert.AreEqual("stack trace", stacktraceNode.TextContent);
+ Assert.AreEqual("stack trace", stacktraceNode.EscapedTextContent);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsFailure()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Failed", suiteNode.Attributes["result"]);
+ Assert.AreEqual("00:00:00.1250000", suiteNode.Attributes["time"]);
+
+ XmlNode failureNode = suiteNode.FindDescendant("failure");
+ Assert.NotNull(failureNode, "No <failure> element found");
+
+ XmlNode messageNode = failureNode.FindDescendant("message");
+ Assert.NotNull(messageNode, "No <message> element found");
+ Assert.AreEqual(failingChildMessage, messageNode.TextContent);
+ Assert.AreEqual(failingChildMessage, messageNode.EscapedTextContent);
+
+ XmlNode stacktraceNode = failureNode.FindDescendant("stacktrace");
+ Assert.Null(stacktraceNode, "Unexpected <stack-trace> element found");
+
+ Assert.AreEqual("0", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("1", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("0", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("3", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasOneChildTest()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(1, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+
+ public class InconclusiveResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ testResult.SetResult(ResultState.Inconclusive, "because");
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void TestResultIsInconclusive()
+ {
+ Assert.AreEqual(ResultState.Inconclusive, testResult.ResultState);
+ Assert.AreEqual(TestStatus.Inconclusive, testResult.ResultState.Status);
+ Assert.That(testResult.ResultState.Label, Is.Empty);
+ Assert.AreEqual("because", testResult.Message);
+ }
+
+ [Test]
+ public void SuiteResultIsInconclusive()
+ {
+ Assert.AreEqual(ResultState.Inconclusive, suiteResult.ResultState);
+ Assert.AreEqual(TestStatus.Inconclusive, suiteResult.ResultState.Status);
+ Assert.Null(suiteResult.Message);
+
+ Assert.AreEqual(0, suiteResult.PassCount);
+ Assert.AreEqual(0, suiteResult.FailCount);
+ Assert.AreEqual(0, suiteResult.SkipCount);
+ Assert.AreEqual(1, suiteResult.InconclusiveCount);
+ Assert.AreEqual(0, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void TestResultXmlNodeIsInconclusive()
+ {
+ XmlNode testNode = testResult.ToXml(true);
+
+ Assert.AreEqual("Inconclusive", testNode.Attributes["result"]);
+ Assert.That(!testNode.Attributes.ContainsKey("label"), "Unexpected attribute 'label' found");
+ XmlNode reason = testNode.FindDescendant("reason");
+ Assert.NotNull(reason);
+ Assert.NotNull(reason.FindDescendant("message"));
+ Assert.AreEqual("because", reason.FindDescendant("message").TextContent);
+ Assert.AreEqual("because", reason.FindDescendant("message").EscapedTextContent);
+ Assert.Null(reason.FindDescendant("stack-trace"));
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsInconclusive()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Inconclusive", suiteNode.Attributes["result"]);
+ Assert.That(!suiteNode.Attributes.ContainsKey("label"), "Unexpected 'label' attribute found");
+ Assert.AreEqual("0", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("1", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("0", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasOneChildTest()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(1, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+
+ public class MixedResultTests : TestResultTests
+ {
+ protected override void SimulateTestRun()
+ {
+ testResult.SetResult(ResultState.Success);
+ testResult.AssertCount = 2;
+ suiteResult.AddResult(testResult);
+
+ testResult.SetResult(ResultState.Failure, "message", "stack trace");
+ testResult.AssertCount = 1;
+ suiteResult.AddResult(testResult);
+
+ testResult.SetResult(ResultState.Success);
+ testResult.AssertCount = 3;
+ suiteResult.AddResult(testResult);
+
+ testResult.SetResult(ResultState.Inconclusive, "inconclusive reason", "stacktrace");
+ testResult.AssertCount = 0;
+ suiteResult.AddResult(testResult);
+ }
+
+ [Test]
+ public void SuiteResultIsFailure()
+ {
+ Assert.AreEqual(ResultState.Failure, suiteResult.ResultState);
+ Assert.AreEqual(TestStatus.Failed, suiteResult.ResultState.Status);
+ Assert.AreEqual(failingChildMessage, suiteResult.Message);
+ Assert.Null(suiteResult.StackTrace, "There should be no stacktrace");
+
+ Assert.AreEqual(2, suiteResult.PassCount);
+ Assert.AreEqual(1, suiteResult.FailCount);
+ Assert.AreEqual(0, suiteResult.SkipCount);
+ Assert.AreEqual(1, suiteResult.InconclusiveCount);
+ Assert.AreEqual(6, suiteResult.AssertCount);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeIsFailure()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual("Failed", suiteNode.Attributes["result"]);
+ XmlNode failureNode = suiteNode.FindDescendant("failure");
+ Assert.NotNull(failureNode, "No failure element found");
+
+ XmlNode messageNode = failureNode.FindDescendant("message");
+ Assert.NotNull(messageNode, "No message element found");
+ Assert.AreEqual(failingChildMessage, messageNode.TextContent);
+ Assert.AreEqual(failingChildMessage, messageNode.EscapedTextContent);
+
+ XmlNode stacktraceNode = failureNode.FindDescendant("stacktrace");
+ Assert.Null(stacktraceNode, "There should be no stacktrace");
+
+ Assert.AreEqual("2", suiteNode.Attributes["passed"]);
+ Assert.AreEqual("1", suiteNode.Attributes["failed"]);
+ Assert.AreEqual("0", suiteNode.Attributes["skipped"]);
+ Assert.AreEqual("1", suiteNode.Attributes["inconclusive"]);
+ Assert.AreEqual("6", suiteNode.Attributes["asserts"]);
+ }
+
+ [Test]
+ public void SuiteResultXmlNodeHasFourChildTests()
+ {
+ XmlNode suiteNode = suiteResult.ToXml(true);
+
+ Assert.AreEqual(4, suiteNode.FindDescendants("test-case").Count);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TestXmlTests.cs b/external/guiunit/src/tests/Internal/TestXmlTests.cs
new file mode 100755
index 0000000..8b042f4
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TestXmlTests.cs
@@ -0,0 +1,171 @@
+using System;
+using NUnit.Framework.Api;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class TestXmlTests
+ {
+ private TestSuite testSuite;
+ private TestFixture testFixture;
+ private TestMethod testMethod;
+
+ [SetUp]
+ public void SetUp()
+ {
+ testFixture = new TestFixture(typeof(DummyFixture));
+ testFixture.Properties.Set(PropertyNames.Description, "Fixture description");
+ testFixture.Properties.Add(PropertyNames.Category, "Fast");
+ testFixture.Properties.Add("Value", 3);
+
+ testMethod = new TestMethod(typeof(DummyFixture).GetMethod("DummyMethod"), testFixture);
+ testMethod.Properties.Set(PropertyNames.Description, "Test description");
+ testMethod.Properties.Add(PropertyNames.Category, "Dubious");
+ testMethod.Properties.Set("Priority", "low");
+
+ testFixture.Tests.Add(testMethod);
+
+ testSuite = new TestSuite(typeof(DummyFixture));
+ testSuite.Properties.Set(PropertyNames.Description, "Suite description");
+ }
+
+ [Test]
+ public void TestTypeTests()
+ {
+ Assert.That(testMethod.TestType,
+ Is.EqualTo("TestMethod"));
+ Assert.That(testFixture.TestType,
+ Is.EqualTo("TestFixture"));
+ Assert.That(testSuite.TestType,
+ Is.EqualTo("TestSuite"));
+ Assert.That(new TestAssembly(System.Reflection.Assembly.GetExecutingAssembly(), "junk").TestType,
+ Is.EqualTo("Assembly"));
+ Assert.That(new ParameterizedMethodSuite(typeof(DummyFixture).GetMethod("ParameterizedMethod")).TestType,
+ Is.EqualTo("ParameterizedMethod"));
+ Assert.That(new ParameterizedFixtureSuite(typeof(DummyFixture)).TestType,
+ Is.EqualTo("ParameterizedFixture"));
+#if CLR_2_0 || CLR_4_0
+ Assert.That(new ParameterizedMethodSuite(typeof(DummyFixture).GetMethod("GenericMethod")).TestType,
+ Is.EqualTo("GenericMethod"));
+ Type genericType = typeof(DummyGenericFixture<int>).GetGenericTypeDefinition();
+ Assert.That(new ParameterizedFixtureSuite(genericType).TestType,
+ Is.EqualTo("GenericFixture"));
+#endif
+ }
+
+ [Test]
+ public void TestMethodToXml()
+ {
+ CheckXmlForTest(testMethod, false);
+ }
+
+ [Test]
+ public void TestFixtureToXml()
+ {
+ CheckXmlForTest(testFixture, false);
+ }
+
+ [Test]
+ public void TestFixtureToXml_Recursive()
+ {
+ CheckXmlForTest(testFixture, true);
+ }
+
+ [Test]
+ public void TestSuiteToXml()
+ {
+ CheckXmlForTest(testSuite, false);
+ }
+
+ [Test]
+ public void TestSuiteToXml_Recursive()
+ {
+ CheckXmlForTest(testSuite, true);
+ }
+
+ #region Helper Methods For Checking XML
+
+ private void CheckXmlForTest(Test test, bool recursive)
+ {
+ XmlNode topNode = test.ToXml(true);
+ CheckXmlForTest(test, topNode, recursive);
+ }
+
+ private void CheckXmlForTest(Test test, XmlNode topNode, bool recursive)
+ {
+ Assert.NotNull(topNode);
+
+ //if (test is TestSuite)
+ //{
+ // Assert.That(topNode.Name, Is.EqualTo("test-suite"));
+ // Assert.That(topNode.Attributes["type"].Value, Is.EqualTo(test.XmlElementName));
+ //}
+ //else
+ //{
+ // Assert.That(topNode.Name, Is.EqualTo("test-case"));
+ //}
+
+ Assert.That(topNode.Name, Is.EqualTo(test.XmlElementName));
+ Assert.That(topNode.Attributes["id"], Is.EqualTo(test.Id.ToString()));
+ Assert.That(topNode.Attributes["name"], Is.EqualTo(test.Name));
+ Assert.That(topNode.Attributes["fullname"], Is.EqualTo(test.FullName));
+
+ int expectedCount = test.Properties.Count;
+ if (expectedCount > 0)
+ {
+ string[] expectedProps = new string[expectedCount];
+ int count = 0;
+ foreach (PropertyEntry entry in test.Properties)
+ expectedProps[count++] = entry.ToString();
+
+ XmlNode propsNode = topNode.FindDescendant("properties");
+ Assert.NotNull(propsNode);
+
+ int actualCount = propsNode.ChildNodes.Count;
+ string[] actualProps = new string[actualCount];
+ for (int i = 0; i < actualCount; i++)
+ {
+ XmlNode node = propsNode.ChildNodes[i] as XmlNode;
+ string name = node.Attributes["name"];
+ string value = node.Attributes["value"];
+ actualProps[i] = name + "=" + value.ToString();
+ }
+
+ Assert.That(actualProps, Is.EquivalentTo(expectedProps));
+ }
+
+ if (recursive)
+ {
+ TestSuite suite = test as TestSuite;
+ if (suite != null)
+ {
+ foreach (Test child in suite.Tests)
+ {
+ string xpathQuery = string.Format("{0}[@id={1}]", child.XmlElementName, child.Id);
+ XmlNode childNode = topNode.FindDescendant(xpathQuery);
+ Assert.NotNull(childNode, "Expected node for test with ID={0}, Name={1}", child.Id, child.Name);
+
+ CheckXmlForTest(child, childNode, recursive);
+ }
+ }
+ }
+ }
+
+ #endregion
+
+ public class DummyFixture
+ {
+ public void DummyMethod() { }
+ public void ParameterizedMethod(int x) { }
+#if CLR_2_0 || CLR_4_0
+ public void GenericMethod<T>(T x) { }
+#endif
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public class DummyGenericFixture<T>
+ {
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TextMessageWriterTests.cs b/external/guiunit/src/tests/Internal/TextMessageWriterTests.cs
new file mode 100755
index 0000000..993eb74
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TextMessageWriterTests.cs
@@ -0,0 +1,164 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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.Threading;
+using System.Globalization;
+
+namespace NUnit.Framework.Internal
+{
+ [TestFixture]
+ public class TextMessageWriterTests : AssertionHelper
+ {
+ private static readonly string NL = NUnit.Env.NewLine;
+
+ private TextMessageWriter writer;
+
+ [SetUp]
+ public void SetUp()
+ {
+ writer = new TextMessageWriter();
+ }
+
+ [Test]
+ public void ConnectorIsWrittenWithSurroundingSpaces()
+ {
+ writer.WriteConnector("and");
+ Expect(writer.ToString(), EqualTo(" and "));
+ }
+
+ [Test]
+ public void PredicateIsWrittenWithTrailingSpace()
+ {
+ writer.WritePredicate("contains");
+ Expect(writer.ToString(), EqualTo("contains "));
+ }
+
+ [Test]
+ public void IntegerIsWrittenAsIs()
+ {
+ writer.WriteValue(42);
+ Expect(writer.ToString(), EqualTo("42"));
+ }
+
+ [Test]
+ public void StringIsWrittenWithQuotes()
+ {
+ writer.WriteValue("Hello");
+ Expect(writer.ToString(), EqualTo("\"Hello\""));
+ }
+
+ // This test currently fails because control character replacement is
+ // done at a higher level...
+ // TODO: See if we should do it at a lower level
+// [Test]
+// public void ControlCharactersInStringsAreEscaped()
+// {
+// WriteValue("Best Wishes,\r\n\tCharlie\r\n");
+// Assert.That(writer.ToString(), Is.EqualTo("\"Best Wishes,\\r\\n\\tCharlie\\r\\n\""));
+// }
+
+ [Test]
+ public void FloatIsWrittenWithTrailingF()
+ {
+ writer.WriteValue(0.5f);
+ Expect(writer.ToString(), EqualTo("0.5f"));
+ }
+
+ [Test]
+ public void FloatIsWrittenToNineDigits()
+ {
+ writer.WriteValue(0.33333333333333f);
+ int digits = writer.ToString().Length - 3; // 0.dddddddddf
+ Expect(digits, EqualTo(9));
+ Expect(writer.ToString().Length, EqualTo(12));
+ }
+
+ [Test]
+ public void DoubleIsWrittenWithTrailingD()
+ {
+ writer.WriteValue(0.5d);
+ Expect(writer.ToString(), EqualTo("0.5d"));
+ }
+
+ [Test]
+ public void DoubleIsWrittenToSeventeenDigits()
+ {
+ writer.WriteValue(0.33333333333333333333333333333333333333333333d);
+ Expect(writer.ToString().Length, EqualTo(20)); // add 3 for leading 0, decimal and trailing d
+ }
+
+ [Test]
+ public void DecimalIsWrittenWithTrailingM()
+ {
+ writer.WriteValue(0.5m);
+ Expect(writer.ToString(), EqualTo("0.5m"));
+ }
+
+ [Test]
+ public void DecimalIsWrittenToTwentyNineDigits()
+ {
+ writer.WriteValue(12345678901234567890123456789m);
+ Expect(writer.ToString(), EqualTo("12345678901234567890123456789m"));
+ }
+
+ [Test]
+ public void DateTimeTest()
+ {
+ writer.WriteValue(new DateTime(2007, 7, 4, 9, 15, 30, 123));
+ Expect(writer.ToString(), EqualTo("2007-07-04 09:15:30.123"));
+ }
+
+ [Test]
+ public void DisplayStringDifferences()
+ {
+ string s72 = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
+ string exp = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXY...";
+
+ writer.DisplayStringDifferences(s72, "abcde", 5, false, true);
+ string message = writer.ToString();
+ Expect(message, EqualTo(
+ TextMessageWriter.Pfx_Expected + Q(exp) + NL +
+ TextMessageWriter.Pfx_Actual + Q("abcde") + NL +
+ " ----------------^" + NL));
+ }
+
+ [Test]
+ public void DisplayStringDifferences_NoClipping()
+ {
+ string s72 = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
+
+ writer.DisplayStringDifferences(s72, "abcde", 5, false, false);
+ string message = writer.ToString();
+ Expect(message, EqualTo(
+ TextMessageWriter.Pfx_Expected + Q(s72) + NL +
+ TextMessageWriter.Pfx_Actual + Q("abcde") + NL +
+ " ----------------^" + NL));
+ }
+
+ private string Q(string s)
+ {
+ return "\"" + s + "\"";
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Internal/TypeParameterUsedWithTestMethod.cs b/external/guiunit/src/tests/Internal/TypeParameterUsedWithTestMethod.cs
new file mode 100755
index 0000000..baf7c3d
--- /dev/null
+++ b/external/guiunit/src/tests/Internal/TypeParameterUsedWithTestMethod.cs
@@ -0,0 +1,41 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+#if CLR_2_0 || CLR_4_0
+using System;
+
+namespace NUnit.Framework.Internal
+{
+ [Category("Generics")]
+ [TestFixture(typeof(double))]
+ public class TypeParameterUsedWithTestMethod<T>
+ {
+ [TestCase(5)]
+ [TestCase(1.23)]
+ public void TestMyArgType(T x)
+ {
+ Assert.That(x, Is.TypeOf(typeof(T)));
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Program.cs b/external/guiunit/src/tests/Program.cs
new file mode 100755
index 0000000..9a30755
--- /dev/null
+++ b/external/guiunit/src/tests/Program.cs
@@ -0,0 +1,81 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.IO;
+using NUnitLite.Runner;
+using NUnit.Framework.Internal;
+
+namespace NUnitLite.Tests
+{
+ public class Program
+ {
+ // The main program executes the tests. Output may be routed to
+ // various locations, depending on the arguments passed.
+ //
+ // Arguments:
+ //
+ // Arguments may be names of assemblies or options prefixed with '/'
+ // or '-'. Normally, no assemblies are passed and the calling
+ // assembly (the one containing this Main) is used. The following
+ // options are accepted:
+ //
+ // -test:<testname> Provides the name of a test to be exected.
+ // May be repeated. If this option is not used,
+ // all tests are run.
+ //
+ // -out:PATH Path to a file to which output is written.
+ // If omitted, Console is used, which means the
+ // output is lost on a platform with no Console.
+ //
+ // -full Print full report of all tests.
+ //
+ // -result:PATH Path to a file to which the XML test result is written.
+ //
+ // -explore[:Path] If specified, list tests rather than executing them. If a
+ // path is given, an XML file representing the tests is written
+ // to that location. If not, output is written to tests.xml.
+ //
+ // -noheader,noh Suppress display of the initial message.
+ //
+ // -wait Wait for a keypress before exiting.
+ //
+ // -include:categorylist
+ // If specified, nunitlite will only run the tests with a category
+ // that is in the comma separated list of category names.
+ // Example usage: -include:category1,category2 this command can be used
+ // in combination with the -exclude option also note that exlude takes priority
+ // over all includes.
+ //
+ // -exclude:categorylist
+ // If specified, nunitlite will not run any of the tests with a category
+ // that is in the comma separated list of category names.
+ // Example usage: -exclude:category1,category2 this command can be used
+ // in combination with the -include option also note that exclude takes priority
+ // over all includes
+ public static void Main(string[] args)
+ {
+ new TextUI().Execute(args);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/RecordingTestListener.cs b/external/guiunit/src/tests/RecordingTestListener.cs
new file mode 100755
index 0000000..63e2f27
--- /dev/null
+++ b/external/guiunit/src/tests/RecordingTestListener.cs
@@ -0,0 +1,29 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Api;
+
+namespace NUnitLite.Tests
+{
+ public class RecordingTestListener : ITestListener
+ {
+ public string Events = string.Empty;
+
+ public void TestStarted(ITest test)
+ {
+ Events += string.Format("<{0}:", test.Name);
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ Events += string.Format(":{0}>", result.ResultState);
+ }
+
+ public void TestOutput(TestOutput output) { }
+ }
+}
diff --git a/external/guiunit/src/tests/Runner/CommandLineOptionTests.cs b/external/guiunit/src/tests/Runner/CommandLineOptionTests.cs
new file mode 100755
index 0000000..3ffbf95
--- /dev/null
+++ b/external/guiunit/src/tests/Runner/CommandLineOptionTests.cs
@@ -0,0 +1,133 @@
+// *****************************************************
+// Copyright 2007, Charlie Poole
+//
+// Licensed under the Open Software License version 3.0
+// *****************************************************
+
+using System;
+using System.IO;
+using NUnit.Framework;
+using Env = NUnit.Env;
+
+namespace NUnitLite.Runner.Tests
+{
+ [TestFixture]
+ class CommandLineOptionTests
+ {
+ private CommandLineOptions options;
+
+ [SetUp]
+ public void CreateOptions()
+ {
+ options = new CommandLineOptions("-");
+ }
+
+ [Test]
+ public void TestWaitOption()
+ {
+ options.Parse( "-wait" );
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Wait, Is.True);
+ }
+
+ [Test]
+ public void TestNoheaderOption()
+ {
+ options.Parse("-noheader");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.NoHeader, Is.True);
+ }
+
+ [Test]
+ public void OptionNotRecognizedUnlessPrecededByOptionChar()
+ {
+ options.Parse( "/wait" );
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Wait, Is.False);
+ Assert.That(options.Parameters, Contains.Item("/wait"));
+ }
+
+ [Test]
+ public void InvalidOptionProducesError()
+ {
+ options.Parse( "-junk" );
+ Assert.That(options.Error);
+ Assert.That(options.ErrorMessage, Is.EqualTo("Invalid option: -junk" + Env.NewLine));
+ }
+
+ [Test]
+ public void MultipleInvalidOptionsAreListedInErrorMessage()
+ {
+ options.Parse( "-junk", "-trash", "something", "-garbage" );
+ Assert.That(options.Error);
+ Assert.That(options.ErrorMessage, Is.EqualTo(
+ "Invalid option: -junk" + Env.NewLine +
+ "Invalid option: -trash" + Env.NewLine +
+ "Invalid option: -garbage" + Env.NewLine));
+ }
+
+ [Test]
+ public void SingleParameterIsSaved()
+ {
+ options.Parse("myassembly.dll");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Parameters.Length, Is.EqualTo(1));
+ Assert.That(options.Parameters[0], Is.EqualTo("myassembly.dll"));
+ }
+
+ [Test]
+ public void MultipleParametersAreSaved()
+ {
+ options.Parse("assembly1.dll", "-wait", "assembly2.dll", "assembly3.dll");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Parameters.Length, Is.EqualTo(3));
+ Assert.That(options.Parameters[0], Is.EqualTo("assembly1.dll"));
+ Assert.That(options.Parameters[1], Is.EqualTo("assembly2.dll"));
+ Assert.That(options.Parameters[2], Is.EqualTo("assembly3.dll"));
+ }
+
+ [Test]
+ public void TestOptionIsRecognized()
+ {
+ options.Parse("-test:Some.Class.Name");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Tests.Length, Is.EqualTo(1));
+ Assert.That(options.Tests[0], Is.EqualTo("Some.Class.Name"));
+ }
+
+ [Test]
+ public void MultipleTestOptionsAreRecognized()
+ {
+ options.Parse("-test:Class1", "-test=Class2", "-test:Class3");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Tests.Length, Is.EqualTo(3));
+ Assert.That(options.Tests[0], Is.EqualTo("Class1"));
+ Assert.That(options.Tests[1], Is.EqualTo("Class2"));
+ Assert.That(options.Tests[2], Is.EqualTo("Class3"));
+ }
+#if !SILVERLIGHT
+ [Test]
+ public void TestIncludeOption()
+ {
+ options.Parse("-include:1,2");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Include == "1,2");
+ }
+ [Test]
+ public void TestExcludeOption()
+ {
+ options.Parse("-exclude:1,2");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Exclude == "1,2");
+ }
+ [Test]
+ public void TestIncludeExcludeOption()
+ {
+ options.Parse("-include:3,4", "-exclude:1,2");
+ Assert.That(options.Error, Is.False);
+ Assert.That(options.Exclude == "1,2");
+ Assert.That(options.Include == "3,4");
+ }
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Runner/NUnit2XmlOutputWriterTests.cs b/external/guiunit/src/tests/Runner/NUnit2XmlOutputWriterTests.cs
new file mode 100755
index 0000000..a47deec
--- /dev/null
+++ b/external/guiunit/src/tests/Runner/NUnit2XmlOutputWriterTests.cs
@@ -0,0 +1,217 @@
+#if !SILVERLIGHT
+using System;
+using System.IO;
+using System.Text;
+using System.Xml;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using NUnit.Tests.Assemblies;
+
+namespace NUnitLite.Runner.Tests
+{
+ public class NUnit2XmlOutputWriterTests
+ {
+ private XmlDocument doc;
+ private XmlNode topNode;
+ private XmlNode envNode;
+ private XmlNode cultureNode;
+ private XmlNode suiteNode;
+
+ [TestFixtureSetUp]
+ public void RunMockAssemblyTests()
+ {
+ TestResult result = NUnit.TestUtilities.TestBuilder.RunTestFixture(typeof(MockTestFixture));
+ Assert.NotNull(result);
+
+ StringBuilder sb = new StringBuilder();
+ StringWriter writer = new StringWriter(sb);
+ new NUnit2XmlOutputWriter().WriteResultFile(result, writer);
+ writer.Close();
+
+#if DEBUG
+ StreamWriter sw = new StreamWriter("MockAssemblyResult.xml");
+ sw.WriteLine(sb.ToString());
+ sw.Close();
+#endif
+
+ doc = new XmlDocument();
+ doc.LoadXml(sb.ToString());
+
+ topNode = doc.SelectSingleNode("/test-results");
+ if (topNode != null)
+ {
+ envNode = topNode.SelectSingleNode("environment");
+ cultureNode = topNode.SelectSingleNode("culture-info");
+ suiteNode = topNode.SelectSingleNode("test-suite");
+ }
+ }
+
+ [Test]
+ public void Document_HasThreeChildren()
+ {
+ Assert.That(doc.ChildNodes.Count, Is.EqualTo(3));
+ }
+
+ [Test]
+ public void Document_FirstChildIsXmlDeclaration()
+ {
+ Assume.That(doc.FirstChild != null);
+ Assert.That(doc.FirstChild.NodeType, Is.EqualTo(XmlNodeType.XmlDeclaration));
+ Assert.That(doc.FirstChild.Name, Is.EqualTo("xml"));
+ }
+
+ [Test]
+ public void Document_SecondChildIsComment()
+ {
+ Assume.That(doc.ChildNodes.Count >= 2);
+ Assert.That(doc.ChildNodes[1].Name, Is.EqualTo("#comment"));
+ }
+
+ [Test]
+ public void Document_ThirdChildIsTestResults()
+ {
+ Assume.That(doc.ChildNodes.Count >= 3);
+ Assert.That(doc.ChildNodes[2].Name, Is.EqualTo("test-results"));
+ }
+
+ [Test]
+ public void Document_HasTestResults()
+ {
+ Assert.That(topNode, Is.Not.Null);
+ Assert.That(topNode.Name, Is.EqualTo("test-results"));
+ }
+
+ [Test]
+ public void TestResults_AssemblyPathIsCorrect()
+ {
+ Assert.That(RequiredAttribute(topNode, "name"), Is.EqualTo("NUnit.Tests.Assemblies.MockTestFixture"));
+ }
+
+ [TestCase("total", MockTestFixture.Tests-MockTestFixture.Explicit)]
+ [TestCase("errors", MockTestFixture.Errors)]
+ [TestCase("failures", MockTestFixture.Failures)]
+ [TestCase("inconclusive", MockTestFixture.Inconclusive)]
+ [TestCase("not-run", MockTestFixture.NotRun-MockTestFixture.Explicit)]
+ [TestCase("ignored", MockTestFixture.Ignored)]
+ [TestCase("skipped", MockTestFixture.NotRun-MockTestFixture.Ignored-MockTestFixture.NotRunnable-MockTestFixture.Explicit)]
+ [TestCase("invalid", MockTestFixture.NotRunnable)]
+ public void TestResults_CounterIsCorrect(string name, int count)
+ {
+ Assert.That(RequiredAttribute(topNode, name), Is.EqualTo(count.ToString()));
+ }
+
+ [Test]
+ public void TestResults_HasValidDateAttribute()
+ {
+ string dateString = RequiredAttribute(topNode, "date");
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ DateTime date;
+ Assert.That(DateTime.TryParse(dateString, out date), "Invalid date attribute: {0}", dateString);
+#endif
+ }
+
+ [Test]
+ public void TestResults_HasValidTimeAttribute()
+ {
+ string timeString = RequiredAttribute(topNode, "time");
+#if (CLR_2_0 || CLR_4_0) && !NETCF
+ DateTime time;
+ Assert.That(DateTime.TryParse(timeString, out time), "Invalid time attribute: {0}", timeString);
+#endif
+ }
+
+ [Test]
+ public void Environment_HasEnvironmentElement()
+ {
+ Assert.That(envNode, Is.Not.Null, "Missing environment element");
+ }
+
+ [TestCase("nunit-version")]
+ [TestCase("clr-version")]
+ [TestCase("os-version")]
+ [TestCase("platform")]
+#if !NETCF
+ [TestCase("cwd")]
+ [TestCase("machine-name")]
+ [TestCase("user")]
+ [TestCase("user-domain")]
+#endif
+ public void Environment_HasRequiredAttribute(string name)
+ {
+ RequiredAttribute(envNode, name);
+ }
+
+ [Test]
+ public void CultureInfo_HasCultureInfoElement()
+ {
+ Assert.That(cultureNode, Is.Not.Null, "Missing culture-info element");
+ }
+
+ [TestCase("current-culture")]
+ [TestCase("current-uiculture")]
+ public void CultureInfo_HasRequiredAttribute(string name)
+ {
+ string cultureName = RequiredAttribute(cultureNode, name);
+ System.Globalization.CultureInfo culture = null;
+
+ try
+ {
+ culture = System.Globalization.CultureInfo.CreateSpecificCulture(cultureName);
+ }
+ catch(ArgumentException)
+ {
+ // Do nothing - culture will be null
+ }
+
+ Assert.That(culture, Is.Not.Null, "Invalid value for {0}: {1}", name, cultureName);
+ }
+
+ [Test]
+ public void TestSuite_HasTestSuiteElement()
+ {
+ Assert.That(suiteNode, Is.Not.Null, "Missing test-suite element");
+ }
+
+ [TestCase("type", "TestFixture")]
+ [TestCase("name", "MockTestFixture")]
+ [TestCase("description", "Fake Test Fixture")]
+ [TestCase("executed", "True")]
+ [TestCase("result", "Failure")]
+ [TestCase("success", "False")]
+ [TestCase("asserts", "0")]
+ public void TestSuite_ExpectedAttribute(string name, string value)
+ {
+ Assert.That(RequiredAttribute(suiteNode, name), Is.EqualTo(value));
+ }
+
+ [Test]
+ public void TestSuite_HasValidTimeAttribute()
+ {
+#if NETCF
+ RequiredAttribute(suiteNode, "time");
+#else
+ double time;
+ // NOTE: We use the TryParse overload with 4 args because it's supported in .NET 1.1
+ Assert.That(double.TryParse(RequiredAttribute(suiteNode, "time"),System.Globalization.NumberStyles.Float,null, out time), "Invalid value for time");
+#endif
+ }
+
+ [Test]
+ public void TestSuite_ResultIsFailure()
+ {
+ }
+
+ #region Helper Methods
+
+ private string RequiredAttribute(XmlNode node, string name)
+ {
+ XmlAttribute attr = node.Attributes[name];
+ Assert.That(attr, Is.Not.Null, "Missing attribute {0} on element {1}", name, node.Name);
+
+ return attr.Value;
+ }
+
+ #endregion
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/Syntax/AfterTests.cs b/external/guiunit/src/tests/Syntax/AfterTests.cs
new file mode 100755
index 0000000..405bfb1
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/AfterTests.cs
@@ -0,0 +1,184 @@
+// ****************************************************************
+// Copyright 2008, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+using System.Threading;
+using System.Collections;
+
+namespace NUnit.Framework.Syntax
+{
+ public class AfterTest_SimpleConstraint : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<after 1000 <equal 10>>";
+ staticSyntax = Is.EqualTo(10).After(1000);
+ inheritedSyntax = Helper().EqualTo(10).After(1000);
+ builderSyntax = Builder().EqualTo(10).After(1000);
+ }
+ }
+
+ public class AfterTest_ProperyTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<after 1000 <property X <equal 10>>>";
+ staticSyntax = Has.Property("X").EqualTo(10).After(1000);
+ inheritedSyntax = Helper().Property("X").EqualTo(10).After(1000);
+ builderSyntax = Builder().Property("X").EqualTo(10).After(1000);
+ }
+ }
+
+ public class AfterTest_AndOperator : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<after 1000 <and <greaterthan 0> <lessthan 10>>>";
+ staticSyntax = Is.GreaterThan(0).And.LessThan(10).After(1000);
+ inheritedSyntax = Helper().GreaterThan(0).And.LessThan(10).After(1000);
+ builderSyntax = Builder().GreaterThan(0).And.LessThan(10).After(1000);
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ public abstract class AfterSyntaxTests
+ {
+ protected bool flag;
+ protected int num;
+ protected object ob1, ob2, ob3;
+ protected ArrayList list;
+ protected string greeting;
+
+ [SetUp]
+ public void InitializeValues()
+ {
+ this.flag = false;
+ this.num = 0;
+ this.ob1 = new object();
+ this.ob2 = new object();
+ this.ob3 = new object();
+ this.list = new ArrayList();
+ this.list.Add(1);
+ this.list.Add(2);
+ this.list.Add(3);
+ this.greeting = "hello";
+
+ new Thread(ModifyValuesAfterDelay).Start();
+ }
+
+ private void ModifyValuesAfterDelay()
+ {
+ Thread.Sleep(100);
+
+ this.flag = true;
+ this.num = 1;
+ this.ob1 = ob2;
+ this.ob3 = null;
+ this.list.Add(4);
+ this.greeting += "world";
+ }
+ }
+
+ public class AfterSyntaxUsingAnonymousDelegates : AfterSyntaxTests
+ {
+ [Test]
+ public void TrueTest()
+ {
+ Assert.That(delegate { return flag; }, Is.True.After(5000, 200));
+ }
+
+ [Test]
+ public void EqualToTest()
+ {
+ Assert.That(delegate { return num; }, Is.EqualTo(1).After(5000, 200));
+ }
+
+ [Test]
+ public void SameAsTest()
+ {
+ Assert.That(delegate { return ob1; }, Is.SameAs(ob2).After(5000, 200));
+ }
+
+ [Test]
+ public void GreaterTest()
+ {
+ Assert.That(delegate { return num; }, Is.GreaterThan(0).After(5000,200));
+ }
+
+ [Test]
+ public void HasMemberTest()
+ {
+ Assert.That(delegate { return list; }, Has.Member(4).After(5000, 200));
+ }
+
+ [Test]
+ public void NullTest()
+ {
+ Assert.That(delegate { return ob3; }, Is.Null.After(5000, 200));
+ }
+
+ [Test]
+ public void TextTest()
+ {
+ Assert.That(delegate { return greeting; }, Is.StringEnding("world").After(5000, 200));
+ }
+
+ [Test]
+ public void ThrowsTest()
+ {
+ Assert.That(delegate { throw new Exception(); }, Throws.TypeOf<Exception>().After(100));
+ }
+ }
+
+ public class AfterSyntaxUsingActualPassedByRef : AfterSyntaxTests
+ {
+ [Test]
+ public void TrueTest()
+ {
+ Assert.That(ref flag, Is.True.After(5000, 200));
+ }
+
+ [Test]
+ public void EqualToTest()
+ {
+ Assert.That(ref num, Is.EqualTo(1).After(5000, 200));
+ }
+
+ [Test]
+ public void SameAsTest()
+ {
+ Assert.That(ref ob1, Is.SameAs(ob2).After(5000, 200));
+ }
+
+ [Test]
+ public void GreaterTest()
+ {
+ Assert.That(ref num, Is.GreaterThan(0).After(5000, 200));
+ }
+
+ [Test]
+ public void HasMemberTest()
+ {
+ Assert.That(ref list, Has.Member(4).After(5000, 200));
+ }
+
+ [Test]
+ public void NullTest()
+ {
+ Assert.That(ref ob3, Is.Null.After(5000, 200));
+ }
+
+ [Test]
+ public void TextTest()
+ {
+ Assert.That(ref greeting, Is.StringEnding("world").After(5000, 200));
+ }
+ }
+#endif
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Syntax/ArbitraryConstraintMatching.cs b/external/guiunit/src/tests/Syntax/ArbitraryConstraintMatching.cs
new file mode 100755
index 0000000..8e5a2f1
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/ArbitraryConstraintMatching.cs
@@ -0,0 +1,81 @@
+// ****************************************************************
+// Copyright 2012, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org
+// ****************************************************************
+
+using System;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Syntax
+{
+ [TestFixture]
+ public class ArbitraryConstraintMatching
+ {
+ Constraint custom = new CustomConstraint();
+ Constraint another = new AnotherConstraint();
+
+ [Test]
+ public void CanMatchCustomConstraint()
+ {
+ IResolveConstraint constraint = new ConstraintExpression().Matches(custom);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<custom>"));
+ }
+
+ [Test]
+ public void CanMatchCustomConstraintAfterPrefix()
+ {
+ IResolveConstraint constraint = Is.All.Matches(custom);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<all <custom>>"));
+ }
+
+ [Test]
+ public void CanMatchCustomConstraintsUnderAndOperator()
+ {
+ IResolveConstraint constraint = Is.All.Matches(custom).And.Matches(another);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<all <and <custom> <another>>>"));
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [Test]
+ public void CanMatchPredicate()
+ {
+ IResolveConstraint constraint = new ConstraintExpression().Matches(new Predicate<int>(IsEven));
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
+ Assert.That(42, constraint);
+ }
+
+ bool IsEven(int num)
+ {
+ return (num & 1) == 0;
+ }
+
+#if !NETCF
+ [Test]
+ public void CanMatchLambda()
+ {
+ IResolveConstraint constraint = new ConstraintExpression().Matches<int>( (x) => (x & 1) == 0);
+ Assert.That(constraint.Resolve().ToString(), Is.EqualTo("<predicate>"));
+ Assert.That(42, constraint);
+ }
+#endif
+#endif
+
+ class CustomConstraint : Constraint
+ {
+ public override bool Matches(object actual)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override void WriteDescriptionTo(MessageWriter writer)
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ class AnotherConstraint : CustomConstraint
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/CollectionTests.cs b/external/guiunit/src/tests/Syntax/CollectionTests.cs
new file mode 100755
index 0000000..a59f6ca
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/CollectionTests.cs
@@ -0,0 +1,275 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+using NUnit.TestUtilities;
+
+namespace NUnit.Framework.Syntax
+{
+ public class UniqueTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<uniqueitems>";
+ staticSyntax = Is.Unique;
+ inheritedSyntax = Helper().Unique;
+ builderSyntax = Builder().Unique;
+ }
+ }
+
+ public class CollectionOrderedTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<ordered>";
+ staticSyntax = Is.Ordered;
+ inheritedSyntax = Helper().Ordered;
+ builderSyntax = Builder().Ordered;
+ }
+ }
+
+ public class CollectionOrderedTest_Descending : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<ordered descending>";
+ staticSyntax = Is.Ordered.Descending;
+ inheritedSyntax = Helper().Ordered.Descending;
+ builderSyntax = Builder().Ordered.Descending;
+ }
+ }
+
+ public class CollectionOrderedTest_Comparer : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ IComparer comparer = new SimpleObjectComparer();
+ parseTree = "<ordered NUnit.TestUtilities.SimpleObjectComparer>";
+ staticSyntax = Is.Ordered.Using(comparer);
+ inheritedSyntax = Helper().Ordered.Using(comparer);
+ builderSyntax = Builder().Ordered.Using(comparer);
+ }
+ }
+
+ public class CollectionOrderedTest_Comparer_Descending : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ IComparer comparer = new SimpleObjectComparer();
+ parseTree = "<ordered descending NUnit.TestUtilities.SimpleObjectComparer>";
+ staticSyntax = Is.Ordered.Using(comparer).Descending;
+ inheritedSyntax = Helper().Ordered.Using(comparer).Descending;
+ builderSyntax = Builder().Ordered.Using(comparer).Descending;
+ }
+ }
+
+ public class CollectionOrderedByTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<orderedby SomePropertyName>";
+ staticSyntax = Is.Ordered.By("SomePropertyName");
+ inheritedSyntax = Helper().Ordered.By("SomePropertyName");
+ builderSyntax = Builder().Ordered.By("SomePropertyName");
+ }
+ }
+
+ public class CollectionOrderedByTest_Descending : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<orderedby SomePropertyName descending>";
+ staticSyntax = Is.Ordered.By("SomePropertyName").Descending;
+ inheritedSyntax = Helper().Ordered.By("SomePropertyName").Descending;
+ builderSyntax = Builder().Ordered.By("SomePropertyName").Descending;
+ }
+ }
+
+ public class CollectionOrderedByTest_Comparer : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<orderedby SomePropertyName NUnit.TestUtilities.SimpleObjectComparer>";
+ staticSyntax = Is.Ordered.By("SomePropertyName").Using(new SimpleObjectComparer());
+ inheritedSyntax = Helper().Ordered.By("SomePropertyName").Using(new SimpleObjectComparer());
+ builderSyntax = Builder().Ordered.By("SomePropertyName").Using(new SimpleObjectComparer());
+ }
+ }
+
+ public class CollectionOrderedByTest_Comparer_Descending : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<orderedby SomePropertyName descending NUnit.TestUtilities.SimpleObjectComparer>";
+ staticSyntax = Is.Ordered.By("SomePropertyName").Using(new SimpleObjectComparer()).Descending;
+ inheritedSyntax = Helper().Ordered.By("SomePropertyName").Using(new SimpleObjectComparer()).Descending;
+ builderSyntax = Builder().Ordered.By("SomePropertyName").Using(new SimpleObjectComparer()).Descending;
+ }
+ }
+
+ public class CollectionContainsTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains 42>";
+ staticSyntax = Contains.Item(42);
+ inheritedSyntax = Helper().Contains(42);
+ builderSyntax = Builder().Contains(42);
+ }
+ }
+
+ public class CollectionContainsTest_String : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains \"abc\">";
+ staticSyntax = Contains.Item("abc");
+ inheritedSyntax = Helper().Contains("abc");
+ builderSyntax = Builder().Contains("abc");
+ }
+ }
+
+#if !SILVERLIGHT
+ public class CollectionContainsTest_Comparer : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains 42>";
+ staticSyntax = Contains.Item(42).Using(Comparer.Default);
+ inheritedSyntax = Helper().Contains(42).Using(Comparer.Default);
+ builderSyntax = Builder().Contains(42).Using(Comparer.Default);
+ }
+
+ [Test]
+ public void ComparerIsCalled()
+ {
+ TestComparer comparer = new TestComparer();
+ Assert.That(new int[] { 1, 2, 3 },
+ Contains.Item(2).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ [Test]
+ public void ComparerIsCalledInExpression()
+ {
+ TestComparer comparer = new TestComparer();
+ Assert.That(new int[] { 1, 2, 3 },
+ Has.Length.EqualTo(3).And.Contains(2).Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+ }
+
+ public class CollectionContainsTest_Comparer_String : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains \"abc\">";
+ staticSyntax = Contains.Item("abc").Using(Comparer.Default);
+ inheritedSyntax = Helper().Contains("abc").Using(Comparer.Default);
+ builderSyntax = Builder().Contains("abc").Using(Comparer.Default);
+ }
+
+ [Test]
+ public void ComparerIsCalled()
+ {
+ TestComparer comparer = new TestComparer();
+ Assert.That(new string[] { "Hello", "World" },
+ Contains.Item("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+
+ [Test]
+ public void ComparerIsCalledInExpression()
+ {
+ TestComparer comparer = new TestComparer();
+ Assert.That(new string[] { "Hello", "World" },
+ Has.Length.EqualTo(2).And.Contains("World").Using(comparer));
+ Assert.That(comparer.Called, "Comparer was not called");
+ }
+ }
+
+ public class CollectionMemberTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains 42>";
+ staticSyntax = Has.Member(42);
+ inheritedSyntax = Helper().Contains(42);
+ builderSyntax = Builder().Contains(42);
+ }
+ }
+
+ public class CollectionMemberTest_Comparer : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<contains 42>";
+ staticSyntax = Has.Member(42).Using(Comparer.Default);
+ inheritedSyntax = Helper().Contains(42).Using(Comparer.Default);
+ builderSyntax = Builder().Contains(42).Using(Comparer.Default);
+ }
+ }
+#endif
+
+ public class CollectionSubsetTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ int[] ints = new int[] { 1, 2, 3 };
+ parseTree = "<subsetof System.Int32[]>";
+ staticSyntax = Is.SubsetOf(ints);
+ inheritedSyntax = Helper().SubsetOf(ints);
+ builderSyntax = Builder().SubsetOf(ints);
+ }
+ }
+
+ public class CollectionEquivalentTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ int[] ints = new int[] { 1, 2, 3 };
+ parseTree = "<equivalent System.Int32[]>";
+ staticSyntax = Is.EquivalentTo(ints);
+ inheritedSyntax = Helper().EquivalentTo(ints);
+ builderSyntax = Builder().EquivalentTo(ints);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/ComparisonTests.cs b/external/guiunit/src/tests/Syntax/ComparisonTests.cs
new file mode 100755
index 0000000..36ab321
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/ComparisonTests.cs
@@ -0,0 +1,99 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ public class GreaterThanTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<greaterthan 7>";
+ staticSyntax = Is.GreaterThan(7);
+ inheritedSyntax = Helper().GreaterThan(7);
+ builderSyntax = Builder().GreaterThan(7);
+ }
+ }
+
+ public class GreaterThanOrEqualTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<greaterthanorequal 7>";
+ staticSyntax = Is.GreaterThanOrEqualTo(7);
+ inheritedSyntax = Helper().GreaterThanOrEqualTo(7);
+ builderSyntax = Builder().GreaterThanOrEqualTo(7);
+ }
+ }
+
+ public class AtLeastTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<greaterthanorequal 7>";
+ staticSyntax = Is.AtLeast(7);
+ inheritedSyntax = Helper().AtLeast(7);
+ builderSyntax = Builder().AtLeast(7);
+ }
+ }
+
+ public class LessThanTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<lessthan 7>";
+ staticSyntax = Is.LessThan(7);
+ inheritedSyntax = Helper().LessThan(7);
+ builderSyntax = Builder().LessThan(7);
+ }
+ }
+
+ public class LessThanOrEqualTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<lessthanorequal 7>";
+ staticSyntax = Is.LessThanOrEqualTo(7);
+ inheritedSyntax = Helper().LessThanOrEqualTo(7);
+ builderSyntax = Builder().LessThanOrEqualTo(7);
+ }
+ }
+
+ public class AtMostTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<lessthanorequal 7>";
+ staticSyntax = Is.AtMost(7);
+ inheritedSyntax = Helper().AtMost(7);
+ builderSyntax = Builder().AtMost(7);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/EqualityTests.cs b/external/guiunit/src/tests/Syntax/EqualityTests.cs
new file mode 100755
index 0000000..cf04317
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/EqualityTests.cs
@@ -0,0 +1,158 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Syntax
+{
+ public class EqualToTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<equal 999>";
+ staticSyntax = Is.EqualTo(999);
+ inheritedSyntax = Helper().EqualTo(999);
+ builderSyntax = Builder().EqualTo(999);
+ }
+ }
+
+ public class EqualToTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<equal ""X"">";
+ staticSyntax = Is.EqualTo("X").IgnoreCase;
+ inheritedSyntax = Helper().EqualTo("X").IgnoreCase;
+ builderSyntax = Builder().EqualTo("X").IgnoreCase;
+ }
+ }
+
+ public class EqualToTest_WithinTolerance : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<equal 0.7>";
+ staticSyntax = Is.EqualTo(0.7).Within(.005);
+ inheritedSyntax = Helper().EqualTo(0.7).Within(.005);
+ builderSyntax = Builder().EqualTo(0.7).Within(.005);
+ }
+ }
+
+
+ public class EqualityTests
+ {
+ [Test]
+ public void SimpleEqualityTests()
+ {
+ int[] i3 = new int[] { 1, 2, 3 };
+ double[] d3 = new double[] { 1.0, 2.0, 3.0 };
+ int[] iunequal = new int[] { 1, 3, 2 };
+
+ Assert.That(2 + 2, Is.EqualTo(4));
+ Assert.That(2 + 2 == 4);
+ Assert.That(i3, Is.EqualTo(d3));
+ Assert.That(2 + 2, Is.Not.EqualTo(5));
+ Assert.That(i3, Is.Not.EqualTo(iunequal));
+#if CLR_2_0 || CLR_4_0
+ List<string> list = new List<string>();
+ list.Add("foo");
+ list.Add("bar");
+ Assert.That(list, Is.EqualTo(new string[] { "foo", "bar" }));
+#endif
+ }
+
+ [Test]
+ public void EqualityTestsWithTolerance()
+ {
+ Assert.That(4.99d, Is.EqualTo(5.0d).Within(0.05d));
+ Assert.That(4.0d, Is.Not.EqualTo(5.0d).Within(0.5d));
+ Assert.That(4.99f, Is.EqualTo(5.0f).Within(0.05f));
+ Assert.That(4.99m, Is.EqualTo(5.0m).Within(0.05m));
+ Assert.That(3999999999u, Is.EqualTo(4000000000u).Within(5u));
+ Assert.That(499, Is.EqualTo(500).Within(5));
+ Assert.That(4999999999L, Is.EqualTo(5000000000L).Within(5L));
+ Assert.That(5999999999ul, Is.EqualTo(6000000000ul).Within(5ul));
+ }
+
+ [Test]
+ public void EqualityTestsWithTolerance_MixedFloatAndDouble()
+ {
+ // Bug Fix 1743844
+ Assert.That(2.20492d, Is.EqualTo(2.2d).Within(0.01f),
+ "Double actual, Double expected, Single tolerance");
+ Assert.That(2.20492d, Is.EqualTo(2.2f).Within(0.01d),
+ "Double actual, Single expected, Double tolerance");
+ Assert.That(2.20492d, Is.EqualTo(2.2f).Within(0.01f),
+ "Double actual, Single expected, Single tolerance");
+ Assert.That(2.20492f, Is.EqualTo(2.2f).Within(0.01d),
+ "Single actual, Single expected, Double tolerance");
+ Assert.That(2.20492f, Is.EqualTo(2.2d).Within(0.01d),
+ "Single actual, Double expected, Double tolerance");
+ Assert.That(2.20492f, Is.EqualTo(2.2d).Within(0.01f),
+ "Single actual, Double expected, Single tolerance");
+ }
+
+ [Test]
+ public void EqualityTestsWithTolerance_MixingTypesGenerally()
+ {
+ // Extending tolerance to all numeric types
+ Assert.That(202d, Is.EqualTo(200d).Within(2),
+ "Double actual, Double expected, int tolerance");
+ Assert.That(4.87m, Is.EqualTo(5).Within(.25),
+ "Decimal actual, int expected, Double tolerance");
+ Assert.That(4.87m, Is.EqualTo(5ul).Within(1),
+ "Decimal actual, ulong expected, int tolerance");
+ Assert.That(487, Is.EqualTo(500).Within(25),
+ "int actual, int expected, int tolerance");
+ Assert.That(487u, Is.EqualTo(500).Within(25),
+ "uint actual, int expected, int tolerance");
+ Assert.That(487L, Is.EqualTo(500).Within(25),
+ "long actual, int expected, int tolerance");
+ Assert.That(487ul, Is.EqualTo(500).Within(25),
+ "ulong actual, int expected, int tolerance");
+ }
+
+ [Test]
+ public void EqualityTestsUsingDefaultFloatingPointTolerance()
+ {
+ GlobalSettings.DefaultFloatingPointTolerance = 0.05d;
+
+ try
+ {
+ Assert.That(4.99d, Is.EqualTo(5.0d));
+ Assert.That(4.0d, Is.Not.EqualTo(5.0d));
+ Assert.That(4.99f, Is.EqualTo(5.0f));
+ }
+ finally
+ {
+ GlobalSettings.DefaultFloatingPointTolerance = 0.0d;
+ }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/InvalidCodeTests.cs b/external/guiunit/src/tests/Syntax/InvalidCodeTests.cs
new file mode 100755
index 0000000..f79ce6b
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/InvalidCodeTests.cs
@@ -0,0 +1,78 @@
+// ****************************************************************
+// Copyright 2007, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org.
+// ****************************************************************
+
+using System;
+using System.Collections;
+using System.CodeDom.Compiler;
+using NUnit.Framework.Constraints;
+#if CLR_2_0 || CLR_4_0
+using System.Collections.Generic;
+#endif
+
+namespace NUnit.Framework.Syntax
+{
+ [TestFixture]
+ public class InvalidCodeTests : AssertionHelper
+ {
+ static readonly string template1 =
+@"using System;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+class SomeClass
+{
+ void SomeMethod()
+ {
+ object c = $FRAGMENT$;
+ }
+}";
+
+ [TestCase("Is.Null.Not")]
+ [TestCase("Is.Not.Null.GreaterThan(10))")]
+ [TestCase("Is.Null.All")]
+ [TestCase("Is.And")]
+ [TestCase("Is.All.And.And")]
+ [TestCase("Is.Null.And.Throws")]
+ public void CodeShouldNotCompile(string fragment)
+ {
+ string code = template1.Replace("$FRAGMENT$", fragment);
+ TestCompiler compiler = new TestCompiler(
+ new string[] { "system.dll", "nunit.framework.dll" },
+ "test.dll");
+ CompilerResults results = compiler.CompileCode(code);
+ if (results.NativeCompilerReturnValue == 0)
+ Assert.Fail("Code fragment \"" + fragment + "\" should not compile but it did");
+ }
+
+ static readonly string template2 =
+@"using System;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+class SomeClass
+{
+ void SomeMethod()
+ {
+ Assert.That(42, $FRAGMENT$);
+ }
+}";
+
+ [TestCase("Is.Not")]
+ [TestCase("Is.All")]
+ [TestCase("Is.Not.All")]
+ [TestCase("Is.All.Not")]
+ public void CodeShouldNotCompileAsFinishedConstraint(string fragment)
+ {
+ string code = template2.Replace("$FRAGMENT$", fragment);
+ TestCompiler compiler = new TestCompiler(
+ new string[] { "system.dll", "nunit.framework.dll" },
+ "test.dll");
+ CompilerResults results = compiler.CompileCode(code);
+ if (results.NativeCompilerReturnValue == 0)
+ Assert.Fail("Code fragment \"" + fragment + "\" should not compile as a finished constraint but it did");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Syntax/OperatorOverrides.cs b/external/guiunit/src/tests/Syntax/OperatorOverrides.cs
new file mode 100755
index 0000000..e7d275c
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/OperatorOverrides.cs
@@ -0,0 +1,128 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Syntax
+{
+ public class NotOperatorOverride : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<not <null>>";
+ staticSyntax = !Is.Null;
+ inheritedSyntax = !Helper().Null;
+ builderSyntax = !Builder().Null;
+ }
+
+ [Test]
+ public void NotOperatorCanApplyToResolvableConstraintExpression()
+ {
+ Assert.That(GetType(), !Has.Attribute(typeof(DescriptionAttribute)));
+ }
+ }
+
+ [TestFixture, Description("Test")]
+ public class AndOperatorOverride : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<and <greaterthan 5> <lessthan 10>>";
+ staticSyntax = Is.GreaterThan(5) & Is.LessThan(10);
+ inheritedSyntax = Helper().GreaterThan(5) & Is.LessThan(10);
+ builderSyntax = Builder().GreaterThan(5) & Builder().LessThan(10);
+ }
+
+ [Test]
+ public void AndOperatorCanCombineTwoResolvableConstraintExpressions()
+ {
+ Assert.That(GetType(), Has.Attribute(typeof(TestFixtureAttribute)) & Has.Attribute(typeof(DescriptionAttribute)));
+ }
+
+ [Test]
+ public void AndOperatorCanCombineConstraintAndResolvableConstraintExpression()
+ {
+ Assert.That(GetType(), Is.EqualTo(typeof(AndOperatorOverride)) & Has.Attribute(typeof(DescriptionAttribute)));
+ }
+
+ [Test]
+ public void AndOperatorCanCombineResolvableConstraintExpressionAndConstraint()
+ {
+ Assert.That(GetType(), Has.Attribute(typeof(DescriptionAttribute)) & Is.EqualTo(typeof(AndOperatorOverride)));
+ }
+ }
+
+ [TestFixture]
+ public class OrOperatorOverride : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<or <lessthan 5> <greaterthan 10>>";
+ staticSyntax = Is.LessThan(5) | Is.GreaterThan(10);
+ inheritedSyntax = Helper().LessThan(5) | Is.GreaterThan(10);
+ builderSyntax = Builder().LessThan(5) | Is.GreaterThan(10);
+ }
+
+ [Test]
+ public void OrOperatorCanCombineTwoResolvableConstraintExpressions()
+ {
+ Assert.That(GetType(), Has.Attribute(typeof(TestFixtureAttribute)) | Has.Attribute(typeof(TestCaseAttribute)));
+ }
+
+ [Test]
+ public void OrOperatorCanCombineResolvableConstraintExpressionAndConstraint()
+ {
+ Assert.That(GetType(), Has.Attribute(typeof(TestFixtureAttribute)) | Is.EqualTo(7));
+ }
+
+ [Test]
+ public void OrOperatorCanCombineConstraintAndResolvableConstraintExpression()
+ {
+ Assert.That(GetType(), Is.EqualTo(7) | Has.Attribute(typeof(TestFixtureAttribute)));
+ }
+ }
+
+ public class MixedOperatorOverrides
+ {
+ [Test]
+ public void ComplexTests()
+ {
+ string expected = "<and <and <not <null>> <not <lessthan 5>>> <not <greaterthan 10>>>";
+
+ Constraint c =
+ Is.Not.Null & Is.Not.LessThan(5) & Is.Not.GreaterThan(10);
+ Assert.That(c.ToString(), Is.EqualTo(expected).NoClip);
+
+ c = !Is.Null & !Is.LessThan(5) & !Is.GreaterThan(10);
+ Assert.That(c.ToString(), Is.EqualTo(expected).NoClip);
+
+ Constraint x = null;
+ c = !x & !Is.LessThan(5) & !Is.GreaterThan(10);
+ Assert.That(c.ToString(), Is.EqualTo(expected).NoClip);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/OperatorTests.cs b/external/guiunit/src/tests/Syntax/OperatorTests.cs
new file mode 100755
index 0000000..f1bb1c1
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/OperatorTests.cs
@@ -0,0 +1,271 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ #region Not
+ public class NotTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<not <null>>";
+ staticSyntax = Is.Not.Null;
+ inheritedSyntax = Helper().Not.Null;
+ builderSyntax = Builder().Not.Null;
+ }
+ }
+
+ public class NotTest_Cascaded : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<not <not <not <null>>>>";
+ staticSyntax = Is.Not.Not.Not.Null;
+ inheritedSyntax = Helper().Not.Not.Not.Null;
+ builderSyntax = Builder().Not.Not.Not.Null;
+ }
+ }
+ #endregion
+
+ #region All
+ public class AllTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<all <greaterthan 0>>";
+ staticSyntax = Is.All.GreaterThan(0);
+ inheritedSyntax = Helper().All.GreaterThan(0);
+ builderSyntax = Builder().All.GreaterThan(0);
+ }
+ }
+ #endregion
+
+ #region Some
+ public class SomeTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<some <equal 3>>";
+ staticSyntax = Has.Some.EqualTo(3);
+ inheritedSyntax = Helper().Some.EqualTo(3);
+ builderSyntax = Builder().Some.EqualTo(3);
+ }
+ }
+
+ public class SomeTest_BeforeBinaryOperators : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<some <or <and <greaterthan 0> <lessthan 100>> <equal 999>>>";
+ staticSyntax = Has.Some.GreaterThan(0).And.LessThan(100).Or.EqualTo(999);
+ inheritedSyntax = Helper().Some.GreaterThan(0).And.LessThan(100).Or.EqualTo(999);
+ builderSyntax = Builder().Some.GreaterThan(0).And.LessThan(100).Or.EqualTo(999);
+ }
+ }
+
+ public class SomeTest_NestedSome : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<some <some <lessthan 100>>>";
+ staticSyntax = Has.Some.With.Some.LessThan(100);
+ inheritedSyntax = Helper().Some.With.Some.LessThan(100);
+ builderSyntax = Builder().Some.With.Some.LessThan(100);
+ }
+
+ }
+
+ public class SomeTest_UseOfAndSome : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<and <some <greaterthan 0>> <some <lessthan 100>>>";
+ staticSyntax = Has.Some.GreaterThan(0).And.Some.LessThan(100);
+ inheritedSyntax = Helper().Some.GreaterThan(0).And.Some.LessThan(100);
+ builderSyntax = Builder().Some.GreaterThan(0).And.Some.LessThan(100);
+ }
+ }
+ #endregion
+
+ #region None
+ public class NoneTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<none <lessthan 0>>";
+ staticSyntax = Has.None.LessThan(0);
+ inheritedSyntax = Helper().None.LessThan(0);
+ builderSyntax = Builder().None.LessThan(0);
+ }
+ }
+ #endregion
+
+ #region And
+ public class AndTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<and <greaterthan 5> <lessthan 10>>";
+ staticSyntax = Is.GreaterThan(5).And.LessThan(10);
+ inheritedSyntax = Helper().GreaterThan(5).And.LessThan(10);
+ builderSyntax = Builder().GreaterThan(5).And.LessThan(10);
+ }
+ }
+
+ public class AndTest_ThreeAndsWithNot : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<and <not <null>> <and <not <lessthan 5>> <not <greaterthan 10>>>>";
+ staticSyntax = Is.Not.Null.And.Not.LessThan(5).And.Not.GreaterThan(10);
+ inheritedSyntax = Helper().Not.Null.And.Not.LessThan(5).And.Not.GreaterThan(10);
+ builderSyntax = Builder().Not.Null.And.Not.LessThan(5).And.Not.GreaterThan(10);
+ }
+ }
+ #endregion
+
+ #region Or
+ public class OrTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<or <lessthan 5> <greaterthan 10>>";
+ staticSyntax = Is.LessThan(5).Or.GreaterThan(10);
+ inheritedSyntax = Helper().LessThan(5).Or.GreaterThan(10);
+ builderSyntax = Builder().LessThan(5).Or.GreaterThan(10);
+ }
+ }
+
+ public class OrTest_ThreeOrs : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<or <lessthan 5> <or <greaterthan 10> <equal 7>>>";
+ staticSyntax = Is.LessThan(5).Or.GreaterThan(10).Or.EqualTo(7);
+ inheritedSyntax = Helper().LessThan(5).Or.GreaterThan(10).Or.EqualTo(7);
+ builderSyntax = Builder().LessThan(5).Or.GreaterThan(10).Or.EqualTo(7);
+ }
+ }
+ #endregion
+
+ #region Binary Operator Precedence
+ public class AndIsEvaluatedBeforeFollowingOr : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<or <and <lessthan 100> <greaterthan 0>> <equal 999>>";
+ staticSyntax = Is.LessThan(100).And.GreaterThan(0).Or.EqualTo(999);
+ inheritedSyntax = Helper().LessThan(100).And.GreaterThan(0).Or.EqualTo(999);
+ builderSyntax = Builder().LessThan(100).And.GreaterThan(0).Or.EqualTo(999);
+ }
+ }
+
+ public class AndIsEvaluatedBeforePrecedingOr : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<or <equal 999> <and <greaterthan 0> <lessthan 100>>>";
+ staticSyntax = Is.EqualTo(999).Or.GreaterThan(0).And.LessThan(100);
+ inheritedSyntax = Helper().EqualTo(999).Or.GreaterThan(0).And.LessThan(100);
+ builderSyntax = Builder().EqualTo(999).Or.GreaterThan(0).And.LessThan(100);
+ }
+ }
+ #endregion
+
+ public class OperatorPrecedenceTests
+ {
+ public class A
+ {
+ public B B
+ {
+ get { return new B(); }
+ }
+
+ public string X
+ {
+ get { return "X in A"; }
+ }
+
+ public string Y
+ {
+ get { return "Y in A"; }
+ }
+ }
+
+ public class B
+ {
+ public string X
+ {
+ get { return "X in B"; }
+ }
+
+ public string Y
+ {
+ get { return "Y in B"; }
+ }
+ }
+
+ [Test]
+ public void WithTests()
+ {
+ A a = new A();
+ Assert.That(a, Has.Property("X").EqualTo("X in A")
+ .And.Property("Y").EqualTo("Y in A"));
+ Assert.That(a, Has.Property("X").EqualTo("X in A")
+ .And.Property("B").Property("X").EqualTo("X in B"));
+ Assert.That(a, Has.Property("X").EqualTo("X in A")
+ .And.Property("B").With.Property("X").EqualTo("X in B"));
+ Assert.That(a, Has.Property("B").Property("X").EqualTo("X in B")
+ .And.Property("B").Property("Y").EqualTo("Y in B"));
+ Assert.That(a, Has.Property("B").Property("X").EqualTo("X in B")
+ .And.Property("B").With.Property("Y").EqualTo("Y in B"));
+ Assert.That(a, Has.Property("B").With.Property("X").EqualTo("X in B")
+ .And.Property("Y").EqualTo("Y in B"));
+ }
+
+ [Test]
+ public void SomeTests()
+ {
+ string[] array = new string[] { "a", "aa", "x", "xy", "xyz" };
+ //Assert.That(array, Has.Some.StartsWith("a").And.Some.Length.EqualTo(3));
+ Assert.That(array, Has.None.StartsWith("a").And.Length.EqualTo(3));
+ Assert.That(array, Has.Some.StartsWith("x").And.Length.EqualTo(3));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/PathConstraintTests.cs b/external/guiunit/src/tests/Syntax/PathConstraintTests.cs
new file mode 100755
index 0000000..1f9dca6
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/PathConstraintTests.cs
@@ -0,0 +1,172 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.IO;
+
+namespace NUnit.Framework.Syntax
+{
+ public class SamePathTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+ string defaultCaseSensitivity = Path.DirectorySeparatorChar == '\\'
+ ? "ignorecase" : "respectcase";
+
+ parseTree = string.Format(@"<samepath ""{0}"" {1}>", path, defaultCaseSensitivity);
+ staticSyntax = Is.SamePath(path);
+ inheritedSyntax = Helper().SamePath(path);
+ builderSyntax = Builder().SamePath(path);
+ }
+ }
+
+ public class SamePathTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<samepath ""{0}"" ignorecase>", path);
+ staticSyntax = Is.SamePath(path).IgnoreCase;
+ inheritedSyntax = Helper().SamePath(path).IgnoreCase;
+ builderSyntax = Builder().SamePath(path).IgnoreCase;
+ }
+ }
+
+ public class NotSamePathTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<not <samepath ""{0}"" ignorecase>>", path);
+ staticSyntax = Is.Not.SamePath(path).IgnoreCase;
+ inheritedSyntax = Helper().Not.SamePath(path).IgnoreCase;
+ builderSyntax = Builder().Not.SamePath(path).IgnoreCase;
+ }
+ }
+
+ public class SamePathTest_RespectCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<samepath ""{0}"" respectcase>", path);
+ staticSyntax = Is.SamePath(path).RespectCase;
+ inheritedSyntax = Helper().SamePath(path).RespectCase;
+ builderSyntax = Builder().SamePath(path).RespectCase;
+ }
+ }
+
+ public class NotSamePathTest_RespectCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<not <samepath ""{0}"" respectcase>>", path);
+ staticSyntax = Is.Not.SamePath(path).RespectCase;
+ inheritedSyntax = Helper().Not.SamePath(path).RespectCase;
+ builderSyntax = Builder().Not.SamePath(path).RespectCase;
+ }
+ }
+
+ public class SamePathOrUnderTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+ string defaultCaseSensitivity = Path.DirectorySeparatorChar == '\\'
+ ? "ignorecase" : "respectcase";
+
+ parseTree = string.Format(@"<samepathorunder ""{0}"" {1}>", path, defaultCaseSensitivity);
+ staticSyntax = Is.SamePathOrUnder(path);
+ inheritedSyntax = Helper().SamePathOrUnder(path);
+ builderSyntax = Builder().SamePathOrUnder(path);
+ }
+ }
+
+ public class SamePathOrUnderTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<samepathorunder ""{0}"" ignorecase>", path);
+ staticSyntax = Is.SamePathOrUnder(path).IgnoreCase;
+ inheritedSyntax = Helper().SamePathOrUnder(path).IgnoreCase;
+ builderSyntax = Builder().SamePathOrUnder(path).IgnoreCase;
+ }
+ }
+
+ public class NotSamePathOrUnderTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<not <samepathorunder ""{0}"" ignorecase>>", path);
+ staticSyntax = Is.Not.SamePathOrUnder(path).IgnoreCase;
+ inheritedSyntax = Helper().Not.SamePathOrUnder(path).IgnoreCase;
+ builderSyntax = Builder().Not.SamePathOrUnder(path).IgnoreCase;
+ }
+ }
+
+ public class SamePathOrUnderTest_RespectCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<samepathorunder ""{0}"" respectcase>", path);
+ staticSyntax = Is.SamePathOrUnder(path).RespectCase;
+ inheritedSyntax = Helper().SamePathOrUnder(path).RespectCase;
+ builderSyntax = Builder().SamePathOrUnder(path).RespectCase;
+ }
+ }
+
+ public class NotSamePathOrUnderTest_RespectCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ string path = "/path/to/match";
+
+ parseTree = string.Format(@"<not <samepathorunder ""{0}"" respectcase>>", path);
+ staticSyntax = Is.Not.SamePathOrUnder(path).RespectCase;
+ inheritedSyntax = Helper().Not.SamePathOrUnder(path).RespectCase;
+ builderSyntax = Builder().Not.SamePathOrUnder(path).RespectCase;
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/PropertyTests.cs b/external/guiunit/src/tests/Syntax/PropertyTests.cs
new file mode 100755
index 0000000..1f3440c
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/PropertyTests.cs
@@ -0,0 +1,131 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ public class PropertyExistsTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<propertyexists X>";
+ staticSyntax = Has.Property("X");
+ inheritedSyntax = Helper().Property("X");
+ builderSyntax = Builder().Property("X");
+ }
+ }
+
+ public class PropertyExistsTest_AndFollows : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<and <propertyexists X> <equal 7>>";
+ staticSyntax = Has.Property("X").And.EqualTo(7);
+ inheritedSyntax = Helper().Property("X").And.EqualTo(7);
+ builderSyntax = Builder().Property("X").And.EqualTo(7);
+ }
+ }
+
+ public class PropertyTest_ConstraintFollows : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<property X <greaterthan 5>>";
+ staticSyntax = Has.Property("X").GreaterThan(5);
+ inheritedSyntax = Helper().Property("X").GreaterThan(5);
+ builderSyntax = Builder().Property("X").GreaterThan(5);
+ }
+ }
+
+ public class PropertyTest_NotFollows : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<property X <not <greaterthan 5>>>";
+ staticSyntax = Has.Property("X").Not.GreaterThan(5);
+ inheritedSyntax = Helper().Property("X").Not.GreaterThan(5);
+ builderSyntax = Builder().Property("X").Not.GreaterThan(5);
+ }
+ }
+
+ public class LengthTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<property Length <greaterthan 5>>";
+ staticSyntax = Has.Length.GreaterThan(5);
+ inheritedSyntax = Helper().Length.GreaterThan(5);
+ builderSyntax = Builder().Length.GreaterThan(5);
+ }
+ }
+
+ public class CountTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<property Count <equal 5>>";
+ staticSyntax = Has.Count.EqualTo(5);
+ inheritedSyntax = Helper().Count.EqualTo(5);
+ builderSyntax = Builder().Count.EqualTo(5);
+ }
+ }
+
+ public class MessageTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<property Message <startswith ""Expected"">>";
+ staticSyntax = Has.Message.StartsWith("Expected");
+ inheritedSyntax = Helper().Message.StartsWith("Expected");
+ builderSyntax = Builder().Message.StartsWith("Expected");
+ }
+ }
+
+ public class PropertySyntaxVariations
+ {
+ private readonly int[] ints = new int[] { 1, 2, 3 };
+
+ [Test]
+ public void ExistenceTest()
+ {
+ Assert.That(ints, Has.Property("Length"));
+ Assert.That(ints, Has.Length);
+ }
+
+ [Test]
+ public void SeparateConstraintTest()
+ {
+ Assert.That(ints, Has.Property("Length").EqualTo(3));
+ Assert.That(ints, Has.Length.EqualTo(3));
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/guiunit/src/tests/Syntax/SerializableConstraints.cs b/external/guiunit/src/tests/Syntax/SerializableConstraints.cs
new file mode 100755
index 0000000..0bee44e
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/SerializableConstraints.cs
@@ -0,0 +1,55 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.
+// ***********************************************************************
+
+namespace NUnit.Framework.Syntax
+{
+#if !NETCF && !SILVERLIGHT
+ [TestFixture]
+ public class BinarySerializableTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<binaryserializable>";
+ staticSyntax = Is.BinarySerializable;
+ inheritedSyntax = Helper().BinarySerializable;
+ builderSyntax = Builder().BinarySerializable;
+ }
+ }
+#endif
+
+#if !SILVERLIGHT
+ [TestFixture]
+ public class XmlSerializableTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<xmlserializable>";
+ staticSyntax = Is.XmlSerializable;
+ inheritedSyntax = Helper().XmlSerializable;
+ builderSyntax = Builder().XmlSerializable;
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/Syntax/SimpleConstraints.cs b/external/guiunit/src/tests/Syntax/SimpleConstraints.cs
new file mode 100755
index 0000000..c9dcf37
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/SimpleConstraints.cs
@@ -0,0 +1,111 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ public class NullTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<null>";
+ staticSyntax = Is.Null;
+ inheritedSyntax = Helper().Null;
+ builderSyntax = Builder().Null;
+ }
+ }
+
+ public class TrueTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<true>";
+ staticSyntax = Is.True;
+ inheritedSyntax = Helper().True;
+ builderSyntax = Builder().True;
+ }
+ }
+
+ public class FalseTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<false>";
+ staticSyntax = Is.False;
+ inheritedSyntax = Helper().False;
+ builderSyntax = Builder().False;
+ }
+ }
+
+ public class NaNTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<nan>";
+ staticSyntax = Is.NaN;
+ inheritedSyntax = Helper().NaN;
+ builderSyntax = Builder().NaN;
+ }
+ }
+
+ public class PositiveTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<greaterthan 0>";
+ staticSyntax = Is.Positive;
+ inheritedSyntax = Helper().Positive;
+ builderSyntax = Builder().Positive;
+ }
+ }
+
+ public class NegativeTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<lessthan 0>";
+ staticSyntax = Is.Negative;
+ inheritedSyntax = Helper().Negative;
+ builderSyntax = Builder().Negative;
+ }
+ }
+
+ public class EmptyTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<empty>";
+ staticSyntax = Is.Empty;
+ inheritedSyntax = Helper().Empty;
+ builderSyntax = Builder().Empty;
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/StringConstraints.cs b/external/guiunit/src/tests/Syntax/StringConstraints.cs
new file mode 100755
index 0000000..46de9c6
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/StringConstraints.cs
@@ -0,0 +1,137 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ public class SubstringTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<substring ""X"">";
+ staticSyntax = Is.StringContaining("X");
+ inheritedSyntax = Helper().ContainsSubstring("X");
+ builderSyntax = Builder().ContainsSubstring("X");
+ }
+ }
+
+ public class ContainsSubstringTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<substring ""X"">";
+ staticSyntax = Contains.Substring("X");
+ inheritedSyntax = Helper().ContainsSubstring("X");
+ builderSyntax = Builder().ContainsSubstring("X");
+ }
+ }
+
+ public class SubstringTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<substring ""X"">";
+ staticSyntax = Is.StringContaining("X").IgnoreCase;
+ inheritedSyntax = Helper().ContainsSubstring("X").IgnoreCase;
+ builderSyntax = Builder().ContainsSubstring("X").IgnoreCase;
+ }
+ }
+
+ public class StartsWithTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<startswith ""X"">";
+ staticSyntax = Is.StringStarting("X");
+ inheritedSyntax = Helper().StartsWith("X");
+ builderSyntax = Builder().StartsWith("X");
+ }
+ }
+
+ public class StartsWithTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<startswith ""X"">";
+ staticSyntax = Is.StringStarting("X").IgnoreCase;
+ inheritedSyntax = Helper().StartsWith("X").IgnoreCase;
+ builderSyntax = Builder().StartsWith("X").IgnoreCase;
+ }
+ }
+
+ public class EndsWithTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<endswith ""X"">";
+ staticSyntax = Is.StringEnding("X");
+ inheritedSyntax = Helper().EndsWith("X");
+ builderSyntax = Builder().EndsWith("X");
+ }
+ }
+
+ public class EndsWithTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<endswith ""X"">";
+ staticSyntax = Is.StringEnding("X").IgnoreCase;
+ inheritedSyntax = Helper().EndsWith("X").IgnoreCase;
+ builderSyntax = Builder().EndsWith("X").IgnoreCase;
+ }
+ }
+
+#if !NETCF
+ public class RegexTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<regex ""X"">";
+ staticSyntax = Is.StringMatching("X");
+ inheritedSyntax = Helper().Matches("X");
+ builderSyntax = Builder().Matches("X");
+ }
+ }
+
+ public class RegexTest_IgnoreCase : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<regex ""X"">";
+ staticSyntax = Is.StringMatching("X").IgnoreCase;
+ inheritedSyntax = Helper().Matches("X").IgnoreCase;
+ builderSyntax = Builder().Matches("X").IgnoreCase;
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/Syntax/SyntaxTest.cs b/external/guiunit/src/tests/Syntax/SyntaxTest.cs
new file mode 100755
index 0000000..31a27dd
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/SyntaxTest.cs
@@ -0,0 +1,70 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Syntax
+{
+ public abstract class SyntaxTest
+ {
+ protected string parseTree;
+ protected IResolveConstraint staticSyntax;
+ protected IResolveConstraint inheritedSyntax;
+ protected IResolveConstraint builderSyntax;
+
+ protected AssertionHelper Helper()
+ {
+ return new AssertionHelper();
+ }
+
+ protected ConstraintExpression Builder()
+ {
+ return new ConstraintExpression();
+ }
+
+ [Test]
+ public void SupportedByStaticSyntax()
+ {
+ Assert.That(
+ staticSyntax.Resolve().ToString(),
+ Is.EqualTo(parseTree).NoClip);
+ }
+
+ [Test]
+ public void SupportedByConstraintBuilder()
+ {
+ Assert.That(
+ builderSyntax.Resolve().ToString(),
+ Is.EqualTo(parseTree).NoClip);
+ }
+
+ [Test]
+ public void SupportedByInheritedSyntax()
+ {
+ Assert.That(
+ inheritedSyntax.Resolve().ToString(),
+ Is.EqualTo(parseTree).NoClip);
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/TestCompiler.cs b/external/guiunit/src/tests/Syntax/TestCompiler.cs
new file mode 100755
index 0000000..237e2bf
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/TestCompiler.cs
@@ -0,0 +1,57 @@
+// ****************************************************************
+// Copyright 2007, Charlie Poole
+// This is free software licensed under the NUnit license. You may
+// obtain a copy of the license at http://nunit.org.
+// ****************************************************************
+
+using System;
+using System.CodeDom.Compiler;
+using System.IO;
+
+namespace NUnit.Framework.Syntax
+{
+ class TestCompiler
+ {
+ Microsoft.CSharp.CSharpCodeProvider provider;
+#if CLR_1_1
+ ICodeCompiler compiler;
+#endif
+ CompilerParameters options;
+
+ public TestCompiler() : this( null, null ) { }
+
+ public TestCompiler( string[] assemblyNames ) : this( assemblyNames, null ) { }
+
+ public TestCompiler( string[] assemblyNames, string outputName )
+ {
+ this.provider = new Microsoft.CSharp.CSharpCodeProvider();
+#if CLR_1_1
+ this.compiler = provider.CreateCompiler();
+#endif
+ this.options = new CompilerParameters();
+
+ if ( assemblyNames != null && assemblyNames.Length > 0 )
+ options.ReferencedAssemblies.AddRange( assemblyNames );
+ if ( outputName != null )
+ options.OutputAssembly = outputName;
+
+ options.IncludeDebugInformation = false;
+ options.TempFiles = new TempFileCollection( Path.GetTempPath(), false );
+ options.GenerateInMemory = false;
+ }
+
+ public CompilerParameters Options
+ {
+ get { return options; }
+ }
+
+ public CompilerResults CompileCode( string code )
+ {
+#if CLR_2_0 || CLR_4_0
+ return provider.CompileAssemblyFromSource( options, code );
+#else
+ return compiler.CompileAssemblyFromSource(options, code);
+#endif
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/ThrowsTests.cs b/external/guiunit/src/tests/Syntax/ThrowsTests.cs
new file mode 100755
index 0000000..451efa5
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/ThrowsTests.cs
@@ -0,0 +1,241 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework.Constraints;
+
+namespace NUnit.Framework.Syntax
+{
+ [TestFixture]
+ public class ThrowsTests
+ {
+ [Test]
+ public void ThrowsException()
+ {
+ IResolveConstraint expr = Throws.Exception;
+ Assert.AreEqual(
+ "<throws>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsExceptionWithConstraint()
+ {
+ IResolveConstraint expr = Throws.Exception.With.Property("ParamName").EqualTo("myParam");
+ Assert.AreEqual(
+ @"<throws <property ParamName <equal ""myParam"">>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsExceptionTypeOf()
+ {
+ IResolveConstraint expr = Throws.Exception.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <typeof System.ArgumentException>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTypeOf()
+ {
+ IResolveConstraint expr = Throws.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <typeof System.ArgumentException>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTypeOfAndConstraint()
+ {
+ IResolveConstraint expr = Throws.TypeOf(typeof(ArgumentException)).And.Property("ParamName").EqualTo("myParam");
+ Assert.AreEqual(
+ @"<throws <and <typeof System.ArgumentException> <property ParamName <equal ""myParam"">>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsExceptionTypeOfAndConstraint()
+ {
+ IResolveConstraint expr = Throws.Exception.TypeOf(typeof(ArgumentException)).And.Property("ParamName").EqualTo("myParam");
+ Assert.AreEqual(
+ @"<throws <and <typeof System.ArgumentException> <property ParamName <equal ""myParam"">>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTypeOfWithConstraint()
+ {
+ IResolveConstraint expr = Throws.TypeOf(typeof(ArgumentException)).With.Property("ParamName").EqualTo("myParam");
+ Assert.AreEqual(
+ @"<throws <and <typeof System.ArgumentException> <property ParamName <equal ""myParam"">>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTypeofWithMessage()
+ {
+ IResolveConstraint expr = Throws.TypeOf(typeof(ArgumentException)).With.Message.EqualTo("my message");
+ Assert.AreEqual(
+ @"<throws <and <typeof System.ArgumentException> <property Message <equal ""my message"">>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsInstanceOf()
+ {
+ IResolveConstraint expr = Throws.InstanceOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <instanceof System.ArgumentException>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsExceptionInstanceOf()
+ {
+ IResolveConstraint expr = Throws.Exception.InstanceOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <instanceof System.ArgumentException>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsInnerException()
+ {
+ IResolveConstraint expr = Throws.InnerException.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <property InnerException <typeof System.ArgumentException>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsExceptionWithInnerException()
+ {
+ IResolveConstraint expr = Throws.Exception.With.InnerException.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <property InnerException <typeof System.ArgumentException>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTypeOfWithInnerException()
+ {
+ IResolveConstraint expr = Throws.TypeOf(typeof(System.Reflection.TargetInvocationException))
+ .With.InnerException.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <and <typeof System.Reflection.TargetInvocationException> <property InnerException <typeof System.ArgumentException>>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsTargetInvocationExceptionWithInnerException()
+ {
+ IResolveConstraint expr = Throws.TargetInvocationException
+ .With.InnerException.TypeOf(typeof(ArgumentException));
+ Assert.AreEqual(
+ "<throws <and <typeof System.Reflection.TargetInvocationException> <property InnerException <typeof System.ArgumentException>>>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsArgumentException()
+ {
+ IResolveConstraint expr = Throws.ArgumentException;
+ Assert.AreEqual(
+ "<throws <typeof System.ArgumentException>>",
+ expr.Resolve().ToString());
+ }
+
+ [Test]
+ public void ThrowsInvalidOperationException()
+ {
+ IResolveConstraint expr = Throws.InvalidOperationException;
+ Assert.AreEqual(
+ "<throws <typeof System.InvalidOperationException>>",
+ expr.Resolve().ToString());
+ }
+
+#if CLR_2_0 || CLR_4_0
+#if !NETCF
+ [Test]
+ public void DelegateThrowsException()
+ {
+ Assert.That(
+ delegate { throw new ArgumentException(); },
+ Throws.Exception);
+ }
+
+ [Test]
+ public void LambdaThrowsExcepton()
+ {
+ Assert.That(
+ () => new MyClass(null),
+ Throws.InstanceOf<ArgumentNullException>());
+ }
+
+ [Test]
+ public void LambdaThrowsExceptionWithMessage()
+ {
+ Assert.That(
+ () => new MyClass(null),
+ Throws.InstanceOf<ArgumentNullException>()
+ .And.Message.Matches("null"));
+ }
+
+ internal class MyClass
+ {
+ public MyClass(string s)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException();
+ }
+ }
+ }
+
+ [Test]
+ public void LambdaThrowsNothing()
+ {
+ Assert.That(() => (object)null, Throws.Nothing);
+ }
+#else
+ [Test]
+ public void DelegateThrowsException()
+ {
+ Assert.That(
+ delegate { Throw(); return; },
+ Throws.Exception);
+ }
+
+ // Encapsulate throw to trick compiler and
+ // avoid unreachable code warning. Can't
+ // use pragma because this is also compiled
+ // under the .NET 1.0 and 1.1 compilers.
+ private void Throw()
+ {
+ throw new ApplicationException();
+ }
+#endif
+#endif
+ }
+}
diff --git a/external/guiunit/src/tests/Syntax/TypeConstraints.cs b/external/guiunit/src/tests/Syntax/TypeConstraints.cs
new file mode 100755
index 0000000..a9ad9c0
--- /dev/null
+++ b/external/guiunit/src/tests/Syntax/TypeConstraints.cs
@@ -0,0 +1,172 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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;
+
+namespace NUnit.Framework.Syntax
+{
+ [TestFixture]
+ public class ExactTypeTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<typeof System.String>";
+ staticSyntax = Is.TypeOf(typeof(string));
+ inheritedSyntax = Helper().TypeOf(typeof(string));
+ builderSyntax = Builder().TypeOf(typeof(string));
+ }
+ }
+
+ [TestFixture]
+ public class InstanceOfTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<instanceof System.String>";
+ staticSyntax = Is.InstanceOf(typeof(string));
+ inheritedSyntax = Helper().InstanceOf(typeof(string));
+ builderSyntax = Builder().InstanceOf(typeof(string));
+ }
+ }
+
+ [TestFixture]
+ public class AssignableFromTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<assignablefrom System.String>";
+ staticSyntax = Is.AssignableFrom(typeof(string));
+ inheritedSyntax = Helper().AssignableFrom(typeof(string));
+ builderSyntax = Builder().AssignableFrom(typeof(string));
+ }
+ }
+
+ [TestFixture]
+ public class AssignableToTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<assignableto System.String>";
+ staticSyntax = Is.AssignableTo(typeof(string));
+ inheritedSyntax = Helper().AssignableTo(typeof(string));
+ builderSyntax = Builder().AssignableTo(typeof(string));
+ }
+ }
+
+ [TestFixture]
+ public class AttributeTest : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<attributeexists NUnit.Framework.TestFixtureAttribute>";
+ staticSyntax = Has.Attribute(typeof(TestFixtureAttribute));
+ inheritedSyntax = Helper().Attribute(typeof(TestFixtureAttribute));
+ builderSyntax = Builder().Attribute(typeof(TestFixtureAttribute));
+ }
+ }
+
+ [TestFixture]
+ public class AttributeTestWithFollowingConstraint : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = @"<attribute NUnit.Framework.TestFixtureAttribute <property Description <not <null>>>>";
+ staticSyntax = Has.Attribute(typeof(TestFixtureAttribute)).Property("Description").Not.Null;
+ inheritedSyntax = Helper().Attribute(typeof(TestFixtureAttribute)).Property("Description").Not.Null;
+ builderSyntax = Builder().Attribute(typeof(TestFixtureAttribute)).Property("Description").Not.Null;
+ }
+ }
+
+#if CLR_2_0 || CLR_4_0
+ [TestFixture]
+ public class ExactTypeTest_Generic : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<typeof System.String>";
+ staticSyntax = Is.TypeOf<string>();
+ inheritedSyntax = Helper().TypeOf<string>();
+ builderSyntax = Builder().TypeOf<string>();
+ }
+ }
+
+ [TestFixture]
+ public class InstanceOfTest_Generic : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<instanceof System.String>";
+ staticSyntax = Is.InstanceOf<string>();
+ inheritedSyntax = Helper().InstanceOf<string>();
+ builderSyntax = Builder().InstanceOf<string>();
+ }
+ }
+
+ [TestFixture]
+ public class AssignableFromTest_Generic : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<assignablefrom System.String>";
+ staticSyntax = Is.AssignableFrom<string>();
+ inheritedSyntax = Helper().AssignableFrom<string>();
+ builderSyntax = Builder().AssignableFrom<string>();
+ }
+ }
+
+ [TestFixture]
+ public class AssignableToTest_Generic : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<assignableto System.String>";
+ staticSyntax = Is.AssignableTo<string>();
+ inheritedSyntax = Helper().AssignableTo<string>();
+ builderSyntax = Builder().AssignableTo<string>();
+ }
+ }
+
+ [TestFixture]
+ public class AttributeTest_Generic : SyntaxTest
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ parseTree = "<attributeexists NUnit.Framework.TestFixtureAttribute>";
+ staticSyntax = Has.Attribute<TestFixtureAttribute>();
+ inheritedSyntax = Helper().Attribute<TestFixtureAttribute>();
+ builderSyntax = Builder().Attribute<TestFixtureAttribute>();
+ }
+ }
+#endif
+}
diff --git a/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectCollection.cs b/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectCollection.cs
new file mode 100755
index 0000000..787619f
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectCollection.cs
@@ -0,0 +1,81 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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;
+
+namespace NUnit.TestUtilities
+{
+ /// <summary>
+ /// SimpleObjectCollection is used in testing to wrap an array or
+ /// other collection, ensuring that only methods of the ICollection
+ /// interface are accessible.
+ /// </summary>
+ class SimpleObjectCollection : ICollection
+ {
+ private readonly ICollection inner;
+
+ public SimpleObjectCollection(ICollection inner)
+ {
+ this.inner = inner;
+ }
+
+ public SimpleObjectCollection(params object[] inner)
+ {
+ this.inner = inner;
+ }
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ inner.CopyTo(array, index);
+ }
+
+ public int Count
+ {
+ get { return inner.Count; }
+ }
+
+ public bool IsSynchronized
+ {
+ get { return inner.IsSynchronized; }
+ }
+
+ public object SyncRoot
+ {
+ get { return inner.SyncRoot; }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ public IEnumerator GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectList.cs b/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectList.cs
new file mode 100755
index 0000000..6a32b16
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/Collections/SimpleObjectList.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections;
+
+namespace NUnit.TestUtilities
+{
+ public class SimpleObjectList : IList
+ {
+ private IList inner;
+
+ public SimpleObjectList(IList contents)
+ {
+ Initialize(contents);
+ }
+
+ public SimpleObjectList(params object[] contents)
+ {
+ Initialize(contents);
+ }
+
+ private void Initialize(IList contents)
+ {
+#if CLR_1_1
+ this.inner = new System.Collections.ArrayList();
+#else
+ this.inner = new System.Collections.Generic.List<object>();
+#endif
+ foreach (object o in contents)
+ this.inner.Add(o);
+ }
+
+ #region IList Members
+
+ public int Add(object value)
+ {
+ return inner.Add(value);
+ }
+
+ public void Clear()
+ {
+ inner.Clear();
+ }
+
+ public bool Contains(object value)
+ {
+ return inner.Contains(value);
+ }
+
+ public int IndexOf(object value)
+ {
+ return inner.IndexOf(value);
+ }
+
+ public void Insert(int index, object value)
+ {
+ inner.Insert(index, value);
+ }
+
+ public bool IsFixedSize
+ {
+ get { return inner.IsFixedSize; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return inner.IsReadOnly; }
+ }
+
+ public void Remove(object value)
+ {
+ inner.Remove(value);
+ }
+
+ public void RemoveAt(int index)
+ {
+ inner.RemoveAt(index);
+ }
+
+ public object this[int index]
+ {
+ get { return inner[index]; }
+ set { inner[index] = value; }
+ }
+
+ #endregion
+
+ #region ICollection Members
+
+ public void CopyTo(Array array, int index)
+ {
+ inner.CopyTo(array, index);
+ }
+
+ public int Count
+ {
+ get { return inner.Count; }
+ }
+
+ public bool IsSynchronized
+ {
+ get { return inner.IsSynchronized; }
+ }
+
+ public object SyncRoot
+ {
+ get { return inner.SyncRoot; }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ public IEnumerator GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/Comparers/AlwaysEqualComparer.cs b/external/guiunit/src/tests/TestUtilities/Comparers/AlwaysEqualComparer.cs
new file mode 100755
index 0000000..8fb8bb3
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/Comparers/AlwaysEqualComparer.cs
@@ -0,0 +1,41 @@
+// ***********************************************************************
+// Copyright (c) 2006 Charlie Poole
+//
+// 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;
+
+namespace NUnit.TestUtilities
+{
+ internal class AlwaysEqualComparer : IComparer
+ {
+ public bool Called = false;
+
+ int IComparer.Compare(object x, object y)
+ {
+ Called = true;
+
+ // This comparer ALWAYS returns zero (equal)!
+ return 0;
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/Comparers/SimpleEqualityComparer.cs b/external/guiunit/src/tests/TestUtilities/Comparers/SimpleEqualityComparer.cs
new file mode 100755
index 0000000..a64f9f3
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/Comparers/SimpleEqualityComparer.cs
@@ -0,0 +1,43 @@
+#if CLR_2_0 || CLR_4_0
+using System.Collections;
+using System.Collections.Generic;
+
+namespace NUnit.TestUtilities
+{
+ public class SimpleEqualityComparer : IEqualityComparer
+ {
+ public bool Called;
+
+ bool IEqualityComparer.Equals(object x, object y)
+ {
+ Called = true;
+#if SILVERLIGHT
+ return Comparer<object>.Default.Compare(x, y) == 0;
+#else
+ return Comparer.Default.Compare(x, y) == 0;
+#endif
+ }
+
+ int IEqualityComparer.GetHashCode(object x)
+ {
+ return x.GetHashCode();
+ }
+ }
+
+ public class SimpleEqualityComparer<T> : IEqualityComparer<T>
+ {
+ public bool Called;
+
+ bool IEqualityComparer<T>.Equals(T x, T y)
+ {
+ Called = true;
+ return Comparer<T>.Default.Compare(x, y) == 0;
+ }
+
+ int IEqualityComparer<T>.GetHashCode(T x)
+ {
+ return x.GetHashCode();
+ }
+ }
+}
+#endif
diff --git a/external/guiunit/src/tests/TestUtilities/Comparers/SimpleObjectComparer.cs b/external/guiunit/src/tests/TestUtilities/Comparers/SimpleObjectComparer.cs
new file mode 100755
index 0000000..9309910
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/Comparers/SimpleObjectComparer.cs
@@ -0,0 +1,19 @@
+using System.Collections;
+
+namespace NUnit.TestUtilities
+{
+ public class SimpleObjectComparer : IComparer
+ {
+ public bool Called;
+
+ public int Compare(object x, object y)
+ {
+ Called = true;
+#if SILVERLIGHT
+ return System.Collections.Generic.Comparer<object>.Default.Compare(x, y);
+#else
+ return System.Collections.Comparer.Default.Compare(x, y);
+#endif
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/ResultSummary.cs b/external/guiunit/src/tests/TestUtilities/ResultSummary.cs
new file mode 100755
index 0000000..0abf719
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/ResultSummary.cs
@@ -0,0 +1,207 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+ using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.TestUtilities
+{
+ /// <summary>
+ /// Summary description for ResultSummary.
+ /// </summary>
+ public class ResultSummary
+ {
+ private int resultCount = 0;
+ private int testsRun = 0;
+ private int failureCount = 0;
+ private int errorCount = 0;
+ private int successCount = 0;
+ private int inconclusiveCount = 0;
+ private int skipCount = 0;
+ private int ignoreCount = 0;
+ private int notRunnable = 0;
+
+ private TimeSpan duration = TimeSpan.Zero;
+ private string name;
+
+ public ResultSummary() { }
+
+ public ResultSummary(ITestResult result)
+ {
+ Summarize(result);
+ }
+
+ private void Summarize(ITestResult result)
+ {
+ if (this.name == null)
+ {
+ this.name = result.Name;
+ this.duration = result.Duration;
+ }
+
+ if (result.HasChildren)
+ {
+ foreach (TestResult childResult in result.Children)
+ Summarize(childResult);
+ }
+ else
+ {
+ resultCount++;
+
+ switch (result.ResultState.Status)
+ {
+ case TestStatus.Passed:
+ successCount++;
+ testsRun++;
+ break;
+ case TestStatus.Failed:
+ failureCount++;
+ testsRun++;
+ break;
+ //case TestStatus.Error:
+ //case TestStatus.Cancelled:
+ //errorCount++;
+ //testsRun++;
+ //break;
+ case TestStatus.Inconclusive:
+ inconclusiveCount++;
+ testsRun++;
+ break;
+ //case TestStatus.NotRunnable:
+ // notRunnable++;
+ // //errorCount++;
+ // break;
+ //case TestStatus.Ignored:
+ // ignoreCount++;
+ // break;
+ case TestStatus.Skipped:
+ default:
+ skipCount++;
+ break;
+ }
+ }
+ }
+
+ public string Name
+ {
+ get { return name; }
+ }
+
+ public bool Success
+ {
+ get { return failureCount == 0; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases for which results
+ /// have been summarized. Any tests excluded by use of
+ /// Category or Explicit attributes are not counted.
+ /// </summary>
+ public int ResultCount
+ {
+ get { return resultCount; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases actually run, which
+ /// is the same as ResultCount, less any Skipped, Ignored
+ /// or NonRunnable tests.
+ /// </summary>
+ public int TestsRun
+ {
+ get { return testsRun; }
+ }
+
+ /// <summary>
+ /// Returns the number of tests that passed
+ /// </summary>
+ public int Passed
+ {
+ get { return successCount; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases that had an error.
+ /// </summary>
+ public int Errors
+ {
+ get { return errorCount; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases that failed.
+ /// </summary>
+ public int Failures
+ {
+ get { return failureCount; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases that failed.
+ /// </summary>
+ public int Inconclusive
+ {
+ get { return inconclusiveCount; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases that were not runnable
+ /// due to errors in the signature of the class or method.
+ /// Such tests are also counted as Errors.
+ /// </summary>
+ public int NotRunnable
+ {
+ get { return notRunnable; }
+ }
+
+ /// <summary>
+ /// Returns the number of test cases that were skipped.
+ /// </summary>
+ public int Skipped
+ {
+ get { return skipCount; }
+ }
+
+ public int Ignored
+ {
+ get { return ignoreCount; }
+ }
+
+ public TimeSpan Duration
+ {
+ get { return duration; }
+ }
+
+ public int TestsNotRun
+ {
+ get { return skipCount + ignoreCount + notRunnable; }
+ }
+
+ public int ErrorsAndFailures
+ {
+ get { return errorCount + failureCount; }
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/TestAssert.cs b/external/guiunit/src/tests/TestUtilities/TestAssert.cs
new file mode 100755
index 0000000..4a51aab
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/TestAssert.cs
@@ -0,0 +1,144 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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 NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.TestUtilities
+{
+ public class TestAssert
+ {
+ #region IsRunnable
+
+ /// <summary>
+ /// Verify that a test is runnable
+ /// </summary>
+ public static void IsRunnable(Test test)
+ {
+ Assert.AreEqual(RunState.Runnable, test.RunState);
+ }
+
+ /// <summary>
+ /// Verify that the first child test is runnable
+ /// </summary>
+ public static void FirstChildIsRunnable(Test test)
+ {
+ IsRunnable((Test)test.Tests[0]);
+ }
+
+ /// <summary>
+ /// Verify that a Type can be used to create a
+ /// runnable fixture
+ /// </summary>
+ public static void IsRunnable(Type type)
+ {
+ TestSuite suite = TestBuilder.MakeFixture(type);
+ Assert.NotNull(suite, "Unable to construct fixture");
+ Assert.AreEqual(RunState.Runnable, suite.RunState);
+ }
+
+ /// <summary>
+ /// Verify that a Type is runnable, then run it and
+ /// verify the result.
+ /// </summary>
+ public static void IsRunnable(Type type, ResultState resultState)
+ {
+ TestSuite suite = TestBuilder.MakeFixture(type);
+ Assert.NotNull(suite, "Unable to construct fixture");
+ Assert.AreEqual(RunState.Runnable, suite.RunState);
+ ITestResult result = TestBuilder.RunTest(suite);
+ Assert.AreEqual(resultState, result.ResultState);
+ }
+
+ /// <summary>
+ /// Verify that a named test method is runnable
+ /// </summary>
+ public static void IsRunnable(Type type, string name)
+ {
+ Test test = TestBuilder.MakeTestCase(type, name);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ }
+
+ /// <summary>
+ /// Verify that the first child (usually a test case)
+ /// of a named test method is runnable
+ /// </summary>
+ public static void FirstChildIsRunnable(Type type, string name)
+ {
+ Test suite = TestBuilder.MakeTestCase(type, name);
+ TestAssert.FirstChildIsRunnable(suite);
+ }
+
+ /// <summary>
+ /// Verify that a named test method is runnable, then
+ /// run it and verify the result.
+ /// </summary>
+ public static void IsRunnable(Type type, string name, ResultState resultState)
+ {
+ Test test = TestBuilder.MakeTestCase(type, name);
+ Assert.That(test.RunState, Is.EqualTo(RunState.Runnable));
+ object testObject = Activator.CreateInstance(type);
+ ITestResult result = TestBuilder.RunTest(test, testObject);
+ if (result.HasChildren) // In case it's a parameterized method
+ result = (ITestResult)result.Children[0];
+ Assert.That(result.ResultState, Is.EqualTo(resultState));
+ }
+
+ #endregion
+
+ #region IsNotRunnable
+ public static void IsNotRunnable(Test test)
+ {
+ Assert.AreEqual(RunState.NotRunnable, test.RunState);
+ ITestResult result = TestBuilder.RunTest(test, null);
+ Assert.AreEqual(ResultState.NotRunnable, result.ResultState);
+ }
+
+ public static void IsNotRunnable(Type type)
+ {
+ TestSuite fixture = TestBuilder.MakeFixture(type);
+ Assert.NotNull(fixture, "Unable to construct fixture");
+ IsNotRunnable(fixture);
+ }
+
+ public static void IsNotRunnable(Type type, string name)
+ {
+ IsNotRunnable(TestBuilder.MakeTestCase(type, name));
+ }
+
+ public static void FirstChildIsNotRunnable(Test suite)
+ {
+ IsNotRunnable((Test)suite.Tests[0]);
+ }
+
+ public static void FirstChildIsNotRunnable(Type type, string name)
+ {
+ FirstChildIsNotRunnable(TestBuilder.MakeParameterizedMethodSuite(type, name));
+ }
+ #endregion
+
+ private TestAssert() { }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/TestBuilder.cs b/external/guiunit/src/tests/TestUtilities/TestBuilder.cs
new file mode 100755
index 0000000..f7404f4
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/TestBuilder.cs
@@ -0,0 +1,174 @@
+// ***********************************************************************
+// Copyright (c) 2009 Charlie Poole
+//
+// 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.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Builders;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Extensibility;
+using NUnit.Framework.Internal.WorkItems;
+using System.Threading;
+
+namespace NUnit.TestUtilities
+{
+ /// <summary>
+ /// Utility Class used to build NUnit tests for use as test data
+ /// </summary>
+ public class TestBuilder
+ {
+ private static NUnitTestFixtureBuilder fixtureBuilder = new NUnitTestFixtureBuilder();
+ private static NUnitTestCaseBuilder testBuilder = new NUnitTestCaseBuilder();
+
+#if !NUNITLITE
+ static TestBuilder()
+ {
+ if (!CoreExtensions.Host.Initialized)
+ CoreExtensions.Host.Initialize();
+ }
+#endif
+
+ public static TestSuite MakeFixture(Type type)
+ {
+ return (TestSuite)fixtureBuilder.BuildFrom(type);
+ }
+
+ public static TestSuite MakeFixture(object fixture)
+ {
+ return (TestSuite)fixtureBuilder.BuildFrom(fixture.GetType());
+ }
+
+ public static TestSuite MakeParameterizedMethodSuite(Type type, string methodName)
+ {
+ return (TestSuite)MakeTestCase(type, methodName);
+ }
+
+ public static Test MakeTestCase(Type type, string methodName)
+ {
+ MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ if (method == null)
+ Assert.Fail("Unable to find method {0} in type {1}", methodName, type.FullName);
+ return testBuilder.BuildFrom(method);
+ }
+
+ public static Test MakeTestCase(object fixture, string methodName)
+ {
+ return MakeTestCase(fixture.GetType(), methodName);
+ }
+
+ public static TestResult RunTestFixture(Type type)
+ {
+ TestSuite suite = MakeFixture(type);
+
+ TestExecutionContext context = new TestExecutionContext();
+ context.TestObject = null;
+
+ CompositeWorkItem work = new CompositeWorkItem(suite, context, TestFilter.Empty);
+ return ExecuteAndWaitForResult(work);
+ }
+
+ public static TestResult RunTestFixture(object fixture)
+ {
+ TestSuite suite = MakeFixture(fixture);
+
+ TestExecutionContext context = new TestExecutionContext();
+ context.TestObject = fixture;
+
+ WorkItem work = WorkItem.CreateWorkItem(suite, context, TestFilter.Empty);
+ return ExecuteAndWaitForResult(work);
+ }
+
+ public static ITestResult RunTestCase(Type type, string methodName)
+ {
+ Test test = MakeTestCase(type, methodName);
+
+ object testObject = null;
+ if (!IsStaticClass(type))
+ testObject = Activator.CreateInstance(type);
+
+ return RunTest(test, testObject);
+ }
+
+ public static ITestResult RunTestCase(object fixture, string methodName)
+ {
+ Test test = MakeTestCase(fixture, methodName);
+ return RunTest(test, fixture);
+ }
+
+ public static WorkItem RunTestCaseAsync(object fixture, string methodName)
+ {
+ Test test = MakeTestCase(fixture, methodName);
+ return RunTestAsync(test, fixture);
+ }
+
+ public static ITestResult RunTest(Test test)
+ {
+ return RunTest(test, null);
+ }
+
+ public static WorkItem RunTestAsync(Test test)
+ {
+ return RunTestAsync(test, (object)null);
+ }
+
+ public static WorkItem RunTestAsync(Test test, object testObject)
+ {
+ TestExecutionContext context = new TestExecutionContext();
+ context.TestObject = testObject;
+
+ WorkItem work = WorkItem.CreateWorkItem(test, context, TestFilter.Empty);
+ work.Execute();
+
+ return work;
+ }
+
+ public static ITestResult RunTest(Test test, object testObject)
+ {
+ TestExecutionContext context = new TestExecutionContext();
+ context.TestObject = testObject;
+
+ WorkItem work = WorkItem.CreateWorkItem(test, context, TestFilter.Empty);
+ return ExecuteAndWaitForResult(work);
+ }
+
+ private static TestResult ExecuteAndWaitForResult(WorkItem work)
+ {
+ work.Execute();
+
+ // TODO: Replace with an event
+ while (work.State != WorkItemState.Complete)
+ Thread.Sleep(1);
+
+ return work.Result;
+ }
+
+ private static bool IsStaticClass(Type type)
+ {
+ return type.IsAbstract && type.IsSealed;
+ }
+
+ private TestBuilder() { }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/TestComparer.cs b/external/guiunit/src/tests/TestUtilities/TestComparer.cs
new file mode 100755
index 0000000..aa83dff
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/TestComparer.cs
@@ -0,0 +1,51 @@
+// ***********************************************************************
+// Copyright (c) 2006 Charlie Poole
+//
+// 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;
+
+namespace NUnit.TestUtilities
+{
+ internal class TestComparer : IComparer
+ {
+ public bool Called = false;
+
+ #region IComparer Members
+ public int Compare(object x, object y)
+ {
+ Called = true;
+
+ if (x == null && y == null)
+ return 0;
+
+ if (x == null || y == null)
+ return -1;
+
+ if (x.Equals(y))
+ return 0;
+
+ return -1;
+ }
+ #endregion
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/TestDelegates.cs b/external/guiunit/src/tests/TestUtilities/TestDelegates.cs
new file mode 100755
index 0000000..6edfd8b
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/TestDelegates.cs
@@ -0,0 +1,66 @@
+// ***********************************************************************
+// Copyright (c) 2008 Charlie Poole
+//
+// 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;
+
+namespace NUnit.TestUtilities
+{
+ public class TestDelegates
+ {
+ public static void ThrowsArgumentException()
+ {
+ throw new ArgumentException("myMessage", "myParam");
+ }
+
+ public static void ThrowsSystemException()
+ {
+ throw new Exception("my message");
+ }
+
+ public static void ThrowsNothing()
+ {
+ }
+
+ public static void ThrowsCustomException()
+ {
+ throw new CustomException();
+ }
+
+ public static void ThrowsDerivedCustomException()
+ {
+ throw new DerivedCustomException();
+ }
+
+ public class CustomException : Exception
+ {
+ }
+
+ public class DerivedCustomException : CustomException
+ {
+ }
+
+ public class DerivedException : Exception
+ {
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/TestUtilities/TestFinder.cs b/external/guiunit/src/tests/TestUtilities/TestFinder.cs
new file mode 100755
index 0000000..84337e6
--- /dev/null
+++ b/external/guiunit/src/tests/TestUtilities/TestFinder.cs
@@ -0,0 +1,98 @@
+// ***********************************************************************
+// Copyright (c) 2007 Charlie Poole
+//
+// 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 NUnit.Framework;
+using NUnit.Framework.Api;
+using NUnit.Framework.Internal;
+
+namespace NUnit.TestUtilities
+{
+ /// <summary>
+ /// Utility class used to locate tests by name in a test suite
+ /// </summary>
+ public class TestFinder
+ {
+ public static Test MustFind(string name, TestSuite suite, bool recursive)
+ {
+ Test test = Find(name, suite, recursive);
+
+ Assert.NotNull(test, "Unable to find test {0}", name);
+
+ return test;
+ }
+
+ public static Test Find(string name, TestSuite suite, bool recursive)
+ {
+ foreach (Test child in suite.Tests)
+ {
+ if (child.Name == name)
+ return child;
+ if (recursive)
+ {
+ TestSuite childSuite = child as TestSuite;
+ if (childSuite != null)
+ {
+ Test grandchild = Find(name, childSuite, true);
+ if (grandchild != null)
+ return grandchild;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static ITestResult MustFind(string name, TestResult result, bool recursive)
+ {
+ ITestResult foundResult = Find(name, result, recursive);
+
+ Assert.NotNull(foundResult, "Unable to find result for {0}", name);
+
+ return foundResult;
+ }
+
+ public static ITestResult Find(string name, TestResult result, bool recursive)
+ {
+ if (result.HasChildren)
+ {
+ foreach (TestResult childResult in result.Children)
+ {
+ if (childResult.Name == name)
+ return childResult;
+
+ if (recursive && childResult.HasChildren)
+ {
+ ITestResult r = Find(name, childResult, true);
+ if (r != null)
+ return r;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private TestFinder() { }
+ }
+}
diff --git a/external/guiunit/src/tests/nunitlite.tests-2.0.csproj b/external/guiunit/src/tests/nunitlite.tests-2.0.csproj
new file mode 100755
index 0000000..89342f1
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-2.0.csproj
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C8FA4073-B24E-4178-93A1-5E1256C8B528}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <IntermediateOutputPath>obj\$(Configuration)\net-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <DefineConstants>TRACE;DEBUG;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <OutputPath>..\..\bin\Debug\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NET_2_0,CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <OutputPath>..\..\bin\Release\net-2.0\</OutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-2.0.csproj">
+ <Project>{C24A3FC4-2541-4E9C-BADD-564777610B75}</Project>
+ <Name>nunitlite-2.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-2.0.csproj">
+ <Project>{1516338A-F26B-4BA7-AF6E-C3F6A39DC45B}</Project>
+ <Name>mock-assembly-2.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-2.0.csproj">
+ <Project>{442DAB16-3063-4FE3-90B6-C29C3D85360D}</Project>
+ <Name>nunitlite.testdata-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\TimeoutTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\DelayedConstraintTest.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestContextTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\AssemblyHelperTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomGeneratorTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\AfterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\InvalidCodeTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\TestCompiler.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-3.5.csproj b/external/guiunit/src/tests/nunitlite.tests-3.5.csproj
new file mode 100755
index 0000000..ea72be5
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-3.5.csproj
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{94A4E298-F324-4531-856F-127505F766E5}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-3.5\</OutputPath>
+ <DefineConstants>TRACE;NET_3_5, CLR_2_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-3.5.csproj">
+ <Project>{43B24DC5-16D6-45EF-93F1-B021B785A892}</Project>
+ <Name>nunitlite-3.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-3.5.csproj">
+ <Project>{1798FBBC-4B6E-4ED8-90A8-7DD9C36194E7}</Project>
+ <Name>mock-assembly-3.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-3.5.csproj">
+ <Project>{652AFEEB-B19C-4C67-A014-2248EA72F229}</Project>
+ <Name>nunitlite.testdata-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\TimeoutTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\DelayedConstraintTest.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestContextTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\AssemblyHelperTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\AfterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\InvalidCodeTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\TestCompiler.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-4.0.csproj b/external/guiunit/src/tests/nunitlite.tests-4.0.csproj
new file mode 100755
index 0000000..0f3ba45
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-4.0.csproj
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{497A578E-EF93-4190-96E0-B7F22E08027B}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.0\</OutputPath>
+ <DefineConstants>TRACE;NET_4_0, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.0.csproj">
+ <Project>{1567BCCE-7BE9-4815-84D7-7F794DB39081}</Project>
+ <Name>nunitlite-4.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-4.0.csproj">
+ <Project>{961F4A5A-CAC4-4A53-9EF0-C6EE26A6429A}</Project>
+ <Name>mock-assembly-4.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-4.0.csproj">
+ <Project>{5C77A144-3CD1-42FC-B622-410E1945CA1E}</Project>
+ <Name>nunitlite.testdata-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\TimeoutTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\DelayedConstraintTest.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestContextTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\AssemblyHelperTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\AfterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\InvalidCodeTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\TestCompiler.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-4.5.csproj b/external/guiunit/src/tests/nunitlite.tests-4.5.csproj
new file mode 100755
index 0000000..2b824ef
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-4.5.csproj
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B08DC15F-FC46-4B50-9366-8F745F41A869}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\net-4.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;NET_4_5, CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\net-4.5\</OutputPath>
+ <DefineConstants>TRACE;NET_4_5,CLR_4_0,NUNITLITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Assertions\AsyncThrowsTests.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\TimeoutTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\DelayedConstraintTest.cs" />
+ <Compile Include="Constraints\AsyncDelayedConstraintTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestContextTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\AssemblyHelperTests.cs" />
+ <Compile Include="Internal\AsyncTestMethodTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\NUnitTestCaseBuilderTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\AfterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\InvalidCodeTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\TestCompiler.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-4.5.csproj">
+ <Project>{d12f0f7b-8de3-43ec-ba49-41052d065a9b}</Project>
+ <Name>nunitlite-4.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-4.5.csproj">
+ <Project>{a57ffbd8-684a-4868-a4e1-a5d28ec6ea3b}</Project>
+ <Name>mock-assembly-4.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-4.5.csproj">
+ <Project>{6358fbca-9ca2-4a70-af87-18b916400cee}</Project>
+ <Name>nunitlite.testdata-4.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-netcf-2.0.csproj b/external/guiunit/src/tests/nunitlite.tests-netcf-2.0.csproj
new file mode 100755
index 0000000..8e56770
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-netcf-2.0.csproj
@@ -0,0 +1,217 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4B518BF0-D523-4F75-AF3B-9B41865E634A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>NUnitLite</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <StartupObject>
+ </StartupObject>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-2.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-2.0</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-2.0\</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_2_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs" />
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-2.0.csproj">
+ <Project>{BED999D7-F594-4CE4-A037-E40E2B9C1288}</Project>
+ <Name>nunitlite-netcf-2.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-netcf-2.0.csproj">
+ <Project>{33EA4538-3452-42ED-92A9-4CC3B25032AD}</Project>
+ <Name>mock-assembly-netcf-2.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-netcf-2.0.csproj">
+ <Project>{F67E80E8-DF9F-4C66-9142-5002FA638EB7}</Project>
+ <Name>nunitlite.testdata-netcf-2.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-netcf-3.5.csproj b/external/guiunit/src/tests/nunitlite.tests-netcf-3.5.csproj
new file mode 100755
index 0000000..4fe6809
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-netcf-3.5.csproj
@@ -0,0 +1,211 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{80A9EC94-2C42-44AC-9D2C-E1418D712C48}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnit.Framework.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>WindowsCE</PlatformFamilyName>
+ <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
+ <OSVersion>5.0</OSVersion>
+ <DeployDirSuffix>nunitlite.tests_netcf_3._5</DeployDirSuffix>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NativePlatformName>Windows CE</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ <IntermediateOutputPath>obj\$(Configuration)\netcf-3.5\</IntermediateOutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\netcf-3.5\</OutputPath>
+ <DefineConstants>TRACE;WindowsCE;NETCF;NETCF_3_5;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs" />
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-netcf-3.5.csproj">
+ <Project>{5F6CB3DC-5CE5-4C6A-AB23-936DB3B35DCC}</Project>
+ <Name>nunitlite-netcf-3.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-netcf-3.5.csproj">
+ <Project>{B0C85907-1103-44F4-ACFF-6A1B9170C0B1}</Project>
+ <Name>mock-assembly-netcf-3.5</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-netcf-3.5.csproj">
+ <Project>{0B7C0B55-6A49-4F32-993E-C9ED6DA0B73C}</Project>
+ <Name>nunitlite.testdata-netcf-3.5</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-sl-3.0.csproj b/external/guiunit/src/tests/nunitlite.tests-sl-3.0.csproj
new file mode 100755
index 0000000..5cf8392
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-sl-3.0.csproj
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FFEA1F81-9631-43A8-8368-FBC14B1E7B02}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures />
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>nunitlite.tests-sl-3.0.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>NUnitLite.Tests.App</SilverlightAppEntry>
+ <TestPageFileName>TestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject />
+ <SignManifests>false</SignManifests>
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-3.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-3.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_3_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>false</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Silverlight.Testing">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.Silverlight.Testing.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Windows">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="mscorlib">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="system">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Core">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Xml">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Windows.Browser">
+ <Private>True</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs" />
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-3.0.csproj">
+ <Project>{02B02379-2596-4E45-8B10-835D62EA2D9E}</Project>
+ <Name>nunitlite-sl-3.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-sl-3.0.csproj">
+ <Project>{BB355D2C-FB4F-4526-9B40-7944C40FDFDA}</Project>
+ <Name>mock-assembly-sl-3.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-sl-3.0.csproj">
+ <Project>{6BB1FF9E-DF15-4999-8EEE-F4DA328FBCBB}</Project>
+ <Name>nunitlite.testdata-sl-3.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-sl-4.0.csproj b/external/guiunit/src/tests/nunitlite.tests-sl-4.0.csproj
new file mode 100755
index 0000000..a35ba52
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-sl-4.0.csproj
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0B899C26-9114-440A-A8A1-615CDE7EE6BD}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures />
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>nunitlite.tests-sl-4.0.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>NUnitLite.Tests.App</SilverlightAppEntry>
+ <TestPageFileName>TestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-4.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!--
+ //
+ // Silverlight Code Coverage Instrumentation
+ // List any libraries or assemblies that you would like to instrument during
+ // a code coverage pass. An example, for ClassLibrary1, is provided, and
+ // commented out below as a starting point:
+ //
+ -->
+ <!--
+ <ItemGroup>
+ <InstrumentSilverlightAssemblies Include="SilverlightClassLibrary1">
+ <Visible>false</Visible>
+ </InstrumentSilverlightAssemblies>
+ </ItemGroup>
+ -->
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;SL_4_0;CLR_4_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-4.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;SL_4_0;CLR_2_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>false</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Silverlight.Testing">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.Silverlight.Testing.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Windows">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="mscorlib" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Windows.Browser">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Xml">
+ <Private>True</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs" />
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs" />
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-4.0.csproj">
+ <Project>{41326141-EB24-4984-9D9B-5CFAA55946BA}</Project>
+ <Name>nunitlite-sl-4.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-sl-4.0.csproj">
+ <Project>{3C1249FC-B5DF-4E3A-ADDD-817526254876}</Project>
+ <Name>mock-assembly-sl-4.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-sl-4.0.csproj">
+ <Project>{E97412B5-8C91-4236-8E9A-24C8E20BC675}</Project>
+ <Name>nunitlite.testdata-sl-4.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests-sl-5.0.csproj b/external/guiunit/src/tests/nunitlite.tests-sl-5.0.csproj
new file mode 100755
index 0000000..f48c922
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests-sl-5.0.csproj
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7107C352-7F42-497E-A26C-25E9AAE8E54C}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>NUnitLite.Tests</RootNamespace>
+ <AssemblyName>nunitlite.tests</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures />
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>nunitlite.tests-sl-5.0.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>NUnitLite.Tests.App</SilverlightAppEntry>
+ <TestPageFileName>TestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject />
+ <TargetFrameworkProfile />
+ <IntermediateOutputPath>obj\$(Configuration)\sl-5.0\</IntermediateOutputPath>
+ </PropertyGroup>
+ <!--
+ //
+ // Silverlight Code Coverage Instrumentation
+ // List any libraries or assemblies that you would like to instrument during
+ // a code coverage pass. An example, for ClassLibrary1, is provided, and
+ // commented out below as a starting point:
+ //
+ -->
+ <!--
+ <ItemGroup>
+ <InstrumentSilverlightAssemblies Include="SilverlightClassLibrary1">
+ <Visible>false</Visible>
+ </InstrumentSilverlightAssemblies>
+ </ItemGroup>
+ -->
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\bin\Debug\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;CLR_4_0;SL_5_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\bin\Release\sl-5.0\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;CLR_4_0;SL_5_0;NUNITLITE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Silverlight.Testing">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.Silverlight.Testing.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight">
+ <HintPath>$(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ </Reference>
+ <Reference Include="system, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Windows">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Xml">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Windows.Browser">
+ <Private>True</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\ResultStateTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Assertions\ArrayEqualsFailureMessageFixture.cs" />
+ <Compile Include="Assertions\ArrayEqualsFixture.cs" />
+ <Compile Include="Assertions\ArrayNotEqualFixture.cs" />
+ <Compile Include="Assertions\AssertFailTests.cs" />
+ <Compile Include="Assertions\AssertIgnoreTests.cs" />
+ <Compile Include="Assertions\AssertInconclusiveTests.cs" />
+ <Compile Include="Assertions\AssertPassTests.cs" />
+ <Compile Include="Assertions\AssertThatTests.cs" />
+ <Compile Include="Assertions\AssertThrowsTests.cs" />
+ <Compile Include="Assertions\AssumeThatTests.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Assertions\CollectionTests.cs" />
+ <Compile Include="Assertions\ConditionAssertTests.cs" />
+ <Compile Include="Assertions\EqualsFixture.cs" />
+ <Compile Include="Assertions\MessageChecker.cs" />
+ <Compile Include="Assertions\NotEqualFixture.cs" />
+ <Compile Include="Assertions\NotSameFixture.cs" />
+ <Compile Include="Assertions\NullableTypesTests.cs" />
+ <Compile Include="Assertions\SameFixture.cs" />
+ <Compile Include="Attributes\ApplyToTestTests.cs" />
+ <Compile Include="Attributes\AttributeInheritanceTests.cs" />
+ <Compile Include="Attributes\CategoryAttributeTests.cs" />
+ <Compile Include="Attributes\CombinatorialTests.cs" />
+ <Compile Include="Attributes\DatapointTests.cs" />
+ <Compile Include="Attributes\DescriptionTests.cs" />
+ <Compile Include="Attributes\ExpectedExceptionTests.cs" />
+ <Compile Include="Attributes\FixtureSetUpTearDownTests.cs" />
+ <Compile Include="Attributes\MaxTimeTests.cs" />
+ <Compile Include="Attributes\PairwiseTests.cs" />
+ <Compile Include="Attributes\ParameterizedTestFixtureTests.cs" />
+ <Compile Include="Attributes\PropertyAttributeTests.cs" />
+ <Compile Include="Attributes\RepeatedTestTests.cs" />
+ <Compile Include="Attributes\SetCultureAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseAttributeTests.cs" />
+ <Compile Include="Attributes\TestCaseSourceTests.cs" />
+ <Compile Include="Attributes\TestDummy.cs" />
+ <Compile Include="Attributes\TestFixtureAttributeTests.cs" />
+ <Compile Include="Attributes\TheoryTests.cs" />
+ <Compile Include="Attributes\ValuesAttributeTests.cs" />
+ <Compile Include="Attributes\ValueSourceTests.cs" />
+ <Compile Include="Constraints\AllItemsConstraintTests.cs" />
+ <Compile Include="Constraints\AndConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableFromConstraintTests.cs" />
+ <Compile Include="Constraints\AssignableToConstraintTests.cs" />
+ <Compile Include="Constraints\AttributeExistsConstraintTests.cs" />
+ <Compile Include="Constraints\BasicConstraintTests.cs" />
+ <Compile Include="Constraints\BinarySerializableTest.cs" />
+ <Compile Include="Constraints\CollectionContainsConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionEquivalentConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionOrderedConstraintTests.cs" />
+ <Compile Include="Constraints\CollectionSubsetConstraintTests.cs" />
+ <Compile Include="Constraints\ComparisonConstraintTest.cs" />
+ <Compile Include="Constraints\ConstraintTestBase.cs" />
+ <Compile Include="Constraints\EmptyConstraintTest.cs" />
+ <Compile Include="Constraints\EndsWithConstraintTests.cs" />
+ <Compile Include="Constraints\EqualConstraintTests.cs" />
+ <Compile Include="Constraints\ExactCountConstraintTests.cs" />
+ <Compile Include="Constraints\ExactTypeConstraintTests.cs" />
+ <Compile Include="Constraints\FloatingPointNumericsTest.cs" />
+ <Compile Include="Constraints\GreaterThanConstraintTests.cs" />
+ <Compile Include="Constraints\GreaterThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\InstanceOfTypeConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanConstraintTests.cs" />
+ <Compile Include="Constraints\LessThanOrEqualConstraintTests.cs" />
+ <Compile Include="Constraints\MessageWriterTests.cs" />
+ <Compile Include="Constraints\MsgUtilTests.cs" />
+ <Compile Include="Constraints\NotConstraintTests.cs" />
+ <Compile Include="Constraints\NumericsTest.cs" />
+ <Compile Include="Constraints\NUnitComparerTests.cs" />
+ <Compile Include="Constraints\NUnitEqualityComparerTests.cs" />
+ <Compile Include="Constraints\OrConstraintTests.cs" />
+ <Compile Include="Constraints\PathConstraintTests.cs" />
+ <Compile Include="Constraints\PredicateConstraintTests.cs" />
+ <Compile Include="Constraints\PropertyTests.cs" />
+ <Compile Include="Constraints\RangeConstraintTests.cs" />
+ <Compile Include="Constraints\RangeTests.cs" />
+ <Compile Include="Constraints\ReusableConstraintTests.cs" />
+ <Compile Include="Constraints\SameAsTest.cs" />
+ <Compile Include="Constraints\StartsWithConstraintTests.cs" />
+ <Compile Include="Constraints\SubstringConstraintTests.cs" />
+ <Compile Include="Constraints\TestDelegates.cs" />
+ <Compile Include="Constraints\ThrowsConstraintTests.cs" />
+ <Compile Include="Constraints\ToStringTests.cs" />
+ <Compile Include="Constraints\UniqueItemsConstraintTests.cs" />
+ <Compile Include="Constraints\XmlSerializableTest.cs" />
+ <Compile Include="Framework\StackFilterTest.cs" />
+ <Compile Include="Framework\SyntaxTests.cs" />
+ <Compile Include="Framework\TestResultTests.cs" />
+ <Compile Include="Internal\CultureSettingAndDetectionTests.cs" />
+ <Compile Include="Internal\DeduceTypeArgsFromArgs.cs" />
+ <Compile Include="Internal\GenericTestFixtureTests.cs" />
+ <Compile Include="Internal\GenericTestMethodTests.cs" />
+ <Compile Include="Internal\PlatformDetectionTests.cs" />
+ <Compile Include="Internal\PropertyBagTests.cs" />
+ <Compile Include="Internal\RandomizerTests.cs" />
+ <Compile Include="Internal\RuntimeFrameworkTests.cs" />
+ <Compile Include="Internal\SetUpTest.cs" />
+ <Compile Include="Internal\SimpleGenericMethods.cs" />
+ <Compile Include="Internal\TestExecutionContextTests.cs" />
+ <Compile Include="Internal\TestFixtureTests.cs" />
+ <Compile Include="Internal\TestMethodSignatureTests.cs" />
+ <Compile Include="Internal\TestResultTests.cs" />
+ <Compile Include="Internal\TestXmlTests.cs" />
+ <Compile Include="Internal\TextMessageWriterTests.cs" />
+ <Compile Include="Internal\TypeParameterUsedWithTestMethod.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="RecordingTestListener.cs" />
+ <Compile Include="Runner\CommandLineOptionTests.cs" />
+ <Compile Include="Runner\NUnit2XmlOutputWriterTests.cs" />
+ <Compile Include="Syntax\ArbitraryConstraintMatching.cs" />
+ <Compile Include="Syntax\CollectionTests.cs" />
+ <Compile Include="Syntax\ComparisonTests.cs" />
+ <Compile Include="Syntax\EqualityTests.cs" />
+ <Compile Include="Syntax\OperatorOverrides.cs" />
+ <Compile Include="Syntax\OperatorTests.cs" />
+ <Compile Include="Syntax\PathConstraintTests.cs" />
+ <Compile Include="Syntax\PropertyTests.cs" />
+ <Compile Include="Syntax\SerializableConstraints.cs" />
+ <Compile Include="Syntax\SimpleConstraints.cs" />
+ <Compile Include="Syntax\StringConstraints.cs" />
+ <Compile Include="Syntax\SyntaxTest.cs" />
+ <Compile Include="Syntax\ThrowsTests.cs" />
+ <Compile Include="Syntax\TypeConstraints.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectCollection.cs" />
+ <Compile Include="TestUtilities\Collections\SimpleObjectList.cs" />
+ <Compile Include="TestUtilities\Comparers\AlwaysEqualComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleEqualityComparer.cs" />
+ <Compile Include="TestUtilities\Comparers\SimpleObjectComparer.cs" />
+ <Compile Include="TestUtilities\ResultSummary.cs" />
+ <Compile Include="TestUtilities\TestAssert.cs" />
+ <Compile Include="TestUtilities\TestBuilder.cs" />
+ <Compile Include="TestUtilities\TestComparer.cs" />
+ <Compile Include="TestUtilities\TestDelegates.cs" />
+ <Compile Include="TestUtilities\TestFinder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\framework\nunitlite-sl-5.0.csproj">
+ <Project>{5EFE54B3-2494-4DF4-A42A-8492A5EC4BA3}</Project>
+ <Name>nunitlite-sl-5.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\mock-assembly\mock-assembly-sl-5.0.csproj">
+ <Project>{3C19A734-11BB-48FD-81D0-042B6A8D4CFC}</Project>
+ <Name>mock-assembly-sl-5.0</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\testdata\nunitlite.testdata-sl-5.0.csproj">
+ <Project>{A2B5D1FA-D865-4B30-A82D-30BB1C8C474E}</Project>
+ <Name>nunitlite.testdata-sl-5.0</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/external/guiunit/src/tests/nunitlite.tests.build b/external/guiunit/src/tests/nunitlite.tests.build
new file mode 100755
index 0000000..62fea7e
--- /dev/null
+++ b/external/guiunit/src/tests/nunitlite.tests.build
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<project name="NUnitLiteTests" default="build" basedir=".">
+
+ <property name="msbuild.project" value="nunitlite.tests-${msbuild.proj.suffix}.csproj"/>
+
+ <include buildfile="../../nunitlite.projects.common"/>
+
+ <target name="nant-clean">
+
+ <delete file="${current.build.dir}/nunitlite.tests.exe"/>
+ <delete file="${current.build.dir}/nunitlite.tests.pdb"/>
+
+ </target>
+
+ <target name="nant-build">
+
+ <property name="csc.target" value="exe" unless="${runtime.platform=='silverlight'}"/>
+ <property name="csc.target" value="library" if="${runtime.platform=='silverlight'}"/>
+ <property name="csc.output" value="nunitlite.tests.exe" unless="${runtime.platform=='silverlight'}"/>
+ <property name="csc.output" value="nunitlite.tests.dll" if="${runtime.platform=='silverlight'}"/>
+
+ <csc target="exe"
+ output="${current.build.dir}/nunitlite.tests.exe"
+ debug="${build.debug}"
+ define="${build.defines};NUNITLITE">
+ <sources basedir=".">
+ <patternset refid="source-files"/>
+ </sources>
+ <references basedir="${current.build.dir}">
+ <include name="mscorlib.dll"/>
+ <include name="System.dll"/>
+ <include name="System.Core.dll" if="${runtime.version >= '3.5'}"/>
+ <include name="System.Windows.dll" if="${runtime.platform == 'silverlight'}"/>
+ <include name="System.Windows.Browser.dll" if="${runtime.platform == 'silverlight'}"/>
+ <include name="System.Xml.dll"/>
+ <include name="nunitlite.dll"/>
+ <include name="nunitlite.testdata.dll"/>
+ <include name="mock-assembly.dll"/>
+ </references>
+ </csc>
+
+ </target>
+
+ <patternset id="source-files">
+ <include name="AssemblyInfo.cs"/>
+ <include name="RecordingTestListener.cs"/>
+
+ <include name="App.g.cs" if="${runtime.platform=='silverlight'}"/>
+ <include name="App.xaml.cs" if="${runtime.platform=='silverlight'}"/>
+
+ <include name="Program.cs" unless="${runtime.platform == 'silverlight'}"/>
+
+ <include name="Api/ResultStateTests.cs"/>
+
+ <include name="Assertions/*.cs"/>
+
+ <include name="Attributes/*.cs"/>
+ <exclude name="Attributes/SetCultureAttributeTests.cs" if="${runtime.platform == 'netcf'}"/>
+
+ <include name="Constraints/*.cs"/>
+ <exclude name="Constraints/DelayedConstraintTest.cs" if="${runtime.platform == 'silverlight'}"/>
+
+ <include name="Framework/*.cs"/>
+
+ <include name="Internal/*.cs"/>
+
+ <include name="Runner/*.cs"/>
+ <!--<exclude name="Runner/CommandLineOptionTests.cs" if="${runtime.platform == 'silverlight'}"/>-->
+
+ <include name="Syntax/*.cs"/>
+ <exclude name="Syntax/TestCompiler.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Syntax/TestCompiler.cs" if="${runtime.platform == 'silverlight'}"/>
+ <exclude name="Syntax/InvalidCodeTests.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Syntax/InvalidCodeTests.cs" if="${runtime.platform == 'silverlight'}"/>
+ <exclude name="Syntax/AfterTests.cs" if="${runtime.platform == 'netcf'}"/>
+ <exclude name="Syntax/AfterTests.cs" if="${runtime.platform == 'silverlight'}"/>
+
+ <include name="TestUtilities/*.cs"/>
+ <include name="TestUtilities/Collections/*.cs"/>
+ <include name="TestUtilities/Comparers/*.cs"/>
+ </patternset>
+
+</project>
diff --git a/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/tests/obj/Debug/net-4.5/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-3.0/App.g.cs b/external/guiunit/src/tests/obj/Debug/sl-3.0/App.g.cs
new file mode 100755
index 0000000..3c96323
--- /dev/null
+++ b/external/guiunit/src/tests/obj/Debug/sl-3.0/App.g.cs
@@ -0,0 +1,52 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
diff --git a/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/tests/obj/Debug/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.cs b/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.i.cs b/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.i.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/Debug/sl-4.0/App.g.i.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.cs b/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.i.cs b/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.i.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/Debug/sl-5.0/App.g.i.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/tests/obj/Debug/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-3.0/App.g.cs b/external/guiunit/src/tests/obj/release/sl-3.0/App.g.cs
new file mode 100755
index 0000000..fdbbc9b
--- /dev/null
+++ b/external/guiunit/src/tests/obj/release/sl-3.0/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "C5EA8CC62E98F28D836FF410E75A77C1"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.5420
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/tests/obj/release/sl-3.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-4.0/App.g.cs b/external/guiunit/src/tests/obj/release/sl-4.0/App.g.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/release/sl-4.0/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/release/sl-5.0/App.g.cs b/external/guiunit/src/tests/obj/release/sl-5.0/App.g.cs
new file mode 100755
index 0000000..4426b71
--- /dev/null
+++ b/external/guiunit/src/tests/obj/release/sl-5.0/App.g.cs
@@ -0,0 +1,53 @@
+#pragma checksum "C:\Users\ialastairhunter\Documents\nunitlite\src\tests\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2AB1B2E473A12409172A6740CD59F419"
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17929
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Automation.Peers;
+using System.Windows.Automation.Provider;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+
+namespace NUnitLite.Tests {
+
+
+ public partial class App : System.Windows.Application {
+
+ private bool _contentLoaded;
+
+ /// <summary>
+ /// InitializeComponent
+ /// </summary>
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent() {
+ if (_contentLoaded) {
+ return;
+ }
+ _contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new System.Uri("/nunitlite.tests;component/App.xaml", System.UriKind.Relative));
+ }
+ }
+}
+
diff --git a/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/external/guiunit/src/tests/obj/release/sl-5.0/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100755
index 0000000..e69de29
diff --git a/external/guiunit/tools/nant/COPYING.txt b/external/guiunit/tools/nant/COPYING.txt
new file mode 100755
index 0000000..5b6e7c6
--- /dev/null
+++ b/external/guiunit/tools/nant/COPYING.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/external/guiunit/tools/nant/README.txt b/external/guiunit/tools/nant/README.txt
new file mode 100755
index 0000000..79edf19
--- /dev/null
+++ b/external/guiunit/tools/nant/README.txt
@@ -0,0 +1,158 @@
+NAnt
+
+What is it?
+-----------
+NAnt is a .NET based build tool. In theory it is kind of like make without
+make's wrinkles. In practice it's a lot like Ant.
+
+If you are not familiar with Jakarta Ant you can get more information at the
+Ant project web site (http://ant.apache.org/).
+
+
+Why NAnt?
+---------
+Because Ant was too Java specific.
+Because Ant needed the Java runtime. NAnt only needs the .NET
+or Mono runtime.
+
+
+The Latest Version
+------------------
+Details of the latest version can be found on the NAnt project web site
+http://nant.sourceforge.net/
+
+
+Files
+-----
+ README.txt - This file.
+ Makefile - Makefile for compilation with GNU Make.
+ Makefile.nmake - Makefile for compilation with Microsoft NMake.
+
+
+Compilation and Installation
+----------------------------
+
+ a. Overview
+ -----------
+ The compilation process uses NAnt to build NAnt.
+
+ The approach is to first compile a copy of NAnt (using make/nmake) for
+ bootstrapping purpose. Next, the bootstrapped version of NAnt is used in
+ conjunction with NAnt build file (NAnt.build) to build the full version.
+
+
+ b. Prerequisites
+ ----------------
+ To build NAnt, you will need the following components:
+
+ Windows
+ -------
+
+ * A version of the Microsoft .NET Framework
+
+ Available from http://msdn.microsoft.com/netframework/
+
+ You will need the .NET Framework SDK as well as the runtime
+ components if you intend to compile programs.
+
+ Note: NAnt currently supports versions 1.0, 1.1, 2.0, 3.5, and 4.0
+ of the Microsoft .NET Framework.
+
+ or
+
+ * Mono for Windows (version 2.0 or higher)
+
+ Available from http://www.mono-project.com/downloads/
+
+ Linux/Unix
+ ----------
+
+ * GNU toolchain - including GNU make
+
+ * pkg-config
+
+ Available from: http://www.freedesktop.org/Software/pkgconfig
+
+ * A working Mono installation and development libraries (version 2.0 or higher)
+
+ Available from: http://www.mono-project.com/downloads/
+
+
+ b. Building the Software
+ ------------------------
+
+ Build NAnt using Microsoft .NET:
+
+ GNU Make
+ --------
+ make install MONO= MCS=csc prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
+
+ eg. make install MONO= MCS=csc prefix="c:\Program Files" TARGET=net-2.0
+
+ NMake
+ -----
+ nmake -f Makefile.nmake install prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
+
+ eg. nmake -f Makefile.nmake install prefix="c:\Program Files" TARGET=net-4.0
+
+
+ Building NAnt using Mono:
+
+ GNU Make
+ --------
+ make install prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
+
+ eg. make install prefix="c:\Program Files" TARGET=mono-4.0
+
+ NMake
+ -----
+ nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
+
+ eg. nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=/usr/local/
+
+Note:
+
+These instructions only apply to the source distribution of NAnt, as the binary distribution
+contains pre-built assemblies.
+
+
+Documentation
+-------------
+Documentation is available in HTML format, in the doc/ directory.
+
+
+License
+-------
+Copyright (C) 2001-2012 Gerry Shaw
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+As a special exception, the copyright holders of this software give you
+permission to link the assemblies with independent modules to produce new
+assemblies, regardless of the license terms of these independent modules,
+and to copy and distribute the resulting assemblies under terms of your
+choice, provided that you also meet, for each linked independent module,
+the terms and conditions of the license of that module. An independent
+module is a module which is not derived from or based on these assemblies.
+If you modify this software, you may extend this exception to your version
+of the software, but you are not obligated to do so. If you do not wish to
+do so, delete this exception statement from your version.
+
+A copy of the GNU General Public License is available in the COPYING.txt file
+included with all NAnt distributions.
+
+For more licensing information refer to the GNU General Public License on the
+GNU Project web site.
+http://www.gnu.org/copyleft/gpl.html
diff --git a/external/guiunit/tools/nant/bin/NAnt.CompressionTasks.xml b/external/guiunit/tools/nant/bin/NAnt.CompressionTasks.xml
new file mode 100755
index 0000000..2eb2db6
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.CompressionTasks.xml
@@ -0,0 +1,725 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.CompressionTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.Compression.Tasks.ExpandBaseTask">
+ <summary>
+ Summary description for ExpandTask.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.ExpandBaseTask.ExtractFile(System.IO.Stream,System.String,System.String,System.DateTime,System.Int64)">
+ <summary>
+ Extracts a file entry from the specified stream.
+ </summary>
+ <param name="inputStream">The <see cref="T:System.IO.Stream"/> containing the compressed entry.</param>
+ <param name="destDirectory">The directory where to store the expanded file.</param>
+ <param name="entryName">The name of the entry including directory information.</param>
+ <param name="entryDate">The date of the entry.</param>
+ <param name="entrySize">The uncompressed size of the entry.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The destination directory for the entry could not be created.</para>
+ <para>-or-</para>
+ <para>The entry could not be extracted.</para>
+ </exception>
+ <remarks>
+ We cannot rely on the fact that the directory entry of a given file
+ is created before the file is extracted, so we should create the
+ directory if it doesn't yet exist.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.ExpandBaseTask.ExtractDirectory(System.IO.Stream,System.String,System.String,System.DateTime)">
+ <summary>
+ Extracts a directory entry from the specified stream.
+ </summary>
+ <param name="inputStream">The <see cref="T:System.IO.Stream"/> containing the directory entry.</param>
+ <param name="destDirectory">The directory where to create the subdirectory.</param>
+ <param name="entryName">The name of the directory entry.</param>
+ <param name="entryDate">The date of the entry.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The destination directory for the entry could not be created.</para>
+ </exception>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ExpandBaseTask.Overwrite">
+ <summary>
+ Overwrite files, even if they are newer than the corresponding
+ entries in the archive. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Tasks.GUnzip">
+ <summary>
+ Expands a file packed using GZip compression.
+ </summary>
+ <example>
+ <para>Expands "test.tar.gz" to "test2.tar".</para>
+ <code>
+ <![CDATA[
+ <gunzip src="test.tar.gz" dest="test.tar" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.GUnzip.ExecuteTask">
+ <summary>
+ Extracts the file from the gzip archive.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.GUnzip.SrcFile">
+ <summary>
+ The file to expand.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.GUnzip.DestFile">
+ <summary>
+ The destination file.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Tasks.TarTask">
+ <summary>
+ Creates a tar file from the specified filesets.
+ </summary>
+ <remarks>
+ <para>Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see> (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#.</para>
+ </remarks>
+ <example>
+ <para>
+ Tar all files in <c>${build.dir}</c> and <c>${doc.dir}</c> into a file
+ called "backup.tar.gz", and apply gzip compression to it.
+ </para>
+ <code>
+ <![CDATA[
+ <tar destfile="backup.tar.gz" compression="GZip">
+ <fileset basedir="${bin.dir}" prefix="bin">
+ <include name="**/*" />
+ </fileset>
+ <fileset basedir="${doc.dir}" prefix="doc">
+ <include name="**/*" />
+ </fileset>
+ </tar>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.TarTask.ExecuteTask">
+ <summary>
+ Creates the tar file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.TarTask.DestFile">
+ <summary>
+ The tar file to create.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.TarTask.IncludeEmptyDirs">
+ <summary>
+ Include empty directories in the generated tar file. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.TarTask.Flatten">
+ <summary>
+ Ignore directory structure of source directory, compress all files
+ into a single directory.
+ The default value is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.TarTask.TarFileSets">
+ <summary>
+ The set of files to be included in the archive.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.TarTask.CompressionMethod">
+ <summary>
+ The compression method. The default is <see cref="F:NAnt.Compression.Types.TarCompressionMethod.None"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Tasks.UnTarTask">
+ <summary>
+ Extracts files from a tar archive.
+ </summary>
+ <remarks>
+ <para>
+ Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see>
+ (SharpZipLib), an open source Zip/GZip library written entirely in C#.
+ </para>
+ </remarks>
+ <example>
+ <para>Extracts all files from a gzipped tar, preserving the directory structure.</para>
+ <code>
+ <![CDATA[
+ <untar src="nant-bin.tar.gz" dest="bin" compression="gzip" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.UnTarTask.ExecuteTask">
+ <summary>
+ Extracts the files from the archive.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnTarTask.SrcFile">
+ <summary>
+ The archive file to expand.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnTarTask.DestinationDirectory">
+ <summary>
+ The directory where to store the expanded file(s). The default is
+ the project base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnTarTask.CompressionMethod">
+ <summary>
+ The compression method. The default is <see cref="F:NAnt.Compression.Types.TarCompressionMethod.None"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Tasks.UnZipTask">
+ <summary>
+ Extracts files from a zip archive.
+ </summary>
+ <remarks>
+ <para>
+ Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see>
+ (SharpZipLib), an open source Zip/GZip library written entirely in C#.
+ </para>
+ </remarks>
+ <example>
+ <para>Extracts all the file from the zip, preserving the directory structure.</para>
+ <code>
+ <![CDATA[
+ <unzip zipfile="backup.zip"/>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.UnZipTask.ExecuteTask">
+ <summary>
+ Extracts the files from the zip file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnZipTask.ZipFile">
+ <summary>
+ The archive file to expand.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnZipTask.ToDirectory">
+ <summary>
+ The directory where the expanded files should be stored. The
+ default is the project base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.UnZipTask.Encoding">
+ <summary>
+ The character encoding that has been used for filenames inside the
+ zip file. The default is the system's OEM code page.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Tasks.ZipTask">
+ <summary>
+ Creates a zip file from the specified filesets.
+ </summary>
+ <remarks>
+ <para>
+ Uses <see href="http://www.icsharpcode.net/OpenSource/SharpZipLib/">#ziplib</see>
+ (SharpZipLib), an open source Tar/Zip/GZip library written entirely in C#.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Zip all files in <c>${build.dir}</c> and <c>${doc.dir}</c> into a file
+ called "backup.zip".
+ </para>
+ <code>
+ <![CDATA[
+ <zip zipfile="backup.zip">
+ <fileset basedir="${bin.dir}" prefix="bin">
+ <include name="**/*" />
+ </fileset>
+ <fileset basedir="${doc.dir}" prefix="doc">
+ <include name="**/*" />
+ </fileset>
+ </zip>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Compression.Tasks.ZipTask.ExecuteTask">
+ <summary>
+ Creates the zip file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.ZipFile">
+ <summary>
+ The zip file to create.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.Comment">
+ <summary>
+ The comment for the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.Stamp">
+ <summary>
+ Date/time stamp for the files in the format MM/DD/YYYY HH:MM:SS.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.ZipLevel">
+ <summary>
+ Desired level of compression. Possible values are 0 (STORE only)
+ to 9 (highest). The default is <c>6</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.IncludeEmptyDirs">
+ <summary>
+ Include empty directories in the generated zip file. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.Flatten">
+ <summary>
+ Ignore directory structure of source directory, compress all files
+ into a single directory.
+ The default value is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.ZipFileSets">
+ <summary>
+ The set of files to be included in the archive.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.DuplicateHandling">
+ <summary>
+ Specifies the behaviour when a duplicate file is found. The default
+ is <see cref="T:NAnt.Compression.Types.DuplicateHandling.Add" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Tasks.ZipTask.Encoding">
+ <summary>
+ The character encoding to use for filenames and comment inside the
+ zip file. The default is the system's OEM code page.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.DuplicateHandling">
+ <summary>
+ Specifies how entries with the same name should be processed.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.DuplicateHandling.Add">
+ <summary>
+ Overwrite existing entry with same name.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.DuplicateHandling.Preserve">
+ <summary>
+ Preserve existing entry with the same name.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.DuplicateHandling.Fail">
+ <summary>
+ Report failure when two entries have the same name.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.DuplicateHandlingConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> for <see cref="T:NAnt.Compression.Types.TarCompressionMethod"/>
+ that ignores case when converting from string.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.DuplicateHandlingConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.DuplicateHandlingConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.DuplicateHandlingConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.Compression.Types.TarCompressionMethod">
+ <summary>
+ Specifies the compression methods supported by <see cref="T:NAnt.Compression.Tasks.TarTask"/>
+ and <see cref="T:NAnt.Compression.Tasks.UnTarTask"/>.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.TarCompressionMethod.None">
+ <summary>
+ No compression.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.TarCompressionMethod.GZip">
+ <summary>
+ GZIP compression.
+ </summary>
+ </member>
+ <member name="F:NAnt.Compression.Types.TarCompressionMethod.BZip2">
+ <summary>
+ BZIP2 compression.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.TarCompressionMethodConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> for <see cref="T:NAnt.Compression.Types.TarCompressionMethod"/>
+ that ignores case when converting from string.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarCompressionMethodConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarCompressionMethodConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarCompressionMethodConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.Compression.Types.TarFileSet">
+ <summary>
+ A <see cref="T:NAnt.Compression.Types.TarFileSet"/> is a <see cref="T:NAnt.Core.Types.FileSet"/> with extra
+ attributes useful in the context of the <see cref="T:NAnt.Compression.Tasks.TarTask"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.FileMode">
+ <summary>
+ A 3 digit octal string, specify the user, group and other modes
+ in the standard Unix fashion. Only applies to plain files. The
+ default is <c>644</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.DirMode">
+ <summary>
+ A 3 digit octal string, specify the user, group and other modes
+ in the standard Unix fashion. Only applies to directories. The
+ default is <c>755</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.UserName">
+ <summary>
+ The username for the tar entry.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.Uid">
+ <summary>
+ The user identifier (UID) for the tar entry.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.GroupName">
+ <summary>
+ The groupname for the tar entry.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.Gid">
+ <summary>
+ The group identifier (GID) for the tar entry.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSet.Prefix">
+ <summary>
+ The top level directory prefix. If set, all file and directory paths
+ in the fileset will have this value prepended. Can either be a single
+ directory name or a "/" separated path.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.TarFileSetCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor(NAnt.Compression.Types.TarFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class
+ with the specified <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.#ctor(NAnt.Compression.Types.TarFileSet[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> class
+ with the specified array of <see cref="T:NAnt.Compression.Types.TarFileSet"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.Add(NAnt.Compression.Types.TarFileSet)">
+ <summary>
+ Adds a <see cref="T:NAnt.Compression.Types.TarFileSet"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.AddRange(NAnt.Compression.Types.TarFileSet[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Compression.Types.TarFileSet"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.AddRange(NAnt.Compression.Types.TarFileSetCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.Contains(NAnt.Compression.Types.TarFileSet)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Compression.Types.TarFileSet"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.CopyTo(NAnt.Compression.Types.TarFileSet[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.IndexOf(NAnt.Compression.Types.TarFileSet)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Compression.Types.TarFileSet"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Compression.Types.TarFileSet"/>. If the <see cref="T:NAnt.Compression.Types.TarFileSet"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.Insert(System.Int32,NAnt.Compression.Types.TarFileSet)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Compression.Types.TarFileSet"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Compression.Types.TarFileSetEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetCollection.Remove(NAnt.Compression.Types.TarFileSet)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.TarFileSet"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSetCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSetCollection.FileCount">
+ <summary>
+ Get the total number of files that are represented by the
+ filesets in this collection.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.TarFileSetEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Compression.Types.TarFileSet"/> elements of a <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.#ctor(NAnt.Compression.Types.TarFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.TarFileSetEnumerator"/> class
+ with the specified <see cref="T:NAnt.Compression.Types.TarFileSetCollection"/>.
+ </summary>
+ <param name="TarFileSets">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.TarFileSetEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.TarFileSetEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Compression.Types.ZipFileSet">
+ <summary>
+ A <see cref="T:NAnt.Compression.Types.ZipFileSet"/> is a <see cref="T:NAnt.Core.Types.FileSet"/> with extra
+ attributes useful in the context of the <see cref="T:NAnt.Compression.Tasks.ZipTask"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.ZipFileSet.Prefix">
+ <summary>
+ The top level directory prefix. If set, all file and directory paths
+ in the fileset will have this value prepended. Can either be a single
+ directory name or a "/" separated path.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.ZipFileSetCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor(NAnt.Compression.Types.ZipFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class
+ with the specified <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.#ctor(NAnt.Compression.Types.ZipFileSet[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> class
+ with the specified array of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Add(NAnt.Compression.Types.ZipFileSet)">
+ <summary>
+ Adds a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.AddRange(NAnt.Compression.Types.ZipFileSet[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Compression.Types.ZipFileSet"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.AddRange(NAnt.Compression.Types.ZipFileSetCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Contains(NAnt.Compression.Types.ZipFileSet)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.CopyTo(NAnt.Compression.Types.ZipFileSet[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.IndexOf(NAnt.Compression.Types.ZipFileSet)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Compression.Types.ZipFileSet"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Compression.Types.ZipFileSet"/>. If the <see cref="T:NAnt.Compression.Types.ZipFileSet"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Insert(System.Int32,NAnt.Compression.Types.ZipFileSet)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Compression.Types.ZipFileSet"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Compression.Types.ZipFileSetEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetCollection.Remove(NAnt.Compression.Types.ZipFileSet)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Compression.Types.ZipFileSet"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Compression.Types.ZipFileSetCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Compression.Types.ZipFileSetCollection.FileCount">
+ <summary>
+ Get the total number of files that are represented by the
+ filesets in this collection.
+ </summary>
+ </member>
+ <member name="T:NAnt.Compression.Types.ZipFileSetEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Compression.Types.ZipFileSet"/> elements of a <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetEnumerator.#ctor(NAnt.Compression.Types.ZipFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Compression.Types.ZipFileSetEnumerator"/> class
+ with the specified <see cref="T:NAnt.Compression.Types.ZipFileSetCollection"/>.
+ </summary>
+ <param name="ZipFileSets">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Compression.Types.ZipFileSetEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Compression.Types.ZipFileSetEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.Core.xml b/external/guiunit/tools/nant/bin/NAnt.Core.xml
new file mode 100755
index 0000000..1701826
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.Core.xml
@@ -0,0 +1,17156 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.Core</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.Core.Attributes.BooleanValidatorAttribute">
+ <summary>
+ Used to indicate that a property should be able to be converted into a
+ <see cref="T:System.Boolean"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Attributes.ValidatorAttribute">
+ <summary>
+ Base class for all validator attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.ValidatorAttribute.Validate(System.Object)">
+ <summary>
+ Validates the specified value.
+ </summary>
+ <param name="value">The value to be validated.</param>
+ <exception cref="T:NAnt.Core.ValidationException">The validation fails.</exception>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BooleanValidatorAttribute.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.BooleanValidatorAttribute"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BooleanValidatorAttribute.Validate(System.Object)">
+ <summary>
+ Checks if the specified value can be converted to a <see cref="T:System.Boolean"/>.
+ </summary>
+ <param name="value">The value to be checked.</param>
+ <exception cref="T:NAnt.Core.ValidationException"><paramref name="value"/> cannot be converted to a <see cref="T:System.Boolean"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Attributes.BuildAttributeAttribute">
+ <summary>
+ Indicates that property should be treated as a XML attribute for the
+ task.
+ </summary>
+ <example>
+ Examples of how to specify task attributes
+ <code>
+ #region Public Instance Properties
+
+ [BuildAttribute("out", Required=true)]
+ public string Output {
+ get { return _out; }
+ set { _out = value; }
+ }
+
+ [BuildAttribute("optimize")]
+ [BooleanValidator()]
+ public bool Optimize {
+ get { return _optimize; }
+ set { _optimize = value; }
+ }
+
+ [BuildAttribute("warnlevel")]
+ [Int32Validator(0,4)] // limit values to 0-4
+ public int WarnLevel {
+ get { return _warnLevel; }
+ set { _warnLevel = value; }
+ }
+
+ [BuildElement("sources")]
+ public FileSet Sources {
+ get { return _sources; }
+ set { _sources = value; }
+ }
+
+ #endregion Public Instance Properties
+
+ #region Private Instance Fields
+
+ private string _out = null;
+ private bool _optimize = false;
+ private int _warnLevel = 4;
+ private FileSet _sources = new FileSet();
+
+ #endregion Private Instance Fields
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BuildAttributeAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.BuildAttributeAttribute"/> with the
+ specified name.
+ </summary>
+ <param name="name">The name of the attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildAttributeAttribute.Name">
+ <summary>
+ Gets or sets the name of the XML attribute.
+ </summary>
+ <value>
+ The name of the XML attribute.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildAttributeAttribute.Required">
+ <summary>
+ Gets or sets a value indicating whether the attribute is required.
+ </summary>
+ <value>
+ <see langword="true" /> if the attribute is required; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildAttributeAttribute.ExpandProperties">
+ <summary>
+ Gets or sets a value indicating whether property references should
+ be expanded.
+ </summary>
+ <value>
+ <see langword="true" /> if properties should be expanded; otherwise
+ <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildAttributeAttribute.ProcessXml">
+ <summary>
+ Used to specify how this attribute will be handled as the XML is
+ parsed and given to the element.
+ </summary>
+ <value>
+ <see langword="true" /> if XML should be processed; otherwise
+ <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.BuildElementArrayAttribute">
+ <summary>
+ Indicates that property should be treated as a XML arrayList
+ </summary>
+ <remarks>
+ <para>
+ Should only be applied to properties exposing strongly typed arrays or
+ strongly typed collections.
+ </para>
+ <para>
+ The XML format is like this:
+ <code>
+ <![CDATA[
+ <task>
+ <elementName ... />
+ <elementName ... />
+ <elementName ... />
+ <elementName ... />
+ </task>
+ ]]>
+ </code>
+ </para>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Attributes.BuildElementAttribute">
+ <summary>
+ Indicates that the property should be treated as an XML element and
+ further processing should be done.
+ </summary>
+ <remarks>
+ <para>
+ The XML format is like this:
+ <code>
+ <![CDATA[
+ <task>
+ <elementName ...>
+ <morestuff />
+ </elementName>
+ </task>
+ ]]>
+ </code>
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BuildElementAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.BuildElementAttribute"/> with the
+ specified name.
+ </summary>
+ <param name="name">The name of the attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildElementAttribute.Name">
+ <summary>
+ Gets or sets the name of the attribute.
+ </summary>
+ <value>
+ The name of the attribute.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildElementAttribute.Required">
+ <summary>
+ Gets or sets a value indicating whether the attribute is required.
+ </summary>
+ <value>
+ <see langword="true" /> if the attribute is required; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildElementAttribute.ProcessXml">
+ <summary>
+ Used to specify how this element will be handled as the XML is parsed
+ and given to the element.
+ </summary>
+ <value>
+ <see langword="true" /> if XML should be processed; otherwise
+ <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BuildElementArrayAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.BuildElementArrayAttribute"/>
+ with the specified name.
+ </summary>
+ <param name="name">The name of the attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildElementArrayAttribute.ElementType">
+ <summary>
+ Gets or sets the type of objects that this container holds.
+ </summary>
+ <value>
+ The type of the elements that this container holds.
+ </value>
+ <remarks>
+ <para>
+ This can be used for validation and schema generation.
+ </para>
+ <para>
+ If not specified, the type of the elements will be determined using
+ reflection.
+ </para>
+ </remarks>
+ <exception cref="T:System.ArgumentNullException"><paramref name="value"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Attributes.BuildElementCollectionAttribute">
+ <summary>
+ Indicates that the property should be treated as a container for a
+ collection of build elements.
+ </summary>
+ <remarks>
+ <para>
+ Should only be applied to properties exposing strongly typed arrays or
+ strongly typed collections.
+ </para>
+ <para>
+ The XML format is like this:
+ <code>
+ <![CDATA[
+ <task>
+ <collectionName>
+ <elementName ... />
+ <elementName ... />
+ <elementName ... />
+ <elementName ... />
+ </collectionName>
+ </task>
+ ]]>
+ </code>
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.BuildElementCollectionAttribute.#ctor(System.String,System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.BuildElementCollectionAttribute"/> with the
+ specified name and child element name.
+ </summary>
+ <param name="collectionName">The name of the collection.</param>
+ <param name="childName">The name of the child elements in the collection</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="childName"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="childName"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.BuildElementCollectionAttribute.ChildElementName">
+ <summary>
+ The name of the child element within the collection.
+ </summary>
+ <value>
+ The name to check for in the XML of the elements in the collection.
+ </value>
+ <remarks>
+ This can be used for validation and schema generation.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Attributes.DateTimeValidatorAttribute">
+ <summary>
+ Used to indicate that a property should be able to be converted into a
+ <see cref="T:System.DateTime"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.DateTimeValidatorAttribute.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.DateTimeValidatorAttribute"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.DateTimeValidatorAttribute.Validate(System.Object)">
+ <summary>
+ Checks if the specified value can be converted to a <see cref="T:System.DateTime"/>.
+ </summary>
+ <param name="value">The value to be checked.</param>
+ <exception cref="T:NAnt.Core.ValidationException"><paramref name="value"/> cannot be converted to a <see cref="T:System.DateTime"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Attributes.ElementNameAttribute">
+ <summary>
+ Indicates that class should be treated as a NAnt element.
+ </summary>
+ <remarks>
+ Attach this attribute to a subclass of Element to have NAnt be able
+ to recognize it. The name should be short but must not confict
+ with any other element already in use.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.ElementNameAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cre="ElementNameAttribute"/>
+ with the specified name.
+ </summary>
+ <param name="name">The name of the element.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.ElementNameAttribute.Name">
+ <summary>
+ Gets or sets the name of the element.
+ </summary>
+ <value>
+ The name of the element.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.FileSetAttribute">
+ <summary>
+ Indicates that a property should be treated as a XML file set for the
+ task.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.FileSetAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.FileSetAttribute"/> with the
+ specified name.
+ </summary>
+ <param name="name">The name of the attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Attributes.FrameworkConfigurableAttribute">
+ <summary>
+ Indicates that the value of the property to which the attribute is
+ assigned, can be configured on the framework-level in the NAnt application
+ configuration file.
+ </summary>
+ <example>
+ <para>
+ The following example shows a property of which the value can be
+ configured for a specific framework in the NAnt configuration file.
+ </para>
+ <code lang="C#">
+ [FrameworkConfigurable("exename", Required=true)]
+ public virtual string ExeName {
+ get { return _exeName; }
+ set { _exeName = value; }
+ }
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Attributes.FrameworkConfigurableAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.FrameworkConfigurableAttribute"/>
+ with the specified attribute name.
+ </summary>
+ <param name="name">The name of the framework configuration attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is a <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FrameworkConfigurableAttribute.Name">
+ <summary>
+ Gets or sets the name of the framework configuration attribute.
+ </summary>
+ <value>The name of the framework configuration attribute.</value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FrameworkConfigurableAttribute.Required">
+ <summary>
+ Gets or sets a value indicating whether the configuration attribute
+ is required.
+ </summary>
+ <value>
+ <see langword="true" /> if the configuration attribute is required;
+ otherwise, <see langword="true" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FrameworkConfigurableAttribute.ExpandProperties">
+ <summary>
+ Gets or sets a value indicating whether property references should
+ be expanded.
+ </summary>
+ <value>
+ <see langword="true" /> if properties should be expanded; otherwise
+ <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.FunctionAttribute">
+ <summary>
+ Indicates that the method should be exposed as a function in NAnt build
+ files.
+ </summary>
+ <remarks>
+ Attach this attribute to a method of a class that derives from
+ <see cref="T:NAnt.Core.FunctionSetBase"/> to have NAnt be able to recognize it.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.FunctionAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.FunctionAttribute"/>
+ class with the specified name.
+ </summary>
+ <param name="name">The name of the function.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FunctionAttribute.Name">
+ <summary>
+ Gets or sets the name of the function.
+ </summary>
+ <value>
+ The name of the function.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.FunctionSetAttribute">
+ <summary>
+ Indicates that class should be treated as a set of functions.
+ </summary>
+ <remarks>
+ Attach this attribute to a class that derives from <see cref="T:NAnt.Core.FunctionSetBase"/>
+ to have NAnt be able to recognize it as containing custom functions.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.FunctionSetAttribute.#ctor(System.String,System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.FunctionSetAttribute"/>
+ class with the specified name.
+ </summary>
+ <param name="prefix">The prefix used to distinguish the functions.</param>
+ <param name="category">The category of the functions.</param>
+ <exception cref="T:System.ArgumentNullException">
+ <para><paramref name="prefix"/> is <see langword="null"/>.</para>
+ <para>-or-</para>
+ <para><paramref name="category"/> is <see langword="null"/>.</para>
+ </exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">
+ <para><paramref name="prefix"/> is a zero-length <see cref="T:System.String"/>.</para>
+ <para>-or-</para>
+ <para><paramref name="category"/> is a zero-length <see cref="T:System.String"/>.</para>
+ </exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FunctionSetAttribute.Category">
+ <summary>
+ Gets or sets the category of the function set.
+ </summary>
+ <value>
+ The name of the category of the function set.
+ </value>
+ <remarks>
+ This will be displayed in the user docs.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Attributes.FunctionSetAttribute.Prefix">
+ <summary>
+ Gets or sets the prefix of all functions in this function set.
+ </summary>
+ <value>
+ The prefix of the functions in this function set.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.Int32ValidatorAttribute">
+ <summary>
+ Indicates that property should be able to be converted into a <see cref="T:System.Int32"/>
+ within the given range.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.Int32ValidatorAttribute.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.Int32ValidatorAttribute"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.Int32ValidatorAttribute.#ctor(System.Int32,System.Int32)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.Int32ValidatorAttribute"/>
+ class with the specied minimum and maximum values.
+ </summary>
+ <param name="minValue">The minimum value.</param>
+ <param name="maxValue">The maximum value.</param>
+ </member>
+ <member name="M:NAnt.Core.Attributes.Int32ValidatorAttribute.Validate(System.Object)">
+ <summary>
+ Checks whether the specified value can be converted to an <see cref="T:System.Int32"/>
+ and whether the value lies within the range defined by the <see cref="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MinValue"/>
+ and <see cref="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MaxValue"/> properties.
+ </summary>
+ <param name="value">The value to be checked.</param>
+ <exception cref="T:NAnt.Core.ValidationException">
+ <para>
+ <paramref name="value"/> cannot be converted to an <see cref="T:System.Int32"/>.
+ </para>
+ <para>-or-</para>
+ <para>
+ <paramref name="value"/> is not in the range defined by <see cref="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MinValue"/>
+ and <see cref="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MaxValue"/>.
+ </para>
+ </exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MinValue">
+ <summary>
+ Gets or sets the minimum value.
+ </summary>
+ <value>
+ The minimum value. The default is <see cref="F:System.Int32.MinValue"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.Int32ValidatorAttribute.MaxValue">
+ <summary>
+ Gets or sets the maximum value.
+ </summary>
+ <value>
+ The maximum value. The default is <see cref="F:System.Int32.MaxValue"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.Int32ValidatorAttribute.Base">
+ <summary>
+ The base of the number to validate, which must be 2, 8, 10, or 16.
+ </summary>
+ <value>
+ The base of the number to validate.
+ </value>
+ <remarks>
+ The default is 10.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Attributes.LocationType">
+ <summary>
+ Defines possible locations in which a task executable can be located.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Attributes.LocationType.FrameworkDir">
+ <summary>
+ Locates the task executable in the current Framework directory.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Attributes.LocationType.FrameworkSdkDir">
+ <summary>
+ Locates the task executable in the current Framework SDK directory.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Attributes.ProgramLocationAttribute">
+ <summary>
+ Indicates the location that a task executable can be located in.
+ </summary>
+ <remarks>
+ <para>
+ When applied to a task deriving from <see cref="T:NAnt.Core.Tasks.ExternalProgramBase"/>,
+ the program to execute will first be searched for in the designated
+ location.
+ </para>
+ <para>
+ If the program does not exist in that location, and the file name is
+ not an absolute path then the list of tool paths of the current
+ target framework will be searched (in the order in which they are
+ defined in the NAnt configuration file).
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.ProgramLocationAttribute.#ctor(NAnt.Core.Attributes.LocationType)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.ProgramLocationAttribute"/>
+ with the specified location.
+ </summary>
+ <param type="type">The <see cref="P:NAnt.Core.Attributes.ProgramLocationAttribute.LocationType"/> of the attribute.</param>
+ </member>
+ <member name="P:NAnt.Core.Attributes.ProgramLocationAttribute.LocationType">
+ <summary>
+ Gets or sets the <see cref="P:NAnt.Core.Attributes.ProgramLocationAttribute.LocationType"/> of the task.
+ </summary>
+ <value>
+ The location type of the task to which the attribute is assigned.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Attributes.StringValidatorAttribute">
+ <summary>
+ Used to indicate whether a <see cref="T:System.String"/> property should allow
+ an empty string value or not.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.StringValidatorAttribute.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.StringValidatorAttribute"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Attributes.StringValidatorAttribute.Validate(System.Object)">
+ <summary>
+ Checks if the specified value adheres to the rules defined by the
+ properties of the <see cref="T:NAnt.Core.Attributes.StringValidatorAttribute"/>.
+ </summary>
+ <param name="value">The value to be checked.</param>
+ <exception cref="T:NAnt.Core.ValidationException"><paramref name="value"/> is an empty string value and <see cref="P:NAnt.Core.Attributes.StringValidatorAttribute.AllowEmpty"/> is set to <see langword="false"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Attributes.StringValidatorAttribute.AllowEmpty">
+ <summary>
+ Gets or sets a value indicating whether an empty string or
+ <see langword="null" /> should be a considered a valid value.
+ </summary>
+ <value>
+ <see langword="true" /> if an empty string or <see langword="null" />
+ should be considered a valid value; otherwise, <see langword="false" />.
+ The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.StringValidatorAttribute.Expression">
+ <summary>
+ Gets or sets a regular expression. The string will be validated to
+ determine if it matches the expression.
+ </summary>
+ <value>
+ <see cref="N:System.Text.RegularExpressions"/>
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Attributes.StringValidatorAttribute.ExpressionErrorMessage">
+ <summary>
+ An optional error message that can be used to better describe the
+ regular expression error.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Attributes.TaskAttributeAttribute">
+ <summary>
+ Indicates that property should be treated as a XML attribute for the
+ task.
+ </summary>
+ <example>
+ Examples of how to specify task attributes
+ <code>
+ // task XmlType default is string
+ [TaskAttribute("out", Required=true)]
+ string _out = null; // assign default value here
+
+ [TaskAttribute("optimize")]
+ [BooleanValidator()]
+ // during ExecuteTask you can safely use Convert.ToBoolean(_optimize)
+ string _optimize = Boolean.FalseString;
+
+ [TaskAttribute("warnlevel")]
+ [Int32Validator(0,4)] // limit values to 0-4
+ // during ExecuteTask you can safely use Convert.ToInt32(_optimize)
+ string _warnlevel = "0";
+
+ [BuildElement("sources")]
+ FileSet _sources = new FileSet();
+ </code>
+ NOTE: Attribute values must be of type of string if you want
+ to be able to have macros. The field stores the exact value during
+ Initialize. Just before ExecuteTask is called NAnt will expand
+ all the macros with the current values.
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Attributes.TaskAttributeAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.TaskAttributeAttribute"/>
+ with the specified attribute name.
+ </summary>
+ <param name="name">The name of the task attribute.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is a <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Attributes.TaskNameAttribute">
+ <summary>
+ Indicates that class should be treated as a task.
+ </summary>
+ <remarks>
+ Attach this attribute to a subclass of Task to have NAnt be able
+ to recognize it. The name should be short but must not confict
+ with any other task already in use.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Attributes.TaskNameAttribute.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Attributes.TaskNameAttribute"/>
+ with the specified name.
+ </summary>
+ <param name="name">The name of the task.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="name"/> is a zero-length <see cref="T:System.String"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Element">
+ <summary>
+ Models a NAnt XML element in the build file.
+ </summary>
+ <remarks>
+ <para>
+ Automatically validates attributes in the element based on attributes
+ applied to members in derived classes.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Element"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Element.#ctor(NAnt.Core.Element)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Element"/> class
+ from the specified element.
+ </summary>
+ <param name="e">The element that should be used to create a new instance of the <see cref="T:NAnt.Core.Element"/> class.</param>
+ </member>
+ <member name="M:NAnt.Core.Element.Initialize(System.Xml.XmlNode)">
+ <summary>
+ Performs default initialization.
+ </summary>
+ <remarks>
+ Derived classes that wish to add custom initialization should override
+ the <see cref="M:Initialize()" /> method.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.GetLocation">
+ <summary>
+ Retrieves the location in the build file where the element is
+ defined.
+ </summary>
+ <returns>The element's build file location</returns>
+ </member>
+ <member name="M:NAnt.Core.Element.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to be logged.</param>
+ <remarks>
+ The actual logging is delegated to the project.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ The actual logging is delegated to the project.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.InitializeElement(System.Xml.XmlNode)">
+ <summary>
+ Derived classes should override to this method to provide extra
+ initialization and validation not covered by the base class.
+ </summary>
+ <param name="elementNode">The XML node of the element to use for initialization.</param>
+ </member>
+ <member name="M:NAnt.Core.Element.Initialize">
+ <summary>
+ Derived classes should override to this method to provide extra
+ initialization and validation not covered by the base class.
+ </summary>
+ <remarks>
+ Access to the <see cref="P:NAnt.Core.Element.XmlNode"/> that was used to initialize
+ this <see cref="T:NAnt.Core.Element"/> is available through <see cref="P:NAnt.Core.Element.XmlNode"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.CopyTo(NAnt.Core.Element)">
+ <summary>
+ Copies all instance data of the <see cref="T:NAnt.Core.Element"/> to a given
+ <see cref="T:NAnt.Core.Element"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Element.Initialize(System.Xml.XmlNode,NAnt.Core.PropertyDictionary,NAnt.Core.FrameworkInfo)">
+ <summary>
+ Performs initialization using the given set of properties.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Element.InitializeXml(System.Xml.XmlNode,NAnt.Core.PropertyDictionary,NAnt.Core.FrameworkInfo)">
+ <summary>
+ Initializes all build attributes and child elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Element.GetAttributeConfigurationNode(NAnt.Core.FrameworkInfo,System.String)">
+ <summary>
+ Locates the XML node for the specified attribute in the project
+ configuration node.
+ </summary>
+ <param name="attributeName">The name of attribute for which the XML configuration node should be located.</param>
+ <param name="framework">The framework to use to obtain framework specific information, or <see langword="null" /> if no framework specific information should be used.</param>
+ <returns>
+ The XML configuration node for the specified attribute, or
+ <see langword="null" /> if no corresponding XML node could be
+ located.
+ </returns>
+ <remarks>
+ If there's a valid current framework, the configuration section for
+ that framework will first be searched. If no corresponding
+ configuration node can be located in that section, the framework-neutral
+ section of the project configuration node will be searched.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Element.GetElementNameFromType(System.Type)">
+ <summary>
+ Returns the <see cref="P:NAnt.Core.Attributes.ElementNameAttribute.Name"/> of the
+ <see cref="T:NAnt.Core.Attributes.ElementNameAttribute"/> assigned to the specified
+ <see cref="T:System.Type"/>.
+ </summary>
+ <param name="type">The <see cref="T:System.Type"/> of which the assigned <see cref="P:NAnt.Core.Attributes.ElementNameAttribute.Name"/> should be retrieved.</param>
+ <returns>
+ The <see cref="P:NAnt.Core.Attributes.ElementNameAttribute.Name"/> assigned to the specified
+ <see cref="T:System.Type"/> or a null reference is no <see cref="P:NAnt.Core.Attributes.ElementNameAttribute.Name"/>
+ is assigned to the <paramref name="type"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Element.Parent">
+ <summary>
+ Gets or sets the parent of the element.
+ </summary>
+ <value>
+ The parent of the element.
+ </value>
+ <remarks>
+ This will be the parent <see cref="T:NAnt.Core.Task"/>, <see cref="T:NAnt.Core.Target"/>, or
+ <see cref="P:NAnt.Core.Element.Project"/> depending on where the element is defined.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Element.Name">
+ <summary>
+ Gets the name of the XML element used to initialize this element.
+ </summary>
+ <value>
+ The name of the XML element used to initialize this element.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Element.Project">
+ <summary>
+ Gets or sets the <see cref="P:NAnt.Core.Element.Project"/> to which this element belongs.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.Element.Project"/> to which this element belongs.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Element.Properties">
+ <summary>
+ Gets the properties local to this <see cref="T:NAnt.Core.Element"/> and the
+ <see cref="P:NAnt.Core.Element.Project"/>.
+ </summary>
+ <value>
+ The properties local to this <see cref="T:NAnt.Core.Element"/> and the <see cref="P:NAnt.Core.Element.Project"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Element.NamespaceManager">
+ <summary>
+ Gets or sets the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.Element.NamespaceManager"/> defines the current namespace
+ scope and provides methods for looking up namespace information.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Element.XmlNode">
+ <summary>
+ Gets or sets the XML node of the element.
+ </summary>
+ <value>
+ The XML node of the element.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Element.Location">
+ <summary>
+ Gets or sets the location in the build file where the element is
+ defined.
+ </summary>
+ <value>
+ The location in the build file where the element is defined.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Element.CustomXmlProcessing">
+ <summary>
+ Gets a value indicating whether the element is performing additional
+ processing using the <see cref="P:NAnt.Core.Element.XmlNode"/> that was used to
+ initialize the element.
+ </summary>
+ <value>
+ <see langword="false"/>.
+ </value>
+ <remarks>
+ <para>
+ Elements that need to perform additional processing of the
+ <see cref="P:NAnt.Core.Element.XmlNode"/> that was used to initialize the element, should
+ override this property and return <see langword="true"/>.
+ </para>
+ <para>
+ When <see langword="true"/>, no build errors will be reported for
+ unknown nested build elements.
+ </para>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Element.AttributeConfigurator">
+ <summary>
+ Configures an <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> using meta-data provided by
+ assigned attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Element.AttributeConfigurator.#ctor(NAnt.Core.Element,System.Xml.XmlNode,NAnt.Core.PropertyDictionary,NAnt.Core.FrameworkInfo)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Element.AttributeConfigurator"/>
+ class for the given <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/>.
+ </summary>
+ <param name="element">The <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> for which an <see cref="T:NAnt.Core.Element.AttributeConfigurator"/> should be created.</param>
+ <param name="elementNode">The <see cref="P:NAnt.Core.Element.XmlNode"/> to initialize the <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> with.</param>
+ <param name="properties">The <see cref="T:NAnt.Core.PropertyDictionary"/> to use for property expansion.</param>
+ <param name="targetFramework">The framework that the <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> should target.</param>
+ <exception cref="T:System.ArgumentNullException">
+ <para><paramref name="element"/> is <see langword="null"/>.</para>
+ <para>-or-</para>
+ <para><paramref name="elementNode"/> is <see langword="null"/>.</para>
+ <para>-or-</para>
+ <para><paramref name="properties"/> is <see langword="null"/>.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Element.AttributeConfigurator.CreateChildBuildElement(System.Reflection.PropertyInfo,System.Reflection.MethodInfo,System.Reflection.MethodInfo,System.Xml.XmlNode,NAnt.Core.PropertyDictionary,NAnt.Core.FrameworkInfo)">
+ <summary>
+ Creates a child <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> using property set/get methods.
+ </summary>
+ <param name="propInf">The <see cref="T:System.Reflection.PropertyInfo"/> instance that represents the property of the current class.</param>
+ <param name="getter">A <see cref="T:System.Reflection.MethodInfo"/> representing the get accessor for the property.</param>
+ <param name="setter">A <see cref="T:System.Reflection.MethodInfo"/> representing the set accessor for the property.</param>
+ <param name="xml">The <see cref="P:NAnt.Core.Element.XmlNode"/> used to initialize the new <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> instance.</param>
+ <param name="properties">The collection of property values to use for macro expansion.</param>
+ <param name="framework">The <see cref="T:NAnt.Core.FrameworkInfo"/> from which to obtain framework-specific information.</param>
+ <returns>The <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> child.</returns>
+ </member>
+ <member name="M:NAnt.Core.Element.AttributeConfigurator.CreateAttributeSetter(System.Type)">
+ <summary>
+ Creates an <see cref="T:NAnt.Core.Element.AttributeConfigurator.IAttributeSetter"/> for the given
+ <see cref="T:System.Type"/>.
+ </summary>
+ <param name="attributeType">The <see cref="T:System.Type"/> for which an <see cref="T:NAnt.Core.Element.AttributeConfigurator.IAttributeSetter"/> should be created.</param>
+ <returns>
+ An <see cref="T:NAnt.Core.Element.AttributeConfigurator.IAttributeSetter"/> for the given <see cref="T:System.Type"/>.
+ </returns>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._element">
+ <summary>
+ Holds the <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> that should be initialized.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._elementXml">
+ <summary>
+ Holds the <see cref="P:NAnt.Core.Element.XmlNode"/> that should be used to initialize
+ the <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/>.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._properties">
+ <summary>
+ Holds the dictionary that should be used for property
+ expansion.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._targetFramework">
+ <summary>
+ Holds the framework that should be targeted by the
+ <see cref="P:NAnt.Core.Element.AttributeConfigurator.Element"/> that we're configuring, or
+ <see langword="null"/> if there's no current target
+ framework.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._unprocessedAttributes">
+ <summary>
+ Holds the names of the attributes that still need to be
+ processed.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator._unprocessedChildNodes">
+ <summary>
+ Holds the names of the child nodes that still need to be
+ processed.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator.logger">
+ <summary>
+ Holds the logger for the current class.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Element.AttributeConfigurator.AttributeSetters">
+ <summary>
+ Holds the cache of <see cref="T:NAnt.Core.Element.AttributeConfigurator.IAttributeSetter"/> instances.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Element.AttributeConfigurator.NamespaceManager">
+ <summary>
+ Gets the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.Element.AttributeConfigurator.NamespaceManager"/> defines the current namespace
+ scope and provides methods for looking up namespace information.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Element.AttributeConfigurator.IAttributeSetter">
+ <summary>
+ Internal interface used for setting element attributes.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Configuration.DirList">
+ <summary>
+ Represents an explicitly named list of directories.
+ </summary>
+ <remarks>
+ A <see cref="T:NAnt.Core.Configuration.DirList"/> is useful when you want to capture a list of
+ directories regardless whether they currently exist.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Configuration.DirList.Directory">
+ <summary>
+ The base of the directory of this dirlist. The default is the project
+ base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Configuration.ManagedExecutionMode.Environment">
+ <summary>
+ Gets the collection of environment variables that should be passed
+ to external programs that are launched.
+ </summary>
+ <value>
+ <summary>
+ The collection of environment variables that should be passed
+ to external programs that are launched.
+ </summary>
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Configuration.RuntimeEngine.Arguments">
+ <summary>
+ The command-line arguments for the runtime engine.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Extensibility.ExtensionAssembly">
+ <summary>
+ Represents an <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/> in which one or more extensions
+ are found.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.ExtensionAssembly.#ctor(System.Reflection.Assembly)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/>
+ class for a given <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/>.
+ </summary>
+ <remarks>
+ The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> instance is not cached for
+ future use. If this is required, use <see cref="M:NAnt.Core.Extensibility.ExtensionAssembly.Create(System.Reflection.Assembly)"/>.
+ </remarks>
+ <param name="assembly">The <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/> for which to construct an <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/>.</param>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.ExtensionAssembly.Create(System.Reflection.Assembly)">
+ <summary>
+ Creates an <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the specified
+ <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/> and caches it for future use.
+ </summary>
+ <remarks>
+ If an <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the same assembly is
+ available in the cache, then this cached instance is returned.
+ </remarks>
+ <param name="assembly">The <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/> for which to construct an <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/>.</param>
+ <returns>
+ The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the specified <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.Extensibility.ExtensionAssembly.Assembly"/> containing extensions.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.ExtensionBuilder.#ctor(NAnt.Core.Extensibility.ExtensionAssembly)">
+ <summary>
+ Initializes a instance of the <see cref="T:NAnt.Core.Extensibility.ExtensionBuilder"/>
+ class for an extension in a given <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.ExtensionAssembly"/>.
+ </summary>
+ <param name="extensionAssembly">The <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.ExtensionAssembly"/> in which the extension is found.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="extensionAssembly"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.ExtensionBuilder.#ctor(System.Reflection.Assembly)">
+ <summary>
+ Initializes a instance of the <see cref="T:NAnt.Core.Extensibility.ExtensionBuilder"/>
+ class for an extension in a given <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.Assembly"/>.
+ </summary>
+ <param name="assembly">The <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.Assembly"/> in which the extension is found.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="assembly"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="P:NAnt.Core.Extensibility.ExtensionBuilder.ExtensionAssembly">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.ExtensionAssembly"/> in which the extension
+ was found.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Extensibility.ExtensionBuilder.Assembly">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.Assembly"/> from which the extension will
+ be created.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.Extensibility.ExtensionBuilder.Assembly"/> containing the extension.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.PluginConsumerAttribute.#ctor(System.Type)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Extensibility.PluginConsumerAttribute"/>
+ with the specified type.
+ </summary>
+ <param name="type">The type of the <see cref="T:NAnt.Core.Extensibility.IPlugin"/> to consume.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="type"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Extensibility.PluginScanner">
+ <summary>
+ Responsible for scanning types for plugins, and maintaining a cache of
+ <see cref="T:NAnt.Core.Extensibility.PluginBuilder"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.PluginScanner.ScanTypeForPlugins(NAnt.Core.Extensibility.ExtensionAssembly,System.Type,NAnt.Core.Task)">
+ <summary>
+ Scans a given <see cref="T:System.Type"/> for plugins.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:System.Type"/> to scan.</param>
+ <param name="type">The <see cref="T:System.Type"/> to scan.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="type"/> represents a
+ <see cref="T:NAnt.Core.Extensibility.IPlugin"/>; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Extensibility.PluginScanner.RegisterPlugins(NAnt.Core.Extensibility.IPluginConsumer)">
+ <summary>
+ Registers matching plugins for the specified <see cref="T:NAnt.Core.Extensibility.IPluginConsumer"/>.
+ </summary>
+ <param name="consumer">The <see cref="T:NAnt.Core.Extensibility.IPluginConsumer"/> which plugins must be registered for.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="consumer"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="T:NAnt.Core.Filters.ChainableReader">
+ <summary>
+ Functions as a chainable TextReader
+ </summary>
+ <remarks>
+ Implements a abstraction over a TextReader that allows the class to represent
+ either a TextReader or another ChainableReader to which it is chained.
+
+ By passing a ChainableReader as a constructor paramater it is possiable to
+ chain many ChainableReaders together. The last ChainableReader in the chain must
+ be based on a TextReader.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Chain(NAnt.Core.Filters.ChainableReader)">
+ <summary>
+ Makes it so all calls to Read and Peek are passed the ChainableReader
+ passed as a parameter.
+ </summary>
+ <param name="parentChainedReader">ChainableReader to forward calls to</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Chain(System.IO.TextReader)">
+ <summary>
+ Makes it so all calls to Read and Peek are passed the TextReader
+ passed as a parameter.
+ </summary>
+ <param name="baseReader">TextReader to forward calls to</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Peek">
+ <summary>
+ Forwards Peek calls to the TextReader or ChainableReader passed in the corresponding constructor.
+ </summary>
+ <returns>Character or -1 if end of stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Read">
+ <summary>
+ Forwards Read calls to the TextReader or ChainableReader passed in the corresponding constructor.
+ </summary>
+ <returns>
+ Character or -1 if end of stream.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Close">
+ <summary>
+ Closes the reader.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.ChainableReader.Dispose">
+ <summary>
+ Calls close and supresses the finalizer for the object.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ChainableReader.Base">
+ <summary>
+ Gets a value indicating if the reader is backed by a stream in the
+ chain.
+ </summary>
+ <value>
+ <see langword="true" /> if the reader is backed by a stream;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Filters.Filter">
+ <summary>
+ Allows a file's content to be modified while performing an operation.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.Filter.InitializeFilter">
+ <summary>
+ Called after construction and after properties are set. Allows
+ for filter initialization.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.Filter.IfDefined">
+ <summary>
+ If <see langword="true" /> then the filter will be used; otherwise,
+ skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.Filter.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Filters.Filter.IfDefined"/>. If <see langword="false"/>
+ then the filter will be executed; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilder.#ctor(System.Reflection.Assembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> class
+ for the specified <see cref="T:NAnt.Core.Filters.Filter"/> class in the specified
+ <see cref="T:System.Reflection.Assembly"/>.
+ </summary>
+ <remarks>
+ An <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the specified <see cref="T:System.Reflection.Assembly"/>
+ is cached for future use.
+ </remarks>
+ <param name="assembly">The <see cref="T:System.Reflection.Assembly"/> containing the <see cref="T:NAnt.Core.Filters.Filter"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.Filters.Filter"/>.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilder.#ctor(NAnt.Core.Extensibility.ExtensionAssembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> class
+ for the specified <see cref="T:NAnt.Core.Filters.Filter"/> class in the specified
+ <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/>.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:NAnt.Core.Filters.Filter"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.Filters.Filter"/>.</param>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterBuilder.ClassName">
+ <summary>
+ Gets the name of the <see cref="T:NAnt.Core.Filters.Filter"/> class that can be created
+ using this <see cref="T:NAnt.Core.Filters.FilterBuilder"/>.
+ </summary>
+ <value>
+ The name of the <see cref="T:NAnt.Core.Filters.Filter"/> class that can be created using
+ this <see cref="T:NAnt.Core.Filters.FilterBuilder"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterBuilder.FilterName">
+ <summary>
+ Gets the name of the filter which the <see cref="T:NAnt.Core.Filters.FilterBuilder"/>
+ can create.
+ </summary>
+ <value>
+ The name of the task which the <see cref="T:NAnt.Core.TaskBuilder"/> can
+ create.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterBuilderCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.Core.Filters.FilterBuilder"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.#ctor(NAnt.Core.Filters.FilterBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.#ctor(NAnt.Core.Filters.FilterBuilder[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Filters.FilterBuilder"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.Add(NAnt.Core.Filters.FilterBuilder)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.FilterBuilder"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.AddRange(NAnt.Core.Filters.FilterBuilder[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Filters.FilterBuilder"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.AddRange(NAnt.Core.Filters.FilterBuilderCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.Contains(NAnt.Core.Filters.FilterBuilder)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.FilterBuilder"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> for the specified
+ task is in the collection.
+ </summary>
+ <param name="taskName">The name of task for which the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> should be located in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> for
+ the specified task is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.CopyTo(NAnt.Core.Filters.FilterBuilder[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.IndexOf(NAnt.Core.Filters.FilterBuilder)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Filters.FilterBuilder"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.FilterBuilder"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Filters.FilterBuilder"/>. If the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.Insert(System.Int32,NAnt.Core.Filters.FilterBuilder)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Filters.FilterBuilder"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.FilterBuilder"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Filters.FilterBuilderEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderCollection.Remove(NAnt.Core.Filters.FilterBuilder)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.FilterBuilder"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterBuilderCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterBuilderCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> for the specified task.
+ </summary>
+ <param name="filterName">The name of the filter for which the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> should be located in the collection.</param>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterBuilderEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Filters.FilterBuilder"/> elements of a <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderEnumerator.#ctor(NAnt.Core.Filters.FilterBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterBuilderEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Filters.FilterBuilderCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterBuilderEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterBuilderEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterChain">
+ <summary>
+ Represent a chain of NAnt filters that can be applied to a <see cref="T:NAnt.Core.Task"/>.
+ </summary>
+ <remarks>
+ <para>
+ A FilterChain represents a collection of one or more filters that can
+ be appled to a <see cref="T:NAnt.Core.Task"/> such as the <see cref="T:NAnt.Core.Tasks.CopyTask"/>.
+ In the case of the <see cref="T:NAnt.Core.Tasks.CopyTask"/>, the contents of the copied
+ files are filtered through each filter specified in the filter chain.
+ Filtering occurs in the order the filters are specified with filtered
+ output of one filter feeding into another.
+ </para>
+ <para>
+ :--------:--->:----------:--->:----------: ... :----------:--->:--------:<br/>
+ :.Source.:--->:.Filter 1.:--->:.Filter 2.: ... :.Filter n.:--->:.target.:<br/>
+ :--------:--->:----------:--->:----------: ... :----------:--->:--------:<br/>
+ </para>
+ <para>
+ A list of all filters that come with NAnt is available <see href="../filters/index.html">here</see>.
+ </para>
+ <para>
+ The following tasks support filtering with a FilterChain:
+ </para>
+ <list type="bullet">
+ <item>
+ <description><see cref="T:NAnt.Core.Tasks.CopyTask"/></description>
+ </item>
+ <item>
+ <description><see cref="T:NAnt.Core.Tasks.MoveTask"/></description>
+ </item>
+ </list>
+ </remarks>
+ <example>
+ <para>
+ Replace all occurrences of @NOW@ with the current date/time and
+ replace tabs with spaces in all copied files.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="NOW" value="${datetime::now()}" />
+ <copy todir="out">
+ <fileset basedir="in">
+ <include name="**/*" />
+ </fileset>
+ <filterchain>
+ <replacetokens>
+ <token key="NOW" value="${TODAY}" />
+ </replacetokens>
+ <tabstospaces />
+ </filterchain>
+ </copy>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.DataTypeBase">
+ <summary>
+ Provides the abstract base class for types.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBase.Reset">
+ <summary>
+ Should be overridden by derived classes. clones the referenced types
+ data into the current instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBase.CopyTo(NAnt.Core.DataTypeBase)">
+ <summary>
+ Copies all instance data of the <see cref="T:NAnt.Core.DataTypeBase"/> to a given
+ <see cref="T:NAnt.Core.DataTypeBase"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBase.ID">
+ <summary>
+ The ID used to be referenced later.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBase.RefID">
+ <summary>
+ The ID to use as the reference.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBase.CanBeReferenced">
+ <summary>
+ Gets a value indicating whether a reference to the type can be
+ defined.
+ </summary>
+ <remarks>
+ Only types with an <see cref="T:NAnt.Core.Attributes.ElementNameAttribute"/> assigned
+ to it, can be referenced.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBase.Name">
+ <summary>
+ Gets the name of the datatype.
+ </summary>
+ <value>
+ The name of the datatype.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterChain.InitializeXml(System.Xml.XmlNode,NAnt.Core.PropertyDictionary,NAnt.Core.FrameworkInfo)">
+ <summary>
+ Initializes all build attributes and child elements.
+ </summary>
+ <remarks>
+ <see cref="T:NAnt.Core.Filters.FilterChain"/> needs to maintain the order in which the
+ filters are specified in the build file.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterChain.GetBaseFilter(NAnt.Core.Filters.PhysicalTextReader)">
+ <summary>
+ Used to to instantiate and return the chain of stream based filters.
+ </summary>
+ <param name="physicalTextReader">The <see cref="T:NAnt.Core.Filters.PhysicalTextReader"/> that is the source of input to the filter chain.</param>
+ <remarks>
+ The <paramref name="physicalTextReader"/> is the first <see cref="T:NAnt.Core.Filters.Filter"/>
+ in the chain, which is based on a physical stream that feeds the chain.
+ </remarks>
+ <returns>
+ The last <see cref="T:NAnt.Core.Filters.Filter"/> in the chain.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterChain.IsNullOrEmpty(NAnt.Core.Filters.FilterChain)">
+ <summary>
+ Determines whether a given FilterChain is null or empty.
+ </summary>
+ <returns>
+ <c>true</c> if <paramref name="filterChain"/> is null or empty;
+ otherwise, <c>false</c>.
+ </returns>
+ <param name='filterChain'>
+ The FilterChain to check.
+ </param>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterChain.Filters">
+ <summary>
+ The filters to apply.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterChain.InputEncoding">
+ <summary>
+ The encoding to assume when filter-copying files. The default is
+ system's current ANSI code page.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterChain.FilterChainConfigurator">
+ <summary>
+ Configurator that initializes filters in the order in which they've
+ been specified in the build file.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Filters.Filter"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.#ctor(NAnt.Core.Filters.FilterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Filters.FilterCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.#ctor(NAnt.Core.Filters.Filter[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Filters.Filter"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.Add(NAnt.Core.Filters.Filter)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Filters.Filter"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.Filter"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.AddRange(NAnt.Core.Filters.Filter[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Filters.Filter"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Filters.Filter"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.AddRange(NAnt.Core.Filters.FilterCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Filters.FilterCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Filters.FilterCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.Contains(NAnt.Core.Filters.Filter)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Filters.Filter"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.Filter"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.CopyTo(NAnt.Core.Filters.Filter[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.IndexOf(NAnt.Core.Filters.Filter)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Filters.Filter"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.Filter"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Filters.Filter"/>. If the <see cref="T:NAnt.Core.Filters.Filter"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.Insert(System.Int32,NAnt.Core.Filters.Filter)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Filters.Filter"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.Filter"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Filters.FilterEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterCollection.Remove(NAnt.Core.Filters.Filter)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Filters.Filter"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.Core.Filters.FilterEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Filters.Filter"/> elements of a <see cref="T:NAnt.Core.Filters.FilterCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterEnumerator.#ctor(NAnt.Core.Filters.FilterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Filters.FilterEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Filters.FilterCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.FilterEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.FilterEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Filters.PhysicalTextReader">
+ <summary>
+ Represents a physical <see cref="T:System.IO.TextReader"/>. That is a reader based
+ on a stream.
+ </summary>
+ <remarks>
+ Used by <see cref="T:NAnt.Core.Filters.ChainableReader"/> to represent a <see cref="T:NAnt.Core.Filters.Filter"/>
+ based on a <see cref="T:System.IO.TextReader"/> in the chain.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Filters.ExpandProperties">
+ <summary>
+ Parses NAnt properties and expressions
+ </summary>
+ <remarks>
+ <para>
+ This filter parses any NAnt properties or expressions found in its input,
+ inlining their values in its output.
+ </para>
+ <para>
+ Note: Due to limitations on buffering, expressions longer than 2048
+ characters are not guaranteed to be expanded.
+ </para>
+ Filters are intended to be used as a element of a <see cref="T:NAnt.Core.Filters.FilterChain"/>.
+ </remarks>
+ <example>
+ <para>Replace all properties with their corresponding values.</para>
+ <code>
+ <![CDATA[
+ <expandproperties />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.Core.Filters.ExpandProperties._buffer">
+ <summary>
+ Holds data for expression expansion between input and output.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.ExpandProperties.InitializeFilter">
+ <summary>
+ Called after construction and after properties are set. Allows
+ for filter initialization.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.ExpandProperties.Read">
+ <summary>
+ Reads the next character applying the filter logic.
+ </summary>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ExpandProperties.Peek">
+ <summary>
+ Reads the next character applying the filter logic without advancing the current position in the stream.
+ </summary>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ExpandProperties.Advance">
+ <summary>
+ Moves to the next character.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.ExpandProperties.ReplenishBuffer">
+ <summary>
+ Refills the buffer, running our input through
+ <see cref="M:PropertyDictionary.ExpandProperties(string, Location)" />.)
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ExpandProperties.AtEnd">
+ <summary>
+ Determines whether we've passed the end of our data.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.ReplaceString">
+ <summary>
+ Replaces all occurrences of a given string in the original input with
+ user-supplied replacement string.
+ </summary>
+ <remarks>
+ <para>
+ This filter replaces all occurrences of a given string in the original
+ input stream with a user-supplied replacement string. By default string
+ comparisons are case sensitive but this can be changed by setting the
+ optional <see cref="P:NAnt.Core.Filters.ReplaceString.IgnoreCase"/> attribute to <see langword="true"/>.
+ </para>
+ <para>
+ To use this filter specify the string to be replaced with the
+ <see cref="P:NAnt.Core.Filters.ReplaceString.From"/> attribute and the string to replace it with using the
+ <see cref="P:NAnt.Core.Filters.ReplaceString.To"/> attribute.
+ </para>
+ <para>
+ Filters are intended to be used as a element of a <see cref="T:NAnt.Core.Filters.FilterChain"/>.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Replace all occurrences of "3.14" with "PI".
+ </para>
+ <code>
+ <![CDATA[
+ <replacestring from="3.14" to="PI" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Replace all occurrences of "string", "String", etc. with "System.String".
+ </para>
+ <code>
+ <![CDATA[
+ <replacestring from="String" to="System.String" ignorecase="true" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.Chain(NAnt.Core.Filters.ChainableReader)">
+ <summary>
+ Construct that allows this filter to be chained to the one
+ in the parameter chainedReader.
+ </summary>
+ <param name="chainedReader">Filter that the filter will be chained to</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.Read">
+ <summary>
+ Reads the next character applying the filter logic.
+ </summary>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.Peek">
+ <summary>
+ Reads the next character applying the filter logic without
+ advancing the current position in the stream.
+
+ Peek currently is not supported.
+ </summary>
+ <returns>
+ Char as an int or -1 if at the end of the stream.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.FindString(System.Int32,System.Boolean@,System.String@)">
+ <summary>
+ <para>
+ Helper function used to search for the filter's traget string. If the string
+ is found the result is true. If the string was not found false is returned and
+ nonMatchingChars contains the characters that were read to determine if the
+ string is present.
+ </para>
+
+ <para>
+ It is assumed the stream is positioned at the character after the first character
+ in the target string.
+ </para>
+ </summary>
+ <param name="startChar">First character in target string</param>
+ <param name="streamEnded">Ture if the stream ended while search for the string.</param>
+ <param name="nonMatchingChars">Characters that were read while searching for the string.</param>
+ <returns></returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.GetNextCharacter(NAnt.Core.Filters.ReplaceString.AcquireCharDelegate)">
+ <summary>
+ Returns the next character in the stream replacing the specified character. Using the
+ <see cref="T:NAnt.Core.Filters.ReplaceString.AcquireCharDelegate"/> allows for the same implementation for Read and Peek
+ </summary>
+ <param name="AcquireChar">Delegate to acquire the next character. (Read/Peek)</param>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceString.CompareCharacters(System.Int32,System.Int32)">
+ <summary>
+ Compares to characters taking into account the _ignoreCase flag.
+ </summary>
+ <param name="char1"></param>
+ <param name="char2"></param>
+ <returns></returns>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceString.From">
+ <summary>
+ The string to be replaced.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceString.To">
+ <summary>
+ The new value for the replaced string.
+ Am empty string is permissible.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceString.IgnoreCase">
+ <summary>
+ Determines if case will be ignored.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.ReplaceString.AcquireCharDelegate">
+ <summary>
+ Delegate for Read and Peek. Allows the same implementation
+ to be used for both methods.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.ReplaceTokens">
+ <summary>
+ Replaces tokens in the original input with user-supplied values.
+ </summary>
+ <remarks>
+ <para>
+ This filter replaces all token surrounded by a beginning and ending
+ token. The default beginning and ending tokens both default to '@'. The
+ optional <see cref="P:NAnt.Core.Filters.ReplaceTokens.BeginToken"/> and <see cref="P:NAnt.Core.Filters.ReplaceTokens.EndToken"/> attributes
+ can be specified to change either token. By default string
+ comparisons are case sensitive but this can be changed by setting the
+ optional <see cref="P:NAnt.Core.Filters.ReplaceTokens.IgnoreCase"/> attribute to <see langword="true"/>.
+ </para>
+ <para>
+ Tokens are specified by using the <see cref="T:NAnt.Core.Types.Token"/> element. It is
+ possible to specify from 1 to n tokens and replacement values. Values can
+ be any valid NAnt expression.
+ </para>
+ <para>
+ Filters are intended to be used as a element of a <see cref="T:NAnt.Core.Filters.FilterChain"/>.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Replace all occurrences of the string @DATE@ with the value of property
+ "TODAY".
+ </para>
+ <code>
+ <![CDATA[
+ <replacetokens>
+ <token key="DATE" value="${TODAY}" />
+ </replacetokens>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Replace all occurrences of the string <DATE> with the value of
+ property "TODAY".
+ </para>
+ <code>
+ <![CDATA[
+ <replacetokens begintoken="<" endtoken=">">
+ <token key="DATE" value="${TODAY}" />
+ </replacetokens>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.Chain(NAnt.Core.Filters.ChainableReader)">
+ <summary>
+ Construct that allows this filter to be chained to the one
+ in the parameter chainedReader.
+ </summary>
+ <param name="chainedReader">Filter that the filter will be chained to</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.Read">
+ <summary>
+ Reads the next character applying the filter logic.
+ </summary>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.Peek">
+ <summary>
+ Reads the next character applying the filter logic without
+ advancing the current position in the stream.
+
+ Peek currently is not supported.
+ </summary>
+ <returns>
+ Char as an int or -1 if at the end of the stream.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.Initialize">
+ <summary>
+ Initialize the filter by setting its parameters.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.FindTokenContents(System.Boolean@,System.Boolean@,System.Boolean@)">
+ <summary>
+ Finds a token give that we are positioned at a beginning token character. Either a
+ token replacement is returned or the characters that were read looking for the token.
+ </summary>
+ <param name="tokenNotFound">A token was not found</param>
+ <param name="unknownToken">A token was found by there is no replacement</param>
+ <param name="streamEnded">The stream ended while looking for the token</param>
+ <returns>Either the replacement token or the characters that were read looking for the token</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.GetNextCharacter(NAnt.Core.Filters.ReplaceTokens.AcquireCharDelegate)">
+ <summary>
+ Returns the next character in the stream replacing the specified character. Using the
+ <see cref="T:NAnt.Core.Filters.ReplaceTokens.AcquireCharDelegate"/> allows for the same implementation for Read and Peek
+ </summary>
+ <param name="AcquireChar">Delegate to acquire the next character. (Read/Peek)</param>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.ReplaceTokens.CompareCharacters(System.Int32,System.Int32)">
+ <summary>
+ Compares to characters taking <see cref="P:NAnt.Core.Filters.ReplaceTokens.IgnoreCase"/> into account.
+ </summary>
+ <param name="char1"></param>
+ <param name="char2"></param>
+ <returns>
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceTokens.BeginToken">
+ <summary>
+ Marks the beginning of a token. The default is "@".
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceTokens.EndToken">
+ <summary>
+ Marks the end of a token. The default is "@".
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceTokens.Tokens">
+ <summary>
+ Tokens and replacement values.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Filters.ReplaceTokens.IgnoreCase">
+ <summary>
+ Determines if case will be ignored.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.ReplaceTokens.AcquireCharDelegate">
+ <summary>
+ Delegate for Read and Peek. Allows the same implementation
+ to be used for both methods.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.TabsToSpaces">
+ <summary>
+ Converts tabs to spaces.
+ </summary>
+ <remarks>
+ <para>
+ The <see cref="T:NAnt.Core.Filters.TabsToSpaces"/> filter replaces tabs in a text file
+ with spaces.
+ </para>
+ <para>
+ Filters are intended to be used as a element of a <see cref="T:NAnt.Core.Filters.FilterChain"/>.
+ </para>
+ </remarks>
+ <example>
+ <para>Replace all tabs with four spaces.</para>
+ <code>
+ <![CDATA[
+ <tabtospaces tablength="4" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Filters.TabsToSpaces.Chain(NAnt.Core.Filters.ChainableReader)">
+ <summary>
+ Construct that allows this filter to be chained to the one
+ in the parameter chainedReader.
+ </summary>
+ <param name="chainedReader">Filter that the filter will be chained to</param>
+ </member>
+ <member name="M:NAnt.Core.Filters.TabsToSpaces.Peek">
+ <summary>
+ <para>Retrieves the next character with moving the position in the stream.</para>
+ <note>This method is not implemented</note>
+ </summary>
+ <returns>-1 if end of stream otherwise a character</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.TabsToSpaces.Read">
+ <summary>
+ <para>Retrieves the next character in the stream.</para>
+ </summary>
+ <returns>-1 if end of stream otherwise a character</returns>
+ </member>
+ <member name="M:NAnt.Core.Filters.TabsToSpaces.GetNextCharacter(NAnt.Core.Filters.TabsToSpaces.AcquireCharDelegate)">
+ <summary>
+ Returns the next character in the stream replacing the specified character. Using the
+ <see cref="T:NAnt.Core.Filters.TabsToSpaces.AcquireCharDelegate"/> allows for the same implementation for Read and Peek
+ </summary>
+ <param name="AcquireChar">Delegate to acquire the next character. (Read/Peek)</param>
+ <returns>Char as an int or -1 if at the end of the stream</returns>
+ </member>
+ <member name="P:NAnt.Core.Filters.TabsToSpaces.TabLength">
+ <summary>
+ The number of spaces used when converting a tab. The default is
+ "8".
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Filters.TabsToSpaces.AcquireCharDelegate">
+ <summary>
+ Delegate for Read and Peek. Allows the same implementation
+ to be used for both methods.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Functions.AssemblyFunctions">
+ <summary>
+ Functions to return information for a given assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.FunctionSetBase.Project">
+ <summary>
+ Gets or sets the <see cref="P:NAnt.Core.FunctionSetBase.Project"/> that this functionset will
+ reference.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.FunctionSetBase.Project"/> that this functionset will reference.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyFunctions.LoadFromFile(System.String)">
+ <summary>
+ Loads an assembly given its file name or path.
+ </summary>
+ <param name="assemblyFile">The name or path of the file that contains the manifest of the assembly.</param>
+ <returns>
+ The loaded assembly.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="assemblyFile"/> is an empty <see cref="T:System.String"/>.</exception>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="assemblyFile"/> is not found, or the module you are trying to load does not specify a filename extension.</exception>
+ <exception cref="T:System.BadImageFormatException"><paramref name="assemblyFile"/> is not a valid assembly.</exception>
+ <exception cref="T:System.IO.PathTooLongException">An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyFunctions.Load(System.String)">
+ <summary>
+ Loads an assembly given the long form of its name.
+ </summary>
+ <param name="assemblyString">The long form of the assembly name.</param>
+ <returns>
+ The loaded assembly.
+ </returns>
+ <exception cref="T:System.ArgumentNullException"><paramref name="assemblyString"/> is a <see langword="null"/>.</exception>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="assemblyString"/> is not found.</exception>
+ <example>
+ <para>
+ Determine the location of the Microsoft Access 11 Primary Interop
+ Assembly by loading it using its fully qualified name, and copy it
+ to the build directory.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="access.pia.path" value="${assembly::get-location(assembly::load('Microsoft.Office.Interop.Access, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'))}" />
+ <copy file="${access.pia.path}" todir="${build.dir}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyFunctions.GetFullName(System.Reflection.Assembly)">
+ <summary>
+ Gets the full name of the assembly, also known as the display name.
+ </summary>
+ <param name="assembly">The assembly to get the full name for.</param>
+ <returns>
+ The full name of the assembly, also known as the display name.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)">
+ <summary>
+ Gets an <see cref="T:System.Reflection.AssemblyName"/> for the specified assembly.
+ </summary>
+ <param name="assembly">The assembly to get an <see cref="T:System.Reflection.AssemblyName"/> for.</param>
+ <returns>
+ An <see cref="T:System.Reflection.AssemblyName"/> for the specified assembly.
+ </returns>
+ <seealso cref="T:NAnt.Core.Functions.AssemblyNameFunctions"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyFunctions.GetLocation(System.Reflection.Assembly)">
+ <summary>
+ Gets the physical location, in codebase format, of the loaded file
+ that contains the manifest.
+ </summary>
+ <param name="assembly">The assembly to get the location for.</param>
+ <returns>
+ The location of the specified assembly.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Functions.AssemblyNameFunctions">
+ <summary>
+ Functions that return information about an assembly's identity.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetCodeBase(System.Reflection.AssemblyName)">
+ <summary>
+ Gets the location of the assembly as a URL.
+ </summary>
+ <param name="assemblyName">The <see cref="T:System.Reflection.AssemblyName"/> of the assembly.</param>
+ <returns>
+ The location of the assembly as a URL.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetEscapedCodeBase(System.Reflection.AssemblyName)">
+ <summary>
+ Gets the URI, including escape characters, that represents the codebase.
+ </summary>
+ <param name="assemblyName">The <see cref="T:System.Reflection.AssemblyName"/> of the assembly.</param>
+ <returns>
+ The URI, including escape characters, that represents the codebase.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetFullName(System.Reflection.AssemblyName)">
+ <summary>
+ Gets the full name of the assembly, also known as the display name.
+ </summary>
+ <param name="assemblyName">The <see cref="T:System.Reflection.AssemblyName"/> of the assembly.</param>
+ <returns>
+ The full name of the assembly, also known as the display name.
+ </returns>
+ <example>
+ <para>
+ Output the full name of the <c>nunit.framework</c> assembly to the
+ build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="${assemblyname::get-full-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+ ]]>
+ </code>
+ </example>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetName(System.Reflection.AssemblyName)">
+ <summary>
+ Gets the simple, unencrypted name of the assembly.
+ </summary>
+ <param name="assemblyName">The <see cref="T:System.Reflection.AssemblyName"/> of the assembly.</param>
+ <returns>
+ The simple, unencrypted name of the assembly.
+ </returns>
+ <example>
+ <para>
+ Output the simple name of the <c>nunit.framework</c> assembly to
+ the build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="${assemblyname::get-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+ ]]>
+ </code>
+ </example>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)">
+ <summary>
+ Gets the version of the assembly.
+ </summary>
+ <param name="assemblyName">The <see cref="T:System.Reflection.AssemblyName"/> of the assembly.</param>
+ <returns>
+ The version of the assembly.
+ </returns>
+ <example>
+ <para>
+ Output the major version of the <c>nunit.framework</c> assembly
+ to the build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="${version::get-major-version(assemblyname::get-version(assemblyname::get-assembly-name('nunit.framework.dll')))}" />
+ ]]>
+ </code>
+ </example>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyFunctions.GetName(System.Reflection.Assembly)"/>
+ <seealso cref="T:NAnt.Core.Functions.VersionFunctions"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.AssemblyNameFunctions.GetAssemblyName(System.String)">
+ <summary>
+ Gets the <see cref="T:System.Reflection.AssemblyName"/> for a given file.
+ </summary>
+ <param name="assemblyFile">The assembly file for which to get the <see cref="T:System.Reflection.AssemblyName"/>.</param>
+ <returns>
+ An <see cref="T:System.Reflection.AssemblyName"/> object representing the given file.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="assemblyFile"/> is an empty <see cref="T:System.String"/>.</exception>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="assemblyFile"/> does not exist.</exception>
+ <exception cref="T:System.BadImageFormatException"><paramref name="assemblyFile"/> is not a valid assembly.</exception>
+ <remarks>
+ The assembly is not added to this domain.
+ </remarks>
+ <example>
+ <para>
+ Output the full name of the <c>nunit.framework</c> assembly to the
+ build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="${assemblyname::get-full-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.BooleanConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a logical value to
+ its <see cref="T:System.Boolean"/> equivalent.
+ </summary>
+ <param name="s">A string containing the value to convert.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="s"/> is equivalent to
+ "True"; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> is not equivalent to <see cref="F:System.Boolean.TrueString"/> or <see cref="F:System.Boolean.FalseString"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.BooleanConversionFunctions.ToString(System.Boolean)">
+ <summary>
+ Converts the specified <see cref="T:System.Boolean"/> to its equivalent string
+ representation.
+ </summary>
+ <param name="value">A <see cref="T:System.Boolean"/> to convert.</param>
+ <returns>
+ "True" if <paramref name="value"/> is <see langword="true"/>, or
+ "False" if <paramref name="value"/> is <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ConversionFunctions.ToInt(System.Int32)">
+ <summary>
+ Converts the argument to an integer.
+ </summary>
+ <param name="value">value to be converted</param>
+ <returns><paramref name="value" /> converted to integer. The function fails with an exception when the conversion is not possible.</returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ConversionFunctions.ToDouble(System.Double)">
+ <summary>
+ Converts the argument to double
+ </summary>
+ <param name="value">The value to be converted.</param>
+ <returns><paramref name="value" /> converted to double. The function fails with an exception when the conversion is not possible.</returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ConversionFunctions.ConvertToString(System.String)">
+ <summary>
+ Converts the argument to a string.
+ </summary>
+ <param name="value">The value to be converted.</param>
+ <returns>
+ <paramref name="value" /> converted to string. The function fails
+ with an exception when the conversion is not possible.
+ </returns>
+ <remarks>
+ Named method ConvertToString as a static ToString method would break
+ CLS compliance.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.ConversionFunctions.ToDateTime(System.DateTime)">
+ <summary>
+ Converts the argument to a datetime.
+ </summary>
+ <param name="value">value to be converted</param>
+ <returns><paramref name="value" /> converted to datetime. The function fails with an exception when the conversion is not possible.</returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ConversionFunctions.ToBoolean(System.Boolean)">
+ <summary>
+ Converts the argument to a boolean
+ </summary>
+ <param name="value">The string value to be converted to boolean. Must be 'true' or 'false'.</param>
+ <returns>
+ <paramref name="value" /> converted to boolean. The function fails
+ with an exception when the conversion is not possible.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.Now">
+ <summary>
+ Gets a <see cref="T:System.DateTime"/> that is the current local date and
+ time on this computer.
+ </summary>
+ <returns>
+ A <see cref="T:System.DateTime"/> whose value is the current date and time.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetYear(System.DateTime)">
+ <summary>
+ Gets the year component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the year component.</param>
+ <returns>
+ The year, between 1 and 9999.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetMonth(System.DateTime)">
+ <summary>
+ Gets the month component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the month component.</param>
+ <returns>
+ The month, between 1 and 12.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetDay(System.DateTime)">
+ <summary>
+ Gets the day of the month represented by the specified date.
+ </summary>
+ <param name="date">The date of which to get the day of the month.</param>
+ <returns>
+ The day value, between 1 and 31.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetHour(System.DateTime)">
+ <summary>
+ Gets the hour component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the hour component.</param>
+ <returns>
+ The hour, between 0 and 23.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetMinute(System.DateTime)">
+ <summary>
+ Gets the minute component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the minute component.</param>
+ <returns>
+ The minute, between 0 and 59.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetSecond(System.DateTime)">
+ <summary>
+ Gets the seconds component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the seconds component.</param>
+ <returns>
+ The seconds, between 0 and 59.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetMillisecond(System.DateTime)">
+ <summary>
+ Gets the milliseconds component of the specified date.
+ </summary>
+ <param name="date">The date of which to get the milliseconds component.</param>
+ <returns>
+ The millisecond, between 0 and 999.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetTicks(System.DateTime)">
+ <summary>
+ Gets the number of ticks that represent the specified date.
+ </summary>
+ <param name="date">The date of which to get the number of ticks.</param>
+ <returns>
+ The number of ticks that represent the date and time of the
+ specified date.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetDayOfWeek(System.DateTime)">
+ <summary>
+ Gets the day of the week represented by the specified date.
+ </summary>
+ <param name="date">The date of which to get the day of the week.</param>
+ <returns>
+ The day of the week, ranging from zero, indicating Sunday, to six,
+ indicating Saturday.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetDayOfYear(System.DateTime)">
+ <summary>
+ Gets the day of the year represented by the specified date.
+ </summary>
+ <param name="date">The date of which to get the day of the year.</param>
+ <returns>
+ The day of the year, between 1 and 366.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.GetDaysInMonth(System.Int32,System.Int32)">
+ <summary>
+ Returns the number of days in the specified month of the specified
+ year.
+ </summary>
+ <param name="year">The year.</param>
+ <param name="month">The month (a number ranging from 1 to 12).</param>
+ <returns>
+ The number of days in <paramref name="month"/> for the specified
+ <paramref name="year"/>.
+ </returns>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="month"/> is less than 1 or greater than 12.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeFunctions.IsLeapYear(System.Int32)">
+ <summary>
+ Returns an indication whether the specified year is a leap year.
+ </summary>
+ <param name="year">A 4-digit year.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="year" /> is a leap year;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a date and time to
+ its <see cref="T:System.DateTime"/> equivalent.
+ </summary>
+ <param name="s">A string containing a date and time to convert.</param>
+ <returns>
+ A <see cref="T:System.DateTime"/> equivalent to the date and time contained
+ in <paramref name="s"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> does not contain a valid string representation of a date and time.</exception>
+ <remarks>
+ The <see cref="T:System.Globalization.DateTimeFormatInfo"/> for the invariant culture is
+ used to supply formatting information about <paramref name="s"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeConversionFunctions.ToString(System.DateTime)">
+ <summary>
+ Converts the specified <see cref="T:System.DateTime"/> to its equivalent
+ string representation.
+ </summary>
+ <param name="value">A <see cref="T:System.DateTime"/> to convert.</param>
+ <returns>
+ A string representation of <paramref name="value"/> formatted using
+ the general format specifier ("G").
+ </returns>
+ <remarks>
+ <paramref name="value"/> is formatted with the
+ <see cref="T:System.Globalization.DateTimeFormatInfo"/> for the invariant culture.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.DateTimeConversionFunctions.ToString(System.DateTime,System.String)">
+ <summary>
+ Converts the specified <see cref="T:System.DateTime"/> to its equivalent
+ string representation.
+ </summary>
+ <param name="value">A <see cref="T:System.DateTime"/> to convert.</param>
+ <param name="format">A format string.</param>
+ <returns>
+ A string representation of <paramref name="value"/> formatted
+ using the specified format
+ </returns>
+ <remarks>
+ <paramref name="value"/> is formatted with the
+ <see cref="T:System.Globalization.DateTimeFormatInfo"/> for the invariant culture.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Functions.DirectoryFunctions">
+ <summary>
+ Groups a set of functions for dealing with directories.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetCreationTime(System.String)">
+ <summary>
+ Returns the creation date and time of the specified directory.
+ </summary>
+ <param name="path">The directory for which to obtain creation date and time information.</param>
+ <returns>
+ The creation date and time of the specified directory.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified directory does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetLastWriteTime(System.String)">
+ <summary>
+ Returns the date and time the specified directory was last written to.
+ </summary>
+ <param name="path">The directory for which to obtain write date and time information.</param>
+ <returns>
+ The date and time the specified directory was last written to.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified directory does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetLastAccessTime(System.String)">
+ <summary>
+ Returns the date and time the specified directory was last accessed.
+ </summary>
+ <param name="path">The directory for which to obtain access date and time information.</param>
+ <returns>
+ The date and time the specified directory was last accessed.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified directory does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ <exception cref="T:System.NotSupportedException">The <paramref name="path"/> parameter is in an invalid format.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetCurrentDirectory">
+ <summary>
+ Gets the current working directory.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> containing the path of the current working
+ directory.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetParentDirectory(System.String)">
+ <summary>
+ Retrieves the parent directory of the specified path.
+ </summary>
+ <param name="path">The path for which to retrieve the parent directory.</param>
+ <returns>
+ The parent directory, or an empty <see cref="T:System.String"/> if
+ <paramref name="path"/> is the root directory, including the root
+ of a UNC server or share name.
+ </returns>
+ <exception cref="T:System.IO.IOException">The directory specified by <paramref name="path"/> is read-only.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ <exception cref="T:System.IO.DirectoryNotFoundException">The specified path was not found.</exception>
+ <example>
+ <para>
+ Copy "readme.txt" from the current working directory to
+ its parent directory.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="current.dir" value="${directory::get-current-directory()}" />
+ <property name="current.dir.parent" value="${directory::get-parent-directory(current.dir)}" />
+ <copy file="${path::combine(current.dir, 'readme.txt')} todir="${current.dir.parent}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.GetDirectoryRoot(System.String)">
+ <summary>
+ Returns the volume information, root information, or both for the
+ specified path.
+ </summary>
+ <param name="path">The path for which to retrieve the parent directory.</param>
+ <returns>
+ A string containing the volume information, root information, or
+ both for the specified path.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DirectoryFunctions.Exists(System.String)">
+ <summary>
+ Determines whether the given path refers to an existing directory
+ on disk.
+ </summary>
+ <param name="path">The path to test.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="path" /> refers to an
+ existing directory; otherwise, <see langword="false" />.
+ </returns>
+ <example>
+ <para>Remove directory "test", if it exists.</para>
+ <code>
+ <![CDATA[
+ <delete dir="test" if="${directory::exists('test')}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Functions.DnsFunctions">
+ <summary>
+ Functions for requesting information from DNS.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.DnsFunctions.GetHostName">
+ <summary>
+ Gets the host name of the local computer.
+ </summary>
+ <returns>
+ A string that contains the DNS host name of the local computer.
+ </returns>
+ <exception cref="T:System.Net.Sockets.SocketException">An error is encountered when resolving the local host name.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.DoubleConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a number to its
+ double-precision floating point number equivalent.
+ </summary>
+ <param name="s">A string containing a number to convert.</param>
+ <returns>
+ A double-precision floating point number equivalent to the numeric
+ value or symbol specified in <paramref name="s"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> is not a number in a valid format.</exception>
+ <exception cref="T:System.OverflowException"><paramref name="s"/> represents a number less than <see cref="F:System.Double.MinValue"/> or greater than <see cref="F:System.Double.MaxValue"/>.</exception>
+ <remarks>
+ The <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture is
+ used to supply formatting information about <paramref name="s"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.DoubleConversionFunctions.ToString(System.Double)">
+ <summary>
+ Converts the specified <see cref="T:System.Double"/> to its equivalent
+ string representation.
+ </summary>
+ <param name="value">A <see cref="T:System.Double"/> to convert.</param>
+ <returns>
+ The string representation of <paramref name="value"/> formatted
+ using the general format specifier ("G").
+ </returns>
+ <remarks>
+ <paramref name="value"/> is formatted with the
+ <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Functions.EnvironmentFunctions">
+ <summary>
+ Provide information about the current environment and platform.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetFolderPath(System.Environment.SpecialFolder)">
+ <summary>
+ Gets the path to the system special folder identified by the
+ specified enumeration.
+ </summary>
+ <param name="folder">An enumerated constant that identifies a system special folder.</param>
+ <returns>
+ The path to the specified system special folder, if that folder
+ physically exists on your computer; otherwise, the empty string ("").
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="folder"/> is not a member of <see cref="T:System.Environment.SpecialFolder"/>.</exception>
+ <example>
+ <para>
+ Copy "out.log" from the project base directory to the
+ program files directory.
+ </para>
+ <code>
+ <![CDATA[
+ <copy file="out.log" todir="${environment::get-folder-path('ProgramFiles')}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetMachineName">
+ <summary>
+ Gets the NetBIOS name of this local computer.
+ </summary>
+ <returns>
+ The NetBIOS name of this local computer.
+ </returns>
+ <exception cref="T:System.InvalidOperationException">The name of this computer cannot be obtained.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem">
+ <summary>
+ Gets an <see cref="T:System.OperatingSystem"/> object that represents the
+ current operating system.
+ </summary>
+ <returns>
+ An <see cref="T:System.OperatingSystem"/> object that contains the current
+ platform identifier and version number.
+ </returns>
+ <example>
+ <para>
+ Output string representation of the current operating system.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />
+ ]]>
+ </code>
+ <para>If the operating system is Windows 2000, the output is:</para>
+ <code>
+ Microsoft Windows NT 5.0.2195.0
+ </code>
+ </example>
+ <seealso cref="T:NAnt.Core.Functions.OperatingSystemFunctions"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetUserName">
+ <summary>
+ Gets the user name of the person who started the current thread.
+ </summary>
+ <returns>
+ The name of the person logged on to the system who started the
+ current thread.
+ </returns>
+ <example>
+ <para>
+ Modify the home directory of the current user on unix-based systems.
+ </para>
+ <code>
+ <![CDATA[
+ <exec program="usermod">
+ <arg value="-d" />
+ <arg value="/home/temp" />
+ <arg value="${environment::get-user-name()}" />
+ </exec>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetVariable(System.String)">
+ <summary>
+ Returns the value of the specified environment variable.
+ </summary>
+ <param name="name">The environment variable of which the value should be returned.</param>
+ <returns>
+ The value of the specified environment variable.
+ </returns>
+ <exception cref="T:System.ArgumentException">Environment variable <paramref name="name"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.VariableExists(System.String)">
+ <summary>
+ Gets a value indicating whether the specified environment variable
+ exists.
+ </summary>
+ <param name="name">The environment variable that should be checked.</param>
+ <returns>
+ <see langword="true" /> if the environment variable exists; otherwise,
+ <see langword="false" />.
+ </returns>
+ <example>
+ <para>
+ Execute a set of tasks only if the "BUILD_DEBUG" environment
+ variable is set.
+ </para>
+ <code>
+ <![CDATA[
+ <if test="${environment::variable-exists('BUILD_DEBUG')}">
+ ...
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion">
+ <summary>
+ Gets a <see cref="T:System.Version"/> object that describes the major,
+ minor, build, and revision numbers of the Common Language Runtime.
+ </summary>
+ <returns>
+ A Version object.
+ </returns>
+ <example>
+ <para>Output the major version of the CLR.</para>
+ <code>
+ <![CDATA[
+ <echo message="Major version=${version::get-major(environment::get-version())}" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.EnvironmentFunctions.NewLine">
+ <summary>
+ Gets the newline string defined for this environment.
+ </summary>
+ <returns>
+ A string containing CRLF for non-Unix platforms, or LF for Unix
+ platforms.
+ </returns>
+ <example>
+ <para>Output two lines in a log file.</para>
+ <code>
+ <![CDATA[
+ <echo file="build.log" message="First line${environment::newline()}Second line" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Functions.FileFunctions">
+ <summary>
+ Groups a set of functions for dealing with files.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.GetCreationTime(System.String)">
+ <summary>
+ Returns the creation date and time of the specified file.
+ </summary>
+ <param name="path">The file for which to obtain creation date and time information.</param>
+ <returns>
+ The creation date and time of the specified file.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified file does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ <exception cref="T:System.NotSupportedException">The <paramref name="path"/> parameter is in an invalid format.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.GetLastWriteTime(System.String)">
+ <summary>
+ Returns the date and time the specified file was last written to.
+ </summary>
+ <param name="path">The file for which to obtain write date and time information.</param>
+ <returns>
+ The date and time the specified file was last written to.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified file does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.GetLastAccessTime(System.String)">
+ <summary>
+ Returns the date and time the specified file was last accessed.
+ </summary>
+ <param name="path">The file for which to obtain access date and time information.</param>
+ <returns>
+ The date and time the specified file was last accessed.
+ </returns>
+ <exception cref="T:System.IO.IOException">The specified file does not exist.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ <exception cref="T:System.NotSupportedException">The <paramref name="path"/> parameter is in an invalid format.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.Exists(System.String)">
+ <summary>
+ Determines whether the specified file exists.
+ </summary>
+ <param name="file">The file to check.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="file" /> refers to an
+ existing file; otherwise, <see langword="false" />.
+ </returns>
+ <example>
+ <para>Execute a set of tasks, if file "output.xml" does not exist.</para>
+ <code>
+ <![CDATA[
+ <if test="${not file::exists('output.xml')}">
+ ...
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.UpToDate(System.String,System.String)">
+ <summary>
+ Determines whether <paramref name="targetFile"/> is more or equal
+ up-to-date than <paramref name="srcFile"/>.
+ </summary>
+ <param name="srcFile">The file to check against the target file.</param>
+ <param name="targetFile">The file for which we want to determine the status.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="targetFile"/> is more
+ or equal up-to-date than <paramref name="srcFile"/>; otherwise,
+ <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="srcFile"/> or <paramref name="targetFile"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both of either <paramref name="srcFile"/> or <paramref name="targetFile"/> exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.GetLength(System.String)">
+ <summary>
+ Gets the length of the file.
+ </summary>
+ <param name="file">filename</param>
+ <returns>
+ Length in bytes, of the file named <paramref name="file"/>.
+ </returns>
+ <exception cref="T:System.IO.FileNotFoundException">The file specified cannot be found.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileFunctions.IsAssembly(System.String)">
+ <summary>
+ Checks if a given file is an assembly.
+ </summary>
+ <param name="assemblyFile">The name or path of the file to be checked.</param>
+ <returns>True if the file is a valid assembly, false if it's not or if the assembly seems corrupted (invalid headers or metadata).</returns>
+ <exception cref="T:System.ArgumentNullException"><paramref name="assemblyFile"/> is a null <see cref="T:System.String"/>.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="assemblyFile"/> is an empty <see cref="T:System.String"/>.</exception>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="assemblyFile"/> is not found, or the file you are trying to check does not specify a filename extension.</exception>
+ <exception cref="T:System.Security.SecurityException">The caller does not have path discovery permission.</exception>
+ </member>
+ <member name="T:NAnt.Core.Functions.FileVersionInfoFunctions">
+ <summary>
+ Functions that provide version information for a physical file on disk.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileVersionInfoFunctions.GetVersionInfo(System.String)">
+ <summary>
+ Returns a <see cref="T:System.Diagnostics.FileVersionInfo"/> representing the version
+ information associated with the specified file.
+ </summary>
+ <param name="fileName">The file to retrieve the version information for.</param>
+ <returns>
+ A <see cref="T:System.Diagnostics.FileVersionInfo"/> containing information about the file.
+ </returns>
+ <exception cref="T:System.IO.FileNotFoundException">The file specified cannot be found.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileVersionInfoFunctions.GetCompanyName(System.Diagnostics.FileVersionInfo)">
+ <summary>
+ Gets the name of the company that produced the file.
+ </summary>
+ <param name="fileVersionInfo">A <see cref="T:System.Diagnostics.FileVersionInfo"/> instance containing version information about a file.</param>
+ <returns>
+ The name of the company that produced the file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileVersionInfoFunctions.GetFileVersion(System.Diagnostics.FileVersionInfo)">
+ <summary>
+ Gets the file version of a file.
+ </summary>
+ <param name="fileVersionInfo">A <see cref="T:System.Diagnostics.FileVersionInfo"/> instance containing version information about a file.</param>
+ <returns>
+ The file version of a file.
+ </returns>
+ <see cref="T:NAnt.Core.Functions.VersionFunctions"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileVersionInfoFunctions.GetProductName(System.Diagnostics.FileVersionInfo)">
+ <summary>
+ Gets the name of the product the file is distributed with.
+ </summary>
+ <param name="fileVersionInfo">A <see cref="T:System.Diagnostics.FileVersionInfo"/> instance containing version information about a file.</param>
+ <returns>
+ The name of the product the file is distributed with.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.FileVersionInfoFunctions.GetProductVersion(System.Diagnostics.FileVersionInfo)">
+ <summary>
+ Gets the product version of a file.
+ </summary>
+ <param name="fileVersionInfo">A <see cref="T:System.Diagnostics.FileVersionInfo"/> instance containing version information about a file.</param>
+ <returns>
+ The product version of a file.
+ </returns>
+ <see cref="T:NAnt.Core.Functions.VersionFunctions"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.Exists(System.String)">
+ <summary>
+ Checks whether the specified framework exists, and is valid.
+ </summary>
+ <param name="framework">The framework to test.</param>
+ <returns>
+ <see langword="true" /> if the specified framework exists ; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.SdkExists(System.String)">
+ <summary>
+ Checks whether the SDK for the specified framework is installed.
+ </summary>
+ <param name="framework">The framework to test.</param>
+ <returns>
+ <see langword="true"/> if the SDK for specified framework is installed;
+ otherwise, <see langword="false"/>.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework">
+ <summary>
+ Gets the identifier of the current target framework.
+ </summary>
+ <returns>
+ The identifier of the current target framework.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework">
+ <summary>
+ Gets the identifier of the runtime framework.
+ </summary>
+ <returns>
+ The identifier of the runtime framework.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetFamily(System.String)">
+ <summary>
+ Gets the family of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the family should be returned.</param>
+ <returns>
+ The family of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetVersion">
+ <summary>
+ Gets the version of the current target framework.
+ </summary>
+ <returns>
+ The version of the current target framework.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetVersion(System.String)">
+ <summary>
+ Gets the version of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the version should be returned.</param>
+ <returns>
+ The version of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetDescription">
+ <summary>
+ Gets the description of the current target framework.
+ </summary>
+ <returns>
+ The description of the current target framework.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetDescription(System.String)">
+ <summary>
+ Gets the description of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the description should be returned.</param>
+ <returns>
+ The description of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetClrVersion">
+ <summary>
+ Gets the Common Language Runtime version of the current target
+ framework.
+ </summary>
+ <returns>
+ The Common Language Runtime version of the current target framework.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetClrVersion(System.String)">
+ <summary>
+ Gets the Common Language Runtime version of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the Common Language Runtime version should be returned.</param>
+ <returns>
+ The Common Language Runtime version of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetFrameworkDirectory(System.String)">
+ <summary>
+ Gets the framework directory of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the framework directory should be returned.</param>
+ <returns>
+ The framework directory of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetAssemblyDirectory(System.String)">
+ <summary>
+ Gets the assembly directory of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the assembly directory should be returned.</param>
+ <returns>
+ The assembly directory of the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetSdkDirectory(System.String)">
+ <summary>
+ Gets the SDK directory of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the SDK directory should be returned.</param>
+ <returns>
+ The SDK directory of the specified framework, or an empty
+ <see cref="T:System.String"/> if the SDK of the specified framework is not
+ installed.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetToolPath(System.String)">
+ <summary>
+ Gets the absolute path of the specified tool for the current
+ target framework.
+ </summary>
+ <param name="tool">The file name of the tool to search for.</param>
+ <returns>
+ The absolute path to <paramref name="tool"/> if found in one of the
+ configured tool paths; otherwise, an error is reported.
+ </returns>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="tool"/> could not be found in the configured tool paths.</exception>
+ <remarks>
+ <para>
+ The configured tool paths are scanned in the order in which they
+ are defined in the framework configuration.
+ </para>
+ <para>
+ The file name of the tool to search should include the extension.
+ </para>
+ </remarks>
+ <example>
+ <para>Use <b>gacutil</b> to install an assembly in the GAC.</para>
+ <code>
+ <![CDATA[
+ <exec program="${framework::get-tool-path('gacutil.exe')}" managed="strict">
+ <arg value="/i" />
+ <arg file="Cegeka.HealthFramework.dll" />
+ </exec>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeEngine(System.String)">
+ <summary>
+ Gets the runtime engine of the specified framework.
+ </summary>
+ <param name="framework">The framework of which the runtime engine should be returned.</param>
+ <returns>
+ The full path to the runtime engine of the specified framework, or
+ an empty <see cref="T:System.String"/> if no runtime engine is defined
+ for the specified framework.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetRuntimeFramework"/>
+ <seealso cref="M:NAnt.Core.Functions.FrameworkFunctions.GetTargetFramework"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetFrameworks(NAnt.Core.FrameworkTypes)">
+ <summary>
+ Gets a comma-separated list of frameworks filtered by the specified
+ <see cref="T:NAnt.Core.FrameworkTypes"/>.
+ </summary>
+ <param name="types">A bitwise combination of <see cref="T:NAnt.Core.FrameworkTypes"/> values that filter the frameworks to retrieve.</param>
+ <returns>
+ A comma-separated list of frameworks filtered by the specified
+ <see cref="T:NAnt.Core.FrameworkTypes"/>, sorted on name.
+ </returns>
+ <example>
+ <para>
+ Define a <b>build-all</b> target that executes the <b>build</b>
+ target once for each installed framework targeting compact
+ devices.
+ </para>
+ <code>
+ <![CDATA[
+ <target name="build-all">
+ <foreach item="String" in="${framework::get-frameworks('installed compact')}" delim="," property="framework">
+ <property name="nant.settings.currentframework" value="${framework}" />
+ <call target="build" />
+ </foreach>
+ </target>
+
+ <target name="build">
+ ...
+ </target>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.FrameworkFunctions.GetFramework(System.String)">
+ <summary>
+ Checks whether the specified framework is valid.
+ </summary>
+ <param name="framework">The framework to check.</param>
+ <exception cref="T:System.ArgumentException"><paramref name="framework"/> is not a valid framework identifier.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.Int32ConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a number to its
+ 32-bit signed integer equivalent.
+ </summary>
+ <param name="s">A string containing a number to convert.</param>
+ <returns>
+ A 32-bit signed integer equivalent to the number contained in
+ <paramref name="s"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> is not of the correct format.</exception>
+ <exception cref="T:System.OverflowException"><paramref name="s"/> represents a number less than <see cref="F:System.Int32.MinValue"/> or greater than <see cref="F:System.Int32.MaxValue"/>.</exception>
+ <remarks>
+ The <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture is
+ used to supply formatting information about <paramref name="s"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.Int32ConversionFunctions.ToString(System.Int32)">
+ <summary>
+ Converts the specified <see cref="T:System.Int32"/> to its equivalent string
+ representation.
+ </summary>
+ <param name="value">A <see cref="T:System.Int32"/> to convert.</param>
+ <returns>
+ The string representation of <paramref name="value"/>, consisting
+ of a negative sign if the value is negative, and a sequence of
+ digits ranging from 0 to 9 with no leading zeroes.
+ </returns>
+ <remarks>
+ <paramref name="value"/> is formatted with the
+ <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.Int64ConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a number to its
+ 64-bit signed integer equivalent.
+ </summary>
+ <param name="s">A string containing a number to convert.</param>
+ <returns>
+ A 64-bit signed integer equivalent to the number contained in
+ <paramref name="s"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> is not of the correct format.</exception>
+ <exception cref="T:System.OverflowException"><paramref name="s"/> represents a number less than <see cref="F:System.Int64.MinValue"/> or greater than <see cref="F:System.Int64.MaxValue"/>.</exception>
+ <remarks>
+ The <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture is
+ used to supply formatting information about <paramref name="s"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.Int64ConversionFunctions.ToString(System.Int64)">
+ <summary>
+ Converts the specified <see cref="T:System.Int64"/> to its equivalent string
+ representation.
+ </summary>
+ <param name="value">A <see cref="T:System.Int64"/> to convert.</param>
+ <returns>
+ The string representation of <paramref name="value"/>, consisting
+ of a negative sign if the value is negative, and a sequence of
+ digits ranging from 0 to 9 with no leading zeroes.
+ </returns>
+ <remarks>
+ <paramref name="value"/> is formatted with the
+ <see cref="T:System.Globalization.NumberFormatInfo"/> for the invariant culture.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Functions.MathFunctions.Round(System.Double)">
+ <summary>
+ Rounds the value to the nearest whole number
+ </summary>
+ <param name="value">Number to be rounded, can be anything convertible to a double.</param>
+ <returns>
+ Rounded value.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.MathFunctions.Floor(System.Double)">
+ <summary>
+ Returns the largest whole number less than or equal to the specified
+ number.
+ </summary>
+ <param name="value">value to be , can be anything convertible to a double</param>
+ <returns>
+ The largest whole number less than or equal to the specified number.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.MathFunctions.Ceiling(System.Double)">
+ <summary>
+ Returns the smallest whole number greater than or equal to the specified number
+ </summary>
+ <param name="value">value</param>
+ <returns>
+ The smallest whole number greater than or equal to the specified number.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.MathFunctions.Abs(System.Double)">
+ <summary>
+ Returns the absolute value of the specified number
+ </summary>
+ <param name="value">value to take the absolute value from</param>
+ <returns>
+ <paramref name="value" /> when <paramref name="value" /> is greater
+ than or equal to zero; otherwise, -<paramref name="value" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.NAntFunctions.GetBaseDirectory">
+ <summary>
+ Gets the base directory of the appdomain in which NAnt is running.
+ </summary>
+ <returns>
+ The base directory of the appdomain in which NAnt is running.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.NAntFunctions.GetAssembly">
+ <summary>
+ Gets the NAnt assembly.
+ </summary>
+ <returns>
+ The NAnt assembly.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.NAntFunctions.ScanProbingPaths(System.String)">
+ <summary>
+ Searches the probing paths of the current target framework for the
+ specified file.
+ </summary>
+ <param name="fileName">The name of the file to search for.</param>
+ <returns>
+ The absolute path to <paramref name="fileName"/> if found in one of the
+ configured probing; otherwise, an error is reported.
+ </returns>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="fileName"/> could not be found in the configured probing paths.</exception>
+ <remarks>
+ <para>
+ The (relative) probing paths are resolved relative to the base
+ directory of the appdomain in which NAnt is running.
+ </para>
+ <para>
+ The configured probing paths are scanned recursively in the order
+ in which they are defined in the framework configuration.
+ </para>
+ <para>
+ The file name to search should include the extension.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Compile an assembly referencing the <c>nunit.framework</c> assembly
+ for the current target framework that is shipped as part of the
+ NAnt distribution.
+ </para>
+ <code>
+ <![CDATA[
+ <csc target="library" output="NAnt.Core.Tests.dll">
+ <sources basedir="NAnt.Core">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="NAnt.Core.dll" />
+ <include name="${framework::get-lib-path('nunit.framework.dll')}" />
+ </references>
+ </csc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.NAntFunctions.ScanProbingPaths(System.String,System.String)">
+ <summary>
+ Searches the probing paths of the current target framework for the
+ specified file.
+ </summary>
+ <param name="baseDirectory">The directory to use a base directory for the probing paths.</param>
+ <param name="fileName">The name of the file to search for.</param>
+ <returns>
+ The absolute path to <paramref name="fileName"/> if found in one of the
+ configured probing; otherwise, an error is reported.
+ </returns>
+ <exception cref="T:System.IO.FileNotFoundException"><paramref name="fileName"/> could not be found in the configured probing paths.</exception>
+ <remarks>
+ <para>
+ The (relative) probing paths are resolved relative to the specified
+ base directory.
+ </para>
+ <para>
+ The configured probing paths are scanned recursively in the order
+ in which they are defined in the framework configuration.
+ </para>
+ <para>
+ The file name to search should include the extension.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Compile an assembly referencing the <c>nunit.framework</c> assembly
+ for the current target framework that is shipped as part of the
+ NAnt distribution.
+ </para>
+ <code>
+ <![CDATA[
+ <csc target="library" output="NAnt.Core.Tests.dll">
+ <sources basedir="NAnt.Core">
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <include name="NAnt.Core.dll" />
+ <include name="${framework::get-lib-path('nunit.framework.dll')}" />
+ </references>
+ </csc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.ProjectFunctions.GetName">
+ <summary>
+ Gets the name of the current project.
+ </summary>
+ <returns>
+ The name of the current project, or an empty <see cref="T:System.String"/>
+ if no name is specified in the build file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ProjectFunctions.GetBuildFileUri">
+ <summary>
+ Gets the <see cref="T:System.Uri"/> form of the build file.
+ </summary>
+ <returns>
+ The <see cref="T:System.Uri"/> form of the build file, or
+ an empty <see cref="T:System.String"/> if the project is not file backed.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ProjectFunctions.GetBuildFilePath">
+ <summary>
+ Gets the local path to the build file.
+ </summary>
+ <returns>
+ The local path of the build file, or an empty <see cref="T:System.String"/>
+ if the project is not file backed.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ProjectFunctions.GetDefaultTarget">
+ <summary>
+ Gets the name of the target that will be executed when no other
+ build targets are specified.
+ </summary>
+ <returns>
+ The name of the target that will be executed when no other build
+ targets are specified, or an empty <see cref="T:System.String"/> if no
+ default target is defined for the project.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.ProjectFunctions.GetBaseDirectory">
+ <summary>
+ Gets the base directory of the current project.
+ </summary>
+ <returns>
+ The base directory of the current project.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TargetFunctions.Exists(System.String)">
+ <summary>
+ Checks whether the specified target exists.
+ </summary>
+ <param name="name">The target to test.</param>
+ <returns>
+ <see langword="true" /> if the specified target exists; otherwise,
+ <see langword="false" />.
+ </returns>
+ <example>
+ <para>
+ Execute target "clean", if it exists.
+ </para>
+ <code>
+ <![CDATA[
+ <if test="${target::exists('clean')}">
+ <call target="clean" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.TargetFunctions.GetCurrentTarget">
+ <summary>
+ Gets the name of the target being executed.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> that contains the name of the target
+ being executed.
+ </returns>
+ <exception cref="T:System.InvalidOperationException">No target is being executed.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.TargetFunctions.HasExecuted(System.String)">
+ <summary>
+ Checks whether the specified target has already been executed.
+ </summary>
+ <param name="name">The target to test.</param>
+ <returns>
+ <see langword="true"/> if the specified target has already been
+ executed; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException">Target <paramref name="name"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.TaskFunctions.Exists(System.String)">
+ <summary>
+ Checks whether the specified task exists.
+ </summary>
+ <param name="name">The task to test.</param>
+ <returns>
+ <see langword="true" /> if the specified task exists; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TaskFunctions.GetAssembly(System.String)">
+ <summary>
+ Returns the <see cref="T:System.Reflection.Assembly"/> from which the specified task
+ was loaded.
+ </summary>
+ <param name="name">The name of the task to get the <see cref="T:System.Reflection.Assembly"/> of.</param>
+ <returns>
+ The <see cref="T:System.Reflection.Assembly"/> from which the specified task was loaded.
+ </returns>
+ <exception cref="T:System.ArgumentException">Task <paramref name="name"/> is not available.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PropertyFunctions.Exists(System.String)">
+ <summary>
+ Checks whether the specified property exists.
+ </summary>
+ <param name="name">The property to test.</param>
+ <returns>
+ <see langword="true" /> if the specified property exists; otherwise,
+ <see langword="false" />.
+ </returns>
+ <example>
+ <para>
+ Execute a set of tasks if the "build.debug" property
+ exists.
+ </para>
+ <code>
+ <![CDATA[
+ <if test="${property::exists('build.debug')}">
+ <echo message="Starting debug build" />
+ <call target="init-debug" />
+ <call target="build" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.PropertyFunctions.IsReadOnly(System.String)">
+ <summary>
+ Checks whether the specified property is read-only.
+ </summary>
+ <param name="name">The property to test.</param>
+ <returns>
+ <see langword="true"/> if the specified property is read-only;
+ otherwise, <see langword="false"/>.
+ </returns>
+ <example>
+ <para>Check whether the "debug" property is read-only.</para>
+ <code>property::is-readonly('debug')</code>
+ </example>
+ <exception cref="T:System.ArgumentException">Property <paramref name="name"/> has not been set.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PropertyFunctions.IsDynamic(System.String)">
+ <summary>
+ Checks whether the specified property is a dynamic property.
+ </summary>
+ <param name="name">The property to test.</param>
+ <returns>
+ <see langword="true"/> if the specified property is a dynamic
+ property; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException">Property <paramref name="name"/> has not been set.</exception>
+ <example>
+ <para>
+ Check whether the "debug" property is a dynamic property.
+ </para>
+ <code>property::is-dynamic('debug')</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.PlatformFunctions.GetName">
+ <summary>
+ Gets the name of the platform on which NAnt is running.
+ </summary>
+ <returns>
+ The name of the platform on which NAnt is running.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PlatformFunctions.IsWin32">
+ <summary>
+ Checks whether NAnt is running on Windows (and not just 32-bit Windows
+ as the name may lead you to believe).
+ </summary>
+ <returns>
+ <see langword="true" /> if NAnt is running on Windows;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PlatformFunctions.IsWindows">
+ <summary>
+ Checks whether NAnt is running on Windows.
+ </summary>
+ <returns>
+ <see langword="true" /> if NAnt is running on Windows;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PlatformFunctions.IsUnix">
+ <summary>
+ Checks whether NAnt is running on Unix.
+ </summary>
+ <returns>
+ <see langword="true" /> if NAnt is running on Unix;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Functions.OperatingSystemFunctions">
+ <summary>
+ Functions that return information about an operating system.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Functions.OperatingSystemFunctions.GetPlatform(System.OperatingSystem)">
+ <summary>
+ Gets a <see cref="T:System.PlatformID"/> value that identifies the operating
+ system platform.
+ </summary>
+ <param name="operatingSystem">The operating system.</param>
+ <returns>
+ <see cref="T:System.PlatformID"/> value that identifies the operating system
+ platform.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)">
+ <summary>
+ Gets a <see cref="T:System.Version"/> object that identifies this operating
+ system.
+ </summary>
+ <param name="operatingSystem">The operating system.</param>
+ <returns>
+ A <see cref="T:System.Version"/> object that describes the major version,
+ minor version, build, and revision of the operating system.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.OperatingSystemFunctions.ToString(System.OperatingSystem)">
+ <summary>
+ Converts the value of the specified operating system to its equivalent
+ <see cref="T:System.String"/> representation.
+ </summary>
+ <param name="operatingSystem">The operating system.</param>
+ <returns>
+ The <see cref="T:System.String"/> representation of
+ <paramref name="operatingSystem"/>.
+ </returns>
+ <example>
+ <para>
+ Output string representation of the current operating system.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />
+ ]]>
+ </code>
+ <para>If the operating system is Windows 2000, the output is:</para>
+ <code>
+ Microsoft Windows NT 5.0.2195.0
+ </code>
+ </example>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetFullPath(System.String)">
+ <summary>
+ Returns the fully qualified path.
+ </summary>
+ <param name="path">The file or directory for which to obtain absolute path information.</param>
+ <returns>
+ A string containing the fully qualified location of <paramref name="path"/>,
+ such as "C:\MyFile.txt".
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> is a zero-length string, contains only white space, or contains one or more invalid characters.</exception>
+ <exception cref="T:System.NotSupportedException"><paramref name="path"/> contains a colon (":").</exception>
+ <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.Combine(System.String,System.String)">
+ <summary>
+ Combines two paths.
+ </summary>
+ <param name="path1">first path</param>
+ <param name="path2">second path</param>
+ <returns>
+ A string containing the combined paths. If one of the specified paths
+ is a zero-length string, this method returns the other path. If
+ <paramref name="path2"/> contains an absolute path, this method
+ returns <paramref name="path2"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path1"/> or <paramref name="path2"/> contain one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.ChangeExtension(System.String,System.String)">
+ <summary>
+ Changes the extension of the path string.
+ </summary>
+ <param name="path">The path information to modify. The path cannot contain any of the characters
+ defined in <see cref="T:System.IO.Path.InvalidPathChars"/>InvalidPathChars.</param>
+ <param name="extension">The new extension (with a leading period). Specify a null reference
+ to remove an existing extension from <paramref name="path"/>.</param>
+ <returns>
+ <para>
+ A string containing the modified path information.
+ </para>
+ <para>
+ On Windows-based desktop platforms, if <paramref name="path"/> is
+ an empty <see cref="T:System.String"/>, the path information is returned
+ unmodified. If <paramref name="path"/> has no extension, the returned
+ path <see cref="T:System.String"/> contains <paramref name="extension"/>
+ appended to the end of <paramref name="path"/>.
+ </para>
+ </returns>
+ <remarks>
+ For more information see the <see cref="T:System.IO.Path"/> documentation.
+ </remarks>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetDirectoryName(System.String)">
+ <summary>
+ Returns the directory information for the specified path string.
+ </summary>
+ <param name="path">The path of a file or directory.</param>
+ <returns>
+ A <see cref="T:System.String"/> containing directory information for
+ <paramref name="path"/>, or an empty <see cref="T:System.String"/> if
+ <paramref name="path"/> denotes a root directory, or does not
+ contain directory information.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains invalid characters, is empty, or contains only white spaces.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetExtension(System.String)">
+ <summary>
+ Returns the extension for the specified path string.
+ </summary>
+ <param name="path">The path string from which to get the extension.</param>
+ <returns>
+ A <see cref="T:System.String"/> containing the extension of the specified
+ <paramref name="path"/> (including the "."), or an empty
+ <see cref="T:System.String"/> if <paramref name="path"/> does not have
+ extension information.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetFileName(System.String)">
+ <summary>
+ Returns the filename for the specified path string.
+ </summary>
+ <param name="path">The path string from which to obtain the file name and extension.</param>
+ <returns>
+ <para>
+ A <see cref="T:System.String"/> consisting of the characters after the last
+ directory character in path.
+ </para>
+ <para>
+ If the last character of <paramref name="path"/> is a directory or
+ volume separator character, an empty <see cref="T:System.String"/> is returned.
+ </para>
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetFileNameWithoutExtension(System.String)">
+ <summary>
+ Returns the filename without extension for the specified path string.
+ </summary>
+ <param name="path">The path of the file.</param>
+ <returns>
+ A <see cref="T:System.String"/> containing the <see cref="T:System.String"/> returned
+ by <see cref="M:NAnt.Core.Functions.PathFunctions.GetFileName(System.String)"/>, minus the last period (.) and all
+ characters following it.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetPathRoot(System.String)">
+ <summary>
+ Gets the root directory of the specified path.
+ </summary>
+ <param name="path">The path from which to obtain root directory information.</param>
+ <returns>
+ A <see cref="T:System.String"/> containing the root directory of
+ <paramref name="path"/>, such as "C:\", or an empty <see cref="T:System.String"/>
+ if <paramref name="path"/> does not contain root directory information.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains invalid characters, or is empty.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetTempFileName">
+ <summary>
+ Returns a uniquely named zero-byte temporary file on disk and returns the full path to that file.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> containing the name of the temporary file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.GetTempPath">
+ <summary>
+ Gets the path to the temporary directory.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> containing the path information of a
+ temporary directory.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.HasExtension(System.String)">
+ <summary>
+ Determines whether a path string includes an extension.
+ </summary>
+ <param name="path">The path to search for an extension.</param>
+ <returns>
+ <see langword="true"/>. if the characters that follow the last
+ directory separator or volume separator in the <paramref name="path"/>
+ include a period (.) followed by one or more characters;
+ otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PathFunctions.IsPathRooted(System.String)">
+ <summary>
+ Determines whether a path string is absolute.
+ </summary>
+ <param name="path">The path to test.</param>
+ <returns>
+ <see langword="true"/> if path contains an absolute <paramref name="path"/>;
+ otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> contains one or more invalid characters.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.GetVariable(System.String,System.String)">
+ <summary>
+ Gets the value of a variable for the specified package.
+ </summary>
+ <param name="package">The package for which the variable should be retrieved.</param>
+ <param name="name">The name of the variable.</param>
+ <returns>
+ The value of variable <paramref name="name"/> for the specified
+ package.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="package"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.GetLinkFlags(System.String)">
+ <summary>
+ Gets the link flags required to compile the package, including all
+ its dependencies.
+ </summary>
+ <param name="package">The package for which the link flags should be retrieved.</param>
+ <returns>
+ The link flags required to compile the package.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="package"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.GetCompileFlags(System.String)">
+ <summary>
+ Gets the compile flags required to compile the package, including all
+ its dependencies.
+ </summary>
+ <param name="package">The package for which the compile flags should be retrieved.</param>
+ <returns>
+ The pre-processor and compile flags required to compile the package.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="package"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.GetModVersion(System.String)">
+ <summary>
+ Determines the version of the given package.
+ </summary>
+ <param name="package">The package to get the version of.</param>
+ <returns>
+ The version of the given package.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="package"/> does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.IsAtLeastVersion(System.String,System.String)">
+ <summary>
+ Determines whether the given package is at least version
+ <paramref name="version"/>.
+ </summary>
+ <param name="package">The package to check.</param>
+ <param name="version">The version the package should at least have.</param>
+ <returns>
+ <see langword="true"/> if the given package is at least version
+ <paramref name="version"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.IsExactVersion(System.String,System.String)">
+ <summary>
+ Determines whether the given package is exactly version
+ <paramref name="version"/>.
+ </summary>
+ <param name="package">The package to check.</param>
+ <param name="version">The version the package should have.</param>
+ <returns>
+ <see langword="true"/> if the given package is exactly version
+ <paramref name="version"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.IsMaxVersion(System.String,System.String)">
+ <summary>
+ Determines whether the given package is at no newer than version
+ <paramref name="version"/>.
+ </summary>
+ <param name="package">The package to check.</param>
+ <param name="version">The version the package should maximum have.</param>
+ <returns>
+ <see langword="true"/> if the given package is at no newer than
+ version <paramref name="version"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.IsBetweenVersion(System.String,System.String,System.String)">
+ <summary>
+ Determines whether the given package is between two versions.
+ </summary>
+ <param name="package">The package to check.</param>
+ <param name="minVersion">The version the package should at least have.</param>
+ <param name="maxVersion">The version the package should maximum have.</param>
+ <returns>
+ <see langword="true"/> if the given package is between <paramref name="minVersion"/>
+ and <paramref name="maxVersion"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.Exists(System.String)">
+ <summary>
+ Determines whether the given package exists.
+ </summary>
+ <param name="package">The package to check.</param>
+ <returns>
+ <see langword="true"/> if the package exists; otherwise,
+ <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>pkg-config</c> could not be started.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.RunPkgConfigBool(NAnt.Core.Types.Argument[])">
+ <summary>
+ Runs pkg-config with the specified arguments and returns a
+ <see cref="T:System.Boolean"/> based on the exit code.
+ </summary>
+ <param name="args">The arguments to pass to pkg-config.</param>
+ <returns>
+ <see langword="true"/> if pkg-config exited with exit code 0;
+ otherwise, <see langword="false"/>
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.RunPkgConfigString(NAnt.Core.Types.Argument[])">
+ <summary>
+ Runs pkg-config with the specified arguments and returns the result
+ as a <see cref="T:System.String"/>.
+ </summary>
+ <param name="args">The arguments to pass to pkg-config.</param>
+ <returns>
+ The result of running pkg-config with the specified arguments.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.PkgConfigFunctions.GetTask(System.IO.Stream)">
+ <summary>
+ Factory method to return a new instance of ExecTask
+ </summary>
+ <param name="stream"></param>
+ <returns></returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.GetLength(System.String)">
+ <summary>
+ Returns the length of the specified string.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string's length.
+ </returns>
+ <example>
+ <code>string::get-length('foo') ==> 3</code>
+ </example>
+ <example>
+ <code>string::get-length('') ==> 0</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.Substring(System.String,System.Int32,System.Int32)">
+ <summary>
+ Returns a substring of the specified string.
+ </summary>
+ <param name="str">input string</param>
+ <param name="startIndex">position of the start of the substring</param>
+ <param name="length">the length of the substring</param>
+ <returns>
+ <para>
+ If the <paramref name="length"/> is greater than zero, the
+ function returns a substring starting at character position
+ <paramref name="startIndex"/> with a length of <paramref name="length"/>
+ characters.
+ </para>
+ <para>
+ If the <paramref name="length"/> is equal to zero, the function
+ returns an empty string.
+ </para>
+ </returns>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="startIndex"/> or <paramref name="length"/> is less than zero.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="startIndex"/> is greater than the length of <paramref name="str"/>.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="startIndex"/> plus <paramref name="length"/> indicates a position not within <paramref name="str"/>.</exception>
+ <example>
+ <code>string::substring('testing string', 0, 4) ==> 'test'</code>
+ </example>
+ <example>
+ <code>string::substring('testing string', 8, 3) ==> 'str'</code>
+ </example>
+ <example>
+ <code>string::substring('testing string', 8, 0) ==> ''</code>
+ </example>
+ <example>
+ <code>string::substring('testing string', -1, 5) ==> ERROR</code>
+ </example>
+ <example>
+ <code>string::substring('testing string', 8, -1) ==> ERROR</code>
+ </example>
+ <example>
+ <code>string::substring('testing string', 5, 17) ==> ERROR</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.StartsWith(System.String,System.String)">
+ <summary>
+ Tests whether the specified string starts with the specified prefix
+ string.
+ </summary>
+ <param name="s1">test string</param>
+ <param name="s2">prefix string</param>
+ <returns>
+ <see langword="true" /> when <paramref name="s2" /> is a prefix for
+ the string <paramref name="s1" />. Meaning, the characters at the
+ beginning of <paramref name="s1" /> are identical to
+ <paramref name="s2" />; otherwise, <see langword="false" />.
+ </returns>
+ <remarks>
+ This function performs a case-sensitive word search using the
+ invariant culture.
+ </remarks>
+ <example>
+ <code>string::starts-with('testing string', 'test') ==> true</code>
+ </example>
+ <example>
+ <code>string::starts-with('testing string', 'testing') ==> true</code>
+ </example>
+ <example>
+ <code>string::starts-with('testing string', 'string') ==> false</code>
+ </example>
+ <example>
+ <code>string::starts-with('test', 'testing string') ==> false</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.EndsWith(System.String,System.String)">
+ <summary>
+ Tests whether the specified string ends with the specified suffix
+ string.
+ </summary>
+ <param name="s1">test string</param>
+ <param name="s2">suffix string</param>
+ <returns>
+ <see langword="true" /> when <paramref name="s2" /> is a suffix for
+ the string <paramref name="s1" />. Meaning, the characters at the
+ end of <paramref name="s1" /> are identical to
+ <paramref name="s2" />; otherwise, <see langword="false" />.
+ </returns>
+ <remarks>
+ This function performs a case-sensitive word search using the
+ invariant culture.
+ </remarks>
+ <example>
+ <code>string::ends-with('testing string', 'string') ==> true</code>
+ </example>
+ <example>
+ <code>string::ends-with('testing string', '') ==> true</code>
+ </example>
+ <example>
+ <code>string::ends-with('testing string', 'bring') ==> false</code>
+ </example>
+ <example>
+ <code>string::ends-with('string', 'testing string') ==> false</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.ToLower(System.String)">
+ <summary>
+ Returns the specified string converted to lowercase.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string <paramref name="s" /> in lowercase.
+ </returns>
+ <remarks>
+ The casing rules of the invariant culture are used to convert the
+ <paramref name="s" /> to lowercase.
+ </remarks>
+ <example>
+ <code>string::to-lower('testing string') ==> 'testing string'</code>
+ </example>
+ <example>
+ <code>string::to-lower('Testing String') ==> 'testing string'</code>
+ </example>
+ <example>
+ <code>string::to-lower('Test 123') ==> 'test 123'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.ToUpper(System.String)">
+ <summary>
+ Returns the specified string converted to uppercase.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string <paramref name="s" /> in uppercase.
+ </returns>
+ <remarks>
+ The casing rules of the invariant culture are used to convert the
+ <paramref name="s" /> to uppercase.
+ </remarks>
+ <example>
+ <code>string::to-upper('testing string') ==> 'TESTING STRING'</code>
+ </example>
+ <example>
+ <code>string::to-upper('Testing String') ==> 'TESTING STRING'</code>
+ </example>
+ <example>
+ <code>string::to-upper('Test 123') ==> 'TEST 123'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.Replace(System.String,System.String,System.String)">
+ <summary>
+ Returns a string corresponding to the replacement of a given string
+ with another in the specified string.
+ </summary>
+ <param name="str">input string</param>
+ <param name="oldValue">A <see cref="T:System.String"/> to be replaced.</param>
+ <param name="newValue">A <see cref="T:System.String"/> to replace all occurrences of <paramref name="oldValue"/>.</param>
+ <returns>
+ A <see cref="T:System.String"/> equivalent to <paramref name="str"/> but
+ with all instances of <paramref name="oldValue"/> replaced with
+ <paramref name="newValue"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="oldValue"/> is an empty string.</exception>
+ <remarks>
+ This function performs a word (case-sensitive and culture-sensitive)
+ search to find <paramref name="oldValue"/>.
+ </remarks>
+ <example>
+ <code>string::replace('testing string', 'test', 'winn') ==> 'winning string'</code>
+ </example>
+ <example>
+ <code>string::replace('testing string', 'foo', 'winn') ==> 'testing string'</code>
+ </example>
+ <example>
+ <code>string::replace('testing string', 'ing', '') ==> 'test str'</code>
+ </example>
+ <example>
+ <code>string::replace('banana', 'ana', 'ana') ==> 'banana'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.Contains(System.String,System.String)">
+ <summary>
+ Tests whether the specified string contains the given search string.
+ </summary>
+ <param name="source">The string to search.</param>
+ <param name="value">The string to locate within <paramref name="source" />.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="value" /> is found in
+ <paramref name="source" />; otherwise, <see langword="false" />.
+ </returns>
+ <remarks>
+ This function performs a case-sensitive word search using the
+ invariant culture.
+ </remarks>
+ <example>
+ <code>string::contains('testing string', 'test') ==> true</code>
+ </example>
+ <example>
+ <code>string::contains('testing string', '') ==> true</code>
+ </example>
+ <example>
+ <code>string::contains('testing string', 'Test') ==> false</code>
+ </example>
+ <example>
+ <code>string::contains('testing string', 'foo') ==> false</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.IndexOf(System.String,System.String)">
+ <summary>
+ Returns the position of the first occurrence in the specified string
+ of the given search string.
+ </summary>
+ <param name="source">The string to search.</param>
+ <param name="value">The string to locate within <paramref name="source" />.</param>
+ <returns>
+ <para>
+ The lowest-index position of <paramref name="value" /> in
+ <paramref name="source" /> if it is found, or -1 if <paramref name="source" />
+ does not contain <paramref name="value" />.
+ </para>
+ <para>
+ If <paramref name="value" /> is an empty string, the return value
+ will always be <c>0</c>.
+ </para>
+ </returns>
+ <remarks>
+ This function performs a case-sensitive word search using the
+ invariant culture.
+ </remarks>
+ <example>
+ <code>string::index-of('testing string', 'test') ==> 0</code>
+ </example>
+ <example>
+ <code>string::index-of('testing string', '') ==> 0</code>
+ </example>
+ <example>
+ <code>string::index-of('testing string', 'Test') ==> -1</code>
+ </example>
+ <example>
+ <code>string::index-of('testing string', 'ing') ==> 4</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.LastIndexOf(System.String,System.String)">
+ <summary>
+ Returns the position of the last occurrence in the specified string
+ of the given search string.
+ </summary>
+ <param name="source">The string to search.</param>
+ <param name="value">The string to locate within <paramref name="source" />.</param>
+ <returns>
+ <para>
+ The highest-index position of <paramref name="value" /> in
+ <paramref name="source" /> if it is found, or -1 if <paramref name="source" />
+ does not contain <paramref name="value" />.
+ </para>
+ <para>
+ If <paramref name="value" /> is an empty string, the return value
+ is the last index position in <paramref name="source" />.
+ </para>
+ </returns>
+ <remarks>
+ This function performs a case-sensitive word search using the
+ invariant culture.
+ </remarks>
+ <example>
+ <code>string::last-index-of('testing string', 'test') ==> 0</code>
+ </example>
+ <example>
+ <code>string::last-index-of('testing string', '') ==> 13</code>
+ </example>
+ <example>
+ <code>string::last-index-of('testing string', 'Test') ==> -1</code>
+ </example>
+ <example>
+ <code>string::last-index-of('testing string', 'ing') ==> 11</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.PadLeft(System.String,System.Int32,System.String)">
+ <summary>
+ Returns the given string left-padded to the given length.
+ </summary>
+ <param name="s">The <see cref="T:System.String"/> that needs to be left-padded.</param>
+ <param name="totalWidth">The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.</param>
+ <param name="paddingChar">A Unicode padding character.</param>
+ <returns>
+ If the length of <paramref name="s"/> is at least
+ <paramref name="totalWidth"/>, then a new <see cref="T:System.String"/> identical
+ to <paramref name="s"/> is returned. Otherwise, <paramref name="s"/>
+ will be padded on the left with as many <paramref name="paddingChar"/>
+ characters as needed to create a length of <paramref name="totalWidth"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="totalWidth"/> is less than zero.</exception>
+ <remarks>
+ Note that only the first character of <paramref name="paddingChar"/>
+ will be used when padding the result.
+ </remarks>
+ <example>
+ <code>string::pad-left('test', 10, ' ') ==> ' test'</code>
+ </example>
+ <example>
+ <code>string::pad-left('test', 10, 'test') ==> 'tttttttest'</code>
+ </example>
+ <example>
+ <code>string::pad-left('test', 3, ' ') ==> 'test'</code>
+ </example>
+ <example>
+ <code>string::pad-left('test', -4, ' ') ==> ERROR</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.PadRight(System.String,System.Int32,System.String)">
+ <summary>
+ Returns the given string right-padded to the given length.
+ </summary>
+ <param name="s">The <see cref="T:System.String"/> that needs to be right-padded.</param>
+ <param name="totalWidth">The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.</param>
+ <param name="paddingChar">A Unicode padding character.</param>
+ <returns>
+ If the length of <paramref name="s"/> is at least
+ <paramref name="totalWidth"/>, then a new <see cref="T:System.String"/> identical
+ to <paramref name="s"/> is returned. Otherwise, <paramref name="s"/>
+ will be padded on the right with as many <paramref name="paddingChar"/>
+ characters as needed to create a length of <paramref name="totalWidth"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="totalWidth"/> is less than zero.</exception>
+ <remarks>
+ Note that only the first character of <paramref name="paddingChar"/>
+ will be used when padding the result.
+ </remarks>
+ <example>
+ <code>string::pad-right('test', 10, ' ') ==> 'test '</code>
+ </example>
+ <example>
+ <code>string::pad-right('test', 10, 'abcd') ==> 'testaaaaaa'</code>
+ </example>
+ <example>
+ <code>string::pad-right('test', 3, ' ') ==> 'test'</code>
+ </example>
+ <example>
+ <code>string::pad-right('test', -3, ' ') ==> ERROR</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.Trim(System.String)">
+ <summary>
+ Returns the given string trimmed of whitespace.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string <paramref name="s" /> with any leading or trailing
+ white space characters removed.
+ </returns>
+ <example>
+ <code>string::trim(' test ') ==> 'test'</code>
+ </example>
+ <example>
+ <code>string::trim('\t\tfoo \r\n') ==> 'foo'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.TrimStart(System.String)">
+ <summary>
+ Returns the given string trimmed of leading whitespace.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string <paramref name="s" /> with any leading
+ whites pace characters removed.
+ </returns>
+ <example>
+ <code>string::trim-start(' test ') ==> 'test '</code>
+ </example>
+ <example>
+ <code>string::trim-start('\t\tfoo \r\n') ==> 'foo \r\n'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.StringFunctions.TrimEnd(System.String)">
+ <summary>
+ Returns the given string trimmed of trailing whitespace.
+ </summary>
+ <param name="s">input string</param>
+ <returns>
+ The string <paramref name="s" /> with any trailing
+ white space characters removed.
+ </returns>
+ <example>
+ <code>string::trim-end(' test ') ==> ' test'</code>
+ </example>
+ <example>
+ <code>string::trim-end('\t\tfoo \r\n') ==> '\t\tfoo'</code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTotalDays(System.TimeSpan)">
+ <summary>
+ Returns the total number of days represented by the specified
+ <see cref="T:System.TimeSpan"/>, expressed in whole and fractional days.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The total number of days represented by the given <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTotalHours(System.TimeSpan)">
+ <summary>
+ Returns the total number of hours represented by the specified
+ <see cref="T:System.TimeSpan"/>, expressed in whole and fractional hours.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The total number of hours represented by the given <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTotalMinutes(System.TimeSpan)">
+ <summary>
+ Returns the total number of minutes represented by the specified
+ <see cref="T:System.TimeSpan"/>, expressed in whole and fractional minutes.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The total number of minutes represented by the given <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTotalSeconds(System.TimeSpan)">
+ <summary>
+ Returns the total number of seconds represented by the specified
+ <see cref="T:System.TimeSpan"/>, expressed in whole and fractional seconds.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The total number of seconds represented by the given <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTotalMilliseconds(System.TimeSpan)">
+ <summary>
+ Returns the total number of milliseconds represented by the specified
+ <see cref="T:System.TimeSpan"/>, expressed in whole and fractional milliseconds.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The total number of milliseconds represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetDays(System.TimeSpan)">
+ <summary>
+ Returns the number of whole days represented by the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of whole days represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ <example>
+ <para>
+ Remove all files that have not been modified in the last 7 days from directory "binaries".</para>
+ <code>
+ <![CDATA[
+ <foreach item="File" in="binaries" property="filename">
+ <if test="${timespan::get-days(datetime::now() - file::get-last-write-time(filename)) >= 7}">
+ <delete file="${filename}" />
+ </if>
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetHours(System.TimeSpan)">
+ <summary>
+ Returns the number of whole hours represented by the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of whole hours represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetMinutes(System.TimeSpan)">
+ <summary>
+ Returns the number of whole minutes represented by the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of whole minutes represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetSeconds(System.TimeSpan)">
+ <summary>
+ Returns the number of whole seconds represented by the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of whole seconds represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetMilliseconds(System.TimeSpan)">
+ <summary>
+ Returns the number of whole milliseconds represented by the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of whole milliseconds represented by the given
+ <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.GetTicks(System.TimeSpan)">
+ <summary>
+ Returns the number of ticks contained in the specified
+ <see cref="T:System.TimeSpan"/>.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/>.</param>
+ <returns>
+ The number of ticks contained in the given <see cref="T:System.TimeSpan"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromDays(System.Double)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified number
+ of days, where the specification is accurate to the nearest millisecond.
+ </summary>
+ <param name="value">A number of days, accurate to the nearest millisecond.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromHours(System.Double)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified number
+ of hours, where the specification is accurate to the nearest
+ millisecond.
+ </summary>
+ <param name="value">A number of hours, accurate to the nearest millisecond.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromMinutes(System.Double)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified number
+ of minutes, where the specification is accurate to the nearest
+ millisecond.
+ </summary>
+ <param name="value">A number of minutes, accurate to the nearest millisecond.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromSeconds(System.Double)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified number
+ of seconds, where the specification is accurate to the nearest
+ millisecond.
+ </summary>
+ <param name="value">A number of seconds, accurate to the nearest millisecond.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromMilliseconds(System.Double)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified number
+ of milliseconds.
+ </summary>
+ <param name="value">A number of milliseconds.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanFunctions.FromTicks(System.Int64)">
+ <summary>
+ Returns a <see cref="T:System.TimeSpan"/> that represents a specified time,
+ where the specification is in units of ticks.
+ </summary>
+ <param name="value">A number of ticks that represent a time.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that represents <paramref name="value"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanConversionFunctions.Parse(System.String)">
+ <summary>
+ Constructs a <see cref="T:System.TimeSpan"/> from a time indicated by a
+ specified string.
+ </summary>
+ <param name="s">A string.</param>
+ <returns>
+ A <see cref="T:System.TimeSpan"/> that corresponds to <paramref name="s"/>.
+ </returns>
+ <exception cref="T:System.FormatException"><paramref name="s"/> has an invalid format.</exception>
+ <exception cref="T:System.OverflowException">At least one of the hours, minutes, or seconds components is outside its valid range.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.TimeSpanConversionFunctions.ToString(System.TimeSpan)">
+ <summary>
+ Converts the specified <see cref="T:System.TimeSpan"/> to its equivalent
+ string representation.
+ </summary>
+ <param name="value">A <see cref="T:System.TimeSpan"/> to convert.</param>
+ <returns>
+ The string representation of <paramref name="value"/>. The format
+ of the return value is of the form: [-][d.]hh:mm:ss[.ff].
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionFunctions.GetMajor(System.Version)">
+ <summary>
+ Gets the value of the major component of a given version.
+ </summary>
+ <param name="version">A version.</param>
+ <returns>
+ The major version number.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)"/>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/>
+ <seealso cref="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionFunctions.GetMinor(System.Version)">
+ <summary>
+ Gets the value of the minor component of a given version.
+ </summary>
+ <param name="version">A version.</param>
+ <returns>
+ The minor version number.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)"/>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/>
+ <seealso cref="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionFunctions.GetBuild(System.Version)">
+ <summary>
+ Gets the value of the build component of a given version.
+ </summary>
+ <param name="version">A version.</param>
+ <returns>
+ The build number, or -1 if the build number is undefined.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)"/>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/>
+ <seealso cref="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionFunctions.GetRevision(System.Version)">
+ <summary>
+ Gets the value of the revision component of a given version.
+ </summary>
+ <param name="version">A version.</param>
+ <returns>
+ The revision number, or -1 if the revision number is undefined.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)"/>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/>
+ <seealso cref="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)"/>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionConversionFunctions.Parse(System.String)">
+ <summary>
+ Converts the specified string representation of a version to
+ its <see cref="T:System.Version"/> equivalent.
+ </summary>
+ <param name="version">A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.').</param>
+ <returns>
+ A <see cref="T:System.Version"/> instance representing the specified
+ <see cref="T:System.String"/>.
+ </returns>
+ <exception cref="T:System.ArgumentException"><paramref name="version"/> has fewer than two components or more than four components.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">A major, minor, build, or revision component is less than zero.</exception>
+ <exception cref="T:System.FormatException">At least one component of <paramref name="version"/> does not parse to a decimal integer.</exception>
+ </member>
+ <member name="M:NAnt.Core.Functions.VersionConversionFunctions.ToString(System.Version)">
+ <summary>
+ Converts the specified <see cref="T:System.Version"/> to its equivalent
+ string representation.
+ </summary>
+ <param name="value">A <see cref="T:System.Version"/> to convert.</param>
+ <returns>
+ The string representation of the values of the major, minor, build,
+ and revision components of the specified <see cref="T:System.Version"/>.
+ </returns>
+ <seealso cref="M:NAnt.Core.Functions.AssemblyNameFunctions.GetVersion(System.Reflection.AssemblyName)"/>
+ <seealso cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/>
+ <seealso cref="M:NAnt.Core.Functions.OperatingSystemFunctions.GetVersion(System.OperatingSystem)"/>
+ </member>
+ <member name="T:NAnt.Core.Tasks.AttribTask">
+ <summary>
+ Changes the file attributes of a file or set of files and directories.
+ </summary>
+ <remarks>
+ <para>
+ <see cref="T:NAnt.Core.Tasks.AttribTask"/> does not have the concept of turning
+ attributes off. Instead you specify all the attributes that you want
+ turned on and the rest are turned off by default.
+ </para>
+ <para>
+ Refer to the <see cref="T:System.IO.FileAttributes"/> enumeration in the .NET SDK
+ for more information about file attributes.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Set the <c>read-only</c> file attribute for the specified file in
+ the project directory.
+ </para>
+ <code>
+ <![CDATA[
+ <attrib file="myfile.txt" readonly="true" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Set the <c>normal</c> file attribute for the specified file.
+ </para>
+ <code>
+ <![CDATA[
+ <attrib file="myfile.txt" normal="true" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Set the <c>normal</c> file attribute for all executable files in
+ the current project directory and sub-directories.
+ </para>
+ <code>
+ <![CDATA[
+ <attrib normal="true">
+ <fileset>
+ <include name="**/*.exe" />
+ <include name="bin" />
+ </fileset>
+ </attrib>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Task">
+ <summary>
+ Provides the abstract base class for tasks.
+ </summary>
+ <remarks>
+ A task is a piece of code that can be executed.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Task.Execute">
+ <summary>
+ Executes the task unless it is skipped.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Task.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to be logged.</param>
+ <remarks>
+ <para>
+ The actual logging is delegated to the project.
+ </para>
+ <para>
+ If the <see cref="P:NAnt.Core.Task.Verbose"/> attribute is set on the task and a
+ message is logged with level <see cref="F:NAnt.Core.Level.Verbose"/>, the
+ priority of the message will be increased to <see cref="F:NAnt.Core.Level.Info"/>
+ when the threshold of the build log is <see cref="F:NAnt.Core.Level.Info"/>.
+ </para>
+ <para>
+ This will allow individual tasks to run in verbose mode while
+ the build log itself is still configured with threshold
+ <see cref="F:NAnt.Core.Level.Info"/>.
+ </para>
+ <para>
+ The threshold of the project is not taken into account to determine
+ whether a message should be passed to the logging infrastructure,
+ as build listeners might be interested in receiving all messages.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Task.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a formatted message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ <para>
+ The actual logging is delegated to the project.
+ </para>
+ <para>
+ If the <see cref="P:NAnt.Core.Task.Verbose"/> attribute is set on the task and a
+ message is logged with level <see cref="F:NAnt.Core.Level.Verbose"/>, the
+ priority of the message will be increased to <see cref="F:NAnt.Core.Level.Info"/>.
+ when the threshold of the build log is <see cref="F:NAnt.Core.Level.Info"/>.
+ </para>
+ <para>
+ This will allow individual tasks to run in verbose mode while
+ the build log itself is still configured with threshold
+ <see cref="F:NAnt.Core.Level.Info"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Task.IsLogEnabledFor(NAnt.Core.Level)">
+ <summary>
+ Determines whether build output is enabled for the given
+ <see cref="T:NAnt.Core.Level"/>.
+ </summary>
+ <param name="messageLevel">The <see cref="T:NAnt.Core.Level"/> to check.</param>
+ <returns>
+ <see langword="true"/> if messages with the given <see cref="T:NAnt.Core.Level"/>
+ should be passed on to the logging infrastructure; otherwise,
+ <see langword="false"/>.
+ </returns>
+ <remarks>
+ The threshold of the project is not taken into account to determine
+ whether a message should be passed to the logging infrastructure,
+ as build listeners might be interested in receiving all messages.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Task.InitializeTaskConfiguration">
+ <summary>
+ Initializes the configuration of the task using configuration
+ settings retrieved from the NAnt configuration file.
+ </summary>
+ <remarks>
+ TO-DO : Remove this temporary hack when a permanent solution is
+ available for loading the default values from the configuration
+ file if a build element is constructed from code.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Task.Initialize">
+ <summary>Initializes the task.</summary>
+ </member>
+ <member name="M:NAnt.Core.Task.InitializeTask(System.Xml.XmlNode)">
+ <summary>Initializes the task.</summary>
+ </member>
+ <member name="M:NAnt.Core.Task.ExecuteTask">
+ <summary>Executes the task.</summary>
+ </member>
+ <member name="M:NAnt.Core.Task.GetAttributeConfigurationNode(NAnt.Core.FrameworkInfo,System.String)">
+ <summary>
+ Locates the XML node for the specified attribute in either the
+ configuration section of the extension assembly or the.project.
+ </summary>
+ <param name="attributeName">The name of attribute for which the XML configuration node should be located.</param>
+ <param name="framework">The framework to use to obtain framework specific information, or <see langword="null" /> if no framework specific information should be used.</param>
+ <returns>
+ The XML configuration node for the specified attribute, or
+ <see langword="null" /> if no corresponding XML node could be
+ located.
+ </returns>
+ <remarks>
+ If there's a valid current framework, the configuration section for
+ that framework will first be searched. If no corresponding
+ configuration node can be located in that section, the framework-neutral
+ section of the project configuration node will be searched.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Task.FailOnError">
+ <summary>
+ Determines if task failure stops the build, or is just reported.
+ The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.Verbose">
+ <summary>
+ Determines whether the task should report detailed build log messages.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.IfDefined">
+ <summary>
+ If <see langword="true" /> then the task will be executed; otherwise,
+ skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Task.IfDefined"/>. If <see langword="false"/>
+ then the task will be executed; otherwise, skipped. The default is
+ <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.Name">
+ <summary>
+ The name of the task.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.LogPrefix">
+ <summary>
+ The prefix used when sending messages to the log.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Task.Threshold">
+ <summary>
+ Gets or sets the log threshold for this <see cref="T:NAnt.Core.Task"/>. By
+ default the threshold of a task is <see cref="F:NAnt.Core.Level.Debug"/>,
+ causing no messages to be filtered in the task itself.
+ </summary>
+ <value>
+ The log threshold level for this <see cref="T:NAnt.Core.Task"/>.
+ </value>
+ <remarks>
+ When the threshold of a <see cref="T:NAnt.Core.Task"/> is higher than the
+ threshold of the <see cref="T:NAnt.Core.Project"/>, then all messages will
+ still be delivered to the build listeners.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Task.TaskBuilder">
+ <summary>
+ Returns the TaskBuilder used to construct an instance of this
+ <see cref="T:NAnt.Core.Task"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.File">
+ <summary>
+ The name of the file which will have its attributes set. This is
+ provided as an alternate to using the task's fileset.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.AttribFileSet">
+ <summary>
+ All the matching files and directories in this fileset will have
+ their attributes set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.ArchiveAttrib">
+ <summary>
+ Set the archive attribute. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.HiddenAttrib">
+ <summary>
+ Set the hidden attribute. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.NormalAttrib">
+ <summary>
+ Set the normal file attributes. This attribute is only valid if used
+ alone. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.ReadOnlyAttrib">
+ <summary>
+ Set the read-only attribute. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AttribTask.SystemAttrib">
+ <summary>
+ Set the system attribute. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.AvailableTask">
+ <summary>
+ Checks if a resource is available at runtime.
+ </summary>
+ <remarks>
+ <para>
+ The specified property is set to <see langword="true"/> if the
+ requested resource is available at runtime, and <see langword="false"/>
+ if the resource is not available.
+ </para>
+ <note>
+ we advise you to use the following functions instead:
+ </note>
+ <list type="table">
+ <listheader>
+ <term>Function</term>
+ <description>Description</description>
+ </listheader>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.FileFunctions.Exists(System.String)"/></term>
+ <description>Determines whether the specified file exists.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.DirectoryFunctions.Exists(System.String)"/></term>
+ <description>Determines whether the given path refers to an existing directory on disk.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.FrameworkFunctions.Exists(System.String)"/></term>
+ <description>Checks whether the specified framework exists..</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.FrameworkFunctions.SdkExists(System.String)"/></term>
+ <description>Checks whether the SDK for the specified framework is installed.</description>
+ </item>
+ </list>
+ </remarks>
+ <example>
+ <para>
+ Sets the <c>myfile.present</c> property to <see langword="true"/> if the
+ file is available on the filesystem and <see langword="false"/> if the
+ file is not available.
+ </para>
+ <code>
+ <![CDATA[
+ <available type="File" resource="myfile.txt" property="myfile.present" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Sets the <c>build.dir.present</c> property to <see langword="true"/>
+ if the directory is available on the filesystem and <see langword="false"/>
+ if the directory is not available.
+ </para>
+ <code>
+ <![CDATA[
+ <available type="Directory" resource="build" property="build.dir.present" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Sets the <c>mono-0.21.framework.present</c> property to <see langword="true"/>
+ if the Mono 0.21 framework is available on the current system and
+ <see langword="false"/> if the framework is not available.
+ </para>
+ <code>
+ <![CDATA[
+ <available type="Framework" resource="mono-0.21" property="mono-0.21.framework.present" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Sets the <c>net-1.1.frameworksdk.present</c> property to <see langword="true"/>
+ if the .NET 1.1 Framework SDK is available on the current system and
+ <see langword="false"/> if the SDK is not available.
+ </para>
+ <code>
+ <![CDATA[
+ <available type="FrameworkSDK" resource="net-1.1" property="net-1.1.frameworksdk.present" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.ExecuteTask">
+ <summary>
+ Executes the task.
+ </summary>
+ <remarks>
+ <para>
+ Sets the property identified by <see cref="P:NAnt.Core.Tasks.AvailableTask.PropertyName"/> to
+ <see langword="true"/> when the resource exists and to <see langword="false"/>
+ when the resource doesn't exist.
+ </para>
+ </remarks>
+ <exception cref="T:NAnt.Core.BuildException">The availability of the resource could not be evaluated.</exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.Evaluate">
+ <summary>
+ Evaluates the availability of a resource.
+ </summary>
+ <returns>
+ <see langword="true"/> if the resource is available; otherwise,
+ <see langword="false"/>.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">The availability of the resource could not be evaluated.</exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.CheckFile">
+ <summary>
+ Checks if the file specified in the <see cref="P:NAnt.Core.Tasks.AvailableTask.Resource"/> property is
+ available on the filesystem.
+ </summary>
+ <returns>
+ <see langword="true"/> when the file exists; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.CheckDirectory">
+ <summary>
+ Checks if the directory specified in the <see cref="P:NAnt.Core.Tasks.AvailableTask.Resource"/>
+ property is available on the filesystem.
+ </summary>
+ <returns>
+ <see langword="true"/> when the directory exists; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.CheckFramework">
+ <summary>
+ Checks if the framework specified in the <see cref="P:NAnt.Core.Tasks.AvailableTask.Resource"/>
+ property is available on the current system.
+ </summary>
+ <returns>
+ <see langword="true"/> when the framework is available; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.AvailableTask.CheckFrameworkSDK">
+ <summary>
+ Checks if the SDK for the framework specified in the <see cref="P:NAnt.Core.Tasks.AvailableTask.Resource"/>
+ property is available on the current system.
+ </summary>
+ <returns>
+ <see langword="true"/> when the SDK for the specified framework is
+ available; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AvailableTask.Resource">
+ <summary>
+ The resource which must be available.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AvailableTask.Type">
+ <summary>
+ The type of resource which must be present.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.AvailableTask.PropertyName">
+ <summary>
+ The property that must be set if the resource is available.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.AvailableTask.ResourceType">
+ <summary>
+ Defines the possible resource checks.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.AvailableTask.ResourceType.File">
+ <summary>
+ Determines whether a given file exists.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.AvailableTask.ResourceType.Directory">
+ <summary>
+ Determines whether a given directory exists.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.AvailableTask.ResourceType.Framework">
+ <summary>
+ Determines whether a given framework is available.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.AvailableTask.ResourceType.FrameworkSDK">
+ <summary>
+ Determines whether a given SDK is available.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CallTask">
+ <summary>
+ Calls a NAnt target in the current project.
+ </summary>
+ <remarks>
+ <para>
+ When the <see cref="T:NAnt.Core.Tasks.CallTask"/> is used to execute a target, both that
+ target and all its dependent targets will be re-executed.
+ </para>
+ <para>
+ To avoid dependent targets from being executed more than once, two
+ options are available:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ Add an "unless" attribute with value "${<see href="../functions/target.has-executed.html">target::has-executed</see>('<c><target name></c>')}"
+ to the dependent targets.
+ </description>
+ </item>
+ <item>
+ <description>
+ Set the <see cref="P:NAnt.Core.Tasks.CallTask.CascadeDependencies"/> attribute on the
+ <see cref="T:NAnt.Core.Tasks.CallTask"/> to <see langword="false "/> (<c>recommended</c>).
+ </description>
+ </item>
+ </list>
+ </remarks>
+ <example>
+ <para>
+ Call the target "build".
+ </para>
+ <code>
+ <![CDATA[
+ <call target="build" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ This shows how a project could 'compile' a debug and release build
+ using a common compile target.
+ </para>
+ <code>
+ <![CDATA[
+ <project default="build">
+ <property name="debug" value="false" />
+ <target name="init">
+ <echo message="initializing" />
+ </target>
+ <target name="compile" depends="init">
+ <echo message="compiling with debug = ${debug}" />
+ </target>
+ <target name="build">
+ <property name="debug" value="false" />
+ <call target="compile" />
+ <property name="debug" value="true" />
+ <call target="compile" />
+ </target>
+ </project>
+ ]]>
+ </code>
+ <para>
+ The <see cref="P:NAnt.Core.Tasks.CallTask.CascadeDependencies"/> parameter of the
+ <see cref="T:NAnt.Core.Tasks.CallTask"/> defaults to <see langword="true"/>,
+ causing the "init" target to be executed for both
+ the "debug" and "release" build.
+ </para>
+ <para>
+ This results in the following build log:
+ </para>
+ <code>
+ build:
+
+ init:
+
+ [echo] initializing
+
+ compile:
+
+ [echo] compiling with debug = false
+
+ init:
+
+ [echo] initializing
+
+ compile:
+
+ [echo] compiling with debug = true
+
+ BUILD SUCCEEDED
+ </code>
+ <para>
+ If the "init" should only be executed once, set the
+ <see cref="P:NAnt.Core.Tasks.CallTask.CascadeDependencies"/> attribute of the <see cref="T:NAnt.Core.Tasks.CallTask"/>
+ to <see langword="false"/>.
+ </para>
+ <para>
+ The build log would then look like this:
+ </para>
+ <code>
+ build:
+
+ init:
+
+ [echo] initializing
+
+ compile:
+
+ [echo] compiling with debug = false
+
+ compile:
+
+ [echo] compiling with debug = true
+
+ BUILD SUCCEEDED
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CallTask.ExecuteTask">
+ <summary>
+ Executes the specified target.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CallTask.Initialize">
+ <summary>
+ Makes sure the <see cref="T:NAnt.Core.Tasks.CallTask"/> is not calling its own
+ parent.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CallTask.TargetName">
+ <summary>
+ NAnt target to call.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CallTask.ForceExecute">
+ <summary>
+ Force an execute even if the target has already been executed. The
+ default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CallTask.CascadeDependencies">
+ <summary>
+ Execute the specified targets dependencies -- even if they have been
+ previously executed. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.ChooseTask">
+ <summary>
+ <para>
+ Executes an alternate set of task or type definition depending on
+ conditions that are individually set on each group.
+ </para>
+ </summary>
+ <remarks>
+ <para>
+ The <see cref="T:NAnt.Core.Tasks.ChooseTask"/> selects one among a number of possible
+ alternatives. It consists of a sequence of <c><when></c> elements
+ followed by an optional <c><otherwise></c> element.
+ </para>
+ <para>
+ Each <c><when></c> element has a single attribute, test, which
+ specifies an expression. The content of the <c><when></c> and
+ <c><otherwise></c> elements is a set of nested tasks.
+ </para>
+ <para>
+ The content of the first, and only the first, <c><when></c>
+ element whose test is <see langword="true"/> is executed. If no
+ <c><when></c> element is <see langword="true"/>, the
+ content of the <c><otherwise></c> element is executed.
+ If no <c><when></c> element is <see langword="true"/>, and no
+ <c><otherwise></c> element is present, nothing is done.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Execute alternate set of tasks depending on the configuration being
+ built.
+ </para>
+ <code>
+ <![CDATA[
+ <choose>
+ <when test="${build.config == 'Debug'}">
+ <!-- compile app in debug configuration -->
+ ...
+ </when>
+ <when test="${build.config == 'Release'}">
+ <!-- compile app in release configuration -->
+ ...
+ </when>
+ <otherwise>
+ <fail>Build configuration '${build.config}' is not supported!</fail>
+ </otherwise>
+ </choose>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define a <c>sources</c> patternset holding an alternate set of patterns
+ depending on the configuration being built.
+ </para>
+ <code>
+ <![CDATA[
+ <choose>
+ <when test="${build.config == 'Debug'}">
+ <patternset id="sources">
+ <include name="**/*.cs" />
+ </patternset>
+ </when>
+ <when test="${build.config == 'Release'}">
+ <patternset id="sources">
+ <include name="**/*.cs" />
+ <exclude name="**/Instrumentation/*.cs" />
+ </patternset>
+ </when>
+ <otherwise>
+ <fail>Build configuration '${build.config}' is not supported!</fail>
+ </otherwise>
+ </choose>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ChooseTask.AddCondition(NAnt.Core.Tasks.ChooseTask.When)">
+ <summary>
+ One or more alternative sets of tasks to execute.
+ </summary>
+ <param name="when">The set of tasks to add.</param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ChooseTask.AddFallback(NAnt.Core.ElementContainer)">
+ <summary>
+ The set of tasks to execute if none of the <see cref="T:NAnt.Core.Tasks.ChooseTask.When"/>
+ elements are <see langword="true"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ChooseTask.IsFallbackDefined">
+ <summary>
+ Gets a value indicating whether a fallback element is defined.
+ </summary>
+ <value>
+ <see langword="true" /> if a fallback element is defined; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Tasks.ChooseTask.When">
+ <summary>
+ Groups a set of tasks to execute when a condition is met.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.ElementContainer">
+ <summary>
+ Executes embedded tasks/elements in the order in which they are defined.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ElementContainer.ExecuteChildTasks">
+ <summary>
+ Creates and executes the embedded (child XML nodes) elements.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.ElementContainer.CustomXmlProcessing">
+ <summary>
+ Gets a value indicating whether the element is performing additional
+ processing using the <see cref="T:System.Xml.XmlNode"/> that was use to
+ initialize the element.
+ </summary>
+ <value>
+ <see langword="true"/>, as a <see cref="T:NAnt.Core.ElementContainer"/> is
+ responsable for creating tasks from the nested build elements.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ChooseTask.When.Test">
+ <summary>
+ Used to test arbitrary boolean expression.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CopyTask">
+ <summary>
+ Copies a file, a directory, or set of files to a new file or directory.
+ </summary>
+ <remarks>
+ <para>
+ Files are only copied if the source file is newer than the destination
+ file, or if the destination file does not exist. However, you can
+ explicitly overwrite files with the <see cref="P:NAnt.Core.Tasks.CopyTask.Overwrite"/> attribute.
+ </para>
+ <para>
+ Entire directory structures can be copied to a new location. For this
+ to happen, the following criteria must be met:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ Everything in the fileset is included
+ </description>
+ </item>
+ <item>
+ <description>
+ The directory structure is not flattened
+ </description>
+ </item>
+ <item>
+ <description>
+ Empty directories are included
+ </description>
+ </item>
+ <item>
+ <description>
+ Destination directory does not exist
+ </description>
+ </item>
+ </list>
+ <para>
+ If any of these items are not met, then the files within the source
+ directory will be copied over instead of the entire directory structure.
+ </para>
+ <para>
+ When a <see cref="T:NAnt.Core.Types.FileSet"/> is used to select files or directories to
+ copy, the <see cref="P:NAnt.Core.Tasks.CopyTask.ToDirectory"/> attribute must be set. Files that are
+ located under the base directory of the <see cref="T:NAnt.Core.Types.FileSet"/> will
+ be copied to a directory under the destination directory matching the
+ path relative to the base directory of the <see cref="T:NAnt.Core.Types.FileSet"/>,
+ unless the <see cref="P:NAnt.Core.Tasks.CopyTask.Flatten"/> attribute is set to
+ <see langword="true"/>.
+ </para>
+ <para>
+ Files that are not located under the the base directory of the
+ <see cref="T:NAnt.Core.Types.FileSet"/> will be copied directly under to the destination
+ directory, regardless of the value of the <see cref="P:NAnt.Core.Tasks.CopyTask.Flatten"/>
+ attribute.
+ </para>
+ <h4>Encoding</h4>
+ <para>
+ Unless an encoding is specified, the encoding associated with the
+ system's current ANSI code page is used.
+ </para>
+ <para>
+ An UTF-8, little-endian Unicode, and big-endian Unicode encoded text
+ file is automatically recognized, if the file starts with the
+ appropriate byte order marks.
+ </para>
+ <note>
+ If you employ filters in your copy operation, you should limit the copy
+ to text files. Binary files will be corrupted by the copy operation.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Copy a single file while changing its encoding from "latin1" to
+ "utf-8".
+ </para>
+ <code>
+ <![CDATA[
+ <copy
+ file="myfile.txt"
+ tofile="mycopy.txt"
+ inputencoding="latin1"
+ outputencoding="utf-8" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Copy a set of files to a new directory.</para>
+ <code>
+ <![CDATA[
+ <copy todir="${build.dir}">
+ <fileset basedir="bin">
+ <include name="*.dll" />
+ </fileset>
+ </copy>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Copy a set of files to a directory, replacing <c>@TITLE@</c> with
+ "Foo Bar" in all files.
+ </para>
+ <code>
+ <![CDATA[
+ <copy todir="../backup/dir">
+ <fileset basedir="src_dir">
+ <include name="**/*" />
+ </fileset>
+ <filterchain>
+ <replacetokens>
+ <token key="TITLE" value="Foo Bar" />
+ </replacetokens>
+ </filterchain>
+ </copy>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Copy an entire directory and its contents.
+ </para>
+ <code>
+ <![CDATA[
+ <copy todir="target/dir">
+ <fileset basedir="source/dir"/>
+ </copy>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.#ctor">
+ <summary>
+ Initialize new instance of the <see cref="T:NAnt.Core.Tasks.CopyTask"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.Initialize">
+ <summary>
+ Checks whether the task is initialized with valid attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.ExecuteTask">
+ <summary>
+ Executes the Copy task.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">A file that has to be copied does not exist or could not be copied.</exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.DoFileOperations">
+ <summary>
+ Actually does the file copies.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.SourceFile">
+ <summary>
+ The file to copy.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.ToFile">
+ <summary>
+ The file to copy to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.ToDirectory">
+ <summary>
+ The directory to copy to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.Overwrite">
+ <summary>
+ Overwrite existing files even if the destination files are newer.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.Flatten">
+ <summary>
+ Ignore directory structure of source directory, copy all files into
+ a single directory, specified by the <see cref="P:NAnt.Core.Tasks.CopyTask.ToDirectory"/>
+ attribute. The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.IncludeEmptyDirs">
+ <summary>
+ Copy any empty directories included in the <see cref="T:NAnt.Core.Types.FileSet"/>.
+ The default is <see langword="true"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.CopyFileSet">
+ <summary>
+ Used to select the files to copy. To use a <see cref="T:NAnt.Core.Types.FileSet"/>,
+ the <see cref="P:NAnt.Core.Tasks.CopyTask.ToDirectory"/> attribute must be set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.Filters">
+ <summary>
+ Chain of filters used to alter the file's content as it is copied.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.InputEncoding">
+ <summary>
+ The encoding to use when reading files. The default is the system's
+ current ANSI code page.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.OutputEncoding">
+ <summary>
+ The encoding to use when writing the files. The default is
+ the encoding of the input file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileCopyMap">
+ <summary>
+ The set of files to perform a file operation on.
+ </summary>
+ <remarks>
+ <para>
+ FileCopyMap should now be considered a readonly hashtable. Any changes to
+ this property will not be taken into account during the file operation
+ task. To interact with the file operation, use the
+ <see cref="P:NAnt.Core.Tasks.CopyTask.OperationMap"/> property.
+ </para>
+ <para>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the absolute path of
+ the destination file and the value is a <see cref="T:NAnt.Core.Tasks.CopyTask.FileDateInfo"/>
+ holding the path and last write time of the most recently updated
+ source file that is selected to be copied or moved to the
+ destination file.
+ </para>
+ <para>
+ On Windows, the <see cref="T:System.Collections.Hashtable"/> is case-insensitive.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.OperationMap">
+ <summary>
+ Gets the operation map containing all the files/directories to
+ perform file operations on.
+ </summary>
+ <remarks>
+ <para>
+ The type of class for this object inherits from KeyedCollection
+ and is structured so that the key of this collection contains the
+ full path of the target file/location while the value contains
+ the <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> object
+ with the operation details.
+ </para>
+ <para>
+ On Windows, the <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>
+ is case-insensitive.
+ </para>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CopyTask.FileDateInfo">
+ <summary>
+ Holds the absolute paths and last write time of a given file.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileDateInfo.#ctor(System.IO.FileSystemInfo)">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileDateInfo"/> class
+ for the specified <paramref name="file"/>.
+ </summary>
+ <param name="file">
+ A <see cref="T:System.IO.FileSystemInfo"/> object containing
+ the full path and last write time of the file the object represents.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileDateInfo.#ctor(System.String,System.DateTime)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Tasks.CopyTask.FileDateInfo"/>
+ class for the specified file and last write time.
+ </summary>
+ <param name="path">The absolute path of the file.</param>
+ <param name="lastWriteTime">The last write time of the file.</param>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileDateInfo.Path">
+ <summary>
+ Gets the absolute path of the current file.
+ </summary>
+ <value>
+ The absolute path of the current file.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileDateInfo.LastWriteTime">
+ <summary>
+ Gets the time when the current file was last written to.
+ </summary>
+ <value>
+ The time when the current file was last written to.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CopyTask.FileOperation">
+ <summary>
+ Provides methods and properties to properly manage file operations for
+ NAnt file system based tasks (such as CopyTask and MoveTask).
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.#ctor(System.IO.FileSystemInfo,System.IO.FileSystemInfo)">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> class with the
+ source and target locations specified.
+ </summary>
+ <param name="source">
+ A <see cref="T:System.IO.FileSystemInfo"/> object representing the file/location
+ where the file operation will start.
+ </param>
+ <param name="target">
+ A <see cref="T:System.IO.FileSystemInfo"/> object representing the file/location
+ where the file operation will end.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.NormalizeTargetAttributes">
+ <summary>
+ Normalizes the attributes of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.SourceEqualsTarget">
+ <summary>
+ Checks to see whether or not the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>
+ matches the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/>.
+ </summary>
+ <remarks>
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.Comparer"/> is
+ used to check path equality.
+ </remarks>
+ <returns>
+ <c>true</c> if both paths match; otherwise <c>false</c>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.SourceIsIdenticalToTarget">
+ <summary>
+ Checks to see whether or not the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>
+ is identical to the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/>.
+ </summary>
+ <remarks>
+ The difference between this method and SourceEqualsTarget is
+ that the casing of the path is never ignored regardless of
+ operating system.
+ </remarks>
+ <returns>
+ <c>true</c> if both paths are identical; otherwise <c>false</c>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.UpdateSource(System.IO.FileSystemInfo)">
+ <summary>
+ Updates the source of a given instance based on the
+ <see cref="P:System.IO.FileSystemInfo.LastWriteTime"/>.
+ <remarks>
+ If the LastWriteTime property of the <paramref name="newSource"/>
+ is greater than the LastWriteTime property of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>, then
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/> is
+ replaced with <paramref name="newSource"/>.
+ </remarks>
+ </summary>
+ <param name="newSource">
+ The new <see cref="T:System.IO.FileSystemInfo"/> to replace
+ the current <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>
+ object.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.ToString">
+ <summary>
+ Returns a <see cref="T:System.String"/> that represents the current
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/>.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> that represents the current
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.TargetIsOutdated(System.IO.FileSystemInfo,System.IO.FileSystemInfo)">
+ <summary>
+ Checks to see if a given <see cref="T:System.IO.FileSystemInfo"/>
+ target is considered outdated.
+ </summary>
+ <param name="source">
+ A <see cref="T:System.IO.FileSystemInfo"/> used for comparison purposes
+ against <paramref name="target"/>.
+ </param>
+ <param name="target">
+ The <see cref="T:System.IO.FileSystemInfo"/> to check.
+ </param>
+ <returns>
+ <c>true</c> if the target file is considered out of date; otherwise
+ <c>false</c>
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.TargetDirectoryDoesNotExist(System.IO.DirectoryInfo,System.IO.DirectoryInfo)">
+ <summary>
+ Checks to see if the target directory does not exist or that
+ it does match the source directory name but not string casing.
+ </summary>
+ <param name="source">
+ Source directory to check against <paramref name="target"/>.
+ </param>
+ <param name="target">
+ The target directory to validate.
+ </param>
+ <returns>
+ <c>true</c> if the target directory does not exist or matches the source
+ directory name but not casing; otherwise <c>false</c>
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperation.IsFileSystemType``1(System.IO.FileSystemInfo)">
+ <summary>
+ Checks to see whether <paramref name="item"/> is a file type or
+ a directory type.
+ </summary>
+ <typeparam name="TFileSystemInfo">
+ The FileSystemInfo type used to compare <paramref name="item"/> with.
+ </typeparam>
+ <param name="item">
+ The object to check.
+ </param>
+ <returns>
+ <c>true</c> if <paramref name="item"/> is the same type as
+ <typeparamref name="TFileSystemInfo"/>; otherwise, <c>false</c>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.Comparer">
+ <summary>
+ Gets or sets the string comparer to use when comparing
+ the source path to the target path.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.Source">
+ <summary>
+ Gets the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo">
+ <summary>
+ Gets the details of the source path.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceType">
+ <summary>
+ Gets the type of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.SourceInfo"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.OperationType">
+ <summary>
+ Gets the type of the file operation an instance of
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> represents.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.Outdated">
+ <summary>
+ Gets a value indicating whether
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/> is
+ outdated.
+ </summary>
+ <value>
+ <c>true</c> if
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/> is
+ outdated (or simply a directory); otherwise, <c>false</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.Target">
+ <summary>
+ Gets the full path of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo">
+ <summary>
+ Gets the details of the target path.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetType">
+ <summary>
+ Gets the type of
+ <see cref="P:NAnt.Core.Tasks.CopyTask.FileOperation.TargetInfo"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CopyTask.FileOperationMap">
+ <summary>
+ A collection class used to track all of the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> objects for
+ a given file operation task (such as the CopyTask or MoveTask).
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.CopyTask.FileOperationMap._stringComparer">
+ <summary>
+ The StringComparer used when comparing file paths.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.#ctor">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>
+ class that uses the default string comparer.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.#ctor(System.StringComparer)">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>
+ class that uses the specified string comparer.
+ </summary>
+ <param name="comparer">
+ The string comparer to use when comparing keys in the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.ContainsKey(System.String)">
+ <summary>
+ Determines whether the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/> contains the
+ specified key.
+ </summary>
+ <param name="key">
+ The key to locate in the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>.
+ </param>
+ <returns>
+ <c>true</c> if the <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/>
+ contains an element with the specified key; otherwise, <c>false</c>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.CountDirectoryOperations">
+ <summary>
+ Counts the number of directory operations in a collection.
+ </summary>
+ <returns>
+ The number of directory operations performed by this collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.CountFileOperations">
+ <summary>
+ Counts the number of file operations in a collection.
+ </summary>
+ <returns>
+ The number of file operations performed by this collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.ConvertToHashtable">
+ <summary>
+ Converts the current instance of
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/> to
+ the old style FileCopyMap hashtable.
+ </summary>
+ <returns>
+ The contents of
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/> in a
+ new hashtable.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.GetKeyForItem(NAnt.Core.Tasks.CopyTask.FileOperation)">
+ <summary>
+ Extracts the key from the specified
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> element.
+ </summary>
+ <param name="item">
+ The <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> from which to
+ extract the key.
+ </param>
+ <returns>
+ The key for the specified
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.InsertItem(System.Int32,NAnt.Core.Tasks.CopyTask.FileOperation)">
+ <summary>
+ Inserts an element into the
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperationMap"/> at the
+ specified index.
+ </summary>
+ <param name="index">
+ The zero-based index at which item should be inserted.
+ </param>
+ <param name="item">
+ The <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> to insert.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.CopyTask.FileOperationMap.SetItem(System.Int32,NAnt.Core.Tasks.CopyTask.FileOperation)">
+ <summary>
+ Replaces the item at the specified index with the specified item.
+ </summary>
+ <param name="index">
+ The zero-based index of the item to be replaced.
+ </param>
+ <param name="item">
+ The new item.
+ </param>
+ </member>
+ <member name="T:NAnt.Core.Tasks.CopyTask.OperationType">
+ <summary>
+ Used to identify the type of operation a given
+ <see cref="T:NAnt.Core.Tasks.CopyTask.FileOperation"/> represent.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.CopyTask.OperationType.FileToFile">
+ <summary>
+ Indicates that the operation is from file to file.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.CopyTask.OperationType.FileToDirectory">
+ <summary>
+ Indicates that the operation is from file to directory.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.CopyTask.OperationType.DirectoryToDirectory">
+ <summary>
+ Indicates that the operation is from directory to directory.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.DeleteTask">
+ <summary>
+ Deletes a file, fileset or directory.
+ </summary>
+ <remarks>
+ <para>
+ Deletes either a single file, all files in a specified directory and
+ its sub-directories, or a set of files specified by one or more filesets.
+ </para>
+ <para>
+ If the <see cref="P:NAnt.Core.Tasks.DeleteTask.File"/> or <see cref="P:NAnt.Core.Tasks.DeleteTask.Directory"/> attribute is
+ set then the fileset contents will be ignored. To delete the files
+ in the fileset ommit the <see cref="P:NAnt.Core.Tasks.DeleteTask.File"/> and <see cref="P:NAnt.Core.Tasks.DeleteTask.Directory"/>
+ attributes in the <c><delete></c> element.
+ </para>
+ <para>
+ If the specified file or directory does not exist, no error is
+ reported.
+ </para>
+ <note>
+ Read-only files cannot be deleted. Use the <see cref="T:NAnt.Core.Tasks.AttribTask"/>
+ first to remove the read-only attribute.
+ </note>
+ </remarks>
+ <example>
+ <para>Delete a single file.</para>
+ <code>
+ <![CDATA[
+ <delete file="myfile.txt" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Delete a directory and the contents within. If the directory does not
+ exist, no error is reported.
+ </para>
+ <code>
+ <![CDATA[
+ <delete dir="${build.dir}" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Delete a set of files.
+ </para>
+ <code>
+ <![CDATA[
+ <delete>
+ <fileset>
+ <include name="${basename}-??.exe" />
+ <include name="${basename}-??.pdb" />
+ </fileset>
+ </delete>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.DeleteTask.Initialize">
+ <summary>
+ Ensures the supplied attributes are valid.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.DeleteTask.File">
+ <summary>
+ The file to delete.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.DeleteTask.Directory">
+ <summary>
+ The directory to delete.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.DeleteTask.IncludeEmptyDirs">
+ <summary>
+ Remove any empty directories included in the <see cref="T:NAnt.Core.Types.FileSet"/>.
+ The default is <see langword="true"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.DeleteTask.DeleteFileSet">
+ <summary>
+ All the files in the file set will be deleted.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.DeleteTask.Verbose">
+ <summary>
+ Controls whether to show the name of each deleted file or directory.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.DescriptionTask">
+ <summary>
+ An empty task that allows a build file to contain a description.
+ </summary>
+ <example>
+ <para>Set a description.</para>
+ <code>
+ <![CDATA[
+ <description>This is a description.</description>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Tasks.EchoTask">
+ <summary>
+ Writes a message to the build log or a specified file.
+ </summary>
+ <remarks>
+ <para>
+ The message can be specified using the <see cref="P:NAnt.Core.Tasks.EchoTask.Message"/> attribute
+ or as inline content. If neither is included - or the message contains
+ only whitespace - then an empty message will be emitted in the output.
+ </para>
+ <para>
+ Macros in the message will be expanded.
+ </para>
+ <para>
+ When writing to a file, the <see cref="P:NAnt.Core.Tasks.EchoTask.MessageLevel"/> attribute is
+ ignored.
+ </para>
+ <note>
+ Since NAnt 0.86, a newline will no longer be implictly added when
+ writing a message to a file.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Writes a message with level <see cref="F:NAnt.Core.Level.Debug"/> to the build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="Hello, World!" level="Debug" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Writes a two-line message to the build log using inline content.
+ </para>
+ <code>
+ <![CDATA[
+ <echo>First line
+ Second line</echo>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Writes a two-line message to the build log using the <see cref="P:NAnt.Core.Tasks.EchoTask.Message"/> attribute.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message='First line
+ Second line</echo>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Writes a message with expanded macro to the build log.
+ </para>
+ <code>
+ <![CDATA[
+ <echo message="Base build directory = ${nant.project.basedir}" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Functionally equivalent to the previous example.
+ </para>
+ <code>
+ <![CDATA[
+ <echo>Base build directory = ${nant.project.basedir}</echo>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Writes the previous message to a file in the project directory,
+ overwriting the file if it exists.
+ </para>
+ <code>
+ <![CDATA[
+ <echo file="buildmessage.txt">Base build directory = ${nant.project.basedir}</echo>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.EchoTask.ExecuteTask">
+ <summary>
+ Outputs the message to the build log or the specified file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.Encoding">
+ <summary>
+ The encoding to use when writing message to a file. The default is
+ UTF-8 encoding without a Byte Order Mark (BOM).
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.Message">
+ <summary>
+ The message to output.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.Contents">
+ <summary>
+ Gets or sets the inline content that should be output.
+ </summary>
+ <value>
+ The inline content that should be output.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.File">
+ <summary>
+ The file to write the message to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.Append">
+ <summary>
+ Determines whether the <see cref="T:NAnt.Core.Tasks.EchoTask"/> should append to the
+ file, or overwrite it. By default, the file will be overwritten.
+ </summary>
+ <value>
+ <see langword="true"/> if output should be appended to the file;
+ otherwise, <see langword="false"/>. The default is
+ <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.EchoTask.MessageLevel">
+ <summary>
+ The logging level with which the message should be output. The default
+ is <see cref="F:NAnt.Core.Level.Info"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.ExecTask">
+ <summary>
+ Executes a system command.
+ </summary>
+ <remarks>
+ <para>
+ Use of nested <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Arguments"/> element(s)
+ is advised over the <see cref="P:NAnt.Core.Tasks.ExecTask.CommandLineArguments"/> parameter, as
+ it supports automatic quoting and can resolve relative to absolute
+ paths.
+ </para>
+ </remarks>
+ <example>
+ <para>Ping "nant.sourceforge.net".</para>
+ <code>
+ <![CDATA[
+ <exec program="ping">
+ <arg value="nant.sourceforge.net" />
+ </exec>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Execute a java application using <c>IKVM.NET</c> that requires the
+ Apache FOP jars, and a set of custom jars.
+ </para>
+ <code>
+ <![CDATA[
+ <path id="fop-classpath">
+ <pathelement file="${fop.dist.dir}/build/fop.jar" />
+ <pathelement file="${fop.dist.dir}/lib/xercesImpl-2.2.1.jar" />
+ <pathelement file="${fop.dist.dir}/lib/avalon-framework-cvs-20020806.jar" />
+ <pathelement file="${fop.dist.dir}/lib/batik.jar" />
+ </path>
+ <exec program="ikvm.exe" useruntimeengine="true">
+ <arg value="-cp" />
+ <arg>
+ <path>
+ <pathelement dir="conf" />
+ <path refid="fop-classpath" />
+ <pathelement file="lib/mylib.jar" />
+ <pathelement file="lib/otherlib.zip" />
+ </path>
+ </arg>
+ <arg value="org.me.MyProg" />
+ </exec>
+ ]]>
+ </code>
+ <para>
+ Assuming the base directory of the build file is "c:\ikvm-test" and
+ the value of the "fop.dist.dir" property is "c:\fop", then the value
+ of the <c>-cp</c> argument that is passed to<c>ikvm.exe</c> is
+ "c:\ikvm-test\conf;c:\fop\build\fop.jar;conf;c:\fop\lib\xercesImpl-2.2.1.jar;c:\fop\lib\avalon-framework-cvs-20020806.jar;c:\fop\lib\batik.jar;c:\ikvm-test\lib\mylib.jar;c:\ikvm-test\lib\otherlib.zip"
+ on a DOS-based system.
+ </para>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Tasks.ExternalProgramBase">
+ <summary>
+ Provides the abstract base class for tasks that execute external applications.
+ </summary>
+ <remarks>
+ <para>
+ When a <see cref="T:NAnt.Core.Attributes.ProgramLocationAttribute"/> is applied to the
+ deriving class and <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.ExeName"/> does not return an
+ absolute path, then the program to execute will first be searched for
+ in the location specified by <see cref="P:NAnt.Core.Attributes.ProgramLocationAttribute.LocationType"/>.
+ </para>
+ <para>
+ If the program does not exist in that location, then the list of tool
+ paths of the current target framework will be scanned in the order in
+ which they are defined in the NAnt configuration file.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Tasks.ExternalProgramBase.UnknownExitCode">
+ <summary>
+ Defines the exit code that will be returned by <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.ExitCode"/>
+ if the process could not be started, or did not exit (in time).
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.ExternalProgramBase._lockObject">
+ <summary>
+ Will be used to ensure thread-safe operations.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask">
+ <summary>
+ Starts the external process and captures its output.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The external process did not finish within the configured timeout.</para>
+ <para>-or-</para>
+ <para>The exit code of the external process indicates a failure.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Updates the <see cref="T:System.Diagnostics.ProcessStartInfo"/> of the specified
+ <see cref="T:System.Diagnostics.Process"/>.
+ </summary>
+ <param name="process">The <see cref="T:System.Diagnostics.Process"/> of which the <see cref="T:System.Diagnostics.ProcessStartInfo"/> should be updated.</param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.StartProcess">
+ <summary>
+ Starts the process and handles errors.
+ </summary>
+ <returns>The <see cref="T:System.Diagnostics.Process"/> that was started.</returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.StreamReaderThread_Output">
+ <summary>
+ Reads from the stream until the external program is ended.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.StreamReaderThread_Error">
+ <summary>
+ Reads from the stream until the external program is ended.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExternalProgramBase.DetermineFilePath">
+ <summary>
+ Determines the path of the external program that should be executed.
+ </summary>
+ <returns>
+ A fully qualifies pathname including the program name.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">The task is not available or not configured for the current framework.</exception>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ExeName">
+ <summary>
+ The name of the executable that should be used to launch the
+ external program.
+ </summary>
+ <value>
+ The name of the executable that should be used to launch the external
+ program, or <see langword="null" /> if no name is specified.
+ </value>
+ <remarks>
+ If available, the configured value in the NAnt configuration
+ file will be used if no name is specified.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ <remarks>
+ Override in derived classes to explicitly set the location of the
+ external tool.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.Output">
+ <summary>
+ Gets the file to which the standard output should be redirected.
+ </summary>
+ <value>
+ The file to which the standard output should be redirected, or
+ <see langword="null" /> if the standard output should not be
+ redirected.
+ </value>
+ <remarks>
+ The default implementation will never allow the standard output
+ to be redirected to a file. Deriving classes should override this
+ property to change this behaviour.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.OutputAppend">
+ <summary>
+ Gets a value indicating whether output will be appended to the
+ <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Output"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if output should be appended to the <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Output"/>;
+ otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.BaseDirectory">
+ <summary>
+ Gets the working directory for the application.
+ </summary>
+ <value>
+ The working directory for the application.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.TimeOut">
+ <summary>
+ The maximum amount of time the application is allowed to execute,
+ expressed in milliseconds. Defaults to no time-out.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.Arguments">
+ <summary>
+ The command-line arguments for the external program.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine">
+ <summary>
+ Specifies whether the external program is a managed application
+ which should be executed using a runtime engine, if configured.
+ The default is <see langword="false"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if the external program should be executed
+ using a runtime engine; otherwise, <see langword="false"/>.
+ </value>
+ <remarks>
+ <para>
+ The value of <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine"/> is only used from
+ <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Managed"/>, and then only if its value is set to
+ <see cref="F:NAnt.Core.Types.ManagedExecution.Default"/>. In which case
+ <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Managed"/> returns <see cref="F:NAnt.Core.Types.ManagedExecution.Auto"/>
+ if <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine"/> is <see langword="true"/>.
+ </para>
+ <para>
+ In all other cases, the value of <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine"/>
+ is ignored.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.Managed">
+ <summary>
+ Specifies whether the external program should be treated as a managed
+ application, possibly forcing it to be executed under the currently
+ targeted version of the CLR.
+ </summary>
+ <value>
+ A <see cref="T:NAnt.Core.Types.ManagedExecution"/> indicating how the program should
+ be treated.
+ </value>
+ <remarks>
+ <para>
+ If <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Managed"/> is set to <see cref="F:NAnt.Core.Types.ManagedExecution.Default"/>,
+ which is the default value, and <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine"/> is
+ <see langword="true"/> then <see cref="F:NAnt.Core.Types.ManagedExecution.Auto"/>
+ is returned.
+ </para>
+ <para>
+ When the changing <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Managed"/> to <see cref="F:NAnt.Core.Types.ManagedExecution.Default"/>,
+ then <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.UseRuntimeEngine"/> is set to <see langword="false"/>;
+ otherwise, it is changed to <see langword="true"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.OutputWriter">
+ <summary>
+ Gets or sets the <see cref="T:System.IO.TextWriter"/> to which standard output
+ messages of the external program will be written.
+ </summary>
+ <value>
+ The <see cref="T:System.IO.TextWriter"/> to which standard output messages of
+ the external program will be written.
+ </value>
+ <remarks>
+ By default, standard output messages wil be written to the build log
+ with level <see cref="F:NAnt.Core.Level.Info"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ErrorWriter">
+ <summary>
+ Gets or sets the <see cref="T:System.IO.TextWriter"/> to which error output
+ of the external program will be written.
+ </summary>
+ <value>
+ The <see cref="T:System.IO.TextWriter"/> to which error output of the external
+ program will be written.
+ </value>
+ <remarks>
+ By default, error output wil be written to the build log with level
+ <see cref="F:NAnt.Core.Level.Warning"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ExitCode">
+ <summary>
+ Gets the value that the process specified when it terminated.
+ </summary>
+ <value>
+ The code that the associated process specified when it terminated,
+ or <c>-1000</c> if the process could not be started or did not
+ exit (in time).
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.ProcessId">
+ <summary>
+ Gets the unique identifier for the spawned application.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.Spawn">
+ <summary>
+ Gets or sets a value indicating whether the application should be
+ spawned. If you spawn an application, its output will not be logged
+ by NAnt. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExternalProgramBase.CommandLine">
+ <summary>
+ Gets the command-line arguments, separated by spaces.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExecTask.Initialize">
+ <summary>
+ Performs additional checks after the task has been initialized.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException"><see cref="P:NAnt.Core.Tasks.ExecTask.FileName"/> does not hold a valid file name.</exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.ExecTask.ExecuteTask">
+ <summary>
+ Executes the external program.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.FileName">
+ <summary>
+ The program to execute without command arguments.
+ </summary>
+ <remarks>
+ The path will not be evaluated to a full path using the project
+ base directory.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.CommandLineArguments">
+ <summary>
+ The command-line arguments for the program. These will be
+ passed as is to the external program. When quoting is necessary,
+ these must be explictly set as part of the value. Consider using
+ nested <see cref="P:NAnt.Core.Tasks.ExternalProgramBase.Arguments"/> elements instead.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.EnvironmentSet">
+ <summary>
+ Environment variables to pass to the program.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.WorkingDirectory">
+ <summary>
+ The directory in which the command will be executed.
+ </summary>
+ <value>
+ The directory in which the command will be executed. The default
+ is the project's base directory.
+ </value>
+ <remarks>
+ <para>
+ The working directory will be evaluated relative to the project's
+ base directory if it is relative.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.ResultProperty">
+ <summary>
+ <para>
+ The name of a property in which the exit code of the program should
+ be stored. Only of interest if <see cref="P:NAnt.Core.Task.FailOnError"/> is
+ <see langword="false"/>.
+ </para>
+ <para>
+ If the exit code of the program is "-1000" then the program could
+ not be started, or did not exit (in time).
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.UseRuntimeEngine">
+ <summary>
+ Specifies whether the external program should be executed using a
+ runtime engine, if configured. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the external program should be executed
+ using a runtime engine; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.Managed">
+ <summary>
+ Specifies whether the external program is a managed application
+ which should be executed using a runtime engine, if configured.
+ The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the external program should be executed
+ using a runtime engine; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.BaseDirectory">
+ <summary>
+ The directory the program is in.
+ </summary>
+ <remarks>
+ <value>
+ The directory the program is in. The default is the project's base
+ directory.
+ </value>
+ <para>
+ The basedir will be evaluated relative to the project's base
+ directory if it is relative.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.Output">
+ <summary>
+ The file to which the standard output will be redirected.
+ </summary>
+ <remarks>
+ By default, the standard output is redirected to the console.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.OutputAppend">
+ <summary>
+ Gets or sets a value indicating whether output should be appended
+ to the output file. The default is <see langword="false"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if output should be appended to the <see cref="P:NAnt.Core.Tasks.ExecTask.Output"/>;
+ otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.Spawn">
+ <summary>
+ Gets or sets a value indicating whether the application should be
+ spawned. If you spawn an application, its output will not be logged
+ by NAnt. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.ExecTask.ProcessIdProperty">
+ <summary>
+ The name of a property in which the unique identifier of the spawned
+ application should be stored. Only of interest if <see cref="P:NAnt.Core.Tasks.ExecTask.Spawn"/>
+ is <see langword="true"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.FailTask">
+ <summary>
+ Exits the current build by throwing a <see cref="T:NAnt.Core.BuildException"/>,
+ optionally printing additional information.
+ </summary>
+ <remarks>
+ <para>
+ The cause of the build failure can be specified using the <see cref="P:NAnt.Core.Tasks.FailTask.Message"/>
+ attribute or as inline content.
+ </para>
+ <para>
+ Macros in the message will be expanded.
+ </para>
+ </remarks>
+ <example>
+ <para>Exits the current build without giving further information.</para>
+ <code>
+ <![CDATA[
+ <fail />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Exits the current build and writes a message to the build log.</para>
+ <code>
+ <![CDATA[
+ <fail message="Something wrong here." />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Functionally equivalent to the previous example.</para>
+ <code>
+ <![CDATA[
+ <fail>Something wrong here.</fail>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.FailTask.Message">
+ <summary>
+ A message giving further information on why the build exited.
+ </summary>
+ <remarks>
+ Inline content and <see cref="P:NAnt.Core.Tasks.FailTask.Message"/> are mutually exclusive.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.FailTask.Contents">
+ <summary>
+ Gets or sets the inline content that should be output in the build
+ log, giving further information on why the build exited.
+ </summary>
+ <value>
+ The inline content that should be output in the build log.
+ </value>
+ <remarks>
+ Inline content and <see cref="P:NAnt.Core.Tasks.FailTask.Message"/> are mutually exclusive.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Tasks.GetTask">
+ <summary>
+ Gets a particular file from a URL source.
+ </summary>
+ <remarks>
+ <para>
+ Options include verbose reporting and timestamp based fetches.
+ </para>
+ <para>
+ Currently, only HTTP and UNC protocols are supported. FTP support may
+ be added when more pluggable protocols are added to the System.Net
+ assembly.
+ </para>
+ <para>
+ The <see cref="P:NAnt.Core.Tasks.GetTask.UseTimeStamp"/> option enables you to control downloads
+ so that the remote file is only fetched if newer than the local copy.
+ If there is no local copy, the download always takes place. When a file
+ is downloaded, the timestamp of the downloaded file is set to the remote
+ timestamp.
+ </para>
+ <note>
+ This timestamp facility only works on downloads using the HTTP protocol.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Gets the index page of the NAnt home page, and stores it in the file
+ <c>help/index.html</c> relative to the project base directory.
+ </para>
+ <code>
+ <![CDATA[
+ <get src="http://nant.sourceforge.org/" dest="help/index.html" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Gets the index page of a secured web site using the given credentials,
+ while connecting using the specified password-protected proxy server.
+ </para>
+ <code>
+ <![CDATA[
+ <get src="http://password.protected.site/index.html" dest="secure/index.html">
+ <credentials username="user" password="guess" domain="mydomain" />
+ <proxy host="proxy.company.com" port="8080">
+ <credentials username="proxyuser" password="dunno" />
+ </proxy>
+ </get>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.GetTask.Initialize">
+ <summary>
+ Initializes task and ensures the supplied attributes are valid.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.GetTask.ExecuteTask">
+ <summary>
+ This is where the work is done
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.GetTask.TouchFile(System.IO.FileInfo,System.DateTime)">
+ <summary>
+ Sets the timestamp of a given file to a specified time.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.Source">
+ <summary>
+ The URL from which to retrieve a file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.DestinationFile">
+ <summary>
+ The file where to store the retrieved file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.HttpProxy">
+ <summary>
+ If inside a firewall, proxy server/port information
+ Format: {proxy server name}:{port number}
+ Example: proxy.mycompany.com:8080
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.Proxy">
+ <summary>
+ The network proxy to use to access the Internet resource.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.Credentials">
+ <summary>
+ The network credentials used for authenticating the request with
+ the Internet resource.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.IgnoreErrors">
+ <summary>
+ Log errors but don't treat as fatal. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.UseTimeStamp">
+ <summary>
+ Conditionally download a file based on the timestamp of the local
+ copy. HTTP only. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.Timeout">
+ <summary>
+ The length of time, in milliseconds, until the request times out.
+ The default is <c>100000</c> milliseconds.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.GetTask.Certificates">
+ <summary>
+ The security certificates to associate with the request.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.IfTask">
+ <summary>
+ Checks the conditional attributes and executes the children if
+ <see langword="true"/>.
+ </summary>
+ <remarks>
+ <para>
+ If no conditions are checked, all child tasks are executed.
+ </para>
+ <para>
+ If more than one attribute is used, they are &&'d. The first
+ to fail stops the check.
+ </para>
+ <para>
+ The order of condition evaluation is, <see cref="P:NAnt.Core.Tasks.IfTask.TargetNameExists"/>,
+ <see cref="P:NAnt.Core.Tasks.IfTask.PropertyNameExists"/>, <see cref="P:NAnt.Core.Tasks.IfTask.PropertyNameTrue"/>,
+ <see cref="P:NAnt.Core.Tasks.IfTask.UpToDateFile"/>.
+ </para>
+ <note>
+ instead of using the deprecated attributes, we advise you to use the
+ following functions in combination with the <see cref="P:NAnt.Core.Tasks.IfTask.Test"/>
+ attribute:
+ </note>
+ <list type="table">
+ <listheader>
+ <term>Function</term>
+ <description>Description</description>
+ </listheader>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.PropertyFunctions.Exists(System.String)"/></term>
+ <description>Checks whether the specified property exists.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.TargetFunctions.Exists(System.String)"/></term>
+ <description>Checks whether the specified target exists.</description>
+ </item>
+ </list>
+ </remarks>
+ <example>
+ <para>Tests the value of a property using expressions.</para>
+ <code>
+ <![CDATA[
+ <if test="${build.configuration=='release'}">
+ <echo>Build release configuration</echo>
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Tests the the output of a function.</para>
+ <code>
+ <![CDATA[
+ <if test="${not file::exists(filename) or file::get-length(filename) = 0}">
+ <echo message="The version file ${filename} doesn't exist or is empty!" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para><c>(Deprecated)</c> Check that a target exists.</para>
+ <code>
+ <![CDATA[
+ <target name="myTarget" />
+ <if targetexists="myTarget">
+ <echo message="myTarget exists" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para><c>(Deprecated)</c> Check existence of a property.</para>
+ <code>
+ <![CDATA[
+ <if propertyexists="myProp">
+ <echo message="myProp Exists. Value='${myProp}'" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para><c>(Deprecated)</c> Check that a property value is true.</para>
+ <code>
+ <![CDATA[
+ <if propertytrue="myProp">
+ <echo message="myProp is true. Value='${myProp}'" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ <c>(Deprecated)</c> Check that a property exists and is <see langword="true"/>
+ (uses multiple conditions).
+ </para>
+ <code>
+ <![CDATA[
+ <if propertyexists="myProp" propertytrue="myProp">
+ <echo message="myProp is '${myProp}'" />
+ </if>
+ ]]>
+ </code>
+ <para>which is the same as</para>
+ <code>
+ <![CDATA[
+ <if propertyexists="myProp">
+ <if propertytrue="myProp">
+ <echo message="myProp is '${myProp}'" />
+ </if>
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ <c>(Deprecated)</c> Check file dates. If <c>myfile.dll</c> is uptodate,
+ then do stuff.
+ </para>
+ <code>
+ <![CDATA[
+ <if uptodatefile="myfile.dll" comparefile="myfile.cs">
+ <echo message="myfile.dll is newer/same-date as myfile.cs" />
+ </if>
+ ]]>
+ </code>
+ <para>or</para>
+ <code>
+ <![CDATA[
+ <if uptodatefile="myfile.dll">
+ <comparefiles>
+ <include name="*.cs" />
+ </comparefiles>
+ <echo message="myfile.dll is newer/same-date as myfile.cs" />
+ </if>
+ ]]>
+ </code>
+ <para>or</para>
+ <code>
+ <![CDATA[
+ <if>
+ <uptodatefiles>
+ <include name="myfile.dll" />
+ </uptodatefiles>
+ <comparefiles>
+ <include name="*.cs" />
+ </comparefiles>
+ <echo message="myfile.dll is newer/same-date as myfile.cs" />
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.TaskContainer">
+ <summary>
+ Executes embedded tasks in the order in which they are defined.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskContainer.Initialize">
+ <summary>
+ Automatically exclude build elements that are defined on the task
+ from things that get executed, as they are evaluated normally during
+ XML task initialization.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskContainer.ExecuteChildTasks">
+ <summary>
+ Creates and executes the embedded (child XML nodes) elements.
+ </summary>
+ <remarks>
+ Skips any element defined by the host <see cref="T:NAnt.Core.Task"/> that has
+ a <see cref="T:NAnt.Core.Attributes.BuildElementAttribute"/> defined.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.TaskContainer.CustomXmlProcessing">
+ <summary>
+ Gets a value indicating whether the element is performing additional
+ processing using the <see cref="T:System.Xml.XmlNode"/> that was use to
+ initialize the element.
+ </summary>
+ <value>
+ <see langword="true"/>, as a <see cref="T:NAnt.Core.TaskContainer"/> is
+ responsable for creating tasks from the nested build elements.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.UpToDateFile">
+ <summary>
+ The file to compare if uptodate.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.CompareFile">
+ <summary>
+ The file to check against for the uptodate file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.CompareFiles">
+ <summary>
+ The <see cref="T:NAnt.Core.Types.FileSet"/> that contains the comparison files for
+ the <see cref="P:NAnt.Core.Tasks.IfTask.UpToDateFile"/>(s) check.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.UpToDateFiles">
+ <summary>
+ The <see cref="T:NAnt.Core.Types.FileSet"/> that contains the uptodate files for
+ the <see cref="P:NAnt.Core.Tasks.IfTask.CompareFile"/>(s) check.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.PropertyNameTrue">
+ <summary>
+ Used to test whether a property is true.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.PropertyNameExists">
+ <summary>
+ Used to test whether a property exists.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.TargetNameExists">
+ <summary>
+ Used to test whether a target exists.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IfTask.Test">
+ <summary>
+ Used to test arbitrary boolean expression.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.IfNotTask">
+ <summary>
+ The opposite of the <c>if</c> task.
+ </summary>
+ <example>
+ <para>Check that a property does not exist.</para>
+ <code>
+ <![CDATA[
+ <ifnot propertyexists="myProp">
+ <echo message="myProp does not exist."/>
+ </if>
+ ]]>
+ </code>
+ <para>Check that a property value is not true.</para>
+ <code>
+ <![CDATA[
+ <ifnot propertytrue="myProp">
+ <echo message="myProp is not true."/>
+ </if>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Check that a target does not exist.</para>
+ <code>
+ <![CDATA[
+ <ifnot targetexists="myTarget">
+ <echo message="myTarget does not exist."/>
+ </if>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.Core.Tasks.IncludeTask">
+ <summary>
+ Includes an external build file.
+ </summary>
+ <remarks>
+ <para>
+ This task is used to break your build file into smaller chunks. You
+ can load a partial build file and have it included into the build file.
+ </para>
+ <note>
+ Any global (project level) tasks in the included build file are executed
+ when this task is executed. Tasks in target elements are only executed
+ if that target is executed.
+ </note>
+ <note>
+ The project element attributes are ignored.
+ </note>
+ <note>
+ This task can only be in the global (project level) section of the
+ build file.
+ </note>
+ <note>
+ This task can only include files from the file system.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Include a task that fetches the project version from the
+ <c>GetProjectVersion.include</c> build file.
+ </para>
+ <code>
+ <![CDATA[
+ <include buildfile="GetProjectVersion.include" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.Core.Tasks.IncludeTask._includedFileNames">
+ <summary>
+ Used to check for recursived includes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.IncludeTask.Initialize">
+ <summary>
+ Verifies parameters.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.IncludeTask.BuildFileName">
+ <summary>
+ Build file to include.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.LoadFileTask">
+ <summary>
+ Load a text file into a single property.
+ </summary>
+ <remarks>
+ <para>
+ Unless an encoding is specified, the encoding associated with the
+ system's current ANSI code page is used.
+ </para>
+ <para>
+ An UTF-8, little-endian Unicode, and big-endian Unicode encoded text
+ file is automatically recognized, if the file starts with the appropriate
+ byte order marks.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Load file <c>message.txt</c> into property "message".
+ </para>
+ <code>
+ <![CDATA[
+ <loadfile
+ file="message.txt"
+ property="message" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Load a file using the "latin-1" encoding.
+ </para>
+ <code>
+ <![CDATA[
+ <loadfile
+ file="loadfile.xml"
+ property="encoded-file"
+ encoding="iso-8859-1" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Load a file, replacing all <c>@NOW@</c> tokens with the current
+ date/time.
+ </para>
+ <code>
+ <![CDATA[
+ <loadfile file="token.txt" property="token-file">
+ <filterchain>
+ <replacetokens>
+ <token key="NOW" value="${datetime::now()}" />
+ </replacetokens>
+ </filterchain>
+ </loadfile>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadFileTask.File">
+ <summary>
+ The file to load.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadFileTask.Property">
+ <summary>
+ The name of the property to save the content to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadFileTask.Encoding">
+ <summary>
+ The encoding to use when loading the file. The default is the encoding
+ associated with the system's current ANSI code page.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadFileTask.FilterChain">
+ <summary>
+ The filterchain definition to use.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.LoadTasksTask">
+ <summary>
+ Loads tasks form a given assembly or all assemblies in a given directory
+ or <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </summary>
+ <example>
+ <para>
+ Load tasks from a single assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <loadtasks assembly="c:foo\NAnt.Contrib.Tasks.dll" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Scan a single directory for task assemblies.
+ </para>
+ <code>
+ <![CDATA[
+ <loadtasks path="c:\foo" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Use a <see cref="P:NAnt.Core.Tasks.LoadTasksTask.TaskFileSet"/> containing both a directory and an
+ assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <loadtasks>
+ <fileset>
+ <include name="C:\cvs\NAntContrib\build" />
+ <include name="C:\cvs\NAntContrib\build\NAnt.Contrib.Tasks.dll" />
+ </fileset>
+ </loadtasks>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.LoadTasksTask.ExecuteTask">
+ <summary>
+ Executes the Load Tasks task.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">Specified assembly or path does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Tasks.LoadTasksTask.Initialize">
+ <summary>
+ Validates the attributes.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">Both <see cref="P:NAnt.Core.Tasks.LoadTasksTask.AssemblyPath"/> and <see cref="P:NAnt.Core.Tasks.LoadTasksTask.Path"/> are set.</exception>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadTasksTask.AssemblyPath">
+ <summary>
+ An assembly to load tasks from.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadTasksTask.Path">
+ <summary>
+ A directory to scan for task assemblies.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoadTasksTask.TaskFileSet">
+ <summary>
+ Used to select which directories or individual assemblies to scan.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.LoopTask">
+ <summary>
+ Loops over a set of items.
+ </summary>
+ <remarks>
+ <para>
+ Can loop over files in directory, lines in a file, etc.
+ </para>
+ <para>
+ The property value is stored before the loop is done, and restored
+ when the loop is finished.
+ </para>
+ <para>
+ The property is returned to its normal value once it is used. Read-only
+ parameters cannot be overridden in this loop.
+ </para>
+ </remarks>
+ <example>
+ <para>Loops over the files in <c>c:\</c>.</para>
+ <code>
+ <![CDATA[
+ <foreach item="File" in="c:\" property="filename">
+ <echo message="${filename}" />
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Loops over all files in the project directory.</para>
+ <code>
+ <![CDATA[
+ <foreach item="File" property="filename">
+ <in>
+ <items>
+ <include name="**" />
+ </items>
+ </in>
+ <do>
+ <echo message="${filename}" />
+ </do>
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Loops over the folders in <c>c:\</c>.</para>
+ <code>
+ <![CDATA[
+ <foreach item="Folder" in="c:\" property="foldername">
+ <echo message="${foldername}" />
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Loops over all folders in the project directory.</para>
+ <code>
+ <![CDATA[
+ <foreach item="Folder" property="foldername">
+ <in>
+ <items>
+ <include name="**" />
+ </items>
+ </in>
+ <do>
+ <echo message="${foldername}" />
+ </do>
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Loops over a list.</para>
+ <code>
+ <![CDATA[
+ <foreach item="String" in="1 2,3" delim=" ," property="count">
+ <echo message="${count}" />
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Loops over lines in the file <c>properties.csv</c>, where each line
+ is of the format name,value.
+ </para>
+ <code>
+ <![CDATA[
+ <foreach item="Line" in="properties.csv" delim="," property="x,y">
+ <echo message="Read pair ${x}=${y}" />
+ </foreach>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.Property">
+ <summary>
+ The NAnt property name(s) that should be used for the current
+ iterated item.
+ </summary>
+ <remarks>
+ If specifying multiple properties, separate them with a comma.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.ItemType">
+ <summary>
+ The type of iteration that should be done.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.TrimType">
+ <summary>
+ The type of whitespace trimming that should be done. The default
+ is <see cref="F:NAnt.Core.Tasks.LoopTask.LoopTrim.None"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.Source">
+ <summary>
+ The source of the iteration.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.Delimiter">
+ <summary>
+ The deliminator char.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.InElement">
+ <summary>
+ Stuff to operate in. Just like the <see cref="P:NAnt.Core.Tasks.LoopTask.Source"/>
+ attribute, but supports more complicated things like a <see cref="T:NAnt.Core.Types.FileSet"/>
+ and such.
+ <note>
+ Please remove the <see cref="P:NAnt.Core.Tasks.LoopTask.Source"/> attribute if you
+ are using this element.
+ </note>
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.LoopTask.StuffToDo">
+ <summary>
+ Tasks to execute for each matching item.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.LoopTask.LoopTrim.None">
+ <summary>
+ Do not remove any white space characters.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.LoopTask.LoopTrim.End">
+ <summary>
+ Remove all white space characters from the end of the current
+ item.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.LoopTask.LoopTrim.Start">
+ <summary>
+ Remove all white space characters from the beginning of the
+ current item.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.LoopTask.LoopTrim.Both">
+ <summary>
+ Remove all white space characters from the beginning and end of
+ the current item.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.MailTask">
+ <summary>
+ Sends an SMTP message.
+ </summary>
+ <remarks>
+ <para>
+ Text and text files to include in the message body may be specified as
+ well as binary attachments.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Sends an email from <c>nant at sourceforge.net</c> to three recipients
+ with a subject about the attachments. The body of the message will be
+ the combined contents of all <c>.txt</c> files in the base directory.
+ All zip files in the base directory will be included as attachments.
+ The message will be sent using the <c>smtpserver.anywhere.com</c> SMTP
+ server.
+ </para>
+ <code>
+ <![CDATA[
+ <mail
+ from="nant at sourceforge.net"
+ tolist="recipient1 at sourceforge.net"
+ cclist="recipient2 at sourceforge.net"
+ bcclist="recipient3 at sourceforge.net"
+ subject="Msg 7: With attachments"
+ mailhost="smtpserver.anywhere.com">
+ <files>
+ <include name="*.txt" />
+ </files>
+ <attachments>
+ <include name="*.zip" />
+ </attachments>
+ </mail>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Sends an email from a gmail account to multiple recipients. This example
+ illustrates how to add a recipient's name to an email address.
+ </para>
+ <code>
+ <![CDATA[
+ <mail
+ from="+xxxx+ at gmail.com"
+ tolist="(Rep A) recipient1 at sourceforge.net;(Rep B) recipient2 at sourceforge.net"
+ subject="Sample Email"
+ mailhost="smtp.gmail.com"
+ mailport="465"
+ ssl="true"
+ user="+xxxx+ at gmail.com"
+ password="p at ssw0rd!"
+ message="Email from NAnt" />
+ ]]>
+ </code>
+ <para>
+ Email addresses in any of the lists (to, cc, bcc, from) can be in one of
+ the five listed formats below.
+ </para>
+ <list type="bullet">
+ <item>
+ <description>Full Name <address at abcxyz.com></description>
+ </item>
+ <item>
+ <description><address at abcxyz.com> Full Name</description>
+ </item>
+ <item>
+ <description>(Full Name) address at abcxyz.com</description>
+ </item>
+ <item>
+ <description>address at abcxyz.com (Full Name)</description>
+ </item>
+ <item>
+ <description>address at abcxyz.com</description>
+ </item>
+ </list>
+ <para>
+ Remember to use > and < XML entities for the angle brackets.
+ </para>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.Initialize">
+ <summary>
+ Initializes task and ensures the supplied attributes are valid.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.ExecuteTask">
+ <summary>
+ This is where the work is done.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.ReadFile(System.String)">
+ <summary>
+ Reads a text file and returns the content
+ in a string.
+ </summary>
+ <param name="filename">The file to read content of.</param>
+ <returns>
+ The content of the specified file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.ParseAddresses(System.String)">
+ <summary>
+ Converts an email address or a series of email addresses from
+ a <see cref="T:System.String"/> object to a new
+ <see cref="T:System.Net.Mail.MailAddressCollection"/> object.
+ </summary>
+ <param name="addresses">
+ A list of email addresses separated by a semicolon.
+ </param>
+ <returns>
+ A new <see cref="T:System.Net.Mail.MailAddressCollection"/> object
+ containing the addresses from <paramref name="addresses"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.ConvertStringToMailAddress(System.String)">
+ <summary>
+ Converts a <see cref="T:System.String"/> object containing
+ email address information to a
+ <see cref="T:System.Net.Mail.MailAddress"/> object.
+ </summary>
+ <remarks>
+ <para>
+ Email address information passed to this method should be in
+ one of five formats.
+ </para>
+ <list type="bullet">
+ <item>
+ <description>Full Name <address at abcxyz.com></description>
+ </item>
+ <item>
+ <description><address at abcxyz.com> Full Name</description>
+ </item>
+ <item>
+ <description>(Full Name) address at abcxyz.com</description>
+ </item>
+ <item>
+ <description>address at abcxyz.com (Full Name)</description>
+ </item>
+ <item>
+ <description>address at abcxyz.com</description>
+ </item>
+ </list>
+ <para>
+ If the full name of the intended recipient (or sender) is provided,
+ that information is included in the resulting
+ <see cref="T:System.Net.Mail.MailAddress"/> object.
+ </para>
+ </remarks>
+ <param name="address">
+ The string that contains the address to parse.
+ </param>
+ <returns>
+ A new MailAddress object containing the information from
+ <paramref name="address"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MailTask.UnescapeXmlCodes(System.String)">
+ <summary>
+ Simple method that converts an XML escaped string back to its unescaped
+ format.
+ </summary>
+ <param name="value">
+ An html encoded string.
+ </param>
+ <returns>
+ The decoded format of the html encoded string.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.From">
+ <summary>
+ Email address of sender.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.ToList">
+ <summary>
+ Semicolon-separated list of recipient email addresses.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.ReplyTo">
+ <summary>
+ Reply to email address.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.CcList">
+ <summary>
+ Semicolon-separated list of CC: recipient email addresses.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.BccList">
+ <summary>
+ Semicolon-separated list of BCC: recipient email addresses.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Mailhost">
+ <summary>
+ Host name of mail server. The default is <c>localhost</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Port">
+ <summary>
+ The port number used to connect to the mail server.
+ The default is <c>25</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.EnableSsl">
+ <summary>
+ Indicates whether or not ssl should be used to
+ connect to the smtp host.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Message">
+ <summary>
+ Text to send in body of email message.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Subject">
+ <summary>
+ Text to send in subject line of email message.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.IsBodyHtml">
+ <summary>
+ Indicates whether or not the body of the email is in
+ html format. The default value is <c>false</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.UserName">
+ <summary>
+ The username to use when connecting to the smtp host.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Password">
+ <summary>
+ The password to use when connecting to the smtp host.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Format">
+ <summary>
+ Format of the message. The default is <see cref="F:NAnt.Core.Tasks.MailTask.MailFormat.Text"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Files">
+ <summary>
+ Files that are transmitted as part of the body of the email message.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MailTask.Attachments">
+ <summary>
+ Attachments that are transmitted with the message.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.MailTask.MailFormat">
+ <summary>
+ Temporary enum replacement of <see cref="T:System.Web.Mail.MailFormat"/>
+ to ease transition to newer property flags.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.MailTask.MailFormat.Text">
+ <summary>
+ Indicates the body of the email is formatted in plain text.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Tasks.MailTask.MailFormat.Html">
+ <summary>
+ Indicates the body of the email is formatted in html.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.MkDirTask">
+ <summary>
+ Creates a directory and any non-existent parent directory if necessary.
+ </summary>
+ <example>
+ <para>Create the directory <c>build</c>.</para>
+ <code>
+ <![CDATA[
+ <mkdir dir="build" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Create the directory tree <c>one/two/three</c>.</para>
+ <code>
+ <![CDATA[
+ <mkdir dir="one/two/three" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MkDirTask.ExecuteTask">
+ <summary>
+ Creates the directory specified by the <see cref="P:NAnt.Core.Tasks.MkDirTask.Dir"/> property.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">The directory could not be created.</exception>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MkDirTask.Dir">
+ <summary>
+ The directory to create.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.MoveTask">
+ <summary>
+ Moves a file, a directory, or set of files to a new file or directory.
+ </summary>
+ <remarks>
+ <para>
+ Files are only moved if the source file is newer than the destination
+ file, or if the destination file does not exist. However, you can
+ explicitly overwrite files with the <see cref="P:NAnt.Core.Tasks.CopyTask.Overwrite"/>
+ attribute.
+ </para>
+ <para>
+ Entire directory structures can be moved to a new location. For this
+ to happen, the following criteria must be met:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ Everything in the fileset is included
+ </description>
+ </item>
+ <item>
+ <description>
+ The directory structure is not flattened
+ </description>
+ </item>
+ <item>
+ <description>
+ Empty directories are included
+ </description>
+ </item>
+ <item>
+ <description>
+ Destination directory does not exist
+ </description>
+ </item>
+ </list>
+ <para>
+ If any of these items are not met, then the files within the source
+ directory will be moved over instead of the entire directory structure.
+ </para>
+ <para>
+ A <see cref="T:NAnt.Core.Types.FileSet"/> can be used to select files or directories to move.
+ To use a <see cref="T:NAnt.Core.Types.FileSet"/>, the <see cref="P:NAnt.Core.Tasks.CopyTask.ToDirectory"/>
+ attribute must be set.
+ </para>
+ <h3>Encoding</h3>
+ <para>
+ Unless an encoding is specified, the encoding associated with the
+ system's current ANSI code page is used.
+ </para>
+ <para>
+ An UTF-8, little-endian Unicode, and big-endian Unicode encoded text
+ file is automatically recognized, if the file starts with the
+ appropriate byte order marks.
+ </para>
+ <note>
+ If you employ filters in your move operation, you should limit the
+ move to text files. Binary files will be corrupted by the move
+ operation.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Move a single file while changing its encoding from "latin1" to
+ "utf-8".
+ </para>
+ <code>
+ <![CDATA[
+ <move
+ file="myfile.txt"
+ tofile="mycopy.txt"
+ inputencoding="latin1"
+ outputencoding="utf-8" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Move a set of files.</para>
+ <code>
+ <![CDATA[
+ <move todir="${build.dir}">
+ <fileset basedir="bin">
+ <include name="*.dll" />
+ </fileset>
+ </move>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Move a set of files to a directory, replacing <c>@TITLE@</c> with
+ "Foo Bar" in all files.
+ </para>
+ <code>
+ <![CDATA[
+ <move todir="../backup/dir">
+ <fileset basedir="src_dir">
+ <include name="**/*" />
+ </fileset>
+ <filterchain>
+ <replacetokens>
+ <token key="TITLE" value="Foo Bar" />
+ </replacetokens>
+ </filterchain>
+ </move>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Move an entire directory and its contents.
+ </para>
+ <code>
+ <![CDATA[
+ <move todir="target/dir">
+ <fileset basedir="source/dir"/>
+ </move>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.MoveTask.DoFileOperations">
+ <summary>
+ Actually does the file moves.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.SourceFile">
+ <summary>
+ The file to move.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.ToFile">
+ <summary>
+ The file to move to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.ToDirectory">
+ <summary>
+ The directory to move to.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.CopyFileSet">
+ <summary>
+ Used to select the files to move. To use a <see cref="T:NAnt.Core.Types.FileSet"/>,
+ the <see cref="P:NAnt.Core.Tasks.MoveTask.ToDirectory"/> attribute must be set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.Flatten">
+ <summary>
+ Ignore directory structure of source directory, move all files into
+ a single directory, specified by the <see cref="P:NAnt.Core.Tasks.MoveTask.ToDirectory"/>
+ attribute. The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.MoveTask.Filters">
+ <summary>
+ Chain of filters used to alter the file's content as it is moved.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.NAntSchemaTask">
+ <summary>
+ Creates an XSD File for all available tasks.
+ </summary>
+ <remarks>
+ <para>
+ This can be used in conjuntion with the command-line option to do XSD
+ Schema validation on the build file.
+ </para>
+ </remarks>
+ <example>
+ <para>Creates a <c>NAnt.xsd</c> file in the current project directory.</para>
+ <code>
+ <![CDATA[
+ <nantschema output="NAnt.xsd" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.NAntSchemaTask.WriteSchema(System.IO.Stream,System.Type[],System.Type[],System.String)">
+ <summary>
+ Creates a NAnt Schema for given types
+ </summary>
+ <param name="stream">The output stream to save the schema to. If <see langword="null" />, writing is ignored, no exception generated.</param>
+ <param name="tasks">The list of tasks to generate XML Schema for.</param>
+ <param name="dataTypes">The list of datatypes to generate XML Schema for.</param>
+ <param name="targetNS">The target namespace to output.</param>
+ <returns>The new NAnt Schema.</returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.NAntSchemaTask.CreateXsdAttribute(System.String,System.Boolean)">
+ <summary>
+ Creates a new <see cref="T:System.Xml.Schema.XmlSchemaAttribute"/> instance.
+ </summary>
+ <param name="name">The name of the attribute.</param>
+ <param name="required">Value indicating whether the attribute should be required.</param>
+ <returns>The new <see cref="T:System.Xml.Schema.XmlSchemaAttribute"/> instance.</returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.NAntSchemaTask.CreateXsdSequence(System.Decimal,System.Decimal)">
+ <summary>
+ Creates a new <see cref="T:System.Xml.Schema.XmlSchemaSequence"/> instance.
+ </summary>
+ <param name="min">The minimum value to allow for this choice</param>
+ <param name="max">The maximum value to allow, Decimal.MaxValue sets it to 'unbound'</param>
+ <returns>The new <see cref="T:System.Xml.Schema.XmlSchemaSequence"/> instance.</returns>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntSchemaTask.OutputFile">
+ <summary>
+ The name of the output file to which the XSD should be written.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntSchemaTask.TargetNamespace">
+ <summary>
+ The target namespace for the output. Defaults to "http://tempuri.org/nant-donotuse.xsd"
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntSchemaTask.ForType">
+ <summary>
+ The <see cref="T:System.Type"/> for which an XSD should be created. If not
+ specified, an XSD will be created for all available tasks.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.NAntSchemaTask.NAntSchemaGenerator.#ctor(System.Type[],System.Type[],System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.Tasks.NAntSchemaTask.NAntSchemaGenerator"/>
+ class.
+ </summary>
+ <param name="tasks">Tasks for which a schema should be generated.</param>
+ <param name="dataTypes">Data Types for which a schema should be generated.</param>
+ <param name="targetNS">The namespace to use.
+ <example> http://tempuri.org/nant.xsd </example>
+ </param>
+ </member>
+ <member name="T:NAnt.Core.Tasks.NAntTask">
+ <summary>
+ Runs NAnt on a supplied build file, or a set of build files.
+ </summary>
+ <remarks>
+ <para>
+ By default, all the properties of the current project will be available
+ in the new project. Alternatively, you can set <see cref="P:NAnt.Core.Tasks.NAntTask.InheritAll"/>
+ to <see langword="false"/> to not copy any properties to the new
+ project.
+ </para>
+ <para>
+ You can also set properties in the new project from the old project by
+ using nested property tags. These properties are always passed to the
+ new project regardless of the setting of <see cref="P:NAnt.Core.Tasks.NAntTask.InheritAll"/>.
+ This allows you to parameterize your subprojects.
+ </para>
+ <para>
+ References to data types can also be passed to the new project, but by
+ default they are not. If you set the <see cref="P:NAnt.Core.Tasks.NAntTask.InheritRefs"/> to
+ <see langword="true"/>, all references will be copied.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Build a project located in a different directory if the <c>debug</c>
+ property is not <see langword="true"/>.
+ </para>
+ <code>
+ <![CDATA[
+ <nant buildfile="${src.dir}/Extras/BuildServer/BuildServer.build" unless="${debug}" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Build a project while adding a set of properties to that project.
+ </para>
+ <code>
+ <![CDATA[
+ <nant buildfile="${src.dir}/Extras/BuildServer/BuildServer.build">
+ <properties>
+ <property name="build.dir" value="c:/buildserver" />
+ <property name="build.debug" value="false" />
+ <property name="lib.dir" value="c:/shared/lib" readonly="true" />
+ </properties>
+ </nant>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Build all projects named <c>default.build</c> located anywhere under
+ the project base directory.
+ </para>
+ <code>
+ <![CDATA[
+ <nant>
+ <buildfiles>
+ <include name="**/default.build" />
+ <!-- avoid recursive execution of current build file -->
+ <exclude name="${project::get-buildfile-path()}" />
+ </buildfiles>
+ </nant>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.NAntTask.Initialize">
+ <summary>
+ Validates the <see cref="T:NAnt.Core.Tasks.NAntTask"/> element.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.BuildFile">
+ <summary>
+ The build file to build.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.DefaultTarget">
+ <summary>
+ The target to execute. To specify more than one target seperate
+ targets with a space. Targets are executed in order if possible.
+ The default is to use target specified in the project's default
+ attribute.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.BuildFiles">
+ <summary>
+ Used to specify a set of build files to process.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.InheritAll">
+ <summary>
+ Specifies whether current property values should be inherited by
+ the executed project. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.InheritRefs">
+ <summary>
+ Specifies whether all references will be copied to the new project.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.NAntTask.OverrideProperties">
+ <summary>
+ Specifies a collection of properties that should be created in the
+ executed project. Note, existing properties with identical names
+ that are not read-only will be overwritten.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.PropertyTask">
+ <summary>
+ Sets a property in the current project.
+ </summary>
+ <remarks>
+ <note>NAnt uses a number of predefined properties.</note>
+ </remarks>
+ <example>
+ <para>
+ Define a <c>debug</c> property with value <see langword="true" />.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="debug" value="true" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Use the user-defined <c>debug</c> property.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="trace" value="${debug}" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define a read-only property. This is just like passing in the param
+ on the command line.
+ </para>
+ <code>
+ <![CDATA[
+ <property name="do_not_touch_ME" value="hammer" readonly="true" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define a property, but do not overwrite the value if the property already exists (eg. it was specified on the command line).
+ </para>
+ <code>
+ <![CDATA[
+ <project name="property-example">
+ <property name="debug" value="true" overwrite="false" />
+ <echo message="debug: ${debug}" />
+ </project>
+ ]]>
+ </code>
+ <para>
+ Executing this build file with the command line option <c>-D:debug=false</c>,
+ would cause the value specified on the command line to remain unaltered.
+ </para>
+ <code>
+ <![CDATA[
+ [echo] debug: false
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.PropertyTask.PropertyName">
+ <summary>
+ The name of the NAnt property to set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.PropertyTask.Value">
+ <summary>
+ The value to assign to the NAnt property.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.PropertyTask.ReadOnly">
+ <summary>
+ Specifies whether the property is read-only or not.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.PropertyTask.Dynamic">
+ <summary>
+ Specifies whether references to other properties should not be
+ expanded when the value of the property is set, but expanded when
+ the property is actually used. By default, properties will be
+ expanded when set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.PropertyTask.Overwrite">
+ <summary>
+ Specifies whether the value of a property should be overwritten if
+ the property already exists (unless the property is read-only).
+ The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.RegexTask">
+ <summary>
+ Sets project properties based on the evaluatuion of a regular expression.
+ </summary>
+ <remarks>
+ <para>
+ The <see cref="P:NAnt.Core.Tasks.RegexTask.Pattern"/> attribute must contain one or more
+ <see href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpcongroupingconstructs.asp">
+ named grouping constructs</see>, which represents the names of the
+ properties to be set. These named grouping constructs can be enclosed
+ by angle brackets (?<name>) or single quotes (?'name').
+ </para>
+ <note>
+ In the build file, use the XML element <![CDATA[<]]> to specify <,
+ and <![CDATA[>]]> to specify >.
+ </note>
+ <note>
+ The named grouping construct must not contain any punctuation and it
+ cannot begin with a number.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Find the last word in the given string and stores it in the property
+ <c>lastword</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <regex pattern="(?'lastword'\w+)$" input="This is a test sentence" />
+ <echo message="${lastword}" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Split the full filename and extension of a filename.
+ </para>
+ <code>
+ <![CDATA[
+ <regex pattern="^(?'filename'.*)\.(?'extension'\w+)$" input="d:\Temp\SomeDir\SomeDir\bla.xml" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Split the path and the filename. (This checks for <c>/</c> or <c>\</c>
+ as the path separator).
+ </para>
+ <code>
+ <![CDATA[
+ <regex pattern="^(?'path'.*(\\|/)|(/|\\))(?'file'.*)$" input="d:\Temp\SomeDir\SomeDir\bla.xml" />
+ ]]>
+ </code>
+ <para>
+ Results in path=<c>d:\Temp\SomeDir\SomeDir\</c> and file=<c>bla.xml</c>.
+ </para>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.RegexTask.ExecuteTask">
+ <summary>
+ Executes the task.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.RegexTask.Pattern">
+ <summary>
+ Represents the regular expression to be evalued.
+ </summary>
+ <value>
+ The regular expression to be evalued.
+ </value>
+ <remarks>
+ The pattern must contain one or more named constructs, which may
+ not contain any punctuation and cannot begin with a number.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.RegexTask.Options">
+ <summary>
+ A comma separated list of options to pass to the regex engine. The
+ default is <see cref="F:System.Text.RegularExpressions.RegexOptions.None"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.RegexTask.Input">
+ <summary>
+ Represents the input for the regular expression.
+ </summary>
+ <value>
+ The input for the regular expression.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Tasks.SetEnvTask">
+ <summary>
+ Sets an environment variable or a whole collection of them. Use an empty
+ <see cref="P:NAnt.Core.Tasks.SetEnvTask.LiteralValue"/> attribute to clear a variable.
+ </summary>
+ <remarks>
+ <note>
+ Variables will be set for the current NAnt process and all child
+ processes that NAnt spawns (compilers, shell tools, etc). If the
+ intention is to only set a variable for a single child process, then
+ using the <see cref="T:NAnt.Core.Tasks.ExecTask"/> and its nested <see cref="P:NAnt.Core.Tasks.ExecTask.EnvironmentSet"/>
+ element might be a better option.
+ </note>
+ <note>
+ Expansion of inline environment variables is performed using the syntax
+ of the current platform. So on Windows platforms using the string %PATH%
+ in the <see cref="P:NAnt.Core.Tasks.SetEnvTask.LiteralValue"/> attribute will result in the value of
+ the PATH variable being expanded in place before the variable is set.
+ </note>
+ </remarks>
+ <example>
+ <para>Set the MONO_PATH environment variable on a *nix platform.</para>
+ <code>
+ <![CDATA[
+ <setenv name=="MONO_PATH" value="/home/jimbob/dev/foo:%MONO_PATH%"/>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Set a collection of environment variables. Note the nested variable used to set var3.</para>
+ <code>
+ <![CDATA[
+ <setenv>
+ <variable name="var1" value="value2" />
+ <variable name="var2" value="value2" />
+ <variable name="var3" value="value3:%var2%" />
+ </setenv>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Set environment variables using nested path elements.</para>
+ <code>
+ <![CDATA[
+ <path id="build.path">
+ <pathelement dir="c:/windows" />
+ <pathelement dir="c:/cygwin/usr/local/bin" />
+ </path>
+ <setenv>
+ <variable name="build_path" >
+ <path refid="build.path" />
+ </variable>
+ <variable name="path2">
+ <path>
+ <pathelement dir="c:/windows" />
+ <pathelement dir="c:/cygwin/usr/local/bin" />
+ </path>
+ </variable>
+ </setenv>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SetEnvTask.Initialize">
+ <summary>
+ Checks whether the task is initialized with valid attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SetEnvTask.ExecuteTask">
+ <summary>
+ Set the environment variables
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SetEnvTask.SetSingleEnvironmentVariable(System.String,System.String)">
+ <summary>
+ Do the actual work here.
+ </summary>
+ <param name="name">The name of the environment variable.</param>
+ <param name="value">The value of the environment variable.</param>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SetEnvTask.EnvName">
+ <summary>
+ The name of a single Environment variable to set
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SetEnvTask.LiteralValue">
+ <summary>
+ The literal value for the environment variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SetEnvTask.File">
+ <summary>
+ The value for a file-based environment variable. NAnt will convert
+ it to an absolute filename.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SetEnvTask.Directory">
+ <summary>
+ The value for a directory-based environment variable. NAnt will
+ convert it to an absolute path.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SetEnvTask.Path">
+ <summary>
+ The value for a PATH like environment variable. You can use
+ <c>:</c> or <c>;</c> as path separators and NAnt will convert it to
+ the platform's local conventions.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.SleepTask">
+ <summary>
+ A task for sleeping a specified period of time, useful when a build or deployment process
+ requires an interval between tasks.
+ </summary>
+ <example>
+ <para>Sleep 1 hour, 2 minutes, 3 seconds and 4 milliseconds.</para>
+ <code>
+ <![CDATA[
+ <sleep hours="1" minutes="2" seconds="3" milliseconds="4" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Sleep 123 milliseconds.</para>
+ <code>
+ <![CDATA[
+ <sleep milliseconds="123" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SleepTask.Initialize">
+ <summary>
+ Verify parameters.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SleepTask.GetSleepTime">
+ <summary>
+ Return time to sleep.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.SleepTask.DoSleep(System.Int32)">
+ <summary>
+ Sleeps for the specified number of milliseconds.
+ </summary>
+ <param name="millis">Number of milliseconds to sleep.</param>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SleepTask.Hours">
+ <summary>
+ Hours to add to the sleep time.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SleepTask.Minutes">
+ <summary>
+ Minutes to add to the sleep time.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SleepTask.Seconds">
+ <summary>
+ Seconds to add to the sleep time.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SleepTask.Milliseconds">
+ <summary>
+ Milliseconds to add to the sleep time.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.StyleTask">
+ <summary>
+ Processes a document via XSLT.
+ </summary>
+ <example>
+ <para>Create a report in HTML.</para>
+ <code>
+ <![CDATA[
+ <style style="report.xsl" in="data.xml" out="report.html" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Create a report in HTML, with a param.</para>
+ <code>
+ <![CDATA[
+ <style style="report.xsl" in="data.xml" out="report.html">
+ <parameters>
+ <parameter name="reportType" namespaceuri="" value="Plain" />
+ </parameters>
+ </style>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Create a report in HTML, with a expanded param.</para>
+ <code>
+ <![CDATA[
+ <style style="report.xsl" in="data.xml" out="report.html">
+ <parameters>
+ <parameter name="reportType" namespaceuri="" value="${report.type}" />
+ </parameters>
+ </style>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Create some code based on a directory of templates.</para>
+ <code>
+ <![CDATA[
+ <style style="CodeGenerator.xsl" extension="java">
+ <infiles>
+ <include name="*.xml" />
+ </infiles>
+ <parameters>
+ <parameter name="reportType" namespaceuri="" value="Plain" if="${report.plain}" />
+ </parameters>
+ <style>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Create a report in HTML, with an extension object.</para>
+ <code>
+ <![CDATA[
+ <style style="report.xsl" in="data.xml" out="report.html">
+ <extensionobjects>
+ <extensionobject namespaceuri="urn:Formatter" typename="XsltExtensionObjects.Formatter" assembly="XsltExtensionObjects.dll" />
+ </extensionobjects>
+ </style>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.DestDir">
+ <summary>
+ Directory in which to store the results. The default is the project
+ base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.Extension">
+ <summary>
+ Desired file extension to be used for the targets. The default is
+ <c>html</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.XsltFile">
+ <summary>
+ URI or path that points to the stylesheet to use. If given as path, it can
+ be relative to the project's basedir or absolute.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.SrcFile">
+ <summary>
+ Specifies a single XML document to be styled. Should be used with
+ the <see cref="P:NAnt.Core.Tasks.StyleTask.OutputFile"/> attribute.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.OutputFile">
+ <summary>
+ Specifies the output name for the styled result from the <see cref="P:NAnt.Core.Tasks.StyleTask.SrcFile"/>
+ attribute.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.InFiles">
+ <summary>
+ Specifies a group of input files to which to apply the stylesheet.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.Parameters">
+ <summary>
+ XSLT parameters to be passed to the XSLT transformation.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.ExtensionObjects">
+ <summary>
+ XSLT extension objects to be passed to the XSLT transformation.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.StyleTask.Proxy">
+ <summary>
+ The network proxy to use to access the Internet resource.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.SysInfoTask">
+ <summary>
+ Sets properties with system information.
+ </summary>
+ <remarks>
+ <para>Sets a number of properties with information about the system environment. The intent of this task is for nightly build logs to have a record of system information so that the build was performed on.</para>
+ <list type="table">
+ <listheader>
+ <term>Property</term>
+ <description>Value</description>
+ </listheader>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.clr.version</term>
+ <description>Common Language Runtime version number.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.env.*</term>
+ <description>Environment variables (e.g., <<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.env.PATH).</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.platform</term>
+ <description>Operating system platform ID.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.version</term>
+ <description>Operating system version.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os</term>
+ <description>Operating system version string.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.applicationdata</term>
+ <description>The directory that serves as a common repository for application-specific data for the current roaming user.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.commonapplicationdata</term>
+ <description>The directory that serves as a common repository for application-specific data that is used by all users.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.commonprogramfiles</term>
+ <description>The directory for components that are shared across applications.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.desktopdirectory</term>
+ <description>The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.programfiles</term>
+ <description>The Program Files directory.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.system</term>
+ <description>The System directory.</description>
+ </item>
+ <item>
+ <term><<see cref="P:NAnt.Core.Tasks.SysInfoTask.Prefix"/>>.os.folder.temp</term>
+ <description>The temporary directory.</description>
+ </item>
+ </list>
+ <para>
+ When the name of an environment variable is not a valid property name,
+ the task will fail. In that case, set <see cref="P:NAnt.Core.Task.FailOnError"/> to
+ <see langword="true"/> to allow that environment variable to be
+ skipped.
+ </para>
+ <note>
+ we advise you to use the following functions instead:
+ </note>
+ <list type="table">
+ <listheader>
+ <term>Function</term>
+ <description>Description</description>
+ </listheader>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetOperatingSystem"/></term>
+ <description>Gets a <see cref="T:System.OperatingSystem"/> object that identifies this operating system.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetFolderPath(System.Environment.SpecialFolder)"/></term>
+ <description>Gets the path to a system special folder.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVariable(System.String)"/></term>
+ <description>Returns the value of a environment variable.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.PathFunctions.GetTempPath"/></term>
+ <description>Gets the path to the temporary directory.</description>
+ </item>
+ <item>
+ <term><see cref="M:NAnt.Core.Functions.EnvironmentFunctions.GetVersion"/></term>
+ <description>Gets the Common Language Runtime version.</description>
+ </item>
+ </list>
+ </remarks>
+ <example>
+ <para>Register the properties with the default property prefix.</para>
+ <code>
+ <![CDATA[
+ <sysinfo />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Register the properties without a prefix.</para>
+ <code>
+ <![CDATA[
+ <sysinfo prefix="" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Register properties and display a summary.</para>
+ <code>
+ <![CDATA[
+ <sysinfo verbose="true" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.SysInfoTask.Prefix">
+ <summary>
+ The string to prefix the property names with. The default is "sys.".
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.TouchTask">
+ <summary>
+ Touches a file or set of files -- corresponds to the Unix touch command.
+ </summary>
+ <remarks>
+ <para>
+ If the file specified does not exist, the task will create it.
+ </para>
+ </remarks>
+ <example>
+ <para>Touch the <c>Main.cs</c> file. The current time is used.</para>
+ <code>
+ <![CDATA[
+ <touch file="Main.cs" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Touch all executable files in the project base directory and its
+ subdirectories.
+ </para>
+ <code>
+ <![CDATA[
+ <touch>
+ <fileset>
+ <include name="**/*.exe" />
+ <include name="**/*.dll" />
+ </fileset>
+ </touch>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.TouchTask.Initialize">
+ <summary>
+ Ensures the supplied attributes are valid.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TouchTask.File">
+ <summary>
+ The file to touch.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TouchTask.Millis">
+ <summary>
+ Specifies the new modification time of the file(s) in milliseconds
+ since midnight Jan 1 1970.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TouchTask.Datetime">
+ <summary>
+ Specifies the new modification time of the file in the format
+ MM/DD/YYYY HH:MM:SS.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TouchTask.TouchFileSet">
+ <summary>
+ Used to select files that should be touched.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.TryCatchTask">
+ <summary>
+ Executes a set of tasks, and optionally catches a build exception to
+ allow recovery or rollback steps to be taken, or to define some steps
+ to be taken regardless if the tasks succeed or fail, or both.
+ </summary>
+ <remarks>
+ <para>
+ The tasks defined in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.TryBlock"/>></c> block
+ will be executed in turn, as they normally would in a target.
+ </para>
+ <para>
+ If a <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c> block is defined, the
+ tasks in that block will be executed in turn only if one of the tasks
+ in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.TryBlock"/>></c> block fails. This
+ failure will then be suppressed by the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c>
+ block.
+ </para>
+ <para>
+ The message associated with the failure can also be caught in a
+ property for use within the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c>
+ block. The original contents of the property will be restored upon
+ exiting the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c> block.
+ </para>
+ <para>
+ If a <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.FinallyBlock"/>></c> block is defined, the
+ tasks in that block will be executed after the tasks in both the
+ <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.TryBlock"/>></c> and <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c>
+ blocks have been executed, regardless of whether any task fails in
+ either block.
+ </para>
+ </remarks>
+ <example>
+ <code>
+ <![CDATA[
+ <trycatch>
+ <try>
+ <echo message="In try" />
+ <fail message="Failing!" />
+ </try>
+ <catch>
+ <echo message="In catch" />
+ </catch>
+ <finally>
+ <echo message="Finally done" />
+ </finally>
+ </trycatch>
+ ]]>
+ </code>
+ <para>
+ The output of this example will be:
+ </para>
+ <code>
+ In try
+ In catch
+ Finally done
+ </code>
+ <para>
+ The failure in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.TryBlock"/>></c> block will
+ not cause the build to fail.
+ </para>
+ </example>
+ <example>
+ <code>
+ <![CDATA[
+ <trycatch>
+ <try>
+ <echo message="In try" />
+ <fail message="Just because..." />
+ </try>
+ <catch property="failure">
+ <echo message="Caught failure: ${failure}" />
+ <fail message="Bad catch" />
+ </catch>
+ <finally>
+ <echo message="Finally done" />
+ </finally>
+ </trycatch>
+ ]]>
+ </code>
+ <para>
+ The output of this example will be:
+ </para>
+ <code>
+ In try
+ Caught failure: Just because...
+ Finally done
+ Build failed: Bad catch
+ </code>
+ <para>
+ Like the above, the failure in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.TryBlock"/>></c>
+ block does not cause the build to fail. The failure in the
+ <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c> block does, however.
+ Note that the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.FinallyBlock"/>></c> block is
+ executed even though the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c>
+ block failed.
+ </para>
+ </example>
+ <example>
+ <code>
+ <![CDATA[
+ <trycatch>
+ <try>
+ <echo message="In try" />
+ <fail message="yet again" />
+ </try>
+ <catch property="failure">
+ <echo message="Caught failure ${failure}" />
+ <fail message="Bad catch" />
+ </catch>
+ <finally>
+ <echo message="Finally done ${failure}" />
+ </finally>
+ </trycatch>
+ ]]>
+ </code>
+ <para>
+ The output of this example will be:
+ </para>
+ <code>
+ In try
+ Caught failure yet again
+ Build failed: Property 'failure' has not been set.
+ </code>
+ <para>
+ The <see cref="T:NAnt.Core.Tasks.EchoTask"/> in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.FinallyBlock"/>></c>
+ block failed because the "failure" property was not defined
+ after exiting the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c> block.
+ Note that the failure in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.FinallyBlock"/>></c>
+ block has eclipsed the failure in the <c><<see cref="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock"/>></c>
+ block.
+ </para>
+ </example>
+ <example>
+ <code>
+ <![CDATA[
+ <trycatch>
+ <try>
+ <property name="temp.file" value="${path::get-temp-file-name()}" />
+ <do-stuff to="${temp.file}" />
+ <fail message="Oops..." />
+ </try>
+ <finally>
+ <echo message="Cleaning up..." />
+ <if test="${property::exists('temp.file')}">
+ <delete file="${temp.file}" />
+ </if>
+ </finally>
+ </trycatch>
+ ]]>
+ </code>
+ <para>
+ A more concrete example, that will always clean up the generated
+ temporary file after it has been created.
+ </para>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TryCatchTask.TryBlock">
+ <summary>
+ The tasks in this block will be executed as a normal part of
+ the build script.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TryCatchTask.CatchBlock">
+ <summary>
+ The tasks in this block will be executed if any task in the try
+ block fails.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TryCatchTask.FinallyBlock">
+ <summary>
+ The tasks in this block will always be executed, regardless of
+ what happens in the try and catch blocks.
+ </summary>
+ <remarks>
+ Note that any failure in any of the tasks in this block will
+ prevent any subsequent tasks from executing.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TryCatchTask.CatchElement.Property">
+ <summary>
+ Defines the name of the property to save the message describing
+ the failure that has been caught.
+ </summary>
+ <remarks>
+ <para>
+ The failure message is only available in the context of the catch
+ block. If you wish to preserve the message, you will need to save
+ it into another property.
+ </para>
+ <para>
+ Readonly properties cannot be overridden by this mechanism.
+ </para>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Tasks.TStampTask">
+ <summary>
+ Sets properties with the current date and time.
+ </summary>
+ <remarks>
+ <para>
+ By default the <see cref="T:NAnt.Core.Tasks.TStampTask"/> displays the current date
+ and time and sets the following properties:
+ </para>
+ <list type="bullet">
+ <item><description>tstamp.date to yyyyMMdd</description></item>
+ <item><description>tstamp.time to HHmm</description></item>
+ <item><description>tstamp.now using the default DateTime.ToString() method</description></item>
+ </list>
+ <para>
+ To set an additional property with a custom date/time use the
+ <see cref="P:NAnt.Core.Tasks.TStampTask.Property"/> and <see cref="P:NAnt.Core.Tasks.TStampTask.Pattern"/> attributes.
+ To set a number of additional properties with the exact same date and
+ time use the <see cref="P:NAnt.Core.Tasks.TStampTask.Formatters"/> nested element (see example).
+ </para>
+ <para>
+ The date and time string displayed by the <see cref="T:NAnt.Core.Tasks.TStampTask"/>
+ uses the computer's default long date and time string format. You
+ might consider setting these to the
+ <see href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">ISO 8601 standard
+ for date and time notation</see>.
+ </para>
+ </remarks>
+ <example>
+ <para>Set the <c>build.date</c> property.</para>
+ <code>
+ <![CDATA[
+ <tstamp property="build.date" pattern="yyyyMMdd" verbose="true" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Set a number of properties for Ant like compatibility.</para>
+ <code>
+ <![CDATA[
+ <tstamp verbose="true">
+ <formatter property="TODAY" pattern="dd MMM yyyy"/>
+ <formatter property="DSTAMP" pattern="yyyyMMdd" unless="${date.not.needed}" />
+ <formatter property="TSTAMP" pattern="HHmm" if="${need.hours}" />
+ </tstamp>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TStampTask.Property">
+ <summary>
+ The property to receive the date/time string in the given pattern.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.TStampTask.Pattern">
+ <summary>The date/time pattern to be used.</summary>
+ <remarks>
+ <para>The following table lists the standard format characters for each standard pattern. The format characters are case-sensitive; for example, 'g' and 'G' represent slightly different patterns.</para>
+ <list type="table">
+ <listheader>
+ <description>Format Character</description>
+ <description>Description Example Format Pattern (en-US)</description>
+ </listheader>
+ <item><description>d</description><description>MM/dd/yyyy</description></item>
+ <item><description>D</description><description>dddd, dd MMMM yyyy</description></item>
+ <item><description>f</description><description>dddd, dd MMMM yyyy HH:mm</description></item>
+ <item><description>F</description><description>dddd, dd MMMM yyyy HH:mm:ss</description></item>
+ <item><description>g</description><description>MM/dd/yyyy HH:mm</description></item>
+ <item><description>G</description><description>MM/dd/yyyy HH:mm:ss</description></item>
+ <item><description>m, M</description><description>MMMM dd</description></item>
+ <item><description>r, R</description><description>ddd, dd MMM yyyy HH':'mm':'ss 'GMT'</description></item>
+ <item><description>s</description><description>yyyy'-'MM'-'dd'T'HH':'mm':'ss</description></item>
+ <item><description>t</description><description>HH:mm</description></item>
+ <item><description>T</description><description>HH:mm:ss</description></item>
+ <item><description>u</description><description>yyyy'-'MM'-'dd HH':'mm':'ss'Z'</description></item>
+ <item><description>U</description><description>dddd, dd MMMM yyyy HH:mm:ss</description></item>
+ <item><description>y, Y</description><description>yyyy MMMM</description></item>
+ </list>
+ <para>The following table lists the patterns that can be combined to construct custom patterns. The patterns are case-sensitive; for example, "MM" is recognized, but "mm" is not. If the custom pattern contains white-space characters or characters enclosed in single quotation marks, the output string will also contain those characters. Characters not defined as part of a format pattern or as format characters are reproduced literally.</para>
+ <list type="table">
+ <listheader>
+ <description>Format</description>
+ <description>Pattern Description</description>
+ </listheader>
+ <item><description>d</description><description>The day of the month. Single-digit days will not have a leading zero.</description></item>
+ <item><description>dd</description><description>The day of the month. Single-digit days will have a leading zero.</description></item>
+ <item><description>ddd</description><description>The abbreviated name of the day of the week.</description></item>
+ <item><description>dddd</description><description>The full name of the day of the week.</description></item>
+ <item><description>M</description><description>The numeric month. Single-digit months will not have a leading zero.</description></item>
+ <item><description>MM</description><description>The numeric month. Single-digit months will have a leading zero.</description></item>
+ <item><description>MMM</description><description>The abbreviated name of the month.</description></item>
+ <item><description>MMMM</description><description>The full name of the month.</description></item>
+ <item><description>y</description><description>The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.</description></item>
+ <item><description>yy</description><description>The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.</description></item>
+ <item><description>yyyy</description><description>The year in four digits, including the century.</description></item>
+ <item><description>gg</description><description>The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string.</description></item>
+ <item><description>h</description><description>The hour in a 12-hour clock. Single-digit hours will not have a leading zero.</description></item>
+ <item><description>hh</description><description>The hour in a 12-hour clock. Single-digit hours will have a leading zero.</description></item>
+ <item><description>H</description><description>The hour in a 24-hour clock. Single-digit hours will not have a leading zero.</description></item>
+ <item><description>HH</description><description>The hour in a 24-hour clock. Single-digit hours will have a leading zero.</description></item>
+ <item><description>m</description><description>The minute. Single-digit minutes will not have a leading zero.</description></item>
+ <item><description>mm</description><description>The minute. Single-digit minutes will have a leading zero.</description></item>
+ <item><description>s</description><description>The second. Single-digit seconds will not have a leading zero.</description></item>
+ <item><description>ss</description><description>The second. Single-digit seconds will have a leading zero.</description></item>
+ <item><description>f</description><description>The fraction of a second in single-digit precision. The remaining digits are truncated.</description></item>
+ <item><description>ff</description><description>The fraction of a second in double-digit precision. The remaining digits are truncated.</description></item>
+ <item><description>fff</description><description>The fraction of a second in three-digit precision. The remaining digits are truncated.</description></item>
+ <item><description>ffff</description><description>The fraction of a second in four-digit precision. The remaining digits are truncated.</description></item>
+ <item><description>fffff</description><description>The fraction of a second in five-digit precision. The remaining digits are truncated. </description></item>
+ <item><description>ffffff</description><description>The fraction of a second in six-digit precision. The remaining digits are truncated. </description></item>
+ <item><description>fffffff</description><description>The fraction of a second in seven-digit precision. The remaining digits are truncated. </description></item>
+ <item><description>t</description><description>The first character in the AM/PM designator.</description></item>
+ <item><description>tt</description><description>The AM/PM designator. </description></item>
+ <item><description>z</description><description>The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8".</description></item>
+ <item><description>zz</description><description>The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".</description></item>
+ <item><description>zzz</description><description>The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".</description></item>
+ <item><description>:</description><description>The default time separator.</description></item>
+ <item><description>/</description><description>The default date separator.</description></item>
+ <item><description>\ c</description><description>Pattern Where c is any character. Displays the character literally. To display the backslash character, use "\\". </description></item>
+ </list>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Tasks.UpToDateTask">
+ <summary>
+ Check modification dates on groups of files.
+ </summary>
+ <remarks>
+ If all <see cref="P:NAnt.Core.Tasks.UpToDateTask.TargetFiles"/> are same or newer than all <see cref="P:NAnt.Core.Tasks.UpToDateTask.SourceFiles"/>, the specified property is set to <see langword="true"/>, otherwise it
+ is set to <see langword="false"/>.
+ </remarks>
+ <example>
+ <para>
+ Check file dates. If <c>myfile.dll</c> is same or newer than <c>myfile.cs</c>, then set <c>myfile.dll.uptodate</c> property
+ to either <see langword="true"/> or <see langword="false"/>.
+ </para>
+ <code>
+ <![CDATA[
+ <uptodate property="myfile.dll.uptodate">
+ <sourcefiles>
+ <include name="myfile.cs" />
+ </sourcefiles>
+ <targetfiles>
+ <include name="myfile.dll" />
+ </targetfiles>
+ </uptodate>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.Core.Tasks.UpToDateTask.PropertyName">
+ <summary>
+ Property that will be set to <see langword="true" /> or <see langword="false" /> depending on the
+ result of the date check.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.UpToDateTask.SourceFiles">
+ <summary>
+ The <see cref="T:NAnt.Core.Types.FileSet"/> that contains list of source files.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.UpToDateTask.TargetFiles">
+ <summary>
+ The <see cref="T:NAnt.Core.Types.FileSet"/> that contains list of target files.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.XmlPeekTask">
+ <summary>
+ Extracts text from an XML file at the location specified by an XPath
+ expression.
+ </summary>
+ <remarks>
+ <para>
+ If the XPath expression specifies multiple nodes the node index is used
+ to determine which of the nodes' text is returned.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ The example provided assumes that the following XML file (App.config)
+ exists in the current build directory.
+ </para>
+ <code>
+ <![CDATA[
+ <?xml version="1.0" encoding="utf-8" ?>
+ <configuration xmlns="http://www.gordic.cz/shared/project-config/v_1.0.0.0">
+ <appSettings>
+ <add key="server" value="testhost.somecompany.com" />
+ </appSettings>
+ </configuration>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ The example will read the server value from the above
+ configuration file.
+ </para>
+ <code>
+ <![CDATA[
+ <xmlpeek
+ file="App.config"
+ xpath="/x:configuration/x:appSettings/x:add[@key = 'server']/@value"
+ property="configuration.server">
+ <namespaces>
+ <namespace prefix="x" uri="http://www.gordic.cz/shared/project-config/v_1.0.0.0" />
+ </namespaces>
+ </xmlpeek>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPeekTask.ExecuteTask">
+ <summary>
+ Executes the XML peek task.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPeekTask.LoadDocument(System.String)">
+ <summary>
+ Loads an XML document from a file on disk.
+ </summary>
+ <param name="fileName">The file name of the file to load the XML document from.</param>
+ <returns>
+ A <see cref="T:System.Xml.XmlDocument">document</see> containing
+ the document object representing the file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPeekTask.GetNodeContents(System.String,System.Xml.XmlDocument,System.Int32)">
+ <summary>
+ Gets the contents of the node specified by the XPath expression.
+ </summary>
+ <param name="xpath">The XPath expression used to determine which nodes to choose from.</param>
+ <param name="document">The XML document to select the nodes from.</param>
+ <param name="nodeIndex">The node index in the case where multiple nodes satisfy the expression.</param>
+ <returns>
+ The contents of the node specified by the XPath expression.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPeekTask.XmlFile">
+ <summary>
+ The name of the file that contains the XML document
+ that is going to be peeked at.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPeekTask.NodeIndex">
+ <summary>
+ The index of the node that gets its text returned when the query
+ returns multiple nodes.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPeekTask.Property">
+ <summary>
+ The property that receives the text representation of the XML inside
+ the node returned from the XPath expression.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPeekTask.XPath">
+ <summary>
+ The XPath expression used to select which node to read.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPeekTask.Namespaces">
+ <summary>
+ Namespace definitions to resolve prefixes in the XPath expression.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Tasks.XmlPokeTask">
+ <summary>
+ Replaces text in an XML file at the location specified by an XPath
+ expression.
+ </summary>
+ <remarks>
+ <para>
+ The location specified by the XPath expression must exist, it will
+ not create the parent elements for you. However, provided you have
+ a root element you could use a series of the tasks to build the
+ XML file up if necessary.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Change the <c>server</c> setting in the configuration from <c>testhost.somecompany.com</c>
+ to <c>productionhost.somecompany.com</c>.
+ </para>
+ <para>XML file:</para>
+ <code>
+ <![CDATA[
+ <?xml version="1.0" encoding="utf-8" ?>
+ <configuration>
+ <appSettings>
+ <add key="server" value="testhost.somecompany.com" />
+ </appSettings>
+ </configuration>
+ ]]>
+ </code>
+ <para>Build fragment:</para>
+ <code>
+ <![CDATA[
+ <xmlpoke
+ file="App.config"
+ xpath="/configuration/appSettings/add[@key = 'server']/@value"
+ value="productionhost.somecompany.com" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Modify the <c>noNamespaceSchemaLocation</c> in an XML file.
+ </para>
+ <para>XML file:</para>
+ <code>
+ <![CDATA[
+ <?xml version="1.0" encoding="utf-8" ?>
+ <Commands xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Path Value">
+ </Commands>
+ ]]>
+ </code>
+ <para>Build fragment:</para>
+ <code>
+ <![CDATA[
+ <xmlpoke file="test.xml" xpath="/Commands/@xsi:noNamespaceSchemaLocation" value="d:\Commands.xsd">
+ <namespaces>
+ <namespace prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance" />
+ </namespaces>
+ </xmlpoke>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPokeTask.ExecuteTask">
+ <summary>
+ Executes the XML poke task.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPokeTask.LoadDocument(System.String,System.Boolean)">
+ <summary>
+ Loads an XML document from a file on disk.
+ </summary>
+ <param name="fileName">
+ The file name of the file to load the XML document from.
+ </param>
+ <param name="preserveWhitespace">
+ Value for XmlDocument.PreserveWhitespace that is set before the xml is loaded.
+ </param>
+ <returns>
+ An <see cref="T:System.Xml.XmlDocument" /> containing
+ the document object model representing the file.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPokeTask.SelectNodes(System.String,System.Xml.XmlDocument,System.Xml.XmlNamespaceManager)">
+ <summary>
+ Given an XML document and an expression, returns a list of nodes
+ which match the expression criteria.
+ </summary>
+ <param name="xpath">
+ The XPath expression used to select the nodes.
+ </param>
+ <param name="document">
+ The XML document that is searched.
+ </param>
+ <param name="nsMgr">
+ An <see cref="T:System.Xml.XmlNamespaceManager"/> to use for resolving namespaces
+ for prefixes in the XPath expression.
+ </param>
+ <returns>
+ An <see cref="T:System.Xml.XmlNodeList"/> containing references to the nodes
+ that matched the XPath expression.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPokeTask.UpdateNodes(System.Xml.XmlNodeList,System.String)">
+ <summary>
+ Given a node list, replaces the XML within those nodes.
+ </summary>
+ <param name="nodes">
+ The list of nodes to replace the contents of.
+ </param>
+ <param name="value">
+ The text to replace the contents with.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Tasks.XmlPokeTask.SaveDocument(System.Xml.XmlDocument,System.String)">
+ <summary>
+ Saves the XML document to a file.
+ </summary>
+ <param name="document">The XML document to be saved.</param>
+ <param name="fileName">The file name to save the XML document under.</param>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPokeTask.XmlFile">
+ <summary>
+ The name of the file that contains the XML document that is going
+ to be poked.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPokeTask.XPath">
+ <summary>
+ The XPath expression used to select which nodes are to be modified.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPokeTask.Value">
+ <summary>
+ The value that replaces the contents of the selected nodes.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPokeTask.Namespaces">
+ <summary>
+ Namespace definitions to resolve prefixes in the XPath expression.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Tasks.XmlPokeTask.PreserveWhitespace">
+ <summary>
+ If <see langword="true" /> then the whitespace in the resulting
+ document will be preserved; otherwise the whitespace will be removed.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.Argument">
+ <summary>
+ Represents a command-line argument.
+ </summary>
+ <remarks>
+ <para>
+ When passed to an external application, the argument will be quoted
+ when appropriate. This does not apply to the <see cref="P:NAnt.Core.Types.Argument.Line"/>
+ parameter, which is always passed as is.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ A single command-line argument containing a space character.
+ </para>
+ <code>
+ <![CDATA[
+ <arg value="-l -a" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Two separate command-line arguments.
+ </para>
+ <code>
+ <![CDATA[
+ <arg line="-l -a" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ A single command-line argument with the value <c>\dir;\dir2;\dir3</c>
+ on DOS-based systems and <c>/dir:/dir2:/dir3</c> on Unix-like systems.
+ </para>
+ <code>
+ <![CDATA[
+ <arg path="/dir;/dir2:\dir3" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Argument"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Argument"/> class
+ with the specified command-line argument.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.#ctor(System.IO.FileInfo)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Argument"/> class
+ with the given file.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.#ctor(NAnt.Core.Types.PathSet)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Argument"/> class
+ with the given path.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.ToString">
+ <summary>
+ Returns the argument as a <see cref="T:System.String"/>.
+ </summary>
+ <returns>
+ The argument as a <see cref="T:System.String"/>.
+ </returns>
+ <remarks>
+ File and individual path elements will be quoted if necessary.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Types.Argument.QuoteArgument(System.String)">
+ <summary>
+ Quotes a command line argument if it contains a single quote or a
+ space.
+ </summary>
+ <param name="argument">The command line argument.</param>
+ <returns>
+ A quoted command line argument if <paramref name="argument" />
+ contains a single quote or a space; otherwise,
+ <paramref name="argument" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.Value">
+ <summary>
+ A single command-line argument; can contain space characters.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.File">
+ <summary>
+ The name of a file as a single command-line argument; will be
+ replaced with the absolute filename of the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.Directory">
+ <summary>
+ The value for a directory-based command-line argument; will be
+ replaced with the absolute path of the directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.Path">
+ <summary>
+ The value for a PATH-like command-line argument; you can use
+ <c>:</c> or <c>;</c> as path separators and NAnt will convert it
+ to the platform's local conventions, while resolving references to
+ environment variables.
+ </summary>
+ <remarks>
+ Individual parts will be replaced with the absolute path, resolved
+ relative to the project base directory.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.PathSet">
+ <summary>
+ Sets a single command-line argument and treats it like a PATH - ensures
+ the right separator for the local platform is used.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.Line">
+ <summary>
+ List of command-line arguments; will be passed to the executable
+ as is.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.IfDefined">
+ <summary>
+ Indicates if the argument should be passed to the external program.
+ If <see langword="true" /> then the argument will be passed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.UnlessDefined">
+ <summary>
+ Indicates if the argument should not be passed to the external
+ program. If <see langword="false" /> then the argument will be
+ passed; otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Argument.StringValue">
+ <summary>
+ Gets string value corresponding with the argument.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.ArgumentCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.Argument"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.ArgumentCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.#ctor(NAnt.Core.Types.ArgumentCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.ArgumentCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.ArgumentCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.#ctor(NAnt.Core.Types.Argument[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.ArgumentCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.Argument"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.Add(NAnt.Core.Types.Argument)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.Argument"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Argument"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.AddRange(NAnt.Core.Types.Argument[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.Argument"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.Argument"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.AddRange(NAnt.Core.Types.ArgumentCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.ArgumentCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.ArgumentCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.Contains(NAnt.Core.Types.Argument)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Argument"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Argument"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Argument"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.Argument"/> with value
+ <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.CopyTo(NAnt.Core.Types.Argument[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.IndexOf(NAnt.Core.Types.Argument)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.Argument"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Argument"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.Argument"/>. If the <see cref="T:NAnt.Core.Types.Argument"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.Insert(System.Int32,NAnt.Core.Types.Argument)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.Argument"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Argument"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.ArgumentEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentCollection.Remove(NAnt.Core.Types.Argument)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Argument"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.ArgumentCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.ArgumentCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.Argument"/> with the specified value.
+ </summary>
+ <param name="value">The value of the <see cref="T:NAnt.Core.Types.Argument"/> to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.ArgumentEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.Argument"/> elements of a <see cref="T:NAnt.Core.Types.ArgumentCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentEnumerator.#ctor(NAnt.Core.Types.ArgumentCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.ArgumentEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.ArgumentCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.ArgumentEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.ArgumentEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.Credential">
+ <summary>
+ Provides credentials for password-based authentication schemes.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Credential.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Credential"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Credential.GetCredential">
+ <summary>
+ Returns a <see cref="T:System.Net.NetworkCredential"/> instance representing
+ the current <see cref="T:NAnt.Core.Types.Credential"/>.
+ </summary>
+ <returns>
+ A <see cref="T:System.Net.NetworkCredential"/> instance representing the current
+ <see cref="T:NAnt.Core.Types.Credential"/>, or <see langword="null"/> if the
+ credentials should not be used to provide authentication information
+ to the external resource.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.Credential.Domain">
+ <summary>
+ The domain or computer name that verifies the credentials.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Credential.Password">
+ <summary>
+ The password for the user name associated with the credentials.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Credential.UserName">
+ <summary>
+ The user name associated with the credentials.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Credential.IfDefined">
+ <summary>
+ Indicates if the credentials should be used to provide authentication
+ information to the external resource. If <see langword="true" /> then
+ the credentials will be passed; otherwise, not. The default is
+ <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Credential.UnlessDefined">
+ <summary>
+ Indicates if the credentials should not be used to provide authentication
+ information to the external resource. If <see langword="false" /> then the
+ credentials will be passed; otherwise, not. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.DirSet">
+ <summary>
+ A specialized <see cref="T:NAnt.Core.Types.FileSet"/> used for specifying a set of
+ directories.
+ </summary>
+ <remarks>
+ Hint for supporting tasks that the included directories instead of
+ files should be used.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Types.FileSet">
+ <summary>
+ Filesets are groups of files. These files can be found in a directory
+ tree starting in a base directory and are matched by patterns taken
+ from a number of patterns. Filesets can appear inside tasks that support
+ this feature or at the project level, i.e., as children of <c><project></c>.
+ </summary>
+ <remarks>
+ <h3>Patterns</h3>
+ <para>
+ As described earlier, patterns are used for the inclusion and exclusion.
+ These patterns look very much like the patterns used in DOS and UNIX:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ <para>'<c>*</c>' matches zero or more characters</para>
+ <para>For example:</para>
+ <para>
+ <c>*.cs</c> matches <c>.cs</c>, <c>x.cs</c> and <c>FooBar.cs</c>,
+ but not <c>FooBar.xml</c> (does not end with <c>.cs</c>).
+ </para>
+ </description>
+ </item>
+ <item>
+ <description>
+ <para>'<c>?</c>' matches one character</para>
+ <para>For example:</para>
+ <para>
+ <c>?.cs</c> matches <c>x.cs</c>, <c>A.cs</c>, but not
+ <c>.cs</c> or <c>xyz.cs</c> (both don't have one character
+ before <c>.cs</c>).
+ </para>
+ </description>
+ </item>
+ </list>
+ <para>
+ Combinations of <c>*</c>'s and <c>?</c>'s are allowed.
+ </para>
+ <para>
+ Matching is done per-directory. This means that first the first directory
+ in the pattern is matched against the first directory in the path to match.
+ Then the second directory is matched, and so on. For example, when we have
+ the pattern <c>/?abc/*/*.cs</c> and the path <c>/xabc/foobar/test.cs</c>,
+ the first <c>?abc</c> is matched with <c>xabc</c>, then <c>*</c> is matched
+ with <c>foobar</c>, and finally <c>*.cs</c> is matched with <c>test.cs</c>.
+ They all match, so the path matches the pattern.
+ </para>
+ <para>
+ To make things a bit more flexible, we added one extra feature, which makes
+ it possible to match multiple directory levels. This can be used to match a
+ complete directory tree, or a file anywhere in the directory tree. To do this,
+ <c>**</c> must be used as the name of a directory. When <c>**</c> is used as
+ the name of a directory in the pattern, it matches zero or more directories.
+ For example: <c>/test/**</c> matches all files/directories under <c>/test/</c>,
+ such as <c>/test/x.cs</c>, or <c>/test/foo/bar/xyz.html</c>, but not <c>/xyz.xml</c>.
+ </para>
+ <para>
+ There is one "shorthand" - if a pattern ends with <c>/</c> or <c>\</c>, then
+ <c>**</c> is appended. For example, <c>mypackage/test/</c> is interpreted as
+ if it were <c>mypackage/test/**</c>.
+ </para>
+ <h3>Case-Sensitivity</h3>
+ <para>
+ By default, pattern matching is case-sensitive on Unix and case-insensitive
+ on other platforms. The <see cref="P:NAnt.Core.Types.FileSet.CaseSensitive"/> parameter can be used
+ to override this.
+ </para>
+ <h3>Default Excludes</h3>
+ <para>
+ There are a set of definitions that are excluded by default from all
+ tasks that use filesets. They are:
+ </para>
+ <list type="bullet">
+ <item><description>**/.svn</description></item>
+ <item><description>**/.svn/**</description></item>
+ <item><description>**/_svn</description></item>
+ <item><description>**/_svn/**</description></item>
+ <item><description>**/.git</description></item>
+ <item><description>**/.git/**</description></item>
+ <item><description>**/.git* (eg. .gitignore)</description></item>
+ <item><description>**/.hg</description></item>
+ <item><description>**/.hg/**</description></item>
+ <item><description>**/.hg* (eg. .hgignore)</description></item>
+ <item><description>**/SCCS</description></item>
+ <item><description>**/SCCS/**</description></item>
+ <item><description>**/vssver.scc</description></item>
+ <item><description>**/vssver2.scc</description></item>
+ <item><description>**/_vti_cnf/**</description></item>
+ <item><description>**/*~</description></item>
+ <item><description>**/#*#</description></item>
+ <item><description>**/.#*</description></item>
+ <item><description>**/%*%</description></item>
+ <item><description>**/CVS</description></item>
+ <item><description>**/CVS/**</description></item>
+ <item><description>**/.cvsignore</description></item>
+ </list>
+ <para>
+ If you do not want these default excludes applied, you may disable them
+ by setting <see cref="P:NAnt.Core.Types.FileSet.DefaultExcludes"/> to <see langword="false"/>.
+ </para>
+ </remarks>
+ <example>
+ <list type="table">
+ <listheader>
+ <term>Pattern</term>
+ <description>Match</description>
+ </listheader>
+ <item>
+ <term><c>**/CVS/*</c></term>
+ <description>
+ <para>
+ Matches all files in <c>CVS</c> directories that can be
+ located anywhere in the directory tree.
+ </para>
+ <para>Matches:</para>
+ <list type="bullet">
+ <item>
+ <description>CVS/Repository</description>
+ </item>
+ <item>
+ <description>org/apache/CVS/Entries</description>
+ </item>
+ <item>
+ <description>org/apache/jakarta/tools/ant/CVS/Entries</description>
+ </item>
+ </list>
+ <para>But not:</para>
+ <list type="bullet">
+ <item>
+ <description>org/apache/CVS/foo/bar/Entries (<c>foo/bar/</c> part does not match)</description>
+ </item>
+ </list>
+ </description>
+ </item>
+ <item>
+ <term><c>org/apache/jakarta/**</c></term>
+ <description>
+ <para>
+ Matches all files in the <c>org/apache/jakarta</c> directory
+ tree.
+ </para>
+ <para>Matches:</para>
+ <list type="bullet">
+ <item>
+ <description>org/apache/jakarta/tools/ant/docs/index.html</description>
+ </item>
+ <item>
+ <description>org/apache/jakarta/test.xml</description>
+ </item>
+ </list>
+ <para>But not:</para>
+ <list type="bullet">
+ <item>
+ <description>org/apache/xyz.java (<c>jakarta/</c> part is missing)</description>
+ </item>
+ </list>
+ </description>
+ </item>
+ <item>
+ <term><c>org/apache/**/CVS/*</c></term>
+ <description>
+ <para>
+ Matches all files in <c>CVS</c> directories that are located
+ anywhere in the directory tree under <c>org/apache</c>.
+ </para>
+ <para>Matches:</para>
+ <list type="bullet">
+ <item>
+ <description>org/apache/CVS/Entries</description>
+ </item>
+ <item>
+ <description>org/apache/jakarta/tools/ant/CVS/Entries</description>
+ </item>
+ </list>
+ <para>But not:</para>
+ <list type="bullet">
+ <item>
+ <description>org/apache/CVS/foo/bar/Entries (<c>foo/bar/</c> part does not match)</description>
+ </item>
+ </list>
+ </description>
+ </item>
+ <item>
+ <term><c>**/test/**</c></term>
+ <description>
+ <para>
+ Matches all files that have a <c>test</c> element in their
+ path, including <c>test</c> as a filename.
+ </para>
+ </description>
+ </item>
+ </list>
+ </example>
+ <seealso cref="T:NAnt.Core.Types.PatternSet"/>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.FileSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.#ctor(NAnt.Core.Types.FileSet)">
+ <summary>
+ copy constructor
+ </summary>
+ <param name="fs"></param>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.AddPatternSet(NAnt.Core.Types.PatternSet)">
+ <summary>
+ Adds a nested set of patterns, or references a standalone patternset.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.CopyTo(NAnt.Core.Types.FileSet)">
+ <summary>
+ Copies all instance data of the <see cref="T:NAnt.Core.Types.FileSet"/> to a given
+ <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.FindMoreRecentLastWriteTime(System.String,System.DateTime)">
+ <summary>
+ Determines if a file has a more recent last write time than the
+ given time, or no longer exists.
+ </summary>
+ <param name="fileName">A file to check the last write time against.</param>
+ <param name="targetLastWriteTime">The datetime to compare against.</param>
+ <returns>
+ The name of the file that has a last write time greater than
+ <paramref name="targetLastWriteTime" /> or that no longer exists;
+ otherwise, <see langword="null" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FileSet.FindMoreRecentLastWriteTime(System.Collections.Specialized.StringCollection,System.DateTime)">
+ <summary>
+ Determines if one of the given files has a more recent last write
+ time than the given time. If one of the given files no longer exists,
+ the target will be considered out-of-date.
+ </summary>
+ <param name="fileNames">A collection of filenames to check the last write time against.</param>
+ <param name="targetLastWriteTime">The datetime to compare against.</param>
+ <returns>
+ The name of the first file that has a last write time greater than
+ <paramref name="targetLastWriteTime" />; otherwise, null.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.CaseSensitive">
+ <summary>
+ Indicates whether include and exclude patterns must be treated in a
+ case-sensitive way. The default is <see langword="true" /> on Unix;
+ otherwise, <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.FailOnEmpty">
+ <summary>
+ When set to <see langword="true"/>, causes the fileset element to
+ throw a <see cref="T:NAnt.Core.ValidationException"/> when no files match the
+ includes and excludes criteria. The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.DefaultExcludes">
+ <summary>
+ Indicates whether default excludes should be used or not.
+ The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.BaseDirectory">
+ <summary>
+ The base of the directory of this fileset. The default is the project
+ base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Includes">
+ <summary>
+ Gets the collection of include patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Excludes">
+ <summary>
+ Gets the collection of exclude patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.AsIs">
+ <summary>
+ Gets the collection of files that will be added to the
+ <see cref="T:NAnt.Core.Types.FileSet"/> without pattern matching or checking if the
+ file exists.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.FileNames">
+ <summary>
+ Gets the collection of file names that match the fileset.
+ </summary>
+ <value>
+ A collection that contains the file names that match the
+ <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.DirectoryNames">
+ <summary>
+ Gets the collection of directory names that match the fileset.
+ </summary>
+ <value>
+ A collection that contains the directory names that match the
+ <see cref="T:NAnt.Core.Types.FileSet"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ScannedDirectories">
+ <summary>
+ Gets the collection of directory names that were scanned for files.
+ </summary>
+ <value>
+ A collection that contains the directory names that were scanned for
+ files.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.SetIncludes">
+ <summary>
+ The items to include in the fileset.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludeElements">
+ <summary>
+ The items to include in the fileset.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.SetExcludes">
+ <summary>
+ The items to exclude from the fileset.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludeElements">
+ <summary>
+ The items to exclude from the fileset.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.SetIncludesList">
+ <summary>
+ The files from which a list of patterns or files to include should
+ be obtained.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludesFiles">
+ <summary>
+ The files from which a list of patterns or files to include should
+ be obtained.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludesFiles">
+ <summary>
+ The files from which a list of patterns or files to exclude should
+ be obtained.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.MostRecentLastWriteTimeFile">
+ <summary>
+ Determines the most recently modified file in the fileset (by LastWriteTime of the <see cref="T:System.IO.FileInfo"/>).
+ </summary>
+ <returns>
+ The <see cref="T:System.IO.FileInfo"/> of the file that has the newest (closest to present) last write time.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IsEverythingIncluded">
+ <summary>
+ Indicates whether or not every file and directory is included in
+ the fileset list.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Exclude.Pattern">
+ <summary>
+ The pattern or file name to exclude.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Exclude.IfDefined">
+ <summary>
+ If <see langword="true" /> then the pattern will be excluded;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Exclude.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Types.FileSet.Exclude.IfDefined"/>. If <see langword="false"/>
+ then the pattern will be excluded; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Include.AsIs">
+ <summary>
+ If <see langword="true"/> then the file name will be added to
+ the <see cref="T:NAnt.Core.Types.FileSet"/> without pattern matching or checking
+ if the file exists. The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Include.FromPath">
+ <summary>
+ If <see langword="true" /> then the file will be searched for
+ on the path. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Include.Pattern">
+ <summary>
+ The pattern or file name to include.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Include.IfDefined">
+ <summary>
+ If <see langword="true" /> then the pattern will be included;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.Include.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Types.FileSet.Include.IfDefined"/>. If <see langword="false"/>
+ then the pattern will be included; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludesFile.Patterns">
+ <summary>
+ Gets the list of patterns in <see cref="P:NAnt.Core.Types.FileSet.ExcludesFile.PatternFile"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludesFile.IfDefined">
+ <summary>
+ If <see langword="true" /> then the patterns will be excluded;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludesFile.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Types.FileSet.ExcludesFile.IfDefined"/>. If <see langword="false"/>
+ then the patterns will be excluded; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.ExcludesFile.PatternFile">
+ <summary>
+ The name of a file; each line of this file is taken to be a
+ pattern.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludesFile.AsIs">
+ <summary>
+ If <see langword="true"/> then the patterns in the include file
+ will be added to the <see cref="T:NAnt.Core.Types.FileSet"/> without pattern
+ matching or checking if the file exists. The default is
+ <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludesFile.FromPath">
+ <summary>
+ If <see langword="true" /> then the patterns in the include file
+ will be searched for on the path. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludesFile.IfDefined">
+ <summary>
+ If <see langword="true" /> then the patterns will be included;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FileSet.IncludesFile.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Types.FileSet.IncludesFile.IfDefined"/>. If <see langword="false"/>
+ then the patterns will be included; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.DirSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.DirSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.DirSet.#ctor(NAnt.Core.Types.FileSet)">
+ <summary>
+ Copy constructor for <see cref="T:NAnt.Core.Types.FileSet"/>. Required in order to
+ assign references of <see cref="T:NAnt.Core.Types.FileSet"/> type where
+ <see cref="T:NAnt.Core.Types.DirSet"/> is used.
+ </summary>
+ <param name="fs">A <see cref="T:NAnt.Core.Types.FileSet"/> instance to create a <see cref="T:NAnt.Core.Types.DirSet"/> from.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.EnvironmentVariable">
+ <summary>
+ Represents an environment variable.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariable.#ctor(System.String,System.String)">
+ <summary>
+ Initializes a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> instance with the
+ specified name and value.
+ </summary>
+ <param name="name">The name of the environment variable.</param>
+ <param name="value">The value of the environment variable.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariable.#ctor">
+ <summary>
+ Initializes a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> instance.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.VariableName">
+ <summary>
+ The name of the environment variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.LiteralValue">
+ <summary>
+ The literal value for the environment variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.File">
+ <summary>
+ The value for a file-based environment variable. NAnt will convert
+ it to an absolute filename.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.Directory">
+ <summary>
+ The value for a directory-based environment variable. NAnt will
+ convert it to an absolute path.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.Path">
+ <summary>
+ The value for a PATH like environment variable. You can use
+ <c>:</c> or <c>;</c> as path separators and NAnt will convert it to
+ the platform's local conventions.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.PathSet">
+ <summary>
+ Sets a single environment variable and treats it like a PATH -
+ ensures the right separator for the local platform is used.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.Value">
+ <summary>
+ Gets the value of the environment variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.IfDefined">
+ <summary>
+ Indicates if the environment variable should be passed to the
+ external program. If <see langword="true" /> then the environment
+ variable will be passed; otherwise, skipped. The default is
+ <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariable.UnlessDefined">
+ <summary>
+ Indicates if the environment variable should not be passed to the
+ external program. If <see langword="false" /> then the environment
+ variable will be passed; otherwise, skipped. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.EnvironmentSet">
+ <summary>
+ A set of environment variables.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentSet.Options">
+ <summary>
+ Environment variable to pass to a program.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentSet.EnvironmentVariables">
+ <summary>
+ Environment variable to pass to a program.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.EnvironmentVariableCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.#ctor(NAnt.Core.Types.EnvironmentVariableCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.#ctor(NAnt.Core.Types.EnvironmentVariable[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.Add(NAnt.Core.Types.EnvironmentVariable)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.AddRange(NAnt.Core.Types.EnvironmentVariable[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.AddRange(NAnt.Core.Types.EnvironmentVariableCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.Contains(NAnt.Core.Types.EnvironmentVariable)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> with value
+ <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.CopyTo(NAnt.Core.Types.EnvironmentVariable[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.IndexOf(NAnt.Core.Types.EnvironmentVariable)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.EnvironmentVariable"/>. If the <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.Insert(System.Int32,NAnt.Core.Types.EnvironmentVariable)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.EnvironmentVariableEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableCollection.Remove(NAnt.Core.Types.EnvironmentVariable)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariableCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariableCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> with the specified name.
+ </summary>
+ <param name="name">The name of the <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.EnvironmentVariableEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.EnvironmentVariable"/> elements of a <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableEnumerator.#ctor(NAnt.Core.Types.EnvironmentVariableCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.EnvironmentVariableEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.EnvironmentVariableCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.EnvironmentVariableEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.EnvironmentVariableEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.Formatter.Property">
+ <summary>
+ The name of the NAnt property to set.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Formatter.Pattern">
+ <summary>
+ The string pattern to use to format the property.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Formatter.IfDefined">
+ <summary>
+ Indicates if the formatter should be used to format the timestamp.
+ If <see langword="true" /> then the formatter will be used;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Formatter.UnlessDefined">
+ <summary>
+ Indicates if the formatter should be not used to format the
+ timestamp. If <see langword="false" /> then the formatter will be
+ used; otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.FormatterCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.Formatter"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.FormatterCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.#ctor(NAnt.Core.Types.FormatterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.FormatterCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.FormatterCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.#ctor(NAnt.Core.Types.Formatter[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.FormatterCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.Formatter"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.Add(NAnt.Core.Types.Formatter)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.Formatter"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Formatter"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.AddRange(NAnt.Core.Types.Formatter[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.Formatter"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.Formatter"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.AddRange(NAnt.Core.Types.FormatterCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.FormatterCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.FormatterCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.Contains(NAnt.Core.Types.Formatter)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Formatter"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Formatter"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.CopyTo(NAnt.Core.Types.Formatter[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.IndexOf(NAnt.Core.Types.Formatter)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.Formatter"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Formatter"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.Formatter"/>. If the <see cref="T:NAnt.Core.Types.Formatter"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.Insert(System.Int32,NAnt.Core.Types.Formatter)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.Formatter"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Formatter"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.FormatterEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterCollection.Remove(NAnt.Core.Types.Formatter)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Formatter"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.FormatterCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.FormatterEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.Formatter"/> elements of a <see cref="T:NAnt.Core.Types.FormatterCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterEnumerator.#ctor(NAnt.Core.Types.FormatterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.FormatterEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.FormatterCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.FormatterEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.FormatterEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.ManagedExecution">
+ <summary>
+ Specifies the execution mode for managed applications.
+ </summary>
+ <remarks>
+ <para>
+ For backward compatibility, the following string values can also be
+ used in build files:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Value</term>
+ <description>Corresponding field</description>
+ </listheader>
+ <item>
+ <term>"true"</term>
+ <description><see cref="F:NAnt.Core.Types.ManagedExecution.Auto"/></description>
+ </item>
+ <item>
+ <term>"false"</term>
+ <description><see cref="F:NAnt.Core.Types.ManagedExecution.Default"/></description>
+ </item>
+ </list>
+ <para>
+ Even if set to <see cref="F:NAnt.Core.Types.ManagedExecution.Default"/>, the operating system can still
+ run the program as a managed application.
+ </para>
+ <para>On Linux this can be done through <b>binfmt_misc</b>, while on
+ Windows installing the .NET Framework redistributable caused managed
+ applications to run on the MS CLR by default.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Types.ManagedExecution.Default">
+ <summary>
+ Do not threat the program as a managed application.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Types.ManagedExecution.Auto">
+ <summary>
+ Leave it up to the CLR to determine which specific version of
+ the CLR will be used to run the application.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Types.ManagedExecution.Strict">
+ <summary>
+ Forces an application to run against the currently targeted
+ version of a given CLR.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.ManagedExecutionConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> that also supports
+ case-insensitive conversion of "true" to
+ <see cref="F:NAnt.Core.Types.ManagedExecution.Auto"/> and "false" to
+ <see cref="F:NAnt.Core.Types.ManagedExecution.Default"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ManagedExecutionConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.ManagedExecutionConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.ManagedExecutionConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.Option">
+ <summary>
+ Represents an option.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Option.#ctor(System.String,System.String)">
+ <summary>
+ name, value constructor
+ </summary>
+ <param name="name"></param>
+ <param name="value"></param>
+ </member>
+ <member name="M:NAnt.Core.Types.Option.#ctor">
+ <summary>
+ Default constructor
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Option.OptionName">
+ <summary>
+ Name of the option.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Option.Value">
+ <summary>
+ Value of the option. The default is <see langword="null" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Option.IfDefined">
+ <summary>
+ Indicates if the option should be passed to the task.
+ If <see langword="true" /> then the option will be passed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Option.UnlessDefined">
+ <summary>
+ Indicates if the option should not be passed to the task.
+ If <see langword="false" /> then the option will be passed;
+ otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.OptionCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.Option"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.OptionCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.#ctor(NAnt.Core.Types.OptionCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.OptionCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.OptionCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.#ctor(NAnt.Core.Types.Option[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.OptionCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.Option"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.Add(NAnt.Core.Types.Option)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.Option"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Option"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.AddRange(NAnt.Core.Types.Option[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.Option"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.Option"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.AddRange(NAnt.Core.Types.OptionCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.OptionCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.OptionCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.Contains(NAnt.Core.Types.Option)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Option"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Option"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Option"/> for the specified
+ task is in the collection.
+ </summary>
+ <param name="taskName">The name of task for which the <see cref="T:NAnt.Core.Types.Option"/> should be located in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.Option"/> for the specified
+ task is found in the collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.CopyTo(NAnt.Core.Types.Option[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.IndexOf(NAnt.Core.Types.Option)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.Option"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Option"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.Option"/>. If the <see cref="T:NAnt.Core.Types.Option"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.Insert(System.Int32,NAnt.Core.Types.Option)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.Option"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Option"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.OptionEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionCollection.Remove(NAnt.Core.Types.Option)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Option"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.OptionCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.OptionCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.Option"/> with the specified name.
+ </summary>
+ <param name="name">The name of the option that should be located in the collection.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.OptionEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.Option"/> elements of a <see cref="T:NAnt.Core.Types.OptionCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionEnumerator.#ctor(NAnt.Core.Types.OptionCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.OptionEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.OptionCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.OptionEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.OptionEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.PathElement">
+ <summary>
+ Represents a nested path element.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.File">
+ <summary>
+ The name of a file to add to the path. Will be replaced with
+ the absolute path of the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.Directory">
+ <summary>
+ The name of a directory to add to the path. Will be replaced with
+ the absolute path of the directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.Path">
+ <summary>
+ A string that will be treated as a path-like string. You can use
+ <c>:</c> or <c>;</c> as path separators and NAnt will convert it
+ to the platform's local conventions, while resolving references
+ to environment variables.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.IfDefined">
+ <summary>
+ If <see langword="true" /> then the entry will be added to the
+ path; otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.UnlessDefined">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Types.PathElement.IfDefined"/>. If <see langword="false"/>
+ then the entry will be added to the path; otherwise, skipped.
+ The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PathElement.Parts">
+ <summary>
+ Gets the parts of a path represented by this element.
+ </summary>
+ <value>
+ A <see cref="T:System.Collections.Specialized.StringCollection"/> containing the parts of a path
+ represented by this element.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Types.PathSet">
+ <summary>
+ <para>
+ Paths are groups of files and/or directories that need to be passed as a single
+ unit. The order in which parts of the path are specified in the build file is
+ retained, and duplicate parts are automatically suppressed.
+ </para>
+ </summary>
+ <example>
+ <para>
+ Define a global <c><path></c> that can be referenced by other
+ tasks or types.
+ </para>
+ <code>
+ <![CDATA[
+ <path id="includes-path">
+ <pathelement path="%INCLUDE%" />
+ <pathelement dir="${build.dir}/include" />
+ </path>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.PathSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.#ctor(NAnt.Core.Project,System.String)">
+ <summary>
+ Invoked by <see cref="T:NAnt.Core.Element.AttributeConfigurator"/> for build
+ attributes with an underlying <see cref="T:NAnt.Core.Types.PathSet"/> type.
+ </summary>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> to be used to resolve relative paths.</param>
+ <param name="path">The string representing a path.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.ToString">
+ <summary>
+ Returns a textual representation of the path, which can be used as
+ PATH environment variable definition.
+ </summary>
+ <returns>
+ A textual representation of the path.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.AddPath(NAnt.Core.Types.PathSet)">
+ <summary>
+ Defines a set of path elements to add to the current path.
+ </summary>
+ <param name="path">The <see cref="T:NAnt.Core.Types.PathSet"/> to add.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.AddPathElement(NAnt.Core.Types.PathElement)">
+ <summary>
+ Defines a path element to add to the current path.
+ </summary>
+ <param name="pathElement">The <see cref="T:NAnt.Core.Types.PathElement"/> to add.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.GetElements">
+ <summary>
+ Returns all path elements defined by this path object.
+ </summary>
+ <returns>
+ A list of path elements.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PathSet.TranslatePath(NAnt.Core.Project,System.String)">
+ <summary>
+ Splits a PATH (with ; or : as separators) into its parts, while
+ resolving references to environment variables.
+ </summary>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> to be used to resolve relative paths.</param>
+ <param name="source">The path to translate.</param>
+ <returns>
+ A PATH split up its parts, with references to environment variables
+ resolved and duplicate entries removed.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.Pattern.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Pattern"/> class.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Pattern.PatternName">
+ <summary>
+ The name pattern to include/exclude.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Pattern.IfDefined">
+ <summary>
+ If <see langword="true" /> then the pattern will be used;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Pattern.UnlessDefined">
+ <summary>
+ If <see langword="false" /> then the pattern will be used;
+ otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.PatternCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.Pattern"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.PatternCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.Clear">
+ <summary>
+ Removes all items from the <see cref="T:NAnt.Core.Types.PatternCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.Add(NAnt.Core.Types.Pattern)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.Pattern"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Pattern"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.AddRange(NAnt.Core.Types.Pattern[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.Pattern"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.Pattern"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.AddRange(NAnt.Core.Types.PatternCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.PatternCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.PatternCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.Contains(NAnt.Core.Types.Pattern)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.Pattern"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Pattern"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.CopyTo(NAnt.Core.Types.Pattern[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array,
+ starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.IndexOf(NAnt.Core.Types.Pattern)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.Pattern"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Pattern"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.Pattern"/>. If the <see cref="T:NAnt.Core.Types.Pattern"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.Insert(System.Int32,NAnt.Core.Types.Pattern)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.Pattern"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Pattern"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.PatternEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternCollection.Remove(NAnt.Core.Types.Pattern)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.Pattern"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.PatternEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.Pattern"/> elements of a <see cref="T:NAnt.Core.Types.PatternCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternEnumerator.#ctor(NAnt.Core.Types.PatternCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.PatternEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.PatternCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternEnumerator.System#Collections#IEnumerator#Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.PatternSet">
+ <summary>
+ A set of patterns, mostly used to include or exclude certain files.
+ </summary>
+ <remarks>
+ <para>
+ The individual patterns support <c>if</c> and <c>unless</c> attributes
+ to specify that the element should only be used if or unless a given
+ condition is met.
+ </para>
+ <para>
+ The <see cref="P:NAnt.Core.Types.PatternSet.IncludesFile"/> and <see cref="P:NAnt.Core.Types.PatternSet.ExcludesFile"/>
+ elements load patterns from a file. When the file is a relative path,
+ it will be resolved relative to the project base directory in which
+ the patternset is defined. Each line of this file is taken to be a
+ pattern.
+ </para>
+ <para>
+ The number sign (#) as the first non-blank character in a line denotes
+ that all text following it is a comment:
+ </para>
+ <code>
+ <![CDATA[
+ EventLog.cs
+ # requires Mono.Posix
+ SysLogEventLogImpl.cs
+ # uses the win32 eventlog API
+ Win32EventLogImpl.cs
+ ]]>
+ </code>
+ <para>
+ Patterns can be grouped to sets, and later be referenced by their
+ <see cref="P:NAnt.Core.DataTypeBase.ID"/>.
+ </para>
+ <para>
+ When used as a standalone element (global type), any properties that
+ are referenced will be resolved when the definition is processed, not
+ when it actually used. Passing a reference to a nested build file
+ will not cause the properties to be re-evaluated.
+ </para>
+ <para>
+ To improve reuse of globally defined patternsets, avoid referencing
+ any properties altogether.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Define a set of patterns that matches all .cs files that do not contain
+ the text <c>Test</c> in their name.
+ </para>
+ <code>
+ <![CDATA[
+ <patternset id="non.test.sources">
+ <include name="**/*.cs" />
+ <exclude name="**/*Test*" />
+ </patternset>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define two sets. One holding C# sources, and one holding VB sources.
+ Both sets only include test sources when the <c>test</c> property is
+ set. A third set combines both C# and VB sources.
+ </para>
+ <code>
+ <![CDATA[
+ <patternset id="cs.sources">
+ <include name="src/**/*.cs" />
+ <include name="test/**/*.cs" if=${property::exist('test')}" />
+ </patternset>
+
+ <patternset id="vb.sources">
+ <include name="src/**/*.vb" />
+ <include name="test/**/*.vb" if=${property::exist('test')}" />
+ </patternset>
+
+ <patternset id="all.sources">
+ <patternset refid="cs.sources" />
+ <patternset refid="vb.sources" />
+ </patternset>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define a set from patterns in a file.
+ </para>
+ <code>
+ <![CDATA[
+ <patternset id="sources">
+ <includesfile name="test.sources" />
+ <includesfile name="non.test.sources" />
+ </patternset>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Defines a patternset with patterns that are loaded from an external
+ file, and shows the behavior when that patternset is passed as a
+ reference to a nested build script.
+ </para>
+ <para>
+ External file "c:\foo\build\service.lst" holding patterns
+ of source files to include for the Foo.Service assembly:
+ </para>
+ <code>
+ <![CDATA[
+ AssemblyInfo.cs
+ *Channel.cs
+ ServiceFactory.cs]]></code>
+ <para>
+ Main build script located in "c:\foo\default.build":
+ </para>
+ <code>
+ <![CDATA[
+ <project name="main" default="build">
+ <property name="build.debug" value="true" />
+
+ <patternset id="service.sources">
+ <include name="TraceListener.cs" if="${build.debug}" />
+ <includesfile name="build/service.lst" />
+ </patternset>
+
+ <property name="build.debug" value="false" />
+
+ <target name="build">
+ <nant buildfile="service/default.build" inheritrefs="true" />
+ </target>
+ </project>]]></code>
+ <para>
+ Nested build script located in "c:\foo\services\default.build"
+ which uses the patternset to feed sources files to the C# compiler:
+ </para>
+ <code>
+ <![CDATA[
+ <project name="service" default="build">
+ <target name="build">
+ <csc output="../bin/Foo.Service.dll" target="library">
+ <fileset basedir="src">
+ <patternset refid="service.sources" />
+ </fileset>
+ </csc>
+ </target>
+ </project>]]></code>
+ <para>
+ At the time when the patternset is used in the "service"
+ build script, the following source files in "c:\foo\services\src"
+ match the defined patterns:
+ </para>
+ <code>
+ <![CDATA[
+ AssemblyInfo.cs
+ MsmqChannel.cs
+ SmtpChannel.cs
+ ServiceFactory.cs
+ TraceListener.cs]]></code>
+ <para>
+ You should have observed that:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ although the patternset is used from the "service"
+ build script, the path to the external file is resolved relative
+ to the base directory of the "main" build script in
+ which the patternset is defined.
+ </description>
+ </item>
+ <item>
+ <description>
+ the "TraceListener.cs" file is included, even though
+ the "build.debug" property was changed to <b>false</b>
+ after the patternset was defined (but before it was passed to
+ the nested build, and used).
+ </description>
+ </item>
+ </list>
+ </example>
+ <seealso cref="T:NAnt.Core.Types.FileSet"/>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.PatternSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.PatternSet.Append(NAnt.Core.Types.PatternSet)">
+ <summary>
+ Adds a nested set of patterns, or references other standalone
+ patternset.
+ </summary>
+ <param name="patternSet">The <see cref="T:NAnt.Core.Types.PatternSet"/> to add.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternSet.Include">
+ <summary>
+ Defines a single pattern for files to include.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternSet.IncludesFile">
+ <summary>
+ Loads multiple patterns of files to include from a given file, set
+ using the <see cref="P:NAnt.Core.Types.Pattern.PatternName"/> parameter.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternSet.Exclude">
+ <summary>
+ Defines a single pattern for files to exclude.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.PatternSet.ExcludesFile">
+ <summary>
+ Loads multiple patterns of files to exclude from a given file, set
+ using the <see cref="P:NAnt.Core.Types.Pattern.PatternName"/> parameter.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.Proxy">
+ <summary>
+ Contains HTTP proxy settings used to process requests to Internet
+ resources.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Proxy.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.Proxy"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.Proxy.GetWebProxy">
+ <summary>
+ Gets a <see cref="T:System.Net.WebProxy"/> instance representing the current
+ <see cref="T:NAnt.Core.Types.Proxy"/>.
+ </summary>
+ <returns>
+ A <see cref="T:System.Net.WebProxy"/> instance representing the current
+ <see cref="T:NAnt.Core.Types.Proxy"/>, or <see langword="GlobalProxySelection.Select"/>
+ if this proxy should not be used to connect to the external resource.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.Host">
+ <summary>
+ The name of the proxy host.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.Port">
+ <summary>
+ The port number on <see cref="P:NAnt.Core.Types.Proxy.Host"/> to use.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.BypassOnLocal">
+ <summary>
+ Specifies whether to bypass the proxy server for local addresses.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.Credentials">
+ <summary>
+ The credentials to submit to the proxy server for authentication.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.IfDefined">
+ <summary>
+ Indicates if the proxy should be used to connect to the external
+ resource. If <see langword="true" /> then the proxy will be used;
+ otherwise, not. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Proxy.UnlessDefined">
+ <summary>
+ Indicates if the proxy should not be used to connect to the external
+ resource. If <see langword="false" /> then the proxy will be used;
+ otherwise, not. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.RawXml">
+ <summary>
+ Represents an element of which the XML is processed by its parent task
+ or type.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.RawXml.Xml">
+ <summary>
+ Gets the XML that this element represents.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.RawXml.CustomXmlProcessing">
+ <summary>
+ Gets a value indicating whether the element is performing additional
+ processing using the <see cref="T:System.Xml.XmlNode"/> that was use to
+ initialize the element.
+ </summary>
+ <value>
+ <see langword="true"/>, as the XML that represents this build
+ element is processed by the containing task or type.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Types.Token">
+ <summary>
+ ReplaceTokens filter token.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Token.Key">
+ <summary>
+ Token to be replaced.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Token.Value">
+ <summary>
+ New value of token.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Token.IfDefined">
+ <summary>
+ Indicates if the token should be used to replace values.
+ If <see langword="true" /> then the token will be used;
+ otherwise, not. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.Token.UnlessDefined">
+ <summary>
+ Indicates if the token should not be used to replace values.
+ If <see langword="false" /> then the token will be used;
+ otherwise, not. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.XmlNamespace">
+ <summary>
+ Represents an XML namespace.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespace.Prefix">
+ <summary>
+ The prefix to associate with the namespace.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespace.Uri">
+ <summary>
+ The associated XML namespace URI.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespace.IfDefined">
+ <summary>
+ Indicates if the namespace should be added to the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ If <see langword="true"/> then the namespace will be added;
+ otherwise, skipped. The default is <see langword="true"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespace.UnlessDefined">
+ <summary>
+ Indicates if the namespace should not be added to the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ list. If <see langword="false"/> then the parameter will be
+ added; otherwise, skipped. The default is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.XmlNamespaceCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.XmlNamespace"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.#ctor(NAnt.Core.Types.XmlNamespaceCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.#ctor(NAnt.Core.Types.XmlNamespace[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.XmlNamespace"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.Add(NAnt.Core.Types.XmlNamespace)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.XmlNamespace"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XmlNamespace"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.AddRange(NAnt.Core.Types.XmlNamespace[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XmlNamespace"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.XmlNamespace"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.AddRange(NAnt.Core.Types.XmlNamespaceCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.Contains(NAnt.Core.Types.XmlNamespace)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XmlNamespace"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XmlNamespace"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XmlNamespace"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.XmlNamespace"/> with
+ value <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.CopyTo(NAnt.Core.Types.XmlNamespace[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.IndexOf(NAnt.Core.Types.XmlNamespace)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.XmlNamespace"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XmlNamespace"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.XmlNamespace"/>. If the <see cref="T:NAnt.Core.Types.XmlNamespace"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.Insert(System.Int32,NAnt.Core.Types.XmlNamespace)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.XmlNamespace"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XmlNamespace"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.XmlNamespaceEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceCollection.Remove(NAnt.Core.Types.XmlNamespace)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XmlNamespace"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespaceCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespaceCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.XmlNamespace"/> with the specified prefix.
+ </summary>
+ <param name="value">The prefix of the <see cref="T:NAnt.Core.Types.XmlNamespace"/> to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.XmlNamespaceEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.XmlNamespace"/> elements of a <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceEnumerator.#ctor(NAnt.Core.Types.XmlNamespaceCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XmlNamespaceEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.XmlNamespaceCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XmlNamespaceEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XmlNamespaceEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltExtensionObject">
+ <summary>
+ Represents an XSLT extension object. The object should have a default
+ parameterless constructor and the return value should be one of the
+ four basic XPath data types of number, string, Boolean or node set.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObject.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>
+ class.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObject.NamespaceUri">
+ <summary>
+ The namespace URI to associate with the extension object.
+ </summary>
+ <value>
+ The namespace URI to associate with the extension object, or
+ <see cref="F:System.String.Empty"/> if not set.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObject.TypeName">
+ <summary>
+ The full type name of the XSLT extension object.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObject.AssemblyPath">
+ <summary>
+ The assembly which contains the XSLT extension object.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObject.IfDefined">
+ <summary>
+ Indicates if the extension object should be added to the XSLT argument
+ list. If <see langword="true" /> then the extension object will be
+ added; otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObject.UnlessDefined">
+ <summary>
+ Indicates if the extension object should not be added to the XSLT argument
+ list. If <see langword="false" /> then the extension object will be
+ added; otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltExtensionObjectCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.#ctor">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.#ctor(NAnt.Core.Types.XsltExtensionObjectCollection)">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/> class with the
+ specified <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.#ctor(NAnt.Core.Types.XsltExtensionObject[])">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/> class with the
+ specified array of <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.Add(NAnt.Core.Types.XsltExtensionObject)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> to be added
+ to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.AddRange(NAnt.Core.Types.XsltExtensionObject[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> array to the
+ end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>
+ elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.AddRange(NAnt.Core.Types.XsltExtensionObjectCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/>
+ to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/>
+ to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.Contains(NAnt.Core.Types.XsltExtensionObject)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> is in the
+ collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> to locate
+ in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> with the
+ specified value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the
+ collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>
+ with value <paramref name="value"/> is found in the collection;
+ otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.CopyTo(NAnt.Core.Types.XsltExtensionObject[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array,
+ starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the
+ destination of the elements copied from the collection. The array
+ must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/>
+ at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.IndexOf(NAnt.Core.Types.XsltExtensionObject)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>
+ object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> object for
+ which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>. If the
+ <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> is not currently a member of the
+ collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.Insert(System.Int32,NAnt.Core.Types.XsltExtensionObject)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> into the collection at
+ the specified index.
+ </summary>
+ <param name="index">The zero-based index at which
+ <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> to
+ insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.XsltExtensionObjectEnumerator"/> for the entire
+ collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectCollection.Remove(NAnt.Core.Types.XsltExtensionObject)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> to remove
+ from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObjectCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get
+ or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObjectCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> with the specified name.
+ </summary>
+ <param name="value">The name of the <see cref="T:NAnt.Core.Types.XsltExtensionObject"/>
+ to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltExtensionObjectEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.XsltExtensionObject"/> elements of a
+ <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectEnumerator.#ctor(NAnt.Core.Types.XsltExtensionObjectCollection)">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.Core.Types.XsltExtensionObjectEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.XsltExtensionObjectCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be
+ enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltExtensionObjectEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltExtensionObjectEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltParameter">
+ <summary>
+ Represents an XSLT parameter.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltParameter"/>
+ class.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameter.ParameterName">
+ <summary>
+ The name of the XSLT parameter.
+ </summary>
+ <value>
+ The name of the XSLT parameter, or <see cref="F:System.String.Empty"/> if
+ not set.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameter.NamespaceUri">
+ <summary>
+ The namespace URI to associate with the parameter.
+ </summary>
+ <value>
+ The namespace URI to associate with the parameter, or
+ <see cref="F:System.String.Empty"/> if not set.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameter.Value">
+ <summary>
+ The value of the XSLT parameter.
+ </summary>
+ <value>
+ The value of the XSLT parameter, or <see cref="F:System.String.Empty"/> if
+ not set.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameter.IfDefined">
+ <summary>
+ Indicates if the parameter should be added to the XSLT argument list.
+ If <see langword="true" /> then the parameter will be added;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameter.UnlessDefined">
+ <summary>
+ Indicates if the parameter should not be added to the XSLT argument
+ list. If <see langword="false" /> then the parameter will be
+ added; otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltParameterCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.Core.Types.XsltParameter"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.#ctor(NAnt.Core.Types.XsltParameterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.#ctor(NAnt.Core.Types.XsltParameter[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Types.XsltParameter"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.Add(NAnt.Core.Types.XsltParameter)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Types.XsltParameter"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltParameter"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.AddRange(NAnt.Core.Types.XsltParameter[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XsltParameter"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Types.XsltParameter"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.AddRange(NAnt.Core.Types.XsltParameterCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Types.XsltParameterCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.Contains(NAnt.Core.Types.XsltParameter)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XsltParameter"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltParameter"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Types.XsltParameter"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.Types.XsltParameter"/> with
+ value <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.CopyTo(NAnt.Core.Types.XsltParameter[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.IndexOf(NAnt.Core.Types.XsltParameter)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Types.XsltParameter"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltParameter"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Types.XsltParameter"/>. If the <see cref="T:NAnt.Core.Types.XsltParameter"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.Insert(System.Int32,NAnt.Core.Types.XsltParameter)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Types.XsltParameter"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltParameter"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Types.XsltParameterEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterCollection.Remove(NAnt.Core.Types.XsltParameter)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Types.XsltParameter"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameterCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameterCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Types.XsltParameter"/> with the specified name.
+ </summary>
+ <param name="value">The name of the <see cref="T:NAnt.Core.Types.XsltParameter"/> to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Types.XsltParameterEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Types.XsltParameter"/> elements of a <see cref="T:NAnt.Core.Types.XsltParameterCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterEnumerator.#ctor(NAnt.Core.Types.XsltParameterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Types.XsltParameterEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Types.XsltParameterCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Types.XsltParameterEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Types.XsltParameterEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Util.AssemblyResolver">
+ <summary>
+ Resolves assemblies by caching assemblies that were loaded.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.#ctor">
+ <summary>
+ Initializes an instanse of the <see cref="T:NAnt.Core.Util.AssemblyResolver"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.#ctor(NAnt.Core.Task)">
+ <summary>
+ Initializes an instanse of the <see cref="T:NAnt.Core.Util.AssemblyResolver"/>
+ class in the context of the given <see cref="T:NAnt.Core.Task"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.Attach">
+ <summary>
+ Installs the assembly resolver by hooking up to the
+ <see cref="E:System.AppDomain.AssemblyResolve"/> event.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.Detach">
+ <summary>
+ Uninstalls the assembly resolver.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.AssemblyResolve(System.Object,System.ResolveEventArgs)">
+ <summary>
+ Resolves an assembly not found by the system using the assembly
+ cache.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="args">A <see cref="T:System.ResolveEventArgs"/> that contains the event data.</param>
+ <returns>
+ The loaded assembly, or <see langword="null"/> if not found.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.AssemblyLoad(System.Object,System.AssemblyLoadEventArgs)">
+ <summary>
+ Occurs when an assembly is loaded. The loaded assembly is added
+ to the assembly cache.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="args">An <see cref="T:System.AssemblyLoadEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.AssemblyResolver.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ The actual logging is delegated to the <see cref="T:NAnt.Core.Task"/> in which
+ the <see cref="T:NAnt.Core.Util.AssemblyResolver"/> is executing
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Util.AssemblyResolver._assemblyCache">
+ <summary>
+ Holds the loaded assemblies.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.AssemblyResolver._task">
+ <summary>
+ Holds the <see cref="T:NAnt.Core.Task"/> in which the <see cref="T:NAnt.Core.Util.AssemblyResolver"/>
+ is executing.
+ </summary>
+ <value>
+ The <see cref="T:NAnt.Core.Task"/> in which the <see cref="T:NAnt.Core.Util.AssemblyResolver"/>
+ is executing or <see langword="null"/> if the <see cref="T:NAnt.Core.Util.AssemblyResolver"/>
+ is not executing in the context of a <see cref="T:NAnt.Core.Task"/>.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgument">
+ <summary>
+ Represents a valid command-line argument.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgument.Finish(System.Object)">
+ <summary>
+ Sets the value of the argument on the specified object.
+ </summary>
+ <param name="destination">The object on which the value of the argument should be set.</param>
+ <exception cref="T:NAnt.Core.Util.CommandLineArgumentException">The argument is required and no value was specified.</exception>
+ <exception cref="T:System.NotSupportedException">
+ <para>
+ The matching property is collection-based, but is not initialized
+ and cannot be written to.
+ </para>
+ <para>-or-</para>
+ <para>
+ The matching property is collection-based, but has no strongly-typed
+ Add method.
+ </para>
+ <para>-or-</para>
+ <para>
+ The matching property is collection-based, but the signature of the
+ Add method is not supported.
+ </para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgument.SetValue(System.String)">
+ <summary>
+ Assigns the specified value to the argument.
+ </summary>
+ <param name="value">The value that should be assigned to the argument.</param>
+ <exception cref="T:NAnt.Core.Util.CommandLineArgumentException">
+ <para>Duplicate argument.</para>
+ <para>-or-</para>
+ <para>Invalid value.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgument.IsNameValueCollectionType(System.Type)">
+ <summary>
+ Indicates whether the specified <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> is a
+ <see cref="T:System.Collections.Specialized.NameValueCollection"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if <paramref name="type"/> can be assigned
+ to <see cref="T:System.Collections.Specialized.NameValueCollection"/>; otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgument.IsCollectionType(System.Type)">
+ <summary>
+ Indicates whether the specified <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> is collection-based.
+ </summary>
+ <value>
+ <see langword="true"/> if <paramref name="type"/> can be assigned
+ to <see cref="T:System.Collections.ICollection"/> and is not backed by a <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/>
+ that can be assigned to <see cref="T:System.Collections.Specialized.NameValueCollection"/>;
+ otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgument.IsArrayType(System.Type)">
+ <summary>
+ Indicates whether the specified <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> is an array.
+ </summary>
+ <value>
+ <see langword="true"/> if <paramref name="type"/> is an array;
+ otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.Property">
+ <summary>
+ Gets the property that backs the argument.
+ </summary>
+ <value>
+ The property that backs the arguments.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.ValueType">
+ <summary>
+ Gets the underlying <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> of the argument.
+ </summary>
+ <value>
+ The underlying <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> of the argument.
+ </value>
+ <remarks>
+ If the <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> of the argument is a collection type,
+ this property will returns the underlying type of that collection.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.LongName">
+ <summary>
+ Gets the long name of the argument.
+ </summary>
+ <value>The long name of the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.ShortName">
+ <summary>
+ Gets the short name of the argument.
+ </summary>
+ <value>The short name of the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.Description">
+ <summary>
+ Gets the description of the argument.
+ </summary>
+ <value>The description of the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsRequired">
+ <summary>
+ Gets a value indicating whether the argument is required.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument is required; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.SeenValue">
+ <summary>
+ Gets a value indicating whether a mathing command-line argument
+ was already found.
+ </summary>
+ <value>
+ <see langword="true" /> if a matching command-line argument was
+ already found; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.AllowMultiple">
+ <summary>
+ Gets a value indicating whether the argument can be specified multiple
+ times.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument may be specified multiple
+ times; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.Unique">
+ <summary>
+ Gets a value indicating whether the argument can only be specified once
+ with a certain value.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument should always have a unique
+ value; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.Type">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> of the property to which the argument
+ is applied.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> of the property to which the argument is
+ applied.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsCollection">
+ <summary>
+ Gets a value indicating whether the argument is collection-based.
+ </summary>
+ <value>
+ <see langword="true"/> if the argument is backed by a <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/>
+ that can be assigned to <see cref="T:System.Collections.ICollection"/> and is not backed
+ by a <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/> that can be assigned to
+ <see cref="T:System.Collections.Specialized.NameValueCollection"/>; otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsNameValueCollection">
+ <summary>
+ Gets a value indicating whether the argument is a set of name/value
+ pairs.
+ </summary>
+ <value>
+ <see langword="true"/> if the argument is backed by a <see cref="P:NAnt.Core.Util.CommandLineArgument.Type"/>
+ that can be assigned to <see cref="T:System.Collections.Specialized.NameValueCollection"/>; otherwise,
+ <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsArray">
+ <summary>
+ Gets a value indicating whether the argument is array-based.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument is backed by an array;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsDefault">
+ <summary>
+ Gets a value indicating whether the argument is the default argument.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument is the default argument;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgument.IsExclusive">
+ <summary>
+ Gets a value indicating whether the argument cannot be combined with
+ other arguments.
+ </summary>
+ <value>
+ <see langword="true" /> if the argument cannot be combined with other
+ arguments; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgumentAttribute">
+ <summary>
+ Allows control of command line parsing.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentAttribute.#ctor(NAnt.Core.Util.CommandLineArgumentTypes)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentAttribute"/> class
+ with the specified argument type.
+ </summary>
+ <param name="argumentType">Specifies the checking to be done on the argument.</param>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentAttribute.Type">
+ <summary>
+ Gets or sets the checking to be done on the argument.
+ </summary>
+ <value>The checking that should be done on the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentAttribute.Name">
+ <summary>
+ Gets or sets the long name of the argument.
+ </summary>
+ <value>The long name of the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentAttribute.ShortName">
+ <summary>
+ Gets or sets the short name of the argument.
+ </summary>
+ <value>The short name of the argument.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentAttribute.Description">
+ <summary>
+ Gets or sets the description of the argument.
+ </summary>
+ <value>The description of the argument.</value>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgumentCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.Core.Util.CommandLineArgument"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.#ctor(NAnt.Core.Util.CommandLineArgumentCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> class
+ with the specified <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.#ctor(NAnt.Core.Util.CommandLineArgument[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.Util.CommandLineArgument"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.Add(NAnt.Core.Util.CommandLineArgument)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.AddRange(NAnt.Core.Util.CommandLineArgument[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Util.CommandLineArgument"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.Util.CommandLineArgument"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.AddRange(NAnt.Core.Util.CommandLineArgumentCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.Contains(NAnt.Core.Util.CommandLineArgument)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.Util.CommandLineArgument"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.CopyTo(NAnt.Core.Util.CommandLineArgument[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.IndexOf(NAnt.Core.Util.CommandLineArgument)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.Util.CommandLineArgument"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Util.CommandLineArgument"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.Util.CommandLineArgument"/>. If the <see cref="T:NAnt.Core.Util.CommandLineArgument"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.Insert(System.Int32,NAnt.Core.Util.CommandLineArgument)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.Util.CommandLineArgument"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.Util.CommandLineArgumentEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentCollection.Remove(NAnt.Core.Util.CommandLineArgument)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Util.CommandLineArgument"/> with the specified name.
+ </summary>
+ <param name="name">The name of the <see cref="T:NAnt.Core.Util.CommandLineArgument"/> to get.</param>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgumentEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.Util.CommandLineArgument"/> elements of a <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentEnumerator.#ctor(NAnt.Core.Util.CommandLineArgumentCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.Util.CommandLineArgumentCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineArgumentEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgumentException">
+ <summary>
+ The exception that is thrown when one of the command-line arguments provided
+ is not valid.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentException.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentException"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentException.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentException"/> class
+ with a descriptive message.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentException.#ctor(System.String,System.Exception)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentException"/> class
+ with a descriptive message and an inner exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="innerException">A nested exception that is the cause of the current exception.</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineArgumentException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentException"/> class
+ with serialized data.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
+ <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineArgumentTypes">
+ <summary>
+ Used to control parsing of command-line arguments.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.Required">
+ <summary>
+ Indicates that this field is required. An error will be displayed
+ if it is not present when parsing arguments.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.Unique">
+ <summary>
+ Only valid in conjunction with Multiple.
+ Duplicate values will result in an error.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.Multiple">
+ <summary>
+ Inidicates that the argument may be specified more than once.
+ Only valid if the argument is a collection
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.Exclusive">
+ <summary>
+ Inidicates that if this argument is specified, no other arguments may be specified.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.AtMostOnce">
+ <summary>
+ The default type for non-collection arguments.
+ The argument is not required, but an error will be reported if it is specified more than once.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.CommandLineArgumentTypes.MultipleUnique">
+ <summary>
+ The default type for collection arguments.
+ The argument is permitted to occur multiple times, but duplicate
+ values will cause an error to be reported.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Util.CommandLineParser">
+ <summary>
+ Commandline parser.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.#ctor(System.Type,System.Boolean)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineParser"/> class
+ using possible arguments deducted from the specific <see cref="T:System.Type"/>.
+ </summary>
+ <param name="argumentSpecification">The <see cref="T:System.Type"/> from which the possible command-line arguments should be retrieved.</param>
+ <param name="supportsResponseFile">A <see cref="T:System.Boolean"/> value indicating whether or not a response file is able to be used. </param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="argumentSpecification"/> is a null reference.</exception>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.Parse(System.String[],System.Object)">
+ <summary>
+ Parses an argument list.
+ </summary>
+ <param name="args">The arguments to parse.</param>
+ <param name="destination">The destination object on which properties will be set corresponding to the specified arguments.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="destination"/> is a null reference.</exception>
+ <exception cref="T:System.ArgumentException">The <see cref="T:System.Type"/> of <paramref name="destination"/> does not match the argument specification that was used to initialize the parser.</exception>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.ParseArguments(System.String,System.Char[])">
+ <summary>
+ Splits a string and removes any empty strings from the
+ result. Same functionality as the
+ public string[] Split(char[] separator, StringSplitOptions options)
+ method in .Net 2.0. Replace with that call when 2.0 is standard.
+ </summary>
+ <param name="sourceString"></param>
+ <param name="delimiters"></param>
+ <returns>the array of strings</returns>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.ProcessResponseFile(System.String)">
+ <summary>
+ Read a response file and parse the arguments as usual.
+ </summary>
+ <param name="file">The response file to load arguments</param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.ParseArgumentList(System.String[])">
+ <summary>
+ Parse the argument list using the
+ </summary>
+ <param name="args"></param>
+ </member>
+ <member name="M:NAnt.Core.Util.CommandLineParser.GetCommandLineAttribute(System.Reflection.PropertyInfo)">
+ <summary>
+ Returns the <see cref="T:NAnt.Core.Util.CommandLineArgumentAttribute"/> that's applied
+ on the specified property.
+ </summary>
+ <param name="propertyInfo">The property of which applied <see cref="T:NAnt.Core.Util.CommandLineArgumentAttribute"/> should be returned.</param>
+ <returns>
+ The <see cref="T:NAnt.Core.Util.CommandLineArgumentAttribute"/> that's applied to the
+ <paramref name="propertyInfo"/>, or a null reference if none was applied.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineParser.LogoBanner">
+ <summary>
+ Gets a logo banner using version and copyright attributes defined on the
+ <see cref="M:System.Reflection.Assembly.GetEntryAssembly"/> or the
+ <see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>.
+ </summary>
+ <value>
+ A logo banner.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineParser.Usage">
+ <summary>
+ Gets the usage instructions.
+ </summary>
+ <value>The usage instructions.</value>
+ </member>
+ <member name="P:NAnt.Core.Util.CommandLineParser.NoArgs">
+ <summary>
+ Gets a value indicating whether no arguments were specified on the
+ command line.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Util.DefaultCommandLineArgumentAttribute">
+ <summary>
+ Marks a command-line option as being the default option. When the name of
+ a command-line argument is not specified, this option will be assumed.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.DefaultCommandLineArgumentAttribute.#ctor(NAnt.Core.Util.CommandLineArgumentTypes)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.CommandLineArgumentAttribute"/> class
+ with the specified argument type.
+ </summary>
+ <param name="argumentType">Specifies the checking to be done on the argument.</param>
+ </member>
+ <member name="T:NAnt.Core.Util.FileUtils">
+ <summary>
+ Provides modified version for Copy and Move from the File class that
+ allow for filter chain processing.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.FileUtils._bufferSize">
+ <summary>
+ Constant buffer size for copy/move functions.
+ </summary>
+ <remarks>Default value is 8k</remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.CopyFile(System.String,System.String,NAnt.Core.Filters.FilterChain,System.Text.Encoding,System.Text.Encoding)">
+ <summary>
+ Copies a file filtering its content through the filter chain.
+ </summary>
+ <param name="sourceFileName">
+ The file to copy
+ </param>
+ <param name="destFileName">
+ The file to copy to
+ </param>
+ <param name="filterChain">
+ Chain of filters to apply when copying, or <see langword="null" /> is no
+ filters should be applied.
+ </param>
+ <param name="inputEncoding">
+ The encoding used to read the soure file.
+ </param>
+ <param name="outputEncoding">
+ The encoding used to write the destination file.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.MoveFile(System.String,System.String,NAnt.Core.Filters.FilterChain,System.Text.Encoding,System.Text.Encoding)">
+ <summary>
+ Moves a file filtering its content through the filter chain.
+ </summary>
+ <param name="sourceFileName">
+ The file to move.
+ </param>
+ <param name="destFileName">
+ The file to move move to.
+ </param>
+ <param name="filterChain">
+ Chain of filters to apply when moving, or <see langword="null" /> is no
+ filters should be applied.
+ </param>
+ <param name="inputEncoding">
+ The encoding used to read the soure file.
+ </param>
+ <param name="outputEncoding">
+ The encoding used to write the destination file.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.CopyDirectory(System.String,System.String,NAnt.Core.Filters.FilterChain,System.Text.Encoding,System.Text.Encoding)">
+ <summary>
+ Copies a directory while filtering its file content through the filter chain.
+ </summary>
+ <param name="sourceDirectory">
+ Source directory to copy from.
+ </param>
+ <param name="destDirectory">
+ Destination directory to copy to.
+ </param>
+ <param name="filterChain">
+ Chain of filters to apply when copying, or <see langword="null" /> is no
+ filters should be applied.
+ </param>
+ <param name="inputEncoding">
+ The encoding used to read the soure file.
+ </param>
+ <param name="outputEncoding">
+ The encoding used to write the destination file.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.MoveDirectory(System.String,System.String,NAnt.Core.Filters.FilterChain,System.Text.Encoding,System.Text.Encoding)">
+ <summary>
+ Moves a directory while filtering its file content through the filter chain.
+ </summary>
+ <param name="sourceDirectory">
+ Source directory to move from.
+ </param>
+ <param name="destDirectory">
+ Destination directory to move to.
+ </param>
+ <param name="filterChain">
+ Chain of filters to apply when copying, or <see langword="null" /> is no
+ filters should be applied.
+ </param>
+ <param name="inputEncoding">
+ The encoding used to read the soure file.
+ </param>
+ <param name="outputEncoding">
+ The encoding used to write the destination file.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.GetTempDirectoryName">
+ <summary>
+ Generates a new temporary directory name based on the system's
+ temporary path.
+ </summary>
+ <returns>
+ The temp directory name.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.ReadFile(System.String,NAnt.Core.Filters.FilterChain,System.Text.Encoding)">
+ <summary>
+ Reads a file filtering its content through the filter chain.
+ </summary>
+ <param name="fileName">The file to read.</param>
+ <param name="filterChain">Chain of filters to apply when reading, or <see langword="null" /> is no filters should be applied.</param>
+ <param name="inputEncoding">The encoding used to read the file.</param>
+ <remarks>
+ If <paramref name="inputEncoding" /> is <see langword="null" />,
+ then the system's ANSI code page will be used to read the file.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.GetTempDirectory">
+ <summary>
+ Returns a uniquely named empty temporary directory on disk.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.DirectoryInfo"/> representing the temporary directory.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.CombinePaths(System.String,System.String)">
+ <summary>
+ Combines two path strings.
+ </summary>
+ <param name="path1">The first path.</param>
+ <param name="path2">The second path.</param>
+ <returns>
+ A string containing the combined paths. If one of the specified
+ paths is a zero-length string, this method returns the other path.
+ If <paramref name="path2"/> contains an absolute path, this method
+ returns <paramref name="path2"/>.
+ </returns>
+ <remarks>
+ <para>On *nix, processing is delegated to <see cref="M:System.IO.Path.Combine(System.String,System.String)"/>.</para>
+ <para>
+ On Windows, this method normalized the paths to avoid running into
+ the 260 character limit of a path and converts forward slashes in
+ both <paramref name="path1"/> and <paramref name="path2"/> to
+ the platform's directory separator character.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.GetFullPath(System.String)">
+ <summary>
+ Returns Absolute Path (Fix for 260 Char Limit of Path.GetFullPath(...))
+ </summary>
+ <param name="path">The file or directory for which to obtain absolute path information.</param>
+ <returns>Path Resolved</returns>
+ <exception cref="T:System.ArgumentException">path is a zero-length string, contains only white space or contains one or more invalid characters as defined by <see cref="F:System.IO.Path.InvalidPathChars"/>.</exception>
+ <exception cref="T:System.ArgumentNullException"><paramref name="path"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.GetHomeDirectory">
+ <summary>
+ Returns the home directory of the current user.
+ </summary>
+ <returns>
+ The home directory of the current user.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.FileUtils.ResolveFile(System.String[],System.String,System.Boolean)">
+ <summary>
+ Scans a list of directories for the specified filename.
+ </summary>
+ <param name="directories">The list of directories to search.</param>
+ <param name="fileName">The name of the file to look for.</param>
+ <param name="recursive">Specifies whether the directory should be searched recursively.</param>
+ <remarks>
+ The directories are scanned in the order in which they are defined.
+ </remarks>
+ <returns>
+ The absolute path to the specified file, or null if the file was
+ not found.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Util.GacCache">
+ <summary>
+ Helper class for determining whether assemblies are located in the
+ Global Assembly Cache.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.GacCache.#ctor(NAnt.Core.Project)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.GacCache"/> class in
+ the context of the given <see cref="P:NAnt.Core.Util.GacCache.Project"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.GacCache.IsAssemblyInGac(System.String)">
+ <summary>
+ Determines whether an assembly is installed in the Global
+ Assembly Cache given its file name or path.
+ </summary>
+ <param name="assemblyFile">The name or path of the file that contains the manifest of the assembly.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="assemblyFile"/> is
+ installed in the Global Assembly Cache; otherwise,
+ <see langword="false"/>.
+ </returns>
+ <remarks>
+ <para>
+ To determine whether the specified assembly is installed in the
+ Global Assembly Cache, the assembly is loaded into a separate
+ <see cref="T:System.AppDomain"/>.
+ </para>
+ <para>
+ If the family of the current runtime framework does not match the
+ family of the current target framework, this method will return
+ <see langword="false"/> for all assemblies as there's no way to
+ determine whether a given assembly is in the Global Assembly Cache
+ for another framework family than the family of the current runtime
+ framework.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Util.GacCache._domain">
+ <summary>
+ Holds the <see cref="T:System.AppDomain"/> in which assemblies will be loaded
+ to determine whether they are in the Global Assembly Cache.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.GacCache._project">
+ <summary>
+ Holds the <see cref="P:NAnt.Core.Util.GacCache.Project"/> context of the <see cref="T:NAnt.Core.Util.GacCache"/>.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Util.GacCache._gacQueryCache">
+ <summary>
+ Holds a list of assembly files for which already has been determined
+ whether they are located in the Global Assembly Cache.
+ </summary>
+ <remarks>
+ <para>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the full path to the
+ assembly file and the value is a <see cref="T:System.Boolean"/> indicating
+ whether the assembly is located in the Global Assembly Cache.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Util.GacCache._disposed">
+ <summary>
+ Holds a value indicating whether the object has been disposed.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Util.GacCache.Project">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.Util.GacCache.Project"/> context of the <see cref="T:NAnt.Core.Util.GacCache"/>.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.Util.GacCache.Project"/> context of the <see cref="T:NAnt.Core.Util.GacCache"/>.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Util.GacCache.GacResolver.InitializeLifetimeService">
+ <summary>
+ Obtains a lifetime service object to control the lifetime policy for
+ this instance.
+ </summary>
+ <returns>
+ An object of type <see cref="T:System.Runtime.Remoting.Lifetime.ILease"/> used to control the lifetime
+ policy for this instance. This is the current lifetime service object
+ for this instance if one exists; otherwise, a new lifetime service
+ object initialized with a lease that will never time out.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.GacCache.GacResolver.IsAssemblyInGac(System.String)">
+ <summary>
+ Determines whether an assembly is installed in the Global
+ Assembly Cache given its file name or path.
+ </summary>
+ <param name="assemblyFile">The name or path of the file that contains the manifest of the assembly.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="assemblyFile" /> is
+ installed in the Global Assembly Cache; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Util.ReflectionUtils">
+ <summary>
+ Provides a set of helper methods related to reflection.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.ReflectionUtils.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.ReflectionUtils"/> class.
+ </summary>
+ <remarks>
+ Uses a private access modifier to prevent instantiation of this class.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.ReflectionUtils.GetTypeFromString(System.String,System.Boolean)">
+ <summary>
+ Loads the type specified in the type string with assembly qualified name.
+ </summary>
+ <param name="typeName">The assembly qualified name of the type to load.</param>
+ <param name="throwOnError">Flag set to <see langword="true"/> to throw an exception if the type cannot be loaded.</param>
+ <exception cref="T:System.TypeLoadException">
+ <paramref name="throwOnError"/> is <see langword="true"/> and
+ an error is encountered while loading the <see cref="T:System.Type"/>, or
+ <paramref name="typeName"/> is not an assembly qualified name.
+ </exception>
+ <remarks>
+ If the <see cref="T:System.Type"/> cannot be instantiated from the assembly
+ qualified type name, then we'll try to instantiate the type using its
+ simple type name from an already loaded assembly with an assembly
+ name mathing the assembly in the assembly qualified type name.
+ </remarks>
+ <returns>
+ The type loaded or <see langword="null"/> if it could not be loaded.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.Util.ResourceUtils">
+ <summary>
+ Provides resource support to NAnt assemblies. This class cannot
+ be inherited from.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.#ctor">
+ <summary>
+ Prevents the <see cref="T:NAnt.Core.Util.ResourceUtils"/> class from being
+ instantiated explicitly.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.RegisterSharedAssembly(System.Reflection.Assembly)">
+ <summary>
+ Registers the assembly to be used as the fallback if resources
+ aren't found in the local satellite assembly.
+ </summary>
+ <param name="assembly">
+ A <see cref="T:System.Reflection.Assembly" /> that represents the
+ assembly to register.
+ </param>
+ <example>
+ The following example shows how to register a shared satellite
+ assembly.
+ <code>
+ <![CDATA[
+ Assembly sharedAssembly = Assembly.Load("MyResources.dll");
+ ResourceUtils.RegisterSharedAssembly(sharedAssembly);
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.GetString(System.String)">
+ <summary>
+ Returns the value of the specified string resource.
+ </summary>
+ <param name="name">
+ A <see cref="T:System.String" /> that contains the name of the
+ resource to get.
+ </param>
+ <returns>
+ A <see cref="T:System.String" /> that contains the value of the
+ resource localized for the current culture.
+ </returns>
+ <remarks>
+ The returned resource is localized for the cultural settings of the
+ current <see cref="T:System.Threading.Thread" />.
+ <note>
+ The <c>GetString</c> method is thread-safe.
+ </note>
+ </remarks>
+ <example>
+ The following example demonstrates the <c>GetString</c> method using
+ the cultural settings of the current <see cref="T:System.Threading.Thread" />.
+ <code>
+ <![CDATA[
+ string localizedString = ResourceUtils.GetString("String_HelloWorld");
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.GetString(System.String,System.Globalization.CultureInfo)">
+ <summary>
+ Returns the value of the specified string resource localized for
+ the specified culture.
+ </summary>
+ <param name="name"></param>
+ <param name="culture"></param>
+ <returns>
+ A <see cref="T:System.String" /> that contains the value of the
+ resource localized for the specified culture.
+ </returns>
+ <remarks>
+ <note>
+ The <c>GetString</c> method is thread-safe.
+ </note>
+ </remarks>
+ <example>
+ The following example demonstrates the <c>GetString</c> method using
+ a specific culture.
+ <code>
+ <![CDATA[
+ CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
+ string localizedString = ResourceUtils.GetString("String_HelloWorld", culture);
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.GetString(System.String,System.Globalization.CultureInfo,System.Reflection.Assembly)">
+ <summary>
+ Returns the value of the specified string resource localized for
+ the specified culture for the specified assembly.
+ </summary>
+ <param name="name">
+ A <see cref="T:System.String" /> that contains the name of the
+ resource to get.
+ </param>
+ <param name="culture">
+ A <see cref="T:System.Globalization.CultureInfo" /> that represents
+ the culture for which the resource is localized.
+ </param>
+ <param name="assembly">
+ A <see cref="T:System.Reflection.Assembly" />
+ </param>
+ <returns>
+ A <see cref="T:System.String" /> that contains the value of the
+ resource localized for the specified culture.
+ </returns>
+ <remarks>
+ <note>
+ The <c>GetString</c> method is thread-safe.
+ </note>
+ </remarks>
+ <example>
+ The following example demonstrates the <c>GetString</c> method using
+ specific culture and assembly.
+ <code>
+ <![CDATA[
+ CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
+ Assembly assembly = Assembly.GetCallingAssembly();
+ string localizedString = ResourceUtils.GetString("String_HelloWorld", culture, assembly);
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.RegisterAssembly(System.Reflection.Assembly)">
+ <summary>
+ Registers the specified assembly.
+ </summary>
+ <param name="assembly">
+ A <see cref="T:System.Reflection.Assembly" /> that represents the
+ assembly to register.
+ </param>
+ </member>
+ <member name="M:NAnt.Core.Util.ResourceUtils.GetResourceName(System.String)">
+ <summary>
+ Determines the manifest resource name of the resource holding the
+ localized strings.
+ </summary>
+ <param name="assemblyName">The name of the assembly.</param>
+ <returns>
+ The manifest resource name of the resource holding the localized
+ strings for the specified assembly.
+ </returns>
+ <remarks>
+ The manifest resource name of the resource holding the localized
+ strings should match the name of the assembly, minus <c>Tasks</c>
+ suffix.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.Util.StringUtils">
+ <summary>
+ Groups a set of useful <see cref="T:System.String"/> manipulation and validation
+ methods.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Util.StringUtils"/> class.
+ </summary>
+ <remarks>
+ Prevents instantiation of the <see cref="T:NAnt.Core.Util.StringUtils"/> class.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.EndsWith(System.String,System.Char)">
+ <summary>
+ Determines whether the last character of the given <see cref="T:System.String"/>
+ matches the specified character.
+ </summary>
+ <param name="value">The string.</param>
+ <param name="c">The character.</param>
+ <returns>
+ <see langword="true"/> if the last character of <paramref name="value"/>
+ matches <paramref name="c"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <exception cref="T:System.ArgumentNullException"><paramref name="value"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.IsNullOrEmpty(System.String)">
+ <summary>
+ Indicates whether or not the specified <see cref="T:System.String"/> is
+ <see langword="null"/> or an <see cref="F:System.String.Empty"/> string.
+ </summary>
+ <param name="value">The value to check.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is <see langword="null"/>
+ or an empty string (""); otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.ConvertEmptyToNull(System.String)">
+ <summary>
+ Converts an empty string ("") to <see langword="null" />.
+ </summary>
+ <param name="value">The value to convert.</param>
+ <returns>
+ <see langword="null" /> if <paramref name="value" /> is an empty
+ string ("") or <see langword="null" />; otherwise, <paramref name="value" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.ConvertNullToEmpty(System.String)">
+ <summary>
+ Converts <see langword="null" /> to an empty string.
+ </summary>
+ <param name="value">The value to convert.</param>
+ <returns>
+ An empty string if <paramref name="value" /> is <see langword="null" />;
+ otherwise, <paramref name="value" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.Join(System.String,System.Collections.Specialized.StringCollection)">
+ <summary>
+ Concatenates a specified separator <see cref="T:System.String"/> between each
+ element of a specified <see cref="T:System.Collections.Specialized.StringCollection"/>, yielding a
+ single concatenated string.
+ </summary>
+ <param name="separator">A <see cref="T:System.String"/>.</param>
+ <param name="value">A <see cref="T:System.Collections.Specialized.StringCollection"/>.</param>
+ <returns>
+ A <see cref="T:System.String"/> consisting of the elements of <paramref name="value"/>
+ interspersed with the separator string.
+ </returns>
+ <remarks>
+ <para>
+ For example if <paramref name="separator"/> is ", " and the elements
+ of <paramref name="value"/> are "apple", "orange", "grape", and "pear",
+ <see cref="M:NAnt.Core.Util.StringUtils.Join(System.String,System.Collections.Specialized.StringCollection)"/> returns "apple, orange,
+ grape, pear".
+ </para>
+ <para>
+ If <paramref name="separator"/> is <see langword="null"/>, an empty
+ string (<see cref="F:System.String.Empty"/>) is used instead.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Util.StringUtils.Clone(System.Collections.Specialized.StringCollection)">
+ <summary>
+ Creates a shallow copy of the specified <see cref="T:System.Collections.Specialized.StringCollection"/>.
+ </summary>
+ <param name="stringCollection">The <see cref="T:System.Collections.Specialized.StringCollection"/> that should be copied.</param>
+ <returns>
+ A shallow copy of the specified <see cref="T:System.Collections.Specialized.StringCollection"/>.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.BuildException">
+ <summary>
+ Thrown whenever an error occurs during the build.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.BuildException._location">
+ <summary>
+ The location of the exception in the build document (xml file).
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class
+ with a descriptive message.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor(System.String,System.Exception)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class
+ with the specified descriptive message and inner exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="innerException">A nested exception that is the cause of the current exception.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor(System.String,NAnt.Core.Location)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class
+ with a descriptive message and the location in the build file that
+ caused the exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="location">The location in the build file where the exception occured.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor(System.String,NAnt.Core.Location,System.Exception)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class
+ with a descriptive message, the location in the build file and an
+ instance of the exception that is the cause of the current exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="location">The location in the build file where the exception occured.</param>
+ <param name="innerException">A nested exception that is the cause of the current exception.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildException"/> class
+ with serialized data.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
+ <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
+ <param name="context">The destination for this serialization.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildException.ToString">
+ <summary>
+ Creates and returns a string representation of the current
+ exception.
+ </summary>
+ <returns>
+ A string representation of the current exception.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.BuildException.RawMessage">
+ <summary>
+ Gets the raw message as specified when the exception was
+ constructed.
+ </summary>
+ <value>
+ The raw message as specified when the exception was
+ constructed.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildException.Location">
+ <summary>
+ Gets the location in the build file of the element from which the
+ exception originated.
+ </summary>
+ <value>
+ The location in the build file of the element from which the
+ exception originated.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildException.Message">
+ <summary>
+ Gets a message that describes the current exception.
+ </summary>
+ <value>
+ The error message that explains the reason for the exception.
+ </value>
+ <remarks>
+ Adds location information to the message, if available.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.CommandLineOptions">
+ <summary>
+ Represents the set of command-line options supported by NAnt.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.TargetFramework">
+ <summary>
+ Gets or sets the target framework to use (overrides
+ NAnt.exe.config settings)
+ </summary>
+ <value>
+ The framework that should be used.
+ </value>
+ <remarks>
+ For a list of possible frameworks, see NAnt.exe.config, possible
+ values include "net-1.0", "net-1.1", etc.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.DefaultFramework">
+ <summary>
+ Gets or sets the target framework to use (overrides
+ NAnt.exe.config settings)
+ </summary>
+ <value>
+ The framework that should be used.
+ </value>
+ <remarks>
+ For a list of possible frameworks, see NAnt.exe.config, possible
+ values include "net-1.0", "net-1.1", etc.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.BuildFile">
+ <summary>
+ Gets or sets the buildfile that should be executed.
+ </summary>
+ <value>
+ The buildfile that should be executed.
+ </value>
+ <remarks>
+ Can be both a file or an URI.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Pause">
+ <summary>
+ Pauses before program ends.
+ </summary>
+ <value>
+ <see langword="true" /> for pausing on program end;
+ otherwise, <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Verbose">
+ <summary>
+ Gets or sets a value indicating whether more information should be
+ displayed during the build process.
+ </summary>
+ <value>
+ <see langword="true" /> if more information should be displayed;
+ otherwise, <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Debug">
+ <summary>
+ Gets or sets a value indicating whether debug information should be
+ displayed during the build process.
+ </summary>
+ <value>
+ <see langword="true" /> if debug information should be displayed;
+ otherwise, <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Quiet">
+ <summary>
+ Gets or sets a value indicating whether only error and debug debug messages should be
+ displayed during the build process.
+ </summary>
+ <value>
+ <see langword="true" /> if only error or warning messages should be
+ displayed; otherwise, <see langword="false" />. The default is
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.EmacsMode">
+ <summary>
+ Gets or sets a value indicating whether to produce emacs (and other
+ editor) friendly output.
+ </summary>
+ <value>
+ <see langword="true" /> if output is to be unadorned so that emacs
+ and other editors can parse files names, etc. The default is
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.FindInParent">
+ <summary>
+ Gets a value indicating whether parent directories should be searched
+ for a buildfile.
+ </summary>
+ <value>
+ <see langword="true" /> if parent directories should be searched for
+ a build file; otherwise, <see langword="false" />. The default is
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.IndentationLevel">
+ <summary>
+ Gets or sets the indentation level of the build output.
+ </summary>
+ <value>
+ The indentation level of the build output. The default is <c>0</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Properties">
+ <summary>
+ Gets or sets the list of properties that should be set.
+ </summary>
+ <value>
+ The list of properties that should be set.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.LoggerType">
+ <summary>
+ Gets or sets the <see cref="T:System.Type"/> of logger to add to the list
+ of listeners.
+ </summary>
+ <value>
+ The <see cref="T:System.Type"/> of logger to add to the list of
+ listeners.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.CommandLineOptions.LoggerType"/> should derive from <see cref="T:NAnt.Core.IBuildLogger"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.LogFile">
+ <summary>
+ Gets or sets the name of the file to log output to.
+ </summary>
+ <value>
+ The name of the file to log output to.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Listeners">
+ <summary>
+ Gets a collection containing fully qualified type names of classes
+ implementating <see cref="T:NAnt.Core.IBuildListener"/> that should be added
+ to the project as listeners.
+ </summary>
+ <value>
+ A collection of fully qualified type names that should be added as
+ listeners to the <see cref="T:NAnt.Core.Project"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.ExtensionAssemblies">
+ <summary>
+ Gets a collection of assemblies to load extensions from.
+ </summary>
+ <value>
+ A collection of assemblies to load extensions from.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.ShowProjectHelp">
+ <summary>
+ Gets or sets a value indicating whether <see cref="T:NAnt.Core.Project"/> help
+ should be printed.
+ </summary>
+ <value>
+ <see langword="true"/> if <see cref="T:NAnt.Core.Project"/> help should be
+ printed; otherwise, <see langword="false"/>. The default is
+ <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.NoLogo">
+ <summary>
+ Gets or sets a value indicating whether the logo banner should be
+ printed.
+ </summary>
+ <value>
+ <see langword="true" /> if the logo banner should be printed; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.ShowHelp">
+ <summary>
+ Gets or sets a value indicating whether the NAnt help should be
+ printed.
+ </summary>
+ <value>
+ <see langword="true" /> if NAnt help should be printed; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.CommandLineOptions.Targets">
+ <summary>
+ Gets a collection containing the targets that should be executed.
+ </summary>
+ <value>
+ A collection that contains the targets that should be executed.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.ConfigurationSection">
+ <summary>
+ Custom configuration section handler for the <nantsettings/> element.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ConfigurationSection.Create(System.Object,System.Object,System.Xml.XmlNode)">
+ <summary>
+ This just passed things through. Return the node read from the config file.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.ConsoleDriver">
+ <summary>
+ Main entry point to NAnt that is called by the ConsoleStub.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.Main(System.String[])">
+ <summary>
+ Starts NAnt. This is the Main entry point.
+ </summary>
+ <param name="args">Command Line args, or whatever you want to pass it. They will treated as Command Line args.</param>
+ <returns>
+ The exit code.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.ShowProjectHelp(System.Xml.XmlDocument)">
+ <summary>
+ Prints the projecthelp to the console.
+ </summary>
+ <param name="buildDoc">The build file to show help for.</param>
+ <remarks>
+ <paramref name="buildDoc" /> is loaded and transformed with
+ <c>ProjectHelp.xslt</c>, which is an embedded resource.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.GetBuildFileName(System.String,System.String,System.Boolean)">
+ <summary>
+ Gets the file name for the build file in the specified directory.
+ </summary>
+ <param name="directory">The directory to look for a build file. When in doubt use Environment.CurrentDirectory for directory.</param>
+ <param name="searchPattern">Look for a build file with this pattern or name. If null look for a file that matches the default build pattern (*.build).</param>
+ <param name="findInParent">Whether or not to search the parent directories for a build file.</param>
+ <returns>The path to the build file or <c>null</c> if no build file could be found.</returns>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.LoadExtensionAssemblies(System.Collections.Specialized.StringCollection,NAnt.Core.Project)">
+ <summary>
+ Loads the extension assemblies in the current <see cref="T:System.AppDomain"/>
+ and scans them for extensions.
+ </summary>
+ <param name="extensionAssemblies">The extension assemblies to load.</param>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> which will be used to output messages to the build log.</param>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.CreateLogger(System.String)">
+ <summary>
+ Dynamically constructs an <see cref="T:NAnt.Core.IBuildLogger"/> instance of
+ the class specified.
+ </summary>
+ <remarks>
+ <para>
+ At this point, only looks in the assembly where <see cref="T:NAnt.Core.IBuildLogger"/>
+ is defined.
+ </para>
+ </remarks>
+ <param name="typeName">The fully qualified name of the logger that should be instantiated.</param>
+ <exception cref="T:System.TypeLoadException">Type <paramref name="typeName"/> could not be loaded.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="typeName"/> does not implement <see cref="T:NAnt.Core.IBuildLogger"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.CreateListener(System.String)">
+ <summary>
+ Dynamically constructs an <see cref="T:NAnt.Core.IBuildListener"/> instance of
+ the class specified.
+ </summary>
+ <remarks>
+ <para>
+ At this point, only looks in the assembly where <see cref="T:NAnt.Core.IBuildListener"/>
+ is defined.
+ </para>
+ </remarks>
+ <param name="typeName">The fully qualified name of the listener that should be instantiated.</param>
+ <exception cref="T:System.TypeLoadException">Type <paramref name="typeName"/> could not be loaded.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="typeName"/> does not implement <see cref="T:NAnt.Core.IBuildListener"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.AddBuildListeners(NAnt.Core.CommandLineOptions,NAnt.Core.Project)">
+ <summary>
+ Add the listeners specified in the command line arguments,
+ along with the default listener, to the specified project.
+ </summary>
+ <param name="cmdlineOptions">The command-line options.</param>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> to add listeners to.</param>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.ShowHelp(NAnt.Core.Util.CommandLineParser)">
+ <summary>
+ Spits out generic help info to the console.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ConsoleDriver.WriteException(System.Exception)">
+ <summary>
+ Write the message of the specified <see cref="T:System.Exception"/> and
+ the inner exceptions to <see cref="P:System.Console.Error"/>.
+ </summary>
+ <param name="cause">The <see cref="T:System.Exception"/> to write to <see cref="P:System.Console.Error"/>.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilder.#ctor(System.Reflection.Assembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> class
+ for the specified <see cref="T:NAnt.Core.DataTypeBase"/> class in the specified
+ <see cref="T:System.Reflection.Assembly"/>.
+ </summary>
+ <remarks>
+ An <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the specified <see cref="T:System.Reflection.Assembly"/>
+ is cached for future use.
+ </remarks>
+ <param name="assembly">The <see cref="T:System.Reflection.Assembly"/> containing the <see cref="T:NAnt.Core.DataTypeBase"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.DataTypeBase"/>.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilder.#ctor(NAnt.Core.Extensibility.ExtensionAssembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>
+ class for the specified <see cref="T:NAnt.Core.DataTypeBase"/> class in the
+ <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> specified.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:NAnt.Core.DataTypeBase"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.DataTypeBase"/>.</param>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBaseBuilder.ClassName">
+ <summary>
+ Gets the name of the <see cref="T:NAnt.Core.DataTypeBase"/> class that can be
+ created using this <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>.
+ </summary>
+ <value>
+ The name of the <see cref="T:NAnt.Core.DataTypeBase"/> class that can be created
+ using this <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBaseBuilder.DataTypeName">
+ <summary>
+ Gets the name of the data type which the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>
+ can create.
+ </summary>
+ <value>
+ The name of the data type which the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>
+ can create.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.DataTypeBaseBuilderCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.#ctor(NAnt.Core.DataTypeBaseBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> class
+ with the specified <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.#ctor(NAnt.Core.DataTypeBaseBuilder[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.Add(NAnt.Core.DataTypeBaseBuilder)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.AddRange(NAnt.Core.DataTypeBaseBuilder[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.AddRange(NAnt.Core.DataTypeBaseBuilderCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.Contains(NAnt.Core.DataTypeBaseBuilder)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> for the specified
+ task is in the collection.
+ </summary>
+ <param name="taskName">The name of task for which the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> should be located in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> for
+ the specified task is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.CopyTo(NAnt.Core.DataTypeBaseBuilder[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.IndexOf(NAnt.Core.DataTypeBaseBuilder)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.DataTypeBaseBuilder"/>. If the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.Insert(System.Int32,NAnt.Core.DataTypeBaseBuilder)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.DataTypeBaseBuilderEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderCollection.Remove(NAnt.Core.DataTypeBaseBuilder)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBaseBuilderCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBaseBuilderCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> for the specified task.
+ </summary>
+ <param name="dataTypeName">The name of task for which the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> should be located in the collection.</param>
+ </member>
+ <member name="T:NAnt.Core.DataTypeBaseBuilderEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> elements of a <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderEnumerator.#ctor(NAnt.Core.DataTypeBaseBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseBuilderEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.DataTypeBaseBuilderCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseBuilderEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DataTypeBaseBuilderEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseDictionary.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseDictionary"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseDictionary.#ctor(System.Int32)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DataTypeBaseDictionary"/> class
+ with the specified capacity.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DataTypeBaseDictionary.Inherit(NAnt.Core.DataTypeBaseDictionary)">
+ <summary>
+ Inherits Properties from an existing property
+ dictionary Instance
+ </summary>
+ <param name="source">DataType list to inherit</param>
+ </member>
+ <member name="T:NAnt.Core.DirectoryScanner">
+ <summary>
+ Used for searching filesystem based on given include/exclude rules.
+ </summary>
+ <example>
+ <para>Simple client code for testing the class.</para>
+ <code>
+ while (true) {
+ DirectoryScanner scanner = new DirectoryScanner();
+
+ Console.Write("Scan Basedirectory : ");
+ string s = Console.ReadLine();
+ if (s.Length == 0) break;
+ scanner.BaseDirectory = s;
+
+ while(true) {
+ Console.Write("Include pattern : ");
+ s = Console.ReadLine();
+ if (s.Length == 0) break;
+ scanner.Includes.Add(s);
+ }
+
+ while(true) {
+ Console.Write("Exclude pattern : ");
+ s = Console.ReadLine();
+ if (s.Length == 0) break;
+ scanner.Excludes.Add(s);
+ }
+
+ foreach (string name in scanner.FileNames)
+ Console.WriteLine("file:" + name);
+ foreach (string name in scanner.DirectoryNames)
+ Console.WriteLine("dir :" + name);
+
+ Console.WriteLine("");
+ }
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DirectoryScanner"/>.
+ </summary>
+ <remarks>
+ On unix, patterns are matching case-sensitively; otherwise, they
+ are matched case-insensitively.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.#ctor(System.Boolean)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DirectoryScanner"/>
+ specifying whether patterns are to be match case-sensitively.
+ </summary>
+ <param name="caseSensitive">Specifies whether patterns are to be matched case-sensititely.</param>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.DirectoryScanner"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.DirectoryScanner"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.Scan">
+ <summary>
+ Uses <see cref="P:NAnt.Core.DirectoryScanner.Includes"/> and <see cref="P:NAnt.Core.DirectoryScanner.Excludes"/> search criteria (relative to
+ <see cref="P:NAnt.Core.DirectoryScanner.BaseDirectory"/> or absolute), to search for filesystem objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.ConvertPatterns(System.Collections.Specialized.StringCollection,System.Collections.ArrayList,System.Collections.Specialized.StringCollection,System.Boolean)">
+ <summary>
+ Parses specified NAnt search patterns for search directories and
+ corresponding regex patterns.
+ </summary>
+ <param name="nantPatterns">In. NAnt patterns. Absolute or relative paths.</param>
+ <param name="regexPatterns">Out. Regex patterns. Absolute canonical paths.</param>
+ <param name="nonRegexFiles">Out. Non-regex files. Absolute canonical paths.</param>
+ <param name="addSearchDirectories">In. Whether to allow a pattern to add search directories.</param>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.ParseSearchDirectoryAndPattern(System.Boolean,System.String,System.String@,System.Boolean@,System.Boolean@,System.String@)">
+ <summary>
+ Given a NAnt search pattern returns a search directory and an regex
+ search pattern.
+ </summary>
+ <param name="isInclude">Whether this pattern is an include or exclude pattern</param>
+ <param name="originalNAntPattern">NAnt searh pattern (relative to the Basedirectory OR absolute, relative paths refering to parent directories ( ../ ) also supported)</param>
+ <param name="searchDirectory">Out. Absolute canonical path to the directory to be searched</param>
+ <param name="recursive">Out. Whether the pattern is potentially recursive or not</param>
+ <param name="isRegex">Out. Whether this is a regex pattern or not</param>
+ <param name="regexPattern">Out. Regex search pattern (absolute canonical path)</param>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.ScanDirectory(System.String,System.Boolean)">
+ <summary>
+ Searches a directory recursively for files and directories matching
+ the search criteria.
+ </summary>
+ <param name="path">Directory in which to search (absolute canonical path)</param>
+ <param name="recursive">Whether to scan recursively or not</param>
+ </member>
+ <member name="M:NAnt.Core.DirectoryScanner.ToRegexPattern(System.String)">
+ <summary>
+ Converts search pattern to a regular expression pattern.
+ </summary>
+ <param name="nantPattern">Search pattern relative to the search directory.</param>
+ <returns>Regular expresssion</returns>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.CaseSensitive">
+ <summary>
+ Gets or set a value indicating whether or not to use case-sensitive
+ pattern matching.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.Includes">
+ <summary>
+ Gets the collection of include patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.Excludes">
+ <summary>
+ Gets the collection of exclude patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.BaseDirectory">
+ <summary>
+ The base directory to scan. The default is the
+ <see cref="P:System.Environment.CurrentDirectory">current directory</see>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.FileNames">
+ <summary>
+ Gets the list of files that match the given patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.DirectoryNames">
+ <summary>
+ Gets the list of directories that match the given patterns.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.ScannedDirectories">
+ <summary>
+ Gets the list of directories that were scanned for files.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DirectoryScanner.IsEverythingIncluded">
+ <summary>
+ Indicates whether or not the directory scanner included everything
+ that it scanned.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.StringCollectionWithGoodToString.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.StringCollectionWithGoodToString"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.StringCollectionWithGoodToString"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.StringCollectionWithGoodToString.ToString">
+ <summary>
+ Creates a string representing a list of the strings in the collection.
+ </summary>
+ <returns>
+ A string that represents the contents.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DirScannerStringCollection.#ctor(System.Boolean)">
+ <summary>
+ Initialize a new instance of the <see cref="T:NAnt.Core.DirScannerStringCollection"/>
+ class specifying whether or not string comparison should be
+ case-sensitive.
+ </summary>
+ <param name="caseSensitive">Specifies whether or not string comparison should be case-sensitive.</param>
+ </member>
+ <member name="M:NAnt.Core.DirScannerStringCollection.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.DirScannerStringCollection"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.DirScannerStringCollection"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.DirScannerStringCollection.Contains(System.String)">
+ <summary>
+ Determines whether the specified string is in the
+ <see cref="T:NAnt.Core.DirScannerStringCollection"/>.
+ </summary>
+ <param name="value">The string to locate in the <see cref="T:NAnt.Core.DirScannerStringCollection"/>. The value can be <see langword="null"/>.</param>
+ <returns>
+ <seee langword="true"/> if value is found in the <see cref="T:NAnt.Core.DirScannerStringCollection"/>; otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ String comparisons within the <see cref="T:NAnt.Core.DirScannerStringCollection"/>
+ are only case-sensitive if <see cref="P:NAnt.Core.DirScannerStringCollection.CaseSensitive"/> is
+ <see langword="true"/>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DirScannerStringCollection.IndexOf(System.String)">
+ <summary>
+ Searches for the specified string and returns the zero-based index
+ of the first occurrence within the <see cref="T:NAnt.Core.DirScannerStringCollection"/>.
+ </summary>
+ <param name="value">The string to locate. The value can be <see langword="null"/>.</param>
+ <returns>
+ The zero-based index of the first occurrence of <paramref name="value"/>
+ in the <see cref="T:NAnt.Core.DirScannerStringCollection"/>, if found; otherwise, -1.
+ </returns>
+ <remarks>
+ String comparisons within the <see cref="T:NAnt.Core.DirScannerStringCollection"/>
+ are only case-sensitive if <see cref="P:NAnt.Core.DirScannerStringCollection.CaseSensitive"/> is
+ <see langword="true"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.DirScannerStringCollection.CaseSensitive">
+ <summary>
+ Gets a value indicating whether string comparison is case-sensitive.
+ </summary>
+ <value>
+ A value indicating whether string comparison is case-sensitive.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.ExpressionEvaluator.GetPropertyValue(System.String)">
+ <summary>
+ Gets the value of the specified property.
+ </summary>
+ <param name="propertyName">The name of the property to get the value of.</param>
+ <returns>
+ The value of the specified property.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.ExpressionTokenizer">
+ <summary>
+ Splits an input string into a sequence of tokens used during parsing.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.ExpressionTokenizer.TokenType">
+ <summary>
+ Available tokens
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.FrameworkInfo">
+ <summary>
+ Encalsulates information about installed frameworks incuding version
+ information and directory locations for finding tools.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.FrameworkInfo.ResolveAssembly(System.String)">
+ <summary>
+ Resolves the specified assembly to a full path by matching it
+ against the reference assemblies.
+ </summary>
+ <param name="fileName">The file name of the assembly to resolve (without path information).</param>
+ <returns>
+ An absolute path to the assembly, or <see langword="null" /> if the
+ assembly could not be found or no reference assemblies are configured
+ for the current framework.
+ </returns>
+ <remarks>
+ Whether the file name is matched case-sensitively depends on the
+ operating system.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.FrameworkInfo.GetToolPath(System.String)">
+ <summary>
+ Searches the list of tool paths of the current framework for the
+ given file, and returns the absolute path if found.
+ </summary>
+ <param name="tool">The file name of the tool to search for.</param>
+ <returns>
+ The absolute path to <paramref name="tool"/> if found in one of the
+ configured tool paths; otherwise, <see langword="null"/>.
+ </returns>
+ <exception cref="T:System.ArgumentNullException"><paramref name="tool"/> is <see langword="null"/>.</exception>
+ <remarks>
+ <para>
+ The configured tool paths are scanned in the order in which they
+ are defined in the framework configuration.
+ </para>
+ <para>
+ The file name of the tool to search should include the extension.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.FrameworkInfo.GetXmlAttributeValue(System.Xml.XmlNode,System.String)">
+ <summary>
+ Gets the value of the specified attribute from the specified node.
+ </summary>
+ <param name="xmlNode">The node of which the attribute value should be retrieved.</param>
+ <param name="attributeName">The attribute of which the value should be returned.</param>
+ <returns>
+ The value of the attribute with the specified name or <see langword="null" />
+ if the attribute does not exist or has no value.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Name">
+ <summary>
+ Gets the name of the framework.
+ </summary>
+ <value>
+ The name of the framework.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Family">
+ <summary>
+ Gets the family of the framework.
+ </summary>
+ <value>
+ The family of the framework.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Description">
+ <summary>
+ Gets the description of the framework.
+ </summary>
+ <value>
+ The description of the framework.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Vendor">
+ <summary>
+ Gets the vendor of the framework.
+ </summary>
+ <value>
+ The vendor of the framework.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Version">
+ <summary>
+ Gets the version of the framework.
+ </summary>
+ <value>
+ The version of the framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ <remarks>
+ When <see cref="P:NAnt.Core.FrameworkInfo.Version"/> is not configured, the framework is not
+ considered valid.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.ClrVersion">
+ <summary>
+ Gets the Common Language Runtime version of the framework.
+ </summary>
+ <value>
+ The Common Language Runtime version of the framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ <remarks>
+ When <see cref="P:NAnt.Core.FrameworkInfo.ClrVersion"/> is <see langword="null"/>, the
+ framework is not considered valid.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.ClrType">
+ <summary>
+ Gets the CLR type of the framework.
+ </summary>
+ <value>
+ The CLR type of the framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.VisualStudioVersion">
+ <summary>
+ Gets the Visual Studio version that corresponds with this
+ framework.
+ </summary>
+ <value>
+ The Visual Studio version that corresponds with this framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ <exception cref="T:NAnt.Core.BuildException">There is no version of Visual Studio that corresponds with this framework.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.FrameworkDirectory">
+ <summary>
+ Gets the base directory of the framework tools for the framework.
+ </summary>
+ <value>
+ The base directory of the framework tools for the framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Runtime">
+ <summary>
+ Gets the runtime information for this framework.
+ </summary>
+ <value>
+ The runtime information for the framework or <see langword="null"/>
+ if no runtime information is configured for the framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.FrameworkAssemblyDirectory">
+ <summary>
+ Gets the directory where the system assemblies for the framework
+ are located.
+ </summary>
+ <value>
+ The directory where the system assemblies for the framework are
+ located.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.SdkDirectory">
+ <summary>
+ Gets the directory containing the SDK tools for the framework.
+ </summary>
+ <value>
+ The directory containing the SDK tools for the framework or a null
+ reference if the configured sdk directory does not exist, or is not
+ valid.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.Project">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.FrameworkInfo.Project"/> used to initialize this framework.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.FrameworkInfo.Project"/> used to initialize this framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.TaskAssemblies">
+ <summary>
+ Gets the set of assemblies and directories that should scanned for
+ NAnt tasks, types or functions.
+ </summary>
+ <value>
+ The set of assemblies and directories that should be scanned for
+ NAnt tasks, types or functions.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.IsValid">
+ <summary>
+ Returns a value indicating whether the current framework is valid.
+ </summary>
+ <value>
+ <see langword="true" /> if the framework is installed and correctly
+ configured; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.ReferenceAssemblies">
+ <summary>
+ Gets the reference assemblies for the current framework.
+ </summary>
+ <value>
+ The reference assemblies for the current framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.ToolPaths">
+ <summary>
+ Gets the tool paths for the current framework.
+ </summary>
+ <value>
+ The tool paths for the current framework.
+ </value>
+ <exception cref="T:System.ArgumentException">The framework is not valid.</exception>
+ </member>
+ <member name="P:NAnt.Core.FrameworkInfo.NamespaceManager">
+ <summary>
+ Gets the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.FrameworkInfo.NamespaceManager"/> defines the current namespace
+ scope and provides methods for looking up namespace information.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.FrameworkInfoDictionary.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.FrameworkInfoDictionary"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.FrameworkInfoDictionary.#ctor(System.Int32)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.FrameworkInfoDictionary"/> class
+ with the specified capacity.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.FrameworkTypes">
+ <summary>
+ Defines the types of frameworks.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.NotInstalled">
+ <summary>
+ Frameworks that are supported on the current platform, but are not
+ installed.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.Installed">
+ <summary>
+ Frameworks that are installed on the current system.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.InstallStateMask">
+ <summary>
+ Retrieves installation state attributes.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.Desktop">
+ <summary>
+ Frameworks that typically target full desktop devices.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.Compact">
+ <summary>
+ Frameworks that target compact devices.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.Browser">
+ <summary>
+ Frameworks that run in a browser.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.DeviceMask">
+ <summary>
+ Retrieves device attributes.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.Mono">
+ <summary>
+ Frameworks released as part of the open-source <see href="http://www.mono-project.com">Mono</see>
+ project.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.MS">
+ <summary>
+ Frameworks released by Microsoft.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.VendorMask">
+ <summary>
+ Retrieves vendor attributes.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.FrameworkTypes.All">
+ <summary>
+ All frameworks supported on the current platform, regarless of their
+ installation state, target device or vendor.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Location">
+ <summary>
+ Stores the file name, line number and column number to record a position
+ in a text file.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Location.#ctor(System.String,System.Int32,System.Int32)">
+ <summary>
+ Creates a location consisting of a file name, line number and
+ column number.
+ </summary>
+ <remarks>
+ <paramref name="fileName" /> can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Location.#ctor(System.String)">
+ <summary>
+ Creates a location consisting of a file name.
+ </summary>
+ <remarks>
+ <paramref name="fileName" /> can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Location.#ctor">
+ <summary>
+ Creates an "unknown" location.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Location.Init(System.String,System.Int32,System.Int32)">
+ <summary>Private Init function.</summary>
+ </member>
+ <member name="M:NAnt.Core.Location.ToString">
+ <summary>
+ Returns the file name, line number and a trailing space. An error
+ message can be appended easily. For unknown locations, returns
+ an empty string.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Location.FileName">
+ <summary>
+ Gets a string containing the file name for the location.
+ </summary>
+ <remarks>
+ The file name includes both the file path and the extension.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Location.LineNumber">
+ <summary>
+ Gets the line number for the location.
+ </summary>
+ <remarks>
+ Lines start at 1. Will be zero if not specified.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Location.ColumnNumber">
+ <summary>
+ Gets the column number for the location.
+ </summary>
+ <remarks>
+ Columns start a 1. Will be zero if not specified.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.LocationMap">
+ <summary>
+ Maps XML nodes to the text positions from their original source.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LocationMap.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.LocationMap"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LocationMap.FileIsMapped(System.String)">
+ <summary>
+ Determines if a file has been loaded by the current project.
+ </summary>
+ <param name="fileOrUri">The file to check.</param>
+ <returns>
+ <see langword="true" /> if the specified file has already been loaded
+ by the current project; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.LocationMap.Add(System.Xml.XmlDocument)">
+ <summary>
+ Adds an <see cref="T:System.Xml.XmlDocument"/> to the map.
+ </summary>
+ <remarks>
+ An <see cref="T:System.Xml.XmlDocument"/> can only be added to the map once.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.LocationMap.GetLocation(System.Xml.XmlNode)">
+ <summary>
+ Returns the <see cref="T:NAnt.Core.Location"/> in the XML file for the given node.
+ </summary>
+ <remarks>
+ The <paramref name="node"/> must be from an <see cref="T:System.Xml.XmlDocument"/>
+ that has been added to the map.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.LocationMap.TextPosition">
+ <summary>
+ Represents a position in the build file.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LocationMap.TextPosition.#ctor(System.Int32,System.Int32)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.LocationMap.TextPosition"/>
+ with the speified line and column.
+ </summary>
+ <param name="line">The line coordinate of the position.</param>
+ <param name="column">The column coordinate of the position.</param>
+ </member>
+ <member name="F:NAnt.Core.LocationMap.TextPosition.Line">
+ <summary>
+ The line coordinate of the position.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.LocationMap.TextPosition.Column">
+ <summary>
+ The column coordinate of the position.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.Level">
+ <summary>
+ Defines the set of levels recognised by the NAnt logging system.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.Debug">
+ <summary>
+ Designates fine-grained informational events that are most useful
+ to debug a build process.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.Verbose">
+ <summary>
+ Designates events that offer a more detailed view of the build
+ process.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.Info">
+ <summary>
+ Designates informational events that are useful for getting a
+ high-level view of the build process.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.Warning">
+ <summary>
+ Designates potentionally harmful events.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.Error">
+ <summary>
+ Designates error events.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Level.None">
+ <summary>
+ Can be used to suppress all messages.
+ </summary>
+ <remarks>
+ No events should be logged with this <see cref="T:NAnt.Core.Level"/>.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Core.LevelConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> for <see cref="T:NAnt.Core.Level"/>
+ that ignores case when converting from string.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LevelConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.LevelConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LevelConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.BuildEventArgs">
+ <summary>
+ Class representing an event occurring during a build.
+ </summary>
+ <remarks>
+ <para>
+ An event is built by specifying either a project, a task or a target.
+ </para>
+ <para>
+ A <see cref="P:NAnt.Core.BuildEventArgs.Project"/> level event will only have a <see cref="P:NAnt.Core.BuildEventArgs.Project"/>
+ reference.
+ </para>
+ <para>
+ A <see cref="P:NAnt.Core.BuildEventArgs.Target"/> level event will have <see cref="P:NAnt.Core.BuildEventArgs.Project"/> and
+ <see cref="P:NAnt.Core.BuildEventArgs.Target"/> references.
+ </para>
+ <para>
+ A <see cref="P:NAnt.Core.BuildEventArgs.Task"/> level event will have <see cref="P:NAnt.Core.BuildEventArgs.Project"/>,
+ <see cref="P:NAnt.Core.BuildEventArgs.Target"/> and <see cref="P:NAnt.Core.BuildEventArgs.Task"/> references.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.BuildEventArgs.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildEventArgs"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildEventArgs.#ctor(NAnt.Core.Project)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildEventArgs"/>
+ class for a <see cref="P:NAnt.Core.BuildEventArgs.Project"/> level event.
+ </summary>
+ <param name="project">The <see cref="P:NAnt.Core.BuildEventArgs.Project"/> that emitted the event.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildEventArgs.#ctor(NAnt.Core.Target)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildEventArgs"/>
+ class for a <see cref="P:NAnt.Core.BuildEventArgs.Target"/> level event.
+ </summary>
+ <param name="target">The <see cref="P:NAnt.Core.BuildEventArgs.Target"/> that emitted the event.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildEventArgs.#ctor(NAnt.Core.Task)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildEventArgs"/>
+ class for a <see cref="P:NAnt.Core.BuildEventArgs.Task"/> level event.
+ </summary>
+ <param name="task">The <see cref="P:NAnt.Core.BuildEventArgs.Task"/> that emitted the event.</param>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.Message">
+ <summary>
+ Gets or sets the message associated with this event.
+ </summary>
+ <value>
+ The message associated with this event.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.MessageLevel">
+ <summary>
+ Gets or sets the priority level associated with this event.
+ </summary>
+ <value>
+ The priority level associated with this event.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.Exception">
+ <summary>
+ Gets or sets the <see cref="P:NAnt.Core.BuildEventArgs.Exception"/> associated with this event.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.BuildEventArgs.Exception"/> associated with this event.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.Project">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.BuildEventArgs.Project"/> that fired this event.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.BuildEventArgs.Project"/> that fired this event.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.Target">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.BuildEventArgs.Target"/> that fired this event.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.BuildEventArgs.Target"/> that fired this event, or a null reference
+ if this is a <see cref="P:NAnt.Core.BuildEventArgs.Project"/> level event.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.BuildEventArgs.Task">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.BuildEventArgs.Task"/> that fired this event.
+ </summary>
+ <value>
+ The <see cref="P:NAnt.Core.BuildEventArgs.Task"/> that fired this event, or <see langword="null"/>
+ if this is a <see cref="P:NAnt.Core.BuildEventArgs.Project"/> or <see cref="P:NAnt.Core.BuildEventArgs.Target"/> level
+ event.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.BuildEventHandler">
+ <summary>
+ Represents the method that handles the build events.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="T:NAnt.Core.IBuildListener">
+ <summary>
+ Instances of classes that implement this interface can register to be
+ notified when things happen during a build.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.BuildStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a build has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event is fired before any targets have started.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.BuildFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that the last target has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.TargetStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a target has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.TargetFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a target has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.TaskStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.TaskFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.IBuildListener.MessageLogged(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a message has been logged.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="T:NAnt.Core.IBuildLogger">
+ <summary>
+ Interface used by NAnt to log the build output.
+ </summary>
+ <remarks>
+ Depending on the supplied command-line arguments, NAnt will set the
+ <see cref="P:NAnt.Core.IBuildLogger.OutputWriter"/> to <see cref="P:System.Console.Out"/> or a
+ <see cref="T:System.IO.StreamWriter"/> with a file as backend store.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.IBuildLogger.Flush">
+ <summary>
+ Flushes buffered build events or messages to the underlying storage.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.IBuildLogger.Threshold">
+ <summary>
+ Gets or sets the highest level of message this logger should respond
+ to.
+ </summary>
+ <value>The highest level of message this logger should respond to.</value>
+ <remarks>
+ Only messages with a message level higher than or equal to the given
+ level should actually be written to the log.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.IBuildLogger.EmacsMode">
+ <summary>
+ Gets or sets a value indicating whether to produce emacs (and other
+ editor) friendly output.
+ </summary>
+ <value>
+ <see langword="true" /> if output is to be unadorned so that emacs
+ and other editors can parse files names, etc.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.IBuildLogger.OutputWriter">
+ <summary>
+ Gets or sets the <see cref="T:System.IO.TextWriter"/> to which the logger is
+ to send its output.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.DefaultLogger"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.Flush">
+ <summary>
+ Flushes buffered build events or messages to the underlying storage.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.BuildStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a build has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event is fired before any targets have started.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.BuildFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that the last target has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.TargetStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a target has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.TargetFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.TaskStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.TaskFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.MessageLogged(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a message has been logged.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ Only messages with a priority higher or equal to the threshold of
+ the logger will actually be output in the build log.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.Log(System.String)">
+ <summary>
+ Empty implementation which allows derived classes to receive the
+ output that is generated in this logger.
+ </summary>
+ <param name="message">The message being logged.</param>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.OutputMessage(NAnt.Core.Level,System.String,System.Int32)">
+ <summary>
+ Outputs an indented message to the build log if its priority is
+ greather than or equal to the <see cref="P:NAnt.Core.DefaultLogger.Threshold"/> of the
+ logger.
+ </summary>
+ <param name="messageLevel">The priority of the message to output.</param>
+ <param name="message">The message to output.</param>
+ <param name="indentationLength">The number of characters that the message should be indented.</param>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.OutputMessage(NAnt.Core.BuildEventArgs)">
+ <summary>
+ Outputs an indented message to the build log if its priority is
+ greather than or equal to the <see cref="P:NAnt.Core.DefaultLogger.Threshold"/> of the
+ logger.
+ </summary>
+ <param name="e">The event to output.</param>
+ </member>
+ <member name="M:NAnt.Core.DefaultLogger.OutputMessage(NAnt.Core.BuildEventArgs,System.Int32)">
+ <summary>
+ Outputs an indented message to the build log if its priority is
+ greather than or equal to the <see cref="P:NAnt.Core.DefaultLogger.Threshold"/> of the
+ logger.
+ </summary>
+ <param name="e">The event to output.</param>
+ <param name="indentationLength">The number of characters that the message should be indented.</param>
+ </member>
+ <member name="F:NAnt.Core.DefaultLogger._buildReports">
+ <summary>
+ Holds a stack of reports for all running builds.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.DefaultLogger.Threshold">
+ <summary>
+ Gets or sets the highest level of message this logger should respond
+ to.
+ </summary>
+ <value>
+ The highest level of message this logger should respond to.
+ </value>
+ <remarks>
+ Only messages with a message level higher than or equal to the given
+ level should be written to the log.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.DefaultLogger.EmacsMode">
+ <summary>
+ Gets or sets a value indicating whether to produce emacs (and other
+ editor) friendly output.
+ </summary>
+ <value>
+ <see langword="true" /> if output is to be unadorned so that emacs
+ and other editors can parse files names, etc. The default is
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.DefaultLogger.OutputWriter">
+ <summary>
+ Gets or sets the <see cref="T:System.IO.TextWriter"/> to which the logger is
+ to send its output.
+ </summary>
+ <value>
+ The <see cref="T:System.IO.TextWriter"/> to which the logger sends its output.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.BuildReport">
+ <summary>
+ Used to store information about a build, to allow better reporting to
+ the user.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.BuildReport.Errors">
+ <summary>
+ Errors encountered so far.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.BuildReport.Warnings">
+ <summary>
+ Warnings encountered so far.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.BuildReport.StartTime">
+ <summary>
+ The start time of the build process.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.MailLogger">
+ <summary>
+ Buffers log messages from DefaultLogger, and sends an e-mail with the
+ results.
+ </summary>
+ <remarks>
+ The following properties are used to send the mail :
+ <list type="table">
+ <listheader>
+ <term>Property</term>
+ <description>Description</description>
+ </listheader>
+ <item>
+ <term>MailLogger.mailhost</term>
+ <description>Mail server to use. [default: localhost]</description>
+ </item>
+ <item>
+ <term>MailLogger.from</term>
+ <description>The address of the e-mail sender.</description>
+ </item>
+ <item>
+ <term>MailLogger.failure.notify</term>
+ <description>Send build failure e-mails ? [default: true]</description>
+ </item>
+ <item>
+ <term>MailLogger.success.notify</term>
+ <description>Send build success e-mails ? [default: true]</description>
+ </item>
+ <item>
+ <term>MailLogger.failure.to</term>
+ <description>The address to send build failure messages to.</description>
+ </item>
+ <item>
+ <term>MailLogger.success.to</term>
+ <description>The address to send build success messages to.</description>
+ </item>
+ <item>
+ <term>MailLogger.failure.subject</term>
+ <description>The subject of build failure messages. [default: "Build Failure"]</description>
+ </item>
+ <item>
+ <term>MailLogger.success.subject</term>
+ <description>The subject of build success messages. [default: "Build Success"]</description>
+ </item>
+ <item>
+ <term>MailLogger.success.attachments</term>
+ <description>The ID of a fileset holdng set of files to attach when the build is successful.</description>
+ </item>
+ <item>
+ <term>MailLogger.failure.attachments</term>
+ <description>The ID of a fileset holdng set of files to attach when the build fails.</description>
+ </item>
+ <item>
+ <term>MailLogger.body.encoding</term>
+ <description>The encoding type of the body of the e-mail message. [default: system's ANSI code page]</description>
+ </item>
+ <item>
+ <term>MailLogger.smtp.username</term>
+ <description>The name of the user to login to the SMTP server.</description>
+ </item>
+ <item>
+ <term>MailLogger.smtp.password</term>
+ <description>The password of the specified user.</description>
+ </item>
+ <item>
+ <term>MailLogger.smtp.enablessl</term>
+ <description>Specifies whether to use SSL to encrypt the connection. [default: false]</description>
+ </item>
+ <item>
+ <term>MailLogger.smtp.port</term>
+ <description>The SMTP server port to connect to. [default: 25]</description>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.MailLogger.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.MailLogger"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.MailLogger.BuildStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a build has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event is fired before any targets have started.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.MailLogger.BuildFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that the last target has finished, and send an e-mail with
+ the build results.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.MailLogger.Log(System.String)">
+ <summary>
+ Receives and buffers log messages.
+ </summary>
+ <param name="message">The message being logged.</param>
+ </member>
+ <member name="M:NAnt.Core.MailLogger.GetPropertyValue(NAnt.Core.PropertyDictionary,System.String,System.String,System.Boolean)">
+ <summary>
+ Gets the value of the specified property.
+ </summary>
+ <param name="properties">Properties to obtain value from.</param>
+ <param name="name">Suffix of property name. "MailLogger" will be prepended internally.</param>
+ <param name="defaultValue">Value returned if property is not present in <paramref name="properties"/>.</param>
+ <param name="required">Value indicating whether the property should exist, or have a default value set.</param>
+ <returns>
+ The value of the specified property; or the default value if the
+ property is not present in <paramref name="properties"/>.
+ </returns>
+ <exception cref="T:System.ArgumentNullException"><paramref name="required"/> is <see langword="true"/>, and the specified property is not present and no default value has been given.</exception>
+ </member>
+ <member name="F:NAnt.Core.MailLogger._buffer">
+ <summary>
+ Buffer in which the message is constructed prior to sending.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.MailLogger._projectStack">
+ <summary>
+ Holds the stack of currently executing projects.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.BuildListenerCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.Core.IBuildListener"/>
+ objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildListenerCollection"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.#ctor(NAnt.Core.BuildListenerCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildListenerCollection"/>
+ class with the specified <see cref="T:NAnt.Core.BuildListenerCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.#ctor(NAnt.Core.IBuildListener[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildListenerCollection"/>
+ class with the specified array of <see cref="T:NAnt.Core.IBuildListener"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.Add(NAnt.Core.IBuildListener)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.IBuildListener"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.IBuildListener"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.AddRange(NAnt.Core.IBuildListener[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.IBuildListener"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.IBuildListener"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.AddRange(NAnt.Core.BuildListenerCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.BuildListenerCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.BuildListenerCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.Contains(NAnt.Core.IBuildListener)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.IBuildListener"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.IBuildListener"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.CopyTo(NAnt.Core.IBuildListener[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.IndexOf(NAnt.Core.IBuildListener)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.IBuildListener"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.IBuildListener"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.IBuildListener"/>. If the <see cref="T:NAnt.Core.IBuildListener"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.Insert(System.Int32,NAnt.Core.IBuildListener)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.IBuildListener"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.IBuildListener"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.BuildListenerEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerCollection.Remove(NAnt.Core.IBuildListener)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.IBuildListener"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.BuildListenerCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.Core.BuildListenerEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.IBuildListener"/> elements of a <see cref="T:NAnt.Core.BuildListenerCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerEnumerator.#ctor(NAnt.Core.BuildListenerCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.BuildListenerEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.BuildListenerCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.BuildListenerEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.BuildListenerEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.LogWriter">
+ <summary>
+ Implements a <see cref="T:System.IO.TextWriter"/> for writing information to
+ the NAnt logging infrastructure.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.#ctor(NAnt.Core.Task,NAnt.Core.Level,System.IFormatProvider)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.LogWriter"/> class
+ for the specified <see cref="T:NAnt.Core.Task"/> with the specified output
+ level and format provider.
+ </summary>
+ <param name="task">Determines the indentation level.</param>
+ <param name="outputLevel">The <see cref="T:NAnt.Core.Level"/> with which messages will be output to the build log.</param>
+ <param name="formatProvider">An <see cref="T:System.IFormatProvider"/> object that controls formatting.</param>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.Write(System.Char[])">
+ <summary>
+ Writes a character array to the buffer.
+ </summary>
+ <param name="chars">The character array to write to the text stream.</param>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.Write(System.String)">
+ <summary>
+ Writes a string to the buffer.
+ </summary>
+ <param name="value"></param>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.WriteLine">
+ <summary>
+ Writes an empty string to the logging infrastructure.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.WriteLine(System.String)">
+ <summary>
+ Writes a string to the logging infrastructure.
+ </summary>
+ <param name="value">The string to write. If <paramref name="value" /> is a null reference, only the line termination characters are written.</param>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.WriteLine(System.String,System.Object[])">
+ <summary>
+ Writes out a formatted string using the same semantics as
+ <see cref="M:string.Format(string, object[])" />.
+ </summary>
+ <param name="line">The formatting string.</param>
+ <param name="args">The object array to write into format string.</param>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.Flush">
+ <summary>
+ Causes any buffered data to be written to the logging infrastructure.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.Close">
+ <summary>
+ Closes the current writer and releases any system resources
+ associated with the writer.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.LogWriter.InitializeLifetimeService">
+ <summary>
+ Obtains a lifetime service object to control the lifetime policy for
+ this instance.
+ </summary>
+ <returns>
+ An object of type <see cref="T:System.Runtime.Remoting.Lifetime.ILease"/> used to control the lifetime
+ policy for this instance. This is the current lifetime service object
+ for this instance if one exists; otherwise, a new lifetime service
+ object initialized with a lease that will never time out.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.LogWriter.Encoding">
+ <summary>
+ Gets the <see cref="P:NAnt.Core.LogWriter.Encoding"/> in which the output is written.
+ </summary>
+ <value>
+ The <see cref="T:NAnt.Core.LogWriter"/> always writes output in UTF8
+ encoding.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.LogWriter.OutputLevel">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.Level"/> with which messages will be output to
+ the build log.
+ </summary>
+ </member>
+ <member name="T:NAnt.Core.PathScanner">
+ <summary>
+ Used to search for files on the PATH.
+ </summary>
+ <remarks>
+ <para>
+ The local directory is not searched (since this would already be covered
+ by normal use of the includes element).
+ </para>
+ <para>
+ Also, advanced pattern matching isn't supported: you need to know the
+ exact name of the file.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.System#ICloneable#Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.PathScanner"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.PathScanner"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.PathScanner"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.PathScanner"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.Add(System.String)">
+ <summary>
+ Adds a file to the list of files to be scanned for.
+ </summary>
+ <param name="fileName">The filename or search pattern to add to the list.</param>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.Scan">
+ <summary>
+ Scans all direcetories in the PATH environment variable for files.
+ </summary>
+ <returns>
+ List of matching files found in the PATH.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.Scan(System.String)">
+ <summary>
+ Scans all directories in the given environment variable for files.
+ </summary>
+ <param name="name">The environment variable of which the directories should be scanned.</param>
+ <returns>
+ List of matching files found in the directory of the given
+ environment variable.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PathScanner.Clone(System.Collections.Specialized.StringCollection)">
+ <summary>
+ Creates a shallow copy of the specified <see cref="T:System.Collections.Specialized.StringCollection"/>.
+ </summary>
+ <param name="stringCollection">The <see cref="T:System.Collections.Specialized.StringCollection"/> that should be copied.</param>
+ <returns>
+ A shallow copy of the specified <see cref="T:System.Collections.Specialized.StringCollection"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.PlatformHelper.Is64Bit">
+ <summary>
+ Returns a value indicating whether NAnt is running in 64-bit mode.
+ </summary>
+ <value>
+ <see langword="true" /> if NAnt is running in 64-bit mode; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.PlatformHelper.Is32Bit">
+ <summary>
+ Returns a value indicating whether NAnt is running in 32-bit mode.
+ </summary>
+ <remarks>
+ Note that even if the platform is 64-bit, NAnt may be running in
+ 32-bit mode.
+ </remarks>
+ <value>
+ <see langword="true" /> if NAnt is running in 32-bit mode; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.PlatformHelper.IsWindows">
+ <summary>
+ Returns a value indicating whether NAnt is running on Windows.
+ </summary>
+ <value>
+ <see langword="true" /> if NAnt is running on Windows;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Project">
+ <summary>
+ Central representation of a NAnt project.
+ </summary>
+ <example>
+ <para>
+ The <see cref="M:NAnt.Core.Project.Run"/> method will initialize the project with the build
+ file specified in the constructor and execute the default target.
+ </para>
+ <code>
+ <![CDATA[
+ Project p = new Project("foo.build", Level.Info);
+ p.Run();
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ If no target is given, the default target will be executed if specified
+ in the project.
+ </para>
+ <code>
+ <![CDATA[
+ Project p = new Project("foo.build", Level.Info);
+ p.Execute("build");
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.Core.Project.Visiting">
+ <summary>
+ Constant for the "visiting" state, used when traversing a DFS of
+ target dependencies.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Project.Visited">
+ <summary>
+ Constant for the "visited" state, used when traversing a DFS of
+ target dependencies.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Project.logger">
+ <summary>
+ Holds the logger for this class.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Project._threshold">
+ <summary>
+ Holds the default threshold for build loggers.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.Xml.XmlDocument,NAnt.Core.Level,System.Int32)">
+ <summary>
+ Initializes a new <see cref="T:NAnt.Core.Project"/> class with the given
+ document, message threshold and indentation level.
+ </summary>
+ <param name="doc">Any valid build format will do.</param>
+ <param name="threshold">The message threshold.</param>
+ <param name="indentLevel">The project indentation level.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.Xml.XmlDocument,NAnt.Core.Level,System.Int32,System.Xml.XmlNode)">
+ <summary>
+ Initializes a new <see cref="T:NAnt.Core.Project"/> class with the given
+ document, message threshold and indentation level, and using
+ the specified <see cref="T:System.Xml.XmlNode"/> to load internal configuration
+ settings.
+ </summary>
+ <param name="doc">Any valid build format will do.</param>
+ <param name="threshold">The message threshold.</param>
+ <param name="indentLevel">The project indentation level.</param>
+ <param name="configurationNode">The <see cref="T:System.Xml.XmlNode"/> NAnt should use to initialize configuration settings.</param>
+ <remarks>
+ This constructor is useful for developers using NAnt as a class
+ library.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.String,NAnt.Core.Level,System.Int32)">
+ <summary>
+ Initializes a new <see cref="T:NAnt.Core.Project"/> class with the given
+ source, message threshold and indentation level.
+ </summary>
+ <param name="uriOrFilePath">
+ <para>The full path to the build file.</para>
+ <para>This can be of any form that <see cref="M:XmlDocument.Load(string)"/> accepts.</para>
+ </param>
+ <param name="threshold">The message threshold.</param>
+ <param name="indentLevel">The project indentation level.</param>
+ <remarks>
+ If the source is a uri of form 'file:///path' then use the path part.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.String,NAnt.Core.Level,System.Int32,System.Xml.XmlNode)">
+ <summary>
+ Initializes a new <see cref="T:NAnt.Core.Project"/> class with the given
+ source, message threshold and indentation level, and using
+ the specified <see cref="T:System.Xml.XmlNode"/> to load internal configuration
+ settings.
+ </summary>
+ <param name="uriOrFilePath">
+ <para>The full path to the build file.</para>
+ <para>This can be of any form that <see cref="M:XmlDocument.Load(string)"/> accepts.</para>
+ </param>
+ <param name="threshold">The message threshold.</param>
+ <param name="indentLevel">The project indentation level.</param>
+ <param name="configurationNode">The <see cref="T:System.Xml.XmlNode"/> NAnt should use to initialize configuration settings.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="configurationNode"/> is <see langword="null"/>.</exception>
+ <remarks>
+ If the source is a uri of form 'file:///path' then use the path part.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.String,NAnt.Core.Project)">
+ <summary>
+ Initializes a <see cref="T:NAnt.Core.Project"/> as subproject of the specified
+ <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="uriOrFilePath">
+ <para>The full path to the build file.</para>
+ <para>This can be of any form that <see cref="M:XmlDocument.Load(string)"/> accepts.</para>
+ </param>
+ <param name="parent">The parent <see cref="T:NAnt.Core.Project"/>.</param>
+ <remarks>
+ Optimized for framework initialization projects, by skipping automatic
+ discovery of extension assemblies and framework configuration.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.#ctor(System.Xml.XmlDocument)">
+ <summary>
+ Initializes a <see cref="T:NAnt.Core.Project"/> with <see cref="P:NAnt.Core.Project.Threshold"/>
+ set to <see cref="F:NAnt.Core.Level.None"/>, and <see cref="P:NAnt.Core.Project.IndentationLevel"/>
+ set to 0.
+ </summary>
+ <param name="doc">An <see cref="T:System.Xml.XmlDocument"/> containing the build script.</param>
+ <remarks>
+ Optimized for framework initialization projects, by skipping automatic
+ discovery of extension assemblies and framework configuration.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.GetFrameworks(NAnt.Core.FrameworkTypes)">
+ <summary>
+ Gets the list of supported frameworks filtered by the specified
+ <see cref="T:NAnt.Core.FrameworkTypes"/> parameter.
+ </summary>
+ <param name="types">A bitwise combination of <see cref="T:NAnt.Core.FrameworkTypes"/> values that filter the frameworks to retrieve.</param>
+ <returns>
+ An array of type <see cref="T:NAnt.Core.FrameworkInfo"/> that contains the
+ frameworks specified by the <paramref name="types"/> parameter,
+ sorted on name.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Project.GetLocation(System.Xml.XmlNode)">
+ <summary>
+ Returns the <see cref="T:NAnt.Core.Location"/> of the given node in an XML
+ file loaded by NAnt.
+ </summary>
+ <remarks>
+ <para>
+ The <paramref name="node"/> must be from an <see cref="T:System.Xml.XmlDocument"/>
+ that has been loaded by NAnt.
+ </para>
+ <para>
+ NAnt also does not process any of the following node types:
+ </para>
+ <list type="bullet">
+ <item>
+ <description><see cref="F:System.Xml.XmlNodeType.Whitespace"/></description>
+ </item>
+ <item>
+ <description><see cref="F:System.Xml.XmlNodeType.EndElement"/></description>
+ </item>
+ <item>
+ <description><see cref="F:System.Xml.XmlNodeType.ProcessingInstruction"/></description>
+ </item>
+ <item>
+ <description><see cref="F:System.Xml.XmlNodeType.XmlDeclaration"/></description>
+ </item>
+ <item>
+ <description><see cref="F:System.Xml.XmlNodeType.DocumentType"/></description>
+ </item>
+ </list>
+ <para>
+ As a result, no location information is available for these nodes.
+ </para>
+ </remarks>
+ <param name="node">The <see cref="T:System.Xml.XmlNode"/> to get the <see cref="T:NAnt.Core.Location"/> for.</param>
+ <returns>
+ <see cref="T:NAnt.Core.Location"/> of the given node in an XML file loaded by NAnt, or
+ <see cref="F:NAnt.Core.Location.UnknownLocation"/> if the node was not loaded from
+ an XML file.
+ </returns>
+ <exception cref="T:System.ArgumentException">
+ <para><paramref name="node"/> is from an XML file that was not loaded by NAnt.</para>
+ <para>-or</para>
+ <para><paramref name="node"/> was not processed by NAnt (eg. an XML declaration).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Project.OnBuildStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.BuildStarted"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnBuildFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.BuildFinished"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnTargetStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.TargetStarted"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnTargetFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.TargetFinished"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnTaskStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.TaskStarted"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnTaskFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches the <see cref="E:NAnt.Core.Project.TaskFinished"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.OnMessageLogged(NAnt.Core.BuildEventArgs)">
+ <summary>
+ Dispatches a <see cref="E:NAnt.Core.Project.MessageLogged"/> event to the build listeners
+ for this <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Writes a <see cref="T:NAnt.Core.Project"/> level message to the build log with
+ the given <see cref="T:NAnt.Core.Level"/>.
+ </summary>
+ <param name="messageLevel">The <see cref="T:NAnt.Core.Level"/> to log at.</param>
+ <param name="message">The message to log.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Writes a <see cref="T:NAnt.Core.Project"/> level formatted message to the build
+ log with the given <see cref="T:NAnt.Core.Level"/>.
+ </summary>
+ <param name="messageLevel">The <see cref="T:NAnt.Core.Level"/> to log at.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.Log(NAnt.Core.Task,NAnt.Core.Level,System.String)">
+ <summary>
+ Writes a <see cref="T:NAnt.Core.Task"/> task level message to the build log
+ with the given <see cref="T:NAnt.Core.Level"/>.
+ </summary>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> from which the message originated.</param>
+ <param name="messageLevel">The <see cref="T:NAnt.Core.Level"/> to log at.</param>
+ <param name="message">The message to log.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.Log(NAnt.Core.Target,NAnt.Core.Level,System.String)">
+ <summary>
+ Writes a <see cref="T:NAnt.Core.Target"/> level message to the build log with
+ the given <see cref="T:NAnt.Core.Level"/>.
+ </summary>
+ <param name="target">The <see cref="T:NAnt.Core.Target"/> from which the message orignated.</param>
+ <param name="messageLevel">The level to log at.</param>
+ <param name="message">The message to log.</param>
+ </member>
+ <member name="M:NAnt.Core.Project.Execute">
+ <summary>
+ Executes the default target.
+ </summary>
+ <remarks>
+ No top level error handling is done. Any <see cref="T:NAnt.Core.BuildException"/>
+ will be passed onto the caller.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.Execute(System.String)">
+ <summary>
+ Executes a specific target, and its dependencies.
+ </summary>
+ <param name="targetName">The name of the target to execute.</param>
+ <remarks>
+ Global tasks are not executed.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.Execute(System.String,System.Boolean)">
+ <summary>
+ Executes a specific target.
+ </summary>
+ <param name="targetName">The name of the target to execute.</param>
+ <param name="forceDependencies">Whether dependencies should be forced to execute</param>
+ <remarks>
+ Global tasks are not executed.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.Run">
+ <summary>
+ Executes the default target and wraps in error handling and time
+ stamping.
+ </summary>
+ <returns>
+ <see langword="true" /> if the build was successful; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Project.CreateTask(System.Xml.XmlNode)">
+ <summary>
+ Creates a new <see ref="Task"/> from the given <see cref="T:System.Xml.XmlNode"/>.
+ </summary>
+ <param name="taskNode">The <see cref="T:NAnt.Core.Task"/> definition.</param>
+ <returns>The new <see cref="T:NAnt.Core.Task"/> instance.</returns>
+ </member>
+ <member name="M:NAnt.Core.Project.CreateTask(System.Xml.XmlNode,NAnt.Core.Target)">
+ <summary>
+ Creates a new <see cref="T:NAnt.Core.Task"/> from the given <see cref="T:System.Xml.XmlNode"/>
+ within a <see cref="T:NAnt.Core.Target"/>.
+ </summary>
+ <param name="taskNode">The <see cref="T:NAnt.Core.Task"/> definition.</param>
+ <param name="target">The owner <see cref="T:NAnt.Core.Target"/>.</param>
+ <returns>The new <see cref="T:NAnt.Core.Task"/> instance.</returns>
+ </member>
+ <member name="M:NAnt.Core.Project.ExpandProperties(System.String,NAnt.Core.Location)">
+ <summary>
+ Expands a <see cref="T:System.String"/> from known properties.
+ </summary>
+ <param name="input">The <see cref="T:System.String"/> with replacement tokens.</param>
+ <param name="location">The location in the build file. Used to throw more accurate exceptions.</param>
+ <returns>The expanded and replaced <see cref="T:System.String"/>.</returns>
+ </member>
+ <member name="M:NAnt.Core.Project.GetFullPath(System.String)">
+ <summary>
+ Combines the specified path with the <see cref="P:NAnt.Core.Project.BaseDirectory"/> of
+ the <see cref="T:NAnt.Core.Project"/> to form a full path to file or directory.
+ </summary>
+ <param name="path">The relative or absolute path.</param>
+ <returns>
+ A rooted path, or the <see cref="P:NAnt.Core.Project.BaseDirectory"/> of the <see cref="T:NAnt.Core.Project"/>
+ if the <paramref name="path"/> parameter is a null reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Project.CreateDefaultLogger">
+ <summary>
+ Creates the default <see cref="T:NAnt.Core.IBuildLogger"/> and attaches it to
+ the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.Indent">
+ <summary>
+ Increases the <see cref="P:NAnt.Core.Project.IndentationLevel"/> of the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.Unindent">
+ <summary>
+ Decreases the <see cref="P:NAnt.Core.Project.IndentationLevel"/> of the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.DetachBuildListeners">
+ <summary>
+ Detaches the currently attached <see cref="T:NAnt.Core.IBuildListener"/> instances
+ from the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.AttachBuildListeners(NAnt.Core.BuildListenerCollection)">
+ <summary>
+ Attaches the specified build listeners to the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="listeners">The <see cref="T:NAnt.Core.IBuildListener"/> instances to attach to the <see cref="T:NAnt.Core.Project"/>.</param>
+ <remarks>
+ The currently attached <see cref="T:NAnt.Core.IBuildListener"/> instances will
+ be detached before the new <see cref="T:NAnt.Core.IBuildListener"/> instances
+ are attached.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.Project.CtorHelper(System.Xml.XmlDocument,NAnt.Core.Level,System.Int32,NAnt.Core.Optimizations)">
+ <summary>
+ Inits stuff:
+ <para>TypeFactory: Calls Initialize and AddProject </para>
+ <para>Log.IndentSize set to 12</para>
+ <para>Project properties are initialized ("nant.* stuff set")</para>
+ <list type="nant.items">
+ <listheader>NAnt Props:</listheader>
+ <item>nant.filename</item>
+ <item>nant.version</item>
+ <item>nant.location</item>
+ <item>nant.project.name</item>
+ <item>nant.project.buildfile (if doc has baseuri)</item>
+ <item>nant.project.basedir</item>
+ <item>nant.project.default = defaultTarget</item>
+ </list>
+ </summary>
+ <param name="doc">An <see cref="T:System.Xml.XmlDocument"/> representing the project definition.</param>
+ <param name="threshold">The project message threshold.</param>
+ <param name="indentLevel">The project indentation level.</param>
+ <param name="optimization">Optimization flags.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="doc"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="M:NAnt.Core.Project.InitializeProjectDocument(System.Xml.XmlDocument)">
+ <summary>
+ This method is only meant to be used by the <see cref="T:NAnt.Core.Project"/>
+ class and <see cref="T:NAnt.Core.Tasks.IncludeTask"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.LoadBuildFile(System.String)">
+ <summary>
+ Creates a new <see cref="T:System.Xml.XmlDocument"/> based on the project
+ definition.
+ </summary>
+ <param name="uriOrFilePath">
+ <para>The full path to the build file.</para>
+ <para>This can be of any form that <see cref="M:XmlDocument.Load(string)"/> accepts.</para>
+ </param>
+ <returns>
+ An <see cref="T:System.Xml.XmlDocument"/> based on the specified project
+ definition.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Project.ConfigurePlatformProperties">
+ <summary>
+ Configures the platform properties for the current platform.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">NAnt does not support the current platform.</exception>
+ </member>
+ <member name="M:NAnt.Core.Project.UpdateTargetFrameworkProperties">
+ <summary>
+ Updates dependent properties when the <see cref="P:NAnt.Core.Project.TargetFramework"/>
+ is set.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Project.TopologicalTargetSort(System.String,NAnt.Core.TargetCollection)">
+ <summary>
+ Topologically sorts a set of targets.
+ </summary>
+ <param name="root">The name of the root target. The sort is created in such a way that the sequence of targets up to the root target is the minimum possible such sequence. Must not be <see langword="null"/>.</param>
+ <param name="targets">A collection of <see cref="T:NAnt.Core.Target"/> instances.</param>
+ <returns>
+ A collection of <see cref="T:NAnt.Core.Target"/> instances in sorted order.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">There is a cyclic dependecy among the targets, or a named target does not exist.</exception>
+ </member>
+ <member name="M:NAnt.Core.Project.TopologicalTargetSort(System.String,NAnt.Core.TargetCollection,System.Collections.Hashtable,System.Collections.Stack,NAnt.Core.TargetCollection)">
+ <summary>
+ <para>
+ Performs a single step in a recursive depth-first-search traversal
+ of the target dependency tree.
+ </para>
+ <para>
+ The current target is first set to the "visiting" state, and pushed
+ onto the "visiting" stack.
+ </para>
+ <para>
+ An exception is then thrown if any child of the current node is in
+ the visiting state, as that implies a circular dependency. The
+ exception contains details of the cycle, using elements of the
+ "visiting" stack.
+ </para>
+ <para>
+ If any child has not already been "visited", this method is called
+ recursively on it.
+ </para>
+ <para>
+ The current target is then added to the ordered list of targets.
+ Note that this is performed after the children have been visited in
+ order to get the correct order. The current target is set to the
+ "visited" state.
+ </para>
+ <para>
+ By the time this method returns, the ordered list contains the
+ sequence of targets up to and including the current target.
+ </para>
+ </summary>
+ <param name="root">The current target to inspect. Must not be <see langword="null"/>.</param>
+ <param name="targets">A collection of <see cref="T:NAnt.Core.Target"/> instances.</param>
+ <param name="state">A mapping from targets to states The states in question are "VISITING" and "VISITED". Must not be <see langword="null"/>.</param>
+ <param name="visiting">A stack of targets which are currently being visited. Must not be <see langword="null"/>.</param>
+ <param name="executeTargets">The list to add target names to. This will end up containing the complete list of depenencies in dependency order. Must not be <see langword="null"/>.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>A non-existent target is specified</para>
+ <para>-or-</para>
+ <para>A circular dependency is detected.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.Core.Project.CreateCircularException(System.String,System.Collections.Stack)">
+ <summary>
+ Builds an appropriate exception detailing a specified circular
+ dependency.
+ </summary>
+ <param name="end">The dependency to stop at. Must not be <see langword="null"/>.</param>
+ <param name="stack">A stack of dependencies. Must not be <see langword="null"/>.</param>
+ <returns>
+ A <see cref="T:NAnt.Core.BuildException"/> detailing the specified circular
+ dependency.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.Project.IndentationLevel">
+ <summary>
+ Gets or sets the indendation level of the build output.
+ </summary>
+ <value>
+ The indentation level of the build output.
+ </value>
+ <remarks>
+ To change the <see cref="P:NAnt.Core.Project.IndentationLevel"/>, the <see cref="M:NAnt.Core.Project.Indent"/>
+ and <see cref="M:NAnt.Core.Project.Unindent"/> methods should be used.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.IndentationSize">
+ <summary>
+ Gets or sets the indentation size of the build output.
+ </summary>
+ <value>
+ The indendation size of the build output.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.Threshold">
+ <summary>
+ Gets or sets the default threshold level for build loggers.
+ </summary>
+ <value>
+ The default threshold level for build loggers.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.ProjectName">
+ <summary>
+ Gets the name of the <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <value>
+ The name of the <see cref="T:NAnt.Core.Project"/> or an empty <see cref="T:System.String"/>
+ if no name is specified.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.BaseDirectory">
+ <summary>
+ Gets or sets the base directory used for relative references.
+ </summary>
+ <value>
+ The base directory used for relative references.
+ </value>
+ <exception cref="T:NAnt.Core.BuildException">The directory is not rooted.</exception>
+ <remarks>
+ <para>
+ The <see cref="P:NAnt.Core.Project.BaseDirectory"/> gets and sets the built-in property
+ named "nant.project.basedir".
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.NamespaceManager">
+ <summary>
+ Gets the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.Project.NamespaceManager"/> defines the current namespace
+ scope and provides methods for looking up namespace information.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.BuildFileUri">
+ <summary>
+ Gets the <see cref="T:System.Uri"/> form of the current project definition.
+ </summary>
+ <value>
+ The <see cref="T:System.Uri"/> form of the current project definition.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.Frameworks">
+ <summary>
+ Gets a collection of available .NET frameworks.
+ </summary>
+ <value>
+ A collection of available .NET frameworks.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.RuntimeFramework">
+ <summary>
+ Gets the framework in which NAnt is currently running.
+ </summary>
+ <value>
+ The framework in which NAnt is currently running.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.TargetFramework">
+ <summary>
+ Gets or sets the framework to use for compilation.
+ </summary>
+ <value>
+ The framework to use for compilation.
+ </value>
+ <exception cref="T:System.ArgumentNullException">The value specified is <see langword="null"/>.</exception>
+ <exception cref="T:NAnt.Core.BuildException">The specified framework is not installed, or not configured correctly.</exception>
+ <remarks>
+ We will use compiler tools and system assemblies for this framework
+ in framework-related tasks.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.PlatformName">
+ <summary>
+ Gets the name of the platform on which NAnt is currently running.
+ </summary>
+ <value>
+ The name of the platform on which NAnt is currently running.
+ </value>
+ <remarks>
+ <para>
+ Possible values are:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>win32</description>
+ </item>
+ <item>
+ <description>unix</description>
+ </item>
+ </list>
+ </remarks>
+ <exception cref="T:NAnt.Core.BuildException">NAnt does not support the current platform.</exception>
+ </member>
+ <member name="P:NAnt.Core.Project.CurrentTarget">
+ <summary>
+ Gets the current target.
+ </summary>
+ <value>
+ The current target, or <see langword="null" /> if no target is
+ executing.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.BuildFileLocalName">
+ <summary>
+ Gets the path to the build file.
+ </summary>
+ <value>
+ The path to the build file, or <see langword="null" /> if the build
+ document is not file backed.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.Document">
+ <summary>
+ Gets the active <see cref="T:NAnt.Core.Project"/> definition.
+ </summary>
+ <value>
+ The active <see cref="T:NAnt.Core.Project"/> definition.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.ConfigurationNode">
+ <summary>
+ Gets the <see cref="T:System.Xml.XmlNode"/> NAnt should use to initialize
+ configuration settings.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNode"/> NAnt should use to initialize
+ configuration settings.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.DefaultTargetName">
+ <remarks>
+ Gets the name of the target that will be executed when no other
+ build targets are specified.
+ </remarks>
+ <value>
+ The name of the target that will be executed when no other
+ build targets are specified, or <see langword="null" /> if no
+ default target is specified in the build file.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.Verbose">
+ <summary>
+ Gets a value indicating whether tasks should output more build log
+ messages.
+ </summary>
+ <value>
+ <see langword="true" /> if tasks should output more build log message;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.BuildTargets">
+ <summary>
+ The list of targets to build.
+ </summary>
+ <remarks>
+ Targets are built in the order they appear in the collection. If
+ the collection is empty the default target will be built.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.Properties">
+ <summary>
+ Gets the properties defined in this project.
+ </summary>
+ <value>The properties defined in this project.</value>
+ <remarks>
+ <para>
+ This is the collection of properties that are defined by the system
+ and property task statements.
+ </para>
+ <para>
+ These properties can be used in expansion.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.FrameworkNeutralProperties">
+ <summary>
+ Gets the framework-neutral properties defined in the NAnt
+ configuration file.
+ </summary>
+ <value>
+ The framework-neutral properties defined in the NAnt configuration
+ file.
+ </value>
+ <remarks>
+ <para>
+ This is the collection of read-only properties that are defined in
+ the NAnt configuration file.
+ </para>
+ <para>
+ These properties can only be used for expansion in framework-specific
+ and framework-neutral configuration settings. These properties are
+ not available for expansion in the build file.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.DataTypeReferences">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.DataTypeBase"/> instances defined in this project.
+ </summary>
+ <value>
+ The <see cref="T:NAnt.Core.DataTypeBase"/> instances defined in this project.
+ </value>
+ <remarks>
+ <para>
+ This is the collection of <see cref="T:NAnt.Core.DataTypeBase"/> instances that
+ are defined by <see cref="T:NAnt.Core.DataTypeBase"/> (eg fileset) declarations.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Project.Targets">
+ <summary>
+ Gets the targets defined in this project.
+ </summary>
+ <value>
+ The targets defined in this project.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Project.BuildListeners">
+ <summary>
+ Gets the build listeners for this project.
+ </summary>
+ <value>
+ The build listeners for this project.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.Optimizations">
+ <summary>
+ Allow the project construction to be optimized.
+ </summary>
+ <remarks>
+ Use this with care!
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.Optimizations.None">
+ <summary>
+ Do not perform any optimizations.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Optimizations.SkipAutomaticDiscovery">
+ <summary>
+ The project base directory must not be automatically scanned
+ for extension assemblies.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.Optimizations.SkipFrameworkConfiguration">
+ <summary>
+ Do not scan the project configuration for frameworks, and
+ do not configure the runtime and target framework.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.ProjectSettingsLoader.ScannedTasks">
+ <summary>
+ Holds a value indicating whether a scan for tasks, types and functions
+ has already been performed for the current runtime framework.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ProjectSettingsLoader.#ctor(NAnt.Core.Project)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ProjectSettingsLoader"/>
+ class for the given <see cref="P:NAnt.Core.ProjectSettingsLoader.Project"/>.
+ </summary>
+ <param name="project">The <see cref="P:NAnt.Core.ProjectSettingsLoader.Project"/> that should be configured.</param>
+ </member>
+ <member name="M:NAnt.Core.ProjectSettingsLoader.ProcessSettings">
+ <summary>
+ Loads and processes settings from the specified <see cref="T:System.Xml.XmlNode"/>
+ of the configuration file.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ProjectSettingsLoader.ProcessFrameworks(System.Xml.XmlNode)">
+ <summary>
+ Processes the framework nodes of the given platform node.
+ </summary>
+ <param name="platformNode">An <see cref="T:System.Xml.XmlNode"/> representing the platform on which NAnt is running.</param>
+ </member>
+ <member name="M:NAnt.Core.ProjectSettingsLoader.ProcessGlobalProperties(System.Xml.XmlNodeList)">
+ <summary>
+ Reads the list of global properties specified in the NAnt configuration
+ file.
+ </summary>
+ <param name="propertyNodes">An <see cref="T:System.Xml.XmlNodeList"/> representing global properties.</param>
+ </member>
+ <member name="M:NAnt.Core.ProjectSettingsLoader.GetXmlAttributeValue(System.Xml.XmlNode,System.String)">
+ <summary>
+ Gets the value of the specified attribute from the specified node.
+ </summary>
+ <param name="xmlNode">The node of which the attribute value should be retrieved.</param>
+ <param name="attributeName">The attribute of which the value should be returned.</param>
+ <returns>
+ The value of the attribute with the specified name or <see langword="null" />
+ if the attribute does not exist or has no value.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.ProjectSettingsLoader.Project">
+ <summary>
+ Gets the underlying <see cref="P:NAnt.Core.ProjectSettingsLoader.Project"/> instance.
+ </summary>
+ <value>
+ The underlying <see cref="P:NAnt.Core.ProjectSettingsLoader.Project"/> instance.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.ProjectSettingsLoader.NamespaceManager">
+ <summary>
+ Gets the <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </summary>
+ <value>
+ The <see cref="T:System.Xml.XmlNamespaceManager"/>.
+ </value>
+ <remarks>
+ The <see cref="P:NAnt.Core.ProjectSettingsLoader.NamespaceManager"/> defines the current namespace
+ scope and provides methods for looking up namespace information.
+ </remarks>
+ </member>
+ <member name="F:NAnt.Core.PropertyDictionary.Visiting">
+ <summary>
+ Constant for the "visiting" state, used when traversing a DFS of
+ property references.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.PropertyDictionary.Visited">
+ <summary>
+ Constant for the "visited" state, used when travesing a DFS of
+ property references.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.#ctor(NAnt.Core.Project)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.PropertyDictionary"/>
+ class holding properties for the given <see cref="P:NAnt.Core.PropertyDictionary.Project"/>
+ instance.
+ </summary>
+ <param name="project">The project for which the dictionary will hold properties.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.OnInsert(System.Object,System.Object)">
+ <summary>
+ Performs additional custom processes before inserting a new element
+ into the <see cref="T:System.Collections.DictionaryBase"/> instance.
+ </summary>
+ <param name="key">The key of the element to insert.</param>
+ <param name="value">The value of the element to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.OnRemove(System.Object,System.Object)">
+ <summary>
+ Performs additional custom processes before removing an element
+ from the <see cref="T:System.Collections.DictionaryBase"/> instance.
+ </summary>
+ <param name="key">The key of the element to remove.</param>
+ <param name="value">The value of the element to remove.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.OnValidate(System.Object,System.Object)">
+ <summary>
+ Performs additional custom processes when validating the element
+ with the specified key and value.
+ </summary>
+ <param name="key">The key of the element to validate.</param>
+ <param name="value">The value of the element to validate.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.AddReadOnly(System.String,System.String)">
+ <summary>
+ Adds a property that cannot be changed.
+ </summary>
+ <param name="name">The name of the property.</param>
+ <param name="value">The value to assign to the property.</param>
+ <remarks>
+ Properties added with this method can never be changed. Note that
+ they are removed if the <see cref="M:System.Collections.DictionaryBase.Clear"/> method is called.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.MarkDynamic(System.String)">
+ <summary>
+ Marks a property as a property of which the value is expanded at
+ execution time.
+ </summary>
+ <param name="name">The name of the property to mark as dynamic.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.Add(System.String,System.String)">
+ <summary>
+ Adds a property to the collection.
+ </summary>
+ <param name="name">The name of the property.</param>
+ <param name="value">The value to assign to the property.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.IsReadOnlyProperty(System.String)">
+ <summary>
+ Determines whether the specified property is listed as read-only.
+ </summary>
+ <param name="name">The name of the property to check.</param>
+ <returns>
+ <see langword="true" /> if the property is listed as read-only;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.IsDynamicProperty(System.String)">
+ <summary>
+ Determines whether the specified property is listed as dynamic.
+ </summary>
+ <param name="name">The name of the property to check.</param>
+ <returns>
+ <see langword="true" /> if the property is listed as dynamic;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.Inherit(NAnt.Core.PropertyDictionary,System.Collections.Specialized.StringCollection)">
+ <summary>
+ Inherits properties from an existing property dictionary Instance.
+ </summary>
+ <param name="source">Property list to inherit.</param>
+ <param name="excludes">The list of properties to exclude during inheritance.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.ExpandProperties(System.String,NAnt.Core.Location)">
+ <summary>
+ Expands a <see cref="T:System.String"/> from known properties.
+ </summary>
+ <param name="input">The replacement tokens.</param>
+ <param name="location">The <see cref="T:NAnt.Core.Location"/> to pass through for any exceptions.</param>
+ <returns>The expanded and replaced string.</returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.Contains(System.String)">
+ <summary>
+ Determines whether a property already exists.
+ </summary>
+ <param name="name">The name of the property to check.</param>
+ <returns>
+ <see langword="true" /> if the specified property already exists;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.Remove(System.String)">
+ <summary>
+ Removes the property with the specified name.
+ </summary>
+ <param name="name">The name of the property to remove.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.ExpandProperties(System.String,NAnt.Core.Location,System.Collections.Hashtable,System.Collections.Stack)">
+ <summary>
+ Expands a <see cref="T:System.String"/> from known properties.
+ </summary>
+ <param name="input">The replacement tokens.</param>
+ <param name="location">The <see cref="T:NAnt.Core.Location"/> to pass through for any exceptions.</param>
+ <param name="state">A mapping from properties to states. The states in question are "VISITING" and "VISITED". Must not be <see langword="null"/>.</param>
+ <param name="visiting">A stack of properties which are currently being visited. Must not be <see langword="null"/>.</param>
+ <returns>The expanded and replaced string.</returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.EvaluateEmbeddedExpressions(System.String,NAnt.Core.Location,System.Collections.Hashtable,System.Collections.Stack)">
+ <summary>
+ Evaluates the given expression string and returns the result
+ </summary>
+ <param name="input"></param>
+ <param name="location"></param>
+ <param name="state"></param>
+ <param name="visiting"></param>
+ <returns></returns>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.CheckDeprecation(System.String)">
+ <summary>
+ Checks whether the specified property is deprecated.
+ </summary>
+ <param name="name">The property to check.</param>
+ </member>
+ <member name="M:NAnt.Core.PropertyDictionary.CreateCircularException(System.String,System.Collections.Stack)">
+ <summary>
+ Builds an appropriate exception detailing a specified circular
+ reference.
+ </summary>
+ <param name="end">The property reference to stop at. Must not be <see langword="null"/>.</param>
+ <param name="stack">A stack of property references. Must not be <see langword="null"/>.</param>
+ <returns>
+ A <see cref="T:NAnt.Core.BuildException"/> detailing the specified circular
+ dependency.
+ </returns>
+ </member>
+ <member name="F:NAnt.Core.PropertyDictionary._readOnlyProperties">
+ <summary>
+ Maintains a list of the property names that are readonly.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.PropertyDictionary._dynamicProperties">
+ <summary>
+ Maintains a list of the property names of which the value is expanded
+ on usage, not at initalization.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.PropertyDictionary._project">
+ <summary>
+ The project for which the dictionary holds properties.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.PropertyDictionary.Item(System.String)">
+ <summary>
+ Indexer property.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.PropertyDictionary.Project">
+ <summary>
+ Gets the project for which the dictionary holds properties.
+ </summary>
+ <value>
+ The project for which the dictionary holds properties.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.Target.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.Target"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.Target.System#ICloneable#Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.Target"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.Target"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Target.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.Core.Target"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.Core.Target"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.Target.Execute">
+ <summary>
+ Executes dependent targets first, then the target.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.Executed">
+ <summary>
+ This indicates whether the target has already executed.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.Name">
+ <summary>
+ The name of the target.
+ </summary>
+ <remarks>
+ <para>
+ Hides <see cref="P:NAnt.Core.Element.Name"/> to have <see cref="T:NAnt.Core.Target"/>
+ return the name of target, not the name of XML element - which
+ would always be <c>target</c>.
+ </para>
+ <para>
+ Note: Properties are not allowed in the name.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.Target.IfCondition">
+ <summary>
+ If <see langword="true" /> then the target will be executed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.IfDefined">
+ <summary>
+ Gets a value indicating whether the target should be executed.
+ </summary>
+ <value>
+ <see langword="true" /> if the target should be executed; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Target.UnlessCondition">
+ <summary>
+ Opposite of <see cref="P:NAnt.Core.Target.IfDefined"/>. If <see langword="false"/>
+ then the target will be executed; otherwise, skipped. The default
+ is <see langword="false"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.UnlessDefined">
+ <summary>
+ Gets a value indicating whether the target should NOT be executed.
+ </summary>
+ <value>
+ <see langword="true" /> if the target should NOT be executed;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.Target.Description">
+ <summary>
+ The description of the target.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.DependsListString">
+ <summary>
+ Space separated list of targets that this target depends on.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.Target.Dependencies">
+ <summary>
+ A collection of target names that must be executed before this
+ target.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TargetCollection.Find(System.String)">
+ <summary>
+ Finds a target by name.
+ </summary>
+ <param name="targetName">The name of the target to find.</param>
+ <returns>
+ The <see cref="T:NAnt.Core.Target"/> with the specified name, or
+ <see langword="null"/> if no <see cref="T:NAnt.Core.Target"/> exists with
+ the given name.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TargetCollection.ToString(System.String)">
+ <summary>
+ Gets the names of the targets in the <see cref="T:NAnt.Core.TargetCollection"/>
+ combined into one list separated by the given <see cref="T:System.String"/>.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> that contains a list of the names of the
+ targets in the <see cref="T:NAnt.Core.TargetCollection"/>, separated by
+ the specified <paramref name="separator"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TargetCollection.ToString">
+ <summary>
+ Gets the names of the targets in the <see cref="T:NAnt.Core.TargetCollection"/>
+ combined into one comma-separated list.
+ </summary>
+ <returns>
+ A <see cref="T:System.String"/> that contains a comma-separated list of the
+ names of the targets in the <see cref="T:NAnt.Core.TargetCollection"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilder.#ctor(System.Reflection.Assembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.TaskBuilder"/> class
+ for the specified <see cref="T:NAnt.Core.Task"/> class in the specified
+ <see cref="T:System.Reflection.Assembly"/>.
+ </summary>
+ <remarks>
+ An <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> for the specified <see cref="T:System.Reflection.Assembly"/>
+ is cached for future use.
+ </remarks>
+ <param name="assembly">The <see cref="T:System.Reflection.Assembly"/> containing the <see cref="T:NAnt.Core.Task"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.Task"/>.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilder.#ctor(NAnt.Core.Extensibility.ExtensionAssembly,System.String)">
+ <summary>
+ Creates a new instance of the <see cref="T:NAnt.Core.TaskBuilder"/> class
+ for the specified <see cref="T:NAnt.Core.Task"/> class in the specified
+ <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/>.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:NAnt.Core.Task"/>.</param>
+ <param name="className">The class representing the <see cref="T:NAnt.Core.Task"/>.</param>
+ </member>
+ <member name="P:NAnt.Core.TaskBuilder.ClassName">
+ <summary>
+ Gets the name of the <see cref="T:NAnt.Core.Task"/> class that can be created
+ using this <see cref="T:NAnt.Core.TaskBuilder"/>.
+ </summary>
+ <value>
+ The name of the <see cref="T:NAnt.Core.Task"/> class that can be created using
+ this <see cref="T:NAnt.Core.TaskBuilder"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.TaskBuilder.TaskName">
+ <summary>
+ Gets the name of the task which the <see cref="T:NAnt.Core.TaskBuilder"/>
+ can create.
+ </summary>
+ <value>
+ The name of the task which the <see cref="T:NAnt.Core.TaskBuilder"/> can
+ create.
+ </value>
+ </member>
+ <member name="T:NAnt.Core.TaskBuilderCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.Core.TaskBuilder"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.TaskBuilderCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.#ctor(NAnt.Core.TaskBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.TaskBuilderCollection"/> class
+ with the specified <see cref="T:NAnt.Core.TaskBuilderCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.#ctor(NAnt.Core.TaskBuilder[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.TaskBuilderCollection"/> class
+ with the specified array of <see cref="T:NAnt.Core.TaskBuilder"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.Add(NAnt.Core.TaskBuilder)">
+ <summary>
+ Adds a <see cref="T:NAnt.Core.TaskBuilder"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.TaskBuilder"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.AddRange(NAnt.Core.TaskBuilder[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.TaskBuilder"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.Core.TaskBuilder"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.AddRange(NAnt.Core.TaskBuilderCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.Core.TaskBuilderCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.Core.TaskBuilderCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.Contains(NAnt.Core.TaskBuilder)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.TaskBuilder"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.TaskBuilder"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.Core.TaskBuilder"/> for the specified
+ task is in the collection.
+ </summary>
+ <param name="taskName">The name of task for which the <see cref="T:NAnt.Core.TaskBuilder"/> should be located in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.Core.TaskBuilder"/> for the
+ specified task is found in the collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.CopyTo(NAnt.Core.TaskBuilder[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.IndexOf(NAnt.Core.TaskBuilder)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.Core.TaskBuilder"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.TaskBuilder"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.Core.TaskBuilder"/>. If the <see cref="T:NAnt.Core.TaskBuilder"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.Insert(System.Int32,NAnt.Core.TaskBuilder)">
+ <summary>
+ Inserts a <see cref="T:NAnt.Core.TaskBuilder"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.Core.TaskBuilder"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.Core.TaskBuilderEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderCollection.Remove(NAnt.Core.TaskBuilder)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.Core.TaskBuilder"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.Core.TaskBuilderCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.Core.TaskBuilderCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.Core.TaskBuilder"/> for the specified task.
+ </summary>
+ <param name="taskName">The name of task for which the <see cref="T:NAnt.Core.TaskBuilder"/> should be located in the collection.</param>
+ </member>
+ <member name="T:NAnt.Core.TaskBuilderEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.Core.TaskBuilder"/> elements of a <see cref="T:NAnt.Core.TaskBuilderCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderEnumerator.#ctor(NAnt.Core.TaskBuilderCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.TaskBuilderEnumerator"/> class
+ with the specified <see cref="T:NAnt.Core.TaskBuilderCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TaskBuilderEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.TaskBuilderEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.Core.TypeFactory">
+ <summary>
+ Comprises all of the loaded, and available, tasks.
+ Use these static methods to register, initialize and create a task.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanAssembly(System.String,NAnt.Core.Task)">
+ <summary>
+ Scans the given assembly for tasks, types, functions and filters.
+ </summary>
+ <param name="assemblyFile">The assembly to scan for tasks, types, functions and filters.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanAssembly(System.Reflection.Assembly,NAnt.Core.Task)">
+ <summary>
+ Scans the given assembly for tasks, types, functions and filters.
+ </summary>
+ <param name="assembly">The assembly to scan for tasks, types, functions and filters.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="assembly"/> contains at
+ least one "extension"; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanDir(System.String,NAnt.Core.Task,System.Boolean)">
+ <summary>
+ Scans the path for any task assemblies and adds them.
+ </summary>
+ <param name="path">The directory to scan in.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <param name="failOnError"><see cref="T:System.Boolean"/> indicating whether scanning of the directory should halt on first error.</param>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.AddProject(NAnt.Core.Project)">
+ <summary>
+ Adds any task assemblies in the project base directory
+ and its <c>tasks</c> subdirectory.
+ </summary>
+ <param name="project">The project to work from.</param>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.AddProject(NAnt.Core.Project,System.Boolean)">
+ <summary>
+ Registers the project with <see cref="T:NAnt.Core.TypeFactory"/>, and optionally
+ scan the <see cref="P:NAnt.Core.Project.BaseDirectory"/> for extension assemblies.
+ </summary>
+ <param name="project">The project to work from.</param>
+ <param name="scan">Specified whether to scan the <see cref="P:NAnt.Core.Project.BaseDirectory"/> for extension assemblies.</param>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.LookupFunction(System.String,NAnt.Core.Extensibility.FunctionArgument[],NAnt.Core.Project)">
+ <summary>
+ Looks up a function by name and argument count.
+ </summary>
+ <param name="functionName">The name of the function to lookup, including namespace prefix.</param>
+ <param name="args">The argument of the function to lookup.</param>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> in which the function is invoked.</param>
+ <returns>
+ A <see cref="T:System.Reflection.MethodInfo"/> representing the function, or
+ <see langword="null"/> if a function with the given name and
+ arguments does not exist.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.CreateTask(System.Xml.XmlNode,NAnt.Core.Project)">
+ <summary>
+ Creates a new <see cref="T:NAnt.Core.Task"/> instance for the given XML and
+ <see cref="T:NAnt.Core.Project"/>.
+ </summary>
+ <param name="taskNode">The XML to initialize the task with.</param>
+ <param name="proj">The <see cref="T:NAnt.Core.Project"/> that the <see cref="T:NAnt.Core.Task"/> belongs to.</param>
+ <returns>
+ The new <see cref="T:NAnt.Core.Task"/> instance.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanTypeForTasks(NAnt.Core.Extensibility.ExtensionAssembly,System.Type,NAnt.Core.Task)">
+ <summary>
+ Scans a given <see cref="T:System.Type"/> for tasks.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:System.Type"/> to scan.</param>
+ <param name="type">The <see cref="T:System.Type"/> to scan.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="type"/> represents a
+ <see cref="T:NAnt.Core.Task"/>; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanTypeForDataTypes(NAnt.Core.Extensibility.ExtensionAssembly,System.Type,NAnt.Core.Task)">
+ <summary>
+ Scans a given <see cref="T:System.Type"/> for data type.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:System.Type"/> to scan.</param>
+ <param name="type">The <see cref="T:System.Type"/> to scan.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="type"/> represents a
+ data type; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanTypeForFunctions(System.Type,NAnt.Core.Task)">
+ <summary>
+ Scans a given <see cref="T:System.Type"/> for functions.
+ </summary>
+ <param name="type">The <see cref="T:System.Type"/> to scan.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="type"/> represents a
+ valid set of funtions; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.Core.TypeFactory.ScanTypeForFilters(NAnt.Core.Extensibility.ExtensionAssembly,System.Type,NAnt.Core.Task)">
+ <summary>
+ Scans a given <see cref="T:System.Type"/> for filters.
+ </summary>
+ <param name="extensionAssembly">The <see cref="T:NAnt.Core.Extensibility.ExtensionAssembly"/> containing the <see cref="T:System.Type"/> to scan.</param>
+ <param name="type">The <see cref="T:System.Type"/> to scan.</param>
+ <param name="task">The <see cref="T:NAnt.Core.Task"/> which will be used to output messages to the build log.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="type"/> represents a
+ <see cref="T:NAnt.Core.Filters.Filter"/>; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.Core.TypeFactory.TaskBuilders">
+ <summary>
+ Gets the list of loaded <see cref="T:NAnt.Core.TaskBuilder"/> instances.
+ </summary>
+ <value>
+ List of loaded <see cref="T:NAnt.Core.TaskBuilder"/> instances.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.TypeFactory.DataTypeBuilders">
+ <summary>
+ Gets the list of loaded <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> instances.
+ </summary>
+ <value>
+ List of loaded <see cref="T:NAnt.Core.DataTypeBaseBuilder"/> instances.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.TypeFactory.FilterBuilders">
+ <summary>
+ Gets the list of loaded <see cref="T:NAnt.Core.Filters.FilterBuilder"/> instances.
+ </summary>
+ <value>
+ List of loaded <see cref="T:NAnt.Core.Filters.FilterBuilder"/> instances.
+ </value>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class with a descriptive message.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor(System.String,System.Exception)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class with the specified descriptive message and inner exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="innerException">A nested exception that is the cause of the current exception.</param>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor(System.String,NAnt.Core.Location)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class with a descriptive message and the location in the build file
+ that caused the exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="location">The location in the build file where the exception occured.</param>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor(System.String,NAnt.Core.Location,System.Exception)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class with a descriptive message, the location in the build file and
+ an instance of the exception that is the cause of the current
+ exception.
+ </summary>
+ <param name="message">A descriptive message to include with the exception.</param>
+ <param name="location">The location in the build file where the exception occured.</param>
+ <param name="innerException">A nested exception that is the cause of the current exception.</param>
+ </member>
+ <member name="M:NAnt.Core.ValidationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.ValidationException"/>
+ class with serialized data.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
+ <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="T:NAnt.Core.XmlLogger">
+ <summary>
+ Used to wrap log messages in xml <message/> elements.
+ </summary>
+ </member>
+ <member name="F:NAnt.Core.XmlLogger._projectStack">
+ <summary>
+ Holds the stack of currently executing projects.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.XmlLogger"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Core.XmlLogger"/> class
+ with serialized data.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
+ <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Populates <paramref name="info"/> with the data needed to serialize
+ the <see cref="T:NAnt.Core.XmlLogger"/> instance.
+ </summary>
+ <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
+ <param name="context">The destination for this serialization.</param>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.ToString">
+ <summary>
+ Returns the contents of log captured.
+ </summary>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.BuildStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a build has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event is fired before any targets have started.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.BuildFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that the last target has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.TargetStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a target has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.TargetFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a target has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.TaskStarted(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has started.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.TaskFinished(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a task has finished.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ This event will still be fired if an error occurred during the build.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.MessageLogged(System.Object,NAnt.Core.BuildEventArgs)">
+ <summary>
+ Signals that a message has been logged.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NAnt.Core.BuildEventArgs"/> object that contains the event data.</param>
+ <remarks>
+ Only messages with a priority higher or equal to the threshold of
+ the logger will actually be output in the build log.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Core.XmlLogger.Flush">
+ <summary>
+ Flushes buffered build events or messages to the underlying storage.
+ </summary>
+ </member>
+ <member name="P:NAnt.Core.XmlLogger.Threshold">
+ <summary>
+ Gets or sets the highest level of message this logger should respond
+ to.
+ </summary>
+ <value>
+ The highest level of message this logger should respond to.
+ </value>
+ <remarks>
+ Only messages with a message level higher than or equal to the given
+ level should be written to the log.
+ </remarks>
+ </member>
+ <member name="P:NAnt.Core.XmlLogger.EmacsMode">
+ <summary>
+ Gets or sets a value indicating whether to produce emacs (and other
+ editor) friendly output.
+ </summary>
+ <value>
+ <see langword="false" /> as it has no meaning in XML format.
+ </value>
+ </member>
+ <member name="P:NAnt.Core.XmlLogger.OutputWriter">
+ <summary>
+ Gets or sets the <see cref="T:System.IO.TextWriter"/> to which the logger is
+ to send its output.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.DotNetTasks.xml b/external/guiunit/tools/nant/bin/NAnt.DotNetTasks.xml
new file mode 100755
index 0000000..39ca76f
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.DotNetTasks.xml
@@ -0,0 +1,5373 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.DotNetTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.DotNet.Tasks.AssemblyInfoTask">
+ <summary>
+ Generates an AssemblyInfo file using the attributes given.
+ </summary>
+ <example>
+ <para>
+ Create a C# AssemblyInfo file containing the specified assembly-level
+ attributes.
+ </para>
+ <code>
+ <![CDATA[
+ <asminfo output="AssemblyInfo.cs" language="CSharp">
+ <imports>
+ <import namespace="System" />
+ <import namespace="System.Reflection" />
+ <import namespace="System.EnterpriseServices" />
+ <import namespace="System.Runtime.InteropServices" />
+ </imports>
+ <attributes>
+ <attribute type="ComVisibleAttribute" value="false" />
+ <attribute type="CLSCompliantAttribute" value="true" />
+ <attribute type="AssemblyVersionAttribute" value="1.0.0.0" />
+ <attribute type="AssemblyTitleAttribute" value="My fun assembly" />
+ <attribute type="AssemblyDescriptionAttribute" value="More fun than a barrel of monkeys" />
+ <attribute type="AssemblyCopyrightAttribute" value="Copyright (c) 2002, Monkeyboy, Inc." />
+ <attribute type="ApplicationNameAttribute" value="FunAssembly" />
+ </attributes>
+ <references>
+ <include name="System.EnterpriseServices.dll" />
+ </references>
+ </asminfo>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Create a C# AssemblyInfo file containing an attribute with multiple
+ named properties by setting the <see cref="P:NAnt.DotNet.Types.AssemblyAttribute.AsIs"/>
+ attribute on the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> element to
+ <see langword="true"/>.
+ </para>
+ <code>
+ <![CDATA[
+ <asminfo output="AssemblyInfo.cs" language="CSharp">
+ <imports>
+ <import namespace="log4net.Config" />
+ </imports>
+ <attributes>
+ <attribute type="DOMConfiguratorAttribute" value="ConfigFile="config.log4net",Watch=true" asis="true" />
+ </attributes>
+ <references>
+ <include name="log4net.dll" />
+ </references>
+ </asminfo>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.ExecuteTask">
+ <summary>
+ Generates an AssemblyInfo file.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.NeedsPersisting(System.IO.Stream)">
+ <summary>
+ Determines whether the specified AssemblyInfo file in the given
+ <see cref="T:System.IO.Stream"/> needs to be persisted.
+ </summary>
+ <param name="generatedAsmInfoStream"><see cref="T:System.IO.Stream"/> holding the newly generated AssemblyInfo source.</param>
+ <returns>
+ <see langword="true"/> if the generated AssemblyInfo source needs
+ to be persisted; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.Output">
+ <summary>
+ Name of the AssemblyInfo file to generate.
+ </summary>
+ <value>
+ The name of the AssemblyInfo file to generate.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.Language">
+ <summary>
+ The code language in which the AssemblyInfo file should be
+ generated.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.AssemblyAttributes">
+ <summary>
+ The assembly-level attributes to generate.
+ </summary>
+ <value>
+ The assembly-level attributes to generate.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.Imports">
+ <summary>
+ The namespaces to import.
+ </summary>
+ <value>
+ The namespaces to import.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.References">
+ <summary>
+ Assembly files used to locate the types of the specified attributes.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage">
+ <summary>
+ Defines the supported code languages for generating an AssemblyInfo
+ file.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage.CSharp">
+ <summary>
+ A value for generating C# code.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage.JScript">
+ <summary>
+ A value for generating JScript code.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage.VB">
+ <summary>
+ A value for generating Visual Basic code.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider">
+ <summary>
+ Encapsulates functionality to generate a code file with imports
+ and assembly-level attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider.#ctor(NAnt.DotNet.Tasks.AssemblyInfoTask,NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider"/>
+ for the specified <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage"/>.
+ </summary>
+ <param name="assemblyInfoTask">The <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask"/> for which an instance of the <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider"/> class should be initialized.</param>
+ <param name="codeLanguage">The <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage"/> for which an instance of the <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider"/> class should be initialized.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider.GenerateImportCode(System.Collections.Specialized.StringCollection,System.IO.TextWriter)">
+ <summary>
+ Generates code for the specified imports.
+ </summary>
+ <param name="imports">The imports for which code should be generated.</param>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the generated code will be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider.GenerateAssemblyAttributesCode(NAnt.DotNet.Types.AssemblyAttributeCollection,System.Collections.Specialized.StringCollection,System.Collections.Specialized.StringCollection,System.IO.TextWriter)">
+ <summary>
+ Generates code for the specified assembly attributes.
+ </summary>
+ <param name="assemblyAttributes">The assembly attributes for which code should be generated.</param>
+ <param name="imports">Imports used to resolve the assembly attribute names to fully qualified type names.</param>
+ <param name="assemblies">Assembly that will be used to resolve the attribute names to <see cref="T:System.Type"/> instances.</param>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the generated code will be written.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider.Language">
+ <summary>
+ Gets the <see cref="T:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeLanguage"/> in which the AssemblyInfo
+ code will be generated.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyInfoTask.CodeProvider.Generator">
+ <summary>
+ Gets the <see cref="T:System.CodeDom.Compiler.ICodeGenerator"/> that will be used to
+ generate the AssemblyInfo code.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.AssemblyInfoTask.TypedValueGatherer">
+ <summary>
+ Responsible for returning the specified value converted to a
+ <see cref="T:System.Type"/> accepted by a constructor for a given
+ <see cref="T:System.Type"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.TypedValueGatherer.InitializeLifetimeService">
+ <summary>
+ Obtains a lifetime service object to control the lifetime policy for
+ this instance.
+ </summary>
+ <returns>
+ An object of type <see cref="T:System.Runtime.Remoting.Lifetime.ILease"/> used to control the lifetime
+ policy for this instance. This is the current lifetime service object
+ for this instance if one exists; otherwise, a new lifetime service
+ object initialized with a lease that will never time out.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.TypedValueGatherer.GetTypedValue(System.Collections.Specialized.StringCollection,System.Collections.Specialized.StringCollection,System.String,System.String)">
+ <summary>
+ Retrieves the specified <see cref="T:System.Type"/> corresponding with the specified
+ type name from a list of assemblies.
+ </summary>
+ <param name="assemblies">The collection of assemblies that the type should tried to be instantiated from.</param>
+ <param name="imports">The list of imports that can be used to resolve the typename to a full typename.</param>
+ <param name="typename">The typename that should be used to determine the type to which the specified value should be converted.</param>
+ <param name="value">The <see cref="T:System.String"/> value that should be converted to a typed value.</param>
+ <returns></returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para><paramref name="value"/> is <see langword="null"/> and the <see cref="T:System.Type"/> identified by <paramref name="typename"/> has no default public constructor.</para>
+ <para>-or-</para>
+ <para><paramref name="value"/> cannot be converted to a value that's suitable for one of the constructors of the <see cref="T:System.Type"/> identified by <paramref name="typename"/>.</para>
+ <para>-or-</para>
+ <para>The <see cref="T:System.Type"/> identified by <paramref name="typename"/> has no suitable constructor.</para>
+ <para>-or-</para>
+ <para>A <see cref="T:System.Type"/> identified by <paramref name="typename"/> could not be located or loaded.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyInfoTask.TypedValueGatherer.FindType(System.Collections.Specialized.StringCollection,System.Collections.Specialized.StringCollection,System.String)">
+ <summary>
+ Finds a given type from a given list of assemblies and import statements.
+ </summary>
+ <param name='assemblies'>
+ A list of assemblies to search for a given type.
+ </param>
+ <param name='imports'>
+ A list of import statements to search for a given type.
+ </param>
+ <param name='typename'>
+ The name of the type to locate.
+ </param>
+ <returns>
+ The type object found from assemblies and import statements based
+ on the name of the type.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.AssemblyLinkerTask">
+ <summary>
+ Wraps <c>al.exe</c>, the assembly linker for the .NET Framework.
+ </summary>
+ <remarks>
+ <para>
+ All specified sources will be embedded using the <c>/embed</c> flag.
+ Other source types are not supported.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Create a library containing all icon files in the current directory.
+ </para>
+ <code>
+ <![CDATA[
+ <al output="MyIcons.dll" target="lib">
+ <sources>
+ <include name="*.ico" />
+ </sources>
+ </al>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Create an executable assembly manifest from modules.
+ </para>
+ <code>
+ <![CDATA[
+ <al output="Client.exe" target="exe" main="Program.Main">
+ <modules>
+ <include name="Client.netmodule" />
+ <include name="Common.netmodule" />
+ </modules>
+ </al>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyLinkerTask.ExecuteTask">
+ <summary>
+ Generates an assembly manifest.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.AssemblyLinkerTask.NeedsCompiling">
+ <summary>
+ Determines whether the assembly manifest needs compiling or is
+ uptodate.
+ </summary>
+ <returns>
+ <see langword="true" /> if the assembly manifest needs compiling;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.AlgorithmID">
+ <summary>
+ Specifies an algorithm (in hexadecimal) to hash all files in a
+ multifile assembly except the file that contains the assembly
+ manifest. The default algorithm is CALG_SHA1.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Company">
+ <summary>
+ Specifies a string for the <b>Company</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Company</b> field in the assembly.
+ </value>
+ <remarks>
+ If <see cref="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Company"/> is an empty string (""), the Win32
+ <b>Company</b> resource appears as a single space.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Configuration">
+ <summary>
+ Specifies a string for the <b>Configuration</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Configuration</b> field in the assembly.
+ </value>
+ <remarks>
+ If <see cref="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Configuration"/> is an empty string (""), the Win32
+ <b>Configuration</b> resource appears as a single space.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Copyright">
+ <summary>
+ Specifies a string for the <b>Copyright</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Copyright</b> field in the assembly.
+ </value>
+ <remarks>
+ If <see cref="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Copyright"/> is an empty string (""), the Win32
+ <b>Copyright</b> resource appears as a single space.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Culture">
+ <summary>
+ The culture string associated with the output assembly.
+ The string must be in RFC 1766 format, such as "en-US".
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/c[ulture]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.DelaySign">
+ <summary>
+ Specifies whether the assembly should be partially signed. The default
+ is <see langword="NAnt.DotNet.Types.DelaySign.NotSet" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Description">
+ <summary>
+ Specifies a string for the <b>Description</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Description</b> field in the assembly.
+ </value>
+ <remarks>
+ If <see cref="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Description"/> is an empty string (""), the Win32
+ <b>Description</b> resource appears as a single space.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.EvidenceFile">
+ <summary>
+ Security evidence file to embed.
+ </summary>
+ <value>
+ The security evidence file to embed.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/e[vidence]</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.FileVersion">
+ <summary>
+ Specifies a string for the <b>File Version</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>File Version</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Flags">
+ <summary>
+ Specifies a value (in hexadecimal) for the <b>Flags</b> field in
+ the assembly.
+ </summary>
+ <value>
+ A value (in hexadecimal) for the <b>Flags</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.KeyContainer">
+ <summary>
+ Specifies a container that holds a key pair.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.KeyFile">
+ <summary>
+ Specifies a file (filename) that contains a key pair or
+ just a public key to sign an assembly.
+ </summary>
+ <value>
+ The complete path to the key file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/keyf[ile]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.MainMethod">
+ <summary>
+ Specifies the fully-qualified name (class.method) of the method to
+ use as an entry point when converting a module to an executable file.
+ </summary>
+ <value>
+ The fully-qualified name (class.method) of the method to use as an
+ entry point when converting a module to an executable file.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.ModuleSet">
+ <summary>
+ One or more modules to be compiled into an assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.OutputFile">
+ <summary>
+ The name of the output file for the assembly manifest.
+ </summary>
+ <value>
+ The complete output path for the assembly manifest.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/out</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.OutputTarget">
+ <summary>
+ The target type (one of <c>lib</c>, <c>exe</c>, or <c>winexe</c>).
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/t[arget]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Product">
+ <summary>
+ Specifies a string for the <b>Product</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Product</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.ProductVersion">
+ <summary>
+ Specifies a string for the <b>Product Version</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Product Version</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Resources">
+ <summary>
+ The set of resources to embed.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.EmbeddedResources">
+ <summary>
+ The set of compiled resources to embed.
+ </summary>
+ <remarks>
+ Do not yet expose this to build authors.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.SupportsTemplate">
+ <summary>
+ Indicates whether the assembly linker for a given target framework
+ supports the "template" option, which takes an assembly from which
+ to get all options except the culture field.
+ The default is <see langword="true" />.
+ </summary>
+ <remarks>
+ TODO: remove this once Mono bug #74814 is fixed.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.TemplateFile">
+ <summary>
+ Specifies an assembly from which to get all options except the
+ culture field.
+ </summary>
+ <value>
+ The complete path to the assembly template.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/template:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Title">
+ <summary>
+ Specifies a string for the <b>Title</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Title</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Trademark">
+ <summary>
+ Specifies a string for the <b>Trademark</b> field in the assembly.
+ </summary>
+ <value>
+ A string for the <b>Trademark</b> field in the assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Version">
+ <summary>
+ Specifies version information for the assembly. The format of the
+ version string is <c>major</c>.<c>minor</c>.<c>build</c>.<c>revision</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Win32Icon">
+ <summary>
+ Icon to associate with the assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.Win32Res">
+ <summary>
+ Inserts a Win32 resource (.res file) in the output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.AssemblyLinkerTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program or
+ <see langword="null" /> if the task is not being executed.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.CompilerBase">
+ <summary>
+ Provides the abstract base class for compiler tasks.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.CompilerBase.CodebehindExtensions">
+ <summary>
+ Contains a list of extensions for all file types that should be treated as
+ 'code-behind' when looking for resources. Ultimately this will determine
+ if we use the "namespace+filename" or "namespace+classname" algorithm, since
+ code-behind will use the "namespace+classname" algorithm.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.CompilerBase.CultureNames">
+ <summary>
+ Case-insensitive list of valid culture names for this platform.
+ </summary>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the culture name and
+ the value is <see langword="null"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.#cctor">
+ <summary>
+ Class constructor for <see cref="T:NAnt.DotNet.Tasks.CompilerBase"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.ExecuteTask">
+ <summary>
+ Compiles the sources and resources.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.GetManifestResourceName(NAnt.DotNet.Types.ResourceFileSet,System.String,System.String,System.String)">
+ <summary>
+ Determines the manifest resource name of the given resource file.
+ </summary>
+ <param name="resources">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> containing information that will used to assemble the manifest resource name.</param>
+ <param name="resourcePhysicalFile">The resource file of which the manifest resource name should be determined.</param>
+ <param name="resourceLogicalFile">The logical location of the resource file.</param>
+ <param name="dependentFile">The source file on which the resource file depends.</param>
+ <returns>
+ The manifest resource name of the specified resource file.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.GetManifestResourceName(NAnt.DotNet.Types.ResourceFileSet,System.String)">
+ <summary>
+ Determines the manifest resource name of the given resource file.
+ </summary>
+ <param name="resources">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> containing information that will used to assemble the manifest resource name.</param>
+ <param name="resourceFile">The resource file of which the manifest resource name should be determined.</param>
+ <returns>
+ The manifest resource name of the specified resource file.
+ </returns>
+ <remarks>
+ For .resx resources, the name of the dependent is determined by
+ replacing the extension of the file with the extension of the
+ source files for the compiler, and removing the culture name from
+ the file name for localized resources.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.PerformSearchForResourceLinkage(System.IO.TextReader)">
+ <summary>
+ Extracts the associated namespace/classname linkage found in the
+ given stream.
+ </summary>
+ <param name="sr">The read-only stream of the source file to search.</param>
+ <returns>
+ The namespace/classname of the source file matching the resource.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WritePackageReferences(System.IO.TextWriter)">
+ <summary>
+ Writes package references to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the package references should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteWarningsAsError(System.IO.TextWriter)">
+ <summary>
+ Writes list of warnings to (not) treat as errors to the specified
+ <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the list of warnings should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteNoWarnList(System.IO.TextWriter)">
+ <summary>
+ Writes list of warnings to suppress to the specified
+ <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the list of warnings to suppress should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteConditionalCompilationConstants(System.IO.TextWriter)">
+ <summary>
+ Writes conditional compilation constants to the specified
+ <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the conditional compilation constants should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteModuleReferences(System.IO.TextWriter)">
+ <summary>
+ Writes module references to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the module references should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteOptions(System.IO.TextWriter)">
+ <summary>
+ Allows derived classes to provide compiler-specific options.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteOption(System.IO.TextWriter,System.String)">
+ <summary>
+ Writes an option using the default output format.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ <param name="name">The name of the option which should be passed to the compiler.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.WriteOption(System.IO.TextWriter,System.String,System.String)">
+ <summary>
+ Writes an option and its value using the default output format.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ <param name="name">The name of the option which should be passed to the compiler.</param>
+ <param name="value">The value of the option which should be passed to the compiler.</param>
+ <remarks>
+ The combination of <paramref name="name"/> and
+ <paramref name="value"/> (separated by a colon) is quoted
+ unless <paramref name="value"/> is already surrounded by quotes.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.NeedsCompiling">
+ <summary>
+ Determines whether compilation is needed.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.GetResourceLinkage(System.String,System.Globalization.CultureInfo)">
+ <summary>
+ Finds the correct namespace/classname for a resource file from the
+ given dependent source file.
+ </summary>
+ <param name="dependentFile">The file from which the resource linkage of the resource file should be determined.</param>
+ <param name="resourceCulture">The culture of the resource file for which the resource linkage should be determined.</param>
+ <returns>
+ The namespace/classname of the source file matching the resource or
+ <see langword="null" /> if the dependent source file does not exist.
+ </returns>
+ <remarks>
+ This behaviour may be overidden by each particular compiler to
+ support the namespace/classname syntax for that language.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.LinkResourceAssembly(System.Collections.Hashtable,System.IO.FileInfo,System.String)">
+ <summary>
+ Link a list of files into a resource assembly.
+ </summary>
+ <param name="resourceFiles">The collection of resources.</param>
+ <param name="resourceAssemblyFile">Resource assembly to generate</param>
+ <param name="culture">Culture of the generated assembly.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.CompileResxResources(System.Collections.Specialized.StringCollection)">
+ <summary>
+ Compiles a set of resx files to a .resources files.
+ </summary>
+ <param name="resxFiles">The set of resx files to compile.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.GetResourceCulture(System.String,System.String)">
+ <summary>
+ Determines the culture associated with a given resource file by
+ scanning the filename for valid culture names.
+ </summary>
+ <param name="resourceFile">The resource file path to check for culture info.</param>
+ <param name="dependentFile">The file on which the resource file depends.</param>
+ <returns>
+ A valid <see cref="T:System.Globalization.CultureInfo"/> instance if the resource is
+ associated with a specific culture; otherwise, <see langword="null"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Debug">
+ <summary>
+ Generate debug output. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ Only used for <jsc> tasks, but retained for backward
+ compatibility (Clover.NET).
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.OutputFile">
+ <summary>
+ The output file created by the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.OutputTarget">
+ <summary>
+ Output type. Possible values are <c>exe</c>, <c>winexe</c>,
+ <c>library</c> or <c>module</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Define">
+ <summary>
+ Define conditional compilation symbol(s).
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to <c>/d[efine]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Win32Icon">
+ <summary>
+ Icon to associate with the application.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to <c>/win32icon:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Win32Res">
+ <summary>
+ Specifies a Win32 resource file (.res).
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to <c>/win32res[ource]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.WarnAsError">
+ <summary>
+ Instructs the compiler to treat all warnings as errors. The default
+ is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to the <c>/warnaserror[+|-]</c> flag of the compiler.
+ </para>
+ <para>
+ When this property is set to <see langword="true" />, any messages
+ that would ordinarily be reported as warnings will instead be
+ reported as errors.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.WarningAsError">
+ <summary>
+ Controls which warnings should be reported as errors.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.NoWarn">
+ <summary>
+ Specifies a comma-separated list of warnings that should be suppressed
+ by the compiler.
+ </summary>
+ <value>
+ Comma-separated list of warnings that should be suppressed by the
+ compiler.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/nowarn</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SuppressWarnings">
+ <summary>
+ Specifies a list of warnings that you want the compiler to suppress.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ForceRebuild">
+ <summary>
+ Instructs NAnt to recompile the output file regardless of the file timestamps.
+ </summary>
+ <remarks>
+ When this parameter is to <see langword="true" />, NAnt will always
+ run the compiler to rebuild the output file, regardless of the file timestamps.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.MainType">
+ <summary>
+ Specifies which type contains the Main method that you want to use
+ as the entry point into the program.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to the <c>/m[ain]:</c> flag of the compiler.
+ </para>
+ <para>
+ Use this property when creating an executable file. If this property
+ is not set, the compiler searches for a valid Main method in all
+ public classes.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.KeyContainer">
+ <summary>
+ Specifies the key pair container used to strongname the assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.KeyFile">
+ <summary>
+ Specifies a strong name key file.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.DelaySign">
+ <summary>
+ Specifies whether to delay sign the assembly using only the public
+ portion of the strong name key. The default is
+ <see cref="T:NAnt.DotNet.Types.DelaySign.NotSet" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Lib">
+ <summary>
+ Additional directories to search in for assembly references.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/lib[path]:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.References">
+ <summary>
+ Reference metadata from the specified assembly files.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Packages">
+ <summary>
+ Specifies list of packages to reference.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourcesList">
+ <summary>
+ Resources to embed.
+ </summary>
+ <remarks>
+ <para>
+ This can be a combination of resx files and file resources.
+ </para>
+ <para>
+ .resx files will be compiled by <see cref="T:NAnt.DotNet.Tasks.ResGenTask"/> and then
+ embedded into the resulting executable.
+ </para>
+ <para>
+ The <see cref="P:NAnt.DotNet.Types.ResourceFileSet.Prefix"/> property is used to make
+ up the resource name added to the assembly manifest for non-resx
+ files.
+ </para>
+ <para>
+ For .resx files the namespace from the matching source file is used
+ as prefix. This matches the behaviour of Visual Studio.
+ </para>
+ <para>
+ Multiple resources tags with different namespace prefixes may be
+ specified.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Modules">
+ <summary>
+ Link the specified modules into this assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Sources">
+ <summary>
+ The set of source files for compilation.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsPackageReferences">
+ <summary>
+ Indicates whether package references are supported by compiler for
+ a given target framework. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsWarnAsErrorList">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "warnaserror" option that takes a list of warnings. The default
+ is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsNoWarnList">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ a command line option that allows a list of warnings to be
+ suppressed. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsKeyContainer">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "keycontainer" option. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsKeyFile">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "keyfile" option. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.SupportsDelaySign">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "delaysign" option. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.Extension">
+ <summary>
+ Gets the file extension required by the current compiler.
+ </summary>
+ <value>
+ The file extension required by the current compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ClassNameRegex">
+ <summary>
+ Gets the class name regular expression for the language of the current compiler.
+ </summary>
+ <value> class name regular expression for the language of the current compiler</value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.NamespaceRegex">
+ <summary>
+ Gets the namespace regular expression for the language of the current compiler.
+ </summary>
+ <value> namespace regular expression for the language of the current compiler</value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage">
+ <summary>
+ Holds class and namespace information for resource (*.resx) linkage.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.#ctor(System.String,System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/>
+ class.
+ </summary>
+ <param name="namespaceName">The namespace the resource is under.</param>
+ <param name="className">The class name the resource is associated with.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.ToString">
+ <summary>
+ Returns the resource linkage as a string.
+ </summary>
+ <returns>
+ A string representation of the resource linkage.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.IsValid">
+ <summary>
+ Gets a value indicating whether the <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/>
+ instances contains valid data.
+ </summary>
+ <value>
+ <see langword="true"/> if the <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/>
+ instance contains valid data; otherwise, <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.HasNamespaceName">
+ <summary>
+ Gets a value indicating whether a namespace name is available
+ for this <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/> instance.
+ </summary>
+ <value>
+ <see langword="true"/> if a namespace name is available for
+ this <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/> instance; otherwise,
+ <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.HasClassName">
+ <summary>
+ Gets a value indicating whether a class name is available
+ for this <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/> instance.
+ </summary>
+ <value>
+ <see langword="true"/> if a class name is available for
+ this <see cref="T:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage"/> instance; otherwise,
+ <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.NamespaceName">
+ <summary>
+ Gets the name of namespace the resource is under.
+ </summary>
+ <value>
+ The name of namespace the resource is under.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.ClassName">
+ <summary>
+ Gets the name of the class (most likely a form) that the resource
+ is associated with.
+ </summary>
+ <value>
+ The name of the class the resource is associated with.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CompilerBase.ResourceLinkage.Culture">
+ <summary>
+ Gets the culture that the resource is associated with.
+ </summary>
+ <value>
+ The culture that the resource is associated with.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.CscTask">
+ <summary>
+ Compiles C# programs.
+ </summary>
+ <remarks>
+ <note>
+ In order to have <see cref="T:NAnt.DotNet.Tasks.CscTask"/> generate manifest resource names
+ that match those generated by Microsoft Visual Studio.NET, the value of
+ the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.Prefix"/> attribute of the <<see cref="P:NAnt.DotNet.Tasks.CompilerBase.ResourcesList"/>>
+ element should match the "Default Namespace" of the C# project, and the
+ value of the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.DynamicPrefix"/> attribute
+ should be set to "<see langword="true"/>".
+ </note>
+ </remarks>
+ <example>
+ <para>Compile a "HelloWorld" application, including embedded resources.</para>
+ <code>
+ <![CDATA[
+ <csc target="exe" output="HelloWorld.exe" debug="true">
+ <nowarn>
+ <!-- do not report warnings for missing XML comments -->
+ <warning number="0519" />
+ </nowarn>
+ <sources>
+ <include name="**/*.cs" />
+ </sources>
+ <resources dynamicprefix="true" prefix="HelloWorld">
+ <include name="**/*.resx" />
+ </resources>
+ <references>
+ <include name="System.dll" />
+ <include name="System.Data.dll" />
+ </references>
+ </csc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CscTask.WriteOptions(System.IO.TextWriter)">
+ <summary>
+ Writes the compiler options to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.CscTask.NeedsCompiling">
+ <summary>
+ Determines whether compilation is needed.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.BaseAddress">
+ <summary>
+ The preferred base address at which to load a DLL. The default base
+ address for a DLL is set by the .NET Framework common language
+ runtime.
+ </summary>
+ <value>
+ The preferred base address at which to load a DLL.
+ </value>
+ <remarks>
+ This address can be specified as a decimal, hexadecimal, or octal
+ number.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.DebugOutput">
+ <summary>
+ Specifies the type of debugging information generated by the
+ compiler. The default is <see cref="T:NAnt.DotNet.Types.DebugOutput.None" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Debug">
+ <summary>
+ No longer expose this to build authors. Use <see cref="P:NAnt.DotNet.Tasks.CscTask.DebugOutput"/>
+ instead.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.DocFile">
+ <summary>
+ The name of the XML documentation file to generate.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/doc:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.FileAlign">
+ <summary>
+ Specifies the size of sections in the output file. Valid values are
+ 512, 1024, 2048, 4096, and 8192.
+ </summary>
+ <value>
+ The size of sections in the output file.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.NoStdLib">
+ <summary>
+ Instructs the compiler not to import mscorlib.dll. The default is
+ <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/nostdlib[+|-]</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.NoConfig">
+ <summary>
+ Instructs the compiler not to use implicit references to assemblies.
+ The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/noconfig</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Checked">
+ <summary>
+ Specifies whether an integer arithmetic statement that is not in
+ the scope of the <c>checked</c> or <c>unchecked</c> keywords and
+ that results in a value outside the range of the data type should
+ cause a run-time exception. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/checked[+|-]</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Unsafe">
+ <summary>
+ Instructs the compiler to allow code that uses the <c>unsafe</c>
+ keyword. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/unsafe[+|-]</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.LangVersion">
+ <summary>
+ Causes the compiler to only accept syntax that is included in a
+ given specification.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/langversion</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Optimize">
+ <summary>
+ Specifies whether the compiler should perform optimizations to the
+ make output files smaller, faster, and more effecient. The default
+ is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the compiler should perform optimizations;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/optimize[+|-]</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Platform">
+ <summary>
+ Specifies which platform version of common language runtime (CLR)
+ can run the output file.
+ </summary>
+ <value>
+ The platform version of common language runtime (CLR) that can run
+ the output file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/platform</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.WarningLevel">
+ <summary>
+ Specifies the warning level for the compiler to display. Valid values
+ are <c>0</c>-<c>4</c>. The default is <c>4</c>.
+ </summary>
+ <value>
+ The warning level for the compiler to display.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/warn</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Codepage">
+ <summary>
+ Specifies the code page to use for all source code files in the
+ compilation.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/codepage</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.SupportsDocGeneration">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports generation of XML Documentation file. The default is
+ <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.SupportsPlatform">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports limiting the platform on which the compiled code can run.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.SupportsLangVersion">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports accepting only a specific language syntax.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.Extension">
+ <summary>
+ Gets the file extension required by the current compiler.
+ </summary>
+ <value>
+ For the C# compiler, the file extension is always <c>cs</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.ClassNameRegex">
+ <summary>
+ Gets the class name regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Class name regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.CscTask.NamespaceRegex">
+ <summary>
+ Gets the namespace regular expression for the language of the current compiler.
+ </summary>
+ <value>
+ Namespace regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.DelaySignTask">
+ <summary>
+ Signs delay-signed .NET Assemblies, or re-signs existing assemblies.
+ </summary>
+ <remarks>
+ <para>
+ The delay-signing mechanism takes a fileset (named targets)
+ and either a <see cref="P:NAnt.DotNet.Tasks.DelaySignTask.KeyFile"/> attribute for a file containing the
+ public and private keys, or <see cref="P:NAnt.DotNet.Tasks.DelaySignTask.KeyContainer"/> to name a key
+ container.
+ </para>
+ </remarks>
+ <example>
+ <para>Sign partially-signed <c>foo.dll</c> with <c>bar.snk</c>.</para>
+ <code>
+ <![CDATA[
+ <delay-sign keyfile="bar.snk" verbose="false">
+ <targets>
+ <include name="foo.dll" />
+ </targets>
+ </delay-sign>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.DelaySignTask.ExecuteTask">
+ <summary>
+ Converts a single file or group of files.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.DelaySignTask.Targets">
+ <summary>
+ List of assemblies/executables to sign.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.DelaySignTask.KeyFile">
+ <summary>
+ Specifies the filesystem path to the signing key.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.DelaySignTask.KeyContainer">
+ <summary>
+ Specifies the key container.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.DelaySignTask.ProgramArguments">
+ <summary>
+ Gets the command line arguments for the external program.
+ </summary>
+ <value>
+ The command line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.IlasmTask">
+ <summary>
+ Compiles ILASM programs.
+ </summary>
+ <example>
+ <para>
+ Compiles <c>helloworld.il</c> to <c>helloworld.exe</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <ilasm target="exe" output="helloworld.exe" debug="true">
+ <sources>
+ <include name="helloworld.il" />
+ </sources>
+ </ilasm>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.IlasmTask.ExecuteTask">
+ <summary>
+ Compiles the sources.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.IlasmTask.WriteOptions">
+ <summary>
+ Writes the compiler options.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.IlasmTask.WriteOption(System.IO.StringWriter,System.String)">
+ <summary>
+ Writes an option using the default output format.
+ </summary>
+ <param name="writer">
+ The <see cref="T:System.IO.StringWriter"/> to which the compiler options should
+ be written.
+ </param>
+ <param name="name">
+ A <see cref="T:System.String"/> that contains the name of the
+ option which should be passed to the compiler.
+ </param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.IlasmTask.WriteOption(System.IO.StringWriter,System.String,System.String)">
+ <summary>
+ Writes an option and its value using the default output format.
+ </summary>
+ <param name="writer">
+ The <see cref="T:System.IO.StringWriter"/> to which the compiler options should
+ be written.
+ </param>
+ <param name="name">
+ A <see cref="T:System.String"/> that contains the name of the
+ option which should be passed to the compiler.
+ </param>
+ <param name="arg">
+ A <see cref="T:System.String"/> that contains the value of the
+ option which should be passed to the compiler.
+ </param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.IlasmTask.NeedsCompiling">
+ <summary>
+ Determines whether or not compilation is needed.
+ </summary>
+ <returns>
+ <see langword="true" /> if compilation is needed; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Clock">
+ <summary>
+ Specifies whether or not the compiler should measure and report
+ the compilation times.
+ </summary>
+ <value>
+ <see langword="true" /> if the compilation times should be
+ measured and reported; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/CLOCK</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Debug">
+ <summary>
+ Specifies whether or not the compiler should generate debug
+ information.
+ </summary>
+ <value>
+ <see langword="true" /> if debug information should be generated;
+ otherwise, <see langword="false" />. The default is
+ <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/DEBUG</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Error">
+ <summary>
+ Specifies whether or not the compiler should attempt to create a
+ PE file even if compilation errors have been reported.
+ </summary>
+ <value>
+ <see langword="true" /> if a PE file has to be created even if
+ compilation errors have been reported; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/ERROR</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.ForceRebuild">
+ <summary>
+ Instructs NAnt to recompile the output file regardless of the file
+ timestamps.
+ </summary>
+ <value>
+ <see langword="true" /> if the output file should be recompiled
+ regardless of its timestamps; otherwise <see langword="false" />.
+ The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Listing">
+ <summary>
+ Specifies whether or not the compiler should type a formatted
+ listing of the compilation result.
+ </summary>
+ <value>
+ <see langword="true" /> if a formatted listing of the compilation
+ result should be typed; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/LISTING</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Alignment">
+ <summary>
+ Instructs the compiler to set the <i>FileAlignment</i> value in
+ the PE header.
+ </summary>
+ <value>
+ An <see cref="T:System.Int32" /> that represents the <i>FileAlignment</i>
+ value to set in the PE header. The value must be a power of 2, in
+ range from 512 to 65536.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/ALIGNMENT</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Base">
+ <summary>
+ Instructs the compiler to set the <i>ImageBase</i> value in
+ the PE header.
+ </summary>
+ <value>
+ A <see cref="T:System.Int32" /> that represents the <i>ImageBase</i>
+ value to set in the PE header.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/BASE</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Flags">
+ <summary>
+ Instructs the compiler to set the <i>Flags</i> value in the CLR
+ header.
+ </summary>
+ <value>
+ An <see cref="T:System.Int32" /> that represents the <i>Flags</i>
+ value to set in the CLR header. The most frequently value are 1
+ (pre-IL code) and 2 (mixed code). The third bit indicating that
+ the PE file is strong signed, is ignored.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/FLAGS</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Subsystem">
+ <summary>
+ Instructs the compiler to set the <i>Subsystem</i> value in the PE
+ header.
+ </summary>
+ <value>
+ An <see cref="T:System.Int32" /> that represents the <i>Subsystem</i>
+ value to set in the PE header. The most frequently value are 3
+ (console application) and 2 (GUI application).
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/SUBSYSTEM</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Target">
+ <summary>
+ Specifies which output type should be generated.
+ </summary>
+ <value>
+ A <see cref="T:System.String" /> that contains the target type.
+ Possible values are <c>dll</c> and <c>exe</c>.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/OUTPUT</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.KeySource">
+ <summary>
+ Instructs the compiler to generate a strong signature of the PE
+ file.
+ </summary>
+ <value>
+ A <see cref="T:System.String" /> that contains the private
+ encryption key.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/KEY=<![CDATA[@<]]>keysource<![CDATA[>]]></c>
+ flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.KeyFile">
+ <summary>
+ Instructs the compiler to generate a strong signature of the PE
+ file.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo" /> that represents the file
+ containing the private encryption key.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/KEY=<![CDATA[<]]>keyfile<![CDATA[>]]></c>
+ flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.OutputFile">
+ <summary>
+ Specifies the name of the output file created by the compiler.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo" /> that represents the name of
+ the output file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/OUTPUT</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.ResourceFile">
+ <summary>
+ Instructs the compiler to link the specified unmanaged resource
+ file into the resulting PE file.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo" /> that represents the unmanaged
+ resource file to link.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/RESOURCE</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.Sources">
+ <summary>
+ Specifies the set of source files to compile.
+ </summary>
+ <value>
+ A <see cref="T:NAnt.Core.Types.FileSet" /> that represents the set
+ of source files to compile.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.IlasmTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ A <see cref="T:System.String" /> that contains the command-line
+ arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.JscTask">
+ <summary>
+ Compiles JScript.NET programs.
+ </summary>
+ <example>
+ <para>Compile <c>helloworld.js</c> to <c>helloworld.exe</c>.</para>
+ <code>
+ <![CDATA[
+ <jsc target="exe" output="helloworld.exe" debug="true">
+ <sources>
+ <include name="helloworld.js" />
+ </sources>
+ </jsc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.JscTask.WriteModuleReferences(System.IO.TextWriter)">
+ <summary>
+ Writes module references to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the module references should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.JscTask.WriteOptions(System.IO.TextWriter)">
+ <summary>
+ Writes the compiler options to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.AutoRef">
+ <summary>
+ Automatically references assemblies if they have the same name as
+ an imported namespace or as a type annotation when declaring a
+ variable. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/autoref</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.NoStdLib">
+ <summary>
+ Instructs the compiler not to import standard library, and changes
+ <see cref="P:NAnt.DotNet.Tasks.JscTask.AutoRef"/> to <see langword="false"/>. The default is
+ <see langword="false"/>.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/noconfig</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.Platform">
+ <summary>
+ Specifies which platform version of common language runtime (CLR)
+ can run the output file.
+ </summary>
+ <value>
+ The platform version of common language runtime (CLR) that can run
+ the output file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/platform</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.VersionSafe">
+ <summary>
+ Causes the compiler to generate errors for implicit method
+ overrides. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/versionsafe</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.WarningLevel">
+ <summary>
+ Specifies the warning level for the compiler to display. Valid
+ values are <c>0</c>-<c>4</c>. The default is <c>4</c>.
+ </summary>
+ <value>
+ The warning level for the compiler to display.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/warn</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.WarningAsError">
+ <summary>
+ Controls which warnings should be reported as errors.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ compiler does not allow control over which warnings should be
+ reported as errors.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.NoWarn">
+ <summary>
+ Specifies a comma-separated list of warnings that should be suppressed
+ by the compiler.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ compiler does not support package references.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.SuppressWarnings">
+ <summary>
+ Specifies a list of warnings that you want the compiler to suppress.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ compiler does not support suppressing warnings.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.Codepage">
+ <summary>
+ Specifies the code page to use for all source code files in the
+ compilation.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/codepage</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.KeyContainer">
+ <summary>
+ Specifies the key pair container used to strongname the assembly.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.KeyFile">
+ <summary>
+ Specifies a strong name key file.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.DelaySign">
+ <summary>
+ Specifies whether to delay sign the assembly using only the public
+ portion of the strong name key.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.SupportsKeyContainer">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "keycontainer" option. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.SupportsKeyFile">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "keyfile" option. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.SupportsDelaySign">
+ <summary>
+ Indicates whether the compiler for a given target framework supports
+ the "delaysign" option. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ does not support this.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.SupportsPlatform">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports limiting the platform on which the compiled code can run.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.Modules">
+ <summary>
+ Link the specified modules into this assembly.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the JScript.NET
+ compiler does not support linking modules.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.Extension">
+ <summary>
+ Gets the file extension required by the current compiler.
+ </summary>
+ <value>
+ For the JScript.NET compiler, the file extension is always <c>js</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.ClassNameRegex">
+ <summary>
+ Gets the class name regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Class name regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.JscTask.NamespaceRegex">
+ <summary>
+ Gets the namespace regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Namespace regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.LicenseTask">
+ <summary>
+ Generates a <c>.licence</c> file from a <c>.licx</c> file.
+ </summary>
+ <remarks>
+ <para>
+ If no output file is specified, the default filename is the name of the
+ target file with the extension <c>.licenses</c> appended.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Generate the file <c>component.exe.licenses</c> file from <c>component.licx</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <license input="component.licx" licensetarget="component.exe" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.Initialize">
+ <summary>
+ Initializes the <see cref="T:NAnt.DotNet.Tasks.LicenseTask"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Updates the <see cref="T:System.Diagnostics.ProcessStartInfo"/> of the specified
+ <see cref="T:System.Diagnostics.Process"/>.
+ </summary>
+ <param name="process">The <see cref="T:System.Diagnostics.Process"/> of which the <see cref="T:System.Diagnostics.ProcessStartInfo"/> should be updated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.ExecuteTask">
+ <summary>
+ Generates the license file.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.NeedsCompiling(System.IO.FileInfo)">
+ <summary>
+ Determines whether the <c>.licenses</c> file needs to be recompiled
+ or is uptodate.
+ </summary>
+ <param name="licensesFile">The <c>.licenses</c> file.</param>
+ <returns>
+ <see langword="true" /> if the <c>.licenses</c> file needs compiling;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.InputFile">
+ <summary>
+ Input file to process.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.OutputFile">
+ <summary>
+ Name of the license file to output.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.Assemblies">
+ <summary>
+ Names of the references to scan for the licensed component.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.LicenseTarget">
+ <summary>
+ Specifies the executable for which the .licenses file is generated.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.Target">
+ <summary>
+ Specifies the executable for which the .licenses file is generated.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.SupportsAssemblyReferences">
+ <summary>
+ Indicates whether assembly references are supported by the current
+ target framework. The default is <see langword="false" />.
+ </summary>
+ <remarks>
+ Applies only to frameworks having a command line tool for compiling
+ licenses files.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.HasCommandLineCompiler">
+ <summary>
+ Indicates whether the current target framework has a command line
+ tool for compiling licenses files. The default is
+ <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.BaseDirectory">
+ <summary>
+ Gets the working directory for the application.
+ </summary>
+ <value>
+ The working directory for the application.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.Arguments">
+ <summary>
+ The command-line arguments for the external program.
+ </summary>
+ <remarks>
+ Override to avoid exposing these elements in build file.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.LicenseTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ <remarks>
+ Override in derived classes to explicitly set the location of the
+ external tool.
+ </remarks>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.LicenseTask.LicenseGatherer">
+ <summary>
+ Responsible for reading the license and writing them to a license
+ file.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.LicenseGatherer.InitializeLifetimeService">
+ <summary>
+ Obtains a lifetime service object to control the lifetime policy for
+ this instance.
+ </summary>
+ <returns>
+ An object of type <see cref="T:System.Runtime.Remoting.Lifetime.ILease"/> used to control the lifetime
+ policy for this instance. This is the current lifetime service object
+ for this instance if one exists; otherwise, a new lifetime service
+ object initialized with a lease that will never time out.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.LicenseGatherer.CreateLicenseFile(NAnt.DotNet.Tasks.LicenseTask,System.String)">
+ <summary>
+ Creates the whole license file.
+ </summary>
+ <param name="licenseTask">The <see cref="T:NAnt.DotNet.Tasks.LicenseTask"/> instance for which the license file should be created.</param>
+ <param name="licensesFile">The .licenses file to create.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.LicenseTask.LicenseGatherer.IsSerializable(System.Object)">
+ <summary>
+ Determines whether the given object is serializable in binary
+ format.
+ </summary>
+ <param name="value">The object to check.</param>
+ <returns>
+ <see langword="true" /> if <paramref name="value" /> is
+ serializable in binary format; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.NDocTask">
+ <summary>
+ Runs NDoc V1.3.1 to create documentation.
+ </summary>
+ <remarks>
+ <para>
+ See the <see href="http://ndoc.sourceforge.net/">NDoc home page</see> for more
+ information.
+ </para>
+ <note>
+ By default, only the NDoc MSDN documenter ships as part of the NAnt
+ distribution. To make another NDoc documenter from the NDoc V1.3.1
+ distribution available to the <see cref="T:NAnt.DotNet.Tasks.NDocTask"/>, copy the
+ documenter assembly (and possible dependencies) to the "lib"
+ directory corresponding with the CLR you're running NAnt on
+ (eg. <nant root>/bin/lib/net/1.1).
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Document two assemblies using the MSDN documenter. The namespaces are
+ documented in <c>NamespaceSummary.xml</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <ndoc>
+ <assemblies basedir="${build.dir}">
+ <include name="NAnt.exe" />
+ <include name="NAnt.Core.dll" />
+ </assemblies>
+ <summaries basedir="${build.dir}">
+ <include name="NamespaceSummary.xml" />
+ </summaries>
+ <documenters>
+ <documenter name="MSDN">
+ <property name="OutputDirectory" value="doc\MSDN" />
+ <property name="HtmlHelpName" value="NAnt" />
+ <property name="IncludeFavorites" value="False" />
+ <property name="Title" value="An NDoc Documented Class Library" />
+ <property name="SplitTOCs" value="False" />
+ <property name="DefaulTOC" value="" />
+ <property name="ShowVisualBasic" value="True" />
+ <property name="ShowMissingSummaries" value="True" />
+ <property name="ShowMissingRemarks" value="True" />
+ <property name="ShowMissingParams" value="True" />
+ <property name="ShowMissingReturns" value="True" />
+ <property name="ShowMissingValues" value="True" />
+ <property name="DocumentInternals" value="False" />
+ <property name="DocumentProtected" value="True" />
+ <property name="DocumentPrivates" value="False" />
+ <property name="DocumentEmptyNamespaces" value="False" />
+ <property name="IncludeAssemblyVersion" value="False" />
+ <property name="CopyrightText" value="" />
+ <property name="CopyrightHref" value="" />
+ </documenter>
+ </documenters>
+ </ndoc>
+ ]]>
+ </code>
+ <para>Content of <c>NamespaceSummary.xml</c> :</para>
+ <code>
+ <![CDATA[
+ <namespaces>
+ <namespace name="Foo.Bar">
+ The <b>Foo.Bar</b> namespace reinvents the wheel.
+ </namespace>
+ <namespace name="Foo.Bar.Tests">
+ The <b>Foo.Bar.Tests</b> namespace ensures that the Foo.Bar namespace reinvents the wheel correctly.
+ </namespace>
+ </namespaces>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.Initialize">
+ <summary>
+ Initializes the taks and verifies the parameters.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.ExecuteTask">
+ <summary>
+ Generates an NDoc project and builds the documentation.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.OnDocBuildingStep(System.Object,NDoc.Core.ProgressArgs)">
+ <summary>
+ Represents the method that will be called to update the overall
+ percent complete value and the current step name.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NDoc.Core.ProgressArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.OnDocBuildingProgress(System.Object,NDoc.Core.ProgressArgs)">
+ <summary>
+ Represents the method that will be called to update the current
+ step's precent complete value.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">A <see cref="T:NDoc.Core.ProgressArgs"/> that contains the event data.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.CheckAndGetDocumenter(NDoc.Core.Project,System.String)">
+ <summary>
+ Returns the documenter for the given project.
+ </summary>
+ <exception cref="T:NAnt.Core.BuildException">
+ Documenter <paramref name="documenterName"/> is not found.
+ </exception>
+ <exception cref="T:System.ArgumentNullException">
+ <paramref name="project"/> is <see langword="null"/>.
+ </exception>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.ExpandPropertiesInNodes(System.Xml.XmlNodeList)">
+ <summary>
+ Performs macro expansion for the given nodes.
+ </summary>
+ <param name="nodes"><see cref="T:System.Xml.XmlNodeList"/> for which expansion should be performed.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.SetHtmlHelpCompiler(System.Object,System.String)">
+ <summary>
+ Use Reflection to set HtmplHelp._htmlHelpCompiler private field for MSDN Documentor.
+ Ndoc could not handle 64bit installations and is not actively developed anymore.
+ </summary>
+ <param name="sender">Active documentor</param>
+ <param name="hhcexe">Path to hhc.exe</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.NDocTask.ResolveHhcExe">
+ <summary>
+ Searches in %ProgramFiles(x86)%\HTML Help Workshop and %ProgramFiles%\HTML Help Workshop
+ for hhc.exe. If not found let ndoc msdn documentor search itself
+ </summary>
+ <returns>the path to hhc.exe if found, null otherwise</returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.NDocTask.Assemblies">
+ <summary>
+ The set of assemblies to document.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.NDocTask.Summaries">
+ <summary>
+ The set of namespace summary files.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.NDocTask.Documenters">
+ <summary>
+ Specifies the formats in which the documentation should be generated.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.NDocTask.ReferencePaths">
+ <summary>
+ Collection of additional directories to search for referenced
+ assemblies.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.RegsvcsTask">
+ <summary>
+ Installs or removes .NET Services.
+ </summary>
+ <remarks>
+ <para>
+ This tasks provides the same functionality as the <c>regsvcs</c> tool
+ provided in the .NET SDK.
+ </para>
+ <para>
+ It performs the following actions:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>Loads and registers an assembly.</description>
+ </item>
+ <item>
+ <description>Generates, registers, and installs a type library into a specified COM+ application.</description>
+ </item>
+ <item>
+ <description>Configures services that are added programmatically to your class.</description>
+ </item>
+ </list>
+ <para>
+ Refer to the <see href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrfnetservicesinstallationutilityregsvcsexe.htm">.NET Services Installation Tool (Regsvcs.exe)</see> for more information.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Adds all public classes contained in <c>myTest.dll</c> to a COM+
+ application and produces the <c>myTest.tlb</c> type library. If the
+ application already exists, it is overwritten.
+ </para>
+ <code>
+ <![CDATA[
+ <regsvcs action="FindOrCreate" assembly="myTest.dll" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Adds all public classes contained in <c>myTest.dll</c> to <c>myTargetApp</c>
+ and produces the <c>myTest.tlb</c> type library. If the application already
+ exists, it is overwritten.
+ </para>
+ <code>
+ <![CDATA[
+ <regsvcs action="FindOrCreate" assembly="myTest.dll" application="myTargetApp" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Adds all public classes contained in <c>myTest.dll</c> to a COM+
+ application and produces the <c>myTest.tlb</c> type library. A new
+ application is always created.
+ </para>
+ <code>
+ <![CDATA[
+ <regsvcs action="Create" assembly="myTest.dll" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Uninstalls the COM+ application contained in <c>myTest.dll</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <regsvcs action="Uninstall" assembly="myTest.dll" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.RegsvcsTask.ExecuteTask">
+ <summary>
+ Performs the specified action.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.Action">
+ <summary>
+ Defines the action to take with the assembly. The default is
+ <see cref="F:NAnt.DotNet.Tasks.RegsvcsTask.ActionType.FindOrCreate"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.AssemblyFile">
+ <summary>
+ The source assembly file.
+ </summary>
+ <remarks>
+ The assembly must be signed with a strong name.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.TypeLibrary">
+ <summary>
+ Specifies the type library file to install.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.ExistingTypeLibrary">
+ <summary>
+ Uses an existing type library. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.NoReconfig">
+ <summary>
+ Do not reconfigure an existing target application.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.ComponentsOnly">
+ <summary>
+ Configures components only; ignores methods and interfaces.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.ExistingApplication">
+ <summary>
+ Expect an existing application. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.ApplicationName">
+ <summary>
+ Specifies the name of the COM+ application to either find or create.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.PartitionName">
+ <summary>
+ Specifies the name or id of the COM+ application to either find or
+ create.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.RegsvcsTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.RegsvcsTask.ActionType">
+ <summary>
+ Defines the possible actions for a .NET Service.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.RegsvcsTask.ActionType.FindOrCreate">
+ <summary>
+ Finds or creates the target application.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.RegsvcsTask.ActionType.Create">
+ <summary>
+ Creates the target application.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Tasks.RegsvcsTask.ActionType.Uninstall">
+ <summary>
+ Uninstalls the target application.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.ResGenTask">
+ <summary>
+ Converts files from one resource format to another.
+ </summary>
+ <remarks>
+ <note>
+ If no <see cref="P:NAnt.DotNet.Tasks.ResGenTask.ToDirectory"/> is specified, the resource file will
+ be created next to the input file.
+ </note>
+ </remarks>
+ <example>
+ <para>
+ Convert a resource file from the <c>.resx</c> to the <c>.resources</c>
+ format.
+ </para>
+ <code>
+ <![CDATA[
+ <resgen input="translations.resx" output="translations.resources" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Convert a set of <c>.resx</c> files to the <c>.resources</c> format.
+ </para>
+ <code>
+ <![CDATA[
+ <resgen todir=".">
+ <resources>
+ <include name="*.resx" />
+ </resources>
+ </resgen>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Updates the <see cref="T:System.Diagnostics.ProcessStartInfo"/> of the specified
+ <see cref="T:System.Diagnostics.Process"/>.
+ </summary>
+ <param name="process">The <see cref="T:System.Diagnostics.Process"/> of which the <see cref="T:System.Diagnostics.ProcessStartInfo"/> should be updated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.ExecuteTask">
+ <summary>
+ Converts a single file or group of files.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.RemoveOutputs">
+ <summary>
+ Cleans up generated files.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.NeedsCompiling(System.IO.FileInfo,System.IO.FileInfo)">
+ <summary>
+ Determines whether the specified input file needs to be compiled.
+ </summary>
+ <param name="inputFile">The input file.</param>
+ <param name="outputFile">The output file.</param>
+ <returns>
+ <see langword="true" /> if the input file need to be compiled;
+ otherwise <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.GetOutputFile(System.IO.FileInfo)">
+ <summary>
+ Determines the full path and extension for the output file.
+ </summary>
+ <param name="file">The output file for which the full path and extension should be determined.</param>
+ <returns>
+ The full path (with extensions) for the specified file.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.ReferencesThirdPartyAssemblies(System.String)">
+ <summary>
+ Determines whether the specified resource file references third
+ party assemblies by checking whether a <data> element exists
+ with a "type" attribute that does not start with
+ "System.".
+ </summary>
+ <param name="resourceFile">The resource file to check.</param>
+ <returns>
+ <see langword="true" /> if the resource file references third party
+ assemblies, or an error occurred; otherwise, <see langword="false" />.
+ </returns>
+ <remarks>
+ This check will only be accurate for 1.0 resource file, but the
+ 2.0 resx files can only be compiled with a resgen tool that supports
+ assembly references, so this method will not be used anyway.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ResGenTask.GetExternalFileReferences(System.IO.FileInfo)">
+ <summary>
+ Returns a list of external file references for the specified file.
+ </summary>
+ <param name="resxFile">The resx file for which a list of external file references should be returned.</param>
+ <returns>
+ A list of external file references for the specified file, or
+ <see langword="null" /> if <paramref name="resxFile" /> does not
+ exist or does not support external file references.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.InputFile">
+ <summary>
+ Input file to process.
+ </summary>
+ <value>
+ The full path to the input file.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.OutputFile">
+ <summary>
+ The resource file to output.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.TargetExt">
+ <summary>
+ The target type. The default is <c>resources</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.ToDirectory">
+ <summary>
+ The directory to which outputs will be stored.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.UseSourcePath">
+ <summary>
+ Use each source file's directory as the current directory for
+ resolving relative file paths. The default is <see langword="false" />.
+ Only supported when targeting .NET 2.0 (or higher).
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.Resources">
+ <summary>
+ Takes a list of <c>.resx</c> or <c>.txt</c> files to convert to <c>.resources</c> files.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.Assemblies">
+ <summary>
+ Reference metadata from the specified assembly files.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.SupportsAssemblyReferences">
+ <summary>
+ Indicates whether assembly references are supported by the
+ <c>resgen</c> tool for the current target framework. The default
+ is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.SupportsExternalFileReferences">
+ <summary>
+ Indicates whether external file references are supported by the
+ <c>resgen</c> tool for the current target framework. The default
+ is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.QualifiedResources">
+ <summary>
+ For internal use only !
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.BaseDirectory">
+ <summary>
+ Gets the working directory for the application.
+ </summary>
+ <value>
+ The working directory for the application.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.ProgramArguments">
+ <summary>
+ Gets the command line arguments for the external program.
+ </summary>
+ <value>
+ The command line arguments for the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ResGenTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ <remarks>
+ Override in derived classes to explicitly set the location of the
+ external tool.
+ </remarks>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.QualifiedResource">
+ <summary>
+ For internal use only !
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.QualifiedResource.#ctor(System.IO.FileInfo,System.IO.FileInfo)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Tasks.QualifiedResource"/>
+ class for a given input and output file.
+ </summary>
+ <param name="input">The resource to compile.</param>
+ <param name="output">The compiled resource.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.QualifiedResource.Input">
+ <summary>
+ Gets the resource file to compile.
+ </summary>
+ <value>
+ The resource file to compile.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.QualifiedResource.Output">
+ <summary>
+ Gets the compiled resource file.
+ </summary>
+ <value>
+ The compiled resource file.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.ScriptTask">
+ <summary>
+ Executes the code contained within the task.
+ </summary>
+ <remarks>
+ <h5>Code</h5>
+ <para>
+ The <see cref="T:NAnt.DotNet.Tasks.ScriptTask"/> must contain a single <c>code</c>
+ element, which in turn contains the script code.
+ </para>
+ <para>
+ This code can include extensions such as functions, or tasks. Once
+ the script task has executed those extensions will be available for
+ use in the buildfile.
+ </para>
+ <para>
+ If no extensions have been defined, a static entry point named
+ <c>ScriptMain</c> - which must have a single <see cref="T:NAnt.Core.Project"/>
+ argument - is required.
+ </para>
+ <h5>Namespaces</h5>
+ <para>
+ The following namespaces are imported by default:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>System</description>
+ </item>
+ <item>
+ <description>System.Collections</description>
+ </item>
+ <item>
+ <description>System.IO</description>
+ </item>
+ <item>
+ <description>System.Text</description>
+ </item>
+ <item>
+ <description>NAnt.Core</description>
+ </item>
+ <item>
+ <description>NAnt.Core.Attributes</description>
+ </item>
+ </list>
+ <h5>Assembly References</h5>
+ <para>
+ The assembly references that are specified will be used to compile
+ the script, and will be loaded into the NAnt appdomain.
+ </para>
+ <para>
+ By default, only the <c>NAnt.Core</c> and <c>mscorlib</c> assemblies
+ are referenced.
+ </para>
+ </remarks>
+ <example>
+ <para>Run C# code that writes a message to the build log.</para>
+ <code>
+ <script language="C#">
+ <code>
+ <![CDATA[
+ public static void ScriptMain(Project project) {
+ project.Log(Level.Info, "Hello World from a script task using C#");
+ }
+ ]]>
+ </code>
+ </script>
+ </code>
+ </example>
+ <example>
+ <para>Define a custom function and call it using C#.</para>
+ <code>
+ <script language="C#" prefix="test" >
+ <code>
+ <![CDATA[
+ [Function("test-func")]
+ public static string Testfunc( ) {
+ return "some result !!!!!!!!";
+ }
+ ]]>
+ </code>
+ </script>
+ <echo message='${test::test-func()}'/>
+ </code>
+ </example>
+ <example>
+ <para>Use a custom namespace in C# to create a database</para>
+ <code>
+ <script language="C#" >
+ <references>
+ <include name="System.Data.dll" />
+ </references>
+ <imports>
+ <import namespace="System.Data.SqlClient" />
+ </imports>
+ <code>
+ <![CDATA[
+ public static void ScriptMain(Project project) {
+ string dbUserName = "nant";
+ string dbPassword = "nant";
+ string dbServer = "(local)";
+ string dbDatabaseName = "NAntSample";
+ string connectionString = String.Format("Server={0};uid={1};pwd={2};", dbServer, dbUserName, dbPassword);
+
+ SqlConnection connection = new SqlConnection(connectionString);
+ string createDbQuery = "CREATE DATABASE " + dbDatabaseName;
+ SqlCommand createDatabaseCommand = new SqlCommand(createDbQuery);
+ createDatabaseCommand.Connection = connection;
+
+ connection.Open();
+
+ try {
+ createDatabaseCommand.ExecuteNonQuery();
+ project.Log(Level.Info, "Database added successfully: " + dbDatabaseName);
+ } catch (Exception e) {
+ project.Log(Level.Error, e.ToString());
+ } finally {
+ connection.Close();
+ }
+ }
+ ]]>
+ </code>
+ </script>
+ </code>
+ </example>
+ <example>
+ <para>
+ Run Visual Basic.NET code that writes a message to the build log.
+ </para>
+ <code>
+ <script language="VB">
+ <code>
+ <![CDATA[
+ Public Shared Sub ScriptMain(project As Project)
+ project.Log(Level.Info, "Hello World from a script task using Visual Basic.NET")
+ End Sub
+ ]]>
+ </code>
+ </script>
+ </code>
+ </example>
+ <example>
+ <para>Define a custom task and call it using C#.</para>
+ <code>
+ <script language="C#" prefix="test" >
+ <code>
+ <![CDATA[
+ [TaskName("usertask")]
+ public class TestTask : Task {
+ #region Private Instance Fields
+
+ private string _message;
+
+ #endregion Private Instance Fields
+
+ #region Public Instance Properties
+
+ [TaskAttribute("message", Required=true)]
+ public string FileName {
+ get { return _message; }
+ set { _message = value; }
+ }
+
+ #endregion Public Instance Properties
+
+ #region Override implementation of Task
+
+ protected override void ExecuteTask() {
+ Log(Level.Info, _message.ToUpper());
+ }
+ #endregion Override implementation of Task
+ }
+ ]]>
+ </code>
+ </script>
+ <usertask message='Hello from UserTask'/>
+ </code>
+ </example>
+ <example>
+ <para>
+ Define a custom function and call it using <see href="http://boo.codehaus.org/">Boo</see>.
+ </para>
+ <code>
+ <script language="Boo.CodeDom.BooCodeProvider, Boo.CodeDom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67"
+ failonerror="true">
+ <code>
+ <![CDATA[
+
+ [Function("test-func")]
+ def MyFunc():
+ return "Hello from Boo !!!!!!"
+ ]]>
+ </code>
+ </script>
+ <echo message='${script::test-func()}'/>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ScriptTask.Initialize">
+ <summary>
+ Initializes the task.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.ScriptTask.ExecuteTask">
+ <summary>
+ Executes the script block.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.Language">
+ <summary>
+ The language of the script block. Possible values are "VB", "vb", "VISUALBASIC", "C#", "c#", "CSHARP".
+ "JS", "js", "JSCRIPT" "VJS", "vjs", "JSHARP" or a fully-qualified name for a class implementing
+ <see cref="T:System.CodeDom.Compiler.CodeDomProvider" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.References">
+ <summary>
+ Any required references.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.MainClass">
+ <summary>
+ The name of the main class containing the static <c>ScriptMain</c>
+ entry point.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.Prefix">
+ <summary>
+ The namespace prefix for any custom functions defined in the script.
+ If ommitted the prefix will default to 'script'
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.Imports">
+ <summary>
+ The namespaces to import.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.ScriptTask.Code">
+ <summary>
+ The code to execute.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.VbcTask">
+ <summary>
+ Compiles Visual Basic.NET programs.
+ </summary>
+ <remarks>
+ <note>
+ In order to have <see cref="T:NAnt.DotNet.Tasks.VbcTask"/> generate manifest resource names
+ that match those generated by Microsoft Visual Studio.NET, the value of
+ the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.Prefix"/> attribute of the <<see cref="P:NAnt.DotNet.Tasks.CompilerBase.ResourcesList"/>>
+ element should match the "Root namespace" of the VB.NET project, and the
+ value of the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.DynamicPrefix"/> attribute
+ should be set to "<see langword="false"/>".
+ </note>
+ </remarks>
+ <example>
+ <para>Example build file using this task.</para>
+ <code>
+ <![CDATA[
+ <project name="Hello World" default="build" basedir=".">
+ <property name="basename" value="HelloWorld" />
+ <target name="clean">
+ <delete file="${basename}-vb.exe" failonerror="false" />
+ <delete file="${basename}-vb.pdb" failonerror="false" />
+ </target>
+ <target name="build">
+ <vbc target="exe" output="${basename}-vb.exe" rootnamespace="${basename}">
+ <imports>
+ <import namespace="System" />
+ <import namespace="System.Data" />
+ </imports>
+ <sources>
+ <include name="${basename}.vb" />
+ </sources>
+ <resources prefix="${basename}" dynamicprefix="true">
+ <include name="**/*.resx" />
+ </resources>
+ <references>
+ <include name="System.dll" />
+ <include name="System.Data.dll" />
+ </references>
+ </vbc>
+ </target>
+ <target name="rebuild" depends="clean, build" />
+ </project>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VbcTask.GetResourceLinkage(System.String,System.Globalization.CultureInfo)">
+ <summary>
+ Finds the correct namespace/classname for a resource file from the
+ given dependent source file, and ensure the <see cref="P:NAnt.DotNet.Tasks.VbcTask.RootNamespace"/>
+ is prefixed.
+ </summary>
+ <param name="dependentFile">The file from which the resource linkage of the resource file should be determined.</param>
+ <param name="resourceCulture">The culture of the resource file for which the resource linkage should be determined.</param>
+ <returns>
+ The namespace/classname of the source file matching the resource or
+ <see langword="null"/> if the dependent source file does not exist.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VbcTask.WriteConditionalCompilationConstants(System.IO.TextWriter)">
+ <summary>
+ Writes conditional compilation constants to the specified
+ <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the conditional compilation constants should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VbcTask.WriteOptions(System.IO.TextWriter)">
+ <summary>
+ Writes the compiler options to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VbcTask.NeedsCompiling">
+ <summary>
+ Determines whether compilation is needed.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.BaseAddress">
+ <summary>
+ The preferred base address at which to load a DLL. The default base
+ address for a DLL is set by the .NET Framework common language
+ runtime.
+ </summary>
+ <value>
+ The preferred base address at which to load a DLL.
+ </value>
+ <remarks>
+ This address must be specified as a hexadecimal number.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.DebugOutput">
+ <summary>
+ Specifies the type of debugging information generated by the
+ compiler. The default is <see cref="T:NAnt.DotNet.Types.DebugOutput.None" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.Debug">
+ <summary>
+ No longer expose this to build authors. Use <see cref="P:NAnt.DotNet.Tasks.VbcTask.DebugOutput"/>
+ instead.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.DocFile">
+ <summary>
+ The name of the XML documentation file to generate. Only supported
+ when targeting .NET 2.0 (or higher).
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/doc:</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.ImportsString">
+ <summary>
+ Specifies whether the <c>/imports</c> option gets passed to the
+ compiler.
+ </summary>
+ <value>
+ The value of this attribute is a string that contains one or more
+ namespaces separated by commas.
+ </value>
+ <remarks>
+ <a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfImportImportNamespaceFromSpecifiedAssembly.htm">See the Microsoft.NET Framework SDK documentation for details.</a>
+ </remarks>
+ <example>Example of an imports attribute
+ <code><![CDATA[imports="Microsoft.VisualBasic, System, System.Collections, System.Data, System.Diagnostics"]]></code>
+ </example>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.Imports">
+ <summary>
+ The namespaces to import.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.NoStdLib">
+ <summary>
+ Instructs the compiler not to reference standard libraries
+ (system.dll and VBC.RSP). The default is <see langword="false" />.
+ Only supported when targeting .NET 2.0 (or higher).
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/nostdlib</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.OptionCompare">
+ <summary>
+ Specifies whether <c>/optioncompare</c> option gets passed to the
+ compiler.
+ </summary>
+ <value>
+ <c>text</c>, <c>binary</c>, or an empty string. If the value is
+ <see langword="false" /> or an empty string, the option will not be
+ passed to the compiler.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfOptioncompareSpecifyHowStringsAreCompared.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.OptionExplicit">
+ <summary>
+ Specifies whether the <c>/optionexplicit</c> option gets passed to
+ the compiler. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the option should be passed to the compiler;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfOptionexplicitRequireExplicitDeclarationOfVariables.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.OptionOptimize">
+ <summary>
+ Specifies whether the <c>/optimize</c> option gets passed to the
+ compiler. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the option should be passed to the compiler;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfoptimizeenabledisableoptimizations.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.OptionStrict">
+ <summary>
+ Specifies whether the <c>/optionstrict</c> option gets passed to
+ the compiler. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the option should be passed to the compiler;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfOptionstrictEnforceStrictTypeSemantics.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.Platform">
+ <summary>
+ Specifies which platform version of common language runtime (CLR)
+ can run the output file.
+ </summary>
+ <value>
+ The platform version of common language runtime (CLR) that can run
+ the output file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/platform</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.RemoveIntChecks">
+ <summary>
+ Specifies whether the <c>/removeintchecks</c> option gets passed to
+ the compiler. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the option should be passed to the compiler;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfRemoveintchecksRemoveInteger-OverflowChecks.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.RootNamespace">
+ <summary>
+ Specifies whether the <c>/rootnamespace</c> option gets passed to
+ the compiler.
+ </summary>
+ <value>
+ The value of this attribute is a string that contains the root
+ namespace of the project.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfRootnamespace.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.SupportsDocGeneration">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports generation of XML Documentation file. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.SupportsNoStdLib">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports NOT referencing standard libraries (system.dll and VBC.RSP).
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.SupportsPlatform">
+ <summary>
+ Specifies whether the compiler for the active target framework
+ supports limiting the platform on which the compiled code can run.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.Extension">
+ <summary>
+ Gets the file extension required by the current compiler.
+ </summary>
+ <value>
+ For the VB.NET compiler, the file extension is always <c>vb</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.ClassNameRegex">
+ <summary>
+ Gets the class name regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Class name regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VbcTask.NamespaceRegex">
+ <summary>
+ Gets the namespace regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Namespace regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Tasks.VjcTask">
+ <summary>
+ Compiles Visual J# programs using vjc, Microsoft's J# compiler.
+ </summary>
+ <remarks>
+ <note>
+ In order to have <see cref="T:NAnt.DotNet.Tasks.VjcTask"/> generate manifest resource names
+ that match those generated by Microsoft Visual Studio.NET, the value of
+ the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.Prefix"/> attribute of the <<see cref="P:NAnt.DotNet.Tasks.CompilerBase.ResourcesList"/>>
+ element should match the "Default Package" of the J#.NET project, and
+ the value of the <see cref="P:NAnt.DotNet.Types.ResourceFileSet.DynamicPrefix"/> attribute
+ should be set to "<see langword="true"/>".
+ </note>
+ </remarks>
+ <example>
+ <para>Compile a "HelloWorld" application, including embedded resources.</para>
+ <code>
+ <![CDATA[
+ <vjc target="exe" output="helloworld.exe" debug="true">
+ <sources>
+ <include name="helloworld.jsl" />
+ </sources>
+ <resources prefix="HelloWorld" dynamicprefix="true">
+ <include name="**/*.resx" />
+ </resources>
+ <references>
+ <include name="System.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Xml.dll" />
+ </references>
+ </vjc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VjcTask.WriteModuleReferences(System.IO.TextWriter)">
+ <summary>
+ Writes module references to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer">The <see cref="T:System.IO.TextWriter"/> to which the module references should be written.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Tasks.VjcTask.WriteOptions(System.IO.TextWriter)">
+ <summary>
+ Writes the compiler options to the specified <see cref="T:System.IO.TextWriter"/>.
+ </summary>
+ <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the compiler options should be written.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.BaseAddress">
+ <summary>
+ The preferred base address at which to load a DLL. The default base
+ address for a DLL is set by the .NET Framework common language
+ runtime.
+ </summary>
+ <value>
+ The preferred base address at which to load a DLL.
+ </value>
+ <remarks>
+ This address can be specified as a decimal, hexadecimal, or octal
+ number.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.DebugOutput">
+ <summary>
+ Specifies the type of debugging information generated by the
+ compiler. The default is <see cref="T:NAnt.DotNet.Types.DebugOutput.None" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Debug">
+ <summary>
+ No longer expose this to build authors. Use <see cref="P:NAnt.DotNet.Tasks.VjcTask.DebugOutput"/>
+ instead.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.SecureScoping">
+ <summary>
+ Specifies whether package-scoped members are accessible outside of
+ the assembly. In other words, package scope is treated as assembly
+ scope when emitting metadata. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the option should be passed to the compiler;
+ otherwise, <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/securescoping</c> flag.
+ </para>
+ <para>
+ <a href="ms-help://MS.VSCC/MS.VJSharp/dv_vjsharp/html/vjgrfsecurescopingmakepackage-scopedmembersinaccessibleoutsideassembly.htm">See the Visual J# Reference for details.</a>
+ </para>
+ </remarks>
+ <example>
+ <code><![CDATA[<vjc securescoping='true'/>]]></code>
+ </example>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.X">
+ <summary>
+ Specifies whether to disable language extensions.
+ </summary>
+ <value>
+ The value of this property must be either <c>all</c>, <c>net</c>,
+ or an empty string.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/x</c> flag.
+ </para>
+ <para>
+ <a href="ms-help://MS.VSCC/MS.VJSharp/dv_vjsharp/html/vjgrfxdisablelanguageextensions.htm">See the Visual J# Reference for details.</a>
+ </para>
+ </remarks>
+ <example>
+ <para>To disable only the .NET Framework extensions:<c><![CDATA[
+ <vjc x='net'/>
+ ]]></c></para>
+ <para>To disable the .NET Framework extensions and the VJ++ 6.0 extensions:<c><![CDATA[
+ <vjc x='all'/>
+ ]]></c></para>
+ </example>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.LibPath">
+ <summary>
+ Specifies the location of assemblies referenced by way of the <c>/reference</c> flag.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds to the <c>/libpath:dir[;dir2]</c> flag.
+ </para>
+ <para>
+ <a href="ms-help://MS.VSCC/MS.VJSharp/dv_vjsharp/html/vjgrflibpathspecifyassemblyreferencelocations.htm">See the Visual J# Reference for details.</a>
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Jcpa">
+ <summary>
+ Associate Java-language/COM package names.
+ </summary>
+ <value>
+ The value of this propery. must be <c>package=namespace</c>, <c>@filename</c>,
+ or an empty string.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/jcpa:package=namespace</c> and <c>/jcpa:@filename</c> flags.
+ </para>
+ <para>
+ <a href="ms-help://MS.VSCC/MS.VJSharp/dv_vjsharp/html/vjgrfjcpaassociatejava-compackages.htm">See the Visual J# Reference for details.</a>
+ </para>
+ </remarks>
+ <example>
+ <para>Map package 'x' to namespace 'y':<c><![CDATA[
+ <vjc jcpa='x=y'/>
+ ]]></c></para>
+ </example>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Codepage">
+ <summary>
+ Specifies the code page to use for all source code files in the
+ compilation.
+ </summary>
+ <remarks>
+ <para>
+ Corresponds with the <c>/codepage</c> flag.
+ </para>
+ <para>
+ <a href="ms-help://MS.VSCC/MS.VJSharp/dv_vjsharp/html/vjlrfcodepagespecifycodepageforsourcecodefiles.htm">See the Visual J# Reference for details.</a>
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.WarningLevel">
+ <summary>
+ Specifies the warning level for the compiler to display. Valid values
+ are <c>0</c>-<c>4</c>. The default is <c>4</c>.
+ </summary>
+ <value>
+ The warning level for the compiler to display.
+ </value>
+ <remarks>
+ <para>
+ Corresponds with the <c>/warn</c> option.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.WarningAsError">
+ <summary>
+ Controls which warnings should be reported as errors.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the Visual J#
+ compiler does not allow control over which warnings should be
+ reported as errors.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Packages">
+ <summary>
+ Reference packages
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the Visual J#
+ compiler does not support package references.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Modules">
+ <summary>
+ Link the specified modules into this assembly.
+ </summary>
+ <remarks>
+ Override to avoid exposing this to build authors, as the Visual J#
+ compiler does not support linking modules.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.Extension">
+ <summary>
+ Gets the file extension required by the current compiler.
+ </summary>
+ <value>
+ For the J# compiler, the file extension is always <c>jsl</c>.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.ClassNameRegex">
+ <summary>
+ Gets the class name regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Class name regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.NamespaceRegex">
+ <summary>
+ Gets the namespace regular expression for the language of the
+ current compiler.
+ </summary>
+ <value>
+ Namespace regular expression for the language of the current
+ compiler.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Tasks.VjcTask.SupportsPackageReferences">
+ <summary>
+ Override to avoid exposing the configuration setting for this
+ task as Visual J# will never support package references.
+ </summary>
+ <value>
+ <see langword="false" />, as the Visual J# compiler will never
+ support package references.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Types.AssemblyAttribute">
+ <summary>
+ Represents an assembly-level attribute.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttribute.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/>
+ class.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttribute.TypeName">
+ <summary>
+ Typename of the assembly-level attribute.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttribute.Value">
+ <summary>
+ Value of the attribute.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttribute.AsIs">
+ <summary>
+ If <see langword="true" /> then the value of the attribute will be
+ set as is, without actually looking for a matching constructor or
+ named properties. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the value of the attribute should be set
+ as is; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttribute.IfDefined">
+ <summary>
+ Indicates if the attribute should be generated.
+ </summary>
+ <value>
+ <see langword="true" /> if the attribute should be generated;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttribute.UnlessDefined">
+ <summary>
+ Indicates if the attribute should be not generated.
+ </summary>
+ <value>
+ <see langword="true" /> if the attribute should be not generated;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Types.AssemblyAttributeCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/>
+ objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.#ctor(NAnt.DotNet.Types.AssemblyAttributeCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.#ctor(NAnt.DotNet.Types.AssemblyAttribute[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> class
+ with the specified array of <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.Add(NAnt.DotNet.Types.AssemblyAttribute)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.AddRange(NAnt.DotNet.Types.AssemblyAttribute[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.AddRange(NAnt.DotNet.Types.AssemblyAttributeCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.Contains(NAnt.DotNet.Types.AssemblyAttribute)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> with
+ value <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.CopyTo(NAnt.DotNet.Types.AssemblyAttribute[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.IndexOf(NAnt.DotNet.Types.AssemblyAttribute)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/>. If the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.Insert(System.Int32,NAnt.DotNet.Types.AssemblyAttribute)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.AssemblyAttributeEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeCollection.Remove(NAnt.DotNet.Types.AssemblyAttribute)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttributeCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttributeCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> with the specified value.
+ </summary>
+ <param name="value">The value of the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> to get.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.AssemblyAttributeEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.AssemblyAttribute"/> elements of a <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeEnumerator.#ctor(NAnt.DotNet.Types.AssemblyAttributeCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyAttributeEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.AssemblyAttributeCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyAttributeEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyAttributeEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.LibDirectorySet">
+ <summary>
+ A specialized <see cref="T:NAnt.Core.Types.FileSet"/> used for setting the lib directories.
+ </summary>
+ <remarks>
+ The primary reason for this class is to allow the <see cref="P:NAnt.DotNet.Types.LibDirectorySet.BaseDirectory"/>
+ to always be the same value as the parent <see cref="T:NAnt.DotNet.Types.AssemblyFileSet"/>
+ </remarks>
+ <seealso cref="T:NAnt.Core.Types.FileSet"/>
+ </member>
+ <member name="M:NAnt.DotNet.Types.LibDirectorySet.#ctor(NAnt.DotNet.Types.AssemblyFileSet)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.LibDirectorySet"/> class.
+ </summary>
+ <param name="parent"></param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.LibDirectorySet.BaseDirectory">
+ <summary>
+ override this. We will always use the base directory of the parent.
+ overriding without the TaskAttribute attribute prevents it being set
+ in the source xml
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.AssemblyFileSet">
+ <summary>
+ Specialized <see cref="T:NAnt.Core.Types.FileSet"/> class for managing assembly files.
+ </summary>
+ <remarks>
+ <para>
+ If an include pattern does not contain any wildcard characters then
+ the assembly will be searched for in following locations (in the order listed):
+ </para>
+ <list type="bullet">
+ <item>
+ <description>
+ The base directory of the fileset.
+ </description>
+ </item>
+ <item>
+ <description>
+ The directories specified using the nested <lib> element.
+ </description>
+ </item>
+ <item>
+ <description>
+ The list of reference assemblies of the current target framework.
+ </description>
+ </item>
+ </list>
+ <para>
+ The reference assemblies of a given target framework are defined using
+ <reference-assemblies> filesets in the <framework> node
+ of the NAnt configuration file.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Define a reference with name "sys.assemblies", holding
+ a set of system assemblies.
+ </para>
+ <code>
+ <![CDATA[
+ <assemblyfileset id="sys.assemblies">
+ <include name="System.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Xml.dll" />
+ </assemblyfileset>
+ ]]>
+ </code>
+ <para>
+ Use the predefined set of assemblies to compile a C# assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <csc target="exe" output="HelloWorld.exe">
+ <sources>
+ <include name="**/*.cs" />
+ </sources>
+ <references refid="sys.assemblies" />
+ </csc>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compile a C# assembly using assembly references that are searched for
+ in the "Third Party Assemblies" and "Company Assemblies"
+ directories.
+ </para>
+ <code>
+ <![CDATA[
+ <csc target="exe" output="HelloWorld.exe">
+ <sources>
+ <include name="**/*.cs" />
+ </sources>
+ <references>
+ <lib>
+ <include name="Third Party Assemblies" />
+ <include name="Company Assemblies" />
+ </lib>
+ <include name="log4net.dll" />
+ <include name="Company.Business.dll" />
+ </references>
+ </csc>
+ ]]>
+ </code>
+ </example>
+ <seealso cref="T:NAnt.Core.Types.FileSet"/>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyFileSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.AssemblyFileSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyFileSet.#ctor(NAnt.Core.Types.FileSet)">
+ <summary>
+ copy constructor for FileSet. Required in order to
+ assign references of FileSet type where
+ AssemblyFileSets are used
+ </summary>
+ <param name="fs"></param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyFileSet.Scan">
+ <summary>
+ Do a normal scan and then resolve assemblies.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.AssemblyFileSet.ResolveReferences">
+ <summary>
+ Resolves references to system assemblies and assemblies that can be
+ resolved using directories specified in <see cref="P:NAnt.DotNet.Types.AssemblyFileSet.Lib"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.AssemblyFileSet.Lib">
+ <summary>
+ Additional directories to search in for assembly references.
+ </summary>
+ <remarks>
+ <para>
+ loosely Corresponds with the <c>/lib[path]:</c> flag of the various compiler tasks.
+ </para>
+ </remarks>
+ </member>
+ <member name="T:NAnt.DotNet.Types.CompilerWarning">
+ <summary>
+ Represents a compiler warning.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.CompilerWarning.Number">
+ <summary>
+ A warning number, or comma-separated list of warnings, that you want
+ the compiler to suppress or report.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.CompilerWarning.IfDefined">
+ <summary>
+ If <see langword="true" /> then the element will be processed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.CompilerWarning.UnlessDefined">
+ <summary>
+ If <see langword="true" /> then the element will be skipped;
+ otherwise, processed. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.CompilerWarningCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.#ctor(NAnt.DotNet.Types.CompilerWarningCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.#ctor(NAnt.DotNet.Types.CompilerWarning[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> class
+ with the specified array of <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.Add(NAnt.DotNet.Types.CompilerWarning)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.AddRange(NAnt.DotNet.Types.CompilerWarning[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.AddRange(NAnt.DotNet.Types.CompilerWarningCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.Contains(NAnt.DotNet.Types.CompilerWarning)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.CopyTo(NAnt.DotNet.Types.CompilerWarning[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.IndexOf(NAnt.DotNet.Types.CompilerWarning)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.DotNet.Types.CompilerWarning"/>. If the <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.Insert(System.Int32,NAnt.DotNet.Types.CompilerWarning)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.CompilerWarningEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningCollection.Remove(NAnt.DotNet.Types.CompilerWarning)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.CompilerWarningCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.CompilerWarningEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.CompilerWarning"/> elements of a <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningEnumerator.#ctor(NAnt.DotNet.Types.CompilerWarningCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.CompilerWarningEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.CompilerWarningCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.CompilerWarningEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.CompilerWarningEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.DebugOutput">
+ <summary>
+ Specifies the type of debugging information generated by the compiler.
+ </summary>
+ <remarks>
+ <para>
+ For backward compatibility, the following string values can also be
+ used in build files:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Value</term>
+ <description>Corresponding field</description>
+ </listheader>
+ <item>
+ <term>"true"</term>
+ <description><see cref="F:NAnt.DotNet.Types.DebugOutput.Enable"/></description>
+ </item>
+ <item>
+ <term>"false"</term>
+ <description><see cref="F:NAnt.DotNet.Types.DebugOutput.None"/></description>
+ </item>
+ </list>
+ <para>
+ When set to <see langword="Enabled"/> then the following conditional
+ compilation symbols will also be defined:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>DEBUG</description>
+ </item>
+ <item>
+ <description>TRACE</description>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DebugOutput.None">
+ <summary>
+ Create no debug information.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DebugOutput.Enable">
+ <summary>
+ Enable attaching a debugger to the running program.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DebugOutput.Full">
+ <summary>
+ Enable attaching a debugger to the running program.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DebugOutput.PdbOnly">
+ <summary>
+ Only display assembler when the running program is attached to the
+ debugger.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.DebugOutputConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> that also supports
+ case-insensitive conversion of "true" to
+ <see cref="F:NAnt.DotNet.Types.DebugOutput.Enable"/> and "false" to
+ <see cref="F:NAnt.DotNet.Types.DebugOutput.None"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DebugOutputConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.DebugOutputConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DebugOutputConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.DelaySign">
+ <summary>
+ Specifies whether the generated assembly is strongly named and will
+ be signed later.
+ </summary>
+ <remarks>
+ <para>
+ For backward compatibility, the following string values can also be
+ used in build files:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Value</term>
+ <description>Corresponding field</description>
+ </listheader>
+ <item>
+ <term>"true"</term>
+ <description><see cref="F:NAnt.DotNet.Types.DelaySign.Yes"/></description>
+ </item>
+ <item>
+ <term>"false"</term>
+ <description><see cref="F:NAnt.DotNet.Types.DelaySign.No"/></description>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DelaySign.NotSet">
+ <summary>
+ Not specified.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DelaySign.No">
+ <summary>
+ Fully sign the assembly.
+ </summary>
+ </member>
+ <member name="F:NAnt.DotNet.Types.DelaySign.Yes">
+ <summary>
+ Only place the public key in the assembly, allowing the signature
+ to be added later.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.DelaySignConverter">
+ <summary>
+ Specialized <see cref="T:System.ComponentModel.EnumConverter"/> that also supports
+ case-insensitive conversion of "true" to
+ <see cref="F:NAnt.DotNet.Types.DelaySign.Yes"/> and "false" to
+ <see cref="F:NAnt.DotNet.Types.DelaySign.No"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DelaySignConverter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.DelaySignConverter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DelaySignConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)">
+ <summary>
+ Converts the given object to the type of this converter, using the
+ specified context and culture information.
+ </summary>
+ <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"/> that provides a format context.</param>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/> object. If a <see langword="null"/> is passed, the current culture is assumed.</param>
+ <param name="value">The <see cref="T:System.Object"/> to convert.</param>
+ <returns>
+ An <see cref="T:System.Object"/> that represents the converted value.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.EmbeddedResource">
+ <summary>
+ Represents an embedded resource.
+ </summary>
+ <remarks>
+ Do not yet expose this to build authors.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResource.#ctor(System.String,System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/>
+ with the specified file name and manifest resource name.
+ </summary>
+ <param name="file">The path of the compiled resource.</param>
+ <param name="manifestResourceName">The manifest resource name of the embedded resource.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResource.File">
+ <summary>
+ Gets the physical location of the resource to embed.
+ </summary>
+ <value>
+ The physical location of the resource to embed.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResource.ManifestResourceName">
+ <summary>
+ Gets the manifest resource name to use when embedding the resource.
+ </summary>
+ <value>
+ The manifest resource name to use when embedding the resource.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Types.EmbeddedResourceCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> items.
+ </summary>
+ <remarks>
+ Do not yet expose this to build authors.
+ </remarks>
+ </member>
+ <member name="T:NAnt.DotNet.Types.DataTypeCollectionBase">
+ <summary>
+ Base class for collections that needs to be globally referencable.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.DataTypeCollectionBase"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.CopyTo(System.Array,System.Int32)">
+ <summary>
+ Copies the items of the collection to an <see cref="T:System.Array"/>,
+ starting at a particular index.
+ </summary>
+ <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the items copied from the collection. The <see cref="T:System.Array"/> must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.System#Collections#IEnumerable#GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through a collection.
+ </summary>
+ <returns>
+ An <see cref="T:System.Collections.IEnumerator"/> that can be used to iterate through
+ the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.RemoveAt(System.Int32)">
+ <summary>
+ Removes an item at a specific index.
+ </summary>
+ <param name="index">The zero-based index of the item to remove.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.Clear">
+ <summary>
+ Removes all items from the collection.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.ValidateType(System.Object)">
+ <summary>
+ Used by methods that take <see cref="T:System.Object"/> instances as argument
+ to verify whether the instance is valid for the collection class.
+ </summary>
+ <param name="value">The instance to verify.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.DataTypeCollectionBase.RangeCheck(System.Int32)">
+ <summary>
+ Checks whether the specified index is within the range of this
+ collection.
+ </summary>
+ <param name="index">The index to check.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.System#Collections#ICollection#IsSynchronized">
+ <summary>
+ Gets a value indicating whether access to the collection is
+ synchronized (thread-safe).
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.Count">
+ <summary>
+ Gets the number of items in the collection.
+ </summary>
+ <value>
+ The number of items in the collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.System#Collections#ICollection#SyncRoot">
+ <summary>
+ Gets an object that can be used to synchronize access to the
+ collection.
+ </summary>
+ <value>
+ An object that can be used to synchronize access to the collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.IsFixedSize">
+ <summary>
+ Gets a value indicating whether the collection has a fixed size.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.IsReadOnly">
+ <summary>
+ Gets a value indicating whether the collection has a fixed size.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.List">
+ <summary>
+ Gets the list of elements contained in the
+ <see cref="T:NAnt.DotNet.Types.DataTypeCollectionBase"/> instance.
+ </summary>
+ <value>
+ An <see cref="T:System.Collections.ArrayList"/> containing the elements of the
+ collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.DataTypeCollectionBase.ItemType">
+ <summary>
+ Gets the <see cref="T:System.Type"/> of the items in this collection.
+ </summary>
+ <value>
+ The <see cref="T:System.Type"/> of the items in this collection.
+ </value>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.EmbeddedResourceEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#Insert(System.Int32,System.Object)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#Remove(System.Object)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#Contains(System.Object)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#IndexOf(System.Object)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#Add(System.Object)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.AddRange(NAnt.DotNet.Types.EmbeddedResourceCollection)">
+ <summary>
+ Adds the items of a <see cref="T:NAnt.DotNet.Types.EmbeddedResourceCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.EmbeddedResourceCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.Add(NAnt.DotNet.Types.EmbeddedResource)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.Insert(System.Int32,NAnt.DotNet.Types.EmbeddedResource)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.Remove(NAnt.DotNet.Types.EmbeddedResource)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.Contains(NAnt.DotNet.Types.EmbeddedResource)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceCollection.IndexOf(NAnt.DotNet.Types.EmbeddedResource)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> with the specified manifest
+ resource name.
+ </summary>
+ <param name="value">The manifest resource name of the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> to get.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceCollection.ItemType">
+ <summary>
+ Gets the <see cref="T:System.Type"/> of the items in this collection.
+ </summary>
+ <value>
+ The <see cref="T:System.Type"/> of the items in this collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceCollection.System#Collections#IList#Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.EmbeddedResourceEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.EmbeddedResource"/> items of a <see cref="T:NAnt.DotNet.Types.EmbeddedResourceCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceEnumerator.#ctor(NAnt.DotNet.Types.EmbeddedResourceCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.EmbeddedResourceEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.EmbeddedResourceCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next item of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next item; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.EmbeddedResourceEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first item in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceEnumerator.Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Types.EmbeddedResourceEnumerator.System#Collections#IEnumerator#Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.Module">
+ <summary>
+ Represents a metadata file without assembly manifest.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.Module.ToString">
+ <summary>
+ Returns a textual representation of the module, which can be used as
+ argument for command-line tools.
+ </summary>
+ <returns>
+ A textual representation of the path, file[,target].
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Module.File">
+ <summary>
+ The path of the module.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Module.Target">
+ <summary>
+ File name where the module should be copied to before it is compiled
+ into an assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Module.ModuleSet">
+ <summary>
+ Gets or sets the <see cref="P:NAnt.DotNet.Types.Module.ModuleSet"/> that contains the module.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ModuleCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.DotNet.Types.Module"/> items.
+ </summary>
+ <remarks>
+ Do not yet expose this to build authors.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.#ctor(NAnt.DotNet.Types.ModuleSet)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>
+ for the specified <see cref="T:NAnt.DotNet.Types.ModuleSet"/>.
+ </summary>
+ <param name="moduleSet">The <see cref="T:NAnt.DotNet.Types.ModuleSet"/> containing the collection.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="moduleSet"/> is <see langword="true"/>.</exception>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IEnumerable#GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.ModuleEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.CopyTo(System.Array,System.Int32)">
+ <summary>
+ Copies the items of the collection to an <see cref="T:System.Array"/>,
+ starting at a particular index.
+ </summary>
+ <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the items copied from the collection. The <see cref="T:System.Array"/> must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.Clear">
+ <summary>
+ Removes all items from the collection.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#Insert(System.Int32,System.Object)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.Module"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#Remove(System.Object)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.Module"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.RemoveAt(System.Int32)">
+ <summary>
+ Removes an item at a specific index.
+ </summary>
+ <param name="index">The zero-based index of the item to remove.</param>
+ <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index"/> parameter is less than 0 or greater than or equal to the value of the <see cref="P:NAnt.DotNet.Types.ModuleCollection.Count"/> property of the <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>.</exception>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#Contains(System.Object)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.Module"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#IndexOf(System.Object)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.Module"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.Module"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.Module"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#Add(System.Object)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.Module"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.AddRange(NAnt.DotNet.Types.ModuleCollection)">
+ <summary>
+ Adds the items of a <see cref="T:NAnt.DotNet.Types.ModuleCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.ModuleCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.Add(NAnt.DotNet.Types.Module)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.Module"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.ModuleEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.Insert(System.Int32,NAnt.DotNet.Types.Module)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.Module"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.Remove(NAnt.DotNet.Types.Module)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.Module"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.Contains(NAnt.DotNet.Types.Module)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.Module"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleCollection.IndexOf(NAnt.DotNet.Types.Module)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.Module"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.Module"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.Module"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.Module"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index"/> parameter is less than 0 or greater than or equal to the value of the <see cref="P:NAnt.DotNet.Types.ModuleCollection.Count"/> property of the <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>.</exception>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.List">
+ <summary>
+ Gets the list of elements contained in the
+ <see cref="T:NAnt.DotNet.Types.ModuleCollection"/> instance.
+ </summary>
+ <value>
+ An <see cref="T:System.Collections.ArrayList"/> containing the elements of the
+ collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.System#Collections#ICollection#IsSynchronized">
+ <summary>
+ Gets a value indicating whether access to the collection is
+ synchronized (thread-safe).
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.Count">
+ <summary>
+ Gets the number of items in the collection.
+ </summary>
+ <value>
+ The number of items in the collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.System#Collections#ICollection#SyncRoot">
+ <summary>
+ Gets an object that can be used to synchronize access to the
+ collection.
+ </summary>
+ <value>
+ An object that can be used to synchronize access to the collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.IsFixedSize">
+ <summary>
+ Gets a value indicating whether the collection has a fixed size.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.IsReadOnly">
+ <summary>
+ Gets a value indicating whether the collection has a fixed size.
+ </summary>
+ <value>
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleCollection.System#Collections#IList#Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index"/> parameter is less than 0 or greater than or equal to the value of the <see cref="P:NAnt.DotNet.Types.ModuleCollection.Count"/> property of the <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>.</exception>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ModuleEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.Module"/> items of a <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleEnumerator.#ctor(NAnt.DotNet.Types.ModuleCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ModuleEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.ModuleCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next item of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next item; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first item in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleEnumerator.Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleEnumerator.System#Collections#IEnumerator#Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ModuleSet">
+ <summary>
+ <para>
+ One or more modules to compile into an assembly.
+ </para>
+ </summary>
+ <example>
+ <para>
+ Define a global <c><moduleset></c> that can be referenced by
+ other tasks or types.
+ </para>
+ <code>
+ <![CDATA[
+ <moduleset id="client-modules" dir="${build}">
+ <module file="Client.netmodule" />
+ <module file="Common.netmodule" />
+ </moduleset>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ModuleSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ModuleSet"/> class.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleSet.Dir">
+ <summary>
+ The base of the directory of this <see cref="T:NAnt.DotNet.Types.ModuleSet"/>.
+ The default is the project base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ModuleSet.Modules">
+ <summary>
+ The modules to add to this <see cref="T:NAnt.DotNet.Types.ModuleSet"/>.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.NamespaceImport">
+ <summary>
+ Represents a namespace to import.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImport.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImport.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/>
+ class for the specified namespace.
+ </summary>
+ <param name="nameSpace">The namespace.</param>
+ <exception cref="T:System.ArgumentNullException"><paramref name="nameSpace"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImport.TempName">
+ <summary>
+ The name of the namespace to import.
+ </summary>
+ <value>
+ The name of the namespace to import.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImport.Namespace">
+ <summary>
+ The name of the namespace to import.
+ </summary>
+ <value>
+ The name of the namespace to import.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImport.IfDefined">
+ <summary>
+ Indicates if the import should be generated.
+ </summary>
+ <value>
+ <see langword="true" /> if the import should be generated; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImport.UnlessDefined">
+ <summary>
+ Indicates if the import should be not generated.
+ </summary>
+ <value>
+ <see langword="true" /> if the import should be not generated;
+ otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Types.NamespaceImportCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> items.
+ </summary>
+ <example>
+ <para>Define a reference with name "system.imports".</para>
+ <code>
+ <![CDATA[
+ <namespaceimports id="system.imports">
+ <import namespace="System" />
+ <import namespace="System.Data" />
+ </namespaceimports>
+ ]]>
+ </code>
+ <para>Use the predefined set of imports to compile a VB.NET assembly.</para>
+ <code>
+ <![CDATA[
+ <vbc target="exe" output="HelloWorld.exe" rootnamespace="HelloWorld">
+ <imports refid="system.imports" />
+ <sources>
+ <include name="**/*.vb" />
+ </sources>
+ <references>
+ <include name="System.dll" />
+ <include name="System.Data.dll" />
+ </references>
+ </vbc>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.NamespaceImportEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.ToString">
+ <summary>
+ Returns a comma-delimited list of namespace imports.
+ </summary>
+ <returns>
+ A comma-delimited list of namespace imports, or an empty
+ <see cref="T:System.String"/> if there are no namespace imports.
+ </returns>
+ <remarks>
+ Each namespace import is quoted individually.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#Insert(System.Int32,System.Object)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#Remove(System.Object)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#Contains(System.Object)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#IndexOf(System.Object)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#Add(System.Object)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.AddRange(NAnt.DotNet.Types.NamespaceImportCollection)">
+ <summary>
+ Adds the items of a <see cref="T:NAnt.DotNet.Types.NamespaceImportCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.NamespaceImportCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.Add(NAnt.DotNet.Types.NamespaceImport)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to the end of the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new item was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.Insert(System.Int32,NAnt.DotNet.Types.NamespaceImport)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> into the collection at the
+ specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.Remove(NAnt.DotNet.Types.NamespaceImport)">
+ <summary>
+ Removes the specified <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> from the
+ collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.Contains(NAnt.DotNet.Types.NamespaceImport)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> is in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="value"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportCollection.IndexOf(NAnt.DotNet.Types.NamespaceImport)">
+ <summary>
+ Gets the location of a <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> in the collection.
+ </summary>
+ <param name="value">The <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> object to locate.</param>
+ <returns>
+ The zero-based location of the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> in the
+ collection.
+ </returns>
+ <remarks>
+ If the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> is not currently a member of
+ the collection, -1 is returned.
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> with the specified namespace.
+ </summary>
+ <param name="value">The namespace of the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> to get.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportCollection.ItemType">
+ <summary>
+ Gets the <see cref="T:System.Type"/> of the items in this collection.
+ </summary>
+ <value>
+ The <see cref="T:System.Type"/> of the items in this collection.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportCollection.System#Collections#IList#Item(System.Int32)">
+ <summary>
+ Gets or sets the item at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the item to get or set.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.NamespaceImportEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.NamespaceImport"/> items of a <see cref="T:NAnt.DotNet.Types.NamespaceImportCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportEnumerator.#ctor(NAnt.DotNet.Types.NamespaceImportCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.NamespaceImportEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.NamespaceImportCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next item of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next item; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.NamespaceImportEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first item in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportEnumerator.Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.DotNet.Types.NamespaceImportEnumerator.System#Collections#IEnumerator#Current">
+ <summary>
+ Gets the current item in the collection.
+ </summary>
+ <returns>
+ The current item in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.Package">
+ <summary>
+ Represents a package.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Package.PackageName">
+ <summary>
+ Name of the package to reference. Multiple package can be specified
+ with a single element as a semi-colon separated list of
+ package names.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Package.IfDefined">
+ <summary>
+ Indicates if the package should be passed to the task.
+ If <see langword="true" /> then the package will be passed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.Package.UnlessDefined">
+ <summary>
+ Indicates if the package should not be passed to the task.
+ If <see langword="false" /> then the package will be passed;
+ otherwise, skipped. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.DotNet.Types.PackageCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.DotNet.Types.Package"/>
+ objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.PackageCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.#ctor(NAnt.DotNet.Types.PackageCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.PackageCollection"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.PackageCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.#ctor(NAnt.DotNet.Types.Package[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.PackageCollection"/> class
+ with the specified array of <see cref="T:NAnt.DotNet.Types.Package"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.Add(NAnt.DotNet.Types.Package)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.Package"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.Package"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.AddRange(NAnt.DotNet.Types.Package[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.Package"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.DotNet.Types.Package"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.AddRange(NAnt.DotNet.Types.PackageCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.PackageCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.PackageCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.Contains(NAnt.DotNet.Types.Package)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.Package"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.Package"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.CopyTo(NAnt.DotNet.Types.Package[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.IndexOf(NAnt.DotNet.Types.Package)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.DotNet.Types.Package"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.Package"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.DotNet.Types.Package"/>. If the <see cref="T:NAnt.DotNet.Types.Package"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.Insert(System.Int32,NAnt.DotNet.Types.Package)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.Package"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.Package"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.PackageEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageCollection.Remove(NAnt.DotNet.Types.Package)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.Package"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.PackageCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.PackageEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.Package"/> elements of a <see cref="T:NAnt.DotNet.Types.PackageCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageEnumerator.#ctor(NAnt.DotNet.Types.PackageCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.PackageEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.PackageCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.PackageEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.PackageEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ResourceFileSet">
+ <summary>
+ Specialized <see cref="T:NAnt.Core.Types.FileSet"/> class for managing resource files.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSet.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSet.#ctor(NAnt.Core.Types.FileSet)">
+ <summary>
+ copy constructor for FileSet. Required in order to
+ assign references of FileSet type where
+ ResourceFileSet are used
+ </summary>
+ <param name="fs"></param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSet.Clone">
+ <summary>
+ Creates a shallow copy of the <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/>.
+ </summary>
+ <returns>
+ A shallow copy of the <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSet.GetManifestResourceName(System.String)">
+ <summary>
+ Gets the manifest resource name for the specified resource file.
+ </summary>
+ <param name="resourceFile">The physical path of the resource file.</param>
+ <returns>
+ The manifest resource name to be sent to the compiler.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSet.GetManifestResourceName(System.String,System.String)">
+ <summary>
+ Gets the manifest resource name for the file using both its physical
+ and logical path.
+ </summary>
+ <param name="physicalPath">The physical path of the resource file.</param>
+ <param name="logicalPath">The logical location of the resource file.</param>
+ <returns>
+ The manifest resource name to be sent to the compiler.
+ </returns>
+ <remarks>
+ We use the relative path of the logical path, but the filename and
+ and the extension of the physical path to match VS.NET
+ </remarks>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSet.Prefix">
+ <summary>
+ Indicates the prefix to prepend to the actual resource.
+ This is usually the default namspace of the assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSet.DynamicPrefix">
+ <summary>
+ Indicates whether prefixes should be dynamically generated by taking
+ the path of the resource relative to the basedir and appending it
+ to the specified prefix. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSet.ResxFiles">
+ <summary>
+ Gets a <see cref="T:NAnt.Core.Types.FileSet"/> containing all matching resx files.
+ </summary>
+ <value>
+ A <see cref="T:NAnt.Core.Types.FileSet"/> containing all matching resx files.
+ </value>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSet.NonResxFiles">
+ <summary>
+ Gets a <see cref="T:NAnt.Core.Types.FileSet"/> containing all matching non-resx
+ files.
+ </summary>
+ <value>
+ A <see cref="T:NAnt.Core.Types.FileSet"/> containing all matching non-resx files.
+ </value>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ResourceFileSetCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.#ctor(NAnt.DotNet.Types.ResourceFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.#ctor(NAnt.DotNet.Types.ResourceFileSet[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> class
+ with the specified array of <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.Add(NAnt.DotNet.Types.ResourceFileSet)">
+ <summary>
+ Adds a <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.AddRange(NAnt.DotNet.Types.ResourceFileSet[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.AddRange(NAnt.DotNet.Types.ResourceFileSetCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.Contains(NAnt.DotNet.Types.ResourceFileSet)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.CopyTo(NAnt.DotNet.Types.ResourceFileSet[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.IndexOf(NAnt.DotNet.Types.ResourceFileSet)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/>. If the <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.Insert(System.Int32,NAnt.DotNet.Types.ResourceFileSet)">
+ <summary>
+ Inserts a <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.DotNet.Types.ResourceFileSetEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetCollection.Remove(NAnt.DotNet.Types.ResourceFileSet)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSetCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.DotNet.Types.ResourceFileSetEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.DotNet.Types.ResourceFileSet"/> elements of a <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetEnumerator.#ctor(NAnt.DotNet.Types.ResourceFileSetCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.DotNet.Types.ResourceFileSetEnumerator"/> class
+ with the specified <see cref="T:NAnt.DotNet.Types.ResourceFileSetCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.DotNet.Types.ResourceFileSetEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.ResourceFileSetEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.DotNet.Types.WarningAsError">
+ <summary>
+ Controls the behaviour of a compiler with regards to the reporting of
+ warnings.
+ </summary>
+ <example>
+ <para>
+ Instruct a compiler to report warning 0519 as an error.
+ </para>
+ <code>
+ <![CDATA[
+ <warnaserror>
+ <include number="0519" />
+ </warnaserror>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Instruct a compiler not to report warning 0519 as an error, if the
+ <c>release</c> property is <see langword="true" />.
+ </para>
+ <code>
+ <![CDATA[
+ <warnaserror>
+ <exclude number="0519" if="${release}" />
+ </warnaserror>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.DotNet.Types.WarningAsError.Includes">
+ <summary>
+ Specifies a list of warnings that the compiler should treat as
+ errors. This overrides the <see cref="P:NAnt.DotNet.Tasks.CompilerBase.WarnAsError"/>
+ attribute. Only supported when targeting .NET 2.0 or higher.
+ </summary>
+ </member>
+ <member name="P:NAnt.DotNet.Types.WarningAsError.Excludes">
+ <summary>
+ Specifies a list of warnings that the compiler should NOT treat as
+ errors. This is only useful if <see cref="P:NAnt.DotNet.Tasks.CompilerBase.WarnAsError"/>
+ is <see langword="true"/>. Only supported when targeting .NET 2.0
+ or higher.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.MSNetTasks.xml b/external/guiunit/tools/nant/bin/NAnt.MSNetTasks.xml
new file mode 100755
index 0000000..9a442c6
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.MSNetTasks.xml
@@ -0,0 +1,579 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.MSNetTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.MSNet.Tasks.IldasmTask">
+ <summary>
+ Disassembles any portable executable (PE) file that contains
+ intermediate language (IL) code.
+ </summary>
+ <remarks>
+ <para>
+ Files are only disassembled if the input file is newer than the output
+ file, or if the output file does not exist. However, you can
+ explicitly force files to be disassembled with the
+ <see cref="P:NAnt.MSNet.Tasks.IldasmTask.ForceRebuild"/> attribute.
+ </para>
+ <para>
+ A <see cref="T:NAnt.Core.Types.FileSet"/> can be used to select files to disassemble.
+ To use a <see cref="T:NAnt.Core.Types.FileSet"/>, the <see cref="P:NAnt.MSNet.Tasks.IldasmTask.ToDirectory"/>
+ attribute must be set. The file name of the output file will be equal
+ to the file name of the input file, but with extension ".il".
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Disassembles <c>helloworld.exe</c> to <c>helloworld.il</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <ildasm input="helloworld.exe" output="helloworld.il" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Disassembles a set of PE files into the specified directory.
+ </para>
+ <code>
+ <![CDATA[
+ <ildasm todir=".">
+ <assemblies>
+ <include name="*.exe" />
+ <include name="*.dll" />
+ </assemblies>
+ </ildasm>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.Initialize">
+ <summary>
+ Checks whether the task is initialized with valid attributes.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.ExecuteTask">
+ <summary>
+ Disassembles the PE file(s).
+ </summary>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.DisassemblyFile(System.IO.FileInfo)">
+ <summary>
+ Disassembles the specified PE file.
+ </summary>
+ <param name="inputFile">The PE file to disassemble.</param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.GetOutputFile(System.IO.FileInfo)">
+ <summary>
+ Determines the full path and extension for the output file.
+ </summary>
+ <param name="inputFile">
+ A <see cref="T:System.IO.FileInfo"/> that represents the PE file
+ file for which the corresponding output file should be determined.
+ </param>
+ <returns>
+ A <see cref="T:System.IO.FileInfo"/> that represents the full path
+ for the output file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">The path of the output file could not be determined.</exception>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.WriteOptions(System.IO.FileInfo,System.IO.FileInfo)">
+ <summary>
+ Writes the disassembler options.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.WriteOption(System.IO.StringWriter,System.String)">
+ <summary>
+ Writes an option using the default output format.
+ </summary>
+ <param name="writer">
+ The <see cref="T:System.IO.StringWriter"/> to which the disassembler options
+ should be written.
+ </param>
+ <param name="name">
+ A <see cref="T:System.String"/> that contains the name of the
+ option which should be passed to the disassembler.
+ </param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.WriteOption(System.IO.StringWriter,System.String,System.String)">
+ <summary>
+ Writes an option and its value using the default output format.
+ </summary>
+ <param name="writer">
+ The <see cref="T:System.IO.StringWriter"/> to which the disassembler options
+ should be written.
+ </param>
+ <param name="name">
+ A <see cref="T:System.String"/> that contains the name of the
+ option which should be passed to the disassembler.
+ </param>
+ <param name="arg">
+ A <see cref="T:System.String"/> that contains the value of the
+ option which should be passed to the disassembler.
+ </param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.IldasmTask.NeedsDisassembling(System.IO.FileInfo,System.IO.FileInfo)">
+ <summary>
+ Determines whether or not disassembling is needed.
+ </summary>
+ <returns>
+ <see langword="true" /> if disassembling is needed; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.All">
+ <summary>
+ Specifies whether or not the disassembler should combine the
+ <c>/HEADER</c>, <c>/BYTE</c>, and <c>/TOKENS</c> options. The default
+ is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the disassembler should combine the
+ <c>/HEADER</c>, <c>/BYTE</c>, and <c>/TOKENS</c> options;
+ otherwise, <see langword="false" />. The default is
+ <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/ALL</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Bytes">
+ <summary>
+ Specifies whether or not the disassembler should generate the
+ IL stream bytes (in hexadecimal notation) as instruction comments.
+ The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the IL stream bytes should be generated
+ as instruction comments; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/BYTE</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.ForceRebuild">
+ <summary>
+ Instructs NAnt to rebuild the output file regardless of the file
+ timestamps. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the output file should be rebuilt
+ regardless of its timestamps; otherwise <see langword="false" />.
+ The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Header">
+ <summary>
+ Specifies whether or not the disassembler should include PE header
+ information and runtime header information in the output. The default
+ is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if PE header information and runtime header
+ information should be included in the output; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/HEADER</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.InputFile">
+ <summary>
+ Specifies the PE file to disassemble.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo"/> that represents the PE file
+ to disassemble.
+ </value>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.LineNumbers">
+ <summary>
+ Specifies whether or not the disassembler should include
+ references to original source lines. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if references to original source lines
+ should be included; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/LINENUM</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.NoIL">
+ <summary>
+ Specifies whether or not the disassembler should suppress ILASM
+ code output. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if ILASM code output should be suppresses;
+ otherwise, <see langword="false" />. The default is
+ <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/NOIL</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.PublicOnly">
+ <summary>
+ Specifies whether or not the disassembler should disassemble
+ public items only. This is a shortcut for <see cref="P:NAnt.MSNet.Tasks.IldasmTask.Visibility"/>="pub".
+ The default is <see langword="false"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if only public items should be
+ disassembled; otherwise, <see langword="false"/>. The default is
+ <see langword="false"/>.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/PUBONLY</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.QuoteAllNames">
+ <summary>
+ Specifies whether or not the disassembler should enclose all names
+ in single quotation marks. By default, only names that don't match
+ the ILASM definition of a simple name are quoted. The default is
+ <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if all names should be enclosed in single
+ quotation marks; otherwise, <see langword="false" />. The default
+ is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/QUOTEALLNAMES</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.RawExceptionHandling">
+ <summary>
+ Specifies whether or not the disassembler should generate
+ structured exception handling clauses in canonical (label) form.
+ The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if structured exception handling clauses
+ should be generated in canonical form; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/RAWEH</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Source">
+ <summary>
+ Specifies whether or not the disassembler should generate
+ original source lines as comments. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if original source lines should be
+ generated as comments; otherwise, <see langword="false" />.
+ The default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/SOURCE</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Tokens">
+ <summary>
+ Specifies whether or not the disassembler should generate metadata
+ token values as comments. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if metadata token values should be
+ generated as comments; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/TOKENS</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Unicode">
+ <summary>
+ Specifies whether or not the disassembler should use the UNICODE
+ encoding when generating the output. The default is ANSI.
+ </summary>
+ <value>
+ <see langword="true" /> if the output should be generated using
+ the UNICODE encoding; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/UNICODE</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Utf8">
+ <summary>
+ Specifies whether or not the disassembler should use the UTF-8
+ encoding when generating the output. The default is ANSI.
+ </summary>
+ <value>
+ <see langword="true" /> if the output should be generated using
+ the UTF-8 encoding; otherwise, <see langword="false" />. The
+ default is <see langword="false" />.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/UTF8</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Item">
+ <summary>
+ Instructs the disassembler to disassemble the specified item only.
+ </summary>
+ <value>
+ A <see cref="T:System.String"/> that specifies the item to
+ disassemble.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/ITEM</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Visibility">
+ <summary>
+ Instructs the disassembler to disassemble only the items with the
+ specified visibility. Possible values are <c>PUB</c>, <c>PRI</c>,
+ <c>FAM</c>, <c>ASM</c>, <c>FAA</c>, <c>FOA</c>, <c>PSC</c>,
+ or any combination of them separated by <c>+</c>.
+ </summary>
+ <value>
+ A <see cref="T:System.String"/> that contains the visibility
+ suboptions.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/VISIBILITY</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.OutputFile">
+ <summary>
+ Specifies the name of the output file created by the disassembler.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo"/> that represents the name of
+ the output file.
+ </value>
+ <remarks>
+ <para>
+ Corresponds to the <c>/OUT</c> flag.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.ToDirectory">
+ <summary>
+ Specifies the directory to which outputs will be stored.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.DirectoryInfo"/> that represents the
+ directory to which outputs will be stored.
+ </value>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Assemblies">
+ <summary>
+ Specifies a list of PE files to disassemble. To use a <see cref="T:NAnt.Core.Types.FileSet"/>,
+ the <see cref="P:NAnt.MSNet.Tasks.IldasmTask.ToDirectory"/> attribute must be specified.
+ </summary>
+ <value>
+ A <see cref="T:NAnt.Core.Types.FileSet"/> that represents the set
+ of PE files to disassemble.
+ </value>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.Arguments">
+ <summary>
+ The command-line arguments for the external program.
+ </summary>
+ <remarks>
+ Overridden to ensure the <arg> elements would not be exposed
+ to build authors.
+ </remarks>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.IldasmTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ A <see cref="T:System.String"/> that contains the command-line
+ arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.MSNet.Tasks.ServiceControllerTask">
+ <summary>
+ Allows a Windows service to be controlled.
+ </summary>
+ <example>
+ <para>Starts the World Wide Web Publishing Service on the local computer.</para>
+ <code>
+ <![CDATA[
+ <servicecontroller action="Start" service="w3svc" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Stops the Alerter service on computer 'MOTHER'.</para>
+ <code>
+ <![CDATA[
+ <servicecontroller action="Stop" service="Alerter" machine="MOTHER" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.MSNet.Tasks.ServiceControllerTask"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.ExecuteTask">
+ <summary>
+ Peforms actions on the service in order to reach the desired status.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.DetermineDesiredStatus">
+ <summary>
+ Determines the desired status of the service based on the action
+ that should be performed on it.
+ </summary>
+ <returns>
+ The <see cref="T:System.ServiceProcess.ServiceControllerStatus"/> that should be reached
+ in order for the <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.Action"/> to be considered successful.
+ </returns>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.StartService(System.ServiceProcess.ServiceController)">
+ <summary>
+ Starts the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and
+ <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.
+ </summary>
+ <param name="serviceController"><see cref="T:System.ServiceProcess.ServiceController"/> instance for controlling the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.</param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.StopService(System.ServiceProcess.ServiceController)">
+ <summary>
+ Stops the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and
+ <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.
+ </summary>
+ <param name="serviceController"><see cref="T:System.ServiceProcess.ServiceController"/> instance for controlling the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.</param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.RestartService(System.ServiceProcess.ServiceController)">
+ <summary>
+ Restarts the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and
+ <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.
+ </summary>
+ <param name="serviceController"><see cref="T:System.ServiceProcess.ServiceController"/> instance for controlling the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.</param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.PauseService(System.ServiceProcess.ServiceController)">
+ <summary>
+ Pauses the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and
+ <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.
+ </summary>
+ <param name="serviceController"><see cref="T:System.ServiceProcess.ServiceController"/> instance for controlling the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.</param>
+ </member>
+ <member name="M:NAnt.MSNet.Tasks.ServiceControllerTask.ContinueService(System.ServiceProcess.ServiceController)">
+ <summary>
+ Continues the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and
+ <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.
+ </summary>
+ <param name="serviceController"><see cref="T:System.ServiceProcess.ServiceController"/> instance for controlling the service identified by <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName"/> and <see cref="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName"/>.</param>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask._serviceName">
+ <summary>
+ Holds the name of the service that should be controlled.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask._machineName">
+ <summary>
+ Holds the name of the computer on which the service resides.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask._action">
+ <summary>
+ Holds the action that should be performed on the service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask._timeout">
+ <summary>
+ Holds the time, in milliseconds, the task will wait for a service
+ to reach the desired status.
+ </summary>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.ServiceControllerTask.ServiceName">
+ <summary>
+ The name of the service that should be controlled.
+ </summary>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.ServiceControllerTask.MachineName">
+ <summary>
+ The name of the computer on which the service resides. The default
+ is the local computer.
+ </summary>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.ServiceControllerTask.Action">
+ <summary>
+ The action that should be performed on the service.
+ </summary>
+ </member>
+ <member name="P:NAnt.MSNet.Tasks.ServiceControllerTask.Timeout">
+ <summary>
+ The time, in milliseconds, the task will wait for the service to
+ reach the desired status. The default is 5000 milliseconds.
+ </summary>
+ </member>
+ <member name="T:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType">
+ <summary>
+ Defines the actions that can be performed on a service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType.Start">
+ <summary>
+ Starts a service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType.Stop">
+ <summary>
+ Stops a service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType.Restart">
+ <summary>
+ Restarts a service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType.Pause">
+ <summary>
+ Pauses a running service.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSNet.Tasks.ServiceControllerTask.ActionType.Continue">
+ <summary>
+ Continues a paused service.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.NUnit.xml b/external/guiunit/tools/nant/bin/NAnt.NUnit.xml
new file mode 100755
index 0000000..a7c6239
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.NUnit.xml
@@ -0,0 +1,353 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.NUnit</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.NUnit.Types.FormatterData">
+ <summary>
+ Carries data specified through the formatter element.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterData.Type">
+ <summary>
+ Gets or sets the type of the formatter.
+ </summary>
+ <value>The type of the formatter.</value>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterData.UseFile">
+ <summary>
+ Gets or sets a value indicating whether output should be persisted
+ to a file.
+ </summary>
+ <value>
+ <see langword="true" /> if output should be written to a file; otherwise,
+ <see langword="false" />. The default is <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterData.Extension">
+ <summary>
+ Gets or sets the extension to append to the output filename.
+ </summary>
+ <value>The extension to append to the output filename.</value>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterData.OutputDirectory">
+ <summary>
+ Gets or sets the directory where the output file should be written
+ to, if <see cref="P:NAnt.NUnit.Types.FormatterData.UseFile"/> is <see langword="true"/>.
+ </summary>
+ <value>
+ The directory where the output file should be written to.
+ </value>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterDataCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.NUnit.Types.FormatterData"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.#ctor(NAnt.NUnit.Types.FormatterDataCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.#ctor(NAnt.NUnit.Types.FormatterData[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit.Types.FormatterData"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.Add(NAnt.NUnit.Types.FormatterData)">
+ <summary>
+ Adds a <see cref="T:NAnt.NUnit.Types.FormatterData"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterData"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.AddRange(NAnt.NUnit.Types.FormatterData[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit.Types.FormatterData"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.NUnit.Types.FormatterData"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.AddRange(NAnt.NUnit.Types.FormatterDataCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.Contains(NAnt.NUnit.Types.FormatterData)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.NUnit.Types.FormatterData"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterData"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.CopyTo(NAnt.NUnit.Types.FormatterData[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.IndexOf(NAnt.NUnit.Types.FormatterData)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.NUnit.Types.FormatterData"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterData"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.NUnit.Types.FormatterData"/>. If the <see cref="T:NAnt.NUnit.Types.FormatterData"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.Insert(System.Int32,NAnt.NUnit.Types.FormatterData)">
+ <summary>
+ Inserts a <see cref="T:NAnt.NUnit.Types.FormatterData"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterData"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.NUnit.Types.FormatterDataEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataCollection.Remove(NAnt.NUnit.Types.FormatterData)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterData"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterDataCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterDataEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.NUnit.Types.FormatterData"/> elements of a <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataEnumerator.#ctor(NAnt.NUnit.Types.FormatterDataCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterDataEnumerator"/> class
+ with the specified <see cref="T:NAnt.NUnit.Types.FormatterDataCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterDataEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterDataEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterType">
+ <summary>
+ The built-in formatter types.
+ </summary>
+ </member>
+ <member name="F:NAnt.NUnit.Types.FormatterType.Plain">
+ <summary>
+ A plaintext formatter.
+ </summary>
+ </member>
+ <member name="F:NAnt.NUnit.Types.FormatterType.Xml">
+ <summary>
+ An XML formatter.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterElement">
+ <summary>
+ Represents the FormatterElement of the NUnit task.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElement.Type">
+ <summary>
+ Type of formatter.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElement.Extension">
+ <summary>
+ Extension to append to the output filename.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElement.UseFile">
+ <summary>
+ Determines whether output should be persisted to a file. The default
+ is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElement.OutputDirectory">
+ <summary>
+ Specifies the directory where the output file should be written to,
+ if <see cref="P:NAnt.NUnit.Types.FormatterElement.UseFile"/> is <see langword="true"/>. If not
+ specified, the output file will be written to the directory where
+ the test module is located.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElement.Data">
+ <summary>
+ Gets the underlying <see cref="T:NAnt.NUnit.Types.FormatterData"/> for the element.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterElementCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.NUnit.Types.FormatterElement"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.#ctor(NAnt.NUnit.Types.FormatterElementCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.#ctor(NAnt.NUnit.Types.FormatterElement[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit.Types.FormatterElement"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.Add(NAnt.NUnit.Types.FormatterElement)">
+ <summary>
+ Adds a <see cref="T:NAnt.NUnit.Types.FormatterElement"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterElement"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.AddRange(NAnt.NUnit.Types.FormatterElement[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit.Types.FormatterElement"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.NUnit.Types.FormatterElement"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.AddRange(NAnt.NUnit.Types.FormatterElementCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.Contains(NAnt.NUnit.Types.FormatterElement)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.NUnit.Types.FormatterElement"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterElement"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.CopyTo(NAnt.NUnit.Types.FormatterElement[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.IndexOf(NAnt.NUnit.Types.FormatterElement)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.NUnit.Types.FormatterElement"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterElement"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.NUnit.Types.FormatterElement"/>. If the <see cref="T:NAnt.NUnit.Types.FormatterElement"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.Insert(System.Int32,NAnt.NUnit.Types.FormatterElement)">
+ <summary>
+ Inserts a <see cref="T:NAnt.NUnit.Types.FormatterElement"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterElement"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.NUnit.Types.FormatterElementEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementCollection.Remove(NAnt.NUnit.Types.FormatterElement)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit.Types.FormatterElement"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElementCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.NUnit.Types.FormatterElementEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.NUnit.Types.FormatterElement"/> elements of a <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementEnumerator.#ctor(NAnt.NUnit.Types.FormatterElementCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit.Types.FormatterElementEnumerator"/> class
+ with the specified <see cref="T:NAnt.NUnit.Types.FormatterElementCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit.Types.FormatterElementEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit.Types.FormatterElementEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.NUnit1Tasks.xml b/external/guiunit/tools/nant/bin/NAnt.NUnit1Tasks.xml
new file mode 100755
index 0000000..85367f3
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.NUnit1Tasks.xml
@@ -0,0 +1,538 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.NUnit1Tasks</name>
+ </assembly>
+ <members>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatter.StartTestSuite(NAnt.NUnit1.Types.NUnitTestData)">
+ <summary>
+ The whole test suite started.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatter.EndTestSuite(NAnt.NUnit1.Types.TestResultExtra)">
+ <summary>
+ The whole test suite ended.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatter.SetOutput(System.IO.TextWriter)">
+ <summary>
+ Sets the <see cref="T:System.IO.TextWriter"/> the formatter is supposed to write
+ its results to.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.IResultFormatterCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.#ctor(NAnt.NUnit1.Types.IResultFormatterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.#ctor(NAnt.NUnit1.Types.IResultFormatter[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.Add(NAnt.NUnit1.Types.IResultFormatter)">
+ <summary>
+ Adds a <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.AddRange(NAnt.NUnit1.Types.IResultFormatter[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.AddRange(NAnt.NUnit1.Types.IResultFormatterCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.Contains(NAnt.NUnit1.Types.IResultFormatter)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.CopyTo(NAnt.NUnit1.Types.IResultFormatter[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.IndexOf(NAnt.NUnit1.Types.IResultFormatter)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/>. If the <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.Insert(System.Int32,NAnt.NUnit1.Types.IResultFormatter)">
+ <summary>
+ Inserts a <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.NUnit1.Types.IResultFormatterEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterCollection.Remove(NAnt.NUnit1.Types.IResultFormatter)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.IResultFormatterCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.IResultFormatterEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.NUnit1.Types.IResultFormatter"/> elements of a <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterEnumerator.#ctor(NAnt.NUnit1.Types.IResultFormatterCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.IResultFormatterEnumerator"/> class
+ with the specified <see cref="T:NAnt.NUnit1.Types.IResultFormatterCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.IResultFormatterEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.IResultFormatterEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.LogFormatter">
+ <summary>
+ Prints information about running tests directly to the build log.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.LogFormatter.SetOutput(System.IO.TextWriter)">
+ <summary>Not used, all output goes to Log class.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.LogFormatter.StartTestSuite(NAnt.NUnit1.Types.NUnitTestData)">
+ <summary>Called when the whole test suite has started.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.LogFormatter.EndTestSuite(NAnt.NUnit1.Types.TestResultExtra)">
+ <summary>Called when the whole test suite has ended.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.LogFormatter.FormatError(System.String,System.String)">
+ <summary>Convert a stack trace line into something that can be clicked on in an IDE output window.</summary>
+ <param name="trace">The StackTrace string, see <see cref="P:System.Exception.StackTrace"/>.</param>
+ <param name="message">The string that gets appended to the end of file(line): portion.</param>
+ </member>
+ <member name="T:NAnt.NUnit1.Tasks.NUnitTask">
+ <summary>
+ Runs tests using the NUnit V1.0 framework.
+ </summary>
+ <remarks>
+ <para>
+ See the <see href="http://nunit.sf.net">NUnit home page</see> for more
+ information.
+ </para>
+ <para>
+ The <see cref="P:NAnt.NUnit1.Tasks.NUnitTask.HaltOnFailure"/> or <see cref="P:NAnt.NUnit1.Tasks.NUnitTask.HaltOnError"/>
+ attributes are only used to stop more than one test suite to stop
+ running. If any test suite fails a build error will be thrown.
+ Set <see cref="P:NAnt.Core.Task.FailOnError"/> to <see langword="false"/> to
+ ignore test errors and continue build.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Run tests in the <c>MyProject.Tests.dll</c> assembly.
+ </para>
+ <para>
+ The test results are logged in <c>results.xml</c> and <c>results.txt</c>
+ using the <see cref="F:NAnt.NUnit.Types.FormatterType.Xml"/> and <see cref="F:NAnt.NUnit.Types.FormatterType.Plain"/>
+ formatters, respectively.
+ </para>
+ <code>
+ <![CDATA[
+ <nunit basedir="build" verbose="false" haltonerror="true" haltonfailure="true">
+ <formatter type="Xml" />
+ <formatter type="Plain" />
+ <test name="MyProject.Tests.AllTests" assembly="MyProject.Tests.dll" outfile="results"/>
+ </nunit>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTask.HaltOnError">
+ <summary>
+ Stops running tests when a test causes an error. The default is
+ <see langword="false" />.
+ </summary>
+ <remarks>
+ Implies haltonfailure.
+ </remarks>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTask.HaltOnFailure">
+ <summary>
+ Stops running tests if a test fails (errors are considered failures
+ as well). The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTask.Timeout">
+ <summary>
+ Cancel the individual tests if they do not finish in the specified
+ time (measured in milliseconds). Ignored if fork is disabled.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTask.Tests">
+ <summary>
+ Tests to run.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTask.FormatterElements">
+ <summary>
+ Formatters to output results of unit tests.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.NUnitTest">
+ <summary>
+ Represents a test element of an <see cref="T:NAnt.NUnit1.Tasks.NUnitTask"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.OutFile">
+ <summary>
+ Base name of the test result. The full filename is determined by this
+ attribute and the extension of formatter.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.ToDir">
+ <summary>
+ Directory to write the reports to.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.Class">
+ <summary>
+ Class name of the test.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.Assembly">
+ <summary>
+ Assembly to load the test from.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.Fork">
+ <summary>
+ Run the tests in a separate <see cref="T:System.AppDomain"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.HaltOnError">
+ <summary>
+ Stop the build process if an error occurs during the test run.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.HaltOnFailure">
+ <summary>
+ Stop the build process if a test fails (errors are considered failures
+ as well).
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTest.AppConfigFile">
+ <summary>
+ The application configuration file to use for the NUnit test domain.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.NUnitTestCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.#ctor(NAnt.NUnit1.Types.NUnitTestCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.#ctor(NAnt.NUnit1.Types.NUnitTest[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.Add(NAnt.NUnit1.Types.NUnitTest)">
+ <summary>
+ Adds a <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.AddRange(NAnt.NUnit1.Types.NUnitTest[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.AddRange(NAnt.NUnit1.Types.NUnitTestCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.Contains(NAnt.NUnit1.Types.NUnitTest)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.CopyTo(NAnt.NUnit1.Types.NUnitTest[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.IndexOf(NAnt.NUnit1.Types.NUnitTest)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.NUnit1.Types.NUnitTest"/>. If the <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.Insert(System.Int32,NAnt.NUnit1.Types.NUnitTest)">
+ <summary>
+ Inserts a <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.NUnit1.Types.NUnitTestEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestCollection.Remove(NAnt.NUnit1.Types.NUnitTest)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTestCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.NUnitTestEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.NUnit1.Types.NUnitTest"/> elements of a <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestEnumerator.#ctor(NAnt.NUnit1.Types.NUnitTestCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.NUnitTestEnumerator"/> class
+ with the specified <see cref="T:NAnt.NUnit1.Types.NUnitTestCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.NUnitTestEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.NUnitTestEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.NUnitTestData">
+ <summary>
+ Carries data specified through the test element.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Tasks.NUnitTestRunner.NeedsRunning">
+ <summary>
+ Determines if the unit test needs running.
+ </summary>
+ <returns>
+ <see langword="true" /> if unit test needs running, otherwise,
+ <see langword="false" />.
+ </returns>
+ <remarks>
+ <para>
+ Determines if the test needs running by looking at the date stamp
+ of the test assembly and the test results log.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.NUnit1.Tasks.NUnitTestRunner.Run(System.String,System.Boolean)">
+ <summary>
+ Runs a Suite extracted from a TestCase subclass.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Tasks.NUnitTestRunner.CreateFormatters(NAnt.NUnit1.Types.NUnitTestData,System.String,System.Boolean)">
+ <summary>
+ Creates the formatters to be used when running this test.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Tasks.NUnitTestRunner.GetOutput(NAnt.NUnit.Types.FormatterData,NAnt.NUnit1.Types.NUnitTestData)">
+ <summary>
+ Returns the output file or null if does not use a file.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Tasks.NUnitTestRunner.GetSuite(System.String)">
+ <summary>
+ Returns the test suite from a given class.
+ </summary>
+ <remarks>
+ The assemblyQualifiedName parameter needs to be in form:
+ "full.qualified.class.name,Assembly"
+ </remarks>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTestRunner.Formatters">
+ <summary>
+ Gets the collection of registered formatters.
+ </summary>
+ <value>Collection of registered formatters.</value>
+ </member>
+ <member name="P:NAnt.NUnit1.Tasks.NUnitTestRunner.ResultCode">
+ <summary>
+ Gets the result of the test.
+ </summary>
+ <value>The result of the test.</value>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.PlainTextFormatter">
+ <summary>
+ Prints information about running tests in plain text.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.PlainTextFormatter.SetOutput(System.IO.TextWriter)">
+ <summary>Sets the Writer the formatter is supposed to write its results to.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.PlainTextFormatter.StartTestSuite(NAnt.NUnit1.Types.NUnitTestData)">
+ <summary>Called when the whole test suite has started.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.PlainTextFormatter.EndTestSuite(NAnt.NUnit1.Types.TestResultExtra)">
+ <summary>Called when the whole test suite has ended.</summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.PlainTextFormatter.FormatError(System.String,System.String)">
+ <summary>Convert a stack trace line into something that can be clicked on in an IDE output window.</summary>
+ <param name="trace">The StackTrace string, see <see cref="P:System.Exception.StackTrace"/>.</param>
+ <param name="message">The string that gets appended to the end of file(line): portion.</param>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.TestResultExtra">
+ <summary>
+ Decorates NUnits <see cref="T:NUnit.Framework.TestResult"/> with extra information such as
+ run-time.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.TestResultExtra.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.TestResultExtra"/>
+ class.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit1.Types.TestResultExtra.RunTime">
+ <summary>
+ Gets or sets the total run-time of a test.
+ </summary>
+ <value>The total run-time of a test.</value>
+ </member>
+ <member name="T:NAnt.NUnit1.Types.XmlResultFormatter">
+ <summary>
+ Prints detailed information about running tests in XML format.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.XmlResultFormatter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit1.Types.XmlResultFormatter"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.XmlResultFormatter.SetOutput(System.IO.TextWriter)">
+ <summary>
+ Sets the <see cref="T:System.IO.TextWriter"/> the formatter is supposed to
+ write its results to.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.XmlResultFormatter.StartTestSuite(NAnt.NUnit1.Types.NUnitTestData)">
+ <summary>
+ Called when the whole test suite has started.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit1.Types.XmlResultFormatter.EndTestSuite(NAnt.NUnit1.Types.TestResultExtra)">
+ <summary>
+ Called when the whole test suite has ended.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.NUnit2Tasks.xml b/external/guiunit/tools/nant/bin/NAnt.NUnit2Tasks.xml
new file mode 100755
index 0000000..83ba73a
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.NUnit2Tasks.xml
@@ -0,0 +1,516 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.NUnit2Tasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.NUnit2.Types.Categories">
+ <summary>
+ Controls the categories of tests to execute using the <see cref="T:NAnt.NUnit2.Tasks.NUnit2Task"/>.
+ </summary>
+ <example>
+ <para>
+ Only include test cases and fixtures that require no internet access.
+ </para>
+ <code>
+ <![CDATA[
+ <categories>
+ <include name="NoInternetAccess" />
+ </categories>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Exclude test cases and fixtures that are known to fail.
+ </para>
+ <code>
+ <![CDATA[
+ <categories>
+ <exclude name="NotWorking" />
+ </categories>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.Categories.Includes">
+ <summary>
+ Specifies a list of categories to include.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.Categories.Excludes">
+ <summary>
+ Specifies a list of categories to exclude.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit2.Types.Category">
+ <summary>
+ Represents a certain group of test cases or fixtures.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.Category.CategoryName">
+ <summary>
+ A name of a category, or comma-separated list of names.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.Category.IfDefined">
+ <summary>
+ If <see langword="true" /> then the category will be processed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.Category.UnlessDefined">
+ <summary>
+ If <see langword="true" /> then the category will be skipped;
+ otherwise, processed. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit2.Types.CategoryCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.NUnit2.Types.Category"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.CategoryCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.#ctor(System.Collections.Generic.IList{NAnt.NUnit2.Types.Category})">
+ <summary>
+ Initializes a new instance of the
+ <see cref="T:NAnt.NUnit2.Types.CategoryCollection"/> class as a wrapper for
+ the specified list.
+ </summary>
+ <param name="value">
+ The list that is wrapped by the newly created instance.
+ </param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.#ctor(NAnt.NUnit2.Types.CategoryCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.CategoryCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit2.Types.CategoryCollection"/> instance.
+ </summary>
+ <param name="value">
+ The collection to use to initialize the new instance with.
+ </param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.#ctor(NAnt.NUnit2.Types.Category[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.CategoryCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit2.Types.Category"/> instances.
+ </summary>
+ <param name="value">
+ The collection to use to initialize the new instance with.
+ </param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.ToString">
+ <summary>
+ Returns a comma-delimited list of categories.
+ </summary>
+ <returns>
+ A comma-delimited list of categories, or an empty
+ <see cref="T:System.String"/> if there are no categories.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.CategoryCollection.AddRange(System.Collections.Generic.IEnumerable{NAnt.NUnit2.Types.Category})">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit2.Types.Category"/> array to the end of the
+ collection.
+ </summary>
+ <param name="items">
+ The array of <see cref="T:NAnt.NUnit2.Types.Category"/> elements to be added to the end of
+ the collection.
+ </param>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.CategoryCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.NUnit2.Types.Category"/> with the specified name.
+ </summary>
+ <param name="value">The name of the <see cref="T:NAnt.NUnit2.Types.Category"/> to get.</param>
+ </member>
+ <member name="T:NAnt.NUnit2.Tasks.NUnit2Task">
+ <summary>
+ Runs tests using the NUnit V2.6 framework.
+ </summary>
+ <remarks>
+ <para>
+ The <see cref="P:NAnt.NUnit2.Tasks.NUnit2Task.HaltOnFailure"/> attribute is only useful when more
+ than one test suite is used, and you want to continue running other
+ test suites although a test failed.
+ </para>
+ <para>
+ Set <see cref="P:NAnt.Core.Task.FailOnError"/> to <see langword="false"/> to
+ ignore any errors and continue the build.
+ </para>
+ <para>
+ In order to run a test assembly built with NUnit 2.0 or 2.1 using
+ <see cref="T:NAnt.NUnit2.Tasks.NUnit2Task"/>, you must add the following node to your
+ test config file :
+ </para>
+ <code>
+ <![CDATA[
+ <configuration>
+ ...
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
+ <bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.8.0" />
+ <bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.8.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+ ...
+ </configuration>
+ ]]>
+ </code>
+ <para>
+ See the <see href="http://nunit.sf.net">NUnit home page</see> for more
+ information.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Run tests in the <c>MyProject.Tests.dll</c> assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <nunit2>
+ <formatter type="Plain" />
+ <test assemblyname="MyProject.Tests.dll" appconfig="MyProject.Tests.dll.config" />
+ </nunit2>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Only run tests that are not known to fail in files listed in the <c>tests.txt</c>
+ file.
+ </para>
+ <code>
+ <![CDATA[
+ <nunit2>
+ <formatter type="Xml" usefile="true" extension=".xml" outputdir="${build.dir}/results" />
+ <test>
+ <assemblies>
+ <includesfile name="tests.txt" />
+ </assemblies>
+ <categories>
+ <exclude name="NotWorking" />
+ </categories>
+ <references basedir="build">
+ <include name="Cegeka.Income.Services.dll" />
+ <include name="Cegeka.Util.dll" />
+ </references>
+ </test>
+ </nunit2>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask">
+ <summary>
+ Runs the tests and sets up the formatters.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2Task.GetListener(NAnt.Core.LogWriter)">
+ <summary>
+ Gets a new EventListener to use for the unit tests.
+ </summary>
+ <returns>
+ A new EventListener created with a new EventCollector that
+ is initialized with <paramref name="logWriter"/>.
+ </returns>
+ <param name='logWriter'>
+ Log writer to send test output to.
+ </param>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2Task.GetLoggingThreshold">
+ <summary>
+ Gets the logging threshold to use for a test runner based on
+ the current threshold of this task.
+ </summary>
+ <returns>
+ The logging threshold to use when running a test runner.
+ </returns>
+ </member>
+ <member name="P:NAnt.NUnit2.Tasks.NUnit2Task.HaltOnFailure">
+ <summary>
+ Stop the test run if a test fails. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Tasks.NUnit2Task.Labels">
+ <summary>
+ Indicate whether or not to label the text output as the tests run.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Tasks.NUnit2Task.Tests">
+ <summary>
+ Tests to run.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Tasks.NUnit2Task.FormatterElements">
+ <summary>
+ Formatters to output results of unit tests.
+ </summary>
+ </member>
+ <member name="T:NAnt.NUnit2.Types.NUnit2Test">
+ <summary>
+ Represents a <c>test</c> element of an <see cref="T:NAnt.NUnit2.Tasks.NUnit2Task"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.AssemblyFile">
+ <summary>
+ Name of the assembly to search for tests.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.TestName">
+ <summary>
+ Name of a specific testfixture to run. If not specified then all
+ testfixtures are run.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.Assemblies">
+ <summary>
+ Assemblies to include in test.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.References">
+ <summary>
+ Assemblies to scan for missing assembly references.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.Categories">
+ <summary>
+ Categories of test cases to include or exclude.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.HaltOnFailure">
+ <summary>
+ Build fails on failure. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.XsltFile">
+ <summary>
+ XSLT transform file to use when using the <see cref="F:NAnt.NUnit.Types.FormatterType.Plain"/>
+ formatter.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.AppConfigFile">
+ <summary>
+ The application configuration file to use for the NUnit test domain.
+ If not specified, NAnt will try to use a configuration name matching
+ the file name of the assembly with extension ".config".
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2Test.TestAssemblies">
+ <summary>
+ Gets all assemblies specified for these tests.
+ </summary>
+ <returns>
+ All assemblies specified for these tests.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit2.Types.NUnit2TestCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.#ctor(NAnt.NUnit2.Types.NUnit2TestCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> class
+ with the specified <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.#ctor(NAnt.NUnit2.Types.NUnit2Test[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> class
+ with the specified array of <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.Add(NAnt.NUnit2.Types.NUnit2Test)">
+ <summary>
+ Adds a <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.AddRange(NAnt.NUnit2.Types.NUnit2Test[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.AddRange(NAnt.NUnit2.Types.NUnit2TestCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.Contains(NAnt.NUnit2.Types.NUnit2Test)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.CopyTo(NAnt.NUnit2.Types.NUnit2Test[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.IndexOf(NAnt.NUnit2.Types.NUnit2Test)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/>. If the <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.Insert(System.Int32,NAnt.NUnit2.Types.NUnit2Test)">
+ <summary>
+ Inserts a <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.NUnit2.Types.NUnit2TestEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestCollection.Remove(NAnt.NUnit2.Types.NUnit2Test)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2TestCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.NUnit2.Types.NUnit2TestEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.NUnit2.Types.NUnit2Test"/> elements of a <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestEnumerator.#ctor(NAnt.NUnit2.Types.NUnit2TestCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Types.NUnit2TestEnumerator"/> class
+ with the specified <see cref="T:NAnt.NUnit2.Types.NUnit2TestCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Types.NUnit2TestEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.NUnit2.Types.NUnit2TestEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit2.Tasks.NUnit2TestDomain">
+ <summary>
+ Custom TestDomain, similar to the one included with NUnit, in order
+ to workaround some limitations in it.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2TestDomain.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.NUnit2.Tasks.NUnit2TestDomain"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2TestDomain.CreateRunner(System.IO.FileInfo,System.IO.FileInfo,System.Collections.Specialized.StringCollection)">
+ <summary>
+ Runs a single testcase.
+ </summary>
+ <param name="assemblyFile">The test assembly.</param>
+ <param name="configFile">The application configuration file for the test domain.</param>
+ <param name="referenceAssemblies">List of files to scan for missing assembly references.</param>
+ <returns>
+ The result of the test.
+ </returns>
+ </member>
+ <member name="T:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler">
+ <summary>
+ Helper class called when an assembly resolve event is raised.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler.#ctor(System.String[],System.String[])">
+ <summary>
+ Initializes an instanse of the <see cref="T:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler.ResolveAssembly(System.Object,System.ResolveEventArgs)">
+ <summary>
+ Called back when the CLR cannot resolve a given assembly.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="args">A <see cref="T:System.ResolveEventArgs"/> that contains the event data.</param>
+ <returns>
+ The <c>nunit.framework</c> we know to be in NAnts bin directory, if
+ that is the assembly that needs to be resolved; otherwise,
+ <see langword="null"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler.AssemblyLoad(System.Object,System.AssemblyLoadEventArgs)">
+ <summary>
+ Occurs when an assembly is loaded. The loaded assembly is added
+ to the assembly cache.
+ </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="args">An <see cref="T:System.AssemblyLoadEventArgs"/> that contains the event data.</param>
+ </member>
+ <member name="F:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler._probePaths">
+ <summary>
+ Holds the list of directories that will be scanned for missing
+ assembly references.
+ </summary>
+ </member>
+ <member name="F:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler._referenceAssemblies">
+ <summary>
+ Holds the list of assemblies that can be scanned for missing
+ assembly references.
+ </summary>
+ </member>
+ <member name="F:NAnt.NUnit2.Tasks.NUnit2TestDomain.AssemblyResolveHandler._assemblyCache">
+ <summary>
+ Holds the loaded assemblies.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.SourceControlTasks.xml b/external/guiunit/tools/nant/bin/NAnt.SourceControlTasks.xml
new file mode 100755
index 0000000..70d9cfb
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.SourceControlTasks.xml
@@ -0,0 +1,1289 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.SourceControlTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.SourceControl.Tasks.AbstractCvsTask">
+ <summary>
+ A base class for creating tasks for executing CVS client commands on a
+ CVS repository.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.AbstractSourceControlTask">
+ <summary>
+ A base class for creating tasks for executing CVS client commands on a
+ CVS repository.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractSourceControlTask.EnvHome">
+ <summary>
+ Name of the environmental variable specifying a users' home
+ in a *nix environment.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractSourceControlTask.AppData">
+ <summary>
+ Used on windows to specify the location of application data.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractSourceControlTask.PathVariable">
+ <summary>
+ The environment variable that holds path information.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractSourceControlTask.CvsPassFileVariable">
+ <summary>
+ The environment variable that holds the location of the
+ .cvspass file.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractSourceControlTask.PropExeName">
+ <summary>
+ Property name used to specify the source control executable. This is
+ used as a readonly property.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.AbstractCvsTask"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Build up the command line arguments, determine which executable is being
+ used and find the path to that executable and set the working
+ directory.
+ </summary>
+ <param name="process">The process to prepare.</param>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.SetGlobalOption(System.String,System.String,System.Boolean)">
+ <summary>
+ Adds a new global option if none exists. If one does exist then
+ the use switch is toggled on or of.
+ </summary>
+ <param name="name">The common name of the option.</param>
+ <param name="value">The option value or command line switch
+ of the option.</param>
+ <param name="on"><code>true</code> if the option should be
+ appended to the commandline, otherwise <code>false</code>.</param>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.SetCommandOption(System.String,System.String,System.Boolean)">
+ <summary>
+ Adds a new command option if none exists. If one does exist then
+ the use switch is toggled on or of.
+ </summary>
+ <param name="name">The common name of the option.</param>
+ <param name="value">The option value or command line switch
+ of the option.</param>
+ <param name="on"><code>true</code> if the option should be
+ appended to the commandline, otherwise <code>false</code>.</param>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.SetEnvironment(System.Diagnostics.Process)">
+ <summary>
+ Set up the environment variables for a process.
+ </summary>
+ <param name="process">A process to setup.</param>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.AppendFiles">
+ <summary>
+ Append the files specified in the fileset to the command line argument.
+ Files are changed to use a relative path from the working directory
+ that the task is spawned in.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractSourceControlTask.DeriveVcsFromEnvironment">
+ <summary>
+ Derive the location of the version control system from the environment
+ variable <code>PATH</code>.
+ </summary>
+ <returns>The file information of the version control system,
+ or <code>null</code> if this cannot be found.</returns>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.PassFileName">
+ <summary>
+ The name of the passfile, overriden for each version control system (VCS).
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.VcsHome">
+ <summary>
+ The path to the specific home directory of the version control system,
+ this can be where the binary files are kept, or other app
+ information.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.VcsHomeEnv">
+ <summary>
+ The environment variable that defines where the version control system
+ (VCS) home variable is kept.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.VcsExeName">
+ <summary>
+ The name of the version control system (VCS) executable file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.Root">
+ <summary>
+ <para>
+ The root variable contains information on how to locate a repository.
+ Although this information is in different formats it typically must
+ define the following:
+ <list type="table">
+ <item>server location</item>
+ <item>protocol used to communicate with the repository</item>
+ <item>repository location on the server</item>
+ <item>project location in the repository</item>
+ </list>
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.DestinationDirectory">
+ <summary>
+ Destination directory for the local sandbox. If destination is not specified
+ then the current directory is used.
+ </summary>
+ <value>
+ Root path of the local sandbox.
+ </value>
+ <remarks>
+ <para>
+ Root path of the local sandbox.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.Password">
+ <summary>
+ The password for logging in to the repository.
+ </summary>
+ <value>
+ The password for logging in to the repository.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.PassFile">
+ <summary>
+ The full path to the cached password file. If not specified then the
+ environment variables are used to try and locate the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.GlobalOptions">
+ <summary>
+ Holds a collection of globally available options.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.CommandOptions">
+ <summary>
+ A collection of options that can be used to modify the default behavoir
+ of the version control commands. See the sub-tasks for implementation
+ specifics.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.CommandLineArguments">
+ <summary>
+ Command-line arguments for the program. The command line arguments are used to specify
+ any cvs command options that are not available as attributes. These are appended
+ after the command itself and are additive to whatever attributes are currently specified.
+ </summary>
+ <example>
+ <cvs-checkout cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ destination="e:\test\merillcornish\working"
+ readonly="true"
+ quiet="true"
+ commandline="-n"
+ cvsfullpath="C:\Program Files\TortoiseCVS\cvs.exe"
+ />
+ <br />
+ Produces the cvs command:
+ <code>c:\Program Files\TortoiseCVS\cvs.exe -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant -q checkout -n nant</code>
+ </example>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.CommandName">
+ <summary>
+ The name of the command that is going to be executed.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.VcsFileSet">
+ <summary>
+ Used to specify the version control system (VCS) files that are going
+ to be acted on.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.Ssh">
+ <summary>
+ The executable to use for ssh communication.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.SshEnv">
+ <summary>
+ The environment name for the ssh variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.ExeName">
+ <summary>
+ The name of the version control system executable.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.ProgramArguments">
+ <summary>
+ Get the command line arguments for the task.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.DefaultRecursive">
+ <summary>
+ Default value for the recursive directive. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.DefaultQuiet">
+ <summary>
+ Default value for the quiet command.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.DefaultReallyQuiet">
+ <summary>
+ Default value for the really quiet command.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsHome">
+ <summary>
+ An environment variable that holds path information about where
+ cvs is located.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsPassfile">
+ <summary>
+ Name of the password file that cvs stores pserver
+ cvsroot/ password pairings.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.DefaultCompressionLevel">
+ <summary>
+ The default compression level to use for cvs commands.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.DefaultUseSharpCvsLib">
+ <summary>
+ The default use of binaries, defaults to use sharpcvs.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsExe">
+ <summary>
+ The name of the cvs executable.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.SharpCvsExe">
+ <summary>
+ The temporary name of the sharpcvslib binary file, to avoid
+ conflicts in the path variable.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsRsh">
+ <summary>
+ Environment variable that holds the executable name that is used for
+ ssh communication.
+ </summary>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.AbstractCvsTask.UseSharpCvsLibProp">
+ <summary>
+ Property name used to specify on a project level whether sharpcvs is
+ used or not.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.AbstractCvsTask"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.ToCvsDateTimeString(System.DateTime)">
+ <summary>
+ Converts a date value to a string representation that can be
+ interpreted by cvs.
+ </summary>
+ <param name="item">Date to convert.</param>
+ <returns>
+ String interpretation of <paramref name="item"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Build up the command line arguments, determine which executable is being
+ used and find the path to that executable and set the working
+ directory.
+ </summary>
+ <param name="process">The process to prepare.</param>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.AppendSubCommandArgs">
+ <summary>
+ Override to append any commands before the modele and files.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.AppendCommandOptions">
+ <summary>
+ Append the command line options or commen names for the options
+ to the generic options collection. This is then piped to the
+ command line as a switch.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.AbstractCvsTask.AddArg(System.String)">
+ <summary>
+ Add the given argument to the command line options. Note that are not explicitly
+ quoted are split into seperate arguments. This is to resolve a recent issue
+ with quoting command line arguments.
+ </summary>
+ <param name="arg"></param>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.SshEnv">
+ <summary>
+ The environment name for the ssh variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.VcsExeName">
+ <summary>
+ The name of the cvs binary, or <c>cvs.exe</c> at the time this
+ was written.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.PassFileName">
+ <summary>
+ The name of the pass file, or <c>.cvspass</c> at the time
+ of this writing.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.VcsHomeEnv">
+ <summary>
+ The name of the version control system specific home environment
+ variable.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.IsModuleNeeded">
+ <summary>
+ Specify if the module is needed for this cvs command. It is
+ only needed if there is no module information on the local file
+ system.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsFileSet">
+ <summary>
+ Used to specify the version control system (VCS) files that are going
+ to be acted on.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.VcsFileSet">
+ <summary>
+ Get the cvs file set.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.ExeName">
+ <summary>
+ The name of the cvs executable.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.CvsFullPath">
+ <summary>
+ The full path to the cvs binary used. The cvs tasks will attempt to
+ "guess" the location of your cvs binary based on your path. If the
+ task is unable to resolve the location, or resolves it incorrectly
+ this can be used to manually specify the path.
+ </summary>
+ <value>
+ A full path (i.e. including file name) of your cvs binary:
+ On Windows: c:\vcs\cvs\cvs.exe
+ On *nix: /usr/bin/cvs
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.Root">
+ <summary>
+ <para>
+ The cvs root variable has the following components:
+ </para>
+ <para>
+ <code>[protocol]:[username]@[servername]:[server path]</code>
+ <ul>
+ <li>protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.</li>
+ <li>username: [username]</li>
+ <li>servername: cvs.sourceforge.net</li>
+ <li>server path: /cvsroot/nant</li>
+ </ul>
+ </para>
+ </summary>
+ <example>
+ <para>NAnt anonymous cvsroot:</para>
+ <code>
+ :pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.Module">
+ <summary>
+ The module to perform an operation on.
+ </summary>
+ <value>
+ The module to perform an operation on. This is a normal file/folder
+ name without path information.
+ </value>
+ <example>
+ <para>In NAnt the module name would be:</para>
+ <code>nant</code>
+ </example>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.UseSharpCvsLib">
+ <summary>
+ <para>
+ <see langword="true" /> if the SharpCvsLib binaries that come bundled
+ with NAnt should be used to perform the cvs commands, <see langword="false" />
+ otherwise.
+ </para>
+ <para>
+ You may also specify an override value for all cvs tasks instead
+ of specifying a value for each. To do this set the property
+ <c>sourcecontrol.usesharpcvslib</c> to <see langword="false" />.
+ </para>
+ <warn>
+ If you choose not to use SharpCvsLib to checkout from cvs you will
+ need to include a cvs.exe binary in your path.
+ </warn>
+ </summary>
+ <example>
+ To use a cvs client in your path instead of sharpcvslib specify
+ the property:
+ >property name="sourcecontrol.usesharpcvslib" value="false"<
+
+ The default settings is to use sharpcvslib and the setting closest
+ to the task execution is used to determine which value is used
+ to execute the process.
+
+ For instance if the attribute usesharpcvslib was set to false
+ and the global property was set to true, the usesharpcvslib is
+ closes to the point of execution and would be used and is false.
+ Therefore the sharpcvslib binary would NOT be used.
+ </example>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.Ssh">
+ <summary>
+ The executable to use for ssh communication.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.Quiet">
+ <summary>
+ Indicates if the output from the cvs command should be supressed.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.ReallyQuiet">
+ <summary>
+ Indicates if the output from the cvs command should be stopped.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.ReadOnly">
+ <summary>
+ <see langword="true" /> if the sandbox files should be checked out in
+ read only mode. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.ReadWrite">
+ <summary>
+ <see langword="true" /> if the sandbox files should be checked out in
+ read/write mode. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.AbstractCvsTask.CompressionLevel">
+ <summary>
+ Compression level to use for all net traffic. This should be a value from 1-9.
+ <br />
+ <br />
+ <bold>NOTE: This is not available on sharpcvslib.</bold>
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.ChangeLogTask">
+ <summary>
+ Produces an XML report that represents the cvs changes from the given
+ start day, to a given end date.
+ </summary>
+ <example>
+ <para>Report changes in NAnt from 1st of June 2004 until 25th of July 2004.</para>
+ <code>
+ <![CDATA[
+ <cvs-changelog
+ destination="e:/test/nant/sourcecontrol/"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ start="2004/06/01"
+ end="2004/07/25"
+ xmlfile="e:/test/nant/sourcecontrol/changelog-nant.xml"
+ />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.ChangeLogTask.CvsCommandName">
+ <summary>
+ The command being executed.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.DestFile">
+ <summary>
+ Name of the xml file that will contain the cvs log information.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.StartDate">
+ <summary>
+ The earliest change to use in the cvs log command.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.EndDate">
+ <summary>
+ The latest date to use in the cvs log command.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.CommandName">
+ <summary>
+ The cvs command to execute.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.UseSharpCvsLib">
+ <summary>
+ Override use of sharpcvslib, needs to be true.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ChangeLogTask.Root">
+ <summary>
+ <para>
+ The cvs root variable has the following components:
+ </para>
+ <para>
+ <code>[protocol]:[username]@[servername]:[server path]</code>
+ <ul>
+ <li>protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.</li>
+ <li>username: [username]</li>
+ <li>servername: cvs.sourceforge.net</li>
+ <li>server path: /cvsroot/nant</li>
+ </ul>
+ </para>
+ <para>
+ If the cvsroot is not specified then the directory specified by the
+ <see cref="P:NAnt.SourceControl.Tasks.AbstractSourceControlTask.DestinationDirectory"/> attribute
+ is searched for CVS\Root.
+ </para>
+ </summary>
+ <example>
+ <para>NAnt anonymous cvsroot:</para>
+ <code>
+ :pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant
+ </code>
+ </example>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.CheckoutTask">
+ <summary>
+ Checks out a CVS module to the required directory.
+ </summary>
+ <example>
+ <para>Checkout NAnt.</para>
+ <code>
+ <![CDATA[
+ <cvs-checkout
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Checkout NAnt revision named <c>0_85</c> to the
+ folder <c>c:\src\nant\v0.85</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <cvs-checkout
+ destination="c:\src\nant"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ revision="0_85"
+ overridedir="v0.85" />
+ ]]>
+ </code>
+ <para>So the nant module tagged with revision 0_85 will be checked
+ out in the folder v0.85 under the working/ destination directory.
+ <br/>This could be used to work on different
+ branches of a repository at the same time.</para>
+ </example>
+ <example>
+ <para>
+ Checkout NAnt with specified revision date to the
+ folder <c>c:\src\nant\2003_08_16</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <cvs-checkout
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ date="2003/08/16"
+ overridedir="2003_08_16" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.CheckoutTask.CvsCommandName">
+ <summary>
+ The command being executed.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.CheckoutTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.CheckoutTask"/> class.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.Revision">
+ <summary>
+ Specify the revision to checkout. This corresponds to the "sticky-tag"
+ of the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.StickyTag">
+ <summary>
+ Sticky tag or revision to checkout.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.Date">
+ <summary>
+ Specify the revision date to checkout. The date specified is validated
+ and then passed to the cvs binary in a standard format recognized by
+ cvs.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.OverrideDir">
+ <summary>
+ Specify a directory name to replace the module name. Valid names
+ include any valid filename, excluding path information.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.OverrideDirectory">
+ <summary>
+ Specify a directory name to replace the module name. Valid names
+ include any valid filename, excluding path information.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CheckoutTask.CommandName">
+ <summary>
+ The name of the cvs command that is going to be executed.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.CvsPass">
+ <summary>
+ Executes the cvs login command which appends or updates an entry to the
+ specified .cvspass file.
+ </summary>
+ <example>
+ <para>Update .cvspass file to include the NAnt anonymous login.</para>
+ <code>
+ <![CDATA[
+ <cvs-pass cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ password="anonymous"
+ passfile="C:\.cvspass" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.CvsPass.Initialize">
+ <summary>
+ Ensures all information is available to execute the <see cref="T:NAnt.Core.Task"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.CvsPass.ExecuteTask">
+ <summary>
+ Update the .cvspass file with the given password. If the passfile
+ is not specified then the default search locations are used:
+ <list type="list">
+ <item>CVS_PASSFILE/.cvspass</item>
+ <item>HOME/.cvspass</item>
+ <item>USERPROFILE/.cvspass TODO: Confirm that this is valid
+ behavior or if it is going to give problems with the
+ cvsnt implementation.</item>
+ </list>
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsPass.Password">
+ <summary>
+ Password to append or update to the .cvspass file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsPass.PassFile">
+ <summary>
+ The full path to the .cvspass file. The default is ~/.cvspass.
+ </summary>
+ <value></value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsPass.DestinationDirectory">
+ <summary>
+ The current working directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsPass.Root">
+ <summary>
+ The repository root string.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.CvsTask">
+ <summary>
+ Executes the cvs command specified by the command attribute.
+ </summary>
+ <example>
+ <para>Checkout NAnt.</para>
+ <code>
+ <![CDATA[
+ <cvs command="checkout"
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsTask.CommandName">
+ <summary>
+ The cvs command to execute.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.CvsTask.IsModuleNeeded">
+ <summary>
+ Specify if the module is needed for this cvs command.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.ExportTask">
+ <summary>
+ Exports a cvs module in preperation for a release (i.e. the CVS version
+ folders are not exported).
+ </summary>
+ <example>
+ <para>Export the most recent NAnt sources from cvs.</para>
+ <code>
+ <![CDATA[
+ <cvs-export
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Export NAnt revision named <c>your_favorite_revision_here</c> to the
+ folder <c>c:\src\nant\replacement_for_module_directory_name</c>.
+
+ <warn>**NOTE**</warn>: filesets names for the export task must be
+ prefixed with the module name. This is different than other tasks.
+ </para>
+ <code>
+ <![CDATA[
+ <cvs-export
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ revision="your_favorite_revision_here"
+ overridedir="replacement_for_module_directory_name"
+ recursive="false">
+ <fileset>
+ <include name="nant/bin/NAnt.exe"/>
+ <include name="nant/bin/NAnt.exe.config"/>
+ </fileset>
+ </cvs-export>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.ExportTask.CvsCommandName">
+ <summary>
+ The command being executed.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.ExportTask.#ctor">
+ <summary>
+ Create a new instance of the <see cref="T:NAnt.SourceControl.Tasks.ExportTask"/>.
+ </summary>
+ <value>
+ The following values are set by default:
+ <ul>
+ <li>Recursive: <see langword="true"/></li>
+ </ul>
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.NoShortening">
+ <summary>
+ No shortening. Do not shorten module paths if -d specified.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.ForceHead">
+ <summary>
+ Indicates whether the head revision should be used if the revison specified by
+ <see cref="P:NAnt.SourceControl.Tasks.ExportTask.Revision"/> or the <see cref="P:NAnt.SourceControl.Tasks.ExportTask.Date"/> tags are not
+ found. The default is <see langword="false"/>.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.Recursive">
+ <summary>
+ If a directory is specified indicates whether sub-directories should
+ also be processed.
+ </summary>
+ <value>
+ <see langword="true" /> if the sub-directories should be tagged;
+ otherwise, <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.Revision">
+ <summary>
+ Specify the revision to update the file to. This corresponds to the "sticky-tag"
+ of the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.Date">
+ <summary>
+ Specify the revision date to update to. The version of the file that
+ existed at the date specified is retrieved.
+ </summary>
+ <value>
+ A valid date time value, which is then converted to a format that
+ cvs can parse.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.OverrideDir">
+ <summary>
+ Specify a directory name to replace the module name. Valid names
+ include any valid filename, excluding path information.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.ExportTask.CommandName">
+ <summary>
+ The export command name for the cvs client.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.RTagTask">
+ <summary>
+ Tags all sources in the remote repository with a given tag.
+ </summary>
+ <remarks>
+ <para>
+ Unlike tag, the rtag command acts only on sources that are in the repository.
+ Any modified sources on the local file system will NOT be tagged with this
+ command, so a commit should be performed before an rtag is done.
+ </para>
+ <para>
+ NOTE: Although a working directory is not necessary to perform the command
+ one must be specified in order to remain in compliance with the cvs library.
+ </para>
+ </remarks>
+ <example>
+ <para>Tag NAnt sources remotely.</para>
+ <code>
+ <![CDATA[
+ <cvs-rtag
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ destination="."
+ tag="v0_8_4"
+ />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Remove a tag from the remote repository.</para>
+ <code>
+ <![CDATA[
+ <cvs-rtag
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ destination="."
+ tag="v0_8_4"
+ remove="true"
+ />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.RTagTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.RTagTask"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.RTagTask.AppendSubCommandArgs">
+ <summary>
+ Append the tag information to the commandline.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.Tag">
+ <summary>
+ The name of the tag to assign or remove.
+ </summary>
+ <value>
+ The name of the tag to assign or remove.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.Remove">
+ <summary>
+ Indicates whether the tag specified in <see cref="P:NAnt.SourceControl.Tasks.RTagTask.Tag"/> should
+ be removed or not.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be removed;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.MoveIfExists">
+ <summary>
+ Indicates whether the tag specified in <see cref="P:NAnt.SourceControl.Tasks.RTagTask.Tag"/> should
+ be moved to the current file revision. If the tag does not exist
+ then it is created.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.Recursive">
+ <summary>
+ If a directory is specified indicates whether sub-directories should
+ also be processed.
+ </summary>
+ <value>
+ <see langword="true" /> if the sub-directories should be tagged;
+ otherwise, <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.ActOnTag">
+ <summary>
+ Indicates the repository <see cref="P:NAnt.SourceControl.Tasks.RTagTask.Tag"/> that is acted on
+ for the tag command. Note if <see cref="P:NAnt.SourceControl.Tasks.RTagTask.MoveIfExists"/> is
+ <see langword="true"/> then the tag specified is moved to the revision
+ of the file on the HEAD of the branch specified.
+ </summary>
+ <value>
+ The tag (or more likely) branch that should be used to apply the new tag.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.ActOnDate">
+ <summary>
+ Indicates the revision date of the file that the tag should be
+ applied to.
+ </summary>
+ <value>
+ A valid date which specifies the revision point that the tag will
+ be applied to.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.ForceHead">
+ <summary>
+ Indicates whether the head revision should be used if the
+ <see cref="P:NAnt.SourceControl.Tasks.RTagTask.ActOnTag"/> or the <see cref="P:NAnt.SourceControl.Tasks.RTagTask.ActOnDate"/> tags are not
+ found.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.RTagTask.CommandName">
+ <summary>
+ The name of the cvs command that is going to be executed.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.TagTask">
+ <summary>
+ Tags all local sources with the specified tag.
+ </summary>
+ <remarks>
+ <para>
+ This differs from the
+ <see cref="T:NAnt.SourceControl.Tasks.RTagTask"/> in that it acts on references to the cvs files
+ contained in your local filesystem. As such the sticky tags and local
+ revisions can be considered in commits. It also allows you to verify that
+ all local files have been checked in before a tag is performed.
+ </para>
+ </remarks>
+ <example>
+ <para>Tag NAnt sources remotely.</para>
+ <code>
+ <![CDATA[
+ <cvs-tag
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ destination="."
+ tag="v0_8_4"
+ />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>Remove a tag from the remote repository.</para>
+ <code>
+ <![CDATA[
+ <cvs-tag
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ destination="."
+ tag="v0_8_4"
+ remove="true"
+ fail-if-modified="true"
+ />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.TagTask.CvsCommandName">
+ <summary>
+ Cvs command to be executed.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.TagTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.TagTask"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.TagTask.AppendSubCommandArgs">
+ <summary>
+ Append the tag information to the commandline.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.Tag">
+ <summary>
+ The name of the tag to assign or remove.
+ </summary>
+ <value>
+ The name of the tag to assign or remove.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.Remove">
+ <summary>
+ Indicates whether the tag specified in <see cref="P:NAnt.SourceControl.Tasks.TagTask.Tag"/> should
+ be removed or not.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be removed;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.MoveIfExists">
+ <summary>
+ Indicates whether the tag specified in <see cref="P:NAnt.SourceControl.Tasks.TagTask.Tag"/> should
+ be moved to the current file revision. If the tag does not exist
+ then it is created.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.Recursive">
+ <summary>
+ If a directory is specified indicates whether sub-directories should
+ also be processed.
+ </summary>
+ <value>
+ <see langword="true" /> if the sub-directories should be tagged;
+ otherwise, <see langword="false" />. The default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.ActOnTag">
+ <summary>
+ Indicates the repository <see cref="P:NAnt.SourceControl.Tasks.TagTask.Tag"/> that is acted on
+ for the tag command. Note if <see cref="P:NAnt.SourceControl.Tasks.TagTask.MoveIfExists"/> is
+ <see langword="true"/> then the tag specified is moved to the revision
+ of the file on the HEAD of the branch specified.
+ </summary>
+ <value>
+ The tag (or more likely) branch that should be used to apply the new tag.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.ActOnDate">
+ <summary>
+ Indicates the revision date of the file that the tag should be
+ applied to.
+ </summary>
+ <value>
+ A valid date which specifies the revision point that the tag will
+ be applied to.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.ForceHead">
+ <summary>
+ Indicates whether the head revision should be used if the revision specified by
+ <see cref="P:NAnt.SourceControl.Tasks.TagTask.ActOnTag"/> or the <see cref="P:NAnt.SourceControl.Tasks.TagTask.ActOnDate"/> tags are not
+ found.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.FailIfModified">
+ <summary>
+ Indicates whether the head revision should be used if the
+ <see cref="P:NAnt.SourceControl.Tasks.TagTask.ActOnTag"/> or the <see cref="P:NAnt.SourceControl.Tasks.TagTask.ActOnDate"/> tags are not
+ found.
+ </summary>
+ <value>
+ <see langword="true"/> if the specified tag should be moved;
+ otherwise, <see langword="false"/>. The default is <see langword="false"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.CommandName">
+ <summary>
+ The name of the cvs command that is going to be executed.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.Module">
+ <summary>
+ Not used
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.TagTask.IsModuleNeeded">
+ <summary>
+ Specify if the module is needed for this cvs command. It is
+ only needed if there is no module information on the local file
+ system.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Tasks.UpdateTask">
+ <summary>
+ Updates a CVS module in a local working directory.
+ </summary>
+ <example>
+ <para>Update nant.</para>
+ <code>
+ <![CDATA[
+ <cvs-update
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ password=""
+ module="nant" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Update your NAnt revision named <c>your_favorite_revision_here</c> in
+ the folder <c>c:\src\nant\replacement_for_module_directory_name</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <cvs-update
+ destination="c:\src\nant\"
+ cvsroot=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/nant"
+ module="nant"
+ revision="your_favorite_revision_here"
+ overridedir="replacement_for_module_directory_name"
+ usesharpcvslib="false">
+ <fileset>
+ <include name="build.number"/>
+ </fileset>
+ </cvs-update>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.SourceControl.Tasks.UpdateTask.CvsCommandName">
+ <summary>
+ The command being executed.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Tasks.UpdateTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.SourceControl.Tasks.UpdateTask"/>
+ class.
+ </summary>
+ <remarks>
+ Sets the build directory and prune empty directory properties to
+ <see langword="true"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.BuildDirs">
+ <summary>
+ If <see langword="true" />. new directories will be created on the local
+ sandbox. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.PruneEmpty">
+ <summary>
+ If <see langword="true" /> empty directories copied down from the
+ remote repository will be removed from the local sandbox.
+ The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.OverwriteLocal">
+ <summary>
+ If <see langword="true" /> the local copy of the file will be
+ overwritten with the copy from the remote repository. The default
+ is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.Recursive">
+ <summary>
+ Specifies if the command should be executed recursively. The
+ default is <see langword="true" />.
+ </summary>
+ <remarks>
+ The <c>-R</c> option is on by default in cvs.
+ </remarks>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.Revision">
+ <summary>
+ Specify the revision to update the file to. This corresponds to the
+ "sticky-tag" of the file.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.StickyTag">
+ <summary>
+ Sticky tag or revision to update the local file to.
+ </summary>
+ <value>
+ A valid cvs tag.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.Date">
+ <summary>
+ Specify the revision date to update to. The version of the file that
+ existed at the date specified is retrieved.
+ </summary>
+ <value>
+ A valid date time value, which is then converted to a format that
+ cvs can parse.
+ </value>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.IsModuleNeeded">
+ <summary>
+ Specify if the module is needed for this cvs command. It is
+ only needed if there is no module information on the local file
+ system.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Tasks.UpdateTask.CommandName">
+ <summary>
+ The name of the cvs command that is going to be executed.
+ </summary>
+ </member>
+ <member name="T:NAnt.SourceControl.Types.CvsFileSet">
+ <summary>
+ A <see cref="T:NAnt.SourceControl.Types.CvsFileSet"/> is a <see cref="T:NAnt.Core.Types.FileSet"/> with extra
+ attributes useful in the context of the <see cref="T:NAnt.SourceControl.Tasks.CvsTask"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.SourceControl.Types.CvsFileSet.Initialize">
+ <summary>
+ Initialize the <see cref="T:NAnt.SourceControl.Types.CvsFileSet"/> object and locate the .cvsignore
+ files to add to the exclude list.
+ </summary>
+ </member>
+ <member name="P:NAnt.SourceControl.Types.CvsFileSet.UseCvsIgnore">
+ <summary>
+ Indicates whether the entires in the .cvsignore should be used to limit the
+ file list; <see langword="true"/> to exclude files in .cvsignore, otherwise
+ <see langword="false"/>. The default is <see langword="true"/>.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.VSNetTasks.xml b/external/guiunit/tools/nant/bin/NAnt.VSNetTasks.xml
new file mode 100755
index 0000000..445d275
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.VSNetTasks.xml
@@ -0,0 +1,3986 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.VSNetTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.VSNet.Everett.Solution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2003 (Everett) solution files.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.GetProjectFileFromGuid(System.String)">
+ <summary>
+ Gets the project file of the project with the given unique identifier.
+ </summary>
+ <param name="projectGuid">The unique identifier of the project for which the project file should be retrieves.</param>
+ <returns>
+ The project file of the project with the given unique identifier.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">No project with unique identifier <paramref name="projectGuid"/> could be located.</exception>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to be logged.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.LoadProjects(NAnt.Core.Util.GacCache,NAnt.VSNet.ReferencesResolver,System.Collections.Hashtable)">
+ <summary>
+ Loads the projects from the file system and stores them in an
+ instance variable.
+ </summary>
+ <param name="gacCache"><see cref="T:NAnt.Core.Util.GacCache"/> instance to use to determine whether an assembly is located in the Global Assembly Cache.</param>
+ <param name="refResolver"><see cref="T:NAnt.VSNet.ReferencesResolver"/> instance to use to determine location and references of assemblies.</param>
+ <param name="explicitProjectDependencies">TODO</param>
+ <exception cref="T:NAnt.Core.BuildException">A project GUID in the solution file does not match the actual GUID of the project in the project file.</exception>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.TranslateProjectPath(System.String,System.String)">
+ <summary>
+ Translates a project path, in the form of a relative file path or
+ a URL, to an absolute file path.
+ </summary>
+ <param name="solutionDir">The directory of the solution.</param>
+ <param name="projectPath">The project path to translate to an absolute file path.</param>
+ <returns>
+ The project path translated to an absolute file path.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.FixProjectReferences(NAnt.VSNet.ProjectBase,NAnt.VSNet.Configuration,System.Collections.Hashtable,System.Collections.Hashtable)">
+ <summary>
+ Converts assembly references to projects to project references, adding
+ a build dependency.c
+ </summary>
+ <param name="project">The <see cref="T:NAnt.VSNet.ProjectBase"/> to analyze.</param>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="builtProjects"><see cref="T:System.Collections.Hashtable"/> containing list of projects that have been built.</param>
+ <param name="failedProjects"><see cref="T:System.Collections.Hashtable"/> containing list of projects that failed to build.</param>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionBase.HasDirtyProjectDependency(NAnt.VSNet.ProjectBase,System.Collections.Hashtable)">
+ <summary>
+ Determines whether any of the project dependencies of the specified
+ project still needs to be built.
+ </summary>
+ <param name="project">The <see cref="T:NAnt.VSNet.ProjectBase"/> to analyze.</param>
+ <param name="builtProjects"><see cref="T:System.Collections.Hashtable"/> containing list of projects that have been built.</param>
+ <returns>
+ <see langword="true"/> if one of the project dependencies has not
+ yet been built; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Extensibility.IProjectBuildProvider.IsSupported(System.String,System.Xml.XmlElement)">
+ <summary>
+ Returns a number representing how much this file fits this project type.
+ </summary>
+ <param name="projectExt"></param>
+ <param name="xmlDefinition"></param>
+ <returns></returns>
+ <remarks>
+ This enables the override in other providers. Do not return big numbers, mainly when compring only on filename.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.Rainier.Solution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2002 (Rainier) solution files.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.Tasks.SolutionTask">
+ <summary>
+ Compiles VS.NET solutions (or sets of projects), automatically determining
+ project dependencies from inter-project references.
+ </summary>
+ <remarks>
+ <para>
+ This task support the following projects:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>Visual Basic .NET</description>
+ </item>
+ <item>
+ <description>Visual C# .NET</description>
+ </item>
+ <item>
+ <description>Visual J# .NET</description>
+ </item>
+ <item>
+ <description>Visual C++ .NET</description>
+ </item>
+ </list>
+ <note>
+ Right now, only Microsoft Visual Studio .NET 2002 and 2003 solutions
+ and projects are supported. Support for .NET Compact Framework projects
+ is also not available at this time.
+ </note>
+ <para>
+ The <see cref="T:NAnt.VSNet.Tasks.SolutionTask"/> also supports the model of referencing
+ projects by their output filenames, rather than referencing them inside
+ the solution. It will automatically detect the existance of a file
+ reference and convert it to a project reference. For example, if project
+ "A" references the file in the release output directory of
+ project "B", the <see cref="T:NAnt.VSNet.Tasks.SolutionTask"/> will automatically
+ convert this to a project dependency on project "B" and will
+ reference the appropriate configuration output directory at the final
+ build time (ie: reference the debug version of "B" if the
+ solution is built as debug).
+ </para>
+ <note>
+ The <see cref="T:NAnt.VSNet.Tasks.SolutionTask"/> expects all project files to be valid
+ XML files.
+ </note>
+ <h3>Resx Files</h3>
+ <para>
+ When building a project for a down-level target framework, special care
+ should be given to resx files. Resx files (can) contain references to
+ a specific version of CLR types, and as such are only upward compatible.
+ </para>
+ <para>
+ For example: if you want to be able to build a project both as a .NET 1.0
+ and .NET 1.1 assembly, the resx files should only contain references to
+ .NET 1.0 CLR types. Failure to do this may result in a <see cref="T:System.InvalidCastException"/>
+ failure at runtime on machines with only the .NET Framework 1.0 installed.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Compiles all of the projects in <c>test.sln</c>, in release mode, in
+ the proper order.
+ </para>
+ <code>
+ <![CDATA[
+ <solution configuration="release" solutionfile="test.sln" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compiles all of the projects in <c>projects.txt</c>, in the proper
+ order.
+ </para>
+ <code>
+ <![CDATA[
+ <solution configuration="release">
+ <projects>
+ <includesfile name="projects.txt" />
+ </projects>
+ </solution>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compiles projects A, B and C, using the output of project X as a
+ reference.
+ </para>
+ <code>
+ <![CDATA[
+ <solution configuration="release">
+ <projects>
+ <include name="A\A.csproj" />
+ <include name="B\b.vbproj" />
+ <include name="C\c.csproj" />
+ </projects>
+ <referenceprojects>
+ <include name="X\x.csproj" />
+ </referenceprojects>
+ </solution>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compiles all of the projects in the solution except for project A.
+ </para>
+ <code>
+ <![CDATA[
+ <solution solutionfile="test.sln" configuration="release">
+ <excludeprojects>
+ <include name="A\A.csproj" />
+ </excludeprojects>
+ </solution>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compiles all of the projects in the solution mapping the specific project at
+ http://localhost/A/A.csproj to c:\inetpub\wwwroot\A\A.csproj and any URLs under
+ http://localhost/B/[remainder] to c:\other\B\[remainder]. This allows the build
+ to work without WebDAV.
+ </para>
+ <code>
+ <![CDATA[
+ <solution solutionfile="test.sln" configuration="release">
+ <webmap>
+ <map url="http://localhost/A/A.csproj" path="c:\inetpub\wwwroot\A\A.csproj" />
+ <map url="http://localhost/B" path="c:\other\B" />
+ </webmap>
+ </solution>
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compiles all of the projects in the solution placing compiled outputs
+ in <c>c:\temp</c>.</para>
+ <code>
+ <![CDATA[
+ <solution solutionfile="test.sln" configuration="release" outputdir="c:\temp" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.VSNet.Tasks.SolutionTask._customproperties">
+ <summary>
+ Private var containing custom properties.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Tasks.SolutionTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.Tasks.SolutionTask"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Tasks.SolutionTask.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro or <see langword="null"/> if the macro is not
+ supported.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">The macro cannot be expanded.</exception>
+ </member>
+ <member name="M:NAnt.VSNet.Tasks.SolutionTask.BuildAssemblyFolders">
+ <summary>
+ Builds the list of folders that should be scanned for assembly
+ references.
+ </summary>
+ <returns>
+ The list of folders that should be scanned for assembly references.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.Projects">
+ <summary>
+ The projects to build.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.ReferenceProjects">
+ <summary>
+ The projects to scan, but not build.
+ </summary>
+ <remarks>
+ These projects are used to resolve project references and are
+ generally external to the solution being built. References to
+ these project's output files are converted to use the appropriate
+ solution configuration at build time.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.SolutionFile">
+ <summary>
+ The name of the VS.NET solution file to build.
+ </summary>
+ <remarks>
+ <para>
+ The <see cref="P:NAnt.VSNet.Tasks.SolutionTask.Projects"/> can be used instead to supply a list
+ of Visual Studio.NET projects that should be built.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.Configuration">
+ <summary>
+ The name of the solution configuration to build.
+ </summary>
+ <remarks>
+ <para>
+ Generally <c>release</c> or <c>debug</c>. Not case-sensitive.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.Platform">
+ <summary>
+ The name of platform to build the solution for.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.SolutionConfig">
+ <summary>
+ Gets the solution configuration to build.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.OutputDir">
+ <summary>
+ The directory where compiled targets will be placed. This
+ overrides path settings contained in the solution/project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.WebMaps">
+ <summary>
+ WebMap of URL's to project references.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.ExcludeProjects">
+ <summary>
+ Fileset of projects to exclude.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.AssemblyFolders">
+ <summary>
+ Set of folders where references are searched when not found in path
+ from project file (HintPath).
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.IncludeVSFolders">
+ <summary>
+ Includes Visual Studio search folders in reference search path.
+ The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.EnableWebDav">
+ <summary>
+ Allow the task to use WebDAV for retrieving/compiling the projects within solution. Use of
+ <see cref="T:NAnt.VSNet.Types.WebMap"/> is preferred over WebDAV. The default is <see langword="false"/>.
+ </summary>
+ <remarks>
+ <para>WebDAV support requires permission changes to be made on your project server. These changes may affect
+ the security of the server and should not be applied to a public installation.</para>
+ <para>Consult your web server or the NAnt Wiki documentation for more information.</para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.CustomProperties">
+ <summary>
+ Set of properties set at solution level. Builders for projects in solution may or may not use them.
+ </summary>
+ <remarks>
+ <para>
+ TODO: some documentataion which properties could be defined here.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Tasks.SolutionTask.AssemblyFolderList">
+ <summary>
+ Gets the list of folders to scan for assembly references.
+ </summary>
+ <value>
+ The list of folders to scan for assembly references.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.Types.UseOfATL">
+ <summary>
+ Defines how the project is using the ATL library.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfATL.NotUsing">
+ <summary>
+ Don't use ATL.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfATL.Static">
+ <summary>
+ Use ATL in a Static Library.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfATL.Shared">
+ <summary>
+ Use ATL in a Shared DLL.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.Types.UseOfMFC">
+ <summary>
+ Defines how the project is using the MFC library.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfMFC.NotUsing">
+ <summary>
+ Don't use MFC.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfMFC.Static">
+ <summary>
+ Use MFC in a Static Library.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UseOfMFC.Shared">
+ <summary>
+ Use MFC in a Shared DLL.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.Types.UsePrecompiledHeader">
+ <summary>
+ Indicates the possible ways in which precompiled header file use is
+ specified in a Visual C++ project.
+ </summary>
+ <remarks>
+ The integer values assigned match those specified in the Visual C++
+ project file for each setting.
+ </remarks>>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UsePrecompiledHeader.Unspecified">
+ <summary>
+ Precompiled header file use not specified.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UsePrecompiledHeader.No">
+ <summary>
+ Don't use a precompiled header file.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yc.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UsePrecompiledHeader.Create">
+ <summary>
+ Create precompiled header file.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yc.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UsePrecompiledHeader.AutoCreate">
+ <summary>
+ Automatically create precompiled header file if necessary.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yc.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.Types.UsePrecompiledHeader.Use">
+ <summary>
+ Use a precompiled header file.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yu.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.Types.WebMap">
+ <summary>
+ Represents a single mapping from URL project path to physical project
+ path.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMap.Url">
+ <summary>
+ Specifies the URL of the project file, or a URL fragment to match.
+ </summary>
+ <value>
+ The URL of the project file or the URL fragment to match.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMap.Path">
+ <summary>
+ Specifies the actual path to the project file, or the path fragment
+ to replace.
+ </summary>
+ <value>
+ The actual path to the project file or the path fragment to replace
+ the URL fragment with.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMap.CaseSensitive">
+ <summary>
+ Specifies whether the mapping is case-sensitive or not.
+ </summary>
+ <value>
+ A boolean flag representing the case-sensitivity of the mapping. Default is <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMap.IfDefined">
+ <summary>
+ Indicates if the URL of the project file should be mapped.
+ </summary>
+ <value>
+ <see langword="true" /> if the URL of the project file should be
+ mapped; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMap.UnlessDefined">
+ <summary>
+ Indicates if the URL of the project file should not be mapped.
+ </summary>
+ <value>
+ <see langword="true" /> if the URL of the project file should not
+ be mapped; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.Types.WebMapCollection">
+ <summary>
+ Contains a strongly typed collection of <see cref="T:NAnt.VSNet.Types.WebMap"/>
+ objects.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.#ctor(NAnt.VSNet.Types.WebMapCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> class
+ with the specified <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.#ctor(NAnt.VSNet.Types.WebMap[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> class
+ with the specified array of <see cref="T:NAnt.VSNet.Types.WebMap"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.FindBestMatch(System.String)">
+ <summary>
+ Find the best matching <see cref="T:NAnt.VSNet.Types.WebMap"/> for the given Uri.
+ </summary>
+ <param name="uri">The value to match against the <see cref="T:NAnt.VSNet.Types.WebMap"/> objects in the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.Add(NAnt.VSNet.Types.WebMap)">
+ <summary>
+ Adds a <see cref="T:NAnt.VSNet.Types.WebMap"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.Types.WebMap"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.AddRange(NAnt.VSNet.Types.WebMap[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.Types.WebMap"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.VSNet.Types.WebMap"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.AddRange(NAnt.VSNet.Types.WebMapCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.VSNet.Types.WebMapCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.Contains(NAnt.VSNet.Types.WebMap)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.Types.WebMap"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.Types.WebMap"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.Types.WebMap"/> with the specified
+ value is in the collection.
+ </summary>
+ <param name="value">The argument value to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.VSNet.Types.WebMap"/> with value
+ <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.CopyTo(NAnt.VSNet.Types.WebMap[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.IndexOf(NAnt.VSNet.Types.WebMap)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.VSNet.Types.WebMap"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.Types.WebMap"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.VSNet.Types.WebMap"/>. If the <see cref="T:NAnt.VSNet.Types.WebMap"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.Insert(System.Int32,NAnt.VSNet.Types.WebMap)">
+ <summary>
+ Inserts a <see cref="T:NAnt.VSNet.Types.WebMap"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.VSNet.Types.WebMap"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.VSNet.Types.WebMapEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapCollection.Remove(NAnt.VSNet.Types.WebMap)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.Types.WebMap"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMapCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMapCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.VSNet.Types.WebMap"/> with the specified value.
+ </summary>
+ <param name="value">The value of the <see cref="T:NAnt.VSNet.Types.WebMap"/> to get.</param>
+ </member>
+ <member name="T:NAnt.VSNet.Types.WebMapEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.VSNet.Types.WebMap"/> elements of a <see cref="T:NAnt.VSNet.Types.WebMapCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapEnumerator.#ctor(NAnt.VSNet.Types.WebMapCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.Types.WebMapEnumerator"/> class
+ with the specified <see cref="T:NAnt.VSNet.Types.WebMapCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Types.WebMapEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Types.WebMapEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.GetPrimaryOutputFile(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the output path of the reference, without taking the "copy local"
+ setting into consideration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The full output path of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files of the reference for the
+ specified configuration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.GetAssemblyReferences(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the complete set of assemblies that need to be referenced when
+ a project references this component.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The complete set of assemblies that need to be referenced when a
+ project references this component.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.GetTimestamp(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the timestamp of the reference.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The timestamp of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether the reference is managed for the
+ specified configuration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ <see langword="true" /> if the reference is managed for the
+ specified configuration; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.GetFileTimestamp(System.String)">
+ <summary>
+ Returns the date and time the specified file was last written to.
+ </summary>
+ <param name="fileName">The file for which to obtain write date and time information.</param>
+ <returns>
+ A <see cref="T:System.DateTime"/> structure set to the date and time that
+ the specified file was last written to, or
+ <see cref="F:System.DateTime.MaxValue"/> if the specified file does not
+ exist.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to be logged.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ReferenceBase.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ReferenceBase.CopyLocal">
+ <summary>
+ Gets a value indicating whether the output file(s) of this reference
+ should be copied locally.
+ </summary>
+ <value>
+ <see langword="true" /> if the output file(s) of this reference
+ should be copied locally; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ReferenceBase.IsSystem">
+ <summary>
+ Gets a value indicating whether this reference represents a system
+ assembly.
+ </summary>
+ <value>
+ <see langword="true" /> if this reference represents a system
+ assembly; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ReferenceBase.Parent">
+ <summary>
+ Gets the project in which the reference is defined.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.FileReferenceBase.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether the reference is managed for the
+ specified configuration.
+ </summary>
+ <param name="config">The build configuration of the reference.</param>
+ <returns>
+ <see langword="true" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.FileReferenceBase.GetAssemblyOutputFiles(System.String,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the specified assembly
+ and adds them to <paremref name="outputFiles"/> collection.
+ </summary>
+ <param name="assemblyFile">The path of the assembly to get the output files for.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.GetPrimaryOutputFile(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the path of the reference, without taking the "copy local"
+ setting into consideration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The output path of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the referenced project.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.GetAssemblyReferences(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the complete set of assemblies that need to be referenced when
+ a project references this component.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The complete set of assemblies that need to be referenced when a
+ project references this component.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.GetTimestamp(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the timestamp of the reference.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The timestamp of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.ResolveAssemblyReference">
+ <summary>
+ Resolves an assembly reference.
+ </summary>
+ <returns>
+ The full path to the resolved assembly, or <see langword="null" />
+ if the assembly reference could not be resolved.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.ResolveFromFolderList(System.Collections.Specialized.StringCollection,System.String)">
+ <summary>
+ Searches for the given file in all paths in <paramref name="folderList" />.
+ </summary>
+ <param name="folderList">The folders to search.</param>
+ <param name="fileName">The file to search for.</param>
+ <returns>
+ The path of the assembly if <paramref name="fileName" /> was found
+ in <paramref name="folderList" />; otherwise, <see langword="null" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.ResolveFromFramework(System.String)">
+ <summary>
+ Resolves an assembly reference in the framework assembly directory
+ of the target framework.
+ </summary>
+ <param name="fileName">The file to search for.</param>
+ <returns>
+ The full path of the assembly file if the assembly could be located
+ in the framework assembly directory; otherwise, <see langword="null" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.AssemblyReferenceBase.ResolveFromRelativePath(System.String)">
+ <summary>
+ Resolves an assembly reference using a path relative to the project
+ directory.
+ </summary>
+ <returns>
+ The full path of the assembly, or <see langword="null"/> if
+ <paramref name="relativePath"/> is <see langword="null"/> or an
+ empty <see cref="T:System.String"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.AssemblyReferenceBase.CopyLocal">
+ <summary>
+ Gets a value indicating whether the output file(s) of this reference
+ should be copied locally.
+ </summary>
+ <value>
+ <see langword="true" /> if the output file(s) of this reference
+ should be copied locally; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.AssemblyReferenceBase.IsSystem">
+ <summary>
+ Gets a value indicating whether this reference represents a system
+ assembly.
+ </summary>
+ <value>
+ <see langword="true" /> if this reference represents a system
+ assembly; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationBase.#ctor(NAnt.VSNet.ProjectBase)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ConfigurationBase"/>
+ class with the given <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="project">The project of the configuration.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationBase.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The macro is not supported.</para>
+ <para>-or-</para>
+ <para>The macro is not implemented.</para>
+ <para>-or-</para>
+ <para>The macro cannot be expanded.</para>
+ </exception>
+ <exception cref="T:System.NotImplementedException">
+ <para>Expansion of a given macro is not yet implemented.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationBase.EvaluateMacro(System.Text.RegularExpressions.Match)">
+ <summary>
+ Is called each time a regular expression match is found during a
+ <see cref="M:Regex.Replace(string, MatchEvaluator)"/> operation.
+ </summary>
+ <param name="m">The <see cref="T:System.Text.RegularExpressions.Match"/> resulting from a single regular expression match during a <see cref="M:Regex.Replace(string, MatchEvaluator)"/>.</param>
+ <returns>
+ The expanded <see cref="T:System.Text.RegularExpressions.Match"/>.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.Project">
+ <summary>
+ Gets the project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.Name">
+ <summary>
+ Gets the name of the configuration.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.ObjectDir">
+ <summary>
+ Get the directory in which intermediate build output will be stored
+ for this configuration.
+ </summary>
+ <remarks>
+ <para>
+ This is a directory relative to the project directory named
+ <c>obj\<configuration name></c>.
+ </para>
+ <para>
+ <c>.resx</c> and <c>.licx</c> files will only be recompiled if the
+ compiled resource files in the <see cref="P:NAnt.VSNet.ConfigurationBase.ObjectDir"/> are not
+ uptodate.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.OutputDir">
+ <summary>
+ Gets the output directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.OutputPath">
+ <summary>
+ Gets the path for the output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.BuildPath">
+ <summary>
+ Gets the path in which the output file will be created before its
+ copied to the actual output path.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.RelativeOutputDir">
+ <summary>
+ Get the path of the output directory relative to the project
+ directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.PlatformName">
+ <summary>
+ Gets the platform that the configuration targets.
+ </summary>
+ <value>
+ The platform targeted by the configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationBase.ExtraOutputFiles">
+ <summary>
+ Gets the set of output files that is specific to the project
+ configuration.
+ </summary>
+ <value>
+ The set of output files that is specific to the project
+ configuration.
+ </value>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationDictionary.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ConfigurationDictionary"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationMap.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ConfigurationMap"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ConfigurationMap.#ctor(System.Int32)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ConfigurationMap"/>
+ class with the specified initial capacity.
+ </summary>
+ <param name="capacity">The appropriate number of entries that the <see cref="T:NAnt.VSNet.ConfigurationMap"/> can initially contain.</param>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationSettings.PlatformName">
+ <summary>
+ Gets the platform that the configuration targets.
+ </summary>
+ <value>
+ The platform targeted by the configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationSettings.BuildPath">
+ <summary>
+ Gets the path in which the output file will be created before its
+ copied to the actual output path.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ConfigurationSettings.RegisterForComInterop">
+ <summary>
+ Gets a value indicating whether to register the project output for
+ use with COM components.
+ </summary>
+ <value>
+ <see langword="true" /> if the project output should be registered
+ for use with COM components; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectBase">
+ <summary>
+ Base class for all project classes.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.#ctor(System.Xml.XmlElement,NAnt.VSNet.Tasks.SolutionTask,System.CodeDom.Compiler.TempFileCollection,NAnt.Core.Util.GacCache,NAnt.VSNet.ReferencesResolver,System.IO.DirectoryInfo)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectBase"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the project configuration
+ matching the specified solution configuration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ <para>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </para>
+ <para>
+ If the project is not configured to be built for the specified
+ solution configuration, then no output files are added.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether building the project for the specified
+ build configuration results in managed output.
+ </summary>
+ <param name="configuration">The build configuration.</param>
+ <returns>
+ <see langword="true" /> if the project output for the given build
+ configuration is managed; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro or <see langword="null" /> if the macro is not
+ supported.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.VerifyProjectXml(System.Xml.XmlElement)">
+ <summary>
+ Verifies whether the specified XML fragment represents a valid project
+ that is supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The XML fragment is not supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.</para>
+ <para>-or-</para>
+ <para>The XML fragment does not represent a valid project (for this <see cref="T:NAnt.VSNet.ProjectBase"/>).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.Prepare(NAnt.VSNet.Configuration)">
+ <summary>
+ Prepares the project for being built.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <remarks>
+ The default implementation will ensure that none of the output files
+ are marked read-only.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.CopyFile(System.IO.FileInfo,System.IO.FileInfo,NAnt.Core.Task)">
+ <summary>
+ Copies the specified file if the destination file does not exist, or
+ the source file has been modified since it was previously copied.
+ </summary>
+ <param name="srcFile">The file to copy.</param>
+ <param name="destFile">The destination file.</param>
+ <param name="parent">The <see cref="T:NAnt.Core.Task"/> in which context the operation will be performed.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.Log(NAnt.Core.Level,System.String)">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to be logged.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBase.Log(NAnt.Core.Level,System.String,System.Object[])">
+ <summary>
+ Logs a message with the given priority.
+ </summary>
+ <param name="messageLevel">The message priority at which the specified message is to be logged.</param>
+ <param name="message">The message to log, containing zero or more format items.</param>
+ <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
+ <remarks>
+ The actual logging is delegated to the underlying task.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProductVersion">
+ <summary>
+ Gets the Visual Studio product version of the project.
+ </summary>
+ <value>
+ The Visual Studio product version of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.Name">
+ <summary>
+ Gets the name of the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.Type">
+ <summary>
+ Gets the type of the project.
+ </summary>
+ <value>
+ The type of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProjectPath">
+ <summary>
+ Gets the path of the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProjectDirectory">
+ <summary>
+ Gets the directory containing the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProjectLocation">
+ <summary>
+ Get the location of the project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ObjectDir">
+ <summary>
+ Get the directory in which intermediate build output that is not
+ specific to the build configuration will be stored.
+ </summary>
+ <remarks>
+ <para>
+ For <see cref="T:NAnt.VSNet.ProjectLocation.Local" /> projects, this is defined
+ as <c><Project Directory<\obj</c>.
+ </para>
+ <para>
+ For <see cref="T:NAnt.VSNet.ProjectLocation.Web" /> projects, this is defined
+ as <c>%HOMEPATH%\VSWebCache\<Machine Name>\<Project Directory>\obj</c>.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.Guid">
+ <summary>
+ Gets or sets the unique identifier of the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProjectConfigurations">
+ <summary>
+ Gets a list of all configurations defined in the project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.BuildConfigurations">
+ <summary>
+ Gets a list of project configurations that can be build.
+ </summary>
+ <remarks>
+ <para>
+ Project configurations that are not in this list do not need to be
+ compiled.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ExtraOutputFiles">
+ <summary>
+ Gets the extra set of output files for the project.
+ </summary>
+ <value>
+ The extra set of output files for the project.
+ </value>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProjectDependencies">
+ <summary>
+ Gets the set of projects that the project depends on.
+ </summary>
+ <value>
+ The set of projects that the project depends on.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBase.ProductVersionNumber">
+ <summary>
+ TODO: refactor this !!!
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether building the project for the specified
+ build configuration results in managed output.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ <see langword="true" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.Prepare(NAnt.VSNet.Configuration)">
+ <summary>
+ Prepares the project for being built.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <remarks>
+ Ensures the configuration-level object directory exists and ensures
+ that none of the output files are marked read-only.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the project configuration
+ matching the specified solution configuration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ <para>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </para>
+ <para>
+ If the project is not configured to be built for the specified
+ solution configuration, then no output files are added.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetProcessStartInfo(NAnt.VSNet.ConfigurationBase,System.String)">
+ <summary>
+ Returns a <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler
+ for this project.
+ </summary>
+ <param name="config">The configuration to build.</param>
+ <param name="responseFile">The response file for the compiler.</param>
+ <returns>
+ A <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler for
+ this project.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.DetermineProjectLocation(System.Xml.XmlElement)">
+ <summary>
+ Returns the project location from the specified project XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <returns>
+ The project location of the specified project XML file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The project location could not be determined.</para>
+ <para>-or-</para>
+ <para>The project location is invalid.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetTypeLibraryPath(NAnt.VSNet.ConfigurationSettings)">
+ <summary>
+ Gets the absolute path of the type library for the project
+ output.
+ </summary>
+ <param name="config">The configuration to build.</param>
+ <returns>
+ The absolute path of the type library for the project output.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.RegisterForComInterop(NAnt.VSNet.ConfigurationSettings,NAnt.VSNet.Configuration,System.String)">
+ <summary>
+ Generates a type library for the specified assembly, registers it.
+ </summary>
+ <param name="config">The project configuration that is built.</param>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="typelibPath">The path of the type library to generate.</param>
+ <remarks>
+ The <c>regasm</c> tool is used to generate the type library.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.UnregisterForComInterop(NAnt.VSNet.ConfigurationSettings,NAnt.VSNet.Configuration)">
+ <summary>
+ Unregister a type library for the specified assembly, and the types
+ in that assembly.
+ </summary>
+ <param name="config">The project configuration that is built.</param>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <remarks>
+ The <c>regasm</c> tool is used to unregister the type library, and
+ remove the COM registration for types in the specified assembly.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetLocalizedResources">
+ <summary>
+ Returns <see cref="T:System.Collections.Hashtable"/> containing culture-specific resources.
+ </summary>
+ <returns>
+ A <see cref="T:System.Collections.Hashtable"/> containing culture-specific resources.
+ </returns>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is <see cref="T:System.Globalization.CultureInfo"/>
+ and the value is an <see cref="T:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet"/> instance
+ for that culture.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.CreateRegAsmTask">
+ <summary>
+ Creates and initializes a <see cref="T:NAnt.Win32.Tasks.RegAsmTask"/> instance.
+ </summary>
+ <returns>
+ An initialized <see cref="T:NAnt.Win32.Tasks.RegAsmTask"/> instance.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetProductVersion(System.Xml.XmlNode)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="projectNode">XML fragment representing the project to check.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.GetProjectLocation(System.Xml.XmlNode)">
+ <summary>
+ Returns the <see cref="P:NAnt.VSNet.ManagedProjectBase.ProjectLocation"/> of the specified project
+ XML fragment.
+ </summary>
+ <param name="projectNode">XML fragment representing the project to check.</param>
+ <returns>
+ The <see cref="P:NAnt.VSNet.ManagedProjectBase.ProjectLocation"/> of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The project location could not be determined.</para>
+ <para>-or-</para>
+ <para>The project location is invalid.</para>
+ </exception>
+ </member>
+ <member name="F:NAnt.VSNet.ManagedProjectBase._sourceFiles">
+ <summary>
+ Holds a case-insensitive list of source files.
+ </summary>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the full path of the
+ source file and the value is <see langword="null"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.FileExtension">
+ <summary>
+ Gets the default file extension of sources for this project.
+ </summary>
+ <value>
+ The default file extension of sources for this project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.IsWebProject">
+ <summary>
+ Gets a value indicating if this is a web project.
+ </summary>
+ <value>
+ <see langword="true" /> if this is a web project; otherwise,
+ <see langword="false" />.
+ </value>
+ <remarks>
+ If the url of a web project has been mapped to a local path
+ (using the <webmap> element), then this property will return
+ <see langword="false" /> for a <see cref="T:NAnt.VSNet.ProjectLocation.Web" />
+ project.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.Name">
+ <summary>
+ Gets the name of the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.ProjectPath">
+ <summary>
+ Gets the path of the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.ProjectDirectory">
+ <summary>
+ Gets the directory containing the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.ProjectLocation">
+ <summary>
+ Get the location of the project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.Guid">
+ <summary>
+ Gets or sets the unique identifier of the VS.NET project.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet">
+ <summary>
+ Groups a set of <see cref="T:NAnt.VSNet.Resource"/> instances for a specific
+ culture.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.#ctor(System.Globalization.CultureInfo)">
+ <summary>
+ Initializes a new <see cref="T:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet"/> instance
+ for the specified culture.
+ </summary>
+ <param name="culture">A <see cref="T:System.Globalization.CultureInfo"/>.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.GetBuildDirectory(NAnt.VSNet.ConfigurationSettings)">
+ <summary>
+ Gets the intermediate build directory in which the satellite
+ assembly is built.
+ </summary>
+ <param name="projectConfig">The project build configuration.</param>
+ <returns>
+ The intermediate build directory in which the satellite assembly
+ is built.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.GetSatelliteAssemblyPath(NAnt.VSNet.ConfigurationSettings,NAnt.VSNet.ProjectSettings)">
+ <summary>
+ Gets a <see cref="T:System.IO.FileInfo"/> representing the path to the
+ intermediate file location of the satellite assembly.
+ </summary>
+ <param name="projectConfig">The project build configuration.</param>
+ <param name="projectSettings">The project settings.</param>
+ <returns>
+ A <see cref="T:System.IO.FileInfo"/> representing the path to the
+ intermediate file location of the satellite assembly.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.GetRelativePath(NAnt.VSNet.ProjectSettings)">
+ <summary>
+ Gets path of the satellite assembly, relative to the output
+ directory.
+ </summary>
+ <param name="projectSettings">The project settings.</param>
+ <returns>
+ The path of the satellite assembly, relative to the output
+ directory.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.Culture">
+ <summary>
+ Gets the <see cref="T:System.Globalization.CultureInfo"/> of the
+ <see cref="T:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedProjectBase.LocalizedResourceSet.Resources">
+ <summary>
+ Gets the set of localized resources.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.CSharpProject.VerifyProjectXml(System.Xml.XmlElement)">
+ <summary>
+ Verifies whether the specified XML fragment represents a valid project
+ that is supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The XML fragment is not supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.</para>
+ <para>-or-</para>
+ <para>The XML fragment does not represent a valid project (for this <see cref="T:NAnt.VSNet.ProjectBase"/>).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.CSharpProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">The document element of the project.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.CSharpProject.GetProcessStartInfo(NAnt.VSNet.ConfigurationBase,System.String)">
+ <summary>
+ Returns a <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler
+ for this project.
+ </summary>
+ <param name="config">The configuration to build.</param>
+ <param name="responseFile">The response file for the compiler.</param>
+ <returns>
+ A <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler for
+ this project.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.CSharpProject.DetermineProjectLocation(System.Xml.XmlElement)">
+ <summary>
+ Returns the project location from the specified project XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <returns>
+ The project location of the specified project XML file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The project location could not be determined.</para>
+ <para>-or-</para>
+ <para>The project location is invalid.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.CSharpProject.IsSupported(System.Xml.XmlElement)">
+ <summary>
+ Returns a value indicating whether the project represented by the
+ specified XML fragment is supported by <see cref="T:NAnt.VSNet.CSharpProject"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project to check.</param>
+ <returns>
+ <see langword="true"/> if <see cref="T:NAnt.VSNet.CSharpProject"/> supports
+ the specified project; otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ <para>
+ A project is identified as as C# project, if the XML fragment at
+ least has the following information:
+ </para>
+ <code>
+ <![CDATA[
+ <VisualStudioProject>
+ <CSHARP
+ ProductVersion="..."
+ ....
+ >
+ ...
+ </CSHARP>
+ </VisualStudioProject>
+ ]]>
+ </code>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.CSharpProject.Type">
+ <summary>
+ Gets the type of the project.
+ </summary>
+ <value>
+ The type of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.CSharpProject.FileExtension">
+ <summary>
+ Gets the default file extension of sources for this project.
+ </summary>
+ <value>
+ For C# projects, the default file extension is ".cs".
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.GenericSolution">
+ <summary>
+ Supports grouping of individual projects, and treating them as a solution.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.VerifyProjectXml(System.Xml.XmlElement)">
+ <summary>
+ Verifies whether the specified XML fragment represents a valid project
+ that is supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The XML fragment is not supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.</para>
+ <para>-or-</para>
+ <para>The XML fragment does not represent a valid project (for this <see cref="T:NAnt.VSNet.ProjectBase"/>).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">The document element of the project.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.Prepare(NAnt.VSNet.Configuration)">
+ <summary>
+ Prepares the project for being built.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <remarks>
+ Ensures the configuration-level object directory exists and ensures
+ that none of the output files are marked read-only.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.GetProcessStartInfo(NAnt.VSNet.ConfigurationBase,System.String)">
+ <summary>
+ Returns a <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler
+ for this project.
+ </summary>
+ <param name="config">The configuration to build.</param>
+ <param name="responseFile">The response file for the compiler.</param>
+ <returns>
+ A <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler for
+ this project.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.DetermineProjectLocation(System.Xml.XmlElement)">
+ <summary>
+ Returns the project location from the specified project XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <returns>
+ The project location of the specified project XML file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The project location could not be determined.</para>
+ <para>-or-</para>
+ <para>The project location is invalid.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.JSharpProject.IsSupported(System.Xml.XmlElement)">
+ <summary>
+ Returns a value indicating whether the project represented by the
+ specified XML fragment is supported by <see cref="T:NAnt.VSNet.JSharpProject"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project to check.</param>
+ <returns>
+ <see langword="true"/> if <see cref="T:NAnt.VSNet.CSharpProject"/> supports
+ the specified project; otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ <para>
+ A project is identified as as J# project, if the XML fragment at
+ least has the following information:
+ </para>
+ <code>
+ <![CDATA[
+ <VisualStudioProject>
+ <JSHARP
+ ProductVersion="..."
+ ....
+ >
+ ...
+ </JSHARP>
+ </VisualStudioProject>
+ ]]>
+ </code>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.JSharpProject.Type">
+ <summary>
+ Gets the type of the project.
+ </summary>
+ <value>
+ The type of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.JSharpProject.FileExtension">
+ <summary>
+ Gets the default file extension of sources for this project.
+ </summary>
+ <value>
+ For J# projects, the default file extension is ".jsl".
+ </value>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedAssemblyReference.ResolveAssemblyReference">
+ <summary>
+ Resolves an assembly reference.
+ </summary>
+ <returns>
+ The full path to the resolved assembly, or <see langword="null" />
+ if the assembly reference could not be resolved.
+ </returns>
+ <remarks>
+ <para>
+ Visual Studio .NET uses the following search mechanism :
+ </para>
+ <list type="number">
+ <item>
+ <term>
+ The project directory.
+ </term>
+ </item>
+ <item>
+ <term>
+ The directories specified in the "ReferencePath" property,
+ which is stored in the .USER file.
+ </term>
+ </item>
+ <item>
+ <term>
+ The .NET Framework directory (see KB306149)
+ </term>
+ </item>
+ <item>
+ <term>
+ <para>
+ The directories specified under the following registry
+ keys:
+ </para>
+ <list type="bullet">
+ <item>
+ <term>
+ HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
+ </term>
+ </item>
+ <item>
+ <term>
+ HKCU\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
+ </term>
+ </item>
+ <item>
+ <term>
+ HKLM\SOFTWARE\Microsoft\VisualStudio\<major version>.<minor version>\AssemblyFolders
+ </term>
+ </item>
+ <item>
+ <term>
+ HKCU\SOFTWARE\Microsoft\VisualStudio\<major version>.<minor version>\AssemblyFolders
+ </term>
+ </item>
+ </list>
+ <para>
+ Future versions of Visual Studio .NET will also check
+ in:
+ </para>
+ <list type="bullet">
+ <item>
+ <term>
+ HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFoldersEx
+ </term>
+ </item>
+ <item>
+ <term>
+ HKCU\SOFTWARE\Microsoft\.NETFramework\AssemblyFoldersEx
+ </term>
+ </item>
+ </list>
+ </term>
+ </item>
+ <item>
+ <term>
+ The HintPath.
+ </term>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedAssemblyReference.Name">
+ <summary>
+ Gets the name of the referenced assembly.
+ </summary>
+ <value>
+ The name of the referenced assembly, or <see langword="null" /> if
+ the name could not be determined.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedAssemblyReference.AssemblyFoldersKey">
+ <summary>
+ Gets the Visual Studio .NET AssemblyFolders registry key matching
+ the current target framework.
+ </summary>
+ <value>
+ The Visual Studio .NET AssemblyFolders registry key matching the
+ current target framework.
+ </value>
+ <exception cref="T:NAnt.Core.BuildException">The current target framework is not supported.</exception>
+ <remarks>
+ We use the target framework instead of the product version of the
+ containing project file to determine what registry key to scan, as
+ we don't want to use assemblies meant for uplevel framework versions.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.ManagedOutputType">
+ <summary>
+ Indentifies the different output types of a managed project.
+ </summary>
+ <remarks>
+ Visual Studio .NET does not support modules.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.ManagedOutputType.Library">
+ <summary>
+ A class library.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ManagedOutputType.Executable">
+ <summary>
+ A console application.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ManagedOutputType.WindowsExecutable">
+ <summary>
+ A Windows program.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectReferenceBase.GetPrimaryOutputFile(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the output path of the reference, without taking the "copy local"
+ setting into consideration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The output path of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectReferenceBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the referenced project.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <returns>
+ The complete set of output files for the referenced project.
+ </returns>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectReferenceBase.GetAssemblyReferences(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the complete set of assemblies that need to be referenced when
+ a project references this project.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The complete set of assemblies that need to be referenced when a
+ project references this project.
+ </returns>
+ <remarks>
+ <para>
+ Apparently, there's some hack in VB.NET that allows a type to be used
+ that derives from a type in an assembly that is not referenced by the
+ project.
+ </para>
+ <para>
+ When building from the command line (using vbc), the following error
+ is reported "error BC30007: Reference required to assembly 'X'
+ containing the base class 'X'. Add one to your project".
+ </para>
+ <para>
+ Somehow VB.NET can workaround this issue, without actually adding a
+ reference to that assembly. I verified this with both VS.NET 2003 and
+ VS.NET 2005.
+ </para>
+ <para>
+ For now, we have no other option than to return all assembly
+ references of the referenced project if the parent is a VB.NET
+ project.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectReferenceBase.GetTimestamp(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the timestamp of the reference.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The timestamp of the reference.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectReferenceBase.CopyLocal">
+ <summary>
+ Gets a value indicating whether the output file(s) of this reference
+ should be copied locally.
+ </summary>
+ <value>
+ <see langword="true" /> if the output file(s) of this reference
+ should be copied locally; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectReferenceBase.IsSystem">
+ <summary>
+ Gets a value indicating whether this reference represents a system
+ assembly.
+ </summary>
+ <value>
+ <see langword="false" /> as a project by itself can never be a
+ system assembly.
+ </value>
+ </member>
+ <member name="M:NAnt.VSNet.ManagedProjectReference.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether the reference is managed for the
+ specified configuration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ <see langword="true" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.WrapperReferenceBase.GetPrimaryOutputFile(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the path of the reference, without taking the "copy local"
+ setting into consideration.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The output path of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.WrapperReferenceBase.GetOutputFiles(NAnt.VSNet.Configuration,System.Collections.Hashtable)">
+ <summary>
+ Gets the complete set of output files for the referenced project.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <param name="outputFiles">The set of output files to be updated.</param>
+ <remarks>
+ The key of the case-insensitive <see cref="T:System.Collections.Hashtable"/> is the
+ full path of the output file and the value is the path relative to
+ the output directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.WrapperReferenceBase.GetAssemblyReferences(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the complete set of assemblies that need to be referenced when
+ a project references this component.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The complete set of assemblies that need to be referenced when a
+ project references this component.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.WrapperReferenceBase.GetTimestamp(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets the timestamp of the reference.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ The timestamp of the reference.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.WrapperReferenceBase.Sync(NAnt.VSNet.ConfigurationBase)">
+ <summary>
+ Removes wrapper assembly from build directory, if wrapper assembly
+ no longer exists in output directory or is not in sync with build
+ directory, to force rebuild.
+ </summary>
+ <param name="config">The project configuration.</param>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.CopyLocal">
+ <summary>
+ Gets a value indicating whether the output file(s) of this reference
+ should be copied locally.
+ </summary>
+ <value>
+ <see langword="false" /> if the reference wraps a Primary Interop
+ Assembly; otherwise, <see langword="true" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.IsSystem">
+ <summary>
+ Gets a value indicating whether this reference represents a system
+ assembly.
+ </summary>
+ <value>
+ <see langword="false" /> as none of the system assemblies are wrappers
+ or Primary Interop Assemblies anyway.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.WrapperTool">
+ <summary>
+ Gets the name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.WrapperReferenceBase.WrapperAssembly"/>.
+ </summary>
+ <value>
+ The name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.WrapperReferenceBase.WrapperAssembly"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.WrapperAssembly">
+ <summary>
+ Gets the path of the wrapper assembly.
+ </summary>
+ <value>
+ The path of the wrapper assembly.
+ </value>
+ <remarks>
+ The wrapper assembly is stored in the object directory of the
+ project.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.IsCreated">
+ <summary>
+ Gets a value indicating whether the wrapper assembly has already been
+ created.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.PrimaryInteropAssembly">
+ <summary>
+ Gets the path of the Primary Interop Assembly.
+ </summary>
+ <value>
+ The path of the Primary Interop Assembly, or <see langword="null" />
+ if not available.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.TypeLibVersion">
+ <summary>
+ Gets the hex version of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The hex version of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.TypeLibGuid">
+ <summary>
+ Gets the GUID of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The GUID of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.TypeLibLocale">
+ <summary>
+ Gets the locale of the type library in hex notation.
+ </summary>
+ <value>
+ The locale of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.WrapperReferenceBase.TypeLibraryName">
+ <summary>
+ Gets the name of the type library.
+ </summary>
+ <value>
+ The name of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.Name">
+ <summary>
+ Gets the name of the referenced assembly.
+ </summary>
+ <value>
+ The name of the referenced assembly, or <see langword="null" /> if
+ the name could not be determined.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.WrapperTool">
+ <summary>
+ Gets the name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.ManagedWrapperReference.WrapperAssembly"/>.
+ </summary>
+ <value>
+ The name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.ManagedWrapperReference.WrapperAssembly"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.WrapperAssembly">
+ <summary>
+ Gets the path of the wrapper assembly.
+ </summary>
+ <value>
+ The path of the wrapper assembly.
+ </value>
+ <remarks>
+ The wrapper assembly is stored in the object directory of the
+ project.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.PrimaryInteropAssembly">
+ <summary>
+ Gets the path of the Primary Interop Assembly.
+ </summary>
+ <value>
+ The path of the Primary Interop Assembly, or <see langword="null" />
+ if not available.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.TypeLibVersion">
+ <summary>
+ Gets the hex version of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The hex version of the type library.
+ </value>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>
+ The definition of the reference does not contain a "VersionMajor" attribute.
+ </para>
+ <para>-or</para>
+ <para>
+ The definition of the reference does not contain a "VersionMinor" attribute.
+ </para>
+ </exception>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.TypeLibGuid">
+ <summary>
+ Gets the GUID of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The GUID of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ManagedWrapperReference.TypeLibLocale">
+ <summary>
+ Gets the locale of the type library in hex notation.
+ </summary>
+ <value>
+ The locale of the type library.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectType">
+ <summary>
+ Specifies the type of the project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectType.VB">
+ <summary>
+ A Visual Basic.NET project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectType.CSharp">
+ <summary>
+ A Visual C# project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectType.VisualC">
+ <summary>
+ A Visual C++ project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectType.JSharp">
+ <summary>
+ A Visual J# project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectType.MSBuild">
+ <summary>
+ MSBuild project.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.BuildResult">
+ <summary>
+ Specifies the result of the build.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.BuildResult.Failed">
+ <summary>
+ The build failed.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.BuildResult.Success">
+ <summary>
+ The build succeeded.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.BuildResult.SuccessOutputUpdated">
+ <summary>
+ The build succeeded and the output was updated.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProductVersion.Rainier">
+ <summary>
+ Visual Studio.NET 2002
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProductVersion.Everett">
+ <summary>
+ Visual Studio.NET 2003
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProductVersion.Whidbey">
+ <summary>
+ Visual Studio 2005
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProductVersion.Orcas">
+ <summary>
+ Visual Studio 2008
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProductVersion.Rosario">
+ <summary>
+ Visual Studio 2010
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectLocation">
+ <summary>
+ Indentifies the physical location of a managed project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectLocation.Local">
+ <summary>
+ A local project.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectLocation.Web">
+ <summary>
+ A web project.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectBaseCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.VSNet.ProjectBase"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.#ctor(NAnt.VSNet.ProjectBaseCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> class
+ with the specified <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.#ctor(NAnt.VSNet.ProjectBase[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> class
+ with the specified array of <see cref="T:NAnt.VSNet.ProjectBase"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Add(NAnt.VSNet.ProjectBase)">
+ <summary>
+ Adds a <see cref="T:NAnt.VSNet.ProjectBase"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectBase"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.AddRange(NAnt.VSNet.ProjectBase[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.ProjectBase"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.VSNet.ProjectBase"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.AddRange(NAnt.VSNet.ProjectBaseCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.VSNet.ProjectBaseCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Contains(NAnt.VSNet.ProjectBase)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.ProjectBase"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectBase"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.ProjectBase"/> with the specified
+ GUID is in the collection, using a case-insensitive lookup.
+ </summary>
+ <param name="value">The GUID to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.VSNet.ProjectBase"/> with GUID
+ <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.CopyTo(NAnt.VSNet.ProjectBase[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.IndexOf(NAnt.VSNet.ProjectBase)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.VSNet.ProjectBase"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectBase"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.VSNet.ProjectBase"/>. If the <see cref="T:NAnt.VSNet.ProjectBase"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Insert(System.Int32,NAnt.VSNet.ProjectBase)">
+ <summary>
+ Inserts a <see cref="T:NAnt.VSNet.ProjectBase"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectBase"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.VSNet.ProjectBaseEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Remove(NAnt.VSNet.ProjectBase)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectBase"/> to remove from the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseCollection.Remove(System.String)">
+ <summary>
+ Remove items with the specified guid from the collection.
+ </summary>
+ <param name="guid">The guid of the project to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBaseCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBaseCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.VSNet.ProjectBase"/> with the specified GUID.
+ </summary>
+ <param name="guid">The GUID of the <see cref="T:NAnt.VSNet.ProjectBase"/> to get.</param>
+ <remarks>
+ Performs a case-insensitive lookup.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectBaseEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.VSNet.ProjectBase"/> elements of a <see cref="T:NAnt.VSNet.ProjectBaseCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseEnumerator.#ctor(NAnt.VSNet.ProjectBaseCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectBaseEnumerator"/> class
+ with the specified <see cref="T:NAnt.VSNet.ProjectBaseCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectBaseEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectBaseEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectEntry.Project">
+ <summary>
+ Gets or sets the in memory representation of the project.
+ </summary>
+ <value>
+ The in memory representation of the project, or <see langword="null" />
+ if the project is not (yet) loaded.
+ </value>
+ <remarks>
+ This property will always be <see langword="null" /> for
+ projects that are not supported.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectEntry.BuildConfigurations">
+ <summary>
+ Return a mapping between the configurations defined in the
+ solution file and the project build configurations.
+ </summary>
+ <value>
+ Mapping between configurations defined in the solution file
+ and the project build configurations, or <see langword="null" />
+ if the project is not defined in a solution file.
+ </value>
+ <remarks>
+ This mapping only includes project build configurations that
+ are configured to be built for a given solution configuration.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectEntryCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.VSNet.ProjectEntry"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.#ctor(NAnt.VSNet.ProjectEntryCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> class
+ with the specified <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.#ctor(NAnt.VSNet.ProjectEntry[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> class
+ with the specified array of <see cref="T:NAnt.VSNet.ProjectEntry"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.Add(NAnt.VSNet.ProjectEntry)">
+ <summary>
+ Adds a <see cref="T:NAnt.VSNet.ProjectEntry"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectEntry"/> to be added to the end of the collection.</param>
+ <returns>
+ The position into which the new element was inserted.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.AddRange(NAnt.VSNet.ProjectEntry[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.ProjectEntry"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.VSNet.ProjectEntry"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.AddRange(NAnt.VSNet.ProjectEntryCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.VSNet.ProjectEntryCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.Contains(NAnt.VSNet.ProjectEntry)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.ProjectEntry"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectEntry"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.Contains(System.String)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VSNet.ProjectEntry"/> with the specified
+ GUID is in the collection, using a case-insensitive lookup.
+ </summary>
+ <param name="value">The GUID to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if a <see cref="T:NAnt.VSNet.ProjectEntry"/> with GUID
+ <paramref name="value"/> is found in the collection; otherwise,
+ <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.CopyTo(NAnt.VSNet.ProjectEntry[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.IndexOf(NAnt.VSNet.ProjectEntry)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.VSNet.ProjectEntry"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectEntry"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.VSNet.ProjectEntry"/>. If the <see cref="T:NAnt.VSNet.ProjectEntry"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.Insert(System.Int32,NAnt.VSNet.ProjectEntry)">
+ <summary>
+ Inserts a <see cref="T:NAnt.VSNet.ProjectEntry"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectEntry"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.VSNet.ProjectEntryEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryCollection.Remove(NAnt.VSNet.ProjectEntry)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VSNet.ProjectEntry"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectEntryCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectEntryCollection.Item(System.String)">
+ <summary>
+ Gets the <see cref="T:NAnt.VSNet.ProjectEntry"/> with the specified GUID.
+ </summary>
+ <param name="guid">The GUID of the <see cref="T:NAnt.VSNet.ProjectEntry"/> to get.</param>
+ <remarks>
+ Performs a case-insensitive lookup.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectEntryEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.VSNet.ProjectEntry"/> elements of a <see cref="T:NAnt.VSNet.ProjectEntryCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryEnumerator.#ctor(NAnt.VSNet.ProjectEntryCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectEntryEnumerator"/> class
+ with the specified <see cref="T:NAnt.VSNet.ProjectEntryCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectEntryEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectEntryEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.VSNet.ProjectFactory">
+ <summary>
+ Factory class for VS.NET projects.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectFactory.#ctor(NAnt.VSNet.Tasks.SolutionTask)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.ProjectFactory"/>
+ class.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectFactory._cachedProjects">
+ <summary>
+ Holds a case-insensitive list of cached projects.
+ </summary>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the path of the project
+ file (for web projects this can be a URL) and the value is a
+ <see cref="T:NAnt.Core.Project"/> instance.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectFactory._cachedProjectGuids">
+ <summary>
+ Holds a case-insensitive list of cached project GUIDs.
+ </summary>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the path of the project
+ file (for web projects this can be a URL) and the value is the GUID
+ of the project.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.ProjectFactory._cachedProjectXml">
+ <summary>
+ Holds a case-insensitive list of cached project GUIDs.
+ </summary>
+ <remarks>
+ The key of the <see cref="T:System.Collections.Hashtable"/> is the path of the project
+ file (for web projects this can be a URL) and the value is the Xml
+ of the project.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectSettings.GetOutputType(System.Xml.XmlElement)">
+ <summary>
+ Determines the output type of the project from its XML definition.
+ </summary>
+ <param name="settingsXml">The XML definition of the project settings.</param>
+ <returns>
+ The output type of the project.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>
+ The output type of the project is not set in the specified XML
+ definition.
+ </para>
+ <para>-or-</para>
+ <para>
+ The output type of the project is not supported.
+ </para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.ProjectSettings.GetProjectGuid(System.String,System.Xml.XmlElement)">
+ <summary>
+ Gets the project GUID from the given <see cref="T:System.Xml.XmlElement"/>
+ holding a <c><VisualStudioProject></c> node.
+ </summary>
+ <param name="projectFile">The path of the project file.</param>
+ <param name="elemRoot">The <c><VisualStudioProject></c> node from which the project GUID should be retrieved.</param>
+ <returns>
+ The project GUID from specified <c><VisualStudioProject></c> node.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.ApplicationIcon">
+ <summary>
+ Gets the .ico file to use as application icon.
+ </summary>
+ <value>
+ The .ico file to use as application icon, or <see langword="null" />
+ if no application icon should be used.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.AssemblyOriginatorKeyFile">
+ <summary>
+ Gets the key file to use to sign ActiveX/COM wrappers.
+ </summary>
+ <value>
+ The path of the key file to use to sign ActiveX/COM wrappers,
+ relative to the project root directory, or <see langword="null" />
+ if the wrapper assembly should not be signed using a key file.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.AssemblyKeyContainerName">
+ <summary>
+ Gets the key name to use to sign ActiveX/COM wrappers.
+ </summary>
+ <value>
+ The name of the key container to use to sign ActiveX/COM wrappers,
+ or <see langword="null" /> if the wrapper assembly should not be
+ signed using a key container.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.OutputType">
+ <summary>
+ Gets the output type of this project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.RunPostBuildEvent">
+ <summary>
+ Designates when the <see cref="P:NAnt.VSNet.ProjectSettings.PostBuildEvent"/> command line should
+ be run. Possible values are "OnBuildSuccess", "Always" or
+ "OnOutputUpdated".
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.PreBuildEvent">
+ <summary>
+ Contains commands to be run before a build takes place.
+ </summary>
+ <remarks>
+ Valid commands are those in a .bat file. For more info see MSDN.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.ProjectSettings.PostBuildEvent">
+ <summary>
+ Contains commands to be ran after a build has taken place.
+ </summary>
+ <remarks>
+ Valid commands are those in a .bat file. For more info see MSDN.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.ReferencesResolver.InitializeLifetimeService">
+ <summary>
+ Obtains a lifetime service object to control the lifetime policy for
+ this instance.
+ </summary>
+ <returns>
+ An object of type <see cref="T:System.Runtime.Remoting.Lifetime.ILease"/> used to control the lifetime
+ policy for this instance. This is the current lifetime service object
+ for this instance if one exists; otherwise, a new lifetime service
+ object initialized with a lease that will never time out.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.ReferencesResolver.GetAssemblyFileName(System.String)">
+ <summary>
+ Gets the file name of the assembly with the given assembly name.
+ </summary>
+ <param name="assemblyName">The assembly name of the assembly of which the file name should be returned.</param>
+ <returns>
+ The file name of the assembly with the given assembly name.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Resource.Compile(NAnt.VSNet.Configuration)">
+ <summary>
+ Compiles the resource file.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ A <see cref="T:System.IO.FileInfo"/> representing the compiled resource file.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.Resource.GetCompiledResourceFile(NAnt.VSNet.Configuration)">
+ <summary>
+ Returns a <see cref="T:System.IO.FileInfo"/> representing the compiled resource
+ file.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ A <see cref="T:System.IO.FileInfo"/> representing the compiled resource file.
+ </returns>
+ <remarks>
+ Calling this method does not force compilation of the resource file.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Resource.InputFile">
+ <summary>
+ Gets a <see cref="T:System.IO.FileInfo"/> representing the physical location
+ of the resource file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.Resource.LogicalFile">
+ <summary>
+ Gets a <see cref="T:System.IO.FileInfo"/> representing the logical location
+ of the resource file in the project.
+ </summary>
+ <remarks>
+ When the resource file is not linked, this matches the
+ <see cref="P:NAnt.VSNet.Resource.InputFile"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.Resource.IsResX">
+ <summary>
+ Gets a value indicating whether the resource is in fact a ResX file.
+ </summary>
+ <value>
+ <see langword="true" /> if the resource is a ResX file; otherwise,
+ <see langword="false" />.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.SolutionFactory">
+ <summary>
+ Factory class for VS.NET solutions.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.SolutionFactory.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.SolutionFactory"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VBProject.VerifyProjectXml(System.Xml.XmlElement)">
+ <summary>
+ Verifies whether the specified XML fragment represents a valid project
+ that is supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The XML fragment is not supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.</para>
+ <para>-or-</para>
+ <para>The XML fragment does not represent a valid project (for this <see cref="T:NAnt.VSNet.ProjectBase"/>).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VBProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">The document element of the project.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ <remarks>
+ This method is called from the <see cref="T:NAnt.VSNet.ProjectBase"/> ctor, and
+ at that time we're not sure the XML that is passed in, is indeed a
+ valid Visual Basic project.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VBProject.DetermineProjectLocation(System.Xml.XmlElement)">
+ <summary>
+ Returns the project location from the specified project XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <returns>
+ The project location of the specified project XML file.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The project location could not be determined.</para>
+ <para>-or-</para>
+ <para>The project location is invalid.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VBProject.GetProcessStartInfo(NAnt.VSNet.ConfigurationBase,System.String)">
+ <summary>
+ Returns a <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler
+ for this project.
+ </summary>
+ <param name="config">The configuration to build.</param>
+ <param name="responseFile">The response file for the compiler.</param>
+ <returns>
+ A <see cref="T:System.Diagnostics.ProcessStartInfo"/> for launching the compiler for
+ this project.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.VBProject.IsSupported(System.Xml.XmlElement)">
+ <summary>
+ Returns a value indicating whether the project represented by the
+ specified XML fragment is supported by <see cref="T:NAnt.VSNet.VBProject"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project to check.</param>
+ <returns>
+ <see langword="true"/> if <see cref="T:NAnt.VSNet.VBProject"/> supports the
+ specified project; otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ <para>
+ A project is identified as as Visual Basic project, if the XML
+ fragment at least has the following information:
+ </para>
+ <code>
+ <![CDATA[
+ <VisualStudioProject>
+ <VisualBasic
+ ProductVersion="..."
+ ....
+ >
+ ...
+ </VisualBasic>
+ </VisualStudioProject>
+ ]]>
+ </code>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VBProject.Type">
+ <summary>
+ Gets the type of the project.
+ </summary>
+ <value>
+ The type of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VBProject.FileExtension">
+ <summary>
+ Gets the default file extension of sources for this project.
+ </summary>
+ <value>
+ For VB projects, the default file extension is ".vb".
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcArgumentMap">
+ <summary>
+ A mapping from properties in the .vcproj file to command line arguments.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcArgumentMap.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VSNet.VcArgumentMap"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcArgumentMap.GetArgument(System.String,System.String,NAnt.VSNet.VcArgumentMap.ArgGroup)">
+ <summary>
+ Gets the argument string corresponding with a configuration property
+ named <paramref name="propName" /> with value <paramref name="propValue" />.
+ An ignore mask can be used to eliminate some arguments from the search.
+ </summary>
+ <param name="propName">The name of the configuration property.</param>
+ <param name="propValue">The value of the configuration property.</param>
+ <param name="useIgnoreGroup">Specify any groups that needs to be ignored.</param>
+ <returns>
+ The argument string corresponding with a configuration property
+ named <paramref name="propName" /> with value <paramref name="propValue" />,
+ or <see langword="null" /> if no corresponding argument exists.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.VcArgumentMap.CreateCLArgumentMap">
+ <summary>
+ Creates a mapping between configuration properties for the Visual
+ C++ compiler and corresponding command-line arguments.
+ </summary>
+ <returns>
+ A mapping between configuration properties for the Visual C++
+ compiler and corresponding command-line arguments.
+ </returns>
+ <remarks>
+ <para>
+ The following configuration properties are processed by
+ <see cref="T:NAnt.VSNet.VcProject"/>:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Category</term>
+ <description>Property</description>
+ </listheader>
+ <item>
+ <term>General</term>
+ <description>Addtional Include Directories (/I[path])</description>
+ </item>
+ <item>
+ <term>General</term>
+ <description>Resolve #using References (/AI[path])</description>
+ </item>
+ <item>
+ <term>Preprocessor</term>
+ <description>Preprocessor Definitions (/D[macro])</description>
+ </item>
+ <item>
+ <term>Code Generation</term>
+ <description>Enable C++ Exceptions (/EHsc)</description>
+ </item>
+ <item>
+ <term>Precompiled Headers</term>
+ <description>Create/Use Precompiled Header</description>
+ </item>
+ <item>
+ <term>Precompiled Headers</term>
+ <description>Create/Use PCH Through File</description>
+ </item>
+ <item>
+ <term>Precompiled Headers</term>
+ <description>Precompiled Header File</description>
+ </item>
+ <item>
+ <term>Output Files</term>
+ <description>Assembler Output</description>
+ </item>
+ <item>
+ <term>Output Files</term>
+ <description>ASM List Location</description>
+ </item>
+ <item>
+ <term>Browse Information</term>
+ <description>Enable Browse Information</description>
+ </item>
+ <item>
+ <term>Browse Information</term>
+ <description>Browse File</description>
+ </item>
+ <item>
+ <term>Advanced</term>
+ <description>Force Includes (/FI[name])</description>
+ </item>
+ <item>
+ <term>Advanced</term>
+ <description>Force #using (/FU[name])</description>
+ </item>
+ <item>
+ <term>Advanced</term>
+ <description>Undefine Preprocessor Definitions (/U[macro])</description>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcArgumentMap.CreateLinkerArgumentMap">
+ <summary>
+ Creates a mapping between configuration properties for the Visual
+ C++ linker and corresponding command-line arguments.
+ </summary>
+ <returns>
+ A mapping between configuration properties for the Visual C++
+ linker and corresponding command-line arguments.
+ </returns>
+ <remarks>
+ <para>
+ The following configuration properties are processed by
+ <see cref="T:NAnt.VSNet.VcProject"/>:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Category</term>
+ <description>Property</description>
+ </listheader>
+ <item>
+ <term>General</term>
+ <description>Output File (/OUT:[file])</description>
+ </item>
+ <item>
+ <term>General</term>
+ <description>Additional Library Directories (/LIBPATH:[dir])</description>
+ </item>
+ <item>
+ <term>Input</term>
+ <description>Additional Dependencies</description>
+ </item>
+ <item>
+ <term>Input</term>
+ <description>Add Module to Assembly (/ASSEMBLYMODULE:file)</description>
+ </item>
+ <item>
+ <term>Input</term>
+ <description>Embed Managed Resource File (/ASSEMBLYRESOURCE:file)</description>
+ </item>
+ <item>
+ <term>Debugging</term>
+ <description>Generate Debug Info (/DEBUG)</description>
+ </item>
+ <item>
+ <term>Debugging</term>
+ <description>Generate Program Database File (/PDB:name)</description>
+ </item>
+ <item>
+ <term>Debugging</term>
+ <description>Generate Map File (/MAP)</description>
+ </item>
+ <item>
+ <term>Debugging</term>
+ <description>Map File Name (/MAP:[filename])</description>
+ </item>
+ <item>
+ <term>System</term>
+ <description>Heap Reserve Size (/HEAP:reserve)</description>
+ </item>
+ <item>
+ <term>System</term>
+ <description>Heap Commit Size (/HEAP:reserve, commit)</description>
+ </item>
+ <item>
+ <term>System</term>
+ <description>Stack Reserve Size (/STACK:reserve)</description>
+ </item>
+ <item>
+ <term>System</term>
+ <description>Stack Commit Size (/STACK:reserve, commit)</description>
+ </item>
+ </list>
+ <para>
+ The following configuration properties are ignored:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Category</term>
+ <description>Property</description>
+ </listheader>
+ <item>
+ <term>General</term>
+ <description>Show Progress (/VERBOSE, /VERBOSE:LIB)</description>
+ </item>
+ <item>
+ <term>General</term>
+ <description>Suppress Startup Banner (/NOLOGO)</description>
+ </item>
+ </list>
+ <para>
+ Support for the following configuration properties still needs to
+ be implemented:
+ </para>
+ <list type="table">
+ <listheader>
+ <term>Category</term>
+ <description>Property</description>
+ </listheader>
+ <item>
+ <term>General</term>
+ <description>Ignore Import Library</description>
+ </item>
+ <item>
+ <term>General</term>
+ <description>Register Output</description>
+ </item>
+ <item>
+ <term>Input</term>
+ <description>Delay Loaded DLLs (/DELAYLOAD:[dll_name])</description>
+ </item>
+ <item>
+ <term>Embedded IDL</term>
+ <description>MIDL Commands (/MIDL:[file])</description>
+ </item>
+ </list>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcArgumentMap.VcArgument.Name">
+ <summary>
+ Gets the name of the command-line argument.
+ </summary>
+ <value>
+ The name of the command-line argument.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcArgumentMap.LinkerStringArgument">
+ <summary>
+ Represents a command-line arguments of which the trailing backslashes
+ in the value should be duplicated.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.VcArgumentMap.QuotedLinkerStringArgument">
+ <summary>
+ Represents a command-line argument of which the value should be
+ quoted, and of which trailing backslahes should be duplicated.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcArgumentMap.VcBoolArgument.Match">
+ <summary>
+ Gets the string that the configuration setting should match in
+ order for the command line argument to be set.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.VcArgumentMap.ArgGroup">
+ <summary>
+ Allow us to assign an argument to a specific group.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcArgumentMap.ArgGroup.Unassigned">
+ <summary>
+ The argument is not assigned to any group.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcArgumentMap.ArgGroup.OptiIgnoreGroup">
+ <summary>
+ The argument is ignored when the optimization level is set to
+ <b>Minimum Size</b> (1) or <b>Maximum Size</b> (2).
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcAssemblyReference.ResolveAssemblyReference">
+ <summary>
+ Resolves an assembly reference.
+ </summary>
+ <returns>
+ The full path to the resolved assembly, or <see langword="null" />
+ if the assembly reference could not be resolved.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.VcAssemblyReference.EvaluateMacro(System.Text.RegularExpressions.Match)">
+ <summary>
+ Is called each time a regular expression match is found during a
+ <see cref="M:Regex.Replace(string, MatchEvaluator)"/> operation.
+ </summary>
+ <param name="m">The <see cref="T:System.Text.RegularExpressions.Match"/> resulting from a single regular expression match during a <see cref="M:Regex.Replace(string, MatchEvaluator)"/>.</param>
+ <returns>
+ The expanded <see cref="T:System.Text.RegularExpressions.Match"/>.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">The macro is not supported.</exception>
+ <exception cref="T:System.NotImplementedException">Expansion of a given macro is not yet implemented.</exception>
+ </member>
+ <member name="P:NAnt.VSNet.VcAssemblyReference.Name">
+ <summary>
+ Gets the name of the referenced assembly.
+ </summary>
+ <value>
+ The name of the referenced assembly, or <see langword="null" /> if
+ the name could not be determined.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcConfigurationBase">
+ <summary>
+ A single build configuration for a Visual C++ project or for a specific
+ file in the project.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcConfigurationBase.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The macro is not supported.</para>
+ <para>-or-</para>
+ <para>The macro is not implemented.</para>
+ <para>-or-</para>
+ <para>The macro cannot be expanded.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VcConfigurationBase.GetToolSetting(System.String,System.String)">
+ <summary>
+ Gets the value of a given setting for a specified tool.
+ </summary>
+ <param name="toolName">The name of the tool.</param>
+ <param name="settingName">The name of the setting.</param>
+ <returns>
+ The value of a setting for the specified tool, or <see langword="null"/>
+ if the setting is not defined for the specified tool.
+ </returns>
+ <remarks>
+ An empty setting value, which is used as a means to override the
+ project default, will be returned as a empty <see cref="T:System.String"/>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcConfigurationBase.GetToolSetting(System.String,System.String,System.String)">
+ <summary>
+ Gets the value of a given setting for a specified tool.
+ </summary>
+ <param name="toolName">The name of the tool.</param>
+ <param name="settingName">The name of the setting.</param>
+ <param name="defaultValue">The value to return if setting is not defined.</param>
+ <returns>
+ The value of a setting for the specified tool, or
+ <paramref name="defaultValue"/> if the setting is not defined for
+ the specified tool.
+ </returns>
+ <remarks>
+ An empty setting value, which is used as a means to override the
+ project default, will be returned as a empty <see cref="T:System.String"/>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.IntermediateDir">
+ <summary>
+ Gets the intermediate directory, specified relative to project
+ directory.
+ </summary>
+ <value>
+ The intermediate directory, specified relative to project directory.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.ReferencesPath">
+ <summary>
+ Gets a comma-separated list of directories to scan for assembly
+ references.
+ </summary>
+ <value>
+ A comma-separated list of directories to scan for assembly
+ references, or <see langword="null" /> if no additional directories
+ should scanned.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.FullName">
+ <summary>
+ Gets the name of the configuration, including the platform it
+ targets.
+ </summary>
+ <value>
+ Tthe name of the configuration, including the platform it targets.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.OutputDir">
+ <summary>
+ Gets the output directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.BuildPath">
+ <summary>
+ Gets the path in which the output file will be created before its
+ copied to the actual output path.
+ </summary>
+ <remarks>
+ For Visual C++ projects, the output file will be immediately
+ created in the output path.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.Name">
+ <summary>
+ Gets the name of the configuration.
+ </summary>
+ <value>
+ The name of the configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcConfigurationBase.PlatformName">
+ <summary>
+ Gets the platform that the configuration targets.
+ </summary>
+ <value>
+ The platform targeted by the configuration.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcFileConfiguration">
+ <summary>
+ Represents the configuration of a file.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcFileConfiguration.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The macro is not supported.</para>
+ <para>-or-</para>
+ <para>The macro is not implemented.</para>
+ <para>-or-</para>
+ <para>The macro cannot be expanded.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VcFileConfiguration.GetToolSetting(System.String,System.String,System.String)">
+ <summary>
+ Gets the value of a given setting for a specified tool.
+ </summary>
+ <param name="toolName">The name of the tool.</param>
+ <param name="settingName">The name of the setting.</param>
+ <param name="projectDefault">The value to return if setting is not defined in both the file and project configuration.</param>
+ <returns>
+ The value of a setting for the specified tool, or
+ <paramref name="settingName"/> if the setting is not defined in
+ both the file and project configuration.
+ </returns>
+ <remarks>
+ <para>
+ If the setting is not defined in the file configuration, then
+ the project level setting will be used.
+ </para>
+ <para>
+ An empty setting value, which is used as a means to override the
+ project default, will be returned as a empty <see cref="T:System.String"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.ExcludeFromBuild">
+ <summary>
+ Gets a value indication whether the file should be excluded from
+ the build for this configuration.
+ </summary>
+ <value>
+ <see langword="true" /> if the file should be excluded from the
+ build for this configuration; otherwise, <see langword="false" />.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.RelativePath">
+ <summary>
+ Gets the relative path of the file.
+ </summary>
+ <value>
+ The path of the file relative to the project directory.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.RelativeOutputDir">
+ <summary>
+ Get the path of the output directory relative to the project
+ directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.IntermediateDir">
+ <summary>
+ Gets the intermediate directory, specified relative to project
+ directory.
+ </summary>
+ <value>
+ The intermediate directory, specified relative to project directory.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.OutputPath">
+ <summary>
+ Gets the path for the output file.
+ </summary>
+ <value>
+ The path for the output file, or <see langword="null" /> if there's
+ no output file for this configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcFileConfiguration.ReferencesPath">
+ <summary>
+ Gets a comma-separated list of directories to scan for assembly
+ references.
+ </summary>
+ <value>
+ A comma-separated list of directories to scan for assembly
+ references, or <see langword="null" /> if no additional directories
+ should scanned.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcProject">
+ <summary>
+ Visual C++ project.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether building the project for the specified
+ build configuration results in managed output.
+ </summary>
+ <param name="solutionConfiguration">The solution configuration that is built.</param>
+ <returns>
+ <see langword="true" /> if the project output for the specified build
+ configuration is either a Dynamic Library (dll) or an Application
+ (exe), and Managed Extensions are enabled; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.VerifyProjectXml(System.Xml.XmlElement)">
+ <summary>
+ Verifies whether the specified XML fragment represents a valid project
+ that is supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project file.</param>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The XML fragment is not supported by this <see cref="T:NAnt.VSNet.ProjectBase"/>.</para>
+ <para>-or-</para>
+ <para>The XML fragment does not represent a valid project (for this <see cref="T:NAnt.VSNet.ProjectBase"/>).</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">The document element of the project.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro or <see langword="null" /> if the macro is not
+ supported.
+ </returns>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.BuildResourceFiles(System.Collections.ArrayList,NAnt.VSNet.VcProjectConfiguration,NAnt.VSNet.VcConfigurationBase)">
+ <summary>
+ Build resource files for the given configuration.
+ </summary>
+ <param name="fileNames">The resource files to build.</param>
+ <param name="projectConfig">The project configuration.</param>
+ <param name="fileConfig">The build configuration.</param>
+ <remarks>
+ TODO: refactor this as we should always get only one element in the
+ <paramref name="fileNames" /> list. Each res file should be built
+ with its own file configuration.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.BuildIDLFiles(System.Collections.ArrayList,NAnt.VSNet.VcProjectConfiguration,NAnt.VSNet.VcConfigurationBase)">
+ <summary>
+ Build Interface Definition Language files for the given
+ configuration.
+ </summary>
+ <param name="fileNames">The IDL files to build.</param>
+ <param name="projectConfig">The project configuration.</param>
+ <param name="fileConfig">The build configuration.</param>
+ <remarks>
+ TODO: refactor this as we should always get only one element in the
+ <paramref name="fileNames" /> list. Each IDL file should be built
+ with its own file configuration.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.MergeToolSetting(NAnt.VSNet.VcProjectConfiguration,NAnt.VSNet.VcConfigurationBase,System.String,System.String)">
+ <summary>
+ Merges the specified tool setting of <paramref name="projectConfig" />
+ with <paramref name="fileConfig" />.
+ </summary>
+ <remarks>
+ The merge is suppressed when the flag $(noinherit) is defined in
+ <paramref name="fileConfig" />.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.GetObjectFile(NAnt.VSNet.VcConfigurationBase)">
+ <summary>
+ Gets the absolute path to the object file or directory.
+ </summary>
+ <param name="fileConfig">The build configuration</param>
+ <returns>
+ The absolute path to the object file or directory, or
+ </returns>
+ <remarks>
+ We use an absolute path for the object file, otherwise
+ <c><cl></c> assumes a location relative to the output
+ directory - not the project directory.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.IsSupported(System.Xml.XmlElement)">
+ <summary>
+ Returns a value indicating whether the project represented by the
+ specified XML fragment is supported by <see cref="T:NAnt.VSNet.VcProject"/>.
+ </summary>
+ <param name="docElement">XML fragment representing the project to check.</param>
+ <returns>
+ <see langword="true"/> if <see cref="T:NAnt.VSNet.VcProject"/> supports the
+ specified project; otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ <para>
+ A project is identified as as Visual C++ project, if the XML
+ fragment at least has the following information:
+ </para>
+ <code>
+ <![CDATA[
+ <VisualStudioProject
+ ProjectType="Visual C++"
+ Version="..."
+ ...
+ >
+ </VisualStudioProject>
+ ]]>
+ </code>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.CleanPath(System.String)">
+ <summary>
+ Removes leading and trailing quotes from the specified path.
+ </summary>
+ <param name="path">The path to clean.</param>
+ </member>
+ <member name="M:NAnt.VSNet.VcProject.GetProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Returns the Visual Studio product version of the specified project
+ XML fragment.
+ </summary>
+ <param name="docElement">XML fragment representing the project to check.</param>
+ <returns>
+ The Visual Studio product version of the specified project XML
+ fragment.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The product version could not be determined.</para>
+ <para>-or-</para>
+ <para>The product version is not supported.</para>
+ </exception>
+ </member>
+ <member name="F:NAnt.VSNet.VcProject._projectFiles">
+ <summary>
+ Holds the files included in the project.
+ </summary>
+ <remarks>
+ <para>
+ For project files with no specific file configuration, the relative
+ path is added to the list.
+ </para>
+ <para>
+ For project files that have a specific file configuration, a
+ <see cref="T:System.Collections.Hashtable"/> containing the <see cref="T:NAnt.VSNet.VcFileConfiguration"/>
+ instance representing the file configurations is added.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.Name">
+ <summary>
+ Gets the name of the Visual C++ project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.Type">
+ <summary>
+ Gets the type of the project.
+ </summary>
+ <value>
+ The type of the project.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.ProjectPath">
+ <summary>
+ Gets the path of the Visual C++ project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.ProjectDirectory">
+ <summary>
+ Gets the directory containing the VS.NET project.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.ProjectLocation">
+ <summary>
+ Get the location of the project.
+ </summary>
+ <value>
+ <see cref="T:NAnt.VSNet.ProjectLocation.Local" />.
+ </value>
+ <remarks>
+ For now, we only support local Visual C++ projects.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.ObjectDir">
+ <summary>
+ Get the directory in which intermediate build output that is not
+ specific to the build configuration will be stored.
+ </summary>
+ <remarks>
+ This is a directory relative to the project directory,
+ named <c>temp\</c>.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProject.Guid">
+ <summary>
+ Gets or sets the unique identifier of the Visual C++ project.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.VcProjectConfiguration">
+ <summary>
+ Represents a Visual C++ project configuration.
+ </summary>
+ </member>
+ <member name="M:NAnt.VSNet.VcProjectConfiguration.ExpandMacro(System.String)">
+ <summary>
+ Expands the given macro.
+ </summary>
+ <param name="macro">The macro to expand.</param>
+ <returns>
+ The expanded macro.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ <para>The macro is not supported.</para>
+ <para>-or-</para>
+ <para>The macro is not implemented.</para>
+ <para>-or-</para>
+ <para>The macro cannot be expanded.</para>
+ </exception>
+ <exception cref="T:System.NotImplementedException">
+ <para>Expansion of a given macro is not yet implemented.</para>
+ </exception>
+ </member>
+ <member name="M:NAnt.VSNet.VcProjectConfiguration.GetXmlAttributeValue(System.Xml.XmlNode,System.String)">
+ <summary>
+ Gets the value of the specified attribute from the specified node.
+ </summary>
+ <param name="xmlNode">The node of which the attribute value should be retrieved.</param>
+ <param name="attributeName">The attribute of which the value should be returned.</param>
+ <returns>
+ The value of the attribute with the specified name or <see langword="null" />
+ if the attribute does not exist or has no value.
+ </returns>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration._outputPath">
+ <summary>
+ Holds the output path for this build configuration.
+ </summary>
+ <remarks>
+ Lazy initialized by <see cref="M:NAnt.VSNet.VcProjectConfiguration.Initialize"/>.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration._objFiles">
+ <summary>
+ Holds list of files to link in the order in which they are defined
+ in the project file.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration._sourceConfigs">
+ <summary>
+ Holds the C++ sources for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the C++ source files for that
+ build configuration.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration._rcConfigs">
+ <summary>
+ Holds the resources for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the resources files for that
+ build configuration.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration._idlConfigs">
+ <summary>
+ Holds the IDL files for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the IDL files for that build
+ configuration.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.CharacterSet">
+ <summary>
+ Tells the compiler which character set to use.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.ManagedExtensions">
+ <summary>
+ Gets a value indicating whether Managed Extensions for C++ are
+ enabled.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.UseOfMFC">
+ <summary>
+ Gets a value indicating how MFC is used by the configuration.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.UseOfATL">
+ <summary>
+ Gets a value indicating how ATL is used by the configuration.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.ObjFiles">
+ <summary>
+ Gets the list of files to link in the order in which they are
+ defined in the project file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.SourceConfigs">
+ <summary>
+ Holds the C++ sources for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the C++ source files for that
+ build configuration.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.RcConfigs">
+ <summary>
+ Gets the resources for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the resources files for that
+ build configuration.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.IdlConfigs">
+ <summary>
+ Get the IDL files for each build configuration.
+ </summary>
+ <remarks>
+ The key of the hashtable is a build configuration, and the
+ value is an ArrayList holding the IDL files for that build
+ configuration.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.TargetPath">
+ <summary>
+ Gets the target path for usage in macro expansion.
+ </summary>
+ <value>
+ The target path, or a zero-length string if there's no output file
+ for this configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.ObjectDir">
+ <summary>
+ Get the directory in which intermediate build output will be stored
+ for this configuration.
+ </summary>
+ <remarks>
+ <para>
+ This is a directory relative to the project directory named
+ <c>obj\<configuration name></c>.
+ </para>
+ <para>
+ <c>.resx</c> and <c>.licx</c> files will only be recompiled if the
+ compiled resource files in the <see cref="P:NAnt.VSNet.VcProjectConfiguration.ObjectDir"/> are not
+ uptodate.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.RelativeOutputDir">
+ <summary>
+ Get the path of the output directory relative to the project
+ directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.IntermediateDir">
+ <summary>
+ Gets the intermediate directory, specified relative to project
+ directory.
+ </summary>
+ <value>
+ The intermediate directory, specified relative to project directory.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.OutputPath">
+ <summary>
+ Gets the absolute path for the output file.
+ </summary>
+ <value>
+ The absolute path for the output file, or <see langword="null" />
+ if there's no output file for this configuration.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.ReferencesPath">
+ <summary>
+ Gets a comma-separated list of directories to scan for assembly
+ references.
+ </summary>
+ <value>
+ A comma-separated list of directories to scan for assembly
+ references, or <see langword="null" /> if no additional directories
+ should scanned.
+ </value>
+ </member>
+ <member name="T:NAnt.VSNet.VcProjectConfiguration.ConfigurationType">
+ <summary>
+ The type of output for a given configuration.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration.ConfigurationType.Makefile">
+ <summary>
+ A Makefile.
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration.ConfigurationType.Application">
+ <summary>
+ Application (.exe).
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration.ConfigurationType.DynamicLibrary">
+ <summary>
+ Dynamic Library (.dll).
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration.ConfigurationType.StaticLibrary">
+ <summary>
+ Static Library (.lib).
+ </summary>
+ </member>
+ <member name="F:NAnt.VSNet.VcProjectConfiguration.ConfigurationType.Utility">
+ <summary>
+ Utility.
+ </summary>
+ </member>
+ <member name="P:NAnt.VSNet.VcProjectConfiguration.LinkerConfig.ImportLibrary">
+ <summary>
+ Gets a <see cref="T:System.IO.FileInfo"/> instance representing the
+ absolute path to the import library to generate.
+ </summary>
+ <value>
+ A <see cref="T:System.IO.FileInfo"/> representing the absolute path to the
+ import library to generate, or <see langword="null"/> if no
+ import library must be generated.
+ </value>
+ </member>
+ <member name="M:NAnt.VSNet.VcProjectReference.IsManaged(NAnt.VSNet.Configuration)">
+ <summary>
+ Gets a value indicating whether the reference is managed for the
+ specified configuration.
+ </summary>
+ <param name="config">The build configuration of the reference.</param>
+ <returns>
+ <see langword="true" /> if the reference is managed for the
+ specified configuration; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.Name">
+ <summary>
+ Gets the name of the referenced assembly.
+ </summary>
+ <value>
+ The name of the referenced assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.WrapperTool">
+ <summary>
+ Gets the name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.VcWrapperReference.WrapperAssembly"/>.
+ </summary>
+ <value>
+ The name of the tool that should be used to create the
+ <see cref="P:NAnt.VSNet.VcWrapperReference.WrapperAssembly"/>.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.WrapperAssembly">
+ <summary>
+ Gets the path of the wrapper assembly.
+ </summary>
+ <value>
+ The path of the wrapper assembly.
+ </value>
+ <remarks>
+ The wrapper assembly is stored in the object directory of the
+ project.
+ </remarks>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.PrimaryInteropAssembly">
+ <summary>
+ Gets the path of the Primary Interop Assembly.
+ </summary>
+ <value>
+ The path of the Primary Interop Assembly, or <see langword="null" />
+ if not available.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.TypeLibVersion">
+ <summary>
+ Gets the hex version of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The hex version of the type library.
+ </value>
+ <exception cref="T:NAnt.Core.BuildException">The definition of the reference does not contain a "ControlVersion" attribute.</exception>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.TypeLibGuid">
+ <summary>
+ Gets the GUID of the type library as defined in the definition
+ of the reference.
+ </summary>
+ <value>
+ The GUID of the type library.
+ </value>
+ </member>
+ <member name="P:NAnt.VSNet.VcWrapperReference.TypeLibLocale">
+ <summary>
+ Gets the locale of the type library in hex notation.
+ </summary>
+ <value>
+ The locale of the type library.
+ </value>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.VisualCppTasks.xml b/external/guiunit/tools/nant/bin/NAnt.VisualCppTasks.xml
new file mode 100755
index 0000000..a8ab7a3
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.VisualCppTasks.xml
@@ -0,0 +1,1211 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.VisualCppTasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.VisualCpp.Tasks.ClTask">
+ <summary>
+ Compiles C/C++ programs using <c>cl.exe</c>, Microsoft's C/C++ compiler.
+ </summary>
+ <remarks>
+ <para>This task is intended for version 13.00.9466 of <c>cl.exe</c>.</para>
+ </remarks>
+ <example>
+ <para>Compiles <c>helloworld.cpp</c> for the Common Language Runtime.</para>
+ <code>
+ <![CDATA[
+ <cl outputdir="build" options="/clr">
+ <sources>
+ <include name="helloworld.cpp" />
+ </sources>
+ </cl>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Tasks.ClTask"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.ExecuteTask">
+ <summary>
+ Compiles the sources.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.NeedsCompiling">
+ <summary>
+ Determines if the sources need to be compiled.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.IsPchfileUpToDate">
+ <summary>
+ Determines whether the precompiled header file is up-to-date.
+ </summary>
+ <returns>
+ <see langword="true" /> if no precompiled header file was specified;
+ otherwise, <see langword="false" />.
+ </returns>
+ <remarks>
+ In order to determine accurately whether the precompile header file
+ is up-to-date, we'd need scan all the header files that are pulled
+ in. As this is not implemented right now, its safer to always
+ recompile.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.FindUpdatedInclude(System.String,System.DateTime)">
+ <summary>
+ Determines whether any file that are includes in the specified
+ source file has been updated after the obj was compiled.
+ </summary>
+ <param name="srcFileName">The source file to check.</param>
+ <param name="objLastWriteTime">The last write time of the compiled obj.</param>
+ <returns>
+ The full path to the include file that was modified after the obj
+ was compiled, or <see langword="null" /> if no include files were
+ modified since the obj was compiled.
+ </returns>
+ <remarks>
+ <para>
+ To determine what includes are defined in a source file, conditional
+ directives are not honored.
+ </para>
+ <para>
+ If a given include cannot be resolved to an existing file, then
+ it will be considered stable.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.QuoteArgumentValue(System.String)">
+ <summary>
+ Quotes an argument value and duplicates trailing backslahes.
+ </summary>
+ <param name="value">The argument value to quote.</param>
+ <returns>
+ The quotes argument value.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.ClTask.GetObjOutputFile(System.String,System.String)">
+ <summary>
+ Determines the file name of the OBJ file for the specified source
+ file.
+ </summary>
+ <param name="srcFile">The source file for which the OBJ file should be determined.</param>
+ <param name="objectPath">The path of the object file.</param>
+ <returns>
+ The file name of the OBJ file for the specified source file.
+ </returns>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.OutputDir">
+ <summary>
+ Directory where all output files are placed.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.PchFile">
+ <summary>
+ Specifies the path and/or name of the generated precompiled header
+ file - given either relative to <see cref="P:NAnt.VisualCpp.Tasks.ClTask.OutputDir"/> or as an
+ absolute path.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.PchThroughFile">
+ <summary>
+ The path of the boundary file when generating/using the
+ specified <see cref="P:NAnt.VisualCpp.Tasks.ClTask.PchFile"/>. If a precompiled header file is
+ not specified then this attribute is ignored.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.PchMode">
+ <summary>
+ The mode in which the specified <see cref="P:NAnt.VisualCpp.Tasks.ClTask.PchFile"/> (if any) is
+ used. The default is <see cref="F:NAnt.VisualCpp.Tasks.ClTask.PrecompiledHeaderMode.Use"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ManagedExtensions">
+ <summary>
+ Specifies whether Managed Extensions for C++ should be enabled.
+ The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.CharacterSet">
+ <summary>
+ Tells the compiler to use the specified character set.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.Options">
+ <summary>
+ Options to pass to the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.Sources">
+ <summary>
+ The list of files to compile.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.IncludeDirs">
+ <summary>
+ The list of directories in which to search for include files.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.MetaDataIncludeDirs">
+ <summary>
+ Directories that the compiler will search to resolve file references
+ passed to the <c>#using</c> directive.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ForcedUsingFiles">
+ <summary>
+ Specifies metadata files to reference in this compilation as an
+ alternative to passing a file name to <c>#using</c> in source code.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.Defines">
+ <summary>
+ Macro definitions to pass to cl.exe.
+ Each entry will generate a /D
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.Undefines">
+ <summary>
+ Macro undefines (/U) to pass to cl.exe.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ObjectFile">
+ <summary>
+ A name to override the default object file name; can be either a file
+ or directory name. The default is the output directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ProgramDatabaseFile">
+ <summary>
+ A name for the compiler-generated PDB file; can be either a file or
+ directory name. The default is the output directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>The filename of the external program.</value>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.ClTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.ClTask.PrecompiledHeaderMode">
+ <summary>
+ Defines the supported modes for the use of precompiled header files.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Tasks.ClTask.PrecompiledHeaderMode.Create">
+ <summary>
+ Create a precompiled header file.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yc.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VisualCpp.Tasks.ClTask.PrecompiledHeaderMode.AutoCreate">
+ <summary>
+ Automatically create a precompiled header file if necessary.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /YX.
+ </remarks>
+ </member>
+ <member name="F:NAnt.VisualCpp.Tasks.ClTask.PrecompiledHeaderMode.Use">
+ <summary>
+ Use a (previously generated) precompiled header file.
+ </summary>
+ <remarks>
+ For further information on the use of this option
+ see the Microsoft documentation on the C++ compiler flag /Yu.
+ </remarks>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.LibTask">
+ <summary>
+ Run <c>lib.exe</c>, Microsoft's Library Manager.
+ </summary>
+ <example>
+ <para>Create a library.</para>
+ <code>
+ <![CDATA[
+ <lib output="library.lib">
+ <sources>
+ <include name="library.obj" />
+ </sources>
+ </lib>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.LibTask.ExecuteTask">
+ <summary>
+ Creates the library.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.LibTask.NeedsCompiling">
+ <summary>
+ Determines if the sources need to be linked.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.Options">
+ <summary>
+ Options to pass to the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.OutputFile">
+ <summary>
+ The output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.ModuleDefinitionFile">
+ <summary>
+ The module definition file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.Sources">
+ <summary>
+ The list of files to combine into the output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.Symbols">
+ <summary>
+ Symbols to add to the symbol table.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.IgnoreLibraries">
+ <summary>
+ Names of default libraries to ignore.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.LibDirs">
+ <summary>
+ The list of additional library directories to search.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>The filename of the external program.</value>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LibTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.LinkTask">
+ <summary>
+ Links files using <c>link.exe</c>, Microsoft's Incremental Linker.
+ </summary>
+ <remarks>
+ <para>This task is intended for version 7.00.9466 of <c>link.exe</c>.</para>
+ </remarks>
+ <example>
+ <para>
+ Combine all object files in the current directory into <c>helloworld.exe</c>.
+ </para>
+ <code>
+ <![CDATA[
+ <link output="helloworld.exe">
+ <sources>
+ <include name="*.obj" />
+ </sources>
+ </link>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.LinkTask.ExecuteTask">
+ <summary>
+ Links the sources.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.LinkTask.NeedsLinking">
+ <summary>
+ Determines if the output needs linking.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.LinkTask.QuoteArgumentValue(System.String)">
+ <summary>
+ Quotes an argument value and duplicates trailing backslahes.
+ </summary>
+ <param name="value">The argument value to quote.</param>
+ <returns>
+ The quotes argument value.
+ </returns>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.Options">
+ <summary>
+ Options to pass to the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.Debug">
+ <summary>
+ Create debugging information for the .exe file or DLL. The default is
+ <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.OutputFile">
+ <summary>
+ The output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.ProgramDatabaseFile">
+ <summary>
+ A user-specified name for the program database (PDB) that the linker
+ creates. The default file name for the PDB has the base name of the
+ <see cref="P:NAnt.VisualCpp.Tasks.LinkTask.OutputFile"/> and the extension .pdb.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.ModuleDefinition">
+ <summary>
+ The name of a module-definition file (.def) to be passed to the
+ linker.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.DelayLoadedDlls">
+ <summary>
+ Specified DLLs for delay loading.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.Sources">
+ <summary>
+ The list of files to combine into the output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.LibDirs">
+ <summary>
+ The list of additional library directories to search.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.Modules">
+ <summary>
+ Link the specified modules into this assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.EmbeddedResources">
+ <summary>
+ Embed the specified resources into this assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.Symbols">
+ <summary>
+ Symbols to add to the symbol table.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.IgnoreLibraries">
+ <summary>
+ Names of libraries that you want the linker to ignore when it
+ resolves external references.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>The filename of the external program.</value>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.LinkTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.McTask">
+ <summary>
+ Compiles messages using mc.exe, Microsoft's Win32 message compiler.
+ </summary>
+ <example>
+ <para>
+ Compile <c>text.mc</c> using the default options.
+ </para>
+ <code>
+ <![CDATA[
+ <mc mcfile="text.mc"/>
+ ]]>
+ </code>
+ <para>
+ Compile <c>text.mc</c>, passing a path to store the header, the rc
+ file and some additonal options.
+ </para>
+ <code>
+ <![CDATA[
+ <mc mcfile="text.mc" headerpath=".\build" rcpath=".\build" options="-v -c -u"/>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.McTask.ExecuteTask">
+ <summary>
+ Compiles the sources.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.McTask.NeedsCompiling(System.String)">
+ <summary>
+ Determine if source files need re-building.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.Options">
+ <summary>
+ Options to pass to the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.HeaderPath">
+ <summary>
+ Path to store header file. The default is the project base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.RCPath">
+ <summary>
+ Path to store RC file. The default is the project base directory.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.McFile">
+ <summary>
+ Input filename.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.McTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.MidlTask">
+ <summary>
+ This tasks allows you to run MIDL.exe.
+ </summary>
+ <remarks>
+ <para>
+ This task only supports a small subset of the MIDL.EXE command line
+ switches, but you can use the options element to specify any other
+ unsupported commands you want to specify.
+ </para>
+ </remarks>
+ <example>
+ <code>
+ <![CDATA[
+ <midl
+ env="win32"
+ Oi="cf"
+ tlb="${outputdir}\TempAtl.tlb"
+ header="${outputdir}\TempAtl.h"
+ iid="${outputdir}\TempAtl_i.c"
+ proxy="${outputdir}\TempAtl_p.c"
+ filename="TempAtl.idl"
+ >
+ <defines>
+ <define name="_DEBUG"/>
+ <define name="WIN32" value="1"/>
+ </defines>
+ <options>
+ <option name="/mktyplib203"/>
+ <option name="/error" value="allocation"/>
+ </options>
+ </midl>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.MidlTask.ExecuteTask">
+ <summary>
+ This is where the work is done.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.MidlTask.NeedsCompiling">
+ <summary>
+ Check output files to see if we need rebuilding.
+ </summary>
+ <see langword="true" /> if a rebuild is needed; otherwise,
+ <see langword="false" />.
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.MidlTask.NeedsCompiling(System.IO.FileInfo)">
+ <summary>
+ Check output files to see if we need rebuilding.
+ </summary>
+ <returns>
+ <see langword="true" /> if a rebuild is needed; otherwise,
+ <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.MidlTask.WriteResponseFile(System.IO.TextWriter)">
+ <summary>
+ Writes the response file for <c>midl.exe</c>.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Acf">
+ <summary>
+ The /acf switch allows the user to supply an
+ explicit ACF file name. The switch also
+ allows the use of different interface names in
+ the IDL and ACF files.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Align">
+ <summary>
+ The /align switch is functionally the same as the
+ MIDL /Zp option and is recognized by the MIDL compiler
+ solely for backward compatibility with MkTypLib.
+ </summary>
+ <remarks>The alignment value can be 1, 2, 4, or 8.</remarks>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.AppConfig">
+ <summary>
+ The /app_config switch selects application-configuration
+ mode, which allows you to use some ACF keywords in the
+ IDL file. With this MIDL compiler switch, you can omit
+ the ACF and specify an interface in a single IDL file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Char">
+ <summary>
+ The /char switch helps to ensure that the MIDL compiler
+ and C compiler operate together correctly for all char
+ and small types.
+ </summary>
+ <remarks>Can be one of signed | unsigned | ascii7 </remarks>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Client">
+ <summary>
+ The /client switch directs the MIDL compiler to generate
+ client-side C source files for an RPC interface
+ </summary>
+ <remarks>can be one of stub | none</remarks>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.CStub">
+ <summary>
+ The /cstub switch specifies the name of the client
+ stub file for an RPC interface.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.DllData">
+ <summary>
+ Specifies the file name for the generated dlldata file for a proxy
+ DLL. The default file name Dlldata.c is used if
+ <see cref="P:NAnt.VisualCpp.Tasks.MidlTask.DllData"/> is not specified.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Env">
+ <summary>
+ The /env switch selects the
+ environment in which the application runs.
+ </summary>
+ <remarks>It can take the values win32 and win64</remarks>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Oi">
+ <summary>
+ The /Oi switch directs the MIDL compiler to
+ use a fully-interpreted marshaling method.
+ The /Oic and /Oicf switches provide additional
+ performance enhancements.
+ </summary>
+ <remarks>
+ If you specify the Oi attribute, you must set it to
+ one of the values:
+ - Oi=""
+ - Oi="c"
+ - Oi="f"
+ - Oi="cf"
+ </remarks>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Tlb">
+ <summary>
+ Specifies a file name for the type library generated by the MIDL
+ compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Header">
+ <summary>
+ Specifies the name of the header file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Iid">
+ <summary>
+ Specifies the name of the interface identifier file for a COM
+ interface, overriding the default name obtained by adding _i.c
+ to the IDL file name.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Proxy">
+ <summary>
+ Specifies the name of the interface proxy file for a COM interface.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Filename">
+ <summary>
+ Name of .IDL file to process.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Options">
+ <summary>
+ Additional options to pass to midl.exe.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Defines">
+ <summary>
+ Macro definitions to pass to mdil.exe.
+ Each entry will generate a /D
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.Undefines">
+ <summary>
+ Macro undefines (/U) to pass to mdil.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.IncludeDirs">
+ <summary>
+ The list of directories in which to search for include files.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.ProgramFileName">
+ <summary>
+ Filename of program to execute
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.MidlTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.VisualCpp.Tasks.RcTask">
+ <summary>
+ Compiles resources using <c>rc.exe</c>, Microsoft's Win32 resource
+ compiler.
+ </summary>
+ <example>
+ <para>
+ Compile <c>text.rc</c> to <c>text.res</c> using the default options.
+ </para>
+ <code>
+ <![CDATA[
+ <rc rcfile="text.rc" output="text.res" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Compile <c>text.rc</c>, passing an additional option.
+ </para>
+ <code>
+ <![CDATA[
+ <rc rcfile="text.rc" options="/r"/>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.RcTask.ExecuteTask">
+ <summary>
+ Compile the resource file
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.RcTask.NeedsCompiling">
+ <summary>
+ Determines if the resource need compiling.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Tasks.RcTask.CheckResourceTimeStamp(System.String)">
+ <summary>
+ Check if a resource file has been updated.
+ </summary>
+ <param name="filePath"></param>
+ <returns></returns>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.Options">
+ <summary>
+ Options to pass to the compiler.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.OutputFile">
+ <summary>
+ Output file.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.RcFile">
+ <summary>
+ The resource file to compile.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.LangId">
+ <summary>
+ Default language ID.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.IncludeDirs">
+ <summary>
+ The list of directories in which to search for include files.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.Defines">
+ <summary>
+ Macro definitions to pass to rc.exe.
+ Each entry will generate a /d
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.ProgramFileName">
+ <summary>
+ Filename of program to execute
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Tasks.RcTask.ProgramArguments">
+ <summary>
+ Arguments of program to execute
+ </summary>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.CharacterSet">
+ <summary>
+ Defines the character sets that can be used by the C++ compiler.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Types.CharacterSet.NotSet">
+ <summary>
+ Have the compiler determine the character set.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Types.CharacterSet.Unicode">
+ <summary>
+ Unicode character set.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Types.CharacterSet.MultiByte">
+ <summary>
+ Multi-byte character set.
+ </summary>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.Library">
+ <summary>
+ Represents a library.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.Library.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.Library"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.Library.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.Library"/> class with
+ the specified name.
+ </summary>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Library.LibraryName">
+ <summary>
+ The name of the library.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Library.IfDefined">
+ <summary>
+ If <see langword="true" /> then the element will be processed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Library.UnlessDefined">
+ <summary>
+ If <see langword="true" /> then the element will be skipped;
+ otherwise, processed. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.LibraryCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.VisualCpp.Types.Library"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.#ctor(NAnt.VisualCpp.Types.LibraryCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> class
+ with the specified <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.#ctor(NAnt.VisualCpp.Types.Library[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> class
+ with the specified array of <see cref="T:NAnt.VisualCpp.Types.Library"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.Add(NAnt.VisualCpp.Types.Library)">
+ <summary>
+ Adds a <see cref="T:NAnt.VisualCpp.Types.Library"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Library"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.AddRange(NAnt.VisualCpp.Types.Library[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VisualCpp.Types.Library"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.VisualCpp.Types.Library"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.AddRange(NAnt.VisualCpp.Types.LibraryCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.Contains(NAnt.VisualCpp.Types.Library)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VisualCpp.Types.Library"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Library"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.CopyTo(NAnt.VisualCpp.Types.Library[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.IndexOf(NAnt.VisualCpp.Types.Library)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.VisualCpp.Types.Library"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Library"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.VisualCpp.Types.Library"/>. If the <see cref="T:NAnt.VisualCpp.Types.Library"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.Insert(System.Int32,NAnt.VisualCpp.Types.Library)">
+ <summary>
+ Inserts a <see cref="T:NAnt.VisualCpp.Types.Library"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Library"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.VisualCpp.Types.LibraryEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryCollection.Remove(NAnt.VisualCpp.Types.Library)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Library"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.LibraryCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.LibraryEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.VisualCpp.Types.Library"/> elements of a <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryEnumerator.#ctor(NAnt.VisualCpp.Types.LibraryCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.LibraryEnumerator"/> class
+ with the specified <see cref="T:NAnt.VisualCpp.Types.LibraryCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.LibraryEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.LibraryEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.Symbol">
+ <summary>
+ Represents a symbol.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.Symbol.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.Symbol"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.Symbol.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.Symbol"/> class with
+ the specified name.
+ </summary>
+ <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Symbol.SymbolName">
+ <summary>
+ The name of the symbol.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Symbol.IfDefined">
+ <summary>
+ If <see langword="true" /> then the element will be processed;
+ otherwise, skipped. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.Symbol.UnlessDefined">
+ <summary>
+ If <see langword="true" /> then the element will be skipped;
+ otherwise, processed. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.SymbolCollection">
+ <summary>
+ Contains a collection of <see cref="T:NAnt.VisualCpp.Types.Symbol"/> elements.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> class.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.#ctor(NAnt.VisualCpp.Types.SymbolCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> class
+ with the specified <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> instance.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.#ctor(NAnt.VisualCpp.Types.Symbol[])">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> class
+ with the specified array of <see cref="T:NAnt.VisualCpp.Types.Symbol"/> instances.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.Add(NAnt.VisualCpp.Types.Symbol)">
+ <summary>
+ Adds a <see cref="T:NAnt.VisualCpp.Types.Symbol"/> to the end of the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Symbol"/> to be added to the end of the collection.</param>
+ <returns>The position into which the new element was inserted.</returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.AddRange(NAnt.VisualCpp.Types.Symbol[])">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VisualCpp.Types.Symbol"/> array to the end of the collection.
+ </summary>
+ <param name="items">The array of <see cref="T:NAnt.VisualCpp.Types.Symbol"/> elements to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.AddRange(NAnt.VisualCpp.Types.SymbolCollection)">
+ <summary>
+ Adds the elements of a <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> to the end of the collection.
+ </summary>
+ <param name="items">The <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/> to be added to the end of the collection.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.Contains(NAnt.VisualCpp.Types.Symbol)">
+ <summary>
+ Determines whether a <see cref="T:NAnt.VisualCpp.Types.Symbol"/> is in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Symbol"/> to locate in the collection.</param>
+ <returns>
+ <see langword="true"/> if <paramref name="item"/> is found in the
+ collection; otherwise, <see langword="false"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.CopyTo(NAnt.VisualCpp.Types.Symbol[],System.Int32)">
+ <summary>
+ Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
+ </summary>
+ <param name="array">The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.</param>
+ <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.IndexOf(NAnt.VisualCpp.Types.Symbol)">
+ <summary>
+ Retrieves the index of a specified <see cref="T:NAnt.VisualCpp.Types.Symbol"/> object in the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Symbol"/> object for which the index is returned.</param>
+ <returns>
+ The index of the specified <see cref="T:NAnt.VisualCpp.Types.Symbol"/>. If the <see cref="T:NAnt.VisualCpp.Types.Symbol"/> is not currently a member of the collection, it returns -1.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.Insert(System.Int32,NAnt.VisualCpp.Types.Symbol)">
+ <summary>
+ Inserts a <see cref="T:NAnt.VisualCpp.Types.Symbol"/> into the collection at the specified index.
+ </summary>
+ <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Symbol"/> to insert.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.GetEnumerator">
+ <summary>
+ Returns an enumerator that can iterate through the collection.
+ </summary>
+ <returns>
+ A <see cref="T:NAnt.VisualCpp.Types.SymbolEnumerator"/> for the entire collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolCollection.Remove(NAnt.VisualCpp.Types.Symbol)">
+ <summary>
+ Removes a member from the collection.
+ </summary>
+ <param name="item">The <see cref="T:NAnt.VisualCpp.Types.Symbol"/> to remove from the collection.</param>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.SymbolCollection.Item(System.Int32)">
+ <summary>
+ Gets or sets the element at the specified index.
+ </summary>
+ <param name="index">The zero-based index of the element to get or set.</param>
+ </member>
+ <member name="T:NAnt.VisualCpp.Types.SymbolEnumerator">
+ <summary>
+ Enumerates the <see cref="T:NAnt.VisualCpp.Types.Symbol"/> elements of a <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/>.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolEnumerator.#ctor(NAnt.VisualCpp.Types.SymbolCollection)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.VisualCpp.Types.SymbolEnumerator"/> class
+ with the specified <see cref="T:NAnt.VisualCpp.Types.SymbolCollection"/>.
+ </summary>
+ <param name="arguments">The collection that should be enumerated.</param>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolEnumerator.MoveNext">
+ <summary>
+ Advances the enumerator to the next element of the collection.
+ </summary>
+ <returns>
+ <see langword="true" /> if the enumerator was successfully advanced
+ to the next element; <see langword="false" /> if the enumerator has
+ passed the end of the collection.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Types.SymbolEnumerator.Reset">
+ <summary>
+ Sets the enumerator to its initial position, which is before the
+ first element in the collection.
+ </summary>
+ </member>
+ <member name="P:NAnt.VisualCpp.Types.SymbolEnumerator.Current">
+ <summary>
+ Gets the current element in the collection.
+ </summary>
+ <returns>
+ The current element in the collection.
+ </returns>
+ </member>
+ <member name="T:NAnt.VisualCpp.Util.BackslashProcessingMethod">
+ <summary>
+ Defines how to deal with backslashes in values of command line
+ arguments.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Util.BackslashProcessingMethod.None">
+ <summary>
+ Does not perform any processing on backslashes.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Util.BackslashProcessingMethod.Duplicate">
+ <summary>
+ Duplicates the trailing backslash.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Util.BackslashProcessingMethod.Fix">
+ <summary>
+ Fixes the trailing backslash by replaces trailing double backslashes
+ with only one backslash and removing single trailing backslashes.
+ </summary>
+ </member>
+ <member name="F:NAnt.VisualCpp.Util.BackslashProcessingMethod.Clean">
+ <summary>
+ Removes all the trailing backslashes.
+ </summary>
+ </member>
+ <member name="T:NAnt.VisualCpp.Util.ArgumentUtils">
+ <summary>
+ Groups a set of useful <see cref="T:System.String"/> manipulation methods for
+ command-line arguments.
+ </summary>
+ </member>
+ <member name="M:NAnt.VisualCpp.Util.ArgumentUtils.ProcessTrailingBackslash(System.String,NAnt.VisualCpp.Util.BackslashProcessingMethod)">
+ <summary>
+ Performs backslash processing on the specified value using a given
+ method.
+ </summary>
+ <param name="value">The <see cref="T:System.String"/> to process.</param>
+ <param name="processingMethod">The <see cref="T:NAnt.VisualCpp.Util.BackslashProcessingMethod"/> to use.</param>
+ <returns>
+ <paramref name="value"/> with backslashes processed using the given
+ <see cref="T:NAnt.VisualCpp.Util.BackslashProcessingMethod"/>.
+ </returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Util.ArgumentUtils.DuplicateTrailingBackslash(System.String)">
+ <summary>
+ Duplicates the trailing backslash.
+ </summary>
+ <param name="value">The input string to check and duplicate the trailing backslash if necessary.</param>
+ <returns>The result string after being processed.</returns>
+ <remarks>
+ Also duplicates trailing backslash in quoted value.
+ </remarks>
+ </member>
+ <member name="M:NAnt.VisualCpp.Util.ArgumentUtils.FixTrailingBackslash(System.String)">
+ <summary>
+ Fixes the trailing backslash. This function replaces the trailing double backslashes with
+ only one backslash. It also, removes the single trailing backslash.
+ </summary>
+ <param name="value">The input string.</param>
+ <returns>The result string after being processed.</returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Util.ArgumentUtils.CleanTrailingBackslash(System.String)">
+ <summary>
+ Removes all the trailing backslashes from the input.
+ </summary>
+ <param name="value">The input string.</param>
+ <returns>The result string without trailing backslashes.</returns>
+ </member>
+ <member name="M:NAnt.VisualCpp.Util.ArgumentUtils.QuoteArgumentValue(System.String,NAnt.VisualCpp.Util.BackslashProcessingMethod)">
+ <summary>
+ Quotes an argument value and processes backslashes using a given
+ <see cref="T:NAnt.VisualCpp.Util.BackslashProcessingMethod"/>.
+ </summary>
+ <param name="value">The argument value to quote.</param>
+ <param name="processingMethod">The <see cref="T:NAnt.VisualCpp.Util.BackslashProcessingMethod"/> to use.</param>
+ <returns>
+ The quoted argument value.
+ </returns>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.Win32Tasks.xml b/external/guiunit/tools/nant/bin/NAnt.Win32Tasks.xml
new file mode 100755
index 0000000..60d2848
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.Win32Tasks.xml
@@ -0,0 +1,800 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.Win32Tasks</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.Win32.Functions.CygpathFunctions">
+ <summary>
+ Groups a set of functions that convert Windows native filenames to
+ Cygwin POSIX-style pathnames and vice versa.
+ </summary>
+ <remarks>
+ It can be used when a Cygwin program needs to pass a file name to a
+ native Windows program, or expects to get a file name from a native
+ Windows program.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.#ctor(NAnt.Core.Project,NAnt.Core.PropertyDictionary)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Win32.Functions.CygpathFunctions"/>
+ class with the specified <see cref="T:NAnt.Core.Project"/> and properties.
+ </summary>
+ <param name="project">The <see cref="T:NAnt.Core.Project"/> in which the class is used.</param>
+ <param name="properties">The set of properties to use for macro expansion.</param>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.GetDosPath(System.String)">
+ <summary>
+ Gets the DOS (short) form of the specified path.
+ </summary>
+ <param name="path">The path to convert.</param>
+ <returns>
+ The DOS (short) form of the specified path.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>cygpath</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> could not be converted to a short form.</exception>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.GetUnixPath(System.String)">
+ <summary>
+ Gets the Unix form of the specified path.
+ </summary>
+ <param name="path">The path to convert.</param>
+ <returns>
+ The Unix form of the specified path.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>cygpath</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> could not be converted to a Unix form.</exception>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.GetWindowsPath(System.String)">
+ <summary>
+ Gets the Windows form of the specified path.
+ </summary>
+ <param name="path">The path to convert.</param>
+ <returns>
+ The Windows form of the specified path.
+ </returns>
+ <exception cref="T:System.ComponentModel.Win32Exception"><c>cygpath</c> could not be started.</exception>
+ <exception cref="T:System.ArgumentException"><paramref name="path"/> could not be converted to a Windows form.</exception>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.RunCygpathString(NAnt.Core.Types.Argument[])">
+ <summary>
+ Runs cygpath with the specified arguments and returns the result
+ as a <see cref="T:System.String"/>.
+ </summary>
+ <param name="args">The arguments to pass to cygpath.</param>
+ <returns>
+ The result of running cygpath with the specified arguments.
+ </returns>
+ </member>
+ <member name="M:NAnt.Win32.Functions.CygpathFunctions.GetTask(System.IO.Stream)">
+ <summary>
+ Factory method to return a new instance of ExecTask
+ </summary>
+ <param name="stream"></param>
+ <returns></returns>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.AxImpTask">
+ <summary>
+ Generates a Windows Forms Control that wraps ActiveX Controls defined
+ in an OCX.
+ </summary>
+ <example>
+ <code>
+ <![CDATA[
+ <aximp ocx="MyControl.ocx" output="MyFormsControl.dll" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.AxImpTask.ExecuteTask">
+ <summary>
+ Import the ActiveX control.
+ </summary>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.AxImpTask.NeedsCompiling">
+ <summary>
+ Determines whether the assembly needs to be created again.
+ </summary>
+ <returns>
+ <see langword="true" /> if the assembly needs to be created again;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.OcxFile">
+ <summary>
+ Filename of the .ocx file.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.OutputFile">
+ <summary>
+ Filename of the generated assembly.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.PublicKeyFile">
+ <summary>
+ Specifies the file containing the public key to use to sign the
+ resulting assembly.
+ </summary>
+ <value>
+ The file containing the public key to use to sign the resulting
+ assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.KeyFile">
+ <summary>
+ Specifies the publisher's official public/private key pair with which
+ the resulting assembly should be signed with a strong name.
+ </summary>
+ <value>
+ The keyfile to use to sign the resulting assembly with a strong name.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.KeyContainer">
+ <summary>
+ Specifies the key container in which the public/private key pair
+ should be found that should be used to sign the resulting assembly
+ with a strong name.
+ </summary>
+ <value>
+ The key container containing a public/private key pair that should
+ be used to sign the resulting assembly.
+ </value>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.DelaySign">
+ <summary>
+ Specifies to sign the resulting control using delayed signing.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.GenerateSource">
+ <summary>
+ Determines whether C# source code for the Windows Form wrapper should
+ be generated. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.RcwFile">
+ <summary>
+ Assembly to use for Runtime Callable Wrapper rather than generating
+ new one [.NET 1.1 or higher].
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.SupportsRcw">
+ <summary>
+ Indicates whether <c>aximp</c> supports using an existing Runtime
+ Callable Wrapper for a given target framework. The default is
+ <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.AxImpTask.ProgramArguments">
+ <summary>
+ Gets the command-line arguments for the external program.
+ </summary>
+ <value>
+ The command-line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.LocateSdkTask">
+ <summary>
+ Reads the most recent Windows SDK InstallationFolder key into a NAnt property
+ </summary>
+ <example>
+ <code>
+ <![CDATA[
+ <locatesdk property="dotNetFX" minsdk="v6.0" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.LocateSdkTask.ExecuteTask">
+ <summary>
+ locate the most recent WinSDK installed
+ </summary>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.LocateSdkTask.StringToVersion(System.String)">
+ <summary>
+ Converts a version expressed as a string into a Version object
+ </summary>
+ <param name="sdkVersion">
+ A <see cref="T:System.String"/> containing the version to convert.
+ </param>
+ <returns>
+ A <see cref="T:System.Version"/> object representing the version string.
+ </returns>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.LocateSdkTask.PropertyName">
+ <summary>
+ <para>
+ The property to set to the value stored in the InstalledFolder key of the located WinSDK version.
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.LocateSdkTask.MinWinSdkVersion">
+ <summary>
+ <para>
+ The minimum acceptable Windows SDK version.
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.LocateSdkTask.MaxWinSdkVersion">
+ <summary>
+ <para>
+ The maximum acceptable Windows SDK version.
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.LocateSdkTask.MinNetFxVersion">
+ <summary>
+ <para>
+ The minimum acceptable .NET sdk version.
+ </para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.LocateSdkTask.MaxNetFxVersion">
+ <summary>
+ <para>
+ The maximum acceptable .NET sdk version.
+ </para>
+ </summary>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.MonoRegistryTask">
+ <summary>
+ Reads the mono registry path into a NAnt property.
+ </summary>
+ <remarks>
+ The mono registry keyes can exist in one of two places depending on the platform. This
+ task will check to see which registry path that Mono is using.
+ </remarks>
+ <example>
+ <code>
+ <![CDATA[
+ <monoregistry property="mono.reg" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="F:NAnt.Win32.Tasks.MonoRegistryTask._defaultRegKey">
+ <summary>
+ The Mono reg key to default to if none of the keys in _regKeys are found
+ in the running machine.
+ </summary>
+ </member>
+ <member name="F:NAnt.Win32.Tasks.MonoRegistryTask._propName">
+ <summary>
+ Private property name to assign the Mono registry path to.
+ </summary>
+ </member>
+ <member name="F:NAnt.Win32.Tasks.MonoRegistryTask._regKeys">
+ <summary>
+ Private array of Mono registry paths to test in order.
+ </summary>
+ <remarks>
+ If new registry paths are used by the Mono team, add them to this array.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.MonoRegistryTask.ExecuteTask">
+ <summary>
+ Locates the appropriate Mono registry path to use.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.MonoRegistryTask.PropertyName">
+ <summary>
+ <para>
+ The property to set to the Mono registry path.
+ </para>
+ </summary>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.ReadRegistryTask">
+ <summary>
+ Reads a value or set of values from the Windows Registry into one or
+ more NAnt properties.
+ </summary>
+ <example>
+ <para>Read a single value from the registry.</para>
+ <code>
+ <![CDATA[
+ <readregistry property="sdkRoot" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" hive="LocalMachine" />
+ ]]>
+ </code>
+ <para>Read all the registry values in a key.</para>
+ <code>
+ <![CDATA[
+ <readregistry prefix="dotNetFX" key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot" hive="LocalMachine" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.ReadRegistryTask.ExecuteTask">
+ <summary>
+ read the specified registry value
+ </summary>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.ReadRegistryTask.LookupRegKey(System.String,Microsoft.Win32.RegistryHive[])">
+ <summary>
+ Returns the hive for a given key.
+ </summary>
+ <param name="key"></param>
+ <param name="registries"></param>
+ <returns>
+ The hive for a given key.
+ </returns>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.ReadRegistryTask.GetHiveKey(Microsoft.Win32.RegistryHive)">
+ <summary>
+ Returns the key for a given registry hive.
+ </summary>
+ <param name="hive">The registry hive to return the key for.</param>
+ <returns>
+ The key for a given registry hive.
+ </returns>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.ReadRegistryTask.PropertyName">
+ <summary>
+ <para>The property to set to the specified registry key value.</para>
+ <para>If this attribute is used then a single value will be read.</para>
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.ReadRegistryTask.PropertyPrefix">
+ <summary>
+ <para>The prefix to use for the specified registry key values.</para>
+ <para>If this attribute is used then all registry values will be read and stored as properties with this prefix.</para>
+ </summary>
+ <example>
+ <para>Registry values a, b, c will be turned into prefixa, prefixb, prefixc named properties</para>
+ </example>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.ReadRegistryTask.RegistryKey">
+ <summary>
+ The registry key to read, including the path.
+ </summary>
+ <example>
+ SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot
+ </example>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.ReadRegistryTask.RegistryHiveName">
+ <summary>
+ Space separated list of registry hives to search for <see cref="P:NAnt.Win32.Tasks.ReadRegistryTask.RegistryKey"/>.
+ For a list of possible values, see <see cref="T:Microsoft.Win32.RegistryHive"/>. The
+ default is <see cref="F:Microsoft.Win32.RegistryHive.LocalMachine"/>.
+ </summary>
+ <remarks>
+ <seealso cref="T:Microsoft.Win32.RegistryHive"/>
+ </remarks>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.RegAsmTask">
+ <summary>
+ Registers an assembly, or set of assemblies for use from COM clients.
+ </summary>
+ <remarks>
+ <para>
+ Refer to the <see href="ms-help://MS.VSCC/MS.MSDNVS/cptools/html/cpgrfassemblyregistrationtoolregasmexe.htm">Regasm</see>
+ documentation for more information on the regasm tool.
+ </para>
+ </remarks>
+ <example>
+ <para>
+ Register types in a single assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <regasm assembly="myAssembly.dll" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Register types of an assembly and generate a type library containing
+ definitions of accessible types defined within the assembly.
+ </para>
+ <code>
+ <![CDATA[
+ <regasm assembly="myAssembly.dll" typelib="myAssembly.tlb" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Register types of set of assemblies at once, while specifying a set
+ of reference assemblies.
+ </para>
+ <code>
+ <![CDATA[
+ <regasm codebase="true">
+ <assemblies>
+ <include name="OutlookAddin.dll" />
+ <include name="OfficeCoreAddin.dll" />
+ </assemblies>
+ <references>
+ <include name="CommonTypes.dll" />
+ </references>
+ </regasm>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.RegAsmTask.PrepareProcess(System.Diagnostics.Process)">
+ <summary>
+ Updates the <see cref="T:System.Diagnostics.ProcessStartInfo"/> of the specified
+ <see cref="T:System.Diagnostics.Process"/>.
+ </summary>
+ <param name="process">The <see cref="T:System.Diagnostics.Process"/> of which the <see cref="T:System.Diagnostics.ProcessStartInfo"/> should be updated.</param>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.RegAsmTask.ExecuteTask">
+ <summary>
+ Registers or unregisters a single assembly, or a group of assemblies.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.AssemblyFile">
+ <summary>
+ The name of the file to register. This is provided as an alternate
+ to using the task's <see cref="P:NAnt.Win32.Tasks.RegAsmTask.Assemblies"/>.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.RegistryFile">
+ <summary>
+ Registry file to export to instead of entering the types directly
+ into the registry.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.CodeBase">
+ <summary>
+ Set the code base registry setting.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.Registered">
+ <summary>
+ Only refer to already registered type libraries.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.TypeLib">
+ <summary>
+ Export the assemblies to the specified type library and register it.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.Unregister">
+ <summary>
+ Unregister the assembly. The default is <see langword="false" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.Assemblies">
+ <summary>
+ The set of assemblies to register, or unregister.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.References">
+ <summary>
+ The set of assembly references.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.BaseDirectory">
+ <summary>
+ Gets the working directory for the application.
+ </summary>
+ <value>
+ The working directory for the application.
+ </value>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.ProgramArguments">
+ <summary>
+ Gets the command line arguments for the external program.
+ </summary>
+ <value>
+ The command line arguments for the external program.
+ </value>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.RegAsmTask.ProgramFileName">
+ <summary>
+ Gets the filename of the external program to start.
+ </summary>
+ <value>
+ The filename of the external program.
+ </value>
+ <remarks>
+ Override in derived classes to explicitly set the location of the
+ external tool.
+ </remarks>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.TlbExpTask">
+ <summary>
+ Exports a .NET assembly to a type library that can be used from unmanaged
+ code (wraps Microsoft's <c>tlbexp.exe</c>).
+ </summary>
+ <remarks>
+ <para>
+ <see href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryexportertlbexpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</see>
+ </para>
+ </remarks>
+ <example>
+ <para>Export <c>DotNetAssembly.dll</c> to <c>LegacyCOM.dll</c>.</para>
+ <code>
+ <![CDATA[
+ <tlbexp assembly="DotNetAssembly.dll" output="LegacyCOM.dll" />
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.TlbExpTask.ExecuteTask">
+ <summary>
+ Exports the type library.
+ </summary>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.TlbExpTask.NeedsCompiling">
+ <summary>
+ Determines whether the assembly needs to be exported to a type
+ library again.
+ </summary>
+ <returns>
+ <see langword="true" /> if the assembly needs to be exported to a
+ type library; otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbExpTask.AssemblyFile">
+ <summary>
+ Specifies the assembly for which to export a type library.
+ </summary>
+ <value>
+ The assembly for which to export a type library.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryexportertlbexpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbExpTask.OutputFile">
+ <summary>
+ Specifies the name of the type library file to generate.
+ </summary>
+ <value>
+ The name of the type library file to generate.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryexportertlbexpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbExpTask.NamesFile">
+ <summary>
+ Specifies the file used to determine capitalization of names in a
+ type library.
+ </summary>
+ <value>
+ The file used to determine capitalization of names in a type library.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryexportertlbexpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbExpTask.ProgramArguments">
+ <summary>
+ Gets the command line arguments for the external program.
+ </summary>
+ <value>
+ The command line arguments for the external program.
+ </value>
+ </member>
+ <member name="T:NAnt.Win32.Tasks.TlbImpTask">
+ <summary>
+ Imports a type library to a .NET assembly (wraps Microsoft's <c>tlbimp.exe</c>).
+ </summary>
+ <remarks>
+ <para>
+ This task lets you easily create interop assemblies. By default, it will
+ not reimport if the underlying COM TypeLib or reference has not changed.
+ </para>
+ <para>
+ <see href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</see>
+ </para>
+ </remarks>
+ <example>
+ <para>Import <c>LegacyCOM.dll</c> to <c>DotNetAssembly.dll</c>.</para>
+ <code>
+ <![CDATA[
+ <tlbimp typelib="LegacyCOM.dll" output="DotNetAssembly.dll" />
+ ]]>
+ </code>
+ </example>
+ <example>
+ <para>
+ Generate an assembly named "Interop.MSVidCtlLib.dll" for the
+ MS Video Control 1.0 Type Library, transforming any [out, retval]
+ parameters of methods on dispinterfaces in the type library into
+ return values in the managed library.
+ </para>
+ <code>
+ <![CDATA[
+ <tlbimp typelib="msvidctl.dll" output="Interop.MSVidCtlLib.dll" transform="dispret">
+ <references basedir="Interop">
+ <include name="Interop.TunerLib.dll" />
+ </references>
+ </tlbimp>
+ ]]>
+ </code>
+ </example>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.TlbImpTask.ExecuteTask">
+ <summary>
+ Imports the type library to a .NET assembly.
+ </summary>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.TlbImpTask.ExtractTypeLibPath(System.String)">
+ <summary>
+ Returns the path of the type library, removing the identifier of
+ the type library from the specified string.
+ </summary>
+ <param name="path">The path from which to extract the path of the type library.</param>
+ <returns>
+ The path of the type library without the type library identifier.
+ </returns>
+ <remarks>
+ An example of a path which includes the identifier of the type
+ library (in this case "2") is
+ <c>C:\WINDOWS\system32\msvidctl.dll\2</c>.
+ </remarks>
+ </member>
+ <member name="M:NAnt.Win32.Tasks.TlbImpTask.NeedsCompiling">
+ <summary>
+ Determines whether the type library needs to be imported again.
+ </summary>
+ <returns>
+ <see langword="true" /> if the type library needs to be imported;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.OutputFile">
+ <summary>
+ Specifies the name of the output file.
+ </summary>
+ <value>
+ The name of the output file.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.Namespace">
+ <summary>
+ Specifies the namespace in which to produce the assembly.
+ </summary>
+ <value>
+ The namespace in which to produce the assembly.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.AsmVersion">
+ <summary>
+ Specifies the version number of the assembly to produce.
+ </summary>
+ <remarks>
+ <value>
+ The version number of the assembly to produce.
+ </value>
+ <para>
+ The version number should be in the format major.minor.build.revision.
+ </para>
+ <para>
+ <a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a>
+ </para>
+ </remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.DelaySign">
+ <summary>
+ Specifies whether the resulting assembly should be signed with a
+ strong name using delayed signing. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if the resulting assembly should be signed
+ with a strong name using delayed signing; otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.Primary">
+ <summary>
+ Specifies whether a primary interop assembly should be produced for
+ the specified type library. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if a primary interop assembly should be
+ produced; otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.PublicKeyFile">
+ <summary>
+ Specifies the file containing the public key to use to sign the
+ resulting assembly.
+ </summary>
+ <value>
+ The file containing the public key to use to sign the resulting
+ assembly.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.KeyFile">
+ <summary>
+ Specifies the publisher's official public/private key pair with which
+ the resulting assembly should be signed with a strong name.
+ </summary>
+ <value>
+ The keyfile to use to sign the resulting assembly with a strong name.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.KeyContainer">
+ <summary>
+ Specifies the key container in which the public/private key pair
+ should be found that should be used to sign the resulting assembly
+ with a strong name.
+ </summary>
+ <value>
+ The key container containing a public/private key pair that should
+ be used to sign the resulting assembly.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.References">
+ <summary>
+ Specifies the assembly files to use to resolve references to types
+ defined outside the current type library.
+ </summary>
+ <value>
+ The assembly files to use to resolve references to types defined
+ outside the current type library.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.StrictRef">
+ <summary>
+ Specifies whether a type library should not be imported if all
+ references within the current assembly or the reference assemblies
+ cannot be resolved. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if a type library should not be imported if
+ all references cannot be resolved; otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.SysArray">
+ <summary>
+ Specifies whether to import a COM style SafeArray as a managed
+ <see cref="T:System.Array" /> class type. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if a COM style SafeArray should be imported
+ as a managed <see cref="T:System.Array" /> class type; otherwise,
+ <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.Transform">
+ <summary>
+ Specifies how to transform the metadata [.NET 1.1 or higher].
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.TypeLib">
+ <summary>
+ Specifies the source type library that gets passed to the type
+ library importer.
+ </summary>
+ <value>
+ The source type library that gets passed to the type library
+ importer.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.Unsafe">
+ <summary>
+ Specifies whether interfaces should be produced without .NET Framework
+ security checks. The default is <see langword="false" />.
+ </summary>
+ <value>
+ <see langword="true" /> if interfaces without .NET Framework security
+ checks should be produced; otherwise, <see langword="false" />.
+ </value>
+ <remarks><a href="ms-help://MS.NETFrameworkSDK/cptools/html/cpgrftypelibraryimportertlbimpexe.htm">See the Microsoft.NET Framework SDK documentation for details.</a></remarks>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.SupportsTransform">
+ <summary>
+ Indicates whether <c>tlbimp</c> supports transforming metadata for
+ a given target framework. The default is <see langword="true" />.
+ </summary>
+ </member>
+ <member name="P:NAnt.Win32.Tasks.TlbImpTask.ProgramArguments">
+ <summary>
+ Gets the command line arguments for the external program.
+ </summary>
+ <value>
+ The command line arguments for the external program.
+ </value>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NAnt.exe.config b/external/guiunit/tools/nant/bin/NAnt.exe.config
new file mode 100755
index 0000000..47629aa
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.exe.config
@@ -0,0 +1,3343 @@
+<?xml version="1.0"?>
+<configuration>
+ <!-- Leave this alone. Sets up configsectionhandler section -->
+ <configSections>
+ <section name="nant" type="NAnt.Core.ConfigurationSection, NAnt.Core" />
+ <section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
+ </configSections>
+ <appSettings>
+ <!-- Used to indicate the location of the cache folder for shadow files -->
+ <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
+ <!-- Used to indicate that NAnt should shadow copy files in a cache folder near the executable -->
+ <add key="nant.shadowfiles" value="False" />
+ <!-- Used to indicate if cached files should be deleted when done running-->
+ <add key="nant.shadowfiles.cleanup" value="False" />
+ <!-- To enable internal log4net logging, uncomment the next line -->
+ <!-- <add key="log4net.Internal.Debug" value="true"/> -->
+ </appSettings>
+ <!-- nant config settings -->
+ <nant>
+ <frameworks>
+ <platform name="win32" default="auto">
+ <task-assemblies>
+ <!-- include NAnt task assemblies -->
+ <include name="*Tasks.dll" />
+ <!-- include NAnt test assemblies -->
+ <include name="*Tests.dll" />
+ <!-- include framework-neutral assemblies -->
+ <include name="extensions/common/neutral/**/*.dll" />
+ <!-- exclude Microsoft.NET specific task assembly -->
+ <exclude name="NAnt.MSNetTasks.dll" />
+ <!-- exclude Microsoft.NET specific test assembly -->
+ <exclude name="NAnt.MSNet.Tests.dll" />
+ </task-assemblies>
+ <framework
+ name="net-1.0"
+ family="net"
+ version="1.0"
+ description="Microsoft .NET Framework 1.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v1.0.3705')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v1.0.3705')}"
+ clrversion="1.0.3705"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/1.0" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/1.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v1.0.3705" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v1.0.3705')}">
+ <include name="Accessibility.dll" />
+ <include name="cscompmgd.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.XML.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 1.0 specific assemblies -->
+ <include name="extensions/net/1.0/**/*.dll" />
+ <!-- include Microsoft.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include Microsoft.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 1.0 specific assemblies -->
+ <include name="extensions/common/1.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v1.0.3705')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot"
+ hive="LocalMachine"
+ failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ </task>
+ <task name="aximp">
+ <attribute name="supportsrcw">false</attribute>
+ </task>
+ <task name="tlbimp">
+ <attribute name="supportstransform">false</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="net-1.1"
+ family="net"
+ version="1.1"
+ description="Microsoft .NET Framework 1.1"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v1.1.4322')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v1.1.4322')}"
+ clrversion="1.1.4322"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/1.1" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/1.1" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v1.1.4322" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v1.1.4322')}">
+ <include name="Accessibility.dll" />
+ <include name="cscompmgd.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.XML.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 1.1 specific assemblies -->
+ <include name="extensions/net/1.1/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 1.1 specific assemblies -->
+ <include name="extensions/common/1.1/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v1.1.4322')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv1.1"
+ hive="LocalMachine"
+ failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="net-2.0"
+ family="net"
+ version="2.0"
+ description="Microsoft .NET Framework 2.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v2.0.50727')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.50727')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/2.0" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v2.0.50727')}">
+ <include name="Accessibility.dll" />
+ <include name="cscompmgd.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Utilities.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.XML.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v2.0.50727')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0"
+ hive="LocalMachine"
+ failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="net-3.5"
+ family="net"
+ version="3.5"
+ description="Microsoft .NET Framework 3.5"
+ sdkdirectory="${sdkInstallRoot}"
+ frameworkdirectory="${path::combine(installRoot, 'v3.5')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.50727')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/net/2.0" />
+ <directory name="lib/net/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v2.0.50727')}">
+ <include name="Accessibility.dll" />
+ <include name="cscompmgd.dll" />
+ <include name="mscorlib.dll" />
+ <include name="Microsoft.Build.Utilities.dll" />
+ <include name="Microsoft.Vsa.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.XML.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/v3.5">
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="System.AddIn.Contract.dll" />
+ <include name="System.AddIn.dll" />
+ <include name="System.ComponentModel.DataAnnotations.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.Data.DataSetExtensions.dll" />
+ <include name="System.Data.Entity.Design.dll" />
+ <include name="System.Data.Entity.dll" />
+ <include name="System.Data.Linq.dll" />
+ <include name="System.Data.Services.Client.dll" />
+ <include name="System.Data.Services.Design.dll" />
+ <include name="System.Data.Services.dll" />
+ <include name="System.DirectoryServices.AccountManagement.dll" />
+ <include name="System.Management.Instrumentation.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.Web.Abstractions.dll" />
+ <include name="System.Web.DynamicData.Design.dll" />
+ <include name="System.Web.DynamicData.dll" />
+ <include name="System.Web.Entitly.Design.dll" />
+ <include name="System.Web.Entitly.dll" />
+ <include name="System.Web.Extensions.Design.dll" />
+ <include name="System.Web.Extensions.dll" />
+ <include name="System.Web.Routing.dll" />
+ <include name="System.Windows.Presentation.dll" />
+ <include name="System.WorkflowServices.dll" />
+ <include name="System.Xml.Linq.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/v3.0">
+ <include name="PresentationBuildTasks.dll" />
+ <include name="PresentationCore.dll" />
+ <include name="PresentationFramework.Aero.dll" />
+ <include name="PresentationFramework.Classic.dll" />
+ <include name="PresentationFramework.dll" />
+ <include name="PresentationFramework.Luna.dll" />
+ <include name="PresentationFramework.Royale.dll" />
+ <include name="ReachFramework.dll" />
+ <include name="System.IdentityModel.dll" />
+ <include name="System.IdentityModel.Selectors.dll" />
+ <include name="System.IO.Log.dll" />
+ <include name="System.Printing.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.Speech.dll" />
+ <include name="System.Workflow.Activities.dll" />
+ <include name="System.Workflow.ComponentModel.dll" />
+ <include name="System.Workflow.Runtime.dll" />
+ <include name="UIAutomationClient.dll" />
+ <include name="UIAutomationClientsideProviders.dll" />
+ <include name="UIAutomationProvider.dll" />
+ <include name="UIAutomationTypes.dll" />
+ <include name="WindowsBase.dll" />
+ <include name="WindowsFormsIntegration.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${sdkInstallRoot}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v3.5')}" />
+ <directory name="${path::combine(installRoot, 'v2.0.50727')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v6.0A" maxnetfxver="3.5" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="net-4.0"
+ family="net"
+ version="4.0"
+ description="Microsoft .NET Framework 4.0"
+ sdkdirectory="${sdkInstallRoot}"
+ frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ clrversion="4.0.30319"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}">
+ <include name="Accessibility.dll" />
+ <include name="Microsoft.Build.Conversion.v4.0.dll" />
+ <include name="Microsoft.Build.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Tasks.v4.0.dll" />
+ <include name="Microsoft.Build.Utilities.v4.0.dll" />
+ <include name="Microsoft.CSharp.dll" />
+ <include name="Microsoft.Data.Entity.Build.Tasks.dll" />
+ <include name="Microsoft.JScript.dll" />
+ <include name="Microsoft.Transactions.Bridge.dll" />
+ <include name="Microsoft.Transactions.Bridge.Dtc.dll" />
+ <include name="Microsoft.VisualBasic.Activities.Compiler.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualC.dll" />
+ <include name="Microsoft.VisualC.STLCLR.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Activities.Core.Presentation.dll" />
+ <include name="System.Activities.dll" />
+ <include name="System.Activities.DurableInstancing.dll" />
+ <include name="System.Activities.Presentation.dll" />
+ <include name="System.AddIn.Contract" />
+ <include name="System.AddIn.dll" />
+ <include name="System.ComponentModel.Composition.dll" />
+ <include name="System.ComponentModel.DataAnnotations.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.Data.DataSetExtensions.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.Entity.Design.dll" />
+ <include name="System.Data.Entity.dll" />
+ <include name="System.Data.Linq.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.Services.Client.dll" />
+ <include name="System.Data.Services.Design.dll" />
+ <include name="System.Data.Services.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.Device.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.DirectoryServices.Protocols.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.Dynamic.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.EnterpriseServices.Thunk.dll" />
+ <include name="System.EnterpriseServices.Wrapper.dll" />
+ <include name="System.IdentityModel.dll" />
+ <include name="System.IdentityModel.Selectors.dll" />
+ <include name="System.IO.Log.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Management.Instrumentation.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Numerics.dll" />
+ <include name="System.Runtime.Caching.dll" />
+ <include name="System.Runtime.DurableInstancing.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceModel.Activation.dll" />
+ <include name="System.ServiceModel.Activities.dll" />
+ <include name="System.ServiceModel.Channels.dll" />
+ <include name="System.ServiceModel.Discovery.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Routing.dll" />
+ <include name="System.ServiceModel.ServiceMoniker40.dll" />
+ <include name="System.ServiceModel.WasHosting.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.Abstractions.dll" />
+ <include name="System.Web.ApplicationServices.dll" />
+ <include name="System.Web.DataVisualization.Design.dll" />
+ <include name="System.Web.DataVisualization.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.DynamicData.Design.dll" />
+ <include name="System.Web.DynamicData.dll" />
+ <include name="System.Web.Entity.Design.dll" />
+ <include name="System.Web.Entity.dll" />
+ <include name="System.Web.Extensions.Design.dll" />
+ <include name="System.Web.Extensions.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Routing.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.DataVisualization.Design.dll" />
+ <include name="System.Windows.Forms.DataVisualization.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Workflow.Activities.dll" />
+ <include name="System.Workflow.ComponentModel.dll" />
+ <include name="System.Workflow.Runtime.dll" />
+ <include name="System.WorkflowServices.dll" />
+ <include name="System.Xaml.dll" />
+ <include name="System.Xaml.Hosting.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Xml.Linq.dll" />
+ </reference-assemblies>
+ <!-- WPF Assemblies -->
+ <reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}/WPF">
+ <include name="NaturalLanguage6.dll" />
+ <include name="NlsData0009.dll" />
+ <include name="NlsLexicons0009.dll" />
+ <include name="PenIMC.dll" />
+ <include name="PresentationCore.dll" />
+ <include name="PresentationFramework.Aero.dll" />
+ <include name="PresentationFramework.Classic.dll" />
+ <include name="PresentationFramework.dll" />
+ <include name="PresentationFramework.Luna.dll" />
+ <include name="PresentationFramework.Royale.dll" />
+ <include name="PresentationHost_v0400.dll" />
+ <include name="PresentationNative_v0400.dll" />
+ <include name="PresentationUI.dll" />
+ <include name="ReachFramework.dll" />
+ <include name="System.Printing.dll" />
+ <include name="System.Speech.dll" />
+ <include name="System.Windows.Input.Manipulations.dll" />
+ <include name="System.Windows.Presentation.dll" />
+ <include name="UIAutomationClient.dll" />
+ <include name="UIAutomationClientsideProviders.dll" />
+ <include name="UIAutomationProvider.dll" />
+ <include name="UIAutomationTypes.dll" />
+ <include name="WindowsBase.dll" />
+ <include name="WindowsFormsIntegration.dll" />
+ <include name="wpfgfx_v0400.dll" />
+ <include name="wpftxt_v0400.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.0">
+ <include name="Microsoft.Build.Conversion.v4.0.dll" />
+ <include name="Microsoft.Build.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Tasks.v4.0.dll" />
+ <include name="Microsoft.Build.Utilities.v4.0.dll" />
+ <include name="Microsoft.CSharp.dll" />
+ <include name="Microsoft.JScript.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="Microsoft.VisualBasic.Comptatibility.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualC.dll" />
+ <include name="Microsoft.VisualC.STLCLR.dll" />
+ <include name="mscorlib.dll" />
+ <include name="PresentationBuildTasks.dll" />
+ <include name="PresentationCore.dll" />
+ <include name="WindowsBase.dll" />
+ <include name="PresentationFramework.dll" />
+ <include name="PresentationFramework.Aero.dll" />
+ <include name="PresentationFramework.Classic.dll" />
+ <include name="PresentationFramework.Luna.dll" />
+ <include name="PresentationFramework.Royale.dll" />
+ <include name="ReachFramework.dll" />
+ <include name="System.Activities.Core.Presentation.dll" />
+ <include name="System.Activities.dll" />
+ <include name="System.Activities.DurableInstancing.dll" />
+ <include name="System.Activities.Presentation.dll" />
+ <include name="System.AddIn.Contract.dll" />
+ <include name="System.AddIn.dll" />
+ <include name="System.ComponentModel.Composition.dll" />
+ <include name="System.ComponentModel.DataAnnotations.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.Data.DataSetExtension.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.Entity.Design.dll" />
+ <include name="System.Data.Entity.dll" />
+ <include name="System.Data.Linq.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.Services.Client.dll" />
+ <include name="System.Data.Services.Design.dll" />
+ <include name="System.Data.Services.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.Device.dll" />
+ <include name="System.DirectoryServices.AccountManagement.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.DirectoryServices.Protocols.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.EnterpriseServices.Thunk.dll" />
+ <include name="System.EnterpriseServices.Wrapper.dll" />
+ <include name="System.IdentityModel.dll" />
+ <include name="System.IdentityModel.Selectors.dll" />
+ <include name="System.IO.Log.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Management.Instrumentation.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Numerics.dll" />
+ <include name="System.Printing.dll" />
+ <include name="System.Runtime.Caching.dll" />
+ <include name="System.Runtime.DurableInstancing.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceModel.Activation.dll" />
+ <include name="System.ServiceModel.Activities.dll" />
+ <include name="System.ServiceModel.Channels.dll" />
+ <include name="System.ServiceModel.Discovery.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Routing.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Speech.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.Abstractions.dll" />
+ <include name="System.Web.ApplicationServices.dll" />
+ <include name="System.Web.DataVisualization.Design.dll" />
+ <include name="System.Web.DataVisualization.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.DynamicData.Design.dll" />
+ <include name="System.Web.DynamicData.dll" />
+ <include name="System.Web.Entity.Design.dll" />
+ <include name="System.Web.Entity.dll" />
+ <include name="System.Web.Extensions.Design.dll" />
+ <include name="System.Web.Extensions.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Routing.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.DataVisualization.Design.dll" />
+ <include name="System.Windows.Forms.DataVisualization.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Windows.Input.Manipulations.dll" />
+ <include name="System.Windows.Presentation.dll" />
+ <include name="System.Workflow.Activities.dll" />
+ <include name="System.Workflow.ComponentModel.dll" />
+ <include name="System.Workflow.Runtime.dll" />
+ <include name="System.WorkflowServices.dll" />
+ <include name="System.Xaml.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Xml.Linq.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 4.0 specific assemblies -->
+ <include name="extensions/net/4.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 4.0 specific assemblies -->
+ <include name="extensions/common/4.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${sdkInstallRoot}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v4.0.30319')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="net-4.5"
+ family="net"
+ version="4.5"
+ description="Microsoft .NET Framework 4.5"
+ sdkdirectory="${sdkInstallRoot}"
+ frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ frameworkassemblydirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ clrversion="4.0.30319"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}">
+ <include name="Accessibility.dll" />
+ <include name="Microsoft.Build.Conversion.v4.0.dll" />
+ <include name="Microsoft.Build.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Tasks.v4.0.dll" />
+ <include name="Microsoft.Build.Utilities.v4.0.dll" />
+ <include name="Microsoft.CSharp.dll" />
+ <include name="Microsoft.Data.Entity.Build.Tasks.dll" />
+ <include name="Microsoft.JScript.dll" />
+ <include name="Microsoft.Transactions.Bridge.dll" />
+ <include name="Microsoft.Transactions.Bridge.Dtc.dll" />
+ <include name="Microsoft.VisualBasic.Activities.Compiler.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualC.dll" />
+ <include name="Microsoft.VisualC.STLCLR.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Activities.Core.Presentation.dll" />
+ <include name="System.Activities.dll" />
+ <include name="System.Activities.DurableInstancing.dll" />
+ <include name="System.Activities.Presentation.dll" />
+ <include name="System.AddIn.Contract" />
+ <include name="System.AddIn.dll" />
+ <include name="System.ComponentModel.Composition.dll" />
+ <include name="System.ComponentModel.DataAnnotations.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Configuration.Install.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.Data.DataSetExtensions.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.Entity.Design.dll" />
+ <include name="System.Data.Entity.dll" />
+ <include name="System.Data.Linq.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.Services.Client.dll" />
+ <include name="System.Data.Services.Design.dll" />
+ <include name="System.Data.Services.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.Device.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.DirectoryServices.Protocols.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.Dynamic.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.EnterpriseServices.Thunk.dll" />
+ <include name="System.EnterpriseServices.Wrapper.dll" />
+ <include name="System.IdentityModel.dll" />
+ <include name="System.IdentityModel.Selectors.dll" />
+ <include name="System.IO.Log.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Management.Instrumentation.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Numerics.dll" />
+ <include name="System.Runtime.Caching.dll" />
+ <include name="System.Runtime.DurableInstancing.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceModel.Activation.dll" />
+ <include name="System.ServiceModel.Activities.dll" />
+ <include name="System.ServiceModel.Channels.dll" />
+ <include name="System.ServiceModel.Discovery.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Routing.dll" />
+ <include name="System.ServiceModel.ServiceMoniker40.dll" />
+ <include name="System.ServiceModel.WasHosting.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.Abstractions.dll" />
+ <include name="System.Web.ApplicationServices.dll" />
+ <include name="System.Web.DataVisualization.Design.dll" />
+ <include name="System.Web.DataVisualization.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.DynamicData.Design.dll" />
+ <include name="System.Web.DynamicData.dll" />
+ <include name="System.Web.Entity.Design.dll" />
+ <include name="System.Web.Entity.dll" />
+ <include name="System.Web.Extensions.Design.dll" />
+ <include name="System.Web.Extensions.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Routing.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.DataVisualization.Design.dll" />
+ <include name="System.Windows.Forms.DataVisualization.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Workflow.Activities.dll" />
+ <include name="System.Workflow.ComponentModel.dll" />
+ <include name="System.Workflow.Runtime.dll" />
+ <include name="System.WorkflowServices.dll" />
+ <include name="System.Xaml.dll" />
+ <include name="System.Xaml.Hosting.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Xml.Linq.dll" />
+ </reference-assemblies>
+ <!-- WPF Assemblies -->
+ <reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}/WPF">
+ <include name="NaturalLanguage6.dll" />
+ <include name="NlsData0009.dll" />
+ <include name="NlsLexicons0009.dll" />
+ <include name="PenIMC.dll" />
+ <include name="PresentationCore.dll" />
+ <include name="PresentationFramework.Aero.dll" />
+ <include name="PresentationFramework.Classic.dll" />
+ <include name="PresentationFramework.dll" />
+ <include name="PresentationFramework.Luna.dll" />
+ <include name="PresentationFramework.Royale.dll" />
+ <include name="PresentationHost_v0400.dll" />
+ <include name="PresentationNative_v0400.dll" />
+ <include name="PresentationUI.dll" />
+ <include name="ReachFramework.dll" />
+ <include name="System.Printing.dll" />
+ <include name="System.Speech.dll" />
+ <include name="System.Windows.Input.Manipulations.dll" />
+ <include name="System.Windows.Presentation.dll" />
+ <include name="UIAutomationClient.dll" />
+ <include name="UIAutomationClientsideProviders.dll" />
+ <include name="UIAutomationProvider.dll" />
+ <include name="UIAutomationTypes.dll" />
+ <include name="WindowsBase.dll" />
+ <include name="WindowsFormsIntegration.dll" />
+ <include name="wpfgfx_v0400.dll" />
+ <include name="wpftxt_v0400.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.5">
+ <include name="Microsoft.Build.Conversion.v4.0.dll" />
+ <include name="Microsoft.Build.dll" />
+ <include name="Microsoft.Build.Engine.dll" />
+ <include name="Microsoft.Build.Framework.dll" />
+ <include name="Microsoft.Build.Tasks.v4.0.dll" />
+ <include name="Microsoft.Build.Utilities.v4.0.dll" />
+ <include name="Microsoft.CSharp.dll" />
+ <include name="Microsoft.JScript.dll" />
+ <include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
+ <include name="Microsoft.VisualBasic.Comptatibility.dll" />
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="Microsoft.VisualC.dll" />
+ <include name="Microsoft.VisualC.STLCLR.dll" />
+ <include name="mscorlib.dll" />
+ <include name="PresentationBuildTasks.dll" />
+ <include name="PresentationCore.dll" />
+ <include name="WindowsBase.dll" />
+ <include name="PresentationFramework.dll" />
+ <include name="PresentationFramework.Aero.dll" />
+ <include name="PresentationFramework.Classic.dll" />
+ <include name="PresentationFramework.Luna.dll" />
+ <include name="PresentationFramework.Royale.dll" />
+ <include name="ReachFramework.dll" />
+ <include name="System.Activities.Core.Presentation.dll" />
+ <include name="System.Activities.dll" />
+ <include name="System.Activities.DurableInstancing.dll" />
+ <include name="System.Activities.Presentation.dll" />
+ <include name="System.AddIn.Contract.dll" />
+ <include name="System.AddIn.dll" />
+ <include name="System.ComponentModel.Composition.dll" />
+ <include name="System.ComponentModel.DataAnnotations.dll" />
+ <include name="System.Configuration.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.Data.DataSetExtension.dll" />
+ <include name="System.Data.dll" />
+ <include name="System.Data.Entity.Design.dll" />
+ <include name="System.Data.Entity.dll" />
+ <include name="System.Data.Linq.dll" />
+ <include name="System.Data.OracleClient.dll" />
+ <include name="System.Data.Services.Client.dll" />
+ <include name="System.Data.Services.Design.dll" />
+ <include name="System.Data.Services.dll" />
+ <include name="System.Data.SqlXml.dll" />
+ <include name="System.Deployment.dll" />
+ <include name="System.Design.dll" />
+ <include name="System.Device.dll" />
+ <include name="System.DirectoryServices.AccountManagement.dll" />
+ <include name="System.DirectoryServices.dll" />
+ <include name="System.DirectoryServices.Protocols.dll" />
+ <include name="System.dll" />
+ <include name="System.Drawing.Design.dll" />
+ <include name="System.Drawing.dll" />
+ <include name="System.EnterpriseServices.dll" />
+ <include name="System.EnterpriseServices.Thunk.dll" />
+ <include name="System.EnterpriseServices.Wrapper.dll" />
+ <include name="System.IdentityModel.dll" />
+ <include name="System.IdentityModel.Selectors.dll" />
+ <include name="System.IO.Log.dll" />
+ <include name="System.Management.dll" />
+ <include name="System.Management.Instrumentation.dll" />
+ <include name="System.Messaging.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Numerics.dll" />
+ <include name="System.Printing.dll" />
+ <include name="System.Runtime.Caching.dll" />
+ <include name="System.Runtime.DurableInstancing.dll" />
+ <include name="System.Runtime.Remoting.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.Runtime.Serialization.Formatters.Soap.dll" />
+ <include name="System.Security.dll" />
+ <include name="System.ServiceModel.Activation.dll" />
+ <include name="System.ServiceModel.Activities.dll" />
+ <include name="System.ServiceModel.Channels.dll" />
+ <include name="System.ServiceModel.Discovery.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Routing.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.ServiceProcess.dll" />
+ <include name="System.Speech.dll" />
+ <include name="System.Transactions.dll" />
+ <include name="System.Web.Abstractions.dll" />
+ <include name="System.Web.ApplicationServices.dll" />
+ <include name="System.Web.DataVisualization.Design.dll" />
+ <include name="System.Web.DataVisualization.dll" />
+ <include name="System.Web.dll" />
+ <include name="System.Web.DynamicData.Design.dll" />
+ <include name="System.Web.DynamicData.dll" />
+ <include name="System.Web.Entity.Design.dll" />
+ <include name="System.Web.Entity.dll" />
+ <include name="System.Web.Extensions.Design.dll" />
+ <include name="System.Web.Extensions.dll" />
+ <include name="System.Web.Mobile.dll" />
+ <include name="System.Web.RegularExpressions.dll" />
+ <include name="System.Web.Routing.dll" />
+ <include name="System.Web.Services.dll" />
+ <include name="System.Windows.Forms.DataVisualization.Design.dll" />
+ <include name="System.Windows.Forms.DataVisualization.dll" />
+ <include name="System.Windows.Forms.dll" />
+ <include name="System.Windows.Input.Manipulations.dll" />
+ <include name="System.Windows.Presentation.dll" />
+ <include name="System.Workflow.Activities.dll" />
+ <include name="System.Workflow.ComponentModel.dll" />
+ <include name="System.Workflow.Runtime.dll" />
+ <include name="System.WorkflowServices.dll" />
+ <include name="System.Xaml.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Xml.Linq.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 4.0 specific assemblies -->
+ <include name="extensions/net/4.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 4.0 specific assemblies -->
+ <include name="extensions/common/4.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${sdkInstallRoot}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v4.0.30319')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="netcf-1.0"
+ family="netcf"
+ version="1.0"
+ description="Microsoft .NET Compact Framework 1.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'v1.0.5000\bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v1.1.4322')}"
+ frameworkassemblydirectory="${path::combine(sdkInstallRoot, 'v1.0.5000\Windows CE')}"
+ clrversion="1.1.4322"
+ clrtype="Compact"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v1.1.4322" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(sdkInstallRoot, 'v1.0.5000\Windows CE')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- this is not a supported runtime framework -->
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot, 'v1.0.5000\bin')}" />
+ <directory name="${path::combine(installRoot, 'v1.1.4322')}" />
+ <directory name="${path::combine(sdkInstallRoot.DesktopFramework, 'bin')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETCompactFramework\sdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot.DesktopFramework"
+ key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv1.1"
+ hive="LocalMachine" />
+ <fail if="${not directory::exists(sdkInstallRoot.DesktopFramework)}">The .NET Framework 1.1 SDK is not installed.</fail>
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="exename">cfresgen</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="netcf-2.0"
+ family="netcf"
+ version="2.0"
+ description="Microsoft .NET Compact Framework 2.0"
+ sdkdirectory="${path::combine(sdkInstallRoot.DesktopFramework, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v2.0.50727')}"
+ frameworkassemblydirectory="${path::combine(sdkInstallRoot, 'WindowsCE')}"
+ clrversion="2.0.0"
+ clrtype="Compact"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(sdkInstallRoot, 'WindowsCE')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- this is not a supported runtime framework -->
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot.DesktopFramework, 'bin')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETCompactFramework\v2.0.0.0\InstallRoot\"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot.DesktopFramework"
+ key="SOFTWARE\Microsoft\.NETFramework\sdkInstallRootv2.0"
+ hive="LocalMachine" />
+ <fail if="${not directory::exists(sdkInstallRoot.DesktopFramework)}">The .NET Framework 2.0 SDK is not installed.</fail>
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="netcf-3.5"
+ family="netcf"
+ version="3.5"
+ description="Microsoft .NET Compact Framework 3.5"
+ sdkdirectory="${path::combine(sdkInstallRoot.DesktopFramework, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v3.5')}"
+ frameworkassemblydirectory="${path::combine(sdkInstallRoot, 'WindowsCE')}"
+ clrversion="2.0.0"
+ vendor="Microsoft">
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(sdkInstallRoot, 'WindowsCE')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- this is not a supported runtime framework -->
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(sdkInstallRoot.DesktopFramework, 'bin')}" />
+ </tool-paths>
+ <project>
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot"
+ key="SOFTWARE\Microsoft\.NETCompactFramework\v3.5.0.0\InstallRoot\"
+ hive="LocalMachine" />
+ <readregistry
+ property="sdkInstallRoot.DesktopFramework"
+ key="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0A\WinSDKNetFxTools\InstallationFolder"
+ hive="LocalMachine"
+ failonerror="false" />
+ <fail if="${not directory::exists(sdkInstallRoot.DesktopFramework)}">The .NET Framework 3.5 SDK is not installed.</fail>
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="silverlight-2.0"
+ family="silverlight"
+ version="2.0"
+ description="Microsoft Silverlight 2.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v3.5')}"
+ frameworkassemblydirectory="${SL2RefAssemblyBaseDir}"
+ clrversion="2.0.50727"
+ clrtype="Browser"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${SL2RefAssemblyBaseDir}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Xml.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${SL2RefAssemblyBaseDir}" />
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v3.5')}" />
+ <directory name="${path::combine(installRoot, 'v2.0.50727')}" />
+ </tool-paths>
+ <project>
+ <readregistry property="SL2RefAssemblyBaseDir"
+ key="SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v2.0\ReferenceAssemblies\SLRuntimeInstallPath"
+ hive="LocalMachine" />
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v6.0A" maxnetfxver="3.5" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="silverlight-3.0"
+ family="silverlight"
+ version="3.0"
+ description="Microsoft Silverlight 3.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v3.5')}"
+ frameworkassemblydirectory="${SL3RefAssemblyBaseDir}"
+ clrversion="2.0.50727"
+ clrtype="Browser"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v2.0.50727" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${SL3RefAssemblyBaseDir}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <!-- Remaining libraries found in the Reference Assembly directory -->
+ <include name="agcore.debug.dll" />
+ <include name="agcore.dll" />
+ <include name="coreclr.dll" />
+ <include name="mscorrc.debug.dll" />
+ <include name="mscorrc.dll" />
+ <include name="npctrl.dll" />
+ <include name="npctrlui.dll" />
+ <include name="Silverlight.ConfigurationUI.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${SL3RefAssemblyBaseDir}" />
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v3.5')}" />
+ </tool-paths>
+ <project>
+ <readregistry property="SL3RefAssemblyBaseDir"
+ key="SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v3.0\ReferenceAssemblies\SLRuntimeInstallPath"
+ hive="LocalMachine" />
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v6.0A" maxnetfxver="3.5" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="silverlight-4.0"
+ family="silverlight"
+ version="4.0"
+ description="Microsoft Silverlight 4.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ frameworkassemblydirectory="${SL4RefAssemblyBaseDir}"
+ clrversion="4.0.30319"
+ clrtype="Browser"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${SL4RefAssemblyBaseDir}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="system.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <!-- Remaining libraries found in the Reference Assembly directory -->
+ <include name="agcore.debug.dll" />
+ <include name="agcore.dll" />
+ <include name="coreclr.dll" />
+ <include name="mscorrc.debug.dll" />
+ <include name="mscorrc.dll" />
+ <include name="npctrl.dll" />
+ <include name="npctrlui.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 4.0 specific assemblies -->
+ <include name="extensions/net/4.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 4.0 specific assemblies -->
+ <include name="extensions/common/4.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${SL4RefAssemblyBaseDir}" />
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v4.0.30319')}" />
+ </tool-paths>
+ <project>
+ <readregistry property="SL4RefAssemblyBaseDir"
+ key="SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v4.0\ReferenceAssemblies\SLRuntimeInstallPath"
+ hive="LocalMachine" />
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="silverlight-5.0"
+ family="silverlight"
+ version="5.0"
+ description="Microsoft Silverlight 5.0"
+ sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}"
+ frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
+ frameworkassemblydirectory="${SL5RefAssemblyBaseDir}"
+ clrversion="4.0.30319"
+ clrtype="Browser"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <strict>
+ <environment>
+ <variable name="COMPLUS_VERSION" value="v4.0.30319" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${SL5RefAssemblyBaseDir}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="system.dll" />
+ <include name="System.Xml.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <!-- Remaining libraries found in the Reference Assembly directory -->
+ <include name="agcore.debug.dll" />
+ <include name="agcore.dll" />
+ <include name="coreclr.dll" />
+ <include name="mscorrc.debug.dll" />
+ <include name="mscorrc.dll" />
+ <include name="npctrl.dll" />
+ <include name="npctrlui.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <!-- Remaining libraries are specific to XNA programming -->
+ <include name="Microsoft.Xna.Framework.dll" />
+ <include name="Microsoft.Xna.Framework.Graphics.dll" />
+ <include name="Microsoft.Xna.Framework.Graphics.Shaders.dll" />
+ <include name="System.Windows.Xna.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 4.0 specific assemblies -->
+ <include name="extensions/net/4.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 4.0 specific assemblies -->
+ <include name="extensions/common/4.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${SL5RefAssemblyBaseDir}" />
+ <directory name="${path::combine(sdkInstallRoot, 'bin')}"
+ if="${property::exists('sdkInstallRoot')}" />
+ <directory name="${path::combine(installRoot, 'v4.0.30319')}" />
+ </tool-paths>
+ <project>
+ <readregistry property="SL5RefAssemblyBaseDir"
+ key="SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v5.0\ReferenceAssemblies\SLRuntimeInstallPath"
+ hive="LocalMachine" />
+ <readregistry
+ property="installRoot"
+ key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
+ hive="LocalMachine" />
+ <locatesdk property="sdkInstallRoot" minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999" failonerror="false" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="noconfig">true</attribute>
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="nostdlib">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportsnostdlib">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportsplatform">true</attribute>
+ <attribute name="supportswarnaserrorlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="supportsplatform">true</attribute>
+ </task>
+ <task name="vjc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="exename">lc</attribute>
+ <attribute name="supportsassemblyreferences">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-1.0"
+ family="mono"
+ version="1.0"
+ description="Mono 1.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}"
+ clrversion="1.1.4322"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/1.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/1.1" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${runtimeEngine}" />
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </auto>
+ <strict>
+ <engine program="${runtimeEngine}">
+ <arg value="--runtime=v1.1.4322" />
+ </engine>
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 1.0 specific assemblies -->
+ <include name="extensions/mono/1.0/**/*.dll" />
+ <!-- include .NET 1.1 specific assemblies -->
+ <include name="extensions/common/1.1/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <!-- unmanaged tools -->
+ <directory name="${sdkInstallRoot}/bin" />
+ </tool-paths>
+ <project>
+ <!-- quick and dirty check to see if pkg-config is available (and configured) -->
+ <property name="pkgconfig.available" value="${environment::variable-exists('PKG_CONFIG_PATH')}" />
+ <if test="${pkgconfig.available}">
+ <if test="${pkg-config::exists('mono')}">
+ <call target="configure-from-pkg-config" />
+ </if>
+ <if test="${not pkg-config::exists('mono')}">
+ <call target="configure-from-registry" />
+ </if>
+ </if>
+ <if test="${not pkgconfig.available}">
+ <call target="configure-from-registry" />
+ </if>
+
+ <!-- determine if we're dealing with a Mono 1.0.x release -->
+ <if test="${version::parse(mono.version) < version::parse('1.1')}">
+ <!--
+ in Mono 1.0.x, the framework tools are located
+ in the <install root>\lib directory
+ -->
+ <property name="toolDirectory" value="${frameworkAssemblyDirectory}" />
+ <property name="runtimeEngine" value="${path::combine(frameworkAssemblyDirectory, 'mono.exe')}" />
+ <property name="resgen.tool" value="monoresgen" />
+ <!-- in Mono 1.0.x, only mcs and mbas are located in <install root>\lib\mono\<profile> -->
+ <property name="csc.tool" value="${path::combine(frameworkAssemblyDirectory, 'mono/1.0/mcs.exe')}" />
+ <property name="mbas.tool" value="${path::combine(frameworkAssemblyDirectory, 'mono/1.0/mbas.exe')}" />
+ <!-- /doc is not supported in Mono 1.0.x -->
+ <property name="csc.supportsdocgeneration" value="false" />
+
+ <!--
+ Mono 1.0.1 installer incorrectly adds '\mono' to
+ "MonoConfigDir" registry value
+ -->
+ <if test="${string::ends-with(configDir, 'etc\mono')}">
+ <property name="configDir" value="${string::replace(configDir, 'etc\mono', 'etc')}" />
+ </if>
+ </if>
+
+ <!-- determine if we're dealing with a Mono 1.1.x release or higher -->
+ <if test="${version::parse(mono.version) >= version::parse('1.1')}">
+ <!--
+ in Mono 1.1.x (and higher ?), the framework tools
+ are located in the <install root>\lib\mono\<profile>
+ directory
+ -->
+ <property name="toolDirectory" value="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}" />
+ <property name="runtimeEngine" value="${path::combine(frameworkAssemblyDirectory, 'mono.exe')}" />
+ <!-- starting from Mono 1.1.9.2, mono.exe is located in the bin directory -->
+ <if test="${not file::exists(runtimeEngine)}">
+ <property name="runtimeEngine" value="${path::combine(sdkInstallRoot, 'bin/mono.exe')}" />
+ </if>
+ <property name="resgen.tool" value="resgen" />
+ <property name="csc.tool" value="mcs" />
+ <property name="csc.supportsdocgeneration" value="true" />
+ <property name="mbas.tool" value="mbas" />
+ </if>
+
+ <target name="configure-from-pkg-config">
+ <property name="mono.version" value="${pkg-config::get-mod-version('mono')}" />
+ <property name="sdkInstallRoot" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'prefix'))}" />
+ <property name="frameworkAssemblyDirectory" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'libdir'))}" />
+ <property name="configDir" value="${path::combine(sdkInstallRoot, 'etc')}/" />
+ </target>
+
+ <target name="configure-from-registry">
+ <monoregistry property="mono.reg" failonerror="false" />
+ <readregistry
+ property="mono.version"
+ key="${mono.reg}\DefaultCLR"
+ hive="LocalMachine"
+ />
+ <property name="monokey" value="${mono.reg}\${mono.version}" />
+
+ <readregistry
+ property="sdkInstallRoot"
+ key="${monokey}\SdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="frameworkAssemblyDirectory"
+ key="${monokey}\FrameworkAssemblyDirectory"
+ hive="LocalMachine" />
+ <readregistry
+ property="configDir"
+ key="${monokey}\MonoConfigDir"
+ hive="LocalMachine" />
+ </target>
+ </project>
+ <properties>
+ </properties>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">${csc.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">${csc.supportsdocgeneration}</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">${mbas.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="exename">${resgen.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-2.0"
+ family="mono"
+ version="2.0"
+ description="Mono 2.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${runtimeEngine}" />
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </auto>
+ <strict>
+ <engine program="${runtimeEngine}">
+ <arg value="--runtime=v2.0.50727" />
+ </engine>
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}" />
+ <!-- for compatibility with Mono 1.0.x -->
+ <directory name="${frameworkAssemblyDirectory}" />
+ <!-- unmanaged tools -->
+ <directory name="${sdkInstallRoot}/bin" />
+ </tool-paths>
+ <project>
+ <!-- quick and dirty check to see if pkg-config is available (and configured) -->
+ <property name="pkgconfig.available" value="${environment::variable-exists('PKG_CONFIG_PATH')}" />
+ <if test="${pkgconfig.available}">
+ <if test="${pkg-config::exists('mono')}">
+ <call target="configure-from-pkg-config" />
+ </if>
+ <if test="${not pkg-config::exists('mono')}">
+ <call target="configure-from-registry" />
+ </if>
+ </if>
+ <if test="${not pkgconfig.available}">
+ <call target="configure-from-registry" />
+ </if>
+
+ <property name="resgen.supportsexternalfilereferences" value="false" />
+
+ <!-- determine if we're dealing with a Mono 1.0.x release -->
+ <if test="${version::parse(mono.version) < version::parse('1.1')}">
+ <!--
+ in Mono 1.0.x, the framework tools are located
+ in the <install root>\lib directory, except for
+ mbas and mcs
+ -->
+ <property name="toolDirectory" value="${frameworkAssemblyDirectory}" />
+ <property name="runtimeEngine" value="${path::combine(frameworkAssemblyDirectory, 'mono.exe')}" />
+ <property name="resgen.tool" value="monoresgen" />
+ <property name="csc.supportsdocgeneration" value="false" />
+
+ <!--
+ Mono 1.0.1 installer incorrectly adds '\mono' to
+ "MonoConfigDir" registry value
+ -->
+ <if test="${string::ends-with(configDir, 'etc\mono')}">
+ <property name="configDir" value="${string::replace(configDir, 'etc\mono', 'etc')}" />
+ </if>
+ </if>
+
+ <!-- determine if we're dealing with a Mono 1.1.x release or higher -->
+ <if test="${version::parse(mono.version) >= version::parse('1.1')}">
+ <property name="toolDirectory" value="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}" />
+ <property name="runtimeEngine" value="${path::combine(frameworkAssemblyDirectory, 'mono.exe')}" />
+ <!-- starting from Mono 1.1.9.2, mono.exe is located in the bin directory -->
+ <if test="${not file::exists(runtimeEngine)}">
+ <property name="runtimeEngine" value="${path::combine(sdkInstallRoot, 'bin/mono.exe')}" />
+ </if>
+ <property name="csc.supportsdocgeneration" value="true" />
+ </if>
+ <!-- as from Mono 1.2.3.50, resgen supports the /usesourcepath option -->
+ <if test="${version::parse(mono.version) >= version::parse('1.2.3.50')}">
+ <property name="resgen.supportsexternalfilereferences" value="true" />
+ </if>
+
+ <target name="configure-from-pkg-config">
+ <property name="mono.version" value="${pkg-config::get-mod-version('mono')}" />
+ <property name="sdkInstallRoot" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'prefix'))}" />
+ <property name="frameworkAssemblyDirectory" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'libdir'))}" />
+ <property name="configDir" value="${path::combine(sdkInstallRoot, 'etc')}/" />
+ </target>
+
+ <target name="configure-from-registry">
+ <monoregistry property="mono.reg" failonerror="false" />
+ <readregistry
+ property="mono.version"
+ key="${mono.reg}\DefaultCLR"
+ hive="LocalMachine"
+ />
+ <property name="monokey" value="${mono.reg}\${mono.version}" />
+
+ <readregistry
+ property="sdkInstallRoot"
+ key="${monokey}\SdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="frameworkAssemblyDirectory"
+ key="${monokey}\FrameworkAssemblyDirectory"
+ hive="LocalMachine" />
+ <readregistry
+ property="configDir"
+ key="${monokey}\MonoConfigDir"
+ hive="LocalMachine" />
+ </target>
+ </project>
+ <properties>
+ </properties>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">gmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">${csc.supportsdocgeneration}</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="exename">${resgen.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">${resgen.supportsexternalfilereferences}</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-3.5"
+ family="mono"
+ version="3.5"
+ description="Mono 3.5 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${runtimeEngine}" />
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </auto>
+ <strict>
+ <engine program="${runtimeEngine}">
+ <arg value="--runtime=v2.0.50727" />
+ </engine>
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/3.5')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/3.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/3.5')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${sdkInstallRoot}/bin" />
+ </tool-paths>
+ <project>
+ <!-- quick and dirty check to see if pkg-config is available (and configured) -->
+ <property name="pkgconfig.available" value="${environment::variable-exists('PKG_CONFIG_PATH')}" />
+ <if test="${pkgconfig.available}">
+ <if test="${pkg-config::exists('mono')}">
+ <call target="configure-from-pkg-config" />
+ </if>
+ <if test="${not pkg-config::exists('mono')}">
+ <call target="configure-from-registry" />
+ </if>
+ </if>
+ <if test="${not pkgconfig.available}">
+ <call target="configure-from-registry" />
+ </if>
+
+ <property name="toolDirectory" value="${path::combine(frameworkAssemblyDirectory, 'mono/3.5')}" />
+ <property name="runtimeEngine" value="${path::combine(sdkInstallRoot, 'bin/mono.exe')}" />
+
+ <target name="configure-from-pkg-config">
+ <property name="mono.version" value="${pkg-config::get-mod-version('mono')}" />
+ <property name="sdkInstallRoot" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'prefix'))}" />
+ <property name="frameworkAssemblyDirectory" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'libdir'))}" />
+ <property name="configDir" value="${path::combine(sdkInstallRoot, 'etc')}/" />
+ </target>
+
+ <target name="configure-from-registry">
+ <monoregistry property="mono.reg" failonerror="false" />
+ <readregistry
+ property="mono.version"
+ key="${mono.reg}\DefaultCLR"
+ hive="LocalMachine"
+ />
+ <property name="monokey" value="${mono.reg}\${mono.version}" />
+
+ <readregistry
+ property="sdkInstallRoot"
+ key="${monokey}\SdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="frameworkAssemblyDirectory"
+ key="${monokey}\FrameworkAssemblyDirectory"
+ hive="LocalMachine" />
+ <readregistry
+ property="configDir"
+ key="${monokey}\MonoConfigDir"
+ hive="LocalMachine" />
+ </target>
+ </project>
+ <properties>
+ </properties>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">gmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="langversion">linq</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-4.0"
+ family="mono"
+ version="4.0"
+ description="Mono 4.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(frameworkAssemblyDirectory, 'mono/4.0')}"
+ clrversion="4.0.30319"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${runtimeEngine}" />
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </auto>
+ <strict>
+ <engine program="${runtimeEngine}">
+ <arg value="--runtime=v4.0.30319" />
+ </engine>
+ <environment>
+ <variable name="PATH" path="${path::combine(sdkInstallRoot, 'bin')};%PATH%" />
+ <variable name="MONO_CFG_DIR" path="${configDir};%MONO_CFG_DIR%" />
+ </environment>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/4.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/3.5')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/3.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/4.0')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/3.5')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${sdkInstallRoot}/bin" />
+ </tool-paths>
+ <project>
+ <!-- quick and dirty check to see if pkg-config is available (and configured) -->
+ <property name="pkgconfig.available" value="${environment::variable-exists('PKG_CONFIG_PATH')}" />
+ <if test="${pkgconfig.available}">
+ <if test="${pkg-config::exists('mono')}">
+ <call target="configure-from-pkg-config" />
+ </if>
+ <if test="${not pkg-config::exists('mono')}">
+ <call target="configure-from-registry" />
+ </if>
+ </if>
+ <if test="${not pkgconfig.available}">
+ <call target="configure-from-registry" />
+ </if>
+
+ <property name="toolDirectory" value="${path::combine(frameworkAssemblyDirectory, 'mono/4.0')}" />
+ <property name="runtimeEngine" value="${path::combine(sdkInstallRoot, 'bin/mono.exe')}" />
+
+ <target name="configure-from-pkg-config">
+ <property name="mono.version" value="${pkg-config::get-mod-version('mono')}" />
+ <property name="sdkInstallRoot" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'prefix'))}" />
+ <property name="frameworkAssemblyDirectory" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'libdir'))}" />
+ <property name="configDir" value="${path::combine(sdkInstallRoot, 'etc')}/" />
+ </target>
+
+ <target name="configure-from-registry">
+ <monoregistry property="mono.reg" failonerror="false" />
+ <readregistry
+ property="mono.version"
+ key="${mono.reg}\DefaultCLR"
+ hive="LocalMachine"
+ />
+ <property name="monokey" value="${mono.reg}\${mono.version}" />
+
+ <readregistry
+ property="sdkInstallRoot"
+ key="${monokey}\SdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="frameworkAssemblyDirectory"
+ key="${monokey}\FrameworkAssemblyDirectory"
+ hive="LocalMachine" />
+ <readregistry
+ property="configDir"
+ key="${monokey}\MonoConfigDir"
+ hive="LocalMachine" />
+ </target>
+ </project>
+ <properties>
+ </properties>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">dmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="langversion">linq</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="moonlight-2.0"
+ family="moonlight"
+ version="2.0"
+ description="Moonlight 2.0"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${toolDirectory}"
+ clrversion="2.0.50727"
+ clrtype="Browser"
+ vendor="Mono"
+ >
+ <runtime>
+ <modes>
+ <auto>
+ <engine program="${runtimeEngine}">
+ <arg value="--runtime=moonlight" />
+ <arg value="--security=temporary-smcs-hack" />
+ </engine>
+ </auto>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(frameworkAssemblyDirectory, 'lib/mono/2.1')}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Xml.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/2.0')}" />
+ <directory name="${path::combine(frameworkAssemblyDirectory, 'mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${sdkInstallRoot}/bin" />
+ </tool-paths>
+ <project>
+ <!-- quick and dirty check to see if pkg-config is available (and configured) -->
+ <property name="pkgconfig.available" value="${environment::variable-exists('PKG_CONFIG_PATH')}" />
+ <if test="${pkgconfig.available}">
+ <if test="${pkg-config::exists('mono')}">
+ <call target="configure-from-pkg-config" />
+ </if>
+ <if test="${not pkg-config::exists('mono')}">
+ <call target="configure-from-registry" />
+ </if>
+ </if>
+ <if test="${not pkgconfig.available}">
+ <call target="configure-from-registry" />
+ </if>
+
+ <property name="toolDirectory" value="${path::combine(frameworkAssemblyDirectory, 'mono/2.1')}" />
+ <property name="runtimeEngine" value="${path::combine(sdkInstallRoot, 'bin/mono.exe')}" />
+
+ <target name="configure-from-pkg-config">
+ <property name="mono.version" value="${pkg-config::get-mod-version('mono')}" />
+ <property name="sdkInstallRoot" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'prefix'))}" />
+ <property name="frameworkAssemblyDirectory" value="${cygpath::get-windows-path(pkg-config::get-variable('mono', 'libdir'))}" />
+ <property name="configDir" value="${path::combine(sdkInstallRoot, 'etc')}/" />
+ </target>
+
+ <target name="configure-from-registry">
+ <monoregistry property="mono.reg" failonerror="false" />
+ <readregistry
+ property="mono.version"
+ key="${mono.reg}\DefaultCLR"
+ hive="LocalMachine"
+ />
+ <property name="monokey" value="${mono.reg}\${mono.version}" />
+
+ <readregistry
+ property="sdkInstallRoot"
+ key="${monokey}\SdkInstallRoot"
+ hive="LocalMachine" />
+ <readregistry
+ property="frameworkAssemblyDirectory"
+ key="${monokey}\FrameworkAssemblyDirectory"
+ hive="LocalMachine" />
+ <readregistry
+ property="configDir"
+ key="${monokey}\MonoConfigDir"
+ hive="LocalMachine" />
+ </target>
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="exename">smcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="sscli-1.0"
+ family="sscli"
+ version="1.0"
+ description="Microsoft Shared Source CLI 1.0"
+ sdkdirectory="C:\sscli\build\v1.x86fstchk.rotor\sdk\bin"
+ frameworkdirectory="C:\sscli\build\v1.x86fstchk.rotor"
+ frameworkassemblydirectory="C:\sscli\build\v1.x86fstchk.rotor"
+ clrversion="1.0.3"
+ clrtype="Desktop"
+ vendor="Microsoft"
+ >
+ <runtime>
+ <modes>
+ <auto>
+ <engine program="C:\sscli\build\v1.x86fstchk.rotor\clix.exe" />
+ </auto>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="C:\sscli\build\v1.x86fstchk.rotor">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- this is not a supported runtime framework -->
+ </task-assemblies>
+ <tool-paths>
+ <directory name="C:\sscli\build\v1.x86fstchk.rotor\sdk\bin" />
+ <directory name="C:\sscli\build\v1.x86fstchk.rotor" />
+ </tool-paths>
+ <project />
+ <tasks>
+ <task name="csc">
+ <attribute name="supportsnowarnlist">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="ildasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ </platform>
+ <platform name="unix" default="auto">
+ <task-assemblies>
+ <!-- include NAnt task assemblies -->
+ <include name="*Tasks.dll" />
+ <!-- include NAnt test assemblies -->
+ <include name="*Tests.dll" />
+ <!-- include framework-neutral assemblies -->
+ <include name="extensions/common/neutral/**/*.dll" />
+ <!-- exclude Microsoft.NET specific task assembly -->
+ <exclude name="NAnt.MSNetTasks.dll" />
+ <!-- exclude Microsoft.NET specific test assembly -->
+ <exclude name="NAnt.MSNet.Tests.dll" />
+ <!-- exclude win32 specific task assembly -->
+ <exclude name="NAnt.Win32Tasks.dll" />
+ <!-- exclude win32 specific test assembly -->
+ <exclude name="NAnt.Win32.Tests.dll" />
+ </task-assemblies>
+ <framework
+ name="mono-1.0"
+ family="mono"
+ version="1.0"
+ description="Mono 1.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(prefix, 'lib/mono/1.0')}"
+ clrversion="1.1.4322"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/1.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/1.1" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${path::combine(prefix, 'bin/mono')}" />
+ </auto>
+ <strict>
+ <engine program="${path::combine(prefix, 'bin/mono')}">
+ <arg value="--runtime=v1.1.4322" />
+ </engine>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/1.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 1.0 specific assemblies -->
+ <include name="extensions/mono/1.0/**/*.dll" />
+ <!-- include .NET 1.1 specific assemblies -->
+ <include name="extensions/common/1.1/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <!-- unmanaged tools -->
+ <directory name="${prefix}/bin" />
+ </tool-paths>
+ <project>
+ <if test="${not pkg-config::exists('mono')}">
+ <fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
+ </if>
+ <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
+ <if test="${not(pkg-config::is-atleast-version('mono', '1.1'))}">
+ <property name="toolDirectory" value="${path::combine(prefix, 'bin')}" />
+ <property name="resgen.tool" value="monoresgen" />
+ <property name="csc.supportsdocgeneration" value="false" />
+ </if>
+ <if test="${pkg-config::is-atleast-version('mono', '1.1')}">
+ <property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/1.0')}" />
+ <property name="resgen.tool" value="resgen" />
+ <property name="csc.supportsdocgeneration" value="true" />
+ </if>
+ </project>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">${path::combine(prefix, 'lib/mono/1.0/mcs.exe')}</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">${csc.supportsdocgeneration}</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">${path::combine(prefix, 'lib/mono/1.0/mbas.exe')}</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="exename">${resgen.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-2.0"
+ family="mono"
+ version="2.0"
+ description="Mono 2.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(prefix, 'lib/mono/2.0')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${path::combine(prefix, 'bin/mono')}" />
+ </auto>
+ <strict>
+ <engine program="${path::combine(prefix, 'bin/mono')}">
+ <arg value="--runtime=v2.0.50727" />
+ </engine>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${prefix}/bin" />
+ </tool-paths>
+ <project>
+ <if test="${not pkg-config::exists('mono')}">
+ <fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
+ </if>
+ <property name="resgen.supportsexternalfilereferences" value="false" />
+ <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
+ <if test="${not(pkg-config::is-atleast-version('mono', '1.1'))}">
+ <property name="toolDirectory" value="${path::combine(prefix, 'bin')}" />
+ <property name="resgen.tool" value="monoresgen" />
+ <property name="csc.supportsdocgeneration" value="false" />
+ </if>
+ <if test="${pkg-config::is-atleast-version('mono', '1.1')}">
+ <property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/2.0')}" />
+ <property name="resgen.tool" value="resgen" />
+ <property name="csc.supportsdocgeneration" value="true" />
+ </if>
+ <!-- as from Mono 1.2.3.50, resgen supports the /usesourcepath option -->
+ <if test="${pkg-config::is-atleast-version('mono', '1.2.3.50')}">
+ <property name="resgen.supportsexternalfilereferences" value="true" />
+ </if>
+ </project>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">gmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">${csc.supportsdocgeneration}</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="exename">${resgen.tool}</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">${resgen.supportsexternalfilereferences}</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-3.5"
+ family="mono"
+ version="3.5"
+ description="Mono 3.5 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(prefix, 'lib/mono/2.0')}"
+ clrversion="2.0.50727"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${path::combine(prefix, 'bin/mono')}" />
+ </auto>
+ <strict>
+ <engine program="${path::combine(prefix, 'bin/mono')}">
+ <arg value="--runtime=v2.0.50727" />
+ </engine>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.5')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(prefix, 'lib/mono/2.0')}" />
+ <directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${prefix}/bin" />
+ </tool-paths>
+ <project>
+ <if test="${not pkg-config::exists('mono')}">
+ <fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
+ </if>
+ <property name="resgen.supportsexternalfilereferences" value="false" />
+ <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
+ <property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/3.5')}" />
+ </project>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">gmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="langversion">linq</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="mono-4.0"
+ family="mono"
+ version="4.0"
+ description="Mono 4.0 Profile"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${path::combine(prefix, 'lib/mono/4.0')}"
+ clrversion="4.0.30319"
+ clrtype="Desktop"
+ vendor="Mono"
+ >
+ <runtime>
+ <probing-paths>
+ <directory name="lib/mono/2.0" />
+ <directory name="lib/mono/neutral" />
+ <directory name="lib/common/2.0" />
+ <directory name="lib/common/neutral" />
+ </probing-paths>
+ <modes>
+ <auto>
+ <engine program="${path::combine(prefix, 'bin/mono')}" />
+ </auto>
+ <strict>
+ <engine program="${path::combine(prefix, 'bin/mono')}">
+ <arg value="--runtime=v4.0.30319" />
+ </engine>
+ </strict>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/4.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.5')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/3.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/2.0')}">
+ <include name="*.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include Mono version-neutral assemblies -->
+ <include name="extensions/mono/neutral/**/*.dll" />
+ <!-- include Mono 2.0 specific assemblies -->
+ <include name="extensions/mono/2.0/**/*.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(prefix, 'lib/mono/3.5')}" />
+ <directory name="${path::combine(prefix, 'lib/mono/2.0')}" />
+ <directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${prefix}/bin" />
+ </tool-paths>
+ <project>
+ <if test="${not pkg-config::exists('mono')}">
+ <fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
+ </if>
+ <property name="resgen.supportsexternalfilereferences" value="false" />
+ <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
+ <property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/4.0')}" />
+ </project>
+ <tasks>
+ <task name="al">
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="csc">
+ <attribute name="exename">dmcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="langversion">linq</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="jsc">
+ <attribute name="exename">mjs</attribute>
+ <attribute name="managed">strict</attribute>
+ </task>
+ <task name="vbc">
+ <attribute name="exename">vbnc</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="managed">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ <attribute name="managed">true</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ <task name="ilasm">
+ <attribute name="managed">true</attribute>
+ </task>
+ </tasks>
+ </framework>
+ <framework
+ name="moonlight-2.0"
+ family="moonlight"
+ version="2.0"
+ description="Moonlight 2.0"
+ sdkdirectory="${toolDirectory}"
+ frameworkdirectory="${toolDirectory}"
+ frameworkassemblydirectory="${toolDirectory}"
+ clrversion="2.0.50727"
+ clrtype="Browser"
+ vendor="Mono"
+ >
+ <runtime>
+ <modes>
+ <auto>
+ <engine program="${path::combine(prefix, 'bin/mono')}">
+ <arg value="--runtime=moonlight" />
+ <arg value="--security=temporary-smcs-hack" />
+ </engine>
+ </auto>
+ </modes>
+ </runtime>
+ <reference-assemblies basedir="${path::combine(prefix, 'lib/mono/2.1')}">
+ <include name="Microsoft.VisualBasic.dll" />
+ <include name="mscorlib.dll" />
+ <include name="System.Core.dll" />
+ <include name="System.dll" />
+ <include name="System.Net.dll" />
+ <include name="System.Runtime.Serialization.dll" />
+ <include name="System.ServiceModel.dll" />
+ <include name="System.ServiceModel.Web.dll" />
+ <include name="System.Windows.Browser.dll" />
+ <include name="System.Windows.dll" />
+ <include name="System.Xml.dll" />
+ </reference-assemblies>
+ <task-assemblies>
+ <!-- include MS.NET version-neutral assemblies -->
+ <include name="extensions/net/neutral/**/*.dll" />
+ <!-- include MS.NET 2.0 specific assemblies -->
+ <include name="extensions/net/2.0/**/*.dll" />
+ <!-- include MS.NET specific task assembly -->
+ <include name="NAnt.MSNetTasks.dll" />
+ <!-- include MS.NET specific test assembly -->
+ <include name="NAnt.MSNet.Tests.dll" />
+ <!-- include .NET 2.0 specific assemblies -->
+ <include name="extensions/common/2.0/**/*.dll" />
+ </task-assemblies>
+ <tool-paths>
+ <directory name="${toolDirectory}" />
+ <directory name="${path::combine(prefix, 'lib/mono/2.0')}" />
+ <directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
+ <!-- unmanaged tools -->
+ <directory name="${prefix}/bin" />
+ </tool-paths>
+ <project>
+ <if test="${not pkg-config::exists('mono')}">
+ <fail>Unable to locate 'mono' module using pkg-config. Download the Mono development packages from http://www.mono-project.com/downloads/.</fail>
+ </if>
+ <property name="prefix" value="${pkg-config::get-variable('mono', 'prefix')}" />
+ <property name="toolDirectory" value="${path::combine(prefix, 'lib/mono/2.1')}" />
+ </project>
+ <tasks>
+ <task name="csc">
+ <attribute name="exename">smcs</attribute>
+ <attribute name="managed">true</attribute>
+ <attribute name="supportspackagereferences">true</attribute>
+ <attribute name="supportsnowarnlist">true</attribute>
+ <attribute name="supportsdocgeneration">true</attribute>
+ <attribute name="supportskeycontainer">true</attribute>
+ <attribute name="supportskeyfile">true</attribute>
+ <attribute name="supportsdelaysign">true</attribute>
+ <attribute name="supportslangversion">true</attribute>
+ </task>
+ <task name="resgen">
+ <attribute name="supportsassemblyreferences">true</attribute>
+ <attribute name="supportsexternalfilereferences">true</attribute>
+ </task>
+ <task name="delay-sign">
+ <attribute name="exename">sn</attribute>
+ </task>
+ <task name="license">
+ <attribute name="hascommandlinecompiler">false</attribute>
+ </task>
+ </tasks>
+ </framework>
+ </platform>
+ </frameworks>
+ <properties>
+ <!-- properties defined here are accessible to all build files -->
+ <!-- <property name="foo" value = "bar" readonly="false" /> -->
+ </properties>
+ </nant>
+ <!--
+ This section contains the log4net configuration settings.
+
+ By default, no messages will be logged to the log4net logging infrastructure.
+
+ To enable the internal logging, set the threshold attribute on the log4net element
+ to "ALL".
+
+ When internal logging is enabled, internal messages will be written to the
+ console.
+ -->
+ <log4net threshold="OFF">
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <param name="ConversionPattern" value="[%c{2}:%m - [%x] <%X{auth}>]%n" />
+ </layout>
+ </appender>
+ <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
+ <param name="File" value="${APPDATA}\\NAnt\\NAnt.log" />
+ <param name="AppendToFile" value="true" />
+ <param name="MaxSizeRollBackups" value="2" />
+ <param name="MaximumFileSize" value="500KB" />
+ <param name="RollingStyle" value="Size" />
+ <param name="StaticLogFileName" value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <param name="ConversionPattern" value="[%c{2}:%m - [%x] <%X{auth}>]%n" />
+ </layout>
+ </appender>
+ <!-- Setup the root category, add the appenders and set the default level -->
+ <root>
+ <!-- Only log messages with severity ERROR (or higher) -->
+ <level value="ERROR" />
+ <!-- Log messages to the console -->
+ <appender-ref ref="ConsoleAppender" />
+ <!-- Uncomment the next line to enable logging messages to the NAnt.log file -->
+ <!-- <appender-ref ref="RollingLogFileAppender" /> -->
+ </root>
+ <!-- Specify the priority for some specific categories -->
+ <!--
+ <logger name="NAnt.Core.TaskBuilderCollection">
+ <level value="DEBUG" />
+ </logger>
+ <logger name="NAnt">
+ <level value="INFO" />
+ </logger>
+ -->
+ </log4net>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="lib" />
+ </assemblyBinding>
+ <NetFx40_LegacySecurityPolicy enabled="true"/>
+ </runtime>
+ <startup>
+ <!-- .NET Framework 4.0 -->
+ <supportedRuntime version="v4.0.30319" />
+ <!-- .NET Framework 2.0 -->
+ <supportedRuntime version="v2.0.50727" />
+ </startup>
+</configuration>
diff --git a/external/guiunit/tools/nant/bin/NAnt.xml b/external/guiunit/tools/nant/bin/NAnt.xml
new file mode 100755
index 0000000..05605b6
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NAnt.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.Console.ConsoleStub">
+ <summary>
+ Stub used to created <see cref="T:System.AppDomain"/> and launch real <c>ConsoleDriver</c>
+ class in Core assembly.
+ </summary>
+ </member>
+ <member name="M:NAnt.Console.ConsoleStub.Main(System.String[])">
+ <summary>
+ Entry point for executable
+ </summary>
+ <param name="args">Command Line arguments</param>
+ <returns>The result of the real execution</returns>
+ </member>
+ <member name="M:NAnt.Console.ConsoleStub.ConstructPrivateBinPath(NAnt.Console.ConsoleStub.Framework,System.String)">
+ <summary>
+ Constructs the privatebinpath.
+ </summary>
+ <remarks>
+ <para>
+ For the common version dir, we do not use the framework version
+ as defined in the NAnt configuration file but the CLR version
+ since the assemblies in that directory are not specific to a
+ certain family and the framwork version might differ between
+ families (eg. mono 1.0 == .NET 1.1).
+ </para>
+ </remarks>
+ <param name="runtimeFramework">The runtime framework.</param>
+ <param name="baseDir">The base directory of the domain.</param>
+ <returns>
+ The privatebinpath.
+ </returns>
+ </member>
+ <member name="M:NAnt.Console.ConsoleStub.GetRelativePath(System.String,System.String)">
+ <summary>
+ Given an absolute directory and an absolute file name, returns a
+ relative file name.
+ </summary>
+ <param name="basePath">An absolute directory.</param>
+ <param name="absolutePath">An absolute file name.</param>
+ <returns>
+ A relative file name for the given absolute file name.
+ </returns>
+ </member>
+ <member name="T:NAnt.Console.ConsoleStub.HelperArguments">
+ <summary>
+ Helper class for invoking the application entry point in NAnt.Core
+ and passing the command-line arguments.
+ </summary>
+ </member>
+ <member name="M:NAnt.Console.ConsoleStub.HelperArguments.#ctor(System.String[],System.String)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NAnt.Console.ConsoleStub.HelperArguments"/>
+ class with the specified command-line arguments.
+ </summary>
+ <param name="args">The commandline arguments passed to NAnt.exe.</param>
+ <param name="probePaths">Directories relative to the base directory of the AppDomain to probe for missing assembly references.</param>
+ </member>
+ <member name="M:NAnt.Console.ConsoleStub.HelperArguments.CallConsoleRunner">
+ <summary>
+ Invokes the application entry point in NAnt.Core.
+ </summary>
+ </member>
+ <member name="P:NAnt.Console.ConsoleStub.HelperArguments.ExitCode">
+ <summary>
+ Gets the status that the build process returned when it exited.
+ </summary>
+ <value>
+ The code that the build process specified when it terminated.
+ </value>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/NDoc.Documenter.NAnt.xml b/external/guiunit/tools/nant/bin/NDoc.Documenter.NAnt.xml
new file mode 100755
index 0000000..83da5d7
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/NDoc.Documenter.NAnt.xml
@@ -0,0 +1,373 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NDoc.Documenter.NAnt</name>
+ </assembly>
+ <members>
+ <member name="T:NDoc.Documenter.NAnt.NAntDocumenter">
+ <summary>
+ NDoc Documenter for building custom NAnt User documentation.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntDocumenter.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NDoc.Documenter.NAnt.NAntDocumenter"/> class.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntDocumenter.Clear">
+ <summary>
+ Resets the documenter to a clean state.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntDocumenter.Build(NDoc.Core.Project)">
+ <summary>
+ Builds the documentation.
+ </summary>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.OutputDirectory">
+ <summary>
+ Gets the documenter's output directory.
+ </summary>
+ <value>
+ The documenter's output directory.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.NamespaceFilter">
+ <summary>
+ Gets or sets the root namespace to document.
+ </summary>
+ <value>
+ The root namespace to document, or a empty <see cref="T:System.String"/>
+ if no restriction should be set on the namespace to document.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.ProductName">
+ <summary>
+ Gets the name of the product for which documentation should be
+ generated.
+ </summary>
+ <value>
+ The name of the product for which documentation should be
+ generated.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.ProductVersion">
+ <summary>
+ Gets the version of the product for which documentation should be
+ generated.
+ </summary>
+ <value>
+ The version of the product for which documentation should be
+ generated.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.ProductUrl">
+ <summary>
+ Gets the URL of the website of the product for which documentation
+ should be generated.
+ </summary>
+ <value>
+ The URL of the website of the product for which documentation should
+ be generated.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenter.MainOutputFile">
+ <summary>
+ Gets the documenter's main output file.
+ </summary>
+ <value>
+ The documenter's main output file.
+ </value>
+ </member>
+ <member name="T:NDoc.Documenter.NAnt.NAntDocumenterConfig">
+ <summary>
+ NDoc configuration class for <see cref="T:NDoc.Documenter.NAnt.NAntDocumenter"/>.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntDocumenterConfig.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:NDoc.Documenter.NAnt.NAntDocumenterConfig"/>
+ class.
+ </summary>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.OutputDirectory">
+ <summary>
+ Gets or sets the output directory.
+ </summary>
+ <value>
+ The output directory.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.SdkLinksOnWeb">
+ <summary>
+ Gets or sets a value indicating whether .NET Framework SDK links
+ should point to the online MSDN library.
+ </summary>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.ProductName">
+ <summary>
+ Gets or sets the name of the product for which documentation
+ should be generated.
+ </summary>
+ <value>
+ The name of the product for which documentation should be
+ generated. The default is "NAnt".
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.ProductVersion">
+ <summary>
+ Gets or sets the version of the product for which documentation
+ should be generated.
+ </summary>
+ <value>
+ The version of the product for which documentation should be
+ generated.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.ProductUrl">
+ <summary>
+ Gets or sets the URL of product website.
+ </summary>
+ <value>
+ The URL of the website of the product for which documentation should
+ be generated.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.NAntBaseUri">
+ <summary>
+ Gets or sets the base URI for linking to NAnt docs.
+ </summary>
+ <value>
+ The base URI for linking to NAnt docs.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntDocumenterConfig.NamespaceFilter">
+ <summary>
+ Gets or sets the root namespace to document.
+ </summary>
+ <value>
+ The root namespace to document, or a empty <see cref="T:System.String"/>
+ if no restriction should be set on the namespace to document.
+ </value>
+ </member>
+ <member name="T:NDoc.Documenter.NAnt.NAntXsltUtilities">
+ <summary>
+ Provides an extension object for the XSLT transformations.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.#ctor(System.Xml.XmlDocument,NDoc.Documenter.NAnt.NAntDocumenterConfig)">
+ <summary>
+ Initializes a new instance of the <see cref="T:NDoc.Documenter.NAnt.NAntXsltUtilities"/>
+ class.
+ </summary>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetNamespaceFilter">
+ <summary>
+ Gets the root namespace to document.
+ </summary>
+ <returns>
+ The root namespace to document, or a empty <see cref="T:System.String"/>
+ if no restriction should be set on the namespace to document.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetClassNode(System.String)">
+ <summary>
+ Searches the document for the <c><class></c> node with the
+ given id.
+ </summary>
+ <param name="type">Type.FullName of class to return</param>
+ <returns>
+ The <c><class></c> node with the given id, or <see langword="null" />
+ if the node does not exist.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetHRef(System.String)">
+ <summary>
+ Returns an href for a cref.
+ </summary>
+ <param name="cref">The cref for which the href will be looked up.</param>
+ <returns>
+ The href for the specified cref.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetName(System.String)">
+ <summary>
+ Returns the name for a given cref.
+ </summary>
+ <param name="cref">The cref for which the name will be looked up.</param>
+ <returns>
+ The name for the specified cref.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetTaskName(System.String)">
+ <summary>
+ Returns the NAnt task name for a given cref.
+ </summary>
+ <param name="cref">The cref for the task name will be looked up.</param>
+ <returns>
+ The NAnt task name for the specified cref.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetElementName(System.String)">
+ <summary>
+ Returns the NAnt element name for a given cref.
+ </summary>
+ <param name="cref">The cref for the element name will be looked up.</param>
+ <returns>
+ The NAnt element name for the specified cref.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetElementDocType(System.Xml.XmlNode)">
+ <summary>
+ Determines the <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/> of the given type node.
+ </summary>
+ <param name="typeNode">The type node for which to determine the <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/>.</param>
+ <returns>
+ The <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/> of the given type node.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetElementDocTypeByID(System.String)">
+ <summary>
+ Determines the <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/> of the type to which
+ the given cref points.
+ </summary>
+ <param name="cref">The cref for which to determine the <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/>.</param>
+ <returns>
+ The <see cref="T:NDoc.Documenter.NAnt.ElementDocType"/> of the type to which the given
+ cref points.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.IsDataType(System.String)">
+ <summary>
+ Determines whether the given cref points to a <c>datatype</c>.
+ </summary>
+ <param name="cref">The cref to check.</param>
+ <returns>
+ <see langword="true" /> if the given cref points to a <c>datatype</c>;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.IsElement(System.String)">
+ <summary>
+ Determines whether the given cref points to an <c>element</c>.
+ </summary>
+ <param name="cref">The cref to check.</param>
+ <returns>
+ <see langword="true"/> if the given cref points to an <c>element</c>;
+ otherwise, <see langword="false"/>.
+ </returns>
+ <remarks>
+ When the cref points to a <see cref="T:NAnt.Core.Task"/> or <see cref="T:NAnt.Core.DataTypeBase"/>
+ this method returns <see langword="false"/>.
+ </remarks>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.IsFilter(System.String)">
+ <summary>
+ Determines whether the given cref points to a <c>datatype</c>.
+ </summary>
+ <param name="cref">The cref to check.</param>
+ <returns>
+ <see langword="true" /> if the given cref points to a <c>datatype</c>;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.IsTask(System.String)">
+ <summary>
+ Determines whether the given cref points to a <c>task</c>.
+ </summary>
+ <param name="cref">The cref to check.</param>
+ <returns>
+ <see langword="true" /> if the given cref points to a <c>task</c>;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.IsFunctionSet(System.String)">
+ <summary>
+ Determines whether the given cref points to a <c>functionset</c>.
+ </summary>
+ <param name="cref">The cref to check.</param>
+ <returns>
+ <see langword="true" /> if the given cref points to a <c>functionset</c>;
+ otherwise, <see langword="false" />.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.UrlEncode(System.String)">
+ <summary>
+ Encodes a URL string using <see cref="P:System.Text.Encoding.UTF8"/> for reliable
+ HTTP transmission from the Web server to a client.
+ </summary>
+ <param name="value">The text to encode.</param>
+ <returns>
+ The encoded string.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetElementNameForProperty(System.Xml.XmlNode)">
+ <summary>
+ Gets the BuildElementAttribute name for the "class/property" XmlNode
+ </summary>
+ <param name="propertyNode">The XmlNode to look for a name.</param>
+ <returns>The BuildElementAttrbute.Name if the attribute exists for the node.</returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetFileNameForFunction(System.Xml.XmlNode,System.Boolean)">
+ <summary>
+ Returns the filename to use for the given function XmlElement
+ </summary>
+ <param name="typeNode">The "method" element to find the filename for.</param>
+ <param name="urlEncode">Specified whether to URLencode the filename.</param>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetFileNameForType(System.Xml.XmlNode,System.Boolean)">
+ <summary>
+ Returns the filename to use for the given class XmlNode
+ </summary>
+ <param name="typeNode">The "Class" element to find the filename for.</param>
+ <returns>
+ The relative path and filename where this type is stored in the
+ documentation.
+ </returns>
+ <remarks>
+ For a type that is neither a task, enum, global type, filter or
+ functionset, the returned filename will point to the SDK docs for
+ that type.
+ </remarks>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetTaskNameForType(System.Xml.XmlNode)">
+ <summary>
+ Gets the TaskNameAttrbute name for the "class" XmlNode
+ </summary>
+ <param name="propertyNode">The XmlNode to look for a name.</param>
+ <returns>The <see cref="!:TaskNameAttribute.Name"/> if the attribute exists for the node.</returns>
+ <remarks>
+ The class is also checked to make sure it is derived from <see cref="T:NAnt.Core.Task"/>
+ </remarks>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetElementNameForMethod(System.Xml.XmlNode)">
+ <summary>
+ Gets the function name for methods that represent a NAtn function.
+ </summary>
+ <param name="methodNode">The XmlNode to look for a name.</param>
+ <returns>
+ The function name if <paramref name="methodNode" /> represent a
+ NAnt function.
+ </returns>
+ </member>
+ <member name="M:NDoc.Documenter.NAnt.NAntXsltUtilities.GetHRefForFunctionSet(System.Xml.XmlNode)">
+ <summary>
+ Returns a partial URL to link to the functionset in the function index.
+ </summary>
+ <param name="typeNode">The "Class" element to find the filename for.</param>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntXsltUtilities.SdkDocBaseUrl">
+ <summary>
+ Gets the base url for links to system types.
+ </summary>
+ <value>
+ The base url for links to system types.
+ </value>
+ </member>
+ <member name="P:NDoc.Documenter.NAnt.NAntXsltUtilities.SdkDocExt">
+ <summary>
+ Gets the page file extension for links to system types.
+ </summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml b/external/guiunit/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml
new file mode 100755
index 0000000..70166d3
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.MSBuild</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.MSBuild.Functions.MSBuildFunctions">
+ <summary>
+ Functions to return information for MSBuild system.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSBuild.Functions.MSBuildFunctions.#ctor(NAnt.Core.Project,NAnt.Core.PropertyDictionary)">
+ <exclude/>
+ </member>
+ <member name="M:NAnt.MSBuild.Functions.MSBuildFunctions.IsMsbuildProject(System.String)">
+ <summary>
+ Test whether project is VS2005 project and could be built using <msbuild>
+ </summary>
+ <param name="project">The name or path of the project file (csproj, vbproj, ...).</param>
+ <returns>
+ True, if it is msbuild project, False otherwise.
+ </returns>
+ </member>
+ <member name="T:NAnt.VSNet.WhidbeySolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2005 (Whidbey) solution files.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.OrcasSolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2008 (Orcas) solution files.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.RosarioSolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2010 (Rosario) solution files.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSBuild.MSBuildProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Determines the version of the target msbuild file.
+ </summary>
+ <remarks>
+ <para>
+ This method identifies the msbuild version by reviewing the following tags in order:
+ </para>
+ <list type="number">
+ <item>
+ <description><ProductVersion></description>
+ </item>
+ <item>
+ <description><TargetFrameworkVersion></description>
+ </item>
+ <item>
+ <description>ToolsVersion attribute</description>
+ </item>
+ </list>
+ </remarks>
+ <param name="docElement">
+ A <see cref="T:System.Xml.XmlElement"/> representing the msbuild project file.
+ </param>
+ <returns>
+ A <see cref="T:NAnt.VSNet.ProductVersion"/> enum value indicating the msbuild project
+ file version.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ version string found in the tags listed above is not recognized.
+ </exception>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLoggerVerbosity">
+ <summary>
+ Enum indicating the level of verbosity for the NAnt logger.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Quiet">
+ <summary>Indicates no output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Minimal">
+ <summary>Indicates little output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Normal">
+ <summary>Indicates normal output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Detailed">
+ <summary>Indicates detailed output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Diagnostic">
+ <summary>Indicates all output</summary>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLogger">
+ <summary>
+ Logger classed used for MSBuild tasks in NAnt.
+ </summary>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLogger.DummyTask">
+ <summary>Sample task used for testing.</summary>
+ </member>
+ <member name="M:NAnt.MSBuild.NAntLogger.DummyTask.#ctor(NAnt.Core.Project,System.String)">
+ <summary>
+ Sample task constructor.
+ </summary>
+ <param name="p">Project to assign task to.</param>
+ <param name="name">Sample name property.</param>
+ </member>
+ <member name="M:NAnt.MSBuild.NAntLogger.DummyTask.ExecuteTask">
+ <summary>Test method.</summary>
+ </member>
+ <member name="P:NAnt.MSBuild.NAntLogger.DummyTask.Name">
+ <summary>Gets sample name for task.</summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/extensions/common/4.0/NAnt.MSBuild.xml b/external/guiunit/tools/nant/bin/extensions/common/4.0/NAnt.MSBuild.xml
new file mode 100755
index 0000000..70166d3
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/extensions/common/4.0/NAnt.MSBuild.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>NAnt.MSBuild</name>
+ </assembly>
+ <members>
+ <member name="T:NAnt.MSBuild.Functions.MSBuildFunctions">
+ <summary>
+ Functions to return information for MSBuild system.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSBuild.Functions.MSBuildFunctions.#ctor(NAnt.Core.Project,NAnt.Core.PropertyDictionary)">
+ <exclude/>
+ </member>
+ <member name="M:NAnt.MSBuild.Functions.MSBuildFunctions.IsMsbuildProject(System.String)">
+ <summary>
+ Test whether project is VS2005 project and could be built using <msbuild>
+ </summary>
+ <param name="project">The name or path of the project file (csproj, vbproj, ...).</param>
+ <returns>
+ True, if it is msbuild project, False otherwise.
+ </returns>
+ </member>
+ <member name="T:NAnt.VSNet.WhidbeySolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2005 (Whidbey) solution files.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.OrcasSolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2008 (Orcas) solution files.
+ </summary>
+ </member>
+ <member name="T:NAnt.VSNet.RosarioSolution">
+ <summary>
+ Analyses Microsoft Visual Studio .NET 2010 (Rosario) solution files.
+ </summary>
+ </member>
+ <member name="M:NAnt.MSBuild.MSBuildProject.DetermineProductVersion(System.Xml.XmlElement)">
+ <summary>
+ Determines the version of the target msbuild file.
+ </summary>
+ <remarks>
+ <para>
+ This method identifies the msbuild version by reviewing the following tags in order:
+ </para>
+ <list type="number">
+ <item>
+ <description><ProductVersion></description>
+ </item>
+ <item>
+ <description><TargetFrameworkVersion></description>
+ </item>
+ <item>
+ <description>ToolsVersion attribute</description>
+ </item>
+ </list>
+ </remarks>
+ <param name="docElement">
+ A <see cref="T:System.Xml.XmlElement"/> representing the msbuild project file.
+ </param>
+ <returns>
+ A <see cref="T:NAnt.VSNet.ProductVersion"/> enum value indicating the msbuild project
+ file version.
+ </returns>
+ <exception cref="T:NAnt.Core.BuildException">
+ version string found in the tags listed above is not recognized.
+ </exception>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLoggerVerbosity">
+ <summary>
+ Enum indicating the level of verbosity for the NAnt logger.
+ </summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Quiet">
+ <summary>Indicates no output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Minimal">
+ <summary>Indicates little output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Normal">
+ <summary>Indicates normal output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Detailed">
+ <summary>Indicates detailed output</summary>
+ </member>
+ <member name="F:NAnt.MSBuild.NAntLoggerVerbosity.Diagnostic">
+ <summary>Indicates all output</summary>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLogger">
+ <summary>
+ Logger classed used for MSBuild tasks in NAnt.
+ </summary>
+ </member>
+ <member name="T:NAnt.MSBuild.NAntLogger.DummyTask">
+ <summary>Sample task used for testing.</summary>
+ </member>
+ <member name="M:NAnt.MSBuild.NAntLogger.DummyTask.#ctor(NAnt.Core.Project,System.String)">
+ <summary>
+ Sample task constructor.
+ </summary>
+ <param name="p">Project to assign task to.</param>
+ <param name="name">Sample name property.</param>
+ </member>
+ <member name="M:NAnt.MSBuild.NAntLogger.DummyTask.ExecuteTask">
+ <summary>Test method.</summary>
+ </member>
+ <member name="P:NAnt.MSBuild.NAntLogger.DummyTask.Name">
+ <summary>Gets sample name for task.</summary>
+ </member>
+ </members>
+</doc>
diff --git a/external/guiunit/tools/nant/bin/lib/common/2.0/nunit-console.exe.config b/external/guiunit/tools/nant/bin/lib/common/2.0/nunit-console.exe.config
new file mode 100755
index 0000000..8a6a2a6
--- /dev/null
+++ b/external/guiunit/tools/nant/bin/lib/common/2.0/nunit-console.exe.config
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <!--
+ The .NET 2.0 build of the console runner only
+ runs under .NET 2.0 or higher. The setting
+ useLegacyV2RuntimeActivationPolicy only applies
+ under .NET 4.0 and permits use of mixed mode
+ assemblies, which would otherwise not load
+ correctly.
+ -->
+ <startup useLegacyV2RuntimeActivationPolicy="true">
+ <!-- Comment out the next line to force use of .NET 4.0 -->
+ <supportedRuntime version="v2.0.50727" />
+ <supportedRuntime version="v4.0.30319" />
+ </startup>
+
+ <runtime>
+ <!-- Ensure that test exceptions don't crash NUnit -->
+ <legacyUnhandledExceptionPolicy enabled="1" />
+
+ <!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
+ <loadFromRemoteSources enabled="true" />
+
+ <!-- Look for addins in the addins directory for now -->
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <probing privatePath="lib;addins"/>
+ </assemblyBinding>
+
+ </runtime>
+
+</configuration>
\ No newline at end of file
diff --git a/external/ikvm/CommonAssemblyInfo.cs.in b/external/ikvm/CommonAssemblyInfo.cs.in
index fbe4c93..38a6c77 100644
--- a/external/ikvm/CommonAssemblyInfo.cs.in
+++ b/external/ikvm/CommonAssemblyInfo.cs.in
@@ -26,7 +26,7 @@ using System.Reflection;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Jeroen Frijters")]
[assembly: AssemblyProduct("IKVM.NET")]
-[assembly: AssemblyCopyright("Copyright (C) 2002-2012 Jeroen Frijters")]
+[assembly: AssemblyCopyright("Copyright (C) 2002-2013 Jeroen Frijters")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("7.3. at BUILD@.0")]
diff --git a/external/ikvm/awt/awt.build b/external/ikvm/awt/awt.build
index e623134..1529089 100644
--- a/external/ikvm/awt/awt.build
+++ b/external/ikvm/awt/awt.build
@@ -13,7 +13,7 @@
</target>
<target name="first-pass" depends="AssemblyInfo.cs">
<property overwrite="false" name="signed" value="" />
- <csc target="library" output="../bin/IKVM.AWT.WinForms.dll" define="FIRST_PASS;${signed}" rebuild="true">
+ <csc target="library" output="../bin/IKVM.AWT.WinForms.dll" define="FIRST_PASS;${signed}" rebuild="true" nostdlib="true" noconfig="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="AssemblyInfo.cs" />
@@ -22,14 +22,16 @@
<include name="theming.cs" />
</sources>
<references>
- <include name="System.Windows.Forms.dll" asis="true" />
- <include name="System.Drawing.dll" asis="true" />
+ <include name="${ReferencePath}/mscorlib.dll" asis="true" />
+ <include name="${ReferencePath}/System.dll" asis="true" />
+ <include name="${ReferencePath}/System.Windows.Forms.dll" asis="true" />
+ <include name="${ReferencePath}/System.Drawing.dll" asis="true" />
</references>
</csc>
</target>
<target name="awt" depends="AssemblyInfo.cs">
<property overwrite="false" name="signed" value="" />
- <csc target="library" output="../bin/IKVM.AWT.WinForms.dll" define="TRACE;${signed}" rebuild="true">
+ <csc target="library" output="../bin/IKVM.AWT.WinForms.dll" define="TRACE;${signed}" rebuild="true" nostdlib="true" noconfig="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="AssemblyInfo.cs" />
@@ -53,8 +55,10 @@
<include name="../bin/IKVM.OpenJDK.Media.dll" asis="true" />
<include name="../bin/IKVM.OpenJDK.Misc.dll" asis="true" />
<include name="../bin/IKVM.Runtime.dll" asis="true" />
- <include name="System.Windows.Forms.dll" asis="true" />
- <include name="System.Drawing.dll" asis="true" />
+ <include name="${ReferencePath}/mscorlib.dll" asis="true" />
+ <include name="${ReferencePath}/System.dll" asis="true" />
+ <include name="${ReferencePath}/System.Windows.Forms.dll" asis="true" />
+ <include name="${ReferencePath}/System.Drawing.dll" asis="true" />
</references>
<nowarn>
<!-- disable warnings about obsolete members (because the peer API has lots of those) -->
diff --git a/external/ikvm/awt/graphics.cs b/external/ikvm/awt/graphics.cs
index d9c20b4..2d4f053 100644
--- a/external/ikvm/awt/graphics.cs
+++ b/external/ikvm/awt/graphics.cs
@@ -1,7 +1,7 @@
/*
Copyright (C) 2002, 2004, 2005, 2006, 2007 Jeroen Frijters
Copyright (C) 2006 Active Endpoints, Inc.
- Copyright (C) 2006 - 2011 Volker Berlin (i-net software)
+ Copyright (C) 2006 - 2013 Volker Berlin (i-net software)
Copyright (C) 2011 Karsten Heinrich (i-net software)
This software is provided 'as-is', without any express or implied
@@ -1350,8 +1350,8 @@ namespace ikvm.awt
throw new java.lang.IllegalArgumentException("null Composite");
}
this.javaComposite = comp;
- composite = CompositeHelper.Create(comp,g);
- java.awt.Paint oldPaint = javaPaint;
+ java.awt.Paint oldPaint = getPaint(); //getPaint() is never null
+ composite = CompositeHelper.Create(comp, g);
javaPaint = null;
setPaint(oldPaint);
}
@@ -1420,10 +1420,13 @@ namespace ikvm.awt
if (paint is java.awt.TexturePaint)
{
java.awt.TexturePaint texture = (java.awt.TexturePaint)paint;
- brush = new TextureBrush(
- J2C.ConvertImage(texture.getImage()),
- J2C.ConvertRect(texture.getAnchorRect()),
- composite.GetImageAttributes());
+ Bitmap txtr = J2C.ConvertImage(texture.getImage());
+ java.awt.geom.Rectangle2D anchor = texture.getAnchorRect();
+ TextureBrush txtBrush;
+ brush = txtBrush = new TextureBrush(txtr, new Rectangle(0, 0, txtr.Width, txtr.Height), composite.GetImageAttributes());
+ txtBrush.TranslateTransform((float)anchor.getX(), (float)anchor.getY());
+ txtBrush.ScaleTransform((float)anchor.getWidth() / txtr.Width, (float)anchor.getHeight() / txtr.Height);
+ txtBrush.WrapMode = WrapMode.Tile;
pen.Brush = brush;
return;
}
@@ -1486,7 +1489,104 @@ namespace ikvm.awt
return;
}
- throw new NotImplementedException("setPaint("+paint.GetType().FullName+")");
+ if (paint is java.awt.RadialGradientPaint )
+ {
+ java.awt.RadialGradientPaint gradient = (java.awt.RadialGradientPaint)paint;
+ GraphicsPath path = new GraphicsPath();
+ SizeF size = GetSize();
+
+ PointF center = J2C.ConvertPoint(gradient.getCenterPoint());
+
+ float radius = gradient.getRadius();
+ int factor = (int)Math.Ceiling(Math.Max(size.Width, size.Height) / radius);
+
+ float diameter = radius * factor;
+ path.AddEllipse(center.X - diameter, center.Y - diameter, diameter * 2, diameter * 2);
+
+ java.awt.Color[] javaColors = gradient.getColors();
+ float[] fractions = gradient.getFractions();
+ int length = javaColors.Length;
+ ColorBlend colorBlend = new ColorBlend(length * factor);
+ Color[] colors = colorBlend.Colors;
+ float[] positions = colorBlend.Positions;
+
+ for (int c = 0, j = length - 1; j >= 0; )
+ {
+ positions[c] = (1 - fractions[j]) / factor;
+ colors[c++] = composite.GetColor(javaColors[j--]);
+ }
+
+ java.awt.MultipleGradientPaint.CycleMethod.__Enum cycle = (java.awt.MultipleGradientPaint.CycleMethod.__Enum)gradient.getCycleMethod().ordinal();
+ for (int f = 1; f < factor; f++)
+ {
+ int off = f * length;
+ for (int c = 0, j = length - 1; j >= 0; j--, c++)
+ {
+ switch (cycle)
+ {
+ case java.awt.MultipleGradientPaint.CycleMethod.__Enum.REFLECT:
+ if (f % 2 == 0)
+ {
+ positions[off + c] = (f + 1 - fractions[j]) / factor;
+ colors[off + c] = colors[c];
+ }
+ else
+ {
+ positions[off + c] = (f + fractions[c]) / factor;
+ colors[off + c] = colors[j];
+ }
+ break;
+ case java.awt.MultipleGradientPaint.CycleMethod.__Enum.NO_CYCLE:
+ positions[off + c] = (f + 1 - fractions[j]) / factor;
+ break;
+ default: //CycleMethod.REPEAT
+ positions[off + c] = (f + 1 - fractions[j]) / factor;
+ colors[off + c] = colors[c];
+ break;
+ }
+ }
+ }
+ if (cycle == java.awt.MultipleGradientPaint.CycleMethod.__Enum.NO_CYCLE && factor > 1)
+ {
+ Array.Copy(colors, 0, colors, colors.Length - length, length);
+ Color color = colors[length - 1];
+ for (int i = colors.Length - length - 1; i >= 0; i--)
+ {
+ colors[i] = color;
+ }
+ }
+
+ PathGradientBrush pathBrush = new PathGradientBrush(path);
+ pathBrush.CenterPoint = center;
+ pathBrush.InterpolationColors = colorBlend;
+
+ brush = pathBrush;
+ pen.Brush = brush;
+ return;
+ }
+
+ //generic paint to brush conversion for custom paints
+ //the tranform of the graphics should not change between the creation and it usage
+ using (Matrix transform = g.Transform)
+ {
+ SizeF size = GetSize();
+ int width = (int)size.Width;
+ int height = (int)size.Height;
+ java.awt.Rectangle bounds = new java.awt.Rectangle(0, 0, width, height);
+
+ java.awt.PaintContext context = paint.createContext(ColorModel.getRGBdefault(), bounds, bounds, C2J.ConvertMatrix(transform), getRenderingHints());
+ WritableRaster raster = (WritableRaster)context.getRaster(0, 0, width, height);
+ BufferedImage txtrImage = new BufferedImage(context.getColorModel(), raster, true, null);
+ Bitmap txtr = J2C.ConvertImage(txtrImage);
+
+ TextureBrush txtBrush;
+ brush = txtBrush = new TextureBrush(txtr, new Rectangle(0, 0, width, height), composite.GetImageAttributes());
+ transform.Invert();
+ txtBrush.Transform = transform;
+ txtBrush.WrapMode = WrapMode.Tile;
+ pen.Brush = brush;
+ return;
+ }
}
public override void setStroke(java.awt.Stroke stroke)
diff --git a/external/ikvm/awt/images.cs b/external/ikvm/awt/images.cs
index 5104585..ab0fee3 100644
--- a/external/ikvm/awt/images.cs
+++ b/external/ikvm/awt/images.cs
@@ -1,7 +1,7 @@
/*
Copyright (C) 2002, 2004, 2005, 2006 Jeroen Frijters
Copyright (C) 2006 Active Endpoints, Inc.
- Copyright (C) 2006 - 2010 Volker Berlin (i-net software)
+ Copyright (C) 2006 - 2013 Volker Berlin (i-net software)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -158,6 +158,11 @@ namespace ikvm.awt
class NoImage : java.awt.Image
{
+ private sun.awt.image.InputStreamImageSource source;
+
+ internal NoImage(sun.awt.image.InputStreamImageSource source) {
+ this.source = source;
+ }
public override int getWidth(java.awt.image.ImageObserver observer)
{
@@ -179,7 +184,7 @@ namespace ikvm.awt
public override ImageProducer getSource()
{
- return null;
+ return source;
}
public override java.awt.Graphics getGraphics()
diff --git a/external/ikvm/awt/toolkit-0.95.cs b/external/ikvm/awt/toolkit-0.95.cs
index 5bf5849..4341b9c 100644
--- a/external/ikvm/awt/toolkit-0.95.cs
+++ b/external/ikvm/awt/toolkit-0.95.cs
@@ -26,7 +26,7 @@
/*
Copyright (C) 2002, 2004-2009 Jeroen Frijters
Copyright (C) 2006 Active Endpoints, Inc.
-Copyright (C) 2006-2011 Volker Berlin (i-net software)
+Copyright (C) 2006-2013 Volker Berlin (i-net software)
Copyright (C) 2010-2011 Karsten Heinrich (i-net software)
This software is provided 'as-is', without any express or implied
@@ -597,7 +597,7 @@ namespace ikvm.awt
}
catch (Exception)
{
- return new NoImage();
+ return new NoImage(new sun.awt.image.FileImageSource(filename));
}
}
@@ -618,7 +618,7 @@ namespace ikvm.awt
}
catch
{
- return new NoImage();
+ return new NoImage(new sun.awt.image.URLImageSource(url));
}
}
@@ -640,7 +640,7 @@ namespace ikvm.awt
}
catch (Exception)
{
- return new NoImage();//TODO should throw the exception unstead of NoImage()
+ return new NoImage(new sun.awt.image.ByteArrayImageSource(imagedata, imageoffset, imagelength));
}
}
@@ -5168,6 +5168,7 @@ namespace ikvm.awt
}
}
+ [System.Security.SecuritySafeCritical]
public bool isWindowUnderMouse(java.awt.Window window)
{
if (NetToolkit.isWin32())
diff --git a/external/ikvm/classpath/gnu/java/net/protocol/ikvmres/Handler.java b/external/ikvm/classpath/gnu/java/net/protocol/ikvmres/Handler.java
index b8d0ae2..e122c48 100644
--- a/external/ikvm/classpath/gnu/java/net/protocol/ikvmres/Handler.java
+++ b/external/ikvm/classpath/gnu/java/net/protocol/ikvmres/Handler.java
@@ -119,7 +119,7 @@ public class Handler extends URLStreamHandler
try
{
Class c = Class.forName(resource.substring(1, resource.length() - 6).replace('/', '.'), false, loader);
- return new ByteArrayInputStream(ikvm.internal.stubgen.StubGenerator.generateStub(c));
+ return new ByteArrayInputStream(GenerateStub(c));
}
catch(ClassNotFoundException _)
{
@@ -152,7 +152,7 @@ public class Handler extends URLStreamHandler
Class c = LoadClassFromAssembly(asm, resource.substring(1, resource.length() - 6).replace('/', '.'));
if(c != null)
{
- return new ByteArrayInputStream(ikvm.internal.stubgen.StubGenerator.generateStub(c));
+ return new ByteArrayInputStream(GenerateStub(c));
}
}
throw (FileNotFoundException)new FileNotFoundException().initCause(x);
@@ -163,6 +163,7 @@ public class Handler extends URLStreamHandler
}
}
+ private static native byte[] GenerateStub(Class c);
private static native cli.System.IO.Stream ReadResourceFromAssemblyImpl(Assembly asm, String resource);
private static native Class LoadClassFromAssembly(Assembly asm, String className);
private static native Assembly LoadAssembly(String name)
diff --git a/external/ikvm/classpath/ikvm/internal/AssemblyClassLoader.java b/external/ikvm/classpath/ikvm/internal/AssemblyClassLoader.java
index 3d50c7a..00d79de 100644
--- a/external/ikvm/classpath/ikvm/internal/AssemblyClassLoader.java
+++ b/external/ikvm/classpath/ikvm/internal/AssemblyClassLoader.java
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006, 2007, 2010 Jeroen Frijters
+ Copyright (C) 2006-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,61 +37,52 @@ import java.util.jar.Manifest;
public final class AssemblyClassLoader extends ClassLoader
{
- // NOTE assembly is null for "generics" class loader instances
- private final Assembly assembly;
private boolean packagesDefined;
+ // This constructor is used to manually construct an AssemblyClassLoader that is used
+ // as a delegation parent for custom assembly class loaders.
+ //
+ // In that case the class loader object graph looks like this:
+ //
+ // +---------------------------------+
+ // |IKVM.Internal.AssemblyClassLoader|
+ // +---------------------------------+
+ // || /\ /\
+ // \/ || ||
+ // +-------------------+ ||
+ // |Custom Class Loader| +--------------------------------+
+ // +-------------------+ |ikvm.runtime.AssemblyClassLoader|
+ // +--------------------------------+
+ //
public AssemblyClassLoader(Assembly assembly)
{
- this(assembly, System.getSecurityManager());
+ super(null);
+ setWrapper(assembly);
}
- // this constructor is used by the runtime to avoid the security check (by passing in null as the security manager)
- AssemblyClassLoader(Assembly assembly, SecurityManager security)
- {
- super(null, security);
- this.assembly = assembly;
- }
+ private native void setWrapper(Assembly assembly);
- protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
+ // this constructor is used by the runtime and calls a privileged
+ // ClassLoader constructor to avoid the security check
+ AssemblyClassLoader()
{
- return LoadClass(this, assembly, name);
+ super(null, null);
}
- private static native Class LoadClass(ClassLoader classLoader, Assembly assembly, String name) throws ClassNotFoundException;
+ @Override
+ protected native Class loadClass(String name, boolean resolve) throws ClassNotFoundException;
- public URL getResource(String name)
- {
- return getResource(this, assembly, name);
- }
+ @Override
+ public native URL getResource(String name);
- public Enumeration getResources(String name) throws IOException
- {
- return getResources(this, assembly, name);
- }
+ @Override
+ public native Enumeration<URL> getResources(String name) throws IOException;
- protected URL findResource(String name)
- {
- return getResource(this, assembly, name);
- }
-
- protected Enumeration findResources(String name) throws IOException
- {
- return getResources(this, assembly, name);
- }
+ @Override
+ protected native URL findResource(String name);
- @Internal
- public static native URL getResource(ClassLoader classLoader, Assembly assembly, String name);
-
- @Internal
- public static native Enumeration getResources(ClassLoader classLoader, Assembly assembly, String name) throws IOException;
-
- private static native String GetGenericClassLoaderName(Object classLoader);
- // also used by java.lang.LangHelper
- @Internal
- public static native String[] GetPackages(Assembly assembly);
-
- private static native URL GetManifest(Assembly assembly);
+ @Override
+ protected native Enumeration<URL> findResources(String name) throws IOException;
private synchronized void lazyDefinePackagesCheck()
{
@@ -102,119 +93,65 @@ public final class AssemblyClassLoader extends ClassLoader
}
}
- private static String getAttributeValue(Attributes.Name name, Attributes first, Attributes second)
- {
- String result = null;
- if(first != null)
- {
- result = first.getValue(name);
- }
- if(second != null && result == null)
- {
- result = second.getValue(name);
- }
- return result;
- }
-
- private Manifest getManifest()
- {
- try
- {
- if(assembly != null)
- {
- URL url = GetManifest(assembly);
- if (url != null)
- {
- return new Manifest(url.openStream());
- }
- }
- }
- catch (MalformedURLException _)
- {
- }
- catch (IOException _)
- {
- }
- return null;
- }
-
- private void lazyDefinePackages()
- {
- if(assembly == null)
- {
- // generic class loader (doesn't support packages)
- return;
- }
- URL sealBase = getCodeBase();
- Manifest manifest = getManifest();
- Attributes attr = null;
- if(manifest != null)
- {
- attr = manifest.getMainAttributes();
- }
- String[] packages = GetPackages(assembly);
- for(int i = 0; i < packages.length; i++)
- {
- String name = packages[i];
- if(super.getPackage(name) == null)
- {
- Attributes entryAttr = null;
- if(manifest != null)
- {
- entryAttr = manifest.getAttributes(name.replace('.', '/') + '/');
- }
- definePackage(name,
- getAttributeValue(Attributes.Name.SPECIFICATION_TITLE, entryAttr, attr),
- getAttributeValue(Attributes.Name.SPECIFICATION_VERSION, entryAttr, attr),
- getAttributeValue(Attributes.Name.SPECIFICATION_VENDOR, entryAttr, attr),
- getAttributeValue(Attributes.Name.IMPLEMENTATION_TITLE, entryAttr, attr),
- getAttributeValue(Attributes.Name.IMPLEMENTATION_VERSION, entryAttr, attr),
- getAttributeValue(Attributes.Name.IMPLEMENTATION_VENDOR, entryAttr, attr),
- "true".equalsIgnoreCase(getAttributeValue(Attributes.Name.SEALED, entryAttr, attr)) ? sealBase : null);
- }
- }
- }
+ private native void lazyDefinePackages();
+ @Override
protected Package getPackage(String name)
{
lazyDefinePackagesCheck();
return super.getPackage(name);
}
+ @Override
protected Package[] getPackages()
{
lazyDefinePackagesCheck();
return super.getPackages();
}
- public String toString()
+ @Override
+ public native String toString();
+
+ // return the ClassLoader for the assembly. Note that this doesn't have to be an AssemblyClassLoader.
+ public static native ClassLoader getAssemblyClassLoader(Assembly asm);
+}
+
+final class GenericClassLoader extends ClassLoader
+{
+ // this constructor avoids the security check in ClassLoader by passing in null as the security manager
+ // to the IKVM specific constructor in ClassLoader
+ GenericClassLoader()
{
- if(assembly != null)
- {
- return assembly.get_FullName();
- }
- return GetGenericClassLoaderName(this);
+ super(null, null);
}
- private URL getCodeBase()
+ @Override
+ public native String toString();
+
+ @Override
+ public URL getResource(String name)
{
- try
- {
- if(assembly != null)
- {
- if(false) throw new cli.System.NotSupportedException();
- return new URL(assembly.get_CodeBase());
- }
- }
- catch(cli.System.NotSupportedException _)
- {
- }
- catch(MalformedURLException _)
+ Enumeration<URL> e = getResources(name);
+ return e.hasMoreElements()
+ ? e.nextElement()
+ : null;
+ }
+
+ @Override
+ public native Enumeration<URL> getResources(String name);
+
+ @Override
+ protected native URL findResource(String name);
+
+ @Override
+ protected Enumeration<URL> findResources(String name)
+ {
+ Vector<URL> v = new Vector<URL>();
+ URL url = findResource(name);
+ if (url != null)
{
+ v.add(url);
}
- return null;
+ return v.elements();
}
-
- // return the ClassLoader for the assembly. Note that this doesn't have to be an AssemblyClassLoader.
- public static native ClassLoader getAssemblyClassLoader(Assembly asm);
}
diff --git a/external/ikvm/classpath/ikvm/internal/stubgen/StubGenerator.java b/external/ikvm/classpath/ikvm/internal/stubgen/StubGenerator.java
deleted file mode 100644
index bfb1eeb..0000000
--- a/external/ikvm/classpath/ikvm/internal/stubgen/StubGenerator.java
+++ /dev/null
@@ -1,1603 +0,0 @@
-/*
- Copyright (C) 2006, 2007 Jeroen Frijters
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jeroen Frijters
- jeroen at frijters.net
-
-*/
-
-package ikvm.internal.stubgen;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.ObjectStreamClass;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Hashtable;
-
-public final class StubGenerator implements PrivilegedAction<byte[]>
-{
- private Class c;
-
- private StubGenerator(Class c)
- {
- this.c = c;
- }
-
- @ikvm.lang.Internal
- public static byte[] generateStub(Class c)
- {
- return AccessController.doPrivileged(new StubGenerator(c));
- }
-
- public byte[] run()
- {
- boolean includeNonPublicInterfaces = !"true".equalsIgnoreCase(System.getProperty("ikvm.stubgen.skipNonPublicInterfaces"));
- Class outer = c.getDeclaringClass();
- String name = c.getName().replace('.', '/');
- String superClass = null;
- if(c.getSuperclass() != null)
- {
- superClass = c.getSuperclass().getName().replace('.', '/');
- }
- if(c.isInterface())
- {
- superClass = "java/lang/Object";
- }
- ClassFileWriter f = new ClassFileWriter(getRealModifiers(c), name, superClass, 0, 49);
- String genericSignature = BuildGenericSignature(c);
- if(genericSignature != null)
- {
- f.AddStringAttribute("Signature", genericSignature);
- }
- f.AddStringAttribute("IKVM.NET.Assembly", getAssemblyName(c));
- if(isClassDeprecated(c))
- {
- f.AddAttribute(new DeprecatedAttribute(f));
- }
- InnerClassesAttribute innerClassesAttribute = null;
- if(outer != null)
- {
- innerClassesAttribute = new InnerClassesAttribute(f);
- String innername = name;
- // TODO instead of mangling the name, maybe we chould use the new Class APIs (e.g. getSimpleName())
- int idx = name.lastIndexOf('$');
- if(idx >= 0)
- {
- innername = innername.substring(idx + 1);
- }
- innerClassesAttribute.Add(name, outer.getName().replace('.', '/'), innername, getModifiers(c));
- }
- Class[] interfaces = c.getInterfaces();
- for(int i = 0; i < interfaces.length; i++)
- {
- if(includeNonPublicInterfaces || Modifier.isPublic(interfaces[i].getModifiers()))
- {
- f.AddInterface(interfaces[i].getName().replace('.', '/'));
- }
- }
- Class[] innerClasses = c.getDeclaredClasses();
- for(int i = 0; i < innerClasses.length; i++)
- {
- // TODO add private export support (for bcel)
- int mods = getModifiers(innerClasses[i]);
- if((mods & (Modifiers.Public | Modifiers.Protected)) != 0)
- {
- if(innerClassesAttribute == null)
- {
- innerClassesAttribute = new InnerClassesAttribute(f);
- }
- String namePart = innerClasses[i].getName();
- // TODO name mangling
- namePart = namePart.substring(namePart.lastIndexOf('$') + 1);
- innerClassesAttribute.Add(innerClasses[i].getName().replace('.', '/'), name, namePart, mods);
- }
- }
- java.lang.reflect.Constructor[] constructors = c.getDeclaredConstructors();
- for(int i = 0; i < constructors.length; i++)
- {
- int mods = constructors[i].getModifiers();
- if((mods & (Modifiers.Public | Modifiers.Protected)) != 0)
- {
- if(constructors[i].isSynthetic())
- {
- mods |= Modifiers.Synthetic;
- }
- if(constructors[i].isVarArgs())
- {
- mods |= Modifiers.VarArgs;
- }
- Class[] args = constructors[i].getParameterTypes();
- FieldOrMethod m = f.AddMethod(mods, "<init>", MakeSig(args, java.lang.Void.TYPE));
- CodeAttribute code = new CodeAttribute(f);
- code.SetMaxLocals(args.length * 2 + 1);
- code.SetMaxStack(3);
- short index1 = f.AddClass("java/lang/UnsatisfiedLinkError");
- short index2 = f.AddString("ikvmstub generated stubs can only be used on IKVM.NET");
- short index3 = f.AddMethodRef("java/lang/UnsatisfiedLinkError", "<init>", "(Ljava/lang/String;)V");
- code.SetByteCode(new byte[]
- {
- (byte)187, (byte)(index1 >> 8), (byte)index1, // new java/lang/UnsatisfiedLinkError
- (byte)89, // dup
- (byte)19, (byte)(index2 >> 8), (byte)index2, // ldc_w "..."
- (byte)183, (byte)(index3 >> 8), (byte)index3, // invokespecial java/lang/UnsatisfiedLinkError/init()V
- (byte)191 // athrow
- });
- m.AddAttribute(code);
- AddExceptions(f, m, constructors[i].getExceptionTypes());
- if(isMethodDeprecated(constructors[i]))
- {
- m.AddAttribute(new DeprecatedAttribute(f));
- }
- String signature = BuildGenericSignature(constructors[i].getTypeParameters(),
- constructors[i].getGenericParameterTypes(), Void.TYPE, constructors[i].getGenericExceptionTypes());
- if (signature != null)
- {
- m.AddAttribute(f.MakeStringAttribute("Signature", signature));
- }
- Annotation[] annotations = constructors[i].getDeclaredAnnotations();
- if(annotations.length > 0)
- {
- m.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, annotations));
- }
- Annotation[][] parameterAnnotations = constructors[i].getParameterAnnotations();
- if(hasParameterAnnotations(parameterAnnotations))
- {
- m.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, parameterAnnotations));
- }
- }
- }
- java.lang.reflect.Method[] methods = c.getDeclaredMethods();
- for(int i = 0; i < methods.length; i++)
- {
- int mods = methods[i].getModifiers();
- if((mods & (Modifiers.Public | Modifiers.Protected)) != 0)
- {
- if((mods & Modifiers.Abstract) == 0)
- {
- mods |= Modifiers.Native;
- }
- if(methods[i].isBridge())
- {
- mods |= Modifiers.Bridge;
- }
- if(methods[i].isSynthetic())
- {
- mods |= Modifiers.Synthetic;
- }
- if(methods[i].isVarArgs())
- {
- mods |= Modifiers.VarArgs;
- }
- Class[] args = methods[i].getParameterTypes();
- Class retType = methods[i].getReturnType();
- FieldOrMethod m = f.AddMethod(mods, methods[i].getName(), MakeSig(args, retType));
- AddExceptions(f, m, methods[i].getExceptionTypes());
- if(isMethodDeprecated(methods[i]))
- {
- m.AddAttribute(new DeprecatedAttribute(f));
- }
- String signature = BuildGenericSignature(methods[i].getTypeParameters(),
- methods[i].getGenericParameterTypes(), methods[i].getGenericReturnType(),
- methods[i].getGenericExceptionTypes());
- if (signature != null)
- {
- m.AddAttribute(f.MakeStringAttribute("Signature", signature));
- }
- Object defaultValue = methods[i].getDefaultValue();
- if(defaultValue != null)
- {
- m.AddAttribute(new AnnotationDefaultClassFileAttribute(f, defaultValue));
- }
- Annotation[] annotations = methods[i].getDeclaredAnnotations();
- if(annotations.length > 0)
- {
- m.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, annotations));
- }
- Annotation[][] parameterAnnotations = methods[i].getParameterAnnotations();
- if(hasParameterAnnotations(parameterAnnotations))
- {
- m.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, parameterAnnotations));
- }
- }
- }
- java.lang.reflect.Field[] fields = c.getDeclaredFields();
- for(int i = 0; i < fields.length; i++)
- {
- int mods = fields[i].getModifiers();
- if((mods & (Modifiers.Public | Modifiers.Protected)) != 0)
- {
- // NOTE we can't use Field.get() because that will run the static initializer and
- // also won't allow us to see the difference between constants and blank final fields,
- // so we use a "native" method.
- Object constantValue = getFieldConstantValue(fields[i]);
- Class fieldType = fields[i].getType();
- if(fields[i].isEnumConstant())
- {
- mods |= Modifiers.Enum;
- }
- if(fields[i].isSynthetic())
- {
- mods |= Modifiers.Synthetic;
- }
- FieldOrMethod fld = f.AddField(mods, fields[i].getName(), ClassToSig(fieldType), constantValue);
- if(isFieldDeprecated(fields[i]))
- {
- fld.AddAttribute(new DeprecatedAttribute(f));
- }
- if(fields[i].getGenericType() != fieldType)
- {
- fld.AddAttribute(f.MakeStringAttribute("Signature", ToSigForm(fields[i].getGenericType())));
- }
- Annotation[] annotations = fields[i].getDeclaredAnnotations();
- if(annotations.length > 0)
- {
- fld.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, annotations));
- }
- }
- }
- if(innerClassesAttribute != null)
- {
- f.AddAttribute(innerClassesAttribute);
- }
- Annotation[] annotations = c.getDeclaredAnnotations();
- if(annotations.length > 0)
- {
- f.AddAttribute(new RuntimeVisibleAnnotationsAttribute(f, annotations));
- }
- try
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- f.Write(baos);
- return baos.toByteArray();
- }
- catch (IOException x)
- {
- throw new Error(x);
- }
- }
-
- private static boolean hasParameterAnnotations(Annotation[][] parameterAnnotations)
- {
- for(int i = 0; i < parameterAnnotations.length; i++)
- {
- if(parameterAnnotations[i].length > 0)
- {
- return true;
- }
- }
- return false;
- }
-
- private static int getModifiers(Class c)
- {
- int mods = c.getModifiers();
- if(c.isAnnotation())
- {
- mods |= Modifiers.Annotation;
- }
- if(c.isEnum())
- {
- mods |= Modifiers.Enum;
- }
- if(c.isSynthetic())
- {
- mods |= Modifiers.Synthetic;
- }
- return mods;
- }
-
- private static native int getRealModifiers(Class c);
- private static native String getAssemblyName(Class c);
- private static native boolean isClassDeprecated(Class c);
- private static native boolean isFieldDeprecated(Object field);
- private static native boolean isMethodDeprecated(Object method);
- private static native Object getFieldConstantValue(Object field);
-
- private static void AddExceptions(ClassFileWriter f, FieldOrMethod m, Class[] exceptions)
- {
- if (exceptions.length > 0)
- {
- ExceptionsAttribute attrib = new ExceptionsAttribute(f);
- for (int i = 0; i < exceptions.length; i++)
- {
- attrib.Add(exceptions[i].getName().replace('.', '/'));
- }
- m.AddAttribute(attrib);
- }
- }
-
- private static String MakeSig(Class[] args, Class ret)
- {
- StringBuilder sb = new StringBuilder();
- sb.append('(');
- for(int i = 0; i < args.length; i++)
- {
- sb.append(ClassToSig(args[i]));
- }
- sb.append(')');
- sb.append(ClassToSig(ret));
- return sb.toString();
- }
-
- private static String ClassToSig(Class c)
- {
- if(c.isPrimitive())
- {
- if(c == Void.TYPE)
- {
- return "V";
- }
- else if(c == Byte.TYPE)
- {
- return "B";
- }
- else if(c == Boolean.TYPE)
- {
- return "Z";
- }
- else if(c == Short.TYPE)
- {
- return "S";
- }
- else if(c == Character.TYPE)
- {
- return "C";
- }
- else if(c == Integer.TYPE)
- {
- return "I";
- }
- else if(c == Long.TYPE)
- {
- return "J";
- }
- else if(c == Float.TYPE)
- {
- return "F";
- }
- else if(c == Double.TYPE)
- {
- return "D";
- }
- else
- {
- throw new Error();
- }
- }
- else if(c.isArray())
- {
- return "[" + ClassToSig(c.getComponentType());
- }
- else
- {
- return "L" + c.getName().replace('.', '/') + ";";
- }
- }
-
- private static String BuildGenericSignature(Class c)
- {
- boolean isgeneric = false;
- StringBuilder sb = new StringBuilder();
- java.lang.reflect.TypeVariable[] vars = c.getTypeParameters();
- if(vars.length > 0)
- {
- isgeneric = true;
- sb.append('<');
- for (int i = 0; i < vars.length; i++)
- {
- java.lang.reflect.TypeVariable t = vars[i];
- sb.append(t.getName());
- boolean first = true;
- java.lang.reflect.Type[] bounds = t.getBounds();
- for (int j = 0; j < bounds.length; j++)
- {
- java.lang.reflect.Type bound = bounds[j];
- if(first)
- {
- first = false;
- if(bound instanceof Class)
- {
- // HACK I don't really understand what the proper criterion is to decide this
- if(((Class)bound).isInterface())
- {
- sb.append(':');
- }
- }
- }
- sb.append(':').append(ToSigForm(bound));
- }
- }
- sb.append('>');
- }
- java.lang.reflect.Type superclass = c.getGenericSuperclass();
- if(superclass == null)
- {
- sb.append("Ljava/lang/Object;");
- }
- else
- {
- isgeneric |= !(superclass instanceof Class);
- sb.append(ToSigForm(superclass));
- }
- java.lang.reflect.Type[] interfaces = c.getGenericInterfaces();
- for (int i = 0; i < interfaces.length; i++)
- {
- java.lang.reflect.Type t = interfaces[i];
- isgeneric |= !(t instanceof Class);
- sb.append(ToSigForm(t));
- }
- if(isgeneric)
- {
- return sb.toString();
- }
- return null;
- }
-
- private static String BuildGenericSignature(java.lang.reflect.TypeVariable[] typeParameters,
- java.lang.reflect.Type[] parameterTypes, java.lang.reflect.Type returnType,
- java.lang.reflect.Type[] exceptionTypes)
- {
- boolean isgeneric = false;
- StringBuilder sb = new StringBuilder();
- if(typeParameters.length > 0)
- {
- isgeneric = true;
- sb.append('<');
- for (int i = 0; i < typeParameters.length; i++)
- {
- java.lang.reflect.TypeVariable t = typeParameters[i];
- sb.append(t.getName());
- java.lang.reflect.Type[] bounds = t.getBounds();
- for (int j = 0; j < bounds.length; j++)
- {
- sb.append(':').append(ToSigForm(bounds[j]));
- }
- }
- sb.append('>');
- }
- sb.append('(');
- for (int i = 0; i < parameterTypes.length; i++)
- {
- java.lang.reflect.Type t = parameterTypes[i];
- isgeneric |= !(t instanceof Class);
- sb.append(ToSigForm(t));
- }
- sb.append(')');
- sb.append(ToSigForm(returnType));
- isgeneric |= !(returnType instanceof Class);
- for (int i = 0; i < exceptionTypes.length; i++)
- {
- java.lang.reflect.Type t = exceptionTypes[i];
- isgeneric |= !(t instanceof Class);
- sb.append('^').append(ToSigForm(t));
- }
- if(isgeneric)
- {
- return sb.toString();
- }
- return null;
- }
-
- private static String ToSigForm(java.lang.reflect.Type t)
- {
- if(t instanceof java.lang.reflect.ParameterizedType)
- {
- java.lang.reflect.ParameterizedType p = (java.lang.reflect.ParameterizedType)t;
- StringBuilder sb = new StringBuilder();
- sb.append('L').append(((Class)p.getRawType()).getName().replace('.', '/'));
- sb.append('<');
- java.lang.reflect.Type[] args = p.getActualTypeArguments();
- for (int i = 0; i < args.length; i++)
- {
- sb.append(ToSigForm(args[i]));
- }
- sb.append(">;");
- return sb.toString();
- }
- else if(t instanceof java.lang.reflect.TypeVariable)
- {
- return "T" + ((java.lang.reflect.TypeVariable)t).getName() + ";";
- }
- else if(t instanceof java.lang.reflect.WildcardType)
- {
- java.lang.reflect.WildcardType w = (java.lang.reflect.WildcardType)t;
- java.lang.reflect.Type[] lower = w.getLowerBounds();
- java.lang.reflect.Type[] upper = w.getUpperBounds();
- if (lower.length == 0 && upper.length == 0)
- {
- return "*";
- }
- if (lower.length == 1)
- {
- return "-" + ToSigForm(lower[0]);
- }
- if (upper.length == 1)
- {
- return "+" + ToSigForm(upper[0]);
- }
- // TODO
- throw new Error("Not Implemented");
- }
- else if(t instanceof java.lang.reflect.GenericArrayType)
- {
- java.lang.reflect.GenericArrayType a = (java.lang.reflect.GenericArrayType)t;
- return "[" + ToSigForm(a.getGenericComponentType());
- }
- else if(t instanceof Class)
- {
- return ClassToSig((Class)t);
- }
- else
- {
- throw new Error("Not Implemented: " + t);
- }
- }
-}
-
-class Modifiers
-{
- static final short Public = 0x0001;
- static final short Private = 0x0002;
- static final short Protected = 0x0004;
- static final short Static = 0x0008;
- static final short Final = 0x0010;
- static final short Super = 0x0020;
- static final short Synchronized = 0x0020;
- static final short Volatile = 0x0040;
- static final short Bridge = 0x0040;
- static final short Transient = 0x0080;
- static final short VarArgs = 0x0080;
- static final short Native = 0x0100;
- static final short Interface = 0x0200;
- static final short Abstract = 0x0400;
- static final short Strictfp = 0x0800;
- static final short Synthetic = 0x1000;
- static final short Annotation = 0x2000;
- static final short Enum = 0x4000;
-}
-
-class Constant
-{
- static final int Utf8 = 1;
- static final int Integer = 3;
- static final int Float = 4;
- static final int Long = 5;
- static final int Double = 6;
- static final int Class = 7;
- static final int String = 8;
- static final int Fieldref = 9;
- static final int Methodref = 10;
- static final int InterfaceMethodref = 11;
- static final int NameAndType = 12;
-}
-
-abstract class ConstantPoolItem
-{
- abstract void Write(DataOutputStream dos) throws IOException;
-}
-
-final class ConstantPoolItemClass extends ConstantPoolItem
-{
- private short name_index;
-
- public ConstantPoolItemClass(short name_index)
- {
- this.name_index = name_index;
- }
-
- public int hashCode()
- {
- return name_index;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemClass)
- {
- return ((ConstantPoolItemClass)o).name_index == name_index;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Class);
- dos.writeShort(name_index);
- }
-}
-
-final class ConstantPoolItemMethodref extends ConstantPoolItem
-{
- private short class_index;
- private short name_and_type_index;
-
- public ConstantPoolItemMethodref(short class_index, short name_and_type_index)
- {
- this.class_index = class_index;
- this.name_and_type_index = name_and_type_index;
- }
-
- public int hashCode()
- {
- return (class_index & 0xFFFF) | (name_and_type_index << 16);
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemMethodref)
- {
- ConstantPoolItemMethodref m = (ConstantPoolItemMethodref)o;
- return m.class_index == class_index && m.name_and_type_index == name_and_type_index;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Methodref);
- dos.writeShort(class_index);
- dos.writeShort(name_and_type_index);
- }
-}
-
-final class ConstantPoolItemNameAndType extends ConstantPoolItem
-{
- private short name_index;
- private short descriptor_index;
-
- public ConstantPoolItemNameAndType(short name_index, short descriptor_index)
- {
- this.name_index = name_index;
- this.descriptor_index = descriptor_index;
- }
-
- public int hashCode()
- {
- return (name_index & 0xFFFF) | (descriptor_index << 16);
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemNameAndType)
- {
- ConstantPoolItemNameAndType n = (ConstantPoolItemNameAndType)o;
- return n.name_index == name_index && n.descriptor_index == descriptor_index;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.NameAndType);
- dos.writeShort(name_index);
- dos.writeShort(descriptor_index);
- }
-}
-
-final class ConstantPoolItemUtf8 extends ConstantPoolItem
-{
- private String str;
-
- public ConstantPoolItemUtf8(String str)
- {
- this.str = str;
- }
-
- public int hashCode()
- {
- return str.hashCode();
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemUtf8)
- {
- return ((ConstantPoolItemUtf8)o).str.equals(str);
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Utf8);
- dos.writeUTF(str);
- }
-}
-
-final class ConstantPoolItemInt extends ConstantPoolItem
-{
- private int v;
-
- public ConstantPoolItemInt(int v)
- {
- this.v = v;
- }
-
- public int hashCode()
- {
- return v;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemInt)
- {
- return ((ConstantPoolItemInt)o).v == v;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Integer);
- dos.writeInt(v);
- }
-}
-
-final class ConstantPoolItemLong extends ConstantPoolItem
-{
- private long v;
-
- public ConstantPoolItemLong(long v)
- {
- this.v = v;
- }
-
- public int hashCode()
- {
- return (int)v;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemLong)
- {
- return ((ConstantPoolItemLong)o).v == v;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Long);
- dos.writeLong(v);
- }
-}
-
-final class ConstantPoolItemFloat extends ConstantPoolItem
-{
- private float v;
-
- public ConstantPoolItemFloat(float v)
- {
- this.v = v;
- }
-
- public int hashCode()
- {
- return Float.floatToIntBits(v);
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemFloat)
- {
- return ((ConstantPoolItemFloat)o).v == v;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Float);
- dos.writeFloat(v);
- }
-}
-
-final class ConstantPoolItemDouble extends ConstantPoolItem
-{
- private double v;
-
- public ConstantPoolItemDouble(double v)
- {
- this.v = v;
- }
-
- public int hashCode()
- {
- long l = Double.doubleToLongBits(v);
- return ((int)l) ^ ((int)(l >> 32));
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemDouble)
- {
- return ((ConstantPoolItemDouble)o).v == v;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.Double);
- dos.writeDouble(v);
- }
-}
-
-final class ConstantPoolItemString extends ConstantPoolItem
-{
- private short string_index;
-
- public ConstantPoolItemString(short string_index)
- {
- this.string_index = string_index;
- }
-
- public int hashCode()
- {
- return string_index;
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof ConstantPoolItemString)
- {
- return ((ConstantPoolItemString)o).string_index == string_index;
- }
- return false;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeByte(Constant.String);
- dos.writeShort(string_index);
- }
-}
-
-class ClassFileAttribute
-{
- private short name_index;
-
- public ClassFileAttribute(short name_index)
- {
- this.name_index = name_index;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- dos.writeShort(name_index);
- }
-}
-
-class DeprecatedAttribute extends ClassFileAttribute
-{
- DeprecatedAttribute(ClassFileWriter classFile)
- {
- super(classFile.AddUtf8("Deprecated"));
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(0);
- }
-}
-
-class ConstantValueAttribute extends ClassFileAttribute
-{
- private short constant_index;
-
- public ConstantValueAttribute(short name_index, short constant_index)
- {
- super(name_index);
- this.constant_index = constant_index;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(2);
- dos.writeShort(constant_index);
- }
-}
-
-class StringAttribute extends ClassFileAttribute
-{
- private short string_index;
-
- public StringAttribute(short name_index, short string_index)
- {
- super(name_index);
- this.string_index = string_index;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(2);
- dos.writeShort(string_index);
- }
-}
-
-class InnerClassesAttribute extends ClassFileAttribute
-{
- private ClassFileWriter classFile;
- private ArrayList classes = new ArrayList();
-
- public InnerClassesAttribute(ClassFileWriter classFile)
- {
- super(classFile.AddUtf8("InnerClasses"));
- this.classFile = classFile;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(2 + 8 * classes.size());
- dos.writeShort(classes.size());
- for (int i = 0; i < classes.size(); i++)
- {
- Item it = (Item)classes.get(i);
- dos.writeShort(it.inner_class_info_index);
- dos.writeShort(it.outer_class_info_index);
- dos.writeShort(it.inner_name_index);
- dos.writeShort(it.inner_class_access_flags);
- }
- }
-
- private class Item
- {
- short inner_class_info_index;
- short outer_class_info_index;
- short inner_name_index;
- short inner_class_access_flags;
- }
-
- public void Add(String inner, String outer, String name, int access)
- {
- Item i = new Item();
- i.inner_class_info_index = classFile.AddClass(inner);
- i.outer_class_info_index = classFile.AddClass(outer);
- if(name != null)
- {
- i.inner_name_index = classFile.AddUtf8(name);
- }
- i.inner_class_access_flags = (short)access;
- classes.add(i);
- }
-}
-
-class ExceptionsAttribute extends ClassFileAttribute
-{
- private ClassFileWriter classFile;
- private ArrayList classes = new ArrayList();
-
- ExceptionsAttribute(ClassFileWriter classFile)
- {
- super(classFile.AddUtf8("Exceptions"));
- this.classFile = classFile;
- }
-
- void Add(String exceptionClass)
- {
- classes.add(classFile.AddClass(exceptionClass));
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(2 + 2 * classes.size());
- dos.writeShort(classes.size());
- for (int i = 0; i < classes.size(); i++)
- {
- short idx = (Short)classes.get(i);
- dos.writeShort(idx);
- }
- }
-}
-
-class RuntimeVisibleAnnotationsAttribute extends ClassFileAttribute
-{
- private ClassFileWriter classFile;
- private byte[] buf;
-
- RuntimeVisibleAnnotationsAttribute(ClassFileWriter classFile, Annotation[] annotations)
- {
- super(classFile.AddUtf8("RuntimeVisibleAnnotations"));
- this.classFile = classFile;
- try
- {
- ByteArrayOutputStream mem = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(mem);
- dos.writeShort((short)annotations.length);
- for(Annotation ann : annotations)
- {
- WriteAnnotation(classFile, dos, ann);
- }
- buf = mem.toByteArray();
- }
- catch(Exception x)
- {
- throw new Error(x);
- }
- }
-
- RuntimeVisibleAnnotationsAttribute(ClassFileWriter classFile, Annotation[][] parameterAnnotations)
- {
- super(classFile.AddUtf8("RuntimeVisibleParameterAnnotations"));
- this.classFile = classFile;
- try
- {
- ByteArrayOutputStream mem = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(mem);
- dos.writeByte(parameterAnnotations.length);
- for(Annotation[] annotations : parameterAnnotations)
- {
- dos.writeShort((short)annotations.length);
- for(Annotation ann : annotations)
- {
- WriteAnnotation(classFile, dos, ann);
- }
- }
- buf = mem.toByteArray();
- }
- catch(Exception x)
- {
- throw new Error(x);
- }
- }
-
- private static boolean deepEquals(Object o1, Object o2)
- {
- if (o1 == o2)
- return true;
-
- if (o1 == null || o2 == null)
- return false;
-
- if (o1 instanceof boolean[] && o2 instanceof boolean[])
- return Arrays.equals((boolean[]) o1, (boolean[]) o2);
-
- if (o1 instanceof byte[] && o2 instanceof byte[])
- return Arrays.equals((byte[]) o1, (byte[]) o2);
-
- if (o1 instanceof char[] && o2 instanceof char[])
- return Arrays.equals((char[]) o1, (char[]) o2);
-
- if (o1 instanceof short[] && o2 instanceof short[])
- return Arrays.equals((short[]) o1, (short[]) o2);
-
- if (o1 instanceof int[] && o2 instanceof int[])
- return Arrays.equals((int[]) o1, (int[]) o2);
-
- if (o1 instanceof float[] && o2 instanceof float[])
- return Arrays.equals((float[]) o1, (float[]) o2);
-
- if (o1 instanceof long[] && o2 instanceof long[])
- return Arrays.equals((long[]) o1, (long[]) o2);
-
- if (o1 instanceof double[] && o2 instanceof double[])
- return Arrays.equals((double[]) o1, (double[]) o2);
-
- if (o1 instanceof Object[] && o2 instanceof Object[])
- return Arrays.equals((Object[]) o1, (Object[]) o2);
-
- return o1.equals(o2);
- }
-
- static void WriteValue(ClassFileWriter classFile, DataOutputStream dos, Object val)
- throws IOException, IllegalAccessException, InvocationTargetException
- {
- if(val instanceof Boolean)
- {
- dos.writeByte('Z');
- dos.writeShort(classFile.AddInt(((Boolean)val).booleanValue() ? 1 : 0));
- }
- else if(val instanceof Byte)
- {
- dos.writeByte('B');
- dos.writeShort(classFile.AddInt(((Byte)val).byteValue()));
- }
- else if(val instanceof Character)
- {
- dos.writeByte('C');
- dos.writeShort(classFile.AddInt(((Character)val).charValue()));
- }
- else if(val instanceof Short)
- {
- dos.writeByte('S');
- dos.writeShort(classFile.AddInt(((Short)val).shortValue()));
- }
- else if(val instanceof Integer)
- {
- dos.writeByte('I');
- dos.writeShort(classFile.AddInt(((Integer)val).intValue()));
- }
- else if(val instanceof Float)
- {
- dos.writeByte('F');
- dos.writeShort(classFile.AddFloat(((Float)val).floatValue()));
- }
- else if(val instanceof Long)
- {
- dos.writeByte('J');
- dos.writeShort(classFile.AddLong(((Long)val).longValue()));
- }
- else if(val instanceof Double)
- {
- dos.writeByte('D');
- dos.writeShort(classFile.AddDouble(((Double)val).doubleValue()));
- }
- else if(val instanceof String)
- {
- dos.writeByte('s');
- dos.writeShort(classFile.AddUtf8((String)val));
- }
- else if(val instanceof Enum)
- {
- Enum enumVal = (Enum)val;
- Class enumType = enumVal.getDeclaringClass();
- dos.writeByte('e');
- dos.writeShort(classFile.AddUtf8("L" + enumType.getName().replace('.', '/') + ";"));
- dos.writeShort(classFile.AddUtf8(enumVal.name()));
- }
- else if(val instanceof Class)
- {
- dos.writeByte('c');
- Class c = (Class)val;
- String sig;
- if(c.isArray())
- {
- sig = c.getName();
- }
- else if(c == Boolean.TYPE)
- {
- sig = "Z";
- }
- else if(c == Byte.TYPE)
- {
- sig = "B";
- }
- else if(c == Character.TYPE)
- {
- sig = "C";
- }
- else if(c == Short.TYPE)
- {
- sig = "S";
- }
- else if(c == Integer.TYPE)
- {
- sig = "I";
- }
- else if(c == Float.TYPE)
- {
- sig = "F";
- }
- else if(c == Long.TYPE)
- {
- sig = "J";
- }
- else if(c == Double.TYPE)
- {
- sig = "D";
- }
- else if(c == Void.TYPE)
- {
- sig = "V";
- }
- else
- {
- sig = "L" + c.getName() + ";";
- }
- dos.writeShort(classFile.AddUtf8(sig.replace('.', '/')));
- }
- else if(val instanceof Annotation)
- {
- dos.writeByte('@');
- WriteAnnotation(classFile, dos, (Annotation)val);
- }
- else if(val.getClass().isArray())
- {
- dos.writeByte('[');
- int len = Array.getLength(val);
- dos.writeShort((short)len);
- for(int i = 0; i < len; i++)
- {
- WriteValue(classFile, dos, Array.get(val, i));
- }
- }
- else
- {
- throw new Error("Not Implemented: " + val.getClass());
- }
- }
-
- static void WriteAnnotation(ClassFileWriter classFile, DataOutputStream dos, Annotation ann)
- throws IOException, IllegalAccessException, InvocationTargetException
- {
- Class annotationType = ann.annotationType();
- dos.writeShort(classFile.AddUtf8("L" + annotationType.getName().replace('.', '/') + ";"));
- short numvalues = 0;
- Method[] methods = annotationType.getDeclaredMethods();
- for(int i = 0; i < methods.length; i++)
- {
- final Method m = methods[i];
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- m.setAccessible(true);
- return null;
- }
- });
- // HACK since there's no way to query if the annotation value is the default value
- // (and I don't want to add a private API for that), we simply compare the value
- // with the default and if they match we won't list the value.
- if(deepEquals(m.invoke(ann), m.getDefaultValue()))
- {
- methods[i] = null;
- }
- else
- {
- numvalues++;
- }
- }
- dos.writeShort(numvalues);
- for(Method m : methods)
- {
- if(m != null)
- {
- dos.writeShort(classFile.AddUtf8(m.getName()));
- WriteValue(classFile, dos, m.invoke(ann));
- }
- }
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(buf.length);
- dos.write(buf);
- }
-}
-
-class AnnotationDefaultClassFileAttribute extends ClassFileAttribute
-{
- private ClassFileWriter classFile;
- private byte[] buf;
-
- AnnotationDefaultClassFileAttribute(ClassFileWriter classFile, Object val)
- {
- super(classFile.AddUtf8("AnnotationDefault"));
- this.classFile = classFile;
- try
- {
- ByteArrayOutputStream mem = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(mem);
- RuntimeVisibleAnnotationsAttribute.WriteValue(classFile, dos, val);
- buf = mem.toByteArray();
- }
- catch (Exception x)
- {
- throw new Error(x);
- }
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(buf.length);
- dos.write(buf);
- }
-}
-
-class FieldOrMethod
-{
- private short access_flags;
- private short name_index;
- private short descriptor_index;
- private ArrayList attribs = new ArrayList();
-
- public FieldOrMethod(int access_flags, short name_index, short descriptor_index)
- {
- this.access_flags = (short)access_flags;
- this.name_index = name_index;
- this.descriptor_index = descriptor_index;
- }
-
- public void AddAttribute(ClassFileAttribute attrib)
- {
- attribs.add(attrib);
- }
-
- public void Write(DataOutputStream dos) throws IOException
- {
- dos.writeShort(access_flags);
- dos.writeShort(name_index);
- dos.writeShort(descriptor_index);
- dos.writeShort(attribs.size());
- for(int i = 0; i < attribs.size(); i++)
- {
- ((ClassFileAttribute)attribs.get(i)).Write(dos);
- }
- }
-}
-
-class CodeAttribute extends ClassFileAttribute
-{
- private ClassFileWriter classFile;
- private short max_stack;
- private short max_locals;
- private byte[] code;
-
- public CodeAttribute(ClassFileWriter classFile)
- {
- super(classFile.AddUtf8("Code"));
- this.classFile = classFile;
- }
-
- public void SetMaxStack(int v)
- {
- max_stack = (short)v;
- }
-
- public void SetMaxLocals(int v)
- {
- max_locals = (short)v;
- }
-
- public void SetByteCode(byte[] v)
- {
- code = v;
- }
-
- void Write(DataOutputStream dos) throws IOException
- {
- super.Write(dos);
- dos.writeInt(2 + 2 + 4 + code.length + 2 + 2);
- dos.writeShort(max_stack);
- dos.writeShort(max_locals);
- dos.writeInt(code.length);
- dos.write(code);
- dos.writeShort(0); // no exceptions
- dos.writeShort(0); // no attributes
- }
-}
-
-class ClassFileWriter
-{
- private ArrayList cplist = new ArrayList();
- private Hashtable cphashtable = new Hashtable();
- private ArrayList fields = new ArrayList();
- private ArrayList methods = new ArrayList();
- private ArrayList attribs = new ArrayList();
- private ArrayList interfaces = new ArrayList();
- private int access_flags;
- private short this_class;
- private short super_class;
- private short minorVersion;
- private short majorVersion;
-
- public ClassFileWriter(int mods, String name, String superClass, int minorVersion, int majorVersion)
- {
- cplist.add(null);
- access_flags = mods;
- this_class = AddClass(name);
- if(superClass != null)
- {
- super_class = AddClass(superClass);
- }
- this.minorVersion = (short)minorVersion;
- this.majorVersion = (short)majorVersion;
- }
-
- private short Add(ConstantPoolItem cpi)
- {
- Object index = cphashtable.get(cpi);
- if(index == null)
- {
- index = (short)cplist.size();
- cplist.add(cpi);
- if(cpi instanceof ConstantPoolItemDouble || cpi instanceof ConstantPoolItemLong)
- {
- cplist.add(null);
- }
- cphashtable.put(cpi, index);
- }
- return (Short)index;
- }
-
- public short AddUtf8(String str)
- {
- return Add(new ConstantPoolItemUtf8(str));
- }
-
- public short AddClass(String classname)
- {
- return Add(new ConstantPoolItemClass(AddUtf8(classname)));
- }
-
- public short AddMethodRef(String classname, String methodname, String signature)
- {
- return Add(new ConstantPoolItemMethodref(AddClass(classname), AddNameAndType(methodname, signature)));
- }
-
- public short AddNameAndType(String name, String type)
- {
- return Add(new ConstantPoolItemNameAndType(AddUtf8(name), AddUtf8(type)));
- }
-
- public short AddInt(int i)
- {
- return Add(new ConstantPoolItemInt(i));
- }
-
- public short AddLong(long l)
- {
- return Add(new ConstantPoolItemLong(l));
- }
-
- public short AddFloat(float f)
- {
- return Add(new ConstantPoolItemFloat(f));
- }
-
- public short AddDouble(double d)
- {
- return Add(new ConstantPoolItemDouble(d));
- }
-
- public short AddString(String s)
- {
- return Add(new ConstantPoolItemString(AddUtf8(s)));
- }
-
- public void AddInterface(String name)
- {
- interfaces.add(AddClass(name));
- }
-
- public FieldOrMethod AddMethod(int access, String name, String signature)
- {
- FieldOrMethod method = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
- methods.add(method);
- return method;
- }
-
- public FieldOrMethod AddField(int access, String name, String signature, Object constantValue)
- {
- FieldOrMethod field = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
- if(constantValue != null)
- {
- short constantValueIndex;
- if(constantValue instanceof Boolean)
- {
- constantValueIndex = AddInt(((Boolean)constantValue).booleanValue() ? 1 : 0);
- }
- else if(constantValue instanceof Byte)
- {
- constantValueIndex = AddInt(((Byte)constantValue).byteValue());
- }
- else if(constantValue instanceof Short)
- {
- constantValueIndex = AddInt(((Short)constantValue).shortValue());
- }
- else if(constantValue instanceof Character)
- {
- constantValueIndex = AddInt(((Character)constantValue).charValue());
- }
- else if(constantValue instanceof Integer)
- {
- constantValueIndex = AddInt(((Integer)constantValue).intValue());
- }
- else if(constantValue instanceof Long)
- {
- constantValueIndex = AddLong(((Long)constantValue).longValue());
- }
- else if(constantValue instanceof Float)
- {
- constantValueIndex = AddFloat(((Float)constantValue).floatValue());
- }
- else if(constantValue instanceof Double)
- {
- constantValueIndex = AddDouble(((Double)constantValue).doubleValue());
- }
- else if(constantValue instanceof String)
- {
- constantValueIndex = AddString((String)constantValue);
- }
- else
- {
- throw new Error();
- }
- field.AddAttribute(new ConstantValueAttribute(AddUtf8("ConstantValue"), constantValueIndex));
- }
- fields.add(field);
- return field;
- }
-
- public ClassFileAttribute MakeStringAttribute(String name, String value)
- {
- return new StringAttribute(AddUtf8(name), AddUtf8(value));
- }
-
- public void AddStringAttribute(String name, String value)
- {
- attribs.add(MakeStringAttribute(name, value));
- }
-
- public void AddAttribute(ClassFileAttribute attrib)
- {
- attribs.add(attrib);
- }
-
- public void Write(OutputStream stream) throws IOException
- {
- DataOutputStream dos = new DataOutputStream(stream);
- dos.writeInt(0xCAFEBABE);
- dos.writeShort(minorVersion);
- dos.writeShort(majorVersion);
- dos.writeShort(cplist.size());
- for(int i = 1; i < cplist.size(); i++)
- {
- ConstantPoolItem cpi = (ConstantPoolItem)cplist.get(i);
- if(cpi != null)
- {
- cpi.Write(dos);
- }
- }
- dos.writeShort(access_flags);
- dos.writeShort(this_class);
- dos.writeShort(super_class);
- // interfaces count
- dos.writeShort(interfaces.size());
- for(int i = 0; i < interfaces.size(); i++)
- {
- dos.writeShort((Short)interfaces.get(i));
- }
- // fields count
- dos.writeShort(fields.size());
- for(int i = 0; i < fields.size(); i++)
- {
- ((FieldOrMethod)fields.get(i)).Write(dos);
- }
- // methods count
- dos.writeShort(methods.size());
- for(int i = 0; i < methods.size(); i++)
- {
- ((FieldOrMethod)methods.get(i)).Write(dos);
- }
- // attributes count
- dos.writeShort(attribs.size());
- for(int i = 0; i < attribs.size(); i++)
- {
- ((ClassFileAttribute)attribs.get(i)).Write(dos);
- }
- }
-}
diff --git a/external/ikvm/classpath/ikvm/runtime/EnumerationWrapper.java b/external/ikvm/classpath/ikvm/runtime/EnumerationWrapper.java
new file mode 100644
index 0000000..9c8d7b4
--- /dev/null
+++ b/external/ikvm/classpath/ikvm/runtime/EnumerationWrapper.java
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+package ikvm.runtime;
+
+import cli.System.Collections.IEnumerable;
+import cli.System.Collections.IEnumerator;
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+public final class EnumerationWrapper<T> implements Enumeration<T>
+{
+ private final IEnumerator enumerator;
+ private boolean next;
+
+ public EnumerationWrapper(IEnumerable enumerable)
+ {
+ this.enumerator = enumerable.GetEnumerator();
+ next = enumerator.MoveNext();
+ }
+
+ public boolean hasMoreElements()
+ {
+ return next;
+ }
+
+ public T nextElement()
+ {
+ if (!next)
+ throw new NoSuchElementException();
+ Object value = enumerator.get_Current();
+ next = enumerator.MoveNext();
+ return (T)value;
+ }
+}
diff --git a/external/ikvm/ikvm-fork.snk b/external/ikvm/ikvm-fork.snk
new file mode 100644
index 0000000..a504982
Binary files /dev/null and b/external/ikvm/ikvm-fork.snk differ
diff --git a/external/ikvm/ikvm.build b/external/ikvm/ikvm.build
index b50171a..5ba38cc 100644
--- a/external/ikvm/ikvm.build
+++ b/external/ikvm/ikvm.build
@@ -38,6 +38,8 @@
<delete failonerror="false">
<fileset>
<include name="bin/IKVM.AWT.WinForms.dll" />
+ <include name="bin/IKVM.MSBuild.dll" />
+ <include name="bin/IKVM.MSBuild.Java.Targets" />
<include name="bin/IKVM.Reflection.dll" />
<include name="bin/IKVM.Runtime.dll" />
<include name="bin/IKVM.Runtime.JNI.dll" />
diff --git a/external/ikvm/ikvm.include b/external/ikvm/ikvm.include
index 833c4af..298c5a3 100644
--- a/external/ikvm/ikvm.include
+++ b/external/ikvm/ikvm.include
@@ -1,10 +1,5 @@
<?xml version="1.0"?>
<project name="ikvm-include">
- <!-- find ilasm.exe -->
- <if test="${(not property::exists('ilasm')) and file::exists(path::combine(framework::get-framework-directory(framework::get-target-framework()), 'ilasm.exe'))}">
- <property name="ilasm" value="${path::combine(framework::get-framework-directory(framework::get-target-framework()), 'ilasm.exe')}" />
- </if>
-
<!-- find peverify.exe -->
<if test="${(not property::exists('peverify')) and framework::sdk-exists(framework::get-target-framework()) and file::exists(path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'peverify.exe'))}">
<property name="peverify" value="${path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'peverify.exe')}" />
@@ -16,8 +11,12 @@
</if>
</if>
- <!-- find rc.exe -->
- <if test="${(not property::exists('rc')) and framework::sdk-exists(framework::get-target-framework()) and file::exists(path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'rc.exe'))}">
- <property name="rc" value="${path::combine(framework::get-sdk-directory(framework::get-target-framework()), 'rc.exe')}" />
+ <!-- HACK to support targetting .NET 4.0 when 4.5 is installed, we have to figure out the reference path ourself -->
+ <if test="${version::get-major(framework::get-version(framework::get-target-framework())) == 4 and (not string::starts-with(framework::get-target-framework(), 'mono'))}">
+ <if test="${environment::variable-exists('ProgramFiles(x86)')}">
+ <property name="ReferencePath" value="${environment::get-variable('ProgramFiles(x86)')}/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.0" />
+ </if>
+ <property overwrite="false" name="ReferencePath" value="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.0" />
</if>
+ <property overwrite="false" name="ReferencePath" value="${framework::get-assembly-directory(framework::get-target-framework())}" />
</project>
diff --git a/external/ikvm/ikvm/ikvm.build b/external/ikvm/ikvm/ikvm.build
index 43e9f68..9561417 100644
--- a/external/ikvm/ikvm/ikvm.build
+++ b/external/ikvm/ikvm/ikvm.build
@@ -1,8 +1,10 @@
<?xml version="1.0"?>
<project name="ikvm" default="ikvm">
+ <include buildfile="../ikvm.include" />
+
<target name="ikvm">
<property overwrite="false" name="signed" value="" />
- <csc target="exe" output="../bin/ikvm.exe" define="TRACE;${signed}">
+ <csc target="exe" output="../bin/ikvm.exe" define="TRACE;${signed}" noconfig="true" nostdlib="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="*.cs" />
@@ -11,6 +13,8 @@
<include name="../bin/IKVM.OpenJDK.Core.dll" asis="true" />
<include name="../bin/IKVM.OpenJDK.Util.dll" asis="true" />
<include name="../bin/IKVM.Runtime.dll" asis="true" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
</references>
</csc>
</target>
diff --git a/external/ikvm/ikvm/starter.cs b/external/ikvm/ikvm/starter.cs
index 74c360c..89d6cc1 100644
--- a/external/ikvm/ikvm/starter.cs
+++ b/external/ikvm/ikvm/starter.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2011 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -22,18 +22,12 @@
*/
using System;
+using System.Diagnostics;
using System.IO;
using System.Reflection;
using IKVM.Internal;
-
using ikvm.runtime;
using java.lang.reflect;
-using java.net;
-using java.util.jar;
-using java.io;
-
-using Console = System.Console;
-using System.Diagnostics;
public class Starter
{
@@ -66,11 +60,9 @@ public class Starter
public override void run()
{
System.Threading.Thread.CurrentThread.Priority = System.Threading.ThreadPriority.AboveNormal;
- Console.Error.WriteLine("Saving dynamic assembly...");
try
{
IKVM.Internal.Starter.SaveDebugImage();
- Console.Error.WriteLine("Saving done.");
}
catch(Exception x)
{
@@ -265,6 +257,10 @@ public class Starter
{
noglobbing = true;
}
+ else if (arg == "-XX:+AllowNonVirtualCalls")
+ {
+ IKVM.Internal.Starter.AllowNonVirtualCalls = true;
+ }
else if (arg.StartsWith("-Xms")
|| arg.StartsWith("-Xmx")
|| arg.StartsWith("-Xss")
@@ -374,47 +370,29 @@ public class Starter
// Startup.glob() uses Java code, so we need to do this after we've initialized
vmargs = Startup.glob(args, vmargsIndex);
}
- if (jar)
+ try
{
- mainClass = GetMainClassFromJarManifest(mainClass);
- if (mainClass == null)
+ java.lang.Class clazz = sun.launcher.LauncherHelper.checkAndLoadMain(true, jar ? 2 : 1, mainClass);
+ // we don't need to do any checking on the main method, as that was already done by checkAndLoadMain
+ Method method = clazz.getMethod("main", typeof(string[]));
+ // if clazz isn't public, we can still call main
+ method.setAccessible(true);
+ if(saveAssembly)
{
- return 1;
+ java.lang.Runtime.getRuntime().addShutdownHook(new SaveAssemblyShutdownHook(clazz));
}
- }
- java.lang.Class clazz = java.lang.Class.forName(mainClass, true, java.lang.ClassLoader.getSystemClassLoader());
- try
- {
- Method method = IKVM.Internal.Starter.FindMainMethod(clazz);
- if(method == null)
+ if(waitOnExit)
{
- throw new java.lang.NoSuchMethodError("main");
+ java.lang.Runtime.getRuntime().addShutdownHook(new WaitShutdownHook());
}
- else if(!Modifier.isPublic(method.getModifiers()))
+ try
{
- Console.Error.WriteLine("Main method not public.");
+ method.invoke(null, new object[] { vmargs });
+ return 0;
}
- else
+ catch(InvocationTargetException x)
{
- // if clazz isn't public, we can still call main
- method.setAccessible(true);
- if(saveAssembly)
- {
- java.lang.Runtime.getRuntime().addShutdownHook(new SaveAssemblyShutdownHook(clazz));
- }
- if(waitOnExit)
- {
- java.lang.Runtime.getRuntime().addShutdownHook(new WaitShutdownHook());
- }
- try
- {
- method.invoke(null, new object[] { vmargs });
- return 0;
- }
- catch(InvocationTargetException x)
- {
- throw x.getCause();
- }
+ throw x.getCause();
}
}
finally
@@ -436,29 +414,4 @@ public class Starter
}
return 1;
}
-
- private static string GetMainClassFromJarManifest(string mainClass)
- {
- JarFile jf = new JarFile(mainClass);
- try
- {
- Manifest manifest = jf.getManifest();
- if (manifest == null)
- {
- Console.Error.WriteLine("Jar file doesn't contain manifest");
- return null;
- }
- mainClass = manifest.getMainAttributes().getValue(Attributes.Name.MAIN_CLASS);
- }
- finally
- {
- jf.close();
- }
- if (mainClass == null)
- {
- Console.Error.WriteLine("Manifest doesn't contain a Main-Class.");
- return null;
- }
- return mainClass.Replace('/', '.');
- }
}
diff --git a/external/ikvm/ikvm9.sln b/external/ikvm/ikvm9.sln
index 0815e49..c87909f 100644
--- a/external/ikvm/ikvm9.sln
+++ b/external/ikvm/ikvm9.sln
@@ -16,6 +16,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Runtime.JNI.8", "runti
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Reflection", "reflect\IKVM.Reflection.csproj", "{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.MSBuild", "msbuild\IKVM.MSBuild.csproj", "{D7FF23BC-49C2-490D-B702-8EEE8F5AF296}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -63,6 +65,11 @@ Global
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {D7FF23BC-49C2-490D-B702-8EEE8F5AF296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D7FF23BC-49C2-490D-B702-8EEE8F5AF296}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D7FF23BC-49C2-490D-B702-8EEE8F5AF296}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {D7FF23BC-49C2-490D-B702-8EEE8F5AF296}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {D7FF23BC-49C2-490D-B702-8EEE8F5AF296}.Debug|Win32.ActiveCfg = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/external/ikvm/ikvmc/AotTypeWrapper.cs b/external/ikvm/ikvmc/AotTypeWrapper.cs
index a81f22e..60e519e 100644
--- a/external/ikvm/ikvmc/AotTypeWrapper.cs
+++ b/external/ikvm/ikvmc/AotTypeWrapper.cs
@@ -48,7 +48,7 @@ namespace IKVM.Internal
private WorkaroundBaseClass workaroundBaseClass;
internal AotTypeWrapper(ClassFile f, CompilerClassLoader loader)
- : base(f, loader)
+ : base(f, loader, null)
{
}
@@ -580,7 +580,10 @@ namespace IKVM.Internal
}
else
{
- attribs |= MethodAttributes.Virtual;
+ if((modifiers & Modifiers.Private) == 0)
+ {
+ attribs |= MethodAttributes.Virtual;
+ }
if((modifiers & Modifiers.Final) != 0)
{
attribs |= MethodAttributes.Final;
@@ -1118,7 +1121,7 @@ namespace IKVM.Internal
}
}
- internal override void EmitCheckcast(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitCheckcast(CodeEmitter ilgen)
{
if(IsGhost)
{
@@ -1142,11 +1145,11 @@ namespace IKVM.Internal
}
else
{
- base.EmitCheckcast(context, ilgen);
+ base.EmitCheckcast(ilgen);
}
}
- internal override void EmitInstanceOf(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitInstanceOf(CodeEmitter ilgen)
{
if(IsGhost)
{
@@ -1158,7 +1161,7 @@ namespace IKVM.Internal
}
else
{
- base.EmitInstanceOf(context, ilgen);
+ base.EmitInstanceOf(ilgen);
}
}
diff --git a/external/ikvm/ikvmc/AssemblyResolver.cs b/external/ikvm/ikvmc/AssemblyResolver.cs
index b95573e..131500d 100644
--- a/external/ikvm/ikvmc/AssemblyResolver.cs
+++ b/external/ikvm/ikvmc/AssemblyResolver.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2010 Jeroen Frijters
+ Copyright (C) 2010-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -32,7 +32,6 @@ namespace IKVM.Internal
sealed class AssemblyResolver
{
private readonly List<string> libpath = new List<string>();
- private readonly Dictionary<string, string> hintpaths = new Dictionary<string, string>();
private Universe universe;
private Version mscorlibVersion;
@@ -84,7 +83,11 @@ namespace IKVM.Internal
{
mscorlibVersion = universe.Load("mscorlib").GetName().Version;
}
- universe.AssemblyResolve += new IKVM.Reflection.ResolveEventHandler(universe_AssemblyResolve);
+#if STATIC_COMPILER
+ universe.AssemblyResolve += AssemblyResolve;
+#else
+ universe.AssemblyResolve += LegacyAssemblyResolve;
+#endif
}
internal Assembly LoadFile(string path)
@@ -245,7 +248,7 @@ namespace IKVM.Internal
}
}
- private Assembly universe_AssemblyResolve(object sender, IKVM.Reflection.ResolveEventArgs args)
+ private Assembly AssemblyResolve(object sender, IKVM.Reflection.ResolveEventArgs args)
{
AssemblyName name = new AssemblyName(args.Name);
AssemblyName previousMatch = null;
@@ -257,25 +260,62 @@ namespace IKVM.Internal
return asm;
}
}
- foreach (string file in FindAssemblyPath(name.Name + ".dll"))
+ if (previousMatch != null)
{
- if (Match(AssemblyName.GetAssemblyName(file), name, ref previousMatch, ref previousMatchLevel))
+ if (previousMatchLevel == 2)
{
- return LoadFile(file);
+ EmitWarning(WarningId.HigherVersion, "assuming assembly reference \"{0}\" matches \"{1}\", you may need to supply runtime policy", previousMatch.FullName, name.FullName);
+ return universe.Load(previousMatch.FullName);
+ }
+ else if (args.RequestingAssembly != null)
+ {
+ Console.Error.WriteLine("Error: Assembly '{0}' uses '{1}' which has a higher version than referenced assembly '{2}'", args.RequestingAssembly.FullName, name.FullName, previousMatch.FullName);
+ Environment.Exit(1);
+ return null;
+ }
+ else
+ {
+ Console.Error.WriteLine("Error: Assembly '{0}' was requested which is a higher version than referenced assembly '{1}'", name.FullName, previousMatch.FullName);
+ Environment.Exit(1);
+ return null;
}
}
- if (args.RequestingAssembly != null)
+ else if (args.RequestingAssembly != null)
{
- string path = Path.Combine(Path.GetDirectoryName(args.RequestingAssembly.Location), name.Name + ".dll");
- if (File.Exists(path) && Match(AssemblyName.GetAssemblyName(path), name, ref previousMatch, ref previousMatchLevel))
+ return universe.CreateMissingAssembly(args.Name);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private Assembly LegacyAssemblyResolve(object sender, IKVM.Reflection.ResolveEventArgs args)
+ {
+ return LegacyLoad(new AssemblyName(args.Name), args.RequestingAssembly);
+ }
+
+ internal Assembly LegacyLoad(AssemblyName name, Assembly requestingAssembly)
+ {
+ AssemblyName previousMatch = null;
+ int previousMatchLevel = 0;
+ foreach (Assembly asm in universe.GetAssemblies())
+ {
+ if (Match(asm.GetName(), name, ref previousMatch, ref previousMatchLevel))
{
- return LoadFile(path);
+ return asm;
}
}
- string hintpath;
- if (hintpaths.TryGetValue(name.FullName, out hintpath))
+ foreach (string file in FindAssemblyPath(name.Name + ".dll"))
{
- string path = Path.Combine(hintpath, name.Name + ".dll");
+ if (Match(AssemblyName.GetAssemblyName(file), name, ref previousMatch, ref previousMatchLevel))
+ {
+ return LoadFile(file);
+ }
+ }
+ if (requestingAssembly != null)
+ {
+ string path = Path.Combine(Path.GetDirectoryName(requestingAssembly.Location), name.Name + ".dll");
if (File.Exists(path) && Match(AssemblyName.GetAssemblyName(path), name, ref previousMatch, ref previousMatchLevel))
{
return LoadFile(path);
@@ -288,9 +328,9 @@ namespace IKVM.Internal
EmitWarning(WarningId.HigherVersion, "assuming assembly reference \"{0}\" matches \"{1}\", you may need to supply runtime policy", previousMatch.FullName, name.FullName);
return LoadFile(new Uri(previousMatch.CodeBase).LocalPath);
}
- else if (args.RequestingAssembly != null)
+ else if (requestingAssembly != null)
{
- Console.Error.WriteLine("Error: Assembly '{0}' uses '{1}' which has a higher version than referenced assembly '{2}'", args.RequestingAssembly.FullName, name.FullName, previousMatch.FullName);
+ Console.Error.WriteLine("Error: Assembly '{0}' uses '{1}' which has a higher version than referenced assembly '{2}'", requestingAssembly.FullName, name.FullName, previousMatch.FullName);
}
else
{
@@ -300,12 +340,12 @@ namespace IKVM.Internal
else
{
#if STUB_GENERATOR
- return universe.CreateMissingAssembly(args.Name);
+ return universe.CreateMissingAssembly(name.FullName);
#else
- Console.Error.WriteLine("Error: unable to find assembly '{0}'", args.Name);
- if (args.RequestingAssembly != null)
+ Console.Error.WriteLine("Error: unable to find assembly '{0}'", name.FullName);
+ if (requestingAssembly != null)
{
- Console.Error.WriteLine(" (a dependency of '{0}')", args.RequestingAssembly.FullName);
+ Console.Error.WriteLine(" (a dependency of '{0}')", requestingAssembly.FullName);
}
#endif
}
@@ -433,10 +473,5 @@ namespace IKVM.Internal
}
}
}
-
- internal void AddHintPath(string assemblyName, string path)
- {
- hintpaths.Add(assemblyName, path);
- }
}
}
diff --git a/external/ikvm/ikvmc/Compiler.cs b/external/ikvm/ikvmc/Compiler.cs
index f994671..f824b02 100644
--- a/external/ikvm/ikvmc/Compiler.cs
+++ b/external/ikvm/ikvmc/Compiler.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -30,6 +30,7 @@ using ICSharpCode.SharpZipLib.Zip;
using IKVM.Internal;
using IKVM.Reflection;
using IKVM.Reflection.Emit;
+using Type = IKVM.Reflection.Type;
sealed class FatalCompilerErrorException : Exception
{
@@ -149,6 +150,12 @@ sealed class FatalCompilerErrorException : Exception
return "CallerID.getCallerID() requires a HasCallerID annotation";
case IKVM.Internal.Message.UnableToResolveInterface:
return "Unable to resolve interface '{0}' on type '{1}'";
+ case IKVM.Internal.Message.MissingBaseType:
+ return "The base class or interface '{0}' in assembly '{1}' referenced by type '{2}' in '{3}' could not be resolved";
+ case IKVM.Internal.Message.MissingBaseTypeReference:
+ return "The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'";
+ case IKVM.Internal.Message.FileNotFound:
+ return "File not found: {0}";
default:
return "Missing Error Message. Please file a bug.";
}
@@ -159,8 +166,6 @@ sealed class IkvmcCompiler
{
private bool nonleaf;
private string manifestMainClass;
- private Dictionary<string, ClassItem> classes = new Dictionary<string, ClassItem>();
- private Dictionary<string, List<ResourceItem>> resources = new Dictionary<string, List<ResourceItem>>();
private string defaultAssemblyName;
private List<string> classesToExclude = new List<string>();
private static bool time;
@@ -225,7 +230,18 @@ sealed class IkvmcCompiler
Tracer.EnableTraceForDebug();
try
{
- return Compile(args);
+ try
+ {
+ return Compile(args);
+ }
+ catch (TypeInitializationException x)
+ {
+ if (x.InnerException is FatalCompilerErrorException)
+ {
+ throw x.InnerException;
+ }
+ throw;
+ }
}
catch (FatalCompilerErrorException x)
{
@@ -239,6 +255,10 @@ sealed class IkvmcCompiler
Console.Error.WriteLine();
Console.Error.WriteLine("PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE");
Console.Error.WriteLine();
+ Console.Error.WriteLine(System.Reflection.Assembly.GetExecutingAssembly().FullName);
+ Console.Error.WriteLine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
+ Console.Error.WriteLine("{0} {1}-bit", Environment.Version, IntPtr.Size * 8);
+ Console.Error.WriteLine();
Console.Error.WriteLine(x);
return 2;
}
@@ -349,13 +369,13 @@ sealed class IkvmcCompiler
}
else
{
- SetStrongNameKeyPair(ref options.keyPair, options.keyfile, true);
+ SetStrongNameKeyPair(ref options.keyPair, options.keyfile, null);
}
}
else if (options.keycontainer != null)
{
StrongNameKeyPair keyPair = null;
- SetStrongNameKeyPair(ref keyPair, options.keycontainer, false);
+ SetStrongNameKeyPair(ref keyPair, null, options.keycontainer);
if (options.delaysign)
{
options.publicKey = keyPair.PublicKey;
@@ -368,15 +388,15 @@ sealed class IkvmcCompiler
}
}
- internal static byte[] ReadAllBytes(string path)
+ internal static byte[] ReadAllBytes(FileInfo path)
{
try
{
- return File.ReadAllBytes(path);
+ return File.ReadAllBytes(path.FullName);
}
catch (Exception x)
{
- throw new FatalCompilerErrorException(Message.ErrorReadingFile, path, x.Message);
+ throw new FatalCompilerErrorException(Message.ErrorReadingFile, path.ToString(), x.Message);
}
}
@@ -494,6 +514,7 @@ sealed class IkvmcCompiler
Console.Error.WriteLine("-nostdlib Do not reference standard libraries");
Console.Error.WriteLine("-lib:<dir> Additional directories to search for references");
Console.Error.WriteLine("-highentropyva Enable high entropy ASLR");
+ Console.Error.WriteLine("-static Disable dynamic binding");
}
void ParseCommandLine(IEnumerator<string> arglist, List<CompilerOptions> targets, CompilerOptions options)
@@ -516,13 +537,11 @@ sealed class IkvmcCompiler
{
if (!nonleaf)
{
- ReadFiles(fileNames);
+ ReadFiles(options, fileNames);
nonleaf = true;
}
IkvmcCompiler nestedLevel = new IkvmcCompiler();
nestedLevel.manifestMainClass = manifestMainClass;
- nestedLevel.classes = new Dictionary<string, ClassItem>(classes);
- nestedLevel.resources = CompilerOptions.Copy(resources);
nestedLevel.defaultAssemblyName = defaultAssemblyName;
nestedLevel.classesToExclude = new List<string>(classesToExclude);
nestedLevel.ContinueParseCommandLine(arglist, targets, options.Copy());
@@ -539,7 +558,7 @@ sealed class IkvmcCompiler
{
if(s.StartsWith("-out:"))
{
- options.path = s.Substring(5);
+ options.path = GetFileInfo(s.Substring(5));
}
else if(s.StartsWith("-Xtrace:"))
{
@@ -681,10 +700,11 @@ sealed class IkvmcCompiler
catch(IOException)
{
}
+ bool found;
if(exists)
{
DirectoryInfo dir = new DirectoryInfo(spec);
- Recurse(dir, dir, "*");
+ found = Recurse(options, dir, dir, "*");
}
else
{
@@ -693,11 +713,11 @@ sealed class IkvmcCompiler
DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(spec));
if(dir.Exists)
{
- Recurse(dir, dir, Path.GetFileName(spec));
+ found = Recurse(options, dir, dir, Path.GetFileName(spec));
}
else
{
- RecurseJar(spec);
+ found = RecurseJar(options, spec);
}
}
catch(PathTooLongException)
@@ -713,6 +733,10 @@ sealed class IkvmcCompiler
throw new FatalCompilerErrorException(Message.InvalidPath, spec);
}
}
+ if(!found)
+ {
+ throw new FatalCompilerErrorException(Message.FileNotFound, spec);
+ }
}
else if(s.StartsWith("-resource:"))
{
@@ -721,7 +745,7 @@ sealed class IkvmcCompiler
{
throw new FatalCompilerErrorException(Message.InvalidOptionSyntax, s);
}
- AddResource(null, spec[0].TrimStart('/'), ReadAllBytes(spec[1]), null);
+ options.GetResourcesJar().Add(spec[0].TrimStart('/'), ReadAllBytes(GetFileInfo(spec[1])), null);
}
else if(s.StartsWith("-externalresource:"))
{
@@ -767,15 +791,15 @@ sealed class IkvmcCompiler
}
else if(s.StartsWith("-win32icon:"))
{
- options.iconfile = s.Substring(11);
+ options.iconfile = GetFileInfo(s.Substring(11));
}
else if(s.StartsWith("-win32manifest:"))
{
- options.manifestFile = s.Substring(15);
+ options.manifestFile = GetFileInfo(s.Substring(15));
}
else if(s.StartsWith("-keyfile:"))
{
- options.keyfile = s.Substring(9);
+ options.keyfile = GetFileInfo(s.Substring(9));
}
else if(s.StartsWith("-key:"))
{
@@ -795,7 +819,7 @@ sealed class IkvmcCompiler
}
else if(s.StartsWith("-remap:"))
{
- options.remapfile = s.Substring(7);
+ options.remapfile = GetFileInfo(s.Substring(7));
}
else if(s == "-nostacktraceinfo")
{
@@ -924,10 +948,10 @@ sealed class IkvmcCompiler
}
else if(s.StartsWith("-writeSuppressWarningsFile:"))
{
- options.writeSuppressWarningsFile = s.Substring(27);
+ options.writeSuppressWarningsFile = GetFileInfo(s.Substring(27));
try
{
- File.Delete(options.writeSuppressWarningsFile);
+ options.writeSuppressWarningsFile.Delete();
}
catch(Exception x)
{
@@ -947,6 +971,18 @@ sealed class IkvmcCompiler
{
// Ignore. This is handled earlier.
}
+ else if(s == "-XX:+AllowNonVirtualCalls")
+ {
+ JVM.AllowNonVirtualCalls = true;
+ }
+ else if(s == "-static")
+ {
+ options.codegenoptions |= CodeGenOptions.DisableDynamicBinding;
+ }
+ else if(s == "-nojarstubs") // undocumented temporary option to mitigate risk
+ {
+ options.nojarstubs = true;
+ }
else
{
throw new FatalCompilerErrorException(Message.UnrecognizedOption, s);
@@ -965,10 +1001,10 @@ sealed class IkvmcCompiler
{
return;
}
- ReadFiles(fileNames);
+ ReadFiles(options, fileNames);
if(options.assembly == null)
{
- string basename = options.path == null ? defaultAssemblyName : new FileInfo(options.path).Name;
+ string basename = options.path == null ? defaultAssemblyName : options.path.Name;
if(basename == null)
{
throw new FatalCompilerErrorException(Message.NoOutputFileSpecified);
@@ -985,7 +1021,7 @@ sealed class IkvmcCompiler
}
if(options.path != null && options.guessFileKind)
{
- if(options.path.ToLower().EndsWith(".dll"))
+ if(options.path.Extension.Equals(".dll", StringComparison.OrdinalIgnoreCase))
{
options.target = PEFileKinds.Dll;
}
@@ -996,13 +1032,42 @@ sealed class IkvmcCompiler
StaticCompiler.IssueMessage(options, Message.MainMethodFromManifest, manifestMainClass);
options.mainClass = manifestMainClass;
}
- options.classes = classes;
- options.resources = resources;
options.classesToExclude = classesToExclude.ToArray();
targets.Add(options);
}
- private void ReadFiles(List<string> fileNames)
+ internal static FileInfo GetFileInfo(string path)
+ {
+ try
+ {
+ FileInfo fileInfo = new FileInfo(path);
+ if (fileInfo.Directory == null)
+ {
+ // this happens with an incorrect unc path (e.g. "\\foo\bar")
+ throw new FatalCompilerErrorException(Message.InvalidPath, path);
+ }
+ return fileInfo;
+ }
+ catch (ArgumentException)
+ {
+ throw new FatalCompilerErrorException(Message.InvalidPath, path);
+ }
+ catch (NotSupportedException)
+ {
+ throw new FatalCompilerErrorException(Message.InvalidPath, path);
+ }
+ catch (PathTooLongException)
+ {
+ throw new FatalCompilerErrorException(Message.PathTooLong, path);
+ }
+ catch (UnauthorizedAccessException)
+ {
+ // this exception does not appear to be possible
+ throw new FatalCompilerErrorException(Message.InvalidPath, path);
+ }
+ }
+
+ private void ReadFiles(CompilerOptions options, List<string> fileNames)
{
foreach (string fileName in fileNames)
{
@@ -1017,6 +1082,12 @@ sealed class IkvmcCompiler
// if the filename contains a wildcard (or any other invalid character), we ignore
// it as a potential default assembly name
}
+ catch (NotSupportedException)
+ {
+ }
+ catch (PathTooLongException)
+ {
+ }
}
string[] files = null;
try
@@ -1033,7 +1104,7 @@ sealed class IkvmcCompiler
{
foreach (string f in files)
{
- ProcessFile(null, f);
+ ProcessFile(options, null, f);
}
}
}
@@ -1077,24 +1148,24 @@ sealed class IkvmcCompiler
return false;
}
- static void SetStrongNameKeyPair(ref StrongNameKeyPair strongNameKeyPair, string fileNameOrKeyContainer, bool file)
+ static void SetStrongNameKeyPair(ref StrongNameKeyPair strongNameKeyPair, FileInfo keyFile, string keyContainer)
{
try
{
- if (file)
+ if (keyFile != null)
{
- strongNameKeyPair = new StrongNameKeyPair(File.ReadAllBytes(fileNameOrKeyContainer));
+ strongNameKeyPair = new StrongNameKeyPair(ReadAllBytes(keyFile));
}
else
{
- strongNameKeyPair = new StrongNameKeyPair(fileNameOrKeyContainer);
+ strongNameKeyPair = new StrongNameKeyPair(keyContainer);
}
// FXBUG we explicitly try to access the public key force a check (the StrongNameKeyPair constructor doesn't validate the key)
if (strongNameKeyPair.PublicKey != null) { }
}
catch (Exception x)
{
- throw new FatalCompilerErrorException(Message.InvalidStrongNameKeyPair, file ? "file" : "container", x.Message);
+ throw new FatalCompilerErrorException(Message.InvalidStrongNameKeyPair, keyFile != null ? "file" : "container", x.Message);
}
}
@@ -1123,6 +1194,40 @@ sealed class IkvmcCompiler
}
}
}
+ // verify that we didn't reference any secondary assemblies of a shared class loader group
+ foreach (CompilerOptions target in targets)
+ {
+ if (target.references != null)
+ {
+ foreach (Assembly asm in target.references)
+ {
+ Type forwarder = asm.GetType("__<MainAssembly>");
+ if (forwarder != null && forwarder.Assembly != asm)
+ {
+ StaticCompiler.IssueMessage(Message.NonPrimaryAssemblyReference, asm.Location, forwarder.Assembly.GetName().Name);
+ }
+ }
+ }
+ }
+ // add legacy references (from stub files)
+ foreach (CompilerOptions target in targets)
+ {
+ foreach (string assemblyName in target.legacyStubReferences.Keys)
+ {
+ ArrayAppend(ref target.references, resolver.LegacyLoad(new AssemblyName(assemblyName), null));
+ }
+ }
+ // now pre-load the secondary assemblies of any shared class loader groups
+ foreach (CompilerOptions target in targets)
+ {
+ if (target.references != null)
+ {
+ foreach (Assembly asm in target.references)
+ {
+ AssemblyClassLoader.PreloadExportedAssemblies(asm);
+ }
+ }
+ }
}
private static void ArrayAppend<T>(ref T[] array, T element)
@@ -1152,160 +1257,198 @@ sealed class IkvmcCompiler
return buf;
}
- private void AddClassFile(ZipEntry zipEntry, string filename, byte[] buf, bool addResourceFallback, string jar)
+ private static bool EmitStubWarning(CompilerOptions options, byte[] buf)
{
+ ClassFile cf;
try
{
- string name = ClassFile.GetClassName(buf, 0, buf.Length);
- if(classes.ContainsKey(name))
- {
- StaticCompiler.IssueMessage(Message.DuplicateClassName, name);
- }
- else
+ cf = new ClassFile(buf, 0, buf.Length, "<unknown>", ClassFileParseOptions.None);
+ }
+ catch (ClassFormatError)
+ {
+ return false;
+ }
+ if (cf.IKVMAssemblyAttribute == null)
+ {
+ return false;
+ }
+ if (cf.IKVMAssemblyAttribute.StartsWith("[["))
+ {
+ Regex r = new Regex(@"\[([^\[\]]+)\]");
+ MatchCollection mc = r.Matches(cf.IKVMAssemblyAttribute);
+ foreach (Match m in mc)
{
- ClassItem item;
- item.data = buf;
- item.path = zipEntry == null ? filename : null;
- classes.Add(name, item);
+ options.legacyStubReferences[m.Groups[1].Value] = null;
+ StaticCompiler.IssueMessage(options, Message.StubsAreDeprecated, m.Groups[1].Value);
}
}
- catch(ClassFormatError x)
+ else
+ {
+ options.legacyStubReferences[cf.IKVMAssemblyAttribute] = null;
+ StaticCompiler.IssueMessage(options, Message.StubsAreDeprecated, cf.IKVMAssemblyAttribute);
+ }
+ return true;
+ }
+
+ private static bool IsStubLegacy(CompilerOptions options, ZipEntry ze, byte[] data)
+ {
+ if (ze.Name.EndsWith(".class", StringComparison.OrdinalIgnoreCase))
{
- if(addResourceFallback)
+ try
{
- // not a class file, so we include it as a resource
- // (IBM's db2os390/sqlj jars apparantly contain such files)
- StaticCompiler.IssueMessage(Message.NotAClassFile, filename, x.Message);
- AddResource(zipEntry, filename, buf, jar);
+ bool stub;
+ string name = ClassFile.GetClassName(data, 0, data.Length, out stub);
+ if (stub && EmitStubWarning(options, data))
+ {
+ // we use stubs to add references, but otherwise ignore them
+ return true;
+ }
}
- else
+ catch (ClassFormatError)
{
- StaticCompiler.IssueMessage(Message.ClassFormatError, filename, x.Message);
}
}
+ return false;
}
- private void ProcessZipFile(string file, Predicate<ZipEntry> filter)
+ private void ProcessManifest(CompilerOptions options, ZipFile zf, ZipEntry ze)
{
- string jar = Path.GetFileName(file);
- ZipFile zf = new ZipFile(file);
- try
+ if (manifestMainClass == null)
{
- foreach(ZipEntry ze in zf)
+ // read main class from manifest
+ // TODO find out if we can use other information from manifest
+ StreamReader rdr = new StreamReader(zf.GetInputStream(ze));
+ string line;
+ while ((line = rdr.ReadLine()) != null)
{
- if(filter != null && !filter(ze))
- {
- // skip
- }
- else if(ze.IsDirectory)
+ if (line.StartsWith("Main-Class: "))
{
- AddResource(ze, ze.Name, null, jar);
- }
- else if(ze.Name.ToLower().EndsWith(".class"))
- {
- AddClassFile(ze, ze.Name, ReadFromZip(zf, ze), true, jar);
+ line = line.Substring(12);
+ string continuation;
+ while ((continuation = rdr.ReadLine()) != null
+ && continuation.StartsWith(" ", StringComparison.Ordinal))
+ {
+ line += continuation.Substring(1);
+ }
+ manifestMainClass = line.Replace('/', '.');
+ break;
}
- else
+ }
+ }
+ }
+
+ private bool ProcessZipFile(CompilerOptions options, string file, Predicate<ZipEntry> filter)
+ {
+ try
+ {
+ ZipFile zf = new ZipFile(file);
+ try
+ {
+ bool found = false;
+ Jar jar = null;
+ foreach (ZipEntry ze in zf)
{
- // if it's not a class, we treat it as a resource and the manifest
- // is examined to find the Main-Class
- if(ze.Name == "META-INF/MANIFEST.MF" && manifestMainClass == null)
+ if (filter != null && !filter(ze))
+ {
+ // skip
+ }
+ else
{
- // read main class from manifest
- // TODO find out if we can use other information from manifest
- StreamReader rdr = new StreamReader(zf.GetInputStream(ze));
- string line;
- while((line = rdr.ReadLine()) != null)
+ found = true;
+ byte[] data = ReadFromZip(zf, ze);
+ if (IsStubLegacy(options, ze, data))
{
- if(line.StartsWith("Main-Class: "))
- {
- line = line.Substring(12);
- string continuation;
- while((continuation = rdr.ReadLine()) != null
- && continuation.StartsWith(" ", StringComparison.Ordinal))
- {
- line += continuation.Substring(1);
- }
- manifestMainClass = line.Replace('/', '.');
- break;
- }
+ continue;
+ }
+ if (jar == null)
+ {
+ jar = options.GetJar(zf);
+ }
+ jar.Add(ze, data);
+ if (ze.Name == "META-INF/MANIFEST.MF")
+ {
+ ProcessManifest(options, zf, ze);
}
}
- AddResource(ze, ze.Name, ReadFromZip(zf, ze), jar);
}
+ // include empty zip file if it has a comment
+ if (!found && !string.IsNullOrEmpty(zf.ZipFileComment))
+ {
+ options.GetJar(zf);
+ }
+ return found;
+ }
+ finally
+ {
+ zf.Close();
}
}
- finally
+ catch (ICSharpCode.SharpZipLib.SharpZipBaseException x)
{
- zf.Close();
+ throw new FatalCompilerErrorException(Message.ErrorReadingFile, file, x.Message);
}
}
- private void AddResource(ZipEntry zipEntry, string name, byte[] buf, string jar)
+ private void ProcessFile(CompilerOptions options, DirectoryInfo baseDir, string file)
{
- List<ResourceItem> list;
- if (!resources.TryGetValue(name, out list))
+ FileInfo fileInfo = GetFileInfo(file);
+ if (fileInfo.Extension.Equals(".jar", StringComparison.OrdinalIgnoreCase) || fileInfo.Extension.Equals(".zip", StringComparison.OrdinalIgnoreCase))
{
- list = new List<ResourceItem>();
- resources.Add(name, list);
+ ProcessZipFile(options, file, null);
}
- ResourceItem item = new ResourceItem();
- item.zipEntry = zipEntry;
- item.data = buf;
- item.jar = jar ?? "resources.jar";
- list.Add(item);
- }
-
- private void ProcessFile(DirectoryInfo baseDir, string file)
- {
- switch(new FileInfo(file).Extension.ToLower())
+ else
{
- case ".class":
- AddClassFile(null, file, ReadAllBytes(file), false, null);
- break;
- case ".jar":
- case ".zip":
+ if (fileInfo.Extension.Equals(".class", StringComparison.OrdinalIgnoreCase))
+ {
+ byte[] data = ReadAllBytes(fileInfo);
try
{
- ProcessZipFile(file, null);
+ bool stub;
+ string name = ClassFile.GetClassName(data, 0, data.Length, out stub);
+ if (stub && EmitStubWarning(options, data))
+ {
+ // we use stubs to add references, but otherwise ignore them
+ return;
+ }
+ options.GetClassesJar().Add(name.Replace('.', '/') + ".class", data, fileInfo);
+ return;
}
- catch(ICSharpCode.SharpZipLib.SharpZipBaseException x)
+ catch (ClassFormatError x)
{
- throw new FatalCompilerErrorException(Message.ErrorReadingFile, file, x.Message);
+ StaticCompiler.IssueMessage(Message.ClassFormatError, file, x.Message);
}
- break;
- default:
+ }
+ if (baseDir == null)
{
- if(baseDir == null)
- {
- StaticCompiler.IssueMessage(Message.UnknownFileType, file);
- }
- else
- {
- // include as resource
- // extract the resource name by chopping off the base directory
- string name = file.Substring(baseDir.FullName.Length);
- name = name.TrimStart(Path.DirectorySeparatorChar).Replace('\\', '/');
- AddResource(null, name, ReadAllBytes(file), null);
- }
- break;
+ StaticCompiler.IssueMessage(Message.UnknownFileType, file);
+ }
+ else
+ {
+ // include as resource
+ // extract the resource name by chopping off the base directory
+ string name = file.Substring(baseDir.FullName.Length);
+ name = name.TrimStart(Path.DirectorySeparatorChar).Replace('\\', '/');
+ options.GetResourcesJar().Add(name, ReadAllBytes(fileInfo), null);
}
}
}
- private void Recurse(DirectoryInfo baseDir, DirectoryInfo dir, string spec)
+ private bool Recurse(CompilerOptions options, DirectoryInfo baseDir, DirectoryInfo dir, string spec)
{
+ bool found = false;
foreach(FileInfo file in dir.GetFiles(spec))
{
- ProcessFile(baseDir, file.FullName);
+ found = true;
+ ProcessFile(options, baseDir, file.FullName);
}
foreach(DirectoryInfo sub in dir.GetDirectories())
{
- Recurse(baseDir, sub, spec);
+ found |= Recurse(options, baseDir, sub, spec);
}
+ return found;
}
- private void RecurseJar(string path)
+ private bool RecurseJar(CompilerOptions options, string path)
{
string file = "";
for (; ; )
@@ -1320,13 +1463,12 @@ sealed class IkvmcCompiler
{
string pathFilter = Path.GetDirectoryName(file) + Path.DirectorySeparatorChar;
string fileFilter = "^" + Regex.Escape(Path.GetFileName(file)).Replace("\\*", ".*").Replace("\\?", ".") + "$";
- ProcessZipFile(path, delegate(ZipEntry ze) {
+ return ProcessZipFile(options, path, delegate(ZipEntry ze) {
// MONOBUG Path.GetDirectoryName() doesn't normalize / to \ on Windows
string name = ze.Name.Replace('/', Path.DirectorySeparatorChar);
return (Path.GetDirectoryName(name) + Path.DirectorySeparatorChar).StartsWith(pathFilter)
&& Regex.IsMatch(Path.GetFileName(ze.Name), fileFilter);
});
- return;
}
}
}
diff --git a/external/ikvm/ikvmc/CompilerClassLoader.cs b/external/ikvm/ikvmc/CompilerClassLoader.cs
index 2da8962..5f8d1d5 100644
--- a/external/ikvm/ikvmc/CompilerClassLoader.cs
+++ b/external/ikvm/ikvmc/CompilerClassLoader.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -23,9 +23,6 @@
*/
using System;
-using IKVM.Reflection;
-using IKVM.Reflection.Emit;
-using Type = IKVM.Reflection.Type;
using System.Resources;
using System.IO;
using System.Collections.Generic;
@@ -34,17 +31,20 @@ using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Text;
using System.Threading;
-using IKVM.Attributes;
-
using System.Security.Permissions;
using System.Security;
using System.Runtime.CompilerServices;
+using ICSharpCode.SharpZipLib.Zip;
+using IKVM.Attributes;
+using IKVM.Reflection;
+using IKVM.Reflection.Emit;
+using Type = IKVM.Reflection.Type;
namespace IKVM.Internal
{
sealed class CompilerClassLoader : ClassLoaderWrapper
{
- private Dictionary<string, ClassItem> classes;
+ private Dictionary<string, JarItemReference> classes;
private Dictionary<string, RemapperTypeWrapper> remapped = new Dictionary<string, RemapperTypeWrapper>();
private string assemblyName;
private string assemblyFile;
@@ -69,20 +69,18 @@ namespace IKVM.Internal
private List<string> classesToCompile;
private List<CompilerClassLoader> peerReferences = new List<CompilerClassLoader>();
private Dictionary<string, string> peerLoading = new Dictionary<string, string>();
- private Dictionary<string, TypeWrapper> importedStubTypes = new Dictionary<string, TypeWrapper>();
private List<ClassLoaderWrapper> internalsVisibleTo = new List<ClassLoaderWrapper>();
private List<TypeWrapper> dynamicallyImportedTypes = new List<TypeWrapper>();
private List<string> jarList = new List<string>();
private List<TypeWrapper> allwrappers;
- internal CompilerClassLoader(AssemblyClassLoader[] referencedAssemblies, CompilerOptions options, string path, bool targetIsModule, string assemblyName, Dictionary<string, ClassItem> classes)
+ internal CompilerClassLoader(AssemblyClassLoader[] referencedAssemblies, CompilerOptions options, FileInfo assemblyPath, bool targetIsModule, string assemblyName, Dictionary<string, JarItemReference> classes)
: base(options.codegenoptions, null)
{
this.referencedAssemblies = referencedAssemblies;
this.options = options;
this.classes = classes;
this.assemblyName = assemblyName;
- FileInfo assemblyPath = new FileInfo(path);
this.assemblyFile = assemblyPath.Name;
this.assemblyDir = assemblyPath.DirectoryName;
this.targetIsModule = targetIsModule;
@@ -170,6 +168,11 @@ namespace IKVM.Internal
{
moduleBuilder.__DllCharacteristics |= DllCharacteristics.HighEntropyVA;
}
+ // allow the runtime to "inject" dynamic classes into the assembly
+ string mainAssemblyName = options.sharedclassloader != null && options.sharedclassloader[0] != this
+ ? options.sharedclassloader[0].assemblyName
+ : assemblyName;
+ AttributeHelper.SetInternalsVisibleToAttribute(assemblyBuilder, mainAssemblyName + DynamicClassLoader.DynamicAssemblySuffixAndPublicKey);
return moduleBuilder;
}
@@ -222,19 +225,19 @@ namespace IKVM.Internal
}
// HACK the peer loading mess above may have indirectly loaded the classes without returning it,
// so we try once more here
- tw1 = GetLoadedClass(name);
+ tw1 = FindLoadedClass(name);
if(tw1 != null)
{
return tw1;
}
- return LoadGenericClass(name);
+ return FindOrLoadGenericClass(name, false);
}
private TypeWrapper PeerLoad(string name)
{
// To keep the performance acceptable in cases where we're compiling many targets, we first check if the load can
// possibly succeed on this class loader, otherwise we'll end up doing a lot of futile recursive loading attempts.
- if(classes.ContainsKey(name) || remapped.ContainsKey(name) || GetLoadedClass(name) != null)
+ if(classes.ContainsKey(name) || remapped.ContainsKey(name) || FindLoadedClass(name) != null)
{
TypeWrapper tw = LoadClassByDottedNameFast(name);
// HACK we don't want to load classes referenced by peers, hence the "== this" check
@@ -269,10 +272,11 @@ namespace IKVM.Internal
}
else
{
- ClassItem classdef;
- if(classes.TryGetValue(name, out classdef))
+ JarItemReference itemRef;
+ if(classes.TryGetValue(name, out itemRef))
{
classes.Remove(name);
+ JarItem classdef = itemRef.Jar.Items[itemRef.Index];
ClassFile f;
try
{
@@ -285,9 +289,16 @@ namespace IKVM.Internal
}
catch(ClassFormatError x)
{
+ StaticCompiler.SuppressWarning(options, Message.ClassNotFound, name);
StaticCompiler.IssueMessage(options, Message.ClassFormatError, name, x.Message);
return null;
}
+ if(f.Name != name)
+ {
+ StaticCompiler.SuppressWarning(options, Message.ClassNotFound, name);
+ StaticCompiler.IssueMessage(options, Message.WrongClassName, name, f.Name);
+ return null;
+ }
if(options.removeUnusedFields)
{
f.RemoveUnusedFields();
@@ -334,7 +345,7 @@ namespace IKVM.Internal
{
if(classdef.path != null)
{
- string sourceFile = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(classdef.path), f.SourceFileAttribute));
+ string sourceFile = Path.GetFullPath(Path.Combine(classdef.path.DirectoryName, f.SourceFileAttribute));
if(File.Exists(sourceFile))
{
f.SourcePath = sourceFile;
@@ -357,38 +368,39 @@ namespace IKVM.Internal
}
try
{
- TypeWrapper type = DefineClass(f, null);
- if(f.IKVMAssemblyAttribute != null)
- {
- importedStubTypes.Add(f.Name, type);
- }
- return type;
+ TypeWrapper tw = DefineClass(f, null);
+ // we successfully created the type, so we don't need to include the class as a resource
+ itemRef.Jar.Items[itemRef.Index] = options.nojarstubs
+ ? new JarItem() // null entry
+ : new JarItem(itemRef.Jar.Items[itemRef.Index].zipEntry, null, null); // create a stub class pseudo resource
+ return tw;
}
catch (ClassFormatError x)
{
StaticCompiler.IssueMessage(options, Message.ClassFormatError, name, x.Message);
- return null;
}
catch (IllegalAccessError x)
{
StaticCompiler.IssueMessage(options, Message.IllegalAccessError, name, x.Message);
- return null;
}
catch (VerifyError x)
{
StaticCompiler.IssueMessage(options, Message.VerificationError, name, x.Message);
- return null;
}
catch (NoClassDefFoundError x)
{
- StaticCompiler.IssueMessage(options, Message.NoClassDefFoundError, name, x.Message);
- return null;
+ if ((options.codegenoptions & CodeGenOptions.DisableDynamicBinding) != 0)
+ {
+ StaticCompiler.IssueMessage(options, Message.NoClassDefFoundError, name, x.Message);
+ }
+ StaticCompiler.IssueMessage(options, Message.ClassNotFound, x.Message);
}
catch (RetargetableJavaException x)
{
StaticCompiler.IssueMessage(options, Message.GenericUnableToCompileError, name, x.GetType().Name, x.Message);
- return null;
}
+ StaticCompiler.SuppressWarning(options, Message.ClassNotFound, name);
+ return null;
}
else
{
@@ -397,19 +409,6 @@ namespace IKVM.Internal
}
}
- internal override Type GetGenericTypeDefinition(string name)
- {
- foreach(AssemblyClassLoader loader in referencedAssemblies)
- {
- Type type = loader.GetGenericTypeDefinition(name);
- if(type != null)
- {
- return type;
- }
- }
- return null;
- }
-
// HACK when we're compiling multiple targets with -sharedclassloader, each target will have its own CompilerClassLoader,
// so we need to consider them equivalent (because they represent the same class loader).
internal bool IsEquivalentTo(ClassLoaderWrapper other)
@@ -469,8 +468,7 @@ namespace IKVM.Internal
}
name = sb.ToString();
}
- CustomAttributeBuilder cab = new CustomAttributeBuilder(JVM.Import(typeof(InternalsVisibleToAttribute)).GetConstructor(new Type[] { Types.String }), new object[] { name });
- this.assemblyBuilder.SetCustomAttribute(cab);
+ AttributeHelper.SetInternalsVisibleToAttribute(this.assemblyBuilder, name);
}
internal void SetMain(MethodInfo m, PEFileKinds target, Dictionary<string, string> props, bool noglobbing, Type apartmentAttributeType)
@@ -591,6 +589,10 @@ namespace IKVM.Internal
{
throw new FatalCompilerErrorException(Message.ErrorWritingFile, GetTypeWrapperFactory().ModuleBuilder.FullyQualifiedName, x.Message);
}
+ catch(UnauthorizedAccessException x)
+ {
+ throw new FatalCompilerErrorException(Message.ErrorWritingFile, GetTypeWrapperFactory().ModuleBuilder.FullyQualifiedName, x.Message);
+ }
}
else
{
@@ -603,6 +605,10 @@ namespace IKVM.Internal
{
throw new FatalCompilerErrorException(Message.ErrorWritingFile, Path.Combine(assemblyDir, assemblyFile), x.Message);
}
+ catch(UnauthorizedAccessException x)
+ {
+ throw new FatalCompilerErrorException(Message.ErrorWritingFile, Path.Combine(assemblyDir, assemblyFile), x.Message);
+ }
}
}
@@ -679,11 +685,14 @@ namespace IKVM.Internal
if (ccl != this)
{
ccl.AddWildcardExports(exportedNamesPerAssembly);
- if (ccl.options.resources != null)
+ foreach (Jar jar in ccl.options.jars)
{
- foreach (string name in ccl.options.resources.Keys)
+ foreach (JarItem item in jar.Items)
{
- AddExportMapEntry(exportedNamesPerAssembly, ccl, name);
+ if (item.zipEntry != null && item.data != null)
+ {
+ AddExportMapEntry(exportedNamesPerAssembly, ccl, item.zipEntry.Name);
+ }
}
}
if (ccl.options.externalResources != null)
@@ -721,78 +730,85 @@ namespace IKVM.Internal
this.GetTypeWrapperFactory().ModuleBuilder.DefineManifestResource("ikvm.exports", ms, ResourceAttributes.Public);
}
- internal void AddResources(Dictionary<string, List<ResourceItem>> resources, bool compressedResources)
+ private void WriteResources()
{
Tracer.Info(Tracer.Compiler, "CompilerClassLoader adding resources...");
// BUG we need to call GetTypeWrapperFactory() to make sure that the assemblyBuilder is created (when building an empty target)
ModuleBuilder moduleBuilder = this.GetTypeWrapperFactory().ModuleBuilder;
- Dictionary<string, Dictionary<string, ResourceItem>> jars = new Dictionary<string, Dictionary<string, ResourceItem>>();
- foreach (KeyValuePair<string, List<ResourceItem>> kv in resources)
+ for (int i = 0; i < options.jars.Count; i++)
{
- foreach (ResourceItem item in kv.Value)
+ bool hasEntries = false;
+ MemoryStream mem = new MemoryStream();
+ using (ZipOutputStream zip = new ZipOutputStream(mem))
{
- int count = 0;
- string jarName = item.jar;
- retry:
- Dictionary<string, ResourceItem> jar;
- if (!jars.TryGetValue(jarName, out jar))
+ if (!string.IsNullOrEmpty(options.jars[i].Comment))
{
- jar = new Dictionary<string, ResourceItem>();
- jars.Add(jarName, jar);
+ zip.SetComment(options.jars[i].Comment);
}
- if (jar.ContainsKey(kv.Key))
+ zip.SetLevel(9);
+ List<string> stubs = new List<string>();
+ foreach (JarItem item in options.jars[i].Items)
{
- jarName = Path.GetFileNameWithoutExtension(item.jar) + "-" + (count++) + Path.GetExtension(item.jar);
- goto retry;
- }
- jar.Add(kv.Key, item);
- }
- }
-
- foreach (KeyValuePair<string, Dictionary<string, ResourceItem>> jar in jars)
- {
- MemoryStream mem = new MemoryStream();
- using (ICSharpCode.SharpZipLib.Zip.ZipOutputStream zip = new ICSharpCode.SharpZipLib.Zip.ZipOutputStream(mem))
- {
- foreach (KeyValuePair<string, ResourceItem> kv in jar.Value)
- {
- ICSharpCode.SharpZipLib.Zip.ZipEntry zipEntry = new ICSharpCode.SharpZipLib.Zip.ZipEntry(kv.Key);
- if (kv.Value.zipEntry == null)
+ if (item.zipEntry == null)
{
- zipEntry.CompressionMethod = ICSharpCode.SharpZipLib.Zip.CompressionMethod.Stored;
+ continue;
}
- else
+ if (item.data == null)
{
- zipEntry.Comment = kv.Value.zipEntry.Comment;
- zipEntry.CompressionMethod = kv.Value.zipEntry.CompressionMethod;
- zipEntry.DosTime = kv.Value.zipEntry.DosTime;
- zipEntry.ExternalFileAttributes = kv.Value.zipEntry.ExternalFileAttributes;
- zipEntry.ExtraData = kv.Value.zipEntry.ExtraData;
- zipEntry.Flags = kv.Value.zipEntry.Flags;
+ // we don't want stub class pseudo resources for classes loaded from the file system
+ if (i != options.classesJar)
+ {
+ stubs.Add(item.zipEntry.Name);
+ }
+ continue;
}
- if (compressedResources || zipEntry.CompressionMethod != ICSharpCode.SharpZipLib.Zip.CompressionMethod.Stored)
+ ZipEntry zipEntry = new ZipEntry(item.zipEntry.Name);
+ zipEntry.Comment = item.zipEntry.Comment;
+ zipEntry.CompressionMethod = item.zipEntry.CompressionMethod;
+ zipEntry.DosTime = item.zipEntry.DosTime;
+ zipEntry.ExternalFileAttributes = item.zipEntry.ExternalFileAttributes;
+ zipEntry.ExtraData = item.zipEntry.ExtraData;
+ zipEntry.Flags = item.zipEntry.Flags;
+ if (options.compressedResources || zipEntry.CompressionMethod != CompressionMethod.Stored)
{
- zip.SetLevel(9);
- zipEntry.CompressionMethod = ICSharpCode.SharpZipLib.Zip.CompressionMethod.Deflated;
+ zipEntry.CompressionMethod = CompressionMethod.Deflated;
}
zip.PutNextEntry(zipEntry);
- if (kv.Value.data != null)
+ zip.Write(item.data, 0, item.data.Length);
+ zip.CloseEntry();
+ hasEntries = true;
+ }
+ if (stubs.Count != 0)
+ {
+ // generate the --ikvm-classes-- file in the jar
+ ZipEntry zipEntry = new ZipEntry(JVM.JarClassList);
+ zipEntry.CompressionMethod = CompressionMethod.Deflated;
+ zip.PutNextEntry(zipEntry);
+ BinaryWriter bw = new BinaryWriter(zip);
+ bw.Write(stubs.Count);
+ foreach (string classFile in stubs)
{
- zip.Write(kv.Value.data, 0, kv.Value.data.Length);
+ bw.Write(classFile);
}
+ bw.Flush();
zip.CloseEntry();
+ hasEntries = true;
}
}
- mem = new MemoryStream(mem.ToArray());
- string name = jar.Key;
- if (options.targetIsModule)
+ // don't include empty classes.jar
+ if (i != options.classesJar || hasEntries)
{
- name = Path.GetFileNameWithoutExtension(name) + "-" + moduleBuilder.ModuleVersionId.ToString("N") + Path.GetExtension(name);
+ mem = new MemoryStream(mem.ToArray());
+ string name = options.jars[i].Name;
+ if (options.targetIsModule)
+ {
+ name = Path.GetFileNameWithoutExtension(name) + "-" + moduleBuilder.ModuleVersionId.ToString("N") + Path.GetExtension(name);
+ }
+ jarList.Add(name);
+ moduleBuilder.DefineManifestResource(name, mem, ResourceAttributes.Public);
}
- jarList.Add(name);
- moduleBuilder.DefineManifestResource(name, mem, ResourceAttributes.Public);
}
}
@@ -865,7 +881,7 @@ namespace IKVM.Internal
}
internal RemapperTypeWrapper(CompilerClassLoader classLoader, IKVM.Internal.MapXml.Class c, IKVM.Internal.MapXml.Root map)
- : base((Modifiers)c.Modifiers, c.Name)
+ : base(TypeFlags.None, (Modifiers)c.Modifiers, c.Name)
{
this.classLoader = classLoader;
this.baseTypeWrapper = GetBaseWrapper(c);
@@ -913,7 +929,7 @@ namespace IKVM.Internal
}
if(classLoader.EmitStackTraceInfo)
{
- AttributeHelper.SetSourceFile(typeBuilder, Path.GetFileName(classLoader.options.remapfile));
+ AttributeHelper.SetSourceFile(typeBuilder, classLoader.options.remapfile.Name);
}
if(baseIsSealed)
@@ -1353,7 +1369,7 @@ namespace IKVM.Internal
else
{
MethodInfo overrideMethod = null;
- MethodAttributes attr = MapMethodAccessModifiers(m.Modifiers) | MethodAttributes.HideBySig;
+ MethodAttributes attr = m.MethodAttributes | MapMethodAccessModifiers(m.Modifiers) | MethodAttributes.HideBySig;
if((m.Modifiers & IKVM.Internal.MapXml.MapModifiers.Static) != 0)
{
attr |= MethodAttributes.Static;
@@ -1467,7 +1483,7 @@ namespace IKVM.Internal
}
}
}
- return false;
+ return m.Name.StartsWith("__<", StringComparison.Ordinal);
}
internal override void Finish()
@@ -2192,6 +2208,10 @@ namespace IKVM.Internal
{
if(c.Shadows != null)
{
+ if(classes.ContainsKey(c.Name))
+ {
+ StaticCompiler.IssueMessage(Message.DuplicateClassName, c.Name);
+ }
remapped.Add(c.Name, new RemapperTypeWrapper(this, c, map));
hasRemappedTypes = true;
}
@@ -2220,7 +2240,7 @@ namespace IKVM.Internal
{
if(c.Shadows != null)
{
- RemapperTypeWrapper typeWrapper = (RemapperTypeWrapper)remapped[c.Name];
+ RemapperTypeWrapper typeWrapper = remapped[c.Name];
typeWrapper.Process2ndPassStep1();
}
}
@@ -2228,7 +2248,7 @@ namespace IKVM.Internal
{
if(c.Shadows != null)
{
- RemapperTypeWrapper typeWrapper = (RemapperTypeWrapper)remapped[c.Name];
+ RemapperTypeWrapper typeWrapper = remapped[c.Name];
typeWrapper.Process2ndPassStep2(map);
}
}
@@ -2484,10 +2504,10 @@ namespace IKVM.Internal
{
// NOTE we don't support interfaces that inherit from other interfaces
// (actually, if they are explicitly listed it would probably work)
- TypeWrapper typeWrapper = GetLoadedClass(c.Name);
+ TypeWrapper typeWrapper = FindLoadedClass(c.Name);
foreach(IKVM.Internal.MapXml.Interface iface in c.Interfaces)
{
- TypeWrapper ifaceWrapper = GetLoadedClass(iface.Name);
+ TypeWrapper ifaceWrapper = FindLoadedClass(iface.Name);
if(ifaceWrapper == null || !ifaceWrapper.TypeAsTBD.IsAssignableFrom(typeWrapper.TypeAsTBD))
{
AddGhost(iface.Name, typeWrapper);
@@ -2647,10 +2667,10 @@ namespace IKVM.Internal
if (compilingCoreAssembly)
{
RuntimeHelperTypes.Create(compilers[0]);
- }
- foreach (CompilerClassLoader compiler in compilers)
- {
- compiler.EmitRemappedTypes2ndPass();
+ foreach (CompilerClassLoader compiler in compilers)
+ {
+ compiler.EmitRemappedTypes2ndPass();
+ }
}
foreach (CompilerClassLoader compiler in compilers)
{
@@ -2712,69 +2732,91 @@ namespace IKVM.Internal
}
}
List<object> assemblyAnnotations = new List<object>();
- Dictionary<string, string> baseClasses = new Dictionary<string, string>();
Tracer.Info(Tracer.Compiler, "Parsing class files");
- foreach(KeyValuePair<string, ClassItem> kv in options.classes)
+ // map the class names to jar entries
+ Dictionary<string, JarItemReference> h = new Dictionary<string, JarItemReference>();
+ List<string> classNames = new List<string>();
+ foreach (Jar jar in options.jars)
+ {
+ for (int i = 0; i < jar.Items.Count; i++)
+ {
+ string name = jar.Items[i].zipEntry.Name;
+ if (name.EndsWith(".class", StringComparison.Ordinal)
+ && name.Length > 6
+ && name.IndexOf('.') == name.Length - 6)
+ {
+ string className = name.Substring(0, name.Length - 6).Replace('/', '.');
+ if (options.IsExcludedClass(className))
+ {
+ // we don't compile the class and we also don't include it as a resource
+ jar.Items[i] = new JarItem();
+ }
+ else
+ {
+ if (h.ContainsKey(className))
+ {
+ StaticCompiler.IssueMessage(Message.DuplicateClassName, className);
+ JarItemReference itemRef = h[className];
+ if ((options.classesJar != -1 && itemRef.Jar == options.jars[options.classesJar]) || jar != itemRef.Jar)
+ {
+ // the previous class stays, because it was either in an earlier jar or we're processing the classes.jar
+ // which contains the classes loaded from the file system (where the first encountered class wins)
+ continue;
+ }
+ else
+ {
+ // we have a jar that contains multiple entries with the same name, the last one wins
+ h.Remove(className);
+ classNames.Remove(className);
+ }
+ }
+ h.Add(className, new JarItemReference(jar, i));
+ classNames.Add(className);
+ }
+ }
+ }
+ }
+ // now process all the classes to record the classes that are used as base classes and
+ // to look for assembly attribute annotations and the main method
+ Dictionary<string, string> baseClasses = new Dictionary<string, string>();
+ foreach (string className in classNames)
{
- ClassFile f;
try
{
- byte[] buf = kv.Value.data;
- f = new ClassFile(buf, 0, buf.Length, null, ClassFileParseOptions.None);
- if(!f.IsInterface && f.SuperClass != null)
+ JarItemReference itemRef = h[className];
+ byte[] buf = itemRef.Jar.Items[itemRef.Index].data;
+ ClassFile f = new ClassFile(buf, 0, buf.Length, null, ClassFileParseOptions.None);
+ if (!f.IsInterface && f.SuperClass != null)
{
baseClasses[f.SuperClass] = f.SuperClass;
}
// NOTE the "assembly" type in the unnamed package is a magic type
// that acts as the placeholder for assembly attributes
- if(f.Name == "assembly" && f.Annotations != null)
+ if (className == f.Name && f.Name == "assembly" && f.Annotations != null)
{
assemblyAnnotations.AddRange(f.Annotations);
+ // HACK remove "assembly" type that exists only as a placeholder for assembly attributes
+ h.Remove(f.Name);
+ itemRef.Jar.Items[itemRef.Index] = new JarItem();
+ continue;
}
- }
- catch(ClassFormatError)
- {
- continue;
- }
- if(options.mainClass == null && (options.guessFileKind || options.target != PEFileKinds.Dll))
- {
- foreach(ClassFile.Method m in f.Methods)
+ if (options.mainClass == null && (options.guessFileKind || options.target != PEFileKinds.Dll))
{
- if(m.IsPublic && m.IsStatic && m.Name == "main" && m.Signature == "([Ljava.lang.String;)V")
+ foreach (ClassFile.Method m in f.Methods)
{
- StaticCompiler.IssueMessage(Message.MainMethodFound, f.Name);
- options.mainClass = f.Name;
- break;
+ if (m.IsPublic && m.IsStatic && m.Name == "main" && m.Signature == "([Ljava.lang.String;)V")
+ {
+ StaticCompiler.IssueMessage(Message.MainMethodFound, f.Name);
+ options.mainClass = f.Name;
+ break;
+ }
}
}
}
- }
- Dictionary<string, ClassItem> h = new Dictionary<string, ClassItem>();
- // HACK remove "assembly" type that exists only as a placeholder for assembly attributes
- options.classes.Remove("assembly");
- foreach(KeyValuePair<string, ClassItem> kv in options.classes)
- {
- string name = kv.Key;
- bool excluded = false;
- for(int j = 0; j < options.classesToExclude.Length; j++)
- {
- if(Regex.IsMatch(name, options.classesToExclude[j]))
- {
- excluded = true;
- break;
- }
- }
- if(h.ContainsKey(name))
- {
- StaticCompiler.IssueMessage(Message.DuplicateClassName, name);
- excluded = true;
- }
- if(!excluded)
+ catch (ClassFormatError)
{
- h[name] = kv.Value;
}
}
- options.classes = null;
if(options.guessFileKind && options.mainClass == null)
{
@@ -2802,18 +2844,18 @@ namespace IKVM.Internal
{
if(options.targetIsModule)
{
- options.path = options.assembly + ".netmodule";
+ options.path = IkvmcCompiler.GetFileInfo(options.assembly + ".netmodule");
}
else
{
- options.path = options.assembly + ".dll";
+ options.path = IkvmcCompiler.GetFileInfo(options.assembly + ".dll");
}
}
else
{
- options.path = options.assembly + ".exe";
+ options.path = IkvmcCompiler.GetFileInfo(options.assembly + ".exe");
}
- StaticCompiler.IssueMessage(Message.OutputFileIs, options.path);
+ StaticCompiler.IssueMessage(Message.OutputFileIs, options.path.ToString());
}
if(options.targetIsModule)
@@ -2823,7 +2865,7 @@ namespace IKVM.Internal
throw new FatalCompilerErrorException(Message.ModuleCannotHaveClassLoader);
}
// TODO if we're overwriting a user specified assembly name, we need to emit a warning
- options.assembly = new FileInfo(options.path).Name;
+ options.assembly = options.path.Name;
}
Tracer.Info(Tracer.Compiler, "Constructing compiler");
@@ -2831,10 +2873,6 @@ namespace IKVM.Internal
for(int i = 0; i < references.Count; i++)
{
AssemblyClassLoader acl = AssemblyClassLoader.FromAssembly(references[i]);
- if (acl.MainAssembly != references[i])
- {
- StaticCompiler.IssueMessage(options, Message.NonPrimaryAssemblyReference, references[i].GetName().Name, acl.MainAssembly.GetName().Name);
- }
if (Array.IndexOf(referencedAssemblies, acl) != -1)
{
StaticCompiler.IssueMessage(options, Message.DuplicateAssemblyReference, acl.MainAssembly.FullName);
@@ -2854,7 +2892,7 @@ namespace IKVM.Internal
FileStream fs;
try
{
- fs = File.OpenRead(options.remapfile);
+ fs = options.remapfile.OpenRead();
}
catch(Exception x)
{
@@ -2904,6 +2942,7 @@ namespace IKVM.Internal
}
if(asm != null && IsCoreAssembly(asm))
{
+ AssemblyClassLoader.PreloadExportedAssemblies(asm);
JVM.CoreAssembly = asm;
break;
}
@@ -2945,24 +2984,6 @@ namespace IKVM.Internal
return asm;
}
- private bool IsStub(string className)
- {
- // this function is needed because when using generics a type may be loaded before the stub is seen
- // and without this check that would cause a spurious IKVMC0109 warning
- ClassItem classdef;
- if (classes.TryGetValue(className, out classdef))
- {
- try
- {
- return new ClassFile(classdef.data, 0, classdef.data.Length, className, ClassFileParseOptions.RelaxedClassNameValidation).IKVMAssemblyAttribute != null;
- }
- catch (ClassFormatError)
- {
- }
- }
- return false;
- }
-
private void CompilePass1()
{
Tracer.Info(Tracer.Compiler, "Compiling class files (1)");
@@ -2994,7 +3015,7 @@ namespace IKVM.Internal
ClassLoaderWrapper loader = wrapper.GetClassLoader();
if(loader != this)
{
- if(!(loader is GenericClassLoader || loader is CompilerClassLoader || (importedStubTypes.ContainsKey(s) && importedStubTypes[s] == wrapper) || IsStub(s)))
+ if(loader is AssemblyClassLoader)
{
StaticCompiler.IssueMessage(options, Message.SkippingReferencedClass, s, ((AssemblyClassLoader)loader).GetAssembly(wrapper).FullName);
}
@@ -3083,10 +3104,18 @@ namespace IKVM.Internal
{
LoadMappedExceptions(map);
Tracer.Info(Tracer.Compiler, "Loading remapped types (2)");
- FinishRemappedTypes();
+ try
+ {
+ FinishRemappedTypes();
+ }
+ catch (IKVM.Reflection.MissingMemberException x)
+ {
+ StaticCompiler.IssueMissingTypeMessage((Type)x.MemberInfo);
+ return 1;
+ }
}
Tracer.Info(Tracer.Compiler, "Compiling class files (2)");
- AddResources(options.resources, options.compressedResources);
+ WriteResources();
if(options.externalResources != null)
{
foreach(KeyValuePair<string, string> kv in options.externalResources)
@@ -3300,45 +3329,94 @@ namespace IKVM.Internal
}
}
- struct ClassItem
+ sealed class Jar
{
- internal byte[] data;
- internal string path;
+ internal readonly string Name;
+ internal readonly string Comment;
+ internal readonly List<JarItem> Items = new List<JarItem>();
+
+ internal Jar(string name, string comment)
+ {
+ this.Name = name;
+ this.Comment = comment;
+ }
+
+ internal Jar Copy()
+ {
+ Jar newJar = new Jar(Name, Comment);
+ newJar.Items.AddRange(Items);
+ return newJar;
+ }
+
+ internal void Add(ZipEntry ze, byte[] data)
+ {
+ Items.Add(new JarItem(ze, data, null));
+ }
+
+ internal void Add(string name, byte[] data, FileInfo fileInfo)
+ {
+ ZipEntry zipEntry = new ZipEntry(name);
+ zipEntry.CompressionMethod = CompressionMethod.Stored;
+ Items.Add(new JarItem(zipEntry, data, fileInfo));
+ }
}
- struct ResourceItem
+ struct JarItem
{
- internal ICSharpCode.SharpZipLib.Zip.ZipEntry zipEntry;
- internal byte[] data;
- internal string jar;
+ internal readonly ZipEntry zipEntry;
+ internal readonly byte[] data;
+ internal readonly FileInfo path; // path of the original file, if it was individual file (used to construct source file path)
+
+ internal JarItem(ZipEntry zipEntry, byte[] data, FileInfo path)
+ {
+ this.zipEntry = zipEntry;
+ this.data = data;
+ this.path = path;
+ }
+ }
+
+ struct JarItemReference
+ {
+ internal readonly Jar Jar;
+ internal readonly int Index;
+
+ internal JarItemReference(Jar jar, int index)
+ {
+ this.Jar = jar;
+ this.Index = index;
+ }
}
sealed class CompilerOptions
{
- internal string path;
- internal string keyfile;
+ internal List<Jar> jars = new List<Jar>();
+ private Dictionary<string, int> jarMap = new Dictionary<string, int>();
+ internal int classesJar = -1;
+ internal int resourcesJar = -1;
+ internal bool nojarstubs;
+ internal FileInfo path;
+ internal FileInfo keyfile;
internal string keycontainer;
internal bool delaysign;
internal byte[] publicKey;
internal StrongNameKeyPair keyPair;
internal Version version;
internal string fileversion;
- internal string iconfile;
- internal string manifestFile;
+ internal FileInfo iconfile;
+ internal FileInfo manifestFile;
internal bool targetIsModule;
internal string assembly;
internal string mainClass;
internal ApartmentState apartment;
internal PEFileKinds target;
internal bool guessFileKind;
- internal Dictionary<string, ClassItem> classes;
internal string[] unresolvedReferences; // only used during command line parsing
+ internal Dictionary<string, string> legacyStubReferences = new Dictionary<string,string>(); // only used during command line parsing
internal Assembly[] references;
internal string[] peerReferences;
internal bool crossReferenceAllPeers = true;
- internal Dictionary<string, List<ResourceItem>> resources;
internal string[] classesToExclude;
- internal string remapfile;
+ internal FileInfo remapfile;
internal Dictionary<string, string> props;
internal bool noglobbing;
internal CodeGenOptions codegenoptions;
@@ -3358,20 +3436,14 @@ namespace IKVM.Internal
internal Dictionary<string, string> suppressWarnings = new Dictionary<string, string>();
internal Dictionary<string, string> errorWarnings = new Dictionary<string, string>(); // treat specific warnings as errors
internal bool warnaserror; // treat all warnings as errors
- internal string writeSuppressWarningsFile;
+ internal FileInfo writeSuppressWarningsFile;
internal List<string> proxies = new List<string>();
internal CompilerOptions Copy()
{
CompilerOptions copy = (CompilerOptions)MemberwiseClone();
- if (classes != null)
- {
- copy.classes = new Dictionary<string, ClassItem>(classes);
- }
- if (resources != null)
- {
- copy.resources = Copy(resources);
- }
+ copy.jars = Copy(jars);
+ copy.jarMap = new Dictionary<string, int>(jarMap);
if (props != null)
{
copy.props = new Dictionary<string, string>(props);
@@ -3385,14 +3457,75 @@ namespace IKVM.Internal
return copy;
}
- internal static Dictionary<string, List<ResourceItem>> Copy(Dictionary<string, List<ResourceItem>> resources)
+ private static List<Jar> Copy(List<Jar> jars)
{
- Dictionary<string, List<ResourceItem>> copy = new Dictionary<string, List<ResourceItem>>();
- foreach (KeyValuePair<string, List<ResourceItem>> kv in resources)
+ List<Jar> newJars = new List<Jar>();
+ foreach (Jar jar in jars)
{
- copy.Add(kv.Key, new List<ResourceItem>(kv.Value));
+ newJars.Add(jar.Copy());
}
- return copy;
+ return newJars;
+ }
+
+ internal Jar GetJar(ZipFile zf)
+ {
+ int existingJar;
+ if (jarMap.TryGetValue(zf.Name, out existingJar))
+ {
+ return jars[existingJar];
+ }
+ jarMap.Add(zf.Name, jars.Count);
+ return CreateJar(Path.GetFileName(zf.Name), zf.ZipFileComment);
+ }
+
+ private Jar CreateJar(string jarName, string comment)
+ {
+ int count = 0;
+ string name = jarName;
+ retry:
+ foreach (Jar jar in jars)
+ {
+ if (jar.Name == name)
+ {
+ name = Path.GetFileNameWithoutExtension(jarName) + "-" + (++count) + Path.GetExtension(jarName);
+ goto retry;
+ }
+ }
+ Jar newJar = new Jar(name, comment);
+ jars.Add(newJar);
+ return newJar;
+ }
+
+ internal Jar GetClassesJar()
+ {
+ if (classesJar == -1)
+ {
+ classesJar = jars.Count;
+ CreateJar("classes.jar", null);
+ }
+ return jars[classesJar];
+ }
+
+ internal Jar GetResourcesJar()
+ {
+ if (resourcesJar == -1)
+ {
+ resourcesJar = jars.Count;
+ CreateJar("resources.jar", null);
+ }
+ return jars[resourcesJar];
+ }
+
+ internal bool IsExcludedClass(string className)
+ {
+ for (int i = 0; i < classesToExclude.Length; i++)
+ {
+ if (Regex.IsMatch(className, classesToExclude[i]))
+ {
+ return true;
+ }
+ }
+ return false;
}
}
@@ -3413,7 +3546,6 @@ namespace IKVM.Internal
NoClassDefFoundError = 105,
GenericUnableToCompileError = 106,
DuplicateResourceName = 107,
- NotAClassFile = 108,
SkippingReferencedClass = 109,
NoJniRuntime= 110,
EmittedNoClassDefFoundError = 111,
@@ -3436,8 +3568,10 @@ namespace IKVM.Internal
InterfaceMethodCantBeInternal = 128,
DllExportMustBeStaticMethod = 129,
DllExportRequiresSupportedPlatform = 130,
- NonPrimaryAssemblyReference = 131,
DuplicateAssemblyReference = 132,
+ UnableToResolveType = 133,
+ StubsAreDeprecated = 134,
+ WrongClassName = 135,
UnknownWarning = 999,
// This is where the errors start
StartErrors = 4000,
@@ -3453,6 +3587,9 @@ namespace IKVM.Internal
InvalidMemberSignatureInMapFile = 4010,
InvalidPropertyNameInMapFile = 4011,
InvalidPropertySignatureInMapFile = 4012,
+ NonPrimaryAssemblyReference = 4013,
+ MissingType = 4014,
+ MissingReference = 4015,
// Fatal errors
ResponseFileDepthExceeded = 5000,
ErrorReadingFile = 5001,
@@ -3507,19 +3644,40 @@ namespace IKVM.Internal
AssemblyContainsDuplicateClassNames = 5050,
CallerIDRequiresHasCallerIDAnnotation = 5051,
UnableToResolveInterface = 5052,
+ MissingBaseType = 5053,
+ MissingBaseTypeReference = 5054,
+ FileNotFound = 5055,
}
static class StaticCompiler
{
- internal static readonly Universe Universe = new Universe();
+ internal static readonly Universe Universe = new Universe(UniverseOptions.ResolveMissingMembers);
internal static Assembly runtimeAssembly;
internal static Assembly runtimeJniAssembly;
internal static CompilerOptions toplevel;
internal static int errorCount;
+ static StaticCompiler()
+ {
+ Universe.ResolvedMissingMember += ResolvedMissingMember;
+ }
+
+ private static void ResolvedMissingMember(Module requestingModule, MemberInfo member)
+ {
+ if (requestingModule != null && member is Type)
+ {
+ IssueMessage(Message.UnableToResolveType, requestingModule.Name, ((Type)member).FullName, member.Module.FullyQualifiedName);
+ }
+ }
+
internal static Assembly Load(string assemblyString)
{
- return Universe.Load(assemblyString);
+ Assembly asm = Universe.Load(assemblyString);
+ if (asm.__IsMissing)
+ {
+ throw new FileNotFoundException(assemblyString);
+ }
+ return asm;
}
internal static Assembly LoadFile(string path)
@@ -3577,22 +3735,28 @@ namespace IKVM.Internal
internal static void IssueMessage(CompilerOptions options, Message msgId, params string[] values)
{
- StringBuilder sb = new StringBuilder();
- sb.Append((int)msgId);
- if(values.Length > 0)
+ if (errorCount != 0 && msgId < Message.StartErrors)
{
- sb.Append(':').Append(values[0]);
+ // don't display any warnings after we've emitted an error message
+ return;
}
- string key = sb.ToString();
- if(options.suppressWarnings.ContainsKey(key)
- || options.suppressWarnings.ContainsKey(((int)msgId).ToString()))
+ string key = ((int)msgId).ToString();
+ for (int i = 0; ; i++)
{
- return;
+ if (options.suppressWarnings.ContainsKey(key))
+ {
+ return;
+ }
+ if (i == values.Length)
+ {
+ break;
+ }
+ key += ":" + values[i];
}
options.suppressWarnings.Add(key, key);
if(options.writeSuppressWarningsFile != null)
{
- File.AppendAllText(options.writeSuppressWarningsFile, "-nowarn:" + key + Environment.NewLine);
+ File.AppendAllText(options.writeSuppressWarningsFile.FullName, "-nowarn:" + key + Environment.NewLine);
}
string msg;
switch(msgId)
@@ -3638,10 +3802,6 @@ namespace IKVM.Internal
case Message.DuplicateResourceName:
msg = "Skipping resource (name clash): \"{0}\"";
break;
- case Message.NotAClassFile:
- msg = "Not a class file \"{0}\", including it as resource" + Environment.NewLine +
- " (class format error \"{1}\")";
- break;
case Message.SkippingReferencedClass:
msg = "Skipping class: \"{0}\"" + Environment.NewLine +
" (class is already available in referenced assembly \"{1}\")";
@@ -3724,11 +3884,26 @@ namespace IKVM.Internal
msg = "Ignoring @ikvm.lang.DllExport annotation due to unsupported target platform";
break;
case Message.NonPrimaryAssemblyReference:
- msg = "Referenced assembly \"{0}\" is not the primary assembly of a shared class loader group, referencing primary assembly \"{1}\" instead";
+ msg = "Referenced assembly \"{0}\" is not the primary assembly of a shared class loader group, please reference primary assembly \"{1}\" instead";
+ break;
+ case Message.MissingType:
+ msg = "Reference to type \"{0}\" claims it is defined in \"{1}\", but it could not be found";
+ break;
+ case Message.MissingReference:
+ msg = "The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'";
break;
case Message.DuplicateAssemblyReference:
msg = "Duplicate assembly reference \"{0}\"";
break;
+ case Message.UnableToResolveType:
+ msg = "Reference in \"{0}\" to type \"{1}\" claims it is defined in \"{2}\", but it could not be found";
+ break;
+ case Message.StubsAreDeprecated:
+ msg = "Compiling stubs is deprecated. Please add a reference to assembly \"{0}\" instead.";
+ break;
+ case Message.WrongClassName:
+ msg = "Unable to compile \"{0}\" (wrong name: \"{1}\")";
+ break;
case Message.UnableToCreateProxy:
msg = "Unable to create proxy \"{0}\"" + Environment.NewLine +
" (\"{1}\")";
@@ -3824,5 +3999,16 @@ namespace IKVM.Internal
}
return tw.Name + " (unknown assembly)";
}
+
+ internal static void IssueMissingTypeMessage(Type type)
+ {
+ type = ReflectUtil.GetMissingType(type);
+ StaticCompiler.IssueMessage(type.Assembly.__IsMissing ? Message.MissingReference : Message.MissingType, type.FullName, type.Assembly.FullName);
+ }
+
+ internal static void SuppressWarning(CompilerOptions options, Message message, string name)
+ {
+ options.suppressWarnings[(int)message + ":" + name] = null;
+ }
}
}
diff --git a/external/ikvm/ikvmc/Proxy.cs b/external/ikvm/ikvmc/Proxy.cs
index 99edb9a..14f8727 100644
--- a/external/ikvm/ikvmc/Proxy.cs
+++ b/external/ikvm/ikvmc/Proxy.cs
@@ -315,15 +315,15 @@ namespace IKVM.Internal
ilgen.Emit(OpCodes.Stloc, exception);
CodeEmitterLabel rethrow = ilgen.DefineLabel();
ilgen.Emit(OpCodes.Ldloc, exception);
- errorClass.EmitInstanceOf(null, ilgen);
+ errorClass.EmitInstanceOf(ilgen);
ilgen.EmitBrtrue(rethrow);
ilgen.Emit(OpCodes.Ldloc, exception);
- runtimeExceptionClass.EmitInstanceOf(null, ilgen);
+ runtimeExceptionClass.EmitInstanceOf(ilgen);
ilgen.EmitBrtrue(rethrow);
foreach (TypeWrapper tw in pm.exceptions)
{
ilgen.Emit(OpCodes.Ldloc, exception);
- tw.EmitInstanceOf(null, ilgen);
+ tw.EmitInstanceOf(ilgen);
ilgen.EmitBrtrue(rethrow);
}
ilgen.Emit(OpCodes.Ldloc, exception);
@@ -515,42 +515,42 @@ namespace IKVM.Internal
{
if (tw == PrimitiveTypeWrapper.BYTE)
{
- javaLangByte.EmitCheckcast(null, ilgen);
+ javaLangByte.EmitCheckcast(ilgen);
byteValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.BOOLEAN)
{
- javaLangBoolean.EmitCheckcast(null, ilgen);
+ javaLangBoolean.EmitCheckcast(ilgen);
booleanValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.SHORT)
{
- javaLangShort.EmitCheckcast(null, ilgen);
+ javaLangShort.EmitCheckcast(ilgen);
shortValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.CHAR)
{
- javaLangCharacter.EmitCheckcast(null, ilgen);
+ javaLangCharacter.EmitCheckcast(ilgen);
charValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.INT)
{
- javaLangInteger.EmitCheckcast(null, ilgen);
+ javaLangInteger.EmitCheckcast(ilgen);
intValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.FLOAT)
{
- javaLangFloat.EmitCheckcast(null, ilgen);
+ javaLangFloat.EmitCheckcast(ilgen);
floatValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.LONG)
{
- javaLangLong.EmitCheckcast(null, ilgen);
+ javaLangLong.EmitCheckcast(ilgen);
longValue.EmitCall(ilgen);
}
else if (tw == PrimitiveTypeWrapper.DOUBLE)
{
- javaLangDouble.EmitCheckcast(null, ilgen);
+ javaLangDouble.EmitCheckcast(ilgen);
doubleValue.EmitCall(ilgen);
}
else
diff --git a/external/ikvm/ikvmc/ikvmc.build b/external/ikvm/ikvmc/ikvmc.build
index 25761c8..af5dcb9 100644
--- a/external/ikvm/ikvmc/ikvmc.build
+++ b/external/ikvm/ikvmc/ikvmc.build
@@ -1,5 +1,7 @@
<?xml version="1.0"?>
<project name="ikvmc" default="ikvmc">
+ <include buildfile="../ikvm.include" />
+
<target name="ikvmc">
<property name="defs" value="TRACE;STATIC_COMPILER" />
<if test="${property::exists('signed')}">
@@ -8,7 +10,7 @@
<if test="${version::get-major(framework::get-version(framework::get-target-framework() )) == 4}">
<property name="defs" value="${defs};NET_4_0" />
</if>
- <csc target="exe" output="../bin/ikvmc.exe" optimize="true" define="${defs}">
+ <csc target="exe" output="../bin/ikvmc.exe" optimize="true" define="${defs}" noconfig="true" nostdlib="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="AotTypeWrapper.cs" />
@@ -50,8 +52,10 @@
<references>
<include name="../bin/ICSharpCode.SharpZipLib.dll" asis="true" />
<include name="../bin/IKVM.Reflection.dll" asis="true" />
- <!-- HACK mcs requires an explicit reference to System.Configuration -->
- <include name="${framework::get-assembly-directory(framework::get-target-framework())}/System.Configuration.dll" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
+ <include name="${ReferencePath}/System.Configuration.dll" />
+ <include name="${ReferencePath}/System.Xml.dll" />
</references>
</csc>
</target>
diff --git a/external/ikvm/ikvmc/remapper.cs b/external/ikvm/ikvmc/remapper.cs
index 7c489ad..ff12e8c 100644
--- a/external/ikvm/ikvmc/remapper.cs
+++ b/external/ikvm/ikvmc/remapper.cs
@@ -373,9 +373,7 @@ namespace IKVM.Internal.MapXml
if(typeWrapper.IsGhost || typeWrapper.IsGhostArray)
{
ilgen.Emit(OpCodes.Dup);
- // NOTE we pass a null context, but that shouldn't be a problem, because
- // typeWrapper should never be an UnloadableTypeWrapper
- typeWrapper.EmitInstanceOf(null, ilgen);
+ typeWrapper.EmitInstanceOf(ilgen);
CodeEmitterLabel endLabel = ilgen.DefineLabel();
ilgen.EmitBrtrue(endLabel);
ilgen.Emit(OpCodes.Pop);
@@ -406,9 +404,7 @@ namespace IKVM.Internal.MapXml
}
else
{
- // NOTE we pass a null context, but that shouldn't be a problem, because
- // typeWrapper should never be an UnloadableTypeWrapper
- typeWrapper.EmitCheckcast(null, ilgen);
+ typeWrapper.EmitCheckcast(ilgen);
}
}
}
diff --git a/external/ikvm/ikvmstub/ClassFileWriter.cs b/external/ikvm/ikvmstub/ClassFileWriter.cs
deleted file mode 100644
index 197746a..0000000
--- a/external/ikvm/ikvmstub/ClassFileWriter.cs
+++ /dev/null
@@ -1,927 +0,0 @@
-/*
- Copyright (C) 2002 Jeroen Frijters
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jeroen Frijters
- jeroen at frijters.net
-
-*/
-using System;
-using System.IO;
-using System.Collections;
-using IKVM.Attributes;
-
-namespace IKVM.StubGen
-{
- sealed class BigEndianStream
- {
- private Stream stream;
-
- public BigEndianStream(Stream stream)
- {
- this.stream = stream;
- }
-
- public void WriteUInt16(ushort s)
- {
- stream.WriteByte((byte)(s >> 8));
- stream.WriteByte((byte)s);
- }
-
- public void WriteUInt32(uint u)
- {
- stream.WriteByte((byte)(u >> 24));
- stream.WriteByte((byte)(u >> 16));
- stream.WriteByte((byte)(u >> 8));
- stream.WriteByte((byte)u);
- }
-
- public void WriteInt64(long l)
- {
- WriteUInt32((uint)(l >> 32));
- WriteUInt32((uint)l);
- }
-
- public void WriteFloat(float f)
- {
- WriteUInt32(BitConverter.ToUInt32(BitConverter.GetBytes(f), 0));
- }
-
- public void WriteDouble(double d)
- {
- WriteInt64(BitConverter.ToInt64(BitConverter.GetBytes(d), 0));
- }
-
- public void WriteByte(byte b)
- {
- stream.WriteByte(b);
- }
-
- public void WriteUtf8(string str)
- {
- byte[] buf = new byte[str.Length * 3 + 1];
- int j = 0;
- for (int i = 0, e = str.Length; i < e; i++)
- {
- char ch = str[i];
- if ((ch != 0) && (ch <= 0x7f))
- {
- buf[j++] = (byte)ch;
- }
- else if (ch <= 0x7FF)
- {
- /* 11 bits or less. */
- byte high_five = (byte)(ch >> 6);
- byte low_six = (byte)(ch & 0x3F);
- buf[j++] = (byte)(high_five | 0xC0); /* 110xxxxx */
- buf[j++] = (byte)(low_six | 0x80); /* 10xxxxxx */
- }
- else
- {
- /* possibly full 16 bits. */
- byte high_four = (byte)(ch >> 12);
- byte mid_six = (byte)((ch >> 6) & 0x3F);
- byte low_six = (byte)(ch & 0x3f);
- buf[j++] = (byte)(high_four | 0xE0); /* 1110xxxx */
- buf[j++] = (byte)(mid_six | 0x80); /* 10xxxxxx */
- buf[j++] = (byte)(low_six | 0x80); /* 10xxxxxx*/
- }
- }
- WriteUInt16((ushort)j);
- stream.Write(buf, 0, j);
- }
- }
-
- enum Constant
- {
- Utf8 = 1,
- Integer = 3,
- Float = 4,
- Long = 5,
- Double = 6,
- Class = 7,
- String = 8,
- Fieldref = 9,
- Methodref = 10,
- InterfaceMethodref = 11,
- NameAndType = 12
- }
-
- abstract class ConstantPoolItem
- {
- public abstract void Write(BigEndianStream bes);
- }
-
- sealed class ConstantPoolItemClass : ConstantPoolItem
- {
- private ushort name_index;
-
- public ConstantPoolItemClass(ushort name_index)
- {
- this.name_index = name_index;
- }
-
- public override int GetHashCode()
- {
- return name_index;
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemClass))
- {
- return ((ConstantPoolItemClass)o).name_index == name_index;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Class);
- bes.WriteUInt16(name_index);
- }
- }
-
- sealed class ConstantPoolItemMethodref : ConstantPoolItem
- {
- private ushort class_index;
- private ushort name_and_type_index;
-
- public ConstantPoolItemMethodref(ushort class_index, ushort name_and_type_index)
- {
- this.class_index = class_index;
- this.name_and_type_index = name_and_type_index;
- }
-
- public override int GetHashCode()
- {
- return class_index | (name_and_type_index << 16);
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemMethodref))
- {
- ConstantPoolItemMethodref m = (ConstantPoolItemMethodref)o;
- return m.class_index == class_index && m.name_and_type_index == name_and_type_index;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Methodref);
- bes.WriteUInt16(class_index);
- bes.WriteUInt16(name_and_type_index);
- }
- }
-
- sealed class ConstantPoolItemNameAndType : ConstantPoolItem
- {
- private ushort name_index;
- private ushort descriptor_index;
-
- public ConstantPoolItemNameAndType(ushort name_index, ushort descriptor_index)
- {
- this.name_index = name_index;
- this.descriptor_index = descriptor_index;
- }
-
- public override int GetHashCode()
- {
- return name_index | (descriptor_index << 16);
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemNameAndType))
- {
- ConstantPoolItemNameAndType n = (ConstantPoolItemNameAndType)o;
- return n.name_index == name_index && n.descriptor_index == descriptor_index;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.NameAndType);
- bes.WriteUInt16(name_index);
- bes.WriteUInt16(descriptor_index);
- }
- }
-
- sealed class ConstantPoolItemUtf8 : ConstantPoolItem
- {
- private string str;
-
- public ConstantPoolItemUtf8(string str)
- {
- this.str = str;
- }
-
- public override int GetHashCode()
- {
- return str.GetHashCode();
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemUtf8))
- {
- return ((ConstantPoolItemUtf8)o).str == str;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Utf8);
- bes.WriteUtf8(str);
- }
- }
-
- sealed class ConstantPoolItemInt : ConstantPoolItem
- {
- private int v;
-
- public ConstantPoolItemInt(int v)
- {
- this.v = v;
- }
-
- public override int GetHashCode()
- {
- return v;
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemInt))
- {
- return ((ConstantPoolItemInt)o).v == v;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Integer);
- bes.WriteUInt32((uint)v);
- }
- }
-
- sealed class ConstantPoolItemLong : ConstantPoolItem
- {
- private long v;
-
- public ConstantPoolItemLong(long v)
- {
- this.v = v;
- }
-
- public override int GetHashCode()
- {
- return (int)v;
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemLong))
- {
- return ((ConstantPoolItemLong)o).v == v;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Long);
- bes.WriteInt64(v);
- }
- }
-
- sealed class ConstantPoolItemFloat : ConstantPoolItem
- {
- private float v;
-
- public ConstantPoolItemFloat(float v)
- {
- this.v = v;
- }
-
- public override int GetHashCode()
- {
- return BitConverter.ToInt32(BitConverter.GetBytes(v), 0);
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemFloat))
- {
- return ((ConstantPoolItemFloat)o).v == v;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Float);
- bes.WriteFloat(v);
- }
- }
-
- sealed class ConstantPoolItemDouble : ConstantPoolItem
- {
- private double v;
-
- public ConstantPoolItemDouble(double v)
- {
- this.v = v;
- }
-
- public override int GetHashCode()
- {
- long l = BitConverter.DoubleToInt64Bits(v);
- return ((int)l) ^ ((int)(l >> 32));
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemDouble))
- {
- return ((ConstantPoolItemDouble)o).v == v;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.Double);
- bes.WriteDouble(v);
- }
- }
-
- sealed class ConstantPoolItemString : ConstantPoolItem
- {
- private ushort string_index;
-
- public ConstantPoolItemString(ushort string_index)
- {
- this.string_index = string_index;
- }
-
- public override int GetHashCode()
- {
- return string_index;
- }
-
- public override bool Equals(object o)
- {
- if (o != null && o.GetType() == typeof(ConstantPoolItemString))
- {
- return ((ConstantPoolItemString)o).string_index == string_index;
- }
- return false;
- }
-
- public override void Write(BigEndianStream bes)
- {
- bes.WriteByte((byte)Constant.String);
- bes.WriteUInt16(string_index);
- }
- }
-
- abstract class ClassFileAttribute
- {
- private ushort name_index;
-
- public ClassFileAttribute(ushort name_index)
- {
- this.name_index = name_index;
- }
-
- public virtual void Write(BigEndianStream bes)
- {
- bes.WriteUInt16(name_index);
- }
- }
-
- sealed class DeprecatedAttribute : ClassFileAttribute
- {
- internal DeprecatedAttribute(ClassFileWriter classFile)
- : base(classFile.AddUtf8("Deprecated"))
- {
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32(0);
- }
- }
-
- sealed class ConstantValueAttribute : ClassFileAttribute
- {
- private ushort constant_index;
-
- public ConstantValueAttribute(ushort name_index, ushort constant_index)
- : base(name_index)
- {
- this.constant_index = constant_index;
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32(2);
- bes.WriteUInt16(constant_index);
- }
- }
-
- sealed class StringAttribute : ClassFileAttribute
- {
- private ushort string_index;
-
- public StringAttribute(ushort name_index, ushort string_index)
- : base(name_index)
- {
- this.string_index = string_index;
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32(2);
- bes.WriteUInt16(string_index);
- }
- }
-
- sealed class InnerClassesAttribute : ClassFileAttribute
- {
- private ClassFileWriter classFile;
- private ArrayList classes = new ArrayList();
-
- public InnerClassesAttribute(ClassFileWriter classFile)
- : base(classFile.AddUtf8("InnerClasses"))
- {
- this.classFile = classFile;
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32((uint)(2 + 8 * classes.Count));
- bes.WriteUInt16((ushort)classes.Count);
- foreach (Item i in classes)
- {
- bes.WriteUInt16(i.inner_class_info_index);
- bes.WriteUInt16(i.outer_class_info_index);
- bes.WriteUInt16(i.inner_name_index);
- bes.WriteUInt16(i.inner_class_access_flags);
- }
- }
-
- private class Item
- {
- internal ushort inner_class_info_index;
- internal ushort outer_class_info_index;
- internal ushort inner_name_index;
- internal ushort inner_class_access_flags;
- }
-
- public void Add(string inner, string outer, string name, ushort access)
- {
- Item i = new Item();
- i.inner_class_info_index = classFile.AddClass(inner);
- i.outer_class_info_index = classFile.AddClass(outer);
- if (name != null)
- {
- i.inner_name_index = classFile.AddUtf8(name);
- }
- i.inner_class_access_flags = access;
- classes.Add(i);
- }
- }
-
- sealed class ExceptionsAttribute : ClassFileAttribute
- {
- private ClassFileWriter classFile;
- private ArrayList classes = new ArrayList();
-
- internal ExceptionsAttribute(ClassFileWriter classFile)
- : base(classFile.AddUtf8("Exceptions"))
- {
- this.classFile = classFile;
- }
-
- internal void Add(string exceptionClass)
- {
- classes.Add(classFile.AddClass(exceptionClass));
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32((uint)(2 + 2 * classes.Count));
- bes.WriteUInt16((ushort)classes.Count);
- foreach (ushort idx in classes)
- {
- bes.WriteUInt16(idx);
- }
- }
- }
-
- sealed class RuntimeVisibleAnnotationsAttribute : ClassFileAttribute
- {
- private ClassFileWriter classFile;
- private MemoryStream mem;
- private BigEndianStream bes;
- private ushort count;
-
- internal RuntimeVisibleAnnotationsAttribute(ClassFileWriter classFile)
- : base(classFile.AddUtf8("RuntimeVisibleAnnotations"))
- {
- this.classFile = classFile;
- mem = new MemoryStream();
- bes = new BigEndianStream(mem);
- }
-
- internal void Add(object[] annot)
- {
- count++;
- bes.WriteUInt16(classFile.AddUtf8((string)annot[1]));
- bes.WriteUInt16((ushort)((annot.Length - 2) / 2));
- for (int i = 2; i < annot.Length; i += 2)
- {
- bes.WriteUInt16(classFile.AddUtf8((string)annot[i]));
- WriteElementValue(bes, annot[i + 1]);
- }
- }
-
- private void WriteElementValue(BigEndianStream bes, object val)
- {
- if (val is object[])
- {
- object[] arr = (object[])val;
- if (AnnotationDefaultAttribute.TAG_ENUM.Equals(arr[0]))
- {
- bes.WriteByte(AnnotationDefaultAttribute.TAG_ENUM);
- bes.WriteUInt16(classFile.AddUtf8((string)arr[1]));
- bes.WriteUInt16(classFile.AddUtf8((string)arr[2]));
- return;
- }
- else if (AnnotationDefaultAttribute.TAG_ARRAY.Equals(arr[0]))
- {
- bes.WriteByte(AnnotationDefaultAttribute.TAG_ARRAY);
- object[] elemarr = (object[])arr[1];
- bes.WriteUInt16((ushort)elemarr.Length);
- foreach (object elem in elemarr)
- {
- WriteElementValue(bes, elem);
- }
- return;
- }
- }
- throw new NotImplementedException(val.GetType().FullName);
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32((uint)(mem.Length + 2));
- bes.WriteUInt16(count);
- foreach (byte b in mem.ToArray())
- {
- bes.WriteByte(b);
- }
- }
- }
-
- sealed class AnnotationDefaultClassFileAttribute : ClassFileAttribute
- {
- private ClassFileWriter classFile;
- private byte[] buf;
-
- internal AnnotationDefaultClassFileAttribute(ClassFileWriter classFile, byte[] buf)
- : base(classFile.AddUtf8("AnnotationDefault"))
- {
- this.classFile = classFile;
- this.buf = buf;
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32((uint)(buf.Length));
- foreach (byte b in buf)
- {
- bes.WriteByte(b);
- }
- }
- }
-
- sealed class FieldOrMethod
- {
- private Modifiers access_flags;
- private ushort name_index;
- private ushort descriptor_index;
- private ArrayList attribs = new ArrayList();
-
- public FieldOrMethod(Modifiers access_flags, ushort name_index, ushort descriptor_index)
- {
- this.access_flags = access_flags;
- this.name_index = name_index;
- this.descriptor_index = descriptor_index;
- }
-
- public void AddAttribute(ClassFileAttribute attrib)
- {
- attribs.Add(attrib);
- }
-
- public void Write(BigEndianStream bes)
- {
- bes.WriteUInt16((ushort)access_flags);
- bes.WriteUInt16(name_index);
- bes.WriteUInt16(descriptor_index);
- bes.WriteUInt16((ushort)attribs.Count);
- for (int i = 0; i < attribs.Count; i++)
- {
- ((ClassFileAttribute)attribs[i]).Write(bes);
- }
- }
- }
-
- sealed class CodeAttribute : ClassFileAttribute
- {
- private ClassFileWriter classFile;
- private ushort max_stack;
- private ushort max_locals;
- private byte[] code;
-
- public CodeAttribute(ClassFileWriter classFile)
- : base(classFile.AddUtf8("Code"))
- {
- this.classFile = classFile;
- }
-
- public ushort MaxStack
- {
- get { return max_stack; }
- set { max_stack = value; }
- }
-
- public ushort MaxLocals
- {
- get { return max_locals; }
- set { max_locals = value; }
- }
-
- public byte[] ByteCode
- {
- get { return code; }
- set { code = value; }
- }
-
- public override void Write(BigEndianStream bes)
- {
- base.Write(bes);
- bes.WriteUInt32((uint)(2 + 2 + 4 + code.Length + 2 + 2));
- bes.WriteUInt16(max_stack);
- bes.WriteUInt16(max_locals);
- bes.WriteUInt32((uint)code.Length);
- for (int i = 0; i < code.Length; i++)
- {
- bes.WriteByte(code[i]);
- }
- bes.WriteUInt16(0); // no exceptions
- bes.WriteUInt16(0); // no attributes
- }
- }
-
- sealed class ClassFileWriter
- {
- private ArrayList cplist = new ArrayList();
- private Hashtable cphashtable = new Hashtable();
- private ArrayList fields = new ArrayList();
- private ArrayList methods = new ArrayList();
- private ArrayList attribs = new ArrayList();
- private ArrayList interfaces = new ArrayList();
- private Modifiers access_flags;
- private ushort this_class;
- private ushort super_class;
- private ushort minorVersion;
- private ushort majorVersion;
-
- public ClassFileWriter(Modifiers mods, string name, string super, ushort minorVersion, ushort majorVersion)
- {
- cplist.Add(null);
- access_flags = mods;
- this_class = AddClass(name);
- if (super != null)
- {
- super_class = AddClass(super);
- }
- this.minorVersion = minorVersion;
- this.majorVersion = majorVersion;
- }
-
- private ushort Add(ConstantPoolItem cpi)
- {
- object index = cphashtable[cpi];
- if (index == null)
- {
- index = (ushort)cplist.Add(cpi);
- if (cpi is ConstantPoolItemDouble || cpi is ConstantPoolItemLong)
- {
- cplist.Add(null);
- }
- cphashtable[cpi] = index;
- }
- return (ushort)index;
- }
-
- public ushort AddUtf8(string str)
- {
- return Add(new ConstantPoolItemUtf8(str));
- }
-
- public ushort AddClass(string classname)
- {
- return Add(new ConstantPoolItemClass(AddUtf8(classname)));
- }
-
- public ushort AddMethodRef(string classname, string methodname, string signature)
- {
- return Add(new ConstantPoolItemMethodref(AddClass(classname), AddNameAndType(methodname, signature)));
- }
-
- public ushort AddNameAndType(string name, string type)
- {
- return Add(new ConstantPoolItemNameAndType(AddUtf8(name), AddUtf8(type)));
- }
-
- public ushort AddInt(int i)
- {
- return Add(new ConstantPoolItemInt(i));
- }
-
- public ushort AddLong(long l)
- {
- return Add(new ConstantPoolItemLong(l));
- }
-
- public ushort AddFloat(float f)
- {
- return Add(new ConstantPoolItemFloat(f));
- }
-
- public ushort AddDouble(double d)
- {
- return Add(new ConstantPoolItemDouble(d));
- }
-
- public ushort AddString(string s)
- {
- return Add(new ConstantPoolItemString(AddUtf8(s)));
- }
-
- public void AddInterface(string name)
- {
- interfaces.Add(AddClass(name));
- }
-
- public FieldOrMethod AddMethod(Modifiers access, string name, string signature)
- {
- FieldOrMethod method = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
- methods.Add(method);
- return method;
- }
-
- public FieldOrMethod AddField(Modifiers access, string name, string signature, object constantValue)
- {
- FieldOrMethod field = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
- if (constantValue != null)
- {
- ushort constantValueIndex;
- if (constantValue is byte)
- {
- constantValueIndex = AddInt((sbyte)(byte)constantValue);
- }
- else if (constantValue is bool)
- {
- constantValueIndex = AddInt((bool)constantValue ? 1 : 0);
- }
- else if (constantValue is short)
- {
- constantValueIndex = AddInt((short)constantValue);
- }
- else if (constantValue is char)
- {
- constantValueIndex = AddInt((char)constantValue);
- }
- else if (constantValue is int)
- {
- constantValueIndex = AddInt((int)constantValue);
- }
- else if (constantValue is long)
- {
- constantValueIndex = AddLong((long)constantValue);
- }
- else if (constantValue is float)
- {
- constantValueIndex = AddFloat((float)constantValue);
- }
- else if (constantValue is double)
- {
- constantValueIndex = AddDouble((double)constantValue);
- }
- else if (constantValue is string)
- {
- constantValueIndex = AddString((string)constantValue);
- }
- else
- {
- throw new InvalidOperationException(constantValue.GetType().FullName);
- }
- field.AddAttribute(new ConstantValueAttribute(AddUtf8("ConstantValue"), constantValueIndex));
- }
- fields.Add(field);
- return field;
- }
-
- public ClassFileAttribute MakeStringAttribute(string name, string value)
- {
- return new StringAttribute(AddUtf8(name), AddUtf8(value));
- }
-
- public void AddStringAttribute(string name, string value)
- {
- attribs.Add(MakeStringAttribute(name, value));
- }
-
- public void AddAttribute(ClassFileAttribute attrib)
- {
- attribs.Add(attrib);
- }
-
- public void Write(Stream stream)
- {
- BigEndianStream bes = new BigEndianStream(stream);
- bes.WriteUInt32(0xCAFEBABE);
- bes.WriteUInt16(minorVersion);
- bes.WriteUInt16(majorVersion);
- bes.WriteUInt16((ushort)cplist.Count);
- for (int i = 1; i < cplist.Count; i++)
- {
- ConstantPoolItem cpi = (ConstantPoolItem)cplist[i];
- if (cpi != null)
- {
- cpi.Write(bes);
- }
- }
- bes.WriteUInt16((ushort)access_flags);
- bes.WriteUInt16(this_class);
- bes.WriteUInt16(super_class);
- // interfaces count
- bes.WriteUInt16((ushort)interfaces.Count);
- for (int i = 0; i < interfaces.Count; i++)
- {
- bes.WriteUInt16((ushort)interfaces[i]);
- }
- // fields count
- bes.WriteUInt16((ushort)fields.Count);
- for (int i = 0; i < fields.Count; i++)
- {
- ((FieldOrMethod)fields[i]).Write(bes);
- }
- // methods count
- bes.WriteUInt16((ushort)methods.Count);
- for (int i = 0; i < methods.Count; i++)
- {
- ((FieldOrMethod)methods[i]).Write(bes);
- }
- // attributes count
- bes.WriteUInt16((ushort)attribs.Count);
- for (int i = 0; i < attribs.Count; i++)
- {
- ((ClassFileAttribute)attribs[i]).Write(bes);
- }
- }
- }
-}
diff --git a/external/ikvm/ikvmstub/SerialVersionUID.cs b/external/ikvm/ikvmstub/SerialVersionUID.cs
deleted file mode 100644
index 255a0ff..0000000
--- a/external/ikvm/ikvmstub/SerialVersionUID.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- Copyright (C) 2010 Jeroen Frijters
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jeroen Frijters
- jeroen at frijters.net
-
-*/
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using IKVM.Attributes;
-using IKVM.Internal;
-using Type = IKVM.Reflection.Type;
-
-namespace IKVM.StubGen
-{
- static class SerialVersionUID
- {
- private readonly static System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed();
-
- internal static long Compute(TypeWrapper tw)
- {
- MemoryStream mem = new MemoryStream();
- BigEndianStream bes = new BigEndianStream(mem);
- WriteClassName(bes, tw);
- WriteModifiers(bes, tw);
- WriteInterfaces(bes, tw);
- WriteFields(bes, tw);
- WriteStaticInitializer(bes, tw);
- WriteConstructors(bes, tw);
- WriteMethods(bes, tw);
- byte[] buf = sha1.ComputeHash(mem.ToArray());
- long hash = 0;
- for (int i = 7; i >= 0; i--)
- {
- hash <<= 8;
- hash |= buf[i];
- }
- return hash;
- }
-
- private static void WriteClassName(BigEndianStream bes, TypeWrapper tw)
- {
- bes.WriteUtf8(tw.Name);
- }
-
- private static void WriteModifiers(BigEndianStream bes, TypeWrapper tw)
- {
- Modifiers mods = tw.ReflectiveModifiers & (Modifiers.Public | Modifiers.Final | Modifiers.Interface | Modifiers.Abstract);
- if ((mods & Modifiers.Interface) != 0)
- {
- mods &= ~Modifiers.Abstract;
- if (HasJavaMethods(tw))
- {
- mods |= Modifiers.Abstract;
- }
- }
- bes.WriteUInt32((uint)mods);
- }
-
- private static bool HasJavaMethods(TypeWrapper tw)
- {
- foreach (MethodWrapper mw in tw.GetMethods())
- {
- if (!mw.IsHideFromReflection && mw.Name != StringConstants.CLINIT)
- {
- return true;
- }
- }
- return false;
- }
-
- private static void WriteInterfaces(BigEndianStream bes, TypeWrapper tw)
- {
- TypeWrapper[] interfaces = (TypeWrapper[])tw.Interfaces.Clone();
- Array.Sort(interfaces, delegate(TypeWrapper tw1, TypeWrapper tw2) { return String.CompareOrdinal(tw1.Name, tw2.Name); });
- foreach (TypeWrapper iface in interfaces)
- {
- bes.WriteUtf8(iface.Name);
- }
- }
-
- private static void WriteFields(BigEndianStream bes, TypeWrapper tw)
- {
- List<FieldWrapper> list = new List<FieldWrapper>();
- foreach (FieldWrapper fw in tw.GetFields())
- {
- if (!fw.IsHideFromReflection)
- {
- list.Add(fw);
- }
- }
- list.Sort(delegate(FieldWrapper fw1, FieldWrapper fw2) { return String.CompareOrdinal(fw1.Name, fw2.Name); });
- foreach (FieldWrapper fw in list)
- {
- Modifiers mods = fw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Volatile | Modifiers.Transient);
- if (((mods & Modifiers.Private) == 0) || ((mods & (Modifiers.Static | Modifiers.Transient)) == 0))
- {
- bes.WriteUtf8(fw.Name);
- bes.WriteUInt32((uint)mods);
- bes.WriteUtf8(fw.Signature.Replace('.', '/'));
- }
- }
- }
-
- private static void WriteStaticInitializer(BigEndianStream bes, TypeWrapper tw)
- {
- Type type = tw.TypeAsTBD;
- if (!type.IsArray && type.TypeInitializer != null)
- {
- if (!AttributeHelper.IsHideFromJava(type.TypeInitializer))
- {
- bes.WriteUtf8("<clinit>");
- bes.WriteUInt32((uint)Modifiers.Static);
- bes.WriteUtf8("()V");
- }
- }
- }
-
- private static void WriteConstructors(BigEndianStream bes, TypeWrapper tw)
- {
- List<MethodWrapper> list = new List<MethodWrapper>();
- foreach (MethodWrapper mw in tw.GetMethods())
- {
- if (mw.Name == StringConstants.INIT && !mw.IsHideFromReflection && !mw.IsPrivate)
- {
- list.Add(mw);
- }
- }
- list.Sort(delegate(MethodWrapper mw1, MethodWrapper mw2) { return String.CompareOrdinal(mw1.Signature, mw2.Signature); });
- foreach (MethodWrapper mw in list)
- {
- Modifiers mods = mw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Synchronized | Modifiers.Native | Modifiers.Abstract | Modifiers.Strictfp);
- bes.WriteUtf8(mw.Name);
- bes.WriteUInt32((uint)mods);
- bes.WriteUtf8(mw.Signature);
- }
- }
-
- private static void WriteMethods(BigEndianStream bes, TypeWrapper tw)
- {
- List<MethodWrapper> list = new List<MethodWrapper>();
- foreach (MethodWrapper mw in tw.GetMethods())
- {
- if (mw.Name != StringConstants.INIT && !mw.IsHideFromReflection && !mw.IsPrivate)
- {
- list.Add(mw);
- }
- }
- list.Sort(delegate(MethodWrapper mw1, MethodWrapper mw2) {
- if (mw1.Name == mw2.Name)
- return String.CompareOrdinal(mw1.Signature, mw2.Signature);
- return String.CompareOrdinal(mw1.Name, mw2.Name);
- });
- foreach (MethodWrapper mw in list)
- {
- Modifiers mods = mw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Synchronized | Modifiers.Native | Modifiers.Abstract | Modifiers.Strictfp);
- bes.WriteUtf8(mw.Name);
- bes.WriteUInt32((uint)mods);
- bes.WriteUtf8(mw.Signature);
- }
- }
- }
-}
diff --git a/external/ikvm/ikvmstub/ikvmstub.8.csproj b/external/ikvm/ikvmstub/ikvmstub.8.csproj
index 822c2c2..b1998f9 100644
--- a/external/ikvm/ikvmstub/ikvmstub.8.csproj
+++ b/external/ikvm/ikvmstub/ikvmstub.8.csproj
@@ -68,7 +68,7 @@
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="ClassFileWriter.cs" />
+ <Compile Include="..\runtime\stubgen\ClassFileWriter.cs" />
<Compile Include="ikvmstub.cs">
<SubType>Code</SubType>
</Compile>
@@ -102,7 +102,8 @@
<Compile Include="..\runtime\vm.cs">
<SubType>Code</SubType>
</Compile>
- <Compile Include="SerialVersionUID.cs" />
+ <Compile Include="..\runtime\stubgen\SerialVersionUID.cs" />
+ <Compile Include="..\runtime\stubgen\StubGenerator.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\reflect\IKVM.Reflection.csproj">
diff --git a/external/ikvm/ikvmstub/ikvmstub.build b/external/ikvm/ikvmstub/ikvmstub.build
index 2b09036..8a82963 100644
--- a/external/ikvm/ikvmstub/ikvmstub.build
+++ b/external/ikvm/ikvmstub/ikvmstub.build
@@ -1,11 +1,13 @@
<?xml version="1.0"?>
<project name="ikvmstub" default="ikvmstub">
+ <include buildfile="../ikvm.include" />
+
<target name="ikvmstub">
<property name="defs" value="STUB_GENERATOR;TRACE" />
<if test="${property::exists('signed')}">
<property name="defs" value="${defs};${signed}" />
</if>
- <csc target="exe" output="../bin/ikvmstub.exe" define="${defs}">
+ <csc target="exe" output="../bin/ikvmstub.exe" define="${defs}" noconfig="true" nostdlib="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="../ikvmc/AssemblyResolver.cs" />
@@ -22,14 +24,17 @@
<include name="../runtime/Types.cs" />
<include name="../runtime/TypeWrapper.cs" />
<include name="../runtime/vm.cs" />
+ <include name="../runtime/stubgen/ClassFileWriter.cs" />
+ <include name="../runtime/stubgen/SerialVersionUID.cs" />
+ <include name="../runtime/stubgen/StubGenerator.cs" />
<include name="AssemblyInfo.cs" />
- <include name="ClassFileWriter.cs" />
<include name="ikvmstub.cs" />
- <include name="SerialVersionUID.cs" />
</sources>
<references>
<include name="../bin/ICSharpCode.SharpZipLib.dll" asis="true" />
<include name="../bin/IKVM.Reflection.dll" asis="true" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
</references>
</csc>
</target>
diff --git a/external/ikvm/ikvmstub/ikvmstub.cs b/external/ikvm/ikvmstub/ikvmstub.cs
index 3bfad98..71446c9 100644
--- a/external/ikvm/ikvmstub/ikvmstub.cs
+++ b/external/ikvm/ikvmstub/ikvmstub.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -321,469 +321,15 @@ static class NetExp
private static void WriteClass(TypeWrapper tw)
{
- string name = tw.Name.Replace('.', '/');
- string super = null;
- if (tw.IsInterface)
- {
- super = "java/lang/Object";
- }
- else if (tw.BaseTypeWrapper != null)
- {
- super = tw.BaseTypeWrapper.Name.Replace('.', '/');
- }
- IKVM.StubGen.ClassFileWriter writer = new IKVM.StubGen.ClassFileWriter(tw.Modifiers, name, super, 0, 49);
- foreach (TypeWrapper iface in tw.Interfaces)
- {
- if (iface.IsPublic || includeNonPublicInterfaces)
- {
- writer.AddInterface(iface.Name.Replace('.', '/'));
- }
- }
- IKVM.StubGen.InnerClassesAttribute innerClassesAttribute = null;
- if (tw.DeclaringTypeWrapper != null)
- {
- TypeWrapper outer = tw.DeclaringTypeWrapper;
- string innername = name;
- int idx = name.LastIndexOf('$');
- if (idx >= 0)
- {
- innername = innername.Substring(idx + 1);
- }
- innerClassesAttribute = new IKVM.StubGen.InnerClassesAttribute(writer);
- innerClassesAttribute.Add(name, outer.Name.Replace('.', '/'), innername, (ushort)tw.ReflectiveModifiers);
- }
- foreach (TypeWrapper inner in tw.InnerClasses)
- {
- if (inner.IsPublic)
- {
- if (innerClassesAttribute == null)
- {
- innerClassesAttribute = new IKVM.StubGen.InnerClassesAttribute(writer);
- }
- string namePart = inner.Name;
- namePart = namePart.Substring(namePart.LastIndexOf('$') + 1);
- innerClassesAttribute.Add(inner.Name.Replace('.', '/'), name, namePart, (ushort)inner.ReflectiveModifiers);
- }
- }
- if (innerClassesAttribute != null)
- {
- writer.AddAttribute(innerClassesAttribute);
- }
- string genericTypeSignature = tw.GetGenericSignature();
- if (genericTypeSignature != null)
- {
- writer.AddStringAttribute("Signature", genericTypeSignature);
- }
- writer.AddStringAttribute("IKVM.NET.Assembly", GetAssemblyName(tw));
- if (tw.TypeAsBaseType.IsDefined(StaticCompiler.Universe.Import(typeof(ObsoleteAttribute)), false))
- {
- writer.AddAttribute(new IKVM.StubGen.DeprecatedAttribute(writer));
- }
- foreach (MethodWrapper mw in tw.GetMethods())
- {
- if (!mw.IsHideFromReflection && (mw.IsPublic || mw.IsProtected || includeNonPublicMembers))
- {
- IKVM.StubGen.FieldOrMethod m;
- if (mw.Name == "<init>")
- {
- m = writer.AddMethod(mw.Modifiers, mw.Name, mw.Signature.Replace('.', '/'));
- IKVM.StubGen.CodeAttribute code = new IKVM.StubGen.CodeAttribute(writer);
- code.MaxLocals = (ushort)(mw.GetParameters().Length * 2 + 1);
- code.MaxStack = 3;
- ushort index1 = writer.AddClass("java/lang/UnsatisfiedLinkError");
- ushort index2 = writer.AddString("ikvmstub generated stubs can only be used on IKVM.NET");
- ushort index3 = writer.AddMethodRef("java/lang/UnsatisfiedLinkError", "<init>", "(Ljava/lang/String;)V");
- code.ByteCode = new byte[] {
- 187, (byte)(index1 >> 8), (byte)index1, // new java/lang/UnsatisfiedLinkError
- 89, // dup
- 19, (byte)(index2 >> 8), (byte)index2, // ldc_w "..."
- 183, (byte)(index3 >> 8), (byte)index3, // invokespecial java/lang/UnsatisfiedLinkError/init()V
- 191 // athrow
- };
- m.AddAttribute(code);
- }
- else
- {
- Modifiers mods = mw.Modifiers;
- if ((mods & Modifiers.Abstract) == 0)
- {
- mods |= Modifiers.Native;
- }
- m = writer.AddMethod(mods, mw.Name, mw.Signature.Replace('.', '/'));
- if (mw.IsOptionalAttributeAnnotationValue)
- {
- m.AddAttribute(new IKVM.StubGen.AnnotationDefaultClassFileAttribute(writer, GetAnnotationDefault(writer, mw.ReturnType)));
- }
- }
- MethodBase mb = mw.GetMethod();
- if (mb != null)
- {
- ThrowsAttribute throws = AttributeHelper.GetThrows(mb);
- if (throws == null)
- {
- string[] throwsArray = mw.GetDeclaredExceptions();
- if (throwsArray != null && throwsArray.Length > 0)
- {
- IKVM.StubGen.ExceptionsAttribute attrib = new IKVM.StubGen.ExceptionsAttribute(writer);
- foreach (string ex in throwsArray)
- {
- attrib.Add(ex.Replace('.', '/'));
- }
- m.AddAttribute(attrib);
- }
- }
- else
- {
- IKVM.StubGen.ExceptionsAttribute attrib = new IKVM.StubGen.ExceptionsAttribute(writer);
- if (throws.classes != null)
- {
- foreach (string ex in throws.classes)
- {
- attrib.Add(ex.Replace('.', '/'));
- }
- }
- if (throws.types != null)
- {
- foreach (Type ex in throws.types)
- {
- attrib.Add(ClassLoaderWrapper.GetWrapperFromType(ex).Name.Replace('.', '/'));
- }
- }
- m.AddAttribute(attrib);
- }
- if (mb.IsDefined(StaticCompiler.Universe.Import(typeof(ObsoleteAttribute)), false)
- // HACK the instancehelper methods are marked as Obsolete (to direct people toward the ikvm.extensions methods instead)
- // but in the Java world most of them are not deprecated (and to keep the Japi results clean we need to reflect this)
- && (!mb.Name.StartsWith("instancehelper_")
- || mb.DeclaringType.FullName != "java.lang.String"
- // the Java deprecated methods actually have two Obsolete attributes
- || mb.__GetCustomAttributes(StaticCompiler.Universe.Import(typeof(ObsoleteAttribute)), false).Count == 2))
- {
- m.AddAttribute(new IKVM.StubGen.DeprecatedAttribute(writer));
- }
- IList<CustomAttributeData> attr = CustomAttributeData.__GetCustomAttributes(mb, JVM.LoadType(typeof(AnnotationDefaultAttribute)), false);
- if (attr.Count == 1)
- {
- m.AddAttribute(new IKVM.StubGen.AnnotationDefaultClassFileAttribute(writer, GetAnnotationDefault(writer, attr[0].ConstructorArguments[0])));
- }
- }
- string sig = tw.GetGenericMethodSignature(mw);
- if (sig != null)
- {
- m.AddAttribute(writer.MakeStringAttribute("Signature", sig));
- }
- }
- }
- bool hasSerialVersionUID = false;
- foreach (FieldWrapper fw in tw.GetFields())
- {
- if (!fw.IsHideFromReflection)
- {
- bool isSerialVersionUID = includeSerialVersionUID && fw.Name == "serialVersionUID" && fw.FieldTypeWrapper == PrimitiveTypeWrapper.LONG;
- hasSerialVersionUID |= isSerialVersionUID;
- if (fw.IsPublic || fw.IsProtected || isSerialVersionUID || includeNonPublicMembers)
- {
- object constant = null;
- if (fw.GetField() != null && fw.GetField().IsLiteral && (fw.FieldTypeWrapper.IsPrimitive || fw.FieldTypeWrapper == CoreClasses.java.lang.String.Wrapper))
- {
- constant = fw.GetField().GetRawConstantValue();
- if (fw.GetField().FieldType.IsEnum)
- {
- constant = EnumHelper.GetPrimitiveValue(EnumHelper.GetUnderlyingType(fw.GetField().FieldType), constant);
- }
- }
- IKVM.StubGen.FieldOrMethod f = writer.AddField(fw.Modifiers, fw.Name, fw.Signature.Replace('.', '/'), constant);
- string sig = tw.GetGenericFieldSignature(fw);
- if (sig != null)
- {
- f.AddAttribute(writer.MakeStringAttribute("Signature", sig));
- }
- if (fw.GetField() != null && fw.GetField().IsDefined(StaticCompiler.Universe.Import(typeof(ObsoleteAttribute)), false))
- {
- f.AddAttribute(new IKVM.StubGen.DeprecatedAttribute(writer));
- }
- }
- }
- }
- if (includeSerialVersionUID && !hasSerialVersionUID && IsSerializable(tw))
- {
- // class is serializable but doesn't have an explicit serialVersionUID, so we add the field to record
- // the serialVersionUID as we see it (mainly to make the Japi reports more realistic)
- writer.AddField(Modifiers.Private | Modifiers.Static | Modifiers.Final, "serialVersionUID", "J", IKVM.StubGen.SerialVersionUID.Compute(tw));
- }
- AddMetaAnnotations(writer, tw);
zipCount++;
MemoryStream mem = new MemoryStream();
- writer.Write(mem);
- ZipEntry entry = new ZipEntry(name + ".class");
+ IKVM.StubGen.StubGenerator.WriteClass(mem, tw, includeNonPublicInterfaces, includeNonPublicMembers, includeSerialVersionUID);
+ ZipEntry entry = new ZipEntry(tw.Name.Replace('.', '/') + ".class");
entry.Size = mem.Position;
zipFile.PutNextEntry(entry);
mem.WriteTo(zipFile);
}
- private static string GetAssemblyName(TypeWrapper tw)
- {
- ClassLoaderWrapper loader = tw.GetClassLoader();
- AssemblyClassLoader acl = loader as AssemblyClassLoader;
- if (acl != null)
- {
- return acl.GetAssembly(tw).FullName;
- }
- else
- {
- return ((GenericClassLoader)loader).GetName();
- }
- }
-
- private static bool IsSerializable(TypeWrapper tw)
- {
- if (tw.Name == "java.io.Serializable")
- {
- return true;
- }
- while (tw != null)
- {
- foreach (TypeWrapper iface in tw.Interfaces)
- {
- if (IsSerializable(iface))
- {
- return true;
- }
- }
- tw = tw.BaseTypeWrapper;
- }
- return false;
- }
-
- private static void AddMetaAnnotations(IKVM.StubGen.ClassFileWriter writer, TypeWrapper tw)
- {
- DotNetTypeWrapper.AttributeAnnotationTypeWrapperBase attributeAnnotation = tw as DotNetTypeWrapper.AttributeAnnotationTypeWrapperBase;
- if (attributeAnnotation != null)
- {
- // TODO write the annotation directly, instead of going thru the object[] encoding
- IKVM.StubGen.RuntimeVisibleAnnotationsAttribute annot = new IKVM.StubGen.RuntimeVisibleAnnotationsAttribute(writer);
- annot.Add(new object[] {
- AnnotationDefaultAttribute.TAG_ANNOTATION,
- "Ljava/lang/annotation/Retention;",
- "value",
- new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/RetentionPolicy;", "RUNTIME" }
- });
- AttributeTargets validOn = attributeAnnotation.AttributeTargets;
- List<object[]> targets = new List<object[]>();
- if ((validOn & (AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate | AttributeTargets.Assembly)) != 0)
- {
- targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "TYPE" });
- }
- if ((validOn & AttributeTargets.Constructor) != 0)
- {
- targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "CONSTRUCTOR" });
- }
- if ((validOn & AttributeTargets.Field) != 0)
- {
- targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "FIELD" });
- }
- if ((validOn & (AttributeTargets.Method | AttributeTargets.ReturnValue)) != 0)
- {
- targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "METHOD" });
- }
- if ((validOn & AttributeTargets.Parameter) != 0)
- {
- targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "PARAMETER" });
- }
- annot.Add(new object[] {
- AnnotationDefaultAttribute.TAG_ANNOTATION,
- "Ljava/lang/annotation/Target;",
- "value",
- new object[] { AnnotationDefaultAttribute.TAG_ARRAY, targets.ToArray() }
- });
- writer.AddAttribute(annot);
- }
- }
-
- private static byte[] GetAnnotationDefault(IKVM.StubGen.ClassFileWriter classFile, TypeWrapper type)
- {
- MemoryStream mem = new MemoryStream();
- IKVM.StubGen.BigEndianStream bes = new IKVM.StubGen.BigEndianStream(mem);
- if (type == PrimitiveTypeWrapper.BOOLEAN)
- {
- bes.WriteByte((byte)'Z');
- bes.WriteUInt16(classFile.AddInt(0));
- }
- else if(type == PrimitiveTypeWrapper.BYTE)
- {
- bes.WriteByte((byte)'B');
- bes.WriteUInt16(classFile.AddInt(0));
- }
- else if(type == PrimitiveTypeWrapper.CHAR)
- {
- bes.WriteByte((byte)'C');
- bes.WriteUInt16(classFile.AddInt(0));
- }
- else if(type == PrimitiveTypeWrapper.SHORT)
- {
- bes.WriteByte((byte)'S');
- bes.WriteUInt16(classFile.AddInt(0));
- }
- else if(type == PrimitiveTypeWrapper.INT)
- {
- bes.WriteByte((byte)'I');
- bes.WriteUInt16(classFile.AddInt(0));
- }
- else if(type == PrimitiveTypeWrapper.FLOAT)
- {
- bes.WriteByte((byte)'F');
- bes.WriteUInt16(classFile.AddFloat(0));
- }
- else if(type == PrimitiveTypeWrapper.LONG)
- {
- bes.WriteByte((byte)'J');
- bes.WriteUInt16(classFile.AddLong(0));
- }
- else if (type == PrimitiveTypeWrapper.DOUBLE)
- {
- bes.WriteByte((byte)'D');
- bes.WriteUInt16(classFile.AddDouble(0));
- }
- else if (type == CoreClasses.java.lang.String.Wrapper)
- {
- bes.WriteByte((byte)'s');
- bes.WriteUInt16(classFile.AddUtf8(""));
- }
- else if ((type.Modifiers & Modifiers.Enum) != 0)
- {
- bes.WriteByte((byte)'e');
- bes.WriteUInt16(classFile.AddUtf8("L" + type.Name.Replace('.', '/') + ";"));
- bes.WriteUInt16(classFile.AddUtf8("__unspecified"));
- }
- else if (type == CoreClasses.java.lang.Class.Wrapper)
- {
- bes.WriteByte((byte)'c');
- bes.WriteUInt16(classFile.AddUtf8("Likvm/internal/__unspecified;"));
- }
- else if (type.IsArray)
- {
- bes.WriteByte((byte)'[');
- bes.WriteUInt16(0);
- }
- else
- {
- throw new InvalidOperationException();
- }
- return mem.ToArray();
- }
-
- private static byte[] GetAnnotationDefault(IKVM.StubGen.ClassFileWriter classFile, CustomAttributeTypedArgument value)
- {
- MemoryStream mem = new MemoryStream();
- IKVM.StubGen.BigEndianStream bes = new IKVM.StubGen.BigEndianStream(mem);
- try
- {
- WriteAnnotationElementValue(classFile, bes, value);
- }
- catch (InvalidCastException)
- {
- Console.Error.WriteLine("Warning: incorrect annotation default value");
- }
- catch (IndexOutOfRangeException)
- {
- Console.Error.WriteLine("Warning: incorrect annotation default value");
- }
- return mem.ToArray();
- }
-
- private static void WriteAnnotationElementValue(IKVM.StubGen.ClassFileWriter classFile, IKVM.StubGen.BigEndianStream bes, CustomAttributeTypedArgument value)
- {
- if (value.ArgumentType == Types.Boolean)
- {
- bes.WriteByte((byte)'Z');
- bes.WriteUInt16(classFile.AddInt((bool)value.Value ? 1 : 0));
- }
- else if (value.ArgumentType == Types.Byte)
- {
- bes.WriteByte((byte)'B');
- bes.WriteUInt16(classFile.AddInt((byte)value.Value));
- }
- else if (value.ArgumentType == Types.Char)
- {
- bes.WriteByte((byte)'C');
- bes.WriteUInt16(classFile.AddInt((char)value.Value));
- }
- else if (value.ArgumentType == Types.Int16)
- {
- bes.WriteByte((byte)'S');
- bes.WriteUInt16(classFile.AddInt((short)value.Value));
- }
- else if (value.ArgumentType == Types.Int32)
- {
- bes.WriteByte((byte)'I');
- bes.WriteUInt16(classFile.AddInt((int)value.Value));
- }
- else if (value.ArgumentType == Types.Single)
- {
- bes.WriteByte((byte)'F');
- bes.WriteUInt16(classFile.AddFloat((float)value.Value));
- }
- else if (value.ArgumentType == Types.Int64)
- {
- bes.WriteByte((byte)'J');
- bes.WriteUInt16(classFile.AddLong((long)value.Value));
- }
- else if (value.ArgumentType == Types.Double)
- {
- bes.WriteByte((byte)'D');
- bes.WriteUInt16(classFile.AddDouble((double)value.Value));
- }
- else if (value.ArgumentType == Types.String)
- {
- bes.WriteByte((byte)'s');
- bes.WriteUInt16(classFile.AddUtf8((string)value.Value));
- }
- else if (value.ArgumentType == Types.Object.MakeArrayType())
- {
- CustomAttributeTypedArgument[] array = (CustomAttributeTypedArgument[])value.Value;
- byte type = (byte)array[0].Value;
- if (type == AnnotationDefaultAttribute.TAG_ARRAY)
- {
- bes.WriteByte((byte)'[');
- bes.WriteUInt16((ushort)(array.Length - 1));
- for (int i = 1; i < array.Length; i++)
- {
- WriteAnnotationElementValue(classFile, bes, array[i]);
- }
- }
- else if (type == AnnotationDefaultAttribute.TAG_CLASS)
- {
- bes.WriteByte((byte)'c');
- bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
- }
- else if (type == AnnotationDefaultAttribute.TAG_ENUM)
- {
- bes.WriteByte((byte)'e');
- bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
- bes.WriteUInt16(classFile.AddUtf8((string)array[2].Value));
- }
- else if (type == AnnotationDefaultAttribute.TAG_ANNOTATION)
- {
- bes.WriteByte((byte)'@');
- bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
- bes.WriteUInt16((ushort)((array.Length - 2) / 2));
- for (int i = 2; i < array.Length; i += 2)
- {
- bes.WriteUInt16(classFile.AddUtf8((string)array[i].Value));
- WriteAnnotationElementValue(classFile, bes, array[i + 1]);
- }
- }
- else
- {
- Console.Error.WriteLine("Warning: incorrect annotation default element tag: " + type);
- }
- }
- else
- {
- Console.Error.WriteLine("Warning: incorrect annotation default element type: " + value.ArgumentType);
- }
- }
-
private static bool ExportNamespace(Type type)
{
if (namespaces.Count == 0)
@@ -1034,7 +580,7 @@ sealed class StubTypeWrapper : TypeWrapper
private readonly TypeWrapper baseWrapper;
internal StubTypeWrapper(Modifiers modifiers, string name, TypeWrapper baseWrapper, bool remapped)
- : base(modifiers, name)
+ : base(TypeFlags.None, modifiers, name)
{
this.remapped = remapped;
this.baseWrapper = baseWrapper;
diff --git a/external/ikvm/jvm/jvm.build b/external/ikvm/jvm/jvm.build
index 87abd10..d84fe58 100644
--- a/external/ikvm/jvm/jvm.build
+++ b/external/ikvm/jvm/jvm.build
@@ -3,24 +3,37 @@
<include buildfile="../ikvm.include" />
<target name="version">
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
- <copy file="jvm.rc.in" tofile="jvm.rc" outputencoding="ascii" overwrite="true">
- <filterchain>
- <replacetokens>
- <token key="VERSIONLIST" value="${string::replace(property::get-value('VERSION'), '.', ',')}" />
- <token key="VERSION" value="${VERSION}" />
- </replacetokens>
- </filterchain>
- </copy>
</target>
- <target name="JVM" depends="version" if="${property::exists('ilasm') and (not string::starts-with(framework::get-target-framework(), 'mono'))}">
- <property overwrite="false" name="ilasm_signoption" value="" />
- <if test="${property::exists('rc')}">
- <exec program="${rc}" commandline="jvm.rc" />
- </if>
- <rc if="${not property::exists('rc')}" rcfile="jvm.rc" output="jvm.res" />
- <exec program="../tools/asmref.exe" useruntimeengine="true" commandline="mscorlib ../bin/IKVM.Runtime.JNI.dll" output="jvm_h.il" />
- <echo message=".assembly JVM { .ver ${string::replace(property::get-value('VERSION'), '.', ':')} }" file="jvm_h.il" append="true" />
- <exec program="${ilasm}" commandline=" /dll ${ilasm_signoption} /out:../bin-x86/JVM.DLL /RESOURCE:jvm.res jvm_h.il jvm32.il JVM.il" />
- <exec program="${ilasm}" commandline="/pe64 /x64 /dll ${ilasm_signoption} /out:../bin-x64/JVM.DLL /RESOURCE:jvm.res jvm_h.il jvm64.il JVM.il" />
+ <target name="implib">
+ <csc target="exe" output="../tools/implib.exe" rebuild="true">
+ <sources>
+ <include name="../tools/implib.cs" />
+ </sources>
+ <references>
+ <include name="../bin/IKVM.Reflection.dll" asis="true" />
+ </references>
+ </csc>
+ <copy file="../bin/IKVM.Reflection.dll" tofile="../tools/IKVM.Reflection.dll" overwrite="true" />
+ </target>
+ <target name="JVM" depends="version implib">
+ <property name="arch" value="x86" />
+ <call target="RunImpLib" />
+ <property name="arch" value="x64" />
+ <call target="RunImpLib" />
+ </target>
+ <target name="RunImpLib">
+ <property name="signoption" value="" overwrite="false" />
+ <exec program="../tools/implib.exe" useruntimeengine="true">
+ <arg value="jvm.def" />
+ <arg value="-out:../bin-${arch}/JVM.DLL" />
+ <arg value="-platform:${arch}" />
+ <arg value="-r:../bin/IKVM.Runtime.JNI.dll" />
+ <arg value="-product:IKVM.NET" />
+ <arg value="-company:Jeroen Frijters" />
+ <arg value="-copyright:Copyright (C) 2002-2013 Jeroen Frijters" />
+ <arg value="-description:IKVM.NET JVM for .NET" />
+ <arg value="-version:${VERSION}" />
+ <arg value="${signoption}" />
+ </exec>
</target>
</project>
diff --git a/external/ikvm/jvm/jvm.rc.in b/external/ikvm/jvm/jvm.rc.in
deleted file mode 100644
index ba538f4..0000000
--- a/external/ikvm/jvm/jvm.rc.in
+++ /dev/null
@@ -1,28 +0,0 @@
-1 VERSIONINFO
- FILEVERSION @VERSIONLIST@
- PRODUCTVERSION @VERSIONLIST@
- FILEFLAGSMASK 0x3fL
- FILEFLAGS 0x0L
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0"
- BEGIN
- VALUE "CompanyName", "Jeroen Frijters"
- VALUE "FileDescription", "IKVM.NET JVM for .NET"
- VALUE "FileVersion", "@VERSION@"
- VALUE "InternalName", "jvm"
- VALUE "LegalCopyright", "Copyright (C) 2002-2011 Jeroen Frijters"
- VALUE "OriginalFilename", "jvm.dll"
- VALUE "ProductName", "IKVM.NET"
- VALUE "ProductVersion", "@VERSION@"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0, 1200
- END
-END
diff --git a/external/ikvm/msbuild/AssemblyInfo.cs b/external/ikvm/msbuild/AssemblyInfo.cs
index b9c42f6..ba304af 100644
--- a/external/ikvm/msbuild/AssemblyInfo.cs
+++ b/external/ikvm/msbuild/AssemblyInfo.cs
@@ -37,4 +37,4 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("IKVM.MSBuild")]
[assembly: AssemblyDescription("Java build task for .NET")]
-[assembly: System.Security.AllowPartiallyTrustedCallers]
+//[assembly: System.Security.AllowPartiallyTrustedCallers]
diff --git a/external/ikvm/msbuild/IKVM.MSBuild.Java.Targets b/external/ikvm/msbuild/IKVM.MSBuild.Java.Targets
index 557c2d2..b9de8f1 100644
--- a/external/ikvm/msbuild/IKVM.MSBuild.Java.Targets
+++ b/external/ikvm/msbuild/IKVM.MSBuild.Java.Targets
@@ -12,11 +12,10 @@ IKVM.Java.targets
<Target Name="CreateManifestResourceNames"></Target>
- <Target Name="CoreCompile">
- <JavaTask
+ <Target Name="CoreCompile" DependsOnTargets="ResolveProjectReferences;ResolveAssemblyReferences">
+ <JavaTask
EmitDebugInformation="$(DebugSymbols)"
- References="@(Reference)"
- TargetFrameworkVersion="$(TargetFrameworkVersion)"
+ References="@(_ResolveAssemblyReferenceResolvedFiles)"
Sources="@(Compile)"
Platform="$(PlatformTarget)"
Configuration="$(Configuration)"
@@ -27,10 +26,6 @@ IKVM.Java.targets
/>
</Target>
- <PropertyGroup>
- <CopyBuildOutputToOutputDirectory >false</CopyBuildOutputToOutputDirectory>
- </PropertyGroup>
-
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets"/>
</Project>
\ No newline at end of file
diff --git a/external/ikvm/msbuild/IKVM.MSBuild.csproj b/external/ikvm/msbuild/IKVM.MSBuild.csproj
index d85f3f4..0fcdaf4 100644
--- a/external/ikvm/msbuild/IKVM.MSBuild.csproj
+++ b/external/ikvm/msbuild/IKVM.MSBuild.csproj
@@ -1,33 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
+<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{D7FF23BC-49C2-490D-B702-8EEE8F5AF296}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
<OutputType>Library</OutputType>
<RootNamespace>IKVM.MSBuild</RootNamespace>
<AssemblyName>IKVM.MSBuild</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <AppDesignerFolder>Properties</AppDesignerFolder>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
- <PlatformTarget>x86</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <Optimize>True</Optimize>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- <DefineConstants>TRACE</DefineConstants>
+ <WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="IKVM.OpenJDK.Core">
@@ -38,10 +30,8 @@
</Reference>
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Tasks" />
- <Reference Include="Microsoft.Build.Utilities.v4.0" />
+ <Reference Include="Microsoft.Build.Utilities" />
<Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -49,8 +39,14 @@
</ItemGroup>
<ItemGroup>
<None Include="IKVM.MSBuild.Java.Targets">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\reflect\IKVM.Reflection.csproj">
+ <Project>{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}</Project>
+ <Name>IKVM.Reflection</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>
\ No newline at end of file
diff --git a/external/ikvm/msbuild/JavaTask.cs b/external/ikvm/msbuild/JavaTask.cs
index ec038bd..afa20f9 100644
--- a/external/ikvm/msbuild/JavaTask.cs
+++ b/external/ikvm/msbuild/JavaTask.cs
@@ -1,5 +1,6 @@
/*
Copyright (C) 2012 Volker Berlin (i-net software)
+ Copyright (C) 2012 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -33,31 +34,25 @@ using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Javac = com.sun.tools.javac.Main;
using PrintWriter = java.io.PrintWriter;
+using System.Diagnostics;
namespace IKVM.MSBuild
{
/// <summary>
/// Java compiler task.
/// </summary>
- public class JavaTask : ToolTask
+ public sealed class JavaTask : ToolTask
{
private ITaskItem[] sources;
- private ITaskItem[] references;
+ private string[] references;
private ITaskItem[] resources;
- private string targetFrameworkVersion;
- private string configuration;
+ private string configuration = "Debug";
private string targetType;
private string outputPath;
private string mainFile;
private string outputAssembly;
private bool emitDebugInformation;
- private string platform;
- private string temp;
-
- public JavaTask()
- {
- }
-
+ private string platform = "x86";
/// <summary>
/// Gets or sets the source files that will be compiled. Is called from script.
@@ -144,52 +139,48 @@ namespace IKVM.MSBuild
/// <summary>
/// Gets or sets the assembly references. Is called from script.
/// </summary>
- public ITaskItem[] References
+ public string[] References
{
get { return references; }
set { references = value; }
}
- /// <summary>
- /// Gets or sets the target framework version. Is called from script.
- /// </summary>
- public string TargetFrameworkVersion
- {
- get { return targetFrameworkVersion; }
- set { if (value != null && value.StartsWith("v")) targetFrameworkVersion = value.Substring(1); }
- }
-
protected override string ToolName
{
- get
- {
- return "ikvmc.exe";
- }
+ get { return "ikvmc.exe"; }
}
protected override string GenerateFullPathToTool()
{
- string location = Assembly.GetAssembly(this.GetType()).Location;
- location = new FileInfo(location).DirectoryName;
-
- string path = Path.GetFullPath(Path.Combine(location, ToolName));
- Log.LogWarning(path);
- return path;
+ return Path.Combine(GetAssemblyPath(), ToolName);
}
+ private static string GetAssemblyPath()
+ {
+ return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ }
+
+ private string GetIntermediatePath()
+ {
+ return Path.GetFullPath(Path.Combine(Path.Combine("obj", platform), configuration));
+ }
+
protected override string GenerateCommandLineCommands()
{
CommandLineBuilder commandLine = new CommandLineBuilder();
- if (EmitDebugInformation)
+
+ commandLine.AppendSwitch("-nologo");
+
+ if (EmitDebugInformation)
{
commandLine.AppendSwitch("-debug");
}
commandLine.AppendSwitch("-nostdlib");
- if (((outputAssembly == null) && (Sources != null)) && ((Sources.Length > 0)))
+ if (((outputAssembly == null) && (sources != null)) && ((sources.Length > 0)))
{
- outputAssembly = Path.GetFileNameWithoutExtension(this.Sources[0].ItemSpec);
+ outputAssembly = Path.GetFileNameWithoutExtension(sources[0].ItemSpec);
}
if (string.Equals(this.TargetType, "library", StringComparison.OrdinalIgnoreCase))
{
@@ -202,87 +193,33 @@ namespace IKVM.MSBuild
if (references != null)
{
-
- HashSet<string> addedReferences = new HashSet<string>();
- foreach (ITaskItem item in references)
+ foreach (string reference in references)
{
- string fileName = item.ItemSpec;
-
- if (IsIkvmStandardLibrary(fileName))
+ if (IsIkvmStandardLibrary(reference))
{
continue;
}
-
- string hintPath = item.GetMetadata("HintPath");
- if (hintPath != null && hintPath.Length != 0)
- {
- fileName = Path.GetFullPath(Path.Combine(GetCurrentFolder(), hintPath));
- }
- else
- {
- string versionStr;
- string requiredTargetFramework = item.GetMetadata("RequiredTargetFramework");
- if (requiredTargetFramework != null && requiredTargetFramework.Length != 0)
- {
- versionStr = requiredTargetFramework;
- }
- else
- {
- versionStr = targetFrameworkVersion;
- }
-
- IList<String> pathes = ToolLocationHelper.GetPathToReferenceAssemblies(".NETFramework", versionStr, "");
- foreach (String path in pathes)
- {
- string frameworkFileName = Path.Combine(path, fileName + ".dll");
- if (File.Exists(frameworkFileName))
- {
- fileName = frameworkFileName;
- break;
- }
- }
-
-
- }
- if (addedReferences.Add(fileName))
- {
- commandLine.AppendSwitchIfNotNull("-reference:", fileName);
- }
- }
- }
-
- if (Resources != null)
- {
- foreach (ITaskItem item in Resources)
- {
- commandLine.AppendSwitch("-resource:" + item.ItemSpec + "=" + GetFullPath(item.ItemSpec));
+ commandLine.AppendSwitchIfNotNull("-reference:", reference);
}
}
+ if (resources != null)
+ {
+ foreach (ITaskItem item in resources)
+ {
+ commandLine.AppendSwitch("-resource:" + item.ItemSpec + "=" + Path.GetFullPath(item.ItemSpec));
+ }
+ }
- commandLine.AppendSwitchIfNotNull("-out:", Path.Combine(outputPath, OutputAssembly));
+ commandLine.AppendSwitchIfNotNull("-out:", Path.Combine(GetIntermediatePath(), OutputAssembly));
if (TargetType != null)
{
- switch (TargetType.ToLower())
- {
- case "library":
- commandLine.AppendSwitch("-target:library");
- break;
- case "module":
- commandLine.AppendSwitch("-target:module");
- break;
- case "exe":
- commandLine.AppendSwitch("-target:exe");
- break;
- case "winexe":
- commandLine.AppendSwitch("-target:winexe");
- break;
- }
+ commandLine.AppendSwitch("-target:" + TargetType.ToLower());
}
- commandLine.AppendSwitch("-recurse:" + Path.Combine(temp, "*.*"));
- Log.LogWarning(commandLine.ToString(), null);
+ commandLine.AppendSwitch("-recurse:" + GetClassesPath());
+ //Log.LogWarning(commandLine.ToString(), null);
return commandLine.ToString();
}
@@ -291,38 +228,155 @@ namespace IKVM.MSBuild
/// </summary>
public override bool Execute()
{
- if (!RunJavac())
+ if (!GenerateStubs())
+ {
+ return false;
+ }
+
+ Stopwatch sw = Stopwatch.StartNew();
+ if (!RunJavac())
{
return false;
}
+ sw.Stop();
+ Log.LogMessage("Javac compilation time was {0} ms", sw.ElapsedMilliseconds);
CopyIkvm();
return base.Execute(); // run IKVMC
}
+ private string GetStubPath()
+ {
+ return Path.Combine("obj", "stubs");
+ }
+
+ private bool GenerateStubs()
+ {
+ // we start by creating the stubs for the boot classes
+ string stubpath = GetStubPath();
+ Directory.CreateDirectory(stubpath);
+ // note that File.GetLastWriteTime() returns Jan 1st, 1601 for non-existing files, so that works out nicely
+ if (File.GetLastWriteTime(Path.Combine(stubpath, "rt.jar")) < File.GetLastWriteTime(Path.Combine(GetAssemblyPath(), "IKVM.OpenJDK.Core.dll")))
+ {
+ if (!GenerateStub("IKVM.OpenJDK.Core", Path.Combine(stubpath, "rt.jar")))
+ {
+ return false;
+ }
+ }
+ // now generate stubs for the referenced assemblies
+ Dictionary<string, string> stubs = new Dictionary<string, string>();
+ using (IKVM.Reflection.Universe universe = new IKVM.Reflection.Universe(IKVM.Reflection.UniverseOptions.MetadataOnly))
+ {
+ foreach (string reference in references)
+ {
+ using (IKVM.Reflection.RawModule module = universe.OpenRawModule(reference))
+ {
+ string fileName = Path.Combine(stubpath, module.GetAssemblyName().Name + "__" + module.ModuleVersionId.ToString("N") + ".jar");
+ stubs.Add(fileName, null);
+ if (!File.Exists(fileName))
+ {
+ if (!GenerateStub(reference, fileName))
+ {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ // clean up any left-over stubs
+ foreach (string file in Directory.GetFiles(stubpath, "*.jar"))
+ {
+ if (!stubs.ContainsKey(file) && Path.GetFileName(file) != "rt.jar")
+ {
+ File.Delete(file);
+ }
+ }
+ return true;
+ }
+
+ private static bool GenerateStub(string assemblyFile, string outputFile)
+ {
+ ProcessStartInfo psi = new ProcessStartInfo(Path.Combine(GetAssemblyPath(), "ikvmstub.exe"), "-shared \"-out:" + outputFile + "\" \"-lib:" + GetAssemblyPath() + "\" \"" + assemblyFile + "\"");
+ psi.UseShellExecute = false;
+ using (Process p = Process.Start(psi))
+ {
+ p.WaitForExit();
+ return p.ExitCode == 0;
+ }
+ }
+
+ private string GetClassesPath()
+ {
+ return Path.Combine(Path.Combine("obj", "classes"), configuration);
+ }
+
private bool RunJavac()
{
- List<String> paramList = new List<String>();
-
- temp = GetFullPath(Path.Combine("obj", platform, configuration));
- paramList.Add("-d");
- paramList.Add(temp);
+ List<string> paramList = new List<string>();
+
+ paramList.Add("-bootclasspath");
+ paramList.Add(Path.Combine(GetStubPath(), "rt.jar"));
+
+ string stubpath = GetStubPath();
+ StringBuilder sb = new StringBuilder();
+ foreach (string file in Directory.GetFiles(stubpath, "*.jar"))
+ {
+ if (Path.GetFileName(file) != "rt.jar")
+ {
+ if (sb.Length != 0)
+ {
+ sb.Append(Path.PathSeparator);
+ }
+ sb.Append(file);
+ }
+ }
+ if (sb.Length != 0)
+ {
+ paramList.Add("-classpath");
+ paramList.Add(sb.ToString());
+ }
+
+ string classes = GetClassesPath();
+ Directory.CreateDirectory(classes);
+ paramList.Add("-d");
+ paramList.Add(classes);
+
+ if (emitDebugInformation)
+ {
+ paramList.Add("-g");
+ }
if (sources != null)
{
for (int i = 0; i < sources.Length; i++)
{
- string sourceFile = GetFullPath(sources[i].ItemSpec);
+ string sourceFile = Path.GetFullPath(sources[i].ItemSpec);
RemoveBOM(sourceFile);
paramList.Add(sourceFile);
}
}
- String[] parameters = paramList.ToArray();
- PrintWriter pw = new PrintWriter(new LogWriter(Log), true);
- int result = Javac.compile(parameters, pw);
- pw.close();
- return result == 0;
+
+ using (PrintWriter pw = new PrintWriter(new LogWriter(Log), true))
+ {
+ //StringBuilder sb = new StringBuilder();
+ //foreach (string str in paramList)
+ //{
+ // sb.Append('"').Append(str).Append("\" ");
+ //}
+ //ProcessStartInfo psi = new ProcessStartInfo(Path.Combine(GetAssemblyPath(), "javac.exe"), sb.ToString());
+ //psi.UseShellExecute = false;
+ //using (Process p = Process.Start(psi))
+ //{
+ // p.WaitForExit();
+ // if (p.ExitCode != 0)
+ // {
+ // return false;
+ // }
+ //}
+ //return true;
+ return Javac.compile(paramList.ToArray(), pw) == 0;
+ }
}
/// <summary>
@@ -330,14 +384,10 @@ namespace IKVM.MSBuild
/// </summary>
private void CopyIkvm()
{
- string location = Assembly.GetAssembly(this.GetType()).Location;
- FileInfo[] ikvmFiles = new FileInfo(location).Directory.GetFiles("*.dll");
-
-
- foreach (FileInfo file in ikvmFiles)
+ foreach (FileInfo file in new DirectoryInfo(GetAssemblyPath()).GetFiles("*.dll"))
{
string name = file.Name;
- if (IsIkvmStandardLibrary(name.Substring(0, name.Length - 4)))
+ if (IsIkvmStandardLibrary(name))
{
FileInfo target = new FileInfo(Path.Combine(outputPath, name));
if (!target.Exists || file.Length != target.Length || file.CreationTime != target.CreationTime)
@@ -363,15 +413,16 @@ namespace IKVM.MSBuild
/// <returns></returns>
private bool IsIkvmStandardLibrary(string fileName)
{
- if (fileName.Equals("IKVM.Runtime"))
+ string name = Path.GetFileNameWithoutExtension(fileName);
+ if (name == "IKVM.Runtime")
{
return true;
}
- if (fileName.Equals("IKVM.OpenJDK.Tools"))
+ if (name == "IKVM.OpenJDK.Tools")
{
return false;
}
- if (fileName.StartsWith("IKVM.OpenJDK."))
+ if (name.StartsWith("IKVM.OpenJDK."))
{
return true;
}
@@ -379,68 +430,43 @@ namespace IKVM.MSBuild
}
/// <summary>
- /// Gets the current folder where this task is being executed from.
- /// </summary>
- private string GetCurrentFolder()
- {
- return Directory.GetCurrentDirectory();
- }
-
- /// <summary>
- /// Takes a relative path to a file and turns it into the full path using the current folder
- /// as the base directory.
- /// </summary>
- private string GetFullPath(string fileName)
- {
- if (!Path.IsPathRooted(fileName))
- {
- return Path.GetFullPath(Path.Combine(GetCurrentFolder(), fileName));
- }
- return fileName;
- }
-
- /// <summary>
/// Java does not like a BOM at start of UTF8 coded files that we remove it
/// </summary>
/// <param name="fileName">The name of a Java source file</param>
private void RemoveBOM(string fileName)
{
- FileStream original = File.OpenRead(fileName);
- if (original.ReadByte() == 0xef && original.ReadByte() == 0xbb && original.ReadByte() == 0xbf)
- {
- //BOM detected
- string copyName = fileName + ".nobom";
- FileStream copy = File.OpenWrite(copyName);
- byte[] buffer = new byte[4096];
- int count;
- while ((count = original.Read(buffer, 0, buffer.Length)) > 0)
- {
- copy.Write(buffer, 0, count);
- }
- copy.Close();
- original.Close();
- File.Delete(fileName + ".withbom");
- File.Move(fileName, fileName + ".withbom");
- File.Move(copyName, fileName);
- File.Delete(fileName + ".withbom");
- return;
- }
- original.Close();
+ using (FileStream original = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read))
+ {
+ if (original.ReadByte() == 0xef && original.ReadByte() == 0xbb && original.ReadByte() == 0xbf)
+ {
+ //BOM detected
+ string copyName = fileName + ".nobom";
+ using (FileStream copy = File.OpenWrite(copyName))
+ {
+ byte[] buffer = new byte[4096];
+ int count;
+ while ((count = original.Read(buffer, 0, buffer.Length)) > 0)
+ {
+ copy.Write(buffer, 0, count);
+ }
+ }
+ File.Delete(fileName + ".withbom");
+ File.Move(fileName, fileName + ".withbom");
+ File.Move(copyName, fileName);
+ File.Delete(fileName + ".withbom");
+ }
+ }
}
/// <summary>
/// Redirect the output of the Java Compiler to the MSBUILD output
/// </summary>
- private class LogWriter : java.io.Writer
+ private sealed class LogWriter : java.io.Writer
{
private readonly StringBuilder builder = new StringBuilder();
private readonly TaskLoggingHelper log;
- private string fileName;
- private int lineNr;
- private bool error = true;
internal LogWriter(TaskLoggingHelper log)
- : base()
{
this.log = log;
}
@@ -454,7 +480,7 @@ namespace IKVM.MSBuild
{
if (builder.Length > 0)
{
- String msg = builder.ToString();
+ string msg = builder.ToString();
if (msg.EndsWith("\r\n"))
{
msg = msg.Substring(0, msg.Length - 2);
@@ -465,50 +491,35 @@ namespace IKVM.MSBuild
int idx = msg.IndexOf(':', 2);
if (idx > 0)
{
- fileName = msg.Substring(0, idx);
+ string fileName = msg.Substring(0, idx);
idx++;
int idx2 = msg.IndexOf(':', idx);
if (idx2 > 0)
{
+ int lineNr;
if (Int32.TryParse(msg.Substring(idx, idx2 - idx), out lineNr))
{
msg = msg.Substring(idx2 + 1);
idx = msg.IndexOf("error:");
if (idx >= 0)
{
- error = true;
msg = msg.Substring(idx + 6).Trim();
- }
+ log.LogError(null, null, null, fileName, lineNr, 0, lineNr, 0, msg);
+ }
else
{
idx = msg.IndexOf("warning:");
if (idx >= 0)
{
- error = false;
msg = msg.Substring(idx + 8).Trim();
- }
+ log.LogWarning(null, null, null, fileName, lineNr, 0, lineNr, 0, msg);
+ }
}
}
- else
- {
- lineNr = 0;
- }
- }
- else
- {
- lineNr = 0;
}
}
}
- if (error)
- {
- log.LogError(null, null, null, fileName, lineNr, 0, lineNr, 0, msg);
- }
- else
- {
- log.LogWarning(null, null, null, fileName, lineNr, 0, lineNr, 0, msg);
- }
- builder.Clear();
+ builder.Length = 0;
}
}
@@ -518,5 +529,4 @@ namespace IKVM.MSBuild
}
}
}
-
}
diff --git a/external/ikvm/msbuild/msbuild.build b/external/ikvm/msbuild/msbuild.build
index 17e2784..fc87b6a 100644
--- a/external/ikvm/msbuild/msbuild.build
+++ b/external/ikvm/msbuild/msbuild.build
@@ -1,11 +1,7 @@
<?xml version="1.0"?>
<project name="msbuild" default="msbuild">
<target name="msbuild">
- <property name="defs" value="STUB_GENERATOR;TRACE" />
- <if test="${property::exists('signed')}">
- <property name="defs" value="${defs};${signed}" />
- </if>
- <csc target="library" output="../bin/IKVM.MsBuild.dll" define="${defs}">
+ <csc target="library" output="../bin/IKVM.MSBuild.dll">
<sources>
<include name="AssemblyInfo.cs" />
<include name="JavaTask.cs" />
@@ -14,12 +10,11 @@
<include name="../bin/IKVM.OpenJDK.Core.dll" asis="true" />
<include name="../bin/IKVM.OpenJDK.Tools.dll" asis="true" />
<include name="Microsoft.Build.Framework.dll" asis="true" />
- <include name="Microsoft.Build.Tasks.v4.0.dll" asis="true" />
- <include name="Microsoft.Build.Utilities.v4.0.dll" asis="true" />
+ <include name="Microsoft.Build.Tasks.dll" asis="true" />
+ <include name="Microsoft.Build.Utilities.dll" asis="true" />
<include name="System.dll" asis="true" />
</references>
</csc>
- <copy file="IKVM.MSBuild.Java.Targets" tofile="../bin/IKVM.MSBuild.Java.Targets" overwrite="true">
- </copy>
+ <copy file="IKVM.MSBuild.Java.Targets" tofile="../bin/IKVM.MSBuild.Java.Targets" overwrite="true" />
</target>
</project>
diff --git a/external/ikvm/openjdk/AssemblyInfo.java.in b/external/ikvm/openjdk/AssemblyInfo.java.in
index ca079f2..37ae9b9 100644
--- a/external/ikvm/openjdk/AssemblyInfo.java.in
+++ b/external/ikvm/openjdk/AssemblyInfo.java.in
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006-2009 Jeroen Frijters
+ Copyright (C) 2006-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,28 +25,7 @@
@cli.System.Reflection.AssemblyCopyrightAttribute.Annotation(
"This software is licensed under the GNU General Public License version 2 + \"Classpath\" exception.\r\n" +
"See http://www.gnu.org/software/classpath/license.html for details.\r\n" +
- "Copyright (C) 1988 AT&T\r\n" +
- "Copyright (C) 2004 BEA Systems\r\n" +
- "Copyright (C) 1995 Colin Plumb\r\n" +
- "Copyright (C) 1999-2008 Free Software Foundation, Inc.\r\n" +
- "Copyright (C) 2001-2005 freebxml.org\r\n" +
- "Copyright (C) 1998 FundsXpress, Inc.\r\n" +
- "Copyright (C) 2008-2011 i-net software\r\n" +
- "Copyright (C) 2000-2007 INRIA, France Telecom\r\n" +
- "Copyright (C) 1993-2005 International Business Machines, Inc.\r\n" +
- "Copyright (C) 2002-2011 Jeroen Frijters\r\n" +
- "Copyright (C) 1993-2010 Oracle and/or its affiliates\r\n" +
- "Copyright (C) 2007 Red Hat, Inc.\r\n" +
- "Copyright (C) 1996-1998 Taligent, Inc.\r\n" +
- "Copyright (C) 2001-2002 Thai Open Source Software Center Ltd\r\n" +
- "Copyright (C) 1999-2006 The Apache Software Foundation\r\n" +
- "Copyright (C) 1995-2000 The Cryptix Foundation Limited\r\n" +
- "Copyright (C) 1997 The Open Group Research Institute\r\n" +
- "Copyright (C) 1991-2007 Unicode, Inc.\r\n" +
- "Copyright (C) 1999 Visual Numerics Inc.\r\n" +
- "Copyright (C) 2003 Wily Technology, Inc.\r\n" +
- "Copyright (C) 2000-2004 World Wide Web Consortium"
-)
+ at COPYRIGHT@)
@cli.System.Reflection.AssemblyTitleAttribute.Annotation("IKVM.NET OpenJDK Library for .NET")
@cli.System.Reflection.AssemblyProductAttribute.Annotation("IKVM.NET")
diff --git a/external/ikvm/openjdk/allsources.lst b/external/ikvm/openjdk/allsources.lst
index 9396052..5df16cb 100644
--- a/external/ikvm/openjdk/allsources.lst
+++ b/external/ikvm/openjdk/allsources.lst
@@ -7,7 +7,6 @@
../classpath/ikvm/internal/HasCallerID.java
../classpath/ikvm/internal/JMath.java
../classpath/ikvm/internal/MonoUtils.java
-../classpath/ikvm/internal/stubgen/StubGenerator.java
../classpath/ikvm/internal/Util.java
../classpath/ikvm/internal/WeakIdentityMap.java
../classpath/ikvm/io/InputStreamWrapper.java
@@ -20,6 +19,7 @@
../classpath/ikvm/runtime/AppDomainAssemblyClassLoader.java
../classpath/ikvm/runtime/ClassPathAssemblyClassLoader.java
../classpath/ikvm/runtime/Delegates.java
+../classpath/ikvm/runtime/EnumerationWrapper.java
../classpath/ikvm/runtime/Startup.java
../classpath/ikvm/runtime/Util.java
../classpath/java/util/concurrent/atomic/AtomicBoolean.java
@@ -132,6 +132,7 @@ java/util/concurrent/locks/LockSupport.java
java/util/ResourceBundle.java
java/util/TimeZone.java
java/util/zip/Adler32.java
+java/util/zip/ClassStubZipEntry.java
java/util/zip/CRC32.java
java/util/zip/Deflater.java
java/util/zip/DeflaterConstants.java
@@ -11392,8 +11393,10 @@ sun/security/jgss/wrapper/SunNativeProvider.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/im/SimpleInputMethodWindow.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/BufferedImageDevice.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/BufferedImageGraphicsConfig.java
+ at OPENJDK7@/jdk/src/share/classes/sun/awt/image/ByteArrayImageSource.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/ByteBandedRaster.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/ByteInterleavedRaster.java
+ at OPENJDK7@/jdk/src/share/classes/sun/awt/image/FileImageSource.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/ImageConsumerQueue.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/ImageDecoder.java
@OPENJDK7@/jdk/src/share/classes/sun/awt/image/ImageFetchable.java
@@ -11874,6 +11877,7 @@ sun/security/jgss/wrapper/SunNativeProvider.java
@OPENJDK7@/jdk/src/share/classes/sun/java2d/StateTrackableDelegate.java
@OPENJDK7@/jdk/src/share/classes/sun/java2d/StateTracker.java
@OPENJDK7@/jdk/src/share/classes/sun/java2d/Surface.java
+ at OPENJDK7@/jdk/src/share/classes/sun/launcher/LauncherHelper.java
@OPENJDK7@/jdk/src/share/classes/sun/management/Agent.java
@OPENJDK7@/jdk/src/share/classes/sun/management/AgentConfigurationError.java
@OPENJDK7@/jdk/src/share/classes/sun/management/ClassLoadingImpl.java
diff --git a/external/ikvm/openjdk/exclude.lst b/external/ikvm/openjdk/exclude.lst
index 05aff1e..e88cb6b 100644
--- a/external/ikvm/openjdk/exclude.lst
+++ b/external/ikvm/openjdk/exclude.lst
@@ -1,3 +1,5 @@
-java.lang.VMObject
-java.lang.VMString
-java.lang.VMThrowable
+^java\.lang\.AutoCloseable$
+^java\.lang\.Comparable$
+^java\.lang\.Object$
+^java\.lang\.String$
+^java\.lang\.Throwable$
diff --git a/external/ikvm/openjdk/java/awt/image/BufferedImage.java b/external/ikvm/openjdk/java/awt/image/BufferedImage.java
index 6984f50..33c9c27 100644
--- a/external/ikvm/openjdk/java/awt/image/BufferedImage.java
+++ b/external/ikvm/openjdk/java/awt/image/BufferedImage.java
@@ -687,8 +687,8 @@ public class BufferedImage extends java.awt.Image
{
throw new IllegalArgumentException();
}
+ bitmap = createBitmap(width, height);
synchronized( bitmap ) {
- bitmap = createBitmap(width, height);
cli.System.Drawing.Rectangle rect = new cli.System.Drawing.Rectangle(0, 0, width, height);
cli.System.Drawing.Imaging.BitmapData data = bitmap.LockBits(rect, ImageLockMode.wrap(ImageLockMode.WriteOnly), PixelFormat.wrap(PixelFormat.Format32bppArgb));
cli.System.IntPtr pixelPtr = data.get_Scan0();
diff --git a/external/ikvm/openjdk/java/lang/ClassLoader.java b/external/ikvm/openjdk/java/lang/ClassLoader.java
index d759584..8162ba8 100644
--- a/external/ikvm/openjdk/java/lang/ClassLoader.java
+++ b/external/ikvm/openjdk/java/lang/ClassLoader.java
@@ -286,7 +286,10 @@ public abstract class ClassLoader {
return null;
}
- private ClassLoader(Void unused, ClassLoader parent) {
+ // [IKVM] this normally private constructor is also used by ikvm.runtime.AssemblyClassLoader
+ // to construct an assembly class loader without doing a security check
+ @ikvm.lang.Internal
+ protected ClassLoader(Void unused, ClassLoader parent) {
if (parent != null) {
parent.check();
}
@@ -330,20 +333,6 @@ public abstract class ClassLoader {
this(checkCreateClassLoader(), parent);
}
- // private constructor for use by ikvm.runtime.AssemblyClassLoader
- // (to skip the security manager check)
- @ikvm.lang.Internal
- protected ClassLoader(ClassLoader parent, SecurityManager security) {
- this(checkCreateAssemblyClassLoader(security), parent);
- }
-
- private static Void checkCreateAssemblyClassLoader(SecurityManager security) {
- if (security != null) {
- security.checkCreateClassLoader();
- }
- return null;
- }
-
/**
* Creates a new class loader using the <tt>ClassLoader</tt> returned by
* the method {@link #getSystemClassLoader()
@@ -505,7 +494,7 @@ public abstract class ClassLoader {
}
// Invoked by the VM after loading class with this loader.
- private void checkPackageAccess(Class cls, ProtectionDomain pd) {
+ final void checkPackageAccess(Class cls, ProtectionDomain pd) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
final String name = cls.getName();
@@ -935,7 +924,7 @@ public abstract class ClassLoader {
String source);
// true if the name is null or has the potential to be a valid binary name
- private boolean checkName(String name) {
+ static boolean checkName(String name) {
if ((name == null) || (name.length() == 0))
return true;
if ((name.indexOf('/') != -1)
@@ -1326,29 +1315,13 @@ public abstract class ClassLoader {
/**
* Find resources from the VM's built-in classloader.
*/
- private static URL getBootstrapResource(String name) {
- URLClassPath ucp = getBootstrapClassPath();
- Resource res = ucp.getResource(name);
- return res != null ? res.getURL() : null;
- }
+ private static native URL getBootstrapResource(String name);
/**
* Find resources from the VM's built-in classloader.
*/
- private static Enumeration<URL> getBootstrapResources(String name)
- throws IOException
- {
- final Enumeration<Resource> e =
- getBootstrapClassPath().getResources(name);
- return new Enumeration<URL> () {
- public URL nextElement() {
- return e.nextElement().getURL();
- }
- public boolean hasMoreElements() {
- return e.hasMoreElements();
- }
- };
- }
+ private static native Enumeration<URL> getBootstrapResources(String name)
+ throws IOException;
// Returns the URLClassPath that is used for finding system resources.
static URLClassPath getBootstrapClassPath() {
diff --git a/external/ikvm/openjdk/java/lang/LangHelper.java b/external/ikvm/openjdk/java/lang/LangHelper.java
index 0b2a570..cc62d2c 100644
--- a/external/ikvm/openjdk/java/lang/LangHelper.java
+++ b/external/ikvm/openjdk/java/lang/LangHelper.java
@@ -46,7 +46,7 @@ public class LangHelper
if (!addedSystemPackages)
{
addedSystemPackages = true;
- String[] pkgs = AssemblyClassLoader.GetPackages(getBootstrapAssembly());
+ String[] pkgs = getBootClassPackages();
for (int i = 0; i < pkgs.length; i++)
{
pkgMap.put(pkgs[i],
@@ -62,6 +62,8 @@ public class LangHelper
}
}
}
+
+ private static native String[] getBootClassPackages();
/* this method gets called by Package.getSystemPackage() via a redefined method in map.xml */
static Package getSystemPackage(Map pkgs, String name)
@@ -84,21 +86,6 @@ public class LangHelper
}
}
- private static cli.System.Reflection.Assembly getBootstrapAssembly()
- {
- return ikvm.runtime.Util.getInstanceTypeFromClass(Object.class).get_Assembly();
- }
-
- static URL getBootstrapResource(String name)
- {
- return AssemblyClassLoader.getResource(null, getBootstrapAssembly(), name);
- }
-
- static Enumeration getBootstrapResources(String name) throws IOException
- {
- return AssemblyClassLoader.getResources(null, getBootstrapAssembly(), name);
- }
-
public static sun.misc.JavaLangAccess getJavaLangAccess()
{
return new sun.misc.JavaLangAccess() {
diff --git a/external/ikvm/openjdk/java/lang/Shutdown.java b/external/ikvm/openjdk/java/lang/Shutdown.java
index 494154d..947f0e3 100644
--- a/external/ikvm/openjdk/java/lang/Shutdown.java
+++ b/external/ikvm/openjdk/java/lang/Shutdown.java
@@ -28,6 +28,7 @@ package java.lang;
import cli.System.AppDomain;
import cli.System.EventArgs;
import cli.System.EventHandler;
+import cli.System.Threading.Monitor;
/**
* Package-private utility class containing data structures and logic
@@ -59,6 +60,9 @@ class Shutdown {
// the index of the currently running shutdown hook to the hooks array
private static int currentRunningHook = 0;
+ // [IKVM] have we registered the AppDomain.ProcessExit event handler?
+ private static boolean registeredProcessExit;
+
/* The preceding static fields are protected by this lock */
private static class Lock { };
private static Object lock = new Lock();
@@ -73,7 +77,7 @@ class Shutdown {
}
}
- static {
+ private static void registerProcessExit() {
try {
// MONOBUG Mono doesn't support starting a new thread during ProcessExit
// (and application shutdown hooks are based on threads)
@@ -130,6 +134,11 @@ class Shutdown {
throw new IllegalStateException("Shutdown in progress");
}
+ if (!registeredProcessExit) {
+ registeredProcessExit = true;
+ registerProcessExit();
+ }
+
hooks[slot] = hook;
}
}
@@ -258,8 +267,17 @@ class Shutdown {
break;
}
}
- synchronized (Shutdown.class) {
- sequence();
+ // [IKVM] We don't block here, because we're being called
+ // from the AppDomain.ProcessExit event and we don't want to
+ // deadlock with the thread that called exit.
+ // Note that our JNI DestroyJavaVM implementation doesn't
+ // call this method.
+ if (Monitor.TryEnter(Shutdown.class)) {
+ try {
+ sequence();
+ } finally {
+ Monitor.Exit(Shutdown.class);
+ }
}
}
diff --git a/external/ikvm/openjdk/java/lang/invoke/MethodHandles.java b/external/ikvm/openjdk/java/lang/invoke/MethodHandles.java
index ac57f5e..710d6ab 100644
--- a/external/ikvm/openjdk/java/lang/invoke/MethodHandles.java
+++ b/external/ikvm/openjdk/java/lang/invoke/MethodHandles.java
@@ -327,6 +327,9 @@ public class MethodHandles {
/** The allowed sorts of members which may be looked up (PUBLIC, etc.). */
private final int allowedModes;
+ // [IKVM] when dynamically linking method handle constants, we don't want a security manager check
+ private final boolean noSecurityCheck;
+
/** A single-bit mask representing {@code public} access,
* which may contribute to the result of {@link #lookupModes lookupModes}.
* The value, {@code 0x01}, happens to be the same as the value of the
@@ -420,8 +423,13 @@ public class MethodHandles {
}
private Lookup(Class<?> lookupClass, int allowedModes) {
+ this(lookupClass, allowedModes, false);
+ }
+
+ Lookup(Class<?> lookupClass, int allowedModes, boolean noSecurityCheck) {
this.lookupClass = lookupClass;
this.allowedModes = allowedModes;
+ this.noSecurityCheck = noSecurityCheck;
}
/**
@@ -1102,6 +1110,7 @@ return mh1;
* This function performs stack walk magic: do not refactor it.
*/
void checkSecurityManager(Class<?> refc, MemberName m) {
+ if (noSecurityCheck) return;
SecurityManager smgr = System.getSecurityManager();
if (smgr == null) return;
if (allowedModes == TRUSTED) return;
diff --git a/external/ikvm/openjdk/java/util/zip/ClassStubZipEntry.java b/external/ikvm/openjdk/java/util/zip/ClassStubZipEntry.java
new file mode 100644
index 0000000..6a2a6df
--- /dev/null
+++ b/external/ikvm/openjdk/java/util/zip/ClassStubZipEntry.java
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+package java.util.zip;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+
+final class ClassStubZipEntry extends ZipEntry
+{
+ private final String zipFilePath;
+
+ ClassStubZipEntry(String zipFilePath, String name)
+ {
+ super(name);
+ this.zipFilePath = zipFilePath;
+ }
+
+ private File getFile()
+ {
+ return new File(new File(zipFilePath).getParentFile().getParentFile(), "classes" + File.separator + name);
+ }
+
+ public long getSize()
+ {
+ if (size == -1)
+ {
+ size = getFile().length();
+ }
+ return size;
+ }
+
+ public long getCompressedSize()
+ {
+ if (csize == -1)
+ {
+ csize = getSize();
+ }
+ return csize;
+ }
+
+ public long getCrc()
+ {
+ if (crc == -1)
+ {
+ crc = computeCrc();
+ }
+ return crc;
+ }
+
+ private long computeCrc()
+ {
+ try (InputStream in = getInputStream())
+ {
+ CRC32 crc = new CRC32();
+ int b;
+ while ((b = in.read()) != -1)
+ {
+ crc.update(b);
+ }
+ return crc.getValue();
+ }
+ catch (IOException _)
+ {
+ return 0;
+ }
+ }
+
+ final InputStream getInputStream() throws IOException
+ {
+ return new FileInputStream(getFile());
+ }
+
+ static native void expandIkvmClasses(ZipFile zipFile, LinkedHashMap<String, ZipEntry> entries);
+}
diff --git a/external/ikvm/openjdk/java/util/zip/ZipFile.java b/external/ikvm/openjdk/java/util/zip/ZipFile.java
index db4b5cf..35fbc66 100644
--- a/external/ikvm/openjdk/java/util/zip/ZipFile.java
+++ b/external/ikvm/openjdk/java/util/zip/ZipFile.java
@@ -195,6 +195,7 @@ public class ZipFile implements ZipConstants, Closeable
try
{
readEntries();
+ ClassStubZipEntry.expandIkvmClasses(this, entries);
valid = true;
}
catch (EOFException _)
@@ -457,6 +458,9 @@ public class ZipFile implements ZipConstants, Closeable
if (zipEntry == null)
return null;
+ if (zipEntry instanceof ClassStubZipEntry)
+ return ((ClassStubZipEntry)zipEntry).getInputStream();
+
PartialInputStream inp = new PartialInputStream(1024) {
void lazyInitialSeek() throws IOException {
seek(zipEntry.offset);
@@ -481,7 +485,7 @@ public class ZipFile implements ZipConstants, Closeable
case ZipOutputStream.DEFLATED:
inp.addDummyByte();
final Inflater inf = new Inflater(true);
- final int sz = (int) entry.getSize();
+ final int sz = (int) zipEntry.getSize();
return new InflaterInputStream(inp, inf)
{
private boolean closed;
diff --git a/external/ikvm/openjdk/map.xml b/external/ikvm/openjdk/map.xml
index fd50749..5bc4cd4 100644
--- a/external/ikvm/openjdk/map.xml
+++ b/external/ikvm/openjdk/map.xml
@@ -1411,20 +1411,6 @@
<ret />
</body>
</constructor>
- <method name="getBootstrapResource" sig="(Ljava.lang.String;)Ljava.net.URL;">
- <body>
- <ldarg_0 />
- <call class="java.lang.LangHelper" name="getBootstrapResource" sig="(Ljava.lang.String;)Ljava.net.URL;" />
- <ret />
- </body>
- </method>
- <method name="getBootstrapResources" sig="(Ljava.lang.String;)Ljava.util.Enumeration;">
- <body>
- <ldarg_0 />
- <call class="java.lang.LangHelper" name="getBootstrapResources" sig="(Ljava.lang.String;)Ljava.util.Enumeration;" />
- <ret />
- </body>
- </method>
</class>
<class name="java.lang.Enum">
<implements class="cli.System.Runtime.Serialization.ISerializable" />
@@ -1684,7 +1670,7 @@
</method>
</class>
<class name="java.lang.Package">
- <method name="getSystemPackage" sig="(Ljava.lang.String;)Ljava.lang.Package;" modifiers="static">
+ <method name="getSystemPackage" sig="(Ljava.lang.String;)Ljava.lang.Package;">
<body>
<ldsfld class="java.lang.Package" name="pkgs" sig="Ljava.util.Map;" />
<ldarg_0 />
@@ -1692,7 +1678,7 @@
<ret />
</body>
</method>
- <method name="getSystemPackages" sig="()[Ljava.lang.Package;" modifiers="static">
+ <method name="getSystemPackages" sig="()[Ljava.lang.Package;">
<body>
<ldsfld class="java.lang.Package" name="pkgs" sig="Ljava.util.Map;" />
<call class="java.lang.LangHelper" name="getSystemPackages" sig="(Ljava.util.Map;)[Ljava.lang.Package;" />
diff --git a/external/ikvm/openjdk/openjdk.build b/external/ikvm/openjdk/openjdk.build
index 8730575..37f23b2 100644
--- a/external/ikvm/openjdk/openjdk.build
+++ b/external/ikvm/openjdk/openjdk.build
@@ -17,6 +17,11 @@
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
</target>
+ <target name="copyright" depends="allsources.gen.lst">
+ <exec program="${project::get-base-directory()}/../tools/SourceLicenseAnalyzer.exe" output="copyright.txt" useruntimeengine="true" />
+ <loadfile file="copyright.txt" property="COPYRIGHT" />
+ </target>
+
<target name="allsources.gen.lst">
<copy file="allsources.lst" tofile="allsources.gen.lst" outputencoding="ascii" overwrite="true">
<filterchain>
@@ -65,7 +70,7 @@
</delete>
</target>
- <target name="classes" depends="version allsources.gen.lst System.Core">
+ <target name="classes" depends="version copyright allsources.gen.lst System.Core">
<delete>
<fileset basedir="../classpath">
<include name="**.class"/>
@@ -104,6 +109,7 @@
<replacetokens>
<token key="RUNTIME" value="${IKVM.Runtime}" />
<token key="VERSION" value="${VERSION}" />
+ <token key="COPYRIGHT" value="${COPYRIGHT}" />
</replacetokens>
</filterchain>
</copy>
@@ -177,6 +183,7 @@
<include name="com/sun/swing/internal/plaf/**/*" />
<include name="com/sun/java/swing/plaf/**/*.properties" />
<include name="com/sun/java/swing/plaf/**/*.gif" />
+ <include name="sun/launcher/resources/*.properties" />
</fileset>
</zip>
</target>
@@ -206,6 +213,7 @@
<arg value="-r:mscorlib.dll" />
<arg value="-r:System.dll" />
<arg value="-r:System.Core.dll" unless="${SkipSystemCoreDependency}" />
+ <arg value="-r:System.Xml.dll" />
<arg value="-r:IKVM.Runtime.dll" />
<!-- we already know that the JNI assembly is not available, so suppress the warning -->
<arg value="-nowarn:110" />
diff --git a/external/ikvm/openjdk/response.txt b/external/ikvm/openjdk/response.txt
index 1cd9426..9dca143 100644
--- a/external/ikvm/openjdk/response.txt
+++ b/external/ikvm/openjdk/response.txt
@@ -29,9 +29,6 @@ assembly.class
-exclude:exclude.lst
-resource:java/lang/uniName.dat=@OPENJDK7@/build/linux-amd64/classes/java/lang/uniName.dat
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/MANIFEST.MF
- -recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/mailcap.default
- -recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/mimetypes.default
- -recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/sun/launcher/resources/launcher.properties
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/sun/net/idn/uidna.spp
ikvm/internal/*.class
java/io/*.class
@@ -58,7 +55,6 @@ assembly.class
../classpath/gnu/java/net/protocol/ikvmres/*.class
../classpath/ikvm/extensions/*.class
../classpath/ikvm/internal/*.class
- ../classpath/ikvm/internal/stubgen/*.class
../classpath/ikvm/io/*.class
../classpath/ikvm/lang/*.class
../classpath/ikvm/runtime/*.class
@@ -171,7 +167,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Corba.dll
- -baseaddress:0x56C90000
+ -baseaddress:0x56C60000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/corba/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/jndi/cosnaming/jndiprovider.properties
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/corba/se/impl/activation/*.class
@@ -289,7 +285,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.API.dll
- -baseaddress:0x572F0000
+ -baseaddress:0x572C0000
@OPENJDK7@/build/linux-amd64/impsrc/javax/xml/*.class
@OPENJDK7@/build/linux-amd64/impsrc/javax/xml/datatype/*.class
@OPENJDK7@/build/linux-amd64/impsrc/javax/xml/namespace/*.class
@@ -322,7 +318,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.XPath.dll
- -baseaddress:0x573B0000
+ -baseaddress:0x57380000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/org/apache/xalan/internal/res/*
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/apache/xalan/internal/extensions/*.class
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/apache/xalan/internal/res/*.class
@@ -347,7 +343,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.Parse.dll
- -baseaddress:0x57710000
+ -baseaddress:0x576E0000
-resource:com/sun/org/apache/xml/internal/serialize/HTMLEntities.res=@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/apache/xml/internal/serialize/HTMLEntities.res
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/org/apache/xerces/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/org/apache/xml/internal/serializer/*
@@ -408,7 +404,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.Transform.dll
- -baseaddress:0x57EC0000
+ -baseaddress:0x57E90000
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/java_cup/internal/runtime/*.class
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/apache/bcel/internal/*.class
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/apache/bcel/internal/classfile/*.class
@@ -432,7 +428,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.Bind.dll
- -baseaddress:0x58310000
+ -baseaddress:0x582E0000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/javax/xml/bind/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/xml/internal/bind/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/xml/internal/fastinfoset/*
@@ -491,7 +487,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.WebServices.dll
- -baseaddress:0x586A0000
+ -baseaddress:0x58670000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/xml/internal/messaging/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/xml/internal/ws/*
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/org/glassfish/external/amx/*.class
@@ -611,7 +607,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.XML.Crypto.dll
- -baseaddress:0x58C10000
+ -baseaddress:0x58BE0000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/org/apache/xml/internal/security/*
@OPENJDK7@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/*.class
@OPENJDK7@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/*.class
@@ -647,7 +643,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.SwingAWT.dll
- -baseaddress:0x58D60000
+ -baseaddress:0x58D30000
-remap:swingawt.xml
-resource:META-INF/services/sun.java2d.pipe.RenderingEngine=resources/META-INF/services/sun.java2d.pipe.RenderingEngine
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/services/sun.java2d.cmm.PCMM
@@ -747,7 +743,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Charsets.dll
- -baseaddress:0x59F60000
+ -baseaddress:0x59F30000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/charsets.jar/sun/nio/cs/ext/sjis0213.dat
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/charsets.jar/META-INF/services/java.nio.charset.spi.CharsetProvider
@OPENJDK7@/build/linux-amd64/gensrc/sun/nio/cs/ext/*.class
@@ -756,8 +752,9 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Util.dll
- -baseaddress:0x5A5F0000
+ -baseaddress:0x5A5C0000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/java/util/jar/pack/intrinsic.properties
+ -recurse:resources.zip/sun/launcher/resources/*
-resource:META-INF/services/java.nio.file.spi.FileSystemProvider=@OPENJDK7@/jdk/src/share/demo/nio/zipfs/src/META-INF/services/java.nio.file.spi.FileSystemProvider
java/util/zip/*.class
@OPENJDK7@/build/linux-amd64/gensrc/sun/util/logging/resources/*.class
@@ -769,6 +766,7 @@ assembly.class
@OPENJDK7@/jdk/src/share/classes/java/util/prefs/*.class
@OPENJDK7@/jdk/src/share/classes/java/util/spi/*.class
@OPENJDK7@/jdk/src/share/classes/java/util/zip/*.class
+ @OPENJDK7@/jdk/src/share/classes/sun/launcher/*.class
@OPENJDK7@/jdk/src/share/classes/sun/util/calendar/*.class
@OPENJDK7@/jdk/src/share/classes/sun/util/resources/*.class
@OPENJDK7@/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/*.class
@@ -995,7 +993,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Naming.dll
- -baseaddress:0x5BA60000
+ -baseaddress:0x5BA90000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/jndi/ldap/jndiprovider.properties
-resource:META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor=@OPENJDK7@/jdk/src/share/classes/sun/net/spi/nameservice/dns/META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor
sun/net/dns/*.class
@@ -1021,7 +1019,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Jdbc.dll
- -baseaddress:0x5BBB0000
+ -baseaddress:0x5BBE0000
-resource:META-INF/services/java.sql.Driver=resources/META-INF/services/java.sql.Driver
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/rowset/*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/javax/sql/*
@@ -1039,7 +1037,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Remoting.dll
- -baseaddress:0x5BD00000
+ -baseaddress:0x5BD30000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/sun/rmi/*
@OPENJDK7@/build/linux-amd64/classes/sun/rmi/registry/*.class
@OPENJDK7@/build/linux-amd64/classes/sun/rmi/server/*.class
@@ -1065,7 +1063,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Beans.dll
- -baseaddress:0x5BE20000
+ -baseaddress:0x5BE50000
@OPENJDK7@/build/linux-amd64/impsrc/com/sun/activation/registries/*.class
@OPENJDK7@/build/linux-amd64/impsrc/javax/activation/*.class
@OPENJDK7@/jdk/src/share/classes/com/sun/beans/*.class
@@ -1078,7 +1076,7 @@ assembly.class
}
{
-out:IKVM.OpenJDK.Media.dll
- -baseaddress:0x5BEE0000
+ -baseaddress:0x5BF10000
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/services/javax.print.*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/META-INF/services/javax.sound.*
-recurse:@OPENJDK7@/build/linux-amd64/j2re-image/lib/resources.jar/com/sun/imageio/plugins/common/iio-plugin.properties
diff --git a/external/ikvm/openjdk/sun/font/StandardGlyphVector.java b/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
index 72fd3cc..aec6572 100644
--- a/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
+++ b/external/ikvm/openjdk/sun/font/StandardGlyphVector.java
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 - 2011 Volker Berlin (i-net software)
+ Copyright (C) 2009 - 2013 Volker Berlin (i-net software)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -187,11 +187,18 @@ public class StandardGlyphVector extends GlyphVector{
}
@Override
- public Shape getGlyphOutline(int ix) {
- throw new NotYetImplementedError();
+ public Shape getGlyphOutline( int glyphIndex ) {
+ return getGlyphOutline( glyphIndex, 0, 0 );
}
@Override
+ public Shape getGlyphOutline( int glyphIndex, float x, float y ) {
+ initPositions();
+
+ return IkvmToolkit.DefaultToolkit.get().outline( font, frc, glyphs.substring( glyphIndex, glyphIndex + 1 ), x + positions[glyphIndex * 2], y );
+ }
+
+ @Override
public Point2D getGlyphPosition(int ix) {
initPositions();
diff --git a/external/ikvm/reflect/Assembly.cs b/external/ikvm/reflect/Assembly.cs
index 5f3a5fa..990c408 100644
--- a/external/ikvm/reflect/Assembly.cs
+++ b/external/ikvm/reflect/Assembly.cs
@@ -80,9 +80,9 @@ namespace IKVM.Reflection
// The differences between ResolveType and FindType are:
// - ResolveType is only used when a type is assumed to exist (because another module's metadata claims it)
// - ResolveType can return a MissingType
- internal Type ResolveType(TypeName typeName)
+ internal Type ResolveType(Module requester, TypeName typeName)
{
- return FindType(typeName) ?? universe.GetMissingTypeOrThrow(this.ManifestModule, null, typeName);
+ return FindType(typeName) ?? universe.GetMissingTypeOrThrow(requester, this.ManifestModule, null, typeName);
}
public string FullName
@@ -183,7 +183,7 @@ namespace IKVM.Reflection
{
throw new MissingAssemblyException((MissingAssembly)this);
}
- return parser.Expand(type, this, throwOnError, name, false, ignoreCase);
+ return parser.Expand(type, this.ManifestModule, throwOnError, name, false, ignoreCase);
}
public virtual Module LoadModule(string moduleName, byte[] rawModule)
diff --git a/external/ikvm/reflect/CustomAttributeData.cs b/external/ikvm/reflect/CustomAttributeData.cs
index 6c4c2a7..98905af 100644
--- a/external/ikvm/reflect/CustomAttributeData.cs
+++ b/external/ikvm/reflect/CustomAttributeData.cs
@@ -156,8 +156,8 @@ namespace IKVM.Reflection
{
throw new BadImageFormatException();
}
- lazyConstructorArguments = ReadConstructorArguments(asm, br, constructor);
- lazyNamedArguments = ReadNamedArguments(asm, br, br.ReadUInt16(), constructor.DeclaringType);
+ lazyConstructorArguments = ReadConstructorArguments(module, br, constructor);
+ lazyNamedArguments = ReadNamedArguments(module, br, br.ReadUInt16(), constructor.DeclaringType);
}
}
@@ -246,7 +246,7 @@ namespace IKVM.Reflection
int count = br.ReadCompressedUInt();
for (int j = 0; j < count; j++)
{
- Type type = ReadType(asm, br);
+ Type type = ReadType(module, br);
ConstructorInfo constructor = type.GetPseudoCustomAttributeConstructor(u.System_Security_Permissions_SecurityAction);
// LAMESPEC there is an additional length here (probably of the named argument list)
byte[] blob = br.ReadBytes(br.ReadCompressedUInt());
@@ -264,7 +264,7 @@ namespace IKVM.Reflection
string xml = new String(buf);
ConstructorInfo constructor = u.System_Security_Permissions_PermissionSetAttribute.GetPseudoCustomAttributeConstructor(u.System_Security_Permissions_SecurityAction);
List<CustomAttributeNamedArgument> args = new List<CustomAttributeNamedArgument>();
- args.Add(new CustomAttributeNamedArgument(GetProperty(u.System_Security_Permissions_PermissionSetAttribute, "XML", u.System_String),
+ args.Add(new CustomAttributeNamedArgument(GetProperty(null, u.System_Security_Permissions_PermissionSetAttribute, "XML", u.System_String),
new CustomAttributeTypedArgument(u.System_String, xml)));
list.Add(new CustomAttributeData(asm.ManifestModule, constructor, new object[] { action }, args));
}
@@ -284,9 +284,9 @@ namespace IKVM.Reflection
this.declSecurityBlob = blob;
}
- private static Type ReadFieldOrPropType(Assembly asm, ByteReader br)
+ private static Type ReadFieldOrPropType(Module context, ByteReader br)
{
- Universe u = asm.universe;
+ Universe u = context.universe;
switch (br.ReadByte())
{
case Signature.ELEMENT_TYPE_BOOLEAN:
@@ -316,9 +316,9 @@ namespace IKVM.Reflection
case Signature.ELEMENT_TYPE_STRING:
return u.System_String;
case Signature.ELEMENT_TYPE_SZARRAY:
- return ReadFieldOrPropType(asm, br).MakeArrayType();
+ return ReadFieldOrPropType(context, br).MakeArrayType();
case 0x55:
- return ReadType(asm, br);
+ return ReadType(context, br);
case 0x50:
return u.System_Type;
case 0x51:
@@ -328,9 +328,9 @@ namespace IKVM.Reflection
}
}
- private static CustomAttributeTypedArgument ReadFixedArg(Assembly asm, ByteReader br, Type type)
+ private static CustomAttributeTypedArgument ReadFixedArg(Module context, ByteReader br, Type type)
{
- Universe u = asm.universe;
+ Universe u = context.universe;
if (type == u.System_String)
{
return new CustomAttributeTypedArgument(type, br.ReadString());
@@ -385,11 +385,11 @@ namespace IKVM.Reflection
}
else if (type == u.System_Type)
{
- return new CustomAttributeTypedArgument(type, ReadType(asm, br));
+ return new CustomAttributeTypedArgument(type, ReadType(context, br));
}
else if (type == u.System_Object)
{
- return ReadFixedArg(asm, br, ReadFieldOrPropType(asm, br));
+ return ReadFixedArg(context, br, ReadFieldOrPropType(context, br));
}
else if (type.IsArray)
{
@@ -402,13 +402,13 @@ namespace IKVM.Reflection
CustomAttributeTypedArgument[] array = new CustomAttributeTypedArgument[length];
for (int i = 0; i < length; i++)
{
- array[i] = ReadFixedArg(asm, br, elementType);
+ array[i] = ReadFixedArg(context, br, elementType);
}
return new CustomAttributeTypedArgument(type, array);
}
else if (type.IsEnum)
{
- return new CustomAttributeTypedArgument(type, ReadFixedArg(asm, br, type.GetEnumUnderlyingTypeImpl()).Value);
+ return new CustomAttributeTypedArgument(type, ReadFixedArg(context, br, type.GetEnumUnderlyingTypeImpl()).Value);
}
else
{
@@ -416,7 +416,7 @@ namespace IKVM.Reflection
}
}
- private static Type ReadType(Assembly asm, ByteReader br)
+ private static Type ReadType(Module context, ByteReader br)
{
string typeName = br.ReadString();
if (typeName == null)
@@ -428,38 +428,38 @@ namespace IKVM.Reflection
// there are broken compilers that emit an extra NUL character after the type name
typeName = typeName.Substring(0, typeName.Length - 1);
}
- return TypeNameParser.Parse(typeName, true).GetType(asm.universe, asm, true, typeName, true, false);
+ return TypeNameParser.Parse(typeName, true).GetType(context.universe, context, true, typeName, true, false);
}
- private static IList<CustomAttributeTypedArgument> ReadConstructorArguments(Assembly asm, ByteReader br, ConstructorInfo constructor)
+ private static IList<CustomAttributeTypedArgument> ReadConstructorArguments(Module context, ByteReader br, ConstructorInfo constructor)
{
MethodSignature sig = constructor.MethodSignature;
int count = sig.GetParameterCount();
List<CustomAttributeTypedArgument> list = new List<CustomAttributeTypedArgument>(count);
for (int i = 0; i < count; i++)
{
- list.Add(ReadFixedArg(asm, br, sig.GetParameterType(i)));
+ list.Add(ReadFixedArg(context, br, sig.GetParameterType(i)));
}
return list.AsReadOnly();
}
- private static IList<CustomAttributeNamedArgument> ReadNamedArguments(Assembly asm, ByteReader br, int named, Type type)
+ private static IList<CustomAttributeNamedArgument> ReadNamedArguments(Module context, ByteReader br, int named, Type type)
{
List<CustomAttributeNamedArgument> list = new List<CustomAttributeNamedArgument>(named);
for (int i = 0; i < named; i++)
{
byte fieldOrProperty = br.ReadByte();
- Type fieldOrPropertyType = ReadFieldOrPropType(asm, br);
+ Type fieldOrPropertyType = ReadFieldOrPropType(context, br);
string name = br.ReadString();
- CustomAttributeTypedArgument value = ReadFixedArg(asm, br, fieldOrPropertyType);
+ CustomAttributeTypedArgument value = ReadFixedArg(context, br, fieldOrPropertyType);
MemberInfo member;
switch (fieldOrProperty)
{
case 0x53:
- member = GetField(type, name, fieldOrPropertyType);
+ member = GetField(context, type, name, fieldOrPropertyType);
break;
case 0x54:
- member = GetProperty(type, name, fieldOrPropertyType);
+ member = GetProperty(context, type, name, fieldOrPropertyType);
break;
default:
throw new BadImageFormatException();
@@ -469,7 +469,7 @@ namespace IKVM.Reflection
return list.AsReadOnly();
}
- private static FieldInfo GetField(Type type, string name, Type fieldType)
+ private static FieldInfo GetField(Module context, Type type, string name, Type fieldType)
{
Type org = type;
for (; type != null && !type.__IsMissing; type = type.BaseType)
@@ -489,10 +489,10 @@ namespace IKVM.Reflection
}
FieldSignature sig = FieldSignature.Create(fieldType, new CustomModifiers());
return type.FindField(name, sig)
- ?? type.Module.universe.GetMissingFieldOrThrow(type, name, sig);
+ ?? type.Module.universe.GetMissingFieldOrThrow(context, type, name, sig);
}
- private static PropertyInfo GetProperty(Type type, string name, Type propertyType)
+ private static PropertyInfo GetProperty(Module context, Type type, string name, Type propertyType)
{
Type org = type;
for (; type != null && !type.__IsMissing; type = type.BaseType)
@@ -510,7 +510,8 @@ namespace IKVM.Reflection
{
type = org;
}
- return type.Module.universe.GetMissingPropertyOrThrow(type, name, PropertySignature.Create(CallingConventions.Standard | CallingConventions.HasThis, propertyType, null, new PackedCustomModifiers()));
+ return type.Module.universe.GetMissingPropertyOrThrow(context, type, name,
+ PropertySignature.Create(CallingConventions.Standard | CallingConventions.HasThis, propertyType, null, new PackedCustomModifiers()));
}
[Obsolete("Use AttributeType property instead.")]
@@ -601,7 +602,7 @@ namespace IKVM.Reflection
// 5) Unresolved declarative security
ByteReader br = new ByteReader(declSecurityBlob, 0, declSecurityBlob.Length);
// LAMESPEC the count of named arguments is a compressed integer (instead of UInt16 as NumNamed in custom attributes)
- lazyNamedArguments = ReadNamedArguments(module.Assembly, br, br.ReadCompressedUInt(), Constructor.DeclaringType);
+ lazyNamedArguments = ReadNamedArguments(module, br, br.ReadCompressedUInt(), Constructor.DeclaringType);
}
}
return lazyNamedArguments;
@@ -623,8 +624,8 @@ namespace IKVM.Reflection
{
throw new BadImageFormatException();
}
- lazyConstructorArguments = ReadConstructorArguments(module.Assembly, br, Constructor);
- lazyNamedArguments = ReadNamedArguments(module.Assembly, br, br.ReadUInt16(), Constructor.DeclaringType);
+ lazyConstructorArguments = ReadConstructorArguments(module, br, Constructor);
+ lazyNamedArguments = ReadNamedArguments(module, br, br.ReadUInt16(), Constructor.DeclaringType);
}
}
diff --git a/external/ikvm/reflect/CustomModifiers.cs b/external/ikvm/reflect/CustomModifiers.cs
index dade700..58a1639 100644
--- a/external/ikvm/reflect/CustomModifiers.cs
+++ b/external/ikvm/reflect/CustomModifiers.cs
@@ -200,6 +200,11 @@ namespace IKVM.Reflection
return sb.ToString();
}
+ public bool ContainsMissingType
+ {
+ get { return Type.ContainsMissingType(types); }
+ }
+
private Type[] GetRequiredOrOptional(bool required)
{
if (types == null)
diff --git a/external/ikvm/reflect/Emit/MethodBuilder.cs b/external/ikvm/reflect/Emit/MethodBuilder.cs
index 486e74c..8d46cdd 100644
--- a/external/ikvm/reflect/Emit/MethodBuilder.cs
+++ b/external/ikvm/reflect/Emit/MethodBuilder.cs
@@ -307,7 +307,7 @@ namespace IKVM.Reflection.Emit
}
this.ModuleBuilder.Param.AddVirtualRecord();
ParameterBuilder pb = new ParameterBuilder(this.ModuleBuilder, position, attributes, strParamName);
- if (parameters.Count == 0 || position > parameters[parameters.Count - 1].Position)
+ if (parameters.Count == 0 || position >= parameters[parameters.Count - 1].Position)
{
parameters.Add(pb);
}
diff --git a/external/ikvm/reflect/Emit/ModuleBuilder.cs b/external/ikvm/reflect/Emit/ModuleBuilder.cs
index 7a64f24..7e05892 100644
--- a/external/ikvm/reflect/Emit/ModuleBuilder.cs
+++ b/external/ikvm/reflect/Emit/ModuleBuilder.cs
@@ -401,6 +401,8 @@ namespace IKVM.Reflection.Emit
private int ExportType(Type type)
{
ExportedTypeTable.Record rec = new ExportedTypeTable.Record();
+ // HACK we should *not* set the TypeDefId in this case, but 2.0 and 3.5 peverify gives a warning if it is missing (4.5 doesn't)
+ rec.TypeDefId = type.MetadataToken;
rec.TypeName = this.Strings.Add(type.__Name);
string ns = type.__Namespace;
rec.TypeNamespace = ns == null ? 0 : this.Strings.Add(ns);
@@ -936,15 +938,19 @@ namespace IKVM.Reflection.Emit
{
int type;
int size;
- if (imageFileMachine == ImageFileMachine.I386)
+ switch (imageFileMachine)
{
- type = 0x05;
- size = 4;
- }
- else
- {
- type = 0x06;
- size = 8;
+ case ImageFileMachine.I386:
+ case ImageFileMachine.ARM:
+ type = 0x05;
+ size = 4;
+ break;
+ case ImageFileMachine.AMD64:
+ type = 0x06;
+ size = 8;
+ break;
+ default:
+ throw new NotSupportedException();
}
List<MethodBuilder> methods = new List<MethodBuilder>();
for (int i = 0; i < unmanagedExports.Count; i++)
diff --git a/external/ikvm/reflect/Fusion.cs b/external/ikvm/reflect/Fusion.cs
index 0d0f8ec..5627ce2 100644
--- a/external/ikvm/reflect/Fusion.cs
+++ b/external/ikvm/reflect/Fusion.cs
@@ -112,6 +112,10 @@ namespace IKVM.Reflection
}
else if (name1.PublicKeyToken != name2.PublicKeyToken)
{
+ if (HasPclRuntimeRemapping (name1, name2)) {
+ result = AssemblyComparisonResult.EquivalentFXUnified;
+ return true;
+ }
result = AssemblyComparisonResult.NonEquivalent;
return false;
}
@@ -120,7 +124,7 @@ namespace IKVM.Reflection
result = AssemblyComparisonResult.EquivalentPartialMatch;
return true;
}
- else if (IsFrameworkAssembly(name2))
+ else if (IsFrameworkAssembly(name2) || IsFacadeAssembly(name2))
{
result = partial ? AssemblyComparisonResult.EquivalentPartialFXUnified : AssemblyComparisonResult.EquivalentFXUnified;
return true;
@@ -174,6 +178,51 @@ namespace IKVM.Reflection
}
}
+ #region PCL Runtime Remapping
+
+ // keep this in sync with the key_remap_table in mono/metadata/assembly.c
+
+ const string SILVERLIGHT_KEY = "7cec85d7bea7798e";
+ const string WINFX_KEY = "31bf3856ad364e35";
+ const string ECMA_KEY = "b77a5c561934e089";
+ const string MSFINAL_KEY = "b03f5f7f11d50a3a";
+
+ static readonly string[,] key_remap_table = new string[,] {
+ { "Microsoft.CSharp", WINFX_KEY, MSFINAL_KEY },
+ { "System", SILVERLIGHT_KEY, ECMA_KEY },
+ { "System.ComponentModel.Composition", WINFX_KEY, ECMA_KEY },
+ { "System.ComponentModel.DataAnnotations", "ddd0da4d3e678217", WINFX_KEY },
+ { "System.Core", SILVERLIGHT_KEY, ECMA_KEY },
+ // FIXME: MS uses MSFINAL_KEY for .NET 4.5
+ { "System.Net", SILVERLIGHT_KEY, ECMA_KEY },
+ { "System.Numerics", WINFX_KEY, MSFINAL_KEY },
+ { "System.Runtime.Serialization", SILVERLIGHT_KEY, ECMA_KEY },
+ { "System.ServiceModel", WINFX_KEY, ECMA_KEY },
+ { "System.ServiceModel.Web", SILVERLIGHT_KEY, WINFX_KEY },
+ { "System.Windows", SILVERLIGHT_KEY, MSFINAL_KEY },
+ { "System.Xml", SILVERLIGHT_KEY, ECMA_KEY },
+ { "System.Xml.Linq", WINFX_KEY, ECMA_KEY },
+ { "System.Xml.Serialization", WINFX_KEY, MSFINAL_KEY }
+ };
+
+ static bool HasPclRuntimeRemapping(ParsedAssemblyName name1, ParsedAssemblyName name2)
+ {
+ if (name1.Name != name2.Name)
+ return false;
+
+ for (int i = 0; i < key_remap_table.GetLength (0); i++) {
+ if (!name1.Name.Equals (key_remap_table [i,0]))
+ continue;
+ if (name1.PublicKeyToken.Equals (key_remap_table [i, 1]) &&
+ name2.PublicKeyToken.Equals (key_remap_table [i, 2]))
+ return true;
+ }
+
+ return false;
+ }
+
+ #endregion
+
static bool IsFrameworkAssembly(ParsedAssemblyName name)
{
// A list of FX assemblies which require some form of remapping
@@ -230,6 +279,57 @@ namespace IKVM.Reflection
return false;
}
+ static bool IsFacadeAssembly (ParsedAssemblyName name)
+ {
+ switch (name.Name) {
+ case "System.Collections":
+ case "System.Collections.Concurrent":
+ case "System.ComponentModel":
+ case "System.ComponentModel.Annotations":
+ case "System.ComponentModel.EventBasedAsync":
+ case "System.Diagnostics.Contracts":
+ case "System.Diagnostics.Debug":
+ case "System.Diagnostics.Tools":
+ case "System.Dynamic.Runtime":
+ case "System.Globalization":
+ case "System.IO":
+ case "System.Linq":
+ case "System.Linq.Expressions":
+ case "System.Linq.Parallel":
+ case "System.Linq.Queryable":
+ case "System.Net.NetworkInformation":
+ case "System.Net.Primitives":
+ case "System.Net.Requests":
+ case "System.ObjectModel":
+ case "System.Reflection":
+ case "System.Reflection.Extensions":
+ case "System.Reflection.Primitives":
+ case "System.Resources.ResourceManager":
+ case "System.Runtime":
+ case "System.Runtime.Extensions":
+ case "System.Runtime.InteropServices":
+ case "System.Runtime.Numerics":
+ case "System.Runtime.Serialization.Json":
+ case "System.Runtime.Serialization.Primitives":
+ case "System.Runtime.Serialization.Xml":
+ case "System.Security.Principal":
+ case "System.ServiceModel.Http":
+ case "System.ServiceModel.Primitives":
+ case "System.Text.Encoding":
+ case "System.Text.Encoding.Extensions":
+ case "System.Text.RegularExpressions":
+ case "System.Threading":
+ case "System.Threading.Tasks":
+ case "System.Threading.Tasks.Parallel":
+ case "System.Xml.ReaderWriter":
+ case "System.Xml.XDocument":
+ case "System.Xml.XmlSerializer":
+ return name.PublicKeyToken == "b03f5f7f11d50a3a";
+ default:
+ return false;
+ }
+ }
+
internal static ParseAssemblyResult ParseAssemblySimpleName(string fullName, out int pos, out string simpleName)
{
StringBuilder sb = new StringBuilder();
diff --git a/external/ikvm/reflect/IKVM.Reflection.csproj b/external/ikvm/reflect/IKVM.Reflection.csproj
index 16004ad..a994c96 100644
--- a/external/ikvm/reflect/IKVM.Reflection.csproj
+++ b/external/ikvm/reflect/IKVM.Reflection.csproj
@@ -22,6 +22,8 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\ikvm-fork.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
diff --git a/external/ikvm/reflect/MarshalSpec.cs b/external/ikvm/reflect/MarshalSpec.cs
index ee5314d..0370ada 100644
--- a/external/ikvm/reflect/MarshalSpec.cs
+++ b/external/ikvm/reflect/MarshalSpec.cs
@@ -115,7 +115,7 @@ namespace IKVM.Reflection
TypeNameParser parser = TypeNameParser.Parse(fm.MarshalType, false);
if (!parser.Error)
{
- fm.MarshalTypeRef = parser.GetType(module.universe, module.Assembly, false, fm.MarshalType, false, false);
+ fm.MarshalTypeRef = parser.GetType(module.universe, module, false, fm.MarshalType, false, false);
}
}
return true;
diff --git a/external/ikvm/reflect/MethodBody.cs b/external/ikvm/reflect/MethodBody.cs
index fc26f6f..b39571e 100644
--- a/external/ikvm/reflect/MethodBody.cs
+++ b/external/ikvm/reflect/MethodBody.cs
@@ -49,8 +49,9 @@ namespace IKVM.Reflection
List<ExceptionHandlingClause> exceptionClauses = new List<ExceptionHandlingClause>();
List<LocalVariableInfo> locals = new List<LocalVariableInfo>();
+ Stream stream = module.GetStream();
module.SeekRVA(rva);
- BinaryReader br = new BinaryReader(module.stream);
+ BinaryReader br = new BinaryReader(stream);
byte b = br.ReadByte();
if ((b & 3) == CorILMethod_TinyFormat)
{
@@ -72,7 +73,7 @@ namespace IKVM.Reflection
body = br.ReadBytes(codeLength);
if ((b & CorILMethod_MoreSects) != 0)
{
- module.stream.Position = (module.stream.Position + 3) & ~3;
+ stream.Position = (stream.Position + 3) & ~3;
int hdr = br.ReadInt32();
if ((hdr & CorILMethod_Sect_MoreSects) != 0 || (hdr & CorILMethod_Sect_EHTable) == 0)
{
diff --git a/external/ikvm/reflect/MethodSignature.cs b/external/ikvm/reflect/MethodSignature.cs
index 9a3c314..2851255 100644
--- a/external/ikvm/reflect/MethodSignature.cs
+++ b/external/ikvm/reflect/MethodSignature.cs
@@ -441,6 +441,21 @@ namespace IKVM.Reflection
return new PackedCustomModifiers(expanded);
}
+ internal bool ContainsMissingType
+ {
+ get
+ {
+ for (int i = 0; i < customModifiers.Length; i++)
+ {
+ if (customModifiers[i].ContainsMissingType)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
// this method make a copy of the incoming arrays (where necessary) and returns a normalized modifiers array
internal static PackedCustomModifiers CreateFromExternal(Type[] returnOptional, Type[] returnRequired, Type[][] parameterOptional, Type[][] parameterRequired, int parameterCount)
{
diff --git a/external/ikvm/reflect/Missing.cs b/external/ikvm/reflect/Missing.cs
index 67c0a85..a438fea 100644
--- a/external/ikvm/reflect/Missing.cs
+++ b/external/ikvm/reflect/Missing.cs
@@ -144,7 +144,7 @@ namespace IKVM.Reflection
internal MissingAssembly(Universe universe, string name)
: base(universe)
{
- module = new MissingModule(this);
+ module = new MissingModule(this, -1);
this.fullName = name;
}
@@ -237,11 +237,13 @@ namespace IKVM.Reflection
sealed class MissingModule : NonPEModule
{
private readonly Assembly assembly;
+ private readonly int index;
- internal MissingModule(Assembly assembly)
+ internal MissingModule(Assembly assembly, int index)
: base(assembly.universe)
{
this.assembly = assembly;
+ this.index = index;
}
public override int MDStreamVersion
@@ -261,7 +263,14 @@ namespace IKVM.Reflection
public override string Name
{
- get { throw new MissingModuleException(this); }
+ get
+ {
+ if (index == -1)
+ {
+ throw new MissingModuleException(this);
+ }
+ return assembly.ManifestModule.GetString(assembly.ManifestModule.File.records[index].Name);
+ }
}
public override Guid ModuleVersionId
@@ -343,6 +352,23 @@ namespace IKVM.Reflection
{
return new MissingModuleException(this);
}
+
+ public override byte[] __ModuleHash
+ {
+ get
+ {
+ if (index == -1)
+ {
+ throw new MissingModuleException(this);
+ }
+ if (assembly.ManifestModule.File.records[index].HashValue == 0)
+ {
+ return null;
+ }
+ IKVM.Reflection.Reader.ByteReader br = assembly.ManifestModule.GetBlob(assembly.ManifestModule.File.records[index].HashValue);
+ return br.ReadBytes(br.Length);
+ }
+ }
}
sealed class MissingType : Type
diff --git a/external/ikvm/reflect/Module.cs b/external/ikvm/reflect/Module.cs
index 240154c..0582984 100644
--- a/external/ikvm/reflect/Module.cs
+++ b/external/ikvm/reflect/Module.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009-2012 Jeroen Frijters
+ Copyright (C) 2009-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -78,7 +78,7 @@ namespace IKVM.Reflection
{
if (!imported)
{
- module.stream.Dispose();
+ module.Dispose();
}
}
@@ -207,7 +207,16 @@ namespace IKVM.Reflection
throw new NotSupportedException();
}
- public virtual bool __GetSectionInfo(int rva, out string name, out int characteristics)
+ public bool __GetSectionInfo(int rva, out string name, out int characteristics)
+ {
+ int virtualAddress;
+ int virtualSize;
+ int pointerToRawData;
+ int sizeOfRawData;
+ return __GetSectionInfo(rva, out name, out characteristics, out virtualAddress, out virtualSize, out pointerToRawData, out sizeOfRawData);
+ }
+
+ public virtual bool __GetSectionInfo(int rva, out string name, out int characteristics, out int virtualAddress, out int virtualSize, out int pointerToRawData, out int sizeOfRawData)
{
throw new NotSupportedException();
}
@@ -287,6 +296,11 @@ namespace IKVM.Reflection
throw new NotSupportedException();
}
+ public virtual CustomModifiers __ResolveTypeSpecCustomModifiers(int typeSpecToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
+ {
+ throw new NotSupportedException();
+ }
+
public int MetadataToken
{
get { return IsResource() ? 0 : 1; }
@@ -353,7 +367,7 @@ namespace IKVM.Reflection
{
throw new MissingModuleException((MissingModule)this);
}
- return parser.Expand(type, this.Assembly, throwOnError, className, false, ignoreCase);
+ return parser.Expand(type, this, throwOnError, className, false, ignoreCase);
}
public Type[] GetTypes()
diff --git a/external/ikvm/reflect/Reader/AssemblyReader.cs b/external/ikvm/reflect/Reader/AssemblyReader.cs
index c64189e..683d467 100644
--- a/external/ikvm/reflect/Reader/AssemblyReader.cs
+++ b/external/ikvm/reflect/Reader/AssemblyReader.cs
@@ -264,7 +264,7 @@ namespace IKVM.Reflection.Reader
}
if (universe.MissingMemberResolution)
{
- return externalModules[index] = new MissingModule(this);
+ return externalModules[index] = new MissingModule(this, index);
}
throw;
}
diff --git a/external/ikvm/reflect/Reader/GenericTypeParameter.cs b/external/ikvm/reflect/Reader/GenericTypeParameter.cs
index d0c7405..72fccf9 100644
--- a/external/ikvm/reflect/Reader/GenericTypeParameter.cs
+++ b/external/ikvm/reflect/Reader/GenericTypeParameter.cs
@@ -88,58 +88,10 @@ namespace IKVM.Reflection.Reader
get { return true; }
}
- public sealed override bool __ContainsMissingType
+ protected sealed override bool ContainsMissingTypeImpl
{
- get
- {
- bool freeList = false;
- try
- {
- foreach (Type type in GetGenericParameterConstraints())
- {
- if (type.__IsMissing)
- {
- return true;
- }
- else if (type.IsConstructedGenericType || type.HasElementType || type.__IsFunctionPointer)
- {
- // if a constructed type contains generic parameters,
- // it might contain this type parameter again and
- // to prevent infinite recurssion, we keep a thread local
- // list of type parameters we've already processed
- if (type.ContainsGenericParameters)
- {
- if (containsMissingTypeHack == null)
- {
- freeList = true;
- containsMissingTypeHack = new List<Type>();
- }
- else if (containsMissingTypeHack.Contains(this))
- {
- return false;
- }
- containsMissingTypeHack.Add(this);
- }
- if (type.__ContainsMissingType)
- {
- return true;
- }
- }
- }
- return false;
- }
- finally
- {
- if (freeList)
- {
- containsMissingTypeHack = null;
- }
- }
- }
+ get { return ContainsMissingType(GetGenericParameterConstraints()); }
}
-
- [ThreadStatic]
- private static List<Type> containsMissingTypeHack;
}
sealed class UnboundGenericMethodParameter : TypeParameterType
diff --git a/external/ikvm/reflect/Reader/ModuleReader.cs b/external/ikvm/reflect/Reader/ModuleReader.cs
index c771734..97c46e1 100644
--- a/external/ikvm/reflect/Reader/ModuleReader.cs
+++ b/external/ikvm/reflect/Reader/ModuleReader.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009-2012 Jeroen Frijters
+ Copyright (C) 2009-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -54,7 +54,7 @@ namespace IKVM.Reflection.Reader
sealed class ModuleReader : Module
{
- internal readonly Stream stream;
+ private readonly Stream stream;
private readonly string location;
private Assembly assembly;
private readonly PEReader peFile = new PEReader();
@@ -63,8 +63,10 @@ namespace IKVM.Reflection.Reader
private int metadataStreamVersion;
private byte[] stringHeap;
private byte[] blobHeap;
- private byte[] userStringHeap;
private byte[] guidHeap;
+ private uint userStringHeapOffset;
+ private uint userStringHeapSize;
+ private byte[] lazyUserStringHeap;
private TypeDefImpl[] typeDefs;
private TypeDefImpl moduleType;
private Assembly[] assemblyRefs;
@@ -96,9 +98,9 @@ namespace IKVM.Reflection.Reader
internal ModuleReader(AssemblyReader assembly, Universe universe, Stream stream, string location)
: base(universe)
{
- this.stream = stream;
+ this.stream = universe != null && universe.MetadataOnly ? null : stream;
this.location = location;
- Read();
+ Read(stream);
if (assembly == null && AssemblyTable.records.Length != 0)
{
assembly = new AssemblyReader(location, this);
@@ -106,7 +108,7 @@ namespace IKVM.Reflection.Reader
this.assembly = assembly;
}
- private void Read()
+ private void Read(Stream stream)
{
BinaryReader br = new BinaryReader(stream);
peFile.Read(br);
@@ -118,16 +120,17 @@ namespace IKVM.Reflection.Reader
switch (sh.Name)
{
case "#Strings":
- stringHeap = ReadHeap(stream, sh);
+ stringHeap = ReadHeap(stream, sh.Offset, sh.Size);
break;
case "#Blob":
- blobHeap = ReadHeap(stream, sh);
+ blobHeap = ReadHeap(stream, sh.Offset, sh.Size);
break;
case "#US":
- userStringHeap = ReadHeap(stream, sh);
+ userStringHeapOffset = sh.Offset;
+ userStringHeapSize = sh.Size;
break;
case "#GUID":
- guidHeap = ReadHeap(stream, sh);
+ guidHeap = ReadHeap(stream, sh.Offset, sh.Size);
break;
case "#~":
case "#-":
@@ -204,10 +207,10 @@ namespace IKVM.Reflection.Reader
}
}
- private byte[] ReadHeap(Stream stream, StreamHeader sh)
+ private byte[] ReadHeap(Stream stream, uint offset, uint size)
{
- byte[] buf = new byte[sh.Size];
- stream.Seek(peFile.RvaToFileOffset(cliHeader.MetaData.VirtualAddress + sh.Offset), SeekOrigin.Begin);
+ byte[] buf = new byte[size];
+ stream.Seek(peFile.RvaToFileOffset(cliHeader.MetaData.VirtualAddress + offset), SeekOrigin.Begin);
for (int pos = 0; pos < buf.Length; )
{
int read = stream.Read(buf, pos, buf.Length - pos);
@@ -222,7 +225,16 @@ namespace IKVM.Reflection.Reader
internal void SeekRVA(int rva)
{
- stream.Seek(peFile.RvaToFileOffset((uint)rva), SeekOrigin.Begin);
+ GetStream().Seek(peFile.RvaToFileOffset((uint)rva), SeekOrigin.Begin);
+ }
+
+ internal Stream GetStream()
+ {
+ if (stream == null)
+ {
+ throw new InvalidOperationException("Operation not available when UniverseOptions.MetadataOnly is enabled.");
+ }
+ return stream;
}
internal override void GetTypesImpl(List<Type> list)
@@ -331,12 +343,16 @@ namespace IKVM.Reflection.Reader
{
throw TokenOutOfRangeException(metadataToken);
}
+ if (lazyUserStringHeap == null)
+ {
+ lazyUserStringHeap = ReadHeap(GetStream(), userStringHeapOffset, userStringHeapSize);
+ }
int index = metadataToken & 0xFFFFFF;
- int len = ReadCompressedUInt(userStringHeap, ref index) & ~1;
+ int len = ReadCompressedUInt(lazyUserStringHeap, ref index) & ~1;
StringBuilder sb = new StringBuilder(len / 2);
for (int i = 0; i < len; i += 2)
{
- char ch = (char)(userStringHeap[index + i] | userStringHeap[index + i + 1] << 8);
+ char ch = (char)(lazyUserStringHeap[index + i] | lazyUserStringHeap[index + i + 1] << 8);
sb.Append(ch);
}
str = sb.ToString();
@@ -372,14 +388,14 @@ namespace IKVM.Reflection.Reader
{
Assembly assembly = ResolveAssemblyRef((scope & 0xFFFFFF) - 1);
TypeName typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName);
- typeRefs[index] = assembly.ResolveType(typeName);
+ typeRefs[index] = assembly.ResolveType(this, typeName);
break;
}
case TypeRefTable.Index:
{
Type outer = ResolveType(scope, null);
TypeName typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName);
- typeRefs[index] = outer.ResolveNestedType(typeName);
+ typeRefs[index] = outer.ResolveNestedType(this, typeName);
break;
}
case ModuleTable.Index:
@@ -402,7 +418,7 @@ namespace IKVM.Reflection.Reader
module = ResolveModuleRef(ModuleRef.records[(scope & 0xFFFFFF) - 1]);
}
TypeName typeName = GetTypeName(TypeRef.records[index].TypeNameSpace, TypeRef.records[index].TypeName);
- typeRefs[index] = module.FindType(typeName) ?? module.universe.GetMissingTypeOrThrow(module, null, typeName);
+ typeRefs[index] = module.FindType(typeName) ?? module.universe.GetMissingTypeOrThrow(this, module, null, typeName);
break;
}
default:
@@ -504,7 +520,7 @@ namespace IKVM.Reflection.Reader
rec.Culture == 0 ? "neutral" : GetString(rec.Culture),
(rec.Flags & PublicKey) == 0 ? "PublicKeyToken" : "PublicKey",
PublicKeyOrTokenToString(rec.PublicKeyOrToken));
- return universe.Load(name, this.Assembly, true);
+ return universe.Load(name, this, true);
}
private string PublicKeyOrTokenToString(int publicKeyOrToken)
@@ -743,6 +759,16 @@ namespace IKVM.Reflection.Reader
}
}
+ public override CustomModifiers __ResolveTypeSpecCustomModifiers(int typeSpecToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
+ {
+ int index = (typeSpecToken & 0xFFFFFF) - 1;
+ if (typeSpecToken >> 24 != TypeSpecTable.Index || index < 0 || index >= TypeSpec.RowCount)
+ {
+ throw TokenOutOfRangeException(typeSpecToken);
+ }
+ return CustomModifiers.Read(this, ByteReader.FromBlob(blobHeap, TypeSpec.records[index]), new GenericContext(genericTypeArguments, genericMethodArguments));
+ }
+
public override string ScopeName
{
get { return GetString(ModuleTable.records[0].Name); }
@@ -793,7 +819,7 @@ namespace IKVM.Reflection.Reader
{
MethodSignature methodSig = MethodSignature.ReadSig(this, ByteReader.FromBlob(blobHeap, sig), new GenericContext(genericTypeArguments, genericMethodArguments));
return type.FindMethod(name, methodSig)
- ?? universe.GetMissingMethodOrThrow(type, name, methodSig);
+ ?? universe.GetMissingMethodOrThrow(this, type, name, methodSig);
}
else if (type.IsConstructedGenericType)
{
@@ -843,7 +869,7 @@ namespace IKVM.Reflection.Reader
FieldInfo field = type.FindField(name, fieldSig);
if (field == null && universe.MissingMemberResolution)
{
- return universe.GetMissingFieldOrThrow(type, name, fieldSig);
+ return universe.GetMissingFieldOrThrow(this, type, name, fieldSig);
}
while (field == null && (type = type.BaseType) != null)
{
@@ -862,7 +888,7 @@ namespace IKVM.Reflection.Reader
MethodBase method = type.FindMethod(name, methodSig);
if (method == null && universe.MissingMemberResolution)
{
- return universe.GetMissingMethodOrThrow(type, name, methodSig);
+ return universe.GetMissingMethodOrThrow(this, type, name, methodSig);
}
while (method == null && (type = type.BaseType) != null)
{
@@ -1032,7 +1058,7 @@ namespace IKVM.Reflection.Reader
{
name.hash = GetBlobCopy(AssemblyRef.records[i].HashValue);
}
- name.Flags = (AssemblyNameFlags)AssemblyRef.records[i].Flags;
+ name.RawFlags = (AssemblyNameFlags)AssemblyRef.records[i].Flags;
list.Add(name);
}
return list.ToArray();
@@ -1092,12 +1118,12 @@ namespace IKVM.Reflection.Reader
switch (implementation >> 24)
{
case AssemblyRefTable.Index:
- return ResolveAssemblyRef((implementation & 0xFFFFFF) - 1).ResolveType(typeName).SetMetadataTokenForMissing(token, flags);
+ return ResolveAssemblyRef((implementation & 0xFFFFFF) - 1).ResolveType(this, typeName).SetMetadataTokenForMissing(token, flags);
case ExportedTypeTable.Index:
- return ResolveExportedType((implementation & 0xFFFFFF) - 1).ResolveNestedType(typeName).SetMetadataTokenForMissing(token, flags);
+ return ResolveExportedType((implementation & 0xFFFFFF) - 1).ResolveNestedType(this, typeName).SetMetadataTokenForMissing(token, flags);
case FileTable.Index:
Module module = assembly.GetModule(GetString(File.records[(implementation & 0xFFFFFF) - 1].Name));
- return module.FindType(typeName) ?? module.universe.GetMissingTypeOrThrow(module, null, typeName).SetMetadataTokenForMissing(token, flags);
+ return module.FindType(typeName) ?? module.universe.GetMissingTypeOrThrow(this, module, null, typeName).SetMetadataTokenForMissing(token, flags);
default:
throw new BadImageFormatException();
}
@@ -1129,9 +1155,9 @@ namespace IKVM.Reflection.Reader
return peFile.RvaToFileOffset((uint)rva);
}
- public override bool __GetSectionInfo(int rva, out string name, out int characteristics)
+ public override bool __GetSectionInfo(int rva, out string name, out int characteristics, out int virtualAddress, out int virtualSize, out int pointerToRawData, out int sizeOfRawData)
{
- return peFile.GetSectionInfo(rva, out name, out characteristics);
+ return peFile.GetSectionInfo(rva, out name, out characteristics, out virtualAddress, out virtualSize, out pointerToRawData, out sizeOfRawData);
}
public override int __ReadDataFromRVA(int rva, byte[] data, int offset, int length)
@@ -1222,7 +1248,10 @@ namespace IKVM.Reflection.Reader
internal override void Dispose()
{
- stream.Close();
+ if (stream != null)
+ {
+ stream.Close();
+ }
}
internal override void ExportTypes(int fileToken, IKVM.Reflection.Emit.ModuleBuilder manifestModule)
@@ -1264,7 +1293,7 @@ namespace IKVM.Reflection.Reader
#if !NO_AUTHENTICODE
public override System.Security.Cryptography.X509Certificates.X509Certificate GetSignerCertificate()
{
- return Authenticode.GetSignerCertificate(stream);
+ return Authenticode.GetSignerCertificate(GetStream());
}
#endif // !NO_AUTHENTICODE
}
diff --git a/external/ikvm/reflect/Reader/PEReader.cs b/external/ikvm/reflect/Reader/PEReader.cs
index 24152ce..a8dadb3 100644
--- a/external/ikvm/reflect/Reader/PEReader.cs
+++ b/external/ikvm/reflect/Reader/PEReader.cs
@@ -55,7 +55,13 @@ namespace IKVM.Reflection.Reader
throw new BadImageFormatException();
}
FileHeader.Read(br);
+ long optionalHeaderPosition = br.BaseStream.Position;
OptionalHeader.Read(br);
+ if (br.BaseStream.Position > optionalHeaderPosition + FileHeader.SizeOfOptionalHeader)
+ {
+ throw new BadImageFormatException();
+ }
+ br.BaseStream.Seek(optionalHeaderPosition + FileHeader.SizeOfOptionalHeader, SeekOrigin.Begin);
}
}
@@ -310,7 +316,7 @@ namespace IKVM.Reflection.Reader
throw new BadImageFormatException();
}
- internal bool GetSectionInfo(int rva, out string name, out int characteristics)
+ internal bool GetSectionInfo(int rva, out string name, out int characteristics, out int virtualAddress, out int virtualSize, out int pointerToRawData, out int sizeOfRawData)
{
for (int i = 0; i < sections.Length; i++)
{
@@ -318,11 +324,19 @@ namespace IKVM.Reflection.Reader
{
name = sections[i].Name;
characteristics = (int)sections[i].Characteristics;
+ virtualAddress = (int)sections[i].VirtualAddress;
+ virtualSize = (int)sections[i].VirtualSize;
+ pointerToRawData = (int)sections[i].PointerToRawData;
+ sizeOfRawData = (int)sections[i].SizeOfRawData;
return true;
}
}
name = null;
characteristics = 0;
+ virtualAddress = 0;
+ virtualSize = 0;
+ pointerToRawData = 0;
+ sizeOfRawData = 0;
return false;
}
}
diff --git a/external/ikvm/reflect/StandAloneMethodSig.cs b/external/ikvm/reflect/StandAloneMethodSig.cs
index 1d9425d..bbeee90 100644
--- a/external/ikvm/reflect/StandAloneMethodSig.cs
+++ b/external/ikvm/reflect/StandAloneMethodSig.cs
@@ -111,6 +111,17 @@ namespace IKVM.Reflection
return customModifiers.GetParameterCustomModifiers(index);
}
+ public bool ContainsMissingType
+ {
+ get
+ {
+ return returnType.__ContainsMissingType
+ || Type.ContainsMissingType(parameterTypes)
+ || Type.ContainsMissingType(optionalParameterTypes)
+ || customModifiers.ContainsMissingType;
+ }
+ }
+
internal int ParameterCount
{
get { return parameterTypes.Length + optionalParameterTypes.Length; }
diff --git a/external/ikvm/reflect/Type.cs b/external/ikvm/reflect/Type.cs
index 6b9852a..94dcfdd 100644
--- a/external/ikvm/reflect/Type.cs
+++ b/external/ikvm/reflect/Type.cs
@@ -67,6 +67,13 @@ namespace IKVM.Reflection
// for use by TypeDefImpl
NotGenericTypeDefinition = 128,
+
+ // used to cache __ContainsMissingType
+ ContainsMissingType_Unknown = 0,
+ ContainsMissingType_Pending = 256,
+ ContainsMissingType_Yes = 512,
+ ContainsMissingType_No = 256 | 512,
+ ContainsMissingType_Mask = 256 | 512,
}
// prevent subclassing by outsiders
@@ -1007,9 +1014,9 @@ namespace IKVM.Reflection
return GetConstructor(bindingAttr, binder, types, modifiers);
}
- internal Type ResolveNestedType(TypeName typeName)
+ internal Type ResolveNestedType(Module requester, TypeName typeName)
{
- return FindNestedType(typeName) ?? Module.universe.GetMissingTypeOrThrow(Module, this, typeName);
+ return FindNestedType(typeName) ?? Module.universe.GetMissingTypeOrThrow(requester, Module, this, typeName);
}
// unlike the public API, this takes the namespace and name into account
@@ -1342,22 +1349,44 @@ namespace IKVM.Reflection
get { return this.DeclaringType != null; }
}
- public virtual bool __ContainsMissingType
+ public bool __ContainsMissingType
{
get
{
- if (this.__IsMissing)
+ if ((typeFlags & TypeFlags.ContainsMissingType_Mask) == TypeFlags.ContainsMissingType_Unknown)
{
- return true;
+ // Generic parameter constraints can refer back to the type parameter they are part of,
+ // so to prevent infinite recursion, we set the Pending flag during computation.
+ typeFlags |= TypeFlags.ContainsMissingType_Pending;
+ typeFlags = (typeFlags & ~TypeFlags.ContainsMissingType_Mask) | (ContainsMissingTypeImpl ? TypeFlags.ContainsMissingType_Yes : TypeFlags.ContainsMissingType_No);
}
- foreach (Type arg in this.GetGenericArguments())
+ return (typeFlags & TypeFlags.ContainsMissingType_Mask) == TypeFlags.ContainsMissingType_Yes;
+ }
+ }
+
+ internal static bool ContainsMissingType(Type[] types)
+ {
+ if (types == null)
+ {
+ return false;
+ }
+ foreach (Type type in types)
+ {
+ if (type.__ContainsMissingType)
{
- if (arg.__ContainsMissingType)
- {
- return true;
- }
+ return true;
}
- return false;
+ }
+ return false;
+ }
+
+ protected virtual bool ContainsMissingTypeImpl
+ {
+ get
+ {
+ return __IsMissing
+ || ContainsMissingType(GetGenericArguments())
+ || __GetCustomModifiers().ContainsMissingType;
}
}
@@ -1919,7 +1948,7 @@ namespace IKVM.Reflection
MethodSignature methodSig = MethodSignature.MakeFromBuilder(u.System_Void, parameterTypes, new PackedCustomModifiers(), CallingConventions.Standard | CallingConventions.HasThis, 0);
MethodBase mb =
FindMethod(".ctor", methodSig) ??
- u.GetMissingMethodOrThrow(this, ".ctor", methodSig);
+ u.GetMissingMethodOrThrow(null, this, ".ctor", methodSig);
return (ConstructorInfo)mb;
}
@@ -2136,7 +2165,7 @@ namespace IKVM.Reflection
}
}
- public sealed override bool __ContainsMissingType
+ protected sealed override bool ContainsMissingTypeImpl
{
get
{
@@ -2145,7 +2174,8 @@ namespace IKVM.Reflection
{
type = type.GetElementType();
}
- return type.__ContainsMissingType;
+ return type.__ContainsMissingType
+ || mods.ContainsMissingType;
}
}
@@ -2605,6 +2635,8 @@ namespace IKVM.Reflection
internal static Type Make(Type type, Type[] typeArguments, CustomModifiers[] mods)
{
+ if (type.Universe.SupressReferenceTypeIdentityConversion)
+ return type.Universe.CanonicalizeType(new GenericTypeInstance(type, typeArguments, mods));
bool identity = true;
if (type is TypeBuilder || type is BakedType || type.__IsMissing)
{
@@ -2898,19 +2930,9 @@ namespace IKVM.Reflection
}
}
- public override bool __ContainsMissingType
+ protected override bool ContainsMissingTypeImpl
{
- get
- {
- foreach (Type type in args)
- {
- if (type.__ContainsMissingType)
- {
- return true;
- }
- }
- return this.type.__IsMissing;
- }
+ get { return type.__ContainsMissingType || ContainsMissingType(args); }
}
public override StructLayoutAttribute StructLayoutAttribute
@@ -3032,6 +3054,11 @@ namespace IKVM.Reflection
return "<FunctionPtr>";
}
+ protected override bool ContainsMissingTypeImpl
+ {
+ get { return sig.ContainsMissingType; }
+ }
+
internal override bool IsBaked
{
get { return true; }
@@ -3081,7 +3108,7 @@ namespace IKVM.Reflection
public override bool __IsMissing
{
- get { throw new InvalidOperationException(); }
+ get { return false; }
}
}
}
diff --git a/external/ikvm/reflect/TypeNameParser.cs b/external/ikvm/reflect/TypeNameParser.cs
index 781fe1b..db97373 100644
--- a/external/ikvm/reflect/TypeNameParser.cs
+++ b/external/ikvm/reflect/TypeNameParser.cs
@@ -455,7 +455,7 @@ namespace IKVM.Reflection
}
}
- internal Type GetType(Universe universe, Assembly context, bool throwOnError, string originalName, bool resolve, bool ignoreCase)
+ internal Type GetType(Universe universe, Module context, bool throwOnError, string originalName, bool resolve, bool ignoreCase)
{
Debug.Assert(!resolve || !ignoreCase);
TypeName name = TypeName.Split(this.name);
@@ -469,7 +469,7 @@ namespace IKVM.Reflection
}
if (resolve)
{
- type = asm.ResolveType(name);
+ type = asm.ResolveType(context, name);
}
else if (ignoreCase)
{
@@ -484,7 +484,7 @@ namespace IKVM.Reflection
{
if (resolve)
{
- type = universe.Mscorlib.ResolveType(name);
+ type = universe.Mscorlib.ResolveType(context, name);
}
else if (ignoreCase)
{
@@ -506,7 +506,7 @@ namespace IKVM.Reflection
{
type = context.FindType(name);
}
- if (type == null && context != universe.Mscorlib)
+ if (type == null && context != universe.Mscorlib.ManifestModule)
{
if (ignoreCase)
{
@@ -521,18 +521,18 @@ namespace IKVM.Reflection
{
if (universe.Mscorlib.__IsMissing && !context.__IsMissing)
{
- type = universe.Mscorlib.ResolveType(name);
+ type = universe.Mscorlib.ResolveType(context, name);
}
else
{
- type = context.ResolveType(name);
+ type = context.Assembly.ResolveType(context, name);
}
}
}
return Expand(type, context, throwOnError, originalName, resolve, ignoreCase);
}
- internal Type Expand(Type type, Assembly context, bool throwOnError, string originalName, bool resolve, bool ignoreCase)
+ internal Type Expand(Type type, Module context, bool throwOnError, string originalName, bool resolve, bool ignoreCase)
{
Debug.Assert(!resolve || !ignoreCase);
if (type == null)
@@ -557,7 +557,7 @@ namespace IKVM.Reflection
{
if (resolve)
{
- type = outer.Module.universe.GetMissingTypeOrThrow(outer.Module, outer, name);
+ type = outer.Module.universe.GetMissingTypeOrThrow(context, outer.Module, outer, name);
}
else if (throwOnError)
{
diff --git a/external/ikvm/reflect/Universe.cs b/external/ikvm/reflect/Universe.cs
index aa3b992..3a5222e 100644
--- a/external/ikvm/reflect/Universe.cs
+++ b/external/ikvm/reflect/Universe.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009-2012 Jeroen Frijters
+ Copyright (C) 2009-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -77,6 +77,46 @@ namespace IKVM.Reflection
public delegate Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
+ public delegate void ResolvedMissingMemberHandler(Module requestingModule, MemberInfo member);
+
+ /*
+ * UniverseOptions:
+ *
+ * None
+ * Default behavior, most compatible with System.Reflection[.Emit]
+ *
+ * EnableFunctionPointers
+ * Normally function pointers in signatures are replaced by System.IntPtr
+ * (for compatibility with System.Reflection), when this option is enabled
+ * they are represented as first class types (Type.__IsFunctionPointer will
+ * return true for them).
+ *
+ * DisableFusion
+ * Don't use native Fusion API to resolve assembly names.
+ *
+ * DisablePseudoCustomAttributeRetrieval
+ * Set this option to disable the generaton of pseudo-custom attributes
+ * when querying custom attributes.
+ *
+ * DontProvideAutomaticDefaultConstructor
+ * Normally TypeBuilder, like System.Reflection.Emit, will provide a default
+ * constructor for types that meet the requirements. By enabling this
+ * option this behavior is disabled.
+ *
+ * MetadataOnly
+ * By default, when a module is read in, the stream is kept open to satisfy
+ * subsequent lazy loading. In MetadataOnly mode only the metadata is read in
+ * and after that the stream is closed immediately. Subsequent lazy loading
+ * attempts will fail with an InvalidOperationException.
+ * APIs that are not available is MetadataOnly mode are:
+ * - Module.ResolveString()
+ * - Module.GetSignerCertificate()
+ * - Module.GetManifestResourceStream()
+ * - Module.__ReadDataFromRVA()
+ * - MethodBase.GetMethodBody()
+ * - FieldInfo.__GetDataFromRVA()
+ */
+
[Flags]
public enum UniverseOptions
{
@@ -85,6 +125,9 @@ namespace IKVM.Reflection
DisableFusion = 2,
DisablePseudoCustomAttributeRetrieval = 4,
DontProvideAutomaticDefaultConstructor = 8,
+ MetadataOnly = 16,
+ ResolveMissingMembers = 32,
+ SupressReferenceTypeIdentityConversion = 64
}
public sealed class Universe : IDisposable
@@ -101,6 +144,7 @@ namespace IKVM.Reflection
private readonly bool useNativeFusion;
private readonly bool returnPseudoCustomAttributes;
private readonly bool automaticallyProvideDefaultConstructor;
+ private readonly UniverseOptions options;
private Type typeof_System_Object;
private Type typeof_System_ValueType;
private Type typeof_System_Enum;
@@ -167,10 +211,12 @@ namespace IKVM.Reflection
public Universe(UniverseOptions options)
{
+ this.options = options;
enableFunctionPointers = (options & UniverseOptions.EnableFunctionPointers) != 0;
useNativeFusion = (options & UniverseOptions.DisableFusion) == 0 && GetUseNativeFusion();
returnPseudoCustomAttributes = (options & UniverseOptions.DisablePseudoCustomAttributeRetrieval) == 0;
automaticallyProvideDefaultConstructor = (options & UniverseOptions.DontProvideAutomaticDefaultConstructor) == 0;
+ resolveMissingMembers = (options & UniverseOptions.ResolveMissingMembers) != 0;
}
private static bool GetUseNativeFusion()
@@ -196,7 +242,7 @@ namespace IKVM.Reflection
{
if (Mscorlib.__IsMissing)
{
- return Mscorlib.ResolveType(new TypeName(type.Namespace, type.Name));
+ return Mscorlib.ResolveType(null, new TypeName(type.Namespace, type.Name));
}
// We use FindType instead of ResolveType here, because on some versions of mscorlib some of
// the special types we use/support are missing and the type properties are defined to
@@ -210,7 +256,7 @@ namespace IKVM.Reflection
// Primitive here means that these types have a special metadata encoding, which means that
// there can be references to them without referring to them by name explicitly.
// We want these types to be usable even when they don't exist in mscorlib or there is no mscorlib loaded.
- return Mscorlib.FindType(new TypeName("System", name)) ?? GetMissingType(Mscorlib.ManifestModule, null, new TypeName("System", name));
+ return Mscorlib.FindType(new TypeName("System", name)) ?? GetMissingType(null, Mscorlib.ManifestModule, null, new TypeName("System", name));
}
internal Type System_Object
@@ -576,20 +622,15 @@ namespace IKVM.Reflection
}
return Import(type.GetGenericTypeDefinition()).MakeGenericType(importedArgs);
}
- else if (type.IsNested)
- {
- // note that we can't pass in the namespace here, because .NET's Type.Namespace implementation is broken for nested types
- // (it returns the namespace of the declaring type)
- return Import(type.DeclaringType).ResolveNestedType(new TypeName(null, type.Name));
- }
else if (type.Assembly == typeof(object).Assembly)
{
// make sure mscorlib types always end up in our mscorlib
- return Mscorlib.ResolveType(new TypeName(type.Namespace, type.Name));
+ return ResolveType(Mscorlib, type.FullName);
}
else
{
- return Import(type.Assembly).ResolveType(new TypeName(type.Namespace, type.Name));
+ // FXBUG we parse the FullName here, because type.Namespace and type.Name are both broken on the CLR
+ return ResolveType(Import(type.Assembly), type.FullName);
}
}
@@ -601,7 +642,25 @@ namespace IKVM.Reflection
public RawModule OpenRawModule(string path)
{
path = Path.GetFullPath(path);
- return OpenRawModule(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read), path);
+ FileStream fs = null;
+ RawModule module;
+ try
+ {
+ fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
+ module = OpenRawModule(fs, path);
+ if (!MetadataOnly)
+ {
+ fs = null;
+ }
+ }
+ finally
+ {
+ if (fs != null)
+ {
+ fs.Close();
+ }
+ }
+ return module;
}
public RawModule OpenRawModule(Stream stream, string location)
@@ -697,7 +756,7 @@ namespace IKVM.Reflection
return Load(refname, null, true);
}
- internal Assembly Load(string refname, Assembly requestingAssembly, bool throwOnError)
+ internal Assembly Load(string refname, Module requestingModule, bool throwOnError)
{
Assembly asm = GetLoadedAssembly(refname);
if (asm != null)
@@ -710,7 +769,7 @@ namespace IKVM.Reflection
}
else
{
- ResolveEventArgs args = new ResolveEventArgs(refname, requestingAssembly);
+ ResolveEventArgs args = new ResolveEventArgs(refname, requestingModule == null ? null : requestingModule.Assembly);
foreach (ResolveEventHandler evt in resolvers)
{
asm = evt(this, args);
@@ -816,7 +875,7 @@ namespace IKVM.Reflection
{
return null;
}
- return parser.GetType(this, context, throwOnError, assemblyQualifiedTypeName, false, ignoreCase);
+ return parser.GetType(this, context == null ? null : context.ManifestModule, throwOnError, assemblyQualifiedTypeName, false, ignoreCase);
}
// this is similar to GetType(Assembly context, string assemblyQualifiedTypeName, bool throwOnError),
@@ -829,7 +888,7 @@ namespace IKVM.Reflection
{
return null;
}
- return parser.GetType(this, context, false, assemblyQualifiedTypeName, true, false);
+ return parser.GetType(this, context == null ? null : context.ManifestModule, false, assemblyQualifiedTypeName, true, false);
}
public Assembly[] GetAssemblies()
@@ -934,6 +993,7 @@ namespace IKVM.Reflection
return asm;
}
+ [Obsolete("Please set UniverseOptions.ResolveMissingMembers instead.")]
public void EnableMissingMemberResolution()
{
resolveMissingMembers = true;
@@ -977,7 +1037,7 @@ namespace IKVM.Reflection
}
}
- private Type GetMissingType(Module module, Type declaringType, TypeName typeName)
+ private Type GetMissingType(Module requester, Module module, Type declaringType, TypeName typeName)
{
if (missingTypes == null)
{
@@ -990,14 +1050,18 @@ namespace IKVM.Reflection
type = new MissingType(module, declaringType, typeName.Namespace, typeName.Name);
missingTypes.Add(stn, type);
}
+ if (ResolvedMissingMember != null && !module.Assembly.__IsMissing)
+ {
+ ResolvedMissingMember(requester, type);
+ }
return type;
}
- internal Type GetMissingTypeOrThrow(Module module, Type declaringType, TypeName typeName)
+ internal Type GetMissingTypeOrThrow(Module requester, Module module, Type declaringType, TypeName typeName)
{
if (resolveMissingMembers || module.Assembly.__IsMissing)
{
- return GetMissingType(module, declaringType, typeName);
+ return GetMissingType(requester, module, declaringType, typeName);
}
string fullName = TypeNameParser.Escape(typeName.ToString());
if (declaringType != null)
@@ -1007,36 +1071,50 @@ namespace IKVM.Reflection
throw new TypeLoadException(String.Format("Type '{0}' not found in assembly '{1}'", fullName, module.Assembly.FullName));
}
- internal MethodBase GetMissingMethodOrThrow(Type declaringType, string name, MethodSignature signature)
+ internal MethodBase GetMissingMethodOrThrow(Module requester, Type declaringType, string name, MethodSignature signature)
{
if (resolveMissingMembers)
{
- MethodInfo method = new MissingMethod(declaringType, name, signature);
+ MethodBase method = new MissingMethod(declaringType, name, signature);
if (name == ".ctor")
{
- return new ConstructorInfoImpl(method);
+ method = new ConstructorInfoImpl((MethodInfo)method);
+ }
+ if (ResolvedMissingMember != null)
+ {
+ ResolvedMissingMember(requester, method);
}
return method;
}
throw new MissingMethodException(declaringType.ToString(), name);
}
- internal FieldInfo GetMissingFieldOrThrow(Type declaringType, string name, FieldSignature signature)
+ internal FieldInfo GetMissingFieldOrThrow(Module requester, Type declaringType, string name, FieldSignature signature)
{
if (resolveMissingMembers)
{
- return new MissingField(declaringType, name, signature);
+ FieldInfo field = new MissingField(declaringType, name, signature);
+ if (ResolvedMissingMember != null)
+ {
+ ResolvedMissingMember(requester, field);
+ }
+ return field;
}
throw new MissingFieldException(declaringType.ToString(), name);
}
- internal PropertyInfo GetMissingPropertyOrThrow(Type declaringType, string name, PropertySignature propertySignature)
+ internal PropertyInfo GetMissingPropertyOrThrow(Module requester, Type declaringType, string name, PropertySignature propertySignature)
{
// HACK we need to check __IsMissing here, because Type doesn't have a FindProperty API
// since properties are never resolved, except by custom attributes
if (resolveMissingMembers || declaringType.__IsMissing)
{
- return new MissingProperty(declaringType, name, propertySignature);
+ PropertyInfo property = new MissingProperty(declaringType, name, propertySignature);
+ if (ResolvedMissingMember != null && !declaringType.__IsMissing)
+ {
+ ResolvedMissingMember(requester, property);
+ }
+ return property;
}
throw new System.MissingMemberException(declaringType.ToString(), name);
}
@@ -1069,6 +1147,8 @@ namespace IKVM.Reflection
PackedCustomModifiers.CreateFromExternal(returnTypeCustomModifiers, parameterTypeCustomModifiers, Util.NullSafeLength(parameterTypes) + Util.NullSafeLength(optionalParameterTypes)));
}
+ public event ResolvedMissingMemberHandler ResolvedMissingMember;
+
public event Predicate<Type> MissingTypeIsValueType
{
add
@@ -1106,5 +1186,15 @@ namespace IKVM.Reflection
{
get { return automaticallyProvideDefaultConstructor; }
}
+
+ internal bool MetadataOnly
+ {
+ get { return (options & UniverseOptions.MetadataOnly) != 0; }
+ }
+
+ internal bool SupressReferenceTypeIdentityConversion
+ {
+ get { return (options & UniverseOptions.SupressReferenceTypeIdentityConversion) != 0; }
+ }
}
}
diff --git a/external/ikvm/reflect/Writer/ModuleWriter.cs b/external/ikvm/reflect/Writer/ModuleWriter.cs
index 6094283..eb0a50a 100644
--- a/external/ikvm/reflect/Writer/ModuleWriter.cs
+++ b/external/ikvm/reflect/Writer/ModuleWriter.cs
@@ -105,8 +105,9 @@ namespace IKVM.Reflection.Writer
break;
case ImageFileMachine.ARM:
writer.Headers.FileHeader.Machine = IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM;
- writer.Headers.FileHeader.Characteristics |= IMAGE_FILE_HEADER.IMAGE_FILE_32BIT_MACHINE;
+ writer.Headers.FileHeader.Characteristics |= IMAGE_FILE_HEADER.IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_HEADER.IMAGE_FILE_LARGE_ADDRESS_AWARE;
writer.Headers.OptionalHeader.SizeOfStackReserve = moduleBuilder.GetStackReserve(0x100000);
+ writer.Headers.OptionalHeader.SectionAlignment = 0x1000;
break;
case ImageFileMachine.AMD64:
writer.Headers.FileHeader.Machine = IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64;
@@ -212,7 +213,7 @@ namespace IKVM.Reflection.Writer
}
// we need to start by computing the number of sections, because code.PointerToRawData depends on that
- writer.Headers.FileHeader.NumberOfSections = 1;
+ writer.Headers.FileHeader.NumberOfSections = 2;
if (moduleBuilder.initializedData.Length != 0)
{
@@ -226,12 +227,6 @@ namespace IKVM.Reflection.Writer
writer.Headers.FileHeader.NumberOfSections++;
}
- if (imageFileMachine != ImageFileMachine.ARM)
- {
- // .reloc
- writer.Headers.FileHeader.NumberOfSections++;
- }
-
SectionHeader text = new SectionHeader();
text.Name = ".text";
text.VirtualAddress = code.BaseRVA;
@@ -266,10 +261,7 @@ namespace IKVM.Reflection.Writer
SectionHeader reloc = new SectionHeader();
reloc.Name = ".reloc";
reloc.VirtualAddress = rsrc.VirtualAddress + writer.ToSectionAlignment(rsrc.VirtualSize);
- if (imageFileMachine != ImageFileMachine.ARM)
- {
- reloc.VirtualSize = ((uint)moduleBuilder.unmanagedExports.Count + 1) * 12;
- }
+ reloc.VirtualSize = code.PackRelocations();
reloc.PointerToRawData = rsrc.PointerToRawData + rsrc.SizeOfRawData;
reloc.SizeOfRawData = writer.ToFileAlignment(reloc.VirtualSize);
reloc.Characteristics = SectionHeader.IMAGE_SCN_MEM_READ | SectionHeader.IMAGE_SCN_CNT_INITIALIZED_DATA | SectionHeader.IMAGE_SCN_MEM_DISCARDABLE;
@@ -296,9 +288,9 @@ namespace IKVM.Reflection.Writer
// (i.e. there is an additional layer of indirection), so we add the offset to the pointer
writer.Headers.OptionalHeader.AddressOfEntryPoint = code.StartupStubRVA + 0x20;
}
- else if (imageFileMachine != ImageFileMachine.ARM)
+ else
{
- writer.Headers.OptionalHeader.AddressOfEntryPoint = code.StartupStubRVA;
+ writer.Headers.OptionalHeader.AddressOfEntryPoint = code.StartupStubRVA + writer.Thumb;
}
writer.WritePEHeaders();
diff --git a/external/ikvm/reflect/Writer/PEWriter.cs b/external/ikvm/reflect/Writer/PEWriter.cs
index 665296e..fd6d979 100644
--- a/external/ikvm/reflect/Writer/PEWriter.cs
+++ b/external/ikvm/reflect/Writer/PEWriter.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008 Jeroen Frijters
+ Copyright (C) 2008-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -124,6 +124,17 @@ namespace IKVM.Reflection.Writer
{
return (p + (Headers.OptionalHeader.SectionAlignment - 1)) & ~(Headers.OptionalHeader.SectionAlignment - 1);
}
+
+ internal bool Is32Bit
+ {
+ get { return (Headers.FileHeader.Characteristics & IMAGE_FILE_HEADER.IMAGE_FILE_32BIT_MACHINE) != 0; }
+ }
+
+ internal uint Thumb
+ {
+ // On ARM we need to set the least significant bit of the program counter to select the Thumb instruction set
+ get { return Headers.FileHeader.Machine == IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM ? 1u : 0u; }
+ }
}
sealed class IMAGE_NT_HEADERS
diff --git a/external/ikvm/reflect/Writer/TextSection.cs b/external/ikvm/reflect/Writer/TextSection.cs
index a8b4785..b0c0fe3 100644
--- a/external/ikvm/reflect/Writer/TextSection.cs
+++ b/external/ikvm/reflect/Writer/TextSection.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008-2011 Jeroen Frijters
+ Copyright (C) 2008-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -39,6 +39,7 @@ namespace IKVM.Reflection.Writer
private readonly ModuleBuilder moduleBuilder;
private readonly uint strongNameSignatureLength;
private readonly ExportTables exportTables;
+ private readonly List<RelocationBlock> relocations = new List<RelocationBlock>();
internal TextSection(PEWriter peWriter, CliHeader cliHeader, ModuleBuilder moduleBuilder, int strongNameSignatureLength)
{
@@ -59,7 +60,7 @@ namespace IKVM.Reflection.Writer
internal uint BaseRVA
{
- get { return 0x2000; }
+ get { return peWriter.Headers.OptionalHeader.SectionAlignment; }
}
internal uint ImportAddressTableRVA
@@ -69,18 +70,7 @@ namespace IKVM.Reflection.Writer
internal uint ImportAddressTableLength
{
- get
- {
- switch (peWriter.Headers.FileHeader.Machine)
- {
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386:
- return 8;
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
- return 0;
- default:
- return 16;
- }
- }
+ get { return peWriter.Is32Bit ? 8u : 16u; }
}
internal uint ComDescriptorRVA
@@ -220,30 +210,16 @@ namespace IKVM.Reflection.Writer
internal uint ImportDirectoryLength
{
- get
- {
- switch (peWriter.Headers.FileHeader.Machine)
- {
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
- return 0;
- default:
- return (ImportHintNameTableRVA - ImportDirectoryRVA) + 27;
- }
- }
+ get { return (ImportHintNameTableRVA - ImportDirectoryRVA) + 27; }
}
private uint ImportHintNameTableRVA
{
get
{
- if (peWriter.Headers.FileHeader.Machine == IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386)
- {
- return (ImportDirectoryRVA + 48 + 15) & ~15U;
- }
- else
- {
- return (ImportDirectoryRVA + 48 + 4 + 15) & ~15U;
- }
+ return peWriter.Is32Bit
+ ? (ImportDirectoryRVA + 48 + 15) & ~15U
+ : (ImportDirectoryRVA + 52 + 15) & ~15U;
}
}
@@ -273,11 +249,12 @@ namespace IKVM.Reflection.Writer
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386:
return 6;
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64:
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
return 12;
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_IA64:
return 48;
default:
- return 0;
+ throw new NotSupportedException();
}
}
}
@@ -452,6 +429,22 @@ namespace IKVM.Reflection.Writer
mw.Write((ushort)0x25FF);
mw.Write((uint)peWriter.Headers.OptionalHeader.ImageBase + ImportAddressTableRVA);
}
+ else if (peWriter.Headers.FileHeader.Machine == IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM)
+ {
+ uint rva = (uint)peWriter.Headers.OptionalHeader.ImageBase + ImportAddressTableRVA;
+ ushort lo = (ushort)rva;
+ ushort hi = (ushort)(rva >> 16);
+ mw.Write((ushort)(0xF240 + (lo >> 12)));
+ mw.Write((ushort)(0x0C00 + ((lo << 4) & 0xF000) + (lo & 0xFF)));
+ mw.Write((ushort)(0xF2C0 + (hi >> 12)));
+ mw.Write((ushort)(0x0C00 + ((hi << 4) & 0xF000) + (hi & 0xFF)));
+ mw.Write((ushort)0xF8DC);
+ mw.Write((ushort)0xF000);
+ }
+ else
+ {
+ throw new NotSupportedException();
+ }
}
[Conditional("DEBUG")]
@@ -523,10 +516,11 @@ namespace IKVM.Reflection.Writer
stubLength = 8;
break;
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64:
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
stubLength = 16;
break;
default:
- throw new NotImplementedException();
+ throw new NotSupportedException();
}
}
@@ -576,7 +570,7 @@ namespace IKVM.Reflection.Writer
{
if (text.moduleBuilder.unmanagedExports[pos].ordinal == i + ordinalBase)
{
- mw.Write(stubsRVA + (uint)pos * stubLength);
+ mw.Write(text.peWriter.Thumb + stubsRVA + (uint)pos * stubLength);
pos++;
}
else
@@ -656,8 +650,17 @@ namespace IKVM.Reflection.Writer
mw.Write((byte)0xE0);
mw.Write(0); // alignment
break;
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
+ mw.Write((ushort)0xF8DF);
+ mw.Write((ushort)0xC008);
+ mw.Write((ushort)0xF8DC);
+ mw.Write((ushort)0xC000);
+ mw.Write((ushort)0x4760);
+ mw.Write((ushort)0xDEFE);
+ mw.Write((uint)text.peWriter.Headers.OptionalHeader.ImageBase + text.moduleBuilder.unmanagedExports[pos].rva.initializedDataOffset + sdataRVA);
+ break;
default:
- throw new NotImplementedException();
+ throw new NotSupportedException();
}
pos++;
}
@@ -682,15 +685,34 @@ namespace IKVM.Reflection.Writer
return x.ordinal.CompareTo(y.ordinal);
}
- internal void WriteRelocations(MetadataWriter mw)
+ internal void GetRelocations(List<Relocation> list)
{
+ ushort type;
+ uint rva;
+ switch (text.peWriter.Headers.FileHeader.Machine)
+ {
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386:
+ type = 0x3000;
+ rva = stubsRVA + 2;
+ break;
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64:
+ type = 0xA000;
+ rva = stubsRVA + 2;
+ break;
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
+ type = 0x3000;
+ rva = stubsRVA + 12;
+ break;
+ default:
+ throw new NotSupportedException();
+ }
+
// we assume that unmanagedExports is still sorted by ordinal
for (int i = 0, pos = 0; i < entries; i++)
{
if (text.moduleBuilder.unmanagedExports[pos].ordinal == i + ordinalBase)
{
- // both I386 and AMD64 have the address at offset 2
- text.WriteRelocationBlock(mw, stubsRVA + 2 + (uint)pos * stubLength);
+ list.Add(new Relocation(type, rva + (uint)pos * stubLength));
pos++;
}
}
@@ -774,7 +796,7 @@ namespace IKVM.Reflection.Writer
// Import Lookup Table
mw.Write(ImportHintNameTableRVA); // Hint/Name Table RVA
int size = 48;
- if (peWriter.Headers.FileHeader.Machine != IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386)
+ if (!peWriter.Is32Bit)
{
size += 4;
mw.Write(0);
@@ -809,47 +831,92 @@ namespace IKVM.Reflection.Writer
get { return (int)(StartupStubRVA - BaseRVA + StartupStubLength); }
}
- internal void WriteRelocations(MetadataWriter mw)
+ struct Relocation : IComparable<Relocation>
{
- uint relocAddress = this.StartupStubRVA;
- switch (peWriter.Headers.FileHeader.Machine)
+ internal readonly uint rva;
+ internal readonly ushort type;
+
+ internal Relocation(ushort type, uint rva)
{
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386:
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64:
- relocAddress += 2;
- break;
- case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_IA64:
- relocAddress += 0x20;
- break;
+ this.type = type;
+ this.rva = rva;
}
- WriteRelocationBlock(mw, relocAddress);
- if (exportTables != null)
+
+ int IComparable<Relocation>.CompareTo(Relocation other)
+ {
+ return rva.CompareTo(other.rva);
+ }
+ }
+
+ struct RelocationBlock
+ {
+ internal readonly uint PageRVA;
+ internal readonly ushort[] TypeOffset;
+
+ internal RelocationBlock(uint pageRva, ushort[] typeOffset)
{
- exportTables.WriteRelocations(mw);
+ this.PageRVA = pageRva;
+ this.TypeOffset = typeOffset;
}
}
- // note that we're lazy and write a new relocation block for every relocation
- // even if they are in the same page (since there is typically only one anyway)
- private void WriteRelocationBlock(MetadataWriter mw, uint relocAddress)
+ internal void WriteRelocations(MetadataWriter mw)
{
- uint pageRVA = relocAddress & ~0xFFFU;
- mw.Write(pageRVA); // PageRVA
- mw.Write(0x000C); // Block Size
+ foreach (RelocationBlock block in relocations)
+ {
+ mw.Write(block.PageRVA);
+ mw.Write(8 + block.TypeOffset.Length * 2);
+ foreach (ushort typeOffset in block.TypeOffset)
+ {
+ mw.Write(typeOffset);
+ }
+ }
+ }
+
+ internal uint PackRelocations()
+ {
+ List<Relocation> list = new List<Relocation>();
switch (peWriter.Headers.FileHeader.Machine)
{
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386:
- mw.Write(0x3000 + relocAddress - pageRVA); // Type / Offset
+ list.Add(new Relocation(0x3000, this.StartupStubRVA + 2));
break;
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_AMD64:
- mw.Write(0xA000 + relocAddress - pageRVA); // Type / Offset
+ list.Add(new Relocation(0xA000, this.StartupStubRVA + 2));
break;
case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_IA64:
- // on IA64 the StartupStubRVA is 16 byte aligned, so these two addresses won't cross a page boundary
- mw.Write((short)(0xA000 + relocAddress - pageRVA)); // Type / Offset
- mw.Write((short)(0xA000 + relocAddress - pageRVA + 8)); // Type / Offset
+ list.Add(new Relocation(0xA000, this.StartupStubRVA + 0x20));
+ list.Add(new Relocation(0xA000, this.StartupStubRVA + 0x28));
break;
+ case IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_ARM:
+ list.Add(new Relocation(0x7000, this.StartupStubRVA));
+ break;
+ default:
+ throw new NotSupportedException();
+ }
+ if (exportTables != null)
+ {
+ exportTables.GetRelocations(list);
+ }
+ list.Sort();
+ uint size = 0;
+ for (int i = 0; i < list.Count; )
+ {
+ uint pageRVA = list[i].rva & ~0xFFFU;
+ int count = 1;
+ while (i + count < list.Count && (list[i + count].rva & ~0xFFFU) == pageRVA)
+ {
+ count++;
+ }
+ ushort[] typeOffset = new ushort[(count + 1) & ~1];
+ for (int j = 0; j < count; j++, i++)
+ {
+ typeOffset[j] = (ushort)(list[i].type + (list[i].rva - pageRVA));
+ }
+ relocations.Add(new RelocationBlock(pageRVA, typeOffset));
+ size += (uint)(8 + typeOffset.Length * 2);
}
+ return size;
}
}
}
diff --git a/external/ikvm/reflect/Writer/VersionInfo.cs b/external/ikvm/reflect/Writer/VersionInfo.cs
index 4c76b49..41938a1 100644
--- a/external/ikvm/reflect/Writer/VersionInfo.cs
+++ b/external/ikvm/reflect/Writer/VersionInfo.cs
@@ -47,7 +47,7 @@ namespace IKVM.Reflection.Writer
internal void SetFileName(string assemblyFileName)
{
- this.fileName = assemblyFileName;
+ this.fileName = System.IO.Path.GetFileName(assemblyFileName);
}
internal void SetAttribute(CustomAttributeBuilder cab)
diff --git a/external/ikvm/reflect/reflect.build b/external/ikvm/reflect/reflect.build
index 2689fba..336c5a5 100644
--- a/external/ikvm/reflect/reflect.build
+++ b/external/ikvm/reflect/reflect.build
@@ -1,5 +1,7 @@
<?xml version="1.0"?>
<project name="reflect" default="IKVM.Reflection">
+ <include buildfile="../ikvm.include" />
+
<target name="IKVM.Reflection">
<property name="defs" value="TRACE" />
<if test="${framework::exists('mono-2.0')}">
@@ -16,7 +18,7 @@
<if test="${framework::exists('mono-2.0')}">
<property name="MonoSymbolWriter" value="${path::combine(framework::get-assembly-directory('mono-2.0'), 'Mono.CompilerServices.SymbolWriter.dll')}" />
</if>
- <csc target="library" output="../bin/IKVM.Reflection.dll" optimize="true" define="${defs}">
+ <csc target="library" output="../bin/IKVM.Reflection.dll" optimize="true" define="${defs}" noconfig="true" nostdlib="true">
<sources>
<include name="../CommonAssemblyInfo.cs" />
<include name="AmbiguousMatchException.cs" />
@@ -111,6 +113,9 @@
</sources>
<references>
<include if="${framework::exists('mono-2.0')}" name="${MonoSymbolWriter}" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
+ <include name="${ReferencePath}/System.Security.dll" />
</references>
</csc>
</target>
diff --git a/external/ikvm/runtime/AssemblyClassLoader.cs b/external/ikvm/runtime/AssemblyClassLoader.cs
index 5407df0..960beea 100644
--- a/external/ikvm/runtime/AssemblyClassLoader.cs
+++ b/external/ikvm/runtime/AssemblyClassLoader.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2010 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -44,12 +44,11 @@ namespace IKVM.Internal
private AssemblyLoader assemblyLoader;
private string[] references;
private AssemblyClassLoader[] delegates;
-#if !STATIC_COMPILER && !STUB_GENERATOR
- private Thread initializerThread;
- private int initializerRecursion;
- private object protectionDomain;
+#if !STATIC_COMPILER && !STUB_GENERATOR && !FIRST_PASS
+ private JavaClassLoaderConstructionInProgress jclcip;
+ private java.security.ProtectionDomain protectionDomain;
private static Dictionary<string, string> customClassLoaderRedirects;
- private bool hasCustomClassLoader;
+ private byte hasCustomClassLoader; /* 0 = unknown, 1 = yes, 2 = no */
#endif
private Dictionary<int, List<int>> exports;
private string[] exportedAssemblyNames;
@@ -347,7 +346,7 @@ namespace IKVM.Internal
{
if (internalsVisibleTo == null)
{
- internalsVisibleTo = AttributeHelper.GetInternalsVisibleToAttributes(assembly);
+ Interlocked.CompareExchange(ref internalsVisibleTo, AttributeHelper.GetInternalsVisibleToAttributes(assembly), null);
}
foreach (AssemblyName name in internalsVisibleTo)
{
@@ -392,8 +391,11 @@ namespace IKVM.Internal
{
this.assemblyLoader = new AssemblyLoader(assembly);
this.references = fixedReferences;
+ }
#if STATIC_COMPILER
+ internal static void PreloadExportedAssemblies(Assembly assembly)
+ {
if (assembly.GetManifestResourceInfo("ikvm.exports") != null)
{
using (Stream stream = assembly.GetManifestResourceStream("ikvm.exports"))
@@ -404,19 +406,23 @@ namespace IKVM.Internal
{
string assemblyName = rdr.ReadString();
int typeCount = rdr.ReadInt32();
- for (int j = 0; j < typeCount; j++)
- {
- rdr.ReadInt32();
- }
if (typeCount != 0)
{
- IkvmcCompiler.resolver.AddHintPath(assemblyName, Path.GetDirectoryName(assembly.Location));
+ for (int j = 0; j < typeCount; j++)
+ {
+ rdr.ReadInt32();
+ }
+ try
+ {
+ StaticCompiler.LoadFile(assembly.Location + "/../" + new AssemblyName(assemblyName).Name + ".dll");
+ }
+ catch { }
}
}
}
}
-#endif
}
+#endif
private void DoInitializeExports()
{
@@ -470,7 +476,7 @@ namespace IKVM.Internal
references[i] = refNames[i].FullName;
}
}
- delegates = new AssemblyClassLoader[references.Length];
+ Interlocked.Exchange(ref delegates, new AssemblyClassLoader[references.Length]);
}
}
}
@@ -501,29 +507,6 @@ namespace IKVM.Internal
return wrapper.TypeAsBaseType.Assembly;
}
- internal override Type GetGenericTypeDefinition(string name)
- {
- try
- {
- // we only have to look in the main assembly, because only a .NET assembly can contain generic type definitions
- // and it cannot be part of a multi assembly sharedclassloader group
- Type type = assemblyLoader.Assembly.GetType(name);
- if (type != null && type.IsGenericTypeDefinition)
- {
- return type;
- }
- }
- catch (FileLoadException x)
- {
- // this can only happen if the assembly was loaded in the ReflectionOnly
- // context and the requested type references a type in another assembly
- // that cannot be found in the ReflectionOnly context
- // TODO figure out what other exceptions Assembly.GetType() can throw
- Tracer.Info(Tracer.Runtime, x.Message);
- }
- return null;
- }
-
private Assembly LoadAssemblyOrClearName(ref string name, bool exported)
{
if (name == null)
@@ -534,14 +517,7 @@ namespace IKVM.Internal
try
{
#if STATIC_COMPILER || STUB_GENERATOR
- if (exported)
- {
- return StaticCompiler.LoadFile(this.MainAssembly.Location + "/../" + new AssemblyName(name).Name + ".dll");
- }
- else
- {
- return StaticCompiler.Load(name);
- }
+ return StaticCompiler.Load(name);
#else
return Assembly.Load(name);
#endif
@@ -697,28 +673,87 @@ namespace IKVM.Internal
protected override TypeWrapper LoadClassImpl(string name, bool throwClassNotFoundException)
{
- TypeWrapper tw = DoLoad(name);
+ TypeWrapper tw = FindLoadedClass(name);
if (tw != null)
{
return tw;
}
-#if !STATIC_COMPILER && !STUB_GENERATOR
- if (hasCustomClassLoader)
+#if !STATIC_COMPILER && !STUB_GENERATOR && !FIRST_PASS
+ while (hasCustomClassLoader != 2)
{
+ if (hasCustomClassLoader == 0)
+ {
+ Type customClassLoader = GetCustomClassLoaderType();
+ if (customClassLoader == null)
+ {
+ hasCustomClassLoader = 2;
+ break;
+ }
+ WaitInitializeJavaClassLoader(customClassLoader);
+ hasCustomClassLoader = 1;
+ }
return base.LoadClassImpl(name, throwClassNotFoundException);
}
#endif
- tw = LoadGenericClass(name);
- if (tw != null)
+ return LoadBootstrapIfNonJavaAssembly(name)
+ ?? LoadDynamic(name)
+ ?? FindOrLoadGenericClass(name, false);
+ }
+
+ // this implements ikvm.runtime.AssemblyClassLoader.loadClass(),
+ // so unlike the above LoadClassImpl, it doesn't delegate to Java,
+ // but otherwise it should be the same algorithm
+ internal TypeWrapper LoadClass(string name)
+ {
+ return FindLoadedClass(name)
+ ?? LoadBootstrapIfNonJavaAssembly(name)
+ ?? LoadDynamic(name)
+ ?? FindOrLoadGenericClass(name, false);
+ }
+
+ private TypeWrapper LoadBootstrapIfNonJavaAssembly(string name)
+ {
+ if (!assemblyLoader.HasJavaModule)
{
- return tw;
+ return GetBootstrapClassLoader().LoadClassByDottedNameFast(name);
}
- return LoadReferenced(name);
+ return null;
}
- internal TypeWrapper LoadReferenced(string name)
+ private TypeWrapper LoadDynamic(string name)
+ {
+#if !STATIC_COMPILER && !STUB_GENERATOR && !FIRST_PASS
+ string classFile = name.Replace('.', '/') + ".class";
+ foreach (Resource res in GetBootstrapClassLoader().FindDelegateResources(classFile))
+ {
+ return res.Loader.DefineDynamic(name, res.URL);
+ }
+ foreach (Resource res in FindDelegateResources(classFile))
+ {
+ return res.Loader.DefineDynamic(name, res.URL);
+ }
+ foreach (java.net.URL url in FindResources(classFile))
+ {
+ return DefineDynamic(name, url);
+ }
+#endif
+ return null;
+ }
+
+#if !STATIC_COMPILER && !STUB_GENERATOR && !FIRST_PASS
+ private TypeWrapper DefineDynamic(string name, java.net.URL url)
+ {
+ using (java.io.InputStream inp = url.openStream())
+ {
+ byte[] buf = new byte[inp.available()];
+ inp.read(buf, 0, buf.Length);
+ return TypeWrapper.FromClass(IKVM.NativeCode.java.lang.ClassLoader.defineClass1(GetJavaClassLoader(), name, buf, 0, buf.Length, GetProtectionDomain(), null));
+ }
+ }
+#endif
+
+ private TypeWrapper FindReferenced(string name)
{
- LazyInitExports();
for (int i = 0; i < delegates.Length; i++)
{
if (delegates[i] == null)
@@ -734,14 +769,10 @@ namespace IKVM.Internal
TypeWrapper tw = delegates[i].DoLoad(name);
if (tw != null)
{
- return tw;
+ return RegisterInitiatingLoader(tw);
}
}
}
- if (!assemblyLoader.HasJavaModule)
- {
- return GetBootstrapClassLoader().LoadClassByDottedNameFast(name);
- }
return null;
}
@@ -755,32 +786,41 @@ namespace IKVM.Internal
#endif
}
- internal IEnumerable<java.net.URL> FindResources(string name)
- {
- return GetResourcesImpl(name, this is BootstrapClassLoader);
- }
-
- internal IEnumerable<java.net.URL> GetResources(string name)
- {
- return GetResourcesImpl(name, true);
- }
-
- private IEnumerable<java.net.URL> GetResourcesImpl(string unmangledName, bool getFromDelegates)
+ internal IEnumerable<java.net.URL> FindResources(string unmangledName)
{
if (ReflectUtil.IsDynamicAssembly(assemblyLoader.Assembly))
{
yield break;
}
+ bool found = false;
#if !FIRST_PASS
java.util.Enumeration urls = assemblyLoader.FindResources(unmangledName);
while (urls.hasMoreElements())
{
+ found = true;
yield return (java.net.URL)urls.nextElement();
}
#endif
+ if (!assemblyLoader.HasJavaModule)
+ {
+ if (unmangledName != "" && assemblyLoader.Assembly.GetManifestResourceInfo(unmangledName) != null)
+ {
+ found = true;
+ yield return MakeResourceURL(assemblyLoader.Assembly, unmangledName);
+ }
+ foreach (JavaResourceAttribute res in assemblyLoader.Assembly.GetCustomAttributes(typeof(IKVM.Attributes.JavaResourceAttribute), false))
+ {
+ if (res.JavaName == unmangledName)
+ {
+ found = true;
+ yield return MakeResourceURL(assemblyLoader.Assembly, res.ResourceName);
+ }
+ }
+ }
string name = JVM.MangleResourceName(unmangledName);
if (assemblyLoader.Assembly.GetManifestResourceInfo(name) != null)
{
+ found = true;
yield return MakeResourceURL(assemblyLoader.Assembly, name);
}
LazyInitExports();
@@ -805,20 +845,45 @@ namespace IKVM.Internal
urls = loader.FindResources(unmangledName);
while (urls.hasMoreElements())
{
+ found = true;
yield return (java.net.URL)urls.nextElement();
}
#endif
if (loader.Assembly.GetManifestResourceInfo(name) != null)
{
+ found = true;
yield return MakeResourceURL(loader.Assembly, name);
}
}
}
}
- if (!getFromDelegates)
+ if (!found && unmangledName.EndsWith(".class", StringComparison.Ordinal) && unmangledName.IndexOf('.') == unmangledName.Length - 6)
{
- yield break;
+ TypeWrapper tw = FindLoadedClass(unmangledName.Substring(0, unmangledName.Length - 6).Replace('/', '.'));
+ if (tw != null && tw.GetClassLoader() == this && !tw.IsArray && !(tw is DynamicTypeWrapper))
+ {
+#if !FIRST_PASS
+ yield return new java.io.File(VirtualFileSystem.GetAssemblyClassesPath(assemblyLoader.Assembly) + unmangledName).toURI().toURL();
+#endif
+ }
}
+ }
+
+ protected struct Resource
+ {
+ internal readonly java.net.URL URL;
+ internal readonly AssemblyClassLoader Loader;
+
+ internal Resource(java.net.URL url, AssemblyClassLoader loader)
+ {
+ this.URL = url;
+ this.Loader = loader;
+ }
+ }
+
+ protected IEnumerable<Resource> FindDelegateResources(string name)
+ {
+ LazyInitExports();
for (int i = 0; i < delegates.Length; i++)
{
if (delegates[i] == null)
@@ -829,47 +894,73 @@ namespace IKVM.Internal
delegates[i] = AssemblyClassLoader.FromAssembly(asm);
}
}
- if (delegates[i] != null)
+ if (delegates[i] != null && delegates[i] != GetBootstrapClassLoader())
{
- foreach (java.net.URL url in delegates[i].FindResources(unmangledName))
+ foreach (java.net.URL url in delegates[i].FindResources(name))
{
- yield return url;
+ yield return new Resource(url, delegates[i]);
}
}
}
- if (!assemblyLoader.HasJavaModule)
+ }
+
+ internal virtual IEnumerable<java.net.URL> GetResources(string name)
+ {
+ foreach (java.net.URL url in GetBootstrapClassLoader().GetResources(name))
{
- foreach (java.net.URL url in GetBootstrapClassLoader().FindResources(unmangledName))
- {
- yield return url;
- }
+ yield return url;
+ }
+ foreach (Resource res in FindDelegateResources(name))
+ {
+ yield return res.URL;
+ }
+ foreach (java.net.URL url in FindResources(name))
+ {
+ yield return url;
}
}
#endif // !STATIC_COMPILER
- private void WaitInitializeJavaClassLoader()
- {
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- Interlocked.CompareExchange(ref initializerThread, Thread.CurrentThread, null);
- if (initializerThread != null)
+ private sealed class JavaClassLoaderConstructionInProgress
+ {
+ internal readonly Thread Thread = Thread.CurrentThread;
+ internal java.lang.ClassLoader javaClassLoader;
+ internal int recursion;
+ }
+
+ private java.lang.ClassLoader WaitInitializeJavaClassLoader(Type customClassLoader)
+ {
+ Interlocked.CompareExchange(ref jclcip, new JavaClassLoaderConstructionInProgress(), null);
+ JavaClassLoaderConstructionInProgress curr = jclcip;
+ if (curr != null)
{
- if (initializerThread == Thread.CurrentThread)
+ if (curr.Thread == Thread.CurrentThread)
{
- initializerRecursion++;
+ if (curr.javaClassLoader != null)
+ {
+ // we were recursively invoked during the class loader construction,
+ // so we have to return the partialy constructed class loader
+ return curr.javaClassLoader;
+ }
+ curr.recursion++;
try
{
- InitializeJavaClassLoader();
+ if (javaClassLoader == null)
+ {
+ InitializeJavaClassLoader(curr, customClassLoader);
+ }
}
finally
{
// We only publish the class loader from the outer most invocation, otherwise
// an invocation of getClassLoader in the static initializer or constructor
// of the custom class loader would result in prematurely publishing it.
- if (--initializerRecursion == 0)
+ if (--curr.recursion == 0)
{
lock (this)
{
- initializerThread = null;
+ jclcip = null;
Monitor.PulseAll(this);
}
}
@@ -879,52 +970,40 @@ namespace IKVM.Internal
{
lock (this)
{
- while (initializerThread != null)
+ while (jclcip != null)
{
Monitor.Wait(this);
}
}
}
}
-#endif
+ return javaClassLoader;
}
-#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- internal override object GetJavaClassLoader()
+ internal override java.lang.ClassLoader GetJavaClassLoader()
{
if (javaClassLoader == null)
{
- WaitInitializeJavaClassLoader();
+ return WaitInitializeJavaClassLoader(GetCustomClassLoaderType());
}
return javaClassLoader;
}
-#endif
- internal virtual object GetProtectionDomain()
+ internal virtual java.security.ProtectionDomain GetProtectionDomain()
{
-#if STATIC_COMPILER || FIRST_PASS || STUB_GENERATOR
- return null;
-#else
if (protectionDomain == null)
{
Interlocked.CompareExchange(ref protectionDomain, new java.security.ProtectionDomain(assemblyLoader.Assembly), null);
}
return protectionDomain;
-#endif
- }
-
- protected override void CheckDefineClassAllowed(string className)
- {
- if (DoLoad(className) != null)
- {
- throw new LinkageError("duplicate class definition: " + className);
- }
}
+#endif
- internal override TypeWrapper GetLoadedClass(string name)
+ protected override TypeWrapper FindLoadedClassLazy(string name)
{
- TypeWrapper tw = base.GetLoadedClass(name);
- return tw != null ? tw : DoLoad(name);
+ return DoLoad(name)
+ ?? FindReferenced(name)
+ ?? FindOrLoadGenericClass(name, true);
}
internal override bool InternalsVisibleToImpl(TypeWrapper wrapper, TypeWrapper friend)
@@ -932,7 +1011,14 @@ namespace IKVM.Internal
ClassLoaderWrapper other = friend.GetClassLoader();
if (this == other)
{
+#if STATIC_COMPILER || STUB_GENERATOR
return true;
+#else
+ // we're OK if the type being accessed (wrapper) is a dynamic type
+ // or if the dynamic assembly has internal access
+ return GetAssembly(wrapper).Equals(GetTypeWrapperFactory().ModuleBuilder.Assembly)
+ || GetTypeWrapperFactory().HasInternalAccess;
+#endif
}
AssemblyName otherName;
#if STATIC_COMPILER
@@ -1015,47 +1101,72 @@ namespace IKVM.Internal
internal void AddDelegate(AssemblyClassLoader acl)
{
LazyInitExports();
- Array.Resize(ref delegates, delegates.Length + 1);
- delegates[delegates.Length - 1] = acl;
+ lock (this)
+ {
+ Array.Resize(ref delegates, delegates.Length + 1);
+ delegates[delegates.Length - 1] = acl;
+ }
}
+#if !STATIC_COMPILER && !STUB_GENERATOR
+ internal string[] GetPackages()
+ {
+ string[] packages = new string[0];
+ foreach (Module m in assemblyLoader.Assembly.GetModules(false))
+ {
+ object[] attr = m.GetCustomAttributes(typeof(PackageListAttribute), false);
+ foreach (PackageListAttribute p in attr)
+ {
+ string[] mp = p.GetPackages();
+ string[] tmp = new string[packages.Length + mp.Length];
+ Array.Copy(packages, 0, tmp, 0, packages.Length);
+ Array.Copy(mp, 0, tmp, packages.Length, mp.Length);
+ packages = tmp;
+ }
+ }
+ return packages;
+ }
+#endif
+
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- private void InitializeJavaClassLoader()
+ private Type GetCustomClassLoaderType()
{
+ LoadCustomClassLoaderRedirects();
Assembly assembly = assemblyLoader.Assembly;
+ string assemblyName = assembly.FullName;
+ foreach (KeyValuePair<string, string> kv in customClassLoaderRedirects)
{
- Type customClassLoaderClass = null;
- LoadCustomClassLoaderRedirects();
- string assemblyName = assembly.FullName;
- foreach (KeyValuePair<string, string> kv in customClassLoaderRedirects)
+ string asm = kv.Key;
+ // FXBUG
+ // We only support matching on the assembly's simple name,
+ // because there appears to be no viable alternative.
+ // There is AssemblyName.ReferenceMatchesDefinition()
+ // but it is completely broken.
+ if (assemblyName.StartsWith(asm + ","))
{
- string asm = kv.Key;
- // FXBUG
- // We only support matching on the assembly's simple name,
- // because there appears to be no viable alternative.
- // There is AssemblyName.ReferenceMatchesDefinition()
- // but it is completely broken.
- if (assemblyName.StartsWith(asm + ","))
+ try
{
- try
- {
- customClassLoaderClass = Type.GetType(kv.Value, true);
- }
- catch (Exception x)
- {
- Tracer.Error(Tracer.Runtime, "Unable to load custom class loader {0} specified in app.config for assembly {1}: {2}", kv.Value, assembly, x);
- }
- break;
+ return Type.GetType(kv.Value, true);
}
- }
- if (customClassLoaderClass == null)
- {
- object[] attribs = assembly.GetCustomAttributes(typeof(CustomAssemblyClassLoaderAttribute), false);
- if (attribs.Length == 1)
+ catch (Exception x)
{
- customClassLoaderClass = ((CustomAssemblyClassLoaderAttribute)attribs[0]).Type;
+ Tracer.Error(Tracer.Runtime, "Unable to load custom class loader {0} specified in app.config for assembly {1}: {2}", kv.Value, assembly, x);
}
+ break;
}
+ }
+ object[] attribs = assembly.GetCustomAttributes(typeof(CustomAssemblyClassLoaderAttribute), false);
+ if (attribs.Length == 1)
+ {
+ return ((CustomAssemblyClassLoaderAttribute)attribs[0]).Type;
+ }
+ return null;
+ }
+
+ private void InitializeJavaClassLoader(JavaClassLoaderConstructionInProgress jclcip, Type customClassLoaderClass)
+ {
+ Assembly assembly = assemblyLoader.Assembly;
+ {
if (customClassLoaderClass != null)
{
try
@@ -1074,7 +1185,6 @@ namespace IKVM.Internal
customClassLoaderCtor = null;
throw new Exception("Constructor not accessible");
}
- hasCustomClassLoader = true;
// NOTE we're creating an uninitialized instance of the custom class loader here, so that getClassLoader will return the proper object
// when it is called during the construction of the custom class loader later on. This still doesn't make it safe to use the custom
// class loader before it is constructed, but at least the object instance is available and should anyone cache it, they will get the
@@ -1082,11 +1192,11 @@ namespace IKVM.Internal
// Note that creating the unitialized instance will (unfortunately) trigger the static initializer. The static initializer can
// trigger a call to getClassLoader(), which means we can end up here recursively.
java.lang.ClassLoader newJavaClassLoader = (java.lang.ClassLoader)GetUninitializedObject(customClassLoaderClass);
- if (javaClassLoader == null) // check if we weren't invoked recursively and the nested invocation already did the work
+ if (jclcip.javaClassLoader == null) // check if we weren't invoked recursively and the nested invocation already did the work
{
- javaClassLoader = newJavaClassLoader;
- SetWrapperForClassLoader(javaClassLoader, this);
- DoPrivileged(new CustomClassLoaderCtorCaller(customClassLoaderCtor, javaClassLoader, assembly));
+ jclcip.javaClassLoader = newJavaClassLoader;
+ SetWrapperForClassLoader(jclcip.javaClassLoader, this);
+ DoPrivileged(new CustomClassLoaderCtorCaller(customClassLoaderCtor, jclcip.javaClassLoader, assembly));
Tracer.Info(Tracer.Runtime, "Created custom assembly class loader {0} for assembly {1}", customClassLoaderClass.FullName, assembly);
}
else
@@ -1101,11 +1211,14 @@ namespace IKVM.Internal
}
}
}
- if (javaClassLoader == null)
+ if (jclcip.javaClassLoader == null)
{
- javaClassLoader = (java.lang.ClassLoader)DoPrivileged(new CreateAssemblyClassLoader(assembly));
- SetWrapperForClassLoader(javaClassLoader, this);
+ jclcip.javaClassLoader = new ikvm.runtime.AssemblyClassLoader();
+ SetWrapperForClassLoader(jclcip.javaClassLoader, this);
}
+ // finally we publish the class loader for other threads to see
+ Thread.MemoryBarrier();
+ javaClassLoader = jclcip.javaClassLoader;
}
// separate method to avoid LinkDemand killing the caller
@@ -1143,21 +1256,6 @@ namespace IKVM.Internal
}
}
- internal sealed class CreateAssemblyClassLoader : java.security.PrivilegedAction
- {
- private Assembly assembly;
-
- internal CreateAssemblyClassLoader(Assembly assembly)
- {
- this.assembly = assembly;
- }
-
- public object run()
- {
- return new ikvm.runtime.AssemblyClassLoader(assembly, null);
- }
- }
-
private sealed class CustomClassLoaderCtorCaller : java.security.PrivilegedAction
{
private ConstructorInfo ctor;
@@ -1215,14 +1313,28 @@ namespace IKVM.Internal
return base.GetWrapperFromAssemblyType(type);
}
- internal override object GetJavaClassLoader()
+#if !FIRST_PASS && !STATIC_COMPILER && !STUB_GENERATOR
+ internal override java.lang.ClassLoader GetJavaClassLoader()
{
return null;
}
- internal override object GetProtectionDomain()
+ internal override java.security.ProtectionDomain GetProtectionDomain()
{
return null;
}
+
+ internal override IEnumerable<java.net.URL> GetResources(string name)
+ {
+ foreach (java.net.URL url in FindResources(name))
+ {
+ yield return url;
+ }
+ foreach (Resource res in FindDelegateResources(name))
+ {
+ yield return res.URL;
+ }
+ }
+#endif
}
}
diff --git a/external/ikvm/runtime/ByteCodeHelper.cs b/external/ikvm/runtime/ByteCodeHelper.cs
index 943ddec..6476946 100644
--- a/external/ikvm/runtime/ByteCodeHelper.cs
+++ b/external/ikvm/runtime/ByteCodeHelper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -148,22 +148,22 @@ namespace IKVM.Runtime
#if !FIRST_PASS
[DebuggerStepThroughAttribute]
- public static object DynamicMultianewarray(RuntimeTypeHandle type, string clazz, int[] lengths)
+ public static object DynamicMultianewarray(string clazz, int[] lengths, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicMultianewarray");
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
+ TypeWrapper wrapper = LoadTypeWrapper(clazz, callerId);
return multianewarray(wrapper.TypeAsArrayType.TypeHandle, lengths);
}
[DebuggerStepThroughAttribute]
- public static object DynamicNewarray(int length, RuntimeTypeHandle type, string clazz)
+ public static object DynamicNewarray(int length, string clazz, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicNewarray");
if(length < 0)
{
throw new java.lang.NegativeArraySizeException();
}
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
+ TypeWrapper wrapper = LoadTypeWrapper(clazz, callerId);
return Array.CreateInstance(wrapper.TypeAsArrayType, length);
}
@@ -183,10 +183,10 @@ namespace IKVM.Runtime
return ((Array)arrayref).GetValue(index);
}
- private static FieldWrapper GetFieldWrapper(object thisObj, RuntimeTypeHandle type, string clazz, string name, string sig, bool isStatic)
+ private static FieldWrapper GetFieldWrapper(object thisObj, string clazz, string name, string sig, bool isStatic, ikvm. at internal.CallerID callerId)
{
- TypeWrapper caller = ClassLoaderWrapper.GetWrapperFromType(Type.GetTypeFromHandle(type));
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
+ TypeWrapper caller = TypeWrapper.FromClass(callerId.getCallerClass());
+ TypeWrapper wrapper = LoadTypeWrapper(clazz, callerId);
FieldWrapper field = wrapper.GetFieldWrapper(name, sig);
if(field == null)
{
@@ -210,10 +210,10 @@ namespace IKVM.Runtime
}
[DebuggerStepThroughAttribute]
- public static object DynamicGetfield(object obj, string name, string sig, RuntimeTypeHandle type, string clazz, ikvm. at internal.CallerID callerID)
+ public static object DynamicGetfield(object obj, string name, string sig, string clazz, ikvm. at internal.CallerID callerID)
{
Profiler.Count("DynamicGetfield");
- FieldWrapper fw = GetFieldWrapper(obj, type, clazz, name, sig, false);
+ FieldWrapper fw = GetFieldWrapper(obj, clazz, name, sig, false, callerID);
java.lang.reflect.Field field = (java.lang.reflect.Field)fw.ToField(false);
object val = field.get(obj, callerID);
if(fw.FieldTypeWrapper.IsPrimitive)
@@ -224,10 +224,10 @@ namespace IKVM.Runtime
}
[DebuggerStepThroughAttribute]
- public static object DynamicGetstatic(string name, string sig, RuntimeTypeHandle type, string clazz, ikvm. at internal.CallerID callerID)
+ public static object DynamicGetstatic(string name, string sig, string clazz, ikvm. at internal.CallerID callerID)
{
Profiler.Count("DynamicGetstatic");
- FieldWrapper fw = GetFieldWrapper(null, type, clazz, name, sig, true);
+ FieldWrapper fw = GetFieldWrapper(null, clazz, name, sig, true, callerID);
java.lang.reflect.Field field = (java.lang.reflect.Field)fw.ToField(false);
object val = field.get(null, callerID);
if(fw.FieldTypeWrapper.IsPrimitive)
@@ -238,10 +238,10 @@ namespace IKVM.Runtime
}
[DebuggerStepThroughAttribute]
- public static void DynamicPutfield(object obj, object val, string name, string sig, RuntimeTypeHandle type, string clazz, ikvm. at internal.CallerID callerID)
+ public static void DynamicPutfield(object obj, object val, string name, string sig, string clazz, ikvm. at internal.CallerID callerID)
{
Profiler.Count("DynamicPutfield");
- FieldWrapper fw = GetFieldWrapper(obj, type, clazz, name, sig, false);
+ FieldWrapper fw = GetFieldWrapper(obj, clazz, name, sig, false, callerID);
if(fw.IsFinal)
{
throw new java.lang.IllegalAccessError("Field " + fw.DeclaringType.Name + "." + fw.Name + " is final");
@@ -255,10 +255,10 @@ namespace IKVM.Runtime
}
[DebuggerStepThroughAttribute]
- public static void DynamicPutstatic(object val, string name, string sig, RuntimeTypeHandle type, string clazz, ikvm. at internal.CallerID callerID)
+ public static void DynamicPutstatic(object val, string name, string sig, string clazz, ikvm. at internal.CallerID callerID)
{
Profiler.Count("DynamicPutstatic");
- FieldWrapper fw = GetFieldWrapper(null, type, clazz, name, sig, true);
+ FieldWrapper fw = GetFieldWrapper(null, clazz, name, sig, true, callerID);
if(fw.IsFinal)
{
throw new java.lang.IllegalAccessError("Field " + fw.DeclaringType.Name + "." + fw.Name + " is final");
@@ -273,10 +273,10 @@ namespace IKVM.Runtime
// the sole purpose of this method is to check whether the clazz can be instantiated (but not to actually do it)
[DebuggerStepThroughAttribute]
- public static void DynamicNewCheckOnly(RuntimeTypeHandle type, string clazz)
+ public static void DynamicNewCheckOnly(string clazz, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicNewCheckOnly");
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
+ TypeWrapper wrapper = LoadTypeWrapper(clazz, callerId);
if(wrapper.IsAbstract)
{
throw new java.lang.InstantiationError(clazz);
@@ -284,16 +284,16 @@ namespace IKVM.Runtime
wrapper.RunClassInit();
}
- private static TypeWrapper LoadTypeWrapper(RuntimeTypeHandle type, string clazz)
+ private static TypeWrapper LoadTypeWrapper(string clazz, ikvm. at internal.CallerID callerId)
{
+#if FIRST_PASS
+ return null;
+#else
try
{
- TypeWrapper context = ClassLoaderWrapper.GetWrapperFromType(Type.GetTypeFromHandle(type));
- TypeWrapper wrapper = context.GetClassLoader().LoadClassByDottedNameFast(clazz);
- if(wrapper == null)
- {
- throw new java.lang.NoClassDefFoundError(clazz);
- }
+ TypeWrapper context = TypeWrapper.FromClass(callerId.getCallerClass());
+ TypeWrapper wrapper = ClassLoaderWrapper.FromCallerID(callerId).LoadClassByDottedName(clazz);
+ callerId.getCallerClassLoader().checkPackageAccess(wrapper.ClassObject, callerId.getCallerClass().pd);
if(!wrapper.IsAccessibleFrom(context))
{
throw new java.lang.IllegalAccessError("Try to access class " + wrapper.Name + " from class " + context.Name);
@@ -305,22 +305,23 @@ namespace IKVM.Runtime
{
throw x.ToJava();
}
+#endif
}
[DebuggerStepThroughAttribute]
- public static object DynamicClassLiteral(RuntimeTypeHandle type, string clazz)
+ public static java.lang.Class DynamicClassLiteral(string clazz, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicClassLiteral");
- return LoadTypeWrapper(type, clazz).ClassObject;
+ return LoadTypeWrapper(clazz, callerId).ClassObject;
}
[DebuggerStepThroughAttribute]
- public static object DynamicCast(object obj, RuntimeTypeHandle type, string clazz)
+ public static object DynamicCast(object obj, string clazz, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicCast");
// NOTE it's important that we don't try to load the class if obj == null
// (to be compatible with Sun)
- if(obj != null && !DynamicInstanceOf(obj, type, clazz))
+ if(obj != null && !DynamicInstanceOf(obj, clazz, callerId))
{
throw new java.lang.ClassCastException(NativeCode.ikvm.runtime.Util.GetTypeWrapperFromObject(obj).Name);
}
@@ -328,7 +329,7 @@ namespace IKVM.Runtime
}
[DebuggerStepThroughAttribute]
- public static bool DynamicInstanceOf(object obj, RuntimeTypeHandle type, string clazz)
+ public static bool DynamicInstanceOf(object obj, string clazz, ikvm. at internal.CallerID callerId)
{
Profiler.Count("DynamicInstanceOf");
// NOTE it's important that we don't try to load the class if obj == null
@@ -337,91 +338,146 @@ namespace IKVM.Runtime
{
return false;
}
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
+ TypeWrapper wrapper = LoadTypeWrapper(clazz, callerId);
return wrapper.IsInstance(obj);
}
- private static MethodWrapper GetMethodWrapper(object thisObj, RuntimeTypeHandle type, string clazz, string name, string sig, bool isStatic)
+ [DebuggerStepThrough]
+ public static java.lang.invoke.MethodType DynamicLoadMethodType(ref java.lang.invoke.MethodType cache, string sig, ikvm. at internal.CallerID callerID)
{
- TypeWrapper caller = ClassLoaderWrapper.GetWrapperFromType(Type.GetTypeFromHandle(type));
- TypeWrapper wrapper = LoadTypeWrapper(type, clazz);
- MethodWrapper mw = wrapper.GetMethodWrapper(name, sig, false);
- if(mw == null)
+ if (cache == null)
{
- throw new java.lang.NoSuchMethodError(clazz + "." + name + sig);
+ DynamicLoadMethodTypeImpl(ref cache, sig, callerID);
}
- // TODO check loader constraints
- if(mw.IsStatic != isStatic)
- {
- throw new java.lang.IncompatibleClassChangeError(clazz + "." + name);
- }
- TypeWrapper objType = null;
- if(thisObj != null)
+ return cache;
+ }
+
+ private static void DynamicLoadMethodTypeImpl(ref java.lang.invoke.MethodType cache, string sig, ikvm. at internal.CallerID callerID)
+ {
+#if !FIRST_PASS
+ try
{
- objType = ClassLoaderWrapper.GetWrapperFromType(thisObj.GetType());
+ ClassLoaderWrapper loader = ClassLoaderWrapper.FromCallerID(callerID);
+ TypeWrapper[] args = loader.ArgTypeWrapperListFromSig(sig);
+ java.lang.Class[] ptypes = new java.lang.Class[args.Length];
+ for (int i = 0; i < ptypes.Length; i++)
+ {
+ ptypes[i] = args[i].ClassObject;
+ }
+ Interlocked.CompareExchange(ref cache, java.lang.invoke.MethodType.methodType(loader.RetTypeWrapperFromSig(sig).ClassObject, ptypes), null);
}
- if(mw.IsAccessibleFrom(wrapper, caller, objType))
+ catch (RetargetableJavaException x)
{
- return mw;
+ throw x.ToJava();
}
- throw new java.lang.IllegalAccessError(clazz + "." + name + sig);
- }
-
- [DebuggerStepThroughAttribute]
- public static object DynamicInvokeSpecialNew(RuntimeTypeHandle type, string clazz, string name, string sig, object[] args, ikvm. at internal.CallerID callerID)
- {
- Profiler.Count("DynamicInvokeSpecialNew");
- MethodWrapper mw = GetMethodWrapper(null, type, clazz, name, sig, false);
- java.lang.reflect.Constructor cons = (java.lang.reflect.Constructor)mw.ToMethodOrConstructor(false);
- return cons.newInstance(BoxArgs(mw, args), callerID);
+#endif
}
- [DebuggerStepThroughAttribute]
- public static object DynamicInvokestatic(RuntimeTypeHandle type, string clazz, string name, string sig, object[] args, ikvm. at internal.CallerID callerID)
+ [DebuggerStepThrough]
+ public static java.lang.invoke.MethodHandle DynamicLoadMethodHandle(ref java.lang.invoke.MethodHandle cache, int kind, string clazz, string name, string sig, ikvm. at internal.CallerID callerID)
{
- Profiler.Count("DynamicInvokestatic");
- MethodWrapper mw = GetMethodWrapper(null, type, clazz, name, sig, true);
- java.lang.reflect.Method m = (java.lang.reflect.Method)mw.ToMethodOrConstructor(false);
- object val = m.invoke(null, BoxArgs(mw, args), callerID);
- if (mw.ReturnType.IsPrimitive && mw.ReturnType != PrimitiveTypeWrapper.VOID)
+ if (cache == null)
{
- val = JVM.Unbox(val);
+ Interlocked.CompareExchange(ref cache, DynamicLoadMethodHandleImpl(kind, clazz, name, sig, callerID), null);
}
- return val;
+ return cache;
}
- [DebuggerStepThroughAttribute]
- public static object DynamicInvokevirtual(object obj, RuntimeTypeHandle type, string clazz, string name, string sig, object[] args, ikvm. at internal.CallerID callerID)
+ private static java.lang.invoke.MethodHandle DynamicLoadMethodHandleImpl(int kind, string clazz, string name, string sig, ikvm. at internal.CallerID callerID)
{
- Profiler.Count("DynamicInvokevirtual");
- MethodWrapper mw = GetMethodWrapper(obj, type, clazz, name, sig, false);
- java.lang.reflect.Method m = (java.lang.reflect.Method)mw.ToMethodOrConstructor(false);
- object val = m.invoke(obj, BoxArgs(mw, args), callerID);
- if (mw.ReturnType.IsPrimitive && mw.ReturnType != PrimitiveTypeWrapper.VOID)
+#if FIRST_PASS
+ return null;
+#else
+ java.lang.invoke.MethodHandles.Lookup lookup = new java.lang.invoke.MethodHandles.Lookup(callerID.getCallerClass(),
+ java.lang.invoke.MethodHandles.Lookup.PUBLIC |
+ java.lang.invoke.MethodHandles.Lookup.PRIVATE |
+ java.lang.invoke.MethodHandles.Lookup.PROTECTED |
+ java.lang.invoke.MethodHandles.Lookup.PACKAGE,
+ true);
+ java.lang.Class refc = LoadTypeWrapper(clazz, callerID).ClassObject;
+ try
{
- val = JVM.Unbox(val);
+ switch ((ClassFile.RefKind)kind)
+ {
+ case ClassFile.RefKind.getStatic:
+ case ClassFile.RefKind.putStatic:
+ case ClassFile.RefKind.getField:
+ case ClassFile.RefKind.putField:
+ java.lang.Class type = ClassLoaderWrapper.FromCallerID(callerID).FieldTypeWrapperFromSig(sig).ClassObject;
+ switch ((ClassFile.RefKind)kind)
+ {
+ case ClassFile.RefKind.getStatic:
+ return lookup.findStaticGetter(refc, name, type);
+ case ClassFile.RefKind.putStatic:
+ return lookup.findStaticSetter(refc, name, type);
+ case ClassFile.RefKind.getField:
+ return lookup.findGetter(refc, name, type);
+ case ClassFile.RefKind.putField:
+ return lookup.findSetter(refc, name, type);
+ default:
+ throw new InvalidOperationException();
+ }
+ default:
+ java.lang.invoke.MethodType mt = null;
+ DynamicLoadMethodType(ref mt, sig, callerID);
+ switch ((ClassFile.RefKind)kind)
+ {
+ case ClassFile.RefKind.invokeInterface:
+ return lookup.findVirtual(refc, name, mt);
+ case ClassFile.RefKind.invokeSpecial:
+ return lookup.findSpecial(refc, name, mt, callerID.getCallerClass());
+ case ClassFile.RefKind.invokeStatic:
+ return lookup.findStatic(refc, name, mt);
+ case ClassFile.RefKind.invokeVirtual:
+ return lookup.findVirtual(refc, name, mt);
+ case ClassFile.RefKind.newInvokeSpecial:
+ return lookup.findConstructor(refc, mt);
+ default:
+ throw new InvalidOperationException();
+ }
+ }
}
- return val;
+ catch (RetargetableJavaException x)
+ {
+ throw x.ToJava();
+ }
+ catch (java.lang.ReflectiveOperationException x)
+ {
+ throw new java.lang.IncompatibleClassChangeError().initCause(x);
+ }
+#endif
}
- private static object[] BoxArgs(MethodWrapper mw, object[] args)
+ [DebuggerStepThrough]
+ public static T DynamicBinderMemberLookup<T>(int kind, string clazz, string name, string sig, ikvm. at internal.CallerID callerID)
+ where T : class /* delegate */
{
- TypeWrapper[] paramTypes = mw.GetParameters();
- for (int i = 0; i < paramTypes.Length; i++)
+#if FIRST_PASS
+ return null;
+#else
+ try
{
- if (paramTypes[i].IsPrimitive)
+ java.lang.invoke.MethodHandle mh = DynamicLoadMethodHandleImpl(kind, clazz, name, sig, callerID);
+ return mh.vmtarget as T
+ ?? (T)mh.asType(MethodHandleUtil.GetDelegateMethodType(typeof(T))).vmtarget;
+ }
+ catch (java.lang.IncompatibleClassChangeError x)
+ {
+ if (x.getCause() is java.lang.NoSuchMethodException)
{
- args[i] = JVM.Box(args[i]);
+ throw new java.lang.NoSuchMethodError(x.getCause().Message);
}
+ if (x.getCause() is java.lang.NoSuchFieldException)
+ {
+ throw new java.lang.NoSuchFieldError(x.getCause().Message);
+ }
+ if (x.getCause() is java.lang.IllegalAccessException)
+ {
+ throw new java.lang.IllegalAccessError(x.getCause().Message);
+ }
+ throw;
}
- return args;
- }
-
- [DebuggerStepThroughAttribute]
- public static Type DynamicGetTypeAsExceptionType(RuntimeTypeHandle type, string clazz)
- {
- Profiler.Count("DynamicGetTypeAsExceptionType");
- return LoadTypeWrapper(type, clazz).TypeAsExceptionType;
+#endif
}
[DebuggerStepThrough]
@@ -469,12 +525,6 @@ namespace IKVM.Runtime
return false;
}
- [DebuggerStepThroughAttribute]
- public static Type DynamicGetTypeAsExceptionType(RuntimeTypeHandle type, string clazz)
- {
- return null;
- }
-
[DebuggerStepThrough]
public static Delegate DynamicCreateDelegate(object obj, Type delegateType)
{
diff --git a/external/ikvm/runtime/ClassFile.cs b/external/ikvm/runtime/ClassFile.cs
index 2391cc3..c3cf3e8 100644
--- a/external/ikvm/runtime/ClassFile.cs
+++ b/external/ikvm/runtime/ClassFile.cs
@@ -88,11 +88,13 @@ namespace IKVM.Internal
}
#if STATIC_COMPILER
- // This method parses just enough of the class file to obtain its name, it doesn't
+ // This method parses just enough of the class file to obtain its name and
+ // determine if the class is a possible ikvmstub generated stub, it doesn't
// validate the class file structure, but it may throw a ClassFormatError if it
// encounters bogus data
- internal static string GetClassName(byte[] buf, int offset, int length)
+ internal static string GetClassName(byte[] buf, int offset, int length, out bool isstub)
{
+ isstub = false;
BigEndianBinaryReader br = new BigEndianBinaryReader(buf, offset, length);
if(br.ReadUInt32() != 0xCAFEBABE)
{
@@ -141,7 +143,7 @@ namespace IKVM.Internal
br.Skip(2);
break;
case Constant.Utf8:
- utf8_cp[i] = br.ReadString("<unknown>");
+ isstub |= (utf8_cp[i] = br.ReadString("<unknown>")) == "IKVM.NET.Assembly";
break;
default:
throw new ClassFormatError("Illegal constant pool type 0x{0:X}", tag);
@@ -1427,7 +1429,21 @@ namespace IKVM.Internal
{
if(typeWrapper == VerifierTypeWrapper.Null)
{
- typeWrapper = ClassLoaderWrapper.LoadClassNoThrow(thisType.GetClassLoader(), name);
+ TypeWrapper tw = ClassLoaderWrapper.LoadClassNoThrow(thisType.GetClassLoader(), name);
+#if !STATIC_COMPILER && !FIRST_PASS
+ if(!tw.IsUnloadable)
+ {
+ try
+ {
+ thisType.GetClassLoader().CheckPackageAccess(tw, thisType.ClassObject.pd);
+ }
+ catch(java.lang.SecurityException)
+ {
+ tw = new UnloadableTypeWrapper(name);
+ }
+ }
+#endif
+ typeWrapper = tw;
}
}
@@ -1725,9 +1741,11 @@ namespace IKVM.Internal
{
method.Link();
}
- if(Name != StringConstants.INIT &&
- (thisType.Modifiers & (Modifiers.Interface | Modifiers.Super)) == Modifiers.Super &&
- thisType != wrapper && thisType.IsSubTypeOf(wrapper))
+ if(Name != StringConstants.INIT
+ && !thisType.IsInterface
+ && (!JVM.AllowNonVirtualCalls || (thisType.Modifiers & Modifiers.Super) == Modifiers.Super)
+ && thisType != wrapper
+ && thisType.IsSubTypeOf(wrapper))
{
invokespecialMethod = thisType.BaseTypeWrapper.GetMethodWrapper(Name, Signature, true);
if(invokespecialMethod != null)
@@ -2011,6 +2029,11 @@ namespace IKVM.Internal
}
}
+ internal string Signature
+ {
+ get { return descriptor; }
+ }
+
internal TypeWrapper[] GetArgTypes()
{
return argTypeWrappers;
diff --git a/external/ikvm/runtime/ClassLoaderWrapper.cs b/external/ikvm/runtime/ClassLoaderWrapper.cs
index 5dea779..813e41f 100644
--- a/external/ikvm/runtime/ClassLoaderWrapper.cs
+++ b/external/ikvm/runtime/ClassLoaderWrapper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2011 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -26,9 +26,11 @@ using System;
using IKVM.Reflection;
using IKVM.Reflection.Emit;
using Type = IKVM.Reflection.Type;
+using ProtectionDomain = System.Object;
#else
using System.Reflection;
using System.Reflection.Emit;
+using ProtectionDomain = java.security.ProtectionDomain;
#endif
using System.IO;
using System.Collections.Generic;
@@ -49,16 +51,18 @@ namespace IKVM.Internal
NoJNI = 8,
RemoveAsserts = 16,
NoAutomagicSerialization = 32,
+ DisableDynamicBinding = 64,
}
#if !STUB_GENERATOR
abstract class TypeWrapperFactory
{
internal abstract ModuleBuilder ModuleBuilder { get; }
- internal abstract TypeWrapper DefineClassImpl(Dictionary<string, TypeWrapper> types, ClassFile f, ClassLoaderWrapper classLoader, object protectionDomain);
+ internal abstract TypeWrapper DefineClassImpl(Dictionary<string, TypeWrapper> types, ClassFile f, ClassLoaderWrapper classLoader, ProtectionDomain protectionDomain);
internal abstract bool ReserveName(string name);
internal abstract string AllocMangledName(DynamicTypeWrapper tw);
internal abstract Type DefineUnloadable(string name);
+ internal abstract bool HasInternalAccess { get; }
#if CLASSGC
internal abstract void AddInternalsVisibleTo(Assembly friend);
#endif
@@ -74,22 +78,22 @@ namespace IKVM.Internal
#else
private static AssemblyClassLoader bootstrapClassLoader;
#endif
- private static List<GenericClassLoader> genericClassLoaders;
+ private static List<GenericClassLoaderWrapper> genericClassLoaders;
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
protected java.lang.ClassLoader javaClassLoader;
#endif
#if !STUB_GENERATOR
private TypeWrapperFactory factory;
#endif // !STUB_GENERATOR
- private Dictionary<string, TypeWrapper> types = new Dictionary<string, TypeWrapper>();
+ private readonly Dictionary<string, TypeWrapper> types = new Dictionary<string, TypeWrapper>();
private readonly Dictionary<string, Thread> defineClassInProgress = new Dictionary<string, Thread>();
private List<IntPtr> nativeLibraries;
- private CodeGenOptions codegenoptions;
+ private readonly CodeGenOptions codegenoptions;
#if CLASSGC
private Dictionary<Type, TypeWrapper> typeToTypeWrapper;
private static ConditionalWeakTable<Assembly, ClassLoaderWrapper> dynamicAssemblies;
#endif
- private static Dictionary<Type, string> remappedTypes = new Dictionary<Type, string>();
+ private static readonly Dictionary<Type, string> remappedTypes = new Dictionary<Type, string>();
#if STATIC_COMPILER || STUB_GENERATOR
// HACK this is used by the ahead-of-time compiler to overrule the bootstrap classloader
@@ -170,15 +174,24 @@ namespace IKVM.Internal
#endif
// return the TypeWrapper if it is already loaded, this exists for DynamicTypeWrapper.SetupGhosts
- // and ClassLoader.findLoadedClass()
- internal virtual TypeWrapper GetLoadedClass(string name)
+ // and implements ClassLoader.findLoadedClass()
+ internal TypeWrapper FindLoadedClass(string name)
{
- lock(types)
+ if (name.Length > 1 && name[0] == '[')
+ {
+ return FindOrLoadArrayClass(name, true);
+ }
+ TypeWrapper tw;
+ lock (types)
{
- TypeWrapper tw;
types.TryGetValue(name, out tw);
- return tw;
}
+ return tw ?? FindLoadedClassLazy(name);
+ }
+
+ protected virtual TypeWrapper FindLoadedClassLazy(string name)
+ {
+ return null;
}
internal TypeWrapper RegisterInitiatingLoader(TypeWrapper tw)
@@ -272,6 +285,14 @@ namespace IKVM.Internal
}
}
+ internal bool DisableDynamicBinding
+ {
+ get
+ {
+ return (codegenoptions & CodeGenOptions.DisableDynamicBinding) != 0;
+ }
+ }
+
#if !STATIC_COMPILER && !STUB_GENERATOR
internal bool RelaxedClassNameValidation
{
@@ -286,14 +307,10 @@ namespace IKVM.Internal
}
#endif // !STATIC_COMPILER && !STUB_GENERATOR
- protected virtual void CheckDefineClassAllowed(string className)
- {
- // this hook exists so that AssemblyClassLoader can prevent DefineClass when the name is already present in the assembly
- }
-
#if !STUB_GENERATOR
- internal TypeWrapper DefineClass(ClassFile f, object protectionDomain)
+ internal TypeWrapper DefineClass(ClassFile f, ProtectionDomain protectionDomain)
{
+#if !STATIC_COMPILER
string dotnetAssembly = f.IKVMAssemblyAttribute;
if(dotnetAssembly != null)
{
@@ -316,7 +333,12 @@ namespace IKVM.Internal
}
return RegisterInitiatingLoader(tw);
}
- CheckDefineClassAllowed(f.Name);
+#endif
+ // check if the class already exists if we're an AssemblyClassLoader
+ if(FindLoadedClassLazy(f.Name) != null)
+ {
+ throw new LinkageError("duplicate class definition: " + f.Name);
+ }
TypeWrapper def;
try
{
@@ -329,7 +351,7 @@ namespace IKVM.Internal
return def;
}
- private TypeWrapper DefineClassCritical(ClassFile f, object protectionDomain)
+ private TypeWrapper DefineClassCritical(ClassFile f, ProtectionDomain protectionDomain)
{
lock(types)
{
@@ -420,36 +442,14 @@ namespace IKVM.Internal
Profiler.Enter("LoadClassByDottedName");
try
{
- TypeWrapper type;
- lock(types)
- {
- if(types.TryGetValue(name, out type) && type == null)
- {
- Thread defineThread;
- if(defineClassInProgress.TryGetValue(name, out defineThread))
- {
- if(Thread.CurrentThread == defineThread)
- {
- throw new ClassCircularityError(name);
- }
- // the requested class is currently being defined by another thread,
- // so we have to wait on that
- while(defineClassInProgress.ContainsKey(name))
- {
- Monitor.Wait(types);
- }
- // the defineClass may have failed, so we need to use TryGetValue
- types.TryGetValue(name, out type);
- }
- }
- }
+ TypeWrapper type = LoadRegisteredOrPendingClass(name);
if(type != null)
{
return type;
}
if(name.Length > 1 && name[0] == '[')
{
- return LoadArrayClass(name);
+ return FindOrLoadArrayClass(name, false);
}
return LoadClassImpl(name, throwClassNotFoundException);
}
@@ -459,7 +459,40 @@ namespace IKVM.Internal
}
}
- private TypeWrapper LoadArrayClass(string name)
+ private TypeWrapper LoadRegisteredOrPendingClass(string name)
+ {
+ TypeWrapper tw;
+ lock (types)
+ {
+ if (types.TryGetValue(name, out tw) && tw == null)
+ {
+ Thread defineThread;
+ if (defineClassInProgress.TryGetValue(name, out defineThread))
+ {
+ if (Thread.CurrentThread == defineThread)
+ {
+ throw new ClassCircularityError(name);
+ }
+ // the requested class is currently being defined by another thread,
+ // so we have to wait on that
+ while (defineClassInProgress.ContainsKey(name))
+ {
+ Monitor.Wait(types);
+ }
+ // the defineClass may have failed, so we need to use TryGetValue
+ types.TryGetValue(name, out tw);
+ }
+ }
+ }
+ return tw;
+ }
+
+ private TypeWrapper FindOrLoadClass(string name, bool find)
+ {
+ return find ? FindLoadedClass(name) : LoadClassByDottedNameFast(name);
+ }
+
+ private TypeWrapper FindOrLoadArrayClass(string name, bool find)
{
int dims = 1;
while(name[dims] == '[')
@@ -481,7 +514,7 @@ namespace IKVM.Internal
string elemClass = name.Substring(dims + 1, name.Length - dims - 2);
// NOTE it's important that we're registered as the initiating loader
// for the element type here
- TypeWrapper type = LoadClassByDottedNameFast(elemClass);
+ TypeWrapper type = FindOrLoadClass(elemClass, find);
if(type != null)
{
type = type.GetClassLoader().CreateArrayType(name, type, dims);
@@ -516,13 +549,13 @@ namespace IKVM.Internal
}
}
- internal TypeWrapper LoadGenericClass(string name)
+ internal TypeWrapper FindOrLoadGenericClass(string name, bool find)
{
// we need to handle delegate methods here (for generic delegates)
// (note that other types with manufactured inner classes such as Attribute and Enum can't be generic)
if (name.EndsWith(DotNetTypeWrapper.DelegateInterfaceSuffix))
{
- TypeWrapper outer = LoadGenericClass(name.Substring(0, name.Length - DotNetTypeWrapper.DelegateInterfaceSuffix.Length));
+ TypeWrapper outer = FindOrLoadGenericClass(name.Substring(0, name.Length - DotNetTypeWrapper.DelegateInterfaceSuffix.Length), find);
if (outer != null && outer.IsFakeTypeContainer)
{
foreach (TypeWrapper tw in outer.InnerClasses)
@@ -546,11 +579,12 @@ namespace IKVM.Internal
{
return null;
}
- Type type = GetGenericTypeDefinition(DotNetTypeWrapper.DemangleTypeName(name.Substring(0, pos)));
- if(type == null)
+ TypeWrapper def = FindOrLoadClass(name.Substring(0, pos), find);
+ if (def == null || !def.TypeAsTBD.IsGenericTypeDefinition)
{
return null;
}
+ Type type = def.TypeAsTBD;
List<string> typeParamNames = new List<string>();
pos += 5;
int start = pos;
@@ -619,7 +653,7 @@ namespace IKVM.Internal
switch(s[dims])
{
case 'L':
- tw = LoadClassByDottedNameFast(s.Substring(dims + 1));
+ tw = FindOrLoadClass(s.Substring(dims + 1), find);
if(tw == null)
{
return null;
@@ -679,7 +713,7 @@ namespace IKVM.Internal
protected virtual TypeWrapper LoadClassImpl(string name, bool throwClassNotFoundException)
{
- TypeWrapper tw = LoadGenericClass(name);
+ TypeWrapper tw = FindOrLoadGenericClass(name, false);
if(tw != null)
{
return tw;
@@ -688,7 +722,7 @@ namespace IKVM.Internal
Profiler.Enter("ClassLoader.loadClass");
try
{
- java.lang.Class c = ((java.lang.ClassLoader)GetJavaClassLoader()).loadClassInternal(name);
+ java.lang.Class c = GetJavaClassLoader().loadClassInternal(name);
if(c == null)
{
return null;
@@ -730,14 +764,16 @@ namespace IKVM.Internal
return RegisterInitiatingLoader(new ArrayTypeWrapper(elementTypeWrapper, name));
}
- internal virtual object GetJavaClassLoader()
+#if !STATIC_COMPILER && !STUB_GENERATOR
+ internal virtual java.lang.ClassLoader GetJavaClassLoader()
{
-#if FIRST_PASS || STATIC_COMPILER || STUB_GENERATOR
+#if FIRST_PASS
return null;
#else
return javaClassLoader;
#endif
}
+#endif
internal TypeWrapper ExpressionTypeWrapper(string type)
{
@@ -902,7 +938,7 @@ namespace IKVM.Internal
}
#if !STATIC_COMPILER && !STUB_GENERATOR
- internal static ClassLoaderWrapper GetClassLoaderWrapper(object javaClassLoader)
+ internal static ClassLoaderWrapper GetClassLoaderWrapper(java.lang.ClassLoader javaClassLoader)
{
if(javaClassLoader == null)
{
@@ -918,7 +954,7 @@ namespace IKVM.Internal
// MONOBUG the redundant cast to ClassLoaderWrapper is to workaround an mcs bug
(ClassLoaderWrapper)(object)
#endif
- ((java.lang.ClassLoader)javaClassLoader).wrapper;
+ javaClassLoader.wrapper;
#endif
if(wrapper == null)
{
@@ -952,6 +988,12 @@ namespace IKVM.Internal
internal static TypeWrapper GetWrapperFromType(Type type)
{
+#if STATIC_COMPILER
+ if (type.__ContainsMissingType)
+ {
+ return new UnloadableTypeWrapper(type);
+ }
+#endif
//Tracer.Info(Tracer.Runtime, "GetWrapperFromType: {0}", type.AssemblyQualifiedName);
#if !STATIC_COMPILER
TypeWrapper.AssertFinished(type);
@@ -1039,11 +1081,6 @@ namespace IKVM.Internal
return wrapper;
}
- internal virtual Type GetGenericTypeDefinition(string name)
- {
- return null;
- }
-
internal static ClassLoaderWrapper GetGenericClassLoader(TypeWrapper wrapper)
{
Type type = wrapper.TypeAsTBD;
@@ -1079,37 +1116,39 @@ namespace IKVM.Internal
{
if(genericClassLoaders == null)
{
- genericClassLoaders = new List<GenericClassLoader>();
+ genericClassLoaders = new List<GenericClassLoaderWrapper>();
}
- foreach(GenericClassLoader loader in genericClassLoaders)
+ foreach(GenericClassLoaderWrapper loader in genericClassLoaders)
{
if(loader.Matches(key))
{
return loader;
}
}
- object javaClassLoader = null;
-#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- javaClassLoader = DoPrivileged(new AssemblyClassLoader.CreateAssemblyClassLoader(null));
-#endif
- GenericClassLoader newLoader = new GenericClassLoader(key, javaClassLoader);
+#if STATIC_COMPILER || STUB_GENERATOR || FIRST_PASS
+ GenericClassLoaderWrapper newLoader = new GenericClassLoaderWrapper(key, null);
+#else
+ java.lang.ClassLoader javaClassLoader = new ikvm.runtime.GenericClassLoader();
+ GenericClassLoaderWrapper newLoader = new GenericClassLoaderWrapper(key, javaClassLoader);
SetWrapperForClassLoader(javaClassLoader, newLoader);
+#endif
genericClassLoaders.Add(newLoader);
return newLoader;
}
}
- protected static void SetWrapperForClassLoader(object javaClassLoader, ClassLoaderWrapper wrapper)
+#if !STATIC_COMPILER && !STUB_GENERATOR
+ protected internal static void SetWrapperForClassLoader(java.lang.ClassLoader javaClassLoader, ClassLoaderWrapper wrapper)
{
-#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
-#if __MonoCS__
+#if __MonoCS__ || FIRST_PASS
typeof(java.lang.ClassLoader).GetField("wrapper", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(javaClassLoader, wrapper);
#else
- ((java.lang.ClassLoader)javaClassLoader).wrapper = wrapper;
-#endif
+ javaClassLoader.wrapper = wrapper;
#endif
}
+#endif
+#if !STATIC_COMPILER && !STUB_GENERATOR
internal static ClassLoaderWrapper GetGenericClassLoaderByName(string name)
{
Debug.Assert(name.StartsWith("[[") && name.EndsWith("]]"));
@@ -1159,18 +1198,15 @@ namespace IKVM.Internal
{
return GetGenericClassLoaderByName(name);
}
-#if STATIC_COMPILER || STUB_GENERATOR
- return AssemblyClassLoader.FromAssembly(StaticCompiler.Load(name));
-#else
return AssemblyClassLoader.FromAssembly(Assembly.Load(name));
-#endif
}
+#endif
internal static int GetGenericClassLoaderId(ClassLoaderWrapper wrapper)
{
lock(wrapperLock)
{
- return genericClassLoaders.IndexOf(wrapper as GenericClassLoader);
+ return genericClassLoaders.IndexOf(wrapper as GenericClassLoaderWrapper);
}
}
@@ -1338,7 +1374,7 @@ namespace IKVM.Internal
}
if(Tracer.ClassLoading.TraceError)
{
- java.lang.ClassLoader cl = (java.lang.ClassLoader)classLoader.GetJavaClassLoader();
+ java.lang.ClassLoader cl = classLoader.GetJavaClassLoader();
if(cl != null)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
@@ -1367,13 +1403,23 @@ namespace IKVM.Internal
StaticCompiler.IssueMessage(msgId, values);
}
#endif
+
+ internal void CheckPackageAccess(TypeWrapper tw, ProtectionDomain pd)
+ {
+#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
+ if (javaClassLoader != null)
+ {
+ javaClassLoader.checkPackageAccess(tw.ClassObject, pd);
+ }
+#endif
+ }
}
- sealed class GenericClassLoader : ClassLoaderWrapper
+ sealed class GenericClassLoaderWrapper : ClassLoaderWrapper
{
- private ClassLoaderWrapper[] delegates;
+ private readonly ClassLoaderWrapper[] delegates;
- internal GenericClassLoader(ClassLoaderWrapper[] delegates, object javaClassLoader)
+ internal GenericClassLoaderWrapper(ClassLoaderWrapper[] delegates, object javaClassLoader)
: base(CodeGenOptions.None, javaClassLoader)
{
this.delegates = delegates;
@@ -1395,30 +1441,17 @@ namespace IKVM.Internal
return false;
}
- internal override Type GetGenericTypeDefinition(string name)
+ protected override TypeWrapper FindLoadedClassLazy(string name)
{
- foreach(ClassLoaderWrapper loader in delegates)
+ TypeWrapper tw1 = FindOrLoadGenericClass(name, true);
+ if (tw1 != null)
{
- Type t = loader.GetGenericTypeDefinition(name);
- if(t != null)
- {
- return t;
- }
- }
- return null;
- }
-
- protected override TypeWrapper LoadClassImpl(string name, bool throwClassNotFoundException)
- {
- TypeWrapper tw = LoadGenericClass(name);
- if(tw != null)
- {
- return tw;
+ return tw1;
}
- foreach(ClassLoaderWrapper loader in delegates)
+ foreach (ClassLoaderWrapper loader in delegates)
{
- tw = loader.LoadClassByDottedNameFast(name);
- if(tw != null)
+ TypeWrapper tw = loader.FindLoadedClass(name);
+ if (tw != null && tw.GetClassLoader() == loader)
{
return tw;
}
@@ -1433,7 +1466,7 @@ namespace IKVM.Internal
foreach(ClassLoaderWrapper loader in delegates)
{
sb.Append('[');
- GenericClassLoader gcl = loader as GenericClassLoader;
+ GenericClassLoaderWrapper gcl = loader as GenericClassLoaderWrapper;
if(gcl != null)
{
sb.Append(gcl.GetName());
@@ -1447,5 +1480,55 @@ namespace IKVM.Internal
sb.Append(']');
return sb.ToString();
}
+
+#if !STATIC_COMPILER && !STUB_GENERATOR
+ internal java.util.Enumeration GetResources(string name)
+ {
+#if FIRST_PASS
+ return null;
+#else
+ java.util.Vector v = new java.util.Vector();
+ foreach (java.net.URL url in GetBootstrapClassLoader().GetResources(name))
+ {
+ v.add(url);
+ }
+ if (name.EndsWith(".class", StringComparison.Ordinal) && name.IndexOf('.') == name.Length - 6)
+ {
+ TypeWrapper tw = FindLoadedClass(name.Substring(0, name.Length - 6).Replace('/', '.'));
+ if (tw != null && !tw.IsArray && !(tw is DynamicTypeWrapper))
+ {
+ ClassLoaderWrapper loader = tw.GetClassLoader();
+ if (loader is GenericClassLoaderWrapper)
+ {
+ v.add(new java.net.URL("ikvmres", "gen", ClassLoaderWrapper.GetGenericClassLoaderId(loader), "/" + name));
+ }
+ else if (loader is AssemblyClassLoader)
+ {
+ foreach (java.net.URL url in ((AssemblyClassLoader)loader).FindResources(name))
+ {
+ v.add(url);
+ }
+ }
+ }
+ }
+ return v.elements();
+#endif
+ }
+
+ internal java.net.URL FindResource(string name)
+ {
+#if !FIRST_PASS
+ if (name.EndsWith(".class", StringComparison.Ordinal) && name.IndexOf('.') == name.Length - 6)
+ {
+ TypeWrapper tw = FindLoadedClass(name.Substring(0, name.Length - 6).Replace('/', '.'));
+ if (tw != null && tw.GetClassLoader() == this && !tw.IsArray && !(tw is DynamicTypeWrapper))
+ {
+ return new java.net.URL("ikvmres", "gen", ClassLoaderWrapper.GetGenericClassLoaderId(this), "/" + name);
+ }
+ }
+#endif
+ return null;
+ }
+#endif
}
}
diff --git a/external/ikvm/runtime/CoreClasses.cs b/external/ikvm/runtime/CoreClasses.cs
index d8cefb0..a6f8e1f 100644
--- a/external/ikvm/runtime/CoreClasses.cs
+++ b/external/ikvm/runtime/CoreClasses.cs
@@ -42,6 +42,17 @@ namespace IKVM.Internal
internal static class java
{
+ internal static class io
+ {
+ internal static class Serializable
+ {
+ // NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
+ // (we don't want the classes to be loaded prematurely, because they might not be available then)
+ static Serializable() { }
+ internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.io.Serializable");
+ }
+ }
+
internal static class lang
{
internal static class Object
@@ -68,6 +79,14 @@ namespace IKVM.Internal
internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Class");
}
+ internal static class Cloneable
+ {
+ // NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
+ // (we don't want the classes to be loaded prematurely, because they might not be available then)
+ static Cloneable() {}
+ internal static readonly TypeWrapper Wrapper = ClassLoaderWrapper.LoadClassCritical("java.lang.Cloneable");
+ }
+
internal static class Throwable
{
// NOTE we have a dummy static initializer, to make sure we don't get the beforeFieldInit attribute
diff --git a/external/ikvm/runtime/DotNetTypeWrapper.cs b/external/ikvm/runtime/DotNetTypeWrapper.cs
index be69a59..94e6993 100644
--- a/external/ikvm/runtime/DotNetTypeWrapper.cs
+++ b/external/ikvm/runtime/DotNetTypeWrapper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -54,9 +54,9 @@ namespace IKVM.Internal
private static readonly Dictionary<Type, TypeWrapper> types = new Dictionary<Type, TypeWrapper>();
private readonly Type type;
private TypeWrapper baseTypeWrapper;
- private TypeWrapper[] innerClasses;
+ private volatile TypeWrapper[] innerClasses;
private TypeWrapper outerClass;
- private TypeWrapper[] interfaces;
+ private volatile TypeWrapper[] interfaces;
private volatile bool finished;
private static Modifiers GetModifiers(Type type)
@@ -303,7 +303,7 @@ namespace IKVM.Internal
}
internal OpenGenericTypeWrapper(Type type, string name)
- : base(GetModifiers(type), name)
+ : base(TypeFlags.None, GetModifiers(type), name)
{
this.type = type;
}
@@ -354,7 +354,7 @@ namespace IKVM.Internal
private readonly TypeWrapper baseWrapper;
protected FakeTypeWrapper(Modifiers modifiers, string name, TypeWrapper baseWrapper)
- : base(modifiers, name)
+ : base(TypeFlags.None, modifiers, name)
{
this.baseWrapper = baseWrapper;
}
@@ -374,7 +374,7 @@ namespace IKVM.Internal
{
private readonly Type fakeType;
- internal DelegateInnerClassTypeWrapper(string name, Type delegateType, ClassLoaderWrapper classLoader)
+ internal DelegateInnerClassTypeWrapper(string name, Type delegateType)
: base(Modifiers.Public | Modifiers.Interface | Modifiers.Abstract, name, null)
{
#if STATIC_COMPILER || STUB_GENERATOR
@@ -468,7 +468,7 @@ namespace IKVM.Internal
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- object ICustomInvoke.Invoke(object obj, object[] args, ikvm. at internal.CallerID callerID)
+ object ICustomInvoke.Invoke(object obj, object[] args)
{
// a DynamicOnlyMethodWrapper is an interface method, but now that we've been called on an actual object instance,
// we can resolve to a real method and call that instead
@@ -482,9 +482,14 @@ namespace IKVM.Internal
{
throw new java.lang.IllegalAccessError(tw.Name + "." + this.Name + this.Signature);
}
+ if (mw.HasCallerID)
+ {
+ // an interface method cannot require a CallerID
+ throw new InvalidOperationException();
+ }
java.lang.reflect.Method m = (java.lang.reflect.Method)mw.ToMethodOrConstructor(true);
m. at override = true;
- return m.invoke(obj, args, callerID);
+ return m.invoke(obj, args, null);
}
#endif // !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
}
@@ -570,7 +575,7 @@ namespace IKVM.Internal
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- object ICustomInvoke.Invoke(object obj, object[] args, ikvm. at internal.CallerID callerID)
+ object ICustomInvoke.Invoke(object obj, object[] args)
{
FieldWrapper[] values = this.DeclaringType.GetFields();
object[] array = (object[])Array.CreateInstance(this.DeclaringType.TypeAsArrayType, values.Length);
@@ -599,7 +604,7 @@ namespace IKVM.Internal
}
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- object ICustomInvoke.Invoke(object obj, object[] args, ikvm. at internal.CallerID callerID)
+ object ICustomInvoke.Invoke(object obj, object[] args)
{
FieldWrapper[] values = this.DeclaringType.GetFields();
for (int i = 0; i < values.Length; i++)
@@ -715,7 +720,7 @@ namespace IKVM.Internal
{
private readonly Type fakeType;
private readonly Type attributeType;
- private TypeWrapper[] innerClasses;
+ private volatile TypeWrapper[] innerClasses;
internal AttributeAnnotationTypeWrapper(string name, Type attributeType)
: base(name)
@@ -828,7 +833,7 @@ namespace IKVM.Internal
private sealed class AttributeAnnotationMethodWrapper : DynamicOnlyMethodWrapper
{
- private bool optional;
+ private readonly bool optional;
internal AttributeAnnotationMethodWrapper(AttributeAnnotationTypeWrapper tw, string name, Type type, bool optional)
: this(tw, name, MapType(type, false), optional)
@@ -927,23 +932,43 @@ namespace IKVM.Internal
foreach (PropertyInfo pi in attributeType.GetProperties(BindingFlags.Instance | BindingFlags.Public))
{
// the getter and setter methods both need to be public
- if (pi.GetGetMethod() != null && pi.GetSetMethod() != null && IsSupportedType(pi.PropertyType))
+ // the getter signature must be: <PropertyType> Getter()
+ // the setter signature must be: void Setter(<PropertyType>)
+ // the property type needs to be a supported type
+ MethodInfo getter = pi.GetGetMethod();
+ MethodInfo setter = pi.GetSetMethod();
+ ParameterInfo[] parameters;
+ if (getter != null && getter.GetParameters().Length == 0 && getter.ReturnType == pi.PropertyType
+ && setter != null && (parameters = setter.GetParameters()).Length == 1 && parameters[0].ParameterType == pi.PropertyType && setter.ReturnType == Types.Void
+ && IsSupportedType(pi.PropertyType))
{
- methods.Add(new AttributeAnnotationMethodWrapper(this, pi.Name, pi.PropertyType, true));
+ AddMethodIfUnique(methods, new AttributeAnnotationMethodWrapper(this, pi.Name, pi.PropertyType, true));
}
}
foreach (FieldInfo fi in attributeType.GetFields(BindingFlags.Public | BindingFlags.Instance))
{
- // TODO add other field validations to make sure it is appropriate
if (!fi.IsInitOnly && IsSupportedType(fi.FieldType))
{
- methods.Add(new AttributeAnnotationMethodWrapper(this, fi.Name, fi.FieldType, true));
+ AddMethodIfUnique(methods, new AttributeAnnotationMethodWrapper(this, fi.Name, fi.FieldType, true));
}
}
SetMethods(methods.ToArray());
base.LazyPublishMembers();
}
+ private static void AddMethodIfUnique(List<MethodWrapper> methods, MethodWrapper method)
+ {
+ foreach (MethodWrapper mw in methods)
+ {
+ if (mw.Name == method.Name && mw.Signature == method.Signature)
+ {
+ // ignore duplicate
+ return;
+ }
+ }
+ methods.Add(method);
+ }
+
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override object GetAnnotationDefault(MethodWrapper mw)
{
@@ -1086,7 +1111,7 @@ namespace IKVM.Internal
private sealed class ReturnValueAnnotation : Annotation
{
- private AttributeAnnotationTypeWrapper type;
+ private readonly AttributeAnnotationTypeWrapper type;
internal ReturnValueAnnotation(AttributeAnnotationTypeWrapper type)
{
@@ -1223,7 +1248,7 @@ namespace IKVM.Internal
private sealed class MultipleAnnotation : Annotation
{
- private AttributeAnnotationTypeWrapper type;
+ private readonly AttributeAnnotationTypeWrapper type;
internal MultipleAnnotation(AttributeAnnotationTypeWrapper type)
{
@@ -1325,27 +1350,29 @@ namespace IKVM.Internal
{
get
{
- lock (this)
+ if (innerClasses == null)
{
- if (innerClasses == null)
- {
- List<TypeWrapper> list = new List<TypeWrapper>();
- AttributeUsageAttribute attr = GetAttributeUsage();
- if ((attr.ValidOn & AttributeTargets.ReturnValue) != 0)
- {
- list.Add(GetClassLoader().RegisterInitiatingLoader(new ReturnValueAnnotationTypeWrapper(this)));
- }
- if (attr.AllowMultiple)
- {
- list.Add(GetClassLoader().RegisterInitiatingLoader(new MultipleAnnotationTypeWrapper(this)));
- }
- innerClasses = list.ToArray();
- }
+ innerClasses = GetInnerClasses();
}
return innerClasses;
}
}
+ private TypeWrapper[] GetInnerClasses()
+ {
+ List<TypeWrapper> list = new List<TypeWrapper>();
+ AttributeUsageAttribute attr = GetAttributeUsage();
+ if ((attr.ValidOn & AttributeTargets.ReturnValue) != 0)
+ {
+ list.Add(GetClassLoader().RegisterInitiatingLoader(new ReturnValueAnnotationTypeWrapper(this)));
+ }
+ if (attr.AllowMultiple)
+ {
+ list.Add(GetClassLoader().RegisterInitiatingLoader(new MultipleAnnotationTypeWrapper(this)));
+ }
+ return list.ToArray();
+ }
+
internal override bool IsFakeTypeContainer
{
get
@@ -1425,7 +1452,7 @@ namespace IKVM.Internal
private sealed class AttributeAnnotation : Annotation
{
- private Type type;
+ private readonly Type type;
internal AttributeAnnotation(Type type)
{
@@ -1713,7 +1740,7 @@ namespace IKVM.Internal
}
private DotNetTypeWrapper(Type type, string name)
- : base(GetModifiers(type), name)
+ : base(TypeFlags.None, GetModifiers(type), name)
{
Debug.Assert(!(type.IsByRef), type.FullName);
Debug.Assert(!(type.IsPointer), type.FullName);
@@ -1763,8 +1790,8 @@ namespace IKVM.Internal
private sealed class DelegateMethodWrapper : MethodWrapper
{
- private ConstructorInfo delegateConstructor;
- private DelegateInnerClassTypeWrapper iface;
+ private readonly ConstructorInfo delegateConstructor;
+ private readonly DelegateInnerClassTypeWrapper iface;
internal DelegateMethodWrapper(TypeWrapper declaringType, DelegateInnerClassTypeWrapper iface)
: base(declaringType, "<init>", "(" + iface.SigName + ")V", null, PrimitiveTypeWrapper.VOID, new TypeWrapper[] { iface }, Modifiers.Public, MemberFlags.Intrinsic)
@@ -1830,9 +1857,9 @@ namespace IKVM.Internal
private sealed class ByRefMethodWrapper : SmartMethodWrapper
{
#if !STATIC_COMPILER
- private bool[] byrefs;
+ private readonly bool[] byrefs;
#endif
- private Type[] args;
+ private readonly Type[] args;
internal ByRefMethodWrapper(Type[] args, bool[] byrefs, TypeWrapper declaringType, string name, string sig, MethodBase method, TypeWrapper returnType, TypeWrapper[] parameterTypes, Modifiers modifiers, bool hideFromReflection)
: base(declaringType, name, sig, method, returnType, parameterTypes, modifiers, hideFromReflection ? MemberFlags.HideFromReflection : MemberFlags.None)
@@ -1907,7 +1934,7 @@ namespace IKVM.Internal
internal sealed class EnumValueFieldWrapper : FieldWrapper
{
- private Type underlyingType;
+ private readonly Type underlyingType;
internal EnumValueFieldWrapper(DotNetTypeWrapper tw, TypeWrapper fieldType)
: base(tw, fieldType, "Value", fieldType.SigName, new ExModifiers(Modifiers.Public | Modifiers.Final, false), null)
@@ -1984,7 +2011,7 @@ namespace IKVM.Internal
internal override void EmitCall(CodeEmitter ilgen)
{
ilgen.Emit(OpCodes.Dup);
- ilgen.Emit(OpCodes.Isinst, ClassLoaderWrapper.LoadClassCritical("java.lang.Cloneable").TypeAsBaseType);
+ ilgen.Emit(OpCodes.Isinst, CoreClasses.java.lang.Cloneable.Wrapper.TypeAsBaseType);
CodeEmitterLabel label1 = ilgen.DefineLabel();
ilgen.EmitBrtrue(label1);
CodeEmitterLabel label2 = ilgen.DefineLabel();
@@ -2147,7 +2174,7 @@ namespace IKVM.Internal
}
else if (methods[i].IsAbstract)
{
- this.HasUnsupportedAbstractMethods = true;
+ SetHasUnsupportedAbstractMethods();
}
}
}
@@ -2278,7 +2305,7 @@ namespace IKVM.Internal
private sealed class BaseFinalMethodWrapper : MethodWrapper
{
- private MethodWrapper m;
+ private readonly MethodWrapper m;
internal BaseFinalMethodWrapper(DotNetTypeWrapper tw, MethodWrapper m)
: base(tw, m.Name, m.Signature, null, null, null, (m.Modifiers & ~Modifiers.Abstract) | Modifiers.Final, MemberFlags.None)
@@ -2481,39 +2508,40 @@ namespace IKVM.Internal
{
get
{
- lock (this)
+ if (innerClasses == null)
{
- if (innerClasses == null)
- {
- Type[] nestedTypes = type.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic);
- List<TypeWrapper> list = new List<TypeWrapper>(nestedTypes.Length);
- for (int i = 0; i < nestedTypes.Length; i++)
- {
- if (!nestedTypes[i].IsGenericTypeDefinition)
- {
- list.Add(ClassLoaderWrapper.GetWrapperFromType(nestedTypes[i]));
- }
- }
- if (IsDelegate(type))
- {
- ClassLoaderWrapper classLoader = GetClassLoader();
- list.Add(classLoader.RegisterInitiatingLoader(new DelegateInnerClassTypeWrapper(Name + DelegateInterfaceSuffix, type, classLoader)));
- }
- if (IsAttribute(type))
- {
- list.Add(GetClassLoader().RegisterInitiatingLoader(new AttributeAnnotationTypeWrapper(Name + AttributeAnnotationSuffix, type)));
- }
- if (type.IsEnum && type.IsVisible)
- {
- list.Add(GetClassLoader().RegisterInitiatingLoader(new EnumEnumTypeWrapper(Name + EnumEnumSuffix, type)));
- }
- innerClasses = list.ToArray();
- }
+ innerClasses = GetInnerClasses();
}
return innerClasses;
}
}
+ private TypeWrapper[] GetInnerClasses()
+ {
+ Type[] nestedTypes = type.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic);
+ List<TypeWrapper> list = new List<TypeWrapper>(nestedTypes.Length);
+ for (int i = 0; i < nestedTypes.Length; i++)
+ {
+ if (!nestedTypes[i].IsGenericTypeDefinition)
+ {
+ list.Add(ClassLoaderWrapper.GetWrapperFromType(nestedTypes[i]));
+ }
+ }
+ if (IsDelegate(type))
+ {
+ list.Add(GetClassLoader().RegisterInitiatingLoader(new DelegateInnerClassTypeWrapper(Name + DelegateInterfaceSuffix, type)));
+ }
+ if (IsAttribute(type))
+ {
+ list.Add(GetClassLoader().RegisterInitiatingLoader(new AttributeAnnotationTypeWrapper(Name + AttributeAnnotationSuffix, type)));
+ }
+ if (type.IsEnum && type.IsVisible)
+ {
+ list.Add(GetClassLoader().RegisterInitiatingLoader(new EnumEnumTypeWrapper(Name + EnumEnumSuffix, type)));
+ }
+ return list.ToArray();
+ }
+
internal override bool IsFakeTypeContainer
{
get
@@ -2641,7 +2669,7 @@ namespace IKVM.Internal
}
#if !STUB_GENERATOR
- internal override void EmitInstanceOf(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitInstanceOf(CodeEmitter ilgen)
{
if (IsRemapped)
{
@@ -2656,7 +2684,7 @@ namespace IKVM.Internal
ilgen.Emit_instanceof(type);
}
- internal override void EmitCheckcast(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitCheckcast(CodeEmitter ilgen)
{
if (IsRemapped)
{
@@ -2745,5 +2773,28 @@ namespace IKVM.Internal
{
get { return type != Types.Void && !type.IsPrimitive && !IsRemapped; }
}
+
+#if !STATIC_COMPILER && !STUB_GENERATOR
+ // this override is only relevant for the runtime, because it handles the scenario
+ // where classes are dynamically loaded by the assembly class loader
+ // (i.e. injected into the assembly)
+ internal override bool IsPackageAccessibleFrom(TypeWrapper wrapper)
+ {
+ if (!base.IsPackageAccessibleFrom(wrapper))
+ {
+ return false;
+ }
+ // check accessibility for nested types
+ for (Type type = this.TypeAsTBD; type.IsNested; type = type.DeclaringType)
+ {
+ // we don't support family (protected) access
+ if (!type.IsNestedAssembly && !type.IsNestedFamORAssem && !type.IsNestedPublic)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+#endif
}
}
diff --git a/external/ikvm/runtime/DynamicClassLoader.cs b/external/ikvm/runtime/DynamicClassLoader.cs
index b1c5285..5930805 100644
--- a/external/ikvm/runtime/DynamicClassLoader.cs
+++ b/external/ikvm/runtime/DynamicClassLoader.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2011 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -24,35 +24,46 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.Serialization;
+using System.Security.Cryptography;
#if STATIC_COMPILER
using IKVM.Reflection;
using IKVM.Reflection.Emit;
using Type = IKVM.Reflection.Type;
+using ProtectionDomain = System.Object;
#else
using System.Reflection;
using System.Reflection.Emit;
+using ProtectionDomain = java.security.ProtectionDomain;
#endif
namespace IKVM.Internal
{
sealed class DynamicClassLoader : TypeWrapperFactory
{
+ // this PublicKey must be the same as the byte array in ForgedKeyPair
+ internal const string DynamicAssemblySuffixAndPublicKey = "-ikvm-runtime-injected, PublicKey=00240000048000009400000006020000002400005253413100040000010001009D674F3D63B8D7A4C428BD7388341B025C71AA61C6224CD53A12C21330A3159D300051FE2EED154FE30D70673A079E4529D0FD78113DCA771DA8B0C1EF2F77B73651D55645B0A4294F0AF9BF7078432E13D0F46F951D712C2FCF02EB15552C0FE7817FC0AED58E0984F86661BF64D882F29B619899DD264041E7D4992548EB9E";
#if !STATIC_COMPILER
- private static List<AssemblyBuilder> saveDebugAssemblies;
+ private static AssemblyBuilder jniProxyAssemblyBuilder;
private static List<DynamicClassLoader> saveClassLoaders;
+ private static int dumpCounter;
#endif // !STATIC_COMPILER
+#if STATIC_COMPILER || CLASSGC
private readonly Dictionary<string, TypeWrapper> dynamicTypes = new Dictionary<string, TypeWrapper>();
- private ModuleBuilder moduleBuilder;
+#else
+ private static readonly Dictionary<string, TypeWrapper> dynamicTypes = new Dictionary<string, TypeWrapper>();
+#endif
+ private readonly ModuleBuilder moduleBuilder;
+ private readonly bool hasInternalAccess;
#if STATIC_COMPILER
- private TypeBuilder proxyHelperContainer;
- private List<TypeBuilder> proxyHelpers;
private TypeBuilder proxiesContainer;
private List<TypeBuilder> proxies;
#endif // STATIC_COMPILER
private Dictionary<string, TypeBuilder> unloadables;
private TypeBuilder unloadableContainer;
#if !STATIC_COMPILER && !CLASSGC
- private static DynamicClassLoader instance = new DynamicClassLoader(CreateModuleBuilder());
+ private static DynamicClassLoader instance = new DynamicClassLoader(CreateModuleBuilder(), false);
#endif
#if CLASSGC
private List<string> friends = new List<string>();
@@ -62,25 +73,41 @@ namespace IKVM.Internal
static DynamicClassLoader()
{
#if !STATIC_COMPILER
- if(JVM.IsSaveDebugImage)
- {
-#if !CLASSGC
- saveClassLoaders.Add(instance);
-#endif
- }
// TODO AppDomain.TypeResolve requires ControlAppDomain permission, but if we don't have that,
// we should handle that by disabling dynamic class loading
AppDomain.CurrentDomain.TypeResolve += new ResolveEventHandler(OnTypeResolve);
+#if !CLASSGC
+ // Ref.Emit doesn't like the "<Module>" name for types
+ // (since it already defines a pseudo-type named <Module> for global methods and fields)
+ dynamicTypes.Add("<Module>", null);
+#endif // !CLASSGC
#endif // !STATIC_COMPILER
}
- internal DynamicClassLoader(ModuleBuilder moduleBuilder)
+ internal DynamicClassLoader(ModuleBuilder moduleBuilder, bool hasInternalAccess)
{
this.moduleBuilder = moduleBuilder;
+ this.hasInternalAccess = hasInternalAccess;
+#if !STATIC_COMPILER
+ if (JVM.IsSaveDebugImage)
+ {
+ if (saveClassLoaders == null)
+ {
+ System.Threading.Interlocked.CompareExchange(ref saveClassLoaders, new List<DynamicClassLoader>(), null);
+ }
+ lock (saveClassLoaders)
+ {
+ saveClassLoaders.Add(this);
+ }
+ }
+#endif
+
+#if STATIC_COMPILER || CLASSGC
// Ref.Emit doesn't like the "<Module>" name for types
// (since it already defines a pseudo-type named <Module> for global methods and fields)
dynamicTypes.Add("<Module>", null);
+#endif
}
#if CLASSGC
@@ -92,7 +119,7 @@ namespace IKVM.Internal
if (!friends.Contains(name))
{
friends.Add(name);
- ((AssemblyBuilder)moduleBuilder.Assembly).SetCustomAttribute(new CustomAttributeBuilder(typeof(System.Runtime.CompilerServices.InternalsVisibleToAttribute).GetConstructor(new Type[] { typeof(string) }), new object[] { name }));
+ AttributeHelper.SetInternalsVisibleToAttribute((AssemblyBuilder)moduleBuilder.Assembly, name);
}
}
}
@@ -101,18 +128,27 @@ namespace IKVM.Internal
#if !STATIC_COMPILER
private static Assembly OnTypeResolve(object sender, ResolveEventArgs args)
{
- TypeWrapper type;
#if CLASSGC
- DynamicClassLoader instance;
ClassLoaderWrapper loader = ClassLoaderWrapper.GetClassLoaderForDynamicJavaAssembly(args.RequestingAssembly);
- if(loader == null)
+ if (loader == null)
{
return null;
}
- instance = (DynamicClassLoader)loader.GetTypeWrapperFactory();
+ DynamicClassLoader instance = (DynamicClassLoader)loader.GetTypeWrapperFactory();
+ return Resolve(instance.dynamicTypes, args.Name);
+#else
+ return Resolve(dynamicTypes, args.Name);
#endif
- instance.dynamicTypes.TryGetValue(args.Name, out type);
- if(type == null)
+ }
+
+ private static Assembly Resolve(Dictionary<string, TypeWrapper> dict, string name)
+ {
+ TypeWrapper type;
+ lock (dict)
+ {
+ dict.TryGetValue(name, out type);
+ }
+ if (type == null)
{
return null;
}
@@ -171,7 +207,7 @@ namespace IKVM.Internal
if (dict.ContainsKey(mangledTypeName) || mangledTypeName.EndsWith("."))
{
#if STATIC_COMPILER
- Tracer.Warning(Tracer.Compiler, "Class name clash: {0}", mangledTypeName);
+ Tracer.Warning(Tracer.Compiler, "Class name clash: {0}", mangledTypeName);
#endif
// Java class names cannot contain slashes (since they are converted into periods),
// so we take advantage of that fact to create a unique name.
@@ -186,7 +222,7 @@ namespace IKVM.Internal
return mangledTypeName;
}
- internal sealed override TypeWrapper DefineClassImpl(Dictionary<string, TypeWrapper> types, ClassFile f, ClassLoaderWrapper classLoader, object protectionDomain)
+ internal sealed override TypeWrapper DefineClassImpl(Dictionary<string, TypeWrapper> types, ClassFile f, ClassLoaderWrapper classLoader, ProtectionDomain protectionDomain)
{
#if STATIC_COMPILER
AotTypeWrapper type = new AotTypeWrapper(f, (CompilerClassLoader)classLoader);
@@ -195,7 +231,7 @@ namespace IKVM.Internal
return type;
#else
// this step can throw a retargettable exception, if the class is incorrect
- DynamicTypeWrapper type = new DynamicTypeWrapper(f, classLoader);
+ DynamicTypeWrapper type = new DynamicTypeWrapper(f, classLoader, protectionDomain);
// This step actually creates the TypeBuilder. It is not allowed to throw any exceptions,
// if an exception does occur, it is due to a programming error in the IKVM or CLR runtime
// and will cause a CriticalFailure and exit the process.
@@ -219,7 +255,7 @@ namespace IKVM.Internal
#else
clazz.typeWrapper = type;
#endif
- clazz.pd = (java.security.ProtectionDomain)protectionDomain;
+ clazz.pd = protectionDomain;
type.SetClassObject(clazz);
#endif
}
@@ -233,18 +269,6 @@ namespace IKVM.Internal
}
#if STATIC_COMPILER
- internal void DefineProxyHelper(Type type)
- {
- if(proxyHelperContainer == null)
- {
- proxyHelperContainer = moduleBuilder.DefineType("__<Proxy>", TypeAttributes.Public | TypeAttributes.Interface | TypeAttributes.Abstract);
- AttributeHelper.HideFromJava(proxyHelperContainer);
- AttributeHelper.SetEditorBrowsableNever(proxyHelperContainer);
- proxyHelpers = new List<TypeBuilder>();
- }
- proxyHelpers.Add(proxyHelperContainer.DefineNestedType(TypeNameUtil.MangleNestedTypeName(type.FullName), TypeAttributes.NestedPublic | TypeAttributes.Interface | TypeAttributes.Abstract, null, new Type[] { type }));
- }
-
internal TypeBuilder DefineProxy(TypeWrapper proxyClass, TypeWrapper[] interfaces)
{
if (proxiesContainer == null)
@@ -280,11 +304,6 @@ namespace IKVM.Internal
return "__<Proxies>+" + GetProxyNestedName(interfaces);
}
- internal static string GetProxyHelperName(Type type)
- {
- return "__<Proxy>+" + TypeNameUtil.MangleNestedTypeName(type.FullName);
- }
-
internal override Type DefineUnloadable(string name)
{
lock(this)
@@ -300,7 +319,7 @@ namespace IKVM.Internal
}
if(unloadableContainer == null)
{
- unloadableContainer = moduleBuilder.DefineType("__<Unloadable>", TypeAttributes.Interface | TypeAttributes.Abstract);
+ unloadableContainer = moduleBuilder.DefineType(UnloadableTypeWrapper.ContainerTypeName, TypeAttributes.Interface | TypeAttributes.Abstract);
AttributeHelper.HideFromJava(unloadableContainer);
}
type = unloadableContainer.DefineNestedType(TypeNameUtil.MangleNestedTypeName(name), TypeAttributes.NestedPrivate | TypeAttributes.Interface | TypeAttributes.Abstract);
@@ -309,6 +328,11 @@ namespace IKVM.Internal
}
}
+ internal override bool HasInternalAccess
+ {
+ get { return hasInternalAccess; }
+ }
+
internal void FinishAll()
{
Dictionary<TypeWrapper, TypeWrapper> done = new Dictionary<TypeWrapper, TypeWrapper>();
@@ -337,14 +361,6 @@ namespace IKVM.Internal
}
}
#if STATIC_COMPILER
- if(proxyHelperContainer != null)
- {
- proxyHelperContainer.CreateType();
- foreach(TypeBuilder tb in proxyHelpers)
- {
- tb.CreateType();
- }
- }
if(proxiesContainer != null)
{
proxiesContainer.CreateType();
@@ -359,6 +375,7 @@ namespace IKVM.Internal
#if !STATIC_COMPILER
internal static void SaveDebugImages()
{
+ Console.Error.WriteLine("Saving dynamic assemblies...");
JVM.FinishingForDebugSave = true;
if (saveClassLoaders != null)
{
@@ -366,25 +383,28 @@ namespace IKVM.Internal
{
instance.FinishAll();
AssemblyBuilder ab = (AssemblyBuilder)instance.ModuleBuilder.Assembly;
- ab.Save(ab.GetName().Name + ".dll");
+ SaveDebugAssembly(ab);
}
}
- if (saveDebugAssemblies != null)
+ if (jniProxyAssemblyBuilder != null)
{
- foreach (AssemblyBuilder ab in saveDebugAssemblies)
- {
- ab.Save(ab.GetName().Name + ".dll");
- }
+ SaveDebugAssembly(jniProxyAssemblyBuilder);
}
+ Console.Error.WriteLine("Saving done.");
}
- internal static void RegisterForSaveDebug(AssemblyBuilder ab)
+ private static void SaveDebugAssembly(AssemblyBuilder ab)
{
- if(saveDebugAssemblies == null)
- {
- saveDebugAssemblies = new List<AssemblyBuilder>();
- }
- saveDebugAssemblies.Add(ab);
+ Console.Error.WriteLine("Saving '{0}'", ab.GetName().Name + ".dll");
+ ab.Save(ab.GetName().Name + ".dll");
+ }
+
+ internal static ModuleBuilder CreateJniProxyModuleBuilder()
+ {
+ AssemblyName name = new AssemblyName();
+ name.Name = "jniproxy";
+ jniProxyAssemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(name, AssemblyBuilderAccess.RunAndSave, null, null, null, null, null, true);
+ return jniProxyAssemblyBuilder.DefineDynamicModule("jniproxy.dll", "jniproxy.dll");
}
#endif
@@ -400,35 +420,104 @@ namespace IKVM.Internal
internal static DynamicClassLoader Get(ClassLoaderWrapper loader)
{
#if STATIC_COMPILER
- DynamicClassLoader instance = new DynamicClassLoader(((CompilerClassLoader)loader).CreateModuleBuilder());
-#elif CLASSGC
- DynamicClassLoader instance = new DynamicClassLoader(CreateModuleBuilder());
- if(saveClassLoaders != null)
+ return new DynamicClassLoader(((CompilerClassLoader)loader).CreateModuleBuilder(), false);
+#else
+ AssemblyClassLoader acl = loader as AssemblyClassLoader;
+ if (acl != null && ForgedKeyPair.Instance != null)
{
- saveClassLoaders.Add(instance);
+ string name = acl.MainAssembly.GetName().Name + DynamicAssemblySuffixAndPublicKey;
+ foreach (InternalsVisibleToAttribute attr in acl.MainAssembly.GetCustomAttributes(typeof(InternalsVisibleToAttribute), false))
+ {
+ if (attr.AssemblyName == name)
+ {
+ AssemblyName n = new AssemblyName(name);
+ n.KeyPair = ForgedKeyPair.Instance;
+ return new DynamicClassLoader(CreateModuleBuilder(n), true);
+ }
+ }
}
+#if CLASSGC
+ DynamicClassLoader instance = new DynamicClassLoader(CreateModuleBuilder(), false);
#endif
return instance;
+#endif
}
#if !STATIC_COMPILER
+ sealed class ForgedKeyPair : StrongNameKeyPair
+ {
+ internal static readonly StrongNameKeyPair Instance;
+
+ static ForgedKeyPair()
+ {
+ try
+ {
+ // this public key byte array must be the same as the public key in DynamicAssemblySuffixAndPublicKey
+ Instance = new ForgedKeyPair(new byte[] {
+ 0x00, 0x24, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x94, 0x00, 0x00,
+ 0x00, 0x06, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53,
+ 0x41, 0x31, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x9D,
+ 0x67, 0x4F, 0x3D, 0x63, 0xB8, 0xD7, 0xA4, 0xC4, 0x28, 0xBD, 0x73,
+ 0x88, 0x34, 0x1B, 0x02, 0x5C, 0x71, 0xAA, 0x61, 0xC6, 0x22, 0x4C,
+ 0xD5, 0x3A, 0x12, 0xC2, 0x13, 0x30, 0xA3, 0x15, 0x9D, 0x30, 0x00,
+ 0x51, 0xFE, 0x2E, 0xED, 0x15, 0x4F, 0xE3, 0x0D, 0x70, 0x67, 0x3A,
+ 0x07, 0x9E, 0x45, 0x29, 0xD0, 0xFD, 0x78, 0x11, 0x3D, 0xCA, 0x77,
+ 0x1D, 0xA8, 0xB0, 0xC1, 0xEF, 0x2F, 0x77, 0xB7, 0x36, 0x51, 0xD5,
+ 0x56, 0x45, 0xB0, 0xA4, 0x29, 0x4F, 0x0A, 0xF9, 0xBF, 0x70, 0x78,
+ 0x43, 0x2E, 0x13, 0xD0, 0xF4, 0x6F, 0x95, 0x1D, 0x71, 0x2C, 0x2F,
+ 0xCF, 0x02, 0xEB, 0x15, 0x55, 0x2C, 0x0F, 0xE7, 0x81, 0x7F, 0xC0,
+ 0xAE, 0xD5, 0x8E, 0x09, 0x84, 0xF8, 0x66, 0x61, 0xBF, 0x64, 0xD8,
+ 0x82, 0xF2, 0x9B, 0x61, 0x98, 0x99, 0xDD, 0x26, 0x40, 0x41, 0xE7,
+ 0xD4, 0x99, 0x25, 0x48, 0xEB, 0x9E
+ });
+ }
+ catch
+ {
+ }
+ }
+
+ private ForgedKeyPair(byte[] publicKey)
+ : base(ToInfo(publicKey), new StreamingContext())
+ {
+ }
+
+ private static SerializationInfo ToInfo(byte[] publicKey)
+ {
+ byte[] privateKey = publicKey;
+ if (JVM.IsSaveDebugImage)
+ {
+ CspParameters cspParams = new CspParameters();
+ cspParams.KeyContainerName = null;
+ cspParams.Flags = CspProviderFlags.UseArchivableKey;
+ cspParams.KeyNumber = 2;
+ RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(1024, cspParams);
+ privateKey = rsa.ExportCspBlob(true);
+ }
+ SerializationInfo info = new SerializationInfo(typeof(StrongNameKeyPair), new FormatterConverter());
+ info.AddValue("_keyPairExported", true);
+ info.AddValue("_keyPairArray", privateKey);
+ info.AddValue("_keyPairContainer", null);
+ info.AddValue("_publicKey", publicKey);
+ return info;
+ }
+ }
+
private static ModuleBuilder CreateModuleBuilder()
{
AssemblyName name = new AssemblyName();
if(JVM.IsSaveDebugImage)
{
- if(saveClassLoaders == null)
- {
- System.Threading.Interlocked.CompareExchange(ref saveClassLoaders, new List<DynamicClassLoader>(), null);
- }
- // we ignore the race condition (we could end up with multiple assemblies with the same name),
- // because it is pretty harmless (you'll miss one of the ikvmdump-xx.dll files)
- name.Name = "ikvmdump-" + saveClassLoaders.Count;
+ name.Name = "ikvmdump-" + System.Threading.Interlocked.Increment(ref dumpCounter);
}
else
{
name.Name = "ikvm_dynamic_assembly__" + (uint)Environment.TickCount;
}
+ return CreateModuleBuilder(name);
+ }
+
+ private static ModuleBuilder CreateModuleBuilder(AssemblyName name)
+ {
DateTime now = DateTime.Now;
name.Version = new Version(now.Year, (now.Month * 100) + now.Day, (now.Hour * 100) + now.Minute, (now.Second * 1000) + now.Millisecond);
List<CustomAttributeBuilder> attribs = new List<CustomAttributeBuilder>();
diff --git a/external/ikvm/runtime/DynamicTypeWrapper.cs b/external/ikvm/runtime/DynamicTypeWrapper.cs
index 63e5fd9..954f277 100644
--- a/external/ikvm/runtime/DynamicTypeWrapper.cs
+++ b/external/ikvm/runtime/DynamicTypeWrapper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -28,10 +28,12 @@ using IKVM.Reflection;
using IKVM.Reflection.Emit;
using Type = IKVM.Reflection.Type;
using DynamicOrAotTypeWrapper = IKVM.Internal.AotTypeWrapper;
+using ProtectionDomain = System.Object;
#else
using System.Reflection;
using System.Reflection.Emit;
using DynamicOrAotTypeWrapper = IKVM.Internal.DynamicTypeWrapper;
+using ProtectionDomain = java.security.ProtectionDomain;
#endif
using System.Diagnostics;
using System.Security;
@@ -53,48 +55,69 @@ namespace IKVM.Internal
#endif
private volatile DynamicImpl impl;
private readonly TypeWrapper baseTypeWrapper;
- private TypeWrapper[] interfaces;
+ private readonly TypeWrapper[] interfaces;
private readonly string sourceFileName;
#if !STATIC_COMPILER
private byte[][] lineNumberTables;
#endif
private MethodBase automagicSerializationCtor;
- private static TypeWrapper LoadTypeWrapper(ClassLoaderWrapper classLoader, string name)
+ private TypeWrapper LoadTypeWrapper(ClassLoaderWrapper classLoader, ProtectionDomain pd, string name)
{
TypeWrapper tw = classLoader.LoadClassByDottedNameFast(name);
if (tw == null)
{
throw new NoClassDefFoundError(name);
}
+ CheckMissing(this, tw);
+ classLoader.CheckPackageAccess(tw, pd);
return tw;
}
+ private static void CheckMissing(TypeWrapper prev, TypeWrapper tw)
+ {
+#if STATIC_COMPILER
+ do
+ {
+ UnloadableTypeWrapper missing = tw as UnloadableTypeWrapper;
+ if (missing != null)
+ {
+ Type mt = ReflectUtil.GetMissingType(missing.MissingType);
+ if (mt.Assembly.__IsMissing)
+ {
+ throw new FatalCompilerErrorException(Message.MissingBaseTypeReference, mt.FullName, mt.Assembly.FullName);
+ }
+ throw new FatalCompilerErrorException(Message.MissingBaseType, mt.FullName, mt.Assembly.FullName,
+ prev.TypeAsBaseType.FullName, prev.TypeAsBaseType.Module.Name);
+ }
+ foreach (TypeWrapper iface in tw.Interfaces)
+ {
+ CheckMissing(tw, iface);
+ }
+ prev = tw;
+ tw = tw.BaseTypeWrapper;
+ }
+ while (tw != null);
+#endif
+ }
+
#if STATIC_COMPILER
- internal DynamicTypeWrapper(ClassFile f, CompilerClassLoader classLoader)
+ internal DynamicTypeWrapper(ClassFile f, CompilerClassLoader classLoader, ProtectionDomain pd)
#else
- internal DynamicTypeWrapper(ClassFile f, ClassLoaderWrapper classLoader)
+ internal DynamicTypeWrapper(ClassFile f, ClassLoaderWrapper classLoader, ProtectionDomain pd)
#endif
- : base(f.Modifiers, f.Name)
+ : base(f.IsInternal ? TypeFlags.InternalAccess : TypeFlags.None, f.Modifiers, f.Name)
{
Profiler.Count("DynamicTypeWrapper");
this.classLoader = classLoader;
- this.IsInternal = f.IsInternal;
this.sourceFileName = f.SourceFileAttribute;
- this.baseTypeWrapper = f.IsInterface ? null : LoadTypeWrapper(classLoader, f.SuperClass);
+ this.baseTypeWrapper = f.IsInterface ? null : LoadTypeWrapper(classLoader, pd, f.SuperClass);
if (BaseTypeWrapper != null)
{
if (!BaseTypeWrapper.IsAccessibleFrom(this))
{
throw new IllegalAccessError("Class " + f.Name + " cannot access its superclass " + BaseTypeWrapper.Name);
}
-#if !STATIC_COMPILER
- if (!BaseTypeWrapper.IsPublic && !ReflectUtil.IsFromAssembly(BaseTypeWrapper.TypeAsBaseType, classLoader.GetTypeWrapperFactory().ModuleBuilder.Assembly))
- {
- // NOTE this can only happen if evil code calls ClassLoader.defineClass() on an assembly class loader (which we allow for compatibility with other slightly less evil code)
- throw new IllegalAccessError("Class " + f.Name + " cannot access its non-public superclass " + BaseTypeWrapper.Name + " from another assembly");
- }
-#endif
if (BaseTypeWrapper.IsFinal)
{
throw new VerifyError("Class " + f.Name + " extends final class " + BaseTypeWrapper.Name);
@@ -135,28 +158,11 @@ namespace IKVM.Internal
this.interfaces = new TypeWrapper[interfaces.Length];
for (int i = 0; i < interfaces.Length; i++)
{
- TypeWrapper iface = LoadTypeWrapper(classLoader, interfaces[i].Name);
+ TypeWrapper iface = LoadTypeWrapper(classLoader, pd, interfaces[i].Name);
if (!iface.IsAccessibleFrom(this))
{
throw new IllegalAccessError("Class " + f.Name + " cannot access its superinterface " + iface.Name);
}
-#if !STATIC_COMPILER
- if (!iface.IsPublic && !ReflectUtil.IsFromAssembly(iface.TypeAsBaseType, classLoader.GetTypeWrapperFactory().ModuleBuilder.Assembly))
- {
- string proxyName = DynamicClassLoader.GetProxyHelperName(iface.TypeAsTBD);
- Type proxyType = ReflectUtil.GetAssembly(iface.TypeAsBaseType).GetType(proxyName);
- // FXBUG we need to check if the type returned is actually correct, because .NET 2.0 has a bug that
- // causes it to return typeof(IFoo) for GetType("__<Proxy>+IFoo")
- if (proxyType == null || proxyType.FullName != proxyName)
- {
- // NOTE this happens when you call Proxy.newProxyInstance() on a non-public .NET interface
- // (for ikvmc compiled Java types, ikvmc generates public proxy stubs).
- // NOTE we don't currently check interfaces inherited from other interfaces because mainstream .NET languages
- // don't allow public interfaces extending non-public interfaces.
- throw new IllegalAccessError("Class " + f.Name + " cannot access its non-public superinterface " + iface.Name + " from another assembly");
- }
- }
-#endif
if (!iface.IsInterface)
{
throw new IncompatibleClassChangeError("Implementing class");
@@ -406,7 +412,7 @@ namespace IKVM.Internal
{
get
{
- return this.IsSubTypeOf(ClassLoaderWrapper.LoadClassCritical("java.io.Serializable"));
+ return this.IsSubTypeOf(CoreClasses.java.io.Serializable.Wrapper);
}
}
@@ -523,8 +529,11 @@ namespace IKVM.Internal
methods[i] = new TypicalMethodWrapper(wrapper, m.Name, m.Signature, null, null, null, m.Modifiers, flags);
}
}
- wrapper.HasStaticInitializer = hasclinit;
- if (wrapper.IsAbstract && (!wrapper.IsInterface || wrapper.IsPublic))
+ if (hasclinit)
+ {
+ wrapper.SetHasStaticInitializer();
+ }
+ if (!wrapper.IsInterface || wrapper.IsPublic)
{
List<MethodWrapper> methodsArray = new List<MethodWrapper>(methods);
List<MethodWrapper[]> baseMethodsArray = new List<MethodWrapper[]>(baseMethods);
@@ -773,6 +782,27 @@ namespace IKVM.Internal
AttributeHelper.SetNonNestedOuterClass(typeBuilder, outerClassWrapper.Name);
AttributeHelper.SetNonNestedInnerClass(outer, f.Name);
}
+ if (outerClass.outerClass != 0 && outer == null)
+ {
+ AttributeHelper.SetNonNestedOuterClass(typeBuilder, classFile.GetConstantPoolClass(outerClass.outerClass));
+ }
+ if (classFile.InnerClasses != null)
+ {
+ foreach (ClassFile.InnerClass inner in classFile.InnerClasses)
+ {
+ string name = classFile.GetConstantPoolClass(inner.innerClass);
+ bool exists = false;
+ try
+ {
+ exists = wrapper.GetClassLoader().LoadClassByDottedNameFast(name) != null;
+ }
+ catch (RetargetableJavaException) { }
+ if (!exists)
+ {
+ AttributeHelper.SetNonNestedInnerClass(typeBuilder, name);
+ }
+ }
+ }
if (outer == null && mangledTypeName != wrapper.Name)
{
// HACK we abuse the InnerClassAttribute to record to real name
@@ -2115,7 +2145,7 @@ namespace IKVM.Internal
else
{
getValueMethod.EmitCall(ilgen);
- o.methods[i].ReturnType.EmitCheckcast(null, ilgen);
+ o.methods[i].ReturnType.EmitCheckcast(ilgen);
}
ilgen.Emit(OpCodes.Ret);
ilgen.DoEmit();
@@ -2323,7 +2353,7 @@ namespace IKVM.Internal
{
// skip
}
- else if (baseMethod.IsFinal && (baseMethod.IsPublic || baseMethod.IsProtected || baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper)))
+ else if (baseMethod.IsFinal && (baseMethod.IsPublic || baseMethod.IsProtected || IsAccessibleInternal(baseMethod) || baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper)))
{
throw new VerifyError("final method " + baseMethod.Name + baseMethod.Signature + " in " + baseMethod.DeclaringType.Name + " is overridden in " + wrapper.Name);
}
@@ -2331,12 +2361,12 @@ namespace IKVM.Internal
{
// skip
}
- else if (topPublicOrProtectedMethod == null && !baseMethod.IsPublic && !baseMethod.IsProtected && !baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper))
+ else if (topPublicOrProtectedMethod == null && !baseMethod.IsPublic && !baseMethod.IsProtected && !IsAccessibleInternal(baseMethod) && !baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper))
{
// this is a package private method that we're not overriding (unless its vtable stream interleaves ours, which is a case we handle below)
explicitOverride = true;
}
- else if (topPublicOrProtectedMethod != null && baseMethod.IsFinal && !baseMethod.IsPublic && !baseMethod.IsProtected && !baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper))
+ else if (topPublicOrProtectedMethod != null && baseMethod.IsFinal && !baseMethod.IsPublic && !baseMethod.IsProtected && !IsAccessibleInternal(baseMethod) && !baseMethod.DeclaringType.IsPackageAccessibleFrom(wrapper))
{
// this is package private final method that we would override had it not been final, but which is ignored by HotSpot (instead of throwing a VerifyError)
explicitOverride = true;
@@ -2449,6 +2479,11 @@ namespace IKVM.Internal
return null;
}
+ private bool IsAccessibleInternal(MethodWrapper mw)
+ {
+ return mw.IsInternal && mw.DeclaringType.InternalsVisibleTo(wrapper);
+ }
+
private static MethodBase LinkAndGetMethod(MethodWrapper mw)
{
mw.Link();
@@ -2720,7 +2755,12 @@ namespace IKVM.Internal
{
// We're a Miranda method
Debug.Assert(baseMethods[index].Length == 1 && baseMethods[index][0].DeclaringType.IsInterface);
- MethodBuilder mb = methods[index].GetDefineMethodHelper().DefineMethod(wrapper, typeBuilder, methods[index].Name, MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.Abstract | MethodAttributes.CheckAccessOnOverride);
+ MethodAttributes attr = MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.CheckAccessOnOverride;
+ if (wrapper.IsAbstract)
+ {
+ attr |= MethodAttributes.Abstract;
+ }
+ MethodBuilder mb = methods[index].GetDefineMethodHelper().DefineMethod(wrapper, typeBuilder, methods[index].Name, attr);
AttributeHelper.HideFromReflection(mb);
if (CheckRequireOverrideStub(methods[index], baseMethods[index][0]))
{
@@ -2731,6 +2771,12 @@ namespace IKVM.Internal
{
typeBuilder.DefineMethodOverride(mb, (MethodInfo)baseMethods[index][0].GetMethod());
}
+ if (!wrapper.IsAbstract)
+ {
+ CodeEmitter ilgen = CodeEmitter.Create(mb);
+ ilgen.EmitThrow("java.lang.AbstractMethodError", wrapper.Name + "." + methods[index].Name + methods[index].Signature);
+ ilgen.DoEmit();
+ }
return mb;
}
else
@@ -3178,8 +3224,8 @@ namespace IKVM.Internal
private sealed class Metadata
{
- private string[][] genericMetaData;
- private object[][] annotations;
+ private readonly string[][] genericMetaData;
+ private readonly object[][] annotations;
private Metadata(string[][] genericMetaData, object[][] annotations)
{
@@ -3389,13 +3435,13 @@ namespace IKVM.Internal
private sealed class FinishedTypeImpl : DynamicImpl
{
- private Type type;
- private TypeWrapper[] innerclasses;
- private TypeWrapper declaringTypeWrapper;
- private Modifiers reflectiveModifiers;
- private MethodInfo clinitMethod;
- private MethodInfo finalizeMethod;
- private Metadata metadata;
+ private readonly Type type;
+ private readonly TypeWrapper[] innerclasses;
+ private readonly TypeWrapper declaringTypeWrapper;
+ private readonly Modifiers reflectiveModifiers;
+ private readonly MethodInfo clinitMethod;
+ private readonly MethodInfo finalizeMethod;
+ private readonly Metadata metadata;
internal FinishedTypeImpl(Type type, TypeWrapper[] innerclasses, TypeWrapper declaringTypeWrapper, Modifiers reflectiveModifiers, Metadata metadata, MethodInfo clinitMethod, MethodInfo finalizeMethod)
{
@@ -3529,6 +3575,7 @@ namespace IKVM.Internal
private MethodInfo callerIDMethod;
private List<Item> items;
private Dictionary<FieldWrapper, MethodBuilder> arfuMap;
+ private Dictionary<MethodKey, MethodInfo> invokespecialstubcache;
private struct Item
{
@@ -3685,7 +3732,6 @@ namespace IKVM.Internal
parent = parent.BaseTypeWrapper;
}
}
- Dictionary<MethodKey, MethodInfo> invokespecialstubcache = new Dictionary<MethodKey, MethodInfo>();
bool basehasclinit = wrapper.BaseTypeWrapper != null && wrapper.BaseTypeWrapper.HasStaticInitializer;
int clinitIndex = -1;
bool hasConstructor = false;
@@ -3712,7 +3758,7 @@ namespace IKVM.Internal
{
hasConstructor = true;
CodeEmitter ilGenerator = CodeEmitter.Create(mb);
- CompileConstructorBody(this, ilGenerator, i, invokespecialstubcache);
+ CompileConstructorBody(this, ilGenerator, i);
}
else
{
@@ -3870,7 +3916,7 @@ namespace IKVM.Internal
}
#endif // STATIC_COMPILER
bool nonleaf = false;
- Compiler.Compile(this, wrapper, methods[i], classFile, m, ilGenerator, ref nonleaf, invokespecialstubcache);
+ Compiler.Compile(this, wrapper, methods[i], classFile, m, ilGenerator, ref nonleaf);
ilGenerator.CheckLabels();
ilGenerator.DoEmit();
if (nonleaf)
@@ -3915,7 +3961,7 @@ namespace IKVM.Internal
}
if (clinitIndex != -1)
{
- CompileConstructorBody(this, ilGenerator, clinitIndex, invokespecialstubcache);
+ CompileConstructorBody(this, ilGenerator, clinitIndex);
}
else
{
@@ -4168,10 +4214,6 @@ namespace IKVM.Internal
{
tbFields.CreateType();
}
- if (classFile.IsInterface && !classFile.IsPublic)
- {
- ((DynamicClassLoader)wrapper.classLoader.GetTypeWrapperFactory()).DefineProxyHelper(type);
- }
#endif
}
finally
@@ -4564,13 +4606,13 @@ namespace IKVM.Internal
// it makes sense, so I hope the spec is wrong
// UPDATE unfortunately, according to Serge Lidin the spec is correct, and it is not allowed to have virtual privatescope
// methods. Sigh! So I have to use private methods and mangle the name
- MethodBuilder mb = DefineInterfaceStubMethod(mangledName, ifmethod);
+ MethodBuilder mb = DefineInterfaceStubMethod(NamePrefix.Incomplete + mangledName, ifmethod);
AttributeHelper.HideFromJava(mb);
CodeEmitter ilgen = CodeEmitter.Create(mb);
ilgen.EmitThrow("java.lang.IllegalAccessError", wrapper.Name + "." + ifmethod.Name + ifmethod.Signature);
ilgen.DoEmit();
typeBuilder.DefineMethodOverride(mb, (MethodInfo)ifmethod.GetMethod());
- wrapper.HasIncompleteInterfaceImplementation = true;
+ wrapper.SetHasIncompleteInterfaceImplementation();
}
else if (mce.GetMethod() == null || mce.RealName != ifmethod.RealName || mce.IsInternal)
{
@@ -4622,13 +4664,13 @@ namespace IKVM.Internal
{
// the type doesn't implement the interface method and isn't abstract either. The JVM allows this, but the CLR doesn't,
// so we have to create a stub method that throws an AbstractMethodError
- MethodBuilder mb = DefineInterfaceStubMethod(mangledName, ifmethod);
+ MethodBuilder mb = DefineInterfaceStubMethod(NamePrefix.Incomplete + mangledName, ifmethod);
AttributeHelper.HideFromJava(mb);
CodeEmitter ilgen = CodeEmitter.Create(mb);
ilgen.EmitThrow("java.lang.AbstractMethodError", wrapper.Name + "." + ifmethod.Name + ifmethod.Signature);
ilgen.DoEmit();
typeBuilder.DefineMethodOverride(mb, (MethodInfo)ifmethod.GetMethod());
- wrapper.HasIncompleteInterfaceImplementation = true;
+ wrapper.SetHasIncompleteInterfaceImplementation();
}
}
}
@@ -4747,23 +4789,19 @@ namespace IKVM.Internal
#if !STATIC_COMPILER
internal static class JniProxyBuilder
{
- private static ModuleBuilder mod;
+ private readonly static ModuleBuilder mod;
private static int count;
static JniProxyBuilder()
{
- AssemblyName name = new AssemblyName();
- name.Name = "jniproxy";
- AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(name, JVM.IsSaveDebugImage ? AssemblyBuilderAccess.RunAndSave : AssemblyBuilderAccess.Run);
- DynamicClassLoader.RegisterForSaveDebug(ab);
- mod = ab.DefineDynamicModule("jniproxy.dll", "jniproxy.dll");
+ mod = DynamicClassLoader.CreateJniProxyModuleBuilder();
CustomAttributeBuilder cab = new CustomAttributeBuilder(JVM.LoadType(typeof(JavaModuleAttribute)).GetConstructor(Type.EmptyTypes), new object[0]);
mod.SetCustomAttribute(cab);
}
internal static void Generate(DynamicTypeWrapper.FinishContext context, CodeEmitter ilGenerator, DynamicTypeWrapper wrapper, MethodWrapper mw, TypeBuilder typeBuilder, ClassFile classFile, ClassFile.Method m, TypeWrapper[] args)
{
- TypeBuilder tb = mod.DefineType("__<jni>" + (count++), TypeAttributes.Public | TypeAttributes.Class);
+ TypeBuilder tb = mod.DefineType("__<jni>" + System.Threading.Interlocked.Increment(ref count), TypeAttributes.Public | TypeAttributes.Class);
int instance = m.IsStatic ? 0 : 1;
Type[] argTypes = new Type[args.Length + instance + 1];
if (instance != 0)
@@ -4776,7 +4814,7 @@ namespace IKVM.Internal
// are public and so we can get away with replacing all other types with object.
argTypes[i + instance] = (args[i].IsPrimitive || args[i].IsGhost || args[i].IsNonPrimitiveValueType) ? args[i].TypeAsSignatureType : typeof(object);
}
- argTypes[argTypes.Length - 1] = ClassLoaderWrapper.LoadClassCritical("ikvm.internal.CallerID").TypeAsSignatureType;
+ argTypes[argTypes.Length - 1] = CoreClasses.ikvm. at internal.CallerID.Wrapper.TypeAsSignatureType;
Type retType = (mw.ReturnType.IsPrimitive || mw.ReturnType.IsGhost || mw.ReturnType.IsNonPrimitiveValueType) ? mw.ReturnType.TypeAsSignatureType : typeof(object);
MethodBuilder mb = tb.DefineMethod("method", MethodAttributes.Public | MethodAttributes.Static, retType, argTypes);
AttributeHelper.HideFromJava(mb);
@@ -5096,12 +5134,7 @@ namespace IKVM.Internal
{
interfaceList.Add(iface);
// NOTE we're using TypeAsBaseType for the interfaces!
- Type ifaceType = iface.TypeAsBaseType;
- if (!iface.IsPublic && !ReflectUtil.IsSameAssembly(ifaceType, typeBuilder))
- {
- ifaceType = ReflectUtil.GetAssembly(ifaceType).GetType(DynamicClassLoader.GetProxyHelperName(ifaceType));
- }
- typeBuilder.AddInterfaceImplementation(ifaceType);
+ typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType);
#if STATIC_COMPILER
if (!wrapper.IsInterface)
{
@@ -5225,7 +5258,7 @@ namespace IKVM.Internal
}
}
- private void CompileConstructorBody(FinishContext context, CodeEmitter ilGenerator, int methodIndex, Dictionary<MethodKey, MethodInfo> invokespecialstubcache)
+ private void CompileConstructorBody(FinishContext context, CodeEmitter ilGenerator, int methodIndex)
{
MethodWrapper[] methods = wrapper.GetMethods();
ClassFile.Method m = classFile.Methods[methodIndex];
@@ -5239,7 +5272,7 @@ namespace IKVM.Internal
}
#endif
bool nonLeaf = false;
- Compiler.Compile(context, wrapper, methods[methodIndex], classFile, m, ilGenerator, ref nonLeaf, invokespecialstubcache);
+ Compiler.Compile(context, wrapper, methods[methodIndex], classFile, m, ilGenerator, ref nonLeaf);
ilGenerator.DoEmit();
#if STATIC_COMPILER
ilGenerator.EmitLineNumberTable((MethodBuilder)methods[methodIndex].GetMethod());
@@ -5274,25 +5307,19 @@ namespace IKVM.Internal
private void EmitCallerIDInitialization(CodeEmitter ilGenerator, FieldInfo callerIDField)
{
+ TypeWrapper tw = CoreClasses.ikvm. at internal.CallerID.Wrapper;
+ if (tw.InternalsVisibleTo(wrapper))
{
- // we need to prohibit this optimization at runtime, because proxy classes may be injected into the boot class loader,
- // but they don't actually have access to core library internals
-#if STATIC_COMPILER
- TypeWrapper tw = CoreClasses.ikvm. at internal.CallerID.Wrapper;
- if (tw.GetClassLoader() == wrapper.GetClassLoader())
- {
- MethodWrapper create = tw.GetMethodWrapper("create", "(Lcli.System.RuntimeTypeHandle;)Likvm.internal.CallerID;", false);
- ilGenerator.Emit(OpCodes.Ldtoken, this.typeBuilder);
- create.Link();
- create.EmitCall(ilGenerator);
- }
- else
-#endif
- {
- RegisterNestedTypeBuilder(EmitCreateCallerID(typeBuilder, ilGenerator));
- }
- ilGenerator.Emit(OpCodes.Stsfld, callerIDField);
+ MethodWrapper create = tw.GetMethodWrapper("create", "(Lcli.System.RuntimeTypeHandle;)Likvm.internal.CallerID;", false);
+ ilGenerator.Emit(OpCodes.Ldtoken, this.typeBuilder);
+ create.Link();
+ create.EmitCall(ilGenerator);
}
+ else
+ {
+ RegisterNestedTypeBuilder(EmitCreateCallerID(typeBuilder, ilGenerator));
+ }
+ ilGenerator.Emit(OpCodes.Stsfld, callerIDField);
}
internal static TypeBuilder EmitCreateCallerID(TypeBuilder typeBuilder, CodeEmitter ilGenerator)
@@ -5437,6 +5464,13 @@ namespace IKVM.Internal
return tb;
}
+ internal TypeBuilder DefineMethodTypeConstantType(int index)
+ {
+ TypeBuilder tb = typeBuilder.DefineNestedType("__<>MTC" + index, TypeAttributes.NestedPrivate | TypeAttributes.Sealed | TypeAttributes.Abstract | TypeAttributes.BeforeFieldInit);
+ RegisterNestedTypeBuilder(tb);
+ return tb;
+ }
+
internal MethodBuilder DefineMethodHandleDispatchStub(Type returnType, Type[] parameterTypes)
{
return typeBuilder.DefineMethod("__<>MHC", MethodAttributes.Static | MethodAttributes.PrivateScope, returnType, parameterTypes);
@@ -5447,15 +5481,47 @@ namespace IKVM.Internal
return typeBuilder.DefineField("__<>invokeCache", fieldType, FieldAttributes.Static | FieldAttributes.PrivateScope);
}
- internal MethodBuilder DefineInvokeSpecialStub(DefineMethodHelper sig)
+ internal FieldBuilder DefineDynamicMethodHandleCacheField()
{
- return sig.DefineMethod(wrapper, typeBuilder, "__<>", MethodAttributes.PrivateScope);
+ return typeBuilder.DefineField("__<>dynamicMethodHandleCache", CoreClasses.java.lang.invoke.MethodHandle.Wrapper.TypeAsSignatureType, FieldAttributes.Static | FieldAttributes.PrivateScope);
+ }
+
+ internal FieldBuilder DefineDynamicMethodTypeCacheField()
+ {
+ return typeBuilder.DefineField("__<>dynamicMethodTypeCache", CoreClasses.java.lang.invoke.MethodType.Wrapper.TypeAsSignatureType, FieldAttributes.Static | FieldAttributes.PrivateScope);
}
internal MethodBuilder DefineDelegateInvokeErrorStub(Type returnType, Type[] parameterTypes)
{
return typeBuilder.DefineMethod("__<>", MethodAttributes.PrivateScope | MethodAttributes.Static, returnType, parameterTypes);
}
+
+ internal MethodInfo GetInvokeSpecialStub(MethodWrapper method)
+ {
+ if (invokespecialstubcache == null)
+ {
+ invokespecialstubcache = new Dictionary<MethodKey, MethodInfo>();
+ }
+ MethodKey key = new MethodKey(method.DeclaringType.Name, method.Name, method.Signature);
+ MethodInfo mi;
+ if (!invokespecialstubcache.TryGetValue(key, out mi))
+ {
+ DefineMethodHelper dmh = method.GetDefineMethodHelper();
+ MethodBuilder stub = dmh.DefineMethod(wrapper, typeBuilder, "__<>", MethodAttributes.PrivateScope);
+ CodeEmitter ilgen = CodeEmitter.Create(stub);
+ ilgen.Emit(OpCodes.Ldarg_0);
+ for (int i = 1; i <= dmh.ParameterCount; i++)
+ {
+ ilgen.EmitLdarg(i);
+ }
+ method.EmitCall(ilgen);
+ ilgen.Emit(OpCodes.Ret);
+ ilgen.DoEmit();
+ invokespecialstubcache[key] = stub;
+ mi = stub;
+ }
+ return mi;
+ }
}
private static bool CheckRequireOverrideStub(MethodWrapper mw1, MethodWrapper mw2)
@@ -5634,7 +5700,7 @@ namespace IKVM.Internal
{
if (parameterNames[i] == null)
{
- parameterNames[i] = (string)names[i];
+ parameterNames[i] = names[i];
}
}
}
@@ -5958,7 +6024,10 @@ namespace IKVM.Internal
Type[] modopt = Type.EmptyTypes;
if (tw.IsUnloadable)
{
- modopt = new Type[] { ((UnloadableTypeWrapper)tw).GetCustomModifier(context) };
+ if (((UnloadableTypeWrapper)tw).MissingType == null)
+ {
+ modopt = new Type[] { ((UnloadableTypeWrapper)tw).GetCustomModifier(context) };
+ }
}
else
{
diff --git a/external/ikvm/runtime/IKVM.Runtime.8.csproj b/external/ikvm/runtime/IKVM.Runtime.8.csproj
index 5709b83..15f4814 100644
--- a/external/ikvm/runtime/IKVM.Runtime.8.csproj
+++ b/external/ikvm/runtime/IKVM.Runtime.8.csproj
@@ -157,6 +157,9 @@
<Compile Include="ReflectUtil.cs" />
<Compile Include="RuntimeHelperTypes.cs" />
<Compile Include="Serialization.cs" />
+ <Compile Include="stubgen\ClassFileWriter.cs" />
+ <Compile Include="stubgen\SerialVersionUID.cs" />
+ <Compile Include="stubgen\StubGenerator.cs" />
<Compile Include="tracer.cs">
<SubType>Code</SubType>
</Compile>
diff --git a/external/ikvm/runtime/JavaException.cs b/external/ikvm/runtime/JavaException.cs
index c093c39..e41fad7 100644
--- a/external/ikvm/runtime/JavaException.cs
+++ b/external/ikvm/runtime/JavaException.cs
@@ -65,9 +65,13 @@ sealed class ClassLoadingException : RetargetableJavaException
{
}
-#if !STATIC_COMPILER && !STUB_GENERATOR
+#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
+ if (!(InnerException is java.lang.Error) && !(InnerException is java.lang.RuntimeException))
+ {
+ return new java.lang.NoClassDefFoundError(InnerException.Message).initCause(InnerException);
+ }
return InnerException;
}
#endif
@@ -122,7 +126,7 @@ sealed class ClassNotFoundException : RetargetableJavaException
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
internal override Exception ToJava()
{
- return new java.lang.ClassNotFoundException(Message);
+ return new java.lang.NoClassDefFoundError(Message);
}
#endif
}
diff --git a/external/ikvm/runtime/LocalVars.cs b/external/ikvm/runtime/LocalVars.cs
index 21f5399..c546f0e 100644
--- a/external/ikvm/runtime/LocalVars.cs
+++ b/external/ikvm/runtime/LocalVars.cs
@@ -464,8 +464,8 @@ struct LocalVarInfo
// Now we recursively analyse the handler and afterwards merge the endfault locations back to us
FindLocalVarState[] handlerState = new FindLocalVarState[instructions.Length];
- handlerState[handler].changed = true;
- handlerState[handler].sites = new FindLocalVarStoreSite[maxLocals];
+ handlerState[handler].Merge(curr);
+ curr = new FindLocalVarState();
FindLocalVariablesImpl(codeInfo, classFile, method, handlerState);
// Merge back to the target of our __goto_finally
@@ -476,7 +476,7 @@ struct LocalVarInfo
&& VerifierTypeWrapper.IsFaultBlockException(codeInfo.GetRawStackTypeWrapper(j, 0))
&& ((VerifierTypeWrapper)codeInfo.GetRawStackTypeWrapper(j, 0)).Index == handler)
{
- state[instructions[i].Arg1].Merge(handlerState[j]);
+ curr.Merge(handlerState[j]);
}
}
}
diff --git a/external/ikvm/runtime/MemberWrapper.cs b/external/ikvm/runtime/MemberWrapper.cs
index 5717bf8..fb58917 100644
--- a/external/ikvm/runtime/MemberWrapper.cs
+++ b/external/ikvm/runtime/MemberWrapper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -58,11 +58,11 @@ namespace IKVM.Internal
abstract class MemberWrapper
{
private HandleWrapper handle;
- private TypeWrapper declaringType;
- private Modifiers modifiers;
+ private readonly TypeWrapper declaringType;
+ private readonly Modifiers modifiers;
private MemberFlags flags;
- private string name;
- private string sig;
+ private readonly string name;
+ private readonly string sig;
private sealed class HandleWrapper
{
@@ -356,7 +356,7 @@ namespace IKVM.Internal
interface ICustomInvoke
{
#if !STATIC_COMPILER && !FIRST_PASS && !STUB_GENERATOR
- object Invoke(object obj, object[] args, ikvm. at internal.CallerID callerID);
+ object Invoke(object obj, object[] args);
#endif
}
@@ -476,7 +476,7 @@ namespace IKVM.Internal
parameterTypes[i] = argTypes[i].EnsureLoadable(loader).ClassObject;
}
java.lang.Class[] checkedExceptions = GetExceptions();
- if (this.Name == StringConstants.INIT)
+ if (this.IsConstructor)
{
method = new java.lang.reflect.Constructor(
this.DeclaringType.ClassObject,
@@ -786,7 +786,7 @@ namespace IKVM.Internal
#if FIRST_PASS
return null;
#else
- if (ReferenceEquals(Name, StringConstants.INIT))
+ if (IsConstructor)
{
java.lang.reflect.Constructor cons = (java.lang.reflect.Constructor)ToMethodOrConstructor(false);
if (obj == null)
@@ -1007,6 +1007,11 @@ namespace IKVM.Internal
{
get { return false; }
}
+
+ internal bool IsConstructor
+ {
+ get { return (object)Name == (object)StringConstants.INIT; }
+ }
}
// placeholder for <clinit> method that exist in ClassFile but not in TypeWrapper
@@ -1090,8 +1095,8 @@ namespace IKVM.Internal
sealed class SimpleCallMethodWrapper : MethodWrapper
{
- private SimpleOpCode call;
- private SimpleOpCode callvirt;
+ private readonly SimpleOpCode call;
+ private readonly SimpleOpCode callvirt;
internal SimpleCallMethodWrapper(TypeWrapper declaringType, string name, string sig, MethodInfo method, TypeWrapper returnType, TypeWrapper[] parameterTypes, Modifiers modifiers, MemberFlags flags, SimpleOpCode call, SimpleOpCode callvirt)
: base(declaringType, name, sig, method, returnType, parameterTypes, modifiers, flags)
@@ -1491,7 +1496,7 @@ namespace IKVM.Internal
#else
if (jniAccessor == null)
{
- jniAccessor = IKVM.NativeCode.sun.reflect.ReflectionFactory.NewFieldAccessorJNI(this);
+ Interlocked.CompareExchange(ref jniAccessor, IKVM.NativeCode.sun.reflect.ReflectionFactory.NewFieldAccessorJNI(this), null);
}
return jniAccessor;
#endif
@@ -1913,8 +1918,8 @@ namespace IKVM.Internal
sealed class CompiledAccessStubFieldWrapper : FieldWrapper
{
- private MethodInfo getter;
- private MethodInfo setter;
+ private readonly MethodInfo getter;
+ private readonly MethodInfo setter;
private static Modifiers GetModifiers(PropertyInfo property)
{
diff --git a/external/ikvm/runtime/ReflectUtil.cs b/external/ikvm/runtime/ReflectUtil.cs
index 41e6493..cfb8c36 100644
--- a/external/ikvm/runtime/ReflectUtil.cs
+++ b/external/ikvm/runtime/ReflectUtil.cs
@@ -209,5 +209,38 @@ namespace IKVM.Internal
&& !type.IsGenericTypeDefinition
&& !type.IsGenericParameter;
}
+
+#if STATIC_COMPILER
+ internal static Type GetMissingType(Type type)
+ {
+ while (type.HasElementType)
+ {
+ type = type.GetElementType();
+ }
+ if (type.__IsMissing)
+ {
+ return type;
+ }
+ else if (type.__ContainsMissingType)
+ {
+ if (type.IsGenericType)
+ {
+ foreach (Type arg in type.GetGenericArguments())
+ {
+ Type t1 = GetMissingType(arg);
+ if (t1.__IsMissing)
+ {
+ return t1;
+ }
+ }
+ }
+ throw new NotImplementedException(type.FullName);
+ }
+ else
+ {
+ return type;
+ }
+ }
+#endif
}
}
diff --git a/external/ikvm/runtime/Serialization.cs b/external/ikvm/runtime/Serialization.cs
index 4fff166..1145d35 100644
--- a/external/ikvm/runtime/Serialization.cs
+++ b/external/ikvm/runtime/Serialization.cs
@@ -43,7 +43,6 @@ namespace IKVM.Internal
private static readonly CustomAttributeBuilder securityCriticalAttribute = new CustomAttributeBuilder(JVM.Import(typeof(SecurityCriticalAttribute)).GetConstructor(Type.EmptyTypes), new object[0]);
private static readonly TypeWrapper iserializable = ClassLoaderWrapper.GetWrapperFromType(JVM.Import(typeof(ISerializable)));
private static readonly TypeWrapper iobjectreference = ClassLoaderWrapper.GetWrapperFromType(JVM.Import(typeof(IObjectReference)));
- private static readonly TypeWrapper serializable = ClassLoaderWrapper.LoadClassCritical("java.io.Serializable");
private static readonly TypeWrapper externalizable = ClassLoaderWrapper.LoadClassCritical("java.io.Externalizable");
private static readonly PermissionSet psetSerializationFormatter;
@@ -85,7 +84,7 @@ namespace IKVM.Internal
{
MarkSerializable(typeBuilder);
}
- else if (wrapper.IsSubTypeOf(serializable) && IsSafeForAutomagicSerialization(wrapper))
+ else if (wrapper.IsSubTypeOf(CoreClasses.java.io.Serializable.Wrapper) && IsSafeForAutomagicSerialization(wrapper))
{
if (wrapper.IsSubTypeOf(externalizable))
{
@@ -95,7 +94,7 @@ namespace IKVM.Internal
MarkSerializable(typeBuilder);
ctor.Link();
serializationCtor = AddConstructor(typeBuilder, ctor, null, true);
- if (!wrapper.BaseTypeWrapper.IsSubTypeOf(serializable))
+ if (!wrapper.BaseTypeWrapper.IsSubTypeOf(CoreClasses.java.io.Serializable.Wrapper))
{
AddGetObjectData(typeBuilder);
}
@@ -105,7 +104,7 @@ namespace IKVM.Internal
}
}
}
- else if (wrapper.BaseTypeWrapper.IsSubTypeOf(serializable))
+ else if (wrapper.BaseTypeWrapper.IsSubTypeOf(CoreClasses.java.io.Serializable.Wrapper))
{
MethodBase baseCtor = wrapper.GetBaseSerializationConstructor();
if (baseCtor != null && (baseCtor.IsFamily || baseCtor.IsFamilyOrAssembly))
diff --git a/external/ikvm/runtime/TypeWrapper.cs b/external/ikvm/runtime/TypeWrapper.cs
index 87f1376..ade02f8 100644
--- a/external/ikvm/runtime/TypeWrapper.cs
+++ b/external/ikvm/runtime/TypeWrapper.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -61,7 +61,6 @@ namespace IKVM.Internal
static class AttributeHelper
{
- private static CustomAttributeBuilder hideFromJavaAttribute;
#if STATIC_COMPILER
private static CustomAttributeBuilder ghostInterfaceAttribute;
private static CustomAttributeBuilder deprecatedAttribute;
@@ -76,29 +75,33 @@ namespace IKVM.Internal
private static CustomAttributeBuilder paramArrayAttribute;
private static ConstructorInfo nonNestedInnerClassAttribute;
private static ConstructorInfo nonNestedOuterClassAttribute;
- private static Type typeofModifiers = JVM.LoadType(typeof(Modifiers));
- private static Type typeofSourceFileAttribute = JVM.LoadType(typeof(SourceFileAttribute));
- private static Type typeofLineNumberTableAttribute = JVM.LoadType(typeof(LineNumberTableAttribute));
+ private static readonly Type typeofModifiers = JVM.LoadType(typeof(Modifiers));
+ private static readonly Type typeofSourceFileAttribute = JVM.LoadType(typeof(SourceFileAttribute));
+ private static readonly Type typeofLineNumberTableAttribute = JVM.LoadType(typeof(LineNumberTableAttribute));
#endif // STATIC_COMPILER
- private static Type typeofRemappedClassAttribute = JVM.LoadType(typeof(RemappedClassAttribute));
- private static Type typeofRemappedTypeAttribute = JVM.LoadType(typeof(RemappedTypeAttribute));
- private static Type typeofModifiersAttribute = JVM.LoadType(typeof(ModifiersAttribute));
- private static Type typeofRemappedInterfaceMethodAttribute = JVM.LoadType(typeof(RemappedInterfaceMethodAttribute));
- private static Type typeofNameSigAttribute = JVM.LoadType(typeof(NameSigAttribute));
- private static Type typeofJavaModuleAttribute = JVM.LoadType(typeof(JavaModuleAttribute));
- private static Type typeofSignatureAttribute = JVM.LoadType(typeof(SignatureAttribute));
- private static Type typeofInnerClassAttribute = JVM.LoadType(typeof(InnerClassAttribute));
- private static Type typeofImplementsAttribute = JVM.LoadType(typeof(ImplementsAttribute));
- private static Type typeofGhostInterfaceAttribute = JVM.LoadType(typeof(GhostInterfaceAttribute));
- private static Type typeofExceptionIsUnsafeForMappingAttribute = JVM.LoadType(typeof(ExceptionIsUnsafeForMappingAttribute));
- private static Type typeofThrowsAttribute = JVM.LoadType(typeof(ThrowsAttribute));
- private static Type typeofHideFromReflectionAttribute = JVM.LoadType(typeof(HideFromReflectionAttribute));
- private static Type typeofHideFromJavaAttribute = JVM.LoadType(typeof(HideFromJavaAttribute));
- private static Type typeofNoPackagePrefixAttribute = JVM.LoadType(typeof(NoPackagePrefixAttribute));
- private static Type typeofAnnotationAttributeAttribute = JVM.LoadType(typeof(AnnotationAttributeAttribute));
- private static Type typeofNonNestedInnerClassAttribute = JVM.LoadType(typeof(NonNestedInnerClassAttribute));
- private static Type typeofNonNestedOuterClassAttribute = JVM.LoadType(typeof(NonNestedOuterClassAttribute));
- private static Type typeofEnclosingMethodAttribute = JVM.LoadType(typeof(EnclosingMethodAttribute));
+ private static readonly Type typeofRemappedClassAttribute = JVM.LoadType(typeof(RemappedClassAttribute));
+ private static readonly Type typeofRemappedTypeAttribute = JVM.LoadType(typeof(RemappedTypeAttribute));
+ private static readonly Type typeofModifiersAttribute = JVM.LoadType(typeof(ModifiersAttribute));
+ private static readonly Type typeofRemappedInterfaceMethodAttribute = JVM.LoadType(typeof(RemappedInterfaceMethodAttribute));
+ private static readonly Type typeofNameSigAttribute = JVM.LoadType(typeof(NameSigAttribute));
+ private static readonly Type typeofJavaModuleAttribute = JVM.LoadType(typeof(JavaModuleAttribute));
+ private static readonly Type typeofSignatureAttribute = JVM.LoadType(typeof(SignatureAttribute));
+ private static readonly Type typeofInnerClassAttribute = JVM.LoadType(typeof(InnerClassAttribute));
+ private static readonly Type typeofImplementsAttribute = JVM.LoadType(typeof(ImplementsAttribute));
+ private static readonly Type typeofGhostInterfaceAttribute = JVM.LoadType(typeof(GhostInterfaceAttribute));
+ private static readonly Type typeofExceptionIsUnsafeForMappingAttribute = JVM.LoadType(typeof(ExceptionIsUnsafeForMappingAttribute));
+ private static readonly Type typeofThrowsAttribute = JVM.LoadType(typeof(ThrowsAttribute));
+ private static readonly Type typeofHideFromReflectionAttribute = JVM.LoadType(typeof(HideFromReflectionAttribute));
+ private static readonly Type typeofHideFromJavaAttribute = JVM.LoadType(typeof(HideFromJavaAttribute));
+ private static readonly Type typeofNoPackagePrefixAttribute = JVM.LoadType(typeof(NoPackagePrefixAttribute));
+ private static readonly Type typeofAnnotationAttributeAttribute = JVM.LoadType(typeof(AnnotationAttributeAttribute));
+ private static readonly Type typeofNonNestedInnerClassAttribute = JVM.LoadType(typeof(NonNestedInnerClassAttribute));
+ private static readonly Type typeofNonNestedOuterClassAttribute = JVM.LoadType(typeof(NonNestedOuterClassAttribute));
+ private static readonly Type typeofEnclosingMethodAttribute = JVM.LoadType(typeof(EnclosingMethodAttribute));
+ private static readonly CustomAttributeBuilder hideFromJavaAttribute = new CustomAttributeBuilder(typeofHideFromJavaAttribute.GetConstructor(Type.EmptyTypes), new object[0]);
+
+ // we don't want beforefieldinit
+ static AttributeHelper() { }
#if STATIC_COMPILER
private static object ParseValue(ClassLoaderWrapper loader, TypeWrapper tw, string val)
@@ -107,6 +110,10 @@ namespace IKVM.Internal
{
return val;
}
+ else if(tw.IsUnloadable)
+ {
+ throw new FatalCompilerErrorException(Message.MapFileTypeNotFound, tw.Name);
+ }
else if(tw.TypeAsTBD.IsEnum)
{
return EnumHelper.Parse(tw.TypeAsTBD, val);
@@ -331,19 +338,20 @@ namespace IKVM.Internal
}
}
- private static Assembly GetSystemAssembly()
- {
- AssemblyName name = Types.Object.Assembly.GetName();
- name.Name = "System";
- return StaticCompiler.Load(name.FullName);
- }
-
private static CustomAttributeBuilder GetEditorBrowsableNever()
{
if (editorBrowsableNever == null)
{
- Assembly system = GetSystemAssembly();
- editorBrowsableNever = new CustomAttributeBuilder(system.GetType("System.ComponentModel.EditorBrowsableAttribute", true).GetConstructor(new Type[] { system.GetType("System.ComponentModel.EditorBrowsableState", true) }), new object[] { (int)System.ComponentModel.EditorBrowsableState.Never });
+ // to avoid having to load (and find) System.dll, we construct a symbolic CustomAttributeBuilder
+ AssemblyName name = Types.Object.Assembly.GetName();
+ name.Name = "System";
+ Universe u = StaticCompiler.Universe;
+ Type typeofEditorBrowsableAttribute = u.ResolveType(Types.Object.Assembly, "System.ComponentModel.EditorBrowsableAttribute, " + name.FullName);
+ Type typeofEditorBrowsableState = u.ResolveType(Types.Object.Assembly, "System.ComponentModel.EditorBrowsableState, " + name.FullName);
+ u.MissingTypeIsValueType += delegate(Type type) { return type == typeofEditorBrowsableState; };
+ ConstructorInfo ctor = (ConstructorInfo)typeofEditorBrowsableAttribute.__CreateMissingMethod(ConstructorInfo.ConstructorName,
+ CallingConventions.Standard | CallingConventions.HasThis, null, default(CustomModifiers), new Type[] { typeofEditorBrowsableState }, null);
+ editorBrowsableNever = CustomAttributeBuilder.__FromBlob(ctor, new byte[] { 01, 00, 01, 00, 00, 00, 00, 00 });
}
return editorBrowsableNever;
}
@@ -470,38 +478,22 @@ namespace IKVM.Internal
internal static void HideFromJava(TypeBuilder typeBuilder)
{
- if(hideFromJavaAttribute == null)
- {
- hideFromJavaAttribute = new CustomAttributeBuilder(typeofHideFromJavaAttribute.GetConstructor(Type.EmptyTypes), new object[0]);
- }
typeBuilder.SetCustomAttribute(hideFromJavaAttribute);
}
internal static void HideFromJava(MethodBuilder mb)
{
- if(hideFromJavaAttribute == null)
- {
- hideFromJavaAttribute = new CustomAttributeBuilder(typeofHideFromJavaAttribute.GetConstructor(Type.EmptyTypes), new object[0]);
- }
mb.SetCustomAttribute(hideFromJavaAttribute);
}
internal static void HideFromJava(FieldBuilder fb)
{
- if(hideFromJavaAttribute == null)
- {
- hideFromJavaAttribute = new CustomAttributeBuilder(typeofHideFromJavaAttribute.GetConstructor(Type.EmptyTypes), new object[0]);
- }
fb.SetCustomAttribute(hideFromJavaAttribute);
}
#if STATIC_COMPILER
internal static void HideFromJava(PropertyBuilder pb)
{
- if(hideFromJavaAttribute == null)
- {
- hideFromJavaAttribute = new CustomAttributeBuilder(typeofHideFromJavaAttribute.GetConstructor(Type.EmptyTypes), new object[0]);
- }
pb.SetCustomAttribute(hideFromJavaAttribute);
}
#endif // STATIC_COMPILER
@@ -1167,6 +1159,14 @@ namespace IKVM.Internal
new PropertyInfo[] { runtimeCompatibilityAttribute.GetProperty("WrapNonExceptionThrows") }, new object[] { true },
new FieldInfo[0], new object[0]));
}
+
+ internal static void SetInternalsVisibleToAttribute(AssemblyBuilder assemblyBuilder, string assemblyName)
+ {
+ Type internalsVisibleToAttribute = JVM.Import(typeof(System.Runtime.CompilerServices.InternalsVisibleToAttribute));
+ CustomAttributeBuilder cab = new CustomAttributeBuilder(
+ internalsVisibleToAttribute.GetConstructor(new Type[] { Types.String }), new object[] { assemblyName });
+ assemblyBuilder.SetCustomAttribute(cab);
+ }
}
static class EnumHelper
@@ -1399,17 +1399,14 @@ namespace IKVM.Internal
TypeWrapper annot = loader.RetTypeWrapperFromSig(annotationClass.Replace('/', '.'));
return annot.Annotation;
}
-#if STATIC_COMPILER
- catch(ClassNotFoundException x)
- {
- loader.IssueMessage(Message.ClassNotFound, x.Message);
- return null;
- }
-#endif
catch (RetargetableJavaException)
{
Tracer.Warning(Tracer.Compiler, "Unable to load annotation class {0}", annotationClass);
+#if STATIC_COMPILER
+ return new CompiledTypeWrapper.CompiledAnnotation(StaticCompiler.GetRuntimeType("IKVM.Attributes.DynamicAnnotationAttribute"));
+#else
return null;
+#endif
}
}
@@ -1658,6 +1655,7 @@ namespace IKVM.Internal
[Flags]
enum TypeFlags : ushort
{
+ None = 0,
HasIncompleteInterfaceImplementation = 1,
InternalAccess = 2,
HasStaticInitializer = 4,
@@ -1672,10 +1670,12 @@ namespace IKVM.Internal
internal const string AccessStub = "<accessstub>";
internal const string NonVirtual = "<nonvirtual>";
internal const string Bridge = "<bridge>";
+ internal const string Incomplete = "<incomplete>";
}
internal abstract class TypeWrapper
{
+ private static readonly object flagsLock = new object();
private readonly string name; // java name (e.g. java.lang.Object)
private readonly Modifiers modifiers;
private TypeFlags flags;
@@ -1688,12 +1688,13 @@ namespace IKVM.Internal
internal const Modifiers UnloadableModifiersHack = Modifiers.Final | Modifiers.Interface | Modifiers.Private;
internal const Modifiers VerifierTypeModifiersHack = Modifiers.Final | Modifiers.Interface;
- internal TypeWrapper(Modifiers modifiers, string name)
+ internal TypeWrapper(TypeFlags flags, Modifiers modifiers, string name)
{
Profiler.Count("TypeWrapper");
// class name should be dotted or null for primitives
Debug.Assert(name == null || name.IndexOf('/') < 0);
+ this.flags = flags;
this.modifiers = modifiers;
this.name = name == null ? null : String.Intern(name);
}
@@ -1957,6 +1958,15 @@ namespace IKVM.Internal
return this;
}
+ private void SetTypeFlag(TypeFlags flag)
+ {
+ // we use a global lock object, since the chance of contention is very small
+ lock (flagsLock)
+ {
+ flags |= flag;
+ }
+ }
+
internal bool HasIncompleteInterfaceImplementation
{
get
@@ -1964,18 +1974,11 @@ namespace IKVM.Internal
TypeWrapper baseWrapper = this.BaseTypeWrapper;
return (flags & TypeFlags.HasIncompleteInterfaceImplementation) != 0 || (baseWrapper != null && baseWrapper.HasIncompleteInterfaceImplementation);
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.HasIncompleteInterfaceImplementation;
- }
- else
- {
- flags &= ~TypeFlags.HasIncompleteInterfaceImplementation;
- }
- }
+ }
+
+ internal void SetHasIncompleteInterfaceImplementation()
+ {
+ SetTypeFlag(TypeFlags.HasIncompleteInterfaceImplementation);
}
internal bool HasUnsupportedAbstractMethods
@@ -1992,18 +1995,11 @@ namespace IKVM.Internal
TypeWrapper baseWrapper = this.BaseTypeWrapper;
return (flags & TypeFlags.HasUnsupportedAbstractMethods) != 0 || (baseWrapper != null && baseWrapper.HasUnsupportedAbstractMethods);
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.HasUnsupportedAbstractMethods;
- }
- else
- {
- flags &= ~TypeFlags.HasUnsupportedAbstractMethods;
- }
- }
+ }
+
+ internal void SetHasUnsupportedAbstractMethods()
+ {
+ SetTypeFlag(TypeFlags.HasUnsupportedAbstractMethods);
}
internal virtual bool HasStaticInitializer
@@ -2012,18 +2008,11 @@ namespace IKVM.Internal
{
return (flags & TypeFlags.HasStaticInitializer) != 0;
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.HasStaticInitializer;
- }
- else
- {
- flags &= ~TypeFlags.HasStaticInitializer;
- }
- }
+ }
+
+ internal void SetHasStaticInitializer()
+ {
+ SetTypeFlag(TypeFlags.HasStaticInitializer);
}
internal bool HasVerifyError
@@ -2032,18 +2021,11 @@ namespace IKVM.Internal
{
return (flags & TypeFlags.VerifyError) != 0;
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.VerifyError;
- }
- else
- {
- flags &= ~TypeFlags.VerifyError;
- }
- }
+ }
+
+ internal void SetHasVerifyError()
+ {
+ SetTypeFlag(TypeFlags.VerifyError);
}
internal bool HasClassFormatError
@@ -2052,18 +2034,11 @@ namespace IKVM.Internal
{
return (flags & TypeFlags.ClassFormatError) != 0;
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.ClassFormatError;
- }
- else
- {
- flags &= ~TypeFlags.ClassFormatError;
- }
- }
+ }
+
+ internal void SetHasClassFormatError()
+ {
+ SetTypeFlag(TypeFlags.ClassFormatError);
}
internal virtual bool IsFakeTypeContainer
@@ -2265,18 +2240,6 @@ namespace IKVM.Internal
{
return (flags & TypeFlags.InternalAccess) != 0;
}
- set
- {
- // TODO do we need locking here?
- if(value)
- {
- flags |= TypeFlags.InternalAccess;
- }
- else
- {
- flags &= ~TypeFlags.InternalAccess;
- }
- }
}
internal bool IsPublic
@@ -2387,6 +2350,12 @@ namespace IKVM.Internal
{
if(methods == null)
{
+#if STATIC_COMPILER
+ if(!CheckMissingBaseTypes(TypeAsBaseType))
+ {
+ return methods = MethodWrapper.EmptyArray;
+ }
+#endif
LazyPublishMethods();
}
}
@@ -2402,6 +2371,12 @@ namespace IKVM.Internal
{
if(fields == null)
{
+#if STATIC_COMPILER
+ if (!CheckMissingBaseTypes(TypeAsBaseType))
+ {
+ return fields = FieldWrapper.EmptyArray;
+ }
+#endif
LazyPublishFields();
}
}
@@ -2409,6 +2384,31 @@ namespace IKVM.Internal
return fields;
}
+#if STATIC_COMPILER
+ private static bool CheckMissingBaseTypes(Type type)
+ {
+ while (type != null)
+ {
+ if (type.__ContainsMissingType)
+ {
+ StaticCompiler.IssueMissingTypeMessage(type);
+ return false;
+ }
+ bool ok = true;
+ foreach (Type iface in type.__GetDeclaredInterfaces())
+ {
+ ok &= CheckMissingBaseTypes(iface);
+ }
+ if (!ok)
+ {
+ return false;
+ }
+ type = type.BaseType;
+ }
+ return true;
+ }
+#endif
+
internal MethodWrapper GetMethodWrapper(string name, string sig, bool inherit)
{
// We need to get the methods before calling String.IsInterned, because getting them might cause the strings to be interned
@@ -2437,12 +2437,14 @@ namespace IKVM.Internal
internal void SetMethods(MethodWrapper[] methods)
{
Debug.Assert(methods != null);
+ System.Threading.Thread.MemoryBarrier();
this.methods = methods;
}
internal void SetFields(FieldWrapper[] fields)
{
Debug.Assert(fields != null);
+ System.Threading.Thread.MemoryBarrier();
this.fields = fields;
}
@@ -2476,7 +2478,7 @@ namespace IKVM.Internal
return GetClassLoader().InternalsVisibleToImpl(this, wrapper);
}
- internal bool IsPackageAccessibleFrom(TypeWrapper wrapper)
+ internal virtual bool IsPackageAccessibleFrom(TypeWrapper wrapper)
{
if (MatchingPackageNames(name, wrapper.name))
{
@@ -2489,7 +2491,15 @@ namespace IKVM.Internal
return ccl.IsEquivalentTo(wrapper.GetClassLoader());
}
#endif
- return GetClassLoader() == wrapper.GetClassLoader();
+ if (GetClassLoader() != wrapper.GetClassLoader())
+ {
+ return false;
+ }
+#if STATIC_COMPILER || STUB_GENERATOR
+ return true;
+#else
+ return InternalsVisibleTo(wrapper);
+#endif
}
else
{
@@ -2544,7 +2554,7 @@ namespace IKVM.Internal
{
if(IsUnloadable)
{
- return Types.Object;
+ return ((UnloadableTypeWrapper)this).MissingType ?? Types.Object;
}
if(IsGhostArray)
{
@@ -2897,7 +2907,7 @@ namespace IKVM.Internal
}
}
- internal virtual void EmitCheckcast(TypeWrapper context, CodeEmitter ilgen)
+ internal virtual void EmitCheckcast(CodeEmitter ilgen)
{
if(IsGhost)
{
@@ -2931,7 +2941,7 @@ namespace IKVM.Internal
}
}
- internal virtual void EmitInstanceOf(TypeWrapper context, CodeEmitter ilgen)
+ internal virtual void EmitInstanceOf(CodeEmitter ilgen)
{
if(IsGhost)
{
@@ -3131,11 +3141,19 @@ namespace IKVM.Internal
sealed class UnloadableTypeWrapper : TypeWrapper
{
+ internal const string ContainerTypeName = "__<Unloadable>";
+ private readonly Type missingType;
private Type customModifier;
internal UnloadableTypeWrapper(string name)
- : base(TypeWrapper.UnloadableModifiersHack, name)
+ : base(TypeFlags.None, TypeWrapper.UnloadableModifiersHack, name)
+ {
+ }
+
+ internal UnloadableTypeWrapper(Type missingType)
+ : this(missingType.FullName) // TODO demangle and re-mangle appropriately
{
+ this.missingType = missingType;
}
internal UnloadableTypeWrapper(string name, Type customModifier)
@@ -3219,6 +3237,11 @@ namespace IKVM.Internal
throw new InvalidOperationException("Finish called on UnloadableTypeWrapper: " + Name);
}
+ internal Type MissingType
+ {
+ get { return missingType; }
+ }
+
internal Type CustomModifier
{
get { return customModifier; }
@@ -3236,18 +3259,14 @@ namespace IKVM.Internal
return customModifier ?? (customModifier = context.DefineUnloadable(this.Name));
}
- internal override void EmitCheckcast(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitCheckcast(CodeEmitter ilgen)
{
- ilgen.Emit(OpCodes.Ldtoken, context.TypeAsTBD);
- ilgen.Emit(OpCodes.Ldstr, Name);
- ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicCast);
+ throw new InvalidOperationException("EmitCheckcast called on UnloadableTypeWrapper: " + Name);
}
- internal override void EmitInstanceOf(TypeWrapper context, CodeEmitter ilgen)
+ internal override void EmitInstanceOf(CodeEmitter ilgen)
{
- ilgen.Emit(OpCodes.Ldtoken, context.TypeAsTBD);
- ilgen.Emit(OpCodes.Ldstr, Name);
- ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicInstanceOf);
+ throw new InvalidOperationException("EmitInstanceOf called on UnloadableTypeWrapper: " + Name);
}
#endif // !STUB_GENERATOR
}
@@ -3268,7 +3287,7 @@ namespace IKVM.Internal
private readonly string sigName;
private PrimitiveTypeWrapper(Type type, string sigName)
- : base(Modifiers.Public | Modifiers.Abstract | Modifiers.Final, null)
+ : base(TypeFlags.None, Modifiers.Public | Modifiers.Abstract | Modifiers.Final, null)
{
this.type = type;
this.sigName = sigName;
@@ -3351,9 +3370,9 @@ namespace IKVM.Internal
{
private readonly Type type;
private TypeWrapper baseTypeWrapper;
- private TypeWrapper[] interfaces;
+ private volatile TypeWrapper[] interfaces;
private MethodInfo clinitMethod;
- private bool clinitMethodSet;
+ private volatile bool clinitMethodSet;
private Modifiers reflectiveModifiers;
internal static CompiledTypeWrapper newInstance(string name, Type type)
@@ -3506,8 +3525,8 @@ namespace IKVM.Internal
private sealed class CompiledGhostTypeWrapper : CompiledTypeWrapper
{
- private FieldInfo ghostRefField;
- private Type typeAsBaseType;
+ private volatile FieldInfo ghostRefField;
+ private volatile Type typeAsBaseType;
internal CompiledGhostTypeWrapper(string name, Type type)
: base(name, type)
@@ -3611,9 +3630,8 @@ namespace IKVM.Internal
}
private CompiledTypeWrapper(ExModifiers exmod, string name)
- : base(exmod.Modifiers, name)
+ : base(exmod.IsInternal ? TypeFlags.InternalAccess : TypeFlags.None, exmod.Modifiers, name)
{
- this.IsInternal = exmod.IsInternal;
}
private CompiledTypeWrapper(string name, Type type)
@@ -3674,7 +3692,14 @@ namespace IKVM.Internal
{
if(!clinitMethodSet)
{
- clinitMethod = type.GetMethod("__<clinit>", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
+ try
+ {
+ clinitMethod = type.GetMethod("__<clinit>", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
+ }
+#if STATIC_COMPILER
+ catch (IKVM.Reflection.MissingMemberException) { }
+#endif
+ finally { }
clinitMethodSet = true;
}
return clinitMethod != null;
@@ -4055,7 +4080,14 @@ namespace IKVM.Internal
private void AddMethodOrConstructor(MethodBase method, List<MethodWrapper> methods)
{
- if(!AttributeHelper.IsHideFromJava(method))
+ if(AttributeHelper.IsHideFromJava(method))
+ {
+ if(method.Name.StartsWith(NamePrefix.Incomplete, StringComparison.Ordinal))
+ {
+ SetHasIncompleteInterfaceImplementation();
+ }
+ }
+ else
{
if(method.IsSpecialName && method.Name.StartsWith("__<"))
{
@@ -4254,9 +4286,9 @@ namespace IKVM.Internal
private sealed class CompiledRemappedMethodWrapper : SmartMethodWrapper
{
- private MethodInfo mbHelper;
+ private readonly MethodInfo mbHelper;
#if !STATIC_COMPILER
- private MethodInfo mbNonvirtualHelper;
+ private readonly MethodInfo mbNonvirtualHelper;
#endif
internal CompiledRemappedMethodWrapper(TypeWrapper declaringType, string name, string sig, MethodBase method, TypeWrapper returnType, TypeWrapper[] parameterTypes, ExModifiers modifiers, bool hideFromReflection, MethodInfo mbHelper, MethodInfo mbNonvirtualHelper)
@@ -4379,10 +4411,13 @@ namespace IKVM.Internal
{
tw = DotNetTypeWrapper.GetWrapperFromDotNetType(type);
}
+ else if (type.DeclaringType != null && type.DeclaringType.FullName == UnloadableTypeWrapper.ContainerTypeName)
+ {
+ tw = new UnloadableTypeWrapper(TypeNameUtil.UnmangleNestedTypeName(type.Name), type);
+ }
else
{
- tw = ClassLoaderWrapper.GetWrapperFromType(type)
- ?? new UnloadableTypeWrapper(TypeNameUtil.UnmangleNestedTypeName(type.Name), type);
+ tw = ClassLoaderWrapper.GetWrapperFromType(type);
}
}
if (rank != 0)
@@ -4594,9 +4629,9 @@ namespace IKVM.Internal
}
#endif
- private sealed class CompiledAnnotation : Annotation
+ internal sealed class CompiledAnnotation : Annotation
{
- private Type type;
+ private readonly Type type;
internal CompiledAnnotation(Type type)
{
@@ -4709,18 +4744,18 @@ namespace IKVM.Internal
sealed class ArrayTypeWrapper : TypeWrapper
{
- private static TypeWrapper[] interfaces;
- private static MethodInfo clone;
+ private static volatile TypeWrapper[] interfaces;
+ private static volatile MethodInfo clone;
private readonly TypeWrapper ultimateElementTypeWrapper;
private Type arrayType;
private bool finished;
internal ArrayTypeWrapper(TypeWrapper ultimateElementTypeWrapper, string name)
- : base(Modifiers.Final | Modifiers.Abstract | (ultimateElementTypeWrapper.Modifiers & Modifiers.Public), name)
+ : base(ultimateElementTypeWrapper.IsInternal ? TypeFlags.InternalAccess : TypeFlags.None,
+ Modifiers.Final | Modifiers.Abstract | (ultimateElementTypeWrapper.Modifiers & Modifiers.Public), name)
{
Debug.Assert(!ultimateElementTypeWrapper.IsArray);
this.ultimateElementTypeWrapper = ultimateElementTypeWrapper;
- this.IsInternal = ultimateElementTypeWrapper.IsInternal;
}
internal override TypeWrapper BaseTypeWrapper
@@ -4777,8 +4812,8 @@ namespace IKVM.Internal
if(interfaces == null)
{
TypeWrapper[] tw = new TypeWrapper[2];
- tw[0] = ClassLoaderWrapper.LoadClassCritical("java.lang.Cloneable");
- tw[1] = ClassLoaderWrapper.LoadClassCritical("java.io.Serializable");
+ tw[0] = CoreClasses.java.lang.Cloneable.Wrapper;
+ tw[1] = CoreClasses.java.io.Serializable.Wrapper;
interfaces = tw;
}
return interfaces;
@@ -4897,9 +4932,9 @@ namespace IKVM.Internal
internal static readonly TypeWrapper ExtendedFloat = new VerifierTypeWrapper("<extfloat>", 0, null, null);
internal static readonly TypeWrapper ExtendedDouble = new VerifierTypeWrapper("<extdouble>", 0, null, null);
- private int index;
- private TypeWrapper underlyingType;
- private MethodAnalyzer methodAnalyzer;
+ private readonly int index;
+ private readonly TypeWrapper underlyingType;
+ private readonly MethodAnalyzer methodAnalyzer;
#if STUB_GENERATOR
internal class MethodAnalyzer
@@ -4981,7 +5016,7 @@ namespace IKVM.Internal
}
private VerifierTypeWrapper(string name, int index, TypeWrapper underlyingType, MethodAnalyzer methodAnalyzer)
- : base(TypeWrapper.VerifierTypeModifiersHack, name)
+ : base(TypeFlags.None, TypeWrapper.VerifierTypeModifiersHack, name)
{
this.index = index;
this.underlyingType = underlyingType;
diff --git a/external/ikvm/runtime/attributes.cs b/external/ikvm/runtime/attributes.cs
index 5032f87..2ff96cf 100644
--- a/external/ikvm/runtime/attributes.cs
+++ b/external/ikvm/runtime/attributes.cs
@@ -787,6 +787,45 @@ namespace IKVM.Attributes
}
}
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+ public sealed class JavaResourceAttribute : Attribute
+ {
+ private readonly string javaName;
+ private readonly string resourceName;
+
+ public JavaResourceAttribute(string javaName, string resourceName)
+ {
+ this.javaName = javaName;
+ this.resourceName = resourceName;
+ }
+
+ public string JavaName
+ {
+ get { return javaName; }
+ }
+
+ public string ResourceName
+ {
+ get { return resourceName; }
+ }
+ }
+
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Parameter, AllowMultiple = false)]
+ public sealed class DynamicAnnotationAttribute : Attribute
+ {
+ private readonly object[] definition;
+
+ public DynamicAnnotationAttribute(object[] definition)
+ {
+ this.definition = definition;
+ }
+
+ public object[] Definition
+ {
+ get { return definition; }
+ }
+ }
+
// used in custom modifier for access stubs
public static class AccessStub { }
}
diff --git a/external/ikvm/runtime/common.cs b/external/ikvm/runtime/common.cs
index 41681ea..75f39be 100644
--- a/external/ikvm/runtime/common.cs
+++ b/external/ikvm/runtime/common.cs
@@ -44,6 +44,16 @@ namespace IKVM.NativeCode.gnu.java.net.protocol.ikvmres
{
static class Handler
{
+ public static byte[] GenerateStub(jlClass c)
+ {
+ MemoryStream mem = new MemoryStream();
+#if !FIRST_PASS
+ bool includeNonPublicInterfaces = !"true".Equals(global::java.lang.Props.props.getProperty("ikvm.stubgen.skipNonPublicInterfaces"), StringComparison.OrdinalIgnoreCase);
+ IKVM.StubGen.StubGenerator.WriteClass(mem, TypeWrapper.FromClass(c), includeNonPublicInterfaces, false, false);
+#endif
+ return mem.ToArray();
+ }
+
public static Stream ReadResourceFromAssemblyImpl(Assembly asm, string resource)
{
// chop off the leading slash
@@ -89,7 +99,7 @@ namespace IKVM.NativeCode.gnu.java.net.protocol.ikvmres
return Assembly.Load(name);
}
- public static object GetGenericClassLoaderById(int id)
+ public static global::java.lang.ClassLoader GetGenericClassLoaderById(int id)
{
return ClassLoaderWrapper.GetGenericClassLoaderById(id).GetJavaClassLoader();
}
@@ -120,17 +130,17 @@ namespace IKVM.NativeCode.ikvm. at internal
{
static class CallerID
{
- public static object GetClass(object obj)
+ public static jlClass GetClass(object obj)
{
return ClassLoaderWrapper.GetWrapperFromType(obj.GetType().DeclaringType).ClassObject;
}
- public static object GetClassLoader(object obj)
+ public static global::java.lang.ClassLoader GetClassLoader(object obj)
{
return ClassLoaderWrapper.GetWrapperFromType(obj.GetType().DeclaringType).GetClassLoader().GetJavaClassLoader();
}
- public static object GetAssemblyClassLoader(Assembly asm)
+ public static global::java.lang.ClassLoader GetAssemblyClassLoader(Assembly asm)
{
return AssemblyClassLoader.FromAssembly(asm).GetJavaClassLoader();
}
@@ -156,7 +166,7 @@ namespace IKVM.NativeCode.ikvm. at internal
}
else
{
- return ((IKVM.Internal.GenericClassLoader)loader).GetName();
+ return ((GenericClassLoaderWrapper)loader).GetName();
}
}
@@ -198,198 +208,182 @@ namespace IKVM.NativeCode.ikvm.runtime
{
static class AssemblyClassLoader
{
- public static global::java.lang.Class LoadClass(object classLoader, Assembly assembly, string name)
+ public static void setWrapper(global::java.lang.ClassLoader _this, Assembly assembly)
+ {
+ ClassLoaderWrapper.SetWrapperForClassLoader(_this, IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly));
+ }
+
+ public static global::java.lang.Class loadClass(global::java.lang.ClassLoader _this, string name, bool resolve)
{
+#if FIRST_PASS
+ return null;
+#else
try
{
- TypeWrapper tw = null;
- if(classLoader == null)
+ if (!global::java.lang.ClassLoader.checkName(name))
{
- tw = ClassLoaderWrapper.GetBootstrapClassLoader().LoadClassByDottedName(name);
- }
- else if(assembly != null)
- {
- AssemblyClassLoader_ acl = global::IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
- tw = acl.GetLoadedClass(name);
- if(tw == null)
- {
- tw = acl.LoadGenericClass(name);
- }
- if(tw == null)
- {
- tw = acl.LoadReferenced(name);
- }
- if(tw == null)
- {
- throw new ClassNotFoundException(name);
- }
+ throw new ClassNotFoundException(name);
}
- else
+ AssemblyClassLoader_ wrapper = (AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this);
+ TypeWrapper tw = wrapper.LoadClass(name);
+ if (tw == null)
{
- // this must be a GenericClassLoader
- tw = ((GenericClassLoader)ClassLoaderWrapper.GetClassLoaderWrapper(classLoader)).LoadClassByDottedName(name);
+ throw new ClassNotFoundException(name);
}
- Tracer.Info(Tracer.ClassLoading, "Loaded class \"{0}\" from {1}", name, classLoader == null ? "boot class loader" : classLoader);
+ Tracer.Info(Tracer.ClassLoading, "Loaded class \"{0}\" from {1}", name, _this);
return tw.ClassObject;
}
- catch(RetargetableJavaException x)
+ catch (ClassNotFoundException x)
+ {
+ Tracer.Info(Tracer.ClassLoading, "Failed to load class \"{0}\" from {1}", name, _this);
+ throw new global::java.lang.ClassNotFoundException(x.Message);
+ }
+ catch (ClassLoadingException x)
+ {
+ Tracer.Info(Tracer.ClassLoading, "Failed to load class \"{0}\" from {1}", name, _this);
+ throw x.InnerException;
+ }
+ catch (RetargetableJavaException x)
{
- Tracer.Info(Tracer.ClassLoading, "Failed to load class \"{0}\" from {1}", name, classLoader == null ? "boot class loader" : classLoader);
+ Tracer.Info(Tracer.ClassLoading, "Failed to load class \"{0}\" from {1}", name, _this);
throw x.ToJava();
}
+#endif
}
- public static global::java.net.URL GetManifest(Assembly assembly)
+ public static global::java.net.URL getResource(global::java.lang.ClassLoader _this, string name)
{
-#if FIRST_PASS
- return null;
-#else
- IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
- foreach (global::java.net.URL url in wrapper.FindResources("META-INF/MANIFEST.MF"))
+#if !FIRST_PASS
+ AssemblyClassLoader_ wrapper = (AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this);
+ foreach (global::java.net.URL url in wrapper.GetResources(name))
{
return url;
}
- return null;
#endif
+ return null;
}
- public static global::java.net.URL getResource(global::java.lang.ClassLoader classLoader, Assembly assembly, string name)
+ public static global::java.util.Enumeration getResources(global::java.lang.ClassLoader _this, string name)
{
#if FIRST_PASS
return null;
#else
- if (assembly != null)
+ return new global::ikvm.runtime.EnumerationWrapper(((AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).GetResources(name));
+#endif
+ }
+
+ public static global::java.net.URL findResource(global::java.lang.ClassLoader _this, string name)
+ {
+#if !FIRST_PASS
+ AssemblyClassLoader_ wrapper = (AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this);
+ foreach (global::java.net.URL url in wrapper.FindResources(name))
{
- IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
- foreach (global::java.net.URL url in wrapper.GetResources(name))
- {
- return url;
- }
+ return url;
}
- return GetClassResource(classLoader, assembly, name);
#endif
+ return null;
}
- public static global::java.util.Enumeration getResources(global::java.lang.ClassLoader classLoader, Assembly assembly, string name)
+ public static global::java.util.Enumeration findResources(global::java.lang.ClassLoader _this, string name)
{
#if FIRST_PASS
return null;
#else
- global::java.util.Vector v = new global::java.util.Vector();
- if (assembly != null)
+ return new global::ikvm.runtime.EnumerationWrapper(((AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).FindResources(name));
+#endif
+ }
+
+#if !FIRST_PASS
+ private static global::java.net.URL GetCodeBase(Assembly assembly)
+ {
+ try
{
- IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
- foreach (global::java.net.URL url in wrapper.GetResources(name))
- {
- v.addElement(url);
- }
+ return new global::java.net.URL(assembly.CodeBase);
}
- // we'll only generate a stub class if there isn't already a resource with this name
- if (v.isEmpty())
+ catch (NotSupportedException)
{
- global::java.net.URL curl = GetClassResource(classLoader, assembly, name);
- if (curl != null)
- {
- v.addElement(curl);
- }
}
- return v.elements();
-#endif
+ catch (global::java.net.MalformedURLException)
+ {
+ }
+ return null;
}
-#if !FIRST_PASS
- private static global::java.net.URL GetClassResource(global::java.lang.ClassLoader classLoader, Assembly assembly, string name)
+ private static global::java.util.jar.Manifest GetManifest(global::java.lang.ClassLoader _this)
{
- if (name.EndsWith(".class", StringComparison.Ordinal) && name.IndexOf('.') == name.Length - 6)
+ try
{
- global::java.lang.Class c = null;
- try
- {
- c = LoadClass(classLoader, assembly, name.Substring(0, name.Length - 6).Replace('/', '.'));
- }
- catch (global::java.lang.ClassNotFoundException)
+ global::java.net.URL url = findResource(_this, "META-INF/MANIFEST.MF");
+ if (url != null)
{
+ return new global::java.util.jar.Manifest(url.openStream());
}
- catch (global::java.lang.LinkageError)
- {
- }
- if (c != null && !IsDynamic(c))
- {
- assembly = GetAssemblyFromClass(c);
- try
- {
- if (assembly != null)
- {
- return new global::java.io.File(VirtualFileSystem.GetAssemblyClassesPath(assembly) + name).toURI().toURL();
- }
- else
- {
- // HACK we use an index to identify the generic class loader in the url
- // TODO this obviously isn't persistable, we should use a list of assemblies instead.
- return new global::java.net.URL("ikvmres", "gen", GetGenericClassLoaderId(c.getClassLoader()), "/" + name);
- }
- }
- catch (global::java.net.MalformedURLException x)
- {
- throw (global::java.lang.InternalError)new global::java.lang.InternalError().initCause(x);
- }
- }
+ }
+ catch (global::java.net.MalformedURLException)
+ {
+ }
+ catch (global::java.io.IOException)
+ {
}
return null;
}
-#endif
- private static Assembly GetAssemblyFromClass(jlClass clazz)
+ private static string GetAttributeValue(global::java.util.jar.Attributes.Name name, global::java.util.jar.Attributes first, global::java.util.jar.Attributes second)
{
- TypeWrapper wrapper = TypeWrapper.FromClass(clazz);
- AssemblyClassLoader_ acl = wrapper.GetClassLoader() as AssemblyClassLoader_;
- return acl != null ? acl.GetAssembly(wrapper) : null;
- }
-
- private static bool IsDynamic(jlClass clazz)
- {
- return TypeWrapper.FromClass(clazz) is DynamicTypeWrapper;
+ string result = null;
+ if (first != null)
+ {
+ result = first.getValue(name);
+ }
+ if (second != null && result == null)
+ {
+ result = second.getValue(name);
+ }
+ return result;
}
+#endif
- // NOTE the array may contain duplicates!
- public static string[] GetPackages(Assembly assembly)
+ public static void lazyDefinePackages(global::java.lang.ClassLoader _this)
{
- IKVM.Internal.AssemblyClassLoader wrapper = IKVM.Internal.AssemblyClassLoader.FromAssembly(assembly);
- string[] packages = new string[0];
- foreach(Module m in wrapper.MainAssembly.GetModules(false))
+#if !FIRST_PASS
+ AssemblyClassLoader_ wrapper = (AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this);
+ global::java.net.URL sealBase = GetCodeBase(wrapper.MainAssembly);
+ global::java.util.jar.Manifest manifest = GetManifest(_this);
+ global::java.util.jar.Attributes attr = null;
+ if (manifest != null)
{
- object[] attr = m.GetCustomAttributes(typeof(PackageListAttribute), false);
- foreach(PackageListAttribute p in attr)
+ attr = manifest.getMainAttributes();
+ }
+ string[] packages = wrapper.GetPackages();
+ for (int i = 0; i < packages.Length; i++)
+ {
+ string name = packages[i];
+ if (_this.getPackage(name) == null)
{
- string[] mp = p.GetPackages();
- string[] tmp = new string[packages.Length + mp.Length];
- Array.Copy(packages, 0, tmp, 0, packages.Length);
- Array.Copy(mp, 0, tmp, packages.Length, mp.Length);
- packages = tmp;
+ global::java.util.jar.Attributes entryAttr = null;
+ if (manifest != null)
+ {
+ entryAttr = manifest.getAttributes(name.Replace('.', '/') + '/');
+ }
+ _this.definePackage(name,
+ GetAttributeValue(global::java.util.jar.Attributes.Name.SPECIFICATION_TITLE, entryAttr, attr),
+ GetAttributeValue(global::java.util.jar.Attributes.Name.SPECIFICATION_VERSION, entryAttr, attr),
+ GetAttributeValue(global::java.util.jar.Attributes.Name.SPECIFICATION_VENDOR, entryAttr, attr),
+ GetAttributeValue(global::java.util.jar.Attributes.Name.IMPLEMENTATION_TITLE, entryAttr, attr),
+ GetAttributeValue(global::java.util.jar.Attributes.Name.IMPLEMENTATION_VERSION, entryAttr, attr),
+ GetAttributeValue(global::java.util.jar.Attributes.Name.IMPLEMENTATION_VENDOR, entryAttr, attr),
+ "true".Equals(GetAttributeValue(global::java.util.jar.Attributes.Name.SEALED, entryAttr, attr), StringComparison.OrdinalIgnoreCase) ? sealBase : null);
}
}
- return packages;
- }
-
- public static int GetGenericClassLoaderId(object classLoader)
- {
-#if FIRST_PASS
- return 0;
-#else
- return ClassLoaderWrapper.GetGenericClassLoaderId(ClassLoaderWrapper.GetClassLoaderWrapper(classLoader));
#endif
}
- public static string GetGenericClassLoaderName(object classLoader)
+ public static string toString(global::java.lang.ClassLoader _this)
{
-#if FIRST_PASS
- return null;
-#else
- return ((GenericClassLoader)ClassLoaderWrapper.GetClassLoaderWrapper(classLoader)).GetName();
-#endif
+ return ((AssemblyClassLoader_)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).MainAssembly.FullName;
}
- public static object getAssemblyClassLoader(Assembly asm)
+ public static global::java.lang.ClassLoader getAssemblyClassLoader(Assembly asm)
{
// note that we don't do a security check here, because if you have the Assembly object,
// you can already get at all the types in it.
@@ -452,6 +446,24 @@ namespace IKVM.NativeCode.ikvm.runtime
}
}
+ static class GenericClassLoader
+ {
+ public static string toString(global::java.lang.ClassLoader _this)
+ {
+ return ((GenericClassLoaderWrapper)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).GetName();
+ }
+
+ public static global::java.util.Enumeration getResources(global::java.lang.ClassLoader _this, string name)
+ {
+ return ((GenericClassLoaderWrapper)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).GetResources(name);
+ }
+
+ public static global::java.net.URL findResource(global::java.lang.ClassLoader _this, string name)
+ {
+ return ((GenericClassLoaderWrapper)ClassLoaderWrapper.GetClassLoaderWrapper(_this)).FindResource(name);
+ }
+ }
+
static class Util
{
public static jlClass getClassFromObject(object o)
diff --git a/external/ikvm/runtime/compiler.cs b/external/ikvm/runtime/compiler.cs
index fc5c122..8b8a30e 100644
--- a/external/ikvm/runtime/compiler.cs
+++ b/external/ikvm/runtime/compiler.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -57,21 +57,20 @@ static class ByteCodeHelperMethods
internal static readonly MethodInfo arraycopy_primitive_1;
internal static readonly MethodInfo arraycopy;
internal static readonly MethodInfo DynamicCast;
- internal static readonly MethodInfo DynamicGetTypeAsExceptionType;
internal static readonly MethodInfo DynamicAaload;
internal static readonly MethodInfo DynamicAastore;
internal static readonly MethodInfo DynamicClassLiteral;
internal static readonly MethodInfo DynamicGetfield;
internal static readonly MethodInfo DynamicGetstatic;
- internal static readonly MethodInfo DynamicInvokeSpecialNew;
- internal static readonly MethodInfo DynamicInvokestatic;
- internal static readonly MethodInfo DynamicInvokevirtual;
internal static readonly MethodInfo DynamicMultianewarray;
internal static readonly MethodInfo DynamicNewarray;
internal static readonly MethodInfo DynamicNewCheckOnly;
internal static readonly MethodInfo DynamicPutfield;
internal static readonly MethodInfo DynamicPutstatic;
internal static readonly MethodInfo DynamicCreateDelegate;
+ internal static readonly MethodInfo DynamicLoadMethodType;
+ internal static readonly MethodInfo DynamicLoadMethodHandle;
+ internal static readonly MethodInfo DynamicBinderMemberLookup;
internal static readonly MethodInfo VerboseCastFailure;
internal static readonly MethodInfo SkipFinalizer;
internal static readonly MethodInfo DynamicInstanceOf;
@@ -107,21 +106,20 @@ static class ByteCodeHelperMethods
arraycopy_primitive_1 = typeofByteCodeHelper.GetMethod("arraycopy_primitive_1");
arraycopy = typeofByteCodeHelper.GetMethod("arraycopy");
DynamicCast = typeofByteCodeHelper.GetMethod("DynamicCast");
- DynamicGetTypeAsExceptionType = typeofByteCodeHelper.GetMethod("DynamicGetTypeAsExceptionType");
DynamicAaload = typeofByteCodeHelper.GetMethod("DynamicAaload");
DynamicAastore = typeofByteCodeHelper.GetMethod("DynamicAastore");
DynamicClassLiteral = typeofByteCodeHelper.GetMethod("DynamicClassLiteral");
DynamicGetfield = typeofByteCodeHelper.GetMethod("DynamicGetfield");
DynamicGetstatic = typeofByteCodeHelper.GetMethod("DynamicGetstatic");
- DynamicInvokeSpecialNew = typeofByteCodeHelper.GetMethod("DynamicInvokeSpecialNew");
- DynamicInvokestatic = typeofByteCodeHelper.GetMethod("DynamicInvokestatic");
- DynamicInvokevirtual = typeofByteCodeHelper.GetMethod("DynamicInvokevirtual");
DynamicMultianewarray = typeofByteCodeHelper.GetMethod("DynamicMultianewarray");
DynamicNewarray = typeofByteCodeHelper.GetMethod("DynamicNewarray");
DynamicNewCheckOnly = typeofByteCodeHelper.GetMethod("DynamicNewCheckOnly");
DynamicPutfield = typeofByteCodeHelper.GetMethod("DynamicPutfield");
DynamicPutstatic = typeofByteCodeHelper.GetMethod("DynamicPutstatic");
DynamicCreateDelegate = typeofByteCodeHelper.GetMethod("DynamicCreateDelegate");
+ DynamicLoadMethodType = typeofByteCodeHelper.GetMethod("DynamicLoadMethodType");
+ DynamicLoadMethodHandle = typeofByteCodeHelper.GetMethod("DynamicLoadMethodHandle");
+ DynamicBinderMemberLookup = typeofByteCodeHelper.GetMethod("DynamicBinderMemberLookup");
VerboseCastFailure = typeofByteCodeHelper.GetMethod("VerboseCastFailure");
SkipFinalizer = typeofByteCodeHelper.GetMethod("SkipFinalizer");
DynamicInstanceOf = typeofByteCodeHelper.GetMethod("DynamicInstanceOf");
@@ -404,7 +402,6 @@ sealed class Compiler
private readonly List<string> harderrors;
private readonly LocalVarInfo localVars;
private bool nonleaf;
- private Dictionary<MethodKey, MethodInfo> invokespecialstubcache;
private readonly bool debug;
private readonly bool keepAlive;
private readonly bool strictfp;
@@ -451,7 +448,7 @@ sealed class Compiler
getClassFromTypeHandle2.Link();
}
- private Compiler(DynamicTypeWrapper.FinishContext context, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, ClassFile.Method m, CodeEmitter ilGenerator, ClassLoaderWrapper classLoader, Dictionary<MethodKey, MethodInfo> invokespecialstubcache)
+ private Compiler(DynamicTypeWrapper.FinishContext context, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, ClassFile.Method m, CodeEmitter ilGenerator, ClassLoaderWrapper classLoader)
{
this.context = context;
this.clazz = clazz;
@@ -459,10 +456,9 @@ sealed class Compiler
this.classFile = classFile;
this.m = m;
this.ilGenerator = ilGenerator;
- this.invokespecialstubcache = invokespecialstubcache;
this.debug = classLoader.EmitDebugInfo;
this.strictfp = m.IsStrictfp;
- if(ReferenceEquals(mw.Name, StringConstants.INIT))
+ if(mw.IsConstructor)
{
MethodWrapper finalize = clazz.GetMethodWrapper(StringConstants.FINALIZE, StringConstants.SIG_VOID, true);
keepAlive = finalize != null && finalize.DeclaringType != java_lang_Object && finalize.DeclaringType != cli_System_Object && finalize.DeclaringType != java_lang_Throwable && finalize.DeclaringType != cli_System_Exception;
@@ -684,8 +680,8 @@ sealed class Compiler
private sealed class ReturnCookie
{
- private CodeEmitterLabel stub;
- private CodeEmitterLocal local;
+ private readonly CodeEmitterLabel stub;
+ private readonly CodeEmitterLocal local;
internal ReturnCookie(CodeEmitterLabel stub, CodeEmitterLocal local)
{
@@ -738,9 +734,9 @@ sealed class Compiler
FaultBlockException,
Other
}
- private Compiler compiler;
- private StackType[] types;
- private CodeEmitterLocal[] locals;
+ private readonly Compiler compiler;
+ private readonly StackType[] types;
+ private readonly CodeEmitterLocal[] locals;
internal DupHelper(Compiler compiler, int count)
{
@@ -844,7 +840,7 @@ sealed class Compiler
}
}
- internal static void Compile(DynamicTypeWrapper.FinishContext context, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, ClassFile.Method m, CodeEmitter ilGenerator, ref bool nonleaf, Dictionary<MethodKey, MethodInfo> invokespecialstubcache)
+ internal static void Compile(DynamicTypeWrapper.FinishContext context, DynamicTypeWrapper clazz, MethodWrapper mw, ClassFile classFile, ClassFile.Method m, CodeEmitter ilGenerator, ref bool nonleaf)
{
ClassLoaderWrapper classLoader = clazz.GetClassLoader();
if(classLoader.EmitDebugInfo)
@@ -881,8 +877,8 @@ sealed class Compiler
{
Profiler.Count("EmitDynamicCast");
ilGenerator.EmitLdarg(i + (m.IsStatic ? 0 : 1));
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, args[i].Name);
+ context.EmitCallerID(ilGenerator);
ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicCast);
ilGenerator.Emit(OpCodes.Pop);
}
@@ -893,7 +889,7 @@ sealed class Compiler
Profiler.Enter("new Compiler");
try
{
- c = new Compiler(context, clazz, mw, classFile, m, ilGenerator, classLoader, invokespecialstubcache);
+ c = new Compiler(context, clazz, mw, classFile, m, ilGenerator, classLoader);
}
finally
{
@@ -906,7 +902,7 @@ sealed class Compiler
classLoader.IssueMessage(Message.EmittedVerificationError, classFile.Name + "." + m.Name + m.Signature, x.Message);
#endif
Tracer.Error(Tracer.Verifier, x.ToString());
- clazz.HasVerifyError = true;
+ clazz.SetHasVerifyError();
// because in Java the method is only verified if it is actually called,
// we generate code here to throw the VerificationError
ilGenerator.EmitThrow("java.lang.VerifyError", x.Message);
@@ -918,7 +914,7 @@ sealed class Compiler
classLoader.IssueMessage(Message.EmittedClassFormatError, classFile.Name + "." + m.Name + m.Signature, x.Message);
#endif
Tracer.Error(Tracer.Verifier, x.ToString());
- clazz.HasClassFormatError = true;
+ clazz.SetHasClassFormatError();
ilGenerator.EmitThrow("java.lang.ClassFormatError", x.Message);
return;
}
@@ -959,14 +955,14 @@ sealed class Compiler
private sealed class Block
{
- private Compiler compiler;
- private CodeEmitter ilgen;
- private int beginIndex;
- private int endIndex;
- private int exceptionIndex;
+ private readonly Compiler compiler;
+ private readonly CodeEmitter ilgen;
+ private readonly int beginIndex;
+ private readonly int endIndex;
+ private readonly int exceptionIndex;
private List<object> exits;
- private bool nested;
- private object[] labels;
+ private readonly bool nested;
+ private readonly object[] labels;
internal Block(Compiler compiler, int beginIndex, int endIndex, int exceptionIndex, List<object> exits, bool nested)
{
@@ -1011,17 +1007,17 @@ sealed class Compiler
{
if(IsInRange(targetIndex))
{
- object l = labels[targetIndex];
+ CodeEmitterLabel l = (CodeEmitterLabel)labels[targetIndex];
if(l == null)
{
l = ilgen.DefineLabel();
labels[targetIndex] = l;
}
- return (CodeEmitterLabel)l;
+ return l;
}
else
{
- object l = labels[targetIndex];
+ BranchCookie l = (BranchCookie)labels[targetIndex];
if(l == null)
{
// if we're branching out of the current exception block, we need to indirect this thru a stub
@@ -1038,7 +1034,7 @@ sealed class Compiler
l = bc;
labels[targetIndex] = l;
}
- return ((BranchCookie)l).Stub;
+ return l.Stub;
}
}
@@ -1298,8 +1294,8 @@ sealed class Compiler
if(exceptionTypeWrapper.IsUnloadable)
{
Profiler.Count("EmitDynamicExceptionHandler");
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, exceptionTypeWrapper.Name);
+ context.EmitCallerID(ilGenerator);
ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicInstanceOf);
}
CodeEmitterLabel leave = ilGenerator.DefineLabel();
@@ -1540,27 +1536,14 @@ sealed class Compiler
ClassFile.ConstantPoolItemInvokeDynamic cpi = classFile.GetInvokeDynamic(instr.Arg1);
CastInterfaceArgs(null, cpi.GetArgTypes(), i, false);
EmitInvokeDynamic(cpi);
- cpi.GetRetType().EmitConvSignatureTypeToStackType(ilGenerator);
- if(!strictfp)
- {
- // no need to convert
- }
- else if(cpi.GetRetType() == PrimitiveTypeWrapper.DOUBLE)
- {
- ilGenerator.Emit(OpCodes.Conv_R8);
- }
- else if(cpi.GetRetType() == PrimitiveTypeWrapper.FLOAT)
- {
- ilGenerator.Emit(OpCodes.Conv_R4);
- }
+ EmitReturnTypeConversion(cpi.GetRetType());
nonleaf = true;
break;
}
case NormalizedByteCode.__dynamic_invokestatic:
case NormalizedByteCode.__invokestatic:
{
- ClassFile.ConstantPoolItemMI cpi = classFile.GetMethodref(instr.Arg1);
- MethodWrapper method = GetMethodCallEmitter(cpi, instr.NormalizedOpCode);
+ MethodWrapper method = GetMethodCallEmitter(instr.NormalizedOpCode, instr.Arg1);
if(method.IsIntrinsic && method.EmitIntrinsic(new EmitIntrinsicContext(method, context, ilGenerator, ma, i, mw, classFile, code, flags)))
{
break;
@@ -1573,19 +1556,7 @@ sealed class Compiler
context.EmitCallerID(ilGenerator);
}
method.EmitCall(ilGenerator);
- method.ReturnType.EmitConvSignatureTypeToStackType(ilGenerator);
- if(!strictfp)
- {
- // no need to convert
- }
- else if(method.ReturnType == PrimitiveTypeWrapper.DOUBLE)
- {
- ilGenerator.Emit(OpCodes.Conv_R8);
- }
- else if(method.ReturnType == PrimitiveTypeWrapper.FLOAT)
- {
- ilGenerator.Emit(OpCodes.Conv_R4);
- }
+ EmitReturnTypeConversion(method.ReturnType);
nonleaf = true;
break;
}
@@ -1599,12 +1570,10 @@ sealed class Compiler
case NormalizedByteCode.__methodhandle_invokeexact:
{
bool isinvokespecial = instr.NormalizedOpCode == NormalizedByteCode.__invokespecial || instr.NormalizedOpCode == NormalizedByteCode.__dynamic_invokespecial;
- ClassFile.ConstantPoolItemMI cpi = classFile.GetMethodref(instr.Arg1);
- int argcount = cpi.GetArgTypes().Length;
+ MethodWrapper method = GetMethodCallEmitter(instr.NormalizedOpCode, instr.Arg1);
+ int argcount = method.GetParameters().Length;
TypeWrapper type = ma.GetRawStackTypeWrapper(i, argcount);
- TypeWrapper thisType = SigTypeToClassName(type, cpi.GetClassType());
-
- MethodWrapper method = GetMethodCallEmitter(cpi, instr.NormalizedOpCode);
+ TypeWrapper thisType = SigTypeToClassName(type, method.DeclaringType);
EmitIntrinsicContext eic = new EmitIntrinsicContext(method, context, ilGenerator, ma, i, mw, classFile, code, flags);
if(method.IsIntrinsic && method.EmitIntrinsic(eic))
@@ -1615,27 +1584,28 @@ sealed class Compiler
nonleaf = true;
+ // HACK this code is duplicated in java.lang.invoke.cs
if(method.IsProtected && (method.DeclaringType == java_lang_Object || method.DeclaringType == java_lang_Throwable))
{
// HACK we may need to redirect finalize or clone from java.lang.Object/Throwable
// to a more specific base type.
if(thisType.IsAssignableTo(cli_System_Object))
{
- method = cli_System_Object.GetMethodWrapper(cpi.Name, cpi.Signature, true);
+ method = cli_System_Object.GetMethodWrapper(method.Name, method.Signature, true);
}
else if(thisType.IsAssignableTo(cli_System_Exception))
{
- method = cli_System_Exception.GetMethodWrapper(cpi.Name, cpi.Signature, true);
+ method = cli_System_Exception.GetMethodWrapper(method.Name, method.Signature, true);
}
else if(thisType.IsAssignableTo(java_lang_Throwable))
{
- method = java_lang_Throwable.GetMethodWrapper(cpi.Name, cpi.Signature, true);
+ method = java_lang_Throwable.GetMethodWrapper(method.Name, method.Signature, true);
}
}
// if the stack values don't match the argument types (for interface argument types)
// we must emit code to cast the stack value to the interface type
- if(isinvokespecial && ReferenceEquals(cpi.Name, StringConstants.INIT) && VerifierTypeWrapper.IsNew(type))
+ if(isinvokespecial && method.IsConstructor && VerifierTypeWrapper.IsNew(type))
{
CastInterfaceArgs(method.DeclaringType, method.GetParameters(), i, false);
}
@@ -1647,16 +1617,7 @@ sealed class Compiler
methodArgs.CopyTo(args, 1);
if(instr.NormalizedOpCode == NormalizedByteCode.__invokeinterface)
{
- if(method.DeclaringType.IsGhost)
- {
- // if we're calling a ghost interface method, we need to make sure that CastInterfaceArgs knows
- // (cpi.GetClassType() could be an interface that extends the ghost interface)
- args[0] = method.DeclaringType;
- }
- else
- {
- args[0] = cpi.GetClassType();
- }
+ args[0] = method.DeclaringType;
}
else
{
@@ -1665,7 +1626,7 @@ sealed class Compiler
CastInterfaceArgs(method.DeclaringType, args, i, true);
}
- if(isinvokespecial && ReferenceEquals(cpi.Name, StringConstants.INIT))
+ if(isinvokespecial && method.IsConstructor)
{
if(VerifierTypeWrapper.IsNew(type))
{
@@ -1846,7 +1807,7 @@ sealed class Compiler
}
else
{
- ilGenerator.Emit(OpCodes.Callvirt, GetInvokeSpecialStub(method));
+ ilGenerator.Emit(OpCodes.Callvirt, context.GetInvokeSpecialStub(method));
}
}
else
@@ -1869,19 +1830,7 @@ sealed class Compiler
method.EmitCallvirt(ilGenerator);
}
}
- method.ReturnType.EmitConvSignatureTypeToStackType(ilGenerator);
- if(!strictfp)
- {
- // no need to convert
- }
- else if(method.ReturnType == PrimitiveTypeWrapper.DOUBLE)
- {
- ilGenerator.Emit(OpCodes.Conv_R8);
- }
- else if(method.ReturnType == PrimitiveTypeWrapper.FLOAT)
- {
- ilGenerator.Emit(OpCodes.Conv_R4);
- }
+ EmitReturnTypeConversion(method.ReturnType);
}
break;
}
@@ -1999,7 +1948,7 @@ sealed class Compiler
LocalVar v = LoadLocal(i);
if(!type.IsUnloadable && (v.type.IsUnloadable || !v.type.IsAssignableTo(type)))
{
- type.EmitCheckcast(type, ilGenerator);
+ type.EmitCheckcast(ilGenerator);
}
}
break;
@@ -2053,8 +2002,8 @@ sealed class Compiler
Profiler.Count("EmitDynamicNewCheckOnly");
// this is here to make sure we throw the exception in the right location (before
// evaluating the constructor arguments)
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
+ context.EmitCallerID(ilGenerator);
ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicNewCheckOnly);
}
else if(wrapper != clazz && RequiresExplicitClassInit(wrapper, i + 1, flags))
@@ -2084,9 +2033,9 @@ sealed class Compiler
if(wrapper.IsUnloadable)
{
Profiler.Count("EmitDynamicMultianewarray");
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
ilGenerator.Emit(OpCodes.Ldloc, localArray);
+ context.EmitCallerID(ilGenerator);
ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicMultianewarray);
}
else if(wrapper.IsGhost || wrapper.IsGhostArray)
@@ -2117,8 +2066,8 @@ sealed class Compiler
if(wrapper.IsUnloadable)
{
Profiler.Count("EmitDynamicNewarray");
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
+ context.EmitCallerID(ilGenerator);
ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicNewarray);
}
else if(wrapper.IsGhost || wrapper.IsGhostArray)
@@ -2182,13 +2131,31 @@ sealed class Compiler
case NormalizedByteCode.__checkcast:
{
TypeWrapper wrapper = classFile.GetConstantPoolClassType(instr.Arg1);
- wrapper.EmitCheckcast(clazz, ilGenerator);
+ if(wrapper.IsUnloadable)
+ {
+ ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
+ context.EmitCallerID(ilGenerator);
+ ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicCast);
+ }
+ else
+ {
+ wrapper.EmitCheckcast(ilGenerator);
+ }
break;
}
case NormalizedByteCode.__instanceof:
{
TypeWrapper wrapper = classFile.GetConstantPoolClassType(instr.Arg1);
- wrapper.EmitInstanceOf(clazz, ilGenerator);
+ if(wrapper.IsUnloadable)
+ {
+ ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
+ context.EmitCallerID(ilGenerator);
+ ilGenerator.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicInstanceOf);
+ }
+ else
+ {
+ wrapper.EmitInstanceOf(ilGenerator);
+ }
break;
}
case NormalizedByteCode.__aaload:
@@ -2943,6 +2910,23 @@ sealed class Compiler
}
}
+ private void EmitReturnTypeConversion(TypeWrapper returnType)
+ {
+ returnType.EmitConvSignatureTypeToStackType(ilGenerator);
+ if (!strictfp)
+ {
+ // no need to convert
+ }
+ else if (returnType == PrimitiveTypeWrapper.DOUBLE)
+ {
+ ilGenerator.Emit(OpCodes.Conv_R8);
+ }
+ else if (returnType == PrimitiveTypeWrapper.FLOAT)
+ {
+ ilGenerator.Emit(OpCodes.Conv_R4);
+ }
+ }
+
private void EmitLoadConstant(CodeEmitter ilgen, int constant)
{
switch (classFile.GetConstantPoolConstantType(constant))
@@ -2963,37 +2947,44 @@ sealed class Compiler
ilgen.Emit(OpCodes.Ldstr, classFile.GetConstantPoolConstantString(constant));
break;
case ClassFile.ConstantType.Class:
- {
- TypeWrapper tw = classFile.GetConstantPoolClassType(constant);
- if (tw.IsUnloadable)
- {
- Profiler.Count("EmitDynamicClassLiteral");
- ilgen.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
- ilgen.Emit(OpCodes.Ldstr, tw.Name);
- ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicClassLiteral);
- java_lang_Class.EmitCheckcast(clazz, ilgen);
- }
- else
- {
- tw.EmitClassLiteral(ilgen);
- }
+ EmitLoadClass(ilgen, classFile.GetConstantPoolClassType(constant));
break;
- }
case ClassFile.ConstantType.MethodHandle:
context.GetValue<MethodHandleConstant>(constant).Emit(this, ilgen, constant);
break;
case ClassFile.ConstantType.MethodType:
- {
- ClassFile.ConstantPoolItemMethodType cpi = classFile.GetConstantPoolConstantMethodType(constant);
- Type delegateType = MethodHandleUtil.CreateDelegateTypeForLoadConstant(cpi.GetArgTypes(), cpi.GetRetType());
- ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.LoadMethodType.MakeGenericMethod(delegateType));
+ context.GetValue<MethodTypeConstant>(constant).Emit(this, ilgen, constant);
break;
- }
default:
throw new InvalidOperationException();
}
}
+ private void EmitLoadClass(CodeEmitter ilgen, TypeWrapper tw)
+ {
+ if (tw.IsUnloadable)
+ {
+ Profiler.Count("EmitDynamicClassLiteral");
+ ilgen.Emit(OpCodes.Ldstr, tw.Name);
+ context.EmitCallerID(ilgen);
+ ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicClassLiteral);
+ }
+ else
+ {
+ tw.EmitClassLiteral(ilgen);
+ }
+ }
+
+ internal static bool HasUnloadable(TypeWrapper[] args, TypeWrapper ret)
+ {
+ TypeWrapper tw = ret;
+ for (int i = 0; !tw.IsUnloadable && i < args.Length; i++)
+ {
+ tw = args[i];
+ }
+ return tw.IsUnloadable;
+ }
+
private static class InvokeDynamicBuilder
{
private static readonly Type typeofOpenIndyCallSite;
@@ -3100,6 +3091,11 @@ sealed class Compiler
}
ClassFile.ConstantPoolItemMethodHandle mh = compiler.classFile.GetConstantPoolConstantMethodHandle(bsm.BootstrapMethodIndex);
MethodWrapper mw = mh.Member as MethodWrapper;
+ ClassFile.ConstantPoolItemMI cpiMI;
+ if (mw == null && (cpiMI = mh.MemberConstantPoolItem as ClassFile.ConstantPoolItemMI) != null)
+ {
+ mw = new DynamicBinder().Get(compiler.context, ClassFile.RefKind.invokeStatic, cpiMI);
+ }
if (mw == null || !mw.IsStatic)
{
ilgen.EmitThrow("java.lang.invoke.WrongMethodTypeException");
@@ -3259,36 +3255,59 @@ sealed class Compiler
private sealed class MethodHandleConstant
{
private FieldBuilder field;
+ private bool dynamic;
internal void Emit(Compiler compiler, CodeEmitter ilgen, int index)
{
if (field == null)
{
- field = CreateField(compiler, index);
+ field = CreateField(compiler, index, ref dynamic);
+ }
+ if (dynamic)
+ {
+ ClassFile.ConstantPoolItemMethodHandle mh = compiler.classFile.GetConstantPoolConstantMethodHandle(index);
+ ilgen.Emit(OpCodes.Ldsflda, field);
+ ilgen.EmitLdc_I4((int)mh.Kind);
+ ilgen.Emit(OpCodes.Ldstr, mh.Class);
+ ilgen.Emit(OpCodes.Ldstr, mh.Name);
+ ilgen.Emit(OpCodes.Ldstr, mh.Signature);
+ compiler.context.EmitCallerID(ilgen);
+ ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicLoadMethodHandle);
+ }
+ else
+ {
+ ilgen.Emit(OpCodes.Ldsfld, field);
}
- ilgen.Emit(OpCodes.Ldsfld, field);
}
- private static FieldBuilder CreateField(Compiler compiler, int index)
+ private static FieldBuilder CreateField(Compiler compiler, int index, ref bool dynamic)
{
- TypeBuilder tb = compiler.context.DefineMethodHandleConstantType(index);
- FieldBuilder field = tb.DefineField("value", CoreClasses.java.lang.invoke.MethodHandle.Wrapper.TypeAsSignatureType, FieldAttributes.Assembly | FieldAttributes.Static | FieldAttributes.InitOnly);
- ILGenerator ilgen = ReflectUtil.DefineTypeInitializer(tb).GetILGenerator();
ClassFile.ConstantPoolItemMethodHandle mh = compiler.classFile.GetConstantPoolConstantMethodHandle(index);
- Type delegateType;
+ if (mh.GetClassType().IsUnloadable)
+ {
+ dynamic = true;
+ return compiler.context.DefineDynamicMethodHandleCacheField();
+ }
+ TypeWrapper[] args;
+ TypeWrapper arg0 = null;
+ TypeWrapper ret;
switch (mh.Kind)
{
case ClassFile.RefKind.getField:
- delegateType = MethodHandleUtil.CreateDelegateType(new TypeWrapper[] { mh.Member.DeclaringType }, ((FieldWrapper)mh.Member).FieldTypeWrapper);
+ args = new TypeWrapper[] { mh.Member.DeclaringType };
+ ret = ((FieldWrapper)mh.Member).FieldTypeWrapper;
break;
case ClassFile.RefKind.putField:
- delegateType = MethodHandleUtil.CreateDelegateType(new TypeWrapper[] { mh.Member.DeclaringType, ((FieldWrapper)mh.Member).FieldTypeWrapper }, PrimitiveTypeWrapper.VOID);
+ args = new TypeWrapper[] { mh.Member.DeclaringType, ((FieldWrapper)mh.Member).FieldTypeWrapper };
+ ret = PrimitiveTypeWrapper.VOID;
break;
case ClassFile.RefKind.getStatic:
- delegateType = MethodHandleUtil.CreateDelegateType(TypeWrapper.EmptyArray, ((FieldWrapper)mh.Member).FieldTypeWrapper);
+ args = TypeWrapper.EmptyArray;
+ ret = ((FieldWrapper)mh.Member).FieldTypeWrapper;
break;
case ClassFile.RefKind.putStatic:
- delegateType = MethodHandleUtil.CreateDelegateType(new TypeWrapper[] { ((FieldWrapper)mh.Member).FieldTypeWrapper }, PrimitiveTypeWrapper.VOID);
+ args = new TypeWrapper[] { ((FieldWrapper)mh.Member).FieldTypeWrapper };
+ ret = PrimitiveTypeWrapper.VOID;
break;
case ClassFile.RefKind.invokeInterface:
case ClassFile.RefKind.invokeSpecial:
@@ -3296,28 +3315,52 @@ sealed class Compiler
case ClassFile.RefKind.invokeStatic:
if (mh.Member == null)
{
- // it MethodHandle.invoke[Exact]
+ // it's MethodHandle.invoke[Exact]
ClassFile.ConstantPoolItemMI cpi = (ClassFile.ConstantPoolItemMI)mh.MemberConstantPoolItem;
- TypeWrapper[] args = new TypeWrapper[cpi.GetArgTypes().Length + 1];
- args[0] = mh.GetClassType();
- Array.Copy(cpi.GetArgTypes(), 0, args, 1, args.Length - 1);
- delegateType = MethodHandleUtil.CreateDelegateType(args, cpi.GetRetType());
- }
- else if (mh.Member.IsProtected && !mh.Member.IsAccessibleFrom(mh.GetClassType(), compiler.clazz, mh.GetClassType()))
- {
- delegateType = MethodHandleUtil.CreateDelegateType(compiler.clazz, (MethodWrapper)mh.Member);
+ args = cpi.GetArgTypes();
+ arg0 = mh.GetClassType();
+ ret = cpi.GetRetType();
}
else
{
- delegateType = MethodHandleUtil.CreateDelegateType(mh.GetClassType(), (MethodWrapper)mh.Member);
+ MethodWrapper mw = (MethodWrapper)mh.Member;
+ args = mw.GetParameters();
+ ret = mw.ReturnType;
+ if (mw.IsStatic)
+ {
+ // no receiver type
+ }
+ else if (mw.IsProtected && !mw.IsAccessibleFrom(mh.GetClassType(), compiler.clazz, mh.GetClassType()))
+ {
+ arg0 = compiler.clazz;
+ }
+ else
+ {
+ arg0 = mh.GetClassType();
+ }
}
break;
case ClassFile.RefKind.newInvokeSpecial:
- delegateType = MethodHandleUtil.CreateDelegateType(((MethodWrapper)mh.Member).GetParameters(), mh.Member.DeclaringType);
+ args = ((MethodWrapper)mh.Member).GetParameters();
+ ret = mh.Member.DeclaringType;
break;
default:
throw new InvalidOperationException();
}
+ if (arg0 != null)
+ {
+ TypeWrapper[] newArgs = new TypeWrapper[args.Length + 1];
+ newArgs[0] = arg0;
+ Array.Copy(args, 0, newArgs, 1, args.Length);
+ args = newArgs;
+ }
+ if (HasUnloadable(args, ret))
+ {
+ dynamic = true;
+ return compiler.context.DefineDynamicMethodHandleCacheField();
+ }
+
+ Type delegateType = MethodHandleUtil.CreateDelegateType(args, ret);
MethodInfo method;
if (mh.Kind == ClassFile.RefKind.invokeStatic
&& (method = (MethodInfo)((MethodWrapper)mh.Member).GetMethod()) != null
@@ -3329,12 +3372,16 @@ sealed class Compiler
{
method = CreateDispatchStub(compiler, mh, delegateType);
}
+ TypeBuilder tb = compiler.context.DefineMethodHandleConstantType(index);
+ FieldBuilder field = tb.DefineField("value", CoreClasses.java.lang.invoke.MethodHandle.Wrapper.TypeAsSignatureType, FieldAttributes.Assembly | FieldAttributes.Static | FieldAttributes.InitOnly);
+ CodeEmitter ilgen = CodeEmitter.Create(ReflectUtil.DefineTypeInitializer(tb));
ilgen.Emit(OpCodes.Ldnull);
ilgen.Emit(OpCodes.Ldftn, method);
ilgen.Emit(OpCodes.Newobj, MethodHandleUtil.GetDelegateConstructor(delegateType));
ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.MethodHandleFromDelegate);
ilgen.Emit(OpCodes.Stsfld, field);
ilgen.Emit(OpCodes.Ret);
+ ilgen.DoEmit();
return field;
}
@@ -3416,7 +3463,7 @@ sealed class Compiler
((MethodWrapper)mh.Member).EmitCall(ilgen);
break;
case ClassFile.RefKind.invokeSpecial:
- ilgen.Emit(OpCodes.Callvirt, compiler.GetInvokeSpecialStub((MethodWrapper)mh.Member));
+ ilgen.Emit(OpCodes.Callvirt, compiler.context.GetInvokeSpecialStub((MethodWrapper)mh.Member));
break;
case ClassFile.RefKind.newInvokeSpecial:
((MethodWrapper)mh.Member).EmitNewobj(ilgen);
@@ -3430,6 +3477,56 @@ sealed class Compiler
}
}
+ private sealed class MethodTypeConstant
+ {
+ private FieldBuilder field;
+ private bool dynamic;
+
+ internal void Emit(Compiler compiler, CodeEmitter ilgen, int index)
+ {
+ if (field == null)
+ {
+ field = CreateField(compiler, index, ref dynamic);
+ }
+ if (dynamic)
+ {
+ ilgen.Emit(OpCodes.Ldsflda, field);
+ ilgen.Emit(OpCodes.Ldstr, compiler.classFile.GetConstantPoolConstantMethodType(index).Signature);
+ compiler.context.EmitCallerID(ilgen);
+ ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicLoadMethodType);
+ }
+ else
+ {
+ ilgen.Emit(OpCodes.Ldsfld, field);
+ }
+ }
+
+ private static FieldBuilder CreateField(Compiler compiler, int index, ref bool dynamic)
+ {
+ ClassFile.ConstantPoolItemMethodType cpi = compiler.classFile.GetConstantPoolConstantMethodType(index);
+ TypeWrapper[] args = cpi.GetArgTypes();
+ TypeWrapper ret = cpi.GetRetType();
+
+ if (HasUnloadable(args, ret))
+ {
+ dynamic = true;
+ return compiler.context.DefineDynamicMethodTypeCacheField();
+ }
+ else
+ {
+ TypeBuilder tb = compiler.context.DefineMethodTypeConstantType(index);
+ FieldBuilder field = tb.DefineField("value", CoreClasses.java.lang.invoke.MethodType.Wrapper.TypeAsSignatureType, FieldAttributes.Assembly | FieldAttributes.Static | FieldAttributes.InitOnly);
+ CodeEmitter ilgen = CodeEmitter.Create(ReflectUtil.DefineTypeInitializer(tb));
+ Type delegateType = MethodHandleUtil.CreateDelegateTypeForLoadConstant(args, ret);
+ ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.LoadMethodType.MakeGenericMethod(delegateType));
+ ilgen.Emit(OpCodes.Stsfld, field);
+ ilgen.Emit(OpCodes.Ret);
+ ilgen.DoEmit();
+ return field;
+ }
+ }
+ }
+
private bool RequiresExplicitClassInit(TypeWrapper tw, int index, InstructionFlags[] flags)
{
ClassFile.Method.Instruction[] code = m.Instructions;
@@ -3439,7 +3536,7 @@ sealed class Compiler
{
ClassFile.ConstantPoolItemMI cpi = classFile.GetMethodref(code[index].Arg1);
MethodWrapper mw = cpi.GetMethodForInvokespecial();
- return mw.Name != StringConstants.INIT || mw.DeclaringType != tw;
+ return !mw.IsConstructor || mw.DeclaringType != tw;
}
if ((flags[index] & InstructionFlags.BranchTarget) != 0
|| ByteCodeMetaData.IsBranch(code[index].NormalizedOpCode)
@@ -3451,46 +3548,10 @@ sealed class Compiler
return true;
}
- private MethodInfo GetInvokeSpecialStub(MethodWrapper method)
- {
- MethodKey key = new MethodKey(method.DeclaringType.Name, method.Name, method.Signature);
- MethodInfo mi;
- if(!invokespecialstubcache.TryGetValue(key, out mi))
- {
- DefineMethodHelper dmh = method.GetDefineMethodHelper();
- MethodBuilder stub = context.DefineInvokeSpecialStub(dmh);
- CodeEmitter ilgen = CodeEmitter.Create(stub);
- ilgen.Emit(OpCodes.Ldarg_0);
- for(int i = 1; i <= dmh.ParameterCount; i++)
- {
- ilgen.EmitLdarg(i);
- }
- method.EmitCall(ilgen);
- ilgen.Emit(OpCodes.Ret);
- ilgen.DoEmit();
- invokespecialstubcache[key] = stub;
- mi = stub;
- }
- return mi;
- }
-
// NOTE despite its name this also handles value type args
private void CastInterfaceArgs(TypeWrapper declaringType, TypeWrapper[] args, int instructionIndex, bool instanceMethod)
{
bool needsCast = false;
- bool dynamic;
- switch(m.Instructions[instructionIndex].NormalizedOpCode)
- {
- case NormalizedByteCode.__dynamic_invokeinterface:
- case NormalizedByteCode.__dynamic_invokestatic:
- case NormalizedByteCode.__dynamic_invokevirtual:
- dynamic = true;
- break;
- default:
- dynamic = false;
- break;
- }
-
int firstCastArg = -1;
if(!needsCast)
@@ -3570,13 +3631,24 @@ sealed class Compiler
dh.Store(i);
}
}
+ if(instanceMethod && args[0].IsUnloadable && !declaringType.IsUnloadable)
+ {
+ if(declaringType.IsInterface)
+ {
+ ilGenerator.EmitAssertType(declaringType.TypeAsTBD);
+ }
+ else
+ {
+ ilGenerator.Emit(OpCodes.Castclass, declaringType.TypeAsSignatureType);
+ }
+ }
for(int i = firstCastArg; i < args.Length; i++)
{
if(i != firstCastArg)
{
dh.Load(i);
}
- if(!args[i].IsUnloadable && args[i].IsGhost && !dynamic)
+ if(!args[i].IsUnloadable && args[i].IsGhost)
{
if(i == 0 && instanceMethod && !declaringType.IsInterface)
{
@@ -3603,7 +3675,7 @@ sealed class Compiler
}
else
{
- if(!args[i].IsUnloadable && !dynamic)
+ if(!args[i].IsUnloadable)
{
if(args[i].IsNonPrimitiveValueType)
{
@@ -3657,7 +3729,6 @@ sealed class Compiler
}
ilGenerator.Emit(OpCodes.Ldstr, cpi.Name);
ilGenerator.Emit(OpCodes.Ldstr, cpi.Signature);
- ilGenerator.Emit(OpCodes.Ldtoken, clazz.TypeAsTBD);
ilGenerator.Emit(OpCodes.Ldstr, wrapper.Name);
context.EmitCallerID(ilGenerator);
switch(bytecode)
@@ -3707,16 +3778,16 @@ sealed class Compiler
}
else
{
- typeWrapper.EmitCheckcast(null, ilgen);
+ typeWrapper.EmitCheckcast(ilgen);
}
}
private sealed class MethodHandleMethodWrapper : MethodWrapper
{
- private DynamicTypeWrapper.FinishContext context;
- private TypeWrapper wrapper;
- private ClassFile.ConstantPoolItemMI cpi;
- private bool exact;
+ private readonly DynamicTypeWrapper.FinishContext context;
+ private readonly TypeWrapper wrapper;
+ private readonly ClassFile.ConstantPoolItemMI cpi;
+ private readonly bool exact;
internal MethodHandleMethodWrapper(DynamicTypeWrapper.FinishContext context, TypeWrapper wrapper, ClassFile.ConstantPoolItemMI cpi, bool exact)
: base(wrapper, cpi.Name, cpi.Signature, null, cpi.GetRetType(), cpi.GetArgTypes(), Modifiers.Public, MemberFlags.None)
@@ -3787,69 +3858,98 @@ sealed class Compiler
}
}
- private sealed class DynamicMethodWrapper : MethodWrapper
+ private sealed class DynamicBinder
{
- private DynamicTypeWrapper.FinishContext context;
- private TypeWrapper wrapper;
- private ClassFile.ConstantPoolItemMI cpi;
+ private MethodWrapper mw;
- internal DynamicMethodWrapper(DynamicTypeWrapper.FinishContext context, TypeWrapper wrapper, ClassFile.ConstantPoolItemMI cpi)
- : base(wrapper, cpi.Name, cpi.Signature, null, cpi.GetRetType(), cpi.GetArgTypes(), Modifiers.Public, MemberFlags.None)
+ internal MethodWrapper Get(DynamicTypeWrapper.FinishContext context, ClassFile.RefKind kind, ClassFile.ConstantPoolItemMI cpi)
{
- this.context = context;
- this.wrapper = wrapper;
- this.cpi = cpi;
+ return mw ?? (mw = new DynamicBinderMethodWrapper(cpi, Emit(context, kind, cpi), kind));
}
- internal override void EmitCall(CodeEmitter ilgen)
+ private static MethodInfo Emit(DynamicTypeWrapper.FinishContext context, ClassFile.RefKind kind, ClassFile.ConstantPoolItemMI cpi)
{
- Emit(ByteCodeHelperMethods.DynamicInvokestatic, ilgen, cpi.GetRetType());
+ TypeWrapper ret;
+ TypeWrapper[] args;
+ if (kind == ClassFile.RefKind.invokeStatic)
+ {
+ ret = cpi.GetRetType();
+ args = cpi.GetArgTypes();
+ }
+ else if (kind == ClassFile.RefKind.newInvokeSpecial)
+ {
+ ret = cpi.GetClassType();
+ args = cpi.GetArgTypes();
+ }
+ else
+ {
+ ret = cpi.GetRetType();
+ args = new TypeWrapper[cpi.GetArgTypes().Length + 1];
+ Array.Copy(cpi.GetArgTypes(), 0, args, 1, args.Length - 1);
+ args[0] = cpi.GetClassType();
+ }
+ Type delegateType = MethodHandleUtil.CreateDelegateType(args, ret);
+ FieldBuilder fb = context.DefineMethodHandleInvokeCacheField(delegateType);
+ Type[] types = new Type[args.Length];
+ for (int i = 0; i < types.Length; i++)
+ {
+ types[i] = args[i].TypeAsSignatureType;
+ }
+ MethodBuilder mb = context.DefineMethodHandleDispatchStub(ret.TypeAsSignatureType, types);
+ CodeEmitter ilgen = CodeEmitter.Create(mb);
+ ilgen.Emit(OpCodes.Ldsfld, fb);
+ CodeEmitterLabel label = ilgen.DefineLabel();
+ ilgen.EmitBrtrue(label);
+ ilgen.EmitLdc_I4((int)kind);
+ ilgen.Emit(OpCodes.Ldstr, cpi.Class);
+ ilgen.Emit(OpCodes.Ldstr, cpi.Name);
+ ilgen.Emit(OpCodes.Ldstr, cpi.Signature);
+ context.EmitCallerID(ilgen);
+ ilgen.Emit(OpCodes.Call, ByteCodeHelperMethods.DynamicBinderMemberLookup.MakeGenericMethod(delegateType));
+ ilgen.Emit(OpCodes.Volatile);
+ ilgen.Emit(OpCodes.Stsfld, fb);
+ ilgen.MarkLabel(label);
+ ilgen.Emit(OpCodes.Ldsfld, fb);
+ for (int i = 0; i < args.Length; i++)
+ {
+ ilgen.EmitLdarg(i);
+ }
+ MethodHandleUtil.EmitCallDelegateInvokeMethod(ilgen, delegateType);
+ ilgen.Emit(OpCodes.Ret);
+ ilgen.DoEmit();
+ return mb;
}
- internal override void EmitCallvirt(CodeEmitter ilgen)
+ private sealed class DynamicBinderMethodWrapper : MethodWrapper
{
- Emit(ByteCodeHelperMethods.DynamicInvokevirtual, ilgen, cpi.GetRetType());
- }
+ private readonly MethodInfo method;
- internal override void EmitNewobj(CodeEmitter ilgen)
- {
- Emit(ByteCodeHelperMethods.DynamicInvokeSpecialNew, ilgen, cpi.GetClassType());
- }
+ internal DynamicBinderMethodWrapper(ClassFile.ConstantPoolItemMI cpi, MethodInfo method, ClassFile.RefKind kind)
+ : base(cpi.GetClassType(), cpi.Name, cpi.Signature, null, cpi.GetRetType(), cpi.GetArgTypes(), kind == ClassFile.RefKind.invokeStatic ? Modifiers.Public | Modifiers.Static : Modifiers.Public, MemberFlags.None)
+ {
+ this.method = method;
+ }
- private void Emit(MethodInfo helperMethod, CodeEmitter ilGenerator, TypeWrapper retTypeWrapper)
- {
- Profiler.Count("EmitDynamicInvokeEmitter");
- TypeWrapper[] args = cpi.GetArgTypes();
- CodeEmitterLocal argarray = ilGenerator.DeclareLocal(JVM.Import(typeof(object[])));
- CodeEmitterLocal val = ilGenerator.DeclareLocal(Types.Object);
- ilGenerator.EmitLdc_I4(args.Length);
- ilGenerator.Emit(OpCodes.Newarr, Types.Object);
- ilGenerator.Emit(OpCodes.Stloc, argarray);
- for(int i = args.Length - 1; i >= 0; i--)
- {
- if(args[i].IsPrimitive)
- {
- ilGenerator.Emit(OpCodes.Box, args[i].TypeAsTBD);
- }
- ilGenerator.Emit(OpCodes.Stloc, val);
- ilGenerator.Emit(OpCodes.Ldloc, argarray);
- ilGenerator.EmitLdc_I4(i);
- ilGenerator.Emit(OpCodes.Ldloc, val);
- ilGenerator.Emit(OpCodes.Stelem_Ref);
- }
- ilGenerator.Emit(OpCodes.Ldtoken, wrapper.TypeAsTBD);
- ilGenerator.Emit(OpCodes.Ldstr, cpi.Class);
- ilGenerator.Emit(OpCodes.Ldstr, cpi.Name);
- ilGenerator.Emit(OpCodes.Ldstr, cpi.Signature);
- ilGenerator.Emit(OpCodes.Ldloc, argarray);
- context.EmitCallerID(ilGenerator);
- ilGenerator.Emit(OpCodes.Call, helperMethod);
- EmitReturnTypeConversion(ilGenerator, retTypeWrapper);
+ internal override void EmitCall(CodeEmitter ilgen)
+ {
+ ilgen.Emit(OpCodes.Call, method);
+ }
+
+ internal override void EmitCallvirt(CodeEmitter ilgen)
+ {
+ ilgen.Emit(OpCodes.Call, method);
+ }
+
+ internal override void EmitNewobj(CodeEmitter ilgen)
+ {
+ ilgen.Emit(OpCodes.Call, method);
+ }
}
}
- private MethodWrapper GetMethodCallEmitter(ClassFile.ConstantPoolItemMI cpi, NormalizedByteCode invoke)
+ private MethodWrapper GetMethodCallEmitter(NormalizedByteCode invoke, int constantPoolIndex)
{
+ ClassFile.ConstantPoolItemMI cpi = classFile.GetMethodref(constantPoolIndex);
#if STATIC_COMPILER
if(replacedMethodWrappers != null)
{
@@ -3880,10 +3980,13 @@ sealed class Compiler
mw = cpi.GetMethod();
break;
case NormalizedByteCode.__dynamic_invokeinterface:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeInterface, cpi);
case NormalizedByteCode.__dynamic_invokestatic:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeStatic, cpi);
case NormalizedByteCode.__dynamic_invokevirtual:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeVirtual, cpi);
case NormalizedByteCode.__dynamic_invokespecial:
- return new DynamicMethodWrapper(context, clazz, cpi);
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.newInvokeSpecial, cpi);
case NormalizedByteCode.__methodhandle_invoke:
return new MethodHandleMethodWrapper(context, clazz, cpi, false);
case NormalizedByteCode.__methodhandle_invokeexact:
@@ -3893,7 +3996,19 @@ sealed class Compiler
}
if(mw.IsDynamicOnly)
{
- return new DynamicMethodWrapper(context, clazz, cpi);
+ switch (invoke)
+ {
+ case NormalizedByteCode.__invokespecial:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeSpecial, cpi);
+ case NormalizedByteCode.__invokeinterface:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeInterface, cpi);
+ case NormalizedByteCode.__invokestatic:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeStatic, cpi);
+ case NormalizedByteCode.__invokevirtual:
+ return context.GetValue<DynamicBinder>(constantPoolIndex).Get(context, ClassFile.RefKind.invokeVirtual, cpi);
+ default:
+ throw new InvalidOperationException();
+ }
}
return mw;
}
diff --git a/external/ikvm/runtime/openjdk.cs b/external/ikvm/runtime/openjdk.cs
index f1f781e..1cf58dd 100644
--- a/external/ikvm/runtime/openjdk.cs
+++ b/external/ikvm/runtime/openjdk.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007-2011 Jeroen Frijters
+ Copyright (C) 2007-2013 Jeroen Frijters
Copyright (C) 2009 Volker Berlin (i-net software)
This software is provided 'as-is', without any express or implied
@@ -89,7 +89,6 @@ using srFieldAccessor = sun.reflect.FieldAccessor;
using srLangReflectAccess = sun.reflect.LangReflectAccess;
using srReflection = sun.reflect.Reflection;
using srReflectionFactory = sun.reflect.ReflectionFactory;
-using StubGenerator = ikvm. at internal.stubgen.StubGenerator;
using Annotation = java.lang.annotation.Annotation;
using smJavaIOAccess = sun.misc.JavaIOAccess;
using smLauncher = sun.misc.Launcher;
@@ -865,6 +864,7 @@ namespace IKVM.NativeCode.java
TypeWrapper fieldType = fw.FieldTypeWrapper;
try
{
+ fieldType = fieldType.EnsureLoadable(tw.GetClassLoader());
fieldType.Finish();
}
catch (RetargetableJavaException x)
@@ -965,7 +965,7 @@ namespace IKVM.NativeCode.java
ilgenObjGetter.EmitLdc_I4(field.getOffset());
ilgenObjGetter.Emit(OpCodes.Ldloc, objGetterThis);
fw.EmitGet(ilgenObjGetter);
- fw.FieldTypeWrapper.EmitConvSignatureTypeToStackType(ilgenObjGetter);
+ fieldType.EmitConvSignatureTypeToStackType(ilgenObjGetter);
ilgenObjGetter.Emit(OpCodes.Stelem_Ref);
// Setter
@@ -973,8 +973,8 @@ namespace IKVM.NativeCode.java
ilgenObjSetter.Emit(OpCodes.Ldarg_1);
ilgenObjSetter.EmitLdc_I4(field.getOffset());
ilgenObjSetter.Emit(OpCodes.Ldelem_Ref);
- fw.FieldTypeWrapper.EmitCheckcast(null, ilgenObjSetter);
- fw.FieldTypeWrapper.EmitConvStackTypeToSignatureType(ilgenObjSetter, null);
+ fieldType.EmitCheckcast(ilgenObjSetter);
+ fieldType.EmitConvStackTypeToSignatureType(ilgenObjSetter, null);
fw.EmitSet(ilgenObjSetter);
}
}
@@ -2427,6 +2427,14 @@ namespace IKVM.NativeCode.java
ClassLoaderWrapper classLoaderWrapper = ClassLoaderWrapper.GetClassLoaderWrapper(loader);
tw = classLoaderWrapper.LoadClassByDottedName(name);
}
+ catch (ClassNotFoundException x)
+ {
+ throw new global::java.lang.ClassNotFoundException(x.Message);
+ }
+ catch (ClassLoadingException x)
+ {
+ throw x.InnerException;
+ }
catch (RetargetableJavaException x)
{
throw x.ToJava();
@@ -2529,18 +2537,18 @@ namespace IKVM.NativeCode.java
return TypeWrapper.FromClass(thisClass).SigName;
}
- public static object getClassLoader0(jlClass thisClass)
+ public static global::java.lang.ClassLoader getClassLoader0(jlClass thisClass)
{
return TypeWrapper.FromClass(thisClass).GetClassLoader().GetJavaClassLoader();
}
- public static object getSuperclass(jlClass thisClass)
+ public static jlClass getSuperclass(jlClass thisClass)
{
TypeWrapper super = TypeWrapper.FromClass(thisClass).BaseTypeWrapper;
return super != null ? super.ClassObject : null;
}
- public static object getInterfaces(jlClass thisClass)
+ public static jlClass[] getInterfaces(jlClass thisClass)
{
#if FIRST_PASS
return null;
@@ -2555,7 +2563,7 @@ namespace IKVM.NativeCode.java
#endif
}
- public static object getComponentType(jlClass thisClass)
+ public static jlClass getComponentType(jlClass thisClass)
{
TypeWrapper tw = TypeWrapper.FromClass(thisClass);
return tw.IsArray ? tw.ElementTypeWrapper.ClassObject : null;
@@ -2587,15 +2595,15 @@ namespace IKVM.NativeCode.java
public static object[] getEnclosingMethod0(jlClass thisClass)
{
- TypeWrapper tw = TypeWrapper.FromClass(thisClass);
- tw.Finish();
- string[] enc = tw.GetEnclosingMethod();
- if (enc == null)
- {
- return null;
- }
try
{
+ TypeWrapper tw = TypeWrapper.FromClass(thisClass);
+ tw.Finish();
+ string[] enc = tw.GetEnclosingMethod();
+ if (enc == null)
+ {
+ return null;
+ }
return new object[] { tw.GetClassLoader().LoadClassByDottedName(enc[0]).ClassObject, enc[1], enc[2] == null ? null : enc[2].Replace('.', '/') };
}
catch (RetargetableJavaException x)
@@ -2604,7 +2612,7 @@ namespace IKVM.NativeCode.java
}
}
- public static object getDeclaringClass(jlClass thisClass)
+ public static jlClass getDeclaringClass(jlClass thisClass)
{
try
{
@@ -2650,7 +2658,7 @@ namespace IKVM.NativeCode.java
AssemblyClassLoader acl = wrapper.GetClassLoader() as AssemblyClassLoader;
if (acl != null)
{
- pd = (ProtectionDomain)acl.GetProtectionDomain();
+ pd = acl.GetProtectionDomain();
}
}
return pd;
@@ -2664,7 +2672,7 @@ namespace IKVM.NativeCode.java
#endif
}
- public static object getPrimitiveClass(string name)
+ public static jlClass getPrimitiveClass(string name)
{
// note that this method isn't used anymore (because it is an intrinsic (during core class library compilation))
// it still remains for compat because it might be invoked through reflection by evil code
@@ -2700,7 +2708,7 @@ namespace IKVM.NativeCode.java
return tw.GetGenericSignature();
}
- internal static object AnnotationsToMap(object[] objAnn)
+ internal static object AnnotationsToMap(ClassLoaderWrapper loader, object[] objAnn)
{
#if FIRST_PASS
return null;
@@ -2715,6 +2723,11 @@ namespace IKVM.NativeCode.java
{
map.put(a.annotationType(), FreezeOrWrapAttribute(a));
}
+ else if (obj is IKVM.Attributes.DynamicAnnotationAttribute)
+ {
+ a = (Annotation)JVM.NewAnnotation(loader.GetJavaClassLoader(), ((IKVM.Attributes.DynamicAnnotationAttribute)obj).Definition);
+ map.put(a.annotationType(), a);
+ }
}
}
return map;
@@ -2753,7 +2766,7 @@ namespace IKVM.NativeCode.java
{
throw x.ToJava();
}
- return AnnotationsToMap(wrapper.GetDeclaredAnnotations());
+ return AnnotationsToMap(wrapper.GetClassLoader(), wrapper.GetDeclaredAnnotations());
#endif
}
@@ -2890,7 +2903,7 @@ namespace IKVM.NativeCode.java
#endif
}
- public static object getDeclaredClasses0(jlClass thisClass)
+ public static jlClass[] getDeclaredClasses0(jlClass thisClass)
{
#if FIRST_PASS
return null;
@@ -2932,12 +2945,30 @@ namespace IKVM.NativeCode.java
static class ClassLoader
{
- public static object defineClass0(jlClassLoader thisClassLoader, string name, byte[] b, int off, int len, object pd)
+ public static global::java.net.URL getBootstrapResource(string name)
+ {
+ foreach (global::java.net.URL url in ClassLoaderWrapper.GetBootstrapClassLoader().GetResources(name))
+ {
+ return url;
+ }
+ return null;
+ }
+
+ public static global::java.util.Enumeration getBootstrapResources(string name)
+ {
+#if FIRST_PASS
+ return null;
+#else
+ return new global::ikvm.runtime.EnumerationWrapper(ClassLoaderWrapper.GetBootstrapClassLoader().GetResources(name));
+#endif
+ }
+
+ public static jlClass defineClass0(jlClassLoader thisClassLoader, string name, byte[] b, int off, int len, ProtectionDomain pd)
{
return defineClass1(thisClassLoader, name, b, off, len, pd, null);
}
- public static object defineClass1(jlClassLoader thisClassLoader, string name, byte[] b, int off, int len, object pd, string source)
+ public static jlClass defineClass1(jlClassLoader thisClassLoader, string name, byte[] b, int off, int len, ProtectionDomain pd, string source)
{
// it appears the source argument is only used for trace messages in HotSpot. We'll just ignore it for now.
Profiler.Enter("ClassLoader.defineClass");
@@ -2976,7 +3007,7 @@ namespace IKVM.NativeCode.java
}
}
- public static object defineClass2(jlClassLoader thisClassLoader, string name, jnByteBuffer bb, int off, int len, ProtectionDomain pd, string source)
+ public static jlClass defineClass2(jlClassLoader thisClassLoader, string name, jnByteBuffer bb, int off, int len, ProtectionDomain pd, string source)
{
#if FIRST_PASS
return null;
@@ -2987,12 +3018,12 @@ namespace IKVM.NativeCode.java
#endif
}
- public static void resolveClass0(jlClassLoader thisClassLoader, object clazz)
+ public static void resolveClass0(jlClassLoader thisClassLoader, jlClass clazz)
{
// no-op
}
- public static object findBootstrapClass(jlClassLoader thisClassLoader, string name)
+ public static jlClass findBootstrapClass(jlClassLoader thisClassLoader, string name)
{
#if FIRST_PASS
return null;
@@ -3010,14 +3041,14 @@ namespace IKVM.NativeCode.java
#endif
}
- public static object findLoadedClass0(jlClassLoader thisClassLoader, string name)
+ public static jlClass findLoadedClass0(jlClassLoader thisClassLoader, string name)
{
if (name == null)
{
return null;
}
ClassLoaderWrapper loader = ClassLoaderWrapper.GetClassLoaderWrapper(thisClassLoader);
- TypeWrapper tw = loader.GetLoadedClass(name);
+ TypeWrapper tw = loader.FindLoadedClass(name);
return tw != null ? tw.ClassObject : null;
}
@@ -3139,6 +3170,15 @@ namespace IKVM.NativeCode.java
}
}
+ static class LangHelper
+ {
+ // NOTE the array may contain duplicates!
+ public static string[] getBootClassPackages()
+ {
+ return ClassLoaderWrapper.GetBootstrapClassLoader().GetPackages();
+ }
+ }
+
static class Package
{
public static string getSystemPackage0(string name)
@@ -3692,7 +3732,7 @@ namespace IKVM.NativeCode.java
public static object getDeclaredAnnotationsImpl(object thisField)
{
FieldWrapper fw = FieldWrapper.FromField(thisField);
- return Class.AnnotationsToMap(fw.DeclaringType.GetFieldAnnotations(fw));
+ return Class.AnnotationsToMap(fw.DeclaringType.GetClassLoader(), fw.DeclaringType.GetFieldAnnotations(fw));
}
}
@@ -3701,7 +3741,7 @@ namespace IKVM.NativeCode.java
public static object getDeclaredAnnotationsImpl(object methodOrConstructor)
{
MethodWrapper mw = MethodWrapper.FromMethodOrConstructor(methodOrConstructor);
- return Class.AnnotationsToMap(mw.DeclaringType.GetMethodAnnotations(mw));
+ return Class.AnnotationsToMap(mw.DeclaringType.GetClassLoader(), mw.DeclaringType.GetMethodAnnotations(mw));
}
public static object[][] getParameterAnnotationsImpl(object methodOrConstructor)
@@ -3726,6 +3766,10 @@ namespace IKVM.NativeCode.java
{
list.Add(Class.FreezeOrWrapAttribute(a));
}
+ else if (obj is IKVM.Attributes.DynamicAnnotationAttribute)
+ {
+ list.Add((Annotation)JVM.NewAnnotation(mw.DeclaringType.GetClassLoader().GetJavaClassLoader(), ((IKVM.Attributes.DynamicAnnotationAttribute)obj).Definition));
+ }
}
ann[i] = list.ToArray();
}
@@ -5265,6 +5309,48 @@ namespace IKVM.NativeCode.java
}
}
+ namespace zip
+ {
+ static class ClassStubZipEntry
+ {
+ public static void expandIkvmClasses(object _zipFile, object _entries)
+ {
+#if !FIRST_PASS
+ juzZipFile zipFile = (juzZipFile)_zipFile;
+ global::java.util.LinkedHashMap entries = (global::java.util.LinkedHashMap)_entries;
+
+ try
+ {
+ string path = zipFile.getName();
+ juzZipEntry entry = (juzZipEntry)entries.get(JVM.JarClassList);
+ if (entry != null && VirtualFileSystem.IsVirtualFS(path))
+ {
+ using (VirtualFileSystem.ZipEntryStream stream = new VirtualFileSystem.ZipEntryStream(zipFile, entry))
+ {
+ entries.remove(entry.name);
+ System.IO.BinaryReader br = new System.IO.BinaryReader(stream);
+ int count = br.ReadInt32();
+ for (int i = 0; i < count; i++)
+ {
+ global::java.util.zip.ClassStubZipEntry classEntry = new global::java.util.zip.ClassStubZipEntry(path, br.ReadString());
+ classEntry.setMethod(global::java.util.zip.ClassStubZipEntry.STORED);
+ classEntry.setTime(entry.getTime());
+ entries.put(classEntry.name, classEntry);
+ }
+ }
+ }
+ }
+ catch (global::java.io.IOException)
+ {
+ }
+ catch (System.IO.IOException)
+ {
+ }
+#endif
+ }
+ }
+ }
+
static class TimeZone
{
private static string GetCurrentTimeZoneID()
@@ -6163,7 +6249,7 @@ namespace IKVM.NativeCode.sun.reflect
static class ReflectionFactory
{
#if !FIRST_PASS
- private static object[] ConvertArgs(TypeWrapper[] argumentTypes, object[] args)
+ private static object[] ConvertArgs(ClassLoaderWrapper loader, TypeWrapper[] argumentTypes, object[] args)
{
object[] nargs = new object[args == null ? 0 : args.Length];
if (nargs.Length != argumentTypes.Length)
@@ -6189,7 +6275,7 @@ namespace IKVM.NativeCode.sun.reflect
}
else
{
- if (args[i] != null && !argumentTypes[i].IsInstance(args[i]))
+ if (args[i] != null && !argumentTypes[i].EnsureLoadable(loader).IsInstance(args[i]))
{
throw new jlIllegalArgumentException();
}
@@ -6219,7 +6305,7 @@ namespace IKVM.NativeCode.sun.reflect
}
throw new jlIllegalArgumentException("object is not an instance of declaring class");
}
- args = ConvertArgs(mw.GetParameters(), args);
+ args = ConvertArgs(mw.DeclaringType.GetClassLoader(), mw.GetParameters(), args);
// if the method is an interface method, we must explicitly run <clinit>,
// because .NET reflection doesn't
if (mw.DeclaringType.IsInterface)
@@ -6229,7 +6315,7 @@ namespace IKVM.NativeCode.sun.reflect
object retval;
try
{
- retval = ((ICustomInvoke)mw).Invoke(obj, args, callerID);
+ retval = ((ICustomInvoke)mw).Invoke(obj, args);
}
catch (MethodAccessException x)
{
@@ -6324,7 +6410,23 @@ namespace IKVM.NativeCode.sun.reflect
internal FastMethodAccessorImpl(jlrMethod method, bool nonvirtual)
{
MethodWrapper mw = MethodWrapper.FromMethodOrConstructor(method);
- mw.DeclaringType.Finish();
+ TypeWrapper[] parameters;
+ try
+ {
+ mw.DeclaringType.Finish();
+ parameters = mw.GetParameters();
+ for (int i = 0; i < parameters.Length; i++)
+ {
+ // the EnsureLoadable shouldn't fail, because we don't allow a java.lang.reflect.Method
+ // to "escape" if it has an unloadable type in the signature
+ parameters[i] = parameters[i].EnsureLoadable(mw.DeclaringType.GetClassLoader());
+ parameters[i].Finish();
+ }
+ }
+ catch (RetargetableJavaException x)
+ {
+ throw x.ToJava();
+ }
mw.ResolveMethod();
DynamicMethod dm = DynamicMethodUtils.Create("__<Invoker>", mw.DeclaringType.TypeAsBaseType, !mw.IsPublic || !mw.DeclaringType.IsPublic || nonvirtual, typeof(object), new Type[] { typeof(object), typeof(object[]), typeof(global::ikvm. at internal.CallerID) });
CodeEmitter ilgen = CodeEmitter.Create(dm);
@@ -6338,7 +6440,7 @@ namespace IKVM.NativeCode.sun.reflect
// check args length
CodeEmitterLabel argsLengthOK = ilgen.DefineLabel();
- if (mw.GetParameters().Length == 0)
+ if (parameters.Length == 0)
{
// zero length array may be null
ilgen.Emit(OpCodes.Ldarg_1);
@@ -6346,28 +6448,27 @@ namespace IKVM.NativeCode.sun.reflect
}
ilgen.Emit(OpCodes.Ldarg_1);
ilgen.Emit(OpCodes.Ldlen);
- ilgen.EmitLdc_I4(mw.GetParameters().Length);
+ ilgen.EmitLdc_I4(parameters.Length);
ilgen.EmitBeq(argsLengthOK);
ilgen.Emit(OpCodes.Newobj, illegalArgumentExceptionCtor);
ilgen.Emit(OpCodes.Throw);
ilgen.MarkLabel(argsLengthOK);
int thisCount = mw.IsStatic ? 0 : 1;
- CodeEmitterLocal[] args = new CodeEmitterLocal[mw.GetParameters().Length + thisCount];
+ CodeEmitterLocal[] args = new CodeEmitterLocal[parameters.Length + thisCount];
if (!mw.IsStatic)
{
args[0] = ilgen.DeclareLocal(mw.DeclaringType.TypeAsSignatureType);
}
for (int i = thisCount; i < args.Length; i++)
{
- mw.GetParameters()[i - thisCount].Finish();
- args[i] = ilgen.DeclareLocal(mw.GetParameters()[i - thisCount].TypeAsSignatureType);
+ args[i] = ilgen.DeclareLocal(parameters[i - thisCount].TypeAsSignatureType);
}
ilgen.BeginExceptionBlock();
if (!mw.IsStatic)
{
ilgen.Emit(OpCodes.Ldarg_0);
- mw.DeclaringType.EmitCheckcast(null, ilgen);
+ mw.DeclaringType.EmitCheckcast(ilgen);
mw.DeclaringType.EmitConvStackTypeToSignatureType(ilgen, null);
ilgen.Emit(OpCodes.Stloc, args[0]);
}
@@ -6376,7 +6477,7 @@ namespace IKVM.NativeCode.sun.reflect
ilgen.Emit(OpCodes.Ldarg_1);
ilgen.EmitLdc_I4(i - thisCount);
ilgen.Emit(OpCodes.Ldelem_Ref);
- TypeWrapper tw = mw.GetParameters()[i - thisCount];
+ TypeWrapper tw = parameters[i - thisCount];
EmitUnboxArg(ilgen, tw);
tw.EmitConvStackTypeToSignatureType(ilgen, null);
ilgen.Emit(OpCodes.Stloc, args[i]);
@@ -6602,7 +6703,7 @@ namespace IKVM.NativeCode.sun.reflect
}
else
{
- type.EmitCheckcast(null, ilgen);
+ type.EmitCheckcast(ilgen);
}
}
@@ -6661,31 +6762,6 @@ namespace IKVM.NativeCode.sun.reflect
}
}
- private sealed class ConstructorAccessorImpl : srConstructorAccessor
- {
- private readonly MethodWrapper mw;
-
- internal ConstructorAccessorImpl(jlrConstructor constructor)
- {
- mw = MethodWrapper.FromMethodOrConstructor(constructor);
- }
-
- [IKVM.Attributes.HideFromJava]
- public object newInstance(object[] args)
- {
- args = ConvertArgs(mw.GetParameters(), args);
- try
- {
- return ((ICustomInvoke)mw).Invoke(null, args, null);
- }
- catch (MethodAccessException x)
- {
- // this can happen if we're calling a non-public method and the call stack doesn't have ReflectionPermission.MemberAccess
- throw new jlIllegalAccessException().initCause(x);
- }
- }
- }
-
private sealed class FastConstructorAccessorImpl : srConstructorAccessor
{
private delegate object Invoker(object[] args);
@@ -6694,7 +6770,23 @@ namespace IKVM.NativeCode.sun.reflect
internal FastConstructorAccessorImpl(jlrConstructor constructor)
{
MethodWrapper mw = MethodWrapper.FromMethodOrConstructor(constructor);
- mw.DeclaringType.Finish();
+ TypeWrapper[] parameters;
+ try
+ {
+ mw.DeclaringType.Finish();
+ parameters = mw.GetParameters();
+ for (int i = 0; i < parameters.Length; i++)
+ {
+ // the EnsureLoadable shouldn't fail, because we don't allow a java.lang.reflect.Method
+ // to "escape" if it has an unloadable type in the signature
+ parameters[i] = parameters[i].EnsureLoadable(mw.DeclaringType.GetClassLoader());
+ parameters[i].Finish();
+ }
+ }
+ catch (RetargetableJavaException x)
+ {
+ throw x.ToJava();
+ }
mw.ResolveMethod();
DynamicMethod dm = DynamicMethodUtils.Create("__<Invoker>", mw.DeclaringType.TypeAsTBD, !mw.IsPublic || !mw.DeclaringType.IsPublic, typeof(object), new Type[] { typeof(object[]) });
CodeEmitter ilgen = CodeEmitter.Create(dm);
@@ -6702,7 +6794,7 @@ namespace IKVM.NativeCode.sun.reflect
// check args length
CodeEmitterLabel argsLengthOK = ilgen.DefineLabel();
- if (mw.GetParameters().Length == 0)
+ if (parameters.Length == 0)
{
// zero length array may be null
ilgen.Emit(OpCodes.Ldarg_0);
@@ -6710,17 +6802,16 @@ namespace IKVM.NativeCode.sun.reflect
}
ilgen.Emit(OpCodes.Ldarg_0);
ilgen.Emit(OpCodes.Ldlen);
- ilgen.EmitLdc_I4(mw.GetParameters().Length);
+ ilgen.EmitLdc_I4(parameters.Length);
ilgen.EmitBeq(argsLengthOK);
ilgen.Emit(OpCodes.Newobj, FastMethodAccessorImpl.illegalArgumentExceptionCtor);
ilgen.Emit(OpCodes.Throw);
ilgen.MarkLabel(argsLengthOK);
- CodeEmitterLocal[] args = new CodeEmitterLocal[mw.GetParameters().Length];
+ CodeEmitterLocal[] args = new CodeEmitterLocal[parameters.Length];
for (int i = 0; i < args.Length; i++)
{
- mw.GetParameters()[i].Finish();
- args[i] = ilgen.DeclareLocal(mw.GetParameters()[i].TypeAsSignatureType);
+ args[i] = ilgen.DeclareLocal(parameters[i].TypeAsSignatureType);
}
ilgen.BeginExceptionBlock();
for (int i = 0; i < args.Length; i++)
@@ -6728,7 +6819,7 @@ namespace IKVM.NativeCode.sun.reflect
ilgen.Emit(OpCodes.Ldarg_0);
ilgen.EmitLdc_I4(i);
ilgen.Emit(OpCodes.Ldelem_Ref);
- TypeWrapper tw = mw.GetParameters()[i];
+ TypeWrapper tw = parameters[i];
FastMethodAccessorImpl.EmitUnboxArg(ilgen, tw);
tw.EmitConvStackTypeToSignatureType(ilgen, null);
ilgen.Emit(OpCodes.Stloc, args[i]);
@@ -7080,7 +7171,8 @@ namespace IKVM.NativeCode.sun.reflect
private bool IsSpecialType(TypeWrapper tw)
{
- return tw.IsNonPrimitiveValueType
+ return tw.IsUnloadable
+ || tw.IsNonPrimitiveValueType
|| tw.IsGhost
|| tw.IsFakeNestedType;
}
@@ -7855,15 +7947,24 @@ namespace IKVM.NativeCode.sun.reflect
private Delegate GenerateFastGetter(Type delegateType, Type fieldType, FieldWrapper fw)
{
- fw.FieldTypeWrapper.Finish();
- fw.DeclaringType.Finish();
+ TypeWrapper fieldTypeWrapper;
+ try
+ {
+ fieldTypeWrapper = fw.FieldTypeWrapper.EnsureLoadable(fw.DeclaringType.GetClassLoader());
+ fieldTypeWrapper.Finish();
+ fw.DeclaringType.Finish();
+ }
+ catch (RetargetableJavaException x)
+ {
+ throw x.ToJava();
+ }
fw.ResolveField();
DynamicMethod dm = DynamicMethodUtils.Create("__<Getter>", fw.DeclaringType.TypeAsBaseType, !fw.IsPublic || !fw.DeclaringType.IsPublic, fieldType, new Type[] { typeof(IReflectionException), typeof(object), typeof(object) });
CodeEmitter ilgen = CodeEmitter.Create(dm);
if (fw.IsStatic)
{
fw.EmitGet(ilgen);
- fw.FieldTypeWrapper.EmitConvSignatureTypeToStackType(ilgen);
+ fieldTypeWrapper.EmitConvSignatureTypeToStackType(ilgen);
}
else
{
@@ -7871,7 +7972,7 @@ namespace IKVM.NativeCode.sun.reflect
ilgen.Emit(OpCodes.Ldarg_1);
ilgen.Emit(OpCodes.Castclass, fw.DeclaringType.TypeAsBaseType);
fw.EmitGet(ilgen);
- fw.FieldTypeWrapper.EmitConvSignatureTypeToStackType(ilgen);
+ fieldTypeWrapper.EmitConvSignatureTypeToStackType(ilgen);
CodeEmitterLocal local = ilgen.DeclareLocal(fieldType);
ilgen.Emit(OpCodes.Stloc, local);
CodeEmitterLabel label = ilgen.DefineLabel();
@@ -7892,8 +7993,17 @@ namespace IKVM.NativeCode.sun.reflect
private Delegate GenerateFastSetter(Type delegateType, Type fieldType, FieldWrapper fw)
{
- fw.FieldTypeWrapper.Finish();
- fw.DeclaringType.Finish();
+ TypeWrapper fieldTypeWrapper;
+ try
+ {
+ fieldTypeWrapper = fw.FieldTypeWrapper.EnsureLoadable(fw.DeclaringType.GetClassLoader());
+ fieldTypeWrapper.Finish();
+ fw.DeclaringType.Finish();
+ }
+ catch (RetargetableJavaException x)
+ {
+ throw x.ToJava();
+ }
fw.ResolveField();
DynamicMethod dm = DynamicMethodUtils.Create("__<Setter>", fw.DeclaringType.TypeAsBaseType, !fw.IsPublic || !fw.DeclaringType.IsPublic, null, new Type[] { typeof(IReflectionException), typeof(object), fieldType, typeof(object) });
CodeEmitter ilgen = CodeEmitter.Create(dm);
@@ -7903,8 +8013,8 @@ namespace IKVM.NativeCode.sun.reflect
{
ilgen.BeginExceptionBlock();
ilgen.Emit(OpCodes.Ldarg_2);
- fw.FieldTypeWrapper.EmitCheckcast(null, ilgen);
- fw.FieldTypeWrapper.EmitConvStackTypeToSignatureType(ilgen, null);
+ fieldTypeWrapper.EmitCheckcast(ilgen);
+ fieldTypeWrapper.EmitConvStackTypeToSignatureType(ilgen, null);
fw.EmitSet(ilgen);
CodeEmitterLabel label = ilgen.DefineLabel();
ilgen.EmitLeave(label);
@@ -7930,9 +8040,9 @@ namespace IKVM.NativeCode.sun.reflect
ilgen.Emit(OpCodes.Ldarg_2);
if (fieldType == typeof(object))
{
- fw.FieldTypeWrapper.EmitCheckcast(null, ilgen);
+ fieldTypeWrapper.EmitCheckcast(ilgen);
}
- fw.FieldTypeWrapper.EmitConvStackTypeToSignatureType(ilgen, null);
+ fieldTypeWrapper.EmitConvStackTypeToSignatureType(ilgen, null);
fw.EmitSet(ilgen);
CodeEmitterLabel label = ilgen.DefineLabel();
ilgen.EmitLeave(label);
@@ -8037,11 +8147,7 @@ namespace IKVM.NativeCode.sun.reflect
#else
jlrConstructor cons = (jlrConstructor)constructor;
MethodWrapper mw = MethodWrapper.FromMethodOrConstructor(constructor);
- if (mw is ICustomInvoke)
- {
- return new ConstructorAccessorImpl(cons);
- }
- else if (ActivatorConstructorAccessor.IsSuitable(mw))
+ if (ActivatorConstructorAccessor.IsSuitable(mw))
{
// we special case public default constructors, because in that case using Activator.CreateInstance()
// is almost as fast as FastConstructorAccessorImpl, but it saves us significantly in working set and
diff --git a/external/ikvm/runtime/openjdk/java.lang.invoke.cs b/external/ikvm/runtime/openjdk/java.lang.invoke.cs
index 29989d4..6cfef41 100644
--- a/external/ikvm/runtime/openjdk/java.lang.invoke.cs
+++ b/external/ikvm/runtime/openjdk/java.lang.invoke.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2011 Jeroen Frijters
+ Copyright (C) 2011-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -82,7 +82,6 @@ static class Java_java_lang_invoke_CallSite
static class Java_java_lang_invoke_DirectMethodHandle
{
- // TODO what is lookupClass for?
public static object createDelegate(MethodType type, MemberName m, bool doDispatch, jlClass lookupClass)
{
#if FIRST_PASS
@@ -118,6 +117,45 @@ static class Java_java_lang_invoke_DirectMethodHandle
TypeWrapper tw = (TypeWrapper)typeof(MemberName).GetField("vmtarget", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(m);
tw.Finish();
MethodWrapper mw = tw.GetMethods()[index];
+ if (mw.IsDynamicOnly)
+ {
+ MethodHandleUtil.DynamicMethodBuilder dm = new MethodHandleUtil.DynamicMethodBuilder("CustomInvoke:" + mw.Name, type, (ICustomInvoke)mw);
+ if (mw.IsStatic)
+ {
+ dm.LoadNull();
+ dm.BoxArgs(0);
+ }
+ else
+ {
+ dm.Ldarg(0);
+ dm.BoxArgs(1);
+ }
+ dm.Callvirt(typeof(ICustomInvoke).GetMethod("Invoke"));
+ dm.Convert(typeof(object), type.returnType(), 0);
+ dm.Ret();
+ return dm.CreateDelegate();
+ }
+ // HACK this code is duplicated in compiler.cs
+ if (mw.IsProtected && (mw.DeclaringType == CoreClasses.java.lang.Object.Wrapper || mw.DeclaringType == CoreClasses.java.lang.Throwable.Wrapper))
+ {
+ TypeWrapper thisType = TypeWrapper.FromClass(lookupClass);
+ TypeWrapper cli_System_Object = ClassLoaderWrapper.LoadClassCritical("cli.System.Object");
+ TypeWrapper cli_System_Exception = ClassLoaderWrapper.LoadClassCritical("cli.System.Exception");
+ // HACK we may need to redirect finalize or clone from java.lang.Object/Throwable
+ // to a more specific base type.
+ if (thisType.IsAssignableTo(cli_System_Object))
+ {
+ mw = cli_System_Object.GetMethodWrapper(mw.Name, mw.Signature, true);
+ }
+ else if (thisType.IsAssignableTo(cli_System_Exception))
+ {
+ mw = cli_System_Exception.GetMethodWrapper(mw.Name, mw.Signature, true);
+ }
+ else if (thisType.IsAssignableTo(CoreClasses.java.lang.Throwable.Wrapper))
+ {
+ mw = CoreClasses.java.lang.Throwable.Wrapper.GetMethodWrapper(mw.Name, mw.Signature, true);
+ }
+ }
mw.ResolveMethod();
MethodInfo mi = mw.GetMethod() as MethodInfo;
if (mi != null
@@ -378,6 +416,12 @@ static partial class MethodHandleUtil
ilgen.Emit(OpCodes.Ldarg_0);
}
+ internal DynamicMethodBuilder(string name, MethodType type, ICustomInvoke target)
+ : this(name, type, null, target, null, null)
+ {
+ ilgen.Emit(OpCodes.Ldarg_0);
+ }
+
internal DynamicMethodBuilder(string name, MethodType type, MethodHandle target, object value)
: this(name, type, typeof(Container<,>).MakeGenericType(target.vmtarget.GetType(), value.GetType()), target.vmtarget, value, null)
{
@@ -534,6 +578,26 @@ static partial class MethodHandleUtil
{
return new AdapterMethodHandle(type, CreateDelegate());
}
+
+ internal void BoxArgs(int start)
+ {
+ int paramCount = type.parameterCount();
+ ilgen.EmitLdc_I4(paramCount - start);
+ ilgen.Emit(OpCodes.Newarr, Types.Object);
+ for (int i = start; i < paramCount; i++)
+ {
+ ilgen.Emit(OpCodes.Dup);
+ ilgen.EmitLdc_I4(i - start);
+ Ldarg(i);
+ Convert(type.parameterType(i), typeof(object), 0);
+ ilgen.Emit(OpCodes.Stelem_Ref);
+ }
+ }
+
+ internal void LoadNull()
+ {
+ ilgen.Emit(OpCodes.Ldnull);
+ }
}
#if DEBUG
@@ -735,7 +799,7 @@ static partial class MethodHandleUtil
}
else
{
- dst.EmitCheckcast(null, ilgen);
+ dst.EmitCheckcast(ilgen);
}
}
}
diff --git a/external/ikvm/runtime/runtime.build b/external/ikvm/runtime/runtime.build
index 1bd0b6a..96e1bb2 100644
--- a/external/ikvm/runtime/runtime.build
+++ b/external/ikvm/runtime/runtime.build
@@ -73,7 +73,7 @@
</target>
<target name="IKVM.Runtime.JNI" depends="JniAssemblyInfo.cs defs">
- <csc noconfig="true" target="library" output="IKVM.Runtime.JNI.dll" define="${defs}" optimize="true" unsafe="true" rebuild="true">
+ <csc noconfig="true" target="library" output="IKVM.Runtime.JNI.dll" define="${defs}" optimize="true" unsafe="true" rebuild="true" nostdlib="true">
<arg unless="${string::starts-with(framework::get-target-framework(), 'mono')}" value="/baseaddress:0x55300000" />
<sources>
<include name="../CommonAssemblyInfo.cs" />
@@ -83,7 +83,8 @@
<references>
<include name="../bin/IKVM.OpenJDK.Core.dll" asis="true" />
<include name="../bin/IKVM.Runtime.dll" asis="true" />
- <include name="${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
</references>
</csc>
<copy file="IKVM.Runtime.JNI.dll" todir="../bin" />
@@ -96,7 +97,7 @@
<fail message="../openjdk/vfs.zip is missing. Make sure to build ikvm/openjdk first." />
</if>
</if>
- <csc noconfig="true" target="library" output="IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="false" rebuild="true">
+ <csc noconfig="true" target="library" output="IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="false" rebuild="true" nostdlib="true">
<arg unless="${string::starts-with(framework::get-target-framework(), 'mono')}" value="/baseaddress:0x55000000" />
<nowarn>
<warning number="169" if="${first-pass}" />
@@ -154,6 +155,9 @@
<include name="openjdk/sun.management.cs" />
<include name="openjdk/sun.nio.ch.cs" />
<include name="openjdk/sun.security.krb5.cs" />
+ <include name="stubgen/ClassFileWriter.cs" />
+ <include name="stubgen/SerialVersionUID.cs" />
+ <include name="stubgen/StubGenerator.cs" />
</sources>
<resources>
<include if="${not first-pass}" name="../openjdk/vfs.zip" />
@@ -165,8 +169,9 @@
<include if="${not first-pass}" name="../bin/IKVM.OpenJDK.Util.dll" asis="true" />
<include if="${not first-pass}" name="../bin/IKVM.OpenJDK.Management.dll" asis="true" />
<include if="${not first-pass}" name="../bin/IKVM.OpenJDK.Misc.dll" asis="true" />
- <include name="${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" />
- <include name="${framework::get-assembly-directory(framework::get-target-framework())}/System.Configuration.dll" />
+ <include name="${ReferencePath}/mscorlib.dll" />
+ <include name="${ReferencePath}/System.dll" />
+ <include name="${ReferencePath}/System.Configuration.dll" />
</references>
</csc>
<copy file="IKVM.Runtime.dll" todir="../bin" />
diff --git a/external/ikvm/runtime/stubgen/ClassFileWriter.cs b/external/ikvm/runtime/stubgen/ClassFileWriter.cs
new file mode 100644
index 0000000..327591c
--- /dev/null
+++ b/external/ikvm/runtime/stubgen/ClassFileWriter.cs
@@ -0,0 +1,1048 @@
+/*
+ Copyright (C) 2002-2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+using System;
+using System.IO;
+using System.Collections.Generic;
+using IKVM.Attributes;
+
+namespace IKVM.StubGen
+{
+ sealed class BigEndianStream
+ {
+ private Stream stream;
+
+ public BigEndianStream(Stream stream)
+ {
+ this.stream = stream;
+ }
+
+ public void WriteUInt16(ushort s)
+ {
+ stream.WriteByte((byte)(s >> 8));
+ stream.WriteByte((byte)s);
+ }
+
+ public void WriteUInt32(uint u)
+ {
+ stream.WriteByte((byte)(u >> 24));
+ stream.WriteByte((byte)(u >> 16));
+ stream.WriteByte((byte)(u >> 8));
+ stream.WriteByte((byte)u);
+ }
+
+ public void WriteInt64(long l)
+ {
+ WriteUInt32((uint)(l >> 32));
+ WriteUInt32((uint)l);
+ }
+
+ public void WriteFloat(float f)
+ {
+ WriteUInt32(BitConverter.ToUInt32(BitConverter.GetBytes(f), 0));
+ }
+
+ public void WriteDouble(double d)
+ {
+ WriteInt64(BitConverter.ToInt64(BitConverter.GetBytes(d), 0));
+ }
+
+ public void WriteByte(byte b)
+ {
+ stream.WriteByte(b);
+ }
+
+ public void WriteUtf8(string str)
+ {
+ byte[] buf = new byte[str.Length * 3 + 1];
+ int j = 0;
+ for (int i = 0, e = str.Length; i < e; i++)
+ {
+ char ch = str[i];
+ if ((ch != 0) && (ch <= 0x7f))
+ {
+ buf[j++] = (byte)ch;
+ }
+ else if (ch <= 0x7FF)
+ {
+ /* 11 bits or less. */
+ byte high_five = (byte)(ch >> 6);
+ byte low_six = (byte)(ch & 0x3F);
+ buf[j++] = (byte)(high_five | 0xC0); /* 110xxxxx */
+ buf[j++] = (byte)(low_six | 0x80); /* 10xxxxxx */
+ }
+ else
+ {
+ /* possibly full 16 bits. */
+ byte high_four = (byte)(ch >> 12);
+ byte mid_six = (byte)((ch >> 6) & 0x3F);
+ byte low_six = (byte)(ch & 0x3f);
+ buf[j++] = (byte)(high_four | 0xE0); /* 1110xxxx */
+ buf[j++] = (byte)(mid_six | 0x80); /* 10xxxxxx */
+ buf[j++] = (byte)(low_six | 0x80); /* 10xxxxxx*/
+ }
+ }
+ WriteUInt16((ushort)j);
+ stream.Write(buf, 0, j);
+ }
+ }
+
+ enum Constant
+ {
+ Utf8 = 1,
+ Integer = 3,
+ Float = 4,
+ Long = 5,
+ Double = 6,
+ Class = 7,
+ String = 8,
+ Fieldref = 9,
+ Methodref = 10,
+ InterfaceMethodref = 11,
+ NameAndType = 12
+ }
+
+ abstract class ConstantPoolItem
+ {
+ public abstract void Write(BigEndianStream bes);
+ }
+
+ sealed class ConstantPoolItemClass : ConstantPoolItem
+ {
+ private ushort name_index;
+
+ public ConstantPoolItemClass(ushort name_index)
+ {
+ this.name_index = name_index;
+ }
+
+ public override int GetHashCode()
+ {
+ return name_index;
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemClass))
+ {
+ return ((ConstantPoolItemClass)o).name_index == name_index;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Class);
+ bes.WriteUInt16(name_index);
+ }
+ }
+
+ sealed class ConstantPoolItemMethodref : ConstantPoolItem
+ {
+ private ushort class_index;
+ private ushort name_and_type_index;
+
+ public ConstantPoolItemMethodref(ushort class_index, ushort name_and_type_index)
+ {
+ this.class_index = class_index;
+ this.name_and_type_index = name_and_type_index;
+ }
+
+ public override int GetHashCode()
+ {
+ return class_index | (name_and_type_index << 16);
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemMethodref))
+ {
+ ConstantPoolItemMethodref m = (ConstantPoolItemMethodref)o;
+ return m.class_index == class_index && m.name_and_type_index == name_and_type_index;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Methodref);
+ bes.WriteUInt16(class_index);
+ bes.WriteUInt16(name_and_type_index);
+ }
+ }
+
+ sealed class ConstantPoolItemNameAndType : ConstantPoolItem
+ {
+ private ushort name_index;
+ private ushort descriptor_index;
+
+ public ConstantPoolItemNameAndType(ushort name_index, ushort descriptor_index)
+ {
+ this.name_index = name_index;
+ this.descriptor_index = descriptor_index;
+ }
+
+ public override int GetHashCode()
+ {
+ return name_index | (descriptor_index << 16);
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemNameAndType))
+ {
+ ConstantPoolItemNameAndType n = (ConstantPoolItemNameAndType)o;
+ return n.name_index == name_index && n.descriptor_index == descriptor_index;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.NameAndType);
+ bes.WriteUInt16(name_index);
+ bes.WriteUInt16(descriptor_index);
+ }
+ }
+
+ sealed class ConstantPoolItemUtf8 : ConstantPoolItem
+ {
+ private string str;
+
+ public ConstantPoolItemUtf8(string str)
+ {
+ this.str = str;
+ }
+
+ public override int GetHashCode()
+ {
+ return str.GetHashCode();
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemUtf8))
+ {
+ return ((ConstantPoolItemUtf8)o).str == str;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Utf8);
+ bes.WriteUtf8(str);
+ }
+ }
+
+ sealed class ConstantPoolItemInt : ConstantPoolItem
+ {
+ private int v;
+
+ public ConstantPoolItemInt(int v)
+ {
+ this.v = v;
+ }
+
+ public override int GetHashCode()
+ {
+ return v;
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemInt))
+ {
+ return ((ConstantPoolItemInt)o).v == v;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Integer);
+ bes.WriteUInt32((uint)v);
+ }
+ }
+
+ sealed class ConstantPoolItemLong : ConstantPoolItem
+ {
+ private long v;
+
+ public ConstantPoolItemLong(long v)
+ {
+ this.v = v;
+ }
+
+ public override int GetHashCode()
+ {
+ return (int)v;
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemLong))
+ {
+ return ((ConstantPoolItemLong)o).v == v;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Long);
+ bes.WriteInt64(v);
+ }
+ }
+
+ sealed class ConstantPoolItemFloat : ConstantPoolItem
+ {
+ private float v;
+
+ public ConstantPoolItemFloat(float v)
+ {
+ this.v = v;
+ }
+
+ public override int GetHashCode()
+ {
+ return BitConverter.ToInt32(BitConverter.GetBytes(v), 0);
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemFloat))
+ {
+ return ((ConstantPoolItemFloat)o).v == v;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Float);
+ bes.WriteFloat(v);
+ }
+ }
+
+ sealed class ConstantPoolItemDouble : ConstantPoolItem
+ {
+ private double v;
+
+ public ConstantPoolItemDouble(double v)
+ {
+ this.v = v;
+ }
+
+ public override int GetHashCode()
+ {
+ long l = BitConverter.DoubleToInt64Bits(v);
+ return ((int)l) ^ ((int)(l >> 32));
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemDouble))
+ {
+ return ((ConstantPoolItemDouble)o).v == v;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.Double);
+ bes.WriteDouble(v);
+ }
+ }
+
+ sealed class ConstantPoolItemString : ConstantPoolItem
+ {
+ private ushort string_index;
+
+ public ConstantPoolItemString(ushort string_index)
+ {
+ this.string_index = string_index;
+ }
+
+ public override int GetHashCode()
+ {
+ return string_index;
+ }
+
+ public override bool Equals(object o)
+ {
+ if (o != null && o.GetType() == typeof(ConstantPoolItemString))
+ {
+ return ((ConstantPoolItemString)o).string_index == string_index;
+ }
+ return false;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ bes.WriteByte((byte)Constant.String);
+ bes.WriteUInt16(string_index);
+ }
+ }
+
+ abstract class ClassFileAttribute
+ {
+ private ushort name_index;
+
+ public ClassFileAttribute(ushort name_index)
+ {
+ this.name_index = name_index;
+ }
+
+ public virtual void Write(BigEndianStream bes)
+ {
+ bes.WriteUInt16(name_index);
+ }
+ }
+
+ sealed class DeprecatedAttribute : ClassFileAttribute
+ {
+ internal DeprecatedAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("Deprecated"))
+ {
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32(0);
+ }
+ }
+
+ sealed class ConstantValueAttribute : ClassFileAttribute
+ {
+ private ushort constant_index;
+
+ public ConstantValueAttribute(ushort name_index, ushort constant_index)
+ : base(name_index)
+ {
+ this.constant_index = constant_index;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32(2);
+ bes.WriteUInt16(constant_index);
+ }
+ }
+
+ sealed class StringAttribute : ClassFileAttribute
+ {
+ private ushort string_index;
+
+ public StringAttribute(ushort name_index, ushort string_index)
+ : base(name_index)
+ {
+ this.string_index = string_index;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32(2);
+ bes.WriteUInt16(string_index);
+ }
+ }
+
+ sealed class InnerClassesAttribute : ClassFileAttribute
+ {
+ private ClassFileWriter classFile;
+ private List<Item> classes = new List<Item>();
+
+ public InnerClassesAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("InnerClasses"))
+ {
+ this.classFile = classFile;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32((uint)(2 + 8 * classes.Count));
+ bes.WriteUInt16((ushort)classes.Count);
+ foreach (Item i in classes)
+ {
+ bes.WriteUInt16(i.inner_class_info_index);
+ bes.WriteUInt16(i.outer_class_info_index);
+ bes.WriteUInt16(i.inner_name_index);
+ bes.WriteUInt16(i.inner_class_access_flags);
+ }
+ }
+
+ private class Item
+ {
+ internal ushort inner_class_info_index;
+ internal ushort outer_class_info_index;
+ internal ushort inner_name_index;
+ internal ushort inner_class_access_flags;
+ }
+
+ public void Add(string inner, string outer, string name, ushort access)
+ {
+ Item i = new Item();
+ i.inner_class_info_index = classFile.AddClass(inner);
+ i.outer_class_info_index = classFile.AddClass(outer);
+ if (name != null)
+ {
+ i.inner_name_index = classFile.AddUtf8(name);
+ }
+ i.inner_class_access_flags = access;
+ classes.Add(i);
+ }
+ }
+
+ sealed class ExceptionsAttribute : ClassFileAttribute
+ {
+ private ClassFileWriter classFile;
+ private List<ushort> classes = new List<ushort>();
+
+ internal ExceptionsAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("Exceptions"))
+ {
+ this.classFile = classFile;
+ }
+
+ internal void Add(string exceptionClass)
+ {
+ classes.Add(classFile.AddClass(exceptionClass));
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32((uint)(2 + 2 * classes.Count));
+ bes.WriteUInt16((ushort)classes.Count);
+ foreach (ushort idx in classes)
+ {
+ bes.WriteUInt16(idx);
+ }
+ }
+ }
+
+ sealed class RuntimeVisibleAnnotationsAttribute : ClassFileAttribute
+ {
+ private ClassFileWriter classFile;
+ private MemoryStream mem;
+ private BigEndianStream bes;
+ private ushort count;
+
+ internal RuntimeVisibleAnnotationsAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("RuntimeVisibleAnnotations"))
+ {
+ this.classFile = classFile;
+ mem = new MemoryStream();
+ bes = new BigEndianStream(mem);
+ }
+
+ internal void Add(object[] annot)
+ {
+ count++;
+ bes.WriteUInt16(classFile.AddUtf8((string)annot[1]));
+ bes.WriteUInt16((ushort)((annot.Length - 2) / 2));
+ for (int i = 2; i < annot.Length; i += 2)
+ {
+ bes.WriteUInt16(classFile.AddUtf8((string)annot[i]));
+ WriteElementValue(bes, annot[i + 1]);
+ }
+ }
+
+ private static string DecodeTypeName(string typeName)
+ {
+#if !FIRST_PASS && !STUB_GENERATOR
+ int index = typeName.IndexOf(',');
+ if (index > 0)
+ {
+ // HACK if we have an assembly qualified type name we have to resolve it to a Java class name
+ // (at the very least we should use the right class loader here)
+ try
+ {
+ typeName = "L" + java.lang.Class.forName(typeName.Substring(1, typeName.Length - 2).Replace('/', '.')).getName().Replace('.', '/') + ";";
+ }
+ catch { }
+ }
+#endif
+ return typeName;
+ }
+
+ private void WriteElementValue(BigEndianStream bes, object val)
+ {
+ if (val is object[])
+ {
+ object[] arr = (object[])val;
+ if (AnnotationDefaultAttribute.TAG_ENUM.Equals(arr[0]))
+ {
+ bes.WriteByte(AnnotationDefaultAttribute.TAG_ENUM);
+ bes.WriteUInt16(classFile.AddUtf8(DecodeTypeName((string)arr[1])));
+ bes.WriteUInt16(classFile.AddUtf8((string)arr[2]));
+ }
+ else if (AnnotationDefaultAttribute.TAG_ARRAY.Equals(arr[0]))
+ {
+ bes.WriteByte(AnnotationDefaultAttribute.TAG_ARRAY);
+ bes.WriteUInt16((ushort)(arr.Length - 1));
+ for (int i = 1; i < arr.Length; i++)
+ {
+ WriteElementValue(bes, arr[i]);
+ }
+ }
+ else if (AnnotationDefaultAttribute.TAG_CLASS.Equals(arr[0]))
+ {
+ bes.WriteByte(AnnotationDefaultAttribute.TAG_CLASS);
+ bes.WriteUInt16(classFile.AddUtf8(DecodeTypeName((string)arr[1])));
+ }
+ else if (AnnotationDefaultAttribute.TAG_ANNOTATION.Equals(arr[0]))
+ {
+ bes.WriteByte(AnnotationDefaultAttribute.TAG_ANNOTATION);
+ bes.WriteUInt16(classFile.AddUtf8(DecodeTypeName((string)arr[1])));
+ bes.WriteUInt16((ushort)((arr.Length - 2) / 2));
+ for (int i = 2; i < arr.Length; i += 2)
+ {
+ bes.WriteUInt16(classFile.AddUtf8((string)arr[i]));
+ WriteElementValue(bes, arr[i + 1]);
+ }
+ }
+ }
+ else if (val is bool)
+ {
+ bes.WriteByte((byte)'Z');
+ bes.WriteUInt16(classFile.AddInt((bool)val ? 1 : 0));
+ }
+ else if (val is byte)
+ {
+ bes.WriteByte((byte)'B');
+ bes.WriteUInt16(classFile.AddInt((byte)val));
+ }
+ else if (val is char)
+ {
+ bes.WriteByte((byte)'C');
+ bes.WriteUInt16(classFile.AddInt((char)val));
+ }
+ else if (val is short)
+ {
+ bes.WriteByte((byte)'S');
+ bes.WriteUInt16(classFile.AddInt((short)val));
+ }
+ else if (val is int)
+ {
+ bes.WriteByte((byte)'I');
+ bes.WriteUInt16(classFile.AddInt((int)val));
+ }
+ else if (val is long)
+ {
+ bes.WriteByte((byte)'J');
+ bes.WriteUInt16(classFile.AddLong((long)val));
+ }
+ else if (val is float)
+ {
+ bes.WriteByte((byte)'F');
+ bes.WriteUInt16(classFile.AddFloat((float)val));
+ }
+ else if (val is double)
+ {
+ bes.WriteByte((byte)'D');
+ bes.WriteUInt16(classFile.AddDouble((double)val));
+ }
+ else if (val is string)
+ {
+ bes.WriteByte((byte)'s');
+ bes.WriteUInt16(classFile.AddUtf8((string)val));
+ }
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32(Length);
+ WriteImpl(bes);
+ }
+
+ internal void WriteImpl(BigEndianStream bes)
+ {
+ bes.WriteUInt16(count);
+ foreach (byte b in mem.ToArray())
+ {
+ bes.WriteByte(b);
+ }
+ }
+
+ internal uint Length
+ {
+ get { return (uint)mem.Length + 2; }
+ }
+ }
+
+ sealed class RuntimeVisibleParameterAnnotationsAttribute : ClassFileAttribute
+ {
+ private readonly List<RuntimeVisibleAnnotationsAttribute> parameters = new List<RuntimeVisibleAnnotationsAttribute>();
+
+ internal RuntimeVisibleParameterAnnotationsAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("RuntimeVisibleParameterAnnotations"))
+ {
+ }
+
+ internal void Add(RuntimeVisibleAnnotationsAttribute parameter)
+ {
+ parameters.Add(parameter);
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ uint length = 1;
+ foreach (RuntimeVisibleAnnotationsAttribute attr in parameters)
+ {
+ length += attr.Length;
+ }
+ bes.WriteUInt32(length);
+ bes.WriteByte((byte)parameters.Count);
+ foreach (RuntimeVisibleAnnotationsAttribute attr in parameters)
+ {
+ attr.WriteImpl(bes);
+ }
+ }
+ }
+
+ sealed class AnnotationDefaultClassFileAttribute : ClassFileAttribute
+ {
+ private ClassFileWriter classFile;
+ private byte[] buf;
+
+ internal AnnotationDefaultClassFileAttribute(ClassFileWriter classFile, byte[] buf)
+ : base(classFile.AddUtf8("AnnotationDefault"))
+ {
+ this.classFile = classFile;
+ this.buf = buf;
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32((uint)(buf.Length));
+ foreach (byte b in buf)
+ {
+ bes.WriteByte(b);
+ }
+ }
+ }
+
+ sealed class FieldOrMethod : IAttributeOwner
+ {
+ private Modifiers access_flags;
+ private ushort name_index;
+ private ushort descriptor_index;
+ private List<ClassFileAttribute> attribs = new List<ClassFileAttribute>();
+
+ public FieldOrMethod(Modifiers access_flags, ushort name_index, ushort descriptor_index)
+ {
+ this.access_flags = access_flags;
+ this.name_index = name_index;
+ this.descriptor_index = descriptor_index;
+ }
+
+ public void AddAttribute(ClassFileAttribute attrib)
+ {
+ attribs.Add(attrib);
+ }
+
+ public void Write(BigEndianStream bes)
+ {
+ bes.WriteUInt16((ushort)access_flags);
+ bes.WriteUInt16(name_index);
+ bes.WriteUInt16(descriptor_index);
+ bes.WriteUInt16((ushort)attribs.Count);
+ for (int i = 0; i < attribs.Count; i++)
+ {
+ attribs[i].Write(bes);
+ }
+ }
+ }
+
+ sealed class CodeAttribute : ClassFileAttribute
+ {
+ private ClassFileWriter classFile;
+ private ushort max_stack;
+ private ushort max_locals;
+ private byte[] code;
+
+ public CodeAttribute(ClassFileWriter classFile)
+ : base(classFile.AddUtf8("Code"))
+ {
+ this.classFile = classFile;
+ }
+
+ public ushort MaxStack
+ {
+ get { return max_stack; }
+ set { max_stack = value; }
+ }
+
+ public ushort MaxLocals
+ {
+ get { return max_locals; }
+ set { max_locals = value; }
+ }
+
+ public byte[] ByteCode
+ {
+ get { return code; }
+ set { code = value; }
+ }
+
+ public override void Write(BigEndianStream bes)
+ {
+ base.Write(bes);
+ bes.WriteUInt32((uint)(2 + 2 + 4 + code.Length + 2 + 2));
+ bes.WriteUInt16(max_stack);
+ bes.WriteUInt16(max_locals);
+ bes.WriteUInt32((uint)code.Length);
+ for (int i = 0; i < code.Length; i++)
+ {
+ bes.WriteByte(code[i]);
+ }
+ bes.WriteUInt16(0); // no exceptions
+ bes.WriteUInt16(0); // no attributes
+ }
+ }
+
+ interface IAttributeOwner
+ {
+ void AddAttribute(ClassFileAttribute attrib);
+ }
+
+ sealed class ClassFileWriter : IAttributeOwner
+ {
+ private List<ConstantPoolItem> cplist = new List<ConstantPoolItem>();
+ private Dictionary<ConstantPoolItem, ushort> cphashtable = new Dictionary<ConstantPoolItem, ushort>();
+ private List<FieldOrMethod> fields = new List<FieldOrMethod>();
+ private List<FieldOrMethod> methods = new List<FieldOrMethod>();
+ private List<ClassFileAttribute> attribs = new List<ClassFileAttribute>();
+ private List<ushort> interfaces = new List<ushort>();
+ private Modifiers access_flags;
+ private ushort this_class;
+ private ushort super_class;
+ private ushort minorVersion;
+ private ushort majorVersion;
+
+ public ClassFileWriter(Modifiers mods, string name, string super, ushort minorVersion, ushort majorVersion)
+ {
+ cplist.Add(null);
+ access_flags = mods;
+ this_class = AddClass(name);
+ if (super != null)
+ {
+ super_class = AddClass(super);
+ }
+ this.minorVersion = minorVersion;
+ this.majorVersion = majorVersion;
+ }
+
+ private ushort Add(ConstantPoolItem cpi)
+ {
+ ushort index;
+ if (!cphashtable.TryGetValue(cpi, out index))
+ {
+ index = (ushort)cplist.Count;
+ cplist.Add(cpi);
+ if (cpi is ConstantPoolItemDouble || cpi is ConstantPoolItemLong)
+ {
+ cplist.Add(null);
+ }
+ cphashtable.Add(cpi, index);
+ }
+ return index;
+ }
+
+ public ushort AddUtf8(string str)
+ {
+ return Add(new ConstantPoolItemUtf8(str));
+ }
+
+ public ushort AddClass(string classname)
+ {
+ return Add(new ConstantPoolItemClass(AddUtf8(classname)));
+ }
+
+ public ushort AddMethodRef(string classname, string methodname, string signature)
+ {
+ return Add(new ConstantPoolItemMethodref(AddClass(classname), AddNameAndType(methodname, signature)));
+ }
+
+ public ushort AddNameAndType(string name, string type)
+ {
+ return Add(new ConstantPoolItemNameAndType(AddUtf8(name), AddUtf8(type)));
+ }
+
+ public ushort AddInt(int i)
+ {
+ return Add(new ConstantPoolItemInt(i));
+ }
+
+ public ushort AddLong(long l)
+ {
+ return Add(new ConstantPoolItemLong(l));
+ }
+
+ public ushort AddFloat(float f)
+ {
+ return Add(new ConstantPoolItemFloat(f));
+ }
+
+ public ushort AddDouble(double d)
+ {
+ return Add(new ConstantPoolItemDouble(d));
+ }
+
+ public ushort AddString(string s)
+ {
+ return Add(new ConstantPoolItemString(AddUtf8(s)));
+ }
+
+ public void AddInterface(string name)
+ {
+ interfaces.Add(AddClass(name));
+ }
+
+ public FieldOrMethod AddMethod(Modifiers access, string name, string signature)
+ {
+ FieldOrMethod method = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
+ methods.Add(method);
+ return method;
+ }
+
+ public FieldOrMethod AddField(Modifiers access, string name, string signature, object constantValue)
+ {
+ FieldOrMethod field = new FieldOrMethod(access, AddUtf8(name), AddUtf8(signature));
+ if (constantValue != null)
+ {
+ ushort constantValueIndex;
+ if (constantValue is byte)
+ {
+ constantValueIndex = AddInt((sbyte)(byte)constantValue);
+ }
+ else if (constantValue is bool)
+ {
+ constantValueIndex = AddInt((bool)constantValue ? 1 : 0);
+ }
+ else if (constantValue is short)
+ {
+ constantValueIndex = AddInt((short)constantValue);
+ }
+ else if (constantValue is char)
+ {
+ constantValueIndex = AddInt((char)constantValue);
+ }
+ else if (constantValue is int)
+ {
+ constantValueIndex = AddInt((int)constantValue);
+ }
+ else if (constantValue is long)
+ {
+ constantValueIndex = AddLong((long)constantValue);
+ }
+ else if (constantValue is float)
+ {
+ constantValueIndex = AddFloat((float)constantValue);
+ }
+ else if (constantValue is double)
+ {
+ constantValueIndex = AddDouble((double)constantValue);
+ }
+ else if (constantValue is string)
+ {
+ constantValueIndex = AddString((string)constantValue);
+ }
+ else
+ {
+ throw new InvalidOperationException(constantValue.GetType().FullName);
+ }
+ field.AddAttribute(new ConstantValueAttribute(AddUtf8("ConstantValue"), constantValueIndex));
+ }
+ fields.Add(field);
+ return field;
+ }
+
+ public ClassFileAttribute MakeStringAttribute(string name, string value)
+ {
+ return new StringAttribute(AddUtf8(name), AddUtf8(value));
+ }
+
+ public void AddStringAttribute(string name, string value)
+ {
+ attribs.Add(MakeStringAttribute(name, value));
+ }
+
+ public void AddAttribute(ClassFileAttribute attrib)
+ {
+ attribs.Add(attrib);
+ }
+
+ public void Write(Stream stream)
+ {
+ BigEndianStream bes = new BigEndianStream(stream);
+ bes.WriteUInt32(0xCAFEBABE);
+ bes.WriteUInt16(minorVersion);
+ bes.WriteUInt16(majorVersion);
+ bes.WriteUInt16((ushort)cplist.Count);
+ foreach (ConstantPoolItem cpi in cplist)
+ {
+ if (cpi != null)
+ {
+ cpi.Write(bes);
+ }
+ }
+ bes.WriteUInt16((ushort)access_flags);
+ bes.WriteUInt16(this_class);
+ bes.WriteUInt16(super_class);
+ // interfaces count
+ bes.WriteUInt16((ushort)interfaces.Count);
+ for (int i = 0; i < interfaces.Count; i++)
+ {
+ bes.WriteUInt16(interfaces[i]);
+ }
+ // fields count
+ bes.WriteUInt16((ushort)fields.Count);
+ for (int i = 0; i < fields.Count; i++)
+ {
+ fields[i].Write(bes);
+ }
+ // methods count
+ bes.WriteUInt16((ushort)methods.Count);
+ for (int i = 0; i < methods.Count; i++)
+ {
+ methods[i].Write(bes);
+ }
+ // attributes count
+ bes.WriteUInt16((ushort)attribs.Count);
+ for (int i = 0; i < attribs.Count; i++)
+ {
+ attribs[i].Write(bes);
+ }
+ }
+ }
+}
diff --git a/external/ikvm/runtime/stubgen/SerialVersionUID.cs b/external/ikvm/runtime/stubgen/SerialVersionUID.cs
new file mode 100644
index 0000000..c445030
--- /dev/null
+++ b/external/ikvm/runtime/stubgen/SerialVersionUID.cs
@@ -0,0 +1,183 @@
+/*
+ Copyright (C) 2010 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using IKVM.Attributes;
+using IKVM.Internal;
+#if STUB_GENERATOR
+using Type = IKVM.Reflection.Type;
+#endif
+
+namespace IKVM.StubGen
+{
+ static class SerialVersionUID
+ {
+ private readonly static System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed();
+
+ internal static long Compute(TypeWrapper tw)
+ {
+ MemoryStream mem = new MemoryStream();
+ BigEndianStream bes = new BigEndianStream(mem);
+ WriteClassName(bes, tw);
+ WriteModifiers(bes, tw);
+ WriteInterfaces(bes, tw);
+ WriteFields(bes, tw);
+ WriteStaticInitializer(bes, tw);
+ WriteConstructors(bes, tw);
+ WriteMethods(bes, tw);
+ byte[] buf = sha1.ComputeHash(mem.ToArray());
+ long hash = 0;
+ for (int i = 7; i >= 0; i--)
+ {
+ hash <<= 8;
+ hash |= buf[i];
+ }
+ return hash;
+ }
+
+ private static void WriteClassName(BigEndianStream bes, TypeWrapper tw)
+ {
+ bes.WriteUtf8(tw.Name);
+ }
+
+ private static void WriteModifiers(BigEndianStream bes, TypeWrapper tw)
+ {
+ Modifiers mods = tw.ReflectiveModifiers & (Modifiers.Public | Modifiers.Final | Modifiers.Interface | Modifiers.Abstract);
+ if ((mods & Modifiers.Interface) != 0)
+ {
+ mods &= ~Modifiers.Abstract;
+ if (HasJavaMethods(tw))
+ {
+ mods |= Modifiers.Abstract;
+ }
+ }
+ bes.WriteUInt32((uint)mods);
+ }
+
+ private static bool HasJavaMethods(TypeWrapper tw)
+ {
+ foreach (MethodWrapper mw in tw.GetMethods())
+ {
+ if (!mw.IsHideFromReflection && mw.Name != StringConstants.CLINIT)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static void WriteInterfaces(BigEndianStream bes, TypeWrapper tw)
+ {
+ TypeWrapper[] interfaces = (TypeWrapper[])tw.Interfaces.Clone();
+ Array.Sort(interfaces, delegate(TypeWrapper tw1, TypeWrapper tw2) { return String.CompareOrdinal(tw1.Name, tw2.Name); });
+ foreach (TypeWrapper iface in interfaces)
+ {
+ bes.WriteUtf8(iface.Name);
+ }
+ }
+
+ private static void WriteFields(BigEndianStream bes, TypeWrapper tw)
+ {
+ List<FieldWrapper> list = new List<FieldWrapper>();
+ foreach (FieldWrapper fw in tw.GetFields())
+ {
+ if (!fw.IsHideFromReflection)
+ {
+ list.Add(fw);
+ }
+ }
+ list.Sort(delegate(FieldWrapper fw1, FieldWrapper fw2) { return String.CompareOrdinal(fw1.Name, fw2.Name); });
+ foreach (FieldWrapper fw in list)
+ {
+ Modifiers mods = fw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Volatile | Modifiers.Transient);
+ if (((mods & Modifiers.Private) == 0) || ((mods & (Modifiers.Static | Modifiers.Transient)) == 0))
+ {
+ bes.WriteUtf8(fw.Name);
+ bes.WriteUInt32((uint)mods);
+ bes.WriteUtf8(fw.Signature.Replace('.', '/'));
+ }
+ }
+ }
+
+ private static void WriteStaticInitializer(BigEndianStream bes, TypeWrapper tw)
+ {
+ Type type = tw.TypeAsTBD;
+ if (!type.IsArray && type.TypeInitializer != null)
+ {
+ if (!AttributeHelper.IsHideFromJava(type.TypeInitializer))
+ {
+ bes.WriteUtf8("<clinit>");
+ bes.WriteUInt32((uint)Modifiers.Static);
+ bes.WriteUtf8("()V");
+ }
+ }
+ }
+
+ private static void WriteConstructors(BigEndianStream bes, TypeWrapper tw)
+ {
+ List<MethodWrapper> list = new List<MethodWrapper>();
+ foreach (MethodWrapper mw in tw.GetMethods())
+ {
+ if (mw.IsConstructor && !mw.IsHideFromReflection && !mw.IsPrivate)
+ {
+ list.Add(mw);
+ }
+ }
+ list.Sort(delegate(MethodWrapper mw1, MethodWrapper mw2) { return String.CompareOrdinal(mw1.Signature, mw2.Signature); });
+ foreach (MethodWrapper mw in list)
+ {
+ Modifiers mods = mw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Synchronized | Modifiers.Native | Modifiers.Abstract | Modifiers.Strictfp);
+ bes.WriteUtf8(mw.Name);
+ bes.WriteUInt32((uint)mods);
+ bes.WriteUtf8(mw.Signature);
+ }
+ }
+
+ private static void WriteMethods(BigEndianStream bes, TypeWrapper tw)
+ {
+ List<MethodWrapper> list = new List<MethodWrapper>();
+ foreach (MethodWrapper mw in tw.GetMethods())
+ {
+ if (!mw.IsConstructor && !mw.IsHideFromReflection && !mw.IsPrivate)
+ {
+ list.Add(mw);
+ }
+ }
+ list.Sort(delegate(MethodWrapper mw1, MethodWrapper mw2) {
+ if (mw1.Name == mw2.Name)
+ return String.CompareOrdinal(mw1.Signature, mw2.Signature);
+ return String.CompareOrdinal(mw1.Name, mw2.Name);
+ });
+ foreach (MethodWrapper mw in list)
+ {
+ Modifiers mods = mw.Modifiers & (Modifiers.Public | Modifiers.Private | Modifiers.Protected | Modifiers.Static | Modifiers.Final | Modifiers.Synchronized | Modifiers.Native | Modifiers.Abstract | Modifiers.Strictfp);
+ bes.WriteUtf8(mw.Name);
+ bes.WriteUInt32((uint)mods);
+ bes.WriteUtf8(mw.Signature);
+ }
+ }
+ }
+}
diff --git a/external/ikvm/runtime/stubgen/StubGenerator.cs b/external/ikvm/runtime/stubgen/StubGenerator.cs
new file mode 100644
index 0000000..206cd18
--- /dev/null
+++ b/external/ikvm/runtime/stubgen/StubGenerator.cs
@@ -0,0 +1,636 @@
+/*
+ Copyright (C) 2002-2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+using System;
+using System.IO;
+using System.Collections.Generic;
+#if STUB_GENERATOR
+using IKVM.Reflection;
+using Type = IKVM.Reflection.Type;
+#else
+using System.Reflection;
+#endif
+using IKVM.Attributes;
+using IKVM.Internal;
+
+namespace IKVM.StubGen
+{
+ static class StubGenerator
+ {
+ internal static void WriteClass(Stream stream, TypeWrapper tw, bool includeNonPublicInterfaces, bool includeNonPublicMembers, bool includeSerialVersionUID)
+ {
+ string name = tw.Name.Replace('.', '/');
+ string super = null;
+ if (tw.IsInterface)
+ {
+ super = "java/lang/Object";
+ }
+ else if (tw.BaseTypeWrapper != null)
+ {
+ super = tw.BaseTypeWrapper.Name.Replace('.', '/');
+ }
+ ClassFileWriter writer = new ClassFileWriter(tw.Modifiers, name, super, 0, 49);
+ foreach (TypeWrapper iface in tw.Interfaces)
+ {
+ if (iface.IsPublic || includeNonPublicInterfaces)
+ {
+ writer.AddInterface(iface.Name.Replace('.', '/'));
+ }
+ }
+ InnerClassesAttribute innerClassesAttribute = null;
+ if (tw.DeclaringTypeWrapper != null)
+ {
+ TypeWrapper outer = tw.DeclaringTypeWrapper;
+ string innername = name;
+ int idx = name.LastIndexOf('$');
+ if (idx >= 0)
+ {
+ innername = innername.Substring(idx + 1);
+ }
+ innerClassesAttribute = new InnerClassesAttribute(writer);
+ innerClassesAttribute.Add(name, outer.Name.Replace('.', '/'), innername, (ushort)tw.ReflectiveModifiers);
+ }
+ foreach (TypeWrapper inner in tw.InnerClasses)
+ {
+ if (inner.IsPublic)
+ {
+ if (innerClassesAttribute == null)
+ {
+ innerClassesAttribute = new InnerClassesAttribute(writer);
+ }
+ string namePart = inner.Name;
+ namePart = namePart.Substring(namePart.LastIndexOf('$') + 1);
+ innerClassesAttribute.Add(inner.Name.Replace('.', '/'), name, namePart, (ushort)inner.ReflectiveModifiers);
+ }
+ }
+ if (innerClassesAttribute != null)
+ {
+ writer.AddAttribute(innerClassesAttribute);
+ }
+ string genericTypeSignature = tw.GetGenericSignature();
+ if (genericTypeSignature != null)
+ {
+ writer.AddStringAttribute("Signature", genericTypeSignature);
+ }
+ AddAnnotations(writer, writer, tw.TypeAsBaseType);
+ writer.AddStringAttribute("IKVM.NET.Assembly", GetAssemblyName(tw));
+ if (tw.TypeAsBaseType.IsDefined(JVM.Import(typeof(ObsoleteAttribute)), false))
+ {
+ writer.AddAttribute(new DeprecatedAttribute(writer));
+ }
+ foreach (MethodWrapper mw in tw.GetMethods())
+ {
+ if (!mw.IsHideFromReflection && (mw.IsPublic || mw.IsProtected || includeNonPublicMembers))
+ {
+ FieldOrMethod m;
+ if (mw.Name == "<init>")
+ {
+ m = writer.AddMethod(mw.Modifiers, mw.Name, mw.Signature.Replace('.', '/'));
+ CodeAttribute code = new CodeAttribute(writer);
+ code.MaxLocals = (ushort)(mw.GetParameters().Length * 2 + 1);
+ code.MaxStack = 3;
+ ushort index1 = writer.AddClass("java/lang/UnsatisfiedLinkError");
+ ushort index2 = writer.AddString("ikvmstub generated stubs can only be used on IKVM.NET");
+ ushort index3 = writer.AddMethodRef("java/lang/UnsatisfiedLinkError", "<init>", "(Ljava/lang/String;)V");
+ code.ByteCode = new byte[] {
+ 187, (byte)(index1 >> 8), (byte)index1, // new java/lang/UnsatisfiedLinkError
+ 89, // dup
+ 19, (byte)(index2 >> 8), (byte)index2, // ldc_w "..."
+ 183, (byte)(index3 >> 8), (byte)index3, // invokespecial java/lang/UnsatisfiedLinkError/init()V
+ 191 // athrow
+ };
+ m.AddAttribute(code);
+ }
+ else
+ {
+ Modifiers mods = mw.Modifiers;
+ if ((mods & Modifiers.Abstract) == 0)
+ {
+ mods |= Modifiers.Native;
+ }
+ m = writer.AddMethod(mods, mw.Name, mw.Signature.Replace('.', '/'));
+ if (mw.IsOptionalAttributeAnnotationValue)
+ {
+ m.AddAttribute(new AnnotationDefaultClassFileAttribute(writer, GetAnnotationDefault(writer, mw.ReturnType)));
+ }
+ }
+ MethodBase mb = mw.GetMethod();
+ if (mb != null)
+ {
+ ThrowsAttribute throws = AttributeHelper.GetThrows(mb);
+ if (throws == null)
+ {
+ string[] throwsArray = mw.GetDeclaredExceptions();
+ if (throwsArray != null && throwsArray.Length > 0)
+ {
+ ExceptionsAttribute attrib = new ExceptionsAttribute(writer);
+ foreach (string ex in throwsArray)
+ {
+ attrib.Add(ex.Replace('.', '/'));
+ }
+ m.AddAttribute(attrib);
+ }
+ }
+ else
+ {
+ ExceptionsAttribute attrib = new ExceptionsAttribute(writer);
+ if (throws.classes != null)
+ {
+ foreach (string ex in throws.classes)
+ {
+ attrib.Add(ex.Replace('.', '/'));
+ }
+ }
+ if (throws.types != null)
+ {
+ foreach (Type ex in throws.types)
+ {
+ attrib.Add(ClassLoaderWrapper.GetWrapperFromType(ex).Name.Replace('.', '/'));
+ }
+ }
+ m.AddAttribute(attrib);
+ }
+ if (mb.IsDefined(JVM.Import(typeof(ObsoleteAttribute)), false)
+ // HACK the instancehelper methods are marked as Obsolete (to direct people toward the ikvm.extensions methods instead)
+ // but in the Java world most of them are not deprecated (and to keep the Japi results clean we need to reflect this)
+ && (!mb.Name.StartsWith("instancehelper_")
+ || mb.DeclaringType.FullName != "java.lang.String"
+ // the Java deprecated methods actually have two Obsolete attributes
+ || GetObsoleteCount(mb) == 2))
+ {
+ m.AddAttribute(new DeprecatedAttribute(writer));
+ }
+ CustomAttributeData attr = GetAnnotationDefault(mb);
+ if (attr != null)
+ {
+ m.AddAttribute(new AnnotationDefaultClassFileAttribute(writer, GetAnnotationDefault(writer, attr.ConstructorArguments[0])));
+ }
+ }
+ string sig = tw.GetGenericMethodSignature(mw);
+ if (sig != null)
+ {
+ m.AddAttribute(writer.MakeStringAttribute("Signature", sig));
+ }
+ AddAnnotations(writer, m, mw.GetMethod());
+ AddParameterAnnotations(writer, m, mw.GetMethod());
+ }
+ }
+ bool hasSerialVersionUID = false;
+ foreach (FieldWrapper fw in tw.GetFields())
+ {
+ if (!fw.IsHideFromReflection)
+ {
+ bool isSerialVersionUID = includeSerialVersionUID && fw.Name == "serialVersionUID" && fw.FieldTypeWrapper == PrimitiveTypeWrapper.LONG;
+ hasSerialVersionUID |= isSerialVersionUID;
+ if (fw.IsPublic || fw.IsProtected || isSerialVersionUID || includeNonPublicMembers)
+ {
+ object constant = null;
+ if (fw.GetField() != null && fw.GetField().IsLiteral && (fw.FieldTypeWrapper.IsPrimitive || fw.FieldTypeWrapper == CoreClasses.java.lang.String.Wrapper))
+ {
+ constant = fw.GetField().GetRawConstantValue();
+ if (fw.GetField().FieldType.IsEnum)
+ {
+ constant = EnumHelper.GetPrimitiveValue(EnumHelper.GetUnderlyingType(fw.GetField().FieldType), constant);
+ }
+ }
+ FieldOrMethod f = writer.AddField(fw.Modifiers, fw.Name, fw.Signature.Replace('.', '/'), constant);
+ string sig = tw.GetGenericFieldSignature(fw);
+ if (sig != null)
+ {
+ f.AddAttribute(writer.MakeStringAttribute("Signature", sig));
+ }
+ if (fw.GetField() != null && fw.GetField().IsDefined(JVM.Import(typeof(ObsoleteAttribute)), false))
+ {
+ f.AddAttribute(new DeprecatedAttribute(writer));
+ }
+ AddAnnotations(writer, f, fw.GetField());
+ }
+ }
+ }
+ if (includeSerialVersionUID && !hasSerialVersionUID && IsSerializable(tw))
+ {
+ // class is serializable but doesn't have an explicit serialVersionUID, so we add the field to record
+ // the serialVersionUID as we see it (mainly to make the Japi reports more realistic)
+ writer.AddField(Modifiers.Private | Modifiers.Static | Modifiers.Final, "serialVersionUID", "J", SerialVersionUID.Compute(tw));
+ }
+ AddMetaAnnotations(writer, tw);
+ writer.Write(stream);
+ }
+
+ private static void AddAnnotations(ClassFileWriter writer, IAttributeOwner target, MemberInfo source)
+ {
+#if !FIRST_PASS && !STUB_GENERATOR
+ if (source != null)
+ {
+ RuntimeVisibleAnnotationsAttribute attr = null;
+ foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(source))
+ {
+ object[] ann = GetAnnotation(cad);
+ if (ann != null)
+ {
+ if (attr == null)
+ {
+ attr = new RuntimeVisibleAnnotationsAttribute(writer);
+ }
+ attr.Add(UnpackArray((IList<CustomAttributeTypedArgument>)cad.ConstructorArguments[0].Value));
+ }
+ }
+ if (attr != null)
+ {
+ target.AddAttribute(attr);
+ }
+ }
+#endif
+ }
+
+ private static void AddParameterAnnotations(ClassFileWriter writer, FieldOrMethod target, MethodBase source)
+ {
+#if !FIRST_PASS && !STUB_GENERATOR
+ if (source != null)
+ {
+ RuntimeVisibleParameterAnnotationsAttribute attr = null;
+ ParameterInfo[] parameters = source.GetParameters();
+ for (int i = 0; i < parameters.Length; i++)
+ {
+ RuntimeVisibleAnnotationsAttribute param = null;
+ foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(parameters[i]))
+ {
+ object[] ann = GetAnnotation(cad);
+ if (ann != null)
+ {
+ if (param == null)
+ {
+ if (attr == null)
+ {
+ attr = new RuntimeVisibleParameterAnnotationsAttribute(writer);
+ for (int j = 0; j < i; j++)
+ {
+ attr.Add(new RuntimeVisibleAnnotationsAttribute(writer));
+ }
+ }
+ param = new RuntimeVisibleAnnotationsAttribute(writer);
+ }
+ param.Add(UnpackArray((IList<CustomAttributeTypedArgument>)cad.ConstructorArguments[0].Value));
+ }
+ }
+ if (attr != null)
+ {
+ attr.Add(param ?? new RuntimeVisibleAnnotationsAttribute(writer));
+ }
+ }
+ if (attr != null)
+ {
+ target.AddAttribute(attr);
+ }
+ }
+#endif
+ }
+
+#if !FIRST_PASS && !STUB_GENERATOR
+ private static object[] GetAnnotation(CustomAttributeData cad)
+ {
+ if (cad.ConstructorArguments.Count == 1 && cad.ConstructorArguments[0].ArgumentType == typeof(object[]) &&
+ (cad.Constructor.DeclaringType.IsSubclassOf(JVM.Import(typeof(ikvm. at internal.AnnotationAttributeBase)))
+ || cad.Constructor.DeclaringType == JVM.Import(typeof(DynamicAnnotationAttribute))))
+ {
+ return UnpackArray((IList<CustomAttributeTypedArgument>)cad.ConstructorArguments[0].Value);
+ }
+ return null;
+ }
+#endif
+
+ private static object[] UnpackArray(IList<CustomAttributeTypedArgument> list)
+ {
+ object[] arr = new object[list.Count];
+ for (int i = 0; i < arr.Length; i++)
+ {
+ if (list[i].Value is IList<CustomAttributeTypedArgument>)
+ {
+ arr[i] = UnpackArray((IList<CustomAttributeTypedArgument>)list[i].Value);
+ }
+ else
+ {
+ arr[i] = list[i].Value;
+ }
+ }
+ return arr;
+ }
+
+ private static int GetObsoleteCount(MethodBase mb)
+ {
+#if STUB_GENERATOR
+ return mb.__GetCustomAttributes(JVM.Import(typeof(ObsoleteAttribute)), false).Count;
+#else
+ return mb.GetCustomAttributes(typeof(ObsoleteAttribute), false).Length;
+#endif
+ }
+
+ private static CustomAttributeData GetAnnotationDefault(MethodBase mb)
+ {
+#if STUB_GENERATOR
+ IList<CustomAttributeData> attr = CustomAttributeData.__GetCustomAttributes(mb, JVM.LoadType(typeof(AnnotationDefaultAttribute)), false);
+ return attr.Count == 1 ? attr[0] : null;
+#else
+ foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(mb))
+ {
+ if (cad.Constructor.DeclaringType == typeof(AnnotationDefaultAttribute))
+ {
+ return cad;
+ }
+ }
+ return null;
+#endif
+ }
+
+ private static string GetAssemblyName(TypeWrapper tw)
+ {
+ ClassLoaderWrapper loader = tw.GetClassLoader();
+ AssemblyClassLoader acl = loader as AssemblyClassLoader;
+ if (acl != null)
+ {
+ return acl.GetAssembly(tw).FullName;
+ }
+ else
+ {
+ return ((GenericClassLoaderWrapper)loader).GetName();
+ }
+ }
+
+ private static bool IsSerializable(TypeWrapper tw)
+ {
+ if (tw.Name == "java.io.Serializable")
+ {
+ return true;
+ }
+ while (tw != null)
+ {
+ foreach (TypeWrapper iface in tw.Interfaces)
+ {
+ if (IsSerializable(iface))
+ {
+ return true;
+ }
+ }
+ tw = tw.BaseTypeWrapper;
+ }
+ return false;
+ }
+
+ private static void AddMetaAnnotations(ClassFileWriter writer, TypeWrapper tw)
+ {
+ DotNetTypeWrapper.AttributeAnnotationTypeWrapperBase attributeAnnotation = tw as DotNetTypeWrapper.AttributeAnnotationTypeWrapperBase;
+ if (attributeAnnotation != null)
+ {
+ // TODO write the annotation directly, instead of going thru the object[] encoding
+ RuntimeVisibleAnnotationsAttribute annot = new RuntimeVisibleAnnotationsAttribute(writer);
+ annot.Add(new object[] {
+ AnnotationDefaultAttribute.TAG_ANNOTATION,
+ "Ljava/lang/annotation/Retention;",
+ "value",
+ new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/RetentionPolicy;", "RUNTIME" }
+ });
+ AttributeTargets validOn = attributeAnnotation.AttributeTargets;
+ List<object> targets = new List<object>();
+ targets.Add(AnnotationDefaultAttribute.TAG_ARRAY);
+ if ((validOn & (AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate | AttributeTargets.Assembly)) != 0)
+ {
+ targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "TYPE" });
+ }
+ if ((validOn & AttributeTargets.Constructor) != 0)
+ {
+ targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "CONSTRUCTOR" });
+ }
+ if ((validOn & AttributeTargets.Field) != 0)
+ {
+ targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "FIELD" });
+ }
+ if ((validOn & (AttributeTargets.Method | AttributeTargets.ReturnValue)) != 0)
+ {
+ targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "METHOD" });
+ }
+ if ((validOn & AttributeTargets.Parameter) != 0)
+ {
+ targets.Add(new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/ElementType;", "PARAMETER" });
+ }
+ annot.Add(new object[] {
+ AnnotationDefaultAttribute.TAG_ANNOTATION,
+ "Ljava/lang/annotation/Target;",
+ "value",
+ targets.ToArray()
+ });
+ writer.AddAttribute(annot);
+ }
+ }
+
+ private static byte[] GetAnnotationDefault(ClassFileWriter classFile, TypeWrapper type)
+ {
+ MemoryStream mem = new MemoryStream();
+ BigEndianStream bes = new BigEndianStream(mem);
+ if (type == PrimitiveTypeWrapper.BOOLEAN)
+ {
+ bes.WriteByte((byte)'Z');
+ bes.WriteUInt16(classFile.AddInt(0));
+ }
+ else if (type == PrimitiveTypeWrapper.BYTE)
+ {
+ bes.WriteByte((byte)'B');
+ bes.WriteUInt16(classFile.AddInt(0));
+ }
+ else if (type == PrimitiveTypeWrapper.CHAR)
+ {
+ bes.WriteByte((byte)'C');
+ bes.WriteUInt16(classFile.AddInt(0));
+ }
+ else if (type == PrimitiveTypeWrapper.SHORT)
+ {
+ bes.WriteByte((byte)'S');
+ bes.WriteUInt16(classFile.AddInt(0));
+ }
+ else if (type == PrimitiveTypeWrapper.INT)
+ {
+ bes.WriteByte((byte)'I');
+ bes.WriteUInt16(classFile.AddInt(0));
+ }
+ else if (type == PrimitiveTypeWrapper.FLOAT)
+ {
+ bes.WriteByte((byte)'F');
+ bes.WriteUInt16(classFile.AddFloat(0));
+ }
+ else if (type == PrimitiveTypeWrapper.LONG)
+ {
+ bes.WriteByte((byte)'J');
+ bes.WriteUInt16(classFile.AddLong(0));
+ }
+ else if (type == PrimitiveTypeWrapper.DOUBLE)
+ {
+ bes.WriteByte((byte)'D');
+ bes.WriteUInt16(classFile.AddDouble(0));
+ }
+ else if (type == CoreClasses.java.lang.String.Wrapper)
+ {
+ bes.WriteByte((byte)'s');
+ bes.WriteUInt16(classFile.AddUtf8(""));
+ }
+ else if ((type.Modifiers & Modifiers.Enum) != 0)
+ {
+ bes.WriteByte((byte)'e');
+ bes.WriteUInt16(classFile.AddUtf8("L" + type.Name.Replace('.', '/') + ";"));
+ bes.WriteUInt16(classFile.AddUtf8("__unspecified"));
+ }
+ else if (type == CoreClasses.java.lang.Class.Wrapper)
+ {
+ bes.WriteByte((byte)'c');
+ bes.WriteUInt16(classFile.AddUtf8("Likvm/internal/__unspecified;"));
+ }
+ else if (type.IsArray)
+ {
+ bes.WriteByte((byte)'[');
+ bes.WriteUInt16(0);
+ }
+ else
+ {
+ throw new InvalidOperationException();
+ }
+ return mem.ToArray();
+ }
+
+ private static byte[] GetAnnotationDefault(ClassFileWriter classFile, CustomAttributeTypedArgument value)
+ {
+ MemoryStream mem = new MemoryStream();
+ BigEndianStream bes = new BigEndianStream(mem);
+ try
+ {
+ WriteAnnotationElementValue(classFile, bes, value);
+ }
+ catch (InvalidCastException)
+ {
+ Warning("Warning: incorrect annotation default value");
+ }
+ catch (IndexOutOfRangeException)
+ {
+ Warning("Warning: incorrect annotation default value");
+ }
+ return mem.ToArray();
+ }
+
+ private static void WriteAnnotationElementValue(ClassFileWriter classFile, BigEndianStream bes, CustomAttributeTypedArgument value)
+ {
+ if (value.ArgumentType == Types.Boolean)
+ {
+ bes.WriteByte((byte)'Z');
+ bes.WriteUInt16(classFile.AddInt((bool)value.Value ? 1 : 0));
+ }
+ else if (value.ArgumentType == Types.Byte)
+ {
+ bes.WriteByte((byte)'B');
+ bes.WriteUInt16(classFile.AddInt((byte)value.Value));
+ }
+ else if (value.ArgumentType == Types.Char)
+ {
+ bes.WriteByte((byte)'C');
+ bes.WriteUInt16(classFile.AddInt((char)value.Value));
+ }
+ else if (value.ArgumentType == Types.Int16)
+ {
+ bes.WriteByte((byte)'S');
+ bes.WriteUInt16(classFile.AddInt((short)value.Value));
+ }
+ else if (value.ArgumentType == Types.Int32)
+ {
+ bes.WriteByte((byte)'I');
+ bes.WriteUInt16(classFile.AddInt((int)value.Value));
+ }
+ else if (value.ArgumentType == Types.Single)
+ {
+ bes.WriteByte((byte)'F');
+ bes.WriteUInt16(classFile.AddFloat((float)value.Value));
+ }
+ else if (value.ArgumentType == Types.Int64)
+ {
+ bes.WriteByte((byte)'J');
+ bes.WriteUInt16(classFile.AddLong((long)value.Value));
+ }
+ else if (value.ArgumentType == Types.Double)
+ {
+ bes.WriteByte((byte)'D');
+ bes.WriteUInt16(classFile.AddDouble((double)value.Value));
+ }
+ else if (value.ArgumentType == Types.String)
+ {
+ bes.WriteByte((byte)'s');
+ bes.WriteUInt16(classFile.AddUtf8((string)value.Value));
+ }
+ else if (value.ArgumentType == Types.Object.MakeArrayType())
+ {
+ CustomAttributeTypedArgument[] array = (CustomAttributeTypedArgument[])value.Value;
+ byte type = (byte)array[0].Value;
+ if (type == AnnotationDefaultAttribute.TAG_ARRAY)
+ {
+ bes.WriteByte((byte)'[');
+ bes.WriteUInt16((ushort)(array.Length - 1));
+ for (int i = 1; i < array.Length; i++)
+ {
+ WriteAnnotationElementValue(classFile, bes, array[i]);
+ }
+ }
+ else if (type == AnnotationDefaultAttribute.TAG_CLASS)
+ {
+ bes.WriteByte((byte)'c');
+ bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
+ }
+ else if (type == AnnotationDefaultAttribute.TAG_ENUM)
+ {
+ bes.WriteByte((byte)'e');
+ bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
+ bes.WriteUInt16(classFile.AddUtf8((string)array[2].Value));
+ }
+ else if (type == AnnotationDefaultAttribute.TAG_ANNOTATION)
+ {
+ bes.WriteByte((byte)'@');
+ bes.WriteUInt16(classFile.AddUtf8((string)array[1].Value));
+ bes.WriteUInt16((ushort)((array.Length - 2) / 2));
+ for (int i = 2; i < array.Length; i += 2)
+ {
+ bes.WriteUInt16(classFile.AddUtf8((string)array[i].Value));
+ WriteAnnotationElementValue(classFile, bes, array[i + 1]);
+ }
+ }
+ else
+ {
+ Warning("Warning: incorrect annotation default element tag: " + type);
+ }
+ }
+ else
+ {
+ Warning("Warning: incorrect annotation default element type: " + value.ArgumentType);
+ }
+ }
+
+ private static void Warning(string message)
+ {
+#if STUB_GENERATOR
+ Console.Error.WriteLine(message);
+#endif
+ }
+ }
+}
diff --git a/external/ikvm/runtime/verifier.cs b/external/ikvm/runtime/verifier.cs
index 77ebe89..9923217 100644
--- a/external/ikvm/runtime/verifier.cs
+++ b/external/ikvm/runtime/verifier.cs
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002-2012 Jeroen Frijters
+ Copyright (C) 2002-2013 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -2564,17 +2564,15 @@ sealed class MethodAnalyzer
case NormalizedByteCode.__ldc:
switch(classFile.GetConstantPoolConstantType(instructions[i].Arg1))
{
-#if STATIC_COMPILER
case ClassFile.ConstantType.Class:
{
TypeWrapper tw = classFile.GetConstantPoolClassType(instructions[i].Arg1);
if(tw.IsUnloadable)
{
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
break;
}
-#endif
case ClassFile.ConstantType.MethodType:
{
ClassFile.ConstantPoolItemMethodType cpi = classFile.GetConstantPoolConstantMethodType(instructions[i].Arg1);
@@ -2586,7 +2584,7 @@ sealed class MethodAnalyzer
}
if(tw.IsUnloadable)
{
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
break;
}
@@ -2600,9 +2598,7 @@ sealed class MethodAnalyzer
TypeWrapper tw = classFile.GetConstantPoolClassType(instructions[i].Arg1);
if(tw.IsUnloadable)
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
-#endif
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
else if(!tw.IsAccessibleFrom(wrapper))
{
@@ -2620,9 +2616,7 @@ sealed class MethodAnalyzer
TypeWrapper tw = classFile.GetConstantPoolClassType(instructions[i].Arg1);
if(tw.IsUnloadable)
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
-#endif
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
else if(!tw.IsAccessibleFrom(wrapper))
{
@@ -2637,7 +2631,7 @@ sealed class MethodAnalyzer
if(tw.IsUnloadable)
{
// If the type is unloadable, we always generate the dynamic code
- // (regardless of JVM.DisableDynamicBinding), because at runtime,
+ // (regardless of ClassLoaderWrapper.DisableDynamicBinding), because at runtime,
// null references should always pass thru without attempting
// to load the type (for Sun compatibility).
}
@@ -2653,9 +2647,7 @@ sealed class MethodAnalyzer
TypeWrapper tw = stack.PopArrayType();
if(tw.IsUnloadable)
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
-#endif
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
break;
}
@@ -2666,9 +2658,7 @@ sealed class MethodAnalyzer
TypeWrapper tw = stack.PopArrayType();
if(tw.IsUnloadable)
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instructions[i], HardError.NoClassDefFoundError, "{0}", tw.Name);
-#endif
+ ConditionalPatchNoClassDefFoundError(ref instructions[i], tw);
}
break;
}
@@ -2680,41 +2670,12 @@ sealed class MethodAnalyzer
}
}
- private static TypeWrapper FirstUnloadable(ClassFile.ConstantPoolItemMethodHandle cpi)
- {
- if (cpi.GetClassType().IsUnloadable)
- {
- return cpi.GetClassType();
- }
- ClassFile.ConstantPoolItemMI method = cpi.MemberConstantPoolItem as ClassFile.ConstantPoolItemMI;
- if (method != null)
- {
- if (method.GetRetType().IsUnloadable)
- {
- return method.GetRetType();
- }
- foreach (TypeWrapper tw in method.GetArgTypes())
- {
- if (tw.IsUnloadable)
- {
- return tw;
- }
- }
- }
- else if (((ClassFile.ConstantPoolItemFieldref)cpi.MemberConstantPoolItem).GetFieldType().IsUnloadable)
- {
- return ((ClassFile.ConstantPoolItemFieldref)cpi.MemberConstantPoolItem).GetFieldType();
- }
- return null;
- }
-
private void PatchLdcMethodHandle(ref ClassFile.Method.Instruction instr)
{
ClassFile.ConstantPoolItemMethodHandle cpi = classFile.GetConstantPoolConstantMethodHandle(instr.Arg1);
- TypeWrapper twUnloadable;
- if ((twUnloadable = FirstUnloadable(cpi)) != null)
+ if (cpi.GetClassType().IsUnloadable)
{
- SetHardError(wrapper.GetClassLoader(), ref instr, HardError.NoClassDefFoundError, "{0}", twUnloadable.Name);
+ ConditionalPatchNoClassDefFoundError(ref instr, cpi.GetClassType());
}
else if (!cpi.GetClassType().IsAccessibleFrom(wrapper))
{
@@ -3501,6 +3462,15 @@ sealed class MethodAnalyzer
}
}
+ private void ConditionalPatchNoClassDefFoundError(ref ClassFile.Method.Instruction instruction, TypeWrapper tw)
+ {
+ ClassLoaderWrapper loader = wrapper.GetClassLoader();
+ if (loader.DisableDynamicBinding)
+ {
+ SetHardError(loader, ref instruction, HardError.NoClassDefFoundError, "{0}", tw.Name);
+ }
+ }
+
private void SetHardError(ClassLoaderWrapper classLoader, ref ClassFile.Method.Instruction instruction, HardError hardError, string message, params object[] args)
{
string text = string.Format(message, args);
@@ -3585,34 +3555,37 @@ sealed class MethodAnalyzer
if(cpi.GetClassType().IsUnloadable || (thisType != null && thisType.IsUnloadable))
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instr, HardError.NoClassDefFoundError, "{0}", cpi.GetClassType().Name);
-#else
- switch(invoke)
+ if(wrapper.GetClassLoader().DisableDynamicBinding)
{
- case NormalizedByteCode.__invokeinterface:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_invokeinterface);
- break;
- case NormalizedByteCode.__invokestatic:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_invokestatic);
- break;
- case NormalizedByteCode.__invokevirtual:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_invokevirtual);
- break;
- case NormalizedByteCode.__invokespecial:
- if(isnew)
- {
- instr.PatchOpCode(NormalizedByteCode.__dynamic_invokespecial);
- }
- else
- {
- SetHardError(wrapper.GetClassLoader(), ref instr, HardError.LinkageError, "Base class no longer loadable");
- }
- break;
- default:
- throw new InvalidOperationException();
+ SetHardError(wrapper.GetClassLoader(), ref instr, HardError.NoClassDefFoundError, "{0}", cpi.GetClassType().Name);
+ }
+ else
+ {
+ switch(invoke)
+ {
+ case NormalizedByteCode.__invokeinterface:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_invokeinterface);
+ break;
+ case NormalizedByteCode.__invokestatic:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_invokestatic);
+ break;
+ case NormalizedByteCode.__invokevirtual:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_invokevirtual);
+ break;
+ case NormalizedByteCode.__invokespecial:
+ if(isnew)
+ {
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_invokespecial);
+ }
+ else
+ {
+ throw new VerifyError("Invokespecial cannot call subclass methods");
+ }
+ break;
+ default:
+ throw new InvalidOperationException();
+ }
}
-#endif
}
else if(cpi.GetClassType().IsInterface != (invoke == NormalizedByteCode.__invokeinterface))
{
@@ -3750,27 +3723,30 @@ sealed class MethodAnalyzer
}
else if(cpi.GetClassType().IsUnloadable || (thisType != null && thisType.IsUnloadable))
{
-#if STATIC_COMPILER
- SetHardError(wrapper.GetClassLoader(), ref instr, HardError.NoClassDefFoundError, "{0}", cpi.GetClassType().Name);
-#else
- switch(instr.NormalizedOpCode)
+ if(wrapper.GetClassLoader().DisableDynamicBinding)
{
- case NormalizedByteCode.__getstatic:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_getstatic);
- break;
- case NormalizedByteCode.__putstatic:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_putstatic);
- break;
- case NormalizedByteCode.__getfield:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_getfield);
- break;
- case NormalizedByteCode.__putfield:
- instr.PatchOpCode(NormalizedByteCode.__dynamic_putfield);
- break;
- default:
- throw new InvalidOperationException();
+ SetHardError(wrapper.GetClassLoader(), ref instr, HardError.NoClassDefFoundError, "{0}", cpi.GetClassType().Name);
+ }
+ else
+ {
+ switch(instr.NormalizedOpCode)
+ {
+ case NormalizedByteCode.__getstatic:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_getstatic);
+ break;
+ case NormalizedByteCode.__putstatic:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_putstatic);
+ break;
+ case NormalizedByteCode.__getfield:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_getfield);
+ break;
+ case NormalizedByteCode.__putfield:
+ instr.PatchOpCode(NormalizedByteCode.__dynamic_putfield);
+ break;
+ default:
+ throw new InvalidOperationException();
+ }
}
-#endif
return;
}
else
diff --git a/external/ikvm/runtime/vfs.cs b/external/ikvm/runtime/vfs.cs
index 2a68a0d..8db1165 100644
--- a/external/ikvm/runtime/vfs.cs
+++ b/external/ikvm/runtime/vfs.cs
@@ -563,7 +563,7 @@ namespace IKVM.Internal
private sealed class VfsAssemblyClass : VfsFile
{
private readonly TypeWrapper tw;
- private byte[] buf;
+ private volatile byte[] buf;
internal VfsAssemblyClass(TypeWrapper tw)
{
@@ -575,7 +575,10 @@ namespace IKVM.Internal
#if !FIRST_PASS
if (buf == null)
{
- buf = ikvm. at internal.stubgen.StubGenerator.generateStub(tw.ClassObject);
+ System.IO.MemoryStream mem = new System.IO.MemoryStream();
+ bool includeNonPublicInterfaces = !"true".Equals(java.lang.Props.props.getProperty("ikvm.stubgen.skipNonPublicInterfaces"), StringComparison.OrdinalIgnoreCase);
+ IKVM.StubGen.StubGenerator.WriteClass(mem, tw, includeNonPublicInterfaces, false, false);
+ buf = mem.ToArray();
}
#endif
}
@@ -617,8 +620,8 @@ namespace IKVM.Internal
private sealed class VfsZipEntry : VfsFile
{
- private java.util.zip.ZipFile zipFile;
- private java.util.zip.ZipEntry entry;
+ private readonly java.util.zip.ZipFile zipFile;
+ private readonly java.util.zip.ZipEntry entry;
internal VfsZipEntry(java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry)
{
@@ -639,7 +642,7 @@ namespace IKVM.Internal
private sealed class VfsCacertsEntry : VfsFile
{
- private byte[] buf;
+ private volatile byte[] buf;
internal override long Size
{
@@ -818,10 +821,10 @@ namespace IKVM.Internal
return root.GetEntry(0, path);
}
- private sealed class ZipEntryStream : System.IO.Stream
+ internal sealed class ZipEntryStream : System.IO.Stream
{
- private java.util.zip.ZipFile zipFile;
- private java.util.zip.ZipEntry entry;
+ private readonly java.util.zip.ZipFile zipFile;
+ private readonly java.util.zip.ZipEntry entry;
private java.io.InputStream inp;
private long position;
diff --git a/external/ikvm/runtime/vm.cs b/external/ikvm/runtime/vm.cs
index 30b7205..fd3a615 100644
--- a/external/ikvm/runtime/vm.cs
+++ b/external/ikvm/runtime/vm.cs
@@ -51,22 +51,6 @@ namespace IKVM.Internal
DynamicClassLoader.SaveDebugImages();
}
-#if !FIRST_PASS
- public static java.lang.reflect.Method FindMainMethod(java.lang.Class clazz)
- {
- // This method exists because we don't use Class.getDeclaredMethods(),
- // since that could cause us to run into NoClassDefFoundError if any of the
- // method signatures references a missing class.
- TypeWrapper tw = TypeWrapper.FromClass(clazz);
- MethodWrapper mw = tw.GetMethodWrapper("main", "([Ljava.lang.String;)V", true);
- if (mw != null && mw.IsStatic)
- {
- return (java.lang.reflect.Method)mw.ToMethodOrConstructor(true);
- }
- return null;
- }
-#endif
-
public static bool ClassUnloading
{
#if CLASSGC
@@ -83,6 +67,12 @@ namespace IKVM.Internal
get { return JVM.relaxedVerification; }
set { JVM.relaxedVerification = value; }
}
+
+ public static bool AllowNonVirtualCalls
+ {
+ get { return JVM.AllowNonVirtualCalls; }
+ set { JVM.AllowNonVirtualCalls = value; }
+ }
}
}
#endif // !STATIC_COMPILER && !STUB_GENERATOR
@@ -91,6 +81,7 @@ namespace IKVM.Internal
{
static class JVM
{
+ internal const string JarClassList = "--ikvm-classes--/";
#if STATIC_COMPILER
internal const bool FinishingForDebugSave = false;
internal const bool IsSaveDebugImage = false;
@@ -103,7 +94,21 @@ namespace IKVM.Internal
#endif
#endif // STATIC_COMPILER
private static Assembly coreAssembly;
+#if !STUB_GENERATOR
internal static bool relaxedVerification = true;
+ internal static bool AllowNonVirtualCalls;
+#endif
+
+#if !STATIC_COMPILER && !STUB_GENERATOR && !FIRST_PASS
+ static JVM()
+ {
+ if (SafeGetEnvironmentVariable("IKVM_SAVE_DYNAMIC_ASSEMBLIES") != null)
+ {
+ IsSaveDebugImage = true;
+ java.lang.Runtime.getRuntime().addShutdownHook(new java.lang.Thread(ikvm.runtime.Delegates.toRunnable(DynamicClassLoader.SaveDebugImages)));
+ }
+ }
+#endif
internal static Version SafeGetAssemblyVersion(System.Reflection.Assembly asm)
{
@@ -268,11 +273,18 @@ namespace IKVM.Internal
message = String.Format("****** Critical Failure: {1} ******{0}{0}" +
"PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE{0}{0}" +
(messageBox != null ? "(on Windows you can use Ctrl+C to copy the contents of this message to the clipboard){0}{0}" : "") +
- "{2}{0}" +
+ "{2}{0}" +
"{3}{0}" +
- "{4}",
+ "{4} {5}-bit{0}{0}" +
+ "{6}{0}" +
+ "{7}{0}" +
+ "{8}",
Environment.NewLine,
message,
+ System.Reflection.Assembly.GetExecutingAssembly().FullName,
+ System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(),
+ Environment.Version,
+ IntPtr.Size * 8,
x,
x != null ? new StackTrace(x, true).ToString() : "",
new StackTrace(true));
@@ -420,25 +432,25 @@ namespace IKVM.Internal
}
#if !STATIC_COMPILER && !STUB_GENERATOR
- internal static object NewAnnotation(object classLoader, object definition)
+ internal static object NewAnnotation(java.lang.ClassLoader classLoader, object definition)
{
#if FIRST_PASS
return null;
#else
- return ikvm. at internal.AnnotationAttributeBase.newAnnotation((java.lang.ClassLoader)classLoader, definition);
+ return ikvm. at internal.AnnotationAttributeBase.newAnnotation(classLoader, definition);
#endif
}
#endif
#if !STATIC_COMPILER && !STUB_GENERATOR
- internal static object NewAnnotationElementValue(object classLoader, object expectedClass, object definition)
+ internal static object NewAnnotationElementValue(java.lang.ClassLoader classLoader, java.lang.Class expectedClass, object definition)
{
#if FIRST_PASS
return null;
#else
try
{
- return ikvm. at internal.AnnotationAttributeBase.decodeElementValue(definition, (java.lang.Class)expectedClass, (java.lang.ClassLoader)classLoader);
+ return ikvm. at internal.AnnotationAttributeBase.decodeElementValue(definition, expectedClass, classLoader);
}
catch(java.lang.IllegalAccessException)
{
diff --git a/external/ikvm/tools/SourceLicenseAnalyzer.cs b/external/ikvm/tools/SourceLicenseAnalyzer.cs
new file mode 100644
index 0000000..e21d534
--- /dev/null
+++ b/external/ikvm/tools/SourceLicenseAnalyzer.cs
@@ -0,0 +1,209 @@
+/*
+ Copyright (C) 2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace SourceLicenseAnalyzer
+{
+ class Years
+ {
+ internal static Years Dummy = new Years();
+ internal int min = Int32.MaxValue;
+ internal int max = Int32.MinValue;
+ internal string name;
+ }
+
+ class Program
+ {
+ static Dictionary<string, string> aliases = new Dictionary<string, string>();
+ static Dictionary<string, Years> copyrights = new Dictionary<string, Years>();
+ static int errorCount;
+
+ static void Def(string name, params string[] aliasesList)
+ {
+ Years y = new Years();
+ y.name = name;
+ copyrights.Add(name, y);
+ aliases.Add(name, name);
+ foreach (string s in aliasesList)
+ {
+ aliases.Add(s, name);
+ }
+ }
+
+ static int Main(string[] args)
+ {
+ Def("Free Software Foundation", "Free Software Foundation", "Free Software Foundation", "Free Software Fonudation, Inc.");
+ Def("Sun Microsystems, Inc.", "Sun Microsystems Inc");
+ Def("Jeroen Frijters");
+ Def("Thai Open Source Software Center Ltd");
+ Def("World Wide Web Consortium");
+ Def("International Business Machines, Inc.", "IBM Corp.", "IBM Corporation", "International Business Machines.", "International Business Machines Corporation");
+ Def("Wily Technology, Inc.");
+ Def("Unicode, Inc.");
+ Def("Colin Plumb");
+ Def("Taligent, Inc.");
+ Def("Red Hat, Inc.");
+ Def("The Open Group Research Institute");
+ Def("FundsXpress, INC.");
+ Def("AT&T");
+ Def("The Apache Software Foundation");
+ Def("freebxml.org");
+ Def("The Cryptix Foundation Limited");
+ Def("Visual Numerics Inc.");
+ Def("INRIA, France Telecom");
+ Def("Oracle and/or its affiliates", "Oracle Corporation");
+ Def("i-net software");
+ Def("Google Inc.");
+
+
+ // these are false positives
+ copyrights.Add("dummy", Years.Dummy);
+ aliases.Add("icSigCopyrightTag", "dummy");
+ aliases.Add("Copyright notice to stick into built-in-profile files.", "dummy");
+ aliases.Add("AssemblyCopyrightAttribute", "dummy");
+ aliases.Add("getVersionAndCopyrightInfo()", "dummy");
+ aliases.Add("Copyright by IBM and others and distributed under the * distributed under MIT/X", "dummy");
+ aliases.Add("* Copyright Office. *", "dummy");
+ aliases.Add("* Copyright office. *", "dummy");
+ aliases.Add("Your Corporation", "dummy");
+ aliases.Add("but I wrote that code so I co-own the copyright", "dummy");
+ aliases.Add("identifying information: \"Portions Copyrighted [year] * [name of copyright owner]\"", "dummy");
+
+ using (StreamReader rdr = new StreamReader("allsources.gen.lst"))
+ {
+ string file;
+ while ((file = rdr.ReadLine()) != null)
+ {
+ if (file != "AssemblyInfo.java")
+ {
+ ProcessFile(file);
+ }
+ }
+ }
+
+ Years[] years = new Years[copyrights.Count];
+ copyrights.Values.CopyTo(years, 0);
+
+ Array.Sort(years, delegate(Years x, Years y) { return x.name == null ? 0 : x.name.CompareTo(y.name); });
+
+ bool first = true;
+ foreach (Years y in years)
+ {
+ if (y != Years.Dummy)
+ {
+ if (!first)
+ {
+ Console.WriteLine("\\r\\n\" +");
+ }
+ first = false;
+ Console.Write(" \"");
+ if (y.min != y.max)
+ {
+ Console.Write("{0}-{1} {2}", y.min, y.max, y.name);
+ }
+ else
+ {
+ Console.Write("{0} {1}", y.min, y.name);
+ }
+ }
+ }
+ Console.WriteLine("\"");
+
+ return errorCount;
+ }
+
+ static void ProcessFile(string filePath)
+ {
+ bool gpl = false;
+ bool classpathException = false;
+ using (StreamReader rdr = new StreamReader(filePath))
+ {
+ string line;
+ string nextline = null;
+ while ((line = rdr.ReadLine()) != null)
+ {
+ gpl |= line.Contains("GNU General Public License");
+ classpathException |= line.Contains("subject to the \"Classpath\" exception") || line.Contains("permission to link this library with independent modules");
+ while (line != null && line.IndexOf("Copyright") != -1)
+ {
+ Years y = null;
+ foreach (KeyValuePair<string, string> kv in aliases)
+ {
+ if (line.IndexOf(kv.Key) != -1)
+ {
+ y = copyrights[kv.Value];
+ break;
+ }
+ }
+ if (y == null)
+ {
+ if (nextline == null)
+ {
+ nextline = rdr.ReadLine();
+ if (nextline.IndexOf("Copyright") == -1)
+ {
+ line += nextline;
+ continue;
+ }
+ }
+ if (filePath.Contains("/impsrc/com/sun/xml/internal/rngom/") && line.Contains("* Copyright (C) 2004-2011 *"))
+ {
+ // HACK ignore bogus copyright line
+ }
+ else
+ {
+ Error(filePath + ":" + Environment.NewLine + line);
+ }
+ }
+ else
+ {
+ foreach (Match m in Regex.Matches(line, "[0-9][0-9][0-9][0-9]"))
+ {
+ int v = Int32.Parse(m.Value);
+ y.min = Math.Min(y.min, v);
+ y.max = Math.Max(y.max, v);
+ }
+ }
+ line = nextline;
+ nextline = null;
+ }
+ }
+ }
+ if (gpl && !classpathException)
+ {
+ Error("GPL without Classpath exception: {0}", filePath);
+ }
+ }
+
+ static void Error(string message, params object[] args)
+ {
+ errorCount++;
+ Console.Error.WriteLine(message, args);
+ }
+ }
+}
diff --git a/external/ikvm/tools/implib.cs b/external/ikvm/tools/implib.cs
new file mode 100644
index 0000000..7784cd5
--- /dev/null
+++ b/external/ikvm/tools/implib.cs
@@ -0,0 +1,230 @@
+/*
+ Copyright (C) 2013 Jeroen Frijters
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jeroen Frijters
+ jeroen at frijters.net
+
+*/
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+using IKVM.Reflection;
+using IKVM.Reflection.Emit;
+using Type = IKVM.Reflection.Type;
+
+static class ImpLib
+{
+ static readonly Regex definition = new Regex(@"^\s*(.+)=\[([^\]]+)\](.+)::([^\s]+)\s+@(\d+)$");
+ static readonly Universe universe = new Universe();
+
+ static int Main(string[] args)
+ {
+ Options options = new Options();
+ List<Export> exports = new List<Export>();
+ if (!ParseArgs(args, options) || !ParseDefFile(options.deffile, exports))
+ {
+ return 1;
+ }
+ AssemblyName name = new AssemblyName(Path.GetFileNameWithoutExtension(options.outputFile));
+ name.Version = options.version;
+ name.KeyPair = options.key;
+ AssemblyBuilder ab = universe.DefineDynamicAssembly(name, AssemblyBuilderAccess.Save);
+ ModuleBuilder modb = ab.DefineDynamicModule(name.Name, options.outputFile);
+ foreach (Export exp in exports)
+ {
+ ExportMethod(modb, exp);
+ }
+ modb.CreateGlobalFunctions();
+ if (options.win32res != null)
+ {
+ ab.DefineUnmanagedResource(options.win32res);
+ }
+ else
+ {
+ if (options.description != null)
+ {
+ ab.SetCustomAttribute(new CustomAttributeBuilder(universe.Import(typeof(System.Reflection.AssemblyTitleAttribute)).GetConstructor(new Type[] { universe.Import(typeof(string)) }), new object[] { options.description }));
+ }
+ ab.DefineVersionInfoResource(options.product, options.version.ToString(), options.company, options.copyright, null);
+ }
+ ab.Save(options.outputFile, options.peKind, options.machine);
+ return 0;
+ }
+
+ static bool ParseArgs(string[] args, Options options)
+ {
+ options.peKind = PortableExecutableKinds.Required32Bit;
+ options.machine = ImageFileMachine.I386;
+ foreach (string arg in args)
+ {
+ if (arg.StartsWith("-r:", StringComparison.Ordinal) || arg.StartsWith("-reference:", StringComparison.Ordinal))
+ {
+ universe.LoadFile(arg.Substring(arg.IndexOf(':') + 1));
+ }
+ else if (arg.StartsWith("-out:", StringComparison.Ordinal))
+ {
+ options.outputFile = arg.Substring(5);
+ }
+ else if (arg == "-platform:x86")
+ {
+ options.peKind = PortableExecutableKinds.Required32Bit;
+ options.machine = ImageFileMachine.I386;
+ }
+ else if (arg == "-platform:x64")
+ {
+ options.peKind = PortableExecutableKinds.PE32Plus;
+ options.machine = ImageFileMachine.AMD64;
+ }
+ else if (arg == "-platform:arm")
+ {
+ options.peKind = PortableExecutableKinds.Unmanaged32Bit;
+ options.machine = ImageFileMachine.ARM;
+ }
+ else if (arg.StartsWith("-win32res:", StringComparison.Ordinal))
+ {
+ options.win32res = arg.Substring(10);
+ }
+ else if (arg.StartsWith("-key:", StringComparison.Ordinal))
+ {
+ options.key = new StrongNameKeyPair(arg.Substring(5));
+ }
+ else if (arg.StartsWith("-version:", StringComparison.Ordinal))
+ {
+ options.version = new Version(arg.Substring(9));
+ }
+ else if (arg.StartsWith("-product:", StringComparison.Ordinal))
+ {
+ options.product = arg.Substring(9);
+ }
+ else if (arg.StartsWith("-company:", StringComparison.Ordinal))
+ {
+ options.company = arg.Substring(9);
+ }
+ else if (arg.StartsWith("-copyright:", StringComparison.Ordinal))
+ {
+ options.copyright = arg.Substring(11);
+ }
+ else if (arg.StartsWith("-description:", StringComparison.Ordinal))
+ {
+ options.description = arg.Substring(13);
+ }
+ else if (options.deffile == null)
+ {
+ options.deffile = arg;
+ }
+ else
+ {
+ Console.WriteLine("Unknown option: {0}", arg);
+ return false;
+ }
+ }
+
+ if (options.deffile == null || options.outputFile == null)
+ {
+ Console.WriteLine("Usage: implib <exports.def> -out:<outputAssembly.dll> -r:<inputAssembly.dll> [-platform:<x86|x64|arm>] [-win32res:<file>] [-key:<keycontainer>] [-version:<M.m.b.r>]");
+ return false;
+ }
+
+ return true;
+ }
+
+ static bool ParseDefFile(string fileName, List<Export> exports)
+ {
+ using (StreamReader sr = new StreamReader(fileName))
+ {
+ string line;
+ while ((line = sr.ReadLine()) != null)
+ {
+ Match m = definition.Match(line);
+ if (m.Groups.Count == 6)
+ {
+ Export exp;
+ exp.name = m.Groups[1].Value;
+ exp.ordinal = Int32.Parse(m.Groups[5].Value);
+ exp.method = GetMethod(m.Groups[2].Value, m.Groups[3].Value, m.Groups[4].Value);
+ if (exp.method == null)
+ {
+ Console.WriteLine("Unable to find {0}", exp.name);
+ return false;
+ }
+ exports.Add(exp);
+ }
+ }
+ }
+ return true;
+ }
+
+ static MethodInfo GetMethod(string assembly, string typeName, string method)
+ {
+ foreach (Assembly asm in universe.GetAssemblies())
+ {
+ if (asm.GetName().Name.Equals(assembly, StringComparison.OrdinalIgnoreCase))
+ {
+ Type type = asm.GetType(typeName);
+ if (type != null)
+ {
+ return type.GetMethod(method, BindingFlags.Public | BindingFlags.Static);
+ }
+ }
+ }
+ return null;
+ }
+
+ static void ExportMethod(ModuleBuilder modb, Export exp)
+ {
+ ParameterInfo[] parameters = exp.method.GetParameters();
+ Type[] types = new Type[parameters.Length];
+ for (int i = 0; i < types.Length; i++)
+ {
+ types[i] = parameters[i].ParameterType;
+ }
+ MethodBuilder mb = modb.DefineGlobalMethod(exp.name, MethodAttributes.Public | MethodAttributes.Static, exp.method.ReturnType, types);
+ ILGenerator ilgen = mb.GetILGenerator();
+ for (int i = 0; i < types.Length; i++)
+ {
+ ilgen.Emit(OpCodes.Ldarg_S, (byte)i);
+ }
+ ilgen.Emit(OpCodes.Call, exp.method);
+ ilgen.Emit(OpCodes.Ret);
+ mb.__AddUnmanagedExport(mb.Name, exp.ordinal);
+ }
+
+ sealed class Options
+ {
+ internal PortableExecutableKinds peKind;
+ internal ImageFileMachine machine;
+ internal string deffile;
+ internal string outputFile;
+ internal string win32res;
+ internal StrongNameKeyPair key;
+ internal Version version;
+ internal string product;
+ internal string company;
+ internal string copyright;
+ internal string description;
+ }
+
+ struct Export
+ {
+ internal string name;
+ internal int ordinal;
+ internal MethodInfo method;
+ }
+}
diff --git a/external/ikvm/tools/tools.build b/external/ikvm/tools/tools.build
index 5e45aa6..4107e55 100644
--- a/external/ikvm/tools/tools.build
+++ b/external/ikvm/tools/tools.build
@@ -37,5 +37,11 @@
</sources>
</csc>
<exec program="writeappconfig.exe" useruntimeengine="true" />
+
+ <csc target="exe" output="SourceLicenseAnalyzer.exe" rebuild="true">
+ <sources>
+ <include name="SourceLicenseAnalyzer.cs" />
+ </sources>
+ </csc>
</target>
</project>
diff --git a/external/ikvm/update_from_cvs b/external/ikvm/update_from_cvs
index e78c5b2..94b4aa2 100755
--- a/external/ikvm/update_from_cvs
+++ b/external/ikvm/update_from_cvs
@@ -1,2 +1,3 @@
rsync -av rsync://ikvm.cvs.sourceforge.net/cvsroot/ikvm/ /tmp/ikvm
-git cvsimport -d /tmp/ikvm -v -u -z 1200 -k ikvm
+git cvsimport -d /tmp/ikvm -v -u -z 1200 -k ikvm -o master
+rm -rf /tmp/ikvm
\ No newline at end of file
diff --git a/external/maccore/src/AddressBook/ABAddressBook.cs b/external/maccore/src/AddressBook/ABAddressBook.cs
index c3078c8..0032dd4 100644
--- a/external/maccore/src/AddressBook/ABAddressBook.cs
+++ b/external/maccore/src/AddressBook/ABAddressBook.cs
@@ -4,7 +4,7 @@
// Authors: Mono Team
//
// Copyright (C) 2009 Novell, Inc
-// Copyright 2011, 2012 Xamarin Inc.
+// Copyright 2011-2013 Xamarin Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -69,13 +69,17 @@ namespace MonoMac.AddressBook {
//
// Meaning we can't rely on static constructors, as they could be invoked
// before those functions have been invoked. :-/
+ //
+ // Note that the above comment was removed from iOS 6.0+ documentation (and were not part of OSX docs AFAIK).
+ // It make sense since it's not possible to call those functions, from 6.0+ they will return NULL on devices,
+ // unless the application has been authorized to access the address book.
class InitConstants {
public static void Init () {}
static InitConstants ()
{
- // ensure we can init.
- CFObject.CFRelease (ABAddressBook.ABAddressBookCreate ());
+ // ensure we can init. This is needed before iOS6 (as per doc).
+ IntPtr p = ABAddressBook.ABAddressBookCreate ();
ABGroupProperty.Init ();
ABLabel.Init ();
@@ -89,6 +93,11 @@ namespace MonoMac.AddressBook {
ABPersonRelatedNamesLabel.Init ();
ABPersonUrlLabel.Init ();
ABSourcePropertyId.Init ();
+
+ // From iOS 6.0+ this might return NULL, e.g. if the application is not authorized to access the
+ // address book, and we would crash if we tried to release a null pointer
+ if (p != IntPtr.Zero)
+ CFObject.CFRelease (p);
}
}
diff --git a/external/maccore/src/AudioUnit/AUGraph.cs b/external/maccore/src/AudioUnit/AUGraph.cs
index 7bc7cca..a09fae7 100644
--- a/external/maccore/src/AudioUnit/AUGraph.cs
+++ b/external/maccore/src/AudioUnit/AUGraph.cs
@@ -1,4 +1,4 @@
-//
+//
// AUGraph.cs: AUGraph wrapper class
//
// Authors:
diff --git a/external/maccore/src/AudioUnit/AudioComponent.cs b/external/maccore/src/AudioUnit/AudioComponent.cs
index ff57972..34ee8c0 100644
--- a/external/maccore/src/AudioUnit/AudioComponent.cs
+++ b/external/maccore/src/AudioUnit/AudioComponent.cs
@@ -1,4 +1,4 @@
-//
+//
// AudioComponent.cs: AudioComponent wrapper class
//
// Author:
diff --git a/external/maccore/src/AudioUnit/AudioComponentDescription.cs b/external/maccore/src/AudioUnit/AudioComponentDescription.cs
index f7348e4..d5ce3b5 100644
--- a/external/maccore/src/AudioUnit/AudioComponentDescription.cs
+++ b/external/maccore/src/AudioUnit/AudioComponentDescription.cs
@@ -1,4 +1,4 @@
-//
+//
// AudioComponentDescription.cs: AudioComponentDescription wrapper class
//
// Author:
diff --git a/external/maccore/src/AudioUnit/AudioGraphEventArgs.cs b/external/maccore/src/AudioUnit/AudioGraphEventArgs.cs
index 17ae296..07f34ac 100644
--- a/external/maccore/src/AudioUnit/AudioGraphEventArgs.cs
+++ b/external/maccore/src/AudioUnit/AudioGraphEventArgs.cs
@@ -1,4 +1,4 @@
-//
+//
// AudioGraphEventArgs.cs: Audio graph callback event arguments
//
// Author:
diff --git a/external/maccore/src/AudioUnit/AudioUnit.cs b/external/maccore/src/AudioUnit/AudioUnit.cs
index 84506a5..e134992 100644
--- a/external/maccore/src/AudioUnit/AudioUnit.cs
+++ b/external/maccore/src/AudioUnit/AudioUnit.cs
@@ -1,4 +1,4 @@
-//
+//
// AudioUnit.cs: AudioUnit wrapper class
//
// Authors:
diff --git a/external/maccore/src/AudioUnit/AudioUnitEventArgs.cs b/external/maccore/src/AudioUnit/AudioUnitEventArgs.cs
index 5da7801..52f502c 100644
--- a/external/maccore/src/AudioUnit/AudioUnitEventArgs.cs
+++ b/external/maccore/src/AudioUnit/AudioUnitEventArgs.cs
@@ -1,4 +1,4 @@
-//
+//
// AudioUnitEventArgs.cs: AudioUnit callback argument
//
// Author:
diff --git a/external/maccore/src/AudioUnit/ExtAudioFile.cs b/external/maccore/src/AudioUnit/ExtAudioFile.cs
index db8649e..499789e 100644
--- a/external/maccore/src/AudioUnit/ExtAudioFile.cs
+++ b/external/maccore/src/AudioUnit/ExtAudioFile.cs
@@ -1,4 +1,4 @@
-//
+//
// ExtAudioFile.cs: ExtAudioFile wrapper class
//
// Authors:
diff --git a/external/maccore/src/CoreFoundation/CFArray.cs b/external/maccore/src/CoreFoundation/CFArray.cs
index dffd82e..b9540f3 100644
--- a/external/maccore/src/CoreFoundation/CFArray.cs
+++ b/external/maccore/src/CoreFoundation/CFArray.cs
@@ -62,6 +62,9 @@ namespace MonoMac.CoreFoundation {
get {return handle;}
}
+ [DllImport (Constants.CoreFoundationLibrary, EntryPoint="CFArrayGetTypeID")]
+ public extern static int GetTypeID ();
+
~CFArray ()
{
Dispose (false);
diff --git a/external/maccore/src/CoreFoundation/CFBoolean.cs b/external/maccore/src/CoreFoundation/CFBoolean.cs
index 51c280b..a40b338 100644
--- a/external/maccore/src/CoreFoundation/CFBoolean.cs
+++ b/external/maccore/src/CoreFoundation/CFBoolean.cs
@@ -77,6 +77,9 @@ namespace MonoMac.CoreFoundation {
}
}
+ [DllImport (Constants.CoreFoundationLibrary, EntryPoint="CFBooleanGetTypeID")]
+ public extern static int GetTypeID ();
+
public void Dispose ()
{
Dispose (true);
diff --git a/external/maccore/src/CoreFoundation/CFData.cs b/external/maccore/src/CoreFoundation/CFData.cs
index 3140aa3..2145d90 100644
--- a/external/maccore/src/CoreFoundation/CFData.cs
+++ b/external/maccore/src/CoreFoundation/CFData.cs
@@ -63,6 +63,9 @@ namespace MonoMac.CoreFoundation {
get { return handle; }
}
+ [DllImport (Constants.CoreFoundationLibrary, EntryPoint="CFDataGetTypeID")]
+ public extern static int GetTypeID ();
+
protected virtual void Dispose (bool disposing)
{
if (handle != IntPtr.Zero){
diff --git a/external/maccore/src/CoreFoundation/CFDictionary.cs b/external/maccore/src/CoreFoundation/CFDictionary.cs
index 008e500..5173bc6 100644
--- a/external/maccore/src/CoreFoundation/CFDictionary.cs
+++ b/external/maccore/src/CoreFoundation/CFDictionary.cs
@@ -54,6 +54,9 @@ namespace MonoMac.CoreFoundation {
this.Handle = handle;
}
+ [DllImport (Constants.CoreFoundationLibrary, EntryPoint="CFDictionaryGetTypeID")]
+ public extern static int GetTypeID ();
+
~CFDictionary ()
{
Dispose (false);
diff --git a/external/maccore/src/CoreGraphics/CGContext.cs b/external/maccore/src/CoreGraphics/CGContext.cs
index 0241297..631f52d 100644
--- a/external/maccore/src/CoreGraphics/CGContext.cs
+++ b/external/maccore/src/CoreGraphics/CGContext.cs
@@ -249,17 +249,16 @@ namespace MonoMac.CoreGraphics {
extern static void CGContextSetLineDash(IntPtr c, float phase, float [] lengths, int count);
public void SetLineDash (float phase, float [] lengths)
{
- if (lengths == null)
- throw new ArgumentNullException ("lengths");
- CGContextSetLineDash (handle, phase, lengths, lengths.Length);
+ int n = lengths == null ? 0 : lengths.Length;
+ CGContextSetLineDash (handle, phase, lengths, n);
}
public void SetLineDash (float phase, float [] lengths, int n)
{
if (lengths == null)
- throw new ArgumentNullException ("lengths");
- if (n > lengths.Length)
- throw new ArgumentNullException ("n");
+ n = 0;
+ else if (n < 0 || n > lengths.Length)
+ throw new ArgumentException ("n");
CGContextSetLineDash (handle, phase, lengths, n);
}
diff --git a/external/maccore/src/CoreMedia/CMSampleBuffer.cs b/external/maccore/src/CoreMedia/CMSampleBuffer.cs
index f1d64e7..9b61a76 100644
--- a/external/maccore/src/CoreMedia/CMSampleBuffer.cs
+++ b/external/maccore/src/CoreMedia/CMSampleBuffer.cs
@@ -5,7 +5,7 @@
// Marek Safar (marek.safar at gmail.com)
//
// Copyright 2010 Novell, Inc
-// Copyright 2012 Xamarin Inc
+// Copyright 2012-2013 Xamarin Inc
//
using System;
using System.Drawing;
@@ -17,6 +17,8 @@ using MonoMac.Foundation;
using MonoMac.CoreFoundation;
using MonoMac.ObjCRuntime;
+using OSStatus = System.Int32;
+
#if !COREBUILD
using MonoMac.AudioToolbox;
using MonoMac.CoreVideo;
@@ -123,6 +125,31 @@ namespace MonoMac.CoreMedia {
return new CMSampleBuffer (buffer, true);
}
+
+ [DllImport(Constants.CoreMediaLibrary)]
+ static extern OSStatus CMSampleBufferCreateCopyWithNewTiming (
+ IntPtr allocator,
+ IntPtr originalSBuf,
+ int numSampleTimingEntries,
+ CMSampleTimingInfo []sampleTimingArray,
+ out IntPtr sBufCopyOut
+ );
+
+ public static CMSampleBuffer CreateWithNewTiming (CMSampleBuffer original, CMSampleTimingInfo [] timing)
+ {
+ OSStatus status;
+ return CreateWithNewTiming (original, timing, out status);
+ }
+
+ public static CMSampleBuffer CreateWithNewTiming (CMSampleBuffer original, CMSampleTimingInfo [] timing, out OSStatus status)
+ {
+ IntPtr handle;
+
+ if ((status = CMSampleBufferCreateCopyWithNewTiming (IntPtr.Zero, original.Handle, timing.Length, timing, out handle)) != 0)
+ return null;
+
+ return new CMSampleBuffer (handle, true);
+ }
/*
[DllImport(Constants.CoreMediaLibrary)]
int CMSampleBufferCallForEachSample (
@@ -161,15 +188,7 @@ namespace MonoMac.CoreMedia {
CMSampleBufferRef sbuf,
CMSampleBufferRef *sbufCopyOut
);
-
- [DllImport(Constants.CoreMediaLibrary)]
- int CMSampleBufferCreateCopyWithNewTiming (
- CFAllocatorRef allocator,
- CMSampleBufferRef originalSBuf,
- int numSampleTimingEntries,
- const CMSampleTimingInfo *sampleTimingArray,
- CMSampleBufferRef *sBufCopyOut
- );*/
+ */
[DllImport(Constants.CoreMediaLibrary)]
static extern CMSampleBufferError CMSampleBufferCreateForImageBuffer (IntPtr allocator,
@@ -442,15 +461,51 @@ namespace MonoMac.CoreMedia {
int sampleIndex,
CMSampleTimingInfo *timingInfoOut
);
+ */
[DllImport(Constants.CoreMediaLibrary)]
- int CMSampleBufferGetSampleTimingInfoArray (
- CMSampleBufferRef sbuf,
+ static extern OSStatus CMSampleBufferGetSampleTimingInfoArray (
+ IntPtr sbuf,
int timingArrayEntries,
- CMSampleTimingInfo *timingArrayOut,
- int *timingArrayEntriesNeededOut
- );*/
-
+ CMSampleTimingInfo [] timingArrayOut,
+ out int timingArrayEntriesNeededOut
+ );
+
+#if !COREBUILD
+ public CMSampleTimingInfo [] GetSampleTimingInfo ()
+ {
+ OSStatus status;
+ return GetSampleTimingInfo (out status);
+ }
+
+ public CMSampleTimingInfo [] GetSampleTimingInfo (out OSStatus status) {
+ int count;
+
+ status = 0;
+
+ if (handle == IntPtr.Zero)
+ return null;
+
+ if ((status = CMSampleBufferGetSampleTimingInfoArray (handle, 0, null, out count)) != 0)
+ return null;
+
+ CMSampleTimingInfo [] pInfo = new CMSampleTimingInfo [count];
+
+ if (count == 0)
+ return pInfo;
+
+ if ((status = CMSampleBufferGetSampleTimingInfoArray (handle, count, pInfo, out count)) != 0)
+ return null;
+
+ return pInfo;
+ }
+
+ static string OSStatusToString (OSStatus status)
+ {
+ return new NSError (NSError.OsStatusErrorDomain, status).LocalizedDescription;
+ }
+#endif
+
[DllImport(Constants.CoreMediaLibrary)]
extern static uint CMSampleBufferGetTotalSampleSize (IntPtr handle);
diff --git a/external/maccore/src/CoreMidi/MidiServices.cs b/external/maccore/src/CoreMidi/MidiServices.cs
index f7af376..0290d29 100644
--- a/external/maccore/src/CoreMidi/MidiServices.cs
+++ b/external/maccore/src/CoreMidi/MidiServices.cs
@@ -714,7 +714,10 @@ namespace MonoMac.CoreMidi {
delegate void MidiReadProc (IntPtr packetList, IntPtr context, IntPtr srcPtr);
public class MidiPort : MidiObject {
-
+ #if !MONOMAC
+ static bool isDevice = MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.DEVICE;
+ #endif
+
[DllImport (Constants.CoreMidiLibrary)]
extern static int MIDIInputPortCreate (IntPtr client, IntPtr portName, MidiReadProc readProc, IntPtr context, out IntPtr midiPort);
@@ -770,7 +773,13 @@ namespace MonoMac.CoreMidi {
for (int i = 0; i < npackets; i++){
ushort len = (ushort) Marshal.ReadInt16 (packetList, p+8);
packets [i] = new MidiPacket (Marshal.ReadInt64 (packetList, p), len, (IntPtr)((long)packetList + p + 10));
- p += 10 + len;
+#if !MONOMAC
+ // MIDIPacket must be 4-byte aligned for ARM
+ if (isDevice)
+ p += (((10 + len) + 3) & ~3);
+ else
+#endif
+ p += 10 + len;
}
return packets;
}
diff --git a/external/maccore/src/Foundation/Enum.cs b/external/maccore/src/Foundation/Enum.cs
index 36ee1f1..a97e151 100644
--- a/external/maccore/src/Foundation/Enum.cs
+++ b/external/maccore/src/Foundation/Enum.cs
@@ -336,15 +336,16 @@ namespace MonoMac.Foundation {
EndsWith,
In,
CustomSelector,
- Contains,
+ Contains = 99,
Between
}
[Flags]
public enum NSComparisonPredicateOptions {
- None=0x00,
- CaseInsensitive=0x01,
- DiacriticInsensitive=0x02
+ None = 0x00,
+ CaseInsensitive = 1<<0,
+ DiacriticInsensitive = 1<<1,
+ Normalized = 1<<2
}
public enum NSCompoundPredicateType {
@@ -621,4 +622,11 @@ namespace MonoMac.Foundation {
Background,
Voice
}
+
+ [Flags]
+ public enum NSSortOptions {
+ Concurrent = 1 << 0,
+ Stable = 1 << 4
+ }
+
}
diff --git a/external/maccore/src/Foundation/NSOrderedSet.cs b/external/maccore/src/Foundation/NSOrderedSet.cs
new file mode 100644
index 0000000..4343520
--- /dev/null
+++ b/external/maccore/src/Foundation/NSOrderedSet.cs
@@ -0,0 +1,161 @@
+//
+// NSOrderedSet.cs:
+//
+// Authors:
+// Miguel de Icaza
+//
+// Copyright 2013, Xamarin Inc
+//
+// 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;
+using System.Collections.Generic;
+
+using MonoMac.ObjCRuntime;
+
+namespace MonoMac.Foundation {
+
+ public partial class NSOrderedSet : IEnumerable<NSObject> {
+ internal const string selSetWithArray = "orderedSetWithArray:";
+
+ public NSOrderedSet (params NSObject [] objs) : this (NSArray.FromNSObjects (objs))
+ {
+ }
+
+ public NSOrderedSet (params object [] objs) : this (NSArray.FromObjects (objs))
+ {
+ }
+
+ public NSOrderedSet (params string [] strings) : this (NSArray.FromStrings (strings))
+ {
+ }
+
+ public NSObject this [int idx] {
+ get {
+ return GetObject (idx);
+ }
+ }
+
+ public T [] ToArray<T> () where T : NSObject
+ {
+ IntPtr nsarr = _ToArray ();
+ return NSArray.ArrayFromHandle<T> (nsarr);
+ }
+
+ public static NSOrderedSet MakeNSOrderedSet<T> (T [] values) where T : NSObject
+ {
+ NSArray a = NSArray.FromNSObjects (values);
+ return (NSOrderedSet) Runtime.GetNSObject (MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr (class_ptr, Selector.GetHandle (selSetWithArray), a.Handle));
+ }
+
+ public IEnumerator<NSObject> GetEnumerator ()
+ {
+ var enumerator = _GetEnumerator ();
+ NSObject obj;
+
+ while ((obj = enumerator.NextObject ()) != null)
+ yield return obj as NSObject;
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ var enumerator = _GetEnumerator ();
+ NSObject obj;
+
+ while ((obj = enumerator.NextObject ()) != null)
+ yield return obj;
+ }
+
+ public static NSOrderedSet operator + (NSOrderedSet first, NSOrderedSet second)
+ {
+ if (first == null)
+ return second;
+ if (second == null)
+ return first;
+ var copy = new NSMutableOrderedSet ();
+ copy.UnionSet (second.AsSet ());
+ return copy;
+ }
+
+ public static NSOrderedSet operator - (NSOrderedSet first, NSOrderedSet second)
+ {
+ if (first == null)
+ return null;
+ if (second == null)
+ return first;
+ var copy = new NSMutableOrderedSet (first);
+ copy.MinusSet (second.AsSet ());
+ return copy;
+ }
+
+ public static NSOrderedSet operator - (NSOrderedSet first, NSSet second)
+ {
+ if (first == null)
+ return null;
+ if (second == null)
+ return first;
+ var copy = new NSMutableOrderedSet (first);
+ copy.MinusSet (second);
+ return copy;
+ }
+
+ public static bool operator == (NSOrderedSet first, NSOrderedSet second)
+ {
+ return first.IsEqualToOrderedSet (second);
+ }
+
+ public static bool operator != (NSOrderedSet first, NSOrderedSet second)
+ {
+ return !first.IsEqualToOrderedSet (second);
+ }
+
+ public bool Contains (object obj)
+ {
+ return Contains (NSObject.FromObject (obj));
+ }
+ }
+
+ public partial class NSMutableOrderedSet {
+ public NSMutableOrderedSet (params NSObject [] objs) : this (NSArray.FromNSObjects (objs))
+ {
+ }
+
+ public NSMutableOrderedSet (params object [] objs) : this (NSArray.FromObjects (objs))
+ {
+ }
+
+ public NSMutableOrderedSet (params string [] strings) : this (NSArray.FromStrings (strings))
+ {
+ }
+
+ public new NSObject this [int idx] {
+ get {
+ return GetObject (idx);
+ }
+
+ set {
+ SetObject (value, idx);
+ }
+ }
+ }
+}
diff --git a/external/maccore/src/Foundation/NSUuid.cs b/external/maccore/src/Foundation/NSUuid.cs
index b3d0ef7..07a0ab5 100644
--- a/external/maccore/src/Foundation/NSUuid.cs
+++ b/external/maccore/src/Foundation/NSUuid.cs
@@ -31,9 +31,9 @@ namespace MonoMac.Foundation {
IntPtr ptr = GetIntPtr (bytes);
if (IsDirectBinding) {
- Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.GetHandle ("initWithUUIDBytes:"), ptr);
+ Handle = Messaging.IntPtr_objc_msgSend_IntPtr (this.Handle, Selector.GetHandle ("initWithUUIDBytes:"), ptr);
} else {
- Handle = MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithUUIDBytes:"), ptr);
+ Handle = Messaging.IntPtr_objc_msgSendSuper_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithUUIDBytes:"), ptr);
}
}
@@ -49,4 +49,4 @@ namespace MonoMac.Foundation {
return ret;
}
}
-}
\ No newline at end of file
+}
diff --git a/external/maccore/src/ObjCRuntime/AdoptsAttribute.cs b/external/maccore/src/ObjCRuntime/AdoptsAttribute.cs
index b3c916c..32e94e8 100644
--- a/external/maccore/src/ObjCRuntime/AdoptsAttribute.cs
+++ b/external/maccore/src/ObjCRuntime/AdoptsAttribute.cs
@@ -29,7 +29,6 @@
using System;
using System.Runtime.InteropServices;
-using MonoMac.Foundation;
namespace MonoMac.ObjCRuntime {
diff --git a/external/maccore/src/ObjCRuntime/Blocks.cs b/external/maccore/src/ObjCRuntime/Blocks.cs
index b6c97fd..9df8bd9 100644
--- a/external/maccore/src/ObjCRuntime/Blocks.cs
+++ b/external/maccore/src/ObjCRuntime/Blocks.cs
@@ -29,7 +29,7 @@ using System.Reflection;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using MonoMac.Foundation;
+//using MonoMac.Foundation;
using MonoMac.ObjCRuntime;
namespace MonoMac.ObjCRuntime {
diff --git a/external/maccore/src/avfoundation.cs b/external/maccore/src/avfoundation.cs
index 8c5cd5e..202e99c 100644
--- a/external/maccore/src/avfoundation.cs
+++ b/external/maccore/src/avfoundation.cs
@@ -1166,10 +1166,10 @@ namespace MonoMac.AVFoundation {
AVAssetReaderVideoCompositionOutput Create (AVAssetTrack [] videoTracks, [NullAllowed] CVPixelBufferAttributes settings);
[Export ("initWithVideoTracks:videoSettings:")]
- IntPtr Constructor (AVAssetTrack [] videoTracks, NSDictionary videoSettings);
+ IntPtr Constructor (AVAssetTrack [] videoTracks, [NullAllowed] NSDictionary videoSettings);
[Wrap ("this (videoTracks, settings == null ? null : settings.Dictionary)")]
- IntPtr Constructor (AVAssetTrack [] videoTracks, CVPixelBufferAttributes settings);
+ IntPtr Constructor (AVAssetTrack [] videoTracks, [NullAllowed] CVPixelBufferAttributes settings);
[Export ("videoSettings")]
NSDictionary WeakVideoSettings { get; }
diff --git a/external/maccore/src/btouch.cs b/external/maccore/src/btouch.cs
index 0a66a94..550fa67 100644
--- a/external/maccore/src/btouch.cs
+++ b/external/maccore/src/btouch.cs
@@ -89,6 +89,7 @@ class BindingTouch {
bool pmode = true;
bool nostdlib = false;
bool clean_mono_path = false;
+ bool native_exception_marshalling = false;
bool inline_selectors = false;
List<string> sources;
var resources = new List<string> ();
@@ -131,6 +132,7 @@ class BindingTouch {
{ "use-zero-copy", v=> zero_copy = true },
{ "nostdlib", "Does not reference mscorlib.dll library", l => nostdlib = true },
{ "no-mono-path", "Launches compiler with empty MONO_PATH", l => clean_mono_path = true },
+ { "native-exception-marshalling", "Eanble the marshalling support for Objective-C exceptions", l => native_exception_marshalling = true },
{ "inline-selectors:", "If Selector.GetHandle is inlined and does not need to be cached (default: false)", v => inline_selectors = string.Equals ("true", v, StringComparison.OrdinalIgnoreCase) || string.IsNullOrEmpty (v) },
#if !MONOMAC
{ "link-with=,", "Link with a native library {0:FILE} to the binding, embedded as a resource named {1:ID}",
@@ -182,7 +184,7 @@ class BindingTouch {
var tmpass = Path.Combine (tmpdir, "temp.dll");
// -nowarn:436 is to avoid conflicts in definitions between core.dll and the sources
- var cargs = String.Format ("-unsafe -target:library {0} -nowarn:436 -out:{1} -r:{2} {3} {4} {5} -r:{6} {7} {8} {9}",
+ var cargs = String.Format ("-debug -unsafe -target:library {0} -nowarn:436 -out:{1} -r:{2} {3} {4} {5} -r:{6} {7} {8} {9}",
string.Join (" ", sources.ToArray ()),
tmpass, Environment.GetCommandLineArgs ()[0],
string.Join (" ", core_sources.ToArray ()), refs, unsafef ? "-unsafe" : "",
@@ -255,6 +257,7 @@ class BindingTouch {
CoreNSObject = CoreObject,
BaseDir = basedir != null ? basedir : tmpdir,
ZeroCopyStrings = zero_copy,
+ NativeExceptionMarshalling = native_exception_marshalling,
#if MONOMAC
OnlyX86 = true,
#endif
diff --git a/external/maccore/src/coredata.cs b/external/maccore/src/coredata.cs
index b92da81..a892d9b 100644
--- a/external/maccore/src/coredata.cs
+++ b/external/maccore/src/coredata.cs
@@ -650,7 +650,6 @@ namespace MonoMac.CoreData
IntPtr Constructor (NSManagedObjectContextConcurrencyType ct);
[Export ("performBlock:")]
- [Async]
void Perform (/* non null */ NSAction action);
[Export ("performBlockAndWait:")]
diff --git a/external/maccore/src/foundation.cs b/external/maccore/src/foundation.cs
index 12238cd..5390a4c 100644
--- a/external/maccore/src/foundation.cs
+++ b/external/maccore/src/foundation.cs
@@ -3062,7 +3062,7 @@ namespace MonoMac.Foundation
[Since (5,0)]
[Static]
[Export ("sendAsynchronousRequest:queue:completionHandler:")]
- [Async (ResultTypeName = "NSUrlAsyncResult")]
+ [Async (ResultTypeName = "NSUrlAsyncResult", MethodName="SendRequestAsync")]
void SendAsynchronousRequest (NSUrlRequest request, NSOperationQueue queue, NSUrlConnectionDataResponse completionHandler);
#if !MONOMAC
@@ -4169,6 +4169,147 @@ namespace MonoMac.Foundation
}
[BaseType (typeof (NSObject))]
+ public interface NSOrderedSet {
+ [Export ("initWithObject:")]
+ IntPtr Constructor (NSObject start);
+
+ [Export ("initWithArray:"), Internal]
+ IntPtr Constructor (NSArray array);
+
+ [Export ("initWithSet:")]
+ IntPtr Constructor (NSSet source);
+
+ [Export ("initWithOrderedSet:")]
+ IntPtr Constructor (NSOrderedSet source);
+
+ [Export ("count")]
+ int Count { get; }
+
+ [Export ("objectAtIndex:"), Internal]
+ NSObject GetObject (int idx);
+
+ [Export ("array"), Internal]
+ IntPtr _ToArray ();
+
+ [Export ("indexOfObject:")]
+ int IndexOf (NSObject obj);
+
+ [Export ("objectEnumerator"), Internal]
+ NSEnumerator _GetEnumerator ();
+
+ [Export ("set")]
+ NSSet AsSet ();
+
+ [Export ("containsObject:")]
+ bool Contains (NSObject obj);
+
+ [Export ("firstObject")]
+ NSObject FirstObject ();
+
+ [Export ("lastObject")]
+ NSObject LastObject ();
+
+ [Export ("isEqualToOrderedSet:")]
+ bool IsEqualToOrderedSet (NSOrderedSet other);
+
+ [Export ("intersectsOrderedSet:")]
+ bool Intersects (NSOrderedSet other);
+
+ [Export ("intersectsSet:")]
+ bool Intersects (NSSet other);
+
+ [Export ("isSubsetOfOrderedSet:")]
+ bool IsSubset (NSOrderedSet other);
+
+ [Export ("isSubsetOfSet:")]
+ bool IsSubset (NSSet other);
+
+ [Export ("reversedOrderedSet")]
+ NSOrderedSet GetReverseOrderedSet ();
+ }
+
+ [BaseType (typeof (NSOrderedSet))]
+ public interface NSMutableOrderedSet {
+ [Export ("initWithObject:")]
+ IntPtr Constructor (NSObject start);
+
+ [Export ("initWithSet:")]
+ IntPtr Constructor (NSSet source);
+
+ [Export ("initWithOrderedSet:")]
+ IntPtr Constructor (NSOrderedSet source);
+
+ [Export ("initWithCapacity:")]
+ IntPtr Constructor (int capacity);
+
+ [Export ("initWithArray:"), Internal]
+ IntPtr Constructor (NSArray array);
+
+ [Export ("unionSet:"), Internal]
+ void UnionSet (NSSet other);
+
+ [Export ("minusSet:"), Internal]
+ void MinusSet (NSSet other);
+
+ [Export ("insertObject:atIndex:")]
+ void Insert (NSObject obj, int atIndex);
+
+ [Export ("removeObjectAtIndex:")]
+ void Remove (int index);
+
+ [Export ("replaceObjectAtIndex:withObject:")]
+ void Replace (int objectAtIndex, NSObject newObject);
+
+ [Export ("addObject:")]
+ void Add (NSObject obj);
+
+ [Export ("addObjectsFromArray:")]
+ void AddObjects (NSObject [] source);
+
+ [Export ("insertObjects:atIndexes:")]
+ void InsertObjects (NSObject [] objects, NSIndexSet atIndexes);
+
+ [Export ("removeObjectsAtIndexes:")]
+ void RemoveObjects (NSIndexSet indexSet);
+
+ [Export ("exchangeObjectAtIndex:withObjectAtIndex:")]
+ void ExchangeObject (int first, int second);
+
+ [Export ("moveObjectsAtIndexes:toIndex:")]
+ void MoveObjects (NSIndexSet indexSet, int destination);
+
+ [Export ("setObject:atIndex:")]
+ void SetObject (NSObject obj, int index);
+
+ [Export ("replaceObjectsAtIndexes:withObjects:")]
+ void ReplaceObjects (NSIndexSet indexSet, NSObject [] replacementObjects);
+
+ [Export ("removeObjectsInRange:")]
+ void RemoveObjects (NSRange range);
+
+ [Export ("removeAllObjects")]
+ void RemoveAllObjects ();
+
+ [Export ("removeObject:")]
+ void RemoveObject (NSObject obj);
+
+ [Export ("removeObjectsInArray:")]
+ void RemoveObjects (NSObject [] objects);
+
+ [Export ("intersectOrderedSet:")]
+ void Intersect (NSOrderedSet intersectWith);
+
+ [Export ("sortUsingComparator:")]
+ void Sort (NSComparator comparator);
+
+ [Export ("sortWithOptions:usingComparator:")]
+ void Sort (NSSortOptions sortOptions, NSComparator comparator);
+
+ [Export ("sortRange:options:usingComparator:")]
+ void SortRange (NSRange range, NSSortOptions sortOptions, NSComparator comparator);
+ }
+
+ [BaseType (typeof (NSObject))]
// Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
[DisableDefaultCtor]
public interface NSOrthography {
diff --git a/external/maccore/src/generator.cs b/external/maccore/src/generator.cs
index 08baeeb..a9f4fe8 100644
--- a/external/maccore/src/generator.cs
+++ b/external/maccore/src/generator.cs
@@ -1027,6 +1027,7 @@ public class Generator {
public bool BindThirdPartyLibrary = false;
public bool InlineSelectors;
+ public bool NativeExceptionMarshalling = false;
public string BaseDir { get { return basedir; } set { basedir = value; }}
string basedir;
public List<string> GeneratedFiles = new List<string> ();
@@ -1478,7 +1479,7 @@ public class Generator {
{
var sb = new StringBuilder ();
- if (HasAttribute (mi, typeof (MarshalNativeExceptionsAttribute)))
+ if (NativeExceptionMarshalling && HasAttribute (mi, typeof (MarshalNativeExceptionsAttribute)))
#if MONOMAC
sb.Append ("monomac_");
#else
@@ -1663,7 +1664,7 @@ public class Generator {
marshal_types.Add (new MarshalType (typeof (CGContext), "IntPtr", "{0}.Handle", "new CGContext ("));
marshal_types.Add (new MarshalType (typeof (CGImage), "IntPtr", "{0}.Handle", "new CGImage ("));
marshal_types.Add (new MarshalType (typeof (NSObject), "IntPtr", "{0}.Handle", "Runtime.GetNSObject ("));
- marshal_types.Add (new MarshalType (typeof (Selector), "IntPtr", "{0}.Handle", "new Selector ("));
+ marshal_types.Add (new MarshalType (typeof (Selector), "IntPtr", "{0}.Handle", "Selector.FromHandle ("));
marshal_types.Add (new MarshalType (typeof (Class), "IntPtr", "{0}.Handle", "new Class ("));
marshal_types.Add (new MarshalType (typeof (NSString), "IntPtr", "{0}.Handle", "new NSString ("));
marshal_types.Add (new MarshalType (typeof (CFRunLoop), "IntPtr", "{0}.Handle", "new CFRunLoop ("));
@@ -2786,7 +2787,7 @@ public class Generator {
print (init_binding_type);
}
- var may_throw = HasAttribute (mi, typeof (MarshalNativeExceptionsAttribute));
+ var may_throw = NativeExceptionMarshalling && HasAttribute (mi, typeof (MarshalNativeExceptionsAttribute));
if (may_throw) {
print ("try {");
@@ -3436,6 +3437,8 @@ public class Generator {
bool is_static_class = type.GetCustomAttributes (typeof (StaticAttribute), true).Length > 0 || is_category_class;
bool is_model = type.GetCustomAttributes (typeof (ModelAttribute), true).Length > 0;
bool is_protocol = HasAttribute (type, typeof (ProtocolAttribute));
+ string class_visibility = HasAttribute (type, typeof (InternalAttribute)) ? "internal" : "public";
+
var default_ctor_visibility = GetAttribute<DefaultCtorVisibilityAttribute> (type);
object [] btype = type.GetCustomAttributes (typeof (BaseTypeAttribute), true);
BaseTypeAttribute bta = btype.Length > 0 ? ((BaseTypeAttribute) btype [0]) : null;
@@ -3466,7 +3469,8 @@ public class Generator {
PrintPlatformAttributes (type);
- print ("public unsafe {0}partial class {1} {2} {{",
+ print ("{0} unsafe {1}partial class {2} {3} {{",
+ class_visibility,
class_mod,
TypeName,
base_type != typeof (object) && TypeName != "NSObject" && !is_category_class ? ": " + FormatType (type, base_type) : "");
@@ -3488,12 +3492,13 @@ public class Generator {
// Regular bindings (those that are not-static) or categories need this
if (!is_static_class || is_category_class){
- print ("[CompilerGenerated]");
-
if (is_category_class)
objc_type_name = FormatType (null, bta.BaseType);
- print ("static readonly IntPtr class_ptr = Class.GetHandle (\"{0}\");\n", is_model ? "NSObject" : objc_type_name);
+ if (!is_model && !external) {
+ print ("[CompilerGenerated]");
+ print ("static readonly IntPtr class_ptr = Class.GetHandle (\"{0}\");\n", objc_type_name);
+ }
}
if (!is_static_class){
@@ -3991,6 +3996,7 @@ public class Generator {
if (!is_static_class){
object [] disposeAttr = type.GetCustomAttributes (typeof (DisposeAttribute), true);
if (disposeAttr.Length > 0 || instance_fields_to_clear_on_dispose.Count > 0){
+ print ("[CompilerGenerated]");
print ("protected override void Dispose (bool disposing)");
print ("{");
indent++;
diff --git a/external/maccore/tools/docfixer/document-generated-code.cs b/external/maccore/tools/docfixer/document-generated-code.cs
index 1a2de4f..839a6ea 100644
--- a/external/maccore/tools/docfixer/document-generated-code.cs
+++ b/external/maccore/tools/docfixer/document-generated-code.cs
@@ -8,7 +8,13 @@
// erased in the compilation process (like the link between events
// and their ObjC delegate classes).
//
-// Copyright 2012 Xamarin Inc
+// Async Todo:
+// For Async/ResultTypeName classes, which are produced by the generator.cs, we should automatically generate:
+// * Remarks (no summary, since that should be added manually, because we merge that elsewhere)
+// * Constructor docs, and parameter docs taken from the source parameters of the method
+// * Descriptions of the generated properties
+//
+// Copyright 2012, 2013 Xamarin Inc
//
using System;
using System.Collections.Generic;
@@ -49,6 +55,11 @@ class DocumentGeneratedCode {
static AppleDocMerger docGenerator;
static Dictionary<Type,XDocument> docs = new Dictionary<Type,XDocument> ();
+
+ static string GetPath (string ns, string typeName, bool notification = false)
+ {
+ return String.Format ("{0}/{1}/{2}{3}.xml", assembly_dir, ns, typeName, notification ? "+Notifications" : "");
+ }
static string GetMdocPath (Type t, bool notification = false)
{
@@ -60,8 +71,8 @@ class DocumentGeneratedCode {
if (typeName == "NSObject2")
typeName = "NSObject";
}
-
- return String.Format ("{0}/{1}/{2}{3}.xml", assembly_dir, ns, typeName, notification ? "+Notifications" : "");
+
+ return GetPath (ns, typeName, notification);
}
static XDocument GetDoc (Type t, bool notification = false)
@@ -90,6 +101,26 @@ class DocumentGeneratedCode {
return xmldoc;
}
+ static XDocument GetDoc (string full_type, out string path)
+ {
+ XDocument xmldoc;
+ int lastd = full_type.LastIndexOf (".");
+ string ns = full_type.Substring (0, lastd);
+ string type = full_type.Substring (lastd+1);
+
+ path = GetPath (ns, type);
+ try {
+ using (var f = File.OpenText (path))
+ xmldoc = XDocument.Load (f);
+ } catch {
+ Console.WriteLine ("Failure while loading {0}", path);
+ return null;
+ }
+
+ return xmldoc;
+ }
+
+
static void Save (string xmldocpath, XDocument xmldoc)
{
var xmlSettings = new XmlWriterSettings (){
@@ -128,6 +159,38 @@ class DocumentGeneratedCode {
return field;
}
+
+ // Due to method overloading, we have multiple matches, match the right one based on the parameter names/types
+ static XElement GetAsyncXmlNode (Type t, XDocument xdoc, string name, XElement referenceNode)
+ {
+ var methods = xdoc.XPathSelectElements ("Type/Members/Member[@MemberName='" + name + "']");
+
+ // The parameters must be shared as far as the async node needs
+ foreach (var asyncMethod in methods){
+ bool fail = false;
+ foreach (var apar in asyncMethod.XPathSelectElements ("Parameters/Parameter")){
+ var pname = apar.Attribute ("Name").Value;
+ var ptype = apar.Attribute ("Type").Value;
+
+
+ var expr = String.Format ("Parameters/Parameter[@Type='{0}' and @Name='{1}']", ptype, pname);
+
+ if (referenceNode.XPathSelectElement (expr) == null){
+ fail = true;
+ break;
+ }
+ }
+ if (!fail)
+ return asyncMethod;
+ }
+
+ if (!warnings_up_to_date.ContainsKey (t)){
+ Console.WriteLine ("Warning: {0} document is not up-to-date with the latest assembly (could not find Field <Member MemberName='{1}')", t, name);
+ warnings_up_to_date [t] = true;
+ }
+ return null;
+ }
+
static XElement GetXmlNodeFromExport (Type t, XDocument xdoc, string selector)
{
return (from m in xdoc.XPathSelectElements ("Type/Members/Member")
@@ -192,8 +255,10 @@ class DocumentGeneratedCode {
// value.Value = "Value will be null when the constant is not available";
//}
- summary.RemoveAll ();
- summary.Value = "Represents the value associated with the constant " + export;
+ if (summary.Value == "To be added."){
+ summary.RemoveAll ();
+ summary.Value = "Represents the value associated with the constant " + export;
+ }
}
}
@@ -415,6 +480,178 @@ class DocumentGeneratedCode {
value.Add (XElement.Parse ("<para tool='nullallowed'>This value can be <see langword=\"null\"/>.</para>"));
}
+
+ //
+ // Copy the remarks to an async node, preserving any content on the target if needed, to do that
+ // we copy elements and flag them as "copied=true"
+ //
+ public static void CopyRemarksToAsync (XElement source, XElement target, string asyncName)
+ {
+ const string xpath = "Docs/remarks";
+ var tnode = target.XPathSelectElement (xpath);
+ var node = source.XPathSelectElement (xpath);
+
+ // Remove previously copied stuff.
+ foreach (var deletableElement in tnode.XPathSelectElements ("//*[@copied='true' or @generated='true']")){
+ deletableElement.Remove ();
+ }
+ if (tnode.Value == "To be added."){
+ tnode.Value = "";
+ }
+
+ // Wrap simple text
+ if (tnode.Elements ().Count () == 0 && tnode.Value != ""){
+ var val = tnode.Value;
+ tnode.Value = "";
+ tnode.Add (XElement.Parse ("<para>" + val + "</para>"));
+ }
+
+ tnode.Add (XElement.Parse ("<para copied='true'>The " + asyncName + " method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.</para>"));
+
+ // Add simple text from the original
+ if (node.Elements ().Count () == 0 && node.Value != "")
+ tnode.Add (XElement.Parse ("<para copied='true'>" + node.Value + "</para>"));
+ else {
+ foreach (var e in node.Elements ()){
+ var copy = new XElement (e);
+ e.SetAttributeValue ("copied", "true");
+ }
+ }
+ }
+
+ // If the contents of the node has any of our "improve" annotations, it means we have not
+ // manually edited it, so we want to inject some standard text.
+ static bool HasImproveAnnotation (XElement node)
+ {
+ var nodes = node.XPathSelectElements ("//*[@class='improve-task-t-return-type-description' or @class='improve']");
+ return nodes != null && nodes.Count () > 0;
+ }
+
+ static Dictionary<string,int> async_result_types = new Dictionary<string,int>();
+ static Dictionary<string,int> hot_summary = new Dictionary<string,int>();
+ static Dictionary<string,List<string>> resultTypeNameUses = new Dictionary<string,List<string>> ();
+
+ //
+ // Copy summary (maybe later we modify it?)
+ // Copy parameters
+ //
+ // This need some smarts to copy the description of the Task<T> result
+ //
+ public static void UpdateAsyncDocsFromMaster (AsyncAttribute aa, Type t, string name, string asyncName, XElement node, XElement nodeAsync)
+ {
+ string fullMethodName = t.FullName + "." + asyncName;
+ // Copy the summary information
+ var tsummary = nodeAsync.XPathSelectElement ("Docs/summary");
+ var summary = node.XPathSelectElement ("Docs/summary");
+
+ if (summary.Value == "To be added."){
+ if (hot_summary.ContainsKey (fullMethodName))
+ hot_summary [fullMethodName]++;
+ else
+ hot_summary [fullMethodName] = 1;
+ }
+
+ tsummary.Value = summary.Value;
+
+ // Copy remarks
+ CopyRemarksToAsync (node, nodeAsync, asyncName);
+
+ // Handle Return values
+ var lastParameter = node.XPathSelectElement ("Parameters/Parameter[last()]");
+ var returns = nodeAsync.XPathSelectElement ("Docs/returns");
+ var retType = nodeAsync.XPathSelectElement ("ReturnValue/ReturnType");
+ if (retType == null){
+ Console.WriteLine ("FAIL: {0}", nodeAsync);
+ Console.WriteLine (nodeAsync);
+ throw new Exception();
+ }
+ if (retType.Value == "System.Threading.Tasks.Task"){
+ returns.Value = "A task that represents the asynchronous " + name + " operation";
+ } else if (returns.Value == "To be added." || HasImproveAnnotation (returns)) {
+ var task_result_type = lastParameter.Attribute ("Type").Value;
+ // We have a Task<T>
+ returns.RemoveAll ();
+ if (task_result_type.StartsWith ("System.Action<")){
+ Console.WriteLine ("Improvement for Task<T> in {0}", fullMethodName);
+ var tresult_type = task_result_type.Substring (14).Trim ('>');
+ string standard_boring_text = "<para class='improve-task-t-return-type-description'>A task that represents the asynchronous " + name + " operation. The value of the TResult parameter is of type " + tresult_type + ".</para>";
+
+ // Should eventually only remove if we have 'To be added.' but my local copy is butchered (cant git reset right now)
+ returns.Add (XElement.Parse (standard_boring_text));
+ } else {
+ // Load the delegate type from the disk, and pull the docs from it
+ var tresult_type = retType.Value.Substring (28).Trim ('>');
+ // If we have a [Async (ResultTypeName="xxx")]
+ if (aa.ResultTypeName != null){
+ //
+ // We know we need to look up the information from the type, get the full type name from the tresult_type
+ //
+ string path;
+ var tresultDoc = GetDoc (tresult_type, out path);
+ var tresultSummary = tresultDoc.XPathSelectElement ("/Type/Docs/summary").Value;
+ if (tresultSummary == "To be added."){
+ Console.WriteLine ("Improvement: If you document the delegate for the {0} summary, you will get better async docs for {1}", tresult_type, fullMethodName);
+ }
+ returns.Add (XElement.Parse ("<para>A task that represents the asynchronous " + name + " operation. The value of the TResult parameter is of type " + tresult_type + ". " + tresultSummary + "</para>"));
+
+ List<string> list;
+ if (!resultTypeNameUses.TryGetValue (tresult_type, out list)){
+ list = new List<string> ();
+ resultTypeNameUses [tresult_type] = list;
+ }
+ list.Add (fullMethodName);
+
+ var used_by = string.Join (", ", list.Select (x=>"<see cref=\"T:" + x + "\"/>").ToArray ());
+ var trem = tresultDoc.XPathSelectElement ("/Type/Docs/remarks");
+ trem.RemoveAll ();
+ trem.Add (XElement.Parse ("<para>This class holds the return values from the asynchronous method" + (list.Count > 1 ? "s " : " ") + used_by + ".</para>"));
+ //
+ // Also document the Async [ResultTypeName]
+ //
+ var ctor = tresultDoc.XPathSelectElement ("/Type/Members/Member[@MemberName='.ctor']");
+ ctor.XPathSelectElement ("Docs/summary").Value = "Constructs an instance of " + tresult_type;
+ ctor.XPathSelectElement ("Docs/remarks").Value = "";
+ foreach (var par in ctor.XPathSelectElements ("Docs/param")){
+ par.Value = "Result value from the async operation";
+ }
+
+ Console.WriteLine ("Saving {0} for {1}", path, fullMethodName);
+ tresultDoc.Save (path);
+ } else {
+ string path;
+ var delegateDoc = GetDoc (task_result_type, out path);
+ if (delegateDoc == null){
+ Console.WriteLine ("Error: Failed to load the documentation for a referenced delegate: {0}", task_result_type);
+ return;
+ }
+ returns.Add (XElement.Parse ("<para>A task that represents the asynchronous " + name + " operation. The value of the TResult parameter is a " + task_result_type + ".</para>"));
+ }
+ }
+
+ if (async_result_types.ContainsKey (task_result_type))
+ async_result_types [task_result_type]++;
+ else
+ async_result_types [task_result_type] = 1;
+ //Console.WriteLine ("Method {0}.{1}'s Async really could use an explanation of the return type {2}", t, name, retType.Value);
+ }
+
+ //
+ // Copy parameter docs
+ //
+ foreach (var par in nodeAsync.XPathSelectElements ("Docs/param")){
+ var parName = par.Attribute ("name").Value;
+ var expr = "Docs/param[@name='" + parName + "']";
+
+ try {
+ var original = node.XPathSelectElements (expr).First ();
+
+ par.Value = original.Value;
+ } catch {
+ Console.WriteLine ("Failed to lookup with {0} and {1} and {2}", expr, node, nodeAsync);
+ }
+ }
+
+ }
public static void ProcessNSO (Type t, BaseTypeAttribute bta)
{
@@ -471,9 +708,14 @@ class DocumentGeneratedCode {
// we will lookup the method by the [Export] attribute
//
- if (mi.GetCustomAttributes (typeof (InternalAttribute), true).Length > 0)
+ try {
+ if (mi.GetCustomAttributes (typeof (InternalAttribute), true).Length > 0)
+ continue;
+ } catch (Exception FileNotFoundException){
+ Console.WriteLine ("*** Problem loading attributes for {0}.{1} ***", t, mi.Name);
continue;
-
+ }
+
var attrs = mi.GetCustomAttributes (typeof (ExportAttribute), true);
if (attrs.Length == 0)
continue;
@@ -484,6 +726,21 @@ class DocumentGeneratedCode {
continue;
}
+ attrs = mi.GetCustomAttributes (typeof (AsyncAttribute), true);
+ if (attrs.Length > 0){
+ var aa = attrs [0] as AsyncAttribute;
+ var methodName = aa.MethodName;
+ if (methodName == null)
+ methodName = mi.Name + "Async";
+
+ var nodeAsync = GetAsyncXmlNode (t, xmldoc, methodName, node);
+ if (nodeAsync == null)
+ Console.WriteLine ("*** ____ OH NO! WE HAVE A PROBLEM: The Async Method Referenced is not on the documentation for {0} {1}, I expected {2}", t, mi.Name, methodName);
+ else {
+ UpdateAsyncDocsFromMaster (aa, t, mi.Name, methodName, node, nodeAsync);
+ }
+ }
+
if (mi.GetCustomAttributes (typeof (ThreadSafeAttribute), true).Length > 0){
var remarks = node.XPathSelectElement ("Docs/remarks");
AddThreadRemark (remarks, "This");
@@ -613,7 +870,13 @@ class DocumentGeneratedCode {
}
Console.WriteLine ("saving");
SaveDocs ();
-
+
+ Console.WriteLine ("Async Result Types");
+ foreach (var j in from kv in async_result_types orderby kv.Value descending select kv)
+ Console.WriteLine (" Async Result: {1} {0}", j.Key, j.Value);
+ Console.WriteLine ("Hot summaries");
+ foreach (var j in from hskv in hot_summary orderby hskv.Value descending select hskv)
+ Console.WriteLine (" Hot Summary: {1} {0}", j.Key, j.Value);
return 0;
}
@@ -621,4 +884,4 @@ class DocumentGeneratedCode {
{
return new Mono.Cecil.TypeDefinition (t.Namespace, t.Name, (Mono.Cecil.TypeAttributes)t.Attributes);
}
-}
\ No newline at end of file
+}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs
index e573c91..cabeb30 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector/Reflector.cs
@@ -41,10 +41,19 @@ namespace Mono.Addins.CecilReflector
{
IAssemblyLocator locator;
Hashtable cachedAssemblies = new Hashtable ();
+ DefaultAssemblyResolver defaultAssemblyResolver;
public void Initialize (IAssemblyLocator locator)
{
this.locator = locator;
+ defaultAssemblyResolver = new DefaultAssemblyResolver ();
+ defaultAssemblyResolver.ResolveFailure += delegate (object sender, AssemblyNameReference reference) {
+ var file = locator.GetAssemblyLocation (reference.FullName);
+ if (file != null)
+ return LoadAssembly (file, true);
+ else
+ return null;
+ };
}
public object[] GetCustomAttributes (object obj, Type type, bool inherit)
@@ -286,7 +295,9 @@ namespace Mono.Addins.CecilReflector
AssemblyDefinition adef = (AssemblyDefinition) cachedAssemblies [file];
if (adef != null)
return adef;
- adef = AssemblyDefinition.ReadAssembly (file);
+ var rp = new ReaderParameters (ReadingMode.Deferred);
+ rp.AssemblyResolver = defaultAssemblyResolver;
+ adef = AssemblyDefinition.ReadAssembly (file, rp);
if (adef != null && cache)
cachedAssemblies [file] = adef;
return adef;
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Code.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Code.cs
index bd18b84..fa88b63 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Code.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Code.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs
index 4cfc7db..12ca5a2 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeReader.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -49,18 +49,13 @@ namespace Mono.Cecil.Cil {
get { return base.position - start; }
}
- CodeReader (Section section, MetadataReader reader)
+ public CodeReader (Section section, MetadataReader reader)
: base (section.Data)
{
this.code_section = section;
this.reader = reader;
}
- public static CodeReader CreateCodeReader (MetadataReader metadata)
- {
- return new CodeReader (metadata.image.MetadataSection, metadata);
- }
-
public MethodBody ReadMethodBody (MethodDefinition method)
{
this.method = method;
@@ -107,7 +102,7 @@ namespace Mono.Cecil.Cil {
throw new InvalidOperationException ();
}
- var symbol_reader = reader.module.SymbolReader;
+ var symbol_reader = reader.module.symbol_reader;
if (symbol_reader != null) {
var instructions = body.Instructions;
@@ -150,7 +145,7 @@ namespace Mono.Cecil.Cil {
code_size = 0;
var end = start + code_size;
- var instructions = body.instructions = new InstructionCollection (code_size / 3);
+ var instructions = body.instructions = new InstructionCollection ((code_size + 1) / 2);
while (position < end) {
var offset = base.position - start;
@@ -364,7 +359,6 @@ namespace Mono.Cecil.Cil {
break;
case ExceptionHandlerType.Filter:
handler.FilterStart = GetInstruction (ReadInt32 ());
- handler.FilterEnd = handler.HandlerStart.Previous;
break;
default:
Advance (4);
@@ -415,7 +409,7 @@ namespace Mono.Cecil.Cil {
throw new NotSupportedException ();
}
- var symbol_reader = reader.module.SymbolReader;
+ var symbol_reader = reader.module.symbol_reader;
if (symbol_reader != null && writer.metadata.write_symbols) {
symbols.method_token = GetOriginalToken (writer.metadata, method);
symbols.local_var_token = local_var_token;
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeWriter.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeWriter.cs
index 8bf0722..ac093ca 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeWriter.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/CodeWriter.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -424,10 +424,18 @@ namespace Mono.Cecil.Cil {
switch (instruction.opcode.FlowControl) {
case FlowControl.Call: {
var method = (IMethodSignature) instruction.operand;
- stack_size -= (method.HasParameters ? method.Parameters.Count : 0)
- + (method.HasThis && instruction.opcode.Code != Code.Newobj ? 1 : 0);
- stack_size += (method.ReturnType.etype == ElementType.Void ? 0 : 1)
- + (method.HasThis && instruction.opcode.Code == Code.Newobj ? 1 : 0);
+ // pop 'this' argument
+ if (method.HasImplicitThis() && instruction.opcode.Code != Code.Newobj)
+ stack_size--;
+ // pop normal arguments
+ if (method.HasParameters)
+ stack_size -= method.Parameters.Count;
+ // pop function pointer
+ if (instruction.opcode.Code == Code.Calli)
+ stack_size--;
+ // push return value
+ if (method.ReturnType.etype != ElementType.Void || instruction.opcode.Code == Code.Newobj)
+ stack_size++;
break;
}
default:
@@ -510,7 +518,7 @@ namespace Mono.Cecil.Cil {
return true;
if (handler.HandlerType == ExceptionHandlerType.Filter
- && IsFatRange (handler.FilterStart, handler.FilterEnd))
+ && IsFatRange (handler.FilterStart, handler.HandlerStart))
return true;
}
@@ -519,6 +527,9 @@ namespace Mono.Cecil.Cil {
static bool IsFatRange (Instruction start, Instruction end)
{
+ if (start == null)
+ throw new ArgumentException ();
+
if (end == null)
return true;
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Document.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Document.cs
index e46d2c1..1dbdc44 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Document.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Document.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -54,6 +54,7 @@ namespace Mono.Cecil.Cil {
JScript,
Smc,
MCpp,
+ FSharp,
}
public enum DocumentLanguageVendor {
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ExceptionHandler.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ExceptionHandler.cs
index a76f8f3..c61ff23 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ExceptionHandler.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ExceptionHandler.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -40,7 +40,6 @@ namespace Mono.Cecil.Cil {
Instruction try_start;
Instruction try_end;
Instruction filter_start;
- Instruction filter_end;
Instruction handler_start;
Instruction handler_end;
@@ -62,11 +61,6 @@ namespace Mono.Cecil.Cil {
set { filter_start = value; }
}
- public Instruction FilterEnd {
- get { return filter_end; }
- set { filter_end = value; }
- }
-
public Instruction HandlerStart {
get { return handler_start; }
set { handler_start = value; }
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ILProcessor.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ILProcessor.cs
index 1300b3e..cd5dbb4 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ILProcessor.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/ILProcessor.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Instruction.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Instruction.cs
index e8d36c4..c28d4c9 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Instruction.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Instruction.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/MethodBody.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/MethodBody.cs
index b57900e..3eefc95 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/MethodBody.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/MethodBody.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -100,7 +100,18 @@ namespace Mono.Cecil.Cil {
if (method == null || method.DeclaringType == null)
throw new NotSupportedException ();
- return this_parameter ?? (this_parameter = new ParameterDefinition ("0", ParameterAttributes.None, method.DeclaringType));
+ if (!method.HasThis)
+ return null;
+
+ if (this_parameter != null)
+ return this_parameter;
+
+ var declaring_type = method.DeclaringType;
+ var type = declaring_type.IsValueType || declaring_type.IsPrimitive
+ ? new PointerType (declaring_type)
+ : declaring_type as TypeReference;
+
+ return this_parameter = new ParameterDefinition (type, method);
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCode.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCode.cs
index aad4ba4..1a14421 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCode.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCode.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -116,7 +116,7 @@ namespace Mono.Cecil.Cil {
readonly byte stack_behavior_push;
public string Name {
- get { return OpCodeNames.names [op1 == 0xff ? op2 : op2 + 256]; }
+ get { return OpCodeNames.names [(int) Code]; }
}
public int Size {
@@ -132,7 +132,7 @@ namespace Mono.Cecil.Cil {
}
public short Value {
- get { return (short) ((op1 << 8) | op2); }
+ get { return op1 == 0xff ? op2 : (short) ((op1 << 8) | op2); }
}
public Code Code {
@@ -214,311 +214,242 @@ namespace Mono.Cecil.Cil {
static class OpCodeNames {
- internal static readonly string [] names = {
- "nop",
- "break",
- "ldarg.0",
- "ldarg.1",
- "ldarg.2",
- "ldarg.3",
- "ldloc.0",
- "ldloc.1",
- "ldloc.2",
- "ldloc.3",
- "stloc.0",
- "stloc.1",
- "stloc.2",
- "stloc.3",
- "ldarg.s",
- "ldarga.s",
- "starg.s",
- "ldloc.s",
- "ldloca.s",
- "stloc.s",
- "ldnull",
- "ldc.i4.m1",
- "ldc.i4.0",
- "ldc.i4.1",
- "ldc.i4.2",
- "ldc.i4.3",
- "ldc.i4.4",
- "ldc.i4.5",
- "ldc.i4.6",
- "ldc.i4.7",
- "ldc.i4.8",
- "ldc.i4.s",
- "ldc.i4",
- "ldc.i8",
- "ldc.r4",
- "ldc.r8",
- null,
- "dup",
- "pop",
- "jmp",
- "call",
- "calli",
- "ret",
- "br.s",
- "brfalse.s",
- "brtrue.s",
- "beq.s",
- "bge.s",
- "bgt.s",
- "ble.s",
- "blt.s",
- "bne.un.s",
- "bge.un.s",
- "bgt.un.s",
- "ble.un.s",
- "blt.un.s",
- "br",
- "brfalse",
- "brtrue",
- "beq",
- "bge",
- "bgt",
- "ble",
- "blt",
- "bne.un",
- "bge.un",
- "bgt.un",
- "ble.un",
- "blt.un",
- "switch",
- "ldind.i1",
- "ldind.u1",
- "ldind.i2",
- "ldind.u2",
- "ldind.i4",
- "ldind.u4",
- "ldind.i8",
- "ldind.i",
- "ldind.r4",
- "ldind.r8",
- "ldind.ref",
- "stind.ref",
- "stind.i1",
- "stind.i2",
- "stind.i4",
- "stind.i8",
- "stind.r4",
- "stind.r8",
- "add",
- "sub",
- "mul",
- "div",
- "div.un",
- "rem",
- "rem.un",
- "and",
- "or",
- "xor",
- "shl",
- "shr",
- "shr.un",
- "neg",
- "not",
- "conv.i1",
- "conv.i2",
- "conv.i4",
- "conv.i8",
- "conv.r4",
- "conv.r8",
- "conv.u4",
- "conv.u8",
- "callvirt",
- "cpobj",
- "ldobj",
- "ldstr",
- "newobj",
- "castclass",
- "isinst",
- "conv.r.un",
- null,
- null,
- "unbox",
- "throw",
- "ldfld",
- "ldflda",
- "stfld",
- "ldsfld",
- "ldsflda",
- "stsfld",
- "stobj",
- "conv.ovf.i1.un",
- "conv.ovf.i2.un",
- "conv.ovf.i4.un",
- "conv.ovf.i8.un",
- "conv.ovf.u1.un",
- "conv.ovf.u2.un",
- "conv.ovf.u4.un",
- "conv.ovf.u8.un",
- "conv.ovf.i.un",
- "conv.ovf.u.un",
- "box",
- "newarr",
- "ldlen",
- "ldelema",
- "ldelem.i1",
- "ldelem.u1",
- "ldelem.i2",
- "ldelem.u2",
- "ldelem.i4",
- "ldelem.u4",
- "ldelem.i8",
- "ldelem.i",
- "ldelem.r4",
- "ldelem.r8",
- "ldelem.ref",
- "stelem.i",
- "stelem.i1",
- "stelem.i2",
- "stelem.i4",
- "stelem.i8",
- "stelem.r4",
- "stelem.r8",
- "stelem.ref",
- "ldelem.any",
- "stelem.any",
- "unbox.any",
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- "conv.ovf.i1",
- "conv.ovf.u1",
- "conv.ovf.i2",
- "conv.ovf.u2",
- "conv.ovf.i4",
- "conv.ovf.u4",
- "conv.ovf.i8",
- "conv.ovf.u8",
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- "refanyval",
- "ckfinite",
- null,
- null,
- "mkrefany",
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- "ldtoken",
- "conv.u2",
- "conv.u1",
- "conv.i",
- "conv.ovf.i",
- "conv.ovf.u",
- "add.ovf",
- "add.ovf.un",
- "mul.ovf",
- "mul.ovf.un",
- "sub.ovf",
- "sub.ovf.un",
- "endfinally",
- "leave",
- "leave.s",
- "stind.i",
- "conv.u",
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- "prefix7",
- "prefix6",
- "prefix5",
- "prefix4",
- "prefix3",
- "prefix2",
- "prefix1",
- "prefixref",
- "arglist",
- "ceq",
- "cgt",
- "cgt.un",
- "clt",
- "clt.un",
- "ldftn",
- "ldvirtftn",
- null,
- "ldarg",
- "ldarga",
- "starg",
- "ldloc",
- "ldloca",
- "stloc",
- "localloc",
- null,
- "endfilter",
- "unaligned.",
- "volatile.",
- "tail.",
- "initobj",
- "constrained.",
- "cpblk",
- "initblk",
- "no.", // added by spouliot to match Cecil existing definitions
- "rethrow",
- null,
- "sizeof",
- "refanytype",
- "readonly.", // added by spouliot to match Cecil existing definitions
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- null,
- };
+ internal static readonly string [] names;
+
+ static OpCodeNames ()
+ {
+ var table = new byte [] {
+ 3, 110, 111, 112,
+ 5, 98, 114, 101, 97, 107,
+ 7, 108, 100, 97, 114, 103, 46, 48,
+ 7, 108, 100, 97, 114, 103, 46, 49,
+ 7, 108, 100, 97, 114, 103, 46, 50,
+ 7, 108, 100, 97, 114, 103, 46, 51,
+ 7, 108, 100, 108, 111, 99, 46, 48,
+ 7, 108, 100, 108, 111, 99, 46, 49,
+ 7, 108, 100, 108, 111, 99, 46, 50,
+ 7, 108, 100, 108, 111, 99, 46, 51,
+ 7, 115, 116, 108, 111, 99, 46, 48,
+ 7, 115, 116, 108, 111, 99, 46, 49,
+ 7, 115, 116, 108, 111, 99, 46, 50,
+ 7, 115, 116, 108, 111, 99, 46, 51,
+ 7, 108, 100, 97, 114, 103, 46, 115,
+ 8, 108, 100, 97, 114, 103, 97, 46, 115,
+ 7, 115, 116, 97, 114, 103, 46, 115,
+ 7, 108, 100, 108, 111, 99, 46, 115,
+ 8, 108, 100, 108, 111, 99, 97, 46, 115,
+ 7, 115, 116, 108, 111, 99, 46, 115,
+ 6, 108, 100, 110, 117, 108, 108,
+ 9, 108, 100, 99, 46, 105, 52, 46, 109, 49,
+ 8, 108, 100, 99, 46, 105, 52, 46, 48,
+ 8, 108, 100, 99, 46, 105, 52, 46, 49,
+ 8, 108, 100, 99, 46, 105, 52, 46, 50,
+ 8, 108, 100, 99, 46, 105, 52, 46, 51,
+ 8, 108, 100, 99, 46, 105, 52, 46, 52,
+ 8, 108, 100, 99, 46, 105, 52, 46, 53,
+ 8, 108, 100, 99, 46, 105, 52, 46, 54,
+ 8, 108, 100, 99, 46, 105, 52, 46, 55,
+ 8, 108, 100, 99, 46, 105, 52, 46, 56,
+ 8, 108, 100, 99, 46, 105, 52, 46, 115,
+ 6, 108, 100, 99, 46, 105, 52,
+ 6, 108, 100, 99, 46, 105, 56,
+ 6, 108, 100, 99, 46, 114, 52,
+ 6, 108, 100, 99, 46, 114, 56,
+ 3, 100, 117, 112,
+ 3, 112, 111, 112,
+ 3, 106, 109, 112,
+ 4, 99, 97, 108, 108,
+ 5, 99, 97, 108, 108, 105,
+ 3, 114, 101, 116,
+ 4, 98, 114, 46, 115,
+ 9, 98, 114, 102, 97, 108, 115, 101, 46, 115,
+ 8, 98, 114, 116, 114, 117, 101, 46, 115,
+ 5, 98, 101, 113, 46, 115,
+ 5, 98, 103, 101, 46, 115,
+ 5, 98, 103, 116, 46, 115,
+ 5, 98, 108, 101, 46, 115,
+ 5, 98, 108, 116, 46, 115,
+ 8, 98, 110, 101, 46, 117, 110, 46, 115,
+ 8, 98, 103, 101, 46, 117, 110, 46, 115,
+ 8, 98, 103, 116, 46, 117, 110, 46, 115,
+ 8, 98, 108, 101, 46, 117, 110, 46, 115,
+ 8, 98, 108, 116, 46, 117, 110, 46, 115,
+ 2, 98, 114,
+ 7, 98, 114, 102, 97, 108, 115, 101,
+ 6, 98, 114, 116, 114, 117, 101,
+ 3, 98, 101, 113,
+ 3, 98, 103, 101,
+ 3, 98, 103, 116,
+ 3, 98, 108, 101,
+ 3, 98, 108, 116,
+ 6, 98, 110, 101, 46, 117, 110,
+ 6, 98, 103, 101, 46, 117, 110,
+ 6, 98, 103, 116, 46, 117, 110,
+ 6, 98, 108, 101, 46, 117, 110,
+ 6, 98, 108, 116, 46, 117, 110,
+ 6, 115, 119, 105, 116, 99, 104,
+ 8, 108, 100, 105, 110, 100, 46, 105, 49,
+ 8, 108, 100, 105, 110, 100, 46, 117, 49,
+ 8, 108, 100, 105, 110, 100, 46, 105, 50,
+ 8, 108, 100, 105, 110, 100, 46, 117, 50,
+ 8, 108, 100, 105, 110, 100, 46, 105, 52,
+ 8, 108, 100, 105, 110, 100, 46, 117, 52,
+ 8, 108, 100, 105, 110, 100, 46, 105, 56,
+ 7, 108, 100, 105, 110, 100, 46, 105,
+ 8, 108, 100, 105, 110, 100, 46, 114, 52,
+ 8, 108, 100, 105, 110, 100, 46, 114, 56,
+ 9, 108, 100, 105, 110, 100, 46, 114, 101, 102,
+ 9, 115, 116, 105, 110, 100, 46, 114, 101, 102,
+ 8, 115, 116, 105, 110, 100, 46, 105, 49,
+ 8, 115, 116, 105, 110, 100, 46, 105, 50,
+ 8, 115, 116, 105, 110, 100, 46, 105, 52,
+ 8, 115, 116, 105, 110, 100, 46, 105, 56,
+ 8, 115, 116, 105, 110, 100, 46, 114, 52,
+ 8, 115, 116, 105, 110, 100, 46, 114, 56,
+ 3, 97, 100, 100,
+ 3, 115, 117, 98,
+ 3, 109, 117, 108,
+ 3, 100, 105, 118,
+ 6, 100, 105, 118, 46, 117, 110,
+ 3, 114, 101, 109,
+ 6, 114, 101, 109, 46, 117, 110,
+ 3, 97, 110, 100,
+ 2, 111, 114,
+ 3, 120, 111, 114,
+ 3, 115, 104, 108,
+ 3, 115, 104, 114,
+ 6, 115, 104, 114, 46, 117, 110,
+ 3, 110, 101, 103,
+ 3, 110, 111, 116,
+ 7, 99, 111, 110, 118, 46, 105, 49,
+ 7, 99, 111, 110, 118, 46, 105, 50,
+ 7, 99, 111, 110, 118, 46, 105, 52,
+ 7, 99, 111, 110, 118, 46, 105, 56,
+ 7, 99, 111, 110, 118, 46, 114, 52,
+ 7, 99, 111, 110, 118, 46, 114, 56,
+ 7, 99, 111, 110, 118, 46, 117, 52,
+ 7, 99, 111, 110, 118, 46, 117, 56,
+ 8, 99, 97, 108, 108, 118, 105, 114, 116,
+ 5, 99, 112, 111, 98, 106,
+ 5, 108, 100, 111, 98, 106,
+ 5, 108, 100, 115, 116, 114,
+ 6, 110, 101, 119, 111, 98, 106,
+ 9, 99, 97, 115, 116, 99, 108, 97, 115, 115,
+ 6, 105, 115, 105, 110, 115, 116,
+ 9, 99, 111, 110, 118, 46, 114, 46, 117, 110,
+ 5, 117, 110, 98, 111, 120,
+ 5, 116, 104, 114, 111, 119,
+ 5, 108, 100, 102, 108, 100,
+ 6, 108, 100, 102, 108, 100, 97,
+ 5, 115, 116, 102, 108, 100,
+ 6, 108, 100, 115, 102, 108, 100,
+ 7, 108, 100, 115, 102, 108, 100, 97,
+ 6, 115, 116, 115, 102, 108, 100,
+ 5, 115, 116, 111, 98, 106,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 49, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 50, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 52, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 56, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 49, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 50, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 52, 46, 117, 110,
+ 14, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 56, 46, 117, 110,
+ 13, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 46, 117, 110,
+ 13, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 46, 117, 110,
+ 3, 98, 111, 120,
+ 6, 110, 101, 119, 97, 114, 114,
+ 5, 108, 100, 108, 101, 110,
+ 7, 108, 100, 101, 108, 101, 109, 97,
+ 9, 108, 100, 101, 108, 101, 109, 46, 105, 49,
+ 9, 108, 100, 101, 108, 101, 109, 46, 117, 49,
+ 9, 108, 100, 101, 108, 101, 109, 46, 105, 50,
+ 9, 108, 100, 101, 108, 101, 109, 46, 117, 50,
+ 9, 108, 100, 101, 108, 101, 109, 46, 105, 52,
+ 9, 108, 100, 101, 108, 101, 109, 46, 117, 52,
+ 9, 108, 100, 101, 108, 101, 109, 46, 105, 56,
+ 8, 108, 100, 101, 108, 101, 109, 46, 105,
+ 9, 108, 100, 101, 108, 101, 109, 46, 114, 52,
+ 9, 108, 100, 101, 108, 101, 109, 46, 114, 56,
+ 10, 108, 100, 101, 108, 101, 109, 46, 114, 101, 102,
+ 8, 115, 116, 101, 108, 101, 109, 46, 105,
+ 9, 115, 116, 101, 108, 101, 109, 46, 105, 49,
+ 9, 115, 116, 101, 108, 101, 109, 46, 105, 50,
+ 9, 115, 116, 101, 108, 101, 109, 46, 105, 52,
+ 9, 115, 116, 101, 108, 101, 109, 46, 105, 56,
+ 9, 115, 116, 101, 108, 101, 109, 46, 114, 52,
+ 9, 115, 116, 101, 108, 101, 109, 46, 114, 56,
+ 10, 115, 116, 101, 108, 101, 109, 46, 114, 101, 102,
+ 10, 108, 100, 101, 108, 101, 109, 46, 97, 110, 121,
+ 10, 115, 116, 101, 108, 101, 109, 46, 97, 110, 121,
+ 9, 117, 110, 98, 111, 120, 46, 97, 110, 121,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 49,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 49,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 50,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 50,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 52,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 52,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105, 56,
+ 11, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117, 56,
+ 9, 114, 101, 102, 97, 110, 121, 118, 97, 108,
+ 8, 99, 107, 102, 105, 110, 105, 116, 101,
+ 8, 109, 107, 114, 101, 102, 97, 110, 121,
+ 7, 108, 100, 116, 111, 107, 101, 110,
+ 7, 99, 111, 110, 118, 46, 117, 50,
+ 7, 99, 111, 110, 118, 46, 117, 49,
+ 6, 99, 111, 110, 118, 46, 105,
+ 10, 99, 111, 110, 118, 46, 111, 118, 102, 46, 105,
+ 10, 99, 111, 110, 118, 46, 111, 118, 102, 46, 117,
+ 7, 97, 100, 100, 46, 111, 118, 102,
+ 10, 97, 100, 100, 46, 111, 118, 102, 46, 117, 110,
+ 7, 109, 117, 108, 46, 111, 118, 102,
+ 10, 109, 117, 108, 46, 111, 118, 102, 46, 117, 110,
+ 7, 115, 117, 98, 46, 111, 118, 102,
+ 10, 115, 117, 98, 46, 111, 118, 102, 46, 117, 110,
+ 10, 101, 110, 100, 102, 105, 110, 97, 108, 108, 121,
+ 5, 108, 101, 97, 118, 101,
+ 7, 108, 101, 97, 118, 101, 46, 115,
+ 7, 115, 116, 105, 110, 100, 46, 105,
+ 6, 99, 111, 110, 118, 46, 117,
+ 7, 97, 114, 103, 108, 105, 115, 116,
+ 3, 99, 101, 113,
+ 3, 99, 103, 116,
+ 6, 99, 103, 116, 46, 117, 110,
+ 3, 99, 108, 116,
+ 6, 99, 108, 116, 46, 117, 110,
+ 5, 108, 100, 102, 116, 110,
+ 9, 108, 100, 118, 105, 114, 116, 102, 116, 110,
+ 5, 108, 100, 97, 114, 103,
+ 6, 108, 100, 97, 114, 103, 97,
+ 5, 115, 116, 97, 114, 103,
+ 5, 108, 100, 108, 111, 99,
+ 6, 108, 100, 108, 111, 99, 97,
+ 5, 115, 116, 108, 111, 99,
+ 8, 108, 111, 99, 97, 108, 108, 111, 99,
+ 9, 101, 110, 100, 102, 105, 108, 116, 101, 114,
+ 10, 117, 110, 97, 108, 105, 103, 110, 101, 100, 46,
+ 9, 118, 111, 108, 97, 116, 105, 108, 101, 46,
+ 5, 116, 97, 105, 108, 46,
+ 7, 105, 110, 105, 116, 111, 98, 106,
+ 12, 99, 111, 110, 115, 116, 114, 97, 105, 110, 101, 100, 46,
+ 5, 99, 112, 98, 108, 107,
+ 7, 105, 110, 105, 116, 98, 108, 107,
+ 3, 110, 111, 46,
+ 7, 114, 101, 116, 104, 114, 111, 119,
+ 6, 115, 105, 122, 101, 111, 102,
+ 10, 114, 101, 102, 97, 110, 121, 116, 121, 112, 101,
+ 9, 114, 101, 97, 100, 111, 110, 108, 121, 46,
+ };
+
+ names = new string [219];
+
+ for (int i = 0, p = 0; i < names.Length; i++) {
+ var buffer = new char [table [p++]];
+
+ for (int j = 0; j < buffer.Length; j++)
+ buffer [j] = (char) table [p++];
+
+ names [i] = new string (buffer);
+ }
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCodes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCodes.cs
index ce468a1..85712ec 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCodes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/OpCodes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/SequencePoint.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/SequencePoint.cs
index 189b5f5..ef87e30 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/SequencePoint.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/SequencePoint.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Symbols.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Symbols.cs
index ba2e694..426c4a7 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Symbols.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/Symbols.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -151,10 +151,15 @@ namespace Mono.Cecil.Cil {
get { return local_var_token; }
}
- public MethodSymbols (string methodName)
+ internal MethodSymbols (string methodName)
{
this.method_name = methodName;
}
+
+ public MethodSymbols (MetadataToken methodToken)
+ {
+ this.method_token = methodToken;
+ }
}
public delegate Instruction InstructionMapper (int offset);
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableDefinition.cs
index 690543e..f501bca 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableReference.cs
index 5453845..ce0b4cd 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Cil/VariableReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/BlobHeap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/BlobHeap.cs
index 81c775e..e7e2928 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/BlobHeap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/BlobHeap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Buffers.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Buffers.cs
index e8759d7..b63412d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Buffers.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Buffers.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -261,7 +261,7 @@ namespace Mono.Cecil.Metadata {
abstract class HeapBuffer : ByteBuffer {
public bool IsLarge {
- get { return base.length > 65536; }
+ get { return base.length > 65535; }
}
public abstract bool IsEmpty { get; }
@@ -274,7 +274,7 @@ namespace Mono.Cecil.Metadata {
class StringHeapBuffer : HeapBuffer {
- readonly Dictionary<string, uint> strings = new Dictionary<string, uint> ();
+ readonly Dictionary<string, uint> strings = new Dictionary<string, uint> (StringComparer.Ordinal);
public sealed override bool IsEmpty {
get { return length <= 1; }
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/CodedIndex.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/CodedIndex.cs
index 6267726..3e30fd8 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/CodedIndex.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/CodedIndex.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/ElementType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/ElementType.cs
index 1ede042..72fc1cc 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/ElementType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/ElementType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/GuidHeap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/GuidHeap.cs
index 19acdab..1adc079 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/GuidHeap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/GuidHeap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Heap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Heap.cs
index e7ff720..bc21acd 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Heap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Heap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/MetadataToken.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/MetadataToken.cs
index 8c1338e..bda56b0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/MetadataToken.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/MetadataToken.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Row.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Row.cs
index ab491a6..dfda00a 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Row.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Row.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/StringHeap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/StringHeap.cs
index 85a2892..4a0a0af 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/StringHeap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/StringHeap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TableHeap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TableHeap.cs
index cc441db..9bc0edd 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TableHeap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TableHeap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -62,6 +62,8 @@ namespace Mono.Cecil.Metadata {
TypeSpec = 0x1b,
ImplMap = 0x1c,
FieldRVA = 0x1d,
+ EncLog = 0x1e,
+ EncMap = 0x1f,
Assembly = 0x20,
AssemblyProcessor = 0x21,
AssemblyOS = 0x22,
@@ -88,53 +90,9 @@ namespace Mono.Cecil.Metadata {
public long Valid;
public long Sorted;
- public static readonly Table [] TableIdentifiers = new [] {
- Table.Module,
- Table.TypeRef,
- Table.TypeDef,
- Table.FieldPtr,
- Table.Field,
- Table.MethodPtr,
- Table.Method,
- Table.ParamPtr,
- Table.Param,
- Table.InterfaceImpl,
- Table.MemberRef,
- Table.Constant,
- Table.CustomAttribute,
- Table.FieldMarshal,
- Table.DeclSecurity,
- Table.ClassLayout,
- Table.FieldLayout,
- Table.StandAloneSig,
- Table.EventMap,
- Table.EventPtr,
- Table.Event,
- Table.PropertyMap,
- Table.PropertyPtr,
- Table.Property,
- Table.MethodSemantics,
- Table.MethodImpl,
- Table.ModuleRef,
- Table.TypeSpec,
- Table.ImplMap,
- Table.FieldRVA,
- Table.Assembly,
- Table.AssemblyProcessor,
- Table.AssemblyOS,
- Table.AssemblyRef,
- Table.AssemblyRefProcessor,
- Table.AssemblyRefOS,
- Table.File,
- Table.ExportedType,
- Table.ManifestResource,
- Table.NestedClass,
- Table.GenericParam,
- Table.MethodSpec,
- Table.GenericParamConstraint,
- };
+ public const int TableCount = 45;
- public readonly TableInformation [] Tables = new TableInformation [45];
+ public readonly TableInformation [] Tables = new TableInformation [TableCount];
public TableInformation this [Table table] {
get { return Tables [(int) table]; }
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TokenType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TokenType.cs
index f822b6d..2c2010f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TokenType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/TokenType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/UserStringHeap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/UserStringHeap.cs
index 7353cb7..5910508 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/UserStringHeap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/UserStringHeap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Utilities.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Utilities.cs
index 496c61b..d752b24 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Utilities.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.Metadata/Utilities.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamReader.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamReader.cs
index 8f5b38e..ec2477c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamReader.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamReader.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamWriter.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamWriter.cs
index 37189cb..2bf6ccc 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamWriter.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/BinaryStreamWriter.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBuffer.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBuffer.cs
index 4303b6d..c7ae7ae 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBuffer.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBuffer.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -140,11 +140,16 @@ namespace Mono.Cecil.PE {
public int ReadCompressedInt32 ()
{
- var value = (int) ReadCompressedUInt32 ();
-
- return (value & 1) != 0
- ? -(value >> 1)
- : value >> 1;
+ var value = (int) (ReadCompressedUInt32 () >> 1);
+ if ((value & 1) == 0)
+ return value;
+ if (value < 0x40)
+ return value - 0x40;
+ if (value < 0x2000)
+ return value - 0x2000;
+ if (value < 0x10000000)
+ return value - 0x10000000;
+ return value - 0x20000000;
}
public float ReadSingle ()
@@ -267,7 +272,19 @@ namespace Mono.Cecil.PE {
public void WriteCompressedInt32 (int value)
{
- WriteCompressedUInt32 ((uint) ((value < 0) ? ((-value) << 1) | 1 : value << 1));
+ if (value >= 0) {
+ WriteCompressedUInt32 ((uint) (value << 1));
+ return;
+ }
+
+ if (value > -0x40)
+ value = 0x40 + value;
+ else if (value >= -0x2000)
+ value = 0x2000 + value;
+ else if (value >= -0x20000000)
+ value = 0x20000000 + value;
+
+ WriteCompressedUInt32 ((uint) ((value << 1) | 1));
}
public void WriteBytes (byte [] bytes)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBufferEqualityComparer.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBufferEqualityComparer.cs
index fe56a6f..70e8916 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBufferEqualityComparer.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ByteBufferEqualityComparer.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/DataDirectory.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/DataDirectory.cs
index 5ba2d2d..fedd0e2 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/DataDirectory.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/DataDirectory.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Image.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Image.cs
index 11aba8f..a11cf1c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Image.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Image.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -41,6 +41,7 @@ namespace Mono.Cecil.PE {
public ModuleKind Kind;
public TargetRuntime Runtime;
public TargetArchitecture Architecture;
+ public ModuleCharacteristics Characteristics;
public string FileName;
public Section [] Sections;
@@ -52,6 +53,7 @@ namespace Mono.Cecil.PE {
public DataDirectory Debug;
public DataDirectory Resources;
+ public DataDirectory StrongName;
public StringHeap StringHeap;
public BlobHeap BlobHeap;
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
index a228c1f..c96c1db 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -99,13 +99,14 @@ namespace Mono.Cecil.PE {
// Characteristics 2
ushort characteristics = ReadUInt16 ();
- ushort subsystem;
- ReadOptionalHeaders (out subsystem);
+ ushort subsystem, dll_characteristics;
+ ReadOptionalHeaders (out subsystem, out dll_characteristics);
ReadSections (sections);
ReadCLIHeader ();
ReadMetadata ();
image.Kind = GetModuleKind (characteristics, subsystem);
+ image.Characteristics = (ModuleCharacteristics) dll_characteristics;
}
TargetArchitecture ReadArchitecture ()
@@ -118,6 +119,8 @@ namespace Mono.Cecil.PE {
return TargetArchitecture.AMD64;
case 0x0200:
return TargetArchitecture.IA64;
+ case 0x01c4:
+ return TargetArchitecture.ARMv7;
}
throw new NotSupportedException ();
@@ -134,7 +137,7 @@ namespace Mono.Cecil.PE {
return ModuleKind.Console;
}
- void ReadOptionalHeaders (out ushort subsystem)
+ void ReadOptionalHeaders (out ushort subsystem, out ushort dll_characteristics)
{
// - PEOptionalHeader
// - StandardFieldsHeader
@@ -174,6 +177,7 @@ namespace Mono.Cecil.PE {
subsystem = ReadUInt16 ();
// DLLFlags 2
+ dll_characteristics = ReadUInt16 ();
// StackReserveSize 4 || 8
// StackCommitSize 4 || 8
// HeapReserveSize 4 || 8
@@ -190,7 +194,7 @@ namespace Mono.Cecil.PE {
// CertificateTable 8
// BaseRelocationTable 8
- Advance (pe64 ? 90 : 74);
+ Advance (pe64 ? 88 : 72);
// Debug 8
image.Debug = ReadDataDirectory ();
@@ -276,9 +280,6 @@ namespace Mono.Cecil.PE {
sections [i] = section;
- if (section.Name == ".reloc")
- continue;
-
ReadSectionData (section);
}
@@ -323,6 +324,7 @@ namespace Mono.Cecil.PE {
// Resources 8
image.Resources = ReadDataDirectory ();
// StrongNameSignature 8
+ image.StrongName = ReadDataDirectory ();
// CodeManagerTable 8
// VTableFixups 8
// ExportAddressTableJumps 8
@@ -416,12 +418,11 @@ namespace Mono.Cecil.PE {
// Sorted 8
heap.Sorted = ReadInt64 ();
- for (int i = 0; i < TableHeap.TableIdentifiers.Length; i++) {
- var table = TableHeap.TableIdentifiers [i];
- if (!heap.HasTable (table))
+ for (int i = 0; i < TableHeap.TableCount; i++) {
+ if (!heap.HasTable ((Table) i))
continue;
- heap.Tables [(int) table].Length = ReadUInt32 ();
+ heap.Tables [i].Length = ReadUInt32 ();
}
SetIndexSize (image.StringHeap, sizes, 0x1);
@@ -459,8 +460,8 @@ namespace Mono.Cecil.PE {
var heap = image.TableHeap;
var tables = heap.Tables;
- for (int i = 0; i < TableHeap.TableIdentifiers.Length; i++) {
- var table = TableHeap.TableIdentifiers [i];
+ for (int i = 0; i < TableHeap.TableCount; i++) {
+ var table = (Table) i;
if (!heap.HasTable (table))
continue;
@@ -595,6 +596,10 @@ namespace Mono.Cecil.PE {
size = 4 // RVA
+ GetTableIndexSize (Table.Field); // Field
break;
+ case Table.EncLog:
+ case Table.EncMap:
+ size = 4;
+ break;
case Table.Assembly:
size = 16 // HashAlgId 4, Version 4 * 2, Flags 4
+ blobidx_size // PublicKey
@@ -655,12 +660,10 @@ namespace Mono.Cecil.PE {
throw new NotSupportedException ();
}
- int index = (int) table;
-
- tables [index].RowSize = (uint) size;
- tables [index].Offset = offset;
+ tables [i].RowSize = (uint) size;
+ tables [i].Offset = offset;
- offset += (uint) size * tables [index].Length;
+ offset += (uint) size * tables [i].Length;
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
index 939de6b..08f9ea2 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -58,6 +58,7 @@ namespace Mono.Cecil.PE {
internal const RVA text_rva = 0x2000;
readonly bool pe64;
+ readonly bool has_reloc;
readonly uint time_stamp;
internal Section text;
@@ -71,11 +72,12 @@ namespace Mono.Cecil.PE {
{
this.module = module;
this.metadata = metadata;
+ this.pe64 = module.Architecture == TargetArchitecture.AMD64 || module.Architecture == TargetArchitecture.IA64;
+ this.has_reloc = module.Architecture == TargetArchitecture.I386;
this.GetDebugHeader ();
this.GetWin32Resources ();
this.text_map = BuildTextMap ();
- this.sections = 2; // text + reloc
- this.pe64 = module.Architecture != TargetArchitecture.I386;
+ this.sections = (ushort) (has_reloc ? 2 : 1); // text + reloc?
this.time_stamp = (uint) DateTime.UtcNow.Subtract (new DateTime (1970, 1, 1)).TotalSeconds;
}
@@ -133,7 +135,8 @@ namespace Mono.Cecil.PE {
previous = rsrc;
}
- reloc = CreateSection (".reloc", 12u, previous);
+ if (has_reloc)
+ reloc = CreateSection (".reloc", 12u, previous);
}
Section CreateSection (string name, uint size, Section previous)
@@ -212,25 +215,36 @@ namespace Mono.Cecil.PE {
return 0x8664;
case TargetArchitecture.IA64:
return 0x0200;
+ case TargetArchitecture.ARMv7:
+ return 0x01c4;
}
throw new NotSupportedException ();
}
+ Section LastSection ()
+ {
+ if (reloc != null)
+ return reloc;
+
+ if (rsrc != null)
+ return rsrc;
+
+ return text;
+ }
+
void WriteOptionalHeaders ()
{
WriteUInt16 ((ushort) (!pe64 ? 0x10b : 0x20b)); // Magic
WriteByte (8); // LMajor
WriteByte (0); // LMinor
WriteUInt32 (text.SizeOfRawData); // CodeSize
- WriteUInt32 (reloc.SizeOfRawData
+ WriteUInt32 ((reloc != null ? reloc.SizeOfRawData : 0)
+ (rsrc != null ? rsrc.SizeOfRawData : 0)); // InitializedDataSize
WriteUInt32 (0); // UninitializedDataSize
- var entry_point_rva = text_map.GetRVA (TextSegment.StartupStub);
- if (module.Architecture == TargetArchitecture.IA64)
- entry_point_rva += 0x20;
- WriteUInt32 (entry_point_rva); // EntryPointRVA
+ var startub_stub = text_map.GetRange (TextSegment.StartupStub);
+ WriteUInt32 (startub_stub.Length > 0 ? startub_stub.Start : 0); // EntryPointRVA
WriteUInt32 (text_rva); // BaseOfCode
if (!pe64) {
@@ -251,12 +265,13 @@ namespace Mono.Cecil.PE {
WriteUInt16 (0); // SubSysMinor
WriteUInt32 (0); // Reserved
- WriteUInt32 (reloc.VirtualAddress + Align (reloc.VirtualSize, section_alignment)); // ImageSize
+ var last_section = LastSection();
+ WriteUInt32 (last_section.VirtualAddress + Align (last_section.VirtualSize, section_alignment)); // ImageSize
WriteUInt32 (text.PointerToRawData); // HeaderSize
WriteUInt32 (0); // Checksum
WriteUInt16 (GetSubSystem ()); // SubSystem
- WriteUInt16 (0x8540); // DLLFlags
+ WriteUInt16 ((ushort) module.Characteristics); // DLLFlags
const ulong stack_reserve = 0x100000;
const ulong stack_commit = 0x1000;
@@ -288,8 +303,8 @@ namespace Mono.Cecil.PE {
WriteZeroDataDirectory (); // ExceptionTable
WriteZeroDataDirectory (); // CertificateTable
- WriteUInt32 (reloc.VirtualAddress); // BaseRelocationTable
- WriteUInt32 (reloc.VirtualSize);
+ WriteUInt32 (reloc != null ? reloc.VirtualAddress : 0); // BaseRelocationTable
+ WriteUInt32 (reloc != null ? reloc.VirtualSize : 0);
if (text_map.GetLength (TextSegment.DebugDirectory) > 0) {
WriteUInt32 (text_map.GetRVA (TextSegment.DebugDirectory));
@@ -335,7 +350,8 @@ namespace Mono.Cecil.PE {
if (rsrc != null)
WriteSection (rsrc, 0x40000040);
- WriteSection (reloc, 0x42000040);
+ if (reloc != null)
+ WriteSection (reloc, 0x42000040);
}
void WriteSection (Section section, uint characteristics)
@@ -386,8 +402,10 @@ namespace Mono.Cecil.PE {
// ImportAddressTable
- WriteRVA (text_map.GetRVA (TextSegment.ImportHintNameTable));
- WriteRVA (0);
+ if (has_reloc) {
+ WriteRVA (text_map.GetRVA (TextSegment.ImportHintNameTable));
+ WriteRVA (0);
+ }
// CLIHeader
@@ -439,6 +457,9 @@ namespace Mono.Cecil.PE {
WriteDebugDirectory ();
}
+ if (!has_reloc)
+ return;
+
// ImportDirectory
MoveToRVA (TextSegment.ImportDirectory);
WriteImportDirectory ();
@@ -605,19 +626,8 @@ namespace Mono.Cecil.PE {
WriteUInt16 (0x25ff);
WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.ImportAddressTable));
return;
- case TargetArchitecture.AMD64:
- WriteUInt16 (0xa148);
- WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.ImportAddressTable));
- WriteUInt16 (0xe0ff);
- return;
- case TargetArchitecture.IA64:
- WriteBytes (new byte [] {
- 0x0b, 0x48, 0x00, 0x02, 0x18, 0x10, 0xa0, 0x40, 0x24, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00,
- 0x10, 0x08, 0x00, 0x12, 0x18, 0x10, 0x60, 0x50, 0x04, 0x80, 0x03, 0x00, 0x60, 0x00, 0x80, 0x00
- });
- WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.StartupStub));
- WriteUInt32 ((uint) image_base + text_rva);
- return;
+ default:
+ throw new NotSupportedException ();
}
}
@@ -642,13 +652,8 @@ namespace Mono.Cecil.PE {
case TargetArchitecture.I386:
WriteUInt32 (0x3000 + reloc_rva - page_rva);
break;
- case TargetArchitecture.AMD64:
- WriteUInt32 (0xa000 + reloc_rva - page_rva);
- break;
- case TargetArchitecture.IA64:
- WriteUInt16 ((ushort) (0xa000 + reloc_rva - page_rva));
- WriteUInt16 ((ushort) (0xa000 + reloc_rva - page_rva + 8));
- break;
+ default:
+ throw new NotSupportedException();
}
WriteBytes (new byte [file_alignment - reloc.VirtualSize]);
@@ -663,7 +668,8 @@ namespace Mono.Cecil.PE {
WriteText ();
if (rsrc != null)
WriteRsrc ();
- WriteReloc ();
+ if (reloc != null)
+ WriteReloc ();
}
TextMap BuildTextMap ()
@@ -694,8 +700,16 @@ namespace Mono.Cecil.PE {
map.AddMap (TextSegment.DebugDirectory, debug_dir_len, 4);
+ if (!has_reloc) {
+ var start = map.GetNextRVA (TextSegment.DebugDirectory);
+ map.AddMap (TextSegment.ImportDirectory, new Range (start, 0));
+ map.AddMap (TextSegment.ImportHintNameTable, new Range (start, 0));
+ map.AddMap (TextSegment.StartupStub, new Range (start, 0));
+ return map;
+ }
+
RVA import_dir_rva = map.GetNextRVA (TextSegment.DebugDirectory);
- RVA import_hnt_rva = import_dir_rva + (!pe64 ? 48u : 52u);
+ RVA import_hnt_rva = import_dir_rva + 48u;
import_hnt_rva = (import_hnt_rva + 15u) & ~15u;
uint import_dir_len = (import_hnt_rva - import_dir_rva) + 27u;
@@ -716,12 +730,8 @@ namespace Mono.Cecil.PE {
switch (module.Architecture) {
case TargetArchitecture.I386:
return 6;
- case TargetArchitecture.AMD64:
- return 12;
- case TargetArchitecture.IA64:
- return 48;
default:
- throw new InvalidOperationException ();
+ throw new NotSupportedException ();
}
}
@@ -744,24 +754,22 @@ namespace Mono.Cecil.PE {
int GetStrongNameLength ()
{
- if ((module.Attributes & ModuleAttributes.StrongNameSigned) == 0)
- return 0;
-
if (module.Assembly == null)
- throw new InvalidOperationException ();
+ return 0;
var public_key = module.Assembly.Name.PublicKey;
+ if (public_key.IsNullOrEmpty ())
+ return 0;
- if (public_key != null) {
- // in fx 2.0 the key may be from 384 to 16384 bits
- // so we must calculate the signature size based on
- // the size of the public key (minus the 32 byte header)
- int size = public_key.Length;
- if (size > 32)
- return size - 32;
- // note: size == 16 for the ECMA "key" which is replaced
- // by the runtime with a 1024 bits key (128 bytes)
- }
+ // in fx 2.0 the key may be from 384 to 16384 bits
+ // so we must calculate the signature size based on
+ // the size of the public key (minus the 32 byte header)
+ int size = public_key.Length;
+ if (size > 32)
+ return size - 32;
+
+ // note: size == 16 for the ECMA "key" which is replaced
+ // by the runtime with a 1024 bits key (128 bytes)
return 128; // default strongname signature size
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Section.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Section.cs
index 54935f9..6a4c7ba 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Section.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/Section.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/TextMap.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/TextMap.cs
index daeda0c..047a4c1 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/TextMap.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil.PE/TextMap.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ArrayType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ArrayType.cs
index e3a060f..55c59d8 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ArrayType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ArrayType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyDefinition.cs
index bb757d3..f1b5d25 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -64,7 +64,7 @@ namespace Mono.Cecil {
if (main_module.HasImage)
return modules = main_module.Read (this, (_, reader) => reader.ReadModules ());
- return modules = new Collection<ModuleDefinition> { main_module };
+ return modules = new Collection<ModuleDefinition> (1) { main_module };
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
index 6d04c59..72a0eb0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -35,6 +35,7 @@ namespace Mono.Cecil {
PublicKey = 0x0001,
SideBySideCompatible = 0x0000,
Retargetable = 0x0100,
+ WindowsRuntime = 0x0200,
DisableJITCompileOptimizer = 0x4000,
EnableJITCompileTracking = 0x8000,
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyHashAlgorithm.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyHashAlgorithm.cs
index 0e7bf83..79a5699 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyHashAlgorithm.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyHashAlgorithm.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyInfo.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyInfo.cs
index b701981..8a9f809 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyInfo.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyInfo.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,15 +32,15 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle ("Mono.Cecil")]
[assembly: AssemblyProduct ("Mono.Cecil")]
-[assembly: AssemblyCopyright ("Copyright © 2008 - 2010 Jb Evain")]
+[assembly: AssemblyCopyright ("Copyright © 2008 - 2011 Jb Evain")]
[assembly: ComVisible (false)]
[assembly: Guid ("fd225bb4-fa53-44b2-a6db-85f5e48dcb54")]
-[assembly: AssemblyVersion ("0.9.4.0")]
+[assembly: AssemblyVersion ("0.9.5.0")]
#if !CF
-[assembly: AssemblyFileVersion ("0.9.4.0")]
+[assembly: AssemblyFileVersion ("0.9.5.0")]
#endif
[assembly: InternalsVisibleTo ("Mono.Cecil.Pdb, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyLinkedResource.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyLinkedResource.cs
index 68e44f8..4d8bac0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyLinkedResource.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyLinkedResource.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameDefinition.cs
index 4756cb8..dc6b905 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
index 2798082..4f58fe2 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -92,8 +92,13 @@ namespace Mono.Cecil {
set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.Retargetable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) AssemblyAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.WindowsRuntime, value); }
+ }
+
public byte [] PublicKey {
- get { return public_key; }
+ get { return public_key ?? Empty<byte>.Array; }
set {
public_key = value;
HasPublicKey = !public_key.IsNullOrEmpty ();
@@ -111,7 +116,7 @@ namespace Mono.Cecil {
Array.Copy (hash, (hash.Length - 8), public_key_token, 0, 8);
Array.Reverse (public_key_token, 0, 8);
}
- return public_key_token;
+ return public_key_token ?? Empty<byte>.Array;
}
set {
public_key_token = value;
@@ -170,9 +175,10 @@ namespace Mono.Cecil {
builder.Append (sep);
builder.Append ("PublicKeyToken=");
- if (this.PublicKeyToken != null && public_key_token.Length > 0) {
- for (int i = 0 ; i < public_key_token.Length ; i++) {
- builder.Append (public_key_token [i].ToString ("x2"));
+ var pk_token = PublicKeyToken;
+ if (!pk_token.IsNullOrEmpty () && pk_token.Length > 0) {
+ for (int i = 0 ; i < pk_token.Length ; i++) {
+ builder.Append (pk_token [i].ToString ("x2"));
}
} else
builder.Append ("null");
@@ -202,22 +208,22 @@ namespace Mono.Cecil {
if (parts.Length != 2)
throw new ArgumentException ("Malformed name");
- switch (parts [0]) {
- case "Version":
+ switch (parts [0].ToLowerInvariant ()) {
+ case "version":
name.Version = new Version (parts [1]);
break;
- case "Culture":
+ case "culture":
name.Culture = parts [1];
break;
- case "PublicKeyToken":
- string pk_token = parts [1];
+ case "publickeytoken":
+ var pk_token = parts [1];
if (pk_token == "null")
break;
name.PublicKeyToken = new byte [pk_token.Length / 2];
- for (int j = 0; j < name.PublicKeyToken.Length; j++) {
+ for (int j = 0; j < name.PublicKeyToken.Length; j++)
name.PublicKeyToken [j] = Byte.Parse (pk_token.Substring (j * 2, 2), NumberStyles.HexNumber);
- }
+
break;
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyReader.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyReader.cs
index 2cafb99..a9f0b6a 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyReader.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyReader.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -85,6 +85,9 @@ namespace Mono.Cecil {
if (parameters.AssemblyResolver != null)
module.assembly_resolver = parameters.AssemblyResolver;
+ if (parameters.MetadataResolver != null)
+ module.metadata_resolver = parameters.MetadataResolver;
+
return module;
}
@@ -374,7 +377,7 @@ namespace Mono.Cecil {
this.image = module.Image;
this.module = module;
this.metadata = module.MetadataSystem;
- this.code = CodeReader.CreateCodeReader (this);
+ this.code = new CodeReader (image.MetadataSection, this);
}
int GetCodedIndexSize (CodedIndex index)
@@ -487,36 +490,48 @@ namespace Mono.Cecil {
return module;
}
- public Collection<AssemblyNameReference> ReadAssemblyReferences ()
+ void InitializeAssemblyReferences ()
{
+ if (metadata.AssemblyReferences != null)
+ return;
+
int length = MoveTo (Table.AssemblyRef);
- var references = new Collection<AssemblyNameReference> (length);
+ var references = metadata.AssemblyReferences = new AssemblyNameReference [length];
- for (uint i = 1; i <= length; i++) {
+ for (uint i = 0; i < length; i++) {
var reference = new AssemblyNameReference ();
- reference.token = new MetadataToken (TokenType.AssemblyRef, i);
+ reference.token = new MetadataToken (TokenType.AssemblyRef, i + 1);
PopulateVersionAndFlags (reference);
- reference.PublicKeyToken = ReadBlob ();
+ var key_or_token = ReadBlob ();
+
+ if (reference.HasPublicKey)
+ reference.PublicKey = key_or_token;
+ else
+ reference.PublicKeyToken = key_or_token;
PopulateNameAndCulture (reference);
reference.Hash = ReadBlob ();
- references.Add (reference);
+ references [i] = reference;
}
+ }
+
+ public Collection<AssemblyNameReference> ReadAssemblyReferences ()
+ {
+ InitializeAssemblyReferences ();
- return references;
+ return new Collection<AssemblyNameReference> (metadata.AssemblyReferences);
}
public MethodDefinition ReadEntryPoint ()
{
- if (module.Kind != ModuleKind.Console && module.Kind != ModuleKind.Windows)
+ if (module.Image.EntryPointToken == 0)
return null;
var token = new MetadataToken (module.Image.EntryPointToken);
-
return GetMethodDefinition (token.RID);
}
@@ -537,6 +552,7 @@ namespace Mono.Cecil {
var parameters = new ReaderParameters {
ReadingMode = module.ReadingMode,
SymbolReaderProvider = module.SymbolReaderProvider,
+ AssemblyResolver = module.AssemblyResolver
};
modules.Add (ModuleDefinition.ReadModule (
@@ -555,19 +571,27 @@ namespace Mono.Cecil {
return Path.Combine (path, name);
}
- public Collection<ModuleReference> ReadModuleReferences ()
+ void InitializeModuleReferences ()
{
+ if (metadata.ModuleReferences != null)
+ return;
+
int length = MoveTo (Table.ModuleRef);
- var references = new Collection<ModuleReference> (length);
+ var references = metadata.ModuleReferences = new ModuleReference [length];
- for (uint i = 1; i <= length; i++) {
+ for (uint i = 0; i < length; i++) {
var reference = new ModuleReference (ReadString ());
- reference.token = new MetadataToken (TokenType.ModuleRef, i);
+ reference.token = new MetadataToken (TokenType.ModuleRef, i + 1);
- references.Add (reference);
+ references [i] = reference;
}
+ }
+
+ public Collection<ModuleReference> ReadModuleReferences ()
+ {
+ InitializeModuleReferences ();
- return references;
+ return new Collection<ModuleReference> (metadata.ModuleReferences);
}
public bool HasFileResource ()
@@ -682,9 +706,24 @@ namespace Mono.Cecil {
types.Add (type);
}
+ if (image.HasTable (Table.MethodPtr) || image.HasTable (Table.FieldPtr))
+ CompleteTypes ();
+
return types;
}
+ void CompleteTypes ()
+ {
+ var types = metadata.Types;
+
+ for (int i = 0; i < types.Length; i++) {
+ var type = types [i];
+
+ InitializeCollection (type.Fields);
+ InitializeCollection (type.Methods);
+ }
+ }
+
void InitializeTypeDefinitions ()
{
if (metadata.Types != null)
@@ -740,8 +779,12 @@ namespace Mono.Cecil {
var nested_types = new MemberDefinitionCollection<TypeDefinition> (type, mapping.Length);
- for (int i = 0; i < mapping.Length; i++)
- nested_types.Add (GetTypeDefinition (mapping [i]));
+ for (int i = 0; i < mapping.Length; i++) {
+ var nested_type = GetTypeDefinition (mapping [i]);
+
+ if (nested_type != null)
+ nested_types.Add (nested_type);
+ }
metadata.RemoveNestedTypeMapping (type);
@@ -995,7 +1038,7 @@ namespace Mono.Cecil {
type.scope = scope;
type.DeclaringType = declaring_type;
- MetadataSystem.TryProcessPrimitiveType (type);
+ MetadataSystem.TryProcessPrimitiveTypeReference (type);
return type;
}
@@ -1003,13 +1046,12 @@ namespace Mono.Cecil {
IMetadataScope GetTypeReferenceScope (MetadataToken scope)
{
switch (scope.TokenType) {
- // FIXME: both assembly refs and module refs should be in their
- // own arrays, in case of someone modify the collections before
- // this code is called
case TokenType.AssemblyRef:
- return module.AssemblyReferences [(int) scope.RID - 1];
+ InitializeAssemblyReferences ();
+ return metadata.AssemblyReferences [(int) scope.RID - 1];
case TokenType.ModuleRef:
- return module.ModuleReferences [(int) scope.RID - 1];
+ InitializeModuleReferences ();
+ return metadata.ModuleReferences [(int) scope.RID - 1];
case TokenType.Module:
return module;
default:
@@ -1108,14 +1150,19 @@ namespace Mono.Cecil {
var fields = new MemberDefinitionCollection<FieldDefinition> (type, (int) fields_range.Length);
this.context = type;
- MoveTo (Table.Field, fields_range.Start);
- for (uint i = 0; i < fields_range.Length; i++)
- fields.Add (ReadField (fields_range.Start + i));
+ if (!MoveTo (Table.FieldPtr, fields_range.Start)) {
+ if (!MoveTo (Table.Field, fields_range.Start))
+ return fields;
+
+ for (uint i = 0; i < fields_range.Length; i++)
+ ReadField (fields_range.Start + i, fields);
+ } else
+ ReadPointers (Table.FieldPtr, Table.Field, fields_range, fields, ReadField);
return fields;
}
- FieldDefinition ReadField (uint field_rid)
+ void ReadField (uint field_rid, Collection<FieldDefinition> fields)
{
var attributes = (FieldAttributes) ReadUInt16 ();
var name = ReadString ();
@@ -1125,7 +1172,10 @@ namespace Mono.Cecil {
field.token = new MetadataToken (TokenType.Field, field_rid);
metadata.AddFieldDefinition (field);
- return field;
+ if (IsDeleted (field))
+ return;
+
+ fields.Add (field);
}
void InitializeFields ()
@@ -1293,18 +1343,24 @@ namespace Mono.Cecil {
metadata.RemoveEventsRange (type);
- if (range.Length == 0 || !MoveTo (Table.Event, range.Start))
+ if (range.Length == 0)
return events;
this.context = type;
- for (uint i = 0; i < range.Length; i++)
- events.Add (ReadEvent (range.Start + i));
+ if (!MoveTo (Table.EventPtr, range.Start)) {
+ if (!MoveTo (Table.Event, range.Start))
+ return events;
+
+ for (uint i = 0; i < range.Length; i++)
+ ReadEvent (range.Start + i, events);
+ } else
+ ReadPointers (Table.EventPtr, Table.Event, range, events, ReadEvent);
return events;
}
- EventDefinition ReadEvent (uint event_rid)
+ void ReadEvent (uint event_rid, Collection<EventDefinition> events)
{
var attributes = (EventAttributes) ReadUInt16 ();
var name = ReadString ();
@@ -1312,7 +1368,11 @@ namespace Mono.Cecil {
var @event = new EventDefinition (name, attributes, event_type);
@event.token = new MetadataToken (TokenType.Event, event_rid);
- return @event;
+
+ if (IsDeleted (@event))
+ return;
+
+ events.Add (@event);
}
void InitializeEvents ()
@@ -1360,18 +1420,23 @@ namespace Mono.Cecil {
var properties = new MemberDefinitionCollection<PropertyDefinition> (type, (int) range.Length);
- if (range.Length == 0 || !MoveTo (Table.Property, range.Start))
+ if (range.Length == 0)
return properties;
this.context = type;
- for (uint i = 0; i < range.Length; i++)
- properties.Add (ReadProperty (range.Start + i));
+ if (!MoveTo (Table.PropertyPtr, range.Start)) {
+ if (!MoveTo (Table.Property, range.Start))
+ return properties;
+ for (uint i = 0; i < range.Length; i++)
+ ReadProperty (range.Start + i, properties);
+ } else
+ ReadPointers (Table.PropertyPtr, Table.Property, range, properties, ReadProperty);
return properties;
}
- PropertyDefinition ReadProperty (uint property_rid)
+ void ReadProperty (uint property_rid, Collection<PropertyDefinition> properties)
{
var attributes = (PropertyAttributes) ReadUInt16 ();
var name = ReadString ();
@@ -1393,7 +1458,10 @@ namespace Mono.Cecil {
property.HasThis = has_this;
property.token = new MetadataToken (TokenType.Property, property_rid);
- return property;
+ if (IsDeleted (property))
+ return;
+
+ properties.Add (property);
}
void InitializeProperties ()
@@ -1562,14 +1630,36 @@ namespace Mono.Cecil {
return new MemberDefinitionCollection<MethodDefinition> (type);
var methods = new MemberDefinitionCollection<MethodDefinition> (type, (int) methods_range.Length);
+ if (!MoveTo (Table.MethodPtr, methods_range.Start)) {
+ if (!MoveTo (Table.Method, methods_range.Start))
+ return methods;
- MoveTo (Table.Method, methods_range.Start);
- for (uint i = 0; i < methods_range.Length; i++)
- ReadMethod (methods_range.Start + i, methods);
+ for (uint i = 0; i < methods_range.Length; i++)
+ ReadMethod (methods_range.Start + i, methods);
+ } else
+ ReadPointers (Table.MethodPtr, Table.Method, methods_range, methods, ReadMethod);
return methods;
}
+ void ReadPointers<TMember> (Table ptr, Table table, Range range, Collection<TMember> members, Action<uint, Collection<TMember>> reader)
+ where TMember : IMemberDefinition
+ {
+ for (uint i = 0; i < range.Length; i++) {
+ MoveTo (ptr, range.Start + i);
+
+ var rid = ReadTableIndex (table);
+ MoveTo (table, rid);
+
+ reader (rid, members);
+ }
+ }
+
+ static bool IsDeleted (IMemberDefinition member)
+ {
+ return member.IsSpecialName && member.Name == "_Deleted";
+ }
+
void InitializeMethods ()
{
if (metadata.Methods != null)
@@ -1587,6 +1677,9 @@ namespace Mono.Cecil {
method.Name = ReadString ();
method.token = new MetadataToken (TokenType.Method, method_rid);
+ if (IsDeleted (method))
+ return;
+
methods.Add (method); // attach method
var signature = ReadBlobIndex ();
@@ -1607,22 +1700,44 @@ namespace Mono.Cecil {
void ReadParameters (MethodDefinition method, Range param_range)
{
- MoveTo (Table.Param, param_range.Start);
- for (uint i = 0; i < param_range.Length; i++) {
- var attributes = (ParameterAttributes) ReadUInt16 ();
- var sequence = ReadUInt16 ();
- var name = ReadString ();
+ if (!MoveTo (Table.ParamPtr, param_range.Start)) {
+ if (!MoveTo (Table.Param, param_range.Start))
+ return;
- var parameter = sequence == 0
- ? method.MethodReturnType.Parameter
- : method.Parameters [sequence - 1];
+ for (uint i = 0; i < param_range.Length; i++)
+ ReadParameter (param_range.Start + i, method);
+ } else
+ ReadParameterPointers (method, param_range);
+ }
+
+ void ReadParameterPointers (MethodDefinition method, Range range)
+ {
+ for (uint i = 0; i < range.Length; i++) {
+ MoveTo (Table.ParamPtr, range.Start + i);
+
+ var rid = ReadTableIndex (Table.Param);
- parameter.token = new MetadataToken (TokenType.Param, param_range.Start + i);
- parameter.Name = name;
- parameter.Attributes = attributes;
+ MoveTo (Table.Param, rid);
+
+ ReadParameter (rid, method);
}
}
+ void ReadParameter (uint param_rid, MethodDefinition method)
+ {
+ var attributes = (ParameterAttributes) ReadUInt16 ();
+ var sequence = ReadUInt16 ();
+ var name = ReadString ();
+
+ var parameter = sequence == 0
+ ? method.MethodReturnType.Parameter
+ : method.Parameters [sequence - 1];
+
+ parameter.token = new MetadataToken (TokenType.Param, param_rid);
+ parameter.Name = name;
+ parameter.Attributes = attributes;
+ }
+
void ReadMethodSignature (uint signature, IMethodSignature method)
{
var reader = ReadSignature (signature);
@@ -1673,25 +1788,35 @@ namespace Mono.Cecil {
{
InitializeGenericParameters ();
- Range range;
- if (!metadata.TryGetGenericParameterRange (provider, out range))
+ Range [] ranges;
+ if (!metadata.TryGetGenericParameterRanges (provider, out ranges))
return false;
- return range.Length > 0;
+ return RangesSize (ranges) > 0;
}
public Collection<GenericParameter> ReadGenericParameters (IGenericParameterProvider provider)
{
InitializeGenericParameters ();
- Range range;
- if (!metadata.TryGetGenericParameterRange (provider, out range)
- || !MoveTo (Table.GenericParam, range.Start))
- return new Collection<GenericParameter> ();
+ Range [] ranges;
+ if (!metadata.TryGetGenericParameterRanges (provider, out ranges))
+ return new GenericParameterCollection (provider);
metadata.RemoveGenericParameterRange (provider);
- var generic_parameters = new Collection<GenericParameter> ((int) range.Length);
+ var generic_parameters = new GenericParameterCollection (provider, RangesSize (ranges));
+
+ for (int i = 0; i < ranges.Length; i++)
+ ReadGenericParametersRange (ranges [i], provider, generic_parameters);
+
+ return generic_parameters;
+ }
+
+ void ReadGenericParametersRange (Range range, IGenericParameterProvider provider, GenericParameterCollection generic_parameters)
+ {
+ if (!MoveTo (Table.GenericParam, range.Start))
+ return;
for (uint i = 0; i < range.Length; i++) {
ReadUInt16 (); // index
@@ -1705,8 +1830,6 @@ namespace Mono.Cecil {
generic_parameters.Add (parameter);
}
-
- return generic_parameters;
}
void InitializeGenericParameters ()
@@ -1723,10 +1846,10 @@ namespace Mono.Cecil {
});
}
- Dictionary<MetadataToken, Range> InitializeRanges (Table table, Func<MetadataToken> get_next)
+ Dictionary<MetadataToken, Range []> InitializeRanges (Table table, Func<MetadataToken> get_next)
{
int length = MoveTo (table);
- var ranges = new Dictionary<MetadataToken, Range> (length);
+ var ranges = new Dictionary<MetadataToken, Range []> (length);
if (length == 0)
return ranges;
@@ -1741,20 +1864,34 @@ namespace Mono.Cecil {
owner = next;
range.Length++;
} else if (next != owner) {
- if (owner.RID != 0)
- ranges.Add (owner, range);
+ AddRange (ranges, owner, range);
range = new Range (i, 1);
owner = next;
} else
range.Length++;
}
- if (owner != MetadataToken.Zero)
- ranges.Add (owner, range);
+ AddRange (ranges, owner, range);
return ranges;
}
+ static void AddRange (Dictionary<MetadataToken, Range []> ranges, MetadataToken owner, Range range)
+ {
+ if (owner.RID == 0)
+ return;
+
+ Range [] slots;
+ if (!ranges.TryGetValue (owner, out slots)) {
+ ranges.Add (owner, new [] { range });
+ return;
+ }
+
+ slots = slots.Resize (slots.Length + 1);
+ slots [slots.Length - 1] = range;
+ ranges [owner] = slots;
+ }
+
public bool HasGenericConstraints (GenericParameter generic_parameter)
{
InitializeGenericConstraints ();
@@ -1884,6 +2021,8 @@ namespace Mono.Cecil {
ReadMethodSignature (signature, call_site);
+ call_site.MetadataToken = token;
+
return call_site;
}
@@ -2075,7 +2214,8 @@ namespace Mono.Cecil {
{
var declaring_type = GetTypeDefOrRef (type);
- this.context = declaring_type;
+ if (!declaring_type.IsArray)
+ this.context = declaring_type;
var member = ReadMemberReferenceSignature (signature, declaring_type);
member.Name = name;
@@ -2215,23 +2355,35 @@ namespace Mono.Cecil {
{
InitializeCustomAttributes ();
- Range range;
- if (!metadata.TryGetCustomAttributeRange (owner, out range))
+ Range [] ranges;
+ if (!metadata.TryGetCustomAttributeRanges (owner, out ranges))
return false;
- return range.Length > 0;
+ return RangesSize (ranges) > 0;
}
public Collection<CustomAttribute> ReadCustomAttributes (ICustomAttributeProvider owner)
{
InitializeCustomAttributes ();
- Range range;
- if (!metadata.TryGetCustomAttributeRange (owner, out range)
- || !MoveTo (Table.CustomAttribute, range.Start))
+ Range [] ranges;
+ if (!metadata.TryGetCustomAttributeRanges (owner, out ranges))
return new Collection<CustomAttribute> ();
- var custom_attributes = new Collection<CustomAttribute> ((int) range.Length);
+ var custom_attributes = new Collection<CustomAttribute> (RangesSize (ranges));
+
+ for (int i = 0; i < ranges.Length; i++)
+ ReadCustomAttributeRange (ranges [i], custom_attributes);
+
+ metadata.RemoveCustomAttributeRange (owner);
+
+ return custom_attributes;
+ }
+
+ void ReadCustomAttributeRange (Range range, Collection<CustomAttribute> custom_attributes)
+ {
+ if (!MoveTo (Table.CustomAttribute, range.Start))
+ return;
for (int i = 0; i < range.Length; i++) {
ReadMetadataToken (CodedIndex.HasCustomAttribute);
@@ -2243,10 +2395,15 @@ namespace Mono.Cecil {
custom_attributes.Add (new CustomAttribute (signature, constructor));
}
+ }
- metadata.RemoveCustomAttributeRange (owner);
+ static int RangesSize (Range [] ranges)
+ {
+ uint size = 0;
+ for (int i = 0; i < ranges.Length; i++)
+ size += ranges [i].Length;
- return custom_attributes;
+ return (int) size;
}
public byte [] ReadCustomAttributeBlob (uint signature)
@@ -2257,8 +2414,12 @@ namespace Mono.Cecil {
public void ReadCustomAttributeSignature (CustomAttribute attribute)
{
var reader = ReadSignature (attribute.signature);
+
+ if (!reader.CanReadMore ())
+ return;
+
if (reader.ReadUInt16 () != 0x0001)
- throw new InvalidOperationException ();
+ throw new InvalidOperationException ();
var constructor = attribute.Constructor;
if (constructor.HasParameters)
@@ -2334,23 +2495,35 @@ namespace Mono.Cecil {
{
InitializeSecurityDeclarations ();
- Range range;
- if (!metadata.TryGetSecurityDeclarationRange (owner, out range))
+ Range [] ranges;
+ if (!metadata.TryGetSecurityDeclarationRanges (owner, out ranges))
return false;
- return range.Length > 0;
+ return RangesSize (ranges) > 0;
}
public Collection<SecurityDeclaration> ReadSecurityDeclarations (ISecurityDeclarationProvider owner)
{
InitializeSecurityDeclarations ();
- Range range;
- if (!metadata.TryGetSecurityDeclarationRange (owner, out range)
- || !MoveTo (Table.DeclSecurity, range.Start))
+ Range [] ranges;
+ if (!metadata.TryGetSecurityDeclarationRanges (owner, out ranges))
return new Collection<SecurityDeclaration> ();
- var security_declarations = new Collection<SecurityDeclaration> ((int) range.Length);
+ var security_declarations = new Collection<SecurityDeclaration> (RangesSize (ranges));
+
+ for (int i = 0; i < ranges.Length; i++)
+ ReadSecurityDeclarationRange (ranges [i], security_declarations);
+
+ metadata.RemoveSecurityDeclarationRange (owner);
+
+ return security_declarations;
+ }
+
+ void ReadSecurityDeclarationRange (Range range, Collection<SecurityDeclaration> security_declarations)
+ {
+ if (!MoveTo (Table.DeclSecurity, range.Start))
+ return;
for (int i = 0; i < range.Length; i++) {
var action = (SecurityAction) ReadUInt16 ();
@@ -2359,10 +2532,6 @@ namespace Mono.Cecil {
security_declarations.Add (new SecurityDeclaration (action, signature, module));
}
-
- metadata.RemoveSecurityDeclarationRange (owner);
-
- return security_declarations;
}
public byte [] ReadSecurityDeclarationBlob (uint signature)
@@ -2380,7 +2549,7 @@ namespace Mono.Cecil {
return;
}
- reader.ReadByte ();
+ reader.position++;
var count = reader.ReadCompressedUInt32 ();
var attributes = new Collection<SecurityAttribute> ((int) count);
@@ -2440,7 +2609,7 @@ namespace Mono.Cecil {
break;
}
- var exported_type = new ExportedType (@namespace, name, scope) {
+ var exported_type = new ExportedType (@namespace, name, module, scope) {
Attributes = attributes,
Identifier = (int) identifier,
DeclaringType = declaring_type,
@@ -2455,21 +2624,24 @@ namespace Mono.Cecil {
IMetadataScope GetExportedTypeScope (MetadataToken token)
{
+ var position = this.position;
+ IMetadataScope scope;
+
switch (token.TokenType) {
case TokenType.AssemblyRef:
- return module.AssemblyReferences [(int) token.RID - 1];
+ InitializeAssemblyReferences ();
+ scope = metadata.AssemblyReferences [(int) token.RID - 1];
+ break;
case TokenType.File:
- var position = this.position;
- var reference = GetModuleReferenceFromFile (token);
- this.position = position;
-
- if (reference == null)
- throw new NotSupportedException ();
-
- return reference;
+ InitializeModuleReferences ();
+ scope = GetModuleReferenceFromFile (token);
+ break;
default:
throw new NotSupportedException ();
}
+
+ this.position = position;
+ return scope;
}
ModuleReference GetModuleReferenceFromFile (MetadataToken token)
@@ -2481,16 +2653,15 @@ namespace Mono.Cecil {
var file_name = ReadString ();
var modules = module.ModuleReferences;
- ModuleReference reference = null;
+ ModuleReference reference;
for (int i = 0; i < modules.Count; i++) {
- var module_reference = modules [i];
- if (module_reference.Name != file_name)
- continue;
-
- reference = module_reference;
- break;
+ reference = modules [i];
+ if (reference.Name == file_name)
+ return reference;
}
+ reference = new ModuleReference (file_name);
+ modules.Add (reference);
return reference;
}
@@ -2532,9 +2703,10 @@ namespace Mono.Cecil {
GenericParameter GetGenericParameter (GenericParameterType type, uint var)
{
var context = reader.context;
+ int index = (int) var;
if (context == null)
- throw new NotSupportedException ();
+ return GetUnboundGenericParameter (type, index);
IGenericParameterProvider provider;
@@ -2549,14 +2721,20 @@ namespace Mono.Cecil {
throw new NotSupportedException ();
}
- int index = (int) var;
-
if (!context.IsDefinition)
CheckGenericContext (provider, index);
+ if (index >= provider.GenericParameters.Count)
+ return GetUnboundGenericParameter (type, index);
+
return provider.GenericParameters [index];
}
+ GenericParameter GetUnboundGenericParameter (GenericParameterType type, int index)
+ {
+ return new GenericParameter (index, type, reader.module);
+ }
+
static void CheckGenericContext (IGenericParameterProvider owner, int index)
{
var owner_parameters = owner.GenericParameters;
@@ -2682,12 +2860,24 @@ namespace Mono.Cecil {
public void ReadMethodSignature (IMethodSignature method)
{
var calling_convention = ReadByte ();
+
+ const byte has_this = 0x20;
+ const byte explicit_this = 0x40;
+
+ if ((calling_convention & has_this) != 0) {
+ method.HasThis = true;
+ calling_convention = (byte) (calling_convention & ~has_this);
+ }
+
+ if ((calling_convention & explicit_this) != 0) {
+ method.ExplicitThis = true;
+ calling_convention = (byte) (calling_convention & ~explicit_this);
+ }
+
method.CallingConvention = (MethodCallingConvention) calling_convention;
- method.HasThis = (calling_convention & 0x20) != 0;
- method.ExplicitThis = (calling_convention & 0x40) != 0;
var generic_context = method as MethodReference;
- if (generic_context != null)
+ if (generic_context != null && !generic_context.DeclaringType.IsArray)
reader.context = generic_context;
if ((calling_convention & 0x10) != 0) {
@@ -2697,8 +2887,6 @@ namespace Mono.Cecil {
CheckGenericContext (generic_context, (int) arity -1 );
}
- // TODO: more call_conv
-
var param_count = ReadCompressedUInt32 ();
method.MethodReturnType.ReturnType = ReadTypeSignature ();
@@ -2803,10 +2991,11 @@ namespace Mono.Cecil {
if (type.IsArray)
return ReadCustomAttributeFixedArrayArgument ((ArrayType) type);
- if (type.etype == ElementType.Object)
- return ReadCustomAttributeElement (ReadCustomAttributeFieldOrPropType ());
-
- return new CustomAttributeArgument (type, ReadCustomAttributeElementValue (type));
+ return new CustomAttributeArgument (
+ type,
+ type.etype == ElementType.Object
+ ? ReadCustomAttributeElement (ReadCustomAttributeFieldOrPropType ())
+ : ReadCustomAttributeElementValue (type));
}
object ReadCustomAttributeElementValue (TypeReference type)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
index 7aad247..bffa439 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -97,20 +97,18 @@ namespace Mono.Cecil {
var symbol_writer = GetSymbolWriter (module, fq_name, symbol_writer_provider);
#if !SILVERLIGHT && !CF
- if (parameters.StrongNameKeyPair != null && name != null)
+ if (parameters.StrongNameKeyPair != null && name != null) {
name.PublicKey = parameters.StrongNameKeyPair.PublicKey;
-#endif
-
- if (name != null && name.HasPublicKey)
module.Attributes |= ModuleAttributes.StrongNameSigned;
-
+ }
+#endif
var metadata = new MetadataBuilder (module, fq_name,
symbol_writer_provider, symbol_writer);
BuildMetadata (module, metadata);
- if (module.SymbolReader != null)
- module.SymbolReader.Dispose ();
+ if (module.symbol_reader != null)
+ module.symbol_reader.Dispose ();
var writer = ImageWriter.CreateWriter (module, metadata, stream);
@@ -786,7 +784,7 @@ namespace Mono.Cecil {
TextMap CreateTextMap ()
{
var map = new TextMap ();
- map.AddMap (TextSegment.ImportAddressTable, module.Architecture == TargetArchitecture.I386 ? 8 : 16);
+ map.AddMap (TextSegment.ImportAddressTable, module.Architecture == TargetArchitecture.I386 ? 8 : 0);
map.AddMap (TextSegment.CLIHeader, 0x48, 8);
return map;
}
@@ -935,11 +933,13 @@ namespace Mono.Cecil {
? reference.PublicKeyToken
: reference.PublicKey;
+ var version = reference.Version;
+
var rid = table.AddRow (new AssemblyRefRow (
- (ushort) reference.Version.Major,
- (ushort) reference.Version.Minor,
- (ushort) reference.Version.Build,
- (ushort) reference.Version.Revision,
+ (ushort) version.Major,
+ (ushort) version.Minor,
+ (ushort) version.Build,
+ (ushort) version.Revision,
reference.Attributes,
GetBlobIndex (key_or_token),
GetStringIndex (reference.Name),
@@ -1456,7 +1456,7 @@ namespace Mono.Cecil {
{
var pinvoke = method.PInvokeInfo;
if (pinvoke == null)
- throw new ArgumentException ();
+ return;
var table = GetTable<ImplMapTable> (Table.ImplMap);
table.AddRow (new ImplMapRow (
@@ -1932,21 +1932,13 @@ namespace Mono.Cecil {
SignatureWriter GetSecurityDeclarationSignature (SecurityDeclaration declaration)
{
var signature = CreateSignatureWriter ();
- if (!declaration.resolved) {
- signature.WriteBytes (declaration.GetBlob ());
- return signature;
- }
-
- signature.WriteByte ((byte) '.');
- var attributes = declaration.security_attributes;
- if (attributes == null)
- throw new NotSupportedException ();
-
- signature.WriteCompressedUInt32 ((uint) attributes.Count);
-
- for (int i = 0; i < attributes.Count; i++)
- signature.WriteSecurityAttribute (attributes [i]);
+ if (!declaration.resolved)
+ signature.WriteBytes (declaration.GetBlob ());
+ else if (module.Runtime < TargetRuntime.Net_2_0)
+ signature.WriteXmlSecurityDeclaration (declaration);
+ else
+ signature.WriteSecurityDeclaration (declaration);
return signature;
}
@@ -2279,8 +2271,11 @@ namespace Mono.Cecil {
}
if (type.etype == ElementType.Object) {
- WriteCustomAttributeFieldOrPropType (argument.Type);
- WriteCustomAttributeElement (argument.Type, argument);
+ argument = (CustomAttributeArgument) argument.Value;
+ type = argument.Type;
+
+ WriteCustomAttributeFieldOrPropType (type);
+ WriteCustomAttributeElement (type, argument);
return;
}
@@ -2446,19 +2441,19 @@ namespace Mono.Cecil {
WriteCustomAttributeFixedArgument (argument.Type, argument);
}
- public void WriteSecurityAttribute (SecurityAttribute attribute)
+ void WriteSecurityAttribute (SecurityAttribute attribute)
{
WriteTypeReference (attribute.AttributeType);
var count = GetNamedArgumentCount (attribute);
if (count == 0) {
- WriteCompressedUInt32 (0); // length
+ WriteCompressedUInt32 (1); // length
WriteCompressedUInt32 (0); // count
return;
}
- var buffer = new SignatureWriter (metadata);
+ var buffer = new SignatureWriter (metadata);
buffer.WriteCompressedUInt32 ((uint) count);
buffer.WriteICustomAttributeNamedArguments (attribute);
@@ -2466,6 +2461,49 @@ namespace Mono.Cecil {
WriteBytes (buffer);
}
+ public void WriteSecurityDeclaration (SecurityDeclaration declaration)
+ {
+ WriteByte ((byte) '.');
+
+ var attributes = declaration.security_attributes;
+ if (attributes == null)
+ throw new NotSupportedException ();
+
+ WriteCompressedUInt32 ((uint) attributes.Count);
+
+ for (int i = 0; i < attributes.Count; i++)
+ WriteSecurityAttribute (attributes [i]);
+ }
+
+ public void WriteXmlSecurityDeclaration (SecurityDeclaration declaration)
+ {
+ var xml = GetXmlSecurityDeclaration (declaration);
+ if (xml == null)
+ throw new NotSupportedException ();
+
+ WriteBytes (Encoding.Unicode.GetBytes (xml));
+ }
+
+ static string GetXmlSecurityDeclaration (SecurityDeclaration declaration)
+ {
+ if (declaration.security_attributes == null || declaration.security_attributes.Count != 1)
+ return null;
+
+ var attribute = declaration.security_attributes [0];
+
+ if (!attribute.AttributeType.IsTypeOf ("System.Security.Permissions", "PermissionSetAttribute"))
+ return null;
+
+ if (attribute.properties == null || attribute.properties.Count != 1)
+ return null;
+
+ var property = attribute.properties [0];
+ if (property.Name != "XML")
+ return null;
+
+ return (string) property.Argument.Value;
+ }
+
void WriteTypeReference (TypeReference type)
{
WriteUTF8String (TypeParser.ToParseable (type));
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/BaseAssemblyResolver.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/BaseAssemblyResolver.cs
index e449a03..10ab2c3 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/BaseAssemblyResolver.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/BaseAssemblyResolver.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -51,6 +51,33 @@ namespace Mono.Cecil {
}
}
+#if !SILVERLIGHT && !CF
+ [Serializable]
+#endif
+ public class AssemblyResolutionException : FileNotFoundException {
+
+ readonly AssemblyNameReference reference;
+
+ public AssemblyNameReference AssemblyReference {
+ get { return reference; }
+ }
+
+ public AssemblyResolutionException (AssemblyNameReference reference)
+ : base (string.Format ("Failed to resolve assembly: '{0}'", reference))
+ {
+ this.reference = reference;
+ }
+
+#if !SILVERLIGHT && !CF
+ protected AssemblyResolutionException (
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context)
+ : base (info, context)
+ {
+ }
+#endif
+ }
+
public abstract class BaseAssemblyResolver : IAssemblyResolver {
static readonly bool on_mono = Type.GetType ("Mono.Runtime") != null;
@@ -152,7 +179,7 @@ namespace Mono.Cecil {
return assembly;
}
- throw new FileNotFoundException ("Could not resolve: " + name);
+ throw new AssemblyResolutionException (name);
}
AssemblyDefinition SearchDirectory (AssemblyNameReference name, IEnumerable<string> directories, ReaderParameters parameters)
@@ -318,10 +345,11 @@ namespace Mono.Cecil {
static string GetAssemblyFile (AssemblyNameReference reference, string prefix, string gac)
{
- var gac_folder = new StringBuilder ();
- gac_folder.Append (prefix);
- gac_folder.Append (reference.Version);
- gac_folder.Append ("__");
+ var gac_folder = new StringBuilder ()
+ .Append (prefix)
+ .Append (reference.Version)
+ .Append ("__");
+
for (int i = 0; i < reference.PublicKeyToken.Length; i++)
gac_folder.Append (reference.PublicKeyToken [i].ToString ("x2"));
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CallSite.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CallSite.cs
index e4880ec..2d4ed41 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CallSite.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CallSite.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,11 +29,70 @@
using System;
using System.Text;
+using Mono.Collections.Generic;
+
namespace Mono.Cecil {
- public sealed class CallSite : MethodReference {
+ public sealed class CallSite : IMethodSignature {
+
+ readonly MethodReference signature;
- public override string FullName {
+ public bool HasThis {
+ get { return signature.HasThis; }
+ set { signature.HasThis = value; }
+ }
+
+ public bool ExplicitThis {
+ get { return signature.ExplicitThis; }
+ set { signature.ExplicitThis = value; }
+ }
+
+ public MethodCallingConvention CallingConvention {
+ get { return signature.CallingConvention; }
+ set { signature.CallingConvention = value; }
+ }
+
+ public bool HasParameters {
+ get { return signature.HasParameters; }
+ }
+
+ public Collection<ParameterDefinition> Parameters {
+ get { return signature.Parameters; }
+ }
+
+ public TypeReference ReturnType {
+ get { return signature.MethodReturnType.ReturnType; }
+ set { signature.MethodReturnType.ReturnType = value; }
+ }
+
+ public MethodReturnType MethodReturnType {
+ get { return signature.MethodReturnType; }
+ }
+
+ public string Name {
+ get { return string.Empty; }
+ set { throw new InvalidOperationException (); }
+ }
+
+ public string Namespace {
+ get { return string.Empty; }
+ set { throw new InvalidOperationException (); }
+ }
+
+ public ModuleDefinition Module {
+ get { return ReturnType.Module; }
+ }
+
+ public IMetadataScope Scope {
+ get { return signature.ReturnType.Scope; }
+ }
+
+ public MetadataToken MetadataToken {
+ get { return signature.token; }
+ set { signature.token = value; }
+ }
+
+ public string FullName {
get {
var signature = new StringBuilder ();
signature.Append (ReturnType.FullName);
@@ -41,5 +100,25 @@ namespace Mono.Cecil {
return signature.ToString ();
}
}
+
+ internal CallSite ()
+ {
+ this.signature = new MethodReference ();
+ this.signature.token = new MetadataToken (TokenType.Signature, 0);
+ }
+
+ public CallSite (TypeReference returnType)
+ : this ()
+ {
+ if (returnType == null)
+ throw new ArgumentNullException ("returnType");
+
+ this.signature.ReturnType = returnType;
+ }
+
+ public override string ToString ()
+ {
+ return FullName;
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CustomAttribute.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CustomAttribute.cs
index af47d8b..76372db 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CustomAttribute.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/CustomAttribute.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -103,6 +103,10 @@ namespace Mono.Cecil {
get { return constructor.DeclaringType; }
}
+ public bool IsResolved {
+ get { return resolved; }
+ }
+
public bool HasConstructorArguments {
get {
Resolve ();
@@ -184,7 +188,7 @@ namespace Mono.Cecil {
if (blob != null)
return blob;
- if (!HasImage || signature == 0)
+ if (!HasImage)
throw new NotSupportedException ();
return blob = Module.Read (this, (attribute, reader) => reader.ReadCustomAttributeBlob (attribute.signature));
@@ -195,12 +199,23 @@ namespace Mono.Cecil {
if (resolved || !HasImage)
return;
- Module.Read (this, (attribute, reader) => {
- reader.ReadCustomAttributeSignature (attribute);
- return this;
- });
-
- resolved = true;
+ try {
+ Module.Read (this, (attribute, reader) => {
+ reader.ReadCustomAttributeSignature (attribute);
+ return this;
+ });
+
+ resolved = true;
+ } catch (ResolutionException) {
+ if (arguments != null)
+ arguments.Clear ();
+ if (fields != null)
+ fields.Clear ();
+ if (properties != null)
+ properties.Clear ();
+
+ resolved = false;
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/DefaultAssemblyResolver.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/DefaultAssemblyResolver.cs
index cac7974..e0baedf 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/DefaultAssemblyResolver.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/DefaultAssemblyResolver.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -31,18 +31,13 @@ using System.Collections.Generic;
namespace Mono.Cecil {
- public static class GlobalAssemblyResolver {
-
- public static readonly IAssemblyResolver Instance = new DefaultAssemblyResolver ();
- }
-
public class DefaultAssemblyResolver : BaseAssemblyResolver {
readonly IDictionary<string, AssemblyDefinition> cache;
public DefaultAssemblyResolver ()
{
- cache = new Dictionary<string, AssemblyDefinition> ();
+ cache = new Dictionary<string, AssemblyDefinition> (StringComparer.Ordinal);
}
public override AssemblyDefinition Resolve (AssemblyNameReference name)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EmbeddedResource.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EmbeddedResource.cs
index bb9f1f9..e12dd0b 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EmbeddedResource.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EmbeddedResource.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventAttributes.cs
index b5b097d..815efa5 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventDefinition.cs
index 7a80aa0..89b5548 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -124,8 +124,8 @@ namespace Mono.Cecil {
}
public bool IsRuntimeSpecialName {
- get { return attributes.GetAttributes ((ushort) FieldAttributes.RTSpecialName); }
- set { attributes = attributes.SetAttributes ((ushort) FieldAttributes.RTSpecialName, value); }
+ get { return attributes.GetAttributes ((ushort) EventAttributes.RTSpecialName); }
+ set { attributes = attributes.SetAttributes ((ushort) EventAttributes.RTSpecialName, value); }
}
#endregion
@@ -159,5 +159,10 @@ namespace Mono.Cecil {
module.Read (this, (@event, reader) => reader.ReadMethods (@event));
}
+
+ public override EventDefinition Resolve ()
+ {
+ return this;
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventReference.cs
index e1435da..8952002 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/EventReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -51,5 +51,7 @@ namespace Mono.Cecil {
event_type = eventType;
}
+
+ public abstract EventDefinition Resolve ();
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ExportedType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ExportedType.cs
index a1e793a..c25f8d0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ExportedType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ExportedType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -36,6 +36,7 @@ namespace Mono.Cecil {
string name;
uint attributes;
IMetadataScope scope;
+ ModuleDefinition module;
int identifier;
ExportedType declaring_type;
internal MetadataToken token;
@@ -220,16 +221,29 @@ namespace Mono.Cecil {
}
}
- public ExportedType (string @namespace, string name, IMetadataScope scope)
+ public ExportedType (string @namespace, string name, ModuleDefinition module, IMetadataScope scope)
{
this. at namespace = @namespace;
this.name = name;
this.scope = scope;
+ this.module = module;
}
public override string ToString ()
{
return FullName;
}
+
+ public TypeDefinition Resolve ()
+ {
+ return module.Resolve (CreateReference ());
+ }
+
+ internal TypeReference CreateReference ()
+ {
+ return new TypeReference (@namespace, name, module, scope) {
+ DeclaringType = declaring_type != null ? declaring_type.CreateReference () : null,
+ };
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldAttributes.cs
index 947a877..dd6bf36 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldDefinition.cs
index c60a940..29a1bc1 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldReference.cs
index 1c812bb..be58d3d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FieldReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FileAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FileAttributes.cs
index 6c2781c..4d3b6ca 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FileAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FileAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FunctionPointerType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FunctionPointerType.cs
index f7bf08c..756d31f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FunctionPointerType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/FunctionPointerType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -85,6 +85,7 @@ namespace Mono.Cecil {
public override IMetadataScope Scope {
get { return function.ReturnType.Scope; }
+ set { throw new InvalidOperationException (); }
}
public override bool IsFunctionPointer {
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceMethod.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceMethod.cs
index d4871c3..dbe720d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceMethod.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceMethod.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -42,12 +42,7 @@ namespace Mono.Cecil {
}
public Collection<TypeReference> GenericArguments {
- get {
- if (arguments == null)
- arguments = new Collection<TypeReference> ();
-
- return arguments;
- }
+ get { return arguments ?? (arguments = new Collection<TypeReference> ()); }
}
public override bool IsGenericInstance {
@@ -70,11 +65,11 @@ namespace Mono.Cecil {
get {
var signature = new StringBuilder ();
var method = this.ElementMethod;
- signature.Append (method.ReturnType.FullName);
- signature.Append (" ");
- signature.Append (method.DeclaringType.FullName);
- signature.Append ("::");
- signature.Append (method.Name);
+ signature.Append (method.ReturnType.FullName)
+ .Append (" ")
+ .Append (method.DeclaringType.FullName)
+ .Append ("::")
+ .Append (method.Name);
this.GenericInstanceFullName (signature);
this.MethodSignatureFullName (signature);
return signature.ToString ();
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceType.cs
index 46c048b..6554ff0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericInstanceType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -44,12 +44,7 @@ namespace Mono.Cecil {
}
public Collection<TypeReference> GenericArguments {
- get {
- if (arguments == null)
- arguments = new Collection<TypeReference> ();
-
- return arguments;
- }
+ get { return arguments ?? (arguments = new Collection<TypeReference> ()); }
}
public override TypeReference DeclaringType {
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameter.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameter.cs
index d3e5a15..d66cc91 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameter.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameter.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -36,7 +36,9 @@ namespace Mono.Cecil {
public sealed class GenericParameter : TypeReference, ICustomAttributeProvider {
- readonly IGenericParameterProvider owner;
+ internal int position;
+ internal GenericParameterType type;
+ internal IGenericParameterProvider owner;
ushort attributes;
Collection<TypeReference> constraints;
@@ -48,12 +50,11 @@ namespace Mono.Cecil {
}
public int Position {
- get {
- if (owner == null)
- return -1;
+ get { return position; }
+ }
- return owner.GenericParameters.IndexOf (this);
- }
+ public GenericParameterType Type {
+ get { return type; }
}
public IGenericParameterProvider Owner {
@@ -97,21 +98,29 @@ namespace Mono.Cecil {
get { return custom_attributes ?? (custom_attributes = this.GetCustomAttributes (Module)); }
}
- internal new bool HasImage {
- get { return Module != null && Module.HasImage; }
- }
-
public override IMetadataScope Scope {
get {
- if (owner.GenericParameterType == GenericParameterType.Method)
- return ((MethodReference) owner).DeclaringType.Scope;
+ if (owner == null)
+ return null;
- return ((TypeReference) owner).Scope;
+ return owner.GenericParameterType == GenericParameterType.Method
+ ? ((MethodReference) owner).DeclaringType.Scope
+ : ((TypeReference) owner).Scope;
}
+ set { throw new InvalidOperationException (); }
+ }
+
+ public override TypeReference DeclaringType {
+ get { return owner as TypeReference; }
+ set { throw new InvalidOperationException (); }
+ }
+
+ public MethodReference DeclaringMethod {
+ get { return owner as MethodReference; }
}
public override ModuleDefinition Module {
- get { return ((MemberReference) owner).Module; }
+ get { return module ?? owner.Module; }
}
public override string Name {
@@ -119,7 +128,7 @@ namespace Mono.Cecil {
if (!string.IsNullOrEmpty (base.Name))
return base.Name;
- return base.Name = (owner.GenericParameterType == GenericParameterType.Type ? "!" : "!!") + Position;
+ return base.Name = (type == GenericParameterType.Method ? "!!" : "!") + position;
}
}
@@ -189,8 +198,34 @@ namespace Mono.Cecil {
if (owner == null)
throw new ArgumentNullException ();
+ this.position = -1;
this.owner = owner;
- this.etype = owner.GenericParameterType == GenericParameterType.Type ? ElementType.Var : ElementType.MVar;
+ this.type = owner.GenericParameterType;
+ this.etype = ConvertGenericParameterType (this.type);
+ }
+
+ public GenericParameter (int position, GenericParameterType type, ModuleDefinition module)
+ : base (string.Empty, string.Empty)
+ {
+ if (module == null)
+ throw new ArgumentNullException ();
+
+ this.position = position;
+ this.type = type;
+ this.etype = ConvertGenericParameterType (type);
+ this.module = module;
+ }
+
+ static ElementType ConvertGenericParameterType (GenericParameterType type)
+ {
+ switch (type) {
+ case GenericParameterType.Type:
+ return ElementType.Var;
+ case GenericParameterType.Method:
+ return ElementType.MVar;
+ }
+
+ throw new ArgumentOutOfRangeException ();
}
public override TypeDefinition Resolve ()
@@ -198,4 +233,55 @@ namespace Mono.Cecil {
return null;
}
}
+
+ sealed class GenericParameterCollection : Collection<GenericParameter> {
+
+ readonly IGenericParameterProvider owner;
+
+ internal GenericParameterCollection (IGenericParameterProvider owner)
+ {
+ this.owner = owner;
+ }
+
+ internal GenericParameterCollection (IGenericParameterProvider owner, int capacity)
+ : base (capacity)
+ {
+ this.owner = owner;
+ }
+
+ protected override void OnAdd (GenericParameter item, int index)
+ {
+ UpdateGenericParameter (item, index);
+ }
+
+ protected override void OnInsert (GenericParameter item, int index)
+ {
+ UpdateGenericParameter (item, index);
+
+ for (int i = index; i < size; i++)
+ items[i].position = i + 1;
+ }
+
+ protected override void OnSet (GenericParameter item, int index)
+ {
+ UpdateGenericParameter (item, index);
+ }
+
+ void UpdateGenericParameter (GenericParameter item, int index)
+ {
+ item.owner = owner;
+ item.position = index;
+ item.type = owner.GenericParameterType;
+ }
+
+ protected override void OnRemove (GenericParameter item, int index)
+ {
+ item.owner = null;
+ item.position = -1;
+ item.type = GenericParameterType.Type;
+
+ for (int i = index + 1; i < size; i++)
+ items[i].position = i - 1;
+ }
+ }
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameterAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameterAttributes.cs
index 8999614..6d77956 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameterAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/GenericParameterAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IConstantProvider.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IConstantProvider.cs
index e3338cf..8bcd7d7 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IConstantProvider.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IConstantProvider.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ICustomAttributeProvider.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ICustomAttributeProvider.cs
index 08e5f92..916ba0f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ICustomAttributeProvider.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ICustomAttributeProvider.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -45,9 +45,7 @@ namespace Mono.Cecil {
this ICustomAttributeProvider self,
ModuleDefinition module)
{
- return module.HasImage ()
- ? module.Read (self, (provider, reader) => reader.HasCustomAttributes (provider))
- : false;
+ return module.HasImage () && module.Read (self, (provider, reader) => reader.HasCustomAttributes (provider));
}
public static Collection<CustomAttribute> GetCustomAttributes (
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericInstance.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericInstance.cs
index 2750ad0..edc406c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericInstance.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericInstance.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericParameterProvider.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericParameterProvider.cs
index 27d1669..d41b7f6 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericParameterProvider.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IGenericParameterProvider.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -58,9 +58,7 @@ namespace Mono.Cecil {
this IGenericParameterProvider self,
ModuleDefinition module)
{
- return module.HasImage ()
- ? module.Read (self, (provider, reader) => reader.HasGenericParameters (provider))
- : false;
+ return module.HasImage () && module.Read (self, (provider, reader) => reader.HasGenericParameters (provider));
}
public static Collection<GenericParameter> GetGenericParameters (
@@ -69,7 +67,7 @@ namespace Mono.Cecil {
{
return module.HasImage ()
? module.Read (self, (provider, reader) => reader.ReadGenericParameters (provider))
- : new Collection<GenericParameter> ();
+ : new GenericParameterCollection (self);
}
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMarshalInfoProvider.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMarshalInfoProvider.cs
index a3bba6d..67a53a3 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMarshalInfoProvider.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMarshalInfoProvider.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -40,9 +40,7 @@ namespace Mono.Cecil {
this IMarshalInfoProvider self,
ModuleDefinition module)
{
- return module.HasImage ()
- ? module.Read (self, (provider, reader) => reader.HasMarshalInfo (provider))
- : false;
+ return module.HasImage () && module.Read (self, (provider, reader) => reader.HasMarshalInfo (provider));
}
public static MarshalInfo GetMarshalInfo (
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMemberDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMemberDefinition.cs
index 09878f7..ee73d9d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMemberDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMemberDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataScope.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataScope.cs
index f0ab506..04a0228 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataScope.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataScope.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataTokenProvider.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataTokenProvider.cs
index ff77724..6621835 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataTokenProvider.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMetadataTokenProvider.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMethodSignature.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMethodSignature.cs
index 6bae56a..e3d288b 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMethodSignature.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/IMethodSignature.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -46,6 +46,11 @@ namespace Mono.Cecil {
static partial class Mixin {
+ public static bool HasImplicitThis (this IMethodSignature self)
+ {
+ return self.HasThis && !self.ExplicitThis;
+ }
+
public static void MethodSignatureFullName (this IMethodSignature self, StringBuilder builder)
{
builder.Append ("(");
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Import.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Import.cs
index 93e700e..a32eb3c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Import.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Import.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
+using Mono.Collections.Generic;
using SR = System.Reflection;
using Mono.Cecil.Metadata;
@@ -39,6 +40,76 @@ namespace Mono.Cecil {
Open,
}
+ struct ImportGenericContext {
+
+ Collection<IGenericParameterProvider> stack;
+
+ public bool IsEmpty { get { return stack == null; } }
+
+ public ImportGenericContext (IGenericParameterProvider provider)
+ {
+ stack = null;
+
+ Push (provider);
+ }
+
+ public void Push (IGenericParameterProvider provider)
+ {
+ if (stack == null)
+ stack = new Collection<IGenericParameterProvider> (1) { provider };
+ else
+ stack.Add (provider);
+ }
+
+ public void Pop ()
+ {
+ stack.RemoveAt (stack.Count - 1);
+ }
+
+ public TypeReference MethodParameter (string method, int position)
+ {
+ for (int i = stack.Count - 1; i >= 0; i--) {
+ var candidate = stack [i] as MethodReference;
+ if (candidate == null)
+ continue;
+
+ if (method != candidate.Name)
+ continue;
+
+ return candidate.GenericParameters [position];
+ }
+
+ throw new InvalidOperationException ();
+ }
+
+ public TypeReference TypeParameter (string type, int position)
+ {
+ for (int i = stack.Count - 1; i >= 0; i--) {
+ var candidate = GenericTypeFor (stack [i]);
+
+ if (candidate.FullName != type)
+ continue;
+
+ return candidate.GenericParameters [position];
+ }
+
+ throw new InvalidOperationException ();
+ }
+
+ static TypeReference GenericTypeFor (IGenericParameterProvider context)
+ {
+ var type = context as TypeReference;
+ if (type != null)
+ return type.GetElementType ();
+
+ var method = context as MethodReference;
+ if (method != null)
+ return method.DeclaringType.GetElementType ();
+
+ throw new InvalidOperationException ();
+ }
+ }
+
class MetadataImporter {
readonly ModuleDefinition module;
@@ -70,12 +141,12 @@ namespace Mono.Cecil {
{ typeof (object), ElementType.Object },
};
- public TypeReference ImportType (Type type, IGenericContext context)
+ public TypeReference ImportType (Type type, ImportGenericContext context)
{
return ImportType (type, context, ImportGenericKind.Open);
}
- public TypeReference ImportType (Type type, IGenericContext context, ImportGenericKind import_kind)
+ public TypeReference ImportType (Type type, ImportGenericContext context, ImportGenericKind import_kind)
{
if (IsTypeSpecification (type) || ImportOpenGenericType (type, import_kind))
return ImportTypeSpecification (type, context);
@@ -92,7 +163,7 @@ namespace Mono.Cecil {
if (IsNestedType (type))
reference.DeclaringType = ImportType (type.DeclaringType, context, import_kind);
else
- reference.Namespace = type.Namespace;
+ reference.Namespace = type.Namespace ?? string.Empty;
if (type.IsGenericType)
ImportGenericParameters (reference, type.GetGenericArguments ());
@@ -119,7 +190,7 @@ namespace Mono.Cecil {
#endif
}
- TypeReference ImportTypeSpecification (Type type, IGenericContext context)
+ TypeReference ImportTypeSpecification (Type type, ImportGenericContext context)
{
if (type.IsByRef)
return new ByReferenceType (ImportType (type.GetElementType (), context));
@@ -139,32 +210,44 @@ namespace Mono.Cecil {
throw new NotSupportedException (type.FullName);
}
- static TypeReference ImportGenericParameter (Type type, IGenericContext context)
+ static TypeReference ImportGenericParameter (Type type, ImportGenericContext context)
{
- if (context == null)
+ if (context.IsEmpty)
throw new InvalidOperationException ();
- var owner = type.DeclaringMethod != null
- ? context.Method
- : context.Type;
+ if (type.DeclaringMethod != null)
+ return context.MethodParameter (type.DeclaringMethod.Name, type.GenericParameterPosition);
- if (owner == null)
- throw new InvalidOperationException ();
+ if (type.DeclaringType != null)
+ return context.TypeParameter (NormalizedFullName (type.DeclaringType), type.GenericParameterPosition);
+
+ throw new InvalidOperationException();
+ }
+
+ private static string NormalizedFullName (Type type)
+ {
+ if (IsNestedType (type))
+ return NormalizedFullName (type.DeclaringType) + "/" + type.Name;
- return owner.GenericParameters [type.GenericParameterPosition];
+ return type.FullName;
}
- TypeReference ImportGenericInstance (Type type, IGenericContext context)
+ TypeReference ImportGenericInstance (Type type, ImportGenericContext context)
{
var element_type = ImportType (type.GetGenericTypeDefinition (), context, ImportGenericKind.Definition);
var instance = new GenericInstanceType (element_type);
var arguments = type.GetGenericArguments ();
var instance_arguments = instance.GenericArguments;
- for (int i = 0; i < arguments.Length; i++)
- instance_arguments.Add (ImportType (arguments [i], context ?? element_type));
+ context.Push (element_type);
+ try {
+ for (int i = 0; i < arguments.Length; i++)
+ instance_arguments.Add (ImportType (arguments [i], context));
- return instance;
+ return instance;
+ } finally {
+ context.Pop ();
+ }
}
static bool IsTypeSpecification (Type type)
@@ -237,18 +320,23 @@ namespace Mono.Cecil {
}
#endif
- public FieldReference ImportField (SR.FieldInfo field, IGenericContext context)
+ public FieldReference ImportField (SR.FieldInfo field, ImportGenericContext context)
{
var declaring_type = ImportType (field.DeclaringType, context);
if (IsGenericInstance (field.DeclaringType))
field = ResolveFieldDefinition (field);
- return new FieldReference {
- Name = field.Name,
- DeclaringType = declaring_type,
- FieldType = ImportType (field.FieldType, context ?? declaring_type),
- };
+ context.Push (declaring_type);
+ try {
+ return new FieldReference {
+ Name = field.Name,
+ DeclaringType = declaring_type,
+ FieldType = ImportType (field.FieldType, context),
+ };
+ } finally {
+ context.Pop ();
+ }
}
static SR.FieldInfo ResolveFieldDefinition (SR.FieldInfo field)
@@ -263,7 +351,7 @@ namespace Mono.Cecil {
#endif
}
- public MethodReference ImportMethod (SR.MethodBase method, IGenericContext context, ImportGenericKind import_kind)
+ public MethodReference ImportMethod (SR.MethodBase method, ImportGenericContext context, ImportGenericKind import_kind)
{
if (IsMethodSpecification (method) || ImportOpenGenericMethod (method, import_kind))
return ImportMethodSpecification (method, context);
@@ -286,21 +374,26 @@ namespace Mono.Cecil {
if (method.IsGenericMethod)
ImportGenericParameters (reference, method.GetGenericArguments ());
- var method_info = method as SR.MethodInfo;
- reference.ReturnType = method_info != null
- ? ImportType (method_info.ReturnType, context ?? reference)
- : ImportType (typeof (void), null);
+ context.Push (reference);
+ try {
+ var method_info = method as SR.MethodInfo;
+ reference.ReturnType = method_info != null
+ ? ImportType (method_info.ReturnType, context)
+ : ImportType (typeof (void), default (ImportGenericContext));
- var parameters = method.GetParameters ();
- var reference_parameters = reference.Parameters;
+ var parameters = method.GetParameters ();
+ var reference_parameters = reference.Parameters;
- for (int i = 0; i < parameters.Length; i++)
- reference_parameters.Add (
- new ParameterDefinition (ImportType (parameters [i].ParameterType, context ?? reference)));
+ for (int i = 0; i < parameters.Length; i++)
+ reference_parameters.Add (
+ new ParameterDefinition (ImportType (parameters [i].ParameterType, context)));
- reference.DeclaringType = declaring_type;
+ reference.DeclaringType = declaring_type;
- return reference;
+ return reference;
+ } finally {
+ context.Pop ();
+ }
}
static void ImportGenericParameters (IGenericParameterProvider provider, Type [] arguments)
@@ -316,7 +409,7 @@ namespace Mono.Cecil {
return method.IsGenericMethod && !method.IsGenericMethodDefinition;
}
- MethodReference ImportMethodSpecification (SR.MethodBase method, IGenericContext context)
+ MethodReference ImportMethodSpecification (SR.MethodBase method, ImportGenericContext context)
{
var method_info = method as SR.MethodInfo;
if (method_info == null)
@@ -327,10 +420,15 @@ namespace Mono.Cecil {
var arguments = method.GetGenericArguments ();
var instance_arguments = instance.GenericArguments;
- for (int i = 0; i < arguments.Length; i++)
- instance_arguments.Add (ImportType (arguments [i], context ?? element_method));
+ context.Push (element_method);
+ try {
+ for (int i = 0; i < arguments.Length; i++)
+ instance_arguments.Add (ImportType (arguments [i], context));
- return instance;
+ return instance;
+ } finally {
+ context.Pop ();
+ }
}
static bool HasCallingConvention (SR.MethodBase method, SR.CallingConventions conventions)
@@ -339,7 +437,7 @@ namespace Mono.Cecil {
}
#endif
- public TypeReference ImportType (TypeReference type, IGenericContext context)
+ public TypeReference ImportType (TypeReference type, ImportGenericContext context)
{
if (type.IsTypeSpecification ())
return ImportTypeSpecification (type, context);
@@ -351,7 +449,7 @@ namespace Mono.Cecil {
ImportScope (type.Scope),
type.IsValueType);
- MetadataSystem.TryProcessPrimitiveType (reference);
+ MetadataSystem.TryProcessPrimitiveTypeReference (reference);
if (type.IsNested)
reference.DeclaringType = ImportType (type.DeclaringType, context);
@@ -427,7 +525,7 @@ namespace Mono.Cecil {
imported_parameters.Add (new GenericParameter (parameters [i].Name, imported));
}
- TypeReference ImportTypeSpecification (TypeReference type, IGenericContext context)
+ TypeReference ImportTypeSpecification (TypeReference type, ImportGenericContext context)
{
switch (type.etype) {
case ElementType.SzArray:
@@ -486,32 +584,33 @@ namespace Mono.Cecil {
return imported_instance;
case ElementType.Var:
- if (context == null || context.Type == null)
- throw new InvalidOperationException ();
-
- return ((TypeReference) context.Type).GetElementType ().GenericParameters [((GenericParameter) type).Position];
+ var var_parameter = (GenericParameter) type;
+ return context.TypeParameter (type.DeclaringType.FullName, var_parameter.Position);
case ElementType.MVar:
- if (context == null || context.Method == null)
- throw new InvalidOperationException ();
-
- return context.Method.GenericParameters [((GenericParameter) type).Position];
+ var mvar_parameter = (GenericParameter) type;
+ return context.MethodParameter (mvar_parameter.DeclaringMethod.Name, mvar_parameter.Position);
}
throw new NotSupportedException (type.etype.ToString ());
}
- public FieldReference ImportField (FieldReference field, IGenericContext context)
+ public FieldReference ImportField (FieldReference field, ImportGenericContext context)
{
var declaring_type = ImportType (field.DeclaringType, context);
- return new FieldReference {
- Name = field.Name,
- DeclaringType = declaring_type,
- FieldType = ImportType (field.FieldType, context ?? declaring_type),
- };
+ context.Push (declaring_type);
+ try {
+ return new FieldReference {
+ Name = field.Name,
+ DeclaringType = declaring_type,
+ FieldType = ImportType (field.FieldType, context),
+ };
+ } finally {
+ context.Pop ();
+ }
}
- public MethodReference ImportMethod (MethodReference method, IGenericContext context)
+ public MethodReference ImportMethod (MethodReference method, ImportGenericContext context)
{
if (method.IsGenericInstance)
return ImportMethodSpecification (method, context);
@@ -523,29 +622,33 @@ namespace Mono.Cecil {
HasThis = method.HasThis,
ExplicitThis = method.ExplicitThis,
DeclaringType = declaring_type,
+ CallingConvention = method.CallingConvention,
};
- reference.CallingConvention = method.CallingConvention;
-
if (method.HasGenericParameters)
ImportGenericParameters (reference, method);
- reference.ReturnType = ImportType (method.ReturnType, context ?? reference);
+ context.Push (reference);
+ try {
+ reference.ReturnType = ImportType (method.ReturnType, context);
- if (!method.HasParameters)
- return reference;
+ if (!method.HasParameters)
+ return reference;
- var reference_parameters = reference.Parameters;
+ var reference_parameters = reference.Parameters;
- var parameters = method.Parameters;
- for (int i = 0; i < parameters.Count; i++)
- reference_parameters.Add (
- new ParameterDefinition (ImportType (parameters [i].ParameterType, context ?? reference)));
+ var parameters = method.Parameters;
+ for (int i = 0; i < parameters.Count; i++)
+ reference_parameters.Add (
+ new ParameterDefinition (ImportType (parameters [i].ParameterType, context)));
- return reference;
+ return reference;
+ } finally {
+ context.Pop();
+ }
}
- MethodSpecification ImportMethodSpecification (MethodReference method, IGenericContext context)
+ MethodSpecification ImportMethodSpecification (MethodReference method, ImportGenericContext context)
{
if (!method.IsGenericInstance)
throw new NotSupportedException ();
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/LinkedResource.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/LinkedResource.cs
index a5530fc..16c1d59 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/LinkedResource.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/LinkedResource.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ManifestResourceAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ManifestResourceAttributes.cs
index d72d1d0..7d6bb19 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ManifestResourceAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ManifestResourceAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MarshalInfo.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MarshalInfo.cs
index 1fce23a..9d58738 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MarshalInfo.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MarshalInfo.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberDefinitionCollection.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberDefinitionCollection.cs
index 1e70302..707f36f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberDefinitionCollection.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberDefinitionCollection.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberReference.cs
index b3edf39..b658c51 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MemberReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataResolver.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataResolver.cs
index 464fb94..e69fcd7 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataResolver.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataResolver.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,7 +27,6 @@
//
using System;
-using System.Collections.Generic;
using Mono.Collections.Generic;
@@ -41,16 +40,66 @@ namespace Mono.Cecil {
AssemblyDefinition Resolve (string fullName, ReaderParameters parameters);
}
- static class MetadataResolver {
+ public interface IMetadataResolver {
+ TypeDefinition Resolve (TypeReference type);
+ FieldDefinition Resolve (FieldReference field);
+ MethodDefinition Resolve (MethodReference method);
+ }
+
+#if !SILVERLIGHT && !CF
+ [Serializable]
+#endif
+ public class ResolutionException : Exception {
+
+ readonly MemberReference member;
+
+ public MemberReference Member {
+ get { return member; }
+ }
+
+ public ResolutionException (MemberReference member)
+ : base ("Failed to resolve " + member.FullName)
+ {
+ this.member = member;
+ }
+
+#if !SILVERLIGHT && !CF
+ protected ResolutionException (
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context)
+ : base (info, context)
+ {
+ }
+#endif
+ }
+
+ public class MetadataResolver : IMetadataResolver {
- public static TypeDefinition Resolve (IAssemblyResolver resolver, TypeReference type)
+ readonly IAssemblyResolver assembly_resolver;
+
+ public IAssemblyResolver AssemblyResolver {
+ get { return assembly_resolver; }
+ }
+
+ public MetadataResolver (IAssemblyResolver assemblyResolver)
+ {
+ if (assemblyResolver == null)
+ throw new ArgumentNullException ("assemblyResolver");
+
+ assembly_resolver = assemblyResolver;
+ }
+
+ public virtual TypeDefinition Resolve (TypeReference type)
{
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
type = type.GetElementType ();
var scope = type.Scope;
switch (scope.MetadataScopeType) {
case MetadataScopeType.AssemblyNameReference:
- var assembly = resolver.Resolve ((AssemblyNameReference) scope);
+ var assembly = assembly_resolver.Resolve ((AssemblyNameReference) scope);
if (assembly == null)
return null;
@@ -71,7 +120,32 @@ namespace Mono.Cecil {
throw new NotSupportedException ();
}
- static TypeDefinition GetType (ModuleDefinition module, TypeReference type)
+ static TypeDefinition GetType (ModuleDefinition module, TypeReference reference)
+ {
+ var type = GetTypeDefinition (module, reference);
+ if (type != null)
+ return type;
+
+ if (!module.HasExportedTypes)
+ return null;
+
+ var exported_types = module.ExportedTypes;
+
+ for (int i = 0; i < exported_types.Count; i++) {
+ var exported_type = exported_types [i];
+ if (exported_type.Name != reference.Name)
+ continue;
+
+ if (exported_type.Namespace != reference.Namespace)
+ continue;
+
+ return exported_type.Resolve ();
+ }
+
+ return null;
+ }
+
+ static TypeDefinition GetTypeDefinition (ModuleDefinition module, TypeReference type)
{
if (!type.IsNested)
return module.GetType (type.Namespace, type.Name);
@@ -83,19 +157,22 @@ namespace Mono.Cecil {
return declaring_type.GetNestedType (type.Name);
}
- public static FieldDefinition Resolve (IAssemblyResolver resolver, FieldReference field)
+ public virtual FieldDefinition Resolve (FieldReference field)
{
- var type = Resolve (resolver, field.DeclaringType);
+ if (field == null)
+ throw new ArgumentNullException ("field");
+
+ var type = Resolve (field.DeclaringType);
if (type == null)
return null;
if (!type.HasFields)
return null;
- return GetField (resolver, type, field);
+ return GetField (type, field);
}
- static FieldDefinition GetField (IAssemblyResolver resolver, TypeDefinition type, FieldReference reference)
+ FieldDefinition GetField (TypeDefinition type, FieldReference reference)
{
while (type != null) {
var field = GetField (type.Fields, reference);
@@ -105,13 +182,13 @@ namespace Mono.Cecil {
if (type.BaseType == null)
return null;
- type = Resolve (resolver, type.BaseType);
+ type = Resolve (type.BaseType);
}
return null;
}
- static FieldDefinition GetField (IList<FieldDefinition> fields, FieldReference reference)
+ static FieldDefinition GetField (Collection<FieldDefinition> fields, FieldReference reference)
{
for (int i = 0; i < fields.Count; i++) {
var field = fields [i];
@@ -128,9 +205,12 @@ namespace Mono.Cecil {
return null;
}
- public static MethodDefinition Resolve (IAssemblyResolver resolver, MethodReference method)
+ public virtual MethodDefinition Resolve (MethodReference method)
{
- var type = Resolve (resolver, method.DeclaringType);
+ if (method == null)
+ throw new ArgumentNullException ("method");
+
+ var type = Resolve (method.DeclaringType);
if (type == null)
return null;
@@ -139,10 +219,10 @@ namespace Mono.Cecil {
if (!type.HasMethods)
return null;
- return GetMethod (resolver, type, method);
+ return GetMethod (type, method);
}
- static MethodDefinition GetMethod (IAssemblyResolver resolver, TypeDefinition type, MethodReference reference)
+ MethodDefinition GetMethod (TypeDefinition type, MethodReference reference)
{
while (type != null) {
var method = GetMethod (type.Methods, reference);
@@ -152,13 +232,13 @@ namespace Mono.Cecil {
if (type.BaseType == null)
return null;
- type = Resolve (resolver, type.BaseType);
+ type = Resolve (type.BaseType);
}
return null;
}
- public static MethodDefinition GetMethod (IList<MethodDefinition> methods, MethodReference reference)
+ public static MethodDefinition GetMethod (Collection<MethodDefinition> methods, MethodReference reference)
{
for (int i = 0; i < methods.Count; i++) {
var method = methods [i];
@@ -166,6 +246,12 @@ namespace Mono.Cecil {
if (method.Name != reference.Name)
continue;
+ if (method.HasGenericParameters != reference.HasGenericParameters)
+ continue;
+
+ if (method.HasGenericParameters && method.GenericParameters.Count != reference.GenericParameters.Count)
+ continue;
+
if (!AreSame (method.ReturnType, reference.ReturnType))
continue;
@@ -235,12 +321,6 @@ namespace Mono.Cecil {
static bool AreSame (GenericInstanceType a, GenericInstanceType b)
{
- if (!a.HasGenericArguments)
- return !b.HasGenericArguments;
-
- if (!b.HasGenericArguments)
- return false;
-
if (a.GenericArguments.Count != b.GenericArguments.Count)
return false;
@@ -258,6 +338,12 @@ namespace Mono.Cecil {
static bool AreSame (TypeReference a, TypeReference b)
{
+ if (ReferenceEquals (a, b))
+ return true;
+
+ if (a == null || b == null)
+ return false;
+
if (a.etype != b.etype)
return false;
@@ -267,7 +353,12 @@ namespace Mono.Cecil {
if (a.IsTypeSpecification ())
return AreSame ((TypeSpecification) a, (TypeSpecification) b);
- return a.FullName == b.FullName;
+ if (a.Name != b.Name || a.Namespace != b.Namespace)
+ return false;
+
+ //TODO: check scope
+
+ return AreSame (a.DeclaringType, b.DeclaringType);
}
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataSystem.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataSystem.cs
index e2196af..3ae2015 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataSystem.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MetadataSystem.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -46,6 +46,9 @@ namespace Mono.Cecil {
sealed class MetadataSystem {
+ internal AssemblyNameReference [] AssemblyReferences;
+ internal ModuleReference [] ModuleReferences;
+
internal TypeDefinition [] Types;
internal TypeReference [] TypeReferences;
@@ -62,20 +65,20 @@ namespace Mono.Cecil {
internal Dictionary<MetadataToken, uint> FieldMarshals;
internal Dictionary<MetadataToken, Row<ElementType, uint>> Constants;
internal Dictionary<uint, MetadataToken []> Overrides;
- internal Dictionary<MetadataToken, Range> CustomAttributes;
- internal Dictionary<MetadataToken, Range> SecurityDeclarations;
+ internal Dictionary<MetadataToken, Range []> CustomAttributes;
+ internal Dictionary<MetadataToken, Range []> SecurityDeclarations;
internal Dictionary<uint, Range> Events;
internal Dictionary<uint, Range> Properties;
internal Dictionary<uint, Row<MethodSemanticsAttributes, MetadataToken>> Semantics;
internal Dictionary<uint, Row<PInvokeAttributes, uint, uint>> PInvokes;
- internal Dictionary<MetadataToken, Range> GenericParameters;
+ internal Dictionary<MetadataToken, Range []> GenericParameters;
internal Dictionary<uint, MetadataToken []> GenericConstraints;
static Dictionary<string, Row<ElementType, bool>> primitive_value_types;
static void InitializePrimitives ()
{
- primitive_value_types = new Dictionary<string, Row<ElementType, bool>> (18) {
+ primitive_value_types = new Dictionary<string, Row<ElementType, bool>> (18, StringComparer.Ordinal) {
{ "Void", new Row<ElementType, bool> (ElementType.Void, false) },
{ "Boolean", new Row<ElementType, bool> (ElementType.Boolean, true) },
{ "Char", new Row<ElementType, bool> (ElementType.Char, true) },
@@ -97,30 +100,45 @@ namespace Mono.Cecil {
};
}
- public static void TryProcessPrimitiveType (TypeReference type)
+ public static void TryProcessPrimitiveTypeReference (TypeReference type)
{
- var scope = type.scope;
- if (scope == null)
+ if (type.Namespace != "System")
return;
- if (scope.MetadataScopeType != MetadataScopeType.AssemblyNameReference)
+ var scope = type.scope;
+ if (scope == null || scope.MetadataScopeType != MetadataScopeType.AssemblyNameReference)
return;
- if (scope.Name != "mscorlib")
+ Row<ElementType, bool> primitive_data;
+ if (!TryGetPrimitiveData (type, out primitive_data))
return;
+ type.etype = primitive_data.Col1;
+ type.IsValueType = primitive_data.Col2;
+ }
+
+ public static bool TryGetPrimitiveElementType (TypeDefinition type, out ElementType etype)
+ {
+ etype = ElementType.None;
+
if (type.Namespace != "System")
- return;
+ return false;
+ Row<ElementType, bool> primitive_data;
+ if (TryGetPrimitiveData (type, out primitive_data) && primitive_data.Col1.IsPrimitive ()) {
+ etype = primitive_data.Col1;
+ return true;
+ }
+
+ return false;
+ }
+
+ static bool TryGetPrimitiveData (TypeReference type, out Row<ElementType, bool> primitive_data)
+ {
if (primitive_value_types == null)
InitializePrimitives ();
- Row<ElementType, bool> primitive_data;
- if (!primitive_value_types.TryGetValue (type.Name, out primitive_data))
- return;
-
- type.etype = primitive_data.Col1;
- type.IsValueType = primitive_data.Col2;
+ return primitive_value_types.TryGetValue (type.Name, out primitive_data);
}
public void Clear ()
@@ -284,9 +302,9 @@ namespace Mono.Cecil {
Events.Remove (type.token.RID);
}
- public bool TryGetGenericParameterRange (IGenericParameterProvider owner, out Range range)
+ public bool TryGetGenericParameterRanges (IGenericParameterProvider owner, out Range [] ranges)
{
- return GenericParameters.TryGetValue (owner.MetadataToken, out range);
+ return GenericParameters.TryGetValue (owner.MetadataToken, out ranges);
}
public void RemoveGenericParameterRange (IGenericParameterProvider owner)
@@ -294,9 +312,9 @@ namespace Mono.Cecil {
GenericParameters.Remove (owner.MetadataToken);
}
- public bool TryGetCustomAttributeRange (ICustomAttributeProvider owner, out Range range)
+ public bool TryGetCustomAttributeRanges (ICustomAttributeProvider owner, out Range [] ranges)
{
- return CustomAttributes.TryGetValue (owner.MetadataToken, out range);
+ return CustomAttributes.TryGetValue (owner.MetadataToken, out ranges);
}
public void RemoveCustomAttributeRange (ICustomAttributeProvider owner)
@@ -304,9 +322,9 @@ namespace Mono.Cecil {
CustomAttributes.Remove (owner.MetadataToken);
}
- public bool TryGetSecurityDeclarationRange (ISecurityDeclarationProvider owner, out Range range)
+ public bool TryGetSecurityDeclarationRanges (ISecurityDeclarationProvider owner, out Range [] ranges)
{
- return SecurityDeclarations.TryGetValue (owner.MetadataToken, out range);
+ return SecurityDeclarations.TryGetValue (owner.MetadataToken, out ranges);
}
public void RemoveSecurityDeclarationRange (ISecurityDeclarationProvider owner)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodAttributes.cs
index 3446702..626a97b 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodCallingConvention.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodCallingConvention.cs
index c96dc1c..bd7188d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodCallingConvention.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodCallingConvention.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodDefinition.cs
index 3b74e5a..cbda745 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodImplAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodImplAttributes.cs
index 8a2b422..b24fcf7 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodImplAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodImplAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -49,6 +49,5 @@ namespace Mono.Cecil {
Synchronized = 0x0020, // Method is single threaded through the body
NoOptimization = 0x0040, // Method is not optimized by the JIT.
NoInlining = 0x0008, // Method may not be inlined
- MaxMethodImplVal = 0xffff // Range check value
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReference.cs
index 1ea47a0..0adab45 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -99,7 +99,7 @@ namespace Mono.Cecil {
if (generic_parameters != null)
return generic_parameters;
- return generic_parameters = new Collection<GenericParameter> ();
+ return generic_parameters = new GenericParameterCollection (this);
}
}
@@ -123,9 +123,9 @@ namespace Mono.Cecil {
public override string FullName {
get {
var builder = new StringBuilder ();
- builder.Append (ReturnType.FullName);
- builder.Append (" ");
- builder.Append (MemberFullName ());
+ builder.Append (ReturnType.FullName)
+ .Append (" ")
+ .Append (MemberFullName ());
this.MethodSignatureFullName (builder);
return builder.ToString ();
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReturnType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReturnType.cs
index 045b9a8..b5b3ee8 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReturnType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodReturnType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -46,8 +46,7 @@ namespace Mono.Cecil {
}
internal ParameterDefinition Parameter {
- get { return parameter ?? (parameter = new ParameterDefinition (return_type)); }
- set { parameter = value; }
+ get { return parameter ?? (parameter = new ParameterDefinition (return_type, method)); }
}
public MetadataToken MetadataToken {
@@ -55,6 +54,11 @@ namespace Mono.Cecil {
set { Parameter.MetadataToken = value; }
}
+ public ParameterAttributes Attributes {
+ get { return Parameter.Attributes; }
+ set { Parameter.Attributes = value; }
+ }
+
public bool HasCustomAttributes {
get { return parameter != null && parameter.HasCustomAttributes; }
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSemanticsAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSemanticsAttributes.cs
index f44a3fa..dd0f474 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSemanticsAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSemanticsAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSpecification.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSpecification.cs
index e907d6c..73b5c14 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSpecification.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/MethodSpecification.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Modifiers.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Modifiers.cs
index f7ff611..ad31bc0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Modifiers.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Modifiers.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs
index 7c793f5..7f75cbd 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -47,6 +47,7 @@ namespace Mono.Cecil {
ReadingMode reading_mode;
IAssemblyResolver assembly_resolver;
+ IMetadataResolver metadata_resolver;
Stream symbol_stream;
ISymbolReaderProvider symbol_reader_provider;
bool read_symbols;
@@ -61,6 +62,11 @@ namespace Mono.Cecil {
set { assembly_resolver = value; }
}
+ public IMetadataResolver MetadataResolver {
+ get { return metadata_resolver; }
+ set { metadata_resolver = value; }
+ }
+
public Stream SymbolStream {
get { return symbol_stream; }
set { symbol_stream = value; }
@@ -95,6 +101,7 @@ namespace Mono.Cecil {
TargetRuntime runtime;
TargetArchitecture architecture;
IAssemblyResolver assembly_resolver;
+ IMetadataResolver metadata_resolver;
public ModuleKind Kind {
get { return kind; }
@@ -116,6 +123,11 @@ namespace Mono.Cecil {
set { assembly_resolver = value; }
}
+ public IMetadataResolver MetadataResolver {
+ get { return metadata_resolver; }
+ set { metadata_resolver = value; }
+ }
+
public ModuleParameters ()
{
this.kind = ModuleKind.Dll;
@@ -183,9 +195,10 @@ namespace Mono.Cecil {
internal MetadataSystem MetadataSystem;
internal ReadingMode ReadingMode;
internal ISymbolReaderProvider SymbolReaderProvider;
- internal ISymbolReader SymbolReader;
+ internal ISymbolReader symbol_reader;
internal IAssemblyResolver assembly_resolver;
+ internal IMetadataResolver metadata_resolver;
internal TypeSystem type_system;
readonly MetadataReader reader;
@@ -195,6 +208,7 @@ namespace Mono.Cecil {
TargetRuntime runtime;
TargetArchitecture architecture;
ModuleAttributes attributes;
+ ModuleCharacteristics characteristics;
Guid mvid;
internal AssemblyDefinition assembly;
@@ -234,6 +248,11 @@ namespace Mono.Cecil {
set { attributes = value; }
}
+ public ModuleCharacteristics Characteristics {
+ get { return characteristics; }
+ set { characteristics = value; }
+ }
+
public string FullyQualifiedName {
get { return fq_name; }
}
@@ -248,7 +267,11 @@ namespace Mono.Cecil {
}
public bool HasSymbols {
- get { return SymbolReader != null; }
+ get { return symbol_reader != null; }
+ }
+
+ public ISymbolReader SymbolReader {
+ get { return symbol_reader; }
}
public override MetadataScopeType MetadataScopeType {
@@ -266,7 +289,11 @@ namespace Mono.Cecil {
#endif
public IAssemblyResolver AssemblyResolver {
- get { return assembly_resolver; }
+ get { return assembly_resolver ?? (assembly_resolver = new DefaultAssemblyResolver ()); }
+ }
+
+ public IMetadataResolver MetadataResolver {
+ get { return metadata_resolver ?? (metadata_resolver = new MetadataResolver (this.AssemblyResolver)); }
}
public TypeSystem TypeSystem {
@@ -411,7 +438,6 @@ namespace Mono.Cecil {
{
this.MetadataSystem = new MetadataSystem ();
this.token = new MetadataToken (TokenType.Module, 1);
- this.assembly_resolver = GlobalAssemblyResolver.Instance;
}
internal ModuleDefinition (Image image)
@@ -422,6 +448,7 @@ namespace Mono.Cecil {
this.runtime = image.Runtime;
this.architecture = image.Architecture;
this.attributes = image.Attributes;
+ this.characteristics = image.Characteristics;
this.fq_name = image.FileName;
this.reader = new MetadataReader (this);
@@ -439,7 +466,7 @@ namespace Mono.Cecil {
if (!HasImage)
return false;
- return Read (this, (_, reader) => reader.GetTypeReference (scope, fullName) != null);
+ return GetTypeReference (scope, fullName) != null;
}
public bool TryGetTypeReference (string fullName, out TypeReference type)
@@ -456,7 +483,12 @@ namespace Mono.Cecil {
return false;
}
- return (type = Read (this, (_, reader) => reader.GetTypeReference (scope, fullName))) != null;
+ return (type = GetTypeReference (scope, fullName)) != null;
+ }
+
+ TypeReference GetTypeReference (string scope, string fullname)
+ {
+ return Read (new Row<string, string> (scope, fullname), (row, reader) => reader.GetTypeReference (row.Col1, row.Col2));
}
public IEnumerable<TypeReference> GetTypeReferences ()
@@ -475,6 +507,13 @@ namespace Mono.Cecil {
return Read (this, (_, reader) => reader.GetMemberReferences ());
}
+ public TypeReference GetType (string fullName, bool runtimeName)
+ {
+ return runtimeName
+ ? TypeParser.ParseType (this, fullName)
+ : GetType (fullName);
+ }
+
public TypeDefinition GetType (string fullName)
{
CheckFullName (fullName);
@@ -493,6 +532,26 @@ namespace Mono.Cecil {
return ((TypeDefinitionCollection) this.Types).GetType (@namespace ?? string.Empty, name);
}
+ public IEnumerable<TypeDefinition> GetTypes ()
+ {
+ return GetTypes (Types);
+ }
+
+ static IEnumerable<TypeDefinition> GetTypes (Collection<TypeDefinition> types)
+ {
+ for (int i = 0; i < types.Count; i++) {
+ var type = types [i];
+
+ yield return type;
+
+ if (!type.HasNestedTypes)
+ continue;
+
+ foreach (var nested in GetTypes (type.NestedTypes))
+ yield return nested;
+ }
+ }
+
static void CheckFullName (string fullName)
{
if (fullName == null)
@@ -522,17 +581,17 @@ namespace Mono.Cecil {
internal FieldDefinition Resolve (FieldReference field)
{
- return MetadataResolver.Resolve (AssemblyResolver, field);
+ return MetadataResolver.Resolve (field);
}
internal MethodDefinition Resolve (MethodReference method)
{
- return MetadataResolver.Resolve (AssemblyResolver, method);
+ return MetadataResolver.Resolve (method);
}
internal TypeDefinition Resolve (TypeReference type)
{
- return MetadataResolver.Resolve (AssemblyResolver, type);
+ return MetadataResolver.Resolve (type);
}
#if !READ_ONLY
@@ -564,89 +623,57 @@ namespace Mono.Cecil {
throw new ArgumentException ();
}
-#if !CF
- public TypeReference Import (Type type)
+ static ImportGenericContext GenericContextFor (IGenericParameterProvider context)
{
- CheckType (type);
-
- return MetadataImporter.ImportType (type, null, ImportGenericKind.Definition);
+ return context != null ? new ImportGenericContext (context) : default (ImportGenericContext);
}
- public TypeReference Import (Type type, TypeReference context)
- {
- return Import (type, (IGenericParameterProvider) context);
- }
+#if !CF
- public TypeReference Import (Type type, MethodReference context)
+ public TypeReference Import (Type type)
{
- return Import (type, (IGenericParameterProvider) context);
+ return Import (type, null);
}
- TypeReference Import (Type type, IGenericParameterProvider context)
+ public TypeReference Import (Type type, IGenericParameterProvider context)
{
CheckType (type);
CheckContext (context, this);
return MetadataImporter.ImportType (
type,
- (IGenericContext) context,
- context != null
- ? ImportGenericKind.Open
- : ImportGenericKind.Definition);
+ GenericContextFor (context),
+ context != null ? ImportGenericKind.Open : ImportGenericKind.Definition);
}
public FieldReference Import (SR.FieldInfo field)
{
- CheckField (field);
-
- return MetadataImporter.ImportField (field, null);
- }
-
- public FieldReference Import (SR.FieldInfo field, TypeReference context)
- {
- return Import (field, (IGenericParameterProvider) context);
+ return Import (field, null);
}
- public FieldReference Import (SR.FieldInfo field, MethodReference context)
- {
- return Import (field, (IGenericParameterProvider) context);
- }
-
- FieldReference Import (SR.FieldInfo field, IGenericParameterProvider context)
+ public FieldReference Import (SR.FieldInfo field, IGenericParameterProvider context)
{
CheckField (field);
CheckContext (context, this);
- return MetadataImporter.ImportField (field, (IGenericContext) context);
+ return MetadataImporter.ImportField (field, GenericContextFor (context));
}
public MethodReference Import (SR.MethodBase method)
{
CheckMethod (method);
- return MetadataImporter.ImportMethod (method, null, ImportGenericKind.Definition);
- }
-
- public MethodReference Import (SR.MethodBase method, TypeReference context)
- {
- return Import (method, (IGenericParameterProvider) context);
- }
-
- public MethodReference Import (SR.MethodBase method, MethodReference context)
- {
- return Import (method, (IGenericParameterProvider) context);
+ return MetadataImporter.ImportMethod (method, default (ImportGenericContext), ImportGenericKind.Definition);
}
- MethodReference Import (SR.MethodBase method, IGenericParameterProvider context)
+ public MethodReference Import (SR.MethodBase method, IGenericParameterProvider context)
{
CheckMethod (method);
CheckContext (context, this);
return MetadataImporter.ImportMethod (method,
- (IGenericContext) context,
- context != null
- ? ImportGenericKind.Open
- : ImportGenericKind.Definition);
+ GenericContextFor (context),
+ context != null ? ImportGenericKind.Open : ImportGenericKind.Definition);
}
#endif
@@ -657,20 +684,10 @@ namespace Mono.Cecil {
if (type.Module == this)
return type;
- return MetadataImporter.ImportType (type, null);
- }
-
- public TypeReference Import (TypeReference type, TypeReference context)
- {
- return Import (type, (IGenericParameterProvider) context);
- }
-
- public TypeReference Import (TypeReference type, MethodReference context)
- {
- return Import (type, (IGenericParameterProvider) context);
+ return MetadataImporter.ImportType (type, default (ImportGenericContext));
}
- TypeReference Import (TypeReference type, IGenericParameterProvider context)
+ public TypeReference Import (TypeReference type, IGenericParameterProvider context)
{
CheckType (type);
@@ -679,7 +696,7 @@ namespace Mono.Cecil {
CheckContext (context, this);
- return MetadataImporter.ImportType (type, (IGenericContext) context);
+ return MetadataImporter.ImportType (type, GenericContextFor (context));
}
public FieldReference Import (FieldReference field)
@@ -689,20 +706,10 @@ namespace Mono.Cecil {
if (field.Module == this)
return field;
- return MetadataImporter.ImportField (field, null);
- }
-
- public FieldReference Import (FieldReference field, TypeReference context)
- {
- return Import (field, (IGenericParameterProvider) context);
+ return MetadataImporter.ImportField (field, default (ImportGenericContext));
}
- public FieldReference Import (FieldReference field, MethodReference context)
- {
- return Import (field, (IGenericParameterProvider) context);
- }
-
- FieldReference Import (FieldReference field, IGenericParameterProvider context)
+ public FieldReference Import (FieldReference field, IGenericParameterProvider context)
{
CheckField (field);
@@ -711,30 +718,15 @@ namespace Mono.Cecil {
CheckContext (context, this);
- return MetadataImporter.ImportField (field, (IGenericContext) context);
+ return MetadataImporter.ImportField (field, GenericContextFor (context));
}
public MethodReference Import (MethodReference method)
{
- CheckMethod (method);
-
- if (method.Module == this)
- return method;
-
- return MetadataImporter.ImportMethod (method, null);
- }
-
- public MethodReference Import (MethodReference method, TypeReference context)
- {
- return Import (method, (IGenericParameterProvider) context);
+ return Import (method, null);
}
- public MethodReference Import (MethodReference method, MethodReference context)
- {
- return Import (method, (IGenericParameterProvider) context);
- }
-
- MethodReference Import (MethodReference method, IGenericParameterProvider context)
+ public MethodReference Import (MethodReference method, IGenericParameterProvider context)
{
CheckMethod (method);
@@ -743,7 +735,7 @@ namespace Mono.Cecil {
CheckContext (context, this);
- return MetadataImporter.ImportMethod (method, (IGenericContext) context);
+ return MetadataImporter.ImportMethod (method, GenericContextFor (context));
}
#endif
@@ -755,7 +747,7 @@ namespace Mono.Cecil {
public IMetadataTokenProvider LookupToken (MetadataToken token)
{
- return Read (this, (_, reader) => reader.LookupToken (token));
+ return Read (token, (t, reader) => reader.LookupToken (t));
}
internal TRet Read<TItem, TRet> (TItem item, Func<TItem, MetadataReader, TRet> read)
@@ -771,15 +763,27 @@ namespace Mono.Cecil {
return ret;
}
+ public bool HasDebugHeader {
+ get { return Image != null && !Image.Debug.IsZero; }
+ }
+
+ public ImageDebugDirectory GetDebugHeader (out byte [] header)
+ {
+ if (!HasDebugHeader)
+ throw new InvalidOperationException ();
+
+ return Image.GetDebugHeader (out header);
+ }
+
void ProcessDebugHeader ()
{
- if (Image == null || Image.Debug.IsZero)
+ if (!HasDebugHeader)
return;
byte [] header;
- var directory = Image.GetDebugHeader (out header);
+ var directory = GetDebugHeader (out header);
- if (!SymbolReader.ProcessDebugHeader (directory, header))
+ if (!symbol_reader.ProcessDebugHeader (directory, header))
throw new InvalidOperationException ();
}
@@ -802,15 +806,19 @@ namespace Mono.Cecil {
architecture = parameters.Architecture,
mvid = Guid.NewGuid (),
Attributes = ModuleAttributes.ILOnly,
+ Characteristics = (ModuleCharacteristics) 0x8540,
};
if (parameters.AssemblyResolver != null)
module.assembly_resolver = parameters.AssemblyResolver;
+ if (parameters.MetadataResolver != null)
+ module.metadata_resolver = parameters.MetadataResolver;
+
if (parameters.Kind != ModuleKind.NetModule) {
var assembly = new AssemblyDefinition ();
module.assembly = assembly;
- module.assembly.Name = new AssemblyNameDefinition (name, new Version (0, 0));
+ module.assembly.Name = CreateAssemblyName (name);
assembly.main_module = module;
}
@@ -819,6 +827,14 @@ namespace Mono.Cecil {
return module;
}
+ static AssemblyNameDefinition CreateAssemblyName (string name)
+ {
+ if (name.EndsWith (".dll") || name.EndsWith (".exe"))
+ name = name.Substring (0, name.Length - 4);
+
+ return new AssemblyNameDefinition (name, new Version (0, 0, 0, 0));
+ }
+
#endif
public void ReadSymbols ()
@@ -827,10 +843,10 @@ namespace Mono.Cecil {
throw new InvalidOperationException ();
var provider = SymbolProvider.GetPlatformReaderProvider ();
+ if (provider == null)
+ throw new InvalidOperationException ();
- SymbolReader = provider.GetSymbolReader (this, fq_name);
-
- ProcessDebugHeader ();
+ ReadSymbols (provider.GetSymbolReader (this, fq_name));
}
public void ReadSymbols (ISymbolReader reader)
@@ -838,7 +854,7 @@ namespace Mono.Cecil {
if (reader == null)
throw new ArgumentNullException ("reader");
- SymbolReader = reader;
+ symbol_reader = reader;
ProcessDebugHeader ();
}
@@ -934,6 +950,14 @@ namespace Mono.Cecil {
return self != null && self.HasImage;
}
+ public static bool IsCorlib (this ModuleDefinition module)
+ {
+ if (module.Assembly == null)
+ return false;
+
+ return module.Assembly.Name.Name == "mscorlib";
+ }
+
public static string GetFullyQualifiedName (this Stream self)
{
#if !SILVERLIGHT
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleKind.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleKind.cs
index eb57890..c29da88 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleKind.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleKind.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -41,6 +41,7 @@ namespace Mono.Cecil {
I386,
AMD64,
IA64,
+ ARMv7,
}
[Flags]
@@ -48,5 +49,16 @@ namespace Mono.Cecil {
ILOnly = 1,
Required32Bit = 2,
StrongNameSigned = 8,
+ Preferred32Bit = 0x00020000,
+ }
+
+ [Flags]
+ public enum ModuleCharacteristics {
+ HighEntropyVA = 0x0020,
+ DynamicBase = 0x0040,
+ NoSEH = 0x0400,
+ NXCompat = 0x0100,
+ AppContainer = 0x1000,
+ TerminalServerAware = 0x8000,
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleReference.cs
index 0b6e49a..3934b3c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ModuleReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/NativeType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/NativeType.cs
index afa107f..88da980 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/NativeType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/NativeType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeAttributes.cs
index fc94692..bb36838 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -53,7 +53,7 @@ namespace Mono.Cecil {
BestFitMask = 0x0030,
BestFitEnabled = 0x0010,
- BestFidDisabled = 0x0020,
+ BestFitDisabled = 0x0020,
ThrowOnUnmappableCharMask = 0x3000,
ThrowOnUnmappableCharEnabled = 0x1000,
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeInfo.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeInfo.cs
index 53aae2c..cfd817c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeInfo.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PInvokeInfo.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -106,14 +106,14 @@ namespace Mono.Cecil {
set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.CallConvMask, (ushort) PInvokeAttributes.CallConvFastcall, value); }
}
- public bool IsBestFistEnabled {
+ public bool IsBestFitEnabled {
get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFitEnabled); }
set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFitEnabled, value); }
}
- public bool IsBestFistDisabled {
- get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFidDisabled); }
- set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFidDisabled, value); }
+ public bool IsBestFitDisabled {
+ get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFitDisabled); }
+ set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.BestFitDisabled, value); }
}
public bool IsThrowOnUnmappableCharEnabled {
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterAttributes.cs
index 8c12b54..e0bc825 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinition.cs
index 059f257..26152bd 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -49,6 +49,15 @@ namespace Mono.Cecil {
get { return method; }
}
+ public int Sequence {
+ get {
+ if (method == null)
+ return -1;
+
+ return method.HasImplicitThis () ? index + 1 : index;
+ }
+ }
+
public bool HasConstant {
get {
ResolveConstant ();
@@ -137,6 +146,12 @@ namespace Mono.Cecil {
#endregion
+ internal ParameterDefinition (TypeReference parameterType, IMethodSignature method)
+ : this (string.Empty, ParameterAttributes.None, parameterType)
+ {
+ this.method = method;
+ }
+
public ParameterDefinition (TypeReference parameterType)
: this (string.Empty, ParameterAttributes.None, parameterType)
{
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinitionCollection.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinitionCollection.cs
index 86538bb..bd8b1c1 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinitionCollection.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterDefinitionCollection.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterReference.cs
index cfe648f..46b057c 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ParameterReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PinnedType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PinnedType.cs
index d5e7a80..ff59cfb 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PinnedType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PinnedType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PointerType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PointerType.cs
index 54ab775..a142e14 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PointerType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PointerType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyAttributes.cs
index ad6fd9e..1be0413 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
index 835a929..42878a0 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -127,6 +127,8 @@ namespace Mono.Cecil {
public bool HasParameters {
get {
+ InitializeMethods ();
+
if (get_method != null)
return get_method.HasParameters;
@@ -254,5 +256,10 @@ namespace Mono.Cecil {
module.Read (this, (property, reader) => reader.ReadMethods (property));
}
+
+ public override PropertyDefinition Resolve ()
+ {
+ return this;
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyReference.cs
index 5022cd3..0dcfc95 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/PropertyReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -53,5 +53,7 @@ namespace Mono.Cecil {
property_type = propertyType;
}
+
+ public abstract PropertyDefinition Resolve ();
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ReferenceType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ReferenceType.cs
index 3a6b326..7940c61 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ReferenceType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/ReferenceType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Resource.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Resource.cs
index 0432ae7..eff7f41 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Resource.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/Resource.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs
index 4e57ada..837472a 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -93,6 +93,7 @@ namespace Mono.Cecil {
public sealed class SecurityDeclaration {
readonly internal uint signature;
+ byte [] blob;
readonly ModuleDefinition module;
internal bool resolved;
@@ -137,12 +138,22 @@ namespace Mono.Cecil {
this.resolved = true;
}
+ public SecurityDeclaration (SecurityAction action, byte [] blob)
+ {
+ this.action = action;
+ this.resolved = false;
+ this.blob = blob;
+ }
+
public byte [] GetBlob ()
{
+ if (blob != null)
+ return blob;
+
if (!HasImage || signature == 0)
throw new NotSupportedException ();
- return module.Read (this, (declaration, reader) => reader.ReadSecurityDeclarationBlob (declaration.signature)); ;
+ return blob = module.Read (this, (declaration, reader) => reader.ReadSecurityDeclarationBlob (declaration.signature));
}
void Resolve ()
@@ -165,9 +176,7 @@ namespace Mono.Cecil {
this ISecurityDeclarationProvider self,
ModuleDefinition module)
{
- return module.HasImage ()
- ? module.Read (self, (provider, reader) => reader.HasSecurityDeclarations (provider))
- : false;
+ return module.HasImage () && module.Read (self, (provider, reader) => reader.HasSecurityDeclarations (provider));
}
public static Collection<SecurityDeclaration> GetSecurityDeclarations (
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SentinelType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SentinelType.cs
index d0d5a1d..664d75b 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SentinelType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/SentinelType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TargetRuntime.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TargetRuntime.cs
index 9931fc6..9b49a5f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TargetRuntime.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TargetRuntime.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeAttributes.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
index 6e263e8..86fbc4d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -62,6 +62,7 @@ namespace Mono.Cecil {
// Implementation attributes
Import = 0x00001000, // Class/Interface is imported
Serializable = 0x00002000, // Class is serializable
+ WindowsRuntime = 0x00004000, // Windows Runtime type
// String formatting attributes
StringFormatMask = 0x00030000, // Use this mask to retrieve string information for native interop
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinition.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
index c83531a..58c52af 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,6 +28,7 @@
using System;
+using Mono.Cecil.Metadata;
using Mono.Collections.Generic;
namespace Mono.Cecil {
@@ -161,10 +162,6 @@ namespace Mono.Cecil {
}
}
- internal new bool HasImage {
- get { return Module != null && Module.HasImage; }
- }
-
public bool HasMethods {
get {
if (methods != null)
@@ -392,6 +389,11 @@ namespace Mono.Cecil {
set { attributes = attributes.SetAttributes ((uint) TypeAttributes.Serializable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) TypeAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) TypeAttributes.WindowsRuntime, value); }
+ }
+
public bool IsAnsiClass {
get { return attributes.GetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass); }
set { attributes = attributes.SetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass, value); }
@@ -437,6 +439,23 @@ namespace Mono.Cecil {
}
}
+ public override bool IsPrimitive {
+ get {
+ ElementType primitive_etype;
+ return MetadataSystem.TryGetPrimitiveElementType (this, out primitive_etype);
+ }
+ }
+
+ public override MetadataType MetadataType {
+ get {
+ ElementType primitive_etype;
+ if (MetadataSystem.TryGetPrimitiveElementType (this, out primitive_etype))
+ return (MetadataType) primitive_etype;
+
+ return base.MetadataType;
+ }
+ }
+
public override bool IsDefinition {
get { return true; }
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinitionCollection.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinitionCollection.cs
index 702fe27..eae7122 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinitionCollection.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeDefinitionCollection.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeParser.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeParser.cs
index df6acf3..90e04a6 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeParser.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeParser.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -173,13 +173,7 @@ namespace Mono.Cecil {
return;
}
-#if !CF
- Array.Resize (ref array, array.Length + 1);
-#else
- var copy = new T [array.Length + 1];
- Array.Copy (array, copy, array.Length);
- array = copy;
-#endif
+ array = array.Resize (array.Length + 1);
array [array.Length - 1] = item;
}
@@ -272,7 +266,7 @@ namespace Mono.Cecil {
public static TypeReference ParseType (ModuleDefinition module, string fullname)
{
- if (fullname == null)
+ if (string.IsNullOrEmpty (fullname))
return null;
var parser = new TypeParser (fullname);
@@ -356,6 +350,7 @@ namespace Mono.Cecil {
SplitFullName (type_info.type_fullname, out @namespace, out name);
var type = new TypeReference (@namespace, name, module, scope);
+ MetadataSystem.TryProcessPrimitiveTypeReference (type);
AdjustGenericParameters (type);
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeReference.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeReference.cs
index e45d823..f811b4f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeReference.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeReference.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -135,7 +135,7 @@ namespace Mono.Cecil {
if (generic_parameters != null)
return generic_parameters;
- return generic_parameters = new Collection<GenericParameter> ();
+ return generic_parameters = new GenericParameterCollection (this);
}
}
@@ -147,6 +147,15 @@ namespace Mono.Cecil {
return scope;
}
+ set {
+ var declaring_type = this.DeclaringType;
+ if (declaring_type != null) {
+ declaring_type.Scope = value;
+ return;
+ }
+
+ scope = value;
+ }
}
public bool IsNested {
@@ -216,28 +225,8 @@ namespace Mono.Cecil {
get { return false; }
}
- public bool IsPrimitive {
- get {
- switch (etype) {
- case ElementType.Boolean:
- case ElementType.Char:
- case ElementType.I:
- case ElementType.U:
- case ElementType.I1:
- case ElementType.U1:
- case ElementType.I2:
- case ElementType.U2:
- case ElementType.I4:
- case ElementType.U4:
- case ElementType.I8:
- case ElementType.U8:
- case ElementType.R4:
- case ElementType.R8:
- return true;
- default:
- return false;
- }
- }
+ public virtual bool IsPrimitive {
+ get { return etype.IsPrimitive (); }
}
public virtual MetadataType MetadataType {
@@ -288,6 +277,29 @@ namespace Mono.Cecil {
static partial class Mixin {
+ public static bool IsPrimitive (this ElementType self)
+ {
+ switch (self) {
+ case ElementType.Boolean:
+ case ElementType.Char:
+ case ElementType.I:
+ case ElementType.U:
+ case ElementType.I1:
+ case ElementType.U1:
+ case ElementType.I2:
+ case ElementType.U2:
+ case ElementType.I4:
+ case ElementType.U4:
+ case ElementType.I8:
+ case ElementType.U8:
+ case ElementType.R4:
+ case ElementType.R8:
+ return true;
+ default:
+ return false;
+ }
+ }
+
public static bool IsTypeOf (this TypeReference self, string @namespace, string name)
{
return self.Name == name
@@ -319,7 +331,7 @@ namespace Mono.Cecil {
{
var type = self.Resolve ();
if (type == null)
- throw new InvalidOperationException (string.Format ("Failed to resolve type: {0}", self.FullName));
+ throw new ResolutionException (self);
return type;
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSpecification.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSpecification.cs
index da4e726..75651be 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSpecification.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSpecification.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -42,16 +42,17 @@ namespace Mono.Cecil {
public override string Name {
get { return element_type.Name; }
- set { throw new NotSupportedException (); }
+ set { throw new InvalidOperationException (); }
}
public override string Namespace {
get { return element_type.Namespace; }
- set { throw new NotSupportedException (); }
+ set { throw new InvalidOperationException (); }
}
public override IMetadataScope Scope {
get { return element_type.Scope; }
+ set { throw new InvalidOperationException (); }
}
public override ModuleDefinition Module {
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSystem.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSystem.cs
index 0b0ba91..63f6aea 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSystem.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/TypeSystem.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -34,20 +34,29 @@ namespace Mono.Cecil {
public abstract class TypeSystem {
- sealed class CorlibTypeSystem : TypeSystem {
+ sealed class CoreTypeSystem : TypeSystem {
- public CorlibTypeSystem (ModuleDefinition module)
+ public CoreTypeSystem (ModuleDefinition module)
: base (module)
{
}
internal override TypeReference LookupType (string @namespace, string name)
{
+ var type = LookupTypeDefinition (@namespace, name) ?? LookupTypeForwarded (@namespace, name);
+ if (type != null)
+ return type;
+
+ throw new NotSupportedException ();
+ }
+
+ TypeReference LookupTypeDefinition (string @namespace, string name)
+ {
var metadata = module.MetadataSystem;
if (metadata.Types == null)
Initialize (module.Types);
- return module.Read (this, (_, reader) => {
+ return module.Read (new Row<string, string> (@namespace, name), (row, reader) => {
var types = reader.metadata.Types;
for (int i = 0; i < types.Length; i++) {
@@ -56,7 +65,7 @@ namespace Mono.Cecil {
var type = types [i];
- if (type.Name == name && type.Namespace == @namespace)
+ if (type.Name == row.Col2 && type.Namespace == row.Col1)
return type;
}
@@ -64,6 +73,22 @@ namespace Mono.Cecil {
});
}
+ TypeReference LookupTypeForwarded (string @namespace, string name)
+ {
+ if (!module.HasExportedTypes)
+ return null;
+
+ var exported_types = module.ExportedTypes;
+ for (int i = 0; i < exported_types.Count; i++) {
+ var exported_type = exported_types [i];
+
+ if (exported_type.Name == name && exported_type.Namespace == @namespace)
+ return exported_type.CreateReference ();
+ }
+
+ return null;
+ }
+
static void Initialize (object obj)
{
}
@@ -158,20 +183,12 @@ namespace Mono.Cecil {
internal static TypeSystem CreateTypeSystem (ModuleDefinition module)
{
- if (IsCorlib (module))
- return new CorlibTypeSystem (module);
+ if (module.IsCorlib ())
+ return new CoreTypeSystem (module);
return new CommonTypeSystem (module);
}
- static bool IsCorlib (ModuleDefinition module)
- {
- if (module.Assembly == null)
- return false;
-
- return module.Assembly.Name.Name == "mscorlib";
- }
-
internal abstract TypeReference LookupType (string @namespace, string name);
TypeReference LookupSystemType (string name, ElementType element_type)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/VariantType.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/VariantType.cs
index 86d6daa..76562f6 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/VariantType.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Cecil/VariantType.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/Collection.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/Collection.cs
index 1137978..4d92717 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/Collection.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/Collection.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -115,6 +115,9 @@ namespace Mono.Collections.Generic {
public Collection (ICollection<T> items)
{
+ if (items == null)
+ throw new ArgumentNullException ("items");
+
this.items = new T [items.Count];
items.CopyTo (this.items, 0);
this.size = this.items.Length;
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/ReadOnlyCollection.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/ReadOnlyCollection.cs
index 35c9cd8..7f24df6 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/ReadOnlyCollection.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Collections.Generic/ReadOnlyCollection.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,10 +28,11 @@
using System;
using System.Collections;
+using System .Collections.Generic;
namespace Mono.Collections.Generic {
- public sealed class ReadOnlyCollection<T> : Collection<T>, IList {
+ public sealed class ReadOnlyCollection<T> : Collection<T>, ICollection<T>, IList {
static ReadOnlyCollection<T> empty;
@@ -39,6 +40,14 @@ namespace Mono.Collections.Generic {
get { return empty ?? (empty = new ReadOnlyCollection<T> ()); }
}
+ bool ICollection<T>.IsReadOnly {
+ get { return true; }
+ }
+
+ bool IList.IsFixedSize {
+ get { return true; }
+ }
+
bool IList.IsReadOnly {
get { return true; }
}
@@ -52,8 +61,7 @@ namespace Mono.Collections.Generic {
if (array == null)
throw new ArgumentNullException ();
- this.items = array;
- this.size = array.Length;
+ Initialize (array, array.Length);
}
public ReadOnlyCollection (Collection<T> collection)
@@ -61,8 +69,14 @@ namespace Mono.Collections.Generic {
if (collection == null)
throw new ArgumentNullException ();
- this.items = collection.items;
- this.size = collection.size;
+ Initialize (collection.items, collection.size);
+ }
+
+ void Initialize (T [] items, int size)
+ {
+ this.items = new T [size];
+ Array.Copy (items, 0, this.items, 0, size);
+ this.size = size;
}
internal override void Grow (int desired)
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Security.Cryptography/CryptoService.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Security.Cryptography/CryptoService.cs
index f504f5e..58b6cfa 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Security.Cryptography/CryptoService.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono.Security.Cryptography/CryptoService.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Actions.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Actions.cs
index 071b149..756438f 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Actions.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Actions.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@
namespace Mono {
//delegate void Action ();
- //delegate void Action<T1, T2> (T1 arg1, T2 arg2);
+ delegate void Action<T1, T2> (T1 arg1, T2 arg2);
//delegate void Action<T1, T2, T3> (T1 arg1, T2 arg2, T3 arg3);
//delegate void Action<T1, T2, T3, T4> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Empty.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Empty.cs
index 70739af..c9e5d7d 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Empty.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Empty.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,8 +27,7 @@
//
using System;
-using System.Collections;
-using System.Collections.Generic;
+using Mono.Collections.Generic;
namespace Mono {
@@ -47,9 +46,22 @@ namespace Mono.Cecil {
return self == null || self.Length == 0;
}
- public static bool IsNullOrEmpty<T> (this ICollection<T> self)
+ public static bool IsNullOrEmpty<T> (this Collection<T> self)
{
- return self == null || self.Count == 0;
+ return self == null || self.size == 0;
+ }
+
+ public static T [] Resize<T> (this T [] self, int length)
+ {
+#if !CF
+ Array.Resize (ref self, length);
+#else
+ var copy = new T [length];
+ Array.Copy (self, copy, self.Length);
+ self = copy;
+#endif
+
+ return self;
}
}
}
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Funcs.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Funcs.cs
index 40f2225..87bc6e9 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Funcs.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/Mono/Funcs.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/System.Runtime.CompilerServices/ExtensionAttribute.cs b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/System.Runtime.CompilerServices/ExtensionAttribute.cs
index ae79cda..bb24f98 100644
--- a/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/System.Runtime.CompilerServices/ExtensionAttribute.cs
+++ b/external/mono-addins/Mono.Addins.CecilReflector/Mono.Cecil/System.Runtime.CompilerServices/ExtensionAttribute.cs
@@ -4,7 +4,7 @@
// Author:
// Jb Evain (jbevain at gmail.com)
//
-// Copyright (c) 2008 - 2010 Jb Evain
+// Copyright (c) 2008 - 2011 Jb Evain
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
diff --git a/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInfoView.cs b/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInfoView.cs
index 10ccb9f..287f6cf 100644
--- a/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInfoView.cs
+++ b/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/AddinInfoView.cs
@@ -246,7 +246,7 @@ namespace Mono.Addins.Gui
btnInstall.Visible = false;
btnUpdate.Visible = updateInfo != null && AllowInstall;
btnDisable.Visible = true;
- btnDisable.Label = installed.Enabled ? "Disable" : "Enable";
+ btnDisable.Label = installed.Enabled ? Catalog.GetString ("Disable") : Catalog.GetString ("Enable");
btnDisable.Visible = installed.Description.CanDisable;
btnUninstall.Visible = installed.Description.CanUninstall;
version = installed.Version;
diff --git a/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/HeaderBox.cs b/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/HeaderBox.cs
index 7336f99..487da63 100644
--- a/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/HeaderBox.cs
+++ b/external/mono-addins/Mono.Addins.Gui/Mono.Addins.Gui/HeaderBox.cs
@@ -138,14 +138,16 @@ namespace Mono.Addins.Gui
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
- Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Y + rect.Height - 1);
- Cairo.Color color1 = gcol;
- pat.AddColorStop (0, color1);
- gcol.L -= 0.1;
- if (gcol.L < 0) gcol.L = 0;
- pat.AddColorStop (1, gcol);
- cr.Pattern = pat;
- cr.FillPreserve ();
+ using (Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Y + rect.Height - 1)) {
+ Cairo.Color color1 = gcol;
+ pat.AddColorStop (0, color1);
+ gcol.L -= 0.1;
+ if (gcol.L < 0)
+ gcol.L = 0;
+ pat.AddColorStop (1, gcol);
+ cr.Pattern = pat;
+ cr.FillPreserve ();
+ }
}
}
diff --git a/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/RepositoryRegistry.cs b/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/RepositoryRegistry.cs
index 3258f9c..4aba0f3 100644
--- a/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/RepositoryRegistry.cs
+++ b/external/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup/RepositoryRegistry.cs
@@ -174,35 +174,42 @@ namespace Mono.Addins.Setup
RepositoryRecord rep = FindRepositoryRecord (url);
if (rep == null)
return; // Nothing to do
-
- foreach (RepositoryRecord rr in service.Configuration.Repositories) {
- if (rr == rep) continue;
- Repository newRep = rr.GetCachedRepository ();
- if (newRep == null) continue;
- foreach (ReferenceRepositoryEntry re in newRep.Repositories) {
- if (re.Url == url) {
- // The repository can't be removed because there is another
- // repository depending on it. Just mark it as a reference.
- rep.IsReference = true;
- return;
- }
- }
- }
-
- // There are no other repositories referencing this one, so we can safely delete
-
- Repository delRep = rep.GetCachedRepository ();
- service.Configuration.Repositories.Remove (rep);
- rep.ClearCachedRepository ();
-
- if (delRep != null) {
- foreach (ReferenceRepositoryEntry re in delRep.Repositories)
- RemoveRepository (new Uri (new Uri (url), re.Url).ToString ());
- }
+ rep.IsReference = true;
+ PurgeUnusedRepositories ();
service.SaveConfiguration ();
repoList = null;
}
+
+ void PurgeUnusedRepositories ()
+ {
+ bool changed;
+
+ do {
+ changed = false;
+
+ HashSet<string> referencedRepos = new HashSet<string> ();
+
+ // Get all referenced repos
+ foreach (RepositoryRecord rr in service.Configuration.Repositories) {
+ Repository repInfo = rr.GetCachedRepository ();
+ if (repInfo == null)
+ continue;
+
+ foreach (ReferenceRepositoryEntry re in repInfo.Repositories)
+ referencedRepos.Add (new Uri (new Uri (repInfo.Url), re.Url).ToString ());
+ }
+
+ foreach (RepositoryRecord rr in service.Configuration.Repositories.ToArray ()) {
+ if (rr.IsReference && !referencedRepos.Contains (rr.Url)) {
+ changed = true;
+ service.Configuration.Repositories.Remove (rr);
+ rr.ClearCachedRepository ();
+ }
+ }
+ }
+ while (changed);
+ }
/// <summary>
/// Enables or disables a repository
@@ -311,6 +318,8 @@ namespace Mono.Addins.Setup
} finally {
monitor.EndTask ();
}
+
+ PurgeUnusedRepositories ();
service.SaveConfiguration ();
}
diff --git a/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs b/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs
index 2741834..a5be2b2 100755
--- a/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs
+++ b/external/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs
@@ -59,10 +59,10 @@ namespace Mono.Addins
IAddinInstaller installer;
bool checkAssemblyLoadConflicts;
- Hashtable loadedAddins = new Hashtable ();
+ Dictionary<string,RuntimeAddin> loadedAddins = new Dictionary<string,RuntimeAddin> ();
Dictionary<string,ExtensionNodeSet> nodeSets = new Dictionary<string, ExtensionNodeSet> ();
Hashtable autoExtensionTypes = new Hashtable ();
- Hashtable loadedAssemblies = new Hashtable ();
+ Dictionary<Assembly,RuntimeAddin> loadedAssemblies = new Dictionary<Assembly,RuntimeAddin> ();
AddinLocalizer defaultLocalizer;
IProgressStatus defaultProgressStatus = new ConsoleProgressStatus (false);
@@ -179,31 +179,33 @@ namespace Mono.Addins
internal void Initialize (Assembly startupAsm, string configDir, string addinsDir, string databaseDir)
{
- if (initialized)
- return;
-
- Initialize (this);
-
- string asmFile = new Uri (startupAsm.CodeBase).LocalPath;
- startupDirectory = System.IO.Path.GetDirectoryName (asmFile);
-
- string customDir = Environment.GetEnvironmentVariable ("MONO_ADDINS_REGISTRY");
- if (customDir != null && customDir.Length > 0)
- configDir = customDir;
+ lock (LocalLock) {
+ if (initialized)
+ return;
+
+ Initialize (this);
+
+ string asmFile = new Uri (startupAsm.CodeBase).LocalPath;
+ startupDirectory = System.IO.Path.GetDirectoryName (asmFile);
+
+ string customDir = Environment.GetEnvironmentVariable ("MONO_ADDINS_REGISTRY");
+ if (customDir != null && customDir.Length > 0)
+ configDir = customDir;
- if (configDir == null || configDir.Length == 0)
- registry = AddinRegistry.GetGlobalRegistry (this, startupDirectory);
- else
- registry = new AddinRegistry (this, configDir, startupDirectory, addinsDir, databaseDir);
+ if (string.IsNullOrEmpty (configDir))
+ registry = AddinRegistry.GetGlobalRegistry (this, startupDirectory);
+ else
+ registry = new AddinRegistry (this, configDir, startupDirectory, addinsDir, databaseDir);
- if (registry.CreateHostAddinsFile (asmFile) || registry.UnknownDomain)
- registry.Update (new ConsoleProgressStatus (false));
-
- initialized = true;
-
- ActivateRoots ();
- OnAssemblyLoaded (null, null);
- AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler (OnAssemblyLoaded);
+ if (registry.CreateHostAddinsFile (asmFile) || registry.UnknownDomain)
+ registry.Update (new ConsoleProgressStatus (false));
+
+ initialized = true;
+
+ ActivateRoots ();
+ OnAssemblyLoaded (null, null);
+ AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler (OnAssemblyLoaded);
+ }
}
/// <summary>
@@ -211,14 +213,16 @@ namespace Mono.Addins
/// </summary>
public void Shutdown ()
{
- initialized = false;
- AppDomain.CurrentDomain.AssemblyLoad -= new AssemblyLoadEventHandler (OnAssemblyLoaded);
- loadedAddins.Clear ();
- loadedAssemblies.Clear ();
- registry.Dispose ();
- registry = null;
- startupDirectory = null;
- ClearContext ();
+ lock (LocalLock) {
+ initialized = false;
+ AppDomain.CurrentDomain.AssemblyLoad -= new AssemblyLoadEventHandler (OnAssemblyLoaded);
+ loadedAddins = new Dictionary<string, RuntimeAddin> ();
+ loadedAssemblies = new Dictionary<Assembly, RuntimeAddin> ();
+ registry.Dispose ();
+ registry = null;
+ startupDirectory = null;
+ ClearContext ();
+ }
}
/// <summary>
@@ -230,10 +234,12 @@ namespace Mono.Addins
public void InitializeDefaultLocalizer (IAddinLocalizer localizer)
{
CheckInitialized ();
- if (localizer != null)
- defaultLocalizer = new AddinLocalizer (localizer);
- else
- defaultLocalizer = null;
+ lock (LocalLock) {
+ if (localizer != null)
+ defaultLocalizer = new AddinLocalizer (localizer);
+ else
+ defaultLocalizer = null;
+ }
}
internal string StartupDirectory {
@@ -265,10 +271,8 @@ namespace Mono.Addins
public AddinLocalizer DefaultLocalizer {
get {
CheckInitialized ();
- if (defaultLocalizer != null)
- return defaultLocalizer;
- else
- return NullLocalizer.Instance;
+ var loc = defaultLocalizer;
+ return loc ?? NullLocalizer.Instance;
}
}
@@ -314,7 +318,10 @@ namespace Mono.Addins
internal RuntimeAddin GetAddinForAssembly (Assembly asm)
{
- return (RuntimeAddin) loadedAssemblies [asm];
+ ValidateAddinRoots ();
+ RuntimeAddin ad;
+ loadedAssemblies.TryGetValue (asm, out ad);
+ return ad;
}
/// <summary>
@@ -350,11 +357,14 @@ namespace Mono.Addins
}
if (notInstalled.Count == 0)
return;
- if (installer == null)
+
+ var ins = installer;
+
+ if (ins == null)
throw new InvalidOperationException ("Add-in installer not set");
// Install the add-ins
- installer.InstallAddins (Registry, message, (string[]) notInstalled.ToArray (typeof(string)));
+ ins.InstallAddins (Registry, message, (string[]) notInstalled.ToArray (typeof(string)));
}
// Enables or disables conflict checking while loading assemblies.
@@ -376,12 +386,16 @@ namespace Mono.Addins
public bool IsAddinLoaded (string id)
{
CheckInitialized ();
- return loadedAddins.Contains (Addin.GetIdName (id));
+ ValidateAddinRoots ();
+ return loadedAddins.ContainsKey (Addin.GetIdName (id));
}
internal RuntimeAddin GetAddin (string id)
{
- return (RuntimeAddin) loadedAddins [Addin.GetIdName (id)];
+ ValidateAddinRoots ();
+ RuntimeAddin a;
+ loadedAddins.TryGetValue (Addin.GetIdName (id), out a);
+ return a;
}
internal void ActivateAddin (string id)
@@ -396,10 +410,16 @@ namespace Mono.Addins
RuntimeAddin addin = GetAddin (id);
if (addin != null) {
addin.UnloadExtensions ();
- loadedAddins.Remove (Addin.GetIdName (id));
- if (addin.AssembliesLoaded) {
- foreach (Assembly asm in addin.Assemblies)
- loadedAssemblies.Remove (asm);
+ lock (LocalLock) {
+ var loadedAddinsCopy = new Dictionary<string,RuntimeAddin> (loadedAddins);
+ loadedAddinsCopy.Remove (Addin.GetIdName (id));
+ loadedAddins = loadedAddinsCopy;
+ if (addin.AssembliesLoaded) {
+ var loadedAssembliesCopy = new Dictionary<Assembly,RuntimeAddin> ();
+ foreach (Assembly asm in addin.Assemblies)
+ loadedAssembliesCopy.Remove (asm);
+ loadedAssemblies = loadedAssembliesCopy;
+ }
}
ReportAddinUnload (id);
}
@@ -423,47 +443,52 @@ namespace Mono.Addins
public void LoadAddin (IProgressStatus statusMonitor, string id)
{
CheckInitialized ();
- LoadAddin (statusMonitor, id, true);
+ if (LoadAddin (statusMonitor, id, true)) {
+ var adn = GetAddin (id);
+ adn.EnsureAssembliesLoaded ();
+ }
}
internal bool LoadAddin (IProgressStatus statusMonitor, string id, bool throwExceptions)
{
try {
- if (IsAddinLoaded (id))
- return true;
+ lock (LocalLock) {
+ if (IsAddinLoaded (id))
+ return true;
- if (!Registry.IsAddinEnabled (id)) {
- string msg = GettextCatalog.GetString ("Disabled add-ins can't be loaded.");
- ReportError (msg, id, null, false);
- if (throwExceptions)
- throw new InvalidOperationException (msg);
- return false;
- }
+ if (!Registry.IsAddinEnabled (id)) {
+ string msg = GettextCatalog.GetString ("Disabled add-ins can't be loaded.");
+ ReportError (msg, id, null, false);
+ if (throwExceptions)
+ throw new InvalidOperationException (msg);
+ return false;
+ }
- ArrayList addins = new ArrayList ();
- Stack depCheck = new Stack ();
- ResolveLoadDependencies (addins, depCheck, id, false);
- addins.Reverse ();
-
- if (statusMonitor != null)
- statusMonitor.SetMessage ("Loading Addins");
-
- for (int n=0; n<addins.Count; n++) {
+ ArrayList addins = new ArrayList ();
+ Stack depCheck = new Stack ();
+ ResolveLoadDependencies (addins, depCheck, id, false);
+ addins.Reverse ();
if (statusMonitor != null)
- statusMonitor.SetProgress ((double) n / (double)addins.Count);
+ statusMonitor.SetMessage ("Loading Addins");
- Addin iad = (Addin) addins [n];
- if (IsAddinLoaded (iad.Id))
- continue;
+ for (int n=0; n<addins.Count; n++) {
+
+ if (statusMonitor != null)
+ statusMonitor.SetProgress ((double) n / (double)addins.Count);
+
+ Addin iad = (Addin) addins [n];
+ if (IsAddinLoaded (iad.Id))
+ continue;
- if (statusMonitor != null)
- statusMonitor.SetMessage (string.Format(GettextCatalog.GetString("Loading {0} add-in"), iad.Id));
-
- if (!InsertAddin (statusMonitor, iad))
- return false;
+ if (statusMonitor != null)
+ statusMonitor.SetMessage (string.Format(GettextCatalog.GetString("Loading {0} add-in"), iad.Id));
+
+ if (!InsertAddin (statusMonitor, iad))
+ return false;
+ }
+ return true;
}
- return true;
}
catch (Exception ex) {
ReportError ("Add-in could not be loaded: " + ex.Message, id, ex, false);
@@ -491,15 +516,15 @@ namespace Mono.Addins
AddinDescription description = p.Load (iad);
// Register the add-in
- loadedAddins [Addin.GetIdName (p.Id)] = p;
+ var loadedAddinsCopy = new Dictionary<string,RuntimeAddin> (loadedAddins);
+ loadedAddinsCopy [Addin.GetIdName (p.Id)] = p;
+ loadedAddins = loadedAddinsCopy;
if (!AddinDatabase.RunningSetupProcess) {
// Load the extension points and other addin data
- foreach (ExtensionNodeSet rel in description.ExtensionNodeSets) {
- RegisterNodeSet (iad.Id, rel);
- }
-
+ RegisterNodeSets (iad.Id, description.ExtensionNodeSets);
+
foreach (ConditionTypeDescription cond in description.ConditionTypes) {
Type ctype = p.GetType (cond.TypeName, true);
RegisterCondition (cond.Id, ctype);
@@ -524,8 +549,12 @@ namespace Mono.Addins
internal void RegisterAssemblies (RuntimeAddin addin)
{
- foreach (Assembly asm in addin.Assemblies)
- loadedAssemblies [asm] = addin;
+ lock (LocalLock) {
+ var loadedAssembliesCopy = new Dictionary<Assembly,RuntimeAddin> (loadedAssemblies);
+ foreach (Assembly asm in addin.Assemblies)
+ loadedAssembliesCopy [asm] = addin;
+ loadedAssemblies = loadedAssembliesCopy;
+ }
}
internal void InsertExtensionPoint (RuntimeAddin addin, ExtensionPoint ep)
@@ -594,16 +623,26 @@ namespace Mono.Addins
return true;
}
- internal void RegisterNodeSet (string addinId, ExtensionNodeSet nset)
+ void RegisterNodeSets (string addinId, ExtensionNodeSetCollection nsets)
{
- nset.SourceAddinId = addinId;
- nodeSets [nset.Id] = nset;
+ lock (LocalLock) {
+ var nodeSetsCopy = new Dictionary<string,ExtensionNodeSet> (nodeSets);
+ foreach (ExtensionNodeSet nset in nsets) {
+ nset.SourceAddinId = addinId;
+ nodeSetsCopy [nset.Id] = nset;
+ }
+ nodeSets = nodeSetsCopy;
+ }
}
internal void UnregisterAddinNodeSets (string addinId)
{
- foreach (var nset in nodeSets.Values.Where (n => n.SourceAddinId == addinId).ToArray ())
- nodeSets.Remove (nset.Id);
+ lock (LocalLock) {
+ var nodeSetsCopy = new Dictionary<string,ExtensionNodeSet> (nodeSets);
+ foreach (var nset in nodeSetsCopy.Values.Where (n => n.SourceAddinId == addinId).ToArray ())
+ nodeSetsCopy.Remove (nset.Id);
+ nodeSets = nodeSetsCopy;
+ }
}
internal string GetNodeTypeAddin (ExtensionNodeSet nset, string type, string callingAddinId)
@@ -655,12 +694,34 @@ namespace Mono.Addins
void OnAssemblyLoaded (object s, AssemblyLoadEventArgs a)
{
- if (a != null)
- CheckHostAssembly (a.LoadedAssembly);
+ if (a != null) {
+ lock (pendingRootChecks) {
+ pendingRootChecks.Add (a.LoadedAssembly);
+ }
+ }
}
-
+
+ List<Assembly> pendingRootChecks = new List<Assembly> ();
+
+ internal void ValidateAddinRoots ()
+ {
+ List<Assembly> copy = null;
+ lock (pendingRootChecks) {
+ if (pendingRootChecks.Count > 0) {
+ copy = new List<Assembly> (pendingRootChecks);
+ pendingRootChecks.Clear ();
+ }
+ }
+ if (copy != null) {
+ foreach (Assembly asm in copy)
+ CheckHostAssembly (asm);
+ }
+ }
+
internal void ActivateRoots ()
{
+ lock (pendingRootChecks)
+ pendingRootChecks.Clear ();
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies ())
CheckHostAssembly (asm);
}
@@ -675,9 +736,11 @@ namespace Mono.Addins
} catch {
return;
}
+
Uri u;
if (!Uri.TryCreate (codeBase, UriKind.Absolute, out u))
return;
+
string asmFile = u.LocalPath;
Addin ainfo = Registry.GetAddinForHostAssembly (asmFile);
if (ainfo != null && !IsAddinLoaded (ainfo.Id)) {
@@ -723,8 +786,9 @@ namespace Mono.Addins
internal void ReportError (string message, string addinId, Exception exception, bool fatal)
{
- if (AddinLoadError != null)
- AddinLoadError (null, new AddinErrorEventArgs (message, addinId, exception));
+ var handler = AddinLoadError;
+ if (handler != null)
+ handler (null, new AddinErrorEventArgs (message, addinId, exception));
else {
Console.WriteLine (message);
if (exception != null)
@@ -734,9 +798,10 @@ namespace Mono.Addins
internal void ReportAddinLoad (string id)
{
- if (AddinLoaded != null) {
+ var handler = AddinLoaded;
+ if (handler != null) {
try {
- AddinLoaded (null, new AddinEventArgs (id));
+ handler (null, new AddinEventArgs (id));
} catch {
// Ignore subscriber exceptions
}
@@ -745,9 +810,10 @@ namespace Mono.Addins
internal void ReportAddinUnload (string id)
{
- if (AddinUnloaded != null) {
+ var handler = AddinUnloaded;
+ if (handler != null) {
try {
- AddinUnloaded (null, new AddinEventArgs (id));
+ handler (null, new AddinEventArgs (id));
} catch {
// Ignore subscriber exceptions
}
diff --git a/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs b/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs
index 2b86312..a38ce90 100644
--- a/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs
+++ b/external/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs
@@ -47,6 +47,8 @@ namespace Mono.Addins
/// </remarks>
public class ExtensionContext
{
+ internal object LocalLock = new object ();
+
Hashtable conditionTypes = new Hashtable ();
Hashtable conditionsToNodes = new Hashtable ();
List<WeakReference> childContexts;
diff --git a/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs b/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs
index 04f3900..55a7af0 100644
--- a/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs
+++ b/external/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs
@@ -671,7 +671,7 @@ namespace Mono.Addins
get { return assemblies != null; }
}
- void EnsureAssembliesLoaded ()
+ internal void EnsureAssembliesLoaded ()
{
if (assemblies != null)
return;
diff --git a/external/monomac/samples/macdoc/AppDelegate.cs b/external/monomac/samples/macdoc/AppDelegate.cs
index 9b88c6d..3b33091 100644
--- a/external/monomac/samples/macdoc/AppDelegate.cs
+++ b/external/monomac/samples/macdoc/AppDelegate.cs
@@ -132,7 +132,7 @@ namespace macdoc
}).ContinueWith (t => Logger.LogError ("Error while creating indexes", t.Exception), TaskContinuationOptions.OnlyOnFaulted);
// Check if there is a MonoTouch/MonoMac documentation installed and launch accordingly
- var products = Root.HelpSources.Where (hs => hs != null && hs.Name != null).ToProducts ();
+ var products = Root.HelpSources.Where (hs => hs != null && hs.Name != null).ToProducts ().Distinct ().ToArray ();
if (products.Where (p => File.Exists (ProductUtils.GetMergeToolForProduct (p))).Any ()) {
Task.Factory.StartNew (() => {
return products.ToDictionary (p => p,
@@ -248,8 +248,8 @@ namespace macdoc
void LaunchDocumentationUpdate (Dictionary<Product, Tuple<bool, bool>> toUpdate)
{
- var informative = "We have detected your " + string.Join (" and ", toUpdate.Keys.Select (ProductUtils.GetFriendlyName)) +
- " documentation can be upgraded with Apple documentation.";
+ var outdatedProducts = string.Join (" and ", toUpdate.Where (kvp => kvp.Value.Item1 || kvp.Value.Item2).Select (kvp => ProductUtils.GetFriendlyName (kvp.Key)));
+ var informative = "We have detected your " + outdatedProducts + " documentation can be upgraded with Apple documentation.";
// Check if we are going to be downloading stuff
if (toUpdate.Any (kvp => kvp.Value.Item1))
informative += Environment.NewLine + Environment.NewLine + "Warning: we are going to download documentation from Apple servers which can take a long time depending on your Internet connection.";
diff --git a/external/monomac/samples/macdoc/AppleDocHandler.cs b/external/monomac/samples/macdoc/AppleDocHandler.cs
index b5f1f68..4917cb2 100644
--- a/external/monomac/samples/macdoc/AppleDocHandler.cs
+++ b/external/monomac/samples/macdoc/AppleDocHandler.cs
@@ -4,6 +4,7 @@ using System.Net;
using System.Linq;
using System.Threading;
using System.Xml.Linq;
+using System.Collections.Generic;
namespace macdoc
{
@@ -18,6 +19,7 @@ namespace macdoc
}
readonly string[] searchPaths = new[] {
+ "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets",
"/Applications/Xcode.app/Contents/Developer/Documentation/DocSets/",
"/Library/Developer/Shared/Documentation/DocSets/",
"/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/"
@@ -34,7 +36,7 @@ namespace macdoc
readonly XNamespace atomNamespace = "http://www.w3.org/2005/Atom";
readonly string baseApplicationPath;
- XDocument appleFeed;
+ Dictionary<string, XDocument> appleFeeds = new Dictionary<string, XDocument> ();
public AppleDocHandler (string baseApplicationPath)
{
@@ -44,18 +46,19 @@ namespace macdoc
// We load the atom field that contains a timeline of the modifications down to documentation by Apple
XDocument LoadAppleFeed (string feedUrl)
{
- if (appleFeed != null)
+ XDocument appleFeed;
+ if (appleFeeds.TryGetValue (feedUrl, out appleFeed))
return appleFeed;
-
+
WebClient wc = new WebClient ();
var feed = wc.DownloadString (feedUrl);
- return appleFeed = XDocument.Parse (feed);
+ return appleFeeds[feedUrl] = XDocument.Parse (feed);
}
// This method transforms the Atom XML data into a POCO for the the most recent item of the feed
AppleDocInformation GetLatestAppleDocInformation (XDocument feed)
{
- var latestEntry = feed.Descendants (atomNamespace + "entry").LastOrDefault ();
+ var latestEntry = feed.Descendants (atomNamespace + "entry").FirstOrDefault ();
if (latestEntry == null)
return null;
@@ -98,6 +101,7 @@ namespace macdoc
return false;
var installedVersion = GetAppleDocVersion (path);
+ Logger.Log ("Installed doc version {0}, compared to remote {1}", installedVersion.ToString (), infos.Version.ToString ());
return installedVersion >= infos.Version;
}
@@ -106,6 +110,7 @@ namespace macdoc
// is given the completion percentage
public bool CheckAppleDocFreshness (string atomFeed, out AppleDocInformation infos)
{
+ Logger.Log ("Downloading Apple feed at {0}", atomFeed);
var feed = LoadAppleFeed (atomFeed);
infos = GetLatestAppleDocInformation (feed);
var needRefresh = !CheckAppleDocAvailabilityAndFreshness (infos);
@@ -129,6 +134,7 @@ namespace macdoc
return true;
var mergedVersion = CloneFillWithZeros (new Version (File.ReadAllText (statusFile)));
+ Logger.Log ("Comparing merged {0} with downloaded {1}", mergedVersion.ToString (), infos.Version.ToString ());
return mergedVersion != infos.Version;
}
diff --git a/external/monomac/samples/macdoc/Makefile b/external/monomac/samples/macdoc/Makefile
index d090d79..5fd1130 100644
--- a/external/monomac/samples/macdoc/Makefile
+++ b/external/monomac/samples/macdoc/Makefile
@@ -1,12 +1,14 @@
MDTOOL_MASTER = $(MONODEVELOP_DIR)/main/build/bin/mdtool.exe
-MDTOOL_SYSTEM = /Applications/MonoDevelop.app/Contents/MacOS/mdtool
+
+MDROOT = $(shell stat -f%N "/Applications/Xamarin Studio.app" 2>/dev/null || echo "/Applications/MonoDevelop.app")
+MDTOOL_SYSTEM ?= $(MDROOT)/Contents/MacOS/mdtool
# If invoked from CI, we pass the just built MonoDevelop as mdtool
ifeq ($(wildcard $(MDTOOL_MASTER)),)
- MDTOOL_BUILD = $(MDTOOL_SYSTEM) build
+ MDTOOL_BUILD = "$(MDTOOL_SYSTEM)" build
else
- MDTOOL_BUILD = mono $(MDTOOL_MASTER) setup reg-build && mono $(MDTOOL_MASTER) build
+ MDTOOL_BUILD = mono "$(MDTOOL_MASTER)" setup reg-build && mono "$(MDTOOL_MASTER)" build
endif
MONO_MAC_DLL = ../../src/MonoMac.dll
@@ -22,7 +24,7 @@ all: monomac macdoc monodoc
monomac: $(MONO_MAC_DLL)
macdoc: monomac
- @echo "MDTOOL_BUILD: " $(MDTOOL_BUILD)
+ @echo "MDTOOL_BUILD: \"$(MDTOOL_BUILD)"\"
rm -Rf $(MACDOC_APP)
$(MDTOOL_BUILD)
diff --git a/external/monomac/samples/macdoc/MyDocument.cs b/external/monomac/samples/macdoc/MyDocument.cs
index e4fa4e6..b7e624d 100644
--- a/external/monomac/samples/macdoc/MyDocument.cs
+++ b/external/monomac/samples/macdoc/MyDocument.cs
@@ -389,7 +389,8 @@ namespace macdoc
tabSelector.SelectAt (2);
Search (contents);
// Unselect the search term in case user is typing slowly
- sender.CurrentEditor.SelectedRange = new NSRange (contents.Length, 0);
+ if (sender.CurrentEditor != null)
+ sender.CurrentEditor.SelectedRange = new NSRange (contents.Length, 0);
}
// Typing in the index panel
diff --git a/external/monomac/src/AppKit/BeginSheet.cs b/external/monomac/src/AppKit/BeginSheet.cs
index 7dcb4df..4c58562 100644
--- a/external/monomac/src/AppKit/BeginSheet.cs
+++ b/external/monomac/src/AppKit/BeginSheet.cs
@@ -49,7 +49,7 @@ namespace MonoMac.AppKit {
this.action = action;
}
- [Export ("apply")]
+ [Export (NSActionDispatcher.SelectorName)]
[Preserve (Conditional = true)]
public void Apply ()
{
diff --git a/external/monomac/src/AppKit/Enums.cs b/external/monomac/src/AppKit/Enums.cs
old mode 100755
new mode 100644
diff --git a/external/monomac/src/AppKit/NSGraphics.cs b/external/monomac/src/AppKit/NSGraphics.cs
index b2bd573..949c7b7 100644
--- a/external/monomac/src/AppKit/NSGraphics.cs
+++ b/external/monomac/src/AppKit/NSGraphics.cs
@@ -100,7 +100,7 @@ namespace MonoMac.AppKit {
[DllImport (Constants.AppKitLibrary, EntryPoint="NSRectFill")]
public extern static void RectFill (RectangleF rect);
- [DllImport (Constants.AppKitLibrary)]
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSRectFillList")]
unsafe extern static void RectFillList (RectangleF *rects, int count);
public static void RectFill (RectangleF [] rects)
@@ -165,5 +165,38 @@ namespace MonoMac.AppKit {
[DllImport (Constants.AppKitLibrary)]
public extern static ;
#endif
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawWhiteBezel")]
+ public extern static void DrawWhiteBezel (RectangleF aRect, RectangleF clipRect);
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawLightBezel")]
+ public extern static void DrawLightBezel (RectangleF aRect, RectangleF clipRect);
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawGrayBezel")]
+ public extern static void DrawGrayBezel (RectangleF aRect, RectangleF clipRect);
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawDarkBezel")]
+ public extern static void DrawDarkBezel (RectangleF aRect, RectangleF clipRect);
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawGroove")]
+ public extern static void DrawGroove (RectangleF aRect, RectangleF clipRect);
+
+ [DllImport (Constants.AppKitLibrary, EntryPoint="NSDrawTiledRects")]
+ unsafe extern static RectangleF DrawTiledRects (RectangleF aRect, RectangleF clipRect, NSRectEdge* sides, float* grays, int count);
+
+ public static RectangleF DrawTiledRects (RectangleF aRect, RectangleF clipRect, NSRectEdge[] sides, float[] grays)
+ {
+ if (sides == null)
+ throw new ArgumentNullException ("sides");
+ if (grays == null)
+ throw new ArgumentNullException ("grays");
+ if (sides.Length != grays.Length)
+ throw new ArgumentOutOfRangeException ("grays", "Both array parameters must have the same length");
+ unsafe {
+ fixed (NSRectEdge *ptr = &sides [0])
+ fixed (float *ptr2 = &grays [0])
+ return DrawTiledRects (aRect, clipRect, ptr, ptr2, sides.Length);
+ }
+ }
}
}
diff --git a/external/monomac/src/AppKit/NSImage.cs b/external/monomac/src/AppKit/NSImage.cs
index baa7360..a7ee7d1 100644
--- a/external/monomac/src/AppKit/NSImage.cs
+++ b/external/monomac/src/AppKit/NSImage.cs
@@ -30,8 +30,51 @@ using MonoMac.CoreGraphics;
namespace MonoMac.AppKit {
- public partial class NSImage {
+ public enum NSImageName {
+ QuickLookTemplate,
+ BluetoothTemplate,
+ IChatTheaterTemplate,
+ SlideshowTemplate,
+ ActionTemplate,
+ SmartBadgeTemplate,
+ PathTemplate,
+ InvalidDataFreestandingTemplate,
+ LockLockedTemplate,
+ LockUnlockedTemplate,
+ GoRightTemplate,
+ GoLeftTemplate,
+ RightFacingTriangleTemplate,
+ LeftFacingTriangleTemplate,
+ AddTemplate,
+ RemoveTemplate,
+ RevealFreestandingTemplate,
+ FollowLinkFreestandingTemplate,
+ EnterFullScreenTemplate,
+ ExitFullScreenTemplate,
+ StopProgressTemplate,
+ StopProgressFreestandingTemplate,
+ RefreshTemplate,
+ RefreshFreestandingTemplate,
+ Folder,
+ TrashEmpty,
+ TrashFull,
+ HomeTemplate,
+ BookmarksTemplate,
+ Caution,
+ StatusAvailable,
+ StatusPartiallyAvailable,
+ StatusUnavailable,
+ StatusNone,
+ ApplicationIcon,
+ MenuOnStateTemplate,
+ MenuMixedStateTemplate,
+ UserGuest,
+ MobileMe
+ }
+ public partial class NSImage {
+ object __mt_reps_var;
+
public CGImage CGImage {
get {
var rect = RectangleF.Empty;
@@ -52,6 +95,92 @@ namespace MonoMac.AppKit {
// ignore return value (bool)
set { SetName (value); }
}
+
+ public static NSImage ImageNamed (NSImageName name)
+ {
+ switch (name) {
+ case NSImageName.QuickLookTemplate:
+ return ImageNamed (NSImageNameQuickLookTemplate);
+ case NSImageName.BluetoothTemplate:
+ return ImageNamed (NSImageNameBluetoothTemplate);
+ case NSImageName.IChatTheaterTemplate:
+ return ImageNamed (NSImageNameIChatTheaterTemplate);
+ case NSImageName.SlideshowTemplate:
+ return ImageNamed (NSImageNameSlideshowTemplate);
+ case NSImageName.ActionTemplate:
+ return ImageNamed (NSImageNameActionTemplate);
+ case NSImageName.SmartBadgeTemplate:
+ return ImageNamed (NSImageNameSmartBadgeTemplate);
+ case NSImageName.PathTemplate:
+ return ImageNamed (NSImageNamePathTemplate);
+ case NSImageName.InvalidDataFreestandingTemplate:
+ return ImageNamed (NSImageNameInvalidDataFreestandingTemplate);
+ case NSImageName.LockLockedTemplate:
+ return ImageNamed (NSImageNameLockLockedTemplate);
+ case NSImageName.LockUnlockedTemplate:
+ return ImageNamed (NSImageNameLockUnlockedTemplate);
+ case NSImageName.GoRightTemplate:
+ return ImageNamed (NSImageNameGoRightTemplate);
+ case NSImageName.GoLeftTemplate:
+ return ImageNamed (NSImageNameGoLeftTemplate);
+ case NSImageName.RightFacingTriangleTemplate:
+ return ImageNamed (NSImageNameRightFacingTriangleTemplate);
+ case NSImageName.LeftFacingTriangleTemplate:
+ return ImageNamed (NSImageNameLeftFacingTriangleTemplate);
+ case NSImageName.AddTemplate:
+ return ImageNamed (NSImageNameAddTemplate);
+ case NSImageName.RemoveTemplate:
+ return ImageNamed (NSImageNameRemoveTemplate);
+ case NSImageName.RevealFreestandingTemplate:
+ return ImageNamed (NSImageNameRevealFreestandingTemplate);
+ case NSImageName.FollowLinkFreestandingTemplate:
+ return ImageNamed (NSImageNameFollowLinkFreestandingTemplate);
+ case NSImageName.EnterFullScreenTemplate:
+ return ImageNamed (NSImageNameEnterFullScreenTemplate);
+ case NSImageName.ExitFullScreenTemplate:
+ return ImageNamed (NSImageNameExitFullScreenTemplate);
+ case NSImageName.StopProgressTemplate:
+ return ImageNamed (NSImageNameStopProgressTemplate);
+ case NSImageName.StopProgressFreestandingTemplate:
+ return ImageNamed (NSImageNameStopProgressFreestandingTemplate);
+ case NSImageName.RefreshTemplate:
+ return ImageNamed (NSImageNameRefreshTemplate);
+ case NSImageName.RefreshFreestandingTemplate:
+ return ImageNamed (NSImageNameRefreshFreestandingTemplate);
+ case NSImageName.Folder:
+ return ImageNamed (NSImageNameFolder);
+ case NSImageName.TrashEmpty:
+ return ImageNamed (NSImageNameTrashEmpty);
+ case NSImageName.TrashFull:
+ return ImageNamed (NSImageNameTrashFull);
+ case NSImageName.HomeTemplate:
+ return ImageNamed (NSImageNameHomeTemplate);
+ case NSImageName.BookmarksTemplate:
+ return ImageNamed (NSImageNameBookmarksTemplate);
+ case NSImageName.Caution:
+ return ImageNamed (NSImageNameCaution);
+ case NSImageName.StatusAvailable:
+ return ImageNamed (NSImageNameStatusAvailable);
+ case NSImageName.StatusPartiallyAvailable:
+ return ImageNamed (NSImageNameStatusPartiallyAvailable);
+ case NSImageName.StatusUnavailable:
+ return ImageNamed (NSImageNameStatusUnavailable);
+ case NSImageName.StatusNone:
+ return ImageNamed (NSImageNameStatusNone);
+ case NSImageName.ApplicationIcon:
+ return ImageNamed (NSImageNameApplicationIcon);
+ case NSImageName.MenuOnStateTemplate:
+ return ImageNamed (NSImageNameMenuOnStateTemplate);
+ case NSImageName.MenuMixedStateTemplate:
+ return ImageNamed (NSImageNameMenuMixedStateTemplate);
+ case NSImageName.UserGuest:
+ return ImageNamed (NSImageNameUserGuest);
+ case NSImageName.MobileMe:
+ return ImageNamed (NSImageNameMobileMe);
+ }
+
+ throw new ArgumentException ("Invalid enum value", "name");
+ }
}
public partial class NSImageRep {
diff --git a/external/monomac/src/AppKit/NSMenu.cs b/external/monomac/src/AppKit/NSMenu.cs
index 4bf8bb1..9b3e36f 100644
--- a/external/monomac/src/AppKit/NSMenu.cs
+++ b/external/monomac/src/AppKit/NSMenu.cs
@@ -9,6 +9,8 @@ using MonoMac.CoreAnimation;
namespace MonoMac.AppKit {
public partial class NSMenu {
+ object __mt_items_var;
+
NSMenuItem InsertItem (string title, string charCode, int index)
{
return InsertItem (title, null, charCode, index);
diff --git a/external/monomac/src/AppKit/NSPageLayout.cs b/external/monomac/src/AppKit/NSPageLayout.cs
new file mode 100644
index 0000000..a6e0126
--- /dev/null
+++ b/external/monomac/src/AppKit/NSPageLayout.cs
@@ -0,0 +1,13 @@
+//
+// Support code for NSPageLayout
+//
+
+using System;
+
+namespace MonoMac.AppKit {
+ public partial class NSPageLayout {
+ object __mt_accessory_var;
+ }
+
+}
+
\ No newline at end of file
diff --git a/external/monomac/src/AppKit/NSPrintPanel.cs b/external/monomac/src/AppKit/NSPrintPanel.cs
new file mode 100644
index 0000000..bede2a5
--- /dev/null
+++ b/external/monomac/src/AppKit/NSPrintPanel.cs
@@ -0,0 +1,13 @@
+//
+// Support code for NSPrintPanel
+//
+
+using System;
+
+namespace MonoMac.AppKit {
+ public partial class NSPrintPanel {
+ object __mt_accessory_var;
+ }
+
+}
+
\ No newline at end of file
diff --git a/external/monomac/src/AppKit/NSView.cs b/external/monomac/src/AppKit/NSView.cs
new file mode 100644
index 0000000..182627b
--- /dev/null
+++ b/external/monomac/src/AppKit/NSView.cs
@@ -0,0 +1,13 @@
+//
+// Support code for NSView
+//
+
+using System;
+
+namespace MonoMac.AppKit {
+ public partial class NSView {
+ object __mt_tracking_var;
+ }
+
+}
+
\ No newline at end of file
diff --git a/external/monomac/src/Make.shared b/external/monomac/src/Make.shared
index fa85088..031484a 100644
--- a/external/monomac/src/Make.shared
+++ b/external/monomac/src/Make.shared
@@ -96,6 +96,7 @@ SHARED_SOURCE = \
./Foundation/ModelNotImplementedException.cs \
./Foundation/NSAutoreleasePool.cs \
./Foundation/NSArray.cs \
+ ./Foundation/NSAttributedString.cs \
./Foundation/NSBundle.cs \
./Foundation/NSCalendar.cs \
./Foundation/NSCoder.cs \
@@ -112,14 +113,17 @@ SHARED_SOURCE = \
./Foundation/NSInputStream.cs \
./Foundation/NSKeyedArchiver.cs \
./Foundation/NSKeyedUnarchiver.cs \
+ ./Foundation/NSLocale.cs \
./Foundation/NSMutableAttributedString.cs \
./Foundation/NSMutableData.cs \
./Foundation/NSMutableDictionary.cs \
+ ./Foundation/NSMutableSet.cs \
./Foundation/NSMutableUrlRequest.cs \
./Foundation/NSNotificationCenter.cs \
./Foundation/NSNumber.cs \
./Foundation/NSNumber2.cs \
./Foundation/NSOutputStream.cs \
+ ./Foundation/NSOrderedSet.cs \
./Foundation/NSPropertyListSerialization.cs \
./Foundation/NSRunLoop.cs \
./Foundation/NSSearchPath.cs \
@@ -128,12 +132,14 @@ SHARED_SOURCE = \
./Foundation/NSString2.cs \
./Foundation/NSThread.cs \
./Foundation/NSTimer.cs \
+ ./Foundation/NSUbiquitousKeyValueStore.cs \
./Foundation/NSUrl.cs \
./Foundation/NSUrlConnection.cs \
./Foundation/NSUrlCredential.cs \
./Foundation/NSUrlProtocol.cs \
./Foundation/NSUrlProtocolClient.cs \
./Foundation/NSUserDefaults.cs \
+ ./Foundation/NSUuid.cs \
./Foundation/NSValue.cs \
./Foundation/ToString.cs \
./ImageIO/CGImageSource.cs \
diff --git a/external/monomac/src/Makefile b/external/monomac/src/Makefile
index f09801f..17fa22b 100644
--- a/external/monomac/src/Makefile
+++ b/external/monomac/src/Makefile
@@ -79,8 +79,10 @@ MONOMAC_SOURCES = $(EXTRA_MONOMAC_SOURCES) \
./AppKit/NSMenuItem.cs \
./AppKit/NSOpenGLContext.cs \
./AppKit/NSOpenGLPixelFormat.cs \
+ ./AppKit/NSPageLayout.cs \
./AppKit/NSPopUpButton.cs \
./AppKit/NSPopUpButtonCell.cs \
+ ./AppKit/NSPrintPanel.cs \
./AppKit/NSScreen.cs \
./AppKit/NSSharingService.cs \
./AppKit/NSSegmentedControl.cs \
@@ -90,6 +92,7 @@ MONOMAC_SOURCES = $(EXTRA_MONOMAC_SOURCES) \
./AppKit/NSTableView.cs \
./AppKit/NSToolbarItem.cs \
./AppKit/NSTreeController.cs \
+ ./AppKit/NSView.cs \
./AppKit/NSWindow.cs \
./CoreVideo/CVDisplayLink.cs \
./Foundation/ObjCException.cs \
@@ -157,7 +160,7 @@ endif
ifeq ($(HAVE_ASYNC),1)
ASYNC_TARGETS = MonoMac.CFNetwork.dll
UPDATE_FILES = MonoMac.dll* MonoMac.CFNetwork.dll*
- MCS ?= mcs
+ MCS ?= mcs -sdk:4
else
ASYNC_TARGETS =
UPDATE_FILES = MonoMac.dll*
@@ -211,7 +214,7 @@ _bmac.exe: $(APIS) core.dll $(GENERATOR_SOURCES)
$(MCS) -unsafe -out:_bmac.exe -debug $(DEFINES) -define:GENERATOR,MONOMAC,MONOMAC_BOOTSTRAP $(GENERATOR_SOURCES) -r:core.dll -r:System.Drawing
generated_sources: _bmac.exe $(APIS)
- mono --debug _bmac.exe -a -d=MONOMAC $(BMAC_DEFINES) --core --sourceonly=generated_sources -v -tmpdir=. $(APIS) --baselib=core.dll --ns=MonoMac.ObjCRuntime -r=System.Drawing
+ mono --debug _bmac.exe -a -d=MONOMAC $(BMAC_DEFINES) --core --sourceonly=generated_sources -v -tmpdir=. $(APIS) --baselib=core.dll --ns=MonoMac.ObjCRuntime -r=System.Drawing $(BMAC_OPTIONS)
bmac.exe: $(TARGET) $(GENERATOR_SOURCES)
$(MCS) -unsafe -out:bmac.exe -debug $(DEFINES) -define:GENERATOR,MONOMAC,MONOMAC_BOOTSTRAP $(GENERATOR_SOURCES) -r:$(TARGET) -r:System.Drawing
diff --git a/external/monomac/src/ObjCRuntime/NativeMethodBuilder.cs b/external/monomac/src/ObjCRuntime/NativeMethodBuilder.cs
index 4ceeebd..d1e450f 100644
--- a/external/monomac/src/ObjCRuntime/NativeMethodBuilder.cs
+++ b/external/monomac/src/ObjCRuntime/NativeMethodBuilder.cs
@@ -30,7 +30,7 @@ using MonoMac.Foundation;
namespace MonoMac.ObjCRuntime {
internal class NativeMethodBuilder : NativeImplementationBuilder {
- private static ConstructorInfo newnsstring = typeof (NSString).GetConstructor (new Type [] { typeof (string) });
+ private static MethodInfo creatensstring = typeof (NSString).GetMethod ("op_Explicit", new Type [] { typeof (string) });
#if !MONOMAC_BOOTSTRAP
private static MethodInfo convertstruct = typeof (Marshal).GetMethod ("StructureToPtr", new Type [] { typeof (object), typeof (IntPtr), typeof (bool) });
private static MethodInfo buildarray = typeof (NSArray).GetMethod ("FromNSObjects", new Type [] { typeof (NSObject []) });
@@ -93,7 +93,7 @@ namespace MonoMac.ObjCRuntime {
UpdateByRefArguments (il, 0);
if (minfo.ReturnType == typeof (string)) {
- il.Emit (OpCodes.Newobj, newnsstring);
+ il.Emit (OpCodes.Call, creatensstring);
#if !MONOMAC_BOOTSTRAP
} else if (minfo.ReturnType.IsArray && IsWrappedType (minfo.ReturnType.GetElementType ())) {
if (minfo.ReturnType.GetElementType () == typeof (string))
diff --git a/external/monomac/src/ObjCRuntime/Selector.cs b/external/monomac/src/ObjCRuntime/Selector.cs
index 1891caa..95d6f02 100644
--- a/external/monomac/src/ObjCRuntime/Selector.cs
+++ b/external/monomac/src/ObjCRuntime/Selector.cs
@@ -48,8 +48,14 @@ namespace MonoMac.ObjCRuntime {
internal IntPtr handle;
- public Selector (IntPtr sel) {
- if (!sel_isMapped (sel))
+ public Selector (IntPtr sel) :
+ this (sel, true)
+ {
+ }
+
+ internal Selector (IntPtr sel, bool check)
+ {
+ if (check && !sel_isMapped (sel))
throw new ArgumentException ("sel is not a selector handle.");
this.handle = sel;
@@ -110,7 +116,17 @@ namespace MonoMac.ObjCRuntime {
public override int GetHashCode () {
return (int) handle;
}
-
+
+ // return null, instead of throwing, if an invalid pointer is used (e.g. IntPtr.Zero)
+ // so this looks better in the debugger watch when no selector is assigned (ref: #10876)
+ public static Selector FromHandle (IntPtr sel)
+ {
+ if (!sel_isMapped (sel))
+ return null;
+ // create the selector without duplicating the sel_isMapped check
+ return new Selector (sel, false);
+ }
+
[DllImport ("/usr/lib/libobjc.dylib")]
extern static IntPtr sel_getName (IntPtr sel);
[DllImport ("/usr/lib/libobjc.dylib", EntryPoint="sel_registerName")]
diff --git a/external/monomac/src/OpenGL/FrameEventArgs.cs b/external/monomac/src/OpenGL/FrameEventArgs.cs
index 17131bc..8b5f65a 100644
--- a/external/monomac/src/OpenGL/FrameEventArgs.cs
+++ b/external/monomac/src/OpenGL/FrameEventArgs.cs
@@ -1,4 +1,4 @@
-#region License
+#region License
//
// The Open Toolkit Library License
//
diff --git a/external/monomac/src/OpenGL/INativeWindow.cs b/external/monomac/src/OpenGL/INativeWindow.cs
index b819510..00e48b2 100644
--- a/external/monomac/src/OpenGL/INativeWindow.cs
+++ b/external/monomac/src/OpenGL/INativeWindow.cs
@@ -1,4 +1,4 @@
-#region License
+#region License
//
// The Open Toolkit Library License
//
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/BlittableValueType.cs b/external/monomac/src/OpenGL/OpenTK/Audio/BlittableValueType.cs
old mode 100755
new mode 100644
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/ContextHandle.cs b/external/monomac/src/OpenGL/OpenTK/Audio/ContextHandle.cs
old mode 100755
new mode 100644
index 4271c37..2ab0416
--- a/external/monomac/src/OpenGL/OpenTK/Audio/ContextHandle.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/ContextHandle.cs
@@ -1,4 +1,4 @@
-#region --- License ---
+#region --- License ---
/* Licensed under the MIT/X11 license.
* Copyright (c) 2006-2008 the OpenTK Team.
* This notice may not be removed from any source distribution.
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/AL.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/AL.cs
old mode 100755
new mode 100644
index cfe2eca..d87e9b1
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/AL.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/AL.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* AlFunctions.cs
* C header: \OpenAL 1.1 SDK\include\Al.h
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/ALEnums.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/ALEnums.cs
old mode 100755
new mode 100644
index 00dff08..66c6a51
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/ALEnums.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/ALEnums.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* AlTokens.cs
* C header: \OpenAL 1.1 SDK\include\Al.h
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtension.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtension.cs
old mode 100755
new mode 100644
index 8d74421..8273f2d
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtension.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtension.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* EfxFunctions.cs
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionEnums.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionEnums.cs
old mode 100755
new mode 100644
index 313f213..f270d9f
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionEnums.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionEnums.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* EfxTokens.cs
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionPresets.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionPresets.cs
old mode 100755
new mode 100644
index cd87ef3..620ec01
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionPresets.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/EffectsExtensionPresets.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* EfxPresets.cs
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/XRamExtension.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/XRamExtension.cs
old mode 100755
new mode 100644
index 95a64f8..cd0c009
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/XRamExtension.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/AL/XRamExtension.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* XRamExtension.cs
* C header: \OpenAL 1.1 SDK\include\xram.h
* Spec: ?
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/Alc.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/Alc.cs
old mode 100755
new mode 100644
index 00d188d..d46ec95
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/Alc.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/Alc.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* AlcFunctions.cs
* C header: \OpenAL 1.1 SDK\include\Alc.h
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
@@ -441,4 +441,4 @@ namespace MonoMac.OpenAL
}
-}
\ No newline at end of file
+}
diff --git a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/AlcEnums.cs b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/AlcEnums.cs
old mode 100755
new mode 100644
index 2148778..0f39d12
--- a/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/AlcEnums.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Audio/OpenAL/Alc/AlcEnums.cs
@@ -1,4 +1,4 @@
-#region --- OpenTK.OpenAL License ---
+#region --- OpenTK.OpenAL License ---
/* AlcTokens.cs
* C header: \OpenAL 1.1 SDK\include\Alc.h
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
diff --git a/external/monomac/src/OpenGL/OpenTK/Graphics/Color4.cs b/external/monomac/src/OpenGL/OpenTK/Graphics/Color4.cs
index 7ffda7f..e5286ab 100644
--- a/external/monomac/src/OpenGL/OpenTK/Graphics/Color4.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Graphics/Color4.cs
@@ -1,4 +1,4 @@
-#region License
+#region License
//
// The Open Toolkit Library License
//
diff --git a/external/monomac/src/OpenGL/OpenTK/Math/MathHelper.cs b/external/monomac/src/OpenGL/OpenTK/Math/MathHelper.cs
index 05d55cb..60599d0 100644
--- a/external/monomac/src/OpenGL/OpenTK/Math/MathHelper.cs
+++ b/external/monomac/src/OpenGL/OpenTK/Math/MathHelper.cs
@@ -1,4 +1,4 @@
-#region --- License ---
+#region --- License ---
/* Licensed under the MIT/X11 license.
* Copyright (c) 2006-2008 the OpenTK Team.
* This notice may not be removed from any source distribution.
diff --git a/external/monomac/src/OpenGL/WindowBorder.cs b/external/monomac/src/OpenGL/WindowBorder.cs
index d5f3cb8..a9a6aba 100644
--- a/external/monomac/src/OpenGL/WindowBorder.cs
+++ b/external/monomac/src/OpenGL/WindowBorder.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Text;
diff --git a/external/monomac/src/OpenGL/WindowState.cs b/external/monomac/src/OpenGL/WindowState.cs
index cac0968..7de4980 100644
--- a/external/monomac/src/OpenGL/WindowState.cs
+++ b/external/monomac/src/OpenGL/WindowState.cs
@@ -1,4 +1,4 @@
-#region --- License ---
+#region --- License ---
/* Licensed under the MIT/X11 license.
* Copyright (c) 2006-2008 the OpenTK Team.
* This notice may not be removed from any source distribution.
diff --git a/external/monomac/src/TODO b/external/monomac/src/TODO
index d96f1a1..901afb5 100644
--- a/external/monomac/src/TODO
+++ b/external/monomac/src/TODO
@@ -53,7 +53,6 @@ IsOpaque vs Opaque and other similar properties.
#import <AppKit/NSNibLoading.h>
#import <AppKit/NSSpellProtocol.h>
#import <AppKit/NSRunningApplication.h>
-#import <AppKit/NSComboBoxCell.h>
#import <AppKit/NSAttributedString.h>
#import <AppKit/NSLayoutManager.h>
// #import <AppKit/NSInputManager.h> - Deprecated with 10.6
diff --git a/external/monomac/src/appkit.cs b/external/monomac/src/appkit.cs
index 9b835f6..f2815be 100644
--- a/external/monomac/src/appkit.cs
+++ b/external/monomac/src/appkit.cs
@@ -211,7 +211,10 @@ namespace MonoMac.AppKit {
void RunAnimation (Action<NSAnimationContext> changes, NSAction completionHandler);
[Lion, Export ("timingFunction")]
- CAMediaTimingFunction TimingFunction { get; set; }
+ CAMediaTimingFunction TimingFunction { get; set; }
+
+ [MountainLion, Export ("allowsImplicitAnimation")]
+ bool AllowsImplicitAnimation { get; set; }
}
[BaseType (typeof (NSObject), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSAlertDelegate)})]
@@ -290,7 +293,7 @@ namespace MonoMac.AppKit {
[BaseType (typeof (NSResponder), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSApplicationDelegate) })]
[DisableDefaultCtor] // An uncaught exception was raised: Creating more than one Application
public interface NSApplication : NSWindowRestoration {
- [Export ("sharedApplication"), Static]
+ [Export ("sharedApplication"), Static, ThreadSafe]
NSApplication SharedApplication { get; }
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
@@ -359,7 +362,7 @@ namespace MonoMac.AppKit {
[Export ("stopModalWithCode:")]
void StopModalWithCode (int returnCode);
- [Export ("abortModal")]
+ [Export ("abortModal"), ThreadSafe]
void AbortModal ();
[Export ("modalWindow")]
@@ -519,10 +522,10 @@ namespace MonoMac.AppKit {
[Export ("orderFrontColorPanel:")]
void OrderFrontColorPanel (NSObject sender);
- [Lion, Export ("disableRelaunchOnLogin")]
+ [Lion, Export ("disableRelaunchOnLogin"), ThreadSafe]
void DisableRelaunchOnLogin ();
- [Lion, Export ("enableRelaunchOnLogin")]
+ [Lion, Export ("enableRelaunchOnLogin"), ThreadSafe]
void EnableRelaunchOnLogin ();
[Lion, Export ("enabledRemoteNotificationTypes")]
@@ -1459,7 +1462,10 @@ namespace MonoMac.AppKit {
[Static]
[Export ("cellClass")]
- Class CellClass { get; set; }
+ Class CellClass { get; }
+
+ [Export ("setCellClass:")]
+ void SetCellClass (Class factoryId);
[Export ("cellPrototype")]
NSObject CellPrototype { get; set; }
@@ -2579,6 +2585,11 @@ namespace MonoMac.AppKit {
[Export ("alternateSelectedControlTextColor")]
NSColor AlternateSelectedControlText { get; }
+ [MountainLion]
+ [Static]
+ [Export ("underPageBackgroundColor")]
+ NSColor UnderPageBackground { get; }
+
[Static]
[Export ("controlAlternatingRowBackgroundColors")]
NSColor [] ControlAlternatingRowBackgroundColors ();
@@ -2707,6 +2718,10 @@ namespace MonoMac.AppKit {
[Export ("patternImage")]
NSImage PatternImage { get; }
+ [MountainLion]
+ [Export ("CGColor")]
+ CGColor CGColor { get; }
+
[Export ("drawSwatchInRect:")]
void DrawSwatchInRect (RectangleF rect);
@@ -2983,6 +2998,7 @@ namespace MonoMac.AppKit {
[BaseType (typeof (NSTextField))]
public partial interface NSComboBox {
+
[Export ("initWithFrame:")]
IntPtr Constructor (RectangleF frameRect);
@@ -3022,7 +3038,6 @@ namespace MonoMac.AppKit {
[Export ("deselectItemAtIndex:")]
void DeselectItem (int itemIndex);
- //- (NSInteger)indexOfSelectedItem;
[Export ("indexOfSelectedItem")]
int SelectedIndex { get; }
@@ -3039,18 +3054,23 @@ namespace MonoMac.AppKit {
void Add (NSObject object1);
[Export ("addItemsWithObjectValues:")]
+ [PostGet ("Values")]
void Add (NSObject [] items);
[Export ("insertItemWithObjectValue:atIndex:")]
+ [PostGet ("Values")]
void Insert (NSObject object1, int index);
[Export ("removeItemWithObjectValue:")]
+ [PostGet ("Values")]
void Remove (NSObject object1);
[Export ("removeItemAtIndex:")]
+ [PostGet ("Values")]
void RemoveAt (int index);
[Export ("removeAllItems")]
+ [PostGet ("Values")]
void RemoveAll ();
[Export ("selectItemWithObjectValue:")]
@@ -3067,6 +3087,18 @@ namespace MonoMac.AppKit {
[Export ("objectValues")]
NSObject [] Values { get; }
+
+ [Notification, Field ("NSComboBoxSelectionDidChangeNotification")]
+ NSString SelectionDidChangeNotification { get; }
+
+ [Notification, Field ("NSComboBoxSelectionIsChangingNotification")]
+ NSString SelectionIsChangingNotification { get; }
+
+ [Notification, Field ("NSComboBoxWillDismissNotification")]
+ NSString WillDismissNotification { get; }
+
+ [Notification, Field ("NSComboBoxWillPopUpNotification")]
+ NSString WillPopUpNotification { get; }
}
[BaseType (typeof (NSObject))]
@@ -3084,6 +3116,115 @@ namespace MonoMac.AppKit {
[Export ("comboBox:indexOfItemWithStringValue:")]
int IndexOfItem (NSComboBox comboBox, string value);
}
+
+ [BaseType (typeof (NSTextFieldCell))]
+ public partial interface NSComboBoxCell {
+
+ [Export ("initWithFrame:")]
+ IntPtr Constructor (RectangleF frameRect);
+
+ [Export ("hasVerticalScroller")]
+ bool HasVerticalScroller { get; set; }
+
+ [Export ("intercellSpacing")]
+ SizeF IntercellSpacing { get; set; }
+
+ [Export ("itemHeight")]
+ float ItemHeight { get; set; }
+
+ [Export ("numberOfVisibleItems")]
+ int VisibleItems { get; set; }
+
+ [Export ("buttonBordered")]
+ bool ButtonBordered { [Bind ("isButtonBordered")] get; set; }
+
+ [Export ("reloadData")]
+ void ReloadData ();
+
+ [Export ("noteNumberOfItemsChanged")]
+ void NoteNumberOfItemsChanged ();
+
+ [Export ("usesDataSource")]
+ bool UsesDataSource { get; set; }
+
+ [Export ("scrollItemAtIndexToTop:")]
+ void ScrollItemAtIndexToTop (int scrollItemIndex);
+
+ [Export ("scrollItemAtIndexToVisible:")]
+ void ScrollItemAtIndexToVisible (int scrollItemIndex);
+
+ [Export ("selectItemAtIndex:")]
+ void SelectItem (int itemIndex);
+
+ [Export ("deselectItemAtIndex:")]
+ void DeselectItem (int itemIndex);
+
+ [Export ("indexOfSelectedItem")]
+ int SelectedIndex { get; }
+
+ [Export ("numberOfItems")]
+ int Count { get; }
+
+ [Export ("completes")]
+ bool Completes { get; set; }
+
+ [Export ("dataSource")]
+ NSComboBoxCellDataSource DataSource { get; set; }
+
+ [Export ("addItemWithObjectValue:")]
+ void Add (NSObject object1);
+
+ [Export ("addItemsWithObjectValues:")]
+ [PostGet ("Values")]
+ void Add (NSObject [] items);
+
+ [Export ("insertItemWithObjectValue:atIndex:")]
+ [PostGet ("Values")]
+ void Insert (NSObject object1, int index);
+
+ [Export ("removeItemWithObjectValue:")]
+ [PostGet ("Values")]
+ void Remove (NSObject object1);
+
+ [Export ("removeItemAtIndex:")]
+ [PostGet ("Values")]
+ void RemoveAt (int index);
+
+ [Export ("removeAllItems")]
+ [PostGet ("Values")]
+ void RemoveAll ();
+
+ [Export ("selectItemWithObjectValue:")]
+ void Select (NSObject object1);
+
+ [Export ("itemObjectValueAtIndex:")]
+ NSComboBox GetItem (int index);
+
+ [Export ("objectValueOfSelectedItem")]
+ NSObject SelectedValue { get; }
+
+ [Export ("indexOfItemWithObjectValue:")]
+ int IndexOf (NSObject object1);
+
+ [Export ("objectValues")]
+ NSObject [] Values { get; }
+ }
+
+ [BaseType (typeof (NSObject))]
+ [Model]
+ public partial interface NSComboBoxCellDataSource {
+ [Export ("comboBoxCell:objectValueForItemAtIndex:")]
+ NSObject ObjectValueForItem (NSComboBoxCell comboBox, int index);
+
+ [Export ("numberOfItemsInComboBoxCell:")]
+ int ItemCount (NSComboBoxCell comboBox);
+
+ [Export ("comboBoxCell:completedString:")]
+ string CompletedString (NSComboBoxCell comboBox, string uncompletedString);
+
+ [Export ("comboBoxCell:indexOfItemWithStringValue:")]
+ uint IndexOfItem (NSComboBoxCell comboBox, string value);
+ }
[BaseType (typeof (NSView))]
public partial interface NSControl {
@@ -3156,6 +3297,9 @@ namespace MonoMac.AppKit {
[Export ("takeIntegerValueFrom:")]
void TakeIntegerValueFrom (NSObject sender);
+ [Export ("invalidateIntrinsicContentSizeForCell:"), Lion]
+ void InvalidateIntrinsicContentSizeForCell (NSCell cell);
+
//Detected properties
[Static]
[Export ("cellClass")]
@@ -3710,9 +3854,11 @@ namespace MonoMac.AppKit {
void SetWindow (NSWindow window);
[Export ("addWindowController:")]
+ [PostGet ("WindowControllers")]
void AddWindowController (NSWindowController windowController);
[Export ("removeWindowController:")]
+ [PostGet ("WindowControllers")]
void RemoveWindowController (NSWindowController windowController);
[Export ("showWindows")]
@@ -3883,9 +4029,11 @@ namespace MonoMac.AppKit {
NSDocument DocumentForWindow (NSWindow window);
[Export ("addDocument:")]
+ [PostGet ("Documents")]
void AddDocument (NSDocument document);
[Export ("removeDocument:")]
+ [PostGet ("Documents")]
void RemoveDocument (NSDocument document);
[Export ("newDocument:")]
@@ -5385,6 +5533,7 @@ namespace MonoMac.AppKit {
}
[BaseType (typeof (NSObject))]
+ [Dispose ("__mt_items_var = null;")]
public partial interface NSMenu {
[Export ("initWithTitle:")]
IntPtr Constructor (string aTitle);
@@ -5401,27 +5550,34 @@ namespace MonoMac.AppKit {
bool PopUpMenu ([NullAllowed] NSMenuItem item, PointF location, [NullAllowed] NSView view);
[Export ("insertItem:atIndex:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
void InsertItem (NSMenuItem newItem, int index);
[Export ("addItem:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
void AddItem (NSMenuItem newItem);
[Export ("insertItemWithTitle:action:keyEquivalent:atIndex:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
NSMenuItem InsertItem (string title, [NullAllowed] Selector action, string charCode, int index);
[Export ("addItemWithTitle:action:keyEquivalent:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
NSMenuItem AddItem (string title, [NullAllowed] Selector action, string charCode);
[Export ("removeItemAtIndex:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
void RemoveItemAt (int index);
[Export ("removeItem:")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
void RemoveItem (NSMenuItem item);
[Export ("setSubmenu:forItem:")]
void SetSubmenu (NSMenu aMenu, NSMenuItem anItem);
[Export ("removeAllItems")]
+ [PostSnippet ("__mt_items_var = ItemArray();")]
void RemoveAllItems ();
[Export ("itemArray")]
@@ -6288,9 +6444,8 @@ namespace MonoMac.AppKit {
[Export ("outlineView:didDragTableColumn:")]
void DidDragTableColumn (NSOutlineView outlineView, NSTableColumn tableColumn);
- //FIXME: Binding NSRectPointer
- //[Export ("outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:")]
- //string ToolTipForCell (NSOutlineView outlineView, NSCell cell, NSRectPointer rect, NSTableColumn tableColumn, NSObject item, PointF mouseLocation);
+ [Export ("outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:")]
+ string ToolTipForCell (NSOutlineView outlineView, NSCell cell, ref RectangleF rect, NSTableColumn tableColumn, NSObject item, PointF mouseLocation);
[Export ("outlineView:heightOfRowByItem:"), NoDefaultValue]
float GetRowHeight (NSOutlineView outlineView, NSObject item);
@@ -6437,6 +6592,7 @@ namespace MonoMac.AppKit {
}
[BaseType (typeof (NSObject), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSImageDelegate)})]
+ [Dispose ("__mt_reps_var = null;")]
public partial interface NSImage {
[Static]
[Export ("imageNamed:")]
@@ -6494,12 +6650,15 @@ namespace MonoMac.AppKit {
NSImageRep [] Representations ();
[Export ("addRepresentations:")]
+ [PostSnippet ("__mt_reps_var = Representations();")]
void AddRepresentations (NSImageRep [] imageReps);
[Export ("addRepresentation:")]
+ [PostSnippet ("__mt_reps_var = Representations();")]
void AddRepresentation (NSImageRep imageRep);
[Export ("removeRepresentation:")]
+ [PostSnippet ("__mt_reps_var = Representations();")]
void RemoveRepresentation (NSImageRep imageRep);
[Export ("isValid")]
@@ -6611,6 +6770,123 @@ namespace MonoMac.AppKit {
[Obsolete ("On 10.6 and newer use DrawInRect with respectContextIsFlipped instead"), Export ("flipped")]
bool Flipped { [Bind ("isFlipped")] get; set; }
+
+ [Internal, Field ("NSImageNameQuickLookTemplate")]
+ NSString NSImageNameQuickLookTemplate { get; }
+
+ [Internal, Field ("NSImageNameBluetoothTemplate")]
+ NSString NSImageNameBluetoothTemplate { get; }
+
+ [Internal, Field ("NSImageNameIChatTheaterTemplate")]
+ NSString NSImageNameIChatTheaterTemplate { get; }
+
+ [Internal, Field ("NSImageNameSlideshowTemplate")]
+ NSString NSImageNameSlideshowTemplate { get; }
+
+ [Internal, Field ("NSImageNameActionTemplate")]
+ NSString NSImageNameActionTemplate { get; }
+
+ [Internal, Field ("NSImageNameSmartBadgeTemplate")]
+ NSString NSImageNameSmartBadgeTemplate { get; }
+
+ [Internal, Field ("NSImageNamePathTemplate")]
+ NSString NSImageNamePathTemplate { get; }
+
+ [Internal, Field ("NSImageNameInvalidDataFreestandingTemplate")]
+ NSString NSImageNameInvalidDataFreestandingTemplate { get; }
+
+ [Internal, Field ("NSImageNameLockLockedTemplate")]
+ NSString NSImageNameLockLockedTemplate { get; }
+
+ [Internal, Field ("NSImageNameLockUnlockedTemplate")]
+ NSString NSImageNameLockUnlockedTemplate { get; }
+
+ [Internal, Field ("NSImageNameGoRightTemplate")]
+ NSString NSImageNameGoRightTemplate { get; }
+
+ [Internal, Field ("NSImageNameGoLeftTemplate")]
+ NSString NSImageNameGoLeftTemplate { get; }
+
+ [Internal, Field ("NSImageNameRightFacingTriangleTemplate")]
+ NSString NSImageNameRightFacingTriangleTemplate { get; }
+
+ [Internal, Field ("NSImageNameLeftFacingTriangleTemplate")]
+ NSString NSImageNameLeftFacingTriangleTemplate { get; }
+
+ [Internal, Field ("NSImageNameAddTemplate")]
+ NSString NSImageNameAddTemplate { get; }
+
+ [Internal, Field ("NSImageNameRemoveTemplate")]
+ NSString NSImageNameRemoveTemplate { get; }
+
+ [Internal, Field ("NSImageNameRevealFreestandingTemplate")]
+ NSString NSImageNameRevealFreestandingTemplate { get; }
+
+ [Internal, Field ("NSImageNameFollowLinkFreestandingTemplate")]
+ NSString NSImageNameFollowLinkFreestandingTemplate { get; }
+
+ [Internal, Field ("NSImageNameEnterFullScreenTemplate")]
+ NSString NSImageNameEnterFullScreenTemplate { get; }
+
+ [Internal, Field ("NSImageNameExitFullScreenTemplate")]
+ NSString NSImageNameExitFullScreenTemplate { get; }
+
+ [Internal, Field ("NSImageNameStopProgressTemplate")]
+ NSString NSImageNameStopProgressTemplate { get; }
+
+ [Internal, Field ("NSImageNameStopProgressFreestandingTemplate")]
+ NSString NSImageNameStopProgressFreestandingTemplate { get; }
+
+ [Internal, Field ("NSImageNameRefreshTemplate")]
+ NSString NSImageNameRefreshTemplate { get; }
+
+ [Internal, Field ("NSImageNameRefreshFreestandingTemplate")]
+ NSString NSImageNameRefreshFreestandingTemplate { get; }
+
+ [Internal, Field ("NSImageNameFolder")]
+ NSString NSImageNameFolder { get; }
+
+ [Internal, Field ("NSImageNameTrashEmpty")]
+ NSString NSImageNameTrashEmpty { get; }
+
+ [Internal, Field ("NSImageNameTrashFull")]
+ NSString NSImageNameTrashFull { get; }
+
+ [Internal, Field ("NSImageNameHomeTemplate")]
+ NSString NSImageNameHomeTemplate { get; }
+
+ [Internal, Field ("NSImageNameBookmarksTemplate")]
+ NSString NSImageNameBookmarksTemplate { get; }
+
+ [Internal, Field ("NSImageNameCaution")]
+ NSString NSImageNameCaution { get; }
+
+ [Internal, Field ("NSImageNameStatusAvailable")]
+ NSString NSImageNameStatusAvailable { get; }
+
+ [Internal, Field ("NSImageNameStatusPartiallyAvailable")]
+ NSString NSImageNameStatusPartiallyAvailable { get; }
+
+ [Internal, Field ("NSImageNameStatusUnavailable")]
+ NSString NSImageNameStatusUnavailable { get; }
+
+ [Internal, Field ("NSImageNameStatusNone")]
+ NSString NSImageNameStatusNone { get; }
+
+ [Internal, Field ("NSImageNameApplicationIcon")]
+ NSString NSImageNameApplicationIcon { get; }
+
+ [Internal, Field ("NSImageNameMenuOnStateTemplate")]
+ NSString NSImageNameMenuOnStateTemplate { get; }
+
+ [Internal, Field ("NSImageNameMenuMixedStateTemplate")]
+ NSString NSImageNameMenuMixedStateTemplate { get; }
+
+ [Internal, Field ("NSImageNameUserGuest")]
+ NSString NSImageNameUserGuest { get; }
+
+ [Internal, Field ("NSImageNameMobileMe")]
+ NSString NSImageNameMobileMe { get; }
}
[BaseType (typeof (NSObject))]
@@ -7173,12 +7449,15 @@ namespace MonoMac.AppKit {
NSTextContainer [] TextContainers { get; }
[Export ("addTextContainer:")]
+ [PostGet ("TextContainers")]
void AddTextContainer (NSTextContainer container);
[Export ("insertTextContainer:atIndex:")]
+ [PostGet ("TextContainers")]
void InsertTextContainer (NSTextContainer container, int index);
[Export ("removeTextContainerAtIndex:")]
+ [PostGet ("TextContainers")]
void RemoveTextContainer (int index);
[Export ("textContainerChangedGeometry:")]
@@ -7535,15 +7814,18 @@ namespace MonoMac.AppKit {
}
[BaseType (typeof (NSObject))]
+ [Dispose ("__mt_accessory_var = null;")]
public interface NSPageLayout {
[Static]
[Export ("pageLayout")]
NSPageLayout PageLayout { get; }
[Export ("addAccessoryController:")]
+ [PostSnippet ("__mt_accessory_var = AccessoryControllers();")]
void AddAccessoryController (NSViewController accessoryController);
[Export ("removeAccessoryController:")]
+ [PostSnippet ("__mt_accessory_var = AccessoryControllers();")]
void RemoveAccessoryController (NSViewController accessoryController);
[Export ("accessoryControllers")]
@@ -7648,9 +7930,11 @@ namespace MonoMac.AppKit {
public interface NSMutableParagraphStyle {
[Export ("addTabStop:")]
+ [PostGet ("TabStops")]
void AddTabStop (NSTextTab anObject);
[Export ("removeTabStop:")]
+ [PostGet ("TabStops")]
void RemoveTabStop (NSTextTab anObject);
[Export ("tabStops")]
@@ -8670,15 +8954,18 @@ namespace MonoMac.AppKit {
}
[BaseType (typeof (NSObject))]
+ [Dispose ("__mt_accessory_var = null;")]
public interface NSPrintPanel {
[Static]
[Export ("printPanel")]
NSPrintPanel PrintPanel { get; }
[Export ("addAccessoryController:")]
+ [PostSnippet ("__mt_accessory_var = AccessoryControllers();")]
void AddAccessoryController (NSViewController accessoryController);
[Export ("removeAccessoryController:")]
+ [PostSnippet ("__mt_accessory_var = AccessoryControllers();")]
void RemoveAccessoryController (NSViewController accessoryController);
[Export ("accessoryControllers")]
@@ -8969,9 +9256,11 @@ namespace MonoMac.AppKit {
float RequiredThickness { get; }
[Export ("addMarker:")]
+ [PostGet ("Markers")]
void AddMarker (NSRulerMarker marker);
[Export ("removeMarker:")]
+ [PostGet ("Markers")]
void RemoveMarker (NSRulerMarker marker);
[Export ("trackMarker:withMouseEvent:")]
@@ -10374,6 +10663,7 @@ namespace MonoMac.AppKit {
}
[BaseType (typeof (NSResponder))]
+ [Dispose ("__mt_tracking_var = null;")]
public partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer, NSUserInterfaceItemIdentification {
[Export ("initWithFrame:")]
IntPtr Constructor (RectangleF frameRect);
@@ -10670,10 +10960,10 @@ namespace MonoMac.AppKit {
[Export ("makeBackingLayer")]
CALayer MakeBackingLayer ();
- [Export ("addTrackingArea:")][PostGet ("TrackingAreas ()")]
+ [Export ("addTrackingArea:")][PostSnippet ("__mt_tracking_var = TrackingAreas ();")]
void AddTrackingArea (NSTrackingArea trackingArea);
- [Export ("removeTrackingArea:")][PostGet ("TrackingAreas ()")]
+ [Export ("removeTrackingArea:")][PostSnippet ("__mt_tracking_var = TrackingAreas ();")]
void RemoveTrackingArea (NSTrackingArea trackingArea);
[Export ("trackingAreas")]
@@ -11989,13 +12279,13 @@ namespace MonoMac.AppKit {
[Export ("controlSize")]
NSControlSize ControlSize { get; set; }
- [Export ("addTabViewItem:")]
+ [Export ("addTabViewItem:")][PostGet ("Items")]
void Add (NSTabViewItem tabViewItem);
- [Export ("insertTabViewItem:atIndex:")]
+ [Export ("insertTabViewItem:atIndex:")][PostGet ("Items")]
void Insert (NSTabViewItem tabViewItem, int index);
- [Export ("removeTabViewItem:")]
+ [Export ("removeTabViewItem:")][PostGet ("Items")]
void Remove (NSTabViewItem tabViewItem);
[Export ("delegate"), NullAllowed]
@@ -12425,6 +12715,9 @@ namespace MonoMac.AppKit {
[Export ("importsGraphics")]
bool ImportsGraphics { get; set; }
+
+ [MountainLion, Export ("preferredMaxLayoutWidth")]
+ float PreferredMaxLayoutWidth { get; set; }
}
[BaseType (typeof (NSTextField))]
@@ -12643,10 +12936,10 @@ namespace MonoMac.AppKit {
[BaseType (typeof (NSMutableAttributedString), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSTextStorageDelegate)})]
public partial interface NSTextStorage {
- [Export ("addLayoutManager:")]
+ [Export ("addLayoutManager:")][PostGet ("LayoutManagers")]
void AddLayoutManager (NSLayoutManager obj);
- [Export ("removeLayoutManager:")]
+ [Export ("removeLayoutManager:")][PostGet ("LayoutManagers")]
void RemoveLayoutManager (NSLayoutManager obj);
[Export ("layoutManagers")]
@@ -13296,43 +13589,33 @@ namespace MonoMac.AppKit {
[BaseType (typeof (NSObject))]
[Model]
public interface NSTokenFieldDelegate {
- [Abstract]
[Export ("tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem:")]
string [] GetCompletionStrings (NSTokenField tokenField, string substring, int tokenIndex, int selectedIndex);
- [Abstract]
[Export ("tokenField:shouldAddObjects:atIndex:")]
NSTokenField [] ShouldAddObjects (NSTokenField tokenField, NSTokenField [] tokens, uint index);
- [Abstract]
[Export ("tokenField:displayStringForRepresentedObject:")]
string GetDisplayString (NSTokenField tokenField, NSObject representedObject);
- [Abstract]
[Export ("tokenField:editingStringForRepresentedObject:")]
string GetEditingString (NSTokenField tokenField, NSObject representedObject);
- [Abstract]
[Export ("tokenField:representedObjectForEditingString:")]
NSObject GetRepresentedObject (NSTokenField tokenField, string editingString);
- [Abstract]
[Export ("tokenField:writeRepresentedObjects:toPasteboard:")]
bool WriteRepresented (NSTokenField tokenField, NSArray objects, NSPasteboard pboard);
- [Abstract]
[Export ("tokenField:readFromPasteboard:")]
NSObject [] Read (NSTokenField tokenField, NSPasteboard pboard);
- [Abstract]
[Export ("tokenField:menuForRepresentedObject:")]
NSMenu GetMenu (NSTokenField tokenField, NSObject representedObject);
- [Abstract]
[Export ("tokenField:hasMenuForRepresentedObject:")]
bool HasMenu (NSTokenField tokenField, NSObject representedObject);
- [Abstract]
[Export ("tokenField:styleForRepresentedObject:")]
NSTokenStyle GetStyle (NSTokenField tokenField, NSObject representedObject);
@@ -13925,13 +14208,13 @@ namespace MonoMac.AppKit {
void Center ();
[Export ("makeKeyAndOrderFront:")]
- void MakeKeyAndOrderFront (NSObject sender);
+ void MakeKeyAndOrderFront ([NullAllowed] NSObject sender);
[Export ("orderFront:")]
- void OrderFront (NSObject sender);
+ void OrderFront ([NullAllowed] NSObject sender);
[Export ("orderBack:")]
- void OrderBack (NSObject sender);
+ void OrderBack ([NullAllowed] NSObject sender);
[Export ("orderOut:")]
void OrderOut ([NullAllowed] NSObject sender);
@@ -14203,10 +14486,10 @@ namespace MonoMac.AppKit {
[Export ("standardWindowButton:")]
NSButton StandardWindowButton (NSWindowButton b);
- [Export ("addChildWindow:ordered:")]
+ [Export ("addChildWindow:ordered:")][PostGet ("ChildWindows")]
void AddChildWindow (NSWindow childWin, NSWindowOrderingMode place);
- [Export ("removeChildWindow:")]
+ [Export ("removeChildWindow:")][PostGet ("ChildWindows")]
void RemoveChildWindow (NSWindow childWin);
[Export ("childWindows")]
@@ -14330,7 +14613,7 @@ namespace MonoMac.AppKit {
float BackingScaleFactor { get; }
[Lion, Export ("toggleFullScreen:")]
- void ToggleFullScreen (NSObject sender);
+ void ToggleFullScreen ([NullAllowed] NSObject sender);
//Detected properties
[Export ("animationBehavior")]
@@ -14681,7 +14964,7 @@ namespace MonoMac.AppKit {
[BaseType (typeof (NSObject))]
public interface NSWorkspace {
[Static]
- [Export ("sharedWorkspace")]
+ [Export ("sharedWorkspace"), ThreadSafe]
NSWorkspace SharedWorkspace { get; }
[Export ("notificationCenter")]
@@ -14825,7 +15108,7 @@ namespace MonoMac.AppKit {
[Export ("desktopImageOptionsForScreen:")]
NSDictionary DesktopImageOptions (NSScreen screen);
- [Export ("runningApplications")]
+ [Export ("runningApplications"), ThreadSafe]
NSRunningApplication [] RunningApplications { get; }
[Lion]
@@ -15010,7 +15293,7 @@ namespace MonoMac.AppKit {
[Export ("runningApplicationWithProcessIdentifier:")]
NSRunningApplication GetRunningApplication (int pid);
- [Static]
+ [Static][ThreadSafe]
[Export ("currentApplication")]
NSRunningApplication CurrentApplication { get ; }
diff --git a/external/monomac/src/webkit.cs b/external/monomac/src/webkit.cs
index f579b96..80786a2 100644
--- a/external/monomac/src/webkit.cs
+++ b/external/monomac/src/webkit.cs
@@ -33,7 +33,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (WebScriptObject), Name="DOMObject")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMObject init]: should never be used
- interface DomObject {
+ partial interface DomObject {
}
/////////////////////////
@@ -41,14 +41,14 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMAbstractView")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMAbstractView init]: should never be used
- interface DomAbstractView {
+ partial interface DomAbstractView {
[Export ("document")]
DomDocument Document { get; }
}
[BaseType (typeof (DomObject), Name="DOMCSSRule")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRule init]: should never be used
- interface DomCssRule {
+ partial interface DomCssRule {
[Export ("type")]
DomCssRuleType Type { get; }
@@ -64,7 +64,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMCSSRuleList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRuleList init]: should never be used
- interface DomCssRuleList {
+ partial interface DomCssRuleList {
[Export ("length")]
int Count { get; }
@@ -74,7 +74,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMCSSStyleDeclaration")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleDeclaration init]: should never be used
- interface DomCssStyleDeclaration {
+ partial interface DomCssStyleDeclaration {
[Export ("cssText")]
string CssText { get; set; }
@@ -111,7 +111,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomStyleSheet), Name="DOMCSSStyleSheet")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleSheet init]: should never be used
- interface DomCssStyleSheet {
+ partial interface DomCssStyleSheet {
[Export ("ownerRule")]
DomCssRule OwnerRule { get; }
@@ -136,7 +136,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMCSSValue")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSValue init]: should never be used
- interface DomCssValue {
+ partial interface DomCssValue {
[Export ("cssText")]
string CssText { get; set; }
@@ -146,7 +146,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMHTMLCollection")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLCollection init]: should never be used
- interface DomHtmlCollection {
+ partial interface DomHtmlCollection {
[Export ("length")]
int Count { get; }
@@ -162,7 +162,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMImplementation")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMImplementation init]: should never be used
- interface DomImplementation {
+ partial interface DomImplementation {
[Export ("hasFeature:version:")]
bool HasFeature (string feature, string version);
@@ -181,7 +181,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMMediaList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMMediaList init]: should never be used
- interface DomMediaList {
+ partial interface DomMediaList {
[Export ("mediaText")]
string MediaText { get; set; }
@@ -200,7 +200,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMNamedNodeMap")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNamedNodeMap init]: should never be used
- interface DomNamedNodeMap {
+ partial interface DomNamedNodeMap {
[Export ("length")]
int Count { get; }
@@ -228,7 +228,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMNode")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNode init]: should never be used
- interface DomNode {
+ partial interface DomNode {
[Export ("nodeName")]
string Name { get; }
@@ -343,7 +343,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMNodeList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMNodeList init]: should never be used
- interface DomNodeList {
+ partial interface DomNodeList {
[Export ("length")]
int Count { get; }
@@ -353,7 +353,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMRange")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMRange init]: should never be used
- interface DomRange {
+ partial interface DomRange {
[Export ("startContainer")]
DomNode StartContainer { get; }
@@ -447,7 +447,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMStyleSheet")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheet init]: should never be used
- interface DomStyleSheet {
+ partial interface DomStyleSheet {
[Export ("type")]
string Type { get; }
@@ -472,7 +472,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomObject), Name="DOMStyleSheetList")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheetList init]: should never be used
- interface DomStyleSheetList {
+ partial interface DomStyleSheetList {
[Export ("length")]
int Count { get; }
@@ -485,7 +485,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMAttr")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMAttr init]: should never be used
- interface DomAttr {
+ partial interface DomAttr {
[Export ("name")]
string Name { get; }
@@ -504,7 +504,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMCharacterData")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCharacterData init]: should never be used
- interface DomCharacterData {
+ partial interface DomCharacterData {
[Export ("data")]
string Data { get; set; }
@@ -529,7 +529,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMDocument")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocument init]: should never be used
- interface DomDocument {
+ partial interface DomDocument {
[Export ("doctype")]
DomDocumentType DocumentType { get; }
@@ -739,12 +739,12 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMDocumentFragment")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentFragment init]: should never be used
- interface DomDocumentFragment {
+ partial interface DomDocumentFragment {
}
[BaseType (typeof (DomNode), Name="DOMDocumentType")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentType init]: should never be used
- interface DomDocumentType {
+ partial interface DomDocumentType {
[Export ("name")]
string Name { get; }
@@ -767,7 +767,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMElement init]: should never be used
- interface DomElement {
+ partial interface DomElement {
[Export ("offsetLeft")]
int OffsetLeft { get; }
@@ -903,12 +903,12 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMEntityReference")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMEntityReference init]: should never be used
- interface DomEntityReference {
+ partial interface DomEntityReference {
}
[BaseType (typeof (DomObject), Name="DOMEvent")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMEvent init]: should never be used
- interface DomEvent {
+ partial interface DomEvent {
[Export ("type")]
string Type { get; }
@@ -951,7 +951,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject), Name="DOMEventListener")]
[Model]
- interface DomEventListener {
+ partial interface DomEventListener {
[Abstract]
[Export ("handleEvent:")]
void HandleEvent (DomEvent evt);
@@ -959,7 +959,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomNode), Name="DOMProcessingInstruction")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMProcessingInstruction init]: should never be used
- interface DomProcessingInstruction {
+ partial interface DomProcessingInstruction {
[Export ("target")]
string Target { get; }
@@ -975,7 +975,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomCharacterData), Name="DOMText")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMText init]: should never be used
- interface DomText {
+ partial interface DomText {
[Export("wholeText")]
string WholeText { get; }
@@ -988,7 +988,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomCharacterData), Name="DOMComment")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMComment init]: should never be used
- interface DomComment {
+ partial interface DomComment {
}
///////////////////////////
@@ -996,7 +996,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomText), Name="DOMCDATASection")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMCDATASection init]: should never be used
- interface DomCDataSection {
+ partial interface DomCDataSection {
}
///////////////////////////
@@ -1004,7 +1004,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomDocument), Name="DOMHTMLDocument")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLDocument init]: should never be used
- interface DomHtmlDocument {
+ partial interface DomHtmlDocument {
[Export ("embeds")]
DomHtmlCollection Embeds { get; }
@@ -1077,7 +1077,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (DomHtmlElement), Name="DOMHTMLInputElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
- interface DomHtmlInputElement {
+ partial interface DomHtmlInputElement {
[Export ("accept")]
string Accept { get; set; }
@@ -1165,10 +1165,57 @@ namespace MonoMac.WebKit {
[Export ("click")]
void Click ();
}
+
+ [BaseType (typeof (DomHtmlElement), Name="DOMHTMLTextAreaElement")]
+ [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
+ partial interface DomHtmlTextAreaElement {
+
+ [Export ("accessKey")]
+ string AccessKey { get; set; }
+
+ [Export ("cols")]
+ int Columns { get; set; }
+
+ [Export ("defaultValue")]
+ string DefaultValue { get; set; }
+
+ [Export ("disabled")]
+ bool Disabled { get; set; }
+
+// [Export ("form")]
+// DomHtmlFormElement Form { get; }
+
+ [Export ("name")]
+ string Name { get; set; }
+
+ [Export ("readOnly")]
+ bool ReadOnly { get; set; }
+
+ [Export ("rows")]
+ int Rows { get; set; }
+
+ [Export ("tabIndex")]
+ int TabIndex { get; set; }
+
+ [Export ("type")]
+ string Type { get; }
+
+ [Export ("value")]
+ string Value { get; set; }
+
+ [Export ("blur")]
+ void Blur ();
+
+ [Export ("focus")]
+ void Focus ();
+
+ [Export ("select")]
+ void Select ();
+ }
[BaseType (typeof (DomElement), Name="DOMHTMLElement")]
[DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used
- interface DomHtmlElement {
+ partial interface DomHtmlElement {
[Export ("idName")]
string IdName { get; set; }
@@ -1215,7 +1262,7 @@ namespace MonoMac.WebKit {
//////////////////////////////////////////////////////////////////
[BaseType (typeof (NSObject))]
- interface WebArchive {
+ partial interface WebArchive {
[Export ("initWithMainResource:subresources:subframeArchives:")]
IntPtr Constructor (WebResource mainResource, NSArray subresources, NSArray subframeArchives);
@@ -1236,7 +1283,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSObject))]
- interface WebBackForwardList {
+ partial interface WebBackForwardList {
[Export ("addItem:")]
void AddItem (WebHistoryItem item);
@@ -1282,7 +1329,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSObject))]
- interface WebDataSource {
+ partial interface WebDataSource {
[Export ("initWithRequest:")]
IntPtr Constructor (NSUrlRequest request);
@@ -1334,7 +1381,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[Model]
- interface WebDocumentRepresentation {
+ partial interface WebDocumentRepresentation {
[Abstract]
[Export ("setDataSource:")]
void SetDataSource (WebDataSource dataSource);
@@ -1371,7 +1418,7 @@ namespace MonoMac.WebKit {
// [BaseType (typeof (NSObject))]
// [Model]
-// interface WebDocumentView {
+// partial interface WebDocumentView {
// [Abstract]
// [Export ("setDataSource:")]
// void SetDataSource (WebDataSource dataSource);
@@ -1399,19 +1446,19 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSUrlDownload))]
- interface WebDownload {
+ partial interface WebDownload {
}
[BaseType (typeof (NSObject))]
[Model]
- interface WebDownloadDelegate {
+ partial interface WebDownloadDelegate {
[Export ("downloadWindowForAuthenticationSheet:"), DelegateName ("WebDownloadRequest"), DefaultValue (null)]
NSWindow OnDownloadWindowForSheet (WebDownload download);
}
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // invalid handle returned
- interface WebFrame {
+ partial interface WebFrame {
[Export ("initWithName:webFrameView:webView:")]
IntPtr Constructor (string name, WebFrameView view, WebView webView);
@@ -1479,7 +1526,7 @@ namespace MonoMac.WebKit {
[Model]
[BaseType (typeof (NSObject))]
- interface WebFrameLoadDelegate {
+ partial interface WebFrameLoadDelegate {
[Export ("webView:didStartProvisionalLoadForFrame:"), EventArgs ("WebFrame")]
void StartedProvisionalLoad (WebView sender, WebFrame forFrame);
@@ -1524,7 +1571,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSView))]
- interface WebFrameView {
+ partial interface WebFrameView {
[Export ("webFrame")]
WebFrame WebFrame { get; }
@@ -1550,7 +1597,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSObject))]
- interface WebHistoryItem {
+ partial interface WebHistoryItem {
[Export ("initWithURLString:title:lastVisitedTimeInterval:")]
IntPtr Constructor (string urlString, string title, double lastVisitedTimeInterval);
@@ -1580,7 +1627,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[Model]
- interface WebOpenPanelResultListener {
+ partial interface WebOpenPanelResultListener {
[Export ("chooseFilename:")]
void ChooseFilename (string filename);
@@ -1609,7 +1656,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[Model]
- interface WebPolicyDecisionListener {
+ partial interface WebPolicyDecisionListener {
[Export ("use")]
void Use ();
@@ -1621,7 +1668,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSObject))]
- interface WebPreferences {
+ partial interface WebPreferences {
[Static]
[Export ("standardPreferences")]
WebPreferences StandardPreferences { get; }
@@ -1713,7 +1760,7 @@ namespace MonoMac.WebKit {
}
[BaseType (typeof (NSObject))]
- interface WebResource {
+ partial interface WebResource {
[Export ("initWithData:URL:MIMEType:textEncodingName:frameName:")]
IntPtr Constructor (NSData data, NSUrl url, string mimeType, string textEncodingName, string frameName);
@@ -1735,7 +1782,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[Model]
- interface WebResourceLoadDelegate {
+ partial interface WebResourceLoadDelegate {
[Export ("webView:identifierForInitialRequest:fromDataSource:"), DelegateName ("WebResourceIdentifierRequest"), DefaultValue (null)]
NSObject OnIdentifierForInitialRequest (WebView sender, NSUrlRequest request, WebDataSource dataSource);
@@ -1766,7 +1813,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[Model]
- interface WebUIDelegate {
+ partial interface WebUIDelegate {
[Export ("webView:createWebViewWithRequest:"), DelegateName("CreateWebViewFromRequest"), DefaultValue (null)]
WebView UICreateWebView (WebView sender, NSUrlRequest request);
@@ -1896,7 +1943,7 @@ namespace MonoMac.WebKit {
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // crash on dispose, documented as "You can not create a WebScriptObject object directly."
- interface WebScriptObject {
+ partial interface WebScriptObject {
[Static, Export ("throwException:")]
bool ThrowException (string exceptionMessage);
@@ -1939,7 +1986,7 @@ namespace MonoMac.WebKit {
"WeakUIDelegate",
"WeakPolicyDelegate" }
)]
- interface WebView {
+ partial interface WebView {
[Static]
[Export ("canShowMIMEType:")]
bool CanShowMimeType (string MimeType);
diff --git a/external/nrefactory/.gitignore b/external/nrefactory/.gitignore
index 0031dcb..813e7d1 100644
--- a/external/nrefactory/.gitignore
+++ b/external/nrefactory/.gitignore
@@ -1,5 +1,6 @@
bin
obj
+*.suo
/lib/*.dll
/ICSharpCode.NRefactory.Tests/PartCover/*
_ReSharper*/*
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/ICSharpCode.NRefactory.CSharp.AstVerifier.csproj b/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/ICSharpCode.NRefactory.CSharp.AstVerifier.csproj
index b75da9a..9d548de 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/ICSharpCode.NRefactory.CSharp.AstVerifier.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/ICSharpCode.NRefactory.CSharp.AstVerifier.csproj
@@ -14,7 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
+ <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -23,7 +23,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
+ <OutputPath>bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
@@ -32,21 +32,21 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
+ <OutputPath>bin\net_4_5_Debug\</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
+ <OutputPath>bin\net_4_5_Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/Main.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/Main.cs
index 54ac57b..9fa2877 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/Main.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp.AstVerifier/Main.cs
@@ -56,13 +56,13 @@ namespace ICSharpCode.NRefactory.CSharp.AstVerifier
int failed = 0, passed = 0;
Console.WriteLine ("search in " + directory);
foreach (var file in Directory.GetFileSystemEntries (directory, "*", SearchOption.AllDirectories)) {
- if (!file.EndsWith (".cs"))
+ if (!file.EndsWith (".cs", StringComparison.Ordinal))
continue;
string text = File.ReadAllText (file);
var unit = SyntaxTree.Parse (text, file);
if (unit == null)
continue;
- string generated = unit.GetText ();
+ string generated = unit.ToString ();
int i, j;
if (!IsMatch (text, generated, out i, out j)) {
if (i > 0 && j > 0 && verboseOutput) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/AbiComparer.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/AbiComparer.cs
deleted file mode 100644
index f00d9a0..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/AbiComparer.cs
+++ /dev/null
@@ -1,248 +0,0 @@
-//
-// ABIComparer.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- /// <summary>
- /// Used to check the compatibility state of two compilations.
- /// </summary>
- public enum AbiCompatibility
- {
- /// <summary>
- /// The ABI is equal
- /// </summary>
- Equal,
-
- /// <summary>
- /// Some items got added, but the ABI remains to be compatible
- /// </summary>
- Bigger,
-
- /// <summary>
- /// The ABI has changed
- /// </summary>
- Incompatible
- }
-
- [Serializable]
- public sealed class AbiEventArgs : EventArgs
- {
- public string Message { get; set; }
-
- public AbiEventArgs(string message)
- {
- this.Message = message;
- }
- }
-
- /// <summary>
- /// The Abi comparer checks the public API of two compilation and determines the compatibility state.
- /// </summary>
- public class AbiComparer
- {
- public bool StopOnIncompatibility {
- get;
- set;
- }
- void CheckContstraints(IType otype, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
- {
- if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
- p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
- p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
- p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
- OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of type {0} have changed."), otype.FullName)));
- compatibility = AbiCompatibility.Incompatible;
- }
- }
-
- void CheckContstraints(IMethod omethod, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
- {
- if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
- p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
- p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
- p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
- OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of method {0} have changed."), omethod.FullName)));
- compatibility = AbiCompatibility.Incompatible;
- }
- }
-
- void CheckTypes (ITypeDefinition oType, ITypeDefinition nType, ref AbiCompatibility compatibility)
- {
- int oldMemberCount = 0;
- Predicate<IUnresolvedMember> pred = null;
- if (oType.Kind == TypeKind.Class || oType.Kind == TypeKind.Struct)
- pred = m => (m.IsPublic || m.IsProtected) && !m.IsOverride && !m.IsSynthetic;
-
- for (int i = 0; i < oType.TypeParameterCount; i++) {
- CheckContstraints (oType, oType.TypeParameters[i], nType.TypeParameters[i], ref compatibility);
- if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
- return;
- }
-
- foreach (var member in oType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers)) {
- var newMember = nType.GetMembers (m => member.UnresolvedMember.Name == m.Name && m.IsPublic == member.IsPublic && m.IsProtected == member.IsProtected);
- var equalMember = newMember.FirstOrDefault (m => SignatureComparer.Ordinal.Equals (member, m));
- if (equalMember == null) {
- compatibility = AbiCompatibility.Incompatible;
- if (StopOnIncompatibility)
- return;
- continue;
- }
- var om = member as IMethod;
- if (om != null) {
- for (int i = 0; i < om.TypeParameters.Count; i++) {
- CheckContstraints (om, om.TypeParameters[i], ((IMethod)equalMember).TypeParameters[i], ref compatibility);
- if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
- return;
- }
- }
-
- oldMemberCount++;
- }
- if (compatibility == AbiCompatibility.Bigger && oType.Kind != TypeKind.Interface)
- return;
- if (oldMemberCount != nType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers).Count ()) {
- if (oType.Kind == TypeKind.Interface) {
- OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Interafce {0} has changed."), oType.FullName)));
- compatibility = AbiCompatibility.Incompatible;
- } else {
- if (compatibility == AbiCompatibility.Equal)
- compatibility = AbiCompatibility.Bigger;
- }
- }
- }
-
- void CheckNamespace(INamespace oNs, INamespace nNs, ref AbiCompatibility compatibility)
- {
- foreach (var type in oNs.Types) {
- if (!type.IsPublic && !type.IsProtected)
- continue;
- var newType = nNs.GetTypeDefinition (type.Name, type.TypeParameterCount);
- if (newType == null) {
- OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type definition {0} is missing."), type.FullName)));
- compatibility = AbiCompatibility.Incompatible;
- if (StopOnIncompatibility)
- return;
- continue;
- }
- CheckTypes (type, newType, ref compatibility);
- if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
- return;
- }
-
- if (compatibility == AbiCompatibility.Bigger)
- return;
- foreach (var type in nNs.Types) {
- if (!type.IsPublic && !type.IsProtected)
- continue;
- if (oNs.GetTypeDefinition (type.Name, type.TypeParameterCount) == null) {
- if (compatibility == AbiCompatibility.Equal)
- compatibility = AbiCompatibility.Bigger;
- return;
- }
- }
- }
-
- static bool ContainsPublicTypes(INamespace testNs)
- {
- var stack = new Stack<INamespace> ();
- stack.Push (testNs);
- while (stack.Count > 0) {
- var ns = stack.Pop ();
- if (ns.Types.Any (t => t.IsPublic))
- return true;
- foreach (var child in ns.ChildNamespaces)
- stack.Push (child);
- }
- return false;
- }
-
- /// <summary>
- /// Check the specified oldProject and newProject if they're compatible.
- /// </summary>
- /// <param name="oldProject">Old project.</param>
- /// <param name="newProject">New project.</param>
- public AbiCompatibility Check (ICompilation oldProject, ICompilation newProject)
- {
- var oldStack = new Stack<INamespace> ();
- var newStack = new Stack<INamespace> ();
- oldStack.Push (oldProject.MainAssembly.RootNamespace);
- newStack.Push (newProject.MainAssembly.RootNamespace);
-
- AbiCompatibility compatibility = AbiCompatibility.Equal;
- while (oldStack.Count > 0) {
- var oNs = oldStack.Pop ();
- var nNs = newStack.Pop ();
-
- CheckNamespace (oNs, nNs, ref compatibility);
- if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
- return AbiCompatibility.Incompatible;
- foreach (var child in oNs.ChildNamespaces) {
- var newChild = nNs.GetChildNamespace (child.Name);
- if (newChild == null) {
- OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Namespace {0} is missing."), child.FullName)));
- if (StopOnIncompatibility)
- return AbiCompatibility.Incompatible;
- continue;
- }
- oldStack.Push (child);
- newStack.Push (newChild);
- }
-
- // check if namespaces are added
- if (compatibility != AbiCompatibility.Bigger) {
- foreach (var child in nNs.ChildNamespaces) {
- if (oNs.GetChildNamespace (child.Name) == null) {
- if (compatibility == AbiCompatibility.Equal && ContainsPublicTypes (child))
- compatibility = AbiCompatibility.Bigger;
- break;
- }
- }
- }
- }
- return compatibility;
- }
-
- public virtual string TranslateString(string str)
- {
- return str;
- }
-
- public event EventHandler<AbiEventArgs> IncompatibilityFound;
-
- protected virtual void OnIncompatibilityFound(AbiEventArgs e)
- {
- var handler = IncompatibilityFound;
- if (handler != null)
- handler(this, e);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
index d52f696..2d3895b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
@@ -361,8 +361,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
protected override ControlFlowNode VisitChildren(AstNode node, ControlFlowNode data)
{
- // We have overrides for all possible expressions and should visit expressions only.
- throw new NotImplementedException();
+ // We have overrides for all possible statements and should visit statements only.
+ throw new NotSupportedException();
}
public override ControlFlowNode VisitBlockStatement(BlockStatement blockStatement, ControlFlowNode data)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
index c6fc1c0..96392a5 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
@@ -24,6 +24,7 @@ using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.TypeSystem;
using System.Threading;
+using ICSharpCode.NRefactory.CSharp.Completion;
namespace ICSharpCode.NRefactory.CSharp.Analysis
{
@@ -77,7 +78,10 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
/// Used for inactive code (excluded by preprocessor or ConditionalAttribute)
/// </summary>
protected TColor inactiveCodeColor;
-
+
+ protected TColor stringFormatItemColor;
+
+
protected TColor syntaxErrorColor;
protected TextLocation regionStart;
@@ -260,18 +264,53 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
Colorize(memberNameToken, rr);
VisitChildrenAfter(memberReferenceExpression, memberNameToken);
}
-
+
+ void HighlightStringFormatItems(PrimitiveExpression expr)
+ {
+ if (!(expr.Value is string))
+ return;
+ int line = expr.StartLocation.Line;
+ int col = expr.StartLocation.Column;
+ TextLocation start = TextLocation.Empty;
+ for (int i = 0; i < expr.LiteralValue.Length; i++) {
+ char ch = expr.LiteralValue [i];
+
+ if (NewLine.GetDelimiterType(ch, i + 1 < expr.LiteralValue.Length ? expr.LiteralValue [i + 1] : '\0') != UnicodeNewline.Unknown) {
+ line++;
+ col = 1;
+ continue;
+ }
+
+ if (ch == '{' && start.IsEmpty)
+ start = new TextLocation(line, col);
+ col++;
+ if (ch == '}' &&!start.IsEmpty) {
+ Colorize(start, new TextLocation(line, col), stringFormatItemColor);
+ start = TextLocation.Empty;
+ }
+ }
+
+ }
+
public override void VisitInvocationExpression(InvocationExpression invocationExpression)
{
Expression target = invocationExpression.Target;
if (target is IdentifierExpression || target is MemberReferenceExpression || target is PointerReferenceExpression) {
var invocationRR = resolver.Resolve(invocationExpression, cancellationToken) as CSharpInvocationResolveResult;
- if (invocationRR != null && invocationExpression.Parent is ExpressionStatement && IsInactiveConditionalMethod(invocationRR.Member)) {
- // mark the whole invocation statement as inactive code
- Colorize(invocationExpression.Parent, inactiveCodeColor);
- return;
+ if (invocationRR != null) {
+ if (invocationExpression.Parent is ExpressionStatement && IsInactiveConditionalMethod(invocationRR.Member)) {
+ // mark the whole invocation statement as inactive code
+ Colorize(invocationExpression.Parent, inactiveCodeColor);
+ return;
+ }
+
+ if (invocationRR.Arguments.Count > 1 && CSharpCompletionEngine.FormatItemMethods.Contains(invocationRR.Member.FullName)) {
+ var expr = invocationExpression.Arguments.First() as PrimitiveExpression;
+ if (expr != null)
+ HighlightStringFormatItems(expr);
+ }
}
-
+
VisitChildrenUntil(invocationExpression, target);
// highlight the method call
@@ -293,7 +332,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
#region IsInactiveConditional helper methods
bool IsInactiveConditionalMethod(IParameterizedMember member)
{
- if (member.EntityType != EntityType.Method || member.ReturnType.Kind != TypeKind.Void)
+ if (member.SymbolKind != SymbolKind.Method || member.ReturnType.Kind != TypeKind.Void)
return false;
while (member.IsOverride) {
member = (IParameterizedMember)InheritanceHelper.GetBaseMember(member);
@@ -461,21 +500,21 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
bool TryGetMemberColor(IMember member, out TColor color)
{
- switch (member.EntityType) {
- case EntityType.Field:
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
color = fieldAccessColor;
return true;
- case EntityType.Property:
+ case SymbolKind.Property:
color = propertyAccessColor;
return true;
- case EntityType.Event:
+ case SymbolKind.Event:
color = eventAccessColor;
return true;
- case EntityType.Method:
+ case SymbolKind.Method:
color = methodCallColor;
return true;
- case EntityType.Constructor:
- case EntityType.Destructor:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
return TryGetTypeHighlighting (member.DeclaringType.Kind, out color);
default:
color = default (TColor);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
index 114cb78..7066f63 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
@@ -230,6 +230,10 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
+ internal uint RoleIndex {
+ get { return flags & roleIndexMask; }
+ }
+
void SetRole(Role role)
{
flags = (flags & ~roleIndexMask) | role.Index;
@@ -293,31 +297,67 @@ namespace ICSharpCode.NRefactory.CSharp
}
/// <summary>
- /// Gets all descendants of this node (excluding this node itself).
+ /// Gets all descendants of this node (excluding this node itself) in pre-order.
/// </summary>
public IEnumerable<AstNode> Descendants {
- get { return GetDescendants(false); }
+ get { return GetDescendantsImpl(false); }
}
/// <summary>
- /// Gets all descendants of this node (including this node itself).
+ /// Gets all descendants of this node (including this node itself) in pre-order.
/// </summary>
public IEnumerable<AstNode> DescendantsAndSelf {
- get { return GetDescendants(true); }
+ get { return GetDescendantsImpl(true); }
}
-
- IEnumerable<AstNode> GetDescendants(bool includeSelf)
+
+ static bool IsInsideRegion(DomRegion region, AstNode pos)
+ {
+ if (region.IsEmpty)
+ return true;
+ var nodeRegion = pos.Region;
+ return region.IntersectsWith(nodeRegion) || region.OverlapsWith(nodeRegion);
+ }
+
+ public IEnumerable<AstNode> DescendantNodes (Func<AstNode, bool> descendIntoChildren = null)
+ {
+ return GetDescendantsImpl(false, new DomRegion (), descendIntoChildren);
+ }
+
+ public IEnumerable<AstNode> DescendantNodes (DomRegion region, Func<AstNode, bool> descendIntoChildren = null)
+ {
+ return GetDescendantsImpl(false, region, descendIntoChildren);
+ }
+
+ public IEnumerable<AstNode> DescendantNodesAndSelf (Func<AstNode, bool> descendIntoChildren = null)
+ {
+ return GetDescendantsImpl(true, new DomRegion (), descendIntoChildren);
+ }
+
+ public IEnumerable<AstNode> DescendantNodesAndSelf (DomRegion region, Func<AstNode, bool> descendIntoChildren = null)
{
- if (includeSelf)
- yield return this;
+ return GetDescendantsImpl(true, region, descendIntoChildren);
+ }
+
+ IEnumerable<AstNode> GetDescendantsImpl(bool includeSelf, DomRegion region = new DomRegion (), Func<AstNode, bool> descendIntoChildren = null)
+ {
+ if (includeSelf) {
+ if (IsInsideRegion (region, this))
+ yield return this;
+ if (descendIntoChildren != null && !descendIntoChildren(this))
+ yield break;
+ }
+
Stack<AstNode> nextStack = new Stack<AstNode>();
nextStack.Push(null);
AstNode pos = firstChild;
while (pos != null) {
+ // Remember next before yielding pos.
+ // This allows removing/replacing nodes while iterating through the list.
if (pos.nextSibling != null)
nextStack.Push(pos.nextSibling);
- yield return pos;
- if (pos.firstChild != null)
+ if (IsInsideRegion(region, pos))
+ yield return pos;
+ if (pos.firstChild != null && (descendIntoChildren == null || descendIntoChildren(pos)))
pos = pos.firstChild;
else
pos = nextStack.Pop();
@@ -412,7 +452,7 @@ namespace ICSharpCode.NRefactory.CSharp
InsertChildBeforeUnsafe (nextSibling, child, role);
}
- void InsertChildBeforeUnsafe (AstNode nextSibling, AstNode child, Role role)
+ internal void InsertChildBeforeUnsafe (AstNode nextSibling, AstNode child, Role role)
{
child.parent = this;
child.SetRole(role);
@@ -958,7 +998,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
if (IsNull)
return "Null";
- string text = GetText();
+ string text = ToString();
text = text.TrimEnd().Replace("\t", "").Replace(Environment.NewLine, " ");
if (text.Length > 100)
return text.Substring(0, 97) + "...";
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
index 1a074d3..32d08b2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
@@ -50,8 +50,9 @@ namespace ICSharpCode.NRefactory.CSharp
public int Count {
get {
int count = 0;
+ uint roleIndex = role.Index;
for (AstNode cur = node.FirstChild; cur != null; cur = cur.NextSibling) {
- if (cur.Role == role)
+ if (cur.RoleIndex == roleIndex)
count++;
}
return count;
@@ -107,7 +108,7 @@ namespace ICSharpCode.NRefactory.CSharp
public bool Contains(T element)
{
- return element != null && element.Parent == node && element.Role == role;
+ return element != null && element.Parent == node && element.RoleIndex == role.Index;
}
public bool Remove(T element)
@@ -163,13 +164,14 @@ namespace ICSharpCode.NRefactory.CSharp
public IEnumerator<T> GetEnumerator()
{
+ uint roleIndex = role.Index;
AstNode next;
for (AstNode cur = node.FirstChild; cur != null; cur = next) {
Debug.Assert(cur.Parent == node);
// Remember next before yielding cur.
// This allows removing/replacing nodes while iterating through the list.
next = cur.NextSibling;
- if (cur.Role == role)
+ if (cur.RoleIndex == roleIndex)
yield return (T)cur;
}
}
@@ -214,13 +216,14 @@ namespace ICSharpCode.NRefactory.CSharp
/// </summary>
public void AcceptVisitor(IAstVisitor visitor)
{
+ uint roleIndex = role.Index;
AstNode next;
for (AstNode cur = node.FirstChild; cur != null; cur = next) {
Debug.Assert(cur.Parent == node);
// Remember next before yielding cur.
// This allows removing/replacing nodes while iterating through the list.
next = cur.NextSibling;
- if (cur.Role == role)
+ if (cur.RoleIndex == roleIndex)
cur.AcceptVisitor(visitor);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
index 3ffe410..e120d0c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
@@ -126,6 +126,15 @@ namespace ICSharpCode.NRefactory.CSharp
}
/// <summary>
+ /// Gets whether this type is a SimpleType "var".
+ /// </summary>
+ public bool IsVar()
+ {
+ SimpleType st = this as SimpleType;
+ return st != null && st.Identifier == "var" && st.TypeArguments.Count == 0;
+ }
+
+ /// <summary>
/// Create an ITypeReference for this AstType.
/// Uses the context (ancestors of this node) to determine the correct <see cref="NameLookupMode"/>.
/// </summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs
index 81982ca..bb1c7c0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs
@@ -613,12 +613,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
VisitChildren (namedExpression);
}
-
- public virtual void VisitEmptyExpression (EmptyExpression emptyExpression)
- {
- VisitChildren (emptyExpression);
- }
-
+
public virtual void VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern)
{
VisitChildren (placeholder);
@@ -1212,11 +1207,6 @@ namespace ICSharpCode.NRefactory.CSharp
return VisitChildren (namedExpression);
}
- public virtual T VisitEmptyExpression (EmptyExpression emptyExpression)
- {
- return VisitChildren (emptyExpression);
- }
-
public virtual T VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern)
{
return VisitChildren (placeholder);
@@ -1810,11 +1800,6 @@ namespace ICSharpCode.NRefactory.CSharp
return VisitChildren (namedExpression, data);
}
- public virtual S VisitEmptyExpression (EmptyExpression emptyExpression, T data)
- {
- return VisitChildren (emptyExpression, data);
- }
-
public virtual S VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern, T data)
{
return VisitChildren (placeholder, data);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DocumentationReference.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DocumentationReference.cs
index 8d677c1..633f921 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DocumentationReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DocumentationReference.cs
@@ -29,29 +29,29 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly Role<AstType> DeclaringTypeRole = new Role<AstType>("DeclaringType", AstType.Null);
public static readonly Role<AstType> ConversionOperatorReturnTypeRole = new Role<AstType>("ConversionOperatorReturnType", AstType.Null);
- EntityType entityType;
+ SymbolKind symbolKind;
OperatorType operatorType;
bool hasParameterList;
/// <summary>
/// Gets/Sets the entity type.
/// Possible values are:
- /// <c>EntityType.Operator</c> for operators,
- /// <c>EntityType.Indexer</c> for indexers,
- /// <c>EntityType.TypeDefinition</c> for references to primitive types,
- /// and <c>EntityType.None</c> for everything else.
+ /// <c>SymbolKind.Operator</c> for operators,
+ /// <c>SymbolKind.Indexer</c> for indexers,
+ /// <c>SymbolKind.TypeDefinition</c> for references to primitive types,
+ /// and <c>SymbolKind.None</c> for everything else.
/// </summary>
- public EntityType EntityType {
- get { return entityType; }
+ public SymbolKind SymbolKind {
+ get { return symbolKind; }
set {
ThrowIfFrozen();
- entityType = value;
+ symbolKind = value;
}
}
/// <summary>
/// Gets/Sets the operator type.
- /// This property is only used when EntityType==Operator.
+ /// This property is only used when SymbolKind==Operator.
/// </summary>
public OperatorType OperatorType {
get { return operatorType; }
@@ -86,7 +86,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// <summary>
/// Gets/sets the member name.
- /// This property is only used when EntityType==None.
+ /// This property is only used when SymbolKind==None.
/// </summary>
public string MemberName {
get { return GetChildByRole(Roles.Identifier).Name; }
@@ -95,7 +95,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// <summary>
/// Gets/Sets the return type of conversion operators.
- /// This property is only used when EntityType==Operator and OperatorType is explicit or implicit.
+ /// This property is only used when SymbolKind==Operator and OperatorType is explicit or implicit.
/// </summary>
public AstType ConversionOperatorReturnType {
get { return GetChildByRole(ConversionOperatorReturnTypeRole); }
@@ -113,16 +113,16 @@ namespace ICSharpCode.NRefactory.CSharp
protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
{
DocumentationReference o = other as DocumentationReference;
- if (!(o != null && this.EntityType == o.EntityType && this.HasParameterList == o.HasParameterList))
+ if (!(o != null && this.SymbolKind == o.SymbolKind && this.HasParameterList == o.HasParameterList))
return false;
- if (this.EntityType == EntityType.Operator) {
+ if (this.SymbolKind == SymbolKind.Operator) {
if (this.OperatorType != o.OperatorType)
return false;
if (this.OperatorType == OperatorType.Implicit || this.OperatorType == OperatorType.Explicit) {
if (!this.ConversionOperatorReturnType.DoMatch(o.ConversionOperatorReturnType, match))
return false;
}
- } else if (this.EntityType == EntityType.None) {
+ } else if (this.SymbolKind == SymbolKind.None) {
if (!MatchString(this.MemberName, o.MemberName))
return false;
if (!this.TypeArguments.DoMatch(o.TypeArguments, match))
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs
deleted file mode 100644
index 7dc5da7..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// EmptyExpression.cs
-//
-// Author:
-// Mike Krüger <mkrueger at novell.com>
-//
-// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- /// <summary>
- /// Type<[EMPTY]>
- /// </summary>
- public class EmptyExpression : Expression
- {
- TextLocation location;
-
- public override TextLocation StartLocation {
- get {
- return location;
- }
- }
-
- public override TextLocation EndLocation {
- get {
- return location;
- }
- }
-
- public EmptyExpression ()
- {
- }
-
- public EmptyExpression (TextLocation location)
- {
- this.location = location;
- }
-
- public override void AcceptVisitor (IAstVisitor visitor)
- {
- visitor.VisitEmptyExpression (this);
- }
-
- public override T AcceptVisitor<T> (IAstVisitor<T> visitor)
- {
- return visitor.VisitEmptyExpression (this);
- }
-
- public override S AcceptVisitor<T, S> (IAstVisitor<T, S> visitor, T data)
- {
- return visitor.VisitEmptyExpression (this, data);
- }
-
- protected internal override bool DoMatch (AstNode other, PatternMatching.Match match)
- {
- var o = other as EmptyExpression;
- return o != null;
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ErrorExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ErrorExpression.cs
index bd6506c..1632044 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ErrorExpression.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ErrorExpression.cs
@@ -27,6 +27,42 @@ using System;
namespace ICSharpCode.NRefactory.CSharp
{
+ [Obsolete("This class is obsolete. Remove all referencing code.")]
+ public class EmptyExpression : AstNode
+ {
+ #region implemented abstract members of AstNode
+
+ public override void AcceptVisitor(IAstVisitor visitor)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override T AcceptVisitor<T>(IAstVisitor<T> visitor)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
+ {
+ throw new NotImplementedException();
+ }
+
+ protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override NodeType NodeType {
+ get {
+ throw new NotImplementedException();
+ }
+ }
+
+ #endregion
+
+
+ }
+
public class ErrorExpression : Expression
{
TextLocation location;
@@ -43,6 +79,11 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
+ public string Error {
+ get;
+ private set;
+ }
+
public ErrorExpression ()
{
}
@@ -51,7 +92,18 @@ namespace ICSharpCode.NRefactory.CSharp
{
this.location = location;
}
-
+
+ public ErrorExpression (string error)
+ {
+ this.Error = error;
+ }
+
+ public ErrorExpression (string error, TextLocation location)
+ {
+ this.location = location;
+ this.Error = error;
+ }
+
public override void AcceptVisitor (IAstVisitor visitor)
{
// nothing
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs
index 514bd9b..e9e9ea6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs
@@ -116,19 +116,19 @@ namespace ICSharpCode.NRefactory.CSharp
char* p = start;
char* endPtr = start + str.Length;
while (p < endPtr) {
- switch (*p) {
- case '\r':
- char* nextp = p + 1;
- if (nextp < endPtr && *nextp == '\n')
- p++;
- goto case '\n';
- case '\n':
- line++;
- col = 1;
- break;
- default:
- col++;
- break;
+ var nl = NewLine.GetDelimiterLength(*p, () => {
+ char* nextp = p + 1;
+ if (nextp < endPtr)
+ return *nextp;
+ return '\0';
+ });
+ if (nl > 0) {
+ line++;
+ col = 1;
+ if (nl == 2)
+ p++;
+ } else {
+ col++;
}
p++;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs
index 70d1787..878d613 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs
@@ -62,9 +62,10 @@ namespace ICSharpCode.NRefactory.CSharp
public CSharpTokenNode OperatorToken {
get { return GetChildByRole (GetOperatorRole (Operator)); }
}
-
+
+ static Expression NoUnaryExpressionError = new ErrorExpression ("No unary expression");
public Expression Expression {
- get { return GetChildByRole (Roles.Expression); }
+ get { return GetChildByRole (Roles.Expression) ?? NoUnaryExpressionError; }
set { SetChildByRole (Roles.Expression, value); }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs
index 5a3b898..cc99936 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs
@@ -43,11 +43,19 @@ namespace ICSharpCode.NRefactory.CSharp
get { return GetChildByRole (Roles.Type); }
set { SetChildByRole (Roles.Type, value); }
}
-
+
+ public CSharpTokenNode LParToken {
+ get { return GetChildByRole (Roles.LPar); }
+ }
+
public AstNodeCollection<Expression> Arguments {
get { return base.GetChildrenByRole (Roles.Argument); }
}
-
+
+ public CSharpTokenNode RParToken {
+ get { return GetChildByRole (Roles.RPar); }
+ }
+
// HasArgumentList == false: [Empty]
public bool HasArgumentList {
get;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs
index 088afa9..68489bc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs
@@ -37,8 +37,8 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.TypeDeclaration; }
}
- public override EntityType EntityType {
- get { return EntityType.TypeDefinition; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.TypeDefinition; }
}
public CSharpTokenNode DelegateToken {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs
index a374f49..e9ac9ed 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs
@@ -36,7 +36,8 @@ namespace ICSharpCode.NRefactory.CSharp
public class NamespaceDeclaration : AstNode
{
public static readonly Role<AstNode> MemberRole = SyntaxTree.MemberRole;
-
+ public static readonly Role<AstType> NamespaceNameRole = new Role<AstType> ("NamespaceName");
+
public override NodeType NodeType {
get {
return NodeType.Unknown;
@@ -46,26 +47,21 @@ namespace ICSharpCode.NRefactory.CSharp
public CSharpTokenNode NamespaceToken {
get { return GetChildByRole (Roles.NamespaceKeyword); }
}
-
+
+ public AstType NamespaceName {
+ get { return GetChildByRole (NamespaceNameRole) ?? AstType.Null; }
+ set { SetChildByRole(NamespaceNameRole, value); }
+ }
+
public string Name {
get {
- StringBuilder builder = new StringBuilder ();
- foreach (Identifier identifier in GetChildrenByRole (Roles.Identifier)) {
- if (builder.Length > 0)
- builder.Append ('.');
- builder.Append (identifier.Name);
- }
- return builder.ToString ();
+ return NamespaceName.ToString ();
}
set {
- GetChildrenByRole(Roles.Identifier).ReplaceWith(value.Split('.').Select(ident => Identifier.Create (ident)));
+
}
}
-
- public AstNodeCollection<Identifier> Identifiers {
- get { return GetChildrenByRole (Roles.Identifier); }
- }
-
+
/// <summary>
/// Gets the full namespace name (including any parent namespaces)
/// </summary>
@@ -77,6 +73,21 @@ namespace ICSharpCode.NRefactory.CSharp
return Name;
}
}
+
+ public IEnumerable<string> Identifiers {
+ get {
+ var result = new Stack<string>();
+ AstType type = NamespaceName;
+ while (type is MemberType) {
+ var mt = (MemberType)type;
+ result.Push(mt.MemberName);
+ type = mt.Target;
+ }
+ if (type is SimpleType)
+ result.Push(((SimpleType)type).Identifier);
+ return result;
+ }
+ }
public CSharpTokenNode LBraceToken {
get { return GetChildByRole (Roles.LBrace); }
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs
index 5eb1486..6b892c9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NewLineNode.cs
@@ -1,11 +1,6 @@
using System;
namespace ICSharpCode.NRefactory.CSharp
{
- public enum NewLineType {
- Unix,
- Windows,
- Mac
- }
/// <summary>
/// A New line node represents a line break in the text.
@@ -18,7 +13,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public abstract NewLineType NewLineType {
+ public abstract UnicodeNewline NewLineType {
get;
}
@@ -44,6 +39,11 @@ namespace ICSharpCode.NRefactory.CSharp
this.startLocation = startLocation;
}
+ public sealed override string ToString(CSharpFormattingOptions formattingOptions)
+ {
+ return NewLine.GetString (NewLineType);
+ }
+
public override void AcceptVisitor(IAstVisitor visitor)
{
visitor.VisitNewLine (this);
@@ -60,11 +60,11 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public class UnixNewLine : NewLineNode
+ class UnixNewLine : NewLineNode
{
- public override NewLineType NewLineType {
+ public override UnicodeNewline NewLineType {
get {
- return NewLineType.Unix;
+ return UnicodeNewline.LF;
}
}
@@ -76,11 +76,6 @@ namespace ICSharpCode.NRefactory.CSharp
{
}
- public override string ToString(CSharpFormattingOptions formattingOptions)
- {
- return "\n";
- }
-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
var o = other as UnixNewLine;
@@ -88,11 +83,11 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public class WindowsNewLine : NewLineNode
+ class WindowsNewLine : NewLineNode
{
- public override NewLineType NewLineType {
+ public override UnicodeNewline NewLineType {
get {
- return NewLineType.Windows;
+ return UnicodeNewline.CRLF;
}
}
@@ -104,11 +99,6 @@ namespace ICSharpCode.NRefactory.CSharp
{
}
- public override string ToString(CSharpFormattingOptions formattingOptions)
- {
- return "\r\n";
- }
-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
var o = other as WindowsNewLine;
@@ -116,11 +106,11 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public class MacNewLine : NewLineNode
+ class MacNewLine : NewLineNode
{
- public override NewLineType NewLineType {
+ public override UnicodeNewline NewLineType {
get {
- return NewLineType.Mac;
+ return UnicodeNewline.CR;
}
}
@@ -132,11 +122,6 @@ namespace ICSharpCode.NRefactory.CSharp
{
}
- public override string ToString(CSharpFormattingOptions formattingOptions)
- {
- return "\r";
- }
-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
var o = other as MacNewLine;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/PreProcessorDirective.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/PreProcessorDirective.cs
index b630087..60496f6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/PreProcessorDirective.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/PreProcessorDirective.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using System.Collections.Generic;
namespace ICSharpCode.NRefactory.CSharp
{
@@ -45,6 +46,60 @@ namespace ICSharpCode.NRefactory.CSharp
Pragma = 11,
Line = 12
}
+
+ public class LinePreprocssorDirective : PreProcessorDirective
+ {
+ public int LineNumber {
+ get;
+ set;
+ }
+
+ public string FileName {
+ get;
+ set;
+ }
+
+ public LinePreprocssorDirective(TextLocation startLocation, TextLocation endLocation) : base (PreProcessorDirectiveType.Line, startLocation, endLocation)
+ {
+ }
+
+ public LinePreprocssorDirective(string argument = null) : base (PreProcessorDirectiveType.Line, argument)
+ {
+ }
+ }
+
+ public class PragmaWarningPreprocssorDirective : PreProcessorDirective
+ {
+ public bool Disable {
+ get;
+ set;
+ }
+
+ List<int> warningList = new List<int> ();
+ public IList<int> WarningList {
+ get {
+ return warningList;
+ }
+ }
+
+ public PragmaWarningPreprocssorDirective(TextLocation startLocation, TextLocation endLocation) : base (PreProcessorDirectiveType.Pragma, startLocation, endLocation)
+ {
+ }
+
+ public PragmaWarningPreprocssorDirective(string argument = null) : base (PreProcessorDirectiveType.Pragma, argument)
+ {
+ }
+
+ public void AddWarnings(IEnumerable<int> warningCodes)
+ {
+ warningList.AddRange(warningCodes);
+ }
+
+ public void AddWarnings(params int[] warningCodes)
+ {
+ warningList.AddRange(warningCodes);
+ }
+ }
public class PreProcessorDirective : AstNode
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs
index d4ac6ea..1aba4f3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs
@@ -47,8 +47,8 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.TypeDeclaration; }
}
- public override EntityType EntityType {
- get { return EntityType.TypeDefinition; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.TypeDefinition; }
}
ClassType classType;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs
index 8df9ccd..55912a2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs
@@ -59,8 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp
void VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression);
void VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression);
void VisitUncheckedExpression(UncheckedExpression uncheckedExpression);
- void VisitEmptyExpression (EmptyExpression emptyExpression);
-
+
void VisitQueryExpression(QueryExpression queryExpression);
void VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause);
void VisitQueryFromClause(QueryFromClause queryFromClause);
@@ -190,8 +189,7 @@ namespace ICSharpCode.NRefactory.CSharp
S VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression);
S VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression);
S VisitUncheckedExpression(UncheckedExpression uncheckedExpression);
- S VisitEmptyExpression (EmptyExpression emptyExpression);
-
+
S VisitQueryExpression(QueryExpression queryExpression);
S VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause);
S VisitQueryFromClause(QueryFromClause queryFromClause);
@@ -321,8 +319,7 @@ namespace ICSharpCode.NRefactory.CSharp
S VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, T data);
S VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, T data);
S VisitUncheckedExpression(UncheckedExpression uncheckedExpression, T data);
- S VisitEmptyExpression (EmptyExpression emptyExpression, T data);
-
+
S VisitQueryExpression(QueryExpression queryExpression, T data);
S VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause, T data);
S VisitQueryFromClause(QueryFromClause queryFromClause, T data);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs
index 3291bcc..d5fffdc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs
@@ -842,13 +842,6 @@ namespace ICSharpCode.NRefactory.CSharp
Visit(EnterNamedExpression, LeaveNamedExpression, namedExpression);
}
- public event Action<EmptyExpression> EnterEmptyExpression, LeaveEmptyExpression;
-
- void IAstVisitor.VisitEmptyExpression(EmptyExpression emptyExpression)
- {
- Visit(EnterEmptyExpression, LeaveEmptyExpression, emptyExpression);
- }
-
void IAstVisitor.VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern)
{
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs
index 056cf55..4bb4e39 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs
@@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp
public CSharpTokenNode SemicolonToken {
get { return GetChildByRole (Roles.Semicolon); }
}
-
+
public override void AcceptVisitor (IAstVisitor visitor)
{
visitor.VisitBreakStatement (this);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs
index 7e53f98..6ac5361 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs
@@ -164,24 +164,28 @@ namespace ICSharpCode.NRefactory.CSharp
public static SyntaxTree Parse (string program, string fileName = "", CompilerSettings settings = null, CancellationToken cancellationToken = default (CancellationToken))
{
+ cancellationToken.ThrowIfCancellationRequested();
var parser = new CSharpParser (settings);
return parser.Parse (program, fileName);
}
public static SyntaxTree Parse (TextReader reader, string fileName = "", CompilerSettings settings = null, CancellationToken cancellationToken = default (CancellationToken))
{
+ cancellationToken.ThrowIfCancellationRequested();
var parser = new CSharpParser (settings);
return parser.Parse (reader, fileName);
}
public static SyntaxTree Parse (Stream stream, string fileName = "", CompilerSettings settings = null, CancellationToken cancellationToken = default (CancellationToken))
{
+ cancellationToken.ThrowIfCancellationRequested();
var parser = new CSharpParser (settings);
return parser.Parse (stream, fileName);
}
public static SyntaxTree Parse (ITextSource textSource, string fileName = "", CompilerSettings settings = null, CancellationToken cancellationToken = default (CancellationToken))
{
+ cancellationToken.ThrowIfCancellationRequested();
var parser = new CSharpParser (settings);
return parser.Parse (textSource, fileName);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs
index dc0d747..ae73d1d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs
@@ -67,8 +67,8 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.Unknown; }
}
- public override EntityType EntityType {
- get { return EntityType.Method; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Method; }
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs
index c8e7429..4b9d628 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs
@@ -32,8 +32,8 @@ namespace ICSharpCode.NRefactory.CSharp
{
public static readonly Role<ConstructorInitializer> InitializerRole = new Role<ConstructorInitializer>("Initializer", ConstructorInitializer.Null);
- public override EntityType EntityType {
- get { return EntityType.Constructor; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Constructor; }
}
public CSharpTokenNode LParToken {
@@ -142,6 +142,15 @@ namespace ICSharpCode.NRefactory.CSharp
set;
}
+ public CSharpTokenNode Keyword {
+ get {
+ if (ConstructorInitializerType == ConstructorInitializerType.Base)
+ return GetChildByRole(BaseKeywordRole);
+ else
+ return GetChildByRole(ThisKeywordRole);
+ }
+ }
+
public CSharpTokenNode LParToken {
get { return GetChildByRole (Roles.LPar); }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs
index 5f2411e..0609e5d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs
@@ -36,8 +36,8 @@ namespace ICSharpCode.NRefactory.CSharp
get { return GetChildByRole (TildeRole); }
}
- public override EntityType EntityType {
- get { return EntityType.Destructor; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Destructor; }
}
public CSharpTokenNode LParToken {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EntityDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EntityDeclaration.cs
index ed652fe..c02ff21 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EntityDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EntityDeclaration.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.Member; }
}
- public abstract NRefactory.TypeSystem.EntityType EntityType { get; }
+ public abstract NRefactory.TypeSystem.SymbolKind SymbolKind { get; }
public AstNodeCollection<AttributeSection> Attributes {
get { return base.GetChildrenByRole (AttributeRole); }
@@ -71,7 +71,11 @@ namespace ICSharpCode.NRefactory.CSharp
get { return GetChildByRole (Roles.Type); }
set { SetChildByRole(Roles.Type, value); }
}
-
+
+ public CSharpTokenNode SemicolonToken {
+ get { return GetChildByRole (Roles.Semicolon); }
+ }
+
internal static Modifiers GetModifiers(AstNode node)
{
Modifiers m = 0;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs
index 8f05e4e..b7c924a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs
@@ -33,10 +33,14 @@ namespace ICSharpCode.NRefactory.CSharp
{
public static readonly Role<Expression> InitializerRole = new Role<Expression>("Initializer", Expression.Null);
- public override EntityType EntityType {
- get { return EntityType.Field; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Field; }
}
-
+
+ public CSharpTokenNode AssignToken {
+ get { return GetChildByRole (Roles.Assign); }
+ }
+
public Expression Initializer {
get { return GetChildByRole (InitializerRole); }
set { SetChildByRole (InitializerRole, value); }
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs
index 7e338af..d543f9e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs
@@ -36,10 +36,14 @@ namespace ICSharpCode.NRefactory.CSharp
{
public static readonly TokenRole EventKeywordRole = new TokenRole ("event");
- public override EntityType EntityType {
- get { return EntityType.Event; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Event; }
}
-
+
+ public CSharpTokenNode EventToken {
+ get { return GetChildByRole (EventKeywordRole); }
+ }
+
public AstNodeCollection<VariableInitializer> Variables {
get { return GetChildrenByRole (Roles.Variable); }
}
@@ -90,8 +94,8 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly Role<Accessor> AddAccessorRole = new Role<Accessor>("AddAccessor", Accessor.Null);
public static readonly Role<Accessor> RemoveAccessorRole = new Role<Accessor>("RemoveAccessor", Accessor.Null);
- public override EntityType EntityType {
- get { return EntityType.Event; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Event; }
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs
index d9af2f3..de220ec 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs
@@ -32,8 +32,8 @@ namespace ICSharpCode.NRefactory.CSharp
{
public class FieldDeclaration : EntityDeclaration
{
- public override EntityType EntityType {
- get { return EntityType.Field; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Field; }
}
public AstNodeCollection<VariableInitializer> Variables {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs
index ebc20c5..fea2a2a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs
@@ -33,8 +33,8 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly TokenRole FixedKeywordRole = new TokenRole ("fixed");
public static readonly Role<FixedVariableInitializer> VariableRole = new Role<FixedVariableInitializer> ("FixedVariable");
- public override EntityType EntityType {
- get { return EntityType.Field; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Field; }
}
public CSharpTokenNode FixedToken {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs
index d820019..a958797 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs
@@ -36,8 +36,8 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly Role<Accessor> GetterRole = PropertyDeclaration.GetterRole;
public static readonly Role<Accessor> SetterRole = PropertyDeclaration.SetterRole;
- public override EntityType EntityType {
- get { return EntityType.Indexer; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Indexer; }
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs
index 0d4a234..90aaa30 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs
@@ -30,8 +30,8 @@ namespace ICSharpCode.NRefactory.CSharp
{
public class MethodDeclaration : EntityDeclaration
{
- public override EntityType EntityType {
- get { return EntityType.Method; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Method; }
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs
index f0a07e8..b4ae52a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs
@@ -106,8 +106,8 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly TokenRole ExplicitRole = new TokenRole ("explicit");
public static readonly TokenRole ImplicitRole = new TokenRole ("implicit");
- public override EntityType EntityType {
- get { return EntityType.Operator; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Operator; }
}
OperatorType operatorType;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs
index df0fa98..1f137e0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs
@@ -34,8 +34,8 @@ namespace ICSharpCode.NRefactory.CSharp
public static readonly Role<Accessor> GetterRole = new Role<Accessor>("Getter", Accessor.Null);
public static readonly Role<Accessor> SetterRole = new Role<Accessor>("Setter", Accessor.Null);
- public override EntityType EntityType {
- get { return EntityType.Property; }
+ public override SymbolKind SymbolKind {
+ get { return SymbolKind.Property; }
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
index 8154d55..d32270c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
@@ -38,6 +38,13 @@ using ICSharpCode.NRefactory.CSharp.TypeSystem;
namespace ICSharpCode.NRefactory.CSharp.Completion
{
+ public enum EditorBrowsableBehavior
+ {
+ Ignore,
+ Normal,
+ IncludeAdvanced
+ }
+
public class CSharpCompletionEngine : CSharpCompletionEngineBase
{
internal ICompletionDataFactory factory;
@@ -48,6 +55,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
public string EolMarker { get; set; }
public string IndentString { get; set; }
+
+ public bool AutomaticallyAddImports { get; set; }
+ public bool IncludeKeywordsInCompletionList { get; set; }
+ public EditorBrowsableBehavior EditorBrowsableBehavior { get; set; }
#endregion
#region Result properties
@@ -61,6 +72,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
public bool AutoSelect;
public string DefaultCompletionString;
public bool CloseOnSquareBrackets;
+ public readonly List<IMethod> PossibleDelegates = new List<IMethod> ();
#endregion
public CSharpCompletionEngine(IDocument document, ICompletionContextProvider completionContextProvider, ICompletionDataFactory factory, IProjectContent content, CSharpTypeResolveContext ctx) : base (content, completionContextProvider, ctx)
@@ -76,6 +88,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
// Set defaults for additional input properties
this.FormattingPolicy = FormattingOptionsFactory.CreateMono();
this.EolMarker = Environment.NewLine;
+ this.IncludeKeywordsInCompletionList = true;
+ EditorBrowsableBehavior = EditorBrowsableBehavior.IncludeAdvanced;
this.IndentString = "\t";
}
@@ -164,7 +178,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
break;
}
}
- yield return factory.CreateImportCompletionData (type, useFullName);
+ yield return factory.CreateImportCompletionData (type, useFullName, false);
}
}
@@ -240,6 +254,13 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return null;
}
if (expr.Node is AstType) {
+
+ // check for namespace names
+ if (expr.Node.AncestorsAndSelf
+ .TakeWhile (n => n is AstType)
+ .Any (m => m.Role == NamespaceDeclaration.NamespaceNameRole))
+ return null;
+
// need to look at paren.parent because of "catch (<Type>.A" expression
if (expr.Node.Parent != null && expr.Node.Parent.Parent is CatchClause)
return HandleCatchClauseType(expr);
@@ -317,16 +338,21 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
bool isProtectedAllowed = ctx.CurrentTypeDefinition != null && initializerType.GetDefinition() != null ?
ctx.CurrentTypeDefinition.IsDerivedFrom(initializerType.GetDefinition()) :
false;
- foreach (var m in initializerType.GetMembers (m => m.EntityType == EntityType.Field)) {
+ foreach (var m in initializerType.GetMembers (m => m.SymbolKind == SymbolKind.Field)) {
var f = m as IField;
if (f != null && (f.IsReadOnly || f.IsConst))
- continue;
- if (lookup.IsAccessible (m, isProtectedAllowed))
- contextList.AddMember(m);
+ continue;
+ if (lookup.IsAccessible (m, isProtectedAllowed)) {
+ var data = contextList.AddMember(m);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
+ }
}
- foreach (IProperty m in initializerType.GetMembers (m => m.EntityType == EntityType.Property)) {
- if (m.CanSet && lookup.IsAccessible (m.Setter, isProtectedAllowed))
- contextList.AddMember(m);
+
+ foreach (IProperty m in initializerType.GetMembers (m => m.SymbolKind == SymbolKind.Property)) {
+ if (m.CanSet && lookup.IsAccessible(m.Setter, isProtectedAllowed)) {
+ var data = contextList.AddMember(m);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
+ }
}
if (prev != null && (prev is NamedExpression)) {
@@ -351,12 +377,258 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return null;
}
+
+ internal static readonly string[] FormatItemMethods = {
+ "System.String.Format",
+ "System.Console.Write",
+ "System.Console.WriteLine",
+ "System.IO.StringWriter.Write",
+ "System.IO.StringWriter.WriteLine"
+ };
+
+ static readonly DateTime curDate = DateTime.Now;
+
+ IEnumerable<ICompletionData> GenerateNumberFormatitems(bool isFloatingPoint)
+ {
+ yield return factory.CreateFormatItemCompletionData("D", "decimal", 123);
+ yield return factory.CreateFormatItemCompletionData("D5", "decimal", 123);
+ yield return factory.CreateFormatItemCompletionData("C", "currency", 123);
+ yield return factory.CreateFormatItemCompletionData("C0", "currency", 123);
+ yield return factory.CreateFormatItemCompletionData("E", "exponential", 1.23E4);
+ yield return factory.CreateFormatItemCompletionData("E2", "exponential", 1.234);
+ yield return factory.CreateFormatItemCompletionData("e2", "exponential", 1.234);
+ yield return factory.CreateFormatItemCompletionData("F", "fixed-point", 123.45);
+ yield return factory.CreateFormatItemCompletionData("F1", "fixed-point", 123.45);
+ yield return factory.CreateFormatItemCompletionData("G", "general", 1.23E+56);
+ yield return factory.CreateFormatItemCompletionData("g2", "general", 1.23E+56);
+ yield return factory.CreateFormatItemCompletionData("N", "number", 12345.68);
+ yield return factory.CreateFormatItemCompletionData("N1", "number", 12345.68);
+ yield return factory.CreateFormatItemCompletionData("P", "percent", 12.34);
+ yield return factory.CreateFormatItemCompletionData("P1", "percent", 12.34);
+ yield return factory.CreateFormatItemCompletionData("R", "round-trip", 0.1230000001);
+ yield return factory.CreateFormatItemCompletionData("X", "hexadecimal", 1234);
+ yield return factory.CreateFormatItemCompletionData("x8", "hexadecimal", 1234);
+ yield return factory.CreateFormatItemCompletionData("0000", "custom", 123);
+ yield return factory.CreateFormatItemCompletionData("####", "custom", 123);
+ yield return factory.CreateFormatItemCompletionData("##.###", "custom", 1.23);
+ yield return factory.CreateFormatItemCompletionData("##.000", "custom", 1.23);
+ yield return factory.CreateFormatItemCompletionData("## 'items'", "custom", 12);
+ }
+
+ IEnumerable<ICompletionData> GenerateDateTimeFormatitems ()
+ {
+ yield return factory.CreateFormatItemCompletionData("D", "long date", curDate);
+ yield return factory.CreateFormatItemCompletionData("d", "short date", curDate);
+ yield return factory.CreateFormatItemCompletionData("F", "full date long", curDate);
+ yield return factory.CreateFormatItemCompletionData("f", "full date short", curDate);
+ yield return factory.CreateFormatItemCompletionData("G", "general long", curDate);
+ yield return factory.CreateFormatItemCompletionData("g", "general short", curDate);
+ yield return factory.CreateFormatItemCompletionData("M", "month", curDate);
+ yield return factory.CreateFormatItemCompletionData("O", "ISO 8601", curDate);
+ yield return factory.CreateFormatItemCompletionData("R", "RFC 1123", curDate);
+ yield return factory.CreateFormatItemCompletionData("s", "sortable", curDate);
+ yield return factory.CreateFormatItemCompletionData("T", "long time", curDate);
+ yield return factory.CreateFormatItemCompletionData("t", "short time", curDate);
+ yield return factory.CreateFormatItemCompletionData("U", "universal full", curDate);
+ yield return factory.CreateFormatItemCompletionData("u", "universal sortable", curDate);
+ yield return factory.CreateFormatItemCompletionData("Y", "year month", curDate);
+ yield return factory.CreateFormatItemCompletionData("yy-MM-dd", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("yyyy MMMMM dd", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("yy-MMM-dd ddd", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("yyyy-M-d dddd", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("hh:mm:ss t z", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("hh:mm:ss tt zz", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("HH:mm:ss tt zz", "custom", curDate);
+ yield return factory.CreateFormatItemCompletionData("HH:m:s tt zz", "custom", curDate);
+
+ }
+ [Flags]
+ enum TestEnum { EnumCaseName = 0, Flag1 = 1, Flag2 = 2, Flags }
+ IEnumerable<ICompletionData> GenerateEnumFormatitems ()
+ {
+ yield return factory.CreateFormatItemCompletionData("G", "string value", TestEnum.EnumCaseName);
+ yield return factory.CreateFormatItemCompletionData("F", "flags value", TestEnum.Flags);
+ yield return factory.CreateFormatItemCompletionData("D", "integer value", TestEnum.Flags);
+ yield return factory.CreateFormatItemCompletionData("X", "hexadecimal", TestEnum.Flags);
+ }
+
+ IEnumerable<ICompletionData> GenerateTimeSpanFormatitems ()
+ {
+ yield return factory.CreateFormatItemCompletionData("c", "invariant", new TimeSpan(0, 1, 23, 456));
+ yield return factory.CreateFormatItemCompletionData("G", "general long", new TimeSpan(0, 1, 23, 456));
+ yield return factory.CreateFormatItemCompletionData("g", "general short", new TimeSpan(0, 1, 23, 456));
+ }
+
+ static Guid defaultGuid = Guid.NewGuid();
+ IEnumerable<ICompletionData> GenerateGuidFormatitems ()
+ {
+ yield return factory.CreateFormatItemCompletionData("N", "digits", defaultGuid);
+ yield return factory.CreateFormatItemCompletionData("D", "hypens", defaultGuid);
+ yield return factory.CreateFormatItemCompletionData("B", "braces", defaultGuid);
+ yield return factory.CreateFormatItemCompletionData("P", "parentheses", defaultGuid);
+ }
+
+ int GetFormatItemNumber()
+ {
+ int number = 0;
+ var o = offset - 2;
+ while (o > 0) {
+ char ch = document.GetCharAt(o);
+ if (ch == '{')
+ return number;
+ if (!char.IsDigit(ch))
+ break;
+ number = number * 10 + ch - '0';
+ o--;
+ }
+ return -1;
+ }
+
+ IEnumerable<ICompletionData> HandleStringFormatItems ()
+ {
+ var formatArgument = GetFormatItemNumber();
+ if (formatArgument < 0)
+ return Enumerable.Empty<ICompletionData>();
+ var followUp = new StringBuilder ();
+
+ var o = offset;
+ while (o < document.TextLength) {
+ char ch = document.GetCharAt(o);
+ followUp.Append(ch);
+ o++;
+ if (ch == ';')
+ break;
+ }
+ var unit = ParseStub(followUp.ToString() , false);
+
+ var invoke = unit.GetNodeAt<InvocationExpression>(location);
+
+ if (invoke != null) {
+ var resolveResult = ResolveExpression(new ExpressionResult(invoke, unit));
+ var invokeResult = resolveResult.Item1 as InvocationResolveResult;
+ if (invokeResult != null) {
+ var arg = formatArgument + 1; // First argument is the format string
+ if (arg < invoke.Arguments.Count) {
+ var invokeArgument = ResolveExpression(new ExpressionResult(invoke.Arguments.ElementAt(arg), unit));
+ if (invokeArgument != null) {
+ var provider = GetFormatCompletionData(invokeArgument.Item1.Type);
+ if (provider != null)
+ return provider;
+ if (!invokeArgument.Item1.Type.IsKnownType(KnownTypeCode.Object))
+ return Enumerable.Empty<ICompletionData>();
+ }
+ }
+ }
+ }
+ return HandleStringFormatItemsFallback();
+ }
+
+
+ IEnumerable<ICompletionData> HandleStringFormatItemsFallback ()
+ {
+ var unit = ParseStub("a}\");", false);
+
+ var invoke = unit.GetNodeAt<InvocationExpression>(location);
+
+ if (invoke == null)
+ return Enumerable.Empty<ICompletionData>();
+
+ var resolveResult = ResolveExpression(new ExpressionResult(invoke, unit));
+ var invokeResult = resolveResult.Item1 as InvocationResolveResult;
+ if (invokeResult == null)
+ return Enumerable.Empty<ICompletionData>();
+
+ if (FormatItemMethods.Contains(invokeResult.Member.FullName)) {
+ return GenerateNumberFormatitems(false)
+ .Concat(GenerateDateTimeFormatitems())
+ .Concat(GenerateTimeSpanFormatitems())
+ .Concat(GenerateEnumFormatitems())
+ .Concat(GenerateGuidFormatitems());
+ }
+ return Enumerable.Empty<ICompletionData>();
+
+ }
+
+ IEnumerable<ICompletionData> GetFormatCompletionData(IType type)
+ {
+ if (type.Namespace != "System")
+ return null;
+ switch (type.Name) {
+ case "Int64":
+ case "UInt64":
+ case "Int32":
+ case "UInt32":
+ case "Int16":
+ case "UInt16":
+ case "Byte":
+ case "SByte":
+ return GenerateNumberFormatitems(false);
+ case "Single":
+ case "Double":
+ case "Decimal":
+ return GenerateNumberFormatitems(true);
+ case "Enum":
+ return GenerateEnumFormatitems();
+ case "DateTime":
+ return GenerateDateTimeFormatitems();
+ case "TimeSpan":
+ return GenerateTimeSpanFormatitems();
+ case "Guid":
+ return GenerateGuidFormatitems();
+ }
+ return null;
+ }
+
+ IEnumerable<ICompletionData> HandleToStringFormatItems ()
+ {
+ var unit = ParseStub("\");", false);
+
+ var invoke = unit.GetNodeAt<InvocationExpression>(location);
+ if (invoke == null)
+ return Enumerable.Empty<ICompletionData>();
+
+ var resolveResult = ResolveExpression(new ExpressionResult(invoke, unit));
+ var invokeResult = resolveResult.Item1 as InvocationResolveResult;
+ if (invokeResult == null)
+ return Enumerable.Empty<ICompletionData>();
+ if (invokeResult.Member.Name == "ToString")
+ return GetFormatCompletionData(invokeResult.Member.DeclaringType) ?? Enumerable.Empty<ICompletionData>();
+ return Enumerable.Empty<ICompletionData>();
+ }
+
IEnumerable<ICompletionData> MagicKeyCompletion(char completionChar, bool controlSpace)
{
Tuple<ResolveResult, CSharpResolver> resolveResult;
switch (completionChar) {
// Magic key completion
case ':':
+ var text = GetMemberTextToCaret();
+ var lexer = new MiniLexer(text.Item1);
+ lexer.Parse();
+ if (lexer.IsInSingleComment ||
+ lexer.IsInChar ||
+ lexer.IsInMultiLineComment ||
+ lexer.IsInPreprocessorDirective) {
+ return Enumerable.Empty<ICompletionData>();
+ }
+
+ if (lexer.IsInString || lexer.IsInVerbatimString)
+ return HandleStringFormatItems ();
+ return HandleMemberReferenceCompletion(GetExpressionBeforeCursor());
+ case '"':
+ text = GetMemberTextToCaret();
+ lexer = new MiniLexer(text.Item1);
+ lexer.Parse();
+ if (lexer.IsInSingleComment ||
+ lexer.IsInChar ||
+ lexer.IsInMultiLineComment ||
+ lexer.IsInPreprocessorDirective) {
+ return Enumerable.Empty<ICompletionData>();
+ }
+
+ if (lexer.IsInString || lexer.IsInVerbatimString)
+ return HandleToStringFormatItems ();
+ return Enumerable.Empty<ICompletionData>();
case '.':
if (IsInsideCommentStringOrDirective()) {
return Enumerable.Empty<ICompletionData>();
@@ -644,6 +916,15 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
return null;
}
+ char prevCh = offset > 2 ? document.GetCharAt(offset - 2) : ';';
+ char nextCh = offset < document.TextLength ? document.GetCharAt(offset) : ' ';
+ const string allowedChars = ";,.[](){}+-*/%^?:&|~!<>=";
+
+ if ((!Char.IsWhiteSpace(nextCh) && allowedChars.IndexOf(nextCh) < 0) || !(Char.IsWhiteSpace(prevCh) || allowedChars.IndexOf(prevCh) >= 0)) {
+ if (!controlSpace)
+ return null;
+ }
+
if (IsInLinqContext(offset)) {
if (!controlSpace && !(char.IsLetter(completionChar) || completionChar == '_')) {
return null;
@@ -721,16 +1002,11 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return keywordresult;
}
- char prevCh = offset > 2 ? document.GetCharAt(offset - 2) : ';';
- char nextCh = offset < document.TextLength ? document.GetCharAt(offset) : ' ';
- const string allowedChars = ";,.[](){}+-*/%^?:&|~!<>=";
-
if ((!Char.IsWhiteSpace(nextCh) && allowedChars.IndexOf(nextCh) < 0) || !(Char.IsWhiteSpace(prevCh) || allowedChars.IndexOf(prevCh) >= 0)) {
if (controlSpace)
return DefaultControlSpaceItems(identifierStart);
- return null;
}
-
+
int prevTokenIndex = tokenIndex;
var prevToken2 = GetPreviousToken(ref prevTokenIndex, false);
if (prevToken2 == "delegate") {
@@ -768,7 +1044,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
var prev = n.GetPrevNode() as ForeachStatement;
if (prev != null && prev.InExpression.IsNull) {
if (controlSpace) {
- contextList.AddCustom("in");
+ if (IncludeKeywordsInCompletionList)
+ contextList.AddCustom("in");
return contextList.Result;
}
return null;
@@ -880,13 +1157,15 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (!property.IsPublic) {
continue;
}
- contextList.AddMember(property);
+ var data = contextList.AddMember(property);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
}
foreach (var field in initalizerResult.Item1.Type.GetFields ()) {
if (!field.IsPublic) {
continue;
}
- contextList.AddMember(field);
+ var data = contextList.AddMember(field);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
}
return contextList.Result;
}
@@ -1126,12 +1405,16 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
var contextList = new CompletionDataWrapper(this);
if (node is PropertyDeclaration || node is IndexerDeclaration) {
- contextList.AddCustom("get");
- contextList.AddCustom("set");
- AddKeywords(contextList, accessorModifierKeywords);
+ if (IncludeKeywordsInCompletionList) {
+ contextList.AddCustom("get");
+ contextList.AddCustom("set");
+ AddKeywords(contextList, accessorModifierKeywords);
+ }
} else if (node is CustomEventDeclaration) {
- contextList.AddCustom("add");
- contextList.AddCustom("remove");
+ if (IncludeKeywordsInCompletionList) {
+ contextList.AddCustom("add");
+ contextList.AddCustom("remove");
+ }
} else {
return null;
}
@@ -1225,7 +1508,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
// namespace name case
var ns = node as NamespaceDeclaration;
if (ns != null) {
- var last = ns.Identifiers.LastOrDefault ();
+ var last = ns.NamespaceName;
if (last != null && location < last.EndLocation)
return null;
}
@@ -1319,10 +1602,12 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return;
foreach (var property in resolved.Type.GetProperties (p => p.Accessibility == Accessibility.Public)) {
- wrapper.AddMember(property);
+ var data = wrapper.AddMember(property);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
}
foreach (var field in resolved.Type.GetFields (p => p.Accessibility == Accessibility.Public)) {
- wrapper.AddMember(field);
+ var data = wrapper.AddMember(field);
+ data.DisplayFlags |= DisplayFlags.NamedArgument;
}
foreach (var constructor in resolved.Type.GetConstructors (p => p.Accessibility == Accessibility.Public)) {
foreach (var p in constructor.Parameters) {
@@ -1395,7 +1680,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
if (IsInSwitchContext(node)) {
- wrapper.AddCustom("case");
+ if (IncludeKeywordsInCompletionList)
+ wrapper.AddCustom("case");
}
} else {
if (((AstType)node).Parent is ParameterDeclaration) {
@@ -1406,8 +1692,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (node != null || state.CurrentTypeDefinition != null || isInGlobalDelegate)
AddKeywords(wrapper, primitiveTypesKeywords);
if (currentMember != null && (node is IdentifierExpression || node is SimpleType) && (node.Parent is ExpressionStatement || node.Parent is ForeachStatement || node.Parent is UsingStatement)) {
- wrapper.AddCustom("var");
- wrapper.AddCustom("dynamic");
+ if (IncludeKeywordsInCompletionList) {
+ wrapper.AddCustom("var");
+ wrapper.AddCustom("dynamic");
+ }
}
wrapper.Result.AddRange(factory.CreateCodeTemplateCompletionData());
if (node != null && node.Role == Roles.Argument) {
@@ -1446,7 +1734,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
// Add 'this' keyword for first parameter (extension method case)
if (node != null && node.Parent is ParameterDeclaration &&
- node.Parent.PrevSibling != null && node.Parent.PrevSibling.Role == Roles.LPar) {
+ node.Parent.PrevSibling != null && node.Parent.PrevSibling.Role == Roles.LPar && IncludeKeywordsInCompletionList) {
wrapper.AddCustom("this");
}
}
@@ -1466,7 +1754,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return false;
}
- void AddTypesAndNamespaces(CompletionDataWrapper wrapper, CSharpResolver state, AstNode node, Func<IType, IType> typePred = null, Predicate<IMember> memberPred = null, Action<ICompletionData, IType> callback = null)
+ void AddTypesAndNamespaces(CompletionDataWrapper wrapper, CSharpResolver state, AstNode node, Func<IType, IType> typePred = null, Predicate<IMember> memberPred = null, Action<ICompletionData, IType> callback = null, bool onlyAddConstructors = false)
{
var lookup = new MemberLookup(ctx.CurrentTypeDefinition, Compilation.MainAssembly);
@@ -1475,15 +1763,22 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
foreach (var nestedType in ct.GetNestedTypes ()) {
if (!lookup.IsAccessible (nestedType.GetDefinition (), true))
continue;
-
+ if (onlyAddConstructors) {
+ if (!nestedType.GetConstructors().Any(c => lookup.IsAccessible(c, true)))
+ continue;
+ }
+
if (typePred == null) {
- wrapper.AddType(nestedType, false, IsAttributeContext(node));
+ if (onlyAddConstructors)
+ wrapper.AddConstructors (nestedType, false, IsAttributeContext(node));
+ else
+ wrapper.AddType(nestedType, false, IsAttributeContext(node));
continue;
}
var type = typePred(nestedType);
if (type != null) {
- var a2 = wrapper.AddType(type, false, IsAttributeContext(node));
+ var a2 = onlyAddConstructors ? wrapper.AddConstructors(type, false, IsAttributeContext(node)) : wrapper.AddType(type, false, IsAttributeContext(node));
if (a2 != null && callback != null) {
callback(a2, type);
}
@@ -1491,6 +1786,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
continue;
}
}
+
if (this.currentMember != null && !(node is AstType)) {
var def = ctx.CurrentTypeDefinition;
if (def == null && currentType != null)
@@ -1502,7 +1798,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (member is IMethod && ((IMethod)member).FullName == "System.Object.Finalize") {
continue;
}
- if (member.EntityType == EntityType.Operator) {
+ if (member.SymbolKind == SymbolKind.Operator) {
continue;
}
if (member.IsExplicitInterfaceImplementation) {
@@ -1545,10 +1841,16 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
foreach (var type in u.Types) {
if (!lookup.IsAccessible(type, false))
continue;
-
+
IType addType = typePred != null ? typePred(type) : type;
+
+ if (onlyAddConstructors && addType != null) {
+ if (!addType.GetConstructors().Any(c => lookup.IsAccessible(c, true)))
+ continue;
+ }
+
if (addType != null) {
- var a = wrapper.AddType(addType, false, IsAttributeContext(node));
+ var a = onlyAddConstructors ? wrapper.AddConstructors(addType, false, IsAttributeContext(node)) : wrapper.AddType(addType, false, IsAttributeContext(node));
if (a != null && callback != null) {
callback(a, type);
}
@@ -1560,8 +1862,14 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (!lookup.IsAccessible(type, false))
continue;
IType addType = typePred != null ? typePred(type) : type;
+
+ if (onlyAddConstructors && addType != null) {
+ if (!addType.GetConstructors().Any(c => lookup.IsAccessible(c, true)))
+ continue;
+ }
+
if (addType != null) {
- var a2 = wrapper.AddType(addType, false);
+ var a2 = onlyAddConstructors ? wrapper.AddConstructors(addType, false, IsAttributeContext(node)) : wrapper.AddType(addType, false);
if (a2 != null && callback != null) {
callback(a2, type);
}
@@ -1573,9 +1881,27 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
}
- if (node is AstType && node.Parent is Constraint) {
+ if (node is AstType && node.Parent is Constraint && IncludeKeywordsInCompletionList) {
wrapper.AddCustom ("new()");
}
+
+ if (AutomaticallyAddImports) {
+ state = GetState();
+ foreach (var type in Compilation.GetAllTypeDefinitions ()) {
+ if (!lookup.IsAccessible (type, false))
+ continue;
+ var resolveResult = state.LookupSimpleNameOrTypeName(type.Name, type.TypeArguments, NameLookupMode.Expression);
+ if (resolveResult.Type.GetDefinition () == type)
+ continue;
+
+ if (onlyAddConstructors) {
+ if (!type.GetConstructors().Any(c => lookup.IsAccessible(c, true)))
+ continue;
+ }
+
+ wrapper.AddTypeImport(type, !resolveResult.IsError, onlyAddConstructors);
+ }
+ }
}
IEnumerable<ICompletionData> HandleKeywordCompletion(int wordStart, string word)
@@ -1798,14 +2124,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (accessorContext != null) {
return accessorContext;
}
- wrapper = new CompletionDataWrapper(this);
- state = GetState();
- if (currentType != null) {
- AddTypesAndNamespaces(wrapper, state, null, null, m => false);
- AddKeywords(wrapper, primitiveTypesKeywords);
- }
- AddKeywords(wrapper, typeLevelKeywords);
- return wrapper.Result;
+ return null;
case "new":
int j = offset - 4;
// string token = GetPreviousToken (ref j, true);
@@ -1821,12 +2140,14 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
)
.FirstOrDefault();
- return CreateTypeCompletionData(hintType);
+ return CreateConstructorCompletionData(hintType);
case "yield":
var yieldDataList = new CompletionDataWrapper(this);
DefaultCompletionString = "return";
- yieldDataList.AddCustom("break");
- yieldDataList.AddCustom("return");
+ if (IncludeKeywordsInCompletionList) {
+ yieldDataList.AddCustom("break");
+ yieldDataList.AddCustom("return");
+ }
return yieldDataList.Result;
case "in":
var inList = new CompletionDataWrapper(this);
@@ -1845,7 +2166,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
return null;
}
-
+
bool IsLineEmptyUpToEol()
{
var line = document.GetLineByNumber(location.Line);
@@ -1884,7 +2205,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
}
- IEnumerable<ICompletionData> CreateTypeCompletionData(IType hintType)
+ IEnumerable<ICompletionData> CreateConstructorCompletionData(IType hintType)
{
var wrapper = new CompletionDataWrapper(this);
var state = GetState();
@@ -1965,7 +2286,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
}
}
- AddTypesAndNamespaces(wrapper, state, null, pred, m => false, typeCallback);
+ AddTypesAndNamespaces(wrapper, state, null, pred, m => false, typeCallback, true);
if (hintType == null || hintType == SpecialType.UnknownType) {
AddKeywords(wrapper, primitiveTypesKeywords.Where(k => k != "void"));
}
@@ -2112,8 +2433,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
}
- static void AddKeywords(CompletionDataWrapper wrapper, IEnumerable<string> keywords)
+ void AddKeywords(CompletionDataWrapper wrapper, IEnumerable<string> keywords)
{
+ if (!IncludeKeywordsInCompletionList)
+ return;
foreach (string keyword in keywords) {
if (wrapper.Result.Any(data => data.DisplayText == keyword))
continue;
@@ -2155,7 +2478,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
bool MatchDelegate(IType delegateType, IMethod method)
{
- if (method.EntityType != EntityType.Method)
+ if (method.SymbolKind != SymbolKind.Method)
return false;
var delegateMethod = delegateType.GetDelegateInvokeMethod();
if (delegateMethod == null || delegateMethod.Parameters.Count != method.Parameters.Count) {
@@ -2173,6 +2496,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
string AddDelegateHandlers(CompletionDataWrapper completionList, IType delegateType, bool addSemicolon = true, bool addDefault = true)
{
IMethod delegateMethod = delegateType.GetDelegateInvokeMethod();
+ PossibleDelegates.Add (delegateMethod);
var thisLineIndent = GetLineIndent(location.Line);
string delegateEndString = EolMarker + thisLineIndent + "}" + (addSemicolon ? ";" : "");
//bool containsDelegateData = completionList.Result.Any(d => d.DisplayText.StartsWith("delegate("));
@@ -2206,7 +2530,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
var convertedParameter = builder.ConvertParameter(delegateMethod.Parameters [k]);
if (convertedParameter.ParameterModifier == ParameterModifier.Params)
convertedParameter.ParameterModifier = ParameterModifier.None;
- sb.Append(convertedParameter.GetText(FormattingPolicy));
+ sb.Append(convertedParameter.ToString(FormattingPolicy));
sbWithoutTypes.Append(delegateMethod.Parameters [k].Name);
}
@@ -2392,7 +2716,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
IEnumerable<ICompletionData> CreateTypeList()
{
foreach (var cl in Compilation.RootNamespace.Types) {
- yield return factory.CreateTypeCompletionData(cl, false, false);
+ yield return factory.CreateTypeCompletionData(cl, false, false, false);
}
foreach (var ns in Compilation.RootNamespace.ChildNamespaces) {
@@ -2604,7 +2928,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
result.AddMember(member);
}*/
foreach (var member in lookup.GetAccessibleMembers (resolveResult)) {
- if (member.EntityType == EntityType.Indexer || member.EntityType == EntityType.Operator || member.EntityType == EntityType.Constructor || member.EntityType == EntityType.Destructor) {
+ if (member.SymbolKind == SymbolKind.Indexer || member.SymbolKind == SymbolKind.Operator || member.SymbolKind == SymbolKind.Constructor || member.SymbolKind == SymbolKind.Destructor) {
continue;
}
if (resolvedNode is BaseReferenceExpression && member.IsAbstract) {
@@ -2635,7 +2959,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (member is IMethod && ((IMethod)member).FullName == "System.Object.Finalize") {
continue;
}
- if (member.EntityType == EntityType.Operator) {
+ if (member.SymbolKind == SymbolKind.Operator) {
continue;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs
index 3454268..b85b3d3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngineBase.cs
@@ -185,6 +185,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
if (!char.IsWhiteSpace(ch) && parameter.Count > 0)
foundCharAfterOpenBracket = true;
+
switch (ch) {
case '{':
if (inString || inChar || inVerbatimString || inSingleComment || inMultiLineComment) {
@@ -279,12 +280,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
inVerbatimString = true;
}
break;
- case '\n':
- case '\r':
- inSingleComment = false;
- inString = false;
- inChar = false;
- break;
case '\\':
if (inString || inChar) {
i++;
@@ -310,6 +305,13 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
}
inChar = !inChar;
break;
+ default:
+ if (NewLine.IsNewLine(ch)) {
+ inSingleComment = false;
+ inString = false;
+ inChar = false;
+ }
+ break;
}
}
if (parameter.Count != 1 || bracketStack.Count > 0) {
@@ -354,7 +356,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
IsInPreprocessorDirective = true;
break;
case '/':
- if (IsInString || IsInChar || IsInVerbatimString || IsInSingleComment)
+ if (IsInString || IsInChar || IsInVerbatimString || IsInSingleComment || IsInMultiLineComment)
break;
if (nextCh == '/') {
i++;
@@ -442,11 +444,11 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
lexer.Parse();
return
lexer.IsInSingleComment ||
- lexer.IsInString ||
- lexer.IsInVerbatimString ||
- lexer.IsInChar ||
- lexer.IsInMultiLineComment ||
- lexer.IsInPreprocessorDirective;
+ lexer.IsInString ||
+ lexer.IsInVerbatimString ||
+ lexer.IsInChar ||
+ lexer.IsInMultiLineComment ||
+ lexer.IsInPreprocessorDirective;
}
protected bool IsInsideDocComment ()
@@ -603,12 +605,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
inVerbatimString = true;
}
break;
- case '\n':
- case '\r':
- inSingleComment = false;
- inString = false;
- inChar = false;
- break;
case '\\':
if (inString || inChar)
i++;
@@ -632,6 +628,11 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
inChar = !inChar;
break;
default :
+ if (NewLine.IsNewLine(ch)) {
+ inSingleComment = false;
+ inString = false;
+ inChar = false;
+ }
break;
}
}
@@ -726,16 +727,17 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return result;
}
-// string cachedText = null;
-
protected virtual void Reset ()
{
-// cachedText = null;
+ memberText = null;
}
-
+
+ Tuple<string, TextLocation> memberText;
protected Tuple<string, TextLocation> GetMemberTextToCaret()
{
- return CompletionContextProvider.GetMemberTextToCaret(offset, currentType, currentMember);
+ if (memberText == null)
+ memberText = CompletionContextProvider.GetMemberTextToCaret(offset, currentType, currentMember);
+ return memberText;
}
protected ExpressionResult GetInvocationBeforeCursor(bool afterBracket)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CompletionDataWrapper.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CompletionDataWrapper.cs
index 1ac8de4..899163c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CompletionDataWrapper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/CompletionDataWrapper.cs
@@ -1,4 +1,4 @@
-//
+//
// CompletionDataWrapper.cs
//
// Author:
@@ -96,8 +96,19 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
Dictionary<string, ICompletionData> typeDisplayText = new Dictionary<string, ICompletionData> ();
Dictionary<IType, ICompletionData> addedTypes = new Dictionary<IType, ICompletionData> ();
+
+ public ICompletionData AddConstructors(IType type, bool showFullName, bool isInAttributeContext = false)
+ {
+ return InternalAddType(type, showFullName, isInAttributeContext, true);
+ }
+
public ICompletionData AddType(IType type, bool showFullName, bool isInAttributeContext = false)
{
+ return InternalAddType(type, showFullName, isInAttributeContext, false);
+ }
+
+ ICompletionData InternalAddType(IType type, bool showFullName, bool isInAttributeContext, bool addConstrurs)
+ {
if (type == null)
throw new ArgumentNullException("type");
if (type.Name == "Void" && type.Namespace == "System" || type.Kind == TypeKind.Unknown)
@@ -106,10 +117,25 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
return addedTypes[type];
var def = type.GetDefinition();
- if (def != null && def.ParentAssembly != completion.ctx.CurrentAssembly && !def.IsBrowsable())
- return null;
+ if (def != null && def.ParentAssembly != completion.ctx.CurrentAssembly) {
+ switch (completion.EditorBrowsableBehavior) {
+ case EditorBrowsableBehavior.Ignore:
+ break;
+ case EditorBrowsableBehavior.Normal:
+ var state = def.GetEditorBrowsableState();
+ if (state != System.ComponentModel.EditorBrowsableState.Always)
+ return null;
+ break;
+ case EditorBrowsableBehavior.IncludeAdvanced:
+ if (!def.IsBrowsable())
+ return null;
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
ICompletionData usedType;
- var data = Factory.CreateTypeCompletionData(type, showFullName, isInAttributeContext);
+ var data = Factory.CreateTypeCompletionData(type, showFullName, isInAttributeContext, addConstrurs);
var text = data.DisplayText;
if (typeDisplayText.TryGetValue(text, out usedType)) {
usedType.AddOverload(data);
@@ -155,31 +181,49 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
result.Add (Factory.CreateVariableCompletionData (variable));
}
+ public void AddTypeImport(ITypeDefinition type, bool useFullName, bool addForTypeCreation)
+ {
+ result.Add(Factory.CreateImportCompletionData(type, useFullName, addForTypeCreation));
+ }
+
public ICompletionData AddMember (IMember member)
{
var newData = Factory.CreateEntityCompletionData (member);
- if (member.ParentAssembly != completion.ctx.CurrentAssembly && !member.IsBrowsable ())
- return null;
-
+ if (member.ParentAssembly != completion.ctx.CurrentAssembly) {
+ switch (completion.EditorBrowsableBehavior) {
+ case EditorBrowsableBehavior.Ignore:
+ break;
+ case EditorBrowsableBehavior.Normal:
+ var state = member.GetEditorBrowsableState();
+ if (state != System.ComponentModel.EditorBrowsableState.Always)
+ return null;
+ break;
+ case EditorBrowsableBehavior.IncludeAdvanced:
+ if (!member.IsBrowsable())
+ return null;
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
string memberKey = newData.DisplayText;
if (memberKey == null)
return null;
- if (member is IMember) {
- newData.CompletionCategory = GetCompletionCategory (member.DeclaringTypeDefinition);
- }
+ newData.CompletionCategory = GetCompletionCategory (member.DeclaringTypeDefinition);
+
List<ICompletionData> existingData;
data.TryGetValue (memberKey, out existingData);
if (existingData != null) {
- if (member.EntityType == EntityType.Field || member.EntityType == EntityType.Property || member.EntityType == EntityType.Event)
+ if (member.SymbolKind == SymbolKind.Field || member.SymbolKind == SymbolKind.Property || member.SymbolKind == SymbolKind.Event)
return null;
var a = member as IEntity;
foreach (var d in existingData) {
if (!(d is IEntityCompletionData))
continue;
var b = ((IEntityCompletionData)d).Entity;
- if (a == null || b == null || a.EntityType == b.EntityType) {
+ if (a == null || b == null || a.SymbolKind == b.SymbolKind) {
d.AddOverload (newData);
return d;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionContextProvider.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionContextProvider.cs
index c590007..ed70580 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionContextProvider.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionContextProvider.cs
@@ -149,10 +149,6 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (bracketStack.Count > 0)
bracketStack.Pop ();
break;
- case '\r':
- case '\n':
- isInLineComment = false;
- break;
case '/':
if (isInBlockComment) {
if (i > 0 && document.GetCharAt (i - 1) == '*')
@@ -173,7 +169,10 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
if (!(isInString || isInLineComment || isInBlockComment))
isInChar = !isInChar;
break;
- default :
+ default :
+ if (NewLine.IsNewLine(ch)) {
+ isInLineComment = false;
+ }
break;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionDataFactory.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionDataFactory.cs
index 30de549..228f932 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionDataFactory.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Completion/ICompletionDataFactory.cs
@@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
ICompletionData CreateEntityCompletionData (IEntity entity);
ICompletionData CreateEntityCompletionData (IEntity entity, string text);
- ICompletionData CreateTypeCompletionData (IType type, bool showFullName, bool isInAttributeContext);
+ ICompletionData CreateTypeCompletionData (IType type, bool showFullName, bool isInAttributeContext, bool addForTypeCreation);
/// <summary>
/// Creates the member completion data.
@@ -78,6 +78,8 @@ namespace ICSharpCode.NRefactory.CSharp.Completion
/// </summary>
/// <param name="type">The type to import</param>
/// <param name="useFullName">If set to true the full name of the type needs to be used.</param>
- ICompletionData CreateImportCompletionData(IType type, bool useFullName);
+ ICompletionData CreateImportCompletionData(IType type, bool useFullName, bool addForTypeCreation);
+
+ ICompletionData CreateFormatItemCompletionData(string format, string description, object example);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormatter.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormatter.cs
index fe9f83f..a6969fe 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormatter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormatter.cs
@@ -90,7 +90,6 @@ namespace ICSharpCode.NRefactory.CSharp
/// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.CSharp.CSharpFormatter"/> class.
/// </summary>
/// <param name="policy">The formatting policy to use.</param>
- /// <param name="document">The text document to work upon.</param>
/// <param name="options">The text editor options (optional). Default is: TextEditorOptions.Default</param>
public CSharpFormatter(CSharpFormattingOptions policy, TextEditorOptions options = null)
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpIndentEngine.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpIndentEngine.cs
index 73eee7e..94a221c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpIndentEngine.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpIndentEngine.cs
@@ -444,35 +444,7 @@ namespace ICSharpCode.NRefactory.CSharp
currentIndent.Append('\t');
offset++;
return;
- case '\r':
- if (readPreprocessorExpression) {
- if (!eval(wordBuf.ToString()))
- inside |= Inside.PreProcessorComment;
- }
-
- inside &= ~(Inside.Comment | Inside.String | Inside.CharLiteral | Inside.PreProcessor);
- CheckKeyword(wordBuf.ToString());
- wordBuf.Length = 0;
- indent.Push(indentDelta);
- indentDelta = new Indent(textEditorOptions);
-
-
- if (addContinuation) {
- indent.Push(IndentType.Continuation);
- }
- thisLineindent = indent.Clone();
- addContinuation = false;
- IsLineStart = true;
- readPreprocessorExpression = false;
- col = 1;
- line++;
- currentIndent.Length = 0;
- break;
- case '\n':
- if (pc == '\r')
- break;
- goto case '\r';
case '"':
if (IsInComment || IsInPreProcessorComment)
break;
@@ -557,6 +529,36 @@ namespace ICSharpCode.NRefactory.CSharp
inside &= Inside.CharLiteral;
}
break;
+ default:
+ var nl = NewLine.GetDelimiterLength(ch, pc);
+ if (nl == 2)
+ break;
+ if (nl == 1) {
+ if (readPreprocessorExpression) {
+ if (!eval(wordBuf.ToString()))
+ inside |= Inside.PreProcessorComment;
+ }
+
+ inside &= ~(Inside.Comment | Inside.String | Inside.CharLiteral | Inside.PreProcessor);
+ CheckKeyword(wordBuf.ToString());
+ wordBuf.Length = 0;
+ indent.Push(indentDelta);
+ indentDelta = new Indent(textEditorOptions);
+
+
+ if (addContinuation) {
+ indent.Push(IndentType.Continuation);
+ }
+ thisLineindent = indent.Clone();
+ addContinuation = false;
+ IsLineStart = true;
+ readPreprocessorExpression = false;
+ col = 1;
+ line++;
+ currentIndent.Length = 0;
+ }
+ break;
+
}
if (!IsInComment && !IsInStringOrChar && !readPreprocessorExpression) {
@@ -582,9 +584,9 @@ namespace ICSharpCode.NRefactory.CSharp
indent.Push(IndentType.Continuation);
addContinuation = false;
}
- IsLineStart &= ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
+ IsLineStart &= ch == ' ' || ch == '\t' || NewLine.IsNewLine (ch);
pc = ch;
- if (ch != '\n' && ch != '\r')
+ if (!NewLine.IsNewLine (ch))
col++;
offset++;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs
index 58d2109..4a72d39 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs
@@ -149,6 +149,8 @@ namespace ICSharpCode.NRefactory.CSharp
do {
line--;
} while (line > 0 && IsSpacing(document.GetLineByNumber(line)));
+ if (line > 0 && !IsSpacing(document.GetLineByNumber(line)))
+ line++;
int end = document.GetOffset(loc.Line, 1);
int start = document.GetOffset(line + 1, 1);
var sb = new StringBuilder ();
@@ -359,7 +361,7 @@ namespace ICSharpCode.NRefactory.CSharp
return;
}
- var prev = keywordNode.GetPrevNode ();
+ var prev = keywordNode.GetPrevNode (NoWhitespacePredicate);
if (prev is Comment || prev is PreProcessorDirective)
return;
@@ -447,9 +449,7 @@ namespace ICSharpCode.NRefactory.CSharp
case BraceStyle.BannerStyle:
case BraceStyle.EndOfLine:
- var prev = lbrace.GetPrevNode();
- while (prev is NewLineNode)
- prev = prev.GetPrevNode();
+ var prev = lbrace.GetPrevNode (NoWhitespacePredicate);
if (prev is PreProcessorDirective)
return;
int prevOffset = document.GetOffset(prev.EndLocation);
@@ -467,9 +467,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
break;
case BraceStyle.EndOfLineWithoutSpace:
- prev = lbrace.GetPrevNode();
- while (prev is NewLineNode)
- prev = prev.GetPrevNode();
+ prev = lbrace.GetPrevNode (NoWhitespacePredicate);
if (prev is PreProcessorDirective)
return;
prevOffset = document.GetOffset(prev.EndLocation);
@@ -478,9 +476,7 @@ namespace ICSharpCode.NRefactory.CSharp
break;
case BraceStyle.NextLine:
- prev = lbrace.GetPrevNode();
- while (prev is NewLineNode)
- prev = prev.GetPrevNode();
+ prev = lbrace.GetPrevNode (NoWhitespacePredicate);
if (prev is PreProcessorDirective)
return;
prevOffset = document.GetOffset(prev.EndLocation);
@@ -488,9 +484,7 @@ namespace ICSharpCode.NRefactory.CSharp
AddChange(prevOffset, braceOffset - prevOffset, options.EolMarker + curIndent.IndentString);
break;
case BraceStyle.NextLineShifted:
- prev = lbrace.GetPrevNode();
- while (prev is NewLineNode)
- prev = prev.GetPrevNode();
+ prev = lbrace.GetPrevNode (NoWhitespacePredicate);
if (prev is PreProcessorDirective)
return;
prevOffset = document.GetOffset(prev.EndLocation);
@@ -500,9 +494,7 @@ namespace ICSharpCode.NRefactory.CSharp
curIndent.Pop();
break;
case BraceStyle.NextLineShifted2:
- prev = lbrace.GetPrevNode();
- while (prev is NewLineNode)
- prev = prev.GetPrevNode();
+ prev = lbrace.GetPrevNode (NoWhitespacePredicate);
if (prev is PreProcessorDirective)
return;
prevOffset = document.GetOffset(prev.EndLocation);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Expressions.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Expressions.cs
index d1e9b01..5f6827d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Expressions.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Expressions.cs
@@ -262,6 +262,20 @@ namespace ICSharpCode.NRefactory.CSharp
rParToken = oce.RParToken;
lParToken = oce.LParToken;
arguments = oce.Arguments.Cast<AstNode> ().ToList ();
+ } else if (node is Attribute) {
+ var oce = node as Attribute;
+ methodCallArgumentWrapping = policy.MethodCallArgumentWrapping;
+ newLineAferMethodCallOpenParentheses = policy.NewLineAferMethodCallOpenParentheses;
+ doAlignToFirstArgument = policy.AlignToFirstMethodCallArgument;
+ methodClosingParenthesesOnNewLine = policy.MethodCallClosingParenthesesOnNewLine;
+ spaceWithinMethodCallParentheses = policy.SpacesWithinNewParentheses;
+ spaceAfterMethodCallParameterComma = policy.SpaceAfterNewParameterComma;
+ spaceBeforeMethodCallParameterComma = policy.SpaceBeforeNewParameterComma;
+ spaceWithinEmptyParentheses = policy.SpacesBetweenEmptyNewParentheses;
+
+ rParToken = oce.RParToken;
+ lParToken = oce.LParToken;
+ arguments = oce.Arguments.Cast<AstNode> ().ToList ();
} else {
InvocationExpression invocationExpression = node as InvocationExpression;
methodCallArgumentWrapping = policy.MethodCallArgumentWrapping;
@@ -286,27 +300,35 @@ namespace ICSharpCode.NRefactory.CSharp
doAlignToFirstArgument = false;
argumentStart = 0;
}
-
bool wrapMethodCall = DoWrap(methodCallArgumentWrapping, rParToken, arguments.Count);
if (wrapMethodCall && arguments.Any()) {
if (ShouldBreakLine (newLineAferMethodCallOpenParentheses, lParToken)) {
curIndent.Push(IndentType.Continuation);
foreach (var arg in arguments) {
FixStatementIndentation(arg.StartLocation);
+ arg.AcceptVisitor(this);
}
curIndent.Pop();
} else {
if (!doAlignToFirstArgument) {
curIndent.Push(IndentType.Continuation);
+ foreach (var arg in arguments.Take (argumentStart)) {
+ arg.AcceptVisitor(this);
+ }
foreach (var arg in arguments.Skip (argumentStart)) {
FixStatementIndentation(arg.StartLocation);
+ arg.AcceptVisitor(this);
}
curIndent.Pop();
} else {
int extraSpaces = arguments.First().StartLocation.Column - 1 - curIndent.IndentString.Length;
curIndent.ExtraSpaces += extraSpaces;
+ foreach (var arg in arguments.Take (argumentStart)) {
+ arg.AcceptVisitor(this);
+ }
foreach (var arg in arguments.Skip(argumentStart)) {
FixStatementIndentation(arg.StartLocation);
+ arg.AcceptVisitor(this);
}
curIndent.ExtraSpaces -= extraSpaces;
}
@@ -320,6 +342,9 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
} else {
+ foreach (var arg in arguments.Take (argumentStart)) {
+ arg.AcceptVisitor(this);
+ }
foreach (var arg in arguments.Skip(argumentStart)) {
if (arg.GetPrevSibling(NoWhitespacePredicate) != null) {
if (methodCallArgumentWrapping == Wrapping.DoNotWrap) {
@@ -333,7 +358,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (arg.PrevSibling.StartLocation.Line == arg.StartLocation.Line) {
ForceSpacesBefore(arg, spaceAfterMethodCallParameterComma && arg.GetPrevSibling(NoWhitespacePredicate).Role == Roles.Comma);
} else {
- int extraSpaces = arguments.First().StartLocation.Column - 1 - curIndent.IndentString.Length;
+ int extraSpaces = Math.Max (0, arguments.First().StartLocation.Column - 1 - curIndent.IndentString.Length);
curIndent.ExtraSpaces += extraSpaces;
FixStatementIndentation(arg.StartLocation);
curIndent.ExtraSpaces -= extraSpaces;
@@ -512,11 +537,13 @@ namespace ICSharpCode.NRefactory.CSharp
continue;
}
if (child.Role == Roles.Expression) {
- if (child.PrevSibling.Role == Roles.NewLine)
- FixIndentation(child);
- if (child.PrevSibling.Role == Roles.Comma)
- ForceSpaceBefore(child, true);
- if (child.NextSibling.Role == Roles.Comma)
+ if (child.PrevSibling != null) {
+ if (child.PrevSibling.Role == Roles.NewLine)
+ FixIndentation(child);
+ if (child.PrevSibling.Role == Roles.Comma)
+ ForceSpaceBefore(child, true);
+ }
+ if (child.NextSibling != null && child.NextSibling.Role == Roles.Comma)
ForceSpacesAfter(child, false);
continue;
}
@@ -542,7 +569,10 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
{
- ForceSpacesAfter(memberReferenceExpression.DotToken, false);
+ var dot = memberReferenceExpression.DotToken;
+ if (dot.PrevSibling.EndLocation.Line == dot.StartLocation.Line)
+ ForceSpacesBefore(dot, false);
+ ForceSpacesAfter(dot, false);
base.VisitMemberReferenceExpression(memberReferenceExpression);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs
index 980f2fe..7641645 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs
@@ -23,7 +23,6 @@
// 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.Linq;
@@ -47,19 +46,43 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitSyntaxTree(SyntaxTree unit)
{
bool first = true;
- VisitChildrenToFormat (unit, child => {
+ VisitChildrenToFormat(unit, child => {
if (first && (child is UsingDeclaration || child is UsingAliasDeclaration)) {
- EnsureBlankLinesBefore (child, policy.BlankLinesBeforeUsings);
+ EnsureBlankLinesBefore(child, policy.BlankLinesBeforeUsings);
first = false;
}
if (NoWhitespacePredicate(child))
FixIndentation(child);
child.AcceptVisitor(this);
if (NoWhitespacePredicate(child))
- EnsureNewLinesAfter(child, GetGlobalNewLinesFor (child));
+ EnsureNewLinesAfter(child, GetGlobalNewLinesFor(child));
+ });
+ }
+
+ public override void VisitAttributeSection(AttributeSection attributeSection)
+ {
+ VisitChildrenToFormat(attributeSection, child => {
+ child.AcceptVisitor(this);
+ if (child.NextSibling != null && child.NextSibling.Role == Roles.RBracket) {
+ ForceSpacesAfter(child, false);
+ }
});
}
+ public override void VisitAttribute(Attribute attribute)
+ {
+ if (attribute.HasArgumentList) {
+ ForceSpacesBefore(attribute.LParToken, policy.SpaceBeforeMethodCallParentheses);
+ if (attribute.Arguments.Any()) {
+ ForceSpacesAfter(attribute.LParToken, policy.SpaceWithinMethodCallParentheses);
+ } else {
+ ForceSpacesAfter(attribute.LParToken, policy.SpaceBetweenEmptyMethodCallParentheses);
+ ForceSpacesBefore(attribute.RParToken, policy.SpaceBetweenEmptyMethodCallParentheses);
+ }
+ FormatArguments(attribute);
+ }
+ }
+
public override void VisitUsingDeclaration(UsingDeclaration usingDeclaration)
{
ForceSpacesAfter(usingDeclaration.UsingToken, true);
@@ -79,9 +102,13 @@ namespace ICSharpCode.NRefactory.CSharp
curIndent.Push(IndentType.Block);
bool first = true;
- VisitChildrenToFormat (namespaceDeclaration, child => {
+ bool startFormat = false;
+ VisitChildrenToFormat(namespaceDeclaration, child => {
+ if (first) {
+ startFormat = child.StartLocation > namespaceDeclaration.LBraceToken.StartLocation;
+ }
if (child.Role == Roles.LBrace) {
- var next = child.GetNextSibling (NoWhitespacePredicate);
+ var next = child.GetNextSibling(NoWhitespacePredicate);
var blankLines = 1;
if (next is UsingDeclaration || next is UsingAliasDeclaration) {
blankLines += policy.BlankLinesBeforeUsings;
@@ -89,9 +116,14 @@ namespace ICSharpCode.NRefactory.CSharp
blankLines += policy.BlankLinesBeforeFirstDeclaration;
}
EnsureNewLinesAfter(child, blankLines);
+ startFormat = true;
+ return;
+ }
+ if (child.Role == Roles.RBrace) {
+ startFormat = false;
return;
}
- if (child.Role != NamespaceDeclaration.MemberRole)
+ if (!startFormat || !NoWhitespacePredicate (child))
return;
if (first && (child is UsingDeclaration || child is UsingAliasDeclaration)) {
// TODO: policy.BlankLinesBeforeUsings
@@ -101,31 +133,39 @@ namespace ICSharpCode.NRefactory.CSharp
FixIndentationForceNewLine(child);
child.AcceptVisitor(this);
if (NoWhitespacePredicate(child))
- EnsureNewLinesAfter(child, GetGlobalNewLinesFor (child));
+ EnsureNewLinesAfter(child, GetGlobalNewLinesFor(child));
});
if (policy.IndentNamespaceBody)
- curIndent.Pop ();
+ curIndent.Pop();
FixClosingBrace(policy.NamespaceBraceStyle, namespaceDeclaration.RBraceToken);
}
- void FixAttributes(EntityDeclaration entity)
+ void FixAttributesAndDocComment(EntityDeclaration entity)
{
+ var node = entity.FirstChild;
+ while (node != null && node.Role == Roles.Comment) {
+ node = node.GetNextSibling(NoWhitespacePredicate);
+ FixIndentation(node);
+ }
if (entity.Attributes.Count > 0) {
- AstNode n = null;;
+ AstNode n = null;
foreach (var attr in entity.Attributes.Skip (1)) {
FixIndentation(attr);
n = attr;
}
- if (n != null)
- FixIndentation(n.GetNextNode (NoWhitespacePredicate));
+ if (n != null) {
+ FixIndentation(n.GetNextNode(NoWhitespacePredicate));
+ } else {
+ FixIndentation(entity.Attributes.First().GetNextNode(NoWhitespacePredicate));
+ }
}
}
-
+
public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
{
- FixAttributes(typeDeclaration);
+ FixAttributesAndDocComment(typeDeclaration);
BraceStyle braceStyle;
bool indentBody = false;
switch (typeDeclaration.ClassType) {
@@ -148,20 +188,41 @@ namespace ICSharpCode.NRefactory.CSharp
default:
throw new InvalidOperationException("unsupported class type : " + typeDeclaration.ClassType);
}
+
+ foreach (var constraint in typeDeclaration.Constraints)
+ constraint.AcceptVisitor (this);
FixOpenBrace(braceStyle, typeDeclaration.LBraceToken);
if (indentBody)
curIndent.Push(IndentType.Block);
-
- VisitChildrenToFormat (typeDeclaration, child => {
- if (child.Role != Roles.TypeMemberRole)
+ bool startFormat = true;
+ bool first = true;
+ VisitChildrenToFormat(typeDeclaration, child => {
+ if (first) {
+ startFormat = child.StartLocation > typeDeclaration.LBraceToken.StartLocation;
+ first = false;
+ }
+ if (child.Role == Roles.LBrace) {
+ startFormat = true;
+ return;
+ }
+ if (child.Role == Roles.RBrace) {
+ startFormat = false;
+ return;
+ }
+ if (!startFormat || !NoWhitespacePredicate (child))
+ return;
+ if (child.Role == Roles.Comma) {
+ ForceSpacesBeforeRemoveNewLines (child, false);
+ EnsureNewLinesAfter(child, 1);
return;
+ }
if (NoWhitespacePredicate(child))
FixIndentationForceNewLine(child);
- child.AcceptVisitor (this);
- if (NoWhitespacePredicate(child))
- EnsureNewLinesAfter(child, GetTypeLevelNewLinesFor (child));
+ child.AcceptVisitor(this);
+ if (NoWhitespacePredicate(child) && child.GetNextSibling (NoWhitespacePredicate).Role != Roles.Comma)
+ EnsureNewLinesAfter(child, GetTypeLevelNewLinesFor(child));
});
if (indentBody)
@@ -174,7 +235,8 @@ namespace ICSharpCode.NRefactory.CSharp
{
var blankLines = 1;
var nextSibling = child.GetNextSibling(NoWhitespacePredicate);
-
+ if (child is PreProcessorDirective || child is Comment)
+ return 1;
if (child is EventDeclaration) {
if (nextSibling is EventDeclaration) {
blankLines += policy.BlankLinesBetweenEventFields;
@@ -198,7 +260,6 @@ namespace ICSharpCode.NRefactory.CSharp
if (nextSibling.Role == Roles.TypeMemberRole)
blankLines += policy.BlankLinesBetweenMembers;
-
return blankLines;
}
@@ -216,11 +277,26 @@ namespace ICSharpCode.NRefactory.CSharp
base.VisitDelegateDeclaration(delegateDeclaration);
}
-
+
public override void VisitComment(Comment comment)
{
if (comment.StartsLine && !HadErrors && (!policy.KeepCommentsAtFirstColumn || comment.StartLocation.Column > 1))
FixIndentation(comment);
}
+
+ public override void VisitConstraint(Constraint constraint)
+ {
+ VisitChildrenToFormat (constraint, node => {
+ if (node is AstType) {
+ node.AcceptVisitor (this);
+ } else if (node.Role == Roles.LPar) {
+ ForceSpacesBefore (node, false);
+ ForceSpacesAfter (node, false);
+ } else if (node.Role ==Roles.Comma) {
+ ForceSpacesBefore (node, false);
+ ForceSpacesAfter (node, true);
+ }
+ });
+ }
}
}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Statements.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Statements.cs
index 7cb0677..340c220 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Statements.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Statements.cs
@@ -177,7 +177,7 @@ namespace ICSharpCode.NRefactory.CSharp
for (int offset = startOffset - 1; offset >= 0; offset--) {
char ch = document.GetCharAt(offset);
if (ch != ' ' && ch != '\t') {
- return ch == '\n' || ch == '\r';
+ return NewLine.IsNewLine (ch);
}
}
return true;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs
index 0a7671c..4154504 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs
@@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
{
- FixAttributes(propertyDeclaration);
+ FixAttributesAndDocComment(propertyDeclaration);
bool oneLine = false;
bool fixClosingBrace = false;
switch (policy.PropertyFormatting) {
@@ -158,7 +158,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitAccessor(Accessor accessor)
{
- FixAttributes(accessor);
+ FixAttributesAndDocComment(accessor);
base.VisitAccessor(accessor);
}
@@ -166,7 +166,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
{
- FixAttributes(indexerDeclaration);
+ FixAttributesAndDocComment(indexerDeclaration);
ForceSpacesBefore(indexerDeclaration.LBracketToken, policy.SpaceBeforeIndexerDeclarationBracket);
ForceSpacesAfter(indexerDeclaration.LBracketToken, policy.SpaceWithinIndexerDeclarationBracket);
@@ -217,7 +217,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
{
- FixAttributes(eventDeclaration);
+ FixAttributesAndDocComment(eventDeclaration);
FixOpenBrace(policy.EventBraceStyle, eventDeclaration.LBraceToken);
if (policy.IndentEventBody)
@@ -259,8 +259,16 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
{
- FixAttributes(eventDeclaration);
+ FixAttributesAndDocComment(eventDeclaration);
+ foreach (var m in eventDeclaration.ModifierTokens) {
+ ForceSpacesAfter(m, true);
+ }
+
+ ForceSpacesBeforeRemoveNewLines(eventDeclaration.EventToken.GetNextSibling (NoWhitespacePredicate), true);
+ eventDeclaration.ReturnType.AcceptVisitor(this);
+ ForceSpacesAfter(eventDeclaration.ReturnType, true);
+ /*
var lastLoc = eventDeclaration.StartLocation;
curIndent.Push(IndentType.Block);
foreach (var initializer in eventDeclaration.Variables) {
@@ -271,19 +279,21 @@ namespace ICSharpCode.NRefactory.CSharp
initializer.AcceptVisitor(this);
}
curIndent.Pop ();
+ */
+ FixSemicolon(eventDeclaration.SemicolonToken);
}
public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
{
- FixAttributes(fieldDeclaration);
+ FixAttributesAndDocComment(fieldDeclaration);
fieldDeclaration.ReturnType.AcceptVisitor(this);
ForceSpacesAfter(fieldDeclaration.ReturnType, true);
FormatCommas(fieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma);
- var lastLoc = fieldDeclaration.StartLocation;
+ var lastLoc = fieldDeclaration.ReturnType.StartLocation;
foreach (var initializer in fieldDeclaration.Variables) {
if (lastLoc.Line != initializer.StartLocation.Line) {
curIndent.Push(IndentType.Block);
@@ -293,11 +303,12 @@ namespace ICSharpCode.NRefactory.CSharp
}
initializer.AcceptVisitor(this);
}
+ FixSemicolon(fieldDeclaration.SemicolonToken);
}
public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
{
- FixAttributes(fixedFieldDeclaration);
+ FixAttributesAndDocComment(fixedFieldDeclaration);
FormatCommas(fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma);
@@ -311,18 +322,22 @@ namespace ICSharpCode.NRefactory.CSharp
initializer.AcceptVisitor(this);
}
curIndent.Pop ();
+ FixSemicolon(fixedFieldDeclaration.SemicolonToken);
}
public override void VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration)
{
- FixAttributes(enumMemberDeclaration);
-
- base.VisitEnumMemberDeclaration(enumMemberDeclaration);
+ FixAttributesAndDocComment(enumMemberDeclaration);
+ var initializer = enumMemberDeclaration.Initializer;
+ if (!initializer.IsNull) {
+ ForceSpacesAround(enumMemberDeclaration.AssignToken, policy.SpaceAroundAssignment);
+ initializer.AcceptVisitor (this);
+ }
}
public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
{
- FixAttributes(methodDeclaration);
+ FixAttributesAndDocComment(methodDeclaration);
ForceSpacesBefore(methodDeclaration.LParToken, policy.SpaceBeforeMethodDeclarationParentheses);
if (methodDeclaration.Parameters.Any()) {
@@ -332,6 +347,9 @@ namespace ICSharpCode.NRefactory.CSharp
ForceSpacesAfter(methodDeclaration.LParToken, policy.SpaceBetweenEmptyMethodDeclarationParentheses);
ForceSpacesBefore(methodDeclaration.RParToken, policy.SpaceBetweenEmptyMethodDeclarationParentheses);
}
+
+ foreach (var constraint in methodDeclaration.Constraints)
+ constraint.AcceptVisitor (this);
if (!methodDeclaration.Body.IsNull) {
FixOpenBrace(policy.MethodBraceStyle, methodDeclaration.Body.LBraceToken);
@@ -342,7 +360,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
{
- FixAttributes(operatorDeclaration);
+ FixAttributesAndDocComment(operatorDeclaration);
ForceSpacesBefore(operatorDeclaration.LParToken, policy.SpaceBeforeMethodDeclarationParentheses);
if (operatorDeclaration.Parameters.Any()) {
@@ -362,7 +380,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
{
- FixAttributes(constructorDeclaration);
+ FixAttributesAndDocComment(constructorDeclaration);
ForceSpacesBefore(constructorDeclaration.LParToken, policy.SpaceBeforeConstructorDeclarationParentheses);
if (constructorDeclaration.Parameters.Any()) {
@@ -382,7 +400,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
{
- FixAttributes(destructorDeclaration);
+ FixAttributesAndDocComment(destructorDeclaration);
CSharpTokenNode lParen = destructorDeclaration.LParToken;
ForceSpaceBefore(lParen, policy.SpaceBeforeConstructorDeclarationParentheses);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/Indent.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/Indent.cs
index 52bdf3f..4b9bfa9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/Indent.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/Indent.cs
@@ -126,7 +126,7 @@ namespace ICSharpCode.NRefactory.CSharp
void Update()
{
if (options.TabsToSpaces) {
- indentString = new string(' ', curIndent);
+ indentString = new string(' ', curIndent + ExtraSpaces);
return;
}
indentString = new string('\t', curIndent / options.TabSize) + new string(' ', curIndent % options.TabSize) + new string(' ', ExtraSpaces);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj b/external/nrefactory/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj
index 622e821..4b5f250 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj
@@ -42,11 +42,13 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <OutputPath>..\bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ <OutputPath>..\bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Debug' ">
<Optimize>False</Optimize>
@@ -59,6 +61,7 @@
<DebugSymbols>True</DebugSymbols>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <OutputPath>..\bin\net_4_5_Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Release' ">
<Optimize>True</Optimize>
@@ -70,6 +73,7 @@
<DebugType>none</DebugType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <OutputPath>..\bin\net_4_5_Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -115,7 +119,6 @@
<Compile Include="Ast\Expressions\ConditionalExpression.cs" />
<Compile Include="Ast\Expressions\DefaultValueExpression.cs" />
<Compile Include="Ast\Expressions\DirectionExpression.cs" />
- <Compile Include="Ast\Expressions\EmptyExpression.cs" />
<Compile Include="Ast\Expressions\Expression.cs" />
<Compile Include="Ast\Expressions\IdentifierExpression.cs" />
<Compile Include="Ast\Expressions\IndexerExpression.cs" />
@@ -280,6 +283,7 @@
<Compile Include="Refactoring\CodeActions\ConvertSwitchToIfAction.cs" />
<Compile Include="Refactoring\CodeActions\CreateCustomEventImplementationAction.cs" />
<Compile Include="Refactoring\CodeActions\CreateOverloadWithoutParameterAction.cs" />
+ <Compile Include="Refactoring\CodeActions\ImplementNotImplementedProperty.cs" />
<Compile Include="Refactoring\CodeActions\JoinDeclarationAndAssignmentAction.cs" />
<Compile Include="Refactoring\CodeActions\JoinStringAction.cs" />
<Compile Include="Refactoring\CodeActions\MergeNestedIfAction.cs" />
@@ -287,48 +291,56 @@
<Compile Include="Refactoring\CodeActions\PutInsideUsingAction.cs" />
<Compile Include="Refactoring\CodeActions\SplitDeclarationListAction.cs" />
<Compile Include="Refactoring\CodeActions\UseStringFormatAction.cs" />
- <Compile Include="Refactoring\CodeIssues\AccessToClosureIssues\AccessToClosureIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\AccessToClosureIssues\AccessToDisposedClosureIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\AccessToClosureIssues\AccessToModifiedClosureIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\AccessToClosureIssues\LocalVariableNamePicker.cs" />
- <Compile Include="Refactoring\CodeIssues\AssignmentMadeToSameVariableIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\BitwiseOperationOnNonFlagsEnumIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CastExpressionOfIncompatibleTypeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CompareBooleanWithTrueOrFalseIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CompareFloatWithEqualityOperatorIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ConstantConditionIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\DoubleNegationIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ExpressionIsAlwaysOfProvidedTypeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ExpressionIsNeverOfProvidedTypeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ExpressionOfCompatibleTypeCastIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\MethodNeverReturnsIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\MethodOverloadHidesOptionalParameterIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\MissingStringComparisonIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\NegativeRelationalExpressionIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ExplicitConversionInForEachIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ForControlVariableNotModifiedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\IdenticalConditionalBranchIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\MultipleEnumerationIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantArrayInitializerCommaIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantAssignmentIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantAttributeParenthesesIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantCaseLabelIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantElseIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantFieldInitializerIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantObjectCreationArgumentListIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantObjectOrCollectionInitializerIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantTypeCastIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ReferenceEqualsCalledWithValueTypeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ResultOfAsyncCallShouldNotBeIgnoredIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\UnreachableCodeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableHidesMemberIssue\LocalVariableHidesMemberIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableHidesMemberIssue\ParameterHidesMemberIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableHidesMemberIssue\VariableHidesMemberIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableNotUsedIssues\LocalVariableNotUsedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableNotUsedIssues\ParameterNotUsedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\TypeParameterNotUsedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableOnlyAssignedIssues\ParameterOnlyAssignedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableOnlyAssignedIssues\VariableOnlyAssignedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\AccessToClosureIssues\AccessToClosureIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\AccessToClosureIssues\AccessToDisposedClosureIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\AccessToClosureIssues\AccessToModifiedClosureIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\AccessToClosureIssues\LocalVariableNamePicker.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CompilerWarnings\CS1717AssignmentMadeToSameVariableIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\BitwiseOperationOnNonFlagsEnumIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CastExpressionOfIncompatibleTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CompareBooleanWithTrueOrFalseIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CompareFloatWithEqualityOperatorIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CompilerErrors\CS0029InvalidConversionIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CompilerErrors\CS1729TypeHasNoConstructorWithNArgumentsIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ConstantConditionIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\DoubleNegationOperatorIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ExpressionIsAlwaysOfProvidedTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ExpressionIsNeverOfProvidedTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\MethodNeverReturnsIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\MethodOverloadHidesOptionalParameterIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\MissingStringComparisonIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\NegativeRelationalExpressionIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ExplicitConversionInForEachIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\ForControlVariableIsNeverModifiedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\ConditionalTernaryEqualBranchIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\MultipleEnumerationIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantCommaInArrayInitializerIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\RedundantAssignmentIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\RedundantAttributeParenthesesIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantCaseLabelIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantIfElseBlockIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInDeclaration\RedundantDefaultFieldInitializerIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\RedundantObjectCreationArgumentListIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantObjectOrCollectionInitializerIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToFirstIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToFirstOrDefaultIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToLastIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToLastOrDefaultIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToLongCountIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToSingleIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToSingleOrDefaultIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantCastIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ReferenceEqualsCalledWithValueTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ResultOfAsyncCallShouldNotBeIgnoredIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToCountIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\UnreachableCodeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\LocalVariableHidesMemberIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\ParameterHidesMemberIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInDeclaration\LocalVariableNotUsedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\VariableNotUsedIssues\ParameterNotUsedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInDeclaration\UnusedTypeParameterIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\VariableOnlyAssignedIssues\ParameterOnlyAssignedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\VariableOnlyAssignedIssues\VariableOnlyAssignedIssue.cs" />
<Compile Include="Refactoring\DocumentScript.cs" />
<Compile Include="Refactoring\CodeActions\ExtractAnonymousMethodAction.cs" />
<Compile Include="Refactoring\UsingHelper.cs" />
@@ -360,6 +372,7 @@
<Compile Include="Resolver\NodeListResolveVisitorNavigator.cs" />
<Compile Include="Resolver\OverloadResolution.cs" />
<Compile Include="Resolver\OverloadResolutionErrors.cs" />
+ <Compile Include="Resolver\RenameCallbackArguments.cs" />
<Compile Include="Resolver\ResolveAtLocation.cs" />
<Compile Include="Resolver\ResolveVisitor.cs" />
<Compile Include="Resolver\TypeInference.cs" />
@@ -401,18 +414,16 @@
<Compile Include="Refactoring\ContextActionAttribute.cs" />
<Compile Include="Refactoring\IssueAttribute.cs" />
<Compile Include="Refactoring\CodeIssues\IssueCategories.cs" />
- <Compile Include="Refactoring\Severity.cs" />
- <Compile Include="Refactoring\IssueMarker.cs" />
<Compile Include="Refactoring\CodeIssues\GatherVisitorBase.cs" />
- <Compile Include="Refactoring\CodeIssues\ConditionalToNullCoalescingIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\NotImplementedExceptionIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantInternalIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantNamespaceUsageIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantPrivateIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantThisIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantUsingIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\StringIsNullOrEmptyIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\UseVarKeywordIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\Opportunities\ConvertConditionalTernaryToNullCoalescingIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\NotImplementedExceptionIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\RedundantInternalIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantNameQualifierIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\RedundantPrivateIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantThisQualifierIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantUsingDirectiveIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithStringIsNullOrEmptyIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\Opportunities\SuggestUseVarKeywordEvidentIssue.cs" />
<Compile Include="Refactoring\CodeActions\UseVarKeywordAction.cs" />
<Compile Include="Refactoring\CodeActions\UseExplicitTypeAction.cs" />
<Compile Include="Refactoring\CodeActions\SplitStringAction.cs" />
@@ -438,17 +449,17 @@
<Compile Include="Refactoring\CodeActions\ConvertDecToHexAction.cs" />
<Compile Include="Refactoring\CodeActions\CheckIfParameterIsNullAction.cs" />
<Compile Include="Refactoring\CodeActions\AddAnotherAccessorAction.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\NamingStyle.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\NamingRule.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\AffectedEntity.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\DefaultRules.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\InconsistentNamingIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\NamingStyle.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\NamingRule.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\AffectedEntity.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\DefaultRules.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\InconsistentNamingIssue.cs" />
<Compile Include="Refactoring\CodeActions\CreateMethodDeclarationAction.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\NamingConventionService.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\NamingConventionService.cs" />
<Compile Include="Refactoring\CodeActions\CreateIndexerAction.cs" />
<Compile Include="Refactoring\CodeActions\InlineLocalVariableAction.cs" />
<Compile Include="Refactoring\CodeActions\DeclareLocalVariableAction.cs" />
- <Compile Include="Refactoring\CodeIssues\InconsistentNamingIssue\WordParser.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\ConstraintViolations\InconsistentNamingIssue\WordParser.cs" />
<Compile Include="Refactoring\CodeActions\CreateConstructorDeclarationAction.cs" />
<Compile Include="Refactoring\CodeActions\CreateClassDeclarationAction.cs" />
<Compile Include="Refactoring\CodeActions\CreateDelegateAction.cs" />
@@ -468,43 +479,42 @@
<Compile Include="Refactoring\CodeActions\ImplementAbstractMembersAction.cs" />
<Compile Include="Refactoring\CodeActions\RemoveRedundantCatchTypeAction.cs" />
<Compile Include="Refactoring\CodeActions\AddCatchTypeAction.cs" />
- <Compile Include="Refactoring\CodeIssues\IncorrectExceptionParameterOrderingIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CallToVirtualFunctionFromConstructorIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\IncorrectExceptionParameterOrderingIssue.cs" />
<Compile Include="Refactoring\CodeActions\StaticMethodInvocationToExtensionMethodInvocationAction.cs" />
<Compile Include="Refactoring\CodeActions\ExtensionMethodInvocationToStaticMethodInvocationAction.cs" />
<Compile Include="Refactoring\CodeActions\IterateViaForeachAction.cs" />
<Compile Include="Refactoring\CodeActions\ExtractFieldAction.cs" />
<Compile Include="Completion\ICompletionContextProvider.cs" />
- <Compile Include="Refactoring\CodeIssues\ValueParameterUnusedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\ValueParameterNotUsedIssue.cs" />
<Compile Include="Refactoring\NamingHelper.cs" />
<Compile Include="Refactoring\CodeActions\ConvertToInitializer\ConvertToInitializerAction.cs" />
<Compile Include="Refactoring\CodeActions\ConvertToInitializer\StatementsToInitializerConverter.cs" />
<Compile Include="Refactoring\CodeActions\MoveToOuterScopeAction.cs" />
- <Compile Include="Refactoring\CodeIssues\VariableDeclaredInWideScopeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\ParameterCanBeDemotedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\ITypeCriterion.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\HasMemberCriterion.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\TypeCriteriaCollector.cs" />
- <Compile Include="Refactoring\CodeIssues\ReferenceToStaticMemberViaDerivedTypeIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\IsTypeCriterion.cs" />
- <Compile Include="Refactoring\CodeIssues\OptionalParameterCouldBeSkippedIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantCatchIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantToStringIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CallToObjectEqualsViaBaseIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\IncorrectCallToObjectGetHashCodeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\VariableDeclaredInWideScopeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\ParameterCanBeDemotedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\ITypeCriterion.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\HasMemberCriterion.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\TypeCriteriaCollector.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\AccessToStaticMemberViaDerivedTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\IsTypeCriterion.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\OptionalParameterCouldBeSkippedIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantCatchIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantToStringCallIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CallToObjectEqualsViaBaseIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\IncorrectCallToObjectGetHashCodeIssue.cs" />
<Compile Include="Refactoring\CodeActions\ExtractMethod\VariableUsageAnalyzation.cs" />
- <Compile Include="Refactoring\CodeIssues\FormatStringIssues\FormatStringIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\FormatStringIssues\FormatStringHelper.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\FormatStringIssues\FormatStringIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\FormatStringIssues\FormatStringHelper.cs" />
<Compile Include="Refactoring\CodeActions\ConvertToInitializer\ConvertInitializerToExplicitInitializationsAction.cs" />
- <Compile Include="Refactoring\CodeIssues\ExceptionRethrowIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ThreadStaticOnInstanceFieldIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\StaticFieldInGenericTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ExceptionRethrowIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\ThreadStaticAtInstanceFieldIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\StaticFieldInGenericTypeIssue.cs" />
<Compile Include="Parser\SeekableStreamReader.cs" />
<Compile Include="Refactoring\CodeActions\ConvertAnonymousDelegateToLambdaAction.cs" />
<Compile Include="Refactoring\CodeActions\ConvertLambdaToAnonymousDelegateAction.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\IsArrayTypeCriterion.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\SupportsIndexingCriterion.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantWhereWithPredicateIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\IsArrayTypeCriterion.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ParameterCanBeDemotedIssue\SupportsIndexingCriterion.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\ReplaceWithSingleCallToAnyIssue.cs" />
<Compile Include="Refactoring\CodeActions\ConvertToInitializer\AccessPath.cs" />
<Compile Include="Refactoring\LocalReferenceFinder.cs" />
<Compile Include="Refactoring\CodeActions\SortUsingsAction.cs" />
@@ -513,13 +523,11 @@
<Compile Include="Resolver\AliasTypeResolveResult.cs" />
<Compile Include="Resolver\AliasNamespaceResolveResult.cs" />
<Compile Include="Resolver\ReducedExtensionMethod.cs" />
- <Compile Include="Refactoring\CodeIssues\SimplifyAnonymousMethodToDelegateIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\CompilerErrors\CS0127ReturnMustNotBeFollowedByAnyExpression.cs" />
- <Compile Include="Analysis\AbiComparer.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\SimplifyAnonymousMethodToDelegateIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\CompilerErrors\CS0127ReturnMustNotBeFollowedByAnyExpression.cs" />
<Compile Include="Refactoring\CreateChangedEvent.cs" />
<Compile Include="Refactoring\CodeActions\SimplifyIfFlowAction.cs" />
<Compile Include="Refactoring\CodeActions\SimplifyIfInLoopsFlowAction.cs" />
- <Compile Include="Refactoring\CodeIssues\NoDefaultConstructorIssue.cs" />
<Compile Include="Refactoring\CodeActions\InvertIfAndSimplify.cs" />
<Compile Include="Formatter\CSharpFormatter.cs" />
<Compile Include="Formatter\FormattingVisitor.cs" />
@@ -528,17 +536,23 @@
<Compile Include="Formatter\FormattingVisitor_Statements.cs" />
<Compile Include="Formatter\FormattingVisitor_Expressions.cs" />
<Compile Include="Formatter\FormattingChanges.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantNullCheckIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ConstructorIssues\StaticConstructorParameterIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ConstructorIssues\StaticConstructorAccessModifierIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\RedundantBaseConstructorIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ConstructorIssues\RedudantConstructorIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ConstructorIssues\PublicConstructorInAbstractClass.cs" />
- <Compile Include="Refactoring\CodeIssues\ConvertToStaticMethodIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\ParameterCanBeDemotedIssue\ParameterCanBeIEnumerableIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\DuplicateBodyMethodIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\DuplicateExpressionsInConditionsIssue.cs" />
- <Compile Include="Refactoring\CodeIssues\DuplicateIfInIfChainIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInCode\RedundantComparisonWithNullIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ConstructorIssues\StaticConstructorParameterIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\ConstructorIssues\StaticConstructorAccessModifierIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInDeclaration\RedundantBaseConstructorCallIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\RedundanciesInDeclaration\EmptyConstructorIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\PracticesAndImprovements\PublicConstructorInAbstractClass.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\ConvertToStaticMethodIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\ParameterCanBeIEnumerableIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\NotWorking\DuplicateBodyMethodIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\DuplicateExpressionsInConditionsIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\DuplicateIfInIfChainIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\UseBlockInsteadColonIssue.cs" />
+ <Compile Include="Refactoring\CodeIssues\Custom\LockThisIssue.cs" />
+ <Compile Include="Refactoring\CodeActions\AutoLinqSumAction.cs" />
+ <Compile Include="Refactoring\CodeIssues\Uncategorized\DisposeMethodInNonIDisposableTypeIssue.cs" />
+ <Compile Include="Refactoring\CodeActions\ConvertIfToNullCoalescingAction.cs" />
+ <Compile Include="Refactoring\CodeIssues\Synced\CodeQuality\DoNotCallOverridableMethodsInConstructorIssue.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpAmbience.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpAmbience.cs
index ac7f623..7a94b2e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpAmbience.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpAmbience.cs
@@ -96,7 +96,7 @@ namespace ICSharpCode.NRefactory.CSharp
WriteMemberDeclarationName((IMember)entity, formatter, formattingPolicy);
if ((ConversionFlags & ConversionFlags.ShowParameterList) == ConversionFlags.ShowParameterList && HasParameters(entity)) {
- formatter.WriteToken(entity.EntityType == EntityType.Indexer ? "[" : "(");
+ formatter.WriteToken(entity.SymbolKind == SymbolKind.Indexer ? "[" : "(");
bool first = true;
foreach (var param in node.GetChildrenByRole(Roles.Parameter)) {
if (first) {
@@ -107,7 +107,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
param.AcceptVisitor(new CSharpOutputVisitor(formatter, formattingPolicy));
}
- formatter.WriteToken(entity.EntityType == EntityType.Indexer ? "]" : ")");
+ formatter.WriteToken(entity.SymbolKind == SymbolKind.Indexer ? "]" : ")");
}
if ((ConversionFlags & ConversionFlags.ShowBody) == ConversionFlags.ShowBody && !(node is TypeDeclaration)) {
@@ -135,14 +135,14 @@ namespace ICSharpCode.NRefactory.CSharp
bool HasParameters(IEntity e)
{
- switch (e.EntityType) {
- case EntityType.TypeDefinition:
+ switch (e.SymbolKind) {
+ case SymbolKind.TypeDefinition:
return ((ITypeDefinition)e).Kind == TypeKind.Delegate;
- case EntityType.Indexer:
- case EntityType.Method:
- case EntityType.Operator:
- case EntityType.Constructor:
- case EntityType.Destructor:
+ case SymbolKind.Indexer:
+ case SymbolKind.Method:
+ case SymbolKind.Operator:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
return true;
default:
return false;
@@ -184,18 +184,18 @@ namespace ICSharpCode.NRefactory.CSharp
ConvertType(member.DeclaringType, formatter, formattingPolicy);
formatter.WriteToken(".");
}
- switch (member.EntityType) {
- case EntityType.Indexer:
+ switch (member.SymbolKind) {
+ case SymbolKind.Indexer:
formatter.WriteKeyword("this");
break;
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
formatter.WriteIdentifier(member.DeclaringType.Name);
break;
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
formatter.WriteToken("~");
formatter.WriteIdentifier(member.DeclaringType.Name);
break;
- case EntityType.Operator:
+ case SymbolKind.Operator:
switch (member.Name) {
case "op_Implicit":
formatter.WriteKeyword("implicit");
@@ -226,7 +226,7 @@ namespace ICSharpCode.NRefactory.CSharp
formatter.WriteIdentifier(member.Name);
break;
}
- if ((ConversionFlags & ConversionFlags.ShowTypeParameterList) == ConversionFlags.ShowTypeParameterList && member.EntityType == EntityType.Method) {
+ if ((ConversionFlags & ConversionFlags.ShowTypeParameterList) == ConversionFlags.ShowTypeParameterList && member.SymbolKind == SymbolKind.Method) {
var outputVisitor = new CSharpOutputVisitor(formatter, formattingPolicy);
outputVisitor.WriteTypeParameters(astBuilder.ConvertEntity(member).GetChildrenByRole(Roles.TypeParameter));
}
@@ -247,7 +247,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
TypeSystemAstBuilder astBuilder = CreateAstBuilder();
AstNode astNode = astBuilder.ConvertVariable(v);
- return astNode.GetText().TrimEnd(';', '\r', '\n');
+ return astNode.ToString().TrimEnd(';', '\r', '\n', (char)8232);
}
public string ConvertType(IType type)
@@ -257,7 +257,7 @@ namespace ICSharpCode.NRefactory.CSharp
TypeSystemAstBuilder astBuilder = CreateAstBuilder();
AstType astType = astBuilder.ConvertType(type);
- return astType.GetText();
+ return astType.ToString();
}
public void ConvertType(IType type, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
@@ -267,6 +267,11 @@ namespace ICSharpCode.NRefactory.CSharp
astType.AcceptVisitor(new CSharpOutputVisitor(formatter, formattingPolicy));
}
+ public string ConvertConstantValue(object constantValue)
+ {
+ return CSharpOutputVisitor.PrintPrimitiveValue(constantValue);
+ }
+
public string WrapComment(string comment)
{
return "// " + comment;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs
index c0c6f4b..b8ffc4b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs
@@ -989,12 +989,6 @@ namespace ICSharpCode.NRefactory.CSharp
EndNode(pointerReferenceExpression);
}
- public void VisitEmptyExpression(EmptyExpression emptyExpression)
- {
- StartNode(emptyExpression);
- EndNode(emptyExpression);
- }
-
#region VisitPrimitiveExpression
public void VisitPrimitiveExpression(PrimitiveExpression primitiveExpression)
{
@@ -1465,7 +1459,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
StartNode(namespaceDeclaration);
WriteKeyword(Roles.NamespaceKeyword);
- WriteQualifiedIdentifier(namespaceDeclaration.Identifiers);
+ namespaceDeclaration.NamespaceName.AcceptVisitor (this);
OpenBrace(policy.NamespaceBraceStyle);
foreach (var member in namespaceDeclaration.Members) {
member.AcceptVisitor(this);
@@ -2597,18 +2591,18 @@ namespace ICSharpCode.NRefactory.CSharp
StartNode(documentationReference);
if (!documentationReference.DeclaringType.IsNull) {
documentationReference.DeclaringType.AcceptVisitor(this);
- if (documentationReference.EntityType != EntityType.TypeDefinition) {
+ if (documentationReference.SymbolKind != SymbolKind.TypeDefinition) {
WriteToken(Roles.Dot);
}
}
- switch (documentationReference.EntityType) {
- case EntityType.TypeDefinition:
+ switch (documentationReference.SymbolKind) {
+ case SymbolKind.TypeDefinition:
// we already printed the DeclaringType
break;
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
WriteKeyword(IndexerDeclaration.ThisKeywordRole);
break;
- case EntityType.Operator:
+ case SymbolKind.Operator:
var opType = documentationReference.OperatorType;
if (opType == OperatorType.Explicit) {
WriteKeyword(OperatorDeclaration.ExplicitRole);
@@ -2630,7 +2624,7 @@ namespace ICSharpCode.NRefactory.CSharp
WriteTypeArguments(documentationReference.TypeArguments);
if (documentationReference.HasParameterList) {
Space(policy.SpaceBeforeMethodDeclarationParentheses);
- if (documentationReference.EntityType == EntityType.Indexer) {
+ if (documentationReference.SymbolKind == SymbolKind.Indexer) {
WriteCommaSeparatedListInBrackets(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses);
} else {
WriteCommaSeparatedListInParenthesis(documentationReference.Parameters, policy.SpaceWithinMethodDeclarationParentheses);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs
index 513496c..096a267 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs
@@ -144,7 +144,7 @@ namespace ICSharpCode.NRefactory.CSharp
return result.ToArray();
}
- CodeTypeReference Convert(IType type)
+ public CodeTypeReference Convert(IType type)
{
if (type.Kind == TypeKind.Array) {
ArrayType a = (ArrayType)type;
@@ -591,11 +591,6 @@ namespace ICSharpCode.NRefactory.CSharp
return MakeSnippetExpression(uncheckedExpression);
}
- CodeObject IAstVisitor<CodeObject>.VisitEmptyExpression(EmptyExpression emptyExpression)
- {
- return null;
- }
-
CodeObject IAstVisitor<CodeObject>.VisitQueryExpression(QueryExpression queryExpression)
{
return MakeSnippetExpression(queryExpression);
@@ -685,7 +680,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
{
CodeTypeDelegate d = new CodeTypeDelegate(delegateDeclaration.Name);
- d.Attributes = ConvertMemberAttributes(delegateDeclaration.Modifiers, EntityType.TypeDefinition);
+ d.Attributes = ConvertMemberAttributes(delegateDeclaration.Modifiers, SymbolKind.TypeDefinition);
d.CustomAttributes.AddRange(Convert(delegateDeclaration.Attributes));
d.ReturnType = Convert(delegateDeclaration.ReturnType);
d.Parameters.AddRange(Convert(delegateDeclaration.Parameters));
@@ -693,14 +688,14 @@ namespace ICSharpCode.NRefactory.CSharp
return d;
}
- MemberAttributes ConvertMemberAttributes(Modifiers modifiers, EntityType entityType)
+ MemberAttributes ConvertMemberAttributes(Modifiers modifiers, SymbolKind symbolKind)
{
MemberAttributes a = 0;
if ((modifiers & Modifiers.Abstract) != 0)
a |= MemberAttributes.Abstract;
if ((modifiers & Modifiers.Sealed) != 0)
a |= MemberAttributes.Final;
- if (entityType != EntityType.TypeDefinition && (modifiers & (Modifiers.Abstract | Modifiers.Override | Modifiers.Virtual)) == 0)
+ if (symbolKind != SymbolKind.TypeDefinition && (modifiers & (Modifiers.Abstract | Modifiers.Override | Modifiers.Virtual)) == 0)
a |= MemberAttributes.Final;
if ((modifiers & Modifiers.Static) != 0)
a |= MemberAttributes.Static;
@@ -748,7 +743,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
//bool isNestedType = typeStack.Count > 0;
CodeTypeDeclaration typeDecl = new CodeTypeDeclaration(typeDeclaration.Name);
- typeDecl.Attributes = ConvertMemberAttributes(typeDeclaration.Modifiers, EntityType.TypeDefinition);
+ typeDecl.Attributes = ConvertMemberAttributes(typeDeclaration.Modifiers, SymbolKind.TypeDefinition);
typeDecl.CustomAttributes.AddRange(Convert(typeDeclaration.Attributes));
switch (typeDeclaration.ClassType) {
@@ -1056,7 +1051,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
{
CodeConstructor ctor = new CodeConstructor();
- ctor.Attributes = ConvertMemberAttributes(constructorDeclaration.Modifiers, EntityType.Constructor);
+ ctor.Attributes = ConvertMemberAttributes(constructorDeclaration.Modifiers, SymbolKind.Constructor);
ctor.CustomAttributes.AddRange(Convert(constructorDeclaration.Attributes));
if (constructorDeclaration.Initializer.ConstructorInitializerType == ConstructorInitializerType.This) {
ctor.ChainedConstructorArgs.AddRange(Convert(constructorDeclaration.Initializer.Arguments));
@@ -1098,7 +1093,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
CodeMemberEvent e = new CodeMemberEvent();
- e.Attributes = ConvertMemberAttributes(eventDeclaration.Modifiers, EntityType.Event);
+ e.Attributes = ConvertMemberAttributes(eventDeclaration.Modifiers, SymbolKind.Event);
e.CustomAttributes.AddRange(Convert(eventDeclaration.Attributes));
e.Name = vi.Name;
e.Type = Convert(eventDeclaration.ReturnType);
@@ -1116,7 +1111,7 @@ namespace ICSharpCode.NRefactory.CSharp
{
foreach (VariableInitializer vi in fieldDeclaration.Variables) {
CodeMemberField f = new CodeMemberField(Convert(fieldDeclaration.ReturnType), vi.Name);
- f.Attributes = ConvertMemberAttributes(fieldDeclaration.Modifiers, EntityType.Field);
+ f.Attributes = ConvertMemberAttributes(fieldDeclaration.Modifiers, SymbolKind.Field);
f.CustomAttributes.AddRange(Convert(fieldDeclaration.Attributes));
f.InitExpression = ConvertVariableInitializer(vi.Initializer, fieldDeclaration.ReturnType);
AddTypeMember(f);
@@ -1127,7 +1122,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
{
CodeMemberProperty p = new CodeMemberProperty();
- p.Attributes = ConvertMemberAttributes(indexerDeclaration.Modifiers, EntityType.Indexer);
+ p.Attributes = ConvertMemberAttributes(indexerDeclaration.Modifiers, SymbolKind.Indexer);
p.CustomAttributes.AddRange(Convert(indexerDeclaration.Attributes));
p.Name = "Items";
p.PrivateImplementationType = Convert(indexerDeclaration.PrivateImplementationType);
@@ -1148,7 +1143,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitMethodDeclaration(MethodDeclaration methodDeclaration)
{
CodeMemberMethod m = new CodeMemberMethod();
- m.Attributes = ConvertMemberAttributes(methodDeclaration.Modifiers, EntityType.Method);
+ m.Attributes = ConvertMemberAttributes(methodDeclaration.Modifiers, SymbolKind.Method);
m.CustomAttributes.AddRange(Convert(methodDeclaration.Attributes.Where(a => a.AttributeTarget != "return")));
m.ReturnTypeCustomAttributes.AddRange(Convert(methodDeclaration.Attributes.Where(a => a.AttributeTarget == "return")));
@@ -1166,7 +1161,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
{
CodeMemberMethod m = new CodeMemberMethod();
- m.Attributes = ConvertMemberAttributes(operatorDeclaration.Modifiers, EntityType.Method);
+ m.Attributes = ConvertMemberAttributes(operatorDeclaration.Modifiers, SymbolKind.Method);
m.CustomAttributes.AddRange(Convert(operatorDeclaration.Attributes.Where(a => a.AttributeTarget != "return")));
m.ReturnTypeCustomAttributes.AddRange(Convert(operatorDeclaration.Attributes.Where(a => a.AttributeTarget == "return")));
@@ -1208,7 +1203,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
{
CodeMemberProperty p = new CodeMemberProperty();
- p.Attributes = ConvertMemberAttributes(propertyDeclaration.Modifiers, EntityType.Property);
+ p.Attributes = ConvertMemberAttributes(propertyDeclaration.Modifiers, SymbolKind.Property);
p.CustomAttributes.AddRange(Convert(propertyDeclaration.Attributes));
p.Name = propertyDeclaration.Name;
p.PrivateImplementationType = Convert(propertyDeclaration.PrivateImplementationType);
@@ -1356,7 +1351,7 @@ namespace ICSharpCode.NRefactory.CSharp
CodeObject IAstVisitor<CodeObject>.VisitPreProcessorDirective (PreProcessorDirective preProcessorDirective)
{
- return new CodeComment ("#" + preProcessorDirective.Type.ToString ().ToLower ());
+ return new CodeComment ("#" + preProcessorDirective.Type.ToString ().ToLowerInvariant ());
}
CodeObject IAstVisitor<CodeObject>.VisitTypeParameterDeclaration(TypeParameterDeclaration typeParameterDeclaration)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
index 2f2e3fc..f0bae27 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
@@ -85,7 +85,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (loc != null) {
nDecl.AddChild(new CSharpTokenNode (Convert(loc [0]), Roles.NamespaceKeyword), Roles.NamespaceKeyword);
}
- ConvertNamespaceName(nspace.RealMemberName, nDecl);
+ nDecl.AddChild (ConvertNamespaceName(nspace.RealMemberName), NamespaceDeclaration.NamespaceNameRole);
if (loc != null && loc.Count > 1) {
nDecl.AddChild(new CSharpTokenNode (Convert(loc [1]), Roles.LBrace), Roles.LBrace);
}
@@ -103,7 +103,9 @@ namespace ICSharpCode.NRefactory.CSharp
first = false;
if (mc.OptAttributes != null) {
foreach (var attr in mc.OptAttributes.Sections) {
- unit.AddChild (ConvertAttributeSection (attr), SyntaxTree.MemberRole);
+ var section = ConvertAttributeSection(attr);
+ if (section != null)
+ unit.AddChild (section, SyntaxTree.MemberRole);
}
}
}
@@ -213,9 +215,10 @@ namespace ICSharpCode.NRefactory.CSharp
var memberType = new MemberType ();
memberType.AddChild (ConvertToType (ma.LeftExpression), MemberType.TargetRole);
- if (!ma.DotLocation.IsNull)
- memberType.AddChild (new CSharpTokenNode (Convert (ma.DotLocation), Roles.Dot), Roles.Dot);
-
+ var loc = LocationsBag.GetLocations (ma);
+ if (loc != null)
+ memberType.AddChild (new CSharpTokenNode (Convert (loc[0]), Roles.Dot), Roles.Dot);
+
memberType.MemberNameToken = Identifier.Create (ma.Name, Convert (ma.Location));
AddTypeArguments (ma, memberType);
@@ -258,9 +261,9 @@ namespace ICSharpCode.NRefactory.CSharp
switch (sce.Constraint) {
case SpecialConstraint.Class:
return new PrimitiveType ("class", Convert (sce.Location));
- case SpecialConstraint.Struct:
+ case SpecialConstraint.Struct:
return new PrimitiveType ("struct", Convert (sce.Location));
- case SpecialConstraint.Constructor:
+ case SpecialConstraint.Constructor:
return new PrimitiveType ("new", Convert (sce.Location));
}
}
@@ -327,7 +330,6 @@ namespace ICSharpCode.NRefactory.CSharp
AttributeSection ConvertAttributeSection (IEnumerable<Mono.CSharp.Attribute> optAttributes)
{
-
if (optAttributes == null)
return null;
AttributeSection result = new AttributeSection ();
@@ -356,6 +358,8 @@ namespace ICSharpCode.NRefactory.CSharp
attributeCount++;
}
+ if (attributeCount == 0)
+ return null;
// Left and right bracket + commas between the attributes
int locCount = 2 + attributeCount - 1;
// optional comma
@@ -376,10 +380,11 @@ namespace ICSharpCode.NRefactory.CSharp
if (loc != null) {
nDecl.AddChild(new CSharpTokenNode (Convert(loc [0]), Roles.NamespaceKeyword), Roles.NamespaceKeyword);
}
- ConvertNamespaceName(nspace.RealMemberName, nDecl);
+ nDecl.AddChild (ConvertNamespaceName(nspace.RealMemberName), NamespaceDeclaration.NamespaceNameRole);
if (loc != null && loc.Count > 1) {
nDecl.AddChild(new CSharpTokenNode (Convert(loc [1]), Roles.LBrace), Roles.LBrace);
}
+
AddToNamespace(nDecl);
namespaceStack.Push(nDecl);
}
@@ -415,24 +420,12 @@ namespace ICSharpCode.NRefactory.CSharp
//
// }
//
- void ConvertNamespaceName (MemberName memberName, NamespaceDeclaration namespaceDecl)
- {
- AstNode insertPos = null;
- while (memberName != null) {
- Identifier newIdent = Identifier.Create (memberName.Name, Convert (memberName.Location));
- // HACK for a parser 'bug' - sometimes it generates "<invalid>" identifiers in namespace names (on certain bugs in the input file)
- if (newIdent.Name != "<invalid>") {
- namespaceDecl.InsertChildBefore (insertPos, newIdent, Roles.Identifier);
- insertPos = newIdent;
-
- if (!memberName.DotLocation.IsNull) {
- var dotToken = new CSharpTokenNode (Convert (memberName.DotLocation), Roles.Dot);
- namespaceDecl.InsertChildBefore (insertPos, dotToken, Roles.Dot);
- insertPos = dotToken;
- }
- }
- memberName = memberName.Left;
- }
+ AstType ConvertNamespaceName (MemberName memberName)
+ {
+ // HACK for a parser 'bug' - sometimes it generates "<invalid>" identifiers in namespace names (on certain bugs in the input file)
+ if (memberName.Name == "<invalid>")
+ return AstType.Null;
+ return ConvertToType(memberName);
}
public override void Visit (UsingNamespace un)
@@ -483,9 +476,9 @@ namespace ICSharpCode.NRefactory.CSharp
var t = new MemberType ();
// t.IsDoubleColon = memberName.IsDoubleColon;
t.AddChild (ConvertImport (memberName.Left), MemberType.TargetRole);
-
- if (!memberName.DotLocation.IsNull)
- t.AddChild (new CSharpTokenNode (Convert (memberName.DotLocation), Roles.Dot), Roles.Dot);
+ var loc = LocationsBag.GetLocations (memberName);
+ if (loc != null)
+ t.AddChild (new CSharpTokenNode (Convert (loc[0]), Roles.Dot), Roles.Dot);
t.AddChild (Identifier.Create (memberName.Name, Convert (memberName.Location)), Roles.Identifier);
AddTypeArguments (t, memberName);
@@ -776,12 +769,11 @@ namespace ICSharpCode.NRefactory.CSharp
var variable = new FixedVariableInitializer ();
variable.AddChild (Identifier.Create (f.MemberName.Name, Convert (f.MemberName.Location)), Roles.Identifier);
if (f.Initializer != null && !f.Initializer.IsNull) {
- var bracketLocations = LocationsBag.GetLocations (f.Initializer);
- if (bracketLocations != null && bracketLocations.Count > 1)
- variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), Roles.LBracket), Roles.LBracket);
+ variable.AddChild (new CSharpTokenNode (Convert (f.Initializer.Location), Roles.LBracket), Roles.LBracket);
variable.AddChild ((Expression)f.Initializer.Accept (this), Roles.Expression);
- if (bracketLocations != null && bracketLocations.Count > 1)
+ var bracketLocations = LocationsBag.GetLocations (f.Initializer);
+ if (bracketLocations != null)
variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), Roles.RBracket), Roles.RBracket);
}
newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
@@ -794,14 +786,12 @@ namespace ICSharpCode.NRefactory.CSharp
variable = new FixedVariableInitializer ();
variable.AddChild (Identifier.Create (decl.Name.Value, Convert (decl.Name.Location)), Roles.Identifier);
- if (!decl.Initializer.IsNull) {
- var bracketLocations = LocationsBag.GetLocations (f.Initializer);
- if (bracketLocations != null && bracketLocations.Count > 1)
- variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), Roles.LBracket), Roles.LBracket);
- variable.AddChild ((Expression)decl.Initializer.Accept (this), Roles.Expression);
- if (bracketLocations != null && bracketLocations.Count > 1)
- variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), Roles.RBracket), Roles.RBracket);
- }
+ variable.AddChild (new CSharpTokenNode (Convert (decl.Initializer.Location), Roles.LBracket), Roles.LBracket);
+ variable.AddChild ((Expression)decl.Initializer.Accept (this), Roles.Expression);
+ var bracketLocations = LocationsBag.GetLocations (decl.Initializer);
+ if (bracketLocations != null)
+ variable.AddChild (new CSharpTokenNode (Convert (bracketLocations [0]), Roles.RBracket), Roles.RBracket);
+
newField.AddChild (variable, FixedFieldDeclaration.VariableRole);
}
}
@@ -955,7 +945,10 @@ namespace ICSharpCode.NRefactory.CSharp
if (attrs == null)
return;
foreach (var attr in attrs.Sections) {
- parent.AddChild (ConvertAttributeSection (attr), role);
+ var section = ConvertAttributeSection(attr);
+ if (section == null)
+ continue;
+ parent.AddChild (section, role);
}
}
@@ -1368,7 +1361,7 @@ namespace ICSharpCode.NRefactory.CSharp
return null;
}
- public override object Visit (BlockVariableDeclaration blockVariableDeclaration)
+ public override object Visit (BlockVariable blockVariableDeclaration)
{
var result = new VariableDeclarationStatement ();
result.AddChild (ConvertToType (blockVariableDeclaration.TypeExpression), Roles.Type);
@@ -1405,7 +1398,7 @@ namespace ICSharpCode.NRefactory.CSharp
return result;
}
- public override object Visit (BlockConstantDeclaration blockVariableDeclaration)
+ public override object Visit (BlockConstant blockVariableDeclaration)
{
var result = new VariableDeclarationStatement ();
@@ -1459,11 +1452,6 @@ namespace ICSharpCode.NRefactory.CSharp
return result;
}
- public override object Visit (Mono.CSharp.EmptyExpression emptyExpression)
- {
- return new ICSharpCode.NRefactory.CSharp.EmptyExpression (Convert (emptyExpression.Location));
- }
-
public override object Visit (Mono.CSharp.ErrorExpression emptyExpression)
{
return new ICSharpCode.NRefactory.CSharp.ErrorExpression (Convert (emptyExpression.Location));
@@ -1471,7 +1459,8 @@ namespace ICSharpCode.NRefactory.CSharp
public override object Visit (EmptyExpressionStatement emptyExpressionStatement)
{
- return new EmptyExpression (Convert (emptyExpressionStatement.Location));
+ // Should never happen.
+ throw new NotSupportedException();
}
public override object Visit (If ifStatement)
@@ -2155,8 +2144,10 @@ namespace ICSharpCode.NRefactory.CSharp
var leftExpr = memberAccess.LeftExpression.Accept (this);
result.AddChild ((Expression)leftExpr, Roles.TargetExpression);
}
- if (!memberAccess.DotLocation.IsNull) {
- result.AddChild (new CSharpTokenNode (Convert (memberAccess.DotLocation), Roles.Dot), Roles.Dot);
+ var loc = LocationsBag.GetLocations (memberAccess);
+
+ if (loc != null) {
+ result.AddChild (new CSharpTokenNode (Convert (loc[0]), Roles.Dot), Roles.Dot);
}
}
@@ -2642,6 +2633,23 @@ namespace ICSharpCode.NRefactory.CSharp
if (c.ConstraintExpressions != null) {
foreach (var expr in c.ConstraintExpressions) {
constraint.AddChild (ConvertToType (expr), Roles.BaseType);
+ if (expr is SpecialContraintExpr) {
+ var sce = (SpecialContraintExpr)expr;
+ switch (sce.Constraint) {
+ case SpecialConstraint.Class:
+ break;
+ case SpecialConstraint.Struct:
+ break;
+ case SpecialConstraint.Constructor:
+ var bl = LocationsBag.GetLocations (expr);
+ if (bl != null) {
+ constraint.AddChild (new CSharpTokenNode (Convert (bl[0]), Roles.LPar), Roles.LPar);
+ constraint.AddChild (new CSharpTokenNode (Convert (bl[1]), Roles.RPar), Roles.RPar);
+ }
+ break;
+ }
+ }
+
if (commaLocs != null && curComma < commaLocs.Count)
constraint.AddChild (new CSharpTokenNode (Convert (commaLocs [curComma++]), Roles.Comma), Roles.Comma);
}
@@ -2677,7 +2685,7 @@ namespace ICSharpCode.NRefactory.CSharp
direction.AddChild ((Expression)arg.Expr.Accept (this), Roles.Expression);
newArg.AddChild (direction, Roles.Expression);
} else {
- newArg.AddChild ((Expression)na.Expr.Accept (this), Roles.Expression);
+ newArg.AddChild (na.Expr != null ? (Expression)na.Expr.Accept (this) : new ErrorExpression ("Named argument expression parse error"), Roles.Expression);
}
return newArg;
}
@@ -3182,7 +3190,7 @@ namespace ICSharpCode.NRefactory.CSharp
if (location != null) {
var r = AssignmentExpression.GetOperatorRole (result.Operator);
result.AddChild(new CSharpTokenNode(Convert(location [0]), r), r);
- }
+ }
if (compoundAssign.Source != null)
result.AddChild ((Expression)compoundAssign.Source.Accept (this), AssignmentExpression.RightRole);
return result;
@@ -3547,7 +3555,7 @@ namespace ICSharpCode.NRefactory.CSharp
DocumentationReference result = new DocumentationReference();
if (doc.ParsedName != null) {
if (doc.ParsedName.Name == "<this>") {
- result.EntityType = EntityType.Indexer;
+ result.SymbolKind = SymbolKind.Indexer;
} else {
result.MemberName = doc.ParsedName.Name;
}
@@ -3562,7 +3570,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
} else if (doc.ParsedBuiltinType != null) {
- result.EntityType = EntityType.TypeDefinition;
+ result.SymbolKind = SymbolKind.TypeDefinition;
result.DeclaringType = ConvertToType(doc.ParsedBuiltinType);
}
if (doc.ParsedParameters != null) {
@@ -3570,7 +3578,7 @@ namespace ICSharpCode.NRefactory.CSharp
result.Parameters.AddRange(doc.ParsedParameters.Select(ConvertXmlDocParameter));
}
if (doc.ParsedOperator != null) {
- result.EntityType = EntityType.Operator;
+ result.SymbolKind = SymbolKind.Operator;
result.OperatorType = (OperatorType)doc.ParsedOperator;
if (result.OperatorType == OperatorType.Implicit || result.OperatorType == OperatorType.Explicit) {
var returnTypeParam = result.Parameters.LastOrNullObject();
@@ -3619,30 +3627,14 @@ namespace ICSharpCode.NRefactory.CSharp
compilerSettings = args ?? new CompilerSettings();
}
- static AstNode GetOuterLeft (AstNode node)
- {
- var outerLeft = node;
- while (outerLeft.FirstChild != null)
- outerLeft = outerLeft.FirstChild;
- return outerLeft;
- }
-
- static AstNode NextLeaf (AstNode node)
- {
- if (node == null)
- return null;
- var next = node.NextSibling;
- if (next == null)
- return node.Parent;
- return GetOuterLeft (next);
- }
-
void InsertComments (CompilerCompilationUnit top, ConversionVisitor conversionVisitor)
{
- var leaf = GetOuterLeft (conversionVisitor.Unit);
+ AstNode insertionPoint = conversionVisitor.Unit.FirstChild;
for (int i = 0; i < top.SpecialsBag.Specials.Count; i++) {
var special = top.SpecialsBag.Specials [i];
AstNode newLeaf = null;
+ Role role = null;
+ bool isDocumentationComment = false;
var comment = special as SpecialsBag.Comment;
if (comment != null) {
// HACK: multiline documentation comment detection; better move this logic into the mcs tokenizer
@@ -3651,7 +3643,8 @@ namespace ICSharpCode.NRefactory.CSharp
&& comment.Content.StartsWith("*", StringComparison.Ordinal)
&& !comment.Content.StartsWith("**", StringComparison.Ordinal)
);
- if (conversionVisitor.convertTypeSystemMode && !(comment.CommentType == SpecialsBag.CommentType.Documentation || isMultilineDocumentationComment))
+ isDocumentationComment = comment.CommentType == SpecialsBag.CommentType.Documentation || isMultilineDocumentationComment;
+ if (conversionVisitor.convertTypeSystemMode && !isDocumentationComment)
continue;
var type = isMultilineDocumentationComment ? CommentType.MultiLineDocumentation : (CommentType)comment.CommentType;
var start = new TextLocation (comment.Line, comment.Col);
@@ -3660,79 +3653,86 @@ namespace ICSharpCode.NRefactory.CSharp
StartsLine = comment.StartsLine,
Content = isMultilineDocumentationComment ? comment.Content.Substring(1) : comment.Content
};
+ role = Roles.Comment;
} else if (!GenerateTypeSystemMode) {
+ var pragmaDirective = special as SpecialsBag.PragmaPreProcessorDirective;
+ if (pragmaDirective != null) {
+ var pragma = new PragmaWarningPreprocssorDirective(new TextLocation(pragmaDirective.Line, pragmaDirective.Col), new TextLocation(pragmaDirective.EndLine, pragmaDirective.EndCol));
+ pragma.Disable = pragmaDirective.Disalbe;
+ pragma.AddWarnings(pragmaDirective.Codes);
+ newLeaf = pragma;
+ role = Roles.PreProcessorDirective;
+ goto end;
+ }
+
+ var lineDirective = special as SpecialsBag.LineProcessorDirective;
+ if (lineDirective != null) {
+ var pragma = new LinePreprocssorDirective(new TextLocation(lineDirective.Line, lineDirective.Col), new TextLocation(lineDirective.EndLine, lineDirective.EndCol));
+ pragma.LineNumber = lineDirective.LineNumber;
+ pragma.FileName = lineDirective.FileName;
+ newLeaf = pragma;
+ role = Roles.PreProcessorDirective;
+ goto end;
+ }
+
var directive = special as SpecialsBag.PreProcessorDirective;
if (directive != null) {
newLeaf = new PreProcessorDirective ((ICSharpCode.NRefactory.CSharp.PreProcessorDirectiveType)((int)directive.Cmd & 0xF), new TextLocation (directive.Line, directive.Col), new TextLocation (directive.EndLine, directive.EndCol)) {
Argument = directive.Arg,
Take = directive.Take
};
- } else {
- var newLine = special as SpecialsBag.NewLineToken;
- if (newLine != null) {
- if (newLine.NewLine == SpecialsBag.NewLine.Unix) {
- newLeaf = new UnixNewLine (new TextLocation (newLine.Line, newLine.Col + 1));
- } else {
- newLeaf = new WindowsNewLine (new TextLocation (newLine.Line, newLine.Col + 1));
- }
- }
+ role = Roles.PreProcessorDirective;
}
+ end:
+ ;
}
- if (newLeaf == null)
- continue;
-
- while (true) {
- var nextLeaf = NextLeaf (leaf);
- // insert comment at begin
- if (newLeaf.StartLocation < leaf.StartLocation) {
- var node = leaf.Parent ?? conversionVisitor.Unit;
- while (node.Parent != null && node.FirstChild == leaf) {
- leaf = node;
- node = node.Parent;
- }
- if (newLeaf is NewLineNode) {
- node.InsertChildBefore (leaf, (NewLineNode)newLeaf, Roles.NewLine);
- } else if (newLeaf is Comment) {
- node.InsertChildBefore (leaf, (Comment)newLeaf, Roles.Comment);
- } else {
- node.InsertChildBefore (leaf, (PreProcessorDirective)newLeaf, Roles.PreProcessorDirective);
- }
- leaf = newLeaf;
- break;
- }
-
- // insert comment at the end
- if (nextLeaf == null) {
- var node = leaf.Parent ?? conversionVisitor.Unit;
- if (newLeaf is NewLineNode) {
- node.AddChild ((NewLineNode)newLeaf, Roles.NewLine);
- } else if (newLeaf is Comment) {
- node.AddChild ((Comment)newLeaf, Roles.Comment);
- } else {
- node.AddChild ((PreProcessorDirective)newLeaf, Roles.PreProcessorDirective);
- }
- leaf = newLeaf;
- break;
- }
-
- // comment is between 2 nodes
- if (leaf.EndLocation <= newLeaf.StartLocation && newLeaf.StartLocation <= nextLeaf.StartLocation) {
- var node = leaf.Parent ?? conversionVisitor.Unit;
- if (newLeaf is NewLineNode) {
- node.InsertChildAfter (leaf, (NewLineNode)newLeaf, Roles.NewLine);
- } else if (newLeaf is Comment) {
- node.InsertChildAfter (leaf, (Comment)newLeaf, Roles.Comment);
+ if (newLeaf != null) {
+ InsertComment(ref insertionPoint, newLeaf, role, isDocumentationComment, conversionVisitor.Unit);
+ }
+ }
+ if (!GenerateTypeSystemMode) {
+ // We cannot insert newlines in the same loop as comments/preprocessor directives
+ // because they are not correctly ordered in the specials bag
+ insertionPoint = conversionVisitor.Unit.FirstChild;
+ for (int i = 0; i < top.SpecialsBag.Specials.Count; i++) {
+ var newLine = top.SpecialsBag.Specials[i] as SpecialsBag.NewLineToken;
+ if (newLine != null) {
+ AstNode newLeaf;
+ if (newLine.NewLine == SpecialsBag.NewLine.Unix) {
+ newLeaf = new UnixNewLine (new TextLocation (newLine.Line, newLine.Col + 1));
} else {
- node.InsertChildAfter (leaf, (PreProcessorDirective)newLeaf, Roles.PreProcessorDirective);
+ newLeaf = new WindowsNewLine (new TextLocation (newLine.Line, newLine.Col + 1));
}
- leaf = newLeaf;
- break;
+ InsertComment(ref insertionPoint, newLeaf, Roles.NewLine, false, conversionVisitor.Unit);
}
- leaf = nextLeaf;
}
}
}
+ void InsertComment(ref AstNode insertionPoint, AstNode newNode, Role role, bool isDocumentationComment, AstNode rootNode)
+ {
+ TextLocation insertAt = newNode.StartLocation;
+ // Advance insertionPoint to the first node that has a start location >= insertAt
+ while (insertionPoint != null && insertionPoint.StartLocation < insertAt) {
+ // Enter the current node if insertAt is within
+ while (insertAt < insertionPoint.EndLocation && insertionPoint.FirstChild != null) {
+ insertionPoint = insertionPoint.FirstChild;
+ }
+ // Go to next node (insertionPoint.NextSibling if it exists; otherwise the next sibling of the parent node etc.)
+ insertionPoint = insertionPoint.GetNextNode();
+ }
+ // As a special case, XmlDoc gets inserted at the beginning of the entity declaration
+ if (isDocumentationComment && insertionPoint is EntityDeclaration && insertionPoint.FirstChild != null) {
+ insertionPoint = insertionPoint.FirstChild;
+ }
+ if (insertionPoint == null) {
+ // we're at the end of the compilation unit
+ rootNode.AddChildUnsafe(newNode, role);
+ } else {
+ insertionPoint.Parent.InsertChildBeforeUnsafe(insertionPoint, newNode, role);
+ }
+ }
+
public class ErrorReportPrinter : ReportPrinter
{
readonly string fileName;
@@ -3829,7 +3829,18 @@ namespace ICSharpCode.NRefactory.CSharp
}
conversionVisitor.Unit.FileName = fileName;
- conversionVisitor.Unit.ConditionalSymbols = top.Conditionals.Concat (compilerSettings.ConditionalSymbols).ToArray ();
+ List<string> conditionals = new List<string>();
+ foreach (var settings in compilerSettings.ConditionalSymbols) {
+ if (top.Conditionals.ContainsKey(settings) && !top.Conditionals [settings])
+ continue;
+ conditionals.Add(settings);
+ }
+ foreach (var kv in top.Conditionals) {
+ if (!kv.Value || compilerSettings.ConditionalSymbols.Contains (kv.Key))
+ continue;
+ conditionals.Add(kv.Key);
+ }
+ conversionVisitor.Unit.ConditionalSymbols = conditionals;
return conversionVisitor.Unit;
}
@@ -4008,7 +4019,7 @@ namespace ICSharpCode.NRefactory.CSharp
// TODO: add support for parsing a part of a file
throw new NotImplementedException ();
}
- */
+ */
public DocumentationReference ParseDocumentationReference (string cref)
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs
index c6380f1..f6c39d9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs
@@ -316,8 +316,11 @@ namespace Mono.CSharp {
var hoisted = localVariable.HoistedVariant;
if (hoisted != null && hoisted.Storey != this && hoisted.Storey is StateMachine) {
- // TODO: It's too late the field is defined in HoistedLocalVariable ctor
+ //
+ // Variable is already hoisted but we need it in storey which can be shared
+ //
hoisted.Storey.hoisted_locals.Remove (hoisted);
+ hoisted.Storey.Members.Remove (hoisted.Field);
hoisted = null;
}
@@ -570,6 +573,9 @@ namespace Mono.CSharp {
protected virtual void EmitHoistedParameters (EmitContext ec, List<HoistedParameter> hoisted)
{
foreach (HoistedParameter hp in hoisted) {
+ if (hp == null)
+ continue;
+
//
// Parameters could be proxied via local fields for value type storey
//
@@ -726,6 +732,12 @@ namespace Mono.CSharp {
this.field = field;
}
+ public Field Field {
+ get {
+ return field;
+ }
+ }
+
public AnonymousMethodStorey Storey {
get {
return storey;
@@ -846,11 +858,7 @@ namespace Mono.CSharp {
#region Properties
- public Field Field {
- get {
- return field;
- }
- }
+ public bool IsAssigned { get; set; }
public ParameterReference Parameter {
get {
@@ -889,12 +897,6 @@ namespace Mono.CSharp {
: base (storey, field)
{
}
-
- public Field Field {
- get {
- return field;
- }
- }
}
//
@@ -1002,12 +1004,12 @@ namespace Mono.CSharp {
return delegate_type;
ec.Report.Error (835, loc, "Cannot convert `{0}' to an expression tree of non-delegate type `{1}'",
- GetSignatureForError (), TypeManager.CSharpName (delegate_type));
+ GetSignatureForError (), delegate_type.GetSignatureForError ());
return null;
}
ec.Report.Error (1660, loc, "Cannot convert `{0}' to non-delegate type `{1}'",
- GetSignatureForError (), TypeManager.CSharpName (delegate_type));
+ GetSignatureForError (), delegate_type.GetSignatureForError ());
return null;
}
@@ -1019,7 +1021,7 @@ namespace Mono.CSharp {
if (!ec.IsInProbingMode)
ec.Report.Error (1661, loc,
"Cannot convert `{0}' to delegate type `{1}' since there is a parameter mismatch",
- GetSignatureForError (), TypeManager.CSharpName (delegate_type));
+ GetSignatureForError (), delegate_type.GetSignatureForError ());
return false;
}
@@ -1031,7 +1033,7 @@ namespace Mono.CSharp {
return false;
ec.Report.Error (1593, loc, "Delegate `{0}' does not take `{1}' arguments",
- TypeManager.CSharpName (delegate_type), Parameters.Count.ToString ());
+ delegate_type.GetSignatureForError (), Parameters.Count.ToString ());
return false;
}
@@ -1045,10 +1047,10 @@ namespace Mono.CSharp {
return false;
if (p_mod == Parameter.Modifier.NONE)
- ec.Report.Error (1677, loc, "Parameter `{0}' should not be declared with the `{1}' keyword",
- (i + 1).ToString (), Parameter.GetModifierSignature (Parameters.FixedParameters [i].ModFlags));
+ ec.Report.Error (1677, Parameters[i].Location, "Parameter `{0}' should not be declared with the `{1}' keyword",
+ (i + 1).ToString (), Parameter.GetModifierSignature (Parameters [i].ModFlags));
else
- ec.Report.Error (1676, loc, "Parameter `{0}' must be declared with the `{1}' keyword",
+ ec.Report.Error (1676, Parameters[i].Location, "Parameter `{0}' must be declared with the `{1}' keyword",
(i+1).ToString (), Parameter.GetModifierSignature (p_mod));
error = true;
}
@@ -1058,21 +1060,20 @@ namespace Mono.CSharp {
TypeSpec type = invoke_pd.Types [i];
- // We assume that generic parameters are always inflated
- if (TypeManager.IsGenericParameter (type))
- continue;
-
- if (TypeManager.HasElementType (type) && TypeManager.IsGenericParameter (TypeManager.GetElementType (type)))
+ //
+ // Assumes that generic mvar parameters are always inflated
+ //
+ if (ImplicitDelegateCreation.ContainsMethodTypeParameter (type))
continue;
if (!TypeSpecComparer.IsEqual (invoke_pd.Types [i], Parameters.Types [i])) {
if (ignore_errors)
return false;
- ec.Report.Error (1678, loc, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
+ ec.Report.Error (1678, Parameters [i].Location, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
(i+1).ToString (),
- TypeManager.CSharpName (Parameters.Types [i]),
- TypeManager.CSharpName (invoke_pd.Types [i]));
+ Parameters.Types [i].GetSignatureForError (),
+ invoke_pd.Types [i].GetSignatureForError ());
error = true;
}
}
@@ -1376,7 +1377,7 @@ namespace Mono.CSharp {
return null;
}
- b = b.ConvertToAsyncTask (ec, ec.CurrentMemberDefinition.Parent.PartialContainer, p, return_type, loc);
+ b = b.ConvertToAsyncTask (ec, ec.CurrentMemberDefinition.Parent.PartialContainer, p, return_type, delegate_type, loc);
}
return CompatibleMethodFactory (return_type ?? InternalType.ErrorType, delegate_type, p, b);
@@ -1662,18 +1663,25 @@ namespace Mono.CSharp {
if (src_block.HasCapturedThis) {
//
// Remove hoisted 'this' request when simple instance method is
- // enough (no hoisted variables only 'this')
+ // enough. No hoisted variables only 'this' and don't need to
+ // propagate this to value type state machine.
//
- if (src_block.ParametersBlock.StateMachine == null)
+ StateMachine sm_parent = null;
+ var pb = src_block.ParametersBlock;
+ do {
+ sm_parent = pb.StateMachine;
+ pb = pb.Parent == null ? null : pb.Parent.ParametersBlock;
+ } while (sm_parent == null && pb != null);
+
+ if (sm_parent == null) {
top_block.RemoveThisReferenceFromChildrenBlock (src_block);
-
- //
- // Special case where parent class is used to emit instance method
- // because currect storey is of value type (async host). We cannot
- // use ldftn on non-boxed instances either to share mutated state
- //
- if (sm != null && sm.Kind == MemberKind.Struct) {
- parent = sm.Parent.PartialContainer;
+ } else if (sm_parent.Kind == MemberKind.Struct) {
+ //
+ // Special case where parent class is used to emit instance method
+ // because currect storey is of value type (async host). We cannot
+ // use ldftn on non-boxed instances either to share mutated state
+ //
+ parent = sm_parent.Parent.PartialContainer;
}
}
@@ -1739,6 +1747,7 @@ namespace Mono.CSharp {
//
method = DoCreateMethodHost (ec);
method.Define ();
+ method.PrepareEmit ();
}
bool is_static = (method.ModFlags & Modifiers.STATIC) != 0;
@@ -1865,7 +1874,7 @@ namespace Mono.CSharp {
public override string GetSignatureForError ()
{
- return TypeManager.CSharpName (type);
+ return type.GetSignatureForError ();
}
}
@@ -2004,7 +2013,7 @@ namespace Mono.CSharp {
}
var li_other = LocalVariable.CreateCompilerGenerated (CurrentType, equals_block, loc);
- equals_block.AddStatement (new BlockVariableDeclaration (new TypeExpression (li_other.Type, loc), li_other));
+ equals_block.AddStatement (new BlockVariable (new TypeExpression (li_other.Type, loc), li_other));
var other_variable = new LocalVariableReference (li_other, loc);
MemberAccess system_collections_generic = new MemberAccess (new MemberAccess (
@@ -2087,6 +2096,7 @@ namespace Mono.CSharp {
equals.Block = equals_block;
equals.Define ();
+ equals.PrepareEmit ();
Members.Add (equals);
//
@@ -2116,7 +2126,7 @@ namespace Mono.CSharp {
hashcode_top.AddStatement (new Unchecked (hashcode_block, loc));
var li_hash = LocalVariable.CreateCompilerGenerated (Compiler.BuiltinTypes.Int, hashcode_top, loc);
- hashcode_block.AddStatement (new BlockVariableDeclaration (new TypeExpression (li_hash.Type, loc), li_hash));
+ hashcode_block.AddStatement (new BlockVariable (new TypeExpression (li_hash.Type, loc), li_hash));
LocalVariableReference hash_variable_assign = new LocalVariableReference (li_hash, loc);
hashcode_block.AddStatement (new StatementExpression (
new SimpleAssign (hash_variable_assign, rs_hashcode)));
@@ -2141,6 +2151,7 @@ namespace Mono.CSharp {
hashcode_block.AddStatement (new Return (hash_variable, loc));
hashcode.Block = hashcode_top;
hashcode.Define ();
+ hashcode.PrepareEmit ();
Members.Add (hashcode);
//
@@ -2151,6 +2162,7 @@ namespace Mono.CSharp {
tostring_block.AddStatement (new Return (string_concat, loc));
tostring.Block = tostring_block;
tostring.Define ();
+ tostring.PrepareEmit ();
Members.Add (tostring);
return true;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs
index 03b18b7..facb0eb 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs
@@ -132,7 +132,7 @@ namespace Mono.CSharp
if (Expr.eclass == ExprClass.MethodGroup)
return Expr.ExprClassName;
- return TypeManager.CSharpName (Expr.Type);
+ return Expr.Type.GetSignatureForError ();
}
public bool ResolveMethodGroup (ResolveContext ec)
@@ -347,7 +347,7 @@ namespace Mono.CSharp
} else if (arg_type.Kind == MemberKind.Void || arg_type == InternalType.Arglist || arg_type.IsPointer) {
rc.Report.Error (1978, a.Expr.Location,
"An expression of type `{0}' cannot be used as an argument of dynamic operation",
- TypeManager.CSharpName (arg_type));
+ arg_type.GetSignatureForError ());
}
info_flags = new Binary (Binary.Operator.BitwiseOr, info_flags,
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs
index fa0a61b..b2e4e9a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assembly.cs
@@ -7,7 +7,7 @@
//
// Copyright 2001, 2002, 2003 Ximian, Inc.
// Copyright 2004-2011 Novell, Inc.
-// Copyright 2011 Xamarin Inc
+// Copyright 2011-2013 Xamarin Inc
//
@@ -74,6 +74,9 @@ namespace Mono.CSharp
Dictionary<ITypeDefinition, Attribute> emitted_forwarders;
AssemblyAttributesPlaceholder module_target_attrs;
+ // Win32 version info values
+ string vi_product, vi_product_version, vi_company, vi_copyright, vi_trademark;
+
protected AssemblyDefinition (ModuleContainer module, string name)
{
this.module = module;
@@ -288,7 +291,7 @@ namespace Mono.CSharp
} else if (emitted_forwarders.ContainsKey (t.MemberDefinition)) {
Report.SymbolRelatedToPreviousError (emitted_forwarders[t.MemberDefinition].Location, null);
Report.Error (739, a.Location, "A duplicate type forward of type `{0}'",
- TypeManager.CSharpName (t));
+ t.GetSignatureForError ());
return;
}
@@ -297,13 +300,13 @@ namespace Mono.CSharp
if (t.MemberDefinition.DeclaringAssembly == this) {
Report.SymbolRelatedToPreviousError (t);
Report.Error (729, a.Location, "Cannot forward type `{0}' because it is defined in this assembly",
- TypeManager.CSharpName (t));
+ t.GetSignatureForError ());
return;
}
if (t.IsNested) {
Report.Error (730, a.Location, "Cannot forward type `{0}' because it is a nested type",
- TypeManager.CSharpName (t));
+ t.GetSignatureForError ());
return;
}
@@ -347,15 +350,24 @@ namespace Mono.CSharp
} else if (a.Type == pa.RuntimeCompatibility) {
wrap_non_exception_throws_custom = true;
} else if (a.Type == pa.AssemblyFileVersion) {
- string value = a.GetString ();
- if (string.IsNullOrEmpty (value) || IsValidAssemblyVersion (value, false) == null) {
+ vi_product_version = a.GetString ();
+ if (string.IsNullOrEmpty (vi_product_version) || IsValidAssemblyVersion (vi_product_version, false) == null) {
Report.Warning (1607, 1, a.Location, "The version number `{0}' specified for `{1}' is invalid",
- value, a.Name);
+ vi_product_version, a.Name);
return;
}
+ } else if (a.Type == pa.AssemblyProduct) {
+ vi_product = a.GetString ();
+ } else if (a.Type == pa.AssemblyCompany) {
+ vi_company = a.GetString ();
+ } else if (a.Type == pa.AssemblyDescription) {
+ // TODO: Needs extra api
+ } else if (a.Type == pa.AssemblyCopyright) {
+ vi_copyright = a.GetString ();
+ } else if (a.Type == pa.AssemblyTrademark) {
+ vi_trademark = a.GetString ();
}
-
SetCustomAttribute (ctor, cdata);
}
@@ -370,7 +382,7 @@ namespace Mono.CSharp
// no working SRE API
foreach (var entry in Importer.Assemblies) {
var a = entry as ImportedAssemblyDefinition;
- if (a == null)
+ if (a == null || a.IsMissing)
continue;
if (public_key != null && !a.HasStrongName) {
@@ -749,7 +761,7 @@ namespace Mono.CSharp
if (Compiler.Settings.Win32ResourceFile != null) {
Builder.DefineUnmanagedResource (Compiler.Settings.Win32ResourceFile);
} else {
- Builder.DefineVersionInfoResource ();
+ Builder.DefineVersionInfoResource (vi_product, vi_product_version, vi_company, vi_copyright, vi_trademark);
}
if (Compiler.Settings.Win32IconFile != null) {
@@ -1167,15 +1179,27 @@ namespace Mono.CSharp
if (loaded.Contains (key))
continue;
- // A corlib assembly is the first assembly which contains System.Object
- if (corlib_assembly == null && HasObjectType (a)) {
- corlib_assembly = a;
- continue;
- }
-
loaded.Add (key);
}
+ if (corlib_assembly == null) {
+ //
+ // Requires second pass because HasObjectType can trigger assembly load event
+ //
+ for (int i = 0; i < loaded.Count; ++i) {
+ var assembly = loaded [i];
+
+ //
+ // corlib assembly is the first referenced assembly which contains System.Object
+ //
+ if (HasObjectType (assembly.Item2)) {
+ corlib_assembly = assembly.Item2;
+ loaded.RemoveAt (i);
+ break;
+ }
+ }
+ }
+
foreach (var entry in module.Compiler.Settings.AssemblyReferencesAliases) {
a = LoadAssemblyFile (entry.Item2, false);
if (a == null)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs
index 0f3f905..10dc90c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs
@@ -815,8 +815,17 @@ namespace Mono.CSharp {
// Otherwise, if the selected operator is a predefined operator
//
Binary b = source as Binary;
- if (b == null && source is ReducedExpression)
- b = ((ReducedExpression) source).OriginalExpression as Binary;
+ if (b == null) {
+ if (source is ReducedExpression)
+ b = ((ReducedExpression) source).OriginalExpression as Binary;
+ else if (source is Nullable.LiftedBinaryOperator) {
+ var po = ((Nullable.LiftedBinaryOperator) source);
+ if (po.UserOperator == null)
+ b = po.Binary;
+ } else if (source is TypeCast) {
+ b = ((TypeCast) source).Child as Binary;
+ }
+ }
if (b != null) {
//
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs
index 4357d78..17f20f3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs
@@ -201,7 +201,9 @@ namespace Mono.CSharp
protected override void DoEmit (EmitContext ec)
{
- GetResultExpression (ec).Emit (ec);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ GetResultExpression (ec).Emit (ec);
+ }
}
public Expression GetResultExpression (EmitContext ec)
@@ -230,34 +232,34 @@ namespace Mono.CSharp
var fe_awaiter = new FieldExpr (awaiter, loc);
fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
- //
- // awaiter = expr.GetAwaiter ();
- //
+ Label skip_continuation = ec.DefineLabel ();
+
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ //
+ // awaiter = expr.GetAwaiter ();
+ //
fe_awaiter.EmitAssign (ec, expr, false, false);
- }
- Label skip_continuation = ec.DefineLabel ();
+ Expression completed_expr;
+ if (IsDynamic) {
+ var rc = new ResolveContext (ec.MemberContext);
- Expression completed_expr;
- if (IsDynamic) {
- var rc = new ResolveContext (ec.MemberContext);
+ Arguments dargs = new Arguments (1);
+ dargs.Add (new Argument (fe_awaiter));
+ completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
- Arguments dargs = new Arguments (1);
- dargs.Add (new Argument (fe_awaiter));
- completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
+ dargs = new Arguments (1);
+ dargs.Add (new Argument (completed_expr));
+ completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
+ } else {
+ var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
+ pe.InstanceExpression = fe_awaiter;
+ completed_expr = pe;
+ }
- dargs = new Arguments (1);
- dargs.Add (new Argument (completed_expr));
- completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
- } else {
- var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
- pe.InstanceExpression = fe_awaiter;
- completed_expr = pe;
+ completed_expr.EmitBranchable (ec, skip_continuation, true);
}
- completed_expr.EmitBranchable (ec, skip_continuation, true);
-
base.DoEmit (ec);
//
@@ -384,6 +386,10 @@ namespace Mono.CSharp
}
}
+ public TypeSpec DelegateType {
+ get; set;
+ }
+
public override bool IsIterator {
get {
return false;
@@ -743,7 +749,9 @@ namespace Mono.CSharp
var args = new Arguments (2);
args.Add (new Argument (awaiter, Argument.AType.Ref));
args.Add (new Argument (new CompilerGeneratedThis (CurrentType, Location), Argument.AType.Ref));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitInitializer (EmitContext ec)
@@ -819,7 +827,9 @@ namespace Mono.CSharp
Arguments args = new Arguments (1);
args.Add (new Argument (exceptionVariable));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitSetResult (EmitContext ec)
@@ -841,7 +851,9 @@ namespace Mono.CSharp
args.Add (new Argument (new LocalVariableReference (hoisted_return, Location)));
}
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs
index 27ee55e..ee7ab60 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs
@@ -1,14 +1,14 @@
//
-// attribute.cs: Attribute Handler
+// attribute.cs: Attributes handling
//
// Author: Ravi Pratap (ravi at ximian.com)
-// Marek Safar (marek.safar at seznam.cz)
+// Marek Safar (marek.safar at gmail.com)
//
// Dual licensed under the terms of the MIT X11 or GNU GPL
//
// Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
// Copyright 2003-2008 Novell, Inc.
-// Copyright 2011 Xamarin Inc
+// Copyright 2011-2013 Xamarin Inc
//
using System;
@@ -264,7 +264,7 @@ namespace Mono.CSharp {
public void Error_AttributeEmitError (string inner)
{
Report.Error (647, Location, "Error during emitting `{0}' attribute. The reason is `{1}'",
- TypeManager.CSharpName (Type), inner);
+ Type.GetSignatureForError (), inner);
}
public void Error_InvalidSecurityParent ()
@@ -367,7 +367,7 @@ namespace Mono.CSharp {
public string GetSignatureForError ()
{
if (Type != null)
- return TypeManager.CSharpName (Type);
+ return Type.GetSignatureForError ();
return expression.GetSignatureForError ();
}
@@ -384,6 +384,19 @@ namespace Mono.CSharp {
return HasSecurityAttribute && IsSecurityActionValid ();
}
+ static bool IsValidMethodImplOption (int value)
+ {
+ //
+ // Allow to use AggressiveInlining on any runtime/corlib
+ //
+ MethodImplOptions all = (MethodImplOptions) 256;
+ foreach (MethodImplOptions v in System.Enum.GetValues (typeof (MethodImplOptions))) {
+ all |= v;
+ }
+
+ return ((MethodImplOptions) value | all) == all;
+ }
+
static bool IsValidArgumentType (TypeSpec t)
{
if (t.IsArray) {
@@ -454,7 +467,7 @@ namespace Mono.CSharp {
ObsoleteAttribute obsolete_attr = Type.GetAttributeObsolete ();
if (obsolete_attr != null) {
- AttributeTester.Report_ObsoleteMessage (obsolete_attr, TypeManager.CSharpName (Type), Location, Report);
+ AttributeTester.Report_ObsoleteMessage (obsolete_attr, Type.GetSignatureForError (), Location, Report);
}
ResolveContext rc = null;
@@ -1030,10 +1043,14 @@ namespace Mono.CSharp {
if (string.IsNullOrEmpty (value))
Error_AttributeEmitError ("DllName cannot be empty or null");
}
- } else if (Type == predefined.MethodImpl && pt.BuiltinType == BuiltinTypeSpec.Type.Short &&
- !System.Enum.IsDefined (typeof (MethodImplOptions), ((Constant) arg_expr).GetValue ().ToString ())) {
- Error_AttributeEmitError ("Incorrect argument value.");
- return;
+ } else if (Type == predefined.MethodImpl) {
+ if (pos_args.Count == 1) {
+ var value = (int) ((Constant) arg_expr).GetValueAsLong ();
+
+ if (!IsValidMethodImplOption (value)) {
+ Error_AttributeEmitError ("Incorrect argument value");
+ }
+ }
}
}
@@ -1669,6 +1686,11 @@ namespace Mono.CSharp {
public readonly PredefinedDecimalAttribute DecimalConstant;
public readonly PredefinedAttribute StructLayout;
public readonly PredefinedAttribute FieldOffset;
+ public readonly PredefinedAttribute AssemblyProduct;
+ public readonly PredefinedAttribute AssemblyCompany;
+ public readonly PredefinedAttribute AssemblyDescription;
+ public readonly PredefinedAttribute AssemblyCopyright;
+ public readonly PredefinedAttribute AssemblyTrademark;
public readonly PredefinedAttribute CallerMemberNameAttribute;
public readonly PredefinedAttribute CallerLineNumberAttribute;
public readonly PredefinedAttribute CallerFilePathAttribute;
@@ -1722,6 +1744,11 @@ namespace Mono.CSharp {
DecimalConstant = new PredefinedDecimalAttribute (module, "System.Runtime.CompilerServices", "DecimalConstantAttribute");
StructLayout = new PredefinedAttribute (module, "System.Runtime.InteropServices", "StructLayoutAttribute");
FieldOffset = new PredefinedAttribute (module, "System.Runtime.InteropServices", "FieldOffsetAttribute");
+ AssemblyProduct = new PredefinedAttribute (module, "System.Reflection", "AssemblyProductAttribute");
+ AssemblyCompany = new PredefinedAttribute (module, "System.Reflection", "AssemblyCompanyAttribute");
+ AssemblyDescription = new PredefinedAttribute (module, "System.Reflection", "AssemblyDescriptionAttribute");
+ AssemblyCopyright = new PredefinedAttribute (module, "System.Reflection", "AssemblyCopyrightAttribute");
+ AssemblyTrademark = new PredefinedAttribute (module, "System.Reflection", "AssemblyTrademarkAttribute");
AsyncStateMachine = new PredefinedStateMachineAttribute (module, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
@@ -1839,7 +1866,7 @@ namespace Mono.CSharp {
//
// Handle all parameter-less attributes as optional
//
- if (!IsDefined)
+ if (!Define ())
return false;
ctor = (MethodSpec) MemberCache.FindMember (type, MemberFilter.Constructor (ParametersCompiled.EmptyReadOnlyParameters), BindingRestriction.DeclaredOnly);
@@ -1997,7 +2024,7 @@ namespace Mono.CSharp {
if (ac != null) {
element = GetTransformationFlags (ac.Element);
if (element == null)
- return null;
+ return new bool[] { false, false };
bool[] res = new bool[element.Length + 1];
res[0] = false;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cfold.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cfold.cs
index 2e453ab..3612166 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cfold.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cfold.cs
@@ -183,11 +183,11 @@ namespace Mono.CSharp {
switch (oper){
case Binary.Operator.BitwiseOr:
//
- // bool? operator &(bool? x, bool? y);
+ // bool? operator |(bool? x, bool? y);
//
if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
(rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
- var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ var b = new Binary (oper, left, right).ResolveOperator (ec);
// false | null => null
// null | false => null
@@ -231,7 +231,7 @@ namespace Mono.CSharp {
//
if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
(rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
- var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ var b = new Binary (oper, left, right).ResolveOperator (ec);
// false & null => false
// null & false => false
@@ -495,7 +495,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -592,7 +592,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -688,7 +688,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -788,7 +788,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
@@ -878,7 +878,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
IntConstant ic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
@@ -899,7 +899,7 @@ namespace Mono.CSharp {
// null << value => null
if (left is NullLiteral)
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
@@ -915,7 +915,7 @@ namespace Mono.CSharp {
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
IntConstant sic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
@@ -935,7 +935,7 @@ namespace Mono.CSharp {
// null >> value => null
if (left is NullLiteral)
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
@@ -1037,11 +1037,7 @@ namespace Mono.CSharp {
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
@@ -1077,11 +1073,7 @@ namespace Mono.CSharp {
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
@@ -1117,11 +1109,7 @@ namespace Mono.CSharp {
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
@@ -1157,11 +1145,7 @@ namespace Mono.CSharp {
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs
index 9fe29a4..8adcdc3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs
@@ -17,7 +17,6 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
-using System.Linq;
using System.Text;
using System.Diagnostics;
using Mono.CompilerServices.SymbolWriter;
@@ -357,7 +356,6 @@ namespace Mono.CSharp
public string GetSignatureForMetadata ()
{
-#if STATIC
if (Parent is TypeDefinition) {
return Parent.GetSignatureForMetadata () + "+" + TypeNameParser.Escape (MemberName.Basename);
}
@@ -365,9 +363,6 @@ namespace Mono.CSharp
var sb = new StringBuilder ();
CreateMetadataName (sb);
return sb.ToString ();
-#else
- throw new NotImplementedException ();
-#endif
}
public virtual void RemoveContainer (TypeContainer cont)
@@ -1090,9 +1085,9 @@ namespace Mono.CSharp
}
}
- public virtual void AddBasesForPart (List<FullNamedExpression> bases)
+ public virtual void SetBaseTypes (List<FullNamedExpression> baseTypes)
{
- type_bases = bases;
+ type_bases = baseTypes;
}
/// <summary>
@@ -1202,7 +1197,7 @@ namespace Mono.CSharp
}
bool pair_found = false;
- for (int ii = i + 1; ii < members.Count; ++ii) {
+ for (int ii = 0; ii < members.Count; ++ii) {
var o_b = members[ii] as Operator;
if (o_b == null || o_b.OperatorType != matching_type)
continue;
@@ -1283,8 +1278,10 @@ namespace Mono.CSharp
all_tp_builders = TypeBuilder.DefineGenericParameters (tparam_names);
- if (CurrentTypeParameters != null)
- CurrentTypeParameters.Define (all_tp_builders, spec, CurrentTypeParametersStartIndex, this);
+ if (CurrentTypeParameters != null) {
+ CurrentTypeParameters.Create (spec, CurrentTypeParametersStartIndex, this);
+ CurrentTypeParameters.Define (all_tp_builders);
+ }
}
return true;
@@ -1445,6 +1442,7 @@ namespace Mono.CSharp
members.Add (proxy_method);
proxy_method.Define ();
+ proxy_method.PrepareEmit ();
hoisted_base_call_proxies.Add (method, proxy_method);
}
@@ -1627,6 +1625,10 @@ namespace Mono.CSharp
foreach (var member in members) {
var pm = member as IParametersMember;
if (pm != null) {
+ var mc = member as MethodOrOperator;
+ if (mc != null) {
+ mc.PrepareEmit ();
+ }
var p = pm.Parameters;
if (p.IsEmpty)
@@ -1698,19 +1700,6 @@ namespace Mono.CSharp
current_type = null;
}
- void UpdateTypeParameterConstraints (TypeDefinition part)
- {
- for (int i = 0; i < CurrentTypeParameters.Count; i++) {
- if (CurrentTypeParameters[i].AddPartialConstraints (part, part.MemberName.TypeParameters[i]))
- continue;
-
- Report.SymbolRelatedToPreviousError (Location, "");
- Report.Error (265, part.Location,
- "Partial declarations of `{0}' have inconsistent constraints for type parameter `{1}'",
- GetSignatureForError (), CurrentTypeParameters[i].GetSignatureForError ());
- }
- }
-
public override void RemoveContainer (TypeContainer cont)
{
base.RemoveContainer (cont);
@@ -1735,7 +1724,7 @@ namespace Mono.CSharp
}
if (IsPartialPart) {
- PartialContainer.UpdateTypeParameterConstraints (this);
+ PartialContainer.CurrentTypeParameters.UpdateConstraints (this);
}
return true;
@@ -2296,7 +2285,7 @@ namespace Mono.CSharp
Report.SymbolRelatedToPreviousError (mb.InterfaceType);
Report.Error (540, mb.Location, "`{0}': containing type does not implement interface `{1}'",
- mb.GetSignatureForError (), TypeManager.CSharpName (mb.InterfaceType));
+ mb.GetSignatureForError (), mb.InterfaceType.GetSignatureForError ());
return false;
}
@@ -2526,7 +2515,7 @@ namespace Mono.CSharp
/// <summary>
/// Defines the default constructors
/// </summary>
- protected Constructor DefineDefaultConstructor (bool is_static)
+ protected virtual Constructor DefineDefaultConstructor (bool is_static)
{
// The default instance constructor is public
// If the class is abstract, the default constructor is protected
@@ -2607,14 +2596,14 @@ namespace Mono.CSharp
visitor.Visit (this);
}
- public override void AddBasesForPart (List<FullNamedExpression> bases)
+ public override void SetBaseTypes (List<FullNamedExpression> baseTypes)
{
var pmn = MemberName;
if (pmn.Name == "Object" && !pmn.IsGeneric && Parent.MemberName.Name == "System" && Parent.MemberName.Left == null)
Report.Error (537, Location,
"The class System.Object cannot have a base class or implement an interface.");
- base.AddBasesForPart (bases);
+ base.SetBaseTypes (baseTypes);
}
public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
@@ -3047,7 +3036,7 @@ namespace Mono.CSharp
Report.SymbolRelatedToPreviousError (iface);
Report.Warning (3027, 1, Location, "`{0}' is not CLS-compliant because base interface `{1}' is not CLS-compliant",
- GetSignatureForError (), TypeManager.CSharpName (iface));
+ GetSignatureForError (), iface.GetSignatureForError ());
}
}
@@ -3282,10 +3271,10 @@ namespace Mono.CSharp
Report.SymbolRelatedToPreviousError (base_member);
if (this is PropertyBasedMember) {
Report.Error (1715, Location, "`{0}': type must be `{1}' to match overridden member `{2}'",
- GetSignatureForError (), TypeManager.CSharpName (base_member_type), TypeManager.CSharpSignature (base_member));
+ GetSignatureForError (), base_member_type.GetSignatureForError (), base_member.GetSignatureForError ());
} else {
Report.Error (508, Location, "`{0}': return type must be `{1}' to match overridden member `{2}'",
- GetSignatureForError (), TypeManager.CSharpName (base_member_type), TypeManager.CSharpSignature (base_member));
+ GetSignatureForError (), base_member_type.GetSignatureForError (), base_member.GetSignatureForError ());
}
ok = false;
}
@@ -3359,12 +3348,16 @@ namespace Mono.CSharp
if (!InterfaceType.IsInterface) {
Report.SymbolRelatedToPreviousError (InterfaceType);
Report.Error (538, Location, "The type `{0}' in explicit interface declaration is not an interface",
- TypeManager.CSharpName (InterfaceType));
+ InterfaceType.GetSignatureForError ());
} else {
Parent.PartialContainer.VerifyImplements (this);
}
- ModifiersExtensions.Check (Modifiers.AllowedExplicitImplFlags, explicit_mod_flags, 0, Location, Report);
+ Modifiers allowed_explicit = Modifiers.AllowedExplicitImplFlags;
+ if (this is Method)
+ allowed_explicit |= Modifiers.ASYNC;
+
+ ModifiersExtensions.Check (allowed_explicit, explicit_mod_flags, 0, Location, Report);
}
return base.Define ();
@@ -3390,15 +3383,15 @@ namespace Mono.CSharp
if (this is Indexer)
Report.Error (55, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than indexer `{1}'",
- TypeManager.CSharpName (t), GetSignatureForError ());
+ t.GetSignatureForError (), GetSignatureForError ());
else if (this is Operator)
Report.Error (57, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than operator `{1}'",
- TypeManager.CSharpName (t), GetSignatureForError ());
+ t.GetSignatureForError (), GetSignatureForError ());
else
Report.Error (51, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than method `{1}'",
- TypeManager.CSharpName (t), GetSignatureForError ());
+ t.GetSignatureForError (), GetSignatureForError ());
error = true;
}
return !error;
@@ -3507,7 +3500,7 @@ namespace Mono.CSharp
// replacing predefined names which saves some space and name
// is still unique
//
- return TypeManager.CSharpName (InterfaceType) + "." + name;
+ return InterfaceType.GetSignatureForError () + "." + name;
}
public override string GetSignatureForDocumentation ()
@@ -3607,28 +3600,28 @@ namespace Mono.CSharp
if (this is Property)
Report.Error (53, Location,
"Inconsistent accessibility: property type `" +
- TypeManager.CSharpName (MemberType) + "' is less " +
+ MemberType.GetSignatureForError () + "' is less " +
"accessible than property `" + GetSignatureForError () + "'");
else if (this is Indexer)
Report.Error (54, Location,
"Inconsistent accessibility: indexer return type `" +
- TypeManager.CSharpName (MemberType) + "' is less " +
+ MemberType.GetSignatureForError () + "' is less " +
"accessible than indexer `" + GetSignatureForError () + "'");
else if (this is MethodCore) {
if (this is Operator)
Report.Error (56, Location,
"Inconsistent accessibility: return type `" +
- TypeManager.CSharpName (MemberType) + "' is less " +
+ MemberType.GetSignatureForError () + "' is less " +
"accessible than operator `" + GetSignatureForError () + "'");
else
Report.Error (50, Location,
"Inconsistent accessibility: return type `" +
- TypeManager.CSharpName (MemberType) + "' is less " +
+ MemberType.GetSignatureForError () + "' is less " +
"accessible than method `" + GetSignatureForError () + "'");
} else {
Report.Error (52, Location,
"Inconsistent accessibility: field type `" +
- TypeManager.CSharpName (MemberType) + "' is less " +
+ MemberType.GetSignatureForError () + "' is less " +
"accessible than field `" + GetSignatureForError () + "'");
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs
index 9bb7066..f190cc9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs
@@ -248,6 +248,21 @@ namespace Mono.CSharp
return true;
}
+ public void MarkCallEntry (Location loc)
+ {
+ if (!EmitAccurateDebugInfo)
+ return;
+
+ //
+ // TODO: This should emit different kind of sequence point to make
+ // step-over work for statement over multiple lines
+ //
+ // Debugging experience for Foo (A () + B ()) where A and B are
+ // on separate lines is not great
+ //
+ Mark (loc);
+ }
+
public void DefineLocalVariable (string name, LocalBuilder builder)
{
if ((flags & Options.OmitDebugInfo) != 0)
@@ -258,6 +273,9 @@ namespace Mono.CSharp
public void BeginCatchBlock (TypeSpec type)
{
+ if (IsAnonymousStoreyMutateRequired)
+ type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type);
+
ig.BeginCatchBlock (type.GetMetaInfo ());
}
@@ -1011,11 +1029,7 @@ namespace Mono.CSharp
// Emit explicit sequence point for expressions like Foo.Bar () to help debugger to
// break at right place when LHS expression can be stepped-into
//
- // TODO: The list is probably not comprehensive, need to do more testing
- //
- if (InstanceExpression is PropertyExpr || InstanceExpression is Invocation || InstanceExpression is IndexerExpr ||
- InstanceExpression is New || InstanceExpression is DelegateInvocation)
- ec.Mark (loc.Value);
+ ec.MarkCallEntry (loc.Value);
}
//
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs
index a1bb8ec..6eb42cd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs
@@ -109,28 +109,56 @@ namespace Mono.CSharp {
this.targs = targs;
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- Expression expr_resolved = expr.Resolve (ec,
- ResolveFlags.VariableOrValue | ResolveFlags.Type);
+ var sn = expr as SimpleName;
+ const ResolveFlags flags = ResolveFlags.VariableOrValue | ResolveFlags.Type;
+
+ //
+ // Resolve the expression with flow analysis turned off, we'll do the definite
+ // assignment checks later. This is because we don't know yet what the expression
+ // will resolve to - it may resolve to a FieldExpr and in this case we must do the
+ // definite assignment check on the actual field and not on the whole struct.
+ //
+ using (rc.Set (ResolveContext.Options.OmitStructFlowAnalysis)) {
+ if (sn != null) {
+ expr = sn.LookupNameExpression (rc, MemberLookupRestrictions.ReadAccess | MemberLookupRestrictions.ExactArity);
+
+ //
+ // Resolve expression which does have type set as we need expression type
+ // with disable flow analysis as we don't know whether left side expression
+ // is used as variable or type
+ //
+ if (expr is VariableReference || expr is ConstantExpr || expr is Linq.TransparentMemberAccess) {
+ using (rc.With (ResolveContext.Options.DoFlowAnalysis, false)) {
+ expr = expr.Resolve (rc);
+ }
+ } else if (expr is TypeParameterExpr) {
+ expr.Error_UnexpectedKind (rc, flags, sn.Location);
+ expr = null;
+ }
+ } else {
+ expr = expr.Resolve (rc, flags);
+ }
+ }
- if (expr_resolved == null)
+ if (expr == null)
return null;
- TypeSpec expr_type = expr_resolved.Type;
+ TypeSpec expr_type = expr.Type;
if (expr_type.IsPointer || expr_type.Kind == MemberKind.Void || expr_type == InternalType.NullLiteral || expr_type == InternalType.AnonymousMethod) {
- expr_resolved.Error_OperatorCannotBeApplied (ec, loc, ".", expr_type);
+ expr.Error_OperatorCannotBeApplied (rc, loc, ".", expr_type);
return null;
}
if (targs != null) {
- if (!targs.Resolve (ec))
+ if (!targs.Resolve (rc))
return null;
}
var results = new List<string> ();
- if (expr_resolved is Namespace){
- Namespace nexpr = expr_resolved as Namespace;
+ if (expr is Namespace) {
+ Namespace nexpr = expr as Namespace;
string namespaced_partial;
if (partial_name == null)
@@ -138,11 +166,11 @@ namespace Mono.CSharp {
else
namespaced_partial = nexpr.Name + "." + partial_name;
- ec.CurrentMemberDefinition.GetCompletionStartingWith (namespaced_partial, results);
+ rc.CurrentMemberDefinition.GetCompletionStartingWith (namespaced_partial, results);
if (partial_name != null)
results = results.Select (l => l.Substring (partial_name.Length)).ToList ();
} else {
- var r = MemberCache.GetCompletitionMembers (ec, expr_type, partial_name).Select (l => l.Name);
+ var r = MemberCache.GetCompletitionMembers (rc, expr_type, partial_name).Select (l => l.Name);
AppendResults (results, partial_name, r);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/const.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/const.cs
index 31cba91..eef90b3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/const.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/const.cs
@@ -100,10 +100,10 @@ namespace Mono.CSharp {
{
if (t.IsGenericParameter) {
Report.Error (1959, loc,
- "Type parameter `{0}' cannot be declared const", TypeManager.CSharpName (t));
+ "Type parameter `{0}' cannot be declared const", t.GetSignatureForError ());
} else {
Report.Error (283, loc,
- "The type `{0}' cannot be declared const", TypeManager.CSharpName (t));
+ "The type `{0}' cannot be declared const", t.GetSignatureForError ());
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs
index 72d96fd..7280c68 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs
@@ -3,11 +3,11 @@
//
// Author:
// Miguel de Icaza (miguel at ximian.com)
-// Marek Safar (marek.safar at seznam.cz)
+// Marek Safar (marek.safar at gmail.com)
//
// Copyright 2001-2003 Ximian, Inc.
// Copyright 2003-2008 Novell, Inc.
-// Copyright 2011 Xamarin Inc
+// Copyright 2011-2013 Xamarin Inc
//
using System;
@@ -64,7 +64,7 @@ namespace Mono.CSharp {
BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (target) &&
BuiltinTypeSpec.IsPrimitiveTypeOrDecimal (type)) {
ec.Report.Error (31, loc, "Constant value `{0}' cannot be converted to a `{1}'",
- GetValueAsLiteral (), TypeManager.CSharpName (target));
+ GetValueAsLiteral (), target.GetSignatureForError ());
} else {
base.Error_ValueCannotBeConverted (ec, target, expl);
}
@@ -89,7 +89,7 @@ namespace Mono.CSharp {
if (this.type == type)
return this;
- if (Convert.ImplicitNumericConversion (this, type) == null)
+ if (!Convert.ImplicitNumericConversionExists (this.type, type))
return null;
bool fail;
@@ -100,7 +100,7 @@ namespace Mono.CSharp {
// reached, by calling Convert.ImplicitStandardConversionExists
//
throw new InternalErrorException ("Missing constant conversion between `{0}' and `{1}'",
- TypeManager.CSharpName (Type), TypeManager.CSharpName (type));
+ Type.GetSignatureForError (), type.GetSignatureForError ());
}
return CreateConstantFromValue (type, constant_value, loc);
@@ -402,7 +402,7 @@ namespace Mono.CSharp {
catch
{
ec.Report.Error (31, loc, "Constant value `{0}' cannot be converted to a `{1}'",
- GetValue ().ToString (), TypeManager.CSharpName (target));
+ GetValue ().ToString (), target.GetSignatureForError ());
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs
index c06c1c4..f636ffd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs
@@ -782,7 +782,7 @@ namespace Mono.CSharp
public LocationsBag LocationsBag { get; set; }
public bool UseJayGlobalArrays { get; set; }
- public Tokenizer.LocatedToken[] LocatedTokens { get; set; }
+ public LocatedToken[] LocatedTokens { get; set; }
public MD5 GetChecksumAlgorithm ()
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs
index 3c5ebea..bfbfe03 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs
@@ -479,7 +479,7 @@ namespace Mono.CSharp {
}
if (expr_type != expr.Type)
- return new Nullable.Lifted (conv, unwrap, target_type).Resolve (ec);
+ return new Nullable.LiftedConversion (conv, unwrap, target_type).Resolve (ec);
return Nullable.Wrap.Create (conv, target_type);
}
@@ -1097,14 +1097,16 @@ namespace Mono.CSharp {
TypeSpec source_type = source.Type;
TypeSpec target_type = target;
Expression source_type_expr;
+ bool nullable_source = false;
if (source_type.IsNullableType) {
// No unwrapping conversion S? -> T for non-reference types
if (implicitOnly && !TypeSpec.IsReferenceType (target_type) && !target_type.IsNullableType) {
source_type_expr = source;
} else {
- source_type_expr = Nullable.Unwrap.Create (source);
+ source_type_expr = Nullable.Unwrap.CreateUnwrapped (source);
source_type = source_type_expr.Type;
+ nullable_source = true;
}
} else {
source_type_expr = source;
@@ -1231,26 +1233,48 @@ namespace Mono.CSharp {
//
if (t_x != target_type) {
//
- // User operator is of T?, no need to lift it
+ // User operator is of T?
//
- if (t_x == target && t_x.IsNullableType)
- return source;
+ if (t_x.IsNullableType && target.IsNullableType) {
+ //
+ // User operator return type does not match target type we need
+ // yet another conversion. This should happen for promoted numeric
+ // types only
+ //
+ if (t_x != target) {
+ var unwrap = Nullable.Unwrap.CreateUnwrapped (source);
- source = implicitOnly ?
- ImplicitConversionStandard (ec, source, target_type, loc) :
- ExplicitConversionStandard (ec, source, target_type, loc);
+ source = implicitOnly ?
+ ImplicitConversionStandard (ec, unwrap, target_type, loc) :
+ ExplicitConversionStandard (ec, unwrap, target_type, loc);
- if (source == null)
- return null;
+ if (source == null)
+ return null;
+
+ source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec);
+ }
+ } else {
+ source = implicitOnly ?
+ ImplicitConversionStandard (ec, source, target_type, loc) :
+ ExplicitConversionStandard (ec, source, target_type, loc);
+
+ if (source == null)
+ return null;
+ }
}
+
//
- // Source expression is of nullable type, lift the result in the case it's null and
- // not nullable/lifted user operator is used
+ // Source expression is of nullable type and underlying conversion returns
+ // only non-nullable type we need to lift it manually
//
- if (source_type_expr is Nullable.Unwrap && !s_x.IsNullableType && (TypeSpec.IsReferenceType (target) || target_type != target))
- source = new Nullable.Lifted (source, source_type_expr, target).Resolve (ec);
- else if (target_type != target)
+ if (nullable_source && !s_x.IsNullableType)
+ return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec);
+
+ //
+ // Target is of nullable type but source type is not, wrap the result expression
+ //
+ if (target.IsNullableType && !t_x.IsNullableType)
source = Nullable.Wrap.Create (source, target);
return source;
@@ -1414,6 +1438,9 @@ namespace Mono.CSharp {
Expression am = ame.Compatible (ec, target_type);
if (am != null)
return am.Resolve (ec);
+
+ // Avoid CS1503 after CS1661
+ return ErrorExpression.Instance;
}
if (expr_type == InternalType.Arglist && target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec)
@@ -2165,7 +2192,7 @@ namespace Mono.CSharp {
if (e == null)
return null;
- return new Nullable.Lifted (e, unwrap, target_type).Resolve (ec);
+ return new Nullable.LiftedConversion (e, unwrap, target_type).Resolve (ec);
}
if (expr_type.BuiltinType == BuiltinTypeSpec.Type.Object) {
return new UnboxCast (expr, target_type);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
index d22fa41..c72be69 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
@@ -56,7 +56,7 @@ namespace Mono.CSharp
/// </summary>
Block current_block;
- BlockVariableDeclaration current_variable;
+ BlockVariable current_variable;
Delegate current_delegate;
@@ -118,6 +118,8 @@ namespace Mono.CSharp
// Keeps track of global data changes to undo on parser error
//
public Undo undo;
+
+ bool? interactive_async;
Stack<Linq.QueryBlock> linq_clause_blocks;
@@ -275,7 +277,7 @@ namespace Mono.CSharp
//t "positional_or_named_argument : error",
//t "$$7 :",
//t "named_attribute_argument : IDENTIFIER ASSIGN $$7 expression",
-//t "named_argument : identifier_inside_body COLON opt_named_modifier expression",
+//t "named_argument : identifier_inside_body COLON opt_named_modifier expression_or_error",
//t "opt_named_modifier :",
//t "opt_named_modifier : REF",
//t "opt_named_modifier : OUT",
@@ -1098,6 +1100,7 @@ namespace Mono.CSharp
//t "return_statement : RETURN expression error",
//t "return_statement : RETURN error",
//t "throw_statement : THROW opt_expression SEMICOLON",
+//t "throw_statement : THROW expression error",
//t "throw_statement : THROW error",
//t "yield_statement : identifier_inside_body RETURN opt_expression SEMICOLON",
//t "yield_statement : identifier_inside_body RETURN expression error",
@@ -1471,20 +1474,20 @@ namespace Mono.CSharp
yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 1:
-#line 386 "cs-parser.jay"
+#line 388 "cs-parser.jay"
{
Lexer.check_incorrect_doc_comment ();
}
break;
case 2:
-#line 387 "cs-parser.jay"
+#line 389 "cs-parser.jay"
{ Lexer.CompleteOnEOF = false; }
break;
case 6:
case_6();
break;
case 7:
-#line 406 "cs-parser.jay"
+#line 408 "cs-parser.jay"
{
module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace);
}
@@ -1496,7 +1499,7 @@ case 13:
case_13();
break;
case 14:
-#line 451 "cs-parser.jay"
+#line 453 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
}
@@ -1541,7 +1544,7 @@ case 43:
case_43();
break;
case 44:
-#line 636 "cs-parser.jay"
+#line 637 "cs-parser.jay"
{
current_namespace.DeclarationFound = true;
}
@@ -1580,15 +1583,15 @@ case 62:
case_62();
break;
case 63:
-#line 771 "cs-parser.jay"
+#line 772 "cs-parser.jay"
{ yyVal = "event"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 64:
-#line 772 "cs-parser.jay"
+#line 773 "cs-parser.jay"
{ yyVal = "return"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 65:
-#line 779 "cs-parser.jay"
+#line 780 "cs-parser.jay"
{
yyVal = new List<Attribute> (4) { (Attribute) yyVals[0+yyTop] };
}
@@ -1597,7 +1600,7 @@ case 66:
case_66();
break;
case 67:
-#line 796 "cs-parser.jay"
+#line 797 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1606,14 +1609,14 @@ case 68:
case_68();
break;
case 70:
-#line 824 "cs-parser.jay"
+#line 825 "cs-parser.jay"
{ yyVal = null; HadAttributeParens = false; }
break;
case 71:
case_71();
break;
case 72:
-#line 836 "cs-parser.jay"
+#line 837 "cs-parser.jay"
{ yyVal = null; }
break;
case 73:
@@ -1629,7 +1632,7 @@ case 76:
case_76();
break;
case 77:
-#line 880 "cs-parser.jay"
+#line 881 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop]);
}
@@ -1638,7 +1641,7 @@ case 79:
case_79();
break;
case 80:
-#line 893 "cs-parser.jay"
+#line 894 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1650,29 +1653,29 @@ case 82:
case_82();
break;
case 83:
-#line 919 "cs-parser.jay"
+#line 920 "cs-parser.jay"
{ yyVal = null; }
break;
case 84:
-#line 923 "cs-parser.jay"
+#line 924 "cs-parser.jay"
{
yyVal = Argument.AType.Ref;
}
break;
case 85:
-#line 927 "cs-parser.jay"
+#line 928 "cs-parser.jay"
{
yyVal = Argument.AType.Out;
}
break;
case 88:
-#line 939 "cs-parser.jay"
+#line 940 "cs-parser.jay"
{
lexer.parsing_modifiers = true;
}
break;
case 89:
-#line 943 "cs-parser.jay"
+#line 944 "cs-parser.jay"
{
lexer.parsing_modifiers = true;
}
@@ -1681,7 +1684,7 @@ case 102:
case_102();
break;
case 103:
-#line 974 "cs-parser.jay"
+#line 975 "cs-parser.jay"
{
}
break;
@@ -1701,7 +1704,7 @@ case 108:
case_108();
break;
case 109:
-#line 1018 "cs-parser.jay"
+#line 1019 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
}
@@ -1716,13 +1719,13 @@ case 112:
case_112();
break;
case 115:
-#line 1067 "cs-parser.jay"
+#line 1068 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 116:
-#line 1071 "cs-parser.jay"
+#line 1072 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
@@ -1731,7 +1734,7 @@ case 117:
case_117();
break;
case 118:
-#line 1087 "cs-parser.jay"
+#line 1088 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1755,7 +1758,7 @@ case 126:
case_126();
break;
case 127:
-#line 1166 "cs-parser.jay"
+#line 1167 "cs-parser.jay"
{
report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name");
}
@@ -1767,13 +1770,13 @@ case 130:
case_130();
break;
case 133:
-#line 1196 "cs-parser.jay"
+#line 1197 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 134:
-#line 1200 "cs-parser.jay"
+#line 1201 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
@@ -1782,7 +1785,7 @@ case 135:
case_135();
break;
case 136:
-#line 1213 "cs-parser.jay"
+#line 1214 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1791,13 +1794,13 @@ case 137:
case_137();
break;
case 140:
-#line 1232 "cs-parser.jay"
+#line 1233 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 141:
-#line 1236 "cs-parser.jay"
+#line 1237 "cs-parser.jay"
{
current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
@@ -1806,7 +1809,7 @@ case 142:
case_142();
break;
case 143:
-#line 1252 "cs-parser.jay"
+#line 1253 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1827,7 +1830,7 @@ case 150:
case_150();
break;
case 151:
-#line 1320 "cs-parser.jay"
+#line 1321 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.All;
}
@@ -1839,7 +1842,7 @@ case 153:
case_153();
break;
case 154:
-#line 1359 "cs-parser.jay"
+#line 1360 "cs-parser.jay"
{
lexer.parsing_generic_declaration = true;
}
@@ -1848,7 +1851,7 @@ case 155:
case_155();
break;
case 156:
-#line 1369 "cs-parser.jay"
+#line 1370 "cs-parser.jay"
{
lexer.ConstraintsParsing = true;
}
@@ -1863,11 +1866,11 @@ case 159:
case_159();
break;
case 161:
-#line 1440 "cs-parser.jay"
+#line 1443 "cs-parser.jay"
{ savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; }
break;
case 162:
-#line 1444 "cs-parser.jay"
+#line 1447 "cs-parser.jay"
{ yyVal = ParametersCompiled.EmptyReadOnlyParameters; }
break;
case 164:
@@ -1892,13 +1895,13 @@ case 170:
case_170();
break;
case 171:
-#line 1516 "cs-parser.jay"
+#line 1519 "cs-parser.jay"
{
yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } );
}
break;
case 172:
-#line 1520 "cs-parser.jay"
+#line 1523 "cs-parser.jay"
{
yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true);
}
@@ -1925,7 +1928,7 @@ case 179:
case_179();
break;
case 180:
-#line 1601 "cs-parser.jay"
+#line 1604 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -1934,11 +1937,11 @@ case 181:
case_181();
break;
case 182:
-#line 1642 "cs-parser.jay"
+#line 1645 "cs-parser.jay"
{ yyVal = Parameter.Modifier.NONE; }
break;
case 184:
-#line 1650 "cs-parser.jay"
+#line 1653 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -1971,7 +1974,7 @@ case 193:
case_193();
break;
case 194:
-#line 1744 "cs-parser.jay"
+#line 1747 "cs-parser.jay"
{
Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS);
}
@@ -1992,7 +1995,7 @@ case 199:
case_199();
break;
case 200:
-#line 1798 "cs-parser.jay"
+#line 1801 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue;
}
@@ -2001,7 +2004,7 @@ case 201:
case_201();
break;
case 202:
-#line 1827 "cs-parser.jay"
+#line 1830 "cs-parser.jay"
{
lexer.PropertyParsing = false;
}
@@ -2031,7 +2034,7 @@ case 215:
case_215();
break;
case 216:
-#line 1975 "cs-parser.jay"
+#line 1978 "cs-parser.jay"
{
}
break;
@@ -2048,55 +2051,55 @@ case 220:
case_220();
break;
case 221:
-#line 2015 "cs-parser.jay"
+#line 2018 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
}
break;
case 224:
-#line 2027 "cs-parser.jay"
+#line 2030 "cs-parser.jay"
{
lexer.parsing_modifiers = true;
}
break;
case 225:
-#line 2031 "cs-parser.jay"
+#line 2034 "cs-parser.jay"
{
lexer.parsing_modifiers = true;
}
break;
case 226:
-#line 2038 "cs-parser.jay"
+#line 2041 "cs-parser.jay"
{
report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
}
break;
case 227:
-#line 2042 "cs-parser.jay"
+#line 2045 "cs-parser.jay"
{
report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
}
break;
case 232:
-#line 2050 "cs-parser.jay"
+#line 2053 "cs-parser.jay"
{
report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators");
}
break;
case 233:
-#line 2054 "cs-parser.jay"
+#line 2057 "cs-parser.jay"
{
report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors");
}
break;
case 234:
-#line 2058 "cs-parser.jay"
+#line 2061 "cs-parser.jay"
{
report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations");
}
break;
case 235:
-#line 2064 "cs-parser.jay"
+#line 2067 "cs-parser.jay"
{
}
break;
@@ -2104,14 +2107,14 @@ case 236:
case_236();
break;
case 238:
-#line 2097 "cs-parser.jay"
+#line 2100 "cs-parser.jay"
{ savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; }
break;
case 240:
case_240();
break;
case 241:
-#line 2113 "cs-parser.jay"
+#line 2116 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.DefaultValue;
}
@@ -2120,95 +2123,95 @@ case 242:
case_242();
break;
case 244:
-#line 2159 "cs-parser.jay"
+#line 2162 "cs-parser.jay"
{ yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 245:
-#line 2160 "cs-parser.jay"
+#line 2163 "cs-parser.jay"
{ yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 246:
-#line 2161 "cs-parser.jay"
+#line 2164 "cs-parser.jay"
{ yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 247:
-#line 2162 "cs-parser.jay"
+#line 2165 "cs-parser.jay"
{ yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 248:
-#line 2163 "cs-parser.jay"
+#line 2166 "cs-parser.jay"
{ yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 249:
-#line 2164 "cs-parser.jay"
+#line 2167 "cs-parser.jay"
{ yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 250:
-#line 2166 "cs-parser.jay"
+#line 2169 "cs-parser.jay"
{ yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 251:
-#line 2167 "cs-parser.jay"
+#line 2170 "cs-parser.jay"
{ yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 252:
-#line 2169 "cs-parser.jay"
+#line 2172 "cs-parser.jay"
{ yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 253:
-#line 2170 "cs-parser.jay"
+#line 2173 "cs-parser.jay"
{ yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 254:
-#line 2171 "cs-parser.jay"
+#line 2174 "cs-parser.jay"
{ yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 255:
-#line 2172 "cs-parser.jay"
+#line 2175 "cs-parser.jay"
{ yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 256:
-#line 2173 "cs-parser.jay"
+#line 2176 "cs-parser.jay"
{ yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 257:
-#line 2174 "cs-parser.jay"
+#line 2177 "cs-parser.jay"
{ yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 258:
-#line 2175 "cs-parser.jay"
+#line 2178 "cs-parser.jay"
{ yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 259:
-#line 2176 "cs-parser.jay"
+#line 2179 "cs-parser.jay"
{ yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 260:
-#line 2177 "cs-parser.jay"
+#line 2180 "cs-parser.jay"
{ yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 261:
-#line 2178 "cs-parser.jay"
+#line 2181 "cs-parser.jay"
{ yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 262:
-#line 2179 "cs-parser.jay"
+#line 2182 "cs-parser.jay"
{ yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 263:
-#line 2180 "cs-parser.jay"
+#line 2183 "cs-parser.jay"
{ yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 264:
-#line 2181 "cs-parser.jay"
+#line 2184 "cs-parser.jay"
{ yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 265:
-#line 2182 "cs-parser.jay"
+#line 2185 "cs-parser.jay"
{ yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
break;
case 266:
-#line 2189 "cs-parser.jay"
+#line 2192 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.DefaultValue;
}
@@ -2217,7 +2220,7 @@ case 267:
case_267();
break;
case 268:
-#line 2212 "cs-parser.jay"
+#line 2215 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.DefaultValue;
}
@@ -2244,11 +2247,11 @@ case 275:
case_275();
break;
case 277:
-#line 2322 "cs-parser.jay"
+#line 2325 "cs-parser.jay"
{ current_block = null; yyVal = null; }
break;
case 280:
-#line 2334 "cs-parser.jay"
+#line 2337 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -2257,7 +2260,7 @@ case 281:
case_281();
break;
case 282:
-#line 2344 "cs-parser.jay"
+#line 2347 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -2296,7 +2299,7 @@ case 293:
case_293();
break;
case 295:
-#line 2471 "cs-parser.jay"
+#line 2474 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -2305,13 +2308,13 @@ case 296:
case_296();
break;
case 299:
-#line 2489 "cs-parser.jay"
+#line 2492 "cs-parser.jay"
{
current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
break;
case 300:
-#line 2493 "cs-parser.jay"
+#line 2496 "cs-parser.jay"
{
current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
}
@@ -2320,7 +2323,7 @@ case 301:
case_301();
break;
case 302:
-#line 2506 "cs-parser.jay"
+#line 2509 "cs-parser.jay"
{
++lexer.parsing_block;
}
@@ -2332,7 +2335,7 @@ case 304:
case_304();
break;
case 305:
-#line 2531 "cs-parser.jay"
+#line 2534 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -2386,7 +2389,7 @@ case 325:
case_325();
break;
case 328:
-#line 2717 "cs-parser.jay"
+#line 2720 "cs-parser.jay"
{
lbag.AppendToMember (current_container, GetLocation (yyVals[0+yyTop]));
}
@@ -2407,7 +2410,7 @@ case 334:
case_334();
break;
case 336:
-#line 2791 "cs-parser.jay"
+#line 2794 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue;
}
@@ -2416,7 +2419,7 @@ case 337:
case_337();
break;
case 338:
-#line 2810 "cs-parser.jay"
+#line 2813 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
}
@@ -2449,7 +2452,7 @@ case 351:
case_351();
break;
case 352:
-#line 2917 "cs-parser.jay"
+#line 2919 "cs-parser.jay"
{
lexer.parsing_generic_declaration = true;
}
@@ -2494,13 +2497,13 @@ case 367:
case_367();
break;
case 369:
-#line 3042 "cs-parser.jay"
+#line 3044 "cs-parser.jay"
{
yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
}
break;
case 370:
-#line 3049 "cs-parser.jay"
+#line 3051 "cs-parser.jay"
{
lexer.parsing_generic_declaration = true;
}
@@ -2515,7 +2518,7 @@ case 376:
case_376();
break;
case 378:
-#line 3087 "cs-parser.jay"
+#line 3089 "cs-parser.jay"
{
yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
}
@@ -2524,7 +2527,7 @@ case 379:
case_379();
break;
case 380:
-#line 3106 "cs-parser.jay"
+#line 3108 "cs-parser.jay"
{
yyVal = new ComposedCast ((ATypeNameExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
}
@@ -2533,13 +2536,13 @@ case 381:
case_381();
break;
case 382:
-#line 3115 "cs-parser.jay"
+#line 3117 "cs-parser.jay"
{
yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
}
break;
case 383:
-#line 3119 "cs-parser.jay"
+#line 3121 "cs-parser.jay"
{
yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
}
@@ -2554,63 +2557,63 @@ case 386:
case_386();
break;
case 387:
-#line 3153 "cs-parser.jay"
+#line 3155 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); }
break;
case 388:
-#line 3154 "cs-parser.jay"
+#line 3156 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); }
break;
case 389:
-#line 3155 "cs-parser.jay"
+#line 3157 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); }
break;
case 390:
-#line 3156 "cs-parser.jay"
+#line 3158 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); }
break;
case 391:
-#line 3157 "cs-parser.jay"
+#line 3159 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); }
break;
case 392:
-#line 3158 "cs-parser.jay"
+#line 3160 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); }
break;
case 394:
-#line 3163 "cs-parser.jay"
+#line 3165 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); }
break;
case 395:
-#line 3164 "cs-parser.jay"
+#line 3166 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); }
break;
case 396:
-#line 3165 "cs-parser.jay"
+#line 3167 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); }
break;
case 397:
-#line 3166 "cs-parser.jay"
+#line 3168 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); }
break;
case 398:
-#line 3167 "cs-parser.jay"
+#line 3169 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); }
break;
case 399:
-#line 3168 "cs-parser.jay"
+#line 3170 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); }
break;
case 400:
-#line 3169 "cs-parser.jay"
+#line 3171 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); }
break;
case 401:
-#line 3170 "cs-parser.jay"
+#line 3172 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); }
break;
case 402:
-#line 3171 "cs-parser.jay"
+#line 3173 "cs-parser.jay"
{ yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); }
break;
case 423:
@@ -2620,22 +2623,22 @@ case 424:
case_424();
break;
case 428:
-#line 3218 "cs-parser.jay"
+#line 3220 "cs-parser.jay"
{ yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); }
break;
case 429:
-#line 3222 "cs-parser.jay"
+#line 3224 "cs-parser.jay"
{ yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); }
break;
case 430:
-#line 3223 "cs-parser.jay"
+#line 3225 "cs-parser.jay"
{ yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); }
break;
case 435:
case_435();
break;
case 436:
-#line 3256 "cs-parser.jay"
+#line 3258 "cs-parser.jay"
{
yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
@@ -2653,7 +2656,7 @@ case 440:
case_440();
break;
case 441:
-#line 3291 "cs-parser.jay"
+#line 3290 "cs-parser.jay"
{
yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop]));
}
@@ -2662,7 +2665,7 @@ case 442:
case_442();
break;
case 443:
-#line 3299 "cs-parser.jay"
+#line 3298 "cs-parser.jay"
{
yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location);
}
@@ -2680,7 +2683,7 @@ case 447:
case_447();
break;
case 448:
-#line 3329 "cs-parser.jay"
+#line 3328 "cs-parser.jay"
{ yyVal = null; }
break;
case 450:
@@ -2690,11 +2693,11 @@ case 451:
case_451();
break;
case 452:
-#line 3351 "cs-parser.jay"
+#line 3350 "cs-parser.jay"
{ yyVal = null; }
break;
case 453:
-#line 3355 "cs-parser.jay"
+#line 3354 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -2715,7 +2718,7 @@ case 458:
case_458();
break;
case 459:
-#line 3394 "cs-parser.jay"
+#line 3393 "cs-parser.jay"
{
yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop]));
}
@@ -2730,7 +2733,7 @@ case 462:
case_462();
break;
case 465:
-#line 3425 "cs-parser.jay"
+#line 3424 "cs-parser.jay"
{ yyVal = null; }
break;
case 467:
@@ -2749,7 +2752,7 @@ case 471:
case_471();
break;
case 472:
-#line 3479 "cs-parser.jay"
+#line 3478 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop]);
}
@@ -2788,13 +2791,13 @@ case 487:
case_487();
break;
case 488:
-#line 3572 "cs-parser.jay"
+#line 3571 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop]);
}
break;
case 490:
-#line 3580 "cs-parser.jay"
+#line 3579 "cs-parser.jay"
{
yyVal = new This (GetLocation (yyVals[0+yyTop]));
}
@@ -2806,13 +2809,13 @@ case 492:
case_492();
break;
case 493:
-#line 3600 "cs-parser.jay"
+#line 3599 "cs-parser.jay"
{
yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
}
break;
case 494:
-#line 3607 "cs-parser.jay"
+#line 3606 "cs-parser.jay"
{
yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
}
@@ -2839,7 +2842,7 @@ case 501:
case_501();
break;
case 502:
-#line 3674 "cs-parser.jay"
+#line 3673 "cs-parser.jay"
{
++lexer.parsing_type;
}
@@ -2851,7 +2854,7 @@ case 504:
case_504();
break;
case 507:
-#line 3701 "cs-parser.jay"
+#line 3700 "cs-parser.jay"
{ yyVal = null; }
break;
case 509:
@@ -2882,25 +2885,25 @@ case 520:
case_520();
break;
case 521:
-#line 3779 "cs-parser.jay"
+#line 3778 "cs-parser.jay"
{
yyVal = 2;
}
break;
case 522:
-#line 3783 "cs-parser.jay"
+#line 3782 "cs-parser.jay"
{
yyVal = ((int) yyVals[-1+yyTop]) + 1;
}
break;
case 523:
-#line 3790 "cs-parser.jay"
+#line 3789 "cs-parser.jay"
{
yyVal = null;
}
break;
case 524:
-#line 3794 "cs-parser.jay"
+#line 3793 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -2918,7 +2921,7 @@ case 528:
case_528();
break;
case 529:
-#line 3838 "cs-parser.jay"
+#line 3837 "cs-parser.jay"
{
lexer.TypeOfParsing = true;
}
@@ -2972,7 +2975,7 @@ case 547:
case_547();
break;
case 548:
-#line 3983 "cs-parser.jay"
+#line 3980 "cs-parser.jay"
{
start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop]));
}
@@ -2981,7 +2984,7 @@ case 549:
case_549();
break;
case 550:
-#line 3996 "cs-parser.jay"
+#line 3993 "cs-parser.jay"
{
start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop]));
}
@@ -2990,13 +2993,13 @@ case 551:
case_551();
break;
case 552:
-#line 4013 "cs-parser.jay"
+#line 4010 "cs-parser.jay"
{
yyVal = ParametersCompiled.Undefined;
}
break;
case 554:
-#line 4021 "cs-parser.jay"
+#line 4018 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
}
@@ -3008,13 +3011,13 @@ case 556:
case_556();
break;
case 558:
-#line 4047 "cs-parser.jay"
+#line 4044 "cs-parser.jay"
{
yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
case 559:
-#line 4051 "cs-parser.jay"
+#line 4048 "cs-parser.jay"
{
yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
@@ -3715,7 +3718,7 @@ case 837:
case_837();
break;
case 838:
-#line 5623 "cs-parser.jay"
+#line 5619 "cs-parser.jay"
{
start_block (GetLocation (yyVals[0+yyTop]));
}
@@ -3727,13 +3730,13 @@ case 840:
case_840();
break;
case 841:
-#line 5643 "cs-parser.jay"
+#line 5639 "cs-parser.jay"
{
report.Warning (1522, 1, current_block.StartLocation, "Empty switch block");
}
break;
case 845:
-#line 5653 "cs-parser.jay"
+#line 5649 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
}
@@ -3742,7 +3745,7 @@ case 847:
case_847();
break;
case 848:
-#line 5670 "cs-parser.jay"
+#line 5666 "cs-parser.jay"
{
current_block.AddStatement ((Statement) yyVals[0+yyTop]);
}
@@ -3754,7 +3757,7 @@ case 850:
case_850();
break;
case 851:
-#line 5687 "cs-parser.jay"
+#line 5683 "cs-parser.jay"
{
yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop]));
}
@@ -3778,7 +3781,7 @@ case 861:
case_861();
break;
case 862:
-#line 5748 "cs-parser.jay"
+#line 5744 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -3787,7 +3790,7 @@ case 863:
case_863();
break;
case 864:
-#line 5763 "cs-parser.jay"
+#line 5759 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -3799,7 +3802,7 @@ case 866:
case_866();
break;
case 867:
-#line 5784 "cs-parser.jay"
+#line 5780 "cs-parser.jay"
{
yyVal = yyVals[0+yyTop];
}
@@ -3814,7 +3817,7 @@ case 870:
case_870();
break;
case 871:
-#line 5818 "cs-parser.jay"
+#line 5814 "cs-parser.jay"
{ yyVal = new EmptyStatement (lexer.Location); }
break;
case 873:
@@ -3824,11 +3827,11 @@ case 874:
case_874();
break;
case 876:
-#line 5842 "cs-parser.jay"
+#line 5838 "cs-parser.jay"
{ yyVal = null; }
break;
case 878:
-#line 5847 "cs-parser.jay"
+#line 5843 "cs-parser.jay"
{ yyVal = new EmptyStatement (lexer.Location); }
break;
case 882:
@@ -3894,15 +3897,15 @@ case 907:
case 908:
case_908();
break;
-case 911:
-#line 6087 "cs-parser.jay"
+case 909:
+ case_909();
+ break;
+case 912:
+#line 6089 "cs-parser.jay"
{
yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List<Catch>) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false);
}
break;
-case 912:
- case_912();
- break;
case 913:
case_913();
break;
@@ -3915,51 +3918,51 @@ case 915:
case 916:
case_916();
break;
-case 919:
-#line 6136 "cs-parser.jay"
+case 917:
+ case_917();
+ break;
+case 920:
+#line 6138 "cs-parser.jay"
{
yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
-case 920:
- case_920();
- break;
case 921:
-#line 6155 "cs-parser.jay"
+ case_921();
+ break;
+case 922:
+#line 6157 "cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
}
break;
-case 922:
- case_922();
- break;
case 923:
case_923();
break;
case 924:
-#line 6196 "cs-parser.jay"
+ case_924();
+ break;
+case 925:
+#line 6198 "cs-parser.jay"
{
yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
-case 925:
-#line 6203 "cs-parser.jay"
+case 926:
+#line 6205 "cs-parser.jay"
{
yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
}
break;
-case 926:
- case_926();
- break;
case 927:
-#line 6213 "cs-parser.jay"
+ case_927();
+ break;
+case 928:
+#line 6215 "cs-parser.jay"
{
yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
}
break;
-case 928:
- case_928();
- break;
case 929:
case_929();
break;
@@ -3987,18 +3990,18 @@ case 936:
case 937:
case_937();
break;
-case 939:
- case_939();
+case 938:
+ case_938();
break;
case 940:
-#line 6318 "cs-parser.jay"
+ case_940();
+ break;
+case 941:
+#line 6320 "cs-parser.jay"
{
Error_MissingInitializer (lexer.Location);
}
break;
-case 941:
- case_941();
- break;
case 942:
case_942();
break;
@@ -4024,44 +4027,44 @@ case 949:
case_949();
break;
case 950:
-#line 6423 "cs-parser.jay"
+ case_950();
+ break;
+case 951:
+#line 6425 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
break;
-case 951:
- case_951();
- break;
case 952:
-#line 6439 "cs-parser.jay"
+ case_952();
+ break;
+case 953:
+#line 6441 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
break;
-case 953:
- case_953();
- break;
case 954:
case_954();
break;
case 955:
case_955();
break;
-case 957:
- case_957();
+case 956:
+ case_956();
break;
case 958:
case_958();
break;
case 959:
-#line 6503 "cs-parser.jay"
+ case_959();
+ break;
+case 960:
+#line 6505 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
break;
-case 960:
- case_960();
- break;
case 961:
case_961();
break;
@@ -4072,35 +4075,35 @@ case 963:
case_963();
break;
case 964:
-#line 6542 "cs-parser.jay"
+ case_964();
+ break;
+case 965:
+#line 6544 "cs-parser.jay"
{
yyVal = new object[] { yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]) };
}
break;
-case 965:
- case_965();
+case 966:
+ case_966();
break;
-case 967:
- case_967();
+case 968:
+ case_968();
break;
-case 973:
-#line 6571 "cs-parser.jay"
+case 974:
+#line 6573 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
break;
-case 974:
- case_974();
- break;
case 975:
-#line 6590 "cs-parser.jay"
+ case_975();
+ break;
+case 976:
+#line 6592 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
break;
-case 976:
- case_976();
- break;
case 977:
case_977();
break;
@@ -4125,8 +4128,8 @@ case 983:
case 984:
case_984();
break;
-case 986:
- case_986();
+case 985:
+ case_985();
break;
case 987:
case_987();
@@ -4134,87 +4137,87 @@ case 987:
case 988:
case_988();
break;
-case 990:
- case_990();
+case 989:
+ case_989();
break;
case 991:
case_991();
break;
-case 993:
- case_993();
+case 992:
+ case_992();
break;
case 994:
case_994();
break;
case 995:
-#line 6791 "cs-parser.jay"
+ case_995();
+ break;
+case 996:
+#line 6793 "cs-parser.jay"
{
yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);
}
break;
-case 996:
- case_996();
- break;
case 997:
case_997();
break;
case 998:
-#line 6808 "cs-parser.jay"
+ case_998();
+ break;
+case 999:
+#line 6810 "cs-parser.jay"
{
yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);
}
break;
-case 999:
- case_999();
- break;
case 1000:
case_1000();
break;
-case 1002:
- case_1002();
+case 1001:
+ case_1001();
break;
case 1003:
case_1003();
break;
-case 1006:
- case_1006();
+case 1004:
+ case_1004();
break;
case 1007:
case_1007();
break;
-case 1015:
-#line 6930 "cs-parser.jay"
+case 1008:
+ case_1008();
+ break;
+case 1016:
+#line 6935 "cs-parser.jay"
{
module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop];
}
break;
-case 1016:
-#line 6937 "cs-parser.jay"
+case 1017:
+#line 6942 "cs-parser.jay"
{
module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
}
break;
-case 1017:
- case_1017();
- break;
case 1018:
case_1018();
break;
case 1019:
-#line 6954 "cs-parser.jay"
+ case_1019();
+ break;
+case 1020:
+#line 6959 "cs-parser.jay"
{
yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], MemberCache.IndexerNameAlias, Location.Null);
}
break;
-case 1020:
-#line 6958 "cs-parser.jay"
+case 1021:
+#line 6963 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
}
break;
-case 1021:
- case_1021();
- break;
case 1022:
case_1022();
break;
@@ -4224,39 +4227,42 @@ case 1023:
case 1024:
case_1024();
break;
-case 1026:
-#line 6994 "cs-parser.jay"
+case 1025:
+ case_1025();
+ break;
+case 1027:
+#line 6999 "cs-parser.jay"
{
yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]);
}
break;
-case 1028:
-#line 7002 "cs-parser.jay"
+case 1029:
+#line 7007 "cs-parser.jay"
{
valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
}
break;
-case 1029:
-#line 7006 "cs-parser.jay"
+case 1030:
+#line 7011 "cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
}
break;
-case 1030:
-#line 7013 "cs-parser.jay"
+case 1031:
+#line 7018 "cs-parser.jay"
{
yyVal = new List<DocumentationParameter> (0);
}
break;
-case 1032:
- case_1032();
- break;
case 1033:
case_1033();
break;
case 1034:
case_1034();
break;
+case 1035:
+ case_1035();
+ break;
#line default
}
yyTop -= yyLen[yyN];
@@ -4293,7 +4299,7 @@ case 1034:
All more than 3 lines long rules are wrapped into a method
*/
void case_6()
-#line 394 "cs-parser.jay"
+#line 396 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
Attributes attrs = (Attributes) yyVals[0+yyTop];
@@ -4305,7 +4311,7 @@ void case_6()
}
void case_8()
-#line 408 "cs-parser.jay"
+#line 410 "cs-parser.jay"
{
if (yyToken == Token.EXTERN_ALIAS)
report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements");
@@ -4314,9 +4320,9 @@ void case_8()
}
void case_13()
-#line 428 "cs-parser.jay"
+#line 430 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
string s = lt.Value;
if (s != "alias") {
syntax_error (lt.Location, "`alias' expected");
@@ -4324,7 +4330,7 @@ void case_13()
if (lang_version == LanguageVersion.ISO_1)
FeatureIsNotAvailable (lt.Location, "external alias");
- lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ lt = (LocatedToken) yyVals[-1+yyTop];
if (lt.Value == QualifiedAliasMember.GlobalAlias) {
RootNamespace.Error_GlobalNamespaceRedefined (report, lt.Location);
}
@@ -4337,14 +4343,14 @@ void case_13()
}
void case_17()
-#line 461 "cs-parser.jay"
+#line 463 "cs-parser.jay"
{
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
}
void case_18()
-#line 469 "cs-parser.jay"
+#line 471 "cs-parser.jay"
{
var un = new UsingNamespace ((ATypeNameExpression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
current_namespace.AddUsing (un);
@@ -4353,9 +4359,9 @@ void case_18()
}
void case_19()
-#line 476 "cs-parser.jay"
+#line 478 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") {
report.Warning (440, 2, lt.Location,
"An alias named `global' will not be used when resolving `global::'. The global namespace will be used instead");
@@ -4367,14 +4373,14 @@ void case_19()
}
void case_20()
-#line 488 "cs-parser.jay"
+#line 490 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = null;
}
void case_21()
-#line 501 "cs-parser.jay"
+#line 503 "cs-parser.jay"
{
Attributes attrs = (Attributes) yyVals[-2+yyTop];
var name = (MemberName) yyVals[0+yyTop];
@@ -4404,14 +4410,14 @@ void case_21()
}
void case_22()
-#line 529 "cs-parser.jay"
+#line 531 "cs-parser.jay"
{
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
}
void case_23()
-#line 534 "cs-parser.jay"
+#line 536 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null)
lbag.AddLocation (current_container, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
@@ -4422,7 +4428,7 @@ void case_23()
}
void case_24()
-#line 543 "cs-parser.jay"
+#line 545 "cs-parser.jay"
{
report.Error (1514, lexer.Location, "Unexpected symbol `{0}', expecting `.' or `{{'", GetSymbolName (yyToken));
@@ -4433,37 +4439,36 @@ void case_24()
}
void case_27()
-#line 557 "cs-parser.jay"
+#line 559 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = null;
}
void case_28()
-#line 565 "cs-parser.jay"
+#line 567 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new MemberName (lt.Value, lt.Location);
}
void case_29()
-#line 570 "cs-parser.jay"
+#line 572 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
- yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location) {
- DotLocation = GetLocation (yyVals[-1+yyTop])
- };
+ var lt = (LocatedToken) yyVals[0+yyTop];
+ yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location);
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_30()
-#line 577 "cs-parser.jay"
+#line 578 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new MemberName ("<invalid>", lexer.Location);
}
void case_43()
-#line 615 "cs-parser.jay"
+#line 616 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
TypeContainer ds = (TypeContainer)yyVals[0+yyTop];
@@ -4484,7 +4489,7 @@ void case_43()
}
void case_45()
-#line 637 "cs-parser.jay"
+#line 638 "cs-parser.jay"
{
current_namespace.UnattachedAttributes = (Attributes) yyVals[-1+yyTop];
report.Error (1518, lexer.Location, "Attributes must be attached to class, delegate, enum, interface or struct");
@@ -4492,7 +4497,7 @@ void case_45()
}
void case_53()
-#line 670 "cs-parser.jay"
+#line 671 "cs-parser.jay"
{
var sect = (List<Attribute>) yyVals[0+yyTop];
yyVal = new Attributes (sect);
@@ -4505,7 +4510,7 @@ void case_53()
}
void case_54()
-#line 681 "cs-parser.jay"
+#line 682 "cs-parser.jay"
{
Attributes attrs = yyVals[-1+yyTop] as Attributes;
var sect = (List<Attribute>) yyVals[0+yyTop];
@@ -4514,13 +4519,13 @@ void case_54()
lbag.AddLocation (sect, locationListStack.Pop ());
if (attrs == null)
attrs = new Attributes (sect);
- else
+ else if (sect != null)
attrs.AddAttributes (sect);
yyVal = attrs;
}
void case_55()
-#line 697 "cs-parser.jay"
+#line 698 "cs-parser.jay"
{
PushLocation (GetLocation (yyVals[0+yyTop]));
lexer.parsing_attribute_section = true;
@@ -4528,14 +4533,14 @@ void case_55()
}
void case_56()
-#line 703 "cs-parser.jay"
+#line 704 "cs-parser.jay"
{
lexer.parsing_attribute_section = false;
yyVal = yyVals[0+yyTop];
}
void case_57()
-#line 711 "cs-parser.jay"
+#line 712 "cs-parser.jay"
{
current_attr_target = (string) yyVals[-1+yyTop];
if (current_attr_target == "assembly" || current_attr_target == "module") {
@@ -4544,7 +4549,7 @@ void case_57()
}
void case_58()
-#line 718 "cs-parser.jay"
+#line 719 "cs-parser.jay"
{
/* when attribute target is invalid*/
if (current_attr_target == string.Empty)
@@ -4554,9 +4559,9 @@ void case_58()
lbag.InsertLocation (yyVal, 0, PopLocation ());
if (yyVals[-1+yyTop] != null) {
- lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
} else {
- lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[0+yyTop]));
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[0+yyTop]));
}
current_attr_target = null;
@@ -4564,7 +4569,7 @@ void case_58()
}
void case_59()
-#line 736 "cs-parser.jay"
+#line 737 "cs-parser.jay"
{
yyVal = yyVals[-2+yyTop];
@@ -4577,11 +4582,11 @@ void case_59()
}
void case_60()
-#line 747 "cs-parser.jay"
+#line 748 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
var tne = new SimpleName (lt.Value, null, lt.Location);
yyVal = new List<Attribute> () {
@@ -4590,22 +4595,22 @@ void case_60()
}
void case_61()
-#line 758 "cs-parser.jay"
+#line 759 "cs-parser.jay"
{
- yyVal = CheckAttributeTarget (GetTokenName (yyToken), GetLocation (yyVals[0+yyTop]));
+ CheckAttributeTarget (GetTokenName (yyToken), GetLocation (yyVals[0+yyTop]));
yyVal = null;
}
void case_62()
-#line 766 "cs-parser.jay"
+#line 767 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = CheckAttributeTarget (lt.Value, lt.Location);
savedCloseLocation = GetLocation (yyVals[0+yyTop]);
}
void case_66()
-#line 781 "cs-parser.jay"
+#line 782 "cs-parser.jay"
{
var attrs = (List<Attribute>) yyVals[-2+yyTop];
if (attrs != null) {
@@ -4617,7 +4622,7 @@ void case_66()
}
void case_68()
-#line 798 "cs-parser.jay"
+#line 799 "cs-parser.jay"
{
--lexer.parsing_block;
@@ -4639,7 +4644,7 @@ void case_68()
}
void case_71()
-#line 826 "cs-parser.jay"
+#line 827 "cs-parser.jay"
{
savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]);
savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]);
@@ -4648,7 +4653,7 @@ void case_71()
}
void case_73()
-#line 838 "cs-parser.jay"
+#line 839 "cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
@@ -4656,7 +4661,7 @@ void case_73()
}
void case_74()
-#line 844 "cs-parser.jay"
+#line 845 "cs-parser.jay"
{
Arguments a = new Arguments (4);
a.Add ((Argument) yyVals[0+yyTop]);
@@ -4664,7 +4669,7 @@ void case_74()
}
void case_75()
-#line 850 "cs-parser.jay"
+#line 851 "cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] != null) {
@@ -4681,7 +4686,7 @@ void case_75()
}
void case_76()
-#line 865 "cs-parser.jay"
+#line 866 "cs-parser.jay"
{
Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
if (o [1] == null) {
@@ -4693,23 +4698,23 @@ void case_76()
}
void case_79()
-#line 883 "cs-parser.jay"
+#line 884 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = null;
}
void case_81()
-#line 895 "cs-parser.jay"
+#line 896 "cs-parser.jay"
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop]));
}
void case_82()
-#line 905 "cs-parser.jay"
+#line 906 "cs-parser.jay"
{
if (lang_version <= LanguageVersion.V_3)
FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument");
@@ -4717,13 +4722,13 @@ void case_82()
/* Avoid boxing in common case (no modifier)*/
var arg_mod = yyVals[-1+yyTop] == null ? Argument.AType.None : (Argument.AType) yyVals[-1+yyTop];
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod);
lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop]));
}
void case_102()
-#line 960 "cs-parser.jay"
+#line 961 "cs-parser.jay"
{
report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration",
GetSymbolName (yyToken));
@@ -4732,7 +4737,7 @@ void case_102()
}
void case_104()
-#line 976 "cs-parser.jay"
+#line 977 "cs-parser.jay"
{
lexer.ConstraintsParsing = true;
push_current_container (new Struct (current_container, (MemberName) yyVals[0+yyTop], (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
@@ -4740,7 +4745,7 @@ void case_104()
}
void case_105()
-#line 983 "cs-parser.jay"
+#line 984 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
@@ -4755,14 +4760,14 @@ void case_105()
}
void case_106()
-#line 996 "cs-parser.jay"
+#line 997 "cs-parser.jay"
{
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
}
void case_107()
-#line 1001 "cs-parser.jay"
+#line 1002 "cs-parser.jay"
{
--lexer.parsing_declaration;
if (doc_support)
@@ -4770,7 +4775,7 @@ void case_107()
}
void case_108()
-#line 1007 "cs-parser.jay"
+#line 1008 "cs-parser.jay"
{
if (yyVals[0+yyTop] == null) {
lbag.AppendToMember (current_container, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
@@ -4781,9 +4786,9 @@ void case_108()
}
void case_110()
-#line 1025 "cs-parser.jay"
+#line 1026 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var mod = (Modifiers) yyVals[-3+yyTop];
current_field = new Const (current_type, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
current_type.AddMember (current_field);
@@ -4796,7 +4801,7 @@ void case_110()
}
void case_111()
-#line 1038 "cs-parser.jay"
+#line 1039 "cs-parser.jay"
{
if (doc_support) {
current_field.DocComment = Lexer.consume_doc_comment ();
@@ -4809,7 +4814,7 @@ void case_111()
}
void case_112()
-#line 1051 "cs-parser.jay"
+#line 1052 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -4817,15 +4822,15 @@ void case_112()
}
void case_117()
-#line 1076 "cs-parser.jay"
+#line 1077 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_119()
-#line 1089 "cs-parser.jay"
+#line 1090 "cs-parser.jay"
{
--lexer.parsing_block;
yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
@@ -4833,14 +4838,14 @@ void case_119()
}
void case_120()
-#line 1095 "cs-parser.jay"
+#line 1096 "cs-parser.jay"
{
report.Error (145, lexer.Location, "A const field requires a value to be provided");
yyVal = null;
}
void case_123()
-#line 1110 "cs-parser.jay"
+#line 1111 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
@@ -4848,14 +4853,14 @@ void case_123()
if (type.Type != null && type.Type.Kind == MemberKind.Void)
report.Error (670, GetLocation (yyVals[-1+yyTop]), "Fields cannot have void type");
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
current_field = new Field (current_type, type, (Modifiers) yyVals[-2+yyTop], new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-3+yyTop]);
current_type.AddField (current_field);
yyVal = current_field;
}
void case_124()
-#line 1125 "cs-parser.jay"
+#line 1126 "cs-parser.jay"
{
if (doc_support) {
current_field.DocComment = Lexer.consume_doc_comment ();
@@ -4868,12 +4873,12 @@ void case_124()
}
void case_125()
-#line 1138 "cs-parser.jay"
+#line 1139 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers");
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
current_field = new FixedField (current_type, (FullNamedExpression) yyVals[-1+yyTop], (Modifiers) yyVals[-3+yyTop],
new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
@@ -4881,7 +4886,7 @@ void case_125()
}
void case_126()
-#line 1149 "cs-parser.jay"
+#line 1150 "cs-parser.jay"
{
if (doc_support) {
current_field.DocComment = Lexer.consume_doc_comment ();
@@ -4895,7 +4900,7 @@ void case_126()
}
void case_129()
-#line 1172 "cs-parser.jay"
+#line 1173 "cs-parser.jay"
{
++lexer.parsing_block;
current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
@@ -4903,7 +4908,7 @@ void case_129()
}
void case_130()
-#line 1178 "cs-parser.jay"
+#line 1179 "cs-parser.jay"
{
--lexer.parsing_block;
current_field.Initializer = (Expression) yyVals[0+yyTop];
@@ -4913,32 +4918,32 @@ void case_130()
}
void case_135()
-#line 1205 "cs-parser.jay"
+#line 1206 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_137()
-#line 1215 "cs-parser.jay"
+#line 1216 "cs-parser.jay"
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
}
void case_142()
-#line 1241 "cs-parser.jay"
+#line 1242 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_144()
-#line 1254 "cs-parser.jay"
+#line 1255 "cs-parser.jay"
{
--lexer.parsing_block;
yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
@@ -4946,14 +4951,14 @@ void case_144()
}
void case_145()
-#line 1260 "cs-parser.jay"
+#line 1261 "cs-parser.jay"
{
report.Error (443, lexer.Location, "Value or constant expected");
yyVal = null;
}
void case_148()
-#line 1270 "cs-parser.jay"
+#line 1271 "cs-parser.jay"
{
/* It has to be here for the parent to safely restore artificial block*/
Error_SyntaxError (yyToken);
@@ -4961,7 +4966,7 @@ void case_148()
}
void case_149()
-#line 1279 "cs-parser.jay"
+#line 1280 "cs-parser.jay"
{
if (doc_support)
Lexer.doc_state = XmlCommentState.NotAllowed;
@@ -4970,7 +4975,7 @@ void case_149()
}
void case_150()
-#line 1286 "cs-parser.jay"
+#line 1287 "cs-parser.jay"
{
Method method = (Method) yyVals[-2+yyTop];
method.Block = (ToplevelBlock) yyVals[0+yyTop];
@@ -4998,7 +5003,7 @@ void case_150()
}
void case_152()
-#line 1322 "cs-parser.jay"
+#line 1323 "cs-parser.jay"
{
valid_param_mod = 0;
MemberName name = (MemberName) yyVals[-4+yyTop];
@@ -5021,7 +5026,7 @@ void case_152()
}
void case_153()
-#line 1343 "cs-parser.jay"
+#line 1344 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
@@ -5034,14 +5039,14 @@ void case_153()
}
void case_155()
-#line 1362 "cs-parser.jay"
+#line 1363 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
valid_param_mod = ParameterModifierType.All;
}
void case_157()
-#line 1371 "cs-parser.jay"
+#line 1372 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
valid_param_mod = 0;
@@ -5057,8 +5062,10 @@ void case_157()
current_type.AddMember (method);
- if (yyVals[-1+yyTop] != null)
- method.SetConstraints ((List<Constraints>) yyVals[-1+yyTop]);
+ async_block = (method.ModFlags & Modifiers.ASYNC) != 0;
+
+ if (yyVals[0+yyTop] != null)
+ method.SetConstraints ((List<Constraints>) yyVals[0+yyTop]);
if (doc_support)
method.DocComment = Lexer.consume_doc_comment ();
@@ -5069,7 +5076,7 @@ void case_157()
}
void case_158()
-#line 1400 "cs-parser.jay"
+#line 1403 "cs-parser.jay"
{
MemberName name = (MemberName) yyVals[-3+yyTop];
report.Error (1585, name.Location,
@@ -5089,7 +5096,7 @@ void case_158()
}
void case_159()
-#line 1421 "cs-parser.jay"
+#line 1424 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
current_local_parameters = ParametersCompiled.Undefined;
@@ -5107,7 +5114,7 @@ void case_159()
}
void case_164()
-#line 1450 "cs-parser.jay"
+#line 1453 "cs-parser.jay"
{
var pars_list = (List<Parameter>) yyVals[0+yyTop];
yyVal = new ParametersCompiled (pars_list.ToArray ());
@@ -5115,7 +5122,7 @@ void case_164()
}
void case_165()
-#line 1456 "cs-parser.jay"
+#line 1459 "cs-parser.jay"
{
var pars_list = (List<Parameter>) yyVals[-2+yyTop];
pars_list.Add ((Parameter) yyVals[0+yyTop]);
@@ -5126,7 +5133,7 @@ void case_165()
}
void case_166()
-#line 1465 "cs-parser.jay"
+#line 1468 "cs-parser.jay"
{
var pars_list = (List<Parameter>) yyVals[-2+yyTop];
pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop])));
@@ -5137,7 +5144,7 @@ void case_166()
}
void case_167()
-#line 1474 "cs-parser.jay"
+#line 1477 "cs-parser.jay"
{
if (yyVals[-2+yyTop] != null)
report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");
@@ -5147,7 +5154,7 @@ void case_167()
}
void case_168()
-#line 1482 "cs-parser.jay"
+#line 1485 "cs-parser.jay"
{
if (yyVals[-2+yyTop] != null)
report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");
@@ -5162,7 +5169,7 @@ void case_168()
}
void case_169()
-#line 1495 "cs-parser.jay"
+#line 1498 "cs-parser.jay"
{
report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list");
@@ -5171,7 +5178,7 @@ void case_169()
}
void case_170()
-#line 1502 "cs-parser.jay"
+#line 1505 "cs-parser.jay"
{
report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list");
@@ -5185,14 +5192,14 @@ void case_170()
}
void case_173()
-#line 1522 "cs-parser.jay"
+#line 1525 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = ParametersCompiled.EmptyReadOnlyParameters;
}
void case_174()
-#line 1530 "cs-parser.jay"
+#line 1533 "cs-parser.jay"
{
parameters_bucket.Clear ();
Parameter p = (Parameter) yyVals[0+yyTop];
@@ -5203,7 +5210,7 @@ void case_174()
}
void case_175()
-#line 1539 "cs-parser.jay"
+#line 1542 "cs-parser.jay"
{
var pars = (List<Parameter>) yyVals[-2+yyTop];
Parameter p = (Parameter) yyVals[0+yyTop];
@@ -5223,24 +5230,24 @@ void case_175()
}
void case_176()
-#line 1563 "cs-parser.jay"
+#line 1566 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], lt.Location);
lbag.AddLocation (yyVal, parameterModifierLocation);
}
void case_177()
-#line 1572 "cs-parser.jay"
+#line 1575 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name");
yyVal = new Parameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Parameter.Modifier) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop], lt.Location);
lbag.AddLocation (yyVal, parameterModifierLocation);
}
void case_178()
-#line 1579 "cs-parser.jay"
+#line 1582 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
Location l = GetLocation (yyVals[0+yyTop]);
@@ -5248,7 +5255,7 @@ void case_178()
}
void case_179()
-#line 1588 "cs-parser.jay"
+#line 1591 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
Location l = GetLocation (yyVals[0+yyTop]);
@@ -5257,7 +5264,7 @@ void case_179()
}
void case_181()
-#line 1603 "cs-parser.jay"
+#line 1606 "cs-parser.jay"
{
--lexer.parsing_block;
if (lang_version <= LanguageVersion.V_3) {
@@ -5287,7 +5294,7 @@ void case_181()
if ((valid_param_mod & ParameterModifierType.DefaultValue) == 0)
report.Error (1065, GetLocation (yyVals[-2+yyTop]), "Optional parameter is not valid in this context");
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new Parameter ((FullNamedExpression) yyVals[-4+yyTop], lt.Value, mod, (Attributes) yyVals[-6+yyTop], lt.Location);
lbag.AddLocation (yyVal, parameterModifierLocation, GetLocation (yyVals[-2+yyTop])); /* parameterModifierLocation should be ignored when mod == NONE*/
@@ -5296,7 +5303,7 @@ void case_181()
}
void case_185()
-#line 1652 "cs-parser.jay"
+#line 1655 "cs-parser.jay"
{
Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop];
Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2;
@@ -5319,7 +5326,7 @@ void case_185()
}
void case_186()
-#line 1676 "cs-parser.jay"
+#line 1679 "cs-parser.jay"
{
if ((valid_param_mod & ParameterModifierType.Ref) == 0)
Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop]));
@@ -5328,7 +5335,7 @@ void case_186()
}
void case_187()
-#line 1683 "cs-parser.jay"
+#line 1686 "cs-parser.jay"
{
if ((valid_param_mod & ParameterModifierType.Out) == 0)
Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop]));
@@ -5337,7 +5344,7 @@ void case_187()
}
void case_188()
-#line 1690 "cs-parser.jay"
+#line 1693 "cs-parser.jay"
{
if ((valid_param_mod & ParameterModifierType.This) == 0)
Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop]));
@@ -5349,25 +5356,25 @@ void case_188()
}
void case_189()
-#line 1703 "cs-parser.jay"
+#line 1706 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Attributes) yyVals[-3+yyTop], lt.Location);
lbag.AddLocation (yyVal, savedLocation);
}
void case_190()
-#line 1709 "cs-parser.jay"
+#line 1712 "cs-parser.jay"
{
report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array");
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Attributes) yyVals[-5+yyTop], lt.Location);
lbag.AddLocation (yyVal, savedLocation);
}
void case_191()
-#line 1717 "cs-parser.jay"
+#line 1720 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -5375,7 +5382,7 @@ void case_191()
}
void case_192()
-#line 1726 "cs-parser.jay"
+#line 1729 "cs-parser.jay"
{
if ((valid_param_mod & ParameterModifierType.Params) == 0)
report.Error (1670, (GetLocation (yyVals[0+yyTop])), "The `params' modifier is not allowed in current context");
@@ -5383,7 +5390,7 @@ void case_192()
}
void case_193()
-#line 1732 "cs-parser.jay"
+#line 1735 "cs-parser.jay"
{
Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop];
if ((mod & Parameter.Modifier.This) != 0) {
@@ -5395,21 +5402,21 @@ void case_193()
}
void case_195()
-#line 1749 "cs-parser.jay"
+#line 1752 "cs-parser.jay"
{
if ((valid_param_mod & ParameterModifierType.Arglist) == 0)
report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context");
}
void case_196()
-#line 1760 "cs-parser.jay"
+#line 1763 "cs-parser.jay"
{
if (doc_support)
tmpComment = Lexer.consume_doc_comment ();
}
void case_197()
-#line 1765 "cs-parser.jay"
+#line 1768 "cs-parser.jay"
{
var type = (FullNamedExpression) yyVals[-3+yyTop];
current_property = new Property (current_type, type, (Modifiers) yyVals[-4+yyTop],
@@ -5425,7 +5432,7 @@ void case_197()
}
void case_198()
-#line 1779 "cs-parser.jay"
+#line 1782 "cs-parser.jay"
{
lexer.PropertyParsing = false;
@@ -5434,14 +5441,14 @@ void case_198()
}
void case_199()
-#line 1786 "cs-parser.jay"
+#line 1789 "cs-parser.jay"
{
lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop]));
current_property = null;
}
void case_201()
-#line 1800 "cs-parser.jay"
+#line 1803 "cs-parser.jay"
{
valid_param_mod = 0;
var type = (FullNamedExpression) yyVals[-5+yyTop];
@@ -5468,7 +5475,7 @@ void case_201()
}
void case_203()
-#line 1829 "cs-parser.jay"
+#line 1832 "cs-parser.jay"
{
if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null)
((Indexer) current_property).ParameterInfo.CheckParameters (current_property);
@@ -5481,7 +5488,7 @@ void case_203()
}
void case_208()
-#line 1848 "cs-parser.jay"
+#line 1851 "cs-parser.jay"
{
if (yyToken == Token.CLOSE_BRACE) {
report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ());
@@ -5494,7 +5501,7 @@ void case_208()
}
void case_209()
-#line 1862 "cs-parser.jay"
+#line 1865 "cs-parser.jay"
{
if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) {
FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties");
@@ -5517,7 +5524,7 @@ void case_209()
}
void case_210()
-#line 1883 "cs-parser.jay"
+#line 1886 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop];
@@ -5540,7 +5547,7 @@ void case_210()
}
void case_211()
-#line 1907 "cs-parser.jay"
+#line 1910 "cs-parser.jay"
{
if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) {
FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties");
@@ -5568,7 +5575,7 @@ void case_211()
}
void case_212()
-#line 1933 "cs-parser.jay"
+#line 1936 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop];
@@ -5591,21 +5598,21 @@ void case_212()
}
void case_214()
-#line 1958 "cs-parser.jay"
+#line 1961 "cs-parser.jay"
{
savedLocation = GetLocation (yyVals[0+yyTop]);
yyVal = null;
}
void case_215()
-#line 1963 "cs-parser.jay"
+#line 1966 "cs-parser.jay"
{
Error_SyntaxError (1043, yyToken, "Invalid accessor body");
yyVal = null;
}
void case_217()
-#line 1977 "cs-parser.jay"
+#line 1980 "cs-parser.jay"
{
lexer.ConstraintsParsing = true;
push_current_container (new Interface (current_container, (MemberName) yyVals[0+yyTop], (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
@@ -5613,7 +5620,7 @@ void case_217()
}
void case_218()
-#line 1984 "cs-parser.jay"
+#line 1987 "cs-parser.jay"
{
lexer.ConstraintsParsing = false;
@@ -5629,7 +5636,7 @@ void case_218()
}
void case_219()
-#line 1998 "cs-parser.jay"
+#line 2001 "cs-parser.jay"
{
--lexer.parsing_declaration;
if (doc_support)
@@ -5637,7 +5644,7 @@ void case_219()
}
void case_220()
-#line 2004 "cs-parser.jay"
+#line 2007 "cs-parser.jay"
{
if (yyVals[0+yyTop] == null) {
lbag.AppendToMember (current_container, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
@@ -5648,7 +5655,7 @@ void case_220()
}
void case_236()
-#line 2066 "cs-parser.jay"
+#line 2069 "cs-parser.jay"
{
OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop];
if (decl != null) {
@@ -5678,14 +5685,14 @@ void case_236()
}
void case_240()
-#line 2103 "cs-parser.jay"
+#line 2106 "cs-parser.jay"
{
report.Error (590, GetLocation (yyVals[0+yyTop]), "User-defined operators cannot return void");
yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
}
void case_242()
-#line 2115 "cs-parser.jay"
+#line 2118 "cs-parser.jay"
{
valid_param_mod = 0;
@@ -5709,11 +5716,11 @@ void case_242()
Operator.GetName (op));
}
} else {
- if (p_count > 2) {
+ if (p_count == 1) {
+ report.Error (1019, loc, "Overloadable unary operator expected");
+ } else if (p_count != 2) {
report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters",
Operator.GetName (op));
- } else if (p_count != 2) {
- report.Error (1019, loc, "Overloadable unary operator expected");
}
}
@@ -5727,7 +5734,7 @@ void case_242()
}
void case_267()
-#line 2191 "cs-parser.jay"
+#line 2194 "cs-parser.jay"
{
valid_param_mod = 0;
@@ -5748,7 +5755,7 @@ void case_267()
}
void case_269()
-#line 2214 "cs-parser.jay"
+#line 2217 "cs-parser.jay"
{
valid_param_mod = 0;
@@ -5769,7 +5776,7 @@ void case_269()
}
void case_270()
-#line 2233 "cs-parser.jay"
+#line 2236 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
@@ -5777,7 +5784,7 @@ void case_270()
}
void case_271()
-#line 2239 "cs-parser.jay"
+#line 2242 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
@@ -5785,7 +5792,7 @@ void case_271()
}
void case_272()
-#line 2249 "cs-parser.jay"
+#line 2252 "cs-parser.jay"
{
Constructor c = (Constructor) yyVals[-1+yyTop];
c.Block = (ToplevelBlock) yyVals[0+yyTop];
@@ -5799,7 +5806,7 @@ void case_272()
}
void case_273()
-#line 2266 "cs-parser.jay"
+#line 2269 "cs-parser.jay"
{
if (doc_support) {
tmpComment = Lexer.consume_doc_comment ();
@@ -5810,12 +5817,12 @@ void case_273()
}
void case_274()
-#line 2275 "cs-parser.jay"
+#line 2278 "cs-parser.jay"
{
valid_param_mod = 0;
current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop];
- var lt = (Tokenizer.LocatedToken) yyVals[-4+yyTop];
+ var lt = (LocatedToken) yyVals[-4+yyTop];
var mods = (Modifiers) yyVals[-5+yyTop];
var c = new Constructor (current_type, lt.Value, mods, (Attributes) yyVals[-6+yyTop], current_local_parameters, lt.Location);
@@ -5841,7 +5848,7 @@ void case_274()
}
void case_275()
-#line 2304 "cs-parser.jay"
+#line 2307 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
var c = (Constructor) yyVals[-1+yyTop];
@@ -5858,7 +5865,7 @@ void case_275()
}
void case_281()
-#line 2336 "cs-parser.jay"
+#line 2339 "cs-parser.jay"
{
--lexer.parsing_block;
yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
@@ -5866,7 +5873,7 @@ void case_281()
}
void case_283()
-#line 2346 "cs-parser.jay"
+#line 2349 "cs-parser.jay"
{
--lexer.parsing_block;
yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
@@ -5874,7 +5881,7 @@ void case_283()
}
void case_284()
-#line 2352 "cs-parser.jay"
+#line 2355 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new ConstructorThisInitializer (null, GetLocation (yyVals[0+yyTop]));
@@ -5882,14 +5889,14 @@ void case_284()
}
void case_285()
-#line 2358 "cs-parser.jay"
+#line 2361 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = null;
}
void case_286()
-#line 2366 "cs-parser.jay"
+#line 2369 "cs-parser.jay"
{
if (doc_support) {
tmpComment = Lexer.consume_doc_comment ();
@@ -5900,9 +5907,9 @@ void case_286()
}
void case_287()
-#line 2375 "cs-parser.jay"
+#line 2378 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
if (lt.Value != current_container.MemberName.Name){
report.Error (574, lt.Location, "Name of destructor must match name of class");
} else if (current_container.Kind != MemberKind.Class){
@@ -5923,7 +5930,7 @@ void case_287()
}
void case_288()
-#line 2401 "cs-parser.jay"
+#line 2404 "cs-parser.jay"
{
current_event_field = new EventField (current_type, (FullNamedExpression) yyVals[-1+yyTop], (Modifiers) yyVals[-3+yyTop], (MemberName) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop]);
current_type.AddMember (current_event_field);
@@ -5937,7 +5944,7 @@ void case_288()
}
void case_289()
-#line 2415 "cs-parser.jay"
+#line 2418 "cs-parser.jay"
{
if (doc_support) {
current_event_field.DocComment = Lexer.consume_doc_comment ();
@@ -5952,7 +5959,7 @@ void case_289()
}
void case_290()
-#line 2431 "cs-parser.jay"
+#line 2434 "cs-parser.jay"
{
current_event = new EventProperty (current_type, (FullNamedExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-4+yyTop], (MemberName) yyVals[-1+yyTop], (Attributes) yyVals[-5+yyTop]);
current_type.AddMember (current_event);
@@ -5962,7 +5969,7 @@ void case_290()
}
void case_291()
-#line 2439 "cs-parser.jay"
+#line 2442 "cs-parser.jay"
{
if (current_container.Kind == MemberKind.Interface)
report.Error (69, GetLocation (yyVals[-2+yyTop]), "Event in interface cannot have add or remove accessors");
@@ -5971,7 +5978,7 @@ void case_291()
}
void case_292()
-#line 2446 "cs-parser.jay"
+#line 2449 "cs-parser.jay"
{
if (doc_support) {
current_event.DocComment = Lexer.consume_doc_comment ();
@@ -5984,7 +5991,7 @@ void case_292()
}
void case_293()
-#line 2459 "cs-parser.jay"
+#line 2462 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -5992,7 +5999,7 @@ void case_293()
}
void case_296()
-#line 2473 "cs-parser.jay"
+#line 2476 "cs-parser.jay"
{
--lexer.parsing_block;
savedEventAssignLocation = GetLocation (yyVals[-2+yyTop]);
@@ -6000,24 +6007,24 @@ void case_296()
}
void case_301()
-#line 2498 "cs-parser.jay"
+#line 2501 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_303()
-#line 2508 "cs-parser.jay"
+#line 2511 "cs-parser.jay"
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
}
void case_304()
-#line 2517 "cs-parser.jay"
+#line 2520 "cs-parser.jay"
{
if (current_container.Kind == MemberKind.Interface) {
report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer",
@@ -6031,28 +6038,28 @@ void case_304()
}
void case_308()
-#line 2538 "cs-parser.jay"
+#line 2541 "cs-parser.jay"
{
report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors",
current_event.GetSignatureForError ());
}
void case_309()
-#line 2543 "cs-parser.jay"
+#line 2546 "cs-parser.jay"
{
report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors",
current_event.GetSignatureForError ());
}
void case_310()
-#line 2548 "cs-parser.jay"
+#line 2551 "cs-parser.jay"
{
report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected");
yyVal = null;
}
void case_311()
-#line 2556 "cs-parser.jay"
+#line 2559 "cs-parser.jay"
{
if (yyVals[-1+yyTop] != ModifierNone) {
report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations");
@@ -6066,7 +6073,7 @@ void case_311()
}
void case_312()
-#line 2568 "cs-parser.jay"
+#line 2571 "cs-parser.jay"
{
lexer.EventParsing = true;
@@ -6081,7 +6088,7 @@ void case_312()
}
void case_313()
-#line 2584 "cs-parser.jay"
+#line 2587 "cs-parser.jay"
{
if (yyVals[-1+yyTop] != ModifierNone) {
report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations");
@@ -6095,7 +6102,7 @@ void case_313()
}
void case_314()
-#line 2596 "cs-parser.jay"
+#line 2599 "cs-parser.jay"
{
lexer.EventParsing = true;
@@ -6110,14 +6117,14 @@ void case_314()
}
void case_315()
-#line 2612 "cs-parser.jay"
+#line 2615 "cs-parser.jay"
{
report.Error (73, lexer.Location, "An add or remove accessor must have a body");
yyVal = null;
}
void case_317()
-#line 2621 "cs-parser.jay"
+#line 2624 "cs-parser.jay"
{
current_type.UnattachedAttributes = (Attributes) yyVals[-1+yyTop];
report.Error (1519, GetLocation (yyVals[-1+yyTop]), "An attribute is missing member declaration");
@@ -6125,7 +6132,7 @@ void case_317()
}
void case_318()
-#line 2632 "cs-parser.jay"
+#line 2635 "cs-parser.jay"
{
report.Error (1519, lexer.Location, "Unexpected symbol `}' in class, struct, or interface member declaration");
@@ -6140,14 +6147,14 @@ void case_318()
}
void case_319()
-#line 2652 "cs-parser.jay"
+#line 2655 "cs-parser.jay"
{
if (doc_support)
enumTypeComment = Lexer.consume_doc_comment ();
}
void case_320()
-#line 2657 "cs-parser.jay"
+#line 2660 "cs-parser.jay"
{
if (doc_support)
Lexer.doc_state = XmlCommentState.Allowed;
@@ -6166,7 +6173,7 @@ void case_320()
}
void case_321()
-#line 2674 "cs-parser.jay"
+#line 2677 "cs-parser.jay"
{
/* here will be evaluated after CLOSE_BLACE is consumed.*/
if (doc_support)
@@ -6174,7 +6181,7 @@ void case_321()
}
void case_322()
-#line 2680 "cs-parser.jay"
+#line 2683 "cs-parser.jay"
{
lbag.AppendToMember (current_container, GetLocation (yyVals[-1+yyTop]));
if (yyVals[0+yyTop] != null) {
@@ -6192,30 +6199,30 @@ void case_322()
}
void case_324()
-#line 2700 "cs-parser.jay"
+#line 2703 "cs-parser.jay"
{
savedLocation = GetLocation (yyVals[-1+yyTop]);
yyVal = yyVals[0+yyTop];
}
void case_325()
-#line 2705 "cs-parser.jay"
+#line 2708 "cs-parser.jay"
{
Error_TypeExpected (GetLocation (yyVals[-1+yyTop]));
yyVal = null;
}
void case_330()
-#line 2723 "cs-parser.jay"
+#line 2726 "cs-parser.jay"
{
lbag.AppendToMember (current_container, GetLocation (yyVals[-1+yyTop]));
yyVal = yyVals[0+yyTop];
}
void case_331()
-#line 2731 "cs-parser.jay"
+#line 2734 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-1+yyTop]);
((Enum) current_type).AddEnumMember (em);
@@ -6228,7 +6235,7 @@ void case_331()
}
void case_332()
-#line 2744 "cs-parser.jay"
+#line 2747 "cs-parser.jay"
{
++lexer.parsing_block;
if (doc_support) {
@@ -6238,11 +6245,11 @@ void case_332()
}
void case_333()
-#line 2752 "cs-parser.jay"
+#line 2755 "cs-parser.jay"
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
em.Initializer = new ConstInitializer (em, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
((Enum) current_type).AddEnumMember (em);
@@ -6254,11 +6261,11 @@ void case_333()
}
void case_334()
-#line 2766 "cs-parser.jay"
+#line 2769 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-2+yyTop]);
((Enum) current_type).AddEnumMember (em);
@@ -6271,7 +6278,7 @@ void case_334()
}
void case_337()
-#line 2793 "cs-parser.jay"
+#line 2796 "cs-parser.jay"
{
valid_param_mod = 0;
@@ -6288,7 +6295,7 @@ void case_337()
}
void case_339()
-#line 2812 "cs-parser.jay"
+#line 2815 "cs-parser.jay"
{
if (doc_support) {
current_delegate.DocComment = Lexer.consume_doc_comment ();
@@ -6305,7 +6312,7 @@ void case_339()
}
void case_341()
-#line 2831 "cs-parser.jay"
+#line 2834 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types");
@@ -6314,33 +6321,32 @@ void case_341()
}
void case_343()
-#line 2842 "cs-parser.jay"
+#line 2845 "cs-parser.jay"
{
- var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
- var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt1 = (LocatedToken) yyVals[-2+yyTop];
+ var lt2 = (LocatedToken) yyVals[-1+yyTop];
yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
lbag.AddLocation (yyVal, savedLocation, GetLocation (yyVals[-1+yyTop]));
}
void case_345()
-#line 2854 "cs-parser.jay"
+#line 2857 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
- yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+ yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_346()
-#line 2864 "cs-parser.jay"
+#line 2866 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);
}
void case_348()
-#line 2876 "cs-parser.jay"
+#line 2878 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");
@@ -6353,14 +6359,14 @@ void case_348()
}
void case_349()
-#line 2887 "cs-parser.jay"
+#line 2889 "cs-parser.jay"
{
Error_TypeExpected (lexer.Location);
yyVal = new TypeArguments ();
}
void case_350()
-#line 2895 "cs-parser.jay"
+#line 2897 "cs-parser.jay"
{
TypeArguments type_args = new TypeArguments ();
type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
@@ -6369,7 +6375,7 @@ void case_350()
}
void case_351()
-#line 2902 "cs-parser.jay"
+#line 2904 "cs-parser.jay"
{
TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop];
type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
@@ -6378,15 +6384,15 @@ void case_351()
}
void case_353()
-#line 2919 "cs-parser.jay"
+#line 2921 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new MemberName (lt.Value, (TypeParameters)yyVals[0+yyTop], lt.Location);
}
void case_354()
-#line 2928 "cs-parser.jay"
+#line 2930 "cs-parser.jay"
{
MemberName mn = (MemberName)yyVals[0+yyTop];
if (mn.TypeParameters != null)
@@ -6395,55 +6401,55 @@ void case_354()
}
void case_356()
-#line 2939 "cs-parser.jay"
+#line 2941 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new MemberName (lt.Value, (TypeParameters) yyVals[0+yyTop], (ATypeNameExpression) yyVals[-2+yyTop], lt.Location);
}
void case_357()
-#line 2948 "cs-parser.jay"
+#line 2950 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
yyVal = new MemberName (TypeDefinition.DefaultIndexerName, GetLocation (yyVals[0+yyTop]));
}
void case_358()
-#line 2953 "cs-parser.jay"
+#line 2955 "cs-parser.jay"
{
lexer.parsing_generic_declaration = false;
yyVal = new MemberName (TypeDefinition.DefaultIndexerName, null, (ATypeNameExpression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
}
void case_359()
-#line 2961 "cs-parser.jay"
+#line 2963 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new SimpleName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_360()
-#line 2967 "cs-parser.jay"
+#line 2969 "cs-parser.jay"
{
- var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
- var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt1 = (LocatedToken) yyVals[-3+yyTop];
+ var lt2 = (LocatedToken) yyVals[-2+yyTop];
yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[-1+yyTop], lt1.Location);
lbag.AddLocation (yyVal, savedLocation, GetLocation (yyVals[0+yyTop]));
}
void case_361()
-#line 2975 "cs-parser.jay"
+#line 2977 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new MemberAccess ((ATypeNameExpression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_363()
-#line 2985 "cs-parser.jay"
+#line 2987 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");
@@ -6456,7 +6462,7 @@ void case_363()
}
void case_364()
-#line 2999 "cs-parser.jay"
+#line 3001 "cs-parser.jay"
{
var tparams = new TypeParameters ();
tparams.Add ((TypeParameter)yyVals[0+yyTop]);
@@ -6465,7 +6471,7 @@ void case_364()
}
void case_365()
-#line 3006 "cs-parser.jay"
+#line 3008 "cs-parser.jay"
{
var tparams = (TypeParameters) yyVals[-2+yyTop];
tparams.Add ((TypeParameter)yyVals[0+yyTop]);
@@ -6474,9 +6480,9 @@ void case_365()
}
void case_366()
-#line 3016 "cs-parser.jay"
+#line 3018 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop];
+ var lt = (LocatedToken)yyVals[0+yyTop];
var variance = (Variance) yyVals[-1+yyTop];
yyVal = new TypeParameter (new MemberName (lt.Value, lt.Location), (Attributes)yyVals[-2+yyTop], variance);
if (variance != Variance.None)
@@ -6484,7 +6490,7 @@ void case_366()
}
void case_367()
-#line 3024 "cs-parser.jay"
+#line 3026 "cs-parser.jay"
{
if (GetTokenName (yyToken) == "type")
report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type");
@@ -6495,28 +6501,28 @@ void case_367()
}
void case_372()
-#line 3058 "cs-parser.jay"
+#line 3060 "cs-parser.jay"
{
Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
}
void case_374()
-#line 3067 "cs-parser.jay"
+#line 3069 "cs-parser.jay"
{
Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
}
void case_376()
-#line 3076 "cs-parser.jay"
+#line 3078 "cs-parser.jay"
{
report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'");
yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
}
void case_379()
-#line 3092 "cs-parser.jay"
+#line 3094 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
yyVal = new ComposedCast ((ATypeNameExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
@@ -6530,14 +6536,14 @@ void case_379()
}
void case_381()
-#line 3108 "cs-parser.jay"
+#line 3110 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null)
yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
}
void case_384()
-#line 3124 "cs-parser.jay"
+#line 3126 "cs-parser.jay"
{
var types = new List<FullNamedExpression> (2);
types.Add ((FullNamedExpression) yyVals[0+yyTop]);
@@ -6545,7 +6551,7 @@ void case_384()
}
void case_385()
-#line 3130 "cs-parser.jay"
+#line 3132 "cs-parser.jay"
{
var types = (List<FullNamedExpression>) yyVals[-2+yyTop];
types.Add ((FullNamedExpression) yyVals[0+yyTop]);
@@ -6554,7 +6560,7 @@ void case_385()
}
void case_386()
-#line 3140 "cs-parser.jay"
+#line 3142 "cs-parser.jay"
{
if (yyVals[0+yyTop] is ComposedCast) {
report.Error (1521, GetLocation (yyVals[0+yyTop]), "Invalid base type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ());
@@ -6563,86 +6569,83 @@ void case_386()
}
void case_423()
-#line 3204 "cs-parser.jay"
+#line 3206 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);
}
void case_424()
-#line 3208 "cs-parser.jay"
+#line 3210 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
}
void case_435()
-#line 3249 "cs-parser.jay"
+#line 3251 "cs-parser.jay"
{
yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_437()
-#line 3261 "cs-parser.jay"
+#line 3263 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
- yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+ yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_438()
-#line 3268 "cs-parser.jay"
+#line 3269 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
- yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+ yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_439()
#line 3275 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
- yyVal = new MemberAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+ yyVal = new MemberAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
+ lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
void case_440()
-#line 3282 "cs-parser.jay"
+#line 3281 "cs-parser.jay"
{
- var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
- var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt1 = (LocatedToken) yyVals[-2+yyTop];
+ var lt2 = (LocatedToken) yyVals[-1+yyTop];
yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
lbag.AddLocation (yyVal, savedLocation, GetLocation (yyVals[-1+yyTop]));
}
void case_442()
-#line 3292 "cs-parser.jay"
+#line 3291 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location);
}
void case_444()
-#line 3300 "cs-parser.jay"
+#line 3299 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location);
}
void case_445()
-#line 3308 "cs-parser.jay"
+#line 3307 "cs-parser.jay"
{
yyVal = new Invocation ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_446()
-#line 3313 "cs-parser.jay"
+#line 3312 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -6651,7 +6654,7 @@ void case_446()
}
void case_447()
-#line 3320 "cs-parser.jay"
+#line 3319 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -6660,7 +6663,7 @@ void case_447()
}
void case_450()
-#line 3335 "cs-parser.jay"
+#line 3334 "cs-parser.jay"
{
if (yyVals[-1+yyTop] == null) {
yyVal = new CollectionOrObjectInitializers (GetLocation (yyVals[-2+yyTop]));
@@ -6671,14 +6674,14 @@ void case_450()
}
void case_451()
-#line 3344 "cs-parser.jay"
+#line 3343 "cs-parser.jay"
{
yyVal = new CollectionOrObjectInitializers ((List<Expression>) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_454()
-#line 3360 "cs-parser.jay"
+#line 3359 "cs-parser.jay"
{
var a = new List<Expression> ();
a.Add ((Expression) yyVals[0+yyTop]);
@@ -6686,7 +6689,7 @@ void case_454()
}
void case_455()
-#line 3366 "cs-parser.jay"
+#line 3365 "cs-parser.jay"
{
var a = (List<Expression>)yyVals[-2+yyTop];
a.Add ((Expression) yyVals[0+yyTop]);
@@ -6695,30 +6698,30 @@ void case_455()
}
void case_456()
-#line 3372 "cs-parser.jay"
+#line 3371 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = yyVals[-1+yyTop];
}
void case_457()
-#line 3380 "cs-parser.jay"
+#line 3379 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_458()
-#line 3386 "cs-parser.jay"
+#line 3385 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier (yyVals[-2+yyTop]);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier (yyVals[-2+yyTop]);
yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_460()
-#line 3395 "cs-parser.jay"
+#line 3394 "cs-parser.jay"
{
CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName;
if (csn == null)
@@ -6728,7 +6731,7 @@ void case_460()
}
void case_461()
-#line 3403 "cs-parser.jay"
+#line 3402 "cs-parser.jay"
{
if (yyVals[-1+yyTop] == null)
yyVal = null;
@@ -6739,7 +6742,7 @@ void case_461()
}
void case_462()
-#line 3412 "cs-parser.jay"
+#line 3411 "cs-parser.jay"
{
report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty");
yyVal = new CollectionElementInitializer (new List<Expression> (), GetLocation (yyVals[-1+yyTop]));
@@ -6747,7 +6750,7 @@ void case_462()
}
void case_467()
-#line 3431 "cs-parser.jay"
+#line 3430 "cs-parser.jay"
{
Arguments list = new Arguments (4);
list.Add ((Argument) yyVals[0+yyTop]);
@@ -6755,7 +6758,7 @@ void case_467()
}
void case_468()
-#line 3437 "cs-parser.jay"
+#line 3436 "cs-parser.jay"
{
Arguments list = (Arguments) yyVals[-2+yyTop];
if (list [list.Count - 1] is NamedArgument)
@@ -6767,7 +6770,7 @@ void case_468()
}
void case_469()
-#line 3447 "cs-parser.jay"
+#line 3446 "cs-parser.jay"
{
Arguments list = (Arguments) yyVals[-2+yyTop];
NamedArgument a = (NamedArgument) yyVals[0+yyTop];
@@ -6784,7 +6787,7 @@ void case_469()
}
void case_470()
-#line 3462 "cs-parser.jay"
+#line 3461 "cs-parser.jay"
{
if (lexer.putback_char == -1)
lexer.putback (')'); /* TODO: Wrong but what can I do*/
@@ -6793,63 +6796,63 @@ void case_470()
}
void case_471()
-#line 3469 "cs-parser.jay"
+#line 3468 "cs-parser.jay"
{
report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing");
yyVal = null;
}
void case_476()
-#line 3490 "cs-parser.jay"
+#line 3489 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_477()
-#line 3495 "cs-parser.jay"
+#line 3494 "cs-parser.jay"
{
yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_478()
-#line 3500 "cs-parser.jay"
+#line 3499 "cs-parser.jay"
{
yyVal = new Argument (new Arglist ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_479()
-#line 3505 "cs-parser.jay"
+#line 3504 "cs-parser.jay"
{
yyVal = new Argument (new Arglist (GetLocation (yyVals[-2+yyTop])));
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_481()
-#line 3517 "cs-parser.jay"
+#line 3516 "cs-parser.jay"
{
yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_482()
-#line 3522 "cs-parser.jay"
+#line 3521 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
void case_483()
-#line 3527 "cs-parser.jay"
+#line 3526 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new ElementAccess ((Expression) yyVals[-2+yyTop], null, GetLocation (yyVals[-1+yyTop]));
}
void case_484()
-#line 3535 "cs-parser.jay"
+#line 3534 "cs-parser.jay"
{
var list = new List<Expression> (4);
list.Add ((Expression) yyVals[0+yyTop]);
@@ -6857,7 +6860,7 @@ void case_484()
}
void case_485()
-#line 3541 "cs-parser.jay"
+#line 3540 "cs-parser.jay"
{
var list = (List<Expression>) yyVals[-2+yyTop];
list.Add ((Expression) yyVals[0+yyTop]);
@@ -6866,7 +6869,7 @@ void case_485()
}
void case_486()
-#line 3551 "cs-parser.jay"
+#line 3550 "cs-parser.jay"
{
Arguments args = new Arguments (4);
args.Add ((Argument) yyVals[0+yyTop]);
@@ -6874,7 +6877,7 @@ void case_486()
}
void case_487()
-#line 3557 "cs-parser.jay"
+#line 3556 "cs-parser.jay"
{
Arguments args = (Arguments) yyVals[-2+yyTop];
if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument))
@@ -6886,21 +6889,21 @@ void case_487()
}
void case_491()
-#line 3585 "cs-parser.jay"
+#line 3584 "cs-parser.jay"
{
yyVal = new ElementAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_492()
-#line 3590 "cs-parser.jay"
+#line 3589 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop]));
}
void case_495()
-#line 3612 "cs-parser.jay"
+#line 3611 "cs-parser.jay"
{
if (yyVals[0+yyTop] != null) {
if (lang_version <= LanguageVersion.ISO_2)
@@ -6915,7 +6918,7 @@ void case_495()
}
void case_496()
-#line 3625 "cs-parser.jay"
+#line 3624 "cs-parser.jay"
{
if (lang_version <= LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers");
@@ -6924,7 +6927,7 @@ void case_496()
}
void case_497()
-#line 3637 "cs-parser.jay"
+#line 3636 "cs-parser.jay"
{
yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], (List<Expression>) yyVals[-3+yyTop],
new ComposedTypeSpecifier (((List<Expression>) yyVals[-3+yyTop]).Count, GetLocation (yyVals[-4+yyTop])) {
@@ -6934,7 +6937,7 @@ void case_497()
}
void case_498()
-#line 3645 "cs-parser.jay"
+#line 3644 "cs-parser.jay"
{
if (yyVals[0+yyTop] == null)
report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer");
@@ -6943,7 +6946,7 @@ void case_498()
}
void case_499()
-#line 3652 "cs-parser.jay"
+#line 3651 "cs-parser.jay"
{
if (lang_version <= LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays");
@@ -6952,14 +6955,14 @@ void case_499()
}
void case_500()
-#line 3659 "cs-parser.jay"
+#line 3658 "cs-parser.jay"
{
report.Error (178, GetLocation (yyVals[-1+yyTop]), "Invalid rank specifier, expecting `,' or `]'");
yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], null, GetLocation (yyVals[-6+yyTop]));
}
void case_501()
-#line 3664 "cs-parser.jay"
+#line 3663 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
/* It can be any of new expression, create the most common one*/
@@ -6967,14 +6970,14 @@ void case_501()
}
void case_503()
-#line 3676 "cs-parser.jay"
+#line 3675 "cs-parser.jay"
{
--lexer.parsing_type;
yyVal = yyVals[0+yyTop];
}
void case_504()
-#line 3684 "cs-parser.jay"
+#line 3683 "cs-parser.jay"
{
if (lang_version <= LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types");
@@ -6986,7 +6989,7 @@ void case_504()
}
void case_509()
-#line 3707 "cs-parser.jay"
+#line 3706 "cs-parser.jay"
{
var a = new List<AnonymousTypeParameter> (4);
a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]);
@@ -6994,7 +6997,7 @@ void case_509()
}
void case_510()
-#line 3713 "cs-parser.jay"
+#line 3712 "cs-parser.jay"
{
var a = (List<AnonymousTypeParameter>) yyVals[-2+yyTop];
a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]);
@@ -7004,30 +7007,30 @@ void case_510()
}
void case_511()
-#line 3724 "cs-parser.jay"
+#line 3723 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop];
+ var lt = (LocatedToken)yyVals[-2+yyTop];
yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location);
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_512()
-#line 3730 "cs-parser.jay"
+#line 3729 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop];
+ var lt = (LocatedToken)yyVals[0+yyTop];
yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location),
lt.Value, lt.Location);
}
void case_513()
-#line 3736 "cs-parser.jay"
+#line 3735 "cs-parser.jay"
{
MemberAccess ma = (MemberAccess) yyVals[0+yyTop];
yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location);
}
void case_514()
-#line 3741 "cs-parser.jay"
+#line 3740 "cs-parser.jay"
{
report.Error (746, lexer.Location,
"Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression");
@@ -7035,28 +7038,28 @@ void case_514()
}
void case_518()
-#line 3756 "cs-parser.jay"
+#line 3755 "cs-parser.jay"
{
((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop];
yyVal = yyVals[-1+yyTop];
}
void case_519()
-#line 3764 "cs-parser.jay"
+#line 3763 "cs-parser.jay"
{
yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_520()
-#line 3769 "cs-parser.jay"
+#line 3768 "cs-parser.jay"
{
yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_525()
-#line 3799 "cs-parser.jay"
+#line 3798 "cs-parser.jay"
{
var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop]));
ai.VariableDeclaration = current_variable;
@@ -7065,7 +7068,7 @@ void case_525()
}
void case_526()
-#line 3806 "cs-parser.jay"
+#line 3805 "cs-parser.jay"
{
var ai = new ArrayInitializer ((List<Expression>) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
ai.VariableDeclaration = current_variable;
@@ -7078,7 +7081,7 @@ void case_526()
}
void case_527()
-#line 3820 "cs-parser.jay"
+#line 3819 "cs-parser.jay"
{
var list = new List<Expression> (4);
list.Add ((Expression) yyVals[0+yyTop]);
@@ -7086,7 +7089,7 @@ void case_527()
}
void case_528()
-#line 3826 "cs-parser.jay"
+#line 3825 "cs-parser.jay"
{
var list = (List<Expression>) yyVals[-2+yyTop];
list.Add ((Expression) yyVals[0+yyTop]);
@@ -7095,7 +7098,7 @@ void case_528()
}
void case_530()
-#line 3840 "cs-parser.jay"
+#line 3839 "cs-parser.jay"
{
lexer.TypeOfParsing = false;
yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
@@ -7103,16 +7106,17 @@ void case_530()
}
void case_533()
-#line 3851 "cs-parser.jay"
+#line 3850 "cs-parser.jay"
{
Error_TypeExpected (lexer.Location);
yyVal = null;
}
void case_534()
-#line 3859 "cs-parser.jay"
+#line 3858 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+
var sn = new SimpleName (lt.Value, (int) yyVals[0+yyTop], lt.Location);
yyVal = sn;
lbag.AddLocation (sn.TypeArguments, Lexer.GetGenericDimensionLocations ());
@@ -7121,8 +7125,9 @@ void case_534()
void case_535()
#line 3866 "cs-parser.jay"
{
- var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
- var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt1 = (LocatedToken) yyVals[-2+yyTop];
+ var lt2 = (LocatedToken) yyVals[-1+yyTop];
+
var qam = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) yyVals[0+yyTop], lt1.Location);
yyVal = qam;
lbag.AddLocation (qam.TypeArguments, Lexer.GetGenericDimensionLocations ());
@@ -7130,44 +7135,40 @@ void case_535()
}
void case_536()
-#line 3875 "cs-parser.jay"
+#line 3876 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
- yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location) {
- DotLocation = GetLocation (yyVals[-1+yyTop])
- };
+ yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location);
+ lbag.AddLocation (yyVal, savedLocation, GetLocation (yyVals[-1+yyTop]));
}
void case_537()
#line 3883 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
- var ma = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (int) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var ma = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (int) yyVals[0+yyTop], lt.Location);
yyVal = ma;
+ lbag.AddLocation (yyVal, savedLocation, GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (ma.TypeArguments, Lexer.GetGenericDimensionLocations ());
}
void case_538()
-#line 3893 "cs-parser.jay"
+#line 3892 "cs-parser.jay"
{
var tne = (ATypeNameExpression) yyVals[-3+yyTop];
if (tne.HasTypeArguments)
Error_TypeExpected (GetLocation (yyVals[0+yyTop]));
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
- var ma = new MemberAccess (tne, lt.Value, (int) yyVals[0+yyTop], lt.Location) {
- DotLocation = GetLocation (yyVals[-2+yyTop])
- };
+ var lt = (LocatedToken) yyVals[-1+yyTop];
+ var ma = new MemberAccess (tne, lt.Value, (int) yyVals[0+yyTop], lt.Location);
yyVal = ma;
lbag.AddLocation (ma.TypeArguments, Lexer.GetGenericDimensionLocations ());
}
void case_539()
-#line 3909 "cs-parser.jay"
+#line 3906 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics");
@@ -7176,9 +7177,9 @@ void case_539()
}
void case_540()
-#line 3919 "cs-parser.jay"
+#line 3916 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
if (lang_version == LanguageVersion.ISO_1)
FeatureIsNotAvailable (lt.Location, "namespace alias qualifier");
savedLocation = GetLocation (yyVals[0+yyTop]);
@@ -7186,14 +7187,14 @@ void case_540()
}
void case_541()
-#line 3930 "cs-parser.jay"
+#line 3927 "cs-parser.jay"
{
yyVal = new SizeOf ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_542()
-#line 3935 "cs-parser.jay"
+#line 3932 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -7202,14 +7203,14 @@ void case_542()
}
void case_543()
-#line 3945 "cs-parser.jay"
+#line 3942 "cs-parser.jay"
{
yyVal = new CheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_544()
-#line 3950 "cs-parser.jay"
+#line 3947 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -7217,14 +7218,14 @@ void case_544()
}
void case_545()
-#line 3959 "cs-parser.jay"
+#line 3956 "cs-parser.jay"
{
yyVal = new UnCheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_546()
-#line 3964 "cs-parser.jay"
+#line 3961 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -7232,14 +7233,14 @@ void case_546()
}
void case_547()
-#line 3973 "cs-parser.jay"
+#line 3970 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new MemberAccess (new Indirection ((Expression) yyVals[-3+yyTop], GetLocation (yyVals[-2+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
}
void case_549()
-#line 3985 "cs-parser.jay"
+#line 3982 "cs-parser.jay"
{
yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) {
@@ -7250,7 +7251,7 @@ void case_549()
}
void case_551()
-#line 3998 "cs-parser.jay"
+#line 3995 "cs-parser.jay"
{
yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
@@ -7262,7 +7263,7 @@ void case_551()
}
void case_555()
-#line 4023 "cs-parser.jay"
+#line 4020 "cs-parser.jay"
{
valid_param_mod = 0;
yyVal = yyVals[-1+yyTop];
@@ -7271,7 +7272,7 @@ void case_555()
}
void case_556()
-#line 4033 "cs-parser.jay"
+#line 4030 "cs-parser.jay"
{
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression");
@@ -7281,14 +7282,14 @@ void case_556()
}
void case_560()
-#line 4053 "cs-parser.jay"
+#line 4050 "cs-parser.jay"
{
yyVal = new Cast ((FullNamedExpression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
void case_561()
-#line 4058 "cs-parser.jay"
+#line 4055 "cs-parser.jay"
{
if (!async_block) {
if (current_anonymous_method is LambdaExpression) {
@@ -7297,6 +7298,9 @@ void case_561()
} else if (current_anonymous_method is AnonymousMethodExpression) {
report.Error (4035, GetLocation (yyVals[-1+yyTop]),
"The `await' operator can only be used when its containing anonymous method is marked with the `async' modifier");
+ } else if (interactive_async != null) {
+ current_block.Explicit.RegisterAsyncAwait ();
+ interactive_async = true;
} else {
report.Error (4033, GetLocation (yyVals[-1+yyTop]),
"The `await' operator can only be used when its containing method is marked with the `async' modifier");
@@ -7841,7 +7845,7 @@ void case_648()
void case_649()
#line 4572 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], null, lt.Location);
}
@@ -7849,7 +7853,7 @@ void case_649()
void case_650()
#line 4578 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, Parameter.Modifier.NONE, null, lt.Location);
}
@@ -7857,14 +7861,14 @@ void case_650()
void case_651()
#line 4584 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location);
}
void case_652()
#line 4589 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier (yyVals[0+yyTop]);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier (yyVals[0+yyTop]);
yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location);
}
@@ -7907,7 +7911,7 @@ void case_660()
void case_661()
#line 4639 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), false, lt.Location);
}
@@ -7922,7 +7926,7 @@ void case_662()
void case_663()
#line 4650 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier (yyVals[-1+yyTop]);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier (yyVals[-1+yyTop]);
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), false, lt.Location);
}
@@ -7937,7 +7941,7 @@ void case_664()
void case_665()
#line 4661 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), true, lt.Location);
}
@@ -8186,7 +8190,7 @@ void case_709()
void case_711()
#line 4925 "cs-parser.jay"
{
- current_type.AddBasesForPart ((List<FullNamedExpression>) yyVals[0+yyTop]);
+ current_type.SetBaseTypes ((List<FullNamedExpression>) yyVals[0+yyTop]);
lbag.AppendToMember (current_type, GetLocation (yyVals[-1+yyTop]));
}
@@ -8195,7 +8199,7 @@ void case_712()
{
Error_SyntaxError (yyToken);
- current_type.AddBasesForPart ((List<FullNamedExpression>) yyVals[-1+yyTop]);
+ current_type.SetBaseTypes ((List<FullNamedExpression>) yyVals[-1+yyTop]);
}
void case_715()
@@ -8227,7 +8231,7 @@ void case_716()
void case_717()
#line 4972 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List<FullNamedExpression>) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
}
@@ -8237,7 +8241,7 @@ void case_718()
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), null, GetLocation (yyVals[-2+yyTop]));
}
@@ -8375,7 +8379,7 @@ void case_745()
#line 5161 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
- var lt =(Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt =(LocatedToken) yyVals[-1+yyTop];
var sn = new SimpleName (lt.Value, lt.Location);
current_block.AddStatement(new StatementErrorExpression (sn));
yyVal = null;
@@ -8419,7 +8423,7 @@ void case_782()
void case_783()
#line 5260 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location);
lbag.AddLocation (labeled, GetLocation (yyVals[0+yyTop]));
current_block.AddLabel (labeled);
@@ -8506,10 +8510,10 @@ void case_794()
void case_798()
#line 5377 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
+ current_variable = new BlockVariable ((FullNamedExpression) yyVals[-1+yyTop], li);
}
void case_799()
@@ -8526,10 +8530,10 @@ void case_799()
void case_800()
#line 5393 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
+ current_variable = new BlockConstant ((FullNamedExpression) yyVals[-1+yyTop], li);
}
void case_801()
@@ -8584,9 +8588,9 @@ void case_810()
void case_813()
#line 5463 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, null);
+ var d = new BlockVariableDeclarator (li, null);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation (yyVals[-1+yyTop]));
@@ -8595,9 +8599,9 @@ void case_813()
void case_814()
#line 5472 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
+ var d = new BlockVariableDeclarator (li, (Expression) yyVals[0+yyTop]);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
@@ -8613,9 +8617,9 @@ void case_816()
void case_821()
#line 5506 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
+ var d = new BlockVariableDeclarator (li, (Expression) yyVals[0+yyTop]);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
@@ -8656,7 +8660,6 @@ void case_830()
ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement;
if (s == null) {
var expr = yyVals[0+yyTop] as Expression;
- expr.Error_InvalidExpressionStatement (report);
yyVal = new StatementErrorExpression (expr);
} else {
yyVal = new StatementExpression (s);
@@ -8664,24 +8667,21 @@ void case_830()
}
void case_831()
-#line 5570 "cs-parser.jay"
+#line 5569 "cs-parser.jay"
{
Expression expr = (Expression) yyVals[0+yyTop];
- ExpressionStatement s;
-
- s = new OptionalAssign (new SimpleName ("$retval", lexer.Location), expr, lexer.Location);
- yyVal = new StatementExpression (s);
+ yyVal = new StatementExpression (new OptionalAssign (expr, lexer.Location));
}
void case_832()
-#line 5578 "cs-parser.jay"
+#line 5574 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
}
void case_835()
-#line 5592 "cs-parser.jay"
+#line 5588 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -8691,7 +8691,7 @@ void case_835()
}
void case_836()
-#line 5601 "cs-parser.jay"
+#line 5597 "cs-parser.jay"
{
yyVal = new If ((BooleanExpression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-6+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
@@ -8703,7 +8703,7 @@ void case_836()
}
void case_837()
-#line 5611 "cs-parser.jay"
+#line 5607 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -8712,7 +8712,7 @@ void case_837()
}
void case_839()
-#line 5625 "cs-parser.jay"
+#line 5621 "cs-parser.jay"
{
yyVal = new Switch ((Expression) yyVals[-5+yyTop], (ExplicitBlock) current_block.Explicit, GetLocation (yyVals[-7+yyTop]));
end_block (GetLocation (yyVals[0+yyTop]));
@@ -8720,7 +8720,7 @@ void case_839()
}
void case_840()
-#line 5631 "cs-parser.jay"
+#line 5627 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -8729,7 +8729,7 @@ void case_840()
}
void case_847()
-#line 5662 "cs-parser.jay"
+#line 5658 "cs-parser.jay"
{
var label = (SwitchLabel) yyVals[0+yyTop];
label.SectionStart = true;
@@ -8737,21 +8737,21 @@ void case_847()
}
void case_849()
-#line 5675 "cs-parser.jay"
+#line 5671 "cs-parser.jay"
{
yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_850()
-#line 5680 "cs-parser.jay"
+#line 5676 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
void case_856()
-#line 5699 "cs-parser.jay"
+#line 5695 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -8761,7 +8761,7 @@ void case_856()
}
void case_857()
-#line 5707 "cs-parser.jay"
+#line 5703 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -8770,21 +8770,21 @@ void case_857()
}
void case_858()
-#line 5717 "cs-parser.jay"
+#line 5713 "cs-parser.jay"
{
yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-4+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_859()
-#line 5722 "cs-parser.jay"
+#line 5718 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new Do ((Statement) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]), Location.Null);
}
void case_860()
-#line 5727 "cs-parser.jay"
+#line 5723 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -8793,7 +8793,7 @@ void case_860()
}
void case_861()
-#line 5737 "cs-parser.jay"
+#line 5733 "cs-parser.jay"
{
start_block (GetLocation (yyVals[0+yyTop]));
current_block.IsCompilerGenerated = true;
@@ -8804,7 +8804,7 @@ void case_861()
}
void case_863()
-#line 5754 "cs-parser.jay"
+#line 5750 "cs-parser.jay"
{
For f = (For) yyVals[-2+yyTop];
f.Initializer = (Statement) yyVals[-1+yyTop];
@@ -8813,7 +8813,7 @@ void case_863()
}
void case_865()
-#line 5764 "cs-parser.jay"
+#line 5760 "cs-parser.jay"
{
report.Error (1525, GetLocation (yyVals[0+yyTop]), "Unexpected symbol ')', expected ';'");
For f = (For) yyVals[-2+yyTop];
@@ -8823,7 +8823,7 @@ void case_865()
}
void case_866()
-#line 5775 "cs-parser.jay"
+#line 5771 "cs-parser.jay"
{
For f = (For) yyVals[-2+yyTop];
f.Condition = (BooleanExpression) yyVals[-1+yyTop];
@@ -8832,7 +8832,7 @@ void case_866()
}
void case_868()
-#line 5786 "cs-parser.jay"
+#line 5782 "cs-parser.jay"
{
report.Error (1525, GetLocation (yyVals[0+yyTop]), "Unexpected symbol ')', expected ';'");
For f = (For) yyVals[-2+yyTop];
@@ -8842,7 +8842,7 @@ void case_868()
}
void case_869()
-#line 5798 "cs-parser.jay"
+#line 5794 "cs-parser.jay"
{
For f = (For) yyVals[-3+yyTop];
f.Iterator = (Statement) yyVals[-2+yyTop];
@@ -8857,23 +8857,23 @@ void case_869()
}
void case_870()
-#line 5811 "cs-parser.jay"
+#line 5807 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = end_block (current_block.StartLocation);
}
void case_873()
-#line 5824 "cs-parser.jay"
+#line 5820 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
+ current_variable = new BlockVariable ((FullNamedExpression) yyVals[-1+yyTop], li);
}
void case_874()
-#line 5831 "cs-parser.jay"
+#line 5827 "cs-parser.jay"
{
yyVal = current_variable;
if (yyVals[-1+yyTop] != null)
@@ -8883,7 +8883,7 @@ void case_874()
}
void case_882()
-#line 5858 "cs-parser.jay"
+#line 5854 "cs-parser.jay"
{
var sl = yyVals[-2+yyTop] as StatementList;
if (sl == null) {
@@ -8899,7 +8899,7 @@ void case_882()
}
void case_883()
-#line 5875 "cs-parser.jay"
+#line 5871 "cs-parser.jay"
{
report.Error (230, GetLocation (yyVals[-3+yyTop]), "Type and identifier are both required in a foreach statement");
@@ -8914,14 +8914,14 @@ void case_883()
}
void case_884()
-#line 5888 "cs-parser.jay"
+#line 5884 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
start_block (GetLocation (yyVals[-3+yyTop]));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
@@ -8933,18 +8933,19 @@ void case_884()
}
void case_885()
-#line 5905 "cs-parser.jay"
+#line 5901 "cs-parser.jay"
{
start_block (GetLocation (yyVals[-5+yyTop]));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+
+ var lt = (LocatedToken) yyVals[-3+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
yyVal = li;
}
void case_886()
-#line 5914 "cs-parser.jay"
+#line 5911 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -8957,11 +8958,11 @@ void case_886()
}
void case_887()
-#line 5925 "cs-parser.jay"
+#line 5922 "cs-parser.jay"
{
start_block (GetLocation (yyVals[-3+yyTop]));
current_block.IsCompilerGenerated = true;
- var lt = yyVals[-1+yyTop] as Tokenizer.LocatedToken;
+ var lt = yyVals[-1+yyTop] as LocatedToken;
var li = lt != null ? new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location) : null;
Foreach f = new Foreach ((Expression) yyVals[-2+yyTop], li, null, null, null, GetLocation (yyVals[-4+yyTop]));
@@ -8972,7 +8973,7 @@ void case_887()
}
void case_888()
-#line 5938 "cs-parser.jay"
+#line 5935 "cs-parser.jay"
{
Foreach f = new Foreach ((Expression) yyVals[-1+yyTop], null, null, null, null, GetLocation (yyVals[-3+yyTop]));
current_block.AddStatement (f);
@@ -8982,87 +8983,94 @@ void case_888()
}
void case_895()
-#line 5958 "cs-parser.jay"
+#line 5955 "cs-parser.jay"
{
yyVal = new Break (GetLocation (yyVals[-1+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_896()
-#line 5966 "cs-parser.jay"
+#line 5963 "cs-parser.jay"
{
yyVal = new Continue (GetLocation (yyVals[-1+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_897()
-#line 5971 "cs-parser.jay"
+#line 5968 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new Continue (GetLocation (yyVals[-1+yyTop]));
}
void case_898()
-#line 5979 "cs-parser.jay"
+#line 5976 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_899()
-#line 5985 "cs-parser.jay"
+#line 5982 "cs-parser.jay"
{
yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_900()
-#line 5990 "cs-parser.jay"
+#line 5987 "cs-parser.jay"
{
yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
void case_901()
-#line 5998 "cs-parser.jay"
+#line 5995 "cs-parser.jay"
{
yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_902()
-#line 6003 "cs-parser.jay"
+#line 6000 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
void case_903()
-#line 6008 "cs-parser.jay"
+#line 6005 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new Return (null, GetLocation (yyVals[-1+yyTop]));
}
void case_904()
-#line 6016 "cs-parser.jay"
+#line 6013 "cs-parser.jay"
{
yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
}
void case_905()
-#line 6021 "cs-parser.jay"
+#line 6018 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
- yyVal = new Throw (null, GetLocation (yyVals[-1+yyTop]));
+ yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
}
void case_906()
-#line 6029 "cs-parser.jay"
+#line 6023 "cs-parser.jay"
+{
+ Error_SyntaxError (yyToken);
+ yyVal = new Throw (null, GetLocation (yyVals[-1+yyTop]));
+ }
+
+void case_907()
+#line 6031 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -9077,12 +9085,12 @@ void case_906()
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
}
-void case_907()
-#line 6045 "cs-parser.jay"
+void case_908()
+#line 6047 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -9097,10 +9105,10 @@ void case_907()
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]));
}
-void case_908()
-#line 6063 "cs-parser.jay"
+void case_909()
+#line 6065 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -9108,34 +9116,34 @@ void case_908()
FeatureIsNotAvailable (lt.Location, "iterators");
}
- current_block.Explicit.RegisterIteratorYield ();
+ current_block.ParametersBlock.TopBlock.IsIterator = true;
yyVal = new YieldBreak (lt.Location);
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
}
-void case_912()
-#line 6089 "cs-parser.jay"
+void case_913()
+#line 6091 "cs-parser.jay"
{
yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
}
-void case_913()
-#line 6094 "cs-parser.jay"
+void case_914()
+#line 6096 "cs-parser.jay"
{
yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
}
-void case_914()
-#line 6099 "cs-parser.jay"
+void case_915()
+#line 6101 "cs-parser.jay"
{
Error_SyntaxError (1524, yyToken);
yyVal = new TryCatch ((Block) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]), false);
}
-void case_915()
-#line 6107 "cs-parser.jay"
+void case_916()
+#line 6109 "cs-parser.jay"
{
var l = new List<Catch> (2);
@@ -9143,8 +9151,8 @@ void case_915()
yyVal = l;
}
-void case_916()
-#line 6114 "cs-parser.jay"
+void case_917()
+#line 6116 "cs-parser.jay"
{
var l = (List<Catch>) yyVals[-1+yyTop];
@@ -9157,15 +9165,15 @@ void case_916()
yyVal = l;
}
-void case_920()
-#line 6138 "cs-parser.jay"
+void case_921()
+#line 6140 "cs-parser.jay"
{
start_block (GetLocation (yyVals[-3+yyTop]));
var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop]));
c.TypeExpression = (FullNamedExpression) yyVals[-2+yyTop];
if (yyVals[-1+yyTop] != null) {
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (c.Variable);
}
@@ -9174,8 +9182,8 @@ void case_920()
yyVal = c;
}
-void case_922()
-#line 6157 "cs-parser.jay"
+void case_923()
+#line 6159 "cs-parser.jay"
{
if (yyToken == Token.CLOSE_PARENS) {
report.Error (1015, lexer.Location,
@@ -9187,8 +9195,8 @@ void case_922()
yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop]));
}
-void case_923()
-#line 6168 "cs-parser.jay"
+void case_924()
+#line 6170 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -9198,12 +9206,12 @@ void case_923()
c.TypeExpression = (FullNamedExpression) yyVals[-3+yyTop];
if (yyVals[-2+yyTop] != null) {
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
}
if (yyVals[-2+yyTop] != null) {
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
}
@@ -9212,15 +9220,15 @@ void case_923()
yyVal = c;
}
-void case_926()
-#line 6208 "cs-parser.jay"
+void case_927()
+#line 6210 "cs-parser.jay"
{
if (!settings.Unsafe)
Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop]));
}
-void case_928()
-#line 6218 "cs-parser.jay"
+void case_929()
+#line 6220 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -9229,8 +9237,8 @@ void case_928()
lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
}
-void case_929()
-#line 6226 "cs-parser.jay"
+void case_930()
+#line 6228 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -9238,27 +9246,27 @@ void case_929()
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]));
}
-void case_930()
-#line 6236 "cs-parser.jay"
+void case_931()
+#line 6238 "cs-parser.jay"
{
start_block (GetLocation (yyVals[-2+yyTop]));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.FixedVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
}
-void case_931()
-#line 6246 "cs-parser.jay"
+void case_932()
+#line 6248 "cs-parser.jay"
{
yyVal = current_variable;
current_variable = null;
}
-void case_932()
-#line 6251 "cs-parser.jay"
+void case_933()
+#line 6253 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -9269,27 +9277,27 @@ void case_932()
yyVal = end_block (GetLocation (yyVals[-2+yyTop]));
}
-void case_933()
-#line 6264 "cs-parser.jay"
+void case_934()
+#line 6266 "cs-parser.jay"
{
start_block (GetLocation (yyVals[-2+yyTop]));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ var lt = (LocatedToken) yyVals[0+yyTop];
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.UsingVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
current_variable = new Using.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
}
-void case_934()
-#line 6274 "cs-parser.jay"
+void case_935()
+#line 6276 "cs-parser.jay"
{
yyVal = current_variable;
current_variable = null;
}
-void case_935()
-#line 6279 "cs-parser.jay"
+void case_936()
+#line 6281 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -9300,8 +9308,8 @@ void case_935()
yyVal = end_block (GetLocation (yyVals[-2+yyTop]));
}
-void case_936()
-#line 6289 "cs-parser.jay"
+void case_937()
+#line 6291 "cs-parser.jay"
{
if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
@@ -9310,8 +9318,8 @@ void case_936()
lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
}
-void case_937()
-#line 6297 "cs-parser.jay"
+void case_938()
+#line 6299 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
@@ -9319,23 +9327,23 @@ void case_937()
lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]));
}
-void case_939()
-#line 6308 "cs-parser.jay"
+void case_940()
+#line 6310 "cs-parser.jay"
{
/* It has to be here for the parent to safely restore artificial block*/
Error_SyntaxError (yyToken);
}
-void case_941()
-#line 6320 "cs-parser.jay"
+void case_942()
+#line 6322 "cs-parser.jay"
{
current_variable.Initializer = (Expression) yyVals[0+yyTop];
lbag.AddLocation (current_variable, GetLocation (yyVals[-1+yyTop]));
yyVal = current_variable;
}
-void case_942()
-#line 6332 "cs-parser.jay"
+void case_943()
+#line 6334 "cs-parser.jay"
{
lexer.query_parsing = false;
@@ -9348,8 +9356,8 @@ void case_942()
current_block = current_block.Parent;
}
-void case_943()
-#line 6344 "cs-parser.jay"
+void case_944()
+#line 6346 "cs-parser.jay"
{
Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause;
@@ -9360,8 +9368,8 @@ void case_943()
current_block = current_block.Parent;
}
-void case_944()
-#line 6355 "cs-parser.jay"
+void case_945()
+#line 6357 "cs-parser.jay"
{
lexer.query_parsing = false;
yyVal = yyVals[-1+yyTop];
@@ -9370,32 +9378,32 @@ void case_944()
current_block = current_block.Parent;
}
-void case_945()
-#line 6362 "cs-parser.jay"
+void case_946()
+#line 6364 "cs-parser.jay"
{
yyVal = yyVals[-1+yyTop];
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
}
-void case_946()
-#line 6371 "cs-parser.jay"
+void case_947()
+#line 6373 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (start, GetLocation (yyVals[-1+yyTop]));
yyVal = new Linq.QueryExpression (start);
}
-void case_947()
-#line 6381 "cs-parser.jay"
+void case_948()
+#line 6383 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-4+yyTop])) {
IdentifierType = (FullNamedExpression)yyVals[-3+yyTop]
@@ -9404,24 +9412,24 @@ void case_947()
yyVal = new Linq.QueryExpression (start);
}
-void case_948()
-#line 6396 "cs-parser.jay"
+void case_949()
+#line 6398 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]));
lbag.AddLocation (start, GetLocation (yyVals[-1+yyTop]));
yyVal = new Linq.QueryExpression (start);
}
-void case_949()
-#line 6406 "cs-parser.jay"
+void case_950()
+#line 6408 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-4+yyTop])) {
IdentifierType = (FullNamedExpression)yyVals[-3+yyTop]
@@ -9430,10 +9438,10 @@ void case_949()
yyVal = new Linq.QueryExpression (start);
}
-void case_951()
-#line 6425 "cs-parser.jay"
+void case_952()
+#line 6427 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
yyVal = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
@@ -9444,10 +9452,10 @@ void case_951()
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
-void case_953()
-#line 6441 "cs-parser.jay"
+void case_954()
+#line 6443 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
yyVal = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop])) {
@@ -9462,8 +9470,8 @@ void case_953()
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
}
-void case_954()
-#line 6460 "cs-parser.jay"
+void case_955()
+#line 6462 "cs-parser.jay"
{
Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop];
@@ -9479,8 +9487,8 @@ void case_954()
yyVal = head;
}
-void case_955()
-#line 6475 "cs-parser.jay"
+void case_956()
+#line 6477 "cs-parser.jay"
{
Linq.AQueryClause head = (Linq.AQueryClause)yyVals[0+yyTop];
@@ -9493,22 +9501,22 @@ void case_955()
yyVal = head;
}
-void case_957()
-#line 6488 "cs-parser.jay"
+void case_958()
+#line 6490 "cs-parser.jay"
{
report.Error (742, GetLocation (yyVals[0+yyTop]), "Unexpected symbol `{0}'. A query body must end with select or group clause", GetSymbolName (yyToken));
yyVal = yyVals[-1+yyTop];
}
-void case_958()
-#line 6493 "cs-parser.jay"
+void case_959()
+#line 6495 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = null;
}
-void case_960()
-#line 6505 "cs-parser.jay"
+void case_961()
+#line 6507 "cs-parser.jay"
{
yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
@@ -9516,8 +9524,8 @@ void case_960()
current_block = current_block.Parent;
}
-void case_961()
-#line 6512 "cs-parser.jay"
+void case_962()
+#line 6514 "cs-parser.jay"
{
if (linq_clause_blocks == null)
linq_clause_blocks = new Stack<Linq.QueryBlock> ();
@@ -9526,8 +9534,8 @@ void case_961()
linq_clause_blocks.Push ((Linq.QueryBlock)current_block);
}
-void case_962()
-#line 6520 "cs-parser.jay"
+void case_963()
+#line 6522 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9535,8 +9543,8 @@ void case_962()
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
-void case_963()
-#line 6527 "cs-parser.jay"
+void case_964()
+#line 6529 "cs-parser.jay"
{
var obj = (object[]) yyVals[0+yyTop];
@@ -9547,24 +9555,24 @@ void case_963()
current_block = current_block.Parent;
}
-void case_965()
-#line 6544 "cs-parser.jay"
+void case_966()
+#line 6546 "cs-parser.jay"
{
Error_SyntaxError (yyToken);
yyVal = new object[2] { null, Location.Null };
}
-void case_967()
-#line 6553 "cs-parser.jay"
+void case_968()
+#line 6555 "cs-parser.jay"
{
((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
yyVal = yyVals[-1+yyTop];
}
-void case_974()
-#line 6573 "cs-parser.jay"
+void case_975()
+#line 6575 "cs-parser.jay"
{
- var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
+ var lt = (LocatedToken) yyVals[-3+yyTop];
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
yyVal = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
@@ -9575,8 +9583,8 @@ void case_974()
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
}
-void case_976()
-#line 6592 "cs-parser.jay"
+void case_977()
+#line 6594 "cs-parser.jay"
{
yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
@@ -9584,8 +9592,8 @@ void case_976()
current_block = current_block.Parent;
}
-void case_977()
-#line 6602 "cs-parser.jay"
+void case_978()
+#line 6604 "cs-parser.jay"
{
if (linq_clause_blocks == null)
linq_clause_blocks = new Stack<Linq.QueryBlock> ();
@@ -9594,8 +9602,8 @@ void case_977()
linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
}
-void case_978()
-#line 6610 "cs-parser.jay"
+void case_979()
+#line 6612 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9604,8 +9612,8 @@ void case_978()
linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
}
-void case_979()
-#line 6618 "cs-parser.jay"
+void case_980()
+#line 6620 "cs-parser.jay"
{
current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
current_block.SetEndLocation (lexer.Location);
@@ -9614,8 +9622,8 @@ void case_979()
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
-void case_980()
-#line 6626 "cs-parser.jay"
+void case_981()
+#line 6628 "cs-parser.jay"
{
current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
current_block.SetEndLocation (lexer.Location);
@@ -9623,7 +9631,7 @@ void case_980()
var outer_selector = linq_clause_blocks.Pop ();
var block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) yyVals[-10+yyTop];
+ var lt = (LocatedToken) yyVals[-10+yyTop];
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
Linq.RangeVariable into;
@@ -9643,7 +9651,7 @@ void case_980()
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
- lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ lt = (LocatedToken) yyVals[0+yyTop];
into = new Linq.RangeVariable (lt.Value, lt.Location);
yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-11+yyTop]));
@@ -9654,8 +9662,8 @@ void case_980()
((Linq.QueryBlock)current_block).AddRangeVariable (into);
}
-void case_981()
-#line 6664 "cs-parser.jay"
+void case_982()
+#line 6666 "cs-parser.jay"
{
if (linq_clause_blocks == null)
linq_clause_blocks = new Stack<Linq.QueryBlock> ();
@@ -9664,8 +9672,8 @@ void case_981()
linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
}
-void case_982()
-#line 6672 "cs-parser.jay"
+void case_983()
+#line 6674 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9674,8 +9682,8 @@ void case_982()
linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
}
-void case_983()
-#line 6680 "cs-parser.jay"
+void case_984()
+#line 6682 "cs-parser.jay"
{
current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
current_block.SetEndLocation (lexer.Location);
@@ -9684,8 +9692,8 @@ void case_983()
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
-void case_984()
-#line 6688 "cs-parser.jay"
+void case_985()
+#line 6690 "cs-parser.jay"
{
current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
current_block.SetEndLocation (lexer.Location);
@@ -9693,7 +9701,7 @@ void case_984()
var outer_selector = linq_clause_blocks.Pop ();
var block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) yyVals[-10+yyTop];
+ var lt = (LocatedToken) yyVals[-10+yyTop];
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
Linq.RangeVariable into;
@@ -9715,7 +9723,7 @@ void case_984()
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
- lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
+ lt = (LocatedToken) yyVals[0+yyTop];
into = new Linq.RangeVariable (lt.Value, lt.Location); /* TODO:*/
yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-12+yyTop])) {
@@ -9728,22 +9736,22 @@ void case_984()
((Linq.QueryBlock)current_block).AddRangeVariable (into);
}
-void case_986()
-#line 6734 "cs-parser.jay"
+void case_987()
+#line 6736 "cs-parser.jay"
{
opt_intoStack.Push (GetLocation (yyVals[-1+yyTop]));
yyVal = yyVals[0+yyTop];
}
-void case_987()
-#line 6742 "cs-parser.jay"
+void case_988()
+#line 6744 "cs-parser.jay"
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
lbag.AddLocation (current_block, GetLocation (yyVals[0+yyTop]));
}
-void case_988()
-#line 6747 "cs-parser.jay"
+void case_989()
+#line 6749 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9751,8 +9759,8 @@ void case_988()
yyVal = yyVals[0+yyTop];
}
-void case_990()
-#line 6758 "cs-parser.jay"
+void case_991()
+#line 6760 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9760,15 +9768,15 @@ void case_990()
current_block = new Linq.QueryBlock (current_block, lexer.Location);
}
-void case_991()
-#line 6765 "cs-parser.jay"
+void case_992()
+#line 6767 "cs-parser.jay"
{
((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop];
yyVal = yyVals[-3+yyTop];
}
-void case_993()
-#line 6774 "cs-parser.jay"
+void case_994()
+#line 6776 "cs-parser.jay"
{
current_block.SetEndLocation (lexer.Location);
current_block = current_block.Parent;
@@ -9776,43 +9784,43 @@ void case_993()
current_block = new Linq.QueryBlock ((Linq.QueryBlock) current_block, lexer.Location);
}
-void case_994()
-#line 6781 "cs-parser.jay"
+void case_995()
+#line 6783 "cs-parser.jay"
{
((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
yyVal = yyVals[-3+yyTop];
}
-void case_996()
-#line 6793 "cs-parser.jay"
+void case_997()
+#line 6795 "cs-parser.jay"
{
yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
-void case_997()
-#line 6798 "cs-parser.jay"
+void case_998()
+#line 6800 "cs-parser.jay"
{
yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
-void case_999()
-#line 6810 "cs-parser.jay"
+void case_1000()
+#line 6812 "cs-parser.jay"
{
yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
-void case_1000()
-#line 6815 "cs-parser.jay"
+void case_1001()
+#line 6817 "cs-parser.jay"
{
yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);
lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
}
-void case_1002()
-#line 6825 "cs-parser.jay"
+void case_1003()
+#line 6827 "cs-parser.jay"
{
/* query continuation block is not linked with query block but with block*/
/* before. This means each query can use same range variable names for*/
@@ -9829,19 +9837,19 @@ void case_1002()
linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
}
-void case_1003()
-#line 6841 "cs-parser.jay"
+void case_1004()
+#line 6843 "cs-parser.jay"
{
var current_block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
+ var lt = (LocatedToken) yyVals[-2+yyTop];
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
yyVal = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, null, rv, GetLocation (yyVals[-3+yyTop])) {
next = (Linq.AQueryClause)yyVals[0+yyTop]
};
}
-void case_1006()
-#line 6868 "cs-parser.jay"
+void case_1007()
+#line 6870 "cs-parser.jay"
{
current_container = current_type = new Class (current_container, new MemberName ("<InteractiveExpressionClass>"), Modifiers.PUBLIC, null);
@@ -9855,59 +9863,62 @@ void case_1006()
mods |= Modifiers.UNSAFE;
current_local_parameters = pars;
- Method method = new Method (
+ var method = new InteractiveMethod (
current_type,
new TypeExpression (compiler.BuiltinTypes.Void, Location.Null),
mods,
- new MemberName ("Host"),
- pars,
- null /* attributes */);
+ pars);
current_type.AddMember (method);
-
oob_stack.Push (method);
+
+ interactive_async = false;
+
++lexer.parsing_block;
start_block (lexer.Location);
}
-void case_1007()
-#line 6896 "cs-parser.jay"
+void case_1008()
+#line 6898 "cs-parser.jay"
{
--lexer.parsing_block;
- Method method = (Method) oob_stack.Pop ();
-
+ var method = (InteractiveMethod) oob_stack.Pop ();
method.Block = (ToplevelBlock) end_block(lexer.Location);
+ if (interactive_async == true) {
+ method.ChangeToAsync ();
+ }
+
InteractiveResult = (Class) pop_current_class ();
current_local_parameters = null;
}
-void case_1017()
-#line 6939 "cs-parser.jay"
+void case_1018()
+#line 6944 "cs-parser.jay"
{
module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop];
module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
yyVal = null;
}
-void case_1018()
-#line 6945 "cs-parser.jay"
+void case_1019()
+#line 6950 "cs-parser.jay"
{
module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop];
module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
- var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
+ var lt = (LocatedToken) yyVals[-1+yyTop];
yyVal = new MemberName (lt.Value);
}
-void case_1021()
-#line 6960 "cs-parser.jay"
+void case_1022()
+#line 6965 "cs-parser.jay"
{
module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[-1+yyTop];
yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], MemberCache.IndexerNameAlias, Location.Null);
}
-void case_1022()
-#line 6965 "cs-parser.jay"
+void case_1023()
+#line 6970 "cs-parser.jay"
{
var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop]));
@@ -9916,8 +9927,8 @@ void case_1022()
yyVal = null;
}
-void case_1023()
-#line 6973 "cs-parser.jay"
+void case_1024()
+#line 6978 "cs-parser.jay"
{
var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop]));
@@ -9926,8 +9937,8 @@ void case_1023()
yyVal = null;
}
-void case_1024()
-#line 6981 "cs-parser.jay"
+void case_1025()
+#line 6986 "cs-parser.jay"
{
var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
module.DocumentationBuilder.ParsedParameters = p;
@@ -9935,24 +9946,24 @@ void case_1024()
yyVal = null;
}
-void case_1032()
-#line 7019 "cs-parser.jay"
+void case_1033()
+#line 7024 "cs-parser.jay"
{
var parameters = new List<DocumentationParameter> ();
parameters.Add ((DocumentationParameter) yyVals[0+yyTop]);
yyVal = parameters;
}
-void case_1033()
-#line 7025 "cs-parser.jay"
+void case_1034()
+#line 7030 "cs-parser.jay"
{
var parameters = yyVals[-2+yyTop] as List<DocumentationParameter>;
parameters.Add ((DocumentationParameter) yyVals[0+yyTop]);
yyVal = parameters;
}
-void case_1034()
-#line 7034 "cs-parser.jay"
+void case_1035()
+#line 7039 "cs-parser.jay"
{
if (yyVals[-1+yyTop] != null)
yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]);
@@ -9970,54 +9981,54 @@ void case_1034()
9, 9, 10, 10, 34, 32, 37, 33, 33, 33,
33, 35, 35, 35, 36, 36, 41, 38, 39, 40,
40, 42, 42, 42, 42, 42, 43, 43, 43, 47,
- 44, 46, 49, 49, 49, 50, 50, 51, 51, 52,
- 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
- 52, 52, 67, 69, 71, 72, 73, 28, 28, 76,
- 53, 53, 77, 77, 78, 78, 79, 81, 75, 75,
- 80, 80, 86, 54, 90, 54, 54, 85, 93, 85,
- 87, 87, 94, 94, 95, 96, 95, 91, 91, 97,
- 97, 98, 99, 89, 89, 92, 92, 92, 102, 55,
- 105, 106, 100, 107, 108, 109, 100, 100, 100, 101,
- 101, 104, 104, 112, 112, 112, 112, 112, 112, 112,
- 112, 112, 112, 113, 113, 116, 116, 116, 116, 119,
- 116, 117, 117, 120, 120, 121, 121, 121, 114, 114,
- 114, 122, 122, 122, 115, 124, 126, 127, 56, 129,
- 130, 131, 58, 125, 125, 125, 125, 125, 135, 132,
- 136, 133, 134, 134, 134, 137, 138, 139, 141, 29,
- 29, 140, 140, 142, 142, 143, 143, 143, 143, 143,
- 143, 143, 143, 143, 146, 59, 145, 145, 147, 147,
- 150, 144, 144, 149, 149, 149, 149, 149, 149, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
- 149, 149, 149, 149, 149, 152, 151, 153, 151, 151,
- 151, 60, 156, 158, 154, 155, 155, 157, 157, 162,
- 160, 163, 160, 160, 160, 164, 61, 166, 57, 169,
- 170, 57, 57, 165, 172, 165, 167, 167, 173, 173,
- 174, 175, 174, 176, 171, 168, 168, 168, 168, 168,
- 180, 177, 181, 178, 179, 179, 62, 63, 183, 185,
- 186, 30, 182, 182, 182, 184, 184, 184, 187, 187,
- 188, 189, 188, 188, 188, 190, 191, 192, 31, 193,
- 193, 16, 16, 194, 194, 197, 196, 196, 196, 198,
- 198, 200, 66, 123, 103, 103, 128, 128, 201, 201,
- 201, 199, 199, 202, 202, 203, 203, 205, 205, 84,
- 74, 74, 88, 88, 118, 118, 148, 148, 206, 206,
- 206, 206, 206, 210, 210, 211, 209, 209, 209, 209,
- 209, 209, 209, 212, 212, 212, 212, 212, 212, 212,
- 212, 212, 213, 213, 213, 213, 213, 213, 213, 213,
- 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
- 213, 213, 214, 214, 214, 215, 215, 215, 235, 235,
- 236, 236, 237, 237, 217, 217, 234, 234, 234, 234,
- 234, 234, 234, 234, 219, 219, 219, 239, 239, 240,
- 240, 241, 241, 243, 243, 243, 244, 244, 244, 244,
- 244, 244, 245, 245, 161, 161, 238, 238, 238, 238,
- 238, 250, 250, 249, 249, 251, 251, 251, 251, 252,
- 220, 220, 220, 248, 248, 253, 253, 255, 255, 221,
- 222, 222, 223, 224, 225, 225, 216, 216, 216, 216,
- 216, 260, 256, 226, 261, 261, 262, 262, 263, 263,
- 264, 264, 264, 264, 257, 257, 207, 207, 259, 259,
- 265, 265, 258, 258, 83, 83, 266, 266, 267, 227,
- 268, 268, 268, 269, 269, 269, 269, 269, 270, 195,
- 228, 228, 229, 229, 230, 230, 231, 272, 232, 273,
- 232, 271, 271, 275, 274, 218, 276, 276, 276, 276,
+ 44, 46, 49, 49, 49, 51, 51, 52, 52, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 68, 70, 72, 73, 74, 28, 28, 77,
+ 54, 54, 78, 78, 79, 79, 80, 82, 76, 76,
+ 81, 81, 87, 55, 91, 55, 55, 86, 94, 86,
+ 88, 88, 95, 95, 96, 97, 96, 92, 92, 98,
+ 98, 99, 100, 90, 90, 93, 93, 93, 103, 56,
+ 106, 107, 101, 108, 109, 110, 101, 101, 101, 102,
+ 102, 105, 105, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 113, 114, 114, 117, 117, 117, 117, 120,
+ 117, 118, 118, 121, 121, 122, 122, 122, 115, 115,
+ 115, 123, 123, 123, 116, 125, 127, 128, 57, 130,
+ 131, 132, 59, 126, 126, 126, 126, 126, 136, 133,
+ 137, 134, 135, 135, 135, 138, 139, 140, 142, 29,
+ 29, 141, 141, 143, 143, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 147, 60, 146, 146, 148, 148,
+ 151, 145, 145, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 153, 152, 154, 152, 152,
+ 152, 61, 157, 159, 155, 156, 156, 158, 158, 163,
+ 161, 164, 161, 161, 161, 165, 62, 167, 58, 170,
+ 171, 58, 58, 166, 173, 166, 168, 168, 174, 174,
+ 175, 176, 175, 177, 172, 169, 169, 169, 169, 169,
+ 181, 178, 182, 179, 180, 180, 63, 64, 184, 186,
+ 187, 30, 183, 183, 183, 185, 185, 185, 188, 188,
+ 189, 190, 189, 189, 189, 191, 192, 193, 31, 194,
+ 194, 16, 16, 195, 195, 198, 197, 197, 197, 199,
+ 199, 201, 67, 124, 104, 104, 129, 129, 202, 202,
+ 202, 200, 200, 203, 203, 204, 204, 206, 206, 85,
+ 75, 75, 89, 89, 119, 119, 149, 149, 207, 207,
+ 207, 207, 207, 211, 211, 212, 210, 210, 210, 210,
+ 210, 210, 210, 213, 213, 213, 213, 213, 213, 213,
+ 213, 213, 214, 214, 214, 214, 214, 214, 214, 214,
+ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ 214, 214, 215, 215, 215, 216, 216, 216, 236, 236,
+ 237, 237, 238, 238, 218, 218, 235, 235, 235, 235,
+ 235, 235, 235, 235, 220, 220, 220, 240, 240, 241,
+ 241, 242, 242, 244, 244, 244, 245, 245, 245, 245,
+ 245, 245, 246, 246, 162, 162, 239, 239, 239, 239,
+ 239, 251, 251, 250, 250, 252, 252, 252, 252, 253,
+ 221, 221, 221, 249, 249, 254, 254, 255, 255, 222,
+ 223, 223, 224, 225, 226, 226, 217, 217, 217, 217,
+ 217, 260, 256, 227, 261, 261, 262, 262, 263, 263,
+ 264, 264, 264, 264, 257, 257, 208, 208, 259, 259,
+ 265, 265, 258, 258, 84, 84, 266, 266, 267, 228,
+ 268, 268, 268, 269, 269, 269, 269, 269, 270, 196,
+ 229, 229, 230, 230, 231, 231, 232, 272, 233, 273,
+ 233, 271, 271, 275, 274, 219, 276, 276, 276, 276,
276, 276, 276, 276, 276, 277, 277, 277, 277, 277,
277, 277, 277, 277, 277, 277, 277, 277, 278, 278,
278, 278, 278, 278, 278, 279, 279, 279, 279, 279,
@@ -10027,21 +10038,21 @@ void case_1034()
285, 285, 286, 286, 286, 287, 287, 287, 288, 288,
289, 289, 289, 289, 289, 290, 290, 290, 290, 290,
290, 290, 290, 290, 290, 290, 291, 291, 292, 292,
- 292, 292, 293, 293, 295, 294, 294, 294, 254, 254,
+ 292, 292, 293, 293, 295, 294, 294, 294, 50, 50,
297, 296, 298, 296, 299, 296, 300, 301, 296, 302,
- 303, 296, 45, 45, 246, 246, 246, 246, 233, 233,
- 233, 82, 305, 306, 307, 308, 309, 27, 65, 65,
- 64, 64, 110, 110, 310, 310, 310, 310, 310, 310,
- 310, 310, 310, 310, 310, 310, 310, 310, 310, 68,
- 68, 68, 70, 70, 311, 311, 312, 312, 313, 313,
- 314, 314, 314, 314, 204, 204, 315, 315, 317, 111,
- 318, 318, 319, 159, 159, 321, 320, 316, 316, 322,
+ 303, 296, 45, 45, 247, 247, 247, 247, 234, 234,
+ 234, 83, 305, 306, 307, 308, 309, 27, 66, 66,
+ 65, 65, 111, 111, 310, 310, 310, 310, 310, 310,
+ 310, 310, 310, 310, 310, 310, 310, 310, 310, 69,
+ 69, 69, 71, 71, 311, 311, 312, 312, 313, 313,
+ 314, 314, 314, 314, 205, 205, 315, 315, 317, 112,
+ 318, 318, 319, 160, 160, 321, 320, 316, 316, 322,
322, 323, 323, 323, 323, 323, 327, 327, 328, 328,
328, 325, 325, 325, 325, 325, 325, 325, 325, 325,
325, 325, 325, 325, 329, 329, 329, 329, 329, 329,
329, 329, 329, 329, 329, 329, 329, 343, 343, 343,
343, 330, 344, 326, 345, 345, 346, 346, 346, 346,
- 346, 346, 208, 208, 347, 48, 48, 349, 324, 353,
+ 346, 346, 209, 209, 347, 48, 48, 349, 324, 353,
324, 351, 351, 348, 348, 348, 350, 350, 357, 357,
356, 356, 358, 358, 352, 352, 354, 354, 359, 359,
360, 355, 355, 355, 331, 331, 331, 342, 342, 361,
@@ -10052,20 +10063,20 @@ void case_1034()
377, 377, 385, 384, 384, 380, 380, 383, 383, 387,
386, 386, 374, 374, 388, 374, 374, 374, 334, 334,
334, 334, 334, 334, 389, 390, 390, 391, 391, 391,
- 392, 392, 392, 393, 393, 394, 394, 394, 395, 395,
- 335, 335, 335, 335, 396, 396, 398, 398, 397, 399,
- 397, 397, 397, 336, 337, 400, 340, 338, 338, 402,
- 403, 341, 405, 406, 339, 339, 339, 404, 404, 401,
- 401, 304, 304, 304, 304, 407, 407, 409, 409, 411,
- 410, 412, 410, 408, 408, 408, 408, 408, 416, 414,
- 417, 419, 414, 418, 418, 413, 413, 420, 420, 420,
- 420, 420, 425, 421, 426, 422, 427, 428, 429, 423,
- 431, 432, 433, 423, 430, 430, 435, 424, 434, 438,
- 434, 437, 440, 437, 436, 436, 436, 439, 439, 439,
- 415, 441, 415, 3, 3, 442, 3, 3, 443, 443,
- 247, 247, 242, 242, 5, 444, 444, 444, 444, 448,
- 444, 444, 444, 444, 445, 445, 446, 449, 446, 447,
- 447, 450, 450, 451,
+ 392, 392, 392, 393, 393, 393, 394, 394, 394, 395,
+ 395, 335, 335, 335, 335, 396, 396, 398, 398, 397,
+ 399, 397, 397, 397, 336, 337, 400, 340, 338, 338,
+ 402, 403, 341, 405, 406, 339, 339, 339, 404, 404,
+ 401, 401, 304, 304, 304, 304, 407, 407, 409, 409,
+ 411, 410, 412, 410, 408, 408, 408, 408, 408, 416,
+ 414, 417, 419, 414, 418, 418, 413, 413, 420, 420,
+ 420, 420, 420, 425, 421, 426, 422, 427, 428, 429,
+ 423, 431, 432, 433, 423, 430, 430, 435, 424, 434,
+ 438, 434, 437, 440, 437, 436, 436, 436, 439, 439,
+ 439, 415, 441, 415, 3, 3, 442, 3, 3, 443,
+ 443, 248, 248, 243, 243, 5, 444, 444, 444, 444,
+ 448, 444, 444, 444, 444, 445, 445, 446, 449, 446,
+ 447, 447, 450, 450, 451,
};
static readonly short [] yyLen = { 2,
2, 0, 3, 1, 2, 4, 3, 1, 0, 1,
@@ -10158,31 +10169,31 @@ void case_1034()
0, 1, 0, 5, 1, 0, 1, 0, 1, 1,
1, 3, 4, 5, 0, 9, 5, 4, 1, 1,
1, 1, 1, 1, 2, 2, 2, 3, 4, 3,
- 3, 3, 2, 3, 2, 4, 4, 3, 0, 1,
- 3, 4, 5, 3, 1, 2, 0, 1, 2, 0,
- 7, 3, 6, 2, 2, 0, 3, 5, 4, 0,
- 0, 10, 0, 0, 9, 5, 4, 2, 1, 0,
- 2, 2, 2, 2, 2, 4, 5, 4, 5, 0,
- 5, 0, 6, 3, 2, 2, 2, 1, 0, 3,
- 0, 0, 5, 2, 1, 1, 2, 1, 1, 1,
- 1, 1, 0, 5, 0, 3, 0, 0, 0, 12,
- 0, 0, 0, 13, 0, 2, 0, 3, 1, 0,
- 4, 1, 0, 4, 1, 2, 2, 1, 2, 2,
- 0, 0, 4, 2, 3, 0, 4, 2, 2, 3,
- 0, 1, 1, 1, 2, 2, 2, 4, 3, 0,
- 7, 4, 4, 3, 1, 3, 0, 0, 4, 0,
- 1, 1, 3, 2,
+ 3, 3, 2, 3, 3, 2, 4, 4, 3, 0,
+ 1, 3, 4, 5, 3, 1, 2, 0, 1, 2,
+ 0, 7, 3, 6, 2, 2, 0, 3, 5, 4,
+ 0, 0, 10, 0, 0, 9, 5, 4, 2, 1,
+ 0, 2, 2, 2, 2, 2, 4, 5, 4, 5,
+ 0, 5, 0, 6, 3, 2, 2, 2, 1, 0,
+ 3, 0, 0, 5, 2, 1, 1, 2, 1, 1,
+ 1, 1, 1, 0, 5, 0, 3, 0, 0, 0,
+ 12, 0, 0, 0, 13, 0, 2, 0, 3, 1,
+ 0, 4, 1, 0, 4, 1, 2, 2, 1, 2,
+ 2, 0, 0, 4, 2, 3, 0, 4, 2, 2,
+ 3, 0, 1, 1, 1, 2, 2, 2, 4, 3,
+ 0, 7, 4, 4, 3, 1, 3, 0, 0, 4,
+ 0, 1, 1, 3, 2,
};
static readonly short [] yyDefRed = { 0,
8, 0, 0, 0, 0, 0, 0, 0, 2, 4,
- 0, 0, 11, 14, 0, 1004, 0, 0, 1008, 0,
+ 0, 0, 11, 14, 0, 1005, 0, 0, 1009, 0,
0, 15, 17, 389, 395, 402, 390, 392, 0, 391,
0, 398, 400, 387, 0, 394, 396, 388, 399, 401,
- 397, 352, 1025, 0, 393, 1015, 0, 10, 1, 0,
+ 397, 352, 1026, 0, 393, 1016, 0, 10, 1, 0,
0, 0, 12, 0, 832, 0, 0, 0, 0, 0,
0, 0, 0, 430, 0, 0, 0, 0, 0, 0,
0, 428, 0, 0, 0, 490, 0, 429, 0, 529,
- 0, 926, 0, 0, 0, 678, 0, 0, 0, 0,
+ 0, 927, 0, 0, 0, 678, 0, 0, 0, 0,
0, 0, 0, 729, 0, 782, 0, 0, 0, 0,
0, 0, 0, 0, 427, 0, 667, 0, 831, 0,
765, 0, 0, 0, 0, 404, 405, 406, 407, 408,
@@ -10193,19 +10204,19 @@ void case_1034()
768, 769, 770, 771, 772, 773, 774, 775, 776, 777,
767, 0, 0, 0, 833, 834, 852, 853, 854, 855,
889, 890, 891, 892, 893, 894, 0, 0, 0, 20,
- 0, 0, 342, 0, 344, 1012, 16, 1005, 0, 0,
+ 0, 0, 342, 0, 344, 1013, 16, 1006, 0, 0,
249, 248, 245, 250, 251, 244, 263, 262, 255, 256,
252, 254, 253, 257, 246, 247, 258, 259, 265, 264,
- 260, 261, 0, 0, 1028, 0, 1017, 0, 1016, 3,
+ 260, 261, 0, 0, 1029, 0, 1018, 0, 1017, 3,
55, 0, 0, 0, 44, 41, 43, 46, 47, 48,
49, 50, 53, 13, 0, 0, 0, 895, 544, 431,
- 432, 924, 0, 0, 0, 0, 0, 0, 0, 897,
+ 432, 925, 0, 0, 0, 0, 0, 0, 0, 897,
896, 0, 554, 548, 553, 781, 830, 752, 779, 778,
780, 753, 754, 755, 756, 757, 758, 759, 760, 761,
762, 763, 764, 0, 0, 0, 861, 0, 0, 0,
797, 796, 0, 0, 0, 0, 0, 0, 0, 0,
- 903, 0, 0, 0, 0, 403, 0, 0, 0, 905,
- 910, 0, 0, 0, 546, 925, 0, 0, 0, 795,
+ 903, 0, 0, 0, 0, 403, 0, 0, 0, 906,
+ 0, 0, 0, 0, 546, 926, 0, 0, 0, 795,
791, 0, 0, 0, 0, 0, 0, 0, 371, 0,
0, 0, 0, 0, 0, 0, 0, 670, 0, 565,
663, 0, 561, 0, 0, 563, 559, 573, 567, 574,
@@ -10215,913 +10226,929 @@ void case_1034()
0, 0, 0, 787, 788, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1007, 748,
- 798, 786, 0, 828, 829, 958, 975, 0, 0, 959,
- 961, 0, 987, 944, 942, 968, 0, 0, 966, 969,
- 970, 971, 972, 945, 943, 0, 0, 0, 346, 0,
- 18, 0, 0, 0, 1024, 0, 353, 0, 0, 0,
- 1026, 0, 0, 42, 700, 706, 698, 0, 695, 705,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1008, 748,
+ 798, 786, 0, 828, 829, 959, 976, 0, 0, 960,
+ 962, 0, 988, 945, 943, 969, 0, 0, 967, 970,
+ 971, 972, 973, 946, 944, 0, 0, 0, 346, 0,
+ 18, 0, 0, 0, 1025, 0, 353, 0, 0, 0,
+ 1027, 0, 0, 42, 700, 706, 698, 0, 695, 705,
699, 697, 696, 703, 701, 702, 708, 704, 707, 709,
0, 0, 693, 45, 54, 492, 0, 488, 489, 0,
0, 486, 0, 800, 0, 0, 0, 859, 0, 827,
825, 826, 0, 0, 0, 682, 0, 900, 898, 683,
0, 0, 514, 0, 0, 0, 0, 505, 0, 509,
519, 521, 0, 501, 0, 0, 0, 0, 0, 496,
- 0, 499, 0, 503, 373, 902, 901, 0, 0, 904,
- 914, 0, 0, 0, 915, 0, 0, 927, 0, 0,
- 794, 0, 383, 379, 380, 0, 0, 378, 381, 382,
- 0, 0, 0, 579, 0, 0, 550, 0, 665, 0,
- 746, 0, 0, 0, 740, 742, 743, 744, 435, 436,
- 0, 349, 350, 0, 187, 186, 188, 0, 652, 0,
- 0, 0, 375, 0, 647, 0, 0, 908, 0, 0,
- 0, 440, 0, 443, 0, 0, 441, 0, 0, 483,
- 0, 447, 0, 0, 0, 0, 472, 475, 0, 0,
- 467, 474, 473, 636, 637, 638, 639, 640, 641, 642,
- 643, 644, 646, 645, 583, 580, 585, 582, 584, 581,
- 593, 589, 594, 590, 591, 0, 592, 0, 598, 0,
- 599, 0, 605, 0, 606, 0, 607, 0, 608, 0,
- 612, 0, 613, 0, 616, 0, 619, 0, 622, 0,
- 625, 0, 628, 0, 630, 0, 0, 518, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 957, 956, 0,
- 967, 0, 955, 0, 0, 343, 1022, 1023, 367, 0,
- 0, 0, 364, 0, 0, 184, 0, 0, 1032, 1018,
- 1020, 61, 63, 64, 0, 0, 56, 0, 0, 65,
- 67, 30, 28, 0, 0, 0, 690, 0, 694, 439,
- 0, 491, 0, 543, 0, 556, 173, 195, 0, 0,
- 0, 163, 0, 0, 0, 174, 549, 0, 930, 0,
- 881, 862, 0, 872, 0, 883, 0, 899, 837, 0,
- 929, 0, 0, 504, 0, 520, 522, 0, 0, 0,
- 459, 0, 0, 454, 0, 0, 660, 659, 0, 484,
- 524, 498, 0, 0, 148, 525, 146, 147, 527, 0,
- 542, 541, 840, 0, 919, 0, 912, 0, 916, 533,
- 0, 0, 0, 368, 0, 531, 0, 0, 545, 937,
- 0, 933, 857, 0, 948, 0, 946, 0, 0, 680,
- 681, 0, 0, 0, 658, 657, 664, 0, 745, 731,
- 732, 730, 741, 662, 0, 348, 650, 0, 0, 0,
- 564, 560, 907, 906, 784, 444, 438, 442, 437, 547,
- 482, 481, 480, 477, 476, 0, 471, 433, 434, 445,
- 446, 0, 633, 0, 806, 0, 0, 976, 950, 0,
- 977, 0, 960, 962, 973, 0, 988, 0, 954, 1002,
- 19, 345, 728, 727, 0, 726, 0, 363, 1034, 185,
- 1029, 0, 0, 60, 57, 0, 0, 0, 0, 0,
- 0, 370, 0, 684, 0, 0, 85, 84, 0, 487,
- 0, 0, 0, 0, 0, 178, 555, 0, 0, 0,
- 0, 0, 873, 865, 863, 0, 884, 0, 0, 928,
- 511, 510, 0, 462, 0, 0, 1013, 1014, 450, 456,
- 0, 460, 0, 0, 0, 0, 0, 0, 838, 922,
- 0, 913, 0, 539, 534, 0, 0, 530, 0, 936,
- 0, 856, 949, 947, 0, 551, 0, 666, 656, 351,
- 649, 648, 668, 479, 0, 470, 469, 468, 634, 635,
- 632, 0, 822, 805, 0, 0, 0, 811, 0, 952,
- 0, 981, 0, 0, 996, 997, 990, 0, 366, 365,
- 1033, 0, 0, 66, 59, 0, 68, 29, 22, 0,
- 0, 319, 0, 221, 0, 109, 0, 82, 816, 121,
- 122, 0, 0, 0, 819, 193, 194, 0, 0, 0,
- 0, 166, 175, 167, 169, 860, 0, 0, 0, 0,
- 0, 882, 0, 0, 463, 464, 458, 461, 457, 451,
- 455, 0, 516, 0, 485, 495, 449, 528, 526, 0,
- 918, 0, 0, 0, 535, 0, 939, 0, 0, 679,
- 671, 0, 478, 0, 0, 803, 802, 799, 812, 951,
- 0, 0, 0, 965, 0, 963, 974, 0, 1003, 1021,
- 0, 79, 0, 0, 73, 74, 77, 78, 0, 336,
- 325, 324, 0, 685, 217, 104, 0, 801, 820, 179,
- 0, 191, 0, 0, 0, 858, 941, 0, 0, 0,
- 0, 864, 0, 885, 836, 500, 497, 845, 0, 851,
- 0, 0, 843, 0, 847, 0, 538, 537, 938, 934,
- 0, 669, 0, 0, 953, 978, 0, 964, 0, 0,
- 992, 0, 80, 71, 0, 0, 0, 320, 0, 0,
- 0, 0, 0, 180, 0, 170, 168, 931, 874, 868,
- 866, 0, 0, 839, 844, 0, 848, 923, 0, 0,
- 672, 0, 814, 0, 982, 999, 1000, 993, 58, 0,
- 75, 76, 0, 0, 0, 0, 0, 0, 0, 821,
- 177, 0, 190, 0, 0, 886, 850, 849, 736, 921,
- 935, 823, 0, 0, 0, 81, 0, 0, 337, 0,
- 0, 335, 321, 0, 329, 386, 0, 384, 0, 686,
- 0, 715, 218, 105, 181, 932, 870, 867, 0, 0,
- 879, 0, 979, 0, 994, 0, 0, 0, 317, 0,
- 0, 712, 0, 0, 0, 716, 0, 0, 0, 0,
- 0, 983, 27, 26, 23, 338, 334, 0, 0, 330,
- 385, 718, 0, 0, 0, 106, 869, 737, 0, 0,
- 0, 0, 32, 322, 723, 0, 724, 721, 0, 719,
- 102, 0, 99, 0, 0, 88, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 100, 101, 149, 0, 0,
- 234, 226, 227, 228, 229, 230, 231, 232, 233, 0,
- 0, 224, 0, 0, 980, 0, 339, 333, 0, 0,
- 0, 687, 89, 0, 733, 735, 277, 272, 276, 0,
- 219, 225, 0, 986, 984, 722, 720, 0, 0, 0,
- 0, 0, 0, 0, 286, 0, 0, 235, 0, 0,
- 243, 0, 161, 150, 160, 0, 0, 0, 107, 0,
- 0, 271, 0, 0, 270, 0, 154, 0, 0, 357,
- 318, 0, 355, 0, 0, 196, 0, 0, 0, 0,
- 0, 688, 0, 220, 0, 112, 110, 293, 0, 354,
- 0, 0, 0, 0, 125, 0, 0, 0, 0, 0,
- 0, 159, 151, 0, 0, 200, 0, 358, 0, 238,
- 237, 236, 0, 734, 108, 0, 290, 0, 268, 127,
- 0, 266, 0, 0, 0, 129, 0, 359, 0, 0,
- 197, 0, 0, 0, 356, 241, 120, 118, 0, 0,
- 295, 0, 0, 0, 0, 0, 155, 0, 274, 0,
- 0, 0, 0, 133, 0, 0, 0, 0, 360, 361,
- 0, 0, 0, 0, 0, 115, 310, 0, 291, 0,
- 0, 304, 0, 0, 0, 299, 0, 145, 0, 0,
- 0, 0, 140, 0, 0, 287, 0, 130, 0, 124,
- 134, 152, 158, 208, 0, 198, 0, 0, 201, 0,
- 119, 0, 111, 116, 0, 0, 0, 306, 0, 307,
- 296, 0, 0, 289, 300, 269, 0, 0, 126, 141,
- 267, 0, 285, 0, 275, 279, 136, 0, 0, 0,
- 205, 207, 0, 242, 117, 311, 313, 292, 0, 0,
- 305, 302, 144, 142, 156, 284, 0, 0, 0, 153,
- 209, 211, 199, 0, 0, 0, 304, 0, 280, 282,
- 137, 0, 0, 202, 315, 316, 312, 314, 303, 157,
- 0, 0, 215, 214, 213, 210, 212, 0, 0, 0,
- 203, 281, 283,
+ 0, 499, 0, 503, 373, 902, 901, 0, 0, 905,
+ 904, 915, 0, 0, 0, 916, 0, 0, 928, 0,
+ 0, 794, 0, 383, 379, 380, 0, 0, 378, 381,
+ 382, 0, 0, 0, 579, 0, 0, 550, 0, 665,
+ 0, 746, 0, 0, 0, 740, 742, 743, 744, 435,
+ 436, 0, 349, 350, 0, 187, 186, 188, 0, 652,
+ 0, 0, 0, 375, 0, 647, 0, 0, 909, 0,
+ 0, 0, 440, 0, 443, 0, 0, 441, 0, 0,
+ 483, 0, 447, 0, 0, 0, 0, 472, 475, 0,
+ 0, 467, 474, 473, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 646, 645, 583, 580, 585, 582, 584,
+ 581, 593, 589, 594, 590, 591, 0, 592, 0, 598,
+ 0, 599, 0, 605, 0, 606, 0, 607, 0, 608,
+ 0, 612, 0, 613, 0, 616, 0, 619, 0, 622,
+ 0, 625, 0, 628, 0, 630, 0, 0, 518, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 958, 957,
+ 0, 968, 0, 956, 0, 0, 343, 1023, 1024, 367,
+ 0, 0, 0, 364, 0, 0, 184, 0, 0, 1033,
+ 1019, 1021, 61, 63, 64, 0, 0, 56, 0, 0,
+ 65, 67, 30, 28, 0, 0, 0, 690, 0, 694,
+ 439, 0, 491, 0, 543, 0, 556, 173, 195, 0,
+ 0, 0, 163, 0, 0, 0, 174, 549, 0, 931,
+ 0, 881, 862, 0, 872, 0, 883, 0, 899, 837,
+ 0, 930, 0, 0, 504, 0, 520, 522, 0, 0,
+ 0, 459, 0, 0, 454, 0, 0, 660, 659, 484,
+ 0, 524, 498, 0, 0, 148, 525, 146, 147, 527,
+ 0, 542, 541, 840, 0, 920, 0, 913, 0, 917,
+ 533, 0, 0, 0, 368, 0, 531, 0, 0, 545,
+ 938, 0, 934, 857, 0, 949, 0, 947, 0, 0,
+ 680, 681, 0, 0, 0, 658, 657, 664, 0, 745,
+ 731, 732, 730, 741, 662, 0, 348, 650, 0, 0,
+ 0, 564, 560, 908, 907, 784, 444, 438, 442, 437,
+ 547, 482, 481, 480, 477, 476, 0, 471, 433, 434,
+ 445, 446, 0, 633, 0, 806, 0, 0, 977, 951,
+ 0, 978, 0, 961, 963, 974, 0, 989, 0, 955,
+ 1003, 19, 345, 728, 727, 0, 726, 0, 363, 1035,
+ 185, 1030, 0, 0, 60, 57, 0, 0, 0, 0,
+ 0, 0, 370, 0, 684, 0, 0, 85, 84, 0,
+ 487, 0, 0, 0, 0, 0, 178, 555, 0, 0,
+ 0, 0, 0, 873, 865, 863, 0, 884, 0, 0,
+ 929, 511, 510, 0, 462, 0, 0, 1014, 1015, 450,
+ 456, 0, 460, 0, 0, 0, 0, 0, 0, 838,
+ 923, 0, 914, 0, 539, 534, 0, 0, 530, 0,
+ 937, 0, 856, 950, 948, 0, 551, 0, 666, 656,
+ 351, 649, 648, 668, 479, 0, 470, 469, 468, 634,
+ 635, 632, 0, 822, 805, 0, 0, 0, 811, 0,
+ 953, 0, 982, 0, 0, 997, 998, 991, 0, 366,
+ 365, 1034, 0, 0, 66, 59, 0, 68, 29, 22,
+ 0, 0, 319, 0, 221, 0, 109, 0, 82, 816,
+ 121, 122, 0, 0, 0, 819, 193, 194, 0, 0,
+ 0, 0, 166, 175, 167, 169, 860, 0, 0, 0,
+ 0, 0, 882, 0, 0, 463, 464, 458, 461, 457,
+ 451, 455, 0, 516, 0, 485, 495, 449, 528, 526,
+ 0, 919, 0, 0, 0, 535, 0, 940, 0, 0,
+ 679, 671, 0, 478, 0, 0, 803, 802, 799, 812,
+ 952, 0, 0, 0, 966, 0, 964, 975, 0, 1004,
+ 1022, 0, 79, 0, 0, 73, 74, 77, 78, 0,
+ 336, 325, 324, 0, 685, 217, 104, 0, 801, 820,
+ 179, 0, 191, 0, 0, 0, 858, 942, 0, 0,
+ 0, 0, 864, 0, 885, 836, 500, 497, 845, 0,
+ 851, 0, 0, 843, 0, 847, 0, 538, 537, 939,
+ 935, 0, 669, 0, 0, 954, 979, 0, 965, 0,
+ 0, 993, 0, 80, 71, 0, 0, 0, 320, 0,
+ 0, 0, 0, 0, 180, 0, 170, 168, 932, 874,
+ 868, 866, 0, 0, 839, 844, 0, 848, 924, 0,
+ 0, 672, 0, 814, 0, 983, 1000, 1001, 994, 58,
+ 0, 75, 76, 0, 0, 0, 0, 0, 0, 0,
+ 821, 177, 0, 190, 0, 0, 886, 850, 849, 736,
+ 922, 936, 823, 0, 0, 0, 81, 0, 0, 337,
+ 0, 0, 335, 321, 0, 329, 386, 0, 384, 0,
+ 686, 0, 715, 218, 105, 181, 933, 870, 867, 0,
+ 0, 879, 0, 980, 0, 995, 0, 0, 0, 317,
+ 0, 0, 712, 0, 0, 0, 716, 0, 0, 0,
+ 0, 0, 984, 27, 26, 23, 338, 334, 0, 0,
+ 330, 385, 718, 0, 0, 0, 106, 869, 737, 0,
+ 0, 0, 0, 32, 322, 723, 0, 724, 721, 0,
+ 719, 102, 0, 99, 0, 0, 88, 90, 91, 92,
+ 93, 94, 95, 96, 97, 98, 100, 101, 149, 0,
+ 0, 234, 226, 227, 228, 229, 230, 231, 232, 233,
+ 0, 0, 224, 0, 0, 981, 0, 339, 333, 0,
+ 0, 0, 687, 89, 0, 733, 735, 277, 272, 276,
+ 0, 219, 225, 0, 987, 985, 722, 720, 0, 0,
+ 0, 0, 0, 0, 0, 286, 0, 0, 235, 0,
+ 0, 243, 0, 161, 150, 160, 0, 0, 0, 107,
+ 0, 0, 271, 0, 0, 270, 0, 154, 0, 0,
+ 357, 318, 0, 355, 0, 0, 196, 0, 0, 0,
+ 0, 0, 688, 0, 220, 0, 112, 110, 293, 0,
+ 354, 0, 0, 0, 0, 125, 0, 0, 0, 0,
+ 0, 0, 159, 151, 0, 0, 200, 0, 358, 0,
+ 238, 237, 236, 0, 734, 108, 0, 290, 0, 268,
+ 127, 0, 266, 0, 0, 0, 129, 0, 359, 0,
+ 0, 197, 0, 0, 0, 356, 241, 120, 118, 0,
+ 0, 295, 0, 0, 0, 0, 0, 155, 0, 274,
+ 0, 0, 0, 0, 133, 0, 0, 0, 0, 360,
+ 361, 0, 0, 0, 0, 0, 115, 310, 0, 291,
+ 0, 0, 304, 0, 0, 0, 299, 0, 145, 0,
+ 0, 0, 0, 140, 0, 0, 287, 0, 130, 0,
+ 124, 134, 152, 158, 208, 0, 198, 0, 0, 201,
+ 0, 119, 0, 111, 116, 0, 0, 0, 306, 0,
+ 307, 296, 0, 0, 289, 300, 269, 0, 0, 126,
+ 141, 267, 0, 285, 0, 275, 279, 136, 0, 0,
+ 0, 205, 207, 0, 242, 117, 311, 313, 292, 0,
+ 0, 305, 302, 144, 142, 156, 284, 0, 0, 0,
+ 153, 209, 211, 199, 0, 0, 0, 304, 0, 280,
+ 282, 137, 0, 0, 202, 315, 316, 312, 314, 303,
+ 157, 0, 0, 215, 214, 213, 210, 212, 0, 0,
+ 0, 203, 281, 283,
};
protected static readonly short [] yyDgoto = { 7,
- 8, 49, 9, 50, 10, 11, 51, 232, 739, 701,
- 12, 13, 52, 22, 23, 326, 235, 724, 900, 1099,
- 1218, 1265, 1575, 897, 236, 237, 238, 239, 240, 241,
- 242, 243, 717, 462, 718, 719, 1003, 720, 721, 1007,
- 898, 1094, 1095, 1096, 267, 618, 1190, 110, 909, 1294,
+ 8, 49, 9, 50, 10, 11, 51, 232, 740, 702,
+ 12, 13, 52, 22, 23, 326, 235, 725, 901, 1100,
+ 1219, 1266, 1576, 898, 236, 237, 238, 239, 240, 241,
+ 242, 243, 718, 462, 719, 720, 1004, 721, 722, 1008,
+ 899, 1095, 1096, 1097, 267, 619, 1191, 110, 910, 780,
1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304,
- 1305, 1306, 1307, 481, 728, 1383, 1017, 1197, 1161, 1230,
- 1258, 1323, 1395, 1226, 1449, 1426, 1474, 1475, 1476, 1019,
- 1472, 1020, 788, 901, 1437, 1410, 1462, 534, 1455, 1431,
- 1491, 983, 1460, 1463, 1464, 1559, 1492, 1493, 1489, 1308,
- 1364, 1334, 1384, 741, 1439, 1538, 1407, 1495, 1568, 482,
- 268, 742, 743, 744, 745, 746, 704, 591, 1202, 705,
- 706, 915, 1386, 1415, 1506, 1467, 1540, 1387, 1442, 1543,
- 1588, 1507, 1508, 1586, 1572, 1573, 1015, 1160, 1257, 1320,
- 1368, 1321, 1322, 1358, 1422, 1390, 1359, 329, 223, 1471,
- 1361, 1456, 1453, 1309, 1338, 1379, 1535, 1497, 1339, 1536,
- 619, 1581, 1582, 1378, 1452, 1428, 1484, 1479, 1450, 1516,
- 1521, 1482, 1485, 1486, 1567, 1522, 1480, 1481, 1577, 1565,
- 1566, 1012, 1103, 1223, 1195, 1250, 1224, 1225, 1268, 1157,
- 1247, 1281, 554, 193, 112, 366, 195, 584, 457, 224,
- 1402, 702, 703, 885, 902, 330, 422, 553, 305, 1227,
- 1228, 45, 114, 306, 116, 117, 118, 119, 120, 121,
- 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
- 132, 133, 134, 135, 136, 253, 860, 784, 1056, 1046,
- 772, 939, 773, 774, 1047, 137, 198, 779, 621, 622,
- 623, 854, 491, 780, 492, 298, 1054, 782, 423, 300,
- 517, 518, 519, 520, 523, 790, 314, 807, 808, 955,
- 264, 497, 822, 265, 496, 138, 139, 140, 141, 142,
+ 1305, 1306, 1307, 1308, 481, 729, 1384, 1018, 1198, 1162,
+ 1231, 1259, 1324, 1396, 1227, 1450, 1427, 1475, 1476, 1477,
+ 1020, 1473, 1021, 789, 902, 1438, 1411, 1463, 534, 1456,
+ 1432, 1492, 984, 1461, 1464, 1465, 1560, 1493, 1494, 1490,
+ 1309, 1365, 1335, 1385, 742, 1440, 1539, 1408, 1496, 1569,
+ 482, 268, 743, 744, 745, 746, 747, 705, 592, 1203,
+ 706, 707, 916, 1387, 1416, 1507, 1468, 1541, 1388, 1443,
+ 1544, 1589, 1508, 1509, 1587, 1573, 1574, 1016, 1161, 1258,
+ 1321, 1369, 1322, 1323, 1359, 1423, 1391, 1360, 329, 223,
+ 1472, 1362, 1457, 1454, 1310, 1339, 1380, 1536, 1498, 1340,
+ 1537, 620, 1582, 1583, 1379, 1453, 1429, 1485, 1480, 1451,
+ 1517, 1522, 1483, 1486, 1487, 1568, 1523, 1481, 1482, 1578,
+ 1566, 1567, 1013, 1104, 1224, 1196, 1251, 1225, 1226, 1269,
+ 1158, 1248, 1282, 555, 193, 112, 366, 195, 585, 457,
+ 224, 1403, 703, 704, 886, 903, 330, 422, 554, 305,
+ 1228, 1229, 45, 114, 306, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 253, 861, 785, 1057,
+ 1047, 773, 940, 774, 775, 1048, 137, 198, 781, 622,
+ 623, 624, 855, 491, 492, 298, 1055, 783, 423, 300,
+ 517, 518, 519, 520, 523, 791, 314, 808, 809, 956,
+ 264, 497, 823, 265, 496, 138, 139, 140, 141, 142,
143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
- 594, 595, 596, 827, 828, 153, 581, 570, 824, 367,
- 1072, 568, 1141, 154, 511, 1013, 1159, 1255, 1362, 483,
- 1231, 1232, 1289, 1290, 886, 573, 344, 832, 1366, 1210,
- 1242, 574, 575, 269, 270, 271, 157, 158, 159, 272,
+ 595, 596, 597, 828, 829, 153, 582, 571, 825, 367,
+ 1073, 569, 1142, 154, 511, 1014, 1160, 1256, 1363, 483,
+ 1232, 1233, 1290, 1291, 887, 574, 344, 833, 1367, 1211,
+ 1243, 575, 576, 269, 270, 271, 157, 158, 159, 272,
273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
- 283, 171, 284, 601, 172, 173, 322, 867, 677, 986,
- 1078, 912, 735, 1023, 984, 987, 1119, 988, 1024, 1025,
- 285, 174, 175, 176, 1131, 1060, 1132, 1133, 1134, 1135,
- 177, 178, 179, 180, 752, 504, 753, 1122, 1041, 1123,
- 1238, 1205, 1239, 754, 1040, 755, 1241, 1172, 181, 182,
- 183, 184, 185, 186, 307, 544, 545, 1062, 1179, 318,
- 1039, 922, 1204, 1069, 961, 1180, 187, 435, 188, 436,
- 989, 1081, 437, 438, 693, 684, 685, 1086, 993, 439,
- 440, 441, 442, 443, 994, 679, 991, 1184, 1261, 1325,
- 1083, 1214, 1280, 877, 687, 878, 1150, 1088, 1151, 1215,
- 998, 17, 19, 46, 47, 227, 707, 893, 458, 708,
- 709,
+ 283, 171, 284, 602, 172, 173, 322, 868, 678, 987,
+ 1079, 913, 736, 1024, 985, 988, 1120, 989, 1025, 1026,
+ 285, 174, 175, 176, 1132, 1061, 1133, 1134, 1135, 1136,
+ 177, 178, 179, 180, 753, 504, 754, 1123, 1042, 1124,
+ 1239, 1206, 1240, 755, 1041, 756, 1242, 1173, 181, 182,
+ 183, 184, 185, 186, 307, 545, 546, 1063, 1180, 318,
+ 1040, 923, 1205, 1070, 962, 1181, 187, 435, 188, 436,
+ 990, 1082, 437, 438, 694, 685, 686, 1087, 994, 439,
+ 440, 441, 442, 443, 995, 680, 992, 1185, 1262, 1326,
+ 1084, 1215, 1281, 878, 688, 879, 1151, 1089, 1152, 1216,
+ 999, 17, 19, 46, 47, 227, 708, 894, 458, 709,
+ 710,
};
- protected static readonly short [] yySindex = { -69,
- 0, -197, 55, -20, 16, 1599, 0, 135, 0, 0,
- 16, -20, 0, 0, 129, 0, 6984, 16, 0, -180,
- -262, 0, 0, 0, 0, 0, 0, 0, 101, 0,
- 296, 0, 0, 0, 999, 0, 0, 0, 0, 0,
- 0, 0, 0, 572, 0, 0, 662, 0, 0, 135,
- 48, 16, 0, 230, 0, 242, 251, -174,16437, -162,
- 278, 313, 7141, 0, 278, 278, 278, -171, 278, 278,
- -42, 0, 8985, 278, 278, 0, 9142, 0, 374, 0,
- -156, 0, 278, 365, 278, 0,16981,16981, 412, 278,
- 278, 17,10058, 0,15540, 0,10189,10320,10451,10582,
-10713,10844,10975,11106, 0, 336, 0, 7943, 0, 174,
- 0, 218, -244, 939, -247, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1167, 861,
- 208, 705, 664, 897, 420, 428, 442, 437, 451, 492,
- 0, 0, 0, 0, 0, 0, 3497, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 218, 557, 219, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 226, 362, 48, 0,
- 540, 706, 0, 535, 0, 0, 0, 0, 7943, 7943,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 604, 568, 0, 573, 0, -5, 0, 0,
- 0, 48,17517, 859, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 742, 218,15676, 0, 0, 0,
- 0, 0,15540, -163, -153, 736, -282, 939, 218, 0,
- 0, 7943, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -191, -252,16437, 0, 7943,15540, 672,
- 0, 0, 714,15540,15540,13857, 741, -165, 762, 8100,
- 0,10058, 336, 886, 788, 0, 807, 7943,15540, 0,
- 0, 817, 656, 278, 0, 0,15540, 374,15132, 0,
- 0, 365,15540, 365, 82, 467, 877, 218, 0, 557,
- -247, 906, 218,15540,15540,15540, 313, 0, 881, 0,
- 0,11237, 0, 7298, -277, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 3903, 0, 0,16834, 82, 860, 863,
-15540, 0, 821, 0, 139, 0, 0, 146, 0, 0,
- 834, 9299, 7612, 0, 0,15540,15540,15540,15540,15540,
-15540,15540,15540,15540,15540,15540,11368,11499,11630, 4062,
- 4380,11761,11892,12023,12154,12285,12416,12547,12678,12809,
-12940,13071,13202,13333,13464,13595,16220,15540, 0, 0,
- 0, 0, 557, 0, 0, 0, 0,16981,16981, 0,
- 0, 218, 0, 0, 0, 0, 384, 889, 0, 0,
- 0, 0, 0, 0, 0, 48, 859, 837, 0, 855,
- 0, 821, 604, 604, 0, -53, 0, 590, 604, 891,
- 0, -195,17517, 0, 0, 0, 0, -150, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 261,17547, 0, 0, 0, 0, 821, 0, 0, 901,
- 751, 0, 907, 0, 911, 222, 374, 0, 278, 0,
- 0, 0, 218,15132, -179, 0, 940, 0, 0, 0,
- 54, 103, 0, -282, 944, 0, 919, 0, 947, 0,
- 0, 0, 760, 0, 8355, 766, 9456, 762,14996, 0,
- 7769, 0, 365, 0, 0, 0, 0, 143, 147, 0,
- 0, 293, 374, 649, 0, 828, 986, 0, 148, 218,
- 0, 151, 0, 0, 0,15540, 1053, 0, 0, 0,
-15540, 1072, 994, 0, 998, 1018, 0,16834, 0, 75,
- 0, -172, 43, 7298, 0, 0, 0, 0, 0, 0,
- 75, 0, 0, -272, 0, 0, 0, 365, 0, 82,
- 218, 8531, 0, 1029, 0, 1033,13726, 0, 1150, 1031,
- 7298, 0, 980, 0, 821, 984, 0, 821, 821, 0,
- 137, 0,15540,15540, 1040, 1157, 0, 0, 108, -78,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 861, 0, 861, 0, 208,
- 0, 208, 0, 705, 0, 705, 0, 705, 0, 705,
- 0, 664, 0, 664, 0, 897, 0, 420, 0, 428,
- 0, 442, 0, 437, 0, 68, -141, 0, 9456, 1122,
- 218, 1123, 218, 9456, 9456, 1038,15540, 0, 0, 889,
- 0, 218, 0, 780, 821, 0, 0, 0, 0, 630,
- 48, 306, 0, 8531, 590, 0, 1048, 1047, 0, 0,
- 0, 0, 0, 0, -80, 1049, 0, 1050, 1054, 0,
- 0, 0, 0, 1051, 8688, 1005, 0, 466, 0, 0,
- 737, 0,15676, 0, 1046, 0, 0, 0, 686, 107,
- 1057, 0, 1056, 1058, 1061, 0, 0,15540, 0, 218,
- 0, 0, 309, 0, 1062, 0, 469, 0, 0, 7141,
- 0, 7141, 8514, 0,13857, 0, 0, 9927, 8671, 329,
- 0, 175, 91, 0, 1002, 1014, 0, 0, 800, 0,
- 0, 0, 1069, 1068, 0, 0, 0, 0, 0, 1070,
- 0, 0, 0, 1079, 0, 4539, 0, 374, 0, 0,
- 365, 560, 1028, 0, 281, 0, 1078, 1080, 0, 0,
- 7141, 0, 0, 7141, 0,15540, 0,15540, 7943, 0,
- 0, 374, 1082, 75, 0, 0, 0,15540, 0, 0,
- 0, 0, 0, 0, 7943, 0, 0, 218,16834, 1108,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,14860, 0, 0, 0, 0,
- 0, 7926, 0, 8828, 0, 8083, 1084, 0, 0, 1158,
- 0, 1162, 0, 0, 0, 946, 0, 1085, 0, 0,
- 0, 0, 0, 0, 1042, 0, -53, 0, 0, 0,
- 0, 590, 590, 0, 0, 837, 1092, 1093, 1045, 1098,
- 1005, 0, 1094, 0, 1212, 1214, 0, 0,15540, 0,
-15268, 1097, 686, 8531, 7943, 0, 0, 152, 1217, 1218,
- 154, 1095, 0, 0, 0,15540, 0,15540, 1195, 0,
- 0, 0,15404, 0, 635,15404, 0, 0, 0, 0,
- 8219, 0, 1221, 557, 9456, 1111, 8514, 1112, 0, 0,
- 218, 0, 308, 0, 0, 821, 1028, 0, 218, 0,
- -121, 0, 0, 0, 1107, 0, 1139, 0, 0, 0,
- 0, 0, 0, 0, 682, 0, 0, 0, 0, 0,
- 0, 8100, 0, 0, 218, -246, 1084, 0, 9456, 0,
- 9456, 0, 90, 9456, 0, 0, 0, 728, 0, 0,
- 0, 1113, 837, 0, 0, 9613, 0, 0, 0, 1114,
- 4704, 0, 1005, 0, 1005, 0, 1005, 0, 0, 0,
- 0, 218, 1110, 1097, 0, 0, 0, -167, -145, 1115,
- 1116, 0, 0, 0, 0, 0, 1117, 8514, 1084, -141,
-15540, 0, 1125, 7141, 0, 0, 0, 0, 0, 0,
- 0, 1118, 0, 762, 0, 0, 0, 0, 0, -189,
- 0, 1126, 821, 1028, 0, 1028, 0, 1084, 1128, 0,
- 0, 75, 0, 1064, 1103, 0, 0, 0, 0, 0,
- 9456, 1147, 9456, 0, 9456, 0, 0,15540, 0, 0,
- 1054, 0, 406, 691, 0, 0, 0, 0, -20, 0,
- 0, 0, 1135, 0, 0, 0, 1132, 0, 0, 0,
- 519, 0, 1133, 1239, 1247, 0, 0, 1084, 1134, 1084,
- 1143, 0, 1140, 0, 0, 0, 0, 0,15540, 0,
- 1149, -217, 0, 6825, 0, 1263, 0, 0, 0, 0,
- 75, 0,15540, 8083, 0, 0, 1174, 0, 975, 1148,
- 0, 1155, 0, 0, 9613, 16, 222, 0, 1151, 1151,
- 1151,15268, 1159, 0,15540, 0, 0, 0, 0, 0,
- 0, 7141, 77, 0, 0, 7298, 0, 0, 1160, 7141,
- 0, 1161, 0, 9456, 0, 0, 0, 0, 0,15540,
- 0, 0, 48, 1166, 48, 7943, 1191, 1191, 1191, 0,
- 0,15540, 0, 7141, 9770, 0, 0, 0, 0, 0,
- 0, 0, 1185, 9456,15540, 0, 48, 1172, 0, 1127,
- 977, 0, 0, 1169, 0, 0, 112, 0, 1131, 0,
- 1191, 0, 0, 0, 0, 0, 0, 0, 1178, 1062,
- 0, 7298, 0, 1193, 0, -160, 1191, 1288, 0, 1184,
- 48, 0, 7943, 88, 1186, 0, 1187, 1190, 7141, 1192,
- 9456, 0, 0, 0, 0, 0, 0, 1177, 1183, 0,
- 0, 0,16516, 162, 48, 0, 0, 0, 1210, 9456,
- 1203,15540, 0, 0, 0, 1209, 0, 0, 1207, 0,
- 0,17547, 0, 1215, 162, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 588,17547,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1216,
- 48, 0, 162, 218, 0, 1210, 0, 0, 1189,16516,
-16682, 0, 0, -240, 0, 0, 0, 0, 0,16714,
- 0, 0, 1219, 0, 0, 0, 0, 7943, 7943, 368,
- 8100, 449, 365, 1245, 0, 82,14714, 0, 1280, 0,
- 0, 1183, 0, 0, 0, 7298,14752, 1183, 0, -139,
- -138, 0, 7943, -128, 0, 7943, 0, 1168, 1220, 0,
- 0, 82, 0, 49,14790, 0, 1223, 1170, 72, 574,
- 999, 0, 1222, 0, 1183, 0, 0, 0, 82, 0,
- 1226, 1171, 1224, 1225, 0, 1227, 1176, 1234, 222, 1242,
- 1233, 0, 0, 1254, 1229, 0, 821, 0, 934, 0,
- 0, 0, 1256, 0, 0, -77, 0, 1243, 0, 0,
- 1228, 0, 1257, 1259, 1260, 0, 1255, 0, 222, 222,
- 0, 222, 1261, 1262, 0, 0, 0, 0, 1264, 166,
- 0, 1266, 222, 1377, 1268, 222, 0, -240, 0, 8514,
- 1230, 1267, 1255, 0, 1265, 1272, 199, 1275, 0, 0,
- 222,15268, 1231, 1271, 1264, 0, 0,17547, 0, 48,
- 48, 0, 1236, 1276, 1266, 0, 1279, 0,15540, 1237,
- 1281, 1268, 0, 1284, 222, 0, 89, 0, 1277, 0,
- 0, 0, 0, 0,17547, 0, 199, 199, 0, 1287,
- 0, -77, 0, 0, 221, 1292,17547, 0,17547, 0,
- 0, 8514, 1282, 0, 0, 0, 1291, 1228, 0, 0,
- 0, 1290, 0, 338, 0, 0, 0, 1191, 988, 1296,
- 0, 0, 1269, 0, 0, 0, 0, 0, 1353, 1406,
- 0, 0, 0, 0, 0, 0, 1301, 1302, 8514, 0,
- 0, 0, 0, 199, 611, 611, 0, 1191, 0, 0,
- 0, 58, 58, 0, 0, 0, 0, 0, 0, 0,
-14996,14996, 0, 0, 0, 0, 0, 1306, 1303, 1305,
- 0, 0, 0,
+ protected static readonly short [] yySindex = { -100,
+ 0, -179, -141, -43, 33,17069, 0, 162, 0, 0,
+ 33, -43, 0, 0, 19, 0, 7076, 33, 0, -164,
+ 63, 0, 0, 0, 0, 0, 0, 0, 180, 0,
+ 191, 0, 0, 0, 3956, 0, 0, 0, 0, 0,
+ 0, 0, 0, 700, 0, 0, 726, 0, 0, 162,
+ 224, 33, 0, 184, 0, 333, 251, -183,16498, -63,
+ -266, 288, 7233, 0, -266, -266, -266, -185, -266, -266,
+ 757, 0, 9077, -266, -266, 0, 9234, 0, 319, 0,
+ -163, 0, -266, 420, -266, 0,17088,17088, 450, -266,
+ -266, 17,10307, 0,15737, 0,10438,10569,10700,10831,
+10962,11093,11224,11355, 0, 151, 0, 8035, 0, 205,
+ 0, 123, 434, 437, 337, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1080, 795,
+ 227, -258, 588, 389, 460, 478, 504, 523, -274, 564,
+ 0, 0, 0, 0, 0, 0, 3657, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 123, 612, -286, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 225, 272, 224, 0,
+ 445, 219, 0, 608, 0, 0, 0, 0, 8035, 8035,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 635, 596, 0, 617, 0, -236, 0, 0,
+ 0, 224, 1481, 487, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 790, 123,15873, 0, 0, 0,
+ 0, 0,15737, -197, -161, 778, 370, 437, 123, 0,
+ 0, 8035, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -180, 215,16498, 0, 8035,15737, 692,
+ 0, 0, 703,15737,15737,14106, 677, -201, 718, 8192,
+ 0,10307, 151, 835, 721, 0, 739, 8035,15737, 0,
+ 882, 769, 536, -266, 0, 0,15737, 319,15329, 0,
+ 0, 420,15737, 420, -276, 530, 863, 123, 0, 612,
+ 337, 868, 123,15737,15737,15737, 288, 0, 841, 0,
+ 0,11486, 0, 7390, -264, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1406, 0, 0,16895, -276, 817, 816,
+15737, 0, 783, 0, 181, 0, 0, 254, 0, 0,
+ 784, 9391, 7704, 0, 0,15737,15737,15737,15737,15737,
+15737,15737,15737,15737,15737,15737,11617,11748,11879, 4222,
+ 4540,12010,12141,12272,12403,12534,12665,12796,12927,13058,
+13189,13320,13451,13582,13713,13844,16281,15737, 0, 0,
+ 0, 0, 612, 0, 0, 0, 0,17088,17088, 0,
+ 0, 123, 0, 0, 0, 0, 489, 856, 0, 0,
+ 0, 0, 0, 0, 0, 224, 487, 823, 0, 826,
+ 0, 783, 635, 635, 0, 129, 0, 539, 635, 881,
+ 0, -111, 1481, 0, 0, 0, 0, -158, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 289,17624, 0, 0, 0, 0, 783, 0, 0, 840,
+ 732, 0, 885, 0, 896, 198, 319, 0, -266, 0,
+ 0, 0, 123,15329, -176, 0, 878, 0, 0, 0,
+ 53, 100, 0, 370, 894, 0, 910, 0, 906, 0,
+ 0, 0, 742, 0, 8447, 744, 9548, 718,15193, 0,
+ 7861, 0, 420, 0, 0, 0, 0, 106, 125, 0,
+ 0, 0, 214, 319, 499, 0, 1129, 915, 0, 143,
+ 123, 0, 146, 0, 0, 0,15737, 988, 0, 0,
+ 0,15737, 994, 916, 0, 917, 919, 0,16895, 0,
+ 84, 0, -125, 127, 7390, 0, 0, 0, 0, 0,
+ 0, 84, 0, 0, -267, 0, 0, 0, 420, 0,
+ -276, 123, 8623, 0, 918, 0, 921,13975, 0, 1038,
+ 920, 7390, 0, 869, 0, 783, 875, 0, 783, 783,
+ 0, -168, 0,15737,15737, 928, 1046, 0, 0, 201,
+ -131, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 795, 0, 795, 0,
+ 227, 0, 227, 0, -258, 0, -258, 0, -258, 0,
+ -258, 0, 588, 0, 588, 0, 389, 0, 460, 0,
+ 478, 0, 504, 0, 523, 0, 54, -155, 0, 9548,
+ 1014, 123, 1017, 123, 9548, 9548, 931,15737, 0, 0,
+ 856, 0, 123, 0, 534, 783, 0, 0, 0, 0,
+ 223, 224, 322, 0, 8623, 539, 0, 941, 940, 0,
+ 0, 0, 0, 0, 0, -98, 942, 0, 945, 943,
+ 0, 0, 0, 0, 948, 8780, 898, 0, -162, 0,
+ 0, 631, 0,15873, 0, 949, 0, 0, 0, 577,
+ 131, 950, 0, 952, 958, 969, 0, 0,15737, 0,
+ 123, 0, 0, 764, 0, 971, 0, 372, 0, 0,
+ 7233, 0, 7233, 8606, 0,14106, 0, 0,10176, 8763,
+ 271, 0, 134, 102, 0, 895, 923, 0, 0, 0,
+ 767, 0, 0, 975, 976, 0, 0, 0, 0, 0,
+ 978, 0, 0, 0, 982, 0, 4699, 0, 319, 0,
+ 0, 420, 562, 932, 0, 150, 0, 983, 984, 0,
+ 0, 7233, 0, 0, 7233, 0,15737, 0,15737, 8035,
+ 0, 0, 319, 986, 84, 0, 0, 0,15737, 0,
+ 0, 0, 0, 0, 0, 8035, 0, 0, 123,16895,
+ 1020, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,15057, 0, 0, 0,
+ 0, 0, 8018, 0, 8920, 0, 8175, 992, 0, 0,
+ 1066, 0, 1073, 0, 0, 0, 797, 0, 996, 0,
+ 0, 0, 0, 0, 0, 953, 0, 129, 0, 0,
+ 0, 0, 539, 539, 0, 0, 823, 998, 1002, 956,
+ 1008, 898, 0, 1001, 0, 1121, 1122, 0, 0, 9548,
+ 0,15465, 1005, 577, 8623, 8035, 0, 0, -227, 1124,
+ 1126, 164, 1003, 0, 0, 0,15737, 0,15737, 1103,
+ 0, 0, 0,15601, 0, 451,15601, 0, 0, 0,
+ 0, 8311, 0, 1131, 612, 9548, 1021, 8606, 1022, 0,
+ 0, 123, 0, 266, 0, 0, 783, 932, 0, 123,
+ 0, 82, 0, 0, 0, 1019, 0, 1049, 0, 0,
+ 0, 0, 0, 0, 0, 801, 0, 0, 0, 0,
+ 0, 0, 8192, 0, 0, 123, 486, 992, 0, 9548,
+ 0, 9548, 0, 165, 9548, 0, 0, 0, 743, 0,
+ 0, 0, 1025, 823, 0, 0, 9705, 0, 0, 0,
+ 1018, 4864, 0, 898, 0, 898, 0, 898, 0, 0,
+ 0, 0, 123, 1024, 1005, 0, 0, 0, -174, -147,
+ 1023, 1027, 0, 0, 0, 0, 0, 1030, 8606, 992,
+ -155,15737, 0, 1026, 7233, 0, 0, 0, 0, 0,
+ 0, 0, 1041, 0, 718, 0, 0, 0, 0, 0,
+ -184, 0, 1040, 783, 932, 0, 932, 0, 992, 1042,
+ 0, 0, 84, 0, 990, 1037, 0, 0, 0, 0,
+ 0, 9548, 1074, 9548, 0, 9548, 0, 0,15737, 0,
+ 0, 943, 0, 302, 813, 0, 0, 0, 0, -43,
+ 0, 0, 0, 1053, 0, 0, 0, 1044, 0, 0,
+ 0, 383, 0, 1045, 1166, 1167, 0, 0, 992, 1056,
+ 992, 1058, 0, 1059, 0, 0, 0, 0, 0,15737,
+ 0, 1064, -138, 0, 6917, 0, 1180, 0, 0, 0,
+ 0, 84, 0,15737, 8175, 0, 0, 1090, 0, 811,
+ 1065, 0, 1068, 0, 0, 9705, 33, 198, 0, 1067,
+ 1067, 1067,15465, 1076, 0,15737, 0, 0, 0, 0,
+ 0, 0, 7233, 74, 0, 0, 7390, 0, 0, 1083,
+ 7233, 0, 1084, 0, 9548, 0, 0, 0, 0, 0,
+15737, 0, 0, 224, 1071, 224, 8035, 1114, 1114, 1114,
+ 0, 0,15737, 0, 7233, 9862, 0, 0, 0, 0,
+ 0, 0, 0, 1107, 9548,15737, 0, 224, 1089, 0,
+ 1047, 574, 0, 0, 1088, 0, 0, 103, 0, 1051,
+ 0, 1114, 0, 0, 0, 0, 0, 0, 0, 1092,
+ 971, 0, 7390, 0, 1123, 0, 41, 1114, 1214, 0,
+ 1104, 224, 0, 8035, 78, 1108, 0, 1109, 1110, 7233,
+ 1111, 9548, 0, 0, 0, 0, 0, 0, 1097, 1105,
+ 0, 0, 0,16577, 137, 224, 0, 0, 0, 1137,
+ 9548, 1118,15737, 0, 0, 0, 1132, 0, 0, 1134,
+ 0, 0,17624, 0, 1127, 137, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 621,
+17624, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1143, 224, 0, 137, 123, 0, 1137, 0, 0, 1125,
+16577,16743, 0, 0, 515, 0, 0, 0, 0, 0,
+16775, 0, 0, 1144, 0, 0, 0, 0, 8035, 8035,
+ 83, 8192, 419, 420, 1176, 0, -276,14925, 0, 1209,
+ 0, 0, 1105, 0, 0, 0, 7390,14963, 1105, 0,
+ -145, -144, 0, 8035, -137, 0, 8035, 0, 1099, 1148,
+ 0, 0, -276, 0, 55,14993, 0, 1146, 1112, 119,
+ 554, 3956, 0, 1153, 0, 1105, 0, 0, 0, -276,
+ 0, 1155, 1113, 1152, 1151, 0, 1157, 1115, 1158, 198,
+ 1154, 1159, 0, 0, 1163, 1171, 0, 783, 0, 604,
+ 0, 0, 0, 1168, 0, 0, 87, 0, 1160, 0,
+ 0, 1173, 0, 1174, 1172, 1178, 0, 1177, 0, 198,
+ 198, 0, 198, 1175, 1179, 0, 0, 0, 0, 1184,
+ 183, 0, 1185, 198, 1290, 1186, 198, 0, 515, 0,
+ 8606, 1135, 1191, 1177, 0, 1182, 1189, 189, 1192, 0,
+ 0, 198,15465, 1150, 1193, 1184, 0, 0,17624, 0,
+ 224, 224, 0, 1156, 1194, 1185, 0, 1199, 0,15737,
+ 1161, 1197, 1186, 0, 1203, 198, 0, 91, 0, 1195,
+ 0, 0, 0, 0, 0,17624, 0, 189, 189, 0,
+ 1205, 0, 87, 0, 0, 97, 1210,17624, 0,17624,
+ 0, 0, 8606, 1202, 0, 0, 0, 1215, 1173, 0,
+ 0, 0, 1212, 0, 287, 0, 0, 0, 1114, 814,
+ 1218, 0, 0, 1221, 0, 0, 0, 0, 0, 1286,
+ 1339, 0, 0, 0, 0, 0, 0, 1232, 1233, 8606,
+ 0, 0, 0, 0, 189, 580, 580, 0, 1114, 0,
+ 0, 0, 24, 24, 0, 0, 0, 0, 0, 0,
+ 0,15193,15193, 0, 0, 0, 0, 0, 1237, 1234,
+ 1235, 0, 0, 0,
};
- protected static readonly short [] yyRindex = { 3000,
- 0, 0, 7455, 3000, 0, 0, 0, 1682, 0, 0,
- 3160, 1369, 0, 0, 0, 0, 0, 3160, 0, 0,
- 52, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1683, 0, 0, 1683, 0, 0, 1682,
- 3203, 3043, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1317, 0, 0, 0, 0, 0, 0, 0, 0,
- 8845, 0, 1309, 0, 0, 0, 1309, 0, 0, 0,
- 0, 0, 0, 276, 0, 0, 0, 0, 0, 0,
- 0, 0, 202, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 4697, 0, 0, 0, 0,
- 0, 0, 340, 4790, 4132, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 4946, 5014,
- 5254, 5458, 5798, 6002, 6138, 6274, 6410, 6546, 4877, 523,
- 0, 0, 0, 0, 0, 0, 52, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 327, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 3246, 0,
- 829, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1683, 57, 0, 0, 0, 0, 0, 0,
- 0, 3289, 311, 3332, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3743, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0,
- 0, 0, 3743, 1312, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2373, 0, 2753, 256, 2503, 0, 0, 0, 1438,
- 2503, 0, 0, 0, 0, 0, 1317, 0, 0, 0,
- 0, 0, 0, 225, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1321, 2607, 0, 0,
- 1309, 0, 3743, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 119, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1766, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 2715, 0, 0,
- 0, 0, 0, 0, 0, 3375, 3418, 0, 0, 0,
- 0, 2227, 1683, 1683, 0, 36, 0, 7629, 1683, 1689,
- 0, 0, 217, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 537,16369, 0, 0, 0, 0, 3743, 0, 0, 0,
- 0, 0, 0, 0, 0,16758, 0, 0, 0, 0,
- 0, 0, 0, 805, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 869, 677, 795, 0, 0, 1323, 0,
- 0, 0, 0, 0, 253, 0, 0, 4220, 1325, 0,
- 0, 0, 594, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1934, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1321, 0,15812,
- 0, 6665, 0, 254, 0, 0, 0, 0, 0, 0,
-15812, 0, 0, 0, 0, 0, 0, 28, 0, 433,
- 0, 0, 0, 1326, 0, 0, 0, 0, 1312, 0,
- 0, 0, 3584, 0, 3743, 3584, 0, 3743, 4379, 0,
- 0, 0, 0, 0, -202, 0, 0, 0, 0, 127,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5118, 0, 5186, 0, 5322,
- 0, 5390, 0, 5526, 0, 5594, 0, 5662, 0, 5730,
- 0, 5866, 0, 5934, 0, 6070, 0, 6206, 0, 6342,
- 0, 6478, 0, 6602, 0, 0, 668, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 2715,
- 0, 0, 0, 0, 2227, 0, 0, 0, 0, 1283,
-14019, 0, 0, 0, 9002, 0, 0, 738, 0, 0,
- 0, 0, 0, 0, 731, 699, 0, 0, 1333, 0,
- 0, 0, 0, 1639, 0, 0, 0, 0, 0, 0,
-15948, 0, 0, 0, 761, 0, 0, 0, 9159,16905,
- 0, 0, 836, 839, 842, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 814, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1327, 0, 0, 0, 0, 3650,
- 0, 0, 263, 0, 92, 3902, 0, 0, 0, 0,
- 0, 0, 0, 1334, 0, 0, 0, 0, 0, 1340,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- -273, 832, 0, 0, 0, 0, 0, 1337, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,15812, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 480, 0, 0, 0,
- 0, 0, 0, 0, 0, -184, 0, 432, 0, 0,
- 0, 0, 0, 0, 0, 0, 36, 0, 0, 0,
- 0, 9159, 7786, 0, 0, 1342, 0, 822, 0, 0,
- 0, 0, 1343, 0, 1295, 1297, 0, 0, 0, 0,
- 0, 1338, 9316, 0, 0, 0, 0,16937, 0, 0,
- 0, 845, 0, 0, 0, 0, 0, 0, 2101, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 4061, 0, 4538, 1348, 0, 0, 0,
- 1057, 0, 0, 0, 0, 565, 0, 0, 0, 0,
- 845, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 647, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 894, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1341, 0, 0, 0, 0, 0, 902,
- 918, 0, 0, 0, 0, 0, 0, 0, 986, 748,
- 1344, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 4220, 0, 0, 0, 0, 0, 1350,
- 0, 0, 565, 0, 0, 983, 0, 986, 0, 0,
- 0,15812, 0, 715, 720, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1333, 0,13858, 0, 0, 0, 0, 0,17029, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 777, 0, 810, 0, 0, 0, 0, 1347, 0, 827,
- 1345, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1355, 0, 0, 0, 1357, 0, 0, 0, 0,
-15812, 0, 0, 0, 0, 0, 0, 0, -164, 479,
- 0, 0, 0, 0, 0,17105,16758, 0, 354, 354,
- 354, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -70, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,17210, 0, -245, 0, 1358, 1358, 1358, 0,
- 0, 0, 0, 0, 1354, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0,17253, 0, 0, 0,
-14322, 0, 0, 1359, 0, 0, 499, 0, 0, 0,
- 612, 0, 0, 0, 0, 0, 0, 0, 0, 1356,
- 0, 1364, 0, 0, 0, 3086, 1363, -243, 0, 0,
- 279, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 2911, 0,
- 0, 0, 0,14124,14408, 0, 0, 0, 688, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 427, 0,
- 0,16540, 0, 0,14223, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,16608,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-14502, 0,14124, 0, 0, 688, 0, 0, 0, 0,
- 537, 0, 0, 0, 0, 0, 0, 0, 0, 537,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,14614, 587, 0,14544, 0, 0, 0,14676,
- 0, 2911, 0, 0, 0, 1364, 0, 2911, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 285, 0, 1366, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 2911, 0, 0, 0, 849, 0,
- 644, 0, 0, 0, 0, 0, 0, 0,16758, 917,
- 0, 0, 0, 0, 0, 0, 1361, 0, 394, 0,
- 0, 0, 0, 0, 0, 0, 0, 937, 0, 0,
- 0, 0, 0, 0, 0, 0, 1365, 0,16758,16758,
- 0,16790, 0, 0, 0, 0, 0, 0, 1368,17477,
- 0, 1370,16758,16084, 1375,16758, 0, 0, 0, 0,
- 0, 0, 1378, 0, 0, 0,17447, 0, 0, 0,
-16758, 0, 0, 0, 1380, 0, 0, 380, 0,17371,
-17409, 0, 0, 0, 1381, 0, 0, 0, 0, 0,
- 0, 1382, 0, 0,16758, 0, 591, 0, 941, 0,
- 0, 0, 0, 0, 996, 0,17295,17333, 0, 0,
- 0, 0, 0, 0, 0, 0, 1427, 0, 1490, 0,
- 0, 0, 959, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 614, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,17447,16256,17147, 0, 614, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1325, 1325, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
+ protected static readonly short [] yyRindex = { 3086,
+ 0, 0, 7547, 3086, 0, 0, 0, 1608, 0, 0,
+ 3272, 1804, 0, 0, 0, 0, 0, 3272, 0, 0,
+ 44, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1609, 0, 0, 1609, 0, 0, 1608,
+ 3315, 3155, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1245, 0, 0, 0, 0, 0, 0, 0, 0,
+ 8937, 0, 1240, 0, 0, 0, 1240, 0, 0, 0,
+ 0, 0, 0, 310, 0, 0, 0, 0, 0, 0,
+ 0, 0, 233, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4857, 0, 0, 0, 0,
+ 0, 0, 311, 4950, 4292, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5106, 5174,
+ 5414, 5618, 5958, 1839, 6230, 6366, 6502, 6638, 1243, 524,
+ 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 294, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3378, 0,
+ 603, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1609, 67, 0, 0, 0, 0, 0, 0,
+ 0, 3425, 632, 3492, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3903, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1246, 0, 0, 0, 0,
+ 0, 0, 3903, 1244, 0, 0, 0, 0, 0, 0,
+ 1244, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2404, 0, 2768, 341, 2534, 0, 0, 0, 2664,
+ 2534, 0, 0, 0, 0, 0, 1245, 0, 0, 0,
+ 0, 0, 0, 208, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1249, 1674, 0, 0,
+ 1240, 0, 3903, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 235, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1964, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4024, 0, 0,
+ 0, 0, 0, 0, 0, 3535, 3578, 0, 0, 0,
+ 0, 2258, 1609, 1609, 0, -207, 0, 7721, 1609, 1622,
+ 0, 0, 207, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 425,16430, 0, 0, 0, 0, 3903, 0, 0, 0,
+ 0, 0, 0, 0, 0,16819, 0, 0, 0, 0,
+ 0, 0, 0, 771, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 836, 682, 936, 0, 0, 1255, 0,
+ 0, 0, 0, 0, 226, 0, 0, 4380, 1252, 0,
+ 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1581, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1249, 0,
+16009, 0, 6757, 0, 252, 0, 0, 0, 0, 0,
+ 0,16009, 0, 0, 0, 0, 0, 0, -28, 0,
+ 680, 0, 0, 0, 1253, 0, 0, 0, 0, 1244,
+ 0, 0, 0, 3744, 0, 3903, 3744, 0, 3903, 4539,
+ 0, 0, 0, 0, 0, -195, 0, 0, 0, 0,
+ 238, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5278, 0, 5346, 0,
+ 5482, 0, 5550, 0, 5686, 0, 5754, 0, 5822, 0,
+ 5890, 0, 6026, 0, 6094, 0, 6162, 0, 6298, 0,
+ 6434, 0, 6570, 0, 6694, 0, 0, 660, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4024, 0, 0, 0, 0, 2258, 0, 0, 0, 0,
+ 1208,14268, 0, 0, 0, 9094, 0, 0, 818, 0,
+ 0, 0, 0, 0, 0, 760, 687, 0, 0, 1257,
+ 0, 0, 0, 0, 3023, 0, 0, 0, 0, 0,
+ 0,10019, 0, 0, 0, 820, 0, 0, 0, 9251,
+16966, 0, 0, 831, 846, 849, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 772, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1260, 0, 0, 0, 0,
+ 3810, 0, 0, 258, 0, 99, 4062, 0, 0, 0,
+ 0, 0, 0, 0, 1258, 0, 0, 0, 0, 0,
+ 1261, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 260, 626, 0, 0, 0, 0, 0, 1262, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,16009, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 618, 0, 0,
+ 0, 0, 0, 0, 0, 0, -177, 0, 613, 0,
+ 0, 0, 0, 0, 0, 0, 0, -207, 0, 0,
+ 0, 0, 9251, 7878, 0, 0, 1268, 0, 780, 0,
+ 0, 0, 0, 1265, 0, 1241, 1242, 0, 0, 0,
+ 0, 0, 1263, 9408, 0, 0, 0, 0,16998, 0,
+ 0, 0, 834, 0, 0, 0, 0, 0, 0, 2132,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4221, 0, 4698, 1288, 0, 0,
+ 0, 950, 0, 0, 0, 0, -240, 0, 0, 0,
+ 0, 834, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 633, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 848, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1282, 0, 0, 0, 0, 0,
+ 866, 870, 0, 0, 0, 0, 0, 0, 0, 1289,
+ 512, 1287, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4380, 0, 0, 0, 0, 0,
+ 1296, 0, 0, -240, 0, 0, 853, 0, 1289, 0,
+ 0, 0,16009, 0, 735, 749, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1257, 0,14107, 0, 0, 0, 0, 0,17136,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 704, 0, 716, 0, 0, 0, 0, 915, 0,
+ 787, 1291, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1297, 0, 0, 0, 1302, 0, 0, 0,
+ 0,16009, 0, 0, 0, 0, 0, 0, 0, -154,
+ 671, 0, 0, 0, 0, 0,17212,16819, 0, 432,
+ 432, 432, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,17317, 0, -255, 0, 1303, 1303, 1303,
+ 0, 0, 0, 0, 0, 1306, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,17360, 0, 0,
+ 0,14571, 0, 0, 1307, 0, 0, 447, 0, 0,
+ 0, 591, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1308, 0, 1311, 0, 0, 0, 3229, 1310, 363, 0,
+ 0, -54, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2937,
+ 0, 0, 0, 0,14373,14657, 0, 0, 0, 731,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 442,
+ 0, 0,16601, 0, 0,14472, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+16669, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,14751, 0,14373, 0, 0, 731, 0, 0, 0,
+ 0, 425, 0, 0, 0, 0, 0, 0, 0, 0,
+ 425, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5080, 443, 0,14793, 0, 0, 0,
+14863, 0, 2937, 0, 0, 0, 1311, 0, 2937, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 275, 0, 1315, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2937, 0, 0, 0, 565,
+ 0, 664, 0, 0, 0, 0, 0, 0, 0,16819,
+ 877, 0, 0, 0, 0, 0, 0, 1314, 0, 402,
+ 0, 0, 0, 0, 0, 0, 0, 0, 886, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1312, 0,16819,
+16819, 0,16851, 0, 0, 0, 0, 0, 0, 1313,
+17584, 0, 1316,16819,16145, 1319,16819, 0, 0, 0,
+ 0, 0, 0, 1320, 0, 0, 0,17554, 0, 0,
+ 0,16819, 0, 0, 0, 1321, 0, 0, 407, 0,
+17478,17516, 0, 0, 0, 1322, 0, 0, 0, 0,
+ 0, 0, 1323, 0, 0,16819, 0, 665, 0, 887,
+ 0, 0, 0, 0, 0, 867, 0,17402,17440, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1368, 0, 1421,
+ 0, 0, 0, 891, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 593, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,17554,16317,17254, 0, 593, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1252, 1252, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0,
};
protected static readonly short [] yyGindex = { 0,
- 0, 1710, 0, 0, 0, -2, -15, -177, -41, -38,
- 0, 1749, 1757, 756, 0, 5, 0, 0, 0, 0,
- 0, 0, -974, -751, -211, -326, 0, 0, 0, 0,
- 0, -216, 0, 0, 0, 764, 0, 868, 0, 0,
- 0, 0, 610, 613, -17, -232, 0, -46, 0, 446,
- 0, 475, -804, -506, -495, -477, -440, -434, -432, -417,
- 0,-1088, 0,-1202, 0, 13, 0, 203, 0,-1149,
- 0, 0, 0, -79, 260, 0, 0, 0, 298,-1119,
- 0, -275, -294, -330, 0, 0, 0, -942, 247, 0,
- 0, -520, 0, 0, 315, 0, 0, 287, 0, 0,
- 322, 0, -585, -887, 0, 0, 0, 0, 0,-1224,
- -10, 0, 0, 865, 878, 879, 1059, -530, 0, 0,
- -293, 890, 410, 0, -875, 0, 0, 0, 0, 0,
- 0, 0, 0, 231, 0, 0, 0, 0, 0, 0,
- 0, 0, 478, 0, 0, 0, 0, -309, 416, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- -523, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 244, 0, 0, 330, 0, 0, 337, 344, 259, 0,
- 0, 0, 0, 0, 0, 0, 0, 575, 0, 0,
- 0, 0, -45, 0, 161, -161, 0, 0, 411, 0,
- -741, 0, 942, 0, 1285, -296, -266, -60, 685, 0,
- 589, 0, -33, 95, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -268, 0, 1253, 0, -348, 0, -271,
- 0, 0, 0, 899, 905, -300, -124, 1074, 0, 982,
- 0, 1232, 1463, -604, 1119, 0, 0, 793, 1777, 0,
- 0, 0, 0, 1088, 0, 0, 0, 0, 0, -452,
- 1512, 0, 0, 0, 0, 0, 1205, 970, 995, 933,
- 964, 1443, 1437, 1444, 1445, 1446, 0, 1442, 0, 0,
- 0, 1024, 1300, -543, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -286, 0, 0, 0, 0, -465,
- 0, 639, 0, 541, 0,-1043, 0, 0, 0, 0,
- 0, 739, -538, -16, -313, -1, 0, 1715, 0, 69,
- 0, 71, 87, 97, 136, 142, 144, 178, 205, 207,
- 280, 0, -677, 0, -12, 0, 0, 835, 0, 757,
- 0, 0, 0, 0, 732, -321, 811, -886, 0, 856,
- -481, 0, 0, 0, 0, 0, 0, 752, 0, 749,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 680, 0, 0, 0, 0,
- 0, 0, 0, 0, -32, 0, 1346, 0, 0, 0,
- 925, 0, 0, 0, 0, 0, 0, -168, 0, 0,
- 0, 0, 0, 1451, 1201, 0, 0, 0, 0, 1456,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 569,
- 0, 0, 0, 0, 0, 0, 0, 0, 683, 0,
- 0, 0, 0, 0, 0, -3, 1004, 0, 0, 0,
- 1009,
+ 0, 1641, 0, 0, 0, 1, -15, -178, -41, -38,
+ 0, 1688, 1698, 342, 0, 8, 0, 0, 0, 0,
+ 0, 0, -974, -741, -214, -550, 0, 0, 0, 0,
+ 0, -220, 0, 0, 0, 701, 0, 807, 0, 0,
+ 0, 0, 551, 552, -17, -230, 0, -46, 0, -562,
+ 385, 0, 415, -615, -587, -568, -567, -540, -527, -526,
+ -525, 0,-1102, 0,-1230, 0, 13, 0, 85, 0,
+-1142, 0, 0, 0, -79, 199, 0, 0, 0, 237,
+-1120, 0, -269, -297, -350, 0, 0, 0, -945, 185,
+ 0, 0, -516, 0, 0, 255, 0, 0, 222, 0,
+ 0, 257, 0, -607, -853, 0, 0, 0, 0, 0,
+ -534, -10, 0, 0, 799, 802, 804, 987, -548, 0,
+ 0, -314, 812, 357, 0,-1412, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 0, 0, 0, 0, 0,
+ 0, 0, 0, 409, 0, 0, 0, 0, -302, 340,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 170, 0, 0, 253, 0, 0, 264, 267, 187,
+ 0, 0, 0, 0, 0, 0, 0, 0, 495, 0,
+ 0, 0, 0, -45, 0, 403, -56, 0, 0, 330,
+ 0, -515, 0, 876, 0, 1204, -288, -268, -61, 905,
+ 0, 502, 0, -33, 188, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -257, 0, 1435, 0, -349, 0,
+ -271, 0, 0, 0, 815, 821, -301, -126, 989, 0,
+ 897, 0, 1147, 1384, 1033, 0, 0, 713, 1699, 0,
+ 0, 0, 0, 1006, 0, 0, 0, 0, 0, -483,
+ 1432, 0, 0, 0, 0, 0, 1238, 871, 872, 763,
+ 874, 1361, 1363, 1360, 1364, 1365, 0, 1367, 0, 0,
+ 0, 946, 1216, -546, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -299, 0, 0, 0, 0, -461,
+ 0, 555, 0, 463, 0,-1121, 0, 0, 0, 0,
+ 0, 661, -538, -16, -319, -13, 0, 1638, 0, 57,
+ 0, 58, 68, 111, 142, 147, 163, 195, 200, 204,
+ 247, 0, -712, 0, -24, 0, 0, 756, 0, 678,
+ 0, 0, 0, 0, 655, -246, 734, -884, 0, 776,
+ -472, 0, 0, 0, 0, 0, 0, 672, 0, 673,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 600, 0, 0, 0, 0,
+ 0, 0, 0, 0, -30, 0, 1264, 0, 0, 0,
+ 845, 0, 0, 0, 0, 0, 0, -172, 0, 0,
+ 0, 0, 0, 1373, 1136, 0, 0, 0, 0, 1375,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 488,
+ 0, 0, 0, 0, 0, 0, 0, 0, 597, 0,
+ 0, 0, 0, 0, 0, -7, 922, 0, 0, 0,
+ 925,
};
protected static readonly short [] yyTable = { 109,
- 155, 18, 189, 535, 532, 783, 111, 328, 333, 233,
- 789, 446, 234, 507, 489, 156, 729, 485, 43, 445,
- 464, 293, 751, 321, 192, 258, 530, 516, 369, 449,
- 577, 528, 419, 563, 620, 833, 552, 834, 948, 1074,
- 327, 332, 1200, 229, 312, 339, 259, 252, 1233, 1234,
- 1129, 1011, 377, 678, 385, 304, 362, 593, 14, 311,
- 712, 838, 845, 558, 498, 373, 1128, 376, 313, 384,
- 316, 995, 20, 592, 868, 190, 756, 345, 1129, 873,
- 874, 249, 929, 829, 930, 160, 713, 161, 1110, 1331,
- 524, 998, 249, 260, 579, 1263, 289, 1266, 369, 315,
- 1079, 835, 315, 162, 290, 722, 1222, 1340, 363, 374,
- 1112, 115, 374, 163, 865, 500, 1396, 1398, 714, 453,
- 454, 1076, 326, 501, 331, 421, 94, 1404, 375, 1077,
- 331, 364, 1385, 960, 1067, 1363, 962, 332, 320, 109,
- 155, 320, 1385, 836, 369, 365, 111, 233, 499, 489,
- 447, 580, 164, 115, 995, 156, 678, 115, 165, 995,
- 166, 995, 1222, 449, 995, 995, 196, 995, 995, 678,
- 362, 678, 51, 889, 998, 894, 502, 861, 1447, 998,
- 194, 998, 495, 291, 998, 998, 1, 998, 998, 995,
- 463, 291, 94, 447, 167, 291, 250, 846, 1260, 487,
- 490, 525, 699, 526, 1130, 250, 449, 250, 505, 998,
- 94, 602, 494, 261, 250, 1264, 6, 250, 363, 455,
- 15, 168, 715, 169, 775, 160, 678, 161, 538, 488,
- 485, 1079, 1130, 781, 464, 493, 804, 191, 292, 866,
- 461, 364, 931, 162, 995, 251, 292, 194, 194, 515,
- 292, 115, 258, 163, 251, 365, 251, 527, 593, 1038,
- 577, 551, 258, 251, 998, 555, 251, 723, 194, 1194,
- 560, 506, 1113, 503, 592, 1515, 510, 512, 1397, 1399,
- 968, 557, 593, 376, 583, 559, 562, 577, 2, 1405,
- 696, 539, 164, 337, 1284, 862, 170, 846, 165, 547,
- 166, 549, 1539, 1448, 1412, 510, 550, 548, 1011, 759,
- 363, 16, 362, 1583, 1549, 231, 1550, 565, 566, 460,
- 642, 644, 1393, 863, 296, 730, 297, 576, 605, 51,
- 825, 608, 1207, 364, 167, 490, 490, 2, 600, 1152,
- 1055, 51, 578, 1272, 1533, 1084, 940, 1011, 681, 683,
- 20, 846, 1511, 599, 3, 4, 5, 6, 761, 194,
- 194, 168, 916, 169, 488, 617, 1125, 1252, 624, 625,
- 626, 627, 628, 629, 630, 631, 632, 633, 634, 291,
- 115, 680, 682, 1028, 1080, 686, 1082, 1392, 1560, 1087,
- 376, 48, 851, 1394, 593, 362, 1418, 376, 791, 376,
- 676, 376, 793, 810, 233, 199, 813, 447, 1374, 1036,
- 830, 890, 42, 115, 700, 804, 231, 1291, 1580, 1413,
- 1425, 1477, 194, 362, 94, 760, 1058, 362, 449, 362,
- 362, 362, 362, 1584, 292, 338, 170, 362, 115, 370,
- 1085, 94, 864, 847, 1042, 376, 849, 850, 194, 697,
- 698, 1208, 694, 51, 1504, 710, 749, 740, 757, 1011,
- 194, 921, 1273, 1534, 941, 1011, 716, 797, 194, 400,
- 1312, 831, 363, 6, 762, 231, 1145, 737, 1147, 858,
- 1148, 426, 490, 1546, 485, 1253, 747, 371, 691, 1419,
- 465, 750, 1030, 691, 1206, 364, 516, 691, 466, 803,
- 489, 291, 1211, 812, 1065, 401, 852, 975, 291, 778,
- 733, 617, 691, 787, 792, 797, 1312, 1117, 794, 811,
- 231, 1435, 814, 485, 194, 1037, 1236, 194, 1142, 593,
- 231, 795, 797, 882, 231, 1547, 859, 725, 815, 691,
- 352, 726, 937, 817, 837, 592, 54, 465, 372, 796,
- 802, 1465, 1466, 449, 1468, 466, 603, 576, 691, 826,
- 194, 194, 738, 606, 427, 1487, 604, 231, 1494, 428,
- 826, 429, 578, 607, 430, 431, 797, 432, 433, 1213,
- 291, 1277, 691, 1510, 576, 402, 403, 691, 194, 194,
- 231, 691, 738, 1556, 424, 853, 853, 1181, 115, 578,
- 200, 1557, 727, 938, 593, 244, 691, 1532, 194, 1244,
- 245, 1137, 347, 1138, 246, 1389, 1021, 426, 347, 1026,
- 452, 739, 194, 1372, 347, 1389, 248, 347, 347, 977,
- 453, 1541, 1542, 691, 870, 292, 872, 833, 792, 688,
- 775, 347, 691, 291, 792, 880, 328, 425, 250, 362,
- 942, 352, 691, 738, 434, 352, 1279, 347, 123, 94,
- 123, 778, 1558, 250, 247, 123, 778, 778, 115, 876,
- 291, 362, 1373, 347, 1057, 1326, 796, 1053, 362, 887,
- 924, 452, 739, 263, 925, 535, 490, 989, 1574, 785,
- 44, 453, 710, 792, 691, 115, 51, 251, 956, 352,
- 427, 113, 340, 923, 1375, 428, 805, 429, 340, 936,
- 430, 431, 251, 432, 433, 488, 951, 1118, 515, 363,
- 710, 888, 427, 751, 927, 1063, 363, 428, 194, 429,
- 510, 258, 430, 431, 991, 432, 433, 904, 903, 965,
- 94, 555, 364, 113, 785, 787, 1118, 113, 362, 364,
- 320, 778, 194, 1376, 1121, 970, 365, 340, 957, 781,
- 362, 905, 928, 365, 362, 717, 347, 362, 1313, 362,
- 989, 331, 331, 1098, 362, 989, 197, 989, 631, 1314,
- 989, 989, 334, 989, 989, 1400, 1153, 952, 906, 347,
- 444, 971, 331, 717, 696, 347, 363, 1315, 963, 1414,
- 964, 347, 717, 412, 651, 347, 651, 197, 689, 490,
- 969, 966, 689, 826, 1313, 490, 413, 991, 347, 364,
- 577, 1433, 991, 374, 991, 1314, 414, 991, 991, 1089,
- 991, 991, 689, 365, 1316, 1029, 415, 711, 617, 450,
- 1317, 113, 1318, 1315, 617, 700, 981, 807, 787, 374,
- 347, 416, 320, 1173, 115, 807, 115, 1319, 690, 689,
- 989, 631, 577, 417, 194, 711, 631, 1021, 631, 631,
- 631, 631, 631, 631, 631, 631, 631, 631, 631, 740,
- 1316, 418, 690, 331, 331, 194, 1317, 1163, 1318, 1203,
- 631, 1018, 631, 506, 631, 585, 631, 631, 631, 1164,
- 716, 882, 586, 1319, 1061, 115, 1064, 991, 115, 690,
- 1043, 541, 1066, 1010, 587, 1045, 374, 542, 1045, 729,
- 448, 347, 1098, 883, 542, 297, 1235, 778, 577, 787,
- 363, 1102, 953, 347, 798, 884, 347, 347, 1075, 1498,
- 94, 543, 225, 985, 226, 320, 331, 1293, 1311, 1420,
- 347, 631, 452, 364, 1335, 1336, 194, 278, 278, 490,
- 374, 374, 374, 1337, 374, 374, 278, 374, 1293, 374,
- 113, 778, 331, 778, 225, 1107, 778, 94, 714, 194,
- 713, 1111, 456, 426, 331, 796, 1283, 714, 1097, 713,
- 459, 585, 331, 913, 1311, 194, 1293, 486, 586, 194,
- 1357, 1551, 1048, 113, 485, 464, 1328, 716, 945, 1367,
- 587, 374, 337, 374, 808, 1217, 374, 288, 808, 288,
- 787, 1360, 808, 510, 288, 1104, 985, 1105, 113, 1106,
- 1360, 985, 225, 985, 228, 804, 985, 985, 1571, 985,
- 985, 804, 907, 804, 512, 406, 407, 508, 331, 908,
- 512, 331, 577, 1073, 535, 862, 194, 1589, 1590, 408,
- 409, 826, 1154, 778, 1155, 778, 427, 778, 69, 69,
- 1149, 428, 69, 429, 194, 194, 430, 431, 450, 432,
- 433, 451, 824, 800, 331, 331, 824, 813, 824, 509,
- 824, 813, 24, 813, 25, 813, 1156, 26, 404, 405,
- 347, 347, 27, 347, 347, 62, 28, 1031, 490, 1031,
- 521, 506, 331, 331, 522, 30, 985, 576, 740, 804,
- 732, 804, 32, 804, 733, 1182, 787, 33, 531, 766,
- 826, 34, 578, 767, 815, 776, 815, 1097, 115, 522,
- 1193, 536, 194, 36, 506, 37, 176, 506, 176, 38,
- 176, 233, 450, 1220, 447, 881, 1221, 39, 40, 576,
- 375, 41, 513, 194, 801, 425, 778, 425, 513, 944,
- 556, 194, 1216, 945, 578, 233, 871, 1021, 447, 189,
- 871, 189, 537, 189, 506, 875, 425, 425, 113, 875,
- 291, 70, 540, 1288, 449, 70, 778, 1149, 807, 561,
- 340, 347, 807, 340, 347, 164, 425, 164, 171, 1220,
- 171, 172, 1221, 172, 425, 352, 940, 425, 940, 352,
- 1411, 347, 352, 569, 352, 576, 484, 231, 115, 352,
- 331, 597, 1292, 1310, 364, 1221, 796, 1411, 598, 347,
- 578, 347, 796, 778, 692, 325, 397, 398, 399, 796,
- 1288, 609, 331, 1292, 368, 1443, 1221, 1444, 113, 711,
- 347, 347, 778, 352, 506, 72, 115, 72, 1370, 1371,
- 115, 195, 695, 195, 115, 731, 331, 1344, 734, 1310,
- 347, 1292, 736, 201, 1221, 113, 764, 165, 347, 165,
- 128, 347, 128, 1403, 410, 411, 1406, 343, 115, 995,
- 996, 347, 349, 351, 353, 355, 357, 359, 361, 250,
- 294, 378, 294, 262, 135, 758, 135, 286, 287, 288,
- 765, 294, 295, 1365, 763, 202, 308, 309, 1186, 1187,
- 379, 380, 301, 317, 301, 319, 115, 323, 654, 656,
- 658, 660, 335, 336, 1249, 231, 816, 364, 456, 576,
- 381, 1561, 1562, 115, 536, 536, 194, 809, 251, 691,
- 691, 382, 1198, 1199, 578, 818, 383, 819, 38, 820,
- 740, 646, 648, 662, 664, 203, 204, 205, 206, 1421,
- 207, 208, 209, 210, 211, 212, 213, 214, 331, 821,
- 215, 216, 217, 218, 219, 220, 221, 222, 650, 652,
- 740, 740, 839, 740, 840, 843, 844, 846, 1478, 331,
- 856, 848, 857, 194, 740, 869, 871, 740, 875, 891,
- 892, 450, 42, 899, 895, 1505, 911, 896, 917, 918,
- 196, 919, 740, 194, 920, 926, 943, 377, 1517, 1519,
- 946, 862, 787, 947, 113, 949, 113, 1365, 954, 958,
- 973, 990, 959, 967, 506, 992, 740, 985, 997, 999,
- 115, 1005, 1008, 1006, 1009, 1505, 1505, 1014, 1011, 1016,
- 1022, 1527, 1034, 1035, 1044, 1038, 1052, 525, 1070, 1059,
- 331, 1071, 1090, 1144, 1100, 1108, 1143, 1126, 1114, 1115,
- 194, 194, 1116, 1146, 1166, 113, 1124, 1136, 113, 1140,
- 194, 1158, 1167, 331, 787, 1168, 343, 317, 194, 194,
- 383, 194, 1162, 1165, 1170, 1171, 1174, 1388, 1178, 331,
- 1185, 1188, 1505, 331, 1189, 1196, 1209, 1388, 1201, 1229,
- 1212, 1388, 1243, 194, 490, 490, 194, 1219, 564, 1246,
- 1262, 787, 1251, 1267, 1248, 1388, 343, 386, 1254, 1259,
- 529, 1269, 1274, 1275, 1576, 1576, 1276, 1282, 1283, 1278,
- 1346, 1585, 1585, 617, 617, 1324, 546, 1388, 387, 388,
- 389, 390, 391, 392, 393, 394, 395, 396, 1327, 1329,
- 1330, 1377, 1332, 1341, 1391, 1408, 1369, 1417, 1419, 1424,
- 1409, 1416, 1427, 1399, 1429, 1441, 1454, 1432, 331, 331,
- 1430, 636, 638, 640, 1434, 1438, 564, 564, 564, 564,
- 564, 564, 564, 564, 564, 564, 564, 564, 564, 564,
- 564, 564, 1436, 1451, 1440, 38, 1446, 1457, 1461, 38,
- 1458, 1459, 1488, 1469, 1470, 1564, 1502, 1473, 24, 1483,
- 38, 1490, 1500, 1503, 1509, 38, 1513, 1499, 1512, 38,
- 1526, 1524, 38, 1523, 1528, 1531, 1529, 1537, 1544, 1548,
- 1553, 1555, 1552, 1563, 38, 38, 331, 1547, 1546, 38,
- 38, 1569, 1570, 1591, 1592, 38, 1593, 38, 38, 38,
- 38, 9, 1027, 552, 909, 38, 507, 910, 1019, 38,
- 508, 38, 653, 377, 506, 331, 465, 654, 377, 377,
- 725, 38, 33, 38, 38, 466, 38, 33, 532, 323,
- 38, 34, 216, 817, 103, 34, 818, 841, 810, 876,
- 877, 377, 842, 920, 713, 878, 327, 880, 113, 564,
- 38, 738, 354, 347, 377, 377, 38, 38, 713, 377,
- 131, 691, 377, 113, 377, 297, 377, 377, 377, 377,
- 138, 748, 691, 132, 377, 114, 298, 139, 377, 230,
- 53, 21, 377, 1004, 1191, 517, 1091, 1192, 1343, 1333,
- 377, 1545, 1514, 377, 1554, 377, 377, 1501, 1530, 1496,
- 1401, 377, 1031, 377, 377, 377, 377, 377, 377, 377,
- 377, 377, 377, 377, 796, 1032, 1033, 914, 1342, 377,
- 377, 842, 1027, 1587, 377, 377, 1423, 377, 377, 377,
- 1579, 377, 377, 377, 1525, 377, 377, 1520, 113, 377,
- 377, 377, 377, 1518, 1578, 1270, 377, 377, 1000, 1445,
- 806, 377, 377, 377, 377, 377, 377, 377, 377, 1051,
- 1049, 1271, 935, 978, 611, 855, 1127, 299, 567, 668,
- 377, 910, 932, 377, 666, 377, 113, 670, 675, 672,
- 113, 674, 972, 24, 113, 25, 377, 823, 26, 1256,
- 1347, 420, 1176, 27, 1120, 1183, 1169, 28, 1139, 1109,
- 331, 29, 1177, 1175, 1240, 1068, 30, 690, 113, 799,
- 879, 31, 691, 32, 1345, 24, 1002, 1245, 33, 24,
- 1001, 0, 34, 35, 0, 0, 0, 0, 0, 0,
- 24, 0, 0, 0, 36, 24, 37, 0, 0, 24,
- 38, 0, 24, 0, 0, 0, 113, 0, 39, 40,
- 0, 0, 41, 911, 24, 24, 0, 331, 0, 24,
- 24, 0, 0, 113, 0, 24, 0, 24, 24, 24,
- 24, 0, 0, 0, 0, 24, 0, 331, 0, 24,
- 0, 24, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 24, 343, 0, 24, 0, 24, 0, 0, 0,
- 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 24, 0, 0, 0, 0, 21, 24, 24, 0, 0,
- 0, 0, 0, 0, 331, 331, 42, 0, 0, 0,
- 0, 517, 0, 0, 331, 0, 517, 517, 0, 0,
- 0, 0, 331, 331, 0, 331, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 517,
- 113, 0, 0, 0, 0, 0, 0, 331, 0, 0,
- 331, 0, 517, 517, 0, 0, 0, 517, 0, 0,
- 517, 0, 517, 0, 517, 517, 517, 517, 0, 0,
- 0, 0, 517, 0, 0, 0, 517, 0, 0, 0,
- 517, 0, 0, 0, 0, 0, 0, 0, 517, 0,
- 835, 517, 0, 517, 517, 0, 0, 0, 0, 517,
- 0, 517, 517, 517, 517, 517, 517, 517, 517, 517,
- 517, 517, 0, 0, 0, 0, 0, 517, 517, 0,
- 0, 0, 517, 517, 0, 517, 517, 517, 517, 517,
- 517, 517, 0, 517, 517, 564, 517, 517, 517, 517,
- 517, 517, 517, 517, 517, 517, 0, 517, 517, 517,
+ 155, 532, 189, 156, 18, 784, 111, 328, 333, 233,
+ 446, 535, 234, 485, 790, 445, 489, 464, 43, 507,
+ 730, 293, 321, 553, 578, 258, 530, 192, 369, 528,
+ 419, 752, 564, 621, 259, 835, 834, 1075, 516, 229,
+ 327, 332, 1201, 1012, 839, 339, 312, 252, 930, 949,
+ 931, 377, 593, 385, 524, 304, 1234, 1235, 249, 311,
+ 678, 559, 1332, 846, 594, 373, 362, 376, 313, 384,
+ 316, 1129, 249, 160, 161, 498, 14, 345, 996, 757,
+ 1341, 1111, 289, 1130, 162, 846, 51, 852, 460, 424,
+ 290, 190, 315, 1223, 315, 1542, 1543, 723, 51, 961,
+ 866, 999, 963, 1080, 250, 1267, 836, 580, 1113, 905,
+ 1397, 1399, 326, 1031, 363, 16, 347, 869, 1405, 453,
+ 454, 1261, 874, 875, 862, 421, 416, 163, 347, 1130,
+ 830, 347, 347, 906, 449, 404, 405, 364, 417, 109,
+ 155, 231, 425, 156, 713, 347, 111, 233, 837, 1223,
+ 447, 489, 1575, 251, 679, 1, 890, 895, 164, 499,
+ 907, 996, 51, 165, 581, 525, 996, 526, 996, 250,
+ 714, 996, 996, 250, 996, 996, 678, 291, 678, 166,
+ 796, 42, 495, 94, 999, 846, 291, 250, 291, 999,
+ 463, 999, 260, 447, 999, 999, 996, 999, 999, 487,
+ 490, 853, 715, 94, 115, 734, 6, 250, 505, 250,
+ 51, 167, 494, 160, 161, 455, 168, 362, 251, 999,
+ 169, 527, 251, 776, 162, 867, 485, 376, 538, 488,
+ 782, 464, 292, 678, 1080, 493, 251, 1131, 15, 846,
+ 461, 292, 863, 292, 805, 1394, 115, 932, 1516, 515,
+ 115, 996, 258, 191, 593, 578, 251, 2, 251, 724,
+ 552, 503, 258, 170, 556, 363, 594, 163, 449, 561,
+ 1114, 506, 1398, 1400, 999, 1540, 510, 512, 969, 1584,
+ 1406, 558, 578, 1131, 584, 560, 563, 1550, 364, 1551,
+ 594, 539, 363, 337, 551, 1285, 1264, 374, 164, 548,
+ 1012, 550, 365, 165, 1195, 510, 716, 549, 760, 864,
+ 1413, 449, 261, 328, 2, 364, 603, 566, 567, 166,
+ 643, 645, 362, 3, 4, 5, 6, 577, 606, 1208,
+ 579, 609, 1126, 1273, 376, 490, 490, 1068, 1373, 826,
+ 601, 376, 1448, 376, 115, 376, 1534, 1019, 682, 684,
+ 1153, 167, 1512, 600, 1012, 762, 168, 941, 1253, 1547,
+ 169, 792, 197, 51, 488, 618, 1029, 20, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 291,
+ 794, 681, 683, 1056, 700, 687, 917, 1374, 1393, 376,
+ 94, 891, 1292, 197, 1395, 697, 1561, 20, 811, 1585,
+ 677, 814, 594, 170, 233, 362, 1375, 447, 374, 374,
+ 374, 1548, 374, 374, 701, 374, 1265, 374, 48, 1037,
+ 1085, 1426, 194, 805, 761, 1414, 1581, 1081, 865, 1083,
+ 731, 1059, 1088, 362, 292, 338, 54, 362, 1478, 362,
+ 362, 362, 362, 1419, 1505, 698, 699, 362, 1209, 922,
+ 94, 711, 1274, 738, 1043, 695, 750, 741, 758, 374,
+ 1207, 374, 1039, 6, 374, 1535, 1012, 1449, 1212, 717,
+ 370, 763, 1012, 115, 1066, 942, 1254, 793, 691, 751,
+ 426, 485, 490, 691, 199, 291, 748, 691, 400, 194,
+ 194, 196, 1237, 362, 831, 200, 795, 231, 797, 231,
+ 804, 938, 691, 489, 813, 231, 115, 976, 516, 779,
+ 194, 618, 291, 788, 812, 1086, 884, 815, 371, 1146,
+ 485, 1148, 1118, 1149, 401, 593, 1143, 426, 885, 691,
+ 352, 115, 796, 798, 449, 1038, 1420, 594, 739, 816,
+ 292, 363, 1557, 291, 818, 838, 797, 1278, 691, 848,
+ 1558, 231, 850, 851, 803, 832, 1436, 231, 577, 244,
+ 827, 579, 939, 427, 364, 726, 231, 957, 428, 727,
+ 429, 827, 859, 430, 431, 738, 432, 433, 365, 372,
+ 94, 1138, 500, 1139, 250, 577, 1466, 1467, 579, 1469,
+ 501, 450, 231, 452, 451, 1182, 854, 854, 604, 1027,
+ 1488, 194, 194, 1495, 402, 403, 465, 797, 605, 466,
+ 427, 1559, 594, 362, 1022, 428, 291, 429, 1511, 739,
+ 430, 431, 1214, 432, 433, 453, 248, 928, 291, 860,
+ 728, 369, 978, 251, 796, 871, 738, 873, 834, 883,
+ 776, 352, 1533, 502, 362, 352, 881, 347, 123, 943,
+ 123, 937, 1245, 434, 452, 123, 785, 362, 263, 449,
+ 1313, 363, 779, 465, 194, 929, 466, 779, 779, 691,
+ 877, 607, 792, 340, 1376, 1058, 1054, 369, 792, 340,
+ 739, 608, 1154, 1064, 364, 94, 453, 490, 1314, 352,
+ 194, 115, 363, 374, 535, 888, 689, 347, 365, 1280,
+ 444, 245, 194, 347, 924, 246, 1313, 1315, 1316, 347,
+ 194, 785, 347, 347, 690, 364, 488, 952, 1327, 515,
+ 689, 691, 320, 1377, 1294, 1312, 347, 792, 340, 365,
+ 331, 510, 258, 752, 1314, 1317, 331, 889, 690, 904,
+ 966, 556, 1122, 332, 689, 1294, 788, 689, 1318, 1319,
+ 1320, 1164, 779, 1315, 1316, 247, 971, 782, 347, 958,
+ 363, 796, 115, 1165, 1401, 690, 194, 543, 362, 194,
+ 710, 1312, 362, 1294, 347, 362, 1099, 362, 1415, 631,
+ 717, 1317, 362, 364, 799, 711, 410, 411, 953, 115,
+ 374, 542, 972, 1119, 1318, 1319, 1320, 365, 710, 964,
+ 1434, 965, 194, 194, 543, 320, 375, 250, 717, 378,
+ 490, 970, 967, 711, 827, 578, 490, 717, 1049, 320,
+ 334, 544, 1119, 1386, 946, 448, 1090, 427, 379, 380,
+ 194, 194, 428, 1386, 429, 363, 1030, 430, 431, 618,
+ 432, 433, 1390, 412, 586, 618, 701, 982, 381, 788,
+ 194, 587, 1390, 1077, 484, 231, 251, 578, 364, 382,
+ 1174, 1078, 631, 588, 194, 1022, 413, 631, 990, 631,
+ 631, 631, 631, 631, 631, 631, 631, 631, 631, 631,
+ 741, 94, 586, 804, 914, 804, 374, 804, 414, 587,
+ 1364, 631, 779, 631, 506, 631, 1204, 631, 631, 631,
+ 697, 588, 450, 691, 717, 1062, 450, 1065, 691, 882,
+ 44, 1044, 691, 1067, 1011, 320, 1046, 690, 374, 1046,
+ 94, 113, 415, 578, 730, 1099, 992, 691, 779, 1421,
+ 788, 352, 1103, 1236, 954, 352, 908, 347, 352, 1076,
+ 352, 1250, 231, 909, 1499, 352, 94, 320, 115, 806,
+ 115, 990, 631, 418, 691, 1284, 990, 714, 990, 713,
+ 490, 990, 990, 113, 990, 990, 714, 113, 713, 406,
+ 407, 194, 779, 691, 779, 347, 1108, 779, 347, 352,
+ 297, 1358, 1112, 408, 409, 807, 986, 1336, 1337, 1098,
+ 1368, 331, 331, 807, 340, 194, 1338, 340, 426, 115,
+ 808, 485, 115, 464, 808, 225, 1552, 883, 808, 992,
+ 456, 717, 331, 1329, 992, 1218, 992, 364, 456, 992,
+ 992, 788, 992, 992, 510, 452, 1105, 804, 1106, 1361,
+ 1107, 278, 278, 804, 459, 804, 347, 288, 1361, 288,
+ 278, 990, 347, 1572, 288, 486, 521, 578, 347, 512,
+ 522, 651, 347, 651, 337, 512, 69, 69, 1590, 1591,
+ 69, 113, 827, 535, 779, 347, 779, 508, 779, 986,
+ 225, 1150, 226, 176, 986, 176, 986, 176, 509, 986,
+ 986, 427, 986, 986, 531, 189, 428, 189, 429, 189,
+ 536, 430, 431, 375, 432, 433, 225, 347, 228, 992,
+ 1157, 733, 824, 331, 331, 734, 824, 194, 824, 490,
+ 824, 767, 506, 777, 537, 768, 813, 522, 577, 741,
+ 813, 579, 813, 296, 813, 297, 1183, 788, 194, 347,
+ 347, 827, 347, 347, 62, 925, 945, 540, 1098, 926,
+ 946, 1194, 871, 875, 541, 506, 871, 875, 506, 70,
+ 996, 997, 233, 70, 1221, 447, 557, 1222, 807, 986,
+ 577, 562, 807, 579, 1187, 1188, 331, 779, 655, 657,
+ 659, 661, 1074, 1217, 863, 1022, 233, 1562, 1563, 447,
+ 397, 398, 399, 570, 1155, 506, 1156, 1032, 598, 1032,
+ 113, 599, 331, 815, 1289, 815, 364, 779, 1150, 194,
+ 164, 610, 164, 796, 331, 941, 347, 941, 347, 796,
+ 1221, 693, 331, 1222, 732, 171, 796, 171, 172, 72,
+ 172, 72, 194, 113, 536, 536, 577, 347, 347, 579,
+ 691, 691, 115, 1293, 1311, 195, 1222, 195, 194, 165,
+ 368, 165, 194, 696, 779, 1199, 1200, 347, 113, 712,
+ 128, 1289, 128, 759, 1293, 347, 735, 1222, 347, 294,
+ 135, 294, 135, 779, 301, 506, 301, 737, 331, 1371,
+ 1372, 331, 647, 649, 764, 651, 653, 765, 1345, 766,
+ 1311, 817, 1293, 663, 665, 1222, 810, 819, 821, 820,
+ 822, 840, 841, 844, 1404, 845, 847, 1407, 857, 194,
+ 449, 858, 849, 513, 331, 331, 425, 870, 425, 513,
+ 872, 876, 892, 893, 450, 42, 897, 194, 194, 896,
+ 900, 918, 115, 196, 1366, 919, 1412, 425, 425, 912,
+ 343, 920, 331, 331, 347, 349, 351, 353, 355, 357,
+ 359, 361, 921, 1412, 927, 944, 947, 425, 950, 863,
+ 577, 948, 955, 579, 959, 425, 960, 968, 425, 991,
+ 115, 1444, 974, 1445, 115, 986, 993, 1006, 115, 998,
+ 1000, 741, 1007, 1009, 1010, 1012, 1015, 1017, 1023, 1035,
+ 1422, 1036, 1045, 1039, 801, 194, 1053, 525, 1101, 1060,
+ 1071, 1072, 115, 24, 1091, 25, 1115, 1125, 26, 1109,
+ 1116, 741, 741, 27, 741, 1117, 194, 28, 113, 1479,
+ 1127, 1137, 1144, 1141, 194, 741, 30, 1145, 741, 1159,
+ 1147, 1167, 1168, 32, 1163, 1166, 1506, 1169, 33, 1171,
+ 115, 1175, 34, 741, 1172, 1179, 1186, 1190, 1189, 1518,
+ 1520, 1197, 1220, 788, 36, 1202, 37, 115, 1366, 1210,
+ 38, 331, 1230, 1213, 1244, 506, 1247, 741, 39, 40,
+ 386, 1252, 41, 1260, 1249, 802, 1506, 1506, 1255, 1268,
+ 1263, 1270, 1528, 331, 1275, 1276, 1277, 1283, 1279, 113,
+ 1284, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 291, 1325, 1328, 1333, 262, 1347, 331, 629, 286,
+ 287, 288, 1330, 294, 295, 788, 113, 1331, 308, 309,
+ 1342, 1370, 1378, 1392, 1417, 317, 1409, 319, 1410, 323,
+ 1425, 1428, 1430, 1506, 335, 336, 1431, 1433, 1435, 1418,
+ 1420, 1439, 1400, 1441, 1437, 490, 490, 1442, 1447, 343,
+ 1452, 1455, 788, 1459, 1458, 1489, 325, 1470, 383, 1460,
+ 1462, 1471, 1500, 1503, 115, 1577, 1577, 1474, 1484, 1491,
+ 1504, 1510, 1586, 1586, 618, 618, 1501, 1513, 1514, 1525,
+ 1527, 565, 1530, 1524, 1532, 1538, 1545, 1549, 1529, 343,
+ 912, 629, 1553, 1556, 1554, 1564, 629, 1565, 629, 629,
+ 629, 629, 629, 629, 629, 629, 629, 629, 629, 194,
+ 1548, 1547, 1570, 1571, 1592, 1593, 1594, 9, 1028, 331,
+ 629, 552, 629, 507, 629, 910, 629, 629, 629, 911,
+ 653, 1020, 508, 465, 654, 725, 33, 506, 33, 466,
+ 331, 323, 629, 532, 637, 639, 641, 34, 817, 565,
+ 565, 565, 565, 565, 565, 565, 565, 565, 565, 565,
+ 565, 565, 565, 565, 565, 34, 194, 818, 216, 103,
+ 809, 583, 876, 841, 842, 113, 877, 113, 921, 713,
+ 24, 629, 25, 347, 327, 26, 194, 878, 738, 880,
+ 27, 354, 691, 691, 28, 713, 347, 131, 113, 317,
+ 230, 297, 383, 30, 138, 132, 114, 298, 139, 53,
+ 32, 331, 21, 1005, 1092, 33, 1192, 1193, 1344, 34,
+ 1334, 1546, 1515, 1555, 1531, 1497, 113, 1032, 1502, 113,
+ 1033, 36, 1034, 37, 331, 1028, 915, 38, 1402, 1588,
+ 1343, 1424, 529, 194, 194, 39, 40, 1580, 1526, 41,
+ 331, 465, 324, 194, 331, 1521, 1271, 1519, 547, 1446,
+ 807, 194, 194, 1579, 194, 1272, 1052, 1050, 936, 979,
+ 1389, 856, 565, 1001, 466, 612, 911, 1128, 568, 299,
+ 1389, 933, 667, 671, 1389, 669, 194, 467, 673, 194,
+ 675, 468, 469, 676, 824, 973, 1257, 470, 1389, 471,
+ 472, 473, 474, 1348, 420, 1177, 1121, 475, 1170, 1184,
+ 1110, 476, 1140, 38, 1176, 1241, 1069, 1178, 800, 691,
+ 1389, 692, 1246, 477, 1346, 1003, 478, 1002, 479, 331,
+ 331, 0, 0, 368, 0, 0, 880, 0, 0, 0,
+ 0, 0, 0, 0, 0, 843, 912, 912, 0, 0,
+ 0, 0, 480, 0, 912, 912, 912, 912, 912, 0,
+ 912, 912, 0, 912, 912, 912, 912, 912, 912, 912,
+ 912, 0, 0, 0, 0, 912, 0, 912, 912, 912,
+ 912, 912, 912, 0, 0, 912, 0, 0, 0, 912,
+ 912, 0, 912, 912, 912, 0, 0, 331, 0, 0,
+ 0, 0, 0, 0, 912, 0, 912, 0, 912, 912,
+ 0, 0, 912, 0, 912, 912, 912, 912, 912, 912,
+ 912, 912, 912, 912, 912, 912, 331, 912, 0, 0,
+ 912, 912, 0, 0, 912, 912, 0, 0, 0, 347,
+ 0, 0, 0, 749, 0, 347, 0, 0, 0, 912,
+ 912, 912, 912, 912, 0, 0, 0, 912, 912, 113,
+ 0, 912, 0, 0, 0, 0, 912, 912, 912, 912,
+ 912, 0, 0, 517, 912, 0, 912, 0, 0, 0,
+ 0, 347, 912, 912, 0, 0, 0, 797, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 912, 912, 912,
+ 912, 0, 912, 0, 0, 0, 343, 0, 0, 912,
+ 0, 0, 347, 0, 0, 0, 0, 347, 0, 347,
+ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
+ 347, 0, 0, 0, 0, 0, 347, 0, 0, 113,
+ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
+ 0, 347, 347, 0, 0, 347, 347, 347, 347, 347,
+ 38, 0, 347, 347, 38, 0, 0, 347, 347, 347,
+ 347, 347, 347, 347, 347, 38, 0, 113, 0, 0,
+ 38, 113, 0, 0, 38, 113, 347, 38, 0, 347,
+ 0, 347, 0, 347, 614, 0, 347, 0, 0, 38,
+ 38, 331, 347, 0, 38, 38, 0, 0, 0, 113,
+ 38, 0, 38, 38, 38, 38, 0, 0, 0, 0,
+ 38, 0, 0, 0, 38, 0, 38, 0, 0, 0,
+ 0, 835, 0, 0, 0, 0, 38, 0, 38, 38,
+ 0, 38, 0, 0, 0, 38, 0, 113, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 331, 0,
+ 0, 0, 0, 0, 113, 38, 0, 0, 0, 0,
+ 0, 38, 38, 0, 0, 0, 0, 614, 331, 565,
+ 0, 0, 614, 0, 614, 614, 614, 614, 614, 614,
+ 614, 614, 614, 614, 614, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 614, 0, 614, 0,
+ 614, 0, 614, 614, 614, 0, 0, 0, 0, 517,
+ 0, 0, 614, 614, 517, 517, 0, 614, 614, 0,
+ 0, 0, 0, 0, 0, 331, 331, 0, 614, 614,
+ 0, 0, 0, 0, 0, 331, 0, 517, 0, 0,
+ 0, 614, 0, 331, 331, 0, 331, 347, 0, 0,
+ 517, 517, 0, 0, 0, 517, 0, 614, 517, 0,
+ 517, 113, 517, 517, 517, 517, 0, 0, 331, 0,
+ 517, 331, 0, 0, 517, 0, 0, 0, 517, 0,
+ 0, 0, 0, 0, 0, 0, 517, 0, 0, 517,
+ 0, 517, 517, 0, 0, 0, 0, 517, 0, 517,
517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
- 517, 517, 517, 517, 517, 517, 517, 517, 517, 0,
- 0, 517, 0, 517, 0, 517, 0, 0, 517, 911,
- 911, 0, 0, 0, 517, 0, 0, 911, 911, 911,
- 911, 911, 0, 911, 911, 0, 911, 911, 911, 911,
- 911, 911, 911, 911, 0, 0, 0, 0, 911, 0,
- 911, 911, 911, 911, 911, 911, 347, 0, 911, 0,
- 0, 0, 911, 911, 0, 911, 911, 911, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 911, 0, 911,
- 0, 911, 911, 0, 0, 911, 0, 911, 911, 911,
- 911, 911, 911, 911, 911, 911, 911, 911, 911, 0,
- 911, 0, 0, 911, 911, 0, 0, 911, 911, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 911, 911, 911, 911, 911, 0, 0, 0,
- 911, 911, 0, 0, 911, 0, 0, 0, 0, 911,
- 911, 911, 911, 911, 0, 0, 0, 911, 0, 911,
- 0, 0, 0, 0, 0, 911, 911, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 911, 911, 911, 911, 0, 911, 835, 835, 0, 0,
- 0, 0, 911, 0, 835, 835, 835, 835, 835, 0,
- 835, 835, 793, 835, 835, 835, 835, 835, 835, 835,
- 0, 0, 0, 0, 0, 835, 0, 835, 835, 835,
- 835, 835, 835, 0, 0, 835, 0, 0, 0, 835,
- 835, 0, 835, 835, 835, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 835, 0, 835, 0, 835, 835,
- 0, 0, 835, 0, 835, 835, 835, 835, 835, 835,
- 835, 835, 835, 835, 835, 835, 0, 835, 0, 0,
- 835, 835, 0, 0, 835, 835, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 835,
- 835, 835, 835, 835, 0, 0, 0, 835, 835, 0,
- 0, 835, 0, 0, 0, 0, 835, 835, 835, 835,
- 835, 0, 347, 0, 835, 0, 835, 347, 347, 0,
- 0, 0, 835, 835, 0, 0, 0, 0, 0, 0,
- 0, 0, 340, 0, 0, 0, 0, 0, 0, 0,
- 347, 0, 0, 0, 0, 0, 0, 835, 835, 835,
- 835, 0, 835, 347, 347, 0, 0, 0, 347, 835,
- 0, 347, 0, 347, 0, 347, 347, 347, 347, 0,
- 0, 0, 0, 347, 0, 0, 0, 347, 0, 0,
- 0, 347, 0, 0, 0, 0, 0, 0, 0, 347,
- 0, 0, 347, 0, 347, 347, 0, 0, 0, 0,
- 347, 0, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 347, 0, 0, 0, 0, 347, 347,
- 0, 0, 0, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 0, 347, 347, 347, 0, 347, 347,
- 347, 347, 347, 0, 0, 347, 347, 0, 0, 0,
- 347, 347, 347, 347, 347, 347, 347, 347, 793, 0,
- 0, 0, 0, 793, 793, 0, 0, 0, 0, 347,
- 0, 0, 347, 0, 347, 0, 347, 0, 0, 347,
- 0, 0, 0, 0, 0, 347, 793, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 793,
- 793, 0, 0, 0, 793, 0, 0, 793, 0, 793,
- 0, 793, 793, 793, 793, 0, 0, 0, 0, 793,
- 0, 0, 0, 793, 0, 0, 0, 793, 0, 0,
- 0, 0, 0, 0, 0, 793, 0, 0, 793, 0,
- 793, 793, 0, 0, 0, 0, 793, 0, 793, 793,
- 793, 793, 793, 793, 793, 793, 793, 793, 793, 0,
- 0, 0, 0, 0, 793, 793, 0, 0, 0, 793,
- 793, 793, 793, 793, 793, 0, 793, 793, 793, 0,
- 793, 793, 372, 0, 793, 793, 793, 793, 340, 0,
- 0, 793, 793, 340, 340, 0, 793, 793, 793, 793,
- 793, 793, 793, 793, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 793, 340, 0, 793, 0,
- 793, 0, 793, 0, 0, 793, 0, 0, 0, 340,
- 340, 793, 0, 0, 340, 0, 0, 340, 0, 340,
- 0, 340, 340, 340, 340, 0, 0, 0, 0, 340,
- 0, 0, 0, 340, 0, 0, 0, 340, 0, 0,
- 0, 0, 0, 0, 0, 340, 0, 0, 340, 0,
- 340, 340, 0, 0, 0, 0, 340, 0, 340, 340,
- 340, 340, 340, 340, 340, 340, 340, 340, 340, 0,
- 0, 0, 347, 0, 340, 340, 0, 0, 347, 340,
- 340, 340, 340, 340, 340, 0, 340, 340, 340, 0,
- 340, 340, 0, 0, 340, 340, 340, 340, 0, 0,
- 0, 340, 340, 0, 0, 0, 340, 340, 340, 340,
- 340, 340, 340, 340, 347, 0, 0, 0, 0, 0,
- 31, 0, 0, 0, 0, 340, 0, 0, 340, 0,
- 340, 0, 340, 0, 0, 340, 0, 0, 0, 0,
- 0, 340, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 347, 0, 0, 0, 0,
- 347, 0, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 347, 0, 0, 0, 0, 0, 347,
- 1001, 0, 0, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 0, 347, 347, 0, 0, 347, 347,
- 347, 347, 347, 0, 0, 347, 347, 0, 0, 37,
- 347, 347, 347, 347, 347, 347, 347, 347, 372, 0,
- 0, 0, 0, 0, 372, 0, 0, 0, 0, 347,
- 0, 0, 347, 0, 347, 0, 347, 0, 0, 347,
- 0, 0, 0, 0, 0, 347, 0, 0, 0, 0,
- 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
- 372, 0, 0, 1001, 0, 0, 0, 0, 1001, 0,
- 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1001, 0, 1001, 25, 1001, 0, 1001, 1001,
- 1001, 372, 0, 0, 0, 0, 372, 0, 372, 372,
- 372, 372, 372, 372, 372, 372, 372, 372, 372, 0,
- 0, 0, 0, 0, 0, 372, 0, 0, 0, 372,
- 372, 0, 372, 372, 372, 0, 372, 372, 372, 0,
- 372, 372, 0, 0, 372, 372, 372, 372, 0, 0,
- 0, 372, 372, 1001, 0, 0, 372, 372, 372, 372,
- 372, 372, 372, 372, 0, 0, 0, 0, 0, 35,
- 0, 0, 0, 0, 0, 372, 31, 31, 372, 0,
- 372, 31, 0, 0, 0, 31, 0, 31, 0, 0,
- 31, 372, 31, 31, 0, 31, 0, 31, 0, 31,
- 0, 31, 31, 31, 31, 0, 0, 31, 31, 0,
- 0, 0, 5, 31, 0, 31, 31, 31, 0, 0,
- 31, 31, 31, 0, 31, 0, 0, 31, 0, 31,
- 31, 31, 31, 0, 0, 0, 31, 31, 31, 0,
- 0, 31, 31, 31, 0, 0, 0, 0, 0, 0,
- 31, 31, 0, 31, 31, 1009, 31, 31, 31, 0,
- 0, 0, 31, 0, 0, 0, 37, 0, 0, 0,
- 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 37, 31, 0, 0, 0, 37, 0, 31, 31,
- 37, 0, 0, 37, 0, 0, 0, 31, 51, 0,
- 0, 0, 0, 0, 0, 37, 37, 0, 0, 36,
- 37, 37, 0, 36, 0, 0, 37, 0, 37, 37,
- 37, 37, 0, 0, 36, 0, 37, 0, 0, 36,
- 37, 0, 37, 36, 0, 0, 36, 0, 31, 0,
- 0, 7, 37, 0, 37, 37, 0, 37, 36, 36,
- 0, 37, 25, 36, 36, 0, 25, 0, 0, 36,
- 0, 36, 36, 36, 36, 0, 0, 25, 0, 36,
- 0, 37, 25, 36, 0, 36, 25, 0, 37, 25,
- 0, 0, 0, 0, 1010, 36, 0, 0, 36, 0,
- 36, 25, 25, 0, 36, 0, 25, 25, 0, 0,
- 0, 0, 25, 0, 25, 25, 25, 25, 0, 0,
- 0, 0, 25, 0, 36, 0, 25, 0, 25, 0,
- 36, 36, 0, 0, 0, 0, 35, 52, 25, 0,
- 35, 25, 0, 25, 0, 0, 0, 25, 0, 0,
- 0, 35, 0, 0, 0, 0, 35, 0, 0, 0,
- 35, 0, 0, 35, 0, 0, 0, 25, 0, 0,
- 0, 0, 0, 25, 25, 35, 35, 0, 0, 5,
- 35, 35, 0, 51, 0, 0, 35, 0, 35, 35,
- 35, 35, 0, 0, 51, 0, 35, 0, 0, 51,
- 35, 0, 35, 51, 0, 0, 51, 0, 0, 0,
- 0, 0, 35, 0, 0, 35, 0, 35, 51, 51,
- 0, 35, 1009, 51, 51, 0, 51, 0, 0, 51,
- 0, 51, 51, 51, 51, 0, 0, 51, 0, 51,
- 0, 35, 51, 51, 0, 51, 51, 0, 35, 51,
- 0, 0, 0, 0, 0, 51, 0, 0, 51, 0,
- 51, 51, 51, 0, 51, 51, 51, 51, 0, 51,
- 0, 0, 51, 0, 51, 51, 51, 51, 0, 0,
- 51, 0, 51, 0, 51, 51, 51, 0, 51, 51,
- 0, 0, 51, 0, 0, 0, 0, 0, 51, 0,
- 0, 51, 0, 51, 51, 51, 0, 51, 7, 51,
- 51, 0, 52, 0, 0, 51, 0, 51, 51, 51,
- 51, 0, 0, 52, 0, 51, 0, 51, 52, 51,
- 0, 51, 52, 0, 0, 52, 0, 0, 0, 0,
- 0, 51, 0, 0, 51, 0, 51, 52, 52, 0,
- 51, 1010, 52, 52, 0, 51, 0, 0, 52, 0,
+ 0, 0, 0, 0, 0, 517, 517, 0, 0, 0,
+ 517, 517, 0, 517, 517, 517, 517, 517, 517, 517,
+ 0, 517, 517, 0, 517, 517, 517, 517, 517, 517,
+ 517, 517, 517, 517, 0, 517, 517, 517, 517, 517,
+ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517,
+ 517, 517, 517, 517, 517, 517, 517, 0, 0, 517,
+ 0, 517, 0, 517, 0, 0, 517, 835, 835, 0,
+ 0, 0, 517, 0, 0, 835, 835, 835, 835, 835,
+ 0, 835, 835, 793, 835, 835, 835, 835, 835, 835,
+ 835, 0, 0, 0, 0, 0, 835, 0, 835, 835,
+ 835, 835, 835, 835, 0, 0, 835, 0, 0, 0,
+ 835, 835, 0, 835, 835, 835, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 835, 0, 835, 0, 835,
+ 835, 0, 0, 835, 0, 835, 835, 835, 835, 835,
+ 835, 835, 835, 835, 835, 835, 835, 0, 835, 0,
+ 0, 835, 835, 0, 0, 835, 835, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 835, 835, 835, 835, 835, 0, 0, 0, 835, 835,
+ 0, 0, 835, 0, 0, 0, 0, 835, 835, 835,
+ 835, 835, 0, 347, 0, 835, 0, 835, 347, 347,
+ 0, 0, 0, 835, 835, 0, 0, 0, 0, 0,
+ 0, 0, 0, 340, 0, 0, 0, 0, 0, 0,
+ 0, 347, 0, 0, 0, 0, 0, 0, 835, 835,
+ 835, 835, 0, 835, 347, 347, 0, 0, 0, 347,
+ 835, 0, 347, 0, 347, 0, 347, 347, 347, 347,
+ 0, 0, 0, 0, 347, 0, 0, 0, 347, 0,
+ 0, 0, 347, 0, 0, 0, 0, 0, 0, 0,
+ 347, 0, 0, 347, 0, 347, 347, 0, 0, 0,
+ 0, 347, 0, 347, 347, 347, 347, 347, 347, 347,
+ 347, 347, 347, 347, 347, 0, 0, 0, 0, 347,
+ 347, 0, 0, 0, 347, 347, 347, 347, 347, 347,
+ 347, 347, 347, 347, 0, 347, 347, 0, 0, 347,
+ 347, 347, 347, 347, 0, 0, 347, 347, 0, 0,
+ 0, 347, 347, 347, 347, 347, 347, 347, 347, 793,
+ 0, 0, 0, 377, 793, 793, 0, 0, 0, 0,
+ 347, 0, 0, 347, 0, 347, 0, 347, 0, 0,
+ 347, 0, 0, 0, 0, 0, 347, 793, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 793, 0, 0, 0, 793, 0, 0, 793, 0,
+ 793, 0, 793, 793, 793, 793, 0, 0, 0, 0,
+ 793, 0, 0, 0, 793, 0, 0, 0, 793, 0,
+ 0, 0, 0, 0, 0, 0, 793, 0, 0, 793,
+ 0, 793, 793, 0, 0, 0, 0, 793, 0, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 0, 0, 0, 0, 0, 793, 793, 372, 0, 0,
+ 793, 793, 793, 793, 793, 793, 0, 793, 793, 793,
+ 0, 793, 793, 0, 0, 793, 793, 793, 793, 340,
+ 0, 0, 793, 793, 340, 340, 0, 793, 793, 793,
+ 793, 793, 793, 793, 793, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 793, 340, 0, 793,
+ 0, 793, 0, 793, 0, 0, 793, 0, 0, 0,
+ 340, 340, 793, 0, 0, 340, 0, 0, 340, 0,
+ 340, 0, 340, 340, 340, 340, 0, 0, 0, 0,
+ 340, 0, 0, 0, 340, 0, 0, 0, 340, 0,
+ 0, 0, 0, 0, 0, 0, 340, 0, 0, 340,
+ 0, 340, 340, 0, 0, 0, 0, 340, 0, 340,
+ 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
+ 0, 0, 0, 0, 0, 340, 340, 0, 0, 0,
+ 340, 340, 340, 340, 340, 340, 0, 340, 340, 340,
+ 0, 340, 340, 0, 0, 340, 340, 340, 340, 377,
+ 0, 0, 340, 340, 377, 377, 0, 340, 340, 340,
+ 340, 340, 340, 340, 340, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 340, 377, 0, 340,
+ 0, 340, 0, 340, 0, 0, 340, 0, 0, 0,
+ 377, 377, 340, 0, 0, 377, 0, 0, 377, 0,
+ 377, 0, 377, 377, 377, 377, 0, 0, 0, 0,
+ 377, 0, 0, 0, 377, 0, 0, 0, 377, 0,
+ 0, 0, 0, 0, 0, 0, 377, 0, 0, 377,
+ 0, 377, 377, 0, 0, 0, 0, 377, 0, 377,
+ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377,
+ 0, 0, 24, 372, 0, 377, 377, 0, 0, 372,
+ 377, 377, 0, 377, 377, 377, 0, 377, 377, 377,
+ 0, 377, 377, 0, 0, 377, 377, 377, 377, 0,
+ 0, 0, 377, 377, 0, 0, 0, 377, 377, 377,
+ 377, 377, 377, 377, 377, 372, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 377, 0, 0, 377,
+ 0, 377, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 377, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 372, 0, 0, 0,
+ 0, 372, 0, 372, 372, 372, 372, 372, 372, 372,
+ 372, 372, 372, 372, 0, 0, 0, 0, 0, 0,
+ 372, 0, 0, 0, 372, 372, 0, 372, 372, 372,
+ 0, 372, 372, 372, 0, 372, 372, 0, 0, 372,
+ 372, 372, 372, 0, 36, 0, 372, 372, 0, 0,
+ 0, 372, 372, 372, 372, 372, 372, 372, 372, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 372, 0, 0, 372, 0, 372, 0, 0, 0, 0,
+ 0, 0, 31, 31, 0, 0, 372, 31, 0, 0,
+ 0, 31, 0, 31, 0, 0, 31, 0, 31, 31,
+ 0, 31, 0, 31, 0, 31, 0, 31, 31, 31,
+ 31, 0, 0, 31, 31, 0, 0, 0, 25, 31,
+ 0, 31, 31, 31, 0, 0, 31, 31, 31, 0,
+ 31, 0, 0, 31, 0, 31, 31, 31, 31, 0,
+ 0, 0, 31, 31, 31, 0, 0, 31, 31, 31,
+ 0, 0, 0, 0, 0, 0, 31, 31, 0, 31,
+ 31, 35, 31, 31, 31, 0, 0, 0, 31, 24,
+ 0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 24, 0, 0, 0, 31, 24,
+ 0, 0, 0, 24, 31, 31, 24, 0, 0, 0,
+ 0, 0, 0, 31, 5, 0, 0, 0, 24, 24,
+ 0, 0, 0, 24, 24, 0, 0, 0, 0, 24,
+ 0, 24, 24, 24, 24, 0, 0, 0, 0, 24,
+ 0, 0, 37, 24, 0, 24, 37, 0, 0, 0,
+ 0, 0, 0, 0, 31, 24, 0, 37, 24, 0,
+ 24, 0, 37, 0, 24, 0, 37, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 1010, 0, 0,
+ 0, 37, 37, 0, 24, 0, 37, 37, 0, 21,
+ 24, 24, 37, 0, 37, 37, 37, 37, 0, 0,
+ 0, 0, 37, 0, 0, 0, 37, 0, 37, 0,
+ 0, 36, 0, 0, 0, 36, 0, 0, 37, 0,
+ 37, 37, 0, 37, 51, 0, 36, 37, 0, 0,
+ 0, 36, 0, 0, 0, 36, 0, 0, 36, 0,
+ 0, 0, 0, 0, 0, 0, 0, 37, 0, 0,
+ 36, 36, 0, 0, 37, 36, 36, 0, 0, 0,
+ 0, 36, 0, 36, 36, 36, 36, 0, 0, 0,
+ 0, 36, 0, 0, 0, 36, 0, 36, 0, 0,
+ 0, 0, 0, 0, 0, 25, 0, 36, 0, 25,
+ 36, 7, 36, 0, 0, 0, 36, 0, 0, 0,
+ 25, 0, 0, 0, 0, 25, 0, 0, 0, 25,
+ 0, 0, 25, 0, 0, 0, 36, 0, 0, 0,
+ 0, 0, 36, 36, 25, 25, 0, 0, 35, 25,
+ 25, 0, 35, 0, 1011, 25, 0, 25, 25, 25,
+ 25, 0, 0, 35, 0, 25, 0, 0, 35, 25,
+ 0, 25, 35, 0, 0, 35, 0, 0, 0, 0,
+ 0, 25, 0, 0, 25, 0, 25, 35, 35, 0,
+ 25, 5, 35, 35, 0, 51, 0, 52, 35, 0,
+ 35, 35, 35, 35, 0, 0, 51, 0, 35, 0,
+ 25, 51, 35, 0, 35, 51, 25, 25, 51, 0,
+ 0, 0, 0, 0, 35, 0, 0, 35, 0, 35,
+ 51, 51, 0, 35, 0, 51, 51, 0, 0, 0,
+ 0, 51, 0, 51, 51, 51, 51, 0, 0, 0,
+ 0, 51, 0, 35, 1010, 51, 0, 51, 51, 0,
+ 35, 0, 0, 0, 0, 0, 0, 51, 0, 51,
+ 51, 0, 51, 0, 51, 0, 51, 0, 51, 0,
+ 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 51, 0, 51, 0, 51, 51,
+ 0, 51, 0, 0, 51, 51, 51, 51, 51, 51,
+ 0, 0, 0, 0, 51, 0, 51, 0, 51, 0,
+ 51, 51, 0, 0, 0, 51, 0, 0, 51, 0,
+ 51, 0, 0, 51, 0, 51, 0, 0, 0, 51,
+ 51, 51, 0, 0, 0, 51, 51, 0, 0, 0,
+ 0, 51, 0, 51, 51, 51, 51, 0, 0, 51,
+ 0, 51, 0, 0, 0, 51, 0, 51, 7, 0,
+ 0, 0, 52, 0, 0, 0, 0, 51, 0, 0,
+ 51, 0, 51, 52, 0, 0, 51, 0, 52, 0,
+ 0, 0, 52, 0, 0, 52, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 51, 52, 52, 0,
+ 0, 1011, 52, 52, 0, 51, 0, 0, 52, 0,
52, 52, 52, 52, 0, 0, 51, 0, 52, 0,
- 51, 51, 52, 0, 52, 51, 0, 0, 51, 0,
+ 0, 51, 52, 0, 52, 51, 0, 0, 51, 0,
0, 0, 0, 0, 52, 0, 0, 52, 0, 52,
51, 51, 0, 52, 52, 51, 51, 0, 52, 0,
0, 51, 0, 51, 51, 51, 51, 0, 0, 52,
@@ -11164,31 +11191,31 @@ void case_1034()
347, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 347, 347, 0, 0, 0, 0, 0, 0, 347,
0, 0, 347, 0, 0, 0, 0, 0, 347, 0,
- 0, 347, 0, 0, 0, 0, 347, 0, 347, 347,
+ 201, 347, 0, 0, 0, 0, 347, 0, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
0, 0, 0, 0, 0, 347, 0, 0, 0, 0,
- 347, 347, 347, 347, 347, 347, 347, 347, 347, 0,
- 347, 347, 0, 347, 347, 347, 347, 347, 347, 347,
+ 347, 347, 347, 347, 347, 347, 347, 347, 347, 1002,
+ 347, 347, 202, 347, 347, 347, 347, 347, 347, 347,
347, 347, 347, 0, 347, 347, 347, 347, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 347, 347, 347, 0, 519, 582, 0,
- 347, 0, 347, 519, 0, 347, 0, 24, 0, 25,
- 0, 347, 26, 0, 0, 0, 0, 27, 0, 0,
- 0, 28, 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 0, 0, 0, 0, 0, 0, 32, 0, 519,
- 0, 0, 33, 0, 0, 0, 34, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
- 37, 0, 0, 0, 38, 0, 0, 0, 0, 0,
- 0, 0, 39, 40, 0, 0, 41, 0, 0, 324,
+ 347, 347, 347, 347, 347, 347, 0, 519, 0, 0,
+ 347, 0, 347, 519, 0, 347, 0, 0, 0, 0,
+ 0, 347, 203, 204, 205, 206, 0, 207, 208, 209,
+ 210, 211, 212, 213, 214, 0, 0, 215, 216, 217,
+ 218, 219, 220, 221, 222, 0, 0, 0, 0, 519,
+ 0, 0, 1002, 0, 0, 0, 0, 1002, 0, 1002,
+ 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1002, 0, 1002, 0, 1002, 0, 1002, 1002, 1002,
519, 0, 0, 0, 0, 519, 0, 519, 519, 519,
519, 519, 519, 519, 519, 519, 519, 519, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 519, 519,
519, 519, 519, 519, 519, 519, 519, 519, 0, 519,
519, 0, 519, 519, 519, 519, 519, 519, 519, 519,
- 519, 519, 0, 519, 519, 519, 519, 519, 519, 519,
+ 519, 519, 1002, 519, 519, 519, 519, 519, 519, 519,
519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
- 519, 519, 519, 519, 519, 0, 515, 641, 0, 0,
- 368, 519, 515, 0, 0, 0, 24, 0, 25, 0,
+ 519, 519, 519, 519, 519, 0, 515, 642, 0, 0,
+ 0, 519, 515, 0, 0, 0, 24, 0, 25, 0,
519, 26, 0, 0, 0, 0, 27, 0, 0, 0,
28, 0, 0, 0, 0, 0, 0, 0, 0, 30,
0, 0, 0, 0, 0, 0, 32, 0, 515, 0,
@@ -11219,7 +11246,7 @@ void case_1034()
523, 523, 523, 523, 523, 523, 523, 523, 523, 523,
0, 523, 523, 523, 523, 523, 523, 523, 523, 523,
523, 523, 523, 523, 523, 523, 523, 523, 523, 523,
- 523, 523, 523, 0, 347, 643, 0, 0, 0, 523,
+ 523, 523, 523, 0, 347, 644, 0, 0, 0, 523,
347, 0, 523, 0, 24, 0, 25, 0, 523, 26,
0, 0, 0, 0, 27, 0, 0, 0, 28, 0,
0, 0, 0, 0, 0, 0, 0, 30, 0, 0,
@@ -11235,7 +11262,7 @@ void case_1034()
347, 347, 347, 347, 347, 347, 347, 347, 347, 0,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 0, 448, 950, 0, 0, 368, 347, 448,
+ 347, 347, 0, 448, 951, 0, 0, 368, 347, 448,
0, 347, 0, 24, 0, 25, 0, 347, 26, 0,
0, 0, 0, 27, 0, 0, 0, 28, 0, 0,
0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
@@ -11251,7 +11278,7 @@ void case_1034()
448, 448, 448, 448, 448, 448, 448, 448, 0, 448,
448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
448, 448, 448, 448, 448, 448, 448, 448, 448, 448,
- 448, 0, 347, 0, 0, 0, 368, 448, 347, 1101,
+ 448, 0, 347, 0, 0, 0, 368, 448, 347, 1102,
448, 0, 796, 0, 0, 0, 448, 0, 24, 0,
25, 0, 0, 26, 0, 0, 0, 0, 27, 0,
0, 0, 28, 0, 0, 0, 0, 0, 0, 0,
@@ -11269,27 +11296,27 @@ void case_1034()
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
0, 0, 0, 0, 347, 0, 347, 0, 0, 347,
0, 368, 0, 0, 0, 347, 0, 0, 557, 0,
- 0, 0, 629, 557, 0, 557, 557, 557, 557, 557,
+ 0, 0, 0, 557, 0, 557, 557, 557, 557, 557,
557, 557, 557, 557, 557, 557, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 557, 0, 557,
0, 557, 0, 557, 557, 557, 0, 557, 557, 0,
557, 557, 557, 557, 557, 557, 557, 557, 557, 557,
- 0, 0, 0, 557, 557, 557, 557, 557, 557, 557,
+ 369, 0, 0, 557, 557, 557, 557, 557, 557, 557,
557, 557, 557, 557, 557, 557, 557, 557, 557, 557,
- 557, 579, 557, 0, 0, 0, 0, 579, 0, 0,
- 0, 0, 0, 0, 0, 629, 0, 0, 557, 0,
- 629, 0, 629, 629, 629, 629, 629, 629, 629, 629,
- 629, 629, 629, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 579, 629, 0, 629, 0, 629, 0,
- 629, 629, 629, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 629, 0, 0, 586,
+ 557, 579, 557, 369, 0, 0, 0, 579, 0, 0,
+ 0, 0, 0, 0, 0, 0, 369, 0, 557, 0,
+ 0, 369, 0, 0, 240, 0, 369, 0, 369, 369,
+ 369, 369, 0, 0, 0, 0, 369, 0, 0, 0,
+ 369, 0, 0, 579, 369, 0, 0, 0, 0, 0,
+ 0, 0, 369, 0, 0, 369, 0, 369, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 586,
0, 0, 0, 0, 0, 586, 0, 0, 0, 0,
- 0, 0, 0, 0, 579, 0, 0, 0, 0, 579,
+ 0, 369, 0, 0, 579, 0, 0, 369, 0, 579,
0, 579, 579, 579, 579, 579, 579, 579, 579, 579,
- 579, 579, 0, 0, 0, 629, 0, 0, 0, 0,
+ 579, 579, 0, 0, 0, 0, 0, 0, 0, 0,
0, 586, 0, 579, 0, 579, 0, 579, 0, 579,
579, 579, 0, 579, 579, 0, 0, 579, 579, 579,
- 579, 579, 579, 579, 579, 579, 0, 0, 0, 579,
+ 579, 579, 579, 579, 579, 579, 0, 369, 0, 579,
579, 579, 579, 579, 579, 579, 579, 0, 0, 0,
0, 0, 586, 0, 0, 0, 0, 586, 579, 586,
586, 586, 586, 586, 586, 586, 586, 586, 586, 586,
@@ -11381,403 +11408,425 @@ void case_1034()
610, 610, 0, 0, 0, 0, 609, 0, 0, 0,
0, 0, 0, 610, 0, 610, 0, 610, 0, 610,
610, 610, 0, 0, 0, 0, 0, 0, 0, 610,
- 610, 0, 0, 0, 610, 610, 0, 614, 0, 0,
+ 610, 0, 0, 0, 610, 610, 0, 615, 0, 0,
0, 0, 0, 610, 610, 610, 610, 0, 0, 0,
0, 0, 611, 0, 0, 0, 0, 611, 610, 611,
611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
0, 0, 0, 0, 610, 0, 0, 0, 0, 0,
0, 611, 0, 611, 0, 611, 0, 611, 611, 611,
0, 0, 0, 0, 0, 0, 0, 611, 611, 0,
- 0, 0, 611, 611, 0, 615, 0, 0, 0, 0,
+ 0, 0, 611, 611, 0, 617, 0, 0, 0, 0,
0, 611, 611, 611, 611, 0, 0, 0, 0, 0,
- 614, 0, 0, 0, 0, 614, 611, 614, 614, 614,
- 614, 614, 614, 614, 614, 614, 614, 614, 0, 0,
- 0, 0, 611, 0, 0, 0, 0, 0, 0, 614,
- 0, 614, 0, 614, 0, 614, 614, 614, 0, 0,
- 0, 0, 0, 0, 0, 614, 614, 0, 0, 0,
- 614, 614, 0, 617, 0, 0, 0, 0, 0, 0,
- 0, 614, 614, 0, 0, 0, 0, 0, 615, 0,
- 0, 0, 0, 615, 614, 615, 615, 615, 615, 615,
- 615, 615, 615, 615, 615, 615, 0, 0, 0, 0,
- 614, 0, 0, 0, 0, 0, 0, 615, 0, 615,
- 0, 615, 0, 615, 615, 615, 0, 0, 0, 0,
- 0, 0, 0, 615, 615, 0, 0, 0, 615, 615,
- 0, 618, 0, 0, 0, 0, 0, 0, 0, 615,
- 615, 0, 0, 0, 0, 0, 617, 0, 0, 0,
- 0, 617, 615, 617, 617, 617, 617, 617, 617, 617,
- 617, 617, 617, 617, 0, 0, 0, 0, 615, 0,
- 0, 0, 0, 0, 0, 617, 0, 617, 0, 617,
- 0, 617, 617, 617, 0, 0, 0, 0, 0, 0,
- 0, 0, 617, 0, 0, 0, 617, 617, 0, 620,
- 0, 0, 0, 0, 0, 0, 0, 617, 617, 0,
- 0, 0, 0, 0, 618, 0, 0, 0, 0, 618,
- 617, 618, 618, 618, 618, 618, 618, 618, 618, 618,
- 618, 618, 0, 0, 0, 0, 617, 0, 0, 0,
- 0, 0, 0, 618, 0, 618, 0, 618, 0, 618,
- 618, 618, 0, 0, 0, 0, 0, 0, 0, 0,
- 618, 0, 0, 0, 618, 618, 0, 621, 0, 0,
- 0, 0, 0, 0, 0, 618, 618, 0, 0, 0,
- 0, 0, 620, 0, 0, 0, 0, 620, 618, 620,
- 620, 620, 620, 620, 620, 620, 620, 620, 620, 620,
- 0, 0, 0, 0, 618, 0, 0, 0, 0, 0,
- 0, 620, 0, 620, 0, 620, 0, 620, 620, 620,
- 0, 0, 0, 0, 0, 0, 0, 0, 620, 0,
- 0, 0, 0, 620, 0, 623, 0, 0, 0, 0,
- 0, 0, 0, 620, 620, 0, 0, 0, 0, 0,
- 621, 0, 0, 0, 0, 621, 620, 621, 621, 621,
- 621, 621, 621, 621, 621, 621, 621, 621, 0, 0,
- 0, 0, 620, 0, 0, 0, 0, 0, 0, 621,
- 0, 621, 0, 621, 0, 621, 621, 621, 0, 0,
- 0, 0, 0, 0, 0, 0, 621, 0, 0, 0,
- 0, 621, 0, 624, 0, 0, 0, 0, 0, 0,
- 0, 621, 621, 0, 0, 0, 0, 0, 623, 0,
- 0, 0, 0, 623, 621, 623, 623, 623, 623, 623,
- 623, 623, 623, 623, 623, 623, 0, 0, 0, 0,
- 621, 0, 0, 0, 0, 0, 0, 623, 0, 623,
- 0, 623, 0, 623, 623, 623, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 623,
- 0, 626, 0, 0, 0, 0, 0, 0, 0, 623,
- 623, 0, 0, 0, 0, 0, 624, 0, 0, 0,
- 0, 624, 623, 624, 624, 624, 624, 624, 624, 624,
- 624, 624, 624, 624, 0, 0, 0, 0, 623, 0,
- 0, 0, 0, 0, 0, 624, 0, 624, 0, 624,
- 0, 624, 624, 624, 0, 0, 0, 627, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 624, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 624, 624, 0,
- 0, 0, 0, 0, 626, 0, 0, 0, 0, 626,
- 624, 626, 626, 626, 626, 626, 626, 626, 626, 626,
- 626, 626, 0, 0, 0, 0, 624, 0, 0, 0,
- 0, 0, 0, 626, 0, 626, 0, 626, 0, 626,
- 626, 626, 0, 0, 0, 0, 347, 0, 0, 0,
- 796, 0, 0, 0, 0, 626, 0, 0, 0, 0,
- 627, 0, 0, 0, 0, 627, 626, 627, 627, 627,
- 627, 627, 627, 627, 627, 627, 627, 627, 626, 0,
- 0, 0, 347, 0, 0, 0, 0, 0, 0, 627,
- 0, 627, 0, 627, 626, 627, 627, 627, 796, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 627, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 627, 0, 0, 0, 0, 0, 0, 0,
+ 615, 0, 0, 0, 0, 615, 611, 615, 615, 615,
+ 615, 615, 615, 615, 615, 615, 615, 615, 0, 0,
+ 0, 0, 611, 0, 0, 0, 0, 0, 0, 615,
+ 0, 615, 0, 615, 0, 615, 615, 615, 0, 0,
+ 0, 0, 0, 0, 0, 615, 615, 0, 0, 0,
+ 615, 615, 0, 618, 0, 0, 0, 0, 0, 0,
+ 0, 615, 615, 0, 0, 0, 0, 0, 617, 0,
+ 0, 0, 0, 617, 615, 617, 617, 617, 617, 617,
+ 617, 617, 617, 617, 617, 617, 0, 0, 0, 0,
+ 615, 0, 0, 0, 0, 0, 0, 617, 0, 617,
+ 0, 617, 0, 617, 617, 617, 0, 0, 0, 0,
+ 0, 0, 0, 0, 617, 0, 0, 0, 617, 617,
+ 0, 620, 0, 0, 0, 0, 0, 0, 0, 617,
+ 617, 0, 0, 0, 0, 0, 618, 0, 0, 0,
+ 0, 618, 617, 618, 618, 618, 618, 618, 618, 618,
+ 618, 618, 618, 618, 0, 0, 0, 0, 617, 0,
+ 0, 0, 0, 0, 0, 618, 0, 618, 0, 618,
+ 0, 618, 618, 618, 0, 0, 0, 0, 0, 0,
+ 0, 0, 618, 0, 0, 0, 618, 618, 0, 621,
+ 0, 0, 0, 0, 0, 0, 0, 618, 618, 0,
+ 0, 0, 0, 0, 620, 0, 0, 0, 0, 620,
+ 618, 620, 620, 620, 620, 620, 620, 620, 620, 620,
+ 620, 620, 0, 0, 0, 0, 618, 0, 0, 0,
+ 0, 0, 0, 620, 0, 620, 0, 620, 0, 620,
+ 620, 620, 0, 0, 0, 0, 0, 0, 0, 0,
+ 620, 0, 0, 0, 0, 620, 0, 623, 0, 0,
+ 0, 0, 0, 0, 0, 620, 620, 0, 0, 0,
+ 0, 0, 621, 0, 0, 0, 0, 621, 620, 621,
+ 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
+ 0, 0, 0, 0, 620, 0, 0, 0, 0, 0,
+ 0, 621, 0, 621, 0, 621, 0, 621, 621, 621,
+ 0, 0, 0, 0, 0, 0, 0, 0, 621, 0,
+ 0, 0, 0, 621, 0, 624, 0, 0, 0, 0,
+ 0, 0, 0, 621, 621, 0, 0, 0, 0, 0,
+ 623, 0, 0, 0, 0, 623, 621, 623, 623, 623,
+ 623, 623, 623, 623, 623, 623, 623, 623, 0, 0,
+ 0, 0, 621, 0, 0, 0, 0, 0, 0, 623,
+ 0, 623, 0, 623, 0, 623, 623, 623, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 623, 0, 626, 0, 0, 0, 0, 0, 0,
+ 0, 623, 623, 0, 0, 0, 0, 0, 624, 0,
+ 0, 0, 0, 624, 623, 624, 624, 624, 624, 624,
+ 624, 624, 624, 624, 624, 624, 0, 0, 0, 0,
+ 623, 0, 0, 0, 0, 0, 0, 624, 0, 624,
+ 0, 624, 0, 624, 624, 624, 0, 0, 0, 627,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 624,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 624,
+ 624, 0, 0, 0, 0, 0, 626, 0, 0, 0,
+ 0, 626, 624, 626, 626, 626, 626, 626, 626, 626,
+ 626, 626, 626, 626, 0, 0, 0, 0, 624, 0,
+ 0, 0, 0, 0, 0, 626, 0, 626, 0, 626,
+ 0, 626, 626, 626, 0, 0, 0, 0, 347, 0,
+ 0, 0, 796, 0, 0, 0, 0, 626, 0, 0,
+ 0, 0, 627, 0, 0, 0, 0, 627, 626, 627,
+ 627, 627, 627, 627, 627, 627, 627, 627, 627, 627,
+ 626, 0, 0, 0, 347, 0, 0, 0, 0, 0,
+ 0, 627, 0, 627, 0, 627, 626, 627, 627, 627,
+ 796, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 627, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 627, 0, 0, 0, 0, 0,
- 0, 347, 0, 0, 0, 0, 0, 347, 0, 0,
- 627, 0, 347, 347, 0, 347, 0, 347, 0, 796,
- 347, 0, 347, 347, 0, 347, 347, 347, 347, 347,
- 347, 347, 347, 347, 347, 0, 347, 347, 347, 347,
+ 0, 0, 0, 0, 0, 0, 627, 0, 0, 0,
+ 0, 0, 0, 347, 0, 0, 0, 0, 0, 347,
+ 0, 0, 627, 0, 347, 347, 0, 347, 0, 347,
+ 0, 796, 347, 0, 347, 347, 0, 347, 347, 347,
+ 347, 347, 347, 347, 347, 347, 347, 0, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 347, 347, 347, 347, 347, 347, 347, 0, 0,
- 571, 0, 347, 0, 347, 0, 0, 347, 56, 24,
- 57, 25, 1129, 347, 26, 58, 0, 59, 60, 27,
- 61, 62, 63, 28, 0, 0, 0, 0, 0, 64,
- 0, 65, 30, 66, 67, 68, 69, 0, 0, 32,
- 0, 0, 0, 70, 33, 0, 71, 72, 34, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 73, 0,
- 36, 0, 37, 74, 0, 0, 38, 0, 75, 76,
- 77, 78, 79, 80, 39, 40, 81, 82, 41, 83,
- 0, 84, 0, 0, 85, 86, 0, 0, 87, 88,
+ 347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
+ 0, 0, 572, 0, 347, 0, 347, 0, 0, 347,
+ 56, 24, 57, 25, 1130, 347, 26, 58, 0, 59,
+ 60, 27, 61, 62, 63, 28, 0, 0, 0, 0,
+ 0, 64, 0, 65, 30, 66, 67, 68, 69, 0,
+ 0, 32, 0, 0, 0, 70, 33, 0, 71, 72,
+ 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 73, 0, 36, 0, 37, 74, 0, 0, 38, 0,
+ 75, 76, 77, 78, 79, 80, 39, 40, 81, 82,
+ 41, 83, 0, 84, 0, 0, 85, 86, 0, 0,
+ 87, 88, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 89, 90, 91, 92, 93,
+ 0, 0, 0, 94, 0, 0, 0, 95, 0, 0,
+ 0, 0, 96, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 0, 0, 0, 0, 0, 103, 104,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 55, 0, 105, 573, 107, 108, 0, 1131, 56,
+ 24, 57, 25, 0, 0, 26, 58, 0, 59, 60,
+ 27, 61, 62, 63, 28, 0, 0, 0, 0, 0,
+ 64, 0, 65, 30, 66, 67, 68, 69, 0, 0,
+ 32, 0, 0, 0, 70, 33, 0, 71, 72, 34,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,
+ 0, 36, 0, 37, 74, 0, 0, 38, 0, 75,
+ 76, 77, 78, 79, 80, 39, 40, 81, 82, 41,
+ 83, 0, 84, 0, 0, 85, 86, 0, 0, 87,
+ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 89, 90, 91, 92, 93, 0,
+ 0, 0, 94, 0, 0, 0, 95, 0, 0, 0,
+ 0, 96, 97, 98, 99, 100, 0, 0, 0, 101,
+ 0, 102, 0, 0, 0, 0, 0, 103, 104, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 89, 90, 91, 92, 93, 0, 0,
- 0, 94, 0, 0, 0, 95, 0, 0, 0, 0,
- 96, 97, 98, 99, 100, 0, 0, 0, 101, 0,
- 102, 0, 0, 0, 0, 0, 103, 104, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 266, 0,
+ 0, 0, 105, 106, 107, 108, 56, 24, 57, 25,
+ 0, 0, 26, 58, 0, 59, 60, 27, 61, 62,
+ 63, 28, 0, 0, 0, 0, 0, 64, 0, 65,
+ 30, 66, 67, 68, 69, 0, 0, 32, 0, 0,
+ 0, 70, 33, 0, 71, 72, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 73, 0, 36, 0,
+ 37, 74, 0, 0, 38, 0, 75, 76, 77, 78,
+ 79, 80, 39, 40, 81, 82, 41, 83, 0, 84,
+ 0, 0, 85, 86, 0, 0, 87, 88, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 89, 90, 91, 92, 93, 0, 0, 0, 94,
+ 0, 0, 0, 95, 0, 0, 0, 0, 96, 97,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 0,
+ 0, 0, 0, 0, 103, 104, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
- 0, 105, 572, 107, 108, 0, 1130, 56, 24, 57,
- 25, 0, 0, 26, 58, 0, 59, 60, 27, 61,
- 62, 63, 28, 0, 0, 0, 0, 0, 64, 0,
- 65, 30, 66, 67, 68, 69, 0, 0, 32, 0,
- 0, 0, 70, 33, 0, 71, 72, 34, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 73, 0, 36,
- 0, 37, 74, 0, 0, 38, 0, 75, 76, 77,
- 78, 79, 80, 39, 40, 81, 82, 41, 83, 0,
- 84, 0, 0, 85, 86, 0, 0, 87, 88, 0,
+ 0, 0, 0, 0, 0, 572, 0, 0, 0, 105,
+ 106, 107, 108, 56, 24, 57, 25, 0, 0, 26,
+ 58, 0, 59, 60, 27, 61, 62, 63, 28, 0,
+ 0, 0, 0, 0, 64, 0, 65, 30, 66, 67,
+ 68, 69, 0, 0, 32, 0, 0, 0, 70, 33,
+ 0, 71, 72, 34, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 73, 0, 36, 0, 37, 74, 0,
+ 0, 38, 0, 75, 76, 77, 78, 79, 80, 39,
+ 40, 81, 82, 41, 83, 0, 84, 0, 0, 85,
+ 86, 0, 0, 87, 88, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
+ 91, 92, 93, 0, 0, 0, 94, 0, 0, 0,
+ 95, 0, 0, 0, 0, 96, 97, 98, 99, 100,
+ 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
+ 0, 103, 104, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1007, 0, 0, 0, 105, 573, 107, 108,
+ 1007, 1007, 1007, 1007, 0, 0, 1007, 1007, 0, 1007,
+ 1007, 1007, 1007, 1007, 1007, 1007, 0, 0, 0, 0,
+ 0, 1007, 0, 1007, 1007, 1007, 1007, 1007, 1007, 0,
+ 0, 1007, 0, 0, 0, 1007, 1007, 0, 1007, 1007,
+ 1007, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1007, 0, 1007, 0, 1007, 1007, 0, 0, 1007, 0,
+ 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007, 1007,
+ 1007, 1007, 0, 1007, 0, 0, 1007, 1007, 0, 0,
+ 1007, 1007, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1007, 1007, 1007, 1007, 1007,
+ 0, 0, 0, 1007, 0, 0, 0, 1007, 0, 0,
+ 0, 0, 1007, 1007, 1007, 1007, 1007, 0, 0, 0,
+ 1007, 0, 1007, 0, 0, 0, 0, 0, 1007, 1007,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 613,
+ 0, 0, 0, 1007, 1007, 1007, 1007, 56, 24, 0,
+ 25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
+ 62, 0, 28, 0, 0, 182, 0, 182, 64, 0,
+ 182, 30, 0, 0, 0, 182, 0, 0, 32, 182,
+ 0, 0, 0, 33, 0, 71, 72, 34, 182, 614,
+ 0, 0, 0, 0, 0, 182, 615, 0, 0, 36,
+ 182, 37, 74, 0, 182, 38, 0, 0, 76, 0,
+ 78, 0, 80, 39, 40, 255, 182, 41, 182, 0,
+ 0, 0, 182, 0, 616, 0, 0, 87, 88, 0,
+ 182, 182, 0, 0, 182, 0, 0, 182, 0, 0,
0, 0, 89, 90, 91, 92, 93, 0, 0, 0,
- 94, 0, 0, 0, 95, 0, 0, 0, 0, 96,
+ 0, 0, 0, 0, 95, 0, 0, 617, 0, 0,
97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
- 0, 0, 0, 0, 0, 103, 104, 0, 0, 0,
+ 0, 0, 1031, 0, 0, 103, 104, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 786, 0, 0, 0,
+ 105, 106, 107, 108, 56, 24, 0, 25, 0, 0,
+ 26, 254, 0, 0, 0, 27, 61, 62, 182, 28,
+ 0, 0, 182, 0, 182, 64, 0, 182, 30, 0,
+ 0, 0, 182, 0, 0, 32, 182, 0, 0, 0,
+ 33, 0, 71, 72, 34, 182, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 36, 182, 37, 74,
+ 0, 182, 38, 0, 0, 76, 0, 78, 0, 80,
+ 39, 40, 255, 182, 41, 182, 0, 0, 0, 182,
+ 0, 86, 0, 0, 87, 88, 0, 182, 182, 0,
+ 0, 182, 0, 0, 182, 0, 0, 0, 0, 89,
+ 90, 91, 92, 302, 0, 0, 0, 531, 787, 0,
+ 0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
+ 100, 0, 0, 0, 101, 0, 102, 1031, 0, 0,
+ 0, 0, 103, 104, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 977, 0, 0, 0, 105, 303, 107,
+ 108, 56, 24, 0, 25, 0, 0, 26, 254, 0,
+ 0, 0, 27, 61, 62, 182, 28, 0, 0, 24,
+ 0, 25, 64, 0, 26, 30, 0, 0, 0, 27,
+ 0, 0, 32, 28, 0, 0, 0, 33, 0, 71,
+ 72, 34, 30, 614, 0, 0, 0, 0, 0, 32,
+ 615, 0, 0, 36, 33, 37, 74, 0, 34, 38,
+ 0, 0, 76, 0, 78, 0, 80, 39, 40, 255,
+ 36, 41, 37, 0, 0, 0, 38, 0, 616, 0,
+ 0, 87, 88, 0, 39, 40, 0, 0, 41, 0,
+ 0, 324, 0, 0, 0, 0, 89, 90, 91, 92,
+ 93, 0, 0, 0, 0, 0, 0, 0, 95, 0,
+ 0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
+ 0, 101, 0, 102, 0, 0, 0, 0, 0, 103,
+ 104, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 266, 0, 0, 0,
- 105, 106, 107, 108, 56, 24, 57, 25, 0, 0,
- 26, 58, 0, 59, 60, 27, 61, 62, 63, 28,
- 0, 0, 0, 0, 0, 64, 0, 65, 30, 66,
- 67, 68, 69, 0, 0, 32, 0, 0, 0, 70,
+ 786, 0, 0, 0, 105, 106, 107, 108, 56, 24,
+ 0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
+ 61, 62, 368, 28, 0, 0, 24, 0, 25, 64,
+ 0, 26, 30, 0, 0, 0, 27, 0, 0, 32,
+ 28, 0, 0, 0, 33, 0, 71, 72, 34, 30,
+ 0, 0, 0, 0, 0, 0, 32, 0, 0, 0,
+ 36, 33, 37, 74, 983, 34, 38, 0, 0, 76,
+ 0, 78, 0, 80, 39, 40, 255, 36, 41, 37,
+ 0, 0, 0, 38, 0, 86, 0, 0, 87, 88,
+ 0, 39, 40, 0, 0, 41, 0, 0, 533, 0,
+ 0, 0, 0, 89, 90, 91, 92, 302, 0, 0,
+ 0, 531, 0, 0, 0, 95, 0, 0, 0, 0,
+ 0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
+ 102, 0, 0, 0, 0, 0, 103, 104, 0, 0,
+ 0, 0, 0, 0, 56, 24, 0, 25, 0, 0,
+ 26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
+ 0, 105, 303, 107, 108, 64, 0, 0, 30, 0,
+ 0, 0, 0, 0, 0, 32, 0, 0, 0, 368,
33, 0, 71, 72, 34, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 73, 0, 36, 0, 37, 74,
- 0, 0, 38, 0, 75, 76, 77, 78, 79, 80,
- 39, 40, 81, 82, 41, 83, 0, 84, 0, 0,
- 85, 86, 0, 0, 87, 88, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 36, 0, 37, 74,
+ 0, 0, 38, 0, 0, 76, 0, 78, 0, 80,
+ 39, 40, 255, 0, 41, 0, 0, 0, 0, 0,
+ 0, 86, 0, 0, 87, 88, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
- 90, 91, 92, 93, 0, 0, 0, 94, 0, 0,
- 0, 95, 0, 0, 0, 0, 96, 97, 98, 99,
+ 90, 91, 92, 769, 0, 0, 0, 770, 1051, 0,
+ 0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
100, 0, 0, 0, 101, 0, 102, 0, 0, 0,
0, 0, 103, 104, 0, 0, 0, 0, 0, 0,
+ 56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
+ 0, 27, 61, 62, 0, 28, 0, 105, 771, 107,
+ 108, 64, 0, 0, 30, 0, 0, 0, 772, 0,
+ 0, 32, 0, 0, 0, 0, 33, 0, 71, 72,
+ 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 36, 0, 37, 74, 0, 0, 38, 0,
+ 0, 76, 0, 78, 0, 80, 39, 40, 255, 0,
+ 41, 0, 0, 0, 0, 0, 0, 86, 0, 0,
+ 87, 88, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 89, 90, 91, 92, 769,
+ 0, 0, 0, 770, 0, 0, 0, 95, 0, 0,
+ 0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 0, 0, 0, 0, 0, 103, 104,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 571, 0, 0, 0, 105, 106, 107,
- 108, 56, 24, 57, 25, 0, 0, 26, 58, 0,
- 59, 60, 27, 61, 62, 63, 28, 0, 0, 0,
- 0, 0, 64, 0, 65, 30, 66, 67, 68, 69,
- 0, 0, 32, 0, 0, 0, 70, 33, 0, 71,
- 72, 34, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 73, 0, 36, 0, 37, 74, 0, 0, 38,
- 0, 75, 76, 77, 78, 79, 80, 39, 40, 81,
- 82, 41, 83, 0, 84, 0, 0, 85, 86, 0,
- 0, 87, 88, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 89, 90, 91, 92,
- 93, 0, 0, 0, 94, 0, 0, 0, 95, 0,
- 0, 0, 0, 96, 97, 98, 99, 100, 0, 0,
- 0, 101, 0, 102, 0, 0, 0, 0, 0, 103,
- 104, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1006, 0, 0, 0, 105, 572, 107, 108, 1006, 1006,
- 1006, 1006, 0, 0, 1006, 1006, 0, 1006, 1006, 1006,
- 1006, 1006, 1006, 1006, 0, 0, 0, 0, 0, 1006,
- 0, 1006, 1006, 1006, 1006, 1006, 1006, 0, 0, 1006,
- 0, 0, 0, 1006, 1006, 0, 1006, 1006, 1006, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1006, 0,
- 1006, 0, 1006, 1006, 0, 0, 1006, 0, 1006, 1006,
- 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006,
- 0, 1006, 0, 0, 1006, 1006, 0, 0, 1006, 1006,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1006, 1006, 1006, 1006, 1006, 0, 0,
- 0, 1006, 0, 0, 0, 1006, 0, 0, 0, 0,
- 1006, 1006, 1006, 1006, 1006, 0, 0, 0, 1006, 0,
- 1006, 0, 0, 0, 0, 0, 1006, 1006, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 612, 0, 0,
- 0, 1006, 1006, 1006, 1006, 56, 24, 0, 25, 0,
- 0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
- 28, 0, 0, 182, 0, 182, 64, 0, 182, 30,
- 0, 0, 0, 182, 0, 0, 32, 182, 0, 0,
- 0, 33, 0, 71, 72, 34, 182, 613, 0, 0,
- 0, 0, 0, 182, 614, 0, 0, 36, 182, 37,
- 74, 0, 182, 38, 0, 0, 76, 0, 78, 0,
- 80, 39, 40, 255, 182, 41, 182, 0, 0, 0,
- 182, 0, 615, 0, 0, 87, 88, 0, 182, 182,
- 0, 0, 182, 0, 0, 182, 0, 0, 0, 0,
- 89, 90, 91, 92, 93, 0, 0, 0, 0, 0,
- 0, 0, 95, 0, 0, 616, 0, 0, 97, 98,
- 99, 100, 0, 0, 0, 101, 0, 102, 0, 0,
- 1030, 0, 0, 103, 104, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 785, 0, 0, 0, 105, 106,
- 107, 108, 56, 24, 0, 25, 0, 0, 26, 254,
- 0, 0, 0, 27, 61, 62, 182, 28, 0, 0,
- 182, 0, 182, 64, 0, 182, 30, 0, 0, 0,
- 182, 0, 0, 32, 182, 0, 0, 0, 33, 0,
- 71, 72, 34, 182, 0, 0, 0, 0, 0, 0,
- 182, 0, 0, 0, 36, 182, 37, 74, 0, 182,
- 38, 0, 0, 76, 0, 78, 0, 80, 39, 40,
- 255, 182, 41, 182, 0, 0, 0, 182, 0, 86,
- 0, 0, 87, 88, 0, 182, 182, 0, 0, 182,
- 0, 0, 182, 0, 0, 0, 0, 89, 90, 91,
- 92, 302, 0, 0, 0, 531, 786, 0, 0, 95,
- 0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 1030, 0, 0, 0, 0,
- 103, 104, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 976, 0, 0, 0, 105, 303, 107, 108, 56,
- 24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
- 27, 61, 62, 182, 28, 0, 0, 24, 0, 25,
+ 0, 786, 0, 105, 771, 107, 108, 0, 0, 56,
+ 24, 0, 25, 0, 772, 26, 254, 0, 0, 0,
+ 27, 61, 62, 0, 28, 0, 0, 24, 0, 25,
64, 0, 26, 30, 0, 0, 0, 27, 0, 0,
32, 28, 0, 0, 0, 33, 0, 71, 72, 34,
- 30, 613, 0, 0, 0, 0, 0, 32, 614, 0,
+ 30, 0, 0, 0, 0, 0, 0, 32, 0, 0,
0, 36, 33, 37, 74, 0, 34, 38, 0, 0,
76, 0, 78, 0, 80, 39, 40, 255, 36, 41,
- 37, 0, 0, 0, 38, 0, 615, 0, 0, 87,
- 88, 0, 39, 40, 0, 0, 41, 0, 0, 324,
- 0, 0, 0, 0, 89, 90, 91, 92, 93, 0,
- 0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
+ 37, 0, 0, 0, 38, 0, 86, 0, 0, 87,
+ 88, 0, 39, 40, 0, 0, 41, 0, 0, 589,
+ 0, 0, 0, 0, 89, 90, 91, 92, 302, 0,
+ 0, 0, 531, 0, 0, 0, 95, 0, 0, 0,
0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
0, 102, 0, 0, 0, 0, 0, 103, 104, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 785, 0,
- 0, 0, 105, 106, 107, 108, 56, 24, 0, 25,
+ 0, 0, 0, 0, 0, 0, 0, 0, 778, 0,
+ 0, 0, 105, 303, 107, 108, 56, 24, 0, 25,
0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
368, 28, 0, 0, 24, 0, 25, 64, 0, 26,
30, 0, 0, 0, 27, 0, 0, 32, 28, 0,
0, 0, 33, 0, 71, 72, 34, 30, 0, 0,
0, 0, 0, 0, 32, 0, 0, 0, 36, 33,
- 37, 74, 982, 34, 38, 0, 0, 76, 0, 78,
+ 37, 74, 0, 34, 38, 0, 0, 76, 0, 78,
0, 80, 39, 40, 255, 36, 41, 37, 0, 0,
0, 38, 0, 86, 0, 0, 87, 88, 0, 39,
- 40, 0, 0, 41, 0, 0, 533, 0, 0, 0,
- 0, 89, 90, 91, 92, 302, 0, 0, 0, 531,
- 0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
+ 40, 0, 0, 41, 0, 0, 802, 0, 0, 0,
+ 0, 89, 90, 91, 92, 302, 0, 0, 0, 0,
+ 935, 0, 0, 95, 0, 0, 0, 0, 0, 97,
98, 99, 100, 0, 0, 0, 101, 0, 102, 0,
0, 0, 0, 0, 103, 104, 0, 0, 0, 0,
- 0, 0, 56, 24, 0, 25, 0, 0, 26, 254,
- 0, 0, 0, 27, 61, 62, 0, 28, 0, 105,
- 303, 107, 108, 64, 0, 0, 30, 0, 0, 0,
- 0, 0, 0, 32, 0, 0, 0, 368, 33, 0,
- 71, 72, 34, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 36, 0, 37, 74, 0, 0,
- 38, 0, 0, 76, 0, 78, 0, 80, 39, 40,
- 255, 0, 41, 0, 0, 0, 0, 0, 0, 86,
- 0, 0, 87, 88, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 89, 90, 91,
- 92, 768, 0, 0, 0, 769, 1050, 0, 0, 95,
- 0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 0, 0, 0, 0, 0,
- 103, 104, 0, 0, 0, 0, 0, 0, 56, 24,
- 0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
- 61, 62, 0, 28, 0, 105, 770, 107, 108, 64,
- 0, 0, 30, 0, 0, 0, 771, 0, 0, 32,
- 0, 0, 0, 0, 33, 0, 71, 72, 34, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 36, 0, 37, 74, 0, 0, 38, 0, 0, 76,
- 0, 78, 0, 80, 39, 40, 255, 0, 41, 0,
- 0, 0, 0, 0, 0, 86, 0, 0, 87, 88,
+ 0, 0, 0, 0, 0, 980, 0, 0, 0, 105,
+ 303, 107, 108, 56, 24, 0, 25, 0, 0, 26,
+ 254, 0, 0, 0, 27, 61, 62, 368, 28, 0,
+ 0, 502, 0, 502, 64, 0, 502, 30, 0, 0,
+ 0, 502, 0, 0, 32, 502, 0, 0, 0, 33,
+ 0, 71, 72, 34, 502, 0, 0, 0, 0, 0,
+ 0, 502, 0, 0, 0, 36, 502, 37, 74, 0,
+ 502, 38, 0, 0, 76, 0, 78, 0, 80, 39,
+ 40, 255, 502, 41, 502, 0, 0, 0, 502, 0,
+ 86, 0, 0, 87, 88, 0, 502, 502, 0, 0,
+ 502, 0, 0, 502, 0, 0, 0, 0, 89, 90,
+ 91, 92, 302, 0, 0, 0, 0, 981, 0, 0,
+ 95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
+ 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
+ 0, 103, 104, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 89, 90, 91, 92, 768, 0, 0,
- 0, 769, 0, 0, 0, 95, 0, 0, 0, 0,
- 0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
- 102, 0, 0, 0, 0, 0, 103, 104, 0, 0,
+ 0, 0, 301, 0, 0, 0, 105, 303, 107, 108,
+ 56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
+ 0, 27, 61, 62, 502, 28, 0, 0, 183, 0,
+ 183, 64, 0, 183, 30, 0, 0, 0, 183, 0,
+ 0, 32, 183, 0, 0, 0, 33, 0, 71, 72,
+ 34, 183, 0, 0, 0, 0, 0, 0, 183, 0,
+ 0, 0, 36, 183, 37, 74, 0, 183, 38, 0,
+ 0, 76, 0, 78, 0, 80, 39, 40, 255, 183,
+ 41, 183, 0, 0, 0, 183, 0, 86, 0, 0,
+ 87, 88, 0, 183, 183, 0, 0, 183, 0, 0,
+ 183, 0, 0, 0, 0, 89, 90, 91, 92, 302,
+ 0, 0, 0, 0, 0, 0, 0, 95, 0, 0,
+ 0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 0, 0, 0, 0, 0, 103, 104,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 785,
- 0, 105, 770, 107, 108, 0, 0, 56, 24, 0,
- 25, 0, 771, 26, 254, 0, 0, 0, 27, 61,
- 62, 0, 28, 0, 0, 24, 0, 25, 64, 0,
- 26, 30, 0, 0, 0, 27, 0, 0, 32, 28,
- 0, 0, 0, 33, 0, 71, 72, 34, 30, 0,
- 0, 0, 0, 0, 0, 32, 0, 0, 0, 36,
- 33, 37, 74, 0, 34, 38, 0, 0, 76, 0,
- 78, 0, 80, 39, 40, 255, 36, 41, 37, 0,
- 0, 0, 38, 0, 86, 0, 0, 87, 88, 0,
- 39, 40, 0, 0, 41, 0, 0, 588, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 310,
+ 0, 0, 0, 105, 303, 107, 108, 56, 24, 0,
+ 25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
+ 62, 183, 28, 0, 0, 182, 0, 182, 64, 0,
+ 182, 30, 0, 0, 0, 182, 0, 0, 32, 182,
+ 0, 0, 0, 33, 0, 71, 72, 34, 182, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 36,
+ 182, 37, 74, 0, 182, 38, 0, 0, 76, 0,
+ 78, 0, 80, 39, 40, 255, 182, 41, 182, 0,
+ 0, 0, 182, 0, 86, 0, 0, 87, 88, 0,
+ 182, 182, 0, 0, 182, 0, 0, 182, 0, 0,
0, 0, 89, 90, 91, 92, 302, 0, 0, 0,
- 531, 0, 0, 0, 95, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 95, 0, 0, 0, 0, 0,
97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
0, 0, 0, 0, 0, 103, 104, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 777, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 611, 0, 0, 0,
105, 303, 107, 108, 56, 24, 0, 25, 0, 0,
- 26, 254, 0, 0, 0, 27, 61, 62, 368, 28,
- 0, 0, 24, 0, 25, 64, 0, 26, 30, 0,
- 0, 0, 27, 0, 0, 32, 28, 0, 0, 0,
- 33, 0, 71, 72, 34, 30, 0, 0, 0, 0,
- 0, 0, 32, 0, 0, 0, 36, 33, 37, 74,
- 0, 34, 38, 0, 0, 76, 0, 78, 0, 80,
- 39, 40, 255, 36, 41, 37, 0, 0, 0, 38,
- 0, 86, 0, 0, 87, 88, 0, 39, 40, 0,
- 0, 41, 0, 0, 801, 0, 0, 0, 0, 89,
- 90, 91, 92, 302, 0, 0, 0, 0, 934, 0,
+ 26, 254, 0, 0, 0, 27, 61, 62, 182, 28,
+ 0, 0, 192, 0, 192, 64, 0, 192, 30, 0,
+ 0, 0, 192, 0, 0, 32, 192, 0, 0, 0,
+ 33, 0, 71, 72, 34, 192, 0, 0, 0, 0,
+ 0, 0, 192, 0, 0, 0, 36, 192, 37, 74,
+ 0, 192, 38, 0, 0, 76, 0, 78, 0, 80,
+ 39, 40, 255, 192, 41, 192, 0, 0, 0, 192,
+ 0, 86, 0, 0, 87, 88, 0, 192, 192, 0,
+ 0, 192, 0, 0, 192, 0, 0, 0, 0, 89,
+ 90, 91, 92, 93, 0, 0, 0, 0, 0, 0,
0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
100, 0, 0, 0, 101, 0, 102, 0, 0, 0,
0, 0, 103, 104, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 979, 0, 0, 0, 105, 303, 107,
+ 0, 0, 0, 778, 0, 0, 0, 105, 106, 107,
108, 56, 24, 0, 25, 0, 0, 26, 254, 0,
- 0, 0, 27, 61, 62, 368, 28, 0, 0, 502,
- 0, 502, 64, 0, 502, 30, 0, 0, 0, 502,
- 0, 0, 32, 502, 0, 0, 0, 33, 0, 71,
- 72, 34, 502, 0, 0, 0, 0, 0, 0, 502,
- 0, 0, 0, 36, 502, 37, 74, 0, 502, 38,
+ 0, 0, 27, 61, 62, 192, 28, 0, 0, 0,
+ 0, 0, 64, 0, 0, 30, 0, 0, 0, 0,
+ 0, 0, 32, 0, 0, 0, 0, 33, 0, 71,
+ 72, 34, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 36, 0, 37, 74, 0, 0, 38,
0, 0, 76, 0, 78, 0, 80, 39, 40, 255,
- 502, 41, 502, 0, 0, 0, 502, 0, 86, 0,
- 0, 87, 88, 0, 502, 502, 0, 0, 502, 0,
- 0, 502, 0, 0, 0, 0, 89, 90, 91, 92,
- 302, 0, 0, 0, 0, 980, 0, 0, 95, 0,
+ 0, 41, 0, 0, 0, 0, 0, 0, 86, 0,
+ 0, 87, 88, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 89, 90, 91, 92,
+ 302, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
0, 101, 0, 102, 0, 0, 0, 0, 0, 103,
104, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 301, 0, 0, 0, 105, 303, 107, 108, 56, 24,
+ 1093, 0, 0, 0, 105, 303, 107, 108, 56, 24,
0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
- 61, 62, 502, 28, 0, 0, 183, 0, 183, 64,
- 0, 183, 30, 0, 0, 0, 183, 0, 0, 32,
- 183, 0, 0, 0, 33, 0, 71, 72, 34, 183,
- 0, 0, 0, 0, 0, 0, 183, 0, 0, 0,
- 36, 183, 37, 74, 0, 183, 38, 0, 0, 76,
- 0, 78, 0, 80, 39, 40, 255, 183, 41, 183,
- 0, 0, 0, 183, 0, 86, 0, 0, 87, 88,
- 0, 183, 183, 0, 0, 183, 0, 0, 183, 0,
- 0, 0, 0, 89, 90, 91, 92, 302, 0, 0,
+ 61, 62, 0, 28, 0, 0, 0, 0, 0, 64,
+ 0, 0, 30, 0, 0, 0, 0, 0, 0, 32,
+ 0, 0, 0, 0, 33, 0, 71, 72, 34, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 36, 0, 37, 74, 0, 0, 38, 0, 0, 76,
+ 0, 78, 0, 80, 39, 40, 255, 0, 41, 0,
+ 0, 0, 0, 0, 0, 86, 0, 0, 87, 88,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 89, 90, 91, 92, 93, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
102, 0, 0, 0, 0, 0, 103, 104, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 310, 0, 0,
- 0, 105, 303, 107, 108, 56, 24, 0, 25, 0,
- 0, 26, 254, 0, 0, 0, 27, 61, 62, 183,
- 28, 0, 0, 182, 0, 182, 64, 0, 182, 30,
- 0, 0, 0, 182, 0, 0, 32, 182, 0, 0,
- 0, 33, 0, 71, 72, 34, 182, 0, 0, 0,
- 0, 0, 0, 182, 0, 0, 0, 36, 182, 37,
- 74, 0, 182, 38, 0, 0, 76, 0, 78, 0,
- 80, 39, 40, 255, 182, 41, 182, 0, 0, 0,
- 182, 0, 86, 0, 0, 87, 88, 0, 182, 182,
- 0, 0, 182, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1238, 0, 0,
+ 0, 105, 1094, 107, 108, 56, 24, 0, 25, 0,
+ 0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
+ 28, 0, 0, 0, 0, 0, 64, 0, 0, 30,
+ 0, 0, 0, 0, 0, 0, 32, 0, 0, 0,
+ 0, 33, 0, 71, 72, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 36, 0, 37,
+ 74, 0, 0, 38, 0, 0, 76, 0, 78, 0,
+ 80, 39, 40, 255, 0, 41, 0, 0, 0, 0,
+ 0, 0, 86, 0, 0, 87, 88, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89, 90, 91, 92, 302, 0, 0, 0, 0, 0,
0, 0, 95, 0, 0, 0, 0, 0, 97, 98,
99, 100, 0, 0, 0, 101, 0, 102, 0, 0,
0, 0, 0, 103, 104, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 610, 0, 0, 0, 105, 303,
- 107, 108, 56, 24, 0, 25, 0, 0, 26, 254,
- 0, 0, 0, 27, 61, 62, 182, 28, 0, 0,
- 192, 0, 192, 64, 0, 192, 30, 0, 0, 0,
- 192, 0, 0, 32, 192, 0, 0, 0, 33, 0,
- 71, 72, 34, 192, 0, 0, 0, 0, 0, 0,
- 192, 0, 0, 0, 36, 192, 37, 74, 0, 192,
- 38, 0, 0, 76, 0, 78, 0, 80, 39, 40,
- 255, 192, 41, 192, 0, 0, 0, 192, 0, 86,
- 0, 0, 87, 88, 0, 192, 192, 0, 0, 192,
- 0, 0, 192, 0, 0, 0, 0, 89, 90, 91,
- 92, 93, 0, 0, 0, 0, 0, 0, 0, 95,
- 0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 0, 0, 0, 0, 0,
- 103, 104, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 83, 0, 0, 0, 105, 303,
+ 107, 108, 83, 83, 0, 83, 0, 0, 83, 83,
+ 0, 0, 0, 83, 83, 83, 0, 83, 0, 0,
+ 0, 0, 0, 83, 0, 0, 83, 0, 0, 0,
+ 0, 0, 0, 83, 0, 0, 0, 0, 83, 0,
+ 83, 83, 83, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 83, 0, 83, 83, 0, 0,
+ 83, 0, 0, 83, 0, 83, 0, 83, 83, 83,
+ 83, 0, 83, 0, 0, 0, 0, 0, 0, 83,
+ 0, 0, 83, 83, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 83, 83, 83,
+ 83, 83, 0, 0, 0, 0, 0, 0, 0, 83,
+ 0, 0, 0, 0, 0, 83, 83, 83, 83, 0,
+ 0, 0, 83, 0, 83, 0, 0, 0, 0, 0,
+ 83, 83, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 777, 0, 0, 0, 105, 106, 107, 108, 56,
+ 0, 340, 0, 0, 0, 83, 83, 83, 83, 56,
24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
- 27, 61, 62, 192, 28, 0, 0, 0, 0, 0,
+ 27, 61, 62, 0, 28, 0, 0, 0, 0, 0,
64, 0, 0, 30, 0, 0, 0, 0, 0, 0,
32, 0, 0, 0, 0, 33, 0, 71, 72, 34,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 36, 0, 37, 74, 0, 0, 38, 0, 0,
76, 0, 78, 0, 80, 39, 40, 255, 0, 41,
- 0, 0, 0, 0, 0, 0, 86, 0, 0, 87,
- 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 89, 90, 91, 92, 302, 0,
- 0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
- 0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 0, 0, 0, 0, 0, 103, 104, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1092, 0,
- 0, 0, 105, 303, 107, 108, 56, 24, 0, 25,
- 0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
- 0, 28, 0, 0, 0, 0, 0, 64, 0, 0,
- 30, 0, 0, 0, 0, 0, 0, 32, 0, 0,
- 0, 0, 33, 0, 71, 72, 34, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
- 37, 74, 0, 0, 38, 0, 0, 76, 0, 78,
- 0, 80, 39, 40, 255, 0, 41, 0, 0, 0,
- 0, 0, 0, 86, 0, 0, 87, 88, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 89, 90, 91, 92, 93, 0, 0, 0, 0,
- 0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
- 98, 99, 100, 0, 0, 0, 101, 0, 102, 0,
- 0, 0, 0, 0, 103, 104, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1237, 0, 0, 0, 105,
- 1093, 107, 108, 56, 24, 0, 25, 0, 0, 26,
- 254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
- 0, 0, 0, 0, 64, 0, 0, 30, 0, 0,
- 0, 0, 0, 0, 32, 0, 0, 0, 0, 33,
- 0, 71, 72, 34, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 0, 37, 74, 0,
- 0, 38, 0, 0, 76, 0, 78, 0, 80, 39,
- 40, 255, 0, 41, 0, 0, 0, 0, 0, 0,
- 86, 0, 0, 87, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
- 91, 92, 302, 0, 0, 0, 0, 0, 0, 0,
- 95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
- 0, 103, 104, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 341, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 340, 0, 0, 0, 105, 303, 107, 108,
+ 0, 0, 0, 0, 89, 90, 91, 256, 342, 0,
+ 0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
+ 0, 0, 97, 98, 99, 100, 934, 0, 0, 101,
+ 0, 102, 340, 0, 0, 0, 0, 103, 104, 0,
56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
0, 27, 61, 62, 0, 28, 0, 0, 0, 0,
- 0, 64, 0, 0, 30, 0, 0, 0, 0, 0,
+ 0, 64, 105, 257, 30, 108, 0, 0, 0, 0,
0, 32, 0, 0, 0, 0, 33, 0, 71, 72,
34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 36, 0, 37, 74, 0, 0, 38, 0,
@@ -11786,8 +11835,8 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 89, 90, 91, 256, 342,
0, 0, 0, 0, 0, 0, 0, 95, 0, 0,
- 0, 0, 0, 97, 98, 99, 100, 933, 0, 0,
- 101, 0, 102, 340, 0, 0, 0, 0, 103, 104,
+ 0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 346, 0, 0, 0, 0, 103, 104,
0, 56, 24, 0, 25, 0, 0, 26, 254, 0,
0, 0, 27, 61, 62, 0, 28, 0, 0, 0,
0, 0, 64, 105, 257, 30, 108, 0, 0, 0,
@@ -11796,11 +11845,11 @@ void case_1034()
0, 0, 0, 36, 0, 37, 74, 0, 0, 38,
0, 0, 76, 0, 78, 0, 80, 39, 40, 255,
0, 41, 0, 0, 0, 0, 0, 0, 0, 0,
- 341, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 89, 90, 91, 256,
342, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
- 0, 101, 0, 102, 346, 0, 0, 0, 0, 103,
+ 0, 101, 0, 102, 348, 0, 0, 0, 0, 103,
104, 0, 56, 24, 0, 25, 0, 0, 26, 254,
0, 0, 0, 27, 61, 62, 0, 28, 0, 0,
0, 0, 0, 64, 105, 257, 30, 108, 0, 0,
@@ -11813,7 +11862,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 89, 90, 91,
256, 342, 0, 0, 0, 0, 0, 0, 0, 95,
0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 348, 0, 0, 0, 0,
+ 0, 0, 101, 0, 102, 350, 0, 0, 0, 0,
103, 104, 0, 56, 24, 0, 25, 0, 0, 26,
254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
0, 0, 0, 0, 64, 105, 257, 30, 108, 0,
@@ -11826,7 +11875,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
91, 256, 342, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 350, 0, 0, 0,
+ 0, 0, 0, 101, 0, 102, 352, 0, 0, 0,
0, 103, 104, 0, 56, 24, 0, 25, 0, 0,
26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
0, 0, 0, 0, 0, 64, 105, 257, 30, 108,
@@ -11839,7 +11888,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
90, 91, 256, 342, 0, 0, 0, 0, 0, 0,
0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
- 100, 0, 0, 0, 101, 0, 102, 352, 0, 0,
+ 100, 0, 0, 0, 101, 0, 102, 354, 0, 0,
0, 0, 103, 104, 0, 56, 24, 0, 25, 0,
0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
28, 0, 0, 0, 0, 0, 64, 105, 257, 30,
@@ -11852,7 +11901,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89, 90, 91, 256, 342, 0, 0, 0, 0, 0,
0, 0, 95, 0, 0, 0, 0, 0, 97, 98,
- 99, 100, 0, 0, 0, 101, 0, 102, 354, 0,
+ 99, 100, 0, 0, 0, 101, 0, 102, 356, 0,
0, 0, 0, 103, 104, 0, 56, 24, 0, 25,
0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
0, 28, 0, 0, 0, 0, 0, 64, 105, 257,
@@ -11865,7 +11914,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 89, 90, 91, 256, 342, 0, 0, 0, 0,
0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
- 98, 99, 100, 0, 0, 0, 101, 0, 102, 356,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 358,
0, 0, 0, 0, 103, 104, 0, 56, 24, 0,
25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
62, 0, 28, 0, 0, 0, 0, 0, 64, 105,
@@ -11879,7 +11928,7 @@ void case_1034()
0, 0, 89, 90, 91, 256, 342, 0, 0, 0,
0, 0, 0, 0, 95, 0, 0, 0, 0, 0,
97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
- 358, 0, 0, 0, 0, 103, 104, 0, 56, 24,
+ 360, 0, 0, 0, 0, 103, 104, 0, 56, 24,
0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
61, 62, 0, 28, 0, 0, 0, 0, 0, 64,
105, 257, 30, 108, 0, 0, 0, 0, 0, 32,
@@ -11892,7 +11941,7 @@ void case_1034()
0, 0, 0, 89, 90, 91, 256, 342, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
- 102, 360, 0, 0, 0, 0, 103, 104, 0, 56,
+ 102, 340, 0, 0, 0, 0, 103, 104, 0, 56,
24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
27, 61, 62, 0, 28, 0, 0, 0, 0, 0,
64, 105, 257, 30, 108, 0, 0, 0, 0, 0,
@@ -11905,7 +11954,7 @@ void case_1034()
0, 0, 0, 0, 89, 90, 91, 256, 342, 0,
0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 340, 0, 0, 0, 0, 103, 104, 0,
+ 0, 102, 636, 0, 0, 0, 0, 103, 104, 0,
56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
0, 27, 61, 62, 0, 28, 0, 0, 0, 0,
0, 64, 105, 257, 30, 108, 0, 0, 0, 0,
@@ -11918,7 +11967,7 @@ void case_1034()
0, 0, 0, 0, 0, 89, 90, 91, 256, 342,
0, 0, 0, 0, 0, 0, 0, 95, 0, 0,
0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
- 101, 0, 102, 635, 0, 0, 0, 0, 103, 104,
+ 101, 0, 102, 638, 0, 0, 0, 0, 103, 104,
0, 56, 24, 0, 25, 0, 0, 26, 254, 0,
0, 0, 27, 61, 62, 0, 28, 0, 0, 0,
0, 0, 64, 105, 257, 30, 108, 0, 0, 0,
@@ -11931,7 +11980,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 89, 90, 91, 256,
342, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
- 0, 101, 0, 102, 637, 0, 0, 0, 0, 103,
+ 0, 101, 0, 102, 640, 0, 0, 0, 0, 103,
104, 0, 56, 24, 0, 25, 0, 0, 26, 254,
0, 0, 0, 27, 61, 62, 0, 28, 0, 0,
0, 0, 0, 64, 105, 257, 30, 108, 0, 0,
@@ -11944,7 +11993,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 89, 90, 91,
256, 342, 0, 0, 0, 0, 0, 0, 0, 95,
0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 639, 0, 0, 0, 0,
+ 0, 0, 101, 0, 102, 646, 0, 0, 0, 0,
103, 104, 0, 56, 24, 0, 25, 0, 0, 26,
254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
0, 0, 0, 0, 64, 105, 257, 30, 108, 0,
@@ -11957,7 +12006,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
91, 256, 342, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 645, 0, 0, 0,
+ 0, 0, 0, 101, 0, 102, 648, 0, 0, 0,
0, 103, 104, 0, 56, 24, 0, 25, 0, 0,
26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
0, 0, 0, 0, 0, 64, 105, 257, 30, 108,
@@ -11970,7 +12019,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
90, 91, 256, 342, 0, 0, 0, 0, 0, 0,
0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
- 100, 0, 0, 0, 101, 0, 102, 647, 0, 0,
+ 100, 0, 0, 0, 101, 0, 102, 650, 0, 0,
0, 0, 103, 104, 0, 56, 24, 0, 25, 0,
0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
28, 0, 0, 0, 0, 0, 64, 105, 257, 30,
@@ -11983,7 +12032,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89, 90, 91, 256, 342, 0, 0, 0, 0, 0,
0, 0, 95, 0, 0, 0, 0, 0, 97, 98,
- 99, 100, 0, 0, 0, 101, 0, 102, 649, 0,
+ 99, 100, 0, 0, 0, 101, 0, 102, 652, 0,
0, 0, 0, 103, 104, 0, 56, 24, 0, 25,
0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
0, 28, 0, 0, 0, 0, 0, 64, 105, 257,
@@ -11996,7 +12045,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 89, 90, 91, 256, 342, 0, 0, 0, 0,
0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
- 98, 99, 100, 0, 0, 0, 101, 0, 102, 651,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 654,
0, 0, 0, 0, 103, 104, 0, 56, 24, 0,
25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
62, 0, 28, 0, 0, 0, 0, 0, 64, 105,
@@ -12010,7 +12059,7 @@ void case_1034()
0, 0, 89, 90, 91, 256, 342, 0, 0, 0,
0, 0, 0, 0, 95, 0, 0, 0, 0, 0,
97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
- 653, 0, 0, 0, 0, 103, 104, 0, 56, 24,
+ 656, 0, 0, 0, 0, 103, 104, 0, 56, 24,
0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
61, 62, 0, 28, 0, 0, 0, 0, 0, 64,
105, 257, 30, 108, 0, 0, 0, 0, 0, 32,
@@ -12023,7 +12072,7 @@ void case_1034()
0, 0, 0, 89, 90, 91, 256, 342, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
- 102, 655, 0, 0, 0, 0, 103, 104, 0, 56,
+ 102, 658, 0, 0, 0, 0, 103, 104, 0, 56,
24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
27, 61, 62, 0, 28, 0, 0, 0, 0, 0,
64, 105, 257, 30, 108, 0, 0, 0, 0, 0,
@@ -12036,7 +12085,7 @@ void case_1034()
0, 0, 0, 0, 89, 90, 91, 256, 342, 0,
0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 657, 0, 0, 0, 0, 103, 104, 0,
+ 0, 102, 660, 0, 0, 0, 0, 103, 104, 0,
56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
0, 27, 61, 62, 0, 28, 0, 0, 0, 0,
0, 64, 105, 257, 30, 108, 0, 0, 0, 0,
@@ -12049,7 +12098,7 @@ void case_1034()
0, 0, 0, 0, 0, 89, 90, 91, 256, 342,
0, 0, 0, 0, 0, 0, 0, 95, 0, 0,
0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
- 101, 0, 102, 659, 0, 0, 0, 0, 103, 104,
+ 101, 0, 102, 662, 0, 0, 0, 0, 103, 104,
0, 56, 24, 0, 25, 0, 0, 26, 254, 0,
0, 0, 27, 61, 62, 0, 28, 0, 0, 0,
0, 0, 64, 105, 257, 30, 108, 0, 0, 0,
@@ -12062,7 +12111,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 89, 90, 91, 256,
342, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
- 0, 101, 0, 102, 661, 0, 0, 0, 0, 103,
+ 0, 101, 0, 102, 664, 0, 0, 0, 0, 103,
104, 0, 56, 24, 0, 25, 0, 0, 26, 254,
0, 0, 0, 27, 61, 62, 0, 28, 0, 0,
0, 0, 0, 64, 105, 257, 30, 108, 0, 0,
@@ -12075,7 +12124,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 89, 90, 91,
256, 342, 0, 0, 0, 0, 0, 0, 0, 95,
0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
- 0, 0, 101, 0, 102, 663, 0, 0, 0, 0,
+ 0, 0, 101, 0, 102, 666, 0, 0, 0, 0,
103, 104, 0, 56, 24, 0, 25, 0, 0, 26,
254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
0, 0, 0, 0, 64, 105, 257, 30, 108, 0,
@@ -12088,7 +12137,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
91, 256, 342, 0, 0, 0, 0, 0, 0, 0,
95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 665, 0, 0, 0,
+ 0, 0, 0, 101, 0, 102, 668, 0, 0, 0,
0, 103, 104, 0, 56, 24, 0, 25, 0, 0,
26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
0, 0, 0, 0, 0, 64, 105, 257, 30, 108,
@@ -12101,7 +12150,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
90, 91, 256, 342, 0, 0, 0, 0, 0, 0,
0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
- 100, 0, 0, 0, 101, 0, 102, 667, 0, 0,
+ 100, 0, 0, 0, 101, 0, 102, 670, 0, 0,
0, 0, 103, 104, 0, 56, 24, 0, 25, 0,
0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
28, 0, 0, 0, 0, 0, 64, 105, 257, 30,
@@ -12114,7 +12163,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89, 90, 91, 256, 342, 0, 0, 0, 0, 0,
0, 0, 95, 0, 0, 0, 0, 0, 97, 98,
- 99, 100, 0, 0, 0, 101, 0, 102, 669, 0,
+ 99, 100, 0, 0, 0, 101, 0, 102, 672, 0,
0, 0, 0, 103, 104, 0, 56, 24, 0, 25,
0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
0, 28, 0, 0, 0, 0, 0, 64, 105, 257,
@@ -12127,7 +12176,7 @@ void case_1034()
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 89, 90, 91, 256, 342, 0, 0, 0, 0,
0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
- 98, 99, 100, 0, 0, 0, 101, 0, 102, 671,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 674,
0, 0, 0, 0, 103, 104, 0, 56, 24, 0,
25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
62, 0, 28, 0, 0, 0, 0, 0, 64, 105,
@@ -12141,7 +12190,7 @@ void case_1034()
0, 0, 89, 90, 91, 256, 342, 0, 0, 0,
0, 0, 0, 0, 95, 0, 0, 0, 0, 0,
97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
- 673, 0, 0, 0, 0, 103, 104, 0, 56, 24,
+ 842, 0, 0, 0, 0, 103, 104, 0, 56, 24,
0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
61, 62, 0, 28, 0, 0, 0, 0, 0, 64,
105, 257, 30, 108, 0, 0, 0, 0, 0, 32,
@@ -12154,767 +12203,753 @@ void case_1034()
0, 0, 0, 89, 90, 91, 256, 342, 0, 0,
0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
- 102, 841, 0, 0, 0, 0, 103, 104, 0, 56,
+ 102, 513, 0, 0, 0, 0, 103, 104, 347, 56,
24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
27, 61, 62, 0, 28, 0, 0, 0, 0, 0,
64, 105, 257, 30, 108, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 33, 0, 71, 72, 34,
+ 32, 0, 0, 0, 347, 33, 0, 71, 72, 34,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 36, 0, 37, 74, 0, 0, 38, 0, 0,
76, 0, 78, 0, 80, 39, 40, 255, 0, 41,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 89, 90, 91, 256, 342, 0,
- 0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
- 0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 513, 0, 0, 0, 0, 103, 104, 347,
- 56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
- 0, 27, 61, 62, 0, 28, 0, 0, 0, 0,
- 0, 64, 105, 257, 30, 108, 0, 0, 0, 0,
- 0, 32, 0, 0, 0, 347, 33, 0, 71, 72,
- 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 36, 0, 37, 74, 0, 0, 38, 0,
- 0, 76, 0, 78, 0, 80, 39, 40, 255, 0,
- 41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 89, 90, 91, 256, 291,
- 0, 0, 0, 0, 0, 0, 0, 95, 347, 347,
- 347, 347, 796, 0, 0, 347, 347, 0, 0, 347,
- 347, 347, 347, 347, 347, 347, 347, 347, 0, 347,
+ 0, 0, 0, 0, 89, 90, 91, 256, 291, 0,
+ 0, 0, 0, 0, 0, 0, 95, 347, 347, 347,
+ 347, 796, 0, 0, 347, 347, 0, 0, 347, 347,
+ 347, 347, 347, 347, 347, 347, 347, 0, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
347, 347, 347, 347, 347, 347, 347, 347, 347, 347,
- 347, 0, 0, 105, 514, 0, 0, 347, 0, 52,
- 347, 52, 0, 52, 0, 52, 0, 0, 52, 0,
- 52, 52, 0, 52, 0, 52, 0, 52, 0, 52,
- 52, 52, 52, 0, 0, 52, 52, 0, 0, 0,
- 0, 52, 52, 52, 52, 52, 0, 0, 52, 0,
- 52, 0, 52, 0, 52, 52, 0, 52, 52, 52,
- 52, 0, 0, 52, 52, 52, 52, 0, 0, 52,
- 52, 52, 0, 0, 0, 0, 0, 0, 52, 52,
- 0, 52, 52, 0, 52, 52, 52, 0, 0, 0,
- 52, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 52, 0, 52, 52, 51, 0, 0, 0, 51, 0,
- 51, 0, 0, 51, 0, 51, 51, 0, 51, 0,
- 51, 0, 51, 0, 51, 51, 51, 51, 0, 0,
- 51, 51, 0, 0, 0, 0, 51, 0, 51, 51,
- 51, 0, 0, 51, 0, 51, 0, 51, 0, 0,
- 51, 0, 51, 51, 51, 51, 52, 0, 0, 51,
- 51, 51, 0, 0, 51, 51, 51, 0, 0, 0,
- 0, 0, 0, 51, 51, 0, 51, 51, 0, 51,
- 51, 51, 0, 0, 0, 51, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 51, 0, 51, 0, 51, 0, 51,
- 0, 86, 51, 0, 51, 51, 0, 51, 0, 51,
- 51, 51, 0, 51, 51, 51, 51, 0, 0, 51,
+ 0, 0, 105, 514, 0, 0, 347, 0, 52, 347,
+ 52, 0, 52, 0, 52, 0, 0, 52, 0, 52,
+ 52, 0, 52, 0, 52, 0, 52, 0, 52, 52,
+ 52, 52, 0, 0, 52, 52, 0, 0, 0, 0,
+ 52, 52, 52, 52, 52, 0, 0, 52, 0, 52,
+ 0, 52, 0, 52, 52, 0, 52, 52, 52, 52,
+ 0, 0, 52, 52, 52, 52, 0, 0, 52, 52,
+ 52, 0, 0, 0, 0, 0, 0, 52, 52, 0,
+ 52, 52, 0, 52, 52, 52, 0, 0, 0, 52,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 0, 52, 52, 51, 0, 0, 0, 51, 0, 51,
+ 0, 0, 51, 0, 51, 51, 0, 51, 0, 51,
+ 0, 51, 0, 51, 51, 51, 51, 0, 0, 51,
51, 0, 0, 0, 0, 51, 0, 51, 51, 51,
0, 0, 51, 0, 51, 0, 51, 0, 0, 51,
- 0, 51, 51, 51, 51, 0, 0, 0, 51, 51,
- 51, 51, 0, 51, 51, 51, 0, 0, 0, 0,
+ 0, 51, 51, 51, 51, 52, 0, 0, 51, 51,
+ 51, 0, 0, 51, 51, 51, 0, 0, 0, 0,
0, 0, 51, 51, 0, 51, 51, 0, 51, 51,
51, 0, 0, 0, 51, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 52, 0, 51, 0, 52, 0, 52, 0,
- 87, 52, 0, 52, 52, 0, 52, 0, 52, 51,
- 52, 0, 52, 52, 52, 52, 0, 0, 52, 52,
- 0, 0, 0, 0, 52, 0, 52, 52, 52, 0,
- 0, 52, 0, 52, 0, 52, 0, 0, 52, 0,
- 52, 52, 52, 52, 0, 0, 0, 52, 52, 52,
- 51, 0, 52, 52, 52, 0, 0, 0, 0, 0,
- 0, 52, 52, 0, 52, 52, 0, 52, 52, 52,
- 0, 0, 0, 52, 0, 0, 0, 0, 51, 0,
- 0, 0, 51, 0, 51, 0, 0, 51, 0, 51,
- 51, 0, 51, 52, 51, 0, 51, 0, 51, 51,
- 51, 51, 0, 0, 51, 51, 0, 0, 52, 0,
- 51, 0, 51, 51, 51, 0, 0, 51, 0, 51,
- 0, 51, 0, 0, 51, 0, 51, 51, 51, 51,
- 0, 0, 0, 51, 51, 51, 0, 0, 51, 51,
- 51, 0, 0, 0, 0, 0, 0, 51, 51, 52,
- 51, 51, 0, 51, 51, 51, 0, 0, 0, 51,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 51, 0, 0, 0, 51, 0, 51, 51,
- 0, 51, 0, 51, 51, 222, 51, 0, 51, 0,
+ 0, 0, 51, 0, 51, 0, 51, 0, 51, 0,
+ 86, 51, 0, 51, 51, 0, 51, 0, 51, 51,
51, 0, 51, 51, 51, 51, 0, 0, 51, 51,
0, 0, 0, 0, 51, 0, 51, 51, 51, 0,
- 0, 51, 0, 51, 347, 51, 0, 0, 51, 0,
+ 0, 51, 0, 51, 0, 51, 0, 0, 51, 0,
51, 51, 51, 51, 0, 0, 0, 51, 51, 51,
- 0, 0, 51, 51, 51, 51, 0, 347, 0, 0,
+ 51, 0, 51, 51, 51, 0, 0, 0, 0, 0,
0, 51, 51, 0, 51, 51, 0, 51, 51, 51,
- 347, 0, 0, 51, 0, 347, 0, 0, 347, 0,
- 347, 0, 347, 347, 347, 347, 0, 0, 0, 0,
- 347, 0, 0, 51, 347, 0, 0, 0, 347, 223,
- 0, 0, 0, 0, 369, 0, 347, 0, 0, 347,
- 0, 347, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 369, 0, 0,
- 347, 0, 0, 0, 0, 347, 0, 0, 0, 0,
- 369, 347, 347, 0, 273, 369, 347, 0, 240, 51,
- 369, 0, 369, 369, 369, 369, 0, 0, 0, 347,
- 369, 0, 0, 0, 369, 0, 368, 0, 369, 0,
- 0, 0, 0, 0, 0, 0, 369, 0, 0, 369,
- 0, 369, 0, 0, 0, 0, 0, 0, 0, 368,
- 0, 347, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 368, 0, 465, 369, 0, 368, 0, 0,
- 239, 369, 368, 0, 368, 368, 368, 368, 0, 0,
- 0, 0, 368, 0, 0, 0, 368, 466, 0, 0,
- 368, 0, 0, 0, 0, 0, 0, 0, 368, 0,
- 467, 368, 465, 368, 0, 469, 0, 0, 0, 0,
- 470, 0, 471, 472, 473, 474, 0, 0, 0, 0,
- 475, 369, 0, 0, 476, 466, 0, 368, 1380, 0,
- 0, 0, 0, 368, 0, 0, 477, 0, 467, 478,
- 465, 479, 0, 469, 0, 0, 0, 0, 470, 0,
- 471, 472, 473, 474, 0, 0, 0, 0, 475, 0,
- 0, 0, 476, 466, 0, 480, 1380, 0, 0, 0,
- 0, 1381, 0, 0, 477, 0, 467, 478, 0, 479,
- 0, 469, 0, 368, 0, 0, 470, 0, 471, 472,
- 473, 474, 0, 0, 0, 0, 475, 0, 0, 0,
- 476, 0, 0, 480, 0, 0, 0, 0, 0, 0,
- 0, 0, 477, 56, 24, 478, 25, 479, 0, 26,
- 254, 1382, 0, 0, 27, 61, 62, 0, 28, 0,
- 0, 0, 0, 0, 64, 0, 0, 30, 0, 0,
- 0, 480, 0, 0, 32, 0, 0, 0, 0, 33,
- 0, 71, 72, 34, 0, 613, 0, 0, 0, 1382,
- 0, 0, 614, 0, 0, 36, 0, 37, 74, 0,
- 0, 38, 0, 0, 76, 0, 78, 0, 80, 39,
- 40, 255, 0, 41, 0, 0, 0, 0, 0, 0,
- 615, 0, 0, 87, 88, 0, 0, 1399, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
- 91, 92, 93, 0, 0, 0, 0, 0, 0, 0,
- 95, 974, 0, 616, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
- 0, 103, 104, 0, 0, 0, 0, 0, 0, 56,
- 24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
- 27, 61, 62, 0, 28, 0, 105, 106, 107, 108,
- 64, 0, 0, 30, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 33, 0, 71, 72, 34,
- 0, 613, 0, 0, 0, 0, 0, 0, 614, 0,
- 0, 36, 0, 37, 74, 0, 0, 38, 0, 0,
- 76, 0, 78, 0, 80, 39, 40, 255, 0, 41,
- 0, 0, 0, 0, 0, 0, 615, 0, 0, 87,
- 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 89, 90, 91, 92, 93, 0,
- 0, 0, 0, 0, 0, 0, 95, 0, 0, 616,
- 0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 0, 0, 0, 0, 0, 103, 104, 0,
- 0, 0, 0, 0, 0, 56, 24, 0, 25, 0,
- 0, 26, 254, 0, 0, 0, 27, 61, 62, 0,
- 28, 0, 105, 106, 107, 108, 64, 0, 0, 30,
- 0, 0, 0, 0, 0, 0, 32, 0, 0, 0,
- 0, 33, 0, 71, 72, 34, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 36, 0, 37,
- 74, 0, 0, 38, 0, 0, 76, 0, 78, 0,
- 80, 39, 40, 255, 0, 41, 0, 0, 84, 0,
- 0, 0, 86, 0, 0, 87, 88, 0, 0, 0,
+ 0, 0, 0, 51, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 0, 51, 0, 52, 0, 52, 0, 87,
+ 52, 0, 52, 52, 0, 52, 0, 52, 51, 52,
+ 0, 52, 52, 52, 52, 0, 0, 52, 52, 0,
+ 0, 0, 0, 52, 0, 52, 52, 52, 0, 0,
+ 52, 0, 52, 0, 52, 0, 0, 52, 0, 52,
+ 52, 52, 52, 0, 0, 0, 52, 52, 52, 51,
+ 0, 52, 52, 52, 0, 0, 0, 0, 0, 0,
+ 52, 52, 0, 52, 52, 0, 52, 52, 52, 0,
+ 0, 0, 52, 0, 0, 0, 0, 51, 0, 0,
+ 0, 51, 0, 51, 0, 0, 51, 0, 51, 51,
+ 0, 51, 52, 51, 0, 51, 0, 51, 51, 51,
+ 51, 0, 0, 51, 51, 0, 0, 52, 0, 51,
+ 0, 51, 51, 51, 0, 0, 51, 0, 51, 0,
+ 51, 0, 0, 51, 0, 51, 51, 51, 51, 0,
+ 0, 0, 51, 51, 51, 0, 0, 51, 51, 51,
+ 0, 0, 0, 0, 0, 0, 51, 51, 52, 51,
+ 51, 0, 51, 51, 51, 0, 0, 0, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 0, 0, 51, 0, 51, 51, 0,
+ 51, 0, 51, 51, 222, 51, 0, 51, 0, 51,
+ 0, 51, 51, 51, 51, 0, 0, 51, 51, 0,
+ 0, 0, 0, 51, 0, 51, 51, 51, 0, 0,
+ 51, 0, 51, 347, 51, 0, 0, 51, 0, 51,
+ 51, 51, 51, 0, 0, 0, 51, 51, 51, 0,
+ 0, 51, 51, 51, 51, 0, 347, 0, 0, 0,
+ 51, 51, 0, 51, 51, 0, 51, 51, 51, 347,
+ 0, 0, 51, 0, 347, 0, 0, 347, 0, 347,
+ 0, 347, 347, 347, 347, 0, 0, 0, 0, 347,
+ 0, 0, 51, 347, 0, 0, 0, 347, 223, 0,
+ 0, 0, 0, 368, 0, 347, 0, 0, 347, 0,
+ 347, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 368, 0, 0, 347,
+ 0, 0, 0, 0, 347, 0, 0, 0, 0, 368,
+ 347, 347, 0, 273, 368, 347, 0, 239, 51, 368,
+ 0, 368, 368, 368, 368, 0, 0, 0, 347, 368,
+ 0, 0, 0, 368, 0, 465, 0, 368, 0, 0,
+ 0, 0, 0, 0, 0, 368, 0, 0, 368, 0,
+ 368, 0, 0, 0, 0, 0, 0, 0, 466, 0,
+ 347, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 467, 0, 465, 368, 0, 469, 0, 0, 0,
+ 368, 470, 0, 471, 472, 473, 474, 0, 0, 0,
+ 0, 475, 0, 0, 0, 476, 466, 0, 0, 1381,
+ 0, 0, 0, 465, 0, 0, 0, 477, 0, 467,
+ 478, 0, 479, 0, 469, 0, 0, 0, 0, 470,
+ 0, 471, 472, 473, 474, 0, 466, 0, 0, 475,
+ 368, 0, 0, 476, 0, 0, 480, 1381, 0, 467,
+ 0, 0, 1382, 0, 469, 477, 0, 0, 478, 470,
+ 479, 471, 472, 473, 474, 0, 0, 0, 0, 475,
+ 0, 0, 0, 476, 0, 0, 0, 0, 0, 0,
+ 56, 24, 0, 25, 480, 477, 26, 254, 478, 0,
+ 479, 27, 61, 62, 0, 28, 0, 0, 0, 0,
+ 0, 64, 1383, 0, 30, 0, 0, 0, 0, 0,
+ 0, 32, 0, 0, 480, 0, 33, 0, 71, 72,
+ 34, 0, 614, 0, 0, 0, 0, 0, 0, 615,
+ 0, 0, 36, 0, 37, 74, 0, 0, 38, 0,
+ 1383, 76, 0, 78, 0, 80, 39, 40, 255, 0,
+ 41, 0, 0, 0, 0, 0, 0, 616, 0, 0,
+ 87, 88, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1400, 0, 0, 0, 0, 89, 90, 91, 92, 93,
+ 0, 0, 0, 0, 0, 0, 0, 95, 975, 0,
+ 617, 0, 0, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 0, 0, 0, 0, 0, 103, 104,
+ 0, 0, 0, 0, 0, 0, 56, 24, 0, 25,
+ 0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
+ 0, 28, 0, 105, 106, 107, 108, 64, 0, 0,
+ 30, 0, 0, 0, 0, 0, 0, 32, 0, 0,
+ 0, 0, 33, 0, 71, 72, 34, 0, 614, 0,
+ 0, 0, 0, 0, 0, 615, 0, 0, 36, 0,
+ 37, 74, 0, 0, 38, 0, 0, 76, 0, 78,
+ 0, 80, 39, 40, 255, 0, 41, 0, 0, 0,
+ 0, 0, 0, 616, 0, 0, 87, 88, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 89, 90, 91, 92, 302, 0, 0, 0, 0, 0,
- 0, 0, 95, 0, 0, 0, 0, 0, 97, 98,
- 99, 100, 0, 0, 0, 101, 0, 102, 0, 0,
- 0, 0, 0, 103, 104, 0, 0, 0, 0, 0,
- 0, 56, 24, 0, 25, 0, 0, 26, 254, 0,
- 0, 0, 27, 61, 62, 0, 28, 0, 105, 303,
- 107, 108, 64, 0, 0, 30, 0, 0, 0, 0,
- 0, 0, 32, 0, 0, 0, 0, 33, 0, 71,
- 72, 34, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 36, 0, 37, 74, 0, 0, 38,
- 0, 0, 76, 0, 78, 0, 80, 39, 40, 255,
- 0, 41, 0, 0, 0, 0, 0, 0, 86, 0,
- 0, 87, 88, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 89, 90, 91, 92,
- 302, 0, 0, 0, 531, 0, 0, 0, 95, 0,
- 0, 0, 0, 0, 97, 98, 99, 100, 0, 0,
- 0, 101, 0, 102, 0, 0, 0, 0, 0, 103,
- 104, 0, 0, 0, 0, 0, 0, 56, 24, 0,
- 25, 0, 0, 26, 254, 0, 0, 0, 27, 61,
- 62, 0, 28, 0, 105, 303, 107, 108, 64, 0,
- 0, 30, 0, 0, 0, 0, 0, 0, 32, 0,
- 0, 0, 0, 33, 0, 71, 72, 34, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
- 0, 37, 74, 0, 0, 38, 0, 0, 76, 0,
- 78, 0, 80, 39, 40, 255, 0, 41, 0, 0,
- 0, 0, 0, 0, 86, 0, 0, 87, 88, 0,
+ 0, 89, 90, 91, 92, 93, 0, 0, 0, 0,
+ 0, 0, 0, 95, 0, 0, 617, 0, 0, 97,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 0,
+ 0, 0, 0, 0, 103, 104, 0, 0, 0, 0,
+ 0, 0, 56, 24, 0, 25, 0, 0, 26, 254,
+ 0, 0, 0, 27, 61, 62, 0, 28, 0, 105,
+ 106, 107, 108, 64, 0, 0, 30, 0, 0, 0,
+ 0, 0, 0, 32, 0, 0, 0, 0, 33, 0,
+ 71, 72, 34, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 36, 0, 37, 74, 0, 0,
+ 38, 0, 0, 76, 0, 78, 0, 80, 39, 40,
+ 255, 0, 41, 0, 0, 84, 0, 0, 0, 86,
+ 0, 0, 87, 88, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 89, 90, 91,
+ 92, 302, 0, 0, 0, 0, 0, 0, 0, 95,
+ 0, 0, 0, 0, 0, 97, 98, 99, 100, 0,
+ 0, 0, 101, 0, 102, 0, 0, 0, 0, 0,
+ 103, 104, 0, 0, 0, 0, 0, 0, 56, 24,
+ 0, 25, 0, 0, 26, 254, 0, 0, 0, 27,
+ 61, 62, 0, 28, 0, 105, 303, 107, 108, 64,
+ 0, 0, 30, 0, 0, 0, 0, 0, 0, 32,
+ 0, 0, 0, 0, 33, 0, 71, 72, 34, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 89, 90, 91, 92, 302, 0, 0, 0,
- 525, 0, 0, 0, 95, 0, 0, 0, 0, 0,
- 97, 98, 99, 100, 0, 0, 0, 101, 0, 102,
- 0, 0, 0, 0, 0, 103, 104, 0, 0, 0,
- 0, 0, 0, 56, 24, 0, 25, 0, 0, 26,
- 254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
- 105, 303, 107, 108, 64, 0, 0, 30, 0, 0,
- 0, 0, 0, 0, 32, 0, 0, 0, 0, 33,
- 0, 71, 72, 34, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 0, 37, 74, 0,
- 0, 38, 0, 0, 76, 0, 78, 0, 80, 39,
- 40, 255, 0, 41, 0, 0, 0, 0, 0, 0,
- 86, 0, 0, 87, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 89, 90,
- 91, 92, 302, 0, 0, 0, 0, 0, 0, 0,
- 95, 0, 0, 0, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
- 0, 103, 104, 0, 0, 0, 0, 0, 0, 56,
- 24, 0, 25, 0, 0, 26, 254, 0, 0, 0,
- 27, 61, 62, 0, 28, 0, 105, 303, 107, 108,
- 64, 0, 0, 30, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 33, 0, 71, 72, 34,
+ 36, 0, 37, 74, 0, 0, 38, 0, 0, 76,
+ 0, 78, 0, 80, 39, 40, 255, 0, 41, 0,
+ 0, 0, 0, 0, 0, 86, 0, 0, 87, 88,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 36, 0, 37, 74, 0, 0, 38, 0, 0,
- 76, 0, 78, 0, 80, 39, 40, 255, 0, 41,
- 0, 0, 0, 0, 0, 0, 86, 0, 0, 87,
- 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 89, 90, 91, 92, 93, 0,
- 0, 0, 0, 0, 0, 0, 95, 0, 0, 0,
- 0, 0, 97, 98, 99, 100, 0, 0, 0, 101,
- 0, 102, 0, 0, 0, 0, 0, 103, 104, 0,
- 0, 0, 0, 0, 0, 655, 655, 0, 655, 0,
- 0, 655, 655, 0, 0, 0, 655, 655, 655, 0,
- 655, 0, 105, 106, 107, 108, 655, 0, 0, 655,
- 0, 0, 0, 0, 0, 0, 655, 0, 0, 0,
- 0, 655, 0, 655, 655, 655, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 655, 0, 655,
- 655, 0, 0, 655, 0, 0, 655, 0, 655, 0,
- 655, 655, 655, 655, 0, 655, 0, 0, 0, 0,
- 0, 0, 655, 0, 0, 655, 655, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 655, 655, 655, 655, 655, 0, 0, 0, 0, 0,
- 0, 0, 655, 0, 0, 0, 0, 0, 655, 655,
- 655, 655, 0, 0, 0, 655, 0, 655, 0, 0,
- 0, 0, 0, 655, 655, 0, 0, 0, 0, 0,
- 0, 83, 83, 0, 83, 0, 0, 83, 83, 0,
- 0, 0, 83, 83, 83, 0, 83, 0, 655, 655,
- 655, 655, 83, 0, 0, 83, 0, 0, 0, 0,
- 0, 0, 83, 0, 0, 0, 0, 83, 0, 83,
- 83, 83, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 83, 0, 83, 83, 0, 0, 83,
- 0, 0, 83, 0, 83, 0, 83, 83, 83, 83,
- 0, 83, 0, 0, 0, 0, 0, 0, 83, 0,
- 0, 83, 83, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 83, 83, 83, 83,
- 83, 0, 0, 0, 0, 0, 0, 0, 83, 0,
- 0, 0, 0, 0, 83, 83, 83, 83, 0, 0,
- 0, 83, 0, 83, 0, 0, 0, 0, 0, 83,
- 83, 0, 0, 0, 0, 0, 0, 143, 143, 0,
- 143, 0, 0, 143, 143, 0, 0, 0, 143, 143,
- 143, 0, 143, 0, 83, 83, 83, 83, 143, 0,
- 0, 143, 0, 0, 0, 0, 0, 0, 143, 0,
- 0, 0, 0, 143, 0, 143, 143, 143, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
- 0, 143, 143, 0, 0, 143, 0, 0, 143, 0,
- 143, 0, 143, 143, 143, 143, 0, 143, 0, 0,
- 0, 0, 0, 0, 143, 0, 0, 143, 143, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 143, 143, 143, 143, 143, 0, 0, 0,
- 0, 0, 0, 0, 143, 0, 0, 0, 0, 0,
- 143, 143, 143, 143, 0, 0, 0, 143, 0, 143,
- 0, 0, 0, 0, 0, 143, 143, 0, 0, 0,
- 0, 0, 0, 56, 24, 0, 25, 0, 0, 26,
- 254, 0, 0, 0, 27, 61, 62, 0, 28, 0,
- 143, 143, 143, 143, 64, 0, 0, 30, 0, 0,
- 0, 0, 0, 0, 32, 0, 31, 0, 0, 33,
- 0, 71, 72, 34, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 36, 0, 37, 74, 31,
- 0, 38, 0, 0, 76, 0, 78, 0, 80, 39,
- 40, 255, 31, 41, 0, 0, 0, 31, 0, 0,
- 0, 0, 31, 0, 31, 31, 31, 31, 0, 0,
- 31, 0, 31, 0, 0, 0, 31, 0, 89, 90,
- 91, 256, 342, 0, 0, 0, 0, 0, 31, 0,
- 95, 31, 0, 31, 0, 0, 97, 98, 99, 100,
- 0, 0, 0, 101, 0, 102, 0, 0, 0, 0,
- 0, 103, 104, 0, 0, 0, 0, 31, 0, 0,
- 0, 0, 0, 31, 31, 0, 0, 0, 0, 0,
- 0, 692, 0, 692, 0, 692, 105, 257, 692, 108,
- 692, 692, 0, 692, 0, 692, 0, 692, 0, 692,
- 692, 692, 0, 0, 0, 692, 692, 0, 0, 0,
- 0, 692, 0, 692, 692, 0, 0, 0, 692, 0,
- 0, 0, 692, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 692, 692, 0, 692, 0, 0, 0,
- 692, 692, 0, 0, 0, 0, 0, 0, 692, 692,
- 56, 24, 692, 25, 0, 692, 26, 254, 0, 0,
- 692, 27, 61, 62, 0, 28, 0, 0, 0, 0,
- 0, 64, 0, 0, 30, 0, 0, 0, 0, 0,
- 0, 32, 692, 692, 0, 0, 33, 0, 71, 72,
- 34, 0, 0, 0, 0, 692, 0, 0, 0, 0,
+ 0, 0, 0, 89, 90, 91, 92, 302, 0, 0,
+ 0, 531, 0, 0, 0, 95, 0, 0, 0, 0,
+ 0, 97, 98, 99, 100, 0, 0, 0, 101, 0,
+ 102, 0, 0, 0, 0, 0, 103, 104, 0, 0,
+ 0, 0, 0, 0, 56, 24, 0, 25, 0, 0,
+ 26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
+ 0, 105, 303, 107, 108, 64, 0, 0, 30, 0,
+ 0, 0, 0, 0, 0, 32, 0, 0, 0, 0,
+ 33, 0, 71, 72, 34, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 36, 0, 37, 74,
+ 0, 0, 38, 0, 0, 76, 0, 78, 0, 80,
+ 39, 40, 255, 0, 41, 0, 0, 0, 0, 0,
+ 0, 86, 0, 0, 87, 88, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
+ 90, 91, 92, 302, 0, 0, 0, 525, 0, 0,
+ 0, 95, 0, 0, 0, 0, 0, 97, 98, 99,
+ 100, 0, 0, 0, 101, 0, 102, 0, 0, 0,
+ 0, 0, 103, 104, 0, 0, 0, 0, 0, 0,
+ 56, 24, 0, 25, 0, 0, 26, 254, 0, 0,
+ 0, 27, 61, 62, 0, 28, 0, 105, 303, 107,
+ 108, 64, 0, 0, 30, 0, 0, 0, 0, 0,
+ 0, 32, 0, 0, 0, 0, 33, 0, 71, 72,
+ 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 36, 0, 37, 74, 0, 0, 38, 0,
0, 76, 0, 78, 0, 80, 39, 40, 255, 0,
- 41, 0, 0, 84, 0, 0, 0, 0, 0, 0,
- 24, 0, 25, 0, 0, 26, 692, 1285, 0, 0,
- 27, 0, 0, 0, 28, 89, 90, 91, 256, 0,
- 0, 0, 0, 30, 691, 0, 691, 95, 0, 691,
- 32, 691, 691, 0, 691, 33, 691, 1286, 691, 34,
- 691, 691, 691, 0, 0, 0, 691, 691, 0, 0,
- 0, 36, 691, 37, 691, 691, 0, 38, 1287, 691,
- 0, 0, 0, 691, 0, 39, 40, 0, 0, 41,
- 0, 0, 324, 105, 257, 691, 0, 691, 0, 0,
- 0, 691, 691, 0, 0, 0, 0, 0, 0, 691,
- 691, 0, 691, 691, 691, 0, 691, 691, 0, 691,
- 691, 691, 691, 0, 691, 0, 691, 0, 691, 691,
- 691, 0, 0, 0, 691, 691, 0, 0, 0, 0,
- 691, 0, 691, 691, 0, 0, 0, 691, 0, 0,
- 0, 691, 0, 0, 0, 0, 691, 0, 0, 0,
- 0, 0, 0, 691, 0, 691, 0, 0, 0, 691,
- 691, 0, 0, 368, 0, 0, 0, 691, 691, 0,
- 0, 691, 0, 0, 691, 0, 24, 0, 25, 691,
- 0, 26, 0, 0, 1348, 0, 27, 691, 725, 0,
- 28, 0, 726, 1349, 1350, 0, 0, 0, 1351, 30,
- 0, 0, 0, 0, 1352, 0, 32, 0, 24, 0,
- 25, 33, 0, 26, 0, 34, 1348, 0, 27, 0,
- 725, 0, 28, 0, 726, 1349, 1350, 36, 0, 37,
- 1351, 30, 0, 38, 0, 0, 1352, 0, 32, 0,
- 0, 39, 40, 33, 0, 41, 0, 34, 1353, 0,
- 0, 0, 51, 1354, 51, 691, 0, 51, 0, 36,
- 0, 37, 51, 0, 0, 38, 51, 0, 0, 0,
- 0, 0, 0, 39, 40, 51, 0, 41, 0, 0,
- 1353, 0, 51, 0, 51, 1354, 51, 51, 1355, 51,
- 0, 51, 0, 51, 51, 51, 0, 0, 51, 0,
- 51, 0, 0, 51, 0, 51, 0, 51, 0, 51,
- 0, 0, 51, 0, 51, 0, 0, 51, 51, 51,
- 0, 51, 0, 51, 51, 51, 0, 51, 24, 1356,
- 25, 0, 51, 26, 0, 51, 0, 51, 27, 0,
- 0, 51, 28, 0, 51, 0, 0, 0, 0, 51,
- 51, 30, 0, 51, 0, 0, 51, 0, 32, 162,
- 0, 1356, 0, 33, 0, 0, 0, 34, 0, 585,
- 0, 0, 0, 0, 0, 0, 586, 0, 0, 36,
- 0, 37, 0, 0, 0, 38, 0, 0, 587, 162,
- 0, 0, 0, 39, 40, 0, 0, 41, 0, 52,
- 588, 52, 0, 0, 52, 51, 0, 0, 0, 52,
- 0, 0, 0, 52, 0, 0, 0, 0, 0, 0,
- 0, 0, 52, 0, 0, 0, 589, 0, 0, 52,
- 0, 51, 0, 51, 52, 0, 51, 51, 52, 0,
- 52, 51, 52, 0, 0, 51, 0, 52, 0, 0,
- 52, 0, 52, 0, 51, 0, 52, 0, 0, 52,
- 0, 51, 0, 0, 52, 52, 51, 0, 52, 0,
- 51, 52, 51, 0, 51, 24, 0, 25, 0, 51,
- 26, 590, 51, 0, 51, 27, 0, 0, 51, 28,
- 0, 51, 0, 0, 0, 0, 51, 51, 30, 0,
- 51, 0, 0, 51, 0, 32, 0, 0, 0, 0,
- 33, 0, 0, 0, 34, 0, 0, 0, 0, 37,
- 0, 0, 0, 0, 0, 0, 36, 0, 37, 0,
- 37, 0, 38, 0, 0, 37, 0, 0, 0, 37,
- 39, 40, 37, 0, 41, 0, 0, 324, 0, 0,
- 0, 0, 52, 0, 37, 37, 0, 0, 0, 37,
- 37, 0, 0, 0, 0, 37, 0, 37, 37, 37,
- 37, 0, 0, 291, 0, 37, 0, 0, 0, 37,
- 0, 37, 0, 0, 51, 0, 0, 0, 0, 0,
- 0, 37, 0, 37, 37, 35, 37, 0, 0, 0,
- 37, 0, 0, 0, 0, 0, 35, 0, 0, 0,
- 0, 35, 0, 0, 0, 35, 0, 0, 35, 0,
- 37, 0, 0, 0, 0, 0, 37, 37, 325, 0,
- 35, 35, 0, 0, 0, 35, 35, 31, 0, 31,
- 0, 35, 0, 35, 35, 35, 35, 0, 0, 0,
- 0, 35, 0, 0, 0, 35, 0, 35, 0, 0,
- 31, 0, 0, 0, 0, 0, 0, 35, 0, 0,
- 35, 0, 35, 31, 0, 0, 35, 0, 31, 0,
+ 41, 0, 0, 0, 0, 0, 0, 86, 0, 0,
+ 87, 88, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 89, 90, 91, 92, 302,
+ 0, 0, 0, 0, 0, 0, 0, 95, 0, 0,
+ 0, 0, 0, 97, 98, 99, 100, 0, 0, 0,
+ 101, 0, 102, 0, 0, 0, 0, 0, 103, 104,
+ 0, 0, 0, 0, 0, 0, 56, 24, 0, 25,
+ 0, 0, 26, 254, 0, 0, 0, 27, 61, 62,
+ 0, 28, 0, 105, 303, 107, 108, 64, 0, 0,
+ 30, 0, 0, 0, 0, 0, 0, 32, 0, 0,
+ 0, 0, 33, 0, 71, 72, 34, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
+ 37, 74, 0, 0, 38, 0, 0, 76, 0, 78,
+ 0, 80, 39, 40, 255, 0, 41, 0, 0, 0,
+ 0, 0, 0, 86, 0, 0, 87, 88, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 89, 90, 91, 92, 93, 0, 0, 0, 0,
+ 0, 0, 0, 95, 0, 0, 0, 0, 0, 97,
+ 98, 99, 100, 0, 0, 0, 101, 0, 102, 0,
+ 0, 0, 0, 0, 103, 104, 0, 0, 0, 0,
+ 0, 0, 655, 655, 0, 655, 0, 0, 655, 655,
+ 0, 0, 0, 655, 655, 655, 0, 655, 0, 105,
+ 106, 107, 108, 655, 0, 0, 655, 0, 0, 0,
+ 0, 0, 0, 655, 0, 0, 0, 0, 655, 0,
+ 655, 655, 655, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 655, 0, 655, 655, 0, 0,
+ 655, 0, 0, 655, 0, 655, 0, 655, 655, 655,
+ 655, 0, 655, 0, 0, 0, 0, 0, 0, 655,
+ 0, 0, 655, 655, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 655, 655, 655,
+ 655, 655, 0, 0, 0, 0, 0, 0, 0, 655,
+ 0, 0, 0, 0, 0, 655, 655, 655, 655, 0,
+ 0, 0, 655, 0, 655, 0, 0, 0, 0, 0,
+ 655, 655, 0, 0, 0, 0, 0, 0, 143, 143,
+ 0, 143, 0, 0, 143, 143, 0, 0, 0, 143,
+ 143, 143, 0, 143, 0, 655, 655, 655, 655, 143,
+ 0, 0, 143, 0, 0, 0, 0, 0, 0, 143,
+ 0, 0, 0, 0, 143, 0, 143, 143, 143, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 143, 0, 143, 143, 0, 0, 143, 0, 0, 143,
+ 0, 143, 0, 143, 143, 143, 143, 0, 143, 0,
+ 0, 0, 0, 0, 0, 143, 0, 0, 143, 143,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 143, 143, 143, 143, 143, 0, 0,
+ 0, 0, 0, 0, 0, 143, 0, 0, 0, 0,
+ 0, 143, 143, 143, 143, 0, 0, 0, 143, 0,
+ 143, 0, 0, 0, 0, 0, 143, 143, 0, 0,
+ 0, 0, 0, 0, 56, 24, 0, 25, 0, 0,
+ 26, 254, 0, 0, 0, 27, 61, 62, 0, 28,
+ 0, 143, 143, 143, 143, 64, 0, 0, 30, 0,
+ 0, 0, 0, 0, 0, 32, 0, 31, 0, 0,
+ 33, 0, 71, 72, 34, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 36, 0, 37, 74,
+ 31, 0, 38, 0, 0, 76, 0, 78, 0, 80,
+ 39, 40, 255, 31, 41, 0, 0, 0, 31, 0,
0, 0, 0, 31, 0, 31, 31, 31, 31, 0,
- 0, 0, 0, 31, 0, 0, 35, 31, 0, 0,
- 51, 0, 35, 35, 0, 0, 0, 0, 0, 31,
- 0, 51, 31, 0, 31, 0, 51, 0, 0, 0,
- 51, 0, 0, 51, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 51, 51, 0, 31, 0,
- 51, 51, 0, 51, 31, 31, 51, 0, 51, 51,
- 51, 51, 0, 0, 51, 0, 51, 0, 0, 51,
- 51, 0, 51, 51, 0, 0, 51, 0, 0, 0,
- 0, 0, 51, 0, 0, 51, 0, 51, 51, 51,
- 0, 51, 0, 51, 51, 51, 0, 0, 0, 51,
- 0, 51, 51, 51, 51, 0, 0, 0, 0, 51,
- 0, 51, 0, 51, 0, 51, 0, 39, 51, 0,
- 0, 0, 0, 0, 0, 51, 0, 0, 51, 0,
- 51, 51, 0, 51, 51, 0, 51, 0, 0, 0,
- 0, 51, 0, 51, 51, 51, 51, 0, 0, 0,
- 0, 51, 0, 0, 51, 51, 51, 0, 0, 0,
- 40, 0, 0, 0, 0, 0, 0, 51, 0, 51,
- 51, 51, 51, 0, 51, 0, 0, 0, 0, 51,
- 0, 51, 51, 51, 51, 0, 0, 0, 0, 51,
- 0, 0, 0, 51, 51, 0, 51, 0, 51, 51,
- 0, 0, 204, 0, 0, 51, 0, 51, 51, 51,
- 51, 51, 51, 0, 0, 0, 0, 51, 0, 51,
- 51, 51, 51, 0, 0, 51, 0, 51, 0, 0,
- 0, 51, 51, 0, 51, 0, 51, 51, 0, 0,
- 206, 0, 0, 51, 0, 51, 51, 51, 51, 0,
- 51, 0, 0, 0, 0, 51, 0, 51, 51, 51,
- 51, 0, 0, 0, 0, 51, 0, 0, 0, 51,
- 51, 0, 51, 0, 0, 0, 0, 51, 308, 51,
- 0, 51, 0, 51, 51, 0, 51, 0, 51, 0,
- 0, 0, 0, 51, 0, 51, 51, 51, 51, 0,
- 51, 0, 0, 51, 0, 0, 0, 51, 0, 0,
- 51, 0, 0, 51, 0, 0, 309, 465, 51, 51,
- 0, 0, 51, 51, 51, 51, 51, 51, 51, 0,
- 0, 51, 0, 51, 0, 0, 0, 51, 0, 0,
- 466, 0, 0, 0, 0, 0, 0, 465, 51, 51,
- 51, 51, 51, 467, 51, 0, 0, 468, 469, 0,
- 0, 0, 0, 470, 0, 471, 472, 473, 474, 0,
- 466, 0, 0, 475, 0, 0, 0, 476, 51, 0,
- 0, 0, 0, 467, 0, 0, 0, 0, 469, 477,
- 0, 0, 478, 470, 479, 471, 472, 473, 474, 0,
- 0, 0, 0, 475, 0, 0, 0, 476, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 480, 477,
- 0, 0, 478, 0, 479, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 480,
+ 0, 31, 0, 31, 0, 0, 0, 31, 0, 89,
+ 90, 91, 256, 342, 0, 0, 0, 0, 0, 31,
+ 0, 95, 31, 0, 31, 0, 0, 97, 98, 99,
+ 100, 0, 0, 0, 101, 0, 102, 0, 0, 0,
+ 0, 0, 103, 104, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 31, 31, 0, 0, 0, 0,
+ 0, 0, 692, 0, 692, 0, 692, 105, 257, 692,
+ 108, 692, 692, 0, 692, 0, 692, 0, 692, 0,
+ 692, 692, 692, 0, 0, 0, 692, 692, 0, 0,
+ 0, 0, 692, 0, 692, 692, 0, 0, 0, 692,
+ 0, 0, 0, 692, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 692, 692, 0, 692, 0, 0,
+ 0, 692, 692, 0, 0, 0, 0, 0, 0, 692,
+ 692, 56, 24, 692, 25, 0, 692, 26, 254, 0,
+ 0, 692, 27, 61, 62, 0, 28, 0, 0, 0,
+ 0, 0, 64, 0, 0, 30, 0, 0, 0, 0,
+ 0, 0, 32, 692, 692, 0, 0, 33, 0, 71,
+ 72, 34, 0, 0, 0, 0, 692, 0, 0, 0,
+ 0, 0, 0, 36, 0, 37, 74, 0, 0, 38,
+ 0, 0, 76, 0, 78, 0, 80, 39, 40, 255,
+ 0, 41, 0, 0, 84, 0, 0, 0, 0, 0,
+ 0, 24, 0, 25, 0, 0, 26, 692, 1286, 0,
+ 0, 27, 0, 0, 0, 28, 89, 90, 91, 256,
+ 0, 0, 0, 0, 30, 691, 0, 691, 95, 0,
+ 691, 32, 691, 691, 0, 691, 33, 691, 1287, 691,
+ 34, 691, 691, 691, 0, 0, 0, 691, 691, 0,
+ 0, 0, 36, 691, 37, 691, 691, 0, 38, 1288,
+ 691, 0, 0, 0, 691, 0, 39, 40, 0, 0,
+ 41, 0, 0, 324, 105, 257, 691, 0, 691, 0,
+ 0, 0, 691, 691, 0, 0, 0, 0, 0, 0,
+ 691, 691, 0, 691, 691, 691, 0, 691, 691, 0,
+ 691, 691, 691, 691, 0, 691, 0, 691, 0, 691,
+ 691, 691, 0, 0, 0, 691, 691, 0, 0, 0,
+ 0, 691, 0, 691, 691, 0, 0, 0, 691, 0,
+ 0, 0, 691, 0, 0, 0, 0, 691, 0, 0,
+ 0, 0, 0, 0, 691, 0, 691, 0, 0, 0,
+ 691, 691, 0, 0, 368, 0, 0, 0, 691, 691,
+ 0, 0, 691, 0, 0, 691, 0, 24, 0, 25,
+ 691, 0, 26, 0, 0, 1349, 0, 27, 691, 726,
+ 0, 28, 0, 727, 1350, 1351, 0, 0, 0, 1352,
+ 30, 0, 0, 0, 0, 1353, 0, 32, 0, 24,
+ 0, 25, 33, 0, 26, 0, 34, 1349, 0, 27,
+ 0, 726, 0, 28, 0, 727, 1350, 1351, 36, 0,
+ 37, 1352, 30, 0, 38, 0, 0, 1353, 0, 32,
+ 0, 0, 39, 40, 33, 0, 41, 0, 34, 1354,
+ 0, 0, 0, 51, 1355, 51, 691, 0, 51, 0,
+ 36, 0, 37, 51, 0, 0, 38, 51, 0, 0,
+ 0, 0, 0, 0, 39, 40, 51, 0, 41, 0,
+ 0, 1354, 0, 51, 0, 51, 1355, 51, 51, 1356,
+ 51, 0, 51, 0, 51, 51, 51, 0, 0, 51,
+ 0, 51, 0, 0, 51, 0, 51, 0, 51, 0,
+ 51, 0, 0, 51, 0, 51, 0, 0, 51, 51,
+ 51, 0, 51, 0, 51, 51, 51, 0, 51, 24,
+ 1357, 25, 0, 51, 26, 0, 51, 0, 51, 27,
+ 0, 0, 51, 28, 0, 51, 0, 0, 0, 0,
+ 51, 51, 30, 0, 51, 0, 0, 51, 0, 32,
+ 162, 0, 1357, 0, 33, 0, 0, 0, 34, 0,
+ 586, 0, 0, 0, 0, 0, 0, 587, 0, 0,
+ 36, 0, 37, 0, 0, 0, 38, 0, 0, 588,
+ 162, 0, 0, 0, 39, 40, 0, 0, 41, 0,
+ 52, 589, 52, 0, 0, 52, 51, 0, 0, 0,
+ 52, 0, 0, 0, 52, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 0, 0, 0, 590, 0, 0,
+ 52, 0, 51, 0, 51, 52, 0, 51, 51, 52,
+ 0, 52, 51, 52, 0, 0, 51, 0, 52, 0,
+ 0, 52, 0, 52, 0, 51, 0, 52, 0, 0,
+ 52, 0, 51, 0, 0, 52, 52, 51, 0, 52,
+ 0, 51, 52, 51, 0, 51, 0, 0, 0, 0,
+ 51, 0, 591, 51, 0, 51, 0, 0, 0, 51,
+ 0, 0, 51, 0, 0, 0, 0, 51, 51, 0,
+ 0, 51, 0, 24, 51, 25, 0, 0, 26, 0,
+ 0, 0, 0, 27, 0, 0, 0, 28, 0, 0,
+ 0, 29, 24, 0, 25, 0, 30, 26, 0, 0,
+ 0, 31, 27, 32, 0, 0, 28, 0, 33, 0,
+ 0, 0, 34, 35, 0, 30, 0, 0, 0, 0,
+ 0, 0, 32, 52, 36, 0, 37, 33, 0, 0,
+ 38, 34, 0, 0, 0, 0, 37, 0, 39, 40,
+ 0, 0, 41, 36, 0, 37, 0, 37, 0, 38,
+ 0, 0, 37, 0, 0, 51, 37, 39, 40, 37,
+ 0, 41, 0, 0, 324, 0, 0, 0, 0, 0,
+ 0, 37, 37, 0, 0, 0, 37, 37, 0, 0,
+ 0, 0, 37, 0, 37, 37, 37, 37, 0, 0,
+ 291, 0, 37, 0, 0, 0, 37, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
+ 37, 37, 35, 37, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 35, 0, 0, 42, 0, 35, 0,
+ 0, 0, 35, 0, 0, 35, 0, 37, 0, 0,
+ 0, 0, 0, 37, 37, 325, 0, 35, 35, 0,
+ 0, 0, 35, 35, 31, 0, 31, 0, 35, 0,
+ 35, 35, 35, 35, 0, 0, 0, 0, 35, 0,
+ 0, 0, 35, 0, 35, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 35, 0, 0, 35, 0, 35,
+ 31, 0, 0, 35, 0, 31, 0, 0, 0, 0,
+ 31, 0, 31, 31, 31, 31, 0, 0, 0, 0,
+ 31, 0, 0, 35, 31, 0, 0, 51, 0, 35,
+ 35, 0, 0, 0, 0, 0, 31, 0, 51, 31,
+ 0, 31, 0, 51, 0, 0, 0, 51, 0, 0,
+ 51, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 51, 51, 0, 31, 0, 51, 51, 0,
+ 51, 31, 31, 51, 0, 51, 51, 51, 51, 0,
+ 0, 51, 0, 51, 0, 0, 51, 51, 0, 51,
+ 51, 0, 0, 51, 0, 0, 0, 0, 0, 51,
+ 0, 0, 51, 0, 51, 51, 51, 0, 51, 0,
+ 51, 51, 51, 0, 0, 0, 51, 0, 51, 51,
+ 51, 51, 0, 0, 0, 0, 51, 0, 51, 0,
+ 51, 0, 51, 0, 39, 51, 0, 0, 0, 0,
+ 0, 0, 51, 0, 0, 51, 0, 51, 51, 0,
+ 51, 51, 0, 51, 0, 0, 0, 0, 51, 0,
+ 51, 51, 51, 51, 0, 0, 0, 0, 51, 0,
+ 0, 51, 51, 51, 0, 0, 0, 40, 0, 0,
+ 0, 0, 0, 0, 51, 0, 51, 51, 51, 51,
+ 0, 51, 0, 0, 0, 0, 51, 0, 51, 51,
+ 51, 51, 0, 0, 0, 0, 51, 0, 0, 0,
+ 51, 51, 0, 51, 0, 51, 51, 0, 0, 204,
+ 0, 0, 51, 0, 51, 51, 51, 51, 51, 51,
+ 0, 0, 0, 0, 51, 0, 51, 51, 51, 51,
+ 0, 0, 51, 0, 51, 0, 0, 0, 51, 51,
+ 0, 51, 0, 51, 51, 0, 0, 206, 0, 0,
+ 51, 0, 51, 51, 51, 51, 0, 51, 0, 0,
+ 0, 0, 51, 0, 51, 51, 51, 51, 0, 0,
+ 0, 0, 51, 0, 0, 0, 51, 51, 0, 51,
+ 0, 0, 0, 0, 51, 308, 51, 0, 51, 0,
+ 51, 51, 0, 51, 0, 51, 0, 0, 0, 0,
+ 51, 0, 51, 51, 51, 51, 0, 51, 0, 0,
+ 51, 0, 0, 0, 51, 0, 0, 51, 0, 0,
+ 51, 0, 0, 309, 465, 51, 51, 0, 0, 51,
+ 51, 51, 51, 51, 51, 51, 0, 0, 51, 0,
+ 51, 0, 0, 0, 51, 0, 0, 466, 0, 0,
+ 0, 0, 0, 0, 0, 51, 51, 51, 51, 51,
+ 467, 51, 0, 0, 0, 469, 0, 0, 0, 0,
+ 470, 0, 471, 472, 473, 474, 0, 0, 0, 0,
+ 475, 0, 0, 0, 476, 51, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 477, 0, 0, 478,
+ 0, 479, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 480,
};
protected static readonly short [] yyCheck = { 17,
- 17, 4, 18, 300, 299, 529, 17, 87, 88, 51,
- 531, 189, 51, 289, 247, 17, 482, 234, 6, 188,
- 232, 68, 504, 84, 20, 59, 298, 296, 108, 191,
- 344, 298, 157, 334, 383, 574, 323, 581, 790, 982,
- 87, 88, 1162, 47, 77, 92, 59, 58, 1198, 1199,
- 268, 0, 113, 256, 115, 73, 0, 367, 256, 77,
- 256, 592, 601, 330, 256, 112, 256, 113, 79, 115,
- 81, 256, 335, 367, 679, 256, 256, 95, 268, 684,
- 685, 256, 760, 256, 762, 17, 282, 17, 256, 1292,
- 256, 256, 256, 256, 372, 256, 268, 1247, 372, 256,
- 987, 374, 256, 17, 276, 256, 1195, 1310, 391, 357,
- 256, 17, 357, 17, 256, 368, 256, 256, 314, 199,
- 200, 368, 368, 376, 368, 172, 367, 256, 373, 376,
- 374, 414, 1357, 811, 256, 376, 814, 381, 386, 157,
- 157, 386, 1367, 416, 418, 428, 157, 189, 340, 382,
- 189, 429, 17, 59, 339, 157, 423, 63, 17, 344,
- 17, 346, 1251, 325, 349, 350, 429, 352, 353, 372,
- 343, 374, 418, 704, 339, 256, 429, 256, 256, 344,
- 20, 346, 262, 363, 349, 350, 256, 352, 353, 374,
- 232, 363, 367, 232, 17, 363, 371, 268, 1242, 246,
- 247, 367, 256, 369, 422, 371, 368, 371, 288, 374,
- 367, 373, 259, 376, 371, 376, 0, 371, 391, 223,
- 418, 17, 418, 17, 525, 157, 429, 157, 308, 247,
- 447, 1118, 422, 528, 446, 253, 546, 418, 418, 381,
- 228, 414, 763, 157, 429, 420, 418, 87, 88, 296,
- 418, 157, 286, 157, 420, 428, 420, 423, 568, 381,
- 574, 322, 296, 420, 429, 326, 420, 418, 108, 1157,
- 331, 289, 418, 286, 568, 1478, 294, 295, 418, 418,
- 824, 328, 592, 256, 364, 331, 333, 601, 358, 418,
- 452, 309, 157, 277, 1269, 374, 17, 368, 157, 317,
- 157, 319, 1505, 381, 256, 323, 319, 318, 257, 256,
- 391, 257, 256, 256, 1517, 369, 1519, 335, 336, 325,
- 400, 401, 1366, 256, 367, 487, 369, 344, 375, 294,
- 256, 378, 256, 414, 157, 382, 383, 358, 371, 1091,
- 945, 306, 344, 256, 256, 256, 256, 256, 428, 429,
- 335, 422, 1472, 371, 424, 425, 426, 427, 256, 199,
- 200, 157, 256, 157, 382, 383, 1044, 256, 386, 387,
+ 17, 299, 18, 17, 4, 529, 17, 87, 88, 51,
+ 189, 300, 51, 234, 531, 188, 247, 232, 6, 289,
+ 482, 68, 84, 323, 344, 59, 298, 20, 108, 298,
+ 157, 504, 334, 383, 59, 582, 575, 983, 296, 47,
+ 87, 88, 1163, 0, 593, 92, 77, 58, 761, 791,
+ 763, 113, 367, 115, 256, 73, 1199, 1200, 256, 77,
+ 256, 330, 1293, 602, 367, 112, 0, 113, 79, 115,
+ 81, 256, 256, 17, 17, 256, 256, 95, 256, 256,
+ 1311, 256, 268, 268, 17, 268, 294, 256, 325, 376,
+ 276, 256, 256, 1196, 256, 1508, 1509, 256, 306, 812,
+ 256, 256, 815, 988, 371, 1248, 374, 372, 256, 272,
+ 256, 256, 368, 341, 391, 257, 357, 680, 256, 199,
+ 200, 1243, 685, 686, 256, 172, 401, 17, 369, 268,
+ 256, 372, 373, 296, 191, 394, 395, 414, 413, 157,
+ 157, 369, 429, 157, 256, 386, 157, 189, 416, 1252,
+ 189, 382, 1565, 420, 423, 256, 705, 256, 17, 340,
+ 323, 339, 418, 17, 429, 367, 344, 369, 346, 371,
+ 282, 349, 350, 371, 352, 353, 372, 363, 374, 17,
+ 421, 418, 262, 367, 339, 368, 363, 371, 363, 344,
+ 232, 346, 256, 232, 349, 350, 374, 352, 353, 246,
+ 247, 370, 314, 367, 17, 374, 0, 371, 288, 371,
+ 418, 17, 259, 157, 157, 223, 17, 343, 420, 374,
+ 17, 423, 420, 525, 157, 381, 447, 256, 308, 247,
+ 528, 446, 418, 429, 1119, 253, 420, 422, 418, 422,
+ 228, 418, 374, 418, 547, 1367, 59, 764, 1479, 296,
+ 63, 429, 286, 418, 569, 575, 420, 358, 420, 418,
+ 322, 286, 296, 17, 326, 391, 569, 157, 325, 331,
+ 418, 289, 418, 418, 429, 1506, 294, 295, 825, 256,
+ 418, 328, 602, 422, 364, 331, 333, 1518, 414, 1520,
+ 593, 309, 391, 277, 319, 1270, 256, 256, 157, 317,
+ 257, 319, 428, 157, 1158, 323, 418, 318, 256, 256,
+ 256, 368, 376, 368, 358, 414, 373, 335, 336, 157,
+ 400, 401, 256, 424, 425, 426, 427, 344, 375, 256,
+ 344, 378, 1045, 256, 363, 382, 383, 256, 256, 256,
+ 371, 370, 256, 372, 157, 374, 256, 910, 428, 429,
+ 1092, 157, 1473, 371, 256, 256, 157, 256, 256, 263,
+ 157, 256, 21, 418, 382, 383, 915, 335, 386, 387,
388, 389, 390, 391, 392, 393, 394, 395, 396, 363,
- 286, 428, 429, 914, 989, 432, 991, 1362, 1538, 994,
- 363, 257, 256, 1368, 704, 339, 325, 370, 256, 372,
- 418, 374, 256, 256, 446, 305, 256, 446, 1351, 256,
- 368, 705, 418, 319, 456, 725, 369, 256, 1568, 371,
- 1395, 256, 262, 367, 367, 372, 947, 371, 590, 373,
- 374, 375, 376, 376, 418, 419, 157, 381, 344, 266,
- 351, 367, 375, 605, 926, 418, 608, 609, 288, 453,
- 454, 375, 448, 418, 256, 459, 503, 496, 505, 368,
- 300, 748, 375, 375, 374, 374, 462, 266, 308, 262,
- 1275, 429, 391, 257, 372, 369, 1081, 256, 1083, 372,
- 1085, 256, 529, 263, 701, 374, 497, 314, 272, 418,
- 372, 504, 341, 277, 1172, 414, 765, 281, 372, 546,
- 733, 363, 1180, 550, 957, 298, 370, 856, 363, 527,
- 374, 529, 296, 531, 372, 314, 1321, 1038, 372, 372,
- 369, 1409, 372, 740, 364, 372, 1204, 367, 1072, 839,
- 369, 542, 543, 695, 369, 315, 429, 277, 556, 323,
- 256, 281, 368, 561, 591, 839, 418, 429, 375, 294,
- 546, 1439, 1440, 715, 1442, 429, 418, 574, 342, 570,
- 400, 401, 341, 418, 339, 1453, 428, 369, 1456, 344,
- 581, 346, 574, 428, 349, 350, 375, 352, 353, 1184,
- 363, 1259, 272, 1471, 601, 378, 379, 277, 428, 429,
- 369, 281, 368, 256, 376, 613, 614, 1141, 504, 601,
- 305, 264, 342, 429, 914, 376, 296, 1495, 448, 1214,
- 369, 1064, 357, 1066, 373, 1357, 911, 256, 363, 913,
- 368, 368, 462, 256, 369, 1367, 376, 372, 373, 862,
- 368, 1507, 1508, 323, 681, 418, 683, 1176, 363, 256,
- 941, 386, 263, 363, 369, 692, 368, 429, 371, 256,
- 775, 367, 342, 429, 429, 371, 1261, 373, 374, 367,
- 376, 679, 325, 371, 423, 381, 684, 685, 574, 687,
- 363, 343, 305, 418, 946, 1280, 421, 944, 343, 374,
- 372, 429, 429, 371, 376, 982, 733, 256, 1564, 363,
- 6, 429, 339, 418, 315, 601, 418, 420, 418, 415,
- 339, 17, 363, 750, 256, 344, 546, 346, 369, 381,
- 349, 350, 420, 352, 353, 733, 796, 1039, 765, 391,
- 367, 416, 339, 1205, 256, 418, 391, 344, 568, 346,
- 748, 765, 349, 350, 256, 352, 353, 272, 726, 819,
- 367, 802, 414, 59, 418, 763, 1068, 63, 343, 414,
- 386, 769, 592, 305, 1041, 835, 428, 418, 805, 1054,
- 367, 296, 294, 428, 371, 339, 373, 374, 1275, 376,
- 339, 87, 88, 1006, 381, 344, 21, 346, 256, 1275,
- 349, 350, 371, 352, 353, 1371, 381, 798, 323, 357,
- 429, 838, 108, 367, 956, 363, 391, 1275, 816, 1385,
- 818, 369, 376, 384, 372, 373, 374, 52, 272, 856,
- 828, 822, 429, 824, 1321, 862, 389, 339, 386, 414,
- 1134, 1407, 344, 357, 346, 1321, 385, 349, 350, 998,
- 352, 353, 296, 428, 1275, 915, 400, 339, 856, 373,
- 1275, 157, 1275, 1321, 862, 887, 864, 368, 866, 256,
- 418, 401, 386, 1129, 760, 376, 762, 1275, 272, 323,
- 429, 339, 1176, 413, 704, 367, 344, 1162, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, 918,
- 1321, 390, 296, 199, 200, 725, 1321, 369, 1321, 1165,
- 368, 909, 370, 911, 372, 306, 374, 375, 376, 381,
- 896, 1063, 313, 1321, 951, 811, 953, 429, 814, 323,
- 928, 256, 959, 901, 325, 933, 357, 269, 936, 1385,
- 381, 357, 1155, 294, 269, 369, 1202, 945, 1242, 947,
- 391, 1011, 373, 369, 286, 306, 372, 373, 985, 1460,
- 367, 286, 371, 256, 373, 386, 262, 1274, 1275, 376,
- 386, 429, 418, 414, 367, 368, 796, 367, 368, 1006,
- 367, 368, 369, 376, 371, 372, 376, 374, 1295, 376,
- 286, 989, 288, 991, 371, 1022, 994, 367, 367, 819,
- 367, 1028, 415, 256, 300, 421, 376, 376, 1006, 376,
- 418, 306, 308, 308, 1321, 835, 1323, 256, 313, 839,
- 1331, 1522, 368, 319, 1221, 1217, 1282, 1003, 374, 1340,
- 325, 418, 277, 420, 368, 1193, 423, 374, 372, 376,
- 1038, 1331, 376, 1041, 381, 1013, 339, 1015, 344, 1017,
- 1340, 344, 371, 346, 373, 368, 349, 350, 1559, 352,
- 353, 374, 306, 376, 368, 382, 383, 376, 364, 313,
- 374, 367, 1366, 372, 1351, 374, 896, 1581, 1582, 396,
- 397, 1072, 372, 1081, 374, 1083, 339, 1085, 370, 371,
- 1088, 344, 374, 346, 914, 915, 349, 350, 373, 352,
- 353, 376, 368, 256, 400, 401, 372, 368, 374, 376,
- 376, 372, 265, 374, 267, 376, 1099, 270, 394, 395,
- 370, 371, 275, 373, 374, 375, 279, 370, 1155, 372,
- 370, 1129, 428, 429, 374, 288, 429, 1134, 1157, 372,
- 370, 374, 295, 376, 374, 1143, 1144, 300, 367, 370,
- 1141, 304, 1134, 374, 374, 370, 376, 1155, 1044, 374,
- 1156, 256, 982, 316, 1162, 318, 370, 1165, 372, 322,
- 374, 1193, 373, 1195, 1193, 376, 1195, 330, 331, 1176,
- 373, 334, 368, 1003, 337, 371, 1184, 373, 374, 370,
- 294, 1011, 1190, 374, 1176, 1217, 372, 1472, 1217, 370,
- 376, 372, 376, 374, 1202, 372, 392, 393, 504, 376,
- 363, 370, 376, 1273, 1356, 374, 1214, 1215, 372, 294,
- 369, 373, 376, 372, 376, 370, 412, 372, 370, 1251,
- 372, 370, 1251, 372, 420, 367, 372, 423, 374, 371,
- 1382, 373, 374, 343, 376, 1242, 368, 369, 1134, 381,
- 546, 372, 1274, 1275, 414, 1274, 368, 1399, 376, 371,
- 1242, 373, 374, 1261, 356, 418, 386, 387, 388, 381,
- 1330, 418, 568, 1295, 418, 1417, 1295, 1419, 574, 369,
- 392, 393, 1280, 415, 1282, 372, 1172, 374, 1348, 1349,
- 1176, 370, 418, 372, 1180, 375, 592, 1324, 372, 1321,
- 412, 1323, 372, 285, 1323, 601, 368, 370, 420, 372,
- 374, 423, 376, 1373, 398, 399, 1376, 93, 1204, 354,
- 355, 97, 98, 99, 100, 101, 102, 103, 104, 371,
- 374, 373, 376, 61, 374, 376, 376, 65, 66, 67,
- 374, 69, 70, 1334, 381, 327, 74, 75, 354, 355,
- 392, 393, 374, 81, 376, 83, 1242, 85, 406, 407,
- 408, 409, 90, 91, 368, 369, 294, 414, 415, 1366,
- 412, 364, 365, 1259, 372, 373, 1196, 372, 420, 364,
- 365, 423, 1160, 1161, 1366, 294, 114, 374, 0, 372,
- 1409, 402, 403, 410, 411, 377, 378, 379, 380, 1390,
- 382, 383, 384, 385, 386, 387, 388, 389, 704, 372,
- 392, 393, 394, 395, 396, 397, 398, 399, 404, 405,
- 1439, 1440, 374, 1442, 372, 256, 376, 428, 1450, 725,
- 371, 428, 256, 1253, 1453, 294, 294, 1456, 381, 372,
- 374, 373, 418, 373, 375, 1467, 381, 374, 372, 374,
- 429, 374, 1471, 1273, 374, 374, 423, 0, 1480, 1481,
- 372, 374, 1460, 374, 760, 367, 762, 1458, 421, 372,
- 343, 294, 373, 372, 1472, 294, 1495, 374, 374, 418,
- 1366, 370, 418, 371, 367, 1507, 1508, 256, 375, 256,
- 374, 1489, 256, 256, 280, 381, 256, 367, 372, 368,
- 796, 343, 370, 381, 371, 376, 423, 370, 374, 374,
- 1330, 1331, 376, 347, 256, 811, 372, 372, 814, 372,
- 1340, 367, 256, 819, 1522, 372, 302, 255, 1348, 1349,
- 258, 1351, 381, 381, 372, 376, 368, 1357, 256, 835,
- 347, 374, 1564, 839, 370, 375, 367, 1367, 370, 339,
- 370, 1371, 348, 1373, 1581, 1582, 1376, 372, 334, 368,
- 348, 1559, 374, 256, 418, 1385, 342, 381, 418, 372,
- 298, 368, 367, 367, 1565, 1566, 367, 381, 376, 368,
- 372, 1572, 1573, 1581, 1582, 356, 314, 1407, 402, 403,
- 404, 405, 406, 407, 408, 409, 410, 411, 376, 371,
- 374, 337, 368, 368, 305, 418, 368, 418, 418, 368,
- 371, 369, 367, 418, 371, 367, 369, 371, 914, 915,
- 376, 397, 398, 399, 371, 373, 402, 403, 404, 405,
- 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
- 416, 417, 381, 381, 371, 257, 371, 371, 374, 261,
- 372, 372, 256, 373, 373, 367, 372, 374, 0, 374,
- 272, 374, 376, 372, 370, 277, 376, 418, 418, 281,
- 372, 376, 284, 418, 418, 372, 376, 381, 372, 368,
- 370, 372, 381, 368, 296, 297, 982, 315, 263, 301,
- 302, 371, 371, 368, 372, 307, 372, 309, 310, 311,
- 312, 0, 0, 367, 376, 317, 368, 376, 0, 321,
- 368, 323, 372, 256, 368, 1011, 372, 372, 261, 262,
- 418, 333, 370, 335, 336, 372, 338, 368, 372, 367,
- 342, 370, 418, 376, 418, 368, 376, 368, 372, 376,
- 376, 284, 368, 367, 367, 372, 368, 372, 1044, 525,
- 362, 368, 367, 373, 297, 298, 368, 369, 376, 302,
- 376, 315, 305, 376, 307, 376, 309, 310, 311, 312,
- 376, 499, 263, 376, 317, 376, 376, 376, 321, 50,
- 12, 5, 325, 896, 1155, 0, 1003, 1155, 1323, 1295,
- 333, 1512, 1475, 336, 1528, 338, 339, 1463, 1492, 1458,
- 1371, 344, 918, 346, 347, 348, 349, 350, 351, 352,
- 353, 354, 355, 356, 542, 918, 918, 739, 1321, 362,
- 363, 597, 913, 1573, 367, 368, 1391, 370, 371, 372,
- 1567, 374, 375, 376, 1485, 378, 379, 1481, 1134, 382,
- 383, 384, 385, 1480, 1566, 1251, 389, 390, 887, 1419,
- 546, 394, 395, 396, 397, 398, 399, 400, 401, 941,
- 936, 1253, 769, 862, 382, 614, 1054, 71, 337, 413,
- 413, 733, 765, 416, 412, 418, 1172, 414, 417, 415,
- 1176, 416, 839, 265, 1180, 267, 429, 568, 270, 1231,
- 1330, 157, 1134, 275, 1040, 1144, 1120, 279, 1068, 1024,
- 1196, 283, 1134, 1132, 1205, 961, 288, 437, 1204, 544,
- 690, 293, 437, 295, 1326, 257, 893, 1215, 300, 261,
- 892, -1, 304, 305, -1, -1, -1, -1, -1, -1,
- 272, -1, -1, -1, 316, 277, 318, -1, -1, 281,
- 322, -1, 284, -1, -1, -1, 1242, -1, 330, 331,
- -1, -1, 334, 0, 296, 297, -1, 1253, -1, 301,
- 302, -1, -1, 1259, -1, 307, -1, 309, 310, 311,
- 312, -1, -1, -1, -1, 317, -1, 1273, -1, 321,
- -1, 323, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 333, 768, -1, 336, -1, 338, -1, -1, -1,
- 342, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 362, -1, -1, -1, -1, 367, 368, 369, -1, -1,
- -1, -1, -1, -1, 1330, 1331, 418, -1, -1, -1,
- -1, 256, -1, -1, 1340, -1, 261, 262, -1, -1,
- -1, -1, 1348, 1349, -1, 1351, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 284,
- 1366, -1, -1, -1, -1, -1, -1, 1373, -1, -1,
- 1376, -1, 297, 298, -1, -1, -1, 302, -1, -1,
- 305, -1, 307, -1, 309, 310, 311, 312, -1, -1,
- -1, -1, 317, -1, -1, -1, 321, -1, -1, -1,
- 325, -1, -1, -1, -1, -1, -1, -1, 333, -1,
- 0, 336, -1, 338, 339, -1, -1, -1, -1, 344,
- -1, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, -1, -1, -1, -1, -1, 362, 363, -1,
- -1, -1, 367, 368, -1, 370, 371, 372, 373, 374,
- 375, 376, -1, 378, 379, 941, 381, 382, 383, 384,
- 385, 386, 387, 388, 389, 390, -1, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
- -1, 416, -1, 418, -1, 420, -1, -1, 423, 256,
- 257, -1, -1, -1, 429, -1, -1, 264, 265, 266,
- 267, 268, -1, 270, 271, -1, 273, 274, 275, 276,
- 277, 278, 279, 280, -1, -1, -1, -1, 285, -1,
- 287, 288, 289, 290, 291, 292, 0, -1, 295, -1,
- -1, -1, 299, 300, -1, 302, 303, 304, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 314, -1, 316,
- -1, 318, 319, -1, -1, 322, -1, 324, 325, 326,
- 327, 328, 329, 330, 331, 332, 333, 334, 335, -1,
- 337, -1, -1, 340, 341, -1, -1, 344, 345, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
- 367, 368, -1, -1, 371, -1, -1, -1, -1, 376,
- 377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
- -1, -1, -1, -1, -1, 392, 393, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 417, 418, 419, 420, -1, 422, 256, 257, -1, -1,
- -1, -1, 429, -1, 264, 265, 266, 267, 268, -1,
- 270, 271, 0, 273, 274, 275, 276, 277, 278, 279,
- -1, -1, -1, -1, -1, 285, -1, 287, 288, 289,
+ 256, 428, 429, 946, 256, 432, 256, 305, 1363, 418,
+ 367, 706, 256, 52, 1369, 452, 1539, 335, 256, 376,
+ 418, 256, 705, 157, 446, 339, 1352, 446, 367, 368,
+ 369, 315, 371, 372, 456, 374, 376, 376, 257, 256,
+ 256, 1396, 20, 726, 372, 371, 1569, 990, 375, 992,
+ 487, 948, 995, 367, 418, 419, 418, 371, 256, 373,
+ 374, 375, 376, 325, 256, 453, 454, 381, 375, 749,
+ 367, 459, 375, 256, 927, 448, 503, 496, 505, 418,
+ 1173, 420, 381, 257, 423, 375, 368, 381, 1181, 462,
+ 266, 372, 374, 286, 958, 374, 374, 372, 272, 504,
+ 256, 702, 529, 277, 305, 363, 497, 281, 262, 87,
+ 88, 429, 1205, 343, 368, 305, 372, 369, 266, 369,
+ 547, 368, 296, 734, 551, 369, 319, 857, 766, 527,
+ 108, 529, 363, 531, 372, 351, 294, 372, 314, 1082,
+ 741, 1084, 1039, 1086, 298, 840, 1073, 256, 306, 323,
+ 256, 344, 543, 544, 591, 372, 418, 840, 341, 557,
+ 418, 391, 256, 363, 562, 592, 314, 1260, 342, 606,
+ 264, 369, 609, 610, 547, 429, 1410, 369, 575, 376,
+ 571, 575, 429, 339, 414, 277, 369, 418, 344, 281,
+ 346, 582, 372, 349, 350, 368, 352, 353, 428, 375,
+ 367, 1065, 368, 1067, 371, 602, 1440, 1441, 602, 1443,
+ 376, 373, 369, 368, 376, 1142, 614, 615, 418, 914,
+ 1454, 199, 200, 1457, 378, 379, 372, 375, 428, 372,
+ 339, 325, 915, 343, 912, 344, 363, 346, 1472, 368,
+ 349, 350, 1185, 352, 353, 368, 376, 256, 363, 429,
+ 342, 372, 863, 420, 294, 682, 429, 684, 1177, 696,
+ 942, 367, 1496, 429, 343, 371, 693, 373, 374, 776,
+ 376, 381, 1215, 429, 429, 381, 363, 256, 371, 716,
+ 1276, 391, 680, 429, 262, 294, 429, 685, 686, 263,
+ 688, 418, 363, 363, 256, 947, 945, 418, 369, 369,
+ 429, 428, 381, 418, 414, 367, 429, 734, 1276, 415,
+ 288, 504, 391, 357, 983, 374, 272, 357, 428, 1262,
+ 429, 369, 300, 363, 751, 373, 1322, 1276, 1276, 369,
+ 308, 418, 372, 373, 272, 414, 734, 797, 1281, 766,
+ 296, 315, 386, 305, 1275, 1276, 386, 418, 418, 428,
+ 368, 749, 766, 1206, 1322, 1276, 374, 416, 296, 727,
+ 820, 803, 1042, 381, 256, 1296, 764, 323, 1276, 1276,
+ 1276, 369, 770, 1322, 1322, 423, 836, 1055, 418, 806,
+ 391, 421, 575, 381, 1372, 323, 364, 269, 367, 367,
+ 339, 1322, 371, 1324, 373, 374, 1007, 376, 1386, 256,
+ 339, 1322, 381, 414, 286, 339, 398, 399, 799, 602,
+ 357, 256, 839, 1040, 1322, 1322, 1322, 428, 367, 817,
+ 1408, 819, 400, 401, 269, 386, 373, 371, 367, 373,
+ 857, 829, 823, 367, 825, 1135, 863, 376, 368, 386,
+ 371, 286, 1069, 1358, 374, 381, 999, 339, 392, 393,
+ 428, 429, 344, 1368, 346, 391, 916, 349, 350, 857,
+ 352, 353, 1358, 384, 306, 863, 888, 865, 412, 867,
+ 448, 313, 1368, 368, 368, 369, 420, 1177, 414, 423,
+ 1130, 376, 339, 325, 462, 1163, 389, 344, 256, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 919, 367, 306, 372, 308, 374, 357, 376, 385, 313,
+ 376, 368, 910, 370, 912, 372, 1166, 374, 375, 376,
+ 957, 325, 373, 272, 897, 952, 373, 954, 277, 376,
+ 6, 929, 281, 960, 902, 386, 934, 429, 357, 937,
+ 367, 17, 400, 1243, 1386, 1156, 256, 296, 946, 376,
+ 948, 367, 1012, 1203, 373, 371, 306, 373, 374, 986,
+ 376, 368, 369, 313, 1461, 381, 367, 386, 761, 547,
+ 763, 339, 429, 390, 323, 376, 344, 367, 346, 367,
+ 1007, 349, 350, 59, 352, 353, 376, 63, 376, 382,
+ 383, 569, 990, 342, 992, 373, 1023, 995, 376, 415,
+ 369, 1332, 1029, 396, 397, 368, 256, 367, 368, 1007,
+ 1341, 87, 88, 376, 369, 593, 376, 372, 256, 812,
+ 368, 1222, 815, 1218, 372, 371, 1523, 1064, 376, 339,
+ 415, 1004, 108, 1283, 344, 1194, 346, 414, 415, 349,
+ 350, 1039, 352, 353, 1042, 418, 1014, 368, 1016, 1332,
+ 1018, 367, 368, 374, 418, 376, 357, 374, 1341, 376,
+ 376, 429, 363, 1560, 381, 256, 370, 1367, 369, 368,
+ 374, 372, 373, 374, 277, 374, 370, 371, 1582, 1583,
+ 374, 157, 1073, 1352, 1082, 386, 1084, 376, 1086, 339,
+ 371, 1089, 373, 370, 344, 372, 346, 374, 376, 349,
+ 350, 339, 352, 353, 367, 370, 344, 372, 346, 374,
+ 256, 349, 350, 373, 352, 353, 371, 418, 373, 429,
+ 1100, 370, 368, 199, 200, 374, 372, 705, 374, 1156,
+ 376, 370, 1130, 370, 376, 374, 368, 374, 1135, 1158,
+ 372, 1135, 374, 367, 376, 369, 1144, 1145, 726, 370,
+ 371, 1142, 373, 374, 375, 372, 370, 256, 1156, 376,
+ 374, 1157, 372, 372, 376, 1163, 376, 376, 1166, 370,
+ 354, 355, 1194, 374, 1196, 1194, 294, 1196, 372, 429,
+ 1177, 294, 376, 1177, 354, 355, 262, 1185, 406, 407,
+ 408, 409, 372, 1191, 374, 1473, 1218, 364, 365, 1218,
+ 386, 387, 388, 343, 372, 1203, 374, 370, 372, 372,
+ 286, 376, 288, 374, 1274, 376, 414, 1215, 1216, 797,
+ 370, 418, 372, 368, 300, 372, 371, 374, 373, 374,
+ 1252, 356, 308, 1252, 375, 370, 381, 372, 370, 372,
+ 372, 374, 820, 319, 372, 373, 1243, 392, 393, 1243,
+ 364, 365, 1045, 1275, 1276, 370, 1275, 372, 836, 370,
+ 418, 372, 840, 418, 1262, 1161, 1162, 412, 344, 369,
+ 374, 1331, 376, 376, 1296, 420, 372, 1296, 423, 374,
+ 374, 376, 376, 1281, 374, 1283, 376, 372, 364, 1349,
+ 1350, 367, 402, 403, 381, 404, 405, 368, 1325, 374,
+ 1322, 294, 1324, 410, 411, 1324, 372, 294, 372, 374,
+ 372, 374, 372, 256, 1374, 376, 428, 1377, 371, 897,
+ 1357, 256, 428, 368, 400, 401, 371, 294, 373, 374,
+ 294, 381, 372, 374, 373, 418, 374, 915, 916, 375,
+ 373, 372, 1135, 429, 1335, 374, 1383, 392, 393, 381,
+ 93, 374, 428, 429, 97, 98, 99, 100, 101, 102,
+ 103, 104, 374, 1400, 374, 423, 372, 412, 367, 374,
+ 1367, 374, 421, 1367, 372, 420, 373, 372, 423, 294,
+ 1173, 1418, 343, 1420, 1177, 374, 294, 370, 1181, 374,
+ 418, 1410, 371, 418, 367, 375, 256, 256, 374, 256,
+ 1391, 256, 280, 381, 256, 983, 256, 367, 371, 368,
+ 372, 343, 1205, 265, 370, 267, 374, 372, 270, 376,
+ 374, 1440, 1441, 275, 1443, 376, 1004, 279, 504, 1451,
+ 370, 372, 423, 372, 1012, 1454, 288, 381, 1457, 367,
+ 347, 256, 256, 295, 381, 381, 1468, 372, 300, 372,
+ 1243, 368, 304, 1472, 376, 256, 347, 370, 374, 1481,
+ 1482, 375, 372, 1461, 316, 370, 318, 1260, 1459, 367,
+ 322, 547, 339, 370, 348, 1473, 368, 1496, 330, 331,
+ 381, 374, 334, 372, 418, 337, 1508, 1509, 418, 256,
+ 348, 368, 1490, 569, 367, 367, 367, 381, 368, 575,
+ 376, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 363, 356, 376, 368, 61, 372, 593, 256, 65,
+ 66, 67, 371, 69, 70, 1523, 602, 374, 74, 75,
+ 368, 368, 337, 305, 369, 81, 418, 83, 371, 85,
+ 368, 367, 371, 1565, 90, 91, 376, 371, 371, 418,
+ 418, 373, 418, 371, 381, 1582, 1583, 367, 371, 302,
+ 381, 369, 1560, 372, 371, 256, 418, 373, 114, 372,
+ 374, 373, 418, 372, 1367, 1566, 1567, 374, 374, 374,
+ 372, 370, 1573, 1574, 1582, 1583, 376, 418, 376, 376,
+ 372, 334, 376, 418, 372, 381, 372, 368, 418, 342,
+ 0, 339, 381, 372, 370, 368, 344, 367, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 1197,
+ 315, 263, 371, 371, 368, 372, 372, 0, 0, 705,
+ 368, 367, 370, 368, 372, 376, 374, 375, 376, 376,
+ 372, 0, 368, 372, 372, 418, 370, 368, 368, 372,
+ 726, 367, 390, 372, 397, 398, 399, 370, 376, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 368, 1254, 376, 418, 418,
+ 372, 256, 376, 368, 368, 761, 376, 763, 367, 367,
+ 265, 429, 267, 0, 368, 270, 1274, 372, 368, 372,
+ 275, 367, 315, 263, 279, 376, 373, 376, 376, 255,
+ 50, 376, 258, 288, 376, 376, 376, 376, 376, 12,
+ 295, 797, 5, 897, 1004, 300, 1156, 1156, 1324, 304,
+ 1296, 1513, 1476, 1529, 1493, 1459, 812, 919, 1464, 815,
+ 919, 316, 919, 318, 820, 914, 740, 322, 1372, 1574,
+ 1322, 1392, 298, 1331, 1332, 330, 331, 1568, 1486, 334,
+ 836, 261, 337, 1341, 840, 1482, 1252, 1481, 314, 1420,
+ 547, 1349, 1350, 1567, 1352, 1254, 942, 937, 770, 863,
+ 1358, 615, 525, 888, 284, 382, 734, 1055, 337, 71,
+ 1368, 766, 412, 414, 1372, 413, 1374, 297, 415, 1377,
+ 416, 301, 302, 417, 569, 840, 1232, 307, 1386, 309,
+ 310, 311, 312, 1331, 157, 1135, 1041, 317, 1121, 1145,
+ 1025, 321, 1069, 0, 1133, 1206, 962, 1135, 545, 437,
+ 1408, 437, 1216, 333, 1327, 894, 336, 893, 338, 915,
+ 916, -1, -1, 418, -1, -1, 691, -1, -1, -1,
+ -1, -1, -1, -1, -1, 598, 256, 257, -1, -1,
+ -1, -1, 362, -1, 264, 265, 266, 267, 268, -1,
+ 270, 271, -1, 273, 274, 275, 276, 277, 278, 279,
+ 280, -1, -1, -1, -1, 285, -1, 287, 288, 289,
290, 291, 292, -1, -1, 295, -1, -1, -1, 299,
- 300, -1, 302, 303, 304, -1, -1, -1, -1, -1,
+ 300, -1, 302, 303, 304, -1, -1, 983, -1, -1,
-1, -1, -1, -1, 314, -1, 316, -1, 318, 319,
-1, -1, 322, -1, 324, 325, 326, 327, 328, 329,
- 330, 331, 332, 333, 334, 335, -1, 337, -1, -1,
- 340, 341, -1, -1, 344, 345, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 359,
- 360, 361, 362, 363, -1, -1, -1, 367, 368, -1,
+ 330, 331, 332, 333, 334, 335, 1012, 337, -1, -1,
+ 340, 341, -1, -1, 344, 345, -1, -1, -1, 256,
+ -1, -1, -1, 499, -1, 262, -1, -1, -1, 359,
+ 360, 361, 362, 363, -1, -1, -1, 367, 368, 1045,
-1, 371, -1, -1, -1, -1, 376, 377, 378, 379,
- 380, -1, 256, -1, 384, -1, 386, 261, 262, -1,
- -1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
- -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
- 284, -1, -1, -1, -1, -1, -1, 417, 418, 419,
- 420, -1, 422, 297, 298, -1, -1, -1, 302, 429,
- -1, 305, -1, 307, -1, 309, 310, 311, 312, -1,
- -1, -1, -1, 317, -1, -1, -1, 321, -1, -1,
- -1, 325, -1, -1, -1, -1, -1, -1, -1, 333,
- -1, -1, 336, -1, 338, 339, -1, -1, -1, -1,
- 344, -1, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, -1, -1, -1, -1, 362, 363,
- -1, -1, -1, 367, 368, 369, 370, 371, 372, 373,
- 374, 375, 376, -1, 378, 379, 0, -1, 382, 383,
- 384, 385, 386, -1, -1, 389, 390, -1, -1, -1,
- 394, 395, 396, 397, 398, 399, 400, 401, 256, -1,
- -1, -1, -1, 261, 262, -1, -1, -1, -1, 413,
- -1, -1, 416, -1, 418, -1, 420, -1, -1, 423,
- -1, -1, -1, -1, -1, 429, 284, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 297,
- 298, -1, -1, -1, 302, -1, -1, 305, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
- -1, -1, -1, 321, -1, -1, -1, 325, -1, -1,
- -1, -1, -1, -1, -1, 333, -1, -1, 336, -1,
- 338, 339, -1, -1, -1, -1, 344, -1, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, -1,
- -1, -1, -1, -1, 362, 363, -1, -1, -1, 367,
- 368, 369, 370, 371, 372, -1, 374, 375, 376, -1,
- 378, 379, 0, -1, 382, 383, 384, 385, 256, -1,
- -1, 389, 390, 261, 262, -1, 394, 395, 396, 397,
- 398, 399, 400, 401, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 413, 284, -1, 416, -1,
- 418, -1, 420, -1, -1, 423, -1, -1, -1, 297,
- 298, 429, -1, -1, 302, -1, -1, 305, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
- -1, -1, -1, 321, -1, -1, -1, 325, -1, -1,
- -1, -1, -1, -1, -1, 333, -1, -1, 336, -1,
- 338, 339, -1, -1, -1, -1, 344, -1, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, -1,
- -1, -1, 256, -1, 362, 363, -1, -1, 262, 367,
- 368, 369, 370, 371, 372, -1, 374, 375, 376, -1,
- 378, 379, -1, -1, 382, 383, 384, 385, -1, -1,
- -1, 389, 390, -1, -1, -1, 394, 395, 396, 397,
- 398, 399, 400, 401, 298, -1, -1, -1, -1, -1,
- 0, -1, -1, -1, -1, 413, -1, -1, 416, -1,
- 418, -1, 420, -1, -1, 423, -1, -1, -1, -1,
- -1, 429, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 339, -1, -1, -1, -1,
- 344, -1, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, -1, -1, -1, -1, -1, 363,
- 256, -1, -1, 367, 368, 369, 370, 371, 372, 373,
- 374, 375, 376, -1, 378, 379, -1, -1, 382, 383,
- 384, 385, 386, -1, -1, 389, 390, -1, -1, 0,
- 394, 395, 396, 397, 398, 399, 400, 401, 256, -1,
- -1, -1, -1, -1, 262, -1, -1, -1, -1, 413,
- -1, -1, 416, -1, 418, -1, 420, -1, -1, 423,
- -1, -1, -1, -1, -1, 429, -1, -1, -1, -1,
- -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
- 298, -1, -1, 339, -1, -1, -1, -1, 344, -1,
- 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 380, -1, -1, 0, 384, -1, 386, -1, -1, -1,
+ -1, 298, 392, 393, -1, -1, -1, 543, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 368, -1, 370, 0, 372, -1, 374, 375,
- 376, 339, -1, -1, -1, -1, 344, -1, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 355, 356, -1,
- -1, -1, -1, -1, -1, 363, -1, -1, -1, 367,
- 368, -1, 370, 371, 372, -1, 374, 375, 376, -1,
- 378, 379, -1, -1, 382, 383, 384, 385, -1, -1,
- -1, 389, 390, 429, -1, -1, 394, 395, 396, 397,
- 398, 399, 400, 401, -1, -1, -1, -1, -1, 0,
- -1, -1, -1, -1, -1, 413, 256, 257, 416, -1,
- 418, 261, -1, -1, -1, 265, -1, 267, -1, -1,
- 270, 429, 272, 273, -1, 275, -1, 277, -1, 279,
- -1, 281, 282, 283, 284, -1, -1, 287, 288, -1,
- -1, -1, 0, 293, -1, 295, 296, 297, -1, -1,
- 300, 301, 302, -1, 304, -1, -1, 307, -1, 309,
- 310, 311, 312, -1, -1, -1, 316, 317, 318, -1,
- -1, 321, 322, 323, -1, -1, -1, -1, -1, -1,
- 330, 331, -1, 333, 334, 0, 336, 337, 338, -1,
- -1, -1, 342, -1, -1, -1, 257, -1, -1, -1,
- 261, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 272, 362, -1, -1, -1, 277, -1, 368, 369,
- 281, -1, -1, 284, -1, -1, -1, 377, 0, -1,
- -1, -1, -1, -1, -1, 296, 297, -1, -1, 257,
- 301, 302, -1, 261, -1, -1, 307, -1, 309, 310,
- 311, 312, -1, -1, 272, -1, 317, -1, -1, 277,
- 321, -1, 323, 281, -1, -1, 284, -1, 418, -1,
- -1, 0, 333, -1, 335, 336, -1, 338, 296, 297,
- -1, 342, 257, 301, 302, -1, 261, -1, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, 272, -1, 317,
- -1, 362, 277, 321, -1, 323, 281, -1, 369, 284,
- -1, -1, -1, -1, 0, 333, -1, -1, 336, -1,
- 338, 296, 297, -1, 342, -1, 301, 302, -1, -1,
- -1, -1, 307, -1, 309, 310, 311, 312, -1, -1,
- -1, -1, 317, -1, 362, -1, 321, -1, 323, -1,
- 368, 369, -1, -1, -1, -1, 257, 0, 333, -1,
- 261, 336, -1, 338, -1, -1, -1, 342, -1, -1,
- -1, 272, -1, -1, -1, -1, 277, -1, -1, -1,
- 281, -1, -1, 284, -1, -1, -1, 362, -1, -1,
- -1, -1, -1, 368, 369, 296, 297, -1, -1, 257,
- 301, 302, -1, 261, -1, -1, 307, -1, 309, 310,
- 311, 312, -1, -1, 272, -1, 317, -1, -1, 277,
- 321, -1, 323, 281, -1, -1, 284, -1, -1, -1,
- -1, -1, 333, -1, -1, 336, -1, 338, 296, 297,
- -1, 342, 257, 301, 302, -1, 261, -1, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, 272, -1, 317,
- -1, 362, 277, 321, -1, 323, 281, -1, 369, 284,
- -1, -1, -1, -1, -1, 333, -1, -1, 336, -1,
- 338, 296, 297, -1, 342, 257, 301, 302, -1, 261,
- -1, -1, 307, -1, 309, 310, 311, 312, -1, -1,
- 272, -1, 317, -1, 362, 277, 321, -1, 323, 281,
- -1, -1, 284, -1, -1, -1, -1, -1, 333, -1,
- -1, 336, -1, 338, 296, 297, -1, 342, 257, 301,
- 302, -1, 261, -1, -1, 307, -1, 309, 310, 311,
- 312, -1, -1, 272, -1, 317, -1, 362, 277, 321,
+ -1, -1, -1, -1, -1, -1, -1, 417, 418, 419,
+ 420, -1, 422, -1, -1, -1, 769, -1, -1, 429,
+ -1, -1, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, -1, -1, -1, -1, -1, 363, -1, -1, 1135,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, -1, -1, 382, 383, 384, 385, 386,
+ 257, -1, 389, 390, 261, -1, -1, 394, 395, 396,
+ 397, 398, 399, 400, 401, 272, -1, 1173, -1, -1,
+ 277, 1177, -1, -1, 281, 1181, 413, 284, -1, 416,
+ -1, 418, -1, 420, 256, -1, 423, -1, -1, 296,
+ 297, 1197, 429, -1, 301, 302, -1, -1, -1, 1205,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, -1, 321, -1, 323, -1, -1, -1,
+ -1, 0, -1, -1, -1, -1, 333, -1, 335, 336,
+ -1, 338, -1, -1, -1, 342, -1, 1243, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1254, -1,
+ -1, -1, -1, -1, 1260, 362, -1, -1, -1, -1,
+ -1, 368, 369, -1, -1, -1, -1, 339, 1274, 942,
+ -1, -1, 344, -1, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 368, -1, 370, -1,
+ 372, -1, 374, 375, 376, -1, -1, -1, -1, 256,
+ -1, -1, 384, 385, 261, 262, -1, 389, 390, -1,
+ -1, -1, -1, -1, -1, 1331, 1332, -1, 400, 401,
+ -1, -1, -1, -1, -1, 1341, -1, 284, -1, -1,
+ -1, 413, -1, 1349, 1350, -1, 1352, 0, -1, -1,
+ 297, 298, -1, -1, -1, 302, -1, 429, 305, -1,
+ 307, 1367, 309, 310, 311, 312, -1, -1, 1374, -1,
+ 317, 1377, -1, -1, 321, -1, -1, -1, 325, -1,
+ -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
+ -1, 338, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ -1, -1, -1, -1, -1, 362, 363, -1, -1, -1,
+ 367, 368, -1, 370, 371, 372, 373, 374, 375, 376,
+ -1, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, -1, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, -1, 416,
+ -1, 418, -1, 420, -1, -1, 423, 256, 257, -1,
+ -1, -1, 429, -1, -1, 264, 265, 266, 267, 268,
+ -1, 270, 271, 0, 273, 274, 275, 276, 277, 278,
+ 279, -1, -1, -1, -1, -1, 285, -1, 287, 288,
+ 289, 290, 291, 292, -1, -1, 295, -1, -1, -1,
+ 299, 300, -1, 302, 303, 304, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 314, -1, 316, -1, 318,
+ 319, -1, -1, 322, -1, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, -1, 337, -1,
+ -1, 340, 341, -1, -1, 344, 345, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 359, 360, 361, 362, 363, -1, -1, -1, 367, 368,
+ -1, -1, 371, -1, -1, -1, -1, 376, 377, 378,
+ 379, 380, -1, 256, -1, 384, -1, 386, 261, 262,
+ -1, -1, -1, 392, 393, -1, -1, -1, -1, -1,
+ -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
+ -1, 284, -1, -1, -1, -1, -1, -1, 417, 418,
+ 419, 420, -1, 422, 297, 298, -1, -1, -1, 302,
+ 429, -1, 305, -1, 307, -1, 309, 310, 311, 312,
+ -1, -1, -1, -1, 317, -1, -1, -1, 321, -1,
+ -1, -1, 325, -1, -1, -1, -1, -1, -1, -1,
+ 333, -1, -1, 336, -1, 338, 339, -1, -1, -1,
+ -1, 344, -1, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, -1, -1, -1, -1, 362,
+ 363, -1, -1, -1, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, -1, 378, 379, -1, -1, 382,
+ 383, 384, 385, 386, -1, -1, 389, 390, -1, -1,
+ -1, 394, 395, 396, 397, 398, 399, 400, 401, 256,
+ -1, -1, -1, 0, 261, 262, -1, -1, -1, -1,
+ 413, -1, -1, 416, -1, 418, -1, 420, -1, -1,
+ 423, -1, -1, -1, -1, -1, 429, 284, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 297, 298, -1, -1, -1, 302, -1, -1, 305, -1,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, -1, 321, -1, -1, -1, 325, -1,
+ -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
+ -1, 338, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ -1, -1, -1, -1, -1, 362, 363, 0, -1, -1,
+ 367, 368, 369, 370, 371, 372, -1, 374, 375, 376,
+ -1, 378, 379, -1, -1, 382, 383, 384, 385, 256,
+ -1, -1, 389, 390, 261, 262, -1, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 413, 284, -1, 416,
+ -1, 418, -1, 420, -1, -1, 423, -1, -1, -1,
+ 297, 298, 429, -1, -1, 302, -1, -1, 305, -1,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, -1, 321, -1, -1, -1, 325, -1,
+ -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
+ -1, 338, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ -1, -1, -1, -1, -1, 362, 363, -1, -1, -1,
+ 367, 368, 369, 370, 371, 372, -1, 374, 375, 376,
+ -1, 378, 379, -1, -1, 382, 383, 384, 385, 256,
+ -1, -1, 389, 390, 261, 262, -1, 394, 395, 396,
+ 397, 398, 399, 400, 401, -1, 0, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 413, 284, -1, 416,
+ -1, 418, -1, 420, -1, -1, 423, -1, -1, -1,
+ 297, 298, 429, -1, -1, 302, -1, -1, 305, -1,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, -1, 321, -1, -1, -1, 325, -1,
+ -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
+ -1, 338, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ -1, -1, 0, 256, -1, 362, 363, -1, -1, 262,
+ 367, 368, -1, 370, 371, 372, -1, 374, 375, 376,
+ -1, 378, 379, -1, -1, 382, 383, 384, 385, -1,
+ -1, -1, 389, 390, -1, -1, -1, 394, 395, 396,
+ 397, 398, 399, 400, 401, 298, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 413, -1, -1, 416,
+ -1, 418, -1, -1, -1, 0, -1, -1, -1, -1,
+ -1, -1, 429, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 339, -1, -1, -1,
+ -1, 344, -1, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, -1, -1, -1, -1, -1, -1,
+ 363, -1, -1, -1, 367, 368, -1, 370, 371, 372,
+ -1, 374, 375, 376, -1, 378, 379, -1, -1, 382,
+ 383, 384, 385, -1, 0, -1, 389, 390, -1, -1,
+ -1, 394, 395, 396, 397, 398, 399, 400, 401, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 413, -1, -1, 416, -1, 418, -1, -1, -1, -1,
+ -1, -1, 256, 257, -1, -1, 429, 261, -1, -1,
+ -1, 265, -1, 267, -1, -1, 270, -1, 272, 273,
+ -1, 275, -1, 277, -1, 279, -1, 281, 282, 283,
+ 284, -1, -1, 287, 288, -1, -1, -1, 0, 293,
+ -1, 295, 296, 297, -1, -1, 300, 301, 302, -1,
+ 304, -1, -1, 307, -1, 309, 310, 311, 312, -1,
+ -1, -1, 316, 317, 318, -1, -1, 321, 322, 323,
+ -1, -1, -1, -1, -1, -1, 330, 331, -1, 333,
+ 334, 0, 336, 337, 338, -1, -1, -1, 342, 257,
+ -1, -1, -1, 261, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 272, -1, -1, -1, 362, 277,
+ -1, -1, -1, 281, 368, 369, 284, -1, -1, -1,
+ -1, -1, -1, 377, 0, -1, -1, -1, 296, 297,
+ -1, -1, -1, 301, 302, -1, -1, -1, -1, 307,
+ -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
+ -1, -1, 257, 321, -1, 323, 261, -1, -1, -1,
+ -1, -1, -1, -1, 418, 333, -1, 272, 336, -1,
+ 338, -1, 277, -1, 342, -1, 281, -1, -1, 284,
+ -1, -1, -1, -1, -1, -1, -1, 0, -1, -1,
+ -1, 296, 297, -1, 362, -1, 301, 302, -1, 367,
+ 368, 369, 307, -1, 309, 310, 311, 312, -1, -1,
+ -1, -1, 317, -1, -1, -1, 321, -1, 323, -1,
+ -1, 257, -1, -1, -1, 261, -1, -1, 333, -1,
+ 335, 336, -1, 338, 0, -1, 272, 342, -1, -1,
+ -1, 277, -1, -1, -1, 281, -1, -1, 284, -1,
+ -1, -1, -1, -1, -1, -1, -1, 362, -1, -1,
+ 296, 297, -1, -1, 369, 301, 302, -1, -1, -1,
+ -1, 307, -1, 309, 310, 311, 312, -1, -1, -1,
+ -1, 317, -1, -1, -1, 321, -1, 323, -1, -1,
+ -1, -1, -1, -1, -1, 257, -1, 333, -1, 261,
+ 336, 0, 338, -1, -1, -1, 342, -1, -1, -1,
+ 272, -1, -1, -1, -1, 277, -1, -1, -1, 281,
+ -1, -1, 284, -1, -1, -1, 362, -1, -1, -1,
+ -1, -1, 368, 369, 296, 297, -1, -1, 257, 301,
+ 302, -1, 261, -1, 0, 307, -1, 309, 310, 311,
+ 312, -1, -1, 272, -1, 317, -1, -1, 277, 321,
-1, 323, 281, -1, -1, 284, -1, -1, -1, -1,
-1, 333, -1, -1, 336, -1, 338, 296, 297, -1,
- 342, 257, 301, 302, -1, 261, -1, -1, 307, -1,
+ 342, 257, 301, 302, -1, 261, -1, 0, 307, -1,
309, 310, 311, 312, -1, -1, 272, -1, 317, -1,
- 362, 277, 321, -1, 323, 281, -1, -1, 284, -1,
+ 362, 277, 321, -1, 323, 281, 368, 369, 284, -1,
+ -1, -1, -1, -1, 333, -1, -1, 336, -1, 338,
+ 296, 297, -1, 342, -1, 301, 302, -1, -1, -1,
+ -1, 307, -1, 309, 310, 311, 312, -1, -1, -1,
+ -1, 317, -1, 362, 257, 321, -1, 323, 261, -1,
+ 369, -1, -1, -1, -1, -1, -1, 333, -1, 272,
+ 336, -1, 338, -1, 277, -1, 342, -1, 281, -1,
+ -1, 284, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 296, 297, -1, 362, -1, 301, 302,
+ -1, 257, -1, -1, 307, 261, 309, 310, 311, 312,
+ -1, -1, -1, -1, 317, -1, 272, -1, 321, -1,
+ 323, 277, -1, -1, -1, 281, -1, -1, 284, -1,
+ 333, -1, -1, 336, -1, 338, -1, -1, -1, 342,
+ 296, 297, -1, -1, -1, 301, 302, -1, -1, -1,
+ -1, 307, -1, 309, 310, 311, 312, -1, -1, 362,
+ -1, 317, -1, -1, -1, 321, -1, 323, 257, -1,
+ -1, -1, 261, -1, -1, -1, -1, 333, -1, -1,
+ 336, -1, 338, 272, -1, -1, 342, -1, 277, -1,
+ -1, -1, 281, -1, -1, 284, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 362, 296, 297, -1,
+ -1, 257, 301, 302, -1, 261, -1, -1, 307, -1,
+ 309, 310, 311, 312, -1, -1, 272, -1, 317, -1,
+ -1, 277, 321, -1, 323, 281, -1, -1, 284, -1,
-1, -1, -1, -1, 333, -1, -1, 336, -1, 338,
296, 297, -1, 342, 257, 301, 302, -1, 261, -1,
-1, 307, -1, 309, 310, 311, 312, -1, -1, 272,
@@ -12957,31 +12992,31 @@ void case_1034()
401, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 412, 413, -1, -1, -1, -1, -1, -1, 420,
-1, -1, 423, -1, -1, -1, -1, -1, 429, -1,
- -1, 339, -1, -1, -1, -1, 344, -1, 346, 347,
+ 285, 339, -1, -1, -1, -1, 344, -1, 346, 347,
348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
-1, -1, -1, -1, -1, 363, -1, -1, -1, -1,
- 368, 369, 370, 371, 372, 373, 374, 375, 376, -1,
- 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 256,
+ 378, 379, 327, 381, 382, 383, 384, 385, 386, 387,
388, 389, 390, -1, 392, 393, 394, 395, 396, 397,
398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
- 408, 409, 410, 411, 412, 413, -1, 256, 256, -1,
- 418, -1, 420, 262, -1, 423, -1, 265, -1, 267,
- -1, 429, 270, -1, -1, -1, -1, 275, -1, -1,
- -1, 279, -1, -1, -1, -1, -1, -1, -1, -1,
- 288, -1, -1, -1, -1, -1, -1, 295, -1, 298,
- -1, -1, 300, -1, -1, -1, 304, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 316, -1,
- 318, -1, -1, -1, 322, -1, -1, -1, -1, -1,
- -1, -1, 330, 331, -1, -1, 334, -1, -1, 337,
+ 408, 409, 410, 411, 412, 413, -1, 256, -1, -1,
+ 418, -1, 420, 262, -1, 423, -1, -1, -1, -1,
+ -1, 429, 377, 378, 379, 380, -1, 382, 383, 384,
+ 385, 386, 387, 388, 389, -1, -1, 392, 393, 394,
+ 395, 396, 397, 398, 399, -1, -1, -1, -1, 298,
+ -1, -1, 339, -1, -1, -1, -1, 344, -1, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 368, -1, 370, -1, 372, -1, 374, 375, 376,
339, -1, -1, -1, -1, 344, -1, 346, 347, 348,
349, 350, 351, 352, 353, 354, 355, 356, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 367, 368,
369, 370, 371, 372, 373, 374, 375, 376, -1, 378,
379, -1, 381, 382, 383, 384, 385, 386, 387, 388,
- 389, 390, -1, 392, 393, 394, 395, 396, 397, 398,
+ 389, 390, 429, 392, 393, 394, 395, 396, 397, 398,
399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
409, 410, 411, 412, 413, -1, 256, 256, -1, -1,
- 418, 420, 262, -1, -1, -1, 265, -1, 267, -1,
+ -1, 420, 262, -1, -1, -1, 265, -1, 267, -1,
429, 270, -1, -1, -1, -1, 275, -1, -1, -1,
279, -1, -1, -1, -1, -1, -1, -1, -1, 288,
-1, -1, -1, -1, -1, -1, 295, -1, 298, -1,
@@ -13062,27 +13097,27 @@ void case_1034()
404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
-1, -1, -1, -1, 418, -1, 420, -1, -1, 423,
-1, 418, -1, -1, -1, 429, -1, -1, 339, -1,
- -1, -1, 256, 344, -1, 346, 347, 348, 349, 350,
+ -1, -1, -1, 344, -1, 346, 347, 348, 349, 350,
351, 352, 353, 354, 355, 356, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 368, -1, 370,
-1, 372, -1, 374, 375, 376, -1, 378, 379, -1,
381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
- -1, -1, -1, 394, 395, 396, 397, 398, 399, 400,
+ 261, -1, -1, 394, 395, 396, 397, 398, 399, 400,
401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
- 411, 256, 413, -1, -1, -1, -1, 262, -1, -1,
- -1, -1, -1, -1, -1, 339, -1, -1, 429, -1,
- 344, -1, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 298, 368, -1, 370, -1, 372, -1,
- 374, 375, 376, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 390, -1, -1, 256,
+ 411, 256, 413, 284, -1, -1, -1, 262, -1, -1,
+ -1, -1, -1, -1, -1, -1, 297, -1, 429, -1,
+ -1, 302, -1, -1, 305, -1, 307, -1, 309, 310,
+ 311, 312, -1, -1, -1, -1, 317, -1, -1, -1,
+ 321, -1, -1, 298, 325, -1, -1, -1, -1, -1,
+ -1, -1, 333, -1, -1, 336, -1, 338, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 256,
-1, -1, -1, -1, -1, 262, -1, -1, -1, -1,
- -1, -1, -1, -1, 339, -1, -1, -1, -1, 344,
+ -1, 362, -1, -1, 339, -1, -1, 368, -1, 344,
-1, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, -1, -1, -1, 429, -1, -1, -1, -1,
+ 355, 356, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 298, -1, 368, -1, 370, -1, 372, -1, 374,
375, 376, -1, 378, 379, -1, -1, 382, 383, 384,
- 385, 386, 387, 388, 389, 390, -1, -1, -1, 394,
+ 385, 386, 387, 388, 389, 390, -1, 418, -1, 394,
395, 396, 397, 398, 399, 400, 401, -1, -1, -1,
-1, -1, 339, -1, -1, -1, -1, 344, 413, 346,
347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
@@ -13194,7 +13229,7 @@ void case_1034()
351, 352, 353, 354, 355, 356, -1, -1, -1, -1,
429, -1, -1, -1, -1, -1, -1, 368, -1, 370,
-1, 372, -1, 374, 375, 376, -1, -1, -1, -1,
- -1, -1, -1, 384, 385, -1, -1, -1, 389, 390,
+ -1, -1, -1, -1, 385, -1, -1, -1, 389, 390,
-1, 256, -1, -1, -1, -1, -1, -1, -1, 400,
401, -1, -1, -1, -1, -1, 339, -1, -1, -1,
-1, 344, 413, 346, 347, 348, 349, 350, 351, 352,
@@ -13208,7 +13243,7 @@ void case_1034()
355, 356, -1, -1, -1, -1, 429, -1, -1, -1,
-1, -1, -1, 368, -1, 370, -1, 372, -1, 374,
375, 376, -1, -1, -1, -1, -1, -1, -1, -1,
- 385, -1, -1, -1, 389, 390, -1, 256, -1, -1,
+ 385, -1, -1, -1, -1, 390, -1, 256, -1, -1,
-1, -1, -1, -1, -1, 400, 401, -1, -1, -1,
-1, -1, 339, -1, -1, -1, -1, 344, 413, 346,
347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
@@ -13221,164 +13256,216 @@ void case_1034()
349, 350, 351, 352, 353, 354, 355, 356, -1, -1,
-1, -1, 429, -1, -1, -1, -1, -1, -1, 368,
-1, 370, -1, 372, -1, 374, 375, 376, -1, -1,
- -1, -1, -1, -1, -1, -1, 385, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 390, -1, 256, -1, -1, -1, -1, -1, -1,
-1, 400, 401, -1, -1, -1, -1, -1, 339, -1,
-1, -1, -1, 344, 413, 346, 347, 348, 349, 350,
351, 352, 353, 354, 355, 356, -1, -1, -1, -1,
429, -1, -1, -1, -1, -1, -1, 368, -1, 370,
- -1, 372, -1, 374, 375, 376, -1, -1, -1, -1,
+ -1, 372, -1, 374, 375, 376, -1, -1, -1, 256,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 390,
- -1, 256, -1, -1, -1, -1, -1, -1, -1, 400,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 400,
401, -1, -1, -1, -1, -1, 339, -1, -1, -1,
-1, 344, 413, 346, 347, 348, 349, 350, 351, 352,
353, 354, 355, 356, -1, -1, -1, -1, 429, -1,
-1, -1, -1, -1, -1, 368, -1, 370, -1, 372,
- -1, 374, 375, 376, -1, -1, -1, 256, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 390, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 400, 401, -1,
- -1, -1, -1, -1, 339, -1, -1, -1, -1, 344,
- 413, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, -1, -1, -1, -1, 429, -1, -1, -1,
- -1, -1, -1, 368, -1, 370, -1, 372, -1, 374,
- 375, 376, -1, -1, -1, -1, 262, -1, -1, -1,
- 266, -1, -1, -1, -1, 390, -1, -1, -1, -1,
- 339, -1, -1, -1, -1, 344, 401, 346, 347, 348,
- 349, 350, 351, 352, 353, 354, 355, 356, 413, -1,
- -1, -1, 298, -1, -1, -1, -1, -1, -1, 368,
- -1, 370, -1, 372, 429, 374, 375, 376, 314, -1,
+ -1, 374, 375, 376, -1, -1, -1, -1, 262, -1,
+ -1, -1, 266, -1, -1, -1, -1, 390, -1, -1,
+ -1, -1, 339, -1, -1, -1, -1, 344, 401, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 413, -1, -1, -1, 298, -1, -1, -1, -1, -1,
+ -1, 368, -1, 370, -1, 372, 429, 374, 375, 376,
+ 314, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 390, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 401, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 413, -1, -1, -1,
+ -1, -1, -1, 357, -1, -1, -1, -1, -1, 363,
+ -1, -1, 429, -1, 368, 369, -1, 371, -1, 373,
+ -1, 375, 376, -1, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, -1, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, -1, 256, -1, 418, -1, 420, -1, -1, 423,
+ 264, 265, 266, 267, 268, 429, 270, 271, -1, 273,
+ 274, 275, 276, 277, 278, 279, -1, -1, -1, -1,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, -1,
+ -1, 295, -1, -1, -1, 299, 300, -1, 302, 303,
+ 304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 314, -1, 316, -1, 318, 319, -1, -1, 322, -1,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, -1, 337, -1, -1, 340, 341, -1, -1,
+ 344, 345, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, 367, -1, -1, -1, 371, -1, -1,
+ -1, -1, 376, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 390, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 401, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 413, -1, -1, -1, -1, -1,
- -1, 357, -1, -1, -1, -1, -1, 363, -1, -1,
- 429, -1, 368, 369, -1, 371, -1, 373, -1, 375,
- 376, -1, 378, 379, -1, 381, 382, 383, 384, 385,
- 386, 387, 388, 389, 390, -1, 392, 393, 394, 395,
- 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
- 406, 407, 408, 409, 410, 411, 412, 413, -1, -1,
- 256, -1, 418, -1, 420, -1, -1, 423, 264, 265,
- 266, 267, 268, 429, 270, 271, -1, 273, 274, 275,
- 276, 277, 278, 279, -1, -1, -1, -1, -1, 285,
- -1, 287, 288, 289, 290, 291, 292, -1, -1, 295,
- -1, -1, -1, 299, 300, -1, 302, 303, 304, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 314, -1,
- 316, -1, 318, 319, -1, -1, 322, -1, 324, 325,
- 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
- -1, 337, -1, -1, 340, 341, -1, -1, 344, 345,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
- -1, 367, -1, -1, -1, 371, -1, -1, -1, -1,
- 376, 377, 378, 379, 380, -1, -1, -1, 384, -1,
- 386, -1, -1, -1, -1, -1, 392, 393, -1, -1,
+ -1, 256, -1, 417, 418, 419, 420, -1, 422, 264,
+ 265, 266, 267, -1, -1, 270, 271, -1, 273, 274,
+ 275, 276, 277, 278, 279, -1, -1, -1, -1, -1,
+ 285, -1, 287, 288, 289, 290, 291, 292, -1, -1,
+ 295, -1, -1, -1, 299, 300, -1, 302, 303, 304,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 314,
+ -1, 316, -1, 318, 319, -1, -1, 322, -1, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, -1, 337, -1, -1, 340, 341, -1, -1, 344,
+ 345, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
+ -1, -1, 367, -1, -1, -1, 371, -1, -1, -1,
+ -1, 376, 377, 378, 379, 380, -1, -1, -1, 384,
+ -1, 386, -1, -1, -1, -1, -1, 392, 393, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 256,
- -1, 417, 418, 419, 420, -1, 422, 264, 265, 266,
- 267, -1, -1, 270, 271, -1, 273, 274, 275, 276,
- 277, 278, 279, -1, -1, -1, -1, -1, 285, -1,
- 287, 288, 289, 290, 291, 292, -1, -1, 295, -1,
- -1, -1, 299, 300, -1, 302, 303, 304, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 314, -1, 316,
- -1, 318, 319, -1, -1, 322, -1, 324, 325, 326,
- 327, 328, 329, 330, 331, 332, 333, 334, 335, -1,
- 337, -1, -1, 340, 341, -1, -1, 344, 345, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 256, -1,
+ -1, -1, 417, 418, 419, 420, 264, 265, 266, 267,
+ -1, -1, 270, 271, -1, 273, 274, 275, 276, 277,
+ 278, 279, -1, -1, -1, -1, -1, 285, -1, 287,
+ 288, 289, 290, 291, 292, -1, -1, 295, -1, -1,
+ -1, 299, 300, -1, 302, 303, 304, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 314, -1, 316, -1,
+ 318, 319, -1, -1, 322, -1, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, -1, 337,
+ -1, -1, 340, 341, -1, -1, 344, 345, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
- 367, -1, -1, -1, 371, -1, -1, -1, -1, 376,
- 377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
- -1, -1, -1, -1, -1, 392, 393, -1, -1, -1,
+ -1, 359, 360, 361, 362, 363, -1, -1, -1, 367,
+ -1, -1, -1, 371, -1, -1, -1, -1, 376, 377,
+ 378, 379, 380, -1, -1, -1, 384, -1, 386, -1,
+ -1, -1, -1, -1, 392, 393, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 256, -1, -1, -1,
- 417, 418, 419, 420, 264, 265, 266, 267, -1, -1,
- 270, 271, -1, 273, 274, 275, 276, 277, 278, 279,
- -1, -1, -1, -1, -1, 285, -1, 287, 288, 289,
- 290, 291, 292, -1, -1, 295, -1, -1, -1, 299,
- 300, -1, 302, 303, 304, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 314, -1, 316, -1, 318, 319,
- -1, -1, 322, -1, 324, 325, 326, 327, 328, 329,
- 330, 331, 332, 333, 334, 335, -1, 337, -1, -1,
- 340, 341, -1, -1, 344, 345, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 359,
- 360, 361, 362, 363, -1, -1, -1, 367, -1, -1,
- -1, 371, -1, -1, -1, -1, 376, 377, 378, 379,
- 380, -1, -1, -1, 384, -1, 386, -1, -1, -1,
- -1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 256, -1, -1, -1, 417,
+ 418, 419, 420, 264, 265, 266, 267, -1, -1, 270,
+ 271, -1, 273, 274, 275, 276, 277, 278, 279, -1,
+ -1, -1, -1, -1, 285, -1, 287, 288, 289, 290,
+ 291, 292, -1, -1, 295, -1, -1, -1, 299, 300,
+ -1, 302, 303, 304, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 314, -1, 316, -1, 318, 319, -1,
+ -1, 322, -1, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, -1, 337, -1, -1, 340,
+ 341, -1, -1, 344, 345, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 359, 360,
+ 361, 362, 363, -1, -1, -1, 367, -1, -1, -1,
+ 371, -1, -1, -1, -1, 376, 377, 378, 379, 380,
+ -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
+ -1, 392, 393, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 256, -1, -1, -1, 417, 418, 419,
- 420, 264, 265, 266, 267, -1, -1, 270, 271, -1,
- 273, 274, 275, 276, 277, 278, 279, -1, -1, -1,
- -1, -1, 285, -1, 287, 288, 289, 290, 291, 292,
- -1, -1, 295, -1, -1, -1, 299, 300, -1, 302,
- 303, 304, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 314, -1, 316, -1, 318, 319, -1, -1, 322,
- -1, 324, 325, 326, 327, 328, 329, 330, 331, 332,
- 333, 334, 335, -1, 337, -1, -1, 340, 341, -1,
- -1, 344, 345, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 359, 360, 361, 362,
- 363, -1, -1, -1, 367, -1, -1, -1, 371, -1,
- -1, -1, -1, 376, 377, 378, 379, 380, -1, -1,
+ -1, -1, 256, -1, -1, -1, 417, 418, 419, 420,
+ 264, 265, 266, 267, -1, -1, 270, 271, -1, 273,
+ 274, 275, 276, 277, 278, 279, -1, -1, -1, -1,
+ -1, 285, -1, 287, 288, 289, 290, 291, 292, -1,
+ -1, 295, -1, -1, -1, 299, 300, -1, 302, 303,
+ 304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 314, -1, 316, -1, 318, 319, -1, -1, 322, -1,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, -1, 337, -1, -1, 340, 341, -1, -1,
+ 344, 345, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, 367, -1, -1, -1, 371, -1, -1,
+ -1, -1, 376, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 256,
+ -1, -1, -1, 417, 418, 419, 420, 264, 265, -1,
+ 267, -1, -1, 270, 271, -1, -1, -1, 275, 276,
+ 277, -1, 279, -1, -1, 265, -1, 267, 285, -1,
+ 270, 288, -1, -1, -1, 275, -1, -1, 295, 279,
+ -1, -1, -1, 300, -1, 302, 303, 304, 288, 306,
+ -1, -1, -1, -1, -1, 295, 313, -1, -1, 316,
+ 300, 318, 319, -1, 304, 322, -1, -1, 325, -1,
+ 327, -1, 329, 330, 331, 332, 316, 334, 318, -1,
+ -1, -1, 322, -1, 341, -1, -1, 344, 345, -1,
+ 330, 331, -1, -1, 334, -1, -1, 337, -1, -1,
+ -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
+ -1, -1, -1, -1, 371, -1, -1, 374, -1, -1,
+ 377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
+ -1, -1, 372, -1, -1, 392, 393, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 256, -1, -1, -1,
+ 417, 418, 419, 420, 264, 265, -1, 267, -1, -1,
+ 270, 271, -1, -1, -1, 275, 276, 277, 418, 279,
+ -1, -1, 265, -1, 267, 285, -1, 270, 288, -1,
+ -1, -1, 275, -1, -1, 295, 279, -1, -1, -1,
+ 300, -1, 302, 303, 304, 288, -1, -1, -1, -1,
+ -1, -1, 295, -1, -1, -1, 316, 300, 318, 319,
+ -1, 304, 322, -1, -1, 325, -1, 327, -1, 329,
+ 330, 331, 332, 316, 334, 318, -1, -1, -1, 322,
+ -1, 341, -1, -1, 344, 345, -1, 330, 331, -1,
+ -1, 334, -1, -1, 337, -1, -1, -1, -1, 359,
+ 360, 361, 362, 363, -1, -1, -1, 367, 368, -1,
+ -1, 371, -1, -1, -1, -1, -1, 377, 378, 379,
+ 380, -1, -1, -1, 384, -1, 386, 370, -1, -1,
+ -1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 256, -1, -1, -1, 417, 418, 419,
+ 420, 264, 265, -1, 267, -1, -1, 270, 271, -1,
+ -1, -1, 275, 276, 277, 418, 279, -1, -1, 265,
+ -1, 267, 285, -1, 270, 288, -1, -1, -1, 275,
+ -1, -1, 295, 279, -1, -1, -1, 300, -1, 302,
+ 303, 304, 288, 306, -1, -1, -1, -1, -1, 295,
+ 313, -1, -1, 316, 300, 318, 319, -1, 304, 322,
+ -1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
+ 316, 334, 318, -1, -1, -1, 322, -1, 341, -1,
+ -1, 344, 345, -1, 330, 331, -1, -1, 334, -1,
+ -1, 337, -1, -1, -1, -1, 359, 360, 361, 362,
+ 363, -1, -1, -1, -1, -1, -1, -1, 371, -1,
+ -1, -1, -1, -1, 377, 378, 379, 380, -1, -1,
-1, 384, -1, 386, -1, -1, -1, -1, -1, 392,
393, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
256, -1, -1, -1, 417, 418, 419, 420, 264, 265,
- 266, 267, -1, -1, 270, 271, -1, 273, 274, 275,
- 276, 277, 278, 279, -1, -1, -1, -1, -1, 285,
- -1, 287, 288, 289, 290, 291, 292, -1, -1, 295,
- -1, -1, -1, 299, 300, -1, 302, 303, 304, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 314, -1,
- 316, -1, 318, 319, -1, -1, 322, -1, 324, 325,
- 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
- -1, 337, -1, -1, 340, 341, -1, -1, 344, 345,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 267, -1, -1, 270, 271, -1, -1, -1, 275,
+ 276, 277, 418, 279, -1, -1, 265, -1, 267, 285,
+ -1, 270, 288, -1, -1, -1, 275, -1, -1, 295,
+ 279, -1, -1, -1, 300, -1, 302, 303, 304, 288,
+ -1, -1, -1, -1, -1, -1, 295, -1, -1, -1,
+ 316, 300, 318, 319, 320, 304, 322, -1, -1, 325,
+ -1, 327, -1, 329, 330, 331, 332, 316, 334, 318,
+ -1, -1, -1, 322, -1, 341, -1, -1, 344, 345,
+ -1, 330, 331, -1, -1, 334, -1, -1, 337, -1,
-1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
-1, 367, -1, -1, -1, 371, -1, -1, -1, -1,
- 376, 377, 378, 379, 380, -1, -1, -1, 384, -1,
+ -1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
386, -1, -1, -1, -1, -1, 392, 393, -1, -1,
+ -1, -1, -1, -1, 264, 265, -1, 267, -1, -1,
+ 270, 271, -1, -1, -1, 275, 276, 277, -1, 279,
+ -1, 417, 418, 419, 420, 285, -1, -1, 288, -1,
+ -1, -1, -1, -1, -1, 295, -1, -1, -1, 418,
+ 300, -1, 302, 303, 304, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 316, -1, 318, 319,
+ -1, -1, 322, -1, -1, 325, -1, 327, -1, 329,
+ 330, 331, 332, -1, 334, -1, -1, -1, -1, -1,
+ -1, 341, -1, -1, 344, 345, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 359,
+ 360, 361, 362, 363, -1, -1, -1, 367, 368, -1,
+ -1, 371, -1, -1, -1, -1, -1, 377, 378, 379,
+ 380, -1, -1, -1, 384, -1, 386, -1, -1, -1,
+ -1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
+ 264, 265, -1, 267, -1, -1, 270, 271, -1, -1,
+ -1, 275, 276, 277, -1, 279, -1, 417, 418, 419,
+ 420, 285, -1, -1, 288, -1, -1, -1, 428, -1,
+ -1, 295, -1, -1, -1, -1, 300, -1, 302, 303,
+ 304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 316, -1, 318, 319, -1, -1, 322, -1,
+ -1, 325, -1, 327, -1, 329, 330, 331, 332, -1,
+ 334, -1, -1, -1, -1, -1, -1, 341, -1, -1,
+ 344, 345, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, 367, -1, -1, -1, 371, -1, -1,
+ -1, -1, -1, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 256, -1, -1,
- -1, 417, 418, 419, 420, 264, 265, -1, 267, -1,
- -1, 270, 271, -1, -1, -1, 275, 276, 277, -1,
- 279, -1, -1, 265, -1, 267, 285, -1, 270, 288,
- -1, -1, -1, 275, -1, -1, 295, 279, -1, -1,
- -1, 300, -1, 302, 303, 304, 288, 306, -1, -1,
- -1, -1, -1, 295, 313, -1, -1, 316, 300, 318,
- 319, -1, 304, 322, -1, -1, 325, -1, 327, -1,
- 329, 330, 331, 332, 316, 334, 318, -1, -1, -1,
- 322, -1, 341, -1, -1, 344, 345, -1, 330, 331,
- -1, -1, 334, -1, -1, 337, -1, -1, -1, -1,
- 359, 360, 361, 362, 363, -1, -1, -1, -1, -1,
- -1, -1, 371, -1, -1, 374, -1, -1, 377, 378,
- 379, 380, -1, -1, -1, 384, -1, 386, -1, -1,
- 372, -1, -1, 392, 393, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 256, -1, -1, -1, 417, 418,
- 419, 420, 264, 265, -1, 267, -1, -1, 270, 271,
- -1, -1, -1, 275, 276, 277, 418, 279, -1, -1,
- 265, -1, 267, 285, -1, 270, 288, -1, -1, -1,
- 275, -1, -1, 295, 279, -1, -1, -1, 300, -1,
- 302, 303, 304, 288, -1, -1, -1, -1, -1, -1,
- 295, -1, -1, -1, 316, 300, 318, 319, -1, 304,
- 322, -1, -1, 325, -1, 327, -1, 329, 330, 331,
- 332, 316, 334, 318, -1, -1, -1, 322, -1, 341,
- -1, -1, 344, 345, -1, 330, 331, -1, -1, 334,
- -1, -1, 337, -1, -1, -1, -1, 359, 360, 361,
- 362, 363, -1, -1, -1, 367, 368, -1, -1, 371,
- -1, -1, -1, -1, -1, 377, 378, 379, 380, -1,
- -1, -1, 384, -1, 386, 370, -1, -1, -1, -1,
- 392, 393, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 256, -1, -1, -1, 417, 418, 419, 420, 264,
- 265, -1, 267, -1, -1, 270, 271, -1, -1, -1,
- 275, 276, 277, 418, 279, -1, -1, 265, -1, 267,
+ -1, 256, -1, 417, 418, 419, 420, -1, -1, 264,
+ 265, -1, 267, -1, 428, 270, 271, -1, -1, -1,
+ 275, 276, 277, -1, 279, -1, -1, 265, -1, 267,
285, -1, 270, 288, -1, -1, -1, 275, -1, -1,
295, 279, -1, -1, -1, 300, -1, 302, 303, 304,
- 288, 306, -1, -1, -1, -1, -1, 295, 313, -1,
+ 288, -1, -1, -1, -1, -1, -1, 295, -1, -1,
-1, 316, 300, 318, 319, -1, 304, 322, -1, -1,
325, -1, 327, -1, 329, 330, 331, 332, 316, 334,
318, -1, -1, -1, 322, -1, 341, -1, -1, 344,
345, -1, 330, 331, -1, -1, 334, -1, -1, 337,
-1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
- -1, -1, -1, -1, -1, -1, 371, -1, -1, -1,
+ -1, -1, 367, -1, -1, -1, 371, -1, -1, -1,
-1, -1, 377, 378, 379, 380, -1, -1, -1, 384,
-1, 386, -1, -1, -1, -1, -1, 392, 393, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -13389,46 +13476,50 @@ void case_1034()
288, -1, -1, -1, 275, -1, -1, 295, 279, -1,
-1, -1, 300, -1, 302, 303, 304, 288, -1, -1,
-1, -1, -1, -1, 295, -1, -1, -1, 316, 300,
- 318, 319, 320, 304, 322, -1, -1, 325, -1, 327,
+ 318, 319, -1, 304, 322, -1, -1, 325, -1, 327,
-1, 329, 330, 331, 332, 316, 334, 318, -1, -1,
-1, 322, -1, 341, -1, -1, 344, 345, -1, 330,
331, -1, -1, 334, -1, -1, 337, -1, -1, -1,
- -1, 359, 360, 361, 362, 363, -1, -1, -1, 367,
- -1, -1, -1, 371, -1, -1, -1, -1, -1, 377,
+ -1, 359, 360, 361, 362, 363, -1, -1, -1, -1,
+ 368, -1, -1, 371, -1, -1, -1, -1, -1, 377,
378, 379, 380, -1, -1, -1, 384, -1, 386, -1,
-1, -1, -1, -1, 392, 393, -1, -1, -1, -1,
- -1, -1, 264, 265, -1, 267, -1, -1, 270, 271,
- -1, -1, -1, 275, 276, 277, -1, 279, -1, 417,
- 418, 419, 420, 285, -1, -1, 288, -1, -1, -1,
- -1, -1, -1, 295, -1, -1, -1, 418, 300, -1,
- 302, 303, 304, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 316, -1, 318, 319, -1, -1,
- 322, -1, -1, 325, -1, 327, -1, 329, 330, 331,
- 332, -1, 334, -1, -1, -1, -1, -1, -1, 341,
- -1, -1, 344, 345, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 359, 360, 361,
- 362, 363, -1, -1, -1, 367, 368, -1, -1, 371,
- -1, -1, -1, -1, -1, 377, 378, 379, 380, -1,
- -1, -1, 384, -1, 386, -1, -1, -1, -1, -1,
- 392, 393, -1, -1, -1, -1, -1, -1, 264, 265,
- -1, 267, -1, -1, 270, 271, -1, -1, -1, 275,
- 276, 277, -1, 279, -1, 417, 418, 419, 420, 285,
- -1, -1, 288, -1, -1, -1, 428, -1, -1, 295,
- -1, -1, -1, -1, 300, -1, 302, 303, 304, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 316, -1, 318, 319, -1, -1, 322, -1, -1, 325,
- -1, 327, -1, 329, 330, 331, 332, -1, 334, -1,
- -1, -1, -1, -1, -1, 341, -1, -1, 344, 345,
+ -1, -1, -1, -1, -1, 256, -1, -1, -1, 417,
+ 418, 419, 420, 264, 265, -1, 267, -1, -1, 270,
+ 271, -1, -1, -1, 275, 276, 277, 418, 279, -1,
+ -1, 265, -1, 267, 285, -1, 270, 288, -1, -1,
+ -1, 275, -1, -1, 295, 279, -1, -1, -1, 300,
+ -1, 302, 303, 304, 288, -1, -1, -1, -1, -1,
+ -1, 295, -1, -1, -1, 316, 300, 318, 319, -1,
+ 304, 322, -1, -1, 325, -1, 327, -1, 329, 330,
+ 331, 332, 316, 334, 318, -1, -1, -1, 322, -1,
+ 341, -1, -1, 344, 345, -1, 330, 331, -1, -1,
+ 334, -1, -1, 337, -1, -1, -1, -1, 359, 360,
+ 361, 362, 363, -1, -1, -1, -1, 368, -1, -1,
+ 371, -1, -1, -1, -1, -1, 377, 378, 379, 380,
+ -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
+ -1, 392, 393, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
- -1, 367, -1, -1, -1, 371, -1, -1, -1, -1,
- -1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
- 386, -1, -1, -1, -1, -1, 392, 393, -1, -1,
+ -1, -1, 256, -1, -1, -1, 417, 418, 419, 420,
+ 264, 265, -1, 267, -1, -1, 270, 271, -1, -1,
+ -1, 275, 276, 277, 418, 279, -1, -1, 265, -1,
+ 267, 285, -1, 270, 288, -1, -1, -1, 275, -1,
+ -1, 295, 279, -1, -1, -1, 300, -1, 302, 303,
+ 304, 288, -1, -1, -1, -1, -1, -1, 295, -1,
+ -1, -1, 316, 300, 318, 319, -1, 304, 322, -1,
+ -1, 325, -1, 327, -1, 329, 330, 331, 332, 316,
+ 334, 318, -1, -1, -1, 322, -1, 341, -1, -1,
+ 344, 345, -1, 330, 331, -1, -1, 334, -1, -1,
+ 337, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, -1, -1, -1, -1, 371, -1, -1,
+ -1, -1, -1, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 256,
- -1, 417, 418, 419, 420, -1, -1, 264, 265, -1,
- 267, -1, 428, 270, 271, -1, -1, -1, 275, 276,
- 277, -1, 279, -1, -1, 265, -1, 267, 285, -1,
+ -1, -1, -1, 417, 418, 419, 420, 264, 265, -1,
+ 267, -1, -1, 270, 271, -1, -1, -1, 275, 276,
+ 277, 418, 279, -1, -1, 265, -1, 267, 285, -1,
270, 288, -1, -1, -1, 275, -1, -1, 295, 279,
-1, -1, -1, 300, -1, 302, 303, 304, 288, -1,
-1, -1, -1, -1, -1, 295, -1, -1, -1, 316,
@@ -13437,7 +13528,7 @@ void case_1034()
-1, -1, 322, -1, 341, -1, -1, 344, 345, -1,
330, 331, -1, -1, 334, -1, -1, 337, -1, -1,
-1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
- 367, -1, -1, -1, 371, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 371, -1, -1, -1, -1, -1,
377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
-1, -1, -1, -1, -1, 392, 393, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -13452,37 +13543,37 @@ void case_1034()
330, 331, 332, 316, 334, 318, -1, -1, -1, 322,
-1, 341, -1, -1, 344, 345, -1, 330, 331, -1,
-1, 334, -1, -1, 337, -1, -1, -1, -1, 359,
- 360, 361, 362, 363, -1, -1, -1, -1, 368, -1,
+ 360, 361, 362, 363, -1, -1, -1, -1, -1, -1,
-1, 371, -1, -1, -1, -1, -1, 377, 378, 379,
380, -1, -1, -1, 384, -1, 386, -1, -1, -1,
-1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 256, -1, -1, -1, 417, 418, 419,
420, 264, 265, -1, 267, -1, -1, 270, 271, -1,
- -1, -1, 275, 276, 277, 418, 279, -1, -1, 265,
- -1, 267, 285, -1, 270, 288, -1, -1, -1, 275,
- -1, -1, 295, 279, -1, -1, -1, 300, -1, 302,
- 303, 304, 288, -1, -1, -1, -1, -1, -1, 295,
- -1, -1, -1, 316, 300, 318, 319, -1, 304, 322,
+ -1, -1, 275, 276, 277, 418, 279, -1, -1, -1,
+ -1, -1, 285, -1, -1, 288, -1, -1, -1, -1,
+ -1, -1, 295, -1, -1, -1, -1, 300, -1, 302,
+ 303, 304, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 316, -1, 318, 319, -1, -1, 322,
-1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
- 316, 334, 318, -1, -1, -1, 322, -1, 341, -1,
- -1, 344, 345, -1, 330, 331, -1, -1, 334, -1,
- -1, 337, -1, -1, -1, -1, 359, 360, 361, 362,
- 363, -1, -1, -1, -1, 368, -1, -1, 371, -1,
+ -1, 334, -1, -1, -1, -1, -1, -1, 341, -1,
+ -1, 344, 345, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 359, 360, 361, 362,
+ 363, -1, -1, -1, -1, -1, -1, -1, 371, -1,
-1, -1, -1, -1, 377, 378, 379, 380, -1, -1,
-1, 384, -1, 386, -1, -1, -1, -1, -1, 392,
393, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
256, -1, -1, -1, 417, 418, 419, 420, 264, 265,
-1, 267, -1, -1, 270, 271, -1, -1, -1, 275,
- 276, 277, 418, 279, -1, -1, 265, -1, 267, 285,
- -1, 270, 288, -1, -1, -1, 275, -1, -1, 295,
- 279, -1, -1, -1, 300, -1, 302, 303, 304, 288,
- -1, -1, -1, -1, -1, -1, 295, -1, -1, -1,
- 316, 300, 318, 319, -1, 304, 322, -1, -1, 325,
- -1, 327, -1, 329, 330, 331, 332, 316, 334, 318,
- -1, -1, -1, 322, -1, 341, -1, -1, 344, 345,
- -1, 330, 331, -1, -1, 334, -1, -1, 337, -1,
+ 276, 277, -1, 279, -1, -1, -1, -1, -1, 285,
+ -1, -1, 288, -1, -1, -1, -1, -1, -1, 295,
+ -1, -1, -1, -1, 300, -1, 302, 303, 304, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 316, -1, 318, 319, -1, -1, 322, -1, -1, 325,
+ -1, 327, -1, 329, 330, 331, 332, -1, 334, -1,
+ -1, -1, -1, -1, -1, 341, -1, -1, 344, 345,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
-1, -1, -1, -1, -1, 371, -1, -1, -1, -1,
-1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
@@ -13490,15 +13581,15 @@ void case_1034()
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 256, -1, -1,
-1, 417, 418, 419, 420, 264, 265, -1, 267, -1,
- -1, 270, 271, -1, -1, -1, 275, 276, 277, 418,
- 279, -1, -1, 265, -1, 267, 285, -1, 270, 288,
- -1, -1, -1, 275, -1, -1, 295, 279, -1, -1,
- -1, 300, -1, 302, 303, 304, 288, -1, -1, -1,
- -1, -1, -1, 295, -1, -1, -1, 316, 300, 318,
- 319, -1, 304, 322, -1, -1, 325, -1, 327, -1,
- 329, 330, 331, 332, 316, 334, 318, -1, -1, -1,
- 322, -1, 341, -1, -1, 344, 345, -1, 330, 331,
- -1, -1, 334, -1, -1, 337, -1, -1, -1, -1,
+ -1, 270, 271, -1, -1, -1, 275, 276, 277, -1,
+ 279, -1, -1, -1, -1, -1, 285, -1, -1, 288,
+ -1, -1, -1, -1, -1, -1, 295, -1, -1, -1,
+ -1, 300, -1, 302, 303, 304, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 316, -1, 318,
+ 319, -1, -1, 322, -1, -1, 325, -1, 327, -1,
+ 329, 330, 331, 332, -1, 334, -1, -1, -1, -1,
+ -1, -1, 341, -1, -1, 344, 345, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
359, 360, 361, 362, 363, -1, -1, -1, -1, -1,
-1, -1, 371, -1, -1, -1, -1, -1, 377, 378,
379, 380, -1, -1, -1, 384, -1, 386, -1, -1,
@@ -13506,15 +13597,15 @@ void case_1034()
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 256, -1, -1, -1, 417, 418,
419, 420, 264, 265, -1, 267, -1, -1, 270, 271,
- -1, -1, -1, 275, 276, 277, 418, 279, -1, -1,
- 265, -1, 267, 285, -1, 270, 288, -1, -1, -1,
- 275, -1, -1, 295, 279, -1, -1, -1, 300, -1,
- 302, 303, 304, 288, -1, -1, -1, -1, -1, -1,
- 295, -1, -1, -1, 316, 300, 318, 319, -1, 304,
+ -1, -1, -1, 275, 276, 277, -1, 279, -1, -1,
+ -1, -1, -1, 285, -1, -1, 288, -1, -1, -1,
+ -1, -1, -1, 295, -1, -1, -1, -1, 300, -1,
+ 302, 303, 304, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 316, -1, 318, 319, -1, -1,
322, -1, -1, 325, -1, 327, -1, 329, 330, 331,
- 332, 316, 334, 318, -1, -1, -1, 322, -1, 341,
- -1, -1, 344, 345, -1, 330, 331, -1, -1, 334,
- -1, -1, 337, -1, -1, -1, -1, 359, 360, 361,
+ 332, -1, 334, -1, -1, -1, -1, -1, -1, 341,
+ -1, -1, 344, 345, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 359, 360, 361,
362, 363, -1, -1, -1, -1, -1, -1, -1, 371,
-1, -1, -1, -1, -1, 377, 378, 379, 380, -1,
-1, -1, 384, -1, 386, -1, -1, -1, -1, -1,
@@ -13522,55 +13613,21 @@ void case_1034()
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 256, -1, -1, -1, 417, 418, 419, 420, 264,
265, -1, 267, -1, -1, 270, 271, -1, -1, -1,
- 275, 276, 277, 418, 279, -1, -1, -1, -1, -1,
+ 275, 276, 277, -1, 279, -1, -1, -1, -1, -1,
285, -1, -1, 288, -1, -1, -1, -1, -1, -1,
295, -1, -1, -1, -1, 300, -1, 302, 303, 304,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 316, -1, 318, 319, -1, -1, 322, -1, -1,
325, -1, 327, -1, 329, 330, 331, 332, -1, 334,
- -1, -1, -1, -1, -1, -1, 341, -1, -1, 344,
- 345, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 343, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
-1, -1, -1, -1, -1, -1, 371, -1, -1, -1,
- -1, -1, 377, 378, 379, 380, -1, -1, -1, 384,
- -1, 386, -1, -1, -1, -1, -1, 392, 393, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 256, -1,
- -1, -1, 417, 418, 419, 420, 264, 265, -1, 267,
- -1, -1, 270, 271, -1, -1, -1, 275, 276, 277,
- -1, 279, -1, -1, -1, -1, -1, 285, -1, -1,
- 288, -1, -1, -1, -1, -1, -1, 295, -1, -1,
- -1, -1, 300, -1, 302, 303, 304, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 316, -1,
- 318, 319, -1, -1, 322, -1, -1, 325, -1, 327,
- -1, 329, 330, 331, 332, -1, 334, -1, -1, -1,
- -1, -1, -1, 341, -1, -1, 344, 345, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 359, 360, 361, 362, 363, -1, -1, -1, -1,
- -1, -1, -1, 371, -1, -1, -1, -1, -1, 377,
- 378, 379, 380, -1, -1, -1, 384, -1, 386, -1,
- -1, -1, -1, -1, 392, 393, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 256, -1, -1, -1, 417,
- 418, 419, 420, 264, 265, -1, 267, -1, -1, 270,
- 271, -1, -1, -1, 275, 276, 277, -1, 279, -1,
- -1, -1, -1, -1, 285, -1, -1, 288, -1, -1,
- -1, -1, -1, -1, 295, -1, -1, -1, -1, 300,
- -1, 302, 303, 304, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 316, -1, 318, 319, -1,
- -1, 322, -1, -1, 325, -1, 327, -1, 329, 330,
- 331, 332, -1, 334, -1, -1, -1, -1, -1, -1,
- 341, -1, -1, 344, 345, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 359, 360,
- 361, 362, 363, -1, -1, -1, -1, -1, -1, -1,
- 371, -1, -1, -1, -1, -1, 377, 378, 379, 380,
- -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
- -1, 392, 393, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 256, -1, -1, -1, 417, 418, 419, 420,
+ -1, -1, 377, 378, 379, 380, 381, -1, -1, 384,
+ -1, 386, 256, -1, -1, -1, -1, 392, 393, -1,
264, 265, -1, 267, -1, -1, 270, 271, -1, -1,
-1, 275, 276, 277, -1, 279, -1, -1, -1, -1,
- -1, 285, -1, -1, 288, -1, -1, -1, -1, -1,
+ -1, 285, 417, 418, 288, 420, -1, -1, -1, -1,
-1, 295, -1, -1, -1, -1, 300, -1, 302, 303,
304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 316, -1, 318, 319, -1, -1, 322, -1,
@@ -13579,7 +13636,7 @@ void case_1034()
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
-1, -1, -1, -1, -1, -1, -1, 371, -1, -1,
- -1, -1, -1, 377, 378, 379, 380, 381, -1, -1,
+ -1, -1, -1, 377, 378, 379, 380, -1, -1, -1,
384, -1, 386, 256, -1, -1, -1, -1, 392, 393,
-1, 264, 265, -1, 267, -1, -1, 270, 271, -1,
-1, -1, 275, 276, 277, -1, 279, -1, -1, -1,
@@ -13589,7 +13646,7 @@ void case_1034()
-1, -1, -1, 316, -1, 318, 319, -1, -1, 322,
-1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
-1, 334, -1, -1, -1, -1, -1, -1, -1, -1,
- 343, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 359, 360, 361, 362,
363, -1, -1, -1, -1, -1, -1, -1, 371, -1,
-1, -1, -1, -1, 377, 378, 379, 380, -1, -1,
@@ -13947,63 +14004,40 @@ void case_1034()
-1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
-1, -1, -1, -1, -1, 371, -1, -1, -1, -1,
-1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
- 386, 256, -1, -1, -1, -1, 392, 393, -1, 264,
+ 386, 256, -1, -1, -1, -1, 392, 393, 262, 264,
265, -1, 267, -1, -1, 270, 271, -1, -1, -1,
275, 276, 277, -1, 279, -1, -1, -1, -1, -1,
285, 417, 418, 288, 420, -1, -1, -1, -1, -1,
- 295, -1, -1, -1, -1, 300, -1, 302, 303, 304,
+ 295, -1, -1, -1, 298, 300, -1, 302, 303, 304,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 316, -1, 318, 319, -1, -1, 322, -1, -1,
325, -1, 327, -1, 329, 330, 331, 332, -1, 334,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
- -1, -1, -1, -1, -1, -1, 371, -1, -1, -1,
- -1, -1, 377, 378, 379, 380, -1, -1, -1, 384,
- -1, 386, 256, -1, -1, -1, -1, 392, 393, 262,
- 264, 265, -1, 267, -1, -1, 270, 271, -1, -1,
- -1, 275, 276, 277, -1, 279, -1, -1, -1, -1,
- -1, 285, 417, 418, 288, 420, -1, -1, -1, -1,
- -1, 295, -1, -1, -1, 298, 300, -1, 302, 303,
- 304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 316, -1, 318, 319, -1, -1, 322, -1,
- -1, 325, -1, 327, -1, 329, 330, 331, 332, -1,
- 334, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
- -1, -1, -1, -1, -1, -1, -1, 371, 371, 372,
- 373, 374, 375, -1, -1, 378, 379, -1, -1, 382,
- 383, 384, 385, 386, 387, 388, 389, 390, -1, 392,
- 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
- 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
- 413, -1, -1, 417, 418, -1, -1, 420, -1, 261,
- 423, 263, -1, 265, -1, 267, -1, -1, 270, -1,
- 272, 273, -1, 275, -1, 277, -1, 279, -1, 281,
- 282, 283, 284, -1, -1, 287, 288, -1, -1, -1,
- -1, 293, 294, 295, 296, 297, -1, -1, 300, -1,
- 302, -1, 304, -1, 306, 307, -1, 309, 310, 311,
- 312, -1, -1, 315, 316, 317, 318, -1, -1, 321,
- 322, 323, -1, -1, -1, -1, -1, -1, 330, 331,
- -1, 333, 334, -1, 336, 337, 338, -1, -1, -1,
- 342, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 362, -1, 364, 365, 261, -1, -1, -1, 265, -1,
- 267, -1, -1, 270, -1, 272, 273, -1, 275, -1,
- 277, -1, 279, -1, 281, 282, 283, 284, -1, -1,
- 287, 288, -1, -1, -1, -1, 293, -1, 295, 296,
- 297, -1, -1, 300, -1, 302, -1, 304, -1, -1,
- 307, -1, 309, 310, 311, 312, 418, -1, -1, 316,
- 317, 318, -1, -1, 321, 322, 323, -1, -1, -1,
- -1, -1, -1, 330, 331, -1, 333, 334, -1, 336,
- 337, 338, -1, -1, -1, 342, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 371, 371, 372, 373,
+ 374, 375, -1, -1, 378, 379, -1, -1, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, -1, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, -1, 417, 418, -1, -1, 420, -1, 261, 423,
+ 263, -1, 265, -1, 267, -1, -1, 270, -1, 272,
+ 273, -1, 275, -1, 277, -1, 279, -1, 281, 282,
+ 283, 284, -1, -1, 287, 288, -1, -1, -1, -1,
+ 293, 294, 295, 296, 297, -1, -1, 300, -1, 302,
+ -1, 304, -1, 306, 307, -1, 309, 310, 311, 312,
+ -1, -1, 315, 316, 317, 318, -1, -1, 321, 322,
+ 323, -1, -1, -1, -1, -1, -1, 330, 331, -1,
+ 333, 334, -1, 336, 337, 338, -1, -1, -1, 342,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 261, -1, 362, -1, 265, -1, 267,
- -1, 368, 270, -1, 272, 273, -1, 275, -1, 277,
- 377, 279, -1, 281, 282, 283, 284, -1, -1, 287,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 362,
+ -1, 364, 365, 261, -1, -1, -1, 265, -1, 267,
+ -1, -1, 270, -1, 272, 273, -1, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, -1, -1, 287,
288, -1, -1, -1, -1, 293, -1, 295, 296, 297,
-1, -1, 300, -1, 302, -1, 304, -1, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, -1, 316, 317,
- 318, 418, -1, 321, 322, 323, -1, -1, -1, -1,
+ -1, 309, 310, 311, 312, 418, -1, -1, 316, 317,
+ 318, -1, -1, 321, 322, 323, -1, -1, -1, -1,
-1, -1, 330, 331, -1, 333, 334, -1, 336, 337,
338, -1, -1, -1, 342, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -14015,334 +14049,327 @@ void case_1034()
309, 310, 311, 312, -1, -1, -1, 316, 317, 318,
418, -1, 321, 322, 323, -1, -1, -1, -1, -1,
-1, 330, 331, -1, 333, 334, -1, 336, 337, 338,
- -1, -1, -1, 342, -1, -1, -1, -1, 261, -1,
- -1, -1, 265, -1, 267, -1, -1, 270, -1, 272,
- 273, -1, 275, 362, 277, -1, 279, -1, 281, 282,
- 283, 284, -1, -1, 287, 288, -1, -1, 377, -1,
- 293, -1, 295, 296, 297, -1, -1, 300, -1, 302,
- -1, 304, -1, -1, 307, -1, 309, 310, 311, 312,
- -1, -1, -1, 316, 317, 318, -1, -1, 321, 322,
- 323, -1, -1, -1, -1, -1, -1, 330, 331, 418,
- 333, 334, -1, 336, 337, 338, -1, -1, -1, 342,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 261, -1, -1, -1, 265, -1, 267, 362,
- -1, 270, -1, 272, 273, 368, 275, -1, 277, -1,
- 279, -1, 281, 282, 283, 284, -1, -1, 287, 288,
- -1, -1, -1, -1, 293, -1, 295, 296, 297, -1,
- -1, 300, -1, 302, 261, 304, -1, -1, 307, -1,
- 309, 310, 311, 312, -1, -1, -1, 316, 317, 318,
- -1, -1, 321, 322, 323, 418, -1, 284, -1, -1,
- -1, 330, 331, -1, 333, 334, -1, 336, 337, 338,
- 297, -1, -1, 342, -1, 302, -1, -1, 305, -1,
- 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
- 317, -1, -1, 362, 321, -1, -1, -1, 325, 368,
- -1, -1, -1, -1, 261, -1, 333, -1, -1, 336,
- -1, 338, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 284, -1, -1,
- 357, -1, -1, -1, -1, 362, -1, -1, -1, -1,
- 297, 368, 369, -1, 371, 302, 373, -1, 305, 418,
- 307, -1, 309, 310, 311, 312, -1, -1, -1, 386,
- 317, -1, -1, -1, 321, -1, 261, -1, 325, -1,
- -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
- -1, 338, -1, -1, -1, -1, -1, -1, -1, 284,
- -1, 418, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 297, -1, 261, 362, -1, 302, -1, -1,
- 305, 368, 307, -1, 309, 310, 311, 312, -1, -1,
- -1, -1, 317, -1, -1, -1, 321, 284, -1, -1,
- 325, -1, -1, -1, -1, -1, -1, -1, 333, -1,
- 297, 336, 261, 338, -1, 302, -1, -1, -1, -1,
- 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
- 317, 418, -1, -1, 321, 284, -1, 362, 325, -1,
- -1, -1, -1, 368, -1, -1, 333, -1, 297, 336,
- 261, 338, -1, 302, -1, -1, -1, -1, 307, -1,
- 309, 310, 311, 312, -1, -1, -1, -1, 317, -1,
- -1, -1, 321, 284, -1, 362, 325, -1, -1, -1,
- -1, 368, -1, -1, 333, -1, 297, 336, -1, 338,
- -1, 302, -1, 418, -1, -1, 307, -1, 309, 310,
- 311, 312, -1, -1, -1, -1, 317, -1, -1, -1,
- 321, -1, -1, 362, -1, -1, -1, -1, -1, -1,
- -1, -1, 333, 264, 265, 336, 267, 338, -1, 270,
- 271, 418, -1, -1, 275, 276, 277, -1, 279, -1,
- -1, -1, -1, -1, 285, -1, -1, 288, -1, -1,
- -1, 362, -1, -1, 295, -1, -1, -1, -1, 300,
- -1, 302, 303, 304, -1, 306, -1, -1, -1, 418,
- -1, -1, 313, -1, -1, 316, -1, 318, 319, -1,
- -1, 322, -1, -1, 325, -1, 327, -1, 329, 330,
- 331, 332, -1, 334, -1, -1, -1, -1, -1, -1,
- 341, -1, -1, 344, 345, -1, -1, 418, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 359, 360,
- 361, 362, 363, -1, -1, -1, -1, -1, -1, -1,
- 371, 372, -1, 374, -1, -1, 377, 378, 379, 380,
- -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
- -1, 392, 393, -1, -1, -1, -1, -1, -1, 264,
- 265, -1, 267, -1, -1, 270, 271, -1, -1, -1,
- 275, 276, 277, -1, 279, -1, 417, 418, 419, 420,
- 285, -1, -1, 288, -1, -1, -1, -1, -1, -1,
- 295, -1, -1, -1, -1, 300, -1, 302, 303, 304,
- -1, 306, -1, -1, -1, -1, -1, -1, 313, -1,
- -1, 316, -1, 318, 319, -1, -1, 322, -1, -1,
- 325, -1, 327, -1, 329, 330, 331, 332, -1, 334,
- -1, -1, -1, -1, -1, -1, 341, -1, -1, 344,
- 345, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
- -1, -1, -1, -1, -1, -1, 371, -1, -1, 374,
- -1, -1, 377, 378, 379, 380, -1, -1, -1, 384,
- -1, 386, -1, -1, -1, -1, -1, 392, 393, -1,
- -1, -1, -1, -1, -1, 264, 265, -1, 267, -1,
- -1, 270, 271, -1, -1, -1, 275, 276, 277, -1,
- 279, -1, 417, 418, 419, 420, 285, -1, -1, 288,
- -1, -1, -1, -1, -1, -1, 295, -1, -1, -1,
- -1, 300, -1, 302, 303, 304, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 316, -1, 318,
- 319, -1, -1, 322, -1, -1, 325, -1, 327, -1,
- 329, 330, 331, 332, -1, 334, -1, -1, 337, -1,
- -1, -1, 341, -1, -1, 344, 345, -1, -1, -1,
+ -1, -1, -1, 342, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 359, 360, 361, 362, 363, -1, -1, -1, -1, -1,
- -1, -1, 371, -1, -1, -1, -1, -1, 377, 378,
- 379, 380, -1, -1, -1, 384, -1, 386, -1, -1,
- -1, -1, -1, 392, 393, -1, -1, -1, -1, -1,
- -1, 264, 265, -1, 267, -1, -1, 270, 271, -1,
- -1, -1, 275, 276, 277, -1, 279, -1, 417, 418,
- 419, 420, 285, -1, -1, 288, -1, -1, -1, -1,
- -1, -1, 295, -1, -1, -1, -1, 300, -1, 302,
- 303, 304, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 316, -1, 318, 319, -1, -1, 322,
- -1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
- -1, 334, -1, -1, -1, -1, -1, -1, 341, -1,
- -1, 344, 345, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 359, 360, 361, 362,
- 363, -1, -1, -1, 367, -1, -1, -1, 371, -1,
- -1, -1, -1, -1, 377, 378, 379, 380, -1, -1,
- -1, 384, -1, 386, -1, -1, -1, -1, -1, 392,
- 393, -1, -1, -1, -1, -1, -1, 264, 265, -1,
- 267, -1, -1, 270, 271, -1, -1, -1, 275, 276,
- 277, -1, 279, -1, 417, 418, 419, 420, 285, -1,
- -1, 288, -1, -1, -1, -1, -1, -1, 295, -1,
- -1, -1, -1, 300, -1, 302, 303, 304, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 316,
- -1, 318, 319, -1, -1, 322, -1, -1, 325, -1,
- 327, -1, 329, 330, 331, 332, -1, 334, -1, -1,
- -1, -1, -1, -1, 341, -1, -1, 344, 345, -1,
+ -1, 261, -1, 362, -1, 265, -1, 267, -1, 368,
+ 270, -1, 272, 273, -1, 275, -1, 277, 377, 279,
+ -1, 281, 282, 283, 284, -1, -1, 287, 288, -1,
+ -1, -1, -1, 293, -1, 295, 296, 297, -1, -1,
+ 300, -1, 302, -1, 304, -1, -1, 307, -1, 309,
+ 310, 311, 312, -1, -1, -1, 316, 317, 318, 418,
+ -1, 321, 322, 323, -1, -1, -1, -1, -1, -1,
+ 330, 331, -1, 333, 334, -1, 336, 337, 338, -1,
+ -1, -1, 342, -1, -1, -1, -1, 261, -1, -1,
+ -1, 265, -1, 267, -1, -1, 270, -1, 272, 273,
+ -1, 275, 362, 277, -1, 279, -1, 281, 282, 283,
+ 284, -1, -1, 287, 288, -1, -1, 377, -1, 293,
+ -1, 295, 296, 297, -1, -1, 300, -1, 302, -1,
+ 304, -1, -1, 307, -1, 309, 310, 311, 312, -1,
+ -1, -1, 316, 317, 318, -1, -1, 321, 322, 323,
+ -1, -1, -1, -1, -1, -1, 330, 331, 418, 333,
+ 334, -1, 336, 337, 338, -1, -1, -1, 342, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
- 367, -1, -1, -1, 371, -1, -1, -1, -1, -1,
- 377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
- -1, -1, -1, -1, -1, 392, 393, -1, -1, -1,
- -1, -1, -1, 264, 265, -1, 267, -1, -1, 270,
- 271, -1, -1, -1, 275, 276, 277, -1, 279, -1,
- 417, 418, 419, 420, 285, -1, -1, 288, -1, -1,
- -1, -1, -1, -1, 295, -1, -1, -1, -1, 300,
- -1, 302, 303, 304, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 316, -1, 318, 319, -1,
- -1, 322, -1, -1, 325, -1, 327, -1, 329, 330,
- 331, 332, -1, 334, -1, -1, -1, -1, -1, -1,
- 341, -1, -1, 344, 345, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 359, 360,
- 361, 362, 363, -1, -1, -1, -1, -1, -1, -1,
- 371, -1, -1, -1, -1, -1, 377, 378, 379, 380,
- -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
- -1, 392, 393, -1, -1, -1, -1, -1, -1, 264,
- 265, -1, 267, -1, -1, 270, 271, -1, -1, -1,
- 275, 276, 277, -1, 279, -1, 417, 418, 419, 420,
- 285, -1, -1, 288, -1, -1, -1, -1, -1, -1,
- 295, -1, -1, -1, -1, 300, -1, 302, 303, 304,
+ -1, 261, -1, -1, -1, 265, -1, 267, 362, -1,
+ 270, -1, 272, 273, 368, 275, -1, 277, -1, 279,
+ -1, 281, 282, 283, 284, -1, -1, 287, 288, -1,
+ -1, -1, -1, 293, -1, 295, 296, 297, -1, -1,
+ 300, -1, 302, 261, 304, -1, -1, 307, -1, 309,
+ 310, 311, 312, -1, -1, -1, 316, 317, 318, -1,
+ -1, 321, 322, 323, 418, -1, 284, -1, -1, -1,
+ 330, 331, -1, 333, 334, -1, 336, 337, 338, 297,
+ -1, -1, 342, -1, 302, -1, -1, 305, -1, 307,
+ -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
+ -1, -1, 362, 321, -1, -1, -1, 325, 368, -1,
+ -1, -1, -1, 261, -1, 333, -1, -1, 336, -1,
+ 338, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 284, -1, -1, 357,
+ -1, -1, -1, -1, 362, -1, -1, -1, -1, 297,
+ 368, 369, -1, 371, 302, 373, -1, 305, 418, 307,
+ -1, 309, 310, 311, 312, -1, -1, -1, 386, 317,
+ -1, -1, -1, 321, -1, 261, -1, 325, -1, -1,
+ -1, -1, -1, -1, -1, 333, -1, -1, 336, -1,
+ 338, -1, -1, -1, -1, -1, -1, -1, 284, -1,
+ 418, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 297, -1, 261, 362, -1, 302, -1, -1, -1,
+ 368, 307, -1, 309, 310, 311, 312, -1, -1, -1,
+ -1, 317, -1, -1, -1, 321, 284, -1, -1, 325,
+ -1, -1, -1, 261, -1, -1, -1, 333, -1, 297,
+ 336, -1, 338, -1, 302, -1, -1, -1, -1, 307,
+ -1, 309, 310, 311, 312, -1, 284, -1, -1, 317,
+ 418, -1, -1, 321, -1, -1, 362, 325, -1, 297,
+ -1, -1, 368, -1, 302, 333, -1, -1, 336, 307,
+ 338, 309, 310, 311, 312, -1, -1, -1, -1, 317,
+ -1, -1, -1, 321, -1, -1, -1, -1, -1, -1,
+ 264, 265, -1, 267, 362, 333, 270, 271, 336, -1,
+ 338, 275, 276, 277, -1, 279, -1, -1, -1, -1,
+ -1, 285, 418, -1, 288, -1, -1, -1, -1, -1,
+ -1, 295, -1, -1, 362, -1, 300, -1, 302, 303,
+ 304, -1, 306, -1, -1, -1, -1, -1, -1, 313,
+ -1, -1, 316, -1, 318, 319, -1, -1, 322, -1,
+ 418, 325, -1, 327, -1, 329, 330, 331, 332, -1,
+ 334, -1, -1, -1, -1, -1, -1, 341, -1, -1,
+ 344, 345, -1, -1, -1, -1, -1, -1, -1, -1,
+ 418, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, -1, -1, -1, -1, 371, 372, -1,
+ 374, -1, -1, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
+ -1, -1, -1, -1, -1, -1, 264, 265, -1, 267,
+ -1, -1, 270, 271, -1, -1, -1, 275, 276, 277,
+ -1, 279, -1, 417, 418, 419, 420, 285, -1, -1,
+ 288, -1, -1, -1, -1, -1, -1, 295, -1, -1,
+ -1, -1, 300, -1, 302, 303, 304, -1, 306, -1,
+ -1, -1, -1, -1, -1, 313, -1, -1, 316, -1,
+ 318, 319, -1, -1, 322, -1, -1, 325, -1, 327,
+ -1, 329, 330, 331, 332, -1, 334, -1, -1, -1,
+ -1, -1, -1, 341, -1, -1, 344, 345, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 316, -1, 318, 319, -1, -1, 322, -1, -1,
- 325, -1, 327, -1, 329, 330, 331, 332, -1, 334,
- -1, -1, -1, -1, -1, -1, 341, -1, -1, 344,
- 345, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 359, 360, 361, 362, 363, -1,
- -1, -1, -1, -1, -1, -1, 371, -1, -1, -1,
- -1, -1, 377, 378, 379, 380, -1, -1, -1, 384,
- -1, 386, -1, -1, -1, -1, -1, 392, 393, -1,
- -1, -1, -1, -1, -1, 264, 265, -1, 267, -1,
- -1, 270, 271, -1, -1, -1, 275, 276, 277, -1,
- 279, -1, 417, 418, 419, 420, 285, -1, -1, 288,
- -1, -1, -1, -1, -1, -1, 295, -1, -1, -1,
- -1, 300, -1, 302, 303, 304, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 316, -1, 318,
- 319, -1, -1, 322, -1, -1, 325, -1, 327, -1,
- 329, 330, 331, 332, -1, 334, -1, -1, -1, -1,
- -1, -1, 341, -1, -1, 344, 345, -1, -1, -1,
+ -1, 359, 360, 361, 362, 363, -1, -1, -1, -1,
+ -1, -1, -1, 371, -1, -1, 374, -1, -1, 377,
+ 378, 379, 380, -1, -1, -1, 384, -1, 386, -1,
+ -1, -1, -1, -1, 392, 393, -1, -1, -1, -1,
+ -1, -1, 264, 265, -1, 267, -1, -1, 270, 271,
+ -1, -1, -1, 275, 276, 277, -1, 279, -1, 417,
+ 418, 419, 420, 285, -1, -1, 288, -1, -1, -1,
+ -1, -1, -1, 295, -1, -1, -1, -1, 300, -1,
+ 302, 303, 304, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 316, -1, 318, 319, -1, -1,
+ 322, -1, -1, 325, -1, 327, -1, 329, 330, 331,
+ 332, -1, 334, -1, -1, 337, -1, -1, -1, 341,
+ -1, -1, 344, 345, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 359, 360, 361,
+ 362, 363, -1, -1, -1, -1, -1, -1, -1, 371,
+ -1, -1, -1, -1, -1, 377, 378, 379, 380, -1,
+ -1, -1, 384, -1, 386, -1, -1, -1, -1, -1,
+ 392, 393, -1, -1, -1, -1, -1, -1, 264, 265,
+ -1, 267, -1, -1, 270, 271, -1, -1, -1, 275,
+ 276, 277, -1, 279, -1, 417, 418, 419, 420, 285,
+ -1, -1, 288, -1, -1, -1, -1, -1, -1, 295,
+ -1, -1, -1, -1, 300, -1, 302, 303, 304, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 359, 360, 361, 362, 363, -1, -1, -1, -1, -1,
- -1, -1, 371, -1, -1, -1, -1, -1, 377, 378,
- 379, 380, -1, -1, -1, 384, -1, 386, -1, -1,
- -1, -1, -1, 392, 393, -1, -1, -1, -1, -1,
- -1, 264, 265, -1, 267, -1, -1, 270, 271, -1,
- -1, -1, 275, 276, 277, -1, 279, -1, 417, 418,
- 419, 420, 285, -1, -1, 288, -1, -1, -1, -1,
- -1, -1, 295, -1, -1, -1, -1, 300, -1, 302,
- 303, 304, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 316, -1, 318, 319, -1, -1, 322,
- -1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
- -1, 334, -1, -1, -1, -1, -1, -1, 341, -1,
- -1, 344, 345, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 359, 360, 361, 362,
- 363, -1, -1, -1, -1, -1, -1, -1, 371, -1,
- -1, -1, -1, -1, 377, 378, 379, 380, -1, -1,
- -1, 384, -1, 386, -1, -1, -1, -1, -1, 392,
- 393, -1, -1, -1, -1, -1, -1, 264, 265, -1,
- 267, -1, -1, 270, 271, -1, -1, -1, 275, 276,
- 277, -1, 279, -1, 417, 418, 419, 420, 285, -1,
- -1, 288, -1, -1, -1, -1, -1, -1, 295, -1,
- -1, -1, -1, 300, -1, 302, 303, 304, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 316,
- -1, 318, 319, -1, -1, 322, -1, -1, 325, -1,
- 327, -1, 329, 330, 331, 332, -1, 334, -1, -1,
- -1, -1, -1, -1, 341, -1, -1, 344, 345, -1,
+ 316, -1, 318, 319, -1, -1, 322, -1, -1, 325,
+ -1, 327, -1, 329, 330, 331, 332, -1, 334, -1,
+ -1, -1, -1, -1, -1, 341, -1, -1, 344, 345,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 359, 360, 361, 362, 363, -1, -1, -1,
- -1, -1, -1, -1, 371, -1, -1, -1, -1, -1,
- 377, 378, 379, 380, -1, -1, -1, 384, -1, 386,
- -1, -1, -1, -1, -1, 392, 393, -1, -1, -1,
- -1, -1, -1, 264, 265, -1, 267, -1, -1, 270,
- 271, -1, -1, -1, 275, 276, 277, -1, 279, -1,
- 417, 418, 419, 420, 285, -1, -1, 288, -1, -1,
- -1, -1, -1, -1, 295, -1, 261, -1, -1, 300,
- -1, 302, 303, 304, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 316, -1, 318, 319, 284,
- -1, 322, -1, -1, 325, -1, 327, -1, 329, 330,
- 331, 332, 297, 334, -1, -1, -1, 302, -1, -1,
- -1, -1, 307, -1, 309, 310, 311, 312, -1, -1,
- 315, -1, 317, -1, -1, -1, 321, -1, 359, 360,
- 361, 362, 363, -1, -1, -1, -1, -1, 333, -1,
- 371, 336, -1, 338, -1, -1, 377, 378, 379, 380,
- -1, -1, -1, 384, -1, 386, -1, -1, -1, -1,
- -1, 392, 393, -1, -1, -1, -1, 362, -1, -1,
- -1, -1, -1, 368, 369, -1, -1, -1, -1, -1,
- -1, 263, -1, 265, -1, 267, 417, 418, 270, 420,
- 272, 273, -1, 275, -1, 277, -1, 279, -1, 281,
- 282, 283, -1, -1, -1, 287, 288, -1, -1, -1,
- -1, 293, -1, 295, 296, -1, -1, -1, 300, -1,
- -1, -1, 304, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 315, 316, -1, 318, -1, -1, -1,
- 322, 323, -1, -1, -1, -1, -1, -1, 330, 331,
- 264, 265, 334, 267, -1, 337, 270, 271, -1, -1,
- 342, 275, 276, 277, -1, 279, -1, -1, -1, -1,
- -1, 285, -1, -1, 288, -1, -1, -1, -1, -1,
- -1, 295, 364, 365, -1, -1, 300, -1, 302, 303,
- 304, -1, -1, -1, -1, 377, -1, -1, -1, -1,
+ -1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
+ -1, 367, -1, -1, -1, 371, -1, -1, -1, -1,
+ -1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
+ 386, -1, -1, -1, -1, -1, 392, 393, -1, -1,
+ -1, -1, -1, -1, 264, 265, -1, 267, -1, -1,
+ 270, 271, -1, -1, -1, 275, 276, 277, -1, 279,
+ -1, 417, 418, 419, 420, 285, -1, -1, 288, -1,
+ -1, -1, -1, -1, -1, 295, -1, -1, -1, -1,
+ 300, -1, 302, 303, 304, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 316, -1, 318, 319,
+ -1, -1, 322, -1, -1, 325, -1, 327, -1, 329,
+ 330, 331, 332, -1, 334, -1, -1, -1, -1, -1,
+ -1, 341, -1, -1, 344, 345, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 359,
+ 360, 361, 362, 363, -1, -1, -1, 367, -1, -1,
+ -1, 371, -1, -1, -1, -1, -1, 377, 378, 379,
+ 380, -1, -1, -1, 384, -1, 386, -1, -1, -1,
+ -1, -1, 392, 393, -1, -1, -1, -1, -1, -1,
+ 264, 265, -1, 267, -1, -1, 270, 271, -1, -1,
+ -1, 275, 276, 277, -1, 279, -1, 417, 418, 419,
+ 420, 285, -1, -1, 288, -1, -1, -1, -1, -1,
+ -1, 295, -1, -1, -1, -1, 300, -1, 302, 303,
+ 304, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 316, -1, 318, 319, -1, -1, 322, -1,
-1, 325, -1, 327, -1, 329, 330, 331, 332, -1,
- 334, -1, -1, 337, -1, -1, -1, -1, -1, -1,
- 265, -1, 267, -1, -1, 270, 418, 272, -1, -1,
- 275, -1, -1, -1, 279, 359, 360, 361, 362, -1,
- -1, -1, -1, 288, 265, -1, 267, 371, -1, 270,
- 295, 272, 273, -1, 275, 300, 277, 302, 279, 304,
+ 334, -1, -1, -1, -1, -1, -1, 341, -1, -1,
+ 344, 345, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 359, 360, 361, 362, 363,
+ -1, -1, -1, -1, -1, -1, -1, 371, -1, -1,
+ -1, -1, -1, 377, 378, 379, 380, -1, -1, -1,
+ 384, -1, 386, -1, -1, -1, -1, -1, 392, 393,
+ -1, -1, -1, -1, -1, -1, 264, 265, -1, 267,
+ -1, -1, 270, 271, -1, -1, -1, 275, 276, 277,
+ -1, 279, -1, 417, 418, 419, 420, 285, -1, -1,
+ 288, -1, -1, -1, -1, -1, -1, 295, -1, -1,
+ -1, -1, 300, -1, 302, 303, 304, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 316, -1,
+ 318, 319, -1, -1, 322, -1, -1, 325, -1, 327,
+ -1, 329, 330, 331, 332, -1, 334, -1, -1, -1,
+ -1, -1, -1, 341, -1, -1, 344, 345, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 359, 360, 361, 362, 363, -1, -1, -1, -1,
+ -1, -1, -1, 371, -1, -1, -1, -1, -1, 377,
+ 378, 379, 380, -1, -1, -1, 384, -1, 386, -1,
+ -1, -1, -1, -1, 392, 393, -1, -1, -1, -1,
+ -1, -1, 264, 265, -1, 267, -1, -1, 270, 271,
+ -1, -1, -1, 275, 276, 277, -1, 279, -1, 417,
+ 418, 419, 420, 285, -1, -1, 288, -1, -1, -1,
+ -1, -1, -1, 295, -1, -1, -1, -1, 300, -1,
+ 302, 303, 304, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 316, -1, 318, 319, -1, -1,
+ 322, -1, -1, 325, -1, 327, -1, 329, 330, 331,
+ 332, -1, 334, -1, -1, -1, -1, -1, -1, 341,
+ -1, -1, 344, 345, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 359, 360, 361,
+ 362, 363, -1, -1, -1, -1, -1, -1, -1, 371,
+ -1, -1, -1, -1, -1, 377, 378, 379, 380, -1,
+ -1, -1, 384, -1, 386, -1, -1, -1, -1, -1,
+ 392, 393, -1, -1, -1, -1, -1, -1, 264, 265,
+ -1, 267, -1, -1, 270, 271, -1, -1, -1, 275,
+ 276, 277, -1, 279, -1, 417, 418, 419, 420, 285,
+ -1, -1, 288, -1, -1, -1, -1, -1, -1, 295,
+ -1, -1, -1, -1, 300, -1, 302, 303, 304, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 316, -1, 318, 319, -1, -1, 322, -1, -1, 325,
+ -1, 327, -1, 329, 330, 331, 332, -1, 334, -1,
+ -1, -1, -1, -1, -1, 341, -1, -1, 344, 345,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 359, 360, 361, 362, 363, -1, -1,
+ -1, -1, -1, -1, -1, 371, -1, -1, -1, -1,
+ -1, 377, 378, 379, 380, -1, -1, -1, 384, -1,
+ 386, -1, -1, -1, -1, -1, 392, 393, -1, -1,
+ -1, -1, -1, -1, 264, 265, -1, 267, -1, -1,
+ 270, 271, -1, -1, -1, 275, 276, 277, -1, 279,
+ -1, 417, 418, 419, 420, 285, -1, -1, 288, -1,
+ -1, -1, -1, -1, -1, 295, -1, 261, -1, -1,
+ 300, -1, 302, 303, 304, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 316, -1, 318, 319,
+ 284, -1, 322, -1, -1, 325, -1, 327, -1, 329,
+ 330, 331, 332, 297, 334, -1, -1, -1, 302, -1,
+ -1, -1, -1, 307, -1, 309, 310, 311, 312, -1,
+ -1, 315, -1, 317, -1, -1, -1, 321, -1, 359,
+ 360, 361, 362, 363, -1, -1, -1, -1, -1, 333,
+ -1, 371, 336, -1, 338, -1, -1, 377, 378, 379,
+ 380, -1, -1, -1, 384, -1, 386, -1, -1, -1,
+ -1, -1, 392, 393, -1, -1, -1, -1, 362, -1,
+ -1, -1, -1, -1, 368, 369, -1, -1, -1, -1,
+ -1, -1, 263, -1, 265, -1, 267, 417, 418, 270,
+ 420, 272, 273, -1, 275, -1, 277, -1, 279, -1,
281, 282, 283, -1, -1, -1, 287, 288, -1, -1,
- -1, 316, 293, 318, 295, 296, -1, 322, 323, 300,
- -1, -1, -1, 304, -1, 330, 331, -1, -1, 334,
- -1, -1, 337, 417, 418, 316, -1, 318, -1, -1,
+ -1, -1, 293, -1, 295, 296, -1, -1, -1, 300,
+ -1, -1, -1, 304, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 315, 316, -1, 318, -1, -1,
-1, 322, 323, -1, -1, -1, -1, -1, -1, 330,
- 331, -1, 265, 334, 267, -1, 337, 270, -1, 272,
- 273, 342, 275, -1, 277, -1, 279, -1, 281, 282,
- 283, -1, -1, -1, 287, 288, -1, -1, -1, -1,
- 293, -1, 295, 296, -1, -1, -1, 300, -1, -1,
- -1, 304, -1, -1, -1, -1, 377, -1, -1, -1,
- -1, -1, -1, 316, -1, 318, -1, -1, -1, 322,
- 323, -1, -1, 418, -1, -1, -1, 330, 331, -1,
- -1, 334, -1, -1, 337, -1, 265, -1, 267, 342,
- -1, 270, -1, -1, 273, -1, 275, 418, 277, -1,
- 279, -1, 281, 282, 283, -1, -1, -1, 287, 288,
- -1, -1, -1, -1, 293, -1, 295, -1, 265, -1,
- 267, 300, -1, 270, -1, 304, 273, -1, 275, -1,
- 277, -1, 279, -1, 281, 282, 283, 316, -1, 318,
- 287, 288, -1, 322, -1, -1, 293, -1, 295, -1,
- -1, 330, 331, 300, -1, 334, -1, 304, 337, -1,
- -1, -1, 265, 342, 267, 418, -1, 270, -1, 316,
- -1, 318, 275, -1, -1, 322, 279, -1, -1, -1,
- -1, -1, -1, 330, 331, 288, -1, 334, -1, -1,
- 337, -1, 295, -1, 265, 342, 267, 300, 377, 270,
- -1, 304, -1, 306, 275, 308, -1, -1, 279, -1,
- 313, -1, -1, 316, -1, 318, -1, 288, -1, 322,
- -1, -1, 325, -1, 295, -1, -1, 330, 331, 300,
- -1, 334, -1, 304, 337, 306, -1, 308, 265, 418,
- 267, -1, 313, 270, -1, 316, -1, 318, 275, -1,
- -1, 322, 279, -1, 325, -1, -1, -1, -1, 330,
- 331, 288, -1, 334, -1, -1, 337, -1, 295, 372,
- -1, 418, -1, 300, -1, -1, -1, 304, -1, 306,
- -1, -1, -1, -1, -1, -1, 313, -1, -1, 316,
- -1, 318, -1, -1, -1, 322, -1, -1, 325, 370,
- -1, -1, -1, 330, 331, -1, -1, 334, -1, 265,
- 337, 267, -1, -1, 270, 418, -1, -1, -1, 275,
- -1, -1, -1, 279, -1, -1, -1, -1, -1, -1,
- -1, -1, 288, -1, -1, -1, 363, -1, -1, 295,
- -1, 265, -1, 267, 300, -1, 270, 418, 304, -1,
- 306, 275, 308, -1, -1, 279, -1, 313, -1, -1,
- 316, -1, 318, -1, 288, -1, 322, -1, -1, 325,
- -1, 295, -1, -1, 330, 331, 300, -1, 334, -1,
- 304, 337, 306, -1, 308, 265, -1, 267, -1, 313,
- 270, 418, 316, -1, 318, 275, -1, -1, 322, 279,
- -1, 325, -1, -1, -1, -1, 330, 331, 288, -1,
- 334, -1, -1, 337, -1, 295, -1, -1, -1, -1,
- 300, -1, -1, -1, 304, -1, -1, -1, -1, 261,
- -1, -1, -1, -1, -1, -1, 316, -1, 318, -1,
- 272, -1, 322, -1, -1, 277, -1, -1, -1, 281,
- 330, 331, 284, -1, 334, -1, -1, 337, -1, -1,
- -1, -1, 418, -1, 296, 297, -1, -1, -1, 301,
- 302, -1, -1, -1, -1, 307, -1, 309, 310, 311,
- 312, -1, -1, 363, -1, 317, -1, -1, -1, 321,
- -1, 323, -1, -1, 418, -1, -1, -1, -1, -1,
- -1, 333, -1, 335, 336, 261, 338, -1, -1, -1,
- 342, -1, -1, -1, -1, -1, 272, -1, -1, -1,
- -1, 277, -1, -1, -1, 281, -1, -1, 284, -1,
- 362, -1, -1, -1, -1, -1, 368, 369, 418, -1,
- 296, 297, -1, -1, -1, 301, 302, 261, -1, 263,
- -1, 307, -1, 309, 310, 311, 312, -1, -1, -1,
- -1, 317, -1, -1, -1, 321, -1, 323, -1, -1,
- 284, -1, -1, -1, -1, -1, -1, 333, -1, -1,
- 336, -1, 338, 297, -1, -1, 342, -1, 302, -1,
- -1, -1, -1, 307, -1, 309, 310, 311, 312, -1,
- -1, -1, -1, 317, -1, -1, 362, 321, -1, -1,
- 261, -1, 368, 369, -1, -1, -1, -1, -1, 333,
- -1, 272, 336, -1, 338, -1, 277, -1, -1, -1,
- 281, -1, -1, 284, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 296, 297, -1, 362, -1,
- 301, 302, -1, 261, 368, 369, 307, -1, 309, 310,
- 311, 312, -1, -1, 272, -1, 317, -1, -1, 277,
- 321, -1, 323, 281, -1, -1, 284, -1, -1, -1,
- -1, -1, 333, -1, -1, 336, -1, 338, 296, 297,
- -1, 342, -1, 301, 302, 261, -1, -1, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
- -1, 362, -1, 321, -1, 323, -1, 368, 284, -1,
- -1, -1, -1, -1, -1, 333, -1, -1, 336, -1,
- 338, 297, -1, 261, 342, -1, 302, -1, -1, -1,
- -1, 307, -1, 309, 310, 311, 312, -1, -1, -1,
- -1, 317, -1, -1, 362, 321, 284, -1, -1, -1,
- 368, -1, -1, -1, -1, -1, -1, 333, -1, 297,
- 336, 261, 338, -1, 302, -1, -1, -1, -1, 307,
- -1, 309, 310, 311, 312, -1, -1, -1, -1, 317,
- -1, -1, -1, 321, 284, -1, 362, -1, 364, 365,
- -1, -1, 368, -1, -1, 333, -1, 297, 336, 261,
- 338, 263, 302, -1, -1, -1, -1, 307, -1, 309,
- 310, 311, 312, -1, -1, 315, -1, 317, -1, -1,
- -1, 321, 284, -1, 362, -1, 364, 365, -1, -1,
- 368, -1, -1, 333, -1, 297, 336, 261, 338, -1,
- 302, -1, -1, -1, -1, 307, -1, 309, 310, 311,
- 312, -1, -1, -1, -1, 317, -1, -1, -1, 321,
- 284, -1, 362, -1, -1, -1, -1, 261, 368, 263,
- -1, 333, -1, 297, 336, -1, 338, -1, 302, -1,
- -1, -1, -1, 307, -1, 309, 310, 311, 312, -1,
- 284, -1, -1, 317, -1, -1, -1, 321, -1, -1,
- 362, -1, -1, 297, -1, -1, 368, 261, 302, 333,
- -1, -1, 336, 307, 338, 309, 310, 311, 312, -1,
- -1, 315, -1, 317, -1, -1, -1, 321, -1, -1,
- 284, -1, -1, -1, -1, -1, -1, 261, 362, 333,
- 364, 365, 336, 297, 338, -1, -1, 301, 302, -1,
- -1, -1, -1, 307, -1, 309, 310, 311, 312, -1,
- 284, -1, -1, 317, -1, -1, -1, 321, 362, -1,
- -1, -1, -1, 297, -1, -1, -1, -1, 302, 333,
- -1, -1, 336, 307, 338, 309, 310, 311, 312, -1,
- -1, -1, -1, 317, -1, -1, -1, 321, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 362, 333,
- -1, -1, 336, -1, 338, -1, -1, -1, -1, -1,
+ 331, 264, 265, 334, 267, -1, 337, 270, 271, -1,
+ -1, 342, 275, 276, 277, -1, 279, -1, -1, -1,
+ -1, -1, 285, -1, -1, 288, -1, -1, -1, -1,
+ -1, -1, 295, 364, 365, -1, -1, 300, -1, 302,
+ 303, 304, -1, -1, -1, -1, 377, -1, -1, -1,
+ -1, -1, -1, 316, -1, 318, 319, -1, -1, 322,
+ -1, -1, 325, -1, 327, -1, 329, 330, 331, 332,
+ -1, 334, -1, -1, 337, -1, -1, -1, -1, -1,
+ -1, 265, -1, 267, -1, -1, 270, 418, 272, -1,
+ -1, 275, -1, -1, -1, 279, 359, 360, 361, 362,
+ -1, -1, -1, -1, 288, 265, -1, 267, 371, -1,
+ 270, 295, 272, 273, -1, 275, 300, 277, 302, 279,
+ 304, 281, 282, 283, -1, -1, -1, 287, 288, -1,
+ -1, -1, 316, 293, 318, 295, 296, -1, 322, 323,
+ 300, -1, -1, -1, 304, -1, 330, 331, -1, -1,
+ 334, -1, -1, 337, 417, 418, 316, -1, 318, -1,
+ -1, -1, 322, 323, -1, -1, -1, -1, -1, -1,
+ 330, 331, -1, 265, 334, 267, -1, 337, 270, -1,
+ 272, 273, 342, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, -1, -1, -1, 287, 288, -1, -1, -1,
+ -1, 293, -1, 295, 296, -1, -1, -1, 300, -1,
+ -1, -1, 304, -1, -1, -1, -1, 377, -1, -1,
+ -1, -1, -1, -1, 316, -1, 318, -1, -1, -1,
+ 322, 323, -1, -1, 418, -1, -1, -1, 330, 331,
+ -1, -1, 334, -1, -1, 337, -1, 265, -1, 267,
+ 342, -1, 270, -1, -1, 273, -1, 275, 418, 277,
+ -1, 279, -1, 281, 282, 283, -1, -1, -1, 287,
+ 288, -1, -1, -1, -1, 293, -1, 295, -1, 265,
+ -1, 267, 300, -1, 270, -1, 304, 273, -1, 275,
+ -1, 277, -1, 279, -1, 281, 282, 283, 316, -1,
+ 318, 287, 288, -1, 322, -1, -1, 293, -1, 295,
+ -1, -1, 330, 331, 300, -1, 334, -1, 304, 337,
+ -1, -1, -1, 265, 342, 267, 418, -1, 270, -1,
+ 316, -1, 318, 275, -1, -1, 322, 279, -1, -1,
+ -1, -1, -1, -1, 330, 331, 288, -1, 334, -1,
+ -1, 337, -1, 295, -1, 265, 342, 267, 300, 377,
+ 270, -1, 304, -1, 306, 275, 308, -1, -1, 279,
+ -1, 313, -1, -1, 316, -1, 318, -1, 288, -1,
+ 322, -1, -1, 325, -1, 295, -1, -1, 330, 331,
+ 300, -1, 334, -1, 304, 337, 306, -1, 308, 265,
+ 418, 267, -1, 313, 270, -1, 316, -1, 318, 275,
+ -1, -1, 322, 279, -1, 325, -1, -1, -1, -1,
+ 330, 331, 288, -1, 334, -1, -1, 337, -1, 295,
+ 372, -1, 418, -1, 300, -1, -1, -1, 304, -1,
+ 306, -1, -1, -1, -1, -1, -1, 313, -1, -1,
+ 316, -1, 318, -1, -1, -1, 322, -1, -1, 325,
+ 370, -1, -1, -1, 330, 331, -1, -1, 334, -1,
+ 265, 337, 267, -1, -1, 270, 418, -1, -1, -1,
+ 275, -1, -1, -1, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, 288, -1, -1, -1, 363, -1, -1,
+ 295, -1, 265, -1, 267, 300, -1, 270, 418, 304,
+ -1, 306, 275, 308, -1, -1, 279, -1, 313, -1,
+ -1, 316, -1, 318, -1, 288, -1, 322, -1, -1,
+ 325, -1, 295, -1, -1, 330, 331, 300, -1, 334,
+ -1, 304, 337, 306, -1, 308, -1, -1, -1, -1,
+ 313, -1, 418, 316, -1, 318, -1, -1, -1, 322,
+ -1, -1, 325, -1, -1, -1, -1, 330, 331, -1,
+ -1, 334, -1, 265, 337, 267, -1, -1, 270, -1,
+ -1, -1, -1, 275, -1, -1, -1, 279, -1, -1,
+ -1, 283, 265, -1, 267, -1, 288, 270, -1, -1,
+ -1, 293, 275, 295, -1, -1, 279, -1, 300, -1,
+ -1, -1, 304, 305, -1, 288, -1, -1, -1, -1,
+ -1, -1, 295, 418, 316, -1, 318, 300, -1, -1,
+ 322, 304, -1, -1, -1, -1, 261, -1, 330, 331,
+ -1, -1, 334, 316, -1, 318, -1, 272, -1, 322,
+ -1, -1, 277, -1, -1, 418, 281, 330, 331, 284,
+ -1, 334, -1, -1, 337, -1, -1, -1, -1, -1,
+ -1, 296, 297, -1, -1, -1, 301, 302, -1, -1,
+ -1, -1, 307, -1, 309, 310, 311, 312, -1, -1,
+ 363, -1, 317, -1, -1, -1, 321, -1, 323, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 333, -1,
+ 335, 336, 261, 338, -1, -1, -1, 342, -1, -1,
+ -1, -1, -1, 272, -1, -1, 418, -1, 277, -1,
+ -1, -1, 281, -1, -1, 284, -1, 362, -1, -1,
+ -1, -1, -1, 368, 369, 418, -1, 296, 297, -1,
+ -1, -1, 301, 302, 261, -1, 263, -1, 307, -1,
+ 309, 310, 311, 312, -1, -1, -1, -1, 317, -1,
+ -1, -1, 321, -1, 323, -1, -1, 284, -1, -1,
+ -1, -1, -1, -1, 333, -1, -1, 336, -1, 338,
+ 297, -1, -1, 342, -1, 302, -1, -1, -1, -1,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, 362, 321, -1, -1, 261, -1, 368,
+ 369, -1, -1, -1, -1, -1, 333, -1, 272, 336,
+ -1, 338, -1, 277, -1, -1, -1, 281, -1, -1,
+ 284, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 296, 297, -1, 362, -1, 301, 302, -1,
+ 261, 368, 369, 307, -1, 309, 310, 311, 312, -1,
+ -1, 272, -1, 317, -1, -1, 277, 321, -1, 323,
+ 281, -1, -1, 284, -1, -1, -1, -1, -1, 333,
+ -1, -1, 336, -1, 338, 296, 297, -1, 342, -1,
+ 301, 302, 261, -1, -1, -1, 307, -1, 309, 310,
+ 311, 312, -1, -1, -1, -1, 317, -1, 362, -1,
+ 321, -1, 323, -1, 368, 284, -1, -1, -1, -1,
+ -1, -1, 333, -1, -1, 336, -1, 338, 297, -1,
+ 261, 342, -1, 302, -1, -1, -1, -1, 307, -1,
+ 309, 310, 311, 312, -1, -1, -1, -1, 317, -1,
+ -1, 362, 321, 284, -1, -1, -1, 368, -1, -1,
+ -1, -1, -1, -1, 333, -1, 297, 336, 261, 338,
+ -1, 302, -1, -1, -1, -1, 307, -1, 309, 310,
+ 311, 312, -1, -1, -1, -1, 317, -1, -1, -1,
+ 321, 284, -1, 362, -1, 364, 365, -1, -1, 368,
+ -1, -1, 333, -1, 297, 336, 261, 338, 263, 302,
+ -1, -1, -1, -1, 307, -1, 309, 310, 311, 312,
+ -1, -1, 315, -1, 317, -1, -1, -1, 321, 284,
+ -1, 362, -1, 364, 365, -1, -1, 368, -1, -1,
+ 333, -1, 297, 336, 261, 338, -1, 302, -1, -1,
+ -1, -1, 307, -1, 309, 310, 311, 312, -1, -1,
+ -1, -1, 317, -1, -1, -1, 321, 284, -1, 362,
+ -1, -1, -1, -1, 261, 368, 263, -1, 333, -1,
+ 297, 336, -1, 338, -1, 302, -1, -1, -1, -1,
+ 307, -1, 309, 310, 311, 312, -1, 284, -1, -1,
+ 317, -1, -1, -1, 321, -1, -1, 362, -1, -1,
+ 297, -1, -1, 368, 261, 302, 333, -1, -1, 336,
+ 307, 338, 309, 310, 311, 312, -1, -1, 315, -1,
+ 317, -1, -1, -1, 321, -1, -1, 284, -1, -1,
+ -1, -1, -1, -1, -1, 362, 333, 364, 365, 336,
+ 297, 338, -1, -1, -1, 302, -1, -1, -1, -1,
+ 307, -1, 309, 310, 311, 312, -1, -1, -1, -1,
+ 317, -1, -1, -1, 321, 362, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 333, -1, -1, 336,
+ -1, 338, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 362,
+ -1, -1, -1, -1, -1, 362,
};
-#line 7043 "cs-parser.jay"
+#line 7048 "cs-parser.jay"
// <summary>
// A class used to hold info about an operator declarator
@@ -14410,7 +14437,7 @@ object Error_AwaitAsIdentifier (object token)
{
if (async_block) {
report.Error (4003, GetLocation (token), "`await' cannot be used as an identifier within an async method or lambda expression");
- return new Tokenizer.LocatedToken ("await", GetLocation (token));
+ return new LocatedToken ("await", GetLocation (token));
}
return token;
@@ -14604,7 +14631,7 @@ void FeatureIsNotAvailable (Location loc, string feature)
Location GetLocation (object obj)
{
- var lt = obj as Tokenizer.LocatedToken;
+ var lt = obj as LocatedToken;
if (lt != null)
return lt.Location;
@@ -14682,7 +14709,7 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block)
retval = current_anonymous_method;
async_block = (bool) oob_stack.Pop ();
- current_variable = (BlockVariableDeclaration) oob_stack.Pop ();
+ current_variable = (BlockVariable) oob_stack.Pop ();
current_local_parameters = (ParametersCompiled) oob_stack.Pop ();
current_anonymous_method = (AnonymousMethodExpression) oob_stack.Pop ();
@@ -14791,7 +14818,7 @@ string GetSymbolName (int token)
case Token.LITERAL:
return ((Constant)lexer.Value).GetValue ().ToString ();
case Token.IDENTIFIER:
- return ((Tokenizer.LocatedToken)lexer.Value).Value;
+ return ((LocatedToken)lexer.Value).Value;
case Token.BOOL:
return "bool";
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay
index a659f55..9d39aa9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay
@@ -54,7 +54,7 @@ namespace Mono.CSharp
/// </summary>
Block current_block;
- BlockVariableDeclaration current_variable;
+ BlockVariable current_variable;
Delegate current_delegate;
@@ -116,6 +116,8 @@ namespace Mono.CSharp
// Keeps track of global data changes to undo on parser error
//
public Undo undo;
+
+ bool? interactive_async;
Stack<Linq.QueryBlock> linq_clause_blocks;
@@ -426,7 +428,7 @@ extern_alias_directives
extern_alias_directive
: EXTERN_ALIAS IDENTIFIER IDENTIFIER SEMICOLON
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
string s = lt.Value;
if (s != "alias") {
syntax_error (lt.Location, "`alias' expected");
@@ -434,7 +436,7 @@ extern_alias_directive
if (lang_version == LanguageVersion.ISO_1)
FeatureIsNotAvailable (lt.Location, "external alias");
- lt = (Tokenizer.LocatedToken) $3;
+ lt = (LocatedToken) $3;
if (lt.Value == QualifiedAliasMember.GlobalAlias) {
RootNamespace.Error_GlobalNamespaceRedefined (report, lt.Location);
}
@@ -474,7 +476,7 @@ using_namespace
}
| USING IDENTIFIER ASSIGN namespace_or_type_expr SEMICOLON
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") {
report.Warning (440, 2, lt.Location,
"An alias named `global' will not be used when resolving `global::'. The global namespace will be used instead");
@@ -563,15 +565,14 @@ opt_semicolon_error
namespace_name
: IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new MemberName (lt.Value, lt.Location);
}
| namespace_name DOT IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $3;
- $$ = new MemberName ((MemberName) $1, lt.Value, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ $$ = new MemberName ((MemberName) $1, lt.Value, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
| error
{
@@ -686,7 +687,7 @@ attribute_sections
lbag.AddLocation (sect, locationListStack.Pop ());
if (attrs == null)
attrs = new Attributes (sect);
- else
+ else if (sect != null)
attrs.AddAttributes (sect);
$$ = attrs;
}
@@ -724,9 +725,9 @@ attribute_section_cont
lbag.InsertLocation ($$, 0, PopLocation ());
if ($5 != null) {
- lbag.AddLocation ($$, GetLocation ($2), GetLocation ($5), GetLocation ($6));
+ lbag.AddLocation ($$, GetLocation ($1), GetLocation ($2), GetLocation ($5), GetLocation ($6));
} else {
- lbag.AddLocation ($$, GetLocation ($2), GetLocation ($6));
+ lbag.AddLocation ($$, GetLocation ($1), GetLocation ($2), GetLocation ($6));
}
current_attr_target = null;
@@ -747,7 +748,7 @@ attribute_section_cont
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
var tne = new SimpleName (lt.Value, null, lt.Location);
$$ = new List<Attribute> () {
@@ -756,7 +757,7 @@ attribute_section_cont
}
| error
{
- $$ = CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1));
+ CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1));
$$ = null;
}
;
@@ -764,7 +765,7 @@ attribute_section_cont
attribute_target
: IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = CheckAttributeTarget (lt.Value, lt.Location);
savedCloseLocation = GetLocation ($1);
}
@@ -894,14 +895,14 @@ named_attribute_argument
expression
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new NamedArgument (lt.Value, lt.Location, (Expression) $4);
lbag.AddLocation ($$, GetLocation($2));
}
;
named_argument
- : identifier_inside_body COLON opt_named_modifier expression
+ : identifier_inside_body COLON opt_named_modifier expression_or_error
{
if (lang_version <= LanguageVersion.V_3)
FeatureIsNotAvailable (GetLocation ($1), "named argument");
@@ -909,7 +910,7 @@ named_argument
// Avoid boxing in common case (no modifier)
var arg_mod = $3 == null ? Argument.AType.None : (Argument.AType) $3;
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new NamedArgument (lt.Value, lt.Location, (Expression) $4, arg_mod);
lbag.AddLocation ($$, GetLocation($2));
}
@@ -1023,7 +1024,7 @@ constant_declaration
opt_modifiers
CONST type IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $5;
+ var lt = (LocatedToken) $5;
var mod = (Modifiers) $2;
current_field = new Const (current_type, (FullNamedExpression) $4, mod, new MemberName (lt.Value, lt.Location), (Attributes) $1);
current_type.AddMember (current_field);
@@ -1074,7 +1075,7 @@ constant_declarators
constant_declarator
: COMMA IDENTIFIER constant_initializer
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) $3);
lbag.AddLocation ($$, GetLocation ($1));
}
@@ -1114,7 +1115,7 @@ field_declaration
if (type.Type != null && type.Type.Kind == MemberKind.Void)
report.Error (670, GetLocation ($3), "Fields cannot have void type");
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
current_field = new Field (current_type, type, (Modifiers) $2, new MemberName (lt.Value, lt.Location), (Attributes) $1);
current_type.AddField (current_field);
$$ = current_field;
@@ -1139,7 +1140,7 @@ field_declaration
if (lang_version < LanguageVersion.ISO_2)
FeatureIsNotAvailable (GetLocation ($3), "fixed size buffers");
- var lt = (Tokenizer.LocatedToken) $5;
+ var lt = (LocatedToken) $5;
current_field = new FixedField (current_type, (FullNamedExpression) $4, (Modifiers) $2,
new MemberName (lt.Value, lt.Location), (Attributes) $1);
@@ -1203,7 +1204,7 @@ field_declarators
field_declarator
: COMMA IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation ($$, GetLocation ($1));
}
@@ -1214,7 +1215,7 @@ field_declarator
variable_initializer
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) $5);
lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3));
}
@@ -1239,7 +1240,7 @@ fixed_field_declarators
fixed_field_declarator
: COMMA IDENTIFIER fixed_field_size
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) $3);
lbag.AddLocation ($$, GetLocation ($1));
}
@@ -1383,8 +1384,10 @@ method_header
current_type.AddMember (method);
- if ($11 != null)
- method.SetConstraints ((List<Constraints>) $11);
+ async_block = (method.ModFlags & Modifiers.ASYNC) != 0;
+
+ if ($12 != null)
+ method.SetConstraints ((List<Constraints>) $12);
if (doc_support)
method.DocComment = Lexer.consume_doc_comment ();
@@ -1561,7 +1564,7 @@ fixed_parameter
parameter_type
identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
$$ = new Parameter ((FullNamedExpression) $3, lt.Value, (Parameter.Modifier) $2, (Attributes) $1, lt.Location);
lbag.AddLocation ($$, parameterModifierLocation);
}
@@ -1570,7 +1573,7 @@ fixed_parameter
parameter_type
identifier_inside_body OPEN_BRACKET CLOSE_BRACKET
{
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name");
$$ = new Parameter ((FullNamedExpression) $3, lt.Value, (Parameter.Modifier) $2, (Attributes) $1, lt.Location);
lbag.AddLocation ($$, parameterModifierLocation);
@@ -1629,7 +1632,7 @@ fixed_parameter
if ((valid_param_mod & ParameterModifierType.DefaultValue) == 0)
report.Error (1065, GetLocation ($5), "Optional parameter is not valid in this context");
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
$$ = new Parameter ((FullNamedExpression) $3, lt.Value, mod, (Attributes) $1, lt.Location);
lbag.AddLocation ($$, parameterModifierLocation, GetLocation ($5)); // parameterModifierLocation should be ignored when mod == NONE
@@ -1701,7 +1704,7 @@ parameter_modifier
parameter_array
: opt_attributes params_modifier type IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
$$ = new ParamsParameter ((FullNamedExpression) $3, lt.Value, (Attributes) $1, lt.Location);
lbag.AddLocation ($$, savedLocation);
}
@@ -1709,7 +1712,7 @@ parameter_array
{
report.Error (1751, GetLocation ($2), "Cannot specify a default value for a parameter array");
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
$$ = new ParamsParameter ((FullNamedExpression) $3, lt.Value, (Attributes) $1, lt.Location);
lbag.AddLocation ($$, savedLocation);
}
@@ -2135,11 +2138,11 @@ operator_declarator
Operator.GetName (op));
}
} else {
- if (p_count > 2) {
+ if (p_count == 1) {
+ report.Error (1019, loc, "Overloadable unary operator expected");
+ } else if (p_count != 2) {
report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters",
Operator.GetName (op));
- } else if (p_count != 2) {
- report.Error (1019, loc, "Overloadable unary operator expected");
}
}
@@ -2276,7 +2279,7 @@ constructor_declarator
valid_param_mod = 0;
current_local_parameters = (ParametersCompiled) $6;
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var mods = (Modifiers) $2;
var c = new Constructor (current_type, lt.Value, mods, (Attributes) $1, current_local_parameters, lt.Location);
@@ -2373,7 +2376,7 @@ destructor_declaration
}
IDENTIFIER OPEN_PARENS CLOSE_PARENS method_body
{
- var lt = (Tokenizer.LocatedToken) $5;
+ var lt = (LocatedToken) $5;
if (lt.Value != current_container.MemberName.Name){
report.Error (574, lt.Location, "Name of destructor must match name of class");
} else if (current_container.Kind != MemberKind.Class){
@@ -2496,7 +2499,7 @@ event_declarators
event_declarator
: COMMA IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
lbag.AddLocation ($$, GetLocation ($1));
}
@@ -2507,7 +2510,7 @@ event_declarator
event_variable_initializer
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) $5);
lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3));
}
@@ -2729,7 +2732,7 @@ enum_member_declarations
enum_member_declaration
: opt_attributes IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) $1);
((Enum) current_type).AddEnumMember (em);
@@ -2752,7 +2755,7 @@ enum_member_declaration
{
--lexer.parsing_block;
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) $1);
em.Initializer = new ConstInitializer (em, (Expression) $5, GetLocation ($4));
((Enum) current_type).AddEnumMember (em);
@@ -2766,7 +2769,7 @@ enum_member_declaration
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var em = new EnumMember ((Enum) current_type, new MemberName (lt.Value, lt.Location), (Attributes) $1);
((Enum) current_type).AddEnumMember (em);
@@ -2840,8 +2843,8 @@ namespace_or_type_expr
: member_name
| qualified_alias_member IDENTIFIER opt_type_argument_list
{
- var lt1 = (Tokenizer.LocatedToken) $1;
- var lt2 = (Tokenizer.LocatedToken) $2;
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
$$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) $3, lt1.Location);
lbag.AddLocation ($$, savedLocation, GetLocation ($2));
@@ -2852,17 +2855,16 @@ member_name
: simple_name_expr
| namespace_or_type_expr DOT IDENTIFIER opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
;
simple_name_expr
: IDENTIFIER opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);
}
;
@@ -2918,7 +2920,7 @@ type_declaration_name
opt_type_parameter_list
{
lexer.parsing_generic_declaration = false;
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new MemberName (lt.Value, (TypeParameters)$3, lt.Location);
}
;
@@ -2938,7 +2940,7 @@ method_declaration_name
| explicit_interface IDENTIFIER opt_type_parameter_list
{
lexer.parsing_generic_declaration = false;
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new MemberName (lt.Value, (TypeParameters) $3, (ATypeNameExpression) $1, lt.Location);
}
;
@@ -2959,21 +2961,21 @@ indexer_declaration_name
explicit_interface
: IDENTIFIER opt_type_argument_list DOT
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new SimpleName (lt.Value, (TypeArguments) $2, lt.Location);
lbag.AddLocation ($$, GetLocation ($3));
}
| qualified_alias_member IDENTIFIER opt_type_argument_list DOT
{
- var lt1 = (Tokenizer.LocatedToken) $1;
- var lt2 = (Tokenizer.LocatedToken) $2;
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
$$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) $3, lt1.Location);
lbag.AddLocation ($$, savedLocation, GetLocation ($4));
}
| explicit_interface IDENTIFIER opt_type_argument_list DOT
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new MemberAccess ((ATypeNameExpression) $1, lt.Value, (TypeArguments) $3, lt.Location);
lbag.AddLocation ($$, GetLocation ($4));
}
@@ -3014,7 +3016,7 @@ type_parameters
type_parameter
: opt_attributes opt_type_parameter_variance IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken)$3;
+ var lt = (LocatedToken)$3;
var variance = (Variance) $2;
$$ = new TypeParameter (new MemberName (lt.Value, lt.Location), (Attributes)$1, variance);
if (variance != Variance.None)
@@ -3202,11 +3204,11 @@ primary_expression
primary_expression_or_type
: IDENTIFIER opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);
}
| IDENTIFIER GENERATE_COMPLETION {
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
}
| member_access
@@ -3259,29 +3261,26 @@ parenthesized_expression
member_access
: primary_expression DOT identifier_inside_body opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
| builtin_types DOT identifier_inside_body opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
| BASE DOT identifier_inside_body opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $3;
- $$ = new MemberAccess (new BaseThis (GetLocation ($1)), lt.Value, (TypeArguments) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess (new BaseThis (GetLocation ($1)), lt.Value, (TypeArguments) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
| qualified_alias_member identifier_inside_body opt_type_argument_list
{
- var lt1 = (Tokenizer.LocatedToken) $1;
- var lt2 = (Tokenizer.LocatedToken) $2;
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
$$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) $3, lt1.Location);
lbag.AddLocation ($$, savedLocation, GetLocation ($2));
@@ -3290,7 +3289,7 @@ member_access
$$ = new CompletionMemberAccess ((Expression) $1, null,GetLocation ($3));
}
| primary_expression DOT IDENTIFIER GENERATE_COMPLETION {
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
$$ = new CompletionMemberAccess ((Expression) $1, lt.Value, lt.Location);
}
| builtin_types DOT GENERATE_COMPLETION
@@ -3298,7 +3297,7 @@ member_access
$$ = new CompletionMemberAccess ((Expression) $1, null, lexer.Location);
}
| builtin_types DOT IDENTIFIER GENERATE_COMPLETION {
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
$$ = new CompletionMemberAccess ((Expression) $1, lt.Value, lt.Location);
}
;
@@ -3378,13 +3377,13 @@ member_initializer_list
member_initializer
: IDENTIFIER ASSIGN initializer_value
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new ElementInitializer (lt.Value, (Expression)$3, lt.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
| AWAIT ASSIGN initializer_value
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier ($1);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier ($1);
$$ = new ElementInitializer (lt.Value, (Expression)$3, lt.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
@@ -3722,13 +3721,13 @@ anonymous_type_parameters
anonymous_type_parameter
: identifier_inside_body ASSIGN variable_initializer
{
- var lt = (Tokenizer.LocatedToken)$1;
+ var lt = (LocatedToken)$1;
$$ = new AnonymousTypeParameter ((Expression)$3, lt.Value, lt.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
| identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken)$1;
+ var lt = (LocatedToken)$1;
$$ = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location),
lt.Value, lt.Location);
}
@@ -3857,15 +3856,17 @@ typeof_type_expression
unbound_type_name
: identifier_inside_body generic_dimension
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
+
var sn = new SimpleName (lt.Value, (int) $2, lt.Location);
$$ = sn;
lbag.AddLocation (sn.TypeArguments, Lexer.GetGenericDimensionLocations ());
}
| qualified_alias_member identifier_inside_body generic_dimension
{
- var lt1 = (Tokenizer.LocatedToken) $1;
- var lt2 = (Tokenizer.LocatedToken) $2;
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
+
var qam = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) $3, lt1.Location);
$$ = qam;
lbag.AddLocation (qam.TypeArguments, Lexer.GetGenericDimensionLocations ());
@@ -3873,20 +3874,18 @@ unbound_type_name
}
| unbound_type_name DOT identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
- $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location);
+ lbag.AddLocation ($$, savedLocation, GetLocation ($2));
}
| unbound_type_name DOT identifier_inside_body generic_dimension
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
- var ma = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var ma = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location);
$$ = ma;
+ lbag.AddLocation ($$, savedLocation, GetLocation ($2));
lbag.AddLocation (ma.TypeArguments, Lexer.GetGenericDimensionLocations ());
}
| namespace_or_type_expr DOT identifier_inside_body generic_dimension
@@ -3895,10 +3894,8 @@ unbound_type_name
if (tne.HasTypeArguments)
Error_TypeExpected (GetLocation ($4));
- var lt = (Tokenizer.LocatedToken) $3;
- var ma = new MemberAccess (tne, lt.Value, (int) $4, lt.Location) {
- DotLocation = GetLocation ($2)
- };
+ var lt = (LocatedToken) $3;
+ var ma = new MemberAccess (tne, lt.Value, (int) $4, lt.Location);
$$ = ma;
lbag.AddLocation (ma.TypeArguments, Lexer.GetGenericDimensionLocations ());
}
@@ -3917,7 +3914,7 @@ generic_dimension
qualified_alias_member
: IDENTIFIER DOUBLE_COLON
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
if (lang_version == LanguageVersion.ISO_1)
FeatureIsNotAvailable (lt.Location, "namespace alias qualifier");
savedLocation = GetLocation ($2);
@@ -3971,7 +3968,7 @@ unchecked_expression
pointer_member_access
: primary_expression OP_PTR IDENTIFIER opt_type_argument_list
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
$$ = new MemberAccess (new Indirection ((Expression) $1, GetLocation ($2)), lt.Value, (TypeArguments) $4, lt.Location);
}
;
@@ -4063,6 +4060,9 @@ unary_expression
} else if (current_anonymous_method is AnonymousMethodExpression) {
report.Error (4035, GetLocation ($1),
"The `await' operator can only be used when its containing anonymous method is marked with the `async' modifier");
+ } else if (interactive_async != null) {
+ current_block.Explicit.RegisterAsyncAwait ();
+ interactive_async = true;
} else {
report.Error (4033, GetLocation ($1),
"The `await' operator can only be used when its containing method is marked with the `async' modifier");
@@ -4570,24 +4570,24 @@ lambda_parameter_list
lambda_parameter
: parameter_modifier parameter_type identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
$$ = new Parameter ((FullNamedExpression) $2, lt.Value, (Parameter.Modifier) $1, null, lt.Location);
}
| parameter_type identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new Parameter ((FullNamedExpression) $1, lt.Value, Parameter.Modifier.NONE, null, lt.Location);
}
| IDENTIFIER
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
$$ = new ImplicitLambdaParameter (lt.Value, lt.Location);
}
| AWAIT
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier ($1);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier ($1);
$$ = new ImplicitLambdaParameter (lt.Value, lt.Location);
}
;
@@ -4637,7 +4637,7 @@ expression_or_error
lambda_expression
: IDENTIFIER ARROW
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), false, lt.Location);
}
@@ -4648,7 +4648,7 @@ lambda_expression
}
| AWAIT ARROW
{
- var lt = (Tokenizer.LocatedToken) Error_AwaitAsIdentifier ($1);
+ var lt = (LocatedToken) Error_AwaitAsIdentifier ($1);
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), false, lt.Location);
}
@@ -4659,7 +4659,7 @@ lambda_expression
}
| ASYNC identifier_inside_body ARROW
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
start_anonymous (true, new ParametersCompiled (p), true, lt.Location);
}
@@ -4923,14 +4923,14 @@ opt_class_base
: /* empty */
| COLON type_list
{
- current_type.AddBasesForPart ((List<FullNamedExpression>) $2);
+ current_type.SetBaseTypes ((List<FullNamedExpression>) $2);
lbag.AppendToMember (current_type, GetLocation ($1));
}
| COLON type_list error
{
Error_SyntaxError (yyToken);
- current_type.AddBasesForPart ((List<FullNamedExpression>) $2);
+ current_type.SetBaseTypes ((List<FullNamedExpression>) $2);
}
;
@@ -4970,7 +4970,7 @@ type_parameter_constraints_clauses
type_parameter_constraints_clause
: WHERE IDENTIFIER COLON type_parameter_constraints
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List<FullNamedExpression>) $4, GetLocation ($1));
lbag.AddLocation ($$, GetLocation ($3));
}
@@ -4978,7 +4978,7 @@ type_parameter_constraints_clause
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new Constraints (new SimpleMemberName (lt.Value, lt.Location), null, GetLocation ($1));
}
;
@@ -5160,7 +5160,7 @@ statement
| IDENTIFIER error
{
Error_SyntaxError (yyToken);
- var lt =(Tokenizer.LocatedToken) $1;
+ var lt =(LocatedToken) $1;
var sn = new SimpleName (lt.Value, lt.Location);
current_block.AddStatement(new StatementErrorExpression (sn));
$$ = null;
@@ -5258,7 +5258,7 @@ empty_statement
labeled_statement
: identifier_inside_body COLON
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location);
lbag.AddLocation (labeled, GetLocation ($2));
current_block.AddLabel (labeled);
@@ -5375,10 +5375,10 @@ identifier_inside_body
block_variable_declaration
: variable_type identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var li = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockVariableDeclaration ((FullNamedExpression) $1, li);
+ current_variable = new BlockVariable ((FullNamedExpression) $1, li);
}
opt_local_variable_initializer opt_variable_declarators semicolon_or_handle_error_close_brace
{
@@ -5391,10 +5391,10 @@ block_variable_declaration
}
| CONST variable_type identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockConstantDeclaration ((FullNamedExpression) $2, li);
+ current_variable = new BlockConstant ((FullNamedExpression) $2, li);
}
const_variable_initializer opt_const_declarators SEMICOLON
{
@@ -5461,18 +5461,18 @@ variable_declarators
variable_declarator
: COMMA identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, null);
+ var d = new BlockVariableDeclarator (li, null);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation ($1));
}
| COMMA identifier_inside_body ASSIGN block_variable_initializer
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, (Expression) $4);
+ var d = new BlockVariableDeclarator (li, (Expression) $4);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation ($1), GetLocation ($3));
@@ -5504,9 +5504,9 @@ const_declarators
const_declarator
: COMMA identifier_inside_body ASSIGN constant_initializer_expr
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
- var d = new BlockVariableDeclaration.Declarator (li, (Expression) $4);
+ var d = new BlockVariableDeclarator (li, (Expression) $4);
current_variable.AddDeclarator (d);
current_block.AddLocalName (li);
lbag.AddLocation (d, GetLocation ($1), GetLocation ($3));
@@ -5557,7 +5557,6 @@ statement_expression
ExpressionStatement s = $1 as ExpressionStatement;
if (s == null) {
var expr = $1 as Expression;
- expr.Error_InvalidExpressionStatement (report);
$$ = new StatementErrorExpression (expr);
} else {
$$ = new StatementExpression (s);
@@ -5569,10 +5568,7 @@ interactive_statement_expression
: expression
{
Expression expr = (Expression) $1;
- ExpressionStatement s;
-
- s = new OptionalAssign (new SimpleName ("$retval", lexer.Location), expr, lexer.Location);
- $$ = new StatementExpression (s);
+ $$ = new StatementExpression (new OptionalAssign (expr, lexer.Location));
}
| error
{
@@ -5822,10 +5818,10 @@ opt_for_initializer
for_initializer
: variable_type identifier_inside_body
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var li = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (li);
- current_variable = new BlockVariableDeclaration ((FullNamedExpression) $1, li);
+ current_variable = new BlockVariable ((FullNamedExpression) $1, li);
}
opt_local_variable_initializer opt_variable_declarators
{
@@ -5891,7 +5887,7 @@ foreach_statement
start_block (GetLocation ($2));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
@@ -5905,7 +5901,8 @@ foreach_statement
{
start_block (GetLocation ($2));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) $4;
+
+ var lt = (LocatedToken) $4;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
$$ = li;
@@ -5925,7 +5922,7 @@ foreach_statement
{
start_block (GetLocation ($2));
current_block.IsCompilerGenerated = true;
- var lt = $4 as Tokenizer.LocatedToken;
+ var lt = $4 as LocatedToken;
var li = lt != null ? new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location) : null;
Foreach f = new Foreach ((Expression) $3, li, null, null, null, GetLocation ($1));
@@ -5977,7 +5974,7 @@ continue_statement
goto_statement
: GOTO identifier_inside_body SEMICOLON
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
$$ = new Goto (lt.Value, GetLocation ($1));
lbag.AddStatement ($$, GetLocation ($2), GetLocation ($3));
}
@@ -6017,6 +6014,11 @@ throw_statement
$$ = new Throw ((Expression) $2, GetLocation ($1));
lbag.AddStatement ($$, GetLocation ($3));
}
+ | THROW expression error
+ {
+ Error_SyntaxError (yyToken);
+ $$ = new Throw ((Expression) $2, GetLocation ($1));
+ }
| THROW error
{
Error_SyntaxError (yyToken);
@@ -6027,7 +6029,7 @@ throw_statement
yield_statement
: identifier_inside_body RETURN opt_expression SEMICOLON
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -6045,7 +6047,7 @@ yield_statement
{
Error_SyntaxError (yyToken);
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -6061,7 +6063,7 @@ yield_statement
}
| identifier_inside_body BREAK SEMICOLON
{
- var lt = (Tokenizer.LocatedToken) $1;
+ var lt = (LocatedToken) $1;
string s = lt.Value;
if (s != "yield"){
report.Error (1003, lt.Location, "; expected");
@@ -6069,7 +6071,7 @@ yield_statement
FeatureIsNotAvailable (lt.Location, "iterators");
}
- current_block.Explicit.RegisterIteratorYield ();
+ current_block.ParametersBlock.TopBlock.IsIterator = true;
$$ = new YieldBreak (lt.Location);
lbag.AddStatement ($$, GetLocation ($2), GetLocation ($3));
}
@@ -6141,7 +6143,7 @@ catch_clause
c.TypeExpression = (FullNamedExpression) $3;
if ($4 != null) {
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
current_block.AddLocalName (c.Variable);
}
@@ -6174,12 +6176,12 @@ catch_clause
c.TypeExpression = (FullNamedExpression) $3;
if ($4 != null) {
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
}
if ($4 != null) {
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
}
@@ -6237,7 +6239,7 @@ fixed_statement
start_block (GetLocation ($2));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.FixedVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) $3, li);
@@ -6265,7 +6267,7 @@ using_statement
start_block (GetLocation ($2));
current_block.IsCompilerGenerated = true;
- var lt = (Tokenizer.LocatedToken) $4;
+ var lt = (LocatedToken) $4;
var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.UsingVariable | LocalVariable.Flags.Used, lt.Location);
current_block.AddLocalName (li);
current_variable = new Using.VariableDeclaration ((FullNamedExpression) $3, li);
@@ -6371,7 +6373,7 @@ first_from_clause
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1));
lbag.AddLocation (start, GetLocation ($3));
@@ -6381,7 +6383,7 @@ first_from_clause
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
IdentifierType = (FullNamedExpression)$2
@@ -6396,7 +6398,7 @@ nested_from_clause
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1));
lbag.AddLocation (start, GetLocation ($3));
@@ -6406,7 +6408,7 @@ nested_from_clause
{
current_block = new Linq.QueryBlock (current_block, lexer.Location);
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
var start = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
IdentifierType = (FullNamedExpression)$2
@@ -6423,7 +6425,7 @@ from_clause
}
expression_or_error
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
$$ = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)$5, GetLocation ($1));
@@ -6439,7 +6441,7 @@ from_clause
}
expression_or_error
{
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
$$ = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)$6, GetLocation ($1)) {
@@ -6571,7 +6573,7 @@ let_clause
}
expression_or_error
{
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
$$ = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)$5, GetLocation ($1));
lbag.AddLocation ($$, GetLocation ($3));
@@ -6630,7 +6632,7 @@ join_clause
var outer_selector = linq_clause_blocks.Pop ();
var block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
Linq.RangeVariable into;
@@ -6650,7 +6652,7 @@ join_clause
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
- lt = (Tokenizer.LocatedToken) $12;
+ lt = (LocatedToken) $12;
into = new Linq.RangeVariable (lt.Value, lt.Location);
$$ = new Linq.GroupJoin (block, sn, (Expression)$5, outer_selector, (Linq.QueryBlock) current_block, into, GetLocation ($1));
@@ -6692,7 +6694,7 @@ join_clause
var outer_selector = linq_clause_blocks.Pop ();
var block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
var sn = new Linq.RangeVariable (lt.Value, lt.Location);
Linq.RangeVariable into;
@@ -6714,7 +6716,7 @@ join_clause
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
- lt = (Tokenizer.LocatedToken) $13;
+ lt = (LocatedToken) $13;
into = new Linq.RangeVariable (lt.Value, lt.Location); // TODO:
$$ = new Linq.GroupJoin (block, sn, (Expression)$6, outer_selector, (Linq.QueryBlock) current_block, into, GetLocation ($1)) {
@@ -6840,7 +6842,7 @@ opt_query_continuation
query_body
{
var current_block = linq_clause_blocks.Pop ();
- var lt = (Tokenizer.LocatedToken) $2;
+ var lt = (LocatedToken) $2;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
$$ = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, null, rv, GetLocation ($1)) {
next = (Linq.AQueryClause)$4
@@ -6878,27 +6880,30 @@ interactive_parsing
mods |= Modifiers.UNSAFE;
current_local_parameters = pars;
- Method method = new Method (
+ var method = new InteractiveMethod (
current_type,
new TypeExpression (compiler.BuiltinTypes.Void, Location.Null),
mods,
- new MemberName ("Host"),
- pars,
- null /* attributes */);
+ pars);
current_type.AddMember (method);
-
oob_stack.Push (method);
+
+ interactive_async = false;
+
++lexer.parsing_block;
start_block (lexer.Location);
}
interactive_statement_list opt_COMPLETE_COMPLETION
{
--lexer.parsing_block;
- Method method = (Method) oob_stack.Pop ();
-
+ var method = (InteractiveMethod) oob_stack.Pop ();
method.Block = (ToplevelBlock) end_block(lexer.Location);
+ if (interactive_async == true) {
+ method.ChangeToAsync ();
+ }
+
InteractiveResult = (Class) pop_current_class ();
current_local_parameters = null;
}
@@ -6945,7 +6950,7 @@ doc_cref
{
module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)$1;
module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)$4;
- var lt = (Tokenizer.LocatedToken) $3;
+ var lt = (LocatedToken) $3;
$$ = new MemberName (lt.Value);
}
| doc_type_declaration_name DOT THIS
@@ -7107,7 +7112,7 @@ object Error_AwaitAsIdentifier (object token)
{
if (async_block) {
report.Error (4003, GetLocation (token), "`await' cannot be used as an identifier within an async method or lambda expression");
- return new Tokenizer.LocatedToken ("await", GetLocation (token));
+ return new LocatedToken ("await", GetLocation (token));
}
return token;
@@ -7301,7 +7306,7 @@ void FeatureIsNotAvailable (Location loc, string feature)
Location GetLocation (object obj)
{
- var lt = obj as Tokenizer.LocatedToken;
+ var lt = obj as LocatedToken;
if (lt != null)
return lt.Location;
@@ -7379,7 +7384,7 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block)
retval = current_anonymous_method;
async_block = (bool) oob_stack.Pop ();
- current_variable = (BlockVariableDeclaration) oob_stack.Pop ();
+ current_variable = (BlockVariable) oob_stack.Pop ();
current_local_parameters = (ParametersCompiled) oob_stack.Pop ();
current_anonymous_method = (AnonymousMethodExpression) oob_stack.Pop ();
@@ -7488,7 +7493,7 @@ string GetSymbolName (int token)
case Token.LITERAL:
return ((Constant)lexer.Value).GetValue ().ToString ();
case Token.IDENTIFIER:
- return ((Tokenizer.LocatedToken)lexer.Value).Value;
+ return ((LocatedToken)lexer.Value).Value;
case Token.BOOL:
return "bool";
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs
index 3b3bce3..0f90730 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs
@@ -20,6 +20,44 @@ using System.Collections;
namespace Mono.CSharp
{
+ //
+ // This class has to be used by parser only, it reuses token
+ // details once a file is parsed
+ //
+ public class LocatedToken
+ {
+ public int row, column;
+ public string value;
+ public SourceFile file;
+
+ public LocatedToken ()
+ {
+ }
+
+ public LocatedToken (string value, Location loc)
+ {
+ this.value = value;
+ file = loc.SourceFile;
+ row = loc.Row;
+ column = loc.Column;
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("Token '{0}' at {1},{2}", Value, row, column);
+ }
+
+ public Location Location
+ {
+ get { return new Location (file, row, column); }
+ }
+
+ public string Value
+ {
+ get { return value; }
+ }
+ }
+
/// <summary>
/// Tokenizer for C# source code.
/// </summary>
@@ -66,42 +104,6 @@ namespace Mono.CSharp
}
}
- //
- // This class has to be used by parser only, it reuses token
- // details after each file parse completion
- //
- public class LocatedToken
- {
- public int row, column;
- public string value;
- public SourceFile file;
-
- public LocatedToken ()
- {
- }
-
- public LocatedToken (string value, Location loc)
- {
- this.value = value;
- file = loc.SourceFile;
- row = loc.Row;
- column = loc.Column;
- }
-
- public override string ToString ()
- {
- return string.Format ("Token '{0}' at {1},{2}", Value, row, column);
- }
-
- public Location Location {
- get { return new Location (file, row, column); }
- }
-
- public string Value {
- get { return value; }
- }
- }
-
public class LocatedTokenBuffer
{
readonly LocatedToken[] buffer;
@@ -247,6 +249,9 @@ namespace Mono.CSharp
public const int EvalCompilationUnitParserCharacter = 0x100001;
public const int EvalUsingDeclarationsParserCharacter = 0x100002;
public const int DocumentationXref = 0x100003;
+
+ const int UnicodeLS = 0x2028;
+ const int UnicodePS = 0x2029;
//
// XML documentation buffer. The save point is used to divide
@@ -1826,20 +1831,27 @@ namespace Mono.CSharp
x = reader.Read ();
}
- if (x == '\r') {
- if (peek_char () == '\n') {
- putback_char = -1;
- advance_line (SpecialsBag.NewLine.Windows);
- } else {
+ if (x <= 13) {
+ if (x == '\r') {
+ if (peek_char () == '\n') {
+ putback_char = -1;
+ advance_line (SpecialsBag.NewLine.Windows);
+ } else {
+ advance_line (SpecialsBag.NewLine.Unix);
+ }
+
+ x = '\n';
+ } else if (x == '\n') {
advance_line (SpecialsBag.NewLine.Unix);
+ } else {
+ col++;
}
- x = '\n';
- } else if (x == '\n') {
+ } else if (x >= UnicodeLS && x <= UnicodePS) {
advance_line (SpecialsBag.NewLine.Unix);
-
} else {
col++;
}
+
return x;
}
@@ -1875,7 +1887,7 @@ namespace Mono.CSharp
throw new InternalErrorException (string.Format ("Secondary putback [{0}] putting back [{1}] is not allowed", (char)putback_char, (char) c), Location);
}
- if (c == '\n' || col == 0) {
+ if (c == '\n' || col == 0 || (c >= UnicodeLS && c <= UnicodePS)) {
// It won't happen though.
line--;
ref_line--;
@@ -1968,9 +1980,8 @@ namespace Mono.CSharp
c = get_char ();
}
int has_identifier_argument = (int)(cmd & PreprocessorDirective.RequiresArgument);
-
int pos = 0;
- while (c != -1 && c != '\n' && c != '\r') {
+ while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
if (c == '\\' && has_identifier_argument >= 0) {
if (has_identifier_argument != 0) {
has_identifier_argument = 1;
@@ -1997,10 +2008,7 @@ namespace Mono.CSharp
// Eat single-line comments
//
get_char ();
- do {
- c = get_char ();
- } while (c != -1 && c != '\n');
-
+ ReadToEndOfLine ();
break;
}
@@ -2035,6 +2043,9 @@ namespace Mono.CSharp
bool PreProcessLine ()
{
Location loc = Location;
+ #if FULL_AST
+ var lineDirective = sbag.GetCurrentLineProcessorDirective();
+ #endif
int c;
@@ -2067,10 +2078,7 @@ namespace Mono.CSharp
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
-
+ ReadToEndOfLine ();
return false;
}
@@ -2079,12 +2087,12 @@ namespace Mono.CSharp
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
-
+ ReadToEndOfLine ();
return new_line != 0;
}
+ #if FULL_AST
+ lineDirective.LineNumber = new_line;
+ #endif
c = get_char ();
if (c == ' ') {
@@ -2096,13 +2104,11 @@ namespace Mono.CSharp
c = 0;
}
- if (c != '\n' && c != '/' && c != '"') {
+ if (c != '\n' && c != '/' && c != '"' && c != UnicodeLS && c != UnicodePS) {
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
+ ReadToEndOfLine ();
Report.Error (1578, loc, "Filename, single-line comment or end-of-line expected");
return true;
@@ -2111,6 +2117,9 @@ namespace Mono.CSharp
string new_file_name = null;
if (c == '"') {
new_file_name = TokenizeFileName (ref c);
+ #if FULL_AST
+ lineDirective.FileName = new_file_name;
+ #endif
// skip over white space
while (c == ' ' || c == '\t') {
@@ -2118,16 +2127,15 @@ namespace Mono.CSharp
}
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
+
} else if (c == '/') {
ReadSingleLineComment ();
} else {
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
+ ReadToEndOfLine ();
Error_EndLineExpected ();
return true;
@@ -2362,7 +2370,7 @@ namespace Mono.CSharp
string TokenizeFileName (ref int c)
{
var string_builder = new StringBuilder ();
- while (c != -1 && c != '\n') {
+ while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
c = get_char ();
if (c == '"') {
c = get_char ();
@@ -2410,16 +2418,21 @@ namespace Mono.CSharp
Report.Warning (1692, 1, Location, "Invalid number");
// Read everything till the end of the line or file
- do {
- c = get_char ();
- } while (c != -1 && c != '\n');
+ ReadToEndOfLine ();
}
}
return number;
}
-
-
+
+ void ReadToEndOfLine ()
+ {
+ int c;
+ do {
+ c = get_char ();
+ } while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS);
+ }
+
void ReadSingleLineComment ()
{
if (peek_char () != '/')
@@ -2433,9 +2446,9 @@ namespace Mono.CSharp
if (position_stack.Count == 0)
sbag.PushCommentChar (c);
var pc = peek_char ();
- if ((pc == '\n' || pc == -1) && position_stack.Count == 0)
+ if ((pc == '\n' || pc == -1 || pc == UnicodeLS || pc == UnicodePS) && position_stack.Count == 0)
sbag.EndComment (line, col + 1);
- } while (c != -1 && c != '\n');
+ } while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS);
}
/// <summary>
@@ -2454,6 +2467,9 @@ namespace Mono.CSharp
//
if (length == pragma_warning_disable.Length) {
bool disable = IsTokenIdentifierEqual (pragma_warning_disable);
+ #if FULL_AST
+ var pragmaDirective = sbag.SetPragmaDisable (disable);
+ #endif
if (disable || IsTokenIdentifierEqual (pragma_warning_restore)) {
// skip over white space
while (c == ' ' || c == '\t')
@@ -2461,7 +2477,7 @@ namespace Mono.CSharp
var loc = Location;
- if (c == '\n' || c == '/') {
+ if (c == '\n' || c == '/' || c == UnicodeLS || c == UnicodePS) {
if (c == '/')
ReadSingleLineComment ();
@@ -2481,13 +2497,16 @@ namespace Mono.CSharp
do {
code = TokenizePragmaNumber (ref c);
if (code > 0) {
+ #if FULL_AST
+ pragmaDirective.Codes.Add (code);
+ #endif
if (disable) {
Report.RegisterWarningRegion (loc).WarningDisable (loc, code, context.Report);
} else {
Report.RegisterWarningRegion (loc).WarningEnable (loc, code, context);
}
}
- } while (code >= 0 && c != '\n' && c != -1);
+ } while (code >= 0 && c != '\n' && c != -1 && c != UnicodeLS && c != UnicodePS);
}
return;
@@ -2497,8 +2516,7 @@ namespace Mono.CSharp
Report.Warning (1634, 1, Location, "Expected disable or restore");
// Eat any remaining characters on the line
- while (c != '\n' && c != -1)
- c = get_char ();
+ ReadToEndOfLine ();
return;
}
@@ -2819,6 +2837,7 @@ namespace Mono.CSharp
}
if ((state & TAKING) != 0) {
+ sbag.SkipIf ();
ifstack.Push (0);
return false;
}
@@ -2828,6 +2847,7 @@ namespace Mono.CSharp
return true;
}
+ sbag.SkipIf ();
ifstack.Push (state);
return false;
}
@@ -2981,7 +3001,7 @@ namespace Mono.CSharp
return Token.LITERAL;
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
if (!quoted) {
Report.Error (1010, Location, "Newline in constant");
@@ -3221,6 +3241,8 @@ namespace Mono.CSharp
case '\v':
case '\r':
case '\n':
+ case UnicodeLS:
+ case UnicodePS:
case '/':
next = peek_token ();
if (next == Token.COMMA || next == Token.CLOSE_BRACKET)
@@ -3251,6 +3273,7 @@ namespace Mono.CSharp
case Token.FOREACH:
case Token.TYPEOF:
case Token.WHILE:
+ case Token.SWITCH:
case Token.USING:
case Token.DEFAULT:
case Token.DELEGATE:
@@ -3447,7 +3470,7 @@ namespace Mono.CSharp
d = peek_char ();
int endLine = line, endCol = col;
- while ((d = get_char ()) != -1 && (d != '\n') && d != '\r') {
+ while ((d = get_char ()) != -1 && (d != '\n') && d != '\r' && d != UnicodePS && d != UnicodeLS) {
if (position_stack.Count == 0)
sbag.PushCommentChar (d);
endLine = line;
@@ -3455,7 +3478,6 @@ namespace Mono.CSharp
}
if (position_stack.Count == 0)
sbag.EndComment (endLine, endCol + 1);
-
any_token_seen |= tokens_seen;
tokens_seen = false;
comments_seen = false;
@@ -3510,7 +3532,7 @@ namespace Mono.CSharp
if (docAppend)
xml_comment_buffer.Append ((char) d);
- if (d == '\n'){
+ if (d == '\n' || d == UnicodeLS || d == UnicodePS){
any_token_seen |= tokens_seen;
tokens_seen = false;
//
@@ -3561,6 +3583,8 @@ namespace Mono.CSharp
return is_number (c, false);
case '\n': // white space
+ case UnicodeLS:
+ case UnicodePS:
any_token_seen |= tokens_seen;
tokens_seen = false;
comments_seen = false;
@@ -3599,7 +3623,7 @@ namespace Mono.CSharp
continue;
}
- if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' ) {
+ if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' || c == UnicodeLS || c == UnicodePS) {
sbag.PushCommentChar (c);
continue;
}
@@ -3607,6 +3631,7 @@ namespace Mono.CSharp
if (c == '#') {
if (ParsePreprocessingDirective (false))
break;
+ sbag.StartComment(SpecialsBag.CommentType.InactiveCode, false, line, 1);
}
sbag.PushCommentChar (c);
directive_expected = false;
@@ -3687,7 +3712,7 @@ namespace Mono.CSharp
return Token.LITERAL;
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
Report.Error (1010, start_location, "Newline in constant");
return Token.ERROR;
}
@@ -3708,7 +3733,7 @@ namespace Mono.CSharp
// Try to recover, read until newline or next "'"
while ((c = get_char ()) != -1) {
- if (c == '\n' || c == '\'')
+ if (c == '\n' || c == '\'' || c == UnicodeLS || c == UnicodePS)
break;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs
index a3c0c8c..e7f27aa 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs
@@ -53,12 +53,6 @@ namespace Mono.CSharp {
: this (name, Location.Null)
{ }
-#if FULL_AST
- public Location DotLocation {
- get;
- set;
- }
-#endif
public MemberName (string name, Location loc)
: this (null, name, loc)
{ }
@@ -1281,6 +1275,11 @@ namespace Mono.CSharp {
void SetIsUsed ();
}
+ public interface IMethodDefinition : IMemberDefinition
+ {
+ MethodBase Metadata { get; }
+ }
+
public interface IParametersMember : IInterfaceMemberSpec
{
AParametersCollection Parameters { get; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs
index 73121aa..ca6327d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs
@@ -153,7 +153,7 @@ namespace Mono.CSharp {
Report.SymbolRelatedToPreviousError (partype);
Report.Error (59, Location,
"Inconsistent accessibility: parameter type `{0}' is less accessible than delegate `{1}'",
- TypeManager.CSharpName (partype), GetSignatureForError ());
+ partype.GetSignatureForError (), GetSignatureForError ());
}
}
@@ -169,7 +169,7 @@ namespace Mono.CSharp {
Report.SymbolRelatedToPreviousError (ret_type);
Report.Error (58, Location,
"Inconsistent accessibility: return type `" +
- TypeManager.CSharpName (ret_type) + "' is less " +
+ ret_type.GetSignatureForError () + "' is less " +
"accessible than delegate `" + GetSignatureForError () + "'");
return false;
}
@@ -297,6 +297,12 @@ namespace Mono.CSharp {
if (!Parameters.IsEmpty) {
parameters.ResolveDefaultValues (this);
}
+
+ InvokeBuilder.PrepareEmit ();
+ if (BeginInvokeBuilder != null) {
+ BeginInvokeBuilder.PrepareEmit ();
+ EndInvokeBuilder.PrepareEmit ();
+ }
}
public override void Emit ()
@@ -522,7 +528,7 @@ namespace Mono.CSharp {
TypeSpec e_type = emg.ExtensionExpression.Type;
if (TypeSpec.IsValueType (e_type)) {
ec.Report.Error (1113, loc, "Extension method `{0}' of value type `{1}' cannot be used to create delegates",
- delegate_method.GetSignatureForError (), TypeManager.CSharpName (e_type));
+ delegate_method.GetSignatureForError (), e_type.GetSignatureForError ());
}
}
@@ -586,8 +592,8 @@ namespace Mono.CSharp {
ec.Report.SymbolRelatedToPreviousError (method);
if (ec.Module.Compiler.Settings.Version == LanguageVersion.ISO_1) {
ec.Report.Error (410, loc, "A method or delegate `{0} {1}' parameters and return type must be same as delegate `{2} {3}' parameters and return type",
- TypeManager.CSharpName (method.ReturnType), member_name,
- TypeManager.CSharpName (invoke_method.ReturnType), Delegate.FullDelegateDesc (invoke_method));
+ method.ReturnType.GetSignatureForError (), member_name,
+ invoke_method.ReturnType.GetSignatureForError (), Delegate.FullDelegateDesc (invoke_method));
return;
}
@@ -599,7 +605,7 @@ namespace Mono.CSharp {
ec.Report.Error (407, loc, "A method or delegate `{0} {1}' return type does not match delegate `{2} {3}' return type",
return_type.GetSignatureForError (), member_name,
- TypeManager.CSharpName (invoke_method.ReturnType), Delegate.FullDelegateDesc (invoke_method));
+ invoke_method.ReturnType.GetSignatureForError (), Delegate.FullDelegateDesc (invoke_method));
}
public static bool ImplicitStandardConversionExists (ResolveContext ec, MethodGroupExpr mg, TypeSpec target_type)
@@ -657,7 +663,7 @@ namespace Mono.CSharp {
//
// Returns true when type is MVAR or has MVAR reference
//
- static bool ContainsMethodTypeParameter (TypeSpec type)
+ public static bool ContainsMethodTypeParameter (TypeSpec type)
{
var tps = type as TypeParameterSpec;
if (tps != null)
@@ -851,7 +857,7 @@ namespace Mono.CSharp {
//
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpr;
- call.EmitPredefined (ec, method, arguments);
+ call.EmitPredefined (ec, method, arguments, loc);
}
public override void EmitStatement (EmitContext ec)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs
index 9b78625..6d9f4c0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/driver.cs
@@ -80,7 +80,7 @@ namespace Mono.CSharp
var session = new ParserSession () {
UseJayGlobalArrays = true,
- LocatedTokens = new Tokenizer.LocatedToken[15000]
+ LocatedTokens = new LocatedToken[15000]
};
for (int i = 0; i < sources.Count; ++i) {
@@ -419,7 +419,7 @@ namespace Mono.CSharp
public ModuleContainer ModuleCompiled { get; set; }
public LocationsBag LocationsBag { get; set; }
public SpecialsBag SpecialsBag { get; set; }
- public IEnumerable<string> Conditionals { get; set; }
+ public IDictionary<string, bool> Conditionals { get; set; }
public object LastYYValue { get; set; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs
index b9d6967..0246c43 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs
@@ -447,6 +447,7 @@ namespace Mono.CSharp
d.CreateContainer ();
d.DefineContainer ();
d.Define ();
+ d.PrepareEmit ();
site.AddTypeContainer (d);
del_type = new TypeExpression (d.CurrentType, loc);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs
index d9a5ac3..6fde26f 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs
@@ -251,7 +251,7 @@ namespace Mono.CSharp {
public void Error_ConstantCanBeInitializedWithNullOnly (ResolveContext rc, TypeSpec type, Location loc, string name)
{
rc.Report.Error (134, loc, "A constant `{0}' of reference type `{1}' can only be initialized with null",
- name, TypeManager.CSharpName (type));
+ name, type.GetSignatureForError ());
}
protected virtual void Error_InvalidExpressionStatement (Report report, Location loc)
@@ -282,7 +282,10 @@ namespace Mono.CSharp {
protected void Error_ValueCannotBeConvertedCore (ResolveContext ec, Location loc, TypeSpec target, bool expl)
{
// The error was already reported as CS1660
- if (type == InternalType.AnonymousMethod || type == InternalType.ErrorType)
+ if (type == InternalType.AnonymousMethod)
+ return;
+
+ if (type == InternalType.ErrorType || target == InternalType.ErrorType)
return;
string from_type = type.GetSignatureForError ();
@@ -351,13 +354,15 @@ namespace Mono.CSharp {
{
ec.Report.SymbolRelatedToPreviousError (type);
ec.Report.Error (117, loc, "`{0}' does not contain a definition for `{1}'",
- TypeManager.CSharpName (type), name);
+ type.GetSignatureForError (), name);
}
public virtual void Error_ValueAssignment (ResolveContext rc, Expression rhs)
{
if (rhs == EmptyExpression.LValueMemberAccess || rhs == EmptyExpression.LValueMemberOutAccess) {
// Already reported as CS1612
+ } else if (rhs == EmptyExpression.OutAccess) {
+ rc.Report.Error (1510, loc, "A ref or out argument must be an assignable variable");
} else {
rc.Report.Error (131, loc, "The left-hand side of an assignment must be a variable, a property or an indexer");
}
@@ -430,8 +435,14 @@ namespace Mono.CSharp {
/// </remarks>
public Expression Resolve (ResolveContext ec, ResolveFlags flags)
{
- if (eclass != ExprClass.Unresolved)
+ if (eclass != ExprClass.Unresolved) {
+ if ((flags & ExprClassToResolveFlags) == 0) {
+ Error_UnexpectedKind (ec, flags, loc);
+ return null;
+ }
+
return this;
+ }
Expression e;
try {
@@ -492,10 +503,7 @@ namespace Mono.CSharp {
if (e == null) {
if (errors == ec.Report.Errors) {
- if (out_access)
- ec.Report.Error (1510, loc, "A ref or out argument must be an assignable variable");
- else
- Error_ValueAssignment (ec, right_side);
+ Error_ValueAssignment (ec, right_side);
}
return null;
}
@@ -509,6 +517,23 @@ namespace Mono.CSharp {
return e;
}
+ public Constant ResolveLabelConstant (ResolveContext rc)
+ {
+ var expr = Resolve (rc);
+ if (expr == null)
+ return null;
+
+ Constant c = expr as Constant;
+ if (c == null) {
+ if (c.type != InternalType.ErrorType)
+ rc.Report.Error (150, StartLocation, "A constant value is expected");
+
+ return null;
+ }
+
+ return c;
+ }
+
public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
{
rc.Module.Compiler.Report.Error (182, loc,
@@ -759,8 +784,18 @@ namespace Mono.CSharp {
}
if ((restrictions & MemberLookupRestrictions.InvocableOnly) != 0) {
- if (member is MethodSpec)
+ if (member is MethodSpec) {
+ //
+ // Interface members that are hidden by class members are removed from the set. This
+ // step only has an effect if T is a type parameter and T has both an effective base
+ // class other than object and a non-empty effective interface set
+ //
+ var tps = queried_type as TypeParameterSpec;
+ if (tps != null && tps.HasTypeConstraint)
+ members = RemoveHiddenTypeParameterMethods (members);
+
return new MethodGroupExpr (members, queried_type, loc);
+ }
if (!Invocation.IsMemberInvocable (member))
continue;
@@ -815,6 +850,54 @@ namespace Mono.CSharp {
return null;
}
+ static IList<MemberSpec> RemoveHiddenTypeParameterMethods (IList<MemberSpec> members)
+ {
+ if (members.Count < 2)
+ return members;
+
+ //
+ // If M is a method, then all non-method members declared in an interface declaration
+ // are removed from the set, and all methods with the same signature as M declared in
+ // an interface declaration are removed from the set
+ //
+
+ bool copied = false;
+ for (int i = 0; i < members.Count; ++i) {
+ var method = members[i] as MethodSpec;
+ if (method == null) {
+ if (!copied) {
+ copied = true;
+ members = new List<MemberSpec> (members);
+ }
+
+ members.RemoveAt (i--);
+ continue;
+ }
+
+ if (!method.DeclaringType.IsInterface)
+ continue;
+
+ for (int ii = 0; ii < members.Count; ++ii) {
+ var candidate = members[ii] as MethodSpec;
+ if (candidate == null || !candidate.DeclaringType.IsClass)
+ continue;
+
+ if (!TypeSpecComparer.Override.IsEqual (candidate.Parameters, method.Parameters))
+ continue;
+
+ if (!copied) {
+ copied = true;
+ members = new List<MemberSpec> (members);
+ }
+
+ members.RemoveAt (i--);
+ break;
+ }
+ }
+
+ return members;
+ }
+
protected virtual void Error_NegativeArrayIndex (ResolveContext ec, Location loc)
{
throw new NotImplementedException ();
@@ -1251,8 +1334,20 @@ namespace Mono.CSharp {
public static Expression Create (Expression child, TypeSpec type)
{
Constant c = child as Constant;
- if (c != null)
- return new EmptyConstantCast (c, type);
+ if (c != null) {
+ var enum_constant = c as EnumConstant;
+ if (enum_constant != null)
+ c = enum_constant.Child;
+
+ if (!(c is ReducedExpression.ReducedConstantExpression)) {
+ if (c.Type == type)
+ return c;
+
+ var res = c.ConvertImplicitly (type);
+ if (res != null)
+ return res;
+ }
+ }
EmptyCast e = child as EmptyCast;
if (e != null)
@@ -1475,7 +1570,7 @@ namespace Mono.CSharp {
public override string GetSignatureForError()
{
- return TypeManager.CSharpName (Type);
+ return Type.GetSignatureForError ();
}
public override object GetValue ()
@@ -1534,7 +1629,7 @@ namespace Mono.CSharp {
}
}
- public override Constant ConvertExplicitly(bool in_checked_context, TypeSpec target_type)
+ public override Constant ConvertExplicitly (bool in_checked_context, TypeSpec target_type)
{
if (Child.Type == target_type)
return Child;
@@ -1678,7 +1773,11 @@ namespace Mono.CSharp {
public override void Emit (EmitContext ec)
{
base.Emit (ec);
+ Emit (ec, mode);
+ }
+ public static void Emit (EmitContext ec, Mode mode)
+ {
if (ec.HasSet (EmitContext.Options.CheckedScope)) {
switch (mode){
case Mode.I1_U1: ec.Emit (OpCodes.Conv_Ovf_U1); break;
@@ -1947,7 +2046,7 @@ namespace Mono.CSharp {
//
public class ReducedExpression : Expression
{
- sealed class ReducedConstantExpression : EmptyConstantCast
+ public sealed class ReducedConstantExpression : EmptyConstantCast
{
readonly Expression orig_expr;
@@ -2359,7 +2458,7 @@ namespace Mono.CSharp {
protected override Expression DoResolve (ResolveContext rc)
{
- var e = SimpleNameResolve (rc, null, false);
+ var e = SimpleNameResolve (rc, null);
var fe = e as FieldExpr;
if (fe != null) {
@@ -2371,7 +2470,7 @@ namespace Mono.CSharp {
public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
- return SimpleNameResolve (ec, right_side, false);
+ return SimpleNameResolve (ec, right_side);
}
protected virtual void Error_TypeOrNamespaceNotFound (IMemberContext ctx)
@@ -2418,15 +2517,15 @@ namespace Mono.CSharp {
}
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc)
{
- FullNamedExpression fne = ec.LookupNamespaceOrType (Name, Arity, LookupMode.Normal, loc);
+ FullNamedExpression fne = mc.LookupNamespaceOrType (Name, Arity, LookupMode.Normal, loc);
if (fne != null) {
if (fne.Type != null && Arity > 0) {
if (HasTypeArguments) {
GenericTypeExpr ct = new GenericTypeExpr (fne.Type, targs, loc);
- if (ct.ResolveAsType (ec) == null)
+ if (ct.ResolveAsType (mc) == null)
return null;
return ct;
@@ -2442,21 +2541,21 @@ namespace Mono.CSharp {
return fne;
}
- if (Arity == 0 && Name == "dynamic" && ec.Module.Compiler.Settings.Version > LanguageVersion.V_3) {
- if (!ec.Module.PredefinedAttributes.Dynamic.IsDefined) {
- ec.Module.Compiler.Report.Error (1980, Location,
+ if (Arity == 0 && Name == "dynamic" && mc.Module.Compiler.Settings.Version > LanguageVersion.V_3) {
+ if (!mc.Module.PredefinedAttributes.Dynamic.IsDefined) {
+ mc.Module.Compiler.Report.Error (1980, Location,
"Dynamic keyword requires `{0}' to be defined. Are you missing System.Core.dll assembly reference?",
- ec.Module.PredefinedAttributes.Dynamic.GetSignatureForError ());
+ mc.Module.PredefinedAttributes.Dynamic.GetSignatureForError ());
}
fne = new DynamicTypeExpr (loc);
- fne.ResolveAsType (ec);
+ fne.ResolveAsType (mc);
}
if (fne != null)
return fne;
- Error_TypeOrNamespaceNotFound (ec);
+ Error_TypeOrNamespaceNotFound (mc);
return null;
}
@@ -2637,7 +2736,10 @@ namespace Mono.CSharp {
}
if (e is TypeExpr) {
- e.Error_UnexpectedKind (rc, e, "variable", e.ExprClassName, loc);
+ // TypeExpression does not have correct location
+ if (e is TypeExpression)
+ e = new TypeExpression (e.Type, loc);
+
return e;
}
}
@@ -2659,19 +2761,19 @@ namespace Mono.CSharp {
}
}
- Expression SimpleNameResolve (ResolveContext ec, Expression right_side, bool intermediate)
+ Expression SimpleNameResolve (ResolveContext ec, Expression right_side)
{
Expression e = LookupNameExpression (ec, right_side == null ? MemberLookupRestrictions.ReadAccess : MemberLookupRestrictions.None);
if (e == null)
return null;
- if (right_side != null) {
- if (e is FullNamedExpression && e.eclass != ExprClass.Unresolved) {
- e.Error_UnexpectedKind (ec, e, "variable", e.ExprClassName, loc);
- return null;
- }
+ if (e is FullNamedExpression && e.eclass != ExprClass.Unresolved) {
+ e.Error_UnexpectedKind (ec, e, "variable", e.ExprClassName, loc);
+ return e;
+ }
+ if (right_side != null) {
e = e.ResolveLValue (ec, right_side);
} else {
e = e.Resolve (ec);
@@ -3297,8 +3399,12 @@ namespace Mono.CSharp {
if (ExtensionExpression == null)
return null;
+ var cand = candidates;
arguments.Insert (0, new Argument (ExtensionExpression, Argument.AType.ExtensionType));
var res = base.OverloadResolve (ec, ref arguments, ehandler ?? this, restr);
+
+ // Restore candidates in case we are running in probing mode
+ candidates = cand;
// Store resolved argument and restore original arguments
if (res == null) {
@@ -3508,7 +3614,7 @@ namespace Mono.CSharp {
public override void Error_ValueCannotBeConverted (ResolveContext ec, TypeSpec target, bool expl)
{
ec.Report.Error (428, loc, "Cannot convert method group `{0}' to non-delegate type `{1}'. Consider using parentheses to invoke the method",
- Name, TypeManager.CSharpName (target));
+ Name, target.GetSignatureForError ());
}
public static bool IsExtensionMethodArgument (Expression expr)
@@ -3568,7 +3674,7 @@ namespace Mono.CSharp {
InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name);
}
- InstanceExpression.Resolve (ec);
+ InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup | ResolveFlags.Type);
}
}
@@ -3642,7 +3748,7 @@ namespace Mono.CSharp {
//
public virtual MethodGroupExpr LookupExtensionMethod (ResolveContext rc)
{
- if (InstanceExpression == null)
+ if (InstanceExpression == null || InstanceExpression.eclass == ExprClass.Type)
return null;
InstanceExpression = InstanceExpression.Resolve (rc);
@@ -4671,7 +4777,7 @@ namespace Mono.CSharp {
// is used as argument or delegate conversion
//
if (!Convert.ImplicitConversionExists (ec, argument.Expr, parameter)) {
- return 2;
+ return parameter.IsDelegate && argument.Expr is AnonymousMethodExpression ? 2 : 3;
}
}
@@ -5050,14 +5156,14 @@ namespace Mono.CSharp {
string index = (idx + 1).ToString ();
if (((mod & Parameter.Modifier.RefOutMask) ^ (a.Modifier & Parameter.Modifier.RefOutMask)) != 0) {
if ((mod & Parameter.Modifier.RefOutMask) == 0)
- ec.Report.Error (1615, loc, "Argument `#{0}' does not require `{1}' modifier. Consider removing `{1}' modifier",
+ ec.Report.Error (1615, a.Expr.Location, "Argument `#{0}' does not require `{1}' modifier. Consider removing `{1}' modifier",
index, Parameter.GetModifierSignature (a.Modifier));
else
- ec.Report.Error (1620, loc, "Argument `#{0}' is missing `{1}' modifier",
+ ec.Report.Error (1620, a.Expr.Location, "Argument `#{0}' is missing `{1}' modifier",
index, Parameter.GetModifierSignature (mod));
} else {
string p1 = a.GetSignatureForError ();
- string p2 = TypeManager.CSharpName (paramType);
+ string p2 = paramType.GetSignatureForError ();
if (p1 == p2) {
p1 = a.Type.GetSignatureForErrorIncludingAssemblyName ();
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs
index 126d2de..87bbc7a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs
@@ -269,7 +269,7 @@ namespace Mono.CSharp {
case BuiltinTypeSpec.Type.ULong:
case BuiltinTypeSpec.Type.UShort:
Report.Warning (3009, 1, Location, "`{0}': base type `{1}' is not CLS-compliant",
- GetSignatureForError (), TypeManager.CSharpName (UnderlyingType));
+ GetSignatureForError (), UnderlyingType.GetSignatureForError ());
break;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs
index af8841f..6f3ffd7 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs
@@ -129,6 +129,12 @@ namespace Mono.CSharp
}
/// <summary>
+ /// When set evaluator will automatically wait on Task of async methods. When not
+ /// set it's called responsibility to handle Task execution
+ /// </summary>
+ public bool WaitOnTask { get; set; }
+
+ /// <summary>
/// If true, turns type expressions into valid expressions
/// and calls the describe method on it
/// </summary>
@@ -426,7 +432,7 @@ namespace Mono.CSharp
throw new ArgumentException ("Syntax error on input: partial input");
if (result_set == false)
- throw new ArgumentException ("The expression did not set a result");
+ throw new ArgumentException ("The expression failed to resolve");
return result;
}
@@ -652,13 +658,49 @@ namespace Mono.CSharp
new TypeExpression (base_class_imported, host.Location)
};
- host.AddBasesForPart (baseclass_list);
-
- host.CreateContainer ();
- host.DefineContainer ();
- host.Define ();
+ host.SetBaseTypes (baseclass_list);
expression_method = (Method) host.Members[0];
+
+ if ((expression_method.ModFlags & Modifiers.ASYNC) != 0) {
+ //
+ // Host method is async. When WaitOnTask is set we wrap it with wait
+ //
+ // void AsyncWait (ref object $retval) {
+ // $retval = Host();
+ // ((Task)$retval).Wait(); // When WaitOnTask is set
+ // }
+ //
+ var p = new ParametersCompiled (
+ new Parameter (new TypeExpression (module.Compiler.BuiltinTypes.Object, Location.Null), "$retval", Parameter.Modifier.REF, null, Location.Null)
+ );
+
+ var method = new Method(host, new TypeExpression(module.Compiler.BuiltinTypes.Void, Location.Null),
+ Modifiers.PUBLIC | Modifiers.STATIC, new MemberName("AsyncWait"), p, null);
+
+ method.Block = new ToplevelBlock(method.Compiler, p, Location.Null);
+ method.Block.AddStatement(new StatementExpression (new SimpleAssign(
+ new SimpleName(p [0].Name, Location.Null),
+ new Invocation(new SimpleName(expression_method.MemberName.Name, Location.Null), new Arguments(0)),
+ Location.Null), Location.Null));
+
+ if (WaitOnTask) {
+ var task = new Cast (expression_method.TypeExpression, new SimpleName (p [0].Name, Location.Null), Location.Null);
+
+ method.Block.AddStatement (new StatementExpression (new Invocation (
+ new MemberAccess (task, "Wait", Location.Null),
+ new Arguments (0)), Location.Null));
+ }
+
+ host.AddMember(method);
+
+ expression_method = method;
+ }
+
+ host.CreateContainer();
+ host.DefineContainer();
+ host.Define();
+
} else {
expression_method = null;
}
@@ -679,6 +721,7 @@ namespace Mono.CSharp
}
if (host != null){
+ host.PrepareEmit ();
host.EmitContainer ();
}
@@ -1052,6 +1095,27 @@ namespace Mono.CSharp
#endif
}
+ class InteractiveMethod : Method
+ {
+ public InteractiveMethod(TypeDefinition parent, FullNamedExpression returnType, Modifiers mod, ParametersCompiled parameters)
+ : base(parent, returnType, mod, new MemberName("Host"), parameters, null)
+ {
+ }
+
+ public void ChangeToAsync ()
+ {
+ ModFlags |= Modifiers.ASYNC;
+ ModFlags &= ~Modifiers.UNSAFE;
+ type_expr = new TypeExpression(Module.PredefinedTypes.Task.TypeSpec, Location);
+ parameters = ParametersCompiled.EmptyReadOnlyParameters;
+ }
+
+ public override string GetSignatureForError()
+ {
+ return "InteractiveHost";
+ }
+ }
+
class HoistedEvaluatorVariable : HoistedVariable
{
public HoistedEvaluatorVariable (Field field)
@@ -1072,11 +1136,17 @@ namespace Mono.CSharp
/// the return value for an invocation.
/// </summary>
class OptionalAssign : SimpleAssign {
- public OptionalAssign (Expression t, Expression s, Location loc)
- : base (t, s, loc)
+ public OptionalAssign (Expression s, Location loc)
+ : base (null, s, loc)
{
}
+ public override Location StartLocation {
+ get {
+ return Location.Null;
+ }
+ }
+
protected override Expression DoResolve (ResolveContext ec)
{
Expression clone = source.Clone (new CloneContext ());
@@ -1089,7 +1159,7 @@ namespace Mono.CSharp
// A useful feature for the REPL: if we can resolve the expression
// as a type, Describe the type;
//
- if (ec.Module.Evaluator.DescribeTypeExpressions){
+ if (ec.Module.Evaluator.DescribeTypeExpressions && !(ec.CurrentAnonymousMethod is AsyncInitializer)) {
var old_printer = ec.Report.SetPrinter (new SessionReportPrinter ());
Expression tclone;
try {
@@ -1115,8 +1185,29 @@ namespace Mono.CSharp
}
source = clone;
+
+ var host = (Method) ec.MemberContext.CurrentMemberDefinition;
+
+ if (host.ParameterInfo.IsEmpty) {
+ eclass = ExprClass.Value;
+ type = InternalType.FakeInternalType;
+ return this;
+ }
+
+ target = new SimpleName (host.ParameterInfo[0].Name, Location);
+
return base.DoResolve (ec);
}
+
+ public override void EmitStatement(EmitContext ec)
+ {
+ if (target == null) {
+ source.Emit (ec);
+ return;
+ }
+
+ base.EmitStatement(ec);
+ }
}
public class Undo
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs
index 088fda5..b6b2052 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs
@@ -80,7 +80,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
var call = new CallEmitter ();
- call.EmitPredefined (ec, oper, arguments);
+ call.EmitPredefined (ec, oper, arguments, loc);
}
public override SLE.Expression MakeExpression (BuilderContext ctx)
@@ -1437,10 +1437,10 @@ namespace Mono.CSharp
{
if (result)
ec.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type",
- TypeManager.CSharpName (probe_type_expr));
+ probe_type_expr.GetSignatureForError ());
else
ec.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type",
- TypeManager.CSharpName (probe_type_expr));
+ probe_type_expr.GetSignatureForError ());
return ReducedExpression.Create (new BoolConstant (ec.BuiltinTypes, result, loc), this);
}
@@ -1630,7 +1630,7 @@ namespace Mono.CSharp
} else {
ec.Report.Error (77, loc,
"The `as' operator cannot be used with a non-nullable value type `{0}'",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
return null;
}
@@ -1663,7 +1663,7 @@ namespace Mono.CSharp
}
ec.Report.Error (39, loc, "Cannot convert type `{0}' to `{1}' via a built-in conversion",
- TypeManager.CSharpName (etype), TypeManager.CSharpName (type));
+ etype.GetSignatureForError (), type.GetSignatureForError ());
return null;
}
@@ -1702,7 +1702,7 @@ namespace Mono.CSharp
return null;
if (type.IsStatic) {
- ec.Report.Error (716, loc, "Cannot convert to static type `{0}'", TypeManager.CSharpName (type));
+ ec.Report.Error (716, loc, "Cannot convert to static type `{0}'", type.GetSignatureForError ());
return null;
}
@@ -1868,6 +1868,8 @@ namespace Mono.CSharp
{
protected readonly TypeSpec left;
protected readonly TypeSpec right;
+ protected readonly TypeSpec left_unwrap;
+ protected readonly TypeSpec right_unwrap;
public readonly Operator OperatorsMask;
public TypeSpec ReturnType;
@@ -1891,45 +1893,183 @@ namespace Mono.CSharp
if ((op_mask & Operator.ValuesOnlyMask) != 0)
throw new InternalErrorException ("Only masked values can be used");
+ if ((op_mask & Operator.NullableMask) != 0) {
+ left_unwrap = Nullable.NullableInfo.GetUnderlyingType (ltype);
+ right_unwrap = Nullable.NullableInfo.GetUnderlyingType (rtype);
+ } else {
+ left_unwrap = ltype;
+ right_unwrap = rtype;
+ }
+
this.left = ltype;
this.right = rtype;
this.OperatorsMask = op_mask;
this.ReturnType = return_type;
}
- public virtual Expression ConvertResult (ResolveContext ec, Binary b)
+ public bool IsLifted {
+ get {
+ return (OperatorsMask & Operator.NullableMask) != 0;
+ }
+ }
+
+ public virtual Expression ConvertResult (ResolveContext rc, Binary b)
{
+ Constant c;
+
+ var left_expr = b.left;
+ var right_expr = b.right;
+
b.type = ReturnType;
- b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
- b.right = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
+ if (IsLifted) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+ }
+
+ if (right_expr.IsNull) {
+ if ((b.oper & Operator.EqualityMask) != 0) {
+ if (!left_expr.Type.IsNullableType && left_expr.Type == left_unwrap)
+ return b.CreateLiftedValueTypeResult (rc, left_unwrap);
+ } else if ((b.oper & Operator.BitwiseMask) != 0) {
+ if (left_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+ } else {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+ return b.CreateLiftedValueTypeResult (rc, left);
+ }
+ } else if (left_expr.IsNull) {
+ if ((b.oper & Operator.EqualityMask) != 0) {
+ if (!right_expr.Type.IsNullableType && right_expr.Type == right_unwrap)
+ return b.CreateLiftedValueTypeResult (rc, right_unwrap);
+ } else if ((b.oper & Operator.BitwiseMask) != 0) {
+ if (right_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+ } else {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+ return b.CreateLiftedValueTypeResult (rc, right);
+ }
+ }
+ }
//
// A user operators does not support multiple user conversions, but decimal type
// is considered to be predefined type therefore we apply predefined operators rules
// and then look for decimal user-operator implementation
//
- if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal)
- return b.ResolveUserOperator (ec, b.left, b.right);
+ if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ return b.ResolveUserOperator (rc, b.left, b.right);
+ }
- var c = b.right as Constant;
+ c = right_expr as Constant;
if (c != null) {
- if (c.IsDefaultValue && (b.oper == Operator.Addition || b.oper == Operator.Subtraction || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
- return ReducedExpression.Create (b.left, b).Resolve (ec);
+ if (c.IsDefaultValue) {
+ //
+ // Optimizes
+ //
+ // (expr + 0) to expr
+ // (expr - 0) to expr
+ // (bool? | false) to bool?
+ //
+ if (b.oper == Operator.Addition || b.oper == Operator.Subtraction ||
+ (b.oper == Operator.BitwiseOr && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+ }
+ } else {
+ //
+ // Optimizes
+ //
+ // (bool? & true) to bool?
+ //
+ if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+ }
+ }
+
if ((b.oper == Operator.Multiply || b.oper == Operator.Division) && c.IsOneInteger)
- return ReducedExpression.Create (b.left, b).Resolve (ec);
- return b;
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+
+ if ((b.oper & Operator.ShiftMask) != 0 && c is IntConstant) {
+ b.right = new IntConstant (rc.BuiltinTypes, ((IntConstant) c).Value & GetShiftMask (left_unwrap), b.right.Location);
+ }
}
c = b.left as Constant;
if (c != null) {
- if (c.IsDefaultValue && (b.oper == Operator.Addition || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
- return ReducedExpression.Create (b.right, b).Resolve (ec);
+ if (c.IsDefaultValue) {
+ //
+ // Optimizes
+ //
+ // (0 + expr) to expr
+ // (false | bool?) to bool?
+ //
+ if (b.oper == Operator.Addition ||
+ (b.oper == Operator.BitwiseOr && right_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+ } else {
+ //
+ // Optimizes
+ //
+ // (true & bool?) to bool?
+ //
+ if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+ }
+
if (b.oper == Operator.Multiply && c.IsOneInteger)
- return ReducedExpression.Create (b.right, b).Resolve (ec);
- return b;
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+
+ if (IsLifted) {
+ var lifted = new Nullable.LiftedBinaryOperator (b);
+
+ TypeSpec ltype, rtype;
+ if (b.left.Type.IsNullableType) {
+ lifted.UnwrapLeft = new Nullable.Unwrap (b.left);
+ ltype = left_unwrap;
+ } else {
+ ltype = left;
+ }
+
+ if (b.right.Type.IsNullableType) {
+ lifted.UnwrapRight = new Nullable.Unwrap (b.right);
+ rtype = right_unwrap;
+ } else {
+ rtype = right;
+ }
+
+ lifted.Left = b.left.IsNull ?
+ b.left :
+ Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? b.left, ltype, b.left.Location);
+
+ lifted.Right = b.right.IsNull ?
+ b.right :
+ Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? b.right, rtype, b.right.Location);
+
+ return lifted.Resolve (rc);
}
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
return b;
}
@@ -1953,16 +2093,22 @@ namespace Mono.CSharp
public PredefinedOperator ResolveBetterOperator (ResolveContext ec, PredefinedOperator best_operator)
{
+ if ((OperatorsMask & Operator.DecomposedMask) != 0)
+ return best_operator;
+
+ if ((best_operator.OperatorsMask & Operator.DecomposedMask) != 0)
+ return this;
+
int result = 0;
if (left != null && best_operator.left != null) {
- result = OverloadResolver.BetterTypeConversion (ec, best_operator.left, left);
+ result = OverloadResolver.BetterTypeConversion (ec, best_operator.left_unwrap, left_unwrap);
}
//
// When second argument is same as the first one, the result is same
//
if (right != null && (left != right || best_operator.left != best_operator.right)) {
- result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right, right);
+ result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right_unwrap, right_unwrap);
}
if (result == 0 || result > 2)
@@ -2007,44 +2153,6 @@ namespace Mono.CSharp
}
}
- sealed class PredefinedShiftOperator : PredefinedOperator
- {
- public PredefinedShiftOperator (TypeSpec ltype, TypeSpec rtype, Operator op_mask)
- : base (ltype, rtype, op_mask)
- {
- }
-
- public override Expression ConvertResult (ResolveContext ec, Binary b)
- {
- b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
-
- Expression expr_tree_expr = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
-
- int right_mask = left.BuiltinType == BuiltinTypeSpec.Type.Int || left.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
-
- //
- // b = b.left >> b.right & (0x1f|0x3f)
- //
- b.right = new Binary (Operator.BitwiseAnd,
- b.right, new IntConstant (ec.BuiltinTypes, right_mask, b.right.Location)).Resolve (ec);
-
- //
- // Expression tree representation does not use & mask
- //
- b.right = ReducedExpression.Create (b.right, expr_tree_expr).Resolve (ec);
- b.type = ReturnType;
-
- //
- // Optimize shift by 0
- //
- var c = b.right as Constant;
- if (c != null && c.IsDefaultValue)
- return ReducedExpression.Create (b.left, b).Resolve (ec);
-
- return b;
- }
- }
-
sealed class PredefinedEqualityOperator : PredefinedOperator
{
MethodSpec equal_method, inequal_method;
@@ -2198,21 +2306,22 @@ namespace Mono.CSharp
LogicalMask = 1 << 10,
AdditionMask = 1 << 11,
SubtractionMask = 1 << 12,
- RelationalMask = 1 << 13
+ RelationalMask = 1 << 13,
+
+ DecomposedMask = 1 << 19,
+ NullableMask = 1 << 20,
}
- protected enum State
+ enum State : byte
{
None = 0,
Compound = 1 << 1,
- LeftNullLifted = 1 << 2,
- RightNullLifted = 1 << 3
}
readonly Operator oper;
- protected Expression left, right;
- protected State state;
- Expression enum_conversion;
+ Expression left, right;
+ State state;
+ ConvCast.Mode enum_conversion;
public Binary (Operator oper, Expression left, Expression right, bool isCompound)
: this (oper, left, right)
@@ -2255,6 +2364,12 @@ namespace Mono.CSharp
}
}
+ public override Location StartLocation {
+ get {
+ return left.StartLocation;
+ }
+ }
+
#endregion
/// <summary>
@@ -2340,14 +2455,14 @@ namespace Mono.CSharp
return;
string l, r;
- l = TypeManager.CSharpName (left.Type);
- r = TypeManager.CSharpName (right.Type);
+ l = left.Type.GetSignatureForError ();
+ r = right.Type.GetSignatureForError ();
ec.Report.Error (19, loc, "Operator `{0}' cannot be applied to operands of type `{1}' and `{2}'",
oper, l, r);
}
- protected void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
+ void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
{
Error_OperatorCannotBeApplied (ec, left, right, OperName (oper), loc);
}
@@ -2446,7 +2561,7 @@ namespace Mono.CSharp
return left.ContainsEmitWithAwait () || right.ContainsEmitWithAwait ();
}
- public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l)
+ public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l, Expression right)
{
OpCode opcode;
@@ -2503,6 +2618,11 @@ namespace Mono.CSharp
break;
case Operator.RightShift:
+ if (!(right is IntConstant)) {
+ ec.EmitInt (GetShiftMask (l));
+ ec.Emit (OpCodes.And);
+ }
+
if (IsUnsigned (l))
opcode = OpCodes.Shr_Un;
else
@@ -2510,6 +2630,11 @@ namespace Mono.CSharp
break;
case Operator.LeftShift:
+ if (!(right is IntConstant)) {
+ ec.EmitInt (GetShiftMask (l));
+ ec.Emit (OpCodes.And);
+ }
+
opcode = OpCodes.Shl;
break;
@@ -2578,6 +2703,11 @@ namespace Mono.CSharp
ec.Emit (opcode);
}
+ static int GetShiftMask (TypeSpec type)
+ {
+ return type.BuiltinType == BuiltinTypeSpec.Type.Int || type.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
+ }
+
static bool IsUnsigned (TypeSpec t)
{
switch (t.BuiltinType) {
@@ -2597,8 +2727,10 @@ namespace Mono.CSharp
return t.BuiltinType == BuiltinTypeSpec.Type.Float || t.BuiltinType == BuiltinTypeSpec.Type.Double;
}
- Expression ResolveOperator (ResolveContext ec)
+ public Expression ResolveOperator (ResolveContext rc)
{
+ eclass = ExprClass.Value;
+
TypeSpec l = left.Type;
TypeSpec r = right.Type;
Expression expr;
@@ -2607,54 +2739,106 @@ namespace Mono.CSharp
//
// Handles predefined primitive types
//
- if (BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r)) {
+ if ((BuiltinTypeSpec.IsPrimitiveType (l) || (l.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (l)))) &&
+ (BuiltinTypeSpec.IsPrimitiveType (r) || (r.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (r))))) {
if ((oper & Operator.ShiftMask) == 0) {
- if (l.BuiltinType != BuiltinTypeSpec.Type.Bool && !DoBinaryOperatorPromotion (ec))
+ if (!DoBinaryOperatorPromotion (rc))
return null;
- primitives_only = true;
+ primitives_only = BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r);
}
} else {
// Pointers
if (l.IsPointer || r.IsPointer)
- return ResolveOperatorPointer (ec, l, r);
+ return ResolveOperatorPointer (rc, l, r);
+
+ // User operators
+ expr = ResolveUserOperator (rc, left, right);
+ if (expr != null)
+ return expr;
+
- // Enums
bool lenum = l.IsEnum;
bool renum = r.IsEnum;
- if (lenum || renum) {
- expr = ResolveOperatorEnum (ec, lenum, renum, l, r);
+ if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
+ //
+ // Enumerations
+ //
+ if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+ expr = ResolveSingleEnumOperators (rc, lenum, renum, l, r);
- if (expr != null)
- return expr;
- }
+ if (expr == null)
+ return null;
- // Delegates
- if ((oper == Operator.Addition || oper == Operator.Subtraction) && (l.IsDelegate || r.IsDelegate)) {
-
- expr = ResolveOperatorDelegate (ec, l, r);
+ if ((oper & Operator.BitwiseMask) != 0) {
+ expr = EmptyCast.Create (expr, type);
+ AddEnumResultCast (type);
- // TODO: Can this be ambiguous
- if (expr != null)
+ if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) {
+ expr = OptimizeAndOperation (expr);
+ }
+ }
+
+ left = ConvertEnumOperandToUnderlyingType (rc, left);
+ right = ConvertEnumOperandToUnderlyingType (rc, right);
return expr;
- }
+ }
+ } else if ((oper == Operator.Addition || oper == Operator.Subtraction)) {
+ if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+ //
+ // Enumerations
+ //
+ expr = ResolveEnumOperators (rc, lenum, renum, l, r);
- // User operators
- expr = ResolveUserOperator (ec, left, right);
- if (expr != null)
- return expr;
+ //
+ // We cannot break here there is also Enum + String possible match
+ // which is not ambiguous with predefined enum operators
+ //
+ if (expr != null) {
+ left = ConvertEnumOperandToUnderlyingType (rc, left);
+ right = ConvertEnumOperandToUnderlyingType (rc, right);
- // Predefined reference types equality
- if ((oper & Operator.EqualityMask) != 0) {
- expr = ResolveOperatorEquality (ec, l, r);
- if (expr != null)
- return expr;
+ return expr;
+ }
+ } else if (l.IsDelegate || r.IsDelegate) {
+ //
+ // Delegates
+ //
+ expr = ResolveOperatorDelegate (rc, l, r);
+
+ // TODO: Can this be ambiguous
+ if (expr != null)
+ return expr;
+ }
}
}
+
+ //
+ // Equality operators are more complicated
+ //
+ if ((oper & Operator.EqualityMask) != 0) {
+ return ResolveEquality (rc, l, r, primitives_only);
+ }
+
+ expr = ResolveOperatorPredefined (rc, rc.BuiltinTypes.OperatorsBinaryStandard, primitives_only);
+ if (expr != null)
+ return expr;
+
+ if (primitives_only)
+ return null;
+
+ //
+ // Lifted operators have lower priority
+ //
+ return ResolveOperatorPredefined (rc, rc.Module.OperatorsBinaryLifted, false);
+ }
- return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, primitives_only, null);
+ static bool IsEnumOrNullableEnum (TypeSpec type)
+ {
+ return type.IsEnum || (type.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (type).IsEnum);
}
+
// at least one of 'left' or 'right' is an enumeration constant (EnumConstant or SideEffectConstant or ...)
// if 'left' is not an enumeration constant, create one from the type of 'right'
Constant EnumLiftUp (ResolveContext ec, Constant left, Constant right, Location loc)
@@ -2716,9 +2900,10 @@ namespace Mono.CSharp
// FIXME: consider constants
+ var ltype = lcast != null ? lcast.UnderlyingType : rcast.UnderlyingType;
ec.Report.Warning (675, 3, loc,
"The operator `|' used on the sign-extended type `{0}'. Consider casting to a smaller unsigned type first",
- TypeManager.CSharpName (lcast != null ? lcast.UnderlyingType : rcast.UnderlyingType));
+ ltype.GetSignatureForError ());
}
public static PredefinedOperator[] CreatePointerOperatorsTable (BuiltinTypes types)
@@ -2758,8 +2943,9 @@ namespace Mono.CSharp
public static PredefinedOperator[] CreateStandardOperatorsTable (BuiltinTypes types)
{
TypeSpec bool_type = types.Bool;
- return new PredefinedOperator[] {
- new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask),
+
+ return new [] {
+ new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
new PredefinedOperator (types.UInt, Operator.ArithmeticMask | Operator.BitwiseMask),
new PredefinedOperator (types.Long, Operator.ArithmeticMask | Operator.BitwiseMask),
new PredefinedOperator (types.ULong, Operator.ArithmeticMask | Operator.BitwiseMask),
@@ -2776,15 +2962,64 @@ namespace Mono.CSharp
new PredefinedOperator (types.Decimal, Operator.ComparisonMask, bool_type),
new PredefinedStringOperator (types.String, Operator.AdditionMask, types.String),
- new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
- new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+ // Remaining string operators are in lifted tables
new PredefinedOperator (bool_type, Operator.BitwiseMask | Operator.LogicalMask | Operator.EqualityMask, bool_type),
- new PredefinedShiftOperator (types.Int, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.UInt, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.Long, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.ULong, types.Int, Operator.ShiftMask)
+ new PredefinedOperator (types.UInt, types.Int, Operator.ShiftMask),
+ new PredefinedOperator (types.Long, types.Int, Operator.ShiftMask),
+ new PredefinedOperator (types.ULong, types.Int, Operator.ShiftMask)
+ };
+
+ }
+ public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module)
+ {
+ var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable == null)
+ return new PredefinedOperator [0];
+
+ var types = module.Compiler.BuiltinTypes;
+ var bool_type = types.Bool;
+
+ var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type });
+ var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+ var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+ var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+ var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+ var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+ var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+ var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+ return new[] {
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ArithmeticMask),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ArithmeticMask),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ArithmeticMask),
+
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+
+ new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.BitwiseMask, nullable_bool),
+
+ new PredefinedOperator (nullable_uint, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_long, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_ulong, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+
+ //
+ // Not strictly lifted but need to be in second group otherwise expressions like
+ // int + null would resolve to +(object, string) instead of +(int?, int?)
+ //
+ new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
+ new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+
};
}
@@ -2792,113 +3027,168 @@ namespace Mono.CSharp
{
TypeSpec bool_type = types.Bool;
- return new PredefinedOperator[] {
+ return new[] {
new PredefinedEqualityOperator (types.String, bool_type),
new PredefinedEqualityOperator (types.Delegate, bool_type),
- new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type)
+ new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Int, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.UInt, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Long, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.ULong, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Float, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Double, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Decimal, Operator.EqualityMask, bool_type),
+ };
+ }
+
+ public static PredefinedOperator[] CreateEqualityLiftedOperatorsTable (ModuleContainer module)
+ {
+ var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+
+ if (nullable == null)
+ return new PredefinedOperator [0];
+
+ var types = module.Compiler.BuiltinTypes;
+ var bool_type = types.Bool;
+ var nullable_bool = nullable.MakeGenericType (module, new [] { bool_type });
+ var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+ var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+ var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+ var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+ var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+ var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+ var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+ return new [] {
+ new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.EqualityMask, bool_type)
};
}
//
- // Rules used during binary numeric promotion
+ // 7.2.6.2 Binary numeric promotions
//
- static bool DoNumericPromotion (ResolveContext rc, ref Expression prim_expr, ref Expression second_expr, TypeSpec type)
+ bool DoBinaryOperatorPromotion (ResolveContext rc)
{
- Expression temp;
+ TypeSpec ltype = left.Type;
+ if (ltype.IsNullableType) {
+ ltype = Nullable.NullableInfo.GetUnderlyingType (ltype);
+ }
- Constant c = prim_expr as Constant;
- if (c != null) {
- temp = c.ConvertImplicitly (type);
- if (temp != null) {
- prim_expr = temp;
- return true;
- }
+ //
+ // This is numeric promotion code only
+ //
+ if (ltype.BuiltinType == BuiltinTypeSpec.Type.Bool)
+ return true;
+
+ TypeSpec rtype = right.Type;
+ if (rtype.IsNullableType) {
+ rtype = Nullable.NullableInfo.GetUnderlyingType (rtype);
}
- if (type.BuiltinType == BuiltinTypeSpec.Type.UInt) {
- switch (prim_expr.Type.BuiltinType) {
- case BuiltinTypeSpec.Type.Int:
- case BuiltinTypeSpec.Type.Short:
- case BuiltinTypeSpec.Type.SByte:
- case BuiltinTypeSpec.Type.Long:
- type = rc.BuiltinTypes.Long;
+ var lb = ltype.BuiltinType;
+ var rb = rtype.BuiltinType;
+ TypeSpec type;
+ Expression expr;
- if (type != second_expr.Type) {
- c = second_expr as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (type);
- else
- temp = Convert.ImplicitNumericConversion (second_expr, type);
- if (temp == null)
- return false;
- second_expr = temp;
- }
- break;
+ if (lb == BuiltinTypeSpec.Type.Decimal || rb == BuiltinTypeSpec.Type.Decimal) {
+ type = rc.BuiltinTypes.Decimal;
+ } else if (lb == BuiltinTypeSpec.Type.Double || rb == BuiltinTypeSpec.Type.Double) {
+ type = rc.BuiltinTypes.Double;
+ } else if (lb == BuiltinTypeSpec.Type.Float || rb == BuiltinTypeSpec.Type.Float) {
+ type = rc.BuiltinTypes.Float;
+ } else if (lb == BuiltinTypeSpec.Type.ULong || rb == BuiltinTypeSpec.Type.ULong) {
+ type = rc.BuiltinTypes.ULong;
+
+ if (IsSignedType (lb)) {
+ expr = ConvertSignedConstant (left, type);
+ if (expr == null)
+ return false;
+ left = expr;
+ } else if (IsSignedType (rb)) {
+ expr = ConvertSignedConstant (right, type);
+ if (expr == null)
+ return false;
+ right = expr;
}
- } else if (type.BuiltinType == BuiltinTypeSpec.Type.ULong) {
- //
- // A compile-time error occurs if the other operand is of type sbyte, short, int, or long
- //
- switch (type.BuiltinType) {
- case BuiltinTypeSpec.Type.Int:
- case BuiltinTypeSpec.Type.Long:
- case BuiltinTypeSpec.Type.Short:
- case BuiltinTypeSpec.Type.SByte:
- return false;
+
+ } else if (lb == BuiltinTypeSpec.Type.Long || rb == BuiltinTypeSpec.Type.Long) {
+ type = rc.BuiltinTypes.Long;
+ } else if (lb == BuiltinTypeSpec.Type.UInt || rb == BuiltinTypeSpec.Type.UInt) {
+ type = rc.BuiltinTypes.UInt;
+
+ if (IsSignedType (lb)) {
+ expr = ConvertSignedConstant (left, type);
+ if (expr == null)
+ type = rc.BuiltinTypes.Long;
+ } else if (IsSignedType (rb)) {
+ expr = ConvertSignedConstant (right, type);
+ if (expr == null)
+ type = rc.BuiltinTypes.Long;
}
+ } else {
+ type = rc.BuiltinTypes.Int;
}
- temp = Convert.ImplicitNumericConversion (prim_expr, type);
- if (temp == null)
- return false;
-
- prim_expr = temp;
- return true;
- }
+ if (ltype != type) {
+ expr = PromoteExpression (rc, left, type);
+ if (expr == null)
+ return false;
- //
- // 7.2.6.2 Binary numeric promotions
- //
- public bool DoBinaryOperatorPromotion (ResolveContext ec)
- {
- TypeSpec ltype = left.Type;
- TypeSpec rtype = right.Type;
- Expression temp;
+ left = expr;
+ }
- foreach (TypeSpec t in ec.BuiltinTypes.BinaryPromotionsTypes) {
- if (t == ltype)
- return t == rtype || DoNumericPromotion (ec, ref right, ref left, t);
+ if (rtype != type) {
+ expr = PromoteExpression (rc, right, type);
+ if (expr == null)
+ return false;
- if (t == rtype)
- return t == ltype || DoNumericPromotion (ec, ref left, ref right, t);
+ right = expr;
}
- TypeSpec int32 = ec.BuiltinTypes.Int;
- if (ltype != int32) {
- Constant c = left as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (int32);
- else
- temp = Convert.ImplicitNumericConversion (left, int32);
+ return true;
+ }
- if (temp == null)
- return false;
- left = temp;
+ static bool IsSignedType (BuiltinTypeSpec.Type type)
+ {
+ switch (type) {
+ case BuiltinTypeSpec.Type.Int:
+ case BuiltinTypeSpec.Type.Short:
+ case BuiltinTypeSpec.Type.SByte:
+ case BuiltinTypeSpec.Type.Long:
+ return true;
+ default:
+ return false;
}
+ }
- if (rtype != int32) {
- Constant c = right as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (int32);
- else
- temp = Convert.ImplicitNumericConversion (right, int32);
+ static Expression ConvertSignedConstant (Expression expr, TypeSpec type)
+ {
+ var c = expr as Constant;
+ if (c == null)
+ return null;
- if (temp == null)
- return false;
- right = temp;
+ return c.ConvertImplicitly (type);
+ }
+
+ static Expression PromoteExpression (ResolveContext rc, Expression expr, TypeSpec type)
+ {
+ if (expr.Type.IsNullableType) {
+ return Convert.ImplicitConversionStandard (rc, expr,
+ rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc, new[] { type }), expr.Location);
}
- return true;
+ var c = expr as Constant;
+ if (c != null)
+ return c.ConvertImplicitly (type);
+
+ return Convert.ImplicitNumericConversion (expr, type);
}
protected override Expression DoResolve (ResolveContext ec)
@@ -2931,7 +3221,7 @@ namespace Mono.CSharp
// FIXME: resolve right expression as unreachable
// right.Resolve (ec);
- ec.Report.Warning (429, 4, loc, "Unreachable expression code detected");
+ ec.Report.Warning (429, 4, right.StartLocation, "Unreachable expression code detected");
return left;
}
@@ -2939,7 +3229,6 @@ namespace Mono.CSharp
if (right == null)
return null;
- eclass = ExprClass.Value;
Constant rc = right as Constant;
// The conversion rules are ignored in enum context but why
@@ -3038,20 +3327,10 @@ namespace Mono.CSharp
return new DynamicExpressionStatement (this, args, loc).Resolve (ec);
}
- if (ec.Module.Compiler.Settings.Version >= LanguageVersion.ISO_2 &&
- ((left.Type.IsNullableType && (right is NullLiteral || right.Type.IsNullableType || TypeSpec.IsValueType (right.Type))) ||
- (TypeSpec.IsValueType (left.Type) && right is NullLiteral) ||
- (right.Type.IsNullableType && (left is NullLiteral || left.Type.IsNullableType || TypeSpec.IsValueType (left.Type))) ||
- (TypeSpec.IsValueType (right.Type) && left is NullLiteral))) {
- var lifted = new Nullable.LiftedBinaryOperator (oper, left, right);
- lifted.state = state;
- return lifted.Resolve (ec);
- }
-
return DoResolveCore (ec, left, right);
}
- protected Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
+ Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
{
Expression expr = ResolveOperator (ec);
if (expr == null)
@@ -3068,6 +3347,13 @@ namespace Mono.CSharp
public override SLE.Expression MakeExpression (BuilderContext ctx)
{
+ return MakeExpression (ctx, left, right);
+ }
+
+ public SLE.Expression MakeExpression (BuilderContext ctx, Expression left, Expression right)
+ {
+ Console.WriteLine ("{0} x {1}", left.Type.GetSignatureForError (), right.Type.GetSignatureForError ());
+
var le = left.MakeExpression (ctx);
var re = right.MakeExpression (ctx);
bool is_checked = ctx.HasSet (BuilderContext.Options.CheckedScope);
@@ -3153,15 +3439,14 @@ namespace Mono.CSharp
if (method == null)
return new EmptyExpression (ec.BuiltinTypes.Decimal);
- MethodGroupExpr mg = MethodGroupExpr.CreatePredefined (method, ec.BuiltinTypes.Delegate, loc);
- Expression expr = new UserOperatorCall (mg.BestCandidate, args, CreateExpressionTree, loc);
+ Expression expr = new UserOperatorCall (method, args, CreateExpressionTree, loc);
return new ClassCast (expr, l);
}
//
- // Enumeration operators
+ // Resolves enumeration operators where only single predefined overload exists, handles lifted versions too
//
- Expression ResolveOperatorEnum (ResolveContext ec, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+ Expression ResolveSingleEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
{
//
// bool operator == (E x, E y);
@@ -3175,264 +3460,388 @@ namespace Mono.CSharp
// E operator | (E x, E y);
// E operator ^ (E x, E y);
//
- // U operator - (E e, E f)
- // E operator - (E e, U x)
- // E operator - (U x, E e) // LAMESPEC: Not covered by the specification
- //
- // E operator + (E e, U x)
- // E operator + (U x, E e)
- //
- Expression ltemp = left;
- Expression rtemp = right;
- TypeSpec underlying_type;
- TypeSpec underlying_type_result;
- TypeSpec res_type;
Expression expr;
-
- //
- // LAMESPEC: There is never ambiguous conversion between enum operators
- // the one which contains more enum parameters always wins even if there
- // is an implicit conversion involved
- //
- if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
- if (renum) {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- expr = Convert.ImplicitConversion (ec, left, rtype, loc);
- if (expr == null)
- return null;
+ if ((oper & Operator.ComparisonMask) != 0) {
+ type = rc.BuiltinTypes.Bool;
+ } else {
+ if (lenum)
+ type = ltype;
+ else if (renum)
+ type = rtype;
+ else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+ type = ltype;
+ else
+ type = rtype;
+ }
- left = expr;
- ltype = expr.Type;
- } else if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- expr = Convert.ImplicitConversion (ec, right, ltype, loc);
- if (expr == null)
- return null;
+ if (ltype == rtype) {
+ if (lenum || renum)
+ return this;
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
+ }
+
+ if (renum && !ltype.IsNullableType) {
+ expr = Convert.ImplicitConversion (rc, left, rtype, loc);
+ if (expr != null) {
+ left = expr;
+ return this;
+ }
+ } else if (lenum && !rtype.IsNullableType) {
+ expr = Convert.ImplicitConversion (rc, right, ltype, loc);
+ if (expr != null) {
right = expr;
- rtype = expr.Type;
- } else {
- return null;
+ return this;
}
+ }
- if ((oper & Operator.BitwiseMask) != 0) {
- res_type = ltype;
- underlying_type_result = underlying_type;
- } else {
- res_type = null;
- underlying_type_result = null;
- }
- } else if (oper == Operator.Subtraction) {
- if (renum) {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- if (ltype != rtype) {
- expr = Convert.ImplicitConversion (ec, left, rtype, left.Location);
- if (expr == null) {
- expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
- if (expr == null)
- return null;
-
- res_type = rtype;
- } else {
- res_type = underlying_type;
- }
+ //
+ // Now try lifted version of predefined operator
+ //
+ var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable_type != null) {
+ if (renum && !ltype.IsNullableType) {
+ var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { rtype });
+ expr = Convert.ImplicitConversion (rc, left, lifted_type, loc);
+ if (expr != null) {
left = expr;
- } else {
- res_type = underlying_type;
+ right = Convert.ImplicitConversion (rc, right, lifted_type, loc);
+ }
+
+ if ((oper & Operator.BitwiseMask) != 0)
+ type = lifted_type;
+
+ if (left.IsNull) {
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ return CreateLiftedValueTypeResult (rc, rtype);
+ }
+
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = expr;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
+ }
+ } else if (lenum && !rtype.IsNullableType) {
+ var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { ltype });
+
+ expr = Convert.ImplicitConversion (rc, right, lifted_type, loc);
+ if (expr != null) {
+ right = expr;
+ left = Convert.ImplicitConversion (rc, left, lifted_type, loc);
}
- underlying_type_result = underlying_type;
- } else if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- expr = Convert.ImplicitConversion (ec, right, ltype, right.Location);
- if (expr == null || expr is EnumConstant) {
- expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
+ if ((oper & Operator.BitwiseMask) != 0)
+ type = lifted_type;
+
+ if (right.IsNull) {
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ return CreateLiftedValueTypeResult (rc, ltype);
+ }
+
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = expr;
+ return lifted.Resolve (rc);
+ }
+ } else if (rtype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (rtype).IsEnum) {
+ if (left.IsNull) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+ left = Convert.ImplicitConversion (rc, left, rtype, left.Location);
+
+ if ((oper & Operator.RelationalMask) != 0)
+ return CreateLiftedValueTypeResult (rc, rtype);
+
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ // Equality operators are valid between E? and null
+ expr = left;
+ } else {
+ expr = Convert.ImplicitConversion (rc, left, Nullable.NullableInfo.GetUnderlyingType (rtype), loc);
if (expr == null)
return null;
+ }
+
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = expr;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
+ }
+ } else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum) {
+ if (right.IsNull) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+ right = Convert.ImplicitConversion (rc, right, ltype, right.Location);
+
+ if ((oper & Operator.RelationalMask) != 0)
+ return CreateLiftedValueTypeResult (rc, ltype);
- res_type = ltype;
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ // Equality operators are valid between E? and null
+ expr = right;
} else {
- res_type = underlying_type;
+ expr = Convert.ImplicitConversion (rc, right, Nullable.NullableInfo.GetUnderlyingType (ltype), loc);
+ if (expr == null)
+ return null;
}
- right = expr;
- underlying_type_result = underlying_type;
- } else {
- return null;
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = expr;
+ return lifted.Resolve (rc);
+ }
}
- } else if (oper == Operator.Addition) {
- if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- res_type = ltype;
+ }
+
+ return null;
+ }
+
+ static Expression ConvertEnumOperandToUnderlyingType (ResolveContext rc, Expression expr)
+ {
+ TypeSpec underlying_type;
+ if (expr.Type.IsNullableType) {
+ var nt = Nullable.NullableInfo.GetUnderlyingType (expr.Type);
+ if (nt.IsEnum)
+ underlying_type = EnumSpec.GetUnderlyingType (nt);
+ else
+ underlying_type = nt;
+ } else if (expr.Type.IsEnum) {
+ underlying_type = EnumSpec.GetUnderlyingType (expr.Type);
+ } else {
+ underlying_type = expr.Type;
+ }
+
+ switch (underlying_type.BuiltinType) {
+ case BuiltinTypeSpec.Type.SByte:
+ case BuiltinTypeSpec.Type.Byte:
+ case BuiltinTypeSpec.Type.Short:
+ case BuiltinTypeSpec.Type.UShort:
+ underlying_type = rc.BuiltinTypes.Int;
+ break;
+ }
+
+ if (expr.Type.IsNullableType)
+ underlying_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { underlying_type });
+
+ if (expr.Type == underlying_type)
+ return expr;
+
+ return EmptyCast.Create (expr, underlying_type);
+ }
+
+ Expression ResolveEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+ {
+ //
+ // U operator - (E e, E f)
+ // E operator - (E e, U x) // Internal decomposition operator
+ // E operator - (U x, E e) // Internal decomposition operator
+ //
+ // E operator + (E e, U x)
+ // E operator + (U x, E e)
+ //
- if (rtype != underlying_type && (state & (State.RightNullLifted | State.LeftNullLifted)) == 0) {
- expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
- if (expr == null)
- return null;
+ TypeSpec enum_type;
- right = expr;
- }
- } else {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- res_type = rtype;
- if (ltype != underlying_type) {
- expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
- if (expr == null)
- return null;
+ if (lenum)
+ enum_type = ltype;
+ else if (renum)
+ enum_type = rtype;
+ else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+ enum_type = ltype;
+ else
+ enum_type = rtype;
- left = expr;
- }
- }
+ Expression expr;
+ if (!enum_type.IsNullableType) {
+ expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, false), false);
+ if (expr != null) {
+ if (oper == Operator.Subtraction)
+ expr = ConvertEnumSubtractionResult (rc, expr);
+ else
+ expr = ConvertEnumAdditionalResult (expr, enum_type);
- underlying_type_result = underlying_type;
- } else {
- return null;
- }
+ AddEnumResultCast (expr.Type);
- // Unwrap the constant correctly, so DoBinaryOperatorPromotion can do the magic
- // with constants and expressions
- if (left.Type != underlying_type) {
- if (left is Constant)
- left = ((Constant) left).ConvertExplicitly (false, underlying_type);
- else
- left = EmptyCast.Create (left, underlying_type);
- }
+ return expr;
+ }
- if (right.Type != underlying_type) {
- if (right is Constant)
- right = ((Constant) right).ConvertExplicitly (false, underlying_type);
- else
- right = EmptyCast.Create (right, underlying_type);
+ enum_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { enum_type });
}
- //
- // C# specification uses explicit cast syntax which means binary promotion
- // should happen, however it seems that csc does not do that
- //
- if (!DoBinaryOperatorPromotion (ec)) {
- left = ltemp;
- right = rtemp;
- return null;
- }
+ expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, true), false);
+ if (expr != null) {
+ if (oper == Operator.Subtraction)
+ expr = ConvertEnumSubtractionResult (rc, expr);
+ else
+ expr = ConvertEnumAdditionalResult (expr, enum_type);
- if (underlying_type_result != null && left.Type != underlying_type_result) {
- enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (left.Type), underlying_type_result);
+ AddEnumResultCast (expr.Type);
}
- expr = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, true, res_type);
- if (expr == null)
- return null;
+ return expr;
+ }
- if (!IsCompound)
- return expr;
+ static Expression ConvertEnumAdditionalResult (Expression expr, TypeSpec enumType)
+ {
+ return EmptyCast.Create (expr, enumType);
+ }
+ Expression ConvertEnumSubtractionResult (ResolveContext rc, Expression expr)
+ {
//
- // Section: 7.16.2
+ // Enumeration subtraction has different result type based on
+ // best overload
//
+ TypeSpec result_type;
+ if (left.Type == right.Type) {
+ var c = right as EnumConstant;
+ if (c != null && c.IsZeroInteger) {
+ //
+ // LAMESPEC: This is quite unexpected for expression E - 0 the return type is
+ // E which is not what expressions E - 1 or 0 - E return
+ //
+ result_type = left.Type;
+ } else {
+ result_type = left.Type.IsNullableType ?
+ Nullable.NullableInfo.GetEnumUnderlyingType (rc.Module, left.Type) :
+ EnumSpec.GetUnderlyingType (left.Type);
+ }
+ } else if (IsEnumOrNullableEnum (left.Type)) {
+ result_type = left.Type;
+ } else {
+ result_type = right.Type;
+ }
- //
- // If the return type of the selected operator is implicitly convertible to the type of x
- //
- if (Convert.ImplicitConversionExists (ec, expr, ltype))
- return expr;
+ return EmptyCast.Create (expr, result_type);
+ }
- //
- // Otherwise, if the selected operator is a predefined operator, if the return type of the
- // selected operator is explicitly convertible to the type of x, and if y is implicitly
- // convertible to the type of x or the operator is a shift operator, then the operation
- // is evaluated as x = (T)(x op y), where T is the type of x
- //
- expr = Convert.ExplicitConversion (ec, expr, ltype, loc);
- if (expr == null)
- return null;
+ void AddEnumResultCast (TypeSpec type)
+ {
+ if (type.IsNullableType)
+ type = Nullable.NullableInfo.GetUnderlyingType (type);
- if (Convert.ImplicitConversionExists (ec, ltemp, ltype))
- return expr;
+ if (type.IsEnum)
+ type = EnumSpec.GetUnderlyingType (type);
- return null;
+ switch (type.BuiltinType) {
+ case BuiltinTypeSpec.Type.SByte:
+ enum_conversion = ConvCast.Mode.I4_I1;
+ break;
+ case BuiltinTypeSpec.Type.Byte:
+ enum_conversion = ConvCast.Mode.I4_U1;
+ break;
+ case BuiltinTypeSpec.Type.Short:
+ enum_conversion = ConvCast.Mode.I4_I2;
+ break;
+ case BuiltinTypeSpec.Type.UShort:
+ enum_conversion = ConvCast.Mode.I4_U2;
+ break;
+ }
}
//
- // 7.9.6 Reference type equality operators
+ // Equality operators rules
//
- Expression ResolveOperatorEquality (ResolveContext ec, TypeSpec l, TypeSpec r)
+ Expression ResolveEquality (ResolveContext ec, TypeSpec l, TypeSpec r, bool primitives_only)
{
Expression result;
type = ec.BuiltinTypes.Bool;
+ bool no_arg_conv = false;
- //
- // a, Both operands are reference-type values or the value null
- // b, One operand is a value of type T where T is a type-parameter and
- // the other operand is the value null. Furthermore T does not have the
- // value type constraint
- //
- // LAMESPEC: Very confusing details in the specification, basically any
- // reference like type-parameter is allowed
- //
- var tparam_l = l as TypeParameterSpec;
- var tparam_r = r as TypeParameterSpec;
- if (tparam_l != null) {
- if (right is NullLiteral && !tparam_l.HasSpecialStruct) {
- left = new BoxedCast (left, ec.BuiltinTypes.Object);
- return this;
- }
+ if (!primitives_only) {
- if (!tparam_l.IsReferenceType)
- return null;
+ //
+ // a, Both operands are reference-type values or the value null
+ // b, One operand is a value of type T where T is a type-parameter and
+ // the other operand is the value null. Furthermore T does not have the
+ // value type constraint
+ //
+ // LAMESPEC: Very confusing details in the specification, basically any
+ // reference like type-parameter is allowed
+ //
+ var tparam_l = l as TypeParameterSpec;
+ var tparam_r = r as TypeParameterSpec;
+ if (tparam_l != null) {
+ if (right is NullLiteral) {
+ if (tparam_l.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+ return null;
- l = tparam_l.GetEffectiveBase ();
- left = new BoxedCast (left, l);
- } else if (left is NullLiteral && tparam_r == null) {
- if (!TypeSpec.IsReferenceType (r) || r.Kind == MemberKind.InternalCompilerType)
- return null;
+ left = new BoxedCast (left, ec.BuiltinTypes.Object);
+ return this;
+ }
- return this;
- }
+ if (!tparam_l.IsReferenceType)
+ return null;
- if (tparam_r != null) {
- if (left is NullLiteral && !tparam_r.HasSpecialStruct) {
- right = new BoxedCast (right, ec.BuiltinTypes.Object);
- return this;
+ l = tparam_l.GetEffectiveBase ();
+ left = new BoxedCast (left, l);
+ } else if (left is NullLiteral && tparam_r == null) {
+ if (TypeSpec.IsReferenceType (r))
+ return this;
+
+ if (r.Kind == MemberKind.InternalCompilerType)
+ return null;
}
- if (!tparam_r.IsReferenceType)
- return null;
+ if (tparam_r != null) {
+ if (left is NullLiteral) {
+ if (tparam_r.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+ return null;
- r = tparam_r.GetEffectiveBase ();
- right = new BoxedCast (right, r);
- } else if (right is NullLiteral) {
- if (!TypeSpec.IsReferenceType (l) || l.Kind == MemberKind.InternalCompilerType)
- return null;
+ right = new BoxedCast (right, ec.BuiltinTypes.Object);
+ return this;
+ }
- return this;
- }
+ if (!tparam_r.IsReferenceType)
+ return null;
- bool no_arg_conv = false;
+ r = tparam_r.GetEffectiveBase ();
+ right = new BoxedCast (right, r);
+ } else if (right is NullLiteral) {
+ if (TypeSpec.IsReferenceType (l))
+ return this;
- //
- // LAMESPEC: method groups can be compared when they convert to other side delegate
- //
- if (l.IsDelegate) {
- if (right.eclass == ExprClass.MethodGroup) {
- result = Convert.ImplicitConversion (ec, right, l, loc);
+ if (l.Kind == MemberKind.InternalCompilerType)
+ return null;
+ }
+
+ //
+ // LAMESPEC: method groups can be compared when they convert to other side delegate
+ //
+ if (l.IsDelegate) {
+ if (right.eclass == ExprClass.MethodGroup) {
+ result = Convert.ImplicitConversion (ec, right, l, loc);
+ if (result == null)
+ return null;
+
+ right = result;
+ r = l;
+ } else if (r.IsDelegate && l != r) {
+ return null;
+ }
+ } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
+ result = Convert.ImplicitConversionRequired (ec, left, r, loc);
if (result == null)
return null;
- right = result;
- r = l;
- } else if (r.IsDelegate && l != r) {
- return null;
+ left = result;
+ l = r;
+ } else {
+ no_arg_conv = l == r && !l.IsStruct;
}
- } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
- result = Convert.ImplicitConversionRequired (ec, left, r, loc);
- if (result == null)
- return null;
-
- left = result;
- l = r;
- } else {
- no_arg_conv = l == r && !l.IsStruct;
}
//
@@ -3450,9 +3859,28 @@ namespace Mono.CSharp
// not apply when both operands are of same reference type
//
if (r.BuiltinType != BuiltinTypeSpec.Type.Object && l.BuiltinType != BuiltinTypeSpec.Type.Object) {
- result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv, null);
+ result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv);
+ if (result != null)
+ return result;
+
+ //
+ // Now try lifted version of predefined operators
+ //
+ result = ResolveOperatorPredefined (ec, ec.Module.OperatorsBinaryEqualityLifted, no_arg_conv);
if (result != null)
return result;
+
+ //
+ // The == and != operators permit one operand to be a value of a nullable
+ // type and the other to be the null literal, even if no predefined or user-defined
+ // operator (in unlifted or lifted form) exists for the operation.
+ //
+ if ((l.IsNullableType && right.IsNull) || (r.IsNullableType && left.IsNull)) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = right;
+ return lifted.Resolve (ec);
+ }
}
//
@@ -3520,13 +3948,13 @@ namespace Mono.CSharp
return this;
}
- return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false, null);
+ return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false);
}
//
// Build-in operators method overloading
//
- protected virtual Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
+ Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only)
{
PredefinedOperator best_operator = null;
TypeSpec l = left.Type;
@@ -3557,7 +3985,7 @@ namespace Mono.CSharp
if (best_operator == null) {
ec.Report.Error (34, loc, "Operator `{0}' is ambiguous on operands of type `{1}' and `{2}'",
- OperName (oper), TypeManager.CSharpName (l), TypeManager.CSharpName (r));
+ OperName (oper), l.GetSignatureForError (), r.GetSignatureForError ());
best_operator = po;
break;
@@ -3567,41 +3995,68 @@ namespace Mono.CSharp
if (best_operator == null)
return null;
- Expression expr = best_operator.ConvertResult (ec, this);
+ var expr = best_operator.ConvertResult (ec, this);
- //
- // Optimize &/&& constant expressions with 0 value
- //
- if (oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) {
- Constant rc = right as Constant;
- Constant lc = left as Constant;
- if (((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) && !(this is Nullable.LiftedBinaryOperator)) {
- //
- // The result is a constant with side-effect
- //
- Constant side_effect = rc == null ?
- new SideEffectConstant (lc, right, loc) :
- new SideEffectConstant (rc, left, loc);
+ if ((oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) && !best_operator.IsLifted) {
+ expr = OptimizeAndOperation (expr);
+ }
- return ReducedExpression.Create (side_effect, expr);
- }
+ return expr;
+ }
+
+ //
+ // Optimize &/&& constant expressions with 0 value
+ //
+ Expression OptimizeAndOperation (Expression expr)
+ {
+ Constant rc = right as Constant;
+ Constant lc = left as Constant;
+ if ((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) {
+ //
+ // The result is a constant with side-effect
+ //
+ Constant side_effect = rc == null ?
+ new SideEffectConstant (lc, right, loc) :
+ new SideEffectConstant (rc, left, loc);
+
+ return ReducedExpression.Create (side_effect, expr);
}
- if (enum_type == null)
- return expr;
+ return expr;
+ }
- //
- // HACK: required by enum_conversion
- //
- expr.Type = enum_type;
- return EmptyCast.Create (expr, enum_type);
+ //
+ // Value types can be compared with the null literal because of the lifting
+ // language rules. However the result is always true or false.
+ //
+ public Expression CreateLiftedValueTypeResult (ResolveContext rc, TypeSpec valueType)
+ {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ type = rc.BuiltinTypes.Bool;
+ return this;
+ }
+
+ // FIXME: Handle side effect constants
+ Constant c = new BoolConstant (rc.BuiltinTypes, Oper == Operator.Inequality, loc);
+
+ if ((Oper & Operator.EqualityMask) != 0) {
+ rc.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
+ valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+ } else {
+ rc.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
+ valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+ }
+
+ return c;
}
//
// Performs user-operator overloading
//
- protected virtual Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
+ Expression ResolveUserOperator (ResolveContext rc, Expression left, Expression right)
{
+ Expression oper_expr;
+
var op = ConvertBinaryToUserOperator (oper);
var l = left.Type;
if (l.IsNullableType)
@@ -3623,7 +4078,7 @@ namespace Mono.CSharp
Arguments args = new Arguments (2);
Argument larg = new Argument (left);
- args.Add (larg);
+ args.Add (larg);
Argument rarg = new Argument (right);
args.Add (rarg);
@@ -3637,50 +4092,198 @@ namespace Mono.CSharp
left_operators = right_operators;
}
- var res = new OverloadResolver (left_operators, OverloadResolver.Restrictions.ProbingOnly |
- OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded, loc);
+ const OverloadResolver.Restrictions restr = OverloadResolver.Restrictions.ProbingOnly |
+ OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded;
- var oper_method = res.ResolveOperator (ec, ref args);
- if (oper_method == null)
- return null;
+ var res = new OverloadResolver (left_operators, restr, loc);
- var llifted = (state & State.LeftNullLifted) != 0;
- var rlifted = (state & State.RightNullLifted) != 0;
- if ((Oper & Operator.EqualityMask) != 0) {
- var parameters = oper_method.Parameters;
- // LAMESPEC: No idea why this is not allowed
- if ((left is Nullable.Unwrap || right is Nullable.Unwrap) && parameters.Types [0] != parameters.Types [1])
+ var oper_method = res.ResolveOperator (rc, ref args);
+ if (oper_method == null) {
+ //
+ // Logical && and || cannot be lifted
+ //
+ if ((oper & Operator.LogicalMask) != 0)
+ return null;
+
+ //
+ // Apply lifted user operators only for liftable types. Implicit conversion
+ // to nullable types is not allowed
+ //
+ if (!IsLiftedOperatorApplicable ())
+ return null;
+
+ // TODO: Cache the result in module container
+ var lifted_methods = CreateLiftedOperators (rc, left_operators);
+ if (lifted_methods == null)
return null;
- // Binary operation was lifted but we have found a user operator
- // which requires value-type argument, we downgrade ourself back to
- // binary operation
- // LAMESPEC: The user operator is not called (it cannot be we are passing null to struct)
- // but compilation succeeds
- if ((llifted && !parameters.Types[0].IsStruct) || (rlifted && !parameters.Types[1].IsStruct)) {
- state &= ~(State.LeftNullLifted | State.RightNullLifted);
+ res = new OverloadResolver (lifted_methods, restr | OverloadResolver.Restrictions.ProbingOnly, loc);
+
+ oper_method = res.ResolveOperator (rc, ref args);
+ if (oper_method == null)
+ return null;
+
+ MethodSpec best_original = null;
+ foreach (MethodSpec ms in left_operators) {
+ if (ms.MemberDefinition == oper_method.MemberDefinition) {
+ best_original = ms;
+ break;
+ }
+ }
+
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ //
+ // Expression trees use lifted notation in this case
+ //
+ this.left = Convert.ImplicitConversion (rc, left, oper_method.Parameters.Types[0], left.Location);
+ this.right = Convert.ImplicitConversion (rc, right, oper_method.Parameters.Types[1], left.Location);
}
- }
- Expression oper_expr;
+ var ptypes = best_original.Parameters.Types;
+
+ if (left.IsNull || right.IsNull) {
+ //
+ // The lifted operator produces the value false if one or both operands are null for
+ // relational operators.
+ //
+ if ((oper & Operator.ComparisonMask) != 0) {
+ //
+ // CSC BUG: This should be different warning, csc reports CS0458 with bool? which is wrong
+ // because return type is actually bool
+ //
+ // For some reason CSC does not report this warning for equality operators
+ //
+ return CreateLiftedValueTypeResult (rc, left.IsNull ? ptypes [1] : ptypes [0]);
+ }
+
+ // The lifted operator produces a null value if one or both operands are null
+ //
+ if ((oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0) {
+ type = oper_method.ReturnType;
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ }
+ }
+
+ type = oper_method.ReturnType;
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.UserOperator = best_original;
+
+ if (left.Type.IsNullableType && !ptypes[0].IsNullableType) {
+ lifted.UnwrapLeft = new Nullable.Unwrap (left);
+ }
+
+ if (right.Type.IsNullableType && !ptypes[1].IsNullableType) {
+ lifted.UnwrapRight = new Nullable.Unwrap (right);
+ }
+
+ lifted.Left = Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? left, ptypes[0], left.Location);
+ lifted.Right = Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? right, ptypes[1], right.Location);
- // TODO: CreateExpressionTree is allocated every time
+ return lifted.Resolve (rc);
+ }
+
if ((oper & Operator.LogicalMask) != 0) {
+ // TODO: CreateExpressionTree is allocated every time
oper_expr = new ConditionalLogicalOperator (oper_method, args, CreateExpressionTree,
- oper == Operator.LogicalAnd, loc).Resolve (ec);
+ oper == Operator.LogicalAnd, loc).Resolve (rc);
} else {
oper_expr = new UserOperatorCall (oper_method, args, CreateExpressionTree, loc);
}
- if (!llifted)
- this.left = larg.Expr;
-
- if (!rlifted)
- this.right = rarg.Expr;
+ this.left = larg.Expr;
+ this.right = rarg.Expr;
return oper_expr;
}
+ bool IsLiftedOperatorApplicable ()
+ {
+ if (left.Type.IsNullableType) {
+ if ((oper & Operator.EqualityMask) != 0)
+ return !right.IsNull;
+
+ return true;
+ }
+
+ if (right.Type.IsNullableType) {
+ if ((oper & Operator.EqualityMask) != 0)
+ return !left.IsNull;
+
+ return true;
+ }
+
+ if (TypeSpec.IsValueType (left.Type))
+ return right.IsNull;
+
+ if (TypeSpec.IsValueType (right.Type))
+ return left.IsNull;
+
+ return false;
+ }
+
+ List<MemberSpec> CreateLiftedOperators (ResolveContext rc, IList<MemberSpec> operators)
+ {
+ var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable_type == null)
+ return null;
+
+ //
+ // Lifted operators permit predefined and user-defined operators that operate
+ // on non-nullable value types to also be used with nullable forms of those types.
+ // Lifted operators are constructed from predefined and user-defined operators
+ // that meet certain requirements
+ //
+ List<MemberSpec> lifted = null;
+ foreach (MethodSpec oper in operators) {
+ TypeSpec rt;
+ if ((Oper & Operator.ComparisonMask) != 0) {
+ //
+ // Result type must be of type bool for lifted comparison operators
+ //
+ rt = oper.ReturnType;
+ if (rt.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ continue;
+ } else {
+ if (!TypeSpec.IsNonNullableValueType (oper.ReturnType))
+ continue;
+
+ rt = null;
+ }
+
+ var ptypes = oper.Parameters.Types;
+ if (!TypeSpec.IsNonNullableValueType (ptypes [0]) || !TypeSpec.IsNonNullableValueType (ptypes [1]))
+ continue;
+
+ //
+ // LAMESPEC: I am not sure why but for equality operators to be lifted
+ // both types have to match
+ //
+ if ((Oper & Operator.EqualityMask) != 0 && ptypes [0] != ptypes [1])
+ continue;
+
+ if (lifted == null)
+ lifted = new List<MemberSpec> ();
+
+ //
+ // The lifted form is constructed by adding a single ? modifier to each operand and
+ // result type except for comparison operators where return type is bool
+ //
+ if (rt == null)
+ rt = nullable_type.MakeGenericType (rc.Module, new[] { oper.ReturnType });
+
+ var parameters = ParametersCompiled.CreateFullyResolved (
+ nullable_type.MakeGenericType (rc.Module, new [] { ptypes[0] }),
+ nullable_type.MakeGenericType (rc.Module, new [] { ptypes[1] }));
+
+ var lifted_op = new MethodSpec (oper.Kind, oper.DeclaringType, oper.MemberDefinition,
+ rt, parameters, oper.Modifiers);
+
+ lifted.Add (lifted_op);
+ }
+
+ return lifted;
+ }
+
//
// Merge two sets of user operators into one, they are mostly distinguish
// except when they share base type and it contains an operator
@@ -3713,7 +4316,7 @@ namespace Mono.CSharp
} catch (OverflowException) {
ec.Report.Warning (652, 2, loc,
"A comparison between a constant and a variable is useless. The constant is out of the range of the variable type `{0}'",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
}
}
@@ -3881,11 +4484,6 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
- EmitOperator (ec, left.Type);
- }
-
- protected virtual void EmitOperator (EmitContext ec, TypeSpec l)
- {
if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
left = left.EmitToField (ec);
@@ -3925,16 +4523,22 @@ namespace Mono.CSharp
}
}
+ EmitOperator (ec, left, right);
+ }
+
+ public void EmitOperator (EmitContext ec, Expression left, Expression right)
+ {
left.Emit (ec);
right.Emit (ec);
- EmitOperatorOpcode (ec, oper, l);
+
+ EmitOperatorOpcode (ec, oper, left.Type, right);
//
- // Nullable enum could require underlying type cast and we cannot simply wrap binary
- // expression because that would wrap lifted binary operation
+ // Emit result enumerable conversion this way because it's quite complicated get it
+ // to resolved tree because expression tree cannot see it.
//
- if (enum_conversion != null)
- enum_conversion.Emit (ec);
+ if (enum_conversion != 0)
+ ConvCast.Emit (ec, enum_conversion);
}
public override void EmitSideEffect (EmitContext ec)
@@ -4004,7 +4608,7 @@ namespace Mono.CSharp
return CreateExpressionTree (ec, null);
}
- Expression CreateExpressionTree (ResolveContext ec, Expression method)
+ public Expression CreateExpressionTree (ResolveContext ec, Expression method)
{
string method_name;
bool lift_arg = false;
@@ -4273,7 +4877,7 @@ namespace Mono.CSharp
if (op_true == null || op_false == null) {
ec.Report.Error (218, loc,
"The type `{0}' must have operator `true' and operator `false' defined when `{1}' is used as a short circuit operator",
- TypeManager.CSharpName (type), oper.GetSignatureForError ());
+ type.GetSignatureForError (), oper.GetSignatureForError ());
return null;
}
@@ -4453,7 +5057,7 @@ namespace Mono.CSharp
if (rtype.BuiltinType == BuiltinTypeSpec.Type.Long || rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
ec.Emit (OpCodes.Conv_I8);
- Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype);
+ Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype, right);
}
if (left_const == null) {
@@ -4462,7 +5066,7 @@ namespace Mono.CSharp
else if (rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
ec.Emit (OpCodes.Conv_U);
- Binary.EmitOperatorOpcode (ec, op, op_type);
+ Binary.EmitOperatorOpcode (ec, op, op_type, right);
}
}
}
@@ -4684,7 +5288,7 @@ namespace Mono.CSharp
} else {
ec.Report.Error (173, true_expr.Location,
"Type of conditional expression cannot be determined because there is no implicit conversion between `{0}' and `{1}'",
- TypeManager.CSharpName (true_type), TypeManager.CSharpName (false_type));
+ true_type.GetSignatureForError (), false_type.GetSignatureForError ());
return null;
}
}
@@ -5194,6 +5798,9 @@ namespace Mono.CSharp
void SetAssigned (ResolveContext ec)
{
+ if (Parameter.HoistedVariant != null)
+ Parameter.HoistedVariant.IsAssigned = true;
+
if (HasOutModifier && ec.DoFlowAnalysis)
ec.CurrentBranching.SetAssigned (VariableInfo);
}
@@ -5423,7 +6030,7 @@ namespace Mono.CSharp
if (member_expr != null)
member_expr = member_expr.Resolve (ec);
} else {
- member_expr = expr.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup);
+ member_expr = expr.Resolve (ec);
}
if (member_expr == null)
@@ -5777,7 +6384,7 @@ namespace Mono.CSharp
if (type.IsPointer) {
ec.Report.Error (1919, loc, "Unsafe type `{0}' cannot be used in an object creation expression",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
return null;
}
@@ -5800,13 +6407,13 @@ namespace Mono.CSharp
if ((tparam.SpecialConstraint & (SpecialConstraint.Struct | SpecialConstraint.Constructor)) == 0 && !TypeSpec.IsValueType (tparam)) {
ec.Report.Error (304, loc,
"Cannot create an instance of the variable type `{0}' because it does not have the new() constraint",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
if ((arguments != null) && (arguments.Count != 0)) {
ec.Report.Error (417, loc,
"`{0}': cannot provide arguments when creating an instance of a variable type",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
return this;
@@ -5814,7 +6421,7 @@ namespace Mono.CSharp
if (type.IsStatic) {
ec.Report.SymbolRelatedToPreviousError (type);
- ec.Report.Error (712, loc, "Cannot create an instance of the static class `{0}'", TypeManager.CSharpName (type));
+ ec.Report.Error (712, loc, "Cannot create an instance of the static class `{0}'", type.GetSignatureForError ());
return null;
}
@@ -5826,7 +6433,7 @@ namespace Mono.CSharp
}
ec.Report.SymbolRelatedToPreviousError (type);
- ec.Report.Error (144, loc, "Cannot create an instance of the abstract class or interface `{0}'", TypeManager.CSharpName (type));
+ ec.Report.Error (144, loc, "Cannot create an instance of the abstract class or interface `{0}'", type.GetSignatureForError ());
return null;
}
@@ -5947,14 +6554,16 @@ namespace Mono.CSharp
}
if (vr != null) {
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
return false;
}
}
if (type is TypeParameterSpec)
- return DoEmitTypeParameter (ec);
+ return DoEmitTypeParameter (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Newobj, method);
return true;
}
@@ -6048,7 +6657,7 @@ namespace Mono.CSharp
public class ArrayInitializer : Expression
{
List<Expression> elements;
- BlockVariableDeclaration variable;
+ BlockVariable variable;
public ArrayInitializer (List<Expression> init, Location loc)
{
@@ -6084,7 +6693,7 @@ namespace Mono.CSharp
}
}
- public BlockVariableDeclaration VariableDeclaration {
+ public BlockVariable VariableDeclaration {
get {
return variable;
}
@@ -7823,7 +8432,7 @@ namespace Mono.CSharp
if (!ec.IsUnsafe) {
ec.Report.Error (233, loc,
"`{0}' does not have a predefined size, therefore sizeof can only be used in an unsafe context (consider using System.Runtime.InteropServices.Marshal.SizeOf)",
- TypeManager.CSharpName (type_queried));
+ type_queried.GetSignatureForError ());
}
type = ec.BuiltinTypes.Int;
@@ -7941,13 +8550,6 @@ namespace Mono.CSharp
public class MemberAccess : ATypeNameExpression
{
protected Expression expr;
-
-#if FULL_AST
- public Location DotLocation {
- get;
- set;
- }
-#endif
public MemberAccess (Expression expr, string id)
: base (id, expr.Location)
@@ -8028,7 +8630,7 @@ namespace Mono.CSharp
e = e.ResolveLValue (rc, right_side);
} else {
- e = e.Resolve (rc, ResolveFlags.VariableOrValue | ResolveFlags.Type);
+ e = e.Resolve (rc, ResolveFlags.VariableOrValue | ResolveFlags.Type | ResolveFlags.MethodGroup);
}
return e;
@@ -9482,6 +10084,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
source.Emit (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
}
@@ -10139,8 +10742,8 @@ namespace Mono.CSharp
ec.Report.Error (1922, loc, "A field or property `{0}' cannot be initialized with a collection " +
"object initializer because type `{1}' does not implement `{2}' interface",
ec.CurrentInitializerVariable.GetSignatureForError (),
- TypeManager.CSharpName (ec.CurrentInitializerVariable.Type),
- TypeManager.CSharpName (ec.BuiltinTypes.IEnumerable));
+ ec.CurrentInitializerVariable.Type.GetSignatureForError (),
+ ec.BuiltinTypes.IEnumerable.GetSignatureForError ());
return null;
}
is_collection_initialization = true;
@@ -10174,7 +10777,7 @@ namespace Mono.CSharp
if (is_collection_initialization) {
if (TypeManager.HasElementType (type)) {
ec.Report.Error (1925, loc, "Cannot initialize object of type `{0}' with a collection initializer",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/field.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/field.cs
index e4dc35e..3eb5501 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/field.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/field.cs
@@ -42,6 +42,11 @@ namespace Mono.CSharp
public Expression Initializer { get; private set; }
#endregion
+
+ public virtual FullNamedExpression GetFieldTypeExpression (FieldBase field)
+ {
+ return new TypeExpression (field.MemberType, Name.Location);
+ }
}
//
@@ -407,9 +412,8 @@ namespace Mono.CSharp
"`{0}': Fixed size buffers type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float or double",
GetSignatureForError ());
} else if (declarators != null) {
- var t = new TypeExpression (MemberType, TypeExpression.Location);
foreach (var d in declarators) {
- var f = new FixedField (Parent, t, ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
+ var f = new FixedField (Parent, d.GetFieldTypeExpression (this), ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
f.initializer = d.Initializer;
((ConstInitializer) f.initializer).Name = d.Name.Value;
f.Define ();
@@ -486,7 +490,7 @@ namespace Mono.CSharp
if (buffer_size > int.MaxValue / type_size) {
Report.Error (1664, Location, "Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit",
- GetSignatureForError (), buffer_size.ToString (), TypeManager.CSharpName (MemberType));
+ GetSignatureForError (), buffer_size.ToString (), MemberType.GetSignatureForError ());
return;
}
@@ -645,8 +649,7 @@ namespace Mono.CSharp
if (declarators != null) {
foreach (var d in declarators) {
- var t = new TypeExpression (MemberType, d.Name.Location);
- var f = new Field (Parent, t, ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
+ var f = new Field (Parent, d.GetFieldTypeExpression (this), ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
if (d.Initializer != null)
f.initializer = d.Initializer;
@@ -668,7 +671,7 @@ namespace Mono.CSharp
if ((ModFlags & Modifiers.VOLATILE) != 0) {
if (!CanBeVolatile ()) {
Report.Error (677, Location, "`{0}': A volatile field cannot be of the type `{1}'",
- GetSignatureForError (), TypeManager.CSharpName (MemberType));
+ GetSignatureForError (), MemberType.GetSignatureForError ());
}
if ((ModFlags & Modifiers.READONLY) != 0) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs
index e710519..4fee5a1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs
@@ -800,7 +800,7 @@ namespace Mono.CSharp
}
}
- public class FlowBranchingAsync : FlowBranchingBlock
+ public class FlowBranchingAsync : FlowBranchingBlock
{
readonly AsyncInitializer async_init;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs
index ceed93d..8cd3bf3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs
@@ -318,7 +318,7 @@ namespace Mono.CSharp {
if (type.IsSealed || !type.IsClass) {
context.Module.Compiler.Report.Error (701, loc,
"`{0}' is not a valid constraint. A constraint must be an interface, a non-sealed class or a type parameter",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
continue;
}
@@ -495,7 +495,7 @@ namespace Mono.CSharp {
//
// If partial type parameters constraints are not null and we don't
// already have constraints they become our constraints. If we already
- // have constraints, we must check that they're the same.
+ // have constraints, we must check that they're same.
//
public bool AddPartialConstraints (TypeDefinition part, TypeParameter tp)
{
@@ -551,15 +551,19 @@ namespace Mono.CSharp {
// with SRE (by calling `DefineGenericParameters()' on the TypeBuilder /
// MethodBuilder).
//
- public void Define (GenericTypeParameterBuilder type, TypeSpec declaringType, TypeContainer parent)
+ public void Create (TypeSpec declaringType, TypeContainer parent)
{
if (builder != null)
throw new InternalErrorException ();
// Needed to get compiler reference
this.Parent = parent;
- this.builder = type;
spec.DeclaringType = declaringType;
+ }
+
+ public void Define (GenericTypeParameterBuilder type)
+ {
+ this.builder = type;
spec.SetMetaInfo (type);
}
@@ -1382,6 +1386,9 @@ namespace Mono.CSharp {
return ac;
}
+ if (type.Kind == MemberKind.MissingType)
+ return type;
+
//
// When inflating a nested type, inflate its parent first
// in case it's using same type parameters (was inflated within the type)
@@ -2185,13 +2192,13 @@ namespace Mono.CSharp {
names.AddRange (tparams.names);
}
- public void Define (GenericTypeParameterBuilder[] buiders, TypeSpec declaringType, int parentOffset, TypeContainer parent)
+ public void Create (TypeSpec declaringType, int parentOffset, TypeContainer parent)
{
types = new TypeParameterSpec[Count];
for (int i = 0; i < types.Length; ++i) {
var tp = names[i];
- tp.Define (buiders[i + parentOffset], declaringType, parent);
+ tp.Create (declaringType, parent);
types[i] = tp.Type;
types[i].DeclaredPosition = i + parentOffset;
@@ -2201,6 +2208,14 @@ namespace Mono.CSharp {
}
}
+ public void Define (GenericTypeParameterBuilder[] builders)
+ {
+ for (int i = 0; i < types.Length; ++i) {
+ var tp = names[i];
+ tp.Define (builders [types [i].DeclaredPosition]);
+ }
+ }
+
public TypeParameter this[int index] {
get {
return names [index];
@@ -2240,6 +2255,44 @@ namespace Mono.CSharp {
return sb.ToString ();
}
+
+ public void CheckPartialConstraints (Method part)
+ {
+ var partTypeParameters = part.CurrentTypeParameters;
+
+ for (int i = 0; i < Count; i++) {
+ var tp_a = names[i];
+ var tp_b = partTypeParameters [i];
+ if (tp_a.Constraints == null) {
+ if (tp_b.Constraints == null)
+ continue;
+ } else if (tp_b.Constraints != null && tp_a.Type.HasSameConstraintsDefinition (tp_b.Type)) {
+ continue;
+ }
+
+ part.Compiler.Report.SymbolRelatedToPreviousError (this[i].CurrentMemberDefinition.Location, "");
+ part.Compiler.Report.Error (761, part.Location,
+ "Partial method declarations of `{0}' have inconsistent constraints for type parameter `{1}'",
+ part.GetSignatureForError (), partTypeParameters[i].GetSignatureForError ());
+ }
+ }
+
+ public void UpdateConstraints (TypeDefinition part)
+ {
+ var partTypeParameters = part.MemberName.TypeParameters;
+
+ for (int i = 0; i < Count; i++) {
+ var tp = names [i];
+ if (tp.AddPartialConstraints (part, partTypeParameters [i]))
+ continue;
+
+ part.Compiler.Report.SymbolRelatedToPreviousError (this[i].CurrentMemberDefinition);
+ part.Compiler.Report.Error (265, part.Location,
+ "Partial declarations of `{0}' have inconsistent constraints for type parameter `{1}'",
+ part.GetSignatureForError (), tp.GetSignatureForError ());
+ }
+ }
+
public void VerifyClsCompliance ()
{
foreach (var tp in names) {
@@ -2270,7 +2323,7 @@ namespace Mono.CSharp {
public override string GetSignatureForError ()
{
- return TypeManager.CSharpName (type);
+ return type.GetSignatureForError ();
}
public override TypeSpec ResolveAsType (IMemberContext mc)
@@ -2418,7 +2471,7 @@ namespace Mono.CSharp {
if (mc != null) {
mc.Module.Compiler.Report.Error (452, loc,
"The type `{0}' must be a reference type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
- TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+ atype.GetSignatureForError (), tparam.GetSignatureForError (), context.GetSignatureForError ());
}
return false;
@@ -2428,7 +2481,7 @@ namespace Mono.CSharp {
if (mc != null) {
mc.Module.Compiler.Report.Error (453, loc,
"The type `{0}' must be a non-nullable value type in order to use it as type parameter `{1}' in the generic type or method `{2}'",
- TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+ atype.GetSignatureForError (), tparam.GetSignatureForError (), context.GetSignatureForError ());
}
return false;
@@ -2489,7 +2542,7 @@ namespace Mono.CSharp {
mc.Module.Compiler.Report.SymbolRelatedToPreviousError (atype);
mc.Module.Compiler.Report.Error (310, loc,
"The type `{0}' must have a public parameterless constructor in order to use it as parameter `{1}' in the generic type or method `{2}'",
- TypeManager.CSharpName (atype), tparam.GetSignatureForError (), context.GetSignatureForError ());
+ atype.GetSignatureForError (), tparam.GetSignatureForError (), context.GetSignatureForError ());
}
return false;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs
index ce43902..3576f28 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs
@@ -420,7 +420,7 @@ namespace Mono.CSharp
}
}
- IMemberDefinition definition;
+ IMethodDefinition definition;
if (tparams != null) {
var gmd = new ImportedGenericMethodDefinition ((MethodInfo) mb, returnType, parameters, tparams, this);
foreach (var tp in gmd.TypeParameters) {
@@ -429,10 +429,10 @@ namespace Mono.CSharp
definition = gmd;
} else {
- definition = new ImportedParameterMemberDefinition (mb, returnType, parameters, this);
+ definition = new ImportedMethodDefinition (mb, returnType, parameters, this);
}
- MethodSpec ms = new MethodSpec (kind, declaringType, definition, returnType, mb, parameters, mod);
+ MethodSpec ms = new MethodSpec (kind, declaringType, definition, returnType, parameters, mod);
if (tparams != null)
ms.IsGeneric = true;
@@ -774,24 +774,34 @@ namespace Mono.CSharp
for (int i = nested_hierarchy.Count; i != 0; --i) {
var t = nested_hierarchy [i - 1];
- spec = MemberCache.FindNestedType (spec, t.Name, t.Arity);
+ if (t.Kind == MemberKind.MissingType)
+ spec = t;
+ else
+ spec = MemberCache.FindNestedType (spec, t.Name, t.Arity);
+
if (t.Arity > 0) {
spec = spec.MakeGenericType (module, targs.Skip (targs_pos).Take (spec.Arity).ToArray ());
targs_pos += t.Arity;
}
}
- string name = type.Name;
- int index = name.IndexOf ('`');
- if (index > 0)
- name = name.Substring (0, index);
+ if (spec.Kind == MemberKind.MissingType) {
+ spec = new TypeSpec (MemberKind.MissingType, spec, new ImportedTypeDefinition (type_def, this), type_def, Modifiers.PUBLIC);
+ spec.MemberCache = MemberCache.Empty;
+ } else {
+ if ((type_def.Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.NestedPrivate && IgnorePrivateMembers)
+ return null;
- spec = MemberCache.FindNestedType (spec, name, targs.Length - targs_pos);
- if (spec == null)
- return null;
+ string name = type.Name;
+ int index = name.IndexOf ('`');
+ if (index > 0)
+ name = name.Substring (0, index);
+
+ spec = MemberCache.FindNestedType (spec, name, targs.Length - targs_pos);
- if (spec.Arity > 0) {
- spec = spec.MakeGenericType (module, targs.Skip (targs_pos).ToArray ());
+ if (spec.Arity > 0) {
+ spec = spec.MakeGenericType (module, targs.Skip (targs_pos).ToArray ());
+ }
}
}
@@ -1683,7 +1693,7 @@ namespace Mono.CSharp
{
readonly AParametersCollection parameters;
- public ImportedParameterMemberDefinition (MethodBase provider, TypeSpec type, AParametersCollection parameters, MetadataImporter importer)
+ protected ImportedParameterMemberDefinition (MethodBase provider, TypeSpec type, AParametersCollection parameters, MetadataImporter importer)
: base (provider, type, importer)
{
this.parameters = parameters;
@@ -1706,7 +1716,21 @@ namespace Mono.CSharp
#endregion
}
- class ImportedGenericMethodDefinition : ImportedParameterMemberDefinition, IGenericMethodDefinition
+ class ImportedMethodDefinition : ImportedParameterMemberDefinition, IMethodDefinition
+ {
+ public ImportedMethodDefinition (MethodBase provider, TypeSpec type, AParametersCollection parameters, MetadataImporter importer)
+ : base (provider, type, parameters, importer)
+ {
+ }
+
+ MethodBase IMethodDefinition.Metadata {
+ get {
+ return (MethodBase) provider;
+ }
+ }
+ }
+
+ class ImportedGenericMethodDefinition : ImportedMethodDefinition, IGenericMethodDefinition
{
readonly TypeParameterSpec[] tparams;
@@ -1877,33 +1901,36 @@ namespace Mono.CSharp
// or referenced from the user core in which case compilation error has to
// be reported because compiler cannot continue anyway
//
+
+ var report = ctx.Module.Compiler.Report;
+
for (int i = 0; i < types.Count; ++i) {
var t = types [i];
//
- // Report missing types only once per type
+ // Report missing types only once
//
- if (i > 0 && types.IndexOf (t) < i)
+ if (report.Printer.MissingTypeReported (t.MemberDefinition))
continue;
string name = t.GetSignatureForError ();
if (t.MemberDefinition.DeclaringAssembly == ctx.Module.DeclaringAssembly) {
- ctx.Module.Compiler.Report.Error (1683, loc,
+ report.Error (1683, loc,
"Reference to type `{0}' claims it is defined in this assembly, but it is not defined in source or any added modules",
name);
} else if (t.MemberDefinition.DeclaringAssembly.IsMissing) {
if (t.MemberDefinition.IsTypeForwarder) {
- ctx.Module.Compiler.Report.Error (1070, loc,
+ report.Error (1070, loc,
"The type `{0}' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly `{1}'",
name, t.MemberDefinition.DeclaringAssembly.FullName);
} else {
- ctx.Module.Compiler.Report.Error (12, loc,
+ report.Error (12, loc,
"The type `{0}' is defined in an assembly that is not referenced. Consider adding a reference to assembly `{1}'",
name, t.MemberDefinition.DeclaringAssembly.FullName);
}
} else {
- ctx.Module.Compiler.Report.Error (1684, loc,
+ report.Error (1684, loc,
"Reference to type `{0}' claims it is defined assembly `{1}', but it could not be found",
name, t.MemberDefinition.DeclaringAssembly.FullName);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs
index 4bd5f75..6953f6c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs
@@ -245,7 +245,7 @@ namespace Mono.CSharp
for (int i = 0; i < host.hoisted_params.Count; ++i) {
HoistedParameter hp = host.hoisted_params [i];
- HoistedParameter hp_cp = host.hoisted_params_copy [i];
+ HoistedParameter hp_cp = host.hoisted_params_copy [i] ?? hp;
FieldExpr from = new FieldExpr (hp_cp.Field, loc);
from.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
@@ -431,6 +431,13 @@ namespace Mono.CSharp
get { return hoisted_params; }
}
+ protected override Constructor DefineDefaultConstructor (bool is_static)
+ {
+ var ctor = base.DefineDefaultConstructor (is_static);
+ ctor.ModFlags |= Modifiers.DEBUGGER_HIDDEN;
+ return ctor;
+ }
+
protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class)
{
var mtype = Iterator.OriginalIteratorType;
@@ -469,17 +476,26 @@ namespace Mono.CSharp
current_field = AddCompilerGeneratedField ("$current", iterator_type_expr);
disposing_field = AddCompilerGeneratedField ("$disposing", new TypeExpression (Compiler.BuiltinTypes.Bool, Location));
- if (hoisted_params != null) {
+ if (Iterator.IsEnumerable && hoisted_params != null) {
//
// Iterators are independent, each GetEnumerator call has to
// create same enumerator therefore we have to keep original values
// around for re-initialization
//
- // TODO: Do it for assigned/modified parameters only
- //
hoisted_params_copy = new List<HoistedParameter> (hoisted_params.Count);
foreach (HoistedParameter hp in hoisted_params) {
- hoisted_params_copy.Add (new HoistedParameter (hp, "<$>" + hp.Field.Name));
+
+ //
+ // Don't create field copy for unmodified captured parameters
+ //
+ HoistedParameter hp_copy;
+ if (hp.IsAssigned) {
+ hp_copy = new HoistedParameter (hp, "<$>" + hp.Field.Name);
+ } else {
+ hp_copy = null;
+ }
+
+ hoisted_params_copy.Add (hp_copy);
}
}
@@ -565,7 +581,8 @@ namespace Mono.CSharp
protected override void EmitHoistedParameters (EmitContext ec, List<HoistedParameter> hoisted)
{
base.EmitHoistedParameters (ec, hoisted);
- base.EmitHoistedParameters (ec, hoisted_params_copy);
+ if (hoisted_params_copy != null)
+ base.EmitHoistedParameters (ec, hoisted_params_copy);
}
}
@@ -1101,7 +1118,7 @@ namespace Mono.CSharp
"The body of `{0}' cannot be an iterator block " +
"because `{1}' is not an iterator interface type",
method.GetSignatureForError (),
- TypeManager.CSharpName (ret));
+ ret.GetSignatureForError ());
return;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/linq.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/linq.cs
index 1c93d60..b52d8a8 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/linq.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/linq.cs
@@ -135,7 +135,7 @@ namespace Mono.CSharp.Linq
if (!Convert.ImplicitConversionExists (rc, a.Expr, source_type)) {
rc.Report.Error (1936, loc, "An implementation of `{0}' query expression pattern for source type `{1}' could not be found",
- best.Name, TypeManager.CSharpName (a.Type));
+ best.Name, a.Type.GetSignatureForError ());
return true;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/literal.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/literal.cs
index bdbd57a..1af2d0c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/literal.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/literal.cs
@@ -61,7 +61,7 @@ namespace Mono.CSharp
if (TypeSpec.IsValueType (t)) {
ec.Report.Error(37, loc, "Cannot convert null to `{0}' because it is a value type",
- TypeManager.CSharpName(t));
+ t.GetSignatureForError ());
return;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs
index ef62183..447319e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs
@@ -483,6 +483,26 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format ("
}
}
+ public class PragmaPreProcessorDirective : PreProcessorDirective
+ {
+ public bool Disalbe { get; set; }
+ public List<int> Codes = new List<int> ();
+
+ public PragmaPreProcessorDirective (int line, int col, int endLine, int endCol, Tokenizer.PreprocessorDirective cmd, string arg) : base (line, col, endLine, endCol, cmd, arg)
+ {
+ }
+ }
+
+ public class LineProcessorDirective : PreProcessorDirective
+ {
+ public int LineNumber { get; set; }
+ public string FileName { get; set; }
+
+ public LineProcessorDirective (int line, int col, int endLine, int endCol, Tokenizer.PreprocessorDirective cmd, string arg) : base (line, col, endLine, endCol, cmd, arg)
+ {
+ }
+ }
+
public class PreProcessorDirective : SpecialBase
{
public readonly int Line;
@@ -562,7 +582,33 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format ("
{
if (inComment)
EndComment (startLine, startCol);
- Specials.Add (new PreProcessorDirective (startLine, startCol, endLine, endColumn, cmd, arg));
+ switch (cmd) {
+ case Tokenizer.PreprocessorDirective.Pragma:
+ Specials.Add (new PragmaPreProcessorDirective (startLine, startCol, endLine, endColumn, cmd, arg));
+ break;
+ case Tokenizer.PreprocessorDirective.Line:
+ Specials.Add (new LineProcessorDirective (startLine, startCol, endLine, endColumn, cmd, arg));
+ break;
+ default:
+ Specials.Add (new PreProcessorDirective (startLine, startCol, endLine, endColumn, cmd, arg));
+ break;
+ }
+ }
+
+ #if FULL_AST
+ public PragmaPreProcessorDirective SetPragmaDisable(bool disable)
+ {
+ var pragmaDirective = Specials [Specials.Count - 1] as PragmaPreProcessorDirective;
+ if (pragmaDirective == null)
+ return null;
+ pragmaDirective.Disalbe = disable;
+ return pragmaDirective;
+ }
+ #endif
+
+ public LineProcessorDirective GetCurrentLineProcessorDirective()
+ {
+ return Specials [Specials.Count - 1] as LineProcessorDirective;
}
public enum NewLine { Unix, Windows }
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/membercache.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/membercache.cs
index cad910e..5da68dc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/membercache.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/membercache.cs
@@ -795,13 +795,14 @@ namespace Mono.CSharp {
while (true) {
foreach (var entry in abstract_type.MemberCache.member_hash) {
foreach (var name_entry in entry.Value) {
- if ((name_entry.Modifiers & (Modifiers.ABSTRACT | Modifiers.OVERRIDE)) != Modifiers.ABSTRACT)
+ if ((name_entry.Modifiers & Modifiers.ABSTRACT) == 0)
continue;
- if (name_entry.Kind != MemberKind.Method)
+ var ms = name_entry as MethodSpec;
+ if (ms == null)
continue;
- abstract_methods.Add ((MethodSpec) name_entry);
+ abstract_methods.Add (ms);
}
}
@@ -1445,9 +1446,12 @@ namespace Mono.CSharp {
"A partial method declaration and partial method implementation must be both `static' or neither");
}
- Report.SymbolRelatedToPreviousError (ce);
- Report.Error (764, member.Location,
- "A partial method declaration and partial method implementation must be both `unsafe' or neither");
+ if ((method_a.ModFlags & Modifiers.UNSAFE) != (method_b.ModFlags & Modifiers.UNSAFE)) {
+ Report.SymbolRelatedToPreviousError (ce);
+ Report.Error (764, member.Location,
+ "A partial method declaration and partial method implementation must be both `unsafe' or neither");
+ }
+
return false;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs
index 243bee2..0c91b23 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs
@@ -188,7 +188,7 @@ namespace Mono.CSharp {
}
}
- public interface IGenericMethodDefinition : IMemberDefinition
+ public interface IGenericMethodDefinition : IMethodDefinition
{
TypeParameterSpec[] TypeParameters { get; }
int TypeParametersCount { get; }
@@ -198,18 +198,17 @@ namespace Mono.CSharp {
public sealed class MethodSpec : MemberSpec, IParametersMember
{
- MethodBase metaInfo, inflatedMetaInfo;
+ MethodBase inflatedMetaInfo;
AParametersCollection parameters;
TypeSpec returnType;
TypeSpec[] targs;
TypeParameterSpec[] constraints;
- public MethodSpec (MemberKind kind, TypeSpec declaringType, IMemberDefinition details, TypeSpec returnType,
- MethodBase info, AParametersCollection parameters, Modifiers modifiers)
+ public MethodSpec (MemberKind kind, TypeSpec declaringType, IMethodDefinition details, TypeSpec returnType,
+ AParametersCollection parameters, Modifiers modifiers)
: base (kind, declaringType, details, modifiers)
{
- this.metaInfo = info;
this.parameters = parameters;
this.returnType = returnType;
}
@@ -237,6 +236,12 @@ namespace Mono.CSharp {
}
}
+ public new IMethodDefinition MemberDefinition {
+ get {
+ return (IMethodDefinition) definition;
+ }
+ }
+
public IGenericMethodDefinition GenericDefinition {
get {
return (IGenericMethodDefinition) definition;
@@ -322,21 +327,21 @@ namespace Mono.CSharp {
if (DeclaringType.IsTypeBuilder) {
if (IsConstructor)
- inflatedMetaInfo = TypeBuilder.GetConstructor (dt_meta, (ConstructorInfo) metaInfo);
+ inflatedMetaInfo = TypeBuilder.GetConstructor (dt_meta, (ConstructorInfo) MemberDefinition.Metadata);
else
- inflatedMetaInfo = TypeBuilder.GetMethod (dt_meta, (MethodInfo) metaInfo);
+ inflatedMetaInfo = TypeBuilder.GetMethod (dt_meta, (MethodInfo) MemberDefinition.Metadata);
} else {
#if STATIC
// it should not be reached
throw new NotImplementedException ();
#else
- inflatedMetaInfo = MethodInfo.GetMethodFromHandle (metaInfo.MethodHandle, dt_meta.TypeHandle);
+ inflatedMetaInfo = MethodInfo.GetMethodFromHandle (MemberDefinition.Metadata.MethodHandle, dt_meta.TypeHandle);
#endif
}
state &= ~StateFlags.PendingMetaInflate;
} else {
- inflatedMetaInfo = metaInfo;
+ inflatedMetaInfo = MemberDefinition.Metadata;
}
}
@@ -518,19 +523,10 @@ namespace Mono.CSharp {
return missing;
}
-
- public void SetMetaInfo (MethodInfo info)
- {
- if (this.metaInfo != null)
- throw new InternalErrorException ("MetaInfo reset");
-
- this.metaInfo = info;
- }
}
- public abstract class MethodOrOperator : MethodCore, IMethodData
+ public abstract class MethodOrOperator : MethodCore, IMethodData, IMethodDefinition
{
- public MethodBuilder MethodBuilder;
ReturnParameter return_attributes;
SecurityType declarative_security;
protected MethodData MethodData;
@@ -583,6 +579,19 @@ namespace Mono.CSharp {
}
}
+ MethodBase IMethodDefinition.Metadata {
+ get {
+ return MethodData.MethodBuilder;
+ }
+ }
+
+ // TODO: Remove and use MethodData abstraction
+ public MethodBuilder MethodBuilder {
+ get {
+ return MethodData.MethodBuilder;
+ }
+ }
+
protected override bool CheckForDuplications ()
{
return Parent.MemberCache.CheckExistingMembersOverloads (this, parameters);
@@ -609,41 +618,34 @@ namespace Mono.CSharp {
else
kind = MemberKind.Method;
+ string explicit_name;
+
if (IsPartialDefinition) {
caching_flags &= ~Flags.Excluded_Undetected;
caching_flags |= Flags.Excluded;
// Add to member cache only when a partial method implementation has not been found yet
- if ((caching_flags & Flags.PartialDefinitionExists) == 0) {
-// MethodBase mb = new PartialMethodDefinitionInfo (this);
+ if ((caching_flags & Flags.PartialDefinitionExists) != 0)
+ return true;
- spec = new MethodSpec (kind, Parent.Definition, this, ReturnType, null, parameters, ModFlags);
- if (MemberName.Arity > 0) {
- spec.IsGeneric = true;
+ if (IsExplicitImpl)
+ return true;
- // TODO: Have to move DefineMethod after Define (ideally to Emit)
- throw new NotImplementedException ("Generic partial methods");
- }
+ explicit_name = null;
+ } else {
+ MethodData = new MethodData (this, ModFlags, flags, this, base_method);
- Parent.MemberCache.AddMember (spec);
- }
+ if (!MethodData.Define (Parent.PartialContainer, GetFullName (MemberName)))
+ return false;
- return true;
+ explicit_name = MethodData.MetadataName;
}
- MethodData = new MethodData (
- this, ModFlags, flags, this, MethodBuilder, base_method);
-
- if (!MethodData.Define (Parent.PartialContainer, GetFullName (MemberName)))
- return false;
-
- MethodBuilder = MethodData.MethodBuilder;
-
- spec = new MethodSpec (kind, Parent.Definition, this, ReturnType, MethodBuilder, parameters, ModFlags);
+ spec = new MethodSpec (kind, Parent.Definition, this, ReturnType, parameters, ModFlags);
if (MemberName.Arity > 0)
spec.IsGeneric = true;
-
- Parent.MemberCache.AddMember (this, MethodBuilder.Name, spec);
+
+ Parent.MemberCache.AddMember (this, explicit_name, spec);
return true;
}
@@ -713,7 +715,8 @@ namespace Mono.CSharp {
if (MethodData != null)
MethodData.Emit (Parent);
- Block = null;
+ if ((ModFlags & Modifiers.PARTIAL) == 0)
+ Block = null;
}
protected void Error_ConditionalAttributeIsNotValid ()
@@ -798,9 +801,36 @@ namespace Mono.CSharp {
#endregion
+ public virtual void PrepareEmit ()
+ {
+ var mb = MethodData.DefineMethodBuilder (Parent);
+
+ if (CurrentTypeParameters != null) {
+ string[] gnames = new string[CurrentTypeParameters.Count];
+ for (int i = 0; i < gnames.Length; ++i) {
+ gnames[i] = CurrentTypeParameters[i].Name;
+ }
+
+ var gen_params = MethodBuilder.DefineGenericParameters (gnames);
+
+ for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
+ var tp = CurrentTypeParameters[i];
+
+ tp.Define (gen_params[i]);
+ }
+ }
+
+ //
+ // Generic method has been already defined to resolve method parameters
+ // correctly when they use type parameters
+ //
+ mb.SetParameters (parameters.GetMetaInfo ());
+ mb.SetReturnType (ReturnType.GetMetaInfo ());
+ }
+
public override void WriteDebugSymbol (MonoSymbolFile file)
{
- if (MethodData != null)
+ if (MethodData != null && !IsPartialDefinition)
MethodData.WriteDebugSymbol (file);
}
}
@@ -844,7 +874,7 @@ namespace Mono.CSharp {
}
}
-#endregion
+ #endregion
public override void Accept (StructuralVisitor visitor)
{
@@ -972,10 +1002,9 @@ namespace Mono.CSharp {
void CreateTypeParameters ()
{
var tparams = MemberName.TypeParameters;
- string[] snames = new string[MemberName.Arity];
var parent_tparams = Parent.TypeParametersAll;
- for (int i = 0; i < snames.Length; i++) {
+ for (int i = 0; i < MemberName.Arity; i++) {
string type_argument_name = tparams[i].MemberName.Name;
if (block == null) {
@@ -1000,12 +1029,9 @@ namespace Mono.CSharp {
tparams[i].WarningParentNameConflict (tp);
}
}
-
- snames[i] = type_argument_name;
}
- GenericTypeParameterBuilder[] gen_params = MethodBuilder.DefineGenericParameters (snames);
- tparams.Define (gen_params, null, 0, Parent);
+ tparams.Create (null, 0, Parent);
}
protected virtual void DefineTypeParameters ()
@@ -1171,9 +1197,6 @@ namespace Mono.CSharp {
"Introducing `Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?");
}
- if (partialMethodImplementation != null && IsPartialDefinition)
- MethodBuilder = partialMethodImplementation.MethodBuilder;
-
if (Compiler.Settings.StdLib && ReturnType.IsSpecialRuntimeType) {
Error1599 (Location, ReturnType, Report);
return false;
@@ -1208,7 +1231,7 @@ namespace Mono.CSharp {
Report.Error (1983, Location, "The return type of an async method must be void, Task, or Task<T>");
}
- block = (ToplevelBlock) block.ConvertToAsyncTask (this, Parent.PartialContainer, parameters, ReturnType, Location);
+ block = (ToplevelBlock) block.ConvertToAsyncTask (this, Parent.PartialContainer, parameters, ReturnType, null, Location);
ModFlags |= Modifiers.DEBUGGER_HIDDEN;
}
@@ -1272,6 +1295,22 @@ namespace Mono.CSharp {
return true;
}
+ public override void PrepareEmit ()
+ {
+ if (IsPartialDefinition) {
+ //
+ // Use partial method implementation builder for partial method declaration attributes
+ //
+ if (partialMethodImplementation != null) {
+ MethodData = partialMethodImplementation.MethodData;
+ }
+
+ return;
+ }
+
+ base.PrepareEmit ();
+ }
+
//
// Emits the code
//
@@ -1279,11 +1318,8 @@ namespace Mono.CSharp {
{
try {
if (IsPartialDefinition) {
- //
- // Use partial method implementation builder for partial method declaration attributes
- //
- if (partialMethodImplementation != null) {
- MethodBuilder = partialMethodImplementation.MethodBuilder;
+ if (partialMethodImplementation != null && CurrentTypeParameters != null) {
+ CurrentTypeParameters.CheckPartialConstraints (partialMethodImplementation);
}
return;
@@ -1297,6 +1333,7 @@ namespace Mono.CSharp {
if (CurrentTypeParameters != null) {
for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
var tp = CurrentTypeParameters [i];
+
tp.CheckGenericConstraints (false);
tp.Emit ();
}
@@ -1312,10 +1349,8 @@ namespace Mono.CSharp {
Module.PredefinedAttributes.Extension.EmitAttribute (MethodBuilder);
base.Emit ();
- } catch {
- Console.WriteLine ("Internal compiler error at {0}: exception caught while emitting {1}",
- Location, MethodBuilder);
- throw;
+ } catch (Exception e) {
+ throw new InternalErrorException (this, e);
}
}
@@ -1329,13 +1364,12 @@ namespace Mono.CSharp {
public static void Error1599 (Location loc, TypeSpec t, Report Report)
{
- Report.Error (1599, loc, "Method or delegate cannot return type `{0}'", TypeManager.CSharpName (t));
+ Report.Error (1599, loc, "Method or delegate cannot return type `{0}'", t.GetSignatureForError ());
}
protected override bool ResolveMemberType ()
{
if (CurrentTypeParameters != null) {
- MethodBuilder = Parent.TypeBuilder.DefineMethod (GetFullName (MemberName), flags);
CreateTypeParameters ();
}
@@ -1485,7 +1519,7 @@ namespace Mono.CSharp {
}
}
- public class Constructor : MethodCore, IMethodData
+ public class Constructor : MethodCore, IMethodData, IMethodDefinition
{
public ConstructorBuilder ConstructorBuilder;
public ConstructorInitializer Initializer;
@@ -1533,6 +1567,13 @@ namespace Mono.CSharp {
}
}
+
+ MethodBase IMethodDefinition.Metadata {
+ get {
+ return ConstructorBuilder;
+ }
+ }
+
//
// Returns true if this is a default constructor
//
@@ -1620,7 +1661,7 @@ namespace Mono.CSharp {
ca, CallingConventions,
parameters.GetMetaInfo ());
- spec = new MethodSpec (MemberKind.Constructor, Parent.Definition, this, Compiler.BuiltinTypes.Void, ConstructorBuilder, parameters, ModFlags);
+ spec = new MethodSpec (MemberKind.Constructor, Parent.Definition, this, Compiler.BuiltinTypes.Void, parameters, ModFlags);
Parent.MemberCache.AddMember (spec);
@@ -1828,10 +1869,6 @@ namespace Mono.CSharp {
//
public class MethodData
{
-#if !STATIC
- static FieldInfo methodbuilder_attrs_field;
-#endif
-
public readonly IMethodData method;
//
@@ -1848,6 +1885,7 @@ namespace Mono.CSharp {
protected TypeSpec declaring_type;
protected MethodSpec parent_method;
SourceMethodBuilder debug_builder;
+ string full_name;
MethodBuilder builder;
public MethodBuilder MethodBuilder {
@@ -1862,6 +1900,12 @@ namespace Mono.CSharp {
}
}
+ public string MetadataName {
+ get {
+ return full_name;
+ }
+ }
+
public MethodData (InterfaceMemberBase member,
Modifiers modifiers, MethodAttributes flags, IMethodData method)
{
@@ -1874,11 +1918,10 @@ namespace Mono.CSharp {
public MethodData (InterfaceMemberBase member,
Modifiers modifiers, MethodAttributes flags,
- IMethodData method, MethodBuilder builder,
+ IMethodData method,
MethodSpec parent_method)
: this (member, modifiers, flags, method)
{
- this.builder = builder;
this.parent_method = parent_method;
}
@@ -1896,13 +1939,13 @@ namespace Mono.CSharp {
if (member is PropertyBase) {
container.Compiler.Report.Error (550, method.Location,
"`{0}' is an accessor not found in interface member `{1}{2}'",
- method.GetSignatureForError (), TypeManager.CSharpName (member.InterfaceType),
+ method.GetSignatureForError (), member.InterfaceType.GetSignatureForError (),
member.GetSignatureForError ().Substring (member.GetSignatureForError ().LastIndexOf ('.')));
} else {
container.Compiler.Report.Error (539, method.Location,
"`{0}.{1}' in explicit interface declaration is not a member of interface",
- TypeManager.CSharpName (member.InterfaceType), member.ShortName);
+ member.InterfaceType.GetSignatureForError (), member.ShortName);
}
return false;
}
@@ -1910,7 +1953,7 @@ namespace Mono.CSharp {
container.Compiler.Report.SymbolRelatedToPreviousError (implementing);
container.Compiler.Report.Error (683, method.Location,
"`{0}' explicit method implementation cannot implement `{1}' because it is an accessor",
- member.GetSignatureForError (), TypeManager.CSharpSignature (implementing));
+ member.GetSignatureForError (), implementing.GetSignatureForError ());
return false;
}
} else {
@@ -2033,58 +2076,45 @@ namespace Mono.CSharp {
method_full_name = implementing.MemberDefinition.Name;
}
- DefineMethodBuilder (container, method_full_name, method.ParameterInfo);
+ full_name = method_full_name;
+ declaring_type = container.Definition;
- if (builder == null)
- return false;
+ return true;
+ }
-// if (container.CurrentType != null)
-// declaring_type = container.CurrentType;
-// else
- declaring_type = container.Definition;
+ void DefineOverride (TypeDefinition container)
+ {
+ if (implementing == null)
+ return;
- if (implementing != null && member.IsExplicitImpl) {
- container.TypeBuilder.DefineMethodOverride (builder, (MethodInfo) implementing.GetMetaInfo ());
- }
+ if (!member.IsExplicitImpl)
+ return;
- return true;
+ container.TypeBuilder.DefineMethodOverride (builder, (MethodInfo) implementing.GetMetaInfo ());
}
-
- /// <summary>
- /// Create the MethodBuilder for the method
- /// </summary>
- void DefineMethodBuilder (TypeDefinition container, string method_name, ParametersCompiled param)
+ //
+ // Creates partial MethodBuilder for the method when has generic parameters used
+ // as arguments or return type
+ //
+ public MethodBuilder DefineMethodBuilder (TypeDefinition container)
{
- var return_type = method.ReturnType.GetMetaInfo ();
- var p_types = param.GetMetaInfo ();
+ if (builder != null)
+ throw new InternalErrorException ();
- if (builder == null) {
- builder = container.TypeBuilder.DefineMethod (
- method_name, flags, method.CallingConventions,
- return_type, p_types);
- return;
- }
+ builder = container.TypeBuilder.DefineMethod (full_name, flags, method.CallingConventions);
+ return builder;
+ }
- //
- // Generic method has been already defined to resolve method parameters
- // correctly when they use type parameters
- //
- builder.SetParameters (p_types);
- builder.SetReturnType (return_type);
- if (builder.Attributes != flags) {
-#if STATIC
- builder.__SetAttributes (flags);
-#else
- try {
- if (methodbuilder_attrs_field == null)
- methodbuilder_attrs_field = typeof (MethodBuilder).GetField ("attrs", BindingFlags.NonPublic | BindingFlags.Instance);
- methodbuilder_attrs_field.SetValue (builder, flags);
- } catch {
- container.Compiler.Report.RuntimeMissingSupport (method.Location, "Generic method MethodAttributes");
- }
-#endif
- }
+ //
+ // Creates full MethodBuilder for the method
+ //
+ public MethodBuilder DefineMethodBuilder (TypeDefinition container, ParametersCompiled param)
+ {
+ DefineMethodBuilder (container);
+ builder.SetReturnType (method.ReturnType.GetMetaInfo ());
+ builder.SetParameters (param.GetMetaInfo ());
+ return builder;
}
//
@@ -2092,6 +2122,8 @@ namespace Mono.CSharp {
//
public void Emit (TypeDefinition parent)
{
+ DefineOverride (parent);
+
var mc = (IMemberContext) method;
method.ParameterInfo.ApplyAttributes (mc, MethodBuilder);
@@ -2231,7 +2263,7 @@ namespace Mono.CSharp {
// Ooouh Martin, templates are missing here.
// When it will be possible move here a lot of child code and template method type.
- public abstract class AbstractPropertyEventMethod : MemberCore, IMethodData {
+ public abstract class AbstractPropertyEventMethod : MemberCore, IMethodData, IMethodDefinition {
protected MethodData method_data;
protected ToplevelBlock block;
protected SecurityType declarative_security;
@@ -2297,6 +2329,12 @@ namespace Mono.CSharp {
}
}
+ MethodBase IMethodDefinition.Metadata {
+ get {
+ return method_data.MethodBuilder;
+ }
+ }
+
public abstract ParametersCompiled ParameterInfo { get ; }
public abstract TypeSpec ReturnType { get; }
@@ -2307,7 +2345,7 @@ namespace Mono.CSharp {
if (a.Type == pa.CLSCompliant || a.Type == pa.Obsolete || a.Type == pa.Conditional) {
Report.Error (1667, a.Location,
"Attribute `{0}' is not valid on property or event accessors. It is valid on `{1}' declarations only",
- TypeManager.CSharpName (a.Type), a.GetValidTargets ());
+ a.Type.GetSignatureForError (), a.GetValidTargets ());
return;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/modifiers.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/modifiers.cs
index 3edbed6..f842410 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/modifiers.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/modifiers.cs
@@ -262,7 +262,7 @@ namespace Mono.CSharp
return mod;
}
- for (i = 1; i <= (int) Modifiers.TOP; i <<= 1) {
+ for (i = 1; i < (int) Modifiers.TOP; i <<= 1) {
if ((i & invalid_flags) == 0)
continue;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/module.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/module.cs
index 017664e..4eeb37d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/module.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/module.cs
@@ -128,6 +128,9 @@ namespace Mono.CSharp
PredefinedTypes predefined_types;
PredefinedMembers predefined_members;
+ public Binary.PredefinedOperator[] OperatorsBinaryEqualityLifted;
+ public Binary.PredefinedOperator[] OperatorsBinaryLifted;
+
static readonly string[] attribute_targets = new string[] { "assembly", "module" };
public ModuleContainer (CompilerContext context)
@@ -529,11 +532,37 @@ namespace Mono.CSharp
return "<module>";
}
+ public Binary.PredefinedOperator[] GetPredefinedEnumAritmeticOperators (TypeSpec enumType, bool nullable)
+ {
+ TypeSpec underlying;
+ Binary.Operator mask = 0;
+
+ if (nullable) {
+ underlying = Nullable.NullableInfo.GetEnumUnderlyingType (this, enumType);
+ mask = Binary.Operator.NullableMask;
+ } else {
+ underlying = EnumSpec.GetUnderlyingType (enumType);
+ }
+
+ var operators = new[] {
+ new Binary.PredefinedOperator (enumType, underlying,
+ mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+ new Binary.PredefinedOperator (underlying, enumType,
+ mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+ new Binary.PredefinedOperator (enumType, mask | Binary.Operator.SubtractionMask, underlying)
+ };
+
+ return operators;
+ }
+
public void InitializePredefinedTypes ()
{
predefined_attributes = new PredefinedAttributes (this);
predefined_types = new PredefinedTypes (this);
predefined_members = new PredefinedMembers (this);
+
+ OperatorsBinaryEqualityLifted = Binary.CreateEqualityLiftedOperatorsTable (this);
+ OperatorsBinaryLifted = Binary.CreateStandardLiftedOperatorsTable (this);
}
public override bool IsClsComplianceRequired ()
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs
index f9a60fa..4002e68 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs
@@ -276,16 +276,7 @@ namespace Mono.CSharp {
public Namespace AddNamespace (MemberName name)
{
- Namespace ns_parent;
- if (name.Left != null) {
- if (parent != null)
- ns_parent = parent.AddNamespace (name.Left);
- else
- ns_parent = AddNamespace (name.Left);
- } else {
- ns_parent = this;
- }
-
+ var ns_parent = name.Left == null ? this : AddNamespace (name.Left);
return ns_parent.TryAddNamespace (name.Basename);
}
@@ -683,11 +674,9 @@ namespace Mono.CSharp {
}
}
- public IEnumerable<string> Conditionals {
+ public IDictionary<string, bool> Conditionals {
get {
- if (conditionals == null)
- return Enumerable.Empty<string> ();
- return conditionals.Where (kv => kv.Value).Select (kv => kv.Key);
+ return conditionals ?? new Dictionary<string, bool> ();
}
}
@@ -771,6 +760,11 @@ namespace Mono.CSharp {
return Compiler.Settings.IsConditionalSymbolDefined (value);
}
+
+ public override void Accept (StructuralVisitor visitor)
+ {
+ visitor.Visit (this);
+ }
}
@@ -1076,6 +1070,9 @@ namespace Mono.CSharp {
public override void GetCompletionStartingWith (string prefix, List<string> results)
{
+ if (Usings == null)
+ return;
+
foreach (var un in Usings) {
if (un.Alias != null)
continue;
@@ -1344,7 +1341,7 @@ namespace Mono.CSharp {
return false;
}
-
+
public override void Accept (StructuralVisitor visitor)
{
visitor.Visit (this);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs
index 788bbfb..96afce4 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs
@@ -13,6 +13,7 @@
//
using System;
+using SLE = System.Linq.Expressions;
#if STATIC
using IKVM.Reflection.Emit;
@@ -81,6 +82,12 @@ namespace Mono.CSharp.Nullable
{
return ((InflatedTypeSpec) nullableType).TypeArguments[0];
}
+
+ public static TypeSpec GetEnumUnderlyingType (ModuleContainer module, TypeSpec nullableEnum)
+ {
+ return module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (module,
+ new[] { EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)) });
+ }
}
public class Unwrap : Expression, IMemoryLocation
@@ -88,9 +95,10 @@ namespace Mono.CSharp.Nullable
Expression expr;
LocalTemporary temp;
+ Expression temp_field;
readonly bool useDefaultValue;
- Unwrap (Expression expr, bool useDefaultValue)
+ public Unwrap (Expression expr, bool useDefaultValue = true)
{
this.expr = expr;
this.loc = expr.Location;
@@ -105,6 +113,7 @@ namespace Mono.CSharp.Nullable
return expr.ContainsEmitWithAwait ();
}
+ // TODO: REMOVE
public static Expression Create (Expression expr)
{
//
@@ -117,6 +126,18 @@ namespace Mono.CSharp.Nullable
return Create (expr, false);
}
+ public static Expression CreateUnwrapped (Expression expr)
+ {
+ //
+ // Avoid unwraping and wraping of same type
+ //
+ Wrap wrap = expr as Wrap;
+ if (wrap != null)
+ return wrap.Child;
+
+ return Create (expr, true);
+ }
+
public static Unwrap Create (Expression expr, bool useDefaultValue)
{
return new Unwrap (expr, useDefaultValue);
@@ -166,6 +187,14 @@ namespace Mono.CSharp.Nullable
call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null);
}
+ public override Expression EmitToField (EmitContext ec)
+ {
+ if (temp_field == null)
+ temp_field = this.expr.EmitToField (ec);
+
+ return this;
+ }
+
public override bool Equals (object obj)
{
Unwrap uw = obj as Unwrap;
@@ -189,9 +218,9 @@ namespace Mono.CSharp.Nullable
}
}
- void Store (EmitContext ec)
+ public void Store (EmitContext ec)
{
- if (temp != null)
+ if (temp != null || temp_field != null)
return;
if (expr is VariableReference)
@@ -203,20 +232,35 @@ namespace Mono.CSharp.Nullable
public void Load (EmitContext ec)
{
- if (expr is VariableReference)
+ if (temp_field != null)
+ temp_field.Emit (ec);
+ else if (expr is VariableReference)
expr.Emit (ec);
else
LocalVariable.Emit (ec);
}
- public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
+ public override SLE.Expression MakeExpression (BuilderContext ctx)
{
return expr.MakeExpression (ctx);
}
public void AddressOf (EmitContext ec, AddressOp mode)
{
- IMemoryLocation ml = expr as VariableReference;
+ IMemoryLocation ml;
+
+ if (temp_field != null) {
+ ml = temp_field as IMemoryLocation;
+ if (ml == null) {
+ var lt = new LocalTemporary (temp_field.Type);
+ temp_field.Emit (ec);
+ lt.Store (ec);
+ ml = lt;
+ }
+ } else {
+ ml = expr as VariableReference;
+ }
+
if (ml != null)
ml.AddressOf (ec, mode);
else
@@ -228,7 +272,7 @@ namespace Mono.CSharp.Nullable
//
LocalTemporary LocalVariable {
get {
- if (temp == null)
+ if (temp == null && temp_field == null)
temp = new LocalTemporary (expr.Type);
return temp;
}
@@ -279,6 +323,12 @@ namespace Mono.CSharp.Nullable
return child_cast.CreateExpressionTree (ec);
}
+ var user_cast = child as UserCast;
+ if (user_cast != null) {
+ child.Type = type;
+ return user_cast.CreateExpressionTree (ec);
+ }
+
return base.CreateExpressionTree (ec);
}
@@ -317,10 +367,12 @@ namespace Mono.CSharp.Nullable
return new LiftedNull (nullable, loc);
}
- public static Constant CreateFromExpression (ResolveContext ec, Expression e)
+ public static Constant CreateFromExpression (ResolveContext rc, Expression e)
{
- ec.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
- TypeManager.CSharpName (e.Type));
+ if (!rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ rc.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
+ e.Type.GetSignatureForError ());
+ }
return ReducedExpression.Create (Create (e.Type, e.Location), e);
}
@@ -349,12 +401,12 @@ namespace Mono.CSharp.Nullable
//
// Generic lifting expression, supports all S/S? -> T/T? cases
//
- public class Lifted : Expression, IMemoryLocation
+ public class LiftedConversion : Expression, IMemoryLocation
{
Expression expr, null_value;
Unwrap unwrap;
- public Lifted (Expression expr, Unwrap unwrap, TypeSpec type)
+ public LiftedConversion (Expression expr, Unwrap unwrap, TypeSpec type)
{
this.expr = expr;
this.unwrap = unwrap;
@@ -362,7 +414,7 @@ namespace Mono.CSharp.Nullable
this.type = type;
}
- public Lifted (Expression expr, Expression unwrap, TypeSpec type)
+ public LiftedConversion (Expression expr, Expression unwrap, TypeSpec type)
: this (expr, unwrap as Unwrap, type)
{
}
@@ -393,9 +445,11 @@ namespace Mono.CSharp.Nullable
// Wrap target for T?
if (type.IsNullableType) {
- expr = Wrap.Create (expr, type);
- if (expr == null)
- return null;
+ if (!expr.Type.IsNullableType) {
+ expr = Wrap.Create (expr, type);
+ if (expr == null)
+ return null;
+ }
null_value = LiftedNull.Create (type, loc);
} else if (TypeSpec.IsValueType (type)) {
@@ -422,6 +476,7 @@ namespace Mono.CSharp.Nullable
ec.MarkLabel (is_null_label);
null_value.Emit (ec);
+
ec.MarkLabel (end_label);
}
@@ -540,266 +595,90 @@ namespace Mono.CSharp.Nullable
}
}
- public class LiftedBinaryOperator : Binary
+ //
+ // Lifted version of binary operators
+ //
+ class LiftedBinaryOperator : Expression
{
- Unwrap left_unwrap, right_unwrap;
- Expression left_orig, right_orig;
- Expression user_operator;
- MethodSpec wrap_ctor;
-
- public LiftedBinaryOperator (Binary.Operator op, Expression left, Expression right)
- : base (op, left, right)
+ public LiftedBinaryOperator (Binary b)
{
+ this.Binary = b;
+ this.loc = b.Location;
}
- bool IsBitwiseBoolean {
- get {
- return (Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) &&
- ((left_unwrap != null && left_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
- (right_unwrap != null && right_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
- }
- }
+ public Binary Binary { get; private set; }
- bool IsLeftNullLifted {
- get {
- return (state & State.LeftNullLifted) != 0;
- }
- }
+ public Expression Left { get; set; }
- bool IsRightNullLifted {
- get {
- return (state & State.RightNullLifted) != 0;
- }
- }
+ public Expression Right { get; set; }
- public override Expression CreateExpressionTree (ResolveContext ec)
- {
- if (user_operator != null)
- return user_operator.CreateExpressionTree (ec);
+ public Unwrap UnwrapLeft { get; set; }
- return base.CreateExpressionTree (ec);
- }
+ public Unwrap UnwrapRight { get; set; }
- //
- // CSC 2 has this behavior, it allows structs to be compared
- // with the null literal *outside* of a generics context and
- // inlines that as true or false.
- //
- Constant CreateNullConstant (ResolveContext ec, Expression expr)
- {
- // FIXME: Handle side effect constants
- Constant c = new BoolConstant (ec.BuiltinTypes, Oper == Operator.Inequality, loc);
+ public MethodSpec UserOperator { get; set; }
- if ((Oper & Operator.EqualityMask) != 0) {
- ec.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
- TypeManager.CSharpName (expr.Type), c.GetValueAsLiteral ());
- } else {
- ec.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
- TypeManager.CSharpName (expr.Type), c.GetValueAsLiteral ());
+ bool IsBitwiseBoolean {
+ get {
+ return (Binary.Oper == Binary.Operator.BitwiseAnd || Binary.Oper == Binary.Operator.BitwiseOr) &&
+ ((UnwrapLeft != null && UnwrapLeft.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
+ (UnwrapRight != null && UnwrapRight.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
}
-
- return ReducedExpression.Create (c, this);
}
- protected override Expression DoResolve (ResolveContext ec)
+ public override bool ContainsEmitWithAwait ()
{
- if ((Oper & Operator.LogicalMask) != 0) {
- Error_OperatorCannotBeApplied (ec, left, right);
- return null;
- }
-
- bool use_default_call = (Oper & (Operator.BitwiseMask | Operator.EqualityMask)) != 0;
- left_orig = left;
- if (left.Type.IsNullableType) {
- left = left_unwrap = Unwrap.Create (left, use_default_call);
- if (left == null)
- return null;
- }
-
- right_orig = right;
- if (right.Type.IsNullableType) {
- right = right_unwrap = Unwrap.Create (right, use_default_call);
- if (right == null)
- return null;
- }
-
- //
- // Some details are in 6.4.2, 7.2.7
- // Arguments can be lifted for equal operators when the return type is bool and both
- // arguments are of same type
- //
- if (left_orig is NullLiteral) {
- left = right;
- state |= State.LeftNullLifted;
- type = ec.BuiltinTypes.Bool;
- }
-
- if (right_orig.IsNull) {
- if ((Oper & Operator.ShiftMask) != 0)
- right = new EmptyExpression (ec.BuiltinTypes.Int);
- else
- right = left;
-
- state |= State.RightNullLifted;
- type = ec.BuiltinTypes.Bool;
- }
-
- eclass = ExprClass.Value;
- return DoResolveCore (ec, left_orig, right_orig);
+ return Left.ContainsEmitWithAwait () || Right.ContainsEmitWithAwait ();
}
- void EmitBitwiseBoolean (EmitContext ec)
+ public override Expression CreateExpressionTree (ResolveContext rc)
{
- Label load_left = ec.DefineLabel ();
- Label load_right = ec.DefineLabel ();
- Label end_label = ec.DefineLabel ();
-
- // null & value, null | value
- if (left_unwrap == null) {
- left_unwrap = right_unwrap;
- right_unwrap = null;
- right = left;
- }
-
- left_unwrap.Emit (ec);
- ec.Emit (OpCodes.Brtrue, load_right);
-
- // value & null, value | null
- if (right_unwrap != null) {
- right_unwrap.Emit (ec);
- ec.Emit (OpCodes.Brtrue_S, load_left);
- }
-
- left_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse_S, load_right);
-
- // load left
- ec.MarkLabel (load_left);
+ if (UserOperator != null) {
+ Arguments args = new Arguments (2);
+ args.Add (new Argument (Binary.Left));
+ args.Add (new Argument (Binary.Right));
- if (Oper == Operator.BitwiseAnd) {
- left_unwrap.Load (ec);
- } else {
- if (right_unwrap == null) {
- right.Emit (ec);
- if (right is EmptyConstantCast || right is EmptyCast)
- ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- } else {
- right_unwrap.Load (ec);
- right_unwrap = left_unwrap;
- }
- }
- ec.Emit (OpCodes.Br_S, end_label);
-
- // load right
- ec.MarkLabel (load_right);
- if (right_unwrap == null) {
- if (Oper == Operator.BitwiseAnd) {
- right.Emit (ec);
- if (right is EmptyConstantCast || right is EmptyCast)
- ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- } else {
- left_unwrap.Load (ec);
- }
- } else {
- right_unwrap.Load (ec);
+ var method = new UserOperatorCall (UserOperator, args, Binary.CreateExpressionTree, loc);
+ return method.CreateExpressionTree (rc);
}
- ec.MarkLabel (end_label);
+ return Binary.CreateExpressionTree (rc);
}
- //
- // Emits optimized equality or inequality operator when possible
- //
- void EmitEquality (EmitContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- //
- // Either left or right is null
- //
- if (left_unwrap != null && (IsRightNullLifted || right.IsNull)) {
- left_unwrap.EmitCheck (ec);
- if (Oper == Binary.Operator.Equality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
- }
- return;
- }
-
- if (right_unwrap != null && (IsLeftNullLifted || left.IsNull)) {
- right_unwrap.EmitCheck (ec);
- if (Oper == Binary.Operator.Equality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
- }
- return;
- }
-
- Label dissimilar_label = ec.DefineLabel ();
- Label end_label = ec.DefineLabel ();
+ if (rc.IsRuntimeBinder) {
+ if (UnwrapLeft == null && !Left.Type.IsNullableType)
+ Left = Wrap.Create (Left, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Left.Type }));
- if (user_operator != null) {
- user_operator.Emit (ec);
- ec.Emit (Oper == Operator.Equality ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, dissimilar_label);
+ if (UnwrapRight == null && !Right.Type.IsNullableType)
+ Right = Wrap.Create (Right, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Right.Type }));
} else {
- if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
- left = left.EmitToField (ec);
- right = right.EmitToField (ec);
+ if (UnwrapLeft == null && Left != null && Left.Type.IsNullableType) {
+ Left = Unwrap.CreateUnwrapped (Left);
+ UnwrapLeft = Left as Unwrap;
}
- left.Emit (ec);
- right.Emit (ec);
-
- ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
- }
-
- if (left_unwrap != null)
- left_unwrap.EmitCheck (ec);
-
- if (right_unwrap != null)
- right_unwrap.EmitCheck (ec);
-
- if (left_unwrap != null && right_unwrap != null) {
- if (Oper == Operator.Inequality)
- ec.Emit (OpCodes.Xor);
- else
- ec.Emit (OpCodes.Ceq);
- } else {
- if (Oper == Operator.Inequality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
+ if (UnwrapRight == null && Right != null && Right.Type.IsNullableType) {
+ Right = Unwrap.CreateUnwrapped (Right);
+ UnwrapRight = Right as Unwrap;
}
}
- ec.Emit (OpCodes.Br_S, end_label);
-
- ec.MarkLabel (dissimilar_label);
- if (Oper == Operator.Inequality)
- ec.EmitInt (1);
- else
- ec.EmitInt (0);
+ type = Binary.Type;
+ eclass = Binary.eclass;
- ec.MarkLabel (end_label);
+ return this;
}
-
- public override void EmitBranchable (EmitContext ec, Label target, bool onTrue)
- {
- Emit (ec);
- ec.Emit (onTrue ? OpCodes.Brtrue : OpCodes.Brfalse, target);
- }
public override void Emit (EmitContext ec)
{
- //
- // Optimize same expression operation
- //
- if (right_unwrap != null && right.Equals (left))
- right_unwrap = left_unwrap;
-
- if (user_operator == null && IsBitwiseBoolean) {
+ if (IsBitwiseBoolean && UserOperator == null) {
EmitBitwiseBoolean (ec);
return;
}
- if ((Oper & Operator.EqualityMask) != 0) {
+ if ((Binary.Oper & Binary.Operator.EqualityMask) != 0) {
EmitEquality (ec);
return;
}
@@ -807,28 +686,48 @@ namespace Mono.CSharp.Nullable
Label is_null_label = ec.DefineLabel ();
Label end_label = ec.DefineLabel ();
- if (left_unwrap != null) {
- left_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse, is_null_label);
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
+
+ if (UnwrapLeft != null) {
+ UnwrapLeft.EmitCheck (ec);
}
//
// Don't emit HasValue check when left and right expressions are same
//
- if (right_unwrap != null && !left.Equals (right)) {
- right_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse, is_null_label);
+ if (UnwrapRight != null && !Binary.Left.Equals (Binary.Right)) {
+ UnwrapRight.EmitCheck (ec);
+ if (UnwrapLeft != null) {
+ ec.Emit (OpCodes.And);
+ }
}
- EmitOperator (ec, left.Type);
+ ec.Emit (OpCodes.Brfalse, is_null_label);
+
+ if (UserOperator != null) {
+ var args = new Arguments (2);
+ args.Add (new Argument (Left));
+ args.Add (new Argument (Right));
+
+ var call = new CallEmitter ();
+ call.EmitPredefined (ec, UserOperator, args);
+ } else {
+ Binary.EmitOperator (ec, Left, Right);
+ }
- if (wrap_ctor != null)
- ec.Emit (OpCodes.Newobj, wrap_ctor);
+ //
+ // Wrap the result when the operator return type is nullable type
+ //
+ if (type.IsNullableType)
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
ec.Emit (OpCodes.Br_S, end_label);
ec.MarkLabel (is_null_label);
- if ((Oper & Operator.ComparisonMask) != 0) {
+ if ((Binary.Oper & Binary.Operator.ComparisonMask) != 0) {
ec.EmitInt (0);
} else {
LiftedNull.Create (type, loc).Emit (ec);
@@ -837,170 +736,283 @@ namespace Mono.CSharp.Nullable
ec.MarkLabel (end_label);
}
- protected override void EmitOperator (EmitContext ec, TypeSpec l)
+ void EmitBitwiseBoolean (EmitContext ec)
{
- if (user_operator != null) {
- user_operator.Emit (ec);
- return;
- }
+ Label load_left = ec.DefineLabel ();
+ Label load_right = ec.DefineLabel ();
+ Label end_label = ec.DefineLabel ();
+ Label is_null_label = ec.DefineLabel ();
- if (left.Type.IsNullableType) {
- l = NullableInfo.GetUnderlyingType (left.Type);
- left = EmptyCast.Create (left, l);
- }
+ bool or = Binary.Oper == Binary.Operator.BitwiseOr;
- if (right.Type.IsNullableType) {
- right = EmptyCast.Create (right, NullableInfo.GetUnderlyingType (right.Type));
- }
+ //
+ // Both operands are bool? types
+ //
+ if (UnwrapLeft != null && UnwrapRight != null) {
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
- base.EmitOperator (ec, l);
- }
+ Left.Emit (ec);
+ ec.Emit (OpCodes.Brtrue_S, load_right);
- Expression LiftResult (ResolveContext ec, Expression res_expr)
- {
- TypeSpec lifted_type;
+ Right.Emit (ec);
+ ec.Emit (OpCodes.Brtrue_S, load_left);
- //
- // Avoid double conversion
- //
- if (left_unwrap == null || IsLeftNullLifted || left_unwrap.Type != left.Type || (left_unwrap != null && IsRightNullLifted)) {
- lifted_type = new NullableType (left.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
+ UnwrapLeft.EmitCheck (ec);
+ ec.Emit (OpCodes.Brfalse_S, load_right);
- if (left is UserCast || left is EmptyCast || left is OpcodeCast)
- left.Type = lifted_type;
+ // load left
+ ec.MarkLabel (load_left);
+ if (or)
+ UnwrapRight.Load (ec);
else
- left = EmptyCast.Create (left, lifted_type);
- }
+ UnwrapLeft.Load (ec);
- if (left != right && (right_unwrap == null || IsRightNullLifted || right_unwrap.Type != right.Type || (right_unwrap != null && IsLeftNullLifted))) {
- lifted_type = new NullableType (right.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
-
- var r = right;
- if (r is ReducedExpression)
- r = ((ReducedExpression) r).OriginalExpression;
+ ec.Emit (OpCodes.Br_S, end_label);
- if (r is UserCast || r is EmptyCast || r is OpcodeCast)
- r.Type = lifted_type;
+ // load right
+ ec.MarkLabel (load_right);
+ if (or)
+ UnwrapLeft.Load (ec);
else
- right = EmptyCast.Create (right, lifted_type);
+ UnwrapRight.Load (ec);
+
+ ec.MarkLabel (end_label);
+ return;
}
- if ((Oper & Operator.ComparisonMask) == 0) {
- lifted_type = new NullableType (res_expr.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
+ //
+ // Faster version when one operand is bool
+ //
+ if (UnwrapLeft == null) {
+ //
+ // (bool, bool?)
+ //
+ // Optimizes remaining (false & bool?), (true | bool?) which are not easy to handle
+ // in binary expression reduction
+ //
+ var c = Left as BoolConstant;
+ if (c != null) {
+ // Keep evaluation order
+ UnwrapRight.Store (ec);
+
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+ } else if (Left.IsNull) {
+ UnwrapRight.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+ UnwrapRight.Load (ec);
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (is_null_label);
+ LiftedNull.Create (type, loc).Emit (ec);
+ } else {
+ Left.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
- wrap_ctor = NullableInfo.GetConstructor (lifted_type);
- type = res_expr.Type = lifted_type;
- }
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- if (IsLeftNullLifted) {
- left = LiftedNull.Create (right.Type, left.Location);
+ ec.Emit (OpCodes.Br_S, end_label);
+ ec.MarkLabel (load_right);
+ UnwrapRight.Original.Emit (ec);
+ }
+ } else {
//
- // Special case for bool?, the result depends on both null right side and left side value
+ // (bool?, bool)
//
- if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
- return res_expr;
- }
-
- if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
- return LiftedNull.CreateFromExpression (ec, res_expr);
+ // Keep left-right evaluation order
+ UnwrapLeft.Store (ec);
//
- // Value types and null comparison
+ // Optimizes remaining (bool? & false), (bool? | true) which are not easy to handle
+ // in binary expression reduction
//
- if (right_unwrap == null || (Oper & Operator.RelationalMask) != 0)
- return CreateNullConstant (ec, right_orig);
+ var c = Right as BoolConstant;
+ if (c != null) {
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+ } else if (Right.IsNull) {
+ UnwrapLeft.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+ UnwrapLeft.Load (ec);
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (is_null_label);
+ LiftedNull.Create (type, loc).Emit (ec);
+ } else {
+ Right.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
+
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (load_right);
+
+ UnwrapLeft.Load (ec);
+ }
}
- if (IsRightNullLifted) {
- right = LiftedNull.Create (left.Type, right.Location);
+ ec.MarkLabel (end_label);
+ }
+ //
+ // Emits optimized equality or inequality operator when possible
+ //
+ void EmitEquality (EmitContext ec)
+ {
+ //
+ // Either left or right is null
+ //
+ if (UnwrapLeft != null && Binary.Right.IsNull) { // TODO: Optimize for EmitBranchable
//
- // Special case for bool?, the result depends on both null right side and left side value
+ // left.HasValue == false
//
- if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
- return res_expr;
+ UnwrapLeft.EmitCheck (ec);
+ if (Binary.Oper == Binary.Operator.Equality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
}
+ return;
+ }
- if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
- return LiftedNull.CreateFromExpression (ec, res_expr);
-
+ if (UnwrapRight != null && Binary.Left.IsNull) {
//
- // Value types and null comparison
+ // right.HasValue == false
//
- if (left_unwrap == null || (Oper & Operator.RelationalMask) != 0)
- return CreateNullConstant (ec, left_orig);
+ UnwrapRight.EmitCheck (ec);
+ if (Binary.Oper == Binary.Operator.Equality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
+ }
+ return;
}
- return res_expr;
- }
+ Label dissimilar_label = ec.DefineLabel ();
+ Label end_label = ec.DefineLabel ();
- protected override Expression ResolveOperatorPredefined (ResolveContext ec, Binary.PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
- {
- Expression e = base.ResolveOperatorPredefined (ec, operators, primitives_only, enum_type);
+ if (UserOperator != null) {
+ var left = Left;
- if (e == this || enum_type != null)
- return LiftResult (ec, e);
+ if (UnwrapLeft != null) {
+ UnwrapLeft.EmitCheck (ec);
+ } else {
+ // Keep evaluation order same
+ if (!(Left is VariableReference)) {
+ Left.Emit (ec);
+ var lt = new LocalTemporary (Left.Type);
+ lt.Store (ec);
+ left = lt;
+ }
+ }
- //
- // 7.9.9 Equality operators and null
- //
- // The == and != operators permit one operand to be a value of a nullable type and
- // the other to be the null literal, even if no predefined or user-defined operator
- // (in unlifted or lifted form) exists for the operation.
- //
- if (e == null && (Oper & Operator.EqualityMask) != 0) {
- if ((IsLeftNullLifted && right_unwrap != null) || (IsRightNullLifted && left_unwrap != null))
- return LiftResult (ec, this);
- }
+ if (UnwrapRight != null) {
+ UnwrapRight.EmitCheck (ec);
- return e;
- }
+ if (UnwrapLeft != null) {
+ ec.Emit (OpCodes.Bne_Un, dissimilar_label);
- protected override Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
- {
- //
- // Try original types first for exact match without unwrapping
- //
- Expression expr = base.ResolveUserOperator (ec, left_orig, right_orig);
- if (expr != null)
- return expr;
+ Label compare_label = ec.DefineLabel ();
+ UnwrapLeft.EmitCheck (ec);
+ ec.Emit (OpCodes.Brtrue, compare_label);
- State orig_state = state;
+ if (Binary.Oper == Binary.Operator.Equality)
+ ec.EmitInt (1);
+ else
+ ec.EmitInt (0);
- //
- // One side is a nullable type, try to match underlying types
- //
- if (left_unwrap != null || right_unwrap != null || (state & (State.RightNullLifted | State.LeftNullLifted)) != 0) {
- expr = base.ResolveUserOperator (ec, left, right);
+ ec.Emit (OpCodes.Br, end_label);
+
+ ec.MarkLabel (compare_label);
+ } else {
+ ec.Emit (OpCodes.Brfalse, dissimilar_label);
+ }
+ } else {
+ ec.Emit (OpCodes.Brfalse, dissimilar_label);
+ }
+
+ var args = new Arguments (2);
+ args.Add (new Argument (left));
+ args.Add (new Argument (Right));
+
+ var call = new CallEmitter ();
+ call.EmitPredefined (ec, UserOperator, args);
+ } else {
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
+
+ //
+ // Emit underlying value comparison first.
+ //
+ // For this code: int? a = 1; bool b = a == 1;
+ //
+ // We emit something similar to this. Expressions with side effects have local
+ // variable created by Unwrap expression
+ //
+ // left.GetValueOrDefault ()
+ // right
+ // bne.un.s dissimilar_label
+ // left.HasValue
+ // br.s end_label
+ // dissimilar_label:
+ // ldc.i4.0
+ // end_label:
+ //
+
+ Left.Emit (ec);
+ Right.Emit (ec);
+
+ ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
+
+ //
+ // Check both left and right expressions for Unwrap call in which
+ // case we need to run get_HasValue() check because the type is
+ // nullable and could have null value
+ //
+ if (UnwrapLeft != null)
+ UnwrapLeft.EmitCheck (ec);
+
+ if (UnwrapRight != null)
+ UnwrapRight.EmitCheck (ec);
+
+ if (UnwrapLeft != null && UnwrapRight != null) {
+ if (Binary.Oper == Binary.Operator.Inequality)
+ ec.Emit (OpCodes.Xor);
+ else
+ ec.Emit (OpCodes.Ceq);
+ } else {
+ if (Binary.Oper == Binary.Operator.Inequality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
+ }
+ }
}
- if (expr == null)
- return null;
+ ec.Emit (OpCodes.Br_S, end_label);
- //
- // Lift the result in the case it can be null and predefined or user operator
- // result type is of a value type
- //
- if (!TypeSpec.IsValueType (expr.Type))
- return null;
+ ec.MarkLabel (dissimilar_label);
+ if (Binary.Oper == Binary.Operator.Inequality)
+ ec.EmitInt (1);
+ else
+ ec.EmitInt (0);
- if (state != orig_state)
- return expr;
+ ec.MarkLabel (end_label);
+ }
- expr = LiftResult (ec, expr);
- if (expr is Constant)
- return expr;
+ public override SLE.Expression MakeExpression (BuilderContext ctx)
+ {
+ Console.WriteLine (":{0} x {1}", Left.GetType (), Right.GetType ());
- type = expr.Type;
- user_operator = expr;
- return this;
+ return Binary.MakeExpression (ctx, Left, Right);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs
index 3205388..69ae1cf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs
@@ -338,7 +338,7 @@ namespace Mono.CSharp {
if (HasOptionalExpression) {
a.Report.Error (1745, a.Location,
"Cannot specify `{0}' attribute on optional parameter `{1}'",
- TypeManager.CSharpName (a.Type).Replace ("Attribute", ""), Name);
+ a.Type.GetSignatureForError ().Replace ("Attribute", ""), Name);
}
if (a.Type == pa.DefaultParameterValue)
@@ -406,7 +406,7 @@ namespace Mono.CSharp {
if ((modFlags & Modifier.This) != 0 && (parameter_type.IsPointer || parameter_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)) {
rc.Module.Compiler.Report.Error (1103, Location, "The extension method cannot be of type `{0}'",
- TypeManager.CSharpName (parameter_type));
+ parameter_type.GetSignatureForError ());
}
return parameter_type;
@@ -582,7 +582,7 @@ namespace Mono.CSharp {
{
string type_name;
if (parameter_type != null)
- type_name = TypeManager.CSharpName (parameter_type);
+ type_name = parameter_type.GetSignatureForError ();
else
type_name = texpr.GetSignatureForError ();
@@ -989,7 +989,7 @@ namespace Mono.CSharp {
if (types == null || types [pos] == null)
return ((Parameter)FixedParameters [pos]).GetSignatureForError ();
- string type = TypeManager.CSharpName (types [pos]);
+ string type = types [pos].GetSignatureForError ();
if (FixedParameters [pos].HasExtensionMethodModifier)
return "this " + type;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs
index ab8650c..af15bf6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs
@@ -534,10 +534,14 @@ namespace Mono.CSharp {
// about mismatch at return type when the check bellow rejects them
//
var parameters = mi.Parameters;
+ MethodSpec close_match = null;
+
while (true) {
var candidates = MemberCache.FindMembers (base_type, mi.Name, false);
- if (candidates == null)
+ if (candidates == null) {
+ base_method = close_match;
return false;
+ }
MethodSpec similar_candidate = null;
foreach (var candidate in candidates) {
@@ -590,19 +594,29 @@ namespace Mono.CSharp {
// From this point the candidate is used for detailed error reporting
// because it's very close match to what we are looking for
//
- base_method = (MethodSpec) candidate;
+ var m = (MethodSpec) candidate;
+
+ if (!m.IsPublic) {
+ if (close_match == null)
+ close_match = m;
- if (!candidate.IsPublic)
- return false;
+ continue;
+ }
- if (!TypeSpecComparer.Override.IsEqual (mi.ReturnType, base_method.ReturnType))
- return false;
+ if (!TypeSpecComparer.Override.IsEqual (mi.ReturnType, m.ReturnType)) {
+ if (close_match == null)
+ close_match = m;
- if (mi.IsGeneric && !Method.CheckImplementingMethodConstraints (container, base_method, mi)) {
+ continue;
+ }
+
+ base_method = m;
+
+ if (mi.IsGeneric && !Method.CheckImplementingMethodConstraints (container, m, mi)) {
return true;
}
}
-
+
if (base_method != null) {
if (similar_candidate != null) {
Report.SymbolRelatedToPreviousError (similar_candidate);
@@ -617,8 +631,10 @@ namespace Mono.CSharp {
}
base_type = candidates[0].DeclaringType.BaseType;
- if (base_type == null)
+ if (base_type == null) {
+ base_method = close_match;
return false;
+ }
}
if (!base_method.IsVirtual) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs
index 067c0c5..3e76e36 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs
@@ -201,14 +201,14 @@ namespace Mono.CSharp
{
base.Define (parent);
- Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, null, ParameterInfo, ModFlags);
+ Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, ParameterInfo, ModFlags);
method_data = new MethodData (method, ModFlags, flags, this);
if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName)))
return null;
- Spec.SetMetaInfo (method_data.MethodBuilder);
+ method_data.DefineMethodBuilder (parent.PartialContainer, ParameterInfo);
return method_data.MethodBuilder;
}
@@ -253,7 +253,7 @@ namespace Mono.CSharp
return;
}
- base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ base.ApplyToExtraTarget (a, ctor, cdata, pa);
}
public override ParametersCompiled ParameterInfo {
@@ -268,14 +268,14 @@ namespace Mono.CSharp
base.Define (parent);
- Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, null, ParameterInfo, ModFlags);
+ Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, ParameterInfo, ModFlags);
method_data = new MethodData (method, ModFlags, flags, this);
if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName)))
return null;
- Spec.SetMetaInfo (method_data.MethodBuilder);
+ method_data.DefineMethodBuilder (parent.PartialContainer, ParameterInfo);
return method_data.MethodBuilder;
}
@@ -1171,7 +1171,7 @@ namespace Mono.CSharp
return;
}
- base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ base.ApplyToExtraTarget (a, ctor, cdata, pa);
}
public override AttributeTargets AttributeTargets {
@@ -1198,15 +1198,15 @@ namespace Mono.CSharp
if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName)))
return null;
+ method_data.DefineMethodBuilder (parent.PartialContainer, ParameterInfo);
+
if (Compiler.Settings.WriteMetadataOnly)
block = null;
- MethodBuilder mb = method_data.MethodBuilder;
-
- Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, mb, ParameterInfo, method.ModFlags);
+ Spec = new MethodSpec (MemberKind.Method, parent.PartialContainer.Definition, this, ReturnType, ParameterInfo, method.ModFlags);
Spec.IsAccessor = true;
- return mb;
+ return method_data.MethodBuilder;
}
public override TypeSpec ReturnType {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs
index bfb82fb..f49a298 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs
@@ -550,6 +550,8 @@ namespace Mono.CSharp {
//
public abstract class ReportPrinter
{
+ protected HashSet<ITypeDefinition> reported_missing_definitions;
+
#region Properties
public int ErrorsCount { get; protected set; }
@@ -605,6 +607,22 @@ namespace Mono.CSharp {
}
}
+ //
+ // Tracks reported missing types. It needs to be session specific
+ // because we can run in probing mode
+ //
+ public bool MissingTypeReported (ITypeDefinition typeDefinition)
+ {
+ if (reported_missing_definitions == null)
+ reported_missing_definitions = new HashSet<ITypeDefinition> ();
+
+ if (reported_missing_definitions.Contains (typeDefinition))
+ return true;
+
+ reported_missing_definitions.Add (typeDefinition);
+ return false;
+ }
+
public void Reset ()
{
// HACK: Temporary hack for broken repl flow
@@ -735,6 +753,11 @@ namespace Mono.CSharp {
error_msg |= !msg.IsWarning;
}
+ if (reported_missing_definitions != null) {
+ foreach (var missing in reported_missing_definitions)
+ dest.MissingTypeReported (missing);
+ }
+
return error_msg;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/settings.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/settings.cs
index af8512a..fa15cad 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/settings.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/settings.cs
@@ -350,6 +350,17 @@ namespace Mono.CSharp {
public CompilerSettings ParseArguments (string[] args)
{
CompilerSettings settings = new CompilerSettings ();
+ if (!ParseArguments (settings, args))
+ return null;
+
+ return settings;
+ }
+
+ public bool ParseArguments (CompilerSettings settings, string[] args)
+ {
+ if (settings == null)
+ throw new ArgumentNullException ("settings");
+
List<string> response_file_list = null;
bool parsing_options = true;
stop_argument = false;
@@ -369,7 +380,7 @@ namespace Mono.CSharp {
if (response_file_list.Contains (response_file)) {
report.Error (1515, "Response file `{0}' specified multiple times", response_file);
- return null;
+ return false;
}
response_file_list.Add (response_file);
@@ -377,7 +388,7 @@ namespace Mono.CSharp {
extra_args = LoadArgs (response_file);
if (extra_args == null) {
report.Error (2011, "Unable to open response file: " + response_file);
- return null;
+ return false;
}
args = AddArgs (args, extra_args);
@@ -399,7 +410,7 @@ namespace Mono.CSharp {
continue;
case ParseResult.Stop:
stop_argument = true;
- return settings;
+ return true;
case ParseResult.UnknownOption:
if (UnknownOptionHandler != null) {
var ret = UnknownOptionHandler (args, i);
@@ -433,11 +444,11 @@ namespace Mono.CSharp {
}
Error_WrongOption (arg);
- return null;
+ return false;
case ParseResult.Stop:
stop_argument = true;
- return settings;
+ return true;
}
}
}
@@ -445,10 +456,7 @@ namespace Mono.CSharp {
ProcessSourceFiles (arg, false, settings.SourceFiles);
}
- if (report.Errors > 0)
- return null;
-
- return settings;
+ return report.Errors == 0;
}
void ProcessSourceFiles (string spec, bool recurse, List<SourceFile> sourceFiles)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs
index e312ece..4afe0ab 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs
@@ -57,6 +57,7 @@ namespace Mono.CSharp {
}
ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
+ ec.CurrentBranching.CurrentUsageVector.Goto ();
bool ok = Resolve (ec);
ec.KillFlowBranching ();
@@ -706,6 +707,7 @@ namespace Mono.CSharp {
public StatementErrorExpression (Expression expr)
{
this.expr = expr;
+ this.loc = expr.StartLocation;
}
public Expression Expr {
@@ -714,6 +716,12 @@ namespace Mono.CSharp {
}
}
+ public override bool Resolve (BlockContext bc)
+ {
+ expr.Error_InvalidExpressionStatement (bc);
+ return true;
+ }
+
protected override void DoEmit (EmitContext ec)
{
throw new NotSupportedException ();
@@ -903,9 +911,18 @@ namespace Mono.CSharp {
if (this is ContextualReturn)
return true;
- ec.Report.Error (1997, loc,
- "`{0}': A return keyword must not be followed by an expression when async method returns `Task'. Consider using `Task<T>' return type",
- ec.GetSignatureForError ());
+ // Same error code as .NET but better error message
+ if (async_block.DelegateType != null) {
+ ec.Report.Error (1997, loc,
+ "`{0}': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task<T>' return type",
+ async_block.DelegateType.GetSignatureForError ());
+ } else {
+ ec.Report.Error (1997, loc,
+ "`{0}': A return keyword must not be followed by an expression when async method returns `Task'. Consider using `Task<T>' return type",
+ ec.GetSignatureForError ());
+
+ }
+
return false;
}
@@ -1181,10 +1198,7 @@ namespace Mono.CSharp {
return false;
}
- if (ec.Switch.DefaultLabel == null) {
- FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
- return false;
- }
+ ec.Switch.RegisterGotoCase (null, null);
return true;
}
@@ -1205,7 +1219,6 @@ namespace Mono.CSharp {
/// </summary>
public class GotoCase : Statement {
Expression expr;
- SwitchLabel sl;
public GotoCase (Expression e, Location l)
{
@@ -1218,6 +1231,8 @@ namespace Mono.CSharp {
return this.expr;
}
}
+
+ public SwitchLabel Label { get; set; }
public override bool Resolve (BlockContext ec)
{
@@ -1228,13 +1243,8 @@ namespace Mono.CSharp {
ec.CurrentBranching.CurrentUsageVector.Goto ();
- expr = expr.Resolve (ec);
- if (expr == null)
- return false;
-
- Constant c = expr as Constant;
+ Constant c = expr.ResolveLabelConstant (ec);
if (c == null) {
- ec.Report.Error (150, expr.Location, "A constant value is expected");
return false;
}
@@ -1252,17 +1262,17 @@ namespace Mono.CSharp {
if (!Convert.ImplicitStandardConversionExists (c, type))
ec.Report.Warning (469, 2, loc,
"The `goto case' value is not implicitly convertible to type `{0}'",
- TypeManager.CSharpName (type));
+ type.GetSignatureForError ());
}
- sl = ec.Switch.ResolveGotoCase (ec, res);
+ ec.Switch.RegisterGotoCase (this, res);
return true;
}
protected override void DoEmit (EmitContext ec)
{
- ec.Emit (OpCodes.Br, sl.GetILLabel (ec));
+ ec.Emit (OpCodes.Br, Label.GetILLabel (ec));
}
protected override void CloneTo (CloneContext clonectx, Statement t)
@@ -1420,69 +1430,72 @@ namespace Mono.CSharp {
Location Location { get; }
}
- public class BlockVariableDeclaration : Statement
+ public class BlockVariableDeclarator
{
- public class Declarator
+ LocalVariable li;
+ Expression initializer;
+
+ public BlockVariableDeclarator (LocalVariable li, Expression initializer)
{
- LocalVariable li;
- Expression initializer;
+ if (li.Type != null)
+ throw new ArgumentException ("Expected null variable type");
- public Declarator (LocalVariable li, Expression initializer)
- {
- if (li.Type != null)
- throw new ArgumentException ("Expected null variable type");
+ this.li = li;
+ this.initializer = initializer;
+ }
- this.li = li;
- this.initializer = initializer;
- }
+ #region Properties
- public Declarator (Declarator clone, Expression initializer)
- {
- this.li = clone.li;
- this.initializer = initializer;
+ public LocalVariable Variable {
+ get {
+ return li;
}
+ }
- #region Properties
-
- public LocalVariable Variable {
- get {
- return li;
- }
+ public Expression Initializer {
+ get {
+ return initializer;
}
-
- public Expression Initializer {
- get {
- return initializer;
- }
- set {
- initializer = value;
- }
+ set {
+ initializer = value;
}
+ }
- #endregion
+ #endregion
+
+ public virtual BlockVariableDeclarator Clone (CloneContext cloneCtx)
+ {
+ var t = (BlockVariableDeclarator) MemberwiseClone ();
+ if (initializer != null)
+ t.initializer = initializer.Clone (cloneCtx);
+
+ return t;
}
+ }
+ public class BlockVariable : Statement
+ {
Expression initializer;
protected FullNamedExpression type_expr;
protected LocalVariable li;
- protected List<Declarator> declarators;
+ protected List<BlockVariableDeclarator> declarators;
TypeSpec type;
- public BlockVariableDeclaration (FullNamedExpression type, LocalVariable li)
+ public BlockVariable (FullNamedExpression type, LocalVariable li)
{
this.type_expr = type;
this.li = li;
this.loc = type_expr.Location;
}
- protected BlockVariableDeclaration (LocalVariable li)
+ protected BlockVariable (LocalVariable li)
{
this.li = li;
}
#region Properties
- public List<Declarator> Declarators {
+ public List<BlockVariableDeclarator> Declarators {
get {
return declarators;
}
@@ -1511,10 +1524,10 @@ namespace Mono.CSharp {
#endregion
- public void AddDeclarator (Declarator decl)
+ public void AddDeclarator (BlockVariableDeclarator decl)
{
if (declarators == null)
- declarators = new List<Declarator> ();
+ declarators = new List<BlockVariableDeclarator> ();
declarators.Add (decl);
}
@@ -1607,7 +1620,7 @@ namespace Mono.CSharp {
bool eval_global = bc.Module.Compiler.Settings.StatementMode && bc.CurrentBlock is ToplevelBlock;
if (eval_global) {
CreateEvaluatorVariable (bc, li);
- } else {
+ } else if (type != InternalType.ErrorType) {
li.PrepareForFlowAnalysis (bc);
}
@@ -1621,7 +1634,7 @@ namespace Mono.CSharp {
d.Variable.Type = li.Type;
if (eval_global) {
CreateEvaluatorVariable (bc, d.Variable);
- } else {
+ } else if (type != InternalType.ErrorType) {
d.Variable.PrepareForFlowAnalysis (bc);
}
@@ -1661,7 +1674,7 @@ namespace Mono.CSharp {
protected override void CloneTo (CloneContext clonectx, Statement target)
{
- BlockVariableDeclaration t = (BlockVariableDeclaration) target;
+ BlockVariable t = (BlockVariable) target;
if (type_expr != null)
t.type_expr = (FullNamedExpression) type_expr.Clone (clonectx);
@@ -1672,7 +1685,7 @@ namespace Mono.CSharp {
if (declarators != null) {
t.declarators = null;
foreach (var d in declarators)
- t.AddDeclarator (new Declarator (d, d.Initializer == null ? null : d.Initializer.Clone (clonectx)));
+ t.AddDeclarator (d.Clone (clonectx));
}
}
@@ -1682,9 +1695,9 @@ namespace Mono.CSharp {
}
}
- public class BlockConstantDeclaration : BlockVariableDeclaration
+ public class BlockConstant : BlockVariable
{
- public BlockConstantDeclaration (FullNamedExpression type, LocalVariable li)
+ public BlockConstant (FullNamedExpression type, LocalVariable li)
: base (type, li)
{
}
@@ -2059,7 +2072,8 @@ namespace Mono.CSharp {
HasAsyncModifier = 1 << 10,
Resolved = 1 << 11,
YieldBlock = 1 << 12,
- AwaitBlock = 1 << 13
+ AwaitBlock = 1 << 13,
+ Iterator = 1 << 14
}
public Block Parent;
@@ -2229,6 +2243,11 @@ namespace Mono.CSharp {
scope_initializers.Add (s);
}
}
+
+ public void InsertStatement (int index, Statement s)
+ {
+ statements.Insert (index, s);
+ }
public void AddStatement (Statement s)
{
@@ -2607,6 +2626,24 @@ namespace Mono.CSharp {
if (pb.StateMachine == storey)
break;
+ //
+ // If we are state machine with no parent we can hook into we don't
+ // add reference but capture this directly
+ //
+ ExplicitBlock parent_storey_block = pb;
+ while (parent_storey_block.Parent != null) {
+ parent_storey_block = parent_storey_block.Parent.Explicit;
+ if (parent_storey_block.AnonymousMethodStorey != null) {
+ break;
+ }
+ }
+
+ if (parent_storey_block.AnonymousMethodStorey == null) {
+ pb.StateMachine.AddCapturedThisField (ec);
+ b.HasCapturedThis = true;
+ continue;
+ }
+
pb.StateMachine.AddParentStoreyReference (ec, storey);
}
@@ -2646,6 +2683,7 @@ namespace Mono.CSharp {
}
storey.Define ();
+ storey.PrepareEmit ();
storey.Parent.PartialContainer.AddCompilerGeneratedClass (storey);
}
@@ -2664,6 +2702,8 @@ namespace Mono.CSharp {
public void RegisterIteratorYield ()
{
+ ParametersBlock.TopBlock.IsIterator = true;
+
var block = this;
while ((block.flags & Flags.YieldBlock) == 0) {
block.flags |= Flags.YieldBlock;
@@ -3112,7 +3152,7 @@ namespace Mono.CSharp {
return tlb;
}
- public ParametersBlock ConvertToAsyncTask (IMemberContext context, TypeDefinition host, ParametersCompiled parameters, TypeSpec returnType, Location loc)
+ public ParametersBlock ConvertToAsyncTask (IMemberContext context, TypeDefinition host, ParametersCompiled parameters, TypeSpec returnType, TypeSpec delegateType, Location loc)
{
for (int i = 0; i < parameters.Count; i++) {
Parameter p = parameters[i];
@@ -3144,6 +3184,7 @@ namespace Mono.CSharp {
var block_type = host.Module.Compiler.BuiltinTypes.Void;
var initializer = new AsyncInitializer (this, host, block_type);
initializer.Type = block_type;
+ initializer.DelegateType = delegateType;
var stateMachine = new AsyncTaskStorey (this, context, initializer, returnType);
@@ -3207,7 +3248,10 @@ namespace Mono.CSharp {
public bool IsIterator {
get {
- return HasYield;
+ return (flags & Flags.Iterator) != 0;
+ }
+ set {
+ flags = value ? flags | Flags.Iterator : flags & ~Flags.Iterator;
}
}
@@ -3601,6 +3645,9 @@ namespace Mono.CSharp {
public override bool Resolve (BlockContext bc)
{
+ if (ResolveAndReduce (bc))
+ bc.Switch.RegisterLabel (bc, this);
+
bc.CurrentBranching.CurrentUsageVector.ResetBarrier ();
return base.Resolve (bc);
@@ -3610,29 +3657,25 @@ namespace Mono.CSharp {
// Resolves the expression, reduces it to a literal if possible
// and then converts it to the requested type.
//
- public bool ResolveAndReduce (ResolveContext ec, TypeSpec required_type, bool allow_nullable)
- {
- Expression e = label.Resolve (ec);
-
- if (e == null)
- return false;
+ bool ResolveAndReduce (ResolveContext rc)
+ {
+ if (IsDefault)
+ return true;
- Constant c = e as Constant;
- if (c == null){
- ec.Report.Error (150, loc, "A constant value is expected");
+ var c = label.ResolveLabelConstant (rc);
+ if (c == null)
return false;
- }
- if (allow_nullable && c is NullLiteral) {
+ if (rc.Switch.IsNullable && c is NullLiteral) {
converted = c;
return true;
}
- converted = c.ImplicitConversionRequired (ec, required_type, loc);
+ converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType, loc);
return converted != null;
}
- public void Error_AlreadyOccurs (ResolveContext ec, TypeSpec switch_type, SwitchLabel collision_with)
+ public void Error_AlreadyOccurs (ResolveContext ec, SwitchLabel collision_with)
{
string label;
if (converted == null)
@@ -3738,6 +3781,8 @@ namespace Mono.CSharp {
Dictionary<string, SwitchLabel> string_labels;
List<SwitchLabel> case_labels;
+ List<Tuple<GotoCase, Constant>> goto_cases;
+
/// <summary>
/// The governing switch type
/// </summary>
@@ -3857,88 +3902,40 @@ namespace Mono.CSharp {
};
}
- //
- // Performs the basic sanity checks on the switch statement
- // (looks for duplicate keys and non-constant expressions).
- //
- // It also returns a hashtable with the keys that we will later
- // use to compute the switch tables
- //
- bool ResolveLabels (ResolveContext ec, Constant value)
+ public void RegisterLabel (ResolveContext rc, SwitchLabel sl)
{
- bool error = false;
- if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
- string_labels = new Dictionary<string, SwitchLabel> ();
- } else {
- labels = new Dictionary<long, SwitchLabel> ();
- }
-
- case_labels = new List<SwitchLabel> ();
- int default_label_index = -1;
- bool constant_label_found = false;
+ case_labels.Add (sl);
- for (int i = 0; i < block.Statements.Count; ++i) {
- var s = block.Statements[i];
-
- var sl = s as SwitchLabel;
- if (sl == null) {
- continue;
- }
-
- case_labels.Add (sl);
-
- if (sl.IsDefault) {
- if (case_default != null) {
- sl.Error_AlreadyOccurs (ec, SwitchType, case_default);
- error = true;
- }
-
- default_label_index = i;
+ if (sl.IsDefault) {
+ if (case_default != null) {
+ sl.Error_AlreadyOccurs (rc, case_default);
+ } else {
case_default = sl;
- continue;
}
- if (!sl.ResolveAndReduce (ec, SwitchType, IsNullable)) {
- error = true;
- continue;
- }
+ return;
+ }
- try {
- if (string_labels != null) {
- string string_value = sl.Converted.GetValue () as string;
- if (string_value == null)
- case_null = sl;
- else
- string_labels.Add (string_value, sl);
+ try {
+ if (string_labels != null) {
+ string string_value = sl.Converted.GetValue () as string;
+ if (string_value == null)
+ case_null = sl;
+ else
+ string_labels.Add (string_value, sl);
+ } else {
+ if (sl.Converted is NullLiteral) {
+ case_null = sl;
} else {
- if (sl.Converted is NullLiteral) {
- case_null = sl;
- } else {
- labels.Add (sl.Converted.GetValueAsLong (), sl);
- }
+ labels.Add (sl.Converted.GetValueAsLong (), sl);
}
- } catch (ArgumentException) {
- if (string_labels != null)
- sl.Error_AlreadyOccurs (ec, SwitchType, string_labels[(string) sl.Converted.GetValue ()]);
- else
- sl.Error_AlreadyOccurs (ec, SwitchType, labels[sl.Converted.GetValueAsLong ()]);
-
- error = true;
- }
-
- if (value != null) {
- var constant_label = constant_label_found ? null : FindLabel (value);
- if (constant_label == null || constant_label != sl)
- block.Statements[i] = new EmptyStatement (s.loc);
- else
- constant_label_found = true;
}
+ } catch (ArgumentException) {
+ if (string_labels != null)
+ sl.Error_AlreadyOccurs (rc, string_labels[(string) sl.Converted.GetValue ()]);
+ else
+ sl.Error_AlreadyOccurs (rc, labels[sl.Converted.GetValueAsLong ()]);
}
-
- if (value != null && constant_label_found && default_label_index >= 0)
- block.Statements[default_label_index] = new EmptyStatement (case_default.loc);
-
- return !error;
}
//
@@ -4110,10 +4107,13 @@ namespace Mono.CSharp {
new_expr = SwitchGoverningType (ec, unwrap);
}
- if (new_expr == null){
- ec.Report.Error (151, loc,
- "A switch expression of type `{0}' cannot be converted to an integral type, bool, char, string, enum or nullable type",
- TypeManager.CSharpName (Expr.Type));
+ if (new_expr == null) {
+ if (Expr.Type != InternalType.ErrorType) {
+ ec.Report.Error (151, loc,
+ "A switch expression of type `{0}' cannot be converted to an integral type, bool, char, string, enum or nullable type",
+ Expr.Type.GetSignatureForError ());
+ }
+
return false;
}
@@ -4128,24 +4128,29 @@ namespace Mono.CSharp {
if (block.Statements.Count == 0)
return true;
- var constant = new_expr as Constant;
+ if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
+ string_labels = new Dictionary<string, SwitchLabel> ();
+ } else {
+ labels = new Dictionary<long, SwitchLabel> ();
+ }
- if (!ResolveLabels (ec, constant))
- return false;
+ case_labels = new List<SwitchLabel> ();
+
+ var constant = new_expr as Constant;
//
// Don't need extra variable for constant switch or switch with
// only default case
//
- if (constant == null && (case_labels.Count - (case_default != null ? 1 : 0)) != 0) {
+ if (constant == null) {
//
// Store switch expression for comparison purposes
//
value = new_expr as VariableReference;
- if (value == null) {
- // Create temporary variable inside switch scope
+ if (value == null && !HasOnlyDefaultSection ()) {
var current_block = ec.CurrentBlock;
ec.CurrentBlock = Block;
+ // Create temporary variable inside switch scope
value = TemporaryVariableReference.Create (SwitchType, ec.CurrentBlock, loc);
value.Resolve (ec);
ec.CurrentBlock = current_block;
@@ -4168,6 +4173,33 @@ namespace Mono.CSharp {
ec.EndFlowBranching ();
ec.Switch = old_switch;
+ //
+ // Check if all goto cases are valid. Needs to be done after switch
+ // is resolved becuase goto can jump forward in the scope.
+ //
+ if (goto_cases != null) {
+ foreach (var gc in goto_cases) {
+ if (gc.Item1 == null) {
+ if (DefaultLabel == null) {
+ FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
+ }
+
+ continue;
+ }
+
+ var sl = FindLabel (gc.Item2);
+ if (sl == null) {
+ FlowBranchingBlock.Error_UnknownLabel (loc, "case " + gc.Item2.GetValueAsLiteral (), ec.Report);
+ } else {
+ gc.Item1.Label = sl;
+ }
+ }
+ }
+
+ if (constant != null) {
+ ResolveUnreachableSections (ec, constant);
+ }
+
if (!ok)
return false;
@@ -4176,23 +4208,34 @@ namespace Mono.CSharp {
}
//
- // Needed to emit anonymous storey initialization before
+ // Anonymous storey initialization has to happen before
// any generated switch dispatch
//
- block.AddScopeStatement (new DispatchStatement (this));
+ block.InsertStatement (0, new DispatchStatement (this));
return true;
}
- public SwitchLabel ResolveGotoCase (ResolveContext rc, Constant value)
+ bool HasOnlyDefaultSection ()
{
- var sl = FindLabel (value);
+ for (int i = 0; i < block.Statements.Count; ++i) {
+ var s = block.Statements[i] as SwitchLabel;
+
+ if (s == null || s.IsDefault)
+ continue;
- if (sl == null) {
- FlowBranchingBlock.Error_UnknownLabel (loc, "case " + value.GetValueAsLiteral (), rc.Report);
+ return false;
}
- return sl;
+ return true;
+ }
+
+ public void RegisterGotoCase (GotoCase gotoCase, Constant value)
+ {
+ if (goto_cases == null)
+ goto_cases = new List<Tuple<GotoCase, Constant>> ();
+
+ goto_cases.Add (Tuple.Create (gotoCase, value));
}
//
@@ -4253,6 +4296,38 @@ namespace Mono.CSharp {
string_dictionary = new SimpleAssign (switch_cache_field, initializer.Resolve (ec));
}
+ void ResolveUnreachableSections (BlockContext bc, Constant value)
+ {
+ var constant_label = FindLabel (value) ?? case_default;
+
+ bool found = false;
+ bool unreachable_reported = false;
+ for (int i = 0; i < block.Statements.Count; ++i) {
+ var s = block.Statements[i];
+
+ if (s is SwitchLabel) {
+ if (unreachable_reported) {
+ found = unreachable_reported = false;
+ }
+
+ found |= s == constant_label;
+ continue;
+ }
+
+ if (found) {
+ unreachable_reported = true;
+ continue;
+ }
+
+ if (!unreachable_reported) {
+ unreachable_reported = true;
+ bc.Report.Warning (162, 2, s.loc, "Unreachable code detected");
+ }
+
+ block.Statements[i] = new EmptyStatement (s.loc);
+ }
+ }
+
void DoEmitStringSwitch (EmitContext ec)
{
Label l_initialized = ec.DefineLabel ();
@@ -4363,12 +4438,6 @@ namespace Mono.CSharp {
return;
}
- //
- // Mark sequence point explicitly to switch
- //
- ec.Mark (block.StartLocation);
- block.IsCompilerGenerated = true;
-
if (string_dictionary != null) {
DoEmitStringSwitch (ec);
} else if (case_labels.Count < 4 || string_labels != null) {
@@ -4404,6 +4473,14 @@ namespace Mono.CSharp {
} else if (new_expr != value) {
value.EmitAssign (ec, new_expr, false, false);
}
+
+
+ //
+ // Next statement is compiler generated we don't need extra
+ // nop when we can use the statement for sequence point
+ //
+ ec.Mark (block.StartLocation);
+ block.IsCompilerGenerated = true;
}
block.Emit (ec);
@@ -4512,6 +4589,7 @@ namespace Mono.CSharp {
if (finally_host != null) {
finally_host.Define ();
+ finally_host.PrepareEmit ();
finally_host.Emit ();
// Now it's safe to add, to close it properly and emit sequence points
@@ -5049,8 +5127,7 @@ namespace Mono.CSharp {
}
}
-
- public class VariableDeclaration : BlockVariableDeclaration
+ public class VariableDeclaration : BlockVariable
{
public VariableDeclaration (FullNamedExpression type, LocalVariable li)
: base (type, li)
@@ -5175,7 +5252,7 @@ namespace Mono.CSharp {
}
}
- public BlockVariableDeclaration Variables {
+ public BlockVariable Variables {
get {
return decl;
}
@@ -5557,7 +5634,7 @@ namespace Mono.CSharp {
public class Using : TryFinallyBlock
{
- public class VariableDeclaration : BlockVariableDeclaration
+ public class VariableDeclaration : BlockVariable
{
Statement dispose_call;
@@ -5734,7 +5811,7 @@ namespace Mono.CSharp {
}
}
- public BlockVariableDeclaration Variables {
+ public BlockVariable Variables {
get {
return decl;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs
index fa63a97..d127d72 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs
@@ -327,4 +327,38 @@ namespace Mono.CSharp {
}
}
}
+
+ struct TypeNameParser
+ {
+ internal static string Escape(string name)
+ {
+ if (name == null) {
+ return null;
+ }
+ StringBuilder sb = null;
+ for (int pos = 0; pos < name.Length; pos++) {
+ char c = name[pos];
+ switch (c) {
+ case '\\':
+ case '+':
+ case ',':
+ case '[':
+ case ']':
+ case '*':
+ case '&':
+ if (sb == null) {
+ sb = new StringBuilder(name, 0, pos, name.Length + 3);
+ }
+ sb.Append("\\").Append(c);
+ break;
+ default:
+ if (sb != null) {
+ sb.Append(c);
+ }
+ break;
+ }
+ }
+ return sb != null ? sb.ToString() : name;
+ }
+ }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs
index 4a674c4..b77dfef 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs
@@ -691,6 +691,7 @@ namespace Mono.CSharp
readonly MemberKind kind;
protected readonly ModuleContainer module;
protected TypeSpec type;
+ bool defined;
public PredefinedType (ModuleContainer module, MemberKind kind, string ns, string name, int arity)
: this (module, kind, ns, name)
@@ -753,7 +754,11 @@ namespace Mono.CSharp
if (type != null)
return true;
- type = Resolve (module, kind, ns, name, arity, false, false);
+ if (!defined) {
+ defined = true;
+ type = Resolve (module, kind, ns, name, arity, false, false);
+ }
+
return type != null;
}
@@ -771,12 +776,13 @@ namespace Mono.CSharp
// fake namespaces when type is optional and does not exist (e.g. System.Linq).
//
Namespace type_ns = module.GlobalRootNamespace.GetNamespace (ns, required);
+
IList<TypeSpec> found = null;
if (type_ns != null)
found = type_ns.GetAllTypes (name);
if (found == null) {
- if (reportErrors )
+ if (reportErrors)
module.Compiler.Report.Error (518, "The predefined type `{0}.{1}' is not defined or imported", ns, name);
return null;
@@ -829,15 +835,22 @@ namespace Mono.CSharp
}
if (best_match == null && reportErrors) {
- Location loc;
- if (found[0].MemberDefinition is MemberCore) {
- loc = ((MemberCore) found[0].MemberDefinition).Location;
+ var found_member = found[0];
+
+ if (found_member.Kind == MemberKind.MissingType) {
+ // CSC: should be different error number
+ module.Compiler.Report.Error (518, "The predefined type `{0}.{1}' is defined in an assembly that is not referenced.", ns, name);
} else {
- loc = Location.Null;
- module.Compiler.Report.SymbolRelatedToPreviousError (found[0]);
- }
+ Location loc;
+ if (found_member.MemberDefinition is MemberCore) {
+ loc = ((MemberCore) found_member.MemberDefinition).Location;
+ } else {
+ loc = Location.Null;
+ module.Compiler.Report.SymbolRelatedToPreviousError (found_member);
+ }
- module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+ module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+ }
}
return best_match;
@@ -984,15 +997,7 @@ namespace Mono.CSharp
partial class TypeManager {
- /// <summary>
- /// Returns the C# name of a type if possible, or the full type name otherwise
- /// </summary>
- static public string CSharpName (TypeSpec t)
- {
- return t.GetSignatureForError ();
- }
-
- static public string CSharpName (IList<TypeSpec> types)
+ static public string CSharpName(IList<TypeSpec> types)
{
if (types.Count == 0)
return string.Empty;
@@ -1002,7 +1007,7 @@ namespace Mono.CSharp
if (i > 0)
sb.Append (",");
- sb.Append (CSharpName (types [i]));
+ sb.Append (types [i].GetSignatureForError ());
}
return sb.ToString ();
}
@@ -1090,7 +1095,7 @@ namespace Mono.CSharp
rc.Compiler.Report.SymbolRelatedToPreviousError (t);
rc.Compiler.Report.Error (208, loc,
"Cannot take the address of, get the size of, or declare a pointer to a managed type `{0}'",
- CSharpName (t));
+ t.GetSignatureForError ());
return false;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs
index 2657956..f9e6239 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs
@@ -653,6 +653,20 @@ namespace Mono.CSharp
}
}
+ public static bool IsNonNullableValueType (TypeSpec t)
+ {
+ switch (t.Kind) {
+ case MemberKind.TypeParameter:
+ return ((TypeParameterSpec) t).IsValueType;
+ case MemberKind.Struct:
+ return !t.IsNullableType;
+ case MemberKind.Enum:
+ return true;
+ default:
+ return false;
+ }
+ }
+
public static bool IsValueType (TypeSpec t)
{
switch (t.Kind) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/visit.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/visit.cs
index 2b21b98..446f56b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/visit.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/visit.cs
@@ -51,7 +51,11 @@ namespace Mono.CSharp
public virtual void Visit (UsingExternAlias uea)
{
}
-
+
+ public virtual void Visit (CompilationSourceFile csf)
+ {
+ }
+
public virtual void Visit (Class c)
{
VisitTypeDefinition (c);
@@ -130,12 +134,12 @@ namespace Mono.CSharp
return null;
}
- public virtual object Visit (BlockVariableDeclaration blockVariableDeclaration)
+ public virtual object Visit (BlockVariable blockVariableDeclaration)
{
return null;
}
- public virtual object Visit (BlockConstantDeclaration blockConstantDeclaration)
+ public virtual object Visit (BlockConstant blockConstantDeclaration)
{
return null;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs
index 8155ffe..5835624 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs
@@ -37,6 +37,7 @@ using System.ComponentModel.Design;
using ICSharpCode.NRefactory.CSharp.Analysis;
using ICSharpCode.NRefactory.Utils;
using System.Collections.Generic;
+using ICSharpCode.NRefactory.Analysis;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
@@ -84,6 +85,13 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
get { return resolver.Compilation; }
}
+ /// <summary>
+ /// Gets the type graph for the current compilation.
+ /// </summary>
+ public virtual TypeGraph TypeGraph {
+ get { return new TypeGraph(Compilation.Assemblies); }
+ }
+
public BaseRefactoringContext (ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, System.Threading.CancellationToken cancellationToken)
{
this.resolver = resolver;
@@ -123,7 +131,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
return resolver.GetConversion(expression, cancellationToken);
}
- public TypeSystemAstBuilder CreateTypeSytemAstBuilder(AstNode node)
+ public TypeSystemAstBuilder CreateTypeSystemAstBuilder(AstNode node)
{
var csResolver = resolver.GetResolverStateBefore(node);
return new TypeSystemAstBuilder(csResolver);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeAction.cs
index 5a05631..7658a9e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeAction.cs
@@ -73,6 +73,9 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
/// <param name='action'>
/// The code transformation.
/// </param>
+ /// <param name='astNode'>
+ /// A node that specifies the start/end positions for the code action.
+ /// </param>
public CodeAction (string description, Action<Script> action, AstNode astNode)
{
if (action == null)
@@ -96,6 +99,8 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
/// <param name='action'>
/// The code transformation.
/// </param>
+ /// <param name='start'>Start position for the code action.</param>
+ /// <param name='end'>End position for the code action.</param>
public CodeAction (string description, Action<Script> action, TextLocation start, TextLocation end)
{
if (action == null)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddAnotherAccessorAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddAnotherAccessorAction.cs
index b093880..69384a1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddAnotherAccessorAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddAnotherAccessorAction.cs
@@ -73,7 +73,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
if (pdecl.Setter.IsNull && !pdecl.Getter.IsNull) {
var field = RemoveBackingStoreAction.ScanGetter (context, pdecl);
- if (field != null)
+ if (field != null && !field.IsReadOnly && !field.IsConst)
return new ExpressionStatement (new AssignmentExpression (new IdentifierExpression (field.Name), AssignmentOperatorType.Assign, new IdentifierExpression ("value")));
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddUsingAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddUsingAction.cs
index 8c4cee7..b2f34ee 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddUsingAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AddUsingAction.cs
@@ -91,7 +91,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
CodeAction ReplaceWithFullTypeNameAction(RefactoringContext context, AstNode node, ITypeDefinition typeDefinition)
{
AstType astType = context.CreateShortType(typeDefinition);
- string textWithoutGenerics = astType.GetText();
+ string textWithoutGenerics = astType.ToString();
foreach (var typeArg in node.GetChildrenByRole(Roles.TypeArgument)) {
astType.AddChild(typeArg.Clone(), Roles.TypeArgument);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AutoLinqSumAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AutoLinqSumAction.cs
new file mode 100644
index 0000000..6e3a123
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/AutoLinqSumAction.cs
@@ -0,0 +1,436 @@
+//
+// AutoLinqSum.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis <luiscubal at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.PatternMatching;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Convers a loop to a Linq expression.
+ /// </summary>
+ [ContextAction("Convert loop to Linq expression", Description = "Converts a loop to a Linq expression")]
+ public class AutoLinqSumAction : ICodeActionProvider
+ {
+ // Disabled for nullables, since int? x = 3; x += null; has result x = null,
+ // but LINQ Sum behaves differently : nulls are treated as zero
+ static readonly IEnumerable<string> LinqSummableTypes = new string[] {
+ "System.UInt16",
+ "System.Int16",
+ "System.UInt32",
+ "System.Int32",
+ "System.UInt64",
+ "System.Int64",
+ "System.Single",
+ "System.Double",
+ "System.Decimal"
+ };
+
+ public IEnumerable<CodeAction> GetActions(RefactoringContext context)
+ {
+ var loop = GetForeachStatement (context);
+ if (loop == null) {
+ yield break;
+ }
+
+ if (context.GetResolverStateBefore(loop)
+ .LookupSimpleNameOrTypeName("Enumerable", new List<IType>(), NameLookupMode.Type)
+ .Type.FullName != "System.Linq.Enumerable") {
+
+ yield break;
+ }
+
+ var outputStatement = GetTransformedAssignmentExpression (context, loop);
+ if (outputStatement == null) {
+ yield break;
+ }
+
+ yield return new CodeAction(context.TranslateString("Convert foreach loop to LINQ expression"), script => {
+
+ var prevSibling = loop.GetPrevSibling(node => node is Statement);
+
+ Expression leftSide = outputStatement.Left;
+ Expression rightSide = outputStatement.Right;
+
+ Expression expressionToReplace = GetExpressionToReplace(prevSibling, leftSide);
+
+ if (expressionToReplace != null) {
+ Expression replacementExpression = rightSide.Clone();
+ if (!IsZeroPrimitive(expressionToReplace)) {
+ replacementExpression = new BinaryOperatorExpression(ParenthesizeIfNeeded(expressionToReplace).Clone(),
+ BinaryOperatorType.Add,
+ replacementExpression);
+ }
+
+ script.Replace(expressionToReplace, replacementExpression);
+ script.Remove(loop);
+ }
+ else {
+ script.Replace(loop, new ExpressionStatement(outputStatement));
+ }
+
+ }, loop);
+ }
+
+ bool IsZeroPrimitive(Expression expr)
+ {
+ //We want a very simple check -- no looking at constants, no constant folding, etc.
+ //So 1+1 should return false, but (0) should return true
+
+ var parenthesizedExpression = expr as ParenthesizedExpression;
+ if (parenthesizedExpression != null) {
+ return IsZeroPrimitive(parenthesizedExpression.Expression);
+ }
+
+ var zeroLiteralInteger = new PrimitiveExpression(0);
+ var zeroLiteralFloat = new PrimitiveExpression(0.0f);
+ var zeroLiteralDouble = new PrimitiveExpression(0.0);
+ var zeroLiteralDecimal = new PrimitiveExpression(0.0m);
+
+ return SameNode(zeroLiteralInteger, expr) ||
+ SameNode(zeroLiteralFloat, expr) ||
+ SameNode(zeroLiteralDouble, expr) ||
+ SameNode(zeroLiteralDecimal, expr);
+ }
+
+ Expression GetExpressionToReplace(AstNode prevSibling, Expression requiredLeftSide)
+ {
+ if (prevSibling == null) {
+ return null;
+ }
+
+ var declarationStatement = prevSibling as VariableDeclarationStatement;
+ if (declarationStatement != null)
+ {
+ if (declarationStatement.Variables.Count != 1) {
+ return null;
+ }
+
+ var identifierExpr = requiredLeftSide as IdentifierExpression;
+ if (identifierExpr == null) {
+ return null;
+ }
+
+ var variableDecl = declarationStatement.Variables.First();
+
+ if (!SameNode(identifierExpr.IdentifierToken, variableDecl.NameToken)) {
+ return null;
+ }
+
+ return variableDecl.Initializer;
+ }
+
+ var exprStatement = prevSibling as ExpressionStatement;
+ if (exprStatement != null) {
+ var assignment = exprStatement.Expression as AssignmentExpression;
+ if (assignment != null) {
+ if (assignment.Operator != AssignmentOperatorType.Assign &&
+ assignment.Operator != AssignmentOperatorType.Add) {
+
+ return null;
+ }
+
+ if (!SameNode(requiredLeftSide, assignment.Left)) {
+ return null;
+ }
+
+ return assignment.Right;
+ }
+ }
+
+ return null;
+ }
+
+ bool IsUnaryModifierExpression(UnaryOperatorExpression expr)
+ {
+ return expr.Operator == UnaryOperatorType.Increment || expr.Operator == UnaryOperatorType.PostIncrement || expr.Operator == UnaryOperatorType.Decrement || expr.Operator == UnaryOperatorType.PostDecrement;
+ }
+
+ AssignmentExpression GetTransformedAssignmentExpression (RefactoringContext context, ForeachStatement foreachStatement)
+ {
+ var enumerableToIterate = foreachStatement.InExpression.Clone();
+
+ Statement statement = foreachStatement.EmbeddedStatement;
+
+ Expression leftExpression, rightExpression;
+ if (!ExtractExpression(statement, out leftExpression, out rightExpression)) {
+ return null;
+ }
+ if (leftExpression == null || rightExpression == null) {
+ return null;
+ }
+
+ var type = context.Resolve(leftExpression).Type;
+ if (!IsLinqSummableType(type)) {
+ return null;
+ }
+
+ if (rightExpression.DescendantsAndSelf.OfType<AssignmentExpression>().Any()) {
+ // Reject loops such as
+ // int k = 0;
+ // foreach (var x in y) { k += (z = 2); }
+
+ return null;
+ }
+
+ if (rightExpression.DescendantsAndSelf.OfType<UnaryOperatorExpression>().Any(IsUnaryModifierExpression)) {
+ // int k = 0;
+ // foreach (var x in y) { k += (z++); }
+
+ return null;
+ }
+
+ var zeroLiteral = new PrimitiveExpression(0);
+
+ Expression baseExpression = enumerableToIterate;
+ for (;;) {
+ ConditionalExpression condition = rightExpression as ConditionalExpression;
+ if (condition == null) {
+ break;
+ }
+
+ if (SameNode(zeroLiteral, condition.TrueExpression)) {
+ baseExpression = new InvocationExpression(new MemberReferenceExpression(baseExpression.Clone(), "Where"),
+ BuildLambda(foreachStatement.VariableName, CSharpUtil.InvertCondition(condition.Condition)));
+ rightExpression = condition.FalseExpression.Clone();
+
+ continue;
+ }
+
+ if (SameNode(zeroLiteral, condition.FalseExpression)) {
+ baseExpression = new InvocationExpression(new MemberReferenceExpression(baseExpression.Clone(), "Where"),
+ BuildLambda(foreachStatement.VariableName, condition.Condition.Clone()));
+ rightExpression = condition.TrueExpression.Clone();
+
+ continue;
+ }
+
+ break;
+ }
+
+ var primitiveOne = new PrimitiveExpression(1);
+ bool isPrimitiveOne = SameNode(primitiveOne, rightExpression);
+
+ var arguments = new List<Expression>();
+
+ string method = isPrimitiveOne ? "Count" : "Sum";
+
+ if (!isPrimitiveOne && !IsIdentifier(rightExpression, foreachStatement.VariableName)) {
+ var lambda = BuildLambda(foreachStatement.VariableName, rightExpression);
+
+ arguments.Add(lambda);
+ }
+
+ var rightSide = new InvocationExpression(new MemberReferenceExpression(baseExpression, method), arguments);
+
+ return new AssignmentExpression(leftExpression.Clone(), AssignmentOperatorType.Add, rightSide);
+ }
+
+ static LambdaExpression BuildLambda(string variableName, Expression expression)
+ {
+ var lambda = new LambdaExpression();
+ lambda.Parameters.Add(new ParameterDeclaration() {
+ Name = variableName
+ });
+ lambda.Body = expression.Clone();
+ return lambda;
+ }
+
+ bool IsIdentifier(Expression expr, string variableName)
+ {
+ var identifierExpr = expr as IdentifierExpression;
+ if (identifierExpr != null) {
+ return identifierExpr.Identifier == variableName;
+ }
+
+ var parenthesizedExpr = expr as ParenthesizedExpression;
+ if (parenthesizedExpr != null) {
+ return IsIdentifier(parenthesizedExpr.Expression, variableName);
+ }
+
+ return false;
+ }
+
+ bool IsLinqSummableType(IType type) {
+ return LinqSummableTypes.Contains(type.FullName);
+ }
+
+ bool ExtractExpression (Statement statement, out Expression leftSide, out Expression rightSide) {
+ ExpressionStatement expression = statement as ExpressionStatement;
+ if (expression != null) {
+ AssignmentExpression assignment = expression.Expression as AssignmentExpression;
+ if (assignment != null) {
+ if (assignment.Operator == AssignmentOperatorType.Add) {
+ leftSide = assignment.Left;
+ rightSide = assignment.Right;
+ return true;
+ }
+ if (assignment.Operator == AssignmentOperatorType.Subtract) {
+ leftSide = assignment.Left;
+ rightSide = new UnaryOperatorExpression(UnaryOperatorType.Minus, assignment.Right.Clone());
+ return true;
+ }
+
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ UnaryOperatorExpression unary = expression.Expression as UnaryOperatorExpression;
+ if (unary != null) {
+ leftSide = unary.Expression;
+ if (unary.Operator == UnaryOperatorType.Increment || unary.Operator == UnaryOperatorType.PostIncrement) {
+ rightSide = new PrimitiveExpression(1);
+ return true;
+ } else if (unary.Operator == UnaryOperatorType.Decrement || unary.Operator == UnaryOperatorType.PostDecrement) {
+ rightSide = new PrimitiveExpression(-1);
+ return true;
+ } else {
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+ }
+ }
+
+ if (statement is EmptyStatement || statement.IsNull) {
+ leftSide = null;
+ rightSide = null;
+ return true;
+ }
+
+ BlockStatement block = statement as BlockStatement;
+ if (block != null) {
+ leftSide = null;
+ rightSide = null;
+
+ foreach (Statement child in block.Statements) {
+ Expression newLeft, newRight;
+ if (!ExtractExpression(child, out newLeft, out newRight)) {
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ if (newLeft == null) {
+ continue;
+ }
+
+ if (leftSide == null) {
+ leftSide = newLeft;
+ rightSide = newRight;
+ } else if (SameNode(leftSide, newLeft)) {
+ rightSide = new BinaryOperatorExpression(ParenthesizeIfNeeded(rightSide).Clone(),
+ BinaryOperatorType.Add,
+ ParenthesizeIfNeeded(newRight).Clone());
+ } else {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ IfElseStatement condition = statement as IfElseStatement;
+ if (condition != null) {
+ Expression ifLeft, ifRight;
+ if (!ExtractExpression(condition.TrueStatement, out ifLeft, out ifRight)) {
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ Expression elseLeft, elseRight;
+ if (!ExtractExpression(condition.FalseStatement, out elseLeft, out elseRight)) {
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ if (ifLeft == null && elseLeft == null) {
+ leftSide = null;
+ rightSide = null;
+ return true;
+ }
+
+ if (ifLeft != null && elseLeft != null && !SameNode(ifLeft, elseLeft)) {
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ ifRight = ifRight ?? new PrimitiveExpression(0);
+ elseRight = elseRight ?? new PrimitiveExpression(0);
+
+ leftSide = ifLeft ?? elseLeft;
+ rightSide = new ConditionalExpression(condition.Condition.Clone(), ifRight.Clone(), elseRight.Clone());
+ return true;
+ }
+
+ leftSide = null;
+ rightSide = null;
+ return false;
+ }
+
+ Expression ParenthesizeIfNeeded(Expression expr)
+ {
+ if (expr is ConditionalExpression) {
+ return new ParenthesizedExpression(expr.Clone());
+ }
+
+ var binaryExpression = expr as BinaryOperatorExpression;
+ if (binaryExpression != null) {
+ if (binaryExpression.Operator != BinaryOperatorType.Multiply &&
+ binaryExpression.Operator != BinaryOperatorType.Divide &&
+ binaryExpression.Operator != BinaryOperatorType.Modulus) {
+
+ return new ParenthesizedExpression(expr.Clone());
+ }
+ }
+
+ return expr;
+ }
+
+ bool SameNode(INode expr1, INode expr2)
+ {
+ Match m = expr1.Match(expr2);
+ return m.Success;
+ }
+
+ ForeachStatement GetForeachStatement (RefactoringContext context)
+ {
+ var foreachStatement = context.GetNode();
+ if (foreachStatement == null) {
+ return null;
+ }
+
+ return foreachStatement.GetParent<ForeachStatement> ();
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertAnonymousDelegateToLambdaAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertAnonymousDelegateToLambdaAction.cs
index b1e4ae5..d838033 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertAnonymousDelegateToLambdaAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertAnonymousDelegateToLambdaAction.cs
@@ -43,7 +43,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var parent = node.Parent;
while (!(parent is Statement))
parent = parent.Parent;
- bool explicitLambda = parent is VariableDeclarationStatement && ((VariableDeclarationStatement)parent).Type.GetText() == "var";
+ bool explicitLambda = parent is VariableDeclarationStatement && ((VariableDeclarationStatement)parent).Type.IsVar();
var lambda = new LambdaExpression { Body = node.Body.Clone() };
foreach (var parameter in node.Parameters) {
if (explicitLambda) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToNullCoalescingAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToNullCoalescingAction.cs
new file mode 100644
index 0000000..5b691a8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToNullCoalescingAction.cs
@@ -0,0 +1,171 @@
+//
+// ConvertIfToNullCoalescingAction.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [ContextAction ("Convert 'if' to '??' expression",
+ Category = IssueCategories.Opportunities,
+ Description = "Convert 'if' statement to '??' expression.")]
+ public class ConvertIfToNullCoalescingAction : SpecializedCodeAction <IfElseStatement>
+ {
+ const string expressionGroupName = "expression";
+ const string comparedNodeGroupName = "comparedNode";
+ const string valueOnNullGroupName = "valueOnNull";
+
+ Expression ActionPattern;
+
+ public ConvertIfToNullCoalescingAction()
+ {
+ var leftPattern = PatternHelper.OptionalParentheses(new AnyNode(comparedNodeGroupName));
+ var rightPattern = PatternHelper.OptionalParentheses(new NullReferenceExpression());
+ var choicePattern = new Choice();
+ var equalityPattern = PatternHelper.CommutativeOperator(leftPattern, BinaryOperatorType.Equality, rightPattern);
+ var inequalityPattern = PatternHelper.CommutativeOperator(leftPattern.Clone(), BinaryOperatorType.InEquality, rightPattern.Clone());
+ choicePattern.Add(equalityPattern);
+ choicePattern.Add(inequalityPattern);
+ var namedChoicePattern = new NamedNode(expressionGroupName, choicePattern);
+ ActionPattern = PatternHelper.OptionalParentheses(namedChoicePattern);
+ }
+
+ protected override CodeAction GetAction (RefactoringContext context, IfElseStatement node)
+ {
+ var match = ActionPattern.Match(node.Condition);
+ if (!match.Success) {
+ return null;
+ }
+
+ var conditionExpression = match.Get<BinaryOperatorExpression>(expressionGroupName).Single();
+ bool isEqualityComparison = conditionExpression.Operator == BinaryOperatorType.Equality;
+
+ Expression comparedNode = match.Get<Expression>(comparedNodeGroupName).Single();
+
+ Statement contentStatement;
+ if (isEqualityComparison) {
+ contentStatement = node.TrueStatement;
+ if (!IsEmpty(node.FalseStatement)) {
+ return null;
+ }
+ } else {
+ contentStatement = node.FalseStatement;
+ if (!IsEmpty(node.TrueStatement)) {
+ return null;
+ }
+ }
+
+ contentStatement = GetSimpleStatement(contentStatement);
+ if (contentStatement == null) {
+ return null;
+ }
+
+ var leftExpressionPattern = PatternHelper.OptionalParentheses(comparedNode);
+ var expressionPattern = new AssignmentExpression(leftExpressionPattern, AssignmentOperatorType.Assign, new AnyNode(valueOnNullGroupName));
+ var statementPattern = new ExpressionStatement(PatternHelper.OptionalParentheses(expressionPattern));
+
+ var statementMatch = statementPattern.Match(contentStatement);
+ if (!statementMatch.Success) {
+ return null;
+ }
+
+ var rightSide = statementMatch.Get<Expression>(valueOnNullGroupName).Single();
+
+ return new CodeAction(context.TranslateString("Convert if statement to ?? expression"),
+ script => {
+
+ var previousNode = node.GetPrevSibling(sibling => sibling is Statement);
+
+ var previousDeclaration = previousNode as VariableDeclarationStatement;
+ if (previousDeclaration != null && previousDeclaration.Variables.Count() == 1) {
+ var variable = previousDeclaration.Variables.First();
+
+ var comparedNodeIdentifierExpression = comparedNode as IdentifierExpression;
+ if (comparedNodeIdentifierExpression != null &&
+ comparedNodeIdentifierExpression.Identifier == variable.Name) {
+
+ script.Replace(variable.Initializer, new BinaryOperatorExpression(variable.Initializer.Clone(),
+ BinaryOperatorType.NullCoalescing,
+ rightSide.Clone()));
+ script.Remove(node);
+
+ return;
+ }
+ }
+
+ var previousExpressionStatement = previousNode as ExpressionStatement;
+ if (previousExpressionStatement != null)
+ {
+ var previousAssignment = previousExpressionStatement.Expression as AssignmentExpression;
+ if (previousAssignment != null &&
+ comparedNode.IsMatch(previousAssignment.Left)) {
+
+ var newExpression = new BinaryOperatorExpression(previousAssignment.Right.Clone(),
+ BinaryOperatorType.NullCoalescing,
+ rightSide.Clone());
+
+ script.Replace(previousAssignment.Right, newExpression);
+ script.Remove(node);
+ return;
+ }
+ }
+
+ var coalescedExpression = new BinaryOperatorExpression(comparedNode.Clone(),
+ BinaryOperatorType.NullCoalescing,
+ rightSide.Clone());
+
+ var newAssignment = new ExpressionStatement(new AssignmentExpression(comparedNode.Clone(), coalescedExpression));
+ script.Replace(node, newAssignment);
+ }, node);
+ }
+
+ Statement GetSimpleStatement (Statement statement)
+ {
+ BlockStatement blockStatement;
+ while ((blockStatement = statement as BlockStatement) != null) {
+ var statements = blockStatement.Descendants.OfType<Statement>()
+ .Where(descendant => !IsEmpty(descendant)).ToList();
+
+ if (statements.Count() != 1) {
+ return null;
+ }
+
+ statement = statements.First();
+ }
+ return statement;
+ }
+
+ bool IsEmpty (Statement statement)
+ {
+ if (statement.IsNull) {
+ return true;
+ }
+ return !statement.DescendantsAndSelf.OfType<Statement>()
+ .Any(descendant => !(descendant is EmptyStatement || descendant is BlockStatement));
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToSwitchAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToSwitchAction.cs
index a7ac1bb..a7410fc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToSwitchAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ConvertIfToSwitchAction.cs
@@ -174,22 +174,16 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
static void CollectSwitchSectionStatements (AstNodeCollection<Statement> result, RefactoringContext context,
Statement statement)
{
- BlockStatement blockStatement;
- if (statement is BlockStatement)
- blockStatement = (BlockStatement)statement.Clone ();
+ BlockStatement blockStatement = statement as BlockStatement;
+ if (blockStatement != null)
+ result.AddRange(blockStatement.Statements.Select(s => s.Clone()));
else
- blockStatement = new BlockStatement { statement.Clone () };
-
- var breackStatement = new BreakStatement ();
- blockStatement.Add (breackStatement);
- // check if break is needed
- var reachabilityAnalysis = context.CreateReachabilityAnalysis (blockStatement);
- if (!reachabilityAnalysis.IsReachable (breackStatement))
- blockStatement.Statements.Remove (breackStatement);
-
- var statements = blockStatement.Statements.ToArray ();
- blockStatement.Statements.Clear ();
- result.AddRange (statements);
+ result.Add(statement.Clone());
+
+ // add 'break;' at end if necessary
+ var reachabilityAnalysis = context.CreateReachabilityAnalysis (statement);
+ if (reachabilityAnalysis.IsEndpointReachable(statement))
+ result.Add(new BreakStatement());
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateBackingStoreAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateBackingStoreAction.cs
index 1ab23cf..204ac13 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateBackingStoreAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateBackingStoreAction.cs
@@ -35,9 +35,9 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
var property = context.GetNode<PropertyDeclaration>();
if (!(property != null &&
- !property.Getter.IsNull && !property.Setter.IsNull && // automatic properties always need getter & setter
- property.Getter.Body.IsNull &&
- property.Setter.Body.IsNull)) {
+ !property.Getter.IsNull && !property.Setter.IsNull && // automatic properties always need getter & setter
+ property.Getter.Body.IsNull &&
+ property.Setter.Body.IsNull)) {
yield break;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateClassDeclarationAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateClassDeclarationAction.cs
index 93b902f..4cf9f68 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateClassDeclarationAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateClassDeclarationAction.cs
@@ -188,7 +188,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
static TypeDeclaration CreateClassFromObjectCreation(RefactoringContext context, ObjectCreateExpression createExpression)
{
TypeDeclaration result;
- string className = createExpression.Type.GetText();
+ string className = createExpression.Type.ToString();
if (!createExpression.Arguments.Any()) {
result = new TypeDeclaration { Name = className };
} else {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateFieldAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateFieldAction.cs
index 8fd1383..4642df2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateFieldAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/CreateFieldAction.cs
@@ -176,6 +176,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
internal static IEnumerable<IType> GetValidTypes(CSharpAstResolver resolver, AstNode expr)
{
+ if (expr.Role == Roles.Condition) {
+ return new [] { resolver.Compilation.FindType (KnownTypeCode.Boolean) };
+ }
+
if (expr.Parent is DirectionExpression) {
var parent = expr.Parent.Parent;
if (parent is InvocationExpression) {
@@ -186,14 +190,14 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
if (expr.Parent is ArrayInitializerExpression) {
if (expr is NamedExpression)
- return new [] { resolver.Resolve(((NamedExpression)expr).Expression).Type };
+ return new [] { resolver.Resolve(((NamedExpression)expr).Expression).Type };
var aex = expr.Parent as ArrayInitializerExpression;
if (aex.IsSingleElement)
aex = aex.Parent as ArrayInitializerExpression;
var type = GetElementType(resolver, resolver.Resolve(aex.Parent).Type);
if (type.Kind != TypeKind.Unknown)
- return new [] { type };
+ return new [] { type };
}
if (expr.Parent is ObjectCreateExpression) {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/DeclareLocalVariableAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/DeclareLocalVariableAction.cs
index d38058a..10ea2f0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/DeclareLocalVariableAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/DeclareLocalVariableAction.cs
@@ -43,10 +43,21 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
yield break;
}
var selected = new List<AstNode>(context.GetSelectedNodes());
+
if (selected.Count != 1 || !(selected [0] is Expression)) {
yield break;
}
+
var expr = selected [0] as Expression;
+ if (expr is ArrayInitializerExpression) {
+ var arr = (ArrayInitializerExpression)expr;
+ if (arr.IsSingleElement) {
+ expr = arr.Elements.First();
+ } else {
+ yield break;
+ }
+ }
+
var visitor = new SearchNodeVisitior(expr);
var node = context.GetNode <BlockStatement>();
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractAnonymousMethodAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractAnonymousMethodAction.cs
index 0d7f265..058d5ec 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractAnonymousMethodAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractAnonymousMethodAction.cs
@@ -26,6 +26,7 @@
using System.Collections.Generic;
using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.CSharp.Resolver;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
@@ -93,8 +94,8 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
if (noReturnValue) {
method.ReturnType = new PrimitiveType ("void");
} else {
- var type = lambda.GetInferredReturnType (lambda.Parameters.Select (p => p.Type).ToArray ());
- method.ReturnType = type.Name == "?" ? new PrimitiveType ("void") : context.CreateShortType (type);
+ var type = lambda.ReturnType;
+ method.ReturnType = type.Kind == TypeKind.Unknown ? new PrimitiveType ("void") : context.CreateShortType (type);
}
foreach (var param in lambda.Parameters)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractFieldAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractFieldAction.cs
index 973b90e..a2fbfbe 100755
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractFieldAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractFieldAction.cs
@@ -35,8 +35,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
[ContextAction("Extract field", Description = "Extracts a field from a local variable declaration.")]
public class ExtractFieldAction : ICodeActionProvider
{
- static readonly AstType varType = new SimpleType ("var");
-
public IEnumerable<CodeAction> GetActions(RefactoringContext context)
{
//TODO: implement variable assignment & ctor param
@@ -51,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var name = varInit.Name;
AstType extractedType;
- if (type.IsMatch (varType)) {
+ if (type.IsVar()) {
IType resolvedType = context.Resolve(varInit.Initializer).Type;
extractedType = context.CreateShortType(resolvedType);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/StaticVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/StaticVisitor.cs
index 168fe3e..41fc000 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/StaticVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/StaticVisitor.cs
@@ -33,16 +33,16 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring.ExtractMethod
{
class StaticVisitor : DepthFirstAstVisitor
{
- readonly RefactoringContext context;
+ readonly BaseRefactoringContext context;
public bool UsesNonStaticMember = false;
- StaticVisitor(RefactoringContext context)
+ StaticVisitor(BaseRefactoringContext context)
{
this.context = context;
}
- public static bool UsesNotStaticMember(RefactoringContext context, AstNode node)
+ public static bool UsesNotStaticMember(BaseRefactoringContext context, AstNode node)
{
var visitor = new StaticVisitor(context);
node.AcceptVisitor(visitor);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/VariableLookupVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/VariableLookupVisitor.cs
index 99ba91f..a4f46bf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/VariableLookupVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ExtractMethod/VariableLookupVisitor.cs
@@ -64,12 +64,45 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring.ExtractMethod
if (startLocation.IsEmpty || startLocation <= identifierExpression.StartLocation && identifierExpression.EndLocation <= endLocation) {
var result = context.Resolve(identifierExpression);
var local = result as LocalResolveResult;
- if (local != null && !UsedVariables.Contains(local.Variable)) {
+ if (local != null && !UsedVariables.Contains(local.Variable)&& !anonymousParameters.Contains(local.Variable)) {
UsedVariables.Add(local.Variable);
}
}
}
-
+
+ HashSet<IVariable> anonymousParameters = new HashSet<IVariable> ();
+ public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
+ {
+ foreach (var param in lambdaExpression.Parameters) {
+ var result = context.Resolve(param);
+ var local = result as LocalResolveResult;
+ anonymousParameters.Add(local.Variable);
+ }
+ base.VisitLambdaExpression(lambdaExpression);
+ foreach (var param in lambdaExpression.Parameters) {
+ var result = context.Resolve(param);
+ var local = result as LocalResolveResult;
+ anonymousParameters.Remove(local.Variable);
+ }
+ }
+
+ public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
+ {
+ foreach (var param in anonymousMethodExpression.Parameters) {
+ var result = context.Resolve(param);
+ var local = result as LocalResolveResult;
+ anonymousParameters.Add(local.Variable);
+ }
+
+
+ base.VisitAnonymousMethodExpression(anonymousMethodExpression);
+ foreach (var param in anonymousMethodExpression.Parameters) {
+ var result = context.Resolve(param);
+ var local = result as LocalResolveResult;
+ anonymousParameters.Remove(local.Variable);
+ }
+ }
+
public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
{
base.VisitVariableDeclarationStatement(variableDeclarationStatement);
@@ -77,7 +110,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring.ExtractMethod
if (startLocation.IsEmpty || startLocation <= varDecl.StartLocation && varDecl.EndLocation <= endLocation) {
var result = context.Resolve(varDecl);
var local = result as LocalResolveResult;
- if (local != null && !UsedVariables.Contains(local.Variable))
+ if (local != null && !UsedVariables.Contains(local.Variable) && !anonymousParameters.Contains(local.Variable))
UsedVariables.Add(local.Variable);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/FlipOperatorArgumentsAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/FlipOperatorArgumentsAction.cs
index 74a18c0..ba1806c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/FlipOperatorArgumentsAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/FlipOperatorArgumentsAction.cs
@@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
- yield return new CodeAction(string.Format(context.TranslateString("Flip '{0}' operator arguments"), binop.OperatorToken.GetText()), script => {
+ yield return new CodeAction(string.Format(context.TranslateString("Flip '{0}' operator arguments"), binop.OperatorToken.ToString()), script => {
script.Replace(binop.Left, binop.Right.Clone());
script.Replace(binop.Right, binop.Left.Clone());
}, binop.OperatorToken);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementAbstractMembersAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementAbstractMembersAction.cs
index b81b583..0eac6f8 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementAbstractMembersAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementAbstractMembersAction.cs
@@ -84,10 +84,14 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
// Stub out non-implemented methods defined by @iface
foreach (var method in abstractType.GetMethods (d => !d.IsSynthetic && d.IsAbstract)) {
alreadyImplemented = false;
-
- foreach (var cmet in implementingType.GetMethods ()) {
- if (!cmet.IsAbstract && ImplementInterfaceAction.CompareMethods(method, cmet)) {
+
+ var allBaseTypes = method.DeclaringType.GetAllBaseTypes().ToList ();
+ foreach (var cmet in implementingType.GetMethods (d => !d.IsAbstract && d.Name == method.Name)) {
+ if (allBaseTypes.Contains(cmet.DeclaringType))
+ continue;
+ if (ImplementInterfaceAction.CompareMethods(method, cmet)) {
alreadyImplemented = true;
+ break;
}
}
if (!alreadyImplemented)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementInterfaceAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementInterfaceAction.cs
index 2b311c2..6981421 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementInterfaceAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementInterfaceAction.cs
@@ -91,7 +91,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
static EntityDeclaration GenerateMemberImplementation(RefactoringContext context, IMember member, bool explicitImplementation)
{
- var builder = context.CreateTypeSytemAstBuilder();
+ var builder = context.CreateTypeSystemAstBuilder();
builder.GenerateBody = true;
builder.ShowModifiers = false;
builder.ShowAccessibility = true;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementNotImplementedProperty.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementNotImplementedProperty.cs
new file mode 100644
index 0000000..e56fd41
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/ImplementNotImplementedProperty.cs
@@ -0,0 +1,101 @@
+//
+// ImplementNotImplementedProperty.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [ContextAction("Create a backing field for a not implemented property", Description = "Creates a backing field for a not implemented property.")]
+ public class ImplementNotImplementedProperty : ICodeActionProvider
+ {
+ bool IsNotImplemented(RefactoringContext context, BlockStatement body)
+ {
+ if (body.IsNull)
+ return true;
+ if (body.Statements.Count == 1) {
+ var throwStmt = body.Statements.First () as ThrowStatement;
+ if (throwStmt != null) {
+ return context.Resolve (throwStmt.Expression).Type.FullName == "System.NotImplementedException";
+ }
+ }
+ return false;
+ }
+
+ public IEnumerable<CodeAction> GetActions(RefactoringContext context)
+ {
+ var property = context.GetNode<PropertyDeclaration> ();
+ if (property == null ||
+ !IsNotImplemented (context, property.Getter.Body) ||
+ !IsNotImplemented (context, property.Setter.Body)) {
+ yield break;
+ }
+
+ yield return new CodeAction(context.TranslateString("Implement property"), script => {
+ string backingStoreName = context.GetNameProposal (property.Name);
+
+ // create field
+ var backingStore = new FieldDeclaration ();
+ if (property.Modifiers.HasFlag (Modifiers.Static))
+ backingStore.Modifiers |= Modifiers.Static;
+
+ if (property.Setter.IsNull)
+ backingStore.Modifiers |= Modifiers.Readonly;
+
+ backingStore.ReturnType = property.ReturnType.Clone ();
+
+ var initializer = new VariableInitializer (backingStoreName);
+ backingStore.Variables.Add (initializer);
+
+ // create new property & implement the get/set bodies
+ var newProperty = (PropertyDeclaration)property.Clone ();
+ Expression id1;
+ if (backingStoreName == "value")
+ id1 = new ThisReferenceExpression().Member("value");
+ else
+ id1 = new IdentifierExpression (backingStoreName);
+ Expression id2 = id1.Clone();
+ newProperty.Getter.Body = new BlockStatement () {
+ new ReturnStatement (id1)
+ };
+ if (!property.Setter.IsNull) {
+ newProperty.Setter.Body = new BlockStatement () {
+ new AssignmentExpression (id2, AssignmentOperatorType.Assign, new IdentifierExpression ("value"))
+ };
+ }
+
+ script.Replace (property, newProperty);
+ script.InsertBefore (property, backingStore);
+ if (!property.Setter.IsNull)
+ script.Link (initializer, id1, id2);
+ else
+ script.Link (initializer, id1);
+ }, property.NameToken);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveBackingStoreAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveBackingStoreAction.cs
index 6267e0c..4e1add9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveBackingStoreAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveBackingStoreAction.cs
@@ -89,7 +89,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var setterField = ScanSetter (context, propertyDeclaration);
if (setterField == null)
return null;
- if (getterField.Region != setterField.Region)
+ if (!getterField.Equals(setterField))
return null;
return getterField;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveFieldRefactoryActionRefactoringAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveFieldRefactoryActionRefactoringAction.cs
index 7f44799..5a8c59b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveFieldRefactoryActionRefactoringAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/RemoveFieldRefactoryActionRefactoringAction.cs
@@ -31,7 +31,7 @@ using ICSharpCode.NRefactory.Semantics;
namespace ICSharpCode.NRefactory.CSharp
{
- [ContextAction("Removes a field from a class", Description = "It removes also the empty assingments and the usages")]
+// [ContextAction("Removes a field from a class", Description = "It removes also the empty assingments and the usages")]
public class RemoveFieldRefactoryAction : ICodeActionProvider
{
public IEnumerable<CodeAction> GetActions(RefactoringContext context)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfFlowAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfFlowAction.cs
index 6286517..fbd15af 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfFlowAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfFlowAction.cs
@@ -34,9 +34,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
public IEnumerable<CodeAction> GetActions(RefactoringContext context)
{
- // TODO: Invert if without else
- // ex. if (cond) DoSomething () == if (!cond) return; DoSomething ()
- // beware of loop contexts return should be continue then.
var ifStatement = GetIfElseStatement(context);
if (ifStatement == null)
yield break;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfInLoopsFlowAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfInLoopsFlowAction.cs
index 99d79f8..e1c3e83 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfInLoopsFlowAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SimplifyIfInLoopsFlowAction.cs
@@ -34,10 +34,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
public IEnumerable<CodeAction> GetActions(RefactoringContext context)
{
- // TODO: Invert if without else
- // ex. if (cond) DoSomething () == if (!cond) return; DoSomething ()
- // beware of loop contexts return should be continue then.
-
var ifStatement = GetIfElseStatement(context);
if (ifStatement == null)
yield break;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SplitDeclarationAndAssignmentAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SplitDeclarationAndAssignmentAction.cs
index 5070590..cf195e7 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SplitDeclarationAndAssignmentAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/SplitDeclarationAndAssignmentAction.cs
@@ -51,7 +51,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
var newVarDecl = (VariableDeclarationStatement)varDecl.Clone();
newVarDecl.Role = BlockStatement.StatementRole;
- if (newVarDecl.Type.IsMatch(new SimpleType ("var"))) {
+ if (newVarDecl.Type.IsVar()) {
newVarDecl.Type = type;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseExplicitTypeAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseExplicitTypeAction.cs
index e86be91..9e3987a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseExplicitTypeAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseExplicitTypeAction.cs
@@ -74,12 +74,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
return arrayType != null && ContainsAnonymousType (arrayType.ElementType);
}
- static readonly AstType varType = new SimpleType ("var");
-
static VariableDeclarationStatement GetVariableDeclarationStatement (RefactoringContext context)
{
var result = context.GetNode<VariableDeclarationStatement> ();
- if (result != null && result.Variables.Count == 1 && !result.Variables.First ().Initializer.IsNull && result.Type.Contains (context.Location.Line, context.Location.Column) && result.Type.IsMatch (varType)) {
+ if (result != null && result.Variables.Count == 1 && !result.Variables.First ().Initializer.IsNull && result.Type.Contains (context.Location.Line, context.Location.Column) && result.Type.IsVar ()) {
if (context.Resolve (result.Variables.First ().Initializer) == null)
return null;
return result;
@@ -90,7 +88,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
static ForeachStatement GetForeachStatement (RefactoringContext context)
{
var result = context.GetNode<ForeachStatement> ();
- if (result != null && result.VariableType.Contains (context.Location) && result.VariableType.IsMatch (varType))
+ if (result != null && result.VariableType.Contains (context.Location) && result.VariableType.IsVar ())
return result;
return null;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseVarKeywordAction.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseVarKeywordAction.cs
index 1039a3e..77e32f4 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseVarKeywordAction.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeActions/UseVarKeywordAction.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
[ContextAction("Use 'var' keyword",
Description = "Converts local variable declaration to be implicit typed.",
- BoundToIssue = typeof (ICSharpCode.NRefactory.CSharp.Refactoring.UseVarKeywordIssue))]
+ BoundToIssue = typeof (ICSharpCode.NRefactory.CSharp.Refactoring.SuggestUseVarKeywordEvidentIssue))]
public class UseVarKeywordAction : ICodeActionProvider
{
public IEnumerable<CodeAction> GetActions(RefactoringContext context)
@@ -52,12 +52,10 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}, (AstNode)varDecl ?? foreachStmt);
}
- static readonly AstType varType = new SimpleType ("var");
-
static VariableDeclarationStatement GetVariableDeclarationStatement (RefactoringContext context)
{
var result = context.GetNode<VariableDeclarationStatement> ();
- if (result != null && result.Variables.Count == 1 && !result.Variables.First ().Initializer.IsNull && result.Type.Contains (context.Location) && !result.Type.IsMatch (varType))
+ if (result != null && result.Variables.Count == 1 && !result.Variables.First ().Initializer.IsNull && result.Type.Contains (context.Location) && !result.Type.IsVar ())
return result;
return null;
}
@@ -65,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
static ForeachStatement GetForeachStatement (RefactoringContext context)
{
var result = context.GetNode<ForeachStatement> ();
- if (result != null && result.VariableType.Contains (context.Location) && !result.VariableType.IsMatch (varType))
+ if (result != null && result.VariableType.Contains (context.Location) && !result.VariableType.IsVar ())
return result;
return null;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToClosureIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToClosureIssue.cs
deleted file mode 100644
index 4bdcccb..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToClosureIssue.cs
+++ /dev/null
@@ -1,319 +0,0 @@
-//
-// AccessToClosureIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Analysis;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public abstract class AccessToClosureIssue : ICodeIssueProvider
- {
- ControlFlowGraphBuilder cfgBuilder = new ControlFlowGraphBuilder ();
-
- public string Title
- { get; private set; }
-
- protected AccessToClosureIssue (string title)
- {
- Title = title;
- }
-
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue> ();
- return new GatherVisitor (context, unit, this).GetIssues ();
- }
-
- protected virtual bool IsTargetVariable (IVariable variable)
- {
- return true;
- }
-
- protected abstract NodeKind GetNodeKind (AstNode node);
-
- protected virtual bool CanReachModification (ControlFlowNode node, Statement start,
- IDictionary<Statement, IList<Node>> modifications)
- {
- return node.NextStatement != null && node.NextStatement != start &&
- modifications.ContainsKey (node.NextStatement);
- }
-
- protected abstract IEnumerable<CodeAction> GetFixes (BaseRefactoringContext context, Node env,
- string variableName);
-
- #region GatherVisitor
-
- class GatherVisitor : GatherVisitorBase<AccessToClosureIssue>
- {
- string title;
-
- public GatherVisitor (BaseRefactoringContext context, SyntaxTree unit,
- AccessToClosureIssue issueProvider)
- : base (context, issueProvider)
- {
- this.title = context.TranslateString (issueProvider.Title);
- }
-
- public override void VisitVariableInitializer (VariableInitializer variableInitializer)
- {
- var variableDecl = variableInitializer.Parent as VariableDeclarationStatement;
- if (variableDecl != null)
- CheckVariable (((LocalResolveResult)ctx.Resolve (variableInitializer)).Variable,
- variableDecl.GetParent<Statement> ());
- base.VisitVariableInitializer (variableInitializer);
- }
-
- public override void VisitForeachStatement (ForeachStatement foreachStatement)
- {
- CheckVariable (((LocalResolveResult)ctx.Resolve (foreachStatement.VariableNameToken)).Variable,
- foreachStatement);
- base.VisitForeachStatement (foreachStatement);
- }
-
- public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
- {
- var parent = parameterDeclaration.Parent;
- Statement body = null;
- if (parent is MethodDeclaration) {
- body = ((MethodDeclaration)parent).Body;
- } else if (parent is AnonymousMethodExpression) {
- body = ((AnonymousMethodExpression)parent).Body;
- } else if (parent is LambdaExpression) {
- body = ((LambdaExpression)parent).Body as Statement;
- } else if (parent is ConstructorDeclaration) {
- body = ((ConstructorDeclaration)parent).Body;
- } else if (parent is OperatorDeclaration) {
- body = ((OperatorDeclaration)parent).Body;
- }
- if (body != null) {
- var lrr = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
- if (lrr != null)
- CheckVariable (lrr.Variable, body);
- }
- base.VisitParameterDeclaration (parameterDeclaration);
- }
-
- void CheckVariable(IVariable variable, Statement env)
- {
- if (!IssueProvider.IsTargetVariable(variable))
- return;
-
- var root = new Environment (env, env);
- var envLookup = new Dictionary<AstNode, Environment> ();
- envLookup [env] = root;
-
- foreach (var result in ctx.FindReferences(env, variable)) {
- AddNode(envLookup, new Node(result.Node, IssueProvider.GetNodeKind(result.Node)));
- }
-
- root.SortChildren ();
- CollectIssues (root, variable.Name);
- }
-
- void CollectIssues (Environment env, string variableName)
- {
- IList<ControlFlowNode> cfg = null;
- IDictionary<Statement, IList<Node>> modifications = null;
-
- if (env.Body != null) {
- cfg = IssueProvider.cfgBuilder.BuildControlFlowGraph (env.Body);
- modifications = new Dictionary<Statement, IList<Node>> ();
- foreach (var node in env.Children) {
- if (node.Kind == NodeKind.Modification || node.Kind == NodeKind.ReferenceAndModification) {
- IList<Node> nodes;
- if (!modifications.TryGetValue (node.ContainingStatement, out nodes))
- modifications [node.ContainingStatement] = nodes = new List<Node> ();
- nodes.Add (node);
- }
- }
- }
-
- foreach (var child in env.GetChildEnvironments ()) {
- if (!child.IssueCollected && cfg != null &&
- CanReachModification (cfg, child, modifications))
- CollectAllIssues (child, variableName);
-
- CollectIssues (child, variableName);
- }
- }
-
- void CollectAllIssues (Environment env, string variableName)
- {
- var fixes = IssueProvider.GetFixes (ctx, env, variableName).ToArray ();
- env.IssueCollected = true;
-
- foreach (var child in env.Children) {
- if (child is Environment) {
- CollectAllIssues ((Environment)child, variableName);
- } else {
- if (child.Kind != NodeKind.Modification)
- AddIssue (child.AstNode, title, fixes);
- // stop marking references after the variable is modified in current environment
- if (child.Kind != NodeKind.Reference)
- break;
- }
- }
- }
-
- void AddNode (IDictionary<AstNode, Environment> envLookup, Node node)
- {
- var astParent = node.AstNode.Parent;
- var path = new List<AstNode> ();
- while (astParent != null) {
- Environment parent;
- if (envLookup.TryGetValue (astParent, out parent)) {
- parent.Children.Add (node);
- return;
- }
-
- if (astParent is LambdaExpression) {
- parent = new Environment (astParent, ((LambdaExpression)astParent).Body as Statement);
- } else if (astParent is AnonymousMethodExpression) {
- parent = new Environment (astParent, ((AnonymousMethodExpression)astParent).Body);
- }
-
- path.Add (astParent);
- if (parent != null) {
- foreach (var astNode in path)
- envLookup [astNode] = parent;
- path.Clear ();
-
- parent.Children.Add (node);
- node = parent;
- }
- astParent = astParent.Parent;
- }
- }
-
- bool CanReachModification (IEnumerable<ControlFlowNode> cfg, Environment env,
- IDictionary<Statement, IList<Node>> modifications)
- {
- if (modifications.Count == 0)
- return false;
-
- var start = env.ContainingStatement;
- if (modifications.ContainsKey (start) &&
- modifications [start].Any (v => v.AstNode.StartLocation > env.AstNode.EndLocation))
- return true;
-
- var stack = new Stack<ControlFlowNode> (cfg.Where (node => node.NextStatement == start));
- var visitedNodes = new HashSet<ControlFlowNode> (stack);
- while (stack.Count > 0) {
- var node = stack.Pop ();
- if (IssueProvider.CanReachModification (node, start, modifications))
- return true;
- foreach (var edge in node.Outgoing) {
- if (visitedNodes.Add (edge.To))
- stack.Push (edge.To);
- }
- }
- return false;
- }
-
- }
-
- #endregion
-
- #region Node
-
- protected enum NodeKind
- {
- Reference,
- Modification,
- ReferenceAndModification,
- Environment,
- }
-
- protected class Node
- {
- public AstNode AstNode
- { get; private set; }
-
- public NodeKind Kind
- { get; private set; }
-
- public Statement ContainingStatement
- { get; private set; }
-
- public Node (AstNode astNode, NodeKind kind)
- {
- AstNode = astNode;
- Kind = kind;
- ContainingStatement = astNode.GetParent<Statement> ();
- }
-
- public virtual IEnumerable<Node> GetAllReferences ()
- {
- yield return this;
- }
- }
-
- protected class Environment : Node
- {
- public Statement Body
- { get; private set; }
-
- public bool IssueCollected
- { get; set; }
-
- public List<Node> Children
- { get; private set; }
-
- public Environment (AstNode astNode, Statement body)
- : base (astNode, NodeKind.Environment)
- {
- Body = body;
- Children = new List<Node> ();
- }
-
- public override IEnumerable<Node> GetAllReferences ()
- {
- return Children.SelectMany (child => child.GetAllReferences ());
- }
-
- public IEnumerable<Environment> GetChildEnvironments ()
- {
- return from child in Children
- where child is Environment
- select (Environment)child;
- }
-
- public void SortChildren ()
- {
- Children.Sort ((x, y) => x.AstNode.StartLocation.CompareTo(y.AstNode.StartLocation));
- foreach (var env in GetChildEnvironments ())
- env.SortChildren ();
- }
- }
-
- #endregion
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs
deleted file mode 100644
index 6421215..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AssignmentMadeToSameVariableIssue.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// AssignmentMadeToSameVariableIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.PatternMatching;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("CS1717:Assignment made to same variable",
- Description = "CS1717:Assignment made to same variable.",
- Category = IssueCategories.CompilerWarnings,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut)]
- public class AssignmentMadeToSameVariableIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<AssignmentMadeToSameVariableIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitAssignmentExpression (AssignmentExpression assignmentExpression)
- {
- base.VisitAssignmentExpression (assignmentExpression);
-
- if (assignmentExpression.Operator != AssignmentOperatorType.Assign)
- return;
- if (!(assignmentExpression.Left is IdentifierExpression) &&
- !(assignmentExpression.Left is MemberReferenceExpression))
- return;
-
- var resolveResult = ctx.Resolve (assignmentExpression.Left);
- var memberResolveResult = resolveResult as MemberResolveResult;
- if (memberResolveResult != null) {
- var memberResolveResult2 = ctx.Resolve (assignmentExpression.Right) as MemberResolveResult;
- if (memberResolveResult2 == null || !AreEquivalent(memberResolveResult, memberResolveResult2))
- return;
- } else if (resolveResult is LocalResolveResult) {
- if (!assignmentExpression.Left.Match (assignmentExpression.Right).Success)
- return;
- } else {
- return;
- }
-
- AstNode node;
- Action<Script> action;
- if (assignmentExpression.Parent is ExpressionStatement) {
- node = assignmentExpression.Parent;
- action = script => script.Remove (assignmentExpression.Parent);
- } else {
- node = assignmentExpression;
- action = script => script.Replace (assignmentExpression, assignmentExpression.Left.Clone ());
- }
- AddIssue (node, ctx.TranslateString ("CS1717:Assignment made to same variable"),
- new [] { new CodeAction (ctx.TranslateString ("Remove assignment"), action, node) });
- }
-
- static bool AreEquivalent(ResolveResult first, ResolveResult second)
- {
- var firstPath = AccessPath.FromResolveResult(first);
- var secondPath = AccessPath.FromResolveResult(second);
- return firstPath != null && firstPath.Equals(secondPath) && !firstPath.MemberPath.Any(m => !(m is IField));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/BitwiseOperationOnNonFlagsEnumIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/BitwiseOperationOnNonFlagsEnumIssue.cs
deleted file mode 100644
index 42c85a5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/BitwiseOperationOnNonFlagsEnumIssue.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// BitwiseOperationOnNonFlagsEnumIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Bitwise Operations on enum without [Flags] attribute",
- Description = "Bitwise Operations on enum not marked with [Flags] attribute",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "BitwiseOperatorOnEnumWihtoutFlags")]
- public class BitwiseOperationOnNonFlagsEnumIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<BitwiseOperationOnNonFlagsEnumIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- static bool IsBitwiseOperator (UnaryOperatorType op)
- {
- return op == UnaryOperatorType.BitNot;
- }
-
- static bool IsBitwiseOperator (AssignmentOperatorType op)
- {
- return op == AssignmentOperatorType.BitwiseAnd || op == AssignmentOperatorType.BitwiseOr ||
- op == AssignmentOperatorType.ExclusiveOr;
- }
-
- static bool IsBitwiseOperator (BinaryOperatorType op)
- {
- return op == BinaryOperatorType.BitwiseAnd || op == BinaryOperatorType.BitwiseOr ||
- op == BinaryOperatorType.ExclusiveOr;
- }
-
- bool IsNonFlagsEnum (Expression expr)
- {
- var resolveResult = ctx.Resolve (expr);
- if (resolveResult == null || resolveResult.Type.Kind != TypeKind.Enum)
- return false;
-
- // check [Flags]
- var typeDef = resolveResult.Type.GetDefinition ();
- return typeDef != null &&
- typeDef.Attributes.All (attr => attr.AttributeType.FullName != "System.FlagsAttribute");
- }
-
- private void AddIssue (CSharpTokenNode operatorToken)
- {
- AddIssue (operatorToken,
- ctx.TranslateString ("Bitwise Operations on enum not marked with Flags attribute"));
- }
-
- public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
- {
- base.VisitUnaryOperatorExpression (unaryOperatorExpression);
-
- if (!IsBitwiseOperator (unaryOperatorExpression.Operator))
- return;
- if (IsNonFlagsEnum (unaryOperatorExpression.Expression))
- AddIssue (unaryOperatorExpression.OperatorToken);
- }
-
- public override void VisitAssignmentExpression (AssignmentExpression assignmentExpression)
- {
- base.VisitAssignmentExpression (assignmentExpression);
-
- if (!IsBitwiseOperator (assignmentExpression.Operator))
- return;
- if (IsNonFlagsEnum (assignmentExpression.Right))
- AddIssue (assignmentExpression.OperatorToken);
- }
-
- public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression (binaryOperatorExpression);
-
- if (!IsBitwiseOperator (binaryOperatorExpression.Operator))
- return;
- if (IsNonFlagsEnum (binaryOperatorExpression.Left) || IsNonFlagsEnum (binaryOperatorExpression.Right))
- AddIssue (binaryOperatorExpression.OperatorToken);
- }
-
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToObjectEqualsViaBaseIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToObjectEqualsViaBaseIssue.cs
deleted file mode 100644
index dcfd502..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToObjectEqualsViaBaseIssue.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// CallToObjectEqualsViaBaseIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Call to base.Equals resolves to Object.Equals, which is reference equality",
- Description = "Finds potentially erroneous calls to Object.Equals.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "BaseObjectEqualsIsObjectEquals")]
- public class CallToObjectEqualsViaBaseIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<CallToObjectEqualsViaBaseIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- if (invocationExpression.Arguments.Count != 1) {
- return;
- }
- var memberExpression = invocationExpression.Target as MemberReferenceExpression;
- if (memberExpression == null || memberExpression.MemberName != "Equals" || !(memberExpression.Target is BaseReferenceExpression)) {
- return;
- }
- var resolveResult = ctx.Resolve(invocationExpression) as InvocationResolveResult;
- if (resolveResult == null || !resolveResult.Member.DeclaringTypeDefinition.IsKnownType(KnownTypeCode.Object)) {
- return;
- }
- var title = ctx.TranslateString("Call to base.Equals resolves to Object.Equals, which is reference equality");
- AddIssue(invocationExpression, title, GetActions(invocationExpression));
- }
-
- IEnumerable<CodeAction> GetActions(InvocationExpression invocationExpression)
- {
- yield return new CodeAction(ctx.TranslateString("Change invocation to call Object.ReferenceEquals"), script => {
- var args = Enumerable.Concat(new [] { new ThisReferenceExpression() }, invocationExpression.Arguments.Select(arg => arg.Clone()));
- var newInvocation = MakeInvocation("object.ReferenceEquals", args);
- script.Replace(invocationExpression, newInvocation);
- }, invocationExpression);
- yield return new CodeAction(ctx.TranslateString("Remove 'base.'"), script => {
- var newInvocation = MakeInvocation("Equals", invocationExpression.Arguments.Select(arg => arg.Clone()));
- script.Replace(invocationExpression, newInvocation);
- }, invocationExpression);
- }
-
- static InvocationExpression MakeInvocation(string memberName, IEnumerable<Expression> unClonedArguments)
- {
- return new InvocationExpression(new IdentifierExpression(memberName), unClonedArguments);
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToVirtualFunctionFromConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToVirtualFunctionFromConstructorIssue.cs
deleted file mode 100644
index 8d196f8..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CallToVirtualFunctionFromConstructorIssue.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-//
-// CallToVirtualFunctionFromConstructorIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Constructors should not call virtual members",
- Description = "Warns about calls to virtual member functions occuring in the constructor.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "DoNotCallOverridableMethodsInConstructor")]
- public class CallToVirtualFunctionFromConstructorIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var gv = new GatherVisitor(context);
- context.RootNode.AcceptVisitor(gv);
- return gv.CallFinder.FoundIssues;
- }
-
- class GatherVisitor : GatherVisitorBase<CallToVirtualFunctionFromConstructorIssue>
- {
- internal readonly VirtualCallFinderVisitor CallFinder;
-
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- CallFinder = new VirtualCallFinderVisitor(context);
- }
-
- bool isSealedType;
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- if (typeDeclaration.ClassType != ClassType.Class && typeDeclaration.ClassType != ClassType.Struct)
- return;
- bool oldIsSealedType = isSealedType;
- isSealedType = typeDeclaration.Modifiers.HasFlag(Modifiers.Sealed);
- base.VisitTypeDeclaration(typeDeclaration);
- isSealedType = oldIsSealedType;
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- if (isSealedType)
- return;
- var body = constructorDeclaration.Body;
- if (body == null || body.IsNull)
- return;
- body.AcceptVisitor(CallFinder);
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- // nothing
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- // nothing
- }
-
- public override void VisitIndexerExpression(IndexerExpression indexerExpression)
- {
- // nothing
- }
-
- public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
- {
- // nothing
- }
-
- public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
- {
- // nothing
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- // nothing
- }
-
- public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
- {
- // nothing
- }
- }
-
- class VirtualCallFinderVisitor: GatherVisitorBase<CallToVirtualFunctionFromConstructorIssue>
- {
- readonly BaseRefactoringContext context;
-
- public VirtualCallFinderVisitor(BaseRefactoringContext context) : base(context)
- {
- this.context = context;
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
- if (!IsCallDependentOnCurrentInstance(invocationExpression))
- // Call within current class scope without 'this' or 'base'
- return;
- var targetMethod = context.Resolve(invocationExpression) as InvocationResolveResult;
- if (targetMethod == null)
- return;
- if (targetMethod.IsVirtualCall) {
- AddIssue(invocationExpression,
- context.TranslateString("Constructors should not call virtual members"));
- }
- }
-
- bool IsCallDependentOnCurrentInstance(InvocationExpression invocationExpression)
- {
- if (invocationExpression.Target is IdentifierExpression)
- // Call within current class scope without 'this' or 'base'
- return true;
- var expression = invocationExpression.Target as MemberReferenceExpression;
- if (expression == null || expression.Target is ThisReferenceExpression)
- // Call within current class scope using 'this' or 'base'
- return true;
- return false;
- }
-
- public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
- {
- // ignore lambdas
- }
-
- public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
- {
- // ignore anonymous methods
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CastExpressionOfIncompatibleTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CastExpressionOfIncompatibleTypeIssue.cs
deleted file mode 100644
index 45a731f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CastExpressionOfIncompatibleTypeIssue.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// CastExpressionOfIncompatibleTypeIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Type cast expression of incompatible type",
- Description = "Type cast expression of incompatible type",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class CastExpressionOfIncompatibleTypeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<CastExpressionOfIncompatibleTypeIssue>
- {
- readonly CSharpConversions conversion;
-
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- conversion = new CSharpConversions(ctx.Compilation);
- }
-
- public override void VisitCastExpression (CastExpression castExpression)
- {
- base.VisitCastExpression (castExpression);
-
- VisitTypeCastExpression (castExpression, ctx.Resolve (castExpression.Expression).Type,
- ctx.ResolveType (castExpression.Type));
- }
-
- public override void VisitAsExpression (AsExpression asExpression)
- {
- base.VisitAsExpression (asExpression);
-
- VisitTypeCastExpression (asExpression, ctx.Resolve (asExpression.Expression).Type,
- ctx.ResolveType (asExpression.Type));
- }
-
- void VisitTypeCastExpression (Expression expression, IType exprType, IType castToType)
- {
- if (exprType.Kind == TypeKind.Unknown || castToType.Kind == TypeKind.Unknown)
- return;
- var foundConversion = conversion.ExplicitConversion(exprType, castToType);
- if (foundConversion == Conversion.None)
- AddIssue (expression, ctx.TranslateString ("Type cast expression of incompatible type"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareBooleanWithTrueOrFalseIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareBooleanWithTrueOrFalseIssue.cs
deleted file mode 100644
index 6b68a4c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareBooleanWithTrueOrFalseIssue.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// CompareBooleanWithTrueOrFalseIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Comparison of boolean with 'true' or 'false'",
- Description = "Comparison of a boolean value with 'true' or 'false' constant.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "RedundantBoolCompare")]
- public class CompareBooleanWithTrueOrFalseIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<CompareBooleanWithTrueOrFalseIssue>
- {
- static readonly Pattern pattern = new Choice {
- PatternHelper.CommutativeOperator(
- new NamedNode ("const", new Choice { new PrimitiveExpression(true), new PrimitiveExpression(false) }),
- BinaryOperatorType.Equality, new AnyNode("expr")),
- PatternHelper.CommutativeOperator(
- new NamedNode ("const", new Choice { new PrimitiveExpression(true), new PrimitiveExpression(false) }),
- BinaryOperatorType.InEquality, new AnyNode("expr")),
- };
-
- static InsertParenthesesVisitor insertParenthesesVisitor = new InsertParenthesesVisitor ();
-
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression (binaryOperatorExpression);
-
- var match = pattern.Match (binaryOperatorExpression);
- if (!match.Success)
- return;
- var expr = match.Get<Expression> ("expr").First ();
- // check if expr is of boolean type
- var exprType = ctx.Resolve (expr).Type.GetDefinition ();
- if (exprType == null || exprType.KnownTypeCode != KnownTypeCode.Boolean)
- return;
-
- AddIssue (binaryOperatorExpression, ctx.TranslateString ("Simplify boolean comparison"), scrpit => {
- var boolConstant = (bool)match.Get<PrimitiveExpression> ("const").First ().Value;
- if ((binaryOperatorExpression.Operator == BinaryOperatorType.InEquality && boolConstant) ||
- (binaryOperatorExpression.Operator == BinaryOperatorType.Equality && !boolConstant)) {
- expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr.Clone());
- expr.AcceptVisitor (insertParenthesesVisitor);
- }
- scrpit.Replace (binaryOperatorExpression, expr);
- });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareFloatWithEqualityOperatorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareFloatWithEqualityOperatorIssue.cs
deleted file mode 100644
index c587b9f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompareFloatWithEqualityOperatorIssue.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// CompareFloatWithEqualityOperatorIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Compare floating point numbers with equality operator",
- Description = "Comparison of floating point numbers with equality operator.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "CompareOfFloatsByEqualityOperator")]
- public class CompareFloatWithEqualityOperatorIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<CompareFloatWithEqualityOperatorIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- static bool IsFloatingPointType (IType type)
- {
- var typeDef = type.GetDefinition ();
- return typeDef != null &&
- (typeDef.KnownTypeCode == KnownTypeCode.Single || typeDef.KnownTypeCode == KnownTypeCode.Double);
- }
-
- bool IsFloatingPoint(AstNode node)
- {
- return IsFloatingPointType (ctx.Resolve (node).Type);
- }
-
- bool IsConstantInfinity(AstNode node)
- {
- ResolveResult rr = ctx.Resolve(node);
- if (!rr.IsCompileTimeConstant)
- return false;
- if (rr.ConstantValue is float)
- return float.IsInfinity((float)rr.ConstantValue);
- else if (rr.ConstantValue is double)
- return double.IsInfinity((double)rr.ConstantValue);
- else
- return false;
- }
-
- bool IsNaN (AstNode node, out string floatType)
- {
- floatType = "";
- var rr = ctx.Resolve (node);
- if (!rr.IsCompileTimeConstant)
- return false;
-
- if (rr.ConstantValue is double && double.IsNaN ((double)rr.ConstantValue)) {
- floatType = "double";
- return true;
- }
- if (rr.ConstantValue is float && float.IsNaN ((float)rr.ConstantValue)) {
- floatType = "float";
- return true;
- }
- return false;
- }
-
- void AddIsNaNIssue(BinaryOperatorExpression binaryOperatorExpr, Expression argExpr, string floatType)
- {
- if (!ctx.Resolve(argExpr).Type.IsKnownType(KnownTypeCode.Single))
- floatType = "double";
- AddIssue(binaryOperatorExpr, string.Format(ctx.TranslateString ("Use {0}.IsNaN()"), floatType),
- script => {
- Expression expr = new PrimitiveType(floatType).Invoke("IsNaN", argExpr.Clone());
- if (binaryOperatorExpr.Operator == BinaryOperatorType.InEquality)
- expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr);
- script.Replace (binaryOperatorExpr, expr);
- });
- }
-
- public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression (binaryOperatorExpression);
-
- if (binaryOperatorExpression.Operator != BinaryOperatorType.Equality &&
- binaryOperatorExpression.Operator != BinaryOperatorType.InEquality)
- return;
-
- string floatType;
- if (IsNaN(binaryOperatorExpression.Left, out floatType)) {
- AddIsNaNIssue (binaryOperatorExpression, binaryOperatorExpression.Right, floatType);
- } else if (IsNaN (binaryOperatorExpression.Right, out floatType)) {
- AddIsNaNIssue (binaryOperatorExpression, binaryOperatorExpression.Left, floatType);
- } else if (IsFloatingPoint(binaryOperatorExpression.Left) || IsFloatingPoint(binaryOperatorExpression.Right)) {
- if (IsConstantInfinity(binaryOperatorExpression.Left) || IsConstantInfinity(binaryOperatorExpression.Right))
- return;
- AddIssue (binaryOperatorExpression, ctx.TranslateString ("Compare a difference with EPSILON"),
- script => {
- // Math.Abs(diff) op EPSILON
- var builder = ctx.CreateTypeSytemAstBuilder(binaryOperatorExpression);
- var diff = new BinaryOperatorExpression (binaryOperatorExpression.Left.Clone (),
- BinaryOperatorType.Subtract, binaryOperatorExpression.Right.Clone ());
- var abs = builder.ConvertType(new TopLevelTypeName("System", "Math")).Invoke("Abs", diff);
- var op = binaryOperatorExpression.Operator == BinaryOperatorType.Equality ?
- BinaryOperatorType.LessThan : BinaryOperatorType.GreaterThan;
- var epsilon = new IdentifierExpression ("EPSILON");
- var compare = new BinaryOperatorExpression (abs, op, epsilon);
- script.Replace (binaryOperatorExpression, compare);
- script.Link (epsilon);
- });
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs
deleted file mode 100644
index 983abb5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// CS0127ReturnMustNotBeFollowedByAnyExpression.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("CS0127: A method with a void return type cannot return a value.",
- Description = "Since 'function' returns void, a return keyword must not be followed by an object expression",
- Category = IssueCategories.CompilerErrors,
- Severity = Severity.Error)]
- public class CS0127ReturnMustNotBeFollowedByAnyExpression : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<CS0127ReturnMustNotBeFollowedByAnyExpression>
- {
- string currentMethodName;
-
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- var primitiveType = methodDeclaration.ReturnType as PrimitiveType;
- if (primitiveType == null || primitiveType.Keyword != "void")
- return;
- currentMethodName = methodDeclaration.Name;
- base.VisitMethodDeclaration(methodDeclaration);
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- currentMethodName = constructorDeclaration.Name;
- base.VisitConstructorDeclaration(constructorDeclaration);
- }
-
- public override void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
- {
- currentMethodName = "~" + destructorDeclaration.Name;
- base.VisitDestructorDeclaration(destructorDeclaration);
- }
-
- public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
- {
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- }
-
- public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
- {
- }
-
- public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
- {
- }
-
- public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
- {
- }
-
- public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
- {
- }
-
- public override void VisitReturnStatement(ReturnStatement returnStatement)
- {
- if (!returnStatement.Expression.IsNull) {
- AddIssue(
- returnStatement,
- string.Format (ctx.TranslateString("`{0}': A return keyword must not be followed by any expression when method returns void"), currentMethodName),
- new CodeAction (
- ctx.TranslateString("Remove returned expression"),
- script => {
- script.Remove(returnStatement.Expression);
- },
- returnStatement
- )
- );
- }
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConditionalToNullCoalescingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConditionalToNullCoalescingIssue.cs
deleted file mode 100644
index 70b3d52..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConditionalToNullCoalescingIssue.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// ConditionalToNullCoalescingInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Checks for "a != null ? a : other"<expr>
- /// Converts to: "a ?? other"<expr>
- /// </summary>
- [IssueDescription("'?:' expression can be converted to '??' expression",
- Description="'?:' expression can be converted to '??' expression.",
- Category = IssueCategories.Opportunities,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "ConvertConditionalTernaryToNullCoalescing")]
- public class ConditionalToNullCoalescingIssue : ICodeIssueProvider
- {
- static readonly Pattern pattern = new Choice {
- // a != null ? a : other
- new ConditionalExpression(
- PatternHelper.CommutativeOperator(new AnyNode("a"), BinaryOperatorType.InEquality, new NullReferenceExpression()),
- new Backreference("a"),
- new AnyNode("other")
- ),
- // a == null ? other : a
- new ConditionalExpression(
- PatternHelper.CommutativeOperator(new AnyNode("a"), BinaryOperatorType.Equality, new NullReferenceExpression()),
- new AnyNode("other"),
- new Backreference("a")
- ),
- };
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ConditionalToNullCoalescingIssue>
- {
-// readonly ConditionalToNullCoalescingIssue inspector;
-
- public GatherVisitor (BaseRefactoringContext ctx, ConditionalToNullCoalescingIssue inspector) : base (ctx)
- {
-// this.inspector = inspector;
- }
-
- public override void VisitConditionalExpression(ConditionalExpression conditionalExpression)
- {
- Match m = pattern.Match(conditionalExpression);
- if (m.Success) {
- var a = m.Get<Expression>("a").Single();
- var other = m.Get<Expression>("other").Single();
- AddIssue(conditionalExpression, ctx.TranslateString("Convert to '??' expression"), script => {
- var expr = new BinaryOperatorExpression (a.Clone (), BinaryOperatorType.NullCoalescing, other.Clone ());
- script.Replace (conditionalExpression, expr);
- });
- }
- base.VisitConditionalExpression (conditionalExpression);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstantConditionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstantConditionIssue.cs
deleted file mode 100644
index 3b4002a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstantConditionIssue.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// ConstantConditionIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Condition is always 'true' or always 'false'",
- Description = "Condition is always 'true' or always 'false'.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ConstantConditionIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ConstantConditionIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
- {
- base.VisitConditionalExpression (conditionalExpression);
-
- CheckCondition (conditionalExpression.Condition);
- }
-
- public override void VisitIfElseStatement (IfElseStatement ifElseStatement)
- {
- base.VisitIfElseStatement (ifElseStatement);
-
- CheckCondition (ifElseStatement.Condition);
- }
-
- public override void VisitWhileStatement (WhileStatement whileStatement)
- {
- base.VisitWhileStatement (whileStatement);
-
- CheckCondition (whileStatement.Condition);
- }
-
- public override void VisitDoWhileStatement (DoWhileStatement doWhileStatement)
- {
- base.VisitDoWhileStatement (doWhileStatement);
-
- CheckCondition (doWhileStatement.Condition);
- }
-
- public override void VisitForStatement (ForStatement forStatement)
- {
- base.VisitForStatement (forStatement);
-
- CheckCondition (forStatement.Condition);
- }
-
- void CheckCondition (Expression condition)
- {
- if (condition is PrimitiveExpression)
- return;
-
- var resolveResult = ctx.Resolve (condition);
- if (!(resolveResult.IsCompileTimeConstant && resolveResult.ConstantValue is bool))
- return;
-
- var value = (bool)resolveResult.ConstantValue;
- var conditionalExpr = condition.Parent as ConditionalExpression;
- var ifElseStatement = condition.Parent as IfElseStatement;
- var valueStr = value.ToString ().ToLower ();
-
- CodeAction action;
- if (conditionalExpr != null) {
- var replaceExpr = value ? conditionalExpr.TrueExpression : conditionalExpr.FalseExpression;
- action = new CodeAction (
- string.Format (ctx.TranslateString ("Replace '?:' with '{0}' branch"), valueStr),
- script => script.Replace (conditionalExpr, replaceExpr.Clone ()),
- condition);
- } else if (ifElseStatement != null) {
- action = new CodeAction (
- string.Format (ctx.TranslateString ("Replace 'if' with '{0}' branch"), valueStr),
- script => {
- var statement = value ? ifElseStatement.TrueStatement : ifElseStatement.FalseStatement;
- var blockStatement = statement as BlockStatement;
- if (statement.IsNull || (blockStatement != null && blockStatement.Statements.Count == 0)) {
- script.Remove (ifElseStatement);
- return;
- }
-
- TextLocation start, end;
- if (blockStatement != null) {
- start = blockStatement.Statements.FirstOrNullObject ().StartLocation;
- end = blockStatement.Statements.LastOrNullObject ().EndLocation;
- } else {
- start = statement.StartLocation;
- end = statement.EndLocation;
- }
- RemoveText (script, ifElseStatement.StartLocation, start);
- RemoveText (script, end, ifElseStatement.EndLocation);
- script.FormatText (ifElseStatement.Parent);
- }, condition);
- } else {
- action = new CodeAction (
- string.Format (ctx.TranslateString ("Replace expression with '{0}'"), valueStr),
- script => script.Replace (condition, new PrimitiveExpression (value)),
- condition
- );
- }
- AddIssue (condition, string.Format (ctx.TranslateString ("Condition is always '{0}'"), valueStr),
- new [] { action });
- }
-
- void RemoveText (Script script, TextLocation start, TextLocation end)
- {
- var startOffset = script.GetCurrentOffset (start);
- var endOffset = script.GetCurrentOffset (end);
- if (startOffset < endOffset)
- script.RemoveText (startOffset, endOffset - startOffset);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/PublicConstructorInAbstractClass.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/PublicConstructorInAbstractClass.cs
deleted file mode 100644
index 07a131a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/PublicConstructorInAbstractClass.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-// RedundantConstructorIssue.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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 SaHALL 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.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Constructor in Abstract Class should not be public",
- Description = "Constructor in Abstract Class should not be public",
- Category = IssueCategories.CompilerErrors,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "PublicConstructorInAbstractClass",
- IssueMarker = IssueMarker.Underline)]
- public class PublicConstructorInAbstractClassIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue>();
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<PublicConstructorInAbstractClassIssue>
- {
-
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- if (!typeDeclaration.HasModifier(Modifiers.Abstract)) {
- return;
- }
- foreach (var constructor in typeDeclaration.Children.OfType<ConstructorDeclaration>()){
- VisitConstructorDeclaration(constructor);
- }
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- if (constructorDeclaration.HasModifier (Modifiers.Public)) {
- AddIssue(constructorDeclaration.NameToken, ctx.TranslateString("Convert public to protected"), script =>
- script.Replace(constructorDeclaration.ModifierTokens.First (t => t.Modifier == Modifiers.Public), new CSharpModifierToken(TextLocation.Empty, Modifiers.Protected)));
- }
- }
- }
- }
-}
-
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/RedudantConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/RedudantConstructorIssue.cs
deleted file mode 100755
index 1341dd0..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/RedudantConstructorIssue.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// RedundantConstructorIssue.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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 SaHALL 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.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("An empty constructor is not necessary",
- Description = "An alone empty constructor is not necessary.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "RedundantConstructor",
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantConstructorIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue>();
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantConstructorIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typedeclaration)
- {
- bool hasEmptyConstructor = false;
- bool hasUnemptyConstructor = false;
- ConstructorDeclaration emptyContructorNode = new ConstructorDeclaration();
-
- foreach (var child in typedeclaration.Children.OfType<ConstructorDeclaration>()) {
- if (child.HasModifier(Modifiers.Static))
- continue;
- if (child.Body.Count() > 0 || (child.Parameters.Count > 0)) {
- hasUnemptyConstructor = true;
- } else if (child.HasModifier(Modifiers.Public)) {
- hasEmptyConstructor = true;
- emptyContructorNode = child;
- }
- }
-
- if (!hasUnemptyConstructor && hasEmptyConstructor) {
- AddIssue(emptyContructorNode, ctx.TranslateString("Remove redundant constructor"), script =>
- {
- script.Remove(emptyContructorNode);
- });
- }
- return;
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorAccessModifierIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorAccessModifierIssue.cs
deleted file mode 100755
index 63388a7..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorAccessModifierIssue.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// StaticConstructorModifierIssue.cs.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Static constructor should be without access modifier",
- Description = "Static constructor should be without access modifier",
- Category = IssueCategories.CompilerErrors,
- Severity = Severity.Error,
- ResharperDisableKeyword = "StaticConstructorAccessModifier",
- IssueMarker = IssueMarker.Underline)]
- public class StaticConstructorAccessModifierIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue>();
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<StaticConstructorAccessModifierIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- if (!constructorDeclaration.HasModifier(Modifiers.Static))
- return;
- if (constructorDeclaration.HasModifier(Modifiers.Public) ||
- constructorDeclaration.HasModifier(Modifiers.Private) ||
- constructorDeclaration.HasModifier(Modifiers.Protected)) {
- AddIssue(constructorDeclaration, ctx.TranslateString("Static constructor cannot take access modifier"));
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorParameterIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorParameterIssue.cs
deleted file mode 100755
index 5be5601..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConstructorIssues/StaticConstructorParameterIssue.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// StaticConstructorParameterIssue.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Static constructor should be parameterless",
- Description = "Static constructor should be parameterless",
- Category = IssueCategories.CompilerErrors,
- Severity = Severity.Error,
- ResharperDisableKeyword = "StaticConstructorParameterless",
- IssueMarker = IssueMarker.Underline)]
- public class StaticConstructorParameterIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue>();
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<StaticConstructorParameterIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- if (!constructorDeclaration.HasModifier(Modifiers.Static))
- return;
- if (constructorDeclaration.Parameters.Count != 0) {
- AddIssue(constructorDeclaration, ctx.TranslateString("Static constructor cannot take parameters"));
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConvertToStaticMethodIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConvertToStaticMethodIssue.cs
deleted file mode 100644
index 882899b..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ConvertToStaticMethodIssue.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-//
-// ConvertToStaticMethodIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Make this method static",
- Description = "This method doesn't use any non static members so it can be made static",
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.Underline)]
- public class ConvertToStaticMethodIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- private class GatherVisitor : GatherVisitorBase<ConvertToStaticMethodIssue>
- {
- private bool initializerInvoked;
- private ConstructorInitializer initializer;
-
- public GatherVisitor(BaseRefactoringContext context)
- : base(context) {
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration declaration)
- {
- // TODO: Invert if without else
- // ex. if (cond) DoSomething () == if (!cond) return; DoSomething ()
- // beware of loop contexts return should be continue then.
- var context = ctx;
- var methodDeclaration = declaration;
-
- var resolved = context.Resolve(methodDeclaration) as MemberResolveResult;
- if (resolved == null)
- return;
- var isImplementingInterface = resolved.Member.ImplementedInterfaceMembers.Any();
-
- if (isImplementingInterface)
- return;
-
- AddIssue(methodDeclaration.NameToken.StartLocation, methodDeclaration.NameToken.EndLocation,
- context.TranslateString(string.Format("Make '{0}' static", methodDeclaration.Name)),
- script => ExecuteScriptToFixStaticMethodIssue(script, context, methodDeclaration));
- }
-
- private static void ExecuteScriptToFixStaticMethodIssue(Script script,
- BaseRefactoringContext context,
- AstNode methodDeclaration)
- {
- var clonedDeclaration = (MethodDeclaration) methodDeclaration.Clone();
- clonedDeclaration.Modifiers |= Modifiers.Static;
- script.Replace(methodDeclaration, clonedDeclaration);
- var rr = context.Resolve(methodDeclaration) as MemberResolveResult;
- var method = (IMethod) rr.Member;
- //method.ImplementedInterfaceMembers.Any(m => methodGroupResolveResult.Methods.Contains((IMethod)m));
-
- script.DoGlobalOperationOn(rr.Member,
- (fctx, fscript, fnode) => { DoStaticMethodGlobalOperation(fnode, fctx, rr, fscript); });
- }
-
- private static void DoStaticMethodGlobalOperation(AstNode fnode, RefactoringContext fctx, MemberResolveResult rr,
- Script fscript)
- {
- if (fnode is MemberReferenceExpression) {
- var memberReference = new MemberReferenceExpression
- (
- new TypeReferenceExpression(
- fctx.CreateShortType(rr.Member.DeclaringType)),
- rr.Member.Name
- );
- fscript.Replace(fnode, memberReference);
- }
- else {
- var invoke = fnode as InvocationExpression;
- if (invoke == null) return;
- if ((invoke.Target is MemberReferenceExpression))
- return;
- var memberReference = new MemberReferenceExpression
- (
- new TypeReferenceExpression(
- fctx.CreateShortType(
- rr.Member.DeclaringType)),
- rr.Member.Name
- );
- fscript.Replace(invoke.Target, memberReference);
- }
- }
- }
-
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/LockThisIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/LockThisIssue.cs
new file mode 100644
index 0000000..e981874
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/LockThisIssue.cs
@@ -0,0 +1,388 @@
+// LockThisIssue.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis <luiscubal at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp.Analysis;
+using ICSharpCode.NRefactory.Refactoring;
+using System.Threading.Tasks;
+using System.Runtime.CompilerServices;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Use of lock (this) or MethodImplOptions.Synchronized is discouraged",
+ Description = "Warns about using lock (this) or MethodImplOptions.Synchronized.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning)]
+ public class LockThisIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<LockThisIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitAttribute(Attribute attribute)
+ {
+ base.VisitAttribute(attribute);
+
+ if (IsMethodSynchronizedAttribute(attribute)) {
+ var fixAction = new CodeAction(ctx.TranslateString("Create private locker field"), script => {
+ var containerEntity = GetParentMethodOrProperty(attribute);
+ var containerType = containerEntity.GetParent<TypeDeclaration>();
+
+ FixLockThisIssue(script, containerEntity, containerType);
+ }, attribute);
+
+ AddIssue(attribute, ctx.TranslateString("Found [MethodImpl(MethodImplOptions.Synchronized)]"), fixAction);
+ }
+ }
+
+ static EntityDeclaration GetParentMethodOrProperty(AstNode node)
+ {
+ var containerEntity = node.GetParent<EntityDeclaration>();
+ if (containerEntity is Accessor) {
+ containerEntity = containerEntity.GetParent<EntityDeclaration>();
+ }
+
+ return containerEntity;
+ }
+
+ public override void VisitLockStatement(LockStatement lockStatement)
+ {
+ base.VisitLockStatement(lockStatement);
+
+ var expression = lockStatement.Expression;
+
+ if (IsThisReference(expression)) {
+ var fixAction = new CodeAction(ctx.TranslateString("Create private locker field"), script => {
+ var containerEntity = GetParentMethodOrProperty(lockStatement);
+
+ var containerType = containerEntity.GetParent<TypeDeclaration>();
+
+ FixLockThisIssue(script, containerEntity, containerType);
+
+ }, lockStatement);
+
+ AddIssue(lockStatement, ctx.TranslateString("Found lock (this)"), fixAction);
+ }
+ }
+
+ static bool IsEntityStatic(EntityDeclaration containerEntity)
+ {
+ return containerEntity.Modifiers.HasFlag(Modifiers.Static);
+ }
+
+ void FixLockThisIssue(Script script, EntityDeclaration containerEntity, TypeDeclaration containerType)
+ {
+ bool isStatic = IsEntityStatic(containerEntity);
+
+ List<BlockStatement> synchronizedStatements = FixMethodsWithMethodImplAttribute(script, containerType, isStatic).ToList();
+
+ List<AstNode> linkNodes = new List<AstNode>();
+
+ var locksToModify = LocksToModify(containerType, synchronizedStatements);
+ List<AstNode> nodeContexts = new List<AstNode>(locksToModify);
+
+ foreach (var synchronizedStatement in synchronizedStatements) {
+ if (synchronizedStatement.Statements.Count > 0) {
+ nodeContexts.Add(synchronizedStatement.Statements.First());
+
+ if (!isStatic) {
+ foreach (var childLock in synchronizedStatement.Descendants.OfType<LockStatement>()) {
+ if (IsThisReference(childLock.Expression)) {
+ nodeContexts.Add(childLock);
+ }
+ }
+ }
+ }
+ }
+
+ string proposedName = GetNameProposal(nodeContexts, "locker");
+
+ if (!isStatic) {
+ foreach (var lockToModify in locksToModify) {
+ var identifier = new IdentifierExpression (proposedName);
+ script.Replace(lockToModify.Expression, identifier);
+
+ linkNodes.Add(identifier);
+ }
+ }
+
+ foreach (var synchronizedStatement in synchronizedStatements) {
+ if (synchronizedStatement.Statements.Count > 0) {
+ var newBody = synchronizedStatement.Clone();
+
+ var outerLock = new LockStatement();
+ var outerLockIdentifier = new IdentifierExpression (proposedName);
+ outerLock.Expression = outerLockIdentifier;
+ outerLock.EmbeddedStatement = newBody;
+
+ linkNodes.Add(outerLockIdentifier);
+
+ if (!isStatic) {
+ foreach (var childLock in newBody.Descendants.OfType<LockStatement>()) {
+ if (IsThisReference(childLock.Expression)) {
+ var identifier = new IdentifierExpression (proposedName);
+ childLock.Expression.ReplaceWith(identifier);
+
+ linkNodes.Add(identifier);
+ }
+ }
+ }
+
+ script.InsertBefore(synchronizedStatement.Statements.First(), outerLock);
+
+ foreach (var stmt in synchronizedStatement.Statements) {
+ script.Remove(stmt);
+ }
+ }
+ }
+
+ if (linkNodes.Any()) {
+ var objectType = new PrimitiveType("object");
+
+ var lockerFieldDeclaration = new FieldDeclaration() {
+ Modifiers = isStatic ? Modifiers.Static : Modifiers.None,
+ ReturnType = objectType.Clone()
+ };
+
+ var lockerVariable = new VariableInitializer(proposedName, new ObjectCreateExpression(objectType.Clone()));
+ lockerFieldDeclaration.Variables.Add(lockerVariable);
+ script.InsertBefore(containerEntity, lockerFieldDeclaration);
+
+ linkNodes.Add(lockerVariable.NameToken);
+
+ script.Link(linkNodes.ToArray());
+ }
+ }
+
+ string GetNameProposal(List<AstNode> nodeContexts, string baseName)
+ {
+ var resolverStates = nodeContexts.Select(ctx.GetResolverStateBefore).ToList();
+ string nameProposal;
+ int n = 0;
+ do {
+ nameProposal = baseName + (n == 0 ? string.Empty : n.ToString());
+ n++;
+ } while (IdentifierNameExists(resolverStates, nameProposal));
+ return nameProposal;
+ }
+
+ static bool IdentifierNameExists(List<CSharpResolver> resolverStates, string nameProposal)
+ {
+ return resolverStates.Any(resolverState => {
+ ResolveResult result = resolverState.LookupSimpleNameOrTypeName(nameProposal, new List<IType>(), NameLookupMode.Expression);
+ return !result.IsError;
+ });
+ }
+
+ IEnumerable<LockStatement> LocksToModify(TypeDeclaration containerType, IEnumerable<BlockStatement> synchronizedStatements)
+ {
+ foreach (var lockToModify in LocksInType(containerType)) {
+ if (lockToModify.Ancestors.OfType<BlockStatement>()
+ .Any(ancestor => synchronizedStatements.Contains(ancestor))) {
+
+ //These will be modified separately
+ continue;
+ }
+
+ if (!IsThisReference (lockToModify.Expression)) {
+ continue;
+ }
+
+ yield return lockToModify;
+ }
+ }
+
+ IEnumerable<BlockStatement> FixMethodsWithMethodImplAttribute(Script script, TypeDeclaration containerType, bool isStatic)
+ {
+ var bodies = new List<BlockStatement>();
+
+ foreach (var entityDeclarationToModify in EntitiesInType(containerType)) {
+ var methodDeclaration = entityDeclarationToModify as MethodDeclaration;
+ var accessor = entityDeclarationToModify as Accessor;
+ if (methodDeclaration == null && accessor == null) {
+ continue;
+ }
+
+ if ((methodDeclaration != null && IsEntityStatic(methodDeclaration) != isStatic) ||
+ (accessor != null && IsEntityStatic(accessor.GetParent<EntityDeclaration>()) != isStatic)) {
+ //These will need a separate lock and therefore will not be changed.
+ continue;
+ }
+
+ var attributes = entityDeclarationToModify.Attributes.SelectMany(attributeSection => attributeSection.Attributes);
+ var methodSynchronizedAttribute = attributes.FirstOrDefault(IsMethodSynchronizedAttribute);
+ if (methodSynchronizedAttribute != null) {
+ short methodImplValue = GetMethodImplValue(methodSynchronizedAttribute);
+ short newValue = (short)(methodImplValue & ~((short)MethodImplOptions.Synchronized));
+ if (newValue != 0) {
+ InsertNewAttribute(script, methodSynchronizedAttribute, newValue);
+ } else {
+ var section = methodSynchronizedAttribute.GetParent<AttributeSection>();
+ if (section.Attributes.Count == 1) {
+ script.Remove(section);
+ } else {
+ script.Remove(methodSynchronizedAttribute);
+ }
+ }
+
+ bool isAbstract = entityDeclarationToModify.Modifiers.HasFlag(Modifiers.Abstract);
+ if (!isAbstract) {
+ var body = methodDeclaration == null ? accessor.Body : methodDeclaration.Body;
+ bodies.Add(body);
+ }
+ }
+ }
+
+ return bodies;
+ }
+
+ void InsertNewAttribute(Script script, Attribute attribute, short newValue) {
+ var availableValues = (MethodImplOptions[]) Enum.GetValues(typeof(MethodImplOptions));
+ var activeValues = availableValues.Where(value => (newValue & (short)value) != 0).ToList();
+
+ var astBuilder = ctx.CreateTypeSystemAstBuilder(attribute);
+ var methodImplOptionsType = astBuilder.ConvertType(new FullTypeName(typeof(MethodImplOptions).FullName));
+
+ Expression expression = CreateMethodImplReferenceNode(activeValues[0], methodImplOptionsType);
+ for (int optionIndex = 1; optionIndex < activeValues.Count; ++optionIndex) {
+ expression = new BinaryOperatorExpression(expression,
+ BinaryOperatorType.BitwiseOr,
+ CreateMethodImplReferenceNode(activeValues [optionIndex], methodImplOptionsType));
+ }
+
+ var newAttribute = new Attribute();
+ newAttribute.Type = attribute.Type.Clone();
+ newAttribute.Arguments.Add(expression);
+
+ script.Replace(attribute, newAttribute);
+ }
+
+ static MemberReferenceExpression CreateMethodImplReferenceNode(MethodImplOptions option, AstType methodImplOptionsType)
+ {
+ return new MemberReferenceExpression(new TypeReferenceExpression(methodImplOptionsType.Clone()), Enum.GetName(typeof(MethodImplOptions), option));
+ }
+
+ bool IsMethodSynchronizedAttribute(Attribute attribute)
+ {
+ var unresolvedType = attribute.Type;
+ var resolvedType = ctx.ResolveType(unresolvedType);
+
+ if (resolvedType.FullName != typeof(MethodImplAttribute).FullName) {
+ return false;
+ }
+
+ short methodImpl = GetMethodImplValue(attribute);
+
+ return (methodImpl & (short) MethodImplOptions.Synchronized) != 0;
+ }
+
+ short GetMethodImplValue(Attribute attribute)
+ {
+ short methodImpl = 0;
+ foreach (var argument in attribute.Arguments) {
+ var namedExpression = argument as NamedExpression;
+
+ if (namedExpression == null) {
+ short? implValue = GetMethodImplOptionsAsShort(argument);
+
+ if (implValue != null) {
+ methodImpl = (short)implValue;
+ }
+
+ } else if (namedExpression.Name == "Value") {
+ short? implValue = GetMethodImplOptionsAsShort(namedExpression.Expression);
+
+ if (implValue != null) {
+ methodImpl = (short)implValue;
+ }
+ }
+ }
+
+ return methodImpl;
+ }
+
+ short? GetMethodImplOptionsAsShort(AstNode argument)
+ {
+ //Returns null if the value could not be guessed
+
+ var result = ctx.Resolve(argument);
+ if (!result.IsCompileTimeConstant) {
+ return null;
+ }
+
+ if (result.Type.FullName == typeof(MethodImplOptions).FullName) {
+ return (short)(MethodImplOptions)result.ConstantValue;
+ }
+
+ return null;
+ }
+
+ static IEnumerable<EntityDeclaration> EntitiesInType(TypeDeclaration containerType)
+ {
+ return containerType.Descendants.OfType<EntityDeclaration>().Where(entityDeclaration => {
+ var childContainerType = entityDeclaration.GetParent<TypeDeclaration>();
+
+ return childContainerType == containerType;
+ });
+ }
+
+ static IEnumerable<LockStatement> LocksInType(TypeDeclaration containerType)
+ {
+ return containerType.Descendants.OfType<LockStatement>().Where(lockStatement => {
+ var childContainerType = lockStatement.GetParent<TypeDeclaration>();
+
+ return childContainerType == containerType;
+ });
+ }
+
+ static bool IsThisReference (Expression expression)
+ {
+ if (expression is ThisReferenceExpression) {
+ return true;
+ }
+
+ var parenthesizedExpression = expression as ParenthesizedExpression;
+ if (parenthesizedExpression != null) {
+ return IsThisReference(parenthesizedExpression.Expression);
+ }
+
+ return false;
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/MethodNeverReturnsIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/MethodNeverReturnsIssue.cs
new file mode 100644
index 0000000..9ba1f30
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/MethodNeverReturnsIssue.cs
@@ -0,0 +1,75 @@
+//
+// MethodNeverReturnsIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp.Analysis;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Method never returns",
+ Description = "Method does not reach its end or a 'return' statement by any of possible execution paths.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class MethodNeverReturnsIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<MethodNeverReturnsIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ base.VisitMethodDeclaration (methodDeclaration);
+
+ // partial method
+ if (methodDeclaration.Body.IsNull)
+ return;
+
+ var reachability = ctx.CreateReachabilityAnalysis(methodDeclaration.Body);
+ bool hasReachableReturn = false;
+ foreach (var statement in reachability.ReachableStatements) {
+ if (statement is ReturnStatement || statement is ThrowStatement || statement is YieldBreakStatement) {
+ hasReachableReturn = true;
+ break;
+ }
+ }
+ if (!hasReachableReturn && !reachability.IsEndpointReachable(methodDeclaration.Body)) {
+ AddIssue (methodDeclaration.NameToken,
+ ctx.TranslateString ("Method never reaches its end or a 'return' statement."));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NegativeRelationalExpressionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NegativeRelationalExpressionIssue.cs
new file mode 100644
index 0000000..0cc828c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NegativeRelationalExpressionIssue.cs
@@ -0,0 +1,100 @@
+//
+// NegativeRelationalExpressionIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Simplify negative relational expression",
+ Description = "Simplify negative relational expression",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ IssueMarker = IssueMarker.Underline)]
+ public class NegativeRelationalExpressionIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<NegativeRelationalExpressionIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ bool IsFloatingPoint (AstNode node)
+ {
+ var typeDef = ctx.Resolve (node).Type.GetDefinition ();
+ return typeDef != null &&
+ (typeDef.KnownTypeCode == KnownTypeCode.Single || typeDef.KnownTypeCode == KnownTypeCode.Double);
+ }
+
+ public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
+ {
+ base.VisitUnaryOperatorExpression (unaryOperatorExpression);
+
+ if (unaryOperatorExpression.Operator != UnaryOperatorType.Not)
+ return;
+
+ var expr = unaryOperatorExpression.Expression;
+ while (expr != null && expr is ParenthesizedExpression)
+ expr = ((ParenthesizedExpression)expr).Expression;
+
+ var binaryOperatorExpr = expr as BinaryOperatorExpression;
+ if (binaryOperatorExpr == null)
+ return;
+
+ var negatedOp = CSharpUtil.NegateRelationalOperator(binaryOperatorExpr.Operator);
+ if (negatedOp == BinaryOperatorType.Any)
+ return;
+
+ if (IsFloatingPoint (binaryOperatorExpr.Left) || IsFloatingPoint (binaryOperatorExpr.Right)) {
+ if (negatedOp != BinaryOperatorType.Equality && negatedOp != BinaryOperatorType.InEquality)
+ return;
+ }
+
+ AddIssue (unaryOperatorExpression, ctx.TranslateString ("Simplify negative relational expression"),
+ script => script.Replace (unaryOperatorExpression,
+ new BinaryOperatorExpression (binaryOperatorExpr.Left.Clone (), negatedOp,
+ binaryOperatorExpr.Right.Clone ())));
+ }
+
+ public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
+ {
+ if (operatorDeclaration.OperatorType.IsComparisonOperator()) {
+ // Ignore operator declaration; within them it's common to define one operator
+ // by negating another.
+ return;
+ }
+ base.VisitOperatorDeclaration(operatorDeclaration);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NotImplementedExceptionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NotImplementedExceptionIssue.cs
new file mode 100644
index 0000000..08cc9cd
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/NotImplementedExceptionIssue.cs
@@ -0,0 +1,64 @@
+//
+// NotImplementedExceptionInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// This inspector just shows that there is a not implemented exception. It doesn't offer a fix.
+ /// Should only be shown in overview bar, no underlining.
+ /// </summary>
+ [IssueDescription("Show NotImplementedExceptions", Description="Shows NotImplementedException throws in the quick task bar.", Category = IssueCategories.Notifications, Severity = Severity.Suggestion, IssueMarker = IssueMarker.None)]
+ public class NotImplementedExceptionIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<NotImplementedExceptionIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, NotImplementedExceptionIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ public override void VisitThrowStatement(ThrowStatement throwStatement)
+ {
+ var result = ctx.Resolve(throwStatement.Expression);
+ if (result.Type.Equals(ctx.Compilation.FindType(typeof(System.NotImplementedException)))) {
+ AddIssue(throwStatement, ctx.TranslateString("NotImplemented exception thrown"));
+ }
+
+ base.VisitThrowStatement(throwStatement);
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantInternalIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantInternalIssue.cs
new file mode 100644
index 0000000..180d909
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantInternalIssue.cs
@@ -0,0 +1,72 @@
+//
+// RedundantInternalInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Finds redundant internal modifiers.
+ /// </summary>
+ [IssueDescription("Remove redundant 'internal' modifier",
+ Description="Removes 'internal' modifiers that are not required.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class RedundantInternalIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantInternalIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, RedundantInternalIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ foreach (var token_ in typeDeclaration.ModifierTokens) {
+ var token = token_;
+ if (token.Modifier == Modifiers.Internal) {
+ AddIssue(token, ctx.TranslateString("Remove 'internal' modifier"), script => {
+ int offset = script.GetCurrentOffset(token.StartLocation);
+ int endOffset = script.GetCurrentOffset(token.GetNextNode().StartLocation);
+ script.RemoveText(offset, endOffset - offset);
+ });
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantPrivateIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantPrivateIssue.cs
new file mode 100644
index 0000000..d479365
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Custom/RedundantPrivateIssue.cs
@@ -0,0 +1,131 @@
+//
+// RedundantPrivateInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Finds redundant internal modifiers.
+ /// </summary>
+ [IssueDescription("Remove redundant 'private' modifier",
+ Description = "Removes 'private' modifiers that are not required.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class RedundantPrivateIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantPrivateIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, RedundantPrivateIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ void CheckNode(EntityDeclaration node)
+ {
+ foreach (var token_ in node.ModifierTokens) {
+ var token = token_;
+ if (token.Modifier == Modifiers.Private) {
+ AddIssue(token, ctx.TranslateString("Remove redundant 'private' modifier"), script => {
+ script.ChangeModifier (node, node.Modifiers & ~Modifiers.Private);
+ });
+ }
+ }
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ base.VisitMethodDeclaration(methodDeclaration);
+ CheckNode(methodDeclaration);
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ base.VisitFieldDeclaration(fieldDeclaration);
+ CheckNode(fieldDeclaration);
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ base.VisitPropertyDeclaration(propertyDeclaration);
+ CheckNode(propertyDeclaration);
+ }
+
+ public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
+ {
+ base.VisitIndexerDeclaration(indexerDeclaration);
+ CheckNode(indexerDeclaration);
+ }
+
+ public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
+ {
+ base.VisitEventDeclaration(eventDeclaration);
+ CheckNode(eventDeclaration);
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ base.VisitCustomEventDeclaration(eventDeclaration);
+ CheckNode(eventDeclaration);
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ base.VisitConstructorDeclaration(constructorDeclaration);
+ CheckNode(constructorDeclaration);
+ }
+
+ public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
+ {
+ base.VisitOperatorDeclaration(operatorDeclaration);
+ CheckNode(operatorDeclaration);
+ }
+
+ public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
+ {
+ base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
+ CheckNode(fixedFieldDeclaration);
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ if (!(typeDeclaration.Parent is TypeDeclaration)) {
+ CheckNode(typeDeclaration);
+ }
+ base.VisitTypeDeclaration(typeDeclaration);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DoubleNegationIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DoubleNegationIssue.cs
deleted file mode 100644
index 5c86c0b..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DoubleNegationIssue.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// DoubleNegationIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Double negation is meaningless",
- Description = "Double negation is meaningless.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "DoubleNegationOperator")]
- public class DoubleNegationIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<DoubleNegationIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- static Expression RemoveParentheses (Expression expr)
- {
- while (expr is ParenthesizedExpression)
- expr = ((ParenthesizedExpression) expr).Expression;
- return expr;
- }
-
- public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
- {
- base.VisitUnaryOperatorExpression (unaryOperatorExpression);
-
- if (unaryOperatorExpression.Operator != UnaryOperatorType.Not)
- return;
-
- var innerUnaryOperatorExpr =
- RemoveParentheses (unaryOperatorExpression.Expression) as UnaryOperatorExpression;
- if (innerUnaryOperatorExpr == null || innerUnaryOperatorExpr.Operator != UnaryOperatorType.Not)
- return;
-
- var expression = RemoveParentheses (innerUnaryOperatorExpr.Expression);
- if (expression.IsNull)
- return;
-
- AddIssue (unaryOperatorExpression, ctx.TranslateString ("Remove double negation"),
- script => script.Replace (unaryOperatorExpression, expression.Clone ()));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateBodyMethodIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateBodyMethodIssue.cs
deleted file mode 100644
index 7a10854..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateBodyMethodIssue.cs
+++ /dev/null
@@ -1,188 +0,0 @@
-//
-// DuplicateBodyMethodIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud
-//
-// 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.Collections.Generic;
-using System.Text;
-using ICSharpCode.NRefactory.PatternMatching;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Methods have duplicate body",
- Description = "One method has the same body as other method",
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.Underline)]
- public class DuplicateBodyMethodIssue : ICodeIssueProvider
- {
- #region ICodeIssueProvider implementation
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var visitor = new GatherVisitor(context);
- visitor.GetMethods();
- visitor.ComputeConflicts();
- return visitor.GetIssues();
- }
-
- #endregion
-
- private class GatherVisitor : GatherVisitorBase<DuplicateBodyMethodIssue>
- {
- public List<MethodDeclaration> DeclaredMethods;
-
- public GatherVisitor(BaseRefactoringContext context)
- : base(context)
- {
- DeclaredMethods = new List<MethodDeclaration>();
- }
-
-
- static string GetMethodDescriptor(MethodDeclaration methodDeclaration) {
- var sb = new StringBuilder();
- sb.Append(methodDeclaration.ReturnType);
- sb.Append(";");
- foreach (var parameter in methodDeclaration.Parameters) {
- sb.AppendFormat("{0}:{1};", parameter.Name, parameter.Type);
- }
- sb.Append(methodDeclaration.Modifiers);
- return sb.ToString();
- }
-
- public void GetMethods()
- {
- ctx.RootNode.AcceptVisitor(this);
- }
-
- internal void ComputeConflicts()
- {
- var dict = new Dictionary<string, List<MethodDeclaration>>();
- foreach (var declaredMethod in DeclaredMethods)
- {
- var methodDescriptor = GetMethodDescriptor(declaredMethod);
- List<MethodDeclaration> listMethods;
- if (!dict.TryGetValue(methodDescriptor, out listMethods))
- {
- listMethods = new List<MethodDeclaration>();
- dict[methodDescriptor] = listMethods;
- }
- listMethods.Add(declaredMethod);
- }
- DeclaredMethods.Clear();
-
- foreach (var list in dict.Values.Where(list => list.Count >= 2))
- {
- for (var i = 0; i < list.Count - 1; i++)
- {
- var firstMethod = list[i];
- for (var j = i + 1; j < list.Count; j++)
- {
- var secondMethod = list[j];
- if (firstMethod.Body.IsMatch(secondMethod.Body))
- {
- AddIssue(secondMethod.NameToken,
- string.Format("Method '{0}' has the same with '{1}' ", secondMethod.Name,
- firstMethod.Name),
- script => { InvokeMethod(script, firstMethod, secondMethod); }
- );
- }
- }
- }
- }
- }
-
- readonly InsertParenthesesVisitor _insertParenthesesVisitor = new InsertParenthesesVisitor();
- private TypeDeclaration _parentType;
-
- private void InvokeMethod(Script script, MethodDeclaration firstMethod, MethodDeclaration secondMethod)
- {
- var statement =
- new ExpressionStatement(new InvocationExpression(new IdentifierExpression(firstMethod.Name),
- firstMethod.Parameters.Select(
- declaration =>
- GetArgumentExpression(declaration).Clone())));
- statement.AcceptVisitor(_insertParenthesesVisitor);
- if(firstMethod.ReturnType.ToString()!="System.Void"){
- var returnStatement = new ReturnStatement(statement.Expression.Clone());
-
- script.Replace(secondMethod.Body, new BlockStatement { returnStatement });
- }
- else {
- script.Replace(secondMethod.Body, new BlockStatement { statement });
- }
- }
-
- static Expression GetArgumentExpression(ParameterDeclaration parameter)
- {
- var identifierExpr = new IdentifierExpression(parameter.Name);
- switch (parameter.ParameterModifier)
- {
- case ParameterModifier.Out:
- return new DirectionExpression(FieldDirection.Out, identifierExpr);
- case ParameterModifier.Ref:
- return new DirectionExpression(FieldDirection.Ref, identifierExpr);
- }
- return identifierExpr;
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration declaration)
- {
- var context = ctx;
- var methodDeclaration = declaration;
-
- var resolved = context.Resolve(methodDeclaration) as MemberResolveResult;
- if (resolved == null)
- return;
- var isImplementingInterface = resolved.Member.ImplementedInterfaceMembers.Any();
-
- if (isImplementingInterface)
- return;
- if (declaration.Body.IsNull)
- return;
-
- var parentType = declaration.Parent as TypeDeclaration;
- if (parentType == null)
- return;
- if (_parentType == null)
- _parentType = parentType;
- else
- {
- //if we are here, it means that we switched from one class to another, so it means that we should compute
- //the duplicates up-to now, then reset the list of methods
- if (parentType != _parentType)
- {
- ComputeConflicts();
- DeclaredMethods.Add(declaration);
- _parentType = parentType;
- return;
- }
- }
-
- DeclaredMethods.Add(declaration);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateExpressionsInConditionsIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateExpressionsInConditionsIssue.cs
deleted file mode 100644
index d858681..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateExpressionsInConditionsIssue.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// DuplicateExpressionsInConditionsIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Expression has some redundant items",
- Description = "Expression has some redundant items",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
- public class DuplicateExpressionsInConditionsIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- static readonly List<BinaryOperatorType> SupportedOperators = new List<BinaryOperatorType>();
- static DuplicateExpressionsInConditionsIssue()
- {
- SupportedOperators.Add(BinaryOperatorType.BitwiseAnd);
- SupportedOperators.Add(BinaryOperatorType.BitwiseOr);
- SupportedOperators.Add(BinaryOperatorType.ConditionalAnd);
- SupportedOperators.Add(BinaryOperatorType.ConditionalOr);
- }
-
- class GatherVisitor : GatherVisitorBase<IdenticalConditionalBranchIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
- {
- var expression = binaryOperatorExpression;
- base.VisitBinaryOperatorExpression(expression);
- if(!SupportedOperators.Contains(expression.Operator) )
- return;
- var parentExpression = expression.Parent as BinaryOperatorExpression;
- if(parentExpression!=null && parentExpression.Operator==expression.Operator)
- {
- //handle only parent sequence
- return;
- }
- var expressions = GetExpressions(binaryOperatorExpression, expression);
- for(var i=0;i<expressions.Count-1;i++)
- {
- for (var j = i+1; j < expressions.Count; j++)
- {
- var expressionLeft = expressions[i];
- var expressionRight = expressions[j];
- if (!expressionLeft.IsMatch(expressionRight))
- continue;
- var action = new CodeAction(ctx.TranslateString("Remove redundant expression"),
- script => RemoveRedundantExpression(script, expressionRight),
- expressionRight);
-
- AddIssue(expressionRight,
- ctx.TranslateString(string.Format("The expression '{0}' is identical in the left branch",
- expressionRight)), action);
-
-
- }
- }
- }
-
- private static void RemoveRedundantExpression(Script script, AstNode expressionRight)
- {
- var parent = expressionRight.Parent as BinaryOperatorExpression;
- if(parent==null) //should never happen!
- return;
- script.Replace(parent, parent.Left.Clone());
- }
-
- private static List<Expression> GetExpressions(BinaryOperatorExpression binaryOperatorExpression,
- BinaryOperatorExpression expression)
- {
- var baseExpression = expression;
- var leftExpression = baseExpression.FirstChild as BinaryOperatorExpression;
- var expressions = new List<Expression>();
- while (leftExpression != null && binaryOperatorExpression.Operator == leftExpression.Operator)
- {
- expressions.Add(baseExpression.Right);
- baseExpression = leftExpression;
- leftExpression = leftExpression.Left as BinaryOperatorExpression;
- }
- expressions.Add(baseExpression.Right);
- expressions.Add(baseExpression.Left);
- expressions.Reverse();
- return expressions;
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateIfInIfChainIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateIfInIfChainIssue.cs
deleted file mode 100644
index bc14e00..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/DuplicateIfInIfChainIssue.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// DuplicateIfInIfChainIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Else branch has some redundant if",
- Description = "One Else-if was checked before so is not be true",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
- public class DuplicateIfInIfChainIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<IdenticalConditionalBranchIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitIfElseStatement(IfElseStatement ifStatement)
- {
- base.VisitIfElseStatement(ifStatement);
- var parentExpression = ifStatement.Parent as IfElseStatement;
- //handle only parent sequence
- if (parentExpression != null)
- return;
- var expressions = GetExpressions(ifStatement);
- for(var i=0;i<expressions.Count-1;i++) {
- for (var j = i+1; j < expressions.Count; j++) {
- var leftCondition = expressions[i].Condition;
- var rightIf = expressions[j];
- var rightCondition = rightIf.Condition;
-
- if (!leftCondition.IsMatch(rightCondition))
- continue;
- var action = new CodeAction(ctx.TranslateString("Remove redundant expression"),
- script => RemoveRedundantIf(script, rightIf),
- rightCondition);
-
- AddIssue(rightCondition,
- ctx.TranslateString(string.Format("The expression '{0}' is identical in the left branch",
- rightCondition)), action);
-
- }
- }
- }
-
- private static void RemoveRedundantIf(Script script, IfElseStatement expressionRight)
- {
- var parent = expressionRight.Parent as IfElseStatement;
- if(parent==null) { //should never happen!
- return;
- }
- if (expressionRight.FalseStatement.IsNull) {
- script.Remove(parent.ElseToken);
- script.Remove(parent.FalseStatement);
- script.FormatText(parent);
- } else {
- script.Replace(parent.FalseStatement, expressionRight.FalseStatement.Clone());
- }
- }
-
- private static List<IfElseStatement> GetExpressions(IfElseStatement expression)
- {
- var baseExpression = expression;
- var falseExpression = baseExpression.FalseStatement as IfElseStatement;
- var expressions = new List<IfElseStatement>();
- while (falseExpression != null) {
- expressions.Add(baseExpression);
- baseExpression = falseExpression;
- falseExpression = falseExpression.FalseStatement as IfElseStatement;
- }
- expressions.Add(baseExpression);
- return expressions;
- }
- }
- }
-
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExceptionRethrowIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExceptionRethrowIssue.cs
deleted file mode 100644
index 48781ef..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExceptionRethrowIssue.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// ExceptionRethrowIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("A throw statement throws the caught exception by passing it explicitly",
- Description = "Finds throws that throws the caught exception and therefore should be empty.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "PossibleIntendedRethrow")]
- public class ExceptionRethrowIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ExceptionRethrowIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- public override void VisitCatchClause(CatchClause catchClause)
- {
- base.VisitCatchClause(catchClause);
- var exceptionResolveResult = ctx.Resolve(catchClause.VariableNameToken) as LocalResolveResult;
- if (exceptionResolveResult == null)
- return;
-
- var catchVisitor = new CatchClauseVisitor(ctx, exceptionResolveResult.Variable);
- catchClause.Body.AcceptVisitor(catchVisitor);
-
- foreach (var throwStatement in catchVisitor.OffendingThrows) {
- var localThrowStatement = throwStatement;
- var title = ctx.TranslateString("The exception is rethrown with explicit usage of the variable");
- var action = new CodeAction(ctx.TranslateString("Change to 'throw;'"), script => {
- script.Replace(localThrowStatement, new ThrowStatement());
- }, catchClause);
- AddIssue(localThrowStatement, title, action);
- }
- }
- }
-
- class CatchClauseVisitor : DepthFirstAstVisitor
- {
- BaseRefactoringContext ctx;
-
- IVariable parameter;
-
- bool variableWritten = false;
-
- public CatchClauseVisitor(BaseRefactoringContext context, IVariable parameter)
- {
- ctx = context;
- this.parameter = parameter;
- OffendingThrows = new List<ThrowStatement>();
- }
-
- public IList<ThrowStatement> OffendingThrows { get; private set; }
-
- void HandlePotentialWrite (Expression expression)
- {
- var variableResolveResult = ctx.Resolve(expression) as LocalResolveResult;
- if (variableResolveResult == null)
- return;
- variableWritten |= variableResolveResult.Equals(parameter);
- }
-
- public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
- {
- base.VisitAssignmentExpression(assignmentExpression);
-
- var variableResolveResult = ctx.Resolve(assignmentExpression.Left) as LocalResolveResult;
- if (variableResolveResult == null)
- return;
- variableWritten |= variableResolveResult.Variable.Equals(parameter);
- }
-
- public override void VisitDirectionExpression(DirectionExpression directionExpression)
- {
- base.VisitDirectionExpression(directionExpression);
-
- HandlePotentialWrite(directionExpression);
- }
-
- public override void VisitThrowStatement(ThrowStatement throwStatement)
- {
- base.VisitThrowStatement(throwStatement);
-
- if (variableWritten)
- return;
-
- var argumentResolveResult = ctx.Resolve(throwStatement.Expression) as LocalResolveResult;
- if (argumentResolveResult == null)
- return;
- if (parameter.Equals(argumentResolveResult.Variable))
- OffendingThrows.Add(throwStatement);
- }
- }
-
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExplicitConversionInForEachIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExplicitConversionInForEachIssue.cs
deleted file mode 100644
index b99dc4e..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExplicitConversionInForEachIssue.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2010-2013 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 ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Incorrect element type in foreach over generic collection",
- Description= "Detects hidden explicit conversions in foreach loops.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning)]
- public class ExplicitConversionInForEachIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ExplicitConversionInForEachIssue>
- {
- CSharpConversions conversions;
-
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- }
-
- public override void VisitForeachStatement(ForeachStatement foreachStatement)
- {
- base.VisitForeachStatement(foreachStatement);
- var rr = ctx.Resolve(foreachStatement) as ForEachResolveResult;
- if (rr == null)
- return;
- if (rr.ElementType.Kind == TypeKind.Unknown)
- return;
- if (ReflectionHelper.GetTypeCode(rr.ElementType) == TypeCode.Object)
- return;
- if (conversions == null) {
- conversions = CSharpConversions.Get(ctx.Compilation);
- }
- Conversion c = conversions.ImplicitConversion(rr.ElementType, rr.ElementVariable.Type);
- if (c.IsValid)
- return;
- var csResolver = ctx.GetResolverStateBefore(foreachStatement);
- var builder = new TypeSystemAstBuilder(csResolver);
- AstType elementType = builder.ConvertType(rr.ElementType);
- AstType variableType = foreachStatement.VariableType;
- string issueText = ctx.TranslateString("Collection element type '{0}' is not implicitly convertible to '{1}'");
- string fixText = ctx.TranslateString("Use type '{0}'");
- AddIssue(variableType, string.Format(issueText, elementType.GetText(), variableType.GetText()),
- new CodeAction(
- string.Format(fixText, elementType.GetText()),
- script => script.Replace(variableType, elementType),
- foreachStatement));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssue.cs
deleted file mode 100644
index e890d40..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssue.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// ExpressionIsAlwaysOfProvidedTypeIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("CS0183:Given expression is always of the provided type",
- Description = "CS0183:Given expression is always of the provided type.",
- Category = IssueCategories.CompilerWarnings,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ExpressionIsAlwaysOfProvidedTypeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ExpressionIsAlwaysOfProvidedTypeIssue>
- {
- readonly CSharpConversions conversions;
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- conversions = CSharpConversions.Get(ctx.Compilation);
- }
-
- public override void VisitIsExpression (IsExpression isExpression)
- {
- base.VisitIsExpression (isExpression);
-
- var type = ctx.Resolve (isExpression.Expression).Type;
- var providedType = ctx.ResolveType (isExpression.Type);
-
-// var foundConversion = conversions.ImplicitConversion(type, providedType);
- if (!IsValidReferenceOrBoxingConversion(type, providedType))
- return;
-
- var action = new CodeAction (
- ctx.TranslateString ("Compare with 'null'"),
- script => script.Replace (isExpression, new BinaryOperatorExpression (
- isExpression.Expression.Clone (), BinaryOperatorType.InEquality, new PrimitiveExpression (null))),
- isExpression
- );
- AddIssue (isExpression, ctx.TranslateString ("Given expression is always of the provided type. " +
- "Consider comparing with 'null' instead"), new [] { action });
- }
-
- bool IsValidReferenceOrBoxingConversion(IType fromType, IType toType)
- {
- Conversion c = conversions.ImplicitConversion(fromType, toType);
- return c.IsValid && (c.IsIdentityConversion || c.IsReferenceConversion || c.IsBoxingConversion);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsNeverOfProvidedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsNeverOfProvidedTypeIssue.cs
deleted file mode 100644
index 428bfe0..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionIsNeverOfProvidedTypeIssue.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// ExpressionIsNeverOfProvidedTypeIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("CS0184:Given expression is never of the provided type",
- Description = "CS0184:Given expression is never of the provided type.",
- Category = IssueCategories.CompilerWarnings,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ExpressionIsNeverOfProvidedTypeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ExpressionIsNeverOfProvidedTypeIssue>
- {
- readonly CSharpConversions conversions;
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- conversions = CSharpConversions.Get(ctx.Compilation);
- }
-
- public override void VisitIsExpression (IsExpression isExpression)
- {
- base.VisitIsExpression (isExpression);
-
-// var conversions = CSharpConversions.Get(ctx.Compilation);
- var exprType = ctx.Resolve (isExpression.Expression).Type;
- var providedType = ctx.ResolveType (isExpression.Type);
-
- if (exprType.Kind == TypeKind.Unknown || providedType.Kind == TypeKind.Unknown)
- return;
- if (IsValidReferenceOrBoxingConversion(exprType, providedType))
- return;
-
- var exprTP = exprType as ITypeParameter;
- var providedTP = providedType as ITypeParameter;
- if (exprTP != null) {
- if (IsValidReferenceOrBoxingConversion(exprTP.EffectiveBaseClass, providedType)
- && exprTP.EffectiveInterfaceSet.All(i => IsValidReferenceOrBoxingConversion(i, providedType)))
- return;
- }
- if (providedTP != null) {
- if (IsValidReferenceOrBoxingConversion(exprType, providedTP.EffectiveBaseClass))
- return;
- }
-
- AddIssue (isExpression, ctx.TranslateString ("Given expression is never of the provided type"));
- }
-
- bool IsValidReferenceOrBoxingConversion(IType fromType, IType toType)
- {
- Conversion c = conversions.ExplicitConversion(fromType, toType);
- return c.IsValid && (c.IsIdentityConversion || c.IsReferenceConversion || c.IsBoxingConversion || c.IsUnboxingConversion);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionOfCompatibleTypeCastIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionOfCompatibleTypeCastIssue.cs
deleted file mode 100644
index 4a3afff..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ExpressionOfCompatibleTypeCastIssue.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// ExpressionOfCompatibleTypeCastIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
-/* [IssueDescription("Type cast expression of compatible type",
- Description = "Type cast expression of compatible type",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]*/
- public class ExpressionOfCompatibleTypeCastIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<CastExpressionOfIncompatibleTypeIssue>
- {
- readonly CSharpConversions conversion;
-
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- conversion = new CSharpConversions(ctx.Compilation);
- }
-
- public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
- {
- var rightExpressionType = ctx.Resolve(assignmentExpression.Right).Type;
- if (rightExpressionType.Kind == TypeKind.Class)
- return;
- var leftExpressionType = ctx.Resolve(assignmentExpression.Left).Type;
- VisitTypeCastExpression(assignmentExpression, leftExpressionType,
- rightExpressionType);
- }
-
- private AstType CreateShortType(AstNode node, IType fullType)
- {
- var builder = ctx.CreateTypeSytemAstBuilder(node);
- return builder.ConvertType(fullType);
- }
-
- void VisitTypeCastExpression(AssignmentExpression expression, IType exprType, IType castToType)
- {
- if (exprType.Kind == TypeKind.Unknown || castToType.Kind == TypeKind.Unknown)
- return;
- var foundConversion = conversion.ExplicitConversion(exprType, castToType);
- if (foundConversion == Conversion.None)
- return;
- if (!foundConversion.IsExplicit)
- return;
-
- AddIssue(expression, string.Format(ctx.TranslateString("Cast to '{0}'"), castToType.Name),
- script => {
- var right = expression.Right.Clone();
- var castRight = right.CastTo(CreateShortType(expression, castToType));
- script.Replace(expression.Right, castRight);
- });
- }
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ForControlVariableNotModifiedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ForControlVariableNotModifiedIssue.cs
deleted file mode 100644
index 8da0f53..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ForControlVariableNotModifiedIssue.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// ForControlVariableNotModifiedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("'for' loop control variable is never modified",
- Description = "'for' loop control variable is never modified.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ForControlVariableNotModifiedIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ForControlVariableNotModifiedIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- static VariableInitializer GetControlVariable(VariableDeclarationStatement variableDecl,
- BinaryOperatorExpression condition)
- {
- var controlVariables = variableDecl.Variables.Where (
- v =>
- {
- var identifier = new IdentifierExpression (v.Name);
- return condition.Left.Match (identifier).Success ||
- condition.Right.Match (identifier).Success;
- }).ToList ();
- return controlVariables.Count == 1 ? controlVariables [0] : null;
- }
-
- static VariableInitializer GetControlVariable(VariableDeclarationStatement variableDecl,
- UnaryOperatorExpression condition)
- {
- var controlVariables = variableDecl.Variables.Where (
- v =>
- {
- var identifier = new IdentifierExpression (v.Name);
- return condition.Expression.Match (identifier).Success;
- }).ToList ();
- return controlVariables.Count == 1 ? controlVariables [0] : null;
- }
-
- public override void VisitForStatement (ForStatement forStatement)
- {
- base.VisitForStatement (forStatement);
-
- if (forStatement.Initializers.Count != 1)
- return;
- var variableDecl = forStatement.Initializers.First () as VariableDeclarationStatement;
- if (variableDecl == null)
- return;
-
- VariableInitializer controlVariable = null;
- if (forStatement.Condition is BinaryOperatorExpression) {
- controlVariable = GetControlVariable (variableDecl, (BinaryOperatorExpression)forStatement.Condition);
- } else if (forStatement.Condition is UnaryOperatorExpression) {
- controlVariable = GetControlVariable (variableDecl, (UnaryOperatorExpression)forStatement.Condition);
- } else if (forStatement.Condition is IdentifierExpression) {
- controlVariable = variableDecl.Variables.FirstOrDefault (
- v => v.Name == ((IdentifierExpression)forStatement.Condition).Identifier);
- }
-
- if (controlVariable == null)
- return;
-
- var localResolveResult = ctx.Resolve (controlVariable) as LocalResolveResult;
- if (localResolveResult == null)
- return;
-
- var results = ctx.FindReferences (forStatement, localResolveResult.Variable);
- var modified = false;
- foreach (var result in results) {
- if (modified)
- break;
- var node = result.Node;
- var unary = node.Parent as UnaryOperatorExpression;
- if (unary != null && unary.Expression == node) {
- modified = unary.Operator == UnaryOperatorType.Decrement ||
- unary.Operator == UnaryOperatorType.PostDecrement ||
- unary.Operator == UnaryOperatorType.Increment ||
- unary.Operator == UnaryOperatorType.PostIncrement;
- continue;
- }
-
- var assignment = node.Parent as AssignmentExpression;
- modified = assignment != null && assignment.Left == node;
- }
-
- if (!modified)
- AddIssue (controlVariable.NameToken,
- ctx.TranslateString ("'for' loop control variable is never modified"));
-
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringHelper.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringHelper.cs
deleted file mode 100644
index 9531dd1..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringHelper.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// FormatStringHelper.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- class FormatStringHelper
- {
- static string[] parameterNames = { "format", "frmt", "fmt" };
-
- public static bool TryGetFormattingParameters(CSharpInvocationResolveResult invocationResolveResult, InvocationExpression invocationExpression,
- out Expression formatArgument, out TextLocation formatStart, out IList<Expression> arguments,
- Func<IParameter, Expression, bool> argumentFilter)
- {
- if (argumentFilter == null)
- argumentFilter = (p, e) => true;
-
- formatArgument = null;
- formatStart = default(TextLocation);
- arguments = new List<Expression>();
- var argumentToParameterMap = invocationResolveResult.GetArgumentToParameterMap();
- var resolvedParameters = invocationResolveResult.Member.Parameters;
- var allArguments = invocationExpression.Arguments.ToArray();
- for (int i = 0; i < allArguments.Length; i++) {
- var parameterIndex = argumentToParameterMap[i];
- if (parameterIndex < 0 || parameterIndex >= resolvedParameters.Count) {
- // No valid mapping for this parameter, skip it
- continue;
- }
- var parameter = resolvedParameters[parameterIndex];
- var argument = allArguments[i];
- if (parameter.Type.IsKnownType(KnownTypeCode.String) && parameterNames.Contains(parameter.Name)) {
- formatArgument = argument;
- formatStart = argument.StartLocation;
- } else if ((formatArgument != null || parameter.IsParams) && argumentFilter(parameter, argument)) {
- arguments.Add(argument);
- }
- }
- return formatArgument != null;
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringIssue.cs
deleted file mode 100644
index 60a2f19..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/FormatStringIssues/FormatStringIssue.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// FormatStringIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Linq;
-using ICSharpCode.NRefactory.Utils;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Format string syntax error",
- Description = "Finds issues with format strings.",
- Category = IssueCategories.ConstraintViolations,
- Severity = Severity.Error)]
- public class FormatStringIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<FormatStringIssue>
- {
- readonly BaseRefactoringContext context;
-
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- this.context = context;
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- // Speed up the inspector by discarding some invocations early
- var hasEligibleArgument = invocationExpression.Arguments.Any(argument => {
- var primitiveArg = argument as PrimitiveExpression;
- return primitiveArg != null && primitiveArg.Value is string;
- });
- if (!hasEligibleArgument)
- return;
-
- var invocationResolveResult = context.Resolve(invocationExpression) as CSharpInvocationResolveResult;
- if (invocationResolveResult == null)
- return;
- Expression formatArgument;
- IList<Expression> formatArguments;
- TextLocation formatStart;
- if (!FormatStringHelper.TryGetFormattingParameters(invocationResolveResult, invocationExpression,
- out formatArgument, out formatStart, out formatArguments, null)) {
- return;
- }
- var primitiveArgument = formatArgument as PrimitiveExpression;
- if (primitiveArgument == null || !(primitiveArgument.Value is string))
- return;
- var format = (string)primitiveArgument.Value;
- var parsingResult = context.ParseFormatString(format);
- CheckSegments(parsingResult.Segments, formatStart, formatArguments, invocationExpression);
- }
-
- void CheckSegments(IList<IFormatStringSegment> segments, TextLocation formatStart, IList<Expression> formatArguments, AstNode anchor)
- {
- int argumentCount = formatArguments.Count;
- foreach (var segment in segments) {
- var errors = segment.Errors.ToList();
- var formatItem = segment as FormatItem;
- if (formatItem != null) {
- var segmentEnd = new TextLocation(formatStart.Line, formatStart.Column + segment.EndLocation + 1);
- var segmentStart = new TextLocation(formatStart.Line, formatStart.Column + segment.StartLocation + 1);
- if (formatItem.Index >= argumentCount) {
- var outOfBounds = context.TranslateString("The index '{0}' is out of bounds of the passed arguments");
- AddIssue(segmentStart, segmentEnd, string.Format(outOfBounds, formatItem.Index));
- }
- if (formatItem.HasErrors) {
- var errorMessage = string.Join(Environment.NewLine, errors.Select(error => error.Message).ToArray());
- string messageFormat;
- if (errors.Count > 1) {
- messageFormat = context.TranslateString("Multiple:\n{0}");
- } else {
- messageFormat = context.TranslateString("{0}");
- }
- AddIssue(segmentStart, segmentEnd, string.Format(messageFormat, errorMessage));
- }
- } else if (segment.HasErrors) {
- foreach (var error in errors) {
- var errorStart = new TextLocation(formatStart.Line, formatStart.Column + error.StartLocation + 1);
- var errorEnd = new TextLocation(formatStart.Line, formatStart.Column + error.EndLocation + 1);
- AddIssue(errorStart, errorEnd, error.Message);
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs
index 76a019f..1cc9838 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/GatherVisitorBase.cs
@@ -1,210 +1,238 @@
-//
-// GatherVisitorBase.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Diagnostics.CodeAnalysis;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- /// <summary>
- /// A base class for writing issue provider visitor implementations.
- /// </summary>
- class GatherVisitorBase<T> : DepthFirstAstVisitor where T : ICodeIssueProvider
- {
- /// <summary>
- /// The issue provider. May be <c>null</c> if none was specified.
- /// </summary>
- protected readonly T IssueProvider;
-
- protected readonly BaseRefactoringContext ctx;
- bool isDisabled;
- bool isGloballySuppressed;
- List<DomRegion> suppressedRegions =new List<DomRegion> ();
-
- [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
- static string disableString;
-
- [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
- static string restoreString;
-
- [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
- static string suppressMessageCategory;
-
- [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
- static string suppressMessageCheckId;
-
- static void SetDisableKeyword(string disableKeyword)
- {
- disableString = "disable " + disableKeyword;
- restoreString = "restore " + disableKeyword;
- }
-
- public readonly List<CodeIssue> FoundIssues = new List<CodeIssue> ();
-
- static GatherVisitorBase()
- {
- var attr = (IssueDescriptionAttribute)typeof(T).GetCustomAttributes(false).FirstOrDefault(a => a is IssueDescriptionAttribute);
- if (attr == null)
- return;
- if (attr.ResharperDisableKeyword != null)
- SetDisableKeyword(attr.ResharperDisableKeyword);
- suppressMessageCheckId = attr.SuppressMessageCheckId;
- suppressMessageCategory = attr.SuppressMessageCategory;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.CSharp.GatherVisitorBase"/> class.
- /// </summary>
- /// <param name='ctx'>
- /// The refactoring context.
- /// </param>
- /// <param name='issueProvider'>
- /// The issue provider.
- /// </param>
- public GatherVisitorBase (BaseRefactoringContext ctx, T issueProvider = default(T))
- {
- this.ctx = ctx;
- this.IssueProvider = issueProvider;
- if (suppressMessageCheckId != null) {
- foreach (var attr in this.ctx.Compilation.MainAssembly.AssemblyAttributes) {
- if (attr.AttributeType.Name == "SuppressMessageAttribute" && attr.AttributeType.Namespace == "System.Diagnostics.CodeAnalysis") {
- if (attr.PositionalArguments.Count < 2)
- return;
- var category = attr.PositionalArguments [0].ConstantValue;
- if (category == null || category.ToString() != suppressMessageCategory)
- continue;
- var checkId = attr.PositionalArguments [1].ConstantValue;
- if (checkId == null || checkId.ToString() != suppressMessageCheckId)
- continue;
- isGloballySuppressed = true;
- }
- }
- }
- }
-
- /// <summary>
- /// Gets all the issues using the context root node as base.
- /// </summary>
- /// <returns>
- /// The issues.
- /// </returns>
- public IEnumerable<CodeIssue> GetIssues()
- {
- ctx.RootNode.AcceptVisitor(this);
- return FoundIssues;
- }
-
- protected override void VisitChildren (AstNode node)
- {
- if (ctx.CancellationToken.IsCancellationRequested || isGloballySuppressed)
- return;
- base.VisitChildren (node);
- }
-
- public override void VisitComment(Comment comment)
- {
- if (comment.CommentType == CommentType.SingleLine && restoreString != null) {
- var txt = comment.Content;
- if (string.IsNullOrEmpty(txt))
- return;
- if (isDisabled) {
- isDisabled &= txt.IndexOf(restoreString, StringComparison.InvariantCulture) < 0;
- } else {
- isDisabled |= txt.IndexOf(disableString, StringComparison.InvariantCulture) > 0;
- }
- }
- }
-
- public override void VisitAttribute(Attribute attribute)
- {
- base.VisitAttribute(attribute);
- if (suppressMessageCheckId == null)
- return;
- var resolveResult = ctx.Resolve(attribute);
- if (resolveResult.Type.Name == "SuppressMessageAttribute" && resolveResult.Type.Namespace == "System.Diagnostics.CodeAnalysis") {
- if (attribute.Arguments.Count < 2)
- return;
- var category = attribute.Arguments.First () as PrimitiveExpression;
- if (category == null || category.Value.ToString () != suppressMessageCategory)
- return;
- var checkId = attribute.Arguments.Skip (1).First () as PrimitiveExpression;
- if (checkId == null || checkId.Value.ToString() != suppressMessageCheckId)
- return;
- suppressedRegions.Add (attribute.Parent.Parent.Region);
- }
- }
-
- protected bool IsSuppressed(TextLocation location)
- {
- return isDisabled || isGloballySuppressed || suppressedRegions.Any(r => r.IsInside(location));
- }
-
- protected void AddIssue(AstNode node, string title, System.Action<Script> fix = null)
- {
- if (IsSuppressed(node.StartLocation))
- return;
- FoundIssues.Add(new CodeIssue (title, node.StartLocation, node.EndLocation, fix != null ? new CodeAction (title, fix, node) : null));
- }
-
- protected void AddIssue(TextLocation start, TextLocation end, string title, System.Action<Script> fix = null)
- {
- if (IsSuppressed(start))
- return;
- FoundIssues.Add(new CodeIssue(title, start, end, fix != null ? new CodeAction(title, fix, start, end) : null));
- }
-
- protected void AddIssue(AstNode node, string title, CodeAction fix)
- {
- if (IsSuppressed(node.StartLocation))
- return;
- FoundIssues.Add(new CodeIssue(title, node.StartLocation, node.EndLocation, fix));
- }
-
- protected void AddIssue(TextLocation start, TextLocation end, string title, CodeAction fix)
- {
- if (IsSuppressed(start))
- return;
- FoundIssues.Add(new CodeIssue (title, start, end, fix));
- }
-
- protected void AddIssue(AstNode node, string title, IEnumerable<CodeAction> fixes)
- {
- if (IsSuppressed(node.StartLocation))
- return;
- FoundIssues.Add(new CodeIssue(title, node.StartLocation, node.EndLocation, fixes));
- }
-
- protected void AddIssue(TextLocation start, TextLocation end, string title, IEnumerable<CodeAction> fixes)
- {
- if (IsSuppressed(start))
- return;
- FoundIssues.Add(new CodeIssue (title, start, end, fixes));
- }
- }
-}
+//
+// GatherVisitorBase.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Diagnostics.CodeAnalysis;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.TypeSystem;
+using Mono.CSharp;
+
+namespace ICSharpCode.NRefactory.CSharp
+{
+ /// <summary>
+ /// A base class for writing issue provider visitor implementations.
+ /// </summary>
+ class GatherVisitorBase<T> : DepthFirstAstVisitor where T : ICodeIssueProvider
+ {
+ /// <summary>
+ /// The issue provider. May be <c>null</c> if none was specified.
+ /// </summary>
+ protected readonly T QualifierDirectiveEvidentIssueProvider;
+
+ protected readonly BaseRefactoringContext ctx;
+ bool isDisabled;
+ bool isDisabledOnce;
+ bool isGloballySuppressed;
+ bool isPragmaDisabled;
+ List<DomRegion> suppressedRegions =new List<DomRegion> ();
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static string disableString;
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static string disableOnceString;
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static string restoreString;
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static string suppressMessageCategory;
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static string suppressMessageCheckId;
+
+ [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")]
+ static int pragmaWarning;
+
+ static void SetDisableKeyword(string disableKeyword)
+ {
+ disableString = "disable " + disableKeyword;
+ disableOnceString = "disable once " + disableKeyword;
+ restoreString = "restore " + disableKeyword;
+ }
+
+ public readonly List<CodeIssue> FoundIssues = new List<CodeIssue> ();
+
+ static GatherVisitorBase()
+ {
+ var attr = (IssueDescriptionAttribute)typeof(T).GetCustomAttributes(false).FirstOrDefault(a => a is IssueDescriptionAttribute);
+ if (attr == null)
+ return;
+ if (attr.ResharperDisableKeyword != null)
+ SetDisableKeyword(attr.ResharperDisableKeyword);
+ suppressMessageCheckId = attr.SuppressMessageCheckId;
+ suppressMessageCategory = attr.SuppressMessageCategory;
+ pragmaWarning = attr.PragmaWarning;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GatherVisitorBase{T}"/> class.
+ /// </summary>
+ /// <param name='ctx'>
+ /// The refactoring context.
+ /// </param>
+ /// <param name='qualifierDirectiveEvidentIssueProvider'>
+ /// The issue provider.
+ /// </param>
+ public GatherVisitorBase (BaseRefactoringContext ctx, T qualifierDirectiveEvidentIssueProvider = default(T))
+ {
+ this.ctx = ctx;
+ this.QualifierDirectiveEvidentIssueProvider = qualifierDirectiveEvidentIssueProvider;
+ if (suppressMessageCheckId != null) {
+ foreach (var attr in this.ctx.Compilation.MainAssembly.AssemblyAttributes) {
+ if (attr.AttributeType.Name == "SuppressMessageAttribute" && attr.AttributeType.Namespace == "System.Diagnostics.CodeAnalysis") {
+ if (attr.PositionalArguments.Count < 2)
+ return;
+ var category = attr.PositionalArguments [0].ConstantValue;
+ if (category == null || category.ToString() != suppressMessageCategory)
+ continue;
+ var checkId = attr.PositionalArguments [1].ConstantValue;
+ if (checkId == null || checkId.ToString() != suppressMessageCheckId)
+ continue;
+ isGloballySuppressed = true;
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets all the issues using the context root node as base.
+ /// </summary>
+ /// <returns>
+ /// The issues.
+ /// </returns>
+ public IEnumerable<CodeIssue> GetIssues()
+ {
+ ctx.RootNode.AcceptVisitor(this);
+ return FoundIssues;
+ }
+
+ protected override void VisitChildren (AstNode node)
+ {
+ if (ctx.CancellationToken.IsCancellationRequested || isGloballySuppressed)
+ return;
+ base.VisitChildren (node);
+ }
+
+ public override void VisitComment(Comment comment)
+ {
+ if (comment.CommentType == CommentType.SingleLine && restoreString != null) {
+ var txt = comment.Content;
+ if (string.IsNullOrEmpty(txt))
+ return;
+ if (isDisabled) {
+ isDisabled &= txt.IndexOf(restoreString, StringComparison.InvariantCulture) < 0;
+ } else {
+ isDisabled |= txt.IndexOf(disableString, StringComparison.InvariantCulture) > 0;
+ isDisabledOnce |= txt.IndexOf(disableOnceString, StringComparison.InvariantCulture) > 0;
+ }
+ }
+ }
+
+ public override void VisitPreProcessorDirective(PreProcessorDirective preProcessorDirective)
+ {
+ if (pragmaWarning == 0)
+ return;
+
+ var warning = preProcessorDirective as PragmaWarningPreprocssorDirective;
+ if (warning == null)
+ return;
+ if (warning.WarningList.Contains(pragmaWarning))
+ isPragmaDisabled = warning.Disable;
+ }
+
+ public override void VisitAttribute(Attribute attribute)
+ {
+ base.VisitAttribute(attribute);
+ if (suppressMessageCheckId == null)
+ return;
+ var resolveResult = ctx.Resolve(attribute);
+ if (resolveResult.Type.Name == "SuppressMessageAttribute" && resolveResult.Type.Namespace == "System.Diagnostics.CodeAnalysis") {
+ if (attribute.Arguments.Count < 2)
+ return;
+ var category = attribute.Arguments.First () as PrimitiveExpression;
+ if (category == null || category.Value.ToString () != suppressMessageCategory)
+ return;
+ var checkId = attribute.Arguments.Skip (1).First () as PrimitiveExpression;
+ if (checkId == null || checkId.Value.ToString() != suppressMessageCheckId)
+ return;
+ suppressedRegions.Add (attribute.Parent.Parent.Region);
+ }
+ }
+
+ protected bool IsSuppressed(TextLocation location)
+ {
+ if (isDisabledOnce) {
+ isDisabledOnce = false;
+ return true;
+ }
+ return isDisabled || isGloballySuppressed || isPragmaDisabled || suppressedRegions.Any(r => r.IsInside(location));
+ }
+
+ protected void AddIssue(AstNode node, string title, System.Action<Script> fix = null)
+ {
+ if (IsSuppressed(node.StartLocation))
+ return;
+ FoundIssues.Add(new CodeIssue (title, node.StartLocation, node.EndLocation, fix != null ? new CodeAction (title, fix, node) : null));
+ }
+
+ protected void AddIssue(TextLocation start, TextLocation end, string title, System.Action<Script> fix = null)
+ {
+ if (IsSuppressed(start))
+ return;
+ FoundIssues.Add(new CodeIssue(title, start, end, fix != null ? new CodeAction(title, fix, start, end) : null));
+ }
+
+ protected void AddIssue(AstNode node, string title, CodeAction fix)
+ {
+ if (IsSuppressed(node.StartLocation))
+ return;
+ FoundIssues.Add(new CodeIssue(title, node.StartLocation, node.EndLocation, fix));
+ }
+
+ protected void AddIssue(TextLocation start, TextLocation end, string title, CodeAction fix)
+ {
+ if (IsSuppressed(start))
+ return;
+ FoundIssues.Add(new CodeIssue (title, start, end, fix));
+ }
+
+ protected void AddIssue(AstNode node, string title, IEnumerable<CodeAction> fixes)
+ {
+ if (IsSuppressed(node.StartLocation))
+ return;
+ FoundIssues.Add(new CodeIssue(title, node.StartLocation, node.EndLocation, fixes));
+ }
+
+ protected void AddIssue(TextLocation start, TextLocation end, string title, IEnumerable<CodeAction> fixes)
+ {
+ if (IsSuppressed(start))
+ return;
+ FoundIssues.Add(new CodeIssue (title, start, end, fixes));
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IdenticalConditionalBranchIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IdenticalConditionalBranchIssue.cs
deleted file mode 100644
index 4d14b7c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IdenticalConditionalBranchIssue.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// IdenticalConditionalBranchIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
-
- [IssueDescription ("'?:' expression has identical true and false branches",
- Description = "'?:' expression has identical true and false branches.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
- public class IdenticalConditionalBranchIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<IdenticalConditionalBranchIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
- {
- base.VisitConditionalExpression (conditionalExpression);
-
- if (!conditionalExpression.TrueExpression.Match (conditionalExpression.FalseExpression).Success)
- return;
- var action = new CodeAction (ctx.TranslateString ("Replace '?:' with branch"),
- script => script.Replace (conditionalExpression, conditionalExpression.TrueExpression.Clone ()), conditionalExpression.QuestionMarkToken);
- AddIssue (conditionalExpression,
- ctx.TranslateString ("'?:' expression has identical true and false branches"), new [] { action });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/AffectedEntity.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/AffectedEntity.cs
deleted file mode 100644
index 792363a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/AffectedEntity.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// AffectedEntity.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [Flags]
- public enum AffectedEntity
- {
- None,
-
- Namespace = 1 << 0,
-
- Class = 1 << 1,
- Struct = 1 << 2,
- Enum = 1 << 3,
- Interface = 1 << 4,
- Delegate = 1 << 5,
-
- CustomAttributes = 1 << 6,
- CustomEventArgs = 1 << 7,
- CustomExceptions = 1 << 8,
-
- Property = 1 << 9,
- Method = 1 << 10,
- AsyncMethod = 1 << 11,
- Field = 1 << 12,
- ReadonlyField = 1 << 13,
- ConstantField = 1 << 14,
-
- Event = 1 << 15,
- EnumMember = 1 << 16,
-
- Parameter = 1 << 17,
- TypeParameter = 1 << 18,
-
- // Unit test special case
- TestType = 1 << 19,
- TestMethod = 1 << 20,
-
- // private entities
- LambdaParameter = 1 << 21,
- LocalVariable = 1 << 22,
- LocalConstant = 1 << 23,
- Label = 1 << 24,
-
- LocalVars = LocalVariable | Parameter | LambdaParameter | LocalConstant,
- Methods = Method | AsyncMethod,
- Fields = Field | ReadonlyField | ConstantField,
- Member = Property | Methods | Fields | Event | EnumMember,
-
- Type = Class | Struct | Enum | Interface | Delegate,
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/DefaultRules.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/DefaultRules.cs
deleted file mode 100644
index 7a30d73..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/DefaultRules.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// DefaultRules.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public static class DefaultRules
- {
- public static IEnumerable<NamingRule> GetFdgRules()
- {
- yield return new NamingRule(AffectedEntity.Namespace) {
- Name = "Namespaces",
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.Class | AffectedEntity.Struct | AffectedEntity.Enum | AffectedEntity.Delegate) {
- Name = "Types",
- VisibilityMask = Modifiers.Public,
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.Interface) {
- Name = "Interfaces",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public,
- RequiredPrefixes = new [] { "I" }
- };
-
- yield return new NamingRule(AffectedEntity.CustomAttributes) {
- Name = "Attributes",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public,
- RequiredSuffixes = new [] { "Attribute" }
- };
-
- yield return new NamingRule(AffectedEntity.CustomEventArgs) {
- Name = "Event Arguments",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public,
- RequiredSuffixes = new [] { "EventArgs" }
- };
-
- yield return new NamingRule(AffectedEntity.CustomExceptions) {
- Name = "Exceptions",
- NamingStyle = NamingStyle.PascalCase,
- RequiredSuffixes = new [] { "Exception" }
- };
-
- yield return new NamingRule(AffectedEntity.Methods) {
- Name = "Methods",
- VisibilityMask = Modifiers.Public | Modifiers.Protected,
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.ReadonlyField) {
- Name = "Static Readonly Fields",
- VisibilityMask = Modifiers.Public | Modifiers.Protected,
- NamingStyle = NamingStyle.PascalCase,
- IncludeInstanceMembers = false
- };
-
- yield return new NamingRule(AffectedEntity.Field) {
- Name = "Fields",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public | Modifiers.Protected
- };
-
- yield return new NamingRule(AffectedEntity.ReadonlyField) {
- Name = "ReadOnly Fields",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public | Modifiers.Protected,
- IncludeStaticEntities = false
- };
-
- yield return new NamingRule(AffectedEntity.ConstantField) {
- Name = "Constant Fields",
- NamingStyle = NamingStyle.PascalCase,
- VisibilityMask = Modifiers.Public | Modifiers.Protected
- };
-
- yield return new NamingRule(AffectedEntity.Property) {
- Name = "Properties",
- VisibilityMask = Modifiers.Public | Modifiers.Protected,
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.Event) {
- Name = "Events",
- VisibilityMask = Modifiers.Public | Modifiers.Protected,
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.EnumMember) {
- Name = "Enum Members",
- NamingStyle = NamingStyle.PascalCase
- };
-
- yield return new NamingRule(AffectedEntity.Parameter) {
- Name = "Parameters",
- NamingStyle = NamingStyle.CamelCase
- };
-
- yield return new NamingRule(AffectedEntity.TypeParameter) {
- Name = "Type Parameters",
- NamingStyle = NamingStyle.PascalCase,
- RequiredPrefixes = new [] { "T" }
- };
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/InconsistentNamingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/InconsistentNamingIssue.cs
deleted file mode 100644
index fa16619..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/InconsistentNamingIssue.cs
+++ /dev/null
@@ -1,368 +0,0 @@
-//
-// InconsistentNamingIssue.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Inconsistent Naming",
- Description = "Name doesn't match the defined style for this entity.",
- Category = IssueCategories.ConstraintViolations,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "CheckNamespace")]
- public class InconsistentNamingIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var visitor = new GatherVisitor(context);
- context.RootNode.AcceptVisitor(visitor);
- return visitor.FoundIssues;
- }
-
- class GatherVisitor : GatherVisitorBase<InconsistentNamingIssue>
- {
- readonly NamingConventionService service;
-
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- service = (NamingConventionService)ctx.GetService (typeof (NamingConventionService));
- }
-
- void CheckName(TypeDeclaration node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
- {
- TypeResolveResult resolveResult = ctx.Resolve(node) as TypeResolveResult;
- if (resolveResult == null)
- return;
- var type = resolveResult.Type;
- if (type.DirectBaseTypes.Any(t => t.FullName == "System.Attribute")) {
- if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomAttributes, identifier, accessibilty)) {
- return;
- }
- } else if (type.DirectBaseTypes.Any(t => t.FullName == "System.EventArgs")) {
- if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomEventArgs, identifier, accessibilty)) {
- return;
- }
- } else if (type.DirectBaseTypes.Any(t => t.FullName == "System.Exception")) {
- if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomExceptions, identifier, accessibilty)) {
- return;
- }
- }
-
- var typeDef = type.GetDefinition();
- if (typeDef != null && typeDef.Attributes.Any(attr => attr.AttributeType.FullName == "NUnit.Framework.TestFixtureAttribute")) {
- if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.TestType, identifier, accessibilty)) {
- return;
- }
- }
-
- CheckNamedResolveResult(resolveResult, node, entity, identifier, accessibilty);
- }
-
- void CheckName(MethodDeclaration node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
- {
- ResolveResult resolveResult = null;
- if (node != null && node.Attributes.Any ())
- resolveResult = ctx.Resolve(node);
-
- if (resolveResult is MemberResolveResult) {
- var member = ((MemberResolveResult)resolveResult).Member;
- if (member.EntityType == EntityType.Method && member.Attributes.Any(attr => attr.AttributeType.FullName == "NUnit.Framework.TestAttribute")) {
- if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.TestMethod, identifier, accessibilty)) {
- return;
- }
- }
- }
-
- CheckNamedResolveResult(resolveResult, node, entity, identifier, accessibilty);
- }
-
- void CheckName(AstNode node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
- {
- CheckNamedResolveResult(null, node, entity, identifier, accessibilty);
- }
-
- bool CheckNamedResolveResult(ResolveResult resolveResult, AstNode node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
- {
- bool wasHandled = false;
- foreach (var rule in service.Rules) {
- if (!rule.AffectedEntity.HasFlag(entity)) {
- continue;
- }
- if (!rule.VisibilityMask.HasFlag(accessibilty)) {
- continue;
- }
- if (!rule.IncludeInstanceMembers || !rule.IncludeStaticEntities) {
- EntityDeclaration typeSystemEntity;
- if (node is VariableInitializer) {
- typeSystemEntity = node.Parent as EntityDeclaration;
- } else {
- typeSystemEntity = node as EntityDeclaration;
- }
- if (!rule.IncludeInstanceMembers) {
- if (typeSystemEntity == null || !typeSystemEntity.HasModifier (Modifiers.Static) || typeSystemEntity.HasModifier (Modifiers.Sealed)) {
- continue;
- }
- }
- if (!rule.IncludeStaticEntities) {
- if (typeSystemEntity == null || typeSystemEntity.HasModifier (Modifiers.Static) || typeSystemEntity.HasModifier (Modifiers.Sealed)) {
- continue;
- }
- }
- }
-
- wasHandled = true;
- if (!rule.IsValid(identifier.Name)) {
- IList<string> suggestedNames;
- var msg = rule.GetErrorMessage(ctx, identifier.Name, out suggestedNames);
- var actions = new List<CodeAction>(suggestedNames.Select(n => new CodeAction(string.Format(ctx.TranslateString("Rename to '{0}'"), n), (Script script) => {
- if (resolveResult == null)
- resolveResult = ctx.Resolve (node);
- if (resolveResult is MemberResolveResult) {
- script.Rename(((MemberResolveResult)resolveResult).Member, n);
- } else if (resolveResult is TypeResolveResult) {
- var def = ((TypeResolveResult)resolveResult).Type.GetDefinition();
- if (def != null) {
- script.Rename(def, n);
- } else {
- script.RenameTypeParameter(((TypeResolveResult)resolveResult).Type, n);
- }
- } else if (resolveResult is LocalResolveResult) {
- script.Rename(((LocalResolveResult)resolveResult).Variable, n);
- } else if (resolveResult is NamespaceResolveResult) {
- script.Rename(((NamespaceResolveResult)resolveResult).Namespace, n);
- } else {
- script.Replace(identifier, Identifier.Create(n));
- }
- }, identifier)));
-
- if (entity != AffectedEntity.Label) {
- actions.Add(new CodeAction(string.Format(ctx.TranslateString("Rename '{0}'..."), identifier.Name), (Script script) => {
- if (resolveResult == null)
- resolveResult = ctx.Resolve (node);
- if (resolveResult is MemberResolveResult) {
- script.Rename(((MemberResolveResult)resolveResult).Member);
- } else if (resolveResult is TypeResolveResult) {
- var def = ((TypeResolveResult)resolveResult).Type.GetDefinition();
- if (def != null) {
- script.Rename(def);
- } else {
- script.RenameTypeParameter(((TypeResolveResult)resolveResult).Type);
- }
- } else if (resolveResult is LocalResolveResult) {
- script.Rename(((LocalResolveResult)resolveResult).Variable);
- } else if (resolveResult is NamespaceResolveResult) {
- script.Rename(((NamespaceResolveResult)resolveResult).Namespace);
- }
- }, identifier));
- }
-
- AddIssue(identifier, msg, actions);
- }
- }
- return wasHandled;
- }
-
- public override void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
- {
- base.VisitNamespaceDeclaration(namespaceDeclaration);
- foreach (var id in namespaceDeclaration.Identifiers) {
- CheckNamedResolveResult(null, namespaceDeclaration, AffectedEntity.Namespace, id, Modifiers.None);
- }
- }
-
- Modifiers GetAccessibiltiy(EntityDeclaration decl, Modifiers defaultModifier)
- {
- var accessibility = (decl.Modifiers & Modifiers.VisibilityMask);
- if (accessibility == Modifiers.None) {
- return defaultModifier;
- }
- return accessibility;
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- base.VisitTypeDeclaration(typeDeclaration);
- AffectedEntity entity;
- switch (typeDeclaration.ClassType) {
- case ClassType.Class:
- entity = AffectedEntity.Class;
- break;
- case ClassType.Struct:
- entity = AffectedEntity.Struct;
- break;
- case ClassType.Interface:
- entity = AffectedEntity.Interface;
- break;
- case ClassType.Enum:
- entity = AffectedEntity.Enum;
- break;
- default:
- throw new System.ArgumentOutOfRangeException();
- }
- CheckName(typeDeclaration, entity, typeDeclaration.NameToken, GetAccessibiltiy(typeDeclaration, typeDeclaration.Parent is TypeDeclaration ? Modifiers.Private : Modifiers.Internal));
- }
-
- public override void VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
- {
- base.VisitDelegateDeclaration(delegateDeclaration);
- CheckName(delegateDeclaration, AffectedEntity.Delegate, delegateDeclaration.NameToken, GetAccessibiltiy(delegateDeclaration, delegateDeclaration.Parent is TypeDeclaration ? Modifiers.Private : Modifiers.Internal));
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- if (propertyDeclaration.Modifiers.HasFlag (Modifiers.Override))
- return;
- base.VisitPropertyDeclaration(propertyDeclaration);
- CheckName(propertyDeclaration, AffectedEntity.Property, propertyDeclaration.NameToken, GetAccessibiltiy(propertyDeclaration, Modifiers.Private));
- }
-
- public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
- {
- if (indexerDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
- var rr = ctx.Resolve (indexerDeclaration) as MemberResolveResult;
- if (rr == null)
- return;
- var baseType = rr.Member.DeclaringType.DirectBaseTypes.FirstOrDefault (t => t.Kind != TypeKind.Interface);
- var method = baseType != null ? baseType.GetProperties (m => m.IsIndexer && m.IsOverridable && m.Parameters.Count == indexerDeclaration.Parameters.Count).FirstOrDefault () : null;
- if (method == null)
- return;
- int i = 0;
- foreach (var par in indexerDeclaration.Parameters) {
- if (method.Parameters[i++].Name != par.Name) {
- par.AcceptVisitor (this);
- }
- }
- return;
- }
- base.VisitIndexerDeclaration(indexerDeclaration);
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- if (methodDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
- var rr = ctx.Resolve (methodDeclaration) as MemberResolveResult;
- if (rr == null)
- return;
- var baseType = rr.Member.DeclaringType.DirectBaseTypes.FirstOrDefault (t => t.Kind != TypeKind.Interface);
- var method = baseType != null ? baseType.GetMethods (m => m.Name == rr.Member.Name && m.IsOverridable && m.Parameters.Count == methodDeclaration.Parameters.Count).FirstOrDefault () : null;
- if (method == null)
- return;
- int i = 0;
- foreach (var par in methodDeclaration.Parameters) {
- if (method.Parameters[i++].Name != par.Name) {
- par.AcceptVisitor (this);
- }
- }
-
- return;
- }
- base.VisitMethodDeclaration(methodDeclaration);
-
- CheckName(methodDeclaration, methodDeclaration.Modifiers.HasFlag(Modifiers.Async) ? AffectedEntity.AsyncMethod : AffectedEntity.Method, methodDeclaration.NameToken, GetAccessibiltiy(methodDeclaration, Modifiers.Private));
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- base.VisitFieldDeclaration(fieldDeclaration);
- var entity = AffectedEntity.Field;
- if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) {
- entity = AffectedEntity.ConstantField;
- } else if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) {
- entity = AffectedEntity.ReadonlyField;
- }
- foreach (var init in fieldDeclaration.Variables) {
- CheckName(init, entity, init.NameToken, GetAccessibiltiy(fieldDeclaration, Modifiers.Private));
- }
- }
-
- public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
- {
- base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
- var entity = AffectedEntity.Field;
- if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) {
- entity = AffectedEntity.ConstantField;
- } else if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) {
- entity = AffectedEntity.ReadonlyField;
- }
- CheckName(fixedFieldDeclaration, entity, fixedFieldDeclaration.NameToken, GetAccessibiltiy(fixedFieldDeclaration, Modifiers.Private));
- }
-
- public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
- {
- base.VisitEventDeclaration(eventDeclaration);
- foreach (var init in eventDeclaration.Variables) {
- CheckName(init, AffectedEntity.Event, init.NameToken, GetAccessibiltiy(eventDeclaration, Modifiers.Private));
- }
- }
-
- public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
- {
- if (eventDeclaration.Modifiers.HasFlag (Modifiers.Override))
- return;
- base.VisitCustomEventDeclaration(eventDeclaration);
- CheckName(eventDeclaration, AffectedEntity.Event, eventDeclaration.NameToken, GetAccessibiltiy(eventDeclaration, Modifiers.Private));
- }
-
- public override void VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration)
- {
- base.VisitEnumMemberDeclaration(enumMemberDeclaration);
- CheckName(enumMemberDeclaration, AffectedEntity.EnumMember, enumMemberDeclaration.NameToken, GetAccessibiltiy(enumMemberDeclaration, Modifiers.Private));
- }
-
- public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration(parameterDeclaration);
- CheckNamedResolveResult(null, parameterDeclaration, parameterDeclaration.Parent is LambdaExpression ? AffectedEntity.LambdaParameter : AffectedEntity.Parameter, parameterDeclaration.NameToken, Modifiers.None);
- }
-
- public override void VisitTypeParameterDeclaration(TypeParameterDeclaration typeParameterDeclaration)
- {
- base.VisitTypeParameterDeclaration(typeParameterDeclaration);
- CheckNamedResolveResult(null, typeParameterDeclaration, AffectedEntity.TypeParameter, typeParameterDeclaration.NameToken, Modifiers.None);
- }
-
- public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
- {
- base.VisitVariableDeclarationStatement(variableDeclarationStatement);
- var entity = variableDeclarationStatement.Modifiers.HasFlag(Modifiers.Const) ? AffectedEntity.LocalConstant : AffectedEntity.LocalVariable;
- foreach (var init in variableDeclarationStatement.Variables) {
- CheckNamedResolveResult(null, init, entity, init.NameToken, Modifiers.None);
- }
- }
-
- public override void VisitLabelStatement(LabelStatement labelStatement)
- {
- base.VisitLabelStatement(labelStatement);
- CheckNamedResolveResult(null, labelStatement, AffectedEntity.Label, labelStatement.LabelToken, Modifiers.None);
- }
- }
-
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingConventionService.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingConventionService.cs
deleted file mode 100644
index a1c2e9b..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingConventionService.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// NamingConventionService.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public abstract class NamingConventionService
- {
- public abstract IEnumerable<NamingRule> Rules {
- get;
- }
-
- public string CheckName(RefactoringContext ctx, string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
- {
- foreach (var rule in Rules) {
- if (!rule.AffectedEntity.HasFlag(entity)) {
- continue;
- }
- if (!rule.VisibilityMask.HasFlag(accessibilty)) {
- continue;
- }
- if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
- continue;
- }
- if (!rule.IsValid(name)) {
- IList<string> suggestedNames;
- rule.GetErrorMessage(ctx, name, out suggestedNames);
- if (suggestedNames.Any ())
- return suggestedNames [0];
- }
- }
- return name;
- }
-
- public bool IsValidName(string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
- {
- foreach (var rule in Rules) {
- if (!rule.AffectedEntity.HasFlag(entity)) {
- continue;
- }
- if (!rule.VisibilityMask.HasFlag(accessibilty)) {
- continue;
- }
- if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
- continue;
- }
- if (!rule.IsValid(name)) {
- return false;
- }
- }
- return true;
- }
-
- public bool HasValidRule(string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
- {
- foreach (var rule in Rules) {
- if (!rule.AffectedEntity.HasFlag(entity)) {
- continue;
- }
- if (!rule.VisibilityMask.HasFlag(accessibilty)) {
- continue;
- }
- if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
- continue;
- }
- if (rule.IsValid(name)) {
- return true;
- }
- }
- return false;
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingRule.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingRule.cs
deleted file mode 100644
index 1f1122c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingRule.cs
+++ /dev/null
@@ -1,397 +0,0 @@
-//
-// NamingRule.cs
-//
-// Author:
-// Michael Hutchinson <mhutch at xamarin.com>
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-using System.Text;
-using System.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class NamingRule : IEquatable<NamingRule>
- {
- public string Name { get; set; }
- /// <summary>
- /// If set, identifiers are required to be prefixed with one of these values.
- /// </summary>
- public string[] RequiredPrefixes { get; set; }
-
- /// <summary>
- /// If set, identifiers are allowed to be prefixed with one of these values.
- /// </summary>
- public string[] AllowedPrefixes { get; set; }
-
- /// <summary>
- /// If set, identifiers are required to be suffixed with one of these values.
- /// </summary>
- public string[] RequiredSuffixes { get; set; }
-
- /// <summary>
- /// If set, identifiers cannot be prefixed by any of these values.
- /// </summary>
- public string[] ForbiddenPrefixes { get; set; }
-
- /// <summary>
- /// If set, identifiers cannot be suffixed by with any of these values.
- /// </summary
- public string[] ForbiddenSuffixes { get; set; }
-
- /// <summary>
- /// Gets or sets the affected entity.
- /// </summary>
- public AffectedEntity AffectedEntity { get; set; }
-
- /// <summary>
- /// Gets or sets the modifiers mask
- /// </summary>
- public Modifiers VisibilityMask { get; set; }
-
- /// <summary>
- /// The way that the identifier is cased and that words are separated.
- /// </summary
- public NamingStyle NamingStyle { get; set; }
-
- public bool IncludeStaticEntities { get; set; }
- public bool IncludeInstanceMembers { get; set; }
-
- public bool IsValid(string name)
- {
- string id = name;
- bool foundPrefix = false;
- if (RequiredPrefixes != null && RequiredPrefixes.Length > 0) {
- var prefix = RequiredPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
- if (prefix == null) {
- return false;
- }
- id = id.Substring(prefix.Length);
- foundPrefix = true;
- }
-
- if (!foundPrefix && AllowedPrefixes != null && AllowedPrefixes.Length > 0) {
- var prefix = AllowedPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
- if (prefix != null) {
- id = id.Substring(prefix.Length);
- foundPrefix = true;
- }
- }
-
- if (!foundPrefix && ForbiddenPrefixes != null && ForbiddenPrefixes.Length > 0) {
- if (ForbiddenPrefixes.Any(p => id.StartsWith(p, StringComparison.Ordinal))) {
- return false;
- }
- }
-
- if (RequiredSuffixes != null && RequiredSuffixes.Length > 0) {
- var suffix = RequiredSuffixes.FirstOrDefault(s => id.EndsWith(s, StringComparison.Ordinal));
- if (suffix == null) {
- return false;
- }
- id = id.Substring(0, id.Length - suffix.Length);
- } else if (ForbiddenSuffixes != null && ForbiddenSuffixes.Length > 0) {
- if (ForbiddenSuffixes.Any(p => id.EndsWith(p, StringComparison.Ordinal))) {
- return false;
- }
- }
-
- switch (NamingStyle) {
- case NamingStyle.AllLower:
- return !id.Any(ch => char.IsLetter(ch) && char.IsUpper(ch));
- case NamingStyle.AllUpper:
- return !id.Any(ch => char.IsLetter(ch) && char.IsLower(ch));
- case NamingStyle.CamelCase:
- return id.Length == 0 || (char.IsLower(id [0]) && NoUnderscore(id));
- case NamingStyle.PascalCase:
- return id.Length == 0 || (char.IsUpper(id [0]) && NoUnderscore(id));
- case NamingStyle.FirstUpper:
- return id.Length == 0 && char.IsUpper(id [0]) && !id.Skip(1).Any(ch => char.IsLetter(ch) && char.IsUpper(ch));
- }
- return true;
- }
-
- public NamingRule(AffectedEntity affectedEntity)
- {
- AffectedEntity = affectedEntity;
- VisibilityMask = Modifiers.VisibilityMask;
- IncludeStaticEntities = true;
- IncludeInstanceMembers = true;
- }
-
- static bool NoUnderscore(string id)
- {
- return id.IndexOf('_') < 0;
- }
-
-// static bool NoUnderscoreWithoutNumber(string id)
-// {
-// int idx = id.IndexOf('_');
-// while (idx >= 0 && idx < id.Length) {
-// if ((idx + 2 >= id.Length || !char.IsDigit(id [idx + 1])) && (idx == 0 || !char.IsDigit(id [idx - 1]))) {
-// return false;
-// }
-// idx = id.IndexOf('_', idx + 1);
-// }
-// return true;
-// }
-
-
- public string GetErrorMessage(BaseRefactoringContext ctx, string name, out IList<string> suggestedNames)
- {
- suggestedNames = new List<string>();
- string id = name;
-
- string errorMessage = null;
-
- bool missingRequiredPrefix = false;
- bool missingRequiredSuffix = false;
- string requiredPrefix = null;
- string allowedPrefix = null;
- string suffix = null;
-
- if (AllowedPrefixes != null && AllowedPrefixes.Length > 0) {
- allowedPrefix = AllowedPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
- if (allowedPrefix != null)
- id = id.Substring(allowedPrefix.Length);
-
- }
-
- if (RequiredPrefixes != null && RequiredPrefixes.Length > 0) {
- requiredPrefix = RequiredPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
- if (requiredPrefix == null) {
- errorMessage = string.Format(ctx.TranslateString("Name should have prefix '{0}'."), RequiredPrefixes [0]);
- missingRequiredPrefix = true;
- } else {
- id = id.Substring(requiredPrefix.Length);
- }
- } else if (ForbiddenPrefixes != null && ForbiddenPrefixes.Length > 0) {
- requiredPrefix = ForbiddenPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
- if (requiredPrefix != null) {
- errorMessage = string.Format(ctx.TranslateString("Name has forbidden prefix '{0}'."), requiredPrefix);
- id = id.Substring(requiredPrefix.Length);
- }
- }
-
- if (RequiredSuffixes != null && RequiredSuffixes.Length > 0) {
- suffix = RequiredSuffixes.FirstOrDefault(s => id.EndsWith(s, StringComparison.Ordinal));
- if (suffix == null) {
- errorMessage = string.Format(ctx.TranslateString("Name should have suffix '{0}'."), RequiredSuffixes [0]);
- missingRequiredSuffix = true;
- } else {
- id = id.Substring(0, id.Length - suffix.Length);
- }
- } else if (ForbiddenSuffixes != null && ForbiddenSuffixes.Length > 0) {
- suffix = ForbiddenSuffixes.FirstOrDefault(p => id.EndsWith(p, StringComparison.Ordinal));
- if (suffix != null) {
- errorMessage = string.Format(ctx.TranslateString("Name has forbidden suffix '{0}'."), suffix);
- id = id.Substring(0, id.Length - suffix.Length);
- }
- }
-
- switch (NamingStyle) {
- case NamingStyle.AllLower:
- if (id.Any(ch => char.IsLetter(ch) && char.IsUpper(ch))) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' contains upper case letters."), name);
- suggestedNames.Add(LowerCaseIdentifier(WordParser.BreakWords(id)));
- } else {
- suggestedNames.Add(id);
- }
- break;
- case NamingStyle.AllUpper:
- if (id.Any(ch => char.IsLetter(ch) && char.IsLower(ch))) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' contains lower case letters."), name);
- suggestedNames.Add(UpperCaseIdentifier(WordParser.BreakWords(id)));
- } else {
- suggestedNames.Add(id);
- }
- break;
- case NamingStyle.CamelCase:
- if (id.Length > 0 && char.IsUpper(id [0])) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' should start with a lower case letter."), name);
- } else if (!NoUnderscore(id)) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' should not separate words with an underscore."), name);
- } else {
- suggestedNames.Add(id);
- break;
- }
- suggestedNames.Add(CamelCaseIdentifier(WordParser.BreakWords(id)));
- break;
- case NamingStyle.PascalCase:
- if (id.Length > 0 && char.IsLower(id [0])) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' should start with an upper case letter."), name);
- } else if (!NoUnderscore(id)) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' should not separate words with an underscore."), name);
- } else {
- suggestedNames.Add(id);
- break;
- }
- suggestedNames.Add(PascalCaseIdentifier(WordParser.BreakWords(id)));
- break;
- case NamingStyle.FirstUpper:
- if (id.Length > 0 && char.IsLower(id [0])) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' should start with an upper case letter."), name);
- } else if (id.Take(1).Any(ch => char.IsLetter(ch) && char.IsUpper(ch))) {
- errorMessage = string.Format(ctx.TranslateString("'{0}' contains an upper case letter after the first."), name);
- } else {
- suggestedNames.Add(id);
- break;
- }
- suggestedNames.Add(FirstUpperIdentifier(WordParser.BreakWords(id)));
- break;
- }
-
- if (requiredPrefix != null) {
- for (int i = 0; i < suggestedNames.Count; i++) {
- suggestedNames [i] = requiredPrefix + suggestedNames [i];
- }
- } else if (allowedPrefix != null) {
- int count = suggestedNames.Count;
- for (int i = 0; i < count; i++) {
- suggestedNames.Add(suggestedNames [i]);
- suggestedNames [i] = allowedPrefix + suggestedNames [i];
- }
- } else if (missingRequiredPrefix) {
- for (int i = 0; i < suggestedNames.Count; i++) {
- var n = suggestedNames [i];
- bool first = true;
- foreach (var p in RequiredPrefixes) {
- if (first) {
- first = false;
- suggestedNames [i] = p + n;
- } else {
- suggestedNames.Add(p + n);
- }
- }
- }
- }
-
- if (suffix != null) {
- for (int i = 0; i < suggestedNames.Count; i++) {
- suggestedNames [i] = suggestedNames [i] + suffix;
- }
- } else if (missingRequiredSuffix) {
- for (int i = 0; i < suggestedNames.Count; i++) {
- var n = suggestedNames [i];
- bool first = true;
- foreach (var s in RequiredSuffixes) {
- if (first) {
- first = false;
- suggestedNames [i] = n + s;
- } else {
- suggestedNames.Add(n + s);
- }
- }
- }
- }
-
- return errorMessage
- // should never happen.
- ?? "no known errors.";
- }
-
- static string CamelCaseIdentifier (List<string> words)
- {
- var sb = new StringBuilder ();
- sb.Append (words[0].ToLower ());
- for (int i = 1; i < words.Count; i++) {
-// if (sb.Length > 0 && (char.IsDigit (sb[sb.Length-1]) || char.IsDigit (words[i][0])))
-// sb.Append ('_');
- AppendCapitalized (words[i], sb);
- }
- return sb.ToString ();
- }
-
- static string PascalCaseIdentifier (List<string> words)
- {
- var sb = new StringBuilder ();
- for (int i = 0; i < words.Count; i++) {
-// if (sb.Length > 0 && (char.IsDigit (sb[sb.Length-1]) || char.IsDigit (words[i][0])))
-// sb.Append ('_');
- AppendCapitalized (words[i], sb);
- }
- return sb.ToString ();
- }
-
- static string LowerCaseIdentifier (List<string> words)
- {
- var sb = new StringBuilder ();
- sb.Append (words[0].ToLower ());
- for (int i = 1; i < words.Count; i++) {
- sb.Append ('_');
- sb.Append (words[i].ToLower ());
- }
- return sb.ToString ();
- }
-
- static string UpperCaseIdentifier (List<string> words)
- {
- var sb = new StringBuilder ();
- sb.Append (words[0].ToUpper ());
- for (int i = 1; i < words.Count; i++) {
- sb.Append ('_');
- sb.Append (words[i].ToUpper ());
- }
- return sb.ToString ();
- }
-
- static string FirstUpperIdentifier (List<string> words)
- {
- var sb = new StringBuilder ();
- AppendCapitalized (words[0], sb);
- for (int i = 1; i < words.Count; i++) {
- sb.Append ('_');
- sb.Append (words[i].ToLower ());
- }
- return sb.ToString ();
- }
-
- static void AppendCapitalized(string word, StringBuilder sb)
- {
- sb.Append(word.ToLower());
- sb [sb.Length - word.Length] = char.ToUpper(sb [sb.Length - word.Length]);
- }
-
- #region IEquatable implementation
- public bool Equals (NamingRule other)
- {
- return Name == other.Name &&
- AffectedEntity == other.AffectedEntity &&
- VisibilityMask == other.VisibilityMask &&
- NamingStyle == other.NamingStyle;
- }
- #endregion
-
- public NamingRule Clone()
- {
- return (NamingRule)MemberwiseClone();
- }
-
- public override string ToString()
- {
- return string.Format("[NamingRule: Name={0}, AffectedEntity={1}, VisibilityMask={2}, NamingStyle={3}, IncludeStaticEntities={4}, IncludeInstanceMembers={5}]", Name, AffectedEntity, VisibilityMask, NamingStyle, IncludeStaticEntities, IncludeInstanceMembers);
- }
-
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingStyle.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingStyle.cs
deleted file mode 100644
index bf94270..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/NamingStyle.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// NamingStyle.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public enum NamingStyle {
- None,
-
- /// <summary>
- /// PascalCase
- /// </summary>
- PascalCase,
-
- /// <summary>
- /// camelCase
- /// </summary>
- CamelCase,
-
- /// <summary>
- /// ALLUPPER
- /// </summary>
- AllUpper,
-
- /// <summary>
- /// alllower
- /// </summary>
- AllLower,
-
- /// <summary>
- /// Firstupper
- /// </summary>
- FirstUpper
- }
-
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/WordParser.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/WordParser.cs
deleted file mode 100644
index 9cbbcff..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/InconsistentNamingIssue/WordParser.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// WordParser.cs
-//
-// Author:
-// Michael Hutchinson <mhutch at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- public static class WordParser
- {
- public static List<string> BreakWords (string identifier)
- {
- var words = new List<string> ();
- int wordStart = 0;
- bool lastWasLower = false, lastWasUpper = false;
- for (int i = 0; i < identifier.Length; i++) {
- char c = identifier[i];
- var category = char.GetUnicodeCategory (c);
- if (category == System.Globalization.UnicodeCategory.LowercaseLetter) {
- if (lastWasUpper && (i - wordStart) > 2) {
- words.Add (identifier.Substring (wordStart, i - wordStart - 1));
- wordStart = i - 1;
- }
- lastWasLower = true;
- lastWasUpper = false;
- } else if (category == System.Globalization.UnicodeCategory.UppercaseLetter) {
- if (lastWasLower) {
- words.Add (identifier.Substring (wordStart, i - wordStart));
- wordStart = i;
- }
- lastWasLower = false;
- lastWasUpper = true;
- } else {
- if (c == '_') {
- if ((i - wordStart) > 0)
- words.Add(identifier.Substring(wordStart, i - wordStart));
- wordStart = i + 1;
- lastWasLower = lastWasUpper = false;
- }
- }
- }
- if (wordStart < identifier.Length)
- words.Add (identifier.Substring (wordStart));
- return words;
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectCallToObjectGetHashCodeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectCallToObjectGetHashCodeIssue.cs
deleted file mode 100644
index 061c061..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectCallToObjectGetHashCodeIssue.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// IncorrectCallToObjectGetHashCodeIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Call resolves to Object.GetHashCode, which is reference based",
- Description = "Finds calls to Object.GetHashCode inside overridden GetHashCode.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "BaseObjectGetHashCodeCallInGetHashCode")]
- public class IncorrectCallToObjectGetHashCodeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<IncorrectCallToObjectGetHashCodeIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- // Check that this declaration is a GetHashCode override, _then_ continue traversing
-
- if (methodDeclaration.Name != "GetHashCode") {
- return;
- }
- if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
- return;
- }
-
- base.VisitMethodDeclaration(methodDeclaration);
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- var resolveResult = ctx.Resolve(invocationExpression) as InvocationResolveResult;
- if (resolveResult == null || !(resolveResult.TargetResult is ThisResolveResult) || resolveResult.Member.Name != "GetHashCode" ||
- !resolveResult.Member.DeclaringTypeDefinition.IsKnownType(KnownTypeCode.Object)) {
- return;
- }
- AddIssue(invocationExpression, ctx.TranslateString("Call resolves to Object.GetHashCode, which is reference based"));
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectExceptionParameterOrderingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectExceptionParameterOrderingIssue.cs
deleted file mode 100644
index 26ac41b..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IncorrectExceptionParameterOrderingIssue.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// IncorrectExceptionParametersOrderingIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.Semantics;
-using System;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Incorrect ordering of exception constructor parameters",
- Description = "Warns about the constructor parameter ordering of some confusing exception types.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning)]
- public class IncorrectExceptionParameterOrderingIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<IncorrectExceptionParameterOrderingIssue>
- {
- readonly BaseRefactoringContext context;
- Dictionary<string, Func<int, int, bool>> rules;
-
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- this.context = context;
- rules = new Dictionary<string, Func<int, int, bool>>();
- rules [typeof(ArgumentException).FullName] = (left, right) => left > right;
- rules [typeof(ArgumentNullException).FullName] = (left, right) => left < right;
- rules [typeof(ArgumentOutOfRangeException).FullName] = (left, right) => left < right;
- rules [typeof(DuplicateWaitObjectException).FullName] = (left, right) => left < right;
- }
-
- public override void VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
- {
- var parameters = objectCreateExpression.Arguments;
- if (parameters.Count != 2)
- return;
- var firstParam = parameters.FirstOrNullObject() as PrimitiveExpression;
- var secondParam = parameters.LastOrNullObject() as PrimitiveExpression;
- if (firstParam == null || !(firstParam.Value is string) ||
- secondParam == null || !(secondParam.Value is string))
- return;
- var type = context.Resolve(objectCreateExpression.Type) as TypeResolveResult;
- if (type == null)
- return;
- var leftLength = (firstParam.Value as string).Length;
- var rightLength = (secondParam.Value as string).Length;
-
- Func<int, int, bool> func;
- if (!rules.TryGetValue(type.Type.FullName, out func))
- return;
- if (!func(leftLength, rightLength))
- AddIssue(objectCreateExpression,
- context.TranslateString("The parameters are in the wrong order"),
- GetAction(objectCreateExpression, firstParam, secondParam));
- }
-
- CodeAction GetAction(ObjectCreateExpression objectCreateExpression,
- PrimitiveExpression firstParam, PrimitiveExpression secondParam)
- {
- return new CodeAction(context.TranslateString("Swap parameters"), script => {
- var newOCE = objectCreateExpression.Clone() as ObjectCreateExpression;
- newOCE.Arguments.Clear();
- newOCE.Arguments.Add(secondParam.Clone());
- newOCE.Arguments.Add(firstParam.Clone());
- script.Replace(objectCreateExpression, newOCE);
- }, objectCreateExpression);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IssueCategories.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IssueCategories.cs
index 6ac8d9d..ae5e2ad 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IssueCategories.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/IssueCategories.cs
@@ -1,43 +1,43 @@
-//
-// IssueCategories.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- public class IssueCategories
- {
- public const string Improvements = "Code Improvements";
- public const string CodeQualityIssues = "Code Quality Issues";
- public const string ConstraintViolations = "Constraint Violations";
- public const string Redundancies = "Redundancies";
- public const string Opportunities = "Language Usage Opportunities";
- public const string Notifications = "Code Notifications";
- public const string CompilerWarnings = "Compiler Warnings";
- public const string CompilerErrors = "Compiler Errors";
- }
-}
-
-
+//
+// IssueCategories.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.CSharp
+{
+ public class IssueCategories
+ {
+ public const string CodeQualityIssues = "Code Quality Issues";
+ public const string ConstraintViolations = "Constraint Violations";
+ public const string PracticesAndImprovements = "Common Practices and Code Improvements";
+ public const string Redundancies = "Redundancies";
+ public const string Opportunities = "Language Usage Opportunities";
+ public const string Notifications = "Code Notifications";
+ public const string CompilerWarnings = "Compiler Warnings";
+ public const string CompilerErrors = "Compiler Errors";
+ }
+}
+
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodNeverReturnsIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodNeverReturnsIssue.cs
deleted file mode 100644
index 357276b..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodNeverReturnsIssue.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// MethodNeverReturnsIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.CSharp.Analysis;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Method never returns",
- Description = "Method does not reach its end or a 'return' statement by any of possible execution paths.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class MethodNeverReturnsIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<MethodNeverReturnsIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
- {
- base.VisitMethodDeclaration (methodDeclaration);
-
- // partial method
- if (methodDeclaration.Body.IsNull)
- return;
-
- var reachability = ctx.CreateReachabilityAnalysis(methodDeclaration.Body);
- bool hasReachableReturn = false;
- foreach (var statement in reachability.ReachableStatements) {
- if (statement is ReturnStatement || statement is ThrowStatement || statement is YieldBreakStatement) {
- hasReachableReturn = true;
- break;
- }
- }
- if (!hasReachableReturn && !reachability.IsEndpointReachable(methodDeclaration.Body)) {
- AddIssue (methodDeclaration.NameToken,
- ctx.TranslateString ("Method never reaches its end or a 'return' statement."));
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodOverloadHidesOptionalParameterIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodOverloadHidesOptionalParameterIssue.cs
deleted file mode 100644
index 120f85a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MethodOverloadHidesOptionalParameterIssue.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// MethodOverloadHidesOptionalParameterIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Method with optional parameter is hidden by overload",
- Description = "Method with optional parameter is hidden by overload",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "MethodOverloadWithOptionalParameter")]
- public class MethodOverloadHidesOptionalParameterIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<MethodOverloadHidesOptionalParameterIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
- {
- base.VisitMethodDeclaration (methodDeclaration);
-
- var resolveResult = ctx.Resolve (methodDeclaration) as MemberResolveResult;
- if (resolveResult == null)
- return;
- var method = resolveResult.Member as IMethod;
- if (method == null)
- return;
-
- if (method.Parameters.Count == 0 || !method.Parameters.Last ().IsOptional)
- return;
-
- var overloads = method.DeclaringType.GetMethods(m => m.Name == method.Name && m.TypeParameters.Count == method.TypeParameters.Count)
- .ToArray ();
-
- var parameterNodes = methodDeclaration.Parameters.ToArray();
- var parameters = new List<IParameter> ();
- for (int i = 0; i < method.Parameters.Count; i++) {
- if (method.Parameters [i].IsOptional &&
- overloads.Any (m => ParameterListComparer.Instance.Equals (parameters, m.Parameters))) {
- AddIssue (parameterNodes [i].StartLocation, parameterNodes.Last ().EndLocation,
- ctx.TranslateString ("Method with optional parameter is hidden by overload"));
- break;
- }
- parameters.Add (method.Parameters [i]);
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MissingStringComparisonIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MissingStringComparisonIssue.cs
deleted file mode 100644
index d27a93a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MissingStringComparisonIssue.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// MissingStringComparisonIssue.cs
-//
-// Author:
-// Daniel Grunwald <daniel at danielgrunwald.de>
-//
-// Copyright (c) 2012 Daniel Grunwald
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Missing StringComparison argument",
- Description = "Warns when a culture-aware comparison is used by default.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning)]
- public class MissingStringComparisonIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<MissingStringComparisonIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx) : base(ctx)
- {
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- MemberReferenceExpression mre = invocationExpression.Target as MemberReferenceExpression;
- if (mre == null)
- return;
- switch (mre.MemberName) {
- case "StartsWith":
- case "EndsWith":
- if (invocationExpression.Arguments.Count != 1)
- return;
- break;
- case "IndexOf":
- case "LastIndexOf":
- break;
- default:
- return;
- }
-
- var rr = ctx.Resolve(invocationExpression) as InvocationResolveResult;
- if (rr == null || rr.IsError) {
- // Not an invocation resolve result - e.g. could be a UnknownMemberResolveResult instead
- return;
- }
- if (!(rr.Member.DeclaringTypeDefinition != null && rr.Member.DeclaringTypeDefinition.KnownTypeCode == KnownTypeCode.String)) {
- // Not a string operation
- return;
- }
- IParameter firstParameter = rr.Member.Parameters.FirstOrDefault();
- if (firstParameter == null || !firstParameter.Type.IsKnownType(KnownTypeCode.String))
- return; // First parameter not a string
- IParameter lastParameter = rr.Member.Parameters.Last();
- if (lastParameter.Type.Name == "StringComparison")
- return; // already specifying a string comparison
- AddIssue(invocationExpression.LParToken.StartLocation, invocationExpression.RParToken.EndLocation,
- mre.MemberName + "() call is missing StringComparison argument",
- new [] {
- new CodeAction("Use ordinal comparison", script => AddArgument(script, invocationExpression, "Ordinal"), invocationExpression),
- new CodeAction("Use culture-aware comparison", script => AddArgument(script, invocationExpression, "CurrentCulture"), invocationExpression)
- });
- }
-
- void AddArgument(Script script, InvocationExpression invocationExpression, string stringComparison)
- {
- var astBuilder = ctx.CreateTypeSytemAstBuilder(invocationExpression);
- var newArgument = astBuilder.ConvertType(new TopLevelTypeName("System", "StringComparison")).Member(stringComparison);
- var copy = (InvocationExpression)invocationExpression.Clone();
- copy.Arguments.Add(newArgument);
- script.Replace(invocationExpression, copy);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MultipleEnumerationIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MultipleEnumerationIssue.cs
deleted file mode 100644
index a866cc8..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/MultipleEnumerationIssue.cs
+++ /dev/null
@@ -1,365 +0,0 @@
-//
-// MultipleEnumerationIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Possible multiple enumeration of IEnumerable",
- Description = "Possible multiple enumeration of IEnumerable.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "PossibleNullReferenceException")]
- public class MultipleEnumerationIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class AnalysisStatementCollector : DepthFirstAstVisitor
- {
- List<Statement> statements;
- AstNode variableDecl;
-
- AnalysisStatementCollector (AstNode variableDecl)
- {
- this.variableDecl = variableDecl;
- }
-
- IList<Statement> GetStatements ()
- {
- if (statements != null)
- return statements;
-
- statements = new List<Statement> ();
- var parent = variableDecl.Parent;
- while (parent != null) {
- if (parent is BlockStatement || parent is MethodDeclaration ||
- parent is AnonymousMethodExpression || parent is LambdaExpression) {
- parent.AcceptVisitor (this);
- if (parent is BlockStatement)
- statements.Add ((BlockStatement)parent);
- break;
- }
- parent = parent.Parent;
- }
- return statements;
- }
-
- public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
- {
- statements.Add (methodDeclaration.Body);
-
- base.VisitMethodDeclaration (methodDeclaration);
- }
-
- public override void VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
- {
- statements.Add (anonymousMethodExpression.Body);
-
- base.VisitAnonymousMethodExpression (anonymousMethodExpression);
- }
-
- public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
- {
- var body = lambdaExpression.Body as BlockStatement;
- if (body != null)
- statements.Add (body);
-
- base.VisitLambdaExpression (lambdaExpression);
- }
-
- public static IList<Statement> Collect (AstNode variableDecl)
- {
- return new AnalysisStatementCollector (variableDecl).GetStatements ();
- }
- }
-
- class GatherVisitor : GatherVisitorBase<MultipleEnumerationIssue>
- {
- HashSet<AstNode> collectedAstNodes;
-
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- this.collectedAstNodes = new HashSet<AstNode> ();
- }
-
- void AddIssue (AstNode node)
- {
- if (collectedAstNodes.Add (node))
- AddIssue (node, ctx.TranslateString ("Possible multiple enumeration of IEnumerable"));
- }
-
- void AddIssues (IEnumerable<AstNode> nodes)
- {
- foreach (var node in nodes)
- AddIssue (node);
- }
-
- public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration (parameterDeclaration);
-
- var resolveResult = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
- CollectIssues (parameterDeclaration, parameterDeclaration.Parent, resolveResult);
- }
-
- public override void VisitVariableInitializer (VariableInitializer variableInitializer)
- {
- base.VisitVariableInitializer (variableInitializer);
-
- var resolveResult = ctx.Resolve (variableInitializer) as LocalResolveResult;
- CollectIssues (variableInitializer, variableInitializer.Parent.Parent, resolveResult);
- }
-
- static bool IsAssignment (AstNode node)
- {
- var assignment = node.Parent as AssignmentExpression;
- if (assignment != null)
- return assignment.Left == node;
-
- var direction = node.Parent as DirectionExpression;
- if (direction != null)
- return direction.FieldDirection == FieldDirection.Out && direction.Expression == node;
-
- return false;
- }
-
- bool IsEnumeration (AstNode node)
- {
- var foreachStatement = node.Parent as ForeachStatement;
- if (foreachStatement != null && foreachStatement.InExpression == node) {
- return true;
- }
-
- var memberRef = node.Parent as MemberReferenceExpression;
- if (memberRef != null && memberRef.Target == node) {
- var invocation = memberRef.Parent as InvocationExpression;
- if (invocation == null || invocation.Target != memberRef)
- return false;
-
- var methodGroup = ctx.Resolve (memberRef) as MethodGroupResolveResult;
- if (methodGroup == null)
- return false;
-
- var method = methodGroup.Methods.FirstOrDefault ();
- if (method != null) {
- var declaringTypeDef = method.DeclaringTypeDefinition;
- if (declaringTypeDef != null && declaringTypeDef.KnownTypeCode == KnownTypeCode.Object)
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- HashSet<AstNode> references;
- HashSet<Statement> refStatements;
- HashSet<LambdaExpression> lambdaExpressions;
-
- HashSet<VariableReferenceNode> visitedNodes;
- HashSet<VariableReferenceNode> collectedNodes;
- Dictionary<VariableReferenceNode, int> nodeDegree; // number of enumerations a node can reach
-
- void FindReferences (AstNode variableDecl, AstNode rootNode, IVariable variable)
- {
- references = new HashSet<AstNode> ();
- refStatements = new HashSet<Statement> ();
- lambdaExpressions = new HashSet<LambdaExpression> ();
-
- foreach (var result in ctx.FindReferences (rootNode, variable)) {
- var astNode = result.Node;
- if (astNode == variableDecl)
- continue;
-
- var parent = astNode.Parent;
- while (!(parent == null || parent is Statement || parent is LambdaExpression))
- parent = parent.Parent;
- if (parent == null)
- continue;
-
- // lambda expression with expression body, should be analyzed separately
- var expr = parent as LambdaExpression;
- if (expr != null) {
- if (IsAssignment (astNode) || IsEnumeration (astNode)) {
- references.Add (astNode);
- lambdaExpressions.Add (expr);
- }
- continue;
- }
-
- if (IsAssignment (astNode) || IsEnumeration (astNode)) {
- references.Add (astNode);
- var statement = (Statement)parent;
- refStatements.Add (statement);
- }
- }
- }
-
- void CollectIssues (AstNode variableDecl, AstNode rootNode, LocalResolveResult resolveResult)
- {
- if (resolveResult == null)
- return;
- var type = resolveResult.Type;
- var typeDef = type.GetDefinition ();
- if (typeDef == null ||
- (typeDef.KnownTypeCode != KnownTypeCode.IEnumerable &&
- typeDef.KnownTypeCode != KnownTypeCode.IEnumerableOfT))
- return;
-
- FindReferences (variableDecl, rootNode, resolveResult.Variable);
-
- var statements = AnalysisStatementCollector.Collect (variableDecl);
- var builder = new VariableReferenceGraphBuilder (ctx);
- foreach (var statement in statements) {
- var vrNode = builder.Build (statement, references, refStatements, ctx);
- FindMultipleEnumeration (vrNode);
- }
- foreach (var lambda in lambdaExpressions) {
- var vrNode = builder.Build (references, ctx.Resolver, (Expression)lambda.Body);
- FindMultipleEnumeration (vrNode);
- }
- }
-
- /// <summary>
- /// split references in the specified node into sub nodes according to the value they uses
- /// </summary>
- /// <param name="node">node to split</param>
- /// <returns>list of sub nodes</returns>
- static IList<VariableReferenceNode> SplitNode (VariableReferenceNode node)
- {
- var subNodes = new List<VariableReferenceNode> ();
- // find indices of all assignments in node and use them to split references
- var assignmentIndices = new List<int> { -1 };
- for (int i = 0; i < node.References.Count; i++) {
- if (IsAssignment (node.References [i]))
- assignmentIndices.Add (i);
- }
- assignmentIndices.Add (node.References.Count);
- for (int i = 0; i < assignmentIndices.Count - 1; i++) {
- var index1 = assignmentIndices [i];
- var index2 = assignmentIndices [i + 1];
- if (index1 + 1 >= index2)
- continue;
- var subNode = new VariableReferenceNode ();
- for (int refIndex = index1 + 1; refIndex < index2; refIndex++)
- subNode.References.Add (node.References [refIndex]);
- subNodes.Add (subNode);
- }
- if (subNodes.Count == 0)
- subNodes.Add (new VariableReferenceNode ());
-
- var firstNode = subNodes [0];
- foreach (var prevNode in node.PreviousNodes) {
- prevNode.NextNodes.Remove (node);
- // connect two nodes if the first ref is not an assignment
- if (firstNode.References.FirstOrDefault () == node.References.FirstOrDefault ())
- prevNode.NextNodes.Add (firstNode);
- }
-
- var lastNode = subNodes [subNodes.Count - 1];
- foreach (var nextNode in node.NextNodes) {
- nextNode.PreviousNodes.Remove (node);
- lastNode.AddNextNode (nextNode);
- }
-
- return subNodes;
- }
-
- /// <summary>
- /// convert a variable reference graph starting from the specified node to an assignment usage graph,
- /// in which nodes are connect if and only if they contains references using the same assigned value
- /// </summary>
- /// <param name="startNode">starting node of the variable reference graph</param>
- /// <returns>
- /// list of VariableReferenceNode, each of which is a starting node of a sub-graph in which references all
- /// use the same assigned value
- /// </returns>
- static IEnumerable<VariableReferenceNode> GetAssignmentUsageGraph (VariableReferenceNode startNode)
- {
- var graph = new List<VariableReferenceNode> ();
- var visited = new HashSet<VariableReferenceNode> ();
- var stack = new Stack<VariableReferenceNode> ();
- stack.Push (startNode);
- while (stack.Count > 0) {
- var node = stack.Pop ();
- if (!visited.Add (node))
- continue;
-
- var nodes = SplitNode (node);
- graph.AddRange (nodes);
- foreach (var addedNode in nodes)
- visited.Add (addedNode);
-
- foreach (var nextNode in nodes.Last ().NextNodes)
- stack.Push (nextNode);
- }
- return graph;
- }
-
- void FindMultipleEnumeration (VariableReferenceNode startNode)
- {
- var vrg = GetAssignmentUsageGraph (startNode);
- visitedNodes = new HashSet<VariableReferenceNode> ();
- collectedNodes = new HashSet<VariableReferenceNode> ();
-
- // degree of a node is the number of references that can be reached by the node
- nodeDegree = new Dictionary<VariableReferenceNode, int> ();
-
- foreach (var node in vrg) {
- if (node.References.Count == 0 || !visitedNodes.Add (node))
- continue;
- ProcessNode (node);
- if (nodeDegree [node] > 1)
- collectedNodes.Add (node);
- }
- foreach (var node in collectedNodes)
- AddIssues (node.References);
- }
-
- void ProcessNode (VariableReferenceNode node)
- {
- var degree = nodeDegree [node] = 0;
- foreach (var nextNode in node.NextNodes) {
- collectedNodes.Add (nextNode);
- if (visitedNodes.Add (nextNode))
- ProcessNode (nextNode);
- degree = Math.Max (degree, nodeDegree [nextNode]);
- }
- nodeDegree [node] = degree + node.References.Count;
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NegativeRelationalExpressionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NegativeRelationalExpressionIssue.cs
deleted file mode 100644
index 5acfc60..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NegativeRelationalExpressionIssue.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-//
-// NegativeRelationalExpressionIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Simplify negative relational expression",
- Description = "Simplify negative relational expression",
- Category = IssueCategories.Improvements,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.Underline)]
- public class NegativeRelationalExpressionIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<NegativeRelationalExpressionIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- bool IsFloatingPoint (AstNode node)
- {
- var typeDef = ctx.Resolve (node).Type.GetDefinition ();
- return typeDef != null &&
- (typeDef.KnownTypeCode == KnownTypeCode.Single || typeDef.KnownTypeCode == KnownTypeCode.Double);
- }
-
- public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
- {
- base.VisitUnaryOperatorExpression (unaryOperatorExpression);
-
- if (unaryOperatorExpression.Operator != UnaryOperatorType.Not)
- return;
-
- var expr = unaryOperatorExpression.Expression;
- while (expr != null && expr is ParenthesizedExpression)
- expr = ((ParenthesizedExpression)expr).Expression;
-
- var binaryOperatorExpr = expr as BinaryOperatorExpression;
- if (binaryOperatorExpr == null)
- return;
-
- var negatedOp = CSharpUtil.NegateRelationalOperator(binaryOperatorExpr.Operator);
- if (negatedOp == BinaryOperatorType.Any)
- return;
-
- if (IsFloatingPoint (binaryOperatorExpr.Left) || IsFloatingPoint (binaryOperatorExpr.Right)) {
- if (negatedOp != BinaryOperatorType.Equality && negatedOp != BinaryOperatorType.InEquality)
- return;
- }
-
- AddIssue (unaryOperatorExpression, ctx.TranslateString ("Simplify negative relational expression"),
- script => script.Replace (unaryOperatorExpression,
- new BinaryOperatorExpression (binaryOperatorExpr.Left.Clone (), negatedOp,
- binaryOperatorExpr.Right.Clone ())));
- }
-
- public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
- {
- if (operatorDeclaration.OperatorType.IsComparisonOperator()) {
- // Ignore operator declaration; within them it's common to define one operator
- // by negating another.
- return;
- }
- base.VisitOperatorDeclaration(operatorDeclaration);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NoDefaultConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NoDefaultConstructorIssue.cs
deleted file mode 100644
index ed32349..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NoDefaultConstructorIssue.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("CS1729: Base class does not contain a 0 argument constructor",
- Description = "CS1729: Base class does not contain a 0 argument constructor",
- Category = IssueCategories.CompilerErrors,
- Severity = Severity.Error,
- IssueMarker = IssueMarker.Underline)]
- public class NoDefaultConstructorIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- private class GatherVisitor : GatherVisitorBase<NoDefaultConstructorIssue>
- {
- private bool initializerInvoked;
- private ConstructorInitializer initializer;
-
- public GatherVisitor(BaseRefactoringContext context)
- : base(context)
- {
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration declaration)
- {
- var result = ctx.Resolve(declaration) as TypeResolveResult;
- var baseType = result.Type.DirectBaseTypes.FirstOrDefault(t => !t.IsKnownType(KnownTypeCode.Object) && t.Kind != TypeKind.Interface);
-
- if (baseType != null)
- {
- var baseConstructor = baseType.GetConstructors(c => c.Parameters.Count == 0).FirstOrDefault();
- var memberLookup = new MemberLookup(result.Type.GetDefinition(), ctx.Compilation.MainAssembly, false);
-
- if (baseConstructor == null || !memberLookup.IsAccessible(baseConstructor, true)) {
- var constructor = result.Type.GetConstructors(f => !f.IsSynthetic).FirstOrDefault();
-
- if (constructor == null) {
- // If there are no constructors declared then the base constructor isn't being invoked
- this.AddIssue(declaration, baseType);
- }
- }
- }
-
- base.VisitTypeDeclaration(declaration);
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration declaration)
- {
- var result = ctx.Resolve(declaration) as MemberResolveResult;
- if (result == null || result.IsError)
- return;
-
- var baseType = result.Member.DeclaringType.DirectBaseTypes.FirstOrDefault(t => !t.IsKnownType(KnownTypeCode.Object) && t.Kind != TypeKind.Interface);
-
- if (baseType != null) {
- var baseConstructor = baseType.GetConstructors(c => c.Parameters.Count == 0).FirstOrDefault();
- var memberLookup = new MemberLookup(result.Member.DeclaringType.GetDefinition(), ctx.Compilation.MainAssembly, false);
-
- if (baseConstructor == null || !memberLookup.IsAccessible(baseConstructor, true)) {
- this.initializerInvoked = false;
- this.initializer = null;
-
- base.VisitConstructorDeclaration(declaration);
-
- if (!this.initializerInvoked) {
- int argumentCount = initializer != null ? initializer.Arguments.Count : 0;
- this.AddIssue(declaration, baseType, argumentCount);
- }
- }
- }
- }
-
- public override void VisitConstructorInitializer(ConstructorInitializer initializer)
- {
- var result = ctx.Resolve(initializer);
-
- if (!result.IsError) {
- this.initializerInvoked = true;
- } else {
- this.initializer = initializer;
- }
- }
-
- private void AddIssue(AstNode node, IType baseType, int argumentCount = 0)
- {
- var identifier = node.GetChildByRole(Roles.Identifier);
- this.AddIssue(
- identifier,
- string.Format(ctx.TranslateString("CS1729: The type '{0}' does not contain a constructor that takes '{1}' arguments"), baseType.Name, argumentCount));
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotImplementedExceptionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotImplementedExceptionIssue.cs
deleted file mode 100644
index fbcaa6f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotImplementedExceptionIssue.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// NotImplementedExceptionInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// This inspector just shows that there is a not implemented exception. It doesn't offer a fix.
- /// Should only be shown in overview bar, no underlining.
- /// </summary>
- [IssueDescription("Show NotImplementedExceptions", Description="Shows NotImplementedException throws in the quick task bar.", Category = IssueCategories.Notifications, Severity = Severity.Suggestion, IssueMarker = IssueMarker.None)]
- public class NotImplementedExceptionIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<NotImplementedExceptionIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, NotImplementedExceptionIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- public override void VisitThrowStatement(ThrowStatement throwStatement)
- {
- var result = ctx.Resolve(throwStatement.Expression);
- if (result.Type.Equals(ctx.Compilation.FindType(typeof(System.NotImplementedException)))) {
- AddIssue(throwStatement, ctx.TranslateString("NotImplemented exception thrown"));
- }
-
- base.VisitThrowStatement(throwStatement);
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToClosureIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToClosureIssue.cs
new file mode 100644
index 0000000..c366aee
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToClosureIssue.cs
@@ -0,0 +1,319 @@
+//
+// AccessToClosureIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Analysis;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public abstract class AccessToClosureIssue : ICodeIssueProvider
+ {
+ ControlFlowGraphBuilder cfgBuilder = new ControlFlowGraphBuilder ();
+
+ public string Title
+ { get; private set; }
+
+ protected AccessToClosureIssue (string title)
+ {
+ Title = title;
+ }
+
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue> ();
+ return new GatherVisitor (context, unit, this).GetIssues ();
+ }
+
+ protected virtual bool IsTargetVariable (IVariable variable)
+ {
+ return true;
+ }
+
+ protected abstract NodeKind GetNodeKind (AstNode node);
+
+ protected virtual bool CanReachModification (ControlFlowNode node, Statement start,
+ IDictionary<Statement, IList<Node>> modifications)
+ {
+ return node.NextStatement != null && node.NextStatement != start &&
+ modifications.ContainsKey (node.NextStatement);
+ }
+
+ protected abstract IEnumerable<CodeAction> GetFixes (BaseRefactoringContext context, Node env,
+ string variableName);
+
+ #region GatherVisitor
+
+ class GatherVisitor : GatherVisitorBase<AccessToClosureIssue>
+ {
+ string title;
+
+ public GatherVisitor (BaseRefactoringContext context, SyntaxTree unit,
+ AccessToClosureIssue qualifierDirectiveEvidentIssueProvider)
+ : base (context, qualifierDirectiveEvidentIssueProvider)
+ {
+ this.title = context.TranslateString (qualifierDirectiveEvidentIssueProvider.Title);
+ }
+
+ public override void VisitVariableInitializer (VariableInitializer variableInitializer)
+ {
+ var variableDecl = variableInitializer.Parent as VariableDeclarationStatement;
+ if (variableDecl != null)
+ CheckVariable (((LocalResolveResult)ctx.Resolve (variableInitializer)).Variable,
+ variableDecl.GetParent<Statement> ());
+ base.VisitVariableInitializer (variableInitializer);
+ }
+
+ public override void VisitForeachStatement (ForeachStatement foreachStatement)
+ {
+ CheckVariable (((LocalResolveResult)ctx.Resolve (foreachStatement.VariableNameToken)).Variable,
+ foreachStatement);
+ base.VisitForeachStatement (foreachStatement);
+ }
+
+ public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
+ {
+ var parent = parameterDeclaration.Parent;
+ Statement body = null;
+ if (parent is MethodDeclaration) {
+ body = ((MethodDeclaration)parent).Body;
+ } else if (parent is AnonymousMethodExpression) {
+ body = ((AnonymousMethodExpression)parent).Body;
+ } else if (parent is LambdaExpression) {
+ body = ((LambdaExpression)parent).Body as Statement;
+ } else if (parent is ConstructorDeclaration) {
+ body = ((ConstructorDeclaration)parent).Body;
+ } else if (parent is OperatorDeclaration) {
+ body = ((OperatorDeclaration)parent).Body;
+ }
+ if (body != null) {
+ var lrr = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
+ if (lrr != null)
+ CheckVariable (lrr.Variable, body);
+ }
+ base.VisitParameterDeclaration (parameterDeclaration);
+ }
+
+ void CheckVariable(IVariable variable, Statement env)
+ {
+ if (!QualifierDirectiveEvidentIssueProvider.IsTargetVariable(variable))
+ return;
+
+ var root = new Environment (env, env);
+ var envLookup = new Dictionary<AstNode, Environment> ();
+ envLookup [env] = root;
+
+ foreach (var result in ctx.FindReferences(env, variable)) {
+ AddNode(envLookup, new Node(result.Node, QualifierDirectiveEvidentIssueProvider.GetNodeKind(result.Node)));
+ }
+
+ root.SortChildren ();
+ CollectIssues (root, variable.Name);
+ }
+
+ void CollectIssues (Environment env, string variableName)
+ {
+ IList<ControlFlowNode> cfg = null;
+ IDictionary<Statement, IList<Node>> modifications = null;
+
+ if (env.Body != null) {
+ cfg = QualifierDirectiveEvidentIssueProvider.cfgBuilder.BuildControlFlowGraph (env.Body);
+ modifications = new Dictionary<Statement, IList<Node>> ();
+ foreach (var node in env.Children) {
+ if (node.Kind == NodeKind.Modification || node.Kind == NodeKind.ReferenceAndModification) {
+ IList<Node> nodes;
+ if (!modifications.TryGetValue (node.ContainingStatement, out nodes))
+ modifications [node.ContainingStatement] = nodes = new List<Node> ();
+ nodes.Add (node);
+ }
+ }
+ }
+
+ foreach (var child in env.GetChildEnvironments ()) {
+ if (!child.IssueCollected && cfg != null &&
+ CanReachModification (cfg, child, modifications))
+ CollectAllIssues (child, variableName);
+
+ CollectIssues (child, variableName);
+ }
+ }
+
+ void CollectAllIssues (Environment env, string variableName)
+ {
+ var fixes = QualifierDirectiveEvidentIssueProvider.GetFixes (ctx, env, variableName).ToArray ();
+ env.IssueCollected = true;
+
+ foreach (var child in env.Children) {
+ if (child is Environment) {
+ CollectAllIssues ((Environment)child, variableName);
+ } else {
+ if (child.Kind != NodeKind.Modification)
+ AddIssue (child.AstNode, title, fixes);
+ // stop marking references after the variable is modified in current environment
+ if (child.Kind != NodeKind.Reference)
+ break;
+ }
+ }
+ }
+
+ void AddNode (IDictionary<AstNode, Environment> envLookup, Node node)
+ {
+ var astParent = node.AstNode.Parent;
+ var path = new List<AstNode> ();
+ while (astParent != null) {
+ Environment parent;
+ if (envLookup.TryGetValue (astParent, out parent)) {
+ parent.Children.Add (node);
+ return;
+ }
+
+ if (astParent is LambdaExpression) {
+ parent = new Environment (astParent, ((LambdaExpression)astParent).Body as Statement);
+ } else if (astParent is AnonymousMethodExpression) {
+ parent = new Environment (astParent, ((AnonymousMethodExpression)astParent).Body);
+ }
+
+ path.Add (astParent);
+ if (parent != null) {
+ foreach (var astNode in path)
+ envLookup [astNode] = parent;
+ path.Clear ();
+
+ parent.Children.Add (node);
+ node = parent;
+ }
+ astParent = astParent.Parent;
+ }
+ }
+
+ bool CanReachModification (IEnumerable<ControlFlowNode> cfg, Environment env,
+ IDictionary<Statement, IList<Node>> modifications)
+ {
+ if (modifications.Count == 0)
+ return false;
+
+ var start = env.ContainingStatement;
+ if (modifications.ContainsKey (start) &&
+ modifications [start].Any (v => v.AstNode.StartLocation > env.AstNode.EndLocation))
+ return true;
+
+ var stack = new Stack<ControlFlowNode> (cfg.Where (node => node.NextStatement == start));
+ var visitedNodes = new HashSet<ControlFlowNode> (stack);
+ while (stack.Count > 0) {
+ var node = stack.Pop ();
+ if (QualifierDirectiveEvidentIssueProvider.CanReachModification (node, start, modifications))
+ return true;
+ foreach (var edge in node.Outgoing) {
+ if (visitedNodes.Add (edge.To))
+ stack.Push (edge.To);
+ }
+ }
+ return false;
+ }
+
+ }
+
+ #endregion
+
+ #region Node
+
+ protected enum NodeKind
+ {
+ Reference,
+ Modification,
+ ReferenceAndModification,
+ Environment,
+ }
+
+ protected class Node
+ {
+ public AstNode AstNode
+ { get; private set; }
+
+ public NodeKind Kind
+ { get; private set; }
+
+ public Statement ContainingStatement
+ { get; private set; }
+
+ public Node (AstNode astNode, NodeKind kind)
+ {
+ AstNode = astNode;
+ Kind = kind;
+ ContainingStatement = astNode.GetParent<Statement> ();
+ }
+
+ public virtual IEnumerable<Node> GetAllReferences ()
+ {
+ yield return this;
+ }
+ }
+
+ protected class Environment : Node
+ {
+ public Statement Body
+ { get; private set; }
+
+ public bool IssueCollected
+ { get; set; }
+
+ public List<Node> Children
+ { get; private set; }
+
+ public Environment (AstNode astNode, Statement body)
+ : base (astNode, NodeKind.Environment)
+ {
+ Body = body;
+ Children = new List<Node> ();
+ }
+
+ public override IEnumerable<Node> GetAllReferences ()
+ {
+ return Children.SelectMany (child => child.GetAllReferences ());
+ }
+
+ public IEnumerable<Environment> GetChildEnvironments ()
+ {
+ return from child in Children
+ where child is Environment
+ select (Environment)child;
+ }
+
+ public void SortChildren ()
+ {
+ Children.Sort ((x, y) => x.AstNode.StartLocation.CompareTo(y.AstNode.StartLocation));
+ foreach (var env in GetChildEnvironments ())
+ env.SortChildren ();
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToDisposedClosureIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToDisposedClosureIssue.cs
similarity index 100%
rename from external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToDisposedClosureIssue.cs
rename to external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToDisposedClosureIssue.cs
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToModifiedClosureIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToModifiedClosureIssue.cs
similarity index 100%
rename from external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/AccessToModifiedClosureIssue.cs
rename to external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/AccessToModifiedClosureIssue.cs
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/LocalVariableNamePicker.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/LocalVariableNamePicker.cs
similarity index 100%
rename from external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/AccessToClosureIssues/LocalVariableNamePicker.cs
rename to external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/AccessToClosureIssues/LocalVariableNamePicker.cs
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ConvertToStaticMethodIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ConvertToStaticMethodIssue.cs
new file mode 100644
index 0000000..bccb5dc
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ConvertToStaticMethodIssue.cs
@@ -0,0 +1,139 @@
+//
+// ConvertToStaticMethodIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Refactoring.ExtractMethod;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Make this method static",
+ Description = "This method doesn't use any instance members so it can be made static",
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.Underline)]
+ public class ConvertToStaticMethodIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ private class GatherVisitor : GatherVisitorBase<ConvertToStaticMethodIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context)
+ : base(context)
+ {
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ var rr = ctx.Resolve(typeDeclaration);
+ if (rr.Type.GetNonInterfaceBaseTypes().Any(t => t.Name == "MarshalByRefObject" && t.Namespace == "System"))
+ return; // ignore MarshalByRefObject, as only instance method calls get marshaled
+
+ base.VisitTypeDeclaration(typeDeclaration);
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ var context = ctx;
+ if (methodDeclaration.HasModifier(Modifiers.Static) ||
+ methodDeclaration.HasModifier(Modifiers.Virtual) ||
+ methodDeclaration.HasModifier(Modifiers.Override) ||
+ methodDeclaration.HasModifier(Modifiers.New) ||
+ methodDeclaration.Attributes.Any())
+ return;
+
+ var body = methodDeclaration.Body;
+ // skip empty methods
+ if (!body.Statements.Any())
+ return;
+
+ if (body.Statements.Count == 1) {
+ if (body.Statements.First () is ThrowStatement)
+ return;
+ }
+
+ var resolved = context.Resolve(methodDeclaration) as MemberResolveResult;
+ if (resolved == null)
+ return;
+
+ var isImplementingInterface = resolved.Member.ImplementedInterfaceMembers.Any();
+ if (isImplementingInterface)
+ return;
+
+ if (StaticVisitor.UsesNotStaticMember(context, body))
+ return;
+
+ AddIssue(methodDeclaration.NameToken.StartLocation, methodDeclaration.NameToken.EndLocation,
+ context.TranslateString(string.Format("Make '{0}' static", methodDeclaration.Name)),
+ script => ExecuteScriptToFixStaticMethodIssue(script, context, methodDeclaration));
+ }
+
+ static void ExecuteScriptToFixStaticMethodIssue(Script script,
+ BaseRefactoringContext context,
+ AstNode methodDeclaration)
+ {
+ var clonedDeclaration = (MethodDeclaration)methodDeclaration.Clone();
+ clonedDeclaration.Modifiers |= Modifiers.Static;
+ script.Replace(methodDeclaration, clonedDeclaration);
+ var rr = context.Resolve(methodDeclaration) as MemberResolveResult;
+ //var method = (IMethod)rr.Member;
+ //method.ImplementedInterfaceMembers.Any(m => methodGroupResolveResult.Methods.Contains((IMethod)m));
+
+ /*script.DoGlobalOperationOn(rr.Member,
+ (fctx, fscript, fnode) => {
+ DoStaticMethodGlobalOperation(fnode, fctx, rr, fscript); });*/
+ }
+
+ static void DoStaticMethodGlobalOperation(AstNode fnode, RefactoringContext fctx, MemberResolveResult rr,
+ Script fscript)
+ {
+ if (fnode is MemberReferenceExpression) {
+ var memberReference = new MemberReferenceExpression(
+ new TypeReferenceExpression(fctx.CreateShortType(rr.Member.DeclaringType)),
+ rr.Member.Name
+ );
+ fscript.Replace(fnode, memberReference);
+ } else {
+ var invoke = fnode as InvocationExpression;
+ if (invoke == null)
+ return;
+ if ((invoke.Target is MemberReferenceExpression))
+ return;
+ var memberReference = new MemberReferenceExpression(
+ new TypeReferenceExpression(fctx.CreateShortType(rr.Member.DeclaringType)),
+ rr.Member.Name
+ );
+ fscript.Replace(invoke.Target, memberReference);
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/DuplicateBodyMethodIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/DuplicateBodyMethodIssue.cs
new file mode 100644
index 0000000..0cbb25f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/DuplicateBodyMethodIssue.cs
@@ -0,0 +1,176 @@
+//
+// DuplicateBodyMethodIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using System.Text;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+// [IssueDescription("Methods have duplicate body",
+// Description = "One method has the same body as other method",
+// Severity = Severity.Hint,
+// IssueMarker = IssueMarker.Underline)]
+ public class DuplicateBodyMethodIssue : ICodeIssueProvider
+ {
+ #region ICodeIssueProvider implementation
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var visitor = new GatherVisitor(context);
+ visitor.GetMethods();
+ visitor.ComputeConflicts();
+ return visitor.GetIssues();
+ }
+ #endregion
+
+ private class GatherVisitor : GatherVisitorBase<DuplicateBodyMethodIssue>
+ {
+ public List<MethodDeclaration> DeclaredMethods;
+
+ public GatherVisitor(BaseRefactoringContext context)
+ : base(context)
+ {
+ DeclaredMethods = new List<MethodDeclaration>();
+ }
+
+ static string GetMethodDescriptor(MethodDeclaration methodDeclaration)
+ {
+ var sb = new StringBuilder();
+ sb.Append(methodDeclaration.ReturnType);
+ sb.Append(";");
+ foreach (var parameter in methodDeclaration.Parameters) {
+ sb.AppendFormat("{0}:{1};", parameter.Name, parameter.Type);
+ }
+ sb.Append(methodDeclaration.Modifiers);
+ return sb.ToString();
+ }
+
+ public void GetMethods()
+ {
+ ctx.RootNode.AcceptVisitor(this);
+ }
+
+ internal void ComputeConflicts()
+ {
+ var dict = new Dictionary<string, List<MethodDeclaration>>();
+ foreach (var declaredMethod in DeclaredMethods) {
+ var methodDescriptor = GetMethodDescriptor(declaredMethod);
+ List<MethodDeclaration> listMethods;
+ if (!dict.TryGetValue(methodDescriptor, out listMethods)) {
+ listMethods = new List<MethodDeclaration>();
+ dict [methodDescriptor] = listMethods;
+ }
+ listMethods.Add(declaredMethod);
+ }
+ DeclaredMethods.Clear();
+
+ foreach (var list in dict.Values.Where(list => list.Count >= 2)) {
+ for (var i = 0; i < list.Count - 1; i++) {
+ var firstMethod = list [i];
+ for (var j = i + 1; j < list.Count; j++) {
+ var secondMethod = list [j];
+ if (firstMethod.Body.IsMatch(secondMethod.Body)) {
+ AddIssue(secondMethod.NameToken,
+ string.Format("Method '{0}' has the same with '{1}' ", secondMethod.Name,
+ firstMethod.Name),
+ script => {
+ InvokeMethod(script, firstMethod, secondMethod); }
+ );
+ }
+ }
+ }
+ }
+ }
+
+ readonly InsertParenthesesVisitor _insertParenthesesVisitor = new InsertParenthesesVisitor();
+ private TypeDeclaration _parentType;
+
+ private void InvokeMethod(Script script, MethodDeclaration firstMethod, MethodDeclaration secondMethod)
+ {
+ var statement =
+ new ExpressionStatement(new InvocationExpression(new IdentifierExpression(firstMethod.Name),
+ firstMethod.Parameters.Select(
+ declaration =>
+ GetArgumentExpression(declaration).Clone())));
+ statement.AcceptVisitor(_insertParenthesesVisitor);
+ if (firstMethod.ReturnType.ToString() != "System.Void") {
+ var returnStatement = new ReturnStatement(statement.Expression.Clone());
+
+ script.Replace(secondMethod.Body, new BlockStatement { returnStatement });
+ } else {
+ script.Replace(secondMethod.Body, new BlockStatement { statement });
+ }
+ }
+
+ static Expression GetArgumentExpression(ParameterDeclaration parameter)
+ {
+ var identifierExpr = new IdentifierExpression(parameter.Name);
+ switch (parameter.ParameterModifier) {
+ case ParameterModifier.Out:
+ return new DirectionExpression(FieldDirection.Out, identifierExpr);
+ case ParameterModifier.Ref:
+ return new DirectionExpression(FieldDirection.Ref, identifierExpr);
+ }
+ return identifierExpr;
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration declaration)
+ {
+ var context = ctx;
+ var methodDeclaration = declaration;
+
+ var resolved = context.Resolve(methodDeclaration) as MemberResolveResult;
+ if (resolved == null)
+ return;
+ var isImplementingInterface = resolved.Member.ImplementedInterfaceMembers.Any();
+
+ if (isImplementingInterface)
+ return;
+ if (declaration.Body.IsNull)
+ return;
+ var parentType = declaration.Parent as TypeDeclaration;
+ if (parentType == null)
+ return;
+ if (_parentType == null)
+ _parentType = parentType;
+ else {
+ //if we are here, it means that we switched from one class to another, so it means that we should compute
+ //the duplicates up-to now, then reset the list of methods
+ if (parentType != _parentType) {
+ ComputeConflicts();
+ DeclaredMethods.Add(declaration);
+ _parentType = parentType;
+ return;
+ }
+ }
+
+ DeclaredMethods.Add(declaration);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ParameterCanBeIEnumerableIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ParameterCanBeIEnumerableIssue.cs
new file mode 100644
index 0000000..fb7f933
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/ParameterCanBeIEnumerableIssue.cs
@@ -0,0 +1,156 @@
+//
+// ParameterCanBeIEnumerableIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+// Does this even make sense ? We've a parameter can be demoted issue which does mostly the same.
+// [IssueDescription("A parameter can IEnumerable/ICollection/IList<T>",
+// Description = "Finds parameters that can be demoted to a generic list.",
+// Category = IssueCategories.Opportunities,
+// Severity = Severity.Suggestion
+// )]
+ public class ParameterCanBeIEnumerableIssue : ICodeIssueProvider
+ {
+ readonly bool tryResolve;
+
+ public ParameterCanBeIEnumerableIssue() : this (true)
+ {
+ }
+
+ public ParameterCanBeIEnumerableIssue(bool tryResolve)
+ {
+ this.tryResolve = tryResolve;
+ }
+
+ #region ICodeIssueProvider implementation
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var gatherer = new GatherVisitor(context, tryResolve);
+ var issues = gatherer.GetIssues();
+ return issues;
+ }
+ #endregion
+
+ class GatherVisitor : GatherVisitorBase<ParameterCanBeIEnumerableIssue>
+ {
+ bool tryResolve;
+
+ public GatherVisitor(BaseRefactoringContext context, bool tryResolve) : base (context)
+ {
+ this.tryResolve = tryResolve;
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ methodDeclaration.Attributes.AcceptVisitor(this);
+ if (HasEntryPointSignature(methodDeclaration))
+ return;
+ var eligibleParameters = methodDeclaration.Parameters
+ .Where(p => p.ParameterModifier != ParameterModifier.Out && p.ParameterModifier != ParameterModifier.Ref)
+ .ToList();
+ if (eligibleParameters.Count == 0)
+ return;
+ var declarationResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
+ if (declarationResolveResult == null)
+ return;
+ var member = declarationResolveResult.Member;
+ if (member.IsOverride || member.IsOverridable || member.ImplementedInterfaceMembers.Any())
+ return;
+
+ var collector = new TypeCriteriaCollector(ctx);
+ methodDeclaration.AcceptVisitor(collector);
+
+ foreach (var parameter in eligibleParameters) {
+ ProcessParameter(parameter, methodDeclaration.Body, collector);
+ }
+ }
+
+ bool HasEntryPointSignature(MethodDeclaration methodDeclaration)
+ {
+ if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Static))
+ return false;
+ var returnType = ctx.Resolve(methodDeclaration.ReturnType).Type;
+ if (!returnType.IsKnownType(KnownTypeCode.Int32) && !returnType.IsKnownType(KnownTypeCode.Void))
+ return false;
+ var parameterCount = methodDeclaration.Parameters.Count;
+ if (parameterCount == 0)
+ return true;
+ if (parameterCount != 1)
+ return false;
+ var parameterType = ctx.Resolve(methodDeclaration.Parameters.First()).Type as ArrayType;
+ return parameterType != null && parameterType.ElementType.IsKnownType(KnownTypeCode.String);
+ }
+
+ void ProcessParameter(ParameterDeclaration parameter, AstNode rootResolutionNode, TypeCriteriaCollector collector)
+ {
+ var localResolveResult = ctx.Resolve(parameter) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+ var variable = localResolveResult.Variable;
+ var typeKind = variable.Type.Kind;
+ if (!(typeKind == TypeKind.Class ||
+ typeKind == TypeKind.Struct ||
+ typeKind == TypeKind.Interface ||
+ typeKind == TypeKind.Array) ||
+ !collector.UsedVariables.Contains(variable))
+ {
+ return;
+ }
+
+ var candidateTypes = localResolveResult.Type.GetAllBaseTypes()
+ .Where(t => t.IsParameterized)
+ .ToList();
+
+ var validTypes =
+ (from type in candidateTypes
+ where !tryResolve || ParameterCanBeDemotedIssue.TypeChangeResolvesCorrectly(ctx, parameter, rootResolutionNode, type)
+ select type).ToList();
+ if (!validTypes.Any()) return;
+
+ var foundType = validTypes.FirstOrDefault();
+ if (foundType == null)
+ return;
+
+ AddIssue(parameter.NameToken, string.Format(ctx.TranslateString("Parameter can be {0}"),
+ foundType.Name),
+ script => script.Replace(parameter.Type, CreateShortType(ctx, foundType, parameter)));
+ }
+
+ public static AstType CreateShortType(BaseRefactoringContext refactoringContext, IType expressionType, AstNode node)
+ {
+
+ var csResolver = refactoringContext.Resolver.GetResolverStateBefore(node);
+ var builder = new TypeSystemAstBuilder(csResolver);
+ return builder.ConvertType(expressionType);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/VariableDeclaredInWideScopeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/VariableDeclaredInWideScopeIssue.cs
new file mode 100644
index 0000000..c38330e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/NotWorking/VariableDeclaredInWideScopeIssue.cs
@@ -0,0 +1,383 @@
+//
+// VariableDeclaredWideScopeIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using System.Linq;
+using System;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+// [IssueDescription("The variable can be declared in a nested scope",
+// Description = "Highlights variables that can be declared in a nested scope.",
+// Category = IssueCategories.Opportunities,
+// Severity = Severity.Suggestion)]
+ public class VariableDeclaredInWideScopeIssue : ICodeIssueProvider
+ {
+ #region ICodeIssueProvider implementation
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+ #endregion
+
+ class GatherVisitor : GatherVisitorBase<VariableDeclaredInWideScopeIssue>
+ {
+ readonly BaseRefactoringContext context;
+
+ public GatherVisitor(BaseRefactoringContext context, VariableDeclaredInWideScopeIssue qualifierDirectiveEvidentIssueProvider) : base (context, qualifierDirectiveEvidentIssueProvider)
+ {
+ this.context = context;
+ }
+
+ static readonly IList<Type> moveTargetBlacklist = new List<Type> {
+ typeof(WhileStatement),
+ typeof(ForeachStatement),
+ typeof(ForStatement),
+ typeof(DoWhileStatement),
+ typeof(TryCatchStatement),
+ typeof(AnonymousMethodExpression),
+ typeof(LambdaExpression),
+ typeof(LockStatement)
+ };
+
+ class CheckInitializer : DepthFirstAstVisitor
+ {
+ public bool IsValid {
+ get;
+ private set;
+ }
+
+ public CheckInitializer()
+ {
+ IsValid = true;
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+ IsValid = false;
+ }
+ }
+
+ bool CheckForInvocations(Expression initializer)
+ {
+ var visitor = new CheckInitializer();
+ initializer.AcceptVisitor(visitor);
+ return visitor.IsValid;
+ }
+
+ public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
+ {
+ base.VisitVariableDeclarationStatement(variableDeclarationStatement);
+
+ var rootNode = variableDeclarationStatement.Parent as BlockStatement;
+ if (rootNode == null)
+ // We are somewhere weird, like a the ResourceAquisition of a using statement
+ return;
+
+ // TODO: Handle declarations with more than one variable?
+ if (variableDeclarationStatement.Variables.Count > 1)
+ return;
+
+ var variableInitializer = variableDeclarationStatement.Variables.First();
+ var identifiers = GetIdentifiers(rootNode.Descendants, variableInitializer.Name).ToList();
+
+ if (identifiers.Count == 0)
+ // variable is not used
+ return;
+
+ if (!CheckForInvocations(variableInitializer.Initializer))
+ return;
+
+ AstNode deepestCommonAncestor = GetDeepestCommonAncestor(rootNode, identifiers);
+ var path = GetPath(rootNode, deepestCommonAncestor);
+
+ // The node that will follow the moved declaration statement
+ AstNode anchorNode = GetInitialAnchorNode(rootNode, identifiers, path);
+
+ // Restrict path to only those where the initializer has not changed
+ var pathToCheck = path.Skip(1).ToList();
+ var firstInitializerChangeNode = GetFirstInitializerChange(variableDeclarationStatement, pathToCheck, variableInitializer.Initializer);
+ if (firstInitializerChangeNode != null) {
+ // The node changing the initializer expression may not be on the path
+ // to the actual usages of the variable, so we need to merge the paths
+ // so we get the part of the paths that are common between them
+ var pathToChange = GetPath(rootNode, firstInitializerChangeNode);
+ var deepestCommonIndex = GetLowestCommonAncestorIndex(path, pathToChange);
+ anchorNode = pathToChange [deepestCommonIndex + 1];
+ path = pathToChange.Take(deepestCommonIndex).ToList();
+ }
+
+ // Restrict to locations outside of blacklisted node types
+ var firstBlackListedNode = path.Where(node => moveTargetBlacklist.Contains(node.GetType())).FirstOrDefault();
+ if (firstBlackListedNode != null) {
+ path = GetPath(rootNode, firstBlackListedNode.Parent);
+ anchorNode = firstBlackListedNode;
+ }
+
+ anchorNode = GetInsertionPoint(anchorNode);
+
+ if (anchorNode != null && anchorNode != rootNode && anchorNode.Parent != rootNode) {
+ AddIssue(variableDeclarationStatement, context.TranslateString("Variable could be moved to a nested scope"),
+ GetActions(variableDeclarationStatement, (Statement)anchorNode));
+ }
+ }
+
+ static bool IsBannedInsertionPoint(AstNode anchorNode)
+ {
+ var parent = anchorNode.Parent;
+
+ // Don't split 'else if ...' into else { if ... }
+ if (parent is IfElseStatement && anchorNode is IfElseStatement)
+ return true;
+ // Don't allow moving the declaration into the resource aquisition of a using statement
+ if (parent is UsingStatement)
+ return true;
+ // Don't allow moving things into arbitrary positions of for statements
+ if (parent is ForStatement && anchorNode.Role != Roles.EmbeddedStatement)
+ return true;
+ return false;
+ }
+
+ static AstNode GetInsertionPoint(AstNode node)
+ {
+ while (true) {
+ if (node == null)
+ break;
+ if (node is Statement && !IsBannedInsertionPoint(node))
+ break;
+ node = node.Parent;
+ }
+ return node;
+ }
+
+ AstNode GetInitialAnchorNode (BlockStatement rootNode, List<IdentifierExpression> identifiers, IList<AstNode> path)
+ {
+ if (identifiers.Count > 1) {
+ // Assume the first identifier is the first in the execution flow
+ // firstPath will always be longer than path since path is the
+ // combination of a least two (different) paths.
+ var firstPath = GetPath(rootNode, identifiers [0]);
+ if (firstPath [path.Count].Role == IfElseStatement.TrueRole) {
+ // IfElseStatement has a slightly weird structure; Don't
+ // consider the true role eligible for anchor node in this case
+ return firstPath [path.Count - 1];
+ }
+ return firstPath [path.Count];
+ }
+ // We only have one path, and a statement in itself cannot be an identifier
+ // so we're safe
+ return path [path.Count - 1];
+ }
+
+ static IEnumerable<IdentifierExpression> GetIdentifiers(IEnumerable<AstNode> candidates, string name = null)
+ {
+ return
+ from node in candidates
+ let identifier = node as IdentifierExpression
+ where identifier != null && (name == null || identifier.Identifier == name)
+ select identifier;
+ }
+
+ AstNode GetFirstInitializerChange(AstNode variableDeclarationStatement, IList<AstNode> path, Expression initializer)
+ {
+ var identifiers = GetIdentifiers(initializer.DescendantsAndSelf).ToList();
+ var mayChangeInitializer = GetChecker (initializer, identifiers);
+ AstNode lastChange = null;
+ for (int i = path.Count - 1; i >= 0; i--) {
+ for (AstNode node = path[i].PrevSibling; node != null && node != variableDeclarationStatement; node = node.PrevSibling) {
+ // Special case for IfElseStatement: The AST nesting does not match the scope nesting, so
+ // don't handle branches here: The correct one has already been checked anyway.
+ // This also works to our advantage: No special checking is needed for the condition since
+ // it is a the same level in the tree as the false branch
+ if (node.Role == IfElseStatement.TrueRole || node.Role == IfElseStatement.FalseRole)
+ continue;
+ foreach (var expression in node.DescendantsAndSelf.Where(n => n is Expression).Cast<Expression>()) {
+ if (mayChangeInitializer(expression)) {
+ lastChange = expression;
+ }
+ }
+ }
+ }
+ return lastChange;
+ }
+
+ Func<Expression, bool> GetChecker(Expression expression, IList<IdentifierExpression> identifiers)
+ {
+ // TODO: This only works for simple cases.
+ IList<IMember> members;
+ IList<IVariable> locals;
+ var identifierResolveResults = identifiers.Select(identifier => context.Resolve(identifier)).ToList();
+ SplitResolveResults(identifierResolveResults, out members, out locals);
+
+ if (expression is InvocationExpression || expression is ObjectCreateExpression) {
+ return node => {
+ if (node is InvocationExpression || node is ObjectCreateExpression)
+ // We don't know what these might do, so assume it will change the initializer
+ return true;
+ var binaryOperator = node as BinaryOperatorExpression;
+ if (binaryOperator != null) {
+ var resolveResult = context.Resolve(binaryOperator) as OperatorResolveResult;
+ if (resolveResult == null)
+ return false;
+ // Built-in operators are ok, user defined ones not so much
+ return resolveResult.UserDefinedOperatorMethod != null;
+ }
+ return IsConflictingAssignment(node, identifiers, members, locals);
+ };
+ } else if (expression is IdentifierExpression) {
+ var initializerDependsOnMembers = identifierResolveResults.Any(result => result is MemberResolveResult);
+ var initializerDependsOnReferenceType = identifierResolveResults.Any(result => result.Type.IsReferenceType == true);
+ return node => {
+ if ((node is InvocationExpression || node is ObjectCreateExpression) &&
+ (initializerDependsOnMembers || initializerDependsOnReferenceType))
+ // Anything can happen...
+ return true;
+ var binaryOperator = node as BinaryOperatorExpression;
+ if (binaryOperator != null) {
+ var resolveResult = context.Resolve(binaryOperator) as OperatorResolveResult;
+ if (resolveResult == null)
+ return false;
+ return resolveResult.UserDefinedOperatorMethod != null;
+ }
+ return IsConflictingAssignment(node, identifiers, members, locals);
+ };
+ }
+
+ return node => false;
+ }
+
+ bool IsConflictingAssignment (Expression node, IList<IdentifierExpression> identifiers, IList<IMember> members, IList<IVariable> locals)
+ {
+ var assignmentExpression = node as AssignmentExpression;
+ if (assignmentExpression != null) {
+ IList<IMember> targetMembers;
+ IList<IVariable> targetLocals;
+ var identifierResolveResults = identifiers.Select(identifier => context.Resolve(identifier)).ToList();
+ SplitResolveResults(identifierResolveResults, out targetMembers, out targetLocals);
+
+ return members.Any(member => targetMembers.Contains(member)) ||
+ locals.Any(local => targetLocals.Contains(local));
+ }
+ return false;
+ }
+
+ static void SplitResolveResults(List<ResolveResult> identifierResolveResults, out IList<IMember> members, out IList<IVariable> locals)
+ {
+ members = new List<IMember>();
+ locals = new List<IVariable>();
+ foreach (var resolveResult in identifierResolveResults) {
+ var memberResolveResult = resolveResult as MemberResolveResult;
+ if (memberResolveResult != null) {
+ members.Add(memberResolveResult.Member);
+ }
+ var localResolveResult = resolveResult as LocalResolveResult;
+ if (localResolveResult != null) {
+ locals.Add(localResolveResult.Variable);
+ }
+ }
+ }
+
+ bool IsScopeContainer(AstNode node)
+ {
+ if (node == null)
+ return false;
+
+ var blockStatement = node as BlockStatement;
+ if (blockStatement != null)
+ return true;
+
+ var statement = node as Statement;
+ if (statement == null)
+ return false;
+
+ var role = node.Role;
+ if (role == Roles.EmbeddedStatement ||
+ role == IfElseStatement.TrueRole ||
+ role == IfElseStatement.FalseRole) {
+ return true;
+ }
+ return false;
+ }
+
+ IEnumerable<CodeAction> GetActions(Statement oldStatement, Statement followingStatement)
+ {
+ yield return new CodeAction(context.TranslateString("Move to nested scope"), script => {
+ var parent = followingStatement.Parent;
+ if (parent is SwitchSection || parent is BlockStatement) {
+ script.InsertBefore(followingStatement, oldStatement.Clone());
+ } else {
+ var newBlockStatement = new BlockStatement {
+ Statements = {
+ oldStatement.Clone(),
+ followingStatement.Clone()
+ }
+ };
+ script.Replace(followingStatement, newBlockStatement);
+ script.FormatText(parent);
+ }
+ script.Remove(oldStatement);
+ }, oldStatement);
+ }
+
+ AstNode GetDeepestCommonAncestor(AstNode assumedRoot, IEnumerable<AstNode> leaves)
+ {
+ var previousPath = GetPath(assumedRoot, leaves.First());
+ int lowestIndex = previousPath.Count - 1;
+ foreach (var leaf in leaves.Skip(1)) {
+ var currentPath = GetPath(assumedRoot, leaf);
+ lowestIndex = GetLowestCommonAncestorIndex(previousPath, currentPath, lowestIndex);
+ previousPath = currentPath;
+ }
+ return previousPath [lowestIndex];
+ }
+
+ int GetLowestCommonAncestorIndex(IList<AstNode> path1, IList<AstNode> path2, int maxIndex = int.MaxValue)
+ {
+ var max = Math.Min(Math.Min(path1.Count, path2.Count), maxIndex);
+ for (int i = 0; i <= max; i++) {
+ if (path1 [i] != path2 [i])
+ return i - 1;
+ }
+ return max;
+ }
+
+ IList<AstNode> GetPath(AstNode from, AstNode to)
+ {
+ var reversePath = new List<AstNode>();
+ do {
+ reversePath.Add(to);
+ to = to.Parent;
+ } while (to != from.Parent);
+ reversePath.Reverse();
+ return reversePath;
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs
deleted file mode 100644
index ba171f5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/OptionalParameterCouldBeSkippedIssue.cs
+++ /dev/null
@@ -1,173 +0,0 @@
-//
-// OptionalParameterCouldBeSkippedIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using System;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Optional argument has default value and can be skipped",
- Description = "Finds calls to functions where optional parameters are used and the passed argument is the same as the default.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut)]
- public class OptionalParameterCouldBeSkippedIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<OptionalParameterCouldBeSkippedIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- public override void VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
- {
- base.VisitObjectCreateExpression(objectCreateExpression);
-
- CheckMethodCall(objectCreateExpression, objectCreateExpression.Arguments,
- (objectCreation, args) => new ObjectCreateExpression(objectCreation.Type.Clone(), args));
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- CheckMethodCall(invocationExpression, invocationExpression.Arguments,
- (invocation, args) => new InvocationExpression(invocation.Target.Clone(), args));
- }
-
- void CheckMethodCall<T> (T node, IEnumerable<Expression> args, Func<T, IEnumerable<Expression>, T> generateReplacement) where T: AstNode
- {
- // The first two checks are unnecessary, but eliminates the majority of calls early,
- // improving performance.
- var arguments = args.ToArray();
- if (arguments.Length == 0)
- return;
- var lastArg = arguments[arguments.Length - 1];
- if (!(lastArg is PrimitiveExpression || lastArg is NamedArgumentExpression))
- return;
-
- var invocationResolveResult = ctx.Resolve(node) as CSharpInvocationResolveResult;
- if (invocationResolveResult == null)
- return;
-
- string actionMessage = ctx.TranslateString("Remove redundant arguments");
-
- var redundantArguments = GetRedundantArguments(arguments, invocationResolveResult);
- var action = new CodeAction(actionMessage, script => {
- var newArgumentList = arguments
- .Where(arg => !redundantArguments.Contains(arg))
- .Select(arg => arg.Clone());
- var newInvocation = generateReplacement(node, newArgumentList);
- script.Replace(node, newInvocation);
- }, node);
- var issueMessage = ctx.TranslateString("Argument is identical to the default value");
- var lastPositionalArgument = redundantArguments.FirstOrDefault(expression => !(expression is NamedArgumentExpression));
-
- foreach (var argument in redundantArguments) {
- var localArgument = argument;
- var actions = new List<CodeAction>();
- actions.Add(action);
-
- if (localArgument is NamedArgumentExpression || localArgument == lastPositionalArgument) {
- var title = ctx.TranslateString("Remove this argument");
- actions.Add(new CodeAction(title, script => {
- var newArgumentList = arguments
- .Where(arg => arg != localArgument)
- .Select(arg => arg.Clone());
- var newInvocation = generateReplacement(node, newArgumentList);
- script.Replace(node, newInvocation);
- }, node));
- } else {
- var title = ctx.TranslateString("Remove this and the following positional arguments");
- actions.Add(new CodeAction(title, script => {
- var newArgumentList = arguments
- .Where(arg => arg.StartLocation < localArgument.StartLocation && !(arg is NamedArgumentExpression))
- .Select(arg => arg.Clone());
- var newInvocation = generateReplacement(node, newArgumentList);
- script.Replace(node, newInvocation);
- }, node));
- }
-
- AddIssue(localArgument, issueMessage, actions);
- }
- }
-
- IList<Expression> GetRedundantArguments(Expression[] arguments, CSharpInvocationResolveResult invocationResolveResult)
- {
- var argumentToParameterMap = invocationResolveResult.GetArgumentToParameterMap();
- var resolvedParameters = invocationResolveResult.Member.Parameters;
-
- IList<Expression> redundantArguments = new List<Expression>();
-
- for (int i = arguments.Length - 1; i >= 0; i--) {
- var parameterIndex = argumentToParameterMap[i];
- if (parameterIndex == -1)
- // This particular parameter is an error, but keep trying the other ones
- continue;
- var parameter = resolvedParameters[parameterIndex];
- var argument = arguments[i];
- if (argument is PrimitiveExpression) {
- if (parameter.IsParams)
- // before positional params arguments all optional arguments are needed, otherwise some of the
- // param arguments will be shifted out of the params into the fixed parameters
- break;
- if (!parameter.IsOptional)
- // There can be no optional parameters preceding a required one
- break;
- var argumentResolveResult = ctx.Resolve(argument) as ConstantResolveResult;
- if (argumentResolveResult == null || parameter.ConstantValue != argumentResolveResult.ConstantValue)
- // Stop here since any arguments before this one has to be there
- // to enable the passing of this argument
- break;
- redundantArguments.Add(argument);
- } else if (argument is NamedArgumentExpression) {
- var expression = ((NamedArgumentExpression)argument).Expression as PrimitiveExpression;
- if (expression == null)
- continue;
- var expressionResolveResult = ctx.Resolve(expression) as ConstantResolveResult;
- if (expressionResolveResult == null || parameter.ConstantValue != expressionResolveResult.ConstantValue)
- // continue, since there can still be more arguments that are redundant
- continue;
- redundantArguments.Add(argument);
- } else {
- // This is a non-constant positional argument => no more redundancies are possible
- break;
- }
- }
- return redundantArguments;
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/HasMemberCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/HasMemberCriterion.cs
deleted file mode 100644
index 399b762..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/HasMemberCriterion.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// HasMemberCriterion.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using System.Linq;
-using System.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class HasMemberCriterion : ITypeCriterion
- {
-// IMember neededMember;
- IList<IMember> acceptableMembers;
-
- public HasMemberCriterion(IMember neededMember)
- {
-// this.neededMember = neededMember;
-
- if (neededMember.ImplementedInterfaceMembers.Any()) {
- acceptableMembers = neededMember.ImplementedInterfaceMembers.ToList();
- } else if (neededMember.IsOverride) {
- acceptableMembers = new List<IMember>();
- foreach (var member in InheritanceHelper.GetBaseMembers(neededMember, true)) {
- acceptableMembers.Add(member);
- if (member.IsShadowing)
- break;
- }
- acceptableMembers.Add(neededMember);
- } else {
- acceptableMembers = new List<IMember> { neededMember };
- }
- }
-
- #region ITypeCriterion implementation
- public bool SatisfiedBy (IType type)
- {
- if (type == null)
- throw new ArgumentNullException("type");
-
- var typeMembers = type.GetMembers();
- return typeMembers.Any(member => HasCommonMemberDeclaration(acceptableMembers, member));
- }
- #endregion
-
- static bool HasCommonMemberDeclaration(IEnumerable<IMember> acceptableMembers, IMember member)
- {
- var implementedInterfaceMembers = member.MemberDefinition.ImplementedInterfaceMembers;
- if (implementedInterfaceMembers.Any()) {
- return ContainsAny(acceptableMembers, implementedInterfaceMembers);
- } else {
- return acceptableMembers.Contains(member/*.MemberDefinition*/);
- }
- }
-
- static bool ContainsAny<T>(IEnumerable<T> collection, IEnumerable<T> items)
- {
- foreach (var item in items) {
- if (collection.Contains(item))
- return true;
- }
- return false;
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ITypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ITypeCriterion.cs
deleted file mode 100644
index fcb631e..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ITypeCriterion.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// ITypeCriterion.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public interface ITypeCriterion
- {
- /// <summary>
- /// Checks if the given type satisfies the critrion.
- /// </summary>
- /// <returns>
- /// <c>true</c>, if the type satisfies the criterion, <c>false</c> otherwise.
- /// </returns>
- /// <param name='type'>
- /// The type to check.
- /// </param>
- bool SatisfiedBy(IType type);
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs
deleted file mode 100644
index db011b3..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// IsArrayTypeCriterion.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class IsArrayTypeCriterion : ITypeCriterion
- {
- #region ITypeCriterion implementation
-
- public bool SatisfiedBy(IType type)
- {
- return type is ArrayType;
- }
-
- #endregion
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsTypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsTypeCriterion.cs
deleted file mode 100644
index a529d3c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/IsTypeCriterion.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// IsTypeCriterion.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class IsTypeCriterion : ITypeCriterion
- {
- IType isType;
-
- public IsTypeCriterion(IType isType)
- {
- this.isType = isType;
- }
-
- #region ITypeCriterion implementation
- public bool SatisfiedBy (IType type)
- {
- return isType == type ||
- type.GetAllBaseTypes().Any(t => t == isType);
- }
- #endregion
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs
deleted file mode 100644
index 9bc34b0..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-// ParameterCouldBeDeclaredWithBaseTypeIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using System;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-using System.Diagnostics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("A parameter can be demoted to base class",
- Description = "Finds parameters that can be demoted to a base class.",
- Category = IssueCategories.Opportunities,
- Severity = Severity.Suggestion,
- SuppressMessageCategory="Microsoft.Design",
- SuppressMessageCheckId="CA1011:ConsiderPassingBaseTypesAsParameters"
- )]
- public class ParameterCanBeDemotedIssue : ICodeIssueProvider
- {
- bool tryResolve;
-
- public ParameterCanBeDemotedIssue() : this (true)
- {
- }
-
- public ParameterCanBeDemotedIssue(bool tryResolve)
- {
- this.tryResolve = tryResolve;
- }
-
- #region ICodeIssueProvider implementation
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
-// var sw = new Stopwatch();
-// sw.Start();
- var gatherer = new GatherVisitor(context, tryResolve);
- var issues = gatherer.GetIssues();
-// sw.Stop();
-// Console.WriteLine("Elapsed time in ParameterCanBeDemotedIssue: {0} (Checked types: {3, 4} Qualified for resolution check: {5, 4} Members with issues: {4, 4} Method bodies resolved: {2, 4} File: '{1}')",
-// sw.Elapsed, context.UnresolvedFile.FileName, gatherer.MethodResolveCount, gatherer.TypesChecked, gatherer.MembersWithIssues, gatherer.TypeResolveCount);
- return issues;
- }
- #endregion
-
- class GatherVisitor : GatherVisitorBase<ParameterCanBeDemotedIssue>
- {
- bool tryResolve;
-
- public GatherVisitor(BaseRefactoringContext context, bool tryResolve) : base (context)
- {
- this.tryResolve = tryResolve;
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- methodDeclaration.Attributes.AcceptVisitor(this);
- if (HasEntryPointSignature(methodDeclaration))
- return;
- var eligibleParameters = methodDeclaration.Parameters
- .Where(p => p.ParameterModifier != ParameterModifier.Out && p.ParameterModifier != ParameterModifier.Ref)
- .ToList();
- if (eligibleParameters.Count == 0)
- return;
- var declarationResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
- if (declarationResolveResult == null)
- return;
- var member = declarationResolveResult.Member;
- if (member.IsOverride || member.IsOverridable || member.ImplementedInterfaceMembers.Any())
- return;
-
- var collector = new TypeCriteriaCollector(ctx);
- methodDeclaration.AcceptVisitor(collector);
-
- foreach (var parameter in eligibleParameters) {
- ProcessParameter(parameter, methodDeclaration.Body, collector);
- }
- }
-
- bool HasEntryPointSignature(MethodDeclaration methodDeclaration)
- {
- if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Static))
- return false;
- var returnType = ctx.Resolve(methodDeclaration.ReturnType).Type;
- if (!returnType.IsKnownType(KnownTypeCode.Int32) && !returnType.IsKnownType(KnownTypeCode.Void))
- return false;
- var parameterCount = methodDeclaration.Parameters.Count;
- if (parameterCount == 0)
- return true;
- if (parameterCount != 1)
- return false;
- var parameterType = ctx.Resolve(methodDeclaration.Parameters.First()).Type as ArrayType;
- if (parameterType == null || !parameterType.ElementType.IsKnownType(KnownTypeCode.String))
- return false;
- return true;
- }
-
- void ProcessParameter(ParameterDeclaration parameter, AstNode rootResolutionNode, TypeCriteriaCollector collector)
- {
- var localResolveResult = ctx.Resolve(parameter) as LocalResolveResult;
- if (localResolveResult == null)
- return;
- var variable = localResolveResult.Variable;
- var typeKind = variable.Type.Kind;
- if (!(typeKind == TypeKind.Class ||
- typeKind == TypeKind.Struct ||
- typeKind == TypeKind.Interface ||
- typeKind == TypeKind.Array) ||
- parameter.Type is PrimitiveType ||
- !collector.UsedVariables.Contains(variable)) {
- return;
- }
-
- var candidateTypes = localResolveResult.Type.GetAllBaseTypes().ToList();
- TypesChecked += candidateTypes.Count;
- var criterion = collector.GetCriterion(variable);
-
- var possibleTypes =
- (from type in candidateTypes
- where !type.Equals(localResolveResult.Type) && criterion.SatisfiedBy(type)
- select type).ToList();
-
- TypeResolveCount += possibleTypes.Count;
- var validTypes =
- (from type in possibleTypes
- where !tryResolve || TypeChangeResolvesCorrectly(ctx, parameter, rootResolutionNode, type)
- select type).ToList();
- if (validTypes.Any()) {
- // don't demote an array to IList
- if (variable.Type.Kind == TypeKind.Array && validTypes.Any (t => t.Namespace == "System.Collections" && t.Name == "IList")) {
- return;
- }
- AddIssue(parameter, ctx.TranslateString("Parameter can be demoted to base class"), GetActions(parameter, validTypes));
- MembersWithIssues++;
- }
- }
-
- internal int TypeResolveCount = 0;
- internal int TypesChecked = 0;
- internal int MembersWithIssues = 0;
- internal int MethodResolveCount = 0;
-
- IEnumerable<CodeAction> GetActions(ParameterDeclaration parameter, IEnumerable<IType> possibleTypes)
- {
- var csResolver = ctx.Resolver.GetResolverStateBefore(parameter);
- var astBuilder = new TypeSystemAstBuilder(csResolver);
- foreach (var type in possibleTypes) {
- var localType = type;
- var message = String.Format(ctx.TranslateString("Demote parameter to '{0}'"), type.FullName);
- yield return new CodeAction(message, script => {
- script.Replace(parameter.Type, astBuilder.ConvertType(localType));
- }, parameter.NameToken);
- }
- }
- }
-
- public static bool TypeChangeResolvesCorrectly(BaseRefactoringContext ctx, ParameterDeclaration parameter, AstNode rootNode, IType type)
- {
- var resolver = ctx.GetResolverStateBefore(rootNode);
- resolver = resolver.AddVariable(new DefaultParameter(type, parameter.Name));
- var astResolver = new CSharpAstResolver(resolver, rootNode, ctx.UnresolvedFile);
- var validator = new TypeChangeValidationNavigator();
- astResolver.ApplyNavigator(validator, ctx.CancellationToken);
- return !validator.FoundErrors;
- }
-
- class TypeChangeValidationNavigator : IResolveVisitorNavigator
- {
- public bool FoundErrors { get; private set; }
-
- #region IResolveVisitorNavigator implementation
- public ResolveVisitorNavigationMode Scan(AstNode node)
- {
- if (FoundErrors)
- return ResolveVisitorNavigationMode.Skip;
- return ResolveVisitorNavigationMode.Resolve;
- }
-
- public void Resolved(AstNode node, ResolveResult result)
- {
-// bool errors = result.IsError;
- FoundErrors |= result.IsError;
- }
-
- public void ProcessConversion(Expression expression, ResolveResult result, Conversion conversion, IType targetType)
- {
- // no-op
- }
- #endregion
-
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableIssue.cs
deleted file mode 100644
index a8e4dd9..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableIssue.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// ParameterCanBeIEnumerableIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
-
- [IssueDescription("A parameter can IEnumerable/ICollection/IList<T>",
- Description = "Finds parameters that can be demoted to a generic list.",
- Category = IssueCategories.Opportunities,
- Severity = Severity.Suggestion
- )]
- public class ParameterCanBeIEnumerableIssue : ICodeIssueProvider
- {
- readonly bool tryResolve;
-
- public ParameterCanBeIEnumerableIssue() : this (true)
- {
- }
-
- public ParameterCanBeIEnumerableIssue(bool tryResolve)
- {
- this.tryResolve = tryResolve;
- }
-
- #region ICodeIssueProvider implementation
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var gatherer = new GatherVisitor(context, tryResolve);
- var issues = gatherer.GetIssues();
- return issues;
- }
- #endregion
-
- class GatherVisitor : GatherVisitorBase<ParameterCanBeDemotedIssue>
- {
- bool tryResolve;
-
- public GatherVisitor(BaseRefactoringContext context, bool tryResolve) : base (context)
- {
- this.tryResolve = tryResolve;
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- methodDeclaration.Attributes.AcceptVisitor(this);
- if (HasEntryPointSignature(methodDeclaration))
- return;
- var eligibleParameters = methodDeclaration.Parameters
- .Where(p => p.ParameterModifier != ParameterModifier.Out && p.ParameterModifier != ParameterModifier.Ref)
- .ToList();
- if (eligibleParameters.Count == 0)
- return;
- var declarationResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
- if (declarationResolveResult == null)
- return;
- var member = declarationResolveResult.Member;
- if (member.IsOverride || member.IsOverridable || member.ImplementedInterfaceMembers.Any())
- return;
-
- var collector = new TypeCriteriaCollector(ctx);
- methodDeclaration.AcceptVisitor(collector);
-
- foreach (var parameter in eligibleParameters) {
- ProcessParameter(parameter, methodDeclaration.Body, collector);
- }
- }
-
- bool HasEntryPointSignature(MethodDeclaration methodDeclaration)
- {
- if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Static))
- return false;
- var returnType = ctx.Resolve(methodDeclaration.ReturnType).Type;
- if (!returnType.IsKnownType(KnownTypeCode.Int32) && !returnType.IsKnownType(KnownTypeCode.Void))
- return false;
- var parameterCount = methodDeclaration.Parameters.Count;
- if (parameterCount == 0)
- return true;
- if (parameterCount != 1)
- return false;
- var parameterType = ctx.Resolve(methodDeclaration.Parameters.First()).Type as ArrayType;
- return parameterType != null && parameterType.ElementType.IsKnownType(KnownTypeCode.String);
- }
-
- void ProcessParameter(ParameterDeclaration parameter, AstNode rootResolutionNode, TypeCriteriaCollector collector)
- {
- var localResolveResult = ctx.Resolve(parameter) as LocalResolveResult;
- if (localResolveResult == null)
- return;
- var variable = localResolveResult.Variable;
- var typeKind = variable.Type.Kind;
- if (!(typeKind == TypeKind.Class ||
- typeKind == TypeKind.Struct ||
- typeKind == TypeKind.Interface ||
- typeKind == TypeKind.Array) ||
- !collector.UsedVariables.Contains(variable))
- {
- return;
- }
-
- var candidateTypes = localResolveResult.Type.GetAllBaseTypes()
- .Where(t => t.IsParameterized)
- .ToList();
-
- var validTypes =
- (from type in candidateTypes
- where !tryResolve || ParameterCanBeDemotedIssue.TypeChangeResolvesCorrectly(ctx, parameter, rootResolutionNode, type)
- select type).ToList();
- if (!validTypes.Any()) return;
-
- var foundType = validTypes.FirstOrDefault();
- if (foundType == null)
- return;
-
- AddIssue(parameter.NameToken, string.Format(ctx.TranslateString("Parameter can be {0}"),
- foundType.Name),
- script => script.Replace(parameter.Type, CreateShortType(ctx, foundType, parameter)));
- }
-
- public static AstType CreateShortType(BaseRefactoringContext refactoringContext, IType expressionType, AstNode node)
- {
-
- var csResolver = refactoringContext.Resolver.GetResolverStateBefore(node);
- var builder = new TypeSystemAstBuilder(csResolver);
- return builder.ConvertType(expressionType);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs
deleted file mode 100644
index 6b0aeef..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-//
-// SupportsIndexingCriterion.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class SupportsIndexingCriterion : ITypeCriterion
- {
- IType returnType;
-
- IList<IType> argumentTypes;
-
- CSharpConversions conversions;
-
- bool isWriteAccess;
-
- public SupportsIndexingCriterion(IType returnType, IEnumerable<IType> argumentTypes, CSharpConversions conversions, bool isWriteAccess = false)
- {
- if (returnType == null)
- throw new ArgumentNullException("returnType");
- if (argumentTypes == null)
- throw new ArgumentNullException("argumentTypes");
- if (conversions == null)
- throw new ArgumentNullException("conversions");
-
- this.returnType = returnType;
- this.argumentTypes = argumentTypes.ToList();
- this.conversions = conversions;
- this.isWriteAccess = isWriteAccess;
- }
-
- #region ITypeCriterion implementation
-
- public bool SatisfiedBy(IType type)
- {
- var accessors = type.GetAccessors().ToList();
- return accessors.Any(member => {
- var parameterizedMember = member as IParameterizedMember;
- if (parameterizedMember == null)
- return false;
-
- if (isWriteAccess) {
- var parameterCount = member.Parameters.Count;
- if (member.Name != "set_Item" || parameterCount < 2)
- return false;
- var indexerElementType = parameterizedMember.Parameters.Last().Type;
- var indexerParameterTypes = parameterizedMember.Parameters.Take(parameterCount - 1).Select(p => p.Type).ToList();
- return IsSignatureMatch(indexerElementType, indexerParameterTypes);
- } else {
- if (member.Name != "get_Item" || member.Parameters.Count < 1)
- return false;
- var indexerElementType = parameterizedMember.ReturnType;
- var indexerParameterTypes = parameterizedMember.Parameters.Select(p => p.Type).ToList();
- return IsSignatureMatch(indexerElementType, indexerParameterTypes);
- }
- });
- }
-
- #endregion
-
- bool IsSignatureMatch(IType indexerElementType, IList<IType> indexerParameterTypes)
- {
- indexerElementType.GetAllBaseTypes();
- if (indexerParameterTypes.Count != argumentTypes.Count)
- return false;
- var returnConversion = conversions.ImplicitConversion(indexerElementType, returnType);
- if (!returnConversion.IsValid)
- return false;
- for (int i = 0; i < argumentTypes.Count; i++) {
- var conversion = conversions.ImplicitConversion(indexerParameterTypes[i], argumentTypes[i]);
- if (!conversion.IsValid)
- return false;
- }
- return true;
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs
deleted file mode 100644
index f42d55c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// CriteriaCollector.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using System.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public class TypeCriteriaCollector : DepthFirstAstVisitor
- {
- BaseRefactoringContext context;
-
- public TypeCriteriaCollector(BaseRefactoringContext context)
- {
- this.context = context;
- TypeCriteria = new Dictionary<IVariable, IList<ITypeCriterion>>();
- UsedVariables = new HashSet<IVariable>();
- }
-
- IDictionary<IVariable, IList<ITypeCriterion>> TypeCriteria { get; set; }
-
- public HashSet<IVariable> UsedVariables { get; private set; }
-
- public ITypeCriterion GetCriterion(IVariable variable)
- {
- if (!TypeCriteria.ContainsKey(variable))
- return new ConjunctionCriteria(new List<ITypeCriterion>());
- return new ConjunctionCriteria(TypeCriteria[variable]);
- }
-
- void AddCriterion(IVariable variable, ITypeCriterion criterion)
- {
- if (!TypeCriteria.ContainsKey(variable))
- TypeCriteria[variable] = new List<ITypeCriterion>();
- TypeCriteria[variable].Add(criterion);
- }
-
- public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
- {
- base.VisitMemberReferenceExpression(memberReferenceExpression);
-
- var targetResolveResult = context.Resolve(memberReferenceExpression.Target) as LocalResolveResult;
- if (targetResolveResult == null)
- return;
- var variable = targetResolveResult.Variable;
- var conversion = context.GetConversion(memberReferenceExpression);
- if (conversion.IsMethodGroupConversion) {
- AddCriterion(variable, new HasMemberCriterion(conversion.Method));
- } else {
- var resolveResult = context.Resolve(memberReferenceExpression);
- var memberResolveResult = resolveResult as MemberResolveResult;
- if (memberResolveResult != null)
- AddCriterion(variable, new HasMemberCriterion(memberResolveResult.Member));
- }
- }
-
- public override void VisitIndexerExpression(IndexerExpression indexerExpression)
- {
- base.VisitIndexerExpression(indexerExpression);
-
- var localResolveResult = context.Resolve(indexerExpression.Target) as LocalResolveResult;
- if (localResolveResult == null)
- return;
- var resolveResult = context.Resolve(indexerExpression);
- if (localResolveResult == null)
- return;
- var parent = indexerExpression.Parent;
- while (parent is ParenthesizedExpression)
- parent = parent.Parent;
- if (parent is DirectionExpression) {
- // The only types which are indexable and where the indexing expression
- // results in a variable is an actual array type
- AddCriterion(localResolveResult.Variable, new IsArrayTypeCriterion());
- } else if (resolveResult is ArrayAccessResolveResult) {
- var arrayResolveResult = (ArrayAccessResolveResult)resolveResult;
- var arrayType = arrayResolveResult.Array.Type as ArrayType;
- if (arrayType != null) {
- var parameterTypes = arrayResolveResult.Indexes.Select(index => index.Type);
- var criterion = new SupportsIndexingCriterion(arrayType.ElementType, parameterTypes, CSharpConversions.Get(context.Compilation));
- AddCriterion(localResolveResult.Variable, criterion);
- }
- } else if (resolveResult is CSharpInvocationResolveResult) {
- var invocationResolveResult = (CSharpInvocationResolveResult)resolveResult;
- var parameterTypes = invocationResolveResult.Arguments.Select(arg => arg.Type);
- var criterion = new SupportsIndexingCriterion(invocationResolveResult.Member.ReturnType, parameterTypes, CSharpConversions.Get(context.Compilation));
- AddCriterion(localResolveResult.Variable, criterion);
- }
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- var resolveResult = context.Resolve(invocationExpression);
- var invocationResolveResult = resolveResult as InvocationResolveResult;
- if (invocationResolveResult == null)
- return;
-
- // invocationExpression.Target resolves to a method group and VisitMemberReferenceExpression
- // only handles members, so handle method groups here
- var targetResolveResult = invocationResolveResult.TargetResult as LocalResolveResult;
- if (targetResolveResult != null) {
- var variable = targetResolveResult.Variable;
- AddCriterion(variable, new HasMemberCriterion(invocationResolveResult.Member));
- }
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- base.VisitMethodDeclaration(methodDeclaration);
-
- var lastParameter = methodDeclaration.Parameters.LastOrNullObject();
- if (lastParameter.IsNull || !lastParameter.ParameterModifier.HasFlag(ParameterModifier.Params))
- return;
- var localResolveResult = context.Resolve(lastParameter) as LocalResolveResult;
- if (localResolveResult == null)
- return;
- AddCriterion(localResolveResult.Variable, new IsArrayTypeCriterion());
- }
-
- Role[] roles = new [] {
- Roles.Expression,
- Roles.Argument,
- Roles.Condition,
- BinaryOperatorExpression.RightRole,
- BinaryOperatorExpression.LeftRole
- };
-
- public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
- {
- var resolveResult = context.Resolve(identifierExpression);
- var localResolveResult = resolveResult as LocalResolveResult;
- if (localResolveResult == null)
- return;
-
- var variable = localResolveResult.Variable;
- if (!UsedVariables.Contains(variable))
- UsedVariables.Add(variable);
-
- // Assignment expressions are checked separately, see VisitAssignmentExpression
- if (!roles.Contains(identifierExpression.Role) || identifierExpression.Parent is AssignmentExpression)
- return;
-
- CheckForCriterion(identifierExpression, variable);
- }
-
- public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
- {
- base.VisitAssignmentExpression(assignmentExpression);
-
- // Only check the right side; The left side always has the type of
- // the variable, which is not what we want to check
-
- var rightResolveResult = context.Resolve(assignmentExpression.Right) as LocalResolveResult;
- if (rightResolveResult != null) {
- CheckForCriterion(assignmentExpression.Right, rightResolveResult.Variable);
- }
- }
-
- void CheckForCriterion(Expression expression, IVariable variable)
- {
- AddCriterion(variable, new IsTypeCriterion(context.GetExpectedType(expression)));
- }
-
- class ConjunctionCriteria : ITypeCriterion
- {
- IList<ITypeCriterion> criteria;
-
- public ConjunctionCriteria(IList<ITypeCriterion> criteria)
- {
- this.criteria = criteria;
- }
-
- public bool SatisfiedBy(IType type)
- {
- foreach (var criterion in criteria) {
- if (!criterion.SatisfiedBy(type)) {
- return false;
- }
- }
- return true;
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantArrayInitializerCommaIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantArrayInitializerCommaIssue.cs
deleted file mode 100644
index a684f21..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantArrayInitializerCommaIssue.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// RedundantArrayInitializerCommaIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant comma in array initializer",
- Description = "Redundant comma in array initializer.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantArrayInitializerCommaIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantArrayInitializerCommaIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitArrayInitializerExpression (ArrayInitializerExpression arrayInitializerExpression)
- {
- base.VisitArrayInitializerExpression (arrayInitializerExpression);
-
- if (arrayInitializerExpression.IsSingleElement)
- return;
-
- var commaToken = arrayInitializerExpression.RBraceToken.PrevSibling as CSharpTokenNode;
- if (commaToken == null || commaToken.GetText () != ",")
- return;
- string initializerType;
- if (arrayInitializerExpression.Parent is ObjectCreateExpression) {
- if (arrayInitializerExpression.Elements.FirstOrNullObject () is NamedExpression) {
- initializerType = "object";
- } else {
- initializerType = "collection";
- }
- } else {
- initializerType = "array";
- }
- AddIssue (commaToken,
- ctx.TranslateString (string.Format("Remove redundant comma in {0} initializer", initializerType)),
- script => script.Remove (commaToken));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAssignmentIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAssignmentIssue.cs
deleted file mode 100644
index e44ba68..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAssignmentIssue.cs
+++ /dev/null
@@ -1,454 +0,0 @@
-//
-// RedundantAssignmentIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Redundant assignment",
- Description = "Value assigned to a variable or parameter is not used in all execution path.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantAssignmentIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue>();
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantAssignmentIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration(parameterDeclaration);
- if (parameterDeclaration.ParameterModifier == ParameterModifier.Out ||
- parameterDeclaration.ParameterModifier == ParameterModifier.Ref)
- return;
-
- var resolveResult = ctx.Resolve(parameterDeclaration) as LocalResolveResult;
- BlockStatement rootStatement = null;
- if (parameterDeclaration.Parent is MethodDeclaration) {
- rootStatement = ((MethodDeclaration)parameterDeclaration.Parent).Body;
- } else if (parameterDeclaration.Parent is AnonymousMethodExpression) {
- rootStatement = ((AnonymousMethodExpression)parameterDeclaration.Parent).Body;
- } else if (parameterDeclaration.Parent is LambdaExpression) {
- rootStatement = ((LambdaExpression)parameterDeclaration.Parent).Body as BlockStatement;
- }
- CollectIssues(parameterDeclaration, rootStatement, resolveResult);
- }
-
- public override void VisitVariableInitializer(VariableInitializer variableInitializer)
- {
- base.VisitVariableInitializer(variableInitializer);
- if (!inUsingStatementResourceAcquisition) {
- var resolveResult = ctx.Resolve(variableInitializer) as LocalResolveResult;
- CollectIssues(variableInitializer, variableInitializer.GetParent<BlockStatement>(), resolveResult);
- }
- }
-
- bool inUsingStatementResourceAcquisition;
-
- public override void VisitUsingStatement(UsingStatement usingStatement)
- {
- inUsingStatementResourceAcquisition = true;
- usingStatement.ResourceAcquisition.AcceptVisitor(this);
- inUsingStatementResourceAcquisition = false;
- usingStatement.EmbeddedStatement.AcceptVisitor(this);
- }
-
- void CollectIssues(AstNode variableDecl, BlockStatement rootStatement, LocalResolveResult resolveResult)
- {
- if (rootStatement == null || resolveResult == null)
- return;
-
- var references = new HashSet<AstNode>();
- var refStatements = new HashSet<Statement>();
- var usedInLambda = false;
- var results = ctx.FindReferences(rootStatement, resolveResult.Variable);
- foreach (var result in results) {
- var node = result.Node;
- if (node == variableDecl)
- continue;
-
- var parent = node.Parent;
- while (!(parent == null || parent is Statement || parent is LambdaExpression))
- parent = parent.Parent;
- if (parent == null)
- continue;
-
- var statement = parent as Statement;
- if (statement != null) {
- references.Add(node);
- refStatements.Add(statement);
- }
-
- while (parent != null && parent != rootStatement) {
- if (parent is LambdaExpression || parent is AnonymousMethodExpression) {
- usedInLambda = true;
- break;
- }
- parent = parent.Parent;
- }
- if (usedInLambda) {
- break;
- }
- }
-
- // stop analyzing if the variable is used in any lambda expression or anonymous method
- if (usedInLambda)
- return;
-
- var startNode = new VariableReferenceGraphBuilder(ctx).Build(rootStatement, references, refStatements, ctx);
- var variableInitializer = variableDecl as VariableInitializer;
- if (variableInitializer != null && !variableInitializer.Initializer.IsNull)
- startNode.References.Insert(0, variableInitializer);
-
- ProcessNodes(startNode);
- }
-
- class SearchInvocationsVisitor : DepthFirstAstVisitor
- {
- bool foundInvocations;
-
- public bool ContainsInvocations(AstNode node)
- {
- foundInvocations = false;
- node.AcceptVisitor(this);
- return foundInvocations;
- }
-
- protected override void VisitChildren(AstNode node)
- {
- AstNode next;
- for (var child = node.FirstChild; child != null && !foundInvocations; child = next) {
- next = child.NextSibling;
- child.AcceptVisitor(this);
- }
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- foundInvocations = true;
- }
- }
-
- private class SearchRefOrOutVisitor : DepthFirstAstVisitor
- {
- private bool foundInvocations;
- private string _varName;
-
- public bool ContainsRefOrOut(VariableInitializer variableInitializer)
- {
- var node = variableInitializer.Parent.Parent;
- foundInvocations = false;
- _varName = variableInitializer.Name;
- node.AcceptVisitor(this);
- return foundInvocations;
- }
-
- protected override void VisitChildren(AstNode node)
- {
- AstNode next;
- for (var child = node.FirstChild; child != null && !foundInvocations; child = next) {
- next = child.NextSibling;
- child.AcceptVisitor(this);
- }
- }
-
- public override void VisitInvocationExpression(InvocationExpression methodDeclaration)
- {
- if (foundInvocations)
- return;
- if (methodDeclaration.Arguments.Count == 0)
- return;
- foreach (var argument in methodDeclaration.Arguments) {
- var directionExpression = argument as DirectionExpression;
- if (directionExpression == null)
- continue;
-
- if (directionExpression.FieldDirection != FieldDirection.Out && directionExpression.FieldDirection != FieldDirection.Ref)
- continue;
- var idExpression = (directionExpression.Expression) as IdentifierExpression;
- if (idExpression == null)
- continue;
- foundInvocations = (idExpression.Identifier == _varName);
-
- foundInvocations = true;
- }
- }
- }
-
- class SearchAssignmentForVarVisitor : DepthFirstAstVisitor
- {
- bool _foundInvocations;
- private VariableInitializer _variableInitializer;
-
- public bool ContainsLaterAssignments(VariableInitializer variableInitializer) {
- _foundInvocations = false;
- _variableInitializer = variableInitializer;
- variableInitializer.Parent.Parent.AcceptVisitor(this);
- return _foundInvocations;
- }
-
- protected override void VisitChildren(AstNode node) {
- AstNode next;
- for (var child = node.FirstChild; child != null && !_foundInvocations; child = next) {
- next = child.NextSibling;
- child.AcceptVisitor(this);
- }
- }
- public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
- {
- if (_foundInvocations)
- return;
- base.VisitAssignmentExpression(assignmentExpression);
- if (assignmentExpression.Left.ToString() == _variableInitializer.Name
- && assignmentExpression.StartLocation > _variableInitializer.StartLocation) {
- _foundInvocations = true;
- }
- }
- }
-
- void AddIssue(AstNode node)
- {
- var title = ctx.TranslateString("Remove redundant assignment");
-
- var variableInitializer = node as VariableInitializer;
- if (variableInitializer != null) {
- var containsInvocations =
- new SearchInvocationsVisitor().ContainsInvocations(variableInitializer.Initializer);
-
- var varDecl = node.Parent as VariableDeclarationStatement;
-
- var isDeclareStatement = varDecl != null;
- var isUsingVar = isDeclareStatement && (varDecl.Type.ToString() == "var");
-
- var expressionType = ctx.Resolve(node).Type;
-
- var containsLaterAssignments = false;
- if (isDeclareStatement) {
- //if it is used later, the redundant removal should remove the assignment
- //but not the variable
- containsLaterAssignments =
- new SearchAssignmentForVarVisitor().ContainsLaterAssignments(variableInitializer);
- }
-
- AddIssue(variableInitializer.Initializer, title,
- script => {
- var variableNode = (VariableInitializer)node;
- if (containsInvocations && isDeclareStatement) {
- //add the column ';' that will be removed after the next line replacement
- var expression = (InvocationExpression)variableNode.Initializer.Clone();
- var invocation = new ExpressionStatement(expression);
- if(containsLaterAssignments && varDecl !=null) {
- var clonedDefinition = (VariableDeclarationStatement)varDecl.Clone();
-
- var shortExpressionType = CreateShortType(ctx, expressionType, node);
- clonedDefinition.Type = shortExpressionType;
- var variableNodeClone = clonedDefinition.GetVariable(variableNode.Name);
- variableNodeClone.Initializer = null;
- script.InsertBefore(node.Parent, clonedDefinition);
- }
- script.Replace(node.Parent, invocation);
- return;
- }
- var containsRefOrOut =
- new SearchRefOrOutVisitor().ContainsRefOrOut(variableInitializer);
- if (isDeclareStatement && !containsRefOrOut && !containsLaterAssignments) {
- script.Remove(node.Parent);
- return;
- }
- var replacement = (VariableInitializer)variableNode.Clone();
- replacement.Initializer = Expression.Null;
- if(isUsingVar) {
- var shortExpressionType = CreateShortType(ctx, expressionType, node);
- script.Replace(varDecl.Type, shortExpressionType);
- }
- script.Replace(node, replacement);
- });
- }
-
- var assignmentExpr = node.Parent as AssignmentExpression;
- if (assignmentExpr == null)
- return;
- if (assignmentExpr.Parent is ExpressionStatement) {
- AddIssue(assignmentExpr.Parent, title, script => script.Remove(assignmentExpr.Parent));
- } else {
- AddIssue(assignmentExpr.Left.StartLocation, assignmentExpr.OperatorToken.EndLocation, title,
- script => script.Replace(assignmentExpr, assignmentExpr.Right.Clone()));
- }
- }
-
- private static AstType CreateShortType(BaseRefactoringContext refactoringContext, IType expressionType, AstNode node) {
-
- var csResolver = refactoringContext.Resolver.GetResolverStateBefore(node);
- var builder = new TypeSystemAstBuilder(csResolver);
- return builder.ConvertType(expressionType);
- }
-
- static bool IsAssignment(AstNode node)
- {
- if (node is VariableInitializer)
- return true;
-
- var assignmentExpr = node.Parent as AssignmentExpression;
- if (assignmentExpr != null)
- return assignmentExpr.Left == node && assignmentExpr.Operator == AssignmentOperatorType.Assign;
-
- var direction = node.Parent as DirectionExpression;
- if (direction != null)
- return direction.FieldDirection == FieldDirection.Out && direction.Expression == node;
-
- return false;
- }
-
- static bool IsInsideTryBlock(AstNode node)
- {
- var tryCatchStatement = node.GetParent<TryCatchStatement>();
- if (tryCatchStatement == null)
- return false;
- return tryCatchStatement.TryBlock.Contains(node.StartLocation.Line, node.StartLocation.Column);
- }
-
- enum NodeState
- {
- None
-,
- UsageReachable
-,
- UsageUnreachable
-,
- Processing
-,
- }
-
- void ProcessNodes(VariableReferenceNode startNode)
- {
- // node state of a node indicates whether it is possible for an upstream node to reach any usage via
- // the node
- var nodeStates = new Dictionary<VariableReferenceNode, NodeState>();
- var assignments = new List<VariableReferenceNode>();
-
- // dfs to preprocess all nodes and find nodes which end with assignment
- var stack = new Stack<VariableReferenceNode>();
- stack.Push(startNode);
- while (stack.Count > 0) {
- var node = stack.Pop();
- if (node.References.Count > 0) {
- nodeStates [node] = IsAssignment(node.References [0]) ?
- NodeState.UsageUnreachable : NodeState.UsageReachable;
- } else {
- nodeStates [node] = NodeState.None;
- }
-
- // find indices of all assignments in node.References
- var assignmentIndices = new List<int>();
- for (int i = 0; i < node.References.Count; i++) {
- if (IsAssignment(node.References [i]))
- assignmentIndices.Add(i);
- }
- // for two consecutive assignments, the first one is redundant
- for (int i = 0; i < assignmentIndices.Count - 1; i++) {
- var index1 = assignmentIndices [i];
- var index2 = assignmentIndices [i + 1];
- if (index1 + 1 == index2)
- AddIssue(node.References [index1]);
- }
- // if the node ends with an assignment, add it to assignments so as to check if it is redundant
- // later
- if (assignmentIndices.Count > 0 &&
- assignmentIndices [assignmentIndices.Count - 1] == node.References.Count - 1)
- assignments.Add(node);
-
- foreach (var nextNode in node.NextNodes) {
- if (!nodeStates.ContainsKey(nextNode))
- stack.Push(nextNode);
- }
- }
-
- foreach (var node in assignments) {
- // we do not analyze an assignment inside a try block as it can jump to any catch block or finally block
- if (IsInsideTryBlock(node.References [0]))
- continue;
- ProcessNode(node, true, nodeStates);
- }
- }
-
- void ProcessNode(VariableReferenceNode node, bool addIssue,
- IDictionary<VariableReferenceNode, NodeState> nodeStates)
- {
- if (nodeStates [node] == NodeState.None)
- nodeStates [node] = NodeState.Processing;
-
- bool? reachable = false;
- foreach (var nextNode in node.NextNodes) {
- if (nodeStates [nextNode] == NodeState.None)
- ProcessNode(nextNode, false, nodeStates);
-
- if (nodeStates [nextNode] == NodeState.UsageReachable) {
- reachable = true;
- break;
- }
- // downstream nodes are not fully processed (e.g. due to loop), there is no enough info to
- // determine the node state
- if (nodeStates [nextNode] != NodeState.UsageUnreachable)
- reachable = null;
- }
-
- // add issue if it is not possible to reach any usage via NextNodes
- if (addIssue && reachable == false)
- AddIssue(node.References [node.References.Count - 1]);
-
- if (nodeStates [node] != NodeState.Processing)
- return;
-
- switch (reachable) {
- case null:
- nodeStates [node] = NodeState.None;
- break;
- case true:
- nodeStates [node] = NodeState.UsageReachable;
- break;
- case false:
- nodeStates [node] = NodeState.UsageUnreachable;
- break;
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAttributeParenthesesIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAttributeParenthesesIssue.cs
deleted file mode 100644
index b015a53..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantAttributeParenthesesIssue.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// RedundantAttributeParenthesesIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Parentheses are redundant if attribute has no arguments",
- Description = "Parentheses are redundant if attribute has no arguments.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantAttributeParenthesesIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantAttributeParenthesesIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitAttribute (Attribute attribute)
- {
- base.VisitAttribute (attribute);
-
- if (attribute.Arguments.Count > 0 || !attribute.HasArgumentList)
- return;
-
- var start = attribute.Type.EndLocation;
- var end = attribute.EndLocation;
- AddIssue (start, end, ctx.TranslateString ("Remove redundant attribute parentheses"), script =>
- script.Replace (attribute, new Attribute { Type = attribute.Type.Clone () }));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantBaseConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantBaseConstructorIssue.cs
deleted file mode 100644
index 87ce5a1..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantBaseConstructorIssue.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// RedundantBaseConstructorIssue.cs
-//
-// Author:
-// Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// Copyright (c) 2013 Ciprian Khlud <ciprian.mustiata at yahoo.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Remove redundant base call",
- Description = "Remove base constructor call that is redundant",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantBaseConstructorCall")]
- public class RedundantBaseConstructorIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantAttributeParenthesesIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- base.VisitConstructorDeclaration(constructorDeclaration);
-
- if (constructorDeclaration.Initializer.ConstructorInitializerType != ConstructorInitializerType.Base)
- return;
- if (constructorDeclaration.Initializer.IsNull)
- return;
- if (constructorDeclaration.Initializer.Arguments.Count != 0)
- return;
- AddIssue(constructorDeclaration.Initializer.StartLocation, constructorDeclaration.Initializer.EndLocation,
- ctx.TranslateString("Remove redundant base constructor"),
- script => {
- var clone = (ConstructorDeclaration)constructorDeclaration.Clone();
- script.Replace(clone.ColonToken, CSharpTokenNode.Null.Clone());
- script.Replace(constructorDeclaration.Initializer, ConstructorInitializer.Null.Clone());
- });
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- //ignore properties
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- //ignore fields
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- //ignore method declarations
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCaseLabelIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCaseLabelIssue.cs
deleted file mode 100644
index 28869d2..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCaseLabelIssue.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// RedundantCaseLabelIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant 'case' label",
- Description = "Redundant 'case' label",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantCaseLabel")]
- public class RedundantCaseLabelIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantCaseLabelIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitSwitchSection (SwitchSection switchSection)
- {
- base.VisitSwitchSection (switchSection);
-
- if (switchSection.CaseLabels.Count <2)
- return;
-
- var lastLabel = switchSection.CaseLabels.LastOrNullObject ();
- if (!lastLabel.Expression.IsNull)
- return;
- AddIssue (switchSection.FirstChild.StartLocation, lastLabel.StartLocation,
- ctx.TranslateString ("Remove redundant 'case' label"), scipt => {
- foreach (var label in switchSection.CaseLabels) {
- if (label != lastLabel)
- scipt.Remove (label);
- }
- });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs
deleted file mode 100644
index 9887a46..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-//
-// RedundantCatchIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("A catch clause containing a single empty throw is redundant",
- Description = "Warns about catch clauses that only rethrows the exception.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantCatchClause")]
- public class RedundantCatchIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantCatchIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- public override void VisitTryCatchStatement(TryCatchStatement tryCatchStatement)
- {
- var redundantCatchClauses = new List<CatchClause>();
- bool hasNonRedundantCatch = false;
- foreach (var catchClause in tryCatchStatement.CatchClauses) {
- if (IsRedundant(catchClause)) {
- redundantCatchClauses.Add(catchClause);
- } else {
- hasNonRedundantCatch = true;
- }
- }
-
- if (hasNonRedundantCatch || !tryCatchStatement.FinallyBlock.IsNull) {
- AddIssuesForClauses(tryCatchStatement, redundantCatchClauses);
- } else {
- AddIssueForTryCatchStatement(tryCatchStatement);
- }
- }
-
- void AddIssuesForClauses(AstNode node, List<CatchClause> redundantCatchClauses)
- {
- var allCatchClausesMessage = ctx.TranslateString("Remove all '{0}' redundant catches");
- var removeAllRedundantClausesAction = new CodeAction(allCatchClausesMessage, script => {
- foreach (var redundantCatchClause in redundantCatchClauses) {
- script.Remove(redundantCatchClause);
- }
- }, node);
- var singleCatchClauseMessage = ctx.TranslateString("Remove redundant catch clause");
- var redundantCatchClauseMessage = ctx.TranslateString("A catch clause containing a single empty throw statement is redundant.");
- foreach (var redundantCatchClause in redundantCatchClauses) {
- var closureLocalCatchClause = redundantCatchClause;
- var removeRedundantClauseAction = new CodeAction(singleCatchClauseMessage, script => {
- script.Remove(closureLocalCatchClause);
- }, node);
- var actions = new List<CodeAction>();
- actions.Add(removeRedundantClauseAction);
- if (redundantCatchClauses.Count > 1) {
- actions.Add(removeAllRedundantClausesAction);
- }
- AddIssue(closureLocalCatchClause, redundantCatchClauseMessage, actions);
- }
- }
-
- void AddIssueForTryCatchStatement(TryCatchStatement tryCatchStatement)
- {
- var lastCatch = tryCatchStatement.CatchClauses.LastOrNullObject();
- if (lastCatch.IsNull)
- return;
-
- var removeTryCatchMessage = ctx.TranslateString("Remove try statement");
-
- var removeTryStatementAction = new CodeAction(removeTryCatchMessage, script => {
- var statements = tryCatchStatement.TryBlock.Statements;
- if (statements.Count == 1 || tryCatchStatement.Parent is BlockStatement) {
- foreach (var statement in statements) {
- script.InsertAfter(tryCatchStatement.GetPrevSibling (s => !(s is NewLineNode)), statement.Clone());
- }
- script.Remove(tryCatchStatement);
- } else {
- var blockStatement = new BlockStatement();
- foreach (var statement in statements) {
- blockStatement.Statements.Add(statement.Clone());
- }
- script.Replace(tryCatchStatement, blockStatement);
- }
- // The replace and insert script functions does not format these things well on their own
- script.FormatText(tryCatchStatement.Parent);
- }, tryCatchStatement);
-
- var fixes = new [] {
- removeTryStatementAction
- };
- AddIssue(tryCatchStatement.TryBlock.EndLocation, lastCatch.EndLocation, removeTryCatchMessage, fixes);
- }
-
- bool IsRedundant(CatchClause catchClause)
- {
- var firstStatement = catchClause.Body.Statements.FirstOrNullObject();
- if (firstStatement.IsNull) {
- return false;
- }
- var throwStatement = firstStatement as ThrowStatement;
- if (throwStatement == null) {
- return false;
- }
- return throwStatement.Expression.IsNull;
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantElseIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantElseIssue.cs
deleted file mode 100644
index ac1bf1f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantElseIssue.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// RedundantElseIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant 'else' keyword",
- Description = "Redundant 'else' keyword.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantIfElseBlock")]
- public class RedundantElseIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantElseIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- bool HasRundundantElse(IfElseStatement ifElseStatement)
- {
- if (ifElseStatement.FalseStatement.IsNull || ifElseStatement.Parent is IfElseStatement)
- return false;
- var blockStatement = ifElseStatement.FalseStatement as BlockStatement;
- if (blockStatement != null && blockStatement.Statements.Count == 0)
- return true;
- var reachability = ctx.CreateReachabilityAnalysis (ifElseStatement.TrueStatement);
- return !reachability.IsEndpointReachable (ifElseStatement.TrueStatement);
- }
-
- public override void VisitIfElseStatement (IfElseStatement ifElseStatement)
- {
- base.VisitIfElseStatement (ifElseStatement);
-
- if (HasRundundantElse(ifElseStatement)) {
- AddIssue (ifElseStatement.ElseToken, ctx.TranslateString ("Remove redundant 'else'"),
- script =>
- {
- int start = script.GetCurrentOffset(ifElseStatement.ElseToken.GetPrevNode (n => !(n is NewLineNode)).EndLocation);
- int end;
-
- var blockStatement = ifElseStatement.FalseStatement as BlockStatement;
- if (blockStatement != null) {
- if (blockStatement.Statements.Count == 0) {
- // remove empty block
- end = script.GetCurrentOffset (blockStatement.LBraceToken.StartLocation);
- script.Remove (blockStatement);
- } else {
- // remove block braces
- end = script.GetCurrentOffset (blockStatement.LBraceToken.EndLocation);
- script.Remove (blockStatement.RBraceToken);
- }
- } else {
- end = script.GetCurrentOffset(ifElseStatement.ElseToken.EndLocation);
- }
- if (end > start)
- script.RemoveText (start, end - start);
-
- script.FormatText (ifElseStatement.Parent);
- });
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantFieldInitializerIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantFieldInitializerIssue.cs
deleted file mode 100644
index 483d1f3..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantFieldInitializerIssue.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// RedundantFieldInitializerIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.PatternMatching;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Initializing field with default value is redundant",
- Description = "Initializing field with default value is redundant.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantDefaultFieldInitializer")]
- public class RedundantFieldInitializerIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantFieldInitializerIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitFieldDeclaration (FieldDeclaration fieldDeclaration)
- {
- base.VisitFieldDeclaration (fieldDeclaration);
- if (fieldDeclaration.HasModifier (Modifiers.Const))
- return;
- var defaultValueExpr = GetDefaultValueExpression (fieldDeclaration.ReturnType);
- if (defaultValueExpr == null)
- return;
-
- foreach (var variable1 in fieldDeclaration.Variables) {
- var variable = variable1;
- if (!defaultValueExpr.Match (variable.Initializer).Success)
- continue;
-
- AddIssue (variable.Initializer, ctx.TranslateString ("Remove redundant field initializer"),
- script => script.Replace (variable, new VariableInitializer (variable.Name)));
- }
- }
-
- Expression GetDefaultValueExpression (AstType astType)
- {
- var type = ctx.ResolveType (astType);
-
- if ((type.IsReferenceType ?? false) || type.Kind == TypeKind.Dynamic)
- return new NullReferenceExpression ();
-
- var typeDefinition = type.GetDefinition ();
- if (typeDefinition != null) {
- switch (typeDefinition.KnownTypeCode) {
- case KnownTypeCode.Boolean:
- return new PrimitiveExpression (false);
-
- case KnownTypeCode.Char:
- return new PrimitiveExpression ('\0');
-
- case KnownTypeCode.SByte:
- case KnownTypeCode.Byte:
- case KnownTypeCode.Int16:
- case KnownTypeCode.UInt16:
- case KnownTypeCode.Int32:
- return new PrimitiveExpression (0);
-
- case KnownTypeCode.Int64:
- return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0L) };
- case KnownTypeCode.UInt32:
- return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0U) };
- case KnownTypeCode.UInt64:
- return new Choice {
- new PrimitiveExpression (0), new PrimitiveExpression (0U), new PrimitiveExpression (0UL)
- };
- case KnownTypeCode.Single:
- return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0F) };
- case KnownTypeCode.Double:
- return new Choice {
- new PrimitiveExpression (0), new PrimitiveExpression (0F), new PrimitiveExpression (0D)
- };
- case KnownTypeCode.Decimal:
- return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0M) };
-
- case KnownTypeCode.NullableOfT:
- return new NullReferenceExpression ();
- }
- if (type.Kind == TypeKind.Struct)
- return new ObjectCreateExpression (astType.Clone ());
- }
- return new DefaultValueExpression (astType.Clone ());
- }
-
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantInternalIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantInternalIssue.cs
deleted file mode 100644
index 8094c21..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantInternalIssue.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// RedundantInternalInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Finds redundant internal modifiers.
- /// </summary>
- [IssueDescription("Remove redundant 'internal' modifier",
- Description="Removes 'internal' modifiers that are not required.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantInternalIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantInternalIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, RedundantInternalIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- foreach (var token_ in typeDeclaration.ModifierTokens) {
- var token = token_;
- if (token.Modifier == Modifiers.Internal) {
- AddIssue(token, ctx.TranslateString("Remove 'internal' modifier"), script => {
- int offset = script.GetCurrentOffset(token.StartLocation);
- int endOffset = script.GetCurrentOffset(token.GetNextNode().StartLocation);
- script.RemoveText(offset, endOffset - offset);
- });
- }
- }
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNamespaceUsageIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNamespaceUsageIssue.cs
deleted file mode 100644
index 0618eba..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNamespaceUsageIssue.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// RedundantNamespaceUsageInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Finds redundant namespace usages.
- /// </summary>
- [IssueDescription("Remove redundant namespace usages",
- Description = "Removes namespace usages that are obsolete.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantNamespaceUsageIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantNamespaceUsageIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, RedundantNamespaceUsageIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
- {
- base.VisitMemberReferenceExpression(memberReferenceExpression);
- HandleMemberReference(
- memberReferenceExpression, memberReferenceExpression.Target, memberReferenceExpression.MemberNameToken, memberReferenceExpression.TypeArguments, NameLookupMode.Expression,
- script => {
- script.Replace(memberReferenceExpression, RefactoringAstHelper.RemoveTarget(memberReferenceExpression));
- });
- }
-
- public override void VisitMemberType(MemberType memberType)
- {
- base.VisitMemberType(memberType);
- HandleMemberReference(
- memberType, memberType.Target, memberType.MemberNameToken, memberType.TypeArguments, memberType.GetNameLookupMode(),
- script => {
- script.Replace(memberType, RefactoringAstHelper.RemoveTarget(memberType));
- });
- }
-
- void HandleMemberReference(AstNode wholeNode, AstNode targetNode, Identifier memberName, IEnumerable<AstType> typeArguments, NameLookupMode mode, Action<Script> action)
- {
- var result = ctx.Resolve(targetNode);
- if (!(result is NamespaceResolveResult)) {
- return;
- }
- var wholeResult = ctx.Resolve(wholeNode);
- if (!(wholeResult is TypeResolveResult)) {
- return;
- }
-
- var state = ctx.GetResolverStateBefore(wholeNode);
- var resolvedTypeArguments = typeArguments.Select(ctx.ResolveType).ToList();
- var lookupName = state.LookupSimpleNameOrTypeName(memberName.Name, resolvedTypeArguments, mode);
-
- if (lookupName is TypeResolveResult && !lookupName.IsError && wholeResult.Type.Equals(lookupName.Type)) {
- AddIssue(wholeNode.StartLocation, memberName.StartLocation, ctx.TranslateString("Remove redundant namespace usage"), action);
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNullCheckIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNullCheckIssue.cs
deleted file mode 100755
index fbfc872..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantNullCheckIssue.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-// RedundantNullCheckIssue.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Redundant null check",
- Description = "When 'is' keyword is used, which implicitly check null.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "RedundantNullCheck",
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantNullCheckIssue : ICodeIssueProvider
- {
- private static readonly Pattern pattern1
- = new Choice {
- // x is Record && x!= null
- new BinaryOperatorExpression(
- new IsExpression
- {
- Expression = new AnyNode("a"),
- Type = new AnyNode("t")
- }, BinaryOperatorType.ConditionalAnd,
- PatternHelper.CommutativeOperator(new Backreference("a"),
- BinaryOperatorType.
- InEquality,
- new NullReferenceExpression
- ())
- )
- };
- private static readonly Pattern pattern2
- = new Choice {
- // x != null && x is Record
- new BinaryOperatorExpression (
- PatternHelper.CommutativeOperator (new AnyNode("a"),
- BinaryOperatorType.InEquality,
- new NullReferenceExpression())
- , BinaryOperatorType.ConditionalAnd,
- new IsExpression {
- Expression = new Backreference("a"),
- Type = new AnyNode("t")
- }
- )
- };
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantNullCheckIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression(binaryOperatorExpression);
- Match m1 = pattern1.Match(binaryOperatorExpression);
- if (m1.Success) {
- AddIssue(binaryOperatorExpression, ctx.TranslateString("Remove redundant IsNULL check"), script => {
- Expression expr = binaryOperatorExpression.Left;
- script.Replace(binaryOperatorExpression, expr);
- });
- return;
- }
-
- Match m2 = pattern2.Match(binaryOperatorExpression);
- if (m2.Success) {
- AddIssue(binaryOperatorExpression, ctx.TranslateString("Remove redundant IsNULL check"), script => {
- Expression expr = binaryOperatorExpression.Right;
- script.Replace(binaryOperatorExpression, expr);
- });
- return;
- }
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectCreationArgumentListIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectCreationArgumentListIssue.cs
deleted file mode 100644
index c7f012a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectCreationArgumentListIssue.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// RedundantObjectCreationArgumentListIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant empty argument list on object creation expression",
- Description = "When object creation uses object or collection initializer, empty argument list is redundant.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantEmptyObjectCreationArgumentList")]
- public class RedundantObjectCreationArgumentListIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantObjectCreationArgumentListIssue>
- {
- public GatherVisitor( BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
- {
- base.VisitObjectCreateExpression (objectCreateExpression);
-
- if (objectCreateExpression.Initializer.IsNull ||
- objectCreateExpression.Arguments.Count > 0 ||
- objectCreateExpression.LParToken.IsNull)
- return;
-
- AddIssue (objectCreateExpression.LParToken.StartLocation, objectCreateExpression.RParToken.EndLocation,
- ctx.TranslateString ("Remove redundant empty argument list"), script => {
- var l1 = objectCreateExpression.LParToken.GetPrevNode ().EndLocation;
- var l2 = objectCreateExpression.RParToken.GetNextNode ().StartLocation;
- var o1 = script.GetCurrentOffset (l1);
- var o2 = script.GetCurrentOffset (l2);
-
- script.Replace (o1, o2 - o1, " ");
- });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectOrCollectionInitializerIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectOrCollectionInitializerIssue.cs
deleted file mode 100644
index 09cae58..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantObjectOrCollectionInitializerIssue.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// RedundantObjectOrCollectionInitializerIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant empty object or collection initializer",
- Description = "Redundant empty object or collection initializer.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantEmptyObjectOrCollectionInitializer")]
- public class RedundantObjectOrCollectionInitializerIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantObjectOrCollectionInitializerIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
- {
- base.VisitObjectCreateExpression (objectCreateExpression);
- if (objectCreateExpression.Initializer.IsNull || objectCreateExpression.Initializer.Elements.Count > 0)
- return;
-
- AddIssue (objectCreateExpression.Initializer, ctx.TranslateString ("Remove redundant empty initializer"),
- script => {
- var expr = (ObjectCreateExpression)objectCreateExpression.Clone ();
- expr.Initializer = ArrayInitializerExpression.Null;
- script.Replace (objectCreateExpression, expr);
- });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantPrivateIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantPrivateIssue.cs
deleted file mode 100644
index 00d3efe..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantPrivateIssue.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-//
-// RedundantPrivateInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Finds redundant internal modifiers.
- /// </summary>
- [IssueDescription("Remove redundant 'private' modifier",
- Description = "Removes 'private' modifiers that are not required.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantPrivateIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantPrivateIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, RedundantPrivateIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- void CheckNode(EntityDeclaration node)
- {
- foreach (var token_ in node.ModifierTokens) {
- var token = token_;
- if (token.Modifier == Modifiers.Private) {
- AddIssue(token, ctx.TranslateString("Remove redundant 'private' modifier"), script => {
- int offset = script.GetCurrentOffset(token.StartLocation);
- int endOffset = script.GetCurrentOffset(token.GetNextNode().StartLocation);
- script.RemoveText(offset, endOffset - offset);
- });
- }
- }
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- base.VisitMethodDeclaration(methodDeclaration);
- CheckNode(methodDeclaration);
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- base.VisitFieldDeclaration(fieldDeclaration);
- CheckNode(fieldDeclaration);
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- base.VisitPropertyDeclaration(propertyDeclaration);
- CheckNode(propertyDeclaration);
- }
-
- public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
- {
- base.VisitIndexerDeclaration(indexerDeclaration);
- CheckNode(indexerDeclaration);
- }
-
- public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
- {
- base.VisitEventDeclaration(eventDeclaration);
- CheckNode(eventDeclaration);
- }
-
- public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
- {
- base.VisitCustomEventDeclaration(eventDeclaration);
- CheckNode(eventDeclaration);
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- base.VisitConstructorDeclaration(constructorDeclaration);
- CheckNode(constructorDeclaration);
- }
-
- public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
- {
- base.VisitOperatorDeclaration(operatorDeclaration);
- CheckNode(operatorDeclaration);
- }
-
- public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
- {
- base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
- CheckNode(fixedFieldDeclaration);
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- if (!(typeDeclaration.Parent is TypeDeclaration)) {
- CheckNode(typeDeclaration);
- }
- base.VisitTypeDeclaration(typeDeclaration);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantThisIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantThisIssue.cs
deleted file mode 100644
index 0855374..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantThisIssue.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// RedundantThisInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Linq;
-
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Finds redundant namespace usages.
- /// </summary>
- [IssueDescription("Remove redundant 'this.'",
- Description= "Removes 'this.' references that are not required.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantThisQualifier")]
- public class RedundantThisIssue : ICodeIssueProvider
- {
- bool ignoreConstructors = true;
-
- /// <summary>
- /// Specifies whether to ignore redundant 'this' in constructors.
- /// "this.Name = name;"
- /// </summary>
- public bool IgnoreConstructors {
- get {
- return ignoreConstructors;
- }
- set {
- ignoreConstructors = value;
- }
- }
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantThisIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, RedundantThisIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- static IMember GetMember (ResolveResult result)
- {
- if (result is MemberResolveResult) {
- return ((MemberResolveResult)result).Member;
- } else if (result is MethodGroupResolveResult) {
- return ((MethodGroupResolveResult)result).Methods.FirstOrDefault ();
- }
-
- return null;
- }
-
- public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
- {
- if (IssueProvider.IgnoreConstructors)
- return;
- base.VisitConstructorDeclaration(constructorDeclaration);
- }
-
- public override void VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression)
- {
- base.VisitThisReferenceExpression(thisReferenceExpression);
- var memberReference = thisReferenceExpression.Parent as MemberReferenceExpression;
- if (memberReference == null) {
- return;
- }
-
- var state = ctx.GetResolverStateAfter(thisReferenceExpression);
- var wholeResult = ctx.Resolve(memberReference);
-
- IMember member = GetMember(wholeResult);
- if (member == null) {
- return;
- }
-
- var result = state.LookupSimpleNameOrTypeName(memberReference.MemberName, EmptyList<IType>.Instance, NameLookupMode.Expression);
-
- bool isRedundant;
- if (result is MemberResolveResult) {
- isRedundant = ((MemberResolveResult)result).Member.Region.Equals(member.Region);
- } else if (result is MethodGroupResolveResult) {
- isRedundant = ((MethodGroupResolveResult)result).Methods.Any(m => m.Region.Equals(member.Region));
- } else {
- return;
- }
-
- if (isRedundant) {
- AddIssue(thisReferenceExpression.StartLocation, memberReference.MemberNameToken.StartLocation, ctx.TranslateString("Remove redundant 'this.'"), script => {
- script.Replace(memberReference, RefactoringAstHelper.RemoveTarget(memberReference));
- }
- );
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantToStringIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantToStringIssue.cs
deleted file mode 100644
index 4676824..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantToStringIssue.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-//
-// RedundantToStringIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Redundant call to ToString()",
- Description = "Finds calls to ToString() which would occur anyway.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.GrayOut)]
- public class RedundantToStringIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantToStringIssue>
- {
- static Tuple<int, int> onlyFirst = Tuple.Create (0, 0);
-
- static IDictionary<Tuple<string, int>, Tuple<int, int>> membersCallingToString = new Dictionary<Tuple<string, int>, Tuple<int, int>> {
- { Tuple.Create("System.IO.TextWriter.Write", 1), onlyFirst },
- { Tuple.Create("System.IO.TextWriter.WriteLine", 1), onlyFirst },
- { Tuple.Create("System.Console.Write", 1), onlyFirst },
- { Tuple.Create("System.Console.WriteLine", 1), onlyFirst }
- };
-
- public GatherVisitor (BaseRefactoringContext context) : base (context)
- {
- binOpVisitor = new BinaryExpressionVisitor (this);
- }
-
- HashSet<AstNode> processedNodes = new HashSet<AstNode>();
-
- void CheckExpressionInAutoCallContext(Expression expression)
- {
- if (expression is InvocationExpression && !processedNodes.Contains(expression)) {
- CheckInvocationInAutoCallContext((InvocationExpression)expression);
- }
- }
-
- void CheckInvocationInAutoCallContext(InvocationExpression invocationExpression)
- {
- var memberExpression = invocationExpression.Target as MemberReferenceExpression;
- if (memberExpression == null) {
- return;
- }
- if (memberExpression.MemberName != "ToString" || invocationExpression.Arguments.Any ()) {
- return;
- }
-
- var resolveResult = ctx.Resolve(invocationExpression) as CSharpInvocationResolveResult;
- if (resolveResult == null) {
- return;
- }
- AddRedundantToStringIssue(memberExpression, invocationExpression);
- }
-
- void AddRedundantToStringIssue(MemberReferenceExpression memberExpression, InvocationExpression invocationExpression)
- {
- // Simon Lindgren 2012-09-14: Previously there was a check here to see if the node had already been processed
- // This has been moved out to the callers, to check it earlier for a 30-40% run time reduction
- processedNodes.Add(invocationExpression);
-
- AddIssue(memberExpression.DotToken.StartLocation, invocationExpression.RParToken.EndLocation,
- ctx.TranslateString("Remove redundant call to ToString()"), script => {
- script.Replace(invocationExpression, memberExpression.Target.Clone());
- });
- }
-
- #region Binary operator
- public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression(binaryOperatorExpression);
-
- if (binaryOperatorExpression.Operator != BinaryOperatorType.Add)
- return;
- binOpVisitor.Reset();
- binaryOperatorExpression.AcceptVisitor(binOpVisitor);
- }
-
- BinaryExpressionVisitor binOpVisitor;
- class BinaryExpressionVisitor : DepthFirstAstVisitor
- {
- GatherVisitor issue;
- int stringExpressionCount;
- Expression firstStringExpression;
-
- public BinaryExpressionVisitor(GatherVisitor issue)
- {
- this.issue = issue;
- }
-
- public void Reset()
- {
- stringExpressionCount = 0;
- firstStringExpression = null;
- }
-
- void Check (Expression expression)
- {
- if (expression is BinaryOperatorExpression) {
- expression.AcceptVisitor(this);
- return;
- }
- if (stringExpressionCount <= 1) {
- var resolveResult = issue.ctx.Resolve(expression);
- if (resolveResult.Type.IsKnownType(KnownTypeCode.String)) {
- stringExpressionCount++;
- if (stringExpressionCount == 1) {
- firstStringExpression = expression;
- } else {
- issue.CheckExpressionInAutoCallContext(firstStringExpression);
- issue.CheckExpressionInAutoCallContext(expression);
- }
- }
- } else {
- issue.CheckExpressionInAutoCallContext(expression);
- }
- }
-
- public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
- {
- Check(binaryOperatorExpression.Left);
- Check(binaryOperatorExpression.Right);
- }
- }
-
- #endregion
-
- #region Invocation expression
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
-
- var target = invocationExpression.Target as MemberReferenceExpression;
-
- var invocationResolveResult = ctx.Resolve(invocationExpression) as CSharpInvocationResolveResult;
- if (invocationResolveResult == null) {
- return;
- }
- IMember member = invocationResolveResult.Member;
-
- // "".ToString()
- CheckTargetedObject(invocationExpression, invocationResolveResult.TargetResult.Type, member);
-
- // Check list of members that call ToString() automatically
- CheckAutomaticToStringCallers(invocationExpression, member);
-
- // Check formatting calls
- CheckFormattingCall(invocationExpression, invocationResolveResult);
- }
-
- void CheckTargetedObject(InvocationExpression invocationExpression, IType type, IMember member)
- {
- var memberExpression = invocationExpression.Target as MemberReferenceExpression;
- if (memberExpression != null && !processedNodes.Contains(invocationExpression)) {
- if (type.IsKnownType(KnownTypeCode.String) && member.Name == "ToString") {
- AddRedundantToStringIssue(memberExpression, invocationExpression);
- }
- }
- }
-
- void CheckAutomaticToStringCallers(InvocationExpression invocationExpression, IMember member)
- {
- if (member.IsOverride) {
- member = InheritanceHelper.GetBaseMember(member);
- if (member == null) {
- return;
- }
- }
- var key = new Tuple<string, int>(member.ReflectionName, invocationExpression.Arguments.Count);
- Tuple<int, int> checkInfo;
- if (membersCallingToString.TryGetValue(key, out checkInfo)) {
- var arguments = invocationExpression.Arguments.ToList();
- for (int i = checkInfo.Item1; i < Math.Min(invocationExpression.Arguments.Count, checkInfo.Item2 + 1); ++i) {
- CheckExpressionInAutoCallContext(arguments[i]);
- }
- }
- }
-
- void CheckFormattingCall(InvocationExpression invocationExpression, CSharpInvocationResolveResult invocationResolveResult)
- {
- Expression formatArgument;
- IList<Expression> formatArguments;
- TextLocation formatStart;
- // Only check parameters that are of type object: String means it is neccessary, others
- // means that there is another problem (ie no matching overload of the method).
- Func<IParameter, Expression, bool> predicate = (parameter, argument) => {
- var type = parameter.Type;
- if (type is TypeWithElementType && parameter.IsParams) {
- type = ((TypeWithElementType)type).ElementType;
- }
- var typeDefinition = type.GetDefinition();
- if (typeDefinition == null)
- return false;
- return typeDefinition.IsKnownType(KnownTypeCode.Object);
- };
- if (FormatStringHelper.TryGetFormattingParameters(invocationResolveResult, invocationExpression,
- out formatArgument, out formatStart, out formatArguments, predicate)) {
- foreach (var argument in formatArguments) {
- CheckExpressionInAutoCallContext(argument);
- }
- }
- }
- #endregion
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantTypeCastIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantTypeCastIssue.cs
deleted file mode 100644
index ff8c3c2..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantTypeCastIssue.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-// RedundantTypeCastIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Redundant type cast",
- Description = "Redundant type cast.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantCast")]
- public class RedundantTypeCastIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantTypeCastIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitCastExpression (CastExpression castExpression)
- {
- base.VisitCastExpression (castExpression);
-
- CheckTypeCast (castExpression, castExpression.Expression, castExpression.StartLocation,
- castExpression.Expression.StartLocation);
- }
-
- public override void VisitAsExpression (AsExpression asExpression)
- {
- base.VisitAsExpression (asExpression);
-
- CheckTypeCast (asExpression, asExpression.Expression, asExpression.Expression.EndLocation,
- asExpression.EndLocation);
- }
-
- IType GetExpectedType (Expression typeCastNode)
- {
- var memberRefExpr = typeCastNode.Parent as MemberReferenceExpression;
- if (memberRefExpr != null) {
- var invocationExpr = memberRefExpr.Parent as InvocationExpression;
- if (invocationExpr != null && invocationExpr.Target == memberRefExpr) {
- var invocationResolveResult = ctx.Resolve (invocationExpr) as InvocationResolveResult;
- if (invocationResolveResult != null) {
- return invocationResolveResult.Member.DeclaringType;
- }
- } else {
- var memberResolveResult = ctx.Resolve (memberRefExpr) as MemberResolveResult;
- if (memberResolveResult != null) {
- return memberResolveResult.Member.DeclaringType;
- }
- }
- }
- return ctx.GetExpectedType (typeCastNode);
- }
-
- bool IsExplicitImplementation(IType exprType, IType interfaceType, Expression typeCastNode)
- {
- var memberRefExpr = typeCastNode.Parent as MemberReferenceExpression;
- if (memberRefExpr != null) {
- var rr = ctx.Resolve(memberRefExpr);
- var memberResolveResult = rr as MemberResolveResult;
- if (memberResolveResult != null) {
- foreach (var member in exprType.GetMembers (m => m.EntityType == memberResolveResult.Member.EntityType)) {
- if (member.IsExplicitInterfaceImplementation && member.ImplementedInterfaceMembers.Contains (memberResolveResult.Member)) {
- return true;
- }
- }
- }
-
- var methodGroupResolveResult = rr as MethodGroupResolveResult;
- if (methodGroupResolveResult != null) {
- foreach (var member in exprType.GetMethods ()) {
- if (member.IsExplicitInterfaceImplementation && member.ImplementedInterfaceMembers.Any (m => methodGroupResolveResult.Methods.Contains ((IMethod)m))) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- void AddIssue (Expression typeCastNode, Expression expr, TextLocation start, TextLocation end)
- {
- AddIssue (start, end, ctx.TranslateString ("Remove redundant type cast"),
- script => script.Replace (typeCastNode, expr.Clone ()));
- }
-
- void CheckTypeCast (Expression typeCastNode, Expression expr, TextLocation castStart, TextLocation castEnd)
- {
- while (typeCastNode.Parent != null && typeCastNode.Parent is ParenthesizedExpression)
- typeCastNode = (Expression)typeCastNode.Parent;
- var expectedType = GetExpectedType (typeCastNode);
- var exprType = ctx.Resolve (expr).Type;
- if (expectedType.Kind == TypeKind.Interface && IsExplicitImplementation (exprType, expectedType, typeCastNode))
- return;
- if (exprType.GetAllBaseTypes ().Any (t => t.Equals(expectedType)))
- AddIssue (typeCastNode, expr, castStart, castEnd);
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantUsingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantUsingIssue.cs
deleted file mode 100644
index 8c9e843..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantUsingIssue.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-//
-// RedundantUsingInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Finds redundant using declarations.
- /// </summary>
- [IssueDescription("Remove unused usings",
- Description = "Removes used declarations that are not required.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "RedundantUsingDirective"
- )]
- public class RedundantUsingIssue : ICodeIssueProvider
- {
- List<string> namespacesToKeep = new List<string>();
-
- /// <summary>
- /// The list of namespaces that should be kept even if they are not being used.
- /// Used in SharpDevelop to always keep the "System" namespace around.
- /// </summary>
- public IList<string> NamespacesToKeep {
- get { return namespacesToKeep; }
- }
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var visitor = new GatherVisitor (context, this);
- context.RootNode.AcceptVisitor (visitor);
- visitor.Collect ();
- return visitor.FoundIssues;
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantUsingIssue>
- {
- Dictionary<UsingDeclaration, bool> isInUse = new Dictionary<UsingDeclaration, bool>();
- Dictionary<string, UsingDeclaration> namespaceToUsingDecl = new Dictionary<string, UsingDeclaration>();
-
- public GatherVisitor (BaseRefactoringContext ctx, RedundantUsingIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- public void Collect()
- {
- foreach (var u in isInUse.Where (u => !u.Value)) {
- var decl = u.Key;
- AddIssue(decl, ctx.TranslateString("Remove redundant usings"), script => {
- foreach (var u2 in isInUse.Where (a => !a.Value)) {
- script.Remove (u2.Key);
- }
- }
- );
- }
- }
-
- public override void VisitUsingDeclaration(UsingDeclaration usingDeclaration)
- {
- base.VisitUsingDeclaration(usingDeclaration);
- if (IsSuppressed(usingDeclaration.StartLocation))
- return;
- var nrr = ctx.Resolve(usingDeclaration.Import) as NamespaceResolveResult;
- if (nrr != null) {
- isInUse[usingDeclaration] = IssueProvider.namespacesToKeep.Contains(nrr.NamespaceName);
- namespaceToUsingDecl[nrr.NamespaceName] = usingDeclaration;
- }
- }
-
- public override void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
- {
- var oldNamespaceToUsingDecl = new Dictionary<string, UsingDeclaration>(namespaceToUsingDecl);
- base.VisitNamespaceDeclaration(namespaceDeclaration);
- namespaceToUsingDecl = oldNamespaceToUsingDecl;
- }
-
- void UseNamespace(string ns)
- {
- UsingDeclaration decl;
- if (namespaceToUsingDecl.TryGetValue(ns, out decl)) {
- isInUse[decl] = true;
- }
- }
-
- public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
- {
- base.VisitIdentifierExpression(identifierExpression);
- var trr = ctx.Resolve(identifierExpression) as TypeResolveResult;
- if (trr != null) {
- UseNamespace(trr.Type.Namespace);
- }
- }
-
- public override void VisitSimpleType(SimpleType simpleType)
- {
- base.VisitSimpleType(simpleType);
- UseNamespace(ctx.Resolve(simpleType).Type.Namespace);
- }
-
- public override void VisitInvocationExpression (InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression (invocationExpression);
- UseExtensionMethod(ctx.Resolve(invocationExpression));
- }
-
- void UseExtensionMethod(ResolveResult rr)
- {
- var mg = rr as CSharpInvocationResolveResult;
- if (mg != null && mg.IsExtensionMethodInvocation) {
- UseNamespace (mg.Member.DeclaringType.Namespace);
- }
- }
-
- public override void VisitQueryExpression(QueryExpression queryExpression)
- {
- base.VisitQueryExpression(queryExpression);
- foreach (var clause in queryExpression.Clauses) {
- UseExtensionMethod(ctx.Resolve(clause));
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantWhereWithPredicateIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantWhereWithPredicateIssue.cs
deleted file mode 100644
index f6a825e..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantWhereWithPredicateIssue.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Any()/First()/etc. should be used with predicate and Where() removed",
- Description= "Detects redundant Where() with predicate calls followed by Any().",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Hint,
- ResharperDisableKeyword = "ReplaceWithSingleCallToAny")]
- public class RedundantWhereWithPredicateIssue : ICodeIssueProvider
- {
- static readonly AstNode pattern =
- new InvocationExpression (
- new MemberReferenceExpression (
- new NamedNode ("whereInvoke",
- new InvocationExpression (
- new MemberReferenceExpression (new AnyNode ("target"), "Where"),
- new AnyNode ())),
- Pattern.AnyString));
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<RedundantWhereWithPredicateIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- }
-
- public override void VisitInvocationExpression (InvocationExpression anyInvoke)
- {
- base.VisitInvocationExpression (anyInvoke);
-
- var match = pattern.Match (anyInvoke);
- if (!match.Success)
- return;
-
- var anyResolve = ctx.Resolve (anyInvoke) as InvocationResolveResult;
- if (anyResolve == null || !HasPredicateVersion(anyResolve.Member))
- return;
- var whereInvoke = match.Get<InvocationExpression> ("whereInvoke").Single ();
- var whereResolve = ctx.Resolve (whereInvoke) as InvocationResolveResult;
- if (whereResolve == null || whereResolve.Member.Name != "Where" || !IsQueryExtensionClass(whereResolve.Member.DeclaringTypeDefinition))
- return;
- if (whereResolve.Member.Parameters.Count != 2)
- return;
- var predResolve = whereResolve.Member.Parameters [1];
- if (predResolve.Type.TypeParameterCount != 2)
- return;
-
- AddIssue (
- anyInvoke, string.Format("Redundant Where() call with predicate followed by {0}()", anyResolve.Member.Name),
- script => {
- var arg = whereInvoke.Arguments.Single ().Clone ();
- var target = match.Get<Expression> ("target").Single ().Clone ();
- script.Replace (anyInvoke, new InvocationExpression (new MemberReferenceExpression (target, anyResolve.Member.Name), arg));
- });
- }
-
- bool IsQueryExtensionClass(ITypeDefinition typeDef)
- {
- if (typeDef == null || typeDef.Namespace != "System.Linq")
- return false;
- switch (typeDef.Name) {
- case "Enumerable":
- case "ParallelEnumerable":
- case "Queryable":
- return true;
- default:
- return false;
- }
- }
-
- bool HasPredicateVersion(IParameterizedMember member)
- {
- if (!IsQueryExtensionClass(member.DeclaringTypeDefinition))
- return false;
- switch (member.Name) {
- case "Any":
- case "Count":
- case "First":
- case "FirstOrDefault":
- case "Last":
- case "LastOrDefault":
- case "LongCount":
- case "Single":
- case "SingleOrDefault":
- return true;
- default:
- return false;
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceEqualsCalledWithValueTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceEqualsCalledWithValueTypeIssue.cs
deleted file mode 100644
index 9be2381..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceEqualsCalledWithValueTypeIssue.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// ReferenceEqualsCalledWithValueTypeIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("'Object.ReferenceEquals' is always false because it is called with value type",
- Description = "'Object.ReferenceEquals' is always false because it is called with value type.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ReferenceEqualsCalledWithValueTypeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ReferenceEqualsCalledWithValueTypeIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitInvocationExpression (InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression (invocationExpression);
-
- // Quickly determine if this invocation is eligible to speed up the inspector
- var nameToken = invocationExpression.Target.GetChildByRole(Roles.Identifier);
- if (nameToken.Name != "ReferenceEquals")
- return;
-
- var resolveResult = ctx.Resolve (invocationExpression) as InvocationResolveResult;
- if (resolveResult == null ||
- resolveResult.Member.DeclaringTypeDefinition == null ||
- resolveResult.Member.DeclaringTypeDefinition.KnownTypeCode != KnownTypeCode.Object ||
- resolveResult.Member.Name != "ReferenceEquals" ||
- invocationExpression.Arguments.All(arg => ctx.Resolve(arg).Type.IsReferenceType ?? true))
- return;
-
- var action = new CodeAction (ctx.TranslateString ("Use Equals()"),
- script => script.Replace (invocationExpression.Target, new MemberReferenceExpression (
- new TypeReferenceExpression (new PrimitiveType ("object")), "Equals")), invocationExpression);
- AddIssue (invocationExpression,
- ctx.TranslateString ("'Object.ReferenceEquals' is always false because it is called with value type"),
- new [] { action });
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceToStaticMemberViaDerivedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceToStaticMemberViaDerivedTypeIssue.cs
deleted file mode 100644
index ab80bd9..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ReferenceToStaticMemberViaDerivedTypeIssue.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// CallToStaticMemberViaDerivedTypeIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Call to static member via a derived class",
- Description = "Suggests using the class declaring a static function when calling it.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "AccessToStaticMemberViaDerivedType")]
- public class ReferenceToStaticMemberViaDerivedTypeIssue : ICodeIssueProvider
- {
- #region ICodeIssueProvider implementation
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ReferenceToStaticMemberViaDerivedTypeIssue>
- {
- readonly BaseRefactoringContext context;
-
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- this.context = context;
- }
-
- public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
- {
- base.VisitMemberReferenceExpression(memberReferenceExpression);
- if (memberReferenceExpression == null || memberReferenceExpression.Target is ThisReferenceExpression)
- // Call within current class scope using 'this' or 'base'
- return;
- var memberResolveResult = context.Resolve(memberReferenceExpression) as MemberResolveResult;
- if (memberResolveResult == null)
- return;
- if (!memberResolveResult.Member.IsStatic)
- return;
- HandleMember(memberReferenceExpression, memberReferenceExpression.Target, memberResolveResult.Member, memberResolveResult.TargetResult);
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
- if (invocationExpression.Target is IdentifierExpression)
- // Call within current class scope without 'this' or 'base'
- return;
- var memberReference = invocationExpression.Target as MemberReferenceExpression;
- if (memberReference == null || memberReference.Target is ThisReferenceExpression)
- // Call within current class scope using 'this' or 'base'
- return;
- var invocationResolveResult = context.Resolve(invocationExpression) as InvocationResolveResult;
- if (invocationResolveResult == null)
- return;
- HandleMember(invocationExpression, memberReference.Target, invocationResolveResult.Member, invocationResolveResult.TargetResult);
- }
-
- void HandleMember(Expression issueAnchor, Expression targetExpression, IMember member, ResolveResult targetResolveResult)
- {
- var typeResolveResult = targetResolveResult as TypeResolveResult;
- if (typeResolveResult == null)
- return;
- if (!member.IsStatic)
- return;
- if (typeResolveResult.Type.Equals(member.DeclaringType))
- return;
- // check whether member.DeclaringType contains the original type
- // (curiously recurring template pattern)
- var v = new ContainsTypeVisitor(typeResolveResult.Type.GetDefinition());
- member.DeclaringType.AcceptVisitor(v);
- if (v.IsContained)
- return;
- AddIssue(issueAnchor, context.TranslateString("Static method invoked via derived type"),
- GetAction(context, targetExpression, member));
- }
-
- CodeAction GetAction(BaseRefactoringContext context, Expression targetExpression,
- IMember member)
- {
- var builder = context.CreateTypeSytemAstBuilder(targetExpression);
- var newType = builder.ConvertType(member.DeclaringType);
- string description = string.Format("{0} '{1}'", context.TranslateString("Use base class"), newType.GetText());
- return new CodeAction(description, script => {
- script.Replace(targetExpression, newType);
- }, targetExpression);
- }
-
- sealed class ContainsTypeVisitor : TypeVisitor
- {
- readonly ITypeDefinition searchedType;
- internal bool IsContained;
-
- public ContainsTypeVisitor(ITypeDefinition searchedType)
- {
- this.searchedType = searchedType;
- }
-
- public override IType VisitTypeDefinition(ITypeDefinition type)
- {
- if (type.Equals(searchedType))
- IsContained = true;
- return base.VisitTypeDefinition(type);
- }
- }
- }
- #endregion
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs
deleted file mode 100644
index 1d6f0f5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2010-2013 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 ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Result of async call is ignored",
- Description = "Warns when the task returned by an async call is ignored, which causes exceptions" +
- " thrown by the call to be silently ignored.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning)]
- public class ResultOfAsyncCallShouldNotBeIgnoredIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- sealed class GatherVisitor : GatherVisitorBase<ResultOfAsyncCallShouldNotBeIgnoredIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base(ctx)
- {
- }
-
- public override void VisitExpressionStatement(ExpressionStatement expressionStatement)
- {
- base.VisitExpressionStatement(expressionStatement);
- var invocation = expressionStatement.Expression as InvocationExpression;
- if (invocation == null)
- return;
- var rr = ctx.Resolve(invocation) as InvocationResolveResult;
- if (rr != null && (rr.Type.IsKnownType(KnownTypeCode.Task) || rr.Type.IsKnownType(KnownTypeCode.TaskOfT))) {
- AddIssue(invocation, ctx.TranslateString("Exceptions in async call will be silently ignored because the returned task is unused"));
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/SimplifyAnonymousMethodToDelegateIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/SimplifyAnonymousMethodToDelegateIssue.cs
deleted file mode 100644
index d70ad46..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/SimplifyAnonymousMethodToDelegateIssue.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-//
-// SimplifyAnonymousMethodToDelegateIssue.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Simplify anonymous method to delegate",
- Description = "Shows anonymous methods that can be simplified.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "ConvertClosureToMethodGroup")]
- public class SimplifyAnonymousMethodToDelegateIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<SimplifyAnonymousMethodToDelegateIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- }
-
- static Pattern pattern = new Choice {
- new BlockStatement {
- new ReturnStatement (new AnyNode ("invoke"))
- },
- new AnyNode ("invoke")
- };
-
- static InvocationExpression AnalyzeBody(AstNode body)
- {
- var m = pattern.Match(body);
- if (m.Success)
- return m.Get("invoke").Single () as InvocationExpression;
- return null;
- }
-
- static bool IsSimpleTarget(Expression target)
- {
- if (target is IdentifierExpression)
- return true;
- var mref = target as MemberReferenceExpression;
- if (mref != null)
- return IsSimpleTarget (mref.Target);
- var pref = target as PointerReferenceExpression;
- if (pref != null)
- return IsSimpleTarget (pref.Target);
- return false;
- }
-
- void AnalyzeExpression(AstNode expression, AstNode body, AstNodeCollection<ParameterDeclaration> parameters)
- {
- var invocation = AnalyzeBody(body);
- if (invocation == null)
- return;
- if (!IsSimpleTarget (invocation.Target))
- return;
- var lambdaParameters = parameters.ToList();
- if (lambdaParameters.Count != invocation.Arguments.Count)
- return;
- int i = 0;
- foreach (var param in invocation.Arguments) {
- var id = param as IdentifierExpression;
- if (id == null)
- return;
- if (lambdaParameters[i].Name != id.Identifier)
- return;
- i++;
- }
- AddIssue(expression, ctx.TranslateString("Expression can be reduced to delegate"), script => {
- script.Replace(expression, invocation.Target.Clone());
- });
- }
-
- public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
- {
- base.VisitLambdaExpression(lambdaExpression);
- AnalyzeExpression(lambdaExpression, lambdaExpression.Body, lambdaExpression.Parameters);
- }
-
- public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
- {
- base.VisitAnonymousMethodExpression(anonymousMethodExpression);
- AnalyzeExpression(anonymousMethodExpression, anonymousMethodExpression.Body, anonymousMethodExpression.Parameters);
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StaticFieldInGenericTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StaticFieldInGenericTypeIssue.cs
deleted file mode 100644
index dca93ef..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StaticFieldInGenericTypeIssue.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-//
-using System.Diagnostics.CodeAnalysis;
-
-
-// StaticFieldInGenericTypeIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 ICSharpCode.NRefactory.TypeSystem;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("Static field in generic type",
- Description = "Warns about static fields in generic types.",
- Category = IssueCategories.Notifications,
- Severity = Severity.Warning,
- SuppressMessageCategory = "Microsoft.Design",
- SuppressMessageCheckId = "CA1000:DoNotDeclareStaticMembersOnGenericTypes"
- )]
- public class StaticFieldInGenericTypeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<StaticFieldInGenericTypeIssue>
- {
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- }
-
- IList<ITypeParameter> availableTypeParameters = new List<ITypeParameter>();
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- var typeResolveResult = ctx.Resolve(typeDeclaration);
- var typeDefinition = typeResolveResult.Type.GetDefinition();
- if (typeDefinition == null)
- return;
- var newTypeParameters = typeDefinition.TypeParameters;
-
- var oldTypeParameters = availableTypeParameters;
- availableTypeParameters = Concat(availableTypeParameters, newTypeParameters);
-
- base.VisitTypeDeclaration(typeDeclaration);
-
- availableTypeParameters = oldTypeParameters;
- }
-
- static IList<ITypeParameter> Concat(params IList<ITypeParameter>[] lists)
- {
- return lists.SelectMany(l => l).ToList();
- }
-
- bool UsesAllTypeParameters(FieldDeclaration fieldDeclaration)
- {
- if (availableTypeParameters.Count == 0)
- return true;
-
- var fieldType = ctx.Resolve(fieldDeclaration.ReturnType).Type as ParameterizedType;
- if (fieldType == null)
- return false;
-
- // Check that all current type parameters are used in the field type
- var fieldTypeParameters = fieldType.TypeArguments;
- foreach (var typeParameter in availableTypeParameters) {
- if (!fieldTypeParameters.Contains(typeParameter))
- return false;
- }
- return true;
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- base.VisitFieldDeclaration(fieldDeclaration);
- if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Static) && !UsesAllTypeParameters(fieldDeclaration)) {
- AddIssue(fieldDeclaration, ctx.TranslateString("Static field in generic type"));
- }
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StringIsNullOrEmptyIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StringIsNullOrEmptyIssue.cs
deleted file mode 100644
index a96a67c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/StringIsNullOrEmptyIssue.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// StringIsNullOrEmptyInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.PatternMatching;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Checks for str == null && str == " "
- /// Converts to: string.IsNullOrEmpty (str)
- /// </summary>
- [IssueDescription("Use string.IsNullOrEmpty",
- Description = "Uses shorter string.IsNullOrEmpty call instead of a longer condition.",
- Category = IssueCategories.Improvements,
- Severity = Severity.Suggestion,
- ResharperDisableKeyword = "ReplaceWithStringIsNullOrEmpty")]
- public class StringIsNullOrEmptyIssue : ICodeIssueProvider
- {
- static readonly Pattern pattern = new Choice {
- // str == null || str == ""
- // str == null || str.Length == 0
- new BinaryOperatorExpression (
- PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.Equality, new NullReferenceExpression ()),
- BinaryOperatorType.ConditionalOr,
- new Choice {
- PatternHelper.CommutativeOperator (new Backreference ("str"), BinaryOperatorType.Equality, new PrimitiveExpression ("")),
- PatternHelper.CommutativeOperator (
- new MemberReferenceExpression (new Backreference ("str"), "Length"),
- BinaryOperatorType.Equality,
- new PrimitiveExpression (0)
- )
- }
- ),
- // str == "" || str == null
- // str.Length == 0 || str == null
- new BinaryOperatorExpression (
- new Choice {
- PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.Equality, new PrimitiveExpression ("")),
- PatternHelper.CommutativeOperator (
- new MemberReferenceExpression (new AnyNode ("str"), "Length"),
- BinaryOperatorType.Equality,
- new PrimitiveExpression (0)
- )
- },
- BinaryOperatorType.ConditionalOr,
- PatternHelper.CommutativeOperator(new Backreference ("str"), BinaryOperatorType.Equality, new NullReferenceExpression ())
- )
- };
-
- static readonly Pattern negPattern = new Choice {
- // str != null && str != ""
- // str != null && str.Length != 0
- new BinaryOperatorExpression (
- PatternHelper.CommutativeOperator(new AnyNode ("str"), BinaryOperatorType.InEquality, new NullReferenceExpression ()),
- BinaryOperatorType.ConditionalAnd,
- new Choice {
- PatternHelper.CommutativeOperator (new Backreference ("str"), BinaryOperatorType.InEquality, new PrimitiveExpression ("")),
- PatternHelper.CommutativeOperator (
- new MemberReferenceExpression (new Backreference ("str"), "Length"),
- BinaryOperatorType.InEquality,
- new PrimitiveExpression (0)
- )
- }
- ),
- // str != "" && str != null
- // str.Length != 0 && str != null
- new BinaryOperatorExpression (
- new Choice {
- PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.InEquality, new PrimitiveExpression ("")),
- PatternHelper.CommutativeOperator (
- new MemberReferenceExpression (new AnyNode ("str"), "Length"),
- BinaryOperatorType.InEquality,
- new PrimitiveExpression (0)
- )
- },
- BinaryOperatorType.ConditionalAnd,
- PatternHelper.CommutativeOperator(new Backreference ("str"), BinaryOperatorType.InEquality, new NullReferenceExpression ())
- )
- };
-
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<StringIsNullOrEmptyIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
- {
- }
-
- public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
- {
- base.VisitBinaryOperatorExpression(binaryOperatorExpression);
- Match m = pattern.Match(binaryOperatorExpression);
- bool isNegated = false;
- if (!m.Success) {
- m = negPattern.Match(binaryOperatorExpression);
- isNegated = true;
- }
- if (m.Success) {
- var str = m.Get<Expression>("str").Single();
- var def = ctx.Resolve (str).Type.GetDefinition ();
- if (def == null || def.KnownTypeCode != ICSharpCode.NRefactory.TypeSystem.KnownTypeCode.String)
- return;
- AddIssue(binaryOperatorExpression, ctx.TranslateString("Use string.IsNullOrEmpty"), script => {
- Expression expr = new PrimitiveType ("string").Invoke("IsNullOrEmpty", str.Clone());
- if (isNegated)
- expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr);
- script.Replace(binaryOperatorExpression, expr);
- });
- return;
- }
- }
-
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ConditionalTernaryEqualBranchIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ConditionalTernaryEqualBranchIssue.cs
new file mode 100644
index 0000000..2651ab6
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ConditionalTernaryEqualBranchIssue.cs
@@ -0,0 +1,67 @@
+//
+// ConditionalTernaryEqualBranchIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+
+ [IssueDescription ("'?:' expression has identical true and false branches",
+ Description = "'?:' expression has identical true and false branches.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
+ public class ConditionalTernaryEqualBranchIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ConditionalTernaryEqualBranchIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
+ {
+ base.VisitConditionalExpression (conditionalExpression);
+
+ if (!conditionalExpression.TrueExpression.Match (conditionalExpression.FalseExpression).Success)
+ return;
+ var action = new CodeAction (ctx.TranslateString ("Replace '?:' with branch"),
+ script => script.Replace (conditionalExpression, conditionalExpression.TrueExpression.Clone ()), conditionalExpression.QuestionMarkToken);
+ AddIssue (conditionalExpression,
+ ctx.TranslateString ("'?:' expression has identical true and false branches"), new [] { action });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/DoNotCallOverridableMethodsInConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/DoNotCallOverridableMethodsInConstructorIssue.cs
new file mode 100644
index 0000000..696e4df
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/DoNotCallOverridableMethodsInConstructorIssue.cs
@@ -0,0 +1,167 @@
+//
+// DoNotCallOverridableMethodsInConstructorIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Virtual member call in constructor",
+ Description = "Warns about calls to virtual member functions occuring in the constructor.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "DoNotCallOverridableMethodsInConstructor")]
+ public class DoNotCallOverridableMethodsInConstructorIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var gv = new GatherVisitor(context);
+ context.RootNode.AcceptVisitor(gv);
+ return gv.CallFinder.FoundIssues;
+ }
+
+ class GatherVisitor : GatherVisitorBase<DoNotCallOverridableMethodsInConstructorIssue>
+ {
+ internal readonly VirtualCallFinderVisitor CallFinder;
+
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ CallFinder = new VirtualCallFinderVisitor(context);
+ }
+
+ bool isSealedType;
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ if (typeDeclaration.ClassType != ClassType.Class && typeDeclaration.ClassType != ClassType.Struct)
+ return;
+ bool oldIsSealedType = isSealedType;
+ isSealedType = typeDeclaration.Modifiers.HasFlag(Modifiers.Sealed);
+ CallFinder.CurrentType = typeDeclaration;
+ base.VisitTypeDeclaration(typeDeclaration);
+ isSealedType = oldIsSealedType;
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ if (isSealedType)
+ return;
+ var body = constructorDeclaration.Body;
+ if (body == null || body.IsNull)
+ return;
+ body.AcceptVisitor(CallFinder);
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ // nothing
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ // nothing
+ }
+
+ public override void VisitIndexerExpression(IndexerExpression indexerExpression)
+ {
+ // nothing
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ // nothing
+ }
+
+ public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
+ {
+ // nothing
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ // nothing
+ }
+
+ public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
+ {
+ // nothing
+ }
+ }
+
+ class VirtualCallFinderVisitor: GatherVisitorBase<DoNotCallOverridableMethodsInConstructorIssue>
+ {
+ readonly BaseRefactoringContext context;
+ public TypeDeclaration CurrentType;
+ public VirtualCallFinderVisitor(BaseRefactoringContext context) : base(context)
+ {
+ this.context = context;
+ }
+
+
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+ if (!IsCallDependentOnCurrentInstance(invocationExpression))
+ // Call within current class scope without 'this' or 'base'
+ return;
+ var targetMethod = context.Resolve(invocationExpression) as InvocationResolveResult;
+ if (targetMethod == null)
+ return;
+ if (targetMethod.IsVirtualCall) {
+ AddIssue(invocationExpression,
+ context.TranslateString("Virtual member call in constructor"),
+ new CodeAction(string.Format(context.TranslateString("Make class '{0}' sealed"), CurrentType.Name),
+ script => script.ChangeModifier(CurrentType, CurrentType.Modifiers | Modifiers.Sealed),
+ invocationExpression));
+ }
+ }
+
+ bool IsCallDependentOnCurrentInstance(InvocationExpression invocationExpression)
+ {
+ if (invocationExpression.Target is IdentifierExpression)
+ // Call within current class scope without 'this' or 'base'
+ return true;
+ var expression = invocationExpression.Target as MemberReferenceExpression;
+ if (expression == null || expression.Target is ThisReferenceExpression)
+ // Call within current class scope using 'this' or 'base'
+ return true;
+ return false;
+ }
+
+ public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
+ {
+ // ignore lambdas
+ }
+
+ public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
+ {
+ // ignore anonymous methods
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ForControlVariableIsNeverModifiedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ForControlVariableIsNeverModifiedIssue.cs
new file mode 100644
index 0000000..86fb772
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ForControlVariableIsNeverModifiedIssue.cs
@@ -0,0 +1,134 @@
+//
+// ForControlVariableIsNeverModifiedIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("'for' loop control variable is never modified",
+ Description = "'for' loop control variable is never modified.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "ForControlVariableIsNeverModified")]
+ public class ForControlVariableIsNeverModifiedIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ForControlVariableIsNeverModifiedIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ static VariableInitializer GetControlVariable(VariableDeclarationStatement variableDecl,
+ BinaryOperatorExpression condition)
+ {
+ var controlVariables = variableDecl.Variables.Where (
+ v =>
+ {
+ var identifier = new IdentifierExpression (v.Name);
+ return condition.Left.Match (identifier).Success ||
+ condition.Right.Match (identifier).Success;
+ }).ToList ();
+ return controlVariables.Count == 1 ? controlVariables [0] : null;
+ }
+
+ static VariableInitializer GetControlVariable(VariableDeclarationStatement variableDecl,
+ UnaryOperatorExpression condition)
+ {
+ var controlVariables = variableDecl.Variables.Where (
+ v =>
+ {
+ var identifier = new IdentifierExpression (v.Name);
+ return condition.Expression.Match (identifier).Success;
+ }).ToList ();
+ return controlVariables.Count == 1 ? controlVariables [0] : null;
+ }
+
+ public override void VisitForStatement (ForStatement forStatement)
+ {
+ base.VisitForStatement (forStatement);
+
+ if (forStatement.Initializers.Count != 1)
+ return;
+ var variableDecl = forStatement.Initializers.First () as VariableDeclarationStatement;
+ if (variableDecl == null)
+ return;
+
+ VariableInitializer controlVariable = null;
+ if (forStatement.Condition is BinaryOperatorExpression) {
+ controlVariable = GetControlVariable (variableDecl, (BinaryOperatorExpression)forStatement.Condition);
+ } else if (forStatement.Condition is UnaryOperatorExpression) {
+ controlVariable = GetControlVariable (variableDecl, (UnaryOperatorExpression)forStatement.Condition);
+ } else if (forStatement.Condition is IdentifierExpression) {
+ controlVariable = variableDecl.Variables.FirstOrDefault (
+ v => v.Name == ((IdentifierExpression)forStatement.Condition).Identifier);
+ }
+
+ if (controlVariable == null)
+ return;
+
+ var localResolveResult = ctx.Resolve (controlVariable) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+
+ var results = ctx.FindReferences (forStatement, localResolveResult.Variable);
+ var modified = false;
+ foreach (var result in results) {
+ if (modified)
+ break;
+ var node = result.Node;
+ var unary = node.Parent as UnaryOperatorExpression;
+ if (unary != null && unary.Expression == node) {
+ modified = unary.Operator == UnaryOperatorType.Decrement ||
+ unary.Operator == UnaryOperatorType.PostDecrement ||
+ unary.Operator == UnaryOperatorType.Increment ||
+ unary.Operator == UnaryOperatorType.PostIncrement;
+ continue;
+ }
+
+ var assignment = node.Parent as AssignmentExpression;
+ modified = assignment != null && assignment.Left == node;
+ }
+
+ if (!modified)
+ AddIssue (controlVariable.NameToken,
+ ctx.TranslateString ("'for' loop control variable is never modified"));
+
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/LocalVariableHidesMemberIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/LocalVariableHidesMemberIssue.cs
new file mode 100644
index 0000000..368aa76
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/LocalVariableHidesMemberIssue.cs
@@ -0,0 +1,182 @@
+//
+// LocalVariableHideFieldIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+using ICSharpCode.NRefactory.TypeSystem;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Local variable hides member",
+ Description = "Local variable has the same name as a member and hides it.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "LocalVariableHidesMember")]
+ public class LocalVariableHidesMemberIssue : VariableHidesMemberIssue
+ {
+ public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<LocalVariableHidesMemberIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitVariableInitializer (VariableInitializer variableInitializer)
+ {
+ base.VisitVariableInitializer(variableInitializer);
+
+ if (!(ctx.Resolve (variableInitializer) is LocalResolveResult))
+ return;
+ var mre = variableInitializer.Initializer as MemberReferenceExpression;
+ if (mre != null && mre.MemberName == variableInitializer.Name && mre.Target is ThisReferenceExpression) {
+ // Special case: the variable is initialized from the member it is hiding
+ // In this case, the hiding is obviously intentional and we shouldn't show a warning.
+ return;
+ }
+ CheckLocal(variableInitializer, variableInitializer.Name, variableInitializer.NameToken);
+ }
+
+ void CheckLocal(AstNode node, string name, AstNode token)
+ {
+ IMember member;
+ if (HidesMember(ctx, node, name, out member)) {
+ string msg;
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
+ msg = ctx.TranslateString("Local variable '{0}' hides field '{1}'");
+ break;
+ case SymbolKind.Method:
+ msg = ctx.TranslateString("Local variable '{0}' hides method '{1}'");
+ break;
+ case SymbolKind.Property:
+ msg = ctx.TranslateString("Local variable '{0}' hides property '{1}'");
+ break;
+ case SymbolKind.Event:
+ msg = ctx.TranslateString("Local variable '{0}' hides event '{1}'");
+ break;
+ default:
+ msg = ctx.TranslateString("Local variable '{0}' hides member '{1}'");
+ break;
+ }
+ AddIssue(token, string.Format(msg, name, member.FullName));
+ }
+ }
+
+ public override void VisitForeachStatement (ForeachStatement foreachStatement)
+ {
+ base.VisitForeachStatement (foreachStatement);
+
+ CheckLocal(foreachStatement, foreachStatement.VariableName, foreachStatement.VariableNameToken);
+ }
+ }
+ }
+
+ public abstract class VariableHidesMemberIssue : ICodeIssueProvider
+ {
+ public abstract IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context);
+
+ protected static bool HidesMember(BaseRefactoringContext ctx, AstNode node, string variableName)
+ {
+ IMember member;
+ return HidesMember(ctx, node, variableName, out member);
+ }
+
+ protected static bool HidesMember(BaseRefactoringContext ctx, AstNode node, string variableName, out IMember member)
+ {
+ var typeDecl = node.GetParent<TypeDeclaration>();
+ member = null;
+ if (typeDecl == null)
+ return false;
+ var entityDecl = node.GetParent<EntityDeclaration>();
+ var memberResolveResult = ctx.Resolve(entityDecl) as MemberResolveResult;
+ if (memberResolveResult == null)
+ return false;
+ var typeResolveResult = ctx.Resolve(typeDecl) as TypeResolveResult;
+ if (typeResolveResult == null)
+ return false;
+
+ var sourceMember = memberResolveResult.Member;
+
+ member = typeResolveResult.Type.GetMembers(m => m.Name == variableName).FirstOrDefault(m2 => IsAccessible(sourceMember, m2));
+ return member != null;
+ }
+
+ static bool IsAccessible(IMember sourceMember, IMember targetMember)
+ {
+ if (sourceMember.IsStatic != targetMember.IsStatic)
+ return false;
+
+ var sourceType = sourceMember.DeclaringType;
+ var targetType = targetMember.DeclaringType;
+ switch (targetMember.Accessibility)
+ {
+ case Accessibility.None:
+ return false;
+ case Accessibility.Private:
+ // check for members of outer classes (private members of outer classes can be accessed)
+ var targetTypeDefinition = targetType.GetDefinition();
+ for (var t = sourceType.GetDefinition(); t != null; t = t.DeclaringTypeDefinition)
+ {
+ if (t.Equals(targetTypeDefinition))
+ return true;
+ }
+ return false;
+ case Accessibility.Public:
+ return true;
+ case Accessibility.Protected:
+ return IsProtectedAccessible(sourceType, targetType);
+ case Accessibility.Internal:
+ return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly);
+ case Accessibility.ProtectedOrInternal:
+ return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly) || IsProtectedAccessible(sourceType, targetType);
+ case Accessibility.ProtectedAndInternal:
+ return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly) && IsProtectedAccessible(sourceType, targetType);
+ default:
+ throw new Exception("Invalid value for Accessibility");
+ }
+ }
+
+ static bool IsProtectedAccessible(IType sourceType, IType targetType)
+ {
+ return sourceType.GetAllBaseTypes().Any(type => targetType.Equals(type));
+ }
+
+ static bool IsInternalAccessible(IAssembly sourceAssembly, IAssembly targetAssembly)
+ {
+ return sourceAssembly.InternalsVisibleTo(targetAssembly);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ParameterHidesMemberIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ParameterHidesMemberIssue.cs
new file mode 100644
index 0000000..fa6208a
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ParameterHidesMemberIssue.cs
@@ -0,0 +1,85 @@
+//
+// ParameterHidesMemberIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Parameter hides a member",
+ Description = "Parameter has the same name as a member and hides it.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "ParameterHidesMember")]
+ public class ParameterHidesMemberIssue : VariableHidesMemberIssue
+ {
+ public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ParameterHidesMemberIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration (parameterDeclaration);
+
+ if (parameterDeclaration.Parent is ConstructorDeclaration)
+ return;
+ IMember member;
+ if (HidesMember(ctx, parameterDeclaration, parameterDeclaration.Name, out member)) {
+ string msg;
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
+ msg = ctx.TranslateString("Parameter '{0}' hides field '{1}'");
+ break;
+ case SymbolKind.Method:
+ msg = ctx.TranslateString("Parameter '{0}' hides method '{1}'");
+ break;
+ case SymbolKind.Property:
+ msg = ctx.TranslateString("Parameter '{0}' hides property '{1}'");
+ break;
+ case SymbolKind.Event:
+ msg = ctx.TranslateString("Parameter '{0}' hides event '{1}'");
+ break;
+ default:
+ msg = ctx.TranslateString("Parameter '{0}' hides member '{1}'");
+ break;
+ }
+ AddIssue(parameterDeclaration.NameToken,
+ string.Format(msg, parameterDeclaration.Name, member.FullName));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/StaticFieldInGenericTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/StaticFieldInGenericTypeIssue.cs
new file mode 100644
index 0000000..e6a6b57
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/StaticFieldInGenericTypeIssue.cs
@@ -0,0 +1,107 @@
+//
+// StaticFieldInGenericTypeIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+using System.Diagnostics.CodeAnalysis;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Static field in generic type",
+ Description = "Warns about static fields in generic types.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ SuppressMessageCategory = "Microsoft.Design",
+ SuppressMessageCheckId = "CA1000:DoNotDeclareStaticMembersOnGenericTypes",
+ ResharperDisableKeyword = "StaticFieldInGenericType"
+ )]
+ public class StaticFieldInGenericTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<StaticFieldInGenericTypeIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ IList<ITypeParameter> availableTypeParameters = new List<ITypeParameter>();
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ var typeResolveResult = ctx.Resolve(typeDeclaration);
+ var typeDefinition = typeResolveResult.Type.GetDefinition();
+ if (typeDefinition == null)
+ return;
+ var newTypeParameters = typeDefinition.TypeParameters;
+
+ var oldTypeParameters = availableTypeParameters;
+ availableTypeParameters = Concat(availableTypeParameters, newTypeParameters);
+
+ base.VisitTypeDeclaration(typeDeclaration);
+
+ availableTypeParameters = oldTypeParameters;
+ }
+
+ static IList<ITypeParameter> Concat(params IList<ITypeParameter>[] lists)
+ {
+ return lists.SelectMany(l => l).ToList();
+ }
+
+ bool UsesAllTypeParameters(FieldDeclaration fieldDeclaration)
+ {
+ if (availableTypeParameters.Count == 0)
+ return true;
+
+ var fieldType = ctx.Resolve(fieldDeclaration.ReturnType).Type as ParameterizedType;
+ if (fieldType == null)
+ return false;
+
+ // Check that all current type parameters are used in the field type
+ var fieldTypeParameters = fieldType.TypeArguments;
+ foreach (var typeParameter in availableTypeParameters) {
+ if (!fieldTypeParameters.Contains(typeParameter))
+ return false;
+ }
+ return true;
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ base.VisitFieldDeclaration(fieldDeclaration);
+ if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Static) && !UsesAllTypeParameters(fieldDeclaration)) {
+ AddIssue(fieldDeclaration, ctx.TranslateString("Static field in generic type"));
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ThreadStaticAtInstanceFieldIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ThreadStaticAtInstanceFieldIssue.cs
new file mode 100644
index 0000000..c4ab175
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ThreadStaticAtInstanceFieldIssue.cs
@@ -0,0 +1,108 @@
+//
+// ThreadStaticAtInstanceFieldIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using System;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("[ThreadStatic] doesn't work with instance fields",
+ Description = "[ThreadStatic] doesn't work with instance fields",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "ThreadStaticAtInstanceField")]
+ public class ThreadStaticAtInstanceFieldIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ThreadStaticAtInstanceFieldIssue>
+ {
+ IType threadStaticAttribute;
+
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ threadStaticAttribute = ctx.Compilation.FindType(typeof(ThreadStaticAttribute));
+ }
+
+ public override void VisitBlockStatement(BlockStatement blockStatement)
+ {
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ if (fieldDeclaration.HasModifier(Modifiers.Static))
+ return;
+
+ foreach (var attributeSection in fieldDeclaration.Attributes) {
+ int attributeCount = attributeSection.Attributes.Count;
+ foreach (var attribute in attributeSection.Attributes) {
+ var resolvedAttribute = ctx.Resolve(attribute.Type) as TypeResolveResult;
+ if (resolvedAttribute == null)
+ continue;
+ if (threadStaticAttribute.Equals(resolvedAttribute.Type)) {
+ string title = ctx.TranslateString("ThreadStatic does nothing on instance fields");
+ if (attributeCount == 1)
+ AddIssue(attributeSection, title, GetActions(attribute, attributeSection, fieldDeclaration));
+ else
+ AddIssue(attribute, title, GetActions(attribute, attributeSection, fieldDeclaration));
+ }
+ }
+ }
+ }
+
+ IEnumerable<CodeAction> GetActions(Attribute attribute, AttributeSection attributeSection, FieldDeclaration fieldDeclaration)
+ {
+ string removeAttributeMessage = ctx.TranslateString("Remove attribute");
+ yield return new CodeAction(removeAttributeMessage, script => {
+ if (attributeSection.Attributes.Count > 1) {
+ var newSection = new AttributeSection();
+ newSection.AttributeTarget = attributeSection.AttributeTarget;
+ foreach (var attr in attributeSection.Attributes) {
+ if (attr != attribute)
+ newSection.Attributes.Add((Attribute)attr.Clone());
+ }
+ script.Replace(attributeSection, newSection);
+ } else {
+ script.Remove(attributeSection);
+ }
+ }, attribute);
+
+ var makeStaticMessage = ctx.TranslateString("Make the field static");
+ yield return new CodeAction(makeStaticMessage, script => {
+ var newDeclaration = (FieldDeclaration)fieldDeclaration.Clone();
+ newDeclaration.Modifiers |= Modifiers.Static;
+ script.Replace(fieldDeclaration, newDeclaration);
+ }, fieldDeclaration.NameToken);
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ValueParameterNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ValueParameterNotUsedIssue.cs
new file mode 100644
index 0000000..6210588
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CodeQuality/ValueParameterNotUsedIssue.cs
@@ -0,0 +1,109 @@
+//
+// SetterDoesNotUseValueParameterTests.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Threading;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("'value' parameter not used",
+ Description = "Warns about property or indexer setters and event adders or removers that do not use the value parameter.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "ValueParameterNotUsed")]
+ public class ValueParameterNotUsedIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ValueParameterNotUsedIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context, ValueParameterNotUsedIssue inspector) : base (context)
+ {
+ }
+
+ public override void VisitAccessor(Accessor accessor)
+ {
+ if (accessor.Role == PropertyDeclaration.SetterRole) {
+ FindIssuesInAccessor(accessor, ctx.TranslateString("The setter does not use the 'value' parameter"));
+ } else if (accessor.Role == CustomEventDeclaration.AddAccessorRole) {
+ FindIssuesInAccessor(accessor, ctx.TranslateString("The add accessor does not use the 'value' parameter"));
+ } else if (accessor.Role == CustomEventDeclaration.RemoveAccessorRole) {
+ FindIssuesInAccessor(accessor, ctx.TranslateString("The remove accessor does not use the 'value' parameter"));
+ }
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ if (eventDeclaration.AddAccessor.Body.Statements.Count == 0 && eventDeclaration.RemoveAccessor.Body.Statements.Count == 0)
+ return;
+
+ base.VisitCustomEventDeclaration(eventDeclaration);
+ }
+
+ void FindIssuesInAccessor(Accessor accessor, string accessorName)
+ {
+ var body = accessor.Body;
+ if (!IsEligible(body))
+ return;
+
+ var localResolveResult = ctx.GetResolverStateBefore(body)
+ .LookupSimpleNameOrTypeName("value", new List<IType>(), NameLookupMode.Expression) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+
+ bool referenceFound = false;
+ foreach (var result in ctx.FindReferences (body, localResolveResult.Variable)) {
+ var node = result.Node;
+ if (node.StartLocation >= body.StartLocation && node.EndLocation <= body.EndLocation) {
+ referenceFound = true;
+ break;
+ }
+ }
+
+ if(!referenceFound)
+ AddIssue(accessor.Keyword, accessorName);
+ }
+
+ static bool IsEligible(BlockStatement body)
+ {
+ if (body == null || body.IsNull)
+ return false;
+ if (body.Statements.FirstOrNullObject() is ThrowStatement)
+ return false;
+ return true;
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CompilerWarnings/CS1717AssignmentMadeToSameVariableIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CompilerWarnings/CS1717AssignmentMadeToSameVariableIssue.cs
new file mode 100644
index 0000000..17bd3d2
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/CompilerWarnings/CS1717AssignmentMadeToSameVariableIssue.cs
@@ -0,0 +1,102 @@
+//
+// CS1717AssignmentMadeToSameVariableIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("CS1717:Assignment made to same variable",
+ Description = "CS1717:Assignment made to same variable.",
+ Category = IssueCategories.CompilerWarnings,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ PragmaWarning = 1717,
+ ResharperDisableKeyword = "CSharpWarnings::CS1717")]
+ public class CS1717AssignmentMadeToSameVariableIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CS1717AssignmentMadeToSameVariableIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitAssignmentExpression (AssignmentExpression assignmentExpression)
+ {
+ base.VisitAssignmentExpression (assignmentExpression);
+
+ if (assignmentExpression.Operator != AssignmentOperatorType.Assign)
+ return;
+ if (!(assignmentExpression.Left is IdentifierExpression) &&
+ !(assignmentExpression.Left is MemberReferenceExpression))
+ return;
+
+ var resolveResult = ctx.Resolve (assignmentExpression.Left);
+ var memberResolveResult = resolveResult as MemberResolveResult;
+ if (memberResolveResult != null) {
+ var memberResolveResult2 = ctx.Resolve (assignmentExpression.Right) as MemberResolveResult;
+ if (memberResolveResult2 == null || !AreEquivalent(memberResolveResult, memberResolveResult2))
+ return;
+ } else if (resolveResult is LocalResolveResult) {
+ if (!assignmentExpression.Left.Match (assignmentExpression.Right).Success)
+ return;
+ } else {
+ return;
+ }
+
+ AstNode node;
+ Action<Script> action;
+ if (assignmentExpression.Parent is ExpressionStatement) {
+ node = assignmentExpression.Parent;
+ action = script => script.Remove (assignmentExpression.Parent);
+ } else {
+ node = assignmentExpression;
+ action = script => script.Replace (assignmentExpression, assignmentExpression.Left.Clone ());
+ }
+ AddIssue (node, ctx.TranslateString ("CS1717:Assignment made to same variable"),
+ new [] { new CodeAction (ctx.TranslateString ("Remove assignment"), action, node) });
+ }
+
+ static bool AreEquivalent(ResolveResult first, ResolveResult second)
+ {
+ var firstPath = AccessPath.FromResolveResult(first);
+ var secondPath = AccessPath.FromResolveResult(second);
+ return firstPath != null && firstPath.Equals(secondPath) && !firstPath.MemberPath.Any(m => !(m is IField));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/AffectedEntity.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/AffectedEntity.cs
new file mode 100644
index 0000000..c34a0be
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/AffectedEntity.cs
@@ -0,0 +1,78 @@
+//
+// AffectedEntity.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [Flags]
+ public enum AffectedEntity
+ {
+ None,
+
+ Namespace = 1 << 0,
+
+ Class = 1 << 1,
+ Struct = 1 << 2,
+ Enum = 1 << 3,
+ Interface = 1 << 4,
+ Delegate = 1 << 5,
+
+ CustomAttributes = 1 << 6,
+ CustomEventArgs = 1 << 7,
+ CustomExceptions = 1 << 8,
+
+ Property = 1 << 9,
+ Method = 1 << 10,
+ AsyncMethod = 1 << 11,
+ Field = 1 << 12,
+ ReadonlyField = 1 << 13,
+ ConstantField = 1 << 14,
+
+ Event = 1 << 15,
+ EnumMember = 1 << 16,
+
+ Parameter = 1 << 17,
+ TypeParameter = 1 << 18,
+
+ // Unit test special case
+ TestType = 1 << 19,
+ TestMethod = 1 << 20,
+
+ // private entities
+ LambdaParameter = 1 << 21,
+ LocalVariable = 1 << 22,
+ LocalConstant = 1 << 23,
+ Label = 1 << 24,
+
+ LocalVars = LocalVariable | Parameter | LambdaParameter | LocalConstant,
+ Methods = Method | AsyncMethod,
+ Fields = Field | ReadonlyField | ConstantField,
+ Member = Property | Methods | Fields | Event | EnumMember,
+
+ Type = Class | Struct | Enum | Interface | Delegate,
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/DefaultRules.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/DefaultRules.cs
new file mode 100644
index 0000000..73f1479
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/DefaultRules.cs
@@ -0,0 +1,135 @@
+//
+// DefaultRules.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public static class DefaultRules
+ {
+ public static IEnumerable<NamingRule> GetFdgRules()
+ {
+ yield return new NamingRule(AffectedEntity.Namespace) {
+ Name = "Namespaces",
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.Class | AffectedEntity.Struct | AffectedEntity.Enum | AffectedEntity.Delegate) {
+ Name = "Types",
+ VisibilityMask = Modifiers.Public,
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.Interface) {
+ Name = "Interfaces",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public,
+ RequiredPrefixes = new [] { "I" }
+ };
+
+ yield return new NamingRule(AffectedEntity.CustomAttributes) {
+ Name = "Attributes",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public,
+ RequiredSuffixes = new [] { "Attribute" }
+ };
+
+ yield return new NamingRule(AffectedEntity.CustomEventArgs) {
+ Name = "Event Arguments",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public,
+ RequiredSuffixes = new [] { "EventArgs" }
+ };
+
+ yield return new NamingRule(AffectedEntity.CustomExceptions) {
+ Name = "Exceptions",
+ NamingStyle = NamingStyle.PascalCase,
+ RequiredSuffixes = new [] { "Exception" }
+ };
+
+ yield return new NamingRule(AffectedEntity.Methods) {
+ Name = "Methods",
+ VisibilityMask = Modifiers.Public | Modifiers.Protected,
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.ReadonlyField) {
+ Name = "Static Readonly Fields",
+ VisibilityMask = Modifiers.Public | Modifiers.Protected,
+ NamingStyle = NamingStyle.PascalCase,
+ IncludeInstanceMembers = false
+ };
+
+ yield return new NamingRule(AffectedEntity.Field) {
+ Name = "Fields",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public | Modifiers.Protected
+ };
+
+ yield return new NamingRule(AffectedEntity.ReadonlyField) {
+ Name = "ReadOnly Fields",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public | Modifiers.Protected,
+ IncludeStaticEntities = false
+ };
+
+ yield return new NamingRule(AffectedEntity.ConstantField) {
+ Name = "Constant Fields",
+ NamingStyle = NamingStyle.PascalCase,
+ VisibilityMask = Modifiers.Public | Modifiers.Protected
+ };
+
+ yield return new NamingRule(AffectedEntity.Property) {
+ Name = "Properties",
+ VisibilityMask = Modifiers.Public | Modifiers.Protected,
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.Event) {
+ Name = "Events",
+ VisibilityMask = Modifiers.Public | Modifiers.Protected,
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.EnumMember) {
+ Name = "Enum Members",
+ NamingStyle = NamingStyle.PascalCase
+ };
+
+ yield return new NamingRule(AffectedEntity.Parameter) {
+ Name = "Parameters",
+ NamingStyle = NamingStyle.CamelCase
+ };
+
+ yield return new NamingRule(AffectedEntity.TypeParameter) {
+ Name = "Type Parameters",
+ NamingStyle = NamingStyle.PascalCase,
+ RequiredPrefixes = new [] { "T" }
+ };
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/InconsistentNamingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/InconsistentNamingIssue.cs
new file mode 100644
index 0000000..4bc5778
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/InconsistentNamingIssue.cs
@@ -0,0 +1,374 @@
+//
+// InconsistentNamingIssue.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Inconsistent Naming",
+ Description = "Name doesn't match the defined style for this entity.",
+ Category = IssueCategories.ConstraintViolations,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "InconsistentNaming")]
+ public class InconsistentNamingIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var visitor = new GatherVisitor(context);
+ context.RootNode.AcceptVisitor(visitor);
+ return visitor.FoundIssues;
+ }
+
+ class GatherVisitor : GatherVisitorBase<InconsistentNamingIssue>
+ {
+ readonly NamingConventionService service;
+
+ public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
+ {
+ service = (NamingConventionService)ctx.GetService (typeof (NamingConventionService));
+ }
+
+ void CheckName(TypeDeclaration node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
+ {
+ TypeResolveResult resolveResult = ctx.Resolve(node) as TypeResolveResult;
+ if (resolveResult == null)
+ return;
+ var type = resolveResult.Type;
+ if (type.DirectBaseTypes.Any(t => t.FullName == "System.Attribute")) {
+ if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomAttributes, identifier, accessibilty)) {
+ return;
+ }
+ } else if (type.DirectBaseTypes.Any(t => t.FullName == "System.EventArgs")) {
+ if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomEventArgs, identifier, accessibilty)) {
+ return;
+ }
+ } else if (type.DirectBaseTypes.Any(t => t.FullName == "System.Exception")) {
+ if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.CustomExceptions, identifier, accessibilty)) {
+ return;
+ }
+ }
+
+ var typeDef = type.GetDefinition();
+ if (typeDef != null && typeDef.Attributes.Any(attr => attr.AttributeType.FullName == "NUnit.Framework.TestFixtureAttribute")) {
+ if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.TestType, identifier, accessibilty)) {
+ return;
+ }
+ }
+
+ CheckNamedResolveResult(resolveResult, node, entity, identifier, accessibilty);
+ }
+
+ void CheckName(MethodDeclaration node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
+ {
+ ResolveResult resolveResult = null;
+ if (node != null && node.Attributes.Any ())
+ resolveResult = ctx.Resolve(node);
+
+ if (resolveResult is MemberResolveResult) {
+ var member = ((MemberResolveResult)resolveResult).Member;
+ if (member.SymbolKind == SymbolKind.Method && member.Attributes.Any(attr => attr.AttributeType.FullName == "NUnit.Framework.TestAttribute")) {
+ if (CheckNamedResolveResult(resolveResult, node, AffectedEntity.TestMethod, identifier, accessibilty)) {
+ return;
+ }
+ }
+ }
+
+ CheckNamedResolveResult(resolveResult, node, entity, identifier, accessibilty);
+ }
+
+ void CheckName(AstNode node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
+ {
+ CheckNamedResolveResult(null, node, entity, identifier, accessibilty);
+ }
+
+ bool CheckNamedResolveResult(ResolveResult resolveResult, AstNode node, AffectedEntity entity, Identifier identifier, Modifiers accessibilty)
+ {
+ bool wasHandled = false;
+ foreach (var rule in service.Rules) {
+ if (!rule.AffectedEntity.HasFlag(entity)) {
+ continue;
+ }
+ if (!rule.VisibilityMask.HasFlag(accessibilty)) {
+ continue;
+ }
+ if (!rule.IncludeInstanceMembers || !rule.IncludeStaticEntities) {
+ EntityDeclaration typeSystemEntity;
+ if (node is VariableInitializer) {
+ typeSystemEntity = node.Parent as EntityDeclaration;
+ } else {
+ typeSystemEntity = node as EntityDeclaration;
+ }
+ if (!rule.IncludeInstanceMembers) {
+ if (typeSystemEntity == null || !typeSystemEntity.HasModifier (Modifiers.Static) || typeSystemEntity.HasModifier (Modifiers.Sealed)) {
+ continue;
+ }
+ }
+ if (!rule.IncludeStaticEntities) {
+ if (typeSystemEntity == null || typeSystemEntity.HasModifier (Modifiers.Static) || typeSystemEntity.HasModifier (Modifiers.Sealed)) {
+ continue;
+ }
+ }
+ }
+
+ wasHandled = true;
+ if (!rule.IsValid(identifier.Name)) {
+ IList<string> suggestedNames;
+ var msg = rule.GetErrorMessage(ctx, identifier.Name, out suggestedNames);
+ var actions = new List<CodeAction>(suggestedNames.Select(n => new CodeAction(string.Format(ctx.TranslateString("Rename to '{0}'"), n), (Script script) => {
+ if (resolveResult == null)
+ resolveResult = ctx.Resolve (node);
+ if (resolveResult is MemberResolveResult) {
+ script.Rename(((MemberResolveResult)resolveResult).Member, n);
+ } else if (resolveResult is TypeResolveResult) {
+ var def = resolveResult.Type.GetDefinition();
+ if (def != null) {
+ script.Rename(def, n);
+ } else if (resolveResult.Type.Kind == TypeKind.TypeParameter) {
+ script.Rename((ITypeParameter)resolveResult.Type, n);
+ }
+ } else if (resolveResult is LocalResolveResult) {
+ script.Rename(((LocalResolveResult)resolveResult).Variable, n);
+ } else if (resolveResult is NamespaceResolveResult) {
+ script.Rename(((NamespaceResolveResult)resolveResult).Namespace, n);
+ } else {
+ script.Replace(identifier, Identifier.Create(n));
+ }
+ }, identifier)));
+
+ if (entity != AffectedEntity.Label) {
+ actions.Add(new CodeAction(string.Format(ctx.TranslateString("Rename '{0}'..."), identifier.Name), (Script script) => {
+ if (resolveResult == null)
+ resolveResult = ctx.Resolve (node);
+ if (resolveResult is MemberResolveResult) {
+ script.Rename(((MemberResolveResult)resolveResult).Member);
+ } else if (resolveResult is TypeResolveResult) {
+ var def = resolveResult.Type.GetDefinition();
+ if (def != null) {
+ script.Rename(def);
+ } else if (resolveResult.Type.Kind == TypeKind.TypeParameter) {
+ script.Rename((ITypeParameter)resolveResult.Type);
+ }
+ } else if (resolveResult is LocalResolveResult) {
+ script.Rename(((LocalResolveResult)resolveResult).Variable);
+ } else if (resolveResult is NamespaceResolveResult) {
+ script.Rename(((NamespaceResolveResult)resolveResult).Namespace);
+ }
+ }, identifier));
+ }
+
+ AddIssue(identifier, msg, actions);
+ }
+ }
+ return wasHandled;
+ }
+
+ public override void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
+ {
+ base.VisitNamespaceDeclaration(namespaceDeclaration);
+ var type = namespaceDeclaration.NamespaceName;
+ while (type is MemberType) {
+ var mt = (MemberType)type;
+ CheckNamedResolveResult(null, namespaceDeclaration, AffectedEntity.Namespace, mt.MemberNameToken, Modifiers.None);
+ type = mt.Target;
+ }
+ if (type is SimpleType)
+ CheckNamedResolveResult(null, namespaceDeclaration, AffectedEntity.Namespace, ((SimpleType)type).IdentifierToken, Modifiers.None);
+ }
+
+ Modifiers GetAccessibiltiy(EntityDeclaration decl, Modifiers defaultModifier)
+ {
+ var accessibility = (decl.Modifiers & Modifiers.VisibilityMask);
+ if (accessibility == Modifiers.None) {
+ return defaultModifier;
+ }
+ return accessibility;
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ base.VisitTypeDeclaration(typeDeclaration);
+ AffectedEntity entity;
+ switch (typeDeclaration.ClassType) {
+ case ClassType.Class:
+ entity = AffectedEntity.Class;
+ break;
+ case ClassType.Struct:
+ entity = AffectedEntity.Struct;
+ break;
+ case ClassType.Interface:
+ entity = AffectedEntity.Interface;
+ break;
+ case ClassType.Enum:
+ entity = AffectedEntity.Enum;
+ break;
+ default:
+ throw new System.ArgumentOutOfRangeException();
+ }
+ CheckName(typeDeclaration, entity, typeDeclaration.NameToken, GetAccessibiltiy(typeDeclaration, typeDeclaration.Parent is TypeDeclaration ? Modifiers.Private : Modifiers.Internal));
+ }
+
+ public override void VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
+ {
+ base.VisitDelegateDeclaration(delegateDeclaration);
+ CheckName(delegateDeclaration, AffectedEntity.Delegate, delegateDeclaration.NameToken, GetAccessibiltiy(delegateDeclaration, delegateDeclaration.Parent is TypeDeclaration ? Modifiers.Private : Modifiers.Internal));
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ if (propertyDeclaration.Modifiers.HasFlag (Modifiers.Override))
+ return;
+ base.VisitPropertyDeclaration(propertyDeclaration);
+ CheckName(propertyDeclaration, AffectedEntity.Property, propertyDeclaration.NameToken, GetAccessibiltiy(propertyDeclaration, Modifiers.Private));
+ }
+
+ public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
+ {
+ if (indexerDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
+ var rr = ctx.Resolve (indexerDeclaration) as MemberResolveResult;
+ if (rr == null)
+ return;
+ var baseType = rr.Member.DeclaringType.DirectBaseTypes.FirstOrDefault (t => t.Kind != TypeKind.Interface);
+ var method = baseType != null ? baseType.GetProperties (m => m.IsIndexer && m.IsOverridable && m.Parameters.Count == indexerDeclaration.Parameters.Count).FirstOrDefault () : null;
+ if (method == null)
+ return;
+ int i = 0;
+ foreach (var par in indexerDeclaration.Parameters) {
+ if (method.Parameters[i++].Name != par.Name) {
+ par.AcceptVisitor (this);
+ }
+ }
+ return;
+ }
+ base.VisitIndexerDeclaration(indexerDeclaration);
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ if (methodDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
+ var rr = ctx.Resolve (methodDeclaration) as MemberResolveResult;
+ if (rr == null)
+ return;
+ var baseType = rr.Member.DeclaringType.DirectBaseTypes.FirstOrDefault (t => t.Kind != TypeKind.Interface);
+ var method = baseType != null ? baseType.GetMethods (m => m.Name == rr.Member.Name && m.IsOverridable && m.Parameters.Count == methodDeclaration.Parameters.Count).FirstOrDefault () : null;
+ if (method == null)
+ return;
+ int i = 0;
+ foreach (var par in methodDeclaration.Parameters) {
+ if (method.Parameters[i++].Name != par.Name) {
+ par.AcceptVisitor (this);
+ }
+ }
+
+ return;
+ }
+ base.VisitMethodDeclaration(methodDeclaration);
+
+ CheckName(methodDeclaration, methodDeclaration.Modifiers.HasFlag(Modifiers.Async) ? AffectedEntity.AsyncMethod : AffectedEntity.Method, methodDeclaration.NameToken, GetAccessibiltiy(methodDeclaration, Modifiers.Private));
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ base.VisitFieldDeclaration(fieldDeclaration);
+ var entity = AffectedEntity.Field;
+ if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) {
+ entity = AffectedEntity.ConstantField;
+ } else if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) {
+ entity = AffectedEntity.ReadonlyField;
+ }
+ foreach (var init in fieldDeclaration.Variables) {
+ CheckName(init, entity, init.NameToken, GetAccessibiltiy(fieldDeclaration, Modifiers.Private));
+ }
+ }
+
+ public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
+ {
+ base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
+ var entity = AffectedEntity.Field;
+ if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Const)) {
+ entity = AffectedEntity.ConstantField;
+ } else if (fixedFieldDeclaration.Modifiers.HasFlag(Modifiers.Readonly)) {
+ entity = AffectedEntity.ReadonlyField;
+ }
+ CheckName(fixedFieldDeclaration, entity, fixedFieldDeclaration.NameToken, GetAccessibiltiy(fixedFieldDeclaration, Modifiers.Private));
+ }
+
+ public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
+ {
+ base.VisitEventDeclaration(eventDeclaration);
+ foreach (var init in eventDeclaration.Variables) {
+ CheckName(init, AffectedEntity.Event, init.NameToken, GetAccessibiltiy(eventDeclaration, Modifiers.Private));
+ }
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ if (eventDeclaration.Modifiers.HasFlag (Modifiers.Override))
+ return;
+ base.VisitCustomEventDeclaration(eventDeclaration);
+ CheckName(eventDeclaration, AffectedEntity.Event, eventDeclaration.NameToken, GetAccessibiltiy(eventDeclaration, Modifiers.Private));
+ }
+
+ public override void VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration)
+ {
+ base.VisitEnumMemberDeclaration(enumMemberDeclaration);
+ CheckName(enumMemberDeclaration, AffectedEntity.EnumMember, enumMemberDeclaration.NameToken, GetAccessibiltiy(enumMemberDeclaration, Modifiers.Private));
+ }
+
+ public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration(parameterDeclaration);
+ CheckNamedResolveResult(null, parameterDeclaration, parameterDeclaration.Parent is LambdaExpression ? AffectedEntity.LambdaParameter : AffectedEntity.Parameter, parameterDeclaration.NameToken, Modifiers.None);
+ }
+
+ public override void VisitTypeParameterDeclaration(TypeParameterDeclaration typeParameterDeclaration)
+ {
+ base.VisitTypeParameterDeclaration(typeParameterDeclaration);
+ CheckNamedResolveResult(null, typeParameterDeclaration, AffectedEntity.TypeParameter, typeParameterDeclaration.NameToken, Modifiers.None);
+ }
+
+ public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
+ {
+ base.VisitVariableDeclarationStatement(variableDeclarationStatement);
+ var entity = variableDeclarationStatement.Modifiers.HasFlag(Modifiers.Const) ? AffectedEntity.LocalConstant : AffectedEntity.LocalVariable;
+ foreach (var init in variableDeclarationStatement.Variables) {
+ CheckNamedResolveResult(null, init, entity, init.NameToken, Modifiers.None);
+ }
+ }
+
+ public override void VisitLabelStatement(LabelStatement labelStatement)
+ {
+ base.VisitLabelStatement(labelStatement);
+ CheckNamedResolveResult(null, labelStatement, AffectedEntity.Label, labelStatement.LabelToken, Modifiers.None);
+ }
+ }
+
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingConventionService.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingConventionService.cs
new file mode 100644
index 0000000..18cb6b9
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingConventionService.cs
@@ -0,0 +1,99 @@
+//
+// NamingConventionService.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public abstract class NamingConventionService
+ {
+ public abstract IEnumerable<NamingRule> Rules {
+ get;
+ }
+
+ public string CheckName(RefactoringContext ctx, string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
+ {
+ foreach (var rule in Rules) {
+ if (!rule.AffectedEntity.HasFlag(entity)) {
+ continue;
+ }
+ if (!rule.VisibilityMask.HasFlag(accessibilty)) {
+ continue;
+ }
+ if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
+ continue;
+ }
+ if (!rule.IsValid(name)) {
+ IList<string> suggestedNames;
+ rule.GetErrorMessage(ctx, name, out suggestedNames);
+ if (suggestedNames.Any ())
+ return suggestedNames [0];
+ }
+ }
+ return name;
+ }
+
+ public bool IsValidName(string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
+ {
+ foreach (var rule in Rules) {
+ if (!rule.AffectedEntity.HasFlag(entity)) {
+ continue;
+ }
+ if (!rule.VisibilityMask.HasFlag(accessibilty)) {
+ continue;
+ }
+ if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
+ continue;
+ }
+ if (!rule.IsValid(name)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public bool HasValidRule(string name, AffectedEntity entity, Modifiers accessibilty = Modifiers.Private, bool isStatic = false)
+ {
+ foreach (var rule in Rules) {
+ if (!rule.AffectedEntity.HasFlag(entity)) {
+ continue;
+ }
+ if (!rule.VisibilityMask.HasFlag(accessibilty)) {
+ continue;
+ }
+ if (isStatic && !rule.IncludeStaticEntities || !isStatic && !rule.IncludeInstanceMembers) {
+ continue;
+ }
+ if (rule.IsValid(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingRule.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingRule.cs
new file mode 100644
index 0000000..edd2175
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingRule.cs
@@ -0,0 +1,397 @@
+//
+// NamingRule.cs
+//
+// Author:
+// Michael Hutchinson <mhutch at xamarin.com>
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+using System.Text;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class NamingRule : IEquatable<NamingRule>
+ {
+ public string Name { get; set; }
+ /// <summary>
+ /// If set, identifiers are required to be prefixed with one of these values.
+ /// </summary>
+ public string[] RequiredPrefixes { get; set; }
+
+ /// <summary>
+ /// If set, identifiers are allowed to be prefixed with one of these values.
+ /// </summary>
+ public string[] AllowedPrefixes { get; set; }
+
+ /// <summary>
+ /// If set, identifiers are required to be suffixed with one of these values.
+ /// </summary>
+ public string[] RequiredSuffixes { get; set; }
+
+ /// <summary>
+ /// If set, identifiers cannot be prefixed by any of these values.
+ /// </summary>
+ public string[] ForbiddenPrefixes { get; set; }
+
+ /// <summary>
+ /// If set, identifiers cannot be suffixed by with any of these values.
+ /// </summary
+ public string[] ForbiddenSuffixes { get; set; }
+
+ /// <summary>
+ /// Gets or sets the affected entity.
+ /// </summary>
+ public AffectedEntity AffectedEntity { get; set; }
+
+ /// <summary>
+ /// Gets or sets the modifiers mask
+ /// </summary>
+ public Modifiers VisibilityMask { get; set; }
+
+ /// <summary>
+ /// The way that the identifier is cased and that words are separated.
+ /// </summary
+ public NamingStyle NamingStyle { get; set; }
+
+ public bool IncludeStaticEntities { get; set; }
+ public bool IncludeInstanceMembers { get; set; }
+
+ public bool IsValid(string name)
+ {
+ string id = name;
+ bool foundPrefix = false;
+ if (RequiredPrefixes != null && RequiredPrefixes.Length > 0) {
+ var prefix = RequiredPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
+ if (prefix == null) {
+ return false;
+ }
+ id = id.Substring(prefix.Length);
+ foundPrefix = true;
+ }
+
+ if (!foundPrefix && AllowedPrefixes != null && AllowedPrefixes.Length > 0) {
+ var prefix = AllowedPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
+ if (prefix != null) {
+ id = id.Substring(prefix.Length);
+ foundPrefix = true;
+ }
+ }
+
+ if (!foundPrefix && ForbiddenPrefixes != null && ForbiddenPrefixes.Length > 0) {
+ if (ForbiddenPrefixes.Any(p => id.StartsWith(p, StringComparison.Ordinal))) {
+ return false;
+ }
+ }
+
+ if (RequiredSuffixes != null && RequiredSuffixes.Length > 0) {
+ var suffix = RequiredSuffixes.FirstOrDefault(s => id.EndsWith(s, StringComparison.Ordinal));
+ if (suffix == null) {
+ return false;
+ }
+ id = id.Substring(0, id.Length - suffix.Length);
+ } else if (ForbiddenSuffixes != null && ForbiddenSuffixes.Length > 0) {
+ if (ForbiddenSuffixes.Any(p => id.EndsWith(p, StringComparison.Ordinal))) {
+ return false;
+ }
+ }
+
+ switch (NamingStyle) {
+ case NamingStyle.AllLower:
+ return !id.Any(ch => char.IsLetter(ch) && char.IsUpper(ch));
+ case NamingStyle.AllUpper:
+ return !id.Any(ch => char.IsLetter(ch) && char.IsLower(ch));
+ case NamingStyle.CamelCase:
+ return id.Length == 0 || (char.IsLower(id [0]) && NoUnderscore(id));
+ case NamingStyle.PascalCase:
+ return id.Length == 0 || (char.IsUpper(id [0]) && NoUnderscore(id));
+ case NamingStyle.FirstUpper:
+ return id.Length == 0 && char.IsUpper(id [0]) && !id.Skip(1).Any(ch => char.IsLetter(ch) && char.IsUpper(ch));
+ }
+ return true;
+ }
+
+ public NamingRule(AffectedEntity affectedEntity)
+ {
+ AffectedEntity = affectedEntity;
+ VisibilityMask = Modifiers.VisibilityMask;
+ IncludeStaticEntities = true;
+ IncludeInstanceMembers = true;
+ }
+
+ static bool NoUnderscore(string id)
+ {
+ return id.IndexOf('_') < 0;
+ }
+
+// static bool NoUnderscoreWithoutNumber(string id)
+// {
+// int idx = id.IndexOf('_');
+// while (idx >= 0 && idx < id.Length) {
+// if ((idx + 2 >= id.Length || !char.IsDigit(id [idx + 1])) && (idx == 0 || !char.IsDigit(id [idx - 1]))) {
+// return false;
+// }
+// idx = id.IndexOf('_', idx + 1);
+// }
+// return true;
+// }
+
+
+ public string GetErrorMessage(BaseRefactoringContext ctx, string name, out IList<string> suggestedNames)
+ {
+ suggestedNames = new List<string>();
+ string id = name;
+
+ string errorMessage = null;
+
+ bool missingRequiredPrefix = false;
+ bool missingRequiredSuffix = false;
+ string requiredPrefix = null;
+ string allowedPrefix = null;
+ string suffix = null;
+
+ if (AllowedPrefixes != null && AllowedPrefixes.Length > 0) {
+ allowedPrefix = AllowedPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
+ if (allowedPrefix != null)
+ id = id.Substring(allowedPrefix.Length);
+
+ }
+
+ if (RequiredPrefixes != null && RequiredPrefixes.Length > 0) {
+ requiredPrefix = RequiredPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
+ if (requiredPrefix == null) {
+ errorMessage = string.Format(ctx.TranslateString("Name should have prefix '{0}'."), RequiredPrefixes [0]);
+ missingRequiredPrefix = true;
+ } else {
+ id = id.Substring(requiredPrefix.Length);
+ }
+ } else if (ForbiddenPrefixes != null && ForbiddenPrefixes.Length > 0) {
+ requiredPrefix = ForbiddenPrefixes.FirstOrDefault(p => id.StartsWith(p, StringComparison.Ordinal));
+ if (requiredPrefix != null) {
+ errorMessage = string.Format(ctx.TranslateString("Name has forbidden prefix '{0}'."), requiredPrefix);
+ id = id.Substring(requiredPrefix.Length);
+ }
+ }
+
+ if (RequiredSuffixes != null && RequiredSuffixes.Length > 0) {
+ suffix = RequiredSuffixes.FirstOrDefault(s => id.EndsWith(s, StringComparison.Ordinal));
+ if (suffix == null) {
+ errorMessage = string.Format(ctx.TranslateString("Name should have suffix '{0}'."), RequiredSuffixes [0]);
+ missingRequiredSuffix = true;
+ } else {
+ id = id.Substring(0, id.Length - suffix.Length);
+ }
+ } else if (ForbiddenSuffixes != null && ForbiddenSuffixes.Length > 0) {
+ suffix = ForbiddenSuffixes.FirstOrDefault(p => id.EndsWith(p, StringComparison.Ordinal));
+ if (suffix != null) {
+ errorMessage = string.Format(ctx.TranslateString("Name has forbidden suffix '{0}'."), suffix);
+ id = id.Substring(0, id.Length - suffix.Length);
+ }
+ }
+
+ switch (NamingStyle) {
+ case NamingStyle.AllLower:
+ if (id.Any(ch => char.IsLetter(ch) && char.IsUpper(ch))) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' contains upper case letters."), name);
+ suggestedNames.Add(LowerCaseIdentifier(WordParser.BreakWords(id)));
+ } else {
+ suggestedNames.Add(id);
+ }
+ break;
+ case NamingStyle.AllUpper:
+ if (id.Any(ch => char.IsLetter(ch) && char.IsLower(ch))) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' contains lower case letters."), name);
+ suggestedNames.Add(UpperCaseIdentifier(WordParser.BreakWords(id)));
+ } else {
+ suggestedNames.Add(id);
+ }
+ break;
+ case NamingStyle.CamelCase:
+ if (id.Length > 0 && char.IsUpper(id [0])) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' should start with a lower case letter."), name);
+ } else if (!NoUnderscore(id)) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' should not separate words with an underscore."), name);
+ } else {
+ suggestedNames.Add(id);
+ break;
+ }
+ suggestedNames.Add(CamelCaseIdentifier(WordParser.BreakWords(id)));
+ break;
+ case NamingStyle.PascalCase:
+ if (id.Length > 0 && char.IsLower(id [0])) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' should start with an upper case letter."), name);
+ } else if (!NoUnderscore(id)) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' should not separate words with an underscore."), name);
+ } else {
+ suggestedNames.Add(id);
+ break;
+ }
+ suggestedNames.Add(PascalCaseIdentifier(WordParser.BreakWords(id)));
+ break;
+ case NamingStyle.FirstUpper:
+ if (id.Length > 0 && char.IsLower(id [0])) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' should start with an upper case letter."), name);
+ } else if (id.Take(1).Any(ch => char.IsLetter(ch) && char.IsUpper(ch))) {
+ errorMessage = string.Format(ctx.TranslateString("'{0}' contains an upper case letter after the first."), name);
+ } else {
+ suggestedNames.Add(id);
+ break;
+ }
+ suggestedNames.Add(FirstUpperIdentifier(WordParser.BreakWords(id)));
+ break;
+ }
+
+ if (requiredPrefix != null) {
+ for (int i = 0; i < suggestedNames.Count; i++) {
+ suggestedNames [i] = requiredPrefix + suggestedNames [i];
+ }
+ } else if (allowedPrefix != null) {
+ int count = suggestedNames.Count;
+ for (int i = 0; i < count; i++) {
+ suggestedNames.Add(suggestedNames [i]);
+ suggestedNames [i] = allowedPrefix + suggestedNames [i];
+ }
+ } else if (missingRequiredPrefix) {
+ for (int i = 0; i < suggestedNames.Count; i++) {
+ var n = suggestedNames [i];
+ bool first = true;
+ foreach (var p in RequiredPrefixes) {
+ if (first) {
+ first = false;
+ suggestedNames [i] = p + n;
+ } else {
+ suggestedNames.Add(p + n);
+ }
+ }
+ }
+ }
+
+ if (suffix != null) {
+ for (int i = 0; i < suggestedNames.Count; i++) {
+ suggestedNames [i] = suggestedNames [i] + suffix;
+ }
+ } else if (missingRequiredSuffix) {
+ for (int i = 0; i < suggestedNames.Count; i++) {
+ var n = suggestedNames [i];
+ bool first = true;
+ foreach (var s in RequiredSuffixes) {
+ if (first) {
+ first = false;
+ suggestedNames [i] = n + s;
+ } else {
+ suggestedNames.Add(n + s);
+ }
+ }
+ }
+ }
+
+ return errorMessage
+ // should never happen.
+ ?? "no known errors.";
+ }
+
+ static string CamelCaseIdentifier (List<string> words)
+ {
+ var sb = new StringBuilder ();
+ sb.Append (words[0].ToLower ());
+ for (int i = 1; i < words.Count; i++) {
+// if (sb.Length > 0 && (char.IsDigit (sb[sb.Length-1]) || char.IsDigit (words[i][0])))
+// sb.Append ('_');
+ AppendCapitalized (words[i], sb);
+ }
+ return sb.ToString ();
+ }
+
+ static string PascalCaseIdentifier (List<string> words)
+ {
+ var sb = new StringBuilder ();
+ for (int i = 0; i < words.Count; i++) {
+// if (sb.Length > 0 && (char.IsDigit (sb[sb.Length-1]) || char.IsDigit (words[i][0])))
+// sb.Append ('_');
+ AppendCapitalized (words[i], sb);
+ }
+ return sb.ToString ();
+ }
+
+ static string LowerCaseIdentifier (List<string> words)
+ {
+ var sb = new StringBuilder ();
+ sb.Append (words[0].ToLower ());
+ for (int i = 1; i < words.Count; i++) {
+ sb.Append ('_');
+ sb.Append (words[i].ToLower ());
+ }
+ return sb.ToString ();
+ }
+
+ static string UpperCaseIdentifier (List<string> words)
+ {
+ var sb = new StringBuilder ();
+ sb.Append (words[0].ToUpper ());
+ for (int i = 1; i < words.Count; i++) {
+ sb.Append ('_');
+ sb.Append (words[i].ToUpper ());
+ }
+ return sb.ToString ();
+ }
+
+ static string FirstUpperIdentifier (List<string> words)
+ {
+ var sb = new StringBuilder ();
+ AppendCapitalized (words[0], sb);
+ for (int i = 1; i < words.Count; i++) {
+ sb.Append ('_');
+ sb.Append (words[i].ToLower ());
+ }
+ return sb.ToString ();
+ }
+
+ static void AppendCapitalized(string word, StringBuilder sb)
+ {
+ sb.Append(word.ToLower());
+ sb [sb.Length - word.Length] = char.ToUpper(sb [sb.Length - word.Length]);
+ }
+
+ #region IEquatable implementation
+ public bool Equals (NamingRule other)
+ {
+ return Name == other.Name &&
+ AffectedEntity == other.AffectedEntity &&
+ VisibilityMask == other.VisibilityMask &&
+ NamingStyle == other.NamingStyle;
+ }
+ #endregion
+
+ public NamingRule Clone()
+ {
+ return (NamingRule)MemberwiseClone();
+ }
+
+ public override string ToString()
+ {
+ return string.Format("[NamingRule: Name={0}, AffectedEntity={1}, VisibilityMask={2}, NamingStyle={3}, IncludeStaticEntities={4}, IncludeInstanceMembers={5}]", Name, AffectedEntity, VisibilityMask, NamingStyle, IncludeStaticEntities, IncludeInstanceMembers);
+ }
+
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingStyle.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingStyle.cs
new file mode 100644
index 0000000..d368304
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/NamingStyle.cs
@@ -0,0 +1,59 @@
+//
+// NamingStyle.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public enum NamingStyle {
+ None,
+
+ /// <summary>
+ /// PascalCase
+ /// </summary>
+ PascalCase,
+
+ /// <summary>
+ /// camelCase
+ /// </summary>
+ CamelCase,
+
+ /// <summary>
+ /// ALLUPPER
+ /// </summary>
+ AllUpper,
+
+ /// <summary>
+ /// alllower
+ /// </summary>
+ AllLower,
+
+ /// <summary>
+ /// Firstupper
+ /// </summary>
+ FirstUpper
+ }
+
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/WordParser.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/WordParser.cs
new file mode 100644
index 0000000..a3539e1
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/ConstraintViolations/InconsistentNamingIssue/WordParser.cs
@@ -0,0 +1,70 @@
+//
+// WordParser.cs
+//
+// Author:
+// Michael Hutchinson <mhutch at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.CSharp
+{
+ public static class WordParser
+ {
+ public static List<string> BreakWords (string identifier)
+ {
+ var words = new List<string> ();
+ int wordStart = 0;
+ bool lastWasLower = false, lastWasUpper = false;
+ for (int i = 0; i < identifier.Length; i++) {
+ char c = identifier[i];
+ var category = char.GetUnicodeCategory (c);
+ if (category == System.Globalization.UnicodeCategory.LowercaseLetter) {
+ if (lastWasUpper && (i - wordStart) > 2) {
+ words.Add (identifier.Substring (wordStart, i - wordStart - 1));
+ wordStart = i - 1;
+ }
+ lastWasLower = true;
+ lastWasUpper = false;
+ } else if (category == System.Globalization.UnicodeCategory.UppercaseLetter) {
+ if (lastWasLower) {
+ words.Add (identifier.Substring (wordStart, i - wordStart));
+ wordStart = i;
+ }
+ lastWasLower = false;
+ lastWasUpper = true;
+ } else {
+ if (c == '_') {
+ if ((i - wordStart) > 0)
+ words.Add(identifier.Substring(wordStart, i - wordStart));
+ wordStart = i + 1;
+ lastWasLower = lastWasUpper = false;
+ }
+ }
+ }
+ if (wordStart < identifier.Length)
+ words.Add (identifier.Substring (wordStart));
+ return words;
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingIssue.cs
new file mode 100644
index 0000000..98d79be
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/ConvertConditionalTernaryToNullCoalescingIssue.cs
@@ -0,0 +1,89 @@
+//
+// ConditionalToNullCoalescingInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Checks for "a != null ? a : other"<expr>
+ /// Converts to: "a ?? other"<expr>
+ /// </summary>
+ [IssueDescription("'?:' expression can be converted to '??' expression",
+ Description="'?:' expression can be converted to '??' expression.",
+ Category = IssueCategories.Opportunities,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ConvertConditionalTernaryToNullCoalescing")]
+ public class ConvertConditionalTernaryToNullCoalescingIssue : ICodeIssueProvider
+ {
+ static readonly Pattern pattern = new Choice {
+ // a != null ? a : other
+ new ConditionalExpression(
+ PatternHelper.CommutativeOperator(new AnyNode("a"), BinaryOperatorType.InEquality, new NullReferenceExpression()),
+ new Backreference("a"),
+ new AnyNode("other")
+ ),
+ // a == null ? other : a
+ new ConditionalExpression(
+ PatternHelper.CommutativeOperator(new AnyNode("a"), BinaryOperatorType.Equality, new NullReferenceExpression()),
+ new AnyNode("other"),
+ new Backreference("a")
+ ),
+ };
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ConvertConditionalTernaryToNullCoalescingIssue>
+ {
+// readonly ConvertConditionalTernaryToNullCoalescingIssue inspector;
+
+ public GatherVisitor (BaseRefactoringContext ctx, ConvertConditionalTernaryToNullCoalescingIssue inspector) : base (ctx)
+ {
+// this.inspector = inspector;
+ }
+
+ public override void VisitConditionalExpression(ConditionalExpression conditionalExpression)
+ {
+ Match m = pattern.Match(conditionalExpression);
+ if (m.Success) {
+ var a = m.Get<Expression>("a").Single();
+ var other = m.Get<Expression>("other").Single();
+ AddIssue(conditionalExpression, ctx.TranslateString("Convert to '??' expression"), script => {
+ var expr = new BinaryOperatorExpression (a.Clone (), BinaryOperatorType.NullCoalescing, other.Clone ());
+ script.Replace (conditionalExpression, expr);
+ });
+ }
+ base.VisitConditionalExpression (conditionalExpression);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/SuggestUseVarKeywordEvidentIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/SuggestUseVarKeywordEvidentIssue.cs
new file mode 100644
index 0000000..613ba68
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/Opportunities/SuggestUseVarKeywordEvidentIssue.cs
@@ -0,0 +1,105 @@
+//
+// UseVarKeywordInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Checks for places where the 'var' keyword can be used. Note that the action is actually done with a context
+ /// action.
+ /// </summary>
+ [IssueDescription("Use 'var'",
+ Description = "Use 'var' keyword when possible",
+ Category = IssueCategories.Opportunities,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.None,
+ ResharperDisableKeyword = "SuggestUseVarKeywordEvident")]
+ public class SuggestUseVarKeywordEvidentIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<SuggestUseVarKeywordEvidentIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, SuggestUseVarKeywordEvidentIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ GatherVisitor bla = this;
+ }
+
+ public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
+ {
+ base.VisitVariableDeclarationStatement(variableDeclarationStatement);
+ if (variableDeclarationStatement.Type is PrimitiveType) {
+ return;
+ }
+ if (variableDeclarationStatement.Type.IsVar()) {
+ return;
+ }
+ if (variableDeclarationStatement.Variables.Count != 1) {
+ return;
+ }
+
+ //only checks for cases where the type would be obvious - assignment of new, cast, etc.
+ //also check the type actually matches else the user might want to assign different subclasses later
+ var v = variableDeclarationStatement.Variables.Single();
+
+ var arrCreate = v.Initializer as ArrayCreateExpression;
+ if (arrCreate != null) {
+ var n = variableDeclarationStatement.Type as ComposedType;
+ //FIXME: check the specifier compatibility
+ if (n != null && n.ArraySpecifiers.Any() && n.BaseType.IsMatch(arrCreate.Type)) {
+ AddIssue(variableDeclarationStatement);
+ }
+ }
+ var objCreate = v.Initializer as ObjectCreateExpression;
+ if (objCreate != null && objCreate.Type.IsMatch(variableDeclarationStatement.Type)) {
+ AddIssue(variableDeclarationStatement);
+ }
+ var asCast = v.Initializer as AsExpression;
+ if (asCast != null && asCast.Type.IsMatch(variableDeclarationStatement.Type)) {
+ AddIssue(variableDeclarationStatement);
+ }
+ var cast = v.Initializer as CastExpression;
+ if (cast != null && cast.Type.IsMatch(variableDeclarationStatement.Type)) {
+ AddIssue(variableDeclarationStatement);
+ }
+ }
+
+ void AddIssue(VariableDeclarationStatement variableDeclarationStatement)
+ {
+ AddIssue(variableDeclarationStatement.Type, ctx.TranslateString("Use 'var' keyword"));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/AccessToStaticMemberViaDerivedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/AccessToStaticMemberViaDerivedTypeIssue.cs
new file mode 100644
index 0000000..c4ba08e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/AccessToStaticMemberViaDerivedTypeIssue.cs
@@ -0,0 +1,136 @@
+//
+// CallToStaticMemberViaDerivedTypeIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Call to static member via a derived class",
+ Description = "Suggests using the class declaring a static function when calling it.",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "AccessToStaticMemberViaDerivedType")]
+ public class AccessToStaticMemberViaDerivedTypeIssue : ICodeIssueProvider
+ {
+ #region ICodeIssueProvider implementation
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<AccessToStaticMemberViaDerivedTypeIssue>
+ {
+ readonly BaseRefactoringContext context;
+
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ this.context = context;
+ }
+
+ public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
+ {
+ base.VisitMemberReferenceExpression(memberReferenceExpression);
+ if (memberReferenceExpression == null || memberReferenceExpression.Target is ThisReferenceExpression)
+ // Call within current class scope using 'this' or 'base'
+ return;
+ var memberResolveResult = context.Resolve(memberReferenceExpression) as MemberResolveResult;
+ if (memberResolveResult == null)
+ return;
+ if (!memberResolveResult.Member.IsStatic)
+ return;
+ HandleMember(memberReferenceExpression, memberReferenceExpression.Target, memberResolveResult.Member, memberResolveResult.TargetResult);
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+ if (invocationExpression.Target is IdentifierExpression)
+ // Call within current class scope without 'this' or 'base'
+ return;
+ var memberReference = invocationExpression.Target as MemberReferenceExpression;
+ if (memberReference == null || memberReference.Target is ThisReferenceExpression)
+ // Call within current class scope using 'this' or 'base'
+ return;
+ var invocationResolveResult = context.Resolve(invocationExpression) as InvocationResolveResult;
+ if (invocationResolveResult == null)
+ return;
+ HandleMember(invocationExpression, memberReference.Target, invocationResolveResult.Member, invocationResolveResult.TargetResult);
+ }
+
+ void HandleMember(Expression issueAnchor, Expression targetExpression, IMember member, ResolveResult targetResolveResult)
+ {
+ var typeResolveResult = targetResolveResult as TypeResolveResult;
+ if (typeResolveResult == null)
+ return;
+ if (!member.IsStatic)
+ return;
+ if (typeResolveResult.Type.Equals(member.DeclaringType))
+ return;
+ // check whether member.DeclaringType contains the original type
+ // (curiously recurring template pattern)
+ var v = new ContainsTypeVisitor(typeResolveResult.Type.GetDefinition());
+ member.DeclaringType.AcceptVisitor(v);
+ if (v.IsContained)
+ return;
+ AddIssue(issueAnchor, context.TranslateString("Static method invoked via derived type"),
+ GetAction(context, targetExpression, member));
+ }
+
+ CodeAction GetAction(BaseRefactoringContext context, Expression targetExpression,
+ IMember member)
+ {
+ var builder = context.CreateTypeSystemAstBuilder(targetExpression);
+ var newType = builder.ConvertType(member.DeclaringType);
+ string description = string.Format("{0} '{1}'", context.TranslateString("Use base qualifier"), newType.ToString());
+ return new CodeAction(description, script => {
+ script.Replace(targetExpression, newType);
+ }, targetExpression);
+ }
+
+ sealed class ContainsTypeVisitor : TypeVisitor
+ {
+ readonly ITypeDefinition searchedType;
+ internal bool IsContained;
+
+ public ContainsTypeVisitor(ITypeDefinition searchedType)
+ {
+ this.searchedType = searchedType;
+ }
+
+ public override IType VisitTypeDefinition(ITypeDefinition type)
+ {
+ if (type.Equals(searchedType))
+ IsContained = true;
+ return base.VisitTypeDefinition(type);
+ }
+ }
+ }
+ #endregion
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/PublicConstructorInAbstractClass.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/PublicConstructorInAbstractClass.cs
new file mode 100644
index 0000000..97f32ed
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/PublicConstructorInAbstractClass.cs
@@ -0,0 +1,80 @@
+// EmptyConstructorIssue.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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 SaHALL 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Make constructor in abstract class protected",
+ Description = "Constructor in abstract class should not be public",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "PublicConstructorInAbstractClass",
+ IssueMarker = IssueMarker.Underline)]
+ public class PublicConstructorInAbstractClassIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue>();
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<PublicConstructorInAbstractClassIssue>
+ {
+
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ if (!typeDeclaration.HasModifier(Modifiers.Abstract)) {
+ return;
+ }
+ foreach (var constructor in typeDeclaration.Children.OfType<ConstructorDeclaration>()){
+ VisitConstructorDeclaration(constructor);
+ }
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ if (constructorDeclaration.HasModifier (Modifiers.Public)) {
+
+ var makeProtected = new CodeAction(ctx.TranslateString("Make constructor protected"), script => script.Replace(constructorDeclaration.ModifierTokens.First(t => t.Modifier == Modifiers.Public), new CSharpModifierToken(TextLocation.Empty, Modifiers.Protected)), constructorDeclaration.NameToken);
+ var makePrivate = new CodeAction(ctx.TranslateString("Make constructor private"), script => script.Remove(constructorDeclaration.ModifierTokens.First(t => t.Modifier == Modifiers.Public)), constructorDeclaration.NameToken);
+
+ AddIssue(constructorDeclaration.NameToken, ctx.TranslateString("Constructor in Abstract Class should not be public"), new[] { makeProtected, makePrivate });
+ }
+ }
+ }
+ }
+}
+
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToAnyIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToAnyIssue.cs
new file mode 100644
index 0000000..50318d0
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToAnyIssue.cs
@@ -0,0 +1,119 @@
+//
+// ReplaceWithSingleCallToAnyIssue.cs
+//
+// Author:
+// Mike Kr�ger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to Any(...)",
+ Description = "Replace with single call to Any(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToAny")]
+ public class ReplaceWithSingleCallToAnyIssue : ICodeIssueProvider
+ {
+ static readonly AstNode pattern =
+ new InvocationExpression (
+ new MemberReferenceExpression (
+ new NamedNode ("whereInvoke",
+ new InvocationExpression (
+ new MemberReferenceExpression (new AnyNode ("target"), "Where"),
+ new AnyNode ())),
+ Pattern.AnyString));
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor<ReplaceWithSingleCallToAnyIssue>(context, "Any").GetIssues();
+ }
+
+ internal class GatherVisitor<T> : GatherVisitorBase<T> where T : ICodeIssueProvider
+ {
+ readonly string member;
+
+ public GatherVisitor (BaseRefactoringContext ctx, string member) : base (ctx)
+ {
+ this.member = member;
+ }
+
+ public override void VisitInvocationExpression (InvocationExpression anyInvoke)
+ {
+ base.VisitInvocationExpression (anyInvoke);
+
+ var match = pattern.Match (anyInvoke);
+ if (!match.Success)
+ return;
+
+ var anyResolve = ctx.Resolve (anyInvoke) as InvocationResolveResult;
+ if (anyResolve == null || !HasPredicateVersion(anyResolve.Member))
+ return;
+ var whereInvoke = match.Get<InvocationExpression> ("whereInvoke").Single ();
+ var whereResolve = ctx.Resolve (whereInvoke) as InvocationResolveResult;
+ if (whereResolve == null || whereResolve.Member.Name != "Where" || !IsQueryExtensionClass(whereResolve.Member.DeclaringTypeDefinition))
+ return;
+ if (whereResolve.Member.Parameters.Count != 2)
+ return;
+ var predResolve = whereResolve.Member.Parameters [1];
+ if (predResolve.Type.TypeParameterCount != 2)
+ return;
+
+ AddIssue (
+ anyInvoke, string.Format("Redundant Where() call with predicate followed by {0}()", anyResolve.Member.Name),
+ script => {
+ var arg = whereInvoke.Arguments.Single ().Clone ();
+ var target = match.Get<Expression> ("target").Single ().Clone ();
+ script.Replace (anyInvoke, new InvocationExpression (new MemberReferenceExpression (target, anyResolve.Member.Name), arg));
+ });
+ }
+
+ bool IsQueryExtensionClass(ITypeDefinition typeDef)
+ {
+ if (typeDef == null || typeDef.Namespace != "System.Linq")
+ return false;
+ switch (typeDef.Name) {
+ case "Enumerable":
+ case "ParallelEnumerable":
+ case "Queryable":
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool HasPredicateVersion(IParameterizedMember member)
+ {
+ if (!IsQueryExtensionClass(member.DeclaringTypeDefinition))
+ return false;
+ return member.Name == this.member;
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToCountIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToCountIssue.cs
new file mode 100644
index 0000000..94ce439
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToCountIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToCountIssue.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to Count(...)",
+ Description = "Replace with single call to Count(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToCount")]
+ public class ReplaceWithSingleCallToCountIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToCountIssue>(context, "Count").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstIssue.cs
new file mode 100644
index 0000000..23eda83
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToFirst.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to First(...)",
+ Description = "Replace with single call to First(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToFirst")]
+ public class ReplaceWithSingleCallToFirstIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToFirstIssue>(context, "First").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstOrDefaultIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstOrDefaultIssue.cs
new file mode 100644
index 0000000..850a479
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToFirstOrDefaultIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToFirstOrDefault.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to FirstOrDefault(...)",
+ Description = "Replace with single call to FirstOrDefault(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToFirstOrDefault")]
+ public class ReplaceWithSingleCallToFirstOrDefaultIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToFirstOrDefaultIssue>(context, "FirstOrDefault").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastIssue.cs
new file mode 100644
index 0000000..e62732c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToLast.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to Last(...)",
+ Description = "Replace with single call to Last(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToLast")]
+ public class ReplaceWithSingleCallToLastIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToLastIssue>(context, "Last").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastOrDefaultIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastOrDefaultIssue.cs
new file mode 100644
index 0000000..04c9109
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLastOrDefaultIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToLastOrDefault.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to LastOrDefault(...)",
+ Description = "Replace with single call to LastOrDefault(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToLastOrDefault")]
+ public class ReplaceWithSingleCallToLastOrDefaultIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToLastOrDefaultIssue>(context, "LastOrDefault").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLongCountIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLongCountIssue.cs
new file mode 100644
index 0000000..8da2c36
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToLongCountIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToLongCount.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to LongCount(...)",
+ Description = "Replace with single call to LongCount(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToLongCount")]
+ public class ReplaceWithSingleCallToLongCountIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToLongCountIssue>(context, "LongCount").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleIssue.cs
new file mode 100644
index 0000000..628dd57
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToSingle.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to Single(...)",
+ Description = "Replace with single call to Single(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToSingle")]
+ public class ReplaceWithSingleCallToSingleIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToSingleIssue>(context, "Single").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleOrDefaultIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleOrDefaultIssue.cs
new file mode 100644
index 0000000..53dc6fe
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithSingleCallToSingleOrDefaultIssue.cs
@@ -0,0 +1,45 @@
+//
+// ReplaceWithSingleCallToSingleOrDefault.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Replace with single call to SingleOrDefault(...)",
+ Description = "Replace with single call to SingleOrDefault(...)",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithSingleCallToSingleOrDefault")]
+ public class ReplaceWithSingleCallToSingleOrDefaultIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new ReplaceWithSingleCallToAnyIssue.GatherVisitor<ReplaceWithSingleCallToSingleOrDefaultIssue>(context, "SingleOrDefault").GetIssues();
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyIssue.cs
new file mode 100644
index 0000000..8c9467c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/PracticesAndImprovements/ReplaceWithStringIsNullOrEmptyIssue.cs
@@ -0,0 +1,134 @@
+//
+// StringIsNullOrEmptyInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Checks for str == null && str == " "
+ /// Converts to: string.IsNullOrEmpty (str)
+ /// </summary>
+ [IssueDescription("Use 'String.IsNullOrEmpty'",
+ Description = "Uses shorter string.IsNullOrEmpty call instead of a longer condition.",
+ Category = IssueCategories.PracticesAndImprovements,
+ Severity = Severity.Suggestion,
+ ResharperDisableKeyword = "ReplaceWithStringIsNullOrEmpty")]
+ public class ReplaceWithStringIsNullOrEmptyIssue : ICodeIssueProvider
+ {
+ static readonly Pattern pattern = new Choice {
+ // str == null || str == ""
+ // str == null || str.Length == 0
+ new BinaryOperatorExpression (
+ PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.Equality, new NullReferenceExpression ()),
+ BinaryOperatorType.ConditionalOr,
+ new Choice {
+ PatternHelper.CommutativeOperator (new Backreference ("str"), BinaryOperatorType.Equality, new PrimitiveExpression ("")),
+ PatternHelper.CommutativeOperator (
+ new MemberReferenceExpression (new Backreference ("str"), "Length"),
+ BinaryOperatorType.Equality,
+ new PrimitiveExpression (0)
+ )
+ }
+ ),
+ // str == "" || str == null
+ new BinaryOperatorExpression (
+ PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.Equality, new PrimitiveExpression ("")),
+ BinaryOperatorType.ConditionalOr,
+ PatternHelper.CommutativeOperator(new Backreference ("str"), BinaryOperatorType.Equality, new NullReferenceExpression ())
+ )
+ };
+
+ static readonly Pattern negPattern = new Choice {
+ // str != null && str != ""
+ // str != null && str.Length != 0
+ // str != null && str.Length > 0
+ new BinaryOperatorExpression (
+ PatternHelper.CommutativeOperator(new AnyNode ("str"), BinaryOperatorType.InEquality, new NullReferenceExpression ()),
+ BinaryOperatorType.ConditionalAnd,
+ new Choice {
+ PatternHelper.CommutativeOperator (new Backreference ("str"), BinaryOperatorType.InEquality, new PrimitiveExpression ("")),
+ PatternHelper.CommutativeOperator (
+ new MemberReferenceExpression (new Backreference ("str"), "Length"),
+ BinaryOperatorType.InEquality,
+ new PrimitiveExpression (0)
+ ),
+ new BinaryOperatorExpression (
+ new MemberReferenceExpression (new Backreference ("str"), "Length"),
+ BinaryOperatorType.GreaterThan,
+ new PrimitiveExpression (0)
+ )
+ }
+ ),
+ // str != "" && str != null
+ new BinaryOperatorExpression (
+ PatternHelper.CommutativeOperator (new AnyNode ("str"), BinaryOperatorType.InEquality, new PrimitiveExpression ("")),
+ BinaryOperatorType.ConditionalAnd,
+ PatternHelper.CommutativeOperator(new Backreference ("str"), BinaryOperatorType.InEquality, new NullReferenceExpression ())
+ )
+ };
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ReplaceWithStringIsNullOrEmptyIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
+ {
+ }
+
+ public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression(binaryOperatorExpression);
+ Match m = pattern.Match(binaryOperatorExpression);
+ bool isNegated = false;
+ if (!m.Success) {
+ m = negPattern.Match(binaryOperatorExpression);
+ isNegated = true;
+ }
+ if (m.Success) {
+ var str = m.Get<Expression>("str").Single();
+ var def = ctx.Resolve (str).Type.GetDefinition ();
+ if (def == null || def.KnownTypeCode != ICSharpCode.NRefactory.TypeSystem.KnownTypeCode.String)
+ return;
+ AddIssue(binaryOperatorExpression, ctx.TranslateString("Use string.IsNullOrEmpty"), script => {
+ Expression expr = new PrimitiveType ("string").Invoke("IsNullOrEmpty", str.Clone());
+ if (isNegated)
+ expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr);
+ script.Replace(binaryOperatorExpression, expr);
+ });
+ return;
+ }
+ }
+
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/DoubleNegationOperatorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/DoubleNegationOperatorIssue.cs
new file mode 100644
index 0000000..c38ebfb
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/DoubleNegationOperatorIssue.cs
@@ -0,0 +1,81 @@
+//
+// DoubleNegationOperatorIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Double negation operator",
+ Description = "Double negation is meaningless.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "DoubleNegationOperator")]
+ public class DoubleNegationOperatorIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<DoubleNegationOperatorIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ static Expression RemoveParentheses (Expression expr)
+ {
+ while (expr is ParenthesizedExpression)
+ expr = ((ParenthesizedExpression) expr).Expression;
+ return expr;
+ }
+
+ public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
+ {
+ base.VisitUnaryOperatorExpression (unaryOperatorExpression);
+
+ if (unaryOperatorExpression.Operator != UnaryOperatorType.Not)
+ return;
+
+ var innerUnaryOperatorExpr =
+ RemoveParentheses (unaryOperatorExpression.Expression) as UnaryOperatorExpression;
+ if (innerUnaryOperatorExpr == null || innerUnaryOperatorExpr.Operator != UnaryOperatorType.Not)
+ return;
+
+ var expression = RemoveParentheses (innerUnaryOperatorExpr.Expression);
+ if (expression.IsNull)
+ return;
+
+ AddIssue (unaryOperatorExpression, ctx.TranslateString ("Remove double negation"),
+ script => script.Replace (unaryOperatorExpression, expression.Clone ()));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCaseLabelIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCaseLabelIssue.cs
new file mode 100644
index 0000000..19bf63e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCaseLabelIssue.cs
@@ -0,0 +1,72 @@
+//
+// RedundantCaseLabelIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant 'case' label",
+ Description = "'case' label is redundant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantCaseLabel")]
+ public class RedundantCaseLabelIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantCaseLabelIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitSwitchSection (SwitchSection switchSection)
+ {
+ base.VisitSwitchSection (switchSection);
+
+ if (switchSection.CaseLabels.Count <2)
+ return;
+
+ var lastLabel = switchSection.CaseLabels.LastOrNullObject ();
+ if (!lastLabel.Expression.IsNull)
+ return;
+ AddIssue (switchSection.FirstChild.StartLocation, lastLabel.StartLocation,
+ ctx.TranslateString ("Remove redundant 'case' label"), scipt => {
+ foreach (var label in switchSection.CaseLabels) {
+ if (label != lastLabel)
+ scipt.Remove (label);
+ }
+ });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCastIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCastIssue.cs
new file mode 100644
index 0000000..1169303
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCastIssue.cs
@@ -0,0 +1,138 @@
+//
+// RedundantCastIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant cast",
+ Description = "Type cast can be safely removed.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantCast")]
+ public class RedundantCastIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantCastIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitCastExpression (CastExpression castExpression)
+ {
+ base.VisitCastExpression (castExpression);
+
+ CheckTypeCast (castExpression, castExpression.Expression, castExpression.StartLocation,
+ castExpression.Expression.StartLocation);
+ }
+
+ public override void VisitAsExpression (AsExpression asExpression)
+ {
+ base.VisitAsExpression (asExpression);
+
+ CheckTypeCast (asExpression, asExpression.Expression, asExpression.Expression.EndLocation,
+ asExpression.EndLocation);
+ }
+
+ IType GetExpectedType (Expression typeCastNode)
+ {
+ var memberRefExpr = typeCastNode.Parent as MemberReferenceExpression;
+ if (memberRefExpr != null) {
+ var invocationExpr = memberRefExpr.Parent as InvocationExpression;
+ if (invocationExpr != null && invocationExpr.Target == memberRefExpr) {
+ var invocationResolveResult = ctx.Resolve (invocationExpr) as InvocationResolveResult;
+ if (invocationResolveResult != null) {
+ return invocationResolveResult.Member.DeclaringType;
+ }
+ } else {
+ var memberResolveResult = ctx.Resolve (memberRefExpr) as MemberResolveResult;
+ if (memberResolveResult != null) {
+ return memberResolveResult.Member.DeclaringType;
+ }
+ }
+ }
+ return ctx.GetExpectedType (typeCastNode);
+ }
+
+ bool IsExplicitImplementation(IType exprType, IType interfaceType, Expression typeCastNode)
+ {
+ var memberRefExpr = typeCastNode.Parent as MemberReferenceExpression;
+ if (memberRefExpr != null) {
+ var rr = ctx.Resolve(memberRefExpr);
+ var memberResolveResult = rr as MemberResolveResult;
+ if (memberResolveResult != null) {
+ foreach (var member in exprType.GetMembers (m => m.SymbolKind == memberResolveResult.Member.SymbolKind)) {
+ if (member.IsExplicitInterfaceImplementation && member.ImplementedInterfaceMembers.Contains (memberResolveResult.Member)) {
+ return true;
+ }
+ }
+ }
+
+ var methodGroupResolveResult = rr as MethodGroupResolveResult;
+ if (methodGroupResolveResult != null) {
+ foreach (var member in exprType.GetMethods ()) {
+ if (member.IsExplicitInterfaceImplementation && member.ImplementedInterfaceMembers.Any (m => methodGroupResolveResult.Methods.Contains ((IMethod)m))) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ void AddIssue (Expression typeCastNode, Expression expr, TextLocation start, TextLocation end)
+ {
+ AddIssue (start, end, ctx.TranslateString ("Remove redundant type cast"),
+ script => script.Replace (typeCastNode, expr.Clone ()));
+ }
+
+ void CheckTypeCast (Expression typeCastNode, Expression expr, TextLocation castStart, TextLocation castEnd)
+ {
+ while (typeCastNode.Parent != null && typeCastNode.Parent is ParenthesizedExpression)
+ typeCastNode = (Expression)typeCastNode.Parent;
+ var expectedType = GetExpectedType (typeCastNode);
+ var exprType = ctx.Resolve (expr).Type;
+ if (expectedType.Kind == TypeKind.Interface && IsExplicitImplementation (exprType, expectedType, typeCastNode))
+ return;
+ if (exprType.GetAllBaseTypes ().Any (t => t.Equals(expectedType)))
+ AddIssue (typeCastNode, expr, castStart, castEnd);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCatchIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCatchIssue.cs
new file mode 100644
index 0000000..9925547
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCatchIssue.cs
@@ -0,0 +1,160 @@
+//
+// RedundantCatchIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Redundant catch clause",
+ Description = "Catch clause with a single 'throw' statement is redundant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantCatchClause")]
+ public class RedundantCatchIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantCatchIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitTryCatchStatement(TryCatchStatement tryCatchStatement)
+ {
+ var redundantCatchClauses = new List<CatchClause>();
+ bool hasNonRedundantCatch = false;
+ foreach (var catchClause in tryCatchStatement.CatchClauses) {
+ if (IsRedundant(catchClause)) {
+ redundantCatchClauses.Add(catchClause);
+ } else {
+ hasNonRedundantCatch = true;
+ }
+ }
+
+ if (hasNonRedundantCatch || !tryCatchStatement.FinallyBlock.IsNull) {
+ AddIssuesForClauses(tryCatchStatement, redundantCatchClauses);
+ } else {
+ AddIssueForTryCatchStatement(tryCatchStatement);
+ }
+ }
+
+ void AddIssuesForClauses(AstNode node, List<CatchClause> redundantCatchClauses)
+ {
+ var allCatchClausesMessage = ctx.TranslateString("Remove all '{0}' redundant 'catch' clauses");
+ var removeAllRedundantClausesAction = new CodeAction(allCatchClausesMessage, script => {
+ foreach (var redundantCatchClause in redundantCatchClauses) {
+ script.Remove(redundantCatchClause);
+ }
+ }, node);
+ var singleCatchClauseMessage = ctx.TranslateString("Remove 'catch'");
+ var redundantCatchClauseMessage = ctx.TranslateString("Catch clause with a single 'throw' statement is redundant.");
+ foreach (var redundantCatchClause in redundantCatchClauses) {
+ var closureLocalCatchClause = redundantCatchClause;
+ var removeRedundantClauseAction = new CodeAction(singleCatchClauseMessage, script => {
+ script.Remove(closureLocalCatchClause);
+ }, node);
+ var actions = new List<CodeAction>();
+ actions.Add(removeRedundantClauseAction);
+ if (redundantCatchClauses.Count > 1) {
+ actions.Add(removeAllRedundantClausesAction);
+ }
+ AddIssue(closureLocalCatchClause, redundantCatchClauseMessage, actions);
+ }
+ }
+
+ void AddIssueForTryCatchStatement(TryCatchStatement tryCatchStatement)
+ {
+ var lastCatch = tryCatchStatement.CatchClauses.LastOrNullObject();
+ if (lastCatch.IsNull)
+ return;
+
+ var removeTryCatchMessage = ctx.TranslateString("Remove 'try' statement");
+
+ var removeTryStatementAction = new CodeAction(removeTryCatchMessage, script => {
+ var statements = tryCatchStatement.TryBlock.Statements;
+ if (statements.Count == 1 || tryCatchStatement.Parent is BlockStatement) {
+ foreach (var statement in statements) {
+ script.InsertAfter(tryCatchStatement.GetPrevSibling (s => !(s is NewLineNode)), statement.Clone());
+ }
+ script.Remove(tryCatchStatement);
+ } else {
+ var blockStatement = new BlockStatement();
+ foreach (var statement in statements) {
+ blockStatement.Statements.Add(statement.Clone());
+ }
+ script.Replace(tryCatchStatement, blockStatement);
+ }
+ // The replace and insert script functions does not format these things well on their own
+ script.FormatText(tryCatchStatement.Parent);
+ }, tryCatchStatement);
+
+ var fixes = new [] {
+ removeTryStatementAction
+ };
+ AddIssue(tryCatchStatement.TryBlock.EndLocation, lastCatch.EndLocation, removeTryCatchMessage, fixes);
+ }
+
+ static bool IsThrowsClause (CatchClause catchClause)
+ {
+ var firstStatement = catchClause.Body.Statements.FirstOrNullObject();
+ if (firstStatement.IsNull)
+ return false;
+ var throwStatement = firstStatement as ThrowStatement;
+ if (throwStatement == null)
+ return false;
+ return true;
+ }
+
+ bool IsRedundant(CatchClause catchClause)
+ {
+ if (!IsThrowsClause (catchClause))
+ return false;
+
+ var type = ctx.Resolve (catchClause.Type).Type;
+ var n = catchClause.NextSibling;
+ while (n != null) {
+ var nextClause = n as CatchClause;
+ if (nextClause != null) {
+ if (nextClause.Type.IsNull && !IsThrowsClause(nextClause))
+ return false;
+ if (!IsThrowsClause(nextClause) && type.GetDefinition ().IsDerivedFrom (ctx.Resolve (nextClause.Type).Type.GetDefinition ()))
+ return false;
+ }
+ n = n.NextSibling;
+ }
+ return true;
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCommaInArrayInitializerIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCommaInArrayInitializerIssue.cs
new file mode 100644
index 0000000..c0116f2
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCommaInArrayInitializerIssue.cs
@@ -0,0 +1,78 @@
+//
+// RedundantCommaInArrayInitializerIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant comma in array initializer",
+ Description = "Redundant comma in array initializer.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantCommaInArrayInitializer")]
+ public class RedundantCommaInArrayInitializerIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantCommaInArrayInitializerIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitArrayInitializerExpression (ArrayInitializerExpression arrayInitializerExpression)
+ {
+ base.VisitArrayInitializerExpression (arrayInitializerExpression);
+
+ if (arrayInitializerExpression.IsSingleElement)
+ return;
+
+ var commaToken = arrayInitializerExpression.RBraceToken.PrevSibling as CSharpTokenNode;
+ if (commaToken == null || commaToken.ToString () != ",")
+ return;
+ string initializerType;
+ if (arrayInitializerExpression.Parent is ObjectCreateExpression) {
+ if (arrayInitializerExpression.Elements.FirstOrNullObject () is NamedExpression) {
+ initializerType = ctx.TranslateString("Remove redundant comma in object initializer");
+ } else {
+ initializerType = ctx.TranslateString("Remove redundant comma in collection initializer");
+ }
+ } else {
+ initializerType = ctx.TranslateString("Remove redundant comma in array initializer");
+ }
+ AddIssue (commaToken,
+ initializerType,
+ script => script.Remove (commaToken));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantComparisonWithNullIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantComparisonWithNullIssue.cs
new file mode 100644
index 0000000..4d2f560
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantComparisonWithNullIssue.cs
@@ -0,0 +1,101 @@
+//
+// RedundantComparisonWithNullIssue.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Redundant comparison with 'null'",
+ Description = "When 'is' keyword is used, which implicitly check null.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "RedundantComparisonWithNull",
+ IssueMarker = IssueMarker.GrayOut)]
+ public class RedundantComparisonWithNullIssue : ICodeIssueProvider
+ {
+ private static readonly Pattern pattern1
+ = new Choice {
+ // a is Record && a != null
+ new BinaryOperatorExpression(
+ PatternHelper.OptionalParentheses(
+ new IsExpression {
+ Expression = new AnyNode("a"),
+ Type = new AnyNode("t")
+ }),
+ BinaryOperatorType.ConditionalAnd,
+ PatternHelper.OptionalParentheses(
+ PatternHelper.CommutativeOperator(new Backreference("a"),
+ BinaryOperatorType.InEquality,
+ new NullReferenceExpression())
+ )
+ ),
+ // a != null && a is Record
+ new BinaryOperatorExpression (
+ PatternHelper.OptionalParentheses(
+ PatternHelper.CommutativeOperator(new AnyNode("a"),
+ BinaryOperatorType.InEquality,
+ new NullReferenceExpression())
+ ),
+ BinaryOperatorType.ConditionalAnd,
+ PatternHelper.OptionalParentheses(
+ new IsExpression {
+ Expression = new Backreference("a"),
+ Type = new AnyNode("t")
+ })
+ )
+ };
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantComparisonWithNullIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression(binaryOperatorExpression);
+ Match m1 = pattern1.Match(binaryOperatorExpression);
+ if (m1.Success) {
+ AddIssue(binaryOperatorExpression, ctx.TranslateString("Remove expression"), script => {
+ var isExpr = m1.Get<AstType>("t").Single().Parent;
+ script.Replace(binaryOperatorExpression, isExpr);
+ });
+ return;
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs
new file mode 100644
index 0000000..ead6acf
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantIfElseBlockIssue.cs
@@ -0,0 +1,97 @@
+//
+// RedundantIfElseBlockIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant 'else' keyword",
+ Description = "Redundant 'else' keyword.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantIfElseBlock")]
+ public class RedundantIfElseBlockIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantIfElseBlockIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ bool HasRundundantElse(IfElseStatement ifElseStatement)
+ {
+ if (ifElseStatement.FalseStatement.IsNull || ifElseStatement.Parent is IfElseStatement)
+ return false;
+ var blockStatement = ifElseStatement.FalseStatement as BlockStatement;
+ if (blockStatement != null && blockStatement.Statements.Count == 0)
+ return true;
+ var reachability = ctx.CreateReachabilityAnalysis (ifElseStatement.TrueStatement);
+ return !reachability.IsEndpointReachable (ifElseStatement.TrueStatement);
+ }
+
+ public override void VisitIfElseStatement (IfElseStatement ifElseStatement)
+ {
+ base.VisitIfElseStatement (ifElseStatement);
+
+ if (HasRundundantElse(ifElseStatement)) {
+ AddIssue (ifElseStatement.ElseToken, ctx.TranslateString ("Remove redundant 'else'"),
+ script =>
+ {
+ int start = script.GetCurrentOffset(ifElseStatement.ElseToken.GetPrevNode (n => !(n is NewLineNode)).EndLocation);
+ int end;
+
+ var blockStatement = ifElseStatement.FalseStatement as BlockStatement;
+ if (blockStatement != null) {
+ if (blockStatement.Statements.Count == 0) {
+ // remove empty block
+ end = script.GetCurrentOffset (blockStatement.LBraceToken.StartLocation);
+ script.Remove (blockStatement);
+ } else {
+ // remove block braces
+ end = script.GetCurrentOffset (blockStatement.LBraceToken.EndLocation);
+ script.Remove (blockStatement.RBraceToken);
+ }
+ } else {
+ end = script.GetCurrentOffset(ifElseStatement.ElseToken.EndLocation);
+ }
+ if (end > start)
+ script.RemoveText (start, end - start);
+
+ script.FormatText (ifElseStatement.Parent);
+ });
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantNameQualifierIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantNameQualifierIssue.cs
new file mode 100644
index 0000000..54e2718
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantNameQualifierIssue.cs
@@ -0,0 +1,100 @@
+//
+// RedundantNamespaceUsageInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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.Linq;
+
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Finds redundant namespace usages.
+ /// </summary>
+ [IssueDescription("Redundant name qualifier",
+ Description = "Removes namespace usages that are obsolete.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantNameQualifier")]
+ public class RedundantNameQualifierIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantNameQualifierIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, RedundantNameQualifierIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
+ {
+ base.VisitMemberReferenceExpression(memberReferenceExpression);
+ HandleMemberReference(
+ memberReferenceExpression, memberReferenceExpression.Target, memberReferenceExpression.MemberNameToken, memberReferenceExpression.TypeArguments, NameLookupMode.Expression,
+ script => {
+ script.Replace(memberReferenceExpression, RefactoringAstHelper.RemoveTarget(memberReferenceExpression));
+ });
+ }
+
+ public override void VisitMemberType(MemberType memberType)
+ {
+ base.VisitMemberType(memberType);
+ HandleMemberReference(
+ memberType, memberType.Target, memberType.MemberNameToken, memberType.TypeArguments, memberType.GetNameLookupMode(),
+ script => {
+ script.Replace(memberType, RefactoringAstHelper.RemoveTarget(memberType));
+ });
+ }
+
+ void HandleMemberReference(AstNode wholeNode, AstNode targetNode, Identifier memberName, IEnumerable<AstType> typeArguments, NameLookupMode mode, Action<Script> action)
+ {
+ var result = ctx.Resolve(targetNode);
+ if (!(result is NamespaceResolveResult)) {
+ return;
+ }
+ var wholeResult = ctx.Resolve(wholeNode);
+ if (!(wholeResult is TypeResolveResult)) {
+ return;
+ }
+
+ var state = ctx.GetResolverStateBefore(wholeNode);
+ var resolvedTypeArguments = typeArguments.Select(ctx.ResolveType).ToList();
+ var lookupName = state.LookupSimpleNameOrTypeName(memberName.Name, resolvedTypeArguments, mode);
+
+ if (lookupName is TypeResolveResult && !lookupName.IsError && wholeResult.Type.Equals(lookupName.Type)) {
+ AddIssue(wholeNode.StartLocation, memberName.StartLocation, ctx.TranslateString("Remove redundant qualifier"), action);
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantObjectOrCollectionInitializerIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantObjectOrCollectionInitializerIssue.cs
new file mode 100644
index 0000000..252eb6f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantObjectOrCollectionInitializerIssue.cs
@@ -0,0 +1,67 @@
+//
+// RedundantObjectOrCollectionInitializerIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant empty object or collection initializer",
+ Description = "Redundant empty object or collection initializer.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantEmptyObjectOrCollectionInitializer")]
+ public class RedundantObjectOrCollectionInitializerIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantObjectOrCollectionInitializerIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
+ {
+ base.VisitObjectCreateExpression (objectCreateExpression);
+ if (objectCreateExpression.Initializer.IsNull || objectCreateExpression.Initializer.Elements.Count > 0)
+ return;
+
+ AddIssue (objectCreateExpression.Initializer, ctx.TranslateString ("Remove initializer"),
+ script => {
+ var expr = (ObjectCreateExpression)objectCreateExpression.Clone ();
+ expr.Initializer = ArrayInitializerExpression.Null;
+ script.Replace (objectCreateExpression, expr);
+ });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantThisQualifierIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantThisQualifierIssue.cs
new file mode 100644
index 0000000..88a6b66
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantThisQualifierIssue.cs
@@ -0,0 +1,129 @@
+//
+// RedundantThisInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Finds redundant namespace usages.
+ /// </summary>
+ [IssueDescription("Redundant 'this.' qualifier",
+ Description= "'this.' is redundant and can safely be removed.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantThisQualifier")]
+ public class RedundantThisQualifierIssue : ICodeIssueProvider
+ {
+ bool ignoreConstructors = true;
+
+ /// <summary>
+ /// Specifies whether to ignore redundant 'this' in constructors.
+ /// "this.Name = name;"
+ /// </summary>
+ public bool IgnoreConstructors {
+ get {
+ return ignoreConstructors;
+ }
+ set {
+ ignoreConstructors = value;
+ }
+ }
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context, this).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantThisQualifierIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx, RedundantThisQualifierIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ static IMember GetMember (ResolveResult result)
+ {
+ if (result is MemberResolveResult) {
+ return ((MemberResolveResult)result).Member;
+ } else if (result is MethodGroupResolveResult) {
+ return ((MethodGroupResolveResult)result).Methods.FirstOrDefault ();
+ }
+
+ return null;
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ if (QualifierDirectiveEvidentIssueProvider.IgnoreConstructors)
+ return;
+ base.VisitConstructorDeclaration(constructorDeclaration);
+ }
+
+ public override void VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression)
+ {
+ base.VisitThisReferenceExpression(thisReferenceExpression);
+ var memberReference = thisReferenceExpression.Parent as MemberReferenceExpression;
+ if (memberReference == null) {
+ return;
+ }
+
+ var state = ctx.GetResolverStateAfter(thisReferenceExpression);
+ var wholeResult = ctx.Resolve(memberReference);
+
+ IMember member = GetMember(wholeResult);
+ if (member == null) {
+ return;
+ }
+
+ var result = state.LookupSimpleNameOrTypeName(memberReference.MemberName, EmptyList<IType>.Instance, NameLookupMode.Expression);
+
+ bool isRedundant;
+ if (result is MemberResolveResult) {
+ isRedundant = ((MemberResolveResult)result).Member.Region.Equals(member.Region);
+ } else if (result is MethodGroupResolveResult) {
+ isRedundant = ((MethodGroupResolveResult)result).Methods.Any(m => m.Region.Equals(member.Region));
+ } else {
+ return;
+ }
+
+ if (isRedundant) {
+ AddIssue(thisReferenceExpression.StartLocation, memberReference.MemberNameToken.StartLocation, ctx.TranslateString("Remove redundant 'this.'"), script => {
+ script.Replace(memberReference, RefactoringAstHelper.RemoveTarget(memberReference));
+ }
+ );
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantToStringCallIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantToStringCallIssue.cs
new file mode 100644
index 0000000..b352c81
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantToStringCallIssue.cs
@@ -0,0 +1,242 @@
+//
+// RedundantToStringCallIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Redundant 'object.ToString()' call",
+ Description = "Finds calls to ToString() which would be generated automatically by the compiler.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantToStringCall")]
+ public class RedundantToStringCallIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantToStringCallIssue>
+ {
+ static Tuple<int, int> onlyFirst = Tuple.Create (0, 0);
+
+ static IDictionary<Tuple<string, int>, Tuple<int, int>> membersCallingToString = new Dictionary<Tuple<string, int>, Tuple<int, int>> {
+ { Tuple.Create("System.IO.TextWriter.Write", 1), onlyFirst },
+ { Tuple.Create("System.IO.TextWriter.WriteLine", 1), onlyFirst },
+ { Tuple.Create("System.Console.Write", 1), onlyFirst },
+ { Tuple.Create("System.Console.WriteLine", 1), onlyFirst }
+ };
+
+ public GatherVisitor (BaseRefactoringContext context) : base (context)
+ {
+ binOpVisitor = new BinaryExpressionVisitor (this);
+ }
+
+ HashSet<AstNode> processedNodes = new HashSet<AstNode>();
+
+ void CheckExpressionInAutoCallContext(Expression expression)
+ {
+ if (expression is InvocationExpression && !processedNodes.Contains(expression)) {
+ CheckInvocationInAutoCallContext((InvocationExpression)expression);
+ }
+ }
+
+ void CheckInvocationInAutoCallContext(InvocationExpression invocationExpression)
+ {
+ var memberExpression = invocationExpression.Target as MemberReferenceExpression;
+ if (memberExpression == null) {
+ return;
+ }
+ if (memberExpression.MemberName != "ToString" || invocationExpression.Arguments.Any ()) {
+ return;
+ }
+
+ var resolveResult = ctx.Resolve(invocationExpression) as CSharpInvocationResolveResult;
+ if (resolveResult == null) {
+ return;
+ }
+ AddRedundantToStringIssue(memberExpression, invocationExpression);
+ }
+
+ void AddRedundantToStringIssue(MemberReferenceExpression memberExpression, InvocationExpression invocationExpression)
+ {
+ // Simon Lindgren 2012-09-14: Previously there was a check here to see if the node had already been processed
+ // This has been moved out to the callers, to check it earlier for a 30-40% run time reduction
+ processedNodes.Add(invocationExpression);
+
+ AddIssue(memberExpression.DotToken.StartLocation, invocationExpression.RParToken.EndLocation,
+ ctx.TranslateString("Remove redundant call to ToString()"), script => {
+ script.Replace(invocationExpression, memberExpression.Target.Clone());
+ });
+ }
+
+ #region Binary operator
+ public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression(binaryOperatorExpression);
+
+ if (binaryOperatorExpression.Operator != BinaryOperatorType.Add)
+ return;
+ binOpVisitor.Reset();
+ binaryOperatorExpression.AcceptVisitor(binOpVisitor);
+ }
+
+ BinaryExpressionVisitor binOpVisitor;
+ class BinaryExpressionVisitor : DepthFirstAstVisitor
+ {
+ GatherVisitor issue;
+ int stringExpressionCount;
+ Expression firstStringExpression;
+
+ public BinaryExpressionVisitor(GatherVisitor issue)
+ {
+ this.issue = issue;
+ }
+
+ public void Reset()
+ {
+ stringExpressionCount = 0;
+ firstStringExpression = null;
+ }
+
+ void Check (Expression expression)
+ {
+ if (expression is BinaryOperatorExpression) {
+ expression.AcceptVisitor(this);
+ return;
+ }
+ if (stringExpressionCount <= 1) {
+ var resolveResult = issue.ctx.Resolve(expression);
+ if (resolveResult.Type.IsKnownType(KnownTypeCode.String)) {
+ stringExpressionCount++;
+ if (stringExpressionCount == 1) {
+ firstStringExpression = expression;
+ } else {
+ issue.CheckExpressionInAutoCallContext(firstStringExpression);
+ issue.CheckExpressionInAutoCallContext(expression);
+ }
+ }
+ } else {
+ issue.CheckExpressionInAutoCallContext(expression);
+ }
+ }
+
+ public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
+ {
+ Check(binaryOperatorExpression.Left);
+ Check(binaryOperatorExpression.Right);
+ }
+ }
+
+ #endregion
+
+ #region Invocation expression
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ var target = invocationExpression.Target as MemberReferenceExpression;
+
+ var invocationResolveResult = ctx.Resolve(invocationExpression) as CSharpInvocationResolveResult;
+ if (invocationResolveResult == null) {
+ return;
+ }
+ IMember member = invocationResolveResult.Member;
+
+ // "".ToString()
+ CheckTargetedObject(invocationExpression, invocationResolveResult.TargetResult.Type, member);
+
+ // Check list of members that call ToString() automatically
+ CheckAutomaticToStringCallers(invocationExpression, member);
+
+ // Check formatting calls
+ CheckFormattingCall(invocationExpression, invocationResolveResult);
+ }
+
+ void CheckTargetedObject(InvocationExpression invocationExpression, IType type, IMember member)
+ {
+ var memberExpression = invocationExpression.Target as MemberReferenceExpression;
+ if (memberExpression != null && !processedNodes.Contains(invocationExpression)) {
+ if (type.IsKnownType(KnownTypeCode.String) && member.Name == "ToString") {
+ AddRedundantToStringIssue(memberExpression, invocationExpression);
+ }
+ }
+ }
+
+ void CheckAutomaticToStringCallers(InvocationExpression invocationExpression, IMember member)
+ {
+ if (member.IsOverride) {
+ member = InheritanceHelper.GetBaseMember(member);
+ if (member == null) {
+ return;
+ }
+ }
+ var key = new Tuple<string, int>(member.ReflectionName, invocationExpression.Arguments.Count);
+ Tuple<int, int> checkInfo;
+ if (membersCallingToString.TryGetValue(key, out checkInfo)) {
+ var arguments = invocationExpression.Arguments.ToList();
+ for (int i = checkInfo.Item1; i < Math.Min(invocationExpression.Arguments.Count, checkInfo.Item2 + 1); ++i) {
+ CheckExpressionInAutoCallContext(arguments[i]);
+ }
+ }
+ }
+
+ void CheckFormattingCall(InvocationExpression invocationExpression, CSharpInvocationResolveResult invocationResolveResult)
+ {
+ Expression formatArgument;
+ IList<Expression> formatArguments;
+ // Only check parameters that are of type object: String means it is neccessary, others
+ // means that there is another problem (ie no matching overload of the method).
+ Func<IParameter, Expression, bool> predicate = (parameter, argument) => {
+ var type = parameter.Type;
+ if (type is TypeWithElementType && parameter.IsParams) {
+ type = ((TypeWithElementType)type).ElementType;
+ }
+ var typeDefinition = type.GetDefinition();
+ if (typeDefinition == null)
+ return false;
+ return typeDefinition.IsKnownType(KnownTypeCode.Object);
+ };
+ if (FormatStringHelper.TryGetFormattingParameters(invocationResolveResult, invocationExpression,
+ out formatArgument, out formatArguments, predicate)) {
+ foreach (var argument in formatArguments) {
+ CheckExpressionInAutoCallContext(argument);
+ }
+ }
+ }
+ #endregion
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantUsingDirectiveIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantUsingDirectiveIssue.cs
new file mode 100644
index 0000000..2d90c53
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantUsingDirectiveIssue.cs
@@ -0,0 +1,155 @@
+//
+// RedundantUsingInspector.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin <http://xamarin.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ /// <summary>
+ /// Finds redundant using declarations.
+ /// </summary>
+ [IssueDescription("Redundant using directive",
+ Description = "Using directive is not required and can safely be removed.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantUsingDirective"
+ )]
+ public class RedundantUsingDirectiveIssue : ICodeIssueProvider
+ {
+ List<string> namespacesToKeep = new List<string>();
+
+ /// <summary>
+ /// The list of namespaces that should be kept even if they are not being used.
+ /// Used in SharpDevelop to always keep the "System" namespace around.
+ /// </summary>
+ public IList<string> NamespacesToKeep {
+ get { return namespacesToKeep; }
+ }
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var visitor = new GatherVisitor (context, this);
+ context.RootNode.AcceptVisitor (visitor);
+ visitor.Collect ();
+ return visitor.FoundIssues;
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantUsingDirectiveIssue>
+ {
+ Dictionary<UsingDeclaration, bool> isInUse = new Dictionary<UsingDeclaration, bool>();
+ Dictionary<string, UsingDeclaration> namespaceToUsingDecl = new Dictionary<string, UsingDeclaration>();
+
+ public GatherVisitor (BaseRefactoringContext ctx, RedundantUsingDirectiveIssue qualifierDirectiveEvidentIssueProvider) : base (ctx, qualifierDirectiveEvidentIssueProvider)
+ {
+ }
+
+ public void Collect()
+ {
+ foreach (var u in isInUse.Where (u => !u.Value)) {
+ var decl = u.Key;
+ AddIssue(decl, ctx.TranslateString("Remove redundant using directives"), script => {
+ foreach (var u2 in isInUse.Where (a => !a.Value)) {
+ script.Remove (u2.Key);
+ }
+ }
+ );
+ }
+ }
+
+ public override void VisitUsingDeclaration(UsingDeclaration usingDeclaration)
+ {
+ base.VisitUsingDeclaration(usingDeclaration);
+ if (IsSuppressed(usingDeclaration.StartLocation))
+ return;
+ var nrr = ctx.Resolve(usingDeclaration.Import) as NamespaceResolveResult;
+ if (nrr != null) {
+ isInUse[usingDeclaration] = QualifierDirectiveEvidentIssueProvider.namespacesToKeep.Contains(nrr.NamespaceName);
+ namespaceToUsingDecl[nrr.NamespaceName] = usingDeclaration;
+ }
+ }
+
+ public override void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration)
+ {
+ var oldNamespaceToUsingDecl = new Dictionary<string, UsingDeclaration>(namespaceToUsingDecl);
+ base.VisitNamespaceDeclaration(namespaceDeclaration);
+ namespaceToUsingDecl = oldNamespaceToUsingDecl;
+ }
+
+ void UseNamespace(string ns)
+ {
+ UsingDeclaration decl;
+ if (namespaceToUsingDecl.TryGetValue(ns, out decl)) {
+ isInUse[decl] = true;
+ }
+ }
+
+ public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
+ {
+ base.VisitIdentifierExpression(identifierExpression);
+ var trr = ctx.Resolve(identifierExpression) as TypeResolveResult;
+ if (trr != null) {
+ UseNamespace(trr.Type.Namespace);
+ }
+ }
+
+ public override void VisitSimpleType(SimpleType simpleType)
+ {
+ base.VisitSimpleType(simpleType);
+ UseNamespace(ctx.Resolve(simpleType).Type.Namespace);
+ }
+
+ public override void VisitInvocationExpression (InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression (invocationExpression);
+ UseExtensionMethod(ctx.Resolve(invocationExpression));
+ }
+
+ void UseExtensionMethod(ResolveResult rr)
+ {
+ var mg = rr as CSharpInvocationResolveResult;
+ if (mg != null && mg.IsExtensionMethodInvocation) {
+ UseNamespace (mg.Member.DeclaringType.Namespace);
+ }
+ }
+
+ public override void VisitQueryExpression(QueryExpression queryExpression)
+ {
+ base.VisitQueryExpression(queryExpression);
+ foreach (var clause in queryExpression.Clauses) {
+ UseExtensionMethod(ctx.Resolve(clause));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/EmptyConstructorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/EmptyConstructorIssue.cs
new file mode 100644
index 0000000..74e3add
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/EmptyConstructorIssue.cs
@@ -0,0 +1,81 @@
+//
+// EmptyConstructorIssue.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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 SaHALL 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Empty constructor",
+ Description = "An empty public constructor without paramaters is redundant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "EmptyConstructor",
+ IssueMarker = IssueMarker.GrayOut)]
+ public class EmptyConstructorIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue>();
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<EmptyConstructorIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typedeclaration)
+ {
+ bool hasEmptyConstructor = false;
+ bool hasUnemptyConstructor = false;
+ ConstructorDeclaration emptyContructorNode = null;
+
+ foreach (var child in typedeclaration.Children.OfType<ConstructorDeclaration>()) {
+ if (child.HasModifier(Modifiers.Static))
+ continue;
+ if (child.Body.Any() || child.Parameters.Count > 0) {
+ hasUnemptyConstructor = true;
+ } else if (child.HasModifier(Modifiers.Public)) {
+ if (child.Initializer.Arguments.Any ())
+ continue;
+ hasEmptyConstructor = true;
+ emptyContructorNode = child;
+ }
+ }
+
+ if (!hasUnemptyConstructor && hasEmptyConstructor) {
+ AddIssue(emptyContructorNode, ctx.TranslateString("Remove constructor"), script => script.Remove(emptyContructorNode));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/LocalVariableNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/LocalVariableNotUsedIssue.cs
new file mode 100644
index 0000000..3c3360f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/LocalVariableNotUsedIssue.cs
@@ -0,0 +1,112 @@
+//
+// LocalVariableNotUsedIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Unused local variable",
+ Description = "Local variable is never used.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ PragmaWarning = 163,
+ ResharperDisableKeyword = "UnusedVariable.Compiler")]
+ public class LocalVariableNotUsedIssue : ICodeIssueProvider
+ {
+ #region ICodeIssueProvider implementation
+
+ public System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ #endregion
+
+ class GatherVisitor : GatherVisitorBase<LocalVariableNotUsedIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitVariableInitializer (VariableInitializer variableInitializer)
+ {
+ base.VisitVariableInitializer (variableInitializer);
+
+ // check if variable is assigned
+ if (!variableInitializer.Initializer.IsNull)
+ return;
+ var decl = variableInitializer.Parent as VariableDeclarationStatement;
+ if (decl == null)
+ return;
+
+ var resolveResult = ctx.Resolve (variableInitializer) as LocalResolveResult;
+ if (resolveResult == null)
+ return;
+
+ if (IsUsed (decl.Parent, resolveResult.Variable, variableInitializer))
+ return;
+
+ AddIssue (variableInitializer.NameToken, ctx.TranslateString ("Remove unused local variable"),
+ script =>
+ {
+ if (decl.Variables.Count == 1) {
+ script.Remove (decl);
+ } else {
+ var newDeclaration = (VariableDeclarationStatement)decl.Clone ();
+ newDeclaration.Variables.Remove (
+ newDeclaration.Variables.FirstOrNullObject (v => v.Name == variableInitializer.Name));
+ script.Replace (decl, newDeclaration);
+ }
+ });
+ }
+
+ public override void VisitForeachStatement (ForeachStatement foreachStatement)
+ {
+ base.VisitForeachStatement (foreachStatement);
+
+ var resolveResult = ctx.Resolve (foreachStatement.VariableNameToken) as LocalResolveResult;
+ if (resolveResult == null)
+ return;
+
+ if (IsUsed (foreachStatement, resolveResult.Variable, foreachStatement.VariableNameToken))
+ return;
+
+ AddIssue (foreachStatement.VariableNameToken, ctx.TranslateString ("Local variable is never used"));
+ }
+
+ bool IsUsed(AstNode rootNode, IVariable variable, AstNode variableNode)
+ {
+ return ctx.FindReferences(rootNode, variable).Any(result => result.Node != variableNode);
+ }
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantBaseConstructorCallIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantBaseConstructorCallIssue.cs
new file mode 100644
index 0000000..8dbfeb6
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantBaseConstructorCallIssue.cs
@@ -0,0 +1,86 @@
+//
+// RedundantBaseConstructorCallIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Redundant base constructor call",
+ Description = "This is generated by the compiler and can be safely removed.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Suggestion,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantBaseConstructorCall")]
+ public class RedundantBaseConstructorCallIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantBaseConstructorCallIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ base.VisitConstructorDeclaration(constructorDeclaration);
+
+ if (constructorDeclaration.Initializer.ConstructorInitializerType != ConstructorInitializerType.Base)
+ return;
+ if (constructorDeclaration.Initializer.IsNull)
+ return;
+ if (constructorDeclaration.Initializer.Arguments.Count != 0)
+ return;
+ AddIssue(constructorDeclaration.Initializer.StartLocation, constructorDeclaration.Initializer.EndLocation,
+ ctx.TranslateString("Remove redundant 'base()'"),
+ script => {
+ var clone = (ConstructorDeclaration)constructorDeclaration.Clone();
+ script.Replace(clone.ColonToken, CSharpTokenNode.Null.Clone());
+ script.Replace(constructorDeclaration.Initializer, ConstructorInitializer.Null.Clone());
+ });
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ //ignore properties
+ }
+
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ //ignore fields
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ //ignore method declarations
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantDefaultFieldInitializerIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantDefaultFieldInitializerIssue.cs
new file mode 100644
index 0000000..ceb143c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/RedundantDefaultFieldInitializerIssue.cs
@@ -0,0 +1,126 @@
+//
+// RedundantDefaultFieldInitializerIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant field initializer",
+ Description = "Initializing field with default value is redundant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantDefaultFieldInitializer")]
+ public class RedundantDefaultFieldInitializerIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+ class GatherVisitor : GatherVisitorBase<RedundantDefaultFieldInitializerIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitFieldDeclaration (FieldDeclaration fieldDeclaration)
+ {
+ base.VisitFieldDeclaration (fieldDeclaration);
+ if (fieldDeclaration.HasModifier (Modifiers.Const))
+ return;
+ var defaultValueExpr = GetDefaultValueExpression (fieldDeclaration.ReturnType);
+ if (defaultValueExpr == null)
+ return;
+
+ foreach (var variable1 in fieldDeclaration.Variables) {
+ var variable = variable1;
+ if (!defaultValueExpr.Match (variable.Initializer).Success)
+ continue;
+
+ AddIssue (variable.Initializer, ctx.TranslateString ("Initializing field by default value is redundant"),
+ new CodeAction(ctx.TranslateString ("Remove field initializer"),
+ script => script.Replace (variable, new VariableInitializer (variable.Name)),
+ variable.Initializer));
+ }
+ }
+
+ Expression GetDefaultValueExpression (AstType astType)
+ {
+ var type = ctx.ResolveType (astType);
+
+ if ((type.IsReferenceType ?? false) || type.Kind == TypeKind.Dynamic)
+ return new NullReferenceExpression ();
+
+ var typeDefinition = type.GetDefinition ();
+ if (typeDefinition != null) {
+ switch (typeDefinition.KnownTypeCode) {
+ case KnownTypeCode.Boolean:
+ return new PrimitiveExpression (false);
+
+ case KnownTypeCode.Char:
+ return new PrimitiveExpression ('\0');
+
+ case KnownTypeCode.SByte:
+ case KnownTypeCode.Byte:
+ case KnownTypeCode.Int16:
+ case KnownTypeCode.UInt16:
+ case KnownTypeCode.Int32:
+ return new PrimitiveExpression (0);
+
+ case KnownTypeCode.Int64:
+ return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0L) };
+ case KnownTypeCode.UInt32:
+ return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0U) };
+ case KnownTypeCode.UInt64:
+ return new Choice {
+ new PrimitiveExpression (0), new PrimitiveExpression (0U), new PrimitiveExpression (0UL)
+ };
+ case KnownTypeCode.Single:
+ return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0F) };
+ case KnownTypeCode.Double:
+ return new Choice {
+ new PrimitiveExpression (0), new PrimitiveExpression (0F), new PrimitiveExpression (0D)
+ };
+ case KnownTypeCode.Decimal:
+ return new Choice { new PrimitiveExpression (0), new PrimitiveExpression (0M) };
+
+ case KnownTypeCode.NullableOfT:
+ return new NullReferenceExpression ();
+ }
+ if (type.Kind == TypeKind.Struct)
+ return new ObjectCreateExpression (astType.Clone ());
+ }
+ return new DefaultValueExpression (astType.Clone ());
+ }
+
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/UnusedTypeParameterIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/UnusedTypeParameterIssue.cs
new file mode 100644
index 0000000..add2a86
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Synced/RedundanciesInDeclaration/UnusedTypeParameterIssue.cs
@@ -0,0 +1,100 @@
+//
+// UnusedTypeParameterIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Unused type parameter",
+ Description = "Type parameter is never used.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "UnusedTypeParameter")]
+ public class UnusedTypeParameterIssue : ICodeIssueProvider
+ {
+ static FindReferences refFinder = new FindReferences ();
+
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue> ();
+ return new GatherVisitor (context, unit).GetIssues ();
+ }
+
+ protected static bool FindUsage (BaseRefactoringContext context, SyntaxTree unit,
+ ITypeParameter typeParameter, AstNode declaration)
+ {
+ var found = false;
+ var searchScopes = refFinder.GetSearchScopes(typeParameter);
+ refFinder.FindReferencesInFile(searchScopes, context.Resolver,
+ (node, resolveResult) =>
+ {
+ if (node != declaration)
+ found = true;
+ }, context.CancellationToken);
+ return found;
+ }
+
+ class GatherVisitor : GatherVisitorBase<UnusedTypeParameterIssue>
+ {
+ SyntaxTree unit;
+
+ public GatherVisitor (BaseRefactoringContext ctx, SyntaxTree unit)
+ : base (ctx)
+ {
+ this.unit = unit;
+ }
+
+ public override void VisitTypeParameterDeclaration (TypeParameterDeclaration decl)
+ {
+ base.VisitTypeParameterDeclaration (decl);
+
+ var resolveResult = ctx.Resolve (decl) as TypeResolveResult;
+ if (resolveResult == null)
+ return;
+ var typeParameter = resolveResult.Type as ITypeParameter;
+ if (typeParameter == null)
+ return;
+ var methodDecl = decl.Parent as MethodDeclaration;
+ if (methodDecl == null)
+ return;
+
+ if (FindUsage (ctx, unit, typeParameter, decl))
+ return;
+
+ AddIssue (decl.NameToken, ctx.TranslateString ("Type parameter is never used"));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ThreadStaticOnInstanceFieldIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ThreadStaticOnInstanceFieldIssue.cs
deleted file mode 100644
index eaa37b4..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ThreadStaticOnInstanceFieldIssue.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// ThreadStaticOnInstanceFieldIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using System;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("The ThreadStatic attribute does nothing on instance fields",
- Description = "Finds usages of ThreadStatic on instance fields.",
- Category = IssueCategories.Notifications,
- Severity = Severity.Warning,
- ResharperDisableKeyword = "ThreadStaticAtInstanceField")]
- public class ThreadStaticOnInstanceFieldIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ThreadStaticOnInstanceFieldIssue>
- {
- ITypeDefinition threadStaticDefinition;
-
- public GatherVisitor(BaseRefactoringContext context) : base (context)
- {
- var type = typeof(ThreadStaticAttribute).ToTypeReference().Resolve(ctx.Compilation.TypeResolveContext);
- threadStaticDefinition = type.GetDefinition();
- }
-
- public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
- {
- if (fieldDeclaration.Modifiers.HasFlag(Modifiers.Static))
- return;
-
- foreach (var attributeSection in fieldDeclaration.Attributes) {
- int attributeCount = attributeSection.Attributes.Count;
- foreach (var attribute in attributeSection.Attributes) {
- var resolvedAttribute = ctx.Resolve(attribute.Type) as TypeResolveResult;
- if (resolvedAttribute == null)
- continue;
- if (threadStaticDefinition.Equals(resolvedAttribute.Type.GetDefinition())) {
- string title = ctx.TranslateString("ThreadStatic does nothing on instance fields");
- if (attributeCount == 1)
- AddIssue(attributeSection, title, GetActions(attribute, attributeSection, fieldDeclaration));
- else
- AddIssue(attribute, title, GetActions(attribute, attributeSection, fieldDeclaration));
- }
- }
- }
- }
-
- IEnumerable<CodeAction> GetActions(Attribute attribute, AttributeSection attributeSection, FieldDeclaration fieldDeclaration)
- {
- string removeAttributeMessage = ctx.TranslateString("Remove attribute");
- yield return new CodeAction(removeAttributeMessage, script => {
- if (attributeSection.Attributes.Count > 1) {
- var newSection = new AttributeSection();
- newSection.AttributeTarget = attributeSection.AttributeTarget;
- foreach (var attr in attributeSection.Attributes) {
- if (attr != attribute)
- newSection.Attributes.Add((Attribute)attr.Clone());
- }
- script.Replace(attributeSection, newSection);
- } else {
- script.Remove(attributeSection);
- }
- }, attribute);
-
- var makeStaticMessage = ctx.TranslateString("Make the field static");
- yield return new CodeAction(makeStaticMessage, script => {
- var newDeclaration = (FieldDeclaration)fieldDeclaration.Clone();
- newDeclaration.Modifiers |= Modifiers.Static;
- script.Replace(fieldDeclaration, newDeclaration);
- }, fieldDeclaration.NameToken);
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/TypeParameterNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/TypeParameterNotUsedIssue.cs
deleted file mode 100644
index 9531964..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/TypeParameterNotUsedIssue.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// TypeParameterNotUsedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Unused type parameter",
- Description = "Type parameter is never used.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut,
- ResharperDisableKeyword = "UnusedTypeParameter")]
- public class TypeParameterNotUsedIssue : ICodeIssueProvider
- {
- static FindReferences refFinder = new FindReferences ();
-
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- var unit = context.RootNode as SyntaxTree;
- if (unit == null)
- return Enumerable.Empty<CodeIssue> ();
- return new GatherVisitor (context, unit).GetIssues ();
- }
-
- protected static bool FindUsage (BaseRefactoringContext context, SyntaxTree unit,
- ITypeParameter typaParameter, AstNode declaration)
- {
- var found = false;
- refFinder.FindTypeParameterReferences (typaParameter, context.UnresolvedFile, unit, context.Compilation,
- (node, resolveResult) =>
- {
- found = found || node != declaration;
- }, context.CancellationToken);
- return found;
- }
-
- class GatherVisitor : GatherVisitorBase<TypeParameterNotUsedIssue>
- {
- SyntaxTree unit;
-
- public GatherVisitor (BaseRefactoringContext ctx, SyntaxTree unit)
- : base (ctx)
- {
- this.unit = unit;
- }
-
- public override void VisitTypeParameterDeclaration (TypeParameterDeclaration decl)
- {
- base.VisitTypeParameterDeclaration (decl);
-
- var resolveResult = ctx.Resolve (decl) as TypeResolveResult;
- if (resolveResult == null)
- return;
- var typeParameter = resolveResult.Type as ITypeParameter;
- if (typeParameter == null)
- return;
- var methodDecl = decl.Parent as MethodDeclaration;
- if (methodDecl == null)
- return;
-
- if (FindUsage (ctx, unit, typeParameter, decl))
- return;
-
- AddIssue (decl.NameToken, ctx.TranslateString ("Type parameter is never used"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/BitwiseOperationOnNonFlagsEnumIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/BitwiseOperationOnNonFlagsEnumIssue.cs
new file mode 100644
index 0000000..2439cd1
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/BitwiseOperationOnNonFlagsEnumIssue.cs
@@ -0,0 +1,121 @@
+//
+// BitwiseOperationOnNonFlagsEnumIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Bitwise Operations on enum without [Flags] attribute",
+ Description = "Bitwise Operations on enum not marked with [Flags] attribute",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "BitwiseOperatorOnEnumWihtoutFlags")]
+ public class BitwiseOperationOnNonFlagsEnumIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<BitwiseOperationOnNonFlagsEnumIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ static bool IsBitwiseOperator (UnaryOperatorType op)
+ {
+ return op == UnaryOperatorType.BitNot;
+ }
+
+ static bool IsBitwiseOperator (AssignmentOperatorType op)
+ {
+ return op == AssignmentOperatorType.BitwiseAnd || op == AssignmentOperatorType.BitwiseOr ||
+ op == AssignmentOperatorType.ExclusiveOr;
+ }
+
+ static bool IsBitwiseOperator (BinaryOperatorType op)
+ {
+ return op == BinaryOperatorType.BitwiseAnd || op == BinaryOperatorType.BitwiseOr ||
+ op == BinaryOperatorType.ExclusiveOr;
+ }
+
+ bool IsNonFlagsEnum (Expression expr)
+ {
+ var resolveResult = ctx.Resolve (expr);
+ if (resolveResult == null || resolveResult.Type.Kind != TypeKind.Enum)
+ return false;
+
+ // check [Flags]
+ var typeDef = resolveResult.Type.GetDefinition ();
+ return typeDef != null &&
+ typeDef.Attributes.All (attr => attr.AttributeType.FullName != "System.FlagsAttribute");
+ }
+
+ private void AddIssue (CSharpTokenNode operatorToken)
+ {
+ AddIssue (operatorToken,
+ ctx.TranslateString ("Bitwise Operations on enum not marked with Flags attribute"));
+ }
+
+ public override void VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
+ {
+ base.VisitUnaryOperatorExpression (unaryOperatorExpression);
+
+ if (!IsBitwiseOperator (unaryOperatorExpression.Operator))
+ return;
+ if (IsNonFlagsEnum (unaryOperatorExpression.Expression))
+ AddIssue (unaryOperatorExpression.OperatorToken);
+ }
+
+ public override void VisitAssignmentExpression (AssignmentExpression assignmentExpression)
+ {
+ base.VisitAssignmentExpression (assignmentExpression);
+
+ if (!IsBitwiseOperator (assignmentExpression.Operator))
+ return;
+ if (IsNonFlagsEnum (assignmentExpression.Right))
+ AddIssue (assignmentExpression.OperatorToken);
+ }
+
+ public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression (binaryOperatorExpression);
+
+ if (!IsBitwiseOperator (binaryOperatorExpression.Operator))
+ return;
+ if (IsNonFlagsEnum (binaryOperatorExpression.Left) || IsNonFlagsEnum (binaryOperatorExpression.Right))
+ AddIssue (binaryOperatorExpression.OperatorToken);
+ }
+
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CallToObjectEqualsViaBaseIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CallToObjectEqualsViaBaseIssue.cs
new file mode 100644
index 0000000..07cf589
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CallToObjectEqualsViaBaseIssue.cs
@@ -0,0 +1,92 @@
+//
+// CallToObjectEqualsViaBaseIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Call to base.Equals resolves to Object.Equals, which is reference equality",
+ Description = "Finds potentially erroneous calls to Object.Equals.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "BaseObjectEqualsIsObjectEquals")]
+ public class CallToObjectEqualsViaBaseIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CallToObjectEqualsViaBaseIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ if (invocationExpression.Arguments.Count != 1) {
+ return;
+ }
+ var memberExpression = invocationExpression.Target as MemberReferenceExpression;
+ if (memberExpression == null || memberExpression.MemberName != "Equals" || !(memberExpression.Target is BaseReferenceExpression)) {
+ return;
+ }
+ var resolveResult = ctx.Resolve(invocationExpression) as InvocationResolveResult;
+ if (resolveResult == null || !resolveResult.Member.DeclaringTypeDefinition.IsKnownType(KnownTypeCode.Object)) {
+ return;
+ }
+ var title = ctx.TranslateString("Call to base.Equals resolves to Object.Equals, which is reference equality");
+ AddIssue(invocationExpression, title, GetActions(invocationExpression));
+ }
+
+ IEnumerable<CodeAction> GetActions(InvocationExpression invocationExpression)
+ {
+ yield return new CodeAction(ctx.TranslateString("Change invocation to call Object.ReferenceEquals"), script => {
+ var args = Enumerable.Concat(new [] { new ThisReferenceExpression() }, invocationExpression.Arguments.Select(arg => arg.Clone()));
+ var newInvocation = MakeInvocation("object.ReferenceEquals", args);
+ script.Replace(invocationExpression, newInvocation);
+ }, invocationExpression);
+ yield return new CodeAction(ctx.TranslateString("Remove 'base.'"), script => {
+ var newInvocation = MakeInvocation("Equals", invocationExpression.Arguments.Select(arg => arg.Clone()));
+ script.Replace(invocationExpression, newInvocation);
+ }, invocationExpression);
+ }
+
+ static InvocationExpression MakeInvocation(string memberName, IEnumerable<Expression> unClonedArguments)
+ {
+ return new InvocationExpression(new IdentifierExpression(memberName), unClonedArguments);
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CastExpressionOfIncompatibleTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CastExpressionOfIncompatibleTypeIssue.cs
new file mode 100644
index 0000000..c44011c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CastExpressionOfIncompatibleTypeIssue.cs
@@ -0,0 +1,83 @@
+//
+// CastExpressionOfIncompatibleTypeIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Type cast expression of incompatible type",
+ Description = "Type cast expression of incompatible type",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class CastExpressionOfIncompatibleTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CastExpressionOfIncompatibleTypeIssue>
+ {
+ readonly CSharpConversions conversion;
+
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ conversion = new CSharpConversions(ctx.Compilation);
+ }
+
+ public override void VisitCastExpression (CastExpression castExpression)
+ {
+ base.VisitCastExpression (castExpression);
+
+ VisitTypeCastExpression (castExpression, ctx.Resolve (castExpression.Expression).Type,
+ ctx.ResolveType (castExpression.Type));
+ }
+
+ public override void VisitAsExpression (AsExpression asExpression)
+ {
+ base.VisitAsExpression (asExpression);
+
+ VisitTypeCastExpression (asExpression, ctx.Resolve (asExpression.Expression).Type,
+ ctx.ResolveType (asExpression.Type));
+ }
+
+ void VisitTypeCastExpression (Expression expression, IType exprType, IType castToType)
+ {
+ if (exprType.Kind == TypeKind.Unknown || castToType.Kind == TypeKind.Unknown)
+ return;
+ var foundConversion = conversion.ExplicitConversion(exprType, castToType);
+ if (foundConversion == Conversion.None)
+ AddIssue (expression, ctx.TranslateString ("Type cast expression of incompatible type"));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareBooleanWithTrueOrFalseIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareBooleanWithTrueOrFalseIssue.cs
new file mode 100644
index 0000000..aa3e8de
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareBooleanWithTrueOrFalseIssue.cs
@@ -0,0 +1,91 @@
+//
+// CompareBooleanWithTrueOrFalseIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Comparison of boolean with 'true' or 'false'",
+ Description = "Comparison of a boolean value with 'true' or 'false' constant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "RedundantBoolCompare")]
+ public class CompareBooleanWithTrueOrFalseIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CompareBooleanWithTrueOrFalseIssue>
+ {
+ static readonly Pattern pattern = new Choice {
+ PatternHelper.CommutativeOperator(
+ new NamedNode ("const", new Choice { new PrimitiveExpression(true), new PrimitiveExpression(false) }),
+ BinaryOperatorType.Equality, new AnyNode("expr")),
+ PatternHelper.CommutativeOperator(
+ new NamedNode ("const", new Choice { new PrimitiveExpression(true), new PrimitiveExpression(false) }),
+ BinaryOperatorType.InEquality, new AnyNode("expr")),
+ };
+
+ static InsertParenthesesVisitor insertParenthesesVisitor = new InsertParenthesesVisitor ();
+
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression (binaryOperatorExpression);
+
+ var match = pattern.Match (binaryOperatorExpression);
+ if (!match.Success)
+ return;
+ var expr = match.Get<Expression> ("expr").First ();
+ // check if expr is of boolean type
+ var exprType = ctx.Resolve (expr).Type.GetDefinition ();
+ if (exprType == null || exprType.KnownTypeCode != KnownTypeCode.Boolean)
+ return;
+
+ AddIssue (binaryOperatorExpression, ctx.TranslateString ("Simplify boolean comparison"), scrpit => {
+ var boolConstant = (bool)match.Get<PrimitiveExpression> ("const").First ().Value;
+ if ((binaryOperatorExpression.Operator == BinaryOperatorType.InEquality && boolConstant) ||
+ (binaryOperatorExpression.Operator == BinaryOperatorType.Equality && !boolConstant)) {
+ expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr.Clone());
+ expr.AcceptVisitor (insertParenthesesVisitor);
+ }
+ scrpit.Replace (binaryOperatorExpression, expr);
+ });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareFloatWithEqualityOperatorIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareFloatWithEqualityOperatorIssue.cs
new file mode 100644
index 0000000..d5b9a54
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompareFloatWithEqualityOperatorIssue.cs
@@ -0,0 +1,144 @@
+//
+// CompareFloatWithEqualityOperatorIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Compare floating point numbers with equality operator",
+ Description = "Comparison of floating point numbers with equality operator.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "CompareOfFloatsByEqualityOperator")]
+ public class CompareFloatWithEqualityOperatorIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CompareFloatWithEqualityOperatorIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ static bool IsFloatingPointType (IType type)
+ {
+ var typeDef = type.GetDefinition ();
+ return typeDef != null &&
+ (typeDef.KnownTypeCode == KnownTypeCode.Single || typeDef.KnownTypeCode == KnownTypeCode.Double);
+ }
+
+ bool IsFloatingPoint(AstNode node)
+ {
+ return IsFloatingPointType (ctx.Resolve (node).Type);
+ }
+
+ bool IsConstantInfinity(AstNode node)
+ {
+ ResolveResult rr = ctx.Resolve(node);
+ if (!rr.IsCompileTimeConstant)
+ return false;
+ if (rr.ConstantValue is float)
+ return float.IsInfinity((float)rr.ConstantValue);
+ else if (rr.ConstantValue is double)
+ return double.IsInfinity((double)rr.ConstantValue);
+ else
+ return false;
+ }
+
+ bool IsNaN (AstNode node, out string floatType)
+ {
+ floatType = "";
+ var rr = ctx.Resolve (node);
+ if (!rr.IsCompileTimeConstant)
+ return false;
+
+ if (rr.ConstantValue is double && double.IsNaN ((double)rr.ConstantValue)) {
+ floatType = "double";
+ return true;
+ }
+ if (rr.ConstantValue is float && float.IsNaN ((float)rr.ConstantValue)) {
+ floatType = "float";
+ return true;
+ }
+ return false;
+ }
+
+ void AddIsNaNIssue(BinaryOperatorExpression binaryOperatorExpr, Expression argExpr, string floatType)
+ {
+ if (!ctx.Resolve(argExpr).Type.IsKnownType(KnownTypeCode.Single))
+ floatType = "double";
+ AddIssue(binaryOperatorExpr, string.Format(ctx.TranslateString ("Use {0}.IsNaN()"), floatType),
+ script => {
+ Expression expr = new PrimitiveType(floatType).Invoke("IsNaN", argExpr.Clone());
+ if (binaryOperatorExpr.Operator == BinaryOperatorType.InEquality)
+ expr = new UnaryOperatorExpression (UnaryOperatorType.Not, expr);
+ script.Replace (binaryOperatorExpr, expr);
+ });
+ }
+
+ public override void VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
+ {
+ base.VisitBinaryOperatorExpression (binaryOperatorExpression);
+
+ if (binaryOperatorExpression.Operator != BinaryOperatorType.Equality &&
+ binaryOperatorExpression.Operator != BinaryOperatorType.InEquality)
+ return;
+
+ string floatType;
+ if (IsNaN(binaryOperatorExpression.Left, out floatType)) {
+ AddIsNaNIssue (binaryOperatorExpression, binaryOperatorExpression.Right, floatType);
+ } else if (IsNaN (binaryOperatorExpression.Right, out floatType)) {
+ AddIsNaNIssue (binaryOperatorExpression, binaryOperatorExpression.Left, floatType);
+ } else if (IsFloatingPoint(binaryOperatorExpression.Left) || IsFloatingPoint(binaryOperatorExpression.Right)) {
+ if (IsConstantInfinity(binaryOperatorExpression.Left) || IsConstantInfinity(binaryOperatorExpression.Right))
+ return;
+ AddIssue (binaryOperatorExpression, ctx.TranslateString ("Compare a difference with EPSILON"),
+ script => {
+ // Math.Abs(diff) op EPSILON
+ var builder = ctx.CreateTypeSystemAstBuilder(binaryOperatorExpression);
+ var diff = new BinaryOperatorExpression (binaryOperatorExpression.Left.Clone (),
+ BinaryOperatorType.Subtract, binaryOperatorExpression.Right.Clone ());
+ var abs = builder.ConvertType(new TopLevelTypeName("System", "Math")).Invoke("Abs", diff);
+ var op = binaryOperatorExpression.Operator == BinaryOperatorType.Equality ?
+ BinaryOperatorType.LessThan : BinaryOperatorType.GreaterThan;
+ var epsilon = new IdentifierExpression ("EPSILON");
+ var compare = new BinaryOperatorExpression (abs, op, epsilon);
+ script.Replace (binaryOperatorExpression, compare);
+ script.Link (epsilon);
+ });
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0029InvalidConversionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0029InvalidConversionIssue.cs
new file mode 100644
index 0000000..b43ba92
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0029InvalidConversionIssue.cs
@@ -0,0 +1,149 @@
+//
+// CS0029InvalidConversionIssue.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// Copyright (c) 2013 Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("CS0029: Cannot implicitly convert type 'A' to 'B'.",
+ Description = "This error occurs when trying to assign a value of an incompatible type.",
+ Category = IssueCategories.CompilerErrors,
+ Severity = Severity.Error,
+ IssueMarker = IssueMarker.Underline)]
+ public class CS0029InvalidConversionIssue : ICodeIssueProvider
+ {
+ // This class handles both
+ // CS0029: Cannot implicitly convert type 'type' to 'type'
+ // and
+ // CS0266: Cannot implicitly convert type 'type1' to 'type2'. An explicit conversion exists (are you missing a cast?)
+
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CS0029InvalidConversionIssue>
+ {
+ readonly CSharpConversions conversion;
+
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ conversion = new CSharpConversions(ctx.Compilation);
+ }
+
+ // Currently, we only checks assignments
+ public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
+ {
+ base.VisitAssignmentExpression(assignmentExpression);
+ if (assignmentExpression.Operator != AssignmentOperatorType.Assign)
+ return;
+ var variableType = ctx.Resolve(assignmentExpression.Left).Type;
+ CheckConversion(variableType, assignmentExpression.Right);
+ }
+
+ public override void VisitVariableInitializer(VariableInitializer variableInitializer)
+ {
+ base.VisitVariableInitializer(variableInitializer);
+ if (!variableInitializer.Initializer.IsNull) {
+ var variableType = ctx.Resolve(variableInitializer).Type;
+ CheckConversion(variableType, variableInitializer.Initializer);
+ }
+ }
+
+ public override void VisitReturnStatement(ReturnStatement returnStatement)
+ {
+ base.VisitReturnStatement(returnStatement);
+ if (!returnStatement.Expression.IsNull)
+ CheckConversion(ctx.GetExpectedType (returnStatement.Expression), returnStatement.Expression);
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+ foreach (var expr in invocationExpression.Arguments) {
+ CheckConversion(ctx.GetExpectedType(expr), expr);
+ }
+ }
+
+ public override void VisitFixedStatement(FixedStatement fixedStatement)
+ {
+ // TODO: Check the initializer - but it can't contain a type cast anyways.
+ fixedStatement.EmbeddedStatement.AcceptVisitor (this);
+ }
+
+ public override void VisitArrayInitializerExpression(ArrayInitializerExpression arrayInitializerExpression)
+ {
+ base.VisitArrayInitializerExpression(arrayInitializerExpression);
+ foreach (var expr in arrayInitializerExpression.Elements) {
+ CheckConversion(ctx.GetExpectedType(expr), expr);
+ }
+ }
+
+ void CheckConversion(IType variableType, Expression expression)
+ {
+ if (variableType.Kind == TypeKind.Unknown)
+ return; // ignore error if the variable type is unknown
+ if (ctx.GetConversion(expression).IsValid)
+ return; // don't complain if the code is valid
+
+ var rr = ctx.Resolve(expression);
+ if (rr.Type.Kind == TypeKind.Unknown)
+ return; // ignore error if expression type is unknown
+
+ var foundConversion = conversion.ExplicitConversion(rr, variableType);
+
+ var builder = ctx.CreateTypeSystemAstBuilder(expression);
+ AstType variableTypeNode = builder.ConvertType(variableType);
+ AstType expressionTypeNode = builder.ConvertType(rr.Type);
+
+ if (foundConversion.IsValid) {
+ // CS0266: An explicit conversion exists -> suggested fix is to insert the cast
+ string title = string.Format(ctx.TranslateString("Cannot implicitly convert type `{0}' to `{1}'. An explicit conversion exists (are you missing a cast?)"),
+ expressionTypeNode, variableTypeNode);
+ string fixTitle = string.Format(ctx.TranslateString("Cast to '{0}'"), variableTypeNode);
+ Action<Script> fixAction = script => {
+ var right = expression.Clone();
+ var castRight = right.CastTo(variableTypeNode);
+ script.Replace(expression, castRight);
+ };
+ AddIssue(expression, title, new CodeAction(fixTitle, fixAction, expression));
+ } else {
+ // CS0029: No explicit conversion -> Issue without suggested fix
+ string title = string.Format(ctx.TranslateString("Cannot implicitly convert type `{0}' to `{1}'"),
+ expressionTypeNode, variableTypeNode);
+ AddIssue(expression, title);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs
new file mode 100644
index 0000000..c907121
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS0127ReturnMustNotBeFollowedByAnyExpression.cs
@@ -0,0 +1,117 @@
+//
+// CS0127ReturnMustNotBeFollowedByAnyExpression.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("CS0127: A method with a void return type cannot return a value.",
+ Description = "Since 'function' returns void, a return keyword must not be followed by an object expression",
+ Category = IssueCategories.CompilerErrors,
+ Severity = Severity.Error)]
+ public class CS0127ReturnMustNotBeFollowedByAnyExpression : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<CS0127ReturnMustNotBeFollowedByAnyExpression>
+ {
+ string currentMethodName;
+
+ public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
+ {
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ var primitiveType = methodDeclaration.ReturnType as PrimitiveType;
+ if (primitiveType == null || primitiveType.Keyword != "void")
+ return;
+ currentMethodName = methodDeclaration.Name;
+ base.VisitMethodDeclaration(methodDeclaration);
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ currentMethodName = constructorDeclaration.Name;
+ base.VisitConstructorDeclaration(constructorDeclaration);
+ }
+
+ public override void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
+ {
+ currentMethodName = "~" + destructorDeclaration.Name;
+ base.VisitDestructorDeclaration(destructorDeclaration);
+ }
+
+ public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
+ {
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ }
+
+ public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
+ {
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ }
+
+ public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
+ {
+ }
+
+ public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
+ {
+ }
+
+ public override void VisitReturnStatement(ReturnStatement returnStatement)
+ {
+ if (!returnStatement.Expression.IsNull) {
+ AddIssue(
+ returnStatement,
+ string.Format (ctx.TranslateString("`{0}': A return keyword must not be followed by any expression when method returns void"), currentMethodName),
+ new CodeAction (
+ ctx.TranslateString("Remove returned expression"),
+ script => {
+ script.Remove(returnStatement.Expression);
+ },
+ returnStatement
+ )
+ );
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS1729TypeHasNoConstructorWithNArgumentsIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS1729TypeHasNoConstructorWithNArgumentsIssue.cs
new file mode 100644
index 0000000..810da86
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/CompilerErrors/CS1729TypeHasNoConstructorWithNArgumentsIssue.cs
@@ -0,0 +1,113 @@
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("CS1729: Class does not contain a 0 argument constructor",
+ Description = "CS1729: Class does not contain a 0 argument constructor",
+ Category = IssueCategories.CompilerErrors,
+ Severity = Severity.Error,
+ IssueMarker = IssueMarker.Underline)]
+ public class CS1729TypeHasNoConstructorWithNArgumentsIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ private class GatherVisitor : GatherVisitorBase<CS1729TypeHasNoConstructorWithNArgumentsIssue>
+ {
+ IType currentType;
+ IType baseType;
+
+ public GatherVisitor(BaseRefactoringContext context)
+ : base(context)
+ {
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration declaration)
+ {
+ IType outerType = currentType;
+ IType outerBaseType = baseType;
+
+ var result = ctx.Resolve(declaration) as TypeResolveResult;
+ currentType = result != null ? result.Type : SpecialType.UnknownType;
+ baseType = currentType.DirectBaseTypes.FirstOrDefault(t => t.Kind != TypeKind.Interface) ?? SpecialType.UnknownType;
+
+ base.VisitTypeDeclaration(declaration);
+
+ if (currentType.Kind == TypeKind.Class && currentType.GetConstructors().All(ctor => ctor.IsSynthetic)) {
+ // current type only has the compiler-provided default ctor
+ if (!BaseTypeHasUsableParameterlessConstructor()) {
+ AddIssue(declaration.NameToken, GetIssueText(baseType));
+ }
+ }
+
+ currentType = outerType;
+ baseType = outerBaseType;
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration declaration)
+ {
+ base.VisitConstructorDeclaration(declaration);
+
+ if (declaration.Initializer.IsNull && !declaration.HasModifier(Modifiers.Static)) {
+ // Check if parameterless ctor is available:
+ if (!BaseTypeHasUsableParameterlessConstructor()) {
+ AddIssue(declaration.NameToken, GetIssueText(baseType));
+ }
+ }
+ }
+
+ const OverloadResolutionErrors errorsIndicatingWrongNumberOfArguments =
+ OverloadResolutionErrors.MissingArgumentForRequiredParameter
+ | OverloadResolutionErrors.TooManyPositionalArguments
+ | OverloadResolutionErrors.Inaccessible;
+
+ public override void VisitConstructorInitializer(ConstructorInitializer constructorInitializer)
+ {
+ base.VisitConstructorInitializer(constructorInitializer);
+
+ // Check if existing initializer is valid:
+ var rr = ctx.Resolve(constructorInitializer) as CSharpInvocationResolveResult;
+ if (rr != null && (rr.OverloadResolutionErrors & errorsIndicatingWrongNumberOfArguments) != 0) {
+ IType targetType = constructorInitializer.ConstructorInitializerType == ConstructorInitializerType.Base ? baseType : currentType;
+ AddIssue(constructorInitializer.Keyword, GetIssueText(targetType, constructorInitializer.Arguments.Count));
+ }
+ }
+
+ public override void VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
+ {
+ base.VisitObjectCreateExpression(objectCreateExpression);
+
+ var rr = ctx.Resolve(objectCreateExpression) as CSharpInvocationResolveResult;
+ if (rr != null && (rr.OverloadResolutionErrors & errorsIndicatingWrongNumberOfArguments) != 0) {
+ AddIssue(objectCreateExpression.Type, GetIssueText(rr.Type, objectCreateExpression.Arguments.Count));
+ }
+ }
+
+ bool BaseTypeHasUsableParameterlessConstructor()
+ {
+ var memberLookup = new MemberLookup(currentType.GetDefinition(), ctx.Compilation.MainAssembly);
+ OverloadResolution or = new OverloadResolution(ctx.Compilation, new ResolveResult[0]);
+ foreach (var ctor in baseType.GetConstructors()) {
+ if (memberLookup.IsAccessible(ctor, allowProtectedAccess: true)) {
+ if (or.AddCandidate(ctor) == OverloadResolutionErrors.None)
+ return true;
+ }
+ }
+ return false;
+ }
+
+ string GetIssueText(IType targetType, int argumentCount = 0)
+ {
+ return string.Format(ctx.TranslateString("CS1729: The type '{0}' does not contain a constructor that takes '{1}' arguments"), targetType.Name, argumentCount);
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstantConditionIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstantConditionIssue.cs
new file mode 100644
index 0000000..f8d80fe
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstantConditionIssue.cs
@@ -0,0 +1,150 @@
+//
+// ConstantConditionIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Condition is always 'true' or always 'false'",
+ Description = "Condition is always 'true' or always 'false'.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class ConstantConditionIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ConstantConditionIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
+ {
+ base.VisitConditionalExpression (conditionalExpression);
+
+ CheckCondition (conditionalExpression.Condition);
+ }
+
+ public override void VisitIfElseStatement (IfElseStatement ifElseStatement)
+ {
+ base.VisitIfElseStatement (ifElseStatement);
+
+ CheckCondition (ifElseStatement.Condition);
+ }
+
+ public override void VisitWhileStatement (WhileStatement whileStatement)
+ {
+ base.VisitWhileStatement (whileStatement);
+
+ CheckCondition (whileStatement.Condition);
+ }
+
+ public override void VisitDoWhileStatement (DoWhileStatement doWhileStatement)
+ {
+ base.VisitDoWhileStatement (doWhileStatement);
+
+ CheckCondition (doWhileStatement.Condition);
+ }
+
+ public override void VisitForStatement (ForStatement forStatement)
+ {
+ base.VisitForStatement (forStatement);
+
+ CheckCondition (forStatement.Condition);
+ }
+
+ void CheckCondition (Expression condition)
+ {
+ if (condition is PrimitiveExpression)
+ return;
+
+ var resolveResult = ctx.Resolve (condition);
+ if (!(resolveResult.IsCompileTimeConstant && resolveResult.ConstantValue is bool))
+ return;
+
+ var value = (bool)resolveResult.ConstantValue;
+ var conditionalExpr = condition.Parent as ConditionalExpression;
+ var ifElseStatement = condition.Parent as IfElseStatement;
+ var valueStr = value.ToString ().ToLowerInvariant ();
+
+ CodeAction action;
+ if (conditionalExpr != null) {
+ var replaceExpr = value ? conditionalExpr.TrueExpression : conditionalExpr.FalseExpression;
+ action = new CodeAction (
+ string.Format (ctx.TranslateString ("Replace '?:' with '{0}' branch"), valueStr),
+ script => script.Replace (conditionalExpr, replaceExpr.Clone ()),
+ condition);
+ } else if (ifElseStatement != null) {
+ action = new CodeAction (
+ string.Format (ctx.TranslateString ("Replace 'if' with '{0}' branch"), valueStr),
+ script => {
+ var statement = value ? ifElseStatement.TrueStatement : ifElseStatement.FalseStatement;
+ var blockStatement = statement as BlockStatement;
+ if (statement.IsNull || (blockStatement != null && blockStatement.Statements.Count == 0)) {
+ script.Remove (ifElseStatement);
+ return;
+ }
+
+ TextLocation start, end;
+ if (blockStatement != null) {
+ start = blockStatement.Statements.FirstOrNullObject ().StartLocation;
+ end = blockStatement.Statements.LastOrNullObject ().EndLocation;
+ } else {
+ start = statement.StartLocation;
+ end = statement.EndLocation;
+ }
+ RemoveText (script, ifElseStatement.StartLocation, start);
+ RemoveText (script, end, ifElseStatement.EndLocation);
+ script.FormatText (ifElseStatement.Parent);
+ }, condition);
+ } else {
+ action = new CodeAction (
+ string.Format (ctx.TranslateString ("Replace expression with '{0}'"), valueStr),
+ script => script.Replace (condition, new PrimitiveExpression (value)),
+ condition
+ );
+ }
+ AddIssue (condition, string.Format (ctx.TranslateString ("Condition is always '{0}'"), valueStr),
+ new [] { action });
+ }
+
+ void RemoveText (Script script, TextLocation start, TextLocation end)
+ {
+ var startOffset = script.GetCurrentOffset (start);
+ var endOffset = script.GetCurrentOffset (end);
+ if (startOffset < endOffset)
+ script.RemoveText (startOffset, endOffset - startOffset);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorAccessModifierIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorAccessModifierIssue.cs
new file mode 100644
index 0000000..195eafe
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorAccessModifierIssue.cs
@@ -0,0 +1,71 @@
+//
+// StaticConstructorModifierIssue.cs.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Static constructor should be without access modifier",
+ Description = "Static constructor should be without access modifier",
+ Category = IssueCategories.CompilerErrors,
+ Severity = Severity.Error,
+ ResharperDisableKeyword = "StaticConstructorAccessModifier",
+ IssueMarker = IssueMarker.Underline)]
+ public class StaticConstructorAccessModifierIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue>();
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<StaticConstructorAccessModifierIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ if (!constructorDeclaration.HasModifier(Modifiers.Static))
+ return;
+ if (constructorDeclaration.HasModifier(Modifiers.Public) ||
+ constructorDeclaration.HasModifier(Modifiers.Private) ||
+ constructorDeclaration.HasModifier(Modifiers.Protected)) {
+ AddIssue(constructorDeclaration, ctx.TranslateString("Static constructor cannot take access modifier"));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorParameterIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorParameterIssue.cs
new file mode 100644
index 0000000..d871ee8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ConstructorIssues/StaticConstructorParameterIssue.cs
@@ -0,0 +1,68 @@
+//
+// StaticConstructorParameterIssue.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Static constructor should be parameterless",
+ Description = "Static constructor should be parameterless",
+ Category = IssueCategories.CompilerErrors,
+ Severity = Severity.Error,
+ ResharperDisableKeyword = "StaticConstructorParameterless",
+ IssueMarker = IssueMarker.Underline)]
+ public class StaticConstructorParameterIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue>();
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<StaticConstructorParameterIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ if (!constructorDeclaration.HasModifier(Modifiers.Static))
+ return;
+ if (constructorDeclaration.Parameters.Count != 0) {
+ AddIssue(constructorDeclaration, ctx.TranslateString("Static constructor cannot take parameters"));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DisposeMethodInNonIDisposableTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DisposeMethodInNonIDisposableTypeIssue.cs
new file mode 100644
index 0000000..91af162
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DisposeMethodInNonIDisposableTypeIssue.cs
@@ -0,0 +1,186 @@
+// DisposeMethodInNonIDisposableTypeIssue.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Type does not implement IDisposable despite having a Dispose method",
+ Description="This type declares a method named Dispose, but it does not implement the System.IDisposable interface",
+ Category=IssueCategories.CodeQualityIssues,
+ Severity=Severity.Warning,
+ IssueMarker=IssueMarker.Underline)]
+ public class DisposeMethodInNonIDisposableTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var visitor = new GatherVisitor(context);
+ return visitor.GetIssues();
+ }
+
+ private class GatherVisitor : GatherVisitorBase<DisposeMethodInNonIDisposableTypeIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context)
+ : base(context)
+ {
+ }
+
+ static bool IsDisposeMethod(MethodDeclaration methodDeclaration)
+ {
+ if (!methodDeclaration.PrivateImplementationType.IsNull) {
+ //Ignore explictly implemented methods
+ return false;
+ }
+ if (methodDeclaration.Name != "Dispose") {
+ return false;
+ }
+ if (methodDeclaration.Parameters.Count != 0) {
+ return false;
+ }
+
+ if (methodDeclaration.HasModifier(Modifiers.Static)) {
+ return false;
+ }
+
+ var primitiveType = methodDeclaration.ReturnType as PrimitiveType;
+ if (primitiveType == null || primitiveType.KnownTypeCode != KnownTypeCode.Void) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ if (typeDeclaration.ClassType != ClassType.Class && typeDeclaration.ClassType != ClassType.Struct) {
+ //Disabled for interfaces, because the method could be
+ //explicitly implemented
+ //Also, does not apply to enums because enums have no methods
+ return;
+ }
+
+ var resolve = (TypeResolveResult)ctx.Resolve(typeDeclaration);
+ if (Implements(resolve.Type, "System.IDisposable")) {
+ return;
+ }
+
+ base.VisitTypeDeclaration(typeDeclaration);
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ if (!IsDisposeMethod(methodDeclaration)) {
+ return;
+ }
+
+ var type = methodDeclaration.GetParent<TypeDeclaration>();
+ if (type == null) {
+ return;
+ }
+
+ AddIssue(methodDeclaration,
+ ctx.TranslateString("Type does not implement IDisposable despite having a Dispose method"),
+ script => Fix(script, methodDeclaration, type));
+ }
+
+ static IEnumerable<MethodDeclaration> DisposeMethods(TypeDeclaration newTypeDeclaration)
+ {
+ return newTypeDeclaration.Members
+ .OfType<MethodDeclaration>()
+ .Where(IsDisposeMethod);
+ }
+
+ void Fix(Script script, MethodDeclaration methodDeclaration, TypeDeclaration typeDeclaration)
+ {
+ var newTypeDeclaration = (TypeDeclaration) typeDeclaration.Clone();
+
+ var resolver = ctx.GetResolverStateAfter(typeDeclaration.LBraceToken);
+
+ var typeResolve = resolver.ResolveSimpleName("IDisposable", new List<IType>()) as TypeResolveResult;
+ bool canShortenIDisposable = typeResolve != null && typeResolve.Type.FullName == "System.IDisposable";
+
+ string interfaceName = (canShortenIDisposable ? string.Empty : "System.") + "IDisposable";
+
+ newTypeDeclaration.BaseTypes.Add(new SimpleType(interfaceName));
+
+ foreach (var method in DisposeMethods(newTypeDeclaration).ToList()) {
+ method.Modifiers &= ~Modifiers.Private;
+ method.Modifiers &= ~Modifiers.Protected;
+ method.Modifiers &= ~Modifiers.Internal;
+ method.Modifiers |= Modifiers.Public;
+ }
+
+ script.Replace(typeDeclaration, newTypeDeclaration);
+ }
+
+ static bool Implements(IType type, string fullName)
+ {
+ return type.GetAllBaseTypes ().Any (baseType => baseType.FullName == fullName);
+ }
+
+ //Ignore entities that are not methods -- don't visit children
+ public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
+ {
+ }
+
+ public override void VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
+ {
+ }
+
+ public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration)
+ {
+ }
+
+ public override void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
+ {
+ }
+
+ public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
+ {
+ }
+
+ public override void VisitEventDeclaration(EventDeclaration eventDeclaration)
+ {
+ }
+
+ public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
+ {
+ }
+
+ public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
+ {
+ }
+
+ public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
+ {
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateExpressionsInConditionsIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateExpressionsInConditionsIssue.cs
new file mode 100644
index 0000000..46e9886
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateExpressionsInConditionsIssue.cs
@@ -0,0 +1,123 @@
+//
+// DuplicateExpressionsInConditionsIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Expression has some redundant items",
+ Description = "Expression has some redundant items",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
+ public class DuplicateExpressionsInConditionsIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ static readonly List<BinaryOperatorType> SupportedOperators = new List<BinaryOperatorType>();
+ static DuplicateExpressionsInConditionsIssue()
+ {
+ SupportedOperators.Add(BinaryOperatorType.BitwiseAnd);
+ SupportedOperators.Add(BinaryOperatorType.BitwiseOr);
+ SupportedOperators.Add(BinaryOperatorType.ConditionalAnd);
+ SupportedOperators.Add(BinaryOperatorType.ConditionalOr);
+ }
+
+ class GatherVisitor : GatherVisitorBase<DuplicateExpressionsInConditionsIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression)
+ {
+ var expression = binaryOperatorExpression;
+ base.VisitBinaryOperatorExpression(expression);
+ if(!SupportedOperators.Contains(expression.Operator) )
+ return;
+ var parentExpression = expression.Parent as BinaryOperatorExpression;
+ if(parentExpression!=null && parentExpression.Operator==expression.Operator)
+ {
+ //handle only parent sequence
+ return;
+ }
+ var expressions = GetExpressions(binaryOperatorExpression, expression);
+ for(var i=0;i<expressions.Count-1;i++)
+ {
+ for (var j = i+1; j < expressions.Count; j++)
+ {
+ var expressionLeft = expressions[i];
+ var expressionRight = expressions[j];
+ if (!expressionLeft.IsMatch(expressionRight))
+ continue;
+ var action = new CodeAction(ctx.TranslateString("Remove redundant expression"),
+ script => RemoveRedundantExpression(script, expressionRight),
+ expressionRight);
+
+ AddIssue(expressionRight,
+ ctx.TranslateString(string.Format("The expression '{0}' is identical in the left branch",
+ expressionRight)), action);
+
+
+ }
+ }
+ }
+
+ private static void RemoveRedundantExpression(Script script, AstNode expressionRight)
+ {
+ var parent = expressionRight.Parent as BinaryOperatorExpression;
+ if(parent==null) //should never happen!
+ return;
+ script.Replace(parent, parent.Left.Clone());
+ }
+
+ private static List<Expression> GetExpressions(BinaryOperatorExpression binaryOperatorExpression,
+ BinaryOperatorExpression expression)
+ {
+ var baseExpression = expression;
+ var leftExpression = baseExpression.FirstChild as BinaryOperatorExpression;
+ var expressions = new List<Expression>();
+ while (leftExpression != null && binaryOperatorExpression.Operator == leftExpression.Operator)
+ {
+ expressions.Add(baseExpression.Right);
+ baseExpression = leftExpression;
+ leftExpression = leftExpression.Left as BinaryOperatorExpression;
+ }
+ expressions.Add(baseExpression.Right);
+ expressions.Add(baseExpression.Left);
+ expressions.Reverse();
+ return expressions;
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateIfInIfChainIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateIfInIfChainIssue.cs
new file mode 100644
index 0000000..30d6750
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/DuplicateIfInIfChainIssue.cs
@@ -0,0 +1,112 @@
+//
+// DuplicateIfInIfChainIssue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Else branch has some redundant if",
+ Description = "One Else-if was checked before so is not be true",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "ConditionalTernaryEqualBranch")]
+ public class DuplicateIfInIfChainIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<DuplicateIfInIfChainIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitIfElseStatement(IfElseStatement ifStatement)
+ {
+ base.VisitIfElseStatement(ifStatement);
+ var parentExpression = ifStatement.Parent as IfElseStatement;
+ //handle only parent sequence
+ if (parentExpression != null)
+ return;
+ var expressions = GetExpressions(ifStatement);
+ for(var i=0;i<expressions.Count-1;i++) {
+ for (var j = i+1; j < expressions.Count; j++) {
+ var leftCondition = expressions[i].Condition;
+ var rightIf = expressions[j];
+ var rightCondition = rightIf.Condition;
+
+ if (!leftCondition.IsMatch(rightCondition))
+ continue;
+ var action = new CodeAction(ctx.TranslateString("Remove redundant expression"),
+ script => RemoveRedundantIf(script, rightIf),
+ rightCondition);
+
+ AddIssue(rightCondition,
+ ctx.TranslateString(string.Format("The expression '{0}' is identical in the left branch",
+ rightCondition)), action);
+
+ }
+ }
+ }
+
+ private static void RemoveRedundantIf(Script script, IfElseStatement expressionRight)
+ {
+ var parent = expressionRight.Parent as IfElseStatement;
+ if(parent==null) { //should never happen!
+ return;
+ }
+ if (expressionRight.FalseStatement.IsNull) {
+ script.Remove(parent.ElseToken);
+ script.Remove(parent.FalseStatement);
+ script.FormatText(parent);
+ } else {
+ script.Replace(parent.FalseStatement, expressionRight.FalseStatement.Clone());
+ }
+ }
+
+ private static List<IfElseStatement> GetExpressions(IfElseStatement expression)
+ {
+ var baseExpression = expression;
+ var falseExpression = baseExpression.FalseStatement as IfElseStatement;
+ var expressions = new List<IfElseStatement>();
+ while (falseExpression != null) {
+ expressions.Add(baseExpression);
+ baseExpression = falseExpression;
+ falseExpression = falseExpression.FalseStatement as IfElseStatement;
+ }
+ expressions.Add(baseExpression);
+ return expressions;
+ }
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExceptionRethrowIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExceptionRethrowIssue.cs
new file mode 100644
index 0000000..30e74a5
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExceptionRethrowIssue.cs
@@ -0,0 +1,132 @@
+//
+// ExceptionRethrowIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("A throw statement throws the caught exception by passing it explicitly",
+ Description = "Finds throws that throws the caught exception and therefore should be empty.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "PossibleIntendedRethrow")]
+ public class ExceptionRethrowIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ExceptionRethrowIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitCatchClause(CatchClause catchClause)
+ {
+ base.VisitCatchClause(catchClause);
+ var exceptionResolveResult = ctx.Resolve(catchClause.VariableNameToken) as LocalResolveResult;
+ if (exceptionResolveResult == null)
+ return;
+
+ var catchVisitor = new CatchClauseVisitor(ctx, exceptionResolveResult.Variable);
+ catchClause.Body.AcceptVisitor(catchVisitor);
+
+ foreach (var throwStatement in catchVisitor.OffendingThrows) {
+ var localThrowStatement = throwStatement;
+ var title = ctx.TranslateString("The exception is rethrown with explicit usage of the variable");
+ var action = new CodeAction(ctx.TranslateString("Change to 'throw;'"), script => {
+ script.Replace(localThrowStatement, new ThrowStatement());
+ }, catchClause);
+ AddIssue(localThrowStatement, title, action);
+ }
+ }
+ }
+
+ class CatchClauseVisitor : DepthFirstAstVisitor
+ {
+ BaseRefactoringContext ctx;
+
+ IVariable parameter;
+
+ bool variableWritten = false;
+
+ public CatchClauseVisitor(BaseRefactoringContext context, IVariable parameter)
+ {
+ ctx = context;
+ this.parameter = parameter;
+ OffendingThrows = new List<ThrowStatement>();
+ }
+
+ public IList<ThrowStatement> OffendingThrows { get; private set; }
+
+ void HandlePotentialWrite (Expression expression)
+ {
+ var variableResolveResult = ctx.Resolve(expression) as LocalResolveResult;
+ if (variableResolveResult == null)
+ return;
+ variableWritten |= variableResolveResult.Equals(parameter);
+ }
+
+ public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
+ {
+ base.VisitAssignmentExpression(assignmentExpression);
+
+ var variableResolveResult = ctx.Resolve(assignmentExpression.Left) as LocalResolveResult;
+ if (variableResolveResult == null)
+ return;
+ variableWritten |= variableResolveResult.Variable.Equals(parameter);
+ }
+
+ public override void VisitDirectionExpression(DirectionExpression directionExpression)
+ {
+ base.VisitDirectionExpression(directionExpression);
+
+ HandlePotentialWrite(directionExpression);
+ }
+
+ public override void VisitThrowStatement(ThrowStatement throwStatement)
+ {
+ base.VisitThrowStatement(throwStatement);
+
+ if (variableWritten)
+ return;
+
+ var argumentResolveResult = ctx.Resolve(throwStatement.Expression) as LocalResolveResult;
+ if (argumentResolveResult == null)
+ return;
+ if (parameter.Equals(argumentResolveResult.Variable))
+ OffendingThrows.Add(throwStatement);
+ }
+ }
+
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExplicitConversionInForEachIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExplicitConversionInForEachIssue.cs
new file mode 100644
index 0000000..0f3d5c0
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExplicitConversionInForEachIssue.cs
@@ -0,0 +1,77 @@
+// Copyright (c) 2010-2013 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 ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Incorrect element type in foreach over generic collection",
+ Description= "Detects hidden explicit conversions in foreach loops.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning)]
+ public class ExplicitConversionInForEachIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ExplicitConversionInForEachIssue>
+ {
+ CSharpConversions conversions;
+
+ public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
+ {
+ }
+
+ public override void VisitForeachStatement(ForeachStatement foreachStatement)
+ {
+ base.VisitForeachStatement(foreachStatement);
+ var rr = ctx.Resolve(foreachStatement) as ForEachResolveResult;
+ if (rr == null)
+ return;
+ if (rr.ElementType.Kind == TypeKind.Unknown)
+ return;
+ if (ReflectionHelper.GetTypeCode(rr.ElementType) == TypeCode.Object)
+ return;
+ if (conversions == null) {
+ conversions = CSharpConversions.Get(ctx.Compilation);
+ }
+ Conversion c = conversions.ImplicitConversion(rr.ElementType, rr.ElementVariable.Type);
+ if (c.IsValid)
+ return;
+ var csResolver = ctx.GetResolverStateBefore(foreachStatement);
+ var builder = new TypeSystemAstBuilder(csResolver);
+ AstType elementType = builder.ConvertType(rr.ElementType);
+ AstType variableType = foreachStatement.VariableType;
+ string issueText = ctx.TranslateString("Collection element type '{0}' is not implicitly convertible to '{1}'");
+ string fixText = ctx.TranslateString("Use type '{0}'");
+ AddIssue(variableType, string.Format(issueText, elementType.ToString(), variableType.ToString()),
+ new CodeAction(
+ string.Format(fixText, elementType.ToString()),
+ script => script.Replace(variableType, elementType),
+ foreachStatement));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsAlwaysOfProvidedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsAlwaysOfProvidedTypeIssue.cs
new file mode 100644
index 0000000..73a863c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsAlwaysOfProvidedTypeIssue.cs
@@ -0,0 +1,86 @@
+//
+// ExpressionIsAlwaysOfProvidedTypeIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("CS0183:Given expression is always of the provided type",
+ Description = "CS0183:Given expression is always of the provided type.",
+ Category = IssueCategories.CompilerWarnings,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class ExpressionIsAlwaysOfProvidedTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ExpressionIsAlwaysOfProvidedTypeIssue>
+ {
+ readonly CSharpConversions conversions;
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ conversions = CSharpConversions.Get(ctx.Compilation);
+ }
+
+ public override void VisitIsExpression (IsExpression isExpression)
+ {
+ base.VisitIsExpression (isExpression);
+
+ var type = ctx.Resolve (isExpression.Expression).Type;
+ var providedType = ctx.ResolveType (isExpression.Type);
+
+ if (type.Kind == TypeKind.Unknown || providedType.Kind == TypeKind.Unknown)
+ return;
+// var foundConversion = conversions.ImplicitConversion(type, providedType);
+ if (!IsValidReferenceOrBoxingConversion(type, providedType))
+ return;
+
+ var action = new CodeAction (
+ ctx.TranslateString ("Compare with 'null'"),
+ script => script.Replace (isExpression, new BinaryOperatorExpression (
+ isExpression.Expression.Clone (), BinaryOperatorType.InEquality, new PrimitiveExpression (null))),
+ isExpression
+ );
+ AddIssue (isExpression, ctx.TranslateString ("Given expression is always of the provided type. " +
+ "Consider comparing with 'null' instead"), new [] { action });
+ }
+
+ bool IsValidReferenceOrBoxingConversion(IType fromType, IType toType)
+ {
+ Conversion c = conversions.ImplicitConversion(fromType, toType);
+ return c.IsValid && (c.IsIdentityConversion || c.IsReferenceConversion || c.IsBoxingConversion);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsNeverOfProvidedTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsNeverOfProvidedTypeIssue.cs
new file mode 100644
index 0000000..a5193b2
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ExpressionIsNeverOfProvidedTypeIssue.cs
@@ -0,0 +1,92 @@
+//
+// ExpressionIsNeverOfProvidedTypeIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("CS0184:Given expression is never of the provided type",
+ Description = "CS0184:Given expression is never of the provided type.",
+ Category = IssueCategories.CompilerWarnings,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class ExpressionIsNeverOfProvidedTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ExpressionIsNeverOfProvidedTypeIssue>
+ {
+ readonly CSharpConversions conversions;
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ conversions = CSharpConversions.Get(ctx.Compilation);
+ }
+
+ public override void VisitIsExpression (IsExpression isExpression)
+ {
+ base.VisitIsExpression (isExpression);
+
+// var conversions = CSharpConversions.Get(ctx.Compilation);
+ var exprType = ctx.Resolve (isExpression.Expression).Type;
+ var providedType = ctx.ResolveType (isExpression.Type);
+
+ if (exprType.Kind == TypeKind.Unknown || providedType.Kind == TypeKind.Unknown)
+ return;
+ if (IsValidReferenceOrBoxingConversion(exprType, providedType))
+ return;
+
+ var exprTP = exprType as ITypeParameter;
+ var providedTP = providedType as ITypeParameter;
+ if (exprTP != null) {
+ if (IsValidReferenceOrBoxingConversion(exprTP.EffectiveBaseClass, providedType)
+ && exprTP.EffectiveInterfaceSet.All(i => IsValidReferenceOrBoxingConversion(i, providedType)))
+ return;
+ }
+ if (providedTP != null) {
+ if (IsValidReferenceOrBoxingConversion(exprType, providedTP.EffectiveBaseClass))
+ return;
+ }
+
+ AddIssue (isExpression, ctx.TranslateString ("Given expression is never of the provided type"));
+ }
+
+ bool IsValidReferenceOrBoxingConversion(IType fromType, IType toType)
+ {
+ Conversion c = conversions.ExplicitConversion(fromType, toType);
+ return c.IsValid && (c.IsIdentityConversion || c.IsReferenceConversion || c.IsBoxingConversion || c.IsUnboxingConversion);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringHelper.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringHelper.cs
new file mode 100644
index 0000000..555582e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringHelper.cs
@@ -0,0 +1,76 @@
+//
+// FormatStringHelper.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp
+{
+ class FormatStringHelper
+ {
+ static string[] parameterNames = { "format", "frmt", "fmt" };
+
+ public static bool TryGetFormattingParameters(CSharpInvocationResolveResult invocationResolveResult, InvocationExpression invocationExpression,
+ out Expression formatArgument, out IList<Expression> arguments,
+ Func<IParameter, Expression, bool> argumentFilter)
+ {
+ if (argumentFilter == null)
+ argumentFilter = (p, e) => true;
+
+ formatArgument = null;
+ arguments = new List<Expression>();
+ var argumentToParameterMap = invocationResolveResult.GetArgumentToParameterMap();
+ var resolvedParameters = invocationResolveResult.Member.Parameters;
+ var allArguments = invocationExpression.Arguments.ToArray();
+ for (int i = 0; i < allArguments.Length; i++) {
+ var parameterIndex = argumentToParameterMap[i];
+ if (parameterIndex < 0 || parameterIndex >= resolvedParameters.Count) {
+ // No valid mapping for this argument, skip it
+ continue;
+ }
+ var parameter = resolvedParameters[parameterIndex];
+ var argument = allArguments[i];
+ if (parameter.Type.IsKnownType(KnownTypeCode.String) && parameterNames.Contains(parameter.Name)) {
+ formatArgument = argument;
+ } else if (formatArgument != null && parameter.IsParams && !invocationResolveResult.IsExpandedForm) {
+ var ace = argument as ArrayCreateExpression;
+ if (ace == null || ace.Initializer.IsNull)
+ return false;
+ foreach (var element in ace.Initializer.Elements) {
+ if (argumentFilter(parameter, element))
+ arguments.Add(argument);
+ }
+ } else if (formatArgument != null && argumentFilter(parameter, argument)) {
+ arguments.Add(argument);
+ }
+ }
+ return formatArgument != null;
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringIssue.cs
new file mode 100644
index 0000000..7017b02
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/FormatStringIssues/FormatStringIssue.cs
@@ -0,0 +1,119 @@
+//
+// FormatStringIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Linq;
+using ICSharpCode.NRefactory.Utils;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Format string syntax error",
+ Description = "Finds issues with format strings.",
+ Category = IssueCategories.ConstraintViolations,
+ Severity = Severity.Error)]
+ public class FormatStringIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<FormatStringIssue>
+ {
+ readonly BaseRefactoringContext context;
+
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ this.context = context;
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ // Speed up the inspector by discarding some invocations early
+ var hasEligibleArgument = invocationExpression.Arguments.Any(argument => {
+ var primitiveArg = argument as PrimitiveExpression;
+ return primitiveArg != null && primitiveArg.Value is string;
+ });
+ if (!hasEligibleArgument)
+ return;
+
+ var invocationResolveResult = context.Resolve(invocationExpression) as CSharpInvocationResolveResult;
+ if (invocationResolveResult == null)
+ return;
+ Expression formatArgument;
+ IList<Expression> formatArguments;
+ if (!FormatStringHelper.TryGetFormattingParameters(invocationResolveResult, invocationExpression,
+ out formatArgument, out formatArguments, null)) {
+ return;
+ }
+ var primitiveArgument = formatArgument as PrimitiveExpression;
+ if (primitiveArgument == null || !(primitiveArgument.Value is string))
+ return;
+ var format = (string)primitiveArgument.Value;
+ var parsingResult = context.ParseFormatString(format);
+ CheckSegments(parsingResult.Segments, formatArgument.StartLocation, formatArguments, invocationExpression);
+ }
+
+ void CheckSegments(IList<IFormatStringSegment> segments, TextLocation formatStart, IList<Expression> formatArguments, AstNode anchor)
+ {
+ int argumentCount = formatArguments.Count;
+ foreach (var segment in segments) {
+ var errors = segment.Errors.ToList();
+ var formatItem = segment as FormatItem;
+ if (formatItem != null) {
+ var segmentEnd = new TextLocation(formatStart.Line, formatStart.Column + segment.EndLocation + 1);
+ var segmentStart = new TextLocation(formatStart.Line, formatStart.Column + segment.StartLocation + 1);
+ if (formatItem.Index >= argumentCount) {
+ var outOfBounds = context.TranslateString("The index '{0}' is out of bounds of the passed arguments");
+ AddIssue(segmentStart, segmentEnd, string.Format(outOfBounds, formatItem.Index));
+ }
+ if (formatItem.HasErrors) {
+ var errorMessage = string.Join(Environment.NewLine, errors.Select(error => error.Message).ToArray());
+ string messageFormat;
+ if (errors.Count > 1) {
+ messageFormat = context.TranslateString("Multiple:\n{0}");
+ } else {
+ messageFormat = context.TranslateString("{0}");
+ }
+ AddIssue(segmentStart, segmentEnd, string.Format(messageFormat, errorMessage));
+ }
+ } else if (segment.HasErrors) {
+ foreach (var error in errors) {
+ var errorStart = new TextLocation(formatStart.Line, formatStart.Column + error.StartLocation + 1);
+ var errorEnd = new TextLocation(formatStart.Line, formatStart.Column + error.EndLocation + 1);
+ AddIssue(errorStart, errorEnd, error.Message);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectCallToObjectGetHashCodeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectCallToObjectGetHashCodeIssue.cs
new file mode 100644
index 0000000..d46c26c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectCallToObjectGetHashCodeIssue.cs
@@ -0,0 +1,79 @@
+//
+// IncorrectCallToObjectGetHashCodeIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Call resolves to Object.GetHashCode, which is reference based",
+ Description = "Finds calls to Object.GetHashCode inside overridden GetHashCode.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "BaseObjectGetHashCodeCallInGetHashCode")]
+ public class IncorrectCallToObjectGetHashCodeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<IncorrectCallToObjectGetHashCodeIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ // Check that this declaration is a GetHashCode override, _then_ continue traversing
+
+ if (methodDeclaration.Name != "GetHashCode") {
+ return;
+ }
+ if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Override)) {
+ return;
+ }
+
+ base.VisitMethodDeclaration(methodDeclaration);
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ var resolveResult = ctx.Resolve(invocationExpression) as InvocationResolveResult;
+ if (resolveResult == null || !(resolveResult.TargetResult is ThisResolveResult) || resolveResult.Member.Name != "GetHashCode" ||
+ !resolveResult.Member.DeclaringTypeDefinition.IsKnownType(KnownTypeCode.Object)) {
+ return;
+ }
+ AddIssue(invocationExpression, ctx.TranslateString("Call resolves to Object.GetHashCode, which is reference based"));
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectExceptionParameterOrderingIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectExceptionParameterOrderingIssue.cs
new file mode 100644
index 0000000..477daac
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/IncorrectExceptionParameterOrderingIssue.cs
@@ -0,0 +1,98 @@
+//
+// IncorrectExceptionParametersOrderingIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.Semantics;
+using System;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Incorrect ordering of exception constructor parameters",
+ Description = "Warns about the constructor parameter ordering of some confusing exception types.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning)]
+ public class IncorrectExceptionParameterOrderingIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<IncorrectExceptionParameterOrderingIssue>
+ {
+ readonly BaseRefactoringContext context;
+ Dictionary<string, Func<int, int, bool>> rules;
+
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ this.context = context;
+ rules = new Dictionary<string, Func<int, int, bool>>();
+ rules [typeof(ArgumentException).FullName] = (left, right) => left > right;
+ rules [typeof(ArgumentNullException).FullName] = (left, right) => left < right;
+ rules [typeof(ArgumentOutOfRangeException).FullName] = (left, right) => left < right;
+ rules [typeof(DuplicateWaitObjectException).FullName] = (left, right) => left < right;
+ }
+
+ public override void VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
+ {
+ var parameters = objectCreateExpression.Arguments;
+ if (parameters.Count != 2)
+ return;
+ var firstParam = parameters.FirstOrNullObject() as PrimitiveExpression;
+ var secondParam = parameters.LastOrNullObject() as PrimitiveExpression;
+ if (firstParam == null || !(firstParam.Value is string) ||
+ secondParam == null || !(secondParam.Value is string))
+ return;
+ var type = context.Resolve(objectCreateExpression.Type) as TypeResolveResult;
+ if (type == null)
+ return;
+ var leftLength = (firstParam.Value as string).Length;
+ var rightLength = (secondParam.Value as string).Length;
+
+ Func<int, int, bool> func;
+ if (!rules.TryGetValue(type.Type.FullName, out func))
+ return;
+ if (!func(leftLength, rightLength))
+ AddIssue(objectCreateExpression,
+ context.TranslateString("The parameters are in the wrong order"),
+ GetAction(objectCreateExpression, firstParam, secondParam));
+ }
+
+ CodeAction GetAction(ObjectCreateExpression objectCreateExpression,
+ PrimitiveExpression firstParam, PrimitiveExpression secondParam)
+ {
+ return new CodeAction(context.TranslateString("Swap parameters"), script => {
+ var newOCE = objectCreateExpression.Clone() as ObjectCreateExpression;
+ newOCE.Arguments.Clear();
+ newOCE.Arguments.Add(secondParam.Clone());
+ newOCE.Arguments.Add(firstParam.Clone());
+ script.Replace(objectCreateExpression, newOCE);
+ }, objectCreateExpression);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MethodOverloadHidesOptionalParameterIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MethodOverloadHidesOptionalParameterIssue.cs
new file mode 100644
index 0000000..cb9687c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MethodOverloadHidesOptionalParameterIssue.cs
@@ -0,0 +1,86 @@
+//
+// MethodOverloadHidesOptionalParameterIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Method with optional parameter is hidden by overload",
+ Description = "Method with optional parameter is hidden by overload",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "MethodOverloadWithOptionalParameter")]
+ public class MethodOverloadHidesOptionalParameterIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<MethodOverloadHidesOptionalParameterIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ base.VisitMethodDeclaration (methodDeclaration);
+
+ var resolveResult = ctx.Resolve (methodDeclaration) as MemberResolveResult;
+ if (resolveResult == null)
+ return;
+ var method = resolveResult.Member as IMethod;
+ if (method == null)
+ return;
+
+ if (method.Parameters.Count == 0 || !method.Parameters.Last ().IsOptional)
+ return;
+
+ var overloads = method.DeclaringType.GetMethods(m => m.Name == method.Name && m.TypeParameters.Count == method.TypeParameters.Count)
+ .ToArray ();
+
+ var parameterNodes = methodDeclaration.Parameters.ToArray();
+ var parameters = new List<IParameter> ();
+ for (int i = 0; i < method.Parameters.Count; i++) {
+ if (method.Parameters [i].IsOptional &&
+ overloads.Any (m => ParameterListComparer.Instance.Equals (parameters, m.Parameters))) {
+ AddIssue (parameterNodes [i].StartLocation, parameterNodes.Last ().EndLocation,
+ ctx.TranslateString ("Method with optional parameter is hidden by overload"));
+ break;
+ }
+ parameters.Add (method.Parameters [i]);
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MissingStringComparisonIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MissingStringComparisonIssue.cs
new file mode 100644
index 0000000..8302d8f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MissingStringComparisonIssue.cs
@@ -0,0 +1,107 @@
+//
+// MissingStringComparisonIssue.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// Copyright (c) 2012 Daniel Grunwald
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Missing StringComparison argument",
+ Description = "Warns when a culture-aware comparison is used by default.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning)]
+ public class MissingStringComparisonIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<MissingStringComparisonIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx) : base(ctx)
+ {
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ MemberReferenceExpression mre = invocationExpression.Target as MemberReferenceExpression;
+ if (mre == null)
+ return;
+ switch (mre.MemberName) {
+ case "StartsWith":
+ case "EndsWith":
+ if (invocationExpression.Arguments.Count != 1)
+ return;
+ break;
+ case "IndexOf":
+ case "LastIndexOf":
+ break;
+ default:
+ return;
+ }
+
+ var rr = ctx.Resolve(invocationExpression) as InvocationResolveResult;
+ if (rr == null || rr.IsError) {
+ // Not an invocation resolve result - e.g. could be a UnknownMemberResolveResult instead
+ return;
+ }
+ if (!(rr.Member.DeclaringTypeDefinition != null && rr.Member.DeclaringTypeDefinition.KnownTypeCode == KnownTypeCode.String)) {
+ // Not a string operation
+ return;
+ }
+ IParameter firstParameter = rr.Member.Parameters.FirstOrDefault();
+ if (firstParameter == null || !firstParameter.Type.IsKnownType(KnownTypeCode.String))
+ return; // First parameter not a string
+ IParameter lastParameter = rr.Member.Parameters.Last();
+ if (lastParameter.Type.Name == "StringComparison")
+ return; // already specifying a string comparison
+ AddIssue(invocationExpression.LParToken.StartLocation, invocationExpression.RParToken.EndLocation,
+ mre.MemberName + "() call is missing StringComparison argument",
+ new [] {
+ new CodeAction("Use ordinal comparison", script => AddArgument(script, invocationExpression, "Ordinal"), invocationExpression),
+ new CodeAction("Use culture-aware comparison", script => AddArgument(script, invocationExpression, "CurrentCulture"), invocationExpression)
+ });
+ }
+
+ void AddArgument(Script script, InvocationExpression invocationExpression, string stringComparison)
+ {
+ var astBuilder = ctx.CreateTypeSystemAstBuilder(invocationExpression);
+ var newArgument = astBuilder.ConvertType(new TopLevelTypeName("System", "StringComparison")).Member(stringComparison);
+ var copy = (InvocationExpression)invocationExpression.Clone();
+ copy.Arguments.Add(newArgument);
+ script.Replace(invocationExpression, copy);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MultipleEnumerationIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MultipleEnumerationIssue.cs
new file mode 100644
index 0000000..3b3c9c3
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/MultipleEnumerationIssue.cs
@@ -0,0 +1,366 @@
+//
+// MultipleEnumerationIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Possible multiple enumeration of IEnumerable",
+ Description = "Possible multiple enumeration of IEnumerable.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline,
+ ResharperDisableKeyword = "PossibleNullReferenceException")]
+ public class MultipleEnumerationIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class AnalysisStatementCollector : DepthFirstAstVisitor
+ {
+ List<Statement> statements;
+ AstNode variableDecl;
+
+ AnalysisStatementCollector (AstNode variableDecl)
+ {
+ this.variableDecl = variableDecl;
+ }
+
+ IList<Statement> GetStatements ()
+ {
+ if (statements != null)
+ return statements;
+
+ statements = new List<Statement> ();
+ var parent = variableDecl.Parent;
+ while (parent != null) {
+ if (parent is BlockStatement || parent is MethodDeclaration ||
+ parent is AnonymousMethodExpression || parent is LambdaExpression) {
+ parent.AcceptVisitor (this);
+ if (parent is BlockStatement)
+ statements.Add ((BlockStatement)parent);
+ break;
+ }
+ parent = parent.Parent;
+ }
+ return statements;
+ }
+
+ public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ statements.Add (methodDeclaration.Body);
+
+ base.VisitMethodDeclaration (methodDeclaration);
+ }
+
+ public override void VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
+ {
+ statements.Add (anonymousMethodExpression.Body);
+
+ base.VisitAnonymousMethodExpression (anonymousMethodExpression);
+ }
+
+ public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
+ {
+ var body = lambdaExpression.Body as BlockStatement;
+ if (body != null)
+ statements.Add (body);
+
+ base.VisitLambdaExpression (lambdaExpression);
+ }
+
+ public static IList<Statement> Collect (AstNode variableDecl)
+ {
+ return new AnalysisStatementCollector (variableDecl).GetStatements ();
+ }
+ }
+
+ class GatherVisitor : GatherVisitorBase<MultipleEnumerationIssue>
+ {
+ HashSet<AstNode> collectedAstNodes;
+
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ this.collectedAstNodes = new HashSet<AstNode> ();
+ }
+
+ void AddIssue (AstNode node)
+ {
+ if (collectedAstNodes.Add (node))
+ AddIssue (node, ctx.TranslateString ("Possible multiple enumeration of IEnumerable"));
+ }
+
+ void AddIssues (IEnumerable<AstNode> nodes)
+ {
+ foreach (var node in nodes)
+ AddIssue (node);
+ }
+
+ public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration (parameterDeclaration);
+
+ var resolveResult = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
+ CollectIssues (parameterDeclaration, parameterDeclaration.Parent, resolveResult);
+ }
+
+ public override void VisitVariableInitializer (VariableInitializer variableInitializer)
+ {
+ base.VisitVariableInitializer (variableInitializer);
+
+ var resolveResult = ctx.Resolve (variableInitializer) as LocalResolveResult;
+ CollectIssues (variableInitializer, variableInitializer.Parent.Parent, resolveResult);
+ }
+
+ static bool IsAssignment (AstNode node)
+ {
+ var assignment = node.Parent as AssignmentExpression;
+ if (assignment != null)
+ return assignment.Left == node;
+
+ var direction = node.Parent as DirectionExpression;
+ if (direction != null)
+ return direction.FieldDirection == FieldDirection.Out && direction.Expression == node;
+
+ return false;
+ }
+
+ bool IsEnumeration (AstNode node)
+ {
+ var foreachStatement = node.Parent as ForeachStatement;
+ if (foreachStatement != null && foreachStatement.InExpression == node) {
+ return true;
+ }
+
+ var memberRef = node.Parent as MemberReferenceExpression;
+ if (memberRef != null && memberRef.Target == node) {
+ var invocation = memberRef.Parent as InvocationExpression;
+ if (invocation == null || invocation.Target != memberRef)
+ return false;
+
+ var methodGroup = ctx.Resolve (memberRef) as MethodGroupResolveResult;
+ if (methodGroup == null)
+ return false;
+
+ var method = methodGroup.Methods.FirstOrDefault ();
+ if (method != null) {
+ var declaringTypeDef = method.DeclaringTypeDefinition;
+ if (declaringTypeDef != null && declaringTypeDef.KnownTypeCode == KnownTypeCode.Object)
+ return false;
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+ HashSet<AstNode> references;
+ HashSet<Statement> refStatements;
+ HashSet<LambdaExpression> lambdaExpressions;
+
+ HashSet<VariableReferenceNode> visitedNodes;
+ HashSet<VariableReferenceNode> collectedNodes;
+ Dictionary<VariableReferenceNode, int> nodeDegree; // number of enumerations a node can reach
+
+ void FindReferences (AstNode variableDecl, AstNode rootNode, IVariable variable)
+ {
+ references = new HashSet<AstNode> ();
+ refStatements = new HashSet<Statement> ();
+ lambdaExpressions = new HashSet<LambdaExpression> ();
+
+ foreach (var result in ctx.FindReferences (rootNode, variable)) {
+ var astNode = result.Node;
+ if (astNode == variableDecl)
+ continue;
+
+ var parent = astNode.Parent;
+ while (!(parent == null || parent is Statement || parent is LambdaExpression))
+ parent = parent.Parent;
+ if (parent == null)
+ continue;
+
+ // lambda expression with expression body, should be analyzed separately
+ var expr = parent as LambdaExpression;
+ if (expr != null) {
+ if (IsAssignment (astNode) || IsEnumeration (astNode)) {
+ references.Add (astNode);
+ lambdaExpressions.Add (expr);
+ }
+ continue;
+ }
+
+ if (IsAssignment (astNode) || IsEnumeration (astNode)) {
+ references.Add (astNode);
+ var statement = (Statement)parent;
+ refStatements.Add (statement);
+ }
+ }
+ }
+
+ void CollectIssues (AstNode variableDecl, AstNode rootNode, LocalResolveResult resolveResult)
+ {
+ if (resolveResult == null)
+ return;
+ var type = resolveResult.Type;
+ var typeDef = type.GetDefinition ();
+ if (typeDef == null ||
+ (typeDef.KnownTypeCode != KnownTypeCode.IEnumerable &&
+ typeDef.KnownTypeCode != KnownTypeCode.IEnumerableOfT))
+ return;
+
+ FindReferences (variableDecl, rootNode, resolveResult.Variable);
+
+ var statements = AnalysisStatementCollector.Collect (variableDecl);
+ var builder = new VariableReferenceGraphBuilder (ctx);
+ foreach (var statement in statements) {
+ var vrNode = builder.Build (statement, references, refStatements, ctx);
+ FindMultipleEnumeration (vrNode);
+ }
+ foreach (var lambda in lambdaExpressions) {
+ var vrNode = builder.Build (references, ctx.Resolver, (Expression)lambda.Body);
+ FindMultipleEnumeration (vrNode);
+ }
+ }
+
+ /// <summary>
+ /// split references in the specified node into sub nodes according to the value they uses
+ /// </summary>
+ /// <param name="node">node to split</param>
+ /// <returns>list of sub nodes</returns>
+ static IList<VariableReferenceNode> SplitNode (VariableReferenceNode node)
+ {
+ var subNodes = new List<VariableReferenceNode> ();
+ // find indices of all assignments in node and use them to split references
+ var assignmentIndices = new List<int> { -1 };
+ for (int i = 0; i < node.References.Count; i++) {
+ if (IsAssignment (node.References [i]))
+ assignmentIndices.Add (i);
+ }
+ assignmentIndices.Add (node.References.Count);
+ for (int i = 0; i < assignmentIndices.Count - 1; i++) {
+ var index1 = assignmentIndices [i];
+ var index2 = assignmentIndices [i + 1];
+ if (index1 + 1 >= index2)
+ continue;
+ var subNode = new VariableReferenceNode ();
+ for (int refIndex = index1 + 1; refIndex < index2; refIndex++)
+ subNode.References.Add (node.References [refIndex]);
+ subNodes.Add (subNode);
+ }
+ if (subNodes.Count == 0)
+ subNodes.Add (new VariableReferenceNode ());
+
+ var firstNode = subNodes [0];
+ foreach (var prevNode in node.PreviousNodes) {
+ prevNode.NextNodes.Remove (node);
+ // connect two nodes if the first ref is not an assignment
+ if (firstNode.References.FirstOrDefault () == node.References.FirstOrDefault ())
+ prevNode.NextNodes.Add (firstNode);
+ }
+
+ var lastNode = subNodes [subNodes.Count - 1];
+ foreach (var nextNode in node.NextNodes) {
+ nextNode.PreviousNodes.Remove (node);
+ lastNode.AddNextNode (nextNode);
+ }
+
+ return subNodes;
+ }
+
+ /// <summary>
+ /// convert a variable reference graph starting from the specified node to an assignment usage graph,
+ /// in which nodes are connect if and only if they contains references using the same assigned value
+ /// </summary>
+ /// <param name="startNode">starting node of the variable reference graph</param>
+ /// <returns>
+ /// list of VariableReferenceNode, each of which is a starting node of a sub-graph in which references all
+ /// use the same assigned value
+ /// </returns>
+ static IEnumerable<VariableReferenceNode> GetAssignmentUsageGraph (VariableReferenceNode startNode)
+ {
+ var graph = new List<VariableReferenceNode> ();
+ var visited = new HashSet<VariableReferenceNode> ();
+ var stack = new Stack<VariableReferenceNode> ();
+ stack.Push (startNode);
+ while (stack.Count > 0) {
+ var node = stack.Pop ();
+ if (!visited.Add (node))
+ continue;
+
+ var nodes = SplitNode (node);
+ graph.AddRange (nodes);
+ foreach (var addedNode in nodes)
+ visited.Add (addedNode);
+
+ foreach (var nextNode in nodes.Last ().NextNodes)
+ stack.Push (nextNode);
+ }
+ return graph;
+ }
+
+ void FindMultipleEnumeration (VariableReferenceNode startNode)
+ {
+ var vrg = GetAssignmentUsageGraph (startNode);
+ visitedNodes = new HashSet<VariableReferenceNode> ();
+ collectedNodes = new HashSet<VariableReferenceNode> ();
+
+ // degree of a node is the number of references that can be reached by the node
+ nodeDegree = new Dictionary<VariableReferenceNode, int> ();
+
+ foreach (var node in vrg) {
+ if (node.References.Count == 0 || !visitedNodes.Add (node))
+ continue;
+ ProcessNode (node);
+ if (nodeDegree [node] > 1)
+ collectedNodes.Add (node);
+ }
+ foreach (var node in collectedNodes)
+ AddIssues (node.References);
+ }
+
+ void ProcessNode (VariableReferenceNode node)
+ {
+ var degree = nodeDegree [node] = 0;
+ foreach (var nextNode in node.NextNodes) {
+ collectedNodes.Add (nextNode);
+ if (visitedNodes.Add (nextNode))
+ ProcessNode (nextNode);
+ degree = Math.Max (degree, nodeDegree [nextNode]);
+ }
+ nodeDegree [node] = degree + node.References.Count;
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/OptionalParameterCouldBeSkippedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/OptionalParameterCouldBeSkippedIssue.cs
new file mode 100644
index 0000000..051f832
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/OptionalParameterCouldBeSkippedIssue.cs
@@ -0,0 +1,174 @@
+//
+// OptionalParameterCouldBeSkippedIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using System;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Optional argument has default value and can be skipped",
+ Description = "Finds calls to functions where optional parameters are used and the passed argument is the same as the default.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Hint,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class OptionalParameterCouldBeSkippedIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<OptionalParameterCouldBeSkippedIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext context) : base (context)
+ {
+ }
+
+ public override void VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression)
+ {
+ base.VisitObjectCreateExpression(objectCreateExpression);
+
+ CheckMethodCall(objectCreateExpression, objectCreateExpression.Arguments,
+ (objectCreation, args) => new ObjectCreateExpression(objectCreation.Type.Clone(), args));
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ CheckMethodCall(invocationExpression, invocationExpression.Arguments,
+ (invocation, args) => new InvocationExpression(invocation.Target.Clone(), args));
+ }
+
+ void CheckMethodCall<T> (T node, IEnumerable<Expression> args, Func<T, IEnumerable<Expression>, T> generateReplacement) where T: AstNode
+ {
+ // The first two checks are unnecessary, but eliminates the majority of calls early,
+ // improving performance.
+ var arguments = args.ToArray();
+ if (arguments.Length == 0)
+ return;
+ var lastArg = arguments[arguments.Length - 1];
+ if (!(lastArg is PrimitiveExpression || lastArg is NamedArgumentExpression))
+ return;
+
+ var invocationResolveResult = ctx.Resolve(node) as CSharpInvocationResolveResult;
+ if (invocationResolveResult == null)
+ return;
+
+ string actionMessage = ctx.TranslateString("Remove redundant arguments");
+
+ var redundantArguments = GetRedundantArguments(arguments, invocationResolveResult);
+ var action = new CodeAction(actionMessage, script => {
+ var newArgumentList = arguments
+ .Where(arg => !redundantArguments.Contains(arg))
+ .Select(arg => arg.Clone());
+ var newInvocation = generateReplacement(node, newArgumentList);
+ script.Replace(node, newInvocation);
+ }, node);
+ var issueMessage = ctx.TranslateString("Argument is identical to the default value");
+ var lastPositionalArgument = redundantArguments.FirstOrDefault(expression => !(expression is NamedArgumentExpression));
+
+ foreach (var argument in redundantArguments) {
+ var localArgument = argument;
+ var actions = new List<CodeAction>();
+ actions.Add(action);
+
+ if (localArgument is NamedArgumentExpression || localArgument == lastPositionalArgument) {
+ var title = ctx.TranslateString("Remove this argument");
+ actions.Add(new CodeAction(title, script => {
+ var newArgumentList = arguments
+ .Where(arg => arg != localArgument)
+ .Select(arg => arg.Clone());
+ var newInvocation = generateReplacement(node, newArgumentList);
+ script.Replace(node, newInvocation);
+ }, node));
+ } else {
+ var title = ctx.TranslateString("Remove this and the following positional arguments");
+ actions.Add(new CodeAction(title, script => {
+ var newArgumentList = arguments
+ .Where(arg => arg.StartLocation < localArgument.StartLocation && !(arg is NamedArgumentExpression))
+ .Select(arg => arg.Clone());
+ var newInvocation = generateReplacement(node, newArgumentList);
+ script.Replace(node, newInvocation);
+ }, node));
+ }
+
+ AddIssue(localArgument, issueMessage, actions);
+ }
+ }
+
+ IList<Expression> GetRedundantArguments(Expression[] arguments, CSharpInvocationResolveResult invocationResolveResult)
+ {
+ var argumentToParameterMap = invocationResolveResult.GetArgumentToParameterMap();
+ var resolvedParameters = invocationResolveResult.Member.Parameters;
+
+ IList<Expression> redundantArguments = new List<Expression>();
+
+ for (int i = arguments.Length - 1; i >= 0; i--) {
+ var parameterIndex = argumentToParameterMap[i];
+ if (parameterIndex == -1)
+ // This particular parameter is an error, but keep trying the other ones
+ continue;
+ var parameter = resolvedParameters[parameterIndex];
+ var argument = arguments[i];
+ if (argument is PrimitiveExpression) {
+ if (parameter.IsParams)
+ // before positional params arguments all optional arguments are needed, otherwise some of the
+ // param arguments will be shifted out of the params into the fixed parameters
+ break;
+ if (!parameter.IsOptional)
+ // There can be no optional parameters preceding a required one
+ break;
+ var argumentResolveResult = ctx.Resolve(argument) as ConstantResolveResult;
+ if (argumentResolveResult == null || parameter.ConstantValue != argumentResolveResult.ConstantValue)
+ // Stop here since any arguments before this one has to be there
+ // to enable the passing of this argument
+ break;
+ redundantArguments.Add(argument);
+ } else if (argument is NamedArgumentExpression) {
+ var expression = ((NamedArgumentExpression)argument).Expression as PrimitiveExpression;
+ if (expression == null)
+ continue;
+ var expressionResolveResult = ctx.Resolve(expression) as ConstantResolveResult;
+ if (expressionResolveResult == null || parameter.ConstantValue != expressionResolveResult.ConstantValue)
+ // continue, since there can still be more arguments that are redundant
+ continue;
+ redundantArguments.Add(argument);
+ } else {
+ // This is a non-constant positional argument => no more redundancies are possible
+ break;
+ }
+ }
+ return redundantArguments;
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/HasMemberCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/HasMemberCriterion.cs
new file mode 100644
index 0000000..37645fa
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/HasMemberCriterion.cs
@@ -0,0 +1,88 @@
+//
+// HasMemberCriterion.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Linq;
+using System.Collections.Generic;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class HasMemberCriterion : ITypeCriterion
+ {
+// IMember neededMember;
+ IList<IMember> acceptableMembers;
+
+ public HasMemberCriterion(IMember neededMember)
+ {
+// this.neededMember = neededMember;
+
+ if (neededMember.ImplementedInterfaceMembers.Any()) {
+ acceptableMembers = neededMember.ImplementedInterfaceMembers.ToList();
+ } else if (neededMember.IsOverride) {
+ acceptableMembers = new List<IMember>();
+ foreach (var member in InheritanceHelper.GetBaseMembers(neededMember, true)) {
+ acceptableMembers.Add(member);
+ if (member.IsShadowing)
+ break;
+ }
+ acceptableMembers.Add(neededMember);
+ } else {
+ acceptableMembers = new List<IMember> { neededMember };
+ }
+ }
+
+ #region ITypeCriterion implementation
+ public bool SatisfiedBy (IType type)
+ {
+ if (type == null)
+ throw new ArgumentNullException("type");
+
+ var typeMembers = type.GetMembers();
+ return typeMembers.Any(member => HasCommonMemberDeclaration(acceptableMembers, member));
+ }
+ #endregion
+
+ static bool HasCommonMemberDeclaration(IEnumerable<IMember> acceptableMembers, IMember member)
+ {
+ var implementedInterfaceMembers = member.MemberDefinition.ImplementedInterfaceMembers;
+ if (implementedInterfaceMembers.Any()) {
+ return ContainsAny(acceptableMembers, implementedInterfaceMembers);
+ } else {
+ return acceptableMembers.Contains(member/*.MemberDefinition*/);
+ }
+ }
+
+ static bool ContainsAny<T>(IEnumerable<T> collection, IEnumerable<T> items)
+ {
+ foreach (var item in items) {
+ if (collection.Contains(item))
+ return true;
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ITypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ITypeCriterion.cs
new file mode 100644
index 0000000..0e08dfa
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ITypeCriterion.cs
@@ -0,0 +1,44 @@
+//
+// ITypeCriterion.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public interface ITypeCriterion
+ {
+ /// <summary>
+ /// Checks if the given type satisfies the critrion.
+ /// </summary>
+ /// <returns>
+ /// <c>true</c>, if the type satisfies the criterion, <c>false</c> otherwise.
+ /// </returns>
+ /// <param name='type'>
+ /// The type to check.
+ /// </param>
+ bool SatisfiedBy(IType type);
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs
new file mode 100644
index 0000000..a94603d
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsArrayTypeCriterion.cs
@@ -0,0 +1,43 @@
+//
+// IsArrayTypeCriterion.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class IsArrayTypeCriterion : ITypeCriterion
+ {
+ #region ITypeCriterion implementation
+
+ public bool SatisfiedBy(IType type)
+ {
+ return type is ArrayType;
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsTypeCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsTypeCriterion.cs
new file mode 100644
index 0000000..7b73023
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/IsTypeCriterion.cs
@@ -0,0 +1,50 @@
+//
+// IsTypeCriterion.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class IsTypeCriterion : ITypeCriterion
+ {
+ IType isType;
+
+ public IsTypeCriterion(IType isType)
+ {
+ this.isType = isType;
+ }
+
+ #region ITypeCriterion implementation
+ public bool SatisfiedBy (IType type)
+ {
+ return isType == type ||
+ type.GetAllBaseTypes().Any(t => t == isType);
+ }
+ #endregion
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs
new file mode 100644
index 0000000..ad83779
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/ParameterCanBeDemotedIssue.cs
@@ -0,0 +1,220 @@
+//
+// ParameterCouldBeDeclaredWithBaseTypeIssue.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using System;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using System.Diagnostics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("A parameter can be demoted to base class",
+ Description = "Finds parameters that can be demoted to a base class.",
+ Category = IssueCategories.Opportunities,
+ Severity = Severity.Suggestion,
+ SuppressMessageCategory="Microsoft.Design",
+ SuppressMessageCheckId="CA1011:ConsiderPassingBaseTypesAsParameters"
+ )]
+ public class ParameterCanBeDemotedIssue : ICodeIssueProvider
+ {
+ bool tryResolve;
+
+ public ParameterCanBeDemotedIssue() : this (true)
+ {
+ }
+
+ public ParameterCanBeDemotedIssue(bool tryResolve)
+ {
+ this.tryResolve = tryResolve;
+ }
+
+ #region ICodeIssueProvider implementation
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+// var sw = new Stopwatch();
+// sw.Start();
+ var gatherer = new GatherVisitor(context, tryResolve);
+ var issues = gatherer.GetIssues();
+// sw.Stop();
+// Console.WriteLine("Elapsed time in ParameterCanBeDemotedIssue: {0} (Checked types: {3, 4} Qualified for resolution check: {5, 4} Members with issues: {4, 4} Method bodies resolved: {2, 4} File: '{1}')",
+// sw.Elapsed, context.UnresolvedFile.FileName, gatherer.MethodResolveCount, gatherer.TypesChecked, gatherer.MembersWithIssues, gatherer.TypeResolveCount);
+ return issues;
+ }
+ #endregion
+
+ class GatherVisitor : GatherVisitorBase<ParameterCanBeDemotedIssue>
+ {
+ bool tryResolve;
+
+ public GatherVisitor(BaseRefactoringContext context, bool tryResolve) : base (context)
+ {
+ this.tryResolve = tryResolve;
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ methodDeclaration.Attributes.AcceptVisitor(this);
+ if (HasEntryPointSignature(methodDeclaration))
+ return;
+ var eligibleParameters = methodDeclaration.Parameters
+ .Where(p => p.ParameterModifier != ParameterModifier.Out && p.ParameterModifier != ParameterModifier.Ref)
+ .ToList();
+ if (eligibleParameters.Count == 0)
+ return;
+ var declarationResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
+ if (declarationResolveResult == null)
+ return;
+ var member = declarationResolveResult.Member;
+ if (member.IsOverride || member.IsOverridable || member.ImplementedInterfaceMembers.Any())
+ return;
+
+ var collector = new TypeCriteriaCollector(ctx);
+ methodDeclaration.AcceptVisitor(collector);
+
+ foreach (var parameter in eligibleParameters) {
+ ProcessParameter(parameter, methodDeclaration.Body, collector);
+ }
+ }
+
+ bool HasEntryPointSignature(MethodDeclaration methodDeclaration)
+ {
+ if (!methodDeclaration.Modifiers.HasFlag(Modifiers.Static))
+ return false;
+ var returnType = ctx.Resolve(methodDeclaration.ReturnType).Type;
+ if (!returnType.IsKnownType(KnownTypeCode.Int32) && !returnType.IsKnownType(KnownTypeCode.Void))
+ return false;
+ var parameterCount = methodDeclaration.Parameters.Count;
+ if (parameterCount == 0)
+ return true;
+ if (parameterCount != 1)
+ return false;
+ var parameterType = ctx.Resolve(methodDeclaration.Parameters.First()).Type as ArrayType;
+ if (parameterType == null || !parameterType.ElementType.IsKnownType(KnownTypeCode.String))
+ return false;
+ return true;
+ }
+
+ void ProcessParameter(ParameterDeclaration parameter, AstNode rootResolutionNode, TypeCriteriaCollector collector)
+ {
+ var localResolveResult = ctx.Resolve(parameter) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+ var variable = localResolveResult.Variable;
+ var typeKind = variable.Type.Kind;
+ if (!(typeKind == TypeKind.Class ||
+ typeKind == TypeKind.Struct ||
+ typeKind == TypeKind.Interface ||
+ typeKind == TypeKind.Array) ||
+ parameter.Type is PrimitiveType ||
+ !collector.UsedVariables.Contains(variable)) {
+ return;
+ }
+
+ var candidateTypes = localResolveResult.Type.GetAllBaseTypes().ToList();
+ TypesChecked += candidateTypes.Count;
+ var criterion = collector.GetCriterion(variable);
+
+ var possibleTypes =
+ (from type in candidateTypes
+ where !type.Equals(localResolveResult.Type) && criterion.SatisfiedBy(type)
+ select type).ToList();
+
+ TypeResolveCount += possibleTypes.Count;
+ var validTypes =
+ (from type in possibleTypes
+ where !tryResolve || TypeChangeResolvesCorrectly(ctx, parameter, rootResolutionNode, type)
+ select type).ToList();
+ if (validTypes.Any()) {
+ // don't demote an array to IList
+ if (variable.Type.Kind == TypeKind.Array && validTypes.Any (t => t.Namespace == "System.Collections" && t.Name == "IList")) {
+ return;
+ }
+ AddIssue(parameter, ctx.TranslateString("Parameter can be demoted to base class"), GetActions(parameter, validTypes));
+ MembersWithIssues++;
+ }
+ }
+
+ internal int TypeResolveCount = 0;
+ internal int TypesChecked = 0;
+ internal int MembersWithIssues = 0;
+ internal int MethodResolveCount = 0;
+
+ IEnumerable<CodeAction> GetActions(ParameterDeclaration parameter, IEnumerable<IType> possibleTypes)
+ {
+ var csResolver = ctx.Resolver.GetResolverStateBefore(parameter);
+ var astBuilder = new TypeSystemAstBuilder(csResolver);
+ foreach (var type in possibleTypes) {
+ var localType = type;
+ var message = String.Format(ctx.TranslateString("Demote parameter to '{0}'"), type.FullName);
+ yield return new CodeAction(message, script => {
+ script.Replace(parameter.Type, astBuilder.ConvertType(localType));
+ }, parameter.NameToken);
+ }
+ }
+ }
+
+ public static bool TypeChangeResolvesCorrectly(BaseRefactoringContext ctx, ParameterDeclaration parameter, AstNode rootNode, IType type)
+ {
+ var resolver = ctx.GetResolverStateBefore(rootNode);
+ resolver = resolver.AddVariable(new DefaultParameter(type, parameter.Name));
+ var astResolver = new CSharpAstResolver(resolver, rootNode, ctx.UnresolvedFile);
+ var validator = new TypeChangeValidationNavigator();
+ astResolver.ApplyNavigator(validator, ctx.CancellationToken);
+ return !validator.FoundErrors;
+ }
+
+ class TypeChangeValidationNavigator : IResolveVisitorNavigator
+ {
+ public bool FoundErrors { get; private set; }
+
+ #region IResolveVisitorNavigator implementation
+ public ResolveVisitorNavigationMode Scan(AstNode node)
+ {
+ if (FoundErrors)
+ return ResolveVisitorNavigationMode.Skip;
+ return ResolveVisitorNavigationMode.Resolve;
+ }
+
+ public void Resolved(AstNode node, ResolveResult result)
+ {
+// bool errors = result.IsError;
+ FoundErrors |= result.IsError;
+ }
+
+ public void ProcessConversion(Expression expression, ResolveResult result, Conversion conversion, IType targetType)
+ {
+ // no-op
+ }
+ #endregion
+
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs
new file mode 100644
index 0000000..2d63466
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/SupportsIndexingCriterion.cs
@@ -0,0 +1,107 @@
+//
+// SupportsIndexingCriterion.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class SupportsIndexingCriterion : ITypeCriterion
+ {
+ IType returnType;
+
+ IList<IType> argumentTypes;
+
+ CSharpConversions conversions;
+
+ bool isWriteAccess;
+
+ public SupportsIndexingCriterion(IType returnType, IEnumerable<IType> argumentTypes, CSharpConversions conversions, bool isWriteAccess = false)
+ {
+ if (returnType == null)
+ throw new ArgumentNullException("returnType");
+ if (argumentTypes == null)
+ throw new ArgumentNullException("argumentTypes");
+ if (conversions == null)
+ throw new ArgumentNullException("conversions");
+
+ this.returnType = returnType;
+ this.argumentTypes = argumentTypes.ToList();
+ this.conversions = conversions;
+ this.isWriteAccess = isWriteAccess;
+ }
+
+ #region ITypeCriterion implementation
+
+ public bool SatisfiedBy(IType type)
+ {
+ var accessors = type.GetAccessors().ToList();
+ return accessors.Any(member => {
+ var parameterizedMember = member as IParameterizedMember;
+ if (parameterizedMember == null)
+ return false;
+
+ if (isWriteAccess) {
+ var parameterCount = member.Parameters.Count;
+ if (member.Name != "set_Item" || parameterCount < 2)
+ return false;
+ var indexerElementType = parameterizedMember.Parameters.Last().Type;
+ var indexerParameterTypes = parameterizedMember.Parameters.Take(parameterCount - 1).Select(p => p.Type).ToList();
+ return IsSignatureMatch(indexerElementType, indexerParameterTypes);
+ } else {
+ if (member.Name != "get_Item" || member.Parameters.Count < 1)
+ return false;
+ var indexerElementType = parameterizedMember.ReturnType;
+ var indexerParameterTypes = parameterizedMember.Parameters.Select(p => p.Type).ToList();
+ return IsSignatureMatch(indexerElementType, indexerParameterTypes);
+ }
+ });
+ }
+
+ #endregion
+
+ bool IsSignatureMatch(IType indexerElementType, IList<IType> indexerParameterTypes)
+ {
+ indexerElementType.GetAllBaseTypes();
+ if (indexerParameterTypes.Count != argumentTypes.Count)
+ return false;
+ var returnConversion = conversions.ImplicitConversion(indexerElementType, returnType);
+ if (!returnConversion.IsValid)
+ return false;
+ for (int i = 0; i < argumentTypes.Count; i++) {
+ var conversion = conversions.ImplicitConversion(indexerParameterTypes[i], argumentTypes[i]);
+ if (!conversion.IsValid)
+ return false;
+ }
+ return true;
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs
new file mode 100644
index 0000000..9d75925
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ParameterCanBeDemotedIssue/TypeCriteriaCollector.cs
@@ -0,0 +1,212 @@
+//
+// CriteriaCollector.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public class TypeCriteriaCollector : DepthFirstAstVisitor
+ {
+ BaseRefactoringContext context;
+
+ public TypeCriteriaCollector(BaseRefactoringContext context)
+ {
+ this.context = context;
+ TypeCriteria = new Dictionary<IVariable, IList<ITypeCriterion>>();
+ UsedVariables = new HashSet<IVariable>();
+ }
+
+ IDictionary<IVariable, IList<ITypeCriterion>> TypeCriteria { get; set; }
+
+ public HashSet<IVariable> UsedVariables { get; private set; }
+
+ public ITypeCriterion GetCriterion(IVariable variable)
+ {
+ if (!TypeCriteria.ContainsKey(variable))
+ return new ConjunctionCriteria(new List<ITypeCriterion>());
+ return new ConjunctionCriteria(TypeCriteria[variable]);
+ }
+
+ void AddCriterion(IVariable variable, ITypeCriterion criterion)
+ {
+ if (!TypeCriteria.ContainsKey(variable))
+ TypeCriteria[variable] = new List<ITypeCriterion>();
+ TypeCriteria[variable].Add(criterion);
+ }
+
+ public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
+ {
+ base.VisitMemberReferenceExpression(memberReferenceExpression);
+
+ var targetResolveResult = context.Resolve(memberReferenceExpression.Target) as LocalResolveResult;
+ if (targetResolveResult == null)
+ return;
+ var variable = targetResolveResult.Variable;
+ var conversion = context.GetConversion(memberReferenceExpression);
+ if (conversion.IsMethodGroupConversion) {
+ AddCriterion(variable, new HasMemberCriterion(conversion.Method));
+ } else {
+ var resolveResult = context.Resolve(memberReferenceExpression);
+ var memberResolveResult = resolveResult as MemberResolveResult;
+ if (memberResolveResult != null)
+ AddCriterion(variable, new HasMemberCriterion(memberResolveResult.Member));
+ }
+ }
+
+ public override void VisitIndexerExpression(IndexerExpression indexerExpression)
+ {
+ base.VisitIndexerExpression(indexerExpression);
+
+ var localResolveResult = context.Resolve(indexerExpression.Target) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+ var resolveResult = context.Resolve(indexerExpression);
+ if (localResolveResult == null)
+ return;
+ var parent = indexerExpression.Parent;
+ while (parent is ParenthesizedExpression)
+ parent = parent.Parent;
+ if (parent is DirectionExpression) {
+ // The only types which are indexable and where the indexing expression
+ // results in a variable is an actual array type
+ AddCriterion(localResolveResult.Variable, new IsArrayTypeCriterion());
+ } else if (resolveResult is ArrayAccessResolveResult) {
+ var arrayResolveResult = (ArrayAccessResolveResult)resolveResult;
+ var arrayType = arrayResolveResult.Array.Type as ArrayType;
+ if (arrayType != null) {
+ var parameterTypes = arrayResolveResult.Indexes.Select(index => index.Type);
+ var criterion = new SupportsIndexingCriterion(arrayType.ElementType, parameterTypes, CSharpConversions.Get(context.Compilation));
+ AddCriterion(localResolveResult.Variable, criterion);
+ }
+ } else if (resolveResult is CSharpInvocationResolveResult) {
+ var invocationResolveResult = (CSharpInvocationResolveResult)resolveResult;
+ var parameterTypes = invocationResolveResult.Arguments.Select(arg => arg.Type);
+ var criterion = new SupportsIndexingCriterion(invocationResolveResult.Member.ReturnType, parameterTypes, CSharpConversions.Get(context.Compilation));
+ AddCriterion(localResolveResult.Variable, criterion);
+ }
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression(invocationExpression);
+
+ var resolveResult = context.Resolve(invocationExpression);
+ var invocationResolveResult = resolveResult as InvocationResolveResult;
+ if (invocationResolveResult == null)
+ return;
+
+ // invocationExpression.Target resolves to a method group and VisitMemberReferenceExpression
+ // only handles members, so handle method groups here
+ var targetResolveResult = invocationResolveResult.TargetResult as LocalResolveResult;
+ if (targetResolveResult != null) {
+ var variable = targetResolveResult.Variable;
+ AddCriterion(variable, new HasMemberCriterion(invocationResolveResult.Member));
+ }
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ base.VisitMethodDeclaration(methodDeclaration);
+
+ var lastParameter = methodDeclaration.Parameters.LastOrNullObject();
+ if (lastParameter.IsNull || !lastParameter.ParameterModifier.HasFlag(ParameterModifier.Params))
+ return;
+ var localResolveResult = context.Resolve(lastParameter) as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+ AddCriterion(localResolveResult.Variable, new IsArrayTypeCriterion());
+ }
+
+ Role[] roles = new [] {
+ Roles.Expression,
+ Roles.Argument,
+ Roles.Condition,
+ BinaryOperatorExpression.RightRole,
+ BinaryOperatorExpression.LeftRole
+ };
+
+ public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
+ {
+ var resolveResult = context.Resolve(identifierExpression);
+ var localResolveResult = resolveResult as LocalResolveResult;
+ if (localResolveResult == null)
+ return;
+
+ var variable = localResolveResult.Variable;
+ if (!UsedVariables.Contains(variable))
+ UsedVariables.Add(variable);
+
+ // Assignment expressions are checked separately, see VisitAssignmentExpression
+ if (!roles.Contains(identifierExpression.Role) || identifierExpression.Parent is AssignmentExpression)
+ return;
+
+ CheckForCriterion(identifierExpression, variable);
+ }
+
+ public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
+ {
+ base.VisitAssignmentExpression(assignmentExpression);
+
+ // Only check the right side; The left side always has the type of
+ // the variable, which is not what we want to check
+
+ var rightResolveResult = context.Resolve(assignmentExpression.Right) as LocalResolveResult;
+ if (rightResolveResult != null) {
+ CheckForCriterion(assignmentExpression.Right, rightResolveResult.Variable);
+ }
+ }
+
+ void CheckForCriterion(Expression expression, IVariable variable)
+ {
+ AddCriterion(variable, new IsTypeCriterion(context.GetExpectedType(expression)));
+ }
+
+ class ConjunctionCriteria : ITypeCriterion
+ {
+ IList<ITypeCriterion> criteria;
+
+ public ConjunctionCriteria(IList<ITypeCriterion> criteria)
+ {
+ this.criteria = criteria;
+ }
+
+ public bool SatisfiedBy(IType type)
+ {
+ foreach (var criterion in criteria) {
+ if (!criterion.SatisfiedBy(type)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAssignmentIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAssignmentIssue.cs
new file mode 100644
index 0000000..03f0e05
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAssignmentIssue.cs
@@ -0,0 +1,464 @@
+//
+// RedundantAssignmentIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Redundant assignment",
+ Description = "Value assigned to a variable or parameter is not used in all execution path.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class RedundantAssignmentIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var unit = context.RootNode as SyntaxTree;
+ if (unit == null)
+ return Enumerable.Empty<CodeIssue>();
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantAssignmentIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration(parameterDeclaration);
+ if (parameterDeclaration.ParameterModifier == ParameterModifier.Out ||
+ parameterDeclaration.ParameterModifier == ParameterModifier.Ref)
+ return;
+
+ var resolveResult = ctx.Resolve(parameterDeclaration) as LocalResolveResult;
+ BlockStatement rootStatement = null;
+ if (parameterDeclaration.Parent is MethodDeclaration) {
+ rootStatement = ((MethodDeclaration)parameterDeclaration.Parent).Body;
+ } else if (parameterDeclaration.Parent is AnonymousMethodExpression) {
+ rootStatement = ((AnonymousMethodExpression)parameterDeclaration.Parent).Body;
+ } else if (parameterDeclaration.Parent is LambdaExpression) {
+ rootStatement = ((LambdaExpression)parameterDeclaration.Parent).Body as BlockStatement;
+ }
+ CollectIssues(parameterDeclaration, rootStatement, resolveResult);
+ }
+
+ public override void VisitVariableInitializer(VariableInitializer variableInitializer)
+ {
+ base.VisitVariableInitializer(variableInitializer);
+ if (!inUsingStatementResourceAcquisition) {
+ var resolveResult = ctx.Resolve(variableInitializer) as LocalResolveResult;
+ CollectIssues(variableInitializer, variableInitializer.GetParent<BlockStatement>(), resolveResult);
+ }
+ }
+
+ bool inUsingStatementResourceAcquisition;
+
+ public override void VisitUsingStatement(UsingStatement usingStatement)
+ {
+ inUsingStatementResourceAcquisition = true;
+ usingStatement.ResourceAcquisition.AcceptVisitor(this);
+ inUsingStatementResourceAcquisition = false;
+ usingStatement.EmbeddedStatement.AcceptVisitor(this);
+ }
+
+ void CollectIssues(AstNode variableDecl, BlockStatement rootStatement, LocalResolveResult resolveResult)
+ {
+ if (rootStatement == null || resolveResult == null)
+ return;
+
+ var references = new HashSet<AstNode>();
+ var refStatements = new HashSet<Statement>();
+ var usedInLambda = false;
+ var results = ctx.FindReferences(rootStatement, resolveResult.Variable);
+ foreach (var result in results) {
+ var node = result.Node;
+ if (node == variableDecl)
+ continue;
+
+ var parent = node.Parent;
+ while (!(parent == null || parent is Statement || parent is LambdaExpression || parent is QueryExpression))
+ parent = parent.Parent;
+ if (parent == null)
+ continue;
+
+ var statement = parent as Statement;
+ if (statement != null) {
+ references.Add(node);
+ refStatements.Add(statement);
+ }
+
+ while (parent != null && parent != rootStatement) {
+ if (parent is LambdaExpression || parent is AnonymousMethodExpression || parent is QueryExpression) {
+ usedInLambda = true;
+ break;
+ }
+ parent = parent.Parent;
+ }
+ if (usedInLambda) {
+ break;
+ }
+ }
+
+ // stop analyzing if the variable is used in any lambda expression or anonymous method
+ if (usedInLambda)
+ return;
+
+ var startNode = new VariableReferenceGraphBuilder(ctx).Build(rootStatement, references, refStatements, ctx);
+ var variableInitializer = variableDecl as VariableInitializer;
+ if (variableInitializer != null && !variableInitializer.Initializer.IsNull)
+ startNode.References.Insert(0, variableInitializer);
+
+ ProcessNodes(startNode);
+ }
+
+ class SearchInvocationsVisitor : DepthFirstAstVisitor
+ {
+ bool foundInvocations;
+
+ public bool ContainsInvocations(AstNode node)
+ {
+ foundInvocations = false;
+ node.AcceptVisitor(this);
+ return foundInvocations;
+ }
+
+ protected override void VisitChildren(AstNode node)
+ {
+ AstNode next;
+ for (var child = node.FirstChild; child != null && !foundInvocations; child = next) {
+ next = child.NextSibling;
+ child.AcceptVisitor(this);
+ }
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression invocationExpression)
+ {
+ foundInvocations = true;
+ }
+ }
+
+ private class SearchRefOrOutVisitor : DepthFirstAstVisitor
+ {
+ private bool foundInvocations;
+ private string _varName;
+
+ public bool ContainsRefOrOut(VariableInitializer variableInitializer)
+ {
+ var node = variableInitializer.Parent.Parent;
+ foundInvocations = false;
+ _varName = variableInitializer.Name;
+ node.AcceptVisitor(this);
+ return foundInvocations;
+ }
+
+ protected override void VisitChildren(AstNode node)
+ {
+ AstNode next;
+ for (var child = node.FirstChild; child != null && !foundInvocations; child = next) {
+ next = child.NextSibling;
+ child.AcceptVisitor(this);
+ }
+ }
+
+ public override void VisitInvocationExpression(InvocationExpression methodDeclaration)
+ {
+ if (foundInvocations)
+ return;
+ if (methodDeclaration.Arguments.Count == 0)
+ return;
+ foreach (var argument in methodDeclaration.Arguments) {
+ var directionExpression = argument as DirectionExpression;
+ if (directionExpression == null)
+ continue;
+
+ if (directionExpression.FieldDirection != FieldDirection.Out && directionExpression.FieldDirection != FieldDirection.Ref)
+ continue;
+ var idExpression = (directionExpression.Expression) as IdentifierExpression;
+ if (idExpression == null)
+ continue;
+ foundInvocations = (idExpression.Identifier == _varName);
+
+ foundInvocations = true;
+ }
+ }
+ }
+
+ class SearchAssignmentForVarVisitor : DepthFirstAstVisitor
+ {
+ bool _foundInvocations;
+ private VariableInitializer _variableInitializer;
+
+ public bool ContainsLaterAssignments(VariableInitializer variableInitializer)
+ {
+ _foundInvocations = false;
+ _variableInitializer = variableInitializer;
+ variableInitializer.Parent.Parent.AcceptVisitor(this);
+ return _foundInvocations;
+ }
+
+ protected override void VisitChildren(AstNode node)
+ {
+ AstNode next;
+ for (var child = node.FirstChild; child != null && !_foundInvocations; child = next) {
+ next = child.NextSibling;
+ child.AcceptVisitor(this);
+ }
+ }
+
+ public override void VisitAssignmentExpression(AssignmentExpression assignmentExpression)
+ {
+ if (_foundInvocations)
+ return;
+ base.VisitAssignmentExpression(assignmentExpression);
+ if (assignmentExpression.Left.ToString() == _variableInitializer.Name
+ && assignmentExpression.StartLocation > _variableInitializer.StartLocation) {
+ _foundInvocations = true;
+ }
+ }
+ }
+
+ void AddIssue(AstNode node)
+ {
+ var title = ctx.TranslateString("Remove redundant assignment");
+
+ var variableInitializer = node as VariableInitializer;
+ if (variableInitializer != null) {
+ var containsInvocations =
+ new SearchInvocationsVisitor().ContainsInvocations(variableInitializer.Initializer);
+
+ var varDecl = node.Parent as VariableDeclarationStatement;
+
+ var isDeclareStatement = varDecl != null;
+ var isUsingVar = isDeclareStatement && varDecl.Type.IsVar();
+
+ var expressionType = ctx.Resolve(node).Type;
+
+ var containsLaterAssignments = false;
+ if (isDeclareStatement) {
+ //if it is used later, the redundant removal should remove the assignment
+ //but not the variable
+ containsLaterAssignments =
+ new SearchAssignmentForVarVisitor().ContainsLaterAssignments(variableInitializer);
+ }
+
+ AstNode grayOutNode;
+ var containsRefOrOut = new SearchRefOrOutVisitor().ContainsRefOrOut(variableInitializer);
+ if (containsInvocations && isDeclareStatement) {
+ grayOutNode = variableInitializer.AssignToken;
+ } else {
+ if (isDeclareStatement && !containsRefOrOut && !containsLaterAssignments) {
+ grayOutNode = variableInitializer.Parent;
+ } else {
+ grayOutNode = variableInitializer.Initializer;
+ }
+ }
+
+ AddIssue(grayOutNode, title, script => {
+ var variableNode = (VariableInitializer)node;
+ if (containsInvocations && isDeclareStatement) {
+ //add the column ';' that will be removed after the next line replacement
+ var expression = (Expression)variableNode.Initializer.Clone();
+ var invocation = new ExpressionStatement(expression);
+ if (containsLaterAssignments && varDecl != null) {
+ var clonedDefinition = (VariableDeclarationStatement)varDecl.Clone();
+
+ var shortExpressionType = CreateShortType(ctx, expressionType, node);
+ clonedDefinition.Type = shortExpressionType;
+ var variableNodeClone = clonedDefinition.GetVariable(variableNode.Name);
+ variableNodeClone.Initializer = null;
+ script.InsertBefore(node.Parent, clonedDefinition);
+ }
+ script.Replace(node.Parent, invocation);
+ return;
+ }
+ if (isDeclareStatement && !containsRefOrOut && !containsLaterAssignments) {
+ script.Remove(node.Parent);
+ return;
+ }
+ var replacement = (VariableInitializer)variableNode.Clone();
+ replacement.Initializer = Expression.Null;
+ if (isUsingVar) {
+ var shortExpressionType = CreateShortType(ctx, expressionType, node);
+ script.Replace(varDecl.Type, shortExpressionType);
+ }
+ script.Replace(node, replacement);
+ });
+ }
+
+ var assignmentExpr = node.Parent as AssignmentExpression;
+ if (assignmentExpr == null)
+ return;
+ if (assignmentExpr.Parent is ExpressionStatement) {
+ AddIssue(assignmentExpr.Parent, title, script => script.Remove(assignmentExpr.Parent));
+ } else {
+ AddIssue(assignmentExpr.Left.StartLocation, assignmentExpr.OperatorToken.EndLocation, title,
+ script => script.Replace(assignmentExpr, assignmentExpr.Right.Clone()));
+ }
+ }
+
+ private static AstType CreateShortType(BaseRefactoringContext refactoringContext, IType expressionType, AstNode node)
+ {
+
+ var csResolver = refactoringContext.Resolver.GetResolverStateBefore(node);
+ var builder = new TypeSystemAstBuilder(csResolver);
+ return builder.ConvertType(expressionType);
+ }
+
+ static bool IsAssignment(AstNode node)
+ {
+ if (node is VariableInitializer)
+ return true;
+
+ var assignmentExpr = node.Parent as AssignmentExpression;
+ if (assignmentExpr != null)
+ return assignmentExpr.Left == node && assignmentExpr.Operator == AssignmentOperatorType.Assign;
+
+ var direction = node.Parent as DirectionExpression;
+ if (direction != null)
+ return direction.FieldDirection == FieldDirection.Out && direction.Expression == node;
+
+ return false;
+ }
+
+ static bool IsInsideTryBlock(AstNode node)
+ {
+ var tryCatchStatement = node.GetParent<TryCatchStatement>();
+ if (tryCatchStatement == null)
+ return false;
+ return tryCatchStatement.TryBlock.Contains(node.StartLocation.Line, node.StartLocation.Column);
+ }
+
+ enum NodeState
+ {
+ None,
+ UsageReachable,
+ UsageUnreachable,
+ Processing,
+ }
+
+ void ProcessNodes(VariableReferenceNode startNode)
+ {
+ // node state of a node indicates whether it is possible for an upstream node to reach any usage via
+ // the node
+ var nodeStates = new Dictionary<VariableReferenceNode, NodeState>();
+ var assignments = new List<VariableReferenceNode>();
+
+ // dfs to preprocess all nodes and find nodes which end with assignment
+ var stack = new Stack<VariableReferenceNode>();
+ stack.Push(startNode);
+ while (stack.Count > 0) {
+ var node = stack.Pop();
+ if (node.References.Count > 0) {
+ nodeStates [node] = IsAssignment(node.References [0]) ?
+ NodeState.UsageUnreachable : NodeState.UsageReachable;
+ } else {
+ nodeStates [node] = NodeState.None;
+ }
+
+ // find indices of all assignments in node.References
+ var assignmentIndices = new List<int>();
+ for (int i = 0; i < node.References.Count; i++) {
+ if (IsAssignment(node.References [i]))
+ assignmentIndices.Add(i);
+ }
+ // for two consecutive assignments, the first one is redundant
+ for (int i = 0; i < assignmentIndices.Count - 1; i++) {
+ var index1 = assignmentIndices [i];
+ var index2 = assignmentIndices [i + 1];
+ if (index1 + 1 == index2)
+ AddIssue(node.References [index1]);
+ }
+ // if the node ends with an assignment, add it to assignments so as to check if it is redundant
+ // later
+ if (assignmentIndices.Count > 0 &&
+ assignmentIndices [assignmentIndices.Count - 1] == node.References.Count - 1)
+ assignments.Add(node);
+
+ foreach (var nextNode in node.NextNodes) {
+ if (!nodeStates.ContainsKey(nextNode))
+ stack.Push(nextNode);
+ }
+ }
+
+ foreach (var node in assignments) {
+ // we do not analyze an assignment inside a try block as it can jump to any catch block or finally block
+ if (IsInsideTryBlock(node.References [0]))
+ continue;
+ ProcessNode(node, true, nodeStates);
+ }
+ }
+
+ void ProcessNode(VariableReferenceNode node, bool addIssue,
+ IDictionary<VariableReferenceNode, NodeState> nodeStates)
+ {
+ if (nodeStates [node] == NodeState.None)
+ nodeStates [node] = NodeState.Processing;
+
+ bool? reachable = false;
+ foreach (var nextNode in node.NextNodes) {
+ if (nodeStates [nextNode] == NodeState.None)
+ ProcessNode(nextNode, false, nodeStates);
+
+ if (nodeStates [nextNode] == NodeState.UsageReachable) {
+ reachable = true;
+ break;
+ }
+ // downstream nodes are not fully processed (e.g. due to loop), there is no enough info to
+ // determine the node state
+ if (nodeStates [nextNode] != NodeState.UsageUnreachable)
+ reachable = null;
+ }
+
+ // add issue if it is not possible to reach any usage via NextNodes
+ if (addIssue && reachable == false)
+ AddIssue(node.References [node.References.Count - 1]);
+
+ if (nodeStates [node] != NodeState.Processing)
+ return;
+
+ switch (reachable) {
+ case null:
+ nodeStates [node] = NodeState.None;
+ break;
+ case true:
+ nodeStates [node] = NodeState.UsageReachable;
+ break;
+ case false:
+ nodeStates [node] = NodeState.UsageUnreachable;
+ break;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAttributeParenthesesIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAttributeParenthesesIssue.cs
new file mode 100644
index 0000000..f061075
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantAttributeParenthesesIssue.cs
@@ -0,0 +1,65 @@
+//
+// RedundantAttributeParenthesesIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Parentheses are redundant if attribute has no arguments",
+ Description = "Parentheses are redundant if attribute has no arguments.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Suggestion,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class RedundantAttributeParenthesesIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantAttributeParenthesesIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitAttribute (Attribute attribute)
+ {
+ base.VisitAttribute (attribute);
+
+ if (attribute.Arguments.Count > 0 || !attribute.HasArgumentList)
+ return;
+
+ var start = attribute.Type.EndLocation;
+ var end = attribute.EndLocation;
+ AddIssue (start, end, ctx.TranslateString ("Remove redundant attribute parentheses"), script =>
+ script.Replace (attribute, new Attribute { Type = attribute.Type.Clone () }));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantObjectCreationArgumentListIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantObjectCreationArgumentListIssue.cs
new file mode 100644
index 0000000..5101c7b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/RedundantObjectCreationArgumentListIssue.cs
@@ -0,0 +1,73 @@
+//
+// RedundantObjectCreationArgumentListIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Redundant empty argument list on object creation expression",
+ Description = "When object creation uses object or collection initializer, empty argument list is redundant.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Suggestion,
+ IssueMarker = IssueMarker.GrayOut,
+ ResharperDisableKeyword = "RedundantEmptyObjectCreationArgumentList")]
+ public class RedundantObjectCreationArgumentListIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<RedundantObjectCreationArgumentListIssue>
+ {
+ public GatherVisitor( BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
+ {
+ base.VisitObjectCreateExpression (objectCreateExpression);
+
+ if (objectCreateExpression.Initializer.IsNull ||
+ objectCreateExpression.Arguments.Count > 0 ||
+ objectCreateExpression.LParToken.IsNull)
+ return;
+
+ AddIssue (objectCreateExpression.LParToken.StartLocation, objectCreateExpression.RParToken.EndLocation,
+ ctx.TranslateString ("Remove redundant empty argument list"), script => {
+ var l1 = objectCreateExpression.LParToken.GetPrevNode ().EndLocation;
+ var l2 = objectCreateExpression.RParToken.GetNextNode ().StartLocation;
+ var o1 = script.GetCurrentOffset (l1);
+ var o2 = script.GetCurrentOffset (l2);
+
+ script.Replace (o1, o2 - o1, " ");
+ });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ReferenceEqualsCalledWithValueTypeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ReferenceEqualsCalledWithValueTypeIssue.cs
new file mode 100644
index 0000000..85ad83d
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ReferenceEqualsCalledWithValueTypeIssue.cs
@@ -0,0 +1,80 @@
+//
+// ReferenceEqualsCalledWithValueTypeIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("'Object.ReferenceEquals' is always false because it is called with value type",
+ Description = "'Object.ReferenceEquals' is always false because it is called with value type.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class ReferenceEqualsCalledWithValueTypeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<ReferenceEqualsCalledWithValueTypeIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitInvocationExpression (InvocationExpression invocationExpression)
+ {
+ base.VisitInvocationExpression (invocationExpression);
+
+ // Quickly determine if this invocation is eligible to speed up the inspector
+ var nameToken = invocationExpression.Target.GetChildByRole(Roles.Identifier);
+ if (nameToken.Name != "ReferenceEquals")
+ return;
+
+ var resolveResult = ctx.Resolve (invocationExpression) as InvocationResolveResult;
+ if (resolveResult == null ||
+ resolveResult.Member.DeclaringTypeDefinition == null ||
+ resolveResult.Member.DeclaringTypeDefinition.KnownTypeCode != KnownTypeCode.Object ||
+ resolveResult.Member.Name != "ReferenceEquals" ||
+ invocationExpression.Arguments.All(arg => ctx.Resolve(arg).Type.IsReferenceType ?? true))
+ return;
+
+ var action = new CodeAction (ctx.TranslateString ("Use Equals()"),
+ script => script.Replace (invocationExpression.Target, new MemberReferenceExpression (
+ new TypeReferenceExpression (new PrimitiveType ("object")), "Equals")), invocationExpression);
+ AddIssue (invocationExpression,
+ ctx.TranslateString ("'Object.ReferenceEquals' is always false because it is called with value type"),
+ new [] { action });
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs
new file mode 100644
index 0000000..03c840b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/ResultOfAsyncCallShouldNotBeIgnoredIssue.cs
@@ -0,0 +1,68 @@
+// Copyright (c) 2010-2013 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 ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Result of async call is ignored",
+ Description = "Warns when the task returned by an async call is ignored, which causes exceptions" +
+ " thrown by the call to be silently ignored.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning)]
+ public class ResultOfAsyncCallShouldNotBeIgnoredIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ sealed class GatherVisitor : GatherVisitorBase<ResultOfAsyncCallShouldNotBeIgnoredIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base(ctx)
+ {
+ }
+
+ AstNode GetNodeToUnderline(Expression target)
+ {
+ if (target is IdentifierExpression)
+ return target;
+ if (target is MemberReferenceExpression)
+ return ((MemberReferenceExpression)target).MemberNameToken;
+ return target;
+ }
+
+ public override void VisitExpressionStatement(ExpressionStatement expressionStatement)
+ {
+ base.VisitExpressionStatement(expressionStatement);
+ var invocation = expressionStatement.Expression as InvocationExpression;
+ if (invocation == null)
+ return;
+ var rr = ctx.Resolve(invocation) as InvocationResolveResult;
+ if (rr != null && (rr.Type.IsKnownType(KnownTypeCode.Task) || rr.Type.IsKnownType(KnownTypeCode.TaskOfT))) {
+ AddIssue(GetNodeToUnderline (invocation.Target), ctx.TranslateString("Exceptions in async call will be silently ignored because the returned task is unused"));
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/SimplifyAnonymousMethodToDelegateIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/SimplifyAnonymousMethodToDelegateIssue.cs
new file mode 100644
index 0000000..8b9190a
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/SimplifyAnonymousMethodToDelegateIssue.cs
@@ -0,0 +1,147 @@
+//
+// SimplifyAnonymousMethodToDelegateIssue.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.PatternMatching;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription("Simplify anonymous method to delegate",
+ Description = "Shows anonymous methods that can be simplified.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ ResharperDisableKeyword = "ConvertClosureToMethodGroup")]
+ public class SimplifyAnonymousMethodToDelegateIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues();
+ }
+
+ class GatherVisitor : GatherVisitorBase<SimplifyAnonymousMethodToDelegateIssue>
+ {
+ public GatherVisitor (BaseRefactoringContext ctx) : base (ctx)
+ {
+ }
+
+ static Pattern pattern = new Choice {
+ new BlockStatement {
+ new ReturnStatement (new AnyNode ("invoke"))
+ },
+ new AnyNode ("invoke")
+ };
+
+ static InvocationExpression AnalyzeBody(AstNode body)
+ {
+ var m = pattern.Match(body);
+ if (m.Success)
+ return m.Get("invoke").Single () as InvocationExpression;
+ return null;
+ }
+
+ static bool IsSimpleTarget(Expression target)
+ {
+ if (target is IdentifierExpression)
+ return true;
+ var mref = target as MemberReferenceExpression;
+ if (mref != null)
+ return IsSimpleTarget (mref.Target);
+ var pref = target as PointerReferenceExpression;
+ if (pref != null)
+ return IsSimpleTarget (pref.Target);
+ return false;
+ }
+
+ void AnalyzeExpression(AstNode expression, AstNode body, AstNodeCollection<ParameterDeclaration> parameters)
+ {
+ var invocation = AnalyzeBody(body);
+ if (invocation == null)
+ return;
+ if (!IsSimpleTarget (invocation.Target))
+ return;
+ var rr = ctx.Resolve (invocation) as CSharpInvocationResolveResult;
+ if (rr == null)
+ return;
+ var lambdaParameters = parameters.ToList();
+ var arguments = rr.GetArgumentsForCall();
+ if (lambdaParameters.Count != arguments.Count)
+ return;
+ for (int i = 0; i < arguments.Count; i++) {
+ var arg = UnpackImplicitIdentityOrReferenceConversion(arguments[i]) as LocalResolveResult;
+ if (arg == null || arg.Variable.Name != lambdaParameters[i].Name)
+ return;
+ }
+ var returnConv = ctx.GetConversion(invocation);
+ if (returnConv.IsExplicit || !(returnConv.IsIdentityConversion || returnConv.IsReferenceConversion))
+ return;
+ AddIssue(expression, ctx.TranslateString("Expression can be reduced to delegate"), script => {
+ var validTypes = CreateFieldAction.GetValidTypes (ctx.Resolver, expression).ToList ();
+ if (validTypes.Any (t => t.FullName == "System.Func" && t.TypeParameterCount == 1 + parameters.Count) && validTypes.Any (t => t.FullName == "System.Action")) {
+ if (rr != null && rr.Member.ReturnType.Kind != TypeKind.Void) {
+ var builder = ctx.CreateTypeSystemAstBuilder (expression);
+ var type = builder.ConvertType(new TopLevelTypeName("System", "Func", 1));
+ var args = type.GetChildrenByRole(Roles.TypeArgument);
+ args.Clear ();
+ foreach (var pde in parameters) {
+ args.Add (builder.ConvertType (ctx.Resolve (pde).Type));
+ }
+ args.Add (builder.ConvertType (rr.Member.ReturnType));
+ script.Replace(expression, new CastExpression (type, invocation.Target.Clone()));
+ return;
+ }
+ }
+ script.Replace(expression, invocation.Target.Clone());
+ });
+ }
+
+ static ResolveResult UnpackImplicitIdentityOrReferenceConversion(ResolveResult rr)
+ {
+ var crr = rr as ConversionResolveResult;
+ if (crr != null && crr.Conversion.IsImplicit && (crr.Conversion.IsIdentityConversion || crr.Conversion.IsReferenceConversion))
+ return crr.Input;
+ return rr;
+ }
+
+ public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
+ {
+ base.VisitLambdaExpression(lambdaExpression);
+ AnalyzeExpression(lambdaExpression, lambdaExpression.Body, lambdaExpression.Parameters);
+ }
+
+ public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
+ {
+ base.VisitAnonymousMethodExpression(anonymousMethodExpression);
+ AnalyzeExpression(anonymousMethodExpression, anonymousMethodExpression.Body, anonymousMethodExpression.Parameters);
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UnreachableCodeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UnreachableCodeIssue.cs
new file mode 100644
index 0000000..d03f364
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UnreachableCodeIssue.cs
@@ -0,0 +1,189 @@
+//
+// UnreachableCodeIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Analysis;
+using System.Linq;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Code is unreachable",
+ Description = "Code is unreachable.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class UnreachableCodeIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<UnreachableCodeIssue>
+ {
+ HashSet<AstNode> unreachableNodes;
+
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ unreachableNodes = new HashSet<AstNode> ();
+ }
+
+ public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ StatementIssueCollector.Collect (this, methodDeclaration.Body);
+
+ base.VisitMethodDeclaration (methodDeclaration);
+ }
+
+ public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
+ {
+ var blockStatement = lambdaExpression.Body as BlockStatement;
+ if (blockStatement != null)
+ StatementIssueCollector.Collect (this, blockStatement);
+
+ base.VisitLambdaExpression (lambdaExpression);
+ }
+
+ public override void VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
+ {
+ StatementIssueCollector.Collect (this, anonymousMethodExpression.Body);
+
+ base.VisitAnonymousMethodExpression (anonymousMethodExpression);
+ }
+
+ public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
+ {
+ var resolveResult = ctx.Resolve (conditionalExpression.Condition);
+ if (resolveResult.ConstantValue is bool) {
+ var condition = (bool)resolveResult.ConstantValue;
+ Expression resultExpr, unreachableExpr;
+ if (condition) {
+ resultExpr = conditionalExpression.TrueExpression;
+ unreachableExpr = conditionalExpression.FalseExpression;
+ } else {
+ resultExpr = conditionalExpression.FalseExpression;
+ unreachableExpr = conditionalExpression.TrueExpression;
+ }
+ unreachableNodes.Add (unreachableExpr);
+
+ AddIssue (unreachableExpr, ctx.TranslateString ("Remove unreachable code"),
+ script => script.Replace (conditionalExpression, resultExpr.Clone ()));
+ }
+ base.VisitConditionalExpression (conditionalExpression);
+ }
+
+ protected override void VisitChildren (AstNode node)
+ {
+ // skip unreachable nodes
+ if (!unreachableNodes.Contains (node))
+ base.VisitChildren (node);
+ }
+
+ class StatementIssueCollector : DepthFirstAstVisitor
+ {
+ GatherVisitor visitor;
+ ReachabilityAnalysis reachability;
+ HashSet<Statement> collectedStatements;
+
+ private StatementIssueCollector (GatherVisitor visitor, ReachabilityAnalysis reachability)
+ {
+ collectedStatements = new HashSet<Statement> ();
+ this.visitor = visitor;
+ this.reachability = reachability;
+ }
+
+ public static void Collect (GatherVisitor visitor, BlockStatement body)
+ {
+ if (body.IsNull)
+ return;
+ var reachability = visitor.ctx.CreateReachabilityAnalysis (body);
+
+ var collector = new StatementIssueCollector (visitor, reachability);
+ collector.VisitBlockStatement (body);
+ }
+
+ protected override void VisitChildren (AstNode node)
+ {
+ var statement = node as Statement;
+ if (statement == null || !AddStatement (statement))
+ base.VisitChildren (node);
+ }
+
+ bool AddStatement(Statement statement)
+ {
+ if (reachability.IsReachable (statement))
+ return false;
+ if (collectedStatements.Contains (statement))
+ return true;
+ var prevEnd = statement.GetPrevNode (n => !(n is NewLineNode)).EndLocation;
+
+ // group multiple continuous statements into one issue
+ var start = statement.StartLocation;
+ collectedStatements.Add (statement);
+ visitor.unreachableNodes.Add (statement);
+ while (statement.GetNextSibling (s => s is Statement) != null) {
+ statement = (Statement)statement.GetNextSibling (s => s is Statement);
+ collectedStatements.Add (statement);
+ visitor.unreachableNodes.Add (statement);
+ }
+ var end = statement.EndLocation;
+
+ var removeAction = new CodeAction (visitor.ctx.TranslateString ("Remove unreachable code"),
+ script =>
+ {
+ var startOffset = script.GetCurrentOffset (prevEnd);
+ var endOffset = script.GetCurrentOffset (end);
+ script.RemoveText (startOffset, endOffset - startOffset);
+ }, collectedStatements.First().StartLocation, collectedStatements.Last().EndLocation);
+ var commentAction = new CodeAction(visitor.ctx.TranslateString("Comment unreachable code"),
+ script =>
+ {
+ var startOffset = script.GetCurrentOffset(prevEnd);
+ script.InsertText(startOffset, Environment.NewLine + "/*");
+ var endOffset = script.GetCurrentOffset(end);
+ script.InsertText(endOffset, Environment.NewLine + "*/");
+ }, collectedStatements.First().StartLocation, collectedStatements.Last().EndLocation);
+ var actions = new [] { removeAction, commentAction };
+ visitor.AddIssue (start, end, visitor.ctx.TranslateString ("Code is unreachable"), actions);
+ return true;
+ }
+
+ // skip lambda and anonymous method
+ public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
+ {
+ }
+
+ public override void VisitAnonymousMethodExpression (
+ AnonymousMethodExpression anonymousMethodExpression)
+ {
+ }
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UseBlockInsteadColonIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UseBlockInsteadColonIssue.cs
new file mode 100644
index 0000000..12d2685
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/UseBlockInsteadColonIssue.cs
@@ -0,0 +1,106 @@
+//
+// Issue.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+
+ [IssueDescription ("';' should be avoided",
+ Description = "';' should be avoided. Use '{}' instead",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class UseBlockInsteadColonIssue : ICodeIssueProvider
+ {
+ public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
+ {
+ return new GatherVisitor (context).GetIssues ();
+ }
+
+ class GatherVisitor : GatherVisitorBase<UseBlockInsteadColonIssue>
+ {
+ private readonly string _commandTitle;
+
+ public GatherVisitor (BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ _commandTitle = ctx.TranslateString("';' should be avoided. Use '{}' instead");
+ }
+
+ public override void VisitWhileStatement(WhileStatement whileStatement)
+ {
+ base.VisitWhileStatement(whileStatement);
+ var statement = whileStatement.EmbeddedStatement as EmptyStatement;
+ if (statement == null)
+ return;
+
+ AddIssue(whileStatement.EmbeddedStatement,
+ _commandTitle,
+ script => script.Replace(whileStatement.EmbeddedStatement, new BlockStatement()));
+
+ }
+
+ public override void VisitForeachStatement(ForeachStatement foreachStatement)
+ {
+ base.VisitForeachStatement(foreachStatement);
+ var statement = foreachStatement.EmbeddedStatement as EmptyStatement;
+ if (statement == null)
+ return;
+
+ AddIssue(foreachStatement.EmbeddedStatement,
+ _commandTitle,
+ script => script.Replace(foreachStatement.EmbeddedStatement, new BlockStatement()));
+ }
+
+ public override void VisitIfElseStatement(IfElseStatement ifElseStatement)
+ {
+ base.VisitIfElseStatement(ifElseStatement);
+ var statement = ifElseStatement.TrueStatement as EmptyStatement;
+ if(statement==null)
+ return;
+ AddIssue(ifElseStatement.TrueStatement,
+ _commandTitle,
+ script => script.Replace(ifElseStatement.TrueStatement, new BlockStatement()));
+ }
+
+ public override void VisitForStatement(ForStatement forStatement)
+ {
+ base.VisitForStatement(forStatement);
+
+ var statement = forStatement.EmbeddedStatement as EmptyStatement;
+ if (statement == null)
+ return;
+
+ AddIssue(forStatement.EmbeddedStatement,
+ _commandTitle,
+ script => script.Replace(forStatement.EmbeddedStatement, new BlockStatement()));
+ }
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableNotUsedIssues/ParameterNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableNotUsedIssues/ParameterNotUsedIssue.cs
new file mode 100644
index 0000000..c0a1e58
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableNotUsedIssues/ParameterNotUsedIssue.cs
@@ -0,0 +1,162 @@
+//
+// ParameterNotUsedIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Semantics;
+using System.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Unused parameter",
+ Description = "Parameter is never used.",
+ Category = IssueCategories.Redundancies,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.GrayOut)]
+ public class ParameterNotUsedIssue : ICodeIssueProvider
+ {
+ #region ICodeIssueProvider implementation
+ public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ var delegateVisitor = new GetDelgateUsagesVisitor (context);
+ context.RootNode.AcceptVisitor (delegateVisitor);
+
+ return new GatherVisitor (context, delegateVisitor).GetIssues ();
+ }
+ #endregion
+
+ // Collect all methods that are used as delegate
+ class GetDelgateUsagesVisitor : DepthFirstAstVisitor
+ {
+ BaseRefactoringContext ctx;
+ public readonly List<IMethod> UsedMethods = new List<IMethod> ();
+
+ public GetDelgateUsagesVisitor(BaseRefactoringContext ctx)
+ {
+ this.ctx = ctx;
+ }
+
+ public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
+ {
+ if (!IsTargetOfInvocation(identifierExpression)) {
+ var mgr = ctx.Resolve (identifierExpression) as MethodGroupResolveResult;
+ if (mgr != null)
+ UsedMethods.AddRange (mgr.Methods);
+ }
+ base.VisitIdentifierExpression(identifierExpression);
+ }
+
+ public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
+ {
+ if (!IsTargetOfInvocation(memberReferenceExpression)) {
+ var mgr = ctx.Resolve (memberReferenceExpression) as MethodGroupResolveResult;
+ if (mgr != null)
+ UsedMethods.AddRange (mgr.Methods);
+ }
+ base.VisitMemberReferenceExpression(memberReferenceExpression);
+ }
+
+ static bool IsTargetOfInvocation(AstNode node)
+ {
+ return node.Role == Roles.TargetExpression && node.Parent is InvocationExpression;
+ }
+ }
+
+ class GatherVisitor : GatherVisitorBase<ParameterNotUsedIssue>
+ {
+ GetDelgateUsagesVisitor usedDelegates;
+ bool currentTypeIsPartial;
+
+ public GatherVisitor (BaseRefactoringContext ctx, GetDelgateUsagesVisitor usedDelegates)
+ : base (ctx)
+ {
+ this.usedDelegates = usedDelegates;
+ }
+
+ public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
+ {
+ bool outerTypeIsPartial = currentTypeIsPartial;
+ currentTypeIsPartial = typeDeclaration.HasModifier(Modifiers.Partial);
+ base.VisitTypeDeclaration(typeDeclaration);
+ currentTypeIsPartial = outerTypeIsPartial;
+ }
+
+ public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
+ {
+ // Only some methods are candidates for the warning
+
+ if (methodDeclaration.Body.IsNull)
+ return;
+ if (methodDeclaration.Modifiers.HasFlag (Modifiers.Virtual) ||
+ methodDeclaration.Modifiers.HasFlag (Modifiers.New) ||
+ methodDeclaration.Modifiers.HasFlag (Modifiers.Partial))
+ return;
+ var methodResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
+ if (methodResolveResult == null)
+ return;
+ var member = methodResolveResult.Member;
+ if (member.IsOverride)
+ return;
+ if (member.ImplementedInterfaceMembers.Any ())
+ return;
+ if (usedDelegates.UsedMethods.Any (m => m.MemberDefinition == member))
+ return;
+ if (currentTypeIsPartial && methodDeclaration.Parameters.Count == 2) {
+ if (methodDeclaration.Parameters.First().Name == "sender") {
+ // Looks like an event handler; the registration might be in the designer part
+ return;
+ }
+ }
+ foreach (var parameter in methodDeclaration.Parameters)
+ parameter.AcceptVisitor (this);
+ }
+
+ public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration (parameterDeclaration);
+
+ if (!(parameterDeclaration.Parent is MethodDeclaration || parameterDeclaration.Parent is ConstructorDeclaration))
+ return;
+
+ var resolveResult = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
+ if (resolveResult == null)
+ return;
+ if (resolveResult.Type.Name == "StreamingContext" && resolveResult.Type.Namespace == "System.Runtime.Serialization") {
+ // commonly unused parameter in constructors associated with ISerializable
+ return;
+ }
+
+ if (ctx.FindReferences (parameterDeclaration.Parent, resolveResult.Variable).Any(r => r.Node != parameterDeclaration))
+ return;
+
+ AddIssue (parameterDeclaration.NameToken, ctx.TranslateString ("Parameter is never used"));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs
new file mode 100644
index 0000000..334b8da
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs
@@ -0,0 +1,68 @@
+//
+// ParameterOnlyAssignedIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [IssueDescription ("Parameter is only assigned",
+ Description = "Parameter is assigned but its value is never used.",
+ Category = IssueCategories.CodeQualityIssues,
+ Severity = Severity.Warning,
+ IssueMarker = IssueMarker.Underline)]
+ public class ParameterOnlyAssignedIssue : VariableOnlyAssignedIssue
+ {
+ public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
+ {
+ return new GatherVisitor(context).GetIssues ();
+ }
+
+ private class GatherVisitor : GatherVisitorBase<ParameterOnlyAssignedIssue>
+ {
+ public GatherVisitor(BaseRefactoringContext ctx)
+ : base (ctx)
+ {
+ }
+
+ public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
+ {
+ base.VisitParameterDeclaration(parameterDeclaration);
+
+ var resolveResult = ctx.Resolve(parameterDeclaration) as LocalResolveResult;
+ if (resolveResult == null)
+ return;
+
+ var parameterModifier = parameterDeclaration.ParameterModifier;
+ if (parameterModifier == ParameterModifier.Out || parameterModifier == ParameterModifier.Ref ||
+ !TestOnlyAssigned(ctx, parameterDeclaration.Parent, resolveResult.Variable)) {
+ return;
+ }
+ AddIssue(parameterDeclaration.NameToken,
+ ctx.TranslateString("Parameter is assigned but its value is never used"));
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs
new file mode 100644
index 0000000..3bdfd2f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/Uncategorized/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs
@@ -0,0 +1,86 @@
+//
+// VariableOnlyAssignedIssue.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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.Collections.Generic;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ public abstract class VariableOnlyAssignedIssue : ICodeIssueProvider
+ {
+ public abstract IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context);
+
+ protected static bool TestOnlyAssigned(BaseRefactoringContext ctx, AstNode rootNode, IVariable variable)
+ {
+ var assignment = false;
+ var nonAssignment = false;
+ foreach (var result in ctx.FindReferences(rootNode, variable)) {
+ var node = result.Node;
+ if (node is ParameterDeclaration)
+ continue;
+
+ if (node is VariableInitializer) {
+ if (!(node as VariableInitializer).Initializer.IsNull)
+ assignment = true;
+ continue;
+ }
+
+ if (node is IdentifierExpression) {
+ var parent = node.Parent;
+ if (parent is AssignmentExpression) {
+ if (((AssignmentExpression)parent).Left == node) {
+ assignment = true;
+ continue;
+ }
+ } else if (parent is UnaryOperatorExpression) {
+ var op = ((UnaryOperatorExpression)parent).Operator;
+ switch (op) {
+ case UnaryOperatorType.Increment:
+ case UnaryOperatorType.PostIncrement:
+ case UnaryOperatorType.Decrement:
+ case UnaryOperatorType.PostDecrement:
+ assignment = true;
+ if (!(parent.Parent is ExpressionStatement))
+ nonAssignment = true;
+ continue;
+ }
+ } else if (parent is DirectionExpression) {
+ if (((DirectionExpression)parent).FieldDirection == FieldDirection.Out) {
+ assignment = true;
+ // Using dummy variables is necessary for ignoring
+ // out-arguments, so we don't want to warn for those.
+ nonAssignment = true;
+ continue;
+ }
+ }
+ }
+ nonAssignment = true;
+ }
+ return assignment && !nonAssignment;
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UnreachableCodeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UnreachableCodeIssue.cs
deleted file mode 100644
index 7ae37fd..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UnreachableCodeIssue.cs
+++ /dev/null
@@ -1,188 +0,0 @@
-//
-// UnreachableCodeIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Analysis;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Code is unreachable",
- Description = "Code is unreachable.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut)]
- public class UnreachableCodeIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<UnreachableCodeIssue>
- {
- HashSet<AstNode> unreachableNodes;
-
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- unreachableNodes = new HashSet<AstNode> ();
- }
-
- public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
- {
- StatementIssueCollector.Collect (this, methodDeclaration.Body);
-
- base.VisitMethodDeclaration (methodDeclaration);
- }
-
- public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
- {
- var blockStatement = lambdaExpression.Body as BlockStatement;
- if (blockStatement != null)
- StatementIssueCollector.Collect (this, blockStatement);
-
- base.VisitLambdaExpression (lambdaExpression);
- }
-
- public override void VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
- {
- StatementIssueCollector.Collect (this, anonymousMethodExpression.Body);
-
- base.VisitAnonymousMethodExpression (anonymousMethodExpression);
- }
-
- public override void VisitConditionalExpression (ConditionalExpression conditionalExpression)
- {
- var resolveResult = ctx.Resolve (conditionalExpression.Condition);
- if (resolveResult.ConstantValue is bool) {
- var condition = (bool)resolveResult.ConstantValue;
- Expression resultExpr, unreachableExpr;
- if (condition) {
- resultExpr = conditionalExpression.TrueExpression;
- unreachableExpr = conditionalExpression.FalseExpression;
- } else {
- resultExpr = conditionalExpression.FalseExpression;
- unreachableExpr = conditionalExpression.TrueExpression;
- }
- unreachableNodes.Add (unreachableExpr);
-
- AddIssue (unreachableExpr, ctx.TranslateString ("Remove unreachable code"),
- script => script.Replace (conditionalExpression, resultExpr.Clone ()));
- }
- base.VisitConditionalExpression (conditionalExpression);
- }
-
- protected override void VisitChildren (AstNode node)
- {
- // skip unreachable nodes
- if (!unreachableNodes.Contains (node))
- base.VisitChildren (node);
- }
-
- class StatementIssueCollector : DepthFirstAstVisitor
- {
- GatherVisitor visitor;
- ReachabilityAnalysis reachability;
- HashSet<Statement> collectedStatements;
-
- private StatementIssueCollector (GatherVisitor visitor, ReachabilityAnalysis reachability)
- {
- collectedStatements = new HashSet<Statement> ();
- this.visitor = visitor;
- this.reachability = reachability;
- }
-
- public static void Collect (GatherVisitor visitor, BlockStatement body)
- {
- if (body.IsNull)
- return;
- var reachability = visitor.ctx.CreateReachabilityAnalysis (body);
-
- var collector = new StatementIssueCollector (visitor, reachability);
- collector.VisitBlockStatement (body);
- }
-
- protected override void VisitChildren (AstNode node)
- {
- var statement = node as Statement;
- if (statement == null || !AddStatement (statement))
- base.VisitChildren (node);
- }
-
- bool AddStatement(Statement statement)
- {
- if (reachability.IsReachable (statement))
- return false;
- if (collectedStatements.Contains (statement))
- return true;
- var prevEnd = statement.GetPrevNode (n => !(n is NewLineNode)).EndLocation;
-
- // group multiple continuous statements into one issue
- var start = statement.StartLocation;
- collectedStatements.Add (statement);
- visitor.unreachableNodes.Add (statement);
- while (statement.GetNextSibling (s => s is Statement) != null) {
- statement = (Statement)statement.GetNextSibling (s => s is Statement);
- collectedStatements.Add (statement);
- visitor.unreachableNodes.Add (statement);
- }
- var end = statement.EndLocation;
-
- var removeAction = new CodeAction (visitor.ctx.TranslateString ("Remove unreachable code"),
- script =>
- {
- var startOffset = script.GetCurrentOffset (prevEnd);
- var endOffset = script.GetCurrentOffset (end);
- script.RemoveText (startOffset, endOffset - startOffset);
- }, collectedStatements.First().StartLocation, collectedStatements.Last().EndLocation);
- var commentAction = new CodeAction(visitor.ctx.TranslateString("Comment unreachable code"),
- script =>
- {
- var startOffset = script.GetCurrentOffset(prevEnd);
- script.InsertText(startOffset, Environment.NewLine + "/*");
- var endOffset = script.GetCurrentOffset(end);
- script.InsertText(endOffset, Environment.NewLine + "*/");
- }, collectedStatements.First().StartLocation, collectedStatements.Last().EndLocation);
- var actions = new [] { removeAction, commentAction };
- visitor.AddIssue (start, end, visitor.ctx.TranslateString ("Code is unreachable"), actions);
- return true;
- }
-
- // skip lambda and anonymous method
- public override void VisitLambdaExpression (LambdaExpression lambdaExpression)
- {
- }
-
- public override void VisitAnonymousMethodExpression (
- AnonymousMethodExpression anonymousMethodExpression)
- {
- }
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UseVarKeywordIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UseVarKeywordIssue.cs
deleted file mode 100644
index 5fedeca..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/UseVarKeywordIssue.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// UseVarKeywordInspector.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin <http://xamarin.com>
-//
-// 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 ICSharpCode.NRefactory.PatternMatching;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- /// <summary>
- /// Checks for places where the 'var' keyword can be used. Note that the action is actually done with a context
- /// action.
- /// </summary>
- [IssueDescription("Use 'var' keyword",
- Description = "Use implicitly typed local variable decaration",
- Category = IssueCategories.Opportunities,
- Severity = Severity.Hint,
- IssueMarker = IssueMarker.None,
- ResharperDisableKeyword = "SuggestUseVarKeywordEvident")]
- public class UseVarKeywordIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<UseVarKeywordIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx, UseVarKeywordIssue issueProvider) : base (ctx, issueProvider)
- {
- }
-
- public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
- {
- base.VisitVariableDeclarationStatement(variableDeclarationStatement);
- if (variableDeclarationStatement.Type is PrimitiveType) {
- return;
- }
- if (variableDeclarationStatement.Type is SimpleType && ((SimpleType)variableDeclarationStatement.Type).Identifier == "var") {
- return;
- }
- if (variableDeclarationStatement.Variables.Count != 1) {
- return;
- }
-
- //only checks for cases where the type would be obvious - assignment of new, cast, etc.
- //also check the type actually matches else the user might want to assign different subclasses later
- var v = variableDeclarationStatement.Variables.Single();
-
- var arrCreate = v.Initializer as ArrayCreateExpression;
- if (arrCreate != null) {
- var n = variableDeclarationStatement.Type as ComposedType;
- //FIXME: check the specifier compatibility
- if (n != null && n.ArraySpecifiers.Any() && n.BaseType.IsMatch(arrCreate.Type)) {
- AddIssue(variableDeclarationStatement);
- }
- }
- var objCreate = v.Initializer as ObjectCreateExpression;
- if (objCreate != null && objCreate.Type.IsMatch(variableDeclarationStatement.Type)) {
- AddIssue(variableDeclarationStatement);
- }
- var asCast = v.Initializer as AsExpression;
- if (asCast != null && asCast.Type.IsMatch(variableDeclarationStatement.Type)) {
- AddIssue(variableDeclarationStatement);
- }
- var cast = v.Initializer as CastExpression;
- if (cast != null && cast.Type.IsMatch(variableDeclarationStatement.Type)) {
- AddIssue(variableDeclarationStatement);
- }
- }
-
- void AddIssue(VariableDeclarationStatement variableDeclarationStatement)
- {
- AddIssue(variableDeclarationStatement.Type, ctx.TranslateString("Use 'var' keyword"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ValueParameterUnusedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ValueParameterUnusedIssue.cs
deleted file mode 100644
index 0958f3f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/ValueParameterUnusedIssue.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-//
-// SetterDoesNotUseValueParameterTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using System.Threading;
-using ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("The value parameter is not used in a context where is should be",
- Description = "Warns about property or indexer setters and event adders or removers that do not use the value parameter.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning)]
- public class ValueParameterUnusedIssue : ICodeIssueProvider
- {
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
-
- class GatherVisitor : GatherVisitorBase<ValueParameterUnusedIssue>
- {
- public GatherVisitor(BaseRefactoringContext context, ValueParameterUnusedIssue inspector) : base (context)
- {
- }
-
- public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
- {
- FindIssuesInAccessor(indexerDeclaration.Setter);
- }
-
- public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration)
- {
- FindIssuesInAccessor(propertyDeclaration.Setter);
- }
-
- public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration)
- {
- var addAccessor = eventDeclaration.AddAccessor;
- var removeAccessor = eventDeclaration.RemoveAccessor;
- // don't warn on empty custom events
- if (addAccessor.Body.Statements.Count == 0 && removeAccessor.Body.Statements.Count == 0)
- return;
- FindIssuesInAccessor(addAccessor, "add accessor");
- FindIssuesInAccessor(removeAccessor, "remove accessor");
- }
-
- void FindIssuesInAccessor(Accessor accessor, string accessorName = "setter")
- {
- var body = accessor.Body;
- if (!IsEligible(body))
- return;
-
- var localResolveResult = ctx.GetResolverStateBefore(body)
- .LookupSimpleNameOrTypeName("value", new List<IType>(), NameLookupMode.Expression) as LocalResolveResult;
- if (localResolveResult == null)
- return;
-
- bool referenceFound = false;
- foreach (var result in ctx.FindReferences (body, localResolveResult.Variable)) {
- var node = result.Node;
- if (node.StartLocation >= body.StartLocation && node.EndLocation <= body.EndLocation) {
- referenceFound = true;
- break;
- }
- }
-
- if(!referenceFound)
- AddIssue(accessor.Keyword, ctx.TranslateString("The " + accessorName + " does not use the 'value' parameter"));
- }
-
- static bool IsEligible(BlockStatement body)
- {
- if (body == null || body.IsNull)
- return false;
- if (body.Statements.FirstOrNullObject() is ThrowStatement)
- return false;
- return true;
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableDeclaredInWideScopeIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableDeclaredInWideScopeIssue.cs
deleted file mode 100644
index 62f38cc..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableDeclaredInWideScopeIssue.cs
+++ /dev/null
@@ -1,382 +0,0 @@
-//
-// VariableDeclaredWideScopeIssue.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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.Collections.Generic;
-using System.Linq;
-using System;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription("The variable can be declared in a nested scope",
- Description = "Highlights variables that can be declared in a nested scope.",
- Category = IssueCategories.Opportunities,
- Severity = Severity.Suggestion)]
- public class VariableDeclaredInWideScopeIssue : ICodeIssueProvider
- {
- #region ICodeIssueProvider implementation
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context, this).GetIssues();
- }
- #endregion
-
- class GatherVisitor : GatherVisitorBase<VariableDeclaredInWideScopeIssue>
- {
- readonly BaseRefactoringContext context;
-
- public GatherVisitor(BaseRefactoringContext context, VariableDeclaredInWideScopeIssue issueProvider) : base (context, issueProvider)
- {
- this.context = context;
- }
-
- static readonly IList<Type> moveTargetBlacklist = new List<Type> {
- typeof(WhileStatement),
- typeof(ForeachStatement),
- typeof(ForStatement),
- typeof(DoWhileStatement),
- typeof(TryCatchStatement),
- typeof(AnonymousMethodExpression),
- typeof(LambdaExpression),
- typeof(LockStatement)
- };
-
- class CheckInitializer : DepthFirstAstVisitor
- {
- public bool IsValid {
- get;
- private set;
- }
-
- public CheckInitializer()
- {
- IsValid = true;
- }
-
- public override void VisitInvocationExpression(InvocationExpression invocationExpression)
- {
- base.VisitInvocationExpression(invocationExpression);
- IsValid = false;
- }
- }
-
- bool CheckForInvocations(Expression initializer)
- {
- var visitor = new CheckInitializer();
- initializer.AcceptVisitor(visitor);
- return visitor.IsValid;
- }
-
- public override void VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
- {
- base.VisitVariableDeclarationStatement(variableDeclarationStatement);
-
- var rootNode = variableDeclarationStatement.Parent as BlockStatement;
- if (rootNode == null)
- // We are somewhere weird, like a the ResourceAquisition of a using statement
- return;
-
- // TODO: Handle declarations with more than one variable?
- if (variableDeclarationStatement.Variables.Count > 1)
- return;
-
- var variableInitializer = variableDeclarationStatement.Variables.First();
- var identifiers = GetIdentifiers(rootNode.Descendants, variableInitializer.Name).ToList();
-
- if (identifiers.Count == 0)
- // variable is not used
- return;
-
- if (!CheckForInvocations(variableInitializer.Initializer))
- return;
-
- AstNode deepestCommonAncestor = GetDeepestCommonAncestor(rootNode, identifiers);
- var path = GetPath(rootNode, deepestCommonAncestor);
-
- // The node that will follow the moved declaration statement
- AstNode anchorNode = GetInitialAnchorNode(rootNode, identifiers, path);
-
- // Restrict path to only those where the initializer has not changed
- var pathToCheck = path.Skip(1).ToList();
- var firstInitializerChangeNode = GetFirstInitializerChange(variableDeclarationStatement, pathToCheck, variableInitializer.Initializer);
- if (firstInitializerChangeNode != null) {
- // The node changing the initializer expression may not be on the path
- // to the actual usages of the variable, so we need to merge the paths
- // so we get the part of the paths that are common between them
- var pathToChange = GetPath(rootNode, firstInitializerChangeNode);
- var deepestCommonIndex = GetLowestCommonAncestorIndex(path, pathToChange);
- anchorNode = pathToChange [deepestCommonIndex + 1];
- path = pathToChange.Take(deepestCommonIndex).ToList();
- }
-
- // Restrict to locations outside of blacklisted node types
- var firstBlackListedNode = path.Where(node => moveTargetBlacklist.Contains(node.GetType())).FirstOrDefault();
- if (firstBlackListedNode != null) {
- path = GetPath(rootNode, firstBlackListedNode.Parent);
- anchorNode = firstBlackListedNode;
- }
-
- anchorNode = GetInsertionPoint(anchorNode);
-
- if (anchorNode != null && anchorNode != rootNode && anchorNode.Parent != rootNode) {
- AddIssue(variableDeclarationStatement, context.TranslateString("Variable could be moved to a nested scope"),
- GetActions(variableDeclarationStatement, (Statement)anchorNode));
- }
- }
-
- static bool IsBannedInsertionPoint(AstNode anchorNode)
- {
- var parent = anchorNode.Parent;
-
- // Don't split 'else if ...' into else { if ... }
- if (parent is IfElseStatement && anchorNode is IfElseStatement)
- return true;
- // Don't allow moving the declaration into the resource aquisition of a using statement
- if (parent is UsingStatement)
- return true;
- // Don't allow moving things into arbitrary positions of for statements
- if (parent is ForStatement && anchorNode.Role != Roles.EmbeddedStatement)
- return true;
- return false;
- }
-
- static AstNode GetInsertionPoint(AstNode node)
- {
- while (true) {
- if (node == null)
- break;
- if (node is Statement && !IsBannedInsertionPoint(node))
- break;
- node = node.Parent;
- }
- return node;
- }
-
- AstNode GetInitialAnchorNode (BlockStatement rootNode, List<IdentifierExpression> identifiers, IList<AstNode> path)
- {
- if (identifiers.Count > 1) {
- // Assume the first identifier is the first in the execution flow
- // firstPath will always be longer than path since path is the
- // combination of a least two (different) paths.
- var firstPath = GetPath(rootNode, identifiers [0]);
- if (firstPath [path.Count].Role == IfElseStatement.TrueRole) {
- // IfElseStatement has a slightly weird structure; Don't
- // consider the true role eligible for anchor node in this case
- return firstPath [path.Count - 1];
- }
- return firstPath [path.Count];
- }
- // We only have one path, and a statement in itself cannot be an identifier
- // so we're safe
- return path [path.Count - 1];
- }
-
- static IEnumerable<IdentifierExpression> GetIdentifiers(IEnumerable<AstNode> candidates, string name = null)
- {
- return
- from node in candidates
- let identifier = node as IdentifierExpression
- where identifier != null && (name == null || identifier.Identifier == name)
- select identifier;
- }
-
- AstNode GetFirstInitializerChange(AstNode variableDeclarationStatement, IList<AstNode> path, Expression initializer)
- {
- var identifiers = GetIdentifiers(initializer.DescendantsAndSelf).ToList();
- var mayChangeInitializer = GetChecker (initializer, identifiers);
- AstNode lastChange = null;
- for (int i = path.Count - 1; i >= 0; i--) {
- for (AstNode node = path[i].PrevSibling; node != null && node != variableDeclarationStatement; node = node.PrevSibling) {
- // Special case for IfElseStatement: The AST nesting does not match the scope nesting, so
- // don't handle branches here: The correct one has already been checked anyway.
- // This also works to our advantage: No special checking is needed for the condition since
- // it is a the same level in the tree as the false branch
- if (node.Role == IfElseStatement.TrueRole || node.Role == IfElseStatement.FalseRole)
- continue;
- foreach (var expression in node.DescendantsAndSelf.Where(n => n is Expression).Cast<Expression>()) {
- if (mayChangeInitializer(expression)) {
- lastChange = expression;
- }
- }
- }
- }
- return lastChange;
- }
-
- Func<Expression, bool> GetChecker(Expression expression, IList<IdentifierExpression> identifiers)
- {
- // TODO: This only works for simple cases.
- IList<IMember> members;
- IList<IVariable> locals;
- var identifierResolveResults = identifiers.Select(identifier => context.Resolve(identifier)).ToList();
- SplitResolveResults(identifierResolveResults, out members, out locals);
-
- if (expression is InvocationExpression || expression is ObjectCreateExpression) {
- return node => {
- if (node is InvocationExpression || node is ObjectCreateExpression)
- // We don't know what these might do, so assume it will change the initializer
- return true;
- var binaryOperator = node as BinaryOperatorExpression;
- if (binaryOperator != null) {
- var resolveResult = context.Resolve(binaryOperator) as OperatorResolveResult;
- if (resolveResult == null)
- return false;
- // Built-in operators are ok, user defined ones not so much
- return resolveResult.UserDefinedOperatorMethod != null;
- }
- return IsConflictingAssignment(node, identifiers, members, locals);
- };
- } else if (expression is IdentifierExpression) {
- var initializerDependsOnMembers = identifierResolveResults.Any(result => result is MemberResolveResult);
- var initializerDependsOnReferenceType = identifierResolveResults.Any(result => result.Type.IsReferenceType == true);
- return node => {
- if ((node is InvocationExpression || node is ObjectCreateExpression) &&
- (initializerDependsOnMembers || initializerDependsOnReferenceType))
- // Anything can happen...
- return true;
- var binaryOperator = node as BinaryOperatorExpression;
- if (binaryOperator != null) {
- var resolveResult = context.Resolve(binaryOperator) as OperatorResolveResult;
- if (resolveResult == null)
- return false;
- return resolveResult.UserDefinedOperatorMethod != null;
- }
- return IsConflictingAssignment(node, identifiers, members, locals);
- };
- }
-
- return node => false;
- }
-
- bool IsConflictingAssignment (Expression node, IList<IdentifierExpression> identifiers, IList<IMember> members, IList<IVariable> locals)
- {
- var assignmentExpression = node as AssignmentExpression;
- if (assignmentExpression != null) {
- IList<IMember> targetMembers;
- IList<IVariable> targetLocals;
- var identifierResolveResults = identifiers.Select(identifier => context.Resolve(identifier)).ToList();
- SplitResolveResults(identifierResolveResults, out targetMembers, out targetLocals);
-
- return members.Any(member => targetMembers.Contains(member)) ||
- locals.Any(local => targetLocals.Contains(local));
- }
- return false;
- }
-
- static void SplitResolveResults(List<ResolveResult> identifierResolveResults, out IList<IMember> members, out IList<IVariable> locals)
- {
- members = new List<IMember>();
- locals = new List<IVariable>();
- foreach (var resolveResult in identifierResolveResults) {
- var memberResolveResult = resolveResult as MemberResolveResult;
- if (memberResolveResult != null) {
- members.Add(memberResolveResult.Member);
- }
- var localResolveResult = resolveResult as LocalResolveResult;
- if (localResolveResult != null) {
- locals.Add(localResolveResult.Variable);
- }
- }
- }
-
- bool IsScopeContainer(AstNode node)
- {
- if (node == null)
- return false;
-
- var blockStatement = node as BlockStatement;
- if (blockStatement != null)
- return true;
-
- var statement = node as Statement;
- if (statement == null)
- return false;
-
- var role = node.Role;
- if (role == Roles.EmbeddedStatement ||
- role == IfElseStatement.TrueRole ||
- role == IfElseStatement.FalseRole) {
- return true;
- }
- return false;
- }
-
- IEnumerable<CodeAction> GetActions(Statement oldStatement, Statement followingStatement)
- {
- yield return new CodeAction(context.TranslateString("Move to nested scope"), script => {
- var parent = followingStatement.Parent;
- if (parent is SwitchSection || parent is BlockStatement) {
- script.InsertBefore(followingStatement, oldStatement.Clone());
- } else {
- var newBlockStatement = new BlockStatement {
- Statements = {
- oldStatement.Clone(),
- followingStatement.Clone()
- }
- };
- script.Replace(followingStatement, newBlockStatement);
- script.FormatText(parent);
- }
- script.Remove(oldStatement);
- }, oldStatement);
- }
-
- AstNode GetDeepestCommonAncestor(AstNode assumedRoot, IEnumerable<AstNode> leaves)
- {
- var previousPath = GetPath(assumedRoot, leaves.First());
- int lowestIndex = previousPath.Count - 1;
- foreach (var leaf in leaves.Skip(1)) {
- var currentPath = GetPath(assumedRoot, leaf);
- lowestIndex = GetLowestCommonAncestorIndex(previousPath, currentPath, lowestIndex);
- previousPath = currentPath;
- }
- return previousPath [lowestIndex];
- }
-
- int GetLowestCommonAncestorIndex(IList<AstNode> path1, IList<AstNode> path2, int maxIndex = int.MaxValue)
- {
- var max = Math.Min(Math.Min(path1.Count, path2.Count), maxIndex);
- for (int i = 0; i <= max; i++) {
- if (path1 [i] != path2 [i])
- return i - 1;
- }
- return max;
- }
-
- IList<AstNode> GetPath(AstNode from, AstNode to)
- {
- var reversePath = new List<AstNode>();
- do {
- reversePath.Add(to);
- to = to.Parent;
- } while (to != from.Parent);
- reversePath.Reverse();
- return reversePath;
- }
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/LocalVariableHidesMemberIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/LocalVariableHidesMemberIssue.cs
deleted file mode 100644
index ea5159e..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/LocalVariableHidesMemberIssue.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// LocalVariableHideFieldIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Local variable hides a member",
- Description = "Local variable has the same name as a member and hides it.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.Underline,
- ResharperDisableKeyword = "LocalVariableHidesMember")]
- public class LocalVariableHidesMemberIssue : VariableHidesMemberIssue
- {
- public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<LocalVariableHidesMemberIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitVariableInitializer (VariableInitializer variableInitializer)
- {
- base.VisitVariableInitializer (variableInitializer);
-
- if (!(ctx.Resolve (variableInitializer) is LocalResolveResult))
- return;
- if (HidesMember (ctx, variableInitializer, variableInitializer.Name))
- AddIssue (variableInitializer.NameToken,
- ctx.TranslateString ("Local variable has the same name as a member and hides it"));
- }
-
- public override void VisitForeachStatement (ForeachStatement foreachStatement)
- {
- base.VisitForeachStatement (foreachStatement);
-
- if (HidesMember (ctx, foreachStatement, foreachStatement.VariableName))
- AddIssue (foreachStatement.VariableNameToken,
- ctx.TranslateString ("Local variable has the same name as a member and hides it"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/ParameterHidesMemberIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/ParameterHidesMemberIssue.cs
deleted file mode 100644
index 279aef8..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/ParameterHidesMemberIssue.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// ParameterHidesMemberIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Parameter hides a member",
- Description = "Parameter has the same name as a member and hides it.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Suggestion,
- IssueMarker = IssueMarker.Underline)]
- public class ParameterHidesMemberIssue : VariableHidesMemberIssue
- {
- public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- class GatherVisitor : GatherVisitorBase<ParameterHidesMemberIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration (parameterDeclaration);
-
- if (parameterDeclaration.Parent is ConstructorDeclaration)
- return;
- if (HidesMember (ctx, parameterDeclaration, parameterDeclaration.Name))
- AddIssue (parameterDeclaration.NameToken,
- ctx.TranslateString ("Parameter has the same name as a member and hides it"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/VariableHidesMemberIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/VariableHidesMemberIssue.cs
deleted file mode 100644
index 4dc4f89..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableHidesMemberIssue/VariableHidesMemberIssue.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// VariableHidesMemberIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using System.Linq;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem;
-using System;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public abstract class VariableHidesMemberIssue : ICodeIssueProvider
- {
- public abstract IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context);
-
- protected static bool HidesMember(BaseRefactoringContext ctx, AstNode node, string variableName)
- {
- var typeDecl = node.GetParent<TypeDeclaration>();
- if (typeDecl == null)
- return false;
- var entityDecl = node.GetParent<EntityDeclaration>();
- var memberResolveResult = ctx.Resolve(entityDecl) as MemberResolveResult;
- if (memberResolveResult == null)
- return false;
- var typeResolveResult = ctx.Resolve(typeDecl) as TypeResolveResult;
- if (typeResolveResult == null)
- return false;
-
- var sourceMember = memberResolveResult.Member;
-
- return typeResolveResult.Type.GetMembers(m => m.Name == variableName).Any(m2 => IsAccessible(sourceMember, m2));
- }
-
- static bool IsAccessible(IMember sourceMember, IMember targetMember)
- {
- if (sourceMember.IsStatic != targetMember.IsStatic)
- return false;
-
- var sourceType = sourceMember.DeclaringType;
- var targetType = targetMember.DeclaringType;
- switch (targetMember.Accessibility) {
- case Accessibility.None:
- return false;
- case Accessibility.Private:
- // check for members of outer classes (private members of outer classes can be accessed)
- var targetTypeDefinition = targetType.GetDefinition();
- for (var t = sourceType.GetDefinition(); t != null; t = t.DeclaringTypeDefinition) {
- if (t.Equals(targetTypeDefinition))
- return true;
- }
- return false;
- case Accessibility.Public:
- return true;
- case Accessibility.Protected:
- return IsProtectedAccessible(sourceType, targetType);
- case Accessibility.Internal:
- return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly);
- case Accessibility.ProtectedOrInternal:
- return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly) || IsProtectedAccessible(sourceType, targetType);
- case Accessibility.ProtectedAndInternal:
- return IsInternalAccessible(sourceMember.ParentAssembly, targetMember.ParentAssembly) && IsProtectedAccessible(sourceType, targetType);
- default:
- throw new Exception("Invalid value for Accessibility");
- }
- }
-
- static bool IsProtectedAccessible(IType sourceType, IType targetType)
- {
- return sourceType.GetAllBaseTypes().Any(type => targetType.Equals(type));
- }
-
- static bool IsInternalAccessible(IAssembly sourceAssembly, IAssembly targetAssembly)
- {
- return sourceAssembly.InternalsVisibleTo(targetAssembly);
- }
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/LocalVariableNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/LocalVariableNotUsedIssue.cs
deleted file mode 100644
index 7cfb86a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/LocalVariableNotUsedIssue.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-//
-// LocalVariableNotUsedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Unused local variable",
- Description = "Local variable is never used.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut)]
- public class LocalVariableNotUsedIssue : ICodeIssueProvider
- {
- #region ICodeIssueProvider implementation
-
- public System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor (context).GetIssues ();
- }
-
- #endregion
-
- class GatherVisitor : GatherVisitorBase<LocalVariableNotUsedIssue>
- {
- public GatherVisitor (BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitVariableInitializer (VariableInitializer variableInitializer)
- {
- base.VisitVariableInitializer (variableInitializer);
-
- // check if variable is assigned
- if (!variableInitializer.Initializer.IsNull)
- return;
- var decl = variableInitializer.Parent as VariableDeclarationStatement;
- if (decl == null)
- return;
-
- var resolveResult = ctx.Resolve (variableInitializer) as LocalResolveResult;
- if (resolveResult == null)
- return;
-
- if (IsUsed (decl.Parent, resolveResult.Variable, variableInitializer))
- return;
-
- AddIssue (variableInitializer.NameToken, ctx.TranslateString ("Remove unused local variable"),
- script =>
- {
- if (decl.Variables.Count == 1) {
- script.Remove (decl);
- } else {
- var newDeclaration = (VariableDeclarationStatement)decl.Clone ();
- newDeclaration.Variables.Remove (
- newDeclaration.Variables.FirstOrNullObject (v => v.Name == variableInitializer.Name));
- script.Replace (decl, newDeclaration);
- }
- });
- }
-
- public override void VisitForeachStatement (ForeachStatement foreachStatement)
- {
- base.VisitForeachStatement (foreachStatement);
-
- var resolveResult = ctx.Resolve (foreachStatement.VariableNameToken) as LocalResolveResult;
- if (resolveResult == null)
- return;
-
- if (IsUsed (foreachStatement, resolveResult.Variable, foreachStatement.VariableNameToken))
- return;
-
- AddIssue (foreachStatement.VariableNameToken, ctx.TranslateString ("Local variable is never used"));
- }
-
- bool IsUsed(AstNode rootNode, IVariable variable, AstNode variableNode)
- {
- return ctx.FindReferences(rootNode, variable).Any(result => result.Node != variableNode);
- }
- }
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/ParameterNotUsedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/ParameterNotUsedIssue.cs
deleted file mode 100644
index b6d9e74..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableNotUsedIssues/ParameterNotUsedIssue.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-//
-// ParameterNotUsedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.Semantics;
-using System.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-using System.Collections.Generic;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using System;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Unused parameter",
- Description = "Parameter is never used.",
- Category = IssueCategories.Redundancies,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.GrayOut)]
- public class ParameterNotUsedIssue : ICodeIssueProvider
- {
- #region ICodeIssueProvider implementation
- public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- var delegateVisitor = new GetDelgateUsagesVisitor (context);
- context.RootNode.AcceptVisitor (delegateVisitor);
-
- return new GatherVisitor (context, delegateVisitor).GetIssues ();
- }
- #endregion
-
- // Collect all methods that are used as delegate
- class GetDelgateUsagesVisitor : DepthFirstAstVisitor
- {
- BaseRefactoringContext ctx;
- public readonly List<IMethod> UsedMethods = new List<IMethod> ();
-
- public GetDelgateUsagesVisitor(BaseRefactoringContext ctx)
- {
- this.ctx = ctx;
- }
-
- public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
- {
- if (!IsTargetOfInvocation(identifierExpression)) {
- var mgr = ctx.Resolve (identifierExpression) as MethodGroupResolveResult;
- if (mgr != null)
- UsedMethods.AddRange (mgr.Methods);
- }
- base.VisitIdentifierExpression(identifierExpression);
- }
-
- public override void VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression)
- {
- if (!IsTargetOfInvocation(memberReferenceExpression)) {
- var mgr = ctx.Resolve (memberReferenceExpression) as MethodGroupResolveResult;
- if (mgr != null)
- UsedMethods.AddRange (mgr.Methods);
- }
- base.VisitMemberReferenceExpression(memberReferenceExpression);
- }
-
- static bool IsTargetOfInvocation(AstNode node)
- {
- return node.Role == Roles.TargetExpression && node.Parent is InvocationExpression;
- }
- }
-
- class GatherVisitor : GatherVisitorBase<ParameterNotUsedIssue>
- {
- GetDelgateUsagesVisitor usedDelegates;
- bool currentTypeIsPartial;
-
- public GatherVisitor (BaseRefactoringContext ctx, GetDelgateUsagesVisitor usedDelegates)
- : base (ctx)
- {
- this.usedDelegates = usedDelegates;
- }
-
- public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration)
- {
- bool outerTypeIsPartial = currentTypeIsPartial;
- currentTypeIsPartial = typeDeclaration.HasModifier(Modifiers.Partial);
- base.VisitTypeDeclaration(typeDeclaration);
- currentTypeIsPartial = outerTypeIsPartial;
- }
-
- public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration)
- {
- // Only some methods are candidates for the warning
-
- if (methodDeclaration.Body.IsNull)
- return;
- if (methodDeclaration.Modifiers.HasFlag (Modifiers.Virtual) ||
- methodDeclaration.Modifiers.HasFlag (Modifiers.New) ||
- methodDeclaration.Modifiers.HasFlag (Modifiers.Partial))
- return;
- var methodResolveResult = ctx.Resolve(methodDeclaration) as MemberResolveResult;
- if (methodResolveResult == null)
- return;
- var member = methodResolveResult.Member;
- if (member.IsOverride)
- return;
- if (member.ImplementedInterfaceMembers.Any ())
- return;
- if (usedDelegates.UsedMethods.Any (m => m.MemberDefinition == member))
- return;
- if (currentTypeIsPartial && methodDeclaration.Parameters.Count == 2) {
- if (methodDeclaration.Parameters.First().Name == "sender") {
- // Looks like an event handler; the registration might be in the designer part
- return;
- }
- }
- foreach (var parameter in methodDeclaration.Parameters)
- parameter.AcceptVisitor (this);
- }
-
- public override void VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration (parameterDeclaration);
-
- if (!(parameterDeclaration.Parent is MethodDeclaration || parameterDeclaration.Parent is ConstructorDeclaration))
- return;
-
- var resolveResult = ctx.Resolve (parameterDeclaration) as LocalResolveResult;
- if (resolveResult == null)
- return;
-
- if (ctx.FindReferences (parameterDeclaration.Parent, resolveResult.Variable).Any(r => r.Node != parameterDeclaration))
- return;
-
- AddIssue (parameterDeclaration.NameToken, ctx.TranslateString ("Parameter is never used"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs
deleted file mode 100644
index 3582333..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/ParameterOnlyAssignedIssue.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// ParameterOnlyAssignedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.Semantics;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- [IssueDescription ("Parameter is only assigned",
- Description = "Parameter is assigned but its value is never used.",
- Category = IssueCategories.CodeQualityIssues,
- Severity = Severity.Warning,
- IssueMarker = IssueMarker.Underline)]
- public class ParameterOnlyAssignedIssue : VariableOnlyAssignedIssue
- {
- public override System.Collections.Generic.IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
- {
- return new GatherVisitor(context).GetIssues ();
- }
-
- private class GatherVisitor : GatherVisitorBase<ParameterOnlyAssignedIssue>
- {
- public GatherVisitor(BaseRefactoringContext ctx)
- : base (ctx)
- {
- }
-
- public override void VisitParameterDeclaration(ParameterDeclaration parameterDeclaration)
- {
- base.VisitParameterDeclaration(parameterDeclaration);
-
- var resolveResult = ctx.Resolve(parameterDeclaration) as LocalResolveResult;
- if (resolveResult == null)
- return;
-
- var parameterModifier = parameterDeclaration.ParameterModifier;
- if (parameterModifier == ParameterModifier.Out || parameterModifier == ParameterModifier.Ref ||
- !TestOnlyAssigned(ctx, parameterDeclaration.Parent, resolveResult.Variable)) {
- return;
- }
- AddIssue(parameterDeclaration.NameToken,
- ctx.TranslateString("Parameter is assigned but its value is never used"));
- }
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs
deleted file mode 100644
index c0827b3..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/VariableOnlyAssignedIssues/VariableOnlyAssignedIssue.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// VariableOnlyAssignedIssue.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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.Collections.Generic;
-using ICSharpCode.NRefactory.TypeSystem;
-
-namespace ICSharpCode.NRefactory.CSharp.Refactoring
-{
- public abstract class VariableOnlyAssignedIssue : ICodeIssueProvider
- {
- public abstract IEnumerable<CodeIssue> GetIssues (BaseRefactoringContext context);
-
- protected static bool TestOnlyAssigned(BaseRefactoringContext ctx, AstNode rootNode, IVariable variable)
- {
- var assignment = false;
- var nonAssignment = false;
- foreach (var result in ctx.FindReferences(rootNode, variable)) {
- var node = result.Node;
- if (node is ParameterDeclaration)
- continue;
-
- if (node is VariableInitializer) {
- if (!(node as VariableInitializer).Initializer.IsNull)
- assignment = true;
- continue;
- }
-
- if (node is IdentifierExpression) {
- var parent = node.Parent;
- if (parent is AssignmentExpression) {
- if (((AssignmentExpression)parent).Left == node) {
- assignment = true;
- continue;
- }
- } else if (parent is UnaryOperatorExpression) {
- var op = ((UnaryOperatorExpression)parent).Operator;
- switch (op) {
- case UnaryOperatorType.Increment:
- case UnaryOperatorType.PostIncrement:
- case UnaryOperatorType.Decrement:
- case UnaryOperatorType.PostDecrement:
- assignment = true;
- if (!(parent.Parent is ExpressionStatement))
- nonAssignment = true;
- continue;
- }
- } else if (parent is DirectionExpression) {
- if (((DirectionExpression)parent).FieldDirection == FieldDirection.Out) {
- assignment = true;
- // Using dummy variables is necessary for ignoring
- // out-arguments, so we don't want to warn for those.
- nonAssignment = true;
- continue;
- }
- }
- }
- nonAssignment = true;
- }
- return assignment && !nonAssignment;
- }
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueAttribute.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueAttribute.cs
index 26efd04..620524b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueAttribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueAttribute.cs
@@ -27,6 +27,7 @@ using System.Diagnostics.CodeAnalysis;
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using ICSharpCode.NRefactory.Refactoring;
namespace ICSharpCode.NRefactory.CSharp
{
@@ -42,6 +43,7 @@ namespace ICSharpCode.NRefactory.CSharp
public string ResharperDisableKeyword { get; set; }
public string SuppressMessageCategory { get; set; }
public string SuppressMessageCheckId { get; set; }
+ public int PragmaWarning { get; set; }
public Severity Severity { get; set; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueMarker.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueMarker.cs
deleted file mode 100644
index 6e61ded..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/IssueMarker.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// IssueMarker.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- /// <summary>
- /// The issue marker is used to set how an issue should be marked inside the text editor.
- /// </summary>
- public enum IssueMarker
- {
- /// <summary>
- /// The issue is not shown inside the text editor. (But in the task bar)
- /// </summary>
- None,
-
- /// <summary>
- /// The region is marked as underline in the severity color.
- /// </summary>
- Underline,
-
- /// <summary>
- /// The text is grayed out.
- /// </summary>
- GrayOut
- }
-
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/LambdaHelper.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/LambdaHelper.cs
index cfc96c5..b99ddb6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/LambdaHelper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/LambdaHelper.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System.Linq;
+using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.TypeSystem;
@@ -34,25 +35,17 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
public static IType GetLambdaReturnType(RefactoringContext context, LambdaExpression lambda)
{
- var parent = lambda.Parent;
- while (parent is ParenthesizedExpression)
- parent = parent.Parent;
-
- ITypeDefinition delegateTypeDef;
- if (parent is InvocationExpression) {
- var invocation = (InvocationExpression)parent;
- var argIndex = invocation.Arguments.TakeWhile (arg => !arg.Contains (lambda.StartLocation)).Count ();
- var resolveResult = (CSharpInvocationResolveResult)context.Resolve (invocation);
- delegateTypeDef = resolveResult.Arguments [argIndex].Type.GetDefinition ();
- } else {
- delegateTypeDef = context.Resolve (parent).Type.GetDefinition ();
+ LambdaResolveResult rr = context.Resolve(lambda) as LambdaResolveResult;
+ if (rr == null)
+ return SpecialType.UnknownType;
+ if (rr.IsAsync) {
+ // Unpack Task<T>
+ if (rr.ReturnType.IsKnownType(KnownTypeCode.Task))
+ return context.Compilation.FindType(KnownTypeCode.Void);
+ else if (rr.ReturnType.IsKnownType(KnownTypeCode.TaskOfT) && rr.ReturnType.IsParameterized)
+ return rr.ReturnType.TypeArguments[0];
}
- if (delegateTypeDef == null)
- return null;
- var invokeMethod = delegateTypeDef.GetMethods (m => m.Name == "Invoke").FirstOrDefault ();
- if (invokeMethod == null)
- return null;
- return invokeMethod.ReturnType;
+ return rr.ReturnType;
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/PatternHelper.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/PatternHelper.cs
index a85c59f..ac11889 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/PatternHelper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/PatternHelper.cs
@@ -36,5 +36,29 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
new BinaryOperatorExpression(expr2.Clone(), op, expr1.Clone())
};
}
+
+ /// <summary>
+ /// Optionally allows parentheses around the given expression.
+ /// </summary>
+ public static Expression OptionalParentheses(Expression expr)
+ {
+ return new OptionalParenthesesPattern(expr);
+ }
+
+ sealed class OptionalParenthesesPattern : Pattern
+ {
+ readonly INode child;
+
+ public OptionalParenthesesPattern(INode child)
+ {
+ this.child = child;
+ }
+
+ public override bool DoMatch(INode other, Match match)
+ {
+ INode unpacked = ParenthesizedExpression.UnpackParenthesizedExpression(other as Expression);
+ return child.DoMatch(unpacked, match);
+ }
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/RefactoringContext.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/RefactoringContext.cs
index 578b5a6..4668715 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/RefactoringContext.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/RefactoringContext.cs
@@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
public abstract TextLocation Location { get; }
- public TypeSystemAstBuilder CreateTypeSytemAstBuilder()
+ public TypeSystemAstBuilder CreateTypeSystemAstBuilder()
{
var csResolver = Resolver.GetResolverStateBefore(GetNode());
return new TypeSystemAstBuilder(csResolver);
@@ -53,13 +53,13 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
public virtual AstType CreateShortType (IType fullType)
{
- var builder = CreateTypeSytemAstBuilder();
+ var builder = CreateTypeSystemAstBuilder();
return builder.ConvertType(fullType);
}
public virtual AstType CreateShortType(string ns, string name, int typeParameterCount = 0)
{
- var builder = CreateTypeSytemAstBuilder();
+ var builder = CreateTypeSystemAstBuilder();
return builder.ConvertType(new TopLevelTypeName(ns, name, typeParameterCount));
}
@@ -87,6 +87,14 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
return RootNode.GetNodeAt<T> (Location);
}
+ public CSharpTypeResolveContext GetTypeResolveContext()
+ {
+ if (UnresolvedFile != null)
+ return UnresolvedFile.GetTypeResolveContext(Compilation, Location);
+ else
+ return null;
+ }
+
#region Text stuff
public virtual TextEditorOptions TextEditorOptions {
get {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs
index 3c90159..38723a1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs
@@ -29,6 +29,8 @@ using System.IO;
using ICSharpCode.NRefactory.Editor;
using ICSharpCode.NRefactory.TypeSystem;
using System.Threading.Tasks;
+using System.Linq;
+using System.Text;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
@@ -176,7 +178,55 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
output.RegisterTrackedSegments(this, startOffset);
CorrectFormatting (null, newNode);
}
-
+
+ /// <summary>
+ /// Changes the modifier of a given entity declaration.
+ /// </summary>
+ /// <param name="entity">The entity.</param>
+ /// <param name="modifiers">The new modifiers.</param>
+ public void ChangeModifier(EntityDeclaration entity, Modifiers modifiers)
+ {
+ var dummyEntity = new MethodDeclaration ();
+ dummyEntity.Modifiers = modifiers;
+
+ int offset;
+ int endOffset;
+
+ if (entity.ModifierTokens.Any ()) {
+ offset = GetCurrentOffset(entity.ModifierTokens.First ().StartLocation);
+ endOffset = GetCurrentOffset(entity.ModifierTokens.Last ().GetNextSibling (s => s.Role != Roles.NewLine && s.Role != Roles.Whitespace).StartLocation);
+ } else {
+ var child = entity.FirstChild;
+ while (child.NodeType == NodeType.Whitespace || child.Role == Roles.Attribute)
+ child = child.NextSibling;
+ offset = endOffset = GetCurrentOffset(entity.StartLocation);
+ }
+
+ var sb = new StringBuilder();
+ foreach (var modifier in dummyEntity.ModifierTokens) {
+ sb.Append(modifier.ToString());
+ sb.Append(' ');
+ }
+
+ Replace(offset, endOffset - offset, sb.ToString());
+ }
+
+
+ /// <summary>
+ /// Adds an attribute section to a given entity.
+ /// </summary>
+ /// <param name="entity">The entity to add the attribute to.</param>
+ /// <param name="attr">The attribute to add.</param>
+ public void AddAttribute(EntityDeclaration entity, AttributeSection attr)
+ {
+ var node = entity.FirstChild;
+ while (node.NodeType == NodeType.Whitespace || node.Role == Roles.Attribute) {
+ node = node.NextSibling;
+ }
+ InsertBefore(node, attr);
+ }
+
+
public virtual Task Link (params AstNode[] nodes)
{
// Default implementation: do nothing
@@ -216,6 +266,29 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
public abstract void Remove (AstNode node, bool removeEmptyLine = true);
+
+ /// <summary>
+ /// Safely removes an attribue from it's section (removes empty sections).
+ /// </summary>
+ /// <param name="attr">The attribute to be removed.</param>
+ public void RemoveAttribute(Attribute attr)
+ {
+ AttributeSection section = (AttributeSection)attr.Parent;
+ if (section.Attributes.Count == 1) {
+ Remove(section);
+ return;
+ }
+
+ var newSection = (AttributeSection)section.Clone();
+ int i = 0;
+ foreach (var a in section.Attributes) {
+ if (a == attr)
+ break;
+ i++;
+ }
+ newSection.Attributes.Remove (newSection.Attributes.ElementAt (i));
+ Replace(section, newSection);
+ }
public abstract void FormatText (IEnumerable<AstNode> nodes);
@@ -346,56 +419,19 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
/// <summary>
- /// Renames the specified entity.
- /// </summary>
- /// <param name='entity'>
- /// The Entity to rename
- /// </param>
- /// <param name='name'>
- /// The new name, if null the user is prompted for a new name.
- /// </param>
- public virtual void Rename(IEntity entity, string name = null)
- {
- }
-
- /// <summary>
- /// Renames the specified entity.
+ /// Renames the specified symbol.
/// </summary>
- /// <param name='type'>
- /// The Entity to rename
+ /// <param name='symbol'>
+ /// The symbol to rename
/// </param>
/// <param name='name'>
/// The new name, if null the user is prompted for a new name.
/// </param>
- public virtual void RenameTypeParameter (IType type, string name = null)
+ public virtual void Rename(ISymbol symbol, string name = null)
{
}
- /// <summary>
- /// Renames the specified variable.
- /// </summary>
- /// <param name='variable'>
- /// The Variable to rename
- /// </param>
- /// <param name='name'>
- /// The new name, if null the user is prompted for a new name.
- /// </param>
- public virtual void Rename(IVariable variable, string name = null)
- {
- }
-
- /// <summary>
- /// Renames the specified namespace.
- /// </summary>
- /// <param name="ns">The namespace</param>
- /// <param name='name'>
- /// The new name, if null the user is prompted for a new name.
- /// </param>
- public virtual void Rename(INamespace ns, string name = null)
- {
- }
-
- public virtual void DoGlobalOperationOn(IEntity entity, Action<RefactoringContext, Script, AstNode> callback, string operationDescripton = null)
+ public virtual void DoGlobalOperationOn(IEnumerable<IEntity> entity, Action<RefactoringContext, Script, IEnumerable<AstNode>> callback, string operationDescripton = null)
{
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Severity.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Severity.cs
deleted file mode 100644
index 33feda5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/Severity.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// Severity.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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;
-
-namespace ICSharpCode.NRefactory.CSharp
-{
- /// <summary>
- /// The severity influences how the task bar reacts on found issues.
- /// </summary>
- public enum Severity
- {
- /// <summary>
- /// None means that the task bar doesn't show the issue.
- /// </summary>
- None,
-
- /// <summary>
- /// Errors are shown in red and that the task bar is in error state if 1 error is found.
- /// </summary>
- Error,
-
- /// <summary>
- /// Warnings are shown in yellow and set the task bar to warning state (if no error is found).
- /// </summary>
- Warning,
-
- /// <summary>
- /// Suggestions are shown in green and doesn't influence the task bar state
- /// </summary>
- Suggestion,
-
- /// <summary>
- /// Hints are shown in blue and doesn't influence the task bar state
- /// </summary>
- Hint
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
index f3ed1e8..a3fa736 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/TypeSystemAstBuilder.cs
@@ -338,7 +338,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
}
- AstType ConvertNamespace(string ns)
+ public AstType ConvertNamespace(string namespaceName)
{
if (resolver != null) {
// Look if there's an alias to the target namespace
@@ -346,27 +346,27 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
for (ResolvedUsingScope usingScope = resolver.CurrentUsingScope; usingScope != null; usingScope = usingScope.Parent) {
foreach (var pair in usingScope.UsingAliases) {
NamespaceResolveResult nrr = pair.Value as NamespaceResolveResult;
- if (nrr != null && nrr.NamespaceName == ns)
+ if (nrr != null && nrr.NamespaceName == namespaceName)
return new SimpleType(pair.Key);
}
}
}
}
- int pos = ns.LastIndexOf('.');
+ int pos = namespaceName.LastIndexOf('.');
if (pos < 0) {
- if (IsValidNamespace(ns)) {
- return new SimpleType(ns);
+ if (IsValidNamespace(namespaceName)) {
+ return new SimpleType(namespaceName);
} else {
return new MemberType {
Target = new SimpleType("global"),
IsDoubleColon = true,
- MemberName = ns
+ MemberName = namespaceName
};
}
} else {
- string parentNamespace = ns.Substring(0, pos);
- string localNamespace = ns.Substring(pos + 1);
+ string parentNamespace = namespaceName.Substring(0, pos);
+ string localNamespace = namespaceName.Substring(pos + 1);
return new MemberType {
Target = ConvertNamespace(parentNamespace),
MemberName = localNamespace
@@ -436,7 +436,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
} else if (rr.IsCompileTimeConstant) {
return ConvertConstantValue(rr.Type, rr.ConstantValue);
} else {
- return new EmptyExpression();
+ return new ErrorExpression();
}
}
@@ -486,27 +486,27 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
if (entity == null)
throw new ArgumentNullException("entity");
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
return ConvertTypeDefinition((ITypeDefinition)entity);
- case EntityType.Field:
+ case SymbolKind.Field:
return ConvertField((IField)entity);
- case EntityType.Property:
+ case SymbolKind.Property:
return ConvertProperty((IProperty)entity);
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
return ConvertIndexer((IProperty)entity);
- case EntityType.Event:
+ case SymbolKind.Event:
return ConvertEvent((IEvent)entity);
- case EntityType.Method:
+ case SymbolKind.Method:
return ConvertMethod((IMethod)entity);
- case EntityType.Operator:
+ case SymbolKind.Operator:
return ConvertOperator((IMethod)entity);
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
return ConvertConstructor((IMethod)entity);
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
return ConvertDestructor((IMethod)entity);
default:
- throw new ArgumentException("Invalid value for EntityType: " + entity.EntityType);
+ throw new ArgumentException("Invalid value for SymbolKind: " + entity.SymbolKind);
}
}
@@ -717,7 +717,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
foreach (IParameter p in method.Parameters) {
decl.Parameters.Add(ConvertParameter(p));
}
- if (method.IsExtensionMethod && decl.Parameters.Any() && decl.Parameters.First().ParameterModifier == ParameterModifier.None)
+ if (method.IsExtensionMethod && method.ReducedFrom == null && decl.Parameters.Any() && decl.Parameters.First().ParameterModifier == ParameterModifier.None)
decl.Parameters.First().ParameterModifier = ParameterModifier.This;
if (this.ShowTypeParameters && this.ShowTypeParameterConstraints && !method.IsOverride && !method.IsExplicitInterfaceImplementation) {
@@ -770,7 +770,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
#endregion
#region Convert Modifiers
- static Modifiers ModifierFromAccessibility(Accessibility accessibility)
+ public static Modifiers ModifierFromAccessibility(Accessibility accessibility)
{
switch (accessibility) {
case Accessibility.Private:
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/VariableReferenceGraph.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/VariableReferenceGraph.cs
index 97eb853..236ebbd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/VariableReferenceGraph.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Refactoring/VariableReferenceGraph.cs
@@ -362,10 +362,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
}
- public override void VisitEmptyExpression (EmptyExpression emptyExpression)
- {
- }
-
#endregion
public override void VisitAssignmentExpression (AssignmentExpression assignmentExpression)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs
index b2af066..0893b18 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs
@@ -166,7 +166,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
try {
ResolveResult rr = resolveVisitor.GetResolveResult(node);
if (rr == null)
- Debug.Fail (node.GetType () + " resolved to null.", node.StartLocation + ":'" + node.GetText () + "'");
+ Debug.Fail (node.GetType () + " resolved to null.", node.StartLocation + ":'" + node.ToString () + "'");
return rr;
} finally {
resolveVisitor.cancellationToken = CancellationToken.None;
@@ -231,7 +231,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
ResolveVisitor.ConversionWithTargetType GetConversionWithTargetType(Expression expr, CancellationToken cancellationToken)
{
if (expr == null || expr.IsNull)
- throw new ArgumentNullException("expr");
+ return new ResolveVisitor.ConversionWithTargetType(Conversion.None, SpecialType.UnknownType);
lock (resolveVisitor) {
InitResolver();
resolveVisitor.cancellationToken = cancellationToken;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpConversions.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpConversions.cs
index 248357e..bc11a64 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpConversions.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpConversions.cs
@@ -1007,7 +1007,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
IParameter pF = f.Parameters[i];
if (pD.IsRef != pF.IsRef || pD.IsOut != pF.IsOut)
return Conversion.None;
- if (!dParamTypes[i].Equals(pF.Type))
+ if (!IdentityConversion(dParamTypes[i], pF.Type))
return Conversion.None;
}
}
@@ -1062,16 +1062,35 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
var thisRR = rr.TargetResult as ThisResolveResult;
bool isVirtual = method.IsOverridable && !(thisRR != null && thisRR.CausesNonVirtualInvocation);
bool isValid = !or.IsAmbiguous && IsDelegateCompatible(method, invoke, or.IsExtensionMethodInvocation);
+ bool delegateCapturesFirstArgument = or.IsExtensionMethodInvocation || !method.IsStatic;
if (isValid)
- return Conversion.MethodGroupConversion(method, isVirtual);
+ return Conversion.MethodGroupConversion(method, isVirtual, delegateCapturesFirstArgument);
else
- return Conversion.InvalidMethodGroupConversion(method, isVirtual);
+ return Conversion.InvalidMethodGroupConversion(method, isVirtual, delegateCapturesFirstArgument);
} else {
return Conversion.None;
}
}
/// <summary>
+ /// Gets whether a <paramref name="method"/> is compatible with a delegate type.
+ /// §15.2 Delegate compatibility
+ /// </summary>
+ /// <param name="method">The method to test for compatibility</param>
+ /// <param name="delegateType">The delegate type</param>
+ public bool IsDelegateCompatible(IMethod method, IType delegateType)
+ {
+ if (method == null)
+ throw new ArgumentNullException("method");
+ if (delegateType == null)
+ throw new ArgumentNullException("delegateType");
+ IMethod invoke = delegateType.GetDelegateInvokeMethod();
+ if (invoke == null)
+ return false;
+ return IsDelegateCompatible(method, invoke, false);
+ }
+
+ /// <summary>
/// Gets whether a method <paramref name="m"/> is compatible with a delegate type.
/// §15.2 Delegate compatibility
/// </summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpOperators.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpOperators.cs
index b869388..ea2d9cb 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpOperators.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpOperators.cs
@@ -147,6 +147,11 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
get { return false; }
}
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.Operator; }
+ }
+
+ [Obsolete("Use the SymbolKind property instead.")]
EntityType IEntity.EntityType {
get { return EntityType.Operator; }
}
@@ -243,7 +248,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
get { return "operator"; }
}
- string INamedElement.Name {
+ public string Name {
get { return "operator"; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs
index 96392bb..34fd5c2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs
@@ -1696,7 +1696,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public MemberLookup CreateMemberLookup()
{
ITypeDefinition currentTypeDefinition = this.CurrentTypeDefinition;
- bool isInEnumMemberInitializer = this.CurrentMember != null && this.CurrentMember.EntityType == EntityType.Field
+ bool isInEnumMemberInitializer = this.CurrentMember != null && this.CurrentMember.SymbolKind == SymbolKind.Field
&& currentTypeDefinition != null && currentTypeDefinition.Kind == TypeKind.Enum;
return new MemberLookup(currentTypeDefinition, this.Compilation.MainAssembly, isInEnumMemberInitializer);
}
@@ -2427,32 +2427,40 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public static object GetDefaultValue(IType type)
{
- switch (ReflectionHelper.GetTypeCode(type)) {
- case TypeCode.Boolean:
+ ITypeDefinition typeDef = type.GetDefinition();
+ if (typeDef == null)
+ return null;
+ if (typeDef.Kind == TypeKind.Enum) {
+ typeDef = typeDef.EnumUnderlyingType.GetDefinition();
+ if (typeDef == null)
+ return null;
+ }
+ switch (typeDef.KnownTypeCode) {
+ case KnownTypeCode.Boolean:
return false;
- case TypeCode.Char:
+ case KnownTypeCode.Char:
return '\0';
- case TypeCode.SByte:
+ case KnownTypeCode.SByte:
return (sbyte)0;
- case TypeCode.Byte:
+ case KnownTypeCode.Byte:
return (byte)0;
- case TypeCode.Int16:
+ case KnownTypeCode.Int16:
return (short)0;
- case TypeCode.UInt16:
+ case KnownTypeCode.UInt16:
return (ushort)0;
- case TypeCode.Int32:
+ case KnownTypeCode.Int32:
return 0;
- case TypeCode.UInt32:
+ case KnownTypeCode.UInt32:
return 0U;
- case TypeCode.Int64:
+ case KnownTypeCode.Int64:
return 0L;
- case TypeCode.UInt64:
+ case KnownTypeCode.UInt64:
return 0UL;
- case TypeCode.Single:
+ case KnownTypeCode.Single:
return 0f;
- case TypeCode.Double:
+ case KnownTypeCode.Double:
return 0.0;
- case TypeCode.Decimal:
+ case KnownTypeCode.Decimal:
return 0m;
default:
return null;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/FindReferences.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/FindReferences.cs
index 7ba41a9..29b656d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/FindReferences.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/FindReferences.cs
@@ -21,6 +21,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
+using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.NRefactory.CSharp.Refactoring;
using ICSharpCode.NRefactory.CSharp.TypeSystem;
using ICSharpCode.NRefactory.Semantics;
@@ -72,6 +73,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// </summary>
public bool WholeVirtualSlot { get; set; }
+ //public bool FindAllOverloads { get; set; }
+
/// <summary>
/// Specifies whether to look for references in documentation comments.
/// This will find entity references in <c>cref</c> attributes and
@@ -218,57 +221,64 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
#endregion
#region GetSearchScopes
- public IList<IFindReferenceSearchScope> GetSearchScopes(IEntity entity)
+ public IList<IFindReferenceSearchScope> GetSearchScopes(ISymbol symbol)
{
+ if (symbol == null)
+ throw new ArgumentNullException("symbol");
+ switch (symbol.SymbolKind) {
+ case SymbolKind.Namespace:
+ return new[] { GetSearchScopeForNamespace((INamespace)symbol) };
+ case SymbolKind.TypeParameter:
+ return new[] { GetSearchScopeForTypeParameter((ITypeParameter)symbol) };
+ }
+ IEntity entity = symbol as IEntity;
if (entity == null)
- throw new ArgumentNullException("entity");
+ throw new NotSupportedException("Unsupported symbol type");
if (entity is IMember)
entity = NormalizeMember((IMember)entity);
Accessibility effectiveAccessibility = GetEffectiveAccessibility(entity);
- ITypeDefinition topLevelTypeDefinition = entity.DeclaringTypeDefinition;
- while (topLevelTypeDefinition != null && topLevelTypeDefinition.DeclaringTypeDefinition != null)
- topLevelTypeDefinition = topLevelTypeDefinition.DeclaringTypeDefinition;
+ var topLevelTypeDefinition = GetTopLevelTypeDefinition(entity);
SearchScope scope;
SearchScope additionalScope = null;
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
scope = FindTypeDefinitionReferences((ITypeDefinition)entity, this.FindTypeReferencesEvenIfAliased, out additionalScope);
break;
- case EntityType.Field:
+ case SymbolKind.Field:
if (entity.DeclaringTypeDefinition != null && entity.DeclaringTypeDefinition.Kind == TypeKind.Enum)
scope = FindMemberReferences(entity, m => new FindEnumMemberReferences((IField)m));
else
scope = FindMemberReferences(entity, m => new FindFieldReferences((IField)m));
break;
- case EntityType.Property:
+ case SymbolKind.Property:
scope = FindMemberReferences(entity, m => new FindPropertyReferences((IProperty)m));
if (entity.Name == "Current")
additionalScope = FindEnumeratorCurrentReferences((IProperty)entity);
else if (entity.Name == "IsCompleted")
additionalScope = FindAwaiterIsCompletedReferences((IProperty)entity);
break;
- case EntityType.Event:
+ case SymbolKind.Event:
scope = FindMemberReferences(entity, m => new FindEventReferences((IEvent)m));
break;
- case EntityType.Method:
+ case SymbolKind.Method:
scope = GetSearchScopeForMethod((IMethod)entity);
break;
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
scope = FindIndexerReferences((IProperty)entity);
break;
- case EntityType.Operator:
+ case SymbolKind.Operator:
scope = GetSearchScopeForOperator((IMethod)entity);
break;
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
IMethod ctor = (IMethod)entity;
scope = FindObjectCreateReferences(ctor);
additionalScope = FindChainedConstructorReferences(ctor);
break;
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
scope = GetSearchScopeForDestructor((IMethod)entity);
break;
default:
- throw new ArgumentException("Unknown entity type " + entity.EntityType);
+ throw new ArgumentException("Unknown entity type " + entity.SymbolKind);
}
if (scope.accessibility == Accessibility.None)
scope.accessibility = effectiveAccessibility;
@@ -287,13 +297,22 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
}
- public IList<IFindReferenceSearchScope> GetSearchScopes(INamespace ns)
+ public IList<IFindReferenceSearchScope> GetSearchScopes(IEnumerable<ISymbol> symbols)
{
- if (ns == null)
- throw new ArgumentNullException("ns");
- return new[] { GetSearchScopeForNamespace(ns) };
+ if (symbols == null)
+ throw new ArgumentNullException("symbols");
+ return symbols.SelectMany(GetSearchScopes).ToList();
+ }
+
+ static ITypeDefinition GetTopLevelTypeDefinition(IEntity entity)
+ {
+ if (entity == null)
+ return null;
+ ITypeDefinition topLevelTypeDefinition = entity.DeclaringTypeDefinition;
+ while (topLevelTypeDefinition != null && topLevelTypeDefinition.DeclaringTypeDefinition != null)
+ topLevelTypeDefinition = topLevelTypeDefinition.DeclaringTypeDefinition;
+ return topLevelTypeDefinition;
}
-
#endregion
#region GetInterestingFileNames
@@ -362,6 +381,36 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// Finds all references in the given file.
/// </summary>
/// <param name="searchScope">The search scope for which to look.</param>
+ /// <param name="resolver">AST resolver for the file to search in.</param>
+ /// <param name="callback">Callback used to report the references that were found.</param>
+ /// <param name="cancellationToken">CancellationToken that may be used to cancel the operation.</param>
+ public void FindReferencesInFile(IFindReferenceSearchScope searchScope, CSharpAstResolver resolver,
+ FoundReferenceCallback callback, CancellationToken cancellationToken)
+ {
+ if (resolver == null)
+ throw new ArgumentNullException("resolver");
+ FindReferencesInFile(searchScope, resolver.UnresolvedFile, (SyntaxTree)resolver.RootNode, resolver.Compilation, callback, cancellationToken);
+ }
+
+ /// <summary>
+ /// Finds all references in the given file.
+ /// </summary>
+ /// <param name="searchScopes">The search scopes for which to look.</param>
+ /// <param name="resolver">AST resolver for the file to search in.</param>
+ /// <param name="callback">Callback used to report the references that were found.</param>
+ /// <param name="cancellationToken">CancellationToken that may be used to cancel the operation.</param>
+ public void FindReferencesInFile(IList<IFindReferenceSearchScope> searchScopes, CSharpAstResolver resolver,
+ FoundReferenceCallback callback, CancellationToken cancellationToken)
+ {
+ if (resolver == null)
+ throw new ArgumentNullException("resolver");
+ FindReferencesInFile(searchScopes, resolver.UnresolvedFile, (SyntaxTree)resolver.RootNode, resolver.Compilation, callback, cancellationToken);
+ }
+
+ /// <summary>
+ /// Finds all references in the given file.
+ /// </summary>
+ /// <param name="searchScope">The search scope for which to look.</param>
/// <param name="unresolvedFile">The type system representation of the file being searched.</param>
/// <param name="syntaxTree">The syntax tree of the file being searched.</param>
/// <param name="compilation">The compilation for the project that contains the file.</param>
@@ -422,6 +471,79 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
#endregion
+ #region RenameReferencesInFile
+
+ AstNode GetNodeToReplace(AstNode node)
+ {
+ if (node is ConstructorInitializer)
+ return null;
+ if (node is ObjectCreateExpression)
+ node = ((ObjectCreateExpression)node).Type;
+
+ if (node is InvocationExpression)
+ node = ((InvocationExpression)node).Target;
+
+ if (node is MemberReferenceExpression)
+ node = ((MemberReferenceExpression)node).MemberNameToken;
+
+ if (node is SimpleType)
+ node = ((SimpleType)node).IdentifierToken;
+
+ if (node is MemberType)
+ node = ((MemberType)node).MemberNameToken;
+
+ if (node is NamespaceDeclaration) {
+// var nsd = ((NamespaceDeclaration)node);
+// node = nsd.Identifiers.LastOrDefault (n => n.Name == memberName) ?? nsd.Identifiers.FirstOrDefault ();
+// if (node == null)
+ return null;
+ }
+
+ if (node is TypeDeclaration)
+ node = ((TypeDeclaration)node).NameToken;
+ if (node is DelegateDeclaration)
+ node = ((DelegateDeclaration)node).NameToken;
+
+ if (node is EntityDeclaration)
+ node = ((EntityDeclaration)node).NameToken;
+
+ if (node is ParameterDeclaration)
+ node = ((ParameterDeclaration)node).NameToken;
+ if (node is ConstructorDeclaration)
+ node = ((ConstructorDeclaration)node).NameToken;
+ if (node is DestructorDeclaration)
+ node = ((DestructorDeclaration)node).NameToken;
+ if (node is NamedArgumentExpression)
+ node = ((NamedArgumentExpression)node).NameToken;
+ if (node is NamedExpression)
+ node = ((NamedExpression)node).NameToken;
+ if (node is VariableInitializer)
+ node = ((VariableInitializer)node).NameToken;
+
+ if (node is IdentifierExpression) {
+ node = ((IdentifierExpression)node).IdentifierToken;
+ }
+ return node;
+ }
+
+ public void RenameReferencesInFile(IList<IFindReferenceSearchScope> searchScopes, string newName, CSharpAstResolver resolver,
+ Action<RenameCallbackArguments> callback, Action<Error> errorCallback, CancellationToken cancellationToken = default (CancellationToken))
+ {
+ FindReferencesInFile(
+ searchScopes,
+ resolver,
+ delegate(AstNode astNode, ResolveResult result) {
+ var nodeToReplace = GetNodeToReplace(astNode);
+ if (nodeToReplace == null) {
+ errorCallback (new Error (ErrorType.Error, "no node to replace found."));
+ return;
+ }
+ callback (new RenameCallbackArguments(nodeToReplace, Identifier.Create(newName)));
+ },
+ cancellationToken);
+ }
+ #endregion
+
#region Find TypeDefinition References
SearchScope FindTypeDefinitionReferences(ITypeDefinition typeDefinition, bool findTypeReferencesEvenIfAliased, out SearchScope additionalScope)
{
@@ -841,8 +963,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
var arr = rr as AwaitResolveResult;
if (arr != null) {
return IsMatch(arr.GetAwaiterInvocation)
- || (arr.GetResultMethod != null && findReferences.IsMemberMatch(method, arr.GetResultMethod, true))
- || (arr.OnCompletedMethod != null && findReferences.IsMemberMatch(method, arr.OnCompletedMethod, true));
+ || (arr.GetResultMethod != null && findReferences.IsMemberMatch(method, arr.GetResultMethod, true))
+ || (arr.OnCompletedMethod != null && findReferences.IsMemberMatch(method, arr.OnCompletedMethod, true));
}
}
var mrr = rr as MemberResolveResult;
@@ -1088,7 +1210,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
internal override bool IsMatch(ResolveResult rr)
{
ConversionResolveResult crr = rr as ConversionResolveResult;
- return crr != null && crr.Conversion.IsUserDefined
+ return crr != null && crr.Conversion.IsUserDefined
&& findReferences.IsMemberMatch(op, crr.Conversion.Method, crr.Conversion.IsVirtualMethodLookup);
}
}
@@ -1280,8 +1402,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// <param name="compilation">The compilation.</param>
/// <param name="callback">Callback used to report the references that were found.</param>
/// <param name="cancellationToken">Cancellation token that may be used to cancel the operation.</param>
+ [Obsolete("Use GetSearchScopes(typeParameter) instead")]
public void FindTypeParameterReferences(IType typeParameter, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree,
- ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken)
+ ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken)
{
if (typeParameter == null)
throw new ArgumentNullException("typeParameter");
@@ -1293,6 +1416,17 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
FindReferencesInFile(searchScope, unresolvedFile, syntaxTree, compilation, callback, cancellationToken);
}
+ SearchScope GetSearchScopeForTypeParameter(ITypeParameter tp)
+ {
+ var searchScope = new SearchScope(c => new FindTypeParameterReferencesNavigator(tp));
+ var compilationProvider = tp as ICompilationProvider;
+ if (compilationProvider != null)
+ searchScope.declarationCompilation = compilationProvider.Compilation;
+ searchScope.topLevelTypeDefinition = GetTopLevelTypeDefinition(tp.Owner);
+ searchScope.accessibility = Accessibility.Private;
+ return searchScope;
+ }
+
class FindTypeParameterReferencesNavigator : FindReferenceNavigator
{
readonly ITypeParameter typeParameter;
@@ -1320,14 +1454,14 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
}
#endregion
-
+
#region Find Namespace References
SearchScope GetSearchScopeForNamespace(INamespace ns)
{
var scope = new SearchScope (
delegate (ICompilation compilation) {
- return new FindNamespaceNavigator (ns);
- }
+ return new FindNamespaceNavigator (ns);
+ }
);
return scope;
}
@@ -1352,12 +1486,12 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
return true;
var st = node as SimpleType;
- if (st != null && st.Identifier == ns.Name)
- return true;
+ if (st != null && st.Identifier == ns.Name)
+ return !st.AncestorsAndSelf.TakeWhile (n => n is AstType).Any (m => m.Role == NamespaceDeclaration.NamespaceNameRole);
var mt = node as MemberType;
if (mt != null && mt.MemberName == ns.Name)
- return true;
+ return !mt.AncestorsAndSelf.TakeWhile (n => n is AstType).Any (m => m.Role == NamespaceDeclaration.NamespaceNameRole);
var identifer = node as IdentifierExpression;
if (identifer != null && identifer.Identifier == ns.Name)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs
index 2641fbf..850fc65 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs
@@ -60,6 +60,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// <summary>
/// Gets the return type inferred when the parameter types are inferred to be <paramref name="parameterTypes"/>
/// </summary>
+ /// <remarks>
+ /// This method determines the return type inferred from the lambda body, which is used as part of C# type inference.
+ /// Use the <see cref="ReturnType"/> property to retrieve the actual return type as determined by the target delegate type.
+ /// </remarks>
public abstract IType GetInferredReturnType(IType[] parameterTypes);
/// <summary>
@@ -68,6 +72,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public abstract IList<IParameter> Parameters { get; }
/// <summary>
+ /// Gets the return type of the lambda.
+ ///
+ /// If the lambda is async, the return type includes <code>Task<T></code>
+ /// </summary>
+ public abstract IType ReturnType { get; }
+
+ /// <summary>
/// Gets whether the lambda body is valid for the given parameter types and return type.
/// </summary>
/// <returns>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs
index d87982b..e393211 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs
@@ -83,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// <param name="allowProtectedAccess">
/// Whether protected access to instance members is allowed.
/// True if the type of the reference is derived from the current class.
- /// Protected static members may be accessibe even if false is passed for this parameter.
+ /// Protected static members may be accessible even if false is passed for this parameter.
/// </param>
public bool IsAccessible(IEntity entity, bool allowProtectedAccess)
{
@@ -124,7 +124,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
// For static members and type definitions, we do not require the qualifying reference
// to be derived from the current class (allowProtectedAccess).
- if (entity.IsStatic || entity.EntityType == EntityType.TypeDefinition)
+ if (entity.IsStatic || entity.SymbolKind == SymbolKind.TypeDefinition)
allowProtectedAccess = true;
for (var t = currentTypeDefinition; t != null; t = t.DeclaringTypeDefinition) {
@@ -338,8 +338,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
};
Predicate<IUnresolvedMember> memberFilter = delegate(IUnresolvedMember entity) {
// NOTE: Atm destructors can be looked up with 'Finalize'
- return entity.EntityType != EntityType.Indexer &&
- entity.EntityType != EntityType.Operator &&
+ return entity.SymbolKind != SymbolKind.Indexer &&
+ entity.SymbolKind != SymbolKind.Operator &&
entity.Name == name;
};
@@ -531,7 +531,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
} else {
// If the member type matches, replace it with the override
- if (lookupGroup.NonMethod != null && lookupGroup.NonMethod.EntityType == member.EntityType) {
+ if (lookupGroup.NonMethod != null && lookupGroup.NonMethod.SymbolKind == member.SymbolKind) {
lookupGroup.NonMethod = member;
replacedVirtualMemberWithOverride = true;
break;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs
index 53cbcae..f08c679 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs
@@ -887,7 +887,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// Wrap argument in ConversionResolveResult
IType parameterType = bestCandidate.ParameterTypes[parameterIndex];
if (parameterType.Kind != TypeKind.Unknown) {
- if (arguments[i].IsCompileTimeConstant && conversions[i] != Conversion.None) {
+ if (arguments[i].IsCompileTimeConstant && conversions[i].IsValid && !conversions[i].IsUserDefined) {
argument = new CSharpResolver(compilation).WithCheckForOverflow(CheckForOverflow).ResolveCast(parameterType, argument);
} else {
argument = new ConversionResolveResult(parameterType, argument, conversions[i], CheckForOverflow);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ReducedExtensionMethod.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ReducedExtensionMethod.cs
index 86bfbcc..0f161bf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ReducedExtensionMethod.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ReducedExtensionMethod.cs
@@ -267,12 +267,19 @@ namespace ICSharpCode.NRefactory.CSharp
#region IEntity implementation
+ public SymbolKind SymbolKind {
+ get {
+ return baseMethod.SymbolKind;
+ }
+ }
+
+ [Obsolete("Use the SymbolKind property instead.")]
public EntityType EntityType {
get {
return baseMethod.EntityType;
}
}
-
+
public DomRegion Region {
get {
return baseMethod.Region;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/RenameCallbackArguments.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/RenameCallbackArguments.cs
new file mode 100644
index 0000000..9be5162
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/RenameCallbackArguments.cs
@@ -0,0 +1,31 @@
+/*
+ * Created by SharpDevelop.
+ * User: Daniel
+ * Date: 6/13/2013
+ * Time: 17:50
+ *
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+
+namespace ICSharpCode.NRefactory.CSharp.Resolver
+{
+ /// <summary>
+ /// Arguments for the callback of <see cref="FindReferences.RenameReferencesInFile"/>.
+ /// </summary>
+ public class RenameCallbackArguments
+ {
+ public AstNode NodeToReplace { get; private set; }
+ public AstNode NewNode { get; private set; }
+
+ public RenameCallbackArguments(AstNode nodeToReplace, AstNode newNode)
+ {
+ if (nodeToReplace == null)
+ throw new ArgumentNullException("nodeToReplace");
+ if (newNode == null)
+ throw new ArgumentNullException("newNode");
+ this.NodeToReplace = nodeToReplace;
+ this.NewNode = newNode;
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs
index 13bbef3..0809f32 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs
@@ -582,14 +582,14 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// For all but the last identifier:
UsingScope usingScope;
for (int i = 0; i < identifiers.Count - 1; i++) {
- usingScope = new UsingScope(resolver.CurrentUsingScope.UnresolvedUsingScope, identifiers[i].Name);
+ usingScope = new UsingScope(resolver.CurrentUsingScope.UnresolvedUsingScope, identifiers[i]);
usingScope.Region = region;
PushUsingScope(usingScope);
}
// Last using scope:
- usingScope = new UsingScope(resolver.CurrentUsingScope.UnresolvedUsingScope, identifiers.Last().Name);
+ usingScope = new UsingScope(resolver.CurrentUsingScope.UnresolvedUsingScope, identifiers.Last());
usingScope.Region = region;
- var cv = new TypeSystemConvertVisitor(new CSharpUnresolvedFile(region.FileName ?? string.Empty), usingScope);
+ var cv = new TypeSystemConvertVisitor(new CSharpUnresolvedFile(), usingScope);
ApplyVisitorToUsings(cv, namespaceDeclaration.Children);
PushUsingScope(usingScope);
}
@@ -653,31 +653,31 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
#region Track CurrentMember
ResolveResult IAstVisitor<ResolveResult>.VisitFieldDeclaration(FieldDeclaration fieldDeclaration)
{
- return VisitFieldOrEventDeclaration(fieldDeclaration, EntityType.Field);
+ return VisitFieldOrEventDeclaration(fieldDeclaration, SymbolKind.Field);
}
ResolveResult IAstVisitor<ResolveResult>.VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
{
- return VisitFieldOrEventDeclaration(fixedFieldDeclaration, EntityType.Field);
+ return VisitFieldOrEventDeclaration(fixedFieldDeclaration, SymbolKind.Field);
}
ResolveResult IAstVisitor<ResolveResult>.VisitEventDeclaration(EventDeclaration eventDeclaration)
{
- return VisitFieldOrEventDeclaration(eventDeclaration, EntityType.Event);
+ return VisitFieldOrEventDeclaration(eventDeclaration, SymbolKind.Event);
}
- ResolveResult VisitFieldOrEventDeclaration(EntityDeclaration fieldOrEventDeclaration, EntityType entityType)
+ ResolveResult VisitFieldOrEventDeclaration(EntityDeclaration fieldOrEventDeclaration, SymbolKind symbolKind)
{
//int initializerCount = fieldOrEventDeclaration.GetChildrenByRole(Roles.Variable).Count;
CSharpResolver oldResolver = resolver;
for (AstNode node = fieldOrEventDeclaration.FirstChild; node != null; node = node.NextSibling) {
- if (node.Role == Roles.Variable) {
+ if (node.Role == Roles.Variable || node.Role == FixedFieldDeclaration.VariableRole) {
IMember member;
if (unresolvedFile != null) {
member = GetMemberFromLocation(node);
} else {
string name = ((VariableInitializer)node).Name;
- member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, entityType, name);
+ member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, symbolKind, name);
}
resolver = resolver.WithCurrentMember(member);
@@ -797,15 +797,15 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
member = GetMemberFromLocation(memberDeclaration);
} else {
// Re-discover the method:
- EntityType entityType = memberDeclaration.EntityType;
+ SymbolKind symbolKind = memberDeclaration.SymbolKind;
var parameterTypes = TypeSystemConvertVisitor.GetParameterTypes(memberDeclaration.GetChildrenByRole(Roles.Parameter), InterningProvider.Dummy);
- if (entityType == EntityType.Constructor) {
+ if (symbolKind == SymbolKind.Constructor) {
string name = memberDeclaration.HasModifier(Modifiers.Static) ? ".cctor" : ".ctor";
member = AbstractUnresolvedMember.Resolve(
- resolver.CurrentTypeResolveContext, entityType, name,
+ resolver.CurrentTypeResolveContext, symbolKind, name,
parameterTypeReferences: parameterTypes);
- } else if (entityType == EntityType.Destructor) {
- member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, entityType, "Finalize");
+ } else if (symbolKind == SymbolKind.Destructor) {
+ member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, symbolKind, "Finalize");
} else {
string[] typeParameterNames = memberDeclaration.GetChildrenByRole(Roles.TypeParameter).Select(tp => tp.Name).ToArray();
AstType explicitInterfaceAstType = memberDeclaration.GetChildByRole(EntityDeclaration.PrivateImplementationTypeRole);
@@ -814,7 +814,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
explicitInterfaceType = explicitInterfaceAstType.ToTypeReference();
}
member = AbstractUnresolvedMember.Resolve(
- resolver.CurrentTypeResolveContext, entityType, memberDeclaration.Name,
+ resolver.CurrentTypeResolveContext, symbolKind, memberDeclaration.Name,
explicitInterfaceType, typeParameterNames, parameterTypes);
}
}
@@ -868,7 +868,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
explicitInterfaceType = explicitInterfaceAstType.ToTypeReference();
}
member = AbstractUnresolvedMember.Resolve(
- resolver.CurrentTypeResolveContext, propertyOrIndexerDeclaration.EntityType, name,
+ resolver.CurrentTypeResolveContext, propertyOrIndexerDeclaration.SymbolKind, name,
explicitInterfaceType, parameterTypeReferences: parameterTypeReferences);
}
// We need to use the property as current member so that indexer parameters can be resolved correctly.
@@ -918,9 +918,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
string name = eventDeclaration.Name;
AstType explicitInterfaceAstType = eventDeclaration.PrivateImplementationType;
if (explicitInterfaceAstType.IsNull) {
- member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, EntityType.Event, name);
+ member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, SymbolKind.Event, name);
} else {
- member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, EntityType.Event, name,
+ member = AbstractUnresolvedMember.Resolve(resolver.CurrentTypeResolveContext, SymbolKind.Event, name,
explicitInterfaceAstType.ToTypeReference());
}
}
@@ -1169,7 +1169,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
Name = "get_" + name,
Accessibility = Accessibility.Public,
ReturnType = returnTypeRef,
- EntityType = EntityType.Accessor,
+ SymbolKind = SymbolKind.Accessor,
AccessorOwner = property
};
unresolvedProperties.Add(property);
@@ -1434,11 +1434,6 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
}
- ResolveResult IAstVisitor<ResolveResult>.VisitEmptyExpression(EmptyExpression emptyExpression)
- {
- return errorResult;
- }
-
ResolveResult IAstVisitor<ResolveResult>.VisitIndexerExpression(IndexerExpression indexerExpression)
{
if (resolverEnabled || NeedsResolvingDueToNamedArguments(indexerExpression)) {
@@ -1963,7 +1958,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (pd.ParameterModifier == ParameterModifier.Ref || pd.ParameterModifier == ParameterModifier.Out)
type = new ByReferenceType(type);
- IParameter p = new DefaultParameter(type, pd.Name, MakeRegion(pd),
+ IParameter p = new DefaultParameter(type, pd.Name,
+ region: MakeRegion(pd),
isRef: pd.ParameterModifier == ParameterModifier.Ref,
isOut: pd.ParameterModifier == ParameterModifier.Out);
// The parameter declaration must be scanned in the current context (without the new parameter)
@@ -2010,7 +2006,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
bool isEndpointUnreachable;
// The actual return type is set when the lambda is applied by the conversion.
- // For async lambdas, this is the unpacked task type
+ // For async lambdas, this includes the task type
IType actualReturnType;
internal override bool IsUndecided {
@@ -2034,10 +2030,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
Analyze();
if (returnValues.Count == 1) {
bodyRR = returnValues[0];
- if (actualReturnType.Kind != TypeKind.Void) {
- var conv = storedContext.conversions.ImplicitConversion(bodyRR, actualReturnType);
- if (!conv.IsIdentityConversion)
- bodyRR = new ConversionResolveResult(actualReturnType, bodyRR, conv, storedContext.CheckForOverflow);
+ if (actualReturnType != null) {
+ IType unpackedActualReturnType = isAsync ? visitor.UnpackTask(actualReturnType) : actualReturnType;
+ if (unpackedActualReturnType.Kind != TypeKind.Void) {
+ var conv = storedContext.conversions.ImplicitConversion(bodyRR, unpackedActualReturnType);
+ if (!conv.IsIdentityConversion)
+ bodyRR = new ConversionResolveResult(unpackedActualReturnType, bodyRR, conv, storedContext.CheckForOverflow);
+ }
}
return bodyRR;
}
@@ -2107,6 +2106,12 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
return inferredReturnType;
}
+ public override IType ReturnType {
+ get {
+ return actualReturnType ?? SpecialType.UnknownType;
+ }
+ }
+
public override bool IsImplicitlyTyped {
get { return false; }
}
@@ -2136,8 +2141,6 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// Explicitly typed lambdas do not use a nested visitor
throw new InvalidOperationException();
}
- if (isAsync)
- returnType = parentVisitor.UnpackTask(returnType);
if (actualReturnType != null) {
if (actualReturnType.Equals(returnType))
return; // return type already set
@@ -2146,10 +2149,11 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
actualReturnType = returnType;
visitor.undecidedLambdas.Remove(this);
Analyze();
- Log.WriteLine("Applying return type {0} to explicitly-typed lambda {1}", returnType, this.LambdaExpression);
- if (returnType.Kind != TypeKind.Void) {
+ IType unpackedReturnType = isAsync ? visitor.UnpackTask(returnType) : returnType;
+ Log.WriteLine("Applying return type {0} to explicitly-typed lambda {1}", unpackedReturnType, this.LambdaExpression);
+ if (unpackedReturnType.Kind != TypeKind.Void) {
for (int i = 0; i < returnExpressions.Count; i++) {
- visitor.ProcessConversion(returnExpressions[i], returnValues[i], returnType);
+ visitor.ProcessConversion(returnExpressions[i], returnValues[i], unpackedReturnType);
}
}
}
@@ -2192,6 +2196,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
readonly List<LambdaTypeHypothesis> hypotheses = new List<LambdaTypeHypothesis>();
internal IList<IParameter> parameters = new List<IParameter>();
+ internal IType actualReturnType;
internal LambdaTypeHypothesis winningHypothesis;
internal ResolveResult bodyResult;
internal readonly ResolveVisitor parentVisitor;
@@ -2235,7 +2240,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
this.lambda = lambda;
foreach (var pd in lambda.Parameters) {
- parameters.Add(new DefaultParameter(SpecialType.UnknownType, pd.Name, parentVisitor.MakeRegion(pd)));
+ parameters.Add(new DefaultParameter(SpecialType.UnknownType, pd.Name, region: parentVisitor.MakeRegion(pd)));
}
RegisterUndecidedLambda();
}
@@ -2337,6 +2342,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
GetAnyHypothesis().MergeInto(parentVisitor, SpecialType.UnknownType);
}
+ public override IType ReturnType {
+ get { return actualReturnType ?? SpecialType.UnknownType; }
+ }
+
public override bool IsImplicitlyTyped {
get { return true; }
}
@@ -2401,7 +2410,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (parameterDeclarations != null) {
int i = 0;
foreach (var pd in parameterDeclarations) {
- lambdaParameters[i] = new DefaultParameter(parameterTypes[i], pd.Name, visitor.MakeRegion(pd));
+ lambdaParameters[i] = new DefaultParameter(parameterTypes[i], pd.Name, region: visitor.MakeRegion(pd));
visitor.resolver = visitor.resolver.AddVariable(lambdaParameters[i]);
i++;
visitor.Scan(pd);
@@ -2409,7 +2418,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
} else {
for (int i = 0; i < parameterTypes.Length; i++) {
var p = lambda.Parameters[i];
- lambdaParameters[i] = new DefaultParameter(parameterTypes[i], p.Name, p.Region);
+ lambdaParameters[i] = new DefaultParameter(parameterTypes[i], p.Name, region: p.Region);
visitor.resolver = visitor.resolver.AddVariable(lambdaParameters[i]);
}
}
@@ -2465,6 +2474,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
else if (lambda.winningHypothesis != null)
throw new InvalidOperationException("Trying to merge conflicting hypotheses");
+ lambda.actualReturnType = returnType;
if (lambda.IsAsync)
returnType = parentVisitor.UnpackTask(returnType);
@@ -2472,7 +2482,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
lambda.parameters = lambdaParameters; // replace untyped parameters with typed parameters
if (lambda.BodyExpression is Expression && returnValues.Count == 1) {
lambda.bodyResult = returnValues[0];
- if (!returnType.IsKnownType(KnownTypeCode.Void)) {
+ if (returnType.Kind != TypeKind.Void) {
var conv = storedContext.conversions.ImplicitConversion(lambda.bodyResult, returnType);
if (!conv.IsIdentityConversion)
lambda.bodyResult = new ConversionResolveResult(returnType, lambda.bodyResult, conv, storedContext.CheckForOverflow);
@@ -2628,7 +2638,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
inferredReturnType = resolver.Compilation.FindType(KnownTypeCode.Task);
Log.WriteLine("Lambda return type was inferred to: " + inferredReturnType);
return;
- }
+ }
TypeInference ti = new TypeInference(resolver.Compilation, resolver.conversions);
bool tiSuccess;
@@ -2759,7 +2769,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
var compilation = resolver.Compilation;
ResolveResult expression = Resolve(foreachStatement.InExpression);
- bool isImplicitlyTypedVariable = IsVar(foreachStatement.VariableType);
+ bool isImplicitlyTypedVariable = foreachStatement.VariableType.IsVar();
var memberLookup = resolver.CreateMemberLookup();
IType collectionType, enumeratorType, elementType;
@@ -2934,7 +2944,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
ResolveResult IAstVisitor<ResolveResult>.VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement)
{
bool isConst = (variableDeclarationStatement.Modifiers & Modifiers.Const) != 0;
- if (!isConst && IsVar(variableDeclarationStatement.Type) && variableDeclarationStatement.Variables.Count == 1) {
+ if (!isConst && variableDeclarationStatement.Type.IsVar() && variableDeclarationStatement.Variables.Count == 1) {
VariableInitializer vi = variableDeclarationStatement.Variables.Single();
StoreCurrentState(variableDeclarationStatement.Type);
IType type = Resolve(vi.Initializer).Type;
@@ -3120,12 +3130,6 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
#endregion
#region Local Variable Type Inference
- static bool IsVar(AstNode returnType)
- {
- SimpleType st = returnType as SimpleType;
- return st != null && st.Identifier == "var" && st.TypeArguments.Count == 0;
- }
-
IVariable MakeVariable(IType type, Identifier variableName)
{
return new SimpleVariable(MakeRegion(variableName), type, variableName.Name);
@@ -3151,6 +3155,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
this.name = name;
}
+ public SymbolKind SymbolKind {
+ get { return SymbolKind.Variable; }
+ }
+
public string Name {
get { return name; }
}
@@ -3477,6 +3485,12 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
return bodyExpression.Type;
}
+ public override IType ReturnType {
+ get {
+ return bodyExpression.Type;
+ }
+ }
+
public override string ToString()
{
return string.Format("[QueryExpressionLambda ({0}) => {1}]", string.Join(",", parameters.Select(p => p.Name)), bodyExpression);
@@ -3967,14 +3981,14 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
IType conversionOperatorReturnType = ResolveType(documentationReference.ConversionOperatorReturnType);
IParameter[] parameters = documentationReference.Parameters.Select(ResolveXmlDocParameter).ToArray();
- if (documentationReference.EntityType == EntityType.TypeDefinition) {
+ if (documentationReference.SymbolKind == SymbolKind.TypeDefinition) {
if (declaringTypeDef != null)
return new TypeResolveResult(declaringTypeDef);
else
return errorResult;
}
- if (documentationReference.EntityType == EntityType.None) {
+ if (documentationReference.SymbolKind == SymbolKind.None) {
// might be a type, member or ctor
string memberName = documentationReference.MemberName;
ResolveResult rr;
@@ -4012,10 +4026,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// Indexer or operator
if (declaringTypeDef == null)
return errorResult;
- if (documentationReference.EntityType == EntityType.Indexer) {
+ if (documentationReference.SymbolKind == SymbolKind.Indexer) {
var indexers = declaringTypeDef.Properties.Where(p => p.IsIndexer && !p.IsExplicitInterfaceImplementation);
return FindByParameters(indexers, parameters);
- } else if (documentationReference.EntityType == EntityType.Operator) {
+ } else if (documentationReference.SymbolKind == SymbolKind.Operator) {
var opType = documentationReference.OperatorType;
string memberName = OperatorDeclaration.GetName(opType);
var methods = declaringTypeDef.Methods.Where(m => m.IsOperator && m.Name == memberName);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/TypeInference.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/TypeInference.cs
index 70132fe..abea6ed 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/TypeInference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/TypeInference.cs
@@ -125,7 +125,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
for (int i = 0; i < this.typeParameters.Length; i++) {
if (i != typeParameters[i].Index)
throw new ArgumentException("Type parameter has wrong index");
- if (typeParameters[i].OwnerType != EntityType.Method)
+ if (typeParameters[i].OwnerType != SymbolKind.Method)
throw new ArgumentException("Type parameter must be owned by a method");
this.typeParameters[i] = new TP(typeParameters[i]);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAssembly.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAssembly.cs
index 3dada0d..71f7414 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAssembly.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAssembly.cs
@@ -268,10 +268,14 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
get { return fullName; }
}
- string INamespace.Name {
+ public string Name {
get { return name; }
}
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.Namespace; }
+ }
+
INamespace INamespace.ParentNamespace {
get { return parentNamespace; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAttribute.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAttribute.cs
index e74d936..5af7d8e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAttribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpAttribute.cs
@@ -154,7 +154,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
} else {
namedArgs = new List<KeyValuePair<IMember, ResolveResult>>();
foreach (var pair in unresolved.namedArguments) {
- IMember member = attributeType.GetMembers(m => (m.EntityType == EntityType.Field || m.EntityType == EntityType.Property) && m.Name == pair.Key).FirstOrDefault();
+ IMember member = attributeType.GetMembers(m => (m.SymbolKind == SymbolKind.Field || m.SymbolKind == SymbolKind.Property) && m.Name == pair.Key).FirstOrDefault();
if (member != null) {
ResolveResult val = pair.Value.Resolve(context);
namedArgs.Add(new KeyValuePair<IMember, ResolveResult>(member, val));
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpUnresolvedFile.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpUnresolvedFile.cs
index a3d088b..88f61f1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpUnresolvedFile.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/CSharpUnresolvedFile.cs
@@ -36,8 +36,8 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
// The 'FastSerializerVersion' attribute on CSharpUnresolvedFile must be incremented when fixing
// bugs in the TypeSystemConvertVisitor
- readonly string fileName;
- readonly UsingScope rootUsingScope;
+ string fileName = string.Empty;
+ readonly UsingScope rootUsingScope = new UsingScope();
IList<IUnresolvedTypeDefinition> topLevelTypeDefinitions = new List<IUnresolvedTypeDefinition>();
IList<IUnresolvedAttribute> assemblyAttributes = new List<IUnresolvedAttribute>();
IList<IUnresolvedAttribute> moduleAttributes = new List<IUnresolvedAttribute>();
@@ -55,26 +55,12 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
usingScopes = FreezableHelper.FreezeListAndElements(usingScopes);
}
- public CSharpUnresolvedFile(string fileName)
- {
- if (fileName == null)
- throw new ArgumentNullException("fileName");
- this.fileName = fileName;
- this.rootUsingScope = new UsingScope();
- }
-
- public CSharpUnresolvedFile(string fileName, UsingScope rootUsingScope)
- {
- if (fileName == null)
- throw new ArgumentNullException("fileName");
- if (rootUsingScope == null)
- throw new ArgumentNullException("rootUsingScope");
- this.fileName = fileName;
- this.rootUsingScope = rootUsingScope;
- }
-
public string FileName {
get { return fileName; }
+ set {
+ FreezableHelper.ThrowIfFrozen(this);
+ fileName = value ?? string.Empty;
+ }
}
DateTime? lastWriteTime;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/MethodTypeParameterWithInheritedConstraints.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/MethodTypeParameterWithInheritedConstraints.cs
index 05b01af..fc9e6cd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/MethodTypeParameterWithInheritedConstraints.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/MethodTypeParameterWithInheritedConstraints.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
public sealed class MethodTypeParameterWithInheritedConstraints : DefaultUnresolvedTypeParameter
{
public MethodTypeParameterWithInheritedConstraints(int index, string name)
- : base(EntityType.Method, index, name)
+ : base(SymbolKind.Method, index, name)
{
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/ResolvedUsingScope.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/ResolvedUsingScope.cs
index 026260a..5ea1016 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/ResolvedUsingScope.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/ResolvedUsingScope.cs
@@ -162,10 +162,14 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
get { return NamespaceDeclaration.BuildQualifiedName(parentNamespace.FullName, name); }
}
- string INamespace.Name {
+ public string Name {
get { return name; }
}
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.Namespace; }
+ }
+
INamespace INamespace.ParentNamespace {
get { return parentNamespace; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs
index dd7eb05..880d22b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs
@@ -75,7 +75,8 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
{
if (fileName == null)
throw new ArgumentNullException("fileName");
- this.unresolvedFile = new CSharpUnresolvedFile(fileName);
+ this.unresolvedFile = new CSharpUnresolvedFile();
+ this.unresolvedFile.FileName = fileName;
this.usingScope = unresolvedFile.RootUsingScope;
}
@@ -169,8 +170,8 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
{
DomRegion region = MakeRegion(namespaceDeclaration);
UsingScope previousUsingScope = usingScope;
- foreach (Identifier ident in namespaceDeclaration.Identifiers) {
- usingScope = new UsingScope(usingScope, ident.Name);
+ foreach (var ident in namespaceDeclaration.Identifiers) {
+ usingScope = new UsingScope(usingScope, ident);
usingScope.Region = region;
}
base.VisitNamespaceDeclaration(namespaceDeclaration);
@@ -222,7 +223,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
ConvertAttributes(td.Attributes, typeDeclaration.Attributes);
- ConvertTypeParameters(td.TypeParameters, typeDeclaration.TypeParameters, typeDeclaration.Constraints, EntityType.TypeDefinition);
+ ConvertTypeParameters(td.TypeParameters, typeDeclaration.TypeParameters, typeDeclaration.Constraints, SymbolKind.TypeDefinition);
foreach (AstType baseType in typeDeclaration.BaseTypes) {
td.BaseTypes.Add(ConvertTypeReference(baseType, NameLookupMode.BaseTypeReference));
@@ -248,7 +249,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
ApplyModifiers(td, delegateDeclaration.Modifiers);
td.IsSealed = true; // delegates are implicitly sealed
- ConvertTypeParameters(td.TypeParameters, delegateDeclaration.TypeParameters, delegateDeclaration.Constraints, EntityType.TypeDefinition);
+ ConvertTypeParameters(td.TypeParameters, delegateDeclaration.TypeParameters, delegateDeclaration.Constraints, SymbolKind.TypeDefinition);
ITypeReference returnType = ConvertTypeReference(delegateDeclaration.ReturnType);
List<IUnresolvedParameter> parameters = new List<IUnresolvedParameter>();
@@ -331,7 +332,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
delegateType.Members.Add(endInvoke);
DefaultUnresolvedMethod ctor = new DefaultUnresolvedMethod(delegateType, ".ctor");
- ctor.EntityType = EntityType.Constructor;
+ ctor.SymbolKind = SymbolKind.Constructor;
ctor.Accessibility = Accessibility.Public;
ctor.IsSynthetic = true;
ctor.Parameters.Add(delegateObjectParameter);
@@ -375,8 +376,27 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
public override IUnresolvedEntity VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration)
{
- // TODO: add support for fixed fields
- return base.VisitFixedFieldDeclaration(fixedFieldDeclaration);
+ bool isSingleField = fixedFieldDeclaration.Variables.Count == 1;
+ Modifiers modifiers = fixedFieldDeclaration.Modifiers;
+ DefaultUnresolvedField field = null;
+ foreach (var vi in fixedFieldDeclaration.Variables) {
+ field = new DefaultUnresolvedField(currentTypeDefinition, vi.Name);
+
+ field.Region = isSingleField ? MakeRegion(fixedFieldDeclaration) : MakeRegion(vi);
+ field.BodyRegion = MakeRegion(vi);
+ ConvertAttributes(field.Attributes, fixedFieldDeclaration.Attributes);
+ AddXmlDocumentation(field, fixedFieldDeclaration);
+
+ ApplyModifiers(field, modifiers);
+
+ field.ReturnType = ConvertTypeReference(fixedFieldDeclaration.ReturnType);
+ field.IsFixed = true;
+ field.ConstantValue = ConvertConstantValue(field.ReturnType, vi.CountExpression);
+
+ currentTypeDefinition.Members.Add(field);
+ field.ApplyInterningProvider(interningProvider);
+ }
+ return isSingleField ? field : null;
}
public override IUnresolvedEntity VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration)
@@ -391,7 +411,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
} else {
ITypeReference[] typeArgs = new ITypeReference[currentTypeDefinition.TypeParameters.Count];
for (int i = 0; i < typeArgs.Length; i++) {
- typeArgs[i] = TypeParameterReference.Create(EntityType.TypeDefinition, i);
+ typeArgs[i] = TypeParameterReference.Create(SymbolKind.TypeDefinition, i);
}
field.ReturnType = interningProvider.Intern(new ParameterizedTypeReference(currentTypeDefinition, typeArgs));
}
@@ -434,7 +454,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
m.TypeParameters.Add(tp);
}
} else {
- ConvertTypeParameters(m.TypeParameters, methodDeclaration.TypeParameters, methodDeclaration.Constraints, EntityType.Method);
+ ConvertTypeParameters(m.TypeParameters, methodDeclaration.TypeParameters, methodDeclaration.Constraints, SymbolKind.Method);
}
m.ReturnType = ConvertTypeReference(methodDeclaration.ReturnType);
ConvertAttributes(m.Attributes, methodDeclaration.Attributes.Where(s => s.AttributeTarget != "return"));
@@ -456,7 +476,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
m.IsExplicitInterfaceImplementation = true;
m.ExplicitInterfaceImplementations.Add(
interningProvider.Intern(new DefaultMemberReference(
- m.EntityType,
+ m.SymbolKind,
ConvertTypeReference(methodDeclaration.PrivateImplementationType),
m.Name, m.TypeParameters.Count, GetParameterTypes(m.Parameters))));
}
@@ -487,7 +507,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
}
void ConvertTypeParameters(IList<IUnresolvedTypeParameter> output, AstNodeCollection<TypeParameterDeclaration> typeParameters,
- AstNodeCollection<Constraint> constraints, EntityType ownerType)
+ AstNodeCollection<Constraint> constraints, SymbolKind ownerType)
{
// output might be non-empty when type parameters were copied from an outer class
int index = output.Count;
@@ -517,7 +537,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
continue;
}
}
- var lookupMode = (ownerType == EntityType.TypeDefinition) ? NameLookupMode.BaseTypeReference : NameLookupMode.Type;
+ var lookupMode = (ownerType == SymbolKind.TypeDefinition) ? NameLookupMode.BaseTypeReference : NameLookupMode.Type;
tp.Constraints.Add(ConvertTypeReference(type, lookupMode));
}
break;
@@ -534,7 +554,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
public override IUnresolvedEntity VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration)
{
DefaultUnresolvedMethod m = new DefaultUnresolvedMethod(currentTypeDefinition, operatorDeclaration.Name);
- m.EntityType = EntityType.Operator;
+ m.SymbolKind = SymbolKind.Operator;
m.Region = MakeRegion(operatorDeclaration);
m.BodyRegion = MakeRegion(operatorDeclaration.Body);
AddXmlDocumentation(m, operatorDeclaration);
@@ -560,7 +580,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
Modifiers modifiers = constructorDeclaration.Modifiers;
bool isStatic = (modifiers & Modifiers.Static) != 0;
DefaultUnresolvedMethod ctor = new DefaultUnresolvedMethod(currentTypeDefinition, isStatic ? ".cctor" : ".ctor");
- ctor.EntityType = EntityType.Constructor;
+ ctor.SymbolKind = SymbolKind.Constructor;
ctor.Region = MakeRegion(constructorDeclaration);
if (!constructorDeclaration.Initializer.IsNull) {
ctor.BodyRegion = MakeRegion(constructorDeclaration.Initializer.StartLocation, constructorDeclaration.EndLocation);
@@ -589,7 +609,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
public override IUnresolvedEntity VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration)
{
DefaultUnresolvedMethod dtor = new DefaultUnresolvedMethod(currentTypeDefinition, "Finalize");
- dtor.EntityType = EntityType.Destructor;
+ dtor.SymbolKind = SymbolKind.Destructor;
dtor.Region = MakeRegion(destructorDeclaration);
dtor.BodyRegion = MakeRegion(destructorDeclaration.Body);
dtor.Accessibility = Accessibility.Protected;
@@ -620,7 +640,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
p.Accessibility = Accessibility.None;
p.IsExplicitInterfaceImplementation = true;
p.ExplicitInterfaceImplementations.Add(interningProvider.Intern(new DefaultMemberReference(
- p.EntityType, ConvertTypeReference(propertyDeclaration.PrivateImplementationType), p.Name)));
+ p.SymbolKind, ConvertTypeReference(propertyDeclaration.PrivateImplementationType), p.Name)));
}
bool isExtern = propertyDeclaration.HasModifier(Modifiers.Extern);
p.Getter = ConvertAccessor(propertyDeclaration.Getter, p, "get_", isExtern);
@@ -633,7 +653,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
public override IUnresolvedEntity VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration)
{
DefaultUnresolvedProperty p = new DefaultUnresolvedProperty(currentTypeDefinition, "Item");
- p.EntityType = EntityType.Indexer;
+ p.SymbolKind = SymbolKind.Indexer;
p.Region = MakeRegion(indexerDeclaration);
p.BodyRegion = MakeBraceRegion(indexerDeclaration);
ApplyModifiers(p, indexerDeclaration.Modifiers);
@@ -647,7 +667,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
p.Accessibility = Accessibility.None;
p.IsExplicitInterfaceImplementation = true;
p.ExplicitInterfaceImplementations.Add(interningProvider.Intern(new DefaultMemberReference(
- p.EntityType, indexerDeclaration.PrivateImplementationType.ToTypeReference(), p.Name, 0, GetParameterTypes(p.Parameters))));
+ p.SymbolKind, indexerDeclaration.PrivateImplementationType.ToTypeReference(), p.Name, 0, GetParameterTypes(p.Parameters))));
}
bool isExtern = indexerDeclaration.HasModifier(Modifiers.Extern);
p.Getter = ConvertAccessor(indexerDeclaration.Getter, p, "get_", isExtern);
@@ -663,7 +683,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
if (accessor.IsNull)
return null;
var a = new DefaultUnresolvedMethod(currentTypeDefinition, prefix + p.Name);
- a.EntityType = EntityType.Accessor;
+ a.SymbolKind = SymbolKind.Accessor;
a.AccessorOwner = p;
a.Accessibility = GetAccessibility(accessor.Modifiers) ?? p.Accessibility;
a.IsAbstract = p.IsAbstract;
@@ -679,7 +699,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
// a) there's no body in the code
// b) the member is either abstract or extern
a.HasBody = !(accessor.Body.IsNull && (p.IsAbstract || memberIsExtern));
- if (p.EntityType == EntityType.Indexer) {
+ if (p.SymbolKind == SymbolKind.Indexer) {
foreach (var indexerParam in ((IUnresolvedProperty)p).Parameters)
a.Parameters.Add(indexerParam);
}
@@ -704,7 +724,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
a.IsExplicitInterfaceImplementation = true;
Debug.Assert(p.ExplicitInterfaceImplementations.Count == 1);
a.ExplicitInterfaceImplementations.Add(interningProvider.Intern(new DefaultMemberReference(
- EntityType.Accessor,
+ SymbolKind.Accessor,
p.ExplicitInterfaceImplementations[0].DeclaringTypeReference,
a.Name, 0, GetParameterTypes(a.Parameters)
)));
@@ -756,7 +776,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
DefaultUnresolvedMethod CreateDefaultEventAccessor(IUnresolvedEvent ev, string name, IUnresolvedParameter valueParameter)
{
var a = new DefaultUnresolvedMethod(currentTypeDefinition, name);
- a.EntityType = EntityType.Accessor;
+ a.SymbolKind = SymbolKind.Accessor;
a.AccessorOwner = ev;
a.Region = ev.BodyRegion;
a.BodyRegion = ev.BodyRegion;
@@ -787,7 +807,7 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
e.Accessibility = Accessibility.None;
e.IsExplicitInterfaceImplementation = true;
e.ExplicitInterfaceImplementations.Add(interningProvider.Intern(new DefaultMemberReference(
- e.EntityType, eventDeclaration.PrivateImplementationType.ToTypeReference(), e.Name)));
+ e.SymbolKind, eventDeclaration.PrivateImplementationType.ToTypeReference(), e.Name)));
}
// custom events can't be extern; the non-custom event syntax must be used for extern events
@@ -1179,32 +1199,32 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
{
if (this.SkipXmlDocumentation)
return;
- List<string> documentation = null;
- // traverse AST backwards until the next non-whitespace node
- for (AstNode node = entityDeclaration.PrevSibling; node != null && node.NodeType == NodeType.Whitespace; node = node.PrevSibling) {
+ StringBuilder documentation = null;
+ // traverse children until the first non-whitespace node
+ for (AstNode node = entityDeclaration.FirstChild; node != null && node.NodeType == NodeType.Whitespace; node = node.NextSibling) {
Comment c = node as Comment;
if (c != null && c.IsDocumentation) {
if (documentation == null)
- documentation = new List<string>();
+ documentation = new StringBuilder();
if (c.CommentType == CommentType.MultiLineDocumentation) {
- documentation.Add(PrepareMultilineDocumentation(c.Content));
+ PrepareMultilineDocumentation(c.Content, documentation);
} else {
+ if (documentation.Length > 0)
+ documentation.AppendLine();
if (c.Content.Length > 0 && c.Content[0] == ' ')
- documentation.Add(c.Content.Substring(1));
+ documentation.Append(c.Content.Substring(1));
else
- documentation.Add(c.Content);
+ documentation.Append(c.Content);
}
}
}
if (documentation != null) {
- documentation.Reverse(); // bring documentation in correct order
- unresolvedFile.AddDocumentation(entity, string.Join(Environment.NewLine, documentation));
+ unresolvedFile.AddDocumentation(entity, documentation.ToString());
}
}
- string PrepareMultilineDocumentation(string content)
+ void PrepareMultilineDocumentation(string content, StringBuilder b)
{
- StringBuilder b = new StringBuilder();
using (var reader = new StringReader(content)) {
string firstLine = reader.ReadLine();
// Add first line only if it's not empty:
@@ -1254,7 +1274,6 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
}
}
}
- return b.ToString();
}
#endregion
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Cecil/CecilLoader.cs b/external/nrefactory/ICSharpCode.NRefactory.Cecil/CecilLoader.cs
new file mode 100644
index 0000000..a1feef9
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Cecil/CecilLoader.cs
@@ -0,0 +1,1685 @@
+// Copyright (c) 2010-2013 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.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Threading;
+using ICSharpCode.NRefactory.Documentation;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using ICSharpCode.NRefactory.Utils;
+using Mono.Cecil;
+
+
+namespace ICSharpCode.NRefactory.TypeSystem
+{
+ /// <summary>
+ /// Allows loading an IProjectContent from an already compiled assembly.
+ /// </summary>
+ /// <remarks>Instance methods are not thread-safe; you need to create multiple instances of CecilLoader
+ /// if you want to load multiple project contents in parallel.</remarks>
+ public sealed class CecilLoader : AssemblyLoader
+ {
+ /// <summary>
+ /// Version number of the cecil loader.
+ /// Should be incremented when fixing bugs in the cecil loader so that project contents cached on disk
+ /// (which might be incorrect due to the bug) are re-created.
+ /// </summary>
+ const int cecilLoaderVersion = 1;
+
+ #region Options
+ // Most options are defined in the AssemblyLoader base class
+
+ /// <summary>
+ /// Specifies whether to use lazy loading. The default is false.
+ /// If this property is set to true, the CecilLoader will not copy all the relevant information
+ /// out of the Cecil object model, but will maintain references to the Cecil objects.
+ /// This speeds up the loading process and avoids loading unnecessary information, but it causes
+ /// the Cecil objects to stay in memory (which can significantly increase memory usage).
+ /// It also prevents serialization of the Cecil-loaded type system.
+ /// </summary>
+ /// <remarks>
+ /// Because the type system can be used on multiple threads, but Cecil is not
+ /// thread-safe for concurrent read access, the CecilLoader will lock on the <see cref="ModuleDefinition"/> instance
+ /// for every delay-loading operation.
+ /// If you access the Cecil objects directly in your application, you may need to take the same lock.
+ /// </remarks>
+ public bool LazyLoad { get; set; }
+
+ /// <summary>
+ /// This delegate gets executed whenever an entity was loaded.
+ /// </summary>
+ /// <remarks>
+ /// This callback may be to build a dictionary that maps between
+ /// entities and cecil objects.
+ /// Warning: if delay-loading is used and the type system is accessed by multiple threads,
+ /// the callback may be invoked concurrently on multiple threads.
+ /// </remarks>
+ public Action<IUnresolvedEntity, MemberReference> OnEntityLoaded { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether this instance stores references to the cecil objects.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance has references to the cecil objects; otherwise, <c>false</c>.
+ /// </value>
+ public bool HasCecilReferences { get { return typeSystemTranslationTable != null; } }
+ #endregion
+
+ ModuleDefinition currentModule;
+ CecilUnresolvedAssembly currentAssembly;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.TypeSystem.CecilLoader"/> class.
+ /// </summary>
+ public CecilLoader()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.TypeSystem.CecilLoader"/> class.
+ /// </summary>
+ /// <param name='createCecilReferences'>
+ /// If true references to the cecil objects are hold. In this case the cecil loader can do a type system -> cecil mapping.
+ /// </param>
+ [Obsolete("The built-in entity<->cecil mapping is obsolete. Use the OnEntityLoaded callback instead!")]
+ public CecilLoader(bool createCecilReferences) : this()
+ {
+ if (createCecilReferences)
+ typeSystemTranslationTable = new Dictionary<object, object> ();
+ }
+
+ /// <summary>
+ /// Creates a nested CecilLoader for lazy-loading.
+ /// </summary>
+ private CecilLoader(CecilLoader loader)
+ {
+ // use a shared typeSystemTranslationTable
+ this.typeSystemTranslationTable = loader.typeSystemTranslationTable;
+ this.IncludeInternalMembers = loader.IncludeInternalMembers;
+ this.LazyLoad = loader.LazyLoad;
+ this.OnEntityLoaded = loader.OnEntityLoaded;
+ this.currentModule = loader.currentModule;
+ this.currentAssembly = loader.currentAssembly;
+ // don't use interning - the interning provider is most likely not thread-safe
+ this.interningProvider = InterningProvider.Dummy;
+ // don't use cancellation for delay-loaded members
+ }
+
+ #region Load From AssemblyDefinition
+ /// <summary>
+ /// Loads the assembly definition into a project content.
+ /// </summary>
+ /// <returns>Unresolved type system representing the assembly</returns>
+ [CLSCompliant(false)]
+ public IUnresolvedAssembly LoadAssembly(AssemblyDefinition assemblyDefinition)
+ {
+ if (assemblyDefinition == null)
+ throw new ArgumentNullException("assemblyDefinition");
+ return LoadModule(assemblyDefinition.MainModule);
+ }
+
+ /// <summary>
+ /// Loads the module definition into a project content.
+ /// </summary>
+ /// <returns>Unresolved type system representing the assembly</returns>
+ [CLSCompliant(false)]
+ public IUnresolvedAssembly LoadModule(ModuleDefinition moduleDefinition)
+ {
+ if (moduleDefinition == null)
+ throw new ArgumentNullException("moduleDefinition");
+
+ this.currentModule = moduleDefinition;
+
+ // Read assembly and module attributes
+ IList<IUnresolvedAttribute> assemblyAttributes = new List<IUnresolvedAttribute>();
+ IList<IUnresolvedAttribute> moduleAttributes = new List<IUnresolvedAttribute>();
+ AssemblyDefinition assemblyDefinition = moduleDefinition.Assembly;
+ if (assemblyDefinition != null) {
+ AddAttributes(assemblyDefinition, assemblyAttributes);
+ }
+ AddAttributes(moduleDefinition, moduleAttributes);
+
+ assemblyAttributes = interningProvider.InternList(assemblyAttributes);
+ moduleAttributes = interningProvider.InternList(moduleAttributes);
+
+ this.currentAssembly = new CecilUnresolvedAssembly(assemblyDefinition != null ? assemblyDefinition.Name.FullName : moduleDefinition.Name, this.DocumentationProvider);
+ currentAssembly.Location = moduleDefinition.FullyQualifiedName;
+ currentAssembly.AssemblyAttributes.AddRange(assemblyAttributes);
+ currentAssembly.ModuleAttributes.AddRange(assemblyAttributes);
+
+ // Register type forwarders:
+ foreach (ExportedType type in moduleDefinition.ExportedTypes) {
+ if (type.IsForwarder) {
+ int typeParameterCount;
+ string ns = type.Namespace;
+ string name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out typeParameterCount);
+ ns = interningProvider.Intern(ns);
+ name = interningProvider.Intern(name);
+ var typeRef = new GetClassTypeReference(GetAssemblyReference(type.Scope), ns, name, typeParameterCount);
+ typeRef = interningProvider.Intern(typeRef);
+ var key = new TopLevelTypeName(ns, name, typeParameterCount);
+ currentAssembly.AddTypeForwarder(key, typeRef);
+ }
+ }
+
+ // Create and register all types:
+ CecilLoader cecilLoaderCloneForLazyLoading = LazyLoad ? new CecilLoader(this) : null;
+ List<TypeDefinition> cecilTypeDefs = new List<TypeDefinition>();
+ List<DefaultUnresolvedTypeDefinition> typeDefs = new List<DefaultUnresolvedTypeDefinition>();
+ foreach (TypeDefinition td in moduleDefinition.Types) {
+ this.CancellationToken.ThrowIfCancellationRequested();
+ if (this.IncludeInternalMembers || (td.Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.Public) {
+ string name = td.Name;
+ if (name.Length == 0)
+ continue;
+
+ if (this.LazyLoad) {
+ var t = new LazyCecilTypeDefinition(cecilLoaderCloneForLazyLoading, td);
+ currentAssembly.AddTypeDefinition(t);
+ RegisterCecilObject(t, td);
+ } else {
+ var t = CreateTopLevelTypeDefinition(td);
+ cecilTypeDefs.Add(td);
+ typeDefs.Add(t);
+ currentAssembly.AddTypeDefinition(t);
+ // The registration will happen after the members are initialized
+ }
+ }
+ }
+ // Initialize the type's members:
+ for (int i = 0; i < typeDefs.Count; i++) {
+ InitTypeDefinition(cecilTypeDefs[i], typeDefs[i]);
+ }
+
+ AddToTypeSystemTranslationTable(this.currentAssembly, assemblyDefinition);
+ // Freezing the assembly here is important:
+ // otherwise it will be frozen when a compilation is first created
+ // from it. But freezing has the effect of changing some collection instances
+ // (to ReadOnlyCollection). This hidden mutation was causing a crash
+ // when the FastSerializer was saving the assembly at the same time as
+ // the first compilation was created from it.
+ // By freezing the assembly now, we ensure it is usable on multiple
+ // threads without issues.
+ currentAssembly.Freeze();
+
+ var result = this.currentAssembly;
+ this.currentAssembly = null;
+ this.currentModule = null;
+ return result;
+ }
+
+ /// <summary>
+ /// Sets the current module.
+ /// This causes ReadTypeReference() to use <see cref="DefaultAssemblyReference.CurrentAssembly"/> for references
+ /// in that module.
+ /// </summary>
+ [CLSCompliant(false)]
+ public void SetCurrentModule(ModuleDefinition module)
+ {
+ this.currentModule = module;
+ }
+
+ /// <summary>
+ /// Loads a type from Cecil.
+ /// </summary>
+ /// <param name="typeDefinition">The Cecil TypeDefinition.</param>
+ /// <returns>ITypeDefinition representing the Cecil type.</returns>
+ [CLSCompliant(false)]
+ public IUnresolvedTypeDefinition LoadType(TypeDefinition typeDefinition)
+ {
+ if (typeDefinition == null)
+ throw new ArgumentNullException("typeDefinition");
+ var td = CreateTopLevelTypeDefinition(typeDefinition);
+ InitTypeDefinition(typeDefinition, td);
+ return td;
+ }
+ #endregion
+
+ #region IUnresolvedAssembly implementation
+ [Serializable, FastSerializerVersion(cecilLoaderVersion)]
+ sealed class CecilUnresolvedAssembly : DefaultUnresolvedAssembly, IDocumentationProvider
+ {
+ readonly IDocumentationProvider documentationProvider;
+
+ public CecilUnresolvedAssembly(string fullAssemblyName, IDocumentationProvider documentationProvider)
+ : base(fullAssemblyName)
+ {
+ this.documentationProvider = documentationProvider;
+ }
+
+ DocumentationComment IDocumentationProvider.GetDocumentation(IEntity entity)
+ {
+ if (documentationProvider != null)
+ return documentationProvider.GetDocumentation(entity);
+ else
+ return null;
+ }
+ }
+ #endregion
+
+ #region Load Assembly From Disk
+ public override IUnresolvedAssembly LoadAssemblyFile(string fileName)
+ {
+ if (fileName == null)
+ throw new ArgumentNullException("fileName");
+ var param = new ReaderParameters { AssemblyResolver = new DummyAssemblyResolver() };
+ ModuleDefinition module = ModuleDefinition.ReadModule(fileName, param);
+ return LoadModule(module);
+ }
+
+ // used to prevent Cecil from loading referenced assemblies
+ sealed class DummyAssemblyResolver : IAssemblyResolver
+ {
+ public AssemblyDefinition Resolve(AssemblyNameReference name)
+ {
+ return null;
+ }
+
+ public AssemblyDefinition Resolve(string fullName)
+ {
+ return null;
+ }
+
+ public AssemblyDefinition Resolve(AssemblyNameReference name, ReaderParameters parameters)
+ {
+ return null;
+ }
+
+ public AssemblyDefinition Resolve(string fullName, ReaderParameters parameters)
+ {
+ return null;
+ }
+ }
+ #endregion
+
+ #region Read Type Reference
+ /// <summary>
+ /// Reads a type reference.
+ /// </summary>
+ /// <param name="type">The Cecil type reference that should be converted into
+ /// a type system type reference.</param>
+ /// <param name="typeAttributes">Attributes associated with the Cecil type reference.
+ /// This is used to support the 'dynamic' type.</param>
+ [CLSCompliant(false)]
+ public ITypeReference ReadTypeReference(TypeReference type, ICustomAttributeProvider typeAttributes = null)
+ {
+ int typeIndex = 0;
+ return CreateType(type, typeAttributes, ref typeIndex);
+ }
+
+ ITypeReference CreateType(TypeReference type, ICustomAttributeProvider typeAttributes, ref int typeIndex)
+ {
+ while (type is OptionalModifierType || type is RequiredModifierType) {
+ type = ((TypeSpecification)type).ElementType;
+ }
+ if (type == null) {
+ return SpecialType.UnknownType;
+ }
+
+ if (type is Mono.Cecil.ByReferenceType) {
+ typeIndex++;
+ return interningProvider.Intern(
+ new ByReferenceTypeReference(
+ CreateType(
+ (type as Mono.Cecil.ByReferenceType).ElementType,
+ typeAttributes, ref typeIndex)));
+ } else if (type is Mono.Cecil.PointerType) {
+ typeIndex++;
+ return interningProvider.Intern(
+ new PointerTypeReference(
+ CreateType(
+ (type as Mono.Cecil.PointerType).ElementType,
+ typeAttributes, ref typeIndex)));
+ } else if (type is Mono.Cecil.ArrayType) {
+ typeIndex++;
+ return interningProvider.Intern(
+ new ArrayTypeReference(
+ CreateType(
+ (type as Mono.Cecil.ArrayType).ElementType,
+ typeAttributes, ref typeIndex),
+ (type as Mono.Cecil.ArrayType).Rank));
+ } else if (type is GenericInstanceType) {
+ GenericInstanceType gType = (GenericInstanceType)type;
+ ITypeReference baseType = CreateType(gType.ElementType, typeAttributes, ref typeIndex);
+ ITypeReference[] para = new ITypeReference[gType.GenericArguments.Count];
+ for (int i = 0; i < para.Length; ++i) {
+ typeIndex++;
+ para[i] = CreateType(gType.GenericArguments[i], typeAttributes, ref typeIndex);
+ }
+ return interningProvider.Intern(new ParameterizedTypeReference(baseType, para));
+ } else if (type is GenericParameter) {
+ GenericParameter typeGP = (GenericParameter)type;
+ return TypeParameterReference.Create(typeGP.Owner is MethodDefinition ? SymbolKind.Method : SymbolKind.TypeDefinition, typeGP.Position);
+ } else if (type.IsNested) {
+ ITypeReference typeRef = CreateType(type.DeclaringType, typeAttributes, ref typeIndex);
+ int partTypeParameterCount;
+ string namepart = ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out partTypeParameterCount);
+ namepart = interningProvider.Intern(namepart);
+ return interningProvider.Intern(new NestedTypeReference(typeRef, namepart, partTypeParameterCount));
+ } else {
+ string ns = interningProvider.Intern(type.Namespace ?? string.Empty);
+ string name = type.Name;
+ if (name == null)
+ throw new InvalidOperationException("type.Name returned null. Type: " + type.ToString());
+
+ if (name == "Object" && ns == "System" && HasDynamicAttribute(typeAttributes, typeIndex)) {
+ return SpecialType.Dynamic;
+ } else {
+ int typeParameterCount;
+ name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name, out typeParameterCount);
+ name = interningProvider.Intern(name);
+ if (currentAssembly != null) {
+ IUnresolvedTypeDefinition c = currentAssembly.GetTypeDefinition(ns, name, typeParameterCount);
+ if (c != null)
+ return c;
+ }
+ return interningProvider.Intern(new GetClassTypeReference(GetAssemblyReference(type.Scope), ns, name, typeParameterCount));
+ }
+ }
+ }
+
+ IAssemblyReference GetAssemblyReference(IMetadataScope scope)
+ {
+ if (scope == null || scope == currentModule)
+ return DefaultAssemblyReference.CurrentAssembly;
+ else
+ return interningProvider.Intern(new DefaultAssemblyReference(scope.Name));
+ }
+
+ static bool HasDynamicAttribute(ICustomAttributeProvider attributeProvider, int typeIndex)
+ {
+ if (attributeProvider == null || !attributeProvider.HasCustomAttributes)
+ return false;
+ foreach (CustomAttribute a in attributeProvider.CustomAttributes) {
+ TypeReference type = a.AttributeType;
+ if (type.Name == "DynamicAttribute" && type.Namespace == "System.Runtime.CompilerServices") {
+ if (a.ConstructorArguments.Count == 1) {
+ CustomAttributeArgument[] values = a.ConstructorArguments[0].Value as CustomAttributeArgument[];
+ if (values != null && typeIndex < values.Length && values[typeIndex].Value is bool)
+ return (bool)values[typeIndex].Value;
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+ #endregion
+
+ #region Read Attributes
+ #region Assembly Attributes
+ static readonly ITypeReference assemblyVersionAttributeTypeRef = typeof(System.Reflection.AssemblyVersionAttribute).ToTypeReference();
+
+ void AddAttributes(AssemblyDefinition assembly, IList<IUnresolvedAttribute> outputList)
+ {
+ if (assembly.HasCustomAttributes) {
+ AddCustomAttributes(assembly.CustomAttributes, outputList);
+ }
+ if (assembly.HasSecurityDeclarations) {
+ AddSecurityAttributes(assembly.SecurityDeclarations, outputList);
+ }
+
+ // AssemblyVersionAttribute
+ if (assembly.Name.Version != null) {
+ var assemblyVersion = new DefaultUnresolvedAttribute(assemblyVersionAttributeTypeRef, new[] { KnownTypeReference.String });
+ assemblyVersion.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, assembly.Name.Version.ToString()));
+ outputList.Add(interningProvider.Intern(assemblyVersion));
+ }
+ }
+
+ IConstantValue CreateSimpleConstantValue(ITypeReference type, object value)
+ {
+ return interningProvider.Intern(new SimpleConstantValue(type, interningProvider.InternValue(value)));
+ }
+ #endregion
+
+ #region Module Attributes
+ void AddAttributes(ModuleDefinition module, IList<IUnresolvedAttribute> outputList)
+ {
+ if (module.HasCustomAttributes) {
+ AddCustomAttributes(module.CustomAttributes, outputList);
+ }
+ }
+ #endregion
+
+ #region Parameter Attributes
+ static readonly IUnresolvedAttribute inAttribute = new DefaultUnresolvedAttribute(typeof(InAttribute).ToTypeReference());
+ static readonly IUnresolvedAttribute outAttribute = new DefaultUnresolvedAttribute(typeof(OutAttribute).ToTypeReference());
+
+ void AddAttributes(ParameterDefinition parameter, DefaultUnresolvedParameter targetParameter)
+ {
+ if (!targetParameter.IsOut) {
+ if (parameter.IsIn)
+ targetParameter.Attributes.Add(inAttribute);
+ if (parameter.IsOut)
+ targetParameter.Attributes.Add(outAttribute);
+ }
+ if (parameter.HasCustomAttributes) {
+ AddCustomAttributes(parameter.CustomAttributes, targetParameter.Attributes);
+ }
+ if (parameter.HasMarshalInfo) {
+ targetParameter.Attributes.Add(ConvertMarshalInfo(parameter.MarshalInfo));
+ }
+ }
+ #endregion
+
+ #region Method Attributes
+ static readonly ITypeReference dllImportAttributeTypeRef = typeof(DllImportAttribute).ToTypeReference();
+ static readonly SimpleConstantValue trueValue = new SimpleConstantValue(KnownTypeReference.Boolean, true);
+ static readonly SimpleConstantValue falseValue = new SimpleConstantValue(KnownTypeReference.Boolean, false);
+ static readonly ITypeReference callingConventionTypeRef = typeof(CallingConvention).ToTypeReference();
+ static readonly IUnresolvedAttribute preserveSigAttribute = new DefaultUnresolvedAttribute(typeof(PreserveSigAttribute).ToTypeReference());
+ static readonly ITypeReference methodImplAttributeTypeRef = typeof(MethodImplAttribute).ToTypeReference();
+ static readonly ITypeReference methodImplOptionsTypeRef = typeof(MethodImplOptions).ToTypeReference();
+
+ static bool HasAnyAttributes(MethodDefinition methodDefinition)
+ {
+ if (methodDefinition.HasPInvokeInfo)
+ return true;
+ if ((methodDefinition.ImplAttributes & ~MethodImplAttributes.CodeTypeMask) != 0)
+ return true;
+ if (methodDefinition.MethodReturnType.HasFieldMarshal)
+ return true;
+ return methodDefinition.HasCustomAttributes || methodDefinition.MethodReturnType.HasCustomAttributes;
+ }
+
+ void AddAttributes(MethodDefinition methodDefinition, IList<IUnresolvedAttribute> attributes, IList<IUnresolvedAttribute> returnTypeAttributes)
+ {
+ MethodImplAttributes implAttributes = methodDefinition.ImplAttributes & ~MethodImplAttributes.CodeTypeMask;
+
+ #region DllImportAttribute
+ if (methodDefinition.HasPInvokeInfo && methodDefinition.PInvokeInfo != null) {
+ PInvokeInfo info = methodDefinition.PInvokeInfo;
+ var dllImport = new DefaultUnresolvedAttribute(dllImportAttributeTypeRef, new[] { KnownTypeReference.String });
+ dllImport.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, info.Module.Name));
+
+ if (info.IsBestFitDisabled)
+ dllImport.AddNamedFieldArgument("BestFitMapping", falseValue);
+ if (info.IsBestFitEnabled)
+ dllImport.AddNamedFieldArgument("BestFitMapping", trueValue);
+
+ CallingConvention callingConvention;
+ switch (info.Attributes & PInvokeAttributes.CallConvMask) {
+ case (PInvokeAttributes)0:
+ Debug.WriteLine ("P/Invoke calling convention not set on:" + methodDefinition.FullName);
+ callingConvention = 0;
+ break;
+ case PInvokeAttributes.CallConvCdecl:
+ callingConvention = CallingConvention.Cdecl;
+ break;
+ case PInvokeAttributes.CallConvFastcall:
+ callingConvention = CallingConvention.FastCall;
+ break;
+ case PInvokeAttributes.CallConvStdCall:
+ callingConvention = CallingConvention.StdCall;
+ break;
+ case PInvokeAttributes.CallConvThiscall:
+ callingConvention = CallingConvention.ThisCall;
+ break;
+ case PInvokeAttributes.CallConvWinapi:
+ callingConvention = CallingConvention.Winapi;
+ break;
+ default:
+ throw new NotSupportedException("unknown calling convention");
+ }
+ if (callingConvention != CallingConvention.Winapi)
+ dllImport.AddNamedFieldArgument("CallingConvention", CreateSimpleConstantValue(callingConventionTypeRef, (int)callingConvention));
+
+ CharSet charSet = CharSet.None;
+ switch (info.Attributes & PInvokeAttributes.CharSetMask) {
+ case PInvokeAttributes.CharSetAnsi:
+ charSet = CharSet.Ansi;
+ break;
+ case PInvokeAttributes.CharSetAuto:
+ charSet = CharSet.Auto;
+ break;
+ case PInvokeAttributes.CharSetUnicode:
+ charSet = CharSet.Unicode;
+ break;
+ }
+ if (charSet != CharSet.None)
+ dllImport.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
+
+ if (!string.IsNullOrEmpty(info.EntryPoint) && info.EntryPoint != methodDefinition.Name)
+ dllImport.AddNamedFieldArgument("EntryPoint", CreateSimpleConstantValue(KnownTypeReference.String, info.EntryPoint));
+
+ if (info.IsNoMangle)
+ dllImport.AddNamedFieldArgument("ExactSpelling", trueValue);
+
+ if ((implAttributes & MethodImplAttributes.PreserveSig) == MethodImplAttributes.PreserveSig)
+ implAttributes &= ~MethodImplAttributes.PreserveSig;
+ else
+ dllImport.AddNamedFieldArgument("PreserveSig", falseValue);
+
+ if (info.SupportsLastError)
+ dllImport.AddNamedFieldArgument("SetLastError", trueValue);
+
+ if (info.IsThrowOnUnmappableCharDisabled)
+ dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", falseValue);
+ if (info.IsThrowOnUnmappableCharEnabled)
+ dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", trueValue);
+
+ attributes.Add(interningProvider.Intern(dllImport));
+ }
+ #endregion
+
+ #region PreserveSigAttribute
+ if (implAttributes == MethodImplAttributes.PreserveSig) {
+ attributes.Add(preserveSigAttribute);
+ implAttributes = 0;
+ }
+ #endregion
+
+ #region MethodImplAttribute
+ if (implAttributes != 0) {
+ var methodImpl = new DefaultUnresolvedAttribute(methodImplAttributeTypeRef, new[] { methodImplOptionsTypeRef });
+ methodImpl.PositionalArguments.Add(CreateSimpleConstantValue(methodImplOptionsTypeRef, (int)implAttributes));
+ attributes.Add(interningProvider.Intern(methodImpl));
+ }
+ #endregion
+
+ if (methodDefinition.HasCustomAttributes) {
+ AddCustomAttributes(methodDefinition.CustomAttributes, attributes);
+ }
+ if (methodDefinition.HasSecurityDeclarations) {
+ AddSecurityAttributes(methodDefinition.SecurityDeclarations, attributes);
+ }
+ if (methodDefinition.MethodReturnType.HasMarshalInfo) {
+ returnTypeAttributes.Add(ConvertMarshalInfo(methodDefinition.MethodReturnType.MarshalInfo));
+ }
+ if (methodDefinition.MethodReturnType.HasCustomAttributes) {
+ AddCustomAttributes(methodDefinition.MethodReturnType.CustomAttributes, returnTypeAttributes);
+ }
+ }
+ #endregion
+
+ #region Type Attributes
+ static readonly DefaultUnresolvedAttribute serializableAttribute = new DefaultUnresolvedAttribute(typeof(SerializableAttribute).ToTypeReference());
+ static readonly DefaultUnresolvedAttribute comImportAttribute = new DefaultUnresolvedAttribute(typeof(ComImportAttribute).ToTypeReference());
+ static readonly ITypeReference structLayoutAttributeTypeRef = typeof(StructLayoutAttribute).ToTypeReference();
+ static readonly ITypeReference layoutKindTypeRef = typeof(LayoutKind).ToTypeReference();
+ static readonly ITypeReference charSetTypeRef = typeof(CharSet).ToTypeReference();
+
+ void AddAttributes(TypeDefinition typeDefinition, IUnresolvedTypeDefinition targetEntity)
+ {
+ // SerializableAttribute
+ if (typeDefinition.IsSerializable)
+ targetEntity.Attributes.Add(serializableAttribute);
+
+ // ComImportAttribute
+ if (typeDefinition.IsImport)
+ targetEntity.Attributes.Add(comImportAttribute);
+
+ #region StructLayoutAttribute
+ LayoutKind layoutKind = LayoutKind.Auto;
+ switch (typeDefinition.Attributes & TypeAttributes.LayoutMask) {
+ case TypeAttributes.SequentialLayout:
+ layoutKind = LayoutKind.Sequential;
+ break;
+ case TypeAttributes.ExplicitLayout:
+ layoutKind = LayoutKind.Explicit;
+ break;
+ }
+ CharSet charSet = CharSet.None;
+ switch (typeDefinition.Attributes & TypeAttributes.StringFormatMask) {
+ case TypeAttributes.AnsiClass:
+ charSet = CharSet.Ansi;
+ break;
+ case TypeAttributes.AutoClass:
+ charSet = CharSet.Auto;
+ break;
+ case TypeAttributes.UnicodeClass:
+ charSet = CharSet.Unicode;
+ break;
+ }
+ LayoutKind defaultLayoutKind = (typeDefinition.IsValueType && !typeDefinition.IsEnum) ? LayoutKind.Sequential: LayoutKind.Auto;
+ if (layoutKind != defaultLayoutKind || charSet != CharSet.Ansi || typeDefinition.PackingSize > 0 || typeDefinition.ClassSize > 0) {
+ DefaultUnresolvedAttribute structLayout = new DefaultUnresolvedAttribute(structLayoutAttributeTypeRef, new[] { layoutKindTypeRef });
+ structLayout.PositionalArguments.Add(CreateSimpleConstantValue(layoutKindTypeRef, (int)layoutKind));
+ if (charSet != CharSet.Ansi) {
+ structLayout.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
+ }
+ if (typeDefinition.PackingSize > 0) {
+ structLayout.AddNamedFieldArgument("Pack", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.PackingSize));
+ }
+ if (typeDefinition.ClassSize > 0) {
+ structLayout.AddNamedFieldArgument("Size", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.ClassSize));
+ }
+ targetEntity.Attributes.Add(interningProvider.Intern(structLayout));
+ }
+ #endregion
+
+ if (typeDefinition.HasCustomAttributes) {
+ AddCustomAttributes(typeDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ if (typeDefinition.HasSecurityDeclarations) {
+ AddSecurityAttributes(typeDefinition.SecurityDeclarations, targetEntity.Attributes);
+ }
+ }
+ #endregion
+
+ #region Field Attributes
+ static readonly ITypeReference fieldOffsetAttributeTypeRef = typeof(FieldOffsetAttribute).ToTypeReference();
+ static readonly IUnresolvedAttribute nonSerializedAttribute = new DefaultUnresolvedAttribute(typeof(NonSerializedAttribute).ToTypeReference());
+
+ void AddAttributes(FieldDefinition fieldDefinition, IUnresolvedEntity targetEntity)
+ {
+ // FieldOffsetAttribute
+ if (fieldDefinition.HasLayoutInfo) {
+ DefaultUnresolvedAttribute fieldOffset = new DefaultUnresolvedAttribute(fieldOffsetAttributeTypeRef, new[] { KnownTypeReference.Int32 });
+ fieldOffset.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.Int32, fieldDefinition.Offset));
+ targetEntity.Attributes.Add(interningProvider.Intern(fieldOffset));
+ }
+
+ // NonSerializedAttribute
+ if (fieldDefinition.IsNotSerialized) {
+ targetEntity.Attributes.Add(nonSerializedAttribute);
+ }
+
+ if (fieldDefinition.HasMarshalInfo) {
+ targetEntity.Attributes.Add(ConvertMarshalInfo(fieldDefinition.MarshalInfo));
+ }
+
+ if (fieldDefinition.HasCustomAttributes) {
+ AddCustomAttributes(fieldDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ }
+ #endregion
+
+ #region Event Attributes
+ void AddAttributes(EventDefinition eventDefinition, IUnresolvedEntity targetEntity)
+ {
+ if (eventDefinition.HasCustomAttributes) {
+ AddCustomAttributes(eventDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ }
+ #endregion
+
+ #region Property Attributes
+ void AddAttributes(PropertyDefinition propertyDefinition, IUnresolvedEntity targetEntity)
+ {
+ if (propertyDefinition.HasCustomAttributes) {
+ AddCustomAttributes(propertyDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ }
+ #endregion
+
+ #region MarshalAsAttribute (ConvertMarshalInfo)
+ static readonly ITypeReference marshalAsAttributeTypeRef = typeof(MarshalAsAttribute).ToTypeReference();
+ static readonly ITypeReference unmanagedTypeTypeRef = typeof(UnmanagedType).ToTypeReference();
+
+ IUnresolvedAttribute ConvertMarshalInfo(MarshalInfo marshalInfo)
+ {
+ DefaultUnresolvedAttribute attr = new DefaultUnresolvedAttribute(marshalAsAttributeTypeRef, new[] { unmanagedTypeTypeRef });
+ attr.PositionalArguments.Add(CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)marshalInfo.NativeType));
+
+ FixedArrayMarshalInfo fami = marshalInfo as FixedArrayMarshalInfo;
+ if (fami != null) {
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)fami.Size));
+ if (fami.ElementType != NativeType.None)
+ attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)fami.ElementType));
+ }
+ SafeArrayMarshalInfo sami = marshalInfo as SafeArrayMarshalInfo;
+ if (sami != null && sami.ElementType != VariantType.None) {
+ attr.AddNamedFieldArgument("SafeArraySubType", CreateSimpleConstantValue(typeof(VarEnum).ToTypeReference(), (int)sami.ElementType));
+ }
+ ArrayMarshalInfo ami = marshalInfo as ArrayMarshalInfo;
+ if (ami != null) {
+ if (ami.ElementType != NativeType.Max)
+ attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)ami.ElementType));
+ if (ami.Size >= 0)
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)ami.Size));
+ if (ami.SizeParameterMultiplier != 0 && ami.SizeParameterIndex >= 0)
+ attr.AddNamedFieldArgument("SizeParamIndex", CreateSimpleConstantValue(KnownTypeReference.Int16, (short)ami.SizeParameterIndex));
+ }
+ CustomMarshalInfo cmi = marshalInfo as CustomMarshalInfo;
+ if (cmi != null) {
+ attr.AddNamedFieldArgument("MarshalType", CreateSimpleConstantValue(KnownTypeReference.String, cmi.ManagedType.FullName));
+ if (!string.IsNullOrEmpty(cmi.Cookie))
+ attr.AddNamedFieldArgument("MarshalCookie", CreateSimpleConstantValue(KnownTypeReference.String, cmi.Cookie));
+ }
+ FixedSysStringMarshalInfo fssmi = marshalInfo as FixedSysStringMarshalInfo;
+ if (fssmi != null) {
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)fssmi.Size));
+ }
+
+ return InterningProvider.Intern(attr);
+ }
+ #endregion
+
+ #region Custom Attributes (ReadAttribute)
+ void AddCustomAttributes(Mono.Collections.Generic.Collection<CustomAttribute> attributes, IList<IUnresolvedAttribute> targetCollection)
+ {
+ foreach (var cecilAttribute in attributes) {
+ TypeReference type = cecilAttribute.AttributeType;
+ if (type.Namespace == "System.Runtime.CompilerServices") {
+ if (type.Name == "DynamicAttribute" || type.Name == "ExtensionAttribute" || type.Name == "DecimalConstantAttribute")
+ continue;
+ } else if (type.Name == "ParamArrayAttribute" && type.Namespace == "System") {
+ continue;
+ }
+ targetCollection.Add(ReadAttribute(cecilAttribute));
+ }
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedAttribute ReadAttribute(CustomAttribute attribute)
+ {
+ if (attribute == null)
+ throw new ArgumentNullException("attribute");
+ MethodReference ctor = attribute.Constructor;
+ ITypeReference attributeType = ReadTypeReference(attribute.AttributeType);
+ IList<ITypeReference> ctorParameterTypes = EmptyList<ITypeReference>.Instance;
+ if (ctor.HasParameters) {
+ ctorParameterTypes = new ITypeReference[ctor.Parameters.Count];
+ for (int i = 0; i < ctorParameterTypes.Count; i++) {
+ ctorParameterTypes[i] = ReadTypeReference(ctor.Parameters[i].ParameterType);
+ }
+ ctorParameterTypes = interningProvider.InternList(ctorParameterTypes);
+ }
+ return interningProvider.Intern(new UnresolvedAttributeBlob(attributeType, ctorParameterTypes, attribute.GetBlob()));
+ }
+ #endregion
+
+ #region Security Attributes
+ /// <summary>
+ /// Reads a security declaration.
+ /// </summary>
+ [CLSCompliant(false)]
+ public IList<IUnresolvedAttribute> ReadSecurityDeclaration(SecurityDeclaration secDecl)
+ {
+ if (secDecl == null)
+ throw new ArgumentNullException("secDecl");
+ var result = new List<IUnresolvedAttribute>();
+ AddSecurityAttributes(secDecl, result);
+ return result;
+ }
+
+ void AddSecurityAttributes(Mono.Collections.Generic.Collection<SecurityDeclaration> securityDeclarations, IList<IUnresolvedAttribute> targetCollection)
+ {
+ foreach (var secDecl in securityDeclarations) {
+ AddSecurityAttributes(secDecl, targetCollection);
+ }
+ }
+
+ void AddSecurityAttributes(SecurityDeclaration secDecl, IList<IUnresolvedAttribute> targetCollection)
+ {
+ var blobSecDecl = new UnresolvedSecurityDeclarationBlob((int)secDecl.Action, secDecl.GetBlob());
+ targetCollection.AddRange(blobSecDecl.UnresolvedAttributes);
+ }
+ #endregion
+ #endregion
+
+ #region Read Type Definition
+ DefaultUnresolvedTypeDefinition CreateTopLevelTypeDefinition(TypeDefinition typeDefinition)
+ {
+ string name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(typeDefinition.Name);
+ var td = new DefaultUnresolvedTypeDefinition(typeDefinition.Namespace, name);
+ if (typeDefinition.HasGenericParameters)
+ InitTypeParameters(typeDefinition, td.TypeParameters);
+ return td;
+ }
+
+ static void InitTypeParameters(TypeDefinition typeDefinition, IList<IUnresolvedTypeParameter> typeParameters)
+ {
+ // Type parameters are initialized within the constructor so that the class can be put into the type storage
+ // before the rest of the initialization runs - this allows it to be available for early binding as soon as possible.
+ for (int i = 0; i < typeDefinition.GenericParameters.Count; i++) {
+ if (typeDefinition.GenericParameters[i].Position != i)
+ throw new InvalidOperationException("g.Position != i");
+ typeParameters.Add(new DefaultUnresolvedTypeParameter(
+ SymbolKind.TypeDefinition, i, typeDefinition.GenericParameters[i].Name));
+ }
+ }
+
+ void InitTypeParameterConstraints(TypeDefinition typeDefinition, IList<IUnresolvedTypeParameter> typeParameters)
+ {
+ for (int i = 0; i < typeParameters.Count; i++) {
+ var tp = (DefaultUnresolvedTypeParameter)typeParameters[i];
+ AddConstraints(tp, typeDefinition.GenericParameters[i]);
+ tp.ApplyInterningProvider(interningProvider);
+ }
+ }
+
+ void InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)
+ {
+ td.Kind = GetTypeKind(typeDefinition);
+ InitTypeModifiers(typeDefinition, td);
+ InitTypeParameterConstraints(typeDefinition, td.TypeParameters);
+
+ // nested types can be initialized only after generic parameters were created
+ InitNestedTypes(typeDefinition, td, td.NestedTypes);
+ AddAttributes(typeDefinition, td);
+ td.HasExtensionMethods = HasExtensionAttribute(typeDefinition);
+
+ InitBaseTypes(typeDefinition, td.BaseTypes);
+
+ td.AddDefaultConstructorIfRequired = (td.Kind == TypeKind.Struct || td.Kind == TypeKind.Enum);
+ InitMembers(typeDefinition, td, td.Members);
+ td.ApplyInterningProvider(interningProvider);
+ td.Freeze();
+ RegisterCecilObject(td, typeDefinition);
+ }
+
+ void InitBaseTypes(TypeDefinition typeDefinition, IList<ITypeReference> baseTypes)
+ {
+ // set base classes
+ if (typeDefinition.IsEnum) {
+ foreach (FieldDefinition enumField in typeDefinition.Fields) {
+ if (!enumField.IsStatic) {
+ baseTypes.Add(ReadTypeReference(enumField.FieldType));
+ break;
+ }
+ }
+ } else {
+ if (typeDefinition.BaseType != null) {
+ baseTypes.Add(ReadTypeReference(typeDefinition.BaseType));
+ }
+ if (typeDefinition.HasInterfaces) {
+ foreach (TypeReference iface in typeDefinition.Interfaces) {
+ baseTypes.Add(ReadTypeReference(iface));
+ }
+ }
+ }
+ }
+
+ void InitNestedTypes(TypeDefinition typeDefinition, IUnresolvedTypeDefinition declaringTypeDefinition, IList<IUnresolvedTypeDefinition> nestedTypes)
+ {
+ if (!typeDefinition.HasNestedTypes)
+ return;
+ foreach (TypeDefinition nestedTypeDef in typeDefinition.NestedTypes) {
+ TypeAttributes visibility = nestedTypeDef.Attributes & TypeAttributes.VisibilityMask;
+ if (this.IncludeInternalMembers
+ || visibility == TypeAttributes.NestedPublic
+ || visibility == TypeAttributes.NestedFamily
+ || visibility == TypeAttributes.NestedFamORAssem)
+ {
+ string name = nestedTypeDef.Name;
+ int pos = name.LastIndexOf('/');
+ if (pos > 0)
+ name = name.Substring(pos + 1);
+ name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
+ var nestedType = new DefaultUnresolvedTypeDefinition(declaringTypeDefinition, name);
+ InitTypeParameters(nestedTypeDef, nestedType.TypeParameters);
+ nestedTypes.Add(nestedType);
+ InitTypeDefinition(nestedTypeDef, nestedType);
+ }
+ }
+ }
+
+ static TypeKind GetTypeKind(TypeDefinition typeDefinition)
+ {
+ // set classtype
+ if (typeDefinition.IsInterface) {
+ return TypeKind.Interface;
+ } else if (typeDefinition.IsEnum) {
+ return TypeKind.Enum;
+ } else if (typeDefinition.IsValueType) {
+ return TypeKind.Struct;
+ } else if (IsDelegate(typeDefinition)) {
+ return TypeKind.Delegate;
+ } else if (IsModule(typeDefinition)) {
+ return TypeKind.Module;
+ } else {
+ return TypeKind.Class;
+ }
+ }
+
+ static void InitTypeModifiers(TypeDefinition typeDefinition, AbstractUnresolvedEntity td)
+ {
+ td.IsSealed = typeDefinition.IsSealed;
+ td.IsAbstract = typeDefinition.IsAbstract;
+ switch (typeDefinition.Attributes & TypeAttributes.VisibilityMask) {
+ case TypeAttributes.NotPublic:
+ case TypeAttributes.NestedAssembly:
+ td.Accessibility = Accessibility.Internal;
+ break;
+ case TypeAttributes.Public:
+ case TypeAttributes.NestedPublic:
+ td.Accessibility = Accessibility.Public;
+ break;
+ case TypeAttributes.NestedPrivate:
+ td.Accessibility = Accessibility.Private;
+ break;
+ case TypeAttributes.NestedFamily:
+ td.Accessibility = Accessibility.Protected;
+ break;
+ case TypeAttributes.NestedFamANDAssem:
+ td.Accessibility = Accessibility.ProtectedAndInternal;
+ break;
+ case TypeAttributes.NestedFamORAssem:
+ td.Accessibility = Accessibility.ProtectedOrInternal;
+ break;
+ }
+ }
+
+ static bool IsDelegate(TypeDefinition type)
+ {
+ if (type.BaseType != null && type.BaseType.Namespace == "System") {
+ if (type.BaseType.Name == "MulticastDelegate")
+ return true;
+ if (type.BaseType.Name == "Delegate" && type.Name != "MulticastDelegate")
+ return true;
+ }
+ return false;
+ }
+
+ static bool IsModule(TypeDefinition type)
+ {
+ if (!type.HasCustomAttributes)
+ return false;
+ foreach (var att in type.CustomAttributes) {
+ if (att.AttributeType.FullName == "Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute"
+ || att.AttributeType.FullName == "System.Runtime.CompilerServices.CompilerGlobalScopeAttribute")
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList<IUnresolvedMember> members)
+ {
+ if (typeDefinition.HasMethods) {
+ foreach (MethodDefinition method in typeDefinition.Methods) {
+ if (IsVisible(method.Attributes) && !IsAccessor(method.SemanticsAttributes)) {
+ SymbolKind type = SymbolKind.Method;
+ if (method.IsSpecialName) {
+ if (method.IsConstructor)
+ type = SymbolKind.Constructor;
+ else if (method.Name.StartsWith("op_", StringComparison.Ordinal))
+ type = SymbolKind.Operator;
+ }
+ members.Add(ReadMethod(method, td, type));
+ }
+ }
+ }
+ if (typeDefinition.HasFields) {
+ foreach (FieldDefinition field in typeDefinition.Fields) {
+ if (IsVisible(field.Attributes) && !field.IsSpecialName) {
+ members.Add(ReadField(field, td));
+ }
+ }
+ }
+ if (typeDefinition.HasProperties) {
+ string defaultMemberName = null;
+ var defaultMemberAttribute = typeDefinition.CustomAttributes.FirstOrDefault(
+ a => a.AttributeType.FullName == typeof(System.Reflection.DefaultMemberAttribute).FullName);
+ if (defaultMemberAttribute != null && defaultMemberAttribute.ConstructorArguments.Count == 1) {
+ defaultMemberName = defaultMemberAttribute.ConstructorArguments[0].Value as string;
+ }
+ foreach (PropertyDefinition property in typeDefinition.Properties) {
+ bool getterVisible = property.GetMethod != null && IsVisible(property.GetMethod.Attributes);
+ bool setterVisible = property.SetMethod != null && IsVisible(property.SetMethod.Attributes);
+ if (getterVisible || setterVisible) {
+ SymbolKind type = SymbolKind.Property;
+ if (property.HasParameters) {
+ // Try to detect indexer:
+ if (property.Name == defaultMemberName) {
+ type = SymbolKind.Indexer; // normal indexer
+ } else if (property.Name.EndsWith(".Item", StringComparison.Ordinal) && (property.GetMethod ?? property.SetMethod).HasOverrides) {
+ // explicit interface implementation of indexer
+ type = SymbolKind.Indexer;
+ // We can't really tell parameterized properties and indexers apart in this case without
+ // resolving the interface, so we rely on the "Item" naming convention instead.
+ }
+ }
+ members.Add(ReadProperty(property, td, type));
+ }
+ }
+ }
+ if (typeDefinition.HasEvents) {
+ foreach (EventDefinition ev in typeDefinition.Events) {
+ if (ev.AddMethod != null && IsVisible(ev.AddMethod.Attributes)) {
+ members.Add(ReadEvent(ev, td));
+ }
+ }
+ }
+ }
+
+ static bool IsAccessor(MethodSemanticsAttributes semantics)
+ {
+ return !(semantics == MethodSemanticsAttributes.None || semantics == MethodSemanticsAttributes.Other);
+ }
+ #endregion
+
+ #region Lazy-Loaded Type Definition
+ sealed class LazyCecilTypeDefinition : AbstractUnresolvedEntity, IUnresolvedTypeDefinition
+ {
+ readonly CecilLoader loader;
+ readonly string namespaceName;
+ readonly TypeDefinition cecilTypeDef;
+ readonly TypeKind kind;
+ readonly IList<IUnresolvedTypeParameter> typeParameters;
+
+ IList<ITypeReference> baseTypes;
+ IList<IUnresolvedTypeDefinition> nestedTypes;
+ IList<IUnresolvedMember> members;
+
+ public LazyCecilTypeDefinition(CecilLoader loader, TypeDefinition typeDefinition)
+ {
+ this.loader = loader;
+ this.cecilTypeDef = typeDefinition;
+ this.SymbolKind = SymbolKind.TypeDefinition;
+ this.namespaceName = cecilTypeDef.Namespace;
+ this.Name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(cecilTypeDef.Name);
+ var tps = new List<IUnresolvedTypeParameter>();
+ InitTypeParameters(cecilTypeDef, tps);
+ this.typeParameters = FreezableHelper.FreezeList(tps);
+
+ this.kind = GetTypeKind(typeDefinition);
+ InitTypeModifiers(typeDefinition, this);
+ loader.InitTypeParameterConstraints(typeDefinition, typeParameters);
+
+ loader.AddAttributes(typeDefinition, this);
+ flags[FlagHasExtensionMethods] = HasExtensionAttribute(typeDefinition);
+
+ this.ApplyInterningProvider(loader.interningProvider);
+ this.Freeze();
+ }
+
+ public override string Namespace {
+ get { return namespaceName; }
+ set { throw new NotSupportedException(); }
+ }
+
+ public override string ReflectionName {
+ get { return cecilTypeDef.FullName; }
+ }
+
+ public FullTypeName FullTypeName {
+ get {
+ return new TopLevelTypeName(namespaceName, this.Name, typeParameters.Count);
+ }
+ }
+
+ public TypeKind Kind {
+ get { return kind; }
+ }
+
+ public IList<IUnresolvedTypeParameter> TypeParameters {
+ get { return typeParameters; }
+ }
+
+ public IList<ITypeReference> BaseTypes {
+ get {
+ var result = LazyInit.VolatileRead(ref this.baseTypes);
+ if (result != null) {
+ return result;
+ }
+ lock (loader.currentModule) {
+ result = new List<ITypeReference>();
+ loader.InitBaseTypes(cecilTypeDef, result);
+ return LazyInit.GetOrSet(ref this.baseTypes, FreezableHelper.FreezeList(result));
+ }
+ }
+ }
+
+ public IList<IUnresolvedTypeDefinition> NestedTypes {
+ get {
+ var result = LazyInit.VolatileRead(ref this.nestedTypes);
+ if (result != null) {
+ return result;
+ }
+ lock (loader.currentModule) {
+ if (this.nestedTypes != null)
+ return this.nestedTypes;
+ result = new List<IUnresolvedTypeDefinition>();
+ loader.InitNestedTypes(cecilTypeDef, this, result);
+ return LazyInit.GetOrSet(ref this.nestedTypes, FreezableHelper.FreezeList(result));
+ }
+ }
+ }
+
+ public IList<IUnresolvedMember> Members {
+ get {
+ var result = LazyInit.VolatileRead(ref this.members);
+ if (result != null) {
+ return result;
+ }
+ lock (loader.currentModule) {
+ if (this.members != null)
+ return this.members;
+ result = new List<IUnresolvedMember>();
+ loader.InitMembers(cecilTypeDef, this, result);
+ return LazyInit.GetOrSet(ref this.members, FreezableHelper.FreezeList(result));
+ }
+ }
+ }
+
+ public IEnumerable<IUnresolvedMethod> Methods {
+ get { return Members.OfType<IUnresolvedMethod>(); }
+ }
+
+ public IEnumerable<IUnresolvedProperty> Properties {
+ get { return Members.OfType<IUnresolvedProperty>(); }
+ }
+
+ public IEnumerable<IUnresolvedField> Fields {
+ get { return Members.OfType<IUnresolvedField>(); }
+ }
+
+ public IEnumerable<IUnresolvedEvent> Events {
+ get { return Members.OfType<IUnresolvedEvent>(); }
+ }
+
+ public bool AddDefaultConstructorIfRequired {
+ get { return kind == TypeKind.Struct || kind == TypeKind.Enum; }
+ }
+
+ public bool? HasExtensionMethods {
+ get { return flags[FlagHasExtensionMethods]; }
+ // we always return true or false, never null.
+ // FlagHasNoExtensionMethods is unused in LazyCecilTypeDefinition
+ }
+
+ public override object Clone()
+ {
+ throw new NotSupportedException();
+ }
+
+ public IType Resolve(ITypeResolveContext context)
+ {
+ if (context == null)
+ throw new ArgumentNullException("context");
+ if (context.CurrentAssembly == null)
+ throw new ArgumentException("An ITypeDefinition cannot be resolved in a context without a current assembly.");
+ return context.CurrentAssembly.GetTypeDefinition(this.FullTypeName)
+ ?? (IType)new UnknownType(this.Namespace, this.Name, this.TypeParameters.Count);
+ }
+
+ public ITypeResolveContext CreateResolveContext(ITypeResolveContext parentContext)
+ {
+ return parentContext;
+ }
+ }
+ #endregion
+
+ #region Read Method
+ [CLSCompliant(false)]
+ public IUnresolvedMethod ReadMethod(MethodDefinition method, IUnresolvedTypeDefinition parentType, SymbolKind methodType = SymbolKind.Method)
+ {
+ return ReadMethod(method, parentType, methodType, null);
+ }
+
+ IUnresolvedMethod ReadMethod(MethodDefinition method, IUnresolvedTypeDefinition parentType, SymbolKind methodType, IUnresolvedMember accessorOwner)
+ {
+ if (method == null)
+ return null;
+ DefaultUnresolvedMethod m = new DefaultUnresolvedMethod(parentType, method.Name);
+ m.SymbolKind = methodType;
+ m.AccessorOwner = accessorOwner;
+ m.HasBody = method.HasBody;
+ if (method.HasGenericParameters) {
+ for (int i = 0; i < method.GenericParameters.Count; i++) {
+ if (method.GenericParameters[i].Position != i)
+ throw new InvalidOperationException("g.Position != i");
+ m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(
+ SymbolKind.Method, i, method.GenericParameters[i].Name));
+ }
+ for (int i = 0; i < method.GenericParameters.Count; i++) {
+ var tp = (DefaultUnresolvedTypeParameter)m.TypeParameters[i];
+ AddConstraints(tp, method.GenericParameters[i]);
+ tp.ApplyInterningProvider(interningProvider);
+ }
+ }
+
+ m.ReturnType = ReadTypeReference(method.ReturnType, typeAttributes: method.MethodReturnType);
+
+ if (HasAnyAttributes(method))
+ AddAttributes(method, m.Attributes, m.ReturnTypeAttributes);
+ TranslateModifiers(method, m);
+
+ if (method.HasParameters) {
+ foreach (ParameterDefinition p in method.Parameters) {
+ m.Parameters.Add(ReadParameter(p));
+ }
+ }
+
+ // mark as extension method if the attribute is set
+ if (method.IsStatic && HasExtensionAttribute(method)) {
+ m.IsExtensionMethod = true;
+ }
+
+ int lastDot = method.Name.LastIndexOf('.');
+ if (lastDot >= 0 && method.HasOverrides) {
+ // To be consistent with the parser-initialized type system, shorten the method name:
+ m.Name = method.Name.Substring(lastDot + 1);
+ m.IsExplicitInterfaceImplementation = true;
+ foreach (var or in method.Overrides) {
+ m.ExplicitInterfaceImplementations.Add(new DefaultMemberReference(
+ accessorOwner != null ? SymbolKind.Accessor : SymbolKind.Method,
+ ReadTypeReference(or.DeclaringType),
+ or.Name, or.GenericParameters.Count, m.Parameters.Select(p => p.Type).ToList()));
+ }
+ }
+
+ FinishReadMember(m, method);
+ return m;
+ }
+
+ static bool HasExtensionAttribute(ICustomAttributeProvider provider)
+ {
+ if (provider.HasCustomAttributes) {
+ foreach (var attr in provider.CustomAttributes) {
+ if (attr.AttributeType.Name == "ExtensionAttribute" && attr.AttributeType.Namespace == "System.Runtime.CompilerServices")
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool IsVisible(MethodAttributes att)
+ {
+ att &= MethodAttributes.MemberAccessMask;
+ return IncludeInternalMembers
+ || att == MethodAttributes.Public
+ || att == MethodAttributes.Family
+ || att == MethodAttributes.FamORAssem;
+ }
+
+ static Accessibility GetAccessibility(MethodAttributes attr)
+ {
+ switch (attr & MethodAttributes.MemberAccessMask) {
+ case MethodAttributes.Public:
+ return Accessibility.Public;
+ case MethodAttributes.FamANDAssem:
+ return Accessibility.ProtectedAndInternal;
+ case MethodAttributes.Assembly:
+ return Accessibility.Internal;
+ case MethodAttributes.Family:
+ return Accessibility.Protected;
+ case MethodAttributes.FamORAssem:
+ return Accessibility.ProtectedOrInternal;
+ default:
+ return Accessibility.Private;
+ }
+ }
+
+ void TranslateModifiers(MethodDefinition method, AbstractUnresolvedMember m)
+ {
+ if (m.DeclaringTypeDefinition.Kind == TypeKind.Interface) {
+ // interface members don't have modifiers, but we want to handle them as "public abstract"
+ m.Accessibility = Accessibility.Public;
+ m.IsAbstract = true;
+ } else {
+ m.Accessibility = GetAccessibility(method.Attributes);
+ if (method.IsAbstract) {
+ m.IsAbstract = true;
+ m.IsOverride = !method.IsNewSlot;
+ } else if (method.IsFinal) {
+ if (!method.IsNewSlot) {
+ m.IsSealed = true;
+ m.IsOverride = true;
+ }
+ } else if (method.IsVirtual) {
+ if (method.IsNewSlot)
+ m.IsVirtual = true;
+ else
+ m.IsOverride = true;
+ }
+ m.IsStatic = method.IsStatic;
+ }
+ }
+ #endregion
+
+ #region Read Parameter
+ [CLSCompliant(false)]
+ public IUnresolvedParameter ReadParameter(ParameterDefinition parameter)
+ {
+ if (parameter == null)
+ throw new ArgumentNullException("parameter");
+ var type = ReadTypeReference(parameter.ParameterType, typeAttributes: parameter);
+ var p = new DefaultUnresolvedParameter(type, interningProvider.Intern(parameter.Name));
+
+ if (parameter.ParameterType is Mono.Cecil.ByReferenceType) {
+ if (!parameter.IsIn && parameter.IsOut)
+ p.IsOut = true;
+ else
+ p.IsRef = true;
+ }
+ AddAttributes(parameter, p);
+
+ if (parameter.IsOptional) {
+ p.DefaultValue = CreateSimpleConstantValue(type, parameter.Constant);
+ }
+
+ if (parameter.ParameterType is Mono.Cecil.ArrayType) {
+ foreach (CustomAttribute att in parameter.CustomAttributes) {
+ if (att.AttributeType.FullName == typeof(ParamArrayAttribute).FullName) {
+ p.IsParams = true;
+ break;
+ }
+ }
+ }
+
+ return interningProvider.Intern(p);
+ }
+ #endregion
+
+ #region Read Field
+ bool IsVisible(FieldAttributes att)
+ {
+ att &= FieldAttributes.FieldAccessMask;
+ return IncludeInternalMembers
+ || att == FieldAttributes.Public
+ || att == FieldAttributes.Family
+ || att == FieldAttributes.FamORAssem;
+ }
+
+ decimal? TryDecodeDecimalConstantAttribute(CustomAttribute attribute)
+ {
+ if (attribute.ConstructorArguments.Count != 5)
+ return null;
+
+ BlobReader reader = new BlobReader(attribute.GetBlob(), null);
+ if (reader.ReadUInt16() != 0x0001) {
+ Debug.WriteLine("Unknown blob prolog");
+ return null;
+ }
+
+ // DecimalConstantAttribute has the arguments (byte scale, byte sign, uint hi, uint mid, uint low) or (byte scale, byte sign, int hi, int mid, int low)
+ // Both of these invoke the Decimal constructor (int lo, int mid, int hi, bool isNegative, byte scale) with explicit argument conversions if required.
+ var ctorArgs = new object[attribute.ConstructorArguments.Count];
+ for (int i = 0; i < ctorArgs.Length; i++) {
+ switch (attribute.ConstructorArguments[i].Type.FullName) {
+ case "System.Byte":
+ ctorArgs[i] = reader.ReadByte();
+ break;
+ case "System.Int32":
+ ctorArgs[i] = reader.ReadInt32();
+ break;
+ case "System.UInt32":
+ ctorArgs[i] = unchecked((int)reader.ReadUInt32());
+ break;
+ default:
+ return null;
+ }
+ }
+
+ if (!ctorArgs.Select(a => a.GetType()).SequenceEqual(new[] { typeof(byte), typeof(byte), typeof(int), typeof(int), typeof(int) }))
+ return null;
+
+ return new decimal((int)ctorArgs[4], (int)ctorArgs[3], (int)ctorArgs[2], (byte)ctorArgs[1] != 0, (byte)ctorArgs[0]);
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedField ReadField(FieldDefinition field, IUnresolvedTypeDefinition parentType)
+ {
+ if (field == null)
+ throw new ArgumentNullException("field");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+
+ DefaultUnresolvedField f = new DefaultUnresolvedField(parentType, field.Name);
+ f.Accessibility = GetAccessibility(field.Attributes);
+ f.IsReadOnly = field.IsInitOnly;
+ f.IsStatic = field.IsStatic;
+ f.ReturnType = ReadTypeReference(field.FieldType, typeAttributes: field);
+ if (field.HasConstant) {
+ f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, field.Constant);
+ }
+ else {
+ var decConstant = field.CustomAttributes.FirstOrDefault(a => a.AttributeType.FullName == "System.Runtime.CompilerServices.DecimalConstantAttribute");
+ if (decConstant != null) {
+ var constValue = TryDecodeDecimalConstantAttribute(decConstant);
+ if (constValue != null)
+ f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, constValue);
+ }
+ }
+ AddAttributes(field, f);
+
+ RequiredModifierType modreq = field.FieldType as RequiredModifierType;
+ if (modreq != null && modreq.ModifierType.FullName == typeof(IsVolatile).FullName) {
+ f.IsVolatile = true;
+ }
+
+ FinishReadMember(f, field);
+ return f;
+ }
+
+ static Accessibility GetAccessibility(FieldAttributes attr)
+ {
+ switch (attr & FieldAttributes.FieldAccessMask) {
+ case FieldAttributes.Public:
+ return Accessibility.Public;
+ case FieldAttributes.FamANDAssem:
+ return Accessibility.ProtectedAndInternal;
+ case FieldAttributes.Assembly:
+ return Accessibility.Internal;
+ case FieldAttributes.Family:
+ return Accessibility.Protected;
+ case FieldAttributes.FamORAssem:
+ return Accessibility.ProtectedOrInternal;
+ default:
+ return Accessibility.Private;
+ }
+ }
+ #endregion
+
+ #region Type Parameter Constraints
+ void AddConstraints(DefaultUnresolvedTypeParameter tp, GenericParameter g)
+ {
+ switch (g.Attributes & GenericParameterAttributes.VarianceMask) {
+ case GenericParameterAttributes.Contravariant:
+ tp.Variance = VarianceModifier.Contravariant;
+ break;
+ case GenericParameterAttributes.Covariant:
+ tp.Variance = VarianceModifier.Covariant;
+ break;
+ }
+
+ tp.HasReferenceTypeConstraint = g.HasReferenceTypeConstraint;
+ tp.HasValueTypeConstraint = g.HasNotNullableValueTypeConstraint;
+ tp.HasDefaultConstructorConstraint = g.HasDefaultConstructorConstraint;
+
+ if (g.HasConstraints) {
+ foreach (TypeReference constraint in g.Constraints) {
+ tp.Constraints.Add(ReadTypeReference(constraint));
+ }
+ }
+ }
+ #endregion
+
+ #region Read Property
+
+ Accessibility MergePropertyAccessibility (Accessibility left, Accessibility right)
+ {
+ if (left == Accessibility.Public || right == Accessibility.Public)
+ return Accessibility.Public;
+
+ if (left == Accessibility.ProtectedOrInternal || right == Accessibility.ProtectedOrInternal)
+ return Accessibility.ProtectedOrInternal;
+
+ if (left == Accessibility.Protected && right == Accessibility.Internal ||
+ left == Accessibility.Internal && right == Accessibility.Protected)
+ return Accessibility.ProtectedOrInternal;
+
+ if (left == Accessibility.Protected || right == Accessibility.Protected)
+ return Accessibility.Protected;
+
+ if (left == Accessibility.Internal || right == Accessibility.Internal)
+ return Accessibility.Internal;
+
+ if (left == Accessibility.ProtectedAndInternal || right == Accessibility.ProtectedAndInternal)
+ return Accessibility.ProtectedAndInternal;
+
+ return left;
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedProperty ReadProperty(PropertyDefinition property, IUnresolvedTypeDefinition parentType, SymbolKind propertyType = SymbolKind.Property)
+ {
+ if (property == null)
+ throw new ArgumentNullException("property");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+ DefaultUnresolvedProperty p = new DefaultUnresolvedProperty(parentType, property.Name);
+ p.SymbolKind = propertyType;
+ TranslateModifiers(property.GetMethod ?? property.SetMethod, p);
+ if (property.GetMethod != null && property.SetMethod != null)
+ p.Accessibility = MergePropertyAccessibility (GetAccessibility (property.GetMethod.Attributes), GetAccessibility (property.SetMethod.Attributes));
+
+ p.ReturnType = ReadTypeReference(property.PropertyType, typeAttributes: property);
+
+ p.Getter = ReadMethod(property.GetMethod, parentType, SymbolKind.Accessor, p);
+ p.Setter = ReadMethod(property.SetMethod, parentType, SymbolKind.Accessor, p);
+
+ if (property.HasParameters) {
+ foreach (ParameterDefinition par in property.Parameters) {
+ p.Parameters.Add(ReadParameter(par));
+ }
+ }
+ AddAttributes(property, p);
+
+ var accessor = p.Getter ?? p.Setter;
+ if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
+ p.Name = property.Name.Substring(property.Name.LastIndexOf('.') + 1);
+ p.IsExplicitInterfaceImplementation = true;
+ foreach (var mr in accessor.ExplicitInterfaceImplementations) {
+ p.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
+ }
+ }
+
+ FinishReadMember(p, property);
+ return p;
+ }
+ #endregion
+
+ #region Read Event
+ [CLSCompliant(false)]
+ public IUnresolvedEvent ReadEvent(EventDefinition ev, IUnresolvedTypeDefinition parentType)
+ {
+ if (ev == null)
+ throw new ArgumentNullException("ev");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+
+ DefaultUnresolvedEvent e = new DefaultUnresolvedEvent(parentType, ev.Name);
+ TranslateModifiers(ev.AddMethod, e);
+ e.ReturnType = ReadTypeReference(ev.EventType, typeAttributes: ev);
+
+ e.AddAccessor = ReadMethod(ev.AddMethod, parentType, SymbolKind.Accessor, e);
+ e.RemoveAccessor = ReadMethod(ev.RemoveMethod, parentType, SymbolKind.Accessor, e);
+ e.InvokeAccessor = ReadMethod(ev.InvokeMethod, parentType, SymbolKind.Accessor, e);
+
+ AddAttributes(ev, e);
+
+ var accessor = e.AddAccessor ?? e.RemoveAccessor ?? e.InvokeAccessor;
+ if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
+ e.Name = ev.Name.Substring(ev.Name.LastIndexOf('.') + 1);
+ e.IsExplicitInterfaceImplementation = true;
+ foreach (var mr in accessor.ExplicitInterfaceImplementations) {
+ e.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
+ }
+ }
+
+ FinishReadMember(e, ev);
+
+ return e;
+ }
+ #endregion
+
+ #region FinishReadMember / Interning
+ void FinishReadMember(AbstractUnresolvedMember member, MemberReference cecilDefinition)
+ {
+ member.ApplyInterningProvider(interningProvider);
+ member.Freeze();
+ RegisterCecilObject(member, cecilDefinition);
+ }
+ #endregion
+
+ #region Type system translation table
+ readonly Dictionary<object, object> typeSystemTranslationTable;
+
+ void RegisterCecilObject(IUnresolvedEntity typeSystemObject, MemberReference cecilObject)
+ {
+ if (OnEntityLoaded != null)
+ OnEntityLoaded(typeSystemObject, cecilObject);
+
+ AddToTypeSystemTranslationTable(typeSystemObject, cecilObject);
+ }
+
+ void AddToTypeSystemTranslationTable(object typeSystemObject, object cecilObject)
+ {
+ if (typeSystemTranslationTable != null) {
+ // When lazy-loading, the dictionary might be shared between multiple cecil-loaders that are used concurrently
+ lock (typeSystemTranslationTable) {
+ typeSystemTranslationTable[typeSystemObject] = cecilObject;
+ }
+ }
+ }
+
+ T InternalGetCecilObject<T> (object typeSystemObject) where T : class
+ {
+ if (typeSystemObject == null)
+ throw new ArgumentNullException ("typeSystemObject");
+ if (!HasCecilReferences)
+ throw new NotSupportedException ("This instance contains no cecil references.");
+ object result;
+ lock (typeSystemTranslationTable) {
+ if (!typeSystemTranslationTable.TryGetValue (typeSystemObject, out result))
+ return null;
+ }
+ return result as T;
+ }
+
+ [CLSCompliant(false)]
+ public AssemblyDefinition GetCecilObject (IUnresolvedAssembly content)
+ {
+ return InternalGetCecilObject<AssemblyDefinition> (content);
+ }
+
+ [CLSCompliant(false)]
+ public TypeDefinition GetCecilObject (IUnresolvedTypeDefinition type)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ return InternalGetCecilObject<TypeDefinition> (type);
+ }
+
+ [CLSCompliant(false)]
+ public MethodDefinition GetCecilObject (IUnresolvedMethod method)
+ {
+ return InternalGetCecilObject<MethodDefinition> (method);
+ }
+
+ [CLSCompliant(false)]
+ public FieldDefinition GetCecilObject (IUnresolvedField field)
+ {
+ return InternalGetCecilObject<FieldDefinition> (field);
+ }
+
+ [CLSCompliant(false)]
+ public EventDefinition GetCecilObject (IUnresolvedEvent evt)
+ {
+ return InternalGetCecilObject<EventDefinition> (evt);
+ }
+
+ [CLSCompliant(false)]
+ public PropertyDefinition GetCecilObject (IUnresolvedProperty property)
+ {
+ return InternalGetCecilObject<PropertyDefinition> (property);
+ }
+ #endregion
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Cecil/ICSharpCode.NRefactory.Cecil.csproj b/external/nrefactory/ICSharpCode.NRefactory.Cecil/ICSharpCode.NRefactory.Cecil.csproj
new file mode 100644
index 0000000..dff9914
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Cecil/ICSharpCode.NRefactory.Cecil.csproj
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>ICSharpCode.NRefactory.Cecil</RootNamespace>
+ <AssemblyName>ICSharpCode.NRefactory.Cecil</AssemblyName>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\ICSharpCode.NRefactory\Properties\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="CecilLoader.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
+ <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
+ <Name>ICSharpCode.NRefactory</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
+ <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
+ <Name>Mono.Cecil</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Cecil/Properties/AssemblyInfo.cs b/external/nrefactory/ICSharpCode.NRefactory.Cecil/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ccb27b4
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Cecil/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Reflection;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("ICSharpCode.NRefactory.Cecil")]
+[assembly: AssemblyDescription("Cecil Assembly Loader for NRefactory")]
+
+[assembly: CLSCompliant(true)]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/FindReferencesConsistencyCheck.cs b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/FindReferencesConsistencyCheck.cs
index 3b4590e..1ad62c9 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/FindReferencesConsistencyCheck.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/FindReferencesConsistencyCheck.cs
@@ -84,8 +84,8 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck
//return entity.FullName != "ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultResolvedTypeDefinition.parts";
}
- Dictionary<EntityType, TimeSpan> timings = new Dictionary<EntityType, TimeSpan>();
- Dictionary<EntityType, int> entityCount = new Dictionary<EntityType, int>();
+ Dictionary<SymbolKind, TimeSpan> timings = new Dictionary<SymbolKind, TimeSpan>();
+ Dictionary<SymbolKind, int> entityCount = new Dictionary<SymbolKind, int>();
void TestFindReferences(IEntity entity)
{
@@ -119,10 +119,10 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck
}, CancellationToken.None);
}
w.Stop();
- if (timings.ContainsKey(entity.EntityType)) {
- timings[entity.EntityType] += w.Elapsed;
+ if (timings.ContainsKey(entity.SymbolKind)) {
+ timings[entity.SymbolKind] += w.Elapsed;
} else {
- timings[entity.EntityType] = w.Elapsed;
+ timings[entity.SymbolKind] = w.Elapsed;
}
@@ -151,10 +151,10 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck
}
}
- if (entityCount.ContainsKey(entity.EntityType)) {
- entityCount[entity.EntityType]++;
+ if (entityCount.ContainsKey(entity.SymbolKind)) {
+ entityCount[entity.SymbolKind]++;
} else {
- entityCount[entity.EntityType] = 1;
+ entityCount[entity.SymbolKind] = 1;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/ICSharpCode.NRefactory.ConsistencyCheck.csproj b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/ICSharpCode.NRefactory.ConsistencyCheck.csproj
index b9017e2..8036b4a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/ICSharpCode.NRefactory.ConsistencyCheck.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/ICSharpCode.NRefactory.ConsistencyCheck.csproj
@@ -7,7 +7,6 @@
<OutputType>Exe</OutputType>
<RootNamespace>ICSharpCode.NRefactory.ConsistencyCheck</RootNamespace>
<AssemblyName>ICSharpCode.NRefactory.ConsistencyCheck</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -16,6 +15,8 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<OutputPath>bin\$(Configuration)\</OutputPath>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -51,6 +52,34 @@
<DefineConstants>TRACE</DefineConstants>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Debug|x86' ">
+ <OutputPath>bin\net_4_5_Debug\</OutputPath>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|x86' ">
+ <OutputPath>bin\net_4_5_Release\</OutputPath>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Debug|AnyCPU' ">
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" />
@@ -104,8 +133,5 @@
<Name>ICSharpCode.NRefactory</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Folder Include="Xml" />
- </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Program.cs b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Program.cs
index 0cce00b..578a144 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Program.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Program.cs
@@ -85,7 +85,7 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck
public static IUnresolvedAssembly LoadAssembly(string assemblyFileName)
{
- return assemblyDict.GetOrAdd(assemblyFileName, file => new CecilLoader().LoadAssemblyFile(file));
+ return assemblyDict.GetOrAdd(assemblyFileName, file => AssemblyLoader.Create().LoadAssemblyFile(file));
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Solution.cs b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Solution.cs
index 633a696..ef249dd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Solution.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Solution.cs
@@ -82,7 +82,7 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck
/// </summary>
public IUnresolvedAssembly LoadAssembly(string assemblyFileName)
{
- return assemblyDict.GetOrAdd(assemblyFileName, file => new CecilLoader().LoadAssemblyFile(file));
+ return assemblyDict.GetOrAdd(assemblyFileName, file => AssemblyLoader.Create().LoadAssemblyFile(file));
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Xml/XmlReaderTest.cs b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Xml/XmlReaderTest.cs
index 46bacb6..feba28b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Xml/XmlReaderTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.ConsistencyCheck/Xml/XmlReaderTest.cs
@@ -34,21 +34,23 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck.Xml
{
public static void Run(string fileName)
{
+ bool includeAttributes = true;
var textSource = new StringTextSource(File.ReadAllText(fileName));
using (var textReader = textSource.CreateReader()) {
using (var xmlReader = new XmlTextReader(textReader)) {
- Run(xmlReader);
+ Run(xmlReader, includeAttributes);
}
}
var doc = new AXmlParser().Parse(textSource);
using (var xmlReader = doc.CreateReader()) {
- Run(xmlReader);
+ Run(xmlReader, includeAttributes);
}
var xmlDocument = new XmlDocument();
xmlDocument.Load(doc.CreateReader());
xmlDocument.Save(Path.Combine(Program.TempPath, "savedXmlDocument.xml"));
var xDocument = XDocument.Load(doc.CreateReader());
xDocument.Save(Path.Combine(Program.TempPath, "savedXDocument.xml"));
+ File.WriteAllText(Path.Combine(Program.TempPath, "inputDocument.xml"), textSource.Text);
}
static string CSV(IEnumerable<string> input)
@@ -57,11 +59,11 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck.Xml
}
static readonly string[] ignoredProperties = {
- "NameTable", "CanResolveEntity", "CanReadBinaryContent", "CanReadValueChunk", "EOF", "ValueType",
- "SchemaInfo", "IsDefault", "BaseURI", "Settings"
+ "NameTable", "CanResolveEntity", "CanReadBinaryContent", "CanReadValueChunk", "ValueType",
+ "SchemaInfo", "BaseURI", "Settings"
};
- public static void Run(XmlReader reader)
+ public static void Run(XmlReader reader, bool includeAttributes, bool includeAttributeValues = true)
{
using (StreamWriter output = File.CreateText(Path.Combine(Program.TempPath, reader.GetType().Name + "-output.csv"))) {
var properties = typeof(XmlReader).GetProperties(BindingFlags.Public | BindingFlags.Instance)
@@ -70,6 +72,16 @@ namespace ICSharpCode.NRefactory.ConsistencyCheck.Xml
output.WriteLine(CSV(properties.Select(p => p.Name)));
do {
output.WriteLine(CSV(properties.Select(p => ToString(p.GetValue(reader, null)))));
+ if (includeAttributes && reader.HasAttributes) {
+ for (int i = 0; i < reader.AttributeCount; i++) {
+ reader.MoveToAttribute(i);
+ output.WriteLine(CSV(properties.Select(p => ToString(p.GetValue(reader, null)))));
+ if (includeAttributeValues) {
+ reader.ReadAttributeValue();
+ output.WriteLine(CSV(properties.Select(p => ToString(p.GetValue(reader, null)))));
+ }
+ }
+ }
} while (reader.Read());
output.WriteLine(CSV(properties.Select(p => ToString(p.GetValue(reader, null)))));
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Demo/CSDemo.cs b/external/nrefactory/ICSharpCode.NRefactory.Demo/CSDemo.cs
index e6db120..bf9fd95 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Demo/CSDemo.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Demo/CSDemo.cs
@@ -148,7 +148,7 @@ namespace ICSharpCode.NRefactory.Demo
void CSharpGenerateCodeButtonClick(object sender, EventArgs e)
{
- csharpCodeTextBox.Text = syntaxTree.GetText();
+ csharpCodeTextBox.Text = syntaxTree.ToString();
}
int GetOffset(TextBox textBox, TextLocation location)
@@ -195,7 +195,7 @@ namespace ICSharpCode.NRefactory.Demo
0, assemblies.Length,
delegate (int i) {
Stopwatch w = Stopwatch.StartNew();
- CecilLoader loader = new CecilLoader();
+ AssemblyLoader loader = AssemblyLoader.Create();
projectContents[i] = loader.LoadAssemblyFile(assemblies[i].Location);
Debug.WriteLine(Path.GetFileName(assemblies[i].Location) + ": " + w.Elapsed);
});
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj b/external/nrefactory/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
index 8383039..a0e734e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<ProjectGuid>{9C19E629-C93E-4ACB-9A4B-13072B5AEF9D}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>ICSharpCode.NRefactory.Demo</RootNamespace>
<AssemblyName>ICSharpCode.NRefactory.Demo</AssemblyName>
@@ -53,9 +53,11 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Debug|x86' ">
<WarningLevel>4</WarningLevel>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Debug|AnyCPU' ">
<WarningLevel>4</WarningLevel>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Release' ">
<DebugType>PdbOnly</DebugType>
@@ -66,9 +68,11 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|x86' ">
<WarningLevel>4</WarningLevel>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
<WarningLevel>4</WarningLevel>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Demo/SemanticTreeDialog.cs b/external/nrefactory/ICSharpCode.NRefactory.Demo/SemanticTreeDialog.cs
index 79d43e4..7fb57b6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Demo/SemanticTreeDialog.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Demo/SemanticTreeDialog.cs
@@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.Demo
{
if (obj == null)
return new TreeNode(prefix + "null");
- if (obj is ResolveResult) {
+ if (obj is ResolveResult || (obj is Conversion && UseNodeForConversion((Conversion)obj))) {
TreeNode t = new TreeNode(prefix + obj.GetType().Name);
t.Tag = obj;
foreach (PropertyInfo p in obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) {
@@ -69,6 +69,11 @@ namespace ICSharpCode.NRefactory.Demo
}
}
+ bool UseNodeForConversion(Conversion conversion)
+ {
+ return conversion.IsMethodGroupConversion || conversion.IsUserDefined;
+ }
+
TreeNode MakePropertyNode(string propertyName, Type propertyType, object propertyValue)
{
if (propertyName == "IsError" && (propertyValue as bool?) == false)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/ICSharpCode.NRefactory.GtkDemo.csproj b/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/ICSharpCode.NRefactory.GtkDemo.csproj
index 6e576fa..67120e7 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/ICSharpCode.NRefactory.GtkDemo.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/ICSharpCode.NRefactory.GtkDemo.csproj
@@ -37,7 +37,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -46,28 +46,16 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>glib-sharp-2.0</Package>
- </Reference>
- <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>glade-sharp-2.0</Package>
- </Reference>
- <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="Mono.Posix" />
<Reference Include="System.Core" />
</ItemGroup>
@@ -111,6 +99,14 @@
<Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
<Name>ICSharpCode.NRefactory.CSharp</Name>
</ProjectReference>
+ <ProjectReference Include="..\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
+ <Project>{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}</Project>
+ <Name>ICSharpCode.NRefactory.Cecil</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
+ <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
+ <Name>Mono.Cecil</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="CSharpDemo.cs">
diff --git a/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/MainWindow.cs b/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/MainWindow.cs
index abb346d..cef66ee 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/MainWindow.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.GtkDemo/MainWindow.cs
@@ -107,7 +107,7 @@ namespace ICSharpCode.NRefactory.GtkDemo
void CSharpGenerateCodeButtonClick(object sender, EventArgs e)
{
- this.textview1.Buffer.Text = unit.GetText();
+ this.textview1.Buffer.Text = unit.ToString();
}
void SelectionChanged (object sender, EventArgs e)
@@ -253,7 +253,7 @@ namespace ICSharpCode.NRefactory.GtkDemo
0, assemblies.Length,
delegate (int i) {
Stopwatch w = Stopwatch.StartNew();
- CecilLoader loader = new CecilLoader();
+ AssemblyLoader loader = AssemblyLoader.Create();
projectContents[i] = loader.LoadAssemblyFile(assemblies[i].Location);
});
return projectContents;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.IKVM/ICSharpCode.NRefactory.IKVM.csproj b/external/nrefactory/ICSharpCode.NRefactory.IKVM/ICSharpCode.NRefactory.IKVM.csproj
new file mode 100644
index 0000000..9bbeef3
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.IKVM/ICSharpCode.NRefactory.IKVM.csproj
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A727169F-D94F-443F-B305-B057D7F3B420}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>ICSharpCode.NRefactory.IKVM</RootNamespace>
+ <AssemblyName>ICSharpCode.NRefactory.IKVM</AssemblyName>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\ICSharpCode.NRefactory\Properties\GlobalAssemblyInfo.cs">
+ <Link>Properties\GlobalAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="IkvmLoader.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\..\ikvm\reflect\IKVM.Reflection.csproj">
+ <Project>{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}</Project>
+ <Name>IKVM.Reflection</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
+ <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
+ <Name>ICSharpCode.NRefactory</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.IKVM/IkvmLoader.cs b/external/nrefactory/ICSharpCode.NRefactory.IKVM/IkvmLoader.cs
new file mode 100644
index 0000000..0e32829
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.IKVM/IkvmLoader.cs
@@ -0,0 +1,1485 @@
+//
+// IkvmLoader.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2010-2013 AlphaSierraPapa for the SharpDevelop Team
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Threading;
+using ICSharpCode.NRefactory.Documentation;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using ICSharpCode.NRefactory.Utils;
+using IKVM.Reflection;
+using System.IO;
+
+namespace ICSharpCode.NRefactory.TypeSystem
+{
+ /// <summary>
+ /// Allows loading an IProjectContent from an already compiled assembly.
+ /// </summary>
+ /// <remarks>Instance methods are not thread-safe; you need to create multiple instances of CecilLoader
+ /// if you want to load multiple project contents in parallel.</remarks>
+ public sealed class IkvmLoader : AssemblyLoader
+ {
+ /// <summary>
+ /// Version number of the ikvm loader.
+ /// Should be incremented when fixing bugs in the ikvm loader so that project contents cached on disk
+ /// (which might be incorrect due to the bug) are re-created.
+ /// </summary>
+ const int ikvmLoaderVersion = 1;
+
+ #region Options
+ // Most options are defined in the AssemblyLoader base class
+
+ /// <summary>
+ /// This delegate gets executed whenever an entity was loaded.
+ /// </summary>
+ /// <remarks>
+ /// This callback may be to build a dictionary that maps between
+ /// entities and cecil objects.
+ /// Warning: if delay-loading is used and the type system is accessed by multiple threads,
+ /// the callback may be invoked concurrently on multiple threads.
+ /// </remarks>
+ public Action<IUnresolvedEntity, MemberInfo> OnEntityLoaded { get; set; }
+ #endregion
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.TypeSystem.IkvmLoader"/> class.
+ /// </summary>
+ public IkvmLoader()
+ {
+ }
+
+ #region Load Assembly From Disk
+
+ public override IUnresolvedAssembly LoadAssemblyFile(string fileName)
+ {
+ if (fileName == null)
+ throw new ArgumentNullException("fileName");
+
+ using (var universe = new Universe (UniverseOptions.DisablePseudoCustomAttributeRetrieval | UniverseOptions.SupressReferenceTypeIdentityConversion)) {
+ universe.AssemblyResolve += delegate(object sender, IKVM.Reflection.ResolveEventArgs args) {
+ return universe.CreateMissingAssembly(args.Name);
+ };
+
+ return LoadAssembly (universe.LoadFile (fileName));
+ }
+ }
+
+ public IUnresolvedAssembly LoadAssemblyFile(string fileName, Stream stream)
+ {
+ if (fileName == null)
+ throw new ArgumentNullException("fileName");
+
+ using (var universe = new Universe (UniverseOptions.DisablePseudoCustomAttributeRetrieval | UniverseOptions.SupressReferenceTypeIdentityConversion)) {
+ universe.AssemblyResolve += delegate(object sender, IKVM.Reflection.ResolveEventArgs args) {
+ return universe.CreateMissingAssembly(args.Name);
+ };
+ using (RawModule module = universe.OpenRawModule (stream, fileName)) {
+ return LoadAssembly (universe.LoadAssembly (module));
+ }
+
+ }
+ }
+ #endregion
+
+ IkvmUnresolvedAssembly currentAssembly;
+ Assembly currentAssemblyDefinition;
+
+ /// <summary>
+ /// Loads the assembly definition into a project content.
+ /// </summary>
+ /// <returns>Unresolved type system representing the assembly</returns>
+
+ [CLSCompliant(false)]
+ public IUnresolvedAssembly LoadAssembly(Assembly assembly)
+ {
+ if (assembly == null)
+ throw new ArgumentNullException ("assembly");
+
+ // Read assembly and module attributes
+ IList<IUnresolvedAttribute> assemblyAttributes = new List<IUnresolvedAttribute>();
+ IList<IUnresolvedAttribute> moduleAttributes = new List<IUnresolvedAttribute>();
+ AddAttributes(assembly, assemblyAttributes);
+ AddAttributes(assembly.ManifestModule, moduleAttributes);
+
+ assemblyAttributes = interningProvider.InternList(assemblyAttributes);
+ moduleAttributes = interningProvider.InternList(moduleAttributes);
+
+ currentAssemblyDefinition = assembly;
+ currentAssembly = new IkvmUnresolvedAssembly (assembly.FullName, DocumentationProvider);
+ currentAssembly.Location = assembly.Location;
+ currentAssembly.AssemblyAttributes.AddRange(assemblyAttributes);
+ currentAssembly.ModuleAttributes.AddRange(moduleAttributes);
+ // Register type forwarders:
+ foreach (var type in assembly.ManifestModule.__GetExportedTypes ()) {
+ if (type.Assembly != assembly) {
+ int typeParameterCount;
+ string ns = type.Namespace;
+ string name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out typeParameterCount);
+ ns = interningProvider.Intern(ns);
+ name = interningProvider.Intern(name);
+ var typeRef = new GetClassTypeReference(GetAssemblyReference(type.Assembly), ns, name, typeParameterCount);
+ typeRef = interningProvider.Intern(typeRef);
+ var key = new TopLevelTypeName(ns, name, typeParameterCount);
+ currentAssembly.AddTypeForwarder(key, typeRef);
+ }
+ }
+
+ // Create and register all types:
+ var ikvmTypeDefs = new List<IKVM.Reflection.Type>();
+ var typeDefs = new List<DefaultUnresolvedTypeDefinition>();
+
+ foreach (var td in assembly.GetTypes ()) {
+ if (td.DeclaringType != null)
+ continue;
+ CancellationToken.ThrowIfCancellationRequested();
+
+ if (IncludeInternalMembers || td.IsPublic) {
+ string name = td.Name;
+ if (name.Length == 0)
+ continue;
+
+ var t = CreateTopLevelTypeDefinition(td);
+ ikvmTypeDefs.Add(td);
+ typeDefs.Add(t);
+ currentAssembly.AddTypeDefinition(t);
+ // The registration will happen after the members are initialized
+ }
+ }
+
+ // Initialize the type's members:
+ for (int i = 0; i < typeDefs.Count; i++) {
+ InitTypeDefinition(ikvmTypeDefs[i], typeDefs[i]);
+ }
+
+ // Freezing the assembly here is important:
+ // otherwise it will be frozen when a compilation is first created
+ // from it. But freezing has the effect of changing some collection instances
+ // (to ReadOnlyCollection). This hidden mutation was causing a crash
+ // when the FastSerializer was saving the assembly at the same time as
+ // the first compilation was created from it.
+ // By freezing the assembly now, we ensure it is usable on multiple
+ // threads without issues.
+ currentAssembly.Freeze();
+
+ var result = currentAssembly;
+ currentAssembly = null;
+ return result;
+ }
+
+ #region IUnresolvedAssembly implementation
+ [Serializable, FastSerializerVersion(ikvmLoaderVersion)]
+ sealed class IkvmUnresolvedAssembly : DefaultUnresolvedAssembly, IDocumentationProvider
+ {
+ readonly IDocumentationProvider documentationProvider;
+
+ public IkvmUnresolvedAssembly(string fullAssemblyName, IDocumentationProvider documentationProvider)
+ : base(fullAssemblyName)
+ {
+ this.documentationProvider = documentationProvider;
+ }
+
+ DocumentationComment IDocumentationProvider.GetDocumentation(IEntity entity)
+ {
+ if (documentationProvider != null)
+ return documentationProvider.GetDocumentation (entity);
+ return null;
+ }
+ }
+ #endregion
+
+ #region Read Type Reference
+ /// <summary>
+ /// Reads a type reference.
+ /// </summary>
+ /// <param name="type">The Cecil type reference that should be converted into
+ /// a type system type reference.</param>
+ /// <param name="typeAttributes">Attributes associated with the Cecil type reference.
+ /// This is used to support the 'dynamic' type.</param>
+ [CLSCompliant(false)]
+ public ITypeReference ReadTypeReference(IKVM.Reflection.Type type, IEnumerable<CustomAttributeData> typeAttributes = null)
+ {
+ int typeIndex = 0;
+ return CreateTypeReference(type, typeAttributes, ref typeIndex);
+ }
+
+ ITypeReference CreateTypeReference(IKVM.Reflection.Type type, IEnumerable<CustomAttributeData> typeAttributes, ref int typeIndex)
+ {
+ // TODO:
+ // while (type is OptionalModifierType || type is RequiredModifierType) {
+ // type = ((TypeSpecification)type).ElementType;
+ // }
+
+ if (type == null) {
+ return SpecialType.UnknownType;
+ }
+ if (type.IsByRef) {
+ typeIndex++;
+ return interningProvider.Intern (
+ new ByReferenceTypeReference (
+ CreateTypeReference (
+ type.GetElementType (),
+ typeAttributes, ref typeIndex)));
+ }
+ if (type.IsPointer) {
+ typeIndex++;
+ return interningProvider.Intern (
+ new PointerTypeReference (
+ CreateTypeReference (
+ type.GetElementType (),
+ typeAttributes, ref typeIndex)));
+ }
+ if (type.IsArray) {
+ typeIndex++;
+ return interningProvider.Intern (
+ new ArrayTypeReference (
+ CreateTypeReference (
+ type.GetElementType (),
+ typeAttributes, ref typeIndex),
+ type.GetArrayRank ()));
+ }
+ if (type.IsConstructedGenericType) {
+ ITypeReference baseType = CreateTypeReference (type.GetGenericTypeDefinition (), typeAttributes, ref typeIndex);
+ var args = type.GetGenericArguments ();
+ var para = new ITypeReference[args.Length];
+ for (int i = 0; i < para.Length; ++i) {
+ typeIndex++;
+ para [i] = CreateTypeReference (args [i], typeAttributes, ref typeIndex);
+ }
+ return interningProvider.Intern (new ParameterizedTypeReference (baseType, para));
+ }
+ if (type.IsGenericParameter) {
+ return TypeParameterReference.Create (type.DeclaringMethod != null ? SymbolKind.Method : SymbolKind.TypeDefinition, type.GenericParameterPosition);
+ }
+ if (type.IsNested) {
+ ITypeReference typeRef = CreateTypeReference (type.DeclaringType, typeAttributes, ref typeIndex);
+ int partTypeParameterCount;
+ string namepart = ReflectionHelper.SplitTypeParameterCountFromReflectionName (type.Name, out partTypeParameterCount);
+ namepart = interningProvider.Intern (namepart);
+ return interningProvider.Intern (new NestedTypeReference (typeRef, namepart, partTypeParameterCount));
+ }
+
+ string ns = interningProvider.Intern (type.Namespace ?? string.Empty);
+ string name = type.Name;
+ if (name == null)
+ throw new InvalidOperationException ("type.Name returned null. Type: " + type);
+
+ if (name == "Object" && ns == "System" && HasDynamicAttribute (typeAttributes, typeIndex)) {
+ return SpecialType.Dynamic;
+ }
+ int typeParameterCount;
+ name = ReflectionHelper.SplitTypeParameterCountFromReflectionName (name, out typeParameterCount);
+ name = interningProvider.Intern (name);
+ if (currentAssembly != null) {
+ var c = currentAssembly.GetTypeDefinition (ns, name, typeParameterCount);
+ if (c != null)
+ return c;
+ }
+ return interningProvider.Intern (new GetClassTypeReference (GetAssemblyReference (type.Assembly), ns, name, typeParameterCount));
+ }
+
+ IAssemblyReference GetAssemblyReference(Assembly scope)
+ {
+ if (scope == null || scope == currentAssemblyDefinition)
+ return DefaultAssemblyReference.CurrentAssembly;
+ return interningProvider.Intern (new DefaultAssemblyReference (scope.FullName));
+ }
+
+ static bool HasDynamicAttribute(IEnumerable<CustomAttributeData> attributeProvider, int typeIndex)
+ {
+ if (attributeProvider == null)
+ return false;
+ foreach (var a in attributeProvider) {
+ var declaringType = a.Constructor.DeclaringType;
+ if (declaringType.__Name == "DynamicAttribute" && declaringType.__Namespace == "System.Runtime.CompilerServices") {
+ if (a.ConstructorArguments.Count == 1) {
+ var values = a.ConstructorArguments[0].Value as CustomAttributeTypedArgument[];
+ if (values != null && typeIndex < values.Length && values[typeIndex].Value is bool) {
+ return (bool)values [typeIndex].Value;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+ #endregion
+
+ #region Read Attributes
+ #region Assembly Attributes
+ static readonly ITypeReference assemblyVersionAttributeTypeRef = typeof(System.Reflection.AssemblyVersionAttribute).ToTypeReference();
+
+ void AddAttributes(Assembly assembly, IList<IUnresolvedAttribute> outputList)
+ {
+ AddCustomAttributes(assembly.CustomAttributes, outputList);
+ AddSecurityAttributes(CustomAttributeData.__GetDeclarativeSecurity (assembly), outputList);
+
+ // AssemblyVersionAttribute
+ if (assembly.GetName ().Version != null) {
+ var assemblyVersion = new DefaultUnresolvedAttribute(assemblyVersionAttributeTypeRef, new[] { KnownTypeReference.String });
+ assemblyVersion.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, assembly.GetName ().Version.ToString()));
+ outputList.Add(interningProvider.Intern(assemblyVersion));
+ }
+ }
+
+ IConstantValue CreateSimpleConstantValue(ITypeReference type, object value)
+ {
+ if (ReferenceEquals (value, Missing.Value))
+ return null;
+ return interningProvider.Intern(new SimpleConstantValue(type, interningProvider.InternValue(value)));
+ }
+ #endregion
+
+ #region Module Attributes
+ void AddAttributes(Module module, IList<IUnresolvedAttribute> outputList)
+ {
+ AddCustomAttributes(module.CustomAttributes, outputList);
+ }
+ #endregion
+
+ #region Parameter Attributes
+ static readonly IUnresolvedAttribute inAttribute = new DefaultUnresolvedAttribute(typeof(InAttribute).ToTypeReference());
+ static readonly IUnresolvedAttribute outAttribute = new DefaultUnresolvedAttribute(typeof(OutAttribute).ToTypeReference());
+
+ void AddAttributes(ParameterInfo parameter, DefaultUnresolvedParameter targetParameter, IEnumerable<CustomAttributeData> customAttributes)
+ {
+ if (!targetParameter.IsOut) {
+ if (parameter.IsIn)
+ targetParameter.Attributes.Add(inAttribute);
+ if (parameter.IsOut)
+ targetParameter.Attributes.Add(outAttribute);
+ }
+ AddCustomAttributes(customAttributes, targetParameter.Attributes);
+
+ FieldMarshal marshalInfo;
+ if (parameter.__TryGetFieldMarshal (out marshalInfo)) {
+ targetParameter.Attributes.Add(ConvertMarshalInfo(marshalInfo));
+ }
+ }
+ #endregion
+
+ #region Method Attributes
+ static readonly ITypeReference dllImportAttributeTypeRef = typeof(DllImportAttribute).ToTypeReference();
+ static readonly SimpleConstantValue trueValue = new SimpleConstantValue(KnownTypeReference.Boolean, true);
+ static readonly SimpleConstantValue falseValue = new SimpleConstantValue(KnownTypeReference.Boolean, false);
+ static readonly ITypeReference callingConventionTypeRef = typeof(CallingConvention).ToTypeReference();
+ static readonly IUnresolvedAttribute preserveSigAttribute = new DefaultUnresolvedAttribute(typeof(PreserveSigAttribute).ToTypeReference());
+ static readonly ITypeReference methodImplAttributeTypeRef = typeof(MethodImplAttribute).ToTypeReference();
+ static readonly ITypeReference methodImplOptionsTypeRef = typeof(MethodImplOptions).ToTypeReference();
+
+ static bool HasAnyAttributes(MethodInfo methodDefinition)
+ {
+ if ((methodDefinition.Attributes & MethodAttributes.PinvokeImpl) != 0)
+ return true;
+
+ if ((methodDefinition.MethodImplementationFlags & MethodImplAttributes.CodeTypeMask) != 0)
+ return true;
+ if ((methodDefinition.ReturnParameter.Attributes & ParameterAttributes.HasFieldMarshal) != 0)
+ return true;
+ return methodDefinition.CustomAttributes.Any ();
+ }
+
+ static bool HasAnyAttributes(ConstructorInfo methodDefinition)
+ {
+ if ((methodDefinition.Attributes & MethodAttributes.PinvokeImpl) != 0)
+ return true;
+
+ if ((methodDefinition.MethodImplementationFlags & MethodImplAttributes.CodeTypeMask) != 0)
+ return true;
+ return methodDefinition.CustomAttributes.Any ();
+ }
+
+ void AddAttributes(MethodInfo methodDefinition, IList<IUnresolvedAttribute> attributes, ICollection<IUnresolvedAttribute> returnTypeAttributes)
+ {
+ var implAttributes = methodDefinition.MethodImplementationFlags;
+
+ #region DllImportAttribute
+ if ((methodDefinition.Attributes & MethodAttributes.PinvokeImpl) != 0) {
+
+ ImplMapFlags flags;
+ string importName;
+ string importScope;
+ if (methodDefinition.__TryGetImplMap(out flags, out importName, out importScope)) {
+ var dllImport = new DefaultUnresolvedAttribute(dllImportAttributeTypeRef, new[] { KnownTypeReference.String });
+ dllImport.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, importScope));
+
+
+ if ((flags & ImplMapFlags.BestFitOff) != 0)
+ dllImport.AddNamedFieldArgument("BestFitMapping", falseValue);
+ if ((flags & ImplMapFlags.BestFitOn) != 0)
+ dllImport.AddNamedFieldArgument("BestFitMapping", trueValue);
+
+ CallingConvention callingConvention;
+ switch (flags & ImplMapFlags.CallConvMask) {
+ case (ImplMapFlags)0:
+ Debug.WriteLine ("P/Invoke calling convention not set on:" + methodDefinition.Name);
+ callingConvention = 0;
+ break;
+ case ImplMapFlags.CallConvCdecl:
+ callingConvention = CallingConvention.Cdecl;
+ break;
+ case ImplMapFlags.CallConvFastcall:
+ callingConvention = CallingConvention.FastCall;
+ break;
+ case ImplMapFlags.CallConvStdcall:
+ callingConvention = CallingConvention.StdCall;
+ break;
+ case ImplMapFlags.CallConvThiscall:
+ callingConvention = CallingConvention.ThisCall;
+ break;
+ case ImplMapFlags.CallConvWinapi:
+ callingConvention = CallingConvention.Winapi;
+ break;
+ default:
+ throw new NotSupportedException("unknown calling convention");
+ }
+ if (callingConvention != CallingConvention.Winapi)
+ dllImport.AddNamedFieldArgument("CallingConvention", CreateSimpleConstantValue(callingConventionTypeRef, (int)callingConvention));
+
+ CharSet charSet = CharSet.None;
+ switch (flags & ImplMapFlags.CharSetMask) {
+ case ImplMapFlags.CharSetAnsi:
+ charSet = CharSet.Ansi;
+ break;
+ case ImplMapFlags.CharSetAuto:
+ charSet = CharSet.Auto;
+ break;
+ case ImplMapFlags.CharSetUnicode:
+ charSet = CharSet.Unicode;
+ break;
+ }
+ if (charSet != CharSet.None)
+ dllImport.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
+
+ if (!string.IsNullOrEmpty(importName) && importName != methodDefinition.Name)
+ dllImport.AddNamedFieldArgument("EntryPoint", CreateSimpleConstantValue(KnownTypeReference.String, importName));
+
+ if ((flags & ImplMapFlags.NoMangle) != 0)
+ dllImport.AddNamedFieldArgument("ExactSpelling", trueValue);
+
+ if ((implAttributes & MethodImplAttributes.PreserveSig) == MethodImplAttributes.PreserveSig)
+ implAttributes &= ~MethodImplAttributes.PreserveSig;
+ else
+ dllImport.AddNamedFieldArgument("PreserveSig", falseValue);
+
+ if ((flags & ImplMapFlags.SupportsLastError) != 0)
+ dllImport.AddNamedFieldArgument("SetLastError", trueValue);
+
+ if ((flags & ImplMapFlags.CharMapErrorOff) != 0)
+ dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", falseValue);
+ if ((flags & ImplMapFlags.CharMapErrorOn) != 0)
+ dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", trueValue);
+
+ attributes.Add(interningProvider.Intern(dllImport));
+ }
+ }
+ #endregion
+
+ #region PreserveSigAttribute
+ if (implAttributes == MethodImplAttributes.PreserveSig) {
+ attributes.Add(preserveSigAttribute);
+ implAttributes = (MethodImplAttributes)0;
+ }
+ #endregion
+
+ #region MethodImplAttribute
+ if (implAttributes != MethodImplAttributes.IL) {
+ var methodImpl = new DefaultUnresolvedAttribute(methodImplAttributeTypeRef, new[] { methodImplOptionsTypeRef });
+ methodImpl.PositionalArguments.Add(CreateSimpleConstantValue(methodImplOptionsTypeRef, (int)implAttributes));
+ attributes.Add(interningProvider.Intern(methodImpl));
+ }
+ #endregion
+
+ var customAttributes = methodDefinition.CustomAttributes;
+ AddCustomAttributes (customAttributes, attributes);
+
+ if ((methodDefinition.Attributes & MethodAttributes.HasSecurity) != 0) {
+ AddSecurityAttributes(CustomAttributeData.__GetDeclarativeSecurity (methodDefinition), attributes);
+ }
+
+ FieldMarshal marshalInfo;
+ if (methodDefinition.ReturnParameter.__TryGetFieldMarshal (out marshalInfo)) {
+ returnTypeAttributes.Add(ConvertMarshalInfo(marshalInfo));
+ }
+// TODO: Not needed in ikvm - maybe a work around for a cecil bug ?
+// AddCustomAttributes(methodDefinition.ReturnType.CustomAttributes, returnTypeAttributes);
+ }
+
+ void AddAttributes(ConstructorInfo methodDefinition, IList<IUnresolvedAttribute> attributes, IList<IUnresolvedAttribute> returnTypeAttributes)
+ {
+ var implAttributes = methodDefinition.MethodImplementationFlags;
+
+ #region PreserveSigAttribute
+ if (implAttributes == MethodImplAttributes.PreserveSig) {
+ attributes.Add(preserveSigAttribute);
+ implAttributes = 0;
+ }
+ #endregion
+
+ #region MethodImplAttribute
+ if (implAttributes != MethodImplAttributes.IL) {
+ var methodImpl = new DefaultUnresolvedAttribute(methodImplAttributeTypeRef, new[] { methodImplOptionsTypeRef });
+ methodImpl.PositionalArguments.Add(CreateSimpleConstantValue(methodImplOptionsTypeRef, (int)implAttributes));
+ attributes.Add(interningProvider.Intern(methodImpl));
+ }
+ #endregion
+
+ AddCustomAttributes(methodDefinition.CustomAttributes, attributes);
+
+ if ((methodDefinition.Attributes & MethodAttributes.HasSecurity) != 0) {
+ AddSecurityAttributes(CustomAttributeData.__GetDeclarativeSecurity (methodDefinition), attributes);
+ }
+ }
+ #endregion
+
+ #region Type Attributes
+ static readonly DefaultUnresolvedAttribute serializableAttribute = new DefaultUnresolvedAttribute(typeof(SerializableAttribute).ToTypeReference());
+ static readonly DefaultUnresolvedAttribute comImportAttribute = new DefaultUnresolvedAttribute(typeof(ComImportAttribute).ToTypeReference());
+ static readonly ITypeReference structLayoutAttributeTypeRef = typeof(StructLayoutAttribute).ToTypeReference();
+ static readonly ITypeReference layoutKindTypeRef = typeof(LayoutKind).ToTypeReference();
+ static readonly ITypeReference charSetTypeRef = typeof(CharSet).ToTypeReference();
+
+ void AddAttributes(IKVM.Reflection.Type typeDefinition, IUnresolvedTypeDefinition targetEntity)
+ {
+ // SerializableAttribute
+ if (typeDefinition.IsSerializable)
+ targetEntity.Attributes.Add(serializableAttribute);
+
+ // ComImportAttribute
+ if (typeDefinition.IsImport)
+ targetEntity.Attributes.Add(comImportAttribute);
+
+ #region StructLayoutAttribute
+ LayoutKind layoutKind = LayoutKind.Auto;
+ switch (typeDefinition.Attributes & TypeAttributes.LayoutMask) {
+ case TypeAttributes.SequentialLayout:
+ layoutKind = LayoutKind.Sequential;
+ break;
+ case TypeAttributes.ExplicitLayout:
+ layoutKind = LayoutKind.Explicit;
+ break;
+ }
+ CharSet charSet = CharSet.None;
+ switch (typeDefinition.Attributes & TypeAttributes.StringFormatMask) {
+ case TypeAttributes.AnsiClass:
+ charSet = CharSet.Ansi;
+ break;
+ case TypeAttributes.AutoClass:
+ charSet = CharSet.Auto;
+ break;
+ case TypeAttributes.UnicodeClass:
+ charSet = CharSet.Unicode;
+ break;
+ }
+
+
+ int packingSize;
+ int typeSize;
+ if (typeDefinition.__GetLayout (out packingSize, out typeSize)) {
+ LayoutKind defaultLayoutKind = (typeDefinition.IsValueType && !typeDefinition.IsEnum) ? LayoutKind.Sequential: LayoutKind.Auto;
+ if (layoutKind != defaultLayoutKind || charSet != CharSet.Ansi || packingSize > 0 || typeSize > 0) {
+ var structLayout = new DefaultUnresolvedAttribute(structLayoutAttributeTypeRef, new[] { layoutKindTypeRef });
+ structLayout.PositionalArguments.Add(CreateSimpleConstantValue(layoutKindTypeRef, (int)layoutKind));
+ if (charSet != CharSet.Ansi) {
+ structLayout.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
+ }
+ if (packingSize > 0) {
+ structLayout.AddNamedFieldArgument("Pack", CreateSimpleConstantValue(KnownTypeReference.Int32, packingSize));
+ }
+ if (typeSize > 0) {
+ structLayout.AddNamedFieldArgument("Size", CreateSimpleConstantValue(KnownTypeReference.Int32, typeSize));
+ }
+ targetEntity.Attributes.Add(interningProvider.Intern(structLayout));
+ }
+ }
+ #endregion
+
+ AddCustomAttributes(typeDefinition.CustomAttributes, targetEntity.Attributes);
+
+ if ((typeDefinition.Attributes & TypeAttributes.HasSecurity) != 0) {
+ AddSecurityAttributes(CustomAttributeData.__GetDeclarativeSecurity(typeDefinition), targetEntity.Attributes);
+ }
+ }
+ #endregion
+
+ #region Field Attributes
+ static readonly ITypeReference fieldOffsetAttributeTypeRef = typeof(FieldOffsetAttribute).ToTypeReference();
+ static readonly IUnresolvedAttribute nonSerializedAttribute = new DefaultUnresolvedAttribute(typeof(NonSerializedAttribute).ToTypeReference());
+
+ void AddAttributes(FieldInfo fieldDefinition, IUnresolvedEntity targetEntity)
+ {
+ // FieldOffsetAttribute
+ int fOffset;
+ if (fieldDefinition.__TryGetFieldOffset(out fOffset)) {
+ var fieldOffset = new DefaultUnresolvedAttribute(fieldOffsetAttributeTypeRef, new[] { KnownTypeReference.Int32 });
+ fieldOffset.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.Int32, fOffset));
+ targetEntity.Attributes.Add(interningProvider.Intern(fieldOffset));
+ }
+
+ // NonSerializedAttribute
+ if (fieldDefinition.IsNotSerialized) {
+ targetEntity.Attributes.Add(nonSerializedAttribute);
+ }
+ FieldMarshal marshal;
+ if (fieldDefinition.__TryGetFieldMarshal (out marshal))
+ targetEntity.Attributes.Add(ConvertMarshalInfo(marshal));
+
+ AddCustomAttributes(fieldDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ #endregion
+
+ #region Event Attributes
+ void AddAttributes(EventInfo eventDefinition, IUnresolvedEntity targetEntity)
+ {
+ AddCustomAttributes(eventDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ #endregion
+
+ #region Property Attributes
+ void AddAttributes(PropertyInfo propertyDefinition, IUnresolvedEntity targetEntity)
+ {
+ AddCustomAttributes(propertyDefinition.CustomAttributes, targetEntity.Attributes);
+ }
+ #endregion
+
+ #region MarshalAsAttribute (ConvertMarshalInfo)
+ static readonly ITypeReference marshalAsAttributeTypeRef = typeof(MarshalAsAttribute).ToTypeReference();
+ static readonly ITypeReference unmanagedTypeTypeRef = typeof(UnmanagedType).ToTypeReference();
+
+
+ IUnresolvedAttribute ConvertMarshalInfo(FieldMarshal marshalInfo)
+ {
+ DefaultUnresolvedAttribute attr = new DefaultUnresolvedAttribute(marshalAsAttributeTypeRef, new[] { unmanagedTypeTypeRef });
+ attr.PositionalArguments.Add(CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)marshalInfo.UnmanagedType));
+
+
+ if (marshalInfo.UnmanagedType ==UnmanagedType.ByValArray) {
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)marshalInfo.SizeConst));
+ if (marshalInfo.ArraySubType.HasValue)
+ attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)marshalInfo.ArraySubType.Value));
+ }
+
+ if (marshalInfo.UnmanagedType ==UnmanagedType.SafeArray) {
+ attr.AddNamedFieldArgument("SafeArraySubType", CreateSimpleConstantValue(typeof(VarEnum).ToTypeReference(), (int)marshalInfo.SafeArraySubType));
+ }
+
+ if (marshalInfo.UnmanagedType == UnmanagedType.LPArray) {
+ if (marshalInfo.ArraySubType != null)
+ attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)marshalInfo.ArraySubType));
+ if (marshalInfo.SizeConst >= 0)
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)marshalInfo.SizeConst));
+ if (marshalInfo.SizeParamIndex >= 0)
+ attr.AddNamedFieldArgument("SizeParamIndex", CreateSimpleConstantValue(KnownTypeReference.Int16, (short)marshalInfo.SizeParamIndex));
+ }
+
+ if (marshalInfo.UnmanagedType == UnmanagedType.CustomMarshaler) {
+ attr.AddNamedFieldArgument("MarshalType", CreateSimpleConstantValue(KnownTypeReference.String, marshalInfo.MarshalType));
+ if (!string.IsNullOrEmpty(marshalInfo.MarshalCookie))
+ attr.AddNamedFieldArgument("MarshalCookie", CreateSimpleConstantValue(KnownTypeReference.String, marshalInfo.MarshalCookie));
+ }
+
+ if (marshalInfo.UnmanagedType == UnmanagedType.ByValTStr) {
+ attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)marshalInfo.SizeConst));
+ }
+
+ return InterningProvider.Intern(attr);
+ }
+ #endregion
+
+ #region Custom Attributes (ReadAttribute)
+ void AddCustomAttributes(IEnumerable<CustomAttributeData> attributes, ICollection<IUnresolvedAttribute> targetCollection)
+ {
+ foreach (var cecilAttribute in attributes) {
+ var type = cecilAttribute.Constructor.DeclaringType;
+ if (type.__Namespace == "System.Runtime.CompilerServices") {
+ if (type.__Name == "DynamicAttribute" || type.__Name == "ExtensionAttribute" || type.__Name == "DecimalConstantAttribute")
+ continue;
+ } else if (type.__Name == "ParamArrayAttribute" && type.__Namespace == "System") {
+ continue;
+ }
+ targetCollection.Add(ReadAttribute(cecilAttribute));
+ }
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedAttribute ReadAttribute(CustomAttributeData attribute)
+ {
+ if (attribute == null)
+ throw new ArgumentNullException("attribute");
+ var ctor = attribute.Constructor;
+ ITypeReference attributeType = ReadTypeReference(attribute.AttributeType);
+ IList<ITypeReference> ctorParameterTypes = EmptyList<ITypeReference>.Instance;
+ var parameters = ctor.GetParameters ();
+ if (parameters.Length > 0) {
+ ctorParameterTypes = new ITypeReference[parameters.Length];
+ for (int i = 0; i < ctorParameterTypes.Count; i++) {
+ ctorParameterTypes[i] = ReadTypeReference(parameters[i].ParameterType);
+ }
+ ctorParameterTypes = interningProvider.InternList(ctorParameterTypes);
+ }
+ byte[] blob;
+ try {
+ blob = attribute.__GetBlob ();
+ } catch (Exception e) {
+ blob = new byte[0];
+ Console.Error.WriteLine ("IKVM error while getting blob:" + e);
+ }
+ return interningProvider.Intern(new UnresolvedAttributeBlob(attributeType, ctorParameterTypes, blob));
+ }
+ #endregion
+
+ #region Security Attributes
+ static readonly ITypeReference securityActionTypeReference = typeof(System.Security.Permissions.SecurityAction).ToTypeReference();
+ static readonly ITypeReference permissionSetAttributeTypeReference = typeof(System.Security.Permissions.PermissionSetAttribute).ToTypeReference();
+
+// /// <summary>
+// /// Reads a security declaration.
+// /// </summary>
+// [CLSCompliant(false)]
+// public IList<IUnresolvedAttribute> ReadSecurityDeclaration(SecurityDeclaration secDecl)
+// {
+// if (secDecl == null)
+// throw new ArgumentNullException("secDecl");
+// var result = new List<IUnresolvedAttribute>();
+// AddSecurityAttributes(secDecl, result);
+// return result;
+// }
+//
+// void AddSecurityAttributes(Mono.Collections.Generic.Collection<SecurityDeclaration> securityDeclarations, IList<IUnresolvedAttribute> targetCollection)
+// {
+// foreach (var secDecl in securityDeclarations) {
+// AddSecurityAttributes(secDecl, targetCollection);
+// }
+// }
+
+ void AddSecurityAttributes(IEnumerable<CustomAttributeData> securityAttributes, IList<IUnresolvedAttribute> targetCollection)
+ {
+ AddCustomAttributes (securityAttributes, targetCollection);
+ }
+
+ #endregion
+ #endregion
+
+ #region Read Type Definition
+ DefaultUnresolvedTypeDefinition CreateTopLevelTypeDefinition(IKVM.Reflection.Type typeDefinition)
+ {
+ var td = new DefaultUnresolvedTypeDefinition(typeDefinition.Namespace ?? "", ReflectionHelper.SplitTypeParameterCountFromReflectionName (typeDefinition.Name));
+ if (typeDefinition.IsGenericTypeDefinition)
+ InitTypeParameters(typeDefinition, td.TypeParameters);
+ return td;
+ }
+
+ static void InitTypeParameters(IKVM.Reflection.Type typeDefinition, ICollection<IUnresolvedTypeParameter> typeParameters)
+ {
+ // Type parameters are initialized within the constructor so that the class can be put into the type storage
+ // before the rest of the initialization runs - this allows it to be available for early binding as soon as possible.
+ var genericArguments = typeDefinition.GetGenericArguments ();
+ for (int i = 0; i < genericArguments.Length; i++) {
+ if (genericArguments[i].GenericParameterPosition != i)
+ throw new InvalidOperationException("g.GenericParameterPosition != i");
+ typeParameters.Add(new DefaultUnresolvedTypeParameter(
+ SymbolKind.TypeDefinition, i, genericArguments [i].Name));
+ }
+ }
+
+ void InitTypeParameterConstraints(IKVM.Reflection.Type typeDefinition, IList<IUnresolvedTypeParameter> typeParameters)
+ {
+ var args = typeDefinition.GetGenericArguments ();
+ for (int i = 0; i < typeParameters.Count; i++) {
+ var tp = (DefaultUnresolvedTypeParameter)typeParameters[i];
+ AddConstraints(tp, args[i]);
+ tp.ApplyInterningProvider(interningProvider);
+ }
+ }
+
+ void InitTypeDefinition(IKVM.Reflection.Type typeDefinition, DefaultUnresolvedTypeDefinition td)
+ {
+ td.Kind = GetTypeKind(typeDefinition);
+ InitTypeModifiers(typeDefinition, td);
+ InitTypeParameterConstraints(typeDefinition, td.TypeParameters);
+
+ // nested types can be initialized only after generic parameters were created
+ InitNestedTypes(typeDefinition, td, td.NestedTypes);
+ AddAttributes(typeDefinition, td);
+ td.HasExtensionMethods = HasExtensionAttribute(typeDefinition);
+
+ InitBaseTypes(typeDefinition, td.BaseTypes);
+
+ td.AddDefaultConstructorIfRequired = (td.Kind == TypeKind.Struct || td.Kind == TypeKind.Enum);
+ InitMembers(typeDefinition, td, td.Members);
+ td.ApplyInterningProvider(interningProvider);
+ td.Freeze();
+ RegisterCecilObject(td, typeDefinition);
+ }
+
+ void InitBaseTypes(IKVM.Reflection.Type typeDefinition, ICollection<ITypeReference> baseTypes)
+ {
+ // set base classes
+ if (typeDefinition.IsEnum) {
+ foreach (var enumField in typeDefinition.__GetDeclaredFields ()) {
+ if (!enumField.IsStatic) {
+ baseTypes.Add(ReadTypeReference(enumField.FieldType));
+ break;
+ }
+ }
+ } else {
+ if (typeDefinition.BaseType != null) {
+ baseTypes.Add(ReadTypeReference(typeDefinition.BaseType));
+ }
+ foreach (var iface in typeDefinition.__GetDeclaredInterfaces ()) {
+ baseTypes.Add(ReadTypeReference(iface));
+ }
+ }
+ }
+
+ void InitNestedTypes(IKVM.Reflection.Type typeDefinition, IUnresolvedTypeDefinition declaringTypeDefinition, ICollection<IUnresolvedTypeDefinition> nestedTypes)
+ {
+ foreach (var nestedTypeDef in typeDefinition.__GetDeclaredTypes()) {
+ if (IncludeInternalMembers
+ || nestedTypeDef.IsNestedPublic
+ || nestedTypeDef.IsNestedFamily
+ || nestedTypeDef.IsNestedFamORAssem)
+ {
+ string name = nestedTypeDef.Name;
+ int pos = name.LastIndexOf('/');
+ if (pos > 0)
+ name = name.Substring(pos + 1);
+ name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
+ var nestedType = new DefaultUnresolvedTypeDefinition(declaringTypeDefinition, name);
+ InitTypeParameters(nestedTypeDef, nestedType.TypeParameters);
+ nestedTypes.Add(nestedType);
+ InitTypeDefinition(nestedTypeDef, nestedType);
+ }
+ }
+ }
+
+ static TypeKind GetTypeKind(IKVM.Reflection.Type typeDefinition)
+ {
+ // set classtype
+ if (typeDefinition.IsInterface)
+ return TypeKind.Interface;
+ if (typeDefinition.IsEnum)
+ return TypeKind.Enum;
+ if (typeDefinition.IsValueType)
+ return TypeKind.Struct;
+ if (IsDelegate (typeDefinition))
+ return TypeKind.Delegate;
+ if (IsModule (typeDefinition))
+ return TypeKind.Module;
+ return TypeKind.Class;
+ }
+
+ static void InitTypeModifiers(IKVM.Reflection.Type typeDefinition, AbstractUnresolvedEntity td)
+ {
+ td.IsSealed = typeDefinition.IsSealed;
+ td.IsAbstract = typeDefinition.IsAbstract;
+ switch (typeDefinition.Attributes & TypeAttributes.VisibilityMask) {
+ case TypeAttributes.NotPublic:
+ case TypeAttributes.NestedAssembly:
+ td.Accessibility = Accessibility.Internal;
+ break;
+ case TypeAttributes.Public:
+ case TypeAttributes.NestedPublic:
+ td.Accessibility = Accessibility.Public;
+ break;
+ case TypeAttributes.NestedPrivate:
+ td.Accessibility = Accessibility.Private;
+ break;
+ case TypeAttributes.NestedFamily:
+ td.Accessibility = Accessibility.Protected;
+ break;
+ case TypeAttributes.NestedFamANDAssem:
+ td.Accessibility = Accessibility.ProtectedAndInternal;
+ break;
+ case TypeAttributes.NestedFamORAssem:
+ td.Accessibility = Accessibility.ProtectedOrInternal;
+ break;
+ }
+ }
+
+ static bool IsDelegate(IKVM.Reflection.Type type)
+ {
+ if (type.BaseType != null && type.BaseType.Namespace == "System") {
+ if (type.BaseType.Name == "MulticastDelegate")
+ return true;
+ if (type.BaseType.Name == "Delegate" && type.Name != "MulticastDelegate")
+ return true;
+ }
+ return false;
+ }
+
+ static bool IsModule(IKVM.Reflection.Type type)
+ {
+ foreach (var att in type.CustomAttributes) {
+ var dt = att.Constructor.DeclaringType;
+ if (dt.__Name == "StandardModuleAttribute" && dt.__Namespace == "Microsoft.VisualBasic.CompilerServices"
+ || dt.__Name == "CompilerGlobalScopeAttribute" && dt.__Namespace == "System.Runtime.CompilerServices")
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void InitMembers(IKVM.Reflection.Type typeDefinition, IUnresolvedTypeDefinition td, IList<IUnresolvedMember> members)
+ {
+ foreach (var method in typeDefinition.__GetDeclaredMethods ()) {
+ if (method.IsConstructor) {
+ if (IsVisible(method.Attributes)) {
+ SymbolKind type = SymbolKind.Constructor;
+ members.Add(ReadConstructor(method, td, type));
+ }
+ continue;
+ }
+ if (IsVisible(method.Attributes) && !IsAccessor(method)) {
+ SymbolKind type = SymbolKind.Method;
+ if (method.IsSpecialName) {
+ if (method.Name.StartsWith("op_", StringComparison.Ordinal))
+ type = SymbolKind.Operator;
+ }
+ members.Add(ReadMethod(method, td, type));
+ }
+ }
+
+ foreach (var field in typeDefinition.__GetDeclaredFields ()) {
+ if (IsVisible(field.Attributes) && !field.IsSpecialName) {
+ members.Add(ReadField(field, td));
+ }
+ }
+
+ string defaultMemberName = null;
+ var defaultMemberAttribute = typeDefinition.CustomAttributes.FirstOrDefault(
+ a => {
+ var dt = a.Constructor.DeclaringType;
+ return dt.__Name == "DefaultMemberAttribute" && dt.Namespace == "System.Reflection";
+ });
+ if (defaultMemberAttribute != null && defaultMemberAttribute.ConstructorArguments.Count == 1) {
+ defaultMemberName = defaultMemberAttribute.ConstructorArguments[0].Value as string;
+ }
+
+ foreach (var property in typeDefinition.__GetDeclaredProperties ()) {
+ bool getterVisible = property.GetMethod != null && IsVisible(property.GetMethod.Attributes);
+ bool setterVisible = property.SetMethod != null && IsVisible(property.SetMethod.Attributes);
+ if (getterVisible || setterVisible) {
+ SymbolKind type = SymbolKind.Property;
+ if (property.GetIndexParameters () != null) {
+ // Try to detect indexer:
+ if (property.Name == defaultMemberName) {
+ type = SymbolKind.Indexer; // normal indexer
+ }
+ // TODO: HasOverrides ?
+ else if (property.Name.EndsWith(".Item", StringComparison.Ordinal) /*&& (property.GetMethod ?? property.SetMethod).HasOverrides*/) {
+ // explicit interface implementation of indexer
+ type = SymbolKind.Indexer;
+ // We can't really tell parameterized properties and indexers apart in this case without
+ // resolving the interface, so we rely on the "Item" naming convention instead.
+ }
+ }
+ members.Add(ReadProperty(property, td, type));
+ }
+ }
+
+ foreach (var ev in typeDefinition.__GetDeclaredEvents ()) {
+ if (ev.AddMethod != null && IsVisible(ev.AddMethod.Attributes)) {
+ members.Add(ReadEvent(ev, td));
+ }
+ }
+ }
+
+ static bool IsAccessor(MethodBase methodInfo)
+ {
+ if (!methodInfo.IsSpecialName)
+ return false;
+
+ var name = methodInfo.Name;
+ return
+ name.StartsWith("get_", StringComparison.Ordinal) ||
+ name.StartsWith("set_", StringComparison.Ordinal) ||
+ name.StartsWith("add_", StringComparison.Ordinal) ||
+ name.StartsWith("remove_", StringComparison.Ordinal) ||
+ name.StartsWith("raise_", StringComparison.Ordinal);
+ }
+ #endregion
+
+ #region Read Method
+ [CLSCompliant(false)]
+ public IUnresolvedMethod ReadMethod(MethodBase method, IUnresolvedTypeDefinition parentType, SymbolKind methodType = SymbolKind.Method)
+ {
+ return ReadMethod((MethodInfo)method, parentType, methodType, null);
+ }
+
+ const MethodAttributes nonBodyAttr = MethodAttributes.Abstract | MethodAttributes.PinvokeImpl;
+ const MethodImplAttributes nonBodyImplAttr = MethodImplAttributes.InternalCall | MethodImplAttributes.Native | MethodImplAttributes.Unmanaged;
+
+ IUnresolvedMethod ReadMethod(MethodInfo method, IUnresolvedTypeDefinition parentType, SymbolKind methodType, IUnresolvedMember accessorOwner)
+ {
+ if (method == null)
+ return null;
+ var m = new DefaultUnresolvedMethod(parentType, method.Name);
+ m.SymbolKind = methodType;
+ m.AccessorOwner = accessorOwner;
+ m.HasBody = (method.Attributes & nonBodyAttr) == 0 && (method.GetMethodImplementationFlags () & nonBodyImplAttr) == 0;
+ if (method.IsGenericMethodDefinition) {
+ var genericArguments = method.GetGenericArguments ();
+ if (genericArguments != null) {
+ for (int i = 0; i < genericArguments.Length; i++) {
+ if (genericArguments[i].GenericParameterPosition != i)
+ throw new InvalidOperationException("g.Position != i");
+ m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(
+ SymbolKind.Method, i, genericArguments[i].Name));
+ }
+ for (int i = 0; i < genericArguments.Length; i++) {
+ var tp = (DefaultUnresolvedTypeParameter)m.TypeParameters[i];
+ AddConstraints(tp, genericArguments[i]);
+ tp.ApplyInterningProvider(interningProvider);
+ }
+ }
+ }
+
+ m.ReturnType = ReadTypeReference(method.ReturnType, typeAttributes: method.ReturnParameter.CustomAttributes);
+
+ if (HasAnyAttributes(method))
+ AddAttributes(method, m.Attributes, m.ReturnTypeAttributes);
+ TranslateModifiers(method, m);
+
+ foreach (var p in method.GetParameters ()) {
+ m.Parameters.Add(ReadParameter(p));
+ }
+
+ // mark as extension method if the attribute is set
+ if (method.IsStatic && HasExtensionAttribute(method)) {
+ m.IsExtensionMethod = true;
+ }
+
+ int lastDot = method.Name.LastIndexOf('.');
+ if (lastDot >= 0 /*&& method.HasOverrides*/) {
+ // To be consistent with the parser-initialized type system, shorten the method name:
+ m.Name = method.Name.Substring(lastDot + 1);
+ m.IsExplicitInterfaceImplementation = true;
+
+ foreach (var or in method.__GetMethodImpls ()) {
+ m.ExplicitInterfaceImplementations.Add(new DefaultMemberReference(
+ accessorOwner != null ? SymbolKind.Accessor : SymbolKind.Method,
+ ReadTypeReference(or.DeclaringType),
+ or.Name, or.GetGenericArguments ().Length, m.Parameters.Select(p => p.Type).ToList()));
+ }
+ }
+
+ FinishReadMember(m, method);
+ return m;
+ }
+
+ static bool HasExtensionAttribute(MemberInfo provider)
+ {
+ foreach (var attr in provider.CustomAttributes) {
+ var attributeType = attr.Constructor.DeclaringType;
+ if (attributeType.__Name == "ExtensionAttribute" && attributeType.__Namespace == "System.Runtime.CompilerServices")
+ return true;
+ }
+ return false;
+ }
+
+ bool IsVisible(MethodAttributes att)
+ {
+ att &= MethodAttributes.MemberAccessMask;
+ return IncludeInternalMembers
+ || att == MethodAttributes.Public
+ || att == MethodAttributes.Family
+ || att == MethodAttributes.FamORAssem;
+ }
+
+ static Accessibility GetAccessibility(MethodAttributes attr)
+ {
+ switch (attr & MethodAttributes.MemberAccessMask) {
+ case MethodAttributes.Public:
+ return Accessibility.Public;
+ case MethodAttributes.FamANDAssem:
+ return Accessibility.ProtectedAndInternal;
+ case MethodAttributes.Assembly:
+ return Accessibility.Internal;
+ case MethodAttributes.Family:
+ return Accessibility.Protected;
+ case MethodAttributes.FamORAssem:
+ return Accessibility.ProtectedOrInternal;
+ default:
+ return Accessibility.Private;
+ }
+ }
+
+ void TranslateModifiers(MethodBase method, AbstractUnresolvedMember m)
+ {
+ if (m.DeclaringTypeDefinition.Kind == TypeKind.Interface) {
+ // interface members don't have modifiers, but we want to handle them as "public abstract"
+ m.Accessibility = Accessibility.Public;
+ m.IsAbstract = true;
+ } else {
+ m.Accessibility = GetAccessibility(method.Attributes);
+ if (method.IsAbstract) {
+ m.IsAbstract = true;
+ m.IsOverride = (method.Attributes & MethodAttributes.NewSlot) == 0;
+ } else if (method.IsFinal) {
+ if ((method.Attributes & MethodAttributes.NewSlot) == 0) {
+ m.IsSealed = true;
+ m.IsOverride = true;
+ }
+ } else if (method.IsVirtual) {
+ if ((method.Attributes & MethodAttributes.NewSlot) != 0)
+ m.IsVirtual = true;
+ else
+ m.IsOverride = true;
+ }
+ m.IsStatic = method.IsStatic;
+ }
+ }
+ #endregion
+
+ #region Read Constructor
+ [CLSCompliant(false)]
+ public IUnresolvedMethod ReadConstructor(MethodBase method, IUnresolvedTypeDefinition parentType, SymbolKind methodType = SymbolKind.Method)
+ {
+ return ReadConstructor((ConstructorInfo)method, parentType, methodType, null);
+ }
+
+ IUnresolvedMethod ReadConstructor(ConstructorInfo method, IUnresolvedTypeDefinition parentType, SymbolKind methodType, IUnresolvedMember accessorOwner)
+ {
+ if (method == null)
+ return null;
+ var m = new DefaultUnresolvedMethod(parentType, method.Name);
+ m.SymbolKind = methodType;
+ m.AccessorOwner = accessorOwner;
+ m.HasBody = !method.DeclaringType.IsInterface && (method.GetMethodImplementationFlags () & MethodImplAttributes.CodeTypeMask) == MethodImplAttributes.IL;
+ var genericArguments = method.GetGenericArguments ();
+ if (genericArguments != null) {
+ for (int i = 0; i < genericArguments.Length; i++) {
+ if (genericArguments[i].GenericParameterPosition != i)
+ throw new InvalidOperationException("g.Position != i");
+ m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(
+ SymbolKind.Method, i, genericArguments[i].Name));
+ }
+ for (int i = 0; i < genericArguments.Length; i++) {
+ var tp = (DefaultUnresolvedTypeParameter)m.TypeParameters[i];
+ AddConstraints(tp, genericArguments[i]);
+ tp.ApplyInterningProvider(interningProvider);
+ }
+ }
+ m.ReturnType = KnownTypeReference.Void;
+
+
+ if (HasAnyAttributes(method))
+ AddAttributes(method, m.Attributes, m.ReturnTypeAttributes);
+ TranslateModifiers(method, m);
+
+ foreach (var p in method.GetParameters ()) {
+ m.Parameters.Add(ReadParameter(p));
+ }
+
+ FinishReadMember(m, method);
+ return m;
+ }
+
+ #endregion
+
+ #region Read Parameter
+ [CLSCompliant(false)]
+ public IUnresolvedParameter ReadParameter(ParameterInfo parameter)
+ {
+ if (parameter == null)
+ throw new ArgumentNullException("parameter");
+ var customAttributes = parameter.CustomAttributes;
+ var parameterType = parameter.ParameterType;
+ var type = ReadTypeReference(parameterType, typeAttributes: customAttributes);
+ var p = new DefaultUnresolvedParameter(type, interningProvider.Intern(parameter.Name ?? "index"));
+
+ if (parameterType.IsByRef) {
+ if (!parameter.IsIn && parameter.IsOut)
+ p.IsOut = true;
+ else
+ p.IsRef = true;
+ }
+ AddAttributes(parameter, p, customAttributes);
+
+ if (parameter.IsOptional) {
+ p.DefaultValue = CreateSimpleConstantValue(type, parameter.RawDefaultValue);
+ }
+
+ if (parameterType.IsArray) {
+ foreach (var att in customAttributes) {
+ var dt = att.Constructor.DeclaringType;
+ if (dt.__Name == "ParamArrayAttribute" && dt.Namespace == "System") {
+ p.IsParams = true;
+ break;
+ }
+ }
+ }
+
+ return interningProvider.Intern(p);
+ }
+ #endregion
+
+ #region Read Field
+ bool IsVisible(FieldAttributes att)
+ {
+ att &= FieldAttributes.FieldAccessMask;
+ return IncludeInternalMembers
+ || att == FieldAttributes.Public
+ || att == FieldAttributes.Family
+ || att == FieldAttributes.FamORAssem;
+ }
+
+ decimal? TryDecodeDecimalConstantAttribute(CustomAttributeData attribute)
+ {
+ if (attribute.ConstructorArguments.Count != 5)
+ return null;
+
+ var reader = new BlobReader(attribute.__GetBlob(), null);
+ if (reader.ReadUInt16() != 0x0001) {
+ Debug.WriteLine("Unknown blob prolog");
+ return null;
+ }
+
+ // DecimalConstantAttribute has the arguments (byte scale, byte sign, uint hi, uint mid, uint low) or (byte scale, byte sign, int hi, int mid, int low)
+ // Both of these invoke the Decimal constructor (int lo, int mid, int hi, bool isNegative, byte scale) with explicit argument conversions if required.
+ var ctorArgs = new object[attribute.ConstructorArguments.Count];
+ for (int i = 0; i < ctorArgs.Length; i++) {
+ switch (attribute.ConstructorArguments[i].ArgumentType.FullName) {
+ case "System.Byte":
+ ctorArgs[i] = reader.ReadByte();
+ break;
+ case "System.Int32":
+ ctorArgs[i] = reader.ReadInt32();
+ break;
+ case "System.UInt32":
+ ctorArgs[i] = unchecked((int)reader.ReadUInt32());
+ break;
+ default:
+ return null;
+ }
+ }
+
+ if (!ctorArgs.Select(a => a.GetType()).SequenceEqual(new[] { typeof(byte), typeof(byte), typeof(int), typeof(int), typeof(int) }))
+ return null;
+
+ return new decimal((int)ctorArgs[4], (int)ctorArgs[3], (int)ctorArgs[2], (byte)ctorArgs[1] != 0, (byte)ctorArgs[0]);
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedField ReadField(FieldInfo field, IUnresolvedTypeDefinition parentType)
+ {
+ if (field == null)
+ throw new ArgumentNullException("field");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+ var f = new DefaultUnresolvedField(parentType, field.Name);
+ f.Accessibility = GetAccessibility(field.Attributes);
+ f.IsReadOnly = field.IsInitOnly;
+ f.IsStatic = field.IsStatic;
+ f.ReturnType = ReadTypeReference(field.FieldType, typeAttributes: field.CustomAttributes);
+
+ if ((field.Attributes & FieldAttributes.HasDefault) != 0) {
+ f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, field.GetRawConstantValue ());
+ }
+ else {
+ var decConstant = field.CustomAttributes.FirstOrDefault(a => {
+ var dt = a.Constructor.DeclaringType;
+ return dt.__Name == "DecimalConstantAttribute" && dt.__Namespace == "System.Runtime.CompilerServices";
+ });
+ if (decConstant != null) {
+ var constValue = TryDecodeDecimalConstantAttribute(decConstant);
+ if (constValue != null)
+ f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, constValue);
+ }
+ }
+ AddAttributes(field, f);
+
+ if (field.GetRequiredCustomModifiers ().Any (mt => mt.FullName == typeof(IsVolatile).FullName)) {
+ f.IsVolatile = true;
+ }
+
+ FinishReadMember(f, field);
+ return f;
+ }
+
+ static Accessibility GetAccessibility(FieldAttributes attr)
+ {
+ switch (attr & FieldAttributes.FieldAccessMask) {
+ case FieldAttributes.Public:
+ return Accessibility.Public;
+ case FieldAttributes.FamANDAssem:
+ return Accessibility.ProtectedAndInternal;
+ case FieldAttributes.Assembly:
+ return Accessibility.Internal;
+ case FieldAttributes.Family:
+ return Accessibility.Protected;
+ case FieldAttributes.FamORAssem:
+ return Accessibility.ProtectedOrInternal;
+ default:
+ return Accessibility.Private;
+ }
+ }
+ #endregion
+
+ #region Type Parameter Constraints
+ void AddConstraints(DefaultUnresolvedTypeParameter tp, IKVM.Reflection.Type g)
+ {
+ var attr = g.GenericParameterAttributes;
+ if ((attr & GenericParameterAttributes.Contravariant) != 0) {
+ tp.Variance = VarianceModifier.Contravariant;
+ } else if ((attr & GenericParameterAttributes.Covariant) != 0) {
+ tp.Variance = VarianceModifier.Covariant;
+ }
+
+ tp.HasReferenceTypeConstraint = (attr & GenericParameterAttributes.ReferenceTypeConstraint) != 0;
+ tp.HasValueTypeConstraint = (attr & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0;
+ tp.HasDefaultConstructorConstraint = (attr & GenericParameterAttributes.DefaultConstructorConstraint) != 0;
+
+ foreach (var constraint in g.GetGenericParameterConstraints ()) {
+ tp.Constraints.Add(ReadTypeReference(constraint));
+ }
+ }
+ #endregion
+
+ #region Read Property
+
+ Accessibility MergePropertyAccessibility (Accessibility left, Accessibility right)
+ {
+ if (left == Accessibility.Public || right == Accessibility.Public)
+ return Accessibility.Public;
+
+ if (left == Accessibility.ProtectedOrInternal || right == Accessibility.ProtectedOrInternal)
+ return Accessibility.ProtectedOrInternal;
+
+ if (left == Accessibility.Protected && right == Accessibility.Internal ||
+ left == Accessibility.Internal && right == Accessibility.Protected)
+ return Accessibility.ProtectedOrInternal;
+
+ if (left == Accessibility.Protected || right == Accessibility.Protected)
+ return Accessibility.Protected;
+
+ if (left == Accessibility.Internal || right == Accessibility.Internal)
+ return Accessibility.Internal;
+
+ if (left == Accessibility.ProtectedAndInternal || right == Accessibility.ProtectedAndInternal)
+ return Accessibility.ProtectedAndInternal;
+
+ return left;
+ }
+
+ [CLSCompliant(false)]
+ public IUnresolvedProperty ReadProperty(PropertyInfo property, IUnresolvedTypeDefinition parentType, SymbolKind propertyType = SymbolKind.Property)
+ {
+ if (property == null)
+ throw new ArgumentNullException("property");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+
+ var p = new DefaultUnresolvedProperty(parentType, property.Name);
+ p.SymbolKind = propertyType;
+ TranslateModifiers(property.GetMethod ?? property.SetMethod, p);
+ if (property.GetMethod != null && property.SetMethod != null)
+ p.Accessibility = MergePropertyAccessibility (GetAccessibility (property.GetMethod.Attributes), GetAccessibility (property.SetMethod.Attributes));
+ p.ReturnType = ReadTypeReference(property.PropertyType, typeAttributes: property.CustomAttributes);
+
+ p.Getter = ReadMethod(property.GetMethod, parentType, SymbolKind.Accessor, p);
+ p.Setter = ReadMethod(property.SetMethod, parentType, SymbolKind.Accessor, p);
+
+ foreach (var par in property.GetIndexParameters ()) {
+ p.Parameters.Add(ReadParameter(par));
+ }
+
+ AddAttributes(property, p);
+
+ var accessor = p.Getter ?? p.Setter;
+ if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
+ p.Name = property.Name.Substring(property.Name.LastIndexOf('.') + 1);
+ p.IsExplicitInterfaceImplementation = true;
+ foreach (var mr in accessor.ExplicitInterfaceImplementations) {
+ p.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
+ }
+ }
+
+ FinishReadMember(p, property);
+ return p;
+ }
+ #endregion
+
+ #region Read Event
+ [CLSCompliant(false)]
+ public IUnresolvedEvent ReadEvent(EventInfo ev, IUnresolvedTypeDefinition parentType)
+ {
+ if (ev == null)
+ throw new ArgumentNullException("ev");
+ if (parentType == null)
+ throw new ArgumentNullException("parentType");
+
+ DefaultUnresolvedEvent e = new DefaultUnresolvedEvent(parentType, ev.Name);
+ TranslateModifiers(ev.AddMethod, e);
+ e.ReturnType = ReadTypeReference(ev.EventHandlerType, typeAttributes: ev.CustomAttributes);
+
+ e.AddAccessor = ReadMethod(ev.AddMethod, parentType, SymbolKind.Accessor, e);
+ e.RemoveAccessor = ReadMethod(ev.RemoveMethod, parentType, SymbolKind.Accessor, e);
+ e.InvokeAccessor = ReadMethod(ev.RaiseMethod, parentType, SymbolKind.Accessor, e);
+
+ AddAttributes(ev, e);
+
+ var accessor = e.AddAccessor ?? e.RemoveAccessor ?? e.InvokeAccessor;
+ if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
+ e.Name = ev.Name.Substring(ev.Name.LastIndexOf('.') + 1);
+ e.IsExplicitInterfaceImplementation = true;
+ foreach (var mr in accessor.ExplicitInterfaceImplementations) {
+ e.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
+ }
+ }
+
+ FinishReadMember(e, ev);
+
+ return e;
+ }
+ #endregion
+
+ #region FinishReadMember / Interning
+ void FinishReadMember(AbstractUnresolvedMember member, MemberInfo ikvmDefinition)
+ {
+ member.ApplyInterningProvider(interningProvider);
+ member.Freeze();
+ RegisterCecilObject(member, ikvmDefinition);
+ }
+ #endregion
+
+ #region Type system translation table
+ void RegisterCecilObject(IUnresolvedEntity typeSystemObject, MemberInfo cecilObject)
+ {
+ if (OnEntityLoaded != null)
+ OnEntityLoaded(typeSystemObject, cecilObject);
+ }
+ #endregion
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.IKVM/Properties/AssemblyInfo.cs b/external/nrefactory/ICSharpCode.NRefactory.IKVM/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f3919fc
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.IKVM/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Reflection;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("ICSharpCode.NRefactory.IKVM")]
+[assembly: AssemblyDescription("IKVM.Reflection-based Assembly Loader for NRefactory")]
+
+[assembly: CLSCompliant(true)]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/AbiComparerTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/AbiComparerTests.cs
new file mode 100644
index 0000000..057babe
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/AbiComparerTests.cs
@@ -0,0 +1,105 @@
+//
+// AbiComparerTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeCompletion;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ [TestFixture]
+ public class AbiComparerTests
+ {
+ AbiCompatibility Check (string before, string after)
+ {
+ IProjectContent oldPctx, newPctx;
+ SyntaxTree tree;
+ ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpUnresolvedFile file;
+ CodeCompletionBugTests.CreateCompilation (before, out oldPctx, out tree, out file, false);
+ CodeCompletionBugTests.CreateCompilation (after, out newPctx, out tree, out file, false);
+ return new AbiComparer ().Check (oldPctx.CreateCompilation (), newPctx.CreateCompilation ());
+ }
+
+ [Test]
+ public void CheckEquality()
+ {
+ string a1 = @"namespace Foo { public class Bar { public void FooBar () {} public int Bar2 { get; set;} int removed; } class Removed {} }";
+ string a2 = @"namespace Foo { public class Bar { public void FooBar () {} public int Bar2 { get {} set{}} void Added () {} } class Added {} } namespace Added { class Test { } }";
+ Assert.AreEqual (AbiCompatibility.Equal, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckBigger()
+ {
+ string a1 = @"namespace Foo { public class Bar { public void FooBar () {} } }";
+ string a2 = @"namespace Foo { public class Bar { public void FooBar () {} public void BarFoo () {} } }";
+ Assert.AreEqual (AbiCompatibility.Bigger, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckIncompatible()
+ {
+ string a1 = @"namespace Foo { public class Bar { public void FooBar () {} } }";
+ string a2 = @"namespace Foo { public class Bar { public void FooBar (int bar) {} } }";
+ Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckIncompatibleInterfaceChange()
+ {
+ string a1 = @"public interface IFoo {}";
+ string a2 = @"public interface IFoo { void Bar (); }";
+ Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckTypeConstraintChange()
+ {
+ string a1 = @"public class IFoo<T> {}";
+ string a2 = @"public class IFoo<T> where T : System.IDisposable {}";
+ Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckTypeConstraintChangeCase2()
+ {
+ string a1 = @"public class IFoo<T> {}";
+ string a2 = @"public class IFoo<T> where T : class {}";
+ Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
+ }
+
+ [Test]
+ public void CheckMethodConstraintChange()
+ {
+ string a1 = @"public class IFoo { public void Bar<T> () {} }";
+ string a2 = @"public class IFoo { public void Bar<T> () where T : System.IDisposable {} }";
+ Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/SymbolCollectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/SymbolCollectorTests.cs
new file mode 100644
index 0000000..8bf4338
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/Analysis/SymbolCollectorTests.cs
@@ -0,0 +1,232 @@
+//
+// SymbolCollectorTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeCompletion;
+using System.Text;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ [TestFixture]
+ public class SymbolCollectorTests
+ {
+
+ void CollectMembers(string code, string memberName, bool includeOverloads = true)
+ {
+ StringBuilder sb = new StringBuilder();
+ List<int> offsets = new List<int>();
+ foreach (var ch in code) {
+ if (ch == '$') {
+ offsets.Add(sb.Length);
+ continue;
+ }
+ sb.Append(ch);
+ }
+ var syntaxTree = SyntaxTree.Parse(sb.ToString (), "test.cs");
+ var unresolvedFile = syntaxTree.ToTypeSystem();
+ var compilation = TypeSystemHelper.CreateCompilation(unresolvedFile);
+
+ var symbol = FindReferencesTest.GetSymbol(compilation, memberName);
+ var col = new SymbolCollector();
+ col.IncludeOverloads = includeOverloads;
+ col.GroupForRenaming = true;
+
+ var result = col.GetRelatedSymbols (new TypeGraph (compilation.Assemblies),
+ symbol);
+ if (offsets.Count != result.Count()) {
+ foreach (var a in result)
+ Console.WriteLine(a);
+ }
+ Assert.AreEqual(offsets.Count, result.Count());
+ var doc = new ReadOnlyDocument(sb.ToString ());
+ result
+ .Select(r => doc.GetOffset ((r as IEntity).Region.Begin))
+ .SequenceEqual(offsets);
+ }
+
+ [Test]
+ public void TestSingleInterfaceImpl ()
+ {
+ var code = @"
+interface IA
+{
+ void $Method();
+}
+
+class A : IA
+{
+ public virtual void $Method() { };
+}
+
+class B : A
+{
+ public override void Method() { };
+}
+
+class C : IA
+{
+ public void $Method() { };
+}";
+ CollectMembers(code, "IA.Method");
+ }
+
+
+ [Test]
+ public void TestMultiInterfacesImpl1 ()
+ {
+ var code = @"
+interface IA
+{
+ void $Method();
+}
+interface IB
+{
+ void $Method();
+}
+class A : IA, IB
+{
+ public void $Method() { }
+}
+class B : IA
+{
+ public void $Method() { }
+}
+class C : IB
+{
+ public void $Method() { }
+}";
+ CollectMembers(code, "A.Method");
+ }
+
+
+ [Test]
+ public void TestOverloads ()
+ {
+ var code = @"
+class A
+{
+ public void $Method () { }
+ public void $Method (int i) { }
+ public void $Method (string i) { }
+}
+";
+ CollectMembers(code, "A.Method");
+ }
+
+ [Test]
+ public void TestConstructor ()
+ {
+ var code = @"
+class $A
+{
+ public $A() { }
+ public $A(int i) { }
+}
+";
+ CollectMembers(code, "A");
+ }
+
+
+ [Test]
+ public void TestDestructor ()
+ {
+ var code = @"
+class $A
+{
+ $~A() { }
+}
+";
+ CollectMembers(code, "A");
+ }
+
+ [Test]
+ public void TestStaticConstructor ()
+ {
+ var code = @"
+class $A
+{
+ static $A() { }
+ public $A(int i) { }
+}
+";
+ CollectMembers(code, "A");
+ }
+
+ [Test]
+ public void TestShadowedMember ()
+ {
+ var code = @"
+class A
+{
+ public int $Prop
+ { get; set; }
+}
+class B : A
+{
+ public int Prop
+ { get; set; }
+}
+";
+ CollectMembers(code, "A.Prop");
+ }
+
+
+
+
+ [Test]
+ public void TestShadowedMemberCase2 ()
+ {
+ var code = @"interface IA
+{
+ int $Prop { get; set; }
+}
+
+class A : IA
+{
+ public int $Prop
+ { get; set; }
+}
+
+class B : A, IA
+{
+ public int $Prop
+ { get; set; }
+}
+";
+ CollectMembers(code, "A.Prop");
+ }
+
+
+
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/AbiComparerTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/AbiComparerTests.cs
deleted file mode 100644
index b6ee538..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/AbiComparerTests.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// AbiComparerTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
-//
-// 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.IO;
-using System.Linq;
-using System.Threading;
-using ICSharpCode.NRefactory.CSharp.Resolver;
-using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-using NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeCompletion;
-
-namespace ICSharpCode.NRefactory.CSharp.Analysis
-{
- [TestFixture]
- public class AbiComparerTests
- {
- AbiCompatibility Check (string before, string after)
- {
- IProjectContent oldPctx, newPctx;
- SyntaxTree tree;
- ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpUnresolvedFile file;
- CodeCompletionBugTests.CreateCompilation (before, out oldPctx, out tree, out file, false);
- CodeCompletionBugTests.CreateCompilation (after, out newPctx, out tree, out file, false);
- return new AbiComparer ().Check (oldPctx.CreateCompilation (), newPctx.CreateCompilation ());
- }
-
- [Test]
- public void CheckEquality()
- {
- string a1 = @"namespace Foo { public class Bar { public void FooBar () {} public int Bar2 { get; set;} int removed; } class Removed {} }";
- string a2 = @"namespace Foo { public class Bar { public void FooBar () {} public int Bar2 { get {} set{}} void Added () {} } class Added {} } namespace Added { class Test { } }";
- Assert.AreEqual (AbiCompatibility.Equal, Check (a1, a2));
- }
-
- [Test]
- public void CheckBigger()
- {
- string a1 = @"namespace Foo { public class Bar { public void FooBar () {} } }";
- string a2 = @"namespace Foo { public class Bar { public void FooBar () {} public void BarFoo () {} } }";
- Assert.AreEqual (AbiCompatibility.Bigger, Check (a1, a2));
- }
-
- [Test]
- public void CheckIncompatible()
- {
- string a1 = @"namespace Foo { public class Bar { public void FooBar () {} } }";
- string a2 = @"namespace Foo { public class Bar { public void FooBar (int bar) {} } }";
- Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
- }
-
- [Test]
- public void CheckIncompatibleInterfaceChange()
- {
- string a1 = @"public interface IFoo {}";
- string a2 = @"public interface IFoo { void Bar (); }";
- Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
- }
-
- [Test]
- public void CheckTypeConstraintChange()
- {
- string a1 = @"public class IFoo<T> {}";
- string a2 = @"public class IFoo<T> where T : System.IDisposable {}";
- Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
- }
-
- [Test]
- public void CheckTypeConstraintChangeCase2()
- {
- string a1 = @"public class IFoo<T> {}";
- string a2 = @"public class IFoo<T> where T : class {}";
- Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
- }
-
- [Test]
- public void CheckMethodConstraintChange()
- {
- string a1 = @"public class IFoo { public void Bar<T> () {} }";
- string a2 = @"public class IFoo { public void Bar<T> () where T : System.IDisposable {} }";
- Assert.AreEqual (AbiCompatibility.Incompatible, Check (a1, a2));
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
index 6be04b1..1e2e2f2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Analysis/SemanticHighlightingTests.cs
@@ -347,6 +347,38 @@ class Class {
}
", varKeywordTypeColor);
}
+
+
+ [Test]
+ public void TestStringFormatItemColor()
+ {
+ TestColor (@"using System;
+class MyClass {
+ public static void Main ()
+ {
+ string str = string.Format ("" ${0} ${1} ${2} "", 1, 2, 3);
+ }
+ }
+", stringFormatItemColor);
+ }
+
+ [Test]
+ public void TestStringFormatItemInVerbatimStringColor()
+ {
+ TestColor (@"using System;
+class MyClass {
+ public static void Main ()
+ {
+ Console.WriteLine (@"" ${0}
+
+ ${1}
+
+
+${2} "", 1, 2, 3);
+ }
+ }
+", stringFormatItemColor);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstStructureTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstStructureTests.cs
index 7734a1b..f22c9ac 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstStructureTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstStructureTests.cs
@@ -53,6 +53,8 @@ namespace ICSharpCode.NRefactory.CSharp
foreach (Type type in typeof(AstNode).Assembly.GetExportedTypes()) {
if (type == typeof(CSharpModifierToken)) // CSharpModifierToken is the exception (though I'm not too happy about that)
continue;
+ if (typeof(PreProcessorDirective).IsAssignableFrom (type)) // another exception - is it useful or not ?
+ continue;
if (type.IsSubclassOf(typeof(AstNode))) {
Assert.IsTrue(type.BaseType.IsAbstract, type.FullName);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstTests.cs
new file mode 100644
index 0000000..9cccc58
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/AstTests.cs
@@ -0,0 +1,77 @@
+//
+// AstTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp
+{
+ [TestFixture]
+
+ public class AstTests
+ {
+ [Test]
+ public void TestDescendants ()
+ {
+ var tree = SyntaxTree.Parse(@"class Test
+{
+ void Foo()
+ {
+ Call1();
+ {
+ Call2();
+ }
+ Call3();
+ }
+}");
+ var method = tree.GetNodeAt<MethodDeclaration>(6, 1);
+ // Body, Call1, Block, Call2 and Call 3
+ Assert.AreEqual(5, method.DescendantNodes().Count(n => n is Statement));
+ }
+
+
+ [Test]
+ public void TestDescendantsWithPredicate ()
+ {
+ var tree = SyntaxTree.Parse(@"class Test
+{
+ void Foo()
+ {
+ Call1();
+ {
+ Call2();
+ }
+ Call3();
+ }
+}");
+ var method = tree.GetNodeAt<MethodDeclaration>(6, 1);
+ // Body, Call1, Block and Call 3 - NOT call2
+ var childs = method.DescendantNodes(child => !(child is BlockStatement) || (((BlockStatement)child).Parent is MethodDeclaration)).Where(n => n is Statement).ToList();
+ Assert.AreEqual(4, childs.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AddAnotherAccessorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AddAnotherAccessorTests.cs
index 5f0369c..5e0bd1a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AddAnotherAccessorTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AddAnotherAccessorTests.cs
@@ -65,6 +65,37 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
}
[Test]
+ public void TestAddSet_ReadOnlyField ()
+ {
+ string result = RunContextAction (
+ new AddAnotherAccessorAction (),
+ "class TestClass" + Environment.NewLine +
+ "{" + Environment.NewLine +
+ " readonly int field;" + Environment.NewLine +
+ " public int $Field {" + Environment.NewLine +
+ " get {" + Environment.NewLine +
+ " return field;" + Environment.NewLine +
+ " }" + Environment.NewLine +
+ " }" + Environment.NewLine +
+ "}"
+ );
+
+ Assert.AreEqual (
+ "class TestClass" + Environment.NewLine +
+ "{" + Environment.NewLine +
+ " readonly int field;" + Environment.NewLine +
+ " public int Field {" + Environment.NewLine +
+ " get {" + Environment.NewLine +
+ " return field;" + Environment.NewLine +
+ " }" + Environment.NewLine +
+ " set {" + Environment.NewLine +
+ " throw new System.NotImplementedException ();" + Environment.NewLine +
+ " }" + Environment.NewLine +
+ " }" + Environment.NewLine +
+ "}", result);
+ }
+
+ [Test]
public void TestAddGet ()
{
string result = RunContextAction (
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AutoLinqSumTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AutoLinqSumTests.cs
new file mode 100644
index 0000000..c2ec985
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/AutoLinqSumTests.cs
@@ -0,0 +1,775 @@
+// AutoLinqTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeActions
+{
+ [TestFixture]
+ public class AutoLinqSumActionTests : ContextActionTestBase
+ {
+ [Test]
+ public void TestSimpleIntegerLoop() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestMergedIntegerLoop() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result = 0;
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result = list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestNonZeroMergedIntegerLoop() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result = 1;
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result = 1 + list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestMergedAssignmentIntegerLoop() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result;
+ result = 1;
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ int result;
+ result = 1 + list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestMergedDecimal() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ decimal result = 0.0m;
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ var list = new int[] { 1, 2, 3 };
+ decimal result = list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestIntegerLoopInBlock() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result += x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestExpression() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result += x * 2;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum (x => x * 2);
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestDisabledForStrings() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ string result = string.Empty;
+ var list = new string[] { ""a"", ""b"" };
+ $foreach (var x in list) {
+ result += x;
+ }
+ }
+}";
+ TestWrongContext<AutoLinqSumAction>(source);
+ }
+
+ [Test]
+ public void TestShort() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ short result = 0;
+ var list = new short[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ short result = 0;
+ var list = new short[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestLong() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ long result = 0;
+ var list = new long[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ long result = 0;
+ var list = new long[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestUnsignedLong() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ ulong result = 0;
+ var list = new ulong[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ ulong result = 0;
+ var list = new ulong[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestFloat() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ float result = 0;
+ var list = new float[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ float result = 0;
+ var list = new float[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestDouble() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ double result = 0;
+ var list = new double[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ double result = 0;
+ var list = new double[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestDecimal() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ decimal result = 0;
+ var list = new decimal[] { 1, 2, 3 };
+ $foreach (var x in list)
+ result += x;
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ decimal result = 0;
+ var list = new decimal[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestMinus() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result -= x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum (x => -x);
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestCombined() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result += x;
+ result += 2 * x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum (x => x + 2 * x);
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestCombinedPrecedence() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result += x;
+ result += x << 1;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum (x => x + (x << 1));
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestEmptyStatements() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result += x;
+ ;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestSimpleConditional() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ if (x > 0)
+ result += x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Where (x => x > 0).Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestInvertedConditional() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ if (x > 0)
+ ;
+ else
+ result += x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Where (x => x <= 0).Sum ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestIncrement() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ result++;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Count ();
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestCompleteConditional() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ $foreach (var x in list) {
+ if (x > 0)
+ result += x * 2;
+ else
+ result += x;
+ }
+ }
+}";
+
+ string result = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2, 3 };
+ result += list.Sum (x => x > 0 ? x * 2 : x);
+ }
+}";
+
+ Assert.AreEqual(result, RunContextAction(new AutoLinqSumAction(), source));
+ }
+
+ [Test]
+ public void TestDisabledForSideEffects() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ string result = string.Empty;
+ var list = new string[] { ""a"", ""b"" };
+ $foreach (var x in list) {
+ TestMethod();
+ result += x;
+ }
+ }
+}";
+ TestWrongContext<AutoLinqSumAction>(source);
+ }
+
+ [Test]
+ public void TestDisabledForInnerAssignments() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2 };
+ int p = 0;
+ $foreach (var x in list) {
+ result += (p = x);
+ }
+ }
+}";
+ TestWrongContext<AutoLinqSumAction>(source);
+ }
+
+ [Test]
+ public void TestDisabledForInnerIncrements() {
+ string source = @"
+using System.Linq;
+
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2 };
+ int p = 0;
+ $foreach (var x in list) {
+ result += (p++);
+ }
+ }
+}";
+ TestWrongContext<AutoLinqSumAction>(source);
+ }
+
+ [Test]
+ public void TestDisabledForNoLinq() {
+ string source = @"
+class TestClass
+{
+ void TestMethod() {
+ int result = 0;
+ var list = new int[] { 1, 2 };
+ $foreach (var x in list) {
+ result += x;
+ }
+ }
+}";
+ TestWrongContext<AutoLinqSumAction>(source);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ContextActionTestBase.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ContextActionTestBase.cs
index 8ebd281..3bfdb61 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ContextActionTestBase.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ContextActionTestBase.cs
@@ -30,6 +30,7 @@ using ICSharpCode.NRefactory.CSharp.Refactoring;
using System.Threading;
using System.Linq;
using System.Text;
+using ICSharpCode.NRefactory;
namespace ICSharpCode.NRefactory.CSharp.CodeActions
{
@@ -48,11 +49,10 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
var sb = new StringBuilder ();
for (int i = 0; i < str.Length; i++) {
var ch = str [i];
- if (ch == '\n') {
+ var possibleNewline = NewLine.GetDelimiterLength(ch, i + 1 < str.Length ? str [i + 1] : '\0');
+ if (possibleNewline > 0) {
sb.AppendLine ();
- } else if (ch == '\r') {
- sb.AppendLine ();
- if (i + 1 < str.Length && str [i + 1] == '\n')
+ if (possibleNewline == 2)
i++;
} else {
sb.Append (ch);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToNullCoalescingTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToNullCoalescingTests.cs
new file mode 100644
index 0000000..c3054f8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToNullCoalescingTests.cs
@@ -0,0 +1,276 @@
+//
+// ConvertIfToNullCoalescingTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeActions
+{
+ [TestFixture]
+ public class ConvertIfToNullCoalescingTests : ContextActionTestBase
+ {
+ [Test]
+ public void TestDeclaration ()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo ();
+ $if (o == null)
+ o = new object ();
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo () ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestYodaConditionals ()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo ();
+ $if (null == o)
+ o = new object ();
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo () ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestAssignment ()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o;
+ o = Foo ();
+ $if (o == null)
+ o = new object ();
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o;
+ o = Foo () ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestIsolated ()
+ {
+ string input = @"
+class TestClass
+{
+ object o;
+ void TestMethod()
+ {
+ $if (o == null)
+ o = new object ();
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ object o;
+ void TestMethod()
+ {
+ o = o ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestBlock ()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo ();
+ $if (o == null)
+ {
+ o = new object ();
+ }
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo () ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestInvertedCondition ()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo ();
+ $if (o != null)
+ {
+ } else {
+ o = new object ();
+ }
+ }
+}
+";
+
+ string output = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo () ?? new object ();
+ }
+}
+";
+
+ Assert.AreEqual(output, RunContextAction(new ConvertIfToNullCoalescingAction(), input));
+ }
+
+ [Test]
+ public void TestDisabledForImproperCondition()
+ {
+ string input = @"
+class TestClass
+{
+ void Foo()
+ {
+ return null;
+ }
+ void TestMethod()
+ {
+ object o = Foo ();
+ $if (o != null)
+ {
+ o = new object ();
+ }
+ }
+}
+";
+
+ TestWrongContext<ConvertIfToNullCoalescingAction>(input);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToSwtichTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToSwtichTests.cs
index 34167d4..f2b32ed 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToSwtichTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ConvertIfToSwtichTests.cs
@@ -30,7 +30,7 @@ using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp.CodeActions
{
[TestFixture]
- public class ConvertIfToSwtichTests : ContextActionTestBase
+ public class ConvertIfToSwitchTests : ContextActionTestBase
{
[Test]
@@ -467,5 +467,40 @@ class TestClass
}");
}
+ [Test]
+ public void TestNestedIf ()
+ {
+ Test<ConvertIfToSwitchAction> (@"
+class TestClass
+{
+ void TestMethod (int a)
+ {
+ int b;
+ $if (a == 0) {
+ if (b == 0)
+ return;
+ } else if (a == 2 || a == 3) {
+ b = 2;
+ }
+ }
+}", @"
+class TestClass
+{
+ void TestMethod (int a)
+ {
+ int b;
+ switch (a) {
+ case 0:
+ if (b == 0)
+ return;
+ break;
+ case 2:
+ case 3:
+ b = 2;
+ break;
+ }
+ }
+}");
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs
index 33a6bfa..ca1639b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs
@@ -257,5 +257,106 @@ class Foo
}");
}
+ [Test]
+ public void TestIf ()
+ {
+ Test<CreateFieldAction> (@"class TestClass
+{
+ void TestMethod ()
+ {
+ if ($NonExistantProperty)
+ ;
+ }
+}", @"class TestClass
+{
+ bool NonExistantProperty;
+ void TestMethod ()
+ {
+ if (NonExistantProperty)
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestWhile ()
+ {
+ Test<CreateFieldAction> (@"class TestClass
+{
+ void TestMethod ()
+ {
+ while ($NonExistantProperty)
+ ;
+ }
+}", @"class TestClass
+{
+ bool NonExistantProperty;
+ void TestMethod ()
+ {
+ while (NonExistantProperty)
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestDoWhile ()
+ {
+ Test<CreateFieldAction> (@"class TestClass
+{
+ void TestMethod ()
+ {
+ do {}
+ while ($NonExistantProperty);
+ }
+}", @"class TestClass
+{
+ bool NonExistantProperty;
+ void TestMethod ()
+ {
+ do {}
+ while (NonExistantProperty);
+ }
+}");
+ }
+
+ [Test]
+ public void TestForCondition ()
+ {
+ Test<CreateFieldAction> (@"class TestClass
+{
+ void TestMethod ()
+ {
+ for (;$NonExistantProperty;){}
+ }
+}", @"class TestClass
+{
+ bool NonExistantProperty;
+ void TestMethod ()
+ {
+ for (;NonExistantProperty;){}
+ }
+}");
+ }
+
+ [Test]
+ public void TestConditionalOperator ()
+ {
+ Test<CreateFieldAction> (@"class TestClass
+{
+ void TestMethod ()
+ {
+ var b = $NonExistantProperty ? 1 : 0;
+ }
+}", @"class TestClass
+{
+ bool NonExistantProperty;
+ void TestMethod ()
+ {
+ var b = NonExistantProperty ? 1 : 0;
+ }
+}");
+ }
+
}
}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/DeclareLocalVariableTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/DeclareLocalVariableTests.cs
index ac09dfc..0228004 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/DeclareLocalVariableTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/DeclareLocalVariableTests.cs
@@ -298,5 +298,29 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
}");
}
+
+ [Test]
+ public void TestCollectionInitializer ()
+ {
+ Test<DeclareLocalVariableAction> (@"using System.Collections.Generic;
+
+class TestClass
+{
+ void Test (string str)
+ {
+ var list = new List<int> { 1, <-str.Length->, 2 };
+ }
+}", @"using System.Collections.Generic;
+
+class TestClass
+{
+ void Test (string str)
+ {
+ var length = str.Length;
+ var list = new List<int> { 1, length, 2 };
+ }
+}");
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ExtractMethodTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ExtractMethodTests.cs
index 4d11c52..11ef0b5 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ExtractMethodTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ExtractMethodTests.cs
@@ -549,6 +549,39 @@ class TestClass
}
}");
}
+
+ /// <summary>
+ /// Bug 13054 - Extract method creates params on new method for params declared on lambdas in method body
+ /// </summary>
+ [Test]
+ public void TestBug13054 ()
+ {
+ Test<ExtractMethodAction> (@"class TestClass
+{
+ public static void TestMethod ()
+ {
+ <-int i = 0;
+ Action<string> action = (str) => {
+ Console.WriteLine (str);
+ };->
+ }
+}", @"class TestClass
+{
+ static void NewMethod ()
+ {
+ int i = 0;
+ Action<string> action = str => {
+ Console.WriteLine (str);
+ };
+ }
+ public static void TestMethod ()
+ {
+ NewMethod ();
+ }
+}");
+ }
+
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementAbstractMembersTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementAbstractMembersTest.cs
index 1d03a05..65bbd71 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementAbstractMembersTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementAbstractMembersTest.cs
@@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
[TestFixture]
public class ImplementAbstractMembersTest : ContextActionTestBase
{
- [Test()]
+ [Test]
public void TestSimpleBaseType()
{
Test<ImplementAbstractMembersAction>(@"abstract class Simple {
@@ -58,7 +58,7 @@ class Foo : Simple
");
}
- [Test()]
+ [Test]
public void TestProtectedMembers()
{
Test<ImplementAbstractMembersAction>(@"abstract class Simple {
@@ -85,7 +85,7 @@ class Foo : Simple
");
}
- [Test()]
+ [Test]
public void TestProtectedInternalMembers()
{
Test<ImplementAbstractMembersAction>(@"abstract class Simple {
@@ -111,6 +111,91 @@ class Foo : Simple
}
");
}
+
+
+
+ [Test]
+ public void TestAbstractOverride()
+ {
+ Test<ImplementAbstractMembersAction>(@"class A {
+ public virtual void Foo() {
+ Console.WriteLine(""A:Foo()"");
+ }
+}
+
+abstract class B : A {
+ public abstract override void Foo();
+ public abstract void FooBar();
+}
+
+class C : $B
+{
+}
+", @"class A {
+ public virtual void Foo() {
+ Console.WriteLine(""A:Foo()"");
+ }
+}
+
+abstract class B : A {
+ public abstract override void Foo();
+ public abstract void FooBar();
+}
+
+class C : B
+{
+ #region implemented abstract members of B
+ public override void Foo ()
+ {
+ throw new System.NotImplementedException ();
+ }
+ public override void FooBar ()
+ {
+ throw new System.NotImplementedException ();
+ }
+ #endregion
+}
+");
+ }
+
+
+
+ [Test]
+ public void TestAlreadyImplemented()
+ {
+ Test<ImplementAbstractMembersAction>(@"class A {
+ public abstract void Foo();
+ public abstract void FooBar();
+}
+
+abstract class B : A {
+ public override void Foo() {}
+}
+
+class C : $B
+{
+}
+", @"class A {
+ public abstract void Foo();
+ public abstract void FooBar();
+}
+
+abstract class B : A {
+ public override void Foo() {}
+}
+
+class C : B
+{
+ #region implemented abstract members of A
+ public override void FooBar ()
+ {
+ throw new System.NotImplementedException ();
+ }
+ #endregion
+}
+");
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementNotImplementedPropertyTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementNotImplementedPropertyTests.cs
new file mode 100644
index 0000000..0aca9c1
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/ImplementNotImplementedPropertyTests.cs
@@ -0,0 +1,80 @@
+//
+// ImplementNotImplementedPropertyTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeActions
+{
+ [TestFixture]
+ public class ImplementNotImplementedPropertyTests : ContextActionTestBase
+ {
+ [Test]
+ public void TestGetter ()
+ {
+ Test<ImplementNotImplementedProperty> (@"class TestClass
+{
+ string $Test { get { throw new System.NotImplementedException (); } }
+}", @"class TestClass
+{
+ readonly string test;
+ string Test {
+ get {
+ return test;
+ }
+ }
+}");
+ }
+
+ [Test]
+ public void TestGetterAndSetter ()
+ {
+ Test<ImplementNotImplementedProperty> (@"class TestClass
+{
+ string $Test {
+ get {
+ throw new System.NotImplementedException ();
+ }
+ set {
+ throw new System.NotImplementedException ();
+ }
+ }
+}", @"class TestClass
+{
+ string test;
+ string Test {
+ get {
+ return test;
+ }
+ set {
+ test = value;
+ }
+ }
+}");
+ }
+
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IterateViaForeachTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IterateViaForeachTests.cs
index 4eaca5c..3cf6a75 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IterateViaForeachTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IterateViaForeachTests.cs
@@ -147,7 +147,7 @@ class TestClass
foreach (var c in s as IEnumerable<char>) {
}
}
-}", 0, true);
+}", 0, false);
}
[Test]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/MetaTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/MetaTests.cs
new file mode 100644
index 0000000..d23b22b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/MetaTests.cs
@@ -0,0 +1,123 @@
+//
+// MetaTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeActions
+{
+ /// <summary>
+ /// Tests for the test APIs.
+ /// </summary>
+ [TestFixture]
+ public class MetaTests
+ {
+ [Test]
+ public void TestGlobalOperation ()
+ {
+ List<string> contents = new List<string>() {
+ @"class Test1
+{
+ public int $x;
+}", @"class Test2
+{
+ public void Foo(Test1 test1)
+ {
+ test1.x = 1;
+ test1.x = 2;
+ }
+}"
+ };
+ var context = TestRefactoringContext.Create(contents, 0);
+ using (var script = context.StartScript()) {
+ var variable = context.GetNode<VariableInitializer>();
+ script.DoGlobalOperationOn(new List<IEntity>() {
+ ((MemberResolveResult) context.Resolve(variable)).Member
+ }, (rCtx, rScript, nodes) => {
+ foreach (var node in nodes) {
+ rScript.Replace(node, new IdentifierExpression("replacement"));
+ }
+ });
+ }
+
+ Assert.AreEqual(@"class Test1
+{
+ public int replacement;
+}", context.GetSideDocumentText(0));
+
+ Assert.AreEqual(@"class Test2
+{
+ public void Foo(Test1 test1)
+ {
+ replacement = 1;
+ replacement = 2;
+ }
+}", context.GetSideDocumentText(1));
+ }
+
+ [Test]
+ public void TestRename ()
+ {
+ List<string> contents = new List<string>() {
+ @"class Test1
+{
+ public int $x;
+}", @"class Test2
+{
+ public void Foo(Test1 test1)
+ {
+ test1.x = 1;
+ test1.x = 2;
+ }
+}"
+ };
+ var context = TestRefactoringContext.Create(contents, 0);
+ using (var script = context.StartScript()) {
+ var variable = context.GetNode<VariableInitializer>();
+ script.Rename(((MemberResolveResult)context.Resolve(variable)).Member, "newName");
+ }
+
+ Assert.AreEqual(@"class Test1
+{
+ public int newName;
+}", context.GetSideDocumentText(0));
+
+ Assert.AreEqual(@"class Test2
+{
+ public void Foo(Test1 test1)
+ {
+ test1.newName = 1;
+ test1.newName = 2;
+ }
+}", context.GetSideDocumentText(1));
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs
index 388458c..615796d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/TestRefactoringContext.cs
@@ -31,12 +31,12 @@ using ICSharpCode.NRefactory.CSharp.Refactoring;
using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.CSharp.TypeSystem;
using ICSharpCode.NRefactory.Editor;
-using ICSharpCode.NRefactory.CSharp.FormattingTests;
-using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.TypeSystem;
using NUnit.Framework;
using System.Threading;
using System.Threading.Tasks;
+using ICSharpCode.NRefactory.CSharp;
+using System.Collections.Generic;
namespace ICSharpCode.NRefactory.CSharp.CodeActions
{
@@ -49,6 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
internal readonly IDocument doc;
readonly TextLocation location;
+ List<TestRefactoringContext> projectContexts;
public TestRefactoringContext (IDocument document, TextLocation location, CSharpAstResolver resolver) : base(resolver, CancellationToken.None)
{
@@ -68,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
}
}
}
-
+
public override bool Supports(Version version)
{
return true;
@@ -165,41 +166,69 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
Replace (node, new IdentifierExpression (newName));
}
- public override void Rename (IEntity entity, string name)
+ public override void Rename (ISymbol symbol, string name)
{
+ if (symbol.SymbolKind == SymbolKind.Variable || symbol.SymbolKind == SymbolKind.Parameter) {
+ Rename(symbol as IVariable, name);
+ return;
+ }
+
FindReferences refFinder = new FindReferences ();
- refFinder.FindReferencesInFile (refFinder.GetSearchScopes (entity),
- context.UnresolvedFile,
- context.RootNode as SyntaxTree,
- context.Compilation, (n, r) => Rename (n, name),
- context.CancellationToken);
+
+ foreach (var fileContext in context.projectContexts)
+ {
+ using (var newScript = (TestScript) fileContext.StartScript()) {
+ refFinder.FindReferencesInFile(refFinder.GetSearchScopes(symbol),
+ fileContext.UnresolvedFile,
+ fileContext.RootNode as SyntaxTree,
+ fileContext.Compilation,
+ (n, r) => newScript.Rename(n, name),
+ context.CancellationToken);
+ }
+ }
}
- public override void Rename (IVariable variable, string name)
+ void Rename (IVariable variable, string name)
{
FindReferences refFinder = new FindReferences ();
- refFinder.FindLocalReferences (variable,
- context.UnresolvedFile,
- context.RootNode as SyntaxTree,
- context.Compilation, (n, r) => Rename (n, name),
- context.CancellationToken);
+
+ refFinder.FindLocalReferences(variable,
+ context.UnresolvedFile,
+ context.RootNode as SyntaxTree,
+ context.Compilation, (n, r) => Rename(n, name),
+ context.CancellationToken);
}
- public override void RenameTypeParameter (IType type, string name = null)
- {
- FindReferences refFinder = new FindReferences ();
- refFinder.FindTypeParameterReferences (type,
- context.UnresolvedFile,
- context.RootNode as SyntaxTree,
- context.Compilation, (n, r) => Rename (n, name),
- context.CancellationToken);
- }
-
public override void CreateNewType (AstNode newType, NewTypeContext context)
{
var output = OutputNode (0, newType, true);
InsertText (0, output.Text);
}
+
+ public override void DoGlobalOperationOn(IEnumerable<IEntity> entities, Action<RefactoringContext, Script, IEnumerable<AstNode>> callback, string operationDescripton)
+ {
+ foreach (var projectContext in context.projectContexts) {
+ DoLocalOperationOn(projectContext, entities, callback);
+ }
+ }
+
+ void DoLocalOperationOn(TestRefactoringContext localContext, IEnumerable<IEntity> entities, Action<RefactoringContext, Script, IEnumerable<AstNode>> callback)
+ {
+ List<AstNode> nodes = new List<AstNode>();
+ FindReferences refFinder = new FindReferences();
+ refFinder.FindReferencesInFile(refFinder.GetSearchScopes(entities),
+ localContext.UnresolvedFile,
+ localContext.RootNode as SyntaxTree,
+ localContext.Compilation,
+ (node, result) => {
+ nodes.Add(node);
+ },
+ CancellationToken.None);
+
+ using (var script = localContext.StartScript()) {
+ callback(localContext, script, nodes);
+ }
+ }
}
#region Text stuff
@@ -244,56 +273,92 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
return doc.Text;
}
}
+
public static TestRefactoringContext Create (string content, bool expectErrors = false)
{
- int idx = content.IndexOf ("$");
- if (idx >= 0)
- content = content.Substring (0, idx) + content.Substring (idx + 1);
- int idx1 = content.IndexOf ("<-");
- int idx2 = content.IndexOf ("->");
-
- int selectionStart = 0;
- int selectionEnd = 0;
- if (0 <= idx1 && idx1 < idx2) {
- content = content.Substring (0, idx2) + content.Substring (idx2 + 2);
- content = content.Substring (0, idx1) + content.Substring (idx1 + 2);
- selectionStart = idx1;
- selectionEnd = idx2 - 2;
- idx = selectionEnd;
- }
+ return Create(new List<string>() { content }, 0, expectErrors);
+ }
+
+ public static TestRefactoringContext Create (List<string> contents, int mainIndex, bool expectErrors = false)
+ {
+ List<int> indexes = new List<int>();
+ List<int> selectionStarts = new List<int>();
+ List<int> selectionEnds = new List<int>();
+ List<IDocument> documents = new List<IDocument>();
+ List<CSharpUnresolvedFile> unresolvedFiles = new List<CSharpUnresolvedFile>();
+ List<SyntaxTree> units = new List<SyntaxTree>();
- var doc = new StringBuilderDocument(content);
- var parser = new CSharpParser();
- var unit = parser.Parse(content, "program.cs");
- if (!expectErrors) {
- if (parser.HasErrors) {
- Console.WriteLine (content);
- Console.WriteLine ("----");
+ for (int i = 0; i < contents.Count; i++) {
+ string content = contents[i];
+ int idx = content.IndexOf("$");
+ if (idx >= 0)
+ content = content.Substring(0, idx) + content.Substring(idx + 1);
+ int idx1 = content.IndexOf("<-");
+ int idx2 = content.IndexOf("->");
+ int selectionStart = 0;
+ int selectionEnd = 0;
+ if (0 <= idx1 && idx1 < idx2) {
+ content = content.Substring(0, idx2) + content.Substring(idx2 + 2);
+ content = content.Substring(0, idx1) + content.Substring(idx1 + 2);
+ selectionStart = idx1;
+ selectionEnd = idx2 - 2;
+ idx = selectionEnd;
}
- foreach (var error in parser.Errors) {
- Console.WriteLine(error.Message);
+ indexes.Add(idx);
+ selectionStarts.Add(selectionStart);
+ selectionEnds.Add(selectionEnd);
+ var doc = new StringBuilderDocument(content);
+ var parser = new CSharpParser();
+ var unit = parser.Parse(content, "program_" + i + ".cs");
+ if (!expectErrors) {
+ if (parser.HasErrors) {
+ Console.WriteLine(content);
+ Console.WriteLine("----");
+ }
+ foreach (var error in parser.Errors) {
+ Console.WriteLine(error.Message);
+ }
+ Assert.IsFalse(parser.HasErrors, "The file contains unexpected parsing errors.");
+ }
+ else {
+ Assert.IsTrue(parser.HasErrors, "Expected parsing errors, but the file doesn't contain any.");
}
- Assert.IsFalse(parser.HasErrors, "The file contains unexpected parsing errors.");
- } else {
- Assert.IsTrue(parser.HasErrors, "Expected parsing errors, but the file doesn't contain any.");
+ unit.Freeze();
+ CSharpUnresolvedFile unresolvedFile = unit.ToTypeSystem();
+ units.Add(unit);
+ documents.Add(doc);
+ unresolvedFiles.Add(unresolvedFile);
}
- unit.Freeze ();
- var unresolvedFile = unit.ToTypeSystem ();
-
IProjectContent pc = new CSharpProjectContent ();
- pc = pc.AddOrUpdateFiles (unresolvedFile);
+ pc = pc.AddOrUpdateFiles (unresolvedFiles);
pc = pc.AddAssemblyReferences (new[] { CecilLoaderTests.Mscorlib, CecilLoaderTests.SystemCore });
-
+
var compilation = pc.CreateCompilation ();
- var resolver = new CSharpAstResolver (compilation, unit, unresolvedFile);
- TextLocation location = TextLocation.Empty;
- if (idx >= 0)
- location = doc.GetLocation (idx);
- return new TestRefactoringContext(doc, location, resolver) {
- selectionStart = selectionStart,
- selectionEnd = selectionEnd
- };
+ List<TestRefactoringContext> contexts = new List<TestRefactoringContext>();
+
+ for (int documentIndex = 0; documentIndex < documents.Count; ++documentIndex)
+ {
+ var doc = documents [documentIndex];
+ var resolver = new CSharpAstResolver (compilation, units[documentIndex], unresolvedFiles[documentIndex]);
+ TextLocation location = TextLocation.Empty;
+ if (indexes[documentIndex] >= 0)
+ location = doc.GetLocation (indexes[documentIndex]);
+ var context = new TestRefactoringContext(doc, location, resolver) {
+ selectionStart = selectionStarts[documentIndex],
+ selectionEnd = selectionEnds[documentIndex],
+ projectContexts = contexts
+ };
+
+ contexts.Add(context);
+ }
+
+ return contexts [mainIndex];
+ }
+
+ public string GetSideDocumentText(int index)
+ {
+ return projectContexts [index].Text;
}
internal static void Print (AstNode node)
@@ -302,4 +367,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
node.AcceptVisitor (v);
}
}
+
+
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/BrowsableAttributeTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/BrowsableAttributeTests.cs
index 5631ad5..ab2db62 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/BrowsableAttributeTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/BrowsableAttributeTests.cs
@@ -143,6 +143,66 @@ class Test
Assert.IsNotNull (provider.Find ("BrowsableTest"), "'BrowsableTest' not found.");
Assert.IsNotNull (provider.Find ("NotBrowsableTest"), "'NotBrowsableTest' not found.");
}
+
+ [Test]
+ public void TestIgnore ()
+ {
+ int cp;
+ var engine1 = CodeCompletionBugTests.CreateEngine (
+ @"
+using System;
+using System.ComponentModel;
+
+[EditorBrowsable(EditorBrowsableState.Always)]
+public class BrowsableTest {}
+
+[EditorBrowsable(EditorBrowsableState.Never)]
+public class NotBrowsableTest {}
+", out cp);
+
+ CompletionDataList provider = CodeCompletionBugTests.CreateProvider (
+ @"class Test
+ {
+ void Test ()
+ {
+ $B$
+ }
+ }", false, e => e.EditorBrowsableBehavior = ICSharpCode.NRefactory.CSharp.Completion.EditorBrowsableBehavior.Ignore, engine1.ctx.CurrentAssembly.UnresolvedAssembly);
+ Assert.IsNotNull (provider, "provider == null");
+ Assert.IsNotNull (provider.Find ("BrowsableTest"), "'BrowsableTest' not found.");
+ Assert.IsNotNull (provider.Find ("NotBrowsableTest"), "'NotBrowsableTest' not found.");
+ }
+
+ [Test]
+ public void TestHideAdvanced ()
+ {
+ int cp;
+ var engine1 = CodeCompletionBugTests.CreateEngine (
+ @"
+using System;
+using System.ComponentModel;
+
+[EditorBrowsable(EditorBrowsableState.Always)]
+public class BrowsableTest {}
+
+[EditorBrowsable(EditorBrowsableState.Advanced)]
+public class NotBrowsableTest {}
+", out cp);
+
+ CompletionDataList provider = CodeCompletionBugTests.CreateProvider (
+ @"class Test
+ {
+ void Test ()
+ {
+ $B$
+ }
+ }", false, e => e.EditorBrowsableBehavior = ICSharpCode.NRefactory.CSharp.Completion.EditorBrowsableBehavior.Normal, engine1.ctx.CurrentAssembly.UnresolvedAssembly);
+ Assert.IsNotNull (provider, "provider == null");
+ Assert.IsNotNull (provider.Find ("BrowsableTest"), "'BrowsableTest' not found.");
+ Assert.IsNull (provider.Find ("NotBrowsableTest"), "'NotBrowsableTest' found.");
+ }
+
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
index f5acaf3..9d699fe 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CodeCompletionBugTests.cs
@@ -207,10 +207,10 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
return new CompletionData (entity.Name);
}
- public ICompletionData CreateTypeCompletionData (ICSharpCode.NRefactory.TypeSystem.IType type, bool fullName, bool isInAttributeContext)
+ public ICompletionData CreateTypeCompletionData (ICSharpCode.NRefactory.TypeSystem.IType type, bool fullName, bool isInAttributeContext, bool addForTypeCreation)
{
- string name = fullName ? builder.ConvertType(type).GetText() : type.Name;
- if (isInAttributeContext && name.EndsWith("Attribute") && name.Length > "Attribute".Length) {
+ string name = fullName ? builder.ConvertType(type).ToString() : type.Name;
+ if (isInAttributeContext && name.EndsWith("Attribute", StringComparison.Ordinal) && name.Length > "Attribute".Length) {
name = name.Substring(0, name.Length - "Attribute".Length);
}
return new CompletionData (name);
@@ -218,7 +218,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
public ICompletionData CreateMemberCompletionData(IType type, IEntity member)
{
- string name = builder.ConvertType(type).GetText();
+ string name = builder.ConvertType(type).ToString();
return new EntityCompletionData (member, name + "."+ member.Name);
}
@@ -258,7 +258,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
return new OverrideCompletionData (m.Name, declarationBegin);
}
- public ICompletionData CreateImportCompletionData(IType type, bool useFullName)
+ public ICompletionData CreateImportCompletionData(IType type, bool useFullName, bool addForTypeCreation)
{
return new ImportCompletionData (type, useFullName);
}
@@ -267,7 +267,12 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
{
return Enumerable.Empty<ICompletionData> ();
}
-
+
+ public ICompletionData CreateFormatItemCompletionData(string format, string description, object example)
+ {
+ return new CompletionData (format + " - " + description +":" + example);
+ }
+
public IEnumerable<ICompletionData> CreatePreProcessorDefinesCompletionData ()
{
yield return new CompletionData ("DEBUG");
@@ -373,18 +378,20 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
mb.AddSymbol(sym);
}
var engine = new CSharpCompletionEngine(doc, mb, new TestFactory(new CSharpResolver (rctx)), pctx, rctx);
-
+ engine.AutomaticallyAddImports = true;
engine.EolMarker = Environment.NewLine;
engine.FormattingPolicy = FormattingOptionsFactory.CreateMono();
return engine;
}
-
- public static CompletionDataList CreateProvider(string text, bool isCtrlSpace, params IUnresolvedAssembly[] references)
+
+ public static CompletionDataList CreateProvider(string text, bool isCtrlSpace, Action<CSharpCompletionEngine> engineCallback, params IUnresolvedAssembly[] references)
{
int cursorPosition;
var engine = CreateEngine(text, out cursorPosition, references);
+ if (engineCallback != null)
+ engineCallback(engine);
var data = engine.GetCompletionData (cursorPosition, isCtrlSpace);
-
+
return new CompletionDataList () {
Data = data,
AutoCompleteEmptyMatch = engine.AutoCompleteEmptyMatch,
@@ -393,6 +400,11 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
};
}
+ public static CompletionDataList CreateProvider(string text, bool isCtrlSpace, params IUnresolvedAssembly[] references)
+ {
+ return CreateProvider(text, isCtrlSpace, null, references);
+ }
+
Tuple<ReadOnlyDocument, CSharpCompletionEngine> GetContent(string text, SyntaxTree syntaxTree)
{
var doc = new ReadOnlyDocument(text);
@@ -4291,7 +4303,7 @@ public class Test
@"
public class Test
{
- $public $
+ $public p$
}
");
@@ -6057,6 +6069,64 @@ class Test
});
}
+ /// <summary>
+ /// Bug 11906 - Intellisense choice injects full name on edit of existing name.
+ /// </summary>
+ [Test]
+ public void TestBug11906()
+ {
+ // The bug was caused by completion popping up in the middle of a word.
+ var provider = CreateProvider(@"using System;
+using System.Threading.Tasks;
+
+enum Test_Struct {
+ Some_Value1,
+ Some_Value2,
+ Some_Value3
+}
+
+public class Test
+{
+ public static void Main (string[] args)
+ {
+ Test_Struct v1 = Test_Struct.Some_$V$Value2;
+ }
+}");
+ Assert.IsTrue(provider == null || provider.Count == 0);
+ }
+
+ [Ignore("Parser bug")]
+ [Test]
+ public void TestBugWithLambdaParameter()
+ {
+ CombinedProviderTest(@"using System.Collections.Generic;
+
+ class C
+ {
+ public static void Main (string[] args)
+ {
+ List<string> list;
+ $list.Find(l => l.Name == l.Name ? l$
+ }
+ }", provider => {
+ Assert.IsNotNull(provider.Find("l"));
+ });
+ }
+
+ [Test]
+ public void TestLexerBug ()
+ {
+ CompletionDataList provider = CreateProvider (
+ @"
+public class TestMe : System.Object
+{
+/*
+ //*/
+ $override $
+}");
+ Assert.IsNotNull (provider, "provider not found.");
+ Assert.IsNotNull (provider.Find ("Equals"), "method 'Equals' not found.");
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CompletionDataList.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CompletionDataList.cs
index 6ade19e..c1b744b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CompletionDataList.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/CompletionDataList.cs
@@ -56,9 +56,9 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
public string DefaultCompletionString { get; set; }
- public ICompletionData Find (string name)
+ public ICompletionData Find (string name, bool includeImportData = false)
{
- return Data.FirstOrDefault (d => d.DisplayText == name);
+ return Data.FirstOrDefault (d => (!(d is CodeCompletionBugTests.TestFactory.ImportCompletionData) || includeImportData) && d.DisplayText == name);
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/FormatItemTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/FormatItemTests.cs
new file mode 100644
index 0000000..fd56592
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/FormatItemTests.cs
@@ -0,0 +1,181 @@
+//
+// FormatItemTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
+{
+ [TestFixture]
+ public class FormatItemTests : TestBase
+ {
+ [Test]
+ public void TestFormatItem ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"
+class TestClass
+{
+ public void Test ()
+ {
+ $string.Format("" {0:$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+
+
+ [Test]
+ public void TestFalsePositive ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test ()
+ {
+ $Console.WriteLine (""Hello :$
+ }
+}");
+ Assert.IsTrue(provider == null || provider.Count == 0);
+ }
+
+ [Test]
+ public void TestFormatItemRecognition ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (Guid i)
+ {
+ string.Format("" ${0:$"", i);
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.AreEqual(4, provider.Count);
+ }
+
+
+ [Test]
+ public void TestDontShowupCase ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (string i)
+ {
+ string.Format("" ${1:$"", 12, i);
+ }
+}");
+ Assert.IsTrue(provider == null || provider.Count == 0);
+ }
+
+ [Test]
+ public void TestIntToString ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"
+class TestClass
+{
+ public void Test (int i)
+ {
+ $i.ToString(""$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+
+ [Test]
+ public void TestDateTimeToString ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (DateTime i)
+ {
+ $i.ToString(""$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+
+
+ [Test]
+ public void TestGuidToString ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (Guid i)
+ {
+ $i.ToString(""$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+
+ [Test]
+ public void TestTimeSpanToString ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (TimeSpan i)
+ {
+ $i.ToString(""$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+
+
+ [Test]
+ public void TestEnumToString ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider (
+ @"using System;
+class TestClass
+{
+ public void Test (ConsoleKey i)
+ {
+ $i.ToString(""$
+ }
+}");
+ Assert.IsNotNull (provider);
+ Assert.Greater(provider.Count, 0);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/GetCurrentParameterIndexTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/GetCurrentParameterIndexTests.cs
index 3d9b660..fb6ac2b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/GetCurrentParameterIndexTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/GetCurrentParameterIndexTests.cs
@@ -54,7 +54,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
var doc = new ReadOnlyDocument(editorText.ToString ());
var pctx = new CSharpProjectContent();
var rctx = new CSharpTypeResolveContext(pctx.CreateCompilation().MainAssembly);
- var ctxProvider = new DefaultCompletionContextProvider(doc, new CSharpUnresolvedFile("a.cs"));
+ var ctxProvider = new DefaultCompletionContextProvider(doc, new CSharpUnresolvedFile());
var engine = new CSharpParameterCompletionEngine(doc, ctxProvider, new ParameterCompletionTests.TestFactory(pctx), pctx, rctx);
return engine.GetCurrentParameterIndex(trigger, end);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ImportCompletionTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ImportCompletionTests.cs
index 4abbfe6..194b114 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ImportCompletionTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ImportCompletionTests.cs
@@ -72,12 +72,12 @@ class Test
}
");
- var data = provider.Find ("AppDomain") as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ var data = provider.Find ("AppDomain", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
Assert.NotNull(data);
Assert.AreEqual("System", data.Type.Namespace);
Assert.False(data.UseFullName);
- data = provider.Find ("File") as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ data = provider.Find ("File", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
Assert.NotNull(data);
Assert.AreEqual("System.IO", data.Type.Namespace);
Assert.False(data.UseFullName);
@@ -96,10 +96,10 @@ class Test
}
");
- var data = provider.Find ("AppDomain") as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ var data = provider.Find ("AppDomain", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
Assert.IsNull(data);
- data = provider.Find ("File") as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ data = provider.Find ("File", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
Assert.NotNull(data);
Assert.AreEqual("System.IO", data.Type.Namespace);
Assert.False(data.UseFullName);
@@ -123,10 +123,81 @@ class Test
}
");
- var data = provider.Find ("AppDomain") as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ var data = provider.Find ("AppDomain", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
Assert.NotNull(data);
Assert.True(data.UseFullName);
}
+
+
+ [Test]
+ public void TestAutomaticImport ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider(@"class Test
+{
+ public static void Main (string[] args)
+ {
+ $c$
+ }
+}");
+ var data = provider.Find ("Console", true) as CodeCompletionBugTests.TestFactory.ImportCompletionData;
+ Assert.NotNull(data);
+ Assert.False(data.UseFullName);
+
+ }
+
+ [Test]
+ public void TestAutomaticImportClash1 ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider(@"class Console {}
+
+class Test
+{
+ public static void Main (string[] args)
+ {
+ $c$
+ }
+}");
+ var data = provider.Data.OfType<CodeCompletionBugTests.TestFactory.ImportCompletionData>().Single(d => d.DisplayText == "Console");
+ Assert.NotNull(data);
+ Assert.True(data.UseFullName);
+
+ }
+
+ [Ignore("Too slow atm :(")]
+ [Test]
+ public void TestAutomaticImportLocalClash ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider(@"
+class Test
+{
+ public static void Main (string[] args)
+ {
+ int Console = 12;
+ $c$
+ }
+}");
+ var data = provider.Data.OfType<CodeCompletionBugTests.TestFactory.ImportCompletionData>().Single(d => d.DisplayText == "Console");
+ Assert.NotNull(data);
+ Assert.True(data.UseFullName);
+
+ }
+
+ [Test]
+ public void TestAutomaticHiding ()
+ {
+ var provider = CodeCompletionBugTests.CreateProvider(@"using System.Collections.Generic;
+
+class Test
+{
+ public static void Main (string[] args)
+ {
+ $D$
+ }
+}");
+ var data = provider.Data.OfType<CodeCompletionBugTests.TestFactory.ImportCompletionData>().FirstOrDefault(d => d.DisplayText == "Dictionary");
+ Assert.IsNull(data);
+
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ParameterCompletionTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ParameterCompletionTests.cs
index 2813306..1ea42a0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ParameterCompletionTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeCompletion/ParameterCompletionTests.cs
@@ -26,20 +26,18 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Collections.Generic;
using NUnit.Framework;
using ICSharpCode.NRefactory.Completion;
using ICSharpCode.NRefactory.CSharp.Completion;
using ICSharpCode.NRefactory.Editor;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
using ICSharpCode.NRefactory.TypeSystem;
using System.Linq;
using ICSharpCode.NRefactory.CSharp.TypeSystem;
namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
{
- [TestFixture()]
+ [TestFixture]
public class ParameterCompletionTests : TestBase
{
internal class TestFactory : IParameterCompletionDataFactory
@@ -51,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
this.ctx = ctx;
}
- class Provider : IParameterDataProvider
+ internal class Provider : IParameterDataProvider
{
public IEnumerable<IMethod> Data { get; set; }
#region IParameterDataProvider implementation
@@ -276,33 +274,33 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
}
#region IParameterCompletionDataFactory implementation
- public IParameterDataProvider CreateConstructorProvider(int startOffset, ICSharpCode.NRefactory.TypeSystem.IType type)
+ public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type)
{
Assert.IsTrue(type.Kind != TypeKind.Unknown);
- return new Provider () {
+ return new Provider {
Data = type.GetConstructors (m => m.Accessibility == Accessibility.Public)
};
}
- public IParameterDataProvider CreateConstructorProvider(int startOffset, ICSharpCode.NRefactory.TypeSystem.IType type, AstNode skipNode)
+ public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, AstNode skipNode)
{
Assert.IsTrue(type.Kind != TypeKind.Unknown);
- return new Provider () {
+ return new Provider {
Data = type.GetConstructors (m => m.Accessibility == Accessibility.Public)
};
}
public IParameterDataProvider CreateMethodDataProvider (int startOffset, IEnumerable<IMethod> methods)
{
- return new Provider () {
+ return new Provider {
Data = methods
};
}
- public IParameterDataProvider CreateDelegateDataProvider(int startOffset, ICSharpCode.NRefactory.TypeSystem.IType type)
+ public IParameterDataProvider CreateDelegateDataProvider(int startOffset, IType type)
{
Assert.IsTrue(type.Kind != TypeKind.Unknown);
- return new Provider () {
+ return new Provider {
Data = new [] { type.GetDelegateInvokeMethod () }
};
}
@@ -312,21 +310,21 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
Assert.IsTrue(type.Kind != TypeKind.Unknown);
if (type.Kind == TypeKind.Array)
return new ArrayProvider ();
- return new IndexerProvider () {
+ return new IndexerProvider {
Data = accessibleIndexers
};
}
public IParameterDataProvider CreateTypeParameterDataProvider (int startOffset, IEnumerable<IType> types)
{
- return new TypeParameterDataProvider () {
+ return new TypeParameterDataProvider {
Data = types
};
}
public IParameterDataProvider CreateTypeParameterDataProvider (int startOffset, IEnumerable<IMethod> methods)
{
- return new MethodTypeParameterDataProvider () {
+ return new MethodTypeParameterDataProvider {
Data = methods
};
}
@@ -378,7 +376,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeCompletion
/// <summary>
/// Bug 427448 - Code Completion: completion of constructor parameters not working
/// </summary>
- [Test()]
+ [Test]
public void TestBug427448 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -413,7 +411,7 @@ class AClass
/// <summary>
/// Bug 432437 - No completion when invoking delegates
/// </summary>
- [Test()]
+ [Test]
public void TestBug432437 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -435,7 +433,7 @@ class Test
/// <summary>
/// Bug 432658 - Incorrect completion when calling an extension method from inside another extension method
/// </summary>
- [Test()]
+ [Test]
public void TestBug432658 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -457,7 +455,7 @@ class Test
/// <summary>
/// Bug 432727 - No completion if no constructor
/// </summary>
- [Test()]
+ [Test]
public void TestBug432727 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -475,7 +473,7 @@ class Test
/// <summary>
/// Bug 434705 - No autocomplete offered if not assigning result of 'new' to a variable
/// </summary>
- [Test()]
+ [Test]
public void TestBug434705 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -500,7 +498,7 @@ class AClass
/// <summary>
/// Bug 434705 - No autocomplete offered if not assigning result of 'new' to a variable
/// </summary>
- [Test()]
+ [Test]
public void TestBug434705B ()
{
IParameterDataProvider provider = CreateProvider (
@@ -526,7 +524,7 @@ class TestClass
/// <summary>
/// Bug 434701 - No autocomplete in attributes
/// </summary>
- [Test()]
+ [Test]
public void TestBug434701 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -550,7 +548,7 @@ class AClass
/// <summary>
/// Bug 447985 - Exception display tip is inaccurate for derived (custom) exceptions
/// </summary>
- [Test()]
+ [Test]
public void TestBug447985 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -585,7 +583,7 @@ class AClass
/// <summary>
/// Bug 1760 - [New Resolver] Parameter tooltip not shown for indexers
/// </summary>
- [Test()]
+ [Test]
public void Test1760 ()
{
var provider = CreateProvider (
@@ -601,7 +599,7 @@ class TestClass
Assert.AreEqual (1, provider.Count);
}
- [Test()]
+ [Test]
public void TestSecondIndexerParameter ()
{
var provider = CreateProvider (
@@ -618,7 +616,7 @@ class TestClass
Assert.AreEqual (1, provider.Count);
}
- [Test()]
+ [Test]
public void TestSecondMethodParameter ()
{
var provider = CreateProvider (
@@ -637,7 +635,7 @@ class TestClass
/// Bug 599 - Regression: No intellisense over Func delegate
- [Test()]
+ [Test]
public void TestBug599 ()
{
var provider = CreateProvider (
@@ -656,7 +654,7 @@ class TestClass
}
/// Bug 3307 - Chained linq methods do not work correctly
- [Test()]
+ [Test]
public void TestBug3307 ()
{
var provider = CreateProvider (
@@ -674,7 +672,7 @@ class TestClass
Assert.IsTrue (provider.Count > 0);
}
- [Test()]
+ [Test]
public void TestBug3307FollowUp ()
{
var provider = CodeCompletionBugTests.CreateProvider (
@@ -696,7 +694,7 @@ public class MainClass
Assert.IsFalse (provider.AutoSelect, "auto select enabled !");
}
- [Test()]
+ [Test]
public void TestBug3307FollowUp2 ()
{
var provider = CodeCompletionBugTests.CreateProvider (
@@ -714,7 +712,7 @@ public class MainClass
Assert.IsFalse (provider.AutoSelect, "auto select enabled !");
}
- [Test()]
+ [Test]
public void TestConstructor ()
{
IParameterDataProvider provider = CreateProvider (
@@ -732,7 +730,7 @@ class A
}
- [Test()]
+ [Test]
public void TestConstructorCase2 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -758,7 +756,7 @@ namespace Test
Assert.AreEqual (2, provider.Count);
}
- [Test()]
+ [Test]
public void TestTypeParameter ()
{
IParameterDataProvider provider = CreateProvider (
@@ -778,7 +776,7 @@ namespace Test
Assert.AreEqual (16, provider.Count);
}
- [Test()]
+ [Test]
public void TestSecondTypeParameter ()
{
IParameterDataProvider provider = CreateProvider (
@@ -799,7 +797,7 @@ namespace Test
}
[Ignore("TODO")]
- [Test()]
+ [Test]
public void TestMethodTypeParameter ()
{
IParameterDataProvider provider = CreateProvider (
@@ -824,7 +822,7 @@ namespace Test
}
[Ignore("TODO")]
- [Test()]
+ [Test]
public void TestSecondMethodTypeParameter ()
{
IParameterDataProvider provider = CreateProvider (
@@ -848,7 +846,7 @@ namespace Test
Assert.AreEqual (1, provider.Count);
}
- [Test()]
+ [Test]
public void TestArrayParameter ()
{
var provider = CreateProvider (
@@ -865,7 +863,7 @@ class TestClass
Assert.AreEqual (1, provider.Count);
}
- [Test()]
+ [Test]
public void TestSecondArrayParameter ()
{
var provider = CreateProvider (
@@ -883,7 +881,7 @@ class TestClass
}
[Ignore("TODO!")]
- [Test()]
+ [Test]
public void TestTypeParameterInBaseType ()
{
IParameterDataProvider provider = CreateProvider (
@@ -898,7 +896,7 @@ namespace Test
}
- [Test()]
+ [Test]
public void TestBaseConstructorCall ()
{
IParameterDataProvider provider = CreateProvider (
@@ -925,7 +923,7 @@ namespace Test
Assert.AreEqual (2, provider.Count);
}
- [Test()]
+ [Test]
public void TestThisConstructorCall ()
{
IParameterDataProvider provider = CreateProvider (
@@ -957,7 +955,7 @@ namespace Test
/// <summary>
/// Bug 3645 - [New Resolver]Parameter completion shows all static and non-static overloads
/// </summary>
- [Test()]
+ [Test]
public void TestBug3645 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -984,7 +982,7 @@ namespace Test
/// <summary>
/// Bug 3991 - constructor argument completion not working for attributes applied to methods or parameters
/// </summary>
- [Test()]
+ [Test]
public void TestBug3991()
{
IParameterDataProvider provider = CreateProvider(
@@ -1007,7 +1005,7 @@ namespace Test
/// <summary>
/// Bug 4087 - code completion handles object and collection initializers (braces) incorrectly in method calls
/// </summary>
- [Test()]
+ [Test]
public void TestBug4087()
{
IParameterDataProvider provider = CreateProvider(
@@ -1026,7 +1024,7 @@ class TestClass
/// <summary>
/// Bug 4927 - [New Resolver] Autocomplete shows non-static methods when using class name
/// </summary>
- [Test()]
+ [Test]
public void TestBug4927 ()
{
IParameterDataProvider provider = CreateProvider (
@@ -1058,7 +1056,7 @@ public class B
}
- [Test()]
+ [Test]
public void TestLambdaCase()
{
IParameterDataProvider provider = CreateProvider(
@@ -1075,7 +1073,7 @@ class TestClass
Assert.IsTrue (provider != null && provider.Count == 1);
}
- [Test()]
+ [Test]
public void TestJaggedArrayCreation()
{
IParameterDataProvider provider = CreateProvider(
@@ -1228,5 +1226,29 @@ class NUnitTestClass {
}");
Assert.AreEqual (1, provider.Count);
}
+
+ /// <summary>
+ /// Bug 12824 - Invalid argument intellisense inside lambda
+ /// </summary>
+ [Ignore("Parser bug.")]
+ [Test]
+ public void TestBug12824 ()
+ {
+ var provider = (TestFactory.Provider)CreateProvider (
+ @"using System.Threading.Tasks;
+using System;
+
+public class MyEventArgs
+{
+ public static void Main (string[] args)
+ {
+ Task.Factory.StartNew (() => {
+ $throw new Exception ($
+ });
+ }
+}");
+ string name = provider.Data.First().FullName;
+ Assert.AreEqual ("System.Exception..ctor", name);
+ }
}
}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs
index ca003fa..abef00c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs
@@ -30,6 +30,7 @@ using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp
{
+ #if !__MonoCS__
[TestFixture]
public class CodeDomConvertVisitorTests : ResolverTestBase
{
@@ -39,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp
public override void SetUp()
{
base.SetUp();
- unresolvedFile = new CSharpUnresolvedFile("test.cs");
+ unresolvedFile = new CSharpUnresolvedFile();
unresolvedFile.RootUsingScope.Usings.Add(MakeReference("System"));
unresolvedFile.RootUsingScope.Usings.Add(MakeReference("System.Collections.Generic"));
unresolvedFile.RootUsingScope.Usings.Add(MakeReference("System.Linq"));
@@ -481,4 +482,5 @@ namespace ICSharpCode.NRefactory.CSharp
}
#endregion
}
+#endif
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AccessToStaticMemberViaDerivedTypeIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AccessToStaticMemberViaDerivedTypeIssueTests.cs
new file mode 100644
index 0000000..7bd5f1f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AccessToStaticMemberViaDerivedTypeIssueTests.cs
@@ -0,0 +1,346 @@
+//
+// CallToStaticMemberViaDerivedType.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class AccessToStaticMemberViaDerivedTypeIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void MemberInvocation()
+ {
+ var input = @"
+class A
+{
+ public static void F() { }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ B.F ();
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.AreEqual(11, issues[0].Start.Line);
+
+ CheckFix(context, issues[0], @"
+class A
+{
+ public static void F() { }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ A.F ();
+ }
+}"
+ );
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class A
+{
+ public static void F() { }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ // ReSharper disable once AccessToStaticMemberViaDerivedType
+ B.F ();
+ }
+}";
+ TestWrongContext<AccessToStaticMemberViaDerivedTypeIssue>(input);
+ }
+
+ [Test]
+ public void PropertyAccess()
+ {
+ var input = @"
+class A
+{
+ public static string Property { get; set; }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ System.Console.WriteLine(B.Property);
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.AreEqual(11, issues [0].Start.Line);
+
+ CheckFix(context, issues [0], @"
+class A
+{
+ public static string Property { get; set; }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ System.Console.WriteLine(A.Property);
+ }
+}"
+ );
+ }
+
+ [Test]
+ public void FieldAccess()
+ {
+ var input = @"
+class A
+{
+ public static string Property;
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ System.Console.WriteLine(B.Property);
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.AreEqual(11, issues [0].Start.Line);
+
+ CheckFix(context, issues [0], @"
+class A
+{
+ public static string Property;
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ System.Console.WriteLine(A.Property);
+ }
+}"
+ );
+ }
+
+ [Test]
+ public void NestedClass()
+ {
+ var input = @"
+class A
+{
+ public class B
+ {
+ public static void F() { }
+ }
+ public class C : B { }
+}
+class D
+{
+ void Main()
+ {
+ A.C.F ();
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.AreEqual(14, issues [0].Start.Line);
+
+ CheckFix(context, issues [0], @"
+class A
+{
+ public class B
+ {
+ public static void F() { }
+ }
+ public class C : B { }
+}
+class D
+{
+ void Main()
+ {
+ A.B.F ();
+ }
+}"
+ );
+ }
+
+ [Test]
+ public void ExpandsTypeWithNamespaceIfNeccessary()
+ {
+ var input = @"
+namespace First
+{
+ class A
+ {
+ public static void F() { }
+ }
+}
+namespace Second
+{
+ public class B : First.A { }
+ class C
+ {
+ void Main()
+ {
+ B.F ();
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.AreEqual(16, issues [0].Start.Line);
+
+ CheckFix(context, issues [0], @"
+namespace First
+{
+ class A
+ {
+ public static void F() { }
+ }
+}
+namespace Second
+{
+ public class B : First.A { }
+ class C
+ {
+ void Main()
+ {
+ First.A.F ();
+ }
+ }
+}"
+ );
+ }
+
+ [Test]
+ public void IgnoresCorrectCalls()
+ {
+ var input = @"
+class A
+{
+ public static void F() { }
+}
+class B
+{
+ void Main()
+ {
+ A.F();
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresNonStaticCalls()
+ {
+ var input = @"
+class A
+{
+ public void F() { }
+}
+class B : A { }
+class C
+{
+ void Main()
+ {
+ B b = new B();
+ b.F();
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresOwnMemberFunctions()
+ {
+ var input = @"
+class A
+{
+ protected static void F() { }
+}
+class B : A
+{
+ void Main()
+ {
+ F();
+ this.F();
+ base.F();
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresCuriouslyRecurringTemplatePattern()
+ {
+ var input = @"
+class Base<T>
+{
+ public static void F() { }
+}
+class Derived : Base<Derived> {}
+class Test
+{
+ void Main()
+ {
+ Derived.F();
+ }
+}";
+ // do not suggest replacing 'Derived.F()' with 'Base<Derived>.F()'
+ TestRefactoringContext context;
+ var issues = GetIssues(new AccessToStaticMemberViaDerivedTypeIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AssignmentMadeToSameVariableIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AssignmentMadeToSameVariableIssueTests.cs
deleted file mode 100644
index 46329fc..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/AssignmentMadeToSameVariableIssueTests.cs
+++ /dev/null
@@ -1,230 +0,0 @@
-//
-// AssignmentMadeToSameVariableIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class AssignmentMadeToSameVariableIssueTests : InspectionActionTestBase
- {
- [Test]
- public void TestVariable ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- int a = 0;
- a = a;
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod ()
- {
- int a = 0;
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 1, output);
- }
-
- [Test]
- public void TestParameter ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (int a)
- {
- a = a;
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod (int a)
- {
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 1, output);
- }
-
- [Test]
- public void TestField ()
- {
- var input = @"
-class TestClass
-{
- int a;
- void TestMethod ()
- {
- a = a;
- this.a = this.a;
- this.a = a;
- }
-}";
- var output = @"
-class TestClass
-{
- int a;
- void TestMethod ()
- {
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 3, output);
- }
-
- [Test]
- public void TestFix ()
- {
- var input = @"
-class TestClass
-{
- void Test (int i) { }
- void TestMethod ()
- {
- int a = 0;
- a = a;
- Test (a = a);
- }
-}";
- var output = @"
-class TestClass
-{
- void Test (int i) { }
- void TestMethod ()
- {
- int a = 0;
- Test (a);
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 2, output);
- }
-
- [Test]
- public void TestNoIssue ()
- {
- var input = @"
-class TestClass
-{
- int a;
- int b;
-
- public int Prop { get; set; }
-
- void TestMethod (int a)
- {
- a = b;
- this.a = b;
- this.a = a;
- Prop = Prop;
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 0);
- }
-
- [Test]
- public void IgnoresAssignmentWithDifferentRootObjects ()
- {
- var input = @"
-class TestClass
-{
- int a;
-
- void TestMethod (TestClass tc)
- {
- a = tc.a;
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 0);
- }
-
- [Test]
- public void NestedFieldAccess ()
- {
- var input = @"
-class TestClass
-{
- int a;
-
- TestClass nested;
-
- void TestMethod ()
- {
- nested.nested.a = nested.nested.a;
- }
-}";
- var output = @"
-class TestClass
-{
- int a;
-
- TestClass nested;
-
- void TestMethod ()
- {
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 1, output);
- }
-
- [Test]
- public void NestedPropertyAccess ()
- {
- var input = @"
-class TestClass
-{
- int a;
-
- TestClass nested { get; set; }
-
- void TestMethod ()
- {
- nested.nested.a = nested.nested.a;
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 0);
- }
-
- [Test]
- public void TestNoIssueWithCompoundOperator ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (int a)
- {
- a += a;
- }
-}";
- Test<AssignmentMadeToSameVariableIssue> (input, 0);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS0029InvalidConversionIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS0029InvalidConversionIssueTests.cs
new file mode 100644
index 0000000..207ca7e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS0029InvalidConversionIssueTests.cs
@@ -0,0 +1,446 @@
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class CS0029InvalidConversionIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestConversion()
+ {
+ var input = @"
+class TestClass
+{
+enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ int x;
+ x = i;
+ }
+}";
+ var output = @"
+class TestClass
+{
+enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ int x;
+ x = (int)i;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ [Test]
+ public void TestConversionInInitializer()
+ {
+ var input = @"
+class TestClass
+{
+enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ int x = i;
+ }
+}";
+ var output = @"
+class TestClass
+{
+enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ int x = (int)i;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ [Test]
+ public void TestClassConversion()
+ {
+ var input = @"
+class Base {}
+class Test: Base {}
+class TestClass
+{
+ void TestMethod (Test i)
+ {
+ Base x;
+ x = i;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, 0);
+ }
+
+ [Test]
+ public void TestConversionDoubleFloat()
+ {
+ var input = @"
+class Foo
+{
+ void Bar () {
+ double c = 3.5;
+ float fc;
+ fc = c;
+ }
+}";
+ var output = @"
+class Foo
+{
+ void Bar () {
+ double c = 3.5;
+ float fc;
+ fc = (float)c;
+ }
+}";
+
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ [Test]
+ public void TestConversionEnumToInt()
+ {
+ var input = @"
+class Foo
+{
+ enum Enum { Zero }
+ void Bar () {
+ var e = Enum.Zero;
+ int val;
+ val = e;
+ }
+}";
+ var output = @"
+class Foo
+{
+ enum Enum { Zero }
+ void Bar () {
+ var e = Enum.Zero;
+ int val;
+ val = (int)e;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ [Test]
+ public void TestConversionSameType()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int x =0;
+ int y = 1;
+ $x = i;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, 0);
+ }
+
+ [Test]
+ public void TestUserDefinedAddition()
+ {
+ var input = @"
+struct Vector {
+ public static explicit operator Point(Vector v) { return new Point(); }
+}
+struct Point {
+ public static Point operator +(Point p, Vector v) { return new Point(); }
+}
+class TestClass
+{
+ void TestMethod ()
+ {
+ Point p = new Point();
+ $p += new Vector();
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, 0);
+ }
+
+ [Test]
+ public void TestImplicitOperator()
+ {
+ var input = @"
+struct Vector {
+ public static implicit operator Point(Vector v) { return new Point(); }
+}
+
+struct Point {
+
+}
+
+class TestClass
+{
+ void TestMethod ()
+ {
+ Point p;
+ p = new Vector ();
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, 0);
+ }
+
+ [Test]
+ public void TestAssignZeroToEnum()
+ {
+ var input = @"using System;
+class TestClass
+{
+ void TestMethod ()
+ {
+ StringComparison c = 0;
+ c = 0;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, 0);
+ }
+
+ [Test]
+ public void AssignCustomClassToString()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ string x = this;
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new CS0029InvalidConversionIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ Assert.IsFalse(issues[0].Actions.Any());
+ }
+
+ /// <summary>
+ /// Bug 12490 - Cast warnings with literals
+ /// </summary>
+ [Test]
+ public void TestBug12490()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ uint t;
+ t = 6;
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new CS0029InvalidConversionIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestReturnInMethod()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ };
+ int TestMethod (Enum i)
+ {
+ return i;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ enum Enum{ };
+ int TestMethod (Enum i)
+ {
+ return (int)i;
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+
+ [Test]
+ public void TestReturnInAnonymousMethod()
+ {
+ var input = @"using System;
+
+class TestClass
+{
+ enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ Func<int> foo = delegate {
+ return i;
+ };
+ }
+}";
+ var output = @"using System;
+
+class TestClass
+{
+ enum Enum{ };
+ void TestMethod (Enum i)
+ {
+ Func<int> foo = delegate {
+ return (int)i;
+ };
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+
+ [Test]
+ public void TestReturnInProperty()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ A };
+ int Test {
+ get {
+ return Enum.A;
+ }
+ }
+}";
+ var output = @"
+class TestClass
+{
+ enum Enum{ A };
+ int Test {
+ get {
+ return (int)Enum.A;
+ }
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ [Test]
+ public void TestCall()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ };
+ void Foo(string s, int i) {}
+ void TestMethod (Enum i)
+ {
+ Foo (""Bar"", i);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ enum Enum{ };
+ void Foo(string s, int i) {}
+ void TestMethod (Enum i)
+ {
+ Foo (""Bar"", (int)i);
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+
+ [Test]
+ public void TestCallWithOverloads()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ };
+ void Foo(string s, object o) {}
+ void Foo(string s, int i) {}
+ void TestMethod (Enum i)
+ {
+ Foo (""Bar"", i);
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new CS0029InvalidConversionIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestCallWithOverloads2()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ };
+ void Foo(string s, string o) {}
+ void Foo(string s, int i) {}
+ void TestMethod (Enum i)
+ {
+ Foo (""Bar"", i);
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new CS0029InvalidConversionIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ }
+
+ [Test]
+ public void TestArrayInitializer()
+ {
+ var input = @"
+class TestClass
+{
+ enum Enum{ A }
+ public static void Main (string[] args)
+ {
+ System.Console.WriteLine (new int[] { Enum.A });
+ }
+}";
+ var output = @"
+class TestClass
+{
+ enum Enum{ A }
+ public static void Main (string[] args)
+ {
+ System.Console.WriteLine (new int[] { (int)Enum.A });
+ }
+}";
+ Test<CS0029InvalidConversionIssue>(input, output);
+ }
+
+ // TODO: create resolver unit tests for this issue
+ [Test, Ignore("Resolver bug - GetConversion() returns the explicit conversion instead of the expected identity conversion")]
+ public void ExplicitConversionFromUnknownType()
+ {
+ string input = @"
+class Test {
+ void M(MissingInterface m) {
+ this.Project = (Project)m;
+ }
+ public Project Project { get; set; }
+}
+class Project : MissingInterface {}";
+ TestWrongContext<CS0029InvalidConversionIssue>(input);
+ }
+
+ [Test]
+ public void TestFixedConversion()
+ {
+ var input = @"unsafe struct TestMe
+{
+ fixed int textureID[8], fooBar[12];
+
+ public void Randomize ()
+ {
+ fixed (int* buf = textureID) {
+ buf [0] = 1;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new CS0029InvalidConversionIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1717AssignmentMadeToSameVariableIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1717AssignmentMadeToSameVariableIssueTests.cs
new file mode 100644
index 0000000..3bca10e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1717AssignmentMadeToSameVariableIssueTests.cs
@@ -0,0 +1,266 @@
+//
+// CS1717AssignmentMadeToSameVariableIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class CS1717AssignmentMadeToSameVariableIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestVariable ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int a = 0;
+ a = a;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int a = 0;
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 1, output);
+ }
+
+ [Ignore("Parser/AST generation error - WarningList is empty")]
+ [Test]
+ public void TestPragmaSuppression()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int a = 0;
+#pragma warning disable 1717
+ a = a;
+#pragma warning restore 1717
+ }
+}";
+ TestWrongContext<CS1717AssignmentMadeToSameVariableIssue>(input);
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int a = 0;
+// ReSharper disable once CSharpWarnings::CS1717
+ a = a;
+ }
+}";
+ TestWrongContext<CS1717AssignmentMadeToSameVariableIssue>(input);
+ }
+
+
+
+ [Test]
+ public void TestParameter ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int a)
+ {
+ a = a;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (int a)
+ {
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestField ()
+ {
+ var input = @"
+class TestClass
+{
+ int a;
+ void TestMethod ()
+ {
+ a = a;
+ this.a = this.a;
+ this.a = a;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ int a;
+ void TestMethod ()
+ {
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 3, output);
+ }
+
+ [Test]
+ public void TestFix ()
+ {
+ var input = @"
+class TestClass
+{
+ void Test (int i) { }
+ void TestMethod ()
+ {
+ int a = 0;
+ a = a;
+ Test (a = a);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void Test (int i) { }
+ void TestMethod ()
+ {
+ int a = 0;
+ Test (a);
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 2, output);
+ }
+
+ [Test]
+ public void TestNoIssue ()
+ {
+ var input = @"
+class TestClass
+{
+ int a;
+ int b;
+
+ public int Prop { get; set; }
+
+ void TestMethod (int a)
+ {
+ a = b;
+ this.a = b;
+ this.a = a;
+ Prop = Prop;
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 0);
+ }
+
+ [Test]
+ public void IgnoresAssignmentWithDifferentRootObjects ()
+ {
+ var input = @"
+class TestClass
+{
+ int a;
+
+ void TestMethod (TestClass tc)
+ {
+ a = tc.a;
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 0);
+ }
+
+ [Test]
+ public void NestedFieldAccess ()
+ {
+ var input = @"
+class TestClass
+{
+ int a;
+
+ TestClass nested;
+
+ void TestMethod ()
+ {
+ nested.nested.a = nested.nested.a;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ int a;
+
+ TestClass nested;
+
+ void TestMethod ()
+ {
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void NestedPropertyAccess ()
+ {
+ var input = @"
+class TestClass
+{
+ int a;
+
+ TestClass nested { get; set; }
+
+ void TestMethod ()
+ {
+ nested.nested.a = nested.nested.a;
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 0);
+ }
+
+ [Test]
+ public void TestNoIssueWithCompoundOperator ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int a)
+ {
+ a += a;
+ }
+}";
+ Test<CS1717AssignmentMadeToSameVariableIssue> (input, 0);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1729TypeHasNoConstructorWithNArgumentsIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1729TypeHasNoConstructorWithNArgumentsIssueTests.cs
new file mode 100644
index 0000000..1b4f39d
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CS1729TypeHasNoConstructorWithNArgumentsIssueTests.cs
@@ -0,0 +1,243 @@
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeIssues;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class CS1729TypeHasNoConstructorWithNArgumentsIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void ShouldReturnIssueIfBaseConstructorNotInvoked()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(string input) {}
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 1);
+ }
+
+ [Test]
+ public void ShouldNotReturnIssueIfBaseClassHasDefaultConstructor()
+ {
+ var testInput =
+@"class BaseClass
+{
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldNotReturnIssueIfBaseConstructorIsInvoked()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(string input) {}
+}
+
+class ChildClass : BaseClass
+{
+ public ChildClass() : base(""test"") {}
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldIgnoreInterfaces()
+ {
+ var testInput =
+@"class TestClass : System.Collections.IList
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldMakeSureAllConstructorsInvokeBaseConstructor()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(string test) {}
+}
+
+class ChildClass : BaseClass
+{
+ public ChildClass() : base(""test"") {}
+ public ChildClass(string test) {}
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 1);
+ }
+
+ [Test]
+ public void ShouldOnlyLookAtDirectBaseClasses()
+ {
+ var testInput =
+@"class TopLevelClass
+{
+ public TopLevelClass(string test) {}
+}
+
+class BaseClass : TopLevelClass
+{
+ public BaseClass() : base(""hello"") {}
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldReturnAnIssueIfBaseConstructorIsPrivate()
+ {
+ var testInput =
+@"class BaseClass
+{
+ private BaseClass() {}
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 1);
+ }
+
+ [Test]
+ public void ShouldReturnAnIssueIfBaseConstructorIsPrivate_ExplicitInitializer()
+ {
+ var testInput =
+@"class BaseClass
+{
+ private BaseClass() {}
+}
+
+class ChildClass : BaseClass
+{
+ public ChildClass() : base() {}
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 1);
+ }
+
+ [Test]
+ public void ShouldReturnIssuesForNestedTypes()
+ {
+ TestRefactoringContext context;
+
+ var testInput =
+@"class B {
+ public B(string test) {}
+}
+
+class D {
+ public D(string test) {}
+}
+
+class A : B {
+ class C : D {}
+ public A() {}
+}";
+
+ var issues = GetIssues(new CS1729TypeHasNoConstructorWithNArgumentsIssue(), testInput, out context, false);
+
+ Assert.AreEqual("CS1729: The type 'B' does not contain a constructor that takes '0' arguments", issues.ElementAt(1).Description);
+ Assert.AreEqual("CS1729: The type 'D' does not contain a constructor that takes '0' arguments", issues.ElementAt(0).Description);
+ }
+
+ [Test]
+ public void ShouldNotReturnIssueIfBaseClassCtorHasOptionalParameters()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(int i = 0)
+ {
+ }
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldNotReturnIssueIfBaseClassCtorHasVariadicParameters()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(params string[] str)
+ {
+ }
+}
+
+class ChildClass : BaseClass
+{
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShouldNotReturnIssueForStaticConstructor()
+ {
+ var testInput =
+@"class BaseClass
+{
+ public BaseClass(string text)
+ {
+ }
+}
+
+class ChildClass : BaseClass
+{
+ public ChildClass() : base(""text"") {}
+
+ static ChildClass() {}
+}";
+
+ Test<CS1729TypeHasNoConstructorWithNArgumentsIssue>(testInput, 0);
+ }
+
+ [Test]
+ public void ShowIssueForObjectCreateExpression()
+ {
+ var testInput =
+@"class Test {
+ public void M() {
+ new Test(1);
+ }
+}
+";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new CS1729TypeHasNoConstructorWithNArgumentsIssue(), testInput, out context);
+
+ Assert.AreEqual("CS1729: The type 'Test' does not contain a constructor that takes '1' arguments", issues.Single().Description);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CallToVirtualFunctionFromConstructorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CallToVirtualFunctionFromConstructorTests.cs
deleted file mode 100644
index 814408d..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/CallToVirtualFunctionFromConstructorTests.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-//
-// CallToVirtualFunctionFromConstructorTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class CallToVirtualFunctionFromConstructorTests : InspectionActionTestBase
- {
-
- [Test]
- public void CatchesBadCase()
- {
- var input = @"class Foo
-{
- Foo()
- {
- Bar();
- Bar();
- }
-
- virtual void Bar ()
- {
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new CallToVirtualFunctionFromConstructorIssue(), input, out context);
- Assert.AreEqual(2, issues.Count);
- }
-
- [Test]
- public void IgnoresGoodCase()
- {
- var input = @"class Foo
-{
- Foo()
- {
- Bar();
- Bar();
- }
-
- void Bar ()
- {
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new CallToVirtualFunctionFromConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresSealedClasses()
- {
- var input = @"sealed class Foo
-{
- Foo()
- {
- Bar();
- Bar();
- }
-
- virtual void Bar ()
- {
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new CallToVirtualFunctionFromConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresNonLocalCalls()
- {
- var input = @"class Foo
-{
- Foo()
- {
- Foo f = new Foo();
- f.Bar();
- }
-
- virtual void Bar ()
- {
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new CallToVirtualFunctionFromConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresEventHandlers()
- {
- var input = @"class Foo
-{
- Foo()
- {
- SomeEvent += delegate { Bar(); };
- }
-
- virtual void Bar ()
- {
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new CallToVirtualFunctionFromConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalTernaryEqualBranchTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalTernaryEqualBranchTests.cs
new file mode 100644
index 0000000..b707d39
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalTernaryEqualBranchTests.cs
@@ -0,0 +1,142 @@
+//
+// ConditionalTernaryEqualBranchTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ConditionalTernaryEqualBranchTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str != null ? ""default"" : ""default"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConditionalTernaryEqualBranchIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = ""default"";
+ }
+}");
+
+ }
+
+ [Test]
+ public void TestMoreComplexBranch ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ var c = str != null ? 3 + (3 * 4) - 12 * str.Length : 3 + (3 * 4) - 12 * str.Length;
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConditionalTernaryEqualBranchIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ var c = 3 + (3 * 4) - 12 * str.Length;
+ }
+}");
+
+ }
+
+ [Test]
+ public void TestNotEqualBranches ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str != null ? ""default"" : ""default2"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConditionalTernaryEqualBranchIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+
+ }
+
+ [Test]
+ public void TestResharperSuppression ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+// ReSharper disable once ConditionalTernaryEqualBranch
+ string c = str != null ? ""default"" : ""default"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ConditionalTernaryEqualBranchIssue(), input, out context);
+ Assert.AreEqual (0, issues.Count);
+
+ }
+
+ [Test]
+ public void Test()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ var a = i > 0 ? 1 + 1 : 1 + 1;
+ var b = i > 1 ? 1 : 2;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ var a = 1 + 1;
+ var b = i > 1 ? 1 : 2;
+ }
+}";
+ Test<ConditionalTernaryEqualBranchIssue>(input, 1, output);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalToNullCoalescingInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalToNullCoalescingInspectorTests.cs
deleted file mode 100644
index 4240f55..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConditionalToNullCoalescingInspectorTests.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-//
-// ConditionalToNullCoalescingInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class ConditionalToNullCoalescingInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- string c = str != null ? str : ""default"";
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues (new ConditionalToNullCoalescingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
-
- CheckFix (context, issues [0], @"class Foo
-{
- void Bar (string str)
- {
- string c = str ?? ""default"";
- }
-}");
-
- }
-
- [Test]
- public void TestInspectorCase2 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- string c = null != str ? str : ""default"";
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues (new ConditionalToNullCoalescingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
-
- CheckFix (context, issues [0], @"class Foo
-{
- void Bar (string str)
- {
- string c = str ?? ""default"";
- }
-}");
-
- }
-
- [Test]
- public void TestInspectorCase3 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- string c = null == str ? ""default"" : str;
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues (new ConditionalToNullCoalescingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
-
- CheckFix (context, issues [0], @"class Foo
-{
- void Bar (string str)
- {
- string c = str ?? ""default"";
- }
-}");
- }
-
- [Test]
- public void TestInspectorCase4 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- string c = str == null ? ""default"" : str;
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues (new ConditionalToNullCoalescingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
-
- CheckFix (context, issues [0], @"class Foo
-{
- void Bar (string str)
- {
- string c = str ?? ""default"";
- }
-}");
- }
-
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertConditionalTernaryToNullCoalescingIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertConditionalTernaryToNullCoalescingIssueTests.cs
new file mode 100644
index 0000000..d79eb29
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertConditionalTernaryToNullCoalescingIssueTests.cs
@@ -0,0 +1,148 @@
+//
+// ConvertConditionalTernaryToNullCoalescingIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ConvertConditionalTernaryToNullCoalescingIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str != null ? str : ""default"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConvertConditionalTernaryToNullCoalescingIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str ?? ""default"";
+ }
+}");
+
+ }
+
+ [Test]
+ public void TestInspectorCase2 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = null != str ? str : ""default"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConvertConditionalTernaryToNullCoalescingIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str ?? ""default"";
+ }
+}");
+
+ }
+
+ [Test]
+ public void TestInspectorCase3 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = null == str ? ""default"" : str;
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConvertConditionalTernaryToNullCoalescingIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str ?? ""default"";
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCase4 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str == null ? ""default"" : str;
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ConvertConditionalTernaryToNullCoalescingIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ void Bar (string str)
+ {
+ string c = str ?? ""default"";
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+// ReSharper disable once ConvertConditionalTernaryToNullCoalescing
+ string c = str != null ? str : ""default"";
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ConvertConditionalTernaryToNullCoalescingIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertToStaticMethodIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertToStaticMethodIssueTests.cs
index a32fa16..9c86fdf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertToStaticMethodIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ConvertToStaticMethodIssueTests.cs
@@ -53,6 +53,28 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
}"
);
}
+
+ [Test]
+ public void MethodThatCallsInstanceMethodOnParameter()
+ {
+ Test<ConvertToStaticMethodIssue>(
+ @"class TestClass
+{
+ string $Test (string txt)
+ {
+ return txt.Trim ();
+ }
+}",
+ @"class TestClass
+{
+ static string Test (string txt)
+ {
+ return txt.Trim ();
+ }
+}"
+ );
+ }
+
[Test]
public void TestWithVirtualFunction() {
@@ -65,26 +87,26 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
}";
TestWrongContext<ConvertToStaticMethodIssue>(input);
}
-
+
[Test]
- public void TestWithInterface() {
-
+ public void TestWithInterfaceImplementation() {
var input = @"interface IBase {
void Test();
}
class TestClass : IBase
{
- public virtual void $Test ()
+ public void $Test ()
{
int a = 2;
}
}";
TestWrongContext<ConvertToStaticMethodIssue>(input);
}
+
[Test]
public void TestWithStaticFunction()
{
-
+
var input = @"class TestClass
{
static void $Test ()
@@ -92,9 +114,91 @@ class TestClass : IBase
int a = 2;
}
}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void TestDoNotWarnOnAttributes()
+ {
+
+ var input = @"using System;
+class TestClass
+{
+ [Obsolete]
+ public void $Test ()
+ {
+ int a = 2;
+ }
+}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void TestDoNotWarnOnEmptyMethod()
+ {
+
+ var input = @"using System;
+class TestClass
+{
+ public void $Test ()
+ {
+ }
+}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void TestDoNotWarnOnInterfaceMethod()
+ {
+
+ var input = @"using System;
+interface ITestInterface
+{
+ void $Test ();
+}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void TestDoNotWarnOnNotImplementedMethod()
+ {
+ var input = @"using System;
+class TestClass
+{
+ public void $Test ()
+ {
+ throw new NotImplementedExceptionIssue();
+ }
+}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void TestPropertyAccess()
+ {
+ var input = @"using System;
+class TestClass
+{
+ public int Foo { get; set; }
+ public void $Test ()
+ {
+ System.Console.WriteLine (Foo);
+ }
+}";
+ TestWrongContext<ConvertToStaticMethodIssue>(input);
+ }
+
+ [Test]
+ public void DoNotWarnOnMarshalByRefObject() {
+
+ var input = @"class TestClass : System.MarshalByRefObject
+{
+ public void $Test ()
+ {
+ int a = 2;
+ }
+}";
TestWrongContext<ConvertToStaticMethodIssue>(input);
}
-
}
-
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DisposeMethodInNonIDisposableTypeTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DisposeMethodInNonIDisposableTypeTests.cs
new file mode 100644
index 0000000..eefd98b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DisposeMethodInNonIDisposableTypeTests.cs
@@ -0,0 +1,256 @@
+//
+// DisposeMethodInNonIDisposableTypeTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis <luiscubal at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ public class DisposeMethodInNonIDisposableTypeTests : InspectionActionTestBase
+ {
+ void Test (string input, int issueCount)
+ {
+ TestRefactoringContext context;
+ var issues = GetIssues (new DisposeMethodInNonIDisposableTypeIssue(), input, out context);
+ Assert.AreEqual (issueCount, issues.Count);
+ }
+
+ void TestNoFix (string input, int issueCount)
+ {
+ TestRefactoringContext context;
+ var issues = GetIssues (new DisposeMethodInNonIDisposableTypeIssue(), input, out context);
+ Assert.AreEqual (issueCount, issues.Count);
+ CheckFix (context, issues, input);
+ }
+
+ void TestFix (string input, int issueCount, string output)
+ {
+ TestRefactoringContext context;
+ var issues = GetIssues (new DisposeMethodInNonIDisposableTypeIssue (), input, out context);
+ Assert.AreEqual (issueCount, issues.Count);
+ CheckFix (context, issues, output);
+ }
+
+ [Test]
+ public void IgnoreNonDisposeMethodsTest()
+ {
+ string input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ }
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void IgnoreProperImplementationMethodsTest()
+ {
+ string input = @"
+class TestClass : System.IDisposable
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void IgnoreExplicitDisposeTest()
+ {
+ string input = @"
+interface Foo {
+ void Dispose ();
+}
+class TestClass : Foo
+{
+ void Foo.Dispose ()
+ {
+ }
+}
+";
+ Test(input, 0);
+ }
+
+ [Test]
+ public void IgnoreIndirectImplementationTest()
+ {
+ string input = @"
+interface Bar : System.IDisposable {}
+class TestClass : Bar
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void DisposeWithoutIDisposableTest()
+ {
+ string input = @"
+class TestClass
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ string output = @"
+class TestClass : System.IDisposable
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ TestFix(input, 1, output);
+ }
+
+ [Test]
+ public void DisposeWithUsingTest()
+ {
+ string input = @"
+using System;
+class TestClass
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ string output = @"
+using System;
+class TestClass : IDisposable
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ TestFix(input, 1, output);
+ }
+
+ [Test]
+ public void NonPublicDisposeTest()
+ {
+ string input = @"
+using System;
+class TestClass
+{
+ protected void Dispose ()
+ {
+ }
+}
+";
+
+ string output = @"
+using System;
+class TestClass : IDisposable
+{
+ public void Dispose ()
+ {
+ }
+}
+";
+
+ TestFix(input, 1, output);
+ }
+
+ [Test]
+ public void DisabledForInterfaceTest()
+ {
+ string input = @"
+using System;
+interface TestInterface
+{
+ void Dispose ();
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void DisabledForStaticTest()
+ {
+ string input = @"
+class TestType
+{
+ public static void Dispose() {}
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void DisabledForArgumentsTest()
+ {
+ string input = @"
+class TestClass
+{
+ public void Dispose (object arg)
+ {
+ }
+}
+";
+
+ Test(input, 0);
+ }
+
+ [Test]
+ public void DisabledForNonVoidTest()
+ {
+ string input = @"
+class TestClass
+{
+ public int Dispose ()
+ {
+ return 0;
+ }
+}
+";
+
+ Test(input, 0);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoNotCallOverridableMethodsInConstructorIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoNotCallOverridableMethodsInConstructorIssueTests.cs
new file mode 100644
index 0000000..bb9bc9a
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoNotCallOverridableMethodsInConstructorIssueTests.cs
@@ -0,0 +1,157 @@
+//
+// DoNotCallOverridableMethodsInConstructorIssueTests.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class DoNotCallOverridableMethodsInConstructorIssueTests : InspectionActionTestBase
+ {
+
+ [Test]
+ public void CatchesBadCase()
+ {
+ var input = @"class Foo
+{
+ Foo()
+ {
+ Bar();
+ Bar();
+ }
+
+ virtual void Bar ()
+ {
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new DoNotCallOverridableMethodsInConstructorIssue(), input, out context);
+ Assert.AreEqual(2, issues.Count);
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"class Foo
+{
+ Foo()
+ {
+// ReSharper disable once DoNotCallOverridableMethodsInConstructor
+ Bar();
+ }
+
+ virtual void Bar ()
+ {
+ }
+}";
+ TestWrongContext<DoNotCallOverridableMethodsInConstructorIssue>(input);
+ }
+
+
+
+ [Test]
+ public void IgnoresGoodCase()
+ {
+ var input = @"class Foo
+{
+ Foo()
+ {
+ Bar();
+ Bar();
+ }
+
+ void Bar ()
+ {
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new DoNotCallOverridableMethodsInConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresSealedClasses()
+ {
+ var input = @"sealed class Foo
+{
+ Foo()
+ {
+ Bar();
+ Bar();
+ }
+
+ virtual void Bar ()
+ {
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new DoNotCallOverridableMethodsInConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresNonLocalCalls()
+ {
+ var input = @"class Foo
+{
+ Foo()
+ {
+ Foo f = new Foo();
+ f.Bar();
+ }
+
+ virtual void Bar ()
+ {
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new DoNotCallOverridableMethodsInConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresEventHandlers()
+ {
+ var input = @"class Foo
+{
+ Foo()
+ {
+ SomeEvent += delegate { Bar(); };
+ }
+
+ virtual void Bar ()
+ {
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new DoNotCallOverridableMethodsInConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationIssueTests.cs
deleted file mode 100644
index 8d91361..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationIssueTests.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// DoubleNegationIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class DoubleNegationIssueTests : InspectionActionTestBase
- {
- [Test]
- public void Test ()
- {
- var input = @"
-class TestClass
-{
- bool GetBool () { }
-
- void TestMethod ()
- {
- var x = !!GetBool ();
- x = !(!(GetBool ()));
- }
-}";
- var output = @"
-class TestClass
-{
- bool GetBool () { }
-
- void TestMethod ()
- {
- var x = GetBool ();
- x = GetBool ();
- }
-}";
- Test<DoubleNegationIssue> (input, 2, output);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationOperatorIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationOperatorIssueTests.cs
new file mode 100644
index 0000000..b1315ad
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DoubleNegationOperatorIssueTests.cs
@@ -0,0 +1,63 @@
+//
+// DoubleNegationOperatorIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class DoubleNegationOperatorIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void Test ()
+ {
+ var input = @"
+class TestClass
+{
+ bool GetBool () { }
+
+ void TestMethod ()
+ {
+ var x = !!GetBool ();
+ x = !(!(GetBool ()));
+ }
+}";
+ var output = @"
+class TestClass
+{
+ bool GetBool () { }
+
+ void TestMethod ()
+ {
+ var x = GetBool ();
+ x = GetBool ();
+ }
+}";
+ Test<DoubleNegationOperatorIssue> (input, 2, output);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateBodyMethodIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateBodyMethodIssueTests.cs
index d528370..a3aeab6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateBodyMethodIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateBodyMethodIssueTests.cs
@@ -23,13 +23,12 @@
// 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 NUnit.Framework;
using ICSharpCode.NRefactory.CSharp.Refactoring;
namespace ICSharpCode.NRefactory.CSharp.CodeIssues
{
-
+ [Ignore]
[TestFixture]
public class DuplicateBodyMethodIssueTests : InspectionActionTestBase
{
@@ -43,50 +42,54 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
{
int a = 2;
}
- void $Test2 () {
- int a = 2;
+ void $Test2 ()
+ {
+ int a = 2;
}
}",
- @"class TestClass {
+ @"class TestClass {
void Test ()
{
int a = 2;
}
- void Test2 () {
- Test ();
+ void Test2 ()
+ {
+ Test ();
}
}
"
- );
+ );
}
- [Test]
+
+ [Test]
public void TestNonVoid()
- {
- Test<DuplicateBodyMethodIssue>(
- @"class TestClass {
+ {
+ Test<DuplicateBodyMethodIssue>(
+ @"class TestClass {
int Test ()
{
int a = 2;
- return a;
+ return a;
}
- int $Test2 () {
- int a = 2;
- return a;
+ int $Test2 ()
+ {
+ int a = 2;
+ return a;
}
}",
- @"class TestClass {
+ @"class TestClass {
int Test ()
{
int a = 2;
- return a;
+ return a;
}
- int Test2 () {
- return Test ();
+ int Test2 ()
+ {
+ return Test ();
}
}
"
- );
- }
+ );
+ }
}
-
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateIfInIfChainIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateIfInIfChainIssueTests.cs
index 456726a..9be1414 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateIfInIfChainIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/DuplicateIfInIfChainIssueTests.cs
@@ -23,17 +23,16 @@
// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
+{
[TestFixture]
public class DuplicateIfInIfChainIssueTests : InspectionActionTestBase
{
[Test]
- public void TestSimple ()
+ public void TestSimple()
{
var input = @"
class TestClass
@@ -49,14 +48,14 @@ class TestClass
void TestMethod (int i)
{
if (i > 0) {
- }
+ }
}
}";
- Test<DuplicateIfInIfChainIssue>(input, output);
+ Test<DuplicateIfInIfChainIssue>(input, output);
}
-
+
[Test]
- public void Test ()
+ public void Test()
{
var input = @"
class TestClass
@@ -81,11 +80,11 @@ class TestClass
}
}
}";
- Test<DuplicateIfInIfChainIssue>(input, output);
+ Test<DuplicateIfInIfChainIssue>(input, output);
}
[Test]
- public void TestComplexWithMoreBranches ()
+ public void TestComplexWithMoreBranches()
{
var input = @"
class TestClass
@@ -110,11 +109,10 @@ class TestClass
if(i > 0) {
} else if (i % 2 == 0) {
} else if (i > 1) {
- }
+ }
}
}";
Test<DuplicateIfInIfChainIssue>(input, output);
}
}
-
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/EmptyConstructorIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/EmptyConstructorIssueTests.cs
new file mode 100644
index 0000000..f1fc93e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/EmptyConstructorIssueTests.cs
@@ -0,0 +1,106 @@
+//
+// RedundantConstructorTest.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class EmptyConstructorIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1()
+ {
+ var input = @"using System;class Test {private int member; public Test(){}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, @"using System;class Test {private int member; }");
+ }
+
+ [Test]
+ public void TestInspectorCase2()
+ {
+ var input = @"using System;class Test {private int member;public Test(){} static Test(){}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, @"using System;class Test {private int member; static Test(){}}");
+ }
+
+ [Test]
+ public void TestResharperDisable()
+ {
+ var input = @"using System;
+ //Resharper disable EmptyConstructor
+class Test {
+ public Test(){
+ }
+ //Resharper restore EmptyConstructor
+ }";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestNegateCase1()
+ {
+ var input = @"using System;class Test {public Test(){;}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestNegateCase2()
+ {
+ var input = @"using System;class Test {public Test(){;} private Test(){}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestNegateCase3()
+ {
+ var input = @"using System;class Test {public Test() : base(4) {}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new EmptyConstructorIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssueTests.cs
index b230d24..90ca4b1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionIsAlwaysOfProvidedTypeIssueTests.cs
@@ -104,5 +104,19 @@ sealed class TestClass
}";
Test<ExpressionIsAlwaysOfProvidedTypeIssue> (input, 0);
}
+
+ [Test]
+ public void MissingTypes ()
+ {
+ var input = @"
+sealed class TestClass
+{
+ void TestMethod (object x)
+ {
+ if (x.MissingMethod() is MissingClass) ;
+ }
+}";
+ Test<ExpressionIsAlwaysOfProvidedTypeIssue> (input, 0);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionOfCompatibleTypeCastIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionOfCompatibleTypeCastIssueTests.cs
deleted file mode 100644
index dd6fb0d..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ExpressionOfCompatibleTypeCastIssueTests.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class ExpressionOfCompatibleTypeCastIssueTests : InspectionActionTestBase
- {
- [Test]
- public void TestConversion()
- {
- var input = @"
-class TestClass
-{
-enum Enum{ };
- void TestMethod (Enum i)
- {
- int x;
- x = i;
- }
-}";
- var output = @"
-class TestClass
-{
-enum Enum{ };
- void TestMethod (Enum i)
- {
- int x;
- x = (Enum)i;
- }
-}";
- Test<ExpressionOfCompatibleTypeCastIssue>(input, output);
- }
- [Test]
- public void TestClassConversion()
- {
- var input = @"
-class Base {}
-class Test: Base {}
-class TestClass
-{
- void TestMethod (Test i)
- {
- Base x;
- x = i;
- }
-}";
- Test<ExpressionOfCompatibleTypeCastIssue>(input, 0);
- }
-
- [Test]
- public void TestConversionDoubleFloat()
- {
- var input = @"
-class Foo
-{
- void Bar () {
- double c = 3.5;
- float fc;
- fc = c;
- }
-}";
- var output = @"
-class Foo
-{
- void Bar (){
- double c = 3.5;
- float fc;
- fc = (float)c;
- }
-}";
- //TODO:
- //Test is failing as conversion seems to have a bug that
- //considers that double is implicit convertible to float,
- //when should it be explicitly convertible to float
-
- //Test<ExpressionOfCompatibleTypeCastIssue>(input, output);
- }
-
- [Test]
- public void TestConversionEnumToInt()
- {
- var input = @"
-class Foo
-{
- enum Enum { Zero }
- void Bar () {
- var e = Enum.Zero;
- int val;
- val = e;
- }
-}";
- var output = @"
-class Foo
-{
- enum Enum { Zero }
- void Bar () {
- var e = Enum.Zero;
- int val;
- val = (Enum)e;
- }
-}";
- Test<ExpressionOfCompatibleTypeCastIssue>(input, output);
- }
-
- [Test]
- public void TestConversionSameType()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- int x =0;
- int y = 1;
- $x = i;
- }
-}";
- Test<ExpressionOfCompatibleTypeCastIssue>(input, 0);
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableIsNeverModifiedIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableIsNeverModifiedIssueTests.cs
new file mode 100644
index 0000000..b62ffc3
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableIsNeverModifiedIssueTests.cs
@@ -0,0 +1,133 @@
+//
+// ForControlVariableIsNeverModifiedIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ForControlVariableIsNeverModifiedIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestBinaryOpConditionNotModified ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (int i = 0, j = 0; i < 10; j++)
+ {
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 1);
+ }
+
+ [Test]
+ public void TestBinaryOpConditionModified ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (int i = 0, j = 0; i < 10; i++)
+ {
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 0);
+ }
+
+ [Test]
+ public void TestUnaryOpConditionNotModified ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (bool x = true; !x;)
+ {
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 1);
+ }
+
+ [Test]
+ public void TestUnaryOpConditionModified()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (bool x = true; !x;)
+ {
+ x = false;
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 0);
+ }
+
+ [Test]
+ public void TestIdentifierConditionNotModified ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (bool x = true; x;)
+ {
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 1);
+ }
+
+ [Test]
+ public void TestIdentifierConditionModified ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ for (bool x = false; x;)
+ {
+ x = true;
+ }
+ }
+}";
+ Test<ForControlVariableIsNeverModifiedIssue> (input, 0);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableNotModifiedIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableNotModifiedIssueTests.cs
deleted file mode 100644
index 679550c..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ForControlVariableNotModifiedIssueTests.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-//
-// ForControlVariableNotModifiedIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class ForControlVariableNotModifiedIssueTests : InspectionActionTestBase
- {
- [Test]
- public void TestBinaryOpConditionNotModified ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (int i = 0, j = 0; i < 10; j++)
- {
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 1);
- }
-
- [Test]
- public void TestBinaryOpConditionModified ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (int i = 0, j = 0; i < 10; i++)
- {
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 0);
- }
-
- [Test]
- public void TestUnaryOpConditionNotModified ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (bool x = true; !x;)
- {
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 1);
- }
-
- [Test]
- public void TestUnaryOpConditionModified()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (bool x = true; !x;)
- {
- x = false;
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 0);
- }
-
- [Test]
- public void TestIdentifierConditionNotModified ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (bool x = true; x;)
- {
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 1);
- }
-
- [Test]
- public void TestIdentifierConditionModified ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- for (bool x = false; x;)
- {
- x = true;
- }
- }
-}";
- Test<ForControlVariableNotModifiedIssue> (input, 0);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/FormatStringIssues/FormatStringTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/FormatStringIssues/FormatStringTests.cs
index ca1ca48..ce0fb27 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/FormatStringIssues/FormatStringTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/FormatStringIssues/FormatStringTests.cs
@@ -71,6 +71,23 @@ class TestClass
}
[Test]
+ public void IgnoresCallWithUnknownNumberOfArguments()
+ {
+ var input = @"
+class TestClass
+{
+ string Bar(params object[] args)
+ {
+ return string.Format(""{1}"", args);
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new FormatStringIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
public void FormatItemIndexOutOfRangeOfArguments()
{
var input = @"
@@ -88,6 +105,23 @@ class TestClass
}
[Test]
+ public void FormatItemIndexOutOfRangeOfArguments_ExplicitArrayCreation()
+ {
+ var input = @"
+class TestClass
+{
+ void Foo()
+ {
+ string.Format(""{1}"", new object[] { 1 });
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new FormatStringIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ }
+
+ [Test]
public void FormatItemMissingEndBrace()
{
var input = @"
@@ -139,6 +173,23 @@ class TestClass
}
[Test]
+ public void IgnoresStringWithGoodArguments_ExplicitArrayCreation()
+ {
+ var input = @"
+class TestClass
+{
+ void Foo()
+ {
+ string.Format(""{1}"", new object[] { ""arg0"", ""arg1"" });
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new FormatStringIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
public void IgnoresNonFormattingCall()
{
var input = @"
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/IdenticalConditionalBranchIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/IdenticalConditionalBranchIssueTests.cs
deleted file mode 100644
index 5d7fd2f..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/IdenticalConditionalBranchIssueTests.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// IdenticalConditionalBranchIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class IdenticalConditionalBranchIssueTests : InspectionActionTestBase
- {
- [Test]
- public void Test ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- var a = i > 0 ? 1 + 1 : 1 + 1;
- var b = i > 1 ? 1 : 2;
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- var a = 1 + 1;
- var b = i > 1 ? 1 : 2;
- }
-}";
- Test<IdenticalConditionalBranchIssue> (input, 1, output);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LocalVariableHidesMemberIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LocalVariableHidesMemberIssueTests.cs
index cbdf040..c1b3595 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LocalVariableHidesMemberIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LocalVariableHidesMemberIssueTests.cs
@@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
[Test]
public void TestField ()
{
- var input = @"
+ const string input = @"
class TestClass
{
int i;
@@ -44,9 +44,23 @@ class TestClass
int i, j;
}
}";
- Test<LocalVariableHidesMemberIssue> (input, 1);
+ Test<LocalVariableHidesMemberIssue>(input, 1);
}
+ public void TestDisable()
+ {
+ var input = @"class TestClass
+{
+ int i;
+ void TestMethod()
+ {
+// ReSharper disable once LocalVariableHidesMember
+ int i, j;
+ }
+}";
+ TestWrongContext<LocalVariableHidesMemberIssue>(input);
+ }
+
[Test]
public void TestMethod ()
{
@@ -192,5 +206,23 @@ class TestClass : BaseClass
}";
Test<LocalVariableHidesMemberIssue> (input, 0);
}
+
+ [Test]
+ public void SuppressIssueIfVariableInitializedFromField ()
+ {
+ var input = @"
+class TestClass
+{
+ int i;
+
+ void Method ()
+ {
+ int i = this.i;
+ }
+}";
+ // Given the initializer, member hiding is obviously intended in this case;
+ // so we suppress the warning.
+ Test<LocalVariableHidesMemberIssue> (input, 0);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LockThisTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LockThisTests.cs
new file mode 100644
index 0000000..c0fe1ea
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/LockThisTests.cs
@@ -0,0 +1,742 @@
+// LockThisTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis <luiscubal at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class LockThisTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestLockThisInMethod ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ lock (this) {
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockThisInGetter ()
+ {
+ var input = @"
+class TestClass
+{
+ int MyProperty {
+ get {
+ lock (this) {
+ return 0;
+ }
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ int MyProperty {
+ get {
+ lock (locker) {
+ return 0;
+ }
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockThisInSetter ()
+ {
+ var input = @"
+class TestClass
+{
+ int MyProperty {
+ set {
+ lock (this) {
+ }
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ int MyProperty {
+ set {
+ lock (locker) {
+ }
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockThisInConstructor ()
+ {
+ var input = @"
+class TestClass
+{
+ TestClass()
+ {
+ lock (this) {
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ TestClass()
+ {
+ lock (locker) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockThisInDelegate ()
+ {
+ var input = @"
+class TestClass
+{
+ TestClass()
+ {
+ Action lockThis = delegate ()
+ {
+ lock (this) {
+ }
+ };
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ TestClass()
+ {
+ Action lockThis = delegate ()
+ {
+ lock (locker) {
+ }
+ };
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockThisInLambda ()
+ {
+ var input = @"
+class TestClass
+{
+ TestClass()
+ {
+ Action lockThis = () =>
+ {
+ lock (this) {
+ }
+ };
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ TestClass()
+ {
+ Action lockThis = () =>
+ {
+ lock (locker) {
+ }
+ };
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockParenthesizedThis ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ lock ((this)) {
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestFixMultipleLockThis ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ lock (this) {
+ }
+ }
+
+ void TestMethod2 ()
+ {
+ lock (this) {
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ }
+ }
+
+ void TestMethod2 ()
+ {
+ lock (locker) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 2, output, 0);
+ }
+ [Test]
+ public void TestFixMixedLocks ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ lock (this) {
+ }
+ }
+
+ object locker2 = new object ();
+ void TestMethod2 ()
+ {
+ lock (locker2) {
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ }
+ }
+
+ object locker2 = new object ();
+ void TestMethod2 ()
+ {
+ lock (locker2) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLockNonThis ()
+ {
+ var input = @"
+class TestClass
+{
+ object locker = new object ();
+
+ TestClass()
+ {
+ lock (locker) {
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 0);
+ }
+
+ [Test]
+ public void TestNestedTypeLock ()
+ {
+ var input = @"
+class TestClass
+{
+ class Nested
+ {
+ Nested()
+ {
+ lock (this) {
+ }
+ }
+ }
+}";
+
+ var output = @"
+class TestClass
+{
+ class Nested
+ {
+ object locker = new object ();
+ Nested()
+ {
+ lock (locker) {
+ }
+ }
+ }
+}";
+
+ Test<LockThisIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestMethodSynchronized ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ void TestMethod ()
+ {
+ System.Console.WriteLine (""Foo"");
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ System.Console.WriteLine (""Foo"");
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestMethodWithSynchronizedValue ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (Value = MethodImplOptions.Synchronized)]
+ void TestMethod ()
+ {
+ System.Console.WriteLine (""Foo"");
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ object locker = new object ();
+ void TestMethod ()
+ {
+ lock (locker) {
+ System.Console.WriteLine (""Foo"");
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestMethodHasSynchronized ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized | MethodImplOptions.NoInlining)]
+ void TestMethod ()
+ {
+ System.Console.WriteLine (""Foo"");
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ object locker = new object ();
+ [MethodImpl (MethodImplOptions.NoInlining)]
+ void TestMethod ()
+ {
+ lock (locker) {
+ System.Console.WriteLine (""Foo"");
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestMethodNotSynchronized ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (MethodImplOptions.NoInlining)]
+ void TestMethod ()
+ {
+ System.Console.WriteLine (""Foo"");
+ }
+}";
+
+ Test<LockThisIssue> (input, 0);
+ }
+
+ [Test]
+ public void TestAbstractSynchronized ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public abstract void TestMethod ();
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ public abstract void TestMethod ();
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestDoubleLocking ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public void TestMethod ()
+ {
+ lock (this) {
+ }
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ object locker = new object ();
+ public void TestMethod ()
+ {
+ lock (locker) {
+ lock (locker) {
+ }
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 2, output, 0);
+ }
+
+ [Test]
+ public void TestDelegateLocking ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public void TestMethod ()
+ {
+ Action action = delegate {
+ lock (this) {
+ }
+ };
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ object locker = new object ();
+ public void TestMethod ()
+ {
+ lock (locker) {
+ Action action = delegate {
+ lock (locker) {
+ }
+ };
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 2, output, 0);
+ }
+
+ [Test]
+ public void TestLambdaLocking ()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public void TestMethod ()
+ {
+ Action action = () => {
+ lock (this) {
+ }
+ };
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+abstract class TestClass
+{
+ object locker = new object ();
+ public void TestMethod ()
+ {
+ lock (locker) {
+ Action action = () => {
+ lock (locker) {
+ }
+ };
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 2, output, 0);
+ }
+
+ [Test]
+ public void TestStaticMethod()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public static void TestMethod ()
+ {
+ Console.WriteLine ();
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ static object locker = new object ();
+ public static void TestMethod ()
+ {
+ lock (locker) {
+ Console.WriteLine ();
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestStaticProperty()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ public static int TestProperty
+ {
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ set {
+ Console.WriteLine (value);
+ }
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ static object locker = new object ();
+ public static int TestProperty
+ {
+ set {
+ lock (locker) {
+ Console.WriteLine (value);
+ }
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestMixedStaticMethod()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public void TestMethod ()
+ {
+ Console.WriteLine ();
+ }
+
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public static void TestStaticMethod ()
+ {
+ Console.WriteLine ();
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ object locker = new object ();
+ public void TestMethod ()
+ {
+ lock (locker) {
+ Console.WriteLine ();
+ }
+ }
+
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public static void TestStaticMethod ()
+ {
+ Console.WriteLine ();
+ }
+}";
+
+ Test<LockThisIssue> (input, 2, output, 0);
+ }
+
+ [Test]
+ public void TestNewNameLock()
+ {
+ var input = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ int locker;
+ [MethodImpl (MethodImplOptions.Synchronized)]
+ public void TestMethod ()
+ {
+ Console.WriteLine ();
+ }
+}";
+
+ var output = @"
+using System.Runtime.CompilerServices;
+class TestClass
+{
+ int locker;
+ object locker1 = new object ();
+ public void TestMethod ()
+ {
+ lock (locker1) {
+ Console.WriteLine ();
+ }
+ }
+}";
+
+ Test<LockThisIssue> (input, 1, output);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/NoDefaultConstructorIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/NoDefaultConstructorIssueTests.cs
deleted file mode 100644
index 5ddd888..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/NoDefaultConstructorIssueTests.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-using NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeIssues;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using System.Linq;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class NoDefaultConstructorIssueTests : InspectionActionTestBase
- {
- [Test]
- public void ShouldReturnIssueIfBaseConstructorNotInvoked()
- {
- var testInput =
-@"class BaseClass
-{
- public BaseClass(string input) {}
-}
-
-class ChildClass : BaseClass
-{
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 1);
- }
-
- [Test]
- public void ShouldNotReturnIssueIfBaseClassHasDefaultConstructor()
- {
- var testInput =
-@"class BaseClass
-{
-}
-
-class ChildClass : BaseClass
-{
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 0);
- }
-
- [Test]
- public void ShouldNotReturnIssueIfBaseConstructorIsInvoked()
- {
- var testInput =
-@"class BaseClass
-{
- public BaseClass(string input) {}
-}
-
-class ChildClass : BaseClass
-{
- public ChildClass() : base(""test"") {}
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 0);
- }
-
- [Test]
- public void ShouldReturnIssueIfInvalidArgumentsArePassedToBaseConstructor()
- {
- var testInput =
-@"class BaseClass
-{
- public BaseClass(string input) {}
-}
-
-class ChildClass : BaseClass
-{
- public ChildClass() : base(123) {}
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 1);
- }
-
- [Test]
- public void ShouldIgnoreInterfaces()
- {
- var testInput =
-@"class TestClass : System.Collections.IList
-{
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 0);
- }
-
- [Test]
- public void ShouldMakeSureAllConstructorsInvokeBaseConstructor()
- {
- var testInput =
-@"class BaseClass
-{
- public BaseClass(string test) {}
-}
-
-class ChildClass : BaseClass
-{
- public ChildClass() : base(""test"") {}
- public ChildClass(string test) {}
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 1);
- }
-
- [Test]
- public void ShouldOnlyLookAtDirectBaseClasses()
- {
- var testInput =
-@"class TopLevelClass
-{
- public TopLevelClass(string test) {}
-}
-
-class BaseClass : TopLevelClass
-{
- public BaseClass() : base(""hello"") {}
-}
-
-class ChildClass : BaseClass
-{
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 0);
- }
-
- [Test]
- public void ShouldReturnAnIssueIfBaseConstructorIsPrivate()
- {
- var testInput =
-@"class BaseClass
-{
- private BaseClass() {}
-}
-
-class ChildClass : BaseClass
-{
-}";
-
- Test<NoDefaultConstructorIssue>(testInput, 1);
- }
-
- [Test]
- public void ShouldReturnIssuesForNestedTypes()
- {
- TestRefactoringContext context;
-
- var testInput =
-@"class B {
- public B(string test) {}
-}
-
-class D {
- public D(string test) {}
-}
-
-class A : B {
- class C : D {}
- public A() {}
-}";
-
- var issues = GetIssues(new NoDefaultConstructorIssue(), testInput, out context, false);
-
- Assert.AreEqual("CS1729: The type 'B' does not contain a constructor that takes '0' arguments", issues.ElementAt(1).Description);
- Assert.AreEqual("CS1729: The type 'D' does not contain a constructor that takes '0' arguments", issues.ElementAt(0).Description);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableTests.cs
index 2ad475e..8081406 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterCanBeDemotedIssue/ParameterCanBeIEnumerableTests.cs
@@ -94,5 +94,23 @@ class TestClass
}
}");
}
+
+ [Ignore("Bug")]
+ [Test]
+ public void TestBug()
+ {
+ var input = @"
+using System;
+class TestClass
+{
+ void Write(int x = 34)
+ {
+ x = 5;
+ Console.WriteLine (x);
+ }
+}";
+ TestWrongContext <ParameterCanBeIEnumerableIssue> (input);
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterHidesMemberIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterHidesMemberIssueTests.cs
index 982182d..26691fa 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterHidesMemberIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterHidesMemberIssueTests.cs
@@ -46,6 +46,24 @@ class TestClass
Test<ParameterHidesMemberIssue> (input, 1);
}
+ [Test]
+ public void TestDisable ()
+ {
+ var input = @"
+class TestClass
+{
+ int i;
+// ReSharper disable once ParameterHidesMember
+ void TestMethod (int i, int j)
+ {
+ }
+}";
+ TestWrongContext<ParameterHidesMemberIssue> (input);
+ }
+
+
+
+
[Test]
public void TestMethod ()
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterNotUsedIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterNotUsedIssueTests.cs
index f7c1316..a7a4e77 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterNotUsedIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ParameterNotUsedIssueTests.cs
@@ -216,5 +216,19 @@ partial class TestClass {
Test<ParameterNotUsedIssue> (input, 0);
}
+ [Test]
+ public void SerializationConstructor ()
+ {
+ var input = @"using System;
+using System.Runtime.Serialization;
+class TestClass : ISerializable {
+ string text;
+ protected TestClass(SerializationInfo info, StreamingContext context)
+ {
+ this.text = info.GetString(""Text"");
+ }
+}";
+ TestWrongContext<ParameterNotUsedIssue> (input);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/PublicConstructorInAbstractClassIssueTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/PublicConstructorInAbstractClassIssueTest.cs
index 7c3441b..ddb55f1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/PublicConstructorInAbstractClassIssueTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/PublicConstructorInAbstractClassIssueTest.cs
@@ -23,6 +23,8 @@
// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
using NUnit.Framework;
using ICSharpCode.NRefactory.CSharp.CodeActions;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantArrayInitializerCommaIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantArrayInitializerCommaIssueTests.cs
deleted file mode 100644
index 9609e03..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantArrayInitializerCommaIssueTests.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// RedundantArrayInitializerCommaIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantArrayInitializerCommaIssueTests : InspectionActionTestBase
- {
- [Test]
- public void Test ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- var a = new int[] { 1, 2, };
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod ()
- {
- var a = new int[] { 1, 2 };
- }
-}";
- Test<RedundantArrayInitializerCommaIssue> (input, 1, output);
- }
-
- [Test]
- public void TestArrayInitializerDescription ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- var a = new int[] { 1, 2, };
- }
-}";
- TestRefactoringContext ctx;
- var issues = GetIssues (new RedundantArrayInitializerCommaIssue (), input, out ctx);
- Assert.AreEqual (issues.Count, 1);
- Assert.AreEqual (issues [0].Description, "Remove redundant comma in array initializer");
- }
-
- [Test]
- public void TestObjectInitializerDescription ()
- {
- var input = @"
-class TestClass
-{
- int Prop { get; set; }
- void TestMethod ()
- {
- var a = new TestClass { Prop = 1, };
- }
-}";
- TestRefactoringContext ctx;
- var issues = GetIssues (new RedundantArrayInitializerCommaIssue (), input, out ctx);
- Assert.AreEqual (issues.Count, 1);
- Assert.AreEqual (issues [0].Description, "Remove redundant comma in object initializer");
- }
-
- [Test]
- public void TestCollectionInitializerDescrition ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- var a = new TestClass { 1, };
- }
-}";
- TestRefactoringContext ctx;
- var issues = GetIssues (new RedundantArrayInitializerCommaIssue (), input, out ctx);
- Assert.AreEqual (issues.Count, 1);
- Assert.AreEqual (issues [0].Description, "Remove redundant comma in collection initializer");
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantAssignmentIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantAssignmentIssueTests.cs
index 44e444c..fd1bd2c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantAssignmentIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantAssignmentIssueTests.cs
@@ -461,5 +461,37 @@ class TestClass
}";
Test<RedundantAssignmentIssue>(input, 2, output, 0);
}
+
+
+ /// <summary>
+ /// Bug 11795 - Use of regex in linq statement not being recognized.
+ /// </summary>
+ [Test]
+ public void TestBug11795 ()
+ {
+ TestWrongContext<RedundantAssignmentIssue>(@"
+using System;
+using System.Text.RegularExpressions;
+using System.IO;
+using System.Linq;
+
+public class Test
+{
+ public void Demo ()
+ {
+ Regex pattern = new Regex (@""^.*\.(jpg|png)$"", RegexOptions.IgnoreCase);
+ string path = Path.Combine (""/"", ""speakers"");
+
+ Console.WriteLine (
+ from file in Directory.GetFiles (path)
+ where pattern.IsMatch (file)
+ select file
+ );
+ }
+
+}");
+
+ }
+
}
}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantBaseConstructorIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantBaseConstructorIssueTests.cs
index 8fb4d79..65234a3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantBaseConstructorIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantBaseConstructorIssueTests.cs
@@ -62,7 +62,26 @@ class TestClass : BaseClass
{ }
}
";
- Test<RedundantBaseConstructorIssue> (input, 1, output);
+ Test<RedundantBaseConstructorCallIssue> (input, 1, output);
}
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class BaseClass
+{
+ public BaseClass()
+ {
+ }
+}
+class TestClass : BaseClass
+{
+// ReSharper disable once RedundantBaseConstructorCall
+ public TestClass(int data) : base() { }
+}
+";
+ TestWrongContext<RedundantBaseConstructorCallIssue>(input);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCaseLabelIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCaseLabelIssueTests.cs
index 9db0f52..c1365db 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCaseLabelIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCaseLabelIssueTests.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+using System;
using ICSharpCode.NRefactory.CSharp.Refactoring;
using NUnit.Framework;
@@ -61,5 +62,24 @@ class TestClass
}";
Test<RedundantCaseLabelIssue> (input, 1, output);
}
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ switch (i) {
+// ReSharper disable once RedundantCaseLabel
+ case 1:
+ default:
+ break;
+ }
}
+}";
+ TestWrongContext<RedundantCaseLabelIssue>(input);
+ }
+ }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCastIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCastIssueTests.cs
new file mode 100644
index 0000000..a215cbc
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCastIssueTests.cs
@@ -0,0 +1,174 @@
+//
+// RedundantCastIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantCastIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSameType ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int i = 0;
+ var i2 = ((int)i);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int i = 0;
+ var i2 = i;
+ }
+}";
+ Test<RedundantCastIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestInvocation ()
+ {
+ var input = @"
+class TestClass
+{
+ void Test (object obj)
+ {
+ }
+ void TestMethod (object obj)
+ {
+ Test ((int)obj);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void Test (object obj)
+ {
+ }
+ void TestMethod (object obj)
+ {
+ Test (obj);
+ }
+}";
+ Test<RedundantCastIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestLambdaInvocation ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (object obj)
+ {
+ System.Action<object> a;
+ a ((int)obj);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (object obj)
+ {
+ System.Action<object> a;
+ a (obj);
+ }
+}";
+ Test<RedundantCastIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestMember ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (object obj)
+ {
+ var str = (obj as TestClass).ToString ();
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (object obj)
+ {
+ var str = obj.ToString ();
+ }
+}";
+ Test<RedundantCastIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestNoIssue ()
+ {
+ var input = @"
+class TestClass
+{
+ void Test (int k) { }
+ void TestMethod (object obj)
+ {
+ int i = (int)obj + 1;
+ Test ((long) obj);
+ (obj as TestClass).Test (0);
+ }
+}";
+ Test<RedundantCastIssue> (input, 0);
+ }
+
+ /// <summary>
+ /// Bug 7065 - "remove redundant type cast" false positive for explicit interface implementation
+ /// </summary>
+ [Test]
+ public void TestBug7065 ()
+ {
+ var input = @"
+using System;
+public class TestClass : IDisposable
+{
+ void IDisposable.Dispose()
+ {
+ }
+
+ void Foo()
+ {
+ ((IDisposable)this).Dispose();
+ }
+}
+";
+ Test<RedundantCastIssue> (input, 0);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchIssueTests.cs
new file mode 100644
index 0000000..1eb74f8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchIssueTests.cs
@@ -0,0 +1,314 @@
+//
+// RedundantCatchIssueTests.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantCatchIssueTests : InspectionActionTestBase
+ {
+ const string BaseInput = @"
+using System;
+class A
+{
+ void F()
+ {";
+
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = BaseInput + @"
+// ReSharper disable once RedundantCatchClause
+ try {
+ F ();
+ } catch {
+ throw;
+ } finally {
+ Console.WriteLine (""Inside finally"");
+ }
+ }
+}";
+ TestWrongContext<RedundantCatchIssue>(input);
+ }
+
+ [Test]
+ public void TestEmptyCatch()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException aoore) {
+ Console.WriteLine (aoore);
+ } catch (ArgumentException) {
+ throw;
+ } catch {
+ throw;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(2, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException aoore) {
+ Console.WriteLine (aoore);
+ }
+ }
+}");
+ }
+
+ [Test]
+ public void TestOnlyRedundantCatches()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ Console.WriteLine (""Inside try"");
+ } catch {
+ throw;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ F ();
+ Console.WriteLine (""Inside try"");
+ }
+}");
+ }
+
+ [Test]
+ public void AddsBlockIfNeccessary()
+ {
+ var input = BaseInput + @"
+ if (true)
+ try {
+ F ();
+ Console.WriteLine (""Inside try"");
+ } catch {
+ throw;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ if (true) {
+ F ();
+ Console.WriteLine (""Inside try"");
+ }
+ }
+}");
+ }
+
+
+ [Test]
+ public void AddsBlockIfNeccessaryOnEmptyTryBlock()
+ {
+ var input = BaseInput + @"
+ if (true)
+ try {
+ } catch {
+ throw;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ if (true) {
+ }
+ }
+}");
+ }
+
+ [Test]
+ public void EmptyTryCatchSkeleton()
+ {
+ var input = BaseInput + @"
+ try {
+ } catch {
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void DoesNotAddBlockIfUnneccessary()
+ {
+ var input = BaseInput + @"
+ if (true)
+ try {
+ F ();
+ } catch {
+ throw;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ if (true)
+ F ();
+ }
+}");
+ }
+
+ [Test]
+ public void NoIssuesWhenMissingCatch()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context, true);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestEmptyCatchWithFinally()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ } catch {
+ throw;
+ } finally {
+ Console.WriteLine (""Inside finally"");
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+ CheckFix(context, issues, BaseInput + @"
+ try {
+ F ();
+ } finally {
+ Console.WriteLine (""Inside finally"");
+ }
+ }
+}");
+ }
+
+ /// <summary>
+ /// Bug 12273 - Incorrect redundant catch warning
+ /// </summary>
+ [Test]
+ public void TestBug12273()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException) {
+ throw;
+ } catch (Exception e) {
+ Console.WriteLine (e);
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+
+ input = BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException) {
+ throw;
+ } catch (Exception e) {
+ throw;
+ }
+ }
+}";
+ issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, BaseInput + @"
+ F ();
+ }
+}");
+
+ }
+
+ /// <summary>
+ /// Bug 12273 - Incorrect redundant catch warning
+ /// </summary>
+ [Test]
+ public void TestBug12273Case2()
+ {
+ var input = BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException) {
+ throw;
+ } catch {
+ Console.WriteLine (""hello world"");
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+
+ input = BaseInput + @"
+ try {
+ F ();
+ } catch (ArgumentOutOfRangeException) {
+ throw;
+ } catch {
+ throw;
+ }
+ }
+}";
+ issues = GetIssues(new RedundantCatchIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs
deleted file mode 100644
index 7a67ccb..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-//
-// RedundantCatchTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantCatchTests : InspectionActionTestBase
- {
- const string BaseInput = @"
-using System;
-class A
-{
- void F()
- {";
-
- [Test]
- public void TestEmptyCatch()
- {
- var input = BaseInput + @"
- try {
- F ();
- } catch (ArgumentOutOfRangeException aoore) {
- Console.WriteLine (aoore);
- } catch (ArgumentException) {
- throw;
- } catch {
- throw;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(2, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- try {
- F ();
- } catch (ArgumentOutOfRangeException aoore) {
- Console.WriteLine (aoore);
- }
- }
-}");
- }
-
- [Test]
- public void TestOnlyRedundantCatches()
- {
- var input = BaseInput + @"
- try {
- F ();
- Console.WriteLine (""Inside try"");
- } catch {
- throw;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- F ();
- Console.WriteLine (""Inside try"");
- }
-}");
- }
-
- [Test]
- public void AddsBlockIfNeccessary()
- {
- var input = BaseInput + @"
- if (true)
- try {
- F ();
- Console.WriteLine (""Inside try"");
- } catch {
- throw;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- if (true) {
- F ();
- Console.WriteLine (""Inside try"");
- }
- }
-}");
- }
-
-
- [Test]
- public void AddsBlockIfNeccessaryOnEmptyTryBlock()
- {
- var input = BaseInput + @"
- if (true)
- try {
- } catch {
- throw;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- if (true) {
- }
- }
-}");
- }
-
- [Test]
- public void EmptyTryCatchSkeleton()
- {
- var input = BaseInput + @"
- try {
- } catch {
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void DoesNotAddBlockIfUnneccessary()
- {
- var input = BaseInput + @"
- if (true)
- try {
- F ();
- } catch {
- throw;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- if (true)
- F ();
- }
-}");
- }
-
- [Test]
- public void NoIssuesWhenMissingCatch()
- {
- var input = BaseInput + @"
- try {
- F ();
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context, true);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void TestEmptyCatchWithFinally()
- {
- var input = BaseInput + @"
- try {
- F ();
- } catch {
- throw;
- } finally {
- Console.WriteLine (""Inside finally"");
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantCatchIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, BaseInput + @"
- try {
- F ();
- } finally {
- Console.WriteLine (""Inside finally"");
- }
- }
-}");
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCommaInArrayInitializerIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCommaInArrayInitializerIssueTests.cs
new file mode 100644
index 0000000..37ee767
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCommaInArrayInitializerIssueTests.cs
@@ -0,0 +1,125 @@
+//
+// RedundantCommaInArrayInitializerIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantCommaInArrayInitializerIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void Test ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ var a = new int[] { 1, 2, };
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ var a = new int[] { 1, 2 };
+ }
+}";
+ Test<RedundantCommaInArrayInitializerIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestArrayInitializerDescription ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ var a = new int[] { 1, 2, };
+ }
+}";
+ TestRefactoringContext ctx;
+ var issues = GetIssues (new RedundantCommaInArrayInitializerIssue (), input, out ctx);
+ Assert.AreEqual (issues.Count, 1);
+ Assert.AreEqual (issues [0].Description, "Remove redundant comma in array initializer");
+ }
+
+ [Test]
+ public void TestObjectInitializerDescription ()
+ {
+ var input = @"
+class TestClass
+{
+ int Prop { get; set; }
+ void TestMethod ()
+ {
+ var a = new TestClass { Prop = 1, };
+ }
+}";
+ TestRefactoringContext ctx;
+ var issues = GetIssues (new RedundantCommaInArrayInitializerIssue (), input, out ctx);
+ Assert.AreEqual (issues.Count, 1);
+ Assert.AreEqual (issues [0].Description, "Remove redundant comma in object initializer");
+ }
+
+ [Test]
+ public void TestCollectionInitializerDescrition()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ var a = new TestClass { 1, };
+ }
+}";
+ TestRefactoringContext ctx;
+ var issues = GetIssues(new RedundantCommaInArrayInitializerIssue(), input, out ctx);
+ Assert.AreEqual(issues.Count, 1);
+ Assert.AreEqual(issues[0].Description, "Remove redundant comma in collection initializer");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+// ReSharper disable once RedundantCommaInArrayInitializer
+ var a = new TestClass { 1, };
+ }
+}";
+ TestWrongContext<RedundantCommaInArrayInitializerIssue>(input);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantComparisonWithNullIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantComparisonWithNullIssueTests.cs
new file mode 100644
index 0000000..87bdfd6
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantComparisonWithNullIssueTests.cs
@@ -0,0 +1,163 @@
+//
+// RedundantComparisonWithNullIssueTests.cs
+//
+// Author:
+// Ji Kun <jikun.nus at gmail.com>
+//
+// Copyright (c) 2013 Ji Kun
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantComparisonWithNullIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1()
+ {
+ var input = @"using System;class Test {public void test(){int a = 0;if(a is int && a != null){a = 1;}}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+
+
+ CheckFix(context, issues, @"using System;class Test {public void test(){int a = 0;
+ if (a is int) {
+ a = 1;
+ }}}");
+ }
+
+ [Test]
+ public void TestResharperDisable()
+ {
+ var input = @"using System;
+class Test {
+ public void test(){
+ int a = 0;
+ //Resharper disable RedundantComparisonWithNull
+ if(a is int && a != null)
+ {a = 1;}
+ //Resharper restore RedundantComparisonWithNull
+ }
+ }";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void TestInspectorCase2()
+ {
+ var input = @"using System;class Test {public void test(){int a = 0;while(a != null && a is int){a = 1;}}}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System;class Test {public void test(){int a = 0;
+ while (a is int) {
+ a = 1;
+ }}}");
+ }
+
+ [Test]
+ public void TestCaseWithFullParens()
+ {
+ var input =
+ @"using System;
+class TestClass
+{
+ public void Test(object o)
+ {
+ if (!((o is int) && (o != null))) {
+ }
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System;
+class TestClass
+{
+ public void Test(object o)
+ {
+ if (!(o is int)) {
+ }
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input =
+ @"using System;
+class TestClass
+{
+ public void Test(object o)
+ {
+// ReSharper disable once RedundantComparisonWithNull
+ if (!((o is int) && (o != null))) {
+ }
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+
+ [Ignore("Extended version")]
+ [Test]
+ public void TestNegatedCase()
+ {
+ var input =
+ @"using System;
+class TestClass
+{
+ public void Test(object o)
+ {
+ if (null == o || !(o is int)) {
+ }
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantComparisonWithNullIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System;
+class TestClass
+{
+ public void Test(object o)
+ {
+ if (!(o is int)) {
+ }
+ }
+}");
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantConstructorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantConstructorTests.cs
deleted file mode 100755
index 36ee8be..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantConstructorTests.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// RedundantConstructorTest.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantConstructorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1()
- {
- var input = @"using System;class Test {private int member; public Test(){}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantConstructorIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, @"using System;class Test {private int member; }");
- }
-
- [Test]
- public void TestInspectorCase2()
- {
- var input = @"using System;class Test {private int member;public Test(){} static Test(){}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantConstructorIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
- CheckFix(context, issues, @"using System;class Test {private int member; static Test(){}}");
- }
-
- [Test]
- public void TestResharperDisable()
- {
- var input = @"using System;
- //Resharper disable RedundantConstructor
-class Test {
- public Test(){
- }
- //Resharper restore RedundantConstructor
- }";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void TestNegateCase1()
- {
- var input = @"using System;class Test {public Test(){;}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void TestNegateCase2()
- {
- var input = @"using System;class Test {public Test(){;} private Test(){}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantConstructorIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantDefaultFieldInitializerIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantDefaultFieldInitializerIssueTests.cs
new file mode 100644
index 0000000..f41ae83
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantDefaultFieldInitializerIssueTests.cs
@@ -0,0 +1,198 @@
+//
+// RedundantDefaultFieldInitializerIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantDefaultFieldInitializerIssueTests : InspectionActionTestBase
+ {
+
+ [Test]
+ public void TestRedundantIntInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ int i = 0;
+ long l = 0L;
+}";
+ var output = @"
+class TestClass
+{
+ int i;
+ long l;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 2, output);
+ }
+
+ [Test]
+ public void TestRedundantFloatInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ double d = 0;
+ double d2 = 0.0;
+}";
+ var output = @"
+class TestClass
+{
+ double d;
+ double d2;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 2, output);
+ }
+
+ [Test]
+ public void TestRedundantBooleanInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ bool x = false;
+}";
+ var output = @"
+class TestClass
+{
+ bool x;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestRedundantCharInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ char ch = '\0';
+}";
+ var output = @"
+class TestClass
+{
+ char ch;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestRedundantReferenceTypeInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ string str = null;
+}";
+ var output = @"
+class TestClass
+{
+ string str;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestRedundantDynamicInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ dynamic x = null, y = null;
+}";
+ var output = @"
+class TestClass
+{
+ dynamic x, y;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 2, output);
+ }
+
+ [Test]
+ public void TestRedundantStructInitializer ()
+ {
+ var input = @"
+struct TestStruct
+{
+}
+class TestClass
+{
+ TestStruct x = new TestStruct ();
+}";
+ var output = @"
+struct TestStruct
+{
+}
+class TestClass
+{
+ TestStruct x;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 1, output);
+ }
+
+ [Test]
+ public void TestRedundantNullableInitializer ()
+ {
+ var input = @"
+class TestClass
+{
+ int? i = null;
+}";
+ var output = @"
+class TestClass
+{
+ int? i;
+}";
+ Test<RedundantDefaultFieldInitializerIssue> (input, 1, output);
+ }
+
+
+ [Test]
+ public void TestRedundantConstantBug ()
+ {
+ Test<RedundantDefaultFieldInitializerIssue> (@"class Test { const int foo = 0; }", 0);
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class TestClass
+{
+ // ReSharper disable once RedundantDefaultFieldInitializer
+ int i = 0;
+}";
+ TestWrongContext<RedundantDefaultFieldInitializerIssue>(input);
+ }
+
+
+
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantElseIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantElseIssueTests.cs
deleted file mode 100644
index 861aa4a..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantElseIssueTests.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-//
-// RedundantElseIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantElseIssueTests : InspectionActionTestBase
- {
-
- [Test]
- public void TestReturn ()
- {
- var input = @"
-class TestClass
-{
- int TestMethod (int i)
- {
- if (i > 0)
- return 1;
- else
- return 0;
- }
-}";
- var output = @"
-class TestClass
-{
- int TestMethod (int i)
- {
- if (i > 0)
- return 1;
- return 0;
- }
-}";
- Test<RedundantElseIssue> (input, 1, output);
- }
-
- [Test]
- public void TestBreakLoop ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- int k = 0;
- for (int i = 0; i < 10; i++) {
- if (i > 5)
- break;
- else
- k++;
- }
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod ()
- {
- int k = 0;
- for (int i = 0; i < 10; i++) {
- if (i > 5)
- break;
- k++;
- }
- }
-}";
- Test<RedundantElseIssue> (input, 1, output);
- }
-
- [Test]
- public void TestContinueLoop ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- int k = 0;
- for (int i = 0; i < 10; i++) {
- if (i > 5)
- continue;
- else
- k++;
- }
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod ()
- {
- int k = 0;
- for (int i = 0; i < 10; i++) {
- if (i > 5)
- continue;
- k++;
- }
- }
-}";
- Test<RedundantElseIssue> (input, 1, output);
- }
-
- [Test]
- public void TestBlockStatement()
- {
- var input = @"
-class TestClass
-{
- int TestMethod (int i)
- {
- if (i > 0) {
- return 1;
- } else {
- return 0;
- }
- }
-}";
- var output = @"
-class TestClass
-{
- int TestMethod (int i)
- {
- if (i > 0) {
- return 1;
- }
- return 0;
- }
-}";
- Test<RedundantElseIssue> (input, 1, output);
- }
-
- [Test]
- public void TestEmptyFalseBlock ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- int a;
- if (i > 0)
- a = 1;
- else { }
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- int a;
- if (i > 0)
- a = 1;
- }
-}";
- Test<RedundantElseIssue> (input, 1, output);
- }
-
- [Test]
- public void TestNecessaryElse ()
- {
-
- var input = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- int a;
- if (i > 0)
- a = 1;
- else
- a = 0;
- }
-}";
- Test<RedundantElseIssue> (input, 0);
- }
-
- [Test]
- public void TestNecessaryElseCase2 ()
- {
-
- var input = @"
-class TestClass
-{
- void TestMethod (int i)
- {
- int a;
- while (true) {
- if (i > 0) {
- a = 1;
- } else if (i < 0) {
- a = 0;
- break;
- } else {
- break;
- }
- }
- }
-}";
- Test<RedundantElseIssue> (input, 0);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantFieldInitializerIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantFieldInitializerIssueTests.cs
deleted file mode 100644
index 366691e..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantFieldInitializerIssueTests.cs
+++ /dev/null
@@ -1,182 +0,0 @@
-//
-// RedundantFieldInitializerIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantFieldInitializerIssueTests : InspectionActionTestBase
- {
- [Test]
- public void TestRedundantIntInitializer ()
- {
- var input = @"
-class TestClass
-{
- int i = 0;
- long l = 0L;
-}";
- var output = @"
-class TestClass
-{
- int i;
- long l;
-}";
- Test<RedundantFieldInitializerIssue> (input, 2, output);
- }
-
- [Test]
- public void TestRedundantFloatInitializer ()
- {
- var input = @"
-class TestClass
-{
- double d = 0;
- double d2 = 0.0;
-}";
- var output = @"
-class TestClass
-{
- double d;
- double d2;
-}";
- Test<RedundantFieldInitializerIssue> (input, 2, output);
- }
-
- [Test]
- public void TestRedundantBooleanInitializer ()
- {
- var input = @"
-class TestClass
-{
- bool x = false;
-}";
- var output = @"
-class TestClass
-{
- bool x;
-}";
- Test<RedundantFieldInitializerIssue> (input, 1, output);
- }
-
- [Test]
- public void TestRedundantCharInitializer ()
- {
- var input = @"
-class TestClass
-{
- char ch = '\0';
-}";
- var output = @"
-class TestClass
-{
- char ch;
-}";
- Test<RedundantFieldInitializerIssue> (input, 1, output);
- }
-
- [Test]
- public void TestRedundantReferenceTypeInitializer ()
- {
- var input = @"
-class TestClass
-{
- string str = null;
-}";
- var output = @"
-class TestClass
-{
- string str;
-}";
- Test<RedundantFieldInitializerIssue> (input, 1, output);
- }
-
- [Test]
- public void TestRedundantDynamicInitializer ()
- {
- var input = @"
-class TestClass
-{
- dynamic x = null, y = null;
-}";
- var output = @"
-class TestClass
-{
- dynamic x, y;
-}";
- Test<RedundantFieldInitializerIssue> (input, 2, output);
- }
-
- [Test]
- public void TestRedundantStructInitializer ()
- {
- var input = @"
-struct TestStruct
-{
-}
-class TestClass
-{
- TestStruct x = new TestStruct ();
-}";
- var output = @"
-struct TestStruct
-{
-}
-class TestClass
-{
- TestStruct x;
-}";
- Test<RedundantFieldInitializerIssue> (input, 1, output);
- }
-
- [Test]
- public void TestRedundantNullableInitializer ()
- {
- var input = @"
-class TestClass
-{
- int? i = null;
-}";
- var output = @"
-class TestClass
-{
- int? i;
-}";
- Test<RedundantFieldInitializerIssue> (input, 1, output);
- }
-
-
- [Test]
- public void TestRedundantConstantBug ()
- {
- Test<RedundantFieldInitializerIssue> (@"class Test { const int foo = 0; }", 0);
- }
-
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantIfElseBlockIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantIfElseBlockIssueTests.cs
new file mode 100644
index 0000000..7d3682d
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantIfElseBlockIssueTests.cs
@@ -0,0 +1,245 @@
+//
+// RedundantIfElseBlockIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantIfElseBlockIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestReturn()
+ {
+ var input = @"
+class TestClass
+{
+ int TestMethod (int i)
+ {
+ if (i > 0)
+ return 1;
+ else
+ return 0;
+ }
+}";
+ var output = @"
+class TestClass
+{
+ int TestMethod (int i)
+ {
+ if (i > 0)
+ return 1;
+ return 0;
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"
+class TestClass
+{
+ int TestMethod (int i)
+ {
+ if (i > 0)
+ return 1;
+// ReSharper disable once RedundantIfElseBlock
+ else
+ return 0;
+ }
+}";
+ TestWrongContext<RedundantIfElseBlockIssue>(input);
+ }
+
+ [Test]
+ public void TestBreakLoop()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int k = 0;
+ for (int i = 0; i < 10; i++) {
+ if (i > 5)
+ break;
+ else
+ k++;
+ }
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int k = 0;
+ for (int i = 0; i < 10; i++) {
+ if (i > 5)
+ break;
+ k++;
+ }
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestContinueLoop()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int k = 0;
+ for (int i = 0; i < 10; i++) {
+ if (i > 5)
+ continue;
+ else
+ k++;
+ }
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod ()
+ {
+ int k = 0;
+ for (int i = 0; i < 10; i++) {
+ if (i > 5)
+ continue;
+ k++;
+ }
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestBlockStatement()
+ {
+ var input = @"
+class TestClass
+{
+ int TestMethod (int i)
+ {
+ if (i > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+}";
+ var output = @"
+class TestClass
+{
+ int TestMethod (int i)
+ {
+ if (i > 0) {
+ return 1;
+ }
+ return 0;
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestEmptyFalseBlock()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ int a;
+ if (i > 0)
+ a = 1;
+ else { }
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ int a;
+ if (i > 0)
+ a = 1;
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 1, output);
+ }
+
+ [Test]
+ public void TestNecessaryElse()
+ {
+
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ int a;
+ if (i > 0)
+ a = 1;
+ else
+ a = 0;
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 0);
+ }
+
+ [Test]
+ public void TestNecessaryElseCase2()
+ {
+
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ int a;
+ while (true) {
+ if (i > 0) {
+ a = 1;
+ } else if (i < 0) {
+ a = 0;
+ break;
+ } else {
+ break;
+ }
+ }
+ }
+}";
+ Test<RedundantIfElseBlockIssue>(input, 0);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNameQualifierIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNameQualifierIssueTests.cs
new file mode 100644
index 0000000..544970e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNameQualifierIssueTests.cs
@@ -0,0 +1,114 @@
+//
+// RedundantNameQualifierIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantNameQualifierIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ System.Console.WriteLine ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantNameQualifierIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Console.WriteLine ();
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCase2 ()
+ {
+ var input = @"using System.Text;
+class Foo
+{
+ void Bar (System.Text.StringBuilder b)
+ {
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantNameQualifierIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"using System.Text;
+class Foo
+{
+ void Bar (StringBuilder b)
+ {
+ }
+}");
+ }
+
+ [Test]
+ public void UsingAlias()
+ {
+ var input = @"using IEnumerable = System.Collections.IEnumerable;";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantNameQualifierIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+// ReSharper disable RedundantNameQualifier
+ System.Console.WriteLine();
+// ReSharper restore RedundantNameQualifier
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new RedundantNameQualifierIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNamespaceUsageInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNamespaceUsageInspectorTests.cs
deleted file mode 100644
index 6c3a0d2..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNamespaceUsageInspectorTests.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// RedundantNamespaceUsageInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantNamespaceUsageInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1 ()
- {
- var input = @"using System;
-class Foo
-{
- void Bar (string str)
- {
- System.Console.WriteLine ();
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantNamespaceUsageIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"using System;
-class Foo
-{
- void Bar (string str)
- {
- Console.WriteLine ();
- }
-}");
- }
-
- [Test]
- public void TestInspectorCase2 ()
- {
- var input = @"using System.Text;
-class Foo
-{
- void Bar (System.Text.StringBuilder b)
- {
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantNamespaceUsageIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"using System.Text;
-class Foo
-{
- void Bar (StringBuilder b)
- {
- }
-}");
- }
-
- [Test]
- public void UsingAlias()
- {
- var input = @"using IEnumerable = System.Collections.IEnumerable;";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantNamespaceUsageIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNullCheckTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNullCheckTests.cs
deleted file mode 100755
index b45fddf..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantNullCheckTests.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// RedundantNullCheckTests.cs
-//
-// Author:
-// Ji Kun <jikun.nus at gmail.com>
-//
-// Copyright (c) 2013 Ji Kun
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantNullCheckTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1()
- {
- var input = @"using System;class Test {public void test(){int a = 0;if(a is int && a != null){a = 1;}}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantNullCheckIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
-
-
- CheckFix(context, issues, @"using System;class Test {public void test(){int a = 0;
- if (a is int) {
- a = 1;
- }}}");
- }
-
- [Test]
- public void TestResharperDisable()
- {
- var input = @"using System;
-class Test {
- public void test(){
- int a = 0;
- //Resharper disable RedundantNullCheck
- if(a is int && a != null)
- {a = 1;}
- //Resharper restore RedundantNullCheck
- }
- }";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantNullCheckIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void TestInspectorCase2()
- {
- var input = @"using System;class Test {public void test(){int a = 0;while(a != null && a is int){a = 1;}}}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantNullCheckIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- CheckFix(context, issues, @"using System;class Test {public void test(){int a = 0;
- while (a is int) {
- a = 1;
- }}}");
- }
-
- [Ignore("Missing")]
- [Test]
- public void TestCaseWithFullParens()
- {
- var input =
- @"using System;
-class TestClass
-{
- public void Test(object o)
- {
- if (!((o is int) && (o != null))) {
- }
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantNullCheckIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- CheckFix(context, issues, @"using System;
-class TestClass
-{
- public void Test(object o)
- {
- if (!(o is int)) {
- }
- }
-}");
- }
-
- [Ignore("Extended version")]
- [Test]
- public void TestNegatedCase()
- {
- var input =
- @"using System;
-class TestClass
-{
- public void Test(object o)
- {
- if (null == o || !(o is int)) {
- }
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues(new RedundantNullCheckIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- CheckFix(context, issues, @"using System;
-class TestClass
-{
- public void Test(object o)
- {
- if (!(o is int)) {
- }
- }
-}");
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantObjectOrCollectionInitializerIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantObjectOrCollectionInitializerIssueTests.cs
index 6448683..e7d38ca 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantObjectOrCollectionInitializerIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantObjectOrCollectionInitializerIssueTests.cs
@@ -29,6 +29,7 @@ using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp.CodeIssues
{
+
[TestFixture]
public class RedundantObjectOrCollectionInitializerIssueTests : InspectionActionTestBase
{
@@ -51,9 +52,22 @@ class TestClass
var x = new TestClass ();
}
}";
- Test<RedundantObjectOrCollectionInitializerIssue> (input, 1, output);
+ Test<RedundantObjectOrCollectionInitializerIssue>(input, 1, output);
}
+ [Test]
+ public void TestDisable()
+ {
+ TestWrongContext<RedundantObjectOrCollectionInitializerIssue>(@" class TestClass
+ {
+ void TestMethod()
+ {
+// ReSharper disable once RedundantEmptyObjectOrCollectionInitializer
+ var x = new TestClass() { };
+ }
+ }");
+ }
+
[Test]
public void TestNoArgumentList ()
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisInspectorTests.cs
deleted file mode 100644
index 31dc493..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisInspectorTests.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// RedundantThisInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantThisInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- this.Bar (str);
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantThisIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- Bar (str);
- }
-}");
- }
-
- [Test]
- public void TestResharperDisableRestore ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- // ReSharper disable RedundantThisQualifier
- this.Bar (str);
- // ReSharper restore RedundantThisQualifier
- this.Bar (str);
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantThisIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- }
- }
-}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisQualifierIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisQualifierIssueTests.cs
new file mode 100644
index 0000000..1c4dab1
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantThisQualifierIssueTests.cs
@@ -0,0 +1,79 @@
+//
+// RedundantThisQualifierIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantThisQualifierIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ this.Bar (str);
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantThisQualifierIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ Bar (str);
+ }
+}");
+ }
+
+ [Test]
+ public void TestResharperDisableRestore ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ // ReSharper disable RedundantThisQualifier
+ this.Bar (str);
+ // ReSharper restore RedundantThisQualifier
+ this.Bar (str);
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantThisQualifierIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringCallIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringCallIssueTests.cs
new file mode 100644
index 0000000..187f328
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringCallIssueTests.cs
@@ -0,0 +1,271 @@
+//
+// RedundantToStringCallIssueTests.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantToStringCallIssueTests : InspectionActionTestBase
+ {
+
+ [Test]
+ public void ConcatenationOperator ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = """" + i.ToString() + """" + i.ToString();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (2, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = """" + i + """" + i;
+ }
+}");
+ }
+
+ [Test]
+ public void ConcatenationOperatorWithToStringAsOnlyString ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = i.ToString() + i + i + i + 1.3;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresCallsToIFormattableToString ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (System.DateTime dt)
+ {
+ string s = dt.ToString("""", CultureInfo.InvariantCulture) + string.Empty;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void StringTarget ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (string str)
+ {
+ string s = str.ToString();
+ string inOperator = """" + str.ToString();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (2, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (string str)
+ {
+ string s = str;
+ string inOperator = """" + str;
+ }
+}");
+ }
+
+ [Test]
+ public void FormatStringTests ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = string.Format(""{0}"", i.ToString());
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = string.Format (""{0}"", i);
+ }
+}");
+ }
+
+ [Test]
+ public void HandlesNonLiteralFormatParameter ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string format = ""{0}"";
+ string s = string.Format(format, i.ToString());
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string format = ""{0}"";
+ string s = string.Format (format, i);
+ }
+}");
+ }
+
+ [Test]
+ public void FormatStringWithNonObjectParameterTests ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = FakeFormat(""{0} {1}"", i.ToString(), i.ToString());
+ }
+
+ void FakeFormat(string format, string arg0, object arg1)
+ {
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = FakeFormat (""{0} {1}"", i.ToString (), i);
+ }
+
+ void FakeFormat(string format, string arg0, object arg1)
+ {
+ }
+}");
+ }
+
+ [Test]
+ public void FormatMethodWithObjectParamsArray ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = FakeFormat(""{0} {1}"", i.ToString(), i.ToString());
+ }
+
+ void FakeFormat(string format, params object[] args)
+ {
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (2, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ string s = FakeFormat (""{0} {1}"", i, i);
+ }
+
+ void FakeFormat(string format, params object[] args)
+ {
+ }
+}");
+ }
+
+ [Test]
+ public void DetectsBlacklistedCalls ()
+ {
+ var input = @"
+class Foo
+{
+ void Bar (int i)
+ {
+ var w = new System.IO.StringWriter ();
+ w.Write (i.ToString());
+ w.WriteLine (i.ToString());
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantToStringCallIssue (), input, out context);
+ Assert.AreEqual (2, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (int i)
+ {
+ var w = new System.IO.StringWriter ();
+ w.Write (i);
+ w.WriteLine (i);
+ }
+}");
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringTests.cs
deleted file mode 100644
index 61b1b18..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantToStringTests.cs
+++ /dev/null
@@ -1,271 +0,0 @@
-//
-// RedundantToStringTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantToStringTests : InspectionActionTestBase
- {
-
- [Test]
- public void ConcatenationOperator ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string s = """" + i.ToString() + """" + i.ToString();
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (2, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- string s = """" + i + """" + i;
- }
-}");
- }
-
- [Test]
- public void ConcatenationOperatorWithToStringAsOnlyString ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string s = i.ToString() + i + i + i + 1.3;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void IgnoresCallsToIFormattableToString ()
- {
- var input = @"
-class Foo
-{
- void Bar (System.DateTime dt)
- {
- string s = dt.ToString("""", CultureInfo.InvariantCulture) + string.Empty;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void StringTarget ()
- {
- var input = @"
-class Foo
-{
- void Bar (string str)
- {
- string s = str.ToString();
- string inOperator = """" + str.ToString();
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (2, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (string str)
- {
- string s = str;
- string inOperator = """" + str;
- }
-}");
- }
-
- [Test]
- public void FormatStringTests ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string s = string.Format(""{0}"", i.ToString());
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- string s = string.Format (""{0}"", i);
- }
-}");
- }
-
- [Test]
- public void HandlesNonLiteralFormatParameter ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string format = ""{0}"";
- string s = string.Format(format, i.ToString());
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- string format = ""{0}"";
- string s = string.Format (format, i);
- }
-}");
- }
-
- [Test]
- public void FormatStringWithNonObjectParameterTests ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string s = FakeFormat(""{0} {1}"", i.ToString(), i.ToString());
- }
-
- void FakeFormat(string format, string arg0, object arg1)
- {
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- string s = FakeFormat (""{0} {1}"", i.ToString (), i);
- }
-
- void FakeFormat(string format, string arg0, object arg1)
- {
- }
-}");
- }
-
- [Test]
- public void FormatMethodWithObjectParamsArray ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- string s = FakeFormat(""{0} {1}"", i.ToString(), i.ToString());
- }
-
- void FakeFormat(string format, params object[] args)
- {
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (2, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- string s = FakeFormat (""{0} {1}"", i, i);
- }
-
- void FakeFormat(string format, params object[] args)
- {
- }
-}");
- }
-
- [Test]
- public void DetectsBlacklistedCalls ()
- {
- var input = @"
-class Foo
-{
- void Bar (int i)
- {
- var w = new System.IO.StringWriter ();
- w.Write (i.ToString());
- w.WriteLine (i.ToString());
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantToStringIssue (), input, out context);
- Assert.AreEqual (2, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (int i)
- {
- var w = new System.IO.StringWriter ();
- w.Write (i);
- w.WriteLine (i);
- }
-}");
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantTypeCastIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantTypeCastIssueTests.cs
deleted file mode 100644
index 57023e0..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantTypeCastIssueTests.cs
+++ /dev/null
@@ -1,174 +0,0 @@
-//
-// RedundantTypeCastIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantTypeCastIssueTests : InspectionActionTestBase
- {
- [Test]
- public void TestSameType ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod ()
- {
- int i = 0;
- var i2 = ((int)i);
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod ()
- {
- int i = 0;
- var i2 = i;
- }
-}";
- Test<RedundantTypeCastIssue> (input, 1, output);
- }
-
- [Test]
- public void TestInvocation ()
- {
- var input = @"
-class TestClass
-{
- void Test (object obj)
- {
- }
- void TestMethod (object obj)
- {
- Test ((int)obj);
- }
-}";
- var output = @"
-class TestClass
-{
- void Test (object obj)
- {
- }
- void TestMethod (object obj)
- {
- Test (obj);
- }
-}";
- Test<RedundantTypeCastIssue> (input, 1, output);
- }
-
- [Test]
- public void TestLambdaInvocation ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (object obj)
- {
- System.Action<object> a;
- a ((int)obj);
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod (object obj)
- {
- System.Action<object> a;
- a (obj);
- }
-}";
- Test<RedundantTypeCastIssue> (input, 1, output);
- }
-
- [Test]
- public void TestMember ()
- {
- var input = @"
-class TestClass
-{
- void TestMethod (object obj)
- {
- var str = (obj as TestClass).ToString ();
- }
-}";
- var output = @"
-class TestClass
-{
- void TestMethod (object obj)
- {
- var str = obj.ToString ();
- }
-}";
- Test<RedundantTypeCastIssue> (input, 1, output);
- }
-
- [Test]
- public void TestNoIssue ()
- {
- var input = @"
-class TestClass
-{
- void Test (int k) { }
- void TestMethod (object obj)
- {
- int i = (int)obj + 1;
- Test ((long) obj);
- (obj as TestClass).Test (0);
- }
-}";
- Test<RedundantTypeCastIssue> (input, 0);
- }
-
- /// <summary>
- /// Bug 7065 - "remove redundant type cast" false positive for explicit interface implementation
- /// </summary>
- [Test]
- public void TestBug7065 ()
- {
- var input = @"
-using System;
-public class TestClass : IDisposable
-{
- void IDisposable.Dispose()
- {
- }
-
- void Foo()
- {
- ((IDisposable)this).Dispose();
- }
-}
-";
- Test<RedundantTypeCastIssue> (input, 0);
- }
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingDirectiveIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingDirectiveIssueTests.cs
new file mode 100644
index 0000000..8a3ed9f
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingDirectiveIssueTests.cs
@@ -0,0 +1,172 @@
+//
+// RedundantUsingDirectiveIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class RedundantUsingDirectiveIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"using System;
+
+class Foo
+{
+ void Bar (string str)
+ {
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"
+class Foo
+{
+ void Bar (string str)
+ {
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCase2 ()
+ {
+ var input = @"using System;
+
+class Foo
+{
+ void Bar (string str)
+ {
+ }
+}";
+
+ TestRefactoringContext context;
+ var issueProvider = new RedundantUsingDirectiveIssue ();
+ issueProvider.NamespacesToKeep.Add("System");
+ var issues = GetIssues (issueProvider, input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void TestInspectorCase3 ()
+ {
+ var input = @"using System;
+using System.Collections.Generic;
+
+namespace Foo
+{
+ class Bar
+ {
+ List<String> list;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void Linq1 ()
+ {
+ var input = @"using System;
+using System.Collections.Generic;
+using System.Linq;
+
+class Bar
+{
+ public object M(List<String> list)
+ {
+ return list.Where(t => !String.IsNullOrEmpty(t));
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void Linq2 ()
+ {
+ var input = @"using System;
+using System.Collections.Generic;
+using System.Linq;
+
+class Bar
+{
+ public object M(List<String> list)
+ {
+ return from t in list where !String.IsNullOrEmpty(t) select t;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+ [Test]
+ public void TestResharperDisableRestore ()
+ {
+ var input = @"// ReSharper disable RedundantUsingDirective
+using System;
+// ReSharper restore RedundantUsingDirective
+using System.IO;
+
+class Foo
+{
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ }
+
+ [Test]
+ public void TestResharperDisableOnce ()
+ {
+ var input = @"using System;
+// ReSharper disable once RedundantUsingDirective
+using System.IO;
+using System.Text;
+
+class Foo
+{
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new RedundantUsingDirectiveIssue (), input, out context);
+ Assert.AreEqual (2, issues.Count);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingInspectorTests.cs
deleted file mode 100644
index 16803e5..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantUsingInspectorTests.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-//
-// RedundantUsingInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class RedundantUsingInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1 ()
- {
- var input = @"using System;
-
-class Foo
-{
- void Bar (string str)
- {
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantUsingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"
-class Foo
-{
- void Bar (string str)
- {
- }
-}");
- }
-
- [Test]
- public void TestInspectorCase2 ()
- {
- var input = @"using System;
-
-class Foo
-{
- void Bar (string str)
- {
- }
-}";
-
- TestRefactoringContext context;
- var issueProvider = new RedundantUsingIssue ();
- issueProvider.NamespacesToKeep.Add("System");
- var issues = GetIssues (issueProvider, input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void TestInspectorCase3 ()
- {
- var input = @"using System;
-using System.Collections.Generic;
-
-namespace Foo
-{
- class Bar
- {
- List<String> list;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantUsingIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void Linq1 ()
- {
- var input = @"using System;
-using System.Collections.Generic;
-using System.Linq;
-
-class Bar
-{
- public object M(List<String> list)
- {
- return list.Where(t => !String.IsNullOrEmpty(t));
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantUsingIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void Linq2 ()
- {
- var input = @"using System;
-using System.Collections.Generic;
-using System.Linq;
-
-class Bar
-{
- public object M(List<String> list)
- {
- return from t in list where !String.IsNullOrEmpty(t) select t;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantUsingIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
-
- [Test]
- public void TestResharperDisableRestore ()
- {
- var input = @"// ReSharper disable RedundantUsingDirective
-using System;
-// ReSharper restore RedundantUsingDirective
-using System.IO;
-
-class Foo
-{
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantUsingIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantWhereWithPredicateIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantWhereWithPredicateIssueTests.cs
index fc40866..97fdadb 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantWhereWithPredicateIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantWhereWithPredicateIssueTests.cs
@@ -1,3 +1,29 @@
+//
+// ReplaceWithSingleCallToAnyIssueTests.cs
+//
+// Author:
+// Mike Kr�ger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
using ICSharpCode.NRefactory.CSharp.Refactoring;
@@ -6,7 +32,7 @@ using ICSharpCode.NRefactory.CSharp.CodeActions;
namespace ICSharpCode.NRefactory.CSharp.CodeIssues
{
[TestFixture]
- public class RedundantWhereWithPredicateIssueTests : InspectionActionTestBase
+ public class ReplaceWithSingleCallToAnyIssueTests : InspectionActionTestBase
{
[Test]
public void TestWhereAnyCase1 ()
@@ -20,7 +46,7 @@ public class CSharpDemo {
}";
TestRefactoringContext context;
- var issues = GetIssues (new RedundantWhereWithPredicateIssue (), input, out context);
+ var issues = GetIssues (new ReplaceWithSingleCallToAnyIssue (), input, out context);
Assert.AreEqual (1, issues.Count);
CheckFix (context, issues, @"using System.Linq;
public class CSharpDemo {
@@ -43,7 +69,7 @@ public class CSharpDemo {
}";
TestRefactoringContext context;
- var issues = GetIssues (new RedundantWhereWithPredicateIssue (), input, out context);
+ var issues = GetIssues (new ReplaceWithSingleCallToAnyIssue (), input, out context);
Assert.AreEqual (0, issues.Count);
}
@@ -63,31 +89,25 @@ public class X
}";
TestRefactoringContext context;
- var issues = GetIssues (new RedundantWhereWithPredicateIssue (), input, out context);
+ var issues = GetIssues (new ReplaceWithSingleCallToAnyIssue (), input, out context);
Assert.AreEqual (0, issues.Count);
}
-
- [Test]
- public void TestWhereCount()
- {
- var input = @"using System.Linq;
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
public class CSharpDemo {
public void Bla () {
int[] arr;
- var bla = arr.Where (x => x < 4).Count ();
+ // ReSharper disable once ReplaceWithSingleCallToAny
+ var bla = arr.Where (x => x < 4).Any ();
}
}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new RedundantWhereWithPredicateIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"using System.Linq;
-public class CSharpDemo {
- public void Bla () {
- int[] arr;
- var bla = arr.Count (x => x < 4);
- }
-}");
- }
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToAnyIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReferenceToStaticMemberViaDerivedTypeTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReferenceToStaticMemberViaDerivedTypeTests.cs
deleted file mode 100644
index b5d6100..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReferenceToStaticMemberViaDerivedTypeTests.cs
+++ /dev/null
@@ -1,326 +0,0 @@
-//
-// CallToStaticMemberViaDerivedType.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class ReferenceToStaticMemberViaDerivedTypeTests : InspectionActionTestBase
- {
- [Test]
- public void MemberInvocation()
- {
- var input = @"
-class A
-{
- public static void F() { }
-}
-class B : A { }
-class C
-{
- void Main()
- {
- B.F ();
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- Assert.AreEqual(11, issues [0].Start.Line);
-
- CheckFix(context, issues [0], @"
-class A
-{
- public static void F() { }
-}
-class B : A { }
-class C
-{
- void Main()
- {
- A.F ();
- }
-}"
- );
- }
-
- [Test]
- public void PropertyAccess()
- {
- var input = @"
-class A
-{
- public static string Property { get; set; }
-}
-class B : A { }
-class C
-{
- void Main()
- {
- System.Console.WriteLine(B.Property);
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- Assert.AreEqual(11, issues [0].Start.Line);
-
- CheckFix(context, issues [0], @"
-class A
-{
- public static string Property { get; set; }
-}
-class B : A { }
-class C
-{
- void Main()
- {
- System.Console.WriteLine(A.Property);
- }
-}"
- );
- }
-
- [Test]
- public void FieldAccess()
- {
- var input = @"
-class A
-{
- public static string Property;
-}
-class B : A { }
-class C
-{
- void Main()
- {
- System.Console.WriteLine(B.Property);
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- Assert.AreEqual(11, issues [0].Start.Line);
-
- CheckFix(context, issues [0], @"
-class A
-{
- public static string Property;
-}
-class B : A { }
-class C
-{
- void Main()
- {
- System.Console.WriteLine(A.Property);
- }
-}"
- );
- }
-
- [Test]
- public void NestedClass()
- {
- var input = @"
-class A
-{
- public class B
- {
- public static void F() { }
- }
- public class C : B { }
-}
-class D
-{
- void Main()
- {
- A.C.F ();
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- Assert.AreEqual(14, issues [0].Start.Line);
-
- CheckFix(context, issues [0], @"
-class A
-{
- public class B
- {
- public static void F() { }
- }
- public class C : B { }
-}
-class D
-{
- void Main()
- {
- A.B.F ();
- }
-}"
- );
- }
-
- [Test]
- public void ExpandsTypeWithNamespaceIfNeccessary()
- {
- var input = @"
-namespace First
-{
- class A
- {
- public static void F() { }
- }
-}
-namespace Second
-{
- public class B : First.A { }
- class C
- {
- void Main()
- {
- B.F ();
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- Assert.AreEqual(16, issues [0].Start.Line);
-
- CheckFix(context, issues [0], @"
-namespace First
-{
- class A
- {
- public static void F() { }
- }
-}
-namespace Second
-{
- public class B : First.A { }
- class C
- {
- void Main()
- {
- First.A.F ();
- }
- }
-}"
- );
- }
-
- [Test]
- public void IgnoresCorrectCalls()
- {
- var input = @"
-class A
-{
- public static void F() { }
-}
-class B
-{
- void Main()
- {
- A.F();
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresNonStaticCalls()
- {
- var input = @"
-class A
-{
- public void F() { }
-}
-class B : A { }
-class C
-{
- void Main()
- {
- B b = new B();
- b.F();
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresOwnMemberFunctions()
- {
- var input = @"
-class A
-{
- protected static void F() { }
-}
-class B : A
-{
- void Main()
- {
- F();
- this.F();
- base.F();
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresCuriouslyRecurringTemplatePattern()
- {
- var input = @"
-class Base<T>
-{
- public static void F() { }
-}
-class Derived : Base<Derived> {}
-class Test
-{
- void Main()
- {
- Derived.F();
- }
-}";
- // do not suggest replacing 'Derived.F()' with 'Base<Derived>.F()'
- TestRefactoringContext context;
- var issues = GetIssues(new ReferenceToStaticMemberViaDerivedTypeIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToCountIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToCountIssueTests.cs
new file mode 100644
index 0000000..cf9c6f8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToCountIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToCountIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToCountIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase ()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).Count ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToCountIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Count (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToCount
+ var bla = arr.Where (x => x < 4).Count ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToCountIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstIssueTests.cs
new file mode 100644
index 0000000..9541657
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToFirstIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToFirstIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).First ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToFirstIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.First (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToFirst
+ var bla = arr.Where (x => x < 4).First ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToFirstIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs
new file mode 100644
index 0000000..49b7836
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToFirstOrDefaultIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).FirstOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToFirstOrDefaultIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.FirstOrDefault (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToFirstOrDefault
+ var bla = arr.Where (x => x < 4).FirstOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToFirstOrDefaultIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastIssueTests.cs
new file mode 100644
index 0000000..df87807
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToLastIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToLastIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).Last ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLastIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Last (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToLast
+ var bla = arr.Where (x => x < 4).Last ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLastIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastOrDefaultIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastOrDefaultIssueTests.cs
new file mode 100644
index 0000000..7b49084
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLastOrDefaultIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToLastOrDefaultIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToLastOrDefaultIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).LastOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLastOrDefaultIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.LastOrDefault (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToLastOrDefault
+ var bla = arr.Where (x => x < 4).LastOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLastOrDefaultIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLongCountIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLongCountIssueTests.cs
new file mode 100644
index 0000000..fc80e8e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToLongCountIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToLongCountIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToLongCountIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).LongCount ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLongCountIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.LongCount (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToLongCount
+ var bla = arr.Where (x => x < 4).LongCount ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToLongCountIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleIssueTests.cs
new file mode 100644
index 0000000..dea0a20
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToSingleIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToSingleIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).Single ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToSingleIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Single (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToSingle
+ var bla = arr.Where (x => x < 4).Single ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToSingleIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs
new file mode 100644
index 0000000..152a2a7
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs
@@ -0,0 +1,78 @@
+//
+// ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin <http://xamarin.com>
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithSingleCallToSingleOrDefaultIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimpleCase()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.Where (x => x < 4).SingleOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToSingleOrDefaultIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ CheckFix(context, issues, @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+ var bla = arr.SingleOrDefault (x => x < 4);
+ }
+}");
+ }
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Linq;
+public class CSharpDemo {
+ public void Bla () {
+ int[] arr;
+// ReSharper disable ReplaceWithSingleCallToSingleOrDefault
+ var bla = arr.Where (x => x < 4).SingleOrDefault ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues(new ReplaceWithSingleCallToSingleOrDefaultIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithStringIsNullOrEmptyIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithStringIsNullOrEmptyIssueTests.cs
new file mode 100644
index 0000000..5724ed8
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ReplaceWithStringIsNullOrEmptyIssueTests.cs
@@ -0,0 +1,515 @@
+//
+// ReplaceWithStringIsNullOrEmptyIssueTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ReplaceWithStringIsNullOrEmptyIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCaseNS1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str != null && str != """")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS2 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (null != str && str != """")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS3 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (null != str && """" != str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS4 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str != null && str != """")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str != """" && str != null)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN2 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if ("""" != str && str != null)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN3 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if ("""" != str && null != str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+
+ [Test]
+ public void TestInspectorCaseSN4 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str != """" && null != str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS5 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str == null || str == """")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS6 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (null == str || str == """")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS7 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (null == str || """" == str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseNS8 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str == null || """" == str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN5 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str == """" || str == null)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN6 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if ("""" == str || str == null)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN7 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if ("""" == str || null == str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestInspectorCaseSN8 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (str == """" || null == str)
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [TestCase("str == null || str.Length == 0")]
+ [TestCase("str == null || 0 == str.Length")]
+ [TestCase("null == str || str.Length == 0")]
+ [TestCase("null == str || 0 == str.Length")]
+ public void TestInspectorCaseNL (string expression)
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (" + expression + @")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [TestCase("str != null && str.Length != 0")]
+ [TestCase("str != null && 0 != str.Length")]
+ [TestCase("str != null && str.Length > 0")]
+ [TestCase("null != str && str.Length != 0")]
+ [TestCase("null != str && 0 != str.Length")]
+ [TestCase("null != str && str.Length > 0")]
+ public void TestInspectorCaseLN (string expression)
+ {
+ var input = @"class Foo
+{
+ void Bar (string str)
+ {
+ if (" + expression + @")
+ ;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"class Foo
+{
+ void Bar (string str)
+ {
+ if (!string.IsNullOrEmpty (str))
+ ;
+ }
+}");
+ }
+
+ [Test]
+ public void TestArrays ()
+ {
+ var input = @"class Foo
+{
+ void Bar ()
+ {
+ int[] foo = new int[10];
+ if (foo == null || foo.Length == 0) {
+ }
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new ReplaceWithStringIsNullOrEmptyIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SimplifyAnonymousMethodToDelegateIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SimplifyAnonymousMethodToDelegateIssueTests.cs
index 56ee142..1f8f117 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SimplifyAnonymousMethodToDelegateIssueTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SimplifyAnonymousMethodToDelegateIssueTests.cs
@@ -34,60 +34,97 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
public class SimplifyAnonymousMethodToDelegateIssueTests : InspectionActionTestBase
{
[Test]
- public void TestSimpleLambda ()
+ public void TestSimpleVoidLambda ()
{
- var input = @"class Foo
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Action<int, int> action = $(foo, bar) => MyMethod (foo, bar);
+ }
+ void MyMethod(int foo, int bar) {}
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Action<int, int> action = MyMethod;
+ }
+ void MyMethod(int foo, int bar) {}
+}");
+ }
+
+ [Test]
+ public void TestSimpleBoolLambda ()
+ {
+ var input = @"using System;
+class Foo
{
void Bar (string str)
{
- var action = $(foo, bar) => MyMethod (foo, bar);
+ Func<int, int, bool> action = $(foo, bar) => MyMethod (foo, bar);
}
+ bool MyMethod(int foo, int bar) {}
}";
TestRefactoringContext context;
var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
+ CheckFix (context, issues, @"using System;
+class Foo
{
void Bar (string str)
{
- var action = MyMethod;
+ Func<int, int, bool> action = MyMethod;
}
+ bool MyMethod(int foo, int bar) {}
}");
}
[Test]
public void TestLambdaWithBody ()
{
- var input = @"class Foo
+ var input = @"using System;
+class Foo
{
void Bar (string str)
{
- var action = $(foo, bar) => { return MyMethod (foo, bar); };
+ Action<int, int> action = $(foo, bar) => { return MyMethod (foo, bar); };
}
+ void MyMethod(int foo, int bar) {}
}";
TestRefactoringContext context;
var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
+ CheckFix (context, issues, @"using System;
+class Foo
{
void Bar (string str)
{
- var action = MyMethod;
+ Action<int, int> action = MyMethod;
}
+ void MyMethod(int foo, int bar) {}
}");
}
[Test]
- public void TestSimpleInvalidLambda ()
+ public void Lambda_SwapParameterOrder ()
{
- var input = @"class Foo
+ var input = @"using System;
+class Foo
{
void Bar (string str)
{
- var action = $(foo, bar) => MyMethod (bar, foo);
+ Action<int, int> action = $(foo, bar) => MyMethod (bar, foo);
}
+ void MyMethod(int foo, int bar) {}
}";
TestRefactoringContext context;
@@ -98,26 +135,28 @@ namespace ICSharpCode.NRefactory.CSharp.CodeIssues
[Test]
public void TestSimpleAnonymousMethod ()
{
- var input = @"class Foo
+ var input = @"using System;
+class Foo
{
int MyMethod (int x, int y) { return x * y; }
void Bar (string str)
{
- var action = $delegate(int foo, int bar) { return MyMethod (foo, bar); };
+ Func<int, int, int> action = $delegate(int foo, int bar) { return MyMethod (foo, bar); };
}
}";
TestRefactoringContext context;
var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
+ CheckFix (context, issues, @"using System;
+class Foo
{
int MyMethod (int x, int y) { return x * y; }
void Bar (string str)
{
- var action = MyMethod;
+ Func<int, int, int> action = MyMethod;
}
}");
}
@@ -134,7 +173,26 @@ class Foo
void Bar (string str)
{
- var action = $() => str.Where (c => c != 'a').ToArray ();
+ Func<char[]> action = $() => str.Where (c => c != 'a').ToArray ();
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void CallInvolvesOptionalParameter ()
+ {
+ var input = @"using System;
+class Foo
+{
+ int MyMethod (int x, int y = 1) { return x * y; }
+
+ void Bar (string str)
+ {
+ Func<int, int> action = $foo => MyMethod (foo);
}
}";
@@ -144,16 +202,126 @@ class Foo
}
[Test]
- public void TestComplexCase ()
+ public void CallExpandsParams ()
{
- var input = @"class Foo
+ var input = @"using System;
+class Foo
{
- int MyMethod (int x, int y) { return x * y; }
+ int MyMethod (params object[] args) { return 0; }
+
+ void Bar (string str)
+ {
+ Func<string, int> action = $foo => MyMethod (foo);
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ /// <summary>
+ /// Bug 12184 - Expression can be reduced to delegate fix can create ambiguity
+ /// </summary>
+ [Test]
+ public void TestBug12184 ()
+ {
+ var input = @"using System;
+using System.Threading.Tasks;
+class C
+{
+ public C GetResponse () { return null; }
+
+ public static void Foo ()
+ {
+ Task.Factory.StartNew (() => GetResponse());
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ CheckFix (context, issues, @"using System;
+using System.Threading.Tasks;
+
+class C
+{
+ public C GetResponse () { return null; }
+
+ public static void Foo ()
+ {
+ Task.Factory.StartNew ((Func<C>)GetResponse);
+ }
+}");
+
+ }
+
+ [Test]
+ public void Return_ReferenceConversion ()
+ {
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Func<int, object> action = $foo => MyMethod(foo);
+ }
+ string MyMethod(int foo) {}
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ }
+
+ [Test]
+ public void Return_BoxingConversion ()
+ {
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Func<int, object> action = $foo => MyMethod(foo);
+ }
+ bool MyMethod(int foo) {}
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+ }
+
+ [Test]
+ public void Parameter_ReferenceConversion ()
+ {
+ var input = @"using System;
+class Foo
+{
+ void Bar (string str)
+ {
+ Action<string> action = $foo => MyMethod(foo);
+ }
+ void MyMethod(object foo) {}
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SimplifyAnonymousMethodToDelegateIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ }
+
+ [Test]
+ public void Parameter_BoxingConversion ()
+ {
+ var input = @"using System;
+class Foo
+{
void Bar (string str)
{
- var action = $delegate(int foo, int bar) { return MyMethod (bar, foo); };
+ Action<int> action = $foo => MyMethod(foo);
}
+ void MyMethod(object foo) {}
}";
TestRefactoringContext context;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticConstructorAccessModifierTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticConstructorAccessModifierTest.cs
index 317ecb8..39703ab 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticConstructorAccessModifierTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticConstructorAccessModifierTest.cs
@@ -43,7 +43,7 @@ class Test {
}";
TestRefactoringContext context;
- var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context);
+ var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context, true);
Assert.AreEqual(1, issues.Count);
}
@@ -60,7 +60,7 @@ class Test {
{}
}";
TestRefactoringContext context;
- var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context);
+ var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context, true);
Assert.AreEqual(1, issues.Count);
}
@@ -79,7 +79,7 @@ class Test {
}";
TestRefactoringContext context;
- var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context);
+ var issues = GetIssues(new StaticConstructorAccessModifierIssue(), input, out context, true);
Assert.AreEqual(0, issues.Count);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticFieldInGenericTypeTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticFieldInGenericTypeTests.cs
index c9fcdbb..94ebff0 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticFieldInGenericTypeTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StaticFieldInGenericTypeTests.cs
@@ -131,6 +131,7 @@ class Foo<T>
var issues = GetIssues(new StaticFieldInGenericTypeIssue(), input, out context);
Assert.AreEqual(1, issues.Count);
}
+
[Test]
public void TestAssemblyMicrosoftSuppressMessage()
{
@@ -148,6 +149,20 @@ class Foo<T>
var issues = GetIssues(new StaticFieldInGenericTypeIssue(), input, out context);
Assert.AreEqual(0, issues.Count);
}
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"using System.Diagnostics.CodeAnalysis;
+
+class Foo<T>
+{
+ // ReSharper disable once StaticFieldInGenericType
+ static string Data;
+}";
+ TestWrongContext<StaticFieldInGenericTypeIssue>(input);
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StringIsNullOrEmptyInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StringIsNullOrEmptyInspectorTests.cs
deleted file mode 100644
index 28f6431..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/StringIsNullOrEmptyInspectorTests.cs
+++ /dev/null
@@ -1,521 +0,0 @@
-//
-// StringIsNullOrEmptyInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class StringIsNullOrEmptyInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCaseNS1 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str != null && str != """")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS2 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (null != str && str != """")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS3 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (null != str && """" != str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS4 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str != null && str != """")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN1 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str != """" && str != null)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN2 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if ("""" != str && str != null)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN3 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if ("""" != str && null != str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
-
- [Test]
- public void TestInspectorCaseSN4 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str != """" && null != str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS5 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str == null || str == """")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS6 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (null == str || str == """")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS7 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (null == str || """" == str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseNS8 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str == null || """" == str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN5 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str == """" || str == null)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN6 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if ("""" == str || str == null)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN7 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if ("""" == str || null == str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestInspectorCaseSN8 ()
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (str == """" || null == str)
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [TestCase("str == null || str.Length == 0")]
- [TestCase("str == null || 0 == str.Length")]
- [TestCase("str.Length == 0 || str == null")]
- [TestCase("0 == str.Length || str == null")]
- [TestCase("null == str || str.Length == 0")]
- [TestCase("null == str || 0 == str.Length")]
- [TestCase("str.Length == 0 || null == str")]
- [TestCase("0 == str.Length || null == str")]
- public void TestInspectorCaseNL (string expression)
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (" + expression + @")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [TestCase("str != null && str.Length != 0")]
- [TestCase("str != null && 0 != str.Length")]
- [TestCase("str.Length != 0 && str != null")]
- [TestCase("0 != str.Length && str != null")]
- [TestCase("null != str && str.Length != 0")]
- [TestCase("null != str && 0 != str.Length")]
- [TestCase("str.Length != 0 && null != str")]
- [TestCase("0 != str.Length && null != str")]
- public void TestInspectorCaseLN (string expression)
- {
- var input = @"class Foo
-{
- void Bar (string str)
- {
- if (" + expression + @")
- ;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- CheckFix (context, issues, @"class Foo
-{
- void Bar (string str)
- {
- if (!string.IsNullOrEmpty (str))
- ;
- }
-}");
- }
-
- [Test]
- public void TestArrays ()
- {
- var input = @"class Foo
-{
- void Bar ()
- {
- int[] foo = new int[10];
- if (foo == null || foo.Length == 0) {
- }
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new StringIsNullOrEmptyIssue (), input, out context);
- Assert.AreEqual (0, issues.Count);
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SuggestUseVarKeywordEvidentTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SuggestUseVarKeywordEvidentTests.cs
new file mode 100644
index 0000000..41342b4
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/SuggestUseVarKeywordEvidentTests.cs
@@ -0,0 +1,54 @@
+//
+// SuggestUseVarKeywordEvidentTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class SuggestUseVarKeywordEvidentTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"class Foo
+{
+ void Bar (object o)
+ {
+ Foo foo = (Foo)o;
+ }
+}";
+
+ TestRefactoringContext context;
+ var issues = GetIssues (new SuggestUseVarKeywordEvidentIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+ // Fix is done by code action.
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticAtInstanceFieldTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticAtInstanceFieldTests.cs
new file mode 100644
index 0000000..ba4938b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticAtInstanceFieldTests.cs
@@ -0,0 +1,180 @@
+//
+// ThreadStaticAtInstanceFieldTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class ThreadStaticAtInstanceFieldTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestInspectorCase1 ()
+ {
+ var input = @"using System;
+class Foo
+{
+ [ThreadStatic]
+ int bar;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ThreadStaticAtInstanceFieldIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"using System;
+class Foo
+{
+ int bar;
+}");
+ }
+
+ [Test]
+ public void TestInspectorCase2 ()
+ {
+ var input = @"using System;
+class Foo
+{
+ [Serializable, ThreadStatic]
+ int bar;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ThreadStaticAtInstanceFieldIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"using System;
+class Foo
+{
+ [Serializable]
+ int bar;
+}");
+ }
+
+ [Test]
+ public void TestInspectorCase3 ()
+ {
+ var input = @"class Foo
+{
+ [System.ThreadStatic, System.Serializable]
+ int bar;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ThreadStaticAtInstanceFieldIssue (), input, out context);
+ Assert.AreEqual (1, issues.Count);
+
+ CheckFix (context, issues [0], @"class Foo
+{
+ [System.Serializable]
+ int bar;
+}");
+ }
+
+
+
+ [Test]
+ public void TestResharperSuppression ()
+ {
+ var input = @"using System;
+class Foo
+{
+// ReSharper disable once ThreadStaticAtInstanceField
+ [ThreadStatic]
+ int bar;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues (new ThreadStaticAtInstanceFieldIssue (), input, out context);
+ Assert.AreEqual (0, issues.Count);
+
+ }
+
+
+ [Test]
+ public void InstanceField()
+ {
+ var input = @"
+using System;
+class TestClass
+{
+ [ThreadStatic]
+ string field;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ThreadStaticAtInstanceFieldIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ var issue = issues[0];
+ Assert.AreEqual(2, issue.Actions.Count);
+
+ CheckFix(context, issues[0], @"
+using System;
+class TestClass
+{
+ string field;
+}");
+ }
+
+ [Test]
+ public void InstanceFieldWithMultiAttributeSection()
+ {
+ var input = @"
+using System;
+class TestClass
+{
+ [field: ThreadStatic, ContextStatic]
+ string field;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ThreadStaticAtInstanceFieldIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ var issue = issues[0];
+ Assert.AreEqual(2, issue.Actions.Count);
+
+ CheckFix(context, issues[0], @"
+using System;
+class TestClass
+{
+ [field: ContextStatic]
+ string field;
+}");
+ }
+
+ [Test]
+ public void StaticField()
+ {
+ var input = @"
+using System;
+class TestClass
+{
+ [ThreadStatic]
+ static string field;
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ThreadStaticAtInstanceFieldIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticOnInstanceFieldTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticOnInstanceFieldTests.cs
deleted file mode 100644
index 2005549..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ThreadStaticOnInstanceFieldTests.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// ThreadStaticOnInstanceFieldTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class ThreadStaticOnInstanceFieldTests : InspectionActionTestBase
- {
-
- [Test]
- public void InstanceField()
- {
- var input = @"
-using System;
-class TestClass
-{
- [ThreadStatic]
- string field;
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ThreadStaticOnInstanceFieldIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- var issue = issues [0];
- Assert.AreEqual(2, issue.Actions.Count);
-
- CheckFix(context, issues [0], @"
-using System;
-class TestClass
-{
- string field;
-}");
- }
-
- [Ignore]
- [Test]
- public void InstanceFieldWithMultiAttributeSection()
- {
- var input = @"
-using System;
-class TestClass
-{
- [field: ThreadStatic, ContextStatic]
- string field;
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ThreadStaticOnInstanceFieldIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- var issue = issues [0];
- Assert.AreEqual(2, issue.Actions.Count);
-
- CheckFix(context, issues [0], @"
-using System;
-class TestClass
-{
- [field: ContextStatic]
- string field;
-}");
- }
-
- [Test]
- public void StaticField()
- {
- var input = @"
-using System;
-class TestClass
-{
- [ThreadStatic]
- static string field;
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ThreadStaticOnInstanceFieldIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/TypeParameterNotUsedIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/TypeParameterNotUsedIssueTests.cs
deleted file mode 100644
index 7a9f771..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/TypeParameterNotUsedIssueTests.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// TypeParameterNotUsedIssueTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
-//
-// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
-using NUnit.Framework;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class TypeParameterNotUsedIssueTests : InspectionActionTestBase
- {
-
- [Test]
- public void TestUnusedTypeParameter ()
- {
- var input = @"
-class TestClass {
- void TestMethod<T> ()
- {
- }
-}";
- Test<TypeParameterNotUsedIssue> (input, 1);
- }
-
- [Test]
- public void TestUsedTypeParameter ()
- {
- var input = @"
-class TestClass {
- void TestMethod<T> (T i)
- {
- }
-}";
- var input2 = @"
-class TestClass {
- T TestMethod<T> ()
- {
- }
-}";
- Test<TypeParameterNotUsedIssue> (input, 0);
- Test<TypeParameterNotUsedIssue> (input2, 0);
- }
-
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UnusedTypeParameterIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UnusedTypeParameterIssueTests.cs
new file mode 100644
index 0000000..87b17cc
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UnusedTypeParameterIssueTests.cs
@@ -0,0 +1,68 @@
+//
+// UnusedTypeParameterIssueTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang <lightyang0 at gmail.com>
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class UnusedTypeParameterIssueTests : InspectionActionTestBase
+ {
+
+ [Test]
+ public void TestUnusedTypeParameter ()
+ {
+ var input = @"
+class TestClass {
+ void TestMethod<T> ()
+ {
+ }
+}";
+ Test<UnusedTypeParameterIssue> (input, 1);
+ }
+
+ [Test]
+ public void TestUsedTypeParameter ()
+ {
+ var input = @"
+class TestClass {
+ void TestMethod<T> (T i)
+ {
+ }
+}";
+ var input2 = @"
+class TestClass {
+ T TestMethod<T> ()
+ {
+ }
+}";
+ Test<UnusedTypeParameterIssue> (input, 0);
+ Test<UnusedTypeParameterIssue> (input2, 0);
+ }
+
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseBlockInsteadColonIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseBlockInsteadColonIssueTests.cs
new file mode 100644
index 0000000..095d496
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseBlockInsteadColonIssueTests.cs
@@ -0,0 +1,81 @@
+//
+// UseBlockInsteadColonIssueTests.cs
+//
+// Author:
+// Ciprian Khlud <ciprian.mustiata at yahoo.com>
+//
+// Copyright (c) 2013 Ciprian Khlud
+//
+// 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 ICSharpCode.NRefactory.CSharp.Refactoring;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+ [TestFixture]
+ public class UseBlockInsteadColonIssueTests : InspectionActionTestBase
+ {
+ [Test]
+ public void TestSimple ()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ if (i > 0);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (int i)
+ {
+ if (i > 0) {
+ }
+ }
+}";
+ Test<UseBlockInsteadColonIssue>(input, output);
+ }
+ [Test]
+ public void TestForeach()
+ {
+ var input = @"
+class TestClass
+{
+ void TestMethod (int[] list)
+ {
+ foreach (var i in list);
+ }
+}";
+ var output = @"
+class TestClass
+{
+ void TestMethod (int[] list)
+ {
+ foreach (var i in list) {
+ }
+ }
+}";
+ Test<UseBlockInsteadColonIssue>(input, output);
+ }
+ }
+
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseVarKeywordInspectorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseVarKeywordInspectorTests.cs
deleted file mode 100644
index ff6981d..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/UseVarKeywordInspectorTests.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// UseVarKeywordInspectorTests.cs
-//
-// Author:
-// Mike Krüger <mkrueger at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- [TestFixture]
- public class UseVarKeywordInspectorTests : InspectionActionTestBase
- {
- [Test]
- public void TestInspectorCase1 ()
- {
- var input = @"class Foo
-{
- void Bar (object o)
- {
- Foo foo = (Foo)o;
- }
-}";
-
- TestRefactoringContext context;
- var issues = GetIssues (new UseVarKeywordIssue (), input, out context);
- Assert.AreEqual (1, issues.Count);
- // Fix is done by code action.
- }
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterNotUsedIssueTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterNotUsedIssueTests.cs
new file mode 100644
index 0000000..880f703
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterNotUsedIssueTests.cs
@@ -0,0 +1,228 @@
+//
+// SetterDoesNotUseValueParameterTests.cs
+//
+// Author:
+// Simon Lindgren <simon.n.lindgren at gmail.com>
+//
+// Copyright (c) 2012 Simon Lindgren
+//
+// 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 Mono.CSharp;
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+
+namespace ICSharpCode.NRefactory.CSharp.CodeIssues
+{
+
+ public class ValueParameterNotUsedIssueTests : InspectionActionTestBase
+ {
+
+ [Test]
+ public void TestPropertySetter()
+ {
+ var input = @"class A
+{
+ int Property1
+ {
+ set {
+ int val = value;
+ }
+ }
+ int Property2
+ {
+ set {
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ }
+
+
+ [Test]
+ public void TestDisable()
+ {
+ var input = @"class A
+{
+ int Property1
+ {
+ set
+ {
+ int val = value;
+ }
+ }
+ int Property2
+ {
+// ReSharper disable once ValueParameterNotUsed
+ set
+ {
+ }
+ }
+}";
+ TestWrongContext<ValueParameterNotUsedIssue>(input);
+ }
+
+ [Test]
+ public void TestMatchingIndexerSetter()
+ {
+ var input = @"class A
+{
+ A this[int index]
+ {
+ set {
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ }
+
+ [Test]
+ public void TestMatchingEventAdder()
+ {
+ var input = @"class A
+{
+ delegate void TestEventHandler ();
+ TestEventHandler eventTested;
+ event TestEventHandler EventTested
+ {
+ add {
+ eventTested += value;
+ }
+ remove {
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(1, issues.Count);
+ }
+
+ [Test]
+ public void TestNonMatchingIndexerSetter()
+ {
+ var input = @"class A
+{
+ A this[int index]
+ {
+ set {
+ A a = value;
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoresAutoSetter()
+ {
+ var input = @"class A
+{
+ string Property { set; }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void IgnoreReadOnlyProperty()
+ {
+ var input = @"class A
+{
+ string Property { get; }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void DoesNotCrashOnNullIndexerAccessorBody()
+ {
+ var input = @"abstract class A
+{
+ public abstract string this[int i] { get; set; }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void DoesNotWarnOnExceptionThrowingAccessor()
+ {
+ var input = @"abstract class A
+{
+ public string Property
+ {
+ set {
+ throw new Exception();
+ }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void DoesNotWarnOnEmptyCustomEvent()
+ {
+ // Empty custom events are often used when the event can never be raised
+ // by a class (but the event is required e.g. due to an interface).
+ var input = @"class A
+{
+ delegate void TestEventHandler ();
+ event TestEventHandler EventTested
+ {
+ add { }
+ remove { }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+
+ [Test]
+ public void DoesNotWarnOnNotImplementedCustomEvent()
+ {
+ var input = @"class A
+{
+ delegate void TestEventHandler ();
+ event TestEventHandler EventTested
+ {
+ add { throw new System.NotImplementedException(); }
+ remove { throw new System.NotImplementedException(); }
+ }
+}";
+ TestRefactoringContext context;
+ var issues = GetIssues(new ValueParameterNotUsedIssue(), input, out context);
+ Assert.AreEqual(0, issues.Count);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterUnusedTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterUnusedTests.cs
deleted file mode 100644
index a3327d8..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/ValueParameterUnusedTests.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-//
-// SetterDoesNotUseValueParameterTests.cs
-//
-// Author:
-// Simon Lindgren <simon.n.lindgren at gmail.com>
-//
-// Copyright (c) 2012 Simon Lindgren
-//
-// 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 NUnit.Framework;
-using ICSharpCode.NRefactory.CSharp.Refactoring;
-using ICSharpCode.NRefactory.CSharp.CodeActions;
-
-namespace ICSharpCode.NRefactory.CSharp.CodeIssues
-{
- public class ValueParameterUnusedTests : InspectionActionTestBase
- {
- [Test]
- public void TestPropertySetter()
- {
- var input = @"class A
-{
- int Property1
- {
- set {
- int val = value;
- }
- }
- int Property2
- {
- set {
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- }
-
- [Test]
- public void TestMatchingIndexerSetter()
- {
- var input = @"class A
-{
- A this[int index]
- {
- set {
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- }
-
- [Test]
- public void TestMatchingEventAdder()
- {
- var input = @"class A
-{
- delegate void TestEventHandler ();
- TestEventHandler eventTested;
- event TestEventHandler EventTested
- {
- add {
- eventTested += value;
- }
- remove {
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(1, issues.Count);
- }
-
- [Test]
- public void TestNonMatchingIndexerSetter()
- {
- var input = @"class A
-{
- A this[int index]
- {
- set {
- A a = value;
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoresAutoSetter()
- {
- var input = @"class A
-{
- string Property { set; }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void IgnoreReadOnlyProperty()
- {
- var input = @"class A
-{
- string Property { get; }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void DoesNotCrashOnNullIndexerAccessorBody()
- {
- var input = @"abstract class A
-{
- public abstract string this[int i] { get; set; }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void DoesNotWarnOnExceptionThrowingAccessor()
- {
- var input = @"abstract class A
-{
- public string Property
- {
- set {
- throw new Exception();
- }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
-
- [Test]
- public void DoesNotWarnOnEmptyCustomEvent()
- {
- // Empty custom events are often used when the event can never be raised
- // by a class (but the event is required e.g. due to an interface).
- var input = @"class A
-{
- delegate void TestEventHandler ();
- event TestEventHandler EventTested
- {
- add { }
- remove { }
- }
-}";
- TestRefactoringContext context;
- var issues = GetIssues(new ValueParameterUnusedIssue(), input, out context);
- Assert.AreEqual(0, issues.Count);
- }
- }
-}
-
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Bugs/ParserBugTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Bugs/ParserBugTests.cs
index 45e8998..622e123 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Bugs/ParserBugTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Bugs/ParserBugTests.cs
@@ -58,7 +58,7 @@ class Foo
var passed = !constructor.HasModifier(Modifiers.Override);
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -83,7 +83,7 @@ class Stub
bool passed = method.Body.Statements.FirstOrDefault() is ReturnStatement;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -108,7 +108,7 @@ class TestClass
bool passed = constructor.GetNodeAt<AttributeSection>(constructor.LParToken.StartLocation.Line, constructor.LParToken.StartLocation.Column + 1) != null;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -137,7 +137,7 @@ class Foo
bool passed = !method.Body.IsNull;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -164,10 +164,10 @@ class Foo
{
for (int i = 0; i < foo.bar;)
}
-}" == unit.GetText ().Trim ();
+}" == unit.ToString().Trim ();
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -196,7 +196,7 @@ class Foo
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -222,7 +222,7 @@ class Foo
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -248,7 +248,7 @@ class Foo
bool passed = !method.Body.IsNull;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -275,7 +275,7 @@ class Foo
bool passed = method.Body.Statements.FirstOrDefault() is TryCatchStatement;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -301,7 +301,7 @@ class Test
";
var unit = SyntaxTree.Parse(code);
- bool passed = unit.GetText().Trim() == @"using System;
+ bool passed = unit.ToString().Trim() == @"using System;
class Test
{
void Foo ()
@@ -312,7 +312,7 @@ class Test
}";
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -340,7 +340,7 @@ class Foo
bool passed = !method.Body.IsNull;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -361,7 +361,7 @@ class Foo
}";
var unit = SyntaxTree.Parse(code);
- string text = unit.GetText().Trim();
+ string text = unit.ToString().Trim();
string expected = @"public class Bar
{
public IEnumerable<Foo> GetFoos()
@@ -387,7 +387,7 @@ class Foo
bool passed = i == text.Length && j == expected.Length;
if (!passed) {
Console.WriteLine("Expected:" + expected);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -418,7 +418,7 @@ class Foo
bool passed = stmt.Expression is ObjectCreateExpression;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
@@ -433,16 +433,51 @@ class Foo
}
";
var unit = SyntaxTree.Parse(code);
-
+
var type = unit.Members.First() as TypeDeclaration;
var method = type.Members.First() as MethodDeclaration;
bool passed = method.Parameters.Count == 1;
if (!passed) {
Console.WriteLine("Expected:" + code);
- Console.WriteLine("Was:" + unit.GetText());
+ Console.WriteLine("Was:" + unit);
}
Assert.IsTrue(passed);
}
+
+ [Test]
+ public void TestMultipleNestedPartialClassesInSameFile ()
+ {
+ string code = @"public partial class PartialClassInSameFile
+ {
+ public partial class NestedPartial
+ {
+ void Foo ()
+ {
+ }
+ }
+ }
+
+ public partial class PartialClassInSameFile
+ {
+ public partial class NestedPartial
+ {
+ void FooBar ()
+ {
+
+ }
+ }
+ }
+";
+ var unit = SyntaxTree.Parse(code);
+ Console.WriteLine(unit);
+ var type = unit.Members.First() as TypeDeclaration;
+ Assert.IsTrue(type.Members.FirstOrDefault() is TypeDeclaration, "1st nested partial not found.");
+
+ type = unit.Members.Skip (1).First() as TypeDeclaration;
+ Assert.IsTrue(type.Members.FirstOrDefault() is TypeDeclaration, "2nd nested partial not found.");
+
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs
index 74482b1..82afc64 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs
@@ -303,6 +303,22 @@ select new { c.Name, o.OrderID, o.Total }",
}
[Test]
+ public void LocationOfWhere()
+ {
+ var expr = ParseUtilCSharp.ParseExpression<QueryExpression>("from c in customers where c.City == \"London\" select c");
+ var where = expr.Clauses.ElementAt(1);
+ Assert.That(where.StartLocation, Is.EqualTo(new TextLocation(1, 21)));
+ }
+
+ [Test]
+ public void LocationOfOrderBy()
+ {
+ var expr = ParseUtilCSharp.ParseExpression<QueryExpression>("from c in customers orderby c.City select c");
+ var where = expr.Clauses.ElementAt(1);
+ Assert.That(where.StartLocation, Is.EqualTo(new TextLocation(1, 21)));
+ }
+
+ [Test]
public void ExpressionWithOrderByAndLet()
{
ParseUtilCSharp.AssertExpression(
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/PreprocessorDirectiveTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/PreprocessorDirectiveTests.cs
index 0df5bfb..e95fb7b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/PreprocessorDirectiveTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/PreprocessorDirectiveTests.cs
@@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope
Assert.AreEqual(new Role[] {
Roles.NamespaceKeyword,
- Roles.Identifier,
+ NamespaceDeclaration.NamespaceNameRole,
Roles.LBrace,
Roles.PreProcessorDirective,
Roles.Comment,
@@ -66,7 +66,6 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope
Assert.AreEqual(new TextLocation(4, 8), pp.Last().EndLocation);
}
- [Ignore("Fixme!")]
[Test]
public void NestedInactiveIf()
{
@@ -84,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope
Assert.AreEqual(new Role[] {
Roles.NamespaceKeyword,
- Roles.Identifier,
+ NamespaceDeclaration.NamespaceNameRole,
Roles.LBrace,
Roles.PreProcessorDirective,
Roles.Comment,
@@ -94,7 +93,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope
Roles.Comment,
Roles.PreProcessorDirective,
Roles.RBrace
- }, ns.Children.Select(c => c.Role).ToArray());
+ }, ns.Children.Where (c => !(c is NewLineNode)).Select(c => c.Role).ToArray());
}
[Ignore("Fixme!")]
@@ -118,19 +117,67 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope
Roles.Comment,
Roles.PreProcessorDirective,
Roles.RBrace
- }, ns.Children.Select(c => c.Role).ToArray());
+ }, ns.Children.Where (c => !(c is NewLineNode)).Select(c => c.Role).ToArray());
Assert.AreEqual(CommentType.SingleLine, ns.GetChildrenByRole(Roles.Comment).First().CommentType);
Assert.AreEqual(CommentType.InactiveCode, ns.GetChildrenByRole(Roles.Comment).Last().CommentType);
}
- [Ignore("Fixme!")]
[Test]
public void PragmaWarning()
{
string program = "#pragma warning disable 809";
+ var ppd = ParseUtilCSharp.ParseGlobal<PragmaWarningPreprocssorDirective>(program);
+ Assert.AreEqual(PreProcessorDirectiveType.Pragma, ppd.Type);
+ Assert.IsTrue(ppd.Disable);
+ Assert.IsTrue(ppd.WarningList.Contains (809));
+ }
+
+ [Test, Ignore("mcs crashes because it tries to compute the full path to file.cs")]
+ public void PragmaChecksum()
+ {
+ string program = "#pragma checksum \"file.cs\" \"{3673e4ca-6098-4ec1-890f-8fceb2a794a2}\" \"{012345678AB}\"";
var ppd = ParseUtilCSharp.ParseGlobal<PreProcessorDirective>(program);
+ Assert.IsFalse(ppd is PragmaWarningPreprocssorDirective);
Assert.AreEqual(PreProcessorDirectiveType.Pragma, ppd.Type);
- Assert.AreEqual("warning disable 809", ppd.Argument);
+ Assert.AreEqual("checksum \"file.cs\" \"{3673e4ca-6098-4ec1-890f-8fceb2a794a2}\" \"{012345678AB}\"", ppd.Argument);
+ }
+
+ [Test, Ignore("mcs crashes because it tries to compute the full path to file.cs")]
+ public void LineWithFileName()
+ {
+ string program = "#line 200 \"otherfile.cs\"\nclass Test {}";
+ CSharpParser parser = new CSharpParser();
+ SyntaxTree syntaxTree = parser.Parse(program, "/a.cs");
+ Assert.IsFalse(parser.HasErrors, string.Join(Environment.NewLine, parser.Errors.Select(e => e.Message)));
+ Assert.AreEqual(new Role[] {
+ Roles.PreProcessorDirective,
+ Roles.NewLine,
+ SyntaxTree.MemberRole
+ }, syntaxTree.Children.Select(c => c.Role).ToArray());
+ Assert.AreEqual(new TextLocation(2, 1), syntaxTree.Members.Single().StartLocation);
+
+ var ppd = (LinePreprocssorDirective)syntaxTree.FirstChild;
+ Assert.AreEqual(PreProcessorDirectiveType.Line, ppd.Type);
+ Assert.AreEqual(200, ppd.LineNumber);
+ Assert.AreEqual("otherfile.cs", ppd.FileName);
+ }
+
+ [Test]
+ public void Line()
+ {
+ string program = "#line 200\nclass Test {}";
+ CSharpParser parser = new CSharpParser();
+ SyntaxTree syntaxTree = parser.Parse(program);
+ Assert.IsFalse(parser.HasErrors, string.Join(Environment.NewLine, parser.Errors.Select(e => e.Message)));
+ Assert.AreEqual(new Role[] {
+ Roles.PreProcessorDirective,
+ Roles.NewLine,
+ NamespaceDeclaration.MemberRole
+ }, syntaxTree.Children.Select(c => c.Role).ToArray());
+ Assert.AreEqual(new TextLocation(2, 1), syntaxTree.Members.Single().StartLocation);
+ var ppd = (LinePreprocssorDirective)syntaxTree.FirstChild;
+ Assert.AreEqual(PreProcessorDirectiveType.Line, ppd.Type);
+ Assert.AreEqual(200, ppd.LineNumber);
}
const string elifProgram = @"
@@ -141,20 +188,18 @@ class B { }
#endif";
[Test]
- [Ignore("parser bug (missing comment node)")]
public void ElifBothFalse()
{
CSharpParser parser = new CSharpParser();
var syntaxTree = parser.Parse(elifProgram, "elif.cs");
Assert.IsFalse(parser.HasErrors);
-
Assert.AreEqual(new Role[] {
Roles.PreProcessorDirective,
Roles.Comment,
Roles.PreProcessorDirective,
Roles.Comment,
Roles.PreProcessorDirective
- }, syntaxTree.Children.Select(c => c.Role).ToArray());
+ }, syntaxTree.Children.Where (c => !(c is NewLineNode)).Select(c => c.Role).ToArray());
var aaa = syntaxTree.GetChildrenByRole(Roles.PreProcessorDirective).ElementAt(0);
Assert.IsFalse(aaa.Take);
Assert.AreEqual(PreProcessorDirectiveType.If, aaa.Type);
@@ -167,7 +212,6 @@ class B { }
}
[Test]
- [Ignore("parser bug (bbb.Take is true, should be false)")]
public void ElifBothTrue()
{
CSharpParser parser = new CSharpParser();
@@ -181,7 +225,7 @@ class B { }
Roles.PreProcessorDirective,
Roles.Comment,
Roles.PreProcessorDirective
- }, syntaxTree.Children.Select(c => c.Role).ToArray());
+ }, syntaxTree.Children.Where (c => !(c is NewLineNode)).Select(c => c.Role).ToArray());
var aaa = syntaxTree.GetChildrenByRole(Roles.PreProcessorDirective).ElementAt(0);
Assert.IsTrue(aaa.Take);
Assert.AreEqual(PreProcessorDirectiveType.If, aaa.Type);
@@ -194,7 +238,6 @@ class B { }
}
[Test]
- [Ignore("parser bug (bbb.Take is true, should be false)")]
public void ElifFirstTaken()
{
CSharpParser parser = new CSharpParser();
@@ -208,7 +251,7 @@ class B { }
Roles.PreProcessorDirective,
Roles.Comment,
Roles.PreProcessorDirective
- }, syntaxTree.Children.Select(c => c.Role).ToArray());
+ }, syntaxTree.Children.Where (c => !(c is NewLineNode)).Select(c => c.Role).ToArray());
var aaa = syntaxTree.GetChildrenByRole(Roles.PreProcessorDirective).ElementAt(0);
Assert.IsTrue(aaa.Take);
Assert.AreEqual(PreProcessorDirectiveType.If, aaa.Type);
@@ -247,7 +290,6 @@ class B { }
}
[Test]
- [Ignore("parser bug (BBB is missing)")]
public void ConditionalSymbolTest()
{
const string program = @"// Test
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs
index a016cac..ac77107 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs
@@ -143,7 +143,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser
static string ToCSharp(AstNode node)
{
- return node.GetText();
+ return node.ToString();
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/InvalidStatementsTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/InvalidStatementsTests.cs
index 7efd204..8ed44cf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/InvalidStatementsTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/InvalidStatementsTests.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements
[Test]
public void AsExpressionStatementPositions()
{
- ExpressionStatement expr = ParseUtilCSharp.ParseStatement<ExpressionStatement>("\t\t\"\" as IEnumerable<char>;", true);
+ ExpressionStatement expr = ParseUtilCSharp.ParseStatement<ExpressionStatement>("\t\t\"\" as IEnumerable<char>;", false);
Assert.AreEqual(new TextLocation(1, 3), expr.StartLocation);
Assert.AreEqual(new TextLocation(1, 27), expr.EndLocation);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeSystemConvertVisitorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeSystemConvertVisitorTests.cs
index cd339dc..a8ac2a8 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeSystemConvertVisitorTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeSystemConvertVisitorTests.cs
@@ -99,6 +99,22 @@ namespace ICSharpCode.NRefactory.CSharp.Parser
Assert.IsTrue (field.IsConst);
Assert.IsNull (field.ConstantValue);
}
+
+ [Test, Ignore("mcs bug #12204")]
+ public void AssemblyAndModuleAttributesDoNotAppearOnTypes()
+ {
+ var parser = new CSharpParser();
+ var cu = parser.Parse("[assembly: My1][module: My2][My3]class C {} public class My1Attribute : System.Attribute {} public class My2Attribute : System.Attribute {} public class My3Attribute : System.Attribute {}", "File.cs");
+
+ var ts = cu.ToTypeSystem();
+ var compilation = new CSharpProjectContent()
+ .AddOrUpdateFiles(ts)
+ .AddAssemblyReferences(new[] { CecilLoaderTests.Mscorlib })
+ .CreateCompilation();
+ var type = ReflectionHelper.ParseReflectionName("C").Resolve(compilation).GetDefinition();
+ Assert.That(type.Attributes.Select(a => a.AttributeType.FullName).ToList(), Is.EqualTo(new[] { "My3Attribute" }));
+ }
+
}
[TestFixture]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/QueryExpressionExpanderTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/QueryExpressionExpanderTests.cs
index 031135a..6ddadda 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/QueryExpressionExpanderTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/QueryExpressionExpanderTests.cs
@@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp {
}
private void AssertCorrect(AstNode actual, string expected) {
- Assert.That(Regex.Replace(actual.GetText(), @"\s+", "").Replace("<>", ""), Is.EqualTo(Regex.Replace(expected, @"\s+", "")));
+ Assert.That(Regex.Replace(actual.ToString(), @"\s+", "").Replace("<>", ""), Is.EqualTo(Regex.Replace(expected, @"\s+", "")));
}
private void AssertLookupCorrect<T, U>(IEnumerable<KeyValuePair<T, U>> actual, IList<Tuple<TextLocation, AstNode>> expected) where T : AstNode where U : AstNode {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/LambdaHelperTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/LambdaHelperTests.cs
new file mode 100644
index 0000000..737527a
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/LambdaHelperTests.cs
@@ -0,0 +1,65 @@
+//
+// LambdaHelperTests.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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 NUnit.Framework;
+using System;
+using System.Linq;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.NRefactory.CSharp.CodeActions;
+using ICSharpCode.NRefactory.CSharp;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [TestFixture]
+ public class LambdaHelperTests
+ {
+ RefactoringContext MakeContext(string input, bool expectErrors = false)
+ {
+ var context = TestRefactoringContext.Create(input, expectErrors);
+ return context;
+ }
+
+ [Test]
+ public void TestExtensionMethod()
+ {
+ string input = @"
+using System.Linq;
+class Test
+{
+ void Method() {
+ System.Linq.Enumerable.Empty<int> ().Where(<-i => i > 0->);
+ }
+}
+";
+
+ var context = MakeContext(input);
+ var lambda = context.GetSelectedNodes().OfType<LambdaExpression>().First();
+ var type = LambdaHelper.GetLambdaReturnType(context, lambda);
+
+ Assert.AreEqual("System.Boolean", type.ReflectionName);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/RefactoringStructureTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/RefactoringStructureTests.cs
new file mode 100644
index 0000000..9d9df79
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Refactoring/RefactoringStructureTests.cs
@@ -0,0 +1,51 @@
+// Copyright (c) 2010-2013 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.Reflection;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.CSharp.Refactoring
+{
+ [TestFixture]
+ public class RefactoringStructureTests
+ {
+ [Test]
+ public void GatherVisitorBaseClass()
+ {
+ Assembly NR_CSharp = typeof(ICodeIssueProvider).Assembly;
+ bool foundGatherVisitor = false;
+ foreach (var topLevelType in NR_CSharp.GetTypes()) {
+ foreach (var nestedType in topLevelType.GetNestedTypes(BindingFlags.NonPublic | BindingFlags.Public)) {
+ if (nestedType.Name != "GatherVisitor")
+ continue;
+ foundGatherVisitor = true;
+ bool foundGatherVisitorBase = false;
+ for (Type baseType = nestedType.BaseType; baseType != null; baseType = baseType.BaseType) {
+ if (baseType.Name == "GatherVisitorBase`1") {
+ foundGatherVisitorBase = true;
+ Assert.AreEqual(new[] { topLevelType }, baseType.GetGenericArguments(), "Invalid base type of " + nestedType.FullName);
+ }
+ }
+ Assert.IsTrue(foundGatherVisitorBase, nestedType.FullName + " should derive from GatherVisitorBase");
+ }
+ }
+ Assert.IsTrue(foundGatherVisitor, "where are the gather visitors?");
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/AnonymousTypeTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/AnonymousTypeTests.cs
index bd79837..978404e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/AnonymousTypeTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/AnonymousTypeTests.cs
@@ -58,7 +58,7 @@ class Test {
var rr = Resolve<MemberResolveResult>(program);
Assert.AreEqual(TypeKind.Anonymous, rr.Member.DeclaringType.Kind);
Assert.AreEqual("Item1", rr.Member.Name);
- Assert.AreEqual(EntityType.Property, rr.Member.EntityType);
+ Assert.AreEqual(SymbolKind.Property, rr.Member.SymbolKind);
Assert.AreEqual("System.String", rr.Member.ReturnType.FullName);
}
@@ -68,7 +68,7 @@ class Test {
string program = programStart + "var q = list1.Zip(list2, (a,b) => $new { a, b }$);" + programEnd;
var rr = Resolve<InvocationResolveResult>(program);
Assert.AreEqual(TypeKind.Anonymous, rr.Type.Kind);
- Assert.AreEqual(EntityType.Constructor, rr.Member.EntityType);
+ Assert.AreEqual(SymbolKind.Constructor, rr.Member.SymbolKind);
Assert.AreEqual(rr.Type, rr.Member.DeclaringType);
Assert.AreEqual(0, rr.Arguments.Count);
Assert.AreEqual(2, rr.InitializerStatements.Count);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/BinaryOperatorTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/BinaryOperatorTests.cs
index 0b73198..63a7316 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/BinaryOperatorTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/BinaryOperatorTests.cs
@@ -511,6 +511,22 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
}
[Test]
+ public void ByteEnumSubtraction()
+ {
+ string program = @"enum E : byte {
+ A = 1,
+ B = 2
+}
+class Test {
+ const int $j = E.A - E.B$;
+}
+";
+ // result is 255 in C# 2.0 and later (was -1 in C# 1.x)
+ var rr = Resolve<MemberResolveResult>(program);
+ Assert.AreEqual(255, rr.ConstantValue);
+ }
+
+ [Test]
public void UserDefinedNeedsLiftingDueToImplicitConversion()
{
string program = @"struct S {}
@@ -686,7 +702,7 @@ class Test {
Assert.IsFalse(irr.IsError);
Assert.IsTrue(irr.IsLiftedOperator);
}
-
+
[Test]
public void IsLiftedProperty2()
{
@@ -701,5 +717,33 @@ class Test {
Assert.IsFalse(irr.IsError);
Assert.IsTrue(irr.IsLiftedOperator);
}
+
+ [Ignore("Resolver bug. Fixme!")]
+ [Test]
+ public void TestLiftedOperatorBug()
+ {
+ string program = @"
+using System;
+
+struct C<T>
+{
+ public static C<T> operator+(C<T> u, C<T> u2)
+ {
+ return u;
+ }
+
+ public C ()
+ {
+ int? foo = 4;
+ var a = $new C<int> () + foo$;
+ }
+}";
+ var irr = Resolve<OperatorResolveResult>(program);
+ Assert.IsFalse(irr.IsError);
+ Assert.IsTrue(irr.IsLiftedOperator);
+ }
+
+
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs
index 791405c..826711e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs
@@ -257,9 +257,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void UnconstrainedTypeParameter()
{
- ITypeParameter t = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T");
- ITypeParameter t2 = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 1, "T2");
- ITypeParameter tm = new DefaultTypeParameter(compilation, EntityType.Method, 0, "TM");
+ ITypeParameter t = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T");
+ ITypeParameter t2 = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 1, "T2");
+ ITypeParameter tm = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "TM");
Assert.AreEqual(C.None, conversions.ImplicitConversion(SpecialType.NullType, t));
Assert.AreEqual(C.BoxingConversion, conversions.ImplicitConversion(t, compilation.FindType(KnownTypeCode.Object)));
@@ -276,7 +276,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void TypeParameterWithReferenceTypeConstraint()
{
- ITypeParameter t = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T", hasReferenceTypeConstraint: true);
+ ITypeParameter t = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T", hasReferenceTypeConstraint: true);
Assert.AreEqual(C.NullLiteralConversion, conversions.ImplicitConversion(SpecialType.NullType, t));
Assert.AreEqual(C.ImplicitReferenceConversion, conversions.ImplicitConversion(t, compilation.FindType(KnownTypeCode.Object)));
@@ -287,7 +287,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void TypeParameterWithValueTypeConstraint()
{
- ITypeParameter t = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T", hasValueTypeConstraint: true);
+ ITypeParameter t = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T", hasValueTypeConstraint: true);
Assert.AreEqual(C.None, conversions.ImplicitConversion(SpecialType.NullType, t));
Assert.AreEqual(C.BoxingConversion, conversions.ImplicitConversion(t, compilation.FindType(KnownTypeCode.Object)));
@@ -298,7 +298,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void TypeParameterWithClassConstraint()
{
- ITypeParameter t = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T",
+ ITypeParameter t = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T",
constraints: new[] { compilation.FindType(typeof(StringComparer)) });
Assert.AreEqual(C.NullLiteralConversion,
@@ -320,7 +320,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void TypeParameterWithInterfaceConstraint()
{
- ITypeParameter t = new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T",
+ ITypeParameter t = new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T",
constraints: new [] { compilation.FindType(typeof(IList)) });
Assert.AreEqual(C.None, conversions.ImplicitConversion(SpecialType.NullType, t));
@@ -500,13 +500,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
var b = new DefaultUnresolvedTypeDefinition(string.Empty, "B");
// interface A<in U>
a.Kind = TypeKind.Interface;
- a.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "U") { Variance = VarianceModifier.Contravariant });
+ a.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "U") { Variance = VarianceModifier.Contravariant });
// interface B<X> : A<A<B<X>>> { }
- b.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "X"));
+ b.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "X"));
b.BaseTypes.Add(new ParameterizedTypeReference(
a, new[] { new ParameterizedTypeReference(
a, new [] { new ParameterizedTypeReference(
- b, new [] { new TypeParameterReference(EntityType.TypeDefinition, 0) }
+ b, new [] { new TypeParameterReference(SymbolKind.TypeDefinition, 0) }
) } ) }));
ICompilation compilation = TypeSystemHelper.CreateCompilation(a, b);
@@ -615,6 +615,25 @@ class Test {
var c = GetConversion(program);
Assert.IsTrue(c.IsValid);
Assert.IsTrue(c.IsMethodGroupConversion);
+ Assert.IsFalse(c.DelegateCapturesFirstArgument);
+ Assert.IsNotNull(c.Method);
+ }
+
+ [Test]
+ public void MethodGroupConversion_Void_InstanceMethod()
+ {
+ string program = @"using System;
+delegate void D();
+class Test {
+ D d;
+ public void M() {
+ d = $M$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ Assert.IsTrue(c.IsMethodGroupConversion);
+ Assert.IsTrue(c.DelegateCapturesFirstArgument);
Assert.IsNotNull(c.Method);
}
@@ -833,6 +852,125 @@ class Test {
}
[Test]
+ public void MethodGroupConversion_ExtensionMethod()
+ {
+ string program = @"using System;
+static class Ext {
+ public static void M(this string s, int x) {}
+}
+class Test {
+ delegate void D(int a);
+ void F() {
+ string s = """";
+ D d = $s.M$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ Assert.IsTrue(c.IsMethodGroupConversion);
+ Assert.IsTrue(c.DelegateCapturesFirstArgument);
+ }
+
+ [Test]
+ public void MethodGroupConversion_ExtensionMethodUsedAsStaticMethod()
+ {
+ string program = @"using System;
+static class Ext {
+ public static void M(this string s, int x) {}
+}
+class Test {
+ delegate void D(string s, int a);
+ void F() {
+ D d = $Ext.M$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ Assert.IsTrue(c.IsMethodGroupConversion);
+ Assert.IsFalse(c.DelegateCapturesFirstArgument);
+ }
+
+ [Test]
+ public void MethodGroupConversion_ObjectToDynamic() {
+ string program = @"using System;
+class Test {
+ public void F(object o) {}
+ public void M() {
+ Action<dynamic> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void MethodGroupConversion_ObjectToDynamicGenericArgument() {
+ string program = @"using System;
+using System.Collections.Generic;
+class Test {
+ public void F(List<object> l) {}
+ public void M() {
+ Action<List<dynamic>> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void MethodGroupConversion_ObjectToDynamicReturnValue() {
+ string program = @"using System;
+class Test {
+ public object F() {}
+ public void M() {
+ Func<dynamic> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void MethodGroupConversion_DynamicToObject() {
+ string program = @"using System;
+class Test {
+ public void F(dynamic o) {}
+ public void M() {
+ Action<object> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void MethodGroupConversion_DynamicToObjectGenericArgument() {
+ string program = @"using System;
+using System.Collections.Generic;
+class Test {
+ public void F(List<dynamic> l) {}
+ public void M() {
+ Action<List<object>> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void MethodGroupConversion_DynamicToObjectReturnValue() {
+ string program = @"using System;
+class Test {
+ public dynamic F() {}
+ public void M() {
+ Func<object> x = $F$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
public void UserDefined_IntLiteral_ViaUInt_ToCustomStruct()
{
string program = @"using System;
@@ -1290,5 +1428,28 @@ class Test {
Assert.IsTrue(c.ConversionAfterUserDefinedOperator.IsNumericConversion);
Assert.IsTrue(c.ConversionAfterUserDefinedOperator.IsValid);
}
+
+ [Test]
+ public void UserDefinedImplicitConversion_IsImplicit()
+ {
+ // Bug icsharpcode/NRefactory#183: conversions from constant expressions were incorrectly marked as explicit
+ string program = @"using System;
+ class Test {
+ void Hello(JsNumber3 x) {
+ Hello($7$);
+ }
+ }
+ public class JsNumber3 {
+ public static implicit operator JsNumber3(int d) {
+ return null;
+ }
+ }";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ Assert.IsTrue(c.IsImplicit);
+ Assert.IsFalse(c.IsExplicit);
+ Assert.AreEqual(Conversion.IdentityConversion, c.ConversionBeforeUserDefinedOperator);
+ Assert.AreEqual(Conversion.IdentityConversion, c.ConversionAfterUserDefinedOperator);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/FindReferencesTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/FindReferencesTest.cs
index d01c488..033acf7 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/FindReferencesTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/FindReferencesTest.cs
@@ -24,6 +24,9 @@ using System.Threading;
using ICSharpCode.NRefactory.CSharp.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
using NUnit.Framework;
+using ICSharpCode.NRefactory.Analysis;
+using System.Text;
+using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.NRefactory.CSharp.Resolver
{
@@ -383,5 +386,102 @@ namespace Foo
Assert.IsTrue(actual.Any(r => r.StartLocation.Line == 12 && r is SimpleType));
}
#endregion
+
+ #region Rename
+
+ internal static ISymbol GetSymbol (ICompilation compilation, string reflectionName)
+ {
+ Stack<ITypeDefinition> typeStack = new Stack<ITypeDefinition>(compilation.MainAssembly.TopLevelTypeDefinitions);
+ while (typeStack.Count > 0) {
+ var cur = typeStack.Pop();
+ if (cur.ReflectionName == reflectionName)
+ return cur;
+ foreach (var member in cur.Members)
+ if (member.ReflectionName == reflectionName)
+ return member;
+ foreach (var nested in cur.NestedTypes) {
+ typeStack.Push(nested);
+ }
+ }
+ return null;
+ }
+
+ IList<AstNode> Rename(string fullyQualifiedName, string newName, bool includeOverloads)
+ {
+ var sym = GetSymbol(compilation, fullyQualifiedName);
+ Assert.NotNull(sym);
+ var graph = new TypeGraph(compilation.Assemblies);
+ var col = new SymbolCollector();
+ col.IncludeOverloads = includeOverloads;
+ col.GroupForRenaming = true;
+ var scopes = findReferences.GetSearchScopes(col.GetRelatedSymbols(graph, sym));
+ List<AstNode> result = new List<AstNode>();
+
+ findReferences.RenameReferencesInFile(
+ scopes,
+ newName,
+ new CSharpAstResolver(compilation, syntaxTree, unresolvedFile),
+ delegate(RenameCallbackArguments obj) {
+ result.Add (obj.NodeToReplace);
+ },
+ delegate(Error obj) {
+
+ });
+ return result;
+ }
+
+ void TestRename(string code, string symbolName)
+ {
+ StringBuilder sb = new StringBuilder();
+ List<int> offsets = new List<int>();
+ foreach (var ch in code) {
+ if (ch == '$') {
+ offsets.Add(sb.Length);
+ continue;
+ }
+ sb.Append(ch);
+ }
+ Init(sb.ToString ());
+ findReferences.WholeVirtualSlot = true;
+ var doc = new ReadOnlyDocument(sb.ToString ());
+ var result = Rename(symbolName, "x", false);
+ Assert.AreEqual(offsets.Count, result.Count);
+
+ result.Select(r => doc.GetOffset (r.StartLocation)).SequenceEqual(offsets);
+ }
+
+ [Test]
+ public void TestSimpleRename ()
+ {
+ TestRename (@"using System;
+class $Test {
+ $Test test;
+}", "Test");
+ }
+
+
+ [Test]
+ public void TestOverride ()
+ {
+ TestRename(@"using System;
+class Test {
+ public virtual int $Foo { get; set; }
+}
+
+class Test2 : Test {
+ public override int $Foo { get; set; }
+}
+
+class Test3 : Test {
+ public override int $Foo { get; set; }
+ public FindReferencesTest ()
+ {
+ $Foo = 4;
+ }
+}
+", "Test.Foo");
+ }
+
+ #endregion
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs
index bc327ef..97c7f73 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs
@@ -680,6 +680,8 @@ class Test {
var rr = Resolve<LambdaResolveResult>(program);
Assert.IsInstanceOf<ConversionResolveResult>(rr.Body);
Assert.That(((ConversionResolveResult)rr.Body).Conversion.IsNullLiteralConversion);
+ Assert.AreEqual("System.String", rr.ReturnType.ReflectionName);
+ Assert.AreEqual("System.String", rr.Body.Type.ReflectionName);
}
[Test]
@@ -693,6 +695,8 @@ class Test {
var rr = Resolve<LambdaResolveResult>(program);
Assert.IsInstanceOf<ConversionResolveResult>(rr.Body);
Assert.That(((ConversionResolveResult)rr.Body).Conversion.IsNullLiteralConversion);
+ Assert.AreEqual("System.String", rr.ReturnType.ReflectionName);
+ Assert.AreEqual("System.String", rr.Body.Type.ReflectionName);
}
[Test]
@@ -705,6 +709,8 @@ class Test {
}";
var rr = Resolve<LambdaResolveResult>(program);
Assert.IsInstanceOf<OperatorResolveResult>(rr.Body);
+ Assert.AreEqual("System.Void", rr.ReturnType.ReflectionName);
+ Assert.AreEqual("System.Int32", rr.Body.Type.ReflectionName);
}
[Test]
@@ -717,6 +723,8 @@ class Test {
}";
var rr = Resolve<LambdaResolveResult>(program);
Assert.IsInstanceOf<OperatorResolveResult>(rr.Body);
+ Assert.AreEqual("System.Void", rr.ReturnType.ReflectionName);
+ Assert.AreEqual("System.Int32", rr.Body.Type.ReflectionName);
}
[Test]
@@ -833,5 +841,55 @@ class Test {
Assert.IsTrue(c.IsValid);
Assert.IsTrue(c.IsAnonymousFunctionConversion);
}
+
+ [Test]
+ public void AnonymousMethodConversionObjectToDynamic() {
+ string program = @"using System;
+class Test {
+ public void M() {
+ Action<dynamic> x = $delegate(object z) { z = null; }$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void AnonymousMethodConversionObjectToDynamicGenericArgument() {
+ string program = @"using System;
+using System.Collections.Generic;
+class Test {
+ public void M() {
+ Action<List<dynamic>> x = $delegate(List<object> z) { z = null; }$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void AnonymousMethodConversionDynamicToObject() {
+ string program = @"using System;
+class Test {
+ public void M() {
+ Action<object> x = $delegate(dynamic z) { z = null; }$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
+
+ [Test]
+ public void AnonymousMethodConversionDynamicToObjectGenericArgument() {
+ string program = @"using System;
+using System.Collections.Generic;
+class Test {
+ public void M() {
+ Action<List<object>> x = $delegate(List<dynamic> z) { z = null; }$;
+ }
+}";
+ var c = GetConversion(program);
+ Assert.IsTrue(c.IsValid);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/MemberLookupTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/MemberLookupTests.cs
index d9a1282..add8c32 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/MemberLookupTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/MemberLookupTests.cs
@@ -163,7 +163,7 @@ class Derived : Base {
Assert.AreEqual("Test.Field", rr.Member.FullName);
Assert.IsTrue(rr.TargetResult is TypeResolveResult);
}
-
+
[Test]
public void InstanceMethodImplicitThis()
{
@@ -563,5 +563,37 @@ public class G<U, V> : IA<$G<V, string>$>
Assert.AreEqual("System.String", baseType.TypeArguments [0].FullName);
Assert.AreEqual("System.String", baseType.TypeArguments [1].FullName);
}
+
+ [Test]
+ public void FixedFieldTest()
+ {
+ string program = @"unsafe struct Test {
+ fixed int Field[8];
+ int M() { return $Field$; }
+}";
+ var rr = Resolve<MemberResolveResult>(program);
+ Assert.AreEqual("Test.Field", rr.Member.FullName);
+ }
+
+ [Test]
+ public void FixedFieldDeclarationTest()
+ {
+ string program = @"unsafe struct Test {
+ fixed int $Field[8]$;
+}";
+ var rr = Resolve<MemberResolveResult>(program);
+ Assert.AreEqual("Test.Field", rr.Member.FullName);
+ }
+
+
+ [Test]
+ public void FixedFieldDeclarationTestCase2()
+ {
+ string program = @"unsafe struct Test {
+ fixed int foo[12], $Field[8]$;
+}";
+ var rr = Resolve<MemberResolveResult>(program);
+ Assert.AreEqual("Test.Field", rr.Member.FullName);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs
index 4429df0..e6b43b6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs
@@ -177,28 +177,28 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// static void Foo<T>(T? ignored = default(T?)) where T : struct
var m1 = MakeUnresolvedMethod();
- m1.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.Method, 0, "T") { HasValueTypeConstraint = true });
+ m1.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.Method, 0, "T") { HasValueTypeConstraint = true });
m1.Parameters.Add(MakeOptionalParameter(
- NullableType.Create(new TypeParameterReference(EntityType.Method, 0)),
+ NullableType.Create(new TypeParameterReference(SymbolKind.Method, 0)),
"ignored"
));
// class ClassConstraint<T> where T : class {}
var classConstraint = new DefaultUnresolvedTypeDefinition(string.Empty, "ClassConstraint");
- classConstraint.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
+ classConstraint.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
// static void Foo<T>(ClassConstraint<T> ignored = default(ClassConstraint<T>))
// where T : class
var m2 = MakeUnresolvedMethod();
- m2.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.Method, 0, "T") { HasReferenceTypeConstraint = true });
+ m2.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.Method, 0, "T") { HasReferenceTypeConstraint = true });
m2.Parameters.Add(MakeOptionalParameter(
- new ParameterizedTypeReference(classConstraint, new[] { new TypeParameterReference(EntityType.Method, 0) }),
+ new ParameterizedTypeReference(classConstraint, new[] { new TypeParameterReference(SymbolKind.Method, 0) }),
"ignored"
));
// static void Foo<T>()
var m3 = MakeUnresolvedMethod();
- m3.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.Method, 0, "T"));
+ m3.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.Method, 0, "T"));
ICompilation compilation = TypeSystemHelper.CreateCompilation(classConstraint);
var context = new SimpleTypeResolveContext(compilation.MainAssembly);
@@ -269,6 +269,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
get { throw new NotImplementedException(); }
}
+ public override IType ReturnType {
+ get { throw new NotImplementedException(); }
+ }
+
public override IType GetInferredReturnType(IType[] parameterTypes)
{
return inferredReturnType;
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ResolveAtLocationTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ResolveAtLocationTests.cs
index 5bf6a72..31d0313 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ResolveAtLocationTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ResolveAtLocationTests.cs
@@ -130,7 +130,7 @@ class A { public A() : ba$se() {} }");
var rr = ResolveAtLocation<CSharpInvocationResolveResult>(
"using System.Collections.Generic;" +
"public class A { int M(List<int> a) { return a$[1]; } }");
- Assert.AreEqual(EntityType.Indexer, rr.Member.EntityType);
+ Assert.AreEqual(SymbolKind.Indexer, rr.Member.SymbolKind);
}
[Test]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs
index 4d120f9..a2a9a79 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs
@@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void ArrayToEnumerable()
{
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
IType stringType = compilation.FindType(KnownTypeCode.String);
ITypeDefinition enumerableType = compilation.FindType(KnownTypeCode.IEnumerableOfT).GetDefinition();
@@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void ArrayToReadOnlyList()
{
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
IType stringType = compilation.FindType(KnownTypeCode.String);
ITypeDefinition readOnlyListType = compilation.FindType(KnownTypeCode.IReadOnlyListOfT).GetDefinition();
if (readOnlyListType == null)
@@ -91,7 +91,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void EnumerableToArrayInContravariantType()
{
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
IType stringType = compilation.FindType(KnownTypeCode.String);
ITypeDefinition enumerableType = compilation.FindType(typeof(IEnumerable<>)).GetDefinition();
ITypeDefinition comparerType = compilation.FindType(typeof(IComparer<>)).GetDefinition();
@@ -113,7 +113,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public void InferFromObjectAndFromNullLiteral()
{
// M<T>(T a, T b);
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
// M(new object(), null);
bool success;
@@ -129,7 +129,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void ArrayToListWithArrayCovariance()
{
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
IType objectType = compilation.FindType(KnownTypeCode.Object);
IType stringType = compilation.FindType(KnownTypeCode.String);
ITypeDefinition listType = compilation.FindType(KnownTypeCode.IListOfT).GetDefinition();
@@ -151,7 +151,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void IEnumerableCovarianceWithDynamic()
{
- ITypeParameter tp = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ ITypeParameter tp = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
var ienumerableOfT = new ParameterizedType(compilation.FindType(typeof(IEnumerable<>)).GetDefinition(), new[] { tp });
var ienumerableOfString = compilation.FindType(typeof(IEnumerable<string>));
var ienumerableOfDynamic = compilation.FindType(typeof(IEnumerable<ReflectionHelper.Dynamic>));
@@ -179,8 +179,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
// static void M<A, B>(Func<A, B> f) {}
// M(int.Parse); // type inference fails
- var A = new DefaultTypeParameter(compilation, EntityType.Method, 0, "A");
- var B = new DefaultTypeParameter(compilation, EntityType.Method, 1, "B");
+ var A = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "A");
+ var B = new DefaultTypeParameter(compilation, SymbolKind.Method, 1, "B");
IType declType = compilation.FindType(typeof(int));
var methods = new MethodListWithDeclaringType(declType, declType.GetMethods(m => m.Name == "Parse"));
@@ -199,7 +199,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// static void M<T>(Func<T> f) {}
// M(Console.ReadKey); // type inference produces ConsoleKeyInfo
- var T = new DefaultTypeParameter(compilation, EntityType.Method, 0, "T");
+ var T = new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "T");
IType declType = compilation.FindType(typeof(Console));
var methods = new MethodListWithDeclaringType(declType, declType.GetMethods(m => m.Name == "ReadKey"));
@@ -264,6 +264,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
get { throw new NotImplementedException(); }
}
+ public override IType ReturnType {
+ get { throw new NotImplementedException(); }
+ }
+
public override IType GetInferredReturnType(IType[] parameterTypes)
{
Assert.AreEqual(expectedParameterTypes, parameterTypes, "Parameters types passed to " + this);
@@ -281,9 +285,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public void TestLambdaInference()
{
ITypeParameter[] typeParameters = {
- new DefaultTypeParameter(compilation, EntityType.Method, 0, "X"),
- new DefaultTypeParameter(compilation, EntityType.Method, 1, "Y"),
- new DefaultTypeParameter(compilation, EntityType.Method, 2, "Z")
+ new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "X"),
+ new DefaultTypeParameter(compilation, SymbolKind.Method, 1, "Y"),
+ new DefaultTypeParameter(compilation, SymbolKind.Method, 2, "Z")
};
IType[] parameterTypes = {
typeParameters[0],
@@ -311,8 +315,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
[Test]
public void ConvertAllLambdaInference()
{
- ITypeParameter[] classTypeParameters = { new DefaultTypeParameter(compilation, EntityType.TypeDefinition, 0, "T") };
- ITypeParameter[] methodTypeParameters = { new DefaultTypeParameter(compilation, EntityType.Method, 0, "R") };
+ ITypeParameter[] classTypeParameters = { new DefaultTypeParameter(compilation, SymbolKind.TypeDefinition, 0, "T") };
+ ITypeParameter[] methodTypeParameters = { new DefaultTypeParameter(compilation, SymbolKind.Method, 0, "R") };
IType[] parameterTypes = {
new ParameterizedType(compilation.FindType(typeof(Converter<,>)).GetDefinition(),
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/CSharpCrefParserTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/CSharpCrefParserTests.cs
index 9fc6da8..52cb01d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/CSharpCrefParserTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/CSharpCrefParserTests.cs
@@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"this",
new DocumentationReference {
- EntityType = EntityType.Indexer
+ SymbolKind = SymbolKind.Indexer
});
}
@@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"this[int]",
new DocumentationReference {
- EntityType = EntityType.Indexer,
+ SymbolKind = SymbolKind.Indexer,
HasParameterList = true,
Parameters = { new ParameterDeclaration { Type = new PrimitiveType("int") } }
});
@@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"List{T}.this",
new DocumentationReference {
- EntityType = EntityType.Indexer,
+ SymbolKind = SymbolKind.Indexer,
DeclaringType = new SimpleType("List", new SimpleType("T"))
});
}
@@ -101,7 +101,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"int",
new DocumentationReference {
- EntityType = EntityType.TypeDefinition,
+ SymbolKind = SymbolKind.TypeDefinition,
DeclaringType = new PrimitiveType("int")
});
}
@@ -211,7 +211,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"operator +",
new DocumentationReference {
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Addition
});
}
@@ -224,7 +224,7 @@ namespace ICSharpCode.NRefactory.Documentation
"Test.operator +",
new DocumentationReference {
DeclaringType = new SimpleType("Test"),
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Addition
});
}
@@ -235,7 +235,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"operator +(Test, int)",
new DocumentationReference {
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Addition,
HasParameterList = true,
Parameters = {
@@ -250,7 +250,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"implicit operator int",
new DocumentationReference {
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Implicit,
ConversionOperatorReturnType = new PrimitiveType("int")
});
@@ -262,7 +262,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"explicit operator int(Test)",
new DocumentationReference {
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Explicit,
ConversionOperatorReturnType = new PrimitiveType("int"),
HasParameterList = true,
@@ -279,7 +279,7 @@ namespace ICSharpCode.NRefactory.Documentation
ParseUtilCSharp.AssertDocumentationReference(
"Test.explicit operator int(Test)",
new DocumentationReference {
- EntityType = EntityType.Operator,
+ SymbolKind = SymbolKind.Operator,
OperatorType = OperatorType.Explicit,
DeclaringType = new SimpleType("Test"),
ConversionOperatorReturnType = new PrimitiveType("int"),
@@ -289,5 +289,19 @@ namespace ICSharpCode.NRefactory.Documentation
}
});
}
+
+ [Test]
+ public void TestParseTypeName()
+ {
+ var result = IdStringProvider.ParseTypeName("T:System.Collections.Generic.List{T}");
+ Assert.IsNotNull(result);
+ var pc = new CSharpProjectContent().AddAssemblyReferences(new[] { CecilLoaderTests.Mscorlib });
+
+ var type = result.Resolve(pc.CreateCompilation());
+
+ Assert.AreEqual("System.Collections.Generic.List", type.FullName);
+ Assert.AreEqual(1, type.TypeParameterCount);
+ }
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/IDStringTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/IDStringTests.cs
index 1c74df7..1f71780 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/IDStringTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/Documentation/IDStringTests.cs
@@ -160,7 +160,7 @@ namespace Acme
}";
Init(program);
ITypeDefinition widget = GetTypeDefinition("Acme", "Widget");
- Assert.AreEqual("M:Acme.Widget.Finalize", widget.Methods.Single(m => m.EntityType == EntityType.Destructor).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.Finalize", widget.Methods.Single(m => m.SymbolKind == SymbolKind.Destructor).Documentation.ToString());
}
[Test]
@@ -200,7 +200,7 @@ namespace Acme
}";
Init(program);
ITypeDefinition widget = GetTypeDefinition("Acme", "Widget");
- Assert.AreEqual("M:Acme.Widget.NestedClass.M(System.Int32)", widget.NestedTypes.Single().Methods.Single(m => m.EntityType == EntityType.Method).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.NestedClass.M(System.Int32)", widget.NestedTypes.Single().Methods.Single(m => m.SymbolKind == SymbolKind.Method).Documentation.ToString());
Assert.AreEqual("M:Acme.Widget.M0", widget.Methods.Single(m => m.Name == "M0").Documentation.ToString());
Assert.AreEqual("M:Acme.Widget.M1(System.Char,System.Single@,Acme.ValueType@)",
widget.Methods.Single(m => m.Name == "M1").Documentation.ToString());
@@ -230,7 +230,7 @@ namespace Acme
Init("class A<X> { class B<Y> { void M(A<Y>.B<X> a) { } } }");
ITypeDefinition b = GetTypeDefinition("", "A", 1).NestedTypes.Single();
Assert.AreEqual("T:A`1.B`1", b.Documentation.ToString());
- Assert.AreEqual("M:A`1.B`1.M(A{`1}.B{`0})", b.Methods.Single(m => m.EntityType == EntityType.Method).Documentation.ToString());
+ Assert.AreEqual("M:A`1.B`1.M(A{`1}.B{`0})", b.Methods.Single(m => m.SymbolKind == SymbolKind.Method).Documentation.ToString());
}
[Test]
@@ -286,7 +286,7 @@ namespace Acme
}";
Init(program);
ITypeDefinition widget = GetTypeDefinition("Acme", "Widget");
- Assert.AreEqual("M:Acme.Widget.op_UnaryPlus(Acme.Widget)", widget.Methods.Single(m => m.EntityType == EntityType.Operator).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.op_UnaryPlus(Acme.Widget)", widget.Methods.Single(m => m.SymbolKind == SymbolKind.Operator).Documentation.ToString());
}
[Test]
@@ -302,7 +302,7 @@ namespace Acme
}";
Init(program);
ITypeDefinition widget = GetTypeDefinition("Acme", "Widget");
- Assert.AreEqual("M:Acme.Widget.op_Addition(Acme.Widget,Acme.Widget)", widget.Methods.Single(m => m.EntityType == EntityType.Operator).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.op_Addition(Acme.Widget,Acme.Widget)", widget.Methods.Single(m => m.SymbolKind == SymbolKind.Operator).Documentation.ToString());
}
[Test]
@@ -319,8 +319,8 @@ namespace Acme
}";
Init(program);
ITypeDefinition widget = GetTypeDefinition("Acme", "Widget");
- Assert.AreEqual("M:Acme.Widget.op_Explicit(Acme.Widget)~System.Int32", widget.Methods.First(m => m.EntityType == EntityType.Operator).Documentation.ToString());
- Assert.AreEqual("M:Acme.Widget.op_Implicit(Acme.Widget)~System.Int64", widget.Methods.Last(m => m.EntityType == EntityType.Operator).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.op_Explicit(Acme.Widget)~System.Int32", widget.Methods.First(m => m.SymbolKind == SymbolKind.Operator).Documentation.ToString());
+ Assert.AreEqual("M:Acme.Widget.op_Implicit(Acme.Widget)~System.Int64", widget.Methods.Last(m => m.SymbolKind == SymbolKind.Operator).Documentation.ToString());
}
[Test]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestExpressionFormatting.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestExpressionFormatting.cs
index c6a9b12..bb17e98 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestExpressionFormatting.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestExpressionFormatting.cs
@@ -134,6 +134,27 @@ class Test
}
}");
}
+
+ [Test]
+ public void TestMemberReferenceFormatting ()
+ {
+ var policy = FormattingOptionsFactory.CreateMono ();
+ Test (policy, @"
+class Test
+{
+ void Init ()
+ {
+ System. Console .WriteLine ();
+ }
+}", @"
+class Test
+{
+ void Init ()
+ {
+ System.Console.WriteLine ();
+ }
+}");
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs
index 5ff03ee..1689f20 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs
@@ -350,6 +350,32 @@ foo ();
}
}");
}
+
+
+ /// <summary>
+ /// Bug 12270 - Code formatter breaks new() constraints
+ /// </summary>
+ [Test]
+ public void TestBug12270()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+
+ Test(policy,
+@"class C
+{
+ public void Test<T> () where T : new ()
+ {
+ }
+}",
+@"class C
+{
+ public void Test<T> () where T : new()
+ {
+ }
+}");
+ }
+
+
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestGlobalLevelFormatting.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestGlobalLevelFormatting.cs
new file mode 100644
index 0000000..da8e92b
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestGlobalLevelFormatting.cs
@@ -0,0 +1,46 @@
+//
+// TestGlobalLevelFormatting.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.IO;
+using NUnit.Framework;
+using ICSharpCode.NRefactory.CSharp;
+
+namespace ICSharpCode.NRefactory.CSharp.FormattingTests
+{
+ [TestFixture]
+ public class TestGlobalLevelFormatting : TestBase
+ {
+ [Test]
+ public void TestGlobalAttributes ()
+ {
+ var policy = FormattingOptionsFactory.CreateMono ();
+ Test (policy,
+ @"[assembly: AssemblyDescription ("""" ) ]",
+ @"[assembly: AssemblyDescription ("""")]");
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs
index 2e13c0a..1bdd463 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs
@@ -24,14 +24,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
-using System.IO;
using NUnit.Framework;
using ICSharpCode.NRefactory.CSharp;
namespace ICSharpCode.NRefactory.CSharp.FormattingTests
{
- [TestFixture()]
+ [TestFixture]
public class TestSpacingVisitor : TestBase
{
[Test]
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs
index 2308278..17b965c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs
@@ -946,6 +946,37 @@ if (b) {
}");
}
+
+ [Test]
+ public void TestElseWithPreprocessorDirective()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ Test (policy, @"class Test
+{
+ void TestMethod ()
+ {
+ if (true) {
+ }
+ #if true
+ else
+ Console.WriteLine ();
+ #endif
+ }
+}",
+@"class Test
+{
+ void TestMethod ()
+ {
+ if (true) {
+ }
+ #if true
+ else
+ Console.WriteLine ();
+ #endif
+ }
+}");
+ }
+
[Test]
public void TestElseOnNewLine()
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs
index b7f953c..5325697 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs
@@ -23,7 +23,6 @@
// 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.IO;
using NUnit.Framework;
@@ -38,11 +37,22 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
public void TestUsingDeclarations()
{
CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
-
+
Test(policy, @" using Foo;", @"using Foo;");
}
[Test]
+ public void TestUsingDeclarationsWithHeader()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+
+ Test(policy, @"// THE SOFTWARE.
+
+using Foo ;", @"// THE SOFTWARE.
+using Foo;");
+ }
+
+ [Test]
public void TestUsingAliasDeclarations()
{
CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
@@ -51,70 +61,123 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
}
[Test]
- public void TestClassIndentation ()
+ public void TestPreProcessorIndenting()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.ClassBraceStyle = BraceStyle.DoNotChange;
-
- Test (policy,
-@" class Test {}",
-@"class Test {}");
+
+ Test(policy,
+ @"
+class Test {
+ #region FooBar
+ #endregion
+}",
+ @"
+class Test {
+ #region FooBar
+ #endregion
+}");
}
-
+
[Test]
- public void TestAttributeIndentation ()
+ public void TestTypeWithAttributeIndenging()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ policy.ClassBraceStyle = BraceStyle.DoNotChange;
+
+ Test(policy,
+ @"
+ [Attr]
+ class Test {
+}",
+ @"
+[Attr]
+class Test {
+}");
+ }
+
+ [Test]
+ public void TestClassIndentation()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ policy.ClassBraceStyle = BraceStyle.DoNotChange;
+
+ Test(policy,
+ @" class Test {}",
+ @"class Test {}");
+ }
+
+ [Test]
+ public void TestClassIndentationWithDocComment()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ policy.ClassBraceStyle = BraceStyle.DoNotChange;
+
+ Test(policy,
+ @"/// <summary>
+ /// olwcowcolwc
+ /// </summary>
+ class Test {}",
+ @"/// <summary>
+/// olwcowcolwc
+/// </summary>
+class Test {}");
+ }
+
+ [Test]
+ public void TestAttributeIndentation()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.ClassBraceStyle = BraceStyle.DoNotChange;
- Test (policy,
-@" [Attribute1]
+ Test(policy,
+ @" [Attribute1]
[Attribute2()]
class Test {}",
-@"[Attribute1]
+ @"[Attribute1]
[Attribute2()]
class Test {}");
}
-
+
[Test]
- public void TestClassIndentationInNamespaces ()
+ public void TestClassIndentationInNamespaces()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.NamespaceBraceStyle = BraceStyle.EndOfLine;
policy.ClassBraceStyle = BraceStyle.DoNotChange;
- Test (policy,
-@"namespace A { class Test {} }",
-@"namespace A {
+ Test(policy,
+ @"namespace A { class Test {} }",
+ @"namespace A {
class Test {}
}");
}
-
+
[Test]
- public void TestNoIndentationInNamespaces ()
+ public void TestNoIndentationInNamespaces()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.NamespaceBraceStyle = BraceStyle.EndOfLine;
policy.ClassBraceStyle = BraceStyle.DoNotChange;
policy.IndentNamespaceBody = false;
- Test (policy,
-@"namespace A { class Test {} }",
-@"namespace A {
+ Test(policy,
+ @"namespace A { class Test {} }",
+ @"namespace A {
class Test {}
}");
}
-
+
[Test]
- public void TestClassIndentationInNamespacesCase2 ()
+ public void TestClassIndentationInNamespacesCase2()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.NamespaceBraceStyle = BraceStyle.NextLine;
policy.ClassBraceStyle = BraceStyle.NextLine;
policy.ConstructorBraceStyle = BraceStyle.NextLine;
- Test (policy,
-@"using System;
+ Test(policy,
+ @"using System;
namespace MonoDevelop.CSharp.Formatting {
public class FormattingProfileService {
@@ -122,7 +185,7 @@ namespace MonoDevelop.CSharp.Formatting {
}
}
}",
-@"using System;
+ @"using System;
namespace MonoDevelop.CSharp.Formatting
{
@@ -134,14 +197,14 @@ namespace MonoDevelop.CSharp.Formatting
}
}");
}
-
+
[Test]
- public void TestIndentClassBody ()
+ public void TestIndentClassBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentClassBody = true;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test a;
}", @"class Test
@@ -150,25 +213,45 @@ namespace MonoDevelop.CSharp.Formatting
}");
policy.IndentClassBody = false;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test a;
}",
-@"class Test
+ @"class Test
{
Test a;
}");
}
-
+
[Test]
- public void TestIndentInterfaceBody ()
+ public void TestDocCommentIndenting()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ Test(policy,
+ @"class Test
+{
+ /// <summary>
+ /// Test
+ /// </summary>
+ Test a;
+}", @"class Test
+{
+ /// <summary>
+ /// Test
+ /// </summary>
+ Test a;
+}");
+ }
+
+ [Test]
+ public void TestIndentInterfaceBody()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentInterfaceBody = true;
- Test (policy,
-@"interface Test
+ Test(policy,
+ @"interface Test
{
Test Foo ();
}", @"interface Test
@@ -176,8 +259,8 @@ Test a;
Test Foo ();
}");
policy.IndentInterfaceBody = false;
- Test (policy,
-@"interface Test
+ Test(policy,
+ @"interface Test
{
Test Foo ();
}", @"interface Test
@@ -185,15 +268,15 @@ Test a;
Test Foo ();
}");
}
-
+
[Test]
- public void TestIndentStructBody ()
+ public void TestIndentStructBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentStructBody = true;
- Test (policy,
-@"struct Test
+ Test(policy,
+ @"struct Test
{
Test Foo ();
}", @"struct Test
@@ -201,8 +284,8 @@ Test Foo ();
Test Foo ();
}");
policy.IndentStructBody = false;
- Test (policy,
-@"struct Test
+ Test(policy,
+ @"struct Test
{
Test Foo ();
}", @"struct Test
@@ -210,15 +293,15 @@ Test Foo ();
Test Foo ();
}");
}
-
+
[Test]
- public void TestIndentEnumBody ()
+ public void TestIndentEnumBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentEnumBody = true;
- Test (policy,
-@"enum Test
+ Test(policy,
+ @"enum Test
{
A
}", @"enum Test
@@ -226,8 +309,8 @@ Test Foo ();
A
}");
policy.IndentEnumBody = false;
- Test (policy,
-@"enum Test
+ Test(policy,
+ @"enum Test
{
A
}", @"enum Test
@@ -235,15 +318,55 @@ Test Foo ();
A
}");
}
-
+
+ [Test]
+ public void TestIndentEnumBodyCase2()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ policy.IndentEnumBody = true;
+
+ Test(policy,
+ @"enum Test
+{
+ A ,
+ B,
+C
+}", @"enum Test
+{
+ A,
+ B,
+ C
+}");
+ }
+
+ [Test]
+ public void TestIndentEnumBodyCase3()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+ policy.IndentEnumBody = true;
+
+ Test(policy,
+ @"enum Test
+{
+ A = 3 + 5,
+ B=5 ,
+C=5 << 12
+}", @"enum Test
+{
+ A = 3 + 5,
+ B = 5,
+ C = 5 << 12
+}");
+ }
+
[Test]
- public void TestIndentMethodBody ()
+ public void TestIndentMethodBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentMethodBody = true;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test Foo ()
{
@@ -251,7 +374,7 @@ A
;
}
}",
-@"class Test
+ @"class Test
{
Test Foo ()
{
@@ -260,8 +383,8 @@ A
}
}");
policy.IndentMethodBody = false;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test Foo ()
{
@@ -269,7 +392,7 @@ A
;
}
}",
-@"class Test
+ @"class Test
{
Test Foo ()
{
@@ -278,15 +401,15 @@ A
}
}");
}
-
+
[Test]
- public void TestIndentMethodBodyOperatorCase ()
+ public void TestIndentMethodBodyOperatorCase()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentMethodBody = true;
- var adapter = Test (policy,
-@"class Test
+ var adapter = Test(policy,
+ @"class Test
{
static Test operator+(Test left, Test right)
{
@@ -294,7 +417,7 @@ A
;
}
}",
-@"class Test
+ @"class Test
{
static Test operator+ (Test left, Test right)
{
@@ -303,7 +426,7 @@ A
}
}");
policy.IndentMethodBody = false;
- Continue (policy, adapter, @"class Test
+ Continue(policy, adapter, @"class Test
{
static Test operator+ (Test left, Test right)
{
@@ -312,22 +435,22 @@ A
}
}");
}
-
+
[Test]
- public void TestIndentPropertyBody ()
+ public void TestIndentPropertyBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentPropertyBody = true;
- var adapter = Test (policy,
-@"class Test
+ var adapter = Test(policy,
+ @"class Test
{
Test TestMe {
get;
set;
}
}",
-@"class Test
+ @"class Test
{
Test TestMe {
get;
@@ -336,8 +459,8 @@ set;
}");
policy.IndentPropertyBody = false;
- Continue (policy, adapter,
-@"class Test
+ Continue(policy, adapter,
+ @"class Test
{
Test TestMe {
get;
@@ -345,53 +468,53 @@ set;
}
}");
}
-
+
[Test]
- public void TestIndentPropertyOneLine ()
+ public void TestIndentPropertyOneLine()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.PropertyFormatting = PropertyFormatting.AllowOneLine;
policy.AllowPropertyGetBlockInline = true;
policy.AllowPropertySetBlockInline = true;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test TestMe { get;set; }
}",
-@"class Test
+ @"class Test
{
Test TestMe { get; set; }
}");
}
-
+
[Test]
- public void TestIndentPropertyOneLineCase2 ()
+ public void TestIndentPropertyOneLineCase2()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.PropertyFormatting = PropertyFormatting.AllowOneLine;
policy.AllowPropertyGetBlockInline = true;
policy.AllowPropertySetBlockInline = true;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
Test TestMe { get { ; }set{;} }
}",
-@"class Test
+ @"class Test
{
Test TestMe { get { ; } set { ; } }
}");
}
-
+
[Test]
- public void TestIndentPropertyBodyIndexerCase ()
+ public void TestIndentPropertyBodyIndexerCase()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentPropertyBody = true;
- var adapter = Test (policy,
-@"class Test
+ var adapter = Test(policy,
+ @"class Test
{
Test this[int a] {
get {
@@ -402,7 +525,7 @@ set {
}
}
}",
-@"class Test
+ @"class Test
{
Test this [int a] {
get {
@@ -414,8 +537,8 @@ set {
}
}");
policy.IndentPropertyBody = false;
- Continue (policy, adapter,
-@"class Test
+ Continue(policy, adapter,
+ @"class Test
{
Test this [int a] {
get {
@@ -427,24 +550,24 @@ set {
}
}");
}
-
+
[Test]
- public void TestPropertyAlignment ()
+ public void TestPropertyAlignment()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.PropertyFormatting = PropertyFormatting.AllowOneLine;
- var adapter = Test (policy,
-@"class Test
+ var adapter = Test(policy,
+ @"class Test
{
Test TestMe { get; set; }
}",
-@"class Test
+ @"class Test
{
Test TestMe { get; set; }
}");
policy.PropertyFormatting = PropertyFormatting.ForceNewLine;
- Continue (policy, adapter,
-@"class Test
+ Continue(policy, adapter,
+ @"class Test
{
Test TestMe {
get;
@@ -453,84 +576,82 @@ set {
}");
policy.PropertyFormatting = PropertyFormatting.ForceOneLine;
- Continue (policy, adapter,
-@"class Test
+ Continue(policy, adapter,
+ @"class Test
{
Test TestMe { get; set; }
}");
}
-
[Test]
- public void TestIndentNamespaceBody ()
+ public void TestIndentNamespaceBody()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.ClassBraceStyle = BraceStyle.DoNotChange;
policy.NamespaceBraceStyle = BraceStyle.EndOfLine;
policy.IndentNamespaceBody = true;
- var adapter = Test (policy,
-@" namespace Test {
+ var adapter = Test(policy,
+ @" namespace Test {
class FooBar {}
}",
-@"namespace Test {
+ @"namespace Test {
class FooBar {}
}");
policy.IndentNamespaceBody = false;
- Continue (policy, adapter,
-@"namespace Test {
+ Continue(policy, adapter,
+ @"namespace Test {
class FooBar {}
}");
}
-
-
+
[Test]
- public void TestMethodIndentation ()
+ public void TestMethodIndentation()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.MethodBraceStyle = BraceStyle.DoNotChange;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
MyType TestMethod () {}
}",
-@"class Test
+ @"class Test
{
MyType TestMethod () {}
}");
}
-
+
[Test]
- public void TestPropertyIndentation ()
+ public void TestPropertyIndentation()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.PropertyBraceStyle = BraceStyle.DoNotChange;
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
public int Prop { get; set; }
-}",@"class Test
+}", @"class Test
{
public int Prop { get; set; }
}");
}
-
+
[Test]
- public void TestPropertyIndentationCase2 ()
+ public void TestPropertyIndentationCase2()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
public int Prop {
get;
set;
}
}",
-@"class Test
+ @"class Test
{
public int Prop {
get;
@@ -540,31 +661,32 @@ set;
}
[Test]
- public void TestPropertyIndentationClosingBracketCorrection ()
+ public void TestPropertyIndentationClosingBracketCorrection()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
public int Prop { get;
}
-}",@"class Test
+}", @"class Test
{
public int Prop { get; }
}");
}
+
[Test]
- public void TestPropertyIndentationClosingBracketCorrection2 ()
+ public void TestPropertyIndentationClosingBracketCorrection2()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
- Test (policy,
-@"class Test
+ Test(policy,
+ @"class Test
{
public int Prop {
get;}
-}",@"class Test
+}", @"class Test
{
public int Prop {
get;
@@ -591,13 +713,33 @@ set;
}
[Test]
- public void TestIndentEventBody ()
+ public void TestEventField()
{
- CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono ();
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
+
+ Test(policy,
+@"class Test
+{
+ public event
+
+ EventHandler TestMe ;
+}",
+@"class Test
+{
+ public event EventHandler TestMe;
+}");
+
+ }
+
+
+ [Test]
+ public void TestIndentEventBody()
+ {
+ CSharpFormattingOptions policy = FormattingOptionsFactory.CreateMono();
policy.IndentEventBody = true;
- var adapter = Test (policy,
-@"class Test
+ var adapter = Test(policy,
+ @"class Test
{
public event EventHandler TestMe {
add {
@@ -608,7 +750,7 @@ remove {
}
}
}",
-@"class Test
+ @"class Test
{
public event EventHandler TestMe {
add {
@@ -620,8 +762,8 @@ remove {
}
}");
policy.IndentEventBody = false;
- Continue (policy, adapter,
-@"class Test
+ Continue(policy, adapter,
+ @"class Test
{
public event EventHandler TestMe {
add {
@@ -634,7 +776,6 @@ remove {
}");
}
-
/// <summary>
/// Bug 9990 - Formatting a document on save splits event into 'e vent'
/// </summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestWrapping.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestWrapping.cs
index b935d41..4d1d387 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestWrapping.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TestWrapping.cs
@@ -181,7 +181,7 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
Foo (1, 2, 3);
}
}",
-@"class Test
+ @"class Test
{
void TestMe ()
{
@@ -814,5 +814,86 @@ int foo)
}
}");
}
+ [Ignore("FIXME")]
+ [Test]
+ public void TestWrappingBug()
+ {
+ var policy = FormattingOptionsFactory.CreateMono();
+ Test(policy, @"class Test
+{
+ void TestMe ()
+ {
+ VantageErrorLog.Throw(Title: ""DexterHelper: WriteToDexter (WebEx)"",
+ Method: ""WriteToDexter"",
+ Location: ""DX001"",
+ Code: ""DX001"",
+ Message: string.Format(""DexterHelper: WriteToDexter{0}{1}{0}{2}"",
+ VantageConstants.CRLF,
+ webex.Message,
+ responseString),
+ ex: new Exception(string.Format(""DexterHelper: WriteToDexter{0}{1}{0}{2}"",
+ VantageConstants.CRLF,
+ webex.Message,
+ responseString)),
+ TellUser: false,
+ WriteToDatabase: true,
+ TellVantageSupport: true,
+ Rethrow: false);
+ }
+}",
+ @"class Test
+{
+ void TestMe ()
+ {
+ VantageErrorLog.Throw (Title: ""DexterHelper: WriteToDexter (WebEx)"",
+ Method: ""WriteToDexter"",
+ Location: ""DX001"",
+ Code: ""DX001"",
+ Message: string.Format (""DexterHelper: WriteToDexter{0}{1}{0}{2}"",
+ VantageConstants.CRLF,
+ webex.Message,
+ responseString),
+ ex: new Exception (string.Format (""DexterHelper: WriteToDexter{0}{1}{0}{2}"",
+ VantageConstants.CRLF,
+ webex.Message,
+ responseString)),
+ TellUser: false,
+ WriteToDatabase: true,
+ TellVantageSupport: true,
+ Rethrow: false);
+ }
+}");
+ }
+
+
+ [Test]
+ public void TestWrappingWithSpaceIndent()
+ {
+ var policy = FormattingOptionsFactory.CreateMono();
+
+ TextEditorOptions options = new TextEditorOptions();
+ options.IndentSize = options.TabSize = 2;
+ options.TabsToSpaces = true;
+ options.EolMarker = "\n";
+
+ Test(policy, @"class Test
+{
+ void TestMe ()
+ {
+ Foo (1,
+ 2,
+ 3);
+ }
+}",
+ @"class Test
+{
+ void TestMe ()
+ {
+ Foo (1,
+ 2,
+ 3);
+ }
+}", FormattingMode.Intrusive, options);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs
index ca8b953..577ff7d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs
@@ -28,13 +28,17 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
return b.ToString();
}*/
- protected static IDocument GetResult(CSharpFormattingOptions policy, string input, FormattingMode mode = FormattingMode.Intrusive)
+ protected static IDocument GetResult(CSharpFormattingOptions policy, string input, FormattingMode mode = FormattingMode.Intrusive, TextEditorOptions options = null)
{
+ if (options == null) {
+ options = new TextEditorOptions();
+ options.EolMarker = "\n";
+ options.WrapLineLength = 80;
+ }
+
+
input = NormalizeNewlines(input);
var document = new StringBuilderDocument(input);
- var options = new TextEditorOptions();
- options.EolMarker = "\n";
- options.WrapLineLength = 80;
var visitor = new CSharpFormatter (policy, options);
visitor.FormattingMode = mode;
var syntaxTree = new CSharpParser ().Parse (document, "test.cs");
@@ -43,10 +47,11 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
return document;
}
- protected static IDocument Test (CSharpFormattingOptions policy, string input, string expectedOutput, FormattingMode mode = FormattingMode.Intrusive)
+ protected static IDocument Test (CSharpFormattingOptions policy, string input, string expectedOutput, FormattingMode mode = FormattingMode.Intrusive, TextEditorOptions options = null)
{
expectedOutput = NormalizeNewlines(expectedOutput);
- IDocument doc = GetResult(policy, input, mode);
+
+ IDocument doc = GetResult(policy, input, mode, options);
if (expectedOutput != doc.Text) {
Console.WriteLine ("expected:");
Console.WriteLine (expectedOutput);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj b/external/nrefactory/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj
index 23d461a..22d74f1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj
@@ -93,6 +93,7 @@
<Compile Include="..\ICSharpCode.NRefactory\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="Analysis\AbiComparerTests.cs" />
<Compile Include="CSharp\Analysis\DefiniteAssignmentTests.cs" />
<Compile Include="CSharp\AstStructureTests.cs" />
<Compile Include="CSharp\CodeActions\AddUsing\AddUsingActionAlphabeticalTests.cs" />
@@ -121,17 +122,16 @@
<Compile Include="CSharp\CodeActions\UseStringFormatTests.cs" />
<Compile Include="CSharp\CodeIssues\AccessToDisposedClosureTests.cs" />
<Compile Include="CSharp\CodeIssues\AccessToModifiedClosureTests.cs" />
- <Compile Include="CSharp\CodeIssues\AssignmentMadeToSameVariableIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\CS1717AssignmentMadeToSameVariableIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\BitwiseOperationOnNonFlagsEnumIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\CastExpressionOfIncompatibleTypeIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\CompareFloatWithEqualityOperatorIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ConstantConditionIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\DoubleNegationIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\DoubleNegationOperatorIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ExplicitConversionInForEachIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ExpressionIsAlwaysOfProvidedTypeIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ExpressionIsNeverOfProvidedTypeIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\ForControlVariableNotModifiedIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\IdenticalConditionalBranchIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ForControlVariableIsNeverModifiedIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\LocalVariableHidesMemberIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\LocalVariableNotUsedIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\MethodNeverReturnsIssueTests.cs" />
@@ -142,18 +142,26 @@
<Compile Include="CSharp\CodeIssues\ParameterHidesMemberIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ParameterNotUsedIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ParameterOnlyAssignedIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantArrayInitializerCommaIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantCommaInArrayInitializerIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantAssignmentIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\CompareBooleanWithTrueOrFalseIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantAttributeParenthesesIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantCaseLabelIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantElseIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantFieldInitializerIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantIfElseBlockIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantDefaultFieldInitializerIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantObjectCreationArgumentListIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantObjectOrCollectionInitializerIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantTypeCastIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantCastIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ReferenceEqualsCalledWithValueTypeIssueTest.cs" />
- <Compile Include="CSharp\CodeIssues\TypeParameterNotUsedIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToCountIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToFirstIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToFirstOrDefaultIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToLastIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToLastOrDefaultIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToLongCountIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToSingleIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithSingleCallToSingleOrDefaultIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\UnusedTypeParameterIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\UnreachableCodeIssueTests.cs" />
<Compile Include="CSharp\CSharpAmbienceTests.cs" />
<Compile Include="CSharp\CodeDomConvertVisitorTests.cs" />
@@ -226,6 +234,8 @@
<Compile Include="CSharp\Parser\GeneralScope\AttributeSectionTests.cs" />
<Compile Include="CSharp\Parser\ParseUtil.cs" />
<Compile Include="CSharp\QueryExpressionExpanderTests.cs" />
+ <Compile Include="CSharp\Refactoring\LambdaHelperTests.cs" />
+ <Compile Include="CSharp\Refactoring\RefactoringStructureTests.cs" />
<Compile Include="CSharp\Refactoring\TypeSystemAstBuilderTests.cs" />
<Compile Include="CSharp\Resolver\AnonymousTypeTests.cs" />
<Compile Include="CSharp\Resolver\ArrayCreateTests.cs" />
@@ -298,16 +308,16 @@
<Compile Include="CSharp\CodeCompletion\TestBase.cs" />
<Compile Include="CSharp\CodeCompletion\VariableDeclarationStatementTests.cs" />
<Compile Include="CSharp\CodeCompletion\NameContextTests.cs" />
- <Compile Include="CSharp\CodeIssues\ConditionalToNullCoalescingInspectorTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ConvertConditionalTernaryToNullCoalescingIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\InspectionActionTestBase.cs" />
<Compile Include="CSharp\CodeIssues\NotImplementedExceptionInspectorTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantInternalInspectorTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantNamespaceUsageInspectorTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantNameQualifierIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\RedundantPrivateInspectorTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantThisInspectorTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantUsingInspectorTests.cs" />
- <Compile Include="CSharp\CodeIssues\StringIsNullOrEmptyInspectorTests.cs" />
- <Compile Include="CSharp\CodeIssues\UseVarKeywordInspectorTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantThisQualifierIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantUsingDirectiveIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ReplaceWithStringIsNullOrEmptyIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\SuggestUseVarKeywordEvidentTests.cs" />
<Compile Include="CSharp\CodeActions\UseVarKeywordTests.cs" />
<Compile Include="CSharp\CodeActions\TestRefactoringContext.cs" />
<Compile Include="CSharp\CodeActions\ContextActionTestBase.cs" />
@@ -354,12 +364,12 @@
<Compile Include="CSharp\CodeActions\RemoveRedundantCatchTypeTests.cs" />
<Compile Include="CSharp\CodeActions\AddCatchTypeTests.cs" />
<Compile Include="CSharp\CodeIssues\IncorrectExceptionParameterOrderingTests.cs" />
- <Compile Include="CSharp\CodeIssues\CallToVirtualFunctionFromConstructorTests.cs" />
+ <Compile Include="CSharp\CodeIssues\DoNotCallOverridableMethodsInConstructorIssueTests.cs" />
<Compile Include="CSharp\CodeActions\StaticMethodInvocationToExtensionMethodInvocationTests.cs" />
<Compile Include="CSharp\CodeActions\ExtensionMethodInvocationToStaticMethodInvocationTests.cs" />
<Compile Include="CSharp\CodeActions\IterateViaForeachTests.cs" />
<Compile Include="CSharp\CodeActions\ExtractFieldTests.cs" />
- <Compile Include="CSharp\CodeIssues\ValueParameterUnusedTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ValueParameterNotUsedIssueTests.cs" />
<Compile Include="CSharp\Parser\Statements\InvalidStatementsTests.cs" />
<Compile Include="CSharp\Refactoring\NamingHelperTests.cs" />
<Compile Include="CSharp\CodeActions\ConvertToInitializer\ConvertToInitializerTests.cs" />
@@ -367,19 +377,18 @@
<Compile Include="CSharp\CodeIssues\VariableDeclaredInWideScopeTests.cs" />
<Compile Include="CSharp\CodeIssues\ParameterCanBeDemotedIssue\ParameterCanBeDemotedTests.cs" />
<Compile Include="CSharp\CodeCompletion\DocumentationContextTests.cs" />
- <Compile Include="CSharp\CodeIssues\ReferenceToStaticMemberViaDerivedTypeTests.cs" />
+ <Compile Include="CSharp\CodeIssues\AccessToStaticMemberViaDerivedTypeIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ParameterCanBeDemotedIssue\IsTypeCriterionTests.cs" />
<Compile Include="Utils\CompositeFormatStringParser\CompositeFormatStringParserTests.cs" />
<Compile Include="CSharp\CodeIssues\OptionalParameterCouldBeSkippedTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantCatchTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantToStringTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantCatchIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\RedundantToStringCallIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\CallToObjectEqualsViaBaseTests.cs" />
<Compile Include="CSharp\CodeIssues\IncorrectCallToGetHashCodeTests.cs" />
<Compile Include="CSharp\CodeIssues\FormatStringIssues\FormatStringTests.cs" />
<Compile Include="CSharp\CodeActions\ConvertToInitializer\ConvertInitializerToExplicitIntializationsTests.cs" />
<Compile Include="CSharp\CodeCompletion\BrowsableAttributeTests.cs" />
<Compile Include="CSharp\CodeIssues\ExceptionRethrowTests.cs" />
- <Compile Include="CSharp\CodeIssues\ThreadStaticOnInstanceFieldTests.cs" />
<Compile Include="CSharp\CodeIssues\StaticFieldInGenericTypeTests.cs" />
<Compile Include="CSharp\CodeActions\ConvertAnonymousDelegateToLambdaTests.cs" />
<Compile Include="CSharp\CodeActions\ConvertLamdaToAnonymousDelegateTests.cs" />
@@ -395,25 +404,37 @@
<Compile Include="CSharp\CodeIssues\SimplifyAnonymousMethodToDelegateIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\CS0127ReturnMustNotBeFollowedByAnyExpressionTests.cs" />
<Compile Include="CSharp\Analysis\SemanticHighlightingTests.cs" />
- <Compile Include="CSharp\Analysis\AbiComparerTests.cs" />
<Compile Include="CSharp\CodeActions\CreateChangedEventTests.cs" />
<Compile Include="CSharp\CodeActions\SimplifyIfFlowTests.cs" />
<Compile Include="CSharp\CodeActions\SimplifyIfFlowInLoopsTests.cs" />
- <Compile Include="CSharp\CodeIssues\NoDefaultConstructorIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\CS1729TypeHasNoConstructorWithNArgumentsIssueTests.cs" />
<Compile Include="CSharp\CodeActions\InvertIfAndSimplifyTests.cs" />
<Compile Include="FormattingTests\TestExpressionFormatting.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantNullCheckTests.cs">
+ <Compile Include="CSharp\CodeIssues\RedundantComparisonWithNullIssueTests.cs">
</Compile>
<Compile Include="CSharp\CodeIssues\StaticConstructorAccessModifierTest.cs" />
<Compile Include="CSharp\CodeIssues\RedundantBaseConstructorIssueTests.cs" />
- <Compile Include="CSharp\CodeIssues\RedundantConstructorTests.cs" />
+ <Compile Include="CSharp\CodeIssues\EmptyConstructorIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\PublicConstructorInAbstractClassIssueTest.cs" />
- <Compile Include="CSharp\CodeIssues\ExpressionOfCompatibleTypeCastIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\CS0029InvalidConversionIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ConvertToStaticMethodIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\ParameterCanBeDemotedIssue\ParameterCanBeIEnumerableTests.cs" />
<Compile Include="CSharp\CodeIssues\DuplicateBodyMethodIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\DuplicateExpressionsInConditionsIssueTests.cs" />
<Compile Include="CSharp\CodeIssues\DuplicateIfInIfChainIssueTests.cs" />
+ <Compile Include="CSharp\CodeIssues\UseBlockInsteadColonIssueTests.cs" />
+ <Compile Include="CSharp\AstTests.cs" />
+ <Compile Include="CSharp\CodeIssues\LockThisTests.cs" />
+ <Compile Include="Analysis\SymbolCollectorTests.cs" />
+ <Compile Include="CSharp\CodeActions\ImplementNotImplementedPropertyTests.cs" />
+ <Compile Include="CSharp\CodeActions\AutoLinqSumTests.cs" />
+ <Compile Include="CSharp\CodeIssues\DisposeMethodInNonIDisposableTypeTests.cs" />
+ <Compile Include="CSharp\CodeActions\ConvertIfToNullCoalescingTests.cs" />
+ <Compile Include="FormattingTests\TestGlobalLevelFormatting.cs" />
+ <Compile Include="CSharp\CodeIssues\ConditionalTernaryEqualBranchTests.cs" />
+ <Compile Include="CSharp\CodeIssues\ThreadStaticAtInstanceFieldTests.cs" />
+ <Compile Include="CSharp\CodeActions\MetaTests.cs" />
+ <Compile Include="CSharp\CodeCompletion\FormatItemTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
@@ -435,8 +456,11 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
+ <Project>{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}</Project>
+ <Name>ICSharpCode.NRefactory.Cecil</Name>
+ </ProjectReference>
</ItemGroup>
- <ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<MonoDevelop>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs
index d5a38ef..c9088fb 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs
@@ -158,8 +158,8 @@ namespace System.Collections.Generic {
{
// class C<X> : C<C<X>> {}
var c = new DefaultUnresolvedTypeDefinition(string.Empty, "C");
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "X"));
- c.BaseTypes.Add(new ParameterizedTypeReference(c, new [] { new ParameterizedTypeReference(c, new [] { new TypeParameterReference(EntityType.TypeDefinition, 0) }) }));
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "X"));
+ c.BaseTypes.Add(new ParameterizedTypeReference(c, new [] { new ParameterizedTypeReference(c, new [] { new TypeParameterReference(SymbolKind.TypeDefinition, 0) }) }));
compilation = TypeSystemHelper.CreateCompilation(c);
ITypeDefinition resolvedC = Resolve(c);
Assert.AreEqual(new [] { resolvedC }, resolvedC.GetAllBaseTypes().ToArray());
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetMembersTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetMembersTests.cs
index 6398c5c..4164547 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetMembersTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/GetMembersTests.cs
@@ -82,11 +82,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
// class A<X> { class B<Y> { } }
DefaultUnresolvedTypeDefinition a = new DefaultUnresolvedTypeDefinition(string.Empty, "A");
- a.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "X"));
+ a.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "X"));
DefaultUnresolvedTypeDefinition b = new DefaultUnresolvedTypeDefinition(a, "B");
b.TypeParameters.Add(a.TypeParameters[0]);
- b.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 1, "Y"));
+ b.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 1, "Y"));
a.NestedTypes.Add(b);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeParameterTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeParameterTests.cs
index 20b79f2..7988b71 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeParameterTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeParameterTests.cs
@@ -32,9 +32,9 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
// class C<T, U> where T : class where U : T
var c = new DefaultUnresolvedTypeDefinition(string.Empty, "C");
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 1, "U") {
- Constraints = { new TypeParameterReference(EntityType.TypeDefinition, 0) }
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 1, "U") {
+ Constraints = { new TypeParameterReference(SymbolKind.TypeDefinition, 0) }
});
ITypeDefinition resolvedC = TypeSystemHelper.CreateCompilationAndResolve(c);
@@ -49,10 +49,10 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
// class C<T, U> where T : class where U : struct, T
var c = new DefaultUnresolvedTypeDefinition(string.Empty, "C");
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 1, "U") {
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true });
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 1, "U") {
HasValueTypeConstraint = true,
- Constraints = { new TypeParameterReference(EntityType.TypeDefinition, 0) }
+ Constraints = { new TypeParameterReference(SymbolKind.TypeDefinition, 0) }
});
ITypeDefinition resolvedC = TypeSystemHelper.CreateCompilationAndResolve(c);
@@ -67,11 +67,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
// class C<T, U> where T : List<string> where U : T
var c = new DefaultUnresolvedTypeDefinition(string.Empty, "C");
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "T") {
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "T") {
Constraints = { typeof(List<string>).ToTypeReference() }
});
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 1, "U") {
- Constraints = { new TypeParameterReference(EntityType.TypeDefinition, 0) }
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 1, "U") {
+ Constraints = { new TypeParameterReference(SymbolKind.TypeDefinition, 0) }
});
ITypeDefinition resolvedC = TypeSystemHelper.CreateCompilationAndResolve(c);
@@ -87,10 +87,10 @@ namespace ICSharpCode.NRefactory.TypeSystem
// class C<T, U> { void M<X>() {} }
var c = new DefaultUnresolvedTypeDefinition(string.Empty, "C");
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 0, "T"));
- c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, 1, "U"));
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 0, "T"));
+ c.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, 1, "U"));
var m = new DefaultUnresolvedMethod(c, "M");
- m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.Method, 0, "X"));
+ m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.Method, 0, "X"));
c.Members.Add(m);
var resolvedC1 = TypeSystemHelper.CreateCompilationAndResolve(c);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemHelper.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemHelper.cs
index c004c23..62e8b80 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemHelper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemHelper.cs
@@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
public static ICompilation CreateCompilation(params IUnresolvedTypeDefinition[] unresolvedTypeDefinitions)
{
- var unresolvedFile = new CSharpUnresolvedFile("dummy.cs");
+ var unresolvedFile = new CSharpUnresolvedFile();
foreach (var typeDef in unresolvedTypeDefinitions)
unresolvedFile.TopLevelTypeDefinitions.Add(typeDef);
return CreateCompilation(unresolvedFile);
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs
index 001aa14..517e59d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs
@@ -46,7 +46,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase
public ParamsAttribute(params object[] x) {}
[Params(Property = new string[] { "a", "b" })]
- public string[] Property { get; set; }
+ public string[] Property {
+ [return: Params("Attribute on return type of getter")]
+ get { return null; }
+ set { }
+ }
}
[Double(1)]
@@ -87,9 +91,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase
public int PropertyWithProtectedSetter { get; protected set; }
public object PropertyWithPrivateSetter { get; private set; }
-
+
public object PropertyWithoutSetter { get { return null; } }
-
+
+ public object PropertyWithPrivateGetter { private get; set; }
+
public string this[int index] { get { return "Test"; } set {} }
}
@@ -160,15 +166,6 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase
int GetNextAssembly(uint dwFlags);
}
- public class ConstantTest
- {
- public const int Answer = 42;
-
- public const StringComparison EnumFromAnotherAssembly = StringComparison.OrdinalIgnoreCase;
-
- public const string NullString = null;
- }
-
public class OuterGeneric<X>
{
public class Inner {
@@ -359,7 +356,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase
public const float Cf = 42;
public const decimal Cm = 42;
public const string S = "hello, world";
-
+ public const string NullString = null;
+
+ public const MyEnum EnumFromThisAssembly = MyEnum.Second;
+ public const StringComparison EnumFromAnotherAssembly = StringComparison.OrdinalIgnoreCase;
+ public const MyEnum DefaultOfEnum = default(MyEnum);
+
public const int SOsb = sizeof(sbyte);
public const int SOb = sizeof(byte);
public const int SOs = sizeof(short);
@@ -372,6 +374,27 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase
public const int SOf = sizeof(float);
public const int SOd = sizeof(double);
public const int SObl = sizeof(bool);
- public static readonly unsafe int SOe = sizeof(MyEnum);
+ public const int SOe = sizeof(MyEnum);
+ }
+
+ public interface IExplicitImplementationTests
+ {
+ void M(int a);
+ int P { get; set; }
+ event Action E;
+ int this[int x] { get; set; }
+ }
+
+ public class ExplicitImplementationTests : IExplicitImplementationTests
+ {
+ public void M(int a) {}
+ public int P { get; set; }
+ public event Action E;
+ public int this[int x] { get { return 0; } set {} }
+
+ void IExplicitImplementationTests.M(int a) {}
+ int IExplicitImplementationTests.P { get; set; }
+ event Action IExplicitImplementationTests.E { add {} remove {} }
+ int IExplicitImplementationTests.this[int x] { get { return 0; } set {} }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs
index c14a341..2202e22 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs
@@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
Assert.AreEqual(typeof(SimplePublicClass).FullName + ".Method", method.FullName);
Assert.AreSame(c, method.DeclaringType);
Assert.AreEqual(Accessibility.Public, method.Accessibility);
- Assert.AreEqual(EntityType.Method, method.EntityType);
+ Assert.AreEqual(SymbolKind.Method, method.SymbolKind);
Assert.IsFalse(method.IsVirtual);
Assert.IsFalse(method.IsStatic);
Assert.AreEqual(0, method.Parameters.Count);
@@ -161,8 +161,8 @@ namespace ICSharpCode.NRefactory.TypeSystem
public void TestClassTypeParameters()
{
var testClass = GetTypeDefinition(typeof(GenericClass<,>));
- Assert.AreEqual(EntityType.TypeDefinition, testClass.TypeParameters[0].OwnerType);
- Assert.AreEqual(EntityType.TypeDefinition, testClass.TypeParameters[1].OwnerType);
+ Assert.AreEqual(SymbolKind.TypeDefinition, testClass.TypeParameters[0].OwnerType);
+ Assert.AreEqual(SymbolKind.TypeDefinition, testClass.TypeParameters[1].OwnerType);
Assert.AreSame(testClass.TypeParameters[1], testClass.TypeParameters[0].DirectBaseTypes.First());
}
@@ -174,8 +174,8 @@ namespace ICSharpCode.NRefactory.TypeSystem
IMethod m = testClass.Methods.Single(me => me.Name == "TestMethod");
Assert.AreEqual("K", m.TypeParameters[0].Name);
Assert.AreEqual("V", m.TypeParameters[1].Name);
- Assert.AreEqual(EntityType.Method, m.TypeParameters[0].OwnerType);
- Assert.AreEqual(EntityType.Method, m.TypeParameters[1].OwnerType);
+ Assert.AreEqual(SymbolKind.Method, m.TypeParameters[0].OwnerType);
+ Assert.AreEqual(SymbolKind.Method, m.TypeParameters[1].OwnerType);
Assert.AreEqual("System.IComparable`1[[``1]]", m.TypeParameters[0].DirectBaseTypes.First().ReflectionName);
Assert.AreSame(m.TypeParameters[0], m.TypeParameters[1].DirectBaseTypes.First());
@@ -188,7 +188,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
IMethod m = testClass.Methods.Single(me => me.Name == "GetIndex");
Assert.AreEqual("T", m.TypeParameters[0].Name);
- Assert.AreEqual(EntityType.Method, m.TypeParameters[0].OwnerType);
+ Assert.AreEqual(SymbolKind.Method, m.TypeParameters[0].OwnerType);
Assert.AreSame(m, m.TypeParameters[0].Owner);
ParameterizedType constraint = (ParameterizedType)m.TypeParameters[0].DirectBaseTypes.First();
@@ -210,7 +210,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
));
Assert.AreEqual("T", m.TypeParameters[0].Name);
- Assert.AreEqual(EntityType.Method, m.TypeParameters[0].OwnerType);
+ Assert.AreEqual(SymbolKind.Method, m.TypeParameters[0].OwnerType);
Assert.AreSame(m, m.TypeParameters[0].Owner);
ParameterizedType constraint = (ParameterizedType)m.TypeParameters[0].DirectBaseTypes.First();
@@ -336,6 +336,19 @@ namespace ICSharpCode.NRefactory.TypeSystem
Assert.AreEqual(Accessibility.Private, p.Setter.Accessibility);
Assert.IsTrue(p.Getter.HasBody);
}
+
+ [Test]
+ public void PropertyWithPrivateGetter()
+ {
+ var testClass = GetTypeDefinition(typeof(PropertyTest));
+ IProperty p = testClass.Properties.Single(pr => pr.Name == "PropertyWithPrivateGetter");
+ Assert.IsTrue(p.CanGet);
+ Assert.IsTrue(p.CanSet);
+ Assert.AreEqual(Accessibility.Public, p.Accessibility);
+ Assert.AreEqual(Accessibility.Private, p.Getter.Accessibility);
+ Assert.AreEqual(Accessibility.Public, p.Setter.Accessibility);
+ Assert.IsTrue(p.Getter.HasBody);
+ }
[Test]
public void PropertyWithoutSetter()
@@ -364,7 +377,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
var testClass = GetTypeDefinition(typeof(PropertyTest));
IProperty p = testClass.Properties.Single(pr => pr.IsIndexer);
Assert.IsTrue(p.CanGet);
- Assert.AreEqual(EntityType.Accessor, p.Getter.EntityType);
+ Assert.AreEqual(SymbolKind.Accessor, p.Getter.SymbolKind);
Assert.AreEqual("get_Item", p.Getter.Name);
Assert.AreEqual(Accessibility.Public, p.Getter.Accessibility);
Assert.AreEqual(new[] { "index" }, p.Getter.Parameters.Select(x => x.Name).ToArray());
@@ -378,7 +391,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
var testClass = GetTypeDefinition(typeof(PropertyTest));
IProperty p = testClass.Properties.Single(pr => pr.IsIndexer);
Assert.IsTrue(p.CanSet);
- Assert.AreEqual(EntityType.Accessor, p.Setter.EntityType);
+ Assert.AreEqual(SymbolKind.Accessor, p.Setter.SymbolKind);
Assert.AreEqual("set_Item", p.Setter.Name);
Assert.AreEqual(Accessibility.Public, p.Setter.Accessibility);
Assert.AreEqual(new[] { "index", "value" }, p.Setter.Parameters.Select(x => x.Name).ToArray());
@@ -687,34 +700,6 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
[Test]
- public void ConstantAnswer()
- {
- ITypeDefinition type = GetTypeDefinition(typeof(ConstantTest));
- IField answer = type.Fields.Single(f => f.Name == "Answer");
- Assert.IsTrue(answer.IsConst);
- Assert.IsTrue(answer.IsStatic);
- Assert.AreEqual(42, answer.ConstantValue);
- }
-
- [Test]
- public void ConstantEnumFromAnotherAssembly()
- {
- ITypeDefinition type = GetTypeDefinition(typeof(ConstantTest));
- IField answer = type.Fields.Single(f => f.Name == "EnumFromAnotherAssembly");
- Assert.IsTrue(answer.IsConst);
- Assert.AreEqual((int)StringComparison.OrdinalIgnoreCase, answer.ConstantValue);
- }
-
- [Test]
- public void ConstantNullString()
- {
- ITypeDefinition type = GetTypeDefinition(typeof(ConstantTest));
- IField answer = type.Fields.Single(f => f.Name == "NullString");
- Assert.IsTrue(answer.IsConst);
- Assert.IsNull(answer.ConstantValue);
- }
-
- [Test]
public void InnerClassInGenericClassIsReferencedUsingParameterizedType()
{
ITypeDefinition type = GetTypeDefinition(typeof(OuterGeneric<>));
@@ -890,6 +875,15 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
[Test]
+ public void ParamsAttribute_Getter_ReturnType()
+ {
+ ITypeDefinition type = GetTypeDefinition(typeof(ParamsAttribute));
+ IProperty prop = type.Properties.Single(p => p.Name == "Property");
+ Assert.AreEqual(0, prop.Getter.Attributes.Count);
+ Assert.AreEqual(1, prop.Getter.ReturnTypeAttributes.Count);
+ }
+
+ [Test]
public void DoubleAttribute_ImplicitNumericConversion()
{
ITypeDefinition type = GetTypeDefinition(typeof(DoubleAttribute));
@@ -1067,7 +1061,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
public void ExplicitIndexerImplementationReturnsTheCorrectMembers() {
ITypeDefinition type = GetTypeDefinition(typeof(ClassThatImplementsIndexersExplicitly));
- Assert.That(type.Properties.All(p => p.EntityType == EntityType.Indexer));
+ Assert.That(type.Properties.All(p => p.SymbolKind == SymbolKind.Indexer));
Assert.That(type.Properties.All(p => p.ImplementedInterfaceMembers.Count == 1));
Assert.That(type.Properties.All(p => p.Getter.ImplementedInterfaceMembers.Count == 1));
Assert.That(type.Properties.All(p => p.Setter.ImplementedInterfaceMembers.Count == 1));
@@ -1274,7 +1268,13 @@ namespace ICSharpCode.NRefactory.TypeSystem
AssertConstantField<float>(type, "Cf", 42);
AssertConstantField<decimal>(type, "Cm", 42);
AssertConstantField<string>(type, "S", "hello, world");
-
+ AssertConstantField<string>(type, "NullString", null);
+ }
+
+ [Test]
+ public void ConstantFieldsSizeOf()
+ {
+ ITypeDefinition type = GetTypeDefinition(typeof(ConstantFieldTest));
AssertConstantField<int>(type, "SOsb", sizeof(sbyte));
AssertConstantField<int>(type, "SOb", sizeof(byte));
AssertConstantField<int>(type, "SOs", sizeof(short));
@@ -1289,5 +1289,71 @@ namespace ICSharpCode.NRefactory.TypeSystem
AssertConstantField<int>(type, "SObl", sizeof(bool));
AssertConstantField<int>(type, "SOe", sizeof(MyEnum));
}
+
+ [Test]
+ public void ConstantEnumFromThisAssembly()
+ {
+ ITypeDefinition type = GetTypeDefinition(typeof(ConstantFieldTest));
+ IField field = type.Fields.Single(f => f.Name == "EnumFromThisAssembly");
+ Assert.IsTrue(field.IsConst);
+ Assert.AreEqual((short)MyEnum.Second, field.ConstantValue);
+ }
+
+ [Test]
+ public void ConstantEnumFromAnotherAssembly()
+ {
+ ITypeDefinition type = GetTypeDefinition(typeof(ConstantFieldTest));
+ IField field = type.Fields.Single(f => f.Name == "EnumFromAnotherAssembly");
+ Assert.IsTrue(field.IsConst);
+ Assert.AreEqual((int)StringComparison.OrdinalIgnoreCase, field.ConstantValue);
+ }
+
+ [Test]
+ public void DefaultOfEnum()
+ {
+ ITypeDefinition type = GetTypeDefinition(typeof(ConstantFieldTest));
+ IField field = type.Fields.Single(f => f.Name == "DefaultOfEnum");
+ Assert.IsTrue(field.IsConst);
+ Assert.AreEqual((short)default(MyEnum), field.ConstantValue);
+ }
+
+ [Test]
+ public void ExplicitImplementation()
+ {
+ var type = GetTypeDefinition(typeof(ExplicitImplementationTests));
+ var itype = GetTypeDefinition(typeof(IExplicitImplementationTests));
+
+ var methods = type.GetMethods(m => m.Name == "M").ToList();
+ var imethod = itype.GetMethods(m => m.Name == "M").Single();
+ Assert.That(methods.Select(m => m.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(methods.SelectMany(m => m.ImplementedInterfaceMembers).Single(), imethod);
+
+ var properties = type.GetProperties(p => p.Name == "P").ToList();
+ var iproperty = itype.GetProperties(m => m.Name == "P").Single();
+ Assert.That(properties.Select(p => p.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(properties.SelectMany(p => p.ImplementedInterfaceMembers).Single(), iproperty);
+ Assert.That(properties.Select(p => p.Getter.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(properties.SelectMany(p => p.Getter.ImplementedInterfaceMembers).Single(), iproperty.Getter);
+ Assert.That(properties.Select(p => p.Setter.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(properties.SelectMany(p => p.Setter.ImplementedInterfaceMembers).Single(), iproperty.Setter);
+
+ var indexers = type.GetProperties(p => p.Name == "Item").ToList();
+ var iindexer = itype.GetProperties(m => m.Name == "Item").Single();
+ Assert.That(indexers.Select(p => p.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(indexers.SelectMany(p => p.ImplementedInterfaceMembers).Single(), iindexer);
+ Assert.That(indexers.Select(p => p.Getter.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(indexers.SelectMany(p => p.Getter.ImplementedInterfaceMembers).Single(), iindexer.Getter);
+ Assert.That(indexers.Select(p => p.Setter.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(indexers.SelectMany(p => p.Setter.ImplementedInterfaceMembers).Single(), iindexer.Setter);
+
+ var events = type.GetEvents(e => e.Name == "E").ToList();
+ var ievent = itype.GetEvents(m => m.Name == "E").Single();
+ Assert.That(events.Select(e => e.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(events.SelectMany(e => e.ImplementedInterfaceMembers).Single(), ievent);
+ Assert.That(events.Select(e => e.AddAccessor.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(events.SelectMany(e => e.AddAccessor.ImplementedInterfaceMembers).Single(), ievent.AddAccessor);
+ Assert.That(events.Select(e => e.RemoveAccessor.ImplementedInterfaceMembers.Count).ToList(), Is.EquivalentTo(new[] { 0, 1 }));
+ Assert.AreEqual(events.SelectMany(e => e.RemoveAccessor.ImplementedInterfaceMembers).Single(), ievent.RemoveAccessor);
+ }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/Enums.cs b/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/Enums.cs
index a3fa8d6..02df4d6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/Enums.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/Enums.cs
@@ -25,7 +25,7 @@ namespace ICSharpCode.NRefactory.VB.Ast
Const = 0x0200,
Shared = 0x0400,
Static = 0x0800,
- Override = 0x1000,
+ Overrides = 0x1000,
ReadOnly = 0x2000,
Shadows = 0x4000,
Partial = 0x8000,
diff --git a/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs b/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs
index d6a23eb..b38fc3e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs
@@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.VB.Ast
new KeyValuePair<Modifiers, int>(Modifiers.Const, "Const".Length),
new KeyValuePair<Modifiers, int>(Modifiers.Shared, "Shared".Length),
new KeyValuePair<Modifiers, int>(Modifiers.Static, "Static".Length),
- new KeyValuePair<Modifiers, int>(Modifiers.Override, "Override".Length),
+ new KeyValuePair<Modifiers, int>(Modifiers.Overrides, "Overrides".Length),
new KeyValuePair<Modifiers, int>(Modifiers.ReadOnly, "ReadOnly".Length),
new KeyValuePair<Modifiers, int>(Modifiers.WriteOnly, "WriteOnly".Length),
new KeyValuePair<Modifiers, int>(Modifiers.Shadows, "Shadows".Length),
@@ -109,8 +109,8 @@ namespace ICSharpCode.NRefactory.VB.Ast
return "Shared";
case Modifiers.Static:
return "Static";
- case Modifiers.Override:
- return "Override";
+ case Modifiers.Overrides:
+ return "Overrides";
case Modifiers.ReadOnly:
return "ReadOnly";
case Modifiers.Shadows:
diff --git a/external/nrefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/external/nrefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs
index 48632e0..88caf76 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs
@@ -2137,7 +2137,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors
mod |= Modifiers.ReadOnly;
if ((modifier & CSharp.Modifiers.Override) == CSharp.Modifiers.Override)
- mod |= Modifiers.Override;
+ mod |= Modifiers.Overrides;
if ((modifier & CSharp.Modifiers.Virtual) == CSharp.Modifiers.Virtual)
mod |= Modifiers.Overridable;
if ((modifier & CSharp.Modifiers.Async) == CSharp.Modifiers.Async)
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlAttribute.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlAttribute.cs
index 8af65af..9fe1385 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlAttribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlAttribute.cs
@@ -90,7 +90,7 @@ namespace ICSharpCode.NRefactory.Xml
AXmlElement elem = this.ParentElement;
if (elem != null) {
- return elem.ResolvePrefix(this.Prefix);
+ return elem.LookupNamespace(this.Prefix) ?? NoNamespace;
}
return NoNamespace; // Orphaned attribute
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlDocument.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlDocument.cs
index 66a9795..165c67e 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlDocument.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlDocument.cs
@@ -19,6 +19,7 @@
using System;
using System.Globalization;
using System.Xml;
+using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.NRefactory.Xml
{
@@ -32,16 +33,9 @@ namespace ICSharpCode.NRefactory.Xml
{
}
- /// <inheritdoc/>
- public override XmlReader CreateReader()
- {
- return new AXmlReader(internalObject.NestedObjects);
- }
-
- /// <inheritdoc/>
- public override XmlReader CreateReader(Func<int, TextLocation> offsetToTextLocation)
+ internal override ObjectIterator CreateIteratorForReader()
{
- return new AXmlReader(internalObject.NestedObjects, startOffset, offsetToTextLocation);
+ return new ObjectIterator(internalObject.NestedObjects, startOffset);
}
/// <inheritdoc/>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlElement.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlElement.cs
index c5efae3..d3c3cdc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlElement.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlElement.cs
@@ -20,13 +20,14 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
+using System.Xml;
namespace ICSharpCode.NRefactory.Xml
{
/// <summary>
/// XML element.
/// </summary>
- public class AXmlElement : AXmlObject
+ public class AXmlElement : AXmlObject, IXmlNamespaceResolver
{
internal AXmlElement(AXmlObject parent, int startOffset, InternalElement internalObject)
: base(parent, startOffset, internalObject)
@@ -90,7 +91,7 @@ namespace ICSharpCode.NRefactory.Xml
/// <summary> The part of name before ":" </summary>
/// <returns> Empty string if not found </returns>
public string Prefix {
- get { return ((InternalElement)internalObject).Prefix; }
+ get { return ((InternalElement)internalObject).Prefix; }
}
/// <summary> The part of name after ":" </summary>
@@ -104,26 +105,37 @@ namespace ICSharpCode.NRefactory.Xml
public string Namespace {
get {
string prefix = this.Prefix;
- return ResolvePrefix(prefix);
+ return LookupNamespace(prefix);
}
}
- /// <summary> Find the defualt namespace for this context </summary>
+ /// <summary> Find the default namespace for this context </summary>
+ [Obsolete("Use LookupNamespace(string.Empty) instead")]
public string FindDefaultNamespace()
{
- return ResolvePrefix(string.Empty);
+ return LookupNamespace(string.Empty) ?? NoNamespace;
}
/// <summary>
/// Recursively resolve given prefix in this context. Prefix must have some value.
/// </summary>
/// <returns> Empty string if prefix is not found </returns>
+ [Obsolete("Use LookupNamespace() instead")]
public string ResolvePrefix(string prefix)
{
+ return LookupNamespace(prefix) ?? NoNamespace;
+ }
+
+ /// <summary>
+ /// Recursively resolve given prefix in this context.
+ /// </summary>
+ /// <returns><c>null</c> if prefix is not found</returns>
+ public string LookupNamespace(string prefix)
+ {
if (prefix == null)
throw new ArgumentNullException("prefix");
- // Implicit namesapces
+ // Implicit namespaces
if (prefix == "xml") return XmlNamespace;
if (prefix == "xmlns") return XmlnsNamespace;
@@ -134,7 +146,60 @@ namespace ICSharpCode.NRefactory.Xml
return attr.Value;
}
}
- return NoNamespace; // Can not find prefix
+ return null; // Can not find prefix
+ }
+
+ /// <summary>
+ /// Gets the prefix that is mapped to the specified namespace URI.
+ /// </summary>
+ /// <returns>The prefix that is mapped to the namespace URI; null if the namespace URI is not mapped to a prefix.</returns>
+ public string LookupPrefix(string namespaceName)
+ {
+ if (namespaceName == null)
+ throw new ArgumentNullException("namespaceName");
+
+ if (namespaceName == XmlNamespace)
+ return "xml";
+ if (namespaceName == XmlnsNamespace)
+ return "xmlns";
+ for (AXmlElement current = this; current != null; current = current.Parent as AXmlElement) {
+ foreach (var attr in current.Attributes) {
+ if (attr.Value == namespaceName) {
+ if (attr.Name.StartsWith("xmlns:", StringComparison.Ordinal))
+ return attr.LocalName;
+ else if (attr.Name == "xmlns")
+ return string.Empty;
+ }
+ }
+ }
+ return null; // Can not find prefix
+ }
+
+ /// <summary>
+ /// Gets a collection of defined prefix-namespace mappings that are currently in scope.
+ /// </summary>
+ public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+ {
+ var result = new Dictionary<string, string>();
+ if (scope == XmlNamespaceScope.All) {
+ result["xml"] = XmlNamespace;
+ //result["xmlns"] = XmlnsNamespace; xmlns should not be included in GetNamespacesInScope() results
+ }
+ for (AXmlElement current = this; current != null; current = current.Parent as AXmlElement) {
+ foreach (var attr in current.Attributes) {
+ if (attr.Name.StartsWith("xmlns:", StringComparison.Ordinal)) {
+ string prefix = attr.LocalName;
+ if (!result.ContainsKey(prefix)) {
+ result.Add(prefix, attr.Value);
+ }
+ } else if (attr.Name == "xmlns" && !result.ContainsKey(string.Empty)) {
+ result.Add(string.Empty, attr.Value);
+ }
+ }
+ if (scope == XmlNamespaceScope.Local)
+ break;
+ }
+ return result;
}
/// <summary>
@@ -144,7 +209,7 @@ namespace ICSharpCode.NRefactory.Xml
/// <returns>Null if not found</returns>
public string GetAttributeValue(string localName)
{
- return GetAttributeValue(NoNamespace, localName);
+ return GetAttributeValue(string.Empty, localName);
}
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlObject.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlObject.cs
index 269a54d..c139efd 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlObject.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlObject.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.NRefactory.Xml
public abstract class AXmlObject : ISegment
{
/// <summary> Empty string. The namespace used if there is no "xmlns" specified </summary>
- public static readonly string NoNamespace = string.Empty;
+ internal static readonly string NoNamespace = string.Empty;
/// <summary> Namespace for "xml:" prefix: "http://www.w3.org/XML/1998/namespace" </summary>
public static readonly string XmlNamespace = "http://www.w3.org/XML/1998/namespace";
@@ -54,17 +54,58 @@ namespace ICSharpCode.NRefactory.Xml
/// <summary>
/// Creates an XML reader that reads from this document.
/// </summary>
- public virtual XmlReader CreateReader()
+ /// <remarks>
+ /// The reader will ignore comments and processing instructions; and will not have line information.
+ /// </remarks>
+ public XmlReader CreateReader()
{
- return new AXmlReader(new[] { internalObject });
+ return new AXmlReader(CreateIteratorForReader());
}
/// <summary>
/// Creates an XML reader that reads from this document.
/// </summary>
- public virtual XmlReader CreateReader(Func<int, TextLocation> offsetToTextLocation)
+ /// <param name="settings">Reader settings.
+ /// Currently, only <c>IgnoreComments</c> is supported.</param>
+ /// <remarks>
+ /// The reader will not have line information.
+ /// </remarks>
+ public XmlReader CreateReader(XmlReaderSettings settings)
{
- return new AXmlReader(new[] { internalObject }, startOffset, offsetToTextLocation);
+ return new AXmlReader(CreateIteratorForReader(), settings);
+ }
+
+ /// <summary>
+ /// Creates an XML reader that reads from this document.
+ /// </summary>
+ /// <param name="settings">Reader settings.
+ /// Currently, only <c>IgnoreComments</c> is supported.</param>
+ /// <param name="document">
+ /// The document that was used to parse the XML. It is used to convert offsets to line information.
+ /// </param>
+ public XmlReader CreateReader(XmlReaderSettings settings, IDocument document)
+ {
+ if (document == null)
+ throw new ArgumentNullException("document");
+ return new AXmlReader(CreateIteratorForReader(), settings, document.GetLocation);
+ }
+
+ /// <summary>
+ /// Creates an XML reader that reads from this document.
+ /// </summary>
+ /// <param name="settings">Reader settings.
+ /// Currently, only <c>IgnoreComments</c> is supported.</param>
+ /// <param name="offsetToTextLocation">
+ /// A function for converting offsets to line information.
+ /// </param>
+ public XmlReader CreateReader(XmlReaderSettings settings, Func<int, TextLocation> offsetToTextLocation)
+ {
+ return new AXmlReader(CreateIteratorForReader(), settings, offsetToTextLocation);
+ }
+
+ internal virtual ObjectIterator CreateIteratorForReader()
+ {
+ return new ObjectIterator(new[] { internalObject }, startOffset);
}
/// <summary>
@@ -100,7 +141,7 @@ namespace ICSharpCode.NRefactory.Xml
/// <summary>
/// Gets a child fully containg the given offset.
/// Goes recursively down the tree.
- /// Specail case if at the end of attribute or text
+ /// Special case if at the end of attribute or text
/// </summary>
public AXmlObject GetChildAtOffset(int offset)
{
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlReader.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlReader.cs
index ae50386..de38998 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlReader.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/AXmlReader.cs
@@ -19,7 +19,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Text;
using System.Xml;
+using ICSharpCode.NRefactory.Editor;
namespace ICSharpCode.NRefactory.Xml
{
@@ -29,18 +31,23 @@ namespace ICSharpCode.NRefactory.Xml
sealed class AXmlReader : XmlReader, IXmlLineInfo
{
readonly ObjectIterator objectIterator;
- readonly Func<int, TextLocation> offsetToTextLocation;
- readonly XmlNameTable nameTable = new NameTable();
+ readonly XmlReaderSettings settings;
+ Func<int, TextLocation> offsetToTextLocation;
+ readonly XmlNameTable nameTable;
+ readonly XmlNamespaceManager nsManager;
ReadState readState = ReadState.Initial;
XmlNodeType elementNodeType = XmlNodeType.None;
IList<InternalAttribute> attributes;
int attributeIndex = -1;
bool inAttributeValue;
- internal AXmlReader(InternalObject[] objects, int startPosition = 0, Func<int, TextLocation> offsetToTextLocation = null)
+ internal AXmlReader(ObjectIterator objectIterator, XmlReaderSettings settings = null, Func<int, TextLocation> offsetToTextLocation = null)
{
+ this.objectIterator = objectIterator;
+ this.settings = settings ?? new XmlReaderSettings();
this.offsetToTextLocation = offsetToTextLocation;
- objectIterator = new ObjectIterator(objects, startPosition);
+ this.nameTable = this.settings.NameTable ?? new NameTable();
+ this.nsManager = new XmlNamespaceManager(this.nameTable);
objectIterator.StopAtElementEnd = true;
}
@@ -53,6 +60,10 @@ namespace ICSharpCode.NRefactory.Xml
get { return readState; }
}
+ public override XmlReaderSettings Settings {
+ get { return settings; }
+ }
+
public override bool ReadAttributeValue()
{
if (attributeIndex >= 0 && !inAttributeValue) {
@@ -69,6 +80,7 @@ namespace ICSharpCode.NRefactory.Xml
readState = ReadState.Interactive;
return ReadCurrentPosition();
case ReadState.Interactive:
+ LeaveNode();
objectIterator.MoveInto();
return ReadCurrentPosition();
default:
@@ -88,14 +100,28 @@ namespace ICSharpCode.NRefactory.Xml
elementNodeType = XmlNodeType.None;
return false;
} else if (objectIterator.IsAtElementEnd) {
- elementNodeType = XmlNodeType.EndElement;
- return true;
+ if (IsEmptyElement) {
+ // Don't report EndElement for empty elements
+ nsManager.PopScope();
+ } else {
+ elementNodeType = XmlNodeType.EndElement;
+ return true;
+ }
} else if (obj is InternalElement) {
// element start
elementNodeType = XmlNodeType.Element;
InternalTag startTag = ((InternalTag)obj.NestedObjects[0]);
- if (startTag.NestedObjects != null)
+ nsManager.PushScope();
+ if (startTag.NestedObjects != null) {
attributes = startTag.NestedObjects.OfType<InternalAttribute>().ToList();
+ for (int i = 0; i < attributes.Count; i++) {
+ var attr = attributes[i];
+ if (attr.Name.StartsWith("xmlns:", StringComparison.Ordinal))
+ nsManager.AddNamespace(AXmlObject.GetLocalName(attr.Name), attr.Value);
+ else if (attr.Name == "xmlns")
+ nsManager.AddNamespace(string.Empty, attr.Value);
+ }
+ }
return true;
} else if (obj is InternalText) {
InternalText text = (InternalText)obj;
@@ -106,8 +132,26 @@ namespace ICSharpCode.NRefactory.Xml
}
return true;
} else if (obj is InternalTag) {
- // start/end tags can be skipped as the parent InternalElement already handles them,
- // TODO all other tags (xml decl, comments, ...)
+ InternalTag tag = (InternalTag)obj;
+ if (tag.IsStartOrEmptyTag || tag.IsEndTag) {
+ // start/end tags can be skipped as the parent InternalElement already handles them
+ } else if (tag.IsComment && !settings.IgnoreComments) {
+ elementNodeType = XmlNodeType.Comment;
+ return true;
+ } else if (tag.IsProcessingInstruction && !settings.IgnoreProcessingInstructions) {
+ if (tag.Name == "xml") {
+ elementNodeType = XmlNodeType.XmlDeclaration;
+ attributes = tag.NestedObjects.OfType<InternalAttribute>().ToList();
+ } else {
+ elementNodeType = XmlNodeType.ProcessingInstruction;
+ }
+ return true;
+ } else if (tag.IsCData) {
+ elementNodeType = XmlNodeType.CDATA;
+ return true;
+ } else {
+ // TODO all other tags
+ }
} else {
throw new NotSupportedException();
}
@@ -115,10 +159,18 @@ namespace ICSharpCode.NRefactory.Xml
}
}
+ void LeaveNode()
+ {
+ if (elementNodeType == XmlNodeType.EndElement) {
+ nsManager.PopScope();
+ }
+ }
+
public override void Skip()
{
if (readState == ReadState.Interactive) {
MoveToElement();
+ LeaveNode();
objectIterator.MoveNext();
ReadCurrentPosition();
}
@@ -142,7 +194,9 @@ namespace ICSharpCode.NRefactory.Xml
get {
if (readState != ReadState.Interactive)
return string.Empty;
- return LookupNamespace(this.Prefix);
+ if (attributeIndex >= 0 && !inAttributeValue && attributes[attributeIndex].Name == "xmlns")
+ return AXmlObject.XmlnsNamespace;
+ return LookupNamespace(this.Prefix) ?? string.Empty;
}
}
@@ -155,14 +209,50 @@ namespace ICSharpCode.NRefactory.Xml
return string.Empty;
return nameTable.Add(AXmlObject.GetLocalName(attributes[attributeIndex].Name));
}
- InternalElement element = objectIterator.CurrentObject as InternalElement;
- return element != null ? nameTable.Add(element.LocalName) : string.Empty;
+ string result;
+ switch (elementNodeType) {
+ case XmlNodeType.Element:
+ case XmlNodeType.EndElement:
+ result = ((InternalElement)objectIterator.CurrentObject).LocalName;
+ break;
+ case XmlNodeType.XmlDeclaration:
+ result = "xml";
+ break;
+ default:
+ return string.Empty;
+ }
+ return nameTable.Add(result);
}
}
- public override bool IsEmptyElement {
+ public override string Name {
get {
if (readState != ReadState.Interactive)
+ return string.Empty;
+ if (attributeIndex >= 0) {
+ if (inAttributeValue)
+ return string.Empty;
+ return nameTable.Add(attributes[attributeIndex].Name);
+ }
+ string result;
+ switch (elementNodeType) {
+ case XmlNodeType.Element:
+ case XmlNodeType.EndElement:
+ result = ((InternalElement)objectIterator.CurrentObject).Name;
+ break;
+ case XmlNodeType.XmlDeclaration:
+ result = "xml";
+ break;
+ default:
+ return string.Empty;
+ }
+ return nameTable.Add(result);
+ }
+ }
+
+ public override bool IsEmptyElement {
+ get {
+ if (readState != ReadState.Interactive || attributeIndex >= 0)
return false;
InternalElement element = objectIterator.CurrentObject as InternalElement;
return element != null && element.NestedObjects.Length == 1;
@@ -175,14 +265,51 @@ namespace ICSharpCode.NRefactory.Xml
return string.Empty;
if (attributeIndex >= 0)
return attributes[attributeIndex].Value;
- InternalText text = objectIterator.CurrentObject as InternalText;
- return text != null ? text.Value : string.Empty;
+ switch (elementNodeType) {
+ case XmlNodeType.Text:
+ case XmlNodeType.Whitespace:
+ return ((InternalText)objectIterator.CurrentObject).Value;
+ case XmlNodeType.Comment:
+ case XmlNodeType.CDATA:
+ var nestedObjects = objectIterator.CurrentObject.NestedObjects;
+ if (nestedObjects.Length == 1)
+ return ((InternalText)nestedObjects[0]).Value;
+ else
+ return string.Empty;
+ case XmlNodeType.XmlDeclaration:
+ StringBuilder b = new StringBuilder();
+ foreach (var attr in objectIterator.CurrentObject.NestedObjects.OfType<InternalAttribute>()) {
+ if (b.Length > 0)
+ b.Append(' ');
+ b.Append(attr.Name);
+ b.Append('=');
+ b.Append('"');
+ b.Append(attr.Value);
+ b.Append('"');
+ }
+ return b.ToString();
+ default:
+ return string.Empty;
+ }
}
}
public override bool HasValue {
get {
- return !string.IsNullOrEmpty (Value);
+ if (readState != ReadState.Interactive)
+ return false;
+ if (attributeIndex >= 0)
+ return true;
+ switch (elementNodeType) {
+ case XmlNodeType.Text:
+ case XmlNodeType.Whitespace:
+ case XmlNodeType.Comment:
+ case XmlNodeType.XmlDeclaration:
+ case XmlNodeType.CDATA:
+ return true;
+ default:
+ return false;
+ }
}
}
@@ -251,7 +378,7 @@ namespace ICSharpCode.NRefactory.Xml
if (attributes == null)
return -1;
for (int i = 0; i < attributes.Count; i++) {
- if (AXmlObject.GetLocalName(attributes[i].Name) == name && LookupNamespace(AXmlObject.GetNamespacePrefix(attributes[i].Name)) == ns)
+ if (AXmlObject.GetLocalName(attributes[i].Name) == name && (LookupNamespace(AXmlObject.GetNamespacePrefix(attributes[i].Name)) ?? string.Empty) == ns)
return i;
}
return -1;
@@ -269,7 +396,7 @@ namespace ICSharpCode.NRefactory.Xml
public override string LookupNamespace(string prefix)
{
- return string.Empty; // TODO implement namespace lookup
+ return nsManager.LookupNamespace(prefix);
}
public override string GetAttribute(int i)
@@ -294,12 +421,18 @@ namespace ICSharpCode.NRefactory.Xml
}
public override int Depth {
- get { return objectIterator.Depth; }
+ get {
+ if (attributeIndex < 0)
+ return objectIterator.Depth;
+ else
+ return objectIterator.Depth + (inAttributeValue ? 2 : 1);
+ }
}
public override void Close()
{
readState = ReadState.Closed;
+ offsetToTextLocation = null;
}
public override string BaseURI {
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/ICSharpCode.NRefactory.Xml.csproj b/external/nrefactory/ICSharpCode.NRefactory.Xml/ICSharpCode.NRefactory.Xml.csproj
index aff2555..067943a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/ICSharpCode.NRefactory.Xml.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/ICSharpCode.NRefactory.Xml.csproj
@@ -44,7 +44,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>PdbOnly</DebugType>
- <DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Debug' ">
<Optimize>False</Optimize>
@@ -55,6 +54,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Debug|AnyCPU' ">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Release' ">
<Optimize>True</Optimize>
@@ -64,7 +64,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
<DebugType>PdbOnly</DebugType>
- <DebugSymbols>false</DebugSymbols>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/external/nrefactory/ICSharpCode.NRefactory.Xml/TagReader.cs b/external/nrefactory/ICSharpCode.NRefactory.Xml/TagReader.cs
index 4942330..e5cab93 100644
--- a/external/nrefactory/ICSharpCode.NRefactory.Xml/TagReader.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory.Xml/TagReader.cs
@@ -152,7 +152,7 @@ namespace ICSharpCode.NRefactory.Xml
});
} else {
// Mismatched name - the nesting isn't properly;
- // clear the whole stack so that none of the currently open elements are closed as property-nested.
+ // clear the whole stack so that none of the currently open elements are closed as properly-nested.
elementNameStack.Clear();
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Analysis/AbiComparer.cs b/external/nrefactory/ICSharpCode.NRefactory/Analysis/AbiComparer.cs
new file mode 100644
index 0000000..567f12a
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Analysis/AbiComparer.cs
@@ -0,0 +1,248 @@
+//
+// ABIComparer.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ /// <summary>
+ /// Used to check the compatibility state of two compilations.
+ /// </summary>
+ public enum AbiCompatibility
+ {
+ /// <summary>
+ /// The ABI is equal
+ /// </summary>
+ Equal,
+
+ /// <summary>
+ /// Some items got added, but the ABI remains to be compatible
+ /// </summary>
+ Bigger,
+
+ /// <summary>
+ /// The ABI has changed
+ /// </summary>
+ Incompatible
+ }
+
+ [Serializable]
+ public sealed class AbiEventArgs : EventArgs
+ {
+ public string Message { get; set; }
+
+ public AbiEventArgs(string message)
+ {
+ this.Message = message;
+ }
+ }
+
+ /// <summary>
+ /// The Abi comparer checks the public API of two compilation and determines the compatibility state.
+ /// </summary>
+ public class AbiComparer
+ {
+ public bool StopOnIncompatibility {
+ get;
+ set;
+ }
+ void CheckContstraints(IType otype, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
+ {
+ if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
+ p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
+ p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
+ p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
+ OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of type {0} have changed."), otype.FullName)));
+ compatibility = AbiCompatibility.Incompatible;
+ }
+ }
+
+ void CheckContstraints(IMethod omethod, ITypeParameter p1, ITypeParameter p2, ref AbiCompatibility compatibility)
+ {
+ if (p1.DirectBaseTypes.Count () != p2.DirectBaseTypes.Count () ||
+ p1.HasReferenceTypeConstraint != p2.HasReferenceTypeConstraint ||
+ p1.HasValueTypeConstraint != p2.HasValueTypeConstraint ||
+ p1.HasDefaultConstructorConstraint != p2.HasDefaultConstructorConstraint) {
+ OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type parameter constraints of method {0} have changed."), omethod.FullName)));
+ compatibility = AbiCompatibility.Incompatible;
+ }
+ }
+
+ void CheckTypes (ITypeDefinition oType, ITypeDefinition nType, ref AbiCompatibility compatibility)
+ {
+ int oldMemberCount = 0;
+ Predicate<IUnresolvedMember> pred = null;
+ if (oType.Kind == TypeKind.Class || oType.Kind == TypeKind.Struct)
+ pred = m => (m.IsPublic || m.IsProtected) && !m.IsOverride && !m.IsSynthetic;
+
+ for (int i = 0; i < oType.TypeParameterCount; i++) {
+ CheckContstraints (oType, oType.TypeParameters[i], nType.TypeParameters[i], ref compatibility);
+ if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
+ return;
+ }
+
+ foreach (var member in oType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers)) {
+ var newMember = nType.GetMembers (m => member.UnresolvedMember.Name == m.Name && m.IsPublic == member.IsPublic && m.IsProtected == member.IsProtected);
+ var equalMember = newMember.FirstOrDefault (m => SignatureComparer.Ordinal.Equals (member, m));
+ if (equalMember == null) {
+ compatibility = AbiCompatibility.Incompatible;
+ if (StopOnIncompatibility)
+ return;
+ continue;
+ }
+ var om = member as IMethod;
+ if (om != null) {
+ for (int i = 0; i < om.TypeParameters.Count; i++) {
+ CheckContstraints (om, om.TypeParameters[i], ((IMethod)equalMember).TypeParameters[i], ref compatibility);
+ if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
+ return;
+ }
+ }
+
+ oldMemberCount++;
+ }
+ if (compatibility == AbiCompatibility.Bigger && oType.Kind != TypeKind.Interface)
+ return;
+ if (oldMemberCount != nType.GetMembers (pred, GetMemberOptions.IgnoreInheritedMembers).Count ()) {
+ if (oType.Kind == TypeKind.Interface) {
+ OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Interafce {0} has changed."), oType.FullName)));
+ compatibility = AbiCompatibility.Incompatible;
+ } else {
+ if (compatibility == AbiCompatibility.Equal)
+ compatibility = AbiCompatibility.Bigger;
+ }
+ }
+ }
+
+ void CheckNamespace(INamespace oNs, INamespace nNs, ref AbiCompatibility compatibility)
+ {
+ foreach (var type in oNs.Types) {
+ if (!type.IsPublic && !type.IsProtected)
+ continue;
+ var newType = nNs.GetTypeDefinition (type.Name, type.TypeParameterCount);
+ if (newType == null) {
+ OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Type definition {0} is missing."), type.FullName)));
+ compatibility = AbiCompatibility.Incompatible;
+ if (StopOnIncompatibility)
+ return;
+ continue;
+ }
+ CheckTypes (type, newType, ref compatibility);
+ if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
+ return;
+ }
+
+ if (compatibility == AbiCompatibility.Bigger)
+ return;
+ foreach (var type in nNs.Types) {
+ if (!type.IsPublic && !type.IsProtected)
+ continue;
+ if (oNs.GetTypeDefinition (type.Name, type.TypeParameterCount) == null) {
+ if (compatibility == AbiCompatibility.Equal)
+ compatibility = AbiCompatibility.Bigger;
+ return;
+ }
+ }
+ }
+
+ static bool ContainsPublicTypes(INamespace testNs)
+ {
+ var stack = new Stack<INamespace> ();
+ stack.Push (testNs);
+ while (stack.Count > 0) {
+ var ns = stack.Pop ();
+ if (ns.Types.Any (t => t.IsPublic))
+ return true;
+ foreach (var child in ns.ChildNamespaces)
+ stack.Push (child);
+ }
+ return false;
+ }
+
+ /// <summary>
+ /// Check the specified oldProject and newProject if they're compatible.
+ /// </summary>
+ /// <param name="oldProject">Old project.</param>
+ /// <param name="newProject">New project.</param>
+ public AbiCompatibility Check (ICompilation oldProject, ICompilation newProject)
+ {
+ var oldStack = new Stack<INamespace> ();
+ var newStack = new Stack<INamespace> ();
+ oldStack.Push (oldProject.MainAssembly.RootNamespace);
+ newStack.Push (newProject.MainAssembly.RootNamespace);
+
+ AbiCompatibility compatibility = AbiCompatibility.Equal;
+ while (oldStack.Count > 0) {
+ var oNs = oldStack.Pop ();
+ var nNs = newStack.Pop ();
+
+ CheckNamespace (oNs, nNs, ref compatibility);
+ if (compatibility == AbiCompatibility.Incompatible && StopOnIncompatibility)
+ return AbiCompatibility.Incompatible;
+ foreach (var child in oNs.ChildNamespaces) {
+ var newChild = nNs.GetChildNamespace (child.Name);
+ if (newChild == null) {
+ OnIncompatibilityFound (new AbiEventArgs (string.Format (TranslateString ("Namespace {0} is missing."), child.FullName)));
+ if (StopOnIncompatibility)
+ return AbiCompatibility.Incompatible;
+ continue;
+ }
+ oldStack.Push (child);
+ newStack.Push (newChild);
+ }
+
+ // check if namespaces are added
+ if (compatibility != AbiCompatibility.Bigger) {
+ foreach (var child in nNs.ChildNamespaces) {
+ if (oNs.GetChildNamespace (child.Name) == null) {
+ if (compatibility == AbiCompatibility.Equal && ContainsPublicTypes (child))
+ compatibility = AbiCompatibility.Bigger;
+ break;
+ }
+ }
+ }
+ }
+ return compatibility;
+ }
+
+ public virtual string TranslateString(string str)
+ {
+ return str;
+ }
+
+ public event EventHandler<AbiEventArgs> IncompatibilityFound;
+
+ protected virtual void OnIncompatibilityFound(AbiEventArgs e)
+ {
+ var handler = IncompatibilityFound;
+ if (handler != null)
+ handler(this, e);
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Analysis/SymbolCollector.cs b/external/nrefactory/ICSharpCode.NRefactory/Analysis/SymbolCollector.cs
new file mode 100644
index 0000000..7a8959e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Analysis/SymbolCollector.cs
@@ -0,0 +1,160 @@
+// Copyright (c) 2013 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 ICSharpCode.NRefactory.TypeSystem;
+using System.Linq;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ /// <summary>
+ /// The symbol collector collects related symbols that form a group of symbols that should be renamed
+ /// when a name of one symbol changes. For example if a type definition name should be changed
+ /// the constructors and destructor names should change as well.
+ /// </summary>
+ public class SymbolCollector
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether this <see cref="ICSharpCode.NRefactory.Analysis.SymbolCollector"/> should include overloads.
+ /// </summary>
+ /// <value><c>true</c> if overloads should be included; otherwise, <c>false</c>.</value>
+ public bool IncludeOverloads {
+ get;
+ set;
+ }
+
+ public bool GroupForRenaming {
+ get;
+ set;
+ }
+
+ static IEnumerable<ISymbol> CollectTypeRelatedMembers (ITypeDefinition type)
+ {
+ yield return type;
+ foreach (var c in type.GetDefinition ().GetMembers (m => !m.IsSynthetic && (m.SymbolKind == SymbolKind.Constructor || m.SymbolKind == SymbolKind.Destructor), GetMemberOptions.IgnoreInheritedMembers)) {
+ yield return c;
+ }
+ }
+
+ static IEnumerable<ISymbol> CollectOverloads (TypeGraph g, IMethod method)
+ {
+ return method.DeclaringType
+ .GetMethods (m => m.Name == method.Name)
+ .Where (m => m != method);
+ }
+
+ static IMember SearchMember (ITypeDefinition derivedType, IMember method)
+ {
+ foreach (var m in derivedType.Members) {
+ if (m.ImplementedInterfaceMembers.Contains (method))
+ return m;
+ }
+ return null;
+ }
+
+ static IEnumerable<ISymbol> MakeUnique (List<ISymbol> symbols)
+ {
+ HashSet<ISymbol> taken = new HashSet<ISymbol> ();
+ foreach (var sym in symbols) {
+ if (taken.Contains (sym))
+ continue;
+ taken.Add (sym);
+ yield return sym;
+ }
+ }
+
+ /// <summary>
+ /// Gets the related symbols.
+ /// </summary>
+ /// <returns>The related symbols.</returns>
+ /// <param name="g">The type graph.</param>
+ /// <param name="m">The symbol to search</param>
+ public IEnumerable<ISymbol> GetRelatedSymbols(TypeGraph g, ISymbol m)
+ {
+ switch (m.SymbolKind) {
+ case SymbolKind.TypeDefinition:
+ return CollectTypeRelatedMembers ((ITypeDefinition)m);
+
+ case SymbolKind.Field:
+ case SymbolKind.Operator:
+ case SymbolKind.Variable:
+ case SymbolKind.Parameter:
+ case SymbolKind.TypeParameter:
+ return new ISymbol[] { m };
+
+ case SymbolKind.Constructor:
+ if (GroupForRenaming)
+ return GetRelatedSymbols (g, ((IMethod)m).DeclaringTypeDefinition);
+ List<ISymbol> constructorSymbols = new List<ISymbol> ();
+ if (IncludeOverloads) {
+ foreach (var m3 in CollectOverloads (g, (IMethod)m)) {
+ constructorSymbols.Add (m3);
+ }
+ }
+ return constructorSymbols;
+
+ case SymbolKind.Destructor:
+ if (GroupForRenaming)
+ return GetRelatedSymbols (g, ((IMethod)m).DeclaringTypeDefinition);
+ return new ISymbol[] { m };
+
+ case SymbolKind.Indexer:
+ case SymbolKind.Event:
+ case SymbolKind.Property:
+ case SymbolKind.Method: {
+ var member = (IMember)m;
+ List<ISymbol> symbols = new List<ISymbol> ();
+ if (member.ImplementedInterfaceMembers.Count > 0) {
+ foreach (var m2 in member.ImplementedInterfaceMembers) {
+ symbols.AddRange (GetRelatedSymbols (g, m2));
+ }
+ } else {
+ symbols.Add (member);
+ }
+
+ if (member.DeclaringType.Kind == TypeKind.Interface) {
+ foreach (var derivedType in g.GetNode (member.DeclaringTypeDefinition).DerivedTypes) {
+ var mem = SearchMember (derivedType.TypeDefinition, member);
+ if (mem != null)
+ symbols.Add (mem);
+ }
+ }
+
+
+ if (IncludeOverloads) {
+ IncludeOverloads = false;
+ if (member is IMethod) {
+ foreach (var m3 in CollectOverloads (g, (IMethod)member)) {
+ symbols.AddRange (GetRelatedSymbols (g, m3));
+ }
+ } else if (member.SymbolKind == SymbolKind.Indexer) {
+ symbols.AddRange (member.DeclaringTypeDefinition.GetProperties (p => p.IsIndexer));
+ }
+ }
+ return MakeUnique (symbols);
+ }
+ case SymbolKind.Namespace:
+ // TODO?
+ return new ISymbol[] { m };
+ default:
+ throw new ArgumentOutOfRangeException ("symbol:"+m.SymbolKind);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraph.cs b/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraph.cs
new file mode 100644
index 0000000..12e8abf
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraph.cs
@@ -0,0 +1,82 @@
+// Copyright (c) 2013 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 ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ /// <summary>
+ /// A graph where type definitions are nodes; and edges are given by inheritance.
+ /// </summary>
+ public class TypeGraph
+ {
+ Dictionary<AssemblyQualifiedTypeName, TypeGraphNode> dict;
+
+ /// <summary>
+ /// Builds a graph of all type definitions in the specified set of assemblies.
+ /// </summary>
+ /// <param name="assemblies">The input assemblies. The assemblies may belong to multiple compilations.</param>
+ /// <remarks>The resulting graph may be cyclic if there are cyclic type definitions.</remarks>
+ public TypeGraph(IEnumerable<IAssembly> assemblies)
+ {
+ if (assemblies == null)
+ throw new ArgumentNullException("assemblies");
+ dict = new Dictionary<AssemblyQualifiedTypeName, TypeGraphNode>();
+ foreach (IAssembly assembly in assemblies) {
+ foreach (ITypeDefinition typeDef in assembly.GetAllTypeDefinitions()) {
+ // Overwrite previous entry - duplicates can occur if there are multiple versions of the
+ // same project loaded in the solution (e.g. separate .csprojs for separate target frameworks)
+ dict[new AssemblyQualifiedTypeName(typeDef)] = new TypeGraphNode(typeDef);
+ }
+ }
+ foreach (IAssembly assembly in assemblies) {
+ foreach (ITypeDefinition typeDef in assembly.GetAllTypeDefinitions()) {
+ TypeGraphNode typeNode = dict[new AssemblyQualifiedTypeName(typeDef)];
+ foreach (IType baseType in typeDef.DirectBaseTypes) {
+ ITypeDefinition baseTypeDef = baseType.GetDefinition();
+ if (baseTypeDef != null) {
+ TypeGraphNode baseTypeNode;
+ if (dict.TryGetValue(new AssemblyQualifiedTypeName(baseTypeDef), out baseTypeNode)) {
+ typeNode.BaseTypes.Add(baseTypeNode);
+ baseTypeNode.DerivedTypes.Add(typeNode);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public TypeGraphNode GetNode(ITypeDefinition typeDefinition)
+ {
+ if (typeDefinition == null)
+ return null;
+ return GetNode(new AssemblyQualifiedTypeName(typeDefinition));
+ }
+
+ public TypeGraphNode GetNode(AssemblyQualifiedTypeName typeName)
+ {
+ TypeGraphNode node;
+ if (dict.TryGetValue(typeName, out node))
+ return node;
+ else
+ return null;
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraphNode.cs b/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraphNode.cs
new file mode 100644
index 0000000..7b562d5
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Analysis/TypeGraphNode.cs
@@ -0,0 +1,51 @@
+// Copyright (c) 2013 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 ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.NRefactory.Analysis
+{
+ public sealed class TypeGraphNode
+ {
+ readonly ITypeDefinition typeDef;
+ readonly List<TypeGraphNode> baseTypes = new List<TypeGraphNode>();
+ readonly List<TypeGraphNode> derivedTypes = new List<TypeGraphNode>();
+
+ /// <summary>
+ /// Creates a new unconnected type graph node.
+ /// </summary>
+ public TypeGraphNode(ITypeDefinition typeDef)
+ {
+ this.typeDef = typeDef;
+ }
+
+ public ITypeDefinition TypeDefinition {
+ get { return typeDef; }
+ }
+
+ public IList<TypeGraphNode> DerivedTypes {
+ get { return derivedTypes; }
+ }
+
+ public IList<TypeGraphNode> BaseTypes {
+ get { return baseTypes; }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Completion/DisplayFlags.cs b/external/nrefactory/ICSharpCode.NRefactory/Completion/DisplayFlags.cs
index a94db3f..fbb66b1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Completion/DisplayFlags.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Completion/DisplayFlags.cs
@@ -33,7 +33,8 @@ namespace ICSharpCode.NRefactory.Completion
None = 0,
Hidden = 1,
Obsolete = 2,
- DescriptionHasMarkup = 4
+ DescriptionHasMarkup = 4,
+ NamedArgument = 8
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Completion/FrameworkLookup.cs b/external/nrefactory/ICSharpCode.NRefactory/Completion/FrameworkLookup.cs
new file mode 100644
index 0000000..705110e
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Completion/FrameworkLookup.cs
@@ -0,0 +1,485 @@
+//
+// FrameworkLookup.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+
+namespace ICSharpCode.NRefactory.Completion
+{
+ /// <summary>
+ /// The framework lookup provides a fast lookup where an unknow type or extension method may be defined in.
+ /// </summary>
+ public sealed class FrameworkLookup
+ {
+ /* Binary format:
+ * [Header]
+ * [Version] : [Major (byte)] [Minor (byte)] [Build (byte)]
+ * [#Types (int)]
+ * [#Methods (int)]
+ * [#Assemblies (int)]
+ * [AssemblyListTable] : #Assemblies x [OffsetToAssemblyLists (int)]
+ * [TypeLookupTable] : #Types x ( [NameHash (int)] [AssemblyPtrToAssemblyListTable (ushort)]
+ * [ExtMethodLookupTable] : #Methods x ( [NameHash (int)] [AssemblyPtrToAssemblyListTable (ushort)]
+ * [AssemblyLists]
+ * [#Count (byte)]
+ * #Count x [AssemblyLookup] : [Package (string)] [FullName (string)] [Namespace (string)]
+ */
+ const int headerSize =
+ 3 + // Version
+ 4 + // #Types
+ 4 + // #Methods
+ 4 // #Assembly
+ /*+ 4*/;
+
+ public static readonly Version CurrentVersion = new Version (2, 0, 1);
+ public static readonly FrameworkLookup Empty = new FrameworkLookup ();
+
+ string fileName;
+ int[] assemblyListTable;
+ int[] typeLookupTable;
+ int[] extLookupTable;
+
+ /// <summary>
+ /// This method tries to get a matching extension method.
+ /// </summary>
+ /// <returns>The extension method lookups.</returns>
+ /// <param name="resolveResult">The resolve result.</param>
+ public IEnumerable<AssemblyLookup> GetExtensionMethodLookups (UnknownMemberResolveResult resolveResult)
+ {
+ return GetLookup (resolveResult.MemberName, extLookupTable, headerSize + assemblyListTable.Length * 4 + typeLookupTable.Length * 8);
+ }
+
+ /// <summary>
+ /// Tries to get a type out of an unknow identifier result.
+ /// </summary>
+ /// <returns>The assemblies the type may be defined (if any).</returns>
+ /// <param name="resolveResult">The resolve result.</param>
+ /// <param name="typeParameterCount">Type parameter count.</param>
+ /// <param name="isInsideAttributeType">If set to <c>true</c> this resolve result may be inside an attribute.</param>
+ public IEnumerable<AssemblyLookup> GetLookups (UnknownIdentifierResolveResult resolveResult, int typeParameterCount, bool isInsideAttributeType)
+ {
+ string name = isInsideAttributeType ? resolveResult.Identifier + "Attribute" : resolveResult.Identifier;
+
+ var identifier = GetIdentifier (name, typeParameterCount);
+ return GetLookup (identifier, typeLookupTable, headerSize + assemblyListTable.Length * 4);
+ }
+
+ /// <summary>
+ /// Tries to get a type out of an unknow member resolve result. (In case of fully qualified names)
+ /// </summary>
+ /// <returns>The assemblies the type may be defined (if any).</returns>
+ /// <param name="resolveResult">The resolve result.</param>
+ /// <param name="typeParameterCount">Type parameter count.</param>
+ /// <param name="isInsideAttributeType">If set to <c>true</c> this resolve result may be inside an attribute.</param>
+ public IEnumerable<AssemblyLookup> GetLookups (UnknownMemberResolveResult resolveResult, string fullMemberName, int typeParameterCount, bool isInsideAttributeType)
+ {
+ string name = isInsideAttributeType ? resolveResult.MemberName + "Attribute" : resolveResult.MemberName;
+
+ var identifier = GetIdentifier (name, typeParameterCount);
+ foreach (var lookup in GetLookup (identifier, typeLookupTable, headerSize + assemblyListTable.Length * 4)) {
+ if (fullMemberName.StartsWith (lookup.Namespace, StringComparison.Ordinal))
+ yield return lookup;
+ }
+ }
+
+ /// <summary>
+ /// The assembly lookup determines where a type might be defined.
+ /// It contains the assembly & the namespace.
+ /// </summary>
+ public struct AssemblyLookup
+ {
+ readonly string nspace;
+
+ /// <summary>
+ /// The namespace the requested type is in.
+ /// </summary>
+ public string Namespace {
+ get {
+ return nspace;
+ }
+ }
+
+ readonly string fullName;
+ /// <summary>
+ /// Gets the full name af the assembly.
+ /// </summary>
+ public string FullName {
+ get {
+ return fullName;
+ }
+ }
+
+ readonly string package;
+ /// <summary>
+ /// Gets the package the assembly is in.
+ /// </summary>
+ public string Package {
+ get {
+ return package;
+ }
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AssemblyLookup"/> struct.
+ /// </summary>
+ /// <param name="package">The package name.</param>
+ /// <param name="fullName">The full name of the assembly.</param>
+ /// <param name="nspace">The namespace the type is in.</param>
+ internal AssemblyLookup (string package, string fullName, string nspace)
+ {
+ if (nspace == null)
+ throw new ArgumentNullException ("nspace");
+ if (fullName == null)
+ throw new ArgumentNullException ("fullName");
+ this.package = package;
+ this.fullName = fullName;
+ this.nspace = nspace;
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[AssemblyLookup: Namespace={0}, FullName={1}, Package={2}]", Namespace, FullName, Package);
+ }
+
+ public override bool Equals (object obj)
+ {
+ if (obj == null)
+ return false;
+ // if (ReferenceEquals (this, obj))
+ // return true;
+ if (obj.GetType () != typeof(AssemblyLookup))
+ return false;
+ var other = (AssemblyLookup)obj;
+ return Namespace == other.Namespace && FullName == other.FullName && Package == other.Package;
+ }
+
+ public override int GetHashCode ()
+ {
+ unchecked {
+ return (Namespace != null ? Namespace.GetHashCode () : 0) ^
+ (FullName != null ? FullName.GetHashCode () : 0) ^
+ (Package != null ? Package.GetHashCode () : 0);
+ }
+ }
+ }
+
+ /// <summary>
+ /// This method returns a new framework builder to build a new framework lookup data file.
+ /// </summary>
+ /// <param name="fileName">The file name of the data file.</param>
+ public static FrameworkBuilder Create (string fileName)
+ {
+ return new FrameworkBuilder (fileName);
+ }
+
+ /// <summary>
+ /// Loads a framework lookup object from a file. May return null, if the file wasn't found or has a version mismatch.
+ /// </summary>
+ /// <param name="fileName">File name.</param>
+ public static FrameworkLookup Load (string fileName)
+ {
+ try {
+ if (!File.Exists (fileName))
+ return null;
+ } catch (Exception) {
+ return null;
+ }
+ var result = new FrameworkLookup ();
+ result.fileName = fileName;
+ var fs = File.OpenRead (fileName);
+ using (var reader = new BinaryReader (fs, Encoding.UTF8)) {
+ var major = reader.ReadByte ();
+ var minor = reader.ReadByte ();
+ var build = reader.ReadByte ();
+ var version = new Version (major, minor, build);
+ if (version != CurrentVersion)
+ return null;
+ int typeLookupListCount = reader.ReadInt32 ();
+ int extLookupListCount = reader.ReadInt32 ();
+ int assemblyLookupCount = reader.ReadInt32 ();
+
+ result.assemblyListTable = new int[assemblyLookupCount];
+ for (int i = 0; i < assemblyLookupCount; i++) {
+ result.assemblyListTable[i] = reader.ReadInt32 ();
+ }
+
+ result.typeLookupTable = new int[typeLookupListCount];
+ for (int i = 0; i < typeLookupListCount; i++) {
+ result.typeLookupTable [i] = reader.ReadInt32 ();
+ // skip list offset
+ reader.ReadInt32 ();
+ }
+
+ result.extLookupTable = new int[extLookupListCount];
+ for (int i = 0; i < extLookupListCount; i++) {
+ result.extLookupTable [i] = reader.ReadInt32 ();
+ // skip list offset
+ reader.ReadInt32 ();
+ }
+ }
+ return result;
+ }
+
+ FrameworkLookup ()
+ {
+ }
+
+ IEnumerable<AssemblyLookup> GetLookup (string identifier, int[] lookupTable, int tableOffset)
+ {
+ if (lookupTable == null)
+ yield break;
+
+ int index = Array.BinarySearch (lookupTable, GetStableHashCode (identifier));
+ if (index < 0)
+ yield break;
+
+ using (var reader = new BinaryReader (File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8)) {
+ reader.BaseStream.Seek (tableOffset + index * 8 + 4, SeekOrigin.Begin);
+ int listPtr = reader.ReadInt32 ();
+
+ reader.BaseStream.Seek (listPtr, SeekOrigin.Begin);
+ var b = reader.ReadInt32 ();
+ while (b --> 0) {
+ var assembly = reader.ReadUInt16 ();
+ if (assembly < 0 || assembly >= assemblyListTable.Length)
+ throw new InvalidDataException ("Assembly lookup was " + assembly + " but only " + assemblyListTable.Length + " are known.");
+ reader.BaseStream.Seek (assemblyListTable [assembly], SeekOrigin.Begin);
+
+ var package = reader.ReadString ();
+ var fullName = reader.ReadString ();
+ var ns = reader.ReadString ();
+ yield return new AssemblyLookup (package, fullName, ns);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Retrieves a hash code for the specified string that is stable across
+ /// .NET upgrades.
+ ///
+ /// Use this method instead of the normal <c>string.GetHashCode</c> if the hash code
+ /// is persisted to disk.
+ /// </summary>
+ static int GetStableHashCode(string text)
+ {
+ unchecked {
+ int h = 0;
+ foreach (char c in text) {
+ h = (h << 5) - h + c;
+ }
+ return h;
+ }
+ }
+
+ static string GetIdentifier (string identifier, int tc)
+ {
+ if (tc == 0)
+ return identifier;
+ return identifier + "`" + tc;
+ }
+
+ public class FrameworkBuilder : IDisposable
+ {
+ readonly string fileName;
+
+ Dictionary<int, List<ushort>> typeLookup = new Dictionary<int, List<ushort>> ();
+ Dictionary<int, List<ushort>> extensionMethodLookup = new Dictionary<int, List<ushort>> ();
+ List<AssemblyLookup> assemblyLookups = new List<AssemblyLookup> ();
+ Dictionary<int, string> methodCheck = new Dictionary<int, string> ();
+ Dictionary<int, string> typeCheck = new Dictionary<int, string> ();
+
+ internal FrameworkBuilder (string fileName)
+ {
+ this.fileName = fileName;
+ }
+
+ static int[] WriteTable (MemoryStream stream, Dictionary<int, List<ushort>> table, out List<KeyValuePair<int, List<ushort>>> list)
+ {
+ list = new List<KeyValuePair<int, List<ushort>>> (table);
+ list.Sort ((x, y) => x.Key.CompareTo (y.Key));
+
+ var result = new int[list.Count];
+ using (var bw = new BinaryWriter (stream)) {
+ for (int i = 0; i < result.Length; i++) {
+ result [i] = (int)stream.Length;
+ bw.Write (list [i].Value.Count);
+ foreach (var ii in list [i].Value)
+ bw.Write (ii);
+ }
+ }
+
+ return result;
+ }
+
+ #region IDisposable implementation
+
+ void IDisposable.Dispose ()
+ {
+ var typeLookupMemory = new MemoryStream ();
+ List<KeyValuePair<int, List<ushort>>> typeLookupList;
+ var typeTable = WriteTable (typeLookupMemory, typeLookup, out typeLookupList);
+
+ var extMethodLookupMemory = new MemoryStream ();
+ List<KeyValuePair<int, List<ushort>>> extMethodLookuplist;
+ var extMethodTable = WriteTable (extMethodLookupMemory, extensionMethodLookup, out extMethodLookuplist);
+
+ var assemblyLookupMemory = new MemoryStream ();
+ var assemblyPositionTable = new int[assemblyLookups.Count];
+ using (var writer = new BinaryWriter (assemblyLookupMemory, Encoding.UTF8)) {
+ for (int i = 0; i < assemblyLookups.Count; i++) {
+ var lookup = assemblyLookups[i];
+ assemblyPositionTable[i] = (int)assemblyLookupMemory.Length;
+ writer.Write (lookup.Package);
+ writer.Write (lookup.FullName);
+ writer.Write (lookup.Namespace);
+ }
+ }
+
+ using (var stream = new BinaryWriter (File.OpenWrite (fileName), Encoding.UTF8)) {
+ stream.Write ((byte)CurrentVersion.Major);
+ stream.Write ((byte)CurrentVersion.Minor);
+ stream.Write ((byte)CurrentVersion.Build);
+
+ stream.Write (typeLookupList.Count);
+ stream.Write (extMethodLookuplist.Count);
+ stream.Write (assemblyLookups.Count);
+
+ var typeBuffer = typeLookupMemory.ToArray ();
+ var extMethodBuffer = extMethodLookupMemory.ToArray ();
+
+ int dataOffset =
+ headerSize +
+ assemblyLookups.Count * 4 +
+ typeLookupList.Count * (4 + 4) +
+ extMethodLookuplist.Count * (4 + 4);
+
+ for (int i = 0; i < assemblyLookups.Count; i++) {
+ stream.Write ((int)(dataOffset + typeBuffer.Length + extMethodBuffer.Length + assemblyPositionTable[i]));
+ }
+
+ for (int i = 0; i < typeLookupList.Count; i++) {
+ stream.Write (typeLookupList [i].Key);
+ stream.Write (dataOffset + typeTable[i]);
+ }
+
+ for (int i = 0; i < extMethodLookuplist.Count; i++) {
+ stream.Write (extMethodLookuplist [i].Key);
+ stream.Write (dataOffset + typeBuffer.Length + extMethodTable[i]);
+ }
+
+ stream.Write (typeBuffer);
+ stream.Write (extMethodBuffer);
+ stream.Write (assemblyLookupMemory.ToArray ());
+ stream.Flush ();
+ }
+ }
+ #endregion
+
+ struct FrameworkLookupId
+ {
+ public string PackageName;
+ public string AssemblyName;
+ public string NameSpace;
+ }
+
+ Dictionary<FrameworkLookupId, ushort> frameworkLookupTable = new Dictionary<FrameworkLookupId, ushort> ();
+ ushort GetLookup (string packageName, string assemblyName, string ns)
+ {
+ var id = new FrameworkLookupId {
+ PackageName = packageName,
+ AssemblyName = assemblyName,
+ NameSpace = ns
+ };
+ ushort value;
+ if (frameworkLookupTable.TryGetValue (id, out value))
+ return value;
+
+ var result = new AssemblyLookup (packageName, assemblyName, ns);
+ assemblyLookups.Add (result);
+ var index = assemblyLookups.Count - 1;
+ if (index > ushort.MaxValue)
+ throw new InvalidOperationException ("Assembly lookup list overflow > " + ushort.MaxValue + " assemblies.");
+ frameworkLookupTable.Add (id, (ushort)index);
+ return (ushort)index;
+ }
+
+ bool AddToTable (string packageName, string assemblyName, Dictionary<int, List<ushort>> table, Dictionary<int, string> checkTable, string id, string ns)
+ {
+ List<ushort> list;
+ var hash = GetStableHashCode (id);
+
+ if (!table.TryGetValue (hash, out list)) {
+ list = new List<ushort> ();
+ table [hash] = list;
+ } else {
+ string existingString;
+ if (checkTable.TryGetValue (hash, out existingString)) {
+ if (existingString != id)
+ throw new InvalidOperationException ("Duplicate hash for " + existingString + " and "+ id);
+ } else {
+ checkTable.Add (hash, id);
+ }
+ }
+ var assemblyLookup = GetLookup (packageName, assemblyName, ns);
+ if (!list.Any (a => a.Equals (assemblyLookup))) {
+ list.Add (assemblyLookup);
+ return true;
+ }
+ return false;
+ }
+
+ /// <summary>
+ /// Add a type to the framework lookup.
+ /// </summary>
+ /// <param name="packageName">The package the assembly of the type is defined (can be null).</param>
+ /// <param name="fullAssemblyName">The full assembly name the type is defined (needs to be != null).</param>
+ /// <param name="type">The type definition (needs to be != null).</param>
+ public void AddLookup (string packageName, string fullAssemblyName, IUnresolvedTypeDefinition type)
+ {
+ if (fullAssemblyName == null)
+ throw new ArgumentNullException ("fullAssemblyName");
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ var id = GetIdentifier (type.Name, type.TypeParameters.Count);
+ if (AddToTable (packageName, fullAssemblyName, typeLookup, typeCheck, id, type.Namespace)) {
+ if (type.IsSealed || type.IsStatic) {
+ foreach (var method in type.Methods) {
+ var m = method as DefaultUnresolvedMethod;
+ if (m == null || !m.IsExtensionMethod)
+ continue;
+ AddToTable (packageName, fullAssemblyName, extensionMethodLookup, methodCheck, method.Name, method.DeclaringTypeDefinition.Namespace);
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Documentation/GetPotentiallyNestedClassTypeReference.cs b/external/nrefactory/ICSharpCode.NRefactory/Documentation/GetPotentiallyNestedClassTypeReference.cs
index 6f45237..1e5807d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Documentation/GetPotentiallyNestedClassTypeReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Documentation/GetPotentiallyNestedClassTypeReference.cs
@@ -19,6 +19,7 @@
using System;
using System.Linq;
using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.Documentation
{
@@ -60,7 +61,11 @@ namespace ICSharpCode.NRefactory.Documentation
return typeDef;
}
}
- return null;
+ int idx = typeName.LastIndexOf('.');
+ if (idx < 0)
+ return new UnknownType("", typeName, typeParameterCount);
+ // give back a guessed namespace/type name
+ return new UnknownType(typeName.Substring(0, idx), typeName.Substring(idx + 1), typeParameterCount);
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringMemberReference.cs b/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringMemberReference.cs
index 4fb832b..025e51a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringMemberReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringMemberReference.cs
@@ -37,21 +37,21 @@ namespace ICSharpCode.NRefactory.Documentation
bool CanMatch(IUnresolvedMember member)
{
- switch (member.EntityType) {
- case EntityType.Field:
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
return memberType == 'F';
- case EntityType.Property:
- case EntityType.Indexer:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
return memberType == 'P';
- case EntityType.Event:
+ case SymbolKind.Event:
return memberType == 'E';
- case EntityType.Method:
- case EntityType.Operator:
- case EntityType.Constructor:
- case EntityType.Destructor:
+ case SymbolKind.Method:
+ case SymbolKind.Operator:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
return memberType == 'M';
default:
- throw new NotSupportedException(member.EntityType.ToString());
+ throw new NotSupportedException(member.SymbolKind.ToString());
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringProvider.cs b/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringProvider.cs
index a83f7f6..9b27593 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringProvider.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Documentation/IdStringProvider.cs
@@ -38,19 +38,19 @@ namespace ICSharpCode.NRefactory.Documentation
public static string GetIdString(this IEntity entity)
{
StringBuilder b = new StringBuilder();
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
b.Append("T:");
AppendTypeName(b, (ITypeDefinition)entity, false);
return b.ToString();
- case EntityType.Field:
+ case SymbolKind.Field:
b.Append("F:");
break;
- case EntityType.Property:
- case EntityType.Indexer:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
b.Append("P:");
break;
- case EntityType.Event:
+ case SymbolKind.Event:
b.Append("E:");
break;
default:
@@ -80,7 +80,7 @@ namespace ICSharpCode.NRefactory.Documentation
}
b.Append(')');
}
- if (member.EntityType == EntityType.Operator && (member.Name == "op_Implicit" || member.Name == "op_Explicit")) {
+ if (member.SymbolKind == SymbolKind.Operator && (member.Name == "op_Implicit" || member.Name == "op_Explicit")) {
b.Append('~');
AppendTypeName(b, member.ReturnType, false);
}
@@ -110,7 +110,7 @@ namespace ICSharpCode.NRefactory.Documentation
b.Append(tp.Name);
} else {
b.Append('`');
- if (tp.OwnerType == EntityType.Method)
+ if (tp.OwnerType == SymbolKind.Method)
b.Append('`');
b.Append(tp.Index);
}
@@ -285,11 +285,11 @@ namespace ICSharpCode.NRefactory.Documentation
// method type parameter reference
pos++;
int index = ReflectionHelper.ReadTypeParameterCount(reflectionTypeName, ref pos);
- result = TypeParameterReference.Create(EntityType.Method, index);
+ result = TypeParameterReference.Create(SymbolKind.Method, index);
} else {
// class type parameter reference
int index = ReflectionHelper.ReadTypeParameterCount(reflectionTypeName, ref pos);
- result = TypeParameterReference.Create(EntityType.TypeDefinition, index);
+ result = TypeParameterReference.Create(SymbolKind.TypeDefinition, index);
}
} else {
// not a type parameter reference: read the actual type name
@@ -360,6 +360,7 @@ namespace ICSharpCode.NRefactory.Documentation
} while (typeName[pos] == ',');
if (typeName[pos] != '}')
throw new ReflectionNameParseException(pos, "Expected '}'");
+ pos++;
}
return shortTypeName;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Editor/UnicodeNewline.cs b/external/nrefactory/ICSharpCode.NRefactory/Editor/UnicodeNewline.cs
new file mode 100644
index 0000000..48ea714
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Editor/UnicodeNewline.cs
@@ -0,0 +1,251 @@
+//
+// UnicodeNewline.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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;
+
+namespace ICSharpCode.NRefactory
+{
+ public enum UnicodeNewline {
+ Unknown,
+
+ /// <summary>
+ /// Line Feed, U+000A
+ /// </summary>
+ LF = 0x0A,
+
+
+ CRLF = 0x0D0A,
+
+ /// <summary>
+ /// Carriage Return, U+000D
+ /// </summary>
+ CR = 0x0D,
+
+ /// <summary>
+ /// Next Line, U+0085
+ /// </summary>
+ NEL = 0x85,
+
+ /// <summary>
+ /// Vertical Tab, U+000B
+ /// </summary>
+ VT = 0x0B,
+
+ /// <summary>
+ /// Form Feed, U+000C
+ /// </summary>
+ FF = 0x0C,
+
+ /// <summary>
+ /// Line Separator, U+2028
+ /// </summary>
+ LS = 0x2028,
+
+ /// <summary>
+ /// Paragraph Separator, U+2029
+ /// </summary>
+ PS = 0x2029
+ }
+
+
+ /// <summary>
+ /// Defines unicode new lines according to Unicode Technical Report #13
+ /// http://www.unicode.org/standard/reports/tr13/tr13-5.html
+ /// </summary>
+ public static class NewLine
+ {
+ /// <summary>
+ /// Carriage Return, U+000D
+ /// </summary>
+ public const char CR = (char)0x0D;
+
+ /// <summary>
+ /// Line Feed, U+000A
+ /// </summary>
+ public const char LF = (char)0x0A;
+
+ /// <summary>
+ /// Next Line, U+0085
+ /// </summary>
+ public const char NEL = (char)0x85;
+
+ /// <summary>
+ /// Vertical Tab, U+000B
+ /// </summary>
+ public const char VT = (char)0x0B;
+
+ /// <summary>
+ /// Form Feed, U+000C
+ /// </summary>
+ public const char FF = (char)0x0C;
+
+ /// <summary>
+ /// Line Separator, U+2028
+ /// </summary>
+ public const char LS = (char)0x2028;
+
+ /// <summary>
+ /// Paragraph Separator, U+2029
+ /// </summary>
+ public const char PS = (char)0x2029;
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">A callback getting the next character (may be null).</param>
+ public static int GetDelimiterLength (char curChar, Func<char> nextChar = null)
+ {
+ if (curChar == CR) {
+ if (nextChar != null && nextChar () == LF)
+ return 2;
+ return 1;
+ }
+
+ if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
+ return 1;
+ return 0;
+ }
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">The next character (if != LF then length will always be 0 or 1).</param>
+ public static int GetDelimiterLength (char curChar, char nextChar)
+ {
+ if (curChar == CR) {
+ if (nextChar == LF)
+ return 2;
+ return 1;
+ }
+
+ if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
+ return 1;
+ return 0;
+ }
+
+ /// <summary>
+ /// Gets the new line type of a given char/next char.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">A callback getting the next character (may be null).</param>
+ public static UnicodeNewline GetDelimiterType (char curChar, Func<char> nextChar = null)
+ {
+ switch (curChar) {
+ case CR:
+ if (nextChar != null && nextChar () == LF)
+ return UnicodeNewline.CRLF;
+ return UnicodeNewline.CR;
+ case LF:
+ return UnicodeNewline.LF;
+ case NEL:
+ return UnicodeNewline.NEL;
+ case VT:
+ return UnicodeNewline.VT;
+ case FF:
+ return UnicodeNewline.FF;
+ case LS:
+ return UnicodeNewline.LS;
+ case PS:
+ return UnicodeNewline.PS;
+ }
+ return UnicodeNewline.Unknown;
+ }
+
+ /// <summary>
+ /// Gets the new line type of a given char/next char.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">The next character (if != LF then length will always be 0 or 1).</param>
+ public static UnicodeNewline GetDelimiterType (char curChar, char nextChar)
+ {
+ switch (curChar) {
+ case CR:
+ if (nextChar == LF)
+ return UnicodeNewline.CRLF;
+ return UnicodeNewline.CR;
+ case LF:
+ return UnicodeNewline.LF;
+ case NEL:
+ return UnicodeNewline.NEL;
+ case VT:
+ return UnicodeNewline.VT;
+ case FF:
+ return UnicodeNewline.FF;
+ case LS:
+ return UnicodeNewline.LS;
+ case PS:
+ return UnicodeNewline.PS;
+ }
+ return UnicodeNewline.Unknown;
+ }
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ ///
+ /// Note that the only 2 char wide new line is CR LF and both chars are new line
+ /// chars on their own. For most cases GetDelimiterLength is the better choice.
+ /// </summary>
+ public static bool IsNewLine(char ch)
+ {
+ return GetDelimiterLength (ch) > 0;
+ }
+
+ /// <summary>
+ /// Gets the new line as a string.
+ /// </summary>
+ public static string GetString (UnicodeNewline newLine)
+ {
+ switch (newLine) {
+ case UnicodeNewline.Unknown:
+ return "";
+ case UnicodeNewline.LF:
+ return "\n";
+ case UnicodeNewline.CRLF:
+ return "\r\n";
+ case UnicodeNewline.CR:
+ return "\r";
+ case UnicodeNewline.NEL:
+ return "\u0085";
+ case UnicodeNewline.VT:
+ return "\u000B";
+ case UnicodeNewline.FF:
+ return "\u000C";
+ case UnicodeNewline.LS:
+ return "\u2028";
+ case UnicodeNewline.PS:
+ return "\u2029";
+ default:
+ throw new ArgumentOutOfRangeException ();
+ }
+ }
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory/IAnnotatable.cs b/external/nrefactory/ICSharpCode.NRefactory/IAnnotatable.cs
index dedc901..d27f6fc 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/IAnnotatable.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/IAnnotatable.cs
@@ -105,7 +105,15 @@ namespace ICSharpCode.NRefactory
if (cloneable != null)
annotations = cloneable.Clone();
}
-
+
+ /// <summary>
+ /// Removes all annotations.
+ /// </summary>
+ protected void ClearAnnotations ()
+ {
+ annotations = null;
+ }
+
sealed class AnnotationList : List<object>, ICloneable
{
// There are two uses for this custom list type:
@@ -181,7 +189,7 @@ namespace ICSharpCode.NRefactory
AnnotationList list = oldAnnotations as AnnotationList;
if (list != null) {
lock (list)
- list.RemoveAll (obj => type.IsInstanceOfType (obj));
+ list.RemoveAll(type.IsInstanceOfType);
} else if (type.IsInstanceOfType (oldAnnotations)) {
if (Interlocked.CompareExchange (ref this.annotations, null, oldAnnotations) != oldAnnotations) {
// Operation failed (some other thread wrote to this.annotations first)
diff --git a/external/nrefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/external/nrefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
index 808268a..a87bfbe 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
+++ b/external/nrefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
@@ -45,9 +45,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
+ <OutputPath>..\bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
+ <OutputPath>..\bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Debug' ">
<Optimize>False</Optimize>
@@ -60,6 +62,7 @@
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <OutputPath>..\bin\net_4_5_Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Release' ">
<Optimize>True</Optimize>
@@ -70,6 +73,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_4_5_Release|AnyCPU' ">
<DebugType>none</DebugType>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <OutputPath>..\bin\net_4_5_Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -78,6 +82,9 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Analysis\AbiComparer.cs" />
+ <Compile Include="Analysis\TypeGraph.cs" />
+ <Compile Include="Analysis\TypeGraphNode.cs" />
<Compile Include="Documentation\DocumentationComment.cs" />
<Compile Include="Documentation\GetPotentiallyNestedClassTypeReference.cs" />
<Compile Include="Documentation\IDocumentationProvider.cs" />
@@ -133,12 +140,18 @@
<Compile Include="TypeSystem\Accessibility.cs" />
<Compile Include="TypeSystem\AnonymousType.cs" />
<Compile Include="TypeSystem\ArrayType.cs" />
+ <Compile Include="TypeSystem\AssemblyQualifiedTypeName.cs" />
<Compile Include="TypeSystem\ByReferenceType.cs" />
- <Compile Include="TypeSystem\CecilLoader.cs" />
<Compile Include="TypeSystem\ComHelper.cs" />
<Compile Include="TypeSystem\DefaultSolutionSnapshot.cs" />
<Compile Include="TypeSystem\DomRegion.cs" />
<Compile Include="TypeSystem\EntityType.cs" />
+ <Compile Include="TypeSystem\Implementation\BlobReader.cs" />
+ <Compile Include="TypeSystem\Implementation\DefaultVariable.cs" />
+ <Compile Include="TypeSystem\Implementation\ResolvedAttributeBlob.cs" />
+ <Compile Include="TypeSystem\Implementation\UnresolvedAttributeBlob.cs" />
+ <Compile Include="TypeSystem\Implementation\UnresolvedSecurityDeclarationBlob.cs" />
+ <Compile Include="TypeSystem\ISymbol.cs" />
<Compile Include="TypeSystem\TypeParameterSubstitution.cs" />
<Compile Include="TypeSystem\TypeSystemExtensions.cs" />
<Compile Include="TypeSystem\FullTypeName.cs" />
@@ -267,11 +280,18 @@
<Compile Include="Utils\CompositeFormatStringParser\IFormatStringSegment.cs" />
<Compile Include="Utils\CompositeFormatStringParser\IFormatStringError.cs" />
<Compile Include="Completion\CompletionExtensionMethods.cs" />
+ <Compile Include="Refactoring\IssueMarker.cs" />
+ <Compile Include="Refactoring\Severity.cs" />
+ <Compile Include="Analysis\SymbolCollector.cs" />
+ <Compile Include="TypeSystem\AssemblyLoader.cs" />
+ <Compile Include="Editor\UnicodeNewline.cs" />
+ <Compile Include="Completion\FrameworkLookup.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Completion\" />
<Folder Include="TypeSystem\" />
<Folder Include="Utils\CompositeFormatStringParser\" />
+ <Folder Include="Refactoring\" />
</ItemGroup>
<ItemGroup>
<None Include="..\doc\Pattern Matching.html">
@@ -282,10 +302,4 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <ProjectReference Include="..\..\cecil\Mono.Cecil.csproj">
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
- <Name>Mono.Cecil</Name>
- </ProjectReference>
- </ItemGroup>
</Project>
\ No newline at end of file
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Properties/AssemblyInfo.cs b/external/nrefactory/ICSharpCode.NRefactory/Properties/AssemblyInfo.cs
index 1351053..3a01e15 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Properties/AssemblyInfo.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Properties/AssemblyInfo.cs
@@ -15,6 +15,7 @@
// 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.Runtime.CompilerServices;
#region Using directives
@@ -31,3 +32,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("Type system and other language-independent parts of NRefactory")]
[assembly: CLSCompliant(true)]
+
+[assembly: InternalsVisibleTo("ICSharpCode.NRefactory.Cecil, PublicKey=00240000048000009400000006020000002400005253413100040000010001004dcf3979c4e902efa4dd2163a039701ed5822e6f1134d77737296abbb97bf0803083cfb2117b4f5446a217782f5c7c634f9fe1fc60b4c11d62c5b3d33545036706296d31903ddcf750875db38a8ac379512f51620bb948c94d0831125fbc5fe63707cbb93f48c1459c4d1749eb7ac5e681a2f0d6d7c60fa527a3c0b8f92b02bf")]
+[assembly: InternalsVisibleTo("ICSharpCode.NRefactory.IKVM, PublicKey=00240000048000009400000006020000002400005253413100040000010001004dcf3979c4e902efa4dd2163a039701ed5822e6f1134d77737296abbb97bf0803083cfb2117b4f5446a217782f5c7c634f9fe1fc60b4c11d62c5b3d33545036706296d31903ddcf750875db38a8ac379512f51620bb948c94d0831125fbc5fe63707cbb93f48c1459c4d1749eb7ac5e681a2f0d6d7c60fa527a3c0b8f92b02bf")]
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Properties/GlobalAssemblyInfo.cs b/external/nrefactory/ICSharpCode.NRefactory/Properties/GlobalAssemblyInfo.cs
index e18bab6..7f62c0b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Properties/GlobalAssemblyInfo.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Properties/GlobalAssemblyInfo.cs
@@ -29,7 +29,7 @@ using System.Runtime.InteropServices;
// associated with an assembly.
[assembly: AssemblyCompany("ICSharpCode")]
[assembly: AssemblyProduct("SharpDevelop/MonoDevelop")]
-[assembly: AssemblyCopyright("Copyright 2010-2013 AlphaSierraPapa")]
+[assembly: AssemblyCopyright("Copyright 2010-2013 AlphaSierraPapa and Xamarin Inc.")]
// 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.
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Refactoring/IssueMarker.cs b/external/nrefactory/ICSharpCode.NRefactory/Refactoring/IssueMarker.cs
new file mode 100644
index 0000000..ea029c4
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Refactoring/IssueMarker.cs
@@ -0,0 +1,52 @@
+//
+// IssueMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.Refactoring
+{
+ /// <summary>
+ /// The issue marker is used to set how an issue should be marked inside the text editor.
+ /// </summary>
+ public enum IssueMarker
+ {
+ /// <summary>
+ /// The issue is not shown inside the text editor. (But in the task bar)
+ /// </summary>
+ None,
+
+ /// <summary>
+ /// The region is marked as underline in the severity color.
+ /// </summary>
+ Underline,
+
+ /// <summary>
+ /// The text is grayed out.
+ /// </summary>
+ GrayOut
+ }
+
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Refactoring/Severity.cs b/external/nrefactory/ICSharpCode.NRefactory/Refactoring/Severity.cs
new file mode 100644
index 0000000..0085f98
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/Refactoring/Severity.cs
@@ -0,0 +1,61 @@
+//
+// Severity.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+//
+// 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;
+
+namespace ICSharpCode.NRefactory.Refactoring
+{
+ /// <summary>
+ /// The severity influences how the task bar reacts on found issues.
+ /// </summary>
+ public enum Severity
+ {
+ /// <summary>
+ /// None means that the task bar doesn't show the issue.
+ /// </summary>
+ None,
+
+ /// <summary>
+ /// Errors are shown in red and that the task bar is in error state if 1 error is found.
+ /// </summary>
+ Error,
+
+ /// <summary>
+ /// Warnings are shown in yellow and set the task bar to warning state (if no error is found).
+ /// </summary>
+ Warning,
+
+ /// <summary>
+ /// Suggestions are shown in green and doesn't influence the task bar state
+ /// </summary>
+ Suggestion,
+
+ /// <summary>
+ /// Hints are shown in blue and doesn't influence the task bar state
+ /// </summary>
+ Hint
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Role.cs b/external/nrefactory/ICSharpCode.NRefactory/Role.cs
index 515eb97..2a84b46 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Role.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Role.cs
@@ -43,7 +43,7 @@ namespace ICSharpCode.NRefactory
{
this.index = (uint)Interlocked.Increment(ref nextRoleIndex);
if (this.index >= roles.Length)
- throw new InvalidOperationException("");
+ throw new InvalidOperationException("Too many roles");
roles[this.index] = this;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Semantics/Conversion.cs b/external/nrefactory/ICSharpCode.NRefactory/Semantics/Conversion.cs
index 2adfbfe..3dbfca1 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Semantics/Conversion.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Semantics/Conversion.cs
@@ -97,18 +97,18 @@ namespace ICSharpCode.NRefactory.Semantics
return new UserDefinedConv(isImplicit, operatorMethod, conversionBeforeUserDefinedOperator, conversionAfterUserDefinedOperator, isLifted, isAmbiguous);
}
- public static Conversion MethodGroupConversion(IMethod chosenMethod, bool isVirtualMethodLookup)
+ public static Conversion MethodGroupConversion(IMethod chosenMethod, bool isVirtualMethodLookup, bool delegateCapturesFirstArgument)
{
if (chosenMethod == null)
throw new ArgumentNullException("chosenMethod");
- return new MethodGroupConv(chosenMethod, isVirtualMethodLookup, isValid: true);
+ return new MethodGroupConv(chosenMethod, isVirtualMethodLookup, delegateCapturesFirstArgument, isValid: true);
}
- public static Conversion InvalidMethodGroupConversion(IMethod chosenMethod, bool isVirtualMethodLookup)
+ public static Conversion InvalidMethodGroupConversion(IMethod chosenMethod, bool isVirtualMethodLookup, bool delegateCapturesFirstArgument)
{
if (chosenMethod == null)
throw new ArgumentNullException("chosenMethod");
- return new MethodGroupConv(chosenMethod, isVirtualMethodLookup, isValid: false);
+ return new MethodGroupConv(chosenMethod, isVirtualMethodLookup, delegateCapturesFirstArgument, isValid: false);
}
#endregion
@@ -346,12 +346,14 @@ namespace ICSharpCode.NRefactory.Semantics
{
readonly IMethod method;
readonly bool isVirtualMethodLookup;
+ readonly bool delegateCapturesFirstArgument;
readonly bool isValid;
- public MethodGroupConv(IMethod method, bool isVirtualMethodLookup, bool isValid)
+ public MethodGroupConv(IMethod method, bool isVirtualMethodLookup, bool delegateCapturesFirstArgument, bool isValid)
{
this.method = method;
this.isVirtualMethodLookup = isVirtualMethodLookup;
+ this.delegateCapturesFirstArgument = delegateCapturesFirstArgument;
this.isValid = isValid;
}
@@ -371,6 +373,10 @@ namespace ICSharpCode.NRefactory.Semantics
get { return isVirtualMethodLookup; }
}
+ public override bool DelegateCapturesFirstArgument {
+ get { return delegateCapturesFirstArgument; }
+ }
+
public override IMethod Method {
get { return method; }
}
@@ -519,6 +525,16 @@ namespace ICSharpCode.NRefactory.Semantics
}
/// <summary>
+ /// For method-group conversions, gets whether the conversion captures the first argument.
+ ///
+ /// For instance methods, this property always returns true for C# method-group conversions.
+ /// For static methods, this property returns true for method-group conversions of an extension method performed on an instance (eg. <c>Func<int> f = myEnumerable.Single</c>).
+ /// </summary>
+ public virtual bool DelegateCapturesFirstArgument {
+ get { return false; }
+ }
+
+ /// <summary>
/// Gets whether this conversion is an anonymous function conversion.
/// </summary>
public virtual bool IsAnonymousFunctionConversion {
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Semantics/MemberResolveResult.cs b/external/nrefactory/ICSharpCode.NRefactory/Semantics/MemberResolveResult.cs
index c06cc3a..2ad2e18 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Semantics/MemberResolveResult.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Semantics/MemberResolveResult.cs
@@ -39,7 +39,7 @@ namespace ICSharpCode.NRefactory.Semantics
readonly bool isVirtualCall;
public MemberResolveResult(ResolveResult targetResult, IMember member, IType returnTypeOverride = null)
- : base(returnTypeOverride ?? (member.EntityType == EntityType.Constructor ? member.DeclaringType : member.ReturnType))
+ : base(returnTypeOverride ?? (member.SymbolKind == SymbolKind.Constructor ? member.DeclaringType : member.ReturnType))
{
this.targetResult = targetResult;
this.member = member;
@@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.Semantics
}
public MemberResolveResult(ResolveResult targetResult, IMember member, bool isVirtualCall, IType returnTypeOverride = null)
- : base(returnTypeOverride ?? (member.EntityType == EntityType.Constructor ? member.DeclaringType : member.ReturnType))
+ : base(returnTypeOverride ?? (member.SymbolKind == SymbolKind.Constructor ? member.DeclaringType : member.ReturnType))
{
this.targetResult = targetResult;
this.member = member;
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyLoader.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyLoader.cs
new file mode 100644
index 0000000..db230f4
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyLoader.cs
@@ -0,0 +1,94 @@
+//
+// AssemblyLoader.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Reflection;
+using System.Threading;
+using ICSharpCode.NRefactory.Documentation;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+
+namespace ICSharpCode.NRefactory.TypeSystem
+{
+ public enum AssemblyLoaderBackend {
+ Auto,
+ Cecil,
+ IKVM
+ }
+
+ public abstract class AssemblyLoader
+ {
+ public static AssemblyLoader Create ()
+ {
+ return Create (AssemblyLoaderBackend.Auto);
+ }
+
+ public static AssemblyLoader Create (AssemblyLoaderBackend backend)
+ {
+ switch (backend) {
+ case AssemblyLoaderBackend.Auto:
+ case AssemblyLoaderBackend.Cecil:
+ return (AssemblyLoader)Assembly.Load ("ICSharpCode.NRefactory.Cecil").CreateInstance ("ICSharpCode.NRefactory.TypeSystem.CecilLoader");
+ case AssemblyLoaderBackend.IKVM:
+ return (AssemblyLoader)Assembly.Load ("ICSharpCode.NRefactory.IKVM").CreateInstance ("ICSharpCode.NRefactory.TypeSystem.IkvmLoader");
+ default:
+ throw new ArgumentOutOfRangeException ();
+ }
+ }
+
+ /// <summary>
+ /// Specifies whether to include internal members. The default is false.
+ /// </summary>
+ public bool IncludeInternalMembers { get; set; }
+
+ /// <summary>
+ /// Gets/Sets the cancellation token used by the assembly loader.
+ /// </summary>
+ public CancellationToken CancellationToken { get; set; }
+
+ /// <summary>
+ /// Gets/Sets the documentation provider that is used to retrieve the XML documentation for all members.
+ /// </summary>
+ public IDocumentationProvider DocumentationProvider { get; set; }
+
+ [CLSCompliant(false)]
+ protected InterningProvider interningProvider = new SimpleInterningProvider();
+
+ /// <summary>
+ /// Gets/Sets the interning provider.
+ /// </summary>
+ public InterningProvider InterningProvider {
+ get { return interningProvider; }
+ set {
+ if (value == null)
+ throw new ArgumentNullException();
+ interningProvider = value;
+ }
+ }
+
+ public abstract IUnresolvedAssembly LoadAssemblyFile(string fileName);
+ }
+}
+
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyQualifiedTypeName.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyQualifiedTypeName.cs
new file mode 100644
index 0000000..8b07c51
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/AssemblyQualifiedTypeName.cs
@@ -0,0 +1,79 @@
+// Copyright (c) 2013 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;
+
+namespace ICSharpCode.NRefactory.TypeSystem
+{
+ public struct AssemblyQualifiedTypeName : IEquatable<AssemblyQualifiedTypeName>
+ {
+ public readonly string AssemblyName;
+ public readonly FullTypeName TypeName;
+
+ public AssemblyQualifiedTypeName(FullTypeName typeName, string assemblyName)
+ {
+ this.AssemblyName = assemblyName;
+ this.TypeName = typeName;
+ }
+
+ public AssemblyQualifiedTypeName(ITypeDefinition typeDefinition)
+ {
+ this.AssemblyName = typeDefinition.ParentAssembly.AssemblyName;
+ this.TypeName = typeDefinition.FullTypeName;
+ }
+
+ public override string ToString()
+ {
+ if (string.IsNullOrEmpty(AssemblyName))
+ return TypeName.ToString();
+ else
+ return TypeName.ToString() + ", " + AssemblyName;
+ }
+
+ public override bool Equals(object obj)
+ {
+ return (obj is AssemblyQualifiedTypeName) && Equals((AssemblyQualifiedTypeName)obj);
+ }
+
+ public bool Equals(AssemblyQualifiedTypeName other)
+ {
+ return this.AssemblyName == other.AssemblyName && this.TypeName == other.TypeName;
+ }
+
+ public override int GetHashCode()
+ {
+ int hashCode = 0;
+ unchecked {
+ if (AssemblyName != null)
+ hashCode += 1000000007 * AssemblyName.GetHashCode();
+ hashCode += TypeName.GetHashCode();
+ }
+ return hashCode;
+ }
+
+ public static bool operator ==(AssemblyQualifiedTypeName lhs, AssemblyQualifiedTypeName rhs)
+ {
+ return lhs.Equals(rhs);
+ }
+
+ public static bool operator !=(AssemblyQualifiedTypeName lhs, AssemblyQualifiedTypeName rhs)
+ {
+ return !lhs.Equals(rhs);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
deleted file mode 100644
index c53d269..0000000
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
+++ /dev/null
@@ -1,2354 +0,0 @@
-// Copyright (c) 2010-2013 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.Diagnostics;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Threading;
-using ICSharpCode.NRefactory.Documentation;
-using ICSharpCode.NRefactory.Semantics;
-using ICSharpCode.NRefactory.TypeSystem.Implementation;
-using ICSharpCode.NRefactory.Utils;
-using Mono.Cecil;
-
-namespace ICSharpCode.NRefactory.TypeSystem
-{
- /// <summary>
- /// Allows loading an IProjectContent from an already compiled assembly.
- /// </summary>
- /// <remarks>Instance methods are not thread-safe; you need to create multiple instances of CecilLoader
- /// if you want to load multiple project contents in parallel.</remarks>
- public class CecilLoader
- {
- /// <summary>
- /// Version number of the cecil loader.
- /// Should be incremented when fixing bugs in the cecil loader so that project contents cached on disk
- /// (which might be incorrect due to the bug) are re-created.
- /// </summary>
- const int cecilLoaderVersion = 1;
-
- #region Options
- /// <summary>
- /// Specifies whether to include internal members. The default is false.
- /// </summary>
- public bool IncludeInternalMembers { get; set; }
-
- /// <summary>
- /// Specifies whether to use lazy loading. The default is false.
- /// If this property is set to true, the CecilLoader will not copy all the relevant information
- /// out of the Cecil object model, but will maintain references to the Cecil objects.
- /// This speeds up the loading process and avoids loading unnecessary information, but it causes
- /// the Cecil objects to stay in memory (which can significantly increase memory usage).
- /// It also prevents serialization of the Cecil-loaded type system.
- /// </summary>
- /// <remarks>
- /// Because the type system can be used on multiple threads, but Cecil is not
- /// thread-safe for concurrent read access, the CecilLoader will lock on the <see cref="ModuleDefinition"/> instance
- /// for every delay-loading operation.
- /// If you access the Cecil objects directly in your application, you may need to take the same lock.
- /// </remarks>
- public bool LazyLoad { get; set; }
-
- /// <summary>
- /// Gets/Sets the documentation provider that is used to retrieve the XML documentation for all members.
- /// </summary>
- public IDocumentationProvider DocumentationProvider { get; set; }
-
- InterningProvider interningProvider;
-
- /// <summary>
- /// Gets/Sets the interning provider.
- /// </summary>
- public InterningProvider InterningProvider {
- get { return interningProvider; }
- set {
- if (value == null)
- throw new ArgumentNullException();
- interningProvider = value;
- }
- }
-
- /// <summary>
- /// Gets/Sets the cancellation token used by the cecil loader.
- /// </summary>
- public CancellationToken CancellationToken { get; set; }
-
- /// <summary>
- /// This delegate gets executed whenever an entity was loaded.
- /// </summary>
- /// <remarks>
- /// This callback may be to build a dictionary that maps between
- /// entities and cecil objects.
- /// Warning: if delay-loading is used and the type system is accessed by multiple threads,
- /// the callback may be invoked concurrently on multiple threads.
- /// </remarks>
- public Action<IUnresolvedEntity, MemberReference> OnEntityLoaded { get; set; }
-
- /// <summary>
- /// Gets a value indicating whether this instance stores references to the cecil objects.
- /// </summary>
- /// <value>
- /// <c>true</c> if this instance has references to the cecil objects; otherwise, <c>false</c>.
- /// </value>
- public bool HasCecilReferences { get { return typeSystemTranslationTable != null; } }
- #endregion
-
- ModuleDefinition currentModule;
- CecilUnresolvedAssembly currentAssembly;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.TypeSystem.CecilLoader"/> class.
- /// </summary>
- public CecilLoader()
- {
- // Enable interning by default.
- this.InterningProvider = new SimpleInterningProvider();
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ICSharpCode.NRefactory.TypeSystem.CecilLoader"/> class.
- /// </summary>
- /// <param name='createCecilReferences'>
- /// If true references to the cecil objects are hold. In this case the cecil loader can do a type system -> cecil mapping.
- /// </param>
- [Obsolete("The built-in entity<->cecil mapping is obsolete. Use the OnEntityLoaded callback instead!")]
- public CecilLoader(bool createCecilReferences) : this()
- {
- if (createCecilReferences)
- typeSystemTranslationTable = new Dictionary<object, object> ();
- }
-
- /// <summary>
- /// Creates a nested CecilLoader for lazy-loading.
- /// </summary>
- private CecilLoader(CecilLoader loader)
- {
- // use a shared typeSystemTranslationTable
- this.typeSystemTranslationTable = loader.typeSystemTranslationTable;
- this.IncludeInternalMembers = loader.IncludeInternalMembers;
- this.LazyLoad = loader.LazyLoad;
- this.OnEntityLoaded = loader.OnEntityLoaded;
- this.currentModule = loader.currentModule;
- this.currentAssembly = loader.currentAssembly;
- // don't use interning - the interning provider is most likely not thread-safe
- this.interningProvider = InterningProvider.Dummy;
- // don't use cancellation for delay-loaded members
- }
-
- #region Load From AssemblyDefinition
- /// <summary>
- /// Loads the assembly definition into a project content.
- /// </summary>
- /// <returns>Unresolved type system representing the assembly</returns>
- [CLSCompliant(false)]
- public IUnresolvedAssembly LoadAssembly(AssemblyDefinition assemblyDefinition)
- {
- if (assemblyDefinition == null)
- throw new ArgumentNullException("assemblyDefinition");
- return LoadModule(assemblyDefinition.MainModule);
- }
-
- /// <summary>
- /// Loads the module definition into a project content.
- /// </summary>
- /// <returns>Unresolved type system representing the assembly</returns>
- [CLSCompliant(false)]
- public IUnresolvedAssembly LoadModule(ModuleDefinition moduleDefinition)
- {
- if (moduleDefinition == null)
- throw new ArgumentNullException("moduleDefinition");
-
- this.currentModule = moduleDefinition;
-
- // Read assembly and module attributes
- IList<IUnresolvedAttribute> assemblyAttributes = new List<IUnresolvedAttribute>();
- IList<IUnresolvedAttribute> moduleAttributes = new List<IUnresolvedAttribute>();
- AssemblyDefinition assemblyDefinition = moduleDefinition.Assembly;
- if (assemblyDefinition != null) {
- AddAttributes(assemblyDefinition, assemblyAttributes);
- }
- AddAttributes(moduleDefinition, moduleAttributes);
-
- assemblyAttributes = interningProvider.InternList(assemblyAttributes);
- moduleAttributes = interningProvider.InternList(moduleAttributes);
-
- this.currentAssembly = new CecilUnresolvedAssembly(assemblyDefinition != null ? assemblyDefinition.Name.FullName : moduleDefinition.Name, this.DocumentationProvider);
- currentAssembly.Location = moduleDefinition.FullyQualifiedName;
- currentAssembly.AssemblyAttributes.AddRange(assemblyAttributes);
- currentAssembly.ModuleAttributes.AddRange(assemblyAttributes);
-
- // Register type forwarders:
- foreach (ExportedType type in moduleDefinition.ExportedTypes) {
- if (type.IsForwarder) {
- int typeParameterCount;
- string ns = type.Namespace;
- string name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out typeParameterCount);
- ns = interningProvider.Intern(ns);
- name = interningProvider.Intern(name);
- var typeRef = new GetClassTypeReference(GetAssemblyReference(type.Scope), ns, name, typeParameterCount);
- typeRef = interningProvider.Intern(typeRef);
- var key = new TopLevelTypeName(ns, name, typeParameterCount);
- currentAssembly.AddTypeForwarder(key, typeRef);
- }
- }
-
- // Create and register all types:
- CecilLoader cecilLoaderCloneForLazyLoading = LazyLoad ? new CecilLoader(this) : null;
- List<TypeDefinition> cecilTypeDefs = new List<TypeDefinition>();
- List<DefaultUnresolvedTypeDefinition> typeDefs = new List<DefaultUnresolvedTypeDefinition>();
- foreach (TypeDefinition td in moduleDefinition.Types) {
- this.CancellationToken.ThrowIfCancellationRequested();
- if (this.IncludeInternalMembers || (td.Attributes & TypeAttributes.VisibilityMask) == TypeAttributes.Public) {
- string name = td.Name;
- if (name.Length == 0)
- continue;
-
- if (this.LazyLoad) {
- var t = new LazyCecilTypeDefinition(cecilLoaderCloneForLazyLoading, td);
- currentAssembly.AddTypeDefinition(t);
- RegisterCecilObject(t, td);
- } else {
- var t = CreateTopLevelTypeDefinition(td);
- cecilTypeDefs.Add(td);
- typeDefs.Add(t);
- currentAssembly.AddTypeDefinition(t);
- // The registration will happen after the members are initialized
- }
- }
- }
- // Initialize the type's members:
- for (int i = 0; i < typeDefs.Count; i++) {
- InitTypeDefinition(cecilTypeDefs[i], typeDefs[i]);
- }
-
- AddToTypeSystemTranslationTable(this.currentAssembly, assemblyDefinition);
- // Freezing the assembly here is important:
- // otherwise it will be frozen when a compilation is first created
- // from it. But freezing has the effect of changing some collection instances
- // (to ReadOnlyCollection). This hidden mutation was causing a crash
- // when the FastSerializer was saving the assembly at the same time as
- // the first compilation was created from it.
- // By freezing the assembly now, we ensure it is usable on multiple
- // threads without issues.
- currentAssembly.Freeze();
-
- var result = this.currentAssembly;
- this.currentAssembly = null;
- this.currentModule = null;
- return result;
- }
-
- /// <summary>
- /// Sets the current module.
- /// This causes ReadTypeReference() to use <see cref="DefaultAssemblyReference.CurrentAssembly"/> for references
- /// in that module.
- /// </summary>
- [CLSCompliant(false)]
- public void SetCurrentModule(ModuleDefinition module)
- {
- this.currentModule = module;
- }
-
- /// <summary>
- /// Loads a type from Cecil.
- /// </summary>
- /// <param name="typeDefinition">The Cecil TypeDefinition.</param>
- /// <returns>ITypeDefinition representing the Cecil type.</returns>
- [CLSCompliant(false)]
- public IUnresolvedTypeDefinition LoadType(TypeDefinition typeDefinition)
- {
- if (typeDefinition == null)
- throw new ArgumentNullException("typeDefinition");
- var td = CreateTopLevelTypeDefinition(typeDefinition);
- InitTypeDefinition(typeDefinition, td);
- return td;
- }
- #endregion
-
- #region IUnresolvedAssembly implementation
- [Serializable, FastSerializerVersion(cecilLoaderVersion)]
- sealed class CecilUnresolvedAssembly : DefaultUnresolvedAssembly, IDocumentationProvider
- {
- readonly IDocumentationProvider documentationProvider;
-
- public CecilUnresolvedAssembly(string fullAssemblyName, IDocumentationProvider documentationProvider)
- : base(fullAssemblyName)
- {
- this.documentationProvider = documentationProvider;
- }
-
- DocumentationComment IDocumentationProvider.GetDocumentation(IEntity entity)
- {
- if (documentationProvider != null)
- return documentationProvider.GetDocumentation(entity);
- else
- return null;
- }
- }
- #endregion
-
- #region Load Assembly From Disk
- public IUnresolvedAssembly LoadAssemblyFile(string fileName)
- {
- if (fileName == null)
- throw new ArgumentNullException("fileName");
- var param = new ReaderParameters { AssemblyResolver = new DummyAssemblyResolver() };
- ModuleDefinition module = ModuleDefinition.ReadModule(fileName, param);
- return LoadModule(module);
- }
-
- // used to prevent Cecil from loading referenced assemblies
- sealed class DummyAssemblyResolver : IAssemblyResolver
- {
- public AssemblyDefinition Resolve(AssemblyNameReference name)
- {
- return null;
- }
-
- public AssemblyDefinition Resolve(string fullName)
- {
- return null;
- }
-
- public AssemblyDefinition Resolve(AssemblyNameReference name, ReaderParameters parameters)
- {
- return null;
- }
-
- public AssemblyDefinition Resolve(string fullName, ReaderParameters parameters)
- {
- return null;
- }
- }
- #endregion
-
- #region Read Type Reference
- /// <summary>
- /// Reads a type reference.
- /// </summary>
- /// <param name="type">The Cecil type reference that should be converted into
- /// a type system type reference.</param>
- /// <param name="typeAttributes">Attributes associated with the Cecil type reference.
- /// This is used to support the 'dynamic' type.</param>
- [CLSCompliant(false)]
- public ITypeReference ReadTypeReference(TypeReference type, ICustomAttributeProvider typeAttributes = null)
- {
- int typeIndex = 0;
- return CreateType(type, typeAttributes, ref typeIndex);
- }
-
- ITypeReference CreateType(TypeReference type, ICustomAttributeProvider typeAttributes, ref int typeIndex)
- {
- while (type is OptionalModifierType || type is RequiredModifierType) {
- type = ((TypeSpecification)type).ElementType;
- }
- if (type == null) {
- return SpecialType.UnknownType;
- }
-
- if (type is Mono.Cecil.ByReferenceType) {
- typeIndex++;
- return interningProvider.Intern(
- new ByReferenceTypeReference(
- CreateType(
- (type as Mono.Cecil.ByReferenceType).ElementType,
- typeAttributes, ref typeIndex)));
- } else if (type is Mono.Cecil.PointerType) {
- typeIndex++;
- return interningProvider.Intern(
- new PointerTypeReference(
- CreateType(
- (type as Mono.Cecil.PointerType).ElementType,
- typeAttributes, ref typeIndex)));
- } else if (type is Mono.Cecil.ArrayType) {
- typeIndex++;
- return interningProvider.Intern(
- new ArrayTypeReference(
- CreateType(
- (type as Mono.Cecil.ArrayType).ElementType,
- typeAttributes, ref typeIndex),
- (type as Mono.Cecil.ArrayType).Rank));
- } else if (type is GenericInstanceType) {
- GenericInstanceType gType = (GenericInstanceType)type;
- ITypeReference baseType = CreateType(gType.ElementType, typeAttributes, ref typeIndex);
- ITypeReference[] para = new ITypeReference[gType.GenericArguments.Count];
- for (int i = 0; i < para.Length; ++i) {
- typeIndex++;
- para[i] = CreateType(gType.GenericArguments[i], typeAttributes, ref typeIndex);
- }
- return interningProvider.Intern(new ParameterizedTypeReference(baseType, para));
- } else if (type is GenericParameter) {
- GenericParameter typeGP = (GenericParameter)type;
- return TypeParameterReference.Create(typeGP.Owner is MethodDefinition ? EntityType.Method : EntityType.TypeDefinition, typeGP.Position);
- } else if (type.IsNested) {
- ITypeReference typeRef = CreateType(type.DeclaringType, typeAttributes, ref typeIndex);
- int partTypeParameterCount;
- string namepart = ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out partTypeParameterCount);
- namepart = interningProvider.Intern(namepart);
- return interningProvider.Intern(new NestedTypeReference(typeRef, namepart, partTypeParameterCount));
- } else {
- string ns = interningProvider.Intern(type.Namespace ?? string.Empty);
- string name = type.Name;
- if (name == null)
- throw new InvalidOperationException("type.Name returned null. Type: " + type.ToString());
-
- if (name == "Object" && ns == "System" && HasDynamicAttribute(typeAttributes, typeIndex)) {
- return SpecialType.Dynamic;
- } else {
- int typeParameterCount;
- name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name, out typeParameterCount);
- name = interningProvider.Intern(name);
- if (currentAssembly != null) {
- IUnresolvedTypeDefinition c = currentAssembly.GetTypeDefinition(ns, name, typeParameterCount);
- if (c != null)
- return c;
- }
- return interningProvider.Intern(new GetClassTypeReference(GetAssemblyReference(type.Scope), ns, name, typeParameterCount));
- }
- }
- }
-
- IAssemblyReference GetAssemblyReference(IMetadataScope scope)
- {
- if (scope == null || scope == currentModule)
- return DefaultAssemblyReference.CurrentAssembly;
- else
- return interningProvider.Intern(new DefaultAssemblyReference(scope.Name));
- }
-
- static bool HasDynamicAttribute(ICustomAttributeProvider attributeProvider, int typeIndex)
- {
- if (attributeProvider == null || !attributeProvider.HasCustomAttributes)
- return false;
- foreach (CustomAttribute a in attributeProvider.CustomAttributes) {
- TypeReference type = a.AttributeType;
- if (type.Name == "DynamicAttribute" && type.Namespace == "System.Runtime.CompilerServices") {
- if (a.ConstructorArguments.Count == 1) {
- CustomAttributeArgument[] values = a.ConstructorArguments[0].Value as CustomAttributeArgument[];
- if (values != null && typeIndex < values.Length && values[typeIndex].Value is bool)
- return (bool)values[typeIndex].Value;
- }
- return true;
- }
- }
- return false;
- }
- #endregion
-
- #region Read Attributes
- #region Assembly Attributes
- static readonly ITypeReference assemblyVersionAttributeTypeRef = typeof(System.Reflection.AssemblyVersionAttribute).ToTypeReference();
-
- void AddAttributes(AssemblyDefinition assembly, IList<IUnresolvedAttribute> outputList)
- {
- if (assembly.HasCustomAttributes) {
- AddCustomAttributes(assembly.CustomAttributes, outputList);
- }
- if (assembly.HasSecurityDeclarations) {
- AddSecurityAttributes(assembly.SecurityDeclarations, outputList);
- }
-
- // AssemblyVersionAttribute
- if (assembly.Name.Version != null) {
- var assemblyVersion = new DefaultUnresolvedAttribute(assemblyVersionAttributeTypeRef, new[] { KnownTypeReference.String });
- assemblyVersion.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, assembly.Name.Version.ToString()));
- outputList.Add(interningProvider.Intern(assemblyVersion));
- }
- }
-
- IConstantValue CreateSimpleConstantValue(ITypeReference type, object value)
- {
- return interningProvider.Intern(new SimpleConstantValue(type, interningProvider.InternValue(value)));
- }
- #endregion
-
- #region Module Attributes
- void AddAttributes(ModuleDefinition module, IList<IUnresolvedAttribute> outputList)
- {
- if (module.HasCustomAttributes) {
- AddCustomAttributes(module.CustomAttributes, outputList);
- }
- }
- #endregion
-
- #region Parameter Attributes
- static readonly IUnresolvedAttribute inAttribute = new DefaultUnresolvedAttribute(typeof(InAttribute).ToTypeReference());
- static readonly IUnresolvedAttribute outAttribute = new DefaultUnresolvedAttribute(typeof(OutAttribute).ToTypeReference());
-
- void AddAttributes(ParameterDefinition parameter, DefaultUnresolvedParameter targetParameter)
- {
- if (!targetParameter.IsOut) {
- if (parameter.IsIn)
- targetParameter.Attributes.Add(inAttribute);
- if (parameter.IsOut)
- targetParameter.Attributes.Add(outAttribute);
- }
- if (parameter.HasCustomAttributes) {
- AddCustomAttributes(parameter.CustomAttributes, targetParameter.Attributes);
- }
- if (parameter.HasMarshalInfo) {
- targetParameter.Attributes.Add(ConvertMarshalInfo(parameter.MarshalInfo));
- }
- }
- #endregion
-
- #region Method Attributes
- static readonly ITypeReference dllImportAttributeTypeRef = typeof(DllImportAttribute).ToTypeReference();
- static readonly SimpleConstantValue trueValue = new SimpleConstantValue(KnownTypeReference.Boolean, true);
- static readonly SimpleConstantValue falseValue = new SimpleConstantValue(KnownTypeReference.Boolean, false);
- static readonly ITypeReference callingConventionTypeRef = typeof(CallingConvention).ToTypeReference();
- static readonly IUnresolvedAttribute preserveSigAttribute = new DefaultUnresolvedAttribute(typeof(PreserveSigAttribute).ToTypeReference());
- static readonly ITypeReference methodImplAttributeTypeRef = typeof(MethodImplAttribute).ToTypeReference();
- static readonly ITypeReference methodImplOptionsTypeRef = typeof(MethodImplOptions).ToTypeReference();
-
- static bool HasAnyAttributes(MethodDefinition methodDefinition)
- {
- if (methodDefinition.HasPInvokeInfo)
- return true;
- if ((methodDefinition.ImplAttributes & ~MethodImplAttributes.CodeTypeMask) != 0)
- return true;
- if (methodDefinition.MethodReturnType.HasFieldMarshal)
- return true;
- return methodDefinition.HasCustomAttributes || methodDefinition.MethodReturnType.HasCustomAttributes;
- }
-
- void AddAttributes(MethodDefinition methodDefinition, IList<IUnresolvedAttribute> attributes, IList<IUnresolvedAttribute> returnTypeAttributes)
- {
- MethodImplAttributes implAttributes = methodDefinition.ImplAttributes & ~MethodImplAttributes.CodeTypeMask;
-
- #region DllImportAttribute
- if (methodDefinition.HasPInvokeInfo && methodDefinition.PInvokeInfo != null) {
- PInvokeInfo info = methodDefinition.PInvokeInfo;
- var dllImport = new DefaultUnresolvedAttribute(dllImportAttributeTypeRef, new[] { KnownTypeReference.String });
- dllImport.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.String, info.Module.Name));
-
- if (info.IsBestFitDisabled)
- dllImport.AddNamedFieldArgument("BestFitMapping", falseValue);
- if (info.IsBestFitEnabled)
- dllImport.AddNamedFieldArgument("BestFitMapping", trueValue);
-
- CallingConvention callingConvention;
- switch (info.Attributes & PInvokeAttributes.CallConvMask) {
- case (PInvokeAttributes)0:
- Debug.WriteLine ("P/Invoke calling convention not set on:" + methodDefinition.FullName);
- callingConvention = CallingConvention.StdCall;
- break;
- case PInvokeAttributes.CallConvCdecl:
- callingConvention = CallingConvention.Cdecl;
- break;
- case PInvokeAttributes.CallConvFastcall:
- callingConvention = CallingConvention.FastCall;
- break;
- case PInvokeAttributes.CallConvStdCall:
- callingConvention = CallingConvention.StdCall;
- break;
- case PInvokeAttributes.CallConvThiscall:
- callingConvention = CallingConvention.ThisCall;
- break;
- case PInvokeAttributes.CallConvWinapi:
- callingConvention = CallingConvention.Winapi;
- break;
- default:
- throw new NotSupportedException("unknown calling convention");
- }
- if (callingConvention != CallingConvention.Winapi)
- dllImport.AddNamedFieldArgument("CallingConvention", CreateSimpleConstantValue(callingConventionTypeRef, (int)callingConvention));
-
- CharSet charSet = CharSet.None;
- switch (info.Attributes & PInvokeAttributes.CharSetMask) {
- case PInvokeAttributes.CharSetAnsi:
- charSet = CharSet.Ansi;
- break;
- case PInvokeAttributes.CharSetAuto:
- charSet = CharSet.Auto;
- break;
- case PInvokeAttributes.CharSetUnicode:
- charSet = CharSet.Unicode;
- break;
- }
- if (charSet != CharSet.None)
- dllImport.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
-
- if (!string.IsNullOrEmpty(info.EntryPoint) && info.EntryPoint != methodDefinition.Name)
- dllImport.AddNamedFieldArgument("EntryPoint", CreateSimpleConstantValue(KnownTypeReference.String, info.EntryPoint));
-
- if (info.IsNoMangle)
- dllImport.AddNamedFieldArgument("ExactSpelling", trueValue);
-
- if ((implAttributes & MethodImplAttributes.PreserveSig) == MethodImplAttributes.PreserveSig)
- implAttributes &= ~MethodImplAttributes.PreserveSig;
- else
- dllImport.AddNamedFieldArgument("PreserveSig", falseValue);
-
- if (info.SupportsLastError)
- dllImport.AddNamedFieldArgument("SetLastError", trueValue);
-
- if (info.IsThrowOnUnmappableCharDisabled)
- dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", falseValue);
- if (info.IsThrowOnUnmappableCharEnabled)
- dllImport.AddNamedFieldArgument("ThrowOnUnmappableChar", trueValue);
-
- attributes.Add(interningProvider.Intern(dllImport));
- }
- #endregion
-
- #region PreserveSigAttribute
- if (implAttributes == MethodImplAttributes.PreserveSig) {
- attributes.Add(preserveSigAttribute);
- implAttributes = 0;
- }
- #endregion
-
- #region MethodImplAttribute
- if (implAttributes != 0) {
- var methodImpl = new DefaultUnresolvedAttribute(methodImplAttributeTypeRef, new[] { methodImplOptionsTypeRef });
- methodImpl.PositionalArguments.Add(CreateSimpleConstantValue(methodImplOptionsTypeRef, (int)implAttributes));
- attributes.Add(interningProvider.Intern(methodImpl));
- }
- #endregion
-
- if (methodDefinition.HasCustomAttributes) {
- AddCustomAttributes(methodDefinition.CustomAttributes, attributes);
- }
- if (methodDefinition.HasSecurityDeclarations) {
- AddSecurityAttributes(methodDefinition.SecurityDeclarations, attributes);
- }
- if (methodDefinition.MethodReturnType.HasMarshalInfo) {
- returnTypeAttributes.Add(ConvertMarshalInfo(methodDefinition.MethodReturnType.MarshalInfo));
- }
- if (methodDefinition.MethodReturnType.HasCustomAttributes) {
- AddCustomAttributes(methodDefinition.MethodReturnType.CustomAttributes, returnTypeAttributes);
- }
- }
- #endregion
-
- #region Type Attributes
- static readonly DefaultUnresolvedAttribute serializableAttribute = new DefaultUnresolvedAttribute(typeof(SerializableAttribute).ToTypeReference());
- static readonly DefaultUnresolvedAttribute comImportAttribute = new DefaultUnresolvedAttribute(typeof(ComImportAttribute).ToTypeReference());
- static readonly ITypeReference structLayoutAttributeTypeRef = typeof(StructLayoutAttribute).ToTypeReference();
- static readonly ITypeReference layoutKindTypeRef = typeof(LayoutKind).ToTypeReference();
- static readonly ITypeReference charSetTypeRef = typeof(CharSet).ToTypeReference();
-
- void AddAttributes(TypeDefinition typeDefinition, IUnresolvedTypeDefinition targetEntity)
- {
- // SerializableAttribute
- if (typeDefinition.IsSerializable)
- targetEntity.Attributes.Add(serializableAttribute);
-
- // ComImportAttribute
- if (typeDefinition.IsImport)
- targetEntity.Attributes.Add(comImportAttribute);
-
- #region StructLayoutAttribute
- LayoutKind layoutKind = LayoutKind.Auto;
- switch (typeDefinition.Attributes & TypeAttributes.LayoutMask) {
- case TypeAttributes.SequentialLayout:
- layoutKind = LayoutKind.Sequential;
- break;
- case TypeAttributes.ExplicitLayout:
- layoutKind = LayoutKind.Explicit;
- break;
- }
- CharSet charSet = CharSet.None;
- switch (typeDefinition.Attributes & TypeAttributes.StringFormatMask) {
- case TypeAttributes.AnsiClass:
- charSet = CharSet.Ansi;
- break;
- case TypeAttributes.AutoClass:
- charSet = CharSet.Auto;
- break;
- case TypeAttributes.UnicodeClass:
- charSet = CharSet.Unicode;
- break;
- }
- LayoutKind defaultLayoutKind = (typeDefinition.IsValueType && !typeDefinition.IsEnum) ? LayoutKind.Sequential: LayoutKind.Auto;
- if (layoutKind != defaultLayoutKind || charSet != CharSet.Ansi || typeDefinition.PackingSize > 0 || typeDefinition.ClassSize > 0) {
- DefaultUnresolvedAttribute structLayout = new DefaultUnresolvedAttribute(structLayoutAttributeTypeRef, new[] { layoutKindTypeRef });
- structLayout.PositionalArguments.Add(CreateSimpleConstantValue(layoutKindTypeRef, (int)layoutKind));
- if (charSet != CharSet.Ansi) {
- structLayout.AddNamedFieldArgument("CharSet", CreateSimpleConstantValue(charSetTypeRef, (int)charSet));
- }
- if (typeDefinition.PackingSize > 0) {
- structLayout.AddNamedFieldArgument("Pack", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.PackingSize));
- }
- if (typeDefinition.ClassSize > 0) {
- structLayout.AddNamedFieldArgument("Size", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.ClassSize));
- }
- targetEntity.Attributes.Add(interningProvider.Intern(structLayout));
- }
- #endregion
-
- if (typeDefinition.HasCustomAttributes) {
- AddCustomAttributes(typeDefinition.CustomAttributes, targetEntity.Attributes);
- }
- if (typeDefinition.HasSecurityDeclarations) {
- AddSecurityAttributes(typeDefinition.SecurityDeclarations, targetEntity.Attributes);
- }
- }
- #endregion
-
- #region Field Attributes
- static readonly ITypeReference fieldOffsetAttributeTypeRef = typeof(FieldOffsetAttribute).ToTypeReference();
- static readonly IUnresolvedAttribute nonSerializedAttribute = new DefaultUnresolvedAttribute(typeof(NonSerializedAttribute).ToTypeReference());
-
- void AddAttributes(FieldDefinition fieldDefinition, IUnresolvedEntity targetEntity)
- {
- // FieldOffsetAttribute
- if (fieldDefinition.HasLayoutInfo) {
- DefaultUnresolvedAttribute fieldOffset = new DefaultUnresolvedAttribute(fieldOffsetAttributeTypeRef, new[] { KnownTypeReference.Int32 });
- fieldOffset.PositionalArguments.Add(CreateSimpleConstantValue(KnownTypeReference.Int32, fieldDefinition.Offset));
- targetEntity.Attributes.Add(interningProvider.Intern(fieldOffset));
- }
-
- // NonSerializedAttribute
- if (fieldDefinition.IsNotSerialized) {
- targetEntity.Attributes.Add(nonSerializedAttribute);
- }
-
- if (fieldDefinition.HasMarshalInfo) {
- targetEntity.Attributes.Add(ConvertMarshalInfo(fieldDefinition.MarshalInfo));
- }
-
- if (fieldDefinition.HasCustomAttributes) {
- AddCustomAttributes(fieldDefinition.CustomAttributes, targetEntity.Attributes);
- }
- }
- #endregion
-
- #region Event Attributes
- void AddAttributes(EventDefinition eventDefinition, IUnresolvedEntity targetEntity)
- {
- if (eventDefinition.HasCustomAttributes) {
- AddCustomAttributes(eventDefinition.CustomAttributes, targetEntity.Attributes);
- }
- }
- #endregion
-
- #region Property Attributes
- void AddAttributes(PropertyDefinition propertyDefinition, IUnresolvedEntity targetEntity)
- {
- if (propertyDefinition.HasCustomAttributes) {
- AddCustomAttributes(propertyDefinition.CustomAttributes, targetEntity.Attributes);
- }
- }
- #endregion
-
- #region MarshalAsAttribute (ConvertMarshalInfo)
- static readonly ITypeReference marshalAsAttributeTypeRef = typeof(MarshalAsAttribute).ToTypeReference();
- static readonly ITypeReference unmanagedTypeTypeRef = typeof(UnmanagedType).ToTypeReference();
-
- IUnresolvedAttribute ConvertMarshalInfo(MarshalInfo marshalInfo)
- {
- DefaultUnresolvedAttribute attr = new DefaultUnresolvedAttribute(marshalAsAttributeTypeRef, new[] { unmanagedTypeTypeRef });
- attr.PositionalArguments.Add(CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)marshalInfo.NativeType));
-
- FixedArrayMarshalInfo fami = marshalInfo as FixedArrayMarshalInfo;
- if (fami != null) {
- attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)fami.Size));
- if (fami.ElementType != NativeType.None)
- attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)fami.ElementType));
- }
- SafeArrayMarshalInfo sami = marshalInfo as SafeArrayMarshalInfo;
- if (sami != null && sami.ElementType != VariantType.None) {
- attr.AddNamedFieldArgument("SafeArraySubType", CreateSimpleConstantValue(typeof(VarEnum).ToTypeReference(), (int)sami.ElementType));
- }
- ArrayMarshalInfo ami = marshalInfo as ArrayMarshalInfo;
- if (ami != null) {
- if (ami.ElementType != NativeType.Max)
- attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, (int)ami.ElementType));
- if (ami.Size >= 0)
- attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)ami.Size));
- if (ami.SizeParameterMultiplier != 0 && ami.SizeParameterIndex >= 0)
- attr.AddNamedFieldArgument("SizeParamIndex", CreateSimpleConstantValue(KnownTypeReference.Int16, (short)ami.SizeParameterIndex));
- }
- CustomMarshalInfo cmi = marshalInfo as CustomMarshalInfo;
- if (cmi != null) {
- attr.AddNamedFieldArgument("MarshalType", CreateSimpleConstantValue(KnownTypeReference.String, cmi.ManagedType.FullName));
- if (!string.IsNullOrEmpty(cmi.Cookie))
- attr.AddNamedFieldArgument("MarshalCookie", CreateSimpleConstantValue(KnownTypeReference.String, cmi.Cookie));
- }
- FixedSysStringMarshalInfo fssmi = marshalInfo as FixedSysStringMarshalInfo;
- if (fssmi != null) {
- attr.AddNamedFieldArgument("SizeConst", CreateSimpleConstantValue(KnownTypeReference.Int32, (int)fssmi.Size));
- }
-
- return InterningProvider.Intern(attr);
- }
- #endregion
-
- #region Custom Attributes (ReadAttribute)
- void AddCustomAttributes(Mono.Collections.Generic.Collection<CustomAttribute> attributes, IList<IUnresolvedAttribute> targetCollection)
- {
- foreach (var cecilAttribute in attributes) {
- TypeReference type = cecilAttribute.AttributeType;
- if (type.Namespace == "System.Runtime.CompilerServices") {
- if (type.Name == "DynamicAttribute" || type.Name == "ExtensionAttribute" || type.Name == "DecimalConstantAttribute")
- continue;
- } else if (type.Name == "ParamArrayAttribute" && type.Namespace == "System") {
- continue;
- }
- targetCollection.Add(ReadAttribute(cecilAttribute));
- }
- }
-
- [CLSCompliant(false)]
- public IUnresolvedAttribute ReadAttribute(CustomAttribute attribute)
- {
- if (attribute == null)
- throw new ArgumentNullException("attribute");
- MethodReference ctor = attribute.Constructor;
- ITypeReference attributeType = ReadTypeReference(attribute.AttributeType);
- IList<ITypeReference> ctorParameterTypes = EmptyList<ITypeReference>.Instance;
- if (ctor.HasParameters) {
- ctorParameterTypes = new ITypeReference[ctor.Parameters.Count];
- for (int i = 0; i < ctorParameterTypes.Count; i++) {
- ctorParameterTypes[i] = ReadTypeReference(ctor.Parameters[i].ParameterType);
- }
- ctorParameterTypes = interningProvider.InternList(ctorParameterTypes);
- }
- return interningProvider.Intern(new CecilUnresolvedAttribute(attributeType, ctorParameterTypes, attribute.GetBlob()));
- }
- #endregion
-
- #region CecilUnresolvedAttribute
- static int GetBlobHashCode(byte[] blob)
- {
- unchecked {
- int hash = 0;
- foreach (byte b in blob) {
- hash *= 257;
- hash += b;
- }
- return hash;
- }
- }
-
- static bool BlobEquals(byte[] a, byte[] b)
- {
- if (a.Length != b.Length)
- return false;
- for (int i = 0; i < a.Length; i++) {
- if (a[i] != b[i])
- return false;
- }
- return true;
- }
-
- [Serializable, FastSerializerVersion(cecilLoaderVersion)]
- sealed class CecilUnresolvedAttribute : IUnresolvedAttribute, ISupportsInterning
- {
- internal readonly ITypeReference attributeType;
- internal readonly IList<ITypeReference> ctorParameterTypes;
- internal readonly byte[] blob;
-
- public CecilUnresolvedAttribute(ITypeReference attributeType, IList<ITypeReference> ctorParameterTypes, byte[] blob)
- {
- Debug.Assert(attributeType != null);
- Debug.Assert(ctorParameterTypes != null);
- Debug.Assert(blob != null);
- this.attributeType = attributeType;
- this.ctorParameterTypes = ctorParameterTypes;
- this.blob = blob;
- }
-
- DomRegion IUnresolvedAttribute.Region {
- get { return DomRegion.Empty; }
- }
-
- IAttribute IUnresolvedAttribute.CreateResolvedAttribute(ITypeResolveContext context)
- {
- if (context.CurrentAssembly == null)
- throw new InvalidOperationException("Cannot resolve CecilUnresolvedAttribute without a parent assembly");
- return new CecilResolvedAttribute(context, this);
- }
-
- int ISupportsInterning.GetHashCodeForInterning()
- {
- return attributeType.GetHashCode() ^ ctorParameterTypes.GetHashCode() ^ GetBlobHashCode(blob);
- }
-
- bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
- {
- CecilUnresolvedAttribute o = other as CecilUnresolvedAttribute;
- return o != null && attributeType == o.attributeType && ctorParameterTypes == o.ctorParameterTypes
- && BlobEquals(blob, o.blob);
- }
- }
- #endregion
-
- #region CecilResolvedAttribute
- sealed class CecilResolvedAttribute : IAttribute
- {
- readonly ITypeResolveContext context;
- readonly byte[] blob;
- readonly IList<ITypeReference> ctorParameterTypes;
- readonly IType attributeType;
-
- IMethod constructor;
- volatile bool constructorResolved;
-
- IList<ResolveResult> positionalArguments;
- IList<KeyValuePair<IMember, ResolveResult>> namedArguments;
-
- public CecilResolvedAttribute(ITypeResolveContext context, CecilUnresolvedAttribute unresolved)
- {
- this.context = context;
- this.blob = unresolved.blob;
- this.ctorParameterTypes = unresolved.ctorParameterTypes;
- this.attributeType = unresolved.attributeType.Resolve(context);
- }
-
- public CecilResolvedAttribute(ITypeResolveContext context, IType attributeType)
- {
- this.context = context;
- this.attributeType = attributeType;
- this.ctorParameterTypes = EmptyList<ITypeReference>.Instance;
- }
-
- public DomRegion Region {
- get { return DomRegion.Empty; }
- }
-
- public IType AttributeType {
- get { return attributeType; }
- }
-
- public IMethod Constructor {
- get {
- if (!constructorResolved) {
- constructor = ResolveConstructor();
- constructorResolved = true;
- }
- return constructor;
- }
- }
-
- IMethod ResolveConstructor()
- {
- var parameterTypes = ctorParameterTypes.Resolve(context);
- foreach (var ctor in attributeType.GetConstructors(m => m.Parameters.Count == parameterTypes.Count)) {
- bool ok = true;
- for (int i = 0; i < parameterTypes.Count; i++) {
- if (!ctor.Parameters[i].Type.Equals(parameterTypes[i])) {
- ok = false;
- break;
- }
- }
- if (ok)
- return ctor;
- }
- return null;
- }
-
- public IList<ResolveResult> PositionalArguments {
- get {
- var result = LazyInit.VolatileRead(ref this.positionalArguments);
- if (result != null) {
- return result;
- }
- DecodeBlob();
- return positionalArguments;
- }
- }
-
- public IList<KeyValuePair<IMember, ResolveResult>> NamedArguments {
- get {
- var result = LazyInit.VolatileRead(ref this.namedArguments);
- if (result != null) {
- return result;
- }
- DecodeBlob();
- return namedArguments;
- }
- }
-
- public override string ToString()
- {
- return "[" + attributeType.ToString() + "(...)]";
- }
-
- void DecodeBlob()
- {
- var positionalArguments = new List<ResolveResult>();
- var namedArguments = new List<KeyValuePair<IMember, ResolveResult>>();
- DecodeBlob(positionalArguments, namedArguments);
- Interlocked.CompareExchange(ref this.positionalArguments, positionalArguments, null);
- Interlocked.CompareExchange(ref this.namedArguments, namedArguments, null);
- }
-
- void DecodeBlob(List<ResolveResult> positionalArguments, List<KeyValuePair<IMember, ResolveResult>> namedArguments)
- {
- if (blob == null)
- return;
- BlobReader reader = new BlobReader(blob, context.CurrentAssembly);
- if (reader.ReadUInt16() != 0x0001) {
- Debug.WriteLine("Unknown blob prolog");
- return;
- }
- foreach (var ctorParameter in ctorParameterTypes.Resolve(context)) {
- ResolveResult arg = reader.ReadFixedArg(ctorParameter);
- positionalArguments.Add(arg);
- if (arg.IsError) {
- // After a decoding error, we must stop decoding the blob because
- // we might have read too few bytes due to the error.
- // Just fill up the remaining arguments with ErrorResolveResult:
- while (positionalArguments.Count < ctorParameterTypes.Count)
- positionalArguments.Add(ErrorResolveResult.UnknownError);
- return;
- }
- }
- ushort numNamed = reader.ReadUInt16();
- for (int i = 0; i < numNamed; i++) {
- var namedArg = reader.ReadNamedArg(attributeType);
- if (namedArg.Key != null)
- namedArguments.Add(namedArg);
- }
- }
- }
- #endregion
-
- #region class BlobReader
- class BlobReader
- {
- byte[] buffer;
- int position;
- readonly IAssembly currentResolvedAssembly;
-
- public BlobReader(byte[] buffer, IAssembly currentResolvedAssembly)
- {
- if (buffer == null)
- throw new ArgumentNullException("buffer");
- this.buffer = buffer;
- this.currentResolvedAssembly = currentResolvedAssembly;
- }
-
- public byte ReadByte()
- {
- return buffer[position++];
- }
-
- public sbyte ReadSByte()
- {
- unchecked {
- return(sbyte) ReadByte();
- }
- }
-
- public byte[] ReadBytes(int length)
- {
- var bytes = new byte[length];
- Buffer.BlockCopy(buffer, position, bytes, 0, length);
- position += length;
- return bytes;
- }
-
- public ushort ReadUInt16()
- {
- unchecked {
- ushort value =(ushort)(buffer[position]
- |(buffer[position + 1] << 8));
- position += 2;
- return value;
- }
- }
-
- public short ReadInt16()
- {
- unchecked {
- return(short) ReadUInt16();
- }
- }
-
- public uint ReadUInt32()
- {
- unchecked {
- uint value =(uint)(buffer[position]
- |(buffer[position + 1] << 8)
- |(buffer[position + 2] << 16)
- |(buffer[position + 3] << 24));
- position += 4;
- return value;
- }
- }
-
- public int ReadInt32()
- {
- unchecked {
- return(int) ReadUInt32();
- }
- }
-
- public ulong ReadUInt64()
- {
- unchecked {
- uint low = ReadUInt32();
- uint high = ReadUInt32();
-
- return(((ulong) high) << 32) | low;
- }
- }
-
- public long ReadInt64()
- {
- unchecked {
- return(long) ReadUInt64();
- }
- }
-
- public uint ReadCompressedUInt32()
- {
- unchecked {
- byte first = ReadByte();
- if((first & 0x80) == 0)
- return first;
-
- if((first & 0x40) == 0)
- return((uint)(first & ~0x80) << 8)
- | ReadByte();
-
- return((uint)(first & ~0xc0) << 24)
- |(uint) ReadByte() << 16
- |(uint) ReadByte() << 8
- | ReadByte();
- }
- }
-
- public float ReadSingle()
- {
- unchecked {
- if(!BitConverter.IsLittleEndian) {
- var bytes = ReadBytes(4);
- Array.Reverse(bytes);
- return BitConverter.ToSingle(bytes, 0);
- }
-
- float value = BitConverter.ToSingle(buffer, position);
- position += 4;
- return value;
- }
- }
-
- public double ReadDouble()
- {
- unchecked {
- if(!BitConverter.IsLittleEndian) {
- var bytes = ReadBytes(8);
- Array.Reverse(bytes);
- return BitConverter.ToDouble(bytes, 0);
- }
-
- double value = BitConverter.ToDouble(buffer, position);
- position += 8;
- return value;
- }
- }
-
- public ResolveResult ReadFixedArg(IType argType)
- {
- if (argType.Kind == TypeKind.Array) {
- if (((ArrayType)argType).Dimensions != 1) {
- // Only single-dimensional arrays are supported
- return ErrorResolveResult.UnknownError;
- }
- IType elementType = ((ArrayType)argType).ElementType;
- uint numElem = ReadUInt32();
- if (numElem == 0xffffffff) {
- // null reference
- return new ConstantResolveResult(argType, null);
- } else {
- ResolveResult[] elements = new ResolveResult[numElem];
- for (int i = 0; i < elements.Length; i++) {
- elements[i] = ReadElem(elementType);
- // Stop decoding when encountering an error:
- if (elements[i].IsError)
- return ErrorResolveResult.UnknownError;
- }
- IType int32 = currentResolvedAssembly.Compilation.FindType(KnownTypeCode.Int32);
- ResolveResult[] sizeArgs = { new ConstantResolveResult(int32, elements.Length) };
- return new ArrayCreateResolveResult(argType, sizeArgs, elements);
- }
- } else {
- return ReadElem(argType);
- }
- }
-
- public ResolveResult ReadElem(IType elementType)
- {
- ITypeDefinition underlyingType;
- if (elementType.Kind == TypeKind.Enum) {
- underlyingType = elementType.GetDefinition().EnumUnderlyingType.GetDefinition();
- } else {
- underlyingType = elementType.GetDefinition();
- }
- if (underlyingType == null)
- return ErrorResolveResult.UnknownError;
- KnownTypeCode typeCode = underlyingType.KnownTypeCode;
- if (typeCode == KnownTypeCode.Object) {
- // boxed value type
- IType boxedTyped = ReadCustomAttributeFieldOrPropType();
- ResolveResult elem = ReadElem(boxedTyped);
- if (elem.IsCompileTimeConstant && elem.ConstantValue == null)
- return new ConstantResolveResult(elementType, null);
- else
- return new ConversionResolveResult(elementType, elem, Conversion.BoxingConversion);
- } else if (typeCode == KnownTypeCode.Type) {
- return new TypeOfResolveResult(underlyingType, ReadType());
- } else {
- return new ConstantResolveResult(elementType, ReadElemValue(typeCode));
- }
- }
-
- object ReadElemValue(KnownTypeCode typeCode)
- {
- switch (typeCode) {
- case KnownTypeCode.Boolean:
- return ReadByte() != 0;
- case KnownTypeCode.Char:
- return (char)ReadUInt16();
- case KnownTypeCode.SByte:
- return ReadSByte();
- case KnownTypeCode.Byte:
- return ReadByte();
- case KnownTypeCode.Int16:
- return ReadInt16();
- case KnownTypeCode.UInt16:
- return ReadUInt16();
- case KnownTypeCode.Int32:
- return ReadInt32();
- case KnownTypeCode.UInt32:
- return ReadUInt32();
- case KnownTypeCode.Int64:
- return ReadInt64();
- case KnownTypeCode.UInt64:
- return ReadUInt64();
- case KnownTypeCode.Single:
- return ReadSingle();
- case KnownTypeCode.Double:
- return ReadDouble();
- case KnownTypeCode.String:
- return ReadSerString();
- default:
- throw new NotSupportedException();
- }
- }
-
- public string ReadSerString ()
- {
- if (buffer [position] == 0xff) {
- position++;
- return null;
- }
-
- int length = (int) ReadCompressedUInt32();
- if (length == 0)
- return string.Empty;
-
- string @string = System.Text.Encoding.UTF8.GetString(
- buffer, position,
- buffer [position + length - 1] == 0 ? length - 1 : length);
-
- position += length;
- return @string;
- }
-
- public KeyValuePair<IMember, ResolveResult> ReadNamedArg(IType attributeType)
- {
- EntityType memberType;
- var b = ReadByte();
- switch (b) {
- case 0x53:
- memberType = EntityType.Field;
- break;
- case 0x54:
- memberType = EntityType.Property;
- break;
- default:
- throw new NotSupportedException(string.Format("Custom member type 0x{0:x} is not supported.", b));
- }
- IType type = ReadCustomAttributeFieldOrPropType();
- string name = ReadSerString();
- ResolveResult val = ReadFixedArg(type);
- IMember member = null;
- // Use last matching member, as GetMembers() returns members from base types first.
- foreach (IMember m in attributeType.GetMembers(m => m.EntityType == memberType && m.Name == name)) {
- if (m.ReturnType.Equals(type))
- member = m;
- }
- return new KeyValuePair<IMember, ResolveResult>(member, val);
- }
-
- IType ReadCustomAttributeFieldOrPropType()
- {
- ICompilation compilation = currentResolvedAssembly.Compilation;
- var b = ReadByte();
- switch (b) {
- case 0x02:
- return compilation.FindType(KnownTypeCode.Boolean);
- case 0x03:
- return compilation.FindType(KnownTypeCode.Char);
- case 0x04:
- return compilation.FindType(KnownTypeCode.SByte);
- case 0x05:
- return compilation.FindType(KnownTypeCode.Byte);
- case 0x06:
- return compilation.FindType(KnownTypeCode.Int16);
- case 0x07:
- return compilation.FindType(KnownTypeCode.UInt16);
- case 0x08:
- return compilation.FindType(KnownTypeCode.Int32);
- case 0x09:
- return compilation.FindType(KnownTypeCode.UInt32);
- case 0x0a:
- return compilation.FindType(KnownTypeCode.Int64);
- case 0x0b:
- return compilation.FindType(KnownTypeCode.UInt64);
- case 0x0c:
- return compilation.FindType(KnownTypeCode.Single);
- case 0x0d:
- return compilation.FindType(KnownTypeCode.Double);
- case 0x0e:
- return compilation.FindType(KnownTypeCode.String);
- case 0x1d:
- return new ArrayType(compilation, ReadCustomAttributeFieldOrPropType());
- case 0x50:
- return compilation.FindType(KnownTypeCode.Type);
- case 0x51: // boxed value type
- return compilation.FindType(KnownTypeCode.Object);
- case 0x55: // enum
- return ReadType();
- default:
- throw new NotSupportedException(string.Format("Custom attribute type 0x{0:x} is not supported.", b));
- }
- }
-
- IType ReadType()
- {
- string typeName = ReadSerString();
- ITypeReference typeReference = ReflectionHelper.ParseReflectionName(typeName);
- IType typeInCurrentAssembly = typeReference.Resolve(new SimpleTypeResolveContext(currentResolvedAssembly));
- if (typeInCurrentAssembly.Kind != TypeKind.Unknown)
- return typeInCurrentAssembly;
-
- // look for the type in mscorlib
- ITypeDefinition systemObject = currentResolvedAssembly.Compilation.FindType(KnownTypeCode.Object).GetDefinition();
- if (systemObject != null) {
- return typeReference.Resolve(new SimpleTypeResolveContext(systemObject.ParentAssembly));
- } else {
- // couldn't find corlib - return the unknown IType for the current assembly
- return typeInCurrentAssembly;
- }
- }
- }
- #endregion
-
- #region Security Attributes
- static readonly ITypeReference securityActionTypeReference = typeof(System.Security.Permissions.SecurityAction).ToTypeReference();
- static readonly ITypeReference permissionSetAttributeTypeReference = typeof(System.Security.Permissions.PermissionSetAttribute).ToTypeReference();
-
- /// <summary>
- /// Reads a security declaration.
- /// </summary>
- [CLSCompliant(false)]
- public IList<IUnresolvedAttribute> ReadSecurityDeclaration(SecurityDeclaration secDecl)
- {
- if (secDecl == null)
- throw new ArgumentNullException("secDecl");
- var result = new List<IUnresolvedAttribute>();
- AddSecurityAttributes(secDecl, result);
- return result;
- }
-
- void AddSecurityAttributes(Mono.Collections.Generic.Collection<SecurityDeclaration> securityDeclarations, IList<IUnresolvedAttribute> targetCollection)
- {
- foreach (var secDecl in securityDeclarations) {
- AddSecurityAttributes(secDecl, targetCollection);
- }
- }
-
- void AddSecurityAttributes(SecurityDeclaration secDecl, IList<IUnresolvedAttribute> targetCollection)
- {
- byte[] blob = secDecl.GetBlob();
- BlobReader reader = new BlobReader(blob, null);
- var securityAction = new SimpleConstantValue(securityActionTypeReference, (int)secDecl.Action);
- if (reader.ReadByte() == '.') {
- // binary attribute
- uint attributeCount = reader.ReadCompressedUInt32();
- UnresolvedSecurityDeclaration unresolvedSecDecl = new UnresolvedSecurityDeclaration(securityAction, blob);
- unresolvedSecDecl = interningProvider.Intern(unresolvedSecDecl);
- for (uint i = 0; i < attributeCount; i++) {
- targetCollection.Add(interningProvider.Intern(new UnresolvedSecurityAttribute(unresolvedSecDecl, (int)i)));
- }
- } else {
- // for backward compatibility with .NET 1.0: XML-encoded attribute
- var attr = new DefaultUnresolvedAttribute(permissionSetAttributeTypeReference);
- attr.ConstructorParameterTypes.Add(securityActionTypeReference);
- attr.PositionalArguments.Add(securityAction);
- string xml = System.Text.Encoding.Unicode.GetString(blob);
- attr.AddNamedPropertyArgument("XML", CreateSimpleConstantValue(KnownTypeReference.String, xml));
- targetCollection.Add(interningProvider.Intern(attr));
- }
- }
-
- [Serializable, FastSerializerVersion(cecilLoaderVersion)]
- sealed class UnresolvedSecurityDeclaration : ISupportsInterning
- {
- readonly IConstantValue securityAction;
- readonly byte[] blob;
-
- public UnresolvedSecurityDeclaration(IConstantValue securityAction, byte[] blob)
- {
- Debug.Assert(securityAction != null);
- Debug.Assert(blob != null);
- this.securityAction = securityAction;
- this.blob = blob;
- }
-
- public IList<IAttribute> Resolve(IAssembly currentAssembly)
- {
- // TODO: make this a per-assembly cache
-// CacheManager cache = currentAssembly.Compilation.CacheManager;
-// IList<IAttribute> result = (IList<IAttribute>)cache.GetShared(this);
-// if (result != null)
-// return result;
-
- ITypeResolveContext context = new SimpleTypeResolveContext(currentAssembly);
- BlobReader reader = new BlobReader(blob, currentAssembly);
- if (reader.ReadByte() != '.') {
- // should not use UnresolvedSecurityDeclaration for XML secdecls
- throw new InvalidOperationException();
- }
- ResolveResult securityActionRR = securityAction.Resolve(context);
- uint attributeCount = reader.ReadCompressedUInt32();
- IAttribute[] attributes = new IAttribute[attributeCount];
- try {
- ReadSecurityBlob(reader, attributes, context, securityActionRR);
- } catch (NotSupportedException ex) {
- // ignore invalid blobs
- Debug.WriteLine(ex.ToString());
- }
- for (int i = 0; i < attributes.Length; i++) {
- if (attributes[i] == null)
- attributes[i] = new CecilResolvedAttribute(context, SpecialType.UnknownType);
- }
- return attributes;
-// return (IList<IAttribute>)cache.GetOrAddShared(this, attributes);
- }
-
- void ReadSecurityBlob(BlobReader reader, IAttribute[] attributes, ITypeResolveContext context, ResolveResult securityActionRR)
- {
- for (int i = 0; i < attributes.Length; i++) {
- string attributeTypeName = reader.ReadSerString();
- ITypeReference attributeTypeRef = ReflectionHelper.ParseReflectionName(attributeTypeName);
- IType attributeType = attributeTypeRef.Resolve(context);
-
- reader.ReadCompressedUInt32(); // ??
- // The specification seems to be incorrect here, so I'm using the logic from Cecil instead.
- uint numNamed = reader.ReadCompressedUInt32();
-
- var namedArgs = new List<KeyValuePair<IMember, ResolveResult>>((int)numNamed);
- for (uint j = 0; j < numNamed; j++) {
- var namedArg = reader.ReadNamedArg(attributeType);
- if (namedArg.Key != null)
- namedArgs.Add(namedArg);
-
- }
- attributes[i] = new DefaultAttribute(
- attributeType,
- positionalArguments: new ResolveResult[] { securityActionRR },
- namedArguments: namedArgs);
- }
- }
-
- int ISupportsInterning.GetHashCodeForInterning()
- {
- return securityAction.GetHashCode() ^ GetBlobHashCode(blob);
- }
-
- bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
- {
- UnresolvedSecurityDeclaration o = other as UnresolvedSecurityDeclaration;
- return o != null && securityAction == o.securityAction && BlobEquals(blob, o.blob);
- }
- }
-
- [Serializable, FastSerializerVersion(cecilLoaderVersion)]
- sealed class UnresolvedSecurityAttribute : IUnresolvedAttribute, ISupportsInterning
- {
- readonly UnresolvedSecurityDeclaration secDecl;
- readonly int index;
-
- public UnresolvedSecurityAttribute(UnresolvedSecurityDeclaration secDecl, int index)
- {
- Debug.Assert(secDecl != null);
- this.secDecl = secDecl;
- this.index = index;
- }
-
- DomRegion IUnresolvedAttribute.Region {
- get { return DomRegion.Empty; }
- }
-
- IAttribute IUnresolvedAttribute.CreateResolvedAttribute(ITypeResolveContext context)
- {
- return secDecl.Resolve(context.CurrentAssembly)[index];
- }
-
- int ISupportsInterning.GetHashCodeForInterning()
- {
- return index ^ secDecl.GetHashCode();
- }
-
- bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
- {
- UnresolvedSecurityAttribute attr = other as UnresolvedSecurityAttribute;
- return attr != null && index == attr.index && secDecl == attr.secDecl;
- }
- }
- #endregion
- #endregion
-
- #region Read Type Definition
- DefaultUnresolvedTypeDefinition CreateTopLevelTypeDefinition(TypeDefinition typeDefinition)
- {
- string name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(typeDefinition.Name);
- var td = new DefaultUnresolvedTypeDefinition(typeDefinition.Namespace, name);
- if (typeDefinition.HasGenericParameters)
- InitTypeParameters(typeDefinition, td.TypeParameters);
- return td;
- }
-
- static void InitTypeParameters(TypeDefinition typeDefinition, IList<IUnresolvedTypeParameter> typeParameters)
- {
- // Type parameters are initialized within the constructor so that the class can be put into the type storage
- // before the rest of the initialization runs - this allows it to be available for early binding as soon as possible.
- for (int i = 0; i < typeDefinition.GenericParameters.Count; i++) {
- if (typeDefinition.GenericParameters[i].Position != i)
- throw new InvalidOperationException("g.Position != i");
- typeParameters.Add(new DefaultUnresolvedTypeParameter(
- EntityType.TypeDefinition, i, typeDefinition.GenericParameters[i].Name));
- }
- }
-
- void InitTypeParameterConstraints(TypeDefinition typeDefinition, IList<IUnresolvedTypeParameter> typeParameters)
- {
- for (int i = 0; i < typeParameters.Count; i++) {
- var tp = (DefaultUnresolvedTypeParameter)typeParameters[i];
- AddConstraints(tp, typeDefinition.GenericParameters[i]);
- tp.ApplyInterningProvider(interningProvider);
- }
- }
-
- void InitTypeDefinition(TypeDefinition typeDefinition, DefaultUnresolvedTypeDefinition td)
- {
- td.Kind = GetTypeKind(typeDefinition);
- InitTypeModifiers(typeDefinition, td);
- InitTypeParameterConstraints(typeDefinition, td.TypeParameters);
-
- // nested types can be initialized only after generic parameters were created
- InitNestedTypes(typeDefinition, td, td.NestedTypes);
- AddAttributes(typeDefinition, td);
- td.HasExtensionMethods = HasExtensionAttribute(typeDefinition);
-
- InitBaseTypes(typeDefinition, td.BaseTypes);
-
- td.AddDefaultConstructorIfRequired = (td.Kind == TypeKind.Struct || td.Kind == TypeKind.Enum);
- InitMembers(typeDefinition, td, td.Members);
- td.ApplyInterningProvider(interningProvider);
- td.Freeze();
- RegisterCecilObject(td, typeDefinition);
- }
-
- void InitBaseTypes(TypeDefinition typeDefinition, IList<ITypeReference> baseTypes)
- {
- // set base classes
- if (typeDefinition.IsEnum) {
- foreach (FieldDefinition enumField in typeDefinition.Fields) {
- if (!enumField.IsStatic) {
- baseTypes.Add(ReadTypeReference(enumField.FieldType));
- break;
- }
- }
- } else {
- if (typeDefinition.BaseType != null) {
- baseTypes.Add(ReadTypeReference(typeDefinition.BaseType));
- }
- if (typeDefinition.HasInterfaces) {
- foreach (TypeReference iface in typeDefinition.Interfaces) {
- baseTypes.Add(ReadTypeReference(iface));
- }
- }
- }
- }
-
- void InitNestedTypes(TypeDefinition typeDefinition, IUnresolvedTypeDefinition declaringTypeDefinition, IList<IUnresolvedTypeDefinition> nestedTypes)
- {
- if (!typeDefinition.HasNestedTypes)
- return;
- foreach (TypeDefinition nestedTypeDef in typeDefinition.NestedTypes) {
- TypeAttributes visibility = nestedTypeDef.Attributes & TypeAttributes.VisibilityMask;
- if (this.IncludeInternalMembers
- || visibility == TypeAttributes.NestedPublic
- || visibility == TypeAttributes.NestedFamily
- || visibility == TypeAttributes.NestedFamORAssem)
- {
- string name = nestedTypeDef.Name;
- int pos = name.LastIndexOf('/');
- if (pos > 0)
- name = name.Substring(pos + 1);
- name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
- var nestedType = new DefaultUnresolvedTypeDefinition(declaringTypeDefinition, name);
- InitTypeParameters(nestedTypeDef, nestedType.TypeParameters);
- nestedTypes.Add(nestedType);
- InitTypeDefinition(nestedTypeDef, nestedType);
- }
- }
- }
-
- static TypeKind GetTypeKind(TypeDefinition typeDefinition)
- {
- // set classtype
- if (typeDefinition.IsInterface) {
- return TypeKind.Interface;
- } else if (typeDefinition.IsEnum) {
- return TypeKind.Enum;
- } else if (typeDefinition.IsValueType) {
- return TypeKind.Struct;
- } else if (IsDelegate(typeDefinition)) {
- return TypeKind.Delegate;
- } else if (IsModule(typeDefinition)) {
- return TypeKind.Module;
- } else {
- return TypeKind.Class;
- }
- }
-
- static void InitTypeModifiers(TypeDefinition typeDefinition, AbstractUnresolvedEntity td)
- {
- td.IsSealed = typeDefinition.IsSealed;
- td.IsAbstract = typeDefinition.IsAbstract;
- switch (typeDefinition.Attributes & TypeAttributes.VisibilityMask) {
- case TypeAttributes.NotPublic:
- case TypeAttributes.NestedAssembly:
- td.Accessibility = Accessibility.Internal;
- break;
- case TypeAttributes.Public:
- case TypeAttributes.NestedPublic:
- td.Accessibility = Accessibility.Public;
- break;
- case TypeAttributes.NestedPrivate:
- td.Accessibility = Accessibility.Private;
- break;
- case TypeAttributes.NestedFamily:
- td.Accessibility = Accessibility.Protected;
- break;
- case TypeAttributes.NestedFamANDAssem:
- td.Accessibility = Accessibility.ProtectedAndInternal;
- break;
- case TypeAttributes.NestedFamORAssem:
- td.Accessibility = Accessibility.ProtectedOrInternal;
- break;
- }
- }
-
- static bool IsDelegate(TypeDefinition type)
- {
- if (type.BaseType != null && type.BaseType.Namespace == "System") {
- if (type.BaseType.Name == "MulticastDelegate")
- return true;
- if (type.BaseType.Name == "Delegate" && type.Name != "MulticastDelegate")
- return true;
- }
- return false;
- }
-
- static bool IsModule(TypeDefinition type)
- {
- if (!type.HasCustomAttributes)
- return false;
- foreach (var att in type.CustomAttributes) {
- if (att.AttributeType.FullName == "Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute"
- || att.AttributeType.FullName == "System.Runtime.CompilerServices.CompilerGlobalScopeAttribute")
- {
- return true;
- }
- }
- return false;
- }
-
- void InitMembers(TypeDefinition typeDefinition, IUnresolvedTypeDefinition td, IList<IUnresolvedMember> members)
- {
- if (typeDefinition.HasMethods) {
- foreach (MethodDefinition method in typeDefinition.Methods) {
- if (IsVisible(method.Attributes) && !IsAccessor(method.SemanticsAttributes)) {
- EntityType type = EntityType.Method;
- if (method.IsSpecialName) {
- if (method.IsConstructor)
- type = EntityType.Constructor;
- else if (method.Name.StartsWith("op_", StringComparison.Ordinal))
- type = EntityType.Operator;
- }
- members.Add(ReadMethod(method, td, type));
- }
- }
- }
- if (typeDefinition.HasFields) {
- foreach (FieldDefinition field in typeDefinition.Fields) {
- if (IsVisible(field.Attributes) && !field.IsSpecialName) {
- members.Add(ReadField(field, td));
- }
- }
- }
- if (typeDefinition.HasProperties) {
- string defaultMemberName = null;
- var defaultMemberAttribute = typeDefinition.CustomAttributes.FirstOrDefault(
- a => a.AttributeType.FullName == typeof(System.Reflection.DefaultMemberAttribute).FullName);
- if (defaultMemberAttribute != null && defaultMemberAttribute.ConstructorArguments.Count == 1) {
- defaultMemberName = defaultMemberAttribute.ConstructorArguments[0].Value as string;
- }
- foreach (PropertyDefinition property in typeDefinition.Properties) {
- bool getterVisible = property.GetMethod != null && IsVisible(property.GetMethod.Attributes);
- bool setterVisible = property.SetMethod != null && IsVisible(property.SetMethod.Attributes);
- if (getterVisible || setterVisible) {
- EntityType type = EntityType.Property;
- if (property.HasParameters) {
- // Try to detect indexer:
- if (property.Name == defaultMemberName) {
- type = EntityType.Indexer; // normal indexer
- } else if (property.Name.EndsWith(".Item", StringComparison.Ordinal) && (property.GetMethod ?? property.SetMethod).HasOverrides) {
- // explicit interface implementation of indexer
- type = EntityType.Indexer;
- // We can't really tell parameterized properties and indexers apart in this case without
- // resolving the interface, so we rely on the "Item" naming convention instead.
- }
- }
- members.Add(ReadProperty(property, td, type));
- }
- }
- }
- if (typeDefinition.HasEvents) {
- foreach (EventDefinition ev in typeDefinition.Events) {
- if (ev.AddMethod != null && IsVisible(ev.AddMethod.Attributes)) {
- members.Add(ReadEvent(ev, td));
- }
- }
- }
- }
-
- static bool IsAccessor(MethodSemanticsAttributes semantics)
- {
- return !(semantics == MethodSemanticsAttributes.None || semantics == MethodSemanticsAttributes.Other);
- }
- #endregion
-
- #region Lazy-Loaded Type Definition
- sealed class LazyCecilTypeDefinition : AbstractUnresolvedEntity, IUnresolvedTypeDefinition
- {
- readonly CecilLoader loader;
- readonly string namespaceName;
- readonly TypeDefinition cecilTypeDef;
- readonly TypeKind kind;
- readonly IList<IUnresolvedTypeParameter> typeParameters;
-
- IList<ITypeReference> baseTypes;
- IList<IUnresolvedTypeDefinition> nestedTypes;
- IList<IUnresolvedMember> members;
-
- public LazyCecilTypeDefinition(CecilLoader loader, TypeDefinition typeDefinition)
- {
- this.loader = loader;
- this.cecilTypeDef = typeDefinition;
- this.EntityType = EntityType.TypeDefinition;
- this.namespaceName = cecilTypeDef.Namespace;
- this.Name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(cecilTypeDef.Name);
- var tps = new List<IUnresolvedTypeParameter>();
- InitTypeParameters(cecilTypeDef, tps);
- this.typeParameters = FreezableHelper.FreezeList(tps);
-
- this.kind = GetTypeKind(typeDefinition);
- InitTypeModifiers(typeDefinition, this);
- loader.InitTypeParameterConstraints(typeDefinition, typeParameters);
-
- loader.AddAttributes(typeDefinition, this);
- flags[FlagHasExtensionMethods] = HasExtensionAttribute(typeDefinition);
-
- this.ApplyInterningProvider(loader.interningProvider);
- this.Freeze();
- }
-
- public override string Namespace {
- get { return namespaceName; }
- set { throw new NotSupportedException(); }
- }
-
- public override string ReflectionName {
- get { return cecilTypeDef.FullName; }
- }
-
- public FullTypeName FullTypeName {
- get {
- return new TopLevelTypeName(namespaceName, this.Name, typeParameters.Count);
- }
- }
-
- public TypeKind Kind {
- get { return kind; }
- }
-
- public IList<IUnresolvedTypeParameter> TypeParameters {
- get { return typeParameters; }
- }
-
- public IList<ITypeReference> BaseTypes {
- get {
- var result = LazyInit.VolatileRead(ref this.baseTypes);
- if (result != null) {
- return result;
- }
- lock (loader.currentModule) {
- result = new List<ITypeReference>();
- loader.InitBaseTypes(cecilTypeDef, result);
- return LazyInit.GetOrSet(ref this.baseTypes, FreezableHelper.FreezeList(result));
- }
- }
- }
-
- public IList<IUnresolvedTypeDefinition> NestedTypes {
- get {
- var result = LazyInit.VolatileRead(ref this.nestedTypes);
- if (result != null) {
- return result;
- }
- lock (loader.currentModule) {
- if (this.nestedTypes != null)
- return this.nestedTypes;
- result = new List<IUnresolvedTypeDefinition>();
- loader.InitNestedTypes(cecilTypeDef, this, result);
- return LazyInit.GetOrSet(ref this.nestedTypes, FreezableHelper.FreezeList(result));
- }
- }
- }
-
- public IList<IUnresolvedMember> Members {
- get {
- var result = LazyInit.VolatileRead(ref this.members);
- if (result != null) {
- return result;
- }
- lock (loader.currentModule) {
- if (this.members != null)
- return this.members;
- result = new List<IUnresolvedMember>();
- loader.InitMembers(cecilTypeDef, this, result);
- return LazyInit.GetOrSet(ref this.members, FreezableHelper.FreezeList(result));
- }
- }
- }
-
- public IEnumerable<IUnresolvedMethod> Methods {
- get { return Members.OfType<IUnresolvedMethod>(); }
- }
-
- public IEnumerable<IUnresolvedProperty> Properties {
- get { return Members.OfType<IUnresolvedProperty>(); }
- }
-
- public IEnumerable<IUnresolvedField> Fields {
- get { return Members.OfType<IUnresolvedField>(); }
- }
-
- public IEnumerable<IUnresolvedEvent> Events {
- get { return Members.OfType<IUnresolvedEvent>(); }
- }
-
- public bool AddDefaultConstructorIfRequired {
- get { return kind == TypeKind.Struct || kind == TypeKind.Enum; }
- }
-
- public bool? HasExtensionMethods {
- get { return flags[FlagHasExtensionMethods]; }
- // we always return true or false, never null.
- // FlagHasNoExtensionMethods is unused in LazyCecilTypeDefinition
- }
-
- public override object Clone()
- {
- throw new NotSupportedException();
- }
-
- public IType Resolve(ITypeResolveContext context)
- {
- if (context == null)
- throw new ArgumentNullException("context");
- if (context.CurrentAssembly == null)
- throw new ArgumentException("An ITypeDefinition cannot be resolved in a context without a current assembly.");
- return context.CurrentAssembly.GetTypeDefinition(this.FullTypeName)
- ?? (IType)new UnknownType(this.Namespace, this.Name, this.TypeParameters.Count);
- }
-
- public ITypeResolveContext CreateResolveContext(ITypeResolveContext parentContext)
- {
- return parentContext;
- }
- }
- #endregion
-
- #region Read Method
- [CLSCompliant(false)]
- public IUnresolvedMethod ReadMethod(MethodDefinition method, IUnresolvedTypeDefinition parentType, EntityType methodType = EntityType.Method)
- {
- return ReadMethod(method, parentType, methodType, null);
- }
-
- IUnresolvedMethod ReadMethod(MethodDefinition method, IUnresolvedTypeDefinition parentType, EntityType methodType, IUnresolvedMember accessorOwner)
- {
- if (method == null)
- return null;
- DefaultUnresolvedMethod m = new DefaultUnresolvedMethod(parentType, method.Name);
- m.EntityType = methodType;
- m.AccessorOwner = accessorOwner;
- m.HasBody = method.HasBody;
- if (method.HasGenericParameters) {
- for (int i = 0; i < method.GenericParameters.Count; i++) {
- if (method.GenericParameters[i].Position != i)
- throw new InvalidOperationException("g.Position != i");
- m.TypeParameters.Add(new DefaultUnresolvedTypeParameter(
- EntityType.Method, i, method.GenericParameters[i].Name));
- }
- for (int i = 0; i < method.GenericParameters.Count; i++) {
- var tp = (DefaultUnresolvedTypeParameter)m.TypeParameters[i];
- AddConstraints(tp, method.GenericParameters[i]);
- tp.ApplyInterningProvider(interningProvider);
- }
- }
-
- m.ReturnType = ReadTypeReference(method.ReturnType, typeAttributes: method.MethodReturnType);
-
- if (HasAnyAttributes(method))
- AddAttributes(method, m.Attributes, m.ReturnTypeAttributes);
- TranslateModifiers(method, m);
-
- if (method.HasParameters) {
- foreach (ParameterDefinition p in method.Parameters) {
- m.Parameters.Add(ReadParameter(p));
- }
- }
-
- // mark as extension method if the attribute is set
- if (method.IsStatic && HasExtensionAttribute(method)) {
- m.IsExtensionMethod = true;
- }
-
- int lastDot = method.Name.LastIndexOf('.');
- if (lastDot >= 0 && method.HasOverrides) {
- // To be consistent with the parser-initialized type system, shorten the method name:
- m.Name = method.Name.Substring(lastDot + 1);
- m.IsExplicitInterfaceImplementation = true;
- foreach (var or in method.Overrides) {
- m.ExplicitInterfaceImplementations.Add(new DefaultMemberReference(
- accessorOwner != null ? EntityType.Accessor : EntityType.Method,
- ReadTypeReference(or.DeclaringType),
- or.Name, or.GenericParameters.Count, m.Parameters.Select(p => p.Type).ToList()));
- }
- }
-
- FinishReadMember(m, method);
- return m;
- }
-
- static bool HasExtensionAttribute(ICustomAttributeProvider provider)
- {
- if (provider.HasCustomAttributes) {
- foreach (var attr in provider.CustomAttributes) {
- if (attr.AttributeType.Name == "ExtensionAttribute" && attr.AttributeType.Namespace == "System.Runtime.CompilerServices")
- return true;
- }
- }
- return false;
- }
-
- bool IsVisible(MethodAttributes att)
- {
- att &= MethodAttributes.MemberAccessMask;
- return IncludeInternalMembers
- || att == MethodAttributes.Public
- || att == MethodAttributes.Family
- || att == MethodAttributes.FamORAssem;
- }
-
- static Accessibility GetAccessibility(MethodAttributes attr)
- {
- switch (attr & MethodAttributes.MemberAccessMask) {
- case MethodAttributes.Public:
- return Accessibility.Public;
- case MethodAttributes.FamANDAssem:
- return Accessibility.ProtectedAndInternal;
- case MethodAttributes.Assembly:
- return Accessibility.Internal;
- case MethodAttributes.Family:
- return Accessibility.Protected;
- case MethodAttributes.FamORAssem:
- return Accessibility.ProtectedOrInternal;
- default:
- return Accessibility.Private;
- }
- }
-
- void TranslateModifiers(MethodDefinition method, AbstractUnresolvedMember m)
- {
- if (m.DeclaringTypeDefinition.Kind == TypeKind.Interface) {
- // interface members don't have modifiers, but we want to handle them as "public abstract"
- m.Accessibility = Accessibility.Public;
- m.IsAbstract = true;
- } else {
- m.Accessibility = GetAccessibility(method.Attributes);
- if (method.IsAbstract) {
- m.IsAbstract = true;
- m.IsOverride = !method.IsNewSlot;
- } else if (method.IsFinal) {
- if (!method.IsNewSlot) {
- m.IsSealed = true;
- m.IsOverride = true;
- }
- } else if (method.IsVirtual) {
- if (method.IsNewSlot)
- m.IsVirtual = true;
- else
- m.IsOverride = true;
- }
- m.IsStatic = method.IsStatic;
- }
- }
- #endregion
-
- #region Read Parameter
- [CLSCompliant(false)]
- public IUnresolvedParameter ReadParameter(ParameterDefinition parameter)
- {
- if (parameter == null)
- throw new ArgumentNullException("parameter");
- var type = ReadTypeReference(parameter.ParameterType, typeAttributes: parameter);
- var p = new DefaultUnresolvedParameter(type, interningProvider.Intern(parameter.Name));
-
- if (parameter.ParameterType is Mono.Cecil.ByReferenceType) {
- if (!parameter.IsIn && parameter.IsOut)
- p.IsOut = true;
- else
- p.IsRef = true;
- }
- AddAttributes(parameter, p);
-
- if (parameter.IsOptional) {
- p.DefaultValue = CreateSimpleConstantValue(type, parameter.Constant);
- }
-
- if (parameter.ParameterType is Mono.Cecil.ArrayType) {
- foreach (CustomAttribute att in parameter.CustomAttributes) {
- if (att.AttributeType.FullName == typeof(ParamArrayAttribute).FullName) {
- p.IsParams = true;
- break;
- }
- }
- }
-
- return interningProvider.Intern(p);
- }
- #endregion
-
- #region Read Field
- bool IsVisible(FieldAttributes att)
- {
- att &= FieldAttributes.FieldAccessMask;
- return IncludeInternalMembers
- || att == FieldAttributes.Public
- || att == FieldAttributes.Family
- || att == FieldAttributes.FamORAssem;
- }
-
- decimal? TryDecodeDecimalConstantAttribute(CustomAttribute attribute)
- {
- if (attribute.ConstructorArguments.Count != 5)
- return null;
-
- BlobReader reader = new BlobReader(attribute.GetBlob(), null);
- if (reader.ReadUInt16() != 0x0001) {
- Debug.WriteLine("Unknown blob prolog");
- return null;
- }
-
- // DecimalConstantAttribute has the arguments (byte scale, byte sign, uint hi, uint mid, uint low) or (byte scale, byte sign, int hi, int mid, int low)
- // Both of these invoke the Decimal constructor (int lo, int mid, int hi, bool isNegative, byte scale) with explicit argument conversions if required.
- var ctorArgs = new object[attribute.ConstructorArguments.Count];
- for (int i = 0; i < ctorArgs.Length; i++) {
- switch (attribute.ConstructorArguments[i].Type.FullName) {
- case "System.Byte":
- ctorArgs[i] = reader.ReadByte();
- break;
- case "System.Int32":
- ctorArgs[i] = reader.ReadInt32();
- break;
- case "System.UInt32":
- ctorArgs[i] = unchecked((int)reader.ReadUInt32());
- break;
- default:
- return null;
- }
- }
-
- if (!ctorArgs.Select(a => a.GetType()).SequenceEqual(new[] { typeof(byte), typeof(byte), typeof(int), typeof(int), typeof(int) }))
- return null;
-
- return new decimal((int)ctorArgs[4], (int)ctorArgs[3], (int)ctorArgs[2], (byte)ctorArgs[1] != 0, (byte)ctorArgs[0]);
- }
-
- [CLSCompliant(false)]
- public IUnresolvedField ReadField(FieldDefinition field, IUnresolvedTypeDefinition parentType)
- {
- if (field == null)
- throw new ArgumentNullException("field");
- if (parentType == null)
- throw new ArgumentNullException("parentType");
-
- DefaultUnresolvedField f = new DefaultUnresolvedField(parentType, field.Name);
- f.Accessibility = GetAccessibility(field.Attributes);
- f.IsReadOnly = field.IsInitOnly;
- f.IsStatic = field.IsStatic;
- f.ReturnType = ReadTypeReference(field.FieldType, typeAttributes: field);
- if (field.HasConstant) {
- f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, field.Constant);
- }
- else {
- var decConstant = field.CustomAttributes.FirstOrDefault(a => a.AttributeType.FullName == "System.Runtime.CompilerServices.DecimalConstantAttribute");
- if (decConstant != null) {
- var constValue = TryDecodeDecimalConstantAttribute(decConstant);
- if (constValue != null)
- f.ConstantValue = CreateSimpleConstantValue(f.ReturnType, constValue);
- }
- }
- AddAttributes(field, f);
-
- RequiredModifierType modreq = field.FieldType as RequiredModifierType;
- if (modreq != null && modreq.ModifierType.FullName == typeof(IsVolatile).FullName) {
- f.IsVolatile = true;
- }
-
- FinishReadMember(f, field);
- return f;
- }
-
- static Accessibility GetAccessibility(FieldAttributes attr)
- {
- switch (attr & FieldAttributes.FieldAccessMask) {
- case FieldAttributes.Public:
- return Accessibility.Public;
- case FieldAttributes.FamANDAssem:
- return Accessibility.ProtectedAndInternal;
- case FieldAttributes.Assembly:
- return Accessibility.Internal;
- case FieldAttributes.Family:
- return Accessibility.Protected;
- case FieldAttributes.FamORAssem:
- return Accessibility.ProtectedOrInternal;
- default:
- return Accessibility.Private;
- }
- }
- #endregion
-
- #region Type Parameter Constraints
- void AddConstraints(DefaultUnresolvedTypeParameter tp, GenericParameter g)
- {
- switch (g.Attributes & GenericParameterAttributes.VarianceMask) {
- case GenericParameterAttributes.Contravariant:
- tp.Variance = VarianceModifier.Contravariant;
- break;
- case GenericParameterAttributes.Covariant:
- tp.Variance = VarianceModifier.Covariant;
- break;
- }
-
- tp.HasReferenceTypeConstraint = g.HasReferenceTypeConstraint;
- tp.HasValueTypeConstraint = g.HasNotNullableValueTypeConstraint;
- tp.HasDefaultConstructorConstraint = g.HasDefaultConstructorConstraint;
-
- if (g.HasConstraints) {
- foreach (TypeReference constraint in g.Constraints) {
- tp.Constraints.Add(ReadTypeReference(constraint));
- }
- }
- }
- #endregion
-
- #region Read Property
-
- [CLSCompliant(false)]
- public IUnresolvedProperty ReadProperty(PropertyDefinition property, IUnresolvedTypeDefinition parentType, EntityType propertyType = EntityType.Property)
- {
- if (property == null)
- throw new ArgumentNullException("property");
- if (parentType == null)
- throw new ArgumentNullException("parentType");
- DefaultUnresolvedProperty p = new DefaultUnresolvedProperty(parentType, property.Name);
- p.EntityType = propertyType;
- TranslateModifiers(property.GetMethod ?? property.SetMethod, p);
- p.ReturnType = ReadTypeReference(property.PropertyType, typeAttributes: property);
-
- p.Getter = ReadMethod(property.GetMethod, parentType, EntityType.Accessor, p);
- p.Setter = ReadMethod(property.SetMethod, parentType, EntityType.Accessor, p);
-
- if (property.HasParameters) {
- foreach (ParameterDefinition par in property.Parameters) {
- p.Parameters.Add(ReadParameter(par));
- }
- }
- AddAttributes(property, p);
-
- var accessor = p.Getter ?? p.Setter;
- if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
- p.Name = property.Name.Substring(property.Name.LastIndexOf('.') + 1);
- p.IsExplicitInterfaceImplementation = true;
- foreach (var mr in accessor.ExplicitInterfaceImplementations) {
- p.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
- }
- }
-
- FinishReadMember(p, property);
- return p;
- }
- #endregion
-
- #region Read Event
- [CLSCompliant(false)]
- public IUnresolvedEvent ReadEvent(EventDefinition ev, IUnresolvedTypeDefinition parentType)
- {
- if (ev == null)
- throw new ArgumentNullException("ev");
- if (parentType == null)
- throw new ArgumentNullException("parentType");
-
- DefaultUnresolvedEvent e = new DefaultUnresolvedEvent(parentType, ev.Name);
- TranslateModifiers(ev.AddMethod, e);
- e.ReturnType = ReadTypeReference(ev.EventType, typeAttributes: ev);
-
- e.AddAccessor = ReadMethod(ev.AddMethod, parentType, EntityType.Accessor, e);
- e.RemoveAccessor = ReadMethod(ev.RemoveMethod, parentType, EntityType.Accessor, e);
- e.InvokeAccessor = ReadMethod(ev.InvokeMethod, parentType, EntityType.Accessor, e);
-
- AddAttributes(ev, e);
-
- var accessor = e.AddAccessor ?? e.RemoveAccessor ?? e.InvokeAccessor;
- if (accessor != null && accessor.IsExplicitInterfaceImplementation) {
- e.Name = ev.Name.Substring(ev.Name.LastIndexOf('.') + 1);
- e.IsExplicitInterfaceImplementation = true;
- foreach (var mr in accessor.ExplicitInterfaceImplementations) {
- e.ExplicitInterfaceImplementations.Add(new AccessorOwnerMemberReference(mr));
- }
- }
-
- FinishReadMember(e, ev);
-
- return e;
- }
- #endregion
-
- #region FinishReadMember / Interning
- void FinishReadMember(AbstractUnresolvedMember member, MemberReference cecilDefinition)
- {
- member.ApplyInterningProvider(interningProvider);
- member.Freeze();
- RegisterCecilObject(member, cecilDefinition);
- }
- #endregion
-
- #region Type system translation table
- readonly Dictionary<object, object> typeSystemTranslationTable;
-
- void RegisterCecilObject(IUnresolvedEntity typeSystemObject, MemberReference cecilObject)
- {
- if (OnEntityLoaded != null)
- OnEntityLoaded(typeSystemObject, cecilObject);
-
- AddToTypeSystemTranslationTable(typeSystemObject, cecilObject);
- }
-
- void AddToTypeSystemTranslationTable(object typeSystemObject, object cecilObject)
- {
- if (typeSystemTranslationTable != null) {
- // When lazy-loading, the dictionary might be shared between multiple cecil-loaders that are used concurrently
- lock (typeSystemTranslationTable) {
- typeSystemTranslationTable[typeSystemObject] = cecilObject;
- }
- }
- }
-
- T InternalGetCecilObject<T> (object typeSystemObject) where T : class
- {
- if (typeSystemObject == null)
- throw new ArgumentNullException ("typeSystemObject");
- if (!HasCecilReferences)
- throw new NotSupportedException ("This instance contains no cecil references.");
- object result;
- lock (typeSystemTranslationTable) {
- if (!typeSystemTranslationTable.TryGetValue (typeSystemObject, out result))
- return null;
- }
- return result as T;
- }
-
- [CLSCompliant(false)]
- public AssemblyDefinition GetCecilObject (IUnresolvedAssembly content)
- {
- return InternalGetCecilObject<AssemblyDefinition> (content);
- }
-
- [CLSCompliant(false)]
- public TypeDefinition GetCecilObject (IUnresolvedTypeDefinition type)
- {
- if (type == null)
- throw new ArgumentNullException ("type");
- return InternalGetCecilObject<TypeDefinition> (type);
- }
-
- [CLSCompliant(false)]
- public MethodDefinition GetCecilObject (IUnresolvedMethod method)
- {
- return InternalGetCecilObject<MethodDefinition> (method);
- }
-
- [CLSCompliant(false)]
- public FieldDefinition GetCecilObject (IUnresolvedField field)
- {
- return InternalGetCecilObject<FieldDefinition> (field);
- }
-
- [CLSCompliant(false)]
- public EventDefinition GetCecilObject (IUnresolvedEvent evt)
- {
- return InternalGetCecilObject<EventDefinition> (evt);
- }
-
- [CLSCompliant(false)]
- public PropertyDefinition GetCecilObject (IUnresolvedProperty property)
- {
- return InternalGetCecilObject<PropertyDefinition> (property);
- }
- #endregion
- }
-}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/DomRegion.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/DomRegion.cs
index 7f48f4f..62c106c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/DomRegion.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/DomRegion.cs
@@ -156,7 +156,19 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
return IsInside(location.Line, location.Column);
}
-
+
+ public bool IntersectsWith (DomRegion region)
+ {
+ return region.Begin <= End && region.End >= Begin;
+ }
+
+ public bool OverlapsWith (DomRegion region)
+ {
+ var maxBegin = Begin > region.Begin ? Begin : region.Begin;
+ var minEnd = End < region.End ? End : region.End;
+ return maxBegin < minEnd;
+ }
+
public override string ToString()
{
return string.Format(
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/EntityType.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/EntityType.cs
index 513da15..b012420 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/EntityType.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/EntityType.cs
@@ -20,18 +20,44 @@ using System;
namespace ICSharpCode.NRefactory.TypeSystem
{
+ [Obsolete("Use SymbolKind instead")]
public enum EntityType : byte
{
- None,
- TypeDefinition,
- Field,
- Property,
- Indexer,
- Event,
- Method,
- Operator,
- Constructor,
- Destructor,
- Accessor
+ None = SymbolKind.None,
+ /// <seealso cref="ITypeDefinition"/>
+ TypeDefinition = SymbolKind.TypeDefinition,
+ /// <seealso cref="IField"/>
+ Field = SymbolKind.Field,
+ /// <summary>
+ /// The symbol is a property, but not an indexer.
+ /// </summary>
+ /// <seealso cref="IProperty"/>
+ Property = SymbolKind.Property,
+ /// <summary>
+ /// The symbol is an indexer, not a regular property.
+ /// </summary>
+ /// <seealso cref="IProperty"/>
+ Indexer = SymbolKind.Indexer,
+ /// <seealso cref="IEvent"/>
+ Event = SymbolKind.Event,
+ /// <summary>
+ /// The symbol is a method which is not an operator/constructor/destructor or accessor.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Method = SymbolKind.Method,
+ /// <summary>
+ /// The symbol is a user-defined operator.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Operator = SymbolKind.Operator,
+ /// <seealso cref="IMethod"/>
+ Constructor = SymbolKind.Constructor,
+ /// <seealso cref="IMethod"/>
+ Destructor = SymbolKind.Destructor,
+ /// <summary>
+ /// The accessor method for a property getter/setter or event add/remove.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Accessor = SymbolKind.Accessor,
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IAmbience.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IAmbience.cs
index 779d4c7..1aa9d29 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IAmbience.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IAmbience.cs
@@ -89,6 +89,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
string ConvertEntity(IEntity entity);
string ConvertType(IType type);
string ConvertVariable(IVariable variable);
+ string ConvertConstantValue(object constantValue);
string WrapComment(string comment);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IEntity.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IEntity.cs
index 6877254..1c6da27 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IEntity.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IEntity.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Gets the entity type.
/// </summary>
- EntityType EntityType { get; }
+ SymbolKind SymbolKind { get; }
/// <summary>
/// Gets the complete entity region (including header+body)
@@ -93,14 +93,20 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Represents a resolved entity.
/// </summary>
- public interface IEntity : ICompilationProvider, INamedElement, IHasAccessibility
+ public interface IEntity : ISymbol, ICompilationProvider, INamedElement, IHasAccessibility
{
/// <summary>
/// Gets the entity type.
/// </summary>
+ [Obsolete("Use the SymbolKind property instead.")]
EntityType EntityType { get; }
/// <summary>
+ /// Gets the short name of the entity.
+ /// </summary>
+ new string Name { get; }
+
+ /// <summary>
/// Gets the complete entity region (including header+body)
/// </summary>
DomRegion Region { get; }
@@ -160,6 +166,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Gets whether this member is declared to be shadowing another member with the same name.
+ /// (C# 'new' keyword)
/// </summary>
bool IsShadowing { get; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IField.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IField.cs
index 922554f..79d619f 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IField.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IField.cs
@@ -40,7 +40,14 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Gets whether this field is a constant (C#-like const).
/// </summary>
bool IsConst { get; }
-
+
+ /// <summary>
+ /// Gets whether this field is a fixed size buffer (C#-like fixed).
+ /// If this is true, then ConstantValue contains the size of the buffer.
+ /// </summary>
+ bool IsFixed { get; }
+
+
IConstantValue ConstantValue { get; }
/// <summary>
@@ -80,5 +87,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Gets whether this field is volatile.
/// </summary>
bool IsVolatile { get; }
+
+ /// <summary>
+ /// Gets whether this field is a fixed size buffer (C#-like fixed).
+ /// If this is true, then ConstantValue contains the size of the buffer.
+ /// </summary>
+ bool IsFixed { get; }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/INamespace.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/INamespace.cs
index c272749..213f2f8 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/INamespace.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/INamespace.cs
@@ -24,7 +24,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Represents a resolved namespace.
/// </summary>
- public interface INamespace : ICompilationProvider
+ public interface INamespace : ISymbol, ICompilationProvider
{
// No pointer back to unresolved namespace:
// multiple unresolved namespaces (from different assemblies) get
@@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Gets the short name of this namespace (e.g. "Collections").
/// </summary>
- string Name { get; }
+ new string Name { get; }
/// <summary>
/// Gets the parent namespace.
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IParameter.cs
index 87ae98f..74f23c6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IParameter.cs
@@ -94,5 +94,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// The default value is given by the <see cref="IVariable.ConstantValue"/> property.
/// </summary>
bool IsOptional { get; }
+
+ /// <summary>
+ /// Gets the owner of this parameter.
+ /// May return null; for example when parameters belong to lambdas or anonymous methods.
+ /// </summary>
+ IParameterizedMember Owner { get; }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ISymbol.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ISymbol.cs
new file mode 100644
index 0000000..24286b3
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ISymbol.cs
@@ -0,0 +1,90 @@
+// Copyright (c) 2010-2013 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;
+
+namespace ICSharpCode.NRefactory.TypeSystem
+{
+ public enum SymbolKind : byte
+ {
+ None,
+ /// <seealso cref="ITypeDefinition"/>
+ TypeDefinition,
+ /// <seealso cref="IField"/>
+ Field,
+ /// <summary>
+ /// The symbol is a property, but not an indexer.
+ /// </summary>
+ /// <seealso cref="IProperty"/>
+ Property,
+ /// <summary>
+ /// The symbol is an indexer, not a regular property.
+ /// </summary>
+ /// <seealso cref="IProperty"/>
+ Indexer,
+ /// <seealso cref="IEvent"/>
+ Event,
+ /// <summary>
+ /// The symbol is a method which is not an operator/constructor/destructor or accessor.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Method,
+ /// <summary>
+ /// The symbol is a user-defined operator.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Operator,
+ /// <seealso cref="IMethod"/>
+ Constructor,
+ /// <seealso cref="IMethod"/>
+ Destructor,
+ /// <summary>
+ /// The accessor method for a property getter/setter or event add/remove.
+ /// </summary>
+ /// <seealso cref="IMethod"/>
+ Accessor,
+ /// <seealso cref="INamespace"/>
+ Namespace,
+ /// <summary>
+ /// The symbol is a variable, but not a parameter.
+ /// </summary>
+ /// <seealso cref="IVariable"/>
+ Variable,
+ /// <seealso cref="IParameter"/>
+ Parameter,
+ /// <seealso cref="ITypeParameter"/>
+ TypeParameter,
+ }
+
+ /// <summary>
+ /// Interface for type system symbols.
+ /// </summary>
+ public interface ISymbol
+ {
+ /// <summary>
+ /// This property returns an enum specifying which kind of symbol this is
+ /// (which derived interfaces of ISymbol are implemented)
+ /// </summary>
+ SymbolKind SymbolKind { get; }
+
+ /// <summary>
+ /// Gets the short name of the symbol.
+ /// </summary>
+ string Name { get; }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs
index 350ae19..e74af05 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs
@@ -31,8 +31,8 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Get the type of this type parameter's owner.
/// </summary>
- /// <returns>EntityType.TypeDefinition or EntityType.Method</returns>
- EntityType OwnerType { get; }
+ /// <returns>SymbolKind.TypeDefinition or SymbolKind.Method</returns>
+ SymbolKind OwnerType { get; }
/// <summary>
/// Gets the index of the type parameter in the type parameter list of the owning method/class.
@@ -60,13 +60,13 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Type parameter of a generic class/method.
/// </summary>
- public interface ITypeParameter : IType
+ public interface ITypeParameter : IType, ISymbol
{
/// <summary>
/// Get the type of this type parameter's owner.
/// </summary>
- /// <returns>EntityType.TypeDefinition or EntityType.Method</returns>
- EntityType OwnerType { get; }
+ /// <returns>SymbolKind.TypeDefinition or SymbolKind.Method</returns>
+ SymbolKind OwnerType { get; }
/// <summary>
/// Gets the owning method/class.
@@ -85,6 +85,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
int Index { get; }
/// <summary>
+ /// Gets the name of the type parameter.
+ /// </summary>
+ new string Name { get; }
+
+ /// <summary>
/// Gets the list of attributes declared on this type parameter.
/// </summary>
IList<IAttribute> Attributes { get; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IVariable.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IVariable.cs
index 33838d6..253fe99 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IVariable.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/IVariable.cs
@@ -23,12 +23,12 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <summary>
/// Represents a variable (name/type pair).
/// </summary>
- public interface IVariable
+ public interface IVariable : ISymbol
{
/// <summary>
/// Gets the name of the variable.
/// </summary>
- string Name { get; }
+ new string Name { get; }
/// <summary>
/// Gets the declaration region of the variable.
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedEntity.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedEntity.cs
index 99cd346..de50cb2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedEntity.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedEntity.cs
@@ -41,8 +41,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
this.Attributes = unresolved.Attributes.CreateResolvedAttributes(parentContext);
}
+ public SymbolKind SymbolKind {
+ get { return unresolved.SymbolKind; }
+ }
+
+ [Obsolete("Use the SymbolKind property instead.")]
public EntityType EntityType {
- get { return unresolved.EntityType; }
+ get { return (EntityType)unresolved.SymbolKind; }
}
public DomRegion Region {
@@ -111,7 +116,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public override string ToString()
{
- return "[" + this.EntityType.ToString() + " " + this.ReflectionName + "]";
+ return "[" + this.SymbolKind.ToString() + " " + this.ReflectionName + "]";
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
index c394449..1058f1d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
@@ -84,7 +84,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
.Where(m => m.DeclaringTypeDefinition != null && m.DeclaringTypeDefinition.Kind == TypeKind.Interface)
.ToArray();
- result = result.Where(item => !DeclaringTypeDefinition.Members.Any(m => m.IsExplicitInterfaceImplementation && m.ImplementedInterfaceMembers.Contains(item))).ToArray();
+ IEnumerable<IMember> otherMembers = DeclaringTypeDefinition.Members;
+ if (SymbolKind == SymbolKind.Accessor)
+ otherMembers = DeclaringTypeDefinition.GetAccessors(options: GetMemberOptions.IgnoreInheritedMembers);
+ result = result.Where(item => !otherMembers.Any(m => m.IsExplicitInterfaceImplementation && m.ImplementedInterfaceMembers.Contains(item))).ToArray();
return result;
}
@@ -130,7 +133,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
if (IsExplicitInterfaceImplementation && ImplementedInterfaceMembers.Count == 1) {
return new ExplicitInterfaceImplementationMemberReference(declTypeRef, ImplementedInterfaceMembers[0].ToMemberReference());
} else {
- return new DefaultMemberReference(this.EntityType, declTypeRef, this.Name);
+ return new DefaultMemberReference(this.SymbolKind, declTypeRef, this.Name);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
index 29c957f..3bd392c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
@@ -27,7 +27,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public abstract class AbstractTypeParameter : ITypeParameter, ICompilationProvider
{
readonly ICompilation compilation;
- readonly EntityType ownerType;
+ readonly SymbolKind ownerType;
readonly IEntity owner;
readonly int index;
readonly string name;
@@ -41,28 +41,32 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
throw new ArgumentNullException("owner");
this.owner = owner;
this.compilation = owner.Compilation;
- this.ownerType = owner.EntityType;
+ this.ownerType = owner.SymbolKind;
this.index = index;
- this.name = name ?? ((this.OwnerType == EntityType.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
+ this.name = name ?? ((this.OwnerType == SymbolKind.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
this.attributes = attributes ?? EmptyList<IAttribute>.Instance;
this.region = region;
this.variance = variance;
}
- protected AbstractTypeParameter(ICompilation compilation, EntityType ownerType, int index, string name, VarianceModifier variance, IList<IAttribute> attributes, DomRegion region)
+ protected AbstractTypeParameter(ICompilation compilation, SymbolKind ownerType, int index, string name, VarianceModifier variance, IList<IAttribute> attributes, DomRegion region)
{
if (compilation == null)
throw new ArgumentNullException("compilation");
this.compilation = compilation;
this.ownerType = ownerType;
this.index = index;
- this.name = name ?? ((this.OwnerType == EntityType.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
+ this.name = name ?? ((this.OwnerType == SymbolKind.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
this.attributes = attributes ?? EmptyList<IAttribute>.Instance;
this.region = region;
this.variance = variance;
}
- public EntityType OwnerType {
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.TypeParameter; }
+ }
+
+ public SymbolKind OwnerType {
get { return ownerType; }
}
@@ -232,7 +236,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public string ReflectionName {
get {
- return (this.OwnerType == EntityType.Method ? "``" : "`") + index.ToString(CultureInfo.InvariantCulture);
+ return (this.OwnerType == SymbolKind.Method ? "``" : "`") + index.ToString(CultureInfo.InvariantCulture);
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs
index 692e2a6..f528292 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedEntity.cs
@@ -39,7 +39,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
internal RareFields rareFields;
// 1 byte per enum + 2 bytes for flags
- EntityType entityType;
+ SymbolKind symbolKind;
Accessibility accessibility;
internal BitVector16 flags;
@@ -61,6 +61,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
// flags for DefaultField:
internal const ushort FlagFieldIsReadOnly = 0x1000;
internal const ushort FlagFieldIsVolatile = 0x2000;
+ internal const ushort FlagFieldIsFixedSize = 0x4000;
// flags for DefaultMethod:
internal const ushort FlagExtensionMethod = 0x1000;
internal const ushort FlagPartialMethod = 0x2000;
@@ -146,11 +147,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
FreezableHelper.ThrowIfFrozen(this);
}
- public EntityType EntityType {
- get { return entityType; }
+ public SymbolKind SymbolKind {
+ get { return symbolKind; }
set {
ThrowIfFrozen();
- entityType = value;
+ symbolKind = value;
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedMember.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedMember.cs
index 46a89a4..9b10941 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedMember.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractUnresolvedMember.cs
@@ -149,7 +149,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
ITypeReference interfaceTypeReference = null;
if (this.IsExplicitInterfaceImplementation && this.ExplicitInterfaceImplementations.Count == 1)
interfaceTypeReference = this.ExplicitInterfaceImplementations[0].DeclaringTypeReference;
- return Resolve(ExtendContextForType(context, this.DeclaringTypeDefinition), this.EntityType, this.Name, interfaceTypeReference);
+ return Resolve(ExtendContextForType(context, this.DeclaringTypeDefinition), this.SymbolKind, this.Name, interfaceTypeReference);
}
protected static ITypeResolveContext ExtendContextForType(ITypeResolveContext assemblyContext, IUnresolvedTypeDefinition typeDef)
@@ -166,7 +166,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public static IMember Resolve(ITypeResolveContext context,
- EntityType entityType,
+ SymbolKind symbolKind,
string name,
ITypeReference explicitInterfaceTypeReference = null,
IList<string> typeParameterNames = null,
@@ -184,7 +184,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
foreach (IMember member in context.CurrentTypeDefinition.Members) {
if (member.IsExplicitInterfaceImplementation)
continue;
- if (IsNonGenericMatch(member, entityType, name, parameterTypes))
+ if (IsNonGenericMatch(member, symbolKind, name, parameterTypes))
return member;
}
} else {
@@ -194,7 +194,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
continue;
if (member.ImplementedInterfaceMembers.Count != 1)
continue;
- if (IsNonGenericMatch(member, entityType, name, parameterTypes)) {
+ if (IsNonGenericMatch(member, symbolKind, name, parameterTypes)) {
if (explicitInterfaceType.Equals(member.ImplementedInterfaceMembers[0].DeclaringType))
return member;
}
@@ -204,7 +204,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
// generic member
// In this case, we must specify the correct context for resolving the parameter types
foreach (IMethod method in context.CurrentTypeDefinition.Methods) {
- if (method.EntityType != entityType)
+ if (method.SymbolKind != symbolKind)
continue;
if (method.Name != name)
continue;
@@ -232,9 +232,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
return null;
}
- static bool IsNonGenericMatch(IMember member, EntityType entityType, string name, IList<IType> parameterTypes)
+ static bool IsNonGenericMatch(IMember member, SymbolKind symbolKind, string name, IList<IType> parameterTypes)
{
- if (member.EntityType != entityType)
+ if (member.SymbolKind != symbolKind)
return false;
if (member.Name != name)
return false;
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/BlobReader.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/BlobReader.cs
new file mode 100644
index 0000000..7c00241
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/BlobReader.cs
@@ -0,0 +1,387 @@
+//
+// BlobReader.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// Copyright (c) 2010-2013 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 ICSharpCode.NRefactory.Semantics;
+
+namespace ICSharpCode.NRefactory.TypeSystem.Implementation
+{
+ sealed class BlobReader
+ {
+ internal static int GetBlobHashCode(byte[] blob)
+ {
+ unchecked {
+ int hash = 0;
+ foreach (byte b in blob) {
+ hash *= 257;
+ hash += b;
+ }
+ return hash;
+ }
+ }
+
+ internal static bool BlobEquals(byte[] a, byte[] b)
+ {
+ if (a.Length != b.Length)
+ return false;
+ for (int i = 0; i < a.Length; i++) {
+ if (a[i] != b[i])
+ return false;
+ }
+ return true;
+ }
+
+ byte[] buffer;
+ int position;
+ readonly IAssembly currentResolvedAssembly;
+
+ public BlobReader(byte[] buffer, IAssembly currentResolvedAssembly)
+ {
+ if (buffer == null)
+ throw new ArgumentNullException("buffer");
+ this.buffer = buffer;
+ this.currentResolvedAssembly = currentResolvedAssembly;
+ }
+
+ public byte ReadByte()
+ {
+ return buffer[position++];
+ }
+
+ public sbyte ReadSByte()
+ {
+ unchecked {
+ return(sbyte) ReadByte();
+ }
+ }
+
+ public byte[] ReadBytes(int length)
+ {
+ var bytes = new byte[length];
+ Buffer.BlockCopy(buffer, position, bytes, 0, length);
+ position += length;
+ return bytes;
+ }
+
+ public ushort ReadUInt16()
+ {
+ unchecked {
+ ushort value =(ushort)(buffer[position]
+ |(buffer[position + 1] << 8));
+ position += 2;
+ return value;
+ }
+ }
+
+ public short ReadInt16()
+ {
+ unchecked {
+ return(short) ReadUInt16();
+ }
+ }
+
+ public uint ReadUInt32()
+ {
+ unchecked {
+ uint value =(uint)(buffer[position]
+ |(buffer[position + 1] << 8)
+ |(buffer[position + 2] << 16)
+ |(buffer[position + 3] << 24));
+ position += 4;
+ return value;
+ }
+ }
+
+ public int ReadInt32()
+ {
+ unchecked {
+ return(int) ReadUInt32();
+ }
+ }
+
+ public ulong ReadUInt64()
+ {
+ unchecked {
+ uint low = ReadUInt32();
+ uint high = ReadUInt32();
+
+ return(((ulong) high) << 32) | low;
+ }
+ }
+
+ public long ReadInt64()
+ {
+ unchecked {
+ return(long) ReadUInt64();
+ }
+ }
+
+ public uint ReadCompressedUInt32()
+ {
+ unchecked {
+ byte first = ReadByte();
+ if((first & 0x80) == 0)
+ return first;
+
+ if((first & 0x40) == 0)
+ return((uint)(first & ~0x80) << 8)
+ | ReadByte();
+
+ return((uint)(first & ~0xc0) << 24)
+ |(uint) ReadByte() << 16
+ |(uint) ReadByte() << 8
+ | ReadByte();
+ }
+ }
+
+ public float ReadSingle()
+ {
+ unchecked {
+ if(!BitConverter.IsLittleEndian) {
+ var bytes = ReadBytes(4);
+ Array.Reverse(bytes);
+ return BitConverter.ToSingle(bytes, 0);
+ }
+
+ float value = BitConverter.ToSingle(buffer, position);
+ position += 4;
+ return value;
+ }
+ }
+
+ public double ReadDouble()
+ {
+ unchecked {
+ if(!BitConverter.IsLittleEndian) {
+ var bytes = ReadBytes(8);
+ Array.Reverse(bytes);
+ return BitConverter.ToDouble(bytes, 0);
+ }
+
+ double value = BitConverter.ToDouble(buffer, position);
+ position += 8;
+ return value;
+ }
+ }
+
+ public ResolveResult ReadFixedArg(IType argType)
+ {
+ if (argType.Kind == TypeKind.Array) {
+ if (((ArrayType)argType).Dimensions != 1) {
+ // Only single-dimensional arrays are supported
+ return ErrorResolveResult.UnknownError;
+ }
+ IType elementType = ((ArrayType)argType).ElementType;
+ uint numElem = ReadUInt32();
+ if (numElem == 0xffffffff) {
+ // null reference
+ return new ConstantResolveResult(argType, null);
+ } else {
+ ResolveResult[] elements = new ResolveResult[numElem];
+ for (int i = 0; i < elements.Length; i++) {
+ elements[i] = ReadElem(elementType);
+ // Stop decoding when encountering an error:
+ if (elements[i].IsError)
+ return ErrorResolveResult.UnknownError;
+ }
+ IType int32 = currentResolvedAssembly.Compilation.FindType(KnownTypeCode.Int32);
+ ResolveResult[] sizeArgs = { new ConstantResolveResult(int32, elements.Length) };
+ return new ArrayCreateResolveResult(argType, sizeArgs, elements);
+ }
+ } else {
+ return ReadElem(argType);
+ }
+ }
+
+ public ResolveResult ReadElem(IType elementType)
+ {
+ ITypeDefinition underlyingType;
+ if (elementType.Kind == TypeKind.Enum) {
+ underlyingType = elementType.GetDefinition().EnumUnderlyingType.GetDefinition();
+ } else {
+ underlyingType = elementType.GetDefinition();
+ }
+ if (underlyingType == null)
+ return ErrorResolveResult.UnknownError;
+ KnownTypeCode typeCode = underlyingType.KnownTypeCode;
+ if (typeCode == KnownTypeCode.Object) {
+ // boxed value type
+ IType boxedTyped = ReadCustomAttributeFieldOrPropType();
+ ResolveResult elem = ReadElem(boxedTyped);
+ if (elem.IsCompileTimeConstant && elem.ConstantValue == null)
+ return new ConstantResolveResult(elementType, null);
+ else
+ return new ConversionResolveResult(elementType, elem, Conversion.BoxingConversion);
+ } else if (typeCode == KnownTypeCode.Type) {
+ return new TypeOfResolveResult(underlyingType, ReadType());
+ } else {
+ return new ConstantResolveResult(elementType, ReadElemValue(typeCode));
+ }
+ }
+
+ object ReadElemValue(KnownTypeCode typeCode)
+ {
+ switch (typeCode) {
+ case KnownTypeCode.Boolean:
+ return ReadByte() != 0;
+ case KnownTypeCode.Char:
+ return (char)ReadUInt16();
+ case KnownTypeCode.SByte:
+ return ReadSByte();
+ case KnownTypeCode.Byte:
+ return ReadByte();
+ case KnownTypeCode.Int16:
+ return ReadInt16();
+ case KnownTypeCode.UInt16:
+ return ReadUInt16();
+ case KnownTypeCode.Int32:
+ return ReadInt32();
+ case KnownTypeCode.UInt32:
+ return ReadUInt32();
+ case KnownTypeCode.Int64:
+ return ReadInt64();
+ case KnownTypeCode.UInt64:
+ return ReadUInt64();
+ case KnownTypeCode.Single:
+ return ReadSingle();
+ case KnownTypeCode.Double:
+ return ReadDouble();
+ case KnownTypeCode.String:
+ return ReadSerString();
+ default:
+ throw new NotSupportedException();
+ }
+ }
+
+ public string ReadSerString ()
+ {
+ if (buffer [position] == 0xff) {
+ position++;
+ return null;
+ }
+
+ int length = (int) ReadCompressedUInt32();
+ if (length == 0)
+ return string.Empty;
+
+ string @string = System.Text.Encoding.UTF8.GetString(
+ buffer, position,
+ buffer [position + length - 1] == 0 ? length - 1 : length);
+
+ position += length;
+ return @string;
+ }
+
+ public KeyValuePair<IMember, ResolveResult> ReadNamedArg(IType attributeType)
+ {
+ SymbolKind memberType;
+ var b = ReadByte();
+ switch (b) {
+ case 0x53:
+ memberType = SymbolKind.Field;
+ break;
+ case 0x54:
+ memberType = SymbolKind.Property;
+ break;
+ default:
+ throw new NotSupportedException(string.Format("Custom member type 0x{0:x} is not supported.", b));
+ }
+ IType type = ReadCustomAttributeFieldOrPropType();
+ string name = ReadSerString();
+ ResolveResult val = ReadFixedArg(type);
+ IMember member = null;
+ // Use last matching member, as GetMembers() returns members from base types first.
+ foreach (IMember m in attributeType.GetMembers(m => m.SymbolKind == memberType && m.Name == name)) {
+ if (m.ReturnType.Equals(type))
+ member = m;
+ }
+ return new KeyValuePair<IMember, ResolveResult>(member, val);
+ }
+
+ IType ReadCustomAttributeFieldOrPropType()
+ {
+ ICompilation compilation = currentResolvedAssembly.Compilation;
+ var b = ReadByte();
+ switch (b) {
+ case 0x02:
+ return compilation.FindType(KnownTypeCode.Boolean);
+ case 0x03:
+ return compilation.FindType(KnownTypeCode.Char);
+ case 0x04:
+ return compilation.FindType(KnownTypeCode.SByte);
+ case 0x05:
+ return compilation.FindType(KnownTypeCode.Byte);
+ case 0x06:
+ return compilation.FindType(KnownTypeCode.Int16);
+ case 0x07:
+ return compilation.FindType(KnownTypeCode.UInt16);
+ case 0x08:
+ return compilation.FindType(KnownTypeCode.Int32);
+ case 0x09:
+ return compilation.FindType(KnownTypeCode.UInt32);
+ case 0x0a:
+ return compilation.FindType(KnownTypeCode.Int64);
+ case 0x0b:
+ return compilation.FindType(KnownTypeCode.UInt64);
+ case 0x0c:
+ return compilation.FindType(KnownTypeCode.Single);
+ case 0x0d:
+ return compilation.FindType(KnownTypeCode.Double);
+ case 0x0e:
+ return compilation.FindType(KnownTypeCode.String);
+ case 0x1d:
+ return new ArrayType(compilation, ReadCustomAttributeFieldOrPropType());
+ case 0x50:
+ return compilation.FindType(KnownTypeCode.Type);
+ case 0x51: // boxed value type
+ return compilation.FindType(KnownTypeCode.Object);
+ case 0x55: // enum
+ return ReadType();
+ default:
+ throw new NotSupportedException(string.Format("Custom attribute type 0x{0:x} is not supported.", b));
+ }
+ }
+
+ IType ReadType()
+ {
+ string typeName = ReadSerString();
+ ITypeReference typeReference = ReflectionHelper.ParseReflectionName(typeName);
+ IType typeInCurrentAssembly = typeReference.Resolve(new SimpleTypeResolveContext(currentResolvedAssembly));
+ if (typeInCurrentAssembly.Kind != TypeKind.Unknown)
+ return typeInCurrentAssembly;
+
+ // look for the type in mscorlib
+ ITypeDefinition systemObject = currentResolvedAssembly.Compilation.FindType(KnownTypeCode.Object).GetDefinition();
+ if (systemObject != null) {
+ return typeReference.Resolve(new SimpleTypeResolveContext(systemObject.ParentAssembly));
+ } else {
+ // couldn't find corlib - return the unknown IType for the current assembly
+ return typeInCurrentAssembly;
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultMemberReference.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultMemberReference.cs
index 0c43015..6be899b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultMemberReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultMemberReference.cs
@@ -33,21 +33,21 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
[Serializable]
public sealed class DefaultMemberReference : IMemberReference, ISupportsInterning
{
- readonly EntityType entityType;
+ readonly SymbolKind symbolKind;
readonly ITypeReference typeReference;
readonly string name;
readonly int typeParameterCount;
readonly IList<ITypeReference> parameterTypes;
- public DefaultMemberReference(EntityType entityType, ITypeReference typeReference, string name, int typeParameterCount = 0, IList<ITypeReference> parameterTypes = null)
+ public DefaultMemberReference(SymbolKind symbolKind, ITypeReference typeReference, string name, int typeParameterCount = 0, IList<ITypeReference> parameterTypes = null)
{
if (typeReference == null)
throw new ArgumentNullException("typeReference");
if (name == null)
throw new ArgumentNullException("name");
- if (typeParameterCount != 0 && entityType != EntityType.Method)
+ if (typeParameterCount != 0 && symbolKind != SymbolKind.Method)
throw new ArgumentException("Type parameter count > 0 is only supported for methods.");
- this.entityType = entityType;
+ this.symbolKind = symbolKind;
this.typeReference = typeReference;
this.name = name;
this.typeParameterCount = typeParameterCount;
@@ -62,18 +62,18 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
{
IType type = typeReference.Resolve(context);
IEnumerable<IMember> members;
- if (entityType == EntityType.Accessor) {
+ if (symbolKind == SymbolKind.Accessor) {
members = type.GetAccessors(
m => m.Name == name && !m.IsExplicitInterfaceImplementation,
GetMemberOptions.IgnoreInheritedMembers);
- } else if (entityType == EntityType.Method) {
+ } else if (symbolKind == SymbolKind.Method) {
members = type.GetMethods(
- m => m.Name == name && m.EntityType == EntityType.Method
+ m => m.Name == name && m.SymbolKind == SymbolKind.Method
&& m.TypeParameters.Count == typeParameterCount && !m.IsExplicitInterfaceImplementation,
GetMemberOptions.IgnoreInheritedMembers);
} else {
members = type.GetMembers(
- m => m.Name == name && m.EntityType == entityType && !m.IsExplicitInterfaceImplementation,
+ m => m.Name == name && m.SymbolKind == symbolKind && !m.IsExplicitInterfaceImplementation,
GetMemberOptions.IgnoreInheritedMembers);
}
var resolvedParameterTypes = parameterTypes.Resolve(context);
@@ -101,13 +101,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
int ISupportsInterning.GetHashCodeForInterning()
{
- return (int)entityType ^ typeReference.GetHashCode() ^ name.GetHashCode() ^ parameterTypes.GetHashCode();
+ return (int)symbolKind ^ typeReference.GetHashCode() ^ name.GetHashCode() ^ parameterTypes.GetHashCode();
}
bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
{
DefaultMemberReference o = other as DefaultMemberReference;
- return o != null && entityType == o.entityType && typeReference == o.typeReference && name == o.name && parameterTypes == o.parameterTypes;
+ return o != null && symbolKind == o.symbolKind && typeReference == o.typeReference && name == o.name && parameterTypes == o.parameterTypes;
}
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs
index 2abe29b..77dac0b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs
@@ -33,6 +33,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
readonly IList<IAttribute> attributes;
readonly bool isRef, isOut, isParams, isOptional;
readonly object defaultValue;
+ readonly IParameterizedMember owner;
public DefaultParameter(IType type, string name)
{
@@ -44,7 +45,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
this.name = name;
}
- public DefaultParameter(IType type, string name, DomRegion region = default(DomRegion), IList<IAttribute> attributes = null,
+ public DefaultParameter(IType type, string name, IParameterizedMember owner = null, DomRegion region = default(DomRegion), IList<IAttribute> attributes = null,
bool isRef = false, bool isOut = false, bool isParams = false, bool isOptional = false, object defaultValue = null)
{
if (type == null)
@@ -53,6 +54,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
throw new ArgumentNullException("name");
this.type = type;
this.name = name;
+ this.owner = owner;
this.region = region;
this.attributes = attributes;
this.isRef = isRef;
@@ -62,6 +64,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
this.defaultValue = defaultValue;
}
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.Parameter; }
+ }
+
+ public IParameterizedMember Owner {
+ get { return owner; }
+ }
+
public IList<IAttribute> Attributes {
get { return attributes; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedField.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedField.cs
index f0979fc..0e482c3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedField.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedField.cs
@@ -47,7 +47,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public bool IsConst {
get { return ((IUnresolvedField)unresolved).IsConst; }
}
-
+
+ public bool IsFixed {
+ get { return ((IUnresolvedField)unresolved).IsFixed; }
+ }
+
public object ConstantValue {
get {
ResolveResult rr = this.constantValue;
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs
index b90a946..43a47c5 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs
@@ -241,7 +241,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
return new ExplicitInterfaceImplementationMemberReference(declTypeRef, ImplementedInterfaceMembers[0].ToMemberReference());
} else {
return new DefaultMemberReference(
- this.EntityType, declTypeRef, this.Name, this.TypeParameters.Count,
+ this.SymbolKind, declTypeRef, this.Name, this.TypeParameters.Count,
this.Parameters.Select(p => p.Type.ToTypeReference()).ToList());
}
}
@@ -259,7 +259,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public override string ToString()
{
StringBuilder b = new StringBuilder("[");
- b.Append(this.EntityType);
+ b.Append(this.SymbolKind);
b.Append(' ');
if (this.DeclaringType.Kind != TypeKind.Unknown) {
b.Append(this.DeclaringType.ReflectionName);
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedProperty.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedProperty.cs
index 6685fe9..dfeb734 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedProperty.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedProperty.cs
@@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
return new ExplicitInterfaceImplementationMemberReference(declTypeRef, ImplementedInterfaceMembers[0].ToMemberReference());
} else {
return new DefaultMemberReference(
- this.EntityType, declTypeRef, this.Name, 0,
+ this.SymbolKind, declTypeRef, this.Name, 0,
this.Parameters.Select(p => p.Type.ToTypeReference()).ToList());
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
index c60238d..275e979 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
@@ -110,8 +110,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return parts; }
}
+ public SymbolKind SymbolKind {
+ get { return parts[0].SymbolKind; }
+ }
+
+ [Obsolete("Use the SymbolKind property instead.")]
public EntityType EntityType {
- get { return parts[0].EntityType; }
+ get { return (EntityType)parts[0].SymbolKind; }
}
public virtual TypeKind Kind {
@@ -325,7 +330,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
if (addDefaultConstructorIfRequired) {
TypeKind kind = this.Kind;
- if (kind == TypeKind.Class && !this.IsStatic && !unresolvedMembers.Any(m => m.EntityType == EntityType.Constructor && !m.IsStatic)
+ if (kind == TypeKind.Class && !this.IsStatic && !unresolvedMembers.Any(m => m.SymbolKind == SymbolKind.Constructor && !m.IsStatic)
|| kind == TypeKind.Enum || kind == TypeKind.Struct)
{
contextPerMember.Add(parts[0].CreateResolveContext(parentContext).WithCurrentTypeDefinition(this));
@@ -344,7 +349,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get {
var members = GetMemberList();
for (int i = 0; i < members.unresolvedMembers.Length; i++) {
- if (members.unresolvedMembers[i].EntityType == EntityType.Field)
+ if (members.unresolvedMembers[i].SymbolKind == SymbolKind.Field)
yield return (IField)members[i];
}
}
@@ -367,9 +372,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get {
var members = GetMemberList();
for (int i = 0; i < members.unresolvedMembers.Length; i++) {
- switch (members.unresolvedMembers[i].EntityType) {
- case EntityType.Property:
- case EntityType.Indexer:
+ switch (members.unresolvedMembers[i].SymbolKind) {
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
yield return (IProperty)members[i];
break;
}
@@ -381,7 +386,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get {
var members = GetMemberList();
for (int i = 0; i < members.unresolvedMembers.Length; i++) {
- if (members.unresolvedMembers[i].EntityType == EntityType.Event)
+ if (members.unresolvedMembers[i].SymbolKind == SymbolKind.Event)
yield return (IEvent)members[i];
}
}
@@ -395,9 +400,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
KnownTypeCode result = this.knownTypeCode;
if (result == (KnownTypeCode)(-1)) {
result = KnownTypeCode.None;
+ ICompilation compilation = this.Compilation;
for (int i = 0; i < KnownTypeReference.KnownTypeCodeCount; i++) {
- KnownTypeReference r = KnownTypeReference.Get((KnownTypeCode)i);
- if (r != null && r.Resolve(parentContext) == this) {
+ if (compilation.FindType((KnownTypeCode)i) == this) {
result = (KnownTypeCode)i;
break;
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeParameter.cs
index 771668d..ea0968c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeParameter.cs
@@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public DefaultTypeParameter(
- ICompilation compilation, EntityType ownerType,
+ ICompilation compilation, SymbolKind ownerType,
int index, string name = null,
VarianceModifier variance = VarianceModifier.Invariant,
IList<IAttribute> attributes = null,
@@ -112,7 +112,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
base.FreezeInternal();
}
- public DefaultTypeParameter(EntityType ownerType, int index, string name)
+ public DefaultTypeParameter(SymbolKind ownerType, int index, string name)
: base(ownerType, index, name)
{
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAssembly.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAssembly.cs
index 1aa07cb..3bcb74c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAssembly.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAssembly.cs
@@ -403,7 +403,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return ns.FullName; }
}
- string INamespace.Name {
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.Namespace; }
+ }
+
+ public string Name {
get { return ns.Name; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAttribute.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAttribute.cs
index bf1c9d9..ac30211 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAttribute.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedAttribute.cs
@@ -101,7 +101,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public void AddNamedFieldArgument(string fieldName, IConstantValue value)
{
this.NamedArguments.Add(new KeyValuePair<IMemberReference, IConstantValue>(
- new DefaultMemberReference(EntityType.Field, attributeType, fieldName),
+ new DefaultMemberReference(SymbolKind.Field, attributeType, fieldName),
value
));
}
@@ -109,7 +109,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public void AddNamedPropertyArgument(string propertyName, IConstantValue value)
{
this.NamedArguments.Add(new KeyValuePair<IMemberReference, IConstantValue>(
- new DefaultMemberReference(EntityType.Property, attributeType, propertyName),
+ new DefaultMemberReference(SymbolKind.Property, attributeType, propertyName),
value
));
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedEvent.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedEvent.cs
index fe4c06d..f9abd1a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedEvent.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedEvent.cs
@@ -38,12 +38,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public DefaultUnresolvedEvent()
{
- this.EntityType = EntityType.Event;
+ this.SymbolKind = SymbolKind.Event;
}
public DefaultUnresolvedEvent(IUnresolvedTypeDefinition declaringType, string name)
{
- this.EntityType = EntityType.Event;
+ this.SymbolKind = SymbolKind.Event;
this.DeclaringTypeDefinition = declaringType;
this.Name = name;
if (declaringType != null)
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedField.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedField.cs
index 8c4ab50..6b578e6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedField.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedField.cs
@@ -36,12 +36,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public DefaultUnresolvedField()
{
- this.EntityType = EntityType.Field;
+ this.SymbolKind = SymbolKind.Field;
}
public DefaultUnresolvedField(IUnresolvedTypeDefinition declaringType, string name)
{
- this.EntityType = EntityType.Field;
+ this.SymbolKind = SymbolKind.Field;
this.DeclaringTypeDefinition = declaringType;
this.Name = name;
if (declaringType != null)
@@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public bool IsConst {
- get { return constantValue != null; }
+ get { return constantValue != null && !IsFixed; }
}
public bool IsReadOnly {
@@ -67,6 +67,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
flags[FlagFieldIsVolatile] = value;
}
}
+
+ public bool IsFixed {
+ get { return flags[FlagFieldIsFixedSize]; }
+ set {
+ ThrowIfFrozen();
+ flags[FlagFieldIsFixedSize] = value;
+ }
+ }
public IConstantValue ConstantValue {
get { return constantValue; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs
index 9cf06ac..3e8c61c 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedMethod.cs
@@ -66,12 +66,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public DefaultUnresolvedMethod()
{
- this.EntityType = EntityType.Method;
+ this.SymbolKind = SymbolKind.Method;
}
public DefaultUnresolvedMethod(IUnresolvedTypeDefinition declaringType, string name)
{
- this.EntityType = EntityType.Method;
+ this.SymbolKind = SymbolKind.Method;
this.DeclaringTypeDefinition = declaringType;
this.Name = name;
if (declaringType != null)
@@ -103,15 +103,15 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public bool IsConstructor {
- get { return this.EntityType == EntityType.Constructor; }
+ get { return this.SymbolKind == SymbolKind.Constructor; }
}
public bool IsDestructor {
- get { return this.EntityType == EntityType.Destructor; }
+ get { return this.SymbolKind == SymbolKind.Destructor; }
}
public bool IsOperator {
- get { return this.EntityType == EntityType.Operator; }
+ get { return this.SymbolKind == SymbolKind.Operator; }
}
public bool IsPartial {
@@ -183,7 +183,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public override string ToString()
{
StringBuilder b = new StringBuilder("[");
- b.Append(EntityType.ToString());
+ b.Append(SymbolKind.ToString());
b.Append(' ');
if (DeclaringTypeDefinition != null) {
b.Append(DeclaringTypeDefinition.Name);
@@ -232,7 +232,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
if (this.IsExplicitInterfaceImplementation && this.ExplicitInterfaceImplementations.Count == 1)
interfaceTypeReference = this.ExplicitInterfaceImplementations[0].DeclaringTypeReference;
return Resolve(ExtendContextForType(context, this.DeclaringTypeDefinition),
- this.EntityType, this.Name, interfaceTypeReference,
+ this.SymbolKind, this.Name, interfaceTypeReference,
this.TypeParameters.Select(tp => tp.Name).ToList(),
this.Parameters.Select(p => p.Type).ToList());
}
@@ -249,7 +249,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
DomRegion region = typeDefinition.Region;
region = new DomRegion(region.FileName, region.BeginLine, region.BeginColumn); // remove endline/endcolumn
return new DefaultUnresolvedMethod(typeDefinition, ".ctor") {
- EntityType = EntityType.Constructor,
+ SymbolKind = SymbolKind.Constructor,
Accessibility = typeDefinition.IsAbstract ? Accessibility.Protected : Accessibility.Public,
IsSynthetic = true,
HasBody = true,
@@ -274,7 +274,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
static IUnresolvedMethod CreateDummyConstructor()
{
var m = new DefaultUnresolvedMethod {
- EntityType = EntityType.Constructor,
+ SymbolKind = SymbolKind.Constructor,
Name = ".ctor",
Accessibility = Accessibility.Public,
IsSynthetic = true,
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedParameter.cs
index 7706e8c..b5aa5a7 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedParameter.cs
@@ -210,10 +210,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
IsParams = this.IsParams
};
} else {
+ var owner = context.CurrentMember as IParameterizedMember;
var resolvedAttributes = attributes.CreateResolvedAttributes (context);
bool isOptional = resolvedAttributes != null && resolvedAttributes.Any (a => IsOptionalAttribute (a.AttributeType));
- return new DefaultParameter (type.Resolve (context), name, region,
- resolvedAttributes, IsRef, IsOut, IsParams, isOptional);
+ return new DefaultParameter (type.Resolve (context), name, owner, region,
+ resolvedAttributes, IsRef, IsOut, IsParams, isOptional);
}
}
@@ -228,6 +229,8 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
this.context = context;
}
+ SymbolKind ISymbol.SymbolKind { get { return SymbolKind.Parameter; } }
+ public IParameterizedMember Owner { get { return context.CurrentMember as IParameterizedMember; } }
public IType Type { get; internal set; }
public string Name { get; internal set; }
public DomRegion Region { get; internal set; }
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedProperty.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedProperty.cs
index d9b1fee..d8113f3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedProperty.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedProperty.cs
@@ -55,12 +55,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public DefaultUnresolvedProperty()
{
- this.EntityType = EntityType.Property;
+ this.SymbolKind = SymbolKind.Property;
}
public DefaultUnresolvedProperty(IUnresolvedTypeDefinition declaringType, string name)
{
- this.EntityType = EntityType.Property;
+ this.SymbolKind = SymbolKind.Property;
this.DeclaringTypeDefinition = declaringType;
this.Name = name;
if (declaringType != null)
@@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
public bool IsIndexer {
- get { return this.EntityType == EntityType.Indexer; }
+ get { return this.SymbolKind == SymbolKind.Indexer; }
}
public IList<IUnresolvedParameter> Parameters {
@@ -114,7 +114,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
if (this.IsExplicitInterfaceImplementation && this.ExplicitInterfaceImplementations.Count == 1)
interfaceTypeReference = this.ExplicitInterfaceImplementations[0].DeclaringTypeReference;
return Resolve(ExtendContextForType(context, this.DeclaringTypeDefinition),
- this.EntityType, this.Name, interfaceTypeReference,
+ this.SymbolKind, this.Name, interfaceTypeReference,
parameterTypeReferences: this.Parameters.Select(p => p.Type).ToList());
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs
index 6fddd1e..0e841d4 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeDefinition.cs
@@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public DefaultUnresolvedTypeDefinition()
{
- this.EntityType = EntityType.TypeDefinition;
+ this.SymbolKind = SymbolKind.TypeDefinition;
}
public DefaultUnresolvedTypeDefinition(string fullName)
@@ -54,21 +54,21 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
name = fullName;
}
- this.EntityType = EntityType.TypeDefinition;
+ this.SymbolKind = SymbolKind.TypeDefinition;
this.namespaceName = namespaceName;
this.Name = name;
}
public DefaultUnresolvedTypeDefinition(string namespaceName, string name)
{
- this.EntityType = EntityType.TypeDefinition;
+ this.SymbolKind = SymbolKind.TypeDefinition;
this.namespaceName = namespaceName;
this.Name = name;
}
public DefaultUnresolvedTypeDefinition(IUnresolvedTypeDefinition declaringTypeDefinition, string name)
{
- this.EntityType = EntityType.TypeDefinition;
+ this.SymbolKind = SymbolKind.TypeDefinition;
this.DeclaringTypeDefinition = declaringTypeDefinition;
this.namespaceName = declaringTypeDefinition.Namespace;
this.Name = name;
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs
index 4a79df3..31df074 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultUnresolvedTypeParameter.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
string name;
DomRegion region;
- EntityType ownerType;
+ SymbolKind ownerType;
VarianceModifier variance;
BitVector16 flags;
const ushort FlagFrozen = 0x0001;
@@ -57,14 +57,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
attributes = FreezableHelper.FreezeListAndElements(attributes);
}
- public DefaultUnresolvedTypeParameter(EntityType ownerType, int index, string name = null)
+ public DefaultUnresolvedTypeParameter(SymbolKind ownerType, int index, string name = null)
{
this.ownerType = ownerType;
this.index = index;
- this.name = name ?? ((ownerType == EntityType.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
+ this.name = name ?? ((ownerType == SymbolKind.Method ? "!!" : "!") + index.ToString(CultureInfo.InvariantCulture));
}
- public EntityType OwnerType {
+ public SymbolKind OwnerType {
get { return ownerType; }
}
@@ -94,7 +94,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
string INamedElement.ReflectionName {
get {
- if (ownerType == EntityType.Method)
+ if (ownerType == SymbolKind.Method)
return "``" + index.ToString(CultureInfo.InvariantCulture);
else
return "`" + index.ToString(CultureInfo.InvariantCulture);
@@ -176,9 +176,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public virtual ITypeParameter CreateResolvedTypeParameter(ITypeResolveContext context)
{
IEntity owner = null;
- if (this.OwnerType == EntityType.Method) {
+ if (this.OwnerType == SymbolKind.Method) {
owner = context.CurrentMember as IMethod;
- } else if (this.OwnerType == EntityType.TypeDefinition) {
+ } else if (this.OwnerType == SymbolKind.TypeDefinition) {
owner = context.CurrentTypeDefinition;
}
if (owner == null)
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultVariable.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultVariable.cs
new file mode 100644
index 0000000..38d0eea
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultVariable.cs
@@ -0,0 +1,77 @@
+// Copyright (c) 2010-2013 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;
+
+namespace ICSharpCode.NRefactory.TypeSystem.Implementation
+{
+ /// <summary>
+ /// Default implementation of <see cref="IVariable"/>.
+ /// </summary>
+ public sealed class DefaultVariable : IVariable
+ {
+ readonly string name;
+ readonly DomRegion region;
+ readonly IType type;
+ readonly object constantValue;
+ readonly bool isConst;
+
+ public DefaultVariable(IType type, string name)
+ {
+ if (type == null)
+ throw new ArgumentNullException("type");
+ if (name == null)
+ throw new ArgumentNullException("name");
+ this.type = type;
+ this.name = name;
+ }
+
+ public DefaultVariable(IType type, string name, DomRegion region = default(DomRegion),
+ bool isConst = false, object constantValue = null)
+ : this(type, name)
+ {
+ this.region = region;
+ this.isConst = isConst;
+ this.constantValue = constantValue;
+ }
+
+ public string Name {
+ get { return name; }
+ }
+
+ public DomRegion Region {
+ get { return region; }
+ }
+
+ public IType Type {
+ get { return type; }
+ }
+
+ public bool IsConst {
+ get { return isConst; }
+ }
+
+ public object ConstantValue {
+ get { return constantValue; }
+ }
+
+ public SymbolKind SymbolKind {
+ get { return SymbolKind.Variable; }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DummyTypeParameter.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DummyTypeParameter.cs
index ecd6cb3..bf1a0c6 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DummyTypeParameter.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/DummyTypeParameter.cs
@@ -24,20 +24,20 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
{
public sealed class DummyTypeParameter : AbstractType, ITypeParameter
{
- static ITypeParameter[] methodTypeParameters = { new DummyTypeParameter(EntityType.Method, 0) };
- static ITypeParameter[] classTypeParameters = { new DummyTypeParameter(EntityType.TypeDefinition, 0) };
+ static ITypeParameter[] methodTypeParameters = { new DummyTypeParameter(SymbolKind.Method, 0) };
+ static ITypeParameter[] classTypeParameters = { new DummyTypeParameter(SymbolKind.TypeDefinition, 0) };
public static ITypeParameter GetMethodTypeParameter(int index)
{
- return GetTypeParameter(ref methodTypeParameters, EntityType.Method, index);
+ return GetTypeParameter(ref methodTypeParameters, SymbolKind.Method, index);
}
public static ITypeParameter GetClassTypeParameter(int index)
{
- return GetTypeParameter(ref classTypeParameters, EntityType.TypeDefinition, index);
+ return GetTypeParameter(ref classTypeParameters, SymbolKind.TypeDefinition, index);
}
- static ITypeParameter GetTypeParameter(ref ITypeParameter[] typeParameters, EntityType entityType, int index)
+ static ITypeParameter GetTypeParameter(ref ITypeParameter[] typeParameters, SymbolKind symbolKind, int index)
{
ITypeParameter[] tps = typeParameters;
while (index >= tps.Length) {
@@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
ITypeParameter[] newTps = new ITypeParameter[index + 1];
tps.CopyTo(newTps, 0);
for (int i = tps.Length; i < newTps.Length; i++) {
- newTps[i] = new DummyTypeParameter(entityType, i);
+ newTps[i] = new DummyTypeParameter(symbolKind, i);
}
ITypeParameter[] oldTps = Interlocked.CompareExchange(ref typeParameters, newTps, tps);
if (oldTps == tps) {
@@ -65,7 +65,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
{
public override IType VisitTypeParameter(ITypeParameter type)
{
- if (type.OwnerType == EntityType.Method) {
+ if (type.OwnerType == SymbolKind.Method) {
return DummyTypeParameter.GetMethodTypeParameter(type.Index);
} else {
return base.VisitTypeParameter(type);
@@ -76,7 +76,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
{
public override IType VisitTypeParameter(ITypeParameter type)
{
- if (type.OwnerType == EntityType.TypeDefinition) {
+ if (type.OwnerType == SymbolKind.TypeDefinition) {
return DummyTypeParameter.GetClassTypeParameter(type.Index);
} else {
return base.VisitTypeParameter(type);
@@ -117,24 +117,28 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
return type.AcceptVisitor(normalizeClassTypeParameters).AcceptVisitor(normalizeMethodTypeParameters);
}
- readonly EntityType ownerType;
+ readonly SymbolKind ownerType;
readonly int index;
- private DummyTypeParameter(EntityType ownerType, int index)
+ private DummyTypeParameter(SymbolKind ownerType, int index)
{
this.ownerType = ownerType;
this.index = index;
}
+ SymbolKind ISymbol.SymbolKind {
+ get { return SymbolKind.TypeParameter; }
+ }
+
public override string Name {
get {
- return (ownerType == EntityType.Method ? "!!" : "!") + index;
+ return (ownerType == SymbolKind.Method ? "!!" : "!") + index;
}
}
public override string ReflectionName {
get {
- return (ownerType == EntityType.Method ? "``" : "`") + index;
+ return (ownerType == SymbolKind.Method ? "``" : "`") + index;
}
}
@@ -169,7 +173,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return EmptyList<IAttribute>.Instance; }
}
- EntityType ITypeParameter.OwnerType {
+ SymbolKind ITypeParameter.OwnerType {
get { return ownerType; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ExplicitInterfaceImplementationMemberReference.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ExplicitInterfaceImplementationMemberReference.cs
index 307fa83..6297db3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ExplicitInterfaceImplementationMemberReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ExplicitInterfaceImplementationMemberReference.cs
@@ -60,13 +60,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
if (interfaceMember == null)
return null;
IEnumerable<IMember> members;
- if (interfaceMember.EntityType == EntityType.Accessor) {
+ if (interfaceMember.SymbolKind == SymbolKind.Accessor) {
members = declaringType.GetAccessors(
m => m.IsExplicitInterfaceImplementation,
GetMemberOptions.IgnoreInheritedMembers);
} else {
members = declaringType.GetMembers(
- m => m.EntityType == interfaceMember.EntityType && m.IsExplicitInterfaceImplementation,
+ m => m.SymbolKind == interfaceMember.SymbolKind && m.IsExplicitInterfaceImplementation,
GetMemberOptions.IgnoreInheritedMembers);
}
return members.FirstOrDefault(m => m.ImplementedInterfaceMembers.Count == 1 && interfaceMember.Equals(m.ImplementedInterfaceMembers[0]));
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MergedNamespace.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MergedNamespace.cs
index cbdb7f2..97afebf 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MergedNamespace.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MergedNamespace.cs
@@ -91,6 +91,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
}
+ public SymbolKind SymbolKind {
+ get { return SymbolKind.Namespace; }
+ }
+
public ICompilation Compilation {
get { return compilation; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MinimalCorlib.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MinimalCorlib.cs
index ee2070c..a28302b 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MinimalCorlib.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/MinimalCorlib.cs
@@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
if (typeRef != null) {
types[i] = new DefaultUnresolvedTypeDefinition(typeRef.Namespace, typeRef.Name);
for (int j = 0; j < typeRef.TypeParameterCount; j++) {
- types[i].TypeParameters.Add(new DefaultUnresolvedTypeParameter(EntityType.TypeDefinition, j));
+ types[i].TypeParameters.Add(new DefaultUnresolvedTypeParameter(SymbolKind.TypeDefinition, j));
}
AddTypeDefinition(types[i]);
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs
new file mode 100644
index 0000000..cc40a52
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/ResolvedAttributeBlob.cs
@@ -0,0 +1,164 @@
+//
+// ResolvedAttributeBlob.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// Copyright (c) 2010-2013 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.Diagnostics;
+using System.Threading;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Utils;
+
+namespace ICSharpCode.NRefactory.TypeSystem.Implementation
+{
+ sealed class CecilResolvedAttribute : IAttribute
+ {
+ readonly ITypeResolveContext context;
+ readonly byte[] blob;
+ readonly IList<ITypeReference> ctorParameterTypes;
+ readonly IType attributeType;
+
+ IMethod constructor;
+ volatile bool constructorResolved;
+
+ IList<ResolveResult> positionalArguments;
+ IList<KeyValuePair<IMember, ResolveResult>> namedArguments;
+
+ public CecilResolvedAttribute(ITypeResolveContext context, UnresolvedAttributeBlob unresolved)
+ {
+ this.context = context;
+ this.blob = unresolved.blob;
+ this.ctorParameterTypes = unresolved.ctorParameterTypes;
+ this.attributeType = unresolved.attributeType.Resolve(context);
+ }
+
+ public CecilResolvedAttribute(ITypeResolveContext context, IType attributeType)
+ {
+ this.context = context;
+ this.attributeType = attributeType;
+ this.ctorParameterTypes = EmptyList<ITypeReference>.Instance;
+ }
+
+ DomRegion IAttribute.Region {
+ get { return DomRegion.Empty; }
+ }
+
+ public IType AttributeType {
+ get { return attributeType; }
+ }
+
+ public IMethod Constructor {
+ get {
+ if (!constructorResolved) {
+ constructor = ResolveConstructor();
+ constructorResolved = true;
+ }
+ return constructor;
+ }
+ }
+
+ IMethod ResolveConstructor()
+ {
+ var parameterTypes = ctorParameterTypes.Resolve(context);
+ foreach (var ctor in attributeType.GetConstructors(m => m.Parameters.Count == parameterTypes.Count)) {
+ bool ok = true;
+ for (int i = 0; i < parameterTypes.Count; i++) {
+ if (!ctor.Parameters[i].Type.Equals(parameterTypes[i])) {
+ ok = false;
+ break;
+ }
+ }
+ if (ok)
+ return ctor;
+ }
+ return null;
+ }
+
+ public IList<ResolveResult> PositionalArguments {
+ get {
+ var result = LazyInit.VolatileRead(ref this.positionalArguments);
+ if (result != null) {
+ return result;
+ }
+ DecodeBlob();
+ return positionalArguments;
+ }
+ }
+
+ public IList<KeyValuePair<IMember, ResolveResult>> NamedArguments {
+ get {
+ var result = LazyInit.VolatileRead(ref this.namedArguments);
+ if (result != null) {
+ return result;
+ }
+ DecodeBlob();
+ return namedArguments;
+ }
+ }
+
+ public override string ToString()
+ {
+ return "[" + attributeType.ToString() + "(...)]";
+ }
+
+ void DecodeBlob()
+ {
+ var positionalArguments = new List<ResolveResult>();
+ var namedArguments = new List<KeyValuePair<IMember, ResolveResult>>();
+ DecodeBlob(positionalArguments, namedArguments);
+ Interlocked.CompareExchange(ref this.positionalArguments, positionalArguments, null);
+ Interlocked.CompareExchange(ref this.namedArguments, namedArguments, null);
+ }
+
+ void DecodeBlob(List<ResolveResult> positionalArguments, List<KeyValuePair<IMember, ResolveResult>> namedArguments)
+ {
+ if (blob == null)
+ return;
+ BlobReader reader = new BlobReader(blob, context.CurrentAssembly);
+ if (reader.ReadUInt16() != 0x0001) {
+ Debug.WriteLine("Unknown blob prolog");
+ return;
+ }
+ foreach (var ctorParameter in ctorParameterTypes.Resolve(context)) {
+ ResolveResult arg = reader.ReadFixedArg(ctorParameter);
+ positionalArguments.Add(arg);
+ if (arg.IsError) {
+ // After a decoding error, we must stop decoding the blob because
+ // we might have read too few bytes due to the error.
+ // Just fill up the remaining arguments with ErrorResolveResult:
+ while (positionalArguments.Count < ctorParameterTypes.Count)
+ positionalArguments.Add(ErrorResolveResult.UnknownError);
+ return;
+ }
+ }
+ ushort numNamed = reader.ReadUInt16();
+ for (int i = 0; i < numNamed; i++) {
+ var namedArg = reader.ReadNamedArg(attributeType);
+ if (namedArg.Key != null)
+ namedArguments.Add(namedArg);
+ }
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleCompilation.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleCompilation.cs
index 291bb20..a4da92d 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleCompilation.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleCompilation.cs
@@ -66,7 +66,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
assemblies.Add(this.mainAssembly);
List<IAssembly> referencedAssemblies = new List<IAssembly>();
foreach (var asmRef in assemblyReferences) {
- IAssembly asm = asmRef.Resolve(context);
+ IAssembly asm;
+ try {
+ asm = asmRef.Resolve(context);
+ } catch (InvalidOperationException) {
+ throw new InvalidOperationException("Tried to initialize compilation with an invalid assembly reference. (Forgot to load the assembly reference ? - see CecilLoader)");
+ }
if (asm != null && !assemblies.Contains(asm))
assemblies.Add(asm);
if (asm != null && !referencedAssemblies.Contains(asm))
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedField.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedField.cs
index eefc707..66f8a0a 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedField.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedField.cs
@@ -49,7 +49,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public bool IsConst {
get { return fieldDefinition.IsConst; }
}
-
+
+ public bool IsFixed {
+ get { return fieldDefinition.IsFixed; }
+ }
+
public object ConstantValue {
get { return fieldDefinition.ConstantValue; }
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
index 243b846..982cebe 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
@@ -173,6 +173,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return baseMember.IsOverridable; }
}
+ public SymbolKind SymbolKind {
+ get { return baseMember.SymbolKind; }
+ }
+
+ [Obsolete("Use the SymbolKind property instead.")]
public EntityType EntityType {
get { return baseMember.EntityType; }
}
@@ -361,12 +366,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
} else {
var parameters = new IParameter[paramDefs.Count];
for (int i = 0; i < parameters.Length; i++) {
- IType newType = paramDefs[i].Type.AcceptVisitor(substitution);
- if (newType != paramDefs[i].Type) {
- parameters[i] = new SpecializedParameter(paramDefs[i], newType);
- } else {
- parameters[i] = paramDefs[i];
- }
+ var p = paramDefs[i];
+ IType newType = p.Type.AcceptVisitor(substitution);
+ parameters[i] = new DefaultParameter(
+ newType, p.Name, this,
+ p.Region, p.Attributes, p.IsRef, p.IsOut,
+ p.IsParams, p.IsOptional, p.ConstantValue
+ );
}
return Array.AsReadOnly(parameters);
}
@@ -390,65 +396,5 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
b.Append(']');
return b.ToString();
}
-
- sealed class SpecializedParameter : IParameter
- {
- readonly IParameter originalParameter;
- readonly IType newType;
-
- public SpecializedParameter(IParameter originalParameter, IType newType)
- {
- if (originalParameter is SpecializedParameter)
- this.originalParameter = ((SpecializedParameter)originalParameter).originalParameter;
- else
- this.originalParameter = originalParameter;
- this.newType = newType;
- }
-
- public IList<IAttribute> Attributes {
- get { return originalParameter.Attributes; }
- }
-
- public bool IsRef {
- get { return originalParameter.IsRef; }
- }
-
- public bool IsOut {
- get { return originalParameter.IsOut; }
- }
-
- public bool IsParams {
- get { return originalParameter.IsParams; }
- }
-
- public bool IsOptional {
- get { return originalParameter.IsOptional; }
- }
-
- public string Name {
- get { return originalParameter.Name; }
- }
-
- public DomRegion Region {
- get { return originalParameter.Region; }
- }
-
- public IType Type {
- get { return newType; }
- }
-
- public bool IsConst {
- get { return originalParameter.IsConst; }
- }
-
- public object ConstantValue {
- get { return originalParameter.ConstantValue; }
- }
-
- public override string ToString()
- {
- return DefaultParameter.ToString(this);
- }
- }
}
}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/TypeParameterReference.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/TypeParameterReference.cs
index 4345cdc..8fdd096 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/TypeParameterReference.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/TypeParameterReference.cs
@@ -32,10 +32,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
/// Creates a type parameter reference.
/// For common type parameter references, this method may return a shared instance.
/// </summary>
- public static TypeParameterReference Create(EntityType ownerType, int index)
+ public static TypeParameterReference Create(SymbolKind ownerType, int index)
{
- if (index >= 0 && index < 8 && (ownerType == EntityType.TypeDefinition || ownerType == EntityType.Method)) {
- TypeParameterReference[] arr = (ownerType == EntityType.TypeDefinition) ? classTypeParameterReferences : methodTypeParameterReferences;
+ if (index >= 0 && index < 8 && (ownerType == SymbolKind.TypeDefinition || ownerType == SymbolKind.Method)) {
+ TypeParameterReference[] arr = (ownerType == SymbolKind.TypeDefinition) ? classTypeParameterReferences : methodTypeParameterReferences;
TypeParameterReference result = LazyInit.VolatileRead(ref arr[index]);
if (result == null) {
result = LazyInit.GetOrSet(ref arr[index], new TypeParameterReference(ownerType, index));
@@ -46,10 +46,16 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
}
- readonly EntityType ownerType;
+ readonly SymbolKind ownerType;
readonly int index;
-
- public TypeParameterReference(EntityType ownerType, int index)
+
+ public int Index {
+ get {
+ return index;
+ }
+ }
+
+ public TypeParameterReference(SymbolKind ownerType, int index)
{
this.ownerType = ownerType;
this.index = index;
@@ -57,13 +63,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public IType Resolve(ITypeResolveContext context)
{
- if (ownerType == EntityType.Method) {
+ if (ownerType == SymbolKind.Method) {
IMethod method = context.CurrentMember as IMethod;
if (method != null && index < method.TypeParameters.Count) {
return method.TypeParameters[index];
}
return DummyTypeParameter.GetMethodTypeParameter(index);
- } else if (ownerType == EntityType.TypeDefinition) {
+ } else if (ownerType == SymbolKind.TypeDefinition) {
ITypeDefinition typeDef = context.CurrentTypeDefinition;
if (typeDef != null && index < typeDef.TypeParameters.Count) {
return typeDef.TypeParameters[index];
@@ -76,7 +82,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public override string ToString()
{
- if (ownerType == EntityType.Method)
+ if (ownerType == SymbolKind.Method)
return "!!" + index.ToString(CultureInfo.InvariantCulture);
else
return "!" + index.ToString(CultureInfo.InvariantCulture);
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedAttributeBlob.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedAttributeBlob.cs
new file mode 100644
index 0000000..a66e979
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedAttributeBlob.cs
@@ -0,0 +1,78 @@
+//
+// UnresolvedAttributeBlob.cs
+//
+// Author:
+// Daniel Grunwald <daniel at danielgrunwald.de>
+//
+// Copyright (c) 2010-2013 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;
+
+namespace ICSharpCode.NRefactory.TypeSystem.Implementation
+{
+ /// <summary>
+ /// <c>IUnresolvedAttribute</c> implementation that loads the arguments from a binary blob.
+ /// </summary>
+ [Serializable]
+ public sealed class UnresolvedAttributeBlob : IUnresolvedAttribute, ISupportsInterning
+ {
+ internal readonly ITypeReference attributeType;
+ internal readonly IList<ITypeReference> ctorParameterTypes;
+ internal readonly byte[] blob;
+
+ public UnresolvedAttributeBlob(ITypeReference attributeType, IList<ITypeReference> ctorParameterTypes, byte[] blob)
+ {
+ if (attributeType == null)
+ throw new ArgumentNullException("attributeType");
+ if (ctorParameterTypes == null)
+ throw new ArgumentNullException("ctorParameterTypes");
+ if (blob == null)
+ throw new ArgumentNullException("blob");
+ this.attributeType = attributeType;
+ this.ctorParameterTypes = ctorParameterTypes;
+ this.blob = blob;
+ }
+
+ DomRegion IUnresolvedAttribute.Region {
+ get { return DomRegion.Empty; }
+ }
+
+ public IAttribute CreateResolvedAttribute(ITypeResolveContext context)
+ {
+ if (context.CurrentAssembly == null)
+ throw new InvalidOperationException("Cannot resolve CecilUnresolvedAttribute without a parent assembly");
+ return new CecilResolvedAttribute(context, this);
+ }
+
+ int ISupportsInterning.GetHashCodeForInterning()
+ {
+ return attributeType.GetHashCode() ^ ctorParameterTypes.GetHashCode() ^ BlobReader.GetBlobHashCode(blob);
+ }
+
+ bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
+ {
+ UnresolvedAttributeBlob o = other as UnresolvedAttributeBlob;
+ return o != null && attributeType == o.attributeType && ctorParameterTypes == o.ctorParameterTypes
+ && BlobReader.BlobEquals(blob, o.blob);
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs
new file mode 100644
index 0000000..0b4bc2c
--- /dev/null
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/Implementation/UnresolvedSecurityDeclarationBlob.cs
@@ -0,0 +1,152 @@
+// Copyright (c) 2010-2013 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.Diagnostics;
+using ICSharpCode.NRefactory.Semantics;
+
+namespace ICSharpCode.NRefactory.TypeSystem.Implementation
+{
+ [Serializable]
+ public sealed class UnresolvedSecurityDeclarationBlob
+ {
+ static readonly ITypeReference securityActionTypeReference = typeof(System.Security.Permissions.SecurityAction).ToTypeReference();
+ static readonly ITypeReference permissionSetAttributeTypeReference = typeof(System.Security.Permissions.PermissionSetAttribute).ToTypeReference();
+
+ readonly IConstantValue securityAction;
+ readonly byte[] blob;
+ readonly IList<IUnresolvedAttribute> unresolvedAttributes = new List<IUnresolvedAttribute>();
+
+ public UnresolvedSecurityDeclarationBlob(int securityAction, byte[] blob)
+ {
+ BlobReader reader = new BlobReader(blob, null);
+ this.securityAction = new SimpleConstantValue(securityActionTypeReference, securityAction);
+ this.blob = blob;
+ if (reader.ReadByte() == '.') {
+ // binary attribute
+ uint attributeCount = reader.ReadCompressedUInt32();
+ for (uint i = 0; i < attributeCount; i++) {
+ unresolvedAttributes.Add(new UnresolvedSecurityAttribute(this, (int)i));
+ }
+ } else {
+ // for backward compatibility with .NET 1.0: XML-encoded attribute
+ var attr = new DefaultUnresolvedAttribute(permissionSetAttributeTypeReference);
+ attr.ConstructorParameterTypes.Add(securityActionTypeReference);
+ attr.PositionalArguments.Add(this.securityAction);
+ string xml = System.Text.Encoding.Unicode.GetString(blob);
+ attr.AddNamedPropertyArgument("XML", new SimpleConstantValue(KnownTypeReference.String, xml));
+ unresolvedAttributes.Add(attr);
+ }
+ }
+
+ public IList<IUnresolvedAttribute> UnresolvedAttributes {
+ get { return unresolvedAttributes; }
+ }
+
+ public IList<IAttribute> Resolve(IAssembly currentAssembly)
+ {
+ // TODO: make this a per-assembly cache
+// CacheManager cache = currentAssembly.Compilation.CacheManager;
+// IList<IAttribute> result = (IList<IAttribute>)cache.GetShared(this);
+// if (result != null)
+// return result;
+
+ ITypeResolveContext context = new SimpleTypeResolveContext(currentAssembly);
+ BlobReader reader = new BlobReader(blob, currentAssembly);
+ if (reader.ReadByte() != '.') {
+ // should not use UnresolvedSecurityDeclaration for XML secdecls
+ throw new InvalidOperationException();
+ }
+ ResolveResult securityActionRR = securityAction.Resolve(context);
+ uint attributeCount = reader.ReadCompressedUInt32();
+ IAttribute[] attributes = new IAttribute[attributeCount];
+ try {
+ ReadSecurityBlob(reader, attributes, context, securityActionRR);
+ } catch (NotSupportedException ex) {
+ // ignore invalid blobs
+ Debug.WriteLine(ex.ToString());
+ }
+ for (int i = 0; i < attributes.Length; i++) {
+ if (attributes[i] == null)
+ attributes[i] = new CecilResolvedAttribute(context, SpecialType.UnknownType);
+ }
+ return attributes;
+// return (IList<IAttribute>)cache.GetOrAddShared(this, attributes);
+ }
+
+ void ReadSecurityBlob(BlobReader reader, IAttribute[] attributes, ITypeResolveContext context, ResolveResult securityActionRR)
+ {
+ for (int i = 0; i < attributes.Length; i++) {
+ string attributeTypeName = reader.ReadSerString();
+ ITypeReference attributeTypeRef = ReflectionHelper.ParseReflectionName(attributeTypeName);
+ IType attributeType = attributeTypeRef.Resolve(context);
+
+ reader.ReadCompressedUInt32(); // ??
+ // The specification seems to be incorrect here, so I'm using the logic from Cecil instead.
+ uint numNamed = reader.ReadCompressedUInt32();
+
+ var namedArgs = new List<KeyValuePair<IMember, ResolveResult>>((int)numNamed);
+ for (uint j = 0; j < numNamed; j++) {
+ var namedArg = reader.ReadNamedArg(attributeType);
+ if (namedArg.Key != null)
+ namedArgs.Add(namedArg);
+
+ }
+ attributes[i] = new DefaultAttribute(
+ attributeType,
+ positionalArguments: new ResolveResult[] { securityActionRR },
+ namedArguments: namedArgs);
+ }
+ }
+ }
+
+ [Serializable]
+ sealed class UnresolvedSecurityAttribute : IUnresolvedAttribute, ISupportsInterning
+ {
+ readonly UnresolvedSecurityDeclarationBlob secDecl;
+ readonly int index;
+
+ public UnresolvedSecurityAttribute(UnresolvedSecurityDeclarationBlob secDecl, int index)
+ {
+ Debug.Assert(secDecl != null);
+ this.secDecl = secDecl;
+ this.index = index;
+ }
+
+ DomRegion IUnresolvedAttribute.Region {
+ get { return DomRegion.Empty; }
+ }
+
+ IAttribute IUnresolvedAttribute.CreateResolvedAttribute(ITypeResolveContext context)
+ {
+ return secDecl.Resolve(context.CurrentAssembly)[index];
+ }
+
+ int ISupportsInterning.GetHashCodeForInterning()
+ {
+ return index ^ secDecl.GetHashCode();
+ }
+
+ bool ISupportsInterning.EqualsForInterning(ISupportsInterning other)
+ {
+ UnresolvedSecurityAttribute attr = other as UnresolvedSecurityAttribute;
+ return attr != null && index == attr.index && secDecl == attr.secDecl;
+ }
+ }
+}
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/InheritanceHelper.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/InheritanceHelper.cs
index fea5afd..37f5129 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/InheritanceHelper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/InheritanceHelper.cs
@@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
continue;
IEnumerable<IMember> baseMembers;
- if (member.EntityType == EntityType.Accessor) {
+ if (member.SymbolKind == SymbolKind.Accessor) {
baseMembers = baseType.GetAccessors(m => m.Name == member.Name && !m.IsExplicitInterfaceImplementation, GetMemberOptions.IgnoreInheritedMembers);
} else {
baseMembers = baseType.GetMembers(m => m.Name == member.Name && !m.IsExplicitInterfaceImplementation, GetMemberOptions.IgnoreInheritedMembers);
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ParameterListComparer.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ParameterListComparer.cs
index 8346e57..a4f14f3 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ParameterListComparer.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ParameterListComparer.cs
@@ -111,7 +111,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
{
if (x == y)
return true;
- if (x == null || y == null || x.EntityType != y.EntityType || !nameComparer.Equals(x.Name, y.Name))
+ if (x == null || y == null || x.SymbolKind != y.SymbolKind || !nameComparer.Equals(x.Name, y.Name))
return false;
IParameterizedMember px = x as IParameterizedMember;
IParameterizedMember py = y as IParameterizedMember;
@@ -129,7 +129,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
public int GetHashCode(IMember obj)
{
unchecked {
- int hash = (int)obj.EntityType * 33 + nameComparer.GetHashCode(obj.Name);
+ int hash = (int)obj.SymbolKind * 33 + nameComparer.GetHashCode(obj.Name);
IParameterizedMember pm = obj as IParameterizedMember;
if (pm != null) {
hash *= 27;
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs
index 575ade6..3352650 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs
@@ -95,9 +95,9 @@ namespace ICSharpCode.NRefactory.TypeSystem
return new ByReferenceTypeReference(ToTypeReference(type.GetElementType()));
} else if (type.IsGenericParameter) {
if (type.DeclaringMethod != null) {
- return TypeParameterReference.Create(EntityType.Method, type.GenericParameterPosition);
+ return TypeParameterReference.Create(SymbolKind.Method, type.GenericParameterPosition);
} else {
- return TypeParameterReference.Create(EntityType.TypeDefinition, type.GenericParameterPosition);
+ return TypeParameterReference.Create(SymbolKind.TypeDefinition, type.GenericParameterPosition);
}
} else if (type.DeclaringType != null) {
if (type == typeof(Dynamic))
@@ -249,11 +249,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
// method type parameter reference
pos++;
int index = ReadTypeParameterCount(reflectionTypeName, ref pos);
- reference = TypeParameterReference.Create(EntityType.Method, index);
+ reference = TypeParameterReference.Create(SymbolKind.Method, index);
} else {
// class type parameter reference
int index = ReadTypeParameterCount(reflectionTypeName, ref pos);
- reference = TypeParameterReference.Create(EntityType.TypeDefinition, index);
+ reference = TypeParameterReference.Create(SymbolKind.TypeDefinition, index);
}
} else {
// not a type parameter reference: read the actual type name
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeParameterSubstitution.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeParameterSubstitution.cs
index a59ab56..28b4abb 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeParameterSubstitution.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeParameterSubstitution.cs
@@ -148,12 +148,12 @@ namespace ICSharpCode.NRefactory.TypeSystem
public override IType VisitTypeParameter(ITypeParameter type)
{
int index = type.Index;
- if (classTypeArguments != null && type.OwnerType == EntityType.TypeDefinition) {
+ if (classTypeArguments != null && type.OwnerType == SymbolKind.TypeDefinition) {
if (index >= 0 && index < classTypeArguments.Count)
return classTypeArguments[index];
else
return SpecialType.UnknownType;
- } else if (methodTypeArguments != null && type.OwnerType == EntityType.Method) {
+ } else if (methodTypeArguments != null && type.OwnerType == SymbolKind.Method) {
if (index >= 0 && index < methodTypeArguments.Count)
return methodTypeArguments[index];
else
diff --git a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeSystemExtensions.cs b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeSystemExtensions.cs
index 03a22d2..88827df 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeSystemExtensions.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/TypeSystem/TypeSystemExtensions.cs
@@ -85,11 +85,27 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// </summary>
public static bool IsDerivedFrom(this ITypeDefinition type, ITypeDefinition baseType)
{
+ if (type == null)
+ throw new ArgumentNullException("type");
+ if (baseType == null)
+ return false;
if (type.Compilation != baseType.Compilation) {
throw new InvalidOperationException("Both arguments to IsDerivedFrom() must be from the same compilation.");
}
return type.GetAllBaseTypeDefinitions().Contains(baseType);
}
+
+ /// <summary>
+ /// Gets whether this type definition is derived from a given known type.
+ /// </summary>
+ public static bool IsDerivedFrom(this ITypeDefinition type, KnownTypeCode baseType)
+ {
+ if (type == null)
+ throw new ArgumentNullException("type");
+ if (baseType == KnownTypeCode.None)
+ return false;
+ return IsDerivedFrom(type, type.Compilation.FindType(baseType).GetDefinition());
+ }
#endregion
#region IsOpen / IsUnbound / IsKnownType
@@ -188,6 +204,57 @@ namespace ICSharpCode.NRefactory.TypeSystem
#region Import
/// <summary>
+ /// Imports a symbol from another compilation.
+ /// </summary>
+ public static ISymbol Import(this ICompilation compilation, ISymbol symbol)
+ {
+ if (compilation == null)
+ throw new ArgumentNullException("compilation");
+ if (symbol == null)
+ return null;
+ switch (symbol.SymbolKind) {
+ case SymbolKind.TypeParameter:
+ return (ITypeParameter)Import(compilation, (IType)symbol);
+ case SymbolKind.Variable:
+ IVariable v = (IVariable)symbol;
+ return new DefaultVariable(
+ Import(compilation, v.Type),
+ v.Name, v.Region, v.IsConst, v.ConstantValue
+ );
+ case SymbolKind.Parameter:
+ IParameter p = (IParameter)symbol;
+ if (p.Owner != null) {
+ int index = p.Owner.Parameters.IndexOf(p);
+ var owner = (IParameterizedMember)Import(compilation, p.Owner);
+ if (owner == null || index < 0 || index >= owner.Parameters.Count)
+ return null;
+ return owner.Parameters[index];
+ } else {
+ return new DefaultParameter(
+ Import(compilation, p.Type),
+ p.Name, null, p.Region,
+ null, p.IsRef, p.IsOut, p.IsParams
+ );
+ }
+ case SymbolKind.Namespace:
+ INamespace ns = (INamespace)symbol;
+ if (ns.ParentNamespace == null) {
+ return compilation.RootNamespace;
+ } else {
+ INamespace importedParent = Import(compilation, ns.ParentNamespace);
+ if (importedParent != null)
+ return importedParent.GetChildNamespace(ns.Name);
+ else
+ return null;
+ }
+ default:
+ if (symbol is IEntity)
+ return Import(compilation, (IEntity)symbol);
+ throw new NotSupportedException("Unsupported symbol kind: " + symbol.SymbolKind);
+ }
+ }
+
+ /// <summary>
/// Imports a type from another compilation.
/// </summary>
public static IType Import(this ICompilation compilation, IType type)
@@ -535,7 +602,132 @@ namespace ICSharpCode.NRefactory.TypeSystem
return reference.Resolve (compilation.TypeResolveContext);
}
#endregion
-
+
+ #region ITypeDefinition.GetAttribute
+ /// <summary>
+ /// Gets the attribute of the specified attribute type (or derived attribute types).
+ /// </summary>
+ /// <param name="entity">The entity on which the attributes are declared.</param>
+ /// <param name="attributeType">The attribute type to look for.</param>
+ /// <param name="inherit">
+ /// Specifies whether attributes inherited from base classes and base members (if the given <paramref name="entity"/> in an <c>override</c>)
+ /// should be returned. The default is <c>true</c>.
+ /// </param>
+ /// <returns>
+ /// Returns the attribute that was found; or <c>null</c> if none was found.
+ /// If inherit is true, an from the entity itself will be returned if possible;
+ /// and the base entity will only be searched if none exists.
+ /// </returns>
+ public static IAttribute GetAttribute(this IEntity entity, IType attributeType, bool inherit = true)
+ {
+ return GetAttributes(entity, attributeType, inherit).FirstOrDefault();
+ }
+
+ /// <summary>
+ /// Gets the attributes of the specified attribute type (or derived attribute types).
+ /// </summary>
+ /// <param name="entity">The entity on which the attributes are declared.</param>
+ /// <param name="attributeType">The attribute type to look for.</param>
+ /// <param name="inherit">
+ /// Specifies whether attributes inherited from base classes and base members (if the given <paramref name="entity"/> in an <c>override</c>)
+ /// should be returned. The default is <c>true</c>.
+ /// </param>
+ /// <returns>
+ /// Returns the list of attributes that were found.
+ /// If inherit is true, attributes from the entity itself are returned first; followed by attributes inherited from the base entity.
+ /// </returns>
+ public static IEnumerable<IAttribute> GetAttributes(this IEntity entity, IType attributeType, bool inherit = true)
+ {
+ if (entity == null)
+ throw new ArgumentNullException("entity");
+ if (attributeType == null)
+ throw new ArgumentNullException("attributeType");
+ return GetAttributes(entity, attributeType.Equals, inherit);
+ }
+
+ /// <summary>
+ /// Gets the attribute of the specified attribute type (or derived attribute types).
+ /// </summary>
+ /// <param name="entity">The entity on which the attributes are declared.</param>
+ /// <param name="attributeType">The attribute type to look for.</param>
+ /// <param name="inherit">
+ /// Specifies whether attributes inherited from base classes and base members (if the given <paramref name="entity"/> in an <c>override</c>)
+ /// should be returned. The default is <c>true</c>.
+ /// </param>
+ /// <returns>
+ /// Returns the attribute that was found; or <c>null</c> if none was found.
+ /// If inherit is true, an from the entity itself will be returned if possible;
+ /// and the base entity will only be searched if none exists.
+ /// </returns>
+ public static IAttribute GetAttribute(this IEntity entity, FullTypeName attributeType, bool inherit = true)
+ {
+ return GetAttributes(entity, attributeType, inherit).FirstOrDefault();
+ }
+
+ /// <summary>
+ /// Gets the attributes of the specified attribute type (or derived attribute types).
+ /// </summary>
+ /// <param name="entity">The entity on which the attributes are declared.</param>
+ /// <param name="attributeType">The attribute type to look for.</param>
+ /// <param name="inherit">
+ /// Specifies whether attributes inherited from base classes and base members (if the given <paramref name="entity"/> in an <c>override</c>)
+ /// should be returned. The default is <c>true</c>.
+ /// </param>
+ /// <returns>
+ /// Returns the list of attributes that were found.
+ /// If inherit is true, attributes from the entity itself are returned first; followed by attributes inherited from the base entity.
+ /// </returns>
+ public static IEnumerable<IAttribute> GetAttributes(this IEntity entity, FullTypeName attributeType, bool inherit = true)
+ {
+ if (entity == null)
+ throw new ArgumentNullException("entity");
+ return GetAttributes(entity, attrType => {
+ ITypeDefinition typeDef = attrType.GetDefinition();
+ return typeDef != null && typeDef.FullTypeName == attributeType;
+ }, inherit);
+ }
+
+ static IEnumerable<IAttribute> GetAttributes(IEntity entity, Predicate<IType> attributeTypePredicate, bool inherit)
+ {
+ if (!inherit) {
+ foreach (var attr in entity.Attributes) {
+ if (attributeTypePredicate(attr.AttributeType))
+ yield return attr;
+ }
+ yield break;
+ }
+ ITypeDefinition typeDef = entity as ITypeDefinition;
+ if (typeDef != null) {
+ foreach (var baseType in typeDef.GetNonInterfaceBaseTypes().Reverse()) {
+ ITypeDefinition baseTypeDef = baseType.GetDefinition();
+ if (baseTypeDef == null)
+ continue;
+ foreach (var attr in baseTypeDef.Attributes) {
+ if (attributeTypePredicate(attr.AttributeType))
+ yield return attr;
+ }
+ }
+ yield break;
+ }
+ IMember member = entity as IMember;
+ if (member != null) {
+ HashSet<IMember> visitedMembers = new HashSet<IMember>();
+ do {
+ member = member.MemberDefinition; // it's sufficient to look at the definitions
+ if (!visitedMembers.Add(member)) {
+ // abort if we seem to be in an infinite loop (cyclic inheritance)
+ break;
+ }
+ foreach (var attr in member.Attributes) {
+ if (attributeTypePredicate(attr.AttributeType))
+ yield return attr;
+ }
+ } while (member.IsOverride && (member = InheritanceHelper.GetBaseMember(member)) != null);
+ yield break;
+ }
+ throw new NotSupportedException("Unknown entity type");
+ }
+ #endregion
#region IAssembly.GetTypeDefinition(string,string,int)
/// <summary>
diff --git a/external/nrefactory/ICSharpCode.NRefactory/Utils/ExtensionMethods.cs b/external/nrefactory/ICSharpCode.NRefactory/Utils/ExtensionMethods.cs
index ba667b0..e5829b2 100644
--- a/external/nrefactory/ICSharpCode.NRefactory/Utils/ExtensionMethods.cs
+++ b/external/nrefactory/ICSharpCode.NRefactory/Utils/ExtensionMethods.cs
@@ -24,7 +24,7 @@ namespace ICSharpCode.NRefactory.Utils
/// <summary>
/// Contains extension methods for use within NRefactory.
/// </summary>
- internal static class ExtensionMethods
+ static class ExtensionMethods
{
public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> input)
{
diff --git a/external/nrefactory/NRefactory.sln b/external/nrefactory/NRefactory.sln
index 7cf9d71..10a5206 100644
--- a/external/nrefactory/NRefactory.sln
+++ b/external/nrefactory/NRefactory.sln
@@ -28,6 +28,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.CSha
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Demo", "ICSharpCode.NRefactory.Demo\ICSharpCode.NRefactory.Demo.csproj", "{9C19E629-C93E-4ACB-9A4B-13072B5AEF9D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IKVM.Reflection", "..\ikvm\reflect\IKVM.Reflection.csproj", "{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.IKVM", "ICSharpCode.NRefactory.IKVM\ICSharpCode.NRefactory.IKVM.csproj", "{A727169F-D94F-443F-B305-B057D7F3B420}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Cecil", "ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj", "{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -184,20 +190,67 @@ Global
{9C19E629-C93E-4ACB-9A4B-13072B5AEF9D}.net_4_5_Release|Any CPU.Build.0 = net_4_5_Release|Any CPU
{9C19E629-C93E-4ACB-9A4B-13072B5AEF9D}.net_4_5_Release|x86.ActiveCfg = net_4_5_Release|x86
{9C19E629-C93E-4ACB-9A4B-13072B5AEF9D}.net_4_5_Release|x86.Build.0 = net_4_5_Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Debug|x86.Build.0 = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|x86.ActiveCfg = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.Release|x86.Build.0 = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Debug|x86.ActiveCfg = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Debug|x86.Build.0 = Debug|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Release|Any CPU.Build.0 = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Release|x86.ActiveCfg = Release|Any CPU
+ {4CB170EF-DFE6-4A56-9E1B-A85449E827A7}.net_4_5_Release|x86.Build.0 = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Debug|x86.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|x86.ActiveCfg = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.Release|x86.Build.0 = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Debug|x86.ActiveCfg = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Debug|x86.Build.0 = Debug|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Release|Any CPU.Build.0 = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Release|x86.ActiveCfg = Release|Any CPU
+ {A727169F-D94F-443F-B305-B057D7F3B420}.net_4_5_Release|x86.Build.0 = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Debug|x86.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|x86.ActiveCfg = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.Release|x86.Build.0 = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Debug|x86.Build.0 = Debug|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Release|Any CPU.Build.0 = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Release|x86.ActiveCfg = Release|Any CPU
+ {2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}.net_4_5_Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = ICSharpCode.NRefactory.Demo\ICSharpCode.NRefactory.Demo.csproj
Policies = $0
$0.TextStylePolicy = $1
$1.FileWidth = 120
- $1.TabWidth = 4
- $1.IndentWidth = 4
+ $1.TabsToSpaces = False
$1.EolMarker = Unix
- $1.inheritsSet = Mono
+ $1.inheritsSet = VisualStudio
$1.inheritsScope = text/plain
$1.scope = text/plain
EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
EndGlobal
diff --git a/external/nrefactory/NRefactory.suo b/external/nrefactory/NRefactory.suo
deleted file mode 100644
index cb425d4..0000000
Binary files a/external/nrefactory/NRefactory.suo and /dev/null differ
diff --git a/external/nrefactory/Packages/ICSharpCode.NRefactory.nuspec b/external/nrefactory/Packages/ICSharpCode.NRefactory.nuspec
index d86a3ae..4d9560d 100644
--- a/external/nrefactory/Packages/ICSharpCode.NRefactory.nuspec
+++ b/external/nrefactory/Packages/ICSharpCode.NRefactory.nuspec
@@ -22,6 +22,9 @@
<file src="..\bin\Release\ICSharpCode.NRefactory.dll" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.pdb" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.xml" target="lib\Net40" />
+ <file src="..\bin\Release\ICSharpCode.NRefactory.Cecil.dll" target="lib\Net40" />
+ <file src="..\bin\Release\ICSharpCode.NRefactory.Cecil.pdb" target="lib\Net40" />
+ <file src="..\bin\Release\ICSharpCode.NRefactory.Cecil.xml" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.CSharp.dll" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.CSharp.pdb" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.CSharp.xml" target="lib\Net40" />
@@ -29,6 +32,7 @@
<file src="..\bin\Release\ICSharpCode.NRefactory.Xml.pdb" target="lib\Net40" />
<file src="..\bin\Release\ICSharpCode.NRefactory.Xml.xml" target="lib\Net40" />
<file src="..\ICSharpCode.NRefactory\**\*.cs" target="src\ICSharpCode.NRefactory" />
+ <file src="..\ICSharpCode.NRefactory.Cecil\**\*.cs" target="src\ICSharpCode.NRefactory" />
<file src="..\ICSharpCode.NRefactory.CSharp\**\*.cs" target="src\ICSharpCode.NRefactory.CSharp" />
<file src="..\ICSharpCode.NRefactory.CSharp\**\*.jay" target="src\ICSharpCode.NRefactory.CSharp" />
<file src="..\ICSharpCode.NRefactory.Xml\**\*.cs" target="src\ICSharpCode.NRefactory.Xml" />
diff --git a/external/nrefactory/README b/external/nrefactory/README
index 65ac390..0b4e587 100644
--- a/external/nrefactory/README
+++ b/external/nrefactory/README
@@ -12,7 +12,9 @@ How to compile:
Get Cecil from https://github.com/jbevain/cecil ('git clone git://github.com/jbevain/cecil.git')
or download Cecil from https://github.com/jbevain/cecil/ and unzip it into a directory named "cecil"
next to the directory containing NRefactory.
- 2. Open NRefactory.sln in your favorite .NET IDE and compile.
+ 2. If you need the IKVM binding get it from https://github.com/mono/ikvm-fork and put it next to the NRefactory directory
+ like Mono.Cecil - name it "ikvm".
+ 3. Open NRefactory.sln in your favorite .NET IDE and compile.
Features:
- C# Parser
diff --git a/external/xwt/.gitignore b/external/xwt/.gitignore
index c460834..1560018 100644
--- a/external/xwt/.gitignore
+++ b/external/xwt/.gitignore
@@ -10,3 +10,4 @@ obj
*.usertasks
*.mdb
.DS_Store
+test-results
diff --git a/external/xwt/MacTest/MacTest.csproj b/external/xwt/MacTest/MacTest.csproj
index d4243a8..fc54364 100644
--- a/external/xwt/MacTest/MacTest.csproj
+++ b/external/xwt/MacTest/MacTest.csproj
@@ -25,6 +25,7 @@
<CreatePackage>False</CreatePackage>
<EnablePackageSigning>False</EnablePackageSigning>
<IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -37,14 +38,12 @@
<CreatePackage>False</CreatePackage>
<EnablePackageSigning>False</EnablePackageSigning>
<IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- <Package>monodevelop-core-mac-addins</Package>
- </Reference>
+ <Reference Include="MonoMac" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
diff --git a/external/xwt/MixedGtkMacTest/AppWindow.cs b/external/xwt/MixedGtkMacTest/AppWindow.cs
new file mode 100644
index 0000000..5c1dcee
--- /dev/null
+++ b/external/xwt/MixedGtkMacTest/AppWindow.cs
@@ -0,0 +1,69 @@
+//
+// MainWindow.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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 Xwt;
+using Samples;
+
+namespace MixedGtkMacTest
+{
+ public class AppWindow: Window
+ {
+ Toolkit nativeToolkit;
+
+ public AppWindow ()
+ {
+ nativeToolkit = Toolkit.Load (ToolkitType.Cocoa);
+
+ HBox box = new HBox ();
+ var b = new Button ("Gtk Test Window");
+ b.Clicked += HandleClicked;
+ box.PackStart (b, BoxMode.FillAndExpand);
+
+ b = nativeToolkit.CreateObject<Button> ();
+ b.Label = "Cocoa Test Window";
+ b.Clicked += HandleClickedCocoa;
+ var wped = Toolkit.CurrentEngine.WrapWidget (b);
+ box.PackStart (wped, BoxMode.FillAndExpand);
+
+ Content = box;
+ }
+
+ void HandleClickedCocoa (object sender, EventArgs e)
+ {
+ nativeToolkit.Invoke (delegate {
+ MainWindow w = new MainWindow ();
+ w.Show ();
+ });
+ }
+
+ void HandleClicked (object sender, EventArgs e)
+ {
+ MainWindow w = new MainWindow ();
+ w.Show ();
+ }
+ }
+}
+
diff --git a/external/xwt/MixedGtkMacTest/AssemblyInfo.cs b/external/xwt/MixedGtkMacTest/AssemblyInfo.cs
new file mode 100644
index 0000000..1d17d53
--- /dev/null
+++ b/external/xwt/MixedGtkMacTest/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("MixedGtkMacTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Xamarin Inc.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/external/xwt/MixedGtkMacTest/Main.cs b/external/xwt/MixedGtkMacTest/Main.cs
new file mode 100644
index 0000000..63217ba
--- /dev/null
+++ b/external/xwt/MixedGtkMacTest/Main.cs
@@ -0,0 +1,43 @@
+//
+// Main.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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 Xwt;
+namespace MixedGtkMacTest
+{
+ class MainClass
+ {
+ public static void Main (string[] args)
+ {
+ Application.Initialize (ToolkitType.Gtk);
+
+ var win = new AppWindow ();
+ win.Show ();
+ win.Width = 200;
+
+ Application.Run ();
+ }
+ }
+}
diff --git a/external/xwt/MixedGtkMacTest/MixedGtkMacTest.csproj b/external/xwt/MixedGtkMacTest/MixedGtkMacTest.csproj
new file mode 100644
index 0000000..be0919c
--- /dev/null
+++ b/external/xwt/MixedGtkMacTest/MixedGtkMacTest.csproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{14CF6E75-0D08-4BBD-B0F5-742196E5656D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>MixedGtkMacTest</RootNamespace>
+ <AssemblyName>MixedGtkMacTest</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>True</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="AppWindow.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Gtk\Xwt.Gtk.csproj">
+ <Project>{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}</Project>
+ <Name>Xwt.Gtk</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Mac\Xwt.Mac.csproj">
+ <Project>{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}</Project>
+ <Name>Xwt.Mac</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Samples\Samples.csproj">
+ <Project>{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}</Project>
+ <Name>Samples</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Samples/App.cs b/external/xwt/Samples/App.cs
index 8ac6f72..6089bd1 100644
--- a/external/xwt/Samples/App.cs
+++ b/external/xwt/Samples/App.cs
@@ -12,14 +12,13 @@ namespace Samples
Application.Initialize (type);
MainWindow w = new MainWindow ();
- w.Title = "Xwt Demo Application";
- w.Width = 500;
- w.Height = 400;
w.Show ();
Application.Run ();
w.Dispose ();
+
+ Application.Dispose ();
}
}
}
diff --git a/external/xwt/Samples/MainWindow.cs b/external/xwt/Samples/MainWindow.cs
index 8aa5c8e..403666e 100644
--- a/external/xwt/Samples/MainWindow.cs
+++ b/external/xwt/Samples/MainWindow.cs
@@ -1,6 +1,7 @@
using System;
using Xwt;
using Xwt.Drawing;
+using System.Xml;
namespace Samples
{
@@ -21,6 +22,10 @@ namespace Samples
public MainWindow ()
{
+ Title = "Xwt Demo Application";
+ Width = 500;
+ Height = 400;
+
try {
statusIcon = Application.CreateStatusIcon ();
statusIcon.Menu = new Menu ();
@@ -55,21 +60,44 @@ namespace Samples
HPaned box = new HPaned ();
- icon = Image.FromResource (typeof(App), "class.png");
+ icon = Image.FromResource (typeof(App), "document-generic.png");
store = new TreeStore (nameCol, iconCol, widgetCol);
samplesTree = new TreeView ();
samplesTree.Columns.Add ("Name", iconCol, nameCol);
-
- AddSample (null, "Boxes", typeof(Boxes));
- AddSample (null, "Buttons", typeof(ButtonSample));
- AddSample (null, "CheckBox", typeof(Checkboxes));
- AddSample (null, "Clipboard", typeof(ClipboardSample));
- AddSample (null, "ColorSelector", typeof(ColorSelectorSample));
- AddSample (null, "ComboBox", typeof(ComboBoxes));
+
+ var w = AddSample (null, "Widgets", null);
+ AddSample (w, "Boxes", typeof(Boxes));
+ AddSample (w, "Buttons", typeof(ButtonSample));
+ AddSample (w, "CheckBox", typeof(Checkboxes));
+ AddSample (w, "Clipboard", typeof(ClipboardSample));
+ AddSample (w, "ColorSelector", typeof(ColorSelectorSample));
+ AddSample (w, "ComboBox", typeof(ComboBoxes));
+ AddSample (w, "DatePicker", typeof(DatePickerSample));
// AddSample (null, "Designer", typeof(Designer));
- AddSample (null, "Drag & Drop", typeof(DragDrop));
-
+ AddSample (w, "Expander", typeof (ExpanderSample));
+ AddSample (w, "Progress bars", typeof(ProgressBarSample));
+ AddSample (w, "Frames", typeof(Frames));
+ AddSample (w, "Images", typeof(Images));
+ AddSample (w, "Labels", typeof(Labels));
+ AddSample (w, "ListBox", typeof(ListBoxSample));
+ AddSample (w, "LinkLabels", typeof(LinkLabels));
+ var listView = AddSample (w, "ListView", typeof(ListView1));
+ AddSample (listView, "Editable checkboxes", typeof(ListView2));
+ AddSample (w, "Markdown", typeof (MarkDownSample));
+ AddSample (w, "Menu", typeof(MenuSamples));
+ AddSample (w, "Notebook", typeof(NotebookSample));
+ AddSample (w, "Paneds", typeof(PanedViews));
+ AddSample (w, "Popover", typeof(PopoverSample));
+ AddSample (w, "RadioButton", typeof (RadioButtonSample));
+ AddSample (w, "Scroll View", typeof(ScrollWindowSample));
+ AddSample (w, "Scrollbar", typeof(ScrollbarSample));
+ AddSample (w, "Slider", typeof (SliderSample));
+ AddSample (w, "Spinners", typeof (Spinners));
+ AddSample (w, "Tables", typeof (Tables));
+ AddSample (w, "Text Entry", typeof (TextEntries));
+ AddSample (w, "TreeView", typeof(TreeViews));
+
var n = AddSample (null, "Drawing", null);
AddSample (n, "Canvas with Widget (Linear)", typeof (CanvasWithWidget_Linear));
AddSample (n, "Canvas with Widget (Radial)", typeof (CanvasWithWidget_Radial));
@@ -80,37 +108,26 @@ namespace Samples
AddSample (n, "Images and Patterns", typeof(DrawingPatternsAndImages));
AddSample (n, "Text", typeof(DrawingText));
AddSample (n, "Partial Images", typeof (PartialImages));
+ AddSample (n, "Custom Drawn Image", typeof (ImageScaling));
+ AddSample (n, "Widget Rendering", typeof (WidgetRendering));
+
+ var wf = AddSample (null, "Widget Features", null);
+ AddSample (wf, "Drag & Drop", typeof(DragDrop));
+ AddSample (wf, "Widget Events", typeof(WidgetEvents));
+ AddSample (wf, "Opacity", typeof(OpacitySample));
+ AddSample (wf, "Tooltips", typeof(Tooltips));
- AddSample (null, "Expander", typeof (ExpanderSample));
- AddSample (null, "Progress bars", typeof(ProgressBarSample));
- AddSample (null, "Frames", typeof(Frames));
- AddSample (null, "Images", typeof(Images));
- AddSample (null, "Labels", typeof(Labels));
- AddSample (null, "ListBox", typeof(ListBoxSample));
- AddSample (null, "LinkLabels", typeof(LinkLabels));
- AddSample (null, "ListView", typeof(ListView1));
- AddSample (null, "Markdown", typeof (MarkDownSample));
- AddSample (null, "Menu", typeof(MenuSamples));
- AddSample (null, "Notebook", typeof(NotebookSample));
- AddSample (null, "Paneds", typeof(PanedViews));
- AddSample (null, "Popover", typeof(PopoverSample));
- AddSample (null, "Scroll View", typeof(ScrollWindowSample));
- AddSample (null, "Spinners", typeof (Spinners));
- AddSample (null, "ReliefFrame", typeof (ReliefFrameSample));
- AddSample (null, "Tables", typeof (Tables));
- AddSample (null, "Text Entry", typeof (TextEntries));
- AddSample (null, "Tooltips", typeof(Tooltips));
- AddSample (null, "TreeView", typeof(TreeViews));
- AddSample (null, "WidgetEvents", typeof(WidgetEvents));
AddSample (null, "Windows", typeof(Windows));
+ AddSample (null, "Screens", typeof (ScreensSample));
+
samplesTree.DataSource = store;
box.Panel1.Content = samplesTree;
sampleBox = new VBox ();
title = new Label ("Sample:");
- sampleBox.PackStart (title, BoxMode.None);
+ sampleBox.PackStart (title);
box.Panel2.Content = sampleBox;
box.Panel2.Resize = true;
@@ -146,10 +163,10 @@ namespace Samples
if (s.Type != null) {
if (s.Widget == null)
s.Widget = (Widget)Activator.CreateInstance (s.Type);
- sampleBox.PackStart (s.Widget, BoxMode.FillAndExpand);
+ sampleBox.PackStart (s.Widget, true);
}
-
-// string txt = System.Xaml.XamlServices.Save (s);
+
+ // Console.WriteLine (System.Xaml.XamlServices.Save (s.Widget));
currentSample = s.Widget;
Dump (currentSample, 0);
}
@@ -159,7 +176,8 @@ namespace Samples
{
if (w == null)
return;
- Console.WriteLine (new string (' ', ind * 2) + " " + w.GetType ().Name + " " + w.GetPreferredWidth () + " " + w.GetPreferredHeight ());
+ var s = w.GetPreferredSize ();
+ Console.WriteLine (new string (' ', ind * 2) + " " + w.GetType ().Name + " " + s.Width + " " + s.Height);
foreach (var c in w.Children)
Dump (c, ind + 1);
}
diff --git a/external/xwt/Samples/MonoDevelop.Components.Chart/BasicChart.cs b/external/xwt/Samples/MonoDevelop.Components.Chart/BasicChart.cs
index 2ba45b1..c38785a 100644
--- a/external/xwt/Samples/MonoDevelop.Components.Chart/BasicChart.cs
+++ b/external/xwt/Samples/MonoDevelop.Components.Chart/BasicChart.cs
@@ -499,7 +499,7 @@ namespace MonoDevelop.Components.Chart
TextLayout layout = null;
if (showLabels) {
- layout = new TextLayout (ctx);
+ layout = new TextLayout ();
layout.Font = chartFont;
}
@@ -645,7 +645,7 @@ namespace MonoDevelop.Components.Chart
double MeasureTicksSize (Context ctx, TickEnumerator e, AxisDimension ad)
{
double max = 0;
- TextLayout layout = new TextLayout (ctx);
+ TextLayout layout = new TextLayout ();
layout.Font = chartFont;
double start = GetStart (ad);
@@ -753,7 +753,7 @@ namespace MonoDevelop.Components.Chart
}
if (text != null && text.Length > 0) {
- TextLayout layout = new TextLayout (ctx);
+ TextLayout layout = new TextLayout ();
layout.Font = chartFont;
layout.Text = text;
diff --git a/external/xwt/Samples/Samples.csproj b/external/xwt/Samples/Samples.csproj
index eabecb5..0e19d07 100644
--- a/external/xwt/Samples/Samples.csproj
+++ b/external/xwt/Samples/Samples.csproj
@@ -39,9 +39,6 @@
<Compile Include="Samples\ChartSample.cs">
<SubType>Component</SubType>
</Compile>
- <Compile Include="Samples\ReliefFrameSample.cs">
- <SubType>Component</SubType>
- </Compile>
<Compile Include="Samples\Spinners.cs">
<SubType>Component</SubType>
</Compile>
@@ -62,8 +59,13 @@
</Compile>
<Compile Include="MainWindow.cs">
<SubType>Component</SubType>
+ <DeployService-Deploy>True</DeployService-Deploy>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Compile>
+ <Compile Include="App.cs">
+ <DeployService-Deploy>True</DeployService-Deploy>
+ <Gettext-ScanForTranslations>False</Gettext-ScanForTranslations>
</Compile>
- <Compile Include="App.cs" />
<Compile Include="MonoDevelop.Components.Chart\Axis.cs" />
<Compile Include="MonoDevelop.Components.Chart\AxisDimension.cs" />
<Compile Include="MonoDevelop.Components.Chart\AxisPosition.cs" />
@@ -165,6 +167,17 @@
<Compile Include="Samples\PopoverSample.cs">
<SubType>Component</SubType>
</Compile>
+ <Compile Include="Samples\ScreensSample.cs" />
+ <Compile Include="Samples\ImageScaling.cs" />
+ <Compile Include="Samples\RadioButtonSample.cs" />
+ <Compile Include="Samples\WidgetRendering.cs" />
+ <Compile Include="Samples\ScrollbarSample.cs" />
+ <Compile Include="Samples\DatePickerSample.cs" />
+ <Compile Include="Samples\SliderSample.cs" />
+ <Compile Include="Samples\ListView2.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Samples\OpacitySample.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@@ -182,6 +195,13 @@
</EmbeddedResource>
<EmbeddedResource Include="Samples\cow.jpg">
<LogicalName>cow.jpg</LogicalName>
+ <DeployService-Deploy>True</DeployService-Deploy>
+ </EmbeddedResource>
+ <EmbeddedResource Include="document-generic.png">
+ <LogicalName>document-generic.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="document-generic%402x.png">
+ <LogicalName>document-generic at 2x.png</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ProjectExtensions>
diff --git a/external/xwt/Samples/Samples/Boxes.cs b/external/xwt/Samples/Samples/Boxes.cs
index 88d4cb5..41f659c 100644
--- a/external/xwt/Samples/Samples/Boxes.cs
+++ b/external/xwt/Samples/Samples/Boxes.cs
@@ -11,14 +11,14 @@ namespace Samples
HBox box1 = new HBox ();
VBox box2 = new VBox ();
- box2.PackStart (new SimpleBox (30), BoxMode.None);
- box2.PackStart (new SimpleBox (30), BoxMode.None);
- box2.PackStart (new SimpleBox (30), BoxMode.FillAndExpand);
+ box2.PackStart (new SimpleBox (30));
+ box2.PackStart (new SimpleBox (30));
+ box2.PackStart (new SimpleBox (30), true);
- box1.PackStart (box2, BoxMode.FillAndExpand);
- box1.PackStart (new SimpleBox (30), BoxMode.None);
- box1.PackStart (new SimpleBox (30), BoxMode.Expand);
- PackStart (box1, BoxMode.None);
+ box1.PackStart (box2, true);
+ box1.PackStart (new SimpleBox (30));
+ box1.PackStart (new SimpleBox (30), expand:true, fill:false);
+ PackStart (box1);
HBox box3 = new HBox ();
box3.PackEnd (new SimpleBox (30));
@@ -26,7 +26,7 @@ namespace Samples
box3.PackEnd (new SimpleBox (40));
box3.PackStart (new SimpleBox (10) {Color = new Color (1, 0.5, 0.5)});
box3.PackEnd (new SimpleBox (30));
- box3.PackStart (new SimpleBox (10) {Color = new Color (1, 0.5, 0.5)}, BoxMode.FillAndExpand);
+ box3.PackStart (new SimpleBox (10) {Color = new Color (1, 0.5, 0.5)}, true);
PackStart (box3);
HBox box4 = new HBox ();
@@ -34,18 +34,18 @@ namespace Samples
b.Clicked += delegate {
b.Label = "Button has grown";
};
- box4.PackStart (new SimpleBox (30), BoxMode.FillAndExpand);
+ box4.PackStart (new SimpleBox (30), true);
box4.PackStart (b);
- box4.PackStart (new SimpleBox (30), BoxMode.FillAndExpand);
+ box4.PackStart (new SimpleBox (30), true);
PackStart (box4);
HBox box5 = new HBox ();
Button b2 = new Button ("Hide / Show");
- box5.PackStart (new SimpleBox (30), BoxMode.FillAndExpand);
+ box5.PackStart (new SimpleBox (30), true);
var hsb = new SimpleBox (20);
- box5.PackStart (hsb, BoxMode.None);
+ box5.PackStart (hsb);
box5.PackStart (b2);
- box5.PackStart (new SimpleBox (30), BoxMode.FillAndExpand);
+ box5.PackStart (new SimpleBox (30), true);
b2.Clicked += delegate {
hsb.Visible = !hsb.Visible;
};
@@ -54,10 +54,29 @@ namespace Samples
HBox box6 = new HBox ();
for (int n=0; n<15; n++) {
var w = new Label ("TestLabel" + n);
- w.MinWidth = 10;
+ w.WidthRequest = 10;
box6.PackStart (w);
}
PackStart (box6);
+
+ VBox box7 = new VBox () { Spacing = 0 };
+ box7.BackgroundColor = Colors.White;
+
+ box7.PackStart (new Label("Hi there") { Margin = new WidgetSpacing (10, 10, 0, 0) });
+ box7.PackStart (new SpecialWidget() { MarginTop = 15 });
+ box7.PackStart (new SpecialWidget() { Margin = 5 });
+ PackStart (box7);
+ }
+ }
+
+ class SpecialWidget: Widget
+ {
+ public SpecialWidget ()
+ {
+ VBox bl = new VBox () { Spacing = 0 };
+ bl.BackgroundColor = Colors.Gray;
+ bl.PackStart (new Label ("Hi there"));
+ Content = bl;
}
}
diff --git a/external/xwt/Samples/Samples/ButtonSample.cs b/external/xwt/Samples/Samples/ButtonSample.cs
index c0fb42f..cf85332 100644
--- a/external/xwt/Samples/Samples/ButtonSample.cs
+++ b/external/xwt/Samples/Samples/ButtonSample.cs
@@ -57,8 +57,9 @@ namespace Samples
};
PackStart (b2);
- PackStart (new Button (Image.FromIcon (StockIcons.ZoomIn, IconSize.Medium)));
-
+ PackStart (new Button (StockIcons.ZoomIn.WithSize (22)));
+ PackStart (new Button (new CustomImage ().WithSize (22)));
+
MenuButton mb = new MenuButton ("This is a Menu Button");
Menu men = new Menu ();
men.Items.Add (new MenuItem ("First"));
@@ -95,12 +96,12 @@ namespace Samples
var button = new Xwt.Button ("Click to add a child");
button.Clicked += delegate {
- child.PackStart (new Xwt.Label ("Child" + child.Children.Count ()), BoxMode.Fill);
+ child.PackStart (new Xwt.Label ("Child" + child.Children.Count ()));
};
var content = new Xwt.VBox ();
- content.PackStart (button, BoxMode.Fill);
- content.PackStart (container, BoxMode.Fill);
+ content.PackStart (button);
+ content.PackStart (container);
PackStart (content);
}
diff --git a/external/xwt/Samples/Samples/CanvasWithWidget.cs b/external/xwt/Samples/Samples/CanvasWithWidget.cs
index 748df17..425a527 100644
--- a/external/xwt/Samples/Samples/CanvasWithWidget.cs
+++ b/external/xwt/Samples/Samples/CanvasWithWidget.cs
@@ -34,7 +34,7 @@ namespace Samples
public CanvasWithWidget_Linear ()
{
MyCanvas c = new MyCanvas (true);
- PackStart (c, BoxMode.FillAndExpand);
+ PackStart (c, true);
}
}
@@ -43,7 +43,7 @@ namespace Samples
public CanvasWithWidget_Radial ()
{
MyCanvas c = new MyCanvas (false);
- PackStart (c, BoxMode.FillAndExpand);
+ PackStart (c, true);
}
}
@@ -61,7 +61,7 @@ namespace Samples
var box = new HBox ();
box.PackStart (new Button ("..."));
- box.PackStart (new TextEntry (), BoxMode.FillAndExpand);
+ box.PackStart (new TextEntry (), true);
AddChild (box, new Rectangle (30, 70, 100, 30));
Linear = linear;
}
diff --git a/external/xwt/Samples/Samples/ChartSample.cs b/external/xwt/Samples/Samples/ChartSample.cs
index fbb2afa..b3364d4 100644
--- a/external/xwt/Samples/Samples/ChartSample.cs
+++ b/external/xwt/Samples/Samples/ChartSample.cs
@@ -31,7 +31,7 @@ namespace Samples
chart.SetAutoScale (AxisDimension.X, true, true);
chart.SetAutoScale (AxisDimension.Y, true, true);
- PackStart (chart, BoxMode.FillAndExpand);
+ PackStart (chart, true);
}
}
}
diff --git a/external/xwt/Samples/Samples/ComboBoxes.cs b/external/xwt/Samples/Samples/ComboBoxes.cs
index 549c8ac..e7541b9 100644
--- a/external/xwt/Samples/Samples/ComboBoxes.cs
+++ b/external/xwt/Samples/Samples/ComboBoxes.cs
@@ -93,7 +93,12 @@ namespace Samples
la4.Text = "Selected text: " + c4.TextEntry.Text;
};
PackStart (box);
-
+
+ var c5 = new ComboBoxEntry ();
+ c5.TextEntry.TextAlignment = Alignment.Center;
+ c5.TextEntry.Text = "centered text";
+ PackStart (c5);
+
// A complex combobox
// Three data fields
@@ -108,15 +113,15 @@ namespace Samples
var r = store.AddRow ();
store.SetValue (r, textField, "Information");
store.SetValue (r, descField, "Icons are duplicated on purpose");
- store.SetValue (r, imgField, Image.FromIcon (StockIcons.Information, IconSize.Small));
+ store.SetValue (r, imgField, StockIcons.Information);
r = store.AddRow ();
store.SetValue (r, textField, "Error");
store.SetValue (r, descField, "Another item");
- store.SetValue (r, imgField, Image.FromIcon (StockIcons.Error, IconSize.Small));
+ store.SetValue (r, imgField, StockIcons.Error);
r = store.AddRow ();
store.SetValue (r, textField, "Warning");
store.SetValue (r, descField, "A third item");
- store.SetValue (r, imgField, Image.FromIcon (StockIcons.Warning, IconSize.Small));
+ store.SetValue (r, imgField, StockIcons.Warning);
// Four views to show three data fields
cbox.Views.Add (new ImageCellView (imgField));
diff --git a/external/xwt/Samples/Samples/DatePickerSample.cs b/external/xwt/Samples/Samples/DatePickerSample.cs
new file mode 100644
index 0000000..b701db3
--- /dev/null
+++ b/external/xwt/Samples/Samples/DatePickerSample.cs
@@ -0,0 +1,46 @@
+//
+// DatePickerSample.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class DatePickerSample: VBox
+ {
+ public DatePickerSample ()
+ {
+ var dp = new DatePicker ();
+ PackStart (dp);
+
+ Label la = new Label ();
+ PackStart (la);
+ dp.ValueChanged += delegate {
+ la.Text = "Value changed: " + dp.DateTime;
+ };
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/Designer.cs b/external/xwt/Samples/Samples/Designer.cs
index e1b4bd5..6be8af6 100644
--- a/external/xwt/Samples/Samples/Designer.cs
+++ b/external/xwt/Samples/Samples/Designer.cs
@@ -49,7 +49,7 @@ namespace Samples
DesignerSurface ds = new DesignerSurface ();
ds.Load (box);
- PackStart (ds, BoxMode.FillAndExpand);
+ PackStart (ds, true);
}
}
}
diff --git a/external/xwt/Samples/Samples/DragDrop.cs b/external/xwt/Samples/Samples/DragDrop.cs
index 2df2967..5bb1f9f 100644
--- a/external/xwt/Samples/Samples/DragDrop.cs
+++ b/external/xwt/Samples/Samples/DragDrop.cs
@@ -12,10 +12,10 @@ namespace Samples
HBox box = new HBox ();
SimpleBox b1 = new SimpleBox (30);
- box.PackStart (b1, BoxMode.None);
+ box.PackStart (b1);
b2 = new Button ("Drop here");
- box.PackEnd (b2, BoxMode.None);
+ box.PackEnd (b2);
b1.ButtonPressed += delegate {
var d = b1.CreateDragOperation ();
diff --git a/external/xwt/Samples/Samples/DrawingFigures.cs b/external/xwt/Samples/Samples/DrawingFigures.cs
index 241dac0..b91efaa 100644
--- a/external/xwt/Samples/Samples/DrawingFigures.cs
+++ b/external/xwt/Samples/Samples/DrawingFigures.cs
@@ -47,6 +47,7 @@ namespace Samples
Curves1 (ctx, x, y + 80);
Curves2 (ctx, x + 100, y + 80);
+ Path (ctx, x + 210, y + 20);
}
/// <summary>
@@ -224,7 +225,43 @@ namespace Samples
ctx.Stroke ();
ctx.Restore ();
- }
+ }
+
+ public void Path (Context ctx, double px, double py)
+ {
+ ctx.Save ();
+ ctx.Translate (px, py);
+
+ var path = new DrawingPath ();
+
+ path.MoveTo (0.44, 18);
+ path.LineTo (-1, 18);
+ path.LineTo (-1, 26);
+ path.LineTo (0.44, 26);
+ path.LineTo (0, 42);
+ path.LineTo (29, 21.98);
+ path.LineTo (29, 21.98);
+ path.LineTo (0, 2);
+ path.LineTo (0.44, 18);
+
+ ctx.AppendPath (path);
+ ctx.SetColor (Colors.Black);
+ ctx.SetLineWidth (2);
+ ctx.Stroke ();
+
+ var path2 = path.CopyPath ();
+
+ path2.LineTo (15, 8);
+ path2.ClosePath ();
+
+ ctx.Rotate (180);
+ ctx.AppendPath (path2);
+ ctx.SetColor (Colors.Red);
+ ctx.SetLineDash (0, 5);
+ ctx.Stroke ();
+
+ ctx.Restore ();
+ }
}
}
diff --git a/external/xwt/Samples/Samples/DrawingPatternsAndImages.cs b/external/xwt/Samples/Samples/DrawingPatternsAndImages.cs
index a29296d..7a83f97 100644
--- a/external/xwt/Samples/Samples/DrawingPatternsAndImages.cs
+++ b/external/xwt/Samples/Samples/DrawingPatternsAndImages.cs
@@ -45,7 +45,8 @@ namespace Samples
ctx.SetColor (Colors.Black);
// Dashed lines
-
+
+ ctx.SetLineWidth (2);
ctx.SetLineDash (15, 10, 10, 5, 5);
ctx.Rectangle (10, 10, 100, 100);
ctx.Stroke ();
@@ -53,14 +54,14 @@ namespace Samples
// Image
var arcColor = new Color (1, 0, 1);
- ImageBuilder ib = new ImageBuilder (30, 30, ImageFormat.ARGB32);
+ ImageBuilder ib = new ImageBuilder (30, 30);
ib.Context.Arc (15, 15, 15, 0, 360);
ib.Context.SetColor (arcColor);
ib.Context.Fill ();
ib.Context.SetColor (Colors.DarkKhaki);
ib.Context.Rectangle (0, 0, 5, 5);
ib.Context.Fill ();
- var img = ib.ToImage ();
+ var img = ib.ToVectorImage ();
ctx.DrawImage (img, 0, 0);
ctx.DrawImage (img, 0, 50, 50, 10);
diff --git a/external/xwt/Samples/Samples/DrawingText.cs b/external/xwt/Samples/Samples/DrawingText.cs
index 61b3ee6..b57b459 100644
--- a/external/xwt/Samples/Samples/DrawingText.cs
+++ b/external/xwt/Samples/Samples/DrawingText.cs
@@ -49,8 +49,8 @@ namespace Samples
var col1 = new Rectangle ();
var col2 = new Rectangle ();
- var text = new TextLayout (ctx);
- text.Font = this.Font.WithPointSize (24);
+ var text = new TextLayout ();
+ text.Font = this.Font.WithSize (24);
Console.WriteLine (text.Font.Size);
// first text
@@ -118,7 +118,7 @@ namespace Samples
// proofing rotate, and printing size to see the values
ctx.Save ();
- text.Font = this.Font.WithPointSize (10);
+ text.Font = this.Font.WithSize (10);
text.Text = string.Format ("Size 1 {0}\r\nSize 2 {1}\r\nSize 3 {2} Scale {3}",
size1, size2, size3, scale);
text.Width = -1; // this clears textsize
@@ -133,6 +133,20 @@ namespace Samples
// scale example here:
ctx.Restore ();
+
+ TextLayout tl0 = new TextLayout (this);
+
+ tl0.Font = this.Font.WithSize (10);
+ tl0.Text = "This text contains attributes.";
+ tl0.SetUnderline ( 0, "This".Length);
+ tl0.SetForeground (new Color (0, 1.0, 1.0), "This ".Length, "text".Length);
+ tl0.SetBackgound (new Color (0, 0, 0), "This ".Length, "text".Length);
+ tl0.SetFontWeight (FontWeight.Bold, "This text ".Length, "contains".Length);
+ tl0.SetFontStyle (FontStyle.Italic, "This text ".Length, "contains".Length);
+ tl0.SetStrikethrough ("This text contains ".Length, "attributes".Length);
+
+ ctx.DrawTextLayout (tl0, col2.Left, col2.Bottom + 100);
+
// Text boces
@@ -157,6 +171,7 @@ namespace Samples
tl.Text = "\nEmpty line above\nLine break above\n\nEmpty line above\n\n\nTwo empty lines above\nEmpty line below\n";
tl.Width = 200;
DrawText (ctx, tl, ref y);
+
}
void DrawText (Context ctx, TextLayout tl, ref double y)
diff --git a/external/xwt/Samples/Samples/ExpanderSample.cs b/external/xwt/Samples/Samples/ExpanderSample.cs
index b12e9d9..a93e034 100644
--- a/external/xwt/Samples/Samples/ExpanderSample.cs
+++ b/external/xwt/Samples/Samples/ExpanderSample.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt;
+using Xwt.Drawing;
namespace Samples
{
@@ -39,8 +40,11 @@ namespace Samples
var content = new VBox ();
content.PackStart (new Label () { Text = "Label 1" });
content.PackStart (new Button () { Label = "Button 2" });
+ content.BackgroundColor = Colors.Gray;
expander.Content = content;
PackStart (expander);
+
+ PackStart (new Label ("This is shown below the expander"));
}
}
}
diff --git a/external/xwt/Samples/Samples/ImageScaling.cs b/external/xwt/Samples/Samples/ImageScaling.cs
new file mode 100644
index 0000000..1149c6a
--- /dev/null
+++ b/external/xwt/Samples/Samples/ImageScaling.cs
@@ -0,0 +1,90 @@
+//
+// CustomDrawnImage.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+using Xwt.Drawing;
+
+namespace Samples
+{
+ public class ImageScaling: Canvas
+ {
+ protected override void OnDraw (Context ctx, Rectangle dirtyRect)
+ {
+ Image image = new CustomImage ();
+ int x = 0;
+ for (int n=4; n < 50; n += 4) {
+ ctx.DrawImage (image.WithSize (n, n), x, 0);
+ x += n;
+ }
+
+ int maxSize = 48;
+ var warn = StockIcons.Error;
+ x = 0;
+ for (int n=8; n <= maxSize; n += 2) {
+ ctx.DrawImage (warn, x, 50, n, n);
+ x += n;
+ }
+
+ warn = StockIcons.Error.WithSize (maxSize).ToBitmap ();
+ x = 0;
+ for (int n=8; n <= maxSize; n += 2) {
+ ctx.DrawImage (warn, x, 100, n, n);
+ x += n;
+ }
+
+ ctx.DrawImage (image.WithSize (1000), new Rectangle (400, 0, 200, 1000), new Rectangle (0, 200, 200, 200));
+ ctx.DrawImage (image.WithSize (1000), new Rectangle (400, 0, 200, 50), new Rectangle (210, 200, 200, 200));
+ }
+ }
+
+ class CustomImage: DrawingImage
+ {
+ protected override void OnDraw (Context ctx, Rectangle bounds)
+ {
+ var lineWidth = bounds.Width / 32d;
+ var section = ((bounds.Width / 2) - lineWidth / 2) / 3;
+
+ ctx.SetLineWidth (lineWidth);
+
+ ctx.SetColor (Colors.Black);
+ ctx.Arc (bounds.Center.X, bounds.Center.Y, 1, 0, 360);
+ ctx.Stroke ();
+
+ ctx.SetColor (Colors.Red);
+ ctx.Arc (bounds.Center.X, bounds.Center.Y, section, 0, 360);
+ ctx.Stroke ();
+
+ ctx.SetColor (Colors.Green);
+ ctx.Arc (bounds.Center.X, bounds.Center.Y, section * 2, 0, 360);
+ ctx.Stroke ();
+
+ ctx.SetColor (Colors.Blue);
+ ctx.Arc (bounds.Center.X, bounds.Center.Y, section * 3, 0, 360);
+ ctx.Stroke ();
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/Images.cs b/external/xwt/Samples/Samples/Images.cs
index ad86696..55c78f4 100644
--- a/external/xwt/Samples/Samples/Images.cs
+++ b/external/xwt/Samples/Samples/Images.cs
@@ -54,12 +54,12 @@ namespace Samples
var vbox = new VBox ();
- var stockId = (string)stockIcons [i].GetValue (null);
+ var stockImage = (Image)stockIcons [i].GetValue (null);
var imageView = new ImageView ();
- var label = new Label (stockId);
+ var label = new Label (stockIcons [i].Name);
try {
- var icon = Image.FromIcon (stockId, IconSize.Medium);
+ var icon = stockImage.WithSize (IconSize.Medium);
if (icon != null)
imageView.Image = icon;
} catch { }
diff --git a/external/xwt/Samples/Samples/Labels.cs b/external/xwt/Samples/Samples/Labels.cs
index d4da15c..9d37d00 100644
--- a/external/xwt/Samples/Samples/Labels.cs
+++ b/external/xwt/Samples/Samples/Labels.cs
@@ -55,6 +55,9 @@ namespace Samples
TextColor = new Xwt.Drawing.Color (0, 0, 1)
};
PackStart (la);
+
+ la = new Label () { Markup = "Label with <b>bold</b> and <span color='#ff0000'>red</span> text" };
+ PackStart (la);
}
}
}
diff --git a/external/xwt/Samples/Samples/ListBoxSample.cs b/external/xwt/Samples/Samples/ListBoxSample.cs
index 18df4f8..34e230d 100644
--- a/external/xwt/Samples/Samples/ListBoxSample.cs
+++ b/external/xwt/Samples/Samples/ListBoxSample.cs
@@ -43,7 +43,7 @@ namespace Samples
for (int n=0; n<100; n++)
list.Items.Add ("Value " + n);
- PackStart (list, BoxMode.FillAndExpand);
+ PackStart (list, true);
// Custom list box
@@ -60,7 +60,7 @@ namespace Samples
store.SetValue (r, icon, png);
store.SetValue (r, name, "Value " + n);
}
- PackStart (customList, BoxMode.FillAndExpand);
+ PackStart (customList, true);
}
}
}
diff --git a/external/xwt/Samples/Samples/ListView1.cs b/external/xwt/Samples/Samples/ListView1.cs
index 0354559..3fd812b 100644
--- a/external/xwt/Samples/Samples/ListView1.cs
+++ b/external/xwt/Samples/Samples/ListView1.cs
@@ -10,19 +10,21 @@ namespace Samples
DataField<Image> icon = new DataField<Image> ();
DataField<string> text = new DataField<string> ();
DataField<Image> icon2 = new DataField<Image> ();
-
+ DataField<int> progress = new DataField<int> ();
+
public ListView1 ()
{
PackStart (new Label ("The listview should have a red background"));
- ListView list = new ListView () {
- BackgroundColor = Colors.Red
- };
- ListStore store = new ListStore (name, icon, text, icon2);
+ ListView list = new ListView ();
+ ListStore store = new ListStore (name, icon, text, icon2, progress);
list.DataSource = store;
list.Columns.Add ("Name", icon, name);
list.Columns.Add ("Text", icon2, text);
-
+ list.Columns.Add ("Progress", new CustomCell () { ValueField = progress });
+
var png = Image.FromResource (typeof(App), "class.png");
+
+ Random rand = new Random ();
for (int n=0; n<100; n++) {
var r = store.AddRow ();
@@ -30,8 +32,37 @@ namespace Samples
store.SetValue (r, name, "Value " + n);
store.SetValue (r, icon2, png);
store.SetValue (r, text, "Text " + n);
+ store.SetValue (r, progress, rand.Next () % 100);
}
- PackStart (list, BoxMode.FillAndExpand);
+ PackStart (list, true);
+
+ list.RowActivated += delegate(object sender, ListViewRowEventArgs e) {
+ MessageDialog.ShowMessage ("Row " + e.RowIndex + " activated");
+ };
+ }
+ }
+
+ class CustomCell: CanvasCellView
+ {
+ public IDataField<int> ValueField { get; set; }
+
+ protected override Size OnGetRequiredSize ()
+ {
+ return new Size (200, 10);
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle cellArea)
+ {
+ var pct = GetValue (ValueField);
+ var size = (cellArea.Width * pct) / 100f;
+ cellArea.Width = (int) size;
+
+ ctx.SetLineWidth (1);
+ ctx.Rectangle (cellArea.Inflate (-0.5, -0.5));
+ ctx.SetColor (Colors.LightBlue);
+ ctx.FillPreserve ();
+ ctx.SetColor (Colors.Gray);
+ ctx.Stroke ();
}
}
}
diff --git a/external/xwt/Samples/Samples/ListView2.cs b/external/xwt/Samples/Samples/ListView2.cs
new file mode 100644
index 0000000..272269d
--- /dev/null
+++ b/external/xwt/Samples/Samples/ListView2.cs
@@ -0,0 +1,37 @@
+using System;
+using Xwt;
+using Xwt.Drawing;
+
+namespace Samples
+{
+ public class ListView2: VBox
+ {
+ DataField<bool> editable;
+ DataField<bool> nonEditable;
+
+ public ListView2 ()
+ {
+ ListView list = new ListView ();
+ editable = new DataField<bool> ();
+ nonEditable = new DataField<bool> ();
+ var textField = new DataField<string> ();
+ ListStore store = new ListStore (editable, nonEditable, textField);
+ list.DataSource = store;
+
+ list.Columns.Add (new ListViewColumn("Editable", new CheckBoxCellView { Editable = true, ActiveField = editable }));
+ list.Columns.Add (new ListViewColumn("Not Editable", new CheckBoxCellView { Editable = false, ActiveField = nonEditable }));
+ list.Columns.Add (new ListViewColumn("Editable", new TextCellView { Editable = true, TextField = textField }));
+
+ Random rand = new Random ();
+
+ for (int n=0; n<100; n++) {
+ var r = store.AddRow ();
+ store.SetValue (r, editable, rand.Next(0, 2) == 0);
+ store.SetValue (r, nonEditable, rand.Next(0, 2) == 0);
+ store.SetValue (r, textField, n.ToString ());
+ }
+ PackStart (list, true);
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/Markdown.cs b/external/xwt/Samples/Samples/Markdown.cs
index 32cb43f..40e131e 100644
--- a/external/xwt/Samples/Samples/Markdown.cs
+++ b/external/xwt/Samples/Samples/Markdown.cs
@@ -159,8 +159,8 @@ Features:
}
};
- PackStart (button, BoxMode.FillAndExpand);
- PackStart (scrolled, BoxMode.FillAndExpand);
+ PackStart (button, true);
+ PackStart (scrolled, true);
}
}
}
\ No newline at end of file
diff --git a/external/xwt/Samples/Samples/NotebookSample.cs b/external/xwt/Samples/Samples/NotebookSample.cs
index ad4df36..6d5be8a 100644
--- a/external/xwt/Samples/Samples/NotebookSample.cs
+++ b/external/xwt/Samples/Samples/NotebookSample.cs
@@ -12,7 +12,7 @@ namespace Samples
nb.Add (new Label ("First tab content"), "First Tab");
nb.Add (new MyWidget (), "Second Tab");
nb.TabOrientation = NotebookTabOrientation.Bottom;
- PackStart (nb, BoxMode.FillAndExpand);
+ PackStart (nb, true);
}
}
diff --git a/external/xwt/Samples/Samples/OpacitySample.cs b/external/xwt/Samples/Samples/OpacitySample.cs
new file mode 100644
index 0000000..b1499df
--- /dev/null
+++ b/external/xwt/Samples/Samples/OpacitySample.cs
@@ -0,0 +1,73 @@
+//
+// OpacitySample.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class OpacitySample: VBox
+ {
+ public OpacitySample ()
+ {
+ bool transparent = false;
+
+ Button b = new Button ("Toggle Widget Opacity");
+ if (!Toolkit.CurrentEngine.SupportedFeatures.HasFlag (ToolkitFeatures.WidgetOpacity)) {
+ b.Label += ": Not supported";
+ b.Sensitive = false;
+ }
+ b.Clicked += delegate {
+ if (transparent) {
+ b.Opacity = 1;
+ }
+ else {
+ b.Opacity = 0.5;
+ }
+ transparent = !transparent;
+ };
+ PackStart (b);
+
+ bool winTransparent = false;
+
+ Button bw = new Button ("Toggle Window Opacity");
+ if (!Toolkit.CurrentEngine.SupportedFeatures.HasFlag (ToolkitFeatures.WindowOpacity)) {
+ bw.Label += ": Not supported";
+ bw.Sensitive = false;
+ }
+ bw.Clicked += delegate {
+ if (winTransparent) {
+ ParentWindow.Opacity = 1;
+ }
+ else {
+ ParentWindow.Opacity = 0.5;
+ }
+ winTransparent = !winTransparent;
+ };
+ PackStart (bw);
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/PartialImages.cs b/external/xwt/Samples/Samples/PartialImages.cs
index 11f656b..8af5bd8 100644
--- a/external/xwt/Samples/Samples/PartialImages.cs
+++ b/external/xwt/Samples/Samples/PartialImages.cs
@@ -34,7 +34,7 @@ namespace Samples
public PartialImages ()
{
PartialImageCanvas canvas = new PartialImageCanvas ();
- PackStart (canvas, BoxMode.FillAndExpand);
+ PackStart (canvas, true);
}
}
diff --git a/external/xwt/Samples/Samples/PopoverSample.cs b/external/xwt/Samples/Samples/PopoverSample.cs
index 91e8b2c..0d99c15 100644
--- a/external/xwt/Samples/Samples/PopoverSample.cs
+++ b/external/xwt/Samples/Samples/PopoverSample.cs
@@ -46,23 +46,23 @@ namespace Samples
var table = new Table () { DefaultColumnSpacing = 20, DefaultRowSpacing = 10 };
// table.Margin.SetAll (60);
- table.Attach (new Label ("Font") { TextAlignment = Alignment.End }, 0, 0);
- table.Attach (new ComboBox (), 1, 0, AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand);
+ table.Add (new Label ("Font") { TextAlignment = Alignment.End }, 0, 0);
+ table.Add (new ComboBox (), 1, 0, vexpand:true);
- table.Attach (new Label ("Family") { TextAlignment = Alignment.End }, 0, 1);
- table.Attach (new ComboBox (), 1, 1, AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand);
+ table.Add (new Label ("Family") { TextAlignment = Alignment.End }, 0, 1);
+ table.Add (new ComboBox (), 1, 1, vexpand:true);
- table.Attach (new Label ("Style") { TextAlignment = Alignment.End }, 0, 2);
- table.Attach (new ComboBox (), 1, 2, AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand);
+ table.Add (new Label ("Style") { TextAlignment = Alignment.End }, 0, 2);
+ table.Add (new ComboBox (), 1, 2, vexpand:true);
- table.Attach (new Label ("Size") { TextAlignment = Alignment.End }, 0, 3);
- table.Attach (new SpinButton (), 1, 3, AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand);
+ table.Add (new Label ("Size") { TextAlignment = Alignment.End }, 0, 3);
+ table.Add (new SpinButton (), 1, 3, vexpand:true);
var b = new Button ("Add more");
- table.Attach (b, 0, 4);
+ table.Add (b, 0, 4);
int next = 5;
b.Clicked += delegate {
- table.Attach (new Label ("Row " + next), 0, next++);
+ table.Add (new Label ("Row " + next), 0, next++);
};
table.Margin = 20;
diff --git a/external/xwt/Samples/Samples/ProgressBarSample.cs b/external/xwt/Samples/Samples/ProgressBarSample.cs
index 4c3bff1..c6594d3 100644
--- a/external/xwt/Samples/Samples/ProgressBarSample.cs
+++ b/external/xwt/Samples/Samples/ProgressBarSample.cs
@@ -40,13 +40,13 @@ namespace Samples
public ProgressBarSample ()
{
indeterminateProgressBar = new ProgressBar ();
- PackStart (indeterminateProgressBar, BoxMode.FillAndExpand);
+ PackStart (indeterminateProgressBar, true);
indeterminateProgressBar.Indeterminate = true;
timer.Elapsed += Increase;
determinateProgressBar = new ProgressBar ();
determinateProgressBar.Fraction = 0.0;
- PackStart(determinateProgressBar, BoxMode.FillAndExpand);
+ PackStart(determinateProgressBar, true);
timer.Start ();
var spinner = new Spinner ();
diff --git a/external/xwt/Samples/Samples/RadioButtonSample.cs b/external/xwt/Samples/Samples/RadioButtonSample.cs
new file mode 100644
index 0000000..32cc6a2
--- /dev/null
+++ b/external/xwt/Samples/Samples/RadioButtonSample.cs
@@ -0,0 +1,65 @@
+//
+// R.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class RadioButtonSample: VBox
+ {
+ public RadioButtonSample ()
+ {
+ var b1 = new RadioButton ("Item 1");
+ var b2 = new RadioButton ("Item 2");
+ var b3 = new RadioButton ("Item 3");
+ b2.Group = b3.Group = b1.Group;
+ PackStart (b1);
+ PackStart (b2);
+ PackStart (b3);
+
+ var la = new Label ();
+ la.Hide ();
+ b1.Group.ActiveRadioButtonChanged += delegate {
+ la.Show ();
+ la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
+ };
+ PackStart (la);
+
+ PackStart (new HSeparator ());
+
+ var box = new VBox ();
+ box.PackStart (new Label ("First Option"));
+ box.PackStart (new Label ("Second line"));
+
+ var b4 = new RadioButton (box);
+ var b5 = new RadioButton ("Second Option");
+ PackStart (b4);
+ PackStart (b5);
+ b4.Group = b5.Group;
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/ReliefFrameSample.cs b/external/xwt/Samples/Samples/ReliefFrameSample.cs
deleted file mode 100644
index 2ee9a41..0000000
--- a/external/xwt/Samples/Samples/ReliefFrameSample.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Xwt;
-
-namespace Samples
-{
- class ReliefFrameSample : VBox
- {
- public ReliefFrameSample ()
- {
- var box = new VBox ();
- box.PackStart (new ReliefFrame (new Button ("Hello")));
- box.PackStart (new ReliefFrame (new Button ("World")));
- PackStart (box);
- }
- }
-}
diff --git a/external/xwt/Samples/Samples/ScreensSample.cs b/external/xwt/Samples/Samples/ScreensSample.cs
new file mode 100644
index 0000000..c11c615
--- /dev/null
+++ b/external/xwt/Samples/Samples/ScreensSample.cs
@@ -0,0 +1,129 @@
+//
+// ScreensSample.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+using Xwt.Drawing;
+
+namespace Samples
+{
+ public class ScreensSample: VBox
+ {
+ public ScreensSample ()
+ {
+ Label la = new Label (Desktop.Screens.Count + " screens found");
+ PackStart (la);
+
+ var c = new ScreensCanvas ();
+ c.Margin = 30;
+ PackStart (c, true);
+ }
+ }
+
+ class ScreensCanvas: Canvas
+ {
+ bool pset;
+
+ public ScreensCanvas ()
+ {
+ Desktop.ScreensChanged += HandleScreensChanged;
+ }
+
+ void HandleScreensChanged (object sender, EventArgs e)
+ {
+ QueueDraw ();
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+ if (disposing)
+ Desktop.ScreensChanged -= HandleScreensChanged;
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle dirtyRect)
+ {
+ base.OnDraw (ctx, dirtyRect);
+
+ if (!pset) {
+ ParentWindow.BoundsChanged += delegate {
+ QueueDraw ();
+ };
+ pset = true;
+ }
+
+ ctx.Rectangle (Bounds);
+ ctx.SetColor (Colors.LightGray);
+ ctx.Fill ();
+
+ var size = Size;
+ size.Width--;
+ size.Height--;
+ var fx = size.Width / Desktop.Bounds.Width;
+
+ if (Desktop.Bounds.Height * fx > size.Height)
+ fx = size.Height / Desktop.Bounds.Height;
+
+ if (Desktop.Bounds.X < 0)
+ ctx.Translate (-Desktop.Bounds.X * fx, 0);
+ if (Desktop.Bounds.Y < 0)
+ ctx.Translate (0, -Desktop.Bounds.Y * fx);
+
+ ctx.SetLineWidth (1);
+ foreach (var s in Desktop.Screens) {
+ if (s.Bounds != s.VisibleBounds) {
+ var vr = new Rectangle ((int)(s.Bounds.X * fx), (int)(s.Bounds.Y * fx), (int)(s.Bounds.Width * fx), (int)(s.Bounds.Height * fx));
+ vr = vr.Offset (0.5, 0.5);
+ ctx.Rectangle (vr);
+ ctx.SetColor (Colors.White);
+ ctx.FillPreserve ();
+ ctx.SetColor (Colors.Black);
+ ctx.Stroke ();
+ }
+ var r = new Rectangle ((int)(s.VisibleBounds.X * fx), (int)(s.VisibleBounds.Y * fx), (int)(s.VisibleBounds.Width * fx), (int)(s.VisibleBounds.Height * fx));
+ r = r.Offset (0.5, 0.5);
+ ctx.Rectangle (r);
+ ctx.SetColor (new Color (0.4, 0.62, 0.83));
+ ctx.FillPreserve ();
+ ctx.SetColor (Colors.Black);
+ ctx.Stroke ();
+
+ TextLayout tl = new TextLayout (this);
+ tl.Text = s.DeviceName;
+ tl.Font = Font;
+ ctx.DrawTextLayout (tl, r.Center.X - tl.Width / 2, r.Center.Y - tl.Height / 2);
+ }
+
+ var wr = ParentWindow.ScreenBounds;
+ wr = new Rectangle ((int)(wr.X * fx), (int)(wr.Y * fx), (int)(wr.Width * fx), (int)(wr.Height * fx));
+ ctx.Rectangle (wr);
+ ctx.SetColor (Colors.Azure.WithAlpha (0.5));
+ ctx.FillPreserve ();
+ ctx.SetColor (Colors.Azure);
+ ctx.Stroke ();
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/ScrollWindowSample.cs b/external/xwt/Samples/Samples/ScrollWindowSample.cs
index 0d82af4..18a30ca 100644
--- a/external/xwt/Samples/Samples/ScrollWindowSample.cs
+++ b/external/xwt/Samples/Samples/ScrollWindowSample.cs
@@ -36,7 +36,7 @@ namespace Samples
ScrollView v1 = new ScrollView ();
VBox b1 = new VBox ();
for (int n=0; n<30; n++)
- b1.PackStart (new Label ("Line " + n), BoxMode.None);
+ b1.PackStart (new Label ("Line " + n));
Button u = new Button ("Click to remove");
u.Clicked += delegate {
b1.Remove (u);
@@ -46,30 +46,30 @@ namespace Samples
v1.Content = b1;
v1.VerticalScrollPolicy = ScrollPolicy.Always;
v1.BorderVisible = false;
- PackStart (v1, BoxMode.FillAndExpand);
+ PackStart (v1, fill:true, expand:true);
ScrollView v2 = new ScrollView ();
VBox b2 = new VBox ();
for (int n=0; n<10; n++)
- b2.PackStart (new Label ("Line " + n), BoxMode.None);
+ b2.PackStart (new Label ("Line " + n));
v2.Content = b2;
v2.VerticalScrollPolicy = ScrollPolicy.Never;
- PackStart (v2, BoxMode.FillAndExpand);
+ PackStart (v2, fill:true, expand:true);
ScrollView v3 = new ScrollView ();
VBox b3 = new VBox ();
Button b = new Button ("Click to add items");
b.Clicked += delegate {
for (int n=0; n<10; n++)
- b3.PackStart (new Label ("Line " + n), BoxMode.None);
+ b3.PackStart (new Label ("Line " + n));
};
b3.PackStart (b);
v3.Content = b3;
v3.VerticalScrollPolicy = ScrollPolicy.Automatic;
- PackStart (v3, BoxMode.FillAndExpand);
+ PackStart (v3, fill:true, expand:true);
ScrollView v4 = new ScrollView ();
- PackStart (v4, BoxMode.FillAndExpand);
+ PackStart (v4, fill:true, expand:true);
var sb = new ScrollableCanvas ();
v4.Content = sb;
v4.VerticalScrollPolicy = ScrollPolicy.Always;
@@ -133,6 +133,8 @@ namespace Samples
protected override void OnBoundsChanged ()
{
+ if (vscroll == null)
+ return;
vscroll.PageSize = vscroll.PageIncrement = Bounds.Height;
hscroll.PageSize = hscroll.PageIncrement = Bounds.Width;
}
diff --git a/external/xwt/Samples/Samples/ScrollbarSample.cs b/external/xwt/Samples/Samples/ScrollbarSample.cs
new file mode 100644
index 0000000..c475fe1
--- /dev/null
+++ b/external/xwt/Samples/Samples/ScrollbarSample.cs
@@ -0,0 +1,78 @@
+//
+// ScrollbarSample.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class ScrollbarSample: Xwt.Table
+ {
+ Canvas canvas;
+ Label label;
+ Scrollbar vscroll;
+ Scrollbar hscroll;
+
+ public ScrollbarSample ()
+ {
+ WidthRequest = 300;
+ HeightRequest = 300;
+
+ canvas = new Canvas ();
+ label = new Label ("Use the scrollbars\nto move this label");
+ canvas.AddChild (label);
+
+ Add (canvas, 0, 0, hexpand:true, vexpand:true);
+
+ vscroll = new VScrollbar () {
+ LowerValue = 0,
+ UpperValue = 300,
+ PageIncrement = 10,
+ PageSize = 50,
+ StepIncrement = 1
+ };
+ Add (vscroll, 1, 0, vexpand:true);
+
+ hscroll = new HScrollbar () {
+ LowerValue = 0,
+ UpperValue = 300,
+ PageIncrement = 10,
+ PageSize = 50,
+ StepIncrement = 1
+ };
+ Add (hscroll, 0, 1, hexpand:true);
+
+ vscroll.ValueChanged += HandleValueChanged;
+ hscroll.ValueChanged += HandleValueChanged;
+ }
+
+ void HandleValueChanged (object sender, EventArgs e)
+ {
+ var s = label.Surface.GetPreferredSize ();
+ canvas.SetChildBounds (label, new Rectangle (hscroll.Value, vscroll.Value, s.Width, s.Height));
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/SliderSample.cs b/external/xwt/Samples/Samples/SliderSample.cs
new file mode 100644
index 0000000..c1e5506
--- /dev/null
+++ b/external/xwt/Samples/Samples/SliderSample.cs
@@ -0,0 +1,40 @@
+//
+// SliderSample.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class SliderSample: VBox
+ {
+ public SliderSample ()
+ {
+ PackStart (new HSlider ());
+ PackStart (new VSlider (), true);
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/Tables.cs b/external/xwt/Samples/Samples/Tables.cs
index b70b2d8..4e1ea0c 100644
--- a/external/xwt/Samples/Samples/Tables.cs
+++ b/external/xwt/Samples/Samples/Tables.cs
@@ -35,39 +35,39 @@ namespace Samples
Table t = new Table ();
SimpleBox b = new SimpleBox (200, 20);
- t.Attach (b, 0, 1, 0, 1);
+ t.Add (b, 0, 0);
b = new SimpleBox (5, 20);
- t.Attach (b, 1, 2, 0, 1);
+ t.Add (b, 1, 0);
b = new SimpleBox (250, 20);
- t.Attach (b, 0, 2, 1, 2, AttachOptions.Expand, AttachOptions.Expand);
+ t.Add (b, 0, 1, colspan:2, hexpand:true, vexpand:true);
b = new SimpleBox (300, 20);
- t.Attach (b, 1, 3, 2, 3);
+ t.Add (b, 1, 2, colspan:2);
b = new SimpleBox (100, 20);
- t.Attach (b, 2, 3, 3, 4);
+ t.Add (b, 2, 3);
b = new SimpleBox (450, 20);
- t.Attach (b, 0, 3, 4, 5);
+ t.Add (b, 0, 4, colspan:3);
PackStart (t);
HBox box = new HBox ();
PackStart (box);
t = new Table ();
- t.Attach (new Label ("One:"), 0, 1, 0, 1);
- t.Attach (new TextEntry (), 1, 2, 0, 1);
- t.Attach (new Label ("Two:"), 0, 1, 1, 2);
- t.Attach (new TextEntry (), 1, 2, 1, 2);
- t.Attach (new Label ("Three:"), 0, 1, 2, 3);
- t.Attach (new TextEntry (), 1, 2, 2, 3);
+ t.Add (new Label ("One:"), 0, 0);
+ t.Add (new TextEntry (), 1, 0);
+ t.Add (new Label ("Two:"), 0, 1);
+ t.Add (new TextEntry (), 1, 1);
+ t.Add (new Label ("Three:"), 0, 2);
+ t.Add (new TextEntry (), 1, 2);
t.InsertRow (1, 2);
- t.Attach (new Label ("One-and-a-half"), 0, 1, 1, 2);
- t.Attach (new TextEntry () { PlaceholderText = "Just inserted" }, 1, 2, 1, 2);
+ t.Add (new Label ("One-and-a-half"), 0, 1);
+ t.Add (new TextEntry () { PlaceholderText = "Just inserted" }, 1, 1);
t.InsertRow (1, 2);
- t.Attach (new SimpleBox (300, 20), 0, 2, 1, 2);
+ t.Add (new SimpleBox (300, 20), 0, 1, colspan:2);
box.PackStart (t);
}
}
diff --git a/external/xwt/Samples/Samples/TextEntries.cs b/external/xwt/Samples/Samples/TextEntries.cs
index 03e77f8..5f10b52 100644
--- a/external/xwt/Samples/Samples/TextEntries.cs
+++ b/external/xwt/Samples/Samples/TextEntries.cs
@@ -55,6 +55,11 @@ namespace Samples
TextEntry te4 = new TextEntry();
te4.ShowFrame = false;
PackStart (te4);
+
+ TextEntry te5 = new TextEntry ();
+ te5.Text = "I should be centered!";
+ te5.TextAlignment = Alignment.Center;
+ PackStart (te5);
}
}
}
diff --git a/external/xwt/Samples/Samples/TreeViews.cs b/external/xwt/Samples/Samples/TreeViews.cs
index 03ae298..1f181ac 100644
--- a/external/xwt/Samples/Samples/TreeViews.cs
+++ b/external/xwt/Samples/Samples/TreeViews.cs
@@ -46,7 +46,7 @@ namespace Samples
.SetValue (text, "Sub two").SetValue (desc, "Sub second");
store.AddNode ().SetValue (text, "Three").SetValue (desc, "Third").AddChild ()
.SetValue (text, "Sub three").SetValue (desc, "Sub third");
- PackStart (view);
+ PackStart (view, true);
view.DataSource = store;
@@ -94,6 +94,11 @@ namespace Samples
}
};
PackStart (removeButton);
+
+ var label = new Label ();
+ PackStart (label);
+
+ view.RowExpanded += (sender, e) => label.Text = "Row expanded: " + store.GetNavigatorAt (e.Position).GetValue (text);
}
void HandleDragOver (object sender, DragOverEventArgs e)
diff --git a/external/xwt/Samples/Samples/WidgetRendering.cs b/external/xwt/Samples/Samples/WidgetRendering.cs
new file mode 100644
index 0000000..7c99888
--- /dev/null
+++ b/external/xwt/Samples/Samples/WidgetRendering.cs
@@ -0,0 +1,47 @@
+//
+// WidgetRendering.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Samples
+{
+ public class WidgetRendering: VBox
+ {
+ public WidgetRendering ()
+ {
+ VBox box = new VBox ();
+ Button b = new Button ("Click here to take a shot if this box");
+ box.PackStart (b);
+ box.PackStart (new CheckBox ("Test checkbox"));
+ PackStart (box);
+ b.Clicked += delegate {
+ var img = Toolkit.CurrentEngine.RenderWidget (box);
+ PackStart (new ImageView (img));
+ };
+ }
+ }
+}
+
diff --git a/external/xwt/Samples/Samples/Windows.cs b/external/xwt/Samples/Samples/Windows.cs
index ac14aea..748183f 100644
--- a/external/xwt/Samples/Samples/Windows.cs
+++ b/external/xwt/Samples/Samples/Windows.cs
@@ -59,10 +59,10 @@ namespace Samples
Dialog d = new Dialog ();
d.Title = "This is a dialog";
Table t = new Table ();
- t.Attach (new Label ("Some field:"), 0, 1, 0, 1);
- t.Attach (new TextEntry (), 1, 2, 0, 1);
- t.Attach (new Label ("Another field:"), 0, 1, 1, 2);
- t.Attach (new TextEntry (), 1, 2, 1, 2);
+ t.Add (new Label ("Some field:"), 0, 0);
+ t.Add (new TextEntry (), 1, 0);
+ t.Add (new Label ("Another field:"), 0, 1);
+ t.Add (new TextEntry (), 1, 1);
d.Content = t;
Command custom = new Command ("Custom");
@@ -117,7 +117,17 @@ namespace Samples
if (dlg.Run ())
MessageDialog.ShowMessage ("Folders have been selected!", string.Join ("\n", dlg.Folders));
};
-
+
+ b = new Button ("Show Select Folder dialog (Single select, allow creation)");
+ PackStart (b);
+ b.Clicked += delegate {
+ SelectFolderDialog dlg = new SelectFolderDialog ("Select or create a folder");
+ dlg.Multiselect = false;
+ dlg.CanCreateFolders = true;
+ if (dlg.Run ())
+ MessageDialog.ShowMessage ("Folders have been selected/created!", string.Join ("\n", dlg.Folders));
+ };
+
b = new Button ("Show Select Color dialog");
PackStart (b);
b.Clicked += delegate {
diff --git a/external/xwt/Samples/document-generic.png b/external/xwt/Samples/document-generic.png
new file mode 100644
index 0000000..bc6abe9
Binary files /dev/null and b/external/xwt/Samples/document-generic.png differ
diff --git a/external/xwt/Samples/document-generic at 2x.png b/external/xwt/Samples/document-generic at 2x.png
new file mode 100644
index 0000000..67448d6
Binary files /dev/null and b/external/xwt/Samples/document-generic at 2x.png differ
diff --git a/external/xwt/Test/ButtonTests.cs b/external/xwt/Test/ButtonTests.cs
new file mode 100644
index 0000000..fa8bedf
--- /dev/null
+++ b/external/xwt/Test/ButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// ButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Button ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/CanvasTests.cs b/external/xwt/Test/CanvasTests.cs
new file mode 100644
index 0000000..8044e16
--- /dev/null
+++ b/external/xwt/Test/CanvasTests.cs
@@ -0,0 +1,38 @@
+//
+// CanvasTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class CanvasTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Canvas ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/CheckBoxTests.cs b/external/xwt/Test/CheckBoxTests.cs
new file mode 100644
index 0000000..b79361a
--- /dev/null
+++ b/external/xwt/Test/CheckBoxTests.cs
@@ -0,0 +1,38 @@
+//
+// CheckBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class CheckBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new CheckBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ComboBoxEntryTests.cs b/external/xwt/Test/ComboBoxEntryTests.cs
new file mode 100644
index 0000000..870832e
--- /dev/null
+++ b/external/xwt/Test/ComboBoxEntryTests.cs
@@ -0,0 +1,40 @@
+//
+// ComboBoxEntryTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ [Ignore]
+ public class ComboBoxEntryTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ComboBoxEntry ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ComboBoxTests.cs b/external/xwt/Test/ComboBoxTests.cs
new file mode 100644
index 0000000..cf39f4b
--- /dev/null
+++ b/external/xwt/Test/ComboBoxTests.cs
@@ -0,0 +1,39 @@
+//
+// ComboBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class ComboBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ComboBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/FrameTests.cs b/external/xwt/Test/FrameTests.cs
new file mode 100644
index 0000000..b3c6248
--- /dev/null
+++ b/external/xwt/Test/FrameTests.cs
@@ -0,0 +1,39 @@
+//
+// FrameTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class FrameTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Frame ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/HBoxTests.cs b/external/xwt/Test/HBoxTests.cs
new file mode 100644
index 0000000..cd5f3bf
--- /dev/null
+++ b/external/xwt/Test/HBoxTests.cs
@@ -0,0 +1,38 @@
+//
+// HBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new HBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/HPanedTests.cs b/external/xwt/Test/HPanedTests.cs
new file mode 100644
index 0000000..ceeba9d
--- /dev/null
+++ b/external/xwt/Test/HPanedTests.cs
@@ -0,0 +1,38 @@
+//
+// HPanedTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HPanedTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new HPaned ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/HSeparatorTests.cs b/external/xwt/Test/HSeparatorTests.cs
new file mode 100644
index 0000000..34717a1
--- /dev/null
+++ b/external/xwt/Test/HSeparatorTests.cs
@@ -0,0 +1,38 @@
+//
+// HSeparator.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HSeparatorTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new HSeparator ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ImageViewTests.cs b/external/xwt/Test/ImageViewTests.cs
new file mode 100644
index 0000000..6f1a6b8
--- /dev/null
+++ b/external/xwt/Test/ImageViewTests.cs
@@ -0,0 +1,38 @@
+//
+// ImageViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ImageViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ImageView ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/LabelTests.cs b/external/xwt/Test/LabelTests.cs
new file mode 100644
index 0000000..c368eb6
--- /dev/null
+++ b/external/xwt/Test/LabelTests.cs
@@ -0,0 +1,38 @@
+//
+// LabelTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class LabelTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Label ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ListBoxTests.cs b/external/xwt/Test/ListBoxTests.cs
new file mode 100644
index 0000000..0146dac
--- /dev/null
+++ b/external/xwt/Test/ListBoxTests.cs
@@ -0,0 +1,38 @@
+//
+// ListBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ListBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ListBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ListViewTests.cs b/external/xwt/Test/ListViewTests.cs
new file mode 100644
index 0000000..4fbce9c
--- /dev/null
+++ b/external/xwt/Test/ListViewTests.cs
@@ -0,0 +1,38 @@
+//
+// ListViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ListViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ListView ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/NotebookTests.cs b/external/xwt/Test/NotebookTests.cs
new file mode 100644
index 0000000..2da4b25
--- /dev/null
+++ b/external/xwt/Test/NotebookTests.cs
@@ -0,0 +1,38 @@
+//
+// NotebookTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class NotebookTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Notebook ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ProgressBarTests.cs b/external/xwt/Test/ProgressBarTests.cs
new file mode 100644
index 0000000..d7b33c5
--- /dev/null
+++ b/external/xwt/Test/ProgressBarTests.cs
@@ -0,0 +1,38 @@
+//
+// ProgressBarTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ProgressBarTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ProgressBar ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/ScrollViewTests.cs b/external/xwt/Test/ScrollViewTests.cs
new file mode 100644
index 0000000..db418be
--- /dev/null
+++ b/external/xwt/Test/ScrollViewTests.cs
@@ -0,0 +1,38 @@
+//
+// ScrollViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ScrollViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ScrollView ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/Setup.cs b/external/xwt/Test/Setup.cs
new file mode 100644
index 0000000..7271c92
--- /dev/null
+++ b/external/xwt/Test/Setup.cs
@@ -0,0 +1,46 @@
+//
+// Setup.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ [SetUpFixture]
+ public class Setup
+ {
+ [SetUp]
+ public void SetUp ()
+ {
+ Xwt.Application.Initialize ("Xwt.GtkBackend.GtkEngine, Xwt.Gtk, Version=1.0.0.0");
+ }
+
+ [TearDown]
+ public void Cleanup ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Test/SpinButtonTests.cs b/external/xwt/Test/SpinButtonTests.cs
new file mode 100644
index 0000000..498563b
--- /dev/null
+++ b/external/xwt/Test/SpinButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// SpinButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class SpinButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new SpinButton ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/TableTests.cs b/external/xwt/Test/TableTests.cs
new file mode 100644
index 0000000..d489d76
--- /dev/null
+++ b/external/xwt/Test/TableTests.cs
@@ -0,0 +1,38 @@
+//
+// TableTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class TableTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Table ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/Test.csproj b/external/xwt/Test/Test.csproj
new file mode 100644
index 0000000..dd47c99
--- /dev/null
+++ b/external/xwt/Test/Test.csproj
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3C7623A9-9E16-41F6-BBB2-0B550F28E749}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Test</RootNamespace>
+ <AssemblyName>Test</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework">
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ButtonTests.cs" />
+ <Compile Include="WidgetTests.cs" />
+ <Compile Include="Setup.cs" />
+ <Compile Include="TextEntryTests.cs" />
+ <Compile Include="HBoxTests.cs" />
+ <Compile Include="VBoxTests.cs" />
+ <Compile Include="CanvasTests.cs" />
+ <Compile Include="CheckBoxTests.cs" />
+ <Compile Include="ComboBoxTests.cs" />
+ <Compile Include="ComboBoxEntryTests.cs" />
+ <Compile Include="FrameTests.cs" />
+ <Compile Include="HPanedTests.cs" />
+ <Compile Include="VPanedTests.cs" />
+ <Compile Include="HSeparatorTests.cs" />
+ <Compile Include="ImageViewTests.cs" />
+ <Compile Include="LabelTests.cs" />
+ <Compile Include="ListBoxTests.cs" />
+ <Compile Include="ListViewTests.cs" />
+ <Compile Include="NotebookTests.cs" />
+ <Compile Include="ProgressBarTests.cs" />
+ <Compile Include="ScrollViewTests.cs" />
+ <Compile Include="SpinButtonTests.cs" />
+ <Compile Include="TableTests.cs" />
+ <Compile Include="VSeparatorTests.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Gtk\Xwt.Gtk.csproj">
+ <Project>{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}</Project>
+ <Name>Xwt.Gtk</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Test/TextEntryTests.cs b/external/xwt/Test/TextEntryTests.cs
new file mode 100644
index 0000000..310f9b0
--- /dev/null
+++ b/external/xwt/Test/TextEntryTests.cs
@@ -0,0 +1,38 @@
+//
+// TextEntryTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class TextEntryTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new TextEntry ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/VBoxTests.cs b/external/xwt/Test/VBoxTests.cs
new file mode 100644
index 0000000..5533aea
--- /dev/null
+++ b/external/xwt/Test/VBoxTests.cs
@@ -0,0 +1,38 @@
+//
+// VBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class VBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new VBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/VPanedTests.cs b/external/xwt/Test/VPanedTests.cs
new file mode 100644
index 0000000..bb5e566
--- /dev/null
+++ b/external/xwt/Test/VPanedTests.cs
@@ -0,0 +1,38 @@
+//
+// VPanedTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class VPanedTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new VPaned ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/VSeparatorTests.cs b/external/xwt/Test/VSeparatorTests.cs
new file mode 100644
index 0000000..44563c8
--- /dev/null
+++ b/external/xwt/Test/VSeparatorTests.cs
@@ -0,0 +1,38 @@
+//
+// VSeparatorTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class VSeparatorTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new VSeparator ();
+ }
+ }
+}
+
diff --git a/external/xwt/Test/WidgetTests.cs b/external/xwt/Test/WidgetTests.cs
new file mode 100644
index 0000000..f2ff091
--- /dev/null
+++ b/external/xwt/Test/WidgetTests.cs
@@ -0,0 +1,239 @@
+//
+// Widget.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ [TestFixture]
+ public abstract class WidgetTests
+ {
+ public abstract Widget CreateWidget ();
+
+ [TestFixtureSetUp]
+ public void Init ()
+ {
+ }
+
+ [TestFixtureTearDown]
+ public void Cleanup ()
+ {
+ }
+
+ public void Run (Action a)
+ {
+ Exception ex = null;
+ Application.Invoke (delegate {
+ try {
+ a ();
+ } catch (Exception e) {
+ ex = e;
+ }
+ Application.Exit ();
+ });
+ Application.Run ();
+ if (ex != null)
+ throw new Exception ("Exception in gui event loop", ex);
+ }
+
+ [Test]
+ public void Visibility ()
+ {
+ var w = CreateWidget ();
+ Assert.IsTrue (w.Visible, "Not visible by default");
+ w.Hide ();
+ Assert.IsFalse (w.Visible);
+ w.Show ();
+ Assert.IsTrue (w.Visible);
+ w.Visible = false;
+ Assert.IsFalse (w.Visible);
+ w.Visible = true;
+ Assert.IsTrue (w.Visible);
+ }
+
+ [Test]
+ public void Sensitivity ()
+ {
+ var w = CreateWidget ();
+ Assert.IsTrue (w.Sensitive, "Not sensitive by default");
+ w.Sensitive = false;
+ Assert.IsFalse (w.Sensitive);
+ w.Sensitive = true;
+ Assert.IsTrue (w.Sensitive);
+ }
+
+ [Test]
+ public void ParentWindow ()
+ {
+ var w = CreateWidget ();
+ var win = new Window ();
+ win.Content = w;
+ Assert.AreSame (win, w.ParentWindow);
+ win.Dispose ();
+ }
+
+ [Test]
+ public void Margin ()
+ {
+ var w = CreateWidget ();
+ Assert.AreEqual (0, w.Margin.Left);
+ Assert.AreEqual (0, w.Margin.Top);
+ Assert.AreEqual (0, w.Margin.Right);
+ Assert.AreEqual (0, w.Margin.Bottom);
+ w.Margin.SetAll (4);
+ Assert.AreEqual (4, w.Margin.Left);
+ Assert.AreEqual (4, w.Margin.Top);
+ Assert.AreEqual (4, w.Margin.Right);
+ Assert.AreEqual (4, w.Margin.Bottom);
+ w.Margin.Set (10, 20, 30, 40);
+ Assert.AreEqual (10, w.Margin.Left);
+ Assert.AreEqual (20, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.Margin.Left = 1;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (20, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.Margin.Top = 2;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.Margin.Right = 3;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (3, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.Margin.Bottom = 4;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (3, w.Margin.Right);
+ Assert.AreEqual (4, w.Margin.Bottom);
+ }
+
+ [Test]
+ public void Focus ()
+ {
+ var win = new Window ();
+ var w = CreateWidget ();
+
+ Run (delegate {
+ HBox box = new HBox ();
+ TextEntry e = new TextEntry ();
+ box.PackStart (e);
+ box.PackStart (w);
+ win.Content = box;
+ win.Show ();
+ win.Present ();
+
+// for (int n=0; n < 500; n++) {
+ Application.DispatchPendingEvents ();
+// System.Threading.Thread.Sleep (10);
+// }
+
+ e.SetFocus ();
+
+ Application.DispatchPendingEvents ();
+
+ Assert.IsFalse (w.HasFocus);
+ // Assert.IsTrue (w.CanGetFocus);
+
+ int gotFocus = 0;
+ w.GotFocus += delegate {
+ gotFocus++;
+ };
+
+ w.SetFocus ();
+ Assert.IsTrue (w.HasFocus);
+ Assert.AreEqual (1, gotFocus);
+
+ int lostFocus = 0;
+ w.LostFocus += delegate {
+ lostFocus++;
+ };
+
+ e.SetFocus ();
+
+ Assert.IsFalse (w.HasFocus);
+ // Assert.AreEqual (1, lostFocus);
+
+ win.Dispose ();
+ });
+ }
+
+ [Test]
+ [Ignore]
+ public void MinSize ()
+ {
+ var win = new Window ();
+ var w = CreateWidget ();
+
+ win.Content = w;
+ win.Show ();
+
+ Application.DispatchPendingEvents ();
+
+ var defw = w.Size.Width;
+ var defh = w.Size.Height;
+
+ w.MinWidth = 300;
+ Assert.AreEqual (300, w.MinWidth);
+ Assert.AreEqual (300, w.Size.Width);
+
+ w.MinHeight = 400;
+ Assert.AreEqual (400, w.MinHeight);
+ Assert.AreEqual (400, w.Size.Height);
+
+ w.MinWidth = -1;
+ Assert.AreEqual (-1, w.MinWidth);
+ Assert.AreEqual (defw, w.Size.Width);
+
+ w.MinHeight = -1;
+ Assert.AreEqual (-1, w.MinHeight);
+ Assert.AreEqual (defh, w.Size.Height);
+
+ win.Dispose ();
+ }
+
+ [Test]
+ [Ignore]
+ public void Coordinates ()
+ {
+ var win = new Window ();
+ var w = CreateWidget ();
+ win.Content = w;
+ win.Show ();
+
+ Application.DispatchPendingEvents ();
+
+ Assert.AreEqual (w.ScreenBounds, win.ScreenBounds);
+
+ win.Dispose ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/GtkTestRunner.csproj b/external/xwt/Testing/GtkTestRunner.csproj
new file mode 100644
index 0000000..ecc15fe
--- /dev/null
+++ b/external/xwt/Testing/GtkTestRunner.csproj
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{BC764278-4141-483C-8643-2EA8C40373B2}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>GtkTestRunner</RootNamespace>
+ <AssemblyName>GtkTestRunner</AssemblyName>
+ <TestRunnerCommand>bin\GtkTestRunner.exe</TestRunnerCommand>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>True</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.core">
+ <HintPath>libs\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces">
+ <HintPath>libs\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework">
+ <HintPath>libs\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit-console-runner">
+ <HintPath>libs\nunit-console-runner.dll</HintPath>
+ </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="nunit.util">
+ <HintPath>libs\nunit.util.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GtkTestRunner\Main.cs" />
+ <Compile Include="GtkTestRunner\AssemblyInfo.cs" />
+ <Compile Include="Tests\**\*.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt.Gtk\Xwt.Gtk.csproj">
+ <Project>{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}</Project>
+ <Name>Xwt.Gtk</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Testing/GtkTestRunner/AssemblyInfo.cs b/external/xwt/Testing/GtkTestRunner/AssemblyInfo.cs
new file mode 100644
index 0000000..84aa5f7
--- /dev/null
+++ b/external/xwt/Testing/GtkTestRunner/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("GtkTestRunner")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Xamarin Inc.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/external/xwt/Testing/GtkTestRunner/Main.cs b/external/xwt/Testing/GtkTestRunner/Main.cs
new file mode 100644
index 0000000..27f5523
--- /dev/null
+++ b/external/xwt/Testing/GtkTestRunner/Main.cs
@@ -0,0 +1,48 @@
+//
+// Main.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace GtkTestRunner
+{
+ class MainClass
+ {
+ public static void Main (string[] args)
+ {
+ Xwt.Application.Initialize (Xwt.ToolkitType.Gtk);
+ ReferenceImageManager.Init ("GtkTestRunner");
+
+ var list = new List<string> (args);
+ list.Add ("-domain=None");
+ list.Add ("-noshadow");
+ list.Add ("-nothread");
+ NUnit.ConsoleRunner.Runner.Main (list.ToArray ());
+ ReferenceImageManager.ShowImageVerifier ();
+ }
+ }
+}
diff --git a/external/xwt/Testing/Info.plist b/external/xwt/Testing/Info.plist
new file mode 100644
index 0000000..0c67376
--- /dev/null
+++ b/external/xwt/Testing/Info.plist
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict/>
+</plist>
diff --git a/external/xwt/Testing/MacTestRunner.csproj b/external/xwt/Testing/MacTestRunner.csproj
new file mode 100644
index 0000000..4efe923
--- /dev/null
+++ b/external/xwt/Testing/MacTestRunner.csproj
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}</ProjectGuid>
+ <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>MacTestRunner</RootNamespace>
+ <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
+ <AssemblyName>MacTestRunner</AssemblyName>
+ <SuppressXamMacMigration>True</SuppressXamMacMigration>
+ <SuppressXamMacUpsell>True</SuppressXamMacUpsell>
+ <TestRunnerCommand>bin\MacTestRunner.app</TestRunnerCommand>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <IncludeMonoRuntime>False</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
+ <EnablePackageSigning>False</EnablePackageSigning>
+ <ConsolePause>False</ConsolePause>
+ <EnableCodeSigning>False</EnableCodeSigning>
+ <CreatePackage>False</CreatePackage>
+ <CodeSigningKey>Mac Developer</CodeSigningKey>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <IncludeMonoRuntime>True</IncludeMonoRuntime>
+ <UseSGen>False</UseSGen>
+ <LinkMode>Full</LinkMode>
+ <EnablePackageSigning>False</EnablePackageSigning>
+ <ConsolePause>False</ConsolePause>
+ <EnableCodeSigning>True</EnableCodeSigning>
+ <CreatePackage>True</CreatePackage>
+ <CodeSigningKey>Developer ID Application</CodeSigningKey>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <IncludeMonoRuntime>True</IncludeMonoRuntime>
+ <PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
+ <LinkMode>Full</LinkMode>
+ <UseSGen>False</UseSGen>
+ <EnableCodeSigning>True</EnableCodeSigning>
+ <ConsolePause>False</ConsolePause>
+ <EnablePackageSigning>True</EnablePackageSigning>
+ <CreatePackage>True</CreatePackage>
+ <CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="MonoMac" />
+ <Reference Include="nunit.core">
+ <HintPath>libs\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces">
+ <HintPath>libs\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework">
+ <HintPath>libs\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.util">
+ <HintPath>libs\nunit.util.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit-console-runner">
+ <HintPath>libs\nunit-console-runner.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MacTestRunner\Main.cs" />
+ <Compile Include="Tests\**\*.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="MacTestRunner\Info.plist" />
+ <None Include="Info.plist" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Mac\Xwt.Mac.csproj">
+ <Project>{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}</Project>
+ <Name>Xwt.Mac</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Policies>
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileName" />
+ </Policies>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
+ <ItemGroup>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\Arc.png">
+ <LogicalName>Arc.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcClosePath.png">
+ <LogicalName>ArcClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcFill.png">
+ <LogicalName>ArcFill.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcMultipleLoops.png">
+ <LogicalName>ArcMultipleLoops.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegative.png">
+ <LogicalName>ArcNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativeClosePath.png">
+ <LogicalName>ArcNegativeClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativeFill.png">
+ <LogicalName>ArcNegativeFill.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativeMultipleLoops.png">
+ <LogicalName>ArcNegativeMultipleLoops.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativePathConnection.png">
+ <LogicalName>ArcNegativePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativeStartingNegative.png">
+ <LogicalName>ArcNegativeStartingNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcNegativeSwappedAngles.png">
+ <LogicalName>ArcNegativeSwappedAngles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcPathConnection.png">
+ <LogicalName>ArcPathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcStartingNegative.png">
+ <LogicalName>ArcStartingNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ArcSwappedAngles.png">
+ <LogicalName>ArcSwappedAngles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\Curve.png">
+ <LogicalName>Curve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\CurveClosePath.png">
+ <LogicalName>CurveClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\CurveFillWithHoles.png">
+ <LogicalName>CurveFillWithHoles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\CurvePathConnection.png">
+ <LogicalName>CurvePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\DrawPathTwoTimes.png">
+ <LogicalName>DrawPathTwoTimes.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ImagePatternInCircle.png">
+ <LogicalName>ImagePatternInCircle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ImagePatternInTriangle.png">
+ <LogicalName>ImagePatternInTriangle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ImagePatternWithRotateTransform.png">
+ <LogicalName>ImagePatternWithRotateTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\ImagePatternWithScaleTransform.png">
+ <LogicalName>ImagePatternWithScaleTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\LinearGradient.png">
+ <LogicalName>LinearGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\LinearGradientDiagonal.png">
+ <LogicalName>LinearGradientDiagonal.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\LinearGradientInternalBox.png">
+ <LogicalName>LinearGradientInternalBox.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\LinearGradientReverse.png">
+ <LogicalName>LinearGradientReverse.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\LineClosePath.png">
+ <LogicalName>LineClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\NewPath.png">
+ <LogicalName>NewPath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\RadialGradient.png">
+ <LogicalName>RadialGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\RadialGradientReverse.png">
+ <LogicalName>RadialGradientReverse.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\RadialGradientSmall.png">
+ <LogicalName>RadialGradientSmall.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\Rectangle.png">
+ <LogicalName>Rectangle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\RectanglePathConnection.png">
+ <LogicalName>RectanglePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\StrokePreserve.png">
+ <LogicalName>StrokePreserve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\Text.png">
+ <LogicalName>Text.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\TextLineBreak.png">
+ <LogicalName>TextLineBreak.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\TextSize.png">
+ <LogicalName>TextSize.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\TextWithBlankLines.png">
+ <LogicalName>TextWithBlankLines.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MacTestRunner\ReferenceImages\TextWordWrap.png">
+ <LogicalName>TextWordWrap.png</LogicalName>
+ </EmbeddedResource>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Testing/MacTestRunner/Info.plist b/external/xwt/Testing/MacTestRunner/Info.plist
new file mode 100644
index 0000000..148b6c1
--- /dev/null
+++ b/external/xwt/Testing/MacTestRunner/Info.plist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.MacTestRunner</string>
+ <key>CFBundleName</key>
+ <string>MacTestRunner</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.6</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/external/xwt/Testing/MacTestRunner/Main.cs b/external/xwt/Testing/MacTestRunner/Main.cs
new file mode 100644
index 0000000..f2be6bf
--- /dev/null
+++ b/external/xwt/Testing/MacTestRunner/Main.cs
@@ -0,0 +1,24 @@
+using System;
+using Xwt;
+using System.IO;
+using System.Collections.Generic;
+
+namespace MacTest
+{
+ class MainClass
+ {
+ static void Main (string [] args)
+ {
+ Xwt.Application.Initialize (Xwt.ToolkitType.Cocoa);
+ ReferenceImageManager.Init ("MacTestRunner");
+
+ var list = new List<string> (args);
+ list.Add ("-domain=None");
+ list.Add ("-noshadow");
+ list.Add ("-nothread");
+ NUnit.ConsoleRunner.Runner.Main (list.ToArray ());
+ ReferenceImageManager.ShowImageVerifier ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/Arc.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/Arc.png
new file mode 100644
index 0000000..415a1fd
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/Arc.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcClosePath.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcClosePath.png
new file mode 100644
index 0000000..cbd506e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcClosePath.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcFill.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcFill.png
new file mode 100644
index 0000000..2894795
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcFill.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcMultipleLoops.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcMultipleLoops.png
new file mode 100644
index 0000000..c1dd831
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcMultipleLoops.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegative.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegative.png
new file mode 100644
index 0000000..a0b3535
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegative.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeClosePath.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeClosePath.png
new file mode 100644
index 0000000..7440339
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeClosePath.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeFill.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeFill.png
new file mode 100644
index 0000000..eb82caf
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeFill.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png
new file mode 100644
index 0000000..fb98d1e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativePathConnection.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativePathConnection.png
new file mode 100644
index 0000000..c790a7e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativePathConnection.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeStartingNegative.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeStartingNegative.png
new file mode 100644
index 0000000..a4449df
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeStartingNegative.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png
new file mode 100644
index 0000000..9de1493
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcPathConnection.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcPathConnection.png
new file mode 100644
index 0000000..5400934
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcPathConnection.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcStartingNegative.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcStartingNegative.png
new file mode 100644
index 0000000..82c2466
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcStartingNegative.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcSwappedAngles.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcSwappedAngles.png
new file mode 100644
index 0000000..81220d8
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ArcSwappedAngles.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/Curve.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/Curve.png
new file mode 100644
index 0000000..bb77f02
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/Curve.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveClosePath.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveClosePath.png
new file mode 100644
index 0000000..5c143a2
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveClosePath.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveFillWithHoles.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveFillWithHoles.png
new file mode 100644
index 0000000..6cbc626
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurveFillWithHoles.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/CurvePathConnection.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurvePathConnection.png
new file mode 100644
index 0000000..c3f01af
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/CurvePathConnection.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/DrawPathTwoTimes.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/DrawPathTwoTimes.png
new file mode 100644
index 0000000..94bee08
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/DrawPathTwoTimes.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInCircle.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInCircle.png
new file mode 100644
index 0000000..04202f4
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInCircle.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInTriangle.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInTriangle.png
new file mode 100644
index 0000000..9b7253a
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternInTriangle.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransform.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransform.png
new file mode 100644
index 0000000..377185b
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransform.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png
new file mode 100644
index 0000000..9adfbc7
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png
new file mode 100644
index 0000000..49380a9
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png
new file mode 100644
index 0000000..31ff490
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/LineClosePath.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/LineClosePath.png
new file mode 100644
index 0000000..5957193
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/LineClosePath.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradient.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradient.png
new file mode 100644
index 0000000..575817e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradient.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientDiagonal.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientDiagonal.png
new file mode 100644
index 0000000..828758e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientDiagonal.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientInternalBox.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientInternalBox.png
new file mode 100644
index 0000000..ee6b539
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientInternalBox.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientReverse.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientReverse.png
new file mode 100644
index 0000000..7d18cdb
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/LinearGradientReverse.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/NewPath.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/NewPath.png
new file mode 100644
index 0000000..c8fc61b
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/NewPath.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradient.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradient.png
new file mode 100644
index 0000000..40bf0c5
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradient.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientReverse.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientReverse.png
new file mode 100644
index 0000000..d1aa7a4
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientReverse.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientSmall.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientSmall.png
new file mode 100644
index 0000000..81b3e3f
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/RadialGradientSmall.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/Rectangle.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/Rectangle.png
new file mode 100644
index 0000000..5f3f5c2
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/Rectangle.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/RectanglePathConnection.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/RectanglePathConnection.png
new file mode 100644
index 0000000..d44f11b
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/RectanglePathConnection.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/StrokePreserve.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/StrokePreserve.png
new file mode 100644
index 0000000..f76b6a2
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/StrokePreserve.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/Text.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/Text.png
new file mode 100644
index 0000000..70ab8f2
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/Text.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/TextLineBreak.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextLineBreak.png
new file mode 100644
index 0000000..88ff7a7
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextLineBreak.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/TextSize.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextSize.png
new file mode 100644
index 0000000..648cf61
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextSize.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/TextTrimmingEllipsis.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextTrimmingEllipsis.png
new file mode 100644
index 0000000..3517825
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextTrimmingEllipsis.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWithBlankLines.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWithBlankLines.png
new file mode 100644
index 0000000..7285a1e
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWithBlankLines.png differ
diff --git a/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWordWrap.png b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWordWrap.png
new file mode 100644
index 0000000..af546ed
Binary files /dev/null and b/external/xwt/Testing/MacTestRunner/ReferenceImages/TextWordWrap.png differ
diff --git a/external/xwt/Testing/Tests/BoxTests.cs b/external/xwt/Testing/Tests/BoxTests.cs
new file mode 100644
index 0000000..c5a46d8
--- /dev/null
+++ b/external/xwt/Testing/Tests/BoxTests.cs
@@ -0,0 +1,93 @@
+//
+// BoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public abstract class BoxTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ var box = CreateBox ();
+ box.PackStart (new Label ("Hello Worlds"));
+ return box;
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((Box)parent).Clear ();
+ ((Box)parent).PackStart (child, true);
+ }
+
+ public abstract Box CreateBox ();
+
+ protected abstract Rectangle AdjustedRect (Rectangle r);
+
+ public Rectangle ToScreenBounds (Window w, Rectangle r)
+ {
+ r = AdjustedRect (r);
+ var wb = w.ScreenBounds;
+ return r.Offset (wb.Location);
+ }
+
+ Box PrepareBox (Window win)
+ {
+ win.Padding = 0;
+ win.Size = new Size (100, 100);
+ var box = CreateBox ();
+ win.Content = box;
+ return box;
+ }
+
+ [Test]
+ public void SinglePack ()
+ {
+ using (Window win = new Window ()) {
+ var box = PrepareBox (win);
+ SquareBox c = new SquareBox ();
+ box.PackStart (c);
+ ShowWindow (win);
+
+ Assert.AreEqual (ToScreenBounds (win, new Rectangle (0, 0, 10, 100)), c.ScreenBounds);
+ }
+ }
+
+ [Test]
+ public void SinglePackExpand ()
+ {
+ using (Window win = new Window ()) {
+ var box = PrepareBox (win);
+ SquareBox c = new SquareBox ();
+ box.PackStart (c, true);
+ ShowWindow (win);
+
+ Assert.AreEqual (ToScreenBounds (win, new Rectangle (0, 0, 100, 100)), c.ScreenBounds);
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ButtonTests.cs b/external/xwt/Testing/Tests/ButtonTests.cs
new file mode 100644
index 0000000..fa8bedf
--- /dev/null
+++ b/external/xwt/Testing/Tests/ButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// ButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Button ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/CanvasTests.cs b/external/xwt/Testing/Tests/CanvasTests.cs
new file mode 100644
index 0000000..71030d6
--- /dev/null
+++ b/external/xwt/Testing/Tests/CanvasTests.cs
@@ -0,0 +1,54 @@
+//
+// CanvasTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt
+{
+ public class CanvasTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new TestCanvas ();
+ }
+ }
+
+ class TestCanvas: Canvas
+ {
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ return new Size (10, 10);
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle dirtyRect)
+ {
+ ctx.Rectangle (dirtyRect);
+ ctx.SetColor (Colors.Red);
+ ctx.Fill ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/CheckBoxTests.cs b/external/xwt/Testing/Tests/CheckBoxTests.cs
new file mode 100644
index 0000000..b79361a
--- /dev/null
+++ b/external/xwt/Testing/Tests/CheckBoxTests.cs
@@ -0,0 +1,38 @@
+//
+// CheckBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class CheckBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new CheckBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ColorTests.cs b/external/xwt/Testing/Tests/ColorTests.cs
new file mode 100644
index 0000000..8fafb90
--- /dev/null
+++ b/external/xwt/Testing/Tests/ColorTests.cs
@@ -0,0 +1,161 @@
+//
+// Colors.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+using NUnit.Framework;
+
+namespace Xwt
+{
+ [TestFixture]
+ public class ColorTests
+ {
+ [Test]
+ public void Red ()
+ {
+ var c = new Color ();
+ c.Red = 1;
+ Assert.AreEqual (1d, c.Red);
+ Assert.AreEqual (0d, c.Green);
+ Assert.AreEqual (0d, c.Blue);
+ Assert.AreEqual (0d, c.Alpha);
+ }
+
+ [Test]
+ public void Green ()
+ {
+ var c = new Color ();
+ c.Green = 1;
+ Assert.AreEqual (1d, c.Green);
+ Assert.AreEqual (0d, c.Red);
+ Assert.AreEqual (0d, c.Blue);
+ Assert.AreEqual (0d, c.Alpha);
+ }
+
+ [Test]
+ public void Blue ()
+ {
+ var c = new Color ();
+ c.Blue = 1;
+ Assert.AreEqual (1d, c.Blue);
+ Assert.AreEqual (0d, c.Green);
+ Assert.AreEqual (0d, c.Red);
+ Assert.AreEqual (0d, c.Alpha);
+ }
+
+ [Test]
+ public void Alpha ()
+ {
+ var c = new Color ();
+ c.Alpha = 1;
+ Assert.AreEqual (1d, c.Alpha);
+ Assert.AreEqual (0d, c.Green);
+ Assert.AreEqual (0d, c.Blue);
+ Assert.AreEqual (0d, c.Red);
+ }
+
+ [Test]
+ public void Constructor ()
+ {
+ var c = new Color (0.1d, 0.2d, 0.3d);
+ Assert.AreEqual (0.1d, c.Red);
+ Assert.AreEqual (0.2d, c.Green);
+ Assert.AreEqual (0.3d, c.Blue);
+ Assert.AreEqual (1d, c.Alpha);
+ }
+
+ [Test]
+ public void ConstructorWithAlpha ()
+ {
+ var c = new Color (0.1d, 0.2d, 0.3d, 0.4d);
+ Assert.AreEqual (0.1d, c.Red);
+ Assert.AreEqual (0.2d, c.Green);
+ Assert.AreEqual (0.3d, c.Blue);
+ Assert.AreEqual (0.4d, c.Alpha);
+ }
+
+ [Test]
+ public void FromBytes ()
+ {
+ var c = Color.FromBytes (255, 255, 255);
+ Assert.AreEqual (1d, c.Red);
+ Assert.AreEqual (1d, c.Green);
+ Assert.AreEqual (1d, c.Blue);
+ Assert.AreEqual (1d, c.Alpha);
+ c = Color.FromBytes (128, 128, 128);
+ Assert.AreEqual (128, (int)(c.Red * 255));
+ Assert.AreEqual (128, (int)(c.Green * 255));
+ Assert.AreEqual (128, (int)(c.Blue * 255));
+ Assert.AreEqual (1, c.Alpha);
+ }
+
+ [Test]
+ public void ParseColor ()
+ {
+ Color c;
+ Assert.IsTrue (Color.TryParse ("#3a02b9", out c));
+ Assert.AreEqual (0x3a, (int)(c.Red * 255));
+ Assert.AreEqual (0x02, (int)(c.Green * 255));
+ Assert.AreEqual (0xb9, (int)(c.Blue * 255));
+ Assert.AreEqual (1d, c.Alpha);
+ }
+
+ [Test]
+ public void ParseColorWithAlpha ()
+ {
+ Color c;
+ Assert.IsTrue (Color.TryParse ("#3a02b9dd", out c));
+ Assert.AreEqual (0x3a, (int)(c.Red * 255));
+ Assert.AreEqual (0x02, (int)(c.Green * 255));
+ Assert.AreEqual (0xb9, (int)(c.Blue * 255));
+ Assert.AreEqual (0xdd, (int)(c.Alpha * 255));
+ }
+
+ [Test]
+ public void ParseColorFailures ()
+ {
+ Color c;
+ Assert.IsFalse (Color.TryParse ("#3a02b9ddff", out c));
+ Assert.IsFalse (Color.TryParse ("3a02b9dd", out c));
+ Assert.IsFalse (Color.TryParse ("#3a02b9j", out c));
+ }
+
+ [Test]
+ public void Equality ()
+ {
+ var c1 = new Color (1, 0, 0);
+ var c2 = new Color (1, 0, 0);
+ Assert.IsTrue (c1 == c2);
+ Assert.IsTrue (c1.Equals (c2));
+ Assert.IsFalse (c1 != c2);
+
+ c1 = new Color (0.9, 0, 0);
+ Assert.IsFalse (c1 == c2);
+ Assert.IsFalse (c1.Equals (c2));
+ Assert.IsTrue (c1 != c2);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ComboBoxEntryTests.cs b/external/xwt/Testing/Tests/ComboBoxEntryTests.cs
new file mode 100644
index 0000000..5fb9a32
--- /dev/null
+++ b/external/xwt/Testing/Tests/ComboBoxEntryTests.cs
@@ -0,0 +1,39 @@
+//
+// ComboBoxEntryTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class ComboBoxEntryTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ComboBoxEntry ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ComboBoxTests.cs b/external/xwt/Testing/Tests/ComboBoxTests.cs
new file mode 100644
index 0000000..cf39f4b
--- /dev/null
+++ b/external/xwt/Testing/Tests/ComboBoxTests.cs
@@ -0,0 +1,39 @@
+//
+// ComboBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class ComboBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ComboBox ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ConsoleTestRunner.cs b/external/xwt/Testing/Tests/ConsoleTestRunner.cs
new file mode 100644
index 0000000..a7d5062
--- /dev/null
+++ b/external/xwt/Testing/Tests/ConsoleTestRunner.cs
@@ -0,0 +1,37 @@
+//
+// ConsoleTestRunner.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class ConsoleTestRunner
+ {
+ public void Run (string[] args)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ContainerTests.cs b/external/xwt/Testing/Tests/ContainerTests.cs
new file mode 100644
index 0000000..86447b1
--- /dev/null
+++ b/external/xwt/Testing/Tests/ContainerTests.cs
@@ -0,0 +1,64 @@
+//
+// ContainerTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public abstract class ContainerTests: WidgetTests
+ {
+ protected abstract void AddChild (Widget parent, Widget child);
+
+ [Test]
+ public void ChildMargin ()
+ {
+ using (var win = new Window ()) {
+ var c = CreateWidget ();
+ win.Content = c;
+ win.Size = new Size (100, 100);
+ var box = new SquareBox (10);
+ AddChild (c, box);
+ ShowWindow (win);
+ VerifyMargin (box);
+ }
+ }
+
+ [Test]
+ public void ChildAlignment ()
+ {
+ using (var win = new Window ()) {
+ var c = CreateWidget ();
+ win.Content = c;
+ win.Size = new Size (100, 100);
+ var box = new SquareBox (10);
+ AddChild (c, box);
+ ShowWindow (win);
+ VerifyAlignment (box);
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/DatePickerTests.cs b/external/xwt/Testing/Tests/DatePickerTests.cs
new file mode 100644
index 0000000..d2affa7
--- /dev/null
+++ b/external/xwt/Testing/Tests/DatePickerTests.cs
@@ -0,0 +1,38 @@
+//
+// DatePickerTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class DatePickerTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new DatePicker ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/DrawingTests.cs b/external/xwt/Testing/Tests/DrawingTests.cs
new file mode 100644
index 0000000..d58d434
--- /dev/null
+++ b/external/xwt/Testing/Tests/DrawingTests.cs
@@ -0,0 +1,1017 @@
+//
+// DrawingTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+using System.Threading;
+using Xwt.Drawing;
+using System.IO;
+using System.Collections.Generic;
+
+namespace Xwt
+{
+ [TestFixture]
+ public class DrawingTests
+ {
+ ImageBuilder builder;
+ Context context;
+
+ void InitBlank (int width = 50, int height = 50)
+ {
+ if (builder != null)
+ builder.Dispose ();
+
+ builder = new ImageBuilder (width, height);
+ context = builder.Context;
+ context.Rectangle (0, 0, width, height);
+ context.SetColor (Colors.White);
+ context.Fill ();
+ context.SetColor (Colors.Black);
+ context.SetLineWidth (1);
+ }
+
+ void CheckImage (string refImageName)
+ {
+ if (builder == null)
+ return;
+ var img = builder.ToBitmap ((int)builder.Width, (int)builder.Height);
+ builder.Dispose ();
+ builder = null;
+
+ ReferenceImageManager.CheckImage (refImageName, img);
+ }
+
+ [Test]
+ public void Line ()
+ {
+ InitBlank ();
+ context.MoveTo (1, 1.5);
+ context.LineTo (20, 1.5);
+ context.Stroke ();
+ CheckImage ("Line.png");
+ }
+
+ [Test]
+ public void LineClosePath ()
+ {
+ InitBlank ();
+ context.MoveTo (1.5, 1.5);
+ context.LineTo (20.5, 1.5);
+ context.LineTo (20.5, 20.5);
+ context.ClosePath ();
+ context.Stroke ();
+ CheckImage ("LineClosePath.png");
+ }
+
+ [Test]
+ public void LineWidth ()
+ {
+ InitBlank ();
+ context.MoveTo (10, 20.5);
+ context.LineTo (40, 20.5);
+ context.SetLineWidth (1);
+ context.Stroke ();
+ context.MoveTo (10, 25);
+ context.LineTo (40, 25);
+ context.SetLineWidth (2);
+ context.Stroke ();
+ context.MoveTo (10, 30);
+ context.LineTo (40, 30);
+ context.SetLineWidth (4);
+ context.Stroke ();
+ CheckImage ("LineWidth.png");
+ }
+
+ [Test]
+ public void Rectangle ()
+ {
+ InitBlank ();
+ context.Rectangle (1.5, 1.5, 20, 20);
+ context.Stroke ();
+ CheckImage ("Rectangle.png");
+ }
+
+ [Test]
+ public void RectanglePathConnection ()
+ {
+ InitBlank ();
+ context.Rectangle (5.5, 5.5, 20, 20);
+ DrawCurrentPosition ();
+ context.Stroke ();
+ CheckImage ("RectanglePathConnection.png");
+ }
+
+ [Test]
+ public void RectangleFill ()
+ {
+ InitBlank ();
+ context.Rectangle (1, 1, 20, 20);
+ context.SetColor (Colors.Blue);
+ context.Fill ();
+ CheckImage ("RectangleFill.png");
+ }
+
+ [Test]
+ public void FillPreserve ()
+ {
+ InitBlank ();
+ context.Rectangle (1, 1, 20, 20);
+ context.SetColor (Colors.Yellow);
+ context.FillPreserve ();
+ context.SetColor (Colors.Blue);
+ context.SetLineWidth (2);
+ context.Stroke ();
+ CheckImage ("FillPreserve.png");
+ }
+
+ [Test]
+ public void StrokePreserve ()
+ {
+ InitBlank ();
+ context.MoveTo (10, 25);
+ context.LineTo (40, 25);
+ context.SetColor (Colors.Blue);
+ context.SetLineWidth (10);
+ context.StrokePreserve ();
+ context.SetLineWidth (5);
+ context.SetColor (Colors.Yellow);
+ context.Stroke ();
+ CheckImage ("StrokePreserve.png");
+ }
+
+ void DrawCurrentPosition ()
+ {
+ context.RelMoveTo (-2.5, -3);
+ context.RelLineTo (6, 0);
+ context.RelLineTo (0, 6);
+ context.RelLineTo (-6, 0);
+ context.RelLineTo (0, -6);
+ context.RelLineTo (6, 0);
+ context.RelLineTo (-6, 0);
+ context.RelMoveTo (2.5, 3);
+ }
+
+ #region Arc
+
+ [Test]
+ public void Arc ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20.5, 0, 90);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+
+ CheckImage ("Arc.png");
+ }
+
+ [Test]
+ public void ArcStartingNegative ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20.5, -45, 45);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcStartingNegative.png");
+ }
+
+ [Test]
+ public void ArcSwappedAngles ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20.5, 300, 0);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcSwappedAngles.png");
+ }
+
+ [Test]
+ public void ArcMultipleLoops ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20.5, 0, 360 + 180);
+ context.SetColor (Colors.Black.WithAlpha (0.5));
+ context.SetLineWidth (5);
+ context.RelLineTo (10, 0);
+ context.Stroke ();
+ CheckImage ("ArcMultipleLoops.png");
+ }
+
+ [Test]
+ public void ArcFill ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20, 0, 135);
+ context.SetColor (Colors.Black);
+ context.Fill ();
+ CheckImage ("ArcFill.png");
+ }
+
+ [Test]
+ public void ArcPathConnection ()
+ {
+ InitBlank ();
+ context.MoveTo (25.5, 25.5);
+ context.Arc (25.5, 25.5, 20, 0, 135);
+ DrawCurrentPosition ();
+ context.LineTo (25.5, 25.5);
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcPathConnection.png");
+ }
+
+ [Test]
+ public void ArcClosePath ()
+ {
+ InitBlank ();
+ context.Arc (25, 25, 20.5, 0, 90);
+ context.Arc (25, 35, 10.5, 90, 180);
+ context.ClosePath ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+
+ CheckImage ("ArcClosePath.png");
+ }
+
+ #endregion
+
+ #region ArcNegative
+
+ [Test]
+ public void ArcNegative ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20.5, 0, 90);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcNegative.png");
+ }
+
+ [Test]
+ public void ArcNegativeStartingNegative ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20.5, -45, 45);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcNegativeStartingNegative.png");
+ }
+
+ [Test]
+ public void ArcNegativeSwappedAngles ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20.5, 300, 0);
+ DrawCurrentPosition ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcNegativeSwappedAngles.png");
+ }
+
+ [Test]
+ public void ArcNegativeMultipleLoops ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20.5, 0, 360 + 180);
+ context.SetColor (Colors.Black.WithAlpha (0.5));
+ context.SetLineWidth (5);
+ context.RelLineTo (10, 0);
+ context.Stroke ();
+ CheckImage ("ArcNegativeMultipleLoops.png");
+ }
+
+ [Test]
+ public void ArcNegativeFill ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20, 0, 135);
+ context.SetColor (Colors.Black);
+ context.Fill ();
+ CheckImage ("ArcNegativeFill.png");
+ }
+
+ [Test]
+ public void ArcNegativePathConnection ()
+ {
+ InitBlank ();
+ context.MoveTo (25.5, 25.5);
+ context.ArcNegative (25.5, 25.5, 20, 0, 135);
+ DrawCurrentPosition ();
+ context.LineTo (25.5, 25.5);
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("ArcNegativePathConnection.png");
+ }
+
+ [Test]
+ public void ArcNegativeClosePath ()
+ {
+ InitBlank ();
+ context.ArcNegative (25, 25, 20.5, 0, 180);
+ context.ArcNegative (15, 25, 10.5, 180, 90);
+ context.ClosePath ();
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+
+ CheckImage ("ArcNegativeClosePath.png");
+ }
+
+ #endregion
+
+ #region ImagePattern
+
+ [Test]
+ public void ImagePattern ()
+ {
+ InitBlank (70, 70);
+ context.Rectangle (5, 5, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePattern.png");
+ }
+
+ [Test]
+ public void ImagePatternInCircle ()
+ {
+ InitBlank (50, 50);
+ context.Arc (25, 25, 20, 0, 360);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternInCircle.png");
+ }
+
+ [Test]
+ public void ImagePatternInTriangle ()
+ {
+ InitBlank (50, 50);
+ context.MoveTo (25, 5);
+ context.LineTo (45, 20);
+ context.LineTo (5, 45);
+ context.ClosePath ();
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternInTriangle.png");
+ }
+
+ [Test]
+ public void ImagePatternWithTranslateTransform ()
+ {
+ InitBlank (70, 70);
+ context.Translate (5, 5);
+ context.Rectangle (0, 0, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternWithTranslateTransform.png");
+ }
+
+ [Test]
+ public void ImagePatternWithRotateTransform ()
+ {
+ InitBlank (70, 70);
+ context.Rotate (4);
+ context.Rectangle (5, 5, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternWithRotateTransform.png");
+ }
+
+ [Test]
+ public void ImagePatternWithScaleTransform ()
+ {
+ InitBlank (70, 70);
+ context.Scale (2, 0.5);
+ context.Rectangle (5, 5, 20, 120);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternWithScaleTransform.png");
+ }
+
+ [Test]
+ public void ImagePatternWithAlpha ()
+ {
+ InitBlank (70, 70);
+ context.Rectangle (5, 5, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ img = img.WithAlpha (0.5);
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Fill ();
+ CheckImage ("ImagePatternWithAlpha.png");
+ }
+
+ [Test]
+ public void ImagePatternWithTranslateTransformWithAlpha ()
+ {
+ InitBlank (70, 70);
+ context.Translate (5, 5);
+ context.Rectangle (0, 0, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img.WithAlpha (0.5));
+ context.Fill ();
+ CheckImage ("ImagePatternWithTranslateTransformWithAlpha.png");
+ }
+
+ [Test]
+ public void ImagePatternWithRotateTransformWithAlpha ()
+ {
+ InitBlank (70, 70);
+ context.Rotate (4);
+ context.Rectangle (5, 5, 40, 60);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img.WithAlpha (0.5));
+ context.Fill ();
+ CheckImage ("ImagePatternWithRotateTransformWithAlpha.png");
+ }
+
+ [Test]
+ public void ImagePatternWithScaleTransformWithAlpha ()
+ {
+ InitBlank (70, 70);
+ context.Scale (2, 0.5);
+ context.Rectangle (5, 5, 20, 120);
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img.WithAlpha (0.5));
+ context.Fill ();
+ CheckImage ("ImagePatternWithScaleTransformWithAlpha.png");
+ }
+
+ #endregion
+
+ #region Clipping
+
+ void DrawSimplePattern ()
+ {
+ context.Rectangle (0, 0, 20, 20);
+ context.SetColor (Colors.Red);
+ context.Fill ();
+ context.Rectangle (20, 0, 20, 20);
+ context.SetColor (Colors.Blue);
+ context.Fill ();
+ context.Rectangle (0, 20, 20, 20);
+ context.SetColor (Colors.Green);
+ context.Fill ();
+ context.Rectangle (20, 20, 20, 20);
+ context.SetColor (Colors.Yellow);
+ context.Fill ();
+ }
+
+ [Test]
+ public void Clip ()
+ {
+ InitBlank ();
+
+ context.Rectangle (15, 15, 20, 20);
+ context.Clip ();
+ DrawSimplePattern ();
+
+ CheckImage ("Clip.png");
+ }
+
+ [Test]
+ public void ClipAccumulated ()
+ {
+ InitBlank ();
+
+ context.Rectangle (15, 15, 20, 20);
+ context.Clip ();
+ context.Rectangle (0, 0, 20, 20);
+ context.Clip ();
+ DrawSimplePattern ();
+
+ CheckImage ("ClipAccumulated.png");
+ }
+
+ [Test]
+ public void ClipPreserve ()
+ {
+ InitBlank ();
+
+ DrawSimplePattern ();
+ context.Rectangle (15, 15, 20, 20);
+ context.ClipPreserve ();
+ context.SetColor (Colors.Violet);
+ context.Fill ();
+
+ CheckImage ("ClipPreserve.png");
+ }
+
+ [Test]
+ public void ClipSaveRestore ()
+ {
+ InitBlank ();
+ context.Rectangle (15, 15, 20, 20);
+ context.Clip ();
+ context.Save ();
+ context.Rectangle (0, 0, 20, 20);
+ context.Clip ();
+ context.Restore ();
+ DrawSimplePattern ();
+ CheckImage ("ClipSaveRestore.png");
+ }
+
+ #endregion
+
+ [Test]
+ public void NewPath ()
+ {
+ InitBlank ();
+ context.MoveTo (1, 1.5);
+ context.LineTo (20, 1.5);
+ context.NewPath ();
+ context.MoveTo (0, 0);
+ context.LineTo (20, 20);
+ context.Stroke ();
+ CheckImage ("NewPath.png");
+ }
+
+ #region LinearGradient
+
+ [Test]
+ public void LinearGradient ()
+ {
+ InitBlank ();
+ var g = new LinearGradient (5, 5, 5, 45);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("LinearGradient.png");
+ }
+
+ [Test]
+ public void LinearGradientDiagonal ()
+ {
+ InitBlank ();
+ var g = new LinearGradient (5, 5, 45, 45);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("LinearGradientDiagonal.png");
+ }
+
+ [Test]
+ public void LinearGradientReverse ()
+ {
+ InitBlank ();
+ var g = new LinearGradient (5, 45, 5, 5);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("LinearGradientReverse.png");
+ }
+
+ [Test]
+ public void LinearGradientInternalBox ()
+ {
+ InitBlank ();
+ var g = new LinearGradient (25, 15, 35, 35);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("LinearGradientInternalBox.png");
+ }
+
+ #endregion
+
+ #region RadialGradient
+
+ [Test]
+ public void RadialGradient ()
+ {
+ InitBlank ();
+ var g = new RadialGradient (20, 20, 5, 30, 30, 30);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("RadialGradient.png");
+ }
+
+ [Test]
+ public void RadialGradientReverse ()
+ {
+ InitBlank ();
+ var g = new RadialGradient (20, 20, 30, 30, 25, 5);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("RadialGradientReverse.png");
+ }
+
+ [Test]
+ public void RadialGradientSmall ()
+ {
+ InitBlank ();
+ var g = new RadialGradient (5, 5, 5, 30, 30, 15);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Rectangle (5, 5, 40, 40);
+ context.Pattern = g;
+ context.Fill ();
+ CheckImage ("RadialGradientSmall.png");
+ }
+
+ #endregion
+
+ #region Curves
+
+ [Test]
+ public void Curve ()
+ {
+ InitBlank (70,70);
+ context.MoveTo (5, 35);
+ context.CurveTo (35, 5, 35, 65, 65, 35);
+ context.Stroke ();
+ CheckImage ("Curve.png");
+ }
+
+ [Test]
+ public void CurvePathConnection ()
+ {
+ InitBlank (70,70);
+ context.MoveTo (0, 0);
+ context.LineTo (5, 35);
+ context.CurveTo (35, 5, 35, 65, 65, 35);
+ context.LineTo (70, 70);
+ context.Stroke ();
+ CheckImage ("CurvePathConnection.png");
+ }
+
+ [Test]
+ public void CurveFillWithHoles ()
+ {
+ InitBlank (70, 70);
+ // Curve 1
+ context.MoveTo (5, 35);
+ context.CurveTo (20, 0, 50, 0, 60, 25);
+
+ // curve2 with lineTo; curve1 is closed
+ context.LineTo (5, 5);
+ context.CurveTo (20, 30, 50, 30, 60, 5);
+
+ context.ClosePath ();
+ context.SetColor (Colors.Black);
+ context.StrokePreserve ();
+ context.SetColor (Colors.LightGray);
+ context.Fill ();
+ CheckImage ("CurveFillWithHoles.png");
+ }
+
+ [Test]
+ public void CurveClosePath ()
+ {
+ InitBlank (100,100);
+ context.MoveTo (5, 20);
+ context.CurveTo (35, 5, 35, 65, 65, 20);
+ context.CurveTo (70, 25, 60, 40, 45, 65);
+ context.ClosePath ();
+ context.Stroke ();
+ CheckImage ("CurveClosePath.png");
+ }
+
+
+ #endregion
+
+ #region Save/Restore
+
+ [Test]
+ public void SaveRestorePath ()
+ {
+ // Path is not saved
+ InitBlank ();
+ context.SetLineWidth (2);
+ context.MoveTo (10, 10);
+ context.LineTo (40, 10);
+ context.Save ();
+ context.LineTo (40, 40);
+ context.Restore ();
+ context.LineTo (10, 40);
+ context.SetColor (Colors.Black);
+ context.Stroke ();
+ CheckImage ("SaveRestorePath.png");
+ }
+
+ [Test]
+ public void SaveRestoreColor ()
+ {
+ // Color is saved
+ InitBlank ();
+ context.Rectangle (10, 10, 20, 20);
+ context.SetColor (Colors.Black);
+ context.Save ();
+ context.SetColor (Colors.Red);
+ context.Restore ();
+ context.Fill ();
+ CheckImage ("SaveRestoreColor.png");
+ }
+
+ [Test]
+ public void SaveRestoreImagePattern ()
+ {
+ // Pattern is saved
+ InitBlank (70, 70);
+ context.Save ();
+ var img = ReferenceImageManager.LoadReferenceImage ("pattern-sample.png");
+ context.Pattern = new Xwt.Drawing.ImagePattern (img);
+ context.Restore ();
+ context.Rectangle (5, 5, 40, 60);
+ context.Fill ();
+ CheckImage ("SaveRestoreImagePattern.png");
+ }
+
+ [Test]
+ public void SaveRestoreLinearGradient ()
+ {
+ // Pattern is saved
+ InitBlank ();
+ var g = new LinearGradient (5, 5, 5, 45);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Save ();
+ context.Pattern = g;
+ context.Restore ();
+ context.Rectangle (5, 5, 40, 40);
+ context.Fill ();
+ CheckImage ("SaveRestoreLinearGradient.png");
+ }
+
+ [Test]
+ public void SaveRestoreRadialGradient ()
+ {
+ // Pattern is saved
+ InitBlank ();
+ var g = new RadialGradient (20, 20, 5, 30, 30, 30);
+ g.AddColorStop (0, Colors.Red);
+ g.AddColorStop (0.5, Colors.Green);
+ g.AddColorStop (1, Colors.Blue);
+ context.Save ();
+ context.Pattern = g;
+ context.Restore ();
+ context.Rectangle (5, 5, 40, 40);
+ context.Fill ();
+ CheckImage ("SaveRestoreRadialGradient.png");
+ }
+
+ [Test]
+ public void SaveRestoreLineWidth ()
+ {
+ // Line width is saved
+ InitBlank ();
+ context.SetLineWidth (2);
+ context.Save ();
+ context.SetLineWidth (8);
+ context.Restore ();
+ context.Rectangle (10, 10, 30, 30);
+ context.Stroke ();
+ CheckImage ("SaveRestoreLineWidth.png");
+ }
+
+ [Test]
+ public void SaveRestoreTransform ()
+ {
+ // Transform is saved
+ InitBlank ();
+ context.Save ();
+ context.Translate (10, 10);
+ context.Rotate (10);
+ context.Scale (0.5, 0.5);
+ context.Restore ();
+ context.Rectangle (10, 10, 30, 30);
+ context.Fill ();
+ CheckImage ("SaveRestoreTransform.png");
+ }
+
+ #endregion
+
+ #region Text
+
+ [Test]
+ public void Text ()
+ {
+ // Transform is saved
+ InitBlank (100, 50);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "Hello World";
+ context.DrawTextLayout (la, 5, 5);
+ CheckImage ("Text.png");
+ }
+
+ [Test]
+ public void TextSize ()
+ {
+ // Transform is saved
+ InitBlank (100, 50);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "Hello World";
+
+ var s = la.GetSize ();
+ context.Rectangle (10.5, 10.5, s.Width, s.Height);
+ context.SetColor (Colors.Blue);
+ context.Stroke ();
+
+ context.SetColor (Colors.Black);
+ context.DrawTextLayout (la, 10, 10);
+ CheckImage ("TextSize.png");
+ }
+
+ [Test]
+ public void TextLineBreak ()
+ {
+ // Transform is saved
+ InitBlank (100, 50);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "Hello\nWorld";
+
+ var s = la.GetSize ();
+ context.Rectangle (10.5, 10.5, s.Width, s.Height);
+ context.SetColor (Colors.Blue);
+ context.Stroke ();
+
+ context.SetColor (Colors.Black);
+ context.DrawTextLayout (la, 10, 10);
+ CheckImage ("TextLineBreak.png");
+ }
+
+ [Test]
+ public void TextWithBlankLines ()
+ {
+ // Transform is saved
+ InitBlank (50, 150);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "\n\nHello\n\n\nWorld\n\n";
+
+ var s = la.GetSize ();
+ context.Rectangle (10.5, 10.5, s.Width, s.Height);
+ context.SetColor (Colors.Blue);
+ context.Stroke ();
+
+ context.SetColor (Colors.Black);
+ context.DrawTextLayout (la, 10, 10);
+ CheckImage ("TextWithBlankLines.png");
+ }
+
+ [Test]
+ public void TextWordWrap ()
+ {
+ // Transform is saved
+ InitBlank (100, 100);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "One Two Three Four Five Six Seven Eight Nine";
+ la.Width = 90;
+ la.Trimming = TextTrimming.Word;
+ var s = la.GetSize ();
+ context.Rectangle (5.5, 5.5, s.Width, s.Height);
+ context.SetColor (Colors.Blue);
+ context.Stroke ();
+
+ context.SetColor (Colors.Black);
+ context.DrawTextLayout (la, 5, 5);
+ CheckImage ("TextWordWrap.png");
+ }
+
+ [Test]
+ public void TextTrimmingEllipsis ()
+ {
+ // Transform is saved
+ InitBlank (50, 100);
+ var la = new TextLayout ();
+ la.Font = Font.FromName ("Arial 12");
+ la.Text = "One Two Three Four Five Six Seven Eight Nine";
+ la.Width = 45;
+ la.Trimming = TextTrimming.WordElipsis;
+ var s = la.GetSize ();
+ context.Rectangle (5.5, 5.5, s.Width, s.Height);
+ context.SetColor (Colors.Blue);
+ context.Stroke ();
+
+ context.SetColor (Colors.Black);
+ context.DrawTextLayout (la, 5, 5);
+ CheckImage ("TextTrimmingEllipsis.png");
+ }
+
+ #endregion
+
+ #region Paths
+
+ [Test]
+ public void DrawPathTwoTimes ()
+ {
+ InitBlank (50, 50);
+ var p = new DrawingPath ();
+ p.Rectangle (15, 15, 20, 20);
+ p.Rectangle (20, 20, 10, 10);
+ context.AppendPath (p);
+ context.Stroke ();
+ context.Rotate (15);
+ context.AppendPath (p);
+ context.Stroke ();
+ CheckImage ("DrawPathTwoTimes.png");
+ }
+
+ #endregion
+
+ #region Hit test checking
+
+ [Test]
+ public void DrawingPathPointInFill ()
+ {
+ DrawingPath p = new DrawingPath ();
+ p.Rectangle (10, 10, 20, 20);
+ Assert.IsTrue (p.IsPointInFill (15, 15));
+ Assert.IsFalse (p.IsPointInFill (9, 9));
+ }
+
+ [Test]
+ public void ContextPointInStroke ()
+ {
+ InitBlank (50, 50);
+ context.Rectangle (10, 10, 20, 20);
+ context.SetLineWidth (3);
+ Assert.IsTrue (context.IsPointInStroke (10, 10));
+ Assert.IsTrue (context.IsPointInStroke (11, 11));
+ Assert.IsFalse (context.IsPointInStroke (15, 15));
+ context.MoveTo (15, 15);
+ context.RelLineTo (5, 0);
+ Assert.IsTrue (context.IsPointInStroke (15, 15));
+ }
+
+ [Test]
+ public void ContextPointInFillWithTransform ()
+ {
+ InitBlank (50, 50);
+ context.Translate (50, 50);
+ context.Rectangle (10, 10, 20, 20);
+ context.SetLineWidth (3);
+ Assert.IsTrue (context.IsPointInStroke (10, 10));
+ Assert.IsTrue (context.IsPointInStroke (11, 11));
+ Assert.IsFalse (context.IsPointInStroke (15, 15));
+ Assert.IsTrue (context.IsPointInFill (15, 15));
+ Assert.IsFalse (context.IsPointInFill (9, 9));
+
+ context.Translate (50, 50);
+ Assert.IsTrue (context.IsPointInStroke (-40, -40));
+ Assert.IsTrue (context.IsPointInStroke (-41, -41));
+ Assert.IsFalse (context.IsPointInStroke (-45, -45));
+ Assert.IsTrue (context.IsPointInFill (-35, -35));
+ Assert.IsFalse (context.IsPointInFill (15, 15));
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ExpanderTests.cs b/external/xwt/Testing/Tests/ExpanderTests.cs
new file mode 100644
index 0000000..ebcdcf8
--- /dev/null
+++ b/external/xwt/Testing/Tests/ExpanderTests.cs
@@ -0,0 +1,45 @@
+//
+// ExpanderTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class ExpanderTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Expander ();
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ var exp = (Expander)parent;
+ exp.Expanded = true;
+ exp.Content = child;
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/FontTests.cs b/external/xwt/Testing/Tests/FontTests.cs
new file mode 100644
index 0000000..be62198
--- /dev/null
+++ b/external/xwt/Testing/Tests/FontTests.cs
@@ -0,0 +1,233 @@
+//
+// FontTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+using Xwt.Drawing;
+
+namespace Xwt
+{
+ [TestFixture]
+ public class FontTests
+ {
+ [Test]
+ public void FromNameEmpty ()
+ {
+ var f = Font.FromName ("");
+ Assert.AreEqual (Font.SystemFont, f);
+ }
+
+ [Test]
+ public void WithFamily ()
+ {
+ var f1 = Font.SystemFont;
+ var f2 = f1.WithFamily ("Arial");
+ Assert.AreEqual ("Arial", f2.Family);
+ Assert.AreEqual (f1.Size, f2.Size);
+ Assert.AreEqual (f1.Stretch, f2.Stretch);
+ Assert.AreEqual (f1.Style, f2.Style);
+ Assert.AreEqual (f1.Weight, f2.Weight);
+ }
+
+ [Test]
+ public void WithSize ()
+ {
+ var f1 = Font.SystemFont;
+ var f2 = f1.WithSize (33);
+ Assert.AreEqual (f1.Family, f2.Family);
+ Assert.AreEqual (33d, f2.Size);
+ Assert.AreEqual (f1.Stretch, f2.Stretch);
+ Assert.AreEqual (f1.Style, f2.Style);
+ Assert.AreEqual (f1.Weight, f2.Weight);
+ }
+
+ [Test]
+ public void WithStretch ()
+ {
+ var f1 = Font.SystemFont;
+ var f2 = f1.WithStretch (FontStretch.Condensed);
+ Assert.AreEqual (f1.Family, f2.Family);
+ Assert.AreEqual (f1.Size, f2.Size);
+ Assert.AreEqual (FontStretch.Condensed, f2.Stretch);
+ Assert.AreEqual (f1.Style, f2.Style);
+ Assert.AreEqual (f1.Weight, f2.Weight);
+ }
+
+ [Test]
+ public void WithStyle ()
+ {
+ var f1 = Font.SystemFont;
+ var f2 = f1.WithStyle (FontStyle.Oblique);
+ Assert.AreEqual (f1.Family, f2.Family);
+ Assert.AreEqual (f1.Size, f2.Size);
+ Assert.AreEqual (f1.Stretch, f2.Stretch);
+ Assert.AreEqual (FontStyle.Oblique, f2.Style);
+ Assert.AreEqual (f1.Weight, f2.Weight);
+ }
+
+ [Test]
+ public void WithWeight ()
+ {
+ var f1 = Font.SystemFont;
+ var f2 = f1.WithWeight (FontWeight.Bold);
+ Assert.AreEqual (f1.Family, f2.Family);
+ Assert.AreEqual (f1.Size, f2.Size);
+ Assert.AreEqual (f1.Stretch, f2.Stretch);
+ Assert.AreEqual (f1.Style, f2.Style);
+ Assert.AreEqual (FontWeight.Bold, f2.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamily ()
+ {
+ var f = Font.FromName ("Arial");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (Font.SystemFont.Size, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamilyIgnoreCase ()
+ {
+ var f = Font.FromName ("aRiaL");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (Font.SystemFont.Size, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlySize ()
+ {
+ var f = Font.FromName ("33");
+ Assert.AreEqual (Font.SystemFont.Family, f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamilyAndSize ()
+ {
+ var f = Font.FromName ("Arial 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamilyAndSizeWithFallbackSecondChoice ()
+ {
+ var f = Font.FromName ("Foobar, Arial, dummy, 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamilyAndSizeWithFallbackFirstChoice ()
+ {
+ var f = Font.FromName ("Arial, Foobar, dummy 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameOnlyFamilyAndSizeWithFallbackNoChoice ()
+ {
+ var f = Font.FromName ("Foobar, dummy 33");
+ Assert.AreEqual (Font.SystemFont.Family, f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameWithStyle ()
+ {
+ var f = Font.FromName ("Arial, dummy italic 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Italic, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameWithWeight ()
+ {
+ var f = Font.FromName ("Arial, dummy bold 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Normal, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Bold, f.Weight);
+ }
+
+ [Test]
+ public void FromNameWithStretch ()
+ {
+ var f = Font.FromName ("Arial, dummy condensed 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Condensed, f.Stretch);
+ Assert.AreEqual (FontStyle.Normal, f.Style);
+ Assert.AreEqual (FontWeight.Normal, f.Weight);
+ }
+
+ [Test]
+ public void FromNameWithAllStyles ()
+ {
+ var f = Font.FromName ("Arial, dummy expanded Oblique Light 33");
+ Assert.AreEqual ("Arial", f.Family);
+ Assert.AreEqual (33d, f.Size);
+ Assert.AreEqual (FontStretch.Expanded, f.Stretch);
+ Assert.AreEqual (FontStyle.Oblique, f.Style);
+ Assert.AreEqual (FontWeight.Light, f.Weight);
+ }
+
+ [Test]
+ public void FontEquals ()
+ {
+ var f1 = Font.FromName ("Arial expanded Oblique Light 33");
+ var f2 = Font.FromName ("Arial expanded Oblique Light 33");
+ Assert.IsTrue (f1.Equals (f2));
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/FrameTests.cs b/external/xwt/Testing/Tests/FrameTests.cs
new file mode 100644
index 0000000..c815733
--- /dev/null
+++ b/external/xwt/Testing/Tests/FrameTests.cs
@@ -0,0 +1,44 @@
+//
+// FrameTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class FrameTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Frame () { Label = "Hi there" };
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((Frame)parent).Content = child;
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/HBoxTests.cs b/external/xwt/Testing/Tests/HBoxTests.cs
new file mode 100644
index 0000000..a5e8e48
--- /dev/null
+++ b/external/xwt/Testing/Tests/HBoxTests.cs
@@ -0,0 +1,43 @@
+//
+// HBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HBoxTests: BoxTests
+ {
+ public override Box CreateBox ()
+ {
+ return new HBox ();
+ }
+
+ protected override Rectangle AdjustedRect (Rectangle r)
+ {
+ return r;
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/HPanedTests.cs b/external/xwt/Testing/Tests/HPanedTests.cs
new file mode 100644
index 0000000..d8b29d1
--- /dev/null
+++ b/external/xwt/Testing/Tests/HPanedTests.cs
@@ -0,0 +1,38 @@
+//
+// HPanedTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HPanedTests: PanedTests
+ {
+ public override Paned CreatePaned ()
+ {
+ return new HPaned ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/HSeparatorTests.cs b/external/xwt/Testing/Tests/HSeparatorTests.cs
new file mode 100644
index 0000000..34717a1
--- /dev/null
+++ b/external/xwt/Testing/Tests/HSeparatorTests.cs
@@ -0,0 +1,38 @@
+//
+// HSeparator.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class HSeparatorTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new HSeparator ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ImageViewTests.cs b/external/xwt/Testing/Tests/ImageViewTests.cs
new file mode 100644
index 0000000..ef6cd0a
--- /dev/null
+++ b/external/xwt/Testing/Tests/ImageViewTests.cs
@@ -0,0 +1,38 @@
+//
+// ImageViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ImageViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ImageView (StockIcons.Warning.WithSize (IconSize.Small));
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/LabelTests.cs b/external/xwt/Testing/Tests/LabelTests.cs
new file mode 100644
index 0000000..76c0855
--- /dev/null
+++ b/external/xwt/Testing/Tests/LabelTests.cs
@@ -0,0 +1,38 @@
+//
+// LabelTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class LabelTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Label ("Hello World");
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ListBoxTests.cs b/external/xwt/Testing/Tests/ListBoxTests.cs
new file mode 100644
index 0000000..1dc2d45
--- /dev/null
+++ b/external/xwt/Testing/Tests/ListBoxTests.cs
@@ -0,0 +1,48 @@
+//
+// ListBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class ListBoxTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ListBox ();
+ }
+
+ [Test]
+ public void DefaultValues ()
+ {
+ var list = new ListBox ();
+ Assert.AreEqual (ScrollPolicy.Automatic, list.VerticalScrollPolicy);
+ Assert.AreEqual (ScrollPolicy.Automatic, list.HorizontalScrollPolicy);
+ }
+
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ListViewTests.cs b/external/xwt/Testing/Tests/ListViewTests.cs
new file mode 100644
index 0000000..4fbce9c
--- /dev/null
+++ b/external/xwt/Testing/Tests/ListViewTests.cs
@@ -0,0 +1,38 @@
+//
+// ListViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ListViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ListView ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/MatrixTests.cs b/external/xwt/Testing/Tests/MatrixTests.cs
new file mode 100644
index 0000000..a00254d
--- /dev/null
+++ b/external/xwt/Testing/Tests/MatrixTests.cs
@@ -0,0 +1,443 @@
+//
+// MatrixTest.cs
+//
+// Authors:
+// Chris Toshok (toshok at ximian.com)
+// Lytico (http://www.limada.org)
+//
+// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
+// Copyright (c) 2013 http://www.limada.org
+//
+// 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.
+//
+// Remark: this file was refactored from
+// https://github.com/mono/mono/blob/master/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs
+// by lytico to be used with
+// https://github.com/mono/xwt
+//
+using System;
+using Xwt;
+using Xwt.Drawing;
+using NUnit.Framework;
+
+namespace Xwt
+{
+ [TestFixture]
+ public class MatrixTest
+ {
+ const double DELTA = 0.000000001d;
+
+ void CheckMatrix (Matrix expected, Matrix actual)
+ {
+ Assert.AreEqual (expected.M11, actual.M11, DELTA);
+ Assert.AreEqual (expected.M12, actual.M12, DELTA);
+ Assert.AreEqual (expected.M21, actual.M21, DELTA);
+ Assert.AreEqual (expected.M22, actual.M22, DELTA);
+ Assert.AreEqual (expected.OffsetX, actual.OffsetX, DELTA);
+ Assert.AreEqual (expected.OffsetY, actual.OffsetY, DELTA);
+ }
+
+ [Test]
+ public void TestAccessors ()
+ {
+ Matrix m = new Matrix (1, 2, 3, 4, 5, 6);
+ Assert.AreEqual (1, m.M11);
+ Assert.AreEqual (2, m.M12);
+ Assert.AreEqual (3, m.M21);
+ Assert.AreEqual (4, m.M22);
+ Assert.AreEqual (5, m.OffsetX);
+ Assert.AreEqual (6, m.OffsetY);
+ }
+
+ [Test]
+ public void Append ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.Append (m);
+ CheckMatrix (new Matrix (7, 10, 15, 22, 28, 40), m);
+ }
+
+ [Test]
+ public void Equals ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ Assert.IsTrue (m.Equals (new Matrix (1, 2, 3, 4, 5, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (0, 2, 3, 4, 5, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (1, 0, 3, 4, 5, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (1, 2, 0, 4, 5, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (1, 2, 3, 0, 5, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (1, 2, 3, 4, 0, 6)));
+ Assert.IsFalse (m.Equals (new Matrix (1, 2, 3, 4, 5, 0)));
+
+ Assert.IsFalse (m.Equals (0));
+ Assert.IsTrue (m.Equals ((object)m));
+ }
+
+ [Test]
+ public void Determinant ()
+ {
+ Assert.AreEqual (0, (new Matrix (2, 2, 2, 2, 0, 0)).Determinant);
+ Assert.AreEqual (-6, (new Matrix (1, 4, 2, 2, 0, 0)).Determinant);
+ Assert.AreEqual (1, (new Matrix (1, 0, 0, 1, 0, 0)).Determinant);
+ Assert.AreEqual (1, (new Matrix (1, 0, 0, 1, 5, 5)).Determinant);
+ Assert.AreEqual (-1, (new Matrix (0, 1, 1, 0, 5, 5)).Determinant);
+ }
+
+ [Test]
+ public void HasInverse ()
+ {
+ /* same matrices as in Determinant() */
+ Assert.IsFalse ((new Matrix (2, 2, 2, 2, 0, 0)).HasInverse);
+ Assert.IsTrue ((new Matrix (1, 4, 2, 2, 0, 0)).HasInverse);
+ Assert.IsTrue ((new Matrix (1, 0, 0, 1, 0, 0)).HasInverse);
+ Assert.IsTrue ((new Matrix (1, 0, 0, 1, 5, 5)).HasInverse);
+ Assert.IsTrue ((new Matrix (0, 1, 1, 0, 5, 5)).HasInverse);
+ }
+
+ [Test]
+ public void IsIdentity ()
+ {
+ Assert.IsTrue (Matrix.Identity.IsIdentity);
+ ;
+ Assert.IsFalse ((new Matrix (1, 0, 0, 1, 5, 5)).IsIdentity);
+ Assert.IsFalse ((new Matrix (5, 5, 5, 5, 5, 5)).IsIdentity);
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ // "Transform is not invertible."
+ public void InvertException1 ()
+ {
+ var m = new Matrix (2, 2, 2, 2, 0, 0);
+ m.Invert ();
+ }
+
+ [Test]
+ public void Invert ()
+ {
+ var m = new Matrix (1, 0, 0, 1, 0, 0);
+ m.Invert ();
+ CheckMatrix (new Matrix (1, 0, 0, 1, 0, 0), m);
+
+ m = new Matrix (1, 0, 0, 1, 5, 5);
+ m.Invert ();
+ CheckMatrix (new Matrix (1, 0, 0, 1, -5, -5), m);
+
+ m = new Matrix (1, 0, 0, 2, 5, 5);
+ m.Invert ();
+ CheckMatrix (new Matrix (1, 0, 0, 0.5, -5, -2.5), m);
+
+ m = new Matrix (0, 2, 4, 0, 5, 5);
+ m.Invert ();
+ CheckMatrix (new Matrix (0, 0.25, 0.5, 0, -2.5, -1.25), m);
+ }
+
+ [Test]
+ public void Identity ()
+ {
+ CheckMatrix (new Matrix (1, 0, 0, 1, 0, 0), Matrix.Identity);
+ }
+
+ [Test]
+ public void Multiply ()
+ {
+ CheckMatrix (new Matrix (5, 0, 0, 5, 10, 10),
+ Matrix.Multiply (new Matrix (1, 0, 0, 1, 2, 2),
+ new Matrix (5, 0, 0, 5, 0, 0)));
+
+ CheckMatrix (new Matrix (0, 0, 0, 0, 10, 10),
+ Matrix.Multiply (new Matrix (1, 0, 0, 1, 0, 0),
+ new Matrix (0, 0, 0, 0, 10, 10)));
+ }
+
+ [Test]
+ public void Prepend ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.Prepend (new Matrix (2, 4, 6, 8, 10, 12));
+
+ CheckMatrix (new Matrix (14, 20, 30, 44, 51, 74), m);
+ }
+
+ [Test]
+ public void Rotate ()
+ {
+ var m = Matrix.Identity;
+ m.Rotate (45);
+ CheckMatrix (new Matrix (0.707106781186548,
+ 0.707106781186547,
+ -0.707106781186547,
+ 0.707106781186548, 0, 0), m);
+
+ m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.Rotate (33);
+ CheckMatrix (new Matrix (-0.25060750208463,
+ 2.22198017090588,
+ 0.337455563776164,
+ 4.98859937682678,
+ 0.925518629636958,
+ 7.75521858274768), m);
+ }
+
+ [Test]
+ public void RotateAt ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.RotateAt (33, 5, 5);
+
+ CheckMatrix (new Matrix (-0.25060750208463,
+ 2.22198017090588,
+ 0.337455563776164,
+ 4.98859937682678,
+ 4.45536096498497,
+ 5.83867056794542), m);
+ }
+
+ [Test]
+ public void RotateAtPrepend ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.RotateAtPrepend (33, 5, 5);
+
+ CheckMatrix (new Matrix (2.47258767299051,
+ 3.85589727595096,
+ 1.97137266882125,
+ 2.26540420175164,
+ 2.78019829094125,
+ 5.39349261148701), m);
+ }
+
+ [Test]
+ public void RotatePrepend ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ m.RotatePrepend (33);
+
+ CheckMatrix (new Matrix (2.47258767299051,
+ 3.85589727595096,
+ 1.97137266882125,
+ 2.26540420175164,
+ 5, 6), m);
+ }
+
+ [Test]
+ public void RotateQuadrants ()
+ {
+ var matrix = new Matrix ();
+
+ Action<double, double, double, double, double> prove = (angle, m11, m12, m21, m22) => {
+ matrix.SetIdentity ();
+ matrix.Rotate (angle);
+ CheckMatrix (new Matrix (m11, m12, m21, m22, 0, 0), matrix);
+ };
+ prove (90, 0, 1, -1, 0);
+ prove (-90, 0, -1, 1, 0);
+ prove (180, -1, 0, 0, -1);
+ prove (-180, -1, 0, 0, -1);
+ prove (270, 0, -1, 1, 0);
+ prove (-270, 0, 1, -1, 0);
+ prove (0, 1, 0, 0, 1);
+ prove (360, 1, 0, 0, 1);
+ prove (-360, 1, 0, 0, 1);
+ prove (360 + 90, 0, 1, -1, 0);
+
+ }
+
+ [Test]
+ public void Scale ()
+ {
+ var m = Matrix.Identity;
+
+ m.Scale (5, 6);
+ CheckMatrix (new Matrix (5, 0, 0, 6, 0, 0), m);
+
+ m = new Matrix (1, 2, 2, 1, 3, 3);
+ m.Scale (5, 5);
+ CheckMatrix (new Matrix (5, 10, 10, 5, 15, 15), m);
+ }
+
+ [Test]
+ public void ScaleAt ()
+ {
+ var m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAt (2, 2, 0, 0);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 4, 4), m);
+
+ m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAt (2, 2, 4, 4);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 0, 0), m);
+
+ m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAt (2, 2, 2, 2);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 2, 2), m);
+ }
+
+ [Test]
+ public void ScaleAtPrepend ()
+ {
+ var m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAtPrepend (2, 2, 0, 0);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 2, 2), m);
+
+ m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAtPrepend (2, 2, 4, 4);
+ CheckMatrix (new Matrix (2, 0, 0, 2, -2, -2), m);
+
+ m = new Matrix (1, 0, 0, 1, 2, 2);
+ m.ScaleAtPrepend (2, 2, 2, 2);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 0, 0), m);
+ }
+
+ [Test]
+ public void ScalePrepend ()
+ {
+ var m = Matrix.Identity;
+
+ m.ScalePrepend (5, 6);
+ CheckMatrix (new Matrix (5, 0, 0, 6, 0, 0), m);
+
+ m = new Matrix (1, 2, 2, 1, 3, 3);
+ m.ScalePrepend (5, 5);
+ CheckMatrix (new Matrix (5, 10, 10, 5, 3, 3), m);
+ }
+
+ [Test]
+ public void SetIdentity ()
+ {
+ var m = new Matrix (5, 5, 5, 5, 5, 5);
+ m.SetIdentity ();
+ CheckMatrix (Matrix.Identity, m);
+ }
+
+ [Test]
+ public void Skew ()
+ {
+ var m = Matrix.Identity;
+
+ m.Skew (10, 15);
+ CheckMatrix (new Matrix (1,
+ 0.267949192431123,
+ 0.176326980708465,
+ 1, 0, 0), m);
+
+ m = new Matrix (1, 2, 2, 1, 3, 3);
+ m.Skew (10, 15);
+ CheckMatrix (new Matrix (1.35265396141693,
+ 2.26794919243112,
+ 2.17632698070847,
+ 1.53589838486225,
+ 3.52898094212539,
+ 3.80384757729337), m);
+ }
+
+ [Test]
+ public void SkewPrepend ()
+ {
+ var m = Matrix.Identity;
+
+ m.SkewPrepend (10, 15);
+ CheckMatrix (new Matrix (1,
+ 0.267949192431123,
+ 0.176326980708465,
+ 1, 0, 0), m);
+
+ m = new Matrix (1, 2, 2, 1, 3, 3);
+ m.SkewPrepend (10, 15);
+ CheckMatrix (new Matrix (1.53589838486225,
+ 2.26794919243112,
+ 2.17632698070847,
+ 1.35265396141693,
+ 3, 3), m);
+ }
+
+ [Test]
+ public void ToStringTest ()
+ {
+ var m = new Matrix (1, 2, 3, 4, 5, 6);
+ Assert.AreEqual ("Matrix{M11=1 M12=2 M21=3 M22=4 OffsetX=5 OffsetY=6}", m.ToString ());
+ m = Matrix.Identity;
+ Assert.AreEqual ("Matrix=Identity", m.ToString ());
+ }
+
+ [Test]
+ public void PointTransform ()
+ {
+ var m = new Matrix (2, 0, 0, 2, 4, 4);
+
+ var p = new Point (5, 6);
+
+ Assert.AreEqual (new Point (14, 16), m.Transform (p));
+
+ var ps = new Point[10];
+ for (int i = 0; i < ps.Length; i++)
+ ps [i] = new Point (3 * i, 2 * i);
+
+ m.Transform (ps);
+
+ for (int i = 0; i < ps.Length; i++)
+ Assert.AreEqual (m.Transform (new Point (3 * i, 2 * i)), ps [i]);
+ }
+
+ [Test]
+ public void VectorTransform ()
+ {
+ var m = new Matrix (2, 0, 0, 2, 4, 4);
+
+ var p = new Point (5, 6);
+
+ Assert.AreEqual (new Point (10, 12), m.TransformVector (p));
+
+ var ps = new Point[10];
+ for (int i = 0; i < ps.Length; i++)
+ ps [i] = new Point (3 * i, 2 * i);
+
+ m.TransformVector (ps);
+
+ for (int i = 0; i < ps.Length; i++)
+ Assert.AreEqual (m.TransformVector (new Point (3 * i, 2 * i)), ps [i]);
+ }
+
+ [Test]
+ public void Translate ()
+ {
+ var m = new Matrix (1, 0, 0, 1, 0, 0);
+ m.Translate (5, 5);
+ CheckMatrix (new Matrix (1, 0, 0, 1, 5, 5), m);
+
+ m = new Matrix (2, 0, 0, 2, 0, 0);
+ m.Translate (5, 5);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 5, 5), m);
+ }
+
+ [Test]
+ public void TranslatePrepend ()
+ {
+ var m = new Matrix (1, 0, 0, 1, 0, 0);
+ m.TranslatePrepend (5, 5);
+ CheckMatrix (new Matrix (1, 0, 0, 1, 5, 5), m);
+
+ m = new Matrix (2, 0, 0, 2, 0, 0);
+ m.TranslatePrepend (5, 5);
+ CheckMatrix (new Matrix (2, 0, 0, 2, 10, 10), m);
+ }
+
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/NotebookTests.cs b/external/xwt/Testing/Tests/NotebookTests.cs
new file mode 100644
index 0000000..e68ee98
--- /dev/null
+++ b/external/xwt/Testing/Tests/NotebookTests.cs
@@ -0,0 +1,43 @@
+//
+// NotebookTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class NotebookTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Notebook ();
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((Notebook)parent).Add (child, "Test");
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/PanedTests.cs b/external/xwt/Testing/Tests/PanedTests.cs
new file mode 100644
index 0000000..d46ba57
--- /dev/null
+++ b/external/xwt/Testing/Tests/PanedTests.cs
@@ -0,0 +1,45 @@
+//
+// PanedTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public abstract class PanedTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return CreatePaned ();
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((Paned)parent).Panel1.Content = child;
+ }
+
+ public abstract Paned CreatePaned ();
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ProgressBarTests.cs b/external/xwt/Testing/Tests/ProgressBarTests.cs
new file mode 100644
index 0000000..d7b33c5
--- /dev/null
+++ b/external/xwt/Testing/Tests/ProgressBarTests.cs
@@ -0,0 +1,38 @@
+//
+// ProgressBarTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ProgressBarTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ProgressBar ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/RadioButtonTests.cs b/external/xwt/Testing/Tests/RadioButtonTests.cs
new file mode 100644
index 0000000..fad40c3
--- /dev/null
+++ b/external/xwt/Testing/Tests/RadioButtonTests.cs
@@ -0,0 +1,217 @@
+//
+// RadioButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ public class RadioButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new RadioButton ();
+ }
+
+ [Test]
+ public void DefaultValues ()
+ {
+ var r = new RadioButton ();
+ Assert.IsTrue (r.Active);
+ Assert.NotNull (r.Group);
+ }
+
+ [Test]
+ public void ActiveProperty ()
+ {
+ var r = new RadioButton ();
+ Assert.IsTrue (r.Active);
+ r.Active = false;
+ Assert.IsFalse (r.Active);
+ r.Active = true;
+ Assert.IsTrue (r.Active);
+ }
+
+ [Test]
+ public void DefaultGroupSelection ()
+ {
+ // The first item added to a group is active by default
+ // Adding a radio to the group, doesn't change the active radio
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+
+ Assert.IsTrue (r1.Active);
+ Assert.IsTrue (r2.Active);
+ Assert.IsTrue (r3.Active);
+
+ r2.Group = r3.Group = r1.Group;
+
+ Assert.IsTrue (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+ }
+
+ [Test]
+ public void GroupSwitching ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+ Assert.IsTrue (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+
+ r2.Active = true;
+ Assert.IsFalse (r1.Active);
+ Assert.IsTrue (r2.Active);
+ Assert.IsFalse (r3.Active);
+
+ r3.Active = true;
+ Assert.IsFalse (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsTrue (r3.Active);
+
+ r1.Active = true;
+ Assert.IsTrue (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+ }
+
+ [Test]
+ public void AllRadiosDisabled ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+ Assert.IsTrue (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+
+ r1.Active = false;
+ Assert.IsFalse (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+ }
+
+ [Test]
+ public void ToggleEvent ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+
+ int changed1 = 0;
+ int changed2 = 0;
+ int ev = 1;
+
+ r1.ActiveChanged += delegate {
+ changed1 = ev++;
+ };
+
+ r2.ActiveChanged += delegate {
+ changed2 = ev++;
+ };
+
+ r2.Active = true;
+
+ Assert.IsFalse (r1.Active);
+ Assert.IsTrue (r2.Active);
+ Assert.AreEqual (1, changed1);
+ Assert.AreEqual (2, changed2);
+ }
+
+ [Test]
+ public void GroupActiveRadioButton ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+ r2.Active = true;
+ Assert.IsFalse (r1.Active);
+ Assert.IsTrue (r2.Active);
+ Assert.IsFalse (r3.Active);
+ Assert.AreSame (r2, r1.Group.ActiveRadioButton);
+ }
+
+ [Test]
+ public void GroupActiveChangeEvent ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+
+ int ev = 0;
+ RadioButton activeRadio = null;
+
+ r1.Group.ActiveRadioButtonChanged += delegate(object sender, EventArgs e) {
+ ev++;
+ activeRadio = r1.Group.ActiveRadioButton;
+ };
+
+ r1.Active = true;
+ Assert.AreEqual (0, ev);
+
+ ev = 0;
+ activeRadio = null;
+ r2.Active = true;
+ Assert.AreEqual (1, ev);
+ Assert.AreSame (r2, activeRadio);
+ Assert.AreSame (r2, r1.Group.ActiveRadioButton);
+
+ ev = 0;
+ activeRadio = null;
+ r3.Active = true;
+ Assert.AreEqual (1, ev);
+ Assert.AreSame (r3, activeRadio);
+ Assert.AreSame (r3, r1.Group.ActiveRadioButton);
+ }
+
+ [Test]
+ public void GroupClearActive ()
+ {
+ var r1 = new RadioButton ();
+ var r2 = new RadioButton ();
+ var r3 = new RadioButton ();
+ r2.Group = r3.Group = r1.Group;
+ r2.Active = true;
+ Assert.IsFalse (r1.Active);
+ Assert.IsTrue (r2.Active);
+ Assert.IsFalse (r3.Active);
+
+ r1.Group.ClearActive ();
+ Assert.IsFalse (r1.Active);
+ Assert.IsFalse (r2.Active);
+ Assert.IsFalse (r3.Active);
+ Assert.IsNull (r1.Group.ActiveRadioButton);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ReferenceImageManager.cs b/external/xwt/Testing/Tests/ReferenceImageManager.cs
new file mode 100644
index 0000000..e43c869
--- /dev/null
+++ b/external/xwt/Testing/Tests/ReferenceImageManager.cs
@@ -0,0 +1,205 @@
+//
+// ReferenceImageManager.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+using System.Collections.Generic;
+using System.IO;
+using NUnit.Framework;
+
+namespace Xwt
+{
+ public class ReferenceImageManager
+ {
+ internal static string ProjectReferenceImageDir;
+ public static string ProjectCustomReferenceImageDir;
+ public static bool RecheckAll;
+
+ internal static string FailedImageCacheDir;
+
+ public static List<FailedImageInfo> ImageFailures = new List<FailedImageInfo> ();
+
+ static ReferenceImageManager ()
+ {
+ }
+
+ public static void Init (string projectName)
+ {
+ var baseDir = Path.GetDirectoryName (typeof(ReferenceImageManager).Assembly.Location);
+ while (Path.GetFileName (baseDir) != "Testing")
+ baseDir = Path.GetDirectoryName (baseDir);
+ ProjectReferenceImageDir = Path.Combine (baseDir, "Tests", "ReferenceImages");
+ ProjectCustomReferenceImageDir = Path.Combine (baseDir, projectName, "ReferenceImages");
+ FailedImageCacheDir = Path.Combine (baseDir, "bin", projectName, "FailedImageCache");
+ }
+
+ public static Image LoadReferenceImage (string name)
+ {
+ var f = Path.Combine (ProjectReferenceImageDir, name);
+ if (File.Exists (f))
+ return Image.FromFile (f);
+ else
+ return null;
+ }
+
+ public static Image LoadCustomReferenceImage (string name)
+ {
+ var file = Path.Combine (ProjectCustomReferenceImageDir, name);
+ if (File.Exists (file))
+ return Image.FromFile (file);
+ else
+ return null;
+ }
+
+ public static void ShowImageVerifier ()
+ {
+ if (ImageFailures.Count > 0) {
+ var dlg = new ReferenceImageVerifierDialog ();
+ dlg.Run ();
+ }
+ }
+
+ static Image TryLoadImage (System.Reflection.Assembly asm, string name)
+ {
+ try {
+ if (asm.GetManifestResourceInfo (name) != null)
+ return Image.FromResource (asm, name);
+ }
+ catch {
+ }
+
+ try {
+ if (asm.GetManifestResourceInfo ("WpfTestRunner.ReferenceImages." + name) != null)
+ return Image.FromResource (asm, "WpfTestRunner.ReferenceImages." + name);
+ }
+ catch {
+ }
+ return null;
+ }
+
+ public static void CheckImage (string refImageName, Image img)
+ {
+ Image coreRefImage = LoadReferenceImage (refImageName);
+
+ Image refImage = !RecheckAll ? LoadCustomReferenceImage (refImageName) : null;
+ if (refImage == null)
+ refImage = coreRefImage;
+
+ if (refImage == null) {
+ ImageFailures.Add (new FailedImageInfo () {
+ TestImage = img,
+ ReferenceImage = img,
+ Name = refImageName,
+ TargetDir = ProjectReferenceImageDir
+ });
+ return;
+ }
+
+ var diff = DiffImages (img, refImage);
+ if (diff != null && refImage != coreRefImage) {
+ // Maybe the original image has changed
+ refImage = coreRefImage;
+ diff = DiffImages (img, refImage);
+ }
+
+ if (diff != null) {
+ bool knownFailure = false;
+ var failedImageFile = Path.Combine (FailedImageCacheDir, refImageName);
+ if (File.Exists (failedImageFile)) {
+ var failedImage = Image.FromFile (Path.Combine (FailedImageCacheDir, refImageName));
+ if (DiffImages (img, failedImage) == null)
+ knownFailure = true;
+ }
+
+ if (!knownFailure) {
+ ImageFailures.Add (new FailedImageInfo () {
+ TestImage = img,
+ ReferenceImage = refImage,
+ DiffImage = diff,
+ Name = refImageName,
+ TargetDir = ProjectCustomReferenceImageDir
+ });
+ }
+ Assert.Fail ("Image " + refImageName + " doesn't match");
+ }
+ }
+
+ public static Image DiffImages (Image img1, Image img2)
+ {
+ bool foundDifference = false;
+ var bmp1 = img1.ToBitmap ();
+ var bmp2 = img2.ToBitmap ();
+ var res = new ImageBuilder ((int)Math.Min (bmp1.Size.Width, bmp2.Size.Width), (int) Math.Min (bmp1.Size.Height, bmp2.Size.Height));
+ var bmpr = res.ToBitmap ();
+ res.Dispose ();
+ for (int y=0; y<bmp1.Size.Height && y < bmp2.Size.Height; y++) {
+ for (int x=0; x<bmp1.Size.Width && x<bmp2.Size.Height; x++) {
+ var p1 = bmp1.GetPixel (x, y);
+ var p2 = bmp2.GetPixel (x, y);
+ var col = Colors.White;
+ if (p1 != p2) {
+ foundDifference = true;
+ var r = Math.Pow (p1.Red - p2.Red, 2) + Math.Pow (p1.Green - p2.Green, 2) + Math.Pow (p1.Blue - p2.Blue, 2) + Math.Pow (p1.Alpha - p2.Alpha, 2);
+ if (r < 0.01)
+ col = new Color (0.9, 0.9, 0.9);
+ else if (r < 0.1)
+ col = new Color (0.7, 0.7, 0.7);
+ else
+ col = Colors.Red;
+ }
+ bmpr.SetPixel (x, y, col);
+ }
+ }
+ if (foundDifference)
+ return bmpr;
+ else
+ return null;
+ }
+ }
+
+ public class FailedImageInfo
+ {
+ public Image TestImage { get; set; }
+ public Image ReferenceImage { get; set; }
+ public Image DiffImage { get; set; }
+ public string Name { get; set; }
+ public string TargetDir { get; set; }
+
+ public void Validate ()
+ {
+ if (!Directory.Exists (TargetDir))
+ Directory.CreateDirectory (TargetDir);
+ TestImage.Save (Path.Combine (TargetDir, Name), ImageFileType.Png);
+ }
+
+ public void Fail ()
+ {
+ if (!Directory.Exists (ReferenceImageManager.FailedImageCacheDir))
+ Directory.CreateDirectory (ReferenceImageManager.FailedImageCacheDir);
+ TestImage.Save (Path.Combine (ReferenceImageManager.FailedImageCacheDir, Name), ImageFileType.Png);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ReferenceImageVerifierDialog.cs b/external/xwt/Testing/Tests/ReferenceImageVerifierDialog.cs
new file mode 100644
index 0000000..ceea784
--- /dev/null
+++ b/external/xwt/Testing/Tests/ReferenceImageVerifierDialog.cs
@@ -0,0 +1,113 @@
+//
+// ReferenceImageVerifierDialog.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt;
+
+namespace Xwt
+{
+ public class ReferenceImageVerifierDialog: Dialog
+ {
+ int currentImage = -1;
+ ImageView img1;
+ ImageView img2;
+ ImageView imgDiff;
+ Label nameLabel;
+
+ Button closeButton;
+ Button validButton;
+ Button failButton;
+
+ public ReferenceImageVerifierDialog ()
+ {
+ Width = 500;
+ Height = 300;
+
+ Table table = new Table ();
+ table.DefaultRowSpacing = table.DefaultColumnSpacing = 6;
+
+ table.Add (nameLabel = new Label (), 0, 0, hexpand:true);
+ table.Add (new Label ("Reference Image"), 0, 1, hexpand:true);
+ table.Add (new Label ("Test Image"), 1, 1, hexpand:true);
+ nameLabel.Font = nameLabel.Font.WithWeight (Xwt.Drawing.FontWeight.Bold);
+
+ img1 = new ImageView ();
+ table.Add (img1, 0, 2, hexpand:true, vexpand:true);
+
+ imgDiff = new ImageView ();
+ table.Add (imgDiff, 1, 2, hexpand:true, vexpand:true);
+
+ img2 = new ImageView ();
+ table.Add (img2, 2, 2, hexpand:true, vexpand:true);
+
+ var buttonBox = new HBox ();
+ table.Add (buttonBox, 0, 3, colspan:2, hexpand:true);
+
+ closeButton = new Button ("Close");
+ validButton = new Button ("Success");
+ failButton = new Button ("Failure");
+
+ buttonBox.PackEnd (closeButton);
+ buttonBox.PackEnd (failButton);
+ buttonBox.PackEnd (validButton);
+
+ closeButton.Clicked += delegate {
+ Respond (Command.Ok);
+ };
+
+ failButton.Clicked += delegate {
+ var info = ReferenceImageManager.ImageFailures[currentImage];
+ info.Fail ();
+ ShowNextImage ();
+ };
+
+ validButton.Clicked += delegate {
+ var info = ReferenceImageManager.ImageFailures[currentImage];
+ info.Validate ();
+ ShowNextImage ();
+ };
+
+ Content = table;
+ ShowNextImage ();
+ }
+
+ void ShowNextImage ()
+ {
+ currentImage++;
+ if (currentImage >= ReferenceImageManager.ImageFailures.Count) {
+ validButton.Sensitive = false;
+ failButton.Sensitive = false;
+ return;
+ }
+ var info = ReferenceImageManager.ImageFailures [currentImage];
+ nameLabel.Text = info.Name;
+ img1.Image = info.ReferenceImage;
+ img2.Image = info.TestImage;
+ imgDiff.Image = info.DiffImage;
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Arc.png b/external/xwt/Testing/Tests/ReferenceImages/Arc.png
new file mode 100644
index 0000000..e7b8103
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Arc.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcClosePath.png b/external/xwt/Testing/Tests/ReferenceImages/ArcClosePath.png
new file mode 100644
index 0000000..a3a432a
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcClosePath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcFill.png b/external/xwt/Testing/Tests/ReferenceImages/ArcFill.png
new file mode 100644
index 0000000..a169831
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcFill.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcMultipleLoops.png b/external/xwt/Testing/Tests/ReferenceImages/ArcMultipleLoops.png
new file mode 100644
index 0000000..f743346
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcMultipleLoops.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegative.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegative.png
new file mode 100644
index 0000000..20da5e9
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegative.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeClosePath.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeClosePath.png
new file mode 100644
index 0000000..1658157
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeClosePath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeFill.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeFill.png
new file mode 100644
index 0000000..60b9b08
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeFill.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeMultipleLoops.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeMultipleLoops.png
new file mode 100644
index 0000000..e6ed409
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeMultipleLoops.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativePathConnection.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativePathConnection.png
new file mode 100644
index 0000000..fbe7264
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativePathConnection.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeStartingNegative.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeStartingNegative.png
new file mode 100644
index 0000000..93a8ae3
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeStartingNegative.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeSwappedAngles.png b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeSwappedAngles.png
new file mode 100644
index 0000000..3a2dcde
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcNegativeSwappedAngles.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcPathConnection.png b/external/xwt/Testing/Tests/ReferenceImages/ArcPathConnection.png
new file mode 100644
index 0000000..84a7eb8
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcPathConnection.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcStartingNegative.png b/external/xwt/Testing/Tests/ReferenceImages/ArcStartingNegative.png
new file mode 100644
index 0000000..5751884
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcStartingNegative.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ArcSwappedAngles.png b/external/xwt/Testing/Tests/ReferenceImages/ArcSwappedAngles.png
new file mode 100644
index 0000000..e0187e9
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ArcSwappedAngles.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Clip.png b/external/xwt/Testing/Tests/ReferenceImages/Clip.png
new file mode 100644
index 0000000..a3b1a31
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Clip.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ClipAccumulated.png b/external/xwt/Testing/Tests/ReferenceImages/ClipAccumulated.png
new file mode 100644
index 0000000..7102b42
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ClipAccumulated.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ClipPreserve.png b/external/xwt/Testing/Tests/ReferenceImages/ClipPreserve.png
new file mode 100644
index 0000000..c2276e0
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ClipPreserve.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ClipSaveRestore.png b/external/xwt/Testing/Tests/ReferenceImages/ClipSaveRestore.png
new file mode 100644
index 0000000..a3b1a31
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ClipSaveRestore.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Curve.png b/external/xwt/Testing/Tests/ReferenceImages/Curve.png
new file mode 100644
index 0000000..fb0dc2f
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Curve.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/CurveClosePath.png b/external/xwt/Testing/Tests/ReferenceImages/CurveClosePath.png
new file mode 100644
index 0000000..10f32cd
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/CurveClosePath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/CurveFillWithHoles.png b/external/xwt/Testing/Tests/ReferenceImages/CurveFillWithHoles.png
new file mode 100644
index 0000000..ea529eb
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/CurveFillWithHoles.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/CurvePathConnection.png b/external/xwt/Testing/Tests/ReferenceImages/CurvePathConnection.png
new file mode 100644
index 0000000..5796d56
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/CurvePathConnection.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/DrawPathTwoTimes.png b/external/xwt/Testing/Tests/ReferenceImages/DrawPathTwoTimes.png
new file mode 100644
index 0000000..98e80ab
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/DrawPathTwoTimes.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/FillPreserve.png b/external/xwt/Testing/Tests/ReferenceImages/FillPreserve.png
new file mode 100644
index 0000000..e43a50b
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/FillPreserve.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePattern.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePattern.png
new file mode 100644
index 0000000..acc8c92
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePattern.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInCircle.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInCircle.png
new file mode 100644
index 0000000..186b2a6
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInCircle.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInTriangle.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInTriangle.png
new file mode 100644
index 0000000..fdeccbf
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternInTriangle.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithAlpha.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithAlpha.png
new file mode 100644
index 0000000..4b0741b
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithAlpha.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransform.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransform.png
new file mode 100644
index 0000000..eed9fd1
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransform.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png
new file mode 100644
index 0000000..7138cff
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithRotateTransformWithAlpha.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransform.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransform.png
new file mode 100644
index 0000000..b22212d
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransform.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png
new file mode 100644
index 0000000..48a915e
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithScaleTransformWithAlpha.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransform.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransform.png
new file mode 100644
index 0000000..33219ab
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransform.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransformWithAlpha.png b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransformWithAlpha.png
new file mode 100644
index 0000000..9cc3a3b
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/ImagePatternWithTranslateTransformWithAlpha.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Line.png b/external/xwt/Testing/Tests/ReferenceImages/Line.png
new file mode 100644
index 0000000..1c5293c
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Line.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LineClosePath.png b/external/xwt/Testing/Tests/ReferenceImages/LineClosePath.png
new file mode 100644
index 0000000..64761d7
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LineClosePath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LineWidth.png b/external/xwt/Testing/Tests/ReferenceImages/LineWidth.png
new file mode 100644
index 0000000..b844fd0
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LineWidth.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LinearGradient.png b/external/xwt/Testing/Tests/ReferenceImages/LinearGradient.png
new file mode 100644
index 0000000..5815269
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LinearGradient.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LinearGradientDiagonal.png b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientDiagonal.png
new file mode 100644
index 0000000..6438d4d
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientDiagonal.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LinearGradientInternalBox.png b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientInternalBox.png
new file mode 100644
index 0000000..d3d0ff4
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientInternalBox.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/LinearGradientReverse.png b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientReverse.png
new file mode 100644
index 0000000..922fd18
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/LinearGradientReverse.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/NewPath.png b/external/xwt/Testing/Tests/ReferenceImages/NewPath.png
new file mode 100644
index 0000000..19dac83
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/NewPath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/RadialGradient.png b/external/xwt/Testing/Tests/ReferenceImages/RadialGradient.png
new file mode 100644
index 0000000..3631677
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/RadialGradient.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/RadialGradientReverse.png b/external/xwt/Testing/Tests/ReferenceImages/RadialGradientReverse.png
new file mode 100644
index 0000000..7a0770f
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/RadialGradientReverse.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/RadialGradientSmall.png b/external/xwt/Testing/Tests/ReferenceImages/RadialGradientSmall.png
new file mode 100644
index 0000000..80ca10d
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/RadialGradientSmall.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Rectangle.png b/external/xwt/Testing/Tests/ReferenceImages/Rectangle.png
new file mode 100644
index 0000000..8ad5809
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Rectangle.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/RectangleFill.png b/external/xwt/Testing/Tests/ReferenceImages/RectangleFill.png
new file mode 100644
index 0000000..29853ff
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/RectangleFill.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/RectanglePathConnection.png b/external/xwt/Testing/Tests/ReferenceImages/RectanglePathConnection.png
new file mode 100644
index 0000000..3653aa9
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/RectanglePathConnection.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreColor.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreColor.png
new file mode 100644
index 0000000..544a7e5
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreColor.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreImagePattern.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreImagePattern.png
new file mode 100644
index 0000000..c8c7f30
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreImagePattern.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLineWidth.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLineWidth.png
new file mode 100644
index 0000000..5629493
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLineWidth.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLinearGradient.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLinearGradient.png
new file mode 100644
index 0000000..d77e015
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreLinearGradient.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestorePath.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestorePath.png
new file mode 100644
index 0000000..3e9f7b9
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestorePath.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreRadialGradient.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreRadialGradient.png
new file mode 100644
index 0000000..d77e015
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreRadialGradient.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreTransform.png b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreTransform.png
new file mode 100644
index 0000000..a4557d3
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/SaveRestoreTransform.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/StrokePreserve.png b/external/xwt/Testing/Tests/ReferenceImages/StrokePreserve.png
new file mode 100644
index 0000000..f0d8992
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/StrokePreserve.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/Text.png b/external/xwt/Testing/Tests/ReferenceImages/Text.png
new file mode 100644
index 0000000..a419b5b
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/Text.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/TextLineBreak.png b/external/xwt/Testing/Tests/ReferenceImages/TextLineBreak.png
new file mode 100644
index 0000000..34367a4
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/TextLineBreak.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/TextSize.png b/external/xwt/Testing/Tests/ReferenceImages/TextSize.png
new file mode 100644
index 0000000..5de630f
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/TextSize.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/TextTrimmingEllipsis.png b/external/xwt/Testing/Tests/ReferenceImages/TextTrimmingEllipsis.png
new file mode 100644
index 0000000..9c9f911
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/TextTrimmingEllipsis.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/TextWithBlankLines.png b/external/xwt/Testing/Tests/ReferenceImages/TextWithBlankLines.png
new file mode 100644
index 0000000..2c7469b
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/TextWithBlankLines.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/TextWordWrap.png b/external/xwt/Testing/Tests/ReferenceImages/TextWordWrap.png
new file mode 100644
index 0000000..030c6ab
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/TextWordWrap.png differ
diff --git a/external/xwt/Testing/Tests/ReferenceImages/pattern-sample.png b/external/xwt/Testing/Tests/ReferenceImages/pattern-sample.png
new file mode 100644
index 0000000..8d510f2
Binary files /dev/null and b/external/xwt/Testing/Tests/ReferenceImages/pattern-sample.png differ
diff --git a/external/xwt/Testing/Tests/ScrollViewTests.cs b/external/xwt/Testing/Tests/ScrollViewTests.cs
new file mode 100644
index 0000000..028e333
--- /dev/null
+++ b/external/xwt/Testing/Tests/ScrollViewTests.cs
@@ -0,0 +1,43 @@
+//
+// ScrollViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class ScrollViewTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ScrollView ();
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((ScrollView)parent).Content = child;
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ScrollbarTests.cs b/external/xwt/Testing/Tests/ScrollbarTests.cs
new file mode 100644
index 0000000..195c35a
--- /dev/null
+++ b/external/xwt/Testing/Tests/ScrollbarTests.cs
@@ -0,0 +1,56 @@
+//
+// ScrollbarTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public abstract class ScrollbarTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return CreateScrollbar ();
+ }
+
+ public abstract Scrollbar CreateScrollbar ();
+ }
+
+ public class HScrollbarTests: ScrollbarTests
+ {
+ public override Scrollbar CreateScrollbar ()
+ {
+ return new HScrollbar ();
+ }
+ }
+
+ public class VScrollbarTests: ScrollbarTests
+ {
+ public override Scrollbar CreateScrollbar ()
+ {
+ return new VScrollbar ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/SegmentedButtonTests.cs b/external/xwt/Testing/Tests/SegmentedButtonTests.cs
new file mode 100644
index 0000000..a08ec1c
--- /dev/null
+++ b/external/xwt/Testing/Tests/SegmentedButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// SegmentedButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class SegmentedButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new SegmentedButton ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/SliderTests.cs b/external/xwt/Testing/Tests/SliderTests.cs
new file mode 100644
index 0000000..e0e5430
--- /dev/null
+++ b/external/xwt/Testing/Tests/SliderTests.cs
@@ -0,0 +1,56 @@
+//
+// SliderTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public abstract class SliderTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return CreateSlider ();
+ }
+
+ public abstract Slider CreateSlider ();
+ }
+
+ public class VSliderTests: SliderTests
+ {
+ public override Slider CreateSlider ()
+ {
+ return new VSlider ();
+ }
+ }
+
+ public class HSliderTests: SliderTests
+ {
+ public override Slider CreateSlider ()
+ {
+ return new HSlider ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/SpinButtonTests.cs b/external/xwt/Testing/Tests/SpinButtonTests.cs
new file mode 100644
index 0000000..498563b
--- /dev/null
+++ b/external/xwt/Testing/Tests/SpinButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// SpinButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class SpinButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new SpinButton ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/SpinnerTests.cs b/external/xwt/Testing/Tests/SpinnerTests.cs
new file mode 100644
index 0000000..94b89e3
--- /dev/null
+++ b/external/xwt/Testing/Tests/SpinnerTests.cs
@@ -0,0 +1,38 @@
+//
+// SpinnerTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class SpinnerTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new Spinner ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/TableTests.cs b/external/xwt/Testing/Tests/TableTests.cs
new file mode 100644
index 0000000..bb3235a
--- /dev/null
+++ b/external/xwt/Testing/Tests/TableTests.cs
@@ -0,0 +1,46 @@
+//
+// TableTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class TableTests: ContainerTests
+ {
+ public override Widget CreateWidget ()
+ {
+ var t = new Table ();
+ t.Add (new Label ("Hello Worlds"), 0, 0);
+ return t;
+ }
+
+ protected override void AddChild (Widget parent, Widget child)
+ {
+ ((Table)parent).Clear ();
+ ((Table)parent).Add (child, 0, 0, hexpand: true, vexpand: true);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/Test.csproj b/external/xwt/Testing/Tests/Test.csproj
new file mode 100644
index 0000000..dd47c99
--- /dev/null
+++ b/external/xwt/Testing/Tests/Test.csproj
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3C7623A9-9E16-41F6-BBB2-0B550F28E749}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Test</RootNamespace>
+ <AssemblyName>Test</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>False</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework">
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ButtonTests.cs" />
+ <Compile Include="WidgetTests.cs" />
+ <Compile Include="Setup.cs" />
+ <Compile Include="TextEntryTests.cs" />
+ <Compile Include="HBoxTests.cs" />
+ <Compile Include="VBoxTests.cs" />
+ <Compile Include="CanvasTests.cs" />
+ <Compile Include="CheckBoxTests.cs" />
+ <Compile Include="ComboBoxTests.cs" />
+ <Compile Include="ComboBoxEntryTests.cs" />
+ <Compile Include="FrameTests.cs" />
+ <Compile Include="HPanedTests.cs" />
+ <Compile Include="VPanedTests.cs" />
+ <Compile Include="HSeparatorTests.cs" />
+ <Compile Include="ImageViewTests.cs" />
+ <Compile Include="LabelTests.cs" />
+ <Compile Include="ListBoxTests.cs" />
+ <Compile Include="ListViewTests.cs" />
+ <Compile Include="NotebookTests.cs" />
+ <Compile Include="ProgressBarTests.cs" />
+ <Compile Include="ScrollViewTests.cs" />
+ <Compile Include="SpinButtonTests.cs" />
+ <Compile Include="TableTests.cs" />
+ <Compile Include="VSeparatorTests.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Gtk\Xwt.Gtk.csproj">
+ <Project>{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}</Project>
+ <Name>Xwt.Gtk</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Testing/Tests/Tests.csproj b/external/xwt/Testing/Tests/Tests.csproj
new file mode 100644
index 0000000..6e1a138
--- /dev/null
+++ b/external/xwt/Testing/Tests/Tests.csproj
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8C624AB7-8195-4AE5-98CE-5F8676821AF7}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Tests</RootNamespace>
+ <AssemblyName>Tests</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunitlite">
+ <HintPath>..\libs\nunitlite.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="ButtonTests.cs" />
+ <Compile Include="CanvasTests.cs" />
+ <Compile Include="CheckBoxTests.cs" />
+ <Compile Include="ComboBoxEntryTests.cs" />
+ <Compile Include="ComboBoxTests.cs" />
+ <Compile Include="FrameTests.cs" />
+ <Compile Include="HBoxTests.cs" />
+ <Compile Include="HPanedTests.cs" />
+ <Compile Include="HSeparatorTests.cs" />
+ <Compile Include="ImageViewTests.cs" />
+ <Compile Include="LabelTests.cs" />
+ <Compile Include="ListBoxTests.cs" />
+ <Compile Include="ListViewTests.cs" />
+ <Compile Include="NotebookTests.cs" />
+ <Compile Include="ProgressBarTests.cs" />
+ <Compile Include="ScrollViewTests.cs" />
+ <Compile Include="SpinButtonTests.cs" />
+ <Compile Include="TableTests.cs" />
+ <Compile Include="TextEntryTests.cs" />
+ <Compile Include="VBoxTests.cs" />
+ <Compile Include="VPanedTests.cs" />
+ <Compile Include="VSeparatorTests.cs" />
+ <Compile Include="WidgetTests.cs" />
+ <Compile Include="ConsoleTestRunner.cs" />
+ <Compile Include="BoxTests.cs" />
+ <Compile Include="DrawingTests.cs" />
+ <Compile Include="ReferenceImageVerifierDialog.cs" />
+ <Compile Include="ReferenceImageManager.cs" />
+ <Compile Include="FontTests.cs" />
+ <Compile Include="ColorTests.cs" />
+ <Compile Include="MatrixTests.cs" />
+ <Compile Include="TransformTests.cs" />
+ <Compile Include="RadioButtonTests.cs" />
+ <Compile Include="WindowTests.cs" />
+ <Compile Include="XwtTest.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Test.csproj" />
+ <None Include="Tests.csproj" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="ReferenceImages\" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="ReferenceImages\Rectangle.png">
+ <LogicalName>Rectangle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\Line.png">
+ <LogicalName>Line.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\pattern-sample.png">
+ <LogicalName>pattern-sample.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePattern.png">
+ <LogicalName>ImagePattern.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithTranslateTransform.png">
+ <LogicalName>ImagePatternWithTranslateTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\Clip.png">
+ <LogicalName>Clip.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ClipAccumulated.png">
+ <LogicalName>ClipAccumulated.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ClipPreserve.png">
+ <LogicalName>ClipPreserve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ClipSaveRestore.png">
+ <LogicalName>ClipSaveRestore.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\RectangleFill.png">
+ <LogicalName>RectangleFill.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\FillPreserve.png">
+ <LogicalName>FillPreserve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\NewPath.png">
+ <LogicalName>NewPath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\StrokePreserve.png">
+ <LogicalName>StrokePreserve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LineWidth.png">
+ <LogicalName>LineWidth.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LinearGradient.png">
+ <LogicalName>LinearGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LinearGradientDiagonal.png">
+ <LogicalName>LinearGradientDiagonal.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LinearGradientReverse.png">
+ <LogicalName>LinearGradientReverse.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\RadialGradient.png">
+ <LogicalName>RadialGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\RadialGradientReverse.png">
+ <LogicalName>RadialGradientReverse.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\RadialGradientSmall.png">
+ <LogicalName>RadialGradientSmall.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\Arc.png">
+ <LogicalName>Arc.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcFill.png">
+ <LogicalName>ArcFill.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcMultipleLoops.png">
+ <LogicalName>ArcMultipleLoops.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegative.png">
+ <LogicalName>ArcNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativeFill.png">
+ <LogicalName>ArcNegativeFill.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativeMultipleLoops.png">
+ <LogicalName>ArcNegativeMultipleLoops.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativePathConnection.png">
+ <LogicalName>ArcNegativePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativeStartingNegative.png">
+ <LogicalName>ArcNegativeStartingNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativeSwappedAngles.png">
+ <LogicalName>ArcNegativeSwappedAngles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcPathConnection.png">
+ <LogicalName>ArcPathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcStartingNegative.png">
+ <LogicalName>ArcStartingNegative.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcSwappedAngles.png">
+ <LogicalName>ArcSwappedAngles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LinearGradientInternalBox.png">
+ <LogicalName>LinearGradientInternalBox.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternInCircle.png">
+ <LogicalName>ImagePatternInCircle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternInTriangle.png">
+ <LogicalName>ImagePatternInTriangle.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithRotateTransform.png">
+ <LogicalName>ImagePatternWithRotateTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithScaleTransform.png">
+ <LogicalName>ImagePatternWithScaleTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreColor.png">
+ <LogicalName>SaveRestoreColor.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreImagePattern.png">
+ <LogicalName>SaveRestoreImagePattern.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreLinearGradient.png">
+ <LogicalName>SaveRestoreLinearGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreLineWidth.png">
+ <LogicalName>SaveRestoreLineWidth.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestorePath.png">
+ <LogicalName>SaveRestorePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreRadialGradient.png">
+ <LogicalName>SaveRestoreRadialGradient.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\SaveRestoreTransform.png">
+ <LogicalName>SaveRestoreTransform.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\Curve.png">
+ <LogicalName>Curve.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\CurvePathConnection.png">
+ <LogicalName>CurvePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\RectanglePathConnection.png">
+ <LogicalName>RectanglePathConnection.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcClosePath.png">
+ <LogicalName>ArcClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ArcNegativeClosePath.png">
+ <LogicalName>ArcNegativeClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\CurveClosePath.png">
+ <LogicalName>CurveClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\CurveFillWithHoles.png">
+ <LogicalName>CurveFillWithHoles.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\LineClosePath.png">
+ <LogicalName>LineClosePath.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\Text.png">
+ <LogicalName>Text.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\TextLineBreak.png">
+ <LogicalName>TextLineBreak.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\TextSize.png">
+ <LogicalName>TextSize.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\TextTrimmingEllipsis.png">
+ <LogicalName>TextTrimmingEllipsis.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\TextWithBlankLines.png">
+ <LogicalName>TextWithBlankLines.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\TextWordWrap.png">
+ <LogicalName>TextWordWrap.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\DrawPathTwoTimes.png">
+ <LogicalName>DrawPathTwoTimes.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithAlpha.png">
+ <LogicalName>ImagePatternWithAlpha.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithRotateTransformWithAlpha.png">
+ <LogicalName>ImagePatternWithRotateTransformWithAlpha.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithScaleTransformWithAlpha.png">
+ <LogicalName>ImagePatternWithScaleTransformWithAlpha.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ReferenceImages\ImagePatternWithTranslateTransformWithAlpha.png">
+ <LogicalName>ImagePatternWithTranslateTransformWithAlpha.png</LogicalName>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties>
+ <Policies>
+ <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileName" />
+ </Policies>
+ </Properties>
+ </MonoDevelop>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Testing/Tests/TextEntryTests.cs b/external/xwt/Testing/Tests/TextEntryTests.cs
new file mode 100644
index 0000000..310f9b0
--- /dev/null
+++ b/external/xwt/Testing/Tests/TextEntryTests.cs
@@ -0,0 +1,38 @@
+//
+// TextEntryTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class TextEntryTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new TextEntry ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/ToggleButtonTests.cs b/external/xwt/Testing/Tests/ToggleButtonTests.cs
new file mode 100644
index 0000000..35bdbbf
--- /dev/null
+++ b/external/xwt/Testing/Tests/ToggleButtonTests.cs
@@ -0,0 +1,38 @@
+//
+// ToggleButtonTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class ToggleButtonTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new ToggleButton ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/TransformTests.cs b/external/xwt/Testing/Tests/TransformTests.cs
new file mode 100644
index 0000000..54b0661
--- /dev/null
+++ b/external/xwt/Testing/Tests/TransformTests.cs
@@ -0,0 +1,162 @@
+//
+// TransformTests.cs
+//
+// Author:
+// Hywel Thomas <hywel.w.thomas at gmail.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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 Xwt;
+using Xwt.Drawing;
+using NUnit.Framework;
+
+namespace Xwt
+{
+ /// <summary>
+ /// Checks the backend Context transforms against the local Drawing.Matrix operations
+ /// (which are tested separately), and access to the Current Transform via GetCTM
+ /// </summary>
+ /// <remarks>
+ /// The backend matrix formats may differ from the Drawing.Matrix one, so a check of
+ /// the functional equivalence of the local and backend transformations is important
+ /// </remarks>
+ [TestFixture]
+ public class TransformTests
+ {
+ const double DELTA = 0.000000001d;
+
+ ImageBuilder ib = null;
+ Context context = null;
+
+ [TestFixtureSetUp]
+ public void Init ()
+ {
+ ib = new ImageBuilder (10, 10);
+ context = ib.Context;
+ }
+
+ [TestFixtureTearDown]
+ public void Cleanup ()
+ {
+ if (context != null)
+ context.Dispose ();
+
+ if (ib != null)
+ ib.Dispose ();
+ }
+
+ private Context NewContext {
+ get { return context; }
+ }
+
+ void CheckMatrix (Matrix expected, Matrix actual)
+ {
+ Assert.AreEqual (expected.M11, actual.M11, DELTA);
+ Assert.AreEqual (expected.M12, actual.M12, DELTA);
+ Assert.AreEqual (expected.M21, actual.M21, DELTA);
+ Assert.AreEqual (expected.M22, actual.M22, DELTA);
+ Assert.AreEqual (expected.OffsetX, actual.OffsetX, DELTA);
+ Assert.AreEqual (expected.OffsetY, actual.OffsetY, DELTA);
+ }
+
+ [Test]
+ public void NewCTM ()
+ {
+ Matrix mI = Matrix.Identity;
+ Context ctx = NewContext;
+ CheckMatrix (mI, ctx.GetCTM ());
+ }
+
+ [Test]
+ public void Translate ()
+ {
+ Matrix m1, m2;
+ Context ctx = NewContext;
+
+ // Check with a range of -ve and +ve offsets
+ for (double tx = -1; tx <= 1; tx += 0.25) {
+ ctx.Save ();
+ ctx.Translate (tx, 0);
+ m1 = Matrix.Identity;
+ m1.Translate (tx, 0);
+ m2 = ctx.GetCTM ();
+ CheckMatrix (m1, m2);
+ ctx.Restore ();
+ }
+ for (double ty = -1; ty <= 1; ty += 0.25) {
+ ctx.Save ();
+ ctx.Translate (0, ty);
+ m1 = Matrix.Identity;
+ m1.Translate (0, ty);
+ m2 = ctx.GetCTM ();
+ CheckMatrix (m1, m2);
+ ctx.Restore ();
+ }
+ }
+
+ [Test]
+ public void Scale ()
+ {
+ Matrix m1, m2;
+ Context ctx = NewContext;
+
+ // Scaling with a zero scale-factor results in a non-invertible matrix
+ // This fails with Cairo, so avoid zero as one of the test values
+ for (double scaleX = -1.25; scaleX <= 1.25; scaleX += 0.5) {
+ ctx.Save ();
+ ctx.Scale (scaleX, 1);
+ m1 = Matrix.Identity;
+ m1.Scale (scaleX, 1);
+ m2 = ctx.GetCTM ();
+ CheckMatrix (m1, m2);
+ ctx.Restore ();
+ }
+ for (double scaleY = -1.25; scaleY <= 1.25; scaleY += 0.5) {
+ ctx.Save ();
+ ctx.Scale (1, scaleY);
+ m1 = Matrix.Identity;
+ m1.Scale (1, scaleY);
+ m2 = ctx.GetCTM ();
+ CheckMatrix (m1, m2);
+ ctx.Restore ();
+ }
+ }
+
+ [Test]
+ public void Rotate ()
+ {
+ Matrix m1, m2;
+ Context ctx = NewContext;
+
+ for (double theta = 0; theta <= 360; theta += 30) {
+ ctx.Save ();
+ ctx.Rotate (theta);
+ m1 = Matrix.Identity;
+ m1.Rotate (theta);
+ m2 = ctx.GetCTM ();
+ CheckMatrix (m1, m2);
+ ctx.Restore ();
+ }
+ }
+
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/TreeViewTests.cs b/external/xwt/Testing/Tests/TreeViewTests.cs
new file mode 100644
index 0000000..e2fec1c
--- /dev/null
+++ b/external/xwt/Testing/Tests/TreeViewTests.cs
@@ -0,0 +1,38 @@
+//
+// TreeViewTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class TreeViewTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new TreeView ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/VBoxTests.cs b/external/xwt/Testing/Tests/VBoxTests.cs
new file mode 100644
index 0000000..8ce9c03
--- /dev/null
+++ b/external/xwt/Testing/Tests/VBoxTests.cs
@@ -0,0 +1,45 @@
+//
+// VBoxTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+
+namespace Xwt
+{
+ [TestFixture]
+ public class VBoxTests: BoxTests
+ {
+ public override Box CreateBox ()
+ {
+ return new VBox ();
+ }
+
+ protected override Rectangle AdjustedRect (Rectangle r)
+ {
+ return new Rectangle (r.Y, r.X, r.Height, r.Width);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/VPanedTests.cs b/external/xwt/Testing/Tests/VPanedTests.cs
new file mode 100644
index 0000000..270648c
--- /dev/null
+++ b/external/xwt/Testing/Tests/VPanedTests.cs
@@ -0,0 +1,38 @@
+//
+// VPanedTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class VPanedTests: PanedTests
+ {
+ public override Paned CreatePaned ()
+ {
+ return new VPaned ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/VScrollbar.cs b/external/xwt/Testing/Tests/VScrollbar.cs
new file mode 100644
index 0000000..6000a96
--- /dev/null
+++ b/external/xwt/Testing/Tests/VScrollbar.cs
@@ -0,0 +1,37 @@
+//
+// VScrollbar.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace GtkTestRunner
+{
+ public class VScrollbar
+ {
+ public VScrollbar ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/VSeparatorTests.cs b/external/xwt/Testing/Tests/VSeparatorTests.cs
new file mode 100644
index 0000000..44563c8
--- /dev/null
+++ b/external/xwt/Testing/Tests/VSeparatorTests.cs
@@ -0,0 +1,38 @@
+//
+// VSeparatorTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt
+{
+ public class VSeparatorTests: WidgetTests
+ {
+ public override Widget CreateWidget ()
+ {
+ return new VSeparator ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/WidgetTests.cs b/external/xwt/Testing/Tests/WidgetTests.cs
new file mode 100644
index 0000000..9e2510a
--- /dev/null
+++ b/external/xwt/Testing/Tests/WidgetTests.cs
@@ -0,0 +1,335 @@
+//
+// Widget.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 NUnit.Framework;
+using System.Threading;
+
+namespace Xwt
+{
+ [TestFixture]
+ public abstract class WidgetTests: XwtTest
+ {
+ public abstract Widget CreateWidget ();
+
+ [TestFixtureSetUp]
+ public void Init ()
+ {
+ }
+
+ [TestFixtureTearDown]
+ public void Cleanup ()
+ {
+ }
+
+ [Test]
+ public void Visibility ()
+ {
+ var w = CreateWidget ();
+ Assert.IsTrue (w.Visible, "Not visible by default");
+ w.Hide ();
+ Assert.IsFalse (w.Visible);
+ w.Show ();
+ Assert.IsTrue (w.Visible);
+ w.Visible = false;
+ Assert.IsFalse (w.Visible);
+ w.Visible = true;
+ Assert.IsTrue (w.Visible);
+ }
+
+ [Test]
+ public void Sensitivity ()
+ {
+ var w = CreateWidget ();
+ Assert.IsTrue (w.Sensitive, "Not sensitive by default");
+ w.Sensitive = false;
+ Assert.IsFalse (w.Sensitive);
+ w.Sensitive = true;
+ Assert.IsTrue (w.Sensitive);
+ }
+
+ [Test]
+ public void ParentWindow ()
+ {
+ var w = CreateWidget ();
+ var win = new Window ();
+ win.Content = w;
+ Assert.AreSame (win, w.ParentWindow);
+ win.Dispose ();
+ }
+
+ [Test]
+ public void Margin ()
+ {
+ var w = CreateWidget ();
+ Assert.AreEqual (0, w.Margin.Left);
+ Assert.AreEqual (0, w.Margin.Top);
+ Assert.AreEqual (0, w.Margin.Right);
+ Assert.AreEqual (0, w.Margin.Bottom);
+ w.Margin = 4;
+ Assert.AreEqual (4, w.Margin.Left);
+ Assert.AreEqual (4, w.Margin.Top);
+ Assert.AreEqual (4, w.Margin.Right);
+ Assert.AreEqual (4, w.Margin.Bottom);
+ w.Margin = new WidgetSpacing (10, 20, 30, 40);
+ Assert.AreEqual (10, w.Margin.Left);
+ Assert.AreEqual (20, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.MarginLeft = 1;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (20, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.MarginTop = 2;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (30, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.MarginRight = 3;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (3, w.Margin.Right);
+ Assert.AreEqual (40, w.Margin.Bottom);
+ w.MarginBottom = 4;
+ Assert.AreEqual (1, w.Margin.Left);
+ Assert.AreEqual (2, w.Margin.Top);
+ Assert.AreEqual (3, w.Margin.Right);
+ Assert.AreEqual (4, w.Margin.Bottom);
+ }
+
+ [Test]
+ public void Focus ()
+ {
+ using (var win = new Window ()) {
+ var w = CreateWidget ();
+
+ HBox box = new HBox ();
+ TextEntry e = new TextEntry ();
+ box.PackStart (e);
+ box.PackStart (w);
+ win.Content = box;
+ win.Show ();
+ win.Present ();
+
+ Application.MainLoop.DispatchPendingEvents ();
+
+ e.SetFocus ();
+
+ Application.MainLoop.DispatchPendingEvents ();
+
+ Assert.IsFalse (w.HasFocus);
+ // Assert.IsTrue (w.CanGetFocus);
+
+ int gotFocus = 0;
+ w.GotFocus += delegate {
+ gotFocus++;
+ };
+
+ w.SetFocus ();
+
+ if (w.CanGetFocus) {
+ Assert.IsTrue (w.HasFocus);
+ Assert.AreEqual (1, gotFocus);
+
+ int lostFocus = 0;
+ w.LostFocus += delegate {
+ lostFocus++;
+ };
+
+ e.SetFocus ();
+
+ Assert.IsFalse (w.HasFocus);
+ // Assert.AreEqual (1, lostFocus);
+ } else {
+ Assert.IsFalse (w.HasFocus);
+ Assert.AreEqual (0, gotFocus);
+ }
+ }
+ }
+
+ [Test]
+ public void MinSize ()
+ {
+ using (var win = new Window ()) {
+ var w = CreateWidget ();
+
+ VBox box1 = new VBox ();
+ HBox box2 = new HBox ();
+ HBox f = new HBox ();
+ f.MinWidth = 10;
+ f.MinHeight = 10;
+ box1.PackStart (box2);
+ box2.PackStart (f);
+ f.PackStart (w, true);
+ win.Content = box1;
+
+ ShowWindow (win);
+
+ WaitForEvents ();
+ var defw = w.Size.Width;
+ var defh = w.Size.Height;
+
+ w.MinWidth = 300;
+ w.MinHeight = 400;
+ WaitForEvents ();
+ Assert.AreEqual (300d, w.MinWidth);
+ Assert.AreEqual (300d, w.Size.Width);
+
+ Assert.AreEqual (400d, w.MinHeight);
+ Assert.AreEqual (400d, w.Size.Height);
+
+ w.MinWidth = -1;
+ w.MinHeight = -1;
+
+ WaitForEvents ();
+ Assert.AreEqual (-1, w.MinWidth);
+ Assert.AreEqual (defw, w.Size.Width);
+
+ Assert.AreEqual (-1, w.MinHeight);
+ Assert.AreEqual (defh, w.Size.Height);
+ }
+ }
+
+ [Test]
+ public void Coordinates ()
+ {
+ double padding = 40;
+ using (var win = new Window ()) {
+ var w = CreateWidget ();
+ w.MinWidth = 1;
+ w.MinHeight = 1;
+ win.Content = w;
+ win.Padding = padding;
+ win.Location = new Point (300,300);
+
+ ShowWindow (win);
+
+ Assert.AreEqual (win.ScreenBounds.Inflate (-padding,-padding), w.ScreenBounds);
+ }
+ }
+
+ public void VerifyMargin (SquareBox box)
+ {
+ var r1 = box.ScreenBounds;
+
+ box.Margin = new WidgetSpacing (5, 10, 15, 20);
+ WaitForEvents ();
+ var r2 = box.ScreenBounds;
+
+ Assert.AreEqual (r1.Left + 5, r2.Left);
+ Assert.AreEqual (r1.Top + 10, r2.Top);
+ Assert.AreEqual (r1.Width - 20, r2.Width);
+ Assert.AreEqual (r1.Height - 30, r2.Height);
+
+ box.Margin = 0;
+ WaitForEvents ();
+ r2 = box.ScreenBounds;
+ Assert.AreEqual (r1, r2);
+ }
+
+ public void VerifyAlignment (SquareBox box)
+ {
+ var r1 = box.ScreenBounds;
+
+ // Horizontal Fill
+
+ box.HorizontalPlacement = WidgetPlacement.Fill;
+ box.VerticalPlacement = WidgetPlacement.Fill;
+ WaitForEvents ();
+ Assert.AreEqual (r1, box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Start;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, r1.Top, r1.Width, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Center;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, Math.Truncate (r1.Center.Y - 5), r1.Width, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.End;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, r1.Bottom - 10, r1.Width, 10), box.ScreenBounds);
+
+ // Horizontal Start
+
+ box.HorizontalPlacement = WidgetPlacement.Start;
+ box.VerticalPlacement = WidgetPlacement.Fill;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, r1.Top, 10, r1.Height), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Start;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, r1.Top, 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Center;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, Math.Truncate (r1.Center.Y - 5), 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.End;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Left, r1.Bottom - 10, 10, 10), box.ScreenBounds);
+
+ // Horizontal Center
+
+ box.HorizontalPlacement = WidgetPlacement.Center;
+ box.VerticalPlacement = WidgetPlacement.Fill;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (Math.Truncate (r1.Center.X - 5), r1.Top, 10, r1.Height), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Start;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (Math.Truncate (r1.Center.X - 5), r1.Top, 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Center;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (Math.Truncate (r1.Center.X - 5), Math.Truncate (r1.Center.Y - 5), 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.End;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (Math.Truncate (r1.Center.X - 5), r1.Bottom - 10, 10, 10), box.ScreenBounds);
+
+ // Horizontal End
+
+ box.HorizontalPlacement = WidgetPlacement.End;
+ box.VerticalPlacement = WidgetPlacement.Fill;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Right - 10, r1.Top, 10, r1.Height), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Start;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Right - 10, r1.Top, 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.Center;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Right - 10, Math.Truncate (r1.Center.Y) - 5, 10, 10), box.ScreenBounds);
+
+ box.VerticalPlacement = WidgetPlacement.End;
+ WaitForEvents ();
+ Assert.AreEqual (new Rectangle (r1.Right - 10, r1.Bottom - 10, 10, 10), box.ScreenBounds);
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/WindowTests.cs b/external/xwt/Testing/Tests/WindowTests.cs
new file mode 100644
index 0000000..e683b51
--- /dev/null
+++ b/external/xwt/Testing/Tests/WindowTests.cs
@@ -0,0 +1,259 @@
+//
+// WindowTests.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+using Xwt.Drawing;
+
+namespace Xwt
+{
+ public class WindowTests: XwtTest
+ {
+ [Test]
+ public void DefaultSize ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ var test = new VariableSizeBox (200);
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (100, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (100, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void FlexibleContentGrowMakesWindowNotGrow ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ var test = new VariableSizeBox (200);
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (100, win.Size.Height);
+ test.Size = 300;
+ // The preferred size grows, but the widget honors the constraint given
+ // by the window (the initial size of the window), so it doesn't make
+ // the window grow
+ WaitForEvents ();
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (100, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (100, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void FixedContentGrowMakesWindowGrow ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ var test = new VariableSizeBox (200);
+ test.ForceSize = true;
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (100, win.Size.Height);
+ test.Size = 300;
+ // The preferred size grows, and it is bigger that the constraint provided
+ // by the window (the initial size of the window), so the window grows to adapt
+ WaitForEvents ();
+ Assert.AreEqual (300, win.Size.Width);
+ Assert.AreEqual (150, win.Size.Height);
+ Assert.AreEqual (300, test.ScreenBounds.Width);
+ Assert.AreEqual (150, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void ContentWidthGrows ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ var test = new VariableSizeBox (200);
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (100, win.Size.Height);
+ win.Width = 300;
+ WaitForEvents ();
+ Assert.AreEqual (300, win.Size.Width);
+ Assert.AreEqual (150, win.Size.Height);
+ Assert.AreEqual (300, test.ScreenBounds.Width);
+ Assert.AreEqual (150, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void FixedWidth ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ var test = new VariableSizeBox (200);
+ win.Content = test;
+ win.Width = 300;
+ ShowWindow (win);
+ WaitForEvents ();
+ Assert.AreEqual (300, win.Size.Width);
+ Assert.AreEqual (150, win.Size.Height);
+ Assert.AreEqual (300, test.ScreenBounds.Width);
+ Assert.AreEqual (150, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void DefaultSizeWithMinContentSize ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ SquareBox test = new SquareBox ();
+ test.MinWidth = 200;
+ test.MinHeight = 200;
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (200, win.Size.Width);
+ Assert.AreEqual (200, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (200, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void ContentMargin ()
+ {
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ SquareBox test = new SquareBox ();
+ test.MinWidth = 200;
+ test.MinHeight = 200;
+ test.Margin = 5;
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (210, win.Size.Width);
+ Assert.AreEqual (210, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (200, test.ScreenBounds.Height);
+ }
+ }
+
+ [Test]
+ public void ContentMarginChange ()
+ {
+ // The size of the window grows if a specific size has not been set
+ using (var win = new Window ()) {
+ win.Padding = 0;
+ SquareBox test = new SquareBox ();
+ test.MinWidth = 200;
+ test.MinHeight = 200;
+ test.Margin = 5;
+ win.Content = test;
+ ShowWindow (win);
+ Assert.AreEqual (210, win.Size.Width);
+ Assert.AreEqual (210, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (200, test.ScreenBounds.Height);
+ test.Margin = 10;
+ WaitForEvents ();
+ Assert.AreEqual (220, win.Size.Width);
+ Assert.AreEqual (220, win.Size.Height);
+ Assert.AreEqual (200, test.ScreenBounds.Width);
+ Assert.AreEqual (200, test.ScreenBounds.Height);
+ }
+ }
+ }
+
+ public class SquareBox: Canvas
+ {
+ double size;
+
+ public SquareBox (double size = 10)
+ {
+ this.size = size;
+ }
+
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ return new Size (size, size);
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle dirtyRect)
+ {
+ ctx.Rectangle (dirtyRect);
+ ctx.SetColor (Colors.Red);
+ ctx.Fill ();
+ }
+ }
+
+ class VariableSizeBox: Canvas
+ {
+ double size;
+ bool forceSize;
+
+ public VariableSizeBox (double size)
+ {
+ this.size = size;
+ }
+
+ public new double Size {
+ get { return size; }
+ set {
+ size = value;
+ OnPreferredSizeChanged ();
+ }
+ }
+
+ public bool ForceSize {
+ get { return forceSize; }
+ set {
+ forceSize = value;
+ OnPreferredSizeChanged ();
+ }
+ }
+
+ // The height of this widget is always half of the width
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ if (widthConstraint.IsConstrained) {
+ var w = forceSize ? Math.Max (size, widthConstraint.AvailableSize) : widthConstraint.AvailableSize;
+ return new Size (w, w / 2);
+ } else if (heightConstraint.IsConstrained) {
+ var h = forceSize ? Math.Max (size / 2, widthConstraint.AvailableSize) : widthConstraint.AvailableSize;
+ return new Size (h * 2, h);
+ }
+ return new Size (size, size / 2);
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle dirtyRect)
+ {
+ ctx.Rectangle (dirtyRect);
+ ctx.SetColor (Colors.Red);
+ ctx.Fill ();
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/Tests/XwtTest.cs b/external/xwt/Testing/Tests/XwtTest.cs
new file mode 100644
index 0000000..3f00a44
--- /dev/null
+++ b/external/xwt/Testing/Tests/XwtTest.cs
@@ -0,0 +1,88 @@
+//
+// XwtTest.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Threading;
+using NUnit.Framework;
+
+namespace Xwt
+{
+ public class XwtTest
+ {
+ public void Run (Action a)
+ {
+ Exception ex = null;
+ Application.Invoke (delegate {
+ try {
+ a ();
+ } catch (Exception e) {
+ ex = e;
+ }
+ Application.Exit ();
+ });
+ Application.Run ();
+ if (ex != null)
+ throw new Exception ("Exception in gui event loop", ex);
+ }
+
+ protected void WaitForEvents (int ms = 1)
+ {
+ DateTime t = DateTime.Now;
+ do {
+ Application.MainLoop.DispatchPendingEvents ();
+ System.Threading.Thread.Sleep (20);
+ } while ((DateTime.Now - t).TotalMilliseconds < ms);
+ }
+
+ public void ShowWindow (Window win)
+ {
+ var ev = new ManualResetEvent (false);
+
+ win.Shown += delegate {
+ ev.Set ();
+ };
+
+ win.Show ();
+ ev.WaitForEvent ();
+ Application.MainLoop.DispatchPendingEvents ();
+ }
+ }
+
+ static class EventHelper
+ {
+ public static void WaitForEvent (this ManualResetEvent ev)
+ {
+ DateTime t = DateTime.Now;
+ do {
+ Application.MainLoop.DispatchPendingEvents ();
+ if (ev.WaitOne (100))
+ return;
+ } while ((DateTime.Now - t).TotalMilliseconds < 1000);
+
+ Assert.Fail ("Event not fired");
+ }
+ }
+}
+
diff --git a/external/xwt/Testing/WpfTestRunner.csproj b/external/xwt/Testing/WpfTestRunner.csproj
new file mode 100644
index 0000000..97b5dee
--- /dev/null
+++ b/external/xwt/Testing/WpfTestRunner.csproj
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WpfTestRunner</RootNamespace>
+ <AssemblyName>WpfTestRunner</AssemblyName>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>True</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="nunit-console-runner">
+ <HintPath>libs\nunit-console-runner.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core">
+ <HintPath>libs\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces">
+ <HintPath>libs\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.util">
+ <HintPath>libs\nunit.util.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="nunit.framework">
+ <HintPath>libs\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="WpfTestRunner\Program.cs" />
+ <Compile Include="WpfTestRunner\Properties\AssemblyInfo.cs" />
+ <Compile Include="Tests\BoxTests.cs" />
+ <Compile Include="Tests\ButtonTests.cs" />
+ <Compile Include="Tests\CanvasTests.cs" />
+ <Compile Include="Tests\CheckBoxTests.cs" />
+ <Compile Include="Tests\ColorTests.cs" />
+ <Compile Include="Tests\ComboBoxEntryTests.cs" />
+ <Compile Include="Tests\ComboBoxTests.cs" />
+ <Compile Include="Tests\ConsoleTestRunner.cs" />
+ <Compile Include="Tests\DrawingTests.cs" />
+ <Compile Include="Tests\FontTests.cs" />
+ <Compile Include="Tests\FrameTests.cs" />
+ <Compile Include="Tests\HBoxTests.cs" />
+ <Compile Include="Tests\HPanedTests.cs" />
+ <Compile Include="Tests\HSeparatorTests.cs" />
+ <Compile Include="Tests\ImageViewTests.cs" />
+ <Compile Include="Tests\LabelTests.cs" />
+ <Compile Include="Tests\ListBoxTests.cs" />
+ <Compile Include="Tests\ListViewTests.cs" />
+ <Compile Include="Tests\MatrixTests.cs" />
+ <Compile Include="Tests\NotebookTests.cs" />
+ <Compile Include="Tests\ProgressBarTests.cs" />
+ <Compile Include="Tests\RadioButtonTests.cs" />
+ <Compile Include="Tests\ReferenceImageManager.cs" />
+ <Compile Include="Tests\ReferenceImageVerifierDialog.cs" />
+ <Compile Include="Tests\ScrollViewTests.cs" />
+ <Compile Include="Tests\SpinButtonTests.cs" />
+ <Compile Include="Tests\TableTests.cs" />
+ <Compile Include="Tests\TextEntryTests.cs" />
+ <Compile Include="Tests\TransformTests.cs" />
+ <Compile Include="Tests\VBoxTests.cs" />
+ <Compile Include="Tests\VPanedTests.cs" />
+ <Compile Include="Tests\VSeparatorTests.cs" />
+ <Compile Include="Tests\WidgetTests.cs" />
+ <Compile Include="Tests\WindowTests.cs" />
+ <Compile Include="Tests\XwtTest.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt.WPF\Xwt.WPF.csproj">
+ <Project>{C93D746E-1586-4D4F-B411-BF5A966E6A08}</Project>
+ <Name>Xwt.WPF</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Testing/WpfTestRunner/Program.cs b/external/xwt/Testing/WpfTestRunner/Program.cs
new file mode 100644
index 0000000..0226f36
--- /dev/null
+++ b/external/xwt/Testing/WpfTestRunner/Program.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Xwt;
+
+namespace WpfTestRunner
+{
+ class Program
+ {
+ [STAThread]
+ static void Main (string[] args)
+ {
+ Xwt.Application.Initialize (Xwt.ToolkitType.Wpf);
+ ReferenceImageManager.Init ("GtkTestRunner");
+
+ var list = new List<string> (args);
+ list.Add ("-domain=None");
+ list.Add ("-noshadow");
+ list.Add ("-nothread");
+ list.Add ("-xml=result.xml");
+// list.Add ("-fixture=Xwt.WindowTests");
+// list.Add ("-run=Xwt.WindowTests.DefaultSize");
+ list.Add (typeof (Program).Assembly.Location);
+ NUnit.ConsoleRunner.Runner.Main (list.ToArray ());
+ ReferenceImageManager.ShowImageVerifier ();
+ }
+ }
+}
diff --git a/external/xwt/Testing/WpfTestRunner/Properties/AssemblyInfo.cs b/external/xwt/Testing/WpfTestRunner/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..466bf5d
--- /dev/null
+++ b/external/xwt/Testing/WpfTestRunner/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle ("WpfTestRunner")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("WpfTestRunner")]
+[assembly: AssemblyCopyright ("Copyright © 2013")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible (false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid ("9bda4397-320d-4c8f-929d-81172bc889fb")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyFileVersion ("1.0.0.0")]
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/Arc.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Arc.png
new file mode 100644
index 0000000..8083914
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Arc.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcClosePath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcClosePath.png
new file mode 100644
index 0000000..5a4683c
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcClosePath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcFill.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcFill.png
new file mode 100644
index 0000000..6938d25
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcFill.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcMultipleLoops.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcMultipleLoops.png
new file mode 100644
index 0000000..fcfd05b
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcMultipleLoops.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegative.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegative.png
new file mode 100644
index 0000000..a399d18
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegative.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeClosePath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeClosePath.png
new file mode 100644
index 0000000..7b6d3b1
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeClosePath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeFill.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeFill.png
new file mode 100644
index 0000000..e631c74
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeFill.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png
new file mode 100644
index 0000000..b5f7989
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeMultipleLoops.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativePathConnection.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativePathConnection.png
new file mode 100644
index 0000000..512ceb1
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativePathConnection.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeStartingNegative.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeStartingNegative.png
new file mode 100644
index 0000000..8a512bc
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeStartingNegative.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png
new file mode 100644
index 0000000..81e00aa
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcNegativeSwappedAngles.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcPathConnection.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcPathConnection.png
new file mode 100644
index 0000000..17aa78b
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcPathConnection.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcStartingNegative.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcStartingNegative.png
new file mode 100644
index 0000000..f3c1734
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcStartingNegative.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcSwappedAngles.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcSwappedAngles.png
new file mode 100644
index 0000000..5ffd36a
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ArcSwappedAngles.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/Curve.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Curve.png
new file mode 100644
index 0000000..7653103
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Curve.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveClosePath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveClosePath.png
new file mode 100644
index 0000000..6f64e98
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveClosePath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveFillWithHoles.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveFillWithHoles.png
new file mode 100644
index 0000000..b823904
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurveFillWithHoles.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurvePathConnection.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurvePathConnection.png
new file mode 100644
index 0000000..48b0778
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/CurvePathConnection.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInCircle.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInCircle.png
new file mode 100644
index 0000000..f5a406e
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInCircle.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInTriangle.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInTriangle.png
new file mode 100644
index 0000000..07c6d9b
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternInTriangle.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png
new file mode 100644
index 0000000..e5fc3ac
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/ImagePatternWithScaleTransform.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/LineClosePath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LineClosePath.png
new file mode 100644
index 0000000..bfd0c61
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LineClosePath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradient.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradient.png
new file mode 100644
index 0000000..61b48e1
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradient.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientDiagonal.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientDiagonal.png
new file mode 100644
index 0000000..80d5f0d
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientDiagonal.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientInternalBox.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientInternalBox.png
new file mode 100644
index 0000000..253dbf9
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientInternalBox.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientReverse.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientReverse.png
new file mode 100644
index 0000000..998c71f
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/LinearGradientReverse.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/NewPath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/NewPath.png
new file mode 100644
index 0000000..b475a5b
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/NewPath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/RectanglePathConnection.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/RectanglePathConnection.png
new file mode 100644
index 0000000..8fa1472
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/RectanglePathConnection.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/SaveRestorePath.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/SaveRestorePath.png
new file mode 100644
index 0000000..29f920a
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/SaveRestorePath.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/Text.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Text.png
new file mode 100644
index 0000000..a419b5b
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/Text.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextLineBreak.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextLineBreak.png
new file mode 100644
index 0000000..34367a4
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextLineBreak.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextSize.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextSize.png
new file mode 100644
index 0000000..5de630f
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextSize.png differ
diff --git a/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextWordWrap.png b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextWordWrap.png
new file mode 100644
index 0000000..030c6ab
Binary files /dev/null and b/external/xwt/Testing/WpfTestRunner/ReferenceImages/TextWordWrap.png differ
diff --git a/external/xwt/Xwt.Gtk.Mac/Xwt.Gtk.Mac.csproj b/external/xwt/Xwt.Gtk.Mac/Xwt.Gtk.Mac.csproj
new file mode 100644
index 0000000..aae472a
--- /dev/null
+++ b/external/xwt/Xwt.Gtk.Mac/Xwt.Gtk.Mac.csproj
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FB234220-D409-43D9-8926-E2D629A19285}</ProjectGuid>
+ <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Xwt.Gtk.Mac</RootNamespace>
+ <AssemblyName>Xwt.Gtk.Mac</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <EnableCodeSigning>false</EnableCodeSigning>
+ <CreatePackage>false</CreatePackage>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <EnableCodeSigning>false</EnableCodeSigning>
+ <CreatePackage>false</CreatePackage>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
+ <SpecificVersion>False</SpecificVersion>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+ <ItemGroup>
+ <Folder Include="Xwt.GtkBackend.Mac\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Xwt.GtkBackend.Mac\PopoverMacBackend.cs" />
+ <Compile Include="Xwt.GtkBackend.Mac\GtkMacInterop.cs" />
+ <Compile Include="Xwt.GtkBackend.Mac\GtkMacEngine.cs" />
+ <Compile Include="Xwt.GtkBackend.Mac\GtkCocoaProxy.cs" />
+ <Compile Include="Xwt.GtkBackend.Mac\ForeignPlugMacBackend.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Gtk\Xwt.Gtk.csproj">
+ <Project>{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}</Project>
+ <Name>Xwt.Gtk</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xwt.Mac\Xwt.Mac.csproj">
+ <Project>{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}</Project>
+ <Name>Xwt.Mac</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoContextBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoContextBackendHandler.cs
index ff9a4b9..5f346ac 100644
--- a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoContextBackendHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoContextBackendHandler.cs
@@ -27,8 +27,10 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using Xwt.Drawing;
+using Xwt.GtkBackend;
+using System.Collections.Generic;
namespace Xwt.CairoBackend
{
@@ -37,6 +39,19 @@ namespace Xwt.CairoBackend
public double GlobalAlpha = 1;
public Cairo.Context Context;
public Cairo.Surface TempSurface;
+ public double ScaleFactor = 1;
+ public double PatternAlpha = 1;
+
+ Stack<Data> dataStack = new Stack<Data> ();
+
+ struct Data {
+ public double PatternAlpha;
+ }
+
+ public CairoContextBackend (double scaleFactor)
+ {
+ ScaleFactor = scaleFactor;
+ }
public void Dispose ()
{
@@ -49,29 +64,46 @@ namespace Xwt.CairoBackend
d.Dispose ();
}
}
+
+ public void Save ()
+ {
+ Context.Save ();
+ dataStack.Push (new Data () {
+ PatternAlpha = PatternAlpha
+ });
+ }
+
+ public void Restore ()
+ {
+ Context.Restore ();
+ var d = dataStack.Pop ();
+ PatternAlpha = d.PatternAlpha;
+ }
}
- public class CairoContextBackendHandler: IContextBackendHandler
+ public class CairoContextBackendHandler: ContextBackendHandler
{
- public CairoContextBackendHandler ()
- {
+ public override bool DisposeHandleOnUiThread {
+ get {
+ return true;
+ }
}
#region IContextBackendHandler implementation
-
- public void Save (object backend)
+
+ public override void Save (object backend)
{
CairoContextBackend gc = (CairoContextBackend)backend;
- gc.Context.Save ();
+ gc.Save ();
}
- public void Restore (object backend)
+ public override void Restore (object backend)
{
CairoContextBackend gc = (CairoContextBackend)backend;
- gc.Context.Restore ();
+ gc.Restore ();
}
- public void SetGlobalAlpha (object backend, double alpha)
+ public override void SetGlobalAlpha (object backend, double alpha)
{
CairoContextBackend gc = (CairoContextBackend) backend;
gc.GlobalAlpha = alpha;
@@ -79,188 +111,201 @@ namespace Xwt.CairoBackend
const double degrees = System.Math.PI / 180d;
- public void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
CairoContextBackend gc = (CairoContextBackend)backend;
gc.Context.Arc (xc, yc, radius, angle1 * degrees, angle2 * degrees);
}
- public void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
CairoContextBackend gc = (CairoContextBackend)backend;
gc.Context.ArcNegative (xc, yc, radius, angle1 * degrees, angle2 * degrees);
}
- public void Clip (object backend)
+ public override void Clip (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.Clip ();
}
- public void ClipPreserve (object backend)
+ public override void ClipPreserve (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.ClipPreserve ();
}
- public void ClosePath (object backend)
+ public override void ClosePath (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.ClosePath ();
}
- public void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
+ public override void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
{
CairoContextBackend gc = (CairoContextBackend) backend;
gc.Context.CurveTo (x1, y1, x2, y2, x3, y3);
}
- public void Fill (object backend)
+ public override void Fill (object backend)
{
var gtkc = (CairoContextBackend) backend;
Cairo.Context ctx = gtkc.Context;
- if (gtkc.GlobalAlpha == 1)
+ var alpha = gtkc.GlobalAlpha * gtkc.PatternAlpha;
+
+ if (alpha == 1)
ctx.Fill ();
else {
- ctx.PushGroup ();
- ctx.Fill ();
- ctx.PopGroupToSource ();
- ctx.PaintWithAlpha (gtkc.GlobalAlpha);
+ ctx.Save ();
+ ctx.Clip ();
+ ctx.PaintWithAlpha (alpha);
+ ctx.Restore ();
}
}
- public void FillPreserve (object backend)
+ public override void FillPreserve (object backend)
{
- Cairo.Context ctx = ((CairoContextBackend) backend).Context;
- ctx.FillPreserve ();
+ var gtkc = (CairoContextBackend) backend;
+ Cairo.Context ctx = gtkc.Context;
+ var alpha = gtkc.GlobalAlpha * gtkc.PatternAlpha;
+
+ if (alpha == 1)
+ ctx.FillPreserve ();
+ else {
+ ctx.Save ();
+ ctx.ClipPreserve ();
+ ctx.PaintWithAlpha (alpha);
+ ctx.Restore ();
+ }
}
- public void LineTo (object backend, double x, double y)
+ public override void LineTo (object backend, double x, double y)
{
CairoContextBackend gc = (CairoContextBackend) backend;
gc.Context.LineTo (x, y);
}
- public void MoveTo (object backend, double x, double y)
+ public override void MoveTo (object backend, double x, double y)
{
CairoContextBackend gc = (CairoContextBackend) backend;
gc.Context.MoveTo (x, y);
}
- public void NewPath (object backend)
+ public override void NewPath (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.NewPath ();
}
- public void Rectangle (object backend, double x, double y, double width, double height)
+ public override void Rectangle (object backend, double x, double y, double width, double height)
{
CairoContextBackend gc = (CairoContextBackend) backend;
gc.Context.Rectangle (x, y, width, height);
}
- public void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ public override void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.RelCurveTo (dx1, dy1, dx2, dy2, dx3, dy3);
}
- public void RelLineTo (object backend, double dx, double dy)
+ public override void RelLineTo (object backend, double dx, double dy)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.RelLineTo (dx, dy);
}
- public void RelMoveTo (object backend, double dx, double dy)
+ public override void RelMoveTo (object backend, double dx, double dy)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.RelMoveTo (dx, dy);
}
- public void Stroke (object backend)
+ public override void Stroke (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.Stroke ();
}
- public void StrokePreserve (object backend)
+ public override void StrokePreserve (object backend)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.StrokePreserve ();
}
- public void SetColor (object backend, Xwt.Drawing.Color color)
+ public override void SetColor (object backend, Xwt.Drawing.Color color)
{
var gtkContext = (CairoContextBackend) backend;
gtkContext.Context.Color = new Cairo.Color (color.Red, color.Green, color.Blue, color.Alpha * gtkContext.GlobalAlpha);
+ gtkContext.PatternAlpha = 1;
}
- public void SetLineWidth (object backend, double width)
+ public override void SetLineWidth (object backend, double width)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.LineWidth = width;
}
- public void SetLineDash (object backend, double offset, params double[] pattern)
+ public override void SetLineDash (object backend, double offset, params double[] pattern)
{
Cairo.Context ctx = ((CairoContextBackend) backend).Context;
ctx.SetDash (pattern, offset);
}
- public void SetPattern (object backend, object p)
+ public override void SetPattern (object backend, object p)
{
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
+ var cb = (CairoContextBackend)backend;
+
+ Cairo.Context ctx = cb.Context;
+ if (p is ImagePatternBackend) {
+ cb.PatternAlpha = ((ImagePatternBackend)p).Image.Alpha;
+ p = ((ImagePatternBackend)p).GetPattern (ApplicationContext, ((CairoContextBackend)backend).ScaleFactor);
+ } else
+ cb.PatternAlpha = 1;
+
if (p != null)
ctx.Pattern = (Cairo.Pattern) p;
else
ctx.Pattern = null;
}
- public void SetFont (object backend, Font font)
- {
- }
-
- public virtual void DrawTextLayout (object backend, TextLayout layout, double x, double y)
- {
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
- var lb = WidgetRegistry.GetBackend (layout);
- CairoTextLayoutBackendHandler.Draw (ctx, lb, x, y);
- }
-
- public void DrawImage (object backend, object img, double x, double y, double alpha)
+ public override void DrawTextLayout (object backend, TextLayout layout, double x, double y)
{
+ var be = (GtkTextLayoutBackendHandler.PangoBackend)Toolkit.GetBackend (layout);
+ var pl = be.Layout;
CairoContextBackend ctx = (CairoContextBackend)backend;
- SetSourceImage (ctx.Context, img, x, y);
- alpha = alpha * ctx.GlobalAlpha;
- if (alpha == 1)
- ctx.Context.Paint ();
- else
- ctx.Context.PaintWithAlpha (alpha);
- }
-
- protected virtual void SetSourceImage (Cairo.Context ctx, object img, double x, double y)
- {
+ ctx.Context.MoveTo (x, y);
+ if (layout.Height <= 0) {
+ Pango.CairoHelper.ShowLayout (ctx.Context, pl);
+ } else {
+ var lc = pl.LineCount;
+ var scale = Pango.Scale.PangoScale;
+ double h = 0;
+ for (int i=0; i<lc; i++) {
+ var line = pl.Lines [i];
+ var ext = new Pango.Rectangle ();
+ var extl = new Pango.Rectangle ();
+ line.GetExtents (ref ext, ref extl);
+ h += (extl.Height / scale);
+ if (h > layout.Height)
+ break;
+ ctx.Context.MoveTo (x, y + h);
+ Pango.CairoHelper.ShowLayoutLine (ctx.Context, line);
+ }
+ }
}
-
- public void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha)
+
+ public override void DrawImage (object backend, ImageDescription img, double x, double y)
{
CairoContextBackend ctx = (CairoContextBackend)backend;
- ctx.Context.Save ();
- var s = GetImageSize (img);
- double sx = ((double) width) / s.Width;
- double sy = ((double) height) / s.Height;
- ctx.Context.Translate (x, y);
- ctx.Context.Scale (sx, sy);
- SetSourceImage (ctx.Context, img, 0, 0);
- alpha = alpha * ctx.GlobalAlpha;
- if (alpha == 1)
- ctx.Context.Paint ();
- else
- ctx.Context.PaintWithAlpha (alpha);
- ctx.Context.Restore ();
+
+ img.Alpha *= ctx.GlobalAlpha;
+ var pix = (Xwt.GtkBackend.GtkImage) img.Backend;
+
+ pix.Draw (ApplicationContext, ctx.Context, ctx.ScaleFactor, x, y, img);
}
- public void DrawImage (object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha)
+ public override void DrawImage (object backend, ImageDescription img, Rectangle srcRect, Rectangle destRect)
{
CairoContextBackend ctx = (CairoContextBackend)backend;
ctx.Context.Save ();
@@ -271,12 +316,10 @@ namespace Xwt.CairoBackend
double sx = destRect.Width / srcRect.Width;
double sy = destRect.Height / srcRect.Height;
ctx.Context.Scale (sx, sy);
- SetSourceImage (ctx.Context, img, 0, 0);
- alpha = alpha * ctx.GlobalAlpha;
- if (alpha == 1)
- ctx.Context.Paint ();
- else
- ctx.Context.PaintWithAlpha (alpha);
+ img.Alpha *= ctx.GlobalAlpha;
+
+ var pix = (Xwt.GtkBackend.GtkImage) img.Backend;
+ pix.Draw (ApplicationContext, ctx.Context, ctx.ScaleFactor, 0, 0, img);
ctx.Context.Restore ();
}
@@ -285,69 +328,72 @@ namespace Xwt.CairoBackend
return new Size (0,0);
}
- public void Rotate (object backend, double angle)
+ public override void Rotate (object backend, double angle)
{
CairoContextBackend gc = (CairoContextBackend)backend;
gc.Context.Rotate ((angle * System.Math.PI) / 180);
}
- public void Scale (object backend, double scaleX, double scaleY)
+ public override void Scale (object backend, double scaleX, double scaleY)
{
CairoContextBackend gc = (CairoContextBackend)backend;
gc.Context.Scale (scaleX, scaleY);
}
- public void Translate (object backend, double tx, double ty)
+ public override void Translate (object backend, double tx, double ty)
{
CairoContextBackend gc = (CairoContextBackend)backend;
gc.Context.Translate (tx, ty);
}
- public void TransformPoint (object backend, ref double x, ref double y)
+ public override Matrix GetCTM (object backend)
{
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
- ctx.TransformPoint (ref x, ref y);
+ Cairo.Matrix t = ((CairoContextBackend)backend).Context.Matrix;
+ Matrix ctm = new Matrix (t.Xx, t.Yx, t.Xy, t.Yy, t.X0, t.Y0);
+ return ctm;
}
- public void TransformDistance (object backend, ref double dx, ref double dy)
+ public override object CreatePath ()
{
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
- ctx.TransformDistance (ref dx, ref dy);
+ Cairo.Surface sf = new Cairo.ImageSurface (null, Cairo.Format.A1, 0, 0, 0);
+ return new CairoContextBackend (1) { // scale doesn't matter here, we are going to use it only for creating a path
+ TempSurface = sf,
+ Context = new Cairo.Context (sf)
+ };
}
- public void TransformPoints (object backend, Point[] points)
+ public override object CopyPath (object backend)
{
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
+ var newPath = CreatePath ();
+ AppendPath (newPath, backend);
+ return newPath;
+ }
- double x, y;
- for (int i = 0; i < points.Length; ++i) {
- x = points[i].X;
- y = points[i].Y;
- ctx.TransformPoint (ref x, ref y);
- points[i].X = x;
- points[i].Y = y;
- }
+ public override void AppendPath (object backend, object otherBackend)
+ {
+ Cairo.Context dest = ((CairoContextBackend)backend).Context;
+ Cairo.Context src = ((CairoContextBackend)otherBackend).Context;
+
+ using (var path = src.CopyPath ())
+ dest.AppendPath (path);
}
- public void TransformDistances (object backend, Distance[] vectors)
+ public override bool IsPointInFill (object backend, double x, double y)
{
- Cairo.Context ctx = ((CairoContextBackend)backend).Context;
+ return ((CairoContextBackend)backend).Context.InFill (x, y);
+ }
- double x, y;
- for (int i = 0; i < vectors.Length; ++i) {
- x = vectors[i].Dx;
- y = vectors[i].Dy;
- ctx.TransformDistance (ref x, ref y);
- vectors[i].Dx = x;
- vectors[i].Dy = y;
- }
+ public override bool IsPointInStroke (object backend, double x, double y)
+ {
+ return ((CairoContextBackend)backend).Context.InStroke (x, y);
}
- public void Dispose (object backend)
+ public override void Dispose (object backend)
{
var ctx = (CairoContextBackend) backend;
ctx.Dispose ();
}
+
#endregion
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoGradientBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoGradientBackendHandler.cs
index 5f11dd0..d36e90e 100644
--- a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoGradientBackendHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoGradientBackendHandler.cs
@@ -29,23 +29,34 @@ using Xwt.Backends;
namespace Xwt.CairoBackend
{
- public class CairoGradientBackendHandler: IGradientBackendHandler
+ public class CairoGradientBackendHandler: GradientBackendHandler
{
- public object CreateLinear (double x0, double y0, double x1, double y1)
+ public override object CreateLinear (double x0, double y0, double x1, double y1)
{
return new Cairo.LinearGradient (x0, y0, x1, y1);
}
- public object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
+ public override void Dispose (object backend)
+ {
+ ((IDisposable)backend).Dispose ();
+ }
+
+ public override object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
{
return new Cairo.RadialGradient (cx0, cy0, radius0, cx1, cy1, radius1);
}
- public void AddColorStop (object backend, double position, Xwt.Drawing.Color color)
+ public override void AddColorStop (object backend, double position, Xwt.Drawing.Color color)
{
Cairo.Gradient g = (Cairo.Gradient) backend;
g.AddColorStop (position, color.ToCairoColor ());
}
+
+ public override bool DisposeHandleOnUiThread {
+ get {
+ return true;
+ }
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoTextLayoutBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoTextLayoutBackendHandler.cs
deleted file mode 100644
index 13f4819..0000000
--- a/external/xwt/Xwt.Gtk/Xwt.CairoBackend/CairoTextLayoutBackendHandler.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-//
-// CairoTextLayoutBackend.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-// Lytico (http://limada.sourceforge.net)
-//
-// Copyright (c) 2012 Xamarin Inc
-//
-// 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 Xwt.Backends;
-using Xwt.Drawing;
-using Xwt.Engine;
-using System.Collections.Generic;
-
-namespace Xwt.CairoBackend
-{
- public class CairoTextLayoutBackendHandler: ITextLayoutBackendHandler
- {
- static Cairo.Context SharedContext;
-
- class LayoutBackend
- {
- public CairoContextBackend Context;
- public double Width = -1;
- public double Heigth = -1;
- public string Text;
- public Font Font;
- public TextTrimming TextTrimming;
- public bool Measured;
- public List<int> LineBreaks = new List<int> ();
- public List<double> LineHeights = new List<double> ();
- }
-
- static CairoTextLayoutBackendHandler ()
- {
- Cairo.Surface sf = new Cairo.ImageSurface (Cairo.Format.ARGB32, 1, 1);
- SharedContext = new Cairo.Context (sf);
- }
-
- public CairoTextLayoutBackendHandler ()
- {
- }
-
- #region ITextLayoutBackendHandler implementation
- public object Create (Context context)
- {
- CairoContextBackend c = (CairoContextBackend) WidgetRegistry.GetBackend (context);
- LayoutBackend b = new LayoutBackend ();
- b.Context = c;
- return b;
- }
-
- public object Create (ICanvasBackend canvas)
- {
- LayoutBackend b = new LayoutBackend ();
- CairoContextBackend ba = new CairoContextBackend ();
- ba.Context = SharedContext;
- b.Context = ba;
- return b;
- }
-
- public void SetWidth (object backend, double value)
- {
- LayoutBackend la = (LayoutBackend) backend;
- la.Width = value;
- la.Measured = false;
- }
-
- public void SetHeight (object backend, double value)
- {
- LayoutBackend la = (LayoutBackend) backend;
- la.Heigth = value;
- la.Measured = false;
- }
-
- public void SetText (object backend, string text)
- {
- LayoutBackend la = (LayoutBackend) backend;
- la.Text = text;
- la.Measured = false;
- }
-
- public void SetFont (object backend, Font font)
- {
- LayoutBackend la = (LayoutBackend) backend;
- la.Measured = false;
- la.Font = font;
- }
-
- public void SetTrimming (object backend, TextTrimming textTrimming)
- {
- LayoutBackend la = (LayoutBackend) backend;
- la.TextTrimming = textTrimming;
-
- }
-
- public Size GetSize (object backend)
- {
- return Measure (backend);
- }
-
- static Size Measure (object backend)
- {
- LayoutBackend la = (LayoutBackend) backend;
- var ctx = la.Context.Context;
- var text = la.Text;
-
- if (la.Font != null) {
- ctx.SelectFont (la.Font);
- ctx.SetFontSize (la.Font.Size);
- }
-
- if (la.Width == -1) {
- var te = ctx.TextExtents (text);
- return new Size (te.Width, te.Height);
- }
-
- // Measure word by word
-
- double totalHeight = 0;
- double currentWidth = 0;
- double currentHeight = 0;
- la.LineBreaks.Clear ();
-
- double spaceWidth = ctx.TextExtents (" ").XAdvance;
- double spaceHeight = ctx.FontExtents.Height;
- var spaceExtents = new Cairo.TextExtents () {
- Width = spaceWidth,
- Height = spaceHeight,
- XAdvance = spaceWidth
- };
-
- int pos = 0;
- bool inLineStart = true;
- int prevPos = 0;
- string word = NextWord (text, ref pos);
-
- for (; word != null; prevPos=pos, word = NextWord (text, ref pos))
- {
- if (word.Length == 1 && word [0] == '\n') {
- if (inLineStart) {
- // Empty line
- currentHeight = spaceHeight;
- }
- totalHeight += currentHeight;
- la.LineBreaks.Add (pos);
- la.LineHeights.Add (currentHeight);
- currentHeight = 0;
- currentWidth = 0;
- inLineStart = true;
- continue;
- }
-
- inLineStart = false;
- bool isSpace = word.Length == 1 && word[0] == ' ';
-
- Cairo.TextExtents te;
- if (isSpace)
- te = spaceExtents;
- else
- te = ctx.TextExtents (word);
-
- if (currentWidth + te.Width > la.Width) {
- la.LineHeights.Add (currentHeight);
- la.LineBreaks.Add (isSpace ? pos : prevPos); // If a space causes a line break, we can ignore that space
- totalHeight += currentHeight;
- currentHeight = te.Height;
- if (isSpace)
- currentWidth = 0;
- else
- currentWidth = te.Width;
- }
- else {
- currentWidth += te.XAdvance;
- if (te.Height > currentHeight)
- currentHeight = te.Height;
- }
- }
-
- la.Measured = true;
- return new Size (la.Width, totalHeight);
- }
-
- static string NextWord (string text, ref int pos)
- {
- if (pos >= text.Length)
- return null;
-
- if (text[pos] == '\n') {
- pos ++;
- return "\n";
- }
- if (char.IsWhiteSpace (text[pos])) {
- pos ++;
- return " ";
- }
- int start = pos;
- while (pos < text.Length && !char.IsWhiteSpace (text[pos]))
- pos++;
- return text.Substring (start, pos - start);
- }
-
- public static void Draw (Cairo.Context ctx, object backend, double x, double y)
- {
- var la = (LayoutBackend) backend;
-
- var text = la.Text;
-
- var h = ctx.FontExtents.Ascent;
- y += h;
-
- ctx.MoveTo (x, y);
-
- if (la.Font != null) {
- ctx.SelectFont (la.Font);
- ctx.SetFontSize (la.Font.Size);
- }
-
- if (la.Width == -1) {
- ctx.ShowText (text);
- return;
- }
-
- if (!la.Measured)
- Measure (backend);
-
- // Render word by word
-
- int lastStart = 0;
-
- for (int i=0; i < la.LineBreaks.Count; i++) {
- if (la.Heigth != -1 && h > la.Heigth)
- break;
-
- var n = la.LineBreaks [i];
- string s = text.Substring (lastStart, n - lastStart).TrimEnd('\n','\r');
- ctx.ShowText (s);
-
- var lh = la.LineHeights [i];
- h += lh;
- y += lh;
-
- ctx.MoveTo (x, y);
- lastStart = n;
- }
- }
-
- #endregion
- }
-}
-
diff --git a/external/xwt/Xwt.Gtk/Xwt.Gtk.csproj b/external/xwt/Xwt.Gtk/Xwt.Gtk.csproj
index 9c30cbb..9ae6b8f 100644
--- a/external/xwt/Xwt.Gtk/Xwt.Gtk.csproj
+++ b/external/xwt/Xwt.Gtk/Xwt.Gtk.csproj
@@ -81,7 +81,6 @@
<Compile Include="Xwt.GtkBackend\GtkAlertDialog.cs" />
<Compile Include="Xwt.GtkBackend\MessageService.cs" />
<Compile Include="Xwt.GtkBackend\GtkWorkarounds.cs" />
- <Compile Include="Xwt.GtkBackend\PangoUtil.cs" />
<Compile Include="Xwt.GtkBackend\WindowFrameBackend.cs" />
<Compile Include="Xwt.GtkBackend\CheckBoxBackend.cs" />
<Compile Include="Xwt.GtkBackend\FrameBackend.cs" />
@@ -95,14 +94,14 @@
<Compile Include="Xwt.GtkBackend\CheckBoxMenuItemBackend.cs" />
<Compile Include="Xwt.GtkBackend\RadioButtonMenuItemBackend.cs" />
<Compile Include="Xwt.GtkBackend\SeparatorMenuItemBackend.cs" />
- <Compile Include="Xwt.GtkBackend\ScrollAdjustmentBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\ScrollAdjustmentBackend.cs">
+ <Gettext-ScanForTranslations>False</Gettext-ScanForTranslations>
+ </Compile>
<Compile Include="Xwt.GtkBackend\FileDialogBackend.cs" />
<Compile Include="Xwt.GtkBackend\PanedBackend.cs" />
<Compile Include="Xwt.GtkBackend\SelectColorDialogBackend.cs" />
<Compile Include="Xwt.CairoBackend\CairoConversion.cs" />
- <Compile Include="Xwt.CairoBackend\CairoTextLayoutBackendHandler.cs" />
<Compile Include="Xwt.CairoBackend\CairoContextBackendHandler.cs" />
- <Compile Include="Xwt.GtkBackend\ContextBackendHandler.cs" />
<Compile Include="Xwt.CairoBackend\CairoGradientBackendHandler.cs" />
<Compile Include="Xwt.GtkBackend\ListBoxBackend.cs" />
<Compile Include="Xwt.GtkBackend\StatusIconBackend.cs" />
@@ -114,6 +113,18 @@
<Compile Include="Xwt.GtkBackend\LinkLabelBackend.cs" />
<Compile Include="Xwt.GtkBackend\SpinnerBackend.cs" />
<Compile Include="Xwt.GtkBackend\RichTextViewBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\GtkDesktopBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\GtkMacInterop.cs" />
+ <Compile Include="Xwt.GtkBackend\EmbeddedWidgetBackend.cs" />
+ <Compile Include="Xwt.GtkBackend.CellViews\CustomCellRenderer.cs" />
+ <Compile Include="Xwt.GtkBackend\SegmentedButtonBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\SliderBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\RadioButtonBackend.cs" />
+ <Compile Include="Xwt.GtkBackend\GtkInterop.cs" />
+ <Compile Include="Xwt.GtkBackend.CellViews\CustomCellRendererText.cs" />
+ <Compile Include="Xwt.GtkBackend.CellViews\CustomCellRendererToggle.cs" />
+ <Compile Include="Xwt.GtkBackend.CellViews\CustomCellRendererImage.cs" />
+ <Compile Include="Xwt.GtkBackend\ScrollbarBackend.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CellUtil.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CellUtil.cs
index 782491b..4efa6c2 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CellUtil.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CellUtil.cs
@@ -27,48 +27,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Gtk;
+using Xwt.Backends;
namespace Xwt.GtkBackend
{
public static class CellUtil
{
- public static Gtk.CellRenderer CreateCellRenderer (ICellRendererTarget col, object target, CellView view)
+ class CellDataSource: ICellDataSource
{
- if (view is TextCellView) {
- Gtk.CellRendererText cr = new Gtk.CellRendererText ();
+ TreeIter iter;
+ TreeModel treeModel;
+
+ public CellDataSource (TreeIter iter, TreeModel treeModel)
+ {
+ this.iter = iter;
+ this.treeModel = treeModel;
+ }
+
+ public object GetValue (IDataField field)
+ {
+ return treeModel.GetValue (iter, field.Index);
+ }
+ }
+
+ public static Gtk.CellRenderer CreateCellRenderer (ApplicationContext actx, ICellRendererTarget col, object target, ICellViewFrontend view, Gtk.TreeModel model)
+ {
+ if (view is ITextCellViewFrontend) {
+ var cr = new CustomCellRendererText ((ITextCellViewFrontend)view);
+ col.PackStart (target, cr, false);
+ col.SetCellDataFunc (target, cr, (cell_layout, cell, treeModel, iter) => cr.LoadData (treeModel, iter));
+ return cr;
+ }
+ else if (view is ICheckBoxCellViewFrontend) {
+ CustomCellRendererToggle cr = new CustomCellRendererToggle ((ICheckBoxCellViewFrontend)view);
col.PackStart (target, cr, false);
- col.AddAttribute (target, cr, "text", ((TextCellView)view).TextField.Index);
+ col.SetCellDataFunc (target, cr, (cellLayout, cell, treeModel, iter) => cr.LoadData (treeModel, iter));
return cr;
}
- else if (view is CheckBoxCellView) {
- Gtk.CellRendererToggle cr = new Gtk.CellRendererToggle ();
+ else if (view is IImageCellViewFrontend) {
+ CustomCellRendererImage cr = new CustomCellRendererImage (actx, (IImageCellViewFrontend)view);
col.PackStart (target, cr, false);
- col.AddAttribute (target, cr, "active", ((CheckBoxCellView)view).ActiveField.Index);
+ col.SetCellDataFunc (target, cr, (cellLayout, cell, treeModel, iter) => cr.LoadData (treeModel, iter));
return cr;
}
- else if (view is ImageCellView) {
- Gtk.CellRendererPixbuf cr = new Gtk.CellRendererPixbuf ();
+ else if (view is ICanvasCellViewFrontend) {
+ var cr = new CustomCellRenderer ((ICanvasCellViewFrontend) view);
col.PackStart (target, cr, false);
- col.AddAttribute (target, cr, "pixbuf", ((ImageCellView)view).ImageField.Index);
+ col.SetCellDataFunc (target, cr, (cellLayout, cell, treeModel, iter) => cr.LoadData (treeModel, iter));
return cr;
}
throw new NotSupportedException ("Unknown cell view type: " + view.GetType ());
}
- public static Gtk.Widget CreateCellRenderer (ICollection<CellView> views)
+ public static Gtk.Widget CreateCellRenderer (ApplicationContext actx, ICollection<CellView> views)
{
if (views.Count == 1) {
Gtk.HBox box = new Gtk.HBox ();
foreach (var v in views)
- box.PackStart (CreateCellRenderer (v), false, false, 0);
+ box.PackStart (CreateCellRenderer (actx, v), false, false, 0);
box.ShowAll ();
return box;
}
else
- return CreateCellRenderer (views.First ());
+ return CreateCellRenderer (actx, views.First ());
}
- public static Gtk.Widget CreateCellRenderer (CellView view)
+ public static Gtk.Widget CreateCellRenderer (ApplicationContext actx, CellView view)
{
if (view is TextCellView) {
Gtk.Label lab = new Gtk.Label ();
@@ -78,6 +103,27 @@ namespace Xwt.GtkBackend
}
throw new NotImplementedException ();
}
+
+ public static void SetModelValue (Gtk.TreeModel store, Gtk.TreeIter it, int column, Type type, object value)
+ {
+ if (type == typeof(ObjectWrapper) && value != null)
+ store.SetValue (it, column, new ObjectWrapper (value));
+ else if (value is string)
+ store.SetValue (it, column, (string)value);
+ else
+ store.SetValue (it, column, value ?? DBNull.Value);
+ }
+
+ public static object GetModelValue (Gtk.TreeModel store, Gtk.TreeIter it, int column)
+ {
+ object val = store.GetValue (it, column);
+ if (val is DBNull)
+ return null;
+ else if (val is ObjectWrapper)
+ return ((ObjectWrapper)val).Object;
+ else
+ return val;
+ }
}
public interface ICellRendererTarget
@@ -85,6 +131,8 @@ namespace Xwt.GtkBackend
void PackStart (object target, Gtk.CellRenderer cr, bool expand);
void PackEnd (object target, Gtk.CellRenderer cr, bool expand);
void AddAttribute (object target, Gtk.CellRenderer cr, string field, int column);
+ void SetCellDataFunc (object target, Gtk.CellRenderer cr, Gtk.CellLayoutDataFunc dataFunc);
}
+
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRenderer.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRenderer.cs
new file mode 100644
index 0000000..9d91f6c
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRenderer.cs
@@ -0,0 +1,84 @@
+//
+// CustomCellRenderer.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Gtk;
+using Xwt.CairoBackend;
+using Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ class CustomCellRenderer: Gtk.CellRenderer, ICellDataSource
+ {
+ TreeModel treeModel;
+ TreeIter iter;
+ ICanvasCellViewFrontend cellView;
+
+ public CustomCellRenderer (ICanvasCellViewFrontend cellView)
+ {
+ this.cellView = cellView;
+ }
+
+ #region ICellDataSource implementation
+
+ public void LoadData (TreeModel treeModel, TreeIter iter)
+ {
+ this.treeModel = treeModel;
+ this.iter = iter;
+ cellView.Initialize (this);
+ Visible = cellView.Visible;
+ }
+
+ object ICellDataSource.GetValue (IDataField field)
+ {
+ return CellUtil.GetModelValue (treeModel, iter, field.Index);
+ }
+
+ #endregion
+
+ protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
+ {
+ cellView.ApplicationContext.InvokeUserCode (delegate {
+ CairoContextBackend ctx = new CairoContextBackend (Util.GetScaleFactor (widget));
+ ctx.Context = Gdk.CairoHelper.Create (window);
+ using (ctx) {
+ cellView.Draw (ctx, new Rectangle (cell_area.X, cell_area.Y, cell_area.Width, cell_area.Height));
+ }
+ });
+ }
+
+ public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
+ {
+ Size size = new Size ();
+ cellView.ApplicationContext.InvokeUserCode (delegate {
+ size = cellView.GetRequiredSize ();
+ });
+ width = (int) size.Width;
+ height = (int) size.Height;
+ x_offset = y_offset = 0;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererImage.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererImage.cs
new file mode 100644
index 0000000..627d412
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererImage.cs
@@ -0,0 +1,93 @@
+//
+// CustomCellRendererImage.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Linq;
+using Gtk;
+using Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+
+ public class CustomCellRendererImage: Gtk.CellRenderer, ICellDataSource
+ {
+ TreeModel treeModel;
+ TreeIter iter;
+ ImageDescription image;
+ ApplicationContext actx;
+ IImageCellViewFrontend view;
+
+ public CustomCellRendererImage (ApplicationContext actx, IImageCellViewFrontend view)
+ {
+ this.actx = actx;
+ this.view = view;
+ }
+
+ public void LoadData (TreeModel treeModel, TreeIter iter)
+ {
+ this.treeModel = treeModel;
+ this.iter = iter;
+ view.Initialize (this);
+ Image = view.Image.ToImageDescription ();
+ Visible = view.Visible;
+ }
+
+ object ICellDataSource.GetValue (IDataField field)
+ {
+ return CellUtil.GetModelValue (treeModel, iter, field.Index);
+ }
+
+ [GLib.Property ("image")]
+ public ImageDescription Image {
+ get { return image; }
+ set { image = value; }
+ }
+
+ protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
+ {
+ if (image.IsNull)
+ return;
+
+ var ctx = Gdk.CairoHelper.Create (window);
+ using (ctx) {
+ var pix = ((GtkImage)image.Backend);
+ pix.Draw (actx, ctx, Util.GetScaleFactor (widget), cell_area.X, cell_area.Y, image);
+ }
+ }
+
+ public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
+ {
+ if (image.IsNull) {
+ width = height = 0;
+ } else {
+ width = (int) image.Size.Width;
+ height = (int) image.Size.Height;
+ }
+ x_offset = y_offset = 0;
+ }
+ }
+}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererText.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererText.cs
new file mode 100644
index 0000000..6fbe4ed
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererText.cs
@@ -0,0 +1,79 @@
+//
+// CustomCellRendererText.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Gtk;
+using Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class CustomCellRendererText: Gtk.CellRendererText, ICellDataSource
+ {
+ ITextCellViewFrontend view;
+ TreeModel treeModel;
+ TreeIter iter;
+
+ public CustomCellRendererText (ITextCellViewFrontend view)
+ {
+ this.view = view;
+ }
+
+ public void LoadData (TreeModel treeModel, TreeIter iter)
+ {
+ this.treeModel = treeModel;
+ this.iter = iter;
+ view.Initialize (this);
+
+ if (view.Markup != null) {
+ FormattedText tx = FormattedText.FromMarkup (view.Markup);
+ Text = tx.Text;
+ var atts = new FastPangoAttrList ();
+ atts.AddAttributes (new TextIndexer (tx.Text), tx.Attributes);
+ Attributes = new Pango.AttrList (atts.Handle);
+ atts.Dispose ();
+ } else {
+ Text = view.Text;
+ }
+ Editable = view.Editable;
+ Visible = view.Visible;
+ }
+
+ public object GetValue (IDataField field)
+ {
+ return CellUtil.GetModelValue (treeModel, iter, field.Index);
+ }
+
+ protected override void OnEdited (string path, string new_text)
+ {
+ if (!view.RaiseTextChanged () && view.TextField != null) {
+ Gtk.TreeIter iter;
+ if (treeModel.GetIterFromString (out iter, path))
+ CellUtil.SetModelValue (treeModel, iter, view.TextField.Index, view.TextField.FieldType, new_text);
+ }
+ base.OnEdited (path, new_text);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererToggle.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererToggle.cs
new file mode 100644
index 0000000..ea7d219
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend.CellViews/CustomCellRendererToggle.cs
@@ -0,0 +1,70 @@
+//
+// CustomCellRendererToggle.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Gtk;
+using Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class CustomCellRendererToggle: Gtk.CellRendererToggle, ICellDataSource
+ {
+ ICheckBoxCellViewFrontend view;
+ TreeModel treeModel;
+ TreeIter iter;
+
+ public CustomCellRendererToggle (ICheckBoxCellViewFrontend view)
+ {
+ this.view = view;
+ }
+
+ public void LoadData (TreeModel treeModel, TreeIter iter)
+ {
+ this.treeModel = treeModel;
+ this.iter = iter;
+ view.Initialize (this);
+
+ Active = view.Active;
+ Activatable = view.Editable;
+ Visible = view.Visible;
+ }
+
+ public object GetValue (IDataField field)
+ {
+ return CellUtil.GetModelValue (treeModel, iter, field.Index);
+ }
+
+ protected override void OnToggled (string path)
+ {
+ if (!view.RaiseToggled () && view.ActiveField != null) {
+ Gtk.TreeIter iter;
+ if (treeModel.GetIterFromString (out iter, path))
+ CellUtil.SetModelValue (treeModel, iter, view.ActiveField.Index, view.ActiveField.FieldType, !Active);
+ }
+ base.OnToggled (path);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/AlertDialogBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/AlertDialogBackend.cs
index fb1f529..894c554 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/AlertDialogBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/AlertDialogBackend.cs
@@ -53,22 +53,30 @@ using System;
using System.Collections.Generic;
using Xwt.Backends;
using System.Linq;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
public class AlertDialogBackend: IAlertDialogBackend
{
+ ApplicationContext context;
+
#region IAlertDialogBackend implementation
public void Dispose ()
{
}
-
+
+ public void Initialize (ApplicationContext context)
+ {
+ this.context = context;
+ }
+
public Command Run (WindowFrame transientFor, MessageDescription message)
- { GtkAlertDialog alertDialog = new GtkAlertDialog (message);
+ {
+ GtkAlertDialog alertDialog = new GtkAlertDialog (context, message);
alertDialog.FocusButton (message.DefaultButton);
- var wb = (WindowFrameBackend)WidgetRegistry.GetBackend (transientFor);
+ var wb = (WindowFrameBackend)Toolkit.GetBackend (transientFor);
var win = wb != null ? wb.Window : null;
MessageService.ShowCustomDialog (alertDialog, win);
if (alertDialog.ApplyToAll)
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/BoxBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/BoxBackend.cs
index c93445e..9700359 100755
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/BoxBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/BoxBackend.cs
@@ -133,8 +133,6 @@ namespace Xwt.GtkBackend
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
{
base.OnSizeAllocated (allocation);
- if (Backend.IsPreallocating)
- return;
try {
IsReallocating = true;
((IWidgetSurface)Backend.Frontend).Reallocate ();
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
index 8c9490e..6d47f6f 100755
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
@@ -26,13 +26,15 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+using Xwt.Drawing;
+
namespace Xwt.GtkBackend
{
public class ButtonBackend: WidgetBackend, IButtonBackend
{
protected bool ignoreClickEvents;
+ ImageDescription image;
public ButtonBackend ()
{
@@ -54,13 +56,15 @@ namespace Xwt.GtkBackend
get { return (IButtonEventSink)base.EventSink; }
}
- public void SetContent (string label, object imageBackend, ContentPosition position)
+ public void SetContent (string label, ImageDescription image, ContentPosition position)
{
+ this.image = image;
+
if (label != null && label.Length == 0)
label = null;
Button b = (Button) Frontend;
- if (label != null && imageBackend == null && b.Type == ButtonType.Normal) {
+ if (label != null && image.Backend == null && b.Type == ButtonType.Normal) {
Widget.Label = label;
return;
}
@@ -75,9 +79,9 @@ namespace Xwt.GtkBackend
Gtk.Widget contentWidget = null;
Gtk.Widget imageWidget = null;
- if (imageBackend != null)
- imageWidget = new Gtk.Image ((Gdk.Pixbuf)imageBackend);
-
+ if (image.Backend != null)
+ imageWidget = new ImageBox (ApplicationContext, image.WithDefaultSize (Gtk.IconSize.Button));
+
if (label != null && imageWidget == null) {
contentWidget = new Gtk.Label (label);
}
@@ -137,7 +141,7 @@ namespace Xwt.GtkBackend
public void SetButtonType (ButtonType type)
{
Button b = (Button) Frontend;
- SetContent (b.Label, WidgetRegistry.GetBackend (b.Image), b.ImagePosition);
+ SetContent (b.Label, image, b.ImagePosition);
}
public override void EnableEvent (object eventId)
@@ -163,7 +167,7 @@ namespace Xwt.GtkBackend
void HandleWidgetClicked (object sender, EventArgs e)
{
if (!ignoreClickEvents) {
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnClicked ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs
index fb6cdfb..4c36301 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CanvasBackend.cs
@@ -28,7 +28,7 @@ using System;
using System.Collections.Generic;
using Xwt.Backends;
using System.Linq;
-using Xwt.Engine;
+
using Xwt.CairoBackend;
namespace Xwt.GtkBackend
@@ -42,7 +42,7 @@ namespace Xwt.GtkBackend
public override void Initialize ()
{
Widget = new CustomCanvas ();
- Widget.Frontend = Frontend;
+ Widget.Backend = this;
Widget.EventSink = EventSink;
Widget.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask;
Widget.Show ();
@@ -95,7 +95,7 @@ namespace Xwt.GtkBackend
class CustomCanvas: Gtk.EventBox
{
- public Widget Frontend;
+ public CanvasBackend Backend;
public ICanvasEventSink EventSink;
Dictionary<Gtk.Widget, Rectangle> children = new Dictionary<Gtk.Widget, Rectangle> ();
@@ -128,19 +128,6 @@ namespace Xwt.GtkBackend
protected override void OnSizeRequested (ref Gtk.Requisition requisition)
{
base.OnSizeRequested (ref requisition);
- IWidgetSurface ws = Frontend.Surface;
- int h, w;
- if (ws.SizeRequestMode == SizeRequestMode.HeightForWidth) {
- w = (int)ws.GetPreferredWidth ().MinSize;
- h = (int)ws.GetPreferredHeightForWidth (w).MinSize;
- } else {
- h = (int)ws.GetPreferredHeight ().MinSize;
- w = (int)ws.GetPreferredWidthForHeight(h).MinSize;
- }
- if (requisition.Width < w)
- requisition.Width = w;
- if (requisition.Height < h)
- requisition.Height = h;
foreach (var cr in children)
cr.Key.SizeRequest ();
}
@@ -157,7 +144,7 @@ namespace Xwt.GtkBackend
{
base.OnSizeAllocated (allocation);
if (!lastAllocation.Equals (allocation))
- ((IWidgetSurface)Frontend).Reallocate ();
+ ((IWidgetSurface)Backend.Frontend).Reallocate ();
lastAllocation = allocation;
foreach (var cr in children) {
var r = cr.Value;
@@ -174,7 +161,7 @@ namespace Xwt.GtkBackend
protected override bool OnExposeEvent (Gdk.EventExpose evnt)
{
- Toolkit.Invoke (delegate {
+ Backend.ApplicationContext.InvokeUserCode (delegate {
using (var context = CreateContext ()) {
var a = evnt.Area;
EventSink.OnDraw (context, new Rectangle (a.X, a.Y, a.Width, a.Height));
@@ -185,7 +172,7 @@ namespace Xwt.GtkBackend
public CairoContextBackend CreateContext ()
{
- CairoContextBackend ctx = new CairoContextBackend ();
+ CairoContextBackend ctx = new CairoContextBackend (Util.GetScaleFactor (this));
if (!IsRealized) {
Cairo.Surface sf = new Cairo.ImageSurface (Cairo.Format.ARGB32, 1, 1);
Cairo.Context c = new Cairo.Context (sf);
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CheckBoxBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CheckBoxBackend.cs
index aedc0c9..193c3ca 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CheckBoxBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CheckBoxBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -93,7 +93,12 @@ namespace Xwt.GtkBackend
public void SetContent (IWidgetBackend widget)
{
- throw new NotImplementedException ();
+ var w = (WidgetBackend)widget;
+ if (Widget.Children.Length > 0)
+ Widget.Remove(Widget.Children[0]);
+
+ if (w != null)
+ Widget.Add(w.Widget);
}
public override object Font {
@@ -156,7 +161,7 @@ namespace Xwt.GtkBackend
}
if (toggleEventEnabled) {
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnToggled ();
});
}
@@ -167,7 +172,7 @@ namespace Xwt.GtkBackend
if (internalActiveUpdate)
return;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnClicked ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ClipboardBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ClipboardBackend.cs
index 281ed2c..1904e50 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ClipboardBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ClipboardBackend.cs
@@ -29,26 +29,27 @@ using Xwt.Backends;
using System.Collections.Generic;
using System.Threading;
+
namespace Xwt.GtkBackend
{
- public class ClipboardBackend: IClipboardBackend
+ public class GtkClipboardBackend: ClipboardBackend
{
// Gtk.Clipboard primaryClipboard;
Gtk.Clipboard clipboard;
- public ClipboardBackend ()
+ public GtkClipboardBackend ()
{
clipboard = Gtk.Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
// primaryClipboard = Gtk.Clipboard.Get (Gdk.Atom.Intern ("PRIMARY", false));
}
#region IClipboardBackend implementation
- public void Clear ()
+ public override void Clear ()
{
clipboard.Clear ();
}
- public void SetData (TransferDataType type, Func<object> dataSource)
+ public override void SetData (TransferDataType type, Func<object> dataSource)
{
clipboard.SetWithData ((Gtk.TargetEntry[])Util.BuildTargetTable (new TransferDataType[] { type }),
delegate (Gtk.Clipboard cb, Gtk.SelectionData data, uint id) {
@@ -60,7 +61,7 @@ namespace Xwt.GtkBackend
});
}
- public bool IsTypeAvailable (TransferDataType type)
+ public override bool IsTypeAvailable (TransferDataType type)
{
if (type == TransferDataType.Text)
return clipboard.WaitIsTextAvailable ();
@@ -80,7 +81,7 @@ namespace Xwt.GtkBackend
yield return Gdk.Atom.Intern (te.Target, false);
}
- public object GetData (TransferDataType type)
+ public override object GetData (TransferDataType type)
{
if (type == TransferDataType.Text)
return clipboard.WaitForText ();
@@ -91,18 +92,18 @@ namespace Xwt.GtkBackend
foreach (var at in GetAtomsForType (type)) {
var data = clipboard.WaitForContents (at);
- Util.GetSelectionData (data, store);
+ Util.GetSelectionData (ApplicationContext, data, store);
}
return ((ITransferData)store).GetValue (type);
}
- public IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state)
+ public override IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state)
{
var atts = GetAtomsForType (type).ToArray ();
- return new DataRequest (clipboard, callback, state, type, atts);
+ return new DataRequest (ApplicationContext, clipboard, callback, state, type, atts);
}
- public object EndGetData (IAsyncResult ares)
+ public override object EndGetData (IAsyncResult ares)
{
return ((DataRequest)ares).Result;
}
@@ -119,9 +120,11 @@ namespace Xwt.GtkBackend
bool complete;
TransferDataType type;
AsyncCallback callback;
+ ApplicationContext context;
- public DataRequest (Gtk.Clipboard clipboard, AsyncCallback callback, object state, TransferDataType type, Gdk.Atom[] atoms)
+ public DataRequest (ApplicationContext context, Gtk.Clipboard clipboard, AsyncCallback callback, object state, TransferDataType type, Gdk.Atom[] atoms)
{
+ this.context = context;
this.callback = callback;
this.type = type;
AsyncState = state;
@@ -140,7 +143,7 @@ namespace Xwt.GtkBackend
void DataReceived (Gtk.Clipboard cb, Gtk.SelectionData data)
{
TransferDataStore store = new TransferDataStore ();
- if (Util.GetSelectionData (data, store)) {
+ if (Util.GetSelectionData (context, data, store)) {
Result = ((ITransferData)store).GetValue (type);
SetComplete ();
} else {
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
index 0ae8ded..87db0d3 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -38,9 +38,11 @@ namespace Xwt.GtkBackend
public override void Initialize ()
{
Widget = (Gtk.ComboBox) CreateWidget ();
- var cr = new Gtk.CellRendererText ();
- Widget.PackStart (cr, false);
- Widget.AddAttribute (cr, "text", 0);
+ if (Widget.Cells.Length == 0) {
+ var cr = new Gtk.CellRendererText ();
+ Widget.PackStart (cr, false);
+ Widget.AddAttribute (cr, "text", 0);
+ }
Widget.Show ();
Widget.RowSeparatorFunc = IsRowSeparator;
}
@@ -63,7 +65,7 @@ namespace Xwt.GtkBackend
{
Gtk.TreePath path = model.GetPath (iter);
bool res = false;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
res = EventSink.RowIsSeparator (path.Indices[0]);
});
return res;
@@ -89,7 +91,7 @@ namespace Xwt.GtkBackend
void HandleChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
}
@@ -99,7 +101,7 @@ namespace Xwt.GtkBackend
{
Widget.Clear ();
foreach (var v in views)
- CellUtil.CreateCellRenderer (this, null, v);
+ CellUtil.CreateCellRenderer (ApplicationContext, this, null, v, Widget.Model);
}
public void SetSource (IListDataSource source, IBackend sourceBackend)
@@ -126,17 +128,22 @@ namespace Xwt.GtkBackend
public void PackStart (object target, Gtk.CellRenderer cr, bool expand)
{
Widget.PackStart (cr, expand);
- }
+ }
public void PackEnd (object target, Gtk.CellRenderer cr, bool expand)
{
Widget.PackEnd (cr, expand);
}
-
+
public void AddAttribute (object target, Gtk.CellRenderer cr, string field, int column)
{
Widget.AddAttribute (cr, field, column);
}
+
+ public void SetCellDataFunc (object target, Gtk.CellRenderer cr, Gtk.CellLayoutDataFunc dataFunc)
+ {
+ Widget.SetCellDataFunc (cr, dataFunc);
+ }
#endregion
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs
index 157a629..faf0237 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ComboBoxEntryBackend.cs
@@ -35,17 +35,10 @@ namespace Xwt.GtkBackend
protected override Gtk.Widget CreateWidget ()
{
var c = new Gtk.ComboBoxEntry ();
- c.Clear ();
entryBackend = new CustomComboEntryBackend ((Gtk.Entry)c.Child);
return c;
}
-
- public override void Initialize ()
- {
- base.Initialize ();
- ((Gtk.ComboBoxEntry)Widget).TextColumn = 0;
- }
-
+
public void SetTextColumn (int column)
{
((Gtk.ComboBoxEntry)Widget).TextColumn = column;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ContextBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ContextBackendHandler.cs
deleted file mode 100644
index 8d2e408..0000000
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ContextBackendHandler.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// ContextBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-// Lytico (http://limada.sourceforge.net)
-//
-// Copyright (c) 2012 Xamarin Inc
-//
-// 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 Xwt.CairoBackend;
-using Xwt.Drawing;
-using Xwt.Engine;
-using Xwt.Backends;
-
-namespace Xwt.GtkBackend
-{
- public class ContextBackendHandler: CairoContextBackendHandler
- {
- protected override void SetSourceImage (Cairo.Context ctx, object img, double x, double y)
- {
- Gdk.Pixbuf pb = (Gdk.Pixbuf)img;
- Gdk.CairoHelper.SetSourcePixbuf (ctx, pb, x, y);
- }
-
- protected override Size GetImageSize (object img)
- {
- Gdk.Pixbuf pb = (Gdk.Pixbuf)img;
- return new Size (pb.Width, pb.Height);
- }
- }
-
- public class ContextBackendHandlerWithPango: ContextBackendHandler
- {
- public override void DrawTextLayout (object backend, TextLayout layout, double x, double y)
- {
- Pango.Layout pl = (Pango.Layout)WidgetRegistry.GetBackend (layout);
- CairoContextBackend ctx = (CairoContextBackend)backend;
- ctx.Context.MoveTo (x, y);
- if (layout.Height <= 0) {
- Pango.CairoHelper.ShowLayout (ctx.Context, pl);
- } else {
- var lc = pl.LineCount;
- var scale = Pango.Scale.PangoScale;
- double h = 0;
- for (int i=0; i<lc; i++) {
- var line = pl.Lines [i];
- var ext = new Pango.Rectangle ();
- var extl = new Pango.Rectangle ();
- line.GetExtents (ref ext, ref extl);
- h += (extl.Height / scale);
- if (h > layout.Height)
- break;
- ctx.Context.MoveTo (x, y + h);
- Pango.CairoHelper.ShowLayoutLine (ctx.Context, line);
- }
- }
- }
- }
-}
-
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CustomWidgetBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CustomWidgetBackend.cs
index 4c10ae4..4587264 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CustomWidgetBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/CustomWidgetBackend.cs
@@ -47,12 +47,15 @@ namespace Xwt.GtkBackend
public void SetContent (IWidgetBackend widget)
{
- var newWidget = GetWidget (widget);
+ var newWidget = GetWidgetWithPlacement (widget);
var oldWidget = Widget.Child;
+
if (oldWidget == null)
Widget.Child = newWidget;
- else
+ else {
GtkEngine.ReplaceChild (oldWidget, newWidget);
+ RemoveChildPlacement (oldWidget);
+ }
}
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs
index 646a038..fc10046 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs
@@ -28,7 +28,7 @@ using System;
using System.Linq;
using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -78,7 +78,7 @@ namespace Xwt.GtkBackend
void HandleValueChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.ValueChanged ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DesignerSurfaceBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DesignerSurfaceBackend.cs
index c34836c..282b082 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DesignerSurfaceBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DesignerSurfaceBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -42,7 +42,7 @@ namespace Xwt.GtkBackend
public void Load (Widget w)
{
- var wb = (IGtkWidgetBackend) WidgetRegistry.GetBackend (w);
+ var wb = (IGtkWidgetBackend) Toolkit.GetBackend (w);
box.Add (wb.Widget);
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs
index e464cd4..e467142 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs
@@ -27,7 +27,7 @@ using System;
using Xwt.Backends;
using System.Collections.Generic;
using System.Linq;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -90,12 +90,12 @@ namespace Xwt.GtkBackend
if (!string.IsNullOrEmpty (btn.Label) && btn.Image == null) {
b.Label = btn.Label;
} else if (string.IsNullOrEmpty (btn.Label) && btn.Image != null) {
- var pix = (Gdk.Pixbuf) WidgetRegistry.GetBackend (btn.Image);
- b.Image = new Gtk.Image (pix);
+ var pix = btn.Image.ToImageDescription ();
+ b.Image = new ImageBox (ApplicationContext, pix);
} else if (!string.IsNullOrEmpty (btn.Label)) {
Gtk.Box box = new Gtk.HBox (false, 3);
- var pix = (Gdk.Pixbuf) WidgetRegistry.GetBackend (btn.Image);
- box.PackStart (new Gtk.Image (pix), false, false, 0);
+ var pix = btn.Image.ToImageDescription ();
+ box.PackStart (new ImageBox (ApplicationContext, pix), false, false, 0);
box.PackStart (new Gtk.Label (btn.Label), true, true, 0);
b.Image = box;
}
@@ -110,7 +110,7 @@ namespace Xwt.GtkBackend
void HandleButtonClicked (object o, EventArgs a)
{
int i = Array.IndexOf (buttons, (Gtk.Button) o);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnDialogButtonClicked (dialogButtons[i]);
});
}
@@ -123,7 +123,6 @@ namespace Xwt.GtkBackend
public void RunLoop (IWindowFrameBackend parent)
{
- SetDefaultPosition ();
var p = (WindowFrameBackend) parent;
MessageService.RunCustomDialog (Window, p != null ? p.Window : null);
}
@@ -132,6 +131,15 @@ namespace Xwt.GtkBackend
{
Window.Respond (Gtk.ResponseType.Ok);
}
+
+ public override void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ base.GetMetrics (out minSize, out decorationSize);
+ var rq = Window.ActionArea.Visible ? Window.ActionArea.SizeRequest () : new Gtk.Requisition ();
+ if (rq.Width > minSize.Width)
+ minSize.Width = rq.Width;
+ decorationSize.Height += rq.Height;
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/EmbeddedWidgetBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/EmbeddedWidgetBackend.cs
new file mode 100644
index 0000000..e74552e
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/EmbeddedWidgetBackend.cs
@@ -0,0 +1,54 @@
+//
+// EmbeddedWidgetBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class EmbeddedWidgetBackend: WidgetBackend, IEmbeddedWidgetBackend
+ {
+ public EmbeddedWidgetBackend ()
+ {
+ }
+
+ public void SetContent (object nativeWidget)
+ {
+ if (nativeWidget is Gtk.Widget) {
+ Widget = (Gtk.Widget)nativeWidget;
+ return;
+ }
+
+ // Check if it is an NSView
+ Type nsView = Type.GetType ("MonoMac.AppKit.NSView, MonoMac", false);
+ if (nsView != null && nsView.IsInstanceOfType (nativeWidget)) {
+ Widget = GtkMacInterop.NSViewToGtkWidget (nativeWidget);
+ Widget.Show ();
+ return;
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ExpanderBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ExpanderBackend.cs
index d409b0f..21d2270 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ExpanderBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ExpanderBackend.cs
@@ -1,7 +1,7 @@
using System;
using Xwt;
-using Xwt.Engine;
+
using Xwt.Backends;
namespace Xwt.GtkBackend
@@ -43,7 +43,8 @@ namespace Xwt.GtkBackend
public void SetContent (IWidgetBackend child)
{
- Widget.Child = GetWidget (child);
+ RemoveChildPlacement (Widget.Child);
+ Widget.Child = GetWidgetWithPlacement (child);
}
public override void EnableEvent (object eventId)
@@ -60,13 +61,13 @@ namespace Xwt.GtkBackend
base.DisableEvent (eventId);
if (eventId is ExpandEvent) {
if ((ExpandEvent)eventId == ExpandEvent.ExpandChanged)
- Widget.Activated += HandleExpandedChanged;
+ Widget.Activated -= HandleExpandedChanged;
}
}
void HandleExpandedChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.ExpandChanged ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FileDialogBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FileDialogBackend.cs
index 3ce8084..69f82fd 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FileDialogBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FileDialogBackend.cs
@@ -28,6 +28,7 @@ using System.Collections.Generic;
using Xwt.Backends;
using System.Linq;
+
namespace Xwt.GtkBackend
{
public class FileDialogBackend: IFileDialogBackend
@@ -42,7 +43,7 @@ namespace Xwt.GtkBackend
this.action = action;
}
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
@@ -60,13 +61,14 @@ namespace Xwt.GtkBackend
{
dialog = new Gtk.FileChooserDialog ("", null, action);
dialog.SelectMultiple = multiselect;
-
+
switch (action) {
case Gtk.FileChooserAction.Open:
dialog.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
dialog.AddButton (Gtk.Stock.Open, Gtk.ResponseType.Ok);
break;
case Gtk.FileChooserAction.SelectFolder:
+ case Gtk.FileChooserAction.CreateFolder:
dialog.AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel);
dialog.AddButton ("Select Folder", Gtk.ResponseType.Ok);
break;
@@ -135,6 +137,10 @@ namespace Xwt.GtkBackend
dialog.Destroy ();
}
+ protected Gtk.FileChooserDialog Dialog {
+ get { return dialog; }
+ }
+
public string FileName {
get {
return dialog.Filename;
@@ -186,5 +192,22 @@ namespace Xwt.GtkBackend
public SelectFolderDialogBackend (): base (Gtk.FileChooserAction.SelectFolder)
{
}
+
+ #region ISelectFolderDialogBackend implementation
+
+ public bool CanCreateFolders {
+ get {
+ if (Dialog != null)
+ return Dialog.Action == Gtk.FileChooserAction.CreateFolder;
+ return false;
+ }
+
+ set {
+ if (Dialog != null)
+ Dialog.Action = Gtk.FileChooserAction.CreateFolder;
+ }
+ }
+
+ #endregion
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
index 3be7bb6..b160d03 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
@@ -28,37 +28,48 @@ using System;
using Xwt.Backends;
using Pango;
using Xwt.Drawing;
+using System.Globalization;
+using System.Reflection;
+using System.Collections.Generic;
+using System.Linq;
namespace Xwt.GtkBackend
{
- public class FontBackendHandler: IFontBackendHandler
+ public class GtkFontBackendHandler: FontBackendHandler
{
- public object Create (string fontName, double size, FontSizeUnit sizeUnit, FontStyle style, FontWeight weight, FontStretch stretch)
+ public override object GetSystemDefaultFont ()
{
- string s = sizeUnit == FontSizeUnit.Points ? size.ToString () : size + "px";
- return FontDescription.FromString (fontName + " " + s);
+ var la = new Gtk.Label ("");
+ return la.Style.FontDescription;
+ }
+
+ public override IEnumerable<string> GetInstalledFonts ()
+ {
+ return Gdk.PangoHelper.ContextGet ().FontMap.Families.Select (f => f.Name);
+ }
+
+ public override object Create (string fontName, double size, FontStyle style, FontWeight weight, FontStretch stretch)
+ {
+ return FontDescription.FromString (fontName + ", " + style + " " + weight + " " + stretch + " " + size.ToString (CultureInfo.InvariantCulture));
}
#region IFontBackendHandler implementation
- public object Copy (object handle)
+ public override object Copy (object handle)
{
FontDescription d = (FontDescription) handle;
return d.Copy ();
}
- public object SetSize (object handle, double size, FontSizeUnit sizeUnit)
+ public override object SetSize (object handle, double size)
{
FontDescription d = (FontDescription) handle;
d = d.Copy ();
- if (sizeUnit == FontSizeUnit.Points)
- d.Size = (int) (size * Pango.Scale.PangoScale);
- else
- d.AbsoluteSize = (int) (size * Pango.Scale.PangoScale);
+ d.Size = (int) (size * Pango.Scale.PangoScale);
return d;
}
- public object SetFamily (object handle, string family)
+ public override object SetFamily (object handle, string family)
{
FontDescription fd = (FontDescription) handle;
fd = fd.Copy ();
@@ -66,7 +77,7 @@ namespace Xwt.GtkBackend
return fd;
}
- public object SetStyle (object handle, FontStyle style)
+ public override object SetStyle (object handle, FontStyle style)
{
FontDescription fd = (FontDescription) handle;
fd = fd.Copy ();
@@ -74,7 +85,7 @@ namespace Xwt.GtkBackend
return fd;
}
- public object SetWeight (object handle, FontWeight weight)
+ public override object SetWeight (object handle, FontWeight weight)
{
FontDescription fd = (FontDescription) handle;
fd = fd.Copy ();
@@ -82,7 +93,7 @@ namespace Xwt.GtkBackend
return fd;
}
- public object SetStretch (object handle, FontStretch stretch)
+ public override object SetStretch (object handle, FontStretch stretch)
{
FontDescription fd = (FontDescription) handle;
fd = fd.Copy ();
@@ -90,31 +101,31 @@ namespace Xwt.GtkBackend
return fd;
}
- public double GetSize (object handle)
+ public override double GetSize (object handle)
{
FontDescription fd = (FontDescription) handle;
return (double)fd.Size / (double) Pango.Scale.PangoScale;
}
- public string GetFamily (object handle)
+ public override string GetFamily (object handle)
{
FontDescription fd = (FontDescription) handle;
return fd.Family;
}
- public FontStyle GetStyle (object handle)
+ public override FontStyle GetStyle (object handle)
{
FontDescription fd = (FontDescription) handle;
return (FontStyle)(int)fd.Style;
}
- public FontWeight GetWeight (object handle)
+ public override FontWeight GetWeight (object handle)
{
FontDescription fd = (FontDescription) handle;
return (FontWeight)(int)fd.Weight;
}
- public FontStretch GetStretch (object handle)
+ public override FontStretch GetStretch (object handle)
{
FontDescription fd = (FontDescription) handle;
return (FontStretch)(int)fd.Stretch;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FrameBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FrameBackend.cs
index 2f22446..1eb7012 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FrameBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/FrameBackend.cs
@@ -55,10 +55,14 @@ namespace Xwt.GtkBackend
public void SetContent (IWidgetBackend child)
{
Gtk.Bin parent = paddingAlign != null ? paddingAlign : Widget;
+
+ if (parent.Child != null) {
+ RemoveChildPlacement (parent.Child);
+ parent.Remove (parent.Child);
+ }
+
if (child != null) {
- var w = GetWidget (child);
- if (parent.Child != null)
- parent.Remove (parent.Child);
+ var w = GetWidgetWithPlacement (child);
parent.Child = w;
} else {
parent.Child = null;
@@ -73,8 +77,8 @@ namespace Xwt.GtkBackend
if (!(Widget is HeaderBox)) {
HeaderBox box = new HeaderBox ();
box.Show ();
- box.DrawBackground = UsingCustomBackgroundColor;
- box.SetMargins ((int)f.Margin.Top, (int)f.Margin.Bottom, (int)f.Margin.Left, (int)f.Margin.Right);
+ box.BackgroundColor = UsingCustomBackgroundColor ? (Color?)BackgroundColor : null;
+ box.SetMargins ((int)f.BorderWidthTop, (int)f.BorderWidthBottom, (int)f.BorderWidthLeft, (int)f.BorderWidthRight);
box.SetPadding ((int)f.Padding.Top, (int)f.Padding.Bottom, (int)f.Padding.Left, (int)f.Padding.Right);
if (borderColor != null)
box.SetBorderColor (borderColor.Value);
@@ -177,8 +181,9 @@ namespace Xwt.GtkBackend
}
set {
base.BackgroundColor = value;
- if (Widget is HeaderBox)
- ((HeaderBox)Widget).DrawBackground = true;
+ if (Widget is HeaderBox) {
+ ((HeaderBox)Widget).BackgroundColor = value;
+ }
}
}
@@ -194,5 +199,23 @@ namespace Xwt.GtkBackend
}
#endregion
}
+
+ class FrameWidget: Gtk.Frame, IConstraintProvider
+ {
+ protected override void OnSizeRequested (ref Gtk.Requisition requisition)
+ {
+ base.OnSizeRequested (ref requisition);
+ }
+
+ public void GetConstraints (Gtk.Widget target, out SizeConstraint width, out SizeConstraint height)
+ {
+ width = height = SizeConstraint.Unconstrained;
+ }
+ }
+
+ public interface IConstraintProvider
+ {
+ void GetConstraints (Gtk.Widget target, out SizeConstraint width, out SizeConstraint height);
+ }
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs
index dc1ced3..6fe11a9 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkAlertDialog.cs
@@ -30,6 +30,7 @@ using System;
using System.Text;
using Gtk;
using System.Linq;
+using Xwt.Backends;
namespace Xwt.GtkBackend
{
@@ -38,11 +39,12 @@ namespace Xwt.GtkBackend
/// </summary>
internal class GtkAlertDialog : Gtk.Dialog
{
+ ApplicationContext actx;
Command resultButton = null;
Command[] buttons;
Gtk.HBox hbox = new Gtk.HBox ();
- Gtk.Image image = new Gtk.Image ();
+ ImageBox image;
Gtk.Label label = new Gtk.Label ();
Gtk.VBox labelsBox = new Gtk.VBox (false, 6);
@@ -56,6 +58,7 @@ namespace Xwt.GtkBackend
void Init ()
{
+ image = new ImageBox (actx);
VBox.PackStart (hbox);
hbox.PackStart (image, false, false, 0);
hbox.PackStart (labelsBox, true, true, 0);
@@ -86,8 +89,9 @@ namespace Xwt.GtkBackend
this.label.Xalign = 0.00f;
}
- public GtkAlertDialog (MessageDescription message)
+ public GtkAlertDialog (ApplicationContext actx, MessageDescription message)
{
+ this.actx = actx;
Init ();
this.buttons = message.Buttons.ToArray ();
@@ -101,8 +105,9 @@ namespace Xwt.GtkBackend
primaryText = message.Text;
secondaryText = message.SecondaryText;
}
-
- image.SetFromStock (Util.ToGtkStock (message.Icon), Gtk.IconSize.Dialog);
+
+ var icon = message.Icon.ToImageDescription ();
+ image.Image = icon.WithDefaultSize (Gtk.IconSize.Dialog);
StringBuilder markup = new StringBuilder (@"<span weight=""bold"" size=""larger"">");
markup.Append (GLib.Markup.EscapeText (primaryText));
@@ -123,8 +128,10 @@ namespace Xwt.GtkBackend
newButton.Label = button.Label;
newButton.UseUnderline = true;
newButton.UseStock = button.IsStockButton;
- if (!String.IsNullOrEmpty (button.Icon))
- newButton.Image = new Gtk.Image (Util.ToGtkStock (button.Icon), Gtk.IconSize.Button);
+ if (button.Icon != null) {
+ icon = button.Icon.ToImageDescription ();
+ newButton.Image = new ImageBox (actx, icon.WithDefaultSize (Gtk.IconSize.Button));
+ }
newButton.Clicked += ButtonClicked;
ActionArea.Add (newButton);
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkDesktopBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkDesktopBackend.cs
new file mode 100644
index 0000000..176ab6d
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkDesktopBackend.cs
@@ -0,0 +1,87 @@
+//
+// GtkDesktopBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.GtkBackend
+{
+ public class GtkDesktopBackend: DesktopBackend
+ {
+ #region implemented abstract members of DesktopBackend
+
+ public GtkDesktopBackend ()
+ {
+ Gdk.Screen.Default.SizeChanged += delegate {
+ OnScreensChanged ();
+ };
+ Gdk.Screen.Default.CompositedChanged += delegate {
+ OnScreensChanged ();
+ };
+ }
+
+ public override Point GetMouseLocation ()
+ {
+ int x, y;
+ Gdk.Display.Default.GetPointer (out x, out y);
+ return new Point (x, y);
+ }
+
+ public override IEnumerable<object> GetScreens ()
+ {
+ for (int n=0; n<Gdk.Screen.Default.NMonitors; n++)
+ yield return n;
+ }
+
+ public override bool IsPrimaryScreen (object backend)
+ {
+ if (Platform.IsMac)
+ return (int)backend == 0;
+ else
+ return (int)backend == Gdk.Screen.Default.GetMonitorAtPoint (0, 0);
+ }
+
+ public override Rectangle GetScreenBounds (object backend)
+ {
+ var r = Gdk.Screen.Default.GetMonitorGeometry ((int)backend);
+ return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ }
+
+ public override Rectangle GetScreenVisibleBounds (object backend)
+ {
+ var r = Gdk.Screen.Default.GetUsableMonitorGeometry ((int)backend);
+ return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ }
+
+ public override string GetScreenDeviceName (object backend)
+ {
+ return backend.ToString ();
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
index 8b4401e..d18f9ae 100755
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
@@ -24,83 +24,89 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define USE_PANGO
-
using System;
-using Xwt.Engine;
+
using Xwt.Backends;
using Xwt.CairoBackend;
+using Gdk;
namespace Xwt.GtkBackend
{
- class GtkEngine: Xwt.Backends.EngineBackend
+ public class GtkEngine: ToolkitEngineBackend
{
public override void InitializeApplication ()
{
Gtk.Application.Init ();
-
- WidgetRegistry.RegisterBackend (typeof(Xwt.Widget), typeof(CustomWidgetBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Window), typeof(WindowBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Label), typeof(LabelBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.HBox), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.VBox), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Button), typeof(ButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Notebook), typeof(NotebookBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.TreeView), typeof(TreeViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.TreeStore), typeof(TreeStoreBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ListView), typeof(ListViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ListStore), typeof(ListStoreBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Canvas), typeof(CanvasBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Image), typeof(ImageHandler));
-#if USE_PANGO
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Context), typeof(ContextBackendHandlerWithPango));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.TextLayout), typeof(TextLayoutBackendHandler));
-#else
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Context), typeof(ContextBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.TextLayout), typeof(CairoTextLayoutBackendHandler));
-#endif
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Gradient), typeof(CairoGradientBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Font), typeof(FontBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Menu), typeof(MenuBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.MenuItem), typeof(MenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.CheckBoxMenuItem), typeof(CheckBoxMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.RadioButtonMenuItem), typeof(RadioButtonMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SeparatorMenuItem), typeof(SeparatorMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ScrollView), typeof(ScrollViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ComboBox), typeof(ComboBoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Design.DesignerSurface), typeof(DesignerSurfaceBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.MenuButton), typeof(MenuButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.TextEntry), typeof(TextEntryBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ToggleButton), typeof(ToggleButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ImageView), typeof(ImageViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Backends.IAlertDialogBackend), typeof(AlertDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Table), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.CheckBox), typeof(CheckBoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Frame), typeof(FrameBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.VSeparator), typeof(SeparatorBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.HSeparator), typeof(SeparatorBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Dialog), typeof(DialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ComboBoxEntry), typeof(ComboBoxEntryBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Clipboard), typeof(ClipboardBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.ImagePattern), typeof(ImagePatternBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.ImageBuilder), typeof(ImageBuilderBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ScrollAdjustment), typeof(ScrollAdjustmentBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.OpenFileDialog), typeof(OpenFileDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SaveFileDialog), typeof(SaveFileDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SelectFolderDialog), typeof(SelectFolderDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Paned), typeof(PanedBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SelectColorDialog), typeof(SelectColorDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ListBox), typeof(ListBoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.StatusIcon), typeof(StatusIconBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ProgressBar), typeof(ProgressBarBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Popover), typeof (PopoverBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SpinButton), typeof (SpinButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.DatePicker), typeof (DatePickerBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.LinkLabel), typeof (LinkLabelBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Placement), typeof (BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Spinner), typeof (SpinnerBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.RichTextView), typeof (RichTextViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Expander), typeof (ExpanderBackend));
+ }
+
+ public override void InitializeBackends ()
+ {
+ RegisterBackend<ICustomWidgetBackend, CustomWidgetBackend> ();
+ RegisterBackend<IWindowBackend, WindowBackend> ();
+ RegisterBackend<ILabelBackend, LabelBackend> ();
+ RegisterBackend<IBoxBackend, BoxBackend> ();
+ RegisterBackend<IButtonBackend, ButtonBackend> ();
+ RegisterBackend<INotebookBackend, NotebookBackend> ();
+ RegisterBackend<ITreeViewBackend, TreeViewBackend> ();
+ RegisterBackend<ITreeStoreBackend, TreeStoreBackend> ();
+ RegisterBackend<IListViewBackend, ListViewBackend> ();
+ RegisterBackend<IListStoreBackend, ListStoreBackend> ();
+ RegisterBackend<ICanvasBackend, CanvasBackend> ();
+ RegisterBackend<ImageBackendHandler, ImageHandler> ();
+ RegisterBackend<Xwt.Backends.ContextBackendHandler, CairoContextBackendHandler> ();
+ RegisterBackend<TextLayoutBackendHandler, GtkTextLayoutBackendHandler> ();
+ RegisterBackend<DrawingPathBackendHandler, CairoContextBackendHandler> ();
+ RegisterBackend<GradientBackendHandler, CairoGradientBackendHandler> ();
+ RegisterBackend<FontBackendHandler, GtkFontBackendHandler> ();
+ RegisterBackend<IMenuBackend, MenuBackend> ();
+ RegisterBackend<IMenuItemBackend, MenuItemBackend> ();
+ RegisterBackend<ICheckBoxMenuItemBackend, CheckBoxMenuItemBackend> ();
+ RegisterBackend<IRadioButtonMenuItemBackend, RadioButtonMenuItemBackend> ();
+ RegisterBackend<ISeparatorMenuItemBackend, SeparatorMenuItemBackend> ();
+ RegisterBackend<IScrollViewBackend, ScrollViewBackend> ();
+ RegisterBackend<IComboBoxBackend, ComboBoxBackend> ();
+ RegisterBackend<IDesignerSurfaceBackend, DesignerSurfaceBackend> ();
+ RegisterBackend<IMenuButtonBackend, MenuButtonBackend> ();
+ RegisterBackend<ITextEntryBackend, TextEntryBackend> ();
+ RegisterBackend<IToggleButtonBackend, ToggleButtonBackend> ();
+ RegisterBackend<IImageViewBackend, ImageViewBackend> ();
+ RegisterBackend<IAlertDialogBackend, AlertDialogBackend> ();
+ RegisterBackend<ICheckBoxBackend, CheckBoxBackend> ();
+ RegisterBackend<IFrameBackend, FrameBackend> ();
+ RegisterBackend<ISeparatorBackend, SeparatorBackend> ();
+ RegisterBackend<IDialogBackend, DialogBackend> ();
+ RegisterBackend<IComboBoxEntryBackend, ComboBoxEntryBackend> ();
+ RegisterBackend<ClipboardBackend, GtkClipboardBackend> ();
+ RegisterBackend<ImagePatternBackendHandler, GtkImagePatternBackendHandler> ();
+ RegisterBackend<ImageBuilderBackendHandler, ImageBuilderBackend> ();
+ RegisterBackend<IScrollAdjustmentBackend, ScrollAdjustmentBackend> ();
+ RegisterBackend<IOpenFileDialogBackend, OpenFileDialogBackend> ();
+ RegisterBackend<ISaveFileDialogBackend, SaveFileDialogBackend> ();
+ RegisterBackend<ISelectFolderDialogBackend, SelectFolderDialogBackend> ();
+ RegisterBackend<IPanedBackend, PanedBackend> ();
+ RegisterBackend<ISelectColorDialogBackend, SelectColorDialogBackend> ();
+ RegisterBackend<IListBoxBackend, ListBoxBackend> ();
+ RegisterBackend<IStatusIconBackend, StatusIconBackend> ();
+ RegisterBackend<IProgressBarBackend, ProgressBarBackend> ();
+ RegisterBackend<IPopoverBackend, PopoverBackend> ();
+ RegisterBackend<ISpinButtonBackend, SpinButtonBackend> ();
+ RegisterBackend<IDatePickerBackend, DatePickerBackend> ();
+ RegisterBackend<ILinkLabelBackend, LinkLabelBackend> ();
+ RegisterBackend<ISpinnerBackend, SpinnerBackend> ();
+ RegisterBackend<IRichTextViewBackend, RichTextViewBackend> ();
+ RegisterBackend<IExpanderBackend, ExpanderBackend> ();
+ RegisterBackend<DesktopBackend, GtkDesktopBackend> ();
+ RegisterBackend<IEmbeddedWidgetBackend, EmbeddedWidgetBackend> ();
+ RegisterBackend<ISegmentedButtonBackend, SegmentedButtonBackend> ();
+ RegisterBackend<ISliderBackend, SliderBackend> ();
+ RegisterBackend<IRadioButtonBackend, RadioButtonBackend> ();
+ RegisterBackend<IScrollbarBackend, ScrollbarBackend> ();
+ }
+
+ public override void Dispose ()
+ {
+ base.Dispose ();
+ GtkTextLayoutBackendHandler.DisposeResources ();
}
public override void RunApplication ()
@@ -129,8 +135,8 @@ namespace Xwt.GtkBackend
((IGtkContainer)cont).ReplaceChild (oldWidget, newWidget);
}
else if (cont is Gtk.Notebook) {
- Gtk.Notebook notebook = (Gtk.Notebook) cont;
- Gtk.Notebook.NotebookChild nc = (Gtk.Notebook.NotebookChild) notebook[oldWidget];
+ Gtk.Notebook notebook = (Gtk.Notebook)cont;
+ Gtk.Notebook.NotebookChild nc = (Gtk.Notebook.NotebookChild)notebook [oldWidget];
var detachable = nc.Detachable;
var pos = nc.Position;
var reorderable = nc.Reorderable;
@@ -140,12 +146,27 @@ namespace Xwt.GtkBackend
notebook.Remove (oldWidget);
notebook.InsertPage (newWidget, label, pos);
- nc = (Gtk.Notebook.NotebookChild) notebook[newWidget];
+ nc = (Gtk.Notebook.NotebookChild)notebook [newWidget];
nc.Detachable = detachable;
nc.Reorderable = reorderable;
nc.TabExpand = tabExpand;
nc.TabFill = tabFill;
}
+ else if (cont is Gtk.Paned) {
+ var paned = (Gtk.Paned)cont;
+ var pc = (Gtk.Paned.PanedChild)paned[oldWidget];
+ var resize = pc.Resize;
+ var shrink = pc.Shrink;
+ var pos = paned.Position;
+ if (paned.Child1 == oldWidget) {
+ paned.Remove (oldWidget);
+ paned.Pack1 (newWidget, resize, shrink);
+ } else {
+ paned.Remove (oldWidget);
+ paned.Pack2 (newWidget, resize, shrink);
+ }
+ paned.Position = pos;
+ }
else if (cont is Gtk.Bin) {
((Gtk.Bin)cont).Remove (oldWidget);
((Gtk.Bin)cont).Child = newWidget;
@@ -184,9 +205,15 @@ namespace Xwt.GtkBackend
public override object GetNativeWidget (Widget w)
{
- IGtkWidgetBackend wb = (IGtkWidgetBackend)WidgetRegistry.GetBackend (w);
+ IGtkWidgetBackend wb = (IGtkWidgetBackend)Toolkit.GetBackend (w);
return wb.Widget;
}
+
+ public override object GetNativeImage (Xwt.Drawing.Image image)
+ {
+ var pix = (GtkImage)Toolkit.GetBackend (image);
+ return pix.ToPixbuf (ApplicationContext, image.Size.Width, image.Size.Height);
+ }
public override IWindowFrameBackend GetBackendForWindow (object nativeWindow)
{
@@ -194,16 +221,28 @@ namespace Xwt.GtkBackend
win.Window = (Gtk.Window) nativeWindow;
return win;
}
+
+ public override object GetBackendForImage (object nativeImage)
+ {
+ if (nativeImage is Gdk.Pixbuf)
+ return new GtkImage ((Gdk.Pixbuf)nativeImage);
+ else if (nativeImage is string)
+ return new GtkImage ((string)nativeImage);
+ else if (nativeImage is GtkImage)
+ return nativeImage;
+ else
+ throw new NotSupportedException ();
+ }
public override object GetNativeParentWindow (Widget w)
{
- IGtkWidgetBackend wb = (IGtkWidgetBackend)WidgetRegistry.GetBackend (w);
+ IGtkWidgetBackend wb = (IGtkWidgetBackend)Toolkit.GetBackend (w);
return wb.Widget.Toplevel as Gtk.Window;
}
public override bool HasNativeParent (Widget w)
{
- IGtkWidgetBackend wb = (IGtkWidgetBackend)WidgetRegistry.GetBackend (w);
+ IGtkWidgetBackend wb = (IGtkWidgetBackend)Toolkit.GetBackend (w);
return wb.Widget.Parent != null;
}
@@ -222,6 +261,34 @@ namespace Xwt.GtkBackend
Gdk.Threads.Leave();
}
+
+ public override object RenderWidget (Widget widget)
+ {
+ var w = ((WidgetBackend)widget.GetBackend ()).Widget;
+ Gdk.Window win = w.GdkWindow;
+ if (win != null && win.IsViewable)
+ return new GtkImage (Gdk.Pixbuf.FromDrawable (win, Colormap.System, w.Allocation.X, w.Allocation.Y, 0, 0, w.Allocation.Width, w.Allocation.Height));
+ else
+ throw new InvalidOperationException ();
+ }
+
+ public override void RenderImage (object nativeWidget, object nativeContext, ImageDescription img, double x, double y)
+ {
+ GtkImage gim = (GtkImage)img.Backend;
+ Cairo.Context ctx = nativeContext as Cairo.Context;
+ Gtk.Widget w = (Gtk.Widget)nativeWidget;
+ if (ctx != null)
+ gim.Draw (ApplicationContext, ctx, Util.GetScaleFactor (w), x, y, img);
+ }
+
+ public override ToolkitFeatures SupportedFeatures {
+ get {
+ var f = ToolkitFeatures.All & ~ToolkitFeatures.WidgetOpacity;
+ if (Platform.IsWindows)
+ f &= ~ToolkitFeatures.WindowOpacity;
+ return f;
+ }
+ }
}
public interface IGtkContainer
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkInterop.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkInterop.cs
new file mode 100644
index 0000000..60b4d4b
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkInterop.cs
@@ -0,0 +1,257 @@
+//
+// PangoUtils.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
+//
+// 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 Gtk;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using Xwt.Drawing;
+
+namespace Xwt.GtkBackend
+{
+ public static class GtkInterop
+ {
+ internal const string LIBGTK = "libgtk-win32-2.0-0.dll";
+ internal const string LIBATK = "libatk-1.0-0.dll";
+ internal const string LIBGLIB = "libglib-2.0-0.dll";
+ internal const string LIBGDK = "libgdk-win32-2.0-0.dll";
+ internal const string LIBGOBJECT = "libgobject-2.0-0.dll";
+ internal const string LIBPANGO = "libpango-1.0-0.dll";
+ internal const string LIBPANGOCAIRO = "libpangocairo-1.0-0.dll";
+
+ }
+
+ /// <summary>
+ /// This creates a Pango list and applies attributes to it with *much* less overhead than the GTK# version.
+ /// </summary>
+ internal class FastPangoAttrList : IDisposable
+ {
+ IntPtr list;
+
+ public FastPangoAttrList ()
+ {
+ list = pango_attr_list_new ();
+ }
+
+ public void AddAttributes (TextIndexer indexer, IEnumerable<TextAttribute> attrs)
+ {
+ foreach (var attr in attrs)
+ AddAttribute (indexer, attr);
+ }
+
+ public void AddAttribute (TextIndexer indexer, TextAttribute attr)
+ {
+ var start = (uint) indexer.IndexToByteIndex (attr.StartIndex);
+ var end = (uint) indexer.IndexToByteIndex (attr.StartIndex + attr.Count);
+
+ if (attr is BackgroundTextAttribute) {
+ var xa = (BackgroundTextAttribute)attr;
+ AddBackgroundAttribute (xa.Color.ToGdkColor (), start, end);
+ }
+ else if (attr is ColorTextAttribute) {
+ var xa = (ColorTextAttribute)attr;
+ AddForegroundAttribute (xa.Color.ToGdkColor (), start, end);
+ }
+ else if (attr is FontWeightTextAttribute) {
+ var xa = (FontWeightTextAttribute)attr;
+ AddWeightAttribute ((Pango.Weight)(int)xa.Weight, start, end);
+ }
+ else if (attr is FontStyleTextAttribute) {
+ var xa = (FontStyleTextAttribute)attr;
+ AddStyleAttribute ((Pango.Style)(int)xa.Style, start, end);
+ }
+ else if (attr is UnderlineTextAttribute) {
+ var xa = (UnderlineTextAttribute)attr;
+ AddUnderlineAttribute (xa.Underline ? Pango.Underline.Single : Pango.Underline.None, start, end);
+ }
+ else if (attr is StrikethroughTextAttribute) {
+ var xa = (StrikethroughTextAttribute)attr;
+ AddStrikethroughAttribute (xa.Strikethrough, start, end);
+ }
+ else if (attr is FontTextAttribute) {
+ var xa = (FontTextAttribute)attr;
+ AddFontAttribute ((Pango.FontDescription)Toolkit.GetBackend (xa.Font), start, end);
+ }
+ }
+
+ public IntPtr Handle {
+ get { return list; }
+ }
+
+ public void AddStyleAttribute (Pango.Style style, uint start, uint end)
+ {
+ Add (pango_attr_style_new (style), start, end);
+ }
+
+ public void AddWeightAttribute (Pango.Weight weight, uint start, uint end)
+ {
+ Add (pango_attr_weight_new (weight), start, end);
+ }
+
+ public void AddForegroundAttribute (Gdk.Color color, uint start, uint end)
+ {
+ Add (pango_attr_foreground_new (color.Red, color.Green, color.Blue), start, end);
+ }
+
+ public void AddBackgroundAttribute (Gdk.Color color, uint start, uint end)
+ {
+ Add (pango_attr_background_new (color.Red, color.Green, color.Blue), start, end);
+ }
+
+ public void AddUnderlineAttribute (Pango.Underline underline, uint start, uint end)
+ {
+ Add (pango_attr_underline_new (underline), start, end);
+ }
+
+ public void AddStrikethroughAttribute (bool strikethrough, uint start, uint end)
+ {
+ Add (pango_attr_strikethrough_new (strikethrough), start, end);
+ }
+
+ public void AddFontAttribute (Pango.FontDescription font, uint start, uint end)
+ {
+ Add (pango_attr_font_desc_new (font), start, end);
+ }
+
+ void Add (IntPtr attribute, uint start, uint end)
+ {
+ unsafe {
+ PangoAttribute *attPtr = (PangoAttribute *) attribute;
+ attPtr->start_index = start;
+ attPtr->end_index = end;
+ }
+ pango_attr_list_insert (list, attribute);
+ }
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_style_new (Pango.Style style);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_weight_new (Pango.Weight weight);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_foreground_new (ushort red, ushort green, ushort blue);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_background_new (ushort red, ushort green, ushort blue);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_underline_new (Pango.Underline underline);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_strikethrough_new (bool strikethrough);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_font_desc_new (Pango.FontDescription desc);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_list_new ();
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern void pango_attr_list_unref (IntPtr list);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern void pango_attr_list_insert (IntPtr list, IntPtr attr);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern void pango_layout_set_attributes (IntPtr layout, IntPtr attrList);
+
+ [DllImport (GtkInterop.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern void pango_attr_list_splice (IntPtr attr_list, IntPtr other, Int32 pos, Int32 len);
+
+ public void Splice (Pango.AttrList attrs, int pos, int len)
+ {
+ pango_attr_list_splice (list, attrs.Handle, pos, len);
+ }
+
+ public void AssignTo (Pango.Layout layout)
+ {
+ pango_layout_set_attributes (layout.Handle, list);
+ }
+
+ [StructLayout (LayoutKind.Sequential)]
+ struct PangoAttribute
+ {
+ public IntPtr klass;
+ public uint start_index;
+ public uint end_index;
+ }
+
+ public void Dispose ()
+ {
+ pango_attr_list_unref (list);
+ list = IntPtr.Zero;
+ }
+ }
+
+ internal class TextIndexer
+ {
+ int[] indexToByteIndex;
+ int[] byteIndexToIndex;
+
+ public TextIndexer (string text)
+ {
+ SetupTables (text);
+ }
+
+ public int IndexToByteIndex (int i)
+ {
+ if (i >= indexToByteIndex.Length)
+ return i;
+ return indexToByteIndex[i];
+ }
+
+ public int ByteIndexToIndex (int i)
+ {
+ return byteIndexToIndex[i];
+ }
+
+ public void SetupTables (string text)
+ {
+ if (text == null) {
+ this.indexToByteIndex = new int[0];
+ this.byteIndexToIndex = new int[0];
+ return;
+ }
+
+ var arr = text.ToCharArray ();
+ int byteIndex = 0;
+ int[] indexToByteIndex = new int[arr.Length];
+ var byteIndexToIndex = new List<int> ();
+ for (int i = 0; i < arr.Length; i++) {
+ indexToByteIndex[i] = byteIndex;
+ byteIndex += System.Text.Encoding.UTF8.GetByteCount (arr, i, 1);
+ while (byteIndexToIndex.Count < byteIndex)
+ byteIndexToIndex.Add (i);
+ }
+ this.indexToByteIndex = indexToByteIndex;
+ this.byteIndexToIndex = byteIndexToIndex.ToArray ();
+ }
+ }
+}
\ No newline at end of file
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkMacInterop.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkMacInterop.cs
new file mode 100644
index 0000000..8ebb252
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkMacInterop.cs
@@ -0,0 +1,47 @@
+//
+// GtkMacInterop.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin, Inc.
+//
+// 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;
+
+namespace Xwt.GtkBackend
+{
+ public class GtkMacInterop
+ {
+ const string LibGdk = "libgdk-quartz-2.0.dylib";
+ const string LibGtk = "libgtk-quartz-2.0";
+
+ [System.Runtime.InteropServices.DllImport (LibGtk)]
+ extern static IntPtr gtk_ns_view_new (IntPtr nsview);
+
+ public static Gtk.Widget NSViewToGtkWidget (object view)
+ {
+ var prop = view.GetType ().GetProperty ("Handle");
+ var handle = prop.GetValue (view, null);
+ return new Gtk.Widget (gtk_ns_view_new ((IntPtr)handle));
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWorkarounds.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWorkarounds.cs
index e2a3f6e..beca29b 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWorkarounds.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/GtkWorkarounds.cs
@@ -53,17 +53,47 @@ namespace Xwt.GtkBackend
static extern bool objc_msgSend_bool (IntPtr klass, IntPtr selector);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
- static extern bool objc_msgSend_int_int (IntPtr klass, IntPtr selector, int arg);
+ static extern int objc_msgSend_NSInt32_NSInt32 (IntPtr klass, IntPtr selector, int arg);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
+ static extern long objc_msgSend_NSInt64_NSInt64 (IntPtr klass, IntPtr selector, long arg);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
- static extern int objc_msgSend_int (IntPtr klass, IntPtr selector);
+ static extern uint objc_msgSend_NSUInt32 (IntPtr klass, IntPtr selector);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
+ static extern ulong objc_msgSend_NSUInt64 (IntPtr klass, IntPtr selector);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend_stret")]
- static extern void objc_msgSend_RectangleF (out RectangleF rect, IntPtr klass, IntPtr selector);
+ static extern void objc_msgSend_CGRect32 (out CGRect32 rect, IntPtr klass, IntPtr selector);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend_stret")]
+ static extern void objc_msgSend_CGRect64 (out CGRect64 rect, IntPtr klass, IntPtr selector);
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern IntPtr gdk_quartz_window_get_nswindow (IntPtr window);
+
+ struct CGRect32
+ {
+ public float X, Y, Width, Height;
+ }
+
+ struct CGRect64
+ {
+ public double X, Y, Width, Height;
+
+ public CGRect64 (CGRect32 rect32)
+ {
+ X = rect32.X;
+ Y = rect32.Y;
+ Width = rect32.Width;
+ Height = rect32.Height;
+ }
+ }
+
static IntPtr cls_NSScreen;
static IntPtr sel_screens, sel_objectEnumerator, sel_nextObject, sel_frame, sel_visibleFrame,
- sel_requestUserAttention, sel_activateIgnoringOtherApps;
+ sel_requestUserAttention, sel_setHasShadow, sel_invalidateShadow, sel_activateIgnoringOtherApps;
static IntPtr sharedApp;
static IntPtr cls_NSEvent;
static IntPtr sel_modifierFlags;
@@ -127,6 +157,8 @@ namespace Xwt.GtkBackend
sel_requestUserAttention = sel_registerName ("requestUserAttention:");
sel_modifierFlags = sel_registerName ("modifierFlags");
sel_activateIgnoringOtherApps = sel_registerName ("activateIgnoringOtherApps:");
+ sel_setHasShadow = sel_registerName ("setHasShadow:");
+ sel_invalidateShadow = sel_registerName ("invalidateShadow");
sharedApp = objc_msgSend_IntPtr (objc_getClass ("NSApplication"), sel_registerName ("sharedApplication"));
}
@@ -136,7 +168,6 @@ namespace Xwt.GtkBackend
IntPtr iter = objc_msgSend_IntPtr (array, sel_objectEnumerator);
Gdk.Rectangle ygeometry = screen.GetMonitorGeometry (monitor);
Gdk.Rectangle xgeometry = screen.GetMonitorGeometry (0);
- RectangleF visible, frame;
IntPtr scrn;
int i = 0;
@@ -145,9 +176,19 @@ namespace Xwt.GtkBackend
if (scrn == IntPtr.Zero)
return screen.GetMonitorGeometry (monitor);
-
- objc_msgSend_RectangleF (out visible, scrn, sel_visibleFrame);
- objc_msgSend_RectangleF (out frame, scrn, sel_frame);
+
+ CGRect64 visible, frame;
+
+ if (IntPtr.Size == 8) {
+ objc_msgSend_CGRect64 (out visible, scrn, sel_visibleFrame);
+ objc_msgSend_CGRect64 (out frame, scrn, sel_frame);
+ } else {
+ CGRect32 visible32, frame32;
+ objc_msgSend_CGRect32 (out visible32, scrn, sel_visibleFrame);
+ objc_msgSend_CGRect32 (out frame32, scrn, sel_frame);
+ visible = new CGRect64 (visible32);
+ frame = new CGRect64 (frame32);
+ }
// Note: Frame and VisibleFrame rectangles are relative to monitor 0, but we need absolute
// coordinates.
@@ -160,11 +201,11 @@ namespace Xwt.GtkBackend
//
// We need to swap the Y offset with the menu height because our callers expect the Y offset
// to be from the top of the screen, not from the bottom of the screen.
- float x, y, width, height;
+ double x, y, width, height;
if (visible.Height < frame.Height) {
- float dockHeight = visible.Y - frame.Y;
- float menubarHeight = (frame.Height - visible.Height) - dockHeight;
+ double dockHeight = visible.Y - frame.Y;
+ double menubarHeight = (frame.Height - visible.Height) - dockHeight;
height = frame.Height - menubarHeight - dockHeight;
y = ygeometry.Y + menubarHeight;
@@ -183,16 +224,94 @@ namespace Xwt.GtkBackend
static void MacRequestAttention (bool critical)
{
int kind = critical? NSCriticalRequest : NSInformationalRequest;
- objc_msgSend_int_int (sharedApp, sel_requestUserAttention, kind);
+ if (IntPtr.Size == 8) {
+ objc_msgSend_NSInt64_NSInt64 (sharedApp, sel_requestUserAttention, kind);
+ } else {
+ objc_msgSend_NSInt32_NSInt32 (sharedApp, sel_requestUserAttention, kind);
+ }
}
public static void GrabDesktopFocus ()
{
objc_msgSend_void_bool (sharedApp, sel_activateIgnoringOtherApps, true);
}
+
+ // Note: we can't reuse RectangleF because the layout is different...
+ [StructLayout (LayoutKind.Sequential)]
+ struct Rect {
+ public int Left;
+ public int Top;
+ public int Right;
+ public int Bottom;
+
+ public int X { get { return Left; } }
+ public int Y { get { return Top; } }
+ public int Width { get { return Right - Left; } }
+ public int Height { get { return Bottom - Top; } }
+ }
+
+ const int MonitorInfoFlagsPrimary = 0x01;
+
+ [StructLayout (LayoutKind.Sequential)]
+ unsafe struct MonitorInfo {
+ public int Size;
+ public Rect Frame; // Monitor
+ public Rect VisibleFrame; // Work
+ public int Flags;
+ public fixed byte Device[32];
+ }
+
+ [UnmanagedFunctionPointer (CallingConvention.Winapi)]
+ delegate int EnumMonitorsCallback (IntPtr hmonitor, IntPtr hdc, IntPtr prect, IntPtr user_data);
+
+ [DllImport ("User32.dll")]
+ extern static int EnumDisplayMonitors (IntPtr hdc, IntPtr clip, EnumMonitorsCallback callback, IntPtr user_data);
+
+ [DllImport ("User32.dll")]
+ extern static int GetMonitorInfoA (IntPtr hmonitor, ref MonitorInfo info);
+
+ static Gdk.Rectangle WindowsGetUsableMonitorGeometry (Gdk.Screen screen, int monitor_id)
+ {
+ Gdk.Rectangle geometry = screen.GetMonitorGeometry (monitor_id);
+ List<MonitorInfo> screens = new List<MonitorInfo> ();
+
+ EnumDisplayMonitors (IntPtr.Zero, IntPtr.Zero, delegate (IntPtr hmonitor, IntPtr hdc, IntPtr prect, IntPtr user_data) {
+ var info = new MonitorInfo ();
+
+ unsafe {
+ info.Size = sizeof (MonitorInfo);
+ }
+
+ GetMonitorInfoA (hmonitor, ref info);
+
+ // In order to keep the order the same as Gtk, we need to put the primary monitor at the beginning.
+ if ((info.Flags & MonitorInfoFlagsPrimary) != 0)
+ screens.Insert (0, info);
+ else
+ screens.Add (info);
+
+ return 1;
+ }, IntPtr.Zero);
+
+ MonitorInfo monitor = screens[monitor_id];
+ Rect visible = monitor.VisibleFrame;
+ Rect frame = monitor.Frame;
+
+ // Rebase the VisibleFrame off of Gtk's idea of this monitor's geometry (since they use different coordinate systems)
+ int x = geometry.X + (visible.Left - frame.Left);
+ int width = visible.Width;
+
+ int y = geometry.Y + (visible.Top - frame.Top);
+ int height = visible.Height;
+
+ return new Gdk.Rectangle (x, y, width, height);
+ }
public static Gdk.Rectangle GetUsableMonitorGeometry (this Gdk.Screen screen, int monitor)
{
+ if (Platform.IsWindows)
+ return WindowsGetUsableMonitorGeometry (screen, monitor);
+
if (Platform.IsMac)
return MacGetUsableMonitorGeometry (screen, monitor);
@@ -255,7 +374,12 @@ namespace Xwt.GtkBackend
{
if (Platform.IsMac) {
Gdk.ModifierType mtype = Gdk.ModifierType.None;
- int mod = objc_msgSend_int (cls_NSEvent, sel_modifierFlags);
+ ulong mod;
+ if (IntPtr.Size == 8) {
+ mod = objc_msgSend_NSUInt64 (cls_NSEvent, sel_modifierFlags);
+ } else {
+ mod = objc_msgSend_NSUInt32 (cls_NSEvent, sel_modifierFlags);
+ }
if ((mod & (1 << 17)) != 0)
mtype |= Gdk.ModifierType.ShiftMask;
if ((mod & (1 << 18)) != 0)
@@ -298,7 +422,7 @@ namespace Xwt.GtkBackend
adj.Value = System.Math.Max (adj.Lower, System.Math.Min (adj.Value + value, adj.Upper - adj.PageSize));
}
- [DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport (GtkInterop.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
extern static bool gdk_event_get_scroll_deltas (IntPtr eventScroll, out double deltaX, out double deltaY);
static bool scrollDeltasNotSupported;
@@ -327,7 +451,8 @@ namespace Xwt.GtkBackend
if (parent != null) {
menu.AttachToWidget (parent, null);
menu.Hidden += (sender, e) => {
- menu.Detach ();
+ if (menu.AttachWidget != null)
+ menu.Detach ();
};
posFunc = delegate (Gtk.Menu m, out int x, out int y, out bool pushIn) {
Gdk.Window window = evt != null? evt.Window : parent.GdkWindow;
@@ -416,11 +541,11 @@ namespace Xwt.GtkBackend
}
//introduced in GTK 2.20
- [DllImport (PangoUtil.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport (GtkInterop.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
extern static bool gdk_keymap_add_virtual_modifiers (IntPtr keymap, ref Gdk.ModifierType state);
//Custom patch in Mono Mac w/GTK+ 2.24.8+
- [DllImport (PangoUtil.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport (GtkInterop.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
extern static bool gdk_quartz_set_fix_modifiers (bool fix);
static Gdk.Keymap keymap = Gdk.Keymap.Default;
@@ -533,6 +658,11 @@ namespace Xwt.GtkBackend
state = (state & ~ctrlAlt) | Gdk.ModifierType.Mod2Mask;
group = 1;
}
+ // Case: Caps lock on + shift + key
+ // See: Bug 8069 - [UI Refresh] If caps lock is on, holding the shift key prevents typed characters from appearing
+ if (state.HasFlag (Gdk.ModifierType.ShiftMask)) {
+ state &= ~Gdk.ModifierType.ShiftMask;
+ }
}
keymap.TranslateKeyboardState (hardware_keycode, state, group, out keyval, out effective_group,
@@ -673,6 +803,26 @@ namespace Xwt.GtkBackend
return rect.Y + rect.Height - 1;
}
+ /// <summary>
+ /// Shows or hides the shadow of the window rendered by the native toolkit
+ /// </summary>
+ public static void ShowNativeShadow (Gtk.Window window, bool show)
+ {
+ if (Platform.IsMac) {
+ var ptr = gdk_quartz_window_get_nswindow (window.GdkWindow.Handle);
+ objc_msgSend_void_bool (ptr, sel_setHasShadow, show);
+ }
+ }
+
+ public static void UpdateNativeShadow (Gtk.Window window)
+ {
+ if (!Platform.IsMac)
+ return;
+
+ var ptr = gdk_quartz_window_get_nswindow (window.GdkWindow.Handle);
+ objc_msgSend_IntPtr (ptr, sel_invalidateShadow);
+ }
+
[DllImport ("gtksharpglue-2", CallingConvention = CallingConvention.Cdecl)]
static extern void gtksharp_container_leak_fixed_marker ();
@@ -862,6 +1012,176 @@ namespace Xwt.GtkBackend
public string Url { get { return (string)base.Args [0]; } }
}
}
+
+ static bool canSetOverlayScrollbarPolicy = true;
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern void gtk_scrolled_window_set_overlay_policy (IntPtr sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy);
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern void gtk_scrolled_window_get_overlay_policy (IntPtr sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy);
+
+ public static void SetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy)
+ {
+ if (!canSetOverlayScrollbarPolicy) {
+ return;
+ }
+ try {
+ gtk_scrolled_window_set_overlay_policy (sw.Handle, hpolicy, vpolicy);
+ return;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ }
+
+ public static void GetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy)
+ {
+ if (!canSetOverlayScrollbarPolicy) {
+ hpolicy = vpolicy = 0;
+ return;
+ }
+ try {
+ gtk_scrolled_window_get_overlay_policy (sw.Handle, out hpolicy, out vpolicy);
+ return;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ hpolicy = vpolicy = 0;
+ canSetOverlayScrollbarPolicy = false;
+ }
+
+ [DllImport (GtkInterop.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
+ static extern bool gtk_tree_view_get_tooltip_context (IntPtr raw, ref int x, ref int y, bool keyboard_tip, out IntPtr model, out IntPtr path, IntPtr iter);
+
+ //the GTK# version of this has 'out' instead of 'ref', preventing passing the x,y values in
+ public static bool GetTooltipContext (this Gtk.TreeView tree, ref int x, ref int y, bool keyboardTip,
+ out Gtk.TreeModel model, out Gtk.TreePath path, out Gtk.TreeIter iter)
+ {
+ IntPtr intPtr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gtk.TreeIter)));
+ IntPtr handle;
+ IntPtr intPtr2;
+ bool result = gtk_tree_view_get_tooltip_context (tree.Handle, ref x, ref y, keyboardTip, out handle, out intPtr2, intPtr);
+ model = Gtk.TreeModelAdapter.GetObject (handle, false);
+ path = intPtr2 == IntPtr.Zero ? null : ((Gtk.TreePath) GLib.Opaque.GetOpaque (intPtr2, typeof (Gtk.TreePath), false));
+ iter = Gtk.TreeIter.New (intPtr);
+ Marshal.FreeHGlobal (intPtr);
+ return result;
+ }
+
+ [DllImport (GtkInterop.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
+ static extern void gtk_image_menu_item_set_always_show_image (IntPtr menuitem, bool alwaysShow);
+
+ public static void ForceImageOnMenuItem (Gtk.ImageMenuItem mi)
+ {
+ if (GtkMinorVersion >= 16)
+ gtk_image_menu_item_set_always_show_image (mi.Handle, true);
+ }
+
+
+ static bool supportsHiResIcons = true;
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern void gtk_icon_source_set_scale (IntPtr source, double scale);
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern void gtk_icon_source_set_scale_wildcarded (IntPtr source, bool setting);
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern double gtk_widget_get_scale_factor (IntPtr widget);
+
+ [DllImport (GtkInterop.LIBGOBJECT)]
+ static extern IntPtr g_object_get_data (IntPtr source, string name);
+
+ [DllImport (GtkInterop.LIBGTK)]
+ static extern IntPtr gtk_icon_set_render_icon_scaled (IntPtr handle, IntPtr style, int direction, int state, int size, IntPtr widget, IntPtr intPtr, ref double scale);
+
+ public static bool SetSourceScale (Gtk.IconSource source, double scale)
+ {
+ if (!supportsHiResIcons)
+ return false;
+
+ try {
+ gtk_icon_source_set_scale (source.Handle, scale);
+ return true;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return false;
+ }
+
+ public static bool SetSourceScaleWildcarded (Gtk.IconSource source, bool setting)
+ {
+ if (!supportsHiResIcons)
+ return false;
+
+ try {
+ gtk_icon_source_set_scale_wildcarded (source.Handle, setting);
+ return true;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return false;
+ }
+
+ public static Gdk.Pixbuf Get2xVariant (Gdk.Pixbuf px)
+ {
+ if (!supportsHiResIcons)
+ return null;
+
+ try {
+ IntPtr res = g_object_get_data (px.Handle, "gdk-pixbuf-2x-variant");
+ if (res != IntPtr.Zero && res != px.Handle)
+ return (Gdk.Pixbuf) GLib.Object.GetObject (res);
+ else
+ return null;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return null;
+ }
+
+ public static void Set2xVariant (Gdk.Pixbuf px, Gdk.Pixbuf variant2x)
+ {
+ }
+
+ public static double GetScaleFactor (Gtk.Widget w)
+ {
+ if (!supportsHiResIcons)
+ return 1;
+
+ try {
+ return gtk_widget_get_scale_factor (w.Handle);
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return 1;
+ }
+
+
+ public static Gdk.Pixbuf RenderIcon (this Gtk.IconSet iconset, Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail, double scale)
+ {
+ if (scale == 1d)
+ return iconset.RenderIcon (style, direction, state, size, widget, detail);
+
+ if (!supportsHiResIcons)
+ return null;
+
+ try {
+ IntPtr intPtr = GLib.Marshaller.StringToPtrGStrdup (detail);
+ IntPtr o = gtk_icon_set_render_icon_scaled (iconset.Handle, (style != null) ? style.Handle : IntPtr.Zero, (int)direction, (int)state, (int)size, (widget != null) ? widget.Handle : IntPtr.Zero, intPtr, ref scale);
+ Gdk.Pixbuf result = (Gdk.Pixbuf) GLib.Object.GetObject (o);
+ GLib.Marshaller.Free (intPtr);
+ return result;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return null;
+ }
}
public struct KeyboardShortcut : IEquatable<KeyboardShortcut>
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/HeaderBox.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/HeaderBox.cs
index ae311c8..8f6ff65 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/HeaderBox.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/HeaderBox.cs
@@ -81,7 +81,7 @@ namespace Xwt.GtkBackend
}
public bool GradientBackround { get; set; }
- public bool DrawBackground { get; set; }
+ public Color? BackgroundColor { get; set; }
protected override void OnAdded (Gtk.Widget widget)
{
@@ -118,17 +118,19 @@ namespace Xwt.GtkBackend
protected override bool OnExposeEvent (Gdk.EventExpose evnt)
{
- Gdk.Rectangle rect;
+ using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
+
+ Gdk.Rectangle rect = Allocation;
- if (DrawBackground) {
- GdkWindow.DrawRectangle (Style.BackgroundGC (Gtk.StateType.Normal), true, Allocation.X, Allocation.Y, Allocation.Width - 1, Allocation.Height - 1);
- }
+ if (BackgroundColor.HasValue) {
+ cr.Rectangle (rect.X, rect.Y, rect.Width, rect.Height);
+ cr.Color = BackgroundColor.Value.ToCairoColor ();
+ cr.Fill ();
+ }
- if (GradientBackround) {
- rect = new Gdk.Rectangle (Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height);
- Color gcol = Util.ToXwtColor (Style.Background (Gtk.StateType.Normal));
+ if (GradientBackround) {
+ Color gcol = Util.ToXwtColor (Style.Background (Gtk.StateType.Normal));
- using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
cr.NewPath ();
cr.MoveTo (rect.X, rect.Y);
cr.RelLineTo (rect.Width, 0);
@@ -136,42 +138,24 @@ namespace Xwt.GtkBackend
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
- Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Bottom);
- Cairo.Color color1 = gcol.ToCairoColor ();
- pat.AddColorStop (0, color1);
- gcol.Light -= 0.1;
- pat.AddColorStop (1, gcol.ToCairoColor ());
- cr.Pattern = pat;
- cr.FillPreserve ();
+ using (var pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Bottom)) {
+ Cairo.Color color1 = gcol.ToCairoColor ();
+ pat.AddColorStop (0, color1);
+ gcol.Light -= 0.1;
+ pat.AddColorStop (1, gcol.ToCairoColor ());
+ cr.Pattern = pat;
+ cr.FillPreserve ();
+ }
}
- }
- bool res = base.OnExposeEvent (evnt);
-
- Gdk.GC borderColor;
- if (color != null) {
- borderColor = new Gdk.GC (GdkWindow);
- borderColor.RgbFgColor = Util.ToGdkColor (color.Value);
+ cr.Color = color.HasValue ? color.Value.ToCairoColor () : Style.Dark (Gtk.StateType.Normal).ToXwtColor ().ToCairoColor ();
+ cr.Rectangle (rect.X, rect.Y, rect.Width, topMargin);
+ cr.Rectangle (rect.X, rect.Y + rect.Height - bottomMargin, rect.Width, bottomMargin);
+ cr.Rectangle (rect.X, rect.Y, leftMargin, rect.Height);
+ cr.Rectangle (rect.X + rect.Width - rightMargin, rect.Y, rightMargin, rect.Height);
+ cr.Fill ();
}
- else
- borderColor = Style.DarkGC (Gtk.StateType.Normal);
-
- rect = Allocation;
- for (int n=0; n<topMargin; n++)
- GdkWindow.DrawLine (borderColor, rect.X, rect.Y + n, rect.Right, rect.Y + n);
-
- for (int n=0; n<bottomMargin; n++)
- GdkWindow.DrawLine (borderColor, rect.X, rect.Bottom - n, rect.Right, rect.Bottom - n);
-
- for (int n=0; n<leftMargin; n++)
- GdkWindow.DrawLine (borderColor, rect.X + n, rect.Y, rect.X + n, rect.Bottom);
-
- for (int n=0; n<rightMargin; n++)
- GdkWindow.DrawLine (borderColor, rect.Right - n, rect.Y, rect.Right - n, rect.Bottom);
-
- if (color != null)
- borderColor.Dispose ();
-
+ bool res = base.OnExposeEvent (evnt);
return res;
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageBuilderBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageBuilderBackend.cs
index b52950a..fb727f1 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageBuilderBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageBuilderBackend.cs
@@ -30,14 +30,21 @@ using Xwt.CairoBackend;
namespace Xwt.GtkBackend
{
- public class ImageBuilderBackend: IImageBuilderBackendHandler
+ public class ImageBuilderBackend: ImageBuilderBackendHandler
{
public ImageBuilderBackend ()
{
}
#region IImageBuilderBackendHandler implementation
- public object CreateImageBuilder (int width, int height, ImageFormat format)
+
+ public override bool DisposeHandleOnUiThread {
+ get {
+ return true;
+ }
+ }
+
+ public override object CreateImageBuilder (int width, int height, ImageFormat format)
{
Cairo.Format cformat;
switch (format) {
@@ -47,17 +54,22 @@ namespace Xwt.GtkBackend
return new Cairo.ImageSurface (cformat, width, height);
}
- public object CreateContext (object backend)
+ public override object CreateContext (object backend)
{
Cairo.Surface sf = (Cairo.Surface) backend;
- CairoContextBackend ctx = new CairoContextBackend ();
+ CairoContextBackend ctx = new CairoContextBackend (1);
ctx.Context = new Cairo.Context (sf);
return ctx;
}
- public object CreateImage (object backend)
+ public override object CreateImage (object backend)
+ {
+ var pix = CreatePixbuf ((Cairo.ImageSurface)backend);
+ return new GtkImage (pix);
+ }
+
+ public static Gdk.Pixbuf CreatePixbuf (Cairo.ImageSurface sf)
{
- Cairo.ImageSurface sf = (Cairo.ImageSurface) backend;
byte[] cdata = sf.Data;
int nbytes = sf.Format == Cairo.Format.ARGB32 ? 4 : 3;
byte[] data = new byte[(cdata.Length / 4) * nbytes];
@@ -106,7 +118,7 @@ namespace Xwt.GtkBackend
return new Gdk.Pixbuf (data, Gdk.Colorspace.Rgb, nbytes == 4, 8, sf.Width, sf.Height, sf.Width * nbytes, null);
}
- public void Dispose (object backend)
+ public override void Dispose (object backend)
{
IDisposable sf = (IDisposable) backend;
sf.Dispose ();
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs
index f69a9c7..2c9bbd1 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs
@@ -26,6 +26,10 @@
using System;
using Xwt.Backends;
+using Xwt.Drawing;
+using System.Collections.Generic;
+using Xwt.CairoBackend;
+using System.Linq;
namespace Xwt.GtkBackend
{
@@ -34,30 +38,57 @@ namespace Xwt.GtkBackend
public override object LoadFromStream (System.IO.Stream stream)
{
using (Gdk.PixbufLoader loader = new Gdk.PixbufLoader (stream))
- return loader.Pixbuf;
+ return new GtkImage (loader.Pixbuf);
}
-
- public override object LoadFromIcon (string id, IconSize size)
+
+ public override void SaveToStream (object backend, System.IO.Stream stream, ImageFileType fileType)
{
- string stockId = Util.ToGtkStock (id);
- var gsize = Util.ToGtkSize (size);
-
- Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (stockId);
- if (iconset != null)
- return iconset.RenderIcon (Gtk.Widget.DefaultStyle, Gtk.TextDirection.Ltr, Gtk.StateType.Normal, gsize, null, null);
-
- if (Gtk.IconTheme.Default.HasIcon (stockId)) {
- int w, h;
- Gtk.Icon.SizeLookup (gsize, out w, out h);
- Gdk.Pixbuf result = Gtk.IconTheme.Default.LoadIcon (stockId, h, (Gtk.IconLookupFlags)0);
- return result;
+ var pix = (GtkImage)backend;
+ var buffer = pix.Frames[0].Pixbuf.SaveToBuffer (GetFileType (fileType));
+ stream.Write (buffer, 0, buffer.Length);
+ }
+
+ public override object CreateCustomDrawn (ImageDrawCallback drawCallback)
+ {
+ return new GtkImage (drawCallback);
+ }
+
+ public override object CreateMultiResolutionImage (IEnumerable<object> images)
+ {
+ var refImg = (GtkImage) images.First ();
+ var f = refImg.Frames [0];
+ var frames = images.Cast<GtkImage> ().Select (img => new GtkImage.ImageFrame (img.Frames[0].Pixbuf, f.Width, f.Height));
+ return new GtkImage (frames);
+ }
+
+ public override object CreateMultiSizeIcon (IEnumerable<object> images)
+ {
+ var frames = images.Cast<GtkImage> ().SelectMany (img => img.Frames);
+ return new GtkImage (frames);
+ }
+
+ string GetFileType (ImageFileType type)
+ {
+ switch (type) {
+ case ImageFileType.Bmp:
+ return "bmp";
+ case ImageFileType.Jpeg:
+ return "jpeg";
+ case ImageFileType.Png:
+ return "png";
+ default:
+ throw new NotSupportedException ();
}
- return null;
+ }
+
+ public override Image GetStockIcon (string id)
+ {
+ return ApplicationContext.Toolkit.WrapImage (Util.ToGtkStock (id));
}
- public override void SetPixel (object handle, int x, int y, Xwt.Drawing.Color color)
+ public override void SetBitmapPixel (object handle, int x, int y, Xwt.Drawing.Color color)
{
- var pix = (Gdk.Pixbuf)handle;
+ var pix = ((GtkImage)handle).Frames[0].Pixbuf;
unsafe {
byte* p = (byte*) pix.Pixels;
@@ -69,9 +100,9 @@ namespace Xwt.GtkBackend
}
}
- public override Xwt.Drawing.Color GetPixel (object handle, int x, int y)
+ public override Xwt.Drawing.Color GetBitmapPixel (object handle, int x, int y)
{
- var pix = (Gdk.Pixbuf)handle;
+ var pix = ((GtkImage)handle).Frames[0].Pixbuf;
unsafe {
byte* p = (byte*) pix.Pixels;
@@ -82,52 +113,344 @@ namespace Xwt.GtkBackend
public override void Dispose (object backend)
{
- ((Gdk.Pixbuf)backend).Dispose ();
+ ((GtkImage)backend).Dispose ();
}
-
- public override Size GetSize (object handle)
+
+ public override bool HasMultipleSizes (object handle)
{
- var pix = (Gdk.Pixbuf)handle;
- return new Size (pix.Width, pix.Height);
+ return ((GtkImage)handle).HasMultipleSizes;
}
-
- public override object Resize (object handle, double width, double height)
+
+ public override Size GetSize (object handle)
{
- var pix = (Gdk.Pixbuf)handle;
- return pix.ScaleSimple ((int)width, (int)height, Gdk.InterpType.Bilinear);
+ var pix = handle as GtkImage;
+ return pix.DefaultSize;
}
- public override object Copy (object handle)
+ public override object CopyBitmap (object handle)
{
- var pix = (Gdk.Pixbuf)handle;
- return pix.Copy ();
+ var pix = ((GtkImage)handle).Frames[0].Pixbuf;
+ return new GtkImage (pix.Copy ());
}
- public override void CopyArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY)
+ public override void CopyBitmapArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY)
{
- var pixSrc = (Gdk.Pixbuf)srcHandle;
- var pixDst = (Gdk.Pixbuf)destHandle;
+ var pixSrc = ((GtkImage)srcHandle).Frames[0].Pixbuf;
+ var pixDst = ((GtkImage)destHandle).Frames[0].Pixbuf;
pixSrc.CopyArea (srcX, srcY, width, height, pixDst, destX, destY);
}
- public override object Crop (object handle, int srcX, int srcY, int width, int height)
+ public override object CropBitmap (object handle, int srcX, int srcY, int width, int height)
{
- var pix = (Gdk.Pixbuf)handle;
+ var pix = ((GtkImage)handle).Frames[0].Pixbuf;
Gdk.Pixbuf res = new Gdk.Pixbuf (pix.Colorspace, pix.HasAlpha, pix.BitsPerSample, width, height);
res.Fill (0);
pix.CopyArea (srcX, srcY, width, height, res, 0, 0);
- return res;
+ return new GtkImage (res);
}
- public override object ChangeOpacity (object backend, double opacity)
+ public override bool IsBitmap (object handle)
{
- Gdk.Pixbuf image = (Gdk.Pixbuf) backend;
- Gdk.Pixbuf result = image.Copy ();
- result.Fill (0);
- result = result.AddAlpha (true, 0, 0, 0);
- image.Composite (result, 0, 0, image.Width, image.Height, 0, 0, 1, 1, Gdk.InterpType.Bilinear, (int)(255 * opacity));
+ var img = (GtkImage) handle;
+ return !img.HasMultipleSizes;
+ }
+
+ public override object ConvertToBitmap (object handle, int pixelWidth, int pixelHeight, ImageFormat format)
+ {
+ var img = (GtkImage) handle;
+ return new GtkImage (img.GetBestFrame (ApplicationContext, 1, pixelWidth, pixelHeight, true));
+ }
+
+ internal static Gdk.Pixbuf CreateBitmap (string stockId, double width, double height, double scaleFactor)
+ {
+ Gdk.Pixbuf result = null;
+
+ Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (stockId);
+ if (iconset != null) {
+ // Find the size that better fits the requested size
+ Gtk.IconSize gsize = Util.GetBestSizeFit (width);
+ result = iconset.RenderIcon (Gtk.Widget.DefaultStyle, Gtk.TextDirection.Ltr, Gtk.StateType.Normal, gsize, null, null, scaleFactor);
+ if (result == null || result.Width < width * scaleFactor) {
+ var gsize2x = Util.GetBestSizeFit (width * scaleFactor, iconset.Sizes);
+ if (gsize2x != Gtk.IconSize.Invalid && gsize2x != gsize) {
+ if (result != null)
+ result.Dispose ();
+ result = iconset.RenderIcon (Gtk.Widget.DefaultStyle, Gtk.TextDirection.Ltr, Gtk.StateType.Normal, gsize2x, null, null);
+ }
+ }
+ }
+
+ if (result == null && Gtk.IconTheme.Default.HasIcon (stockId))
+ result = Gtk.IconTheme.Default.LoadIcon (stockId, (int)width, (Gtk.IconLookupFlags)0);
+
return result;
}
}
+
+ public class GtkImage: IDisposable
+ {
+ public class ImageFrame {
+ public Gdk.Pixbuf Pixbuf { get; private set; }
+ public int Width { get; private set; }
+ public int Height { get; private set; }
+ public double Scale { get; set; }
+ public ImageFrame (Gdk.Pixbuf pix) {
+ Pixbuf = pix;
+ Width = pix.Width;
+ Height = pix.Height;
+ Scale = 1;
+ }
+ public ImageFrame (Gdk.Pixbuf pix, int width, int height) {
+ Pixbuf = pix;
+ Width = width;
+ Height = height;
+ Scale = (double)pix.Width / (double) width;
+ }
+ public void Dispose () {
+ Pixbuf.Dispose ();
+ }
+ }
+
+ ImageFrame[] frames;
+ ImageDrawCallback drawCallback;
+ string stockId;
+
+ public ImageFrame[] Frames {
+ get { return frames; }
+ }
+
+ public GtkImage (Gdk.Pixbuf img)
+ {
+ this.frames = new ImageFrame [] { new ImageFrame (img) };
+ }
+
+ public GtkImage (string stockId)
+ {
+ this.stockId = stockId;
+ }
+
+ public GtkImage (IEnumerable<Gdk.Pixbuf> frames)
+ {
+ this.frames = frames.Select (p => new ImageFrame (p)).ToArray ();
+ }
+
+ public GtkImage (IEnumerable<ImageFrame> frames)
+ {
+ this.frames = frames.ToArray ();
+ }
+
+ public GtkImage (ImageDrawCallback drawCallback)
+ {
+ this.drawCallback = drawCallback;
+ }
+
+ public void Dispose ()
+ {
+ if (frames != null) {
+ foreach (var f in frames)
+ f.Dispose ();
+ }
+ }
+
+ public Size DefaultSize {
+ get {
+ if (frames != null)
+ return new Size (frames[0].Pixbuf.Width, frames[0].Pixbuf.Height);
+ else
+ return Size.Zero;
+ }
+ }
+
+ public bool HasMultipleSizes {
+ get { return frames != null && frames.Length > 1 || drawCallback != null || stockId != null; }
+ }
+
+ Gdk.Pixbuf FindFrame (int width, int height, double scaleFactor)
+ {
+ if (frames == null)
+ return null;
+ if (frames.Length == 1)
+ return frames [0].Pixbuf;
+
+ Gdk.Pixbuf best = null;
+ int bestSizeMatch = 0;
+ double bestResolutionMatch = 0;
+
+ foreach (var f in frames) {
+ int sizeMatch;
+ if (f.Width == width && f.Height == height) {
+ if (f.Scale == scaleFactor)
+ return f.Pixbuf; // Exact match
+ sizeMatch = 2; // Exact size
+ }
+ else if (f.Width >= width && f.Height >= height)
+ sizeMatch = 1; // Bigger size
+ else
+ sizeMatch = 0; // Smaller size
+
+ var resolutionMatch = ((double)f.Pixbuf.Width * (double)f.Pixbuf.Height) / ((double)width * (double)height * scaleFactor);
+
+ if ( best == null ||
+ (bestResolutionMatch < 1 && resolutionMatch > bestResolutionMatch) ||
+ (bestResolutionMatch >= 1 && resolutionMatch >= 1 && resolutionMatch <= bestResolutionMatch && (sizeMatch >= bestSizeMatch)))
+ {
+ best = f.Pixbuf;
+ bestSizeMatch = sizeMatch;
+ bestResolutionMatch = resolutionMatch;
+ }
+ }
+
+ return best;
+ }
+
+ public Gdk.Pixbuf ToPixbuf (ApplicationContext actx, double width, double height)
+ {
+ return GetBestFrame (actx, 1, width, height, true);
+ }
+
+ public Gdk.Pixbuf ToPixbuf (ApplicationContext actx, Gtk.Widget w)
+ {
+ return GetBestFrame (actx, Util.GetScaleFactor (w), DefaultSize.Width, DefaultSize.Height, true);
+ }
+
+ public Gdk.Pixbuf GetBestFrame (ApplicationContext actx, Gtk.Widget w, double width, double height, bool forceExactSize)
+ {
+ return GetBestFrame (actx, Util.GetScaleFactor (w), width, height, forceExactSize);
+ }
+
+ public Gdk.Pixbuf GetBestFrame (ApplicationContext actx, double scaleFactor, double width, double height, bool forceExactSize)
+ {
+ var f = FindFrame ((int)width, (int)height, scaleFactor);
+ if (f == null || (forceExactSize && (f.Width != (int)width || f.Height != (int)height)))
+ return RenderFrame (actx, scaleFactor, width, height);
+ else
+ return f;
+ }
+
+ Gdk.Pixbuf RenderFrame (ApplicationContext actx, double scaleFactor, double width, double height)
+ {
+ using (var sf = new Cairo.ImageSurface (Cairo.Format.ARGB32, (int)(width * scaleFactor), (int)(height * scaleFactor)))
+ using (var ctx = new Cairo.Context (sf)) {
+ ImageDescription idesc = new ImageDescription () {
+ Alpha = 1,
+ Size = new Size (width * scaleFactor, height * scaleFactor)
+ };
+ Draw (actx, ctx, 1, 0, 0, idesc);
+ var f = new ImageFrame (ImageBuilderBackend.CreatePixbuf (sf), (int)width, (int)height);
+ AddFrame (f);
+ return f.Pixbuf;
+ }
+ }
+
+ void AddFrame (ImageFrame frame)
+ {
+ if (frames == null)
+ frames = new ImageFrame[] { frame };
+ else {
+ Array.Resize (ref frames, frames.Length + 1);
+ frames [frames.Length - 1] = frame;
+ }
+ }
+
+ public void Draw (ApplicationContext actx, Cairo.Context ctx, double scaleFactor, double x, double y, ImageDescription idesc)
+ {
+ if (stockId != null) {
+ ImageFrame frame = null;
+ if (frames != null)
+ frame = frames.FirstOrDefault (f => f.Width == (int) idesc.Size.Width && f.Height == (int) idesc.Size.Height && f.Scale == scaleFactor);
+ if (frame == null) {
+ frame = new ImageFrame (ImageHandler.CreateBitmap (stockId, idesc.Size.Width, idesc.Size.Height, scaleFactor), (int)idesc.Size.Width, (int)idesc.Size.Height);
+ frame.Scale = scaleFactor;
+ AddFrame (frame);
+ }
+ DrawPixbuf (ctx, frame.Pixbuf, x, y, idesc);
+ }
+ else if (drawCallback != null) {
+ CairoContextBackend c = new CairoContextBackend (scaleFactor) {
+ Context = ctx
+ };
+ if (actx != null) {
+ actx.InvokeUserCode (delegate {
+ drawCallback (c, new Rectangle (x, y, idesc.Size.Width, idesc.Size.Height));
+ });
+ } else
+ drawCallback (c, new Rectangle (x, y, idesc.Size.Width, idesc.Size.Height));
+ }
+ else {
+ DrawPixbuf (ctx, GetBestFrame (actx, scaleFactor, idesc.Size.Width, idesc.Size.Height, false), x, y, idesc);
+ }
+ }
+
+ void DrawPixbuf (Cairo.Context ctx, Gdk.Pixbuf img, double x, double y, ImageDescription idesc)
+ {
+ ctx.Save ();
+ ctx.Translate (x, y);
+ ctx.Scale (idesc.Size.Width / (double)img.Width, idesc.Size.Height / (double)img.Height);
+ Gdk.CairoHelper.SetSourcePixbuf (ctx, img, 0, 0);
+ if (idesc.Alpha == 1)
+ ctx.Paint ();
+ else
+ ctx.PaintWithAlpha (idesc.Alpha);
+ ctx.Restore ();
+ }
+ }
+
+ public class ImageBox: Gtk.DrawingArea
+ {
+ ImageDescription image;
+ ApplicationContext actx;
+ float yalign = 0.5f, xalign = 0.5f;
+
+ public ImageBox (ApplicationContext actx, ImageDescription img): this (actx)
+ {
+ Image = img;
+ }
+
+ public ImageBox (ApplicationContext actx)
+ {
+ WidgetFlags |= Gtk.WidgetFlags.AppPaintable;
+ WidgetFlags |= Gtk.WidgetFlags.NoWindow;
+ this.actx = actx;
+ }
+
+ public ImageDescription Image {
+ get { return image; }
+ set { image = value; QueueResize (); }
+ }
+
+ public float Yalign {
+ get { return yalign; }
+ set { yalign = value; QueueDraw (); }
+ }
+
+ public float Xalign {
+ get { return xalign; }
+ set { xalign = value; QueueDraw (); }
+ }
+
+ protected override void OnSizeRequested (ref Gtk.Requisition requisition)
+ {
+ base.OnSizeRequested (ref requisition);
+ if (!image.IsNull) {
+ requisition.Width = (int) image.Size.Width;
+ requisition.Height = (int) image.Size.Height;
+ }
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ if (image.IsNull)
+ return true;
+
+ int x = Allocation.X + (int)(((float)Allocation.Width - (float)image.Size.Width) * xalign);
+ int y = Allocation.Y + (int)(((float)Allocation.Height - (float)image.Size.Height) * yalign);
+ if (x < 0) x = 0;
+ if (y < 0) y = 0;
+ using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
+ ((GtkImage)image.Backend).Draw (actx, ctx, Util.GetScaleFactor (this), x, y, image);
+ return true;
+ }
+ }
+ }
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImagePatternBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImagePatternBackendHandler.cs
index c85a863..e77b857 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImagePatternBackendHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImagePatternBackendHandler.cs
@@ -28,23 +28,65 @@ using Xwt.Backends;
namespace Xwt.GtkBackend
{
- public class ImagePatternBackendHandler: IImagePatternBackendHandler
+ public class GtkImagePatternBackendHandler: ImagePatternBackendHandler
{
+ public override bool DisposeHandleOnUiThread {
+ get {
+ return true;
+ }
+ }
#region IImagePatternBackendHandler implementation
- public object Create (object img)
+ public override object Create (ImageDescription img)
+ {
+ return new ImagePatternBackend () {
+ Image = img
+ };
+ }
+
+ public override void Dispose (object img)
{
- Gdk.Pixbuf pb = (Gdk.Pixbuf)img;
- var imgs = new Cairo.ImageSurface (Cairo.Format.ARGB32, pb.Width, pb.Height);
- var ic = new Cairo.Context (imgs);
- Gdk.CairoHelper.SetSourcePixbuf (ic, pb, 0, 0);
- ic.Paint ();
- imgs.Flush ();
- ((IDisposable)ic).Dispose ();
- var p = new Cairo.SurfacePattern (imgs);
- p.Extend = Cairo.Extend.Repeat;
- return p;
+ var pb = (ImagePatternBackend)img;
+ pb.Dispose ();
}
#endregion
}
+
+ class ImagePatternBackend
+ {
+ public ImageDescription Image;
+
+ Cairo.SurfacePattern pattern;
+ double currentScaleFactor;
+
+ public Cairo.Pattern GetPattern (ApplicationContext actx, double scaleFactor)
+ {
+ if (pattern == null || currentScaleFactor != scaleFactor) {
+ if (pattern != null)
+ pattern.Dispose ();
+ Gdk.Pixbuf pb = ((GtkImage)Image.Backend).GetBestFrame (actx, scaleFactor, Image.Size.Width, Image.Size.Height, false);
+ using (var imgs = new Cairo.ImageSurface (Cairo.Format.ARGB32, (int)(Image.Size.Width * scaleFactor), (int)(Image.Size.Height * scaleFactor))) {
+ var ic = new Cairo.Context (imgs);
+ ic.Scale ((double)imgs.Width / (double)pb.Width, (double)imgs.Height / (double)pb.Height);
+ Gdk.CairoHelper.SetSourcePixbuf (ic, pb, 0, 0);
+ ic.Paint ();
+ imgs.Flush ();
+ ((IDisposable)ic).Dispose ();
+ pattern = new Cairo.SurfacePattern (imgs);
+ }
+ pattern.Extend = Cairo.Extend.Repeat;
+ var cm = new Cairo.Matrix ();
+ cm.Scale (scaleFactor, scaleFactor);
+ pattern.Matrix = cm;
+ currentScaleFactor = scaleFactor;
+ }
+ return pattern;
+ }
+
+ public void Dispose ()
+ {
+ if (pattern != null)
+ pattern.Dispose ();
+ }
+ }
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageViewBackend.cs
index 544c34f..c59a7e7 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ImageViewBackend.cs
@@ -26,31 +26,26 @@
using System;
using Xwt.Backends;
+using Xwt.Drawing;
+
namespace Xwt.GtkBackend
{
public class ImageViewBackend: WidgetBackend, IImageViewBackend
{
public override void Initialize ()
{
- Widget = new Gtk.Image ();
+ Widget = new ImageBox (ApplicationContext);
Widget.Show ();
}
- protected new Gtk.Image Widget {
- get { return (Gtk.Image)base.Widget; }
+ protected new ImageBox Widget {
+ get { return (ImageBox)base.Widget; }
set { base.Widget = value; }
}
- public void SetImage (object nativeImage)
+ public void SetImage (ImageDescription image)
{
- if (nativeImage == null)
- throw new ArgumentNullException ("nativeImage");
-
- Gdk.Pixbuf pbuf = nativeImage as Gdk.Pixbuf;
- if (pbuf == null)
- throw new ArgumentException ("nativeImage is not of the expected type", "nativeImage");
-
- Widget.Pixbuf = pbuf;
+ Widget.Image = image;
}
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LabelBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LabelBackend.cs
old mode 100755
new mode 100644
index 35c08d4..6681c53
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LabelBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LabelBackend.cs
@@ -28,6 +28,7 @@ using System;
using Xwt.Backends;
using Xwt.Drawing;
using Xwt.CairoBackend;
+using System.Runtime.InteropServices;
namespace Xwt.GtkBackend
@@ -36,7 +37,7 @@ namespace Xwt.GtkBackend
{
Color? bgColor, textColor;
int wrapHeight, wrapWidth;
-
+
public LabelBackend ()
{
Widget = new Gtk.Label ();
@@ -103,6 +104,17 @@ namespace Xwt.GtkBackend
set { Label.Text = value; }
}
+ public void SetFormattedText (FormattedText text)
+ {
+ Label.Text = text.Text;
+ var list = new FastPangoAttrList ();
+ TextIndexer indexer = new TextIndexer (text.Text);
+ list.AddAttributes (indexer, text.Attributes);
+ gtk_label_set_attributes (Label.Handle, list.Handle);
+ }
+
+ [DllImport (GtkInterop.LIBGTK, CallingConvention=CallingConvention.Cdecl)]
+ static extern void gtk_label_set_attributes (IntPtr label, IntPtr attrList);
public Xwt.Drawing.Color TextColor {
get {
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs
index 66d87bd..b0b3e2f 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs
@@ -28,7 +28,7 @@ using System;
using System.Security;
using Xwt;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -103,7 +103,7 @@ namespace Xwt.GtkBackend
{
if (ClickEnabled) {
var uri = !string.IsNullOrEmpty (link)? new Uri (link, UriKind.RelativeOrAbsolute) : null;
- Xwt.Engine.Toolkit.Invoke (() => {
+ ApplicationContext.InvokeUserCode (() => {
EventSink.OnNavigateToUrl (uri);
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListBoxBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListBoxBackend.cs
index 461ef31..68d346c 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListBoxBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListBoxBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -58,14 +58,14 @@ namespace Xwt.GtkBackend
{
theColumn.Clear ();
foreach (var v in views)
- CellUtil.CreateCellRenderer (this, theColumn, v);
+ CellUtil.CreateCellRenderer (ApplicationContext, this, theColumn, v, Widget.Model);
}
public override void EnableEvent (object eventId)
{
base.EnableEvent (eventId);
- if (eventId is ListBoxEvent) {
- if (((ListBoxEvent)eventId) == ListBoxEvent.SelectionChanged)
+ if (eventId is TableViewEvent) {
+ if (((TableViewEvent)eventId) == TableViewEvent.SelectionChanged)
Widget.Selection.Changed += HandleWidgetSelectionChanged;
}
}
@@ -73,15 +73,15 @@ namespace Xwt.GtkBackend
public override void DisableEvent (object eventId)
{
base.DisableEvent (eventId);
- if (eventId is ListBoxEvent) {
- if (((ListBoxEvent)eventId) == ListBoxEvent.SelectionChanged)
+ if (eventId is TableViewEvent) {
+ if (((TableViewEvent)eventId) == TableViewEvent.SelectionChanged)
Widget.Selection.Changed -= HandleWidgetSelectionChanged;
}
}
void HandleWidgetSelectionChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListStoreBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListStoreBackend.cs
index 2b0abce..47a6943 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListStoreBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListStoreBackend.cs
@@ -37,7 +37,20 @@ namespace Xwt.GtkBackend
public override Gtk.TreeModel InitializeModel (Type[] columnTypes)
{
this.columnTypes = columnTypes;
- return new Gtk.ListStore (columnTypes);
+ var store = new Gtk.ListStore (columnTypes);
+ store.RowInserted += (o, args) => {
+ if (RowInserted != null)
+ RowInserted (this, new ListRowEventArgs (args.Path.Indices[0]));
+ };
+ store.RowDeleted += (o, args) => {
+ if (RowDeleted != null)
+ RowDeleted (this, new ListRowEventArgs (args.Path.Indices[0]));
+ };
+ store.RowChanged += (o, args) => {
+ if (RowChanged != null)
+ RowChanged (this, new ListRowEventArgs (args.Path.Indices[0]));
+ };
+ return store;
}
public event EventHandler<ListRowEventArgs> RowInserted;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListViewBackend.cs
index 1cda44f..0f674f8 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ListViewBackend.cs
@@ -32,6 +32,35 @@ namespace Xwt.GtkBackend
public class ListViewBackend: TableViewBackend, IListViewBackend
{
bool showBorder;
+
+ protected new IListViewEventSink EventSink {
+ get { return (IListViewEventSink)base.EventSink; }
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is ListViewEvent) {
+ if (((ListViewEvent)eventId) == ListViewEvent.RowActivated)
+ Widget.RowActivated += HandleRowActivated;
+ }
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is ListViewEvent) {
+ if (((ListViewEvent)eventId) == ListViewEvent.RowActivated)
+ Widget.RowActivated -= HandleRowActivated;
+ }
+ }
+
+ void HandleRowActivated (object o, Gtk.RowActivatedArgs args)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnRowActivated (args.Path.Indices[0]);
+ });
+ }
public void SetSource (IListDataSource source, IBackend sourceBackend)
{
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
index be2d7de..cf9e282 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuBackend.cs
@@ -28,13 +28,14 @@ using System;
using Xwt.Backends;
using System.Collections.Generic;
+
namespace Xwt.GtkBackend
{
public class MenuBackend: IMenuBackend
{
Gtk.MenuShell menu;
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
menu = new Gtk.Menu ();
menu.Visible = true;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuButtonBackend.cs
index 88540a9..23b846f 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuButtonBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuButtonBackend.cs
@@ -26,7 +26,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -110,7 +110,7 @@ namespace Xwt.GtkBackend
Gtk.Menu CreateMenu ()
{
MenuBackend m = null;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
m = (MenuBackend) EventSink.OnCreateMenu ();
});
return m != null ? m.Menu : null;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
index 66b0c73..88d323c 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/MenuItemBackend.cs
@@ -28,7 +28,7 @@ using System;
using Xwt.Backends;
using Xwt.Drawing;
using System.Collections.Generic;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -39,6 +39,7 @@ namespace Xwt.GtkBackend
Gtk.Label label;
List<MenuItemEvent> enabledEvents;
bool changingCheck;
+ ApplicationContext context;
public MenuItemBackend ()
: this (new Gtk.ImageMenuItem (""))
@@ -71,15 +72,16 @@ namespace Xwt.GtkBackend
}
}
- public void SetImage (object imageBackend)
+ public void SetImage (ImageDescription image)
{
Gtk.ImageMenuItem it = item as Gtk.ImageMenuItem;
if (it == null)
return;
- if (imageBackend != null) {
- var img = new Gtk.Image ((Gdk.Pixbuf) imageBackend);
+ if (!image.IsNull) {
+ var img = new ImageBox (context, image);
img.ShowAll ();
it.Image = img;
+ GtkWorkarounds.ForceImageOnMenuItem (it);
}
else
it.Image = null;
@@ -87,7 +89,7 @@ namespace Xwt.GtkBackend
public string Label {
get {
- return label.Text;
+ return label != null ? label.Text : "";
}
set {
label.Text = value;
@@ -172,8 +174,9 @@ namespace Xwt.GtkBackend
}
}*/
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
+ this.context = context;
}
public void EnableEvent (object eventId)
@@ -199,7 +202,7 @@ namespace Xwt.GtkBackend
void HandleItemActivated (object sender, EventArgs e)
{
if (!changingCheck) {
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnClicked ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/NotebookBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/NotebookBackend.cs
index 04da396..fb43f95 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/NotebookBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/NotebookBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -72,17 +72,17 @@ namespace Xwt.GtkBackend
public void Add (IWidgetBackend widget, NotebookTab tab)
{
- Widget.AppendPage (GetWidget (widget), CreateLabel (tab));
+ Widget.AppendPage (GetWidgetWithPlacement (widget), CreateLabel (tab));
}
public void Remove (IWidgetBackend widget)
{
- Widget.Remove (GetWidget (widget));
+ Widget.Remove (GetWidgetWithPlacement (widget));
}
public void UpdateLabel (NotebookTab tab, string hint)
{
- IWidgetBackend widget = (IWidgetBackend) WidgetRegistry.GetBackend (tab.Child);
+ IWidgetBackend widget = (IWidgetBackend) Toolkit.GetBackend (tab.Child);
Widget.SetTabLabel (GetWidget (widget), CreateLabel (tab));
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PanedBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PanedBackend.cs
index bf03ec4..7cacb2c 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PanedBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PanedBackend.cs
@@ -54,18 +54,24 @@ namespace Xwt.GtkBackend
public void SetPanel (int panel, IWidgetBackend widget, bool resize, bool shrink)
{
- if (panel == 1)
- Widget.Pack1 (((WidgetBackend)widget).RootWidget, resize, shrink);
- else
- Widget.Pack2 (((WidgetBackend)widget).RootWidget, resize, shrink);
+ if (panel == 1) {
+ RemoveChildPlacement (Widget.Child1);
+ Widget.Pack1 (GetWidgetWithPlacement (widget), resize, shrink);
+ } else {
+ RemoveChildPlacement (Widget.Child2);
+ Widget.Pack2 (GetWidgetWithPlacement (widget), resize, shrink);
+ }
}
public void RemovePanel (int panel)
{
- if (panel == 1)
+ if (panel == 1) {
+ RemoveChildPlacement (Widget.Child1);
Widget.Remove (Widget.Child1);
- else
+ } else {
+ RemoveChildPlacement (Widget.Child2);
Widget.Remove (Widget.Child2);
+ }
}
public void UpdatePanel (int panel, bool resize, bool shrink)
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PangoUtil.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PangoUtil.cs
deleted file mode 100644
index b08c992..0000000
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PangoUtil.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-//
-// PangoUtils.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// 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 Gtk;
-using System.Runtime.InteropServices;
-
-namespace Xwt.GtkBackend
-{
- public static class PangoUtil
- {
- internal const string LIBGTK = "libgtk-win32-2.0-0.dll";
- internal const string LIBATK = "libatk-1.0-0.dll";
- internal const string LIBGLIB = "libglib-2.0-0.dll";
- internal const string LIBGDK = "libgdk-win32-2.0-0.dll";
- internal const string LIBGOBJECT = "libgobject-2.0-0.dll";
- internal const string LIBPANGO = "libpango-1.0-0.dll";
- internal const string LIBPANGOCAIRO = "libpangocairo-1.0-0.dll";
-/*
- /// <summary>
- /// This doesn't leak Pango layouts, unlike some other ways to create them in GTK# <= 2.12.11
- /// </summary>
- public static Pango.Layout CreateLayout (Widget widget)
- {
- var ptr = gtk_widget_create_pango_layout (widget.Handle, IntPtr.Zero);
- return ptr == IntPtr.Zero? null : new Pango.Layout (ptr);
- }
-
- public static Pango.Layout CreateLayout (Widget widget, string text)
- {
- IntPtr textPtr = text == null? IntPtr.Zero : GLib.Marshaller.StringToPtrGStrdup (text);
-
- var ptr = gtk_widget_create_pango_layout (widget.Handle, textPtr);
-
- if (textPtr != IntPtr.Zero)
- GLib.Marshaller.Free (textPtr);
-
- return ptr == IntPtr.Zero? null : new Pango.Layout (ptr);
- }
-
- public static Pango.Layout CreateLayout (PrintContext context)
- {
- var ptr = gtk_print_context_create_pango_layout (context.Handle);
- return ptr == IntPtr.Zero? null : new Pango.Layout (ptr);
- }
-
- [DllImport (LIBGTK, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr gtk_widget_create_pango_layout (IntPtr widget, IntPtr text);
-
- [DllImport (LIBGTK, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr gtk_print_context_create_pango_layout (IntPtr context);
- }
-
- /// <summary>
- /// This creates a Pango list and applies attributes to it with *much* less overhead than the GTK# version.
- /// </summary>
- class FastPangoAttrList : IDisposable
- {
- IntPtr list;
-
- public FastPangoAttrList ()
- {
- list = pango_attr_list_new ();
- }
-
- public void AddStyleAttribute (Pango.Style style, uint start, uint end)
- {
- Add (pango_attr_style_new (style), start, end);
- }
-
- public void AddWeightAttribute (Pango.Weight weight, uint start, uint end)
- {
- Add (pango_attr_weight_new (weight), start, end);
- }
-
- public void AddForegroundAttribute (Gdk.Color color, uint start, uint end)
- {
- Add (pango_attr_foreground_new (color.Red, color.Green, color.Blue), start, end);
- }
-
- public void AddBackgroundAttribute (Gdk.Color color, uint start, uint end)
- {
- Add (pango_attr_background_new (color.Red, color.Green, color.Blue), start, end);
- }
-
- public void AddUnderlineAttribute (Pango.Underline underline, uint start, uint end)
- {
- Add (pango_attr_underline_new (underline), start, end);
- }
-
- void Add (IntPtr attribute, uint start, uint end)
- {
- unsafe {
- PangoAttribute *attPtr = (PangoAttribute *) attribute;
- attPtr->start_index = start;
- attPtr->end_index = end;
- }
- pango_attr_list_insert (list, attribute);
- }
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_style_new (Pango.Style style);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_weight_new (Pango.Weight weight);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_foreground_new (ushort red, ushort green, ushort blue);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_background_new (ushort red, ushort green, ushort blue);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_underline_new (Pango.Underline underline);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern IntPtr pango_attr_list_new ();
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern void pango_attr_list_unref (IntPtr list);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern void pango_attr_list_insert (IntPtr list, IntPtr attr);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern void pango_layout_set_attributes (IntPtr layout, IntPtr attrList);
-
- [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
- static extern void pango_attr_list_splice (IntPtr attr_list, IntPtr other, Int32 pos, Int32 len);
-
- public void Splice (Pango.AttrList attrs, int pos, int len)
- {
- pango_attr_list_splice (list, attrs.Handle, pos, len);
- }
-
- public void AssignTo (Pango.Layout layout)
- {
- pango_layout_set_attributes (layout.Handle, list);
- }
-
- [StructLayout (LayoutKind.Sequential)]
- struct PangoAttribute
- {
- public IntPtr klass;
- public uint start_index;
- public uint end_index;
- }
-
- public void Dispose ()
- {
- if (list != IntPtr.Zero) {
- GC.SuppressFinalize (this);
- Destroy ();
- }
- }
-
- //NOTE: the list destroys all its attributes when the ref count reaches zero
- void Destroy ()
- {
- pango_attr_list_unref (list);
- list = IntPtr.Zero;
- }
-
- ~FastPangoAttrList ()
- {
- GLib.Idle.Add (delegate {
- Destroy ();
- return false;
- });
- }*/
- }
-}
\ No newline at end of file
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PopoverBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PopoverBackend.cs
index 1e95253..71ba22c 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PopoverBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/PopoverBackend.cs
@@ -31,6 +31,7 @@ using Xwt.Backends;
using Gtk;
using Cairo;
+
namespace Xwt.GtkBackend
{
public class PopoverBackend : IPopoverBackend
@@ -199,7 +200,7 @@ namespace Xwt.GtkBackend
this.sink = sink;
}
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
this.frontend = (Popover) frontend;
}
@@ -215,17 +216,21 @@ namespace Xwt.GtkBackend
public void Show (Xwt.Popover.Position orientation, Xwt.Widget reference, Xwt.Rectangle positionRect, Widget child)
{
var parent = reference.ParentWindow;
- popover = new PopoverWindow ((Gtk.Widget)((WidgetBackend)Xwt.Engine.WidgetRegistry.GetBackend (child)).NativeWidget, orientation);
+ popover = new PopoverWindow ((Gtk.Widget)((WidgetBackend)Toolkit.GetBackend (child)).NativeWidget, orientation);
popover.SetPadding (frontend.Padding);
- popover.TransientFor = ((WindowFrameBackend)Xwt.Engine.WidgetRegistry.GetBackend (parent)).Window;
+ popover.TransientFor = ((WindowFrameBackend)Toolkit.GetBackend (parent)).Window;
popover.DestroyWithParent = true;
popover.Hidden += (o, args) => {
popover.ReleaseInnerWidget ();
sink.OnClosed ();
popover.Destroy ();
};
-
- var position = new Point (reference.ScreenBounds.Center.X, popover.ArrowPosition == Popover.Position.Top ? reference.ScreenBounds.Bottom : reference.ScreenBounds.Top);
+
+ var screenBounds = reference.ScreenBounds;
+ if (positionRect == Rectangle.Zero)
+ positionRect = new Rectangle (Point.Zero, screenBounds.Size);
+ positionRect = positionRect.Offset (screenBounds.Location);
+ var position = new Point (positionRect.Center.X, popover.ArrowPosition == Popover.Position.Top ? positionRect.Bottom : positionRect.Top);
popover.ShowAll ();
popover.GrabFocus ();
int w, h;
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ProgressBarBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ProgressBarBackend.cs
index 626984b..e4c1da7 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ProgressBarBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ProgressBarBackend.cs
@@ -27,7 +27,7 @@
using System;
using System.Timers;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RadioButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RadioButtonBackend.cs
new file mode 100644
index 0000000..883cde0
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RadioButtonBackend.cs
@@ -0,0 +1,158 @@
+//
+// RadioButtonBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class RadioButtonBackend: WidgetBackend, IRadioButtonBackend
+ {
+ RadioGroup radioGroup;
+
+ public RadioButtonBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ Widget = new Gtk.RadioButton ("");
+ Widget.Show ();
+ }
+
+ protected new Gtk.RadioButton Widget {
+ get { return (Gtk.RadioButton)base.Widget; }
+ set { base.Widget = value; }
+ }
+
+ protected new IRadioButtonEventSink EventSink {
+ get { return (IRadioButtonEventSink)base.EventSink; }
+ }
+
+
+ public override object Font {
+ get {
+ return base.Font;
+ }
+ set {
+ var fd = (Pango.FontDescription) value;
+ foreach (var c in Widget.Children)
+ c.ModifyFont (fd);
+ }
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is RadioButtonEvent) {
+ switch ((RadioButtonEvent)eventId) {
+ case RadioButtonEvent.ActiveChanged: Widget.Toggled += HandleToggled; break;
+ case RadioButtonEvent.Clicked: Widget.Clicked += HandleClicked;; break;
+ }
+ }
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ if (eventId is RadioButtonEvent) {
+ switch ((RadioButtonEvent)eventId) {
+ case RadioButtonEvent.ActiveChanged: Widget.Toggled -= HandleToggled; break;
+ case RadioButtonEvent.Clicked: Widget.Clicked -= HandleClicked;; break;
+ }
+ }
+ }
+
+ void HandleClicked (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnClicked ();
+ });
+ }
+
+ void HandleToggled (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnToggled ();
+ });
+ }
+
+ #region IRadioButtonBackend implementation
+
+
+ public void SetContent (IWidgetBackend widget)
+ {
+ var w = (WidgetBackend)widget;
+ if (Widget.Children.Length > 0)
+ Widget.Remove (Widget.Children [0]);
+
+ if (w != null)
+ Widget.Add (w.Widget);
+ }
+
+ public void SetContent (string label)
+ {
+ Widget.Label = label;
+ }
+
+ class RadioGroup
+ {
+ public Gtk.RadioButton Group;
+ public Gtk.RadioButton NullRadio;
+ }
+
+ public object Group {
+ get {
+ if (radioGroup == null)
+ radioGroup = new RadioGroup () { Group = Widget };
+ return radioGroup;
+ }
+ set {
+ var g = (RadioGroup)value;
+ if (g != radioGroup) {
+ Widget.Group = g.Group.Group;
+ radioGroup = g;
+ }
+ }
+ }
+
+ public bool Active {
+ get {
+ return Widget.Active;
+ }
+ set {
+ if (Widget.Active && !value) {
+ var g = (RadioGroup) Group;
+ if (g.NullRadio == null)
+ g.NullRadio = new Gtk.RadioButton (g.Group);
+ g.NullRadio.Active = true;
+ } else
+ Widget.Active = value;
+ }
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RichTextViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RichTextViewBackend.cs
index 9db1f9f..4e44131 100755
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RichTextViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/RichTextViewBackend.cs
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using Xwt;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -145,7 +145,7 @@ namespace Xwt.GtkBackend
Uri = link.Href
};
label.NavigateToUrl += HandleNavigateToUrl;
- Widget.AddChildAtAnchor ((Gtk.Widget) WidgetRegistry.GetNativeWidget (label), link.Anchor);
+ Widget.AddChildAtAnchor ((Gtk.Widget) ApplicationContext.Toolkit.GetNativeWidget (label), link.Anchor);
links [i] = label;
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollAdjustmentBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollAdjustmentBackend.cs
index 9cd36bb..cb867cf 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollAdjustmentBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollAdjustmentBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -33,6 +33,7 @@ namespace Xwt.GtkBackend
{
Gtk.Adjustment adjustment;
IScrollAdjustmentEventSink eventSink;
+ ApplicationContext context;
public Gtk.Adjustment Adjustment {
get { return adjustment; }
@@ -48,8 +49,9 @@ namespace Xwt.GtkBackend
}
#region IBackend implementation
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
+ this.context = context;
if (adjustment == null)
adjustment = new Gtk.Adjustment (0, 0, 0, 0, 0, 0);
}
@@ -77,64 +79,29 @@ namespace Xwt.GtkBackend
void HandleValueChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnValueChanged ();
});
}
#endregion
#region IScrollAdjustmentBackend implementation
- public double Value {
- get {
- return adjustment.Value;
- }
- set {
- adjustment.Value = value;
- }
- }
-
- public double LowerValue {
- get {
- return adjustment.Lower;
- }
- set {
- adjustment.Lower = value;
- }
- }
-
- public double UpperValue {
- get {
- return adjustment.Upper;
- }
- set {
- adjustment.Upper = value;
- }
- }
- public double PageIncrement {
- get {
- return adjustment.PageIncrement;
- }
- set {
- adjustment.PageIncrement = value;
- }
- }
+ double lowerValue;
- public double StepIncrement {
- get {
- return adjustment.StepIncrement;
- }
- set {
- adjustment.StepIncrement = value;
- }
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ this.lowerValue = lowerValue;
+ adjustment.SetBounds (0, upperValue - lowerValue, stepIncrement, pageIncrement, pageSize);
+ Value = value;
}
- public double PageSize {
+ public double Value {
get {
- return adjustment.PageSize;
+ return lowerValue + adjustment.Value;
}
set {
- adjustment.PageSize = value;
+ adjustment.Value = value - lowerValue;
}
}
#endregion
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollViewBackend.cs
index bdf705c..d9ceb07 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollViewBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -48,8 +48,12 @@ namespace Xwt.GtkBackend
get { return (IScrollViewEventSink)base.EventSink; }
}
+ Gtk.Widget currentChild;
+
public void SetChild (IWidgetBackend child)
{
+ RemoveChildPlacement (currentChild);
+
if (Widget.Child != null) {
if (Widget.Child is Gtk.Bin) {
Gtk.Bin vp = (Gtk.Bin) Widget.Child;
@@ -60,7 +64,7 @@ namespace Xwt.GtkBackend
if (child != null) {
- var w = GetWidget (child);
+ var w = currentChild = GetWidgetWithPlacement (child);
WidgetBackend wb = (WidgetBackend) child;
@@ -112,7 +116,7 @@ namespace Xwt.GtkBackend
[GLib.ConnectBefore]
void HandleValueChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnVisibleRectChanged ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollbarBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollbarBackend.cs
new file mode 100644
index 0000000..01a0257
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ScrollbarBackend.cs
@@ -0,0 +1,52 @@
+//
+// ScrollbarBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class ScrollbarBackend: WidgetBackend, IScrollbarBackend
+ {
+ Gtk.Adjustment adjustment;
+
+ public void Initialize (Orientation dir)
+ {
+ adjustment = new Gtk.Adjustment (0, 0, 1, 1, 1, 1);
+
+ if (dir == Orientation.Horizontal)
+ Widget = new Gtk.HScrollbar (adjustment);
+ else
+ Widget = new Gtk.VScrollbar (adjustment);
+ Widget.Show ();
+ }
+
+ public IScrollAdjustmentBackend CreateAdjustment ()
+ {
+ return new ScrollAdjustmentBackend (adjustment);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SegmentedButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SegmentedButtonBackend.cs
new file mode 100644
index 0000000..4ec0697
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SegmentedButtonBackend.cs
@@ -0,0 +1,111 @@
+//
+// SegmentedButtonBackend.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.GtkBackend
+{
+ public class SegmentedButtonBackend : WidgetBackend, ISegmentedButtonBackend
+ {
+ public SegmentedButtonBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ Widget = new CustomHButtonBox ();
+ Widget.LayoutStyle = Gtk.ButtonBoxStyle.Start;
+ base.Widget.Show ();
+ }
+
+ protected new Gtk.HButtonBox Widget {
+ get { return (Gtk.HButtonBox)base.Widget; }
+ set { base.Widget = value; }
+ }
+
+ public void AddChildButton (int index, Button button)
+ {
+ // TODO: support index
+ Widget.Add ((Gtk.Widget)((WidgetBackend)Toolkit.GetBackend (button)).NativeWidget);
+ }
+
+ public void RemoveChildButton (int index)
+ {
+ Widget.Remove (Widget.Children [index]);
+ }
+
+ public void ReplaceChildButton (int index, Button newButton)
+ {
+ // TODO
+ }
+
+ public int Spacing {
+ get {
+ return Widget.Spacing;
+ }
+ set {
+ Widget.Spacing = value;
+ }
+ }
+
+ public class CustomHButtonBox : Gtk.HButtonBox
+ {
+ // The default implementation of HButtonBox don't pay attention
+ // to its allocation for its child buttons using instead the size
+ // they request. Change that
+ protected override void OnSizeAllocated (Gdk.Rectangle allocation)
+ {
+ base.OnSizeAllocated (allocation);
+
+ var children = Children;
+ if (children.Length == 0)
+ return;
+
+ int childHeight = (int)(allocation.Height - 2 * BorderWidth);
+ int childWidth = (allocation.Width - Spacing * (children.Length - 1)) / children.Length;
+ int x = (int)(allocation.X + BorderWidth);
+ int y = allocation.Y + (allocation.Height - childHeight) / 2;
+ var childAllocation = new Gdk.Rectangle ();
+ childAllocation.Width = childWidth;
+ childAllocation.Height = childHeight;
+
+ foreach (var child in Children) {
+ if (!child.Visible)
+ continue;
+
+ childAllocation.Y = y;
+ childAllocation.X = x;
+ x += childWidth + Spacing;
+
+ child.SizeAllocate (childAllocation);
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SliderBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SliderBackend.cs
new file mode 100644
index 0000000..849f5a0
--- /dev/null
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SliderBackend.cs
@@ -0,0 +1,102 @@
+//
+// SliderBackend.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin, Inc.
+//
+// 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 Xwt.Backends;
+
+
+using Gtk;
+
+namespace Xwt.GtkBackend
+{
+ public class SliderBackend : WidgetBackend, ISliderBackend
+ {
+ public SliderBackend ()
+ {
+ }
+
+ public void Initialize (Xwt.Backends.Orientation dir)
+ {
+ if (dir == Xwt.Backends.Orientation.Horizontal)
+ Widget = new Gtk.HScale (0, 1.0, 0.1);
+ else
+ Widget = new Gtk.VScale (0, 1.0, 0.1);
+
+ Widget.DrawValue = false;
+ Widget.Show ();
+ }
+
+ protected new Gtk.Scale Widget {
+ get { return (Gtk.Scale)base.Widget; }
+ set { base.Widget = value; }
+ }
+
+ protected new ISliderEventSink EventSink {
+ get { return (ISliderEventSink)base.EventSink; }
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is SliderEvent) {
+ if ((SliderEvent)eventId == SliderEvent.ValueChanged)
+ Widget.ValueChanged += HandleValueChanged;
+ }
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is SliderEvent) {
+ if ((SliderEvent)eventId == SliderEvent.ValueChanged)
+ Widget.ValueChanged -= HandleValueChanged;
+ }
+ }
+
+ void HandleValueChanged (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.ValueChanged ();
+ });
+ }
+
+ public double Value {
+ get { return Widget.Value; }
+ set { Widget.Value = value; }
+ }
+
+ public double MaximumValue {
+ get { return Widget.Adjustment.Upper; }
+ set { Widget.SetRange (Math.Min (value - 1, MinimumValue), value); }
+ }
+
+ public double MinimumValue {
+ get { return Widget.Adjustment.Lower; }
+ set { Widget.SetRange (value, Math.Max (value + 1, MaximumValue)); }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinButtonBackend.cs
index ca31116..c07c586 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinButtonBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinButtonBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using Gtk;
@@ -34,6 +34,8 @@ namespace Xwt.GtkBackend
{
public class SpinButtonBackend : WidgetBackend, ISpinButtonBackend
{
+ string indeterminateMessage;
+
public SpinButtonBackend ()
{
}
@@ -43,8 +45,17 @@ namespace Xwt.GtkBackend
Widget = (Gtk.SpinButton) CreateWidget ();
Widget.Numeric = true;
Widget.Alignment = 1.0f;
+ Widget.ExposeEvent += HandleExposeEvent;
Widget.Show ();
}
+
+ // This is a workaround for bug https://bugzilla.xamarin.com/show_bug.cgi?id=10904
+ void HandleExposeEvent (object o, ExposeEventArgs args)
+ {
+ if (indeterminateMessage != null && !Widget.Numeric)
+ Widget.Text = indeterminateMessage;
+ Widget.ExposeEvent -= HandleExposeEvent;
+ }
protected virtual Gtk.Widget CreateWidget ()
{
@@ -80,7 +91,7 @@ namespace Xwt.GtkBackend
void HandleValueChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.ValueChanged ();
});
}
@@ -97,7 +108,10 @@ namespace Xwt.GtkBackend
public double Value {
get { return Widget.Value; }
- set { Widget.Value = value; }
+ set {
+ Widget.Numeric = true;
+ Widget.Value = value;
+ }
}
public bool Wrap {
@@ -132,6 +146,28 @@ namespace Xwt.GtkBackend
break;
}
}
+
+ public bool IsIndeterminate {
+ get { return !Widget.Numeric; }
+ set {
+ Widget.Numeric = !value;
+ if (value)
+ Widget.Text = indeterminateMessage ?? string.Empty;
+ else
+ Widget.Value = MinimumValue;
+ }
+ }
+
+ public string IndeterminateMessage {
+ get {
+ return indeterminateMessage;
+ }
+ set {
+ indeterminateMessage = value;
+ if (IsIndeterminate)
+ Widget.Text = indeterminateMessage ?? string.Empty;
+ }
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs
index 8fc9371..0d46133 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/SpinnerBackend.cs
@@ -42,7 +42,7 @@ namespace Xwt.GtkBackend
}
}
- public class Spinner : Gtk.DrawingArea
+ public class Spinner : Gtk.Widget
{
[Obsolete]
protected Spinner(GLib.GType gtype) : base(gtype) {}
@@ -52,7 +52,7 @@ namespace Xwt.GtkBackend
public Spinner () : base(IntPtr.Zero)
{
- if (base.GetType () != typeof(Spinner))
+ if (GetType () != typeof(Spinner))
{
this.CreateNativeObject (new string[0], new GLib.Value[0]);
return;
@@ -90,6 +90,17 @@ namespace Xwt.GtkBackend
{
gtk_spinner_stop(Handle);
}
+
+ [DllImport("libgtk-win32-2.0-0.dll")]
+ static extern IntPtr gtk_spinner_get_type();
+
+ public static new GLib.GType GType {
+ get {
+ IntPtr raw_ret = gtk_spinner_get_type();
+ GLib.GType ret = new GLib.GType(raw_ret);
+ return ret;
+ }
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/StatusIconBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/StatusIconBackend.cs
index bffe0e8..a6276de 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/StatusIconBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/StatusIconBackend.cs
@@ -28,24 +28,25 @@ using System;
using Xwt.Backends;
using Gdk;
+
namespace Xwt.GtkBackend
{
public class StatusIconBackend : IStatusIconBackend
{
Gtk.StatusIcon statusItem;
MenuBackend menu;
+ ApplicationContext context;
- public void SetImage (object imageBackend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
- if (imageBackend == null) {
- throw new ArgumentNullException ("imageBackend");
- }
- statusItem.Pixbuf = (Pixbuf)imageBackend;
+ this.context = context;
+ statusItem = new Gtk.StatusIcon();
}
-
- public void InitializeBackend (object frontend)
+
+ public void SetImage (ImageDescription image)
{
- statusItem = new Gtk.StatusIcon();
+ image = image.WithDefaultSize (Gtk.IconSize.Menu);
+ statusItem.Pixbuf = ((GtkImage)image.Backend).GetBestFrame (context, Util.GetDefaultScaleFactor (), image.Size.Width, image.Size.Height, true);
}
public void SetMenu (object menuBackend)
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableStoreBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableStoreBackend.cs
index 3376d03..c5577e5 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableStoreBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableStoreBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Xwt.Backends;
namespace Xwt.GtkBackend
@@ -35,19 +35,24 @@ namespace Xwt.GtkBackend
{
Gtk.TreeModel store;
Type[] types;
-
+
public Gtk.TreeModel Store {
get {
return store;
}
}
+ public ApplicationContext ApplicationContext {
+ get;
+ private set;
+ }
+
public void Initialize (Type[] columnTypes)
{
types = new Type[columnTypes.Length];
for (int n=0; n<types.Length; n++) {
if (columnTypes [n] == typeof(Image))
- types [n] = typeof(Gdk.Pixbuf);
+ types [n] = typeof(ImageDescription);
else if (columnTypes [n] == typeof(Object))
types [n] = typeof(ObjectWrapper);
else
@@ -58,33 +63,19 @@ namespace Xwt.GtkBackend
public abstract Gtk.TreeModel InitializeModel (Type[] columnTypes);
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
+ ApplicationContext = context;
}
public void SetValue (Gtk.TreeIter it, int column, object value)
{
- if (types [column] == typeof(ObjectWrapper) && value != null)
- store.SetValue (it, column, new ObjectWrapper (value));
- else if (value is string)
- store.SetValue (it, column, (string)value);
- else if (value is Image)
- store.SetValue (it, column, (Gdk.Pixbuf)WidgetRegistry.GetBackend (value));
- else
- store.SetValue (it, column, value ?? DBNull.Value);
+ CellUtil.SetModelValue (store, it, column, types [column], value);
}
public object GetValue (Gtk.TreeIter it, int column)
{
- object val = store.GetValue (it, column);
- if (val is Gdk.Pixbuf)
- return WidgetRegistry.CreateFrontend<Image> (val);
- else if (val is DBNull)
- return null;
- else if (val is ObjectWrapper)
- return ((ObjectWrapper)val).Object;
- else
- return val;
+ return CellUtil.GetModelValue (store, it, column);
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableViewBackend.cs
index 30336a4..e9281d4 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TableViewBackend.cs
@@ -26,7 +26,8 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+using Gtk;
+
namespace Xwt.GtkBackend
{
@@ -98,7 +99,7 @@ namespace Xwt.GtkBackend
void HandleWidgetSelectionChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
}
@@ -118,13 +119,13 @@ namespace Xwt.GtkBackend
if (col.HeaderView == null)
tc.Title = col.Title;
else
- tc.Widget = CellUtil.CreateCellRenderer (col.HeaderView);
+ tc.Widget = CellUtil.CreateCellRenderer (ApplicationContext, col.HeaderView);
}
void MapColumn (ListViewColumn col, Gtk.TreeViewColumn tc)
{
foreach (var v in col.Views) {
- CellUtil.CreateCellRenderer (this, tc, v);
+ CellUtil.CreateCellRenderer (ApplicationContext, this, tc, v, Widget.Model);
}
}
@@ -142,6 +143,14 @@ namespace Xwt.GtkBackend
}
else if (change == ListViewColumnChange.Title)
MapTitle (col, tc);
+ else if (change == ListViewColumnChange.IsResizeable)
+ tc.Resizable = col.IsResizeable;
+ else if (change == ListViewColumnChange.SortDirection)
+ tc.SortOrder = (SortType)col.SortDirection;
+ else if (change == ListViewColumnChange.SortDataField)
+ tc.SortColumnId = col.SortDataField.Index;
+ else if (change == ListViewColumnChange.IsSortIndicatorShown)
+ tc.SortIndicator = col.IsSortIndicatorShown;
}
public void SelectAll ()
@@ -177,6 +186,12 @@ namespace Xwt.GtkBackend
{
((Gtk.TreeViewColumn)target).AddAttribute (cr, field, col);
}
+
+ public void SetCellDataFunc (object target, Gtk.CellRenderer cr, Gtk.CellLayoutDataFunc dataFunc)
+ {
+ ((Gtk.TreeViewColumn)target).SetCellDataFunc (cr, dataFunc);
+ }
+
#endregion
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextEntryBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextEntryBackend.cs
index 7df0527..238a273 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextEntryBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextEntryBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -57,6 +57,24 @@ namespace Xwt.GtkBackend
Widget.Text = value;
}
}
+
+ public Alignment TextAlignment {
+ get {
+ if (Widget.Xalign == 0)
+ return Alignment.Start;
+ else if (Widget.Xalign == 1)
+ return Alignment.End;
+ else
+ return Alignment.Center;
+ }
+ set {
+ switch (value) {
+ case Alignment.Start: Widget.Xalign = 0; break;
+ case Alignment.End: Widget.Xalign = 1; break;
+ case Alignment.Center: Widget.Xalign = 0.5f; break;
+ }
+ }
+ }
public string PlaceholderText {
get { return placeHolderText; }
@@ -134,6 +152,10 @@ namespace Xwt.GtkBackend
Widget.HasFrame = value;
}
}
+
+ public bool MultiLine {
+ get; set;
+ }
public override void EnableEvent (object eventId)
{
@@ -157,7 +179,7 @@ namespace Xwt.GtkBackend
void HandleChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnChanged ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextLayoutBackendHandler.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextLayoutBackendHandler.cs
index 7902758..04234b2 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextLayoutBackendHandler.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TextLayoutBackendHandler.cs
@@ -28,74 +28,187 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Xwt.CairoBackend;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
namespace Xwt.GtkBackend
{
- public class TextLayoutBackendHandler: ITextLayoutBackendHandler
+ public class GtkTextLayoutBackendHandler: TextLayoutBackendHandler
{
static Cairo.Context SharedContext;
public double Heigth = -1;
-
- static TextLayoutBackendHandler ()
+
+ internal class PangoBackend : IDisposable
{
- Cairo.Surface sf = new Cairo.ImageSurface (Cairo.Format.ARGB32, 1, 1);
- SharedContext = new Cairo.Context (sf);
+ Pango.Layout layout;
+ public Pango.Layout Layout {
+ get {
+ if (hasUnassignedAttributes) {
+ attributes.AssignTo (layout);
+ hasUnassignedAttributes = false;
+ }
+ return layout;
+ }
+ set {
+ layout = value;
+ }
+ }
+
+ FastPangoAttrList attributes;
+ bool hasUnassignedAttributes = false;
+ public FastPangoAttrList Attributes {
+ get {
+ if (attributes == null)
+ attributes = new FastPangoAttrList ();
+ hasUnassignedAttributes = true;
+ return attributes;
+ }
+ private set {
+ attributes = value;
+ }
+ }
+
+ string text;
+ public string Text {
+ get {
+ return text;
+ }
+ set {
+ text = value;
+ indexer = null;
+ if (attributes != null) {
+ attributes.Dispose ();
+ attributes = null;
+ }
+ }
+ }
+
+ TextIndexer indexer;
+ public TextIndexer TextIndexer {
+ get {
+ if (indexer == null)
+ indexer = new TextIndexer (Text);
+ return indexer;
+ }
+ }
+
+ public void ClearAttributes ()
+ {
+ if (attributes != null) {
+ attributes.Dispose ();
+ attributes = new FastPangoAttrList ();
+ hasUnassignedAttributes = true;
+ }
+ }
+
+ public void Dispose ()
+ {
+ if (layout != null) {
+ layout.Dispose ();
+ layout = null;
+ }
+ if (attributes != null) {
+ attributes.Dispose ();
+ attributes = null;
+ }
+ }
}
-
- public object Create (Context context)
+
+ static GtkTextLayoutBackendHandler ()
{
- CairoContextBackend c = (CairoContextBackend) WidgetRegistry.GetBackend (context);
- return Pango.CairoHelper.CreateLayout (c.Context);
+ using (Cairo.Surface sf = new Cairo.ImageSurface (Cairo.Format.ARGB32, 1, 1)) {
+ SharedContext = new Cairo.Context (sf);
+ }
+ }
+
+ public static void DisposeResources ()
+ {
+ ((IDisposable)SharedContext).Dispose ();
}
- public object Create (ICanvasBackend canvas)
+ public override object Create ()
{
- return Pango.CairoHelper.CreateLayout (SharedContext);
+ return new PangoBackend {
+ Layout = Pango.CairoHelper.CreateLayout (SharedContext)
+ };
}
- public void SetText (object backend, string text)
+ public override void SetText (object backend, string text)
{
- Pango.Layout tl = (Pango.Layout) backend;
- tl.SetText (text);
+ var tl = (PangoBackend) backend;
+ tl.Layout.SetText (text);
+ tl.Text = text;
}
- public void SetFont (object backend, Xwt.Drawing.Font font)
+ public override void SetFont (object backend, Xwt.Drawing.Font font)
{
- Pango.Layout tl = (Pango.Layout)backend;
- tl.FontDescription = (Pango.FontDescription)WidgetRegistry.GetBackend (font);
+ var tl = (PangoBackend)backend;
+ tl.Layout.FontDescription = (Pango.FontDescription)Toolkit.GetBackend (font);
}
- public void SetWidth (object backend, double value)
+ public override void SetWidth (object backend, double value)
{
- Pango.Layout tl = (Pango.Layout)backend;
- tl.Width = (int) (value * Pango.Scale.PangoScale);
+ var tl = (PangoBackend) backend;
+ tl.Layout.Width = (int) (value * Pango.Scale.PangoScale);
}
- public void SetHeight (object backend, double value)
+ public override void SetHeight (object backend, double value)
{
this.Heigth = value;
}
- public void SetTrimming (object backend, TextTrimming textTrimming)
+ public override void SetTrimming (object backend, TextTrimming textTrimming)
{
- Pango.Layout tl = (Pango.Layout)backend;
+ var tl = (PangoBackend)backend;
if (textTrimming == TextTrimming.WordElipsis)
- tl.Ellipsize = Pango.EllipsizeMode.End;
+ tl.Layout.Ellipsize = Pango.EllipsizeMode.End;
if (textTrimming == TextTrimming.Word)
- tl.Ellipsize = Pango.EllipsizeMode.None;
+ tl.Layout.Ellipsize = Pango.EllipsizeMode.None;
}
- public Size GetSize (object backend)
+ public override Size GetSize (object backend)
{
- Pango.Layout tl = (Pango.Layout) backend;
+ var tl = (PangoBackend)backend;
int w, h;
- tl.GetPixelSize (out w, out h);
+ tl.Layout.GetPixelSize (out w, out h);
return new Size ((double)w, (double)h);
}
+
+ public override void AddAttribute (object backend, TextAttribute attribute)
+ {
+ var tl = (PangoBackend) backend;
+ tl.Attributes.AddAttribute (tl.TextIndexer, attribute);
+ }
+
+ public override void ClearAttributes (object backend)
+ {
+ var tl = (PangoBackend) backend;
+ tl.ClearAttributes ();
+ }
+
+ public override int GetIndexFromCoordinates (object backend, double x, double y)
+ {
+ var tl = (PangoBackend) backend;
+ int index, trailing;
+ tl.Layout.XyToIndex ((int)x, (int)y, out index, out trailing);
+ return tl.TextIndexer.ByteIndexToIndex (index);
+ }
+
+ public override Point GetCoordinateFromIndex (object backend, int index)
+ {
+ var tl = (PangoBackend) backend;
+ var pos = tl.Layout.IndexToPos (tl.TextIndexer.IndexToByteIndex (index));
+ return new Point (pos.X, pos.Y);
+ }
+
+ public override void Dispose (object backend)
+ {
+ var tl = (IDisposable) backend;
+ tl.Dispose ();
+ }
}
}
-
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ToggleButtonBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ToggleButtonBackend.cs
index ae53b17..5d185db 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ToggleButtonBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/ToggleButtonBackend.cs
@@ -51,7 +51,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
@@ -112,7 +112,7 @@ namespace Xwt.GtkBackend
void HandleToggled (object sender, EventArgs e)
{
ChangeImageIfDisclosure ();
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnToggled ();
});
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeStoreBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeStoreBackend.cs
index 03ee8e6..6598625 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeStoreBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeStoreBackend.cs
@@ -27,7 +27,7 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt.GtkBackend
{
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeViewBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeViewBackend.cs
index fa2668e..fe4d5ec 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeViewBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/TreeViewBackend.cs
@@ -33,6 +33,76 @@ namespace Xwt.GtkBackend
{
Gtk.TreePath autoExpandPath;
uint expandTimer;
+
+ protected new ITreeViewEventSink EventSink {
+ get { return (ITreeViewEventSink)base.EventSink; }
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is TreeViewEvent) {
+ switch ((TreeViewEvent)eventId) {
+ case TreeViewEvent.RowActivated:
+ Widget.RowActivated += HandleRowActivated;
+ break;
+ case TreeViewEvent.RowExpanding:
+ Widget.TestExpandRow += HandleTestExpandRow;;
+ break;
+ case TreeViewEvent.RowExpanded:
+ Widget.RowExpanded += HandleRowExpanded;;
+ break;
+ }
+ }
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is TreeViewEvent) {
+ switch ((TreeViewEvent)eventId) {
+ case TreeViewEvent.RowActivated:
+ Widget.RowActivated -= HandleRowActivated;
+ break;
+ case TreeViewEvent.RowExpanding:
+ Widget.TestExpandRow -= HandleTestExpandRow;;
+ break;
+ case TreeViewEvent.RowExpanded:
+ Widget.RowExpanded -= HandleRowExpanded;;
+ break;
+ }
+ }
+ }
+
+ void HandleRowExpanded (object o, Gtk.RowExpandedArgs args)
+ {
+ Gtk.TreeIter it;
+ if (Widget.Model.GetIter (out it, args.Path)) {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnRowExpanded (new IterPos (-1, it));
+ });
+ }
+ }
+
+ void HandleTestExpandRow (object o, Gtk.TestExpandRowArgs args)
+ {
+ Gtk.TreeIter it;
+ if (Widget.Model.GetIter (out it, args.Path)) {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnRowExpanding (new IterPos (-1, it));
+ });
+ }
+ }
+
+ void HandleRowActivated (object o, Gtk.RowActivatedArgs args)
+ {
+ Gtk.TreeIter it;
+ if (Widget.Model.GetIter (out it, args.Path)) {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnRowActivated (new IterPos (-1, it));
+ });
+ }
+ }
protected override void OnSetDragTarget (Gtk.TargetEntry[] table, Gdk.DragAction actions)
{
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/Util.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/Util.cs
index a41a445..ba3925d 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/Util.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/Util.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Xwt.Backends;
using System.Collections.Generic;
using System.Linq;
@@ -38,6 +38,18 @@ namespace Xwt.GtkBackend
static uint targetIdCounter = 0;
static Dictionary<TransferDataType, Gtk.TargetEntry[]> dragTargets = new Dictionary<TransferDataType, Gtk.TargetEntry[]> ();
static Dictionary<string, TransferDataType> atomToType = new Dictionary<string, TransferDataType> ();
+ static Size[] iconSizes = new Size[7];
+
+ static Util ()
+ {
+ for (int i = 0; i < iconSizes.Length; i++) {
+ int w, h;
+ if (!Gtk.Icon.SizeLookup ((Gtk.IconSize)i, out w, out h))
+ w = h = -1;
+ iconSizes[i].Width = w;
+ iconSizes[i].Height = h;
+ }
+ }
public static void SetDragData (TransferDataSource data, Gtk.DragDataGetArgs args)
{
@@ -53,15 +65,17 @@ namespace Xwt.GtkBackend
return;
if (val is string)
data.Text = (string)val;
- else if (val is Xwt.Drawing.Image)
- data.SetPixbuf ((Gdk.Pixbuf) WidgetRegistry.GetBackend (val));
+ else if (val is Xwt.Drawing.Image) {
+ var bmp = ((Image)val).ToBitmap ();
+ data.SetPixbuf (((GtkImage)Toolkit.GetBackend (bmp)).Frames[0].Pixbuf);
+ }
else {
var at = Gdk.Atom.Intern (atomType, false);
data.Set (at, 0, TransferDataSource.SerializeValue (val));
}
}
- public static bool GetSelectionData (Gtk.SelectionData data, TransferDataStore target)
+ public static bool GetSelectionData (ApplicationContext context, Gtk.SelectionData data, TransferDataStore target)
{
TransferDataType type = Util.AtomToType (data.Target.Name);
if (type == null || data.Length <= 0)
@@ -70,7 +84,7 @@ namespace Xwt.GtkBackend
if (type == TransferDataType.Text)
target.AddText (data.Text);
else if (data.TargetsIncludeImage (false))
- target.AddImage (WidgetRegistry.CreateFrontend<Xwt.Drawing.Image> (data.Pixbuf));
+ target.AddImage (context.Toolkit.WrapImage (data.Pixbuf));
else if (type == TransferDataType.Uri) {
var uris = System.Text.Encoding.UTF8.GetString (data.Data).Split ('\n').Where (u => !string.IsNullOrEmpty(u)).Select (u => new Uri (u)).ToArray ();
target.AddUris (uris);
@@ -130,13 +144,26 @@ namespace Xwt.GtkBackend
list.Remove ("STRING");
}
entries = (Gtk.TargetEntry[])list;
- }
- else if (type == TransferDataType.Rtf) {
+ } else if (type == TransferDataType.Rtf) {
Gdk.Atom atom;
- if (Platform.IsMac)
+ if (Platform.IsMac) {
atom = Gdk.Atom.Intern ("NSRTFPboardType", false); //TODO: use public.rtf when dep on MacOS 10.6
- else
+ } else if (Platform.IsWindows) {
+ atom = Gdk.Atom.Intern ("Rich Text Format", false);
+ } else {
atom = Gdk.Atom.Intern ("text/rtf", false);
+ }
+ entries = new Gtk.TargetEntry[] { new Gtk.TargetEntry (atom, 0, id) };
+ }
+ else if (type == TransferDataType.Html) {
+ Gdk.Atom atom;
+ if (Platform.IsMac) {
+ atom = Gdk.Atom.Intern ("Apple HTML pasteboard type", false); //TODO: use public.rtf when dep on MacOS 10.6
+ } else if (Platform.IsWindows) {
+ atom = Gdk.Atom.Intern ("HTML Format", false);
+ } else {
+ atom = Gdk.Atom.Intern ("text/html", false);
+ }
entries = new Gtk.TargetEntry[] { new Gtk.TargetEntry (atom, 0, id) };
}
else {
@@ -151,25 +178,27 @@ namespace Xwt.GtkBackend
static Dictionary<string,string> icons;
- public static string ToGtkStock (string id)
+ public static GtkImage ToGtkStock (string id)
{
if (icons == null) {
icons = new Dictionary<string, string> ();
- icons [StockIcons.ZoomIn] = Gtk.Stock.ZoomIn;
- icons [StockIcons.ZoomOut] = Gtk.Stock.ZoomOut;
- icons [StockIcons.Zoom100] = Gtk.Stock.Zoom100;
- icons [StockIcons.ZoomFit] = Gtk.Stock.ZoomFit;
- icons [StockIcons.OrientationPortrait] = Gtk.Stock.OrientationPortrait;
- icons [StockIcons.OrientationLandscape] = Gtk.Stock.OrientationLandscape;
- icons [StockIcons.Add] = Gtk.Stock.Add;
- icons [StockIcons.Remove] = Gtk.Stock.Remove;
- icons [StockIcons.Warning] = Gtk.Stock.DialogWarning;
- icons [StockIcons.Error] = Gtk.Stock.DialogError;
- icons [StockIcons.Information] = Gtk.Stock.DialogInfo;
+ icons [StockIconId.ZoomIn] = Gtk.Stock.ZoomIn;
+ icons [StockIconId.ZoomOut] = Gtk.Stock.ZoomOut;
+ icons [StockIconId.Zoom100] = Gtk.Stock.Zoom100;
+ icons [StockIconId.ZoomFit] = Gtk.Stock.ZoomFit;
+ icons [StockIconId.OrientationPortrait] = Gtk.Stock.OrientationPortrait;
+ icons [StockIconId.OrientationLandscape] = Gtk.Stock.OrientationLandscape;
+ icons [StockIconId.Add] = Gtk.Stock.Add;
+ icons [StockIconId.Remove] = Gtk.Stock.Remove;
+ icons [StockIconId.Warning] = Gtk.Stock.DialogWarning;
+ icons [StockIconId.Error] = Gtk.Stock.DialogError;
+ icons [StockIconId.Information] = Gtk.Stock.DialogInfo;
+ icons [StockIconId.Question] = Gtk.Stock.DialogQuestion;
}
string res;
- icons.TryGetValue (id, out res);
- return res;
+ if (!icons.TryGetValue (id, out res))
+ throw new NotSupportedException ("Unknown image: " + id);
+ return new GtkImage (res);
}
public static Gtk.IconSize ToGtkSize (Xwt.IconSize size)
@@ -250,6 +279,47 @@ namespace Xwt.GtkBackend
}
throw new InvalidOperationException("Invalid mouse scroll direction value: " + d);
}
+
+ public static Gtk.IconSize GetBestSizeFit (double size, Gtk.IconSize[] availablesizes = null)
+ {
+ // Find the size that better fits the requested size
+
+ for (int n=0; n<iconSizes.Length; n++) {
+ if (availablesizes != null && !availablesizes.Contains ((Gtk.IconSize)n))
+ continue;
+ if (size <= iconSizes [n].Width)
+ return (Gtk.IconSize)n;
+ }
+ if (availablesizes == null || availablesizes.Contains (Gtk.IconSize.Dialog))
+ return Gtk.IconSize.Dialog;
+ else
+ return Gtk.IconSize.Invalid;
+ }
+
+ public static double GetBestSizeFitSize (double size)
+ {
+ var s = GetBestSizeFit (size);
+ return iconSizes [(int)s].Width;
+ }
+
+ public static ImageDescription WithDefaultSize (this ImageDescription image, Gtk.IconSize defaultIconSize)
+ {
+ if (image.Size.IsZero) {
+ var s = iconSizes [(int)defaultIconSize];
+ image.Size = s;
+ }
+ return image;
+ }
+
+ public static double GetScaleFactor (Gtk.Widget w)
+ {
+ return GtkWorkarounds.GetScaleFactor (w);
+ }
+
+ public static double GetDefaultScaleFactor ()
+ {
+ return 1;
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs
old mode 100755
new mode 100644
index 8c94af5..7642d7f
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WidgetBackend.cs
@@ -29,7 +29,7 @@ using Xwt.Backends;
using Xwt;
using System.Collections.Generic;
using System.Linq;
-using Xwt.Engine;
+
using Xwt.Drawing;
namespace Xwt.GtkBackend
@@ -38,12 +38,13 @@ namespace Xwt.GtkBackend
{
Gtk.Widget widget;
Widget frontend;
- Gtk.Alignment alignment;
Gtk.EventBox eventBox;
IWidgetEventSink eventSink;
WidgetEvent enabledEvents;
bool destroyed;
-
+ SizeConstraint currentWidthConstraint = SizeConstraint.Unconstrained;
+ SizeConstraint currentHeightConstraint = SizeConstraint.Unconstrained;
+
bool minSizeSet;
class DragDropData
@@ -61,11 +62,11 @@ namespace Xwt.GtkBackend
DragDropData dragDropInfo;
const WidgetEvent dragDropEvents = WidgetEvent.DragDropCheck | WidgetEvent.DragDrop | WidgetEvent.DragOver | WidgetEvent.DragOverCheck;
- const WidgetEvent sizeCheckEvents = WidgetEvent.PreferredWidthCheck | WidgetEvent.PreferredHeightCheck | WidgetEvent.PreferredHeightForWidthCheck | WidgetEvent.PreferredWidthForHeightCheck;
-
- void IBackend.InitializeBackend (object frontend)
+
+ void IBackend.InitializeBackend (object frontend, ApplicationContext context)
{
this.frontend = (Widget) frontend;
+ ApplicationContext = context;
}
void IWidgetBackend.Initialize (IWidgetEventSink sink)
@@ -85,7 +86,12 @@ namespace Xwt.GtkBackend
public Widget Frontend {
get { return frontend; }
}
-
+
+ public ApplicationContext ApplicationContext {
+ get;
+ private set;
+ }
+
public object NativeWidget {
get {
return RootWidget;
@@ -105,7 +111,7 @@ namespace Xwt.GtkBackend
public Gtk.Widget RootWidget {
get {
- return alignment ?? eventBox ?? (Gtk.Widget) Widget;
+ return eventBox ?? (Gtk.Widget) Widget;
}
}
@@ -113,13 +119,30 @@ namespace Xwt.GtkBackend
get { return Widget.Visible; }
set {
Widget.Visible = value;
- if (alignment != null)
- alignment.Visible = value;
if (eventBox != null)
eventBox.Visible = value;
}
}
-
+
+ double opacity = 1d;
+ public double Opacity {
+ get { return opacity; }
+ set { opacity = value; }
+ }
+
+ void RunWhenRealized (Action a)
+ {
+ if (Widget.IsRealized)
+ a ();
+ else {
+ EventHandler h = null;
+ h = delegate {
+ a ();
+ };
+ EventsRootWidget.Realized += h;
+ }
+ }
+
public virtual bool Sensitive {
get { return Widget.Sensitive; }
set {
@@ -141,6 +164,16 @@ namespace Xwt.GtkBackend
public void SetFocus ()
{
Widget.IsFocus = true;
+// SetFocus (Widget);
+ }
+
+ void SetFocus (Gtk.Widget w)
+ {
+ if (w.Parent != null)
+ SetFocus (w.Parent);
+ w.GrabFocus ();
+ w.IsFocus = true;
+ w.HasFocus = true;
}
public string TooltipText {
@@ -154,6 +187,8 @@ namespace Xwt.GtkBackend
static Dictionary<CursorType,Gdk.Cursor> gtkCursors = new Dictionary<CursorType, Gdk.Cursor> ();
+ Gdk.Cursor gdkCursor;
+
public void SetCursor (CursorType cursor)
{
AllocEventBox ();
@@ -185,16 +220,29 @@ namespace Xwt.GtkBackend
gtkCursors [cursor] = gc = new Gdk.Cursor (ctype);
}
- if (EventsRootWidget.GdkWindow == null) {
- EventHandler h = null;
- h = delegate {
- EventsRootWidget.GdkWindow.Cursor = gc;
- EventsRootWidget.Realized -= h;
- };
- EventsRootWidget.Realized += h;
- } else
+
+ gdkCursor = gc;
+
+ if (EventsRootWidget.GdkWindow == null)
+ SubscribeRealizedEvent ();
+ else
EventsRootWidget.GdkWindow.Cursor = gc;
}
+
+ bool realizedEventSubscribed;
+ void SubscribeRealizedEvent ()
+ {
+ if (!realizedEventSubscribed) {
+ realizedEventSubscribed = true;
+ EventsRootWidget.Realized += OnRealized;
+ }
+ }
+
+ void OnRealized (Object s, EventArgs e)
+ {
+ if (gdkCursor != null)
+ EventsRootWidget.GdkWindow.Cursor = gdkCursor;
+ }
~WidgetBackend ()
{
@@ -217,7 +265,7 @@ namespace Xwt.GtkBackend
void MarkDestroyed (Widget w)
{
- var bk = (WidgetBackend) WidgetRegistry.GetBackend (w);
+ var bk = (WidgetBackend) Toolkit.GetBackend (w);
bk.destroyed = true;
foreach (var c in w.Surface.Children)
MarkDestroyed (c);
@@ -228,6 +276,12 @@ namespace Xwt.GtkBackend
return new Size (Widget.Allocation.Width, Widget.Allocation.Height);
}
}
+
+ public void SetSizeConstraints (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ currentWidthConstraint = widthConstraint;
+ currentHeightConstraint = heightConstraint;
+ }
DragDropData DragDropInfo {
get {
@@ -249,85 +303,36 @@ namespace Xwt.GtkBackend
return new Point (x + widgetCoordinates.X, y + widgetCoordinates.Y);
}
- public virtual WidgetSize GetPreferredWidth ()
- {
- bool oldFlag = doubleSizeRequestCheckSupported;
- try {
- gettingPreferredSize = true;
- doubleSizeRequestCheckSupported = false;
- var s = new WidgetSize (Widget.SizeRequest ().Width);
- if (minSizeSet && Frontend.MinWidth != -1)
- s.MinSize = Frontend.MinWidth;
- return s;
- } finally {
- gettingPreferredSize = false;
- doubleSizeRequestCheckSupported = oldFlag;
- }
- }
-
- public virtual WidgetSize GetPreferredHeight ()
- {
- bool oldFlag = doubleSizeRequestCheckSupported;
- try {
- gettingPreferredSize = true;
- doubleSizeRequestCheckSupported = false;
- var s = new WidgetSize (Widget.SizeRequest ().Height);
- if (minSizeSet && Frontend.MinHeight != -1)
- s.MinSize = Frontend.MinHeight;
- return s;
- } finally {
- gettingPreferredSize = false;
- doubleSizeRequestCheckSupported = oldFlag;
- }
- }
-
- public virtual WidgetSize GetPreferredHeightForWidth (double width)
- {
- bool oldFlag = doubleSizeRequestCheckSupported;
- try {
- gettingPreferredSize = true;
- doubleSizeRequestCheckSupported = false;
- var s = new WidgetSize (Widget.SizeRequest ().Height);
- if (minSizeSet && Frontend.MinHeight != -1)
- s.MinSize = Frontend.MinHeight;
- return s;
- } finally {
- gettingPreferredSize = false;
- doubleSizeRequestCheckSupported = oldFlag;
- }
- }
-
- public virtual WidgetSize GetPreferredWidthForHeight (double height)
+ public virtual Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- bool oldFlag = doubleSizeRequestCheckSupported;
try {
+ SetSizeConstraints (widthConstraint, heightConstraint);
gettingPreferredSize = true;
- doubleSizeRequestCheckSupported = false;
- var s = new WidgetSize (Widget.SizeRequest ().Width);
- if (minSizeSet && Frontend.MinWidth != -1)
- s.MinSize = Frontend.MinWidth;
- return s;
+ var sr = Widget.SizeRequest ();
+ return new Size (sr.Width, sr.Height);
} finally {
gettingPreferredSize = false;
- doubleSizeRequestCheckSupported = oldFlag;
}
}
-
+
public void SetMinSize (double width, double height)
{
if (width != -1 || height != -1) {
EnableSizeCheckEvents ();
minSizeSet = true;
+ Widget.QueueResize ();
}
else {
minSizeSet = false;
DisableSizeCheckEvents ();
+ Widget.QueueResize ();
}
}
- public void SetNaturalSize (double width, double height)
+ public void SetSizeRequest (double width, double height)
{
- // Nothing to do
+ Widget.WidthRequest = (int)width;
+ Widget.HeightRequest = (int)height;
}
Pango.FontDescription customFont;
@@ -351,7 +356,8 @@ namespace Xwt.GtkBackend
}
set {
customBackgroundColor = value;
- Widget.ModifyBg (Gtk.StateType.Normal, Util.ToGdkColor (value));
+ AllocEventBox (visibleWindow: true);
+ EventsRootWidget.ModifyBg (Gtk.StateType.Normal, Util.ToGdkColor (value));
}
}
@@ -371,28 +377,71 @@ namespace Xwt.GtkBackend
{
return w != null ? ((IGtkWidgetBackend)w).Widget : null;
}
-
- public virtual void UpdateLayout ()
+
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
{
- if (frontend.Margin.HorizontalSpacing == 0 && frontend.Margin.VerticalSpacing == 0) {
- if (alignment != null) {
- alignment.Remove (alignment.Child);
- GtkEngine.ReplaceChild (alignment, EventsRootWidget);
- alignment.Destroy ();
- alignment = null;
- }
- } else {
- if (alignment == null) {
- alignment = new Gtk.Alignment (0, 0, 1, 1);
- GtkEngine.ReplaceChild (EventsRootWidget, alignment);
- alignment.Add (EventsRootWidget);
- alignment.Visible = Widget.Visible;
+ SetChildPlacement (childBackend);
+ }
+
+ public static Gtk.Widget GetWidgetWithPlacement (IWidgetBackend childBackend)
+ {
+ var backend = (WidgetBackend)childBackend;
+ var child = backend.RootWidget;
+ var wrapper = child.Parent as WidgetPlacementWrapper;
+ if (wrapper != null)
+ return wrapper;
+
+ if (!NeedsAlignmentWrapper (backend.Frontend))
+ return child;
+
+ wrapper = new WidgetPlacementWrapper ();
+ wrapper.UpdatePlacement (backend.Frontend);
+ wrapper.Show ();
+ wrapper.Add (child);
+ return wrapper;
+ }
+
+ public static void RemoveChildPlacement (Gtk.Widget w)
+ {
+ if (w == null)
+ return;
+ if (w is WidgetPlacementWrapper) {
+ var wp = (WidgetPlacementWrapper)w;
+ wp.Remove (wp.Child);
+ }
+ }
+
+ static bool NeedsAlignmentWrapper (Widget fw)
+ {
+ return fw.HorizontalPlacement != WidgetPlacement.Fill || fw.VerticalPlacement != WidgetPlacement.Fill || fw.Margin.VerticalSpacing != 0 || fw.Margin.HorizontalSpacing != 0;
+ }
+
+ public static void SetChildPlacement (IWidgetBackend childBackend)
+ {
+ var backend = (WidgetBackend)childBackend;
+ var child = backend.RootWidget;
+ var wrapper = child.Parent as WidgetPlacementWrapper;
+ var fw = backend.Frontend;
+
+ if (!NeedsAlignmentWrapper (fw)) {
+ if (wrapper != null) {
+ wrapper.Remove (child);
+ GtkEngine.ReplaceChild (wrapper, child);
}
- alignment.LeftPadding = (uint) frontend.Margin.Left;
- alignment.RightPadding = (uint) frontend.Margin.Right;
- alignment.TopPadding = (uint) frontend.Margin.Top;
- alignment.BottomPadding = (uint) frontend.Margin.Bottom;
+ return;
}
+
+ if (wrapper == null) {
+ wrapper = new WidgetPlacementWrapper ();
+ wrapper.Show ();
+ GtkEngine.ReplaceChild (child, wrapper);
+ wrapper.Add (child);
+ }
+ wrapper.UpdatePlacement (fw);
+ }
+
+ public virtual void UpdateLayout ()
+ {
Widget.QueueResize ();
if (!Widget.IsRealized) {
@@ -406,7 +455,7 @@ namespace Xwt.GtkBackend
}
}
- void AllocEventBox ()
+ void AllocEventBox (bool visibleWindow = false)
{
// Wraps the widget with an event box. Required for some
// widgets such as Label which doesn't have its own gdk window
@@ -415,11 +464,8 @@ namespace Xwt.GtkBackend
eventBox = new Gtk.EventBox ();
eventBox.Visible = Widget.Visible;
eventBox.Sensitive = Widget.Sensitive;
- if (alignment != null) {
- alignment.Remove (alignment.Child);
- alignment.Add (eventBox);
- } else
- GtkEngine.ReplaceChild (Widget, eventBox);
+ eventBox.VisibleWindow = visibleWindow;
+ GtkEngine.ReplaceChild (Widget, eventBox);
eventBox.Add (Widget);
}
}
@@ -444,36 +490,36 @@ namespace Xwt.GtkBackend
Widget.KeyReleaseEvent += HandleKeyReleaseEvent;
break;
case WidgetEvent.GotFocus:
- EventsRootWidget.Events |= Gdk.EventMask.FocusChangeMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.FocusChangeMask);
Widget.FocusGrabbed += HandleWidgetFocusInEvent;
break;
case WidgetEvent.LostFocus:
- EventsRootWidget.Events |= Gdk.EventMask.FocusChangeMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.FocusChangeMask);
Widget.FocusOutEvent += HandleWidgetFocusOutEvent;
break;
case WidgetEvent.MouseEntered:
AllocEventBox ();
- EventsRootWidget.Events |= Gdk.EventMask.EnterNotifyMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.EnterNotifyMask);
EventsRootWidget.EnterNotifyEvent += HandleEnterNotifyEvent;
break;
case WidgetEvent.MouseExited:
AllocEventBox ();
- EventsRootWidget.Events |= Gdk.EventMask.LeaveNotifyMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.LeaveNotifyMask);
EventsRootWidget.LeaveNotifyEvent += HandleLeaveNotifyEvent;
break;
case WidgetEvent.ButtonPressed:
AllocEventBox ();
- EventsRootWidget.Events |= Gdk.EventMask.ButtonPressMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.ButtonPressMask);
EventsRootWidget.ButtonPressEvent += HandleButtonPressEvent;
break;
case WidgetEvent.ButtonReleased:
AllocEventBox ();
- EventsRootWidget.Events |= Gdk.EventMask.ButtonReleaseMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.ButtonReleaseMask);
EventsRootWidget.ButtonReleaseEvent += HandleButtonReleaseEvent;
break;
case WidgetEvent.MouseMoved:
AllocEventBox ();
- EventsRootWidget.Events |= Gdk.EventMask.PointerMotionMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.PointerMotionMask);
EventsRootWidget.MotionNotifyEvent += HandleMotionNotifyEvent;
break;
case WidgetEvent.BoundsChanged:
@@ -481,7 +527,7 @@ namespace Xwt.GtkBackend
break;
case WidgetEvent.MouseScrolled:
AllocEventBox();
- EventsRootWidget.Events |= Gdk.EventMask.ScrollMask;
+ EventsRootWidget.AddEvents ((int)Gdk.EventMask.ScrollMask);
Widget.ScrollEvent += HandleScrollEvent;
break;
}
@@ -492,7 +538,7 @@ namespace Xwt.GtkBackend
EventsRootWidget.DragMotion += HandleWidgetDragMotion;
EventsRootWidget.DragDataReceived += HandleWidgetDragDataReceived;
}
- if ((ev & sizeCheckEvents) != 0) {
+ if ((ev & WidgetEvent.PreferredSizeCheck) != 0) {
EnableSizeCheckEvents ();
}
enabledEvents |= ev;
@@ -501,10 +547,9 @@ namespace Xwt.GtkBackend
void EnableSizeCheckEvents ()
{
- if ((enabledEvents & sizeCheckEvents) == 0 && !minSizeSet) {
+ if ((enabledEvents & WidgetEvent.PreferredSizeCheck) == 0 && !minSizeSet) {
// Enabling a size request event for the first time
Widget.SizeRequested += HandleWidgetSizeRequested;
- Widget.SizeAllocated += HandleWidgetSizeAllocated;;
}
}
@@ -538,22 +583,26 @@ namespace Xwt.GtkBackend
EventsRootWidget.LeaveNotifyEvent -= HandleLeaveNotifyEvent;
break;
case WidgetEvent.ButtonPressed:
- EventsRootWidget.Events &= ~Gdk.EventMask.ButtonPressMask;
+ if (!EventsRootWidget.IsRealized)
+ EventsRootWidget.Events &= ~Gdk.EventMask.ButtonPressMask;
EventsRootWidget.ButtonPressEvent -= HandleButtonPressEvent;
break;
case WidgetEvent.ButtonReleased:
- EventsRootWidget.Events &= Gdk.EventMask.ButtonReleaseMask;
+ if (!EventsRootWidget.IsRealized)
+ EventsRootWidget.Events &= Gdk.EventMask.ButtonReleaseMask;
EventsRootWidget.ButtonReleaseEvent -= HandleButtonReleaseEvent;
break;
case WidgetEvent.MouseMoved:
- EventsRootWidget.Events &= Gdk.EventMask.PointerMotionMask;
+ if (!EventsRootWidget.IsRealized)
+ EventsRootWidget.Events &= Gdk.EventMask.PointerMotionMask;
EventsRootWidget.MotionNotifyEvent -= HandleMotionNotifyEvent;
break;
case WidgetEvent.BoundsChanged:
Widget.SizeAllocated -= HandleWidgetBoundsChanged;
break;
case WidgetEvent.MouseScrolled:
- EventsRootWidget.Events &= ~Gdk.EventMask.ScrollMask;
+ if (!EventsRootWidget.IsRealized)
+ EventsRootWidget.Events &= ~Gdk.EventMask.ScrollMask;
Widget.ScrollEvent -= HandleScrollEvent;
break;
}
@@ -566,10 +615,10 @@ namespace Xwt.GtkBackend
EventsRootWidget.DragMotion -= HandleWidgetDragMotion;
EventsRootWidget.DragDataReceived -= HandleWidgetDragDataReceived;
}
- if ((ev & sizeCheckEvents) != 0) {
+ if ((ev & WidgetEvent.PreferredSizeCheck) != 0) {
DisableSizeCheckEvents ();
}
- if ((ev & WidgetEvent.GotFocus) == 0 && (enabledEvents & WidgetEvent.LostFocus) == 0) {
+ if ((ev & WidgetEvent.GotFocus) == 0 && (enabledEvents & WidgetEvent.LostFocus) == 0 && !EventsRootWidget.IsRealized) {
EventsRootWidget.Events &= ~Gdk.EventMask.FocusChangeMask;
}
}
@@ -577,10 +626,9 @@ namespace Xwt.GtkBackend
void DisableSizeCheckEvents ()
{
- if ((enabledEvents & sizeCheckEvents) == 0 && !minSizeSet) {
+ if ((enabledEvents & WidgetEvent.PreferredSizeCheck) == 0 && !minSizeSet) {
// All size request events have been disabled
Widget.SizeRequested -= HandleWidgetSizeRequested;
- Widget.SizeAllocated -= HandleWidgetSizeAllocated;;
}
}
@@ -589,126 +637,37 @@ namespace Xwt.GtkBackend
{
if (Widget.Allocation != lastAllocation) {
lastAllocation = Widget.Allocation;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnBoundsChanged ();
});
}
}
- enum SizeCheckStep
- {
- SizeRequest,
- PreAllocate,
- AdjustSize,
- FinalAllocate
- }
-
- SizeCheckStep sizeCheckStep = SizeCheckStep.SizeRequest;
- int realRequestedWidth;
- int realRequestedHeight;
bool gettingPreferredSize;
- static bool doubleSizeRequestCheckSupported = true;
-
- public bool IsPreallocating {
- get { return sizeCheckStep == SizeCheckStep.AdjustSize || sizeCheckStep == SizeCheckStep.PreAllocate; }
- }
void HandleWidgetSizeRequested (object o, Gtk.SizeRequestedArgs args)
{
- if (gettingPreferredSize)
- return;
-
var req = args.Requisition;
-
- if ((enabledEvents & sizeCheckEvents) == 0) {
- // If no sizing event is set, it means this handler was set because there is a min size.
- if (Frontend.MinWidth != -1)
- req.Width = (int) Frontend.MinWidth;
- if (Frontend.MinHeight != -1)
- req.Height = (int) Frontend.MinHeight;
- return;
- }
-
- if (sizeCheckStep == SizeCheckStep.AdjustSize) {
- req.Width = realRequestedWidth;
- req.Height = realRequestedHeight;
- sizeCheckStep = SizeCheckStep.FinalAllocate;
- }
- else {
- Toolkit.Invoke (delegate {
- if (EventSink.GetSizeRequestMode () == SizeRequestMode.HeightForWidth) {
- if ((enabledEvents & WidgetEvent.PreferredWidthCheck) != 0) {
- var w = eventSink.OnGetPreferredWidth ();
- req.Width = (int) w.MinSize;
- }
- if ((enabledEvents & WidgetEvent.PreferredHeightForWidthCheck) != 0) {
- if (doubleSizeRequestCheckSupported) {
- sizeCheckStep = SizeCheckStep.PreAllocate;
- realRequestedWidth = req.Width; // Store the width, since it will be used in the next iteration
- } else {
- var h = eventSink.OnGetPreferredHeightForWidth (req.Width);
- req.Height = (int) h.MinSize;
- sizeCheckStep = SizeCheckStep.FinalAllocate;
- }
- }
- else if ((enabledEvents & WidgetEvent.PreferredHeightCheck) != 0) {
- var h = eventSink.OnGetPreferredHeight ();
- req.Height = (int) h.MinSize;
- sizeCheckStep = SizeCheckStep.FinalAllocate;
- }
- } else {
- if ((enabledEvents & WidgetEvent.PreferredHeightCheck) != 0) {
- var h = eventSink.OnGetPreferredHeight ();
- req.Height = (int) h.MinSize;
- }
- if ((enabledEvents & WidgetEvent.PreferredWidthForHeightCheck) != 0) {
- if (doubleSizeRequestCheckSupported) {
- sizeCheckStep = SizeCheckStep.PreAllocate;
- realRequestedHeight = req.Height; // Store the height, since it will be used in the next iteration
- } else {
- var w = eventSink.OnGetPreferredWidthForHeight (req.Height);
- req.Width = (int) w.MinSize;
- sizeCheckStep = SizeCheckStep.FinalAllocate;
- }
- }
- else if ((enabledEvents & WidgetEvent.PreferredWidthCheck) != 0) {
- var w = eventSink.OnGetPreferredWidth ();
- req.Width = (int) w.MinSize;
- sizeCheckStep = SizeCheckStep.FinalAllocate;
- }
- }
+
+ if (!gettingPreferredSize && (enabledEvents & WidgetEvent.PreferredSizeCheck) != 0) {
+ SizeConstraint wc = SizeConstraint.Unconstrained, hc = SizeConstraint.Unconstrained;
+ var cp = Widget.Parent as IConstraintProvider;
+ if (cp != null)
+ cp.GetConstraints (Widget, out wc, out hc);
+
+ ApplicationContext.InvokeUserCode (delegate {
+ var w = eventSink.GetPreferredSize (wc, hc);
+ req.Width = (int) w.Width;
+ req.Height = (int) w.Height;
});
}
- args.Requisition = req;
- }
- void HandleWidgetSizeAllocated (object o, Gtk.SizeAllocatedArgs args)
- {
- if ((enabledEvents & sizeCheckEvents) == 0) {
- // If no sizing event is set, it means this handler was set because there is a min size.
- // In that case, there isn't any thing left to do here
- return;
- }
-
- Toolkit.Invoke (delegate {
- if (sizeCheckStep == SizeCheckStep.SizeRequest && (enabledEvents & sizeCheckEvents) != sizeCheckEvents) {
- var ev = EventSink.GetSizeRequestMode () == SizeRequestMode.HeightForWidth ? WidgetEvent.PreferredWidthCheck | WidgetEvent.PreferredHeightForWidthCheck : WidgetEvent.PreferredHeightCheck | WidgetEvent.PreferredWidthForHeightCheck;
- // If all size request methods are overriden, the widget's size request won't be called, so this status is correct
- if ((enabledEvents & ev) != ev)
- Console.WriteLine ("SizeRequest not called. Should not happen.");
- }
- else if (sizeCheckStep == SizeCheckStep.PreAllocate || sizeCheckStep == SizeCheckStep.AdjustSize) {
- if (EventSink.GetSizeRequestMode () == SizeRequestMode.HeightForWidth) {
- realRequestedHeight = (int) eventSink.OnGetPreferredHeightForWidth (args.Allocation.Width).MinSize;
- sizeCheckStep = SizeCheckStep.AdjustSize;
- Widget.QueueResize ();
- } else {
- realRequestedWidth = (int) eventSink.OnGetPreferredWidthForHeight (args.Allocation.Height).MinSize;
- sizeCheckStep = SizeCheckStep.AdjustSize;
- Widget.QueueResize ();
- }
- }
- });
+ if (Frontend.MinWidth != -1 && Frontend.MinWidth > req.Width)
+ req.Width = (int) Frontend.MinWidth;
+ if (Frontend.MinHeight != -1 && Frontend.MinHeight > req.Height)
+ req.Height = (int) Frontend.MinHeight;
+
+ args.Requisition = req;
}
[GLib.ConnectBefore]
@@ -723,7 +682,7 @@ namespace Xwt.GtkBackend
if ((args.Event.State & Gdk.ModifierType.Mod1Mask) != 0)
m |= ModifierKeys.Alt;
KeyEventArgs kargs = new KeyEventArgs (k, m, false, (long)args.Event.Time);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnKeyReleased (kargs);
});
if (kargs.Handled)
@@ -742,7 +701,7 @@ namespace Xwt.GtkBackend
if ((args.Event.State & Gdk.ModifierType.Mod1Mask) != 0)
m |= ModifierKeys.Alt;
KeyEventArgs kargs = new KeyEventArgs (k, m, false, (long)args.Event.Time);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnKeyPressed (kargs);
});
if (kargs.Handled)
@@ -756,7 +715,7 @@ namespace Xwt.GtkBackend
var direction = Util.ConvertScrollDirection(args.Event.Direction);
var a = new MouseScrolledEventArgs ((long) args.Event.Time, args.Event.XRoot - sc.X, args.Event.YRoot - sc.Y, direction);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnMouseScrolled(a);
});
if (a.Handled)
@@ -766,14 +725,16 @@ namespace Xwt.GtkBackend
void HandleWidgetFocusOutEvent (object o, Gtk.FocusOutEventArgs args)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnLostFocus ();
});
}
void HandleWidgetFocusInEvent (object o, EventArgs args)
{
- Toolkit.Invoke (delegate {
+ if (!CanGetFocus)
+ return;
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnGotFocus ();
});
}
@@ -782,7 +743,7 @@ namespace Xwt.GtkBackend
{
if (args.Event.Detail == Gdk.NotifyType.Inferior)
return;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnMouseExited ();
});
}
@@ -791,7 +752,7 @@ namespace Xwt.GtkBackend
{
if (args.Event.Detail == Gdk.NotifyType.Inferior)
return;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnMouseEntered ();
});
}
@@ -800,7 +761,7 @@ namespace Xwt.GtkBackend
{
var sc = ConvertToScreenCoordinates (new Point (0, 0));
var a = new MouseMovedEventArgs ((long) args.Event.Time, args.Event.XRoot - sc.X, args.Event.YRoot - sc.Y);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnMouseMoved (a);
});
if (a.Handled)
@@ -814,7 +775,7 @@ namespace Xwt.GtkBackend
a.X = args.Event.XRoot - sc.X;
a.Y = args.Event.YRoot - sc.Y;
a.Button = (PointerButton) args.Event.Button;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnButtonReleased (a);
});
if (a.Handled)
@@ -835,7 +796,7 @@ namespace Xwt.GtkBackend
a.MultiplePress = 3;
else
a.MultiplePress = 1;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnButtonPressed (a);
});
if (a.Handled)
@@ -869,7 +830,7 @@ namespace Xwt.GtkBackend
var target = Gtk.Drag.DestFindTarget (EventsRootWidget, context, null);
var targetTypes = Util.GetDragTypes (new Gdk.Atom[] { target });
DragOverCheckEventArgs da = new DragOverCheckEventArgs (new Point (x, y), targetTypes, cact);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnDragOverCheck (da);
});
ac = da.AllowedAction;
@@ -913,7 +874,7 @@ namespace Xwt.GtkBackend
}
else {
DragCheckEventArgs da = new DragCheckEventArgs (new Point (x, y), Util.GetDragTypes (context.Targets), cda);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnDragDropCheck (da);
});
res = da.Result;
@@ -937,7 +898,7 @@ namespace Xwt.GtkBackend
void HandleWidgetDragLeave (object o, Gtk.DragLeaveArgs args)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragLeave (EventArgs.Empty);
});
}
@@ -969,7 +930,7 @@ namespace Xwt.GtkBackend
DragDropInfo.DragDataRequests--;
- if (!Util.GetSelectionData (selectionData, DragDropInfo.DragData)) {
+ if (!Util.GetSelectionData (ApplicationContext, selectionData, DragDropInfo.DragData)) {
return false;
}
@@ -990,7 +951,7 @@ namespace Xwt.GtkBackend
}
DragOverEventArgs da = new DragOverEventArgs (DragDropInfo.LastDragPosition, DragDropInfo.DragData, cact);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnDragOver (da);
});
OnSetDragStatus (context, (int)DragDropInfo.LastDragPosition.X, (int)DragDropInfo.LastDragPosition.Y, time, ConvertDragAction (da.AllowedAction));
@@ -1000,7 +961,7 @@ namespace Xwt.GtkBackend
// Use Context.Action here since that's the action selected in DragOver
var cda = ConvertDragAction (context.Action);
DragEventArgs da = new DragEventArgs (DragDropInfo.LastDragPosition, DragDropInfo.DragData, cda);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnDragDrop (da);
});
Gtk.Drag.Finish (context, da.Success, cda == DragDropAction.Move, time);
@@ -1022,7 +983,7 @@ namespace Xwt.GtkBackend
return;
DragStartData sdata = null;
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
sdata = EventSink.OnDragStarted ();
});
@@ -1031,8 +992,11 @@ namespace Xwt.GtkBackend
DragDropInfo.CurrentDragData = sdata.Data;
- if (sdata.ImageBackend != null)
- Gtk.Drag.SetIconPixbuf (args.Context, (Gdk.Pixbuf) sdata.ImageBackend, (int)sdata.HotX, (int)sdata.HotY);
+ if (sdata.ImageBackend != null) {
+ var gi = (GtkImage)sdata.ImageBackend;
+ var img = gi.ToPixbuf (ApplicationContext, Widget);
+ Gtk.Drag.SetIconPixbuf (args.Context, img, (int)sdata.HotX, (int)sdata.HotY);
+ }
HandleDragBegin (null, args);
}
@@ -1066,9 +1030,11 @@ namespace Xwt.GtkBackend
Gdk.DragAction action = ConvertDragAction (sdata.DragAction);
DragDropInfo.CurrentDragData = sdata.Data;
EventsRootWidget.DragBegin += HandleDragBegin;
- if (sdata.ImageBackend != null)
- IconInitializer.Init (EventsRootWidget, (Gdk.Pixbuf) sdata.ImageBackend, sdata.HotX, sdata.HotY);
- Gtk.Drag.Begin (EventsRootWidget, Util.BuildTargetTable (sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent);
+ if (sdata.ImageBackend != null) {
+ var img = ((GtkImage)sdata.ImageBackend).ToPixbuf (ApplicationContext, Widget);
+ IconInitializer.Init (EventsRootWidget, img, sdata.HotX, sdata.HotY);
+ }
+ Gtk.Drag.Begin (EventsRootWidget, Util.BuildTargetTable (sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent ?? new Gdk.Event (IntPtr.Zero));
}
void HandleDragBegin (object o, Gtk.DragBeginArgs args)
@@ -1111,7 +1077,7 @@ namespace Xwt.GtkBackend
EventsRootWidget.DragFailed -= HandleDragFailed;
EventsRootWidget.DragDataDelete -= HandleDragDataDelete;
EventsRootWidget.DragBegin -= HandleDragBegin; // This event is subscribed only when manualy starting a drag
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragFinished (new DragFinishedEventArgs (delete));
});
}
@@ -1172,5 +1138,36 @@ namespace Xwt.GtkBackend
{
Gtk.Widget Widget { get; }
}
+
+ class WidgetPlacementWrapper: Gtk.Alignment, IConstraintProvider
+ {
+ public WidgetPlacementWrapper (): base (0, 0, 1, 1)
+ {
+ }
+
+ public void UpdatePlacement (Xwt.Widget widget)
+ {
+ LeftPadding = (uint)widget.MarginLeft;
+ RightPadding = (uint)widget.MarginRight;
+ TopPadding = (uint)widget.MarginTop;
+ BottomPadding = (uint)widget.MarginBottom;
+ Xalign = (float) widget.HorizontalPlacement.GetValue ();
+ Yalign = (float) widget.VerticalPlacement.GetValue ();
+ Xscale = (widget.HorizontalPlacement == WidgetPlacement.Fill) ? 1 : 0;
+ Yscale = (widget.VerticalPlacement == WidgetPlacement.Fill) ? 1 : 0;
+ }
+
+ #region IConstraintProvider implementation
+
+ public void GetConstraints (Gtk.Widget target, out SizeConstraint width, out SizeConstraint height)
+ {
+ if (Parent is IConstraintProvider)
+ ((IConstraintProvider)Parent).GetConstraints (this, out width, out height);
+ else
+ width = height = SizeConstraint.Unconstrained;
+ }
+
+ #endregion
+ }
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowBackend.cs
index 9c9991d..cf8e145 100755
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowBackend.cs
@@ -30,7 +30,7 @@ using Xwt.Backends;
namespace Xwt.GtkBackend
{
- public class WindowBackend: WindowFrameBackend, IWindowBackend
+ public class WindowBackend: WindowFrameBackend, IWindowBackend, IConstraintProvider
{
Gtk.Alignment alignment;
Gtk.MenuBar mainMenu;
@@ -46,7 +46,7 @@ namespace Xwt.GtkBackend
{
mainBox = new Gtk.VBox ();
mainBox.Show ();
- alignment = new Gtk.Alignment (0, 0, 1, 1);
+ alignment = new RootWindowAlignment (this);
mainBox.PackStart (alignment, true, true, 0);
alignment.Show ();
return mainBox;
@@ -56,22 +56,32 @@ namespace Xwt.GtkBackend
get { return mainBox; }
}
- public override Size ImplicitMinSize {
- get {
- var req = Window.Child == null ? new Gtk.Requisition () : Window.Child.SizeRequest ();
- var creq = mainBox.SizeRequest ();
- return new Size (req.Width - creq.Width, req.Height - creq.Height);
+ public override void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ if (mainMenu != null) {
+ var ms = mainMenu.SizeRequest ();
+ minSize = new Size (ms.Width, 0);
+ decorationSize = new Size (0, ms.Height);
+ }
+ else {
+ minSize = decorationSize = Size.Zero;
}
}
public void SetChild (IWidgetBackend child)
{
- var w = (IGtkWidgetBackend) child;
- if (alignment.Child != null)
+ if (alignment.Child != null) {
+ WidgetBackend.RemoveChildPlacement (alignment.Child);
alignment.Remove (alignment.Child);
- alignment.Child = w.Widget;
+ }
+ alignment.Child = WidgetBackend.GetWidgetWithPlacement (child);
}
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ WidgetBackend.SetChildPlacement (childBackend);
+ }
+
public void SetMainMenu (IMenuBackend menu)
{
if (mainMenu != null)
@@ -98,6 +108,34 @@ namespace Xwt.GtkBackend
{
// Not required
}
+
+ public override void SetSize (double width, double height)
+ {
+ base.SetSize (width, height);
+ if (alignment.Child != null)
+ alignment.Child.QueueResize ();
+ }
+
+ public void GetConstraints (Gtk.Widget target, out SizeConstraint width, out SizeConstraint height)
+ {
+ width = RequestedSize.Width;
+ height = RequestedSize.Height;
+ }
+ }
+
+ class RootWindowAlignment: Gtk.Alignment, IConstraintProvider
+ {
+ WindowBackend backend;
+
+ public RootWindowAlignment (WindowBackend backend): base (0, 0, 1, 1)
+ {
+ this.backend = backend;
+ }
+
+ public void GetConstraints (Gtk.Widget target, out SizeConstraint width, out SizeConstraint height)
+ {
+ backend.GetConstraints (this, out width, out height);
+ }
}
}
diff --git a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs
index 5e7fcb8..ceac6ff 100644
--- a/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs
+++ b/external/xwt/Xwt.Gtk/Xwt.GtkBackend/WindowFrameBackend.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using Xwt.Drawing;
namespace Xwt.GtkBackend
@@ -36,7 +36,6 @@ namespace Xwt.GtkBackend
IWindowFrameEventSink eventSink;
WindowFrame frontend;
Size requestedSize;
- bool positionSet;
public WindowFrameBackend ()
{
@@ -44,16 +43,33 @@ namespace Xwt.GtkBackend
public Gtk.Window Window {
get { return window; }
- set { window = value; }
+ set {
+ if (window != null)
+ window.Realized -= HandleRealized;
+ window = value;
+ window.Realized += HandleRealized;
+ }
+ }
+
+ void HandleRealized (object sender, EventArgs e)
+ {
+ if (opacity != 1d)
+ window.GdkWindow.Opacity = opacity;
}
protected WindowFrame Frontend {
get { return frontend; }
}
- void IBackend.InitializeBackend (object frontend)
+ public ApplicationContext ApplicationContext {
+ get;
+ private set;
+ }
+
+ void IBackend.InitializeBackend (object frontend, ApplicationContext context)
{
this.frontend = (WindowFrame) frontend;
+ ApplicationContext = context;
}
public virtual void ReplaceChild (Gtk.Widget oldWidget, Gtk.Widget newWidget)
@@ -93,58 +109,68 @@ namespace Xwt.GtkBackend
public void Move (double x, double y)
{
- positionSet = true;
Window.Move ((int)x, (int)y);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnBoundsChanged (Bounds);
});
}
- public void Resize (double width, double height)
+ public virtual void SetSize (double width, double height)
{
+ Window.SetDefaultSize ((int)width, (int)height);
+ if (width == -1)
+ width = Bounds.Width;
+ if (height == -1)
+ height = Bounds.Height;
requestedSize = new Size (width, height);
Window.Resize ((int)width, (int)height);
- Window.SetDefaultSize ((int)width, (int)height);
}
public Rectangle Bounds {
get {
int w, h, x, y;
- Window.GetPosition (out x, out y);
- Window.GetSize (out w, out h);
+ if (Window.GdkWindow != null) {
+ Window.GdkWindow.GetOrigin (out x, out y);
+ Window.GdkWindow.GetSize (out w, out h);
+ } else {
+ Window.GetPosition (out x, out y);
+ Window.GetSize (out w, out h);
+ }
return new Rectangle (x, y, w, h);
}
set {
- positionSet = true;
requestedSize = value.Size;
Window.Move ((int)value.X, (int)value.Y);
Window.Resize ((int)value.Width, (int)value.Height);
Window.SetDefaultSize ((int)value.Width, (int)value.Height);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnBoundsChanged (Bounds);
});
}
}
+ public Size RequestedSize {
+ get { return requestedSize; }
+ }
+
bool IWindowFrameBackend.Visible {
get {
return window.Visible;
}
set {
- if (value)
- SetDefaultPosition ();
window.Visible = value;
}
}
- protected void SetDefaultPosition ()
- {
- if (!positionSet) {
- if (window.TransientFor != null)
- window.SetPosition (Gtk.WindowPosition.CenterOnParent);
- else
- window.SetPosition (Gtk.WindowPosition.Center);
- positionSet = true;
+ double opacity = 1d;
+ double IWindowFrameBackend.Opacity {
+ get {
+ return opacity;
+ }
+ set {
+ opacity = value;
+ if (Window.GdkWindow != null)
+ Window.GdkWindow.Opacity = value;
}
}
@@ -185,9 +211,31 @@ namespace Xwt.GtkBackend
}
}
- public void SetIcon(object backendImage)
+ bool fullScreen;
+ bool IWindowFrameBackend.FullScreen {
+ get {
+ return fullScreen;
+ }
+ set {
+ if (value != fullScreen) {
+ fullScreen = value;
+ if (fullScreen)
+ Window.Fullscreen ();
+ else
+ Window.Unfullscreen ();
+ }
+ }
+ }
+
+ object IWindowFrameBackend.Screen {
+ get {
+ return Window.Screen.GetMonitorAtWindow (Window.GdkWindow);
+ }
+ }
+
+ public void SetIcon(ImageDescription icon)
{
- Window.Icon = backendImage as Gdk.Pixbuf;
+ // TODO
}
#endregion
@@ -196,9 +244,14 @@ namespace Xwt.GtkBackend
if (ev is WindowFrameEvent) {
switch ((WindowFrameEvent)ev) {
case WindowFrameEvent.BoundsChanged:
- Window.SizeAllocated += HandleWidgetSizeAllocated; break;
+ Window.AddEvents ((int)Gdk.EventMask.StructureMask);
+ Window.ConfigureEvent += HandleConfigureEvent; break;
case WindowFrameEvent.CloseRequested:
Window.DeleteEvent += HandleCloseRequested; break;
+ case WindowFrameEvent.Shown:
+ Window.Shown += HandleShown; break;
+ case WindowFrameEvent.Hidden:
+ Window.Hidden += HandleHidden; break;
}
}
}
@@ -208,23 +261,42 @@ namespace Xwt.GtkBackend
if (ev is WindowFrameEvent) {
switch ((WindowFrameEvent)ev) {
case WindowFrameEvent.BoundsChanged:
- Window.SizeAllocated -= HandleWidgetSizeAllocated; break;
+ Window.ConfigureEvent -= HandleConfigureEvent; break;
case WindowFrameEvent.CloseRequested:
Window.DeleteEvent -= HandleCloseRequested; break;
+ case WindowFrameEvent.Shown:
+ Window.Shown -= HandleShown; break;
+ case WindowFrameEvent.Hidden:
+ Window.Hidden -= HandleHidden; break;
}
}
}
+
+ void HandleHidden (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnHidden ();
+ });
+ }
- void HandleWidgetSizeAllocated (object o, Gtk.SizeAllocatedArgs args)
+ void HandleShown (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnShown ();
+ });
+ }
+
+ [GLib.ConnectBefore]
+ void HandleConfigureEvent (object o, Gtk.ConfigureEventArgs args)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnBoundsChanged (Bounds);
});
}
void HandleCloseRequested (object o, Gtk.DeleteEventArgs args)
{
- Toolkit.Invoke(delegate {
+ ApplicationContext.InvokeUserCode(delegate {
args.RetVal = EventSink.OnCloseRequested ();
});
}
@@ -236,8 +308,9 @@ namespace Xwt.GtkBackend
Window.Present ();
}
- public virtual Size ImplicitMinSize {
- get { return new Size (0,0); }
+ public virtual void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ minSize = decorationSize = Size.Zero;
}
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CanvasTableCell.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CanvasTableCell.cs
new file mode 100644
index 0000000..175fd4b
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CanvasTableCell.cs
@@ -0,0 +1,95 @@
+//
+// CanvasTableCell.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoMac.AppKit;
+using System.Drawing;
+using MonoMac.CoreGraphics;
+using Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ class CanvasTableCell: NSCell, ICellRenderer
+ {
+ ICanvasCellViewFrontend cellView;
+
+ public CanvasTableCell (IntPtr p): base (p)
+ {
+ }
+
+ public CanvasTableCell ()
+ {
+ }
+
+ public CanvasTableCell (ICanvasCellViewFrontend cellView)
+ {
+ this.cellView = cellView;
+ }
+
+ public CompositeCell CellContainer { get; set; }
+
+ public void CopyFrom (object other)
+ {
+ var ob = (CanvasTableCell)other;
+ cellView = ob.cellView;
+ }
+
+ public void Fill ()
+ {
+ }
+
+ public ICellViewFrontend Frontend {
+ get { return cellView; }
+ }
+
+ public override SizeF CellSizeForBounds (RectangleF bounds)
+ {
+ var size = new SizeF ();
+ cellView.ApplicationContext.InvokeUserCode (delegate {
+ var s = cellView.GetRequiredSize ();
+ size = new SizeF ((float)s.Width, (float)s.Height);
+ });
+ if (size.Width > bounds.Width)
+ size.Width = bounds.Width;
+ if (size.Height > bounds.Height)
+ size.Height = bounds.Height;
+ return size;
+ }
+
+ public override void DrawInteriorWithFrame (RectangleF cellFrame, NSView inView)
+ {
+ CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;
+
+ var backend = new CGContextBackend {
+ Context = ctx,
+ InverseViewTransform = ctx.GetCTM ().Invert ()
+ };
+ cellView.ApplicationContext.InvokeUserCode (delegate {
+ cellView.Draw (backend, new Rectangle (cellFrame.X, cellFrame.Y, cellFrame.Width, cellFrame.Height));
+ });
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CellUtil.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CellUtil.cs
index b11ffff..e5a24c3 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CellUtil.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CellUtil.cs
@@ -36,21 +36,22 @@ namespace Xwt.Mac
{
public static NSCell CreateCell (ICellSource source, ICollection<CellView> cells)
{
-// if (cells.Count > 1) {
- CompositeCell c = new CompositeCell (Orientation.Horizontal, source);
- foreach (var cell in cells)
- c.AddCell ((ICellRenderer) CreateCell (source, cell));
- return c;
-// } else
-// return CreateCell (source, cells.First ());
+ CompositeCell c = new CompositeCell (Orientation.Horizontal, source);
+ foreach (var cell in cells)
+ c.AddCell ((ICellRenderer) CreateCell (c, cell));
+ return c;
}
- public static NSCell CreateCell (ICellSource source, CellView cell)
+ static NSCell CreateCell (CompositeCell source, CellView cell)
{
- if (cell is TextCellView)
- return new TextTableCell ((TextCellView) cell);
- if (cell is ImageCellView)
- return new ImageTableCell ((ImageCellView) cell);
+ if (cell is ITextCellViewFrontend)
+ return new TextTableCell ((ITextCellViewFrontend) cell);
+ if (cell is IImageCellViewFrontend)
+ return new ImageTableCell ((IImageCellViewFrontend) cell);
+ if (cell is ICanvasCellViewFrontend)
+ return new CanvasTableCell ((ICanvasCellViewFrontend) cell);
+ if (cell is ICheckBoxCellViewFrontend)
+ return new CheckBoxTableCell ((ICheckBoxCellViewFrontend) cell);
throw new NotImplementedException ();
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CheckBoxTableCell.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CheckBoxTableCell.cs
new file mode 100644
index 0000000..2d08c53
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CheckBoxTableCell.cs
@@ -0,0 +1,108 @@
+//
+// CheckBoxTableCell.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoMac.AppKit;
+using Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ class CheckBoxTableCell: NSButtonCell, ICellRenderer
+ {
+ ICheckBoxCellViewFrontend cellView;
+
+ public CheckBoxTableCell ()
+ {
+ SetButtonType (NSButtonType.Switch);
+ Activated += HandleActivated;
+ Title = "";
+ }
+
+ void HandleActivated (object sender, EventArgs e)
+ {
+ if (cellView.Editable && !cellView.RaiseToggled () && cellView.ActiveField != null) {
+ CellContainer.SetValue (cellView.ActiveField, State != NSCellStateValue.Off);
+ }
+ }
+
+ public CheckBoxTableCell (IntPtr p): base (p)
+ {
+ }
+
+ public CheckBoxTableCell (ICheckBoxCellViewFrontend cellView): this ()
+ {
+ this.cellView = cellView;
+ }
+
+ public ICellViewFrontend Frontend {
+ get { return cellView; }
+ }
+
+ public CompositeCell CellContainer { get; set; }
+
+ public void Fill ()
+ {
+ State = cellView.Active ? NSCellStateValue.On : NSCellStateValue.Off;
+ Editable = cellView.Editable;
+ }
+
+ public void CopyFrom (object other)
+ {
+ var ob = (CheckBoxTableCell)other;
+ cellView = ob.cellView;
+ }
+
+ public override void EditWithFrame (System.Drawing.RectangleF aRect, NSView inView, NSText editor, MonoMac.Foundation.NSObject delegateObject, NSEvent theEvent)
+ {
+ base.EditWithFrame (aRect, inView, editor, delegateObject, theEvent);
+ }
+
+ public override void DidChangeValue (string forKey)
+ {
+ base.DidChangeValue (forKey);
+ }
+
+ public override void WillChange (MonoMac.Foundation.NSString forKey, MonoMac.Foundation.NSKeyValueSetMutationKind mutationKind, MonoMac.Foundation.NSSet objects)
+ {
+ base.WillChange (forKey, mutationKind, objects);
+ }
+
+ public override void WillChangeValue (string forKey)
+ {
+ base.WillChangeValue (forKey);
+ }
+
+ public override void EndEditing (NSText textObj)
+ {
+ base.EndEditing (textObj);
+ }
+
+ public override bool CommitEditing ()
+ {
+ return base.CommitEditing ();
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CompositeCell.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CompositeCell.cs
index ff4c9c1..045c1da 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CompositeCell.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/CompositeCell.cs
@@ -31,16 +31,24 @@ using MonoMac.Foundation;
using Xwt.Backends;
using System.Collections.Generic;
using System.Drawing;
+using System.Linq;
namespace Xwt.Mac
{
- class CompositeCell: NSCell
+ class CompositeCell: NSCell, ICopiableObject, ICellDataSource
{
ICellSource source;
NSObject val;
List<ICellRenderer> cells = new List<ICellRenderer> ();
Orientation direction;
-
+ NSCell trackingCell;
+ ITablePosition tablePosition;
+
+ static CompositeCell ()
+ {
+ Util.MakeCopiable<CompositeCell> ();
+ }
+
public CompositeCell (Orientation dir, ICellSource source)
{
direction = dir;
@@ -50,6 +58,38 @@ namespace Xwt.Mac
public CompositeCell (IntPtr p): base (p)
{
}
+
+ #region ICellDataSource implementation
+
+ object ICellDataSource.GetValue (IDataField field)
+ {
+ return source.GetValue (tablePosition.Position, field.Index);
+ }
+
+ #endregion
+
+ public void SetValue (IDataField field, object value)
+ {
+ source.SetValue (tablePosition.Position, field.Index, value);
+ }
+
+ void ICopiableObject.CopyFrom (object other)
+ {
+ var ob = (CompositeCell)other;
+ source = ob.source;
+ val = ob.val;
+ tablePosition = ob.tablePosition;
+ direction = ob.direction;
+ trackingCell = ob.trackingCell;
+ cells = new List<ICellRenderer> ();
+ foreach (var c in ob.cells) {
+ var copy = (ICellRenderer) Activator.CreateInstance (c.GetType ());
+ copy.CopyFrom (c);
+ AddCell (copy);
+ }
+ if (tablePosition != null)
+ Fill ();
+ }
public override NSObject ObjectValue {
get {
@@ -57,60 +97,76 @@ namespace Xwt.Mac
}
set {
val = value;
- if (val is ITablePosition)
- Fill (((ITablePosition)val).Position);
+ if (val is ITablePosition) {
+ tablePosition = (ITablePosition) val;
+ Fill ();
+ }
+ else if (val is NSNumber) {
+ tablePosition = new TableRow () {
+ Row = ((NSNumber)val).Int32Value
+ };
+ Fill ();
+ } else
+ tablePosition = null;
+ }
+ }
+
+ public override bool IsOpaque {
+ get {
+ var b = base.IsOpaque;
+ return true;
}
}
public void AddCell (ICellRenderer cell)
{
+ cell.CellContainer = this;
cells.Add (cell);
}
- public void Fill (object pos)
+ public void Fill ()
{
- if (source == null || pos == null)
- return;
+ foreach (var c in cells) {
+ c.Frontend.Initialize (this);
+ c.Fill ();
+ }
+
var s = CellSize;
if (s.Height > source.RowHeight)
source.RowHeight = s.Height;
- foreach (var c in cells)
- c.Fill (source, pos);
}
public override void CalcDrawInfo (RectangleF aRect)
{
base.CalcDrawInfo (aRect);
}
-
- public override SizeF CellSizeForBounds (RectangleF bounds)
- {
- return base.CellSizeForBounds (bounds);
+
+ IEnumerable<ICellRenderer> VisibleCells {
+ get { return cells.Where (c => c.Frontend.Visible); }
}
-
- public override SizeF CellSize {
- get {
- float w = 0;
- float h = 0;
- foreach (NSCell c in cells) {
- var s = c.CellSize;
- if (direction == Orientation.Horizontal) {
- w += s.Width;
- if (s.Height > h)
- h = s.Height;
- } else {
- h += s.Height;
- if (s.Width > w)
- w = s.Width;
- }
+
+ SizeF CalcSize ()
+ {
+ float w = 0;
+ float h = 0;
+ foreach (NSCell c in VisibleCells) {
+ var s = c.CellSize;
+ if (direction == Orientation.Horizontal) {
+ w += s.Width;
+ if (s.Height > h)
+ h = s.Height;
+ } else {
+ h += s.Height;
+ if (s.Width > w)
+ w = s.Width;
}
- return new SizeF (w, h);
}
+ return new SizeF (w, h);
}
-
- public override RectangleF DrawingRectForBounds (RectangleF theRect)
+
+ public override SizeF CellSizeForBounds (RectangleF bounds)
{
- return base.DrawingRectForBounds (theRect);
+ return CalcSize ();
}
public override NSCellStateValue State {
@@ -135,11 +191,10 @@ namespace Xwt.Mac
}
}
- public override void DrawWithFrame (RectangleF cellFrame, NSView inView)
+ public override void DrawInteriorWithFrame (RectangleF cellFrame, NSView inView)
{
- foreach (CellPos cp in GetCells(cellFrame)) {
- cp.Cell.DrawWithFrame (cp.Frame, inView);
- }
+ foreach (CellPos cp in GetCells(cellFrame))
+ cp.Cell.DrawInteriorWithFrame (cp.Frame, inView);
}
public override void Highlight (bool flag, RectangleF withFrame, NSView inView)
@@ -158,61 +213,49 @@ namespace Xwt.Mac
}
return NSCellHit.None;
}
-
- NSCell trackingCell;
-
- public override bool StartTracking (PointF startPoint, NSView inView)
+
+ public override bool TrackMouse (NSEvent theEvent, RectangleF cellFrame, NSView controlView, bool untilMouseUp)
{
- foreach (NSCell c in cells) {
- if (c.StartTracking (startPoint, inView)) {
- trackingCell = c;
- return true;
- }
- }
- return false;
+ var c = GetHitCell (theEvent, cellFrame, controlView);
+ if (c != null)
+ return c.Cell.TrackMouse (theEvent, c.Frame, controlView, untilMouseUp);
+ else
+ return base.TrackMouse (theEvent, cellFrame, controlView, untilMouseUp);
}
-
- public override void StopTracking (PointF lastPoint, PointF stopPoint, NSView inView, bool mouseIsUp)
+
+ CellPos GetHitCell (NSEvent theEvent, RectangleF cellFrame, NSView controlView)
{
- if (trackingCell != null) {
- try {
- trackingCell.StopTracking (lastPoint, stopPoint, inView, mouseIsUp);
- } finally {
- trackingCell = null;
- }
+ foreach (CellPos cp in GetCells(cellFrame)) {
+ var h = cp.Cell.HitTest (theEvent, cp.Frame, controlView);
+ if (h != NSCellHit.None)
+ return cp;
}
- }
-
- public override bool ContinueTracking (PointF lastPoint, PointF currentPoint, NSView inView)
- {
- if (trackingCell != null)
- return trackingCell.ContinueTracking (lastPoint, currentPoint, inView);
- else
- return false;
+ return null;
}
IEnumerable<CellPos> GetCells (RectangleF cellFrame)
{
if (direction == Orientation.Horizontal) {
- float x = cellFrame.X;
- foreach (NSCell c in cells) {
+ foreach (NSCell c in VisibleCells) {
var s = c.CellSize;
- RectangleF f = new RectangleF (x, cellFrame.Y, s.Width, s.Height);
- x += s.Width;
+ var w = Math.Min (cellFrame.Width, s.Width);
+ RectangleF f = new RectangleF (cellFrame.X, cellFrame.Y, w, cellFrame.Height);
+ cellFrame.X += w;
+ cellFrame.Width -= w;
yield return new CellPos () { Cell = c, Frame = f };
}
} else {
float y = cellFrame.Y;
- foreach (NSCell c in cells) {
+ foreach (NSCell c in VisibleCells) {
var s = c.CellSize;
- RectangleF f = new RectangleF (cellFrame.X, y, s.Width, s.Height);
+ RectangleF f = new RectangleF (cellFrame.X, y, s.Width, cellFrame.Height);
y += s.Height;
yield return new CellPos () { Cell = c, Frame = f };
}
}
}
- struct CellPos
+ class CellPos
{
public NSCell Cell;
public RectangleF Frame;
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellRenderer.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellRenderer.cs
index a7ddcac..8eda33d 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellRenderer.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellRenderer.cs
@@ -33,9 +33,11 @@ using System.Collections.Generic;
namespace Xwt.Mac
{
- interface ICellRenderer
+ interface ICellRenderer: ICopiableObject
{
- void Fill (ICellSource source, object pos);
+ ICellViewFrontend Frontend { get; }
+ CompositeCell CellContainer { get; set; }
+ void Fill ();
}
interface ITablePosition
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellSource.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellSource.cs
index b872d27..0821a27 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellSource.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ICellSource.cs
@@ -36,6 +36,7 @@ namespace Xwt.Mac
interface ICellSource
{
object GetValue (object pos, int nField);
+ void SetValue (object pos, int nField, object value);
float RowHeight { get; set; }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ImageTableCell.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ImageTableCell.cs
index 02f1329..2009b75 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ImageTableCell.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/ImageTableCell.cs
@@ -26,7 +26,7 @@
using System;
using MonoMac.AppKit;
-using Xwt.Engine;
+
using Xwt.Drawing;
using Xwt.Backends;
@@ -34,22 +34,26 @@ namespace Xwt.Mac
{
class ImageTableCell: NSImageCell, ICellRenderer
{
- ImageCellView cellView;
+ IImageCellViewFrontend cellView;
+
+ public ImageTableCell ()
+ {
+ }
public ImageTableCell (IntPtr p): base (p)
{
}
- public ImageTableCell (ImageCellView cellView)
+ public ImageTableCell (IImageCellViewFrontend cellView)
{
this.cellView = cellView;
}
- public void Fill (ICellSource source, object pos)
+ public CompositeCell CellContainer { get; set; }
+
+ public void Fill ()
{
- Image img = (Image) source.GetValue (pos, cellView.ImageField.Index);
- if (img != null)
- ObjectValue = (NSImage) WidgetRegistry.GetBackend (img);
+ ObjectValue = cellView.Image.ToImageDescription ().ToNSImage ();
}
public override System.Drawing.SizeF CellSize {
@@ -61,6 +65,16 @@ namespace Xwt.Mac
return base.CellSize;
}
}
+
+ public ICellViewFrontend Frontend {
+ get { return cellView; }
+ }
+
+ public void CopyFrom (object other)
+ {
+ var ob = (ImageTableCell)other;
+ cellView = ob.cellView;
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/TextTableCell.cs b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/TextTableCell.cs
index aa2c092..5292c50 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/TextTableCell.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.CellViews/TextTableCell.cs
@@ -35,20 +35,39 @@ namespace Xwt.Mac
{
class TextTableCell: NSTextFieldCell, ICellRenderer
{
- TextCellView cellView;
+ ITextCellViewFrontend cellView;
+
+ public TextTableCell ()
+ {
+ }
public TextTableCell (IntPtr p): base (p)
{
}
- public TextTableCell (TextCellView cellView)
+ public TextTableCell (ITextCellViewFrontend cellView)
{
this.cellView = cellView;
}
- public void Fill (ICellSource source, object pos)
+ public CompositeCell CellContainer { get; set; }
+
+ public void Fill ()
+ {
+ if (cellView.Markup != null)
+ AttributedStringValue = FormattedText.FromMarkup (cellView.Markup).ToAttributedString ();
+ else
+ StringValue = cellView.Text ?? "";
+ }
+
+ public ICellViewFrontend Frontend {
+ get { return cellView; }
+ }
+
+ public void CopyFrom (object other)
{
- StringValue = (string) source.GetValue (pos, cellView.TextField.Index) ?? "";
+ var ob = (TextTableCell)other;
+ cellView = ob.cellView;
}
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac.csproj b/external/xwt/Xwt.Mac/Xwt.Mac.csproj
index c34b77c..f9b418a 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac.csproj
+++ b/external/xwt/Xwt.Mac/Xwt.Mac.csproj
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
+ <ReferencePath>../../monomac/src/</ReferencePath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}</ProjectGuid>
- <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>Xwt.Mac</RootNamespace>
<AssemblyName>Xwt.Mac</AssemblyName>
@@ -26,6 +26,7 @@
<EnablePackageSigning>False</EnablePackageSigning>
<IncludeMonoRuntime>False</IncludeMonoRuntime>
<UseSGen>False</UseSGen>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -39,6 +40,7 @@
<EnablePackageSigning>False</EnablePackageSigning>
<IncludeMonoRuntime>False</IncludeMonoRuntime>
<UseSGen>False</UseSGen>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -48,7 +50,6 @@
<Reference Include="System.Drawing" />
<Reference Include="MonoMac">
</Reference>
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -106,9 +107,23 @@
<Compile Include="Xwt.Mac\FileDialogBackend.cs" />
<Compile Include="Xwt.Mac\SelectFolderDialogBackend.cs" />
<Compile Include="Xwt.Mac\OpenFileDialogBackend.cs" />
+ <Compile Include="Xwt.Mac\MacClipboardBackend.cs" />
+ <Compile Include="Xwt.Mac\PathBackendHandler.cs" />
+ <Compile Include="Xwt.Mac\CustomWidgetBackend.cs" />
+ <Compile Include="Xwt.Mac\MacDesktopBackend.cs" />
+ <Compile Include="Xwt.Mac\MenuButtonBackend.cs" />
+ <Compile Include="Xwt.Mac.CellViews\CanvasTableCell.cs" />
+ <Compile Include="Xwt.Mac\ListBoxBackend.cs" />
+ <Compile Include="Xwt.Mac\DialogBackend.cs" />
+ <Compile Include="Xwt.Mac\MacSystemInformation.cs" />
+ <Compile Include="Xwt.Mac\RichTextViewBackend.cs" />
+ <Compile Include="Xwt.Mac\RadioButtonBackend.cs" />
+ <Compile Include="Xwt.Mac\ScrollbarBackend.cs" />
+ <Compile Include="Xwt.Mac\DatePickerBackend.cs" />
+ <Compile Include="Xwt.Mac\SliderBackend.cs" />
+ <Compile Include="Xwt.Mac.CellViews\CheckBoxTableCell.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
<ItemGroup>
<ProjectReference Include="..\Xwt\Xwt.csproj">
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
@@ -120,14 +135,6 @@
<Folder Include="Xwt.Mac.CellViews\" />
<Folder Include="icons\" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="icons\magnifier-zoom-in.png">
- <LogicalName>magnifier-zoom-in.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\magnifier-zoom-out.png">
- <LogicalName>magnifier-zoom-out.png</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
@@ -137,4 +144,18 @@
</Properties>
</MonoDevelop>
</ProjectExtensions>
+ <ItemGroup>
+ <EmbeddedResource Include="icons\zoom-in.png">
+ <LogicalName>zoom-in.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\zoom-in%402x.png">
+ <LogicalName>zoom-in at 2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\zoom-out.png">
+ <LogicalName>zoom-out.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\zoom-out%402x.png">
+ <LogicalName>zoom-out at 2x.png</LogicalName>
+ </EmbeddedResource>
+ </ItemGroup>
</Project>
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/AlertDialogBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/AlertDialogBackend.cs
index 68fec55..327bfc9 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/AlertDialogBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/AlertDialogBackend.cs
@@ -41,7 +41,11 @@ namespace Xwt.Mac
public AlertDialogBackend (System.IntPtr intptr)
{
}
-
+
+ public void Initialize (ApplicationContext actx)
+ {
+ }
+
#region IAlertDialogBackend implementation
public Command Run (WindowFrame transientFor, MessageDescription message)
{
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/BoxBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/BoxBackend.cs
index 821400c..0925b52 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/BoxBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/BoxBackend.cs
@@ -35,13 +35,17 @@ namespace Xwt.Mac
{
public BoxBackend ()
{
- ViewObject = new BoxView ();
+ }
+
+ public override void Initialize ()
+ {
+ ViewObject = new WidgetView (EventSink, ApplicationContext);
}
public void Add (IWidgetBackend widget)
{
- IMacViewBackend b = (IMacViewBackend) widget;
- Widget.AddSubview (b.View);
+ ViewBackend b = (ViewBackend) widget;
+ Widget.AddSubview (b.Widget);
}
public void Remove (IWidgetBackend widget)
@@ -62,19 +66,5 @@ namespace Xwt.Mac
}
}
}
-
- class BoxView: NSView, IViewObject
- {
- public Widget Frontend { get; set; }
- public NSView View {
- get { return this; }
- }
-
- public override bool IsFlipped {
- get {
- return true;
- }
- }
- }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ButtonBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ButtonBackend.cs
index 254a98e..33dee7d 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ButtonBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ButtonBackend.cs
@@ -28,8 +28,9 @@ using System;
using Xwt.Backends;
using MonoMac.AppKit;
using MonoMac.Foundation;
-using Xwt.Engine;
+
using MonoMac.ObjCRuntime;
+using Xwt.Drawing;
namespace Xwt.Mac
{
@@ -42,8 +43,7 @@ namespace Xwt.Mac
#region IButtonBackend implementation
public override void Initialize ()
{
- ViewObject = new MacButton (EventSink);
- Widget.SizeToFit ();
+ ViewObject = new MacButton (EventSink, ApplicationContext);
}
public void EnableEvent (Xwt.Backends.ButtonEvent ev)
@@ -56,34 +56,37 @@ namespace Xwt.Mac
((MacButton)Widget).DisableEvent (ev);
}
- public void SetContent (string label, object imageBackend, ContentPosition imagePosition)
+ public void SetContent (string label, ImageDescription image, ContentPosition imagePosition)
{
Widget.Title = label ?? "";
if (string.IsNullOrEmpty (label))
imagePosition = ContentPosition.Center;
- if (imageBackend != null) {
- Widget.Image = (NSImage)imageBackend;
+ if (!image.IsNull) {
+ var img = image.ToNSImage ();
+ Widget.Image = (NSImage)img;
+ Widget.Cell.ImageScale = NSImageScale.None;
switch (imagePosition) {
case ContentPosition.Bottom: Widget.ImagePosition = NSCellImagePosition.ImageBelow; break;
case ContentPosition.Left: Widget.ImagePosition = NSCellImagePosition.ImageLeft; break;
case ContentPosition.Right: Widget.ImagePosition = NSCellImagePosition.ImageRight; break;
case ContentPosition.Top: Widget.ImagePosition = NSCellImagePosition.ImageAbove; break;
- case ContentPosition.Center: Widget.ImagePosition = NSCellImagePosition.ImageOverlaps; break;
+ case ContentPosition.Center: Widget.ImagePosition = string.IsNullOrEmpty (label) ? NSCellImagePosition.ImageOnly : NSCellImagePosition.ImageOverlaps; break;
}
}
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
public void SetButtonStyle (ButtonStyle style)
{
switch (style) {
case ButtonStyle.Normal:
- Widget.BezelStyle = NSBezelStyle.RoundRect;
+ Widget.BezelStyle = NSBezelStyle.Rounded;
Widget.SetButtonType (NSButtonType.MomentaryPushIn);
Messaging.void_objc_msgSend_bool (Widget.Handle, selSetShowsBorderOnlyWhileMouseInside.Handle, false);
break;
+ case ButtonStyle.Borderless:
case ButtonStyle.Flat:
- Widget.BezelStyle = NSBezelStyle.RoundRect;
+ Widget.BezelStyle = NSBezelStyle.Rounded;
Messaging.void_objc_msgSend_bool (Widget.Handle, selSetShowsBorderOnlyWhileMouseInside.Handle, true);
break;
}
@@ -95,7 +98,7 @@ namespace Xwt.Mac
{
switch (type) {
case ButtonType.Disclosure: Widget.BezelStyle = NSBezelStyle.Disclosure; break;
- default: Widget.BezelStyle = NSBezelStyle.RoundRect; break;
+ default: Widget.BezelStyle = NSBezelStyle.Rounded; break;
}
}
@@ -104,30 +107,50 @@ namespace Xwt.Mac
class MacButton: NSButton, IViewObject
{
+ //
+ // This is necessary since the Activated event for NSControl in AppKit does
+ // not take a list of handlers, instead it supports only one handler.
+ //
+ // This event is used by the RadioButton backend to implement radio groups
+ //
+ internal event Action <MacButton> ActivatedInternal;
+
public MacButton (IntPtr p): base (p)
{
}
- public MacButton (IButtonEventSink eventSink)
+ public MacButton (IButtonEventSink eventSink, ApplicationContext context)
{
BezelStyle = NSBezelStyle.Rounded;
Activated += delegate {
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnClicked ();
});
+ OnActivatedInternal ();
};
}
- public MacButton (ICheckBoxEventSink eventSink)
+ public MacButton (ICheckBoxEventSink eventSink, ApplicationContext context)
{
Activated += delegate {
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnClicked ();
});
+ OnActivatedInternal ();
};
}
-
- public Widget Frontend { get; set; }
+
+ public MacButton (IRadioButtonEventSink eventSink, ApplicationContext context)
+ {
+ Activated += delegate {
+ context.InvokeUserCode (delegate {
+ eventSink.OnClicked ();
+ });
+ OnActivatedInternal ();
+ };
+ }
+
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
@@ -140,6 +163,14 @@ namespace Xwt.Mac
public void DisableEvent (Xwt.Backends.ButtonEvent ev)
{
}
+
+ void OnActivatedInternal ()
+ {
+ if (ActivatedInternal == null)
+ return;
+
+ ActivatedInternal (this);
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/CanvasBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/CanvasBackend.cs
index add183e..a4a5ee8 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/CanvasBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/CanvasBackend.cs
@@ -28,7 +28,6 @@ using System;
using Xwt.Backends;
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
-using Xwt.Engine;
namespace Xwt.Mac
{
@@ -42,10 +41,16 @@ namespace Xwt.Mac
public override void Initialize ()
{
- view = new CanvasView (EventSink);
+ view = new CanvasView (EventSink, ApplicationContext);
ViewObject = view;
}
-
+
+ protected override void OnSizeToFit ()
+ {
+ var s = EventSink.GetPreferredSize ();
+ Widget.SetFrameSize (new System.Drawing.SizeF ((float)s.Width, (float)s.Height));
+ }
+
public Rectangle Bounds {
get {
return new Rectangle (0, 0, view.Frame.Width, view.Frame.Height);
@@ -88,34 +93,22 @@ namespace Xwt.Mac
}
}
- class CanvasView: NSView, IViewObject
+ class CanvasView: WidgetView
{
ICanvasEventSink eventSink;
- public CanvasView (ICanvasEventSink eventSink)
+ public CanvasView (ICanvasEventSink eventSink, ApplicationContext context): base (eventSink, context)
{
this.eventSink = eventSink;
}
-
- public Widget Frontend { get; set; }
-
- public NSView View {
- get { return this; }
- }
-
- public override bool IsFlipped {
- get {
- return true;
- }
- }
public override void DrawRect (System.Drawing.RectangleF dirtyRect)
{
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;
//fill BackgroundColor
- ctx.SetFillColor (Frontend.BackgroundColor.ToCGColor ());
+ ctx.SetFillColor (Backend.Frontend.BackgroundColor.ToCGColor ());
ctx.FillRect (Bounds);
var backend = new CGContextBackend {
@@ -125,80 +118,6 @@ namespace Xwt.Mac
eventSink.OnDraw (backend, new Rectangle (dirtyRect.X, dirtyRect.Y, dirtyRect.Width, dirtyRect.Height));
});
}
-
- public override void RightMouseDown (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- ButtonEventArgs args = new ButtonEventArgs ();
- args.X = p.X;
- args.Y = p.Y;
- args.Button = PointerButton.Right;
- Toolkit.Invoke (delegate {
- eventSink.OnButtonPressed (args);
- });
- }
-
- public override void RightMouseUp (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- ButtonEventArgs args = new ButtonEventArgs ();
- args.X = p.X;
- args.Y = p.Y;
- args.Button = PointerButton.Right;
- Toolkit.Invoke (delegate {
- eventSink.OnButtonReleased (args);
- });
- }
-
- public override void MouseDown (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- ButtonEventArgs args = new ButtonEventArgs ();
- args.X = p.X;
- args.Y = p.Y;
- args.Button = PointerButton.Left;
- Toolkit.Invoke (delegate {
- eventSink.OnButtonPressed (args);
- });
- }
-
- public override void MouseUp (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- ButtonEventArgs args = new ButtonEventArgs ();
- args.X = p.X;
- args.Y = p.Y;
- args.Button = (PointerButton) theEvent.ButtonNumber + 1;
- Toolkit.Invoke (delegate {
- eventSink.OnButtonReleased (args);
- });
- }
-
- public override void MouseMoved (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- MouseMovedEventArgs args = new MouseMovedEventArgs ((long) TimeSpan.FromSeconds (theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);
- Toolkit.Invoke (delegate {
- eventSink.OnMouseMoved (args);
- });
- }
-
- public override void MouseDragged (NSEvent theEvent)
- {
- var p = ConvertPointFromView (theEvent.LocationInWindow, null);
- MouseMovedEventArgs args = new MouseMovedEventArgs ((long) TimeSpan.FromSeconds (theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);
- Toolkit.Invoke (delegate {
- eventSink.OnMouseMoved (args);
- });
- }
-
- public override void SetFrameSize (System.Drawing.SizeF newSize)
- {
- base.SetFrameSize (newSize);
- Toolkit.Invoke (delegate {
- eventSink.OnBoundsChanged ();
- });
- }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/CheckBoxBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/CheckBoxBackend.cs
index f226752..0e90d79 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/CheckBoxBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/CheckBoxBackend.cs
@@ -37,9 +37,9 @@ namespace Xwt.Mac
public override void Initialize ()
{
- ViewObject = new MacButton (EventSink);
+ ViewObject = new MacButton (EventSink, ApplicationContext);
Widget.SetButtonType (NSButtonType.Switch);
- Widget.SizeToFit ();
+ Widget.Title = "";
}
#region ICheckBoxBackend implementation
@@ -50,6 +50,7 @@ namespace Xwt.Mac
public void SetContent (string label)
{
Widget.Title = label;
+ ResetFittingSize ();
}
public bool Active {
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxBackend.cs
index c4c2ec6..d2fc30e 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxBackend.cs
@@ -52,7 +52,7 @@
using System;
using Xwt.Backends;
using MonoMac.AppKit;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
@@ -69,13 +69,12 @@ namespace Xwt.Mac
base.Initialize ();
ViewObject = new PopUpButton ();
Widget.Menu = new NSMenu ();
- Widget.SizeToFit ();
Widget.Activated += delegate {
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
Widget.SynchronizeTitleAndSelectedItem ();
- Widget.SizeToFit ();
+ ResetFittingSize ();
};
}
@@ -122,27 +121,27 @@ namespace Xwt.Mac
NSMenuItem mi = Widget.ItemAtIndex (e.Row);
if (EventSink.RowIsSeparator (e.Row)) {
if (!mi.IsSeparatorItem) {
- Widget.Menu.InsertItematIndex (NSMenuItem.SeparatorItem, e.Row);
+ Widget.Menu.InsertItem (NSMenuItem.SeparatorItem, e.Row);
Widget.Menu.RemoveItemAt (e.Row + 1);
}
}
else {
if (mi.IsSeparatorItem) {
mi = new NSMenuItem ();
- Widget.Menu.InsertItematIndex (mi, e.Row);
+ Widget.Menu.InsertItem (mi, e.Row);
Widget.Menu.RemoveItemAt (e.Row + 1);
}
UpdateItem (mi, e.Row);
Widget.SynchronizeTitleAndSelectedItem ();
}
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
void HandleSourceRowDeleted (object sender, ListRowEventArgs e)
{
Widget.RemoveItem (e.Row);
Widget.SynchronizeTitleAndSelectedItem ();
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
void HandleSourceRowInserted (object sender, ListRowEventArgs e)
@@ -154,9 +153,9 @@ namespace Xwt.Mac
mi = new NSMenuItem ();
UpdateItem (mi, e.Row);
}
- Widget.Menu.InsertItematIndex (mi, e.Row);
+ Widget.Menu.InsertItem (mi, e.Row);
Widget.SynchronizeTitleAndSelectedItem ();
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
void UpdateItem (NSMenuItem mi, int index)
@@ -170,11 +169,11 @@ namespace Xwt.Mac
}
set {
Widget.SelectItem (value);
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
Widget.SynchronizeTitleAndSelectedItem ();
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
}
@@ -197,7 +196,7 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxEntryBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxEntryBackend.cs
index cea63b5..fd1c5a8 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxEntryBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ComboBoxEntryBackend.cs
@@ -27,7 +27,7 @@ using System;
using Xwt.Backends;
using MonoMac.AppKit;
using MonoMac.Foundation;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
@@ -45,8 +45,7 @@ namespace Xwt.Mac
public override void Initialize ()
{
base.Initialize ();
- ViewObject = new MacComboBox (EventSink);
- Widget.SizeToFit ();
+ ViewObject = new MacComboBox (EventSink, ApplicationContext);
}
protected override Size GetNaturalSize ()
@@ -101,9 +100,11 @@ namespace Xwt.Mac
{
IComboBoxEventSink eventSink;
ITextEntryEventSink entryEventSink;
+ ApplicationContext context;
- public MacComboBox (IComboBoxEventSink eventSink)
+ public MacComboBox (IComboBoxEventSink eventSink, ApplicationContext context)
{
+ this.context = context;
this.eventSink = eventSink;
}
@@ -118,13 +119,13 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public override void DidChange (MonoMac.Foundation.NSNotification notification)
{
base.DidChange (notification);
if (entryEventSink != null) {
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
entryEventSink.OnChanged ();
});
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ContextBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ContextBackendHandler.cs
index 3a0bd79..007d4be 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ContextBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ContextBackendHandler.cs
@@ -27,59 +27,73 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using MonoMac.AppKit;
using Xwt.Drawing;
using MonoMac.Foundation;
using MonoMac.CoreGraphics;
using System.Drawing;
+using System.Collections.Generic;
namespace Xwt.Mac
{
class CGContextBackend {
public CGContext Context;
public SizeF Size;
- public GradientInfo Gradient;
public CGAffineTransform? InverseViewTransform;
+ public Stack<ContextStatus> StatusStack = new Stack<ContextStatus> ();
+ public ContextStatus CurrentStatus = new ContextStatus ();
}
- public class ContextBackendHandler: IContextBackendHandler
+ class ContextStatus
+ {
+ public object Pattern;
+ }
+
+ public class MacContextBackendHandler: ContextBackendHandler
{
const double degrees = System.Math.PI / 180d;
- public void Save (object backend)
+ public override void Save (object backend)
{
- ((CGContextBackend)backend).Context.SaveState ();
+ var ct = (CGContextBackend) backend;
+ ct.Context.SaveState ();
+ ct.StatusStack.Push (ct.CurrentStatus);
+ var newStatus = new ContextStatus ();
+ newStatus.Pattern = ct.CurrentStatus.Pattern;
+ ct.CurrentStatus = newStatus;
}
- public void Restore (object backend)
+ public override void Restore (object backend)
{
- ((CGContextBackend)backend).Context.RestoreState ();
+ var ct = (CGContextBackend) backend;
+ ct.Context.RestoreState ();
+ ct.CurrentStatus = ct.StatusStack.Pop ();
}
- public void SetGlobalAlpha (object backend, double alpha)
+ public override void SetGlobalAlpha (object backend, double alpha)
{
((CGContextBackend)backend).Context.SetAlpha ((float)alpha);
}
- public void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
CGContext ctx = ((CGContextBackend)backend).Context;
ctx.AddArc ((float)xc, (float)yc, (float)radius, (float)(angle1 * degrees), (float)(angle2 * degrees), false);
}
- public void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
CGContext ctx = ((CGContextBackend)backend).Context;
ctx.AddArc ((float)xc, (float)yc, (float)radius, (float)(angle1 * degrees), (float)(angle2 * degrees), true);
}
- public void Clip (object backend)
+ public override void Clip (object backend)
{
((CGContextBackend)backend).Context.Clip ();
}
- public void ClipPreserve (object backend)
+ public override void ClipPreserve (object backend)
{
CGContext ctx = ((CGContextBackend)backend).Context;
using (CGPath oldPath = ctx.CopyPath ()) {
@@ -87,30 +101,36 @@ namespace Xwt.Mac
ctx.AddPath (oldPath);
}
}
-
- public void ClosePath (object backend)
+
+ public override void ClosePath (object backend)
{
((CGContextBackend)backend).Context.ClosePath ();
}
- public void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
+ public override void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
{
((CGContextBackend)backend).Context.AddCurveToPoint ((float)x1, (float)y1, (float)x2, (float)y2, (float)x3, (float)y3);
}
- public void Fill (object backend)
+ public override void Fill (object backend)
{
CGContextBackend gc = (CGContextBackend)backend;
CGContext ctx = gc.Context;
SetupContextForDrawing (ctx);
- if (gc.Gradient != null)
- GradientBackendHandler.Draw (ctx, gc.Gradient);
- else
+ if (gc.CurrentStatus.Pattern is GradientInfo) {
+ MacGradientBackendHandler.Draw (ctx, ((GradientInfo)gc.CurrentStatus.Pattern));
+ }
+ else if (gc.CurrentStatus.Pattern is ImagePatternInfo) {
+ SetupPattern (gc);
ctx.DrawPath (CGPathDrawingMode.Fill);
+ }
+ else {
+ ctx.DrawPath (CGPathDrawingMode.Fill);
+ }
}
- public void FillPreserve (object backend)
+ public override void FillPreserve (object backend)
{
CGContext ctx = ((CGContextBackend)backend).Context;
using (CGPath oldPath = ctx.CopyPath ()) {
@@ -119,55 +139,55 @@ namespace Xwt.Mac
}
}
- public void LineTo (object backend, double x, double y)
+ public override void LineTo (object backend, double x, double y)
{
((CGContextBackend)backend).Context.AddLineToPoint ((float)x, (float)y);
}
- public void MoveTo (object backend, double x, double y)
+ public override void MoveTo (object backend, double x, double y)
{
((CGContextBackend)backend).Context.MoveTo ((float)x, (float)y);
}
- public void NewPath (object backend)
+ public override void NewPath (object backend)
{
((CGContextBackend)backend).Context.BeginPath ();
}
- public void Rectangle (object backend, double x, double y, double width, double height)
+ public override void Rectangle (object backend, double x, double y, double width, double height)
{
((CGContextBackend)backend).Context.AddRect (new RectangleF ((float)x, (float)y, (float)width, (float)height));
}
- public void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ public override void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{
CGContext ctx = ((CGContextBackend)backend).Context;
PointF p = ctx.GetPathCurrentPoint ();
ctx.AddCurveToPoint ((float)(p.X + dx1), (float)(p.Y + dy1), (float)(p.X + dx2), (float)(p.Y + dy2), (float)(p.X + dx3), (float)(p.Y + dy3));
}
- public void RelLineTo (object backend, double dx, double dy)
+ public override void RelLineTo (object backend, double dx, double dy)
{
CGContext ctx = ((CGContextBackend)backend).Context;
PointF p = ctx.GetPathCurrentPoint ();
ctx.AddLineToPoint ((float)(p.X + dx), (float)(p.Y + dy));
}
- public void RelMoveTo (object backend, double dx, double dy)
+ public override void RelMoveTo (object backend, double dx, double dy)
{
CGContext ctx = ((CGContextBackend)backend).Context;
PointF p = ctx.GetPathCurrentPoint ();
ctx.MoveTo ((float)(p.X + dx), (float)(p.Y + dy));
}
- public void Stroke (object backend)
+ public override void Stroke (object backend)
{
CGContext ctx = ((CGContextBackend)backend).Context;
SetupContextForDrawing (ctx);
ctx.DrawPath (CGPathDrawingMode.Stroke);
}
- public void StrokePreserve (object backend)
+ public override void StrokePreserve (object backend)
{
CGContext ctx = ((CGContextBackend)backend).Context;
SetupContextForDrawing (ctx);
@@ -177,10 +197,10 @@ namespace Xwt.Mac
}
}
- public void SetColor (object backend, Xwt.Drawing.Color color)
+ public override void SetColor (object backend, Xwt.Drawing.Color color)
{
CGContextBackend gc = (CGContextBackend)backend;
- gc.Gradient = null;
+ gc.CurrentStatus.Pattern = null;
CGContext ctx = gc.Context;
ctx.SetFillColorSpace (Util.DeviceRGBColorSpace);
ctx.SetStrokeColorSpace (Util.DeviceRGBColorSpace);
@@ -188,12 +208,12 @@ namespace Xwt.Mac
ctx.SetStrokeColor ((float)color.Red, (float)color.Green, (float)color.Blue, (float)color.Alpha);
}
- public void SetLineWidth (object backend, double width)
+ public override void SetLineWidth (object backend, double width)
{
((CGContextBackend)backend).Context.SetLineWidth ((float)width);
}
- public void SetLineDash (object backend, double offset, params double[] pattern)
+ public override void SetLineDash (object backend, double offset, params double[] pattern)
{
float[] array = new float[pattern.Length];
for (int n=0; n<pattern.Length; n++)
@@ -203,128 +223,143 @@ namespace Xwt.Mac
((CGContextBackend)backend).Context.SetLineDash ((float)offset, array);
}
- public void SetPattern (object backend, object p)
+ public override void SetPattern (object backend, object p)
{
CGContextBackend gc = (CGContextBackend)backend;
- gc.Gradient = p as GradientInfo;
- if (gc.Gradient != null || !(p is CGPattern))
- return;
- CGContext ctx = gc.Context;
- CGPattern pattern = (CGPattern)p;
- float[] alpha = new[] { 1.0f };
- ctx.SetFillColorSpace (Util.PatternColorSpace);
- ctx.SetStrokeColorSpace (Util.PatternColorSpace);
- ctx.SetFillPattern (pattern, alpha);
- ctx.SetStrokePattern (pattern, alpha);
+ gc.CurrentStatus.Pattern = p;
}
-
- public void SetFont (object backend, Xwt.Drawing.Font font)
+
+ void SetupPattern (CGContextBackend gc)
{
- ((CGContextBackend)backend).Context.SelectFont (font.Family, (float)font.Size, CGTextEncoding.FontSpecific);
+ gc.Context.SetPatternPhase (new SizeF (0, 0));
+
+ if (gc.CurrentStatus.Pattern is GradientInfo)
+ return;
+
+ if (gc.CurrentStatus.Pattern is ImagePatternInfo) {
+
+ var pi = (ImagePatternInfo) gc.CurrentStatus.Pattern;
+ RectangleF bounds = new RectangleF (PointF.Empty, new SizeF (pi.Image.Size.Width, pi.Image.Size.Height));
+ var t = CGAffineTransform.Multiply (CGAffineTransform.MakeScale (1f, -1f), gc.Context.GetCTM ());
+
+ CGPattern pattern;
+ if (pi.Image is CustomImage) {
+ pattern = new CGPattern (bounds, t, bounds.Width, bounds.Height, CGPatternTiling.ConstantSpacing, true, c => {
+ c.TranslateCTM (0, bounds.Height);
+ c.ScaleCTM (1f, -1f);
+ ((CustomImage)pi.Image).DrawInContext (c);
+ });
+ } else {
+ RectangleF empty = RectangleF.Empty;
+ CGImage cgimg = ((NSImage)pi.Image).AsCGImage (ref empty, null, null);
+ pattern = new CGPattern (bounds, t, bounds.Width, bounds.Height,
+ CGPatternTiling.ConstantSpacing, true, c => c.DrawImage (bounds, cgimg));
+ }
+
+ CGContext ctx = gc.Context;
+ float[] alpha = new[] { (float)pi.Alpha };
+ ctx.SetFillColorSpace (Util.PatternColorSpace);
+ ctx.SetStrokeColorSpace (Util.PatternColorSpace);
+ ctx.SetFillPattern (pattern, alpha);
+ ctx.SetStrokePattern (pattern, alpha);
+ }
}
- public void DrawTextLayout (object backend, TextLayout layout, double x, double y)
+ public override void DrawTextLayout (object backend, TextLayout layout, double x, double y)
{
CGContext ctx = ((CGContextBackend)backend).Context;
SetupContextForDrawing (ctx);
- TextLayoutBackendHandler.Draw (ctx, WidgetRegistry.GetBackend (layout), x, y);
- }
-
- public void DrawImage (object backend, object img, double x, double y, double alpha)
- {
- CGContext ctx = ((CGContextBackend)backend).Context;
- NSImage image = (NSImage)img;
- var rect = new RectangleF (PointF.Empty, image.Size);
- ctx.SaveState ();
- ctx.SetAlpha ((float)alpha);
- ctx.TranslateCTM ((float)x, (float)y + rect.Height);
- ctx.ScaleCTM (1f, -1f);
- ctx.DrawImage (rect, image.AsCGImage (RectangleF.Empty, null, null));
- ctx.RestoreState ();
+ MacTextLayoutBackendHandler.Draw (ctx, Toolkit.GetBackend (layout), x, y);
}
-
- public void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha)
+
+ public override void DrawImage (object backend, ImageDescription img, double x, double y)
{
- var srcRect = new Rectangle (Point.Zero, ((NSImage)img).Size.ToXwtSize ());
- var destRect = new Rectangle (x, y, width, height);
- DrawImage (backend, img, srcRect, destRect, alpha);
+ var srcRect = new Rectangle (Point.Zero, img.Size);
+ var destRect = new Rectangle (x, y, img.Size.Width, img.Size.Height);
+ DrawImage (backend, img, srcRect, destRect);
}
- public void DrawImage (object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha)
+ public override void DrawImage (object backend, ImageDescription img, Rectangle srcRect, Rectangle destRect)
{
CGContext ctx = ((CGContextBackend)backend).Context;
- NSImage image = (NSImage) img;
- var rect = new RectangleF (0, 0, (float)destRect.Width, (float)destRect.Height);
+ NSImage image = img.ToNSImage ();
ctx.SaveState ();
- ctx.SetAlpha ((float)alpha);
- ctx.TranslateCTM ((float)destRect.X, (float)destRect.Y + rect.Height);
- ctx.ScaleCTM (1f, -1f);
- ctx.DrawImage (rect, image.AsCGImage (RectangleF.Empty, null, null).WithImageInRect (srcRect.ToRectangleF ()));
+ ctx.SetAlpha ((float)img.Alpha);
+
+ double rx = destRect.Width / srcRect.Width;
+ double ry = destRect.Height / srcRect.Height;
+ ctx.AddRect (new RectangleF ((float)destRect.X, (float)destRect.Y, (float)destRect.Width, (float)destRect.Height));
+ ctx.Clip ();
+ ctx.TranslateCTM ((float)(destRect.X - (srcRect.X * rx)), (float)(destRect.Y - (srcRect.Y * ry)));
+ ctx.ScaleCTM ((float)rx, (float)ry);
+
+ if (image is CustomImage) {
+ ((CustomImage)image).DrawInContext ((CGContextBackend)backend);
+ } else {
+ RectangleF rr = new RectangleF (0, 0, (float)image.Size.Width, image.Size.Height);
+ ctx.ScaleCTM (1f, -1f);
+ ctx.DrawImage (new RectangleF (0, -image.Size.Height, image.Size.Width, image.Size.Height), image.AsCGImage (ref rr, NSGraphicsContext.CurrentContext, null));
+ }
+
ctx.RestoreState ();
}
- public void Rotate (object backend, double angle)
+ public override void Rotate (object backend, double angle)
{
((CGContextBackend)backend).Context.RotateCTM ((float)(angle * degrees));
}
- public void Scale (object backend, double scaleX, double scaleY)
+ public override void Scale (object backend, double scaleX, double scaleY)
{
((CGContextBackend)backend).Context.ScaleCTM ((float)scaleX, (float)scaleY);
}
- public void Translate (object backend, double tx, double ty)
+ public override void Translate (object backend, double tx, double ty)
{
((CGContextBackend)backend).Context.TranslateCTM ((float)tx, (float)ty);
}
- public void TransformPoint (object backend, ref double x, ref double y)
+ public override Matrix GetCTM (object backend)
{
CGAffineTransform t = GetContextTransform ((CGContextBackend)backend);
-
- PointF p = t.TransformPoint (new PointF ((float)x, (float)y));
- x = p.X;
- y = p.Y;
+ Matrix ctm = new Matrix (t.xx, t.yx, t.xy, t.yy, t.x0, t.y0);
+ return ctm;
}
- public void TransformDistance (object backend, ref double dx, ref double dy)
+ public override object CreatePath ()
{
- CGAffineTransform t = GetContextTransform ((CGContextBackend)backend);
- // remove translational elements from CTM
- t.x0 = 0;
- t.y0 = 0;
+ return new CGPath ();
+ }
- PointF p = t.TransformPoint (new PointF ((float)dx, (float)dy));
- dx = p.X;
- dy = p.Y;
+ public override object CopyPath (object backend)
+ {
+ return ((CGContextBackend)backend).Context.CopyPath ();
}
- public void TransformPoints (object backend, Point[] points)
+ public override void AppendPath (object backend, object otherBackend)
{
- CGAffineTransform t = GetContextTransform ((CGContextBackend)backend);
+ CGContext dest = ((CGContextBackend)backend).Context;
+ CGContextBackend src = otherBackend as CGContextBackend;
- PointF p;
- for (int i = 0; i < points.Length; ++i) {
- p = t.TransformPoint (new PointF ((float)points[i].X, (float)points[i].Y));
- points[i].X = p.X;
- points[i].Y = p.Y;
+ if (src != null) {
+ using (var path = src.Context.CopyPath ())
+ dest.AddPath (path);
+ } else {
+ dest.AddPath ((CGPath)otherBackend);
}
}
- public void TransformDistances (object backend, Distance[] vectors)
+ public override bool IsPointInFill (object backend, double x, double y)
{
- CGAffineTransform t = GetContextTransform ((CGContextBackend)backend);
- t.x0 = 0;
- t.y0 = 0;
- PointF p;
- for (int i = 0; i < vectors.Length; ++i) {
- p = t.TransformPoint (new PointF ((float)vectors[i].Dx, (float)vectors[i].Dy));
- vectors[i].Dx = p.X;
- vectors[i].Dy = p.Y;
- }
+ return ((CGContextBackend)backend).Context.PathContainsPoint (new PointF ((float)x, (float)y), CGPathDrawingMode.Fill);
+ }
+
+ public override bool IsPointInStroke (object backend, double x, double y)
+ {
+ return ((CGContextBackend)backend).Context.PathContainsPoint (new PointF ((float)x, (float)y), CGPathDrawingMode.Stroke);
}
- public void Dispose (object backend)
+ public override void Dispose (object backend)
{
((CGContextBackend)backend).Context.Dispose ();
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/CustomWidgetBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/CustomWidgetBackend.cs
new file mode 100644
index 0000000..af08dc1
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/CustomWidgetBackend.cs
@@ -0,0 +1,190 @@
+//
+// CustomWidgetBackend.cs
+//
+// Author:
+// Alex Corrado <corrado at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 Xwt.Backends;
+using MonoMac.AppKit;
+using MonoMac.Foundation;
+using MonoMac.CoreGraphics;
+
+namespace Xwt.Mac
+{
+ public class CustomWidgetBackend: ViewBackend<NSView,IWidgetEventSink>, ICustomWidgetBackend
+ {
+ ViewBackend childBackend;
+
+ public CustomWidgetBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ ViewObject = new WidgetView (EventSink, ApplicationContext);
+ }
+
+ public void SetContent (IWidgetBackend widget)
+ {
+ if (childBackend != null) {
+ childBackend.Widget.RemoveFromSuperview ();
+ RemoveChildPlacement (childBackend.Widget);
+ childBackend.Widget.AutoresizingMask = NSViewResizingMask.NotSizable;
+ }
+ if (widget == null)
+ return;
+
+ var view = Widget;
+ childBackend = (ViewBackend)widget;
+ var childView = GetWidgetWithPlacement (childBackend);
+ childView.Frame = view.Bounds;
+ childView.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable;
+ view.AddSubview (childView);
+ view.SetNeedsDisplayInRect (view.Bounds);
+ }
+
+ protected override Size GetNaturalSize ()
+ {
+ if (childBackend != null)
+ return childBackend.Frontend.Surface.GetPreferredSize ();
+ else
+ return base.GetNaturalSize ();
+ }
+ }
+
+ class WidgetView: NSView, IViewObject
+ {
+ IWidgetEventSink eventSink;
+ protected ApplicationContext context;
+
+ public WidgetView (IWidgetEventSink eventSink, ApplicationContext context)
+ {
+ this.context = context;
+ this.eventSink = eventSink;
+ }
+
+ public ViewBackend Backend { get; set; }
+
+ public NSView View {
+ get { return this; }
+ }
+
+ public override bool IsFlipped {
+ get {
+ return true;
+ }
+ }
+
+ public override bool AcceptsFirstResponder ()
+ {
+ return Backend.CanGetFocus;
+ }
+
+ public override void DrawRect (System.Drawing.RectangleF dirtyRect)
+ {
+ CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;
+
+ //fill BackgroundColor
+ ctx.SetFillColor (Backend.Frontend.BackgroundColor.ToCGColor ());
+ ctx.FillRect (Bounds);
+ }
+
+ public override void RightMouseDown (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ ButtonEventArgs args = new ButtonEventArgs ();
+ args.X = p.X;
+ args.Y = p.Y;
+ args.Button = PointerButton.Right;
+ context.InvokeUserCode (delegate {
+ eventSink.OnButtonPressed (args);
+ });
+ }
+
+ public override void RightMouseUp (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ ButtonEventArgs args = new ButtonEventArgs ();
+ args.X = p.X;
+ args.Y = p.Y;
+ args.Button = PointerButton.Right;
+ context.InvokeUserCode (delegate {
+ eventSink.OnButtonReleased (args);
+ });
+ }
+
+ public override void MouseDown (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ ButtonEventArgs args = new ButtonEventArgs ();
+ args.X = p.X;
+ args.Y = p.Y;
+ args.Button = PointerButton.Left;
+ context.InvokeUserCode (delegate {
+ eventSink.OnButtonPressed (args);
+ });
+ }
+
+ public override void MouseUp (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ ButtonEventArgs args = new ButtonEventArgs ();
+ args.X = p.X;
+ args.Y = p.Y;
+ args.Button = (PointerButton) theEvent.ButtonNumber + 1;
+ context.InvokeUserCode (delegate {
+ eventSink.OnButtonReleased (args);
+ });
+ }
+
+ public override void MouseMoved (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ MouseMovedEventArgs args = new MouseMovedEventArgs ((long) TimeSpan.FromSeconds (theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);
+ context.InvokeUserCode (delegate {
+ eventSink.OnMouseMoved (args);
+ });
+ }
+
+ public override void MouseDragged (NSEvent theEvent)
+ {
+ var p = ConvertPointFromView (theEvent.LocationInWindow, null);
+ MouseMovedEventArgs args = new MouseMovedEventArgs ((long) TimeSpan.FromSeconds (theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);
+ context.InvokeUserCode (delegate {
+ eventSink.OnMouseMoved (args);
+ });
+ }
+
+ public override void SetFrameSize (System.Drawing.SizeF newSize)
+ {
+ bool changed = !newSize.Equals (Frame.Size);
+ base.SetFrameSize (newSize);
+ if (changed) {
+ context.InvokeUserCode (delegate {
+ eventSink.OnBoundsChanged ();
+ });
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/DatePickerBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/DatePickerBackend.cs
new file mode 100644
index 0000000..4c8902b
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/DatePickerBackend.cs
@@ -0,0 +1,84 @@
+//
+// DatePickerBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using MonoMac.AppKit;
+using MonoMac.Foundation;
+
+namespace Xwt.Mac
+{
+ public class DatePickerBackend: ViewBackend<NSDatePicker,IDatePickerEventSink>, IDatePickerBackend
+ {
+ public DatePickerBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ base.Initialize ();
+ ViewObject = new MacDatePicker ();
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is DatePickerEvent)
+ Widget.Activated += HandleActivated;
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is DatePickerEvent)
+ Widget.Activated -= HandleActivated;
+ }
+
+ void HandleActivated (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (((IDatePickerEventSink)EventSink).ValueChanged);
+ }
+
+ #region IDatePickerBackend implementation
+
+ public DateTime DateTime {
+ get {
+ return (DateTime)Widget.DateValue;
+ }
+ set {
+ Widget.DateValue = value;
+ }
+ }
+
+ #endregion
+ }
+
+ class MacDatePicker: NSDatePicker, IViewObject
+ {
+ public NSView View { get { return this; } }
+ public ViewBackend Backend { get; set; }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/DialogBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/DialogBackend.cs
new file mode 100644
index 0000000..5b0d860
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/DialogBackend.cs
@@ -0,0 +1,134 @@
+//
+// DialogBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+using MonoMac.AppKit;
+
+namespace Xwt.Mac
+{
+ public class DialogBackend: WindowBackend, IDialogBackend
+ {
+ NSView mainBox;
+ HBox buttonBox;
+ NSView buttonBoxView;
+ Widget dialogChild;
+ Size minSize;
+ Dictionary<DialogButton,Button> buttons = new Dictionary<DialogButton, Button> ();
+ WidgetSpacing buttonBoxPadding = new WidgetSpacing (12, 6, 12, 12);
+
+ public DialogBackend ()
+ {
+ }
+
+ public override void InitializeBackend (object frontend, ApplicationContext context)
+ {
+ base.InitializeBackend (frontend, context);
+
+ buttonBox = new HBox () {
+ Spacing = 0,
+ Margin = 0
+ };
+ buttonBoxView = ((ViewBackend)buttonBox.GetBackend ()).Widget;
+ ContentView.AddSubview (buttonBoxView);
+ }
+
+ public override void LayoutWindow ()
+ {
+ var frame = ContentView.Frame;
+ var ps = buttonBox.Surface.GetPreferredSize (true);
+ buttonBoxView.Frame = new System.Drawing.RectangleF ((float)buttonBoxPadding.Left, (float)buttonBoxPadding.Bottom, frame.Width - (float)buttonBoxPadding.HorizontalSpacing, (float)ps.Height);
+ buttonBox.Surface.Reallocate ();
+ var boxHeight = (float)ps.Height + (float)buttonBoxPadding.VerticalSpacing;
+ LayoutContent (new System.Drawing.RectangleF (0, boxHeight, frame.Width, frame.Height - boxHeight));
+ }
+
+ public override void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ var ps = buttonBox.Surface.GetPreferredSize (true);
+ minSize = new Size (ps.Width + buttonBoxPadding.VerticalSpacing, 0);
+ decorationSize = new Size (0, ps.Height + buttonBoxPadding.HorizontalSpacing);
+ }
+
+ #region IDialogBackend implementation
+
+ public void SetButtons (System.Collections.Generic.IEnumerable<DialogButton> buttonList)
+ {
+ buttonBox.Clear ();
+
+ foreach (var b in buttonList) {
+ var button = new Button ();
+ var tb = b;
+ button.Clicked += delegate {
+ OnClicked (tb);
+ };
+ buttonBox.PackEnd (button);
+ buttons [b] = button;
+ UpdateButton (b, button);
+ }
+ if (minSize != Size.Zero)
+ SetMinSize (minSize);
+ }
+
+ void OnClicked (DialogButton button)
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ ((IDialogEventSink)EventSink).OnDialogButtonClicked (button);
+ });
+ }
+ public void UpdateButton (DialogButton b)
+ {
+ Button realButton;
+ if (buttons.TryGetValue (b, out realButton)) {
+ UpdateButton (b, realButton);
+ if (minSize != Size.Zero)
+ SetMinSize (minSize);
+ }
+ }
+
+ public void UpdateButton (DialogButton b, Button realButton)
+ {
+ realButton.Label = b.Label;
+ realButton.Image = b.Image;
+ realButton.Sensitive = b.Sensitive;
+ realButton.Visible = b.Visible;
+ }
+
+ public void RunLoop (IWindowFrameBackend parent)
+ {
+ Visible = true;
+ NSApplication.SharedApplication.RunModalForWindow (this);
+ }
+
+ public void EndLoop ()
+ {
+ NSApplication.SharedApplication.StopModal ();
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ExpanderBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ExpanderBackend.cs
index d419760..cad3267 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ExpanderBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ExpanderBackend.cs
@@ -6,16 +6,29 @@ using Xwt.Backends;
using MonoMac.AppKit;
using MonoMac.Foundation;
+using MonoMac.ObjCRuntime;
namespace Xwt.Mac
{
- public class ExpanderBackend : ViewBackend<MacExpander, IExpandEventSink>, IExpanderBackend
+ class ExpanderBackend : ViewBackend<MacExpander, IExpandEventSink>, IExpanderBackend
{
- MacExpander expander;
+ ViewBackend child;
public ExpanderBackend ()
{
- ViewObject = new MacExpander ();
+ SetMinSize (10, 21);
+ }
+
+ public override void Initialize ()
+ {
+ ViewObject = new MacExpander (EventSink, ApplicationContext);
+ Widget.Expander.DisclosureToggled += (sender, e) => {
+ ResetFittingSize ();
+ NotifyPreferredSizeChanged ();
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.ExpandChanged ();
+ });
+ };
}
public string Label {
@@ -34,37 +47,69 @@ namespace Xwt.Mac
set {
Widget.Box.Expanded = value;
Widget.Expander.On = value;
+ ResetFittingSize ();
}
}
public void SetContent (IWidgetBackend widget)
{
- Widget.Box.SetContent (GetWidget (widget));
+ if (child != null)
+ RemoveChildPlacement (child.Widget);
+
+ child = (ViewBackend)widget;
+
+ Widget.Box.SetContent (GetWidgetWithPlacement (widget));
+ ResetFittingSize ();
+ }
+
+ public override void ReplaceChild (NSView oldChild, NSView newChild)
+ {
+ Widget.Box.SetContent (newChild);
+ }
+
+ protected override Size CalcFittingSize ()
+ {
+ var s = Widget.SizeOfDecorations;
+ if (Widget.Box.Expanded && child != null) {
+ s += child.Frontend.Surface.GetPreferredSize ();
+ }
+ return s;
+ }
+
+ public override object Font {
+ get {
+ return Widget.Expander.Font;
+ }
+ set {
+ Widget.Expander.Font = (NSFont)value;
+ }
}
}
- public class MacExpander : NSView, IViewObject
+ class MacExpander: WidgetView
{
ExpanderWidget expander;
CollapsibleBox box;
- public MacExpander ()
+ public MacExpander (IWidgetEventSink eventSink, ApplicationContext context): base (eventSink, context)
{
- SetFrameSize (new SizeF (80, 50 + CollapsibleBox.DefaultCollapsedHeight));
expander = new ExpanderWidget () {
Frame = new RectangleF (0, 0, 80, 21),
AutoresizingMask = NSViewResizingMask.WidthSizable
};
- box = new CollapsibleBox () {
- Frame = new RectangleF (0, 25, 80, 100),
- AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable
- };
+ box = new CollapsibleBox () { AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable };
+ box.SetFrameOrigin (new PointF (0, 21));
expander.DisclosureToggled += (sender, e) => box.Expanded = expander.On;
- AutoresizesSubviews = true;
AddSubview (expander);
AddSubview (box);
}
+ public Size SizeOfDecorations {
+ get {
+ return new Size (0, 21);
+ }
+ }
+
public override bool IsFlipped {
get {
return true;
@@ -83,12 +128,6 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
-
- public NSView View {
- get { return this; }
- }
-
public void EnableEvent (Xwt.Backends.ButtonEvent ev)
{
}
@@ -96,37 +135,48 @@ namespace Xwt.Mac
public void DisableEvent (Xwt.Backends.ButtonEvent ev)
{
}
+
+ public override void SetFrameSize (SizeF newSize)
+ {
+ base.SetFrameSize (newSize);
+ box.UpdateContentSize (false);
+ }
}
- public class ExpanderWidget : NSView
+ class ExpanderWidget : NSView
{
public event EventHandler DisclosureToggled;
- NSTextView label;
+ NSButton label;
NSButton disclosure;
NSGradient backgroundGradient;
NSColor strokeColor;
public ExpanderWidget ()
{
- label = new NSTextView () {
- AutoresizingMask = NSViewResizingMask.MaxYMargin | NSViewResizingMask.WidthSizable,
- Alignment = NSTextAlignment.Left,
- Editable = false,
- Selectable = false,
- DrawsBackground = false,
- Frame = new RectangleF (17, 3, 60, 13)
- };
- disclosure = new NSButton () {
+ disclosure = new NSButton {
BezelStyle = NSBezelStyle.Disclosure,
AutoresizingMask = NSViewResizingMask.MaxYMargin,
ImagePosition = NSCellImagePosition.ImageOnly,
Frame = new RectangleF (5, 4, 13, 13),
- State = NSCellStateValue.On
+ State = NSCellStateValue.Off
};
disclosure.SetButtonType (NSButtonType.OnOff);
+ disclosure.Activated += delegate {
+ if (DisclosureToggled != null)
+ DisclosureToggled (this, EventArgs.Empty);
+ };
+
+ label = new NSButton {
+ Bordered = false,
+ AutoresizingMask = NSViewResizingMask.MaxYMargin | NSViewResizingMask.WidthSizable,
+ Alignment = NSTextAlignment.Left,
+ Frame = new RectangleF (17, 3, 60, 13),
+ Target = disclosure,
+ Action = new Selector ("performClick:")
+ };
+ label.SetButtonType (NSButtonType.MomentaryChange);
- disclosure.AddObserver (this, new NSString ("cell.state"), NSKeyValueObservingOptions.New, IntPtr.Zero);
AutoresizesSubviews = true;
backgroundGradient = new NSGradient (NSColor.FromCalibratedRgba (0.93f, 0.93f, 0.97f, 1.0f),
NSColor.FromCalibratedRgba (0.74f, 0.76f, 0.83f, 1.0f));
@@ -136,18 +186,21 @@ namespace Xwt.Mac
AddSubview (disclosure);
}
- public override void ObserveValue (NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
- {
- if (DisclosureToggled != null)
- DisclosureToggled (this, EventArgs.Empty);
+ public NSFont Font {
+ get {
+ return label.Font;
+ }
+ set {
+ label.Font = value;
+ }
}
public string Label {
get {
- return label.Value;
+ return label.Title;
}
set {
- label.Value = value;
+ label.Title = value;
}
}
@@ -178,22 +231,24 @@ namespace Xwt.Mac
public CollapsibleBox ()
{
- expanded = true;
+ expanded = false;
otherHeight = DefaultCollapsedHeight;
TitlePosition = NSTitlePosition.NoTitle;
BorderType = NSBorderType.NoBorder;
BoxType = NSBoxType.NSBoxPrimary;
+ ContentViewMargins = new SizeF (0, 0);
}
public void SetContent (NSView view)
{
ContentView = view;
+ UpdateContentSize (false);
}
public bool Expanded {
get { return expanded; }
set {
- SetExpanded (value, true);
+ SetExpanded (value, false);
}
}
@@ -201,13 +256,22 @@ namespace Xwt.Mac
{
if (expanded != value) {
expanded = value;
- var frameSize = Frame.Size;
- SizeF newFrameSize = new SizeF (frameSize.Width, otherHeight);
- otherHeight = frameSize.Height;
- SetFrameSize (newFrameSize, animate);
+ UpdateContentSize (animate);
}
}
+ public void UpdateContentSize (bool animate)
+ {
+ if (expanded) {
+ var vo = ContentView as IViewObject;
+ if (vo != null && vo.Backend != null) {
+ var s = vo.Backend.Frontend.Surface.GetPreferredSize ((float)Frame.Size.Width, SizeConstraint.Unconstrained, true);
+ SetFrameSize (new SizeF (Frame.Width, (float)s.Height), animate);
+ }
+ } else
+ SetFrameSize (new SizeF (Frame.Width, DefaultCollapsedHeight), animate);
+ }
+
public override bool IsFlipped {
get {
return true;
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/FileDialogBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/FileDialogBackend.cs
index 7354130..4f27c95 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/FileDialogBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/FileDialogBackend.cs
@@ -29,6 +29,7 @@ using MonoMac.AppKit;
using System.IO;
using System.Linq;
+
namespace Xwt.Mac
{
public abstract class FileDialogBackend
@@ -95,7 +96,7 @@ namespace Xwt.Mac
#region IBackend implementation
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/FontBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/FontBackendHandler.cs
index ff78b46..c1d6561 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/FontBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/FontBackendHandler.cs
@@ -32,90 +32,104 @@ using MonoMac.Foundation;
namespace Xwt.Mac
{
- public class FontBackendHandler: IFontBackendHandler
+ public class MacFontBackendHandler: FontBackendHandler
{
- public object Create (string fontName, double size, FontSizeUnit sizeUnit, FontStyle style, FontWeight weight, FontStretch stretch)
+ public override object GetSystemDefaultFont ()
{
- object o = NSFont.FromFontName (fontName, (float)size);
+ return NSFont.SystemFontOfSize (0);
+ }
+
+ public override object GetSystemDefaultMonospaceFont ()
+ {
+ var font = NSFont.SystemFontOfSize (0);
+ return Create ("Menlo", font.PointSize, FontStyle.Normal, FontWeight.Normal, FontStretch.Normal);
+ }
+
+ public override System.Collections.Generic.IEnumerable<string> GetInstalledFonts ()
+ {
+ return NSFontManager.SharedFontManager.AvailableFontFamilies;
+ }
+
+ public override object Create (string fontName, double size, FontStyle style, FontWeight weight, FontStretch stretch)
+ {
+ object o = NSFont.FromFontName (fontName, (float)size);
+ o = SetStyle (o, style);
+ o = SetWeight (o, weight);
+ o = SetStretch (o, stretch);
return o;
}
#region IFontBackendHandler implementation
- public object Copy (object handle)
+ public override object Copy (object handle)
{
NSFont f = (NSFont) handle;
- return NSFont.FromDescription (f.FontDescriptor, f.FontDescriptor.Matrix);
+ return f.Copy ();
}
- public object SetSize (object handle, double size, FontSizeUnit sizeUnit)
+ public override object SetSize (object handle, double size)
{
NSFont f = (NSFont) handle;
- return NSFont.FromDescription (f.FontDescriptor.FontDescriptorWithSize ((float)size), null);
+ return NSFontManager.SharedFontManager.ConvertFont (f, (float)size);
}
- public object SetFamily (object handle, string family)
+ public override object SetFamily (object handle, string family)
{
NSFont f = (NSFont) handle;
- return NSFont.FromDescription (f.FontDescriptor.FontDescriptorWithFamily (family), null);
+ return NSFontManager.SharedFontManager.ConvertFontToFamily (f, family);
}
- public object SetStyle (object handle, FontStyle style)
+ public override object SetStyle (object handle, FontStyle style)
{
NSFont f = (NSFont) handle;
- NSFontSymbolicTraits traits = f.FontDescriptor.SymbolicTraits;
+ NSFontTraitMask mask;
if (style == FontStyle.Italic || style == FontStyle.Oblique)
- traits |= NSFontSymbolicTraits.ItalicTrait;
+ mask = NSFontTraitMask.Italic;
else
- traits &= ~NSFontSymbolicTraits.ItalicTrait;
-
- return NSFont.FromDescription (f.FontDescriptor.FontDescriptorWithSymbolicTraits (traits), null);
+ mask = NSFontTraitMask.Unitalic;
+ return NSFontManager.SharedFontManager.ConvertFont (f, mask);
}
- public object SetWeight (object handle, FontWeight weight)
+ public override object SetWeight (object handle, FontWeight weight)
{
NSFont f = (NSFont) handle;
- NSFontSymbolicTraits traits = f.FontDescriptor.SymbolicTraits;
+ NSFontTraitMask mask;
if (weight > FontWeight.Normal)
- traits |= NSFontSymbolicTraits.BoldTrait;
+ mask = NSFontTraitMask.Bold;
else
- traits &= ~NSFontSymbolicTraits.BoldTrait;
-
- return NSFont.FromDescription (f.FontDescriptor.FontDescriptorWithSymbolicTraits (traits), null);
+ mask = NSFontTraitMask.Unbold;
+ return NSFontManager.SharedFontManager.ConvertFont (f, mask);
}
- public object SetStretch (object handle, FontStretch stretch)
+ public override object SetStretch (object handle, FontStretch stretch)
{
NSFont f = (NSFont) handle;
- NSFontSymbolicTraits traits = f.FontDescriptor.SymbolicTraits;
if (stretch < FontStretch.Normal) {
- traits |= NSFontSymbolicTraits.CondensedTrait;
- traits &= ~NSFontSymbolicTraits.ExpandedTrait;
+ f = NSFontManager.SharedFontManager.ConvertFont (f, NSFontTraitMask.Condensed);
+ f = NSFontManager.SharedFontManager.ConvertFontToNotHaveTrait (f, NSFontTraitMask.Expanded);
}
else if (stretch > FontStretch.Normal) {
- traits |= NSFontSymbolicTraits.ExpandedTrait;
- traits &= ~NSFontSymbolicTraits.CondensedTrait;
+ f = NSFontManager.SharedFontManager.ConvertFont (f, NSFontTraitMask.Expanded);
+ f = NSFontManager.SharedFontManager.ConvertFontToNotHaveTrait (f, NSFontTraitMask.Condensed);
}
else {
- traits &= ~NSFontSymbolicTraits.ExpandedTrait;
- traits &= ~NSFontSymbolicTraits.CondensedTrait;
+ f = NSFontManager.SharedFontManager.ConvertFontToNotHaveTrait (f, NSFontTraitMask.Condensed | NSFontTraitMask.Expanded);
}
-
- return NSFont.FromDescription (f.FontDescriptor.FontDescriptorWithSymbolicTraits (traits), null);
+ return f;
}
- public double GetSize (object handle)
+ public override double GetSize (object handle)
{
NSFont f = (NSFont) handle;
return f.PointSize;
}
- public string GetFamily (object handle)
+ public override string GetFamily (object handle)
{
NSFont f = (NSFont) handle;
return f.FamilyName;
}
- public FontStyle GetStyle (object handle)
+ public override FontStyle GetStyle (object handle)
{
NSFont f = (NSFont) handle;
if ((f.FontDescriptor.SymbolicTraits & NSFontSymbolicTraits.ItalicTrait) != 0)
@@ -124,7 +138,7 @@ namespace Xwt.Mac
return FontStyle.Normal;
}
- public FontWeight GetWeight (object handle)
+ public override FontWeight GetWeight (object handle)
{
NSFont f = (NSFont) handle;
if ((f.FontDescriptor.SymbolicTraits & NSFontSymbolicTraits.BoldTrait) != 0)
@@ -133,12 +147,13 @@ namespace Xwt.Mac
return FontWeight.Normal;
}
- public FontStretch GetStretch (object handle)
+ public override FontStretch GetStretch (object handle)
{
NSFont f = (NSFont) handle;
- if ((f.FontDescriptor.SymbolicTraits & NSFontSymbolicTraits.CondensedTrait) != 0)
+ var traits = NSFontManager.SharedFontManager.TraitsOfFont (f);
+ if ((traits & NSFontTraitMask.Condensed) != 0)
return FontStretch.Condensed;
- else if ((f.FontDescriptor.SymbolicTraits & NSFontSymbolicTraits.ExpandedTrait) != 0)
+ else if ((traits & NSFontTraitMask.Expanded) != 0)
return FontStretch.Expanded;
else
return FontStretch.Normal;
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/FrameBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/FrameBackend.cs
index ce687f6..d21073c 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/FrameBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/FrameBackend.cs
@@ -33,26 +33,55 @@ namespace Xwt.Mac
public class FrameBackend: ViewBackend<NSBox,IFrameEventSink>, IFrameBackend
{
Color borderColor;
+ NSView currentChild;
public override void Initialize ()
{
ViewObject = new MacFrame ();
- Widget.ContentViewMargins = new System.Drawing.SizeF (0,0);
- Widget.SizeToFit ();
}
#region IFrameBackend implementation
public void SetFrameType (FrameType type)
{
switch (type) {
- case FrameType.WidgetBox: Widget.BoxType = NSBoxType.NSBoxPrimary; break;
- case FrameType.Custom: Widget.BoxType = NSBoxType.NSBoxCustom; break;
+ case FrameType.WidgetBox:
+ Widget.BoxType = NSBoxType.NSBoxPrimary;
+ Widget.ContentViewMargins = new System.Drawing.SizeF (5,5);
+ break;
+ case FrameType.Custom:
+ Widget.BoxType = NSBoxType.NSBoxCustom;
+ Widget.ContentViewMargins = new System.Drawing.SizeF (0,0);
+ break;
}
}
public void SetContent (IWidgetBackend child)
{
- Widget.SizeToFit ();
+ if (currentChild != null) {
+ currentChild.RemoveFromSuperview ();
+ currentChild = null;
+ }
+ if (child == null)
+ return;
+
+ var childBackend = (ViewBackend) child;
+
+ currentChild = GetWidget (childBackend);
+
+ var contentView = (NSView)Widget.ContentView;
+ contentView.AddSubview (currentChild);
+ ResetFittingSize ();
+ }
+
+ protected override void OnSizeToFit ()
+ {
+ if (currentChild != null) {
+ var s = ((IViewObject)currentChild).Backend.Frontend.Surface.GetPreferredSize ();
+ var frame = (Frame)Frontend;
+ currentChild.Frame = new System.Drawing.RectangleF (0, 0, (float)s.Width, (float)s.Height);
+ Widget.SizeToFit ();
+ Widget.SetFrameSize (new System.Drawing.SizeF ((float)(Widget.Frame.Width + frame.Padding.HorizontalSpacing), (float)(Widget.Frame.Height + frame.Padding.VerticalSpacing)));
+ }
}
public void SetBorderSize (double left, double right, double top, double bottom)
@@ -61,6 +90,14 @@ namespace Xwt.Mac
public void SetPadding (double left, double right, double top, double bottom)
{
+ var cv = (CustomContentView)Widget.ContentView;
+ cv.UpdatePlacement ();
+ }
+
+ public override void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ var cv = (CustomContentView)Widget.ContentView;
+ cv.UpdatePlacement ();
}
public string Label {
@@ -96,6 +133,12 @@ namespace Xwt.Mac
class MacFrame: NSBox, IViewObject
{
+ public MacFrame ()
+ {
+ Title = "";
+ ContentView = new CustomContentView ();
+ }
+
#region IViewObject implementation
public NSView View {
get {
@@ -103,9 +146,34 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
#endregion
}
+
+ class CustomContentView: NSView
+ {
+ public override bool IsFlipped {
+ get {
+ return true;
+ }
+ }
+ public override void SetFrameSize (System.Drawing.SizeF newSize)
+ {
+ base.SetFrameSize (newSize);
+ UpdatePlacement ();
+ }
+
+ public void UpdatePlacement ()
+ {
+ if (Subviews.Length > 0) {
+ var frame = (Frame) ((IViewObject)Superview).Backend.Frontend;
+ var v = Subviews [0];
+ var r = new Rectangle (frame.PaddingLeft, frame.PaddingTop, Frame.Width - frame.Padding.HorizontalSpacing, Frame.Height - frame.Padding.VerticalSpacing);
+ r = ((IViewObject)v).Backend.Frontend.Surface.GetPlacementInRect (r);
+ v.Frame = r.ToRectangleF ();
+ }
+ }
+ }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/GradientBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/GradientBackendHandler.cs
index e9cd660..6254e58 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/GradientBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/GradientBackendHandler.cs
@@ -33,9 +33,9 @@ using System.Collections.Generic;
namespace Xwt.Mac
{
- public class GradientBackendHandler: IGradientBackendHandler
+ public class MacGradientBackendHandler: GradientBackendHandler
{
- public object CreateLinear (double x0, double y0, double x1, double y1)
+ public override object CreateLinear (double x0, double y0, double x1, double y1)
{
return new GradientInfo () {
Linear = true,
@@ -44,7 +44,11 @@ namespace Xwt.Mac
};
}
- public object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
+ public override void Dispose (object backend)
+ {
+ }
+
+ public override object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
{
return new GradientInfo () {
Linear = false,
@@ -54,8 +58,8 @@ namespace Xwt.Mac
EndRadius = (float)radius1
};
}
-
- public void AddColorStop (object backend, double position, Xwt.Drawing.Color color)
+
+ public override void AddColorStop (object backend, double position, Xwt.Drawing.Color color)
{
GradientInfo gr = (GradientInfo) backend;
gr.Colors.Add (color.ToCGColor ());
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/IViewObject.cs b/external/xwt/Xwt.Mac/Xwt.Mac/IViewObject.cs
index 365fcab..604f744 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/IViewObject.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/IViewObject.cs
@@ -32,7 +32,7 @@ namespace Xwt.Mac
public interface IViewObject
{
NSView View { get; }
- Widget Frontend { get; set; }
+ ViewBackend Backend { get; set; }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ImageBuilderBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ImageBuilderBackendHandler.cs
index b37f7e3..2483305 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ImageBuilderBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ImageBuilderBackendHandler.cs
@@ -32,14 +32,14 @@ using System.Drawing;
namespace Xwt.Mac
{
- public class ImageBuilderBackendHandler: IImageBuilderBackendHandler
+ public class MacImageBuilderBackendHandler: ImageBuilderBackendHandler
{
- public ImageBuilderBackendHandler ()
+ public MacImageBuilderBackendHandler ()
{
}
#region IImageBuilderBackendHandler implementation
- public object CreateImageBuilder (int width, int height, ImageFormat format)
+ public override object CreateImageBuilder (int width, int height, ImageFormat format)
{
var flags = CGBitmapFlags.ByteOrderDefault;
int bytesPerRow;
@@ -58,24 +58,34 @@ namespace Xwt.Mac
default:
throw new NotImplementedException ("ImageFormat: " + format.ToString ());
}
+
+ var bmp = new CGBitmapContext (IntPtr.Zero, width, height, 8, bytesPerRow, Util.DeviceRGBColorSpace, flags);
+ bmp.TranslateCTM (0, height);
+ bmp.ScaleCTM (1, -1);
return new CGContextBackend {
- Context = new CGBitmapContext (IntPtr.Zero, width, height, 8, bytesPerRow, Util.DeviceRGBColorSpace, flags),
- Size = new SizeF (width, height)
+ Context = bmp,
+ Size = new SizeF (width, height),
+ InverseViewTransform = bmp.GetCTM ().Invert ()
};
}
- public object CreateContext (object backend)
+ public override object CreateContext (object backend)
{
return backend;
}
- public object CreateImage (object backend)
+ public override object CreateImage (object backend)
{
var gc = (CGContextBackend)backend;
- return new NSImage (((CGBitmapContext)gc.Context).ToImage (), gc.Size);
+ var img = new NSImage (((CGBitmapContext)gc.Context).ToImage (), gc.Size);
+ var imageData = img.AsTiff ();
+ var imageRep = (NSBitmapImageRep) NSBitmapImageRep.ImageRepFromData (imageData);
+ var im = new NSImage ();
+ im.AddRepresentation (imageRep);
+ return im;
}
- public void Dispose (object backend)
+ public override void Dispose (object backend)
{
((CGContextBackend)backend).Context.Dispose ();
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ImageHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ImageHandler.cs
index 74113c9..fd9536d 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ImageHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ImageHandler.cs
@@ -34,6 +34,8 @@ using System.Drawing;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Xwt.Drawing;
+using System.IO;
+using MonoMac.CoreGraphics;
namespace Xwt.Mac
{
@@ -46,7 +48,7 @@ namespace Xwt.Mac
static Dictionary<string, NSImage> stockIcons = new Dictionary<string, NSImage> ();
- public override object LoadFromStream (System.IO.Stream stream)
+ public override object LoadFromStream (Stream stream)
{
using (NSData data = NSData.FromStream (stream)) {
return new NSImage (data);
@@ -57,18 +59,96 @@ namespace Xwt.Mac
{
return new NSImage (file);
}
-
- public override object LoadFromIcon (string id, IconSize size)
+
+ public override object CreateMultiResolutionImage (IEnumerable<object> images)
+ {
+ NSImage res = new NSImage ();
+ foreach (NSImage img in images)
+ res.AddRepresentations (img.Representations ());
+ return res;
+ }
+
+ public override object CreateCustomDrawn (ImageDrawCallback drawCallback)
+ {
+ return new CustomImage (ApplicationContext, drawCallback);
+ }
+
+ public override Xwt.Drawing.Image GetStockIcon (string id)
{
NSImage img;
- if (!stockIcons.TryGetValue (id + size, out img)) {
- img = LoadStockIcon (id, size);
- stockIcons [id + size] = img;
+ if (!stockIcons.TryGetValue (id, out img)) {
+ img = LoadStockIcon (id);
+ stockIcons [id] = img;
+ }
+ return ApplicationContext.Toolkit.WrapImage (img);
+ }
+
+ public override void SaveToStream (object backend, System.IO.Stream stream, ImageFileType fileType)
+ {
+ NSImage img = backend as NSImage;
+ if (img == null)
+ throw new NotSupportedException ();
+
+ var imageData = img.AsTiff ();
+ var imageRep = (NSBitmapImageRep) NSBitmapImageRep.ImageRepFromData (imageData);
+ var props = new NSDictionary ();
+ imageData = imageRep.RepresentationUsingTypeProperties (fileType.ToMacFileType (), props);
+ using (var s = imageData.AsStream ()) {
+ s.CopyTo (stream);
}
- return img;
+ }
+
+ public override bool IsBitmap (object handle)
+ {
+ NSImage img = handle as NSImage;
+ return img != null && img.Representations ().OfType<NSBitmapImageRep> ().Any ();
+ }
+
+ public override object ConvertToBitmap (object handle, int pixelWidth, int pixelHeight, ImageFormat format)
+ {
+ if (handle is CustomImage) {
+ var flags = CGBitmapFlags.ByteOrderDefault;
+ int bytesPerRow;
+ switch (format) {
+ case ImageFormat.ARGB32:
+ bytesPerRow = pixelWidth * 4;
+ flags |= CGBitmapFlags.PremultipliedFirst;
+ break;
+
+ case ImageFormat.RGB24:
+ bytesPerRow = pixelWidth * 3;
+ flags |= CGBitmapFlags.None;
+ break;
+
+ default:
+ throw new NotImplementedException ("ImageFormat: " + format.ToString ());
+ }
+
+ var bmp = new CGBitmapContext (IntPtr.Zero, pixelWidth, pixelHeight, 8, bytesPerRow, Util.DeviceRGBColorSpace, flags);
+ bmp.TranslateCTM (0, pixelHeight);
+ bmp.ScaleCTM (1, -1);
+
+ var ctx = new CGContextBackend {
+ Context = bmp,
+ Size = new SizeF (pixelWidth, pixelHeight),
+ InverseViewTransform = bmp.GetCTM ().Invert ()
+ };
+
+ var ci = (CustomImage)handle;
+ ci.DrawInContext (ctx);
+
+ var img = new NSImage (((CGBitmapContext)bmp).ToImage (), new SizeF (pixelWidth, pixelHeight));
+ var imageData = img.AsTiff ();
+ var imageRep = (NSBitmapImageRep) NSBitmapImageRep.ImageRepFromData (imageData);
+ var im = new NSImage ();
+ im.AddRepresentation (imageRep);
+ return im;
+ }
+ else
+ return handle;
}
- public override Xwt.Drawing.Color GetPixel (object handle, int x, int y)
+ public override Xwt.Drawing.Color GetBitmapPixel (object handle, int x, int y)
{
NSImage img = (NSImage)handle;
NSBitmapImageRep bitmap = img.Representations ().OfType<NSBitmapImageRep> ().FirstOrDefault ();
@@ -78,7 +158,7 @@ namespace Xwt.Mac
throw new InvalidOperationException ("Not a bitmnap image");
}
- public override void SetPixel (object handle, int x, int y, Xwt.Drawing.Color color)
+ public override void SetBitmapPixel (object handle, int x, int y, Xwt.Drawing.Color color)
{
NSImage img = (NSImage)handle;
NSBitmapImageRep bitmap = img.Representations ().OfType<NSBitmapImageRep> ().FirstOrDefault ();
@@ -87,34 +167,30 @@ namespace Xwt.Mac
else
throw new InvalidOperationException ("Not a bitmnap image");
}
-
- public override Size GetSize (object handle)
+
+ public override bool HasMultipleSizes (object handle)
{
NSImage img = (NSImage)handle;
- return new Size ((int)img.Size.Width, (int)img.Size.Height);
+ return img.Size.Width == 0 && img.Size.Height == 0;
}
- public override object Resize (object handle, double width, double height)
- {
- throw new NotImplementedException ();
- }
-
- public override object Copy (object handle)
+ public override Size GetSize (object handle)
{
- throw new NotImplementedException ();
+ NSImage img = (NSImage)handle;
+ return new Size ((int)img.Size.Width, (int)img.Size.Height);
}
- public override void CopyArea (object backend, int srcX, int srcY, int width, int height, object dest, int destX, int destY)
+ public override object CopyBitmap (object handle)
{
- throw new NotImplementedException ();
+ return ((NSImage)handle).Copy ();
}
- public override object Crop (object backend, int srcX, int srcY, int width, int height)
+ public override void CopyBitmapArea (object backend, int srcX, int srcY, int width, int height, object dest, int destX, int destY)
{
throw new NotImplementedException ();
}
- public override object ChangeOpacity (object backend, double opacity)
+ public override object CropBitmap (object backend, int srcX, int srcY, int width, int height)
{
throw new NotImplementedException ();
}
@@ -127,16 +203,20 @@ namespace Xwt.Mac
return new NSImage (data);
}
}
+
+ static NSImage NSImageFromResource (string id)
+ {
+ return (NSImage) Toolkit.GetBackend (Xwt.Drawing.Image.FromResource (typeof(ImageHandler), id));
+ }
- static NSImage LoadStockIcon (string id, IconSize size)
+ static NSImage LoadStockIcon (string id)
{
- NSImage image = null;
-
switch (id) {
- case StockIcons.ZoomIn: image = FromResource ("magnifier-zoom-in.png"); break;
- case StockIcons.ZoomOut: image = FromResource ("magnifier-zoom-out.png"); break;
+ case StockIconId.ZoomIn: return NSImageFromResource ("zoom-in.png");
+ case StockIconId.ZoomOut: return NSImageFromResource ("zoom-out.png");
}
+ NSImage image = null;
IntPtr iconRef;
var type = Util.ToIconType (id);
if (type != 0 && GetIconRef (-32768/*kOnSystemDisk*/, 1835098995/*kSystemIconsCreator*/, type, out iconRef) == 0) {
@@ -149,8 +229,6 @@ namespace Xwt.Mac
}
}
- if (image != null)
- image.Size = Util.ToIconSize (size);
return image;
}
@@ -159,5 +237,55 @@ namespace Xwt.Mac
[DllImport ("/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/LaunchServices")]
static extern int ReleaseIconRef (IntPtr iconRef);
}
+
+
+ public class CustomImage: NSImage
+ {
+ ImageDrawCallback drawCallback;
+ ApplicationContext actx;
+ NSCustomImageRep imgRep;
+
+ public CustomImage (ApplicationContext actx, ImageDrawCallback drawCallback)
+ {
+ this.actx = actx;
+ this.drawCallback = drawCallback;
+ imgRep = new NSCustomImageRep (new Selector ("drawIt:"), this);
+ AddRepresentation (imgRep);
+ }
+
+ [Export ("drawIt:")]
+ public void DrawIt (NSObject ob)
+ {
+ CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;
+ DrawInContext (ctx);
+ }
+
+ internal void DrawInContext (CGContext ctx)
+ {
+ var backend = new CGContextBackend {
+ Context = ctx,
+ InverseViewTransform = ctx.GetCTM ().Invert ()
+ };
+ DrawInContext (backend);
+ }
+
+ internal void DrawInContext (CGContextBackend ctx)
+ {
+ var s = ctx.Size != SizeF.Empty ? ctx.Size : Size;
+ actx.InvokeUserCode (delegate {
+ drawCallback (ctx, new Rectangle (0, 0, s.Width, s.Height));
+ });
+ }
+
+ public override CGImage AsCGImage (ref RectangleF proposedDestRect, NSGraphicsContext referenceContext, NSDictionary hints)
+ {
+ return base.AsCGImage (ref proposedDestRect, referenceContext, hints);
+ }
+
+ public CustomImage Clone ()
+ {
+ return new CustomImage (actx, drawCallback);
+ }
+ }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ImagePatternBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ImagePatternBackendHandler.cs
index 79de161..2178fa7 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ImagePatternBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ImagePatternBackendHandler.cs
@@ -31,16 +31,26 @@ using MonoMac.CoreGraphics;
namespace Xwt.Mac
{
- public class ImagePatternBackendHandler: IImagePatternBackendHandler
+ public class MacImagePatternBackendHandler: ImagePatternBackendHandler
{
- public object Create (object img)
+ public override object Create (ImageDescription img)
{
- NSImage nimg = (NSImage) img;
- RectangleF bounds = new RectangleF (PointF.Empty, nimg.Size);
- CGImage cgimg = nimg.AsCGImage (RectangleF.Empty, null, null);
- return new CGPattern (bounds, CGAffineTransform.MakeScale (1f, -1f), bounds.Width, bounds.Height,
- CGPatternTiling.ConstantSpacing, true, ctx => ctx.DrawImage (bounds, cgimg));
+ NSImage nimg = img.ToNSImage ();
+ return new ImagePatternInfo () {
+ Image = nimg,
+ Alpha = img.Alpha
+ };
}
+
+ public override void Dispose (object img)
+ {
+ }
+ }
+
+ class ImagePatternInfo
+ {
+ public NSImage Image;
+ public double Alpha;
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ImageViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ImageViewBackend.cs
index 50a28ee..58c1913 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ImageViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ImageViewBackend.cs
@@ -26,6 +26,8 @@
using System;
using Xwt.Backends;
using MonoMac.AppKit;
+using Xwt.Drawing;
+using MonoMac.ObjCRuntime;
namespace Xwt.Mac
{
@@ -39,19 +41,25 @@ namespace Xwt.Mac
{
base.Initialize ();
ViewObject = new CustomNSImageView ();
- Widget.SizeToFit ();
}
- public void SetImage (object nativeImage)
+ protected override Size GetNaturalSize ()
{
- if (nativeImage == null)
- throw new ArgumentNullException ("nativeImage");
+ NSImage img = Widget.Image;
+ return img == null ? Size.Zero : img.Size.ToXwtSize ();
+ }
+
+ static readonly Selector setImage = new Selector ("setImage:");
- NSImage image = nativeImage as NSImage;
- if (image == null)
- throw new ArgumentException ("nativeImage is not of the expected type", "nativeImage");
+ public void SetImage (ImageDescription image)
+ {
+ if (image.IsNull) {
+ // NSImage.Image incorrectly checks for null
+ Messaging.void_objc_msgSend_IntPtr (Widget.Handle, setImage.Handle, IntPtr.Zero);
+ return;
+ }
- Widget.Image = image;
+ Widget.Image = image.ToNSImage ();
Widget.SetFrameSize (Widget.Image.Size);
}
}
@@ -64,7 +72,7 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/LabelBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/LabelBackend.cs
index d1e2715..b49f8ba 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/LabelBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/LabelBackend.cs
@@ -27,13 +27,15 @@
using System;
using MonoMac.AppKit;
using Xwt.Backends;
+using MonoMac.Foundation;
+using MonoMac.ObjCRuntime;
namespace Xwt.Mac
{
- public class LabelBackend: ViewBackend<NSTextField,IWidgetEventSink>, ILabelBackend
+ public class LabelBackend: ViewBackend<NSView,IWidgetEventSink>, ILabelBackend
{
public LabelBackend ()
- : this (new TextFieldView ())
+ : this (new CustomAlignedContainer (new TextFieldView ()))
{
}
@@ -43,7 +45,19 @@ namespace Xwt.Mac
Widget.Editable = false;
Widget.Bezeled = false;
Widget.DrawsBackground = false;
- Widget.SizeToFit ();
+ }
+
+ protected override void OnSizeToFit ()
+ {
+ Container.SizeToFit ();
+ }
+
+ CustomAlignedContainer Container {
+ get { return (CustomAlignedContainer)base.Widget; }
+ }
+
+ public new NSTextField Widget {
+ get { return (NSTextField) Container.Child; }
}
public virtual string Text {
@@ -52,10 +66,15 @@ namespace Xwt.Mac
}
set {
Widget.StringValue = value;
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
}
+ public void SetFormattedText (FormattedText text)
+ {
+ Widget.AttributedStringValue = text.ToAttributedString ();
+ }
+
public Xwt.Drawing.Color TextColor {
get { return Widget.TextColor.ToXwtColor (); }
set { Widget.TextColor = value.ToNSColor (); }
@@ -63,19 +82,10 @@ namespace Xwt.Mac
public Alignment TextAlignment {
get {
- switch (Widget.Alignment) {
- case NSTextAlignment.Left: return Alignment.Start;
- case NSTextAlignment.Center: return Alignment.Center;
- case NSTextAlignment.Right: return Alignment.End;
- }
- return Alignment.Start;
+ return Widget.Alignment.ToAlignment ();
}
set {
- switch (value) {
- case Alignment.Start: Widget.Alignment = NSTextAlignment.Left; break;
- case Alignment.Center: Widget.Alignment = NSTextAlignment.Center; break;
- case Alignment.End: Widget.Alignment = NSTextAlignment.Right; break;
- }
+ Widget.Alignment = value.ToNSTextAlignment ();
}
}
@@ -139,10 +149,64 @@ namespace Xwt.Mac
}
}
}
+
+ sealed class CustomAlignedContainer: NSView, IViewObject
+ {
+ public NSView Child;
+
+ public CustomAlignedContainer (NSView child)
+ {
+ Child = child;
+ AddSubview (child);
+ UpdateTextFieldFrame ();
+ }
+
+ public ViewBackend Backend { get; set; }
+
+ public NSView View {
+ get { return this; }
+ }
+
+ static readonly Selector sizeToFitSel = new Selector ("sizeToFit");
+
+ public void SizeToFit ()
+ {
+ if (Child.RespondsToSelector (sizeToFitSel))
+ Messaging.void_objc_msgSend (Child.Handle, sizeToFitSel.Handle);
+ else
+ throw new NotSupportedException ();
+ Frame = new System.Drawing.RectangleF (Frame.X, Frame.Y, Child.Frame.Width, Child.Frame.Height);
+ }
+
+ bool expandVertically;
+ public bool ExpandVertically {
+ get {
+ return expandVertically;
+ }
+ set {
+ expandVertically = value;
+ UpdateTextFieldFrame ();
+ }
+ }
+
+ public override void SetFrameSize (System.Drawing.SizeF newSize)
+ {
+ base.SetFrameSize (newSize);
+ UpdateTextFieldFrame ();
+ }
+
+ void UpdateTextFieldFrame ()
+ {
+ if (expandVertically)
+ Child.Frame = Frame;
+ else
+ Child.Frame = new System.Drawing.RectangleF (0, (Frame.Height - Child.Frame.Height) / 2, Frame.Width, Child.Frame.Height);
+ }
+ }
class TextFieldView: NSTextField, IViewObject
{
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/LinkLabelBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/LinkLabelBackend.cs
index 8f4ed88..e8491fd 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/LinkLabelBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/LinkLabelBackend.cs
@@ -84,7 +84,7 @@ namespace Xwt.Mac
void HandleClicked (object sender, EventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (() => {
+ ApplicationContext.InvokeUserCode (() => {
EventSink.OnNavigateToUrl (uri);
});
}
@@ -112,7 +112,7 @@ namespace Xwt.Mac
{
// Unfortunately, cocoa calls MouseUp even if the mouse is not still over this control so we have to check that
var location = ConvertPointFromView (theEvent.LocationInWindow, null);
- if (Clicked != null && MouseinRect (location, Cell.DrawingRectForBounds (Bounds)))
+ if (Clicked != null && IsMouseInRect (location, Cell.DrawingRectForBounds (Bounds)))
Clicked (this, EventArgs.Empty);
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ListBoxBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ListBoxBackend.cs
new file mode 100644
index 0000000..0eca529
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ListBoxBackend.cs
@@ -0,0 +1,58 @@
+//
+// ListBoxBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ public class ListBoxBackend: ListViewBackend, IListBoxBackend
+ {
+ ListViewColumn column = new ListViewColumn ();
+ object columnHandle;
+
+ public ListBoxBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ base.Initialize ();
+ HeadersVisible = false;
+ columnHandle = AddColumn (column);
+ VerticalScrollPolicy = ScrollPolicy.Automatic;
+ HorizontalScrollPolicy = ScrollPolicy.Automatic;
+ }
+
+ public void SetViews (CellViewCollection views)
+ {
+ column.Views.Clear ();
+ foreach (var v in views)
+ column.Views.Add (v);
+ UpdateColumn (column, columnHandle, ListViewColumnChange.Cells);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ListViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ListViewBackend.cs
index 0474a30..42f1bcc 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ListViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ListViewBackend.cs
@@ -77,6 +77,11 @@ namespace Xwt.Mac
{
return source.GetValue ((int)pos, nField);
}
+
+ public override void SetValue (object pos, int nField, object value)
+ {
+ source.SetValue ((int)pos, nField, value);
+ }
// TODO
public bool BorderVisible { get; set; }
@@ -112,7 +117,7 @@ namespace Xwt.Mac
public override MonoMac.Foundation.NSObject GetObjectValue (NSTableView tableView, NSTableColumn tableColumn, int row)
{
- return new TableRow () { Row = row };
+ return NSObject.FromObject (row);
}
public override int GetRowCount (NSTableView tableView)
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MacClipboardBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MacClipboardBackend.cs
new file mode 100644
index 0000000..5fcf843
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MacClipboardBackend.cs
@@ -0,0 +1,124 @@
+//
+// MacClipboardBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.IO;
+using Xwt.Backends;
+
+using MonoMac.Foundation;
+using MonoMac.AppKit;
+
+namespace Xwt.Mac
+{
+ public class MacClipboardBackend: ClipboardBackend
+ {
+ PasteboardOwner owner;
+
+ public MacClipboardBackend ()
+ {
+ owner = new PasteboardOwner ();
+ }
+
+ #region implemented abstract members of ClipboardBackend
+
+ public override void Clear ()
+ {
+ NSPasteboard.GeneralPasteboard.ClearContents ();
+ }
+
+ public override void SetData (TransferDataType type, Func<object> dataSource)
+ {
+ var pboard = NSPasteboard.GeneralPasteboard;
+ pboard.ClearContents ();
+ owner.DataSource = dataSource;
+ pboard.AddTypes (new[] { type.ToUTI () }, owner);
+ }
+
+ public override bool IsTypeAvailable (TransferDataType type)
+ {
+ return NSPasteboard.GeneralPasteboard.CanReadItemWithDataConformingToTypes (new[] { type.ToUTI () });
+ }
+
+ public override object GetData (TransferDataType type)
+ {
+ if (type == TransferDataType.Uri)
+ return (Uri)NSUrl.FromPasteboard (NSPasteboard.GeneralPasteboard);
+
+ var data = NSPasteboard.GeneralPasteboard.GetDataForType (type.ToUTI ());
+ if (data == null)
+ return null;
+
+ if (type == TransferDataType.Text)
+ return data.ToString ();
+ if (type == TransferDataType.Image)
+ return new NSImage (data);
+
+ unsafe {
+ var bytes = new byte [data.Length];
+ using (var stream = new UnmanagedMemoryStream ((byte*)data.Bytes, bytes.Length))
+ stream.Read (bytes, 0, bytes.Length);
+ return TransferDataSource.DeserializeValue (bytes);
+ }
+ }
+
+ public override IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override object EndGetData (IAsyncResult ares)
+ {
+ throw new NotImplementedException ();
+ }
+
+ #endregion
+ }
+
+ [Register ("XwtPasteboardOwner")]
+ class PasteboardOwner : NSObject
+ {
+ public Func<object> DataSource {
+ get;
+ set;
+ }
+
+ [Export ("pasteboard:provideDataForType:")]
+ public void ProvideData (NSPasteboard pboard, NSString type)
+ {
+ NSData data;
+ var obj = DataSource ();
+ if (obj is NSImage)
+ data = ((NSImage)obj).AsTiff ();
+ else if (obj is Uri)
+ data = NSData.FromUrl ((NSUrl)((Uri)obj));
+ else if (obj is string)
+ data = NSData.FromString ((string)obj);
+ else
+ data = NSData.FromArray (TransferDataSource.SerializeValue (obj));
+ pboard.SetDataForType (data, type);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MacDesktopBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MacDesktopBackend.cs
new file mode 100644
index 0000000..c7c64e6
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MacDesktopBackend.cs
@@ -0,0 +1,113 @@
+//
+// MacDesktopBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+using MonoMac.AppKit;
+
+namespace Xwt.Mac
+{
+ public class MacDesktopBackend: DesktopBackend
+ {
+ #region implemented abstract members of DesktopBackend
+
+ internal static MacDesktopBackend Instance;
+ internal static Rectangle desktopBounds;
+
+ public MacDesktopBackend ()
+ {
+ Instance = this;
+ CalcDesktopBounds ();
+ }
+
+ internal void NotifyScreensChanged ()
+ {
+ CalcDesktopBounds ();
+ OnScreensChanged ();
+ }
+
+ static void CalcDesktopBounds ()
+ {
+ desktopBounds = new Rectangle ();
+ foreach (var s in NSScreen.Screens) {
+ var r = s.Frame;
+ desktopBounds = desktopBounds.Union (new Rectangle (r.X, r.Y, r.Width, r.Height));
+ }
+ }
+
+ public override Point GetMouseLocation ()
+ {
+ var loc = NSEvent.CurrentMouseLocation;
+ return new Point (loc.X, loc.Y);
+ }
+
+ public override IEnumerable<object> GetScreens ()
+ {
+ return NSScreen.Screens;
+ }
+
+ public override bool IsPrimaryScreen (object backend)
+ {
+ return NSScreen.Screens[0] == (NSScreen) backend;
+ }
+
+ public static Rectangle ToDesktopRect (System.Drawing.RectangleF r)
+ {
+ r.Y = (float)desktopBounds.Height - r.Y - r.Height;
+ if (desktopBounds.Y < 0)
+ r.Y += (float)desktopBounds.Y;
+ return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ }
+
+ public static System.Drawing.RectangleF FromDesktopRect (Rectangle r)
+ {
+ r.Y = (float)desktopBounds.Height - r.Y - r.Height;
+ if (desktopBounds.Y < 0)
+ r.Y += (float)desktopBounds.Y;
+ return new System.Drawing.RectangleF ((float)r.X, (float)r.Y, (float)r.Width, (float)r.Height);
+ }
+
+ public override Rectangle GetScreenBounds (object backend)
+ {
+ var r = ((NSScreen)backend).Frame;
+ return ToDesktopRect (r);
+ }
+
+ public override Rectangle GetScreenVisibleBounds (object backend)
+ {
+ var r = ((NSScreen)backend).VisibleFrame;
+ return ToDesktopRect (r);
+ }
+
+ public override string GetScreenDeviceName (object backend)
+ {
+ return ((NSScreen)backend).DeviceDescription ["NSScreenNumber"].ToString ();
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MacEngine.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MacEngine.cs
index c41bdd9..1f0e503 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/MacEngine.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MacEngine.cs
@@ -25,19 +25,20 @@
// THE SOFTWARE.
using System;
-using Xwt.Engine;
+
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+using MonoMac.CoreGraphics;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Xwt.Backends;
namespace Xwt.Mac
{
- class MacEngine: Xwt.Backends.EngineBackend
+ public class MacEngine: Xwt.Backends.ToolkitEngineBackend
{
- static AppDelegate appDelegate = new AppDelegate ();
+ static AppDelegate appDelegate;
static NSAutoreleasePool pool;
public static AppDelegate App {
@@ -48,55 +49,76 @@ namespace Xwt.Mac
{
NSApplication.Init ();
//Hijack ();
+ if (pool != null)
+ pool.Dispose ();
pool = new NSAutoreleasePool ();
+ appDelegate = new AppDelegate (IsGuest);
NSApplication.SharedApplication.Delegate = appDelegate;
- WidgetRegistry.RegisterBackend (typeof(Xwt.Window), typeof(WindowBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Label), typeof(LabelBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.HBox), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.VBox), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Button), typeof(ButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Notebook), typeof(NotebookBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.TreeView), typeof(TreeViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ListView), typeof(ListViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Canvas), typeof(CanvasBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Image), typeof(ImageHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Context), typeof(ContextBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.ImageBuilder), typeof(ImageBuilderBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.ImagePattern), typeof(ImagePatternBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Gradient), typeof(GradientBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.TextLayout), typeof(TextLayoutBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Drawing.Font), typeof(FontBackendHandler));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Menu), typeof(MenuBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.MenuItem), typeof(MenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.CheckBoxMenuItem), typeof(CheckBoxMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.RadioButtonMenuItem), typeof(RadioButtonMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SeparatorMenuItem), typeof(SeparatorMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ComboBox), typeof(ComboBoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ComboBoxEntry), typeof(ComboBoxEntryBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.TextEntry), typeof(TextEntryBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ImageView), typeof(ImageViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Table), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.CheckBox), typeof(CheckBoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Frame), typeof(FrameBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ScrollView), typeof(ScrollViewBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ToggleButton), typeof(ToggleButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.VSeparator), typeof(SeparatorBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.HSeparator), typeof(SeparatorBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.HPaned), typeof(PanedBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.VPaned), typeof(PanedBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Backends.IAlertDialogBackend), typeof(AlertDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.StatusIcon), typeof(StatusIconBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ProgressBar), typeof(ProgressBarBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.ListStore), typeof(Xwt.DefaultListStoreBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.LinkLabel), typeof (LinkLabelBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Placement), typeof(BoxBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Spinner), typeof(SpinnerBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SpinButton), typeof(SpinButtonBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Expander), typeof(ExpanderBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.Popover), typeof (PopoverBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.SelectFolderDialog), typeof(SelectFolderDialogBackend));
- WidgetRegistry.RegisterBackend (typeof(Xwt.OpenFileDialog), typeof(OpenFileDialogBackend));
+ // If NSPrincipalClass is not set, set it now. This allows running
+ // the application without a bundle
+ var info = NSBundle.MainBundle.InfoDictionary;
+ if (info.ValueForKey ((NSString)"NSPrincipalClass") == null)
+ info.SetValueForKey ((NSString)"NSApplication", (NSString)"NSPrincipalClass");
+ }
+
+ public override void InitializeBackends ()
+ {
+ base.InitializeBackends ();
+ RegisterBackend <Xwt.Backends.ICustomWidgetBackend, CustomWidgetBackend> ();
+ RegisterBackend <Xwt.Backends.IWindowBackend, WindowBackend> ();
+ RegisterBackend <Xwt.Backends.ILabelBackend, LabelBackend> ();
+ RegisterBackend <Xwt.Backends.IBoxBackend, BoxBackend> ();
+ RegisterBackend <Xwt.Backends.IButtonBackend, ButtonBackend> ();
+ RegisterBackend <Xwt.Backends.IMenuButtonBackend, MenuButtonBackend> ();
+ RegisterBackend <Xwt.Backends.INotebookBackend, NotebookBackend> ();
+ RegisterBackend <Xwt.Backends.ITreeViewBackend, TreeViewBackend> ();
+ RegisterBackend <Xwt.Backends.IListViewBackend, ListViewBackend> ();
+ RegisterBackend <Xwt.Backends.ICanvasBackend, CanvasBackend> ();
+ RegisterBackend <Xwt.Backends.ImageBackendHandler, ImageHandler> ();
+ RegisterBackend <Xwt.Backends.ContextBackendHandler, MacContextBackendHandler> ();
+ RegisterBackend <Xwt.Backends.DrawingPathBackendHandler, MacPathBackendHandler> ();
+ RegisterBackend <Xwt.Backends.ImageBuilderBackendHandler, MacImageBuilderBackendHandler> ();
+ RegisterBackend <Xwt.Backends.ImagePatternBackendHandler, MacImagePatternBackendHandler> ();
+ RegisterBackend <Xwt.Backends.GradientBackendHandler, MacGradientBackendHandler> ();
+ RegisterBackend <Xwt.Backends.TextLayoutBackendHandler, MacTextLayoutBackendHandler> ();
+ RegisterBackend <Xwt.Backends.FontBackendHandler, MacFontBackendHandler> ();
+ RegisterBackend <Xwt.Backends.IMenuBackend, MenuBackend> ();
+ RegisterBackend <Xwt.Backends.IMenuItemBackend, MenuItemBackend> ();
+ RegisterBackend <Xwt.Backends.ICheckBoxMenuItemBackend, CheckBoxMenuItemBackend> ();
+ RegisterBackend <Xwt.Backends.IRadioButtonMenuItemBackend, RadioButtonMenuItemBackend> ();
+ RegisterBackend <Xwt.Backends.IRadioButtonBackend, RadioButtonBackend> ();
+ RegisterBackend <Xwt.Backends.ISeparatorMenuItemBackend, SeparatorMenuItemBackend> ();
+ RegisterBackend <Xwt.Backends.IComboBoxBackend, ComboBoxBackend> ();
+ RegisterBackend <Xwt.Backends.IComboBoxEntryBackend, ComboBoxEntryBackend> ();
+ RegisterBackend <Xwt.Backends.ITextEntryBackend, TextEntryBackend> ();
+ RegisterBackend <Xwt.Backends.IImageViewBackend, ImageViewBackend> ();
+ RegisterBackend <Xwt.Backends.ICheckBoxBackend, CheckBoxBackend> ();
+ RegisterBackend <Xwt.Backends.IFrameBackend, FrameBackend> ();
+ RegisterBackend <Xwt.Backends.IScrollViewBackend, ScrollViewBackend> ();
+ RegisterBackend <Xwt.Backends.IToggleButtonBackend, ToggleButtonBackend> ();
+ RegisterBackend <Xwt.Backends.ISeparatorBackend, SeparatorBackend> ();
+ RegisterBackend <Xwt.Backends.IPanedBackend, PanedBackend> ();
+ RegisterBackend <Xwt.Backends.IAlertDialogBackend, AlertDialogBackend> ();
+ RegisterBackend <Xwt.Backends.IStatusIconBackend, StatusIconBackend> ();
+ RegisterBackend <Xwt.Backends.IProgressBarBackend, ProgressBarBackend> ();
+ RegisterBackend <Xwt.Backends.IListStoreBackend, Xwt.DefaultListStoreBackend> ();
+ RegisterBackend <Xwt.Backends.ILinkLabelBackend, LinkLabelBackend> ();
+ RegisterBackend <Xwt.Backends.ISpinnerBackend, SpinnerBackend> ();
+ RegisterBackend <Xwt.Backends.ISpinButtonBackend, SpinButtonBackend> ();
+ RegisterBackend <Xwt.Backends.IExpanderBackend, ExpanderBackend> ();
+ RegisterBackend <Xwt.Backends.IPopoverBackend, PopoverBackend> ();
+ RegisterBackend <Xwt.Backends.ISelectFolderDialogBackend, SelectFolderDialogBackend> ();
+ RegisterBackend <Xwt.Backends.IOpenFileDialogBackend, OpenFileDialogBackend> ();
+ RegisterBackend <Xwt.Backends.ClipboardBackend, MacClipboardBackend> ();
+ RegisterBackend <Xwt.Backends.DesktopBackend, MacDesktopBackend> ();
+ RegisterBackend <Xwt.Backends.IMenuButtonBackend, MenuButtonBackend> ();
+ RegisterBackend <Xwt.Backends.IListBoxBackend, ListBoxBackend> ();
+ RegisterBackend <Xwt.Backends.IDialogBackend, DialogBackend> ();
+ RegisterBackend <Xwt.Backends.IRichTextViewBackend, RichTextViewBackend> ();
+ RegisterBackend <Xwt.Backends.IScrollbarBackend, ScrollbarBackend> ();
+ RegisterBackend <Xwt.Backends.IDatePickerBackend, DatePickerBackend> ();
+ RegisterBackend <Xwt.Backends.ISliderBackend, SliderBackend> ();
}
public override void RunApplication ()
@@ -135,31 +157,37 @@ namespace Xwt.Mac
if (action == null)
throw new ArgumentNullException ("action");
- NSApplication.SharedApplication.BeginInvokeOnMainThread (delegate {
+ NSRunLoop.Main.BeginInvokeOnMainThread (delegate {
action ();
});
}
public override object TimerInvoke (Func<bool> action, TimeSpan timeSpan)
{
- throw new NotImplementedException ();
+ NSTimer timer = null;
+ timer = NSTimer.CreateRepeatingScheduledTimer (timeSpan, delegate {
+ if (!action ())
+ timer.Invalidate ();
+ });
+ return timer;
}
public override void CancelTimerInvoke (object id)
{
- throw new NotImplementedException ();
+ ((NSTimer)id).Invalidate ();
}
public override object GetNativeWidget (Widget w)
{
- IMacViewBackend wb = (IMacViewBackend)WidgetRegistry.GetBackend (w);
- return wb.View;
+ ViewBackend wb = (ViewBackend)Toolkit.GetBackend (w);
+ wb.SetAutosizeMode (true);
+ return wb.Widget;
}
public override bool HasNativeParent (Widget w)
{
- IMacViewBackend wb = (IMacViewBackend)WidgetRegistry.GetBackend (w);
- return wb.View.Superview != null;
+ ViewBackend wb = (ViewBackend)Toolkit.GetBackend (w);
+ return wb.Widget.Superview != null;
}
public override Xwt.Backends.IWindowFrameBackend GetBackendForWindow (object nativeWindow)
@@ -167,8 +195,33 @@ namespace Xwt.Mac
throw new NotImplementedException ();
}
+ public override object GetBackendForContext (object nativeContext)
+ {
+ return new CGContextBackend {
+ Context = (CGContext)nativeContext
+ };
+ }
+
public override void DispatchPendingEvents ()
{
+ var until = NSDate.DistantPast;
+ var app = NSApplication.SharedApplication;
+ var p = new NSAutoreleasePool ();
+ while (true) {
+ var ev = app.NextEvent (NSEventMask.AnyEvent, until, NSRunLoop.NSDefaultRunLoopMode, true);
+ if (ev != null)
+ app.SendEvent (ev);
+ else
+ break;
+ }
+ p.Dispose ();
+ }
+
+ public override object RenderWidget (Widget w)
+ {
+ var view = ((ViewBackend)w.GetBackend ()).Widget;
+ view.LockFocus ();
+ return new NSImage (view.DataWithPdfInsideRect (view.Bounds));
}
}
@@ -177,8 +230,9 @@ namespace Xwt.Mac
bool launched;
List<WindowBackend> pendingWindows = new List<WindowBackend> ();
- public AppDelegate ()
+ public AppDelegate (bool launched)
{
+ this.launched = launched;
}
internal void ShowWindow (WindowBackend w)
@@ -197,5 +251,11 @@ namespace Xwt.Mac
foreach (var w in pendingWindows)
w.InternalShow ();
}
+
+ public override void ScreenParametersChanged (NSNotification notification)
+ {
+ if (MacDesktopBackend.Instance != null)
+ MacDesktopBackend.Instance.NotifyScreensChanged ();
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MacSystemInformation.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MacSystemInformation.cs
new file mode 100644
index 0000000..48c9e5a
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MacSystemInformation.cs
@@ -0,0 +1,63 @@
+//
+// MacSystemInformation.cs
+//
+// Author:
+// Alan McGovern <alan at xamarin.com>
+//
+// Copyright (c) 2011, Xamarin Inc
+//
+// 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.Text;
+
+namespace Xwt.Mac
+{
+ class MacSystemInformation
+ {
+ public static readonly Version MountainLion = new Version (10, 8);
+ public static readonly Version Lion = new Version (10, 7);
+ public static readonly Version SnowLeopard = new Version (10, 6);
+ static Version version;
+
+ [System.Runtime.InteropServices.DllImport ("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
+ static extern int Gestalt (int selector, out int result);
+
+ //TODO: there are other gestalt selectors that return info we might want to display
+ //mac API for obtaining info about the system
+ static int Gestalt (string selector)
+ {
+ System.Diagnostics.Debug.Assert (selector != null && selector.Length == 4);
+ int cc = selector[3] | (selector[2] << 8) | (selector[1] << 16) | (selector[0] << 24);
+ int result;
+ int ret = Gestalt (cc, out result);
+ if (ret != 0)
+ throw new Exception (string.Format ("Error reading gestalt for selector '{0}': {1}", selector, ret));
+ return result;
+ }
+
+ static MacSystemInformation ()
+ {
+ version = new Version (Gestalt ("sys1"), Gestalt ("sys2"), Gestalt ("sys3"));
+ }
+
+ public static Version OsVersion {
+ get { return version; }
+ }
+ }
+}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MenuBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MenuBackend.cs
index ef0ff07..4fe0755 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/MenuBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MenuBackend.cs
@@ -29,22 +29,23 @@ using MonoMac.AppKit;
using Xwt.Backends;
using MonoMac.Foundation;
+
namespace Xwt.Mac
{
public class MenuBackend: NSMenu, IMenuBackend
{
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
public void InsertItem (int index, IMenuItemBackend menuItem)
{
- InsertItematIndex (((MenuItemBackend)menuItem).Item, index);
+ base.InsertItem (((MenuItemBackend)menuItem).Item, index);
}
public void RemoveItem (IMenuItemBackend menuItem)
{
- RemoveItem ((NSMenuItem)menuItem);
+ RemoveItem (((MenuItemBackend)menuItem).Item);
}
public void SetMainMenuMode ()
@@ -66,12 +67,13 @@ namespace Xwt.Mac
public void Popup ()
{
- NSMenu.PopUpContextMenu (this, null, null, null);
+ var evt = NSApplication.SharedApplication.CurrentEvent;
+ NSMenu.PopUpContextMenu (this, evt, evt.Window.ContentView, null);
}
public void Popup (IWidgetBackend widget, double x, double y)
{
- NSMenu.PopUpContextMenu (this, null, ((IMacViewBackend)widget).View, null);
+ NSMenu.PopUpContextMenu (this, NSApplication.SharedApplication.CurrentEvent, ((ViewBackend)widget).Widget, null);
}
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MenuButtonBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MenuButtonBackend.cs
new file mode 100644
index 0000000..fd8ea6e
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MenuButtonBackend.cs
@@ -0,0 +1,112 @@
+//
+// MenuButtonBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+// Alex Corrado <corrado at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 MonoMac.Foundation;
+using MonoMac.AppKit;
+using Xwt.Backends;
+
+
+namespace Xwt.Mac
+{
+ public class MenuButtonBackend: ButtonBackend, IMenuButtonBackend
+ {
+ public MenuButtonBackend ()
+ {
+ }
+
+ new IMenuButtonEventSink EventSink {
+ get { return (IMenuButtonEventSink)base.EventSink; }
+ }
+
+ public override void Initialize ()
+ {
+ ViewObject = new MacMenuButton (EventSink, ApplicationContext);
+ }
+ }
+
+ class MacMenuButton: NSPopUpButton, IViewObject
+ {
+ ApplicationContext context;
+ IMenuButtonEventSink eventSink;
+
+ public MacMenuButton (IntPtr p): base (p)
+ {
+ }
+
+ public MacMenuButton (IMenuButtonEventSink eventSink, ApplicationContext context)
+ {
+ this.eventSink = eventSink;
+ this.context = context;
+
+ PullsDown = true;
+ Activated += delegate {
+ context.InvokeUserCode (delegate {
+ eventSink.OnClicked ();
+ });
+ };
+
+ NSNotificationCenter.DefaultCenter.AddObserver ("NSPopUpButtonWillPopUpNotification", CreateMenu, this);
+ AddItem ("");
+ }
+
+ void CreateMenu (NSNotification notif)
+ {
+ MenuBackend m = null;
+ context.InvokeUserCode (delegate {
+ m = (MenuBackend) eventSink.OnCreateMenu ();
+ });
+ if (m != null) {
+ // FIXME: mutating the Menu feels nasty, but NSPopUpButton doesn't give us much choice.. :/
+ // see http://www.cocoabuilder.com/archive/cocoa/115220-nspopupbutton-and-actions.html
+ if (m.ItemAt (0).Title != Title)
+ m.InsertItem (new NSMenuItem (Title), 0);
+ Menu = m;
+ }
+ }
+
+ public ViewBackend Backend { get; set; }
+
+ public NSView View {
+ get { return this; }
+ }
+
+ public void EnableEvent (Xwt.Backends.ButtonEvent ev)
+ {
+ }
+
+ public void DisableEvent (Xwt.Backends.ButtonEvent ev)
+ {
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ NSNotificationCenter.DefaultCenter.RemoveObserver (this);
+ base.Dispose (disposing);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/MenuItemBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/MenuItemBackend.cs
index d8e8f0e..8e1b6d4 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/MenuItemBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/MenuItemBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using MonoMac.AppKit;
using System.Collections.Generic;
@@ -37,6 +37,7 @@ namespace Xwt.Mac
NSMenuItem item;
IMenuItemEventSink eventSink;
List<MenuItemEvent> enabledEvents;
+ ApplicationContext context;
public MenuItemBackend (): this (new NSMenuItem ())
{
@@ -73,10 +74,9 @@ namespace Xwt.Mac
}
}
- public void SetImage (object imageBackend)
+ public void SetImage (ImageDescription image)
{
- var img = (NSImage) imageBackend;
- item.Image = img;
+ item.Image = image.ToNSImage ();
}
public bool Visible {
@@ -110,8 +110,9 @@ namespace Xwt.Mac
}
#region IBackend implementation
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
+ this.context = context;
}
public void EnableEvent (object eventId)
@@ -137,7 +138,7 @@ namespace Xwt.Mac
void HandleItemActivated (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnClicked ();
});
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/NotebookBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/NotebookBackend.cs
index 68804c1..85a856f 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/NotebookBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/NotebookBackend.cs
@@ -28,7 +28,7 @@ using System;
using MonoMac.AppKit;
using Xwt.Backends;
using System.Collections.Generic;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
@@ -72,21 +72,23 @@ namespace Xwt.Mac
{
NSTabViewItem item = new NSTabViewItem ();
item.Label = tab.Label;
- item.View = GetWidget (widget);
+ item.View = GetWidgetWithPlacement (widget);
Widget.Add (item);
}
public void Remove (IWidgetBackend widget)
{
- var v = GetWidget (widget);
+ var v = GetWidgetWithPlacement (widget);
var t = FindTab (v);
- if (t != null)
+ if (t != null) {
Widget.Remove (t);
+ RemoveChildPlacement (t.View);
+ }
}
public void UpdateLabel (NotebookTab tab, string hint)
{
- IWidgetBackend widget = (IWidgetBackend) WidgetRegistry.GetBackend (tab.Child);
+ IWidgetBackend widget = (IWidgetBackend) Toolkit.GetBackend (tab.Child);
var v = GetWidget (widget);
var t = FindTab (v);
if (t != null)
@@ -148,7 +150,7 @@ namespace Xwt.Mac
class TabView: NSTabView, IViewObject
{
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ObjcHelper.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ObjcHelper.cs
index 1aa00d8..daa1cdd 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ObjcHelper.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ObjcHelper.cs
@@ -48,7 +48,7 @@ namespace Xwt.Mac
static extern bool method_exchangeImplementations (IntPtr m1, IntPtr m2);
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib")]
- static extern IntPtr method_setImplementations (IntPtr m1, Delegate impl);
+ static extern IntPtr method_setImplementation (IntPtr m1, Delegate impl);
[System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib")]
static extern IntPtr object_getClass (IntPtr obj);
@@ -101,7 +101,7 @@ namespace Xwt.Mac
IntPtr m1 = class_getClassMethod (cls.Handle, method);
if (m1 == IntPtr.Zero)
throw new Exception ("Class did not have a method for the first selector");
- return method_setImplementations (m1, impl);
+ return method_setImplementation (m1, impl);
}
public static IntPtr GetMethod (this Class cls, IntPtr sel)
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/PanedBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/PanedBackend.cs
index 017c3ba..c00a9c4 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/PanedBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/PanedBackend.cs
@@ -26,13 +26,15 @@
using System;
using Xwt.Backends;
using MonoMac.AppKit;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
public class PanedBackend: ViewBackend<NSSplitView,IPanedEventSink>, IPanedBackend
{
SplitViewDelegate viewDelegate;
+ NSView view1;
+ NSView view2;
class SplitViewDelegate: NSSplitViewDelegate
{
@@ -60,9 +62,15 @@ namespace Xwt.Mac
public void SetPanel (int panel, IWidgetBackend widget, bool resize, bool shrink)
{
- IMacViewBackend view = (IMacViewBackend) widget;
- Widget.AddSubview (view.View);
+ ViewBackend view = (ViewBackend) widget;
+ var w = GetWidgetWithPlacement (view);
+ RemovePanel (panel);
+ Widget.AddSubview (w);
Widget.AdjustSubviews ();
+ if (panel == 1)
+ view1 = w;
+ else
+ view2 = w;
view.NotifyPreferredSizeChanged ();
}
@@ -77,6 +85,37 @@ namespace Xwt.Mac
public void RemovePanel (int panel)
{
+ if (panel == 1) {
+ if (view1 != null) {
+ view1.RemoveFromSuperview ();
+ RemoveChildPlacement (view1);
+ view1 = null;
+ }
+ } else {
+ if (view2 != null) {
+ view2.RemoveFromSuperview ();
+ RemoveChildPlacement (view2);
+ view2 = null;
+ }
+ }
+ }
+
+ public override void ReplaceChild (NSView oldChild, NSView newChild)
+ {
+ if (view1 != null)
+ view1.RemoveFromSuperview ();
+ if (view2 != null)
+ view2.RemoveFromSuperview ();
+
+ if (oldChild == view1)
+ view1 = newChild;
+ else
+ view2 = newChild;
+
+ if (view1 != null)
+ Widget.AddSubview (view1);
+ if (view2 != null)
+ Widget.AddSubview (view2);
}
public double Position {
@@ -97,7 +136,7 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/PathBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/PathBackendHandler.cs
new file mode 100644
index 0000000..e147db8
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/PathBackendHandler.cs
@@ -0,0 +1,135 @@
+//
+// PathBackendHandler.cs
+//
+// Author:
+// Alex Corrado <corrado at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Backends;
+using MonoMac.AppKit;
+using Xwt.Drawing;
+using MonoMac.Foundation;
+using MonoMac.CoreGraphics;
+using System.Drawing;
+
+namespace Xwt.Mac
+{
+ public class MacPathBackendHandler: DrawingPathBackendHandler
+ {
+ const double degrees = System.Math.PI / 180d;
+
+ public MacPathBackendHandler ()
+ {
+ }
+
+ public override void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ {
+ ((CGPath)backend).AddArc ((float)xc, (float)yc, (float)radius, (float)(angle1 * degrees), (float)(angle2 * degrees), false);
+ }
+
+ public override void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ {
+ ((CGPath)backend).AddArc ((float)xc, (float)yc, (float)radius, (float)(angle1 * degrees), (float)(angle2 * degrees), true);
+ }
+
+ public override void ClosePath (object backend)
+ {
+ ((CGPath)backend).CloseSubpath ();
+ }
+
+ public override void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
+ {
+ ((CGPath)backend).AddCurveToPoint ((float)x1, (float)y1, (float)x2, (float)y2, (float)x3, (float)y3);
+ }
+
+ public override void LineTo (object backend, double x, double y)
+ {
+ ((CGPath)backend).AddLineToPoint ((float)x, (float)y);
+ }
+
+ public override void MoveTo (object backend, double x, double y)
+ {
+ ((CGPath)backend).MoveToPoint ((float)x, (float)y);
+ }
+
+ public override void Rectangle (object backend, double x, double y, double width, double height)
+ {
+ ((CGPath)backend).AddRect (new RectangleF ((float)x, (float)y, (float)width, (float)height));
+ }
+
+ public override void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ {
+ CGPath path = (CGPath)backend;
+ PointF p = path.CurrentPoint;
+ path.AddCurveToPoint ((float)(p.X + dx1), (float)(p.Y + dy1), (float)(p.X + dx2), (float)(p.Y + dy2), (float)(p.X + dx3), (float)(p.Y + dy3));
+ }
+
+ public override void RelLineTo (object backend, double dx, double dy)
+ {
+ CGPath path = (CGPath)backend;
+ PointF p = path.CurrentPoint;
+ path.AddLineToPoint ((float)(p.X + dx), (float)(p.Y + dy));
+ }
+
+ public override void RelMoveTo (object backend, double dx, double dy)
+ {
+ CGPath path = (CGPath)backend;
+ PointF p = path.CurrentPoint;
+ path.MoveToPoint ((float)(p.X + dx), (float)(p.Y + dy));
+ }
+
+ public override object CreatePath ()
+ {
+ return new CGPath ();
+ }
+
+ public override object CopyPath (object backend)
+ {
+ return new CGPath ((CGPath)backend);
+ }
+
+ public override void AppendPath (object backend, object otherBackend)
+ {
+ CGPath dest = (CGPath)backend;
+ CGContextBackend src = otherBackend as CGContextBackend;
+
+ if (src != null) {
+ using (var path = src.Context.CopyPath ())
+ dest.AddPath (path);
+ } else {
+ dest.AddPath ((CGPath)otherBackend);
+ }
+ }
+
+ public override bool IsPointInFill (object backend, double x, double y)
+ {
+ return ((CGPath)backend).ContainsPoint (new PointF ((float)x, (float)y), false);
+ }
+
+ public override void Dispose (object backend)
+ {
+ ((CGPath)backend).Dispose ();
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/PopoverBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/PopoverBackend.cs
index b289899..c0ab4f9 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/PopoverBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/PopoverBackend.cs
@@ -32,6 +32,7 @@ using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
+
namespace Xwt.Mac
{
public class PopoverBackend : IPopoverBackend
@@ -62,8 +63,8 @@ namespace Xwt.Mac
public override void LoadView ()
{
- var backend = (IMacViewBackend)Xwt.Engine.WidgetRegistry.GetBackend (child);
- view = ((IWidgetBackend)backend).NativeWidget as NSView;
+ var backend = (ViewBackend)Toolkit.GetBackend (child);
+ view = ((ViewBackend)backend).NativeWidget as NSView;
ForceChildLayout ();
backend.SetAutosizeMode (true);
// FIXME: unset when the popover is closed
@@ -95,7 +96,7 @@ namespace Xwt.Mac
this.sink = sink;
}
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
@@ -113,9 +114,9 @@ namespace Xwt.Mac
popover = new NSPopover ();
popover.Behavior = NSPopoverBehavior.Transient;
popover.ContentViewController = controller;
- IMacViewBackend backend = (IMacViewBackend)Xwt.Engine.WidgetRegistry.GetBackend (referenceWidget);
- var reference = backend.View;
- popover.Show (System.Drawing.RectangleF.Empty,
+ ViewBackend backend = (ViewBackend)Toolkit.GetBackend (referenceWidget);
+ var reference = backend.Widget;
+ popover.Show (positionRect.ToRectangleF (),
reference,
ToRectEdge (orientation));
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ProgressBarBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ProgressBarBackend.cs
index 30127b0..7ce8a2a 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ProgressBarBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ProgressBarBackend.cs
@@ -28,7 +28,7 @@ using System;
using Xwt.Backends;
using MonoMac.AppKit;
using MonoMac.Foundation;
-using Xwt.Engine;
+
using MonoMac.ObjCRuntime;
namespace Xwt.Mac
@@ -43,7 +43,6 @@ namespace Xwt.Mac
{
var widget = new ProgressIndicatorView ();
ViewObject = widget;
- Widget.SizeToFit ();
widget.MinValue = 0.0;
widget.MaxValue = 1.0;
@@ -80,7 +79,7 @@ namespace Xwt.Mac
{
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/RadioButtonBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/RadioButtonBackend.cs
new file mode 100644
index 0000000..711bf54
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/RadioButtonBackend.cs
@@ -0,0 +1,149 @@
+//
+// RadioButtonBackend.cs
+//
+// Author:
+// Marek Habersack <grendel at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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 MonoMac.AppKit;
+using Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ public class RadioButtonBackend : ViewBackend <NSButton, IRadioButtonEventSink>, IRadioButtonBackend
+ {
+ MacRadioButtonGroup radioGroup;
+ NSCellStateValue lastState;
+
+ public object Group {
+ get {
+ if (radioGroup == null) {
+ radioGroup = new MacRadioButtonGroup ();
+ radioGroup.Add ((MacButton)Widget);
+ }
+ return radioGroup;
+ }
+
+ set {
+ var g = value as MacRadioButtonGroup;
+ if (g == radioGroup)
+ return;
+ radioGroup = g;
+ radioGroup.Add ((MacButton)Widget);
+ }
+ }
+
+ public bool Active {
+ get { return Widget.State == NSCellStateValue.On; }
+ set {
+ if (value) {
+ Widget.State = NSCellStateValue.On;
+ var g = Group as MacRadioButtonGroup;
+ g.Activate ((MacButton)Widget);
+ } else
+ Widget.State = NSCellStateValue.Off;
+ NotifyToggle ();
+ }
+ }
+
+ public RadioButtonBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ var mb = new MacButton (EventSink, ApplicationContext);
+ lastState = mb.State = NSCellStateValue.On;
+ mb.ActivatedInternal += HandleActivatedInternal;
+ ViewObject = mb;
+ Widget.SetButtonType (NSButtonType.Radio);
+ Widget.Title = String.Empty;
+ }
+
+ void HandleActivatedInternal (MacButton button)
+ {
+ if (radioGroup == null)
+ return;
+
+ if (button == null || button.State != NSCellStateValue.On)
+ return;
+ radioGroup.Activate (button);
+ NotifyToggle ();
+ }
+
+ internal void NotifyToggle ()
+ {
+ if (lastState != Widget.State) {
+ lastState = Widget.State;
+ ApplicationContext.InvokeUserCode (delegate {
+ EventSink.OnToggled ();
+ });
+ }
+ }
+
+ public void SetContent (IWidgetBackend widget)
+ {
+ }
+
+ public void SetContent (string label)
+ {
+ Widget.Title = label;
+ ResetFittingSize ();
+ }
+ }
+
+ // Radio button groups are implemented using a visual element on Mac - NSMatrix. That limits the ways
+ // in which radio buttons can be grouped - they must be children of the same view. Since XWT uses a
+ // non-visual radio button group abstraction we need to emulate the job done by NSMatrix here
+ class MacRadioButtonGroup
+ {
+ MacButton lastActive;
+
+ public void Add (MacButton button)
+ {
+ if (button == null)
+ return;
+ if (button.State == NSCellStateValue.On) {
+ if (lastActive == null)
+ Activate (button);
+ else {
+ button.State = NSCellStateValue.Off;
+ ((RadioButtonBackend)button.Backend).NotifyToggle ();
+ }
+ }
+ }
+
+ public void Activate (MacButton button)
+ {
+ if (button == null || button == lastActive)
+ return;
+ if (lastActive != null) {
+ lastActive.State = NSCellStateValue.Off;
+ ((RadioButtonBackend)lastActive.Backend).NotifyToggle ();
+ }
+ lastActive = button;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs
new file mode 100644
index 0000000..90936e6
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/RichTextViewBackend.cs
@@ -0,0 +1,410 @@
+//
+// RichTextViewBackend.cs
+//
+// Author:
+// Marek Habersack <grendel at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin, Inc.
+//
+// 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.Runtime.InteropServices;
+using System.Text;
+using System.Xml;
+
+using MonoMac.Foundation;
+using MonoMac.AppKit;
+using MonoMac.ObjCRuntime;
+
+using Xwt;
+using Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ public class RichTextViewBackend : ViewBackend <NSTextView, IRichTextViewEventSink>, IRichTextViewBackend
+ {
+ NSFont font;
+
+ public override object Font {
+ get { return base.Font; }
+ set {
+ font = value as NSFont;
+ base.Font = value;
+ }
+ }
+
+ public RichTextViewBackend ()
+ {
+ }
+
+ public override void Initialize ()
+ {
+ base.Initialize ();
+ var tv = new MacTextView (EventSink, ApplicationContext);
+ ViewObject = tv;
+ tv.VerticallyResizable = false;
+ tv.HorizontallyResizable = false;
+ }
+
+ double CalcHeight (double width)
+ {
+ var f = Widget.Frame;
+ Widget.VerticallyResizable = true;
+ Widget.Frame = new System.Drawing.RectangleF (Widget.Frame.X, Widget.Frame.Y, (float)width, 0);
+ Widget.SizeToFit ();
+ var h = Widget.Frame.Height;
+ Widget.VerticallyResizable = false;
+ Widget.Frame = f;
+ return h;
+ }
+
+ public override Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ var width = (double) Widget.TextStorage.Size.Width;
+ if (widthConstraint.IsConstrained)
+ width = widthConstraint.AvailableSize;
+ if (minWidth != -1 && minWidth > width)
+ width = minWidth;
+
+ var height = CalcHeight (width);
+ if (minHeight != -1 && minHeight > height)
+ height = minHeight;
+ return new Size (width, height);
+ }
+
+ public IRichTextBuffer CreateBuffer ()
+ {
+ // Use cached font since Widget.Font size increases for each LoadText... It has to do
+ // with the 'style' attribute for the 'body' element - not sure why that happens
+ return new MacRichTextBuffer (font ?? Widget.Font);
+ }
+
+ public void SetBuffer (IRichTextBuffer buffer)
+ {
+ var macBuffer = buffer as MacRichTextBuffer;
+ if (macBuffer == null)
+ throw new ArgumentException ("Passed buffer is of incorrect type", "buffer");
+
+ var tview = ViewObject as MacTextView;
+ if (tview == null)
+ return;
+
+ tview.TextStorage.SetString (macBuffer.ToAttributedString ());
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (!(eventId is RichTextViewEvent))
+ return;
+
+ var tview = ViewObject as MacTextView;
+ if (tview == null)
+ return;
+ tview.EnableEvent ((RichTextViewEvent)eventId);
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (!(eventId is RichTextViewEvent))
+ return;
+
+ var tview = ViewObject as MacTextView;
+ if (tview == null)
+ return;
+ tview.DisableEvent ((RichTextViewEvent)eventId);
+ }
+ }
+
+ class MacTextView : NSTextView, IViewObject
+ {
+ IRichTextViewEventSink eventSink;
+ ApplicationContext context;
+
+ public NSView View {
+ get { return this; }
+ }
+
+ public ViewBackend Backend { get; set; }
+
+ public MacTextView (IntPtr p) : base (p)
+ {
+ CommonInit ();
+ }
+
+ public MacTextView (IRichTextViewEventSink eventSink, ApplicationContext context)
+ {
+ CommonInit ();
+ this.eventSink = eventSink;
+ this.context = context;
+ EnableEvent (RichTextViewEvent.NavigateToUrl);
+ }
+
+ public void EnableEvent (RichTextViewEvent ev)
+ {
+ if (ev != RichTextViewEvent.NavigateToUrl)
+ return;
+ LinkClicked = TextLinkClicked;
+ }
+
+ public void DisableEvent (RichTextViewEvent ev)
+ {
+ if (ev != RichTextViewEvent.NavigateToUrl)
+ return;
+ LinkClicked = null;
+ }
+
+ bool TextLinkClicked (NSTextView textView, NSObject link, uint charIndex)
+ {
+ if (eventSink == null || context == null)
+ return false;
+
+ string linkUrl;
+
+ if (link is NSString)
+ linkUrl = (link as NSString);
+ else if (link is NSUrl)
+ linkUrl = (link as NSUrl).AbsoluteString;
+ else
+ linkUrl = null;
+
+ Uri url = null;
+ if (String.IsNullOrWhiteSpace (linkUrl) || !Uri.TryCreate (linkUrl, UriKind.RelativeOrAbsolute, out url))
+ url = null;
+
+ context.InvokeUserCode (delegate {
+ eventSink.OnNavigateToUrl (url);
+ });
+
+ return true;
+ }
+
+ void CommonInit ()
+ {
+ Editable = false;
+ }
+ }
+
+ class MacRichTextBuffer : IRichTextBuffer
+ {
+ const int HeaderIncrement = 8;
+
+ static readonly string[] lineSplitChars = new string[] { Environment.NewLine };
+ static readonly IntPtr selInitWithHTMLDocumentAttributes_Handle = Selector.GetHandle ("initWithHTML:documentAttributes:");
+
+ StringBuilder text;
+ XmlWriter xmlWriter;
+ Stack <int> paragraphIndent;
+
+ public MacRichTextBuffer (NSFont font)
+ {
+ text = new StringBuilder ();
+ xmlWriter = XmlWriter.Create (text, new XmlWriterSettings {
+ OmitXmlDeclaration = true,
+ Encoding = Encoding.UTF8,
+ Indent = true,
+ IndentChars = "\t"
+ });
+
+ float fontSize;
+ string fontFamily;
+
+ if (font != null) {
+ fontSize = font.PointSize;
+ fontFamily = font.FontName;
+ } else {
+ fontSize = 16;
+ fontFamily = "sans-serif";
+ }
+
+ xmlWriter.WriteDocType ("html", "-//W3C//DTD XHTML 1.0", "Strict//EN", null);
+ xmlWriter.WriteStartElement ("html");
+ xmlWriter.WriteStartElement ("meta");
+ xmlWriter.WriteAttributeString ("http-equiv", "Content-Type");
+ xmlWriter.WriteAttributeString ("content", "text/html; charset=utf-8");
+ xmlWriter.WriteEndElement ();
+ xmlWriter.WriteStartElement ("body");
+ xmlWriter.WriteAttributeString ("style", String.Format ("font-family: {0}; font-size: {1}", fontFamily, fontSize));
+ }
+
+ public NSAttributedString ToAttributedString ()
+ {
+ xmlWriter.WriteEndElement (); // body
+ xmlWriter.WriteEndElement (); // html
+ xmlWriter.Flush ();
+ if (text == null || text.Length == 0)
+ return new NSAttributedString (String.Empty);
+
+ NSDictionary docAttributes;
+ try {
+ return CreateStringFromHTML (text.ToString (), out docAttributes);
+ } finally {
+ text = null;
+ xmlWriter.Dispose ();
+ xmlWriter = null;
+ docAttributes = null;
+ }
+ }
+
+ NSAttributedString CreateStringFromHTML (string html, out NSDictionary docAttributes)
+ {
+ var data = NSData.FromString (html);
+ IntPtr docAttributesPtr = Marshal.AllocHGlobal (4);
+ Marshal.WriteInt32 (docAttributesPtr, 0);
+
+ var attrString = new NSAttributedString ();
+ attrString.Handle = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr (attrString.Handle, selInitWithHTMLDocumentAttributes_Handle, data.Handle, docAttributesPtr);
+ IntPtr docAttributesValue = Marshal.ReadIntPtr (docAttributesPtr);
+ docAttributes = docAttributesValue != IntPtr.Zero ? Runtime.GetNSObject (docAttributesValue) as NSDictionary : null;
+ Marshal.FreeHGlobal (docAttributesPtr);
+
+ return attrString;
+ }
+
+ public void EmitText (string text, RichTextInlineStyle style)
+ {
+ if (String.IsNullOrEmpty (text))
+ return;
+
+ bool haveStyle = true;
+ switch (style) {
+ case RichTextInlineStyle.Bold:
+ xmlWriter.WriteStartElement ("strong");
+ break;
+
+ case RichTextInlineStyle.Italic:
+ xmlWriter.WriteStartElement ("em");
+ break;
+
+ case RichTextInlineStyle.Monospace:
+ xmlWriter.WriteStartElement ("tt");
+ break;
+
+ default:
+ haveStyle = false;
+ break;
+ }
+
+ bool first = true;
+ foreach (string line in text.Split (lineSplitChars, StringSplitOptions.None)) {
+ if (!first) {
+ xmlWriter.WriteStartElement ("br");
+ xmlWriter.WriteEndElement ();
+ } else
+ first = false;
+ xmlWriter.WriteString (line);
+ }
+
+ if (haveStyle)
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitStartHeader (int level)
+ {
+ if (level < 1)
+ level = 1;
+ if (level > 6)
+ level = 6;
+ xmlWriter.WriteStartElement ("h" + level);
+ }
+
+ public void EmitEndHeader ()
+ {
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitStartParagraph (int indentLevel)
+ {
+ if (paragraphIndent == null)
+ paragraphIndent = new Stack<int> ();
+ paragraphIndent.Push (indentLevel);
+
+ // FIXME: perhaps use CSS indent?
+ for (int i = 0; i < indentLevel; i++)
+ xmlWriter.WriteStartElement ("blockindent");
+ xmlWriter.WriteStartElement ("p");
+ }
+
+ public void EmitEndParagraph ()
+ {
+ xmlWriter.WriteEndElement (); // </p>
+
+ int indentLevel;
+ if (paragraphIndent != null && paragraphIndent.Count > 0)
+ indentLevel = paragraphIndent.Pop ();
+ else
+ indentLevel = 0;
+
+ for (int i = 0; i < indentLevel; i++)
+ xmlWriter.WriteEndElement (); // </blockindent>
+ }
+
+ public void EmitOpenList ()
+ {
+ xmlWriter.WriteStartElement ("ul");
+ }
+
+ public void EmitOpenBullet ()
+ {
+ xmlWriter.WriteStartElement ("li");
+ }
+
+ public void EmitCloseBullet ()
+ {
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitCloseList ()
+ {
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitStartLink (string href, string title)
+ {
+ xmlWriter.WriteStartElement ("a");
+ xmlWriter.WriteAttributeString ("href", href);
+
+ // FIXME: it appears NSTextView ignores 'title' when it's told to display
+ // link tooltips - it will use the URL instead. See if there's a way to make
+ // it show the actual title
+ xmlWriter.WriteAttributeString ("title", title);
+ }
+
+ public void EmitEndLink ()
+ {
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitCodeBlock (string code)
+ {
+ xmlWriter.WriteStartElement ("pre");
+ xmlWriter.WriteString (code);
+ xmlWriter.WriteEndElement ();
+ }
+
+ public void EmitHorizontalRuler ()
+ {
+ xmlWriter.WriteStartElement ("hr");
+ xmlWriter.WriteEndElement ();
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ScrollAdjustmentBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollAdjustmentBackend.cs
index f22fafa..8fb0a96 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ScrollAdjustmentBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollAdjustmentBackend.cs
@@ -27,6 +27,7 @@ using System;
using Xwt.Backends;
using MonoMac.AppKit;
+
namespace Xwt.Mac
{
class ScrollAdjustmentBackend: IScrollAdjustmentBackend
@@ -34,9 +35,7 @@ namespace Xwt.Mac
bool vertical;
NSScrollView scrollView;
IScrollAdjustmentEventSink eventSink;
- double lower;
- double upper;
-
+
public ScrollAdjustmentBackend (NSScrollView scrollView, bool vertical)
{
this.vertical = vertical;
@@ -44,7 +43,7 @@ namespace Xwt.Mac
}
#region IBackend implementation
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
@@ -68,68 +67,50 @@ namespace Xwt.Mac
this.eventSink = eventSink;
}
+ CustomClipView ClipView {
+ get { return ((CustomClipView)scrollView.ContentView); }
+ }
+
public double Value {
get {
if (vertical)
- return scrollView.DocumentVisibleRect.Top;
+ return ClipView.CurrentY;
else
- return scrollView.DocumentVisibleRect.Left;
+ return ClipView.CurrentX;
}
set {
+ if (vertical)
+ ClipView.CurrentY = (float)value;
+ else
+ ClipView.CurrentX = (float)value;
}
}
- public double LowerValue {
- get {
- return lower;
- }
- set {
- lower = value;
- }
- }
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ LowerValue = lowerValue;
+ UpperValue = upperValue;
+ PageSize = pageSize;
+ PageIncrement = pageIncrement;
- public double UpperValue {
- get {
- return upper;
- }
- set {
- upper = value;
- }
- }
+ if (vertical)
+ scrollView.VerticalLineScroll = (float)stepIncrement;
+ else
+ scrollView.HorizontalLineScroll = (float)stepIncrement;
- public double PageIncrement {
- get {
- return 10;
- }
- set {
- }
+ ClipView.UpdateDocumentSize ();
+ if (Value != value)
+ Value = value;
}
- public double StepIncrement {
- get {
- if (vertical)
- return scrollView.VerticalLineScroll;
- else
- return scrollView.HorizontalLineScroll;
- }
- set {
- if (vertical)
- scrollView.VerticalLineScroll = (float)value;
- else
- scrollView.HorizontalLineScroll = (float)value;
- }
- }
+ public double LowerValue { get; private set; }
+
+ public double UpperValue { get; private set; }
+
+ public double PageIncrement { get; private set; }
+
+ public double PageSize { get; private set; }
- public double PageSize {
- get {
- if (vertical)
- return scrollView.DocumentVisibleRect.Height;
- else
- return scrollView.DocumentVisibleRect.Width;
- }
- set {
- }
- }
#endregion
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ScrollViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollViewBackend.cs
index 1de2e39..541094e 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ScrollViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollViewBackend.cs
@@ -31,6 +31,10 @@ namespace Xwt.Mac
{
public class ScrollViewBackend: ViewBackend<NSScrollView,IScrollViewEventSink>, IScrollViewBackend
{
+ IWidgetBackend child;
+ ScrollPolicy verticalScrollPolicy;
+ ScrollPolicy horizontalScrollPolicy;
+
public override void Initialize ()
{
ViewObject = new CustomScrollView ();
@@ -46,35 +50,42 @@ namespace Xwt.Mac
public void SetChild (IWidgetBackend child)
{
- IMacViewBackend backend = (IMacViewBackend) child;
+ this.child = child;
+ ViewBackend backend = (ViewBackend) child;
if (backend.EventSink.SupportsCustomScrolling ()) {
var vs = new ScrollAdjustmentBackend (Widget, true);
var hs = new ScrollAdjustmentBackend (Widget, false);
CustomClipView clipView = new CustomClipView (hs, vs);
Widget.ContentView = clipView;
- clipView.DocumentView = backend.View;
+ var dummy = new DummyClipView ();
+ dummy.AddSubview (backend.Widget);
+ backend.Widget.Frame = new System.Drawing.RectangleF (0, 0, clipView.Frame.Width, clipView.Frame.Height);
+ clipView.DocumentView = dummy;
backend.EventSink.SetScrollAdjustments (hs, vs);
- backend.View.Frame = new System.Drawing.RectangleF (0, 0, 500,500);
}
else {
- Widget.DocumentView = backend.View;
- backend.View.Frame = Widget.ContentView.DocumentRect;
+ Widget.DocumentView = backend.Widget;
+ UpdateChildSize ();
}
}
public ScrollPolicy VerticalScrollPolicy {
get {
- return ScrollPolicy.Automatic;
+ return verticalScrollPolicy;
}
set {
+ verticalScrollPolicy = value;
+ Widget.HasVerticalScroller = verticalScrollPolicy != ScrollPolicy.Never;
}
}
public ScrollPolicy HorizontalScrollPolicy {
get {
- return ScrollPolicy.Automatic;
+ return horizontalScrollPolicy;
}
set {
+ horizontalScrollPolicy = value;
+ Widget.HasHorizontalScroller = horizontalScrollPolicy != ScrollPolicy.Never;
}
}
@@ -91,11 +102,35 @@ namespace Xwt.Mac
set {
}
}
+
+ void UpdateChildSize ()
+ {
+ if (child == null)
+ return;
+
+ if (Widget.ContentView is CustomClipView) {
+ } else {
+ NSView view = (NSView)Widget.DocumentView;
+ ViewBackend c = (ViewBackend)child;
+ Size s;
+ if (horizontalScrollPolicy == ScrollPolicy.Never) {
+ s = c.Frontend.Surface.GetPreferredSize (SizeConstraint.WithSize (Widget.ContentView.Frame.Width), SizeConstraint.Unconstrained);
+ }
+ else if (verticalScrollPolicy == ScrollPolicy.Never) {
+ s = c.Frontend.Surface.GetPreferredSize (SizeConstraint.Unconstrained, SizeConstraint.WithSize (Widget.ContentView.Frame.Width));
+ }
+ else {
+ s = c.Frontend.Surface.GetPreferredSize ();
+ }
+ var w = Math.Max (s.Width, Widget.ContentView.Frame.Width);
+ var h = Math.Max (s.Height, Widget.ContentView.Frame.Height);
+ view.Frame = new System.Drawing.RectangleF (view.Frame.X, view.Frame.Y, (float)w, (float)h);
+ }
+ }
public void SetChildSize (Size s)
{
- NSView view = (NSView) Widget.DocumentView;
- view.Frame = new System.Drawing.RectangleF (view.Frame.X, view.Frame.Y, (float)s.Width, (float)s.Height);
+ UpdateChildSize ();
}
}
@@ -107,7 +142,7 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public override bool IsFlipped {
get {
@@ -115,31 +150,86 @@ namespace Xwt.Mac
}
}
}
+
+ class DummyClipView: NSView
+ {
+ public override bool IsFlipped {
+ get {
+ return true;
+ }
+ }
+ }
class CustomClipView: NSClipView
{
ScrollAdjustmentBackend hScroll;
ScrollAdjustmentBackend vScroll;
- System.Drawing.RectangleF visibleRect;
-
+ float currentX;
+ float currentY;
+ float ratioX = 1, ratioY = 1;
+
public CustomClipView (ScrollAdjustmentBackend hScroll, ScrollAdjustmentBackend vScroll)
{
this.hScroll = hScroll;
this.vScroll = vScroll;
CopiesOnScroll = false;
-
+ }
+
+ public double CurrentX {
+ get {
+ return hScroll.LowerValue + (currentX / ratioX);
+ }
+ set {
+ ScrollToPoint (new System.Drawing.PointF ((float)(value - hScroll.LowerValue) * ratioX, currentY));
+ }
+ }
+
+ public double CurrentY {
+ get {
+ return vScroll.LowerValue + (currentY / ratioY);
+ }
+ set {
+ ScrollToPoint (new System.Drawing.PointF (currentX, (float)(value - vScroll.LowerValue) * ratioY));
+ }
+ }
+
+ public override bool IsFlipped {
+ get {
+ return true;
+ }
+ }
+
+ public override void SetFrameSize (System.Drawing.SizeF newSize)
+ {
+ base.SetFrameSize (newSize);
+ var v = DocumentView.Subviews [0];
+ v.Frame = new System.Drawing.RectangleF (v.Frame.X, v.Frame.Y, newSize.Width, newSize.Height);
}
public override void ScrollToPoint (System.Drawing.PointF newOrigin)
{
- visibleRect = new System.Drawing.RectangleF (newOrigin.X, newOrigin.Y, 100, 100);
+ base.ScrollToPoint (newOrigin);
+ var v = DocumentView.Subviews [0];
+
+ currentX = newOrigin.X >= 0 ? newOrigin.X : 0;
+ currentY = newOrigin.Y >= 0 ? newOrigin.Y : 0;
+ if (currentX + v.Frame.Width > DocumentView.Frame.Width)
+ currentX = DocumentView.Frame.Width - v.Frame.Width;
+ if (currentY + v.Frame.Height > DocumentView.Frame.Height)
+ currentY = DocumentView.Frame.Height - v.Frame.Height;
+
+ v.Frame = new System.Drawing.RectangleF (currentX, currentY, v.Frame.Width, v.Frame.Height);
+
hScroll.NotifyValueChanged ();
vScroll.NotifyValueChanged ();
}
-
- public override System.Drawing.RectangleF DocumentVisibleRect ()
+
+ public void UpdateDocumentSize ()
{
- return visibleRect;
+ var vr = DocumentVisibleRect ();
+ ratioX = hScroll.PageSize != 0 ? vr.Width / (float)hScroll.PageSize : 1;
+ ratioY = vScroll.PageSize != 0 ? vr.Height / (float)vScroll.PageSize : 1;
+ DocumentView.Frame = new System.Drawing.RectangleF (0, 0, (float)(hScroll.UpperValue - hScroll.LowerValue) * ratioX, (float)(vScroll.UpperValue - vScroll.LowerValue) * ratioY);
}
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ScrollbarBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollbarBackend.cs
new file mode 100644
index 0000000..697e0ce
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ScrollbarBackend.cs
@@ -0,0 +1,191 @@
+//
+// ScrollbarBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoMac.AppKit;
+using Xwt.Backends;
+
+namespace Xwt.Mac
+{
+ public class ScrollbarBackend: ViewBackend<NSScroller,IWidgetEventSink>, IScrollbarBackend
+ {
+ public ScrollbarBackend ()
+ {
+ }
+
+ public void Initialize (Orientation dir)
+ {
+ System.Drawing.RectangleF r;
+ if (dir == Orientation.Horizontal)
+ r = new System.Drawing.RectangleF (0, 0, NSScroller.ScrollerWidth + 1, NSScroller.ScrollerWidth);
+ else
+ r = new System.Drawing.RectangleF (0, 0, NSScroller.ScrollerWidth, NSScroller.ScrollerWidth + 1);
+ ViewObject = new CustomScroller (r);
+ }
+
+ public IScrollAdjustmentBackend CreateAdjustment ()
+ {
+ return (CustomScroller) Widget;
+ }
+ }
+
+ class CustomScroller: NSScroller, IScrollAdjustmentBackend, IViewObject
+ {
+ IScrollAdjustmentEventSink eventSink;
+
+ double value;
+ double lowerValue;
+ double upperValue;
+ double pageIncrement;
+ double stepIncrement;
+ double pageSize;
+
+ NSView IViewObject.View {
+ get {
+ return this;
+ }
+ }
+
+ ViewBackend IViewObject.Backend { get; set; }
+
+ public CustomScroller (System.Drawing.RectangleF r): base (r)
+ {
+ }
+
+ public void Initialize (IScrollAdjustmentEventSink eventSink)
+ {
+ this.eventSink = eventSink;
+ KnobStyle = NSScrollerKnobStyle.Default;
+ ScrollerStyle = NSScrollerStyle.Legacy;
+ ControlSize = NSControlSize.Regular;
+ Enabled = true;
+ }
+
+ void HandleActivated (object sender, EventArgs e)
+ {
+ value = lowerValue + (DoubleValue * (upperValue - lowerValue - pageSize));
+ switch (HitPart) {
+ case NSScrollerPart.DecrementPage:
+ value -= pageSize;
+ if (value < lowerValue)
+ value = lowerValue;
+ UpdateValue ();
+ break;
+ case NSScrollerPart.IncrementPage:
+ value += pageSize;
+ if (value + pageSize > upperValue)
+ value = upperValue - pageSize;
+ if (value < lowerValue)
+ value = lowerValue;
+ UpdateValue ();
+ break;
+ case NSScrollerPart.DecrementLine:
+ value -= stepIncrement;
+ if (value < lowerValue)
+ value = lowerValue;
+ UpdateValue ();
+ break;
+ case NSScrollerPart.IncrementLine:
+ value += stepIncrement;
+ if (value + pageSize > upperValue)
+ value = upperValue - pageSize;
+ if (value < lowerValue)
+ value = lowerValue;
+ UpdateValue ();
+ break;
+ }
+ eventSink.OnValueChanged ();
+ }
+
+ public double Value {
+ get {
+ return value;
+ }
+ set {
+ this.value = value;
+ UpdateValue ();
+ }
+ }
+
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ this.lowerValue = lowerValue;
+ this.upperValue = upperValue;
+ this.pageSize = pageSize;
+ this.pageIncrement = pageIncrement;
+ this.stepIncrement = stepIncrement;
+ this.value = value;
+
+ UpdateValue ();
+ UpdateKnobProportion ();
+ }
+
+ public void InitializeBackend (object frontend, ApplicationContext context)
+ {
+ }
+
+ public void EnableEvent (object eventId)
+ {
+ if (((ScrollAdjustmentEvent)eventId) == ScrollAdjustmentEvent.ValueChanged)
+ Activated += HandleActivated;
+ }
+
+ public void DisableEvent (object eventId)
+ {
+ if (((ScrollAdjustmentEvent)eventId) == ScrollAdjustmentEvent.ValueChanged)
+ Activated -= HandleActivated;
+ }
+
+ void UpdateValue ()
+ {
+ if (lowerValue >= upperValue) {
+ DoubleValue = 0.5;
+ return;
+ }
+
+ var val = value;
+ if (val < lowerValue)
+ val = lowerValue;
+ if (val + pageSize > upperValue) {
+ val = upperValue - pageSize;
+ if (val < lowerValue) {
+ DoubleValue = 0.5;
+ return;
+ }
+ }
+ DoubleValue = (val - lowerValue) / (upperValue - lowerValue - pageSize);
+ }
+
+ void UpdateKnobProportion ()
+ {
+ if (pageSize == 0 || lowerValue >= upperValue || pageSize >= (upperValue - lowerValue))
+ KnobProportion = 1;
+ else {
+ KnobProportion = (float)(pageSize / (upperValue - lowerValue));
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SelectFolderDialogBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SelectFolderDialogBackend.cs
index 4875783..f40f555 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/SelectFolderDialogBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SelectFolderDialogBackend.cs
@@ -40,6 +40,7 @@ namespace Xwt.Mac
this.AllowsMultipleSelection = multiselect;
this.CanChooseFiles = false;
this.CanChooseDirectories = true;
+ this.CanCreateDirectories = false;
this.Prompt = "Select " + (multiselect ? "Directories" : "Directory" );
@@ -47,6 +48,15 @@ namespace Xwt.Mac
#region ISelectFolderDialogBackend implementation
+ #region ISelectFolderDialogBackend implementation
+
+ public bool CanCreateFolders {
+ get { return CanCreateDirectories; }
+ set { CanCreateDirectories = value; }
+ }
+
+ #endregion
+
public string Folder {
get {
return this.Url.Path;
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorBackend.cs
index 4ccf2bc..4ed0f11 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorBackend.cs
@@ -38,7 +38,7 @@ namespace Xwt.Mac
public void Initialize (Orientation dir)
{
ViewObject = new SeparatorWidget ();
- Widget.SizeToFit ();
+ ResetFittingSize ();
}
}
@@ -49,7 +49,7 @@ namespace Xwt.Mac
BoxType = NSBoxType.NSBoxSeparator;
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorMenuItemBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorMenuItemBackend.cs
index d2696b1..48b2ced 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorMenuItemBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SeparatorMenuItemBackend.cs
@@ -24,11 +24,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Backends;
using MonoMac.AppKit;
namespace Xwt.Mac
{
- public class SeparatorMenuItemBackend: MenuItemBackend
+ public class SeparatorMenuItemBackend: MenuItemBackend, ISeparatorMenuItemBackend
{
public SeparatorMenuItemBackend (): base (NSMenuItem.SeparatorItem)
{
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SliderBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SliderBackend.cs
new file mode 100644
index 0000000..559f109
--- /dev/null
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SliderBackend.cs
@@ -0,0 +1,123 @@
+//
+// SliderBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoMac.AppKit;
+using Xwt.Backends;
+using MonoMac.Foundation;
+
+namespace Xwt.Mac
+{
+ public class SliderBackend: ViewBackend<NSSlider,ISliderEventSink>, ISliderBackend
+ {
+ Orientation dir;
+
+ public SliderBackend ()
+ {
+ }
+
+ public void Initialize (Orientation dir)
+ {
+ this.dir = dir;
+ ViewObject = new MacSlider ();
+ //((NSSliderCell)Widget.Cell).SetValueForKey (NSObject.FromObject (false), (NSString)"NSVertical");
+ if (dir == Orientation.Horizontal)
+ Widget.SetFrameSize (new System.Drawing.SizeF (10, 5));
+ else
+ Widget.SetFrameSize (new System.Drawing.SizeF (5, 10));
+ }
+
+ protected override void OnSizeToFit ()
+ {
+ Widget.SizeToFit ();
+ if (dir == Orientation.Vertical)
+ Widget.SetFrameSize (new System.Drawing.SizeF (Widget.Frame.Width, Widget.Frame.Width * 2));
+ else
+ Widget.SetFrameSize (new System.Drawing.SizeF (Widget.Frame.Width * 2, Widget.Frame.Width));
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is SliderEvent)
+ Widget.Activated += HandleActivated;;
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is SliderEvent)
+ Widget.Activated -= HandleActivated;
+ }
+
+ void HandleActivated (object sender, EventArgs e)
+ {
+ ApplicationContext.InvokeUserCode (EventSink.ValueChanged);
+ }
+
+ #region ISliderBackend implementation
+
+ public double Value {
+ get {
+ return Widget.DoubleValue;
+ }
+ set {
+ Widget.DoubleValue = value;
+ }
+ }
+
+ public double MinimumValue {
+ get {
+ return Widget.MinValue;
+ }
+ set {
+ Widget.MinValue = value;
+ }
+ }
+
+ public double MaximumValue {
+ get {
+ return Widget.MaxValue;
+ }
+ set {
+ Widget.MaxValue = value;
+ }
+ }
+
+ #endregion
+ }
+
+ class MacSlider: NSSlider, IViewObject
+ {
+ public NSView View {
+ get {
+ return this;
+ }
+ }
+
+ public ViewBackend Backend { get; set; }
+ }
+}
+
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SpinButtonBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SpinButtonBackend.cs
index 69c68e4..c514d97 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/SpinButtonBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SpinButtonBackend.cs
@@ -1,7 +1,7 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using MonoMac.Foundation;
using MonoMac.AppKit;
@@ -12,7 +12,6 @@ namespace Xwt.Mac
public override void Initialize ()
{
ViewObject = new MacSpinButton (EventSink);
- //Widget.SizeToFit ();
}
protected new ISpinButtonEventSink EventSink {
@@ -66,6 +65,16 @@ namespace Xwt.Mac
{
Widget.SetButtonStyle (style);
}
+
+ public string IndeterminateMessage {
+ get;
+ set;
+ }
+
+ public bool IsIndeterminate {
+ get;
+ set;
+ }
}
public class MacSpinButton : NSView, IViewObject
@@ -73,13 +82,28 @@ namespace Xwt.Mac
NSStepper stepper;
NSTextField input;
NSNumberFormatter formater;
- NSLayoutConstraint constraint;
+
+ class RelativeTextField : NSTextField
+ {
+ NSView reference;
+
+ public RelativeTextField (NSView reference)
+ {
+ this.reference = reference;
+ }
+
+ public override void ResizeWithOldSuperviewSize (System.Drawing.SizeF oldSize)
+ {
+ base.ResizeWithOldSuperviewSize (oldSize);
+ SetFrameSize (new System.Drawing.SizeF (reference.Frame.Left - 6, Frame.Size.Height));
+ }
+ }
public MacSpinButton (ISpinButtonEventSink eventSink)
{
formater = new NSNumberFormatter ();
stepper = new NSStepper ();
- input = new NSTextField ();
+ input = new RelativeTextField (stepper);
input.Formatter = formater;
input.Alignment = NSTextAlignment.Right;
formater.NumberStyle = NSNumberFormatterStyle.Decimal;
@@ -91,10 +115,10 @@ namespace Xwt.Mac
AutoresizesSubviews = true;
stepper.AutoresizingMask = NSViewResizingMask.MinXMargin | NSViewResizingMask.MinYMargin;
- input.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.MaxYMargin;
+ input.AutoresizingMask = NSViewResizingMask.WidthSizable | NSViewResizingMask.MaxXMargin | NSViewResizingMask.MaxYMargin;
- AddSubview (stepper);
AddSubview (input);
+ AddSubview (stepper);
}
public double ClimbRate {
@@ -154,7 +178,7 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/SpinnerBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/SpinnerBackend.cs
index dbe0748..b52af9b 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/SpinnerBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/SpinnerBackend.cs
@@ -26,7 +26,7 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using MonoMac.AppKit;
using MonoMac.Foundation;
@@ -42,7 +42,6 @@ namespace Xwt.Mac
{
var widget = new ProgressIndicatorView ();
ViewObject = widget;
- Widget.SizeToFit ();
widget.Indeterminate = true;
widget.Style = NSProgressIndicatorStyle.Spinning;
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/StatusIconBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/StatusIconBackend.cs
index 27a1ae2..cfe64c7 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/StatusIconBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/StatusIconBackend.cs
@@ -30,6 +30,7 @@ using Xwt.Backends;
using Xwt.Drawing;
using MonoMac.AppKit;
+
namespace Xwt.Mac
{
public class StatusIconBackend : IStatusIconBackend
@@ -39,7 +40,7 @@ namespace Xwt.Mac
NSStatusItem statusItem;
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
statusItem = NSStatusBar.SystemStatusBar.CreateStatusItem (NSVariableStatusItemLength);
}
@@ -52,12 +53,9 @@ namespace Xwt.Mac
statusItem.Menu = (NSMenu)menuBackend;
}
- public void SetImage (object imageBackend) {
- if (imageBackend == null) {
- throw new ArgumentNullException ("imageBackend");
- }
-
- statusItem.Image = (NSImage)imageBackend;
+ public void SetImage (ImageDescription image)
+ {
+ statusItem.Image = image.ToNSImage ();
}
public void EnableEvent (object eventId) { throw new NotImplementedException (); }
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/TableViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/TableViewBackend.cs
index 5904553..41439dd 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/TableViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/TableViewBackend.cs
@@ -29,7 +29,7 @@ using MonoMac.AppKit;
using Xwt.Backends;
using System.Collections.Generic;
using MonoMac.Foundation;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
@@ -49,11 +49,17 @@ namespace Xwt.Mac
Table = CreateView ();
scroll = new ScrollView ();
scroll.DocumentView = Table;
+ scroll.BorderType = NSBorderType.BezelBorder;
ViewObject = scroll;
- Table.SizeToFit ();
Widget.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
Widget.AutoresizesSubviews = true;
}
+
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+ Util.DrainObjectCopyPool ();
+ }
public ScrollPolicy VerticalScrollPolicy {
get {
@@ -142,7 +148,7 @@ namespace Xwt.Mac
void HandleTreeSelectionDidChange (NSNotification notif)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
EventSink.OnSelectionChanged ();
});
}
@@ -155,13 +161,15 @@ namespace Xwt.Mac
public virtual object AddColumn (ListViewColumn col)
{
var tcol = new NSTableColumn ();
+ tcol.Editable = true;
cols.Add (tcol);
var c = CellUtil.CreateCell (this, col.Views);
tcol.DataCell = c;
Table.AddColumn (tcol);
var hc = new NSTableHeaderCell ();
- hc.Title = col.Title;
+ hc.Title = col.Title ?? "";
tcol.HeaderCell = hc;
+ Widget.InvalidateIntrinsicContentSize ();
return tcol;
}
@@ -188,6 +196,8 @@ namespace Xwt.Mac
public abstract object GetValue (object pos, int nField);
+ public abstract void SetValue (object pos, int nField, object value);
+
float ICellSource.RowHeight {
get { return Table.RowHeight; }
set { Table.RowHeight = value; }
@@ -217,7 +227,7 @@ namespace Xwt.Mac
class ScrollView: NSScrollView, IViewObject
{
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public NSView View {
get { return this; }
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/TextEntryBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/TextEntryBackend.cs
index 5c8d129..9743269 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/TextEntryBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/TextEntryBackend.cs
@@ -26,11 +26,11 @@
using System;
using Xwt.Backends;
using MonoMac.AppKit;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
- public class TextEntryBackend: ViewBackend<NSTextField,ITextEntryEventSink>, ITextEntryBackend
+ public class TextEntryBackend: ViewBackend<NSView,ITextEntryEventSink>, ITextEntryBackend
{
public TextEntryBackend ()
{
@@ -47,11 +47,24 @@ namespace Xwt.Mac
if (ViewObject is MacComboBox) {
((MacComboBox)ViewObject).SetEntryEventSink (EventSink);
} else {
- ViewObject = new CustomTextField (EventSink);
- Widget.SizeToFit ();
+ ViewObject = new CustomAlignedContainer (new CustomTextField (EventSink, ApplicationContext));
}
+ MultiLine = false;
}
+ protected override void OnSizeToFit ()
+ {
+ Container.SizeToFit ();
+ }
+
+ CustomAlignedContainer Container {
+ get { return (CustomAlignedContainer)base.Widget; }
+ }
+
+ public new NSTextField Widget {
+ get { return (NSTextField) Container.Child; }
+ }
+
protected override Size GetNaturalSize ()
{
var s = base.GetNaturalSize ();
@@ -68,6 +81,15 @@ namespace Xwt.Mac
}
}
+ public Alignment TextAlignment {
+ get {
+ return Widget.Alignment.ToAlignment ();
+ }
+ set {
+ Widget.Alignment = value.ToNSTextAlignment ();
+ }
+ }
+
public bool ReadOnly {
get {
return !Widget.Editable;
@@ -94,15 +116,40 @@ namespace Xwt.Mac
((NSTextFieldCell) Widget.Cell).PlaceholderString = value;
}
}
+
+ public bool MultiLine {
+ get {
+ return Widget.Cell.UsesSingleLineMode;
+ }
+ set {
+ if (value) {
+ Widget.Cell.UsesSingleLineMode = false;
+ Widget.Cell.Scrollable = false;
+ Widget.Cell.Wraps = true;
+ } else {
+ Widget.Cell.UsesSingleLineMode = true;
+ Widget.Cell.Scrollable = true;
+ Widget.Cell.Wraps = false;
+ }
+ Container.ExpandVertically = value;
+ }
+ }
+
+ public override void SetFocus ()
+ {
+ Widget.BecomeFirstResponder ();
+ }
#endregion
}
class CustomTextField: NSTextField, IViewObject
{
ITextEntryEventSink eventSink;
+ ApplicationContext context;
- public CustomTextField (ITextEntryEventSink eventSink)
+ public CustomTextField (ITextEntryEventSink eventSink, ApplicationContext context)
{
+ this.context = context;
this.eventSink = eventSink;
}
@@ -112,12 +159,12 @@ namespace Xwt.Mac
}
}
- public Widget Frontend { get; set; }
+ public ViewBackend Backend { get; set; }
public override void DidChange (MonoMac.Foundation.NSNotification notification)
{
base.DidChange (notification);
- Toolkit.Invoke (delegate {
+ context.InvokeUserCode (delegate {
eventSink.OnChanged ();
});
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/TextLayoutBackendHandler.cs b/external/xwt/Xwt.Mac/Xwt.Mac/TextLayoutBackendHandler.cs
index fa9275e..b2dd59a 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/TextLayoutBackendHandler.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/TextLayoutBackendHandler.cs
@@ -30,89 +30,114 @@ using MonoMac.AppKit;
using MonoMac.Foundation;
using MonoMac.CoreText;
using MonoMac.CoreGraphics;
-using Xwt.Engine;
using Xwt.Drawing;
using PointF = System.Drawing.PointF;
using SizeF = System.Drawing.SizeF;
using RectangleF = System.Drawing.RectangleF;
+using System.Collections.Generic;
namespace Xwt.Mac
{
- public class TextLayoutBackendHandler: ITextLayoutBackendHandler
+ public class MacTextLayoutBackendHandler: TextLayoutBackendHandler
{
class LayoutInfo
{
- public CTFramesetter Framesetter;
public string Text;
public NSFont Font;
public float? Width, Height;
public TextTrimming TextTrimming;
}
- public object Create (Xwt.Drawing.Context context)
+ public override object Create ()
{
return new LayoutInfo ();
}
- public object Create (ICanvasBackend canvas)
- {
- return new LayoutInfo {
- Font = (NSFont)canvas.Font
- };
- }
-
- public void SetText (object backend, string text)
+ public override void SetText (object backend, string text)
{
LayoutInfo li = (LayoutInfo)backend;
- li.Text = text;
- InvalidateFramesetter (li);
+ li.Text = text.Replace ("\r\n", "\n");
}
- public void SetFont (object backend, Xwt.Drawing.Font font)
+ public override void SetFont (object backend, Xwt.Drawing.Font font)
{
LayoutInfo li = (LayoutInfo)backend;
- li.Font = (NSFont)WidgetRegistry.GetBackend (font);
- InvalidateFramesetter (li);
+ li.Font = (NSFont)Toolkit.GetBackend (font);
}
- public void SetWidth (object backend, double value)
+ public override void SetWidth (object backend, double value)
{
LayoutInfo li = (LayoutInfo)backend;
li.Width = value < 0 ? null : (float?)value;
}
- public void SetHeight (object backend, double value)
+ public override void SetHeight (object backend, double value)
{
LayoutInfo li = (LayoutInfo)backend;
li.Height = value < 0 ? null : (float?)value;
}
- public void SetTrimming (object backend, TextTrimming value)
+ public override void SetTrimming (object backend, TextTrimming value)
{
LayoutInfo li = (LayoutInfo)backend;
li.TextTrimming = value;
}
- public Size GetSize (object backend)
+ public override Size GetSize (object backend)
{
LayoutInfo li = (LayoutInfo)backend;
- if (li.Framesetter == null)
- return Size.Zero;
+ using (CTFrame frame = CreateFrame (li)) {
+ if (frame == null)
+ return Size.Zero;
+
+ Size result = Size.Zero;
+ CTLine [] lines = frame.GetLines ();
+ float lineHeight = li.Font.Ascender - li.Font.Descender + li.Font.Leading;
+
+ CTLine ellipsis = null;
+ bool ellipsize = li.Width.HasValue && li.TextTrimming == TextTrimming.WordElipsis;
+ if (ellipsize)
+ ellipsis = new CTLine (CreateAttributedString (li, "..."));
+
+ // try to approximate Pango's layout
+ foreach (var line in lines) {
+ var l = line;
+ if (ellipsize) { // we need to create a new CTLine here because the framesetter already truncated the text for the line
+ l = new CTLine (CreateAttributedString (li, li.Text.Substring (line.StringRange.Location)))
+ .GetTruncatedLine (li.Width.Value, CTLineTruncation.End, ellipsis);
+ line.Dispose ();
+ }
+
+ result.Width = Math.Max (result.Width, l.GetTypographicBounds ());
+ result.Height += lineHeight;
+
+ // clean up after ourselves as we go
+ l.Dispose ();
+ }
- NSRange unused;
- SizeF constraint = new SizeF (li.Width ?? float.MaxValue, float.MaxValue);
- return li.Framesetter.SuggestFrameSize (new NSRange (0, li.Text.Length), null, constraint, out unused).ToXwtSize ();
+ // CoreText throws away trailing line breaks..
+ if (li.Text.EndsWith ("\n"))
+ result.Height += lineHeight;
+
+ result.Width = Math.Ceiling (result.Width);
+ result.Height = Math.Ceiling (result.Height);
+ return result;
+ }
}
- static void InvalidateFramesetter (LayoutInfo li)
+ static CTFrame CreateFrame (LayoutInfo li)
{
- if (li.Framesetter != null) {
- li.Framesetter.Dispose ();
- li.Framesetter = null;
+ if (string.IsNullOrEmpty (li.Text))
+ return null;
+
+ using (CTFramesetter framesetter = new CTFramesetter (CreateAttributedString (li))) {
+ CGPath path = new CGPath ();
+ bool ellipsize = li.Width.HasValue && li.TextTrimming == TextTrimming.WordElipsis;
+ path.AddRect (new RectangleF (0, 0, li.Width.HasValue && !ellipsize ? li.Width.Value : float.MaxValue, li.Height ?? float.MaxValue));
+
+ return framesetter.GetFrame (new NSRange (0, li.Text.Length), path, null);
}
- if (!string.IsNullOrEmpty (li.Text))
- li.Framesetter = new CTFramesetter (CreateAttributedString (li));
}
static NSAttributedString CreateAttributedString (LayoutInfo li, string overrideText = null)
@@ -135,36 +160,55 @@ namespace Xwt.Mac
internal static void Draw (CGContext ctx, object layout, double x, double y)
{
LayoutInfo li = (LayoutInfo)layout;
- if (li.Framesetter == null)
- return;
-
- CGPath path = new CGPath ();
- path.AddRect (new RectangleF (0, 0, li.Width ?? float.MaxValue, li.Height ?? float.MaxValue));
- CTFrame frame = li.Framesetter.GetFrame (new NSRange (0, li.Text.Length), path, null);
-
- CTLine ellipsis = null;
- bool ellipsize = li.Width.HasValue && li.TextTrimming == TextTrimming.WordElipsis;
- if (ellipsize)
- ellipsis = new CTLine (CreateAttributedString (li, "..."));
-
- float lineHeight = layoutManager.DefaultLineHeightForFont (li.Font);
-
- ctx.SaveState ();
- ctx.TextMatrix = CGAffineTransform.MakeScale (1f, -1f);
- ctx.TranslateCTM ((float)x, (float)y + li.Font.Ascender);
- foreach (var line in frame.GetLines ()) {
- ctx.TextPosition = PointF.Empty;
- if (ellipsize) // we need to create a new CTLine here because the framesetter already truncated the text for the line
- new CTLine (CreateAttributedString (li, li.Text.Substring (line.StringRange.Location)))
- .GetTruncatedLine (li.Width.Value, CTLineTruncation.End, ellipsis).Draw (ctx);
- else
- line.Draw (ctx);
- ctx.TranslateCTM (0, lineHeight);
+ using (CTFrame frame = CreateFrame (li)) {
+ if (frame == null)
+ return;
+
+ CTLine ellipsis = null;
+ bool ellipsize = li.Width.HasValue && li.TextTrimming == TextTrimming.WordElipsis;
+ if (ellipsize)
+ ellipsis = new CTLine (CreateAttributedString (li, "..."));
+
+ float lineHeight = li.Font.Ascender - li.Font.Descender + li.Font.Leading;
+
+ ctx.SaveState ();
+ ctx.TextMatrix = CGAffineTransform.MakeScale (1f, -1f);
+ ctx.TranslateCTM ((float)x, (float)y + li.Font.Ascender);
+ foreach (var line in frame.GetLines ()) {
+ ctx.TextPosition = PointF.Empty;
+ if (ellipsize) // we need to create a new CTLine here because the framesetter already truncated the text for the line
+ new CTLine (CreateAttributedString (li, li.Text.Substring (line.StringRange.Location)))
+ .GetTruncatedLine (li.Width.Value, CTLineTruncation.End, ellipsis).Draw (ctx);
+ else
+ line.Draw (ctx);
+ ctx.TranslateCTM (0, lineHeight);
+ }
+ ctx.RestoreState ();
}
- ctx.RestoreState ();
}
- static readonly NSLayoutManager layoutManager = new NSLayoutManager ();
+ public override void AddAttribute (object backend, TextAttribute attribute)
+ {
+ }
+
+ public override void ClearAttributes (object backend)
+ {
+ }
+
+ public override int GetIndexFromCoordinates (object backend, double x, double y)
+ {
+ return 0;
+ }
+
+ public override Point GetCoordinateFromIndex (object backend, int index)
+ {
+ return new Point (0,0);
+ }
+
+ public override void Dispose (object backend)
+ {
+ // nothing
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ToggleButtonBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ToggleButtonBackend.cs
index 5aa5bf8..3dd27b1 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ToggleButtonBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ToggleButtonBackend.cs
@@ -24,11 +24,18 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using MonoMac.AppKit;
+using Xwt.Backends;
namespace Xwt.Mac
{
- public class ToggleButtonBackend: ButtonBackend
+ public class ToggleButtonBackend: ButtonBackend, IToggleButtonBackend
{
+ public bool Active {
+ get { return Widget.State == NSCellStateValue.On; }
+ set { Widget.State = value? NSCellStateValue.On : NSCellStateValue.Off; }
+ }
+
public ToggleButtonBackend ()
{
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/TreeViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/TreeViewBackend.cs
index d5d3b37..2faac18 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/TreeViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/TreeViewBackend.cs
@@ -37,6 +37,21 @@ namespace Xwt.Mac
{
ITreeDataSource source;
TreeSource tsource;
+
+ class TreeDelegate: NSOutlineViewDelegate
+ {
+ public TreeViewBackend Backend;
+
+ public override void ItemDidExpand (NSNotification notification)
+ {
+ Backend.EventSink.OnRowExpanded (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ }
+
+ public override void ItemWillExpand (NSNotification notification)
+ {
+ Backend.EventSink.OnRowExpanding (((TreeItem)notification.UserInfo["NSObject"]).Position);
+ }
+ }
NSOutlineView Tree {
get { return (NSOutlineView) Table; }
@@ -44,7 +59,9 @@ namespace Xwt.Mac
protected override NSTableView CreateView ()
{
- return new NSOutlineView ();
+ var t = new NSOutlineView ();
+ t.Delegate = new TreeDelegate () { Backend = this };
+ return t;
}
protected override string SelectionChangeEventName {
@@ -70,13 +87,20 @@ namespace Xwt.Mac
{
return source.GetValue ((TreePosition)pos, nField);
}
+
+ public override void SetValue (object pos, int nField, object value)
+ {
+ source.SetValue ((TreePosition)pos, nField, value);
+ }
public TreePosition[] SelectedRows {
get {
TreePosition[] res = new TreePosition [Table.SelectedRowCount];
int n = 0;
- foreach (var i in Table.SelectedRows) {
- res [n] = ((TreeItem)Tree.ItemAtRow ((int)i)).Position;
+ if (Table.SelectedRowCount > 0) {
+ foreach (var i in Table.SelectedRows) {
+ res [n] = ((TreeItem)Tree.ItemAtRow ((int)i)).Position;
+ }
}
return res;
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/Util.cs b/external/xwt/Xwt.Mac/Xwt.Mac/Util.cs
index a7e189b..78635d5 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/Util.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/Util.cs
@@ -30,6 +30,11 @@ using Xwt.Drawing;
using MonoMac.CoreGraphics;
using SizeF = System.Drawing.SizeF;
using RectangleF = System.Drawing.RectangleF;
+using MonoMac.ObjCRuntime;
+using MonoMac.Foundation;
+using System.Collections.Generic;
+using Xwt.Backends;
+using System.Runtime.InteropServices;
namespace Xwt.Mac
{
@@ -86,15 +91,37 @@ namespace Xwt.Mac
y = v.Superview.Frame.Height - y - (float)rect.Height;
v.Frame = new System.Drawing.RectangleF ((float)rect.X, y, (float)rect.Width, (float)rect.Height);
}
+
+ public static Alignment ToAlignment (this NSTextAlignment align)
+ {
+ switch (align) {
+ case NSTextAlignment.Center: return Alignment.Center;
+ case NSTextAlignment.Right: return Alignment.End;
+ default: return Alignment.Start;
+ }
+ }
+
+ public static NSTextAlignment ToNSTextAlignment (this Alignment align)
+ {
+ switch (align) {
+ case Alignment.Center: return NSTextAlignment.Center;
+ case Alignment.End: return NSTextAlignment.Right;
+ default: return NSTextAlignment.Left;
+ }
+ }
public static NSColor ToNSColor (this Color col)
{
return NSColor.FromDeviceRgba ((float)col.Red, (float)col.Green, (float)col.Blue, (float)col.Alpha);
}
+
+ static readonly CGColorSpace DeviceRgbColorSpace = CGColorSpace.CreateDeviceRGB ();
public static CGColor ToCGColor (this Color col)
{
- return new CGColor ((float)col.Red, (float)col.Green, (float)col.Blue, (float)col.Alpha);
+ return new CGColor (DeviceRgbColorSpace, new float[] {
+ (float)col.Red, (float)col.Green, (float)col.Blue, (float)col.Alpha
+ });
}
public static Color ToXwtColor (this NSColor col)
@@ -123,11 +150,11 @@ namespace Xwt.Mac
public static int ToIconType (string id)
{
switch (id) {
- case StockIcons.Error: return 1937010544; // 'stop'
- case StockIcons.Warning: return 1667331444; // 'caut'
- case StockIcons.Information: return 1852798053; // 'note'
- case StockIcons.Question: return 1903519091; // 'ques'
- case StockIcons.Remove: return 1952736620; // 'tdel'
+ case StockIconId.Error: return 1937010544; // 'stop'
+ case StockIconId.Warning: return 1667331444; // 'caut'
+ case StockIconId.Information: return 1852798053; // 'note'
+ case StockIconId.Question: return 1903519091; // 'ques'
+ case StockIconId.Remove: return 1952736620; // 'tdel'
}
return 0;
}
@@ -150,6 +177,169 @@ namespace Xwt.Mac
}
return new SizeF (32f, 32f);
}
+
+ public static string ToUTI (this TransferDataType dt)
+ {
+ if (dt == TransferDataType.Uri)
+ return NSPasteboard.NSUrlType;
+ if (dt == TransferDataType.Text)
+ return NSPasteboard.NSStringType;
+ if (dt == TransferDataType.Rtf)
+ return NSPasteboard.NSRtfType;
+ if (dt == TransferDataType.Html)
+ return NSPasteboard.NSHtmlType;
+ if (dt == TransferDataType.Image)
+ return NSPasteboard.NSTiffType;
+
+ return dt.Id;
+ }
+
+ static Selector selCopyWithZone = new Selector ("copyWithZone:");
+ static Selector selRetainCount = new Selector ("retainCount");
+ static DateTime lastCopyPoolDrain = DateTime.Now;
+ static List<object> copyPool = new List<object> ();
+
+ /// <summary>
+ /// Implements the NSCopying protocol in a class. The class must implement ICopiableObject.
+ /// The method ICopiableObject.CopyFrom will be called to make the copy of the object
+ /// </summary>
+ /// <typeparam name="T">Type for which to enable copying</typeparam>
+ public static void MakeCopiable<T> () where T:ICopiableObject
+ {
+ Class c = new Class (typeof(T));
+ c.AddMethod (selCopyWithZone.Handle, new Func<IntPtr, IntPtr, IntPtr, IntPtr> (MakeCopy), "i@:@");
+ }
+
+ static IntPtr MakeCopy (IntPtr sender, IntPtr sel, IntPtr zone)
+ {
+ var thisOb = (ICopiableObject) Runtime.GetNSObject (sender);
+
+ // Makes a copy of the object by calling the default implementation of copyWithZone
+ IntPtr copyHandle = Messaging.IntPtr_objc_msgSendSuper_IntPtr(((NSObject)thisOb).SuperHandle, selCopyWithZone.Handle, zone);
+ var copyOb = (ICopiableObject) Runtime.GetNSObject (copyHandle);
+
+ // Copy of managed data
+ copyOb.CopyFrom (thisOb);
+
+ // Copied objects are for internal use of the Cocoa framework. We need to keep a reference of the
+ // managed object until the the framework doesn't need it anymore.
+
+ if ((DateTime.Now - lastCopyPoolDrain).TotalSeconds > 2)
+ DrainObjectCopyPool ();
+
+ copyPool.Add (copyOb);
+
+ return ((NSObject)copyOb).Handle;
+ }
+
+ public static void DrainObjectCopyPool ()
+ {
+ // Objects in the pool have been created by Cocoa, so there should be no managed references
+ // other than the ones we keep in the pool. An object can be removed from the pool if it
+ // has only 1 reference left (the managed one)
+
+ List<NSObject> markedForDelete = new List<NSObject> ();
+
+ foreach (NSObject ob in copyPool) {
+ uint count = Messaging.UInt32_objc_msgSend (ob.Handle, selRetainCount.Handle);
+ if (count == 1)
+ markedForDelete.Add (ob);
+ }
+ foreach (NSObject ob in markedForDelete)
+ copyPool.Remove (ob);
+
+ lastCopyPoolDrain = DateTime.Now;
+ }
+
+ public static NSBitmapImageFileType ToMacFileType (this ImageFileType type)
+ {
+ switch (type) {
+ case ImageFileType.Png: return NSBitmapImageFileType.Png;
+ case ImageFileType.Jpeg: return NSBitmapImageFileType.Jpeg;
+ case ImageFileType.Bmp: return NSBitmapImageFileType.Bmp;
+ default:
+ throw new NotSupportedException ();
+ }
+ }
+
+ public static NSImage ToNSImage (this ImageDescription idesc)
+ {
+ if (idesc.IsNull)
+ return null;
+ var img = (NSImage)idesc.Backend;
+ if (img is CustomImage)
+ img = ((CustomImage)img).Clone ();
+ else {
+ img = (NSImage)img.Copy ();
+ }
+ img.Size = new System.Drawing.SizeF ((float)idesc.Size.Width, (float)idesc.Size.Height);
+ return img;
+ }
+
+
+ public static int ToUnderlineStyle (FontStyle style)
+ {
+ return 1;
+ }
+
+ static Selector applyFontTraits = new Selector ("applyFontTraits:range:");
+
+ public static NSAttributedString ToAttributedString (this FormattedText ft)
+ {
+ NSMutableAttributedString ns = new NSMutableAttributedString (ft.Text);
+ foreach (var att in ft.Attributes) {
+ var r = new NSRange (att.StartIndex, att.Count);
+ if (att is BackgroundTextAttribute) {
+ var xa = (BackgroundTextAttribute)att;
+ ns.AddAttribute (NSAttributedString.BackgroundColorAttributeName, xa.Color.ToNSColor (), r);
+ }
+ else if (att is ColorTextAttribute) {
+ var xa = (ColorTextAttribute)att;
+ ns.AddAttribute (NSAttributedString.ForegroundColorAttributeName, xa.Color.ToNSColor (), r);
+ }
+ else if (att is UnderlineTextAttribute) {
+ var xa = (UnderlineTextAttribute)att;
+ int style = xa.Underline ? 0x01 /*NSUnderlineStyleSingle*/ : 0;
+ ns.AddAttribute (NSAttributedString.UnderlineStyleAttributeName, (NSNumber)style, r);
+ }
+ else if (att is FontStyleTextAttribute) {
+ var xa = (FontStyleTextAttribute)att;
+ if (xa.Style == FontStyle.Italic) {
+ Messaging.void_objc_msgSend_int_NSRange (ns.Handle, applyFontTraits.Handle, (int)NSFontTraitMask.Italic, r);
+ } else if (xa.Style == FontStyle.Oblique) {
+ ns.AddAttribute (NSAttributedString.ObliquenessAttributeName, (NSNumber)0.2f, r);
+ } else {
+ ns.AddAttribute (NSAttributedString.ObliquenessAttributeName, (NSNumber)0.0f, r);
+ Messaging.void_objc_msgSend_int_NSRange (ns.Handle, applyFontTraits.Handle, (int)NSFontTraitMask.Unitalic, r);
+ }
+ }
+ else if (att is FontWeightTextAttribute) {
+ var xa = (FontWeightTextAttribute)att;
+ var trait = xa.Weight >= FontWeight.Bold ? NSFontTraitMask.Bold : NSFontTraitMask.Unbold;
+ Messaging.void_objc_msgSend_int_NSRange (ns.Handle, applyFontTraits.Handle, (int) trait, r);
+ }
+ else if (att is LinkTextAttribute) {
+ var xa = (LinkTextAttribute)att;
+ ns.AddAttribute (NSAttributedString.LinkAttributeName, (NSString)xa.Target, r);
+ }
+ else if (att is StrikethroughTextAttribute) {
+ var xa = (StrikethroughTextAttribute)att;
+ int style = xa.Strikethrough ? 0x01 /*NSUnderlineStyleSingle*/ : 0;
+ ns.AddAttribute (NSAttributedString.StrikethroughStyleAttributeName, (NSNumber)style, r);
+ }
+ else if (att is FontTextAttribute) {
+ var xa = (FontTextAttribute)att;
+ var nf = (NSFont)Toolkit.GetBackend (xa.Font);
+ ns.AddAttribute (NSAttributedString.FontAttributeName, nf, r);
+ }
+ }
+ return ns;
+ }
+ }
+
+ public interface ICopiableObject
+ {
+ void CopyFrom (object other);
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/ViewBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/ViewBackend.cs
old mode 100755
new mode 100644
index b630180..443fc25
--- a/external/xwt/Xwt.Mac/Xwt.Mac/ViewBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/ViewBackend.cs
@@ -35,31 +35,52 @@ using MonoMac.Foundation;
using MonoMac.ObjCRuntime;
using Xwt;
using Xwt.Backends;
-using Xwt.Engine;
+using MonoMac.CoreGraphics;
+using MonoMac.CoreAnimation;
+
namespace Xwt.Mac
{
- public abstract class ViewBackend<T,S>: IWidgetBackend,IMacViewBackend where T:NSView where S:IWidgetEventSink
+ public abstract class ViewBackend<T,S>: ViewBackend where T:NSView where S:IWidgetEventSink
+ {
+ public new S EventSink {
+ get { return (S) base.EventSink; }
+ }
+
+ public new T Widget {
+ get { return (T) base.Widget; }
+ }
+ }
+
+ public abstract class ViewBackend: IWidgetBackend
{
Widget frontend;
- S eventSink;
+ IWidgetEventSink eventSink;
IViewObject viewObject;
WidgetEvent currentEvents;
bool autosize;
-
- void IBackend.InitializeBackend (object frontend)
+ Size lastFittingSize;
+ bool sizeCalcPending = true;
+ bool sensitive = true;
+ bool canGetFocus = true;
+ Xwt.Drawing.Color backgroundColor;
+
+ void IBackend.InitializeBackend (object frontend, ApplicationContext context)
{
+ ApplicationContext = context;
this.frontend = (Widget) frontend;
- if (viewObject != null)
- viewObject.Frontend = (Widget) frontend;
}
void IWidgetBackend.Initialize (IWidgetEventSink sink)
{
- eventSink = (S) sink;
+ eventSink = (IWidgetEventSink) sink;
Initialize ();
+ ResetFittingSize ();
+ canGetFocus = Widget.AcceptsFirstResponder ();
}
+ // To be called when the widget is a root and is not inside a Xwt window. For example, when it is in a popover or a tooltip
+ // In that case, the widget has to listen to the change event of the children and resize itself
public void SetAutosizeMode (bool autosize)
{
this.autosize = autosize;
@@ -72,35 +93,36 @@ namespace Xwt.Mac
{
}
- public S EventSink {
+ public IWidgetEventSink EventSink {
get { return eventSink; }
}
- IWidgetEventSink IMacViewBackend.EventSink {
- get { return EventSink; }
- }
-
public Widget Frontend {
get {
return this.frontend;
}
}
+ public ApplicationContext ApplicationContext {
+ get;
+ private set;
+ }
+
public object NativeWidget {
get {
return Widget;
}
}
- public T Widget {
- get { return (T) ViewObject.View; }
+ public NSView Widget {
+ get { return (NSView) ViewObject.View; }
}
public IViewObject ViewObject {
get { return viewObject; }
set {
viewObject = value;
- viewObject.Frontend = frontend;
+ viewObject.Backend = this;
}
}
@@ -108,23 +130,64 @@ namespace Xwt.Mac
get { return !Widget.Hidden; }
set { Widget.Hidden = !value; }
}
+
+ public double Opacity {
+ get { return Widget.AlphaValue; }
+ set { Widget.AlphaValue = (float)value; }
+ }
public virtual bool Sensitive {
- get { return true; }
- set { }
+ get { return sensitive; }
+ set {
+ sensitive = value;
+ UpdateSensitiveStatus (Widget, sensitive && ParentIsSensitive ());
+ }
}
-
+
+ bool ParentIsSensitive ()
+ {
+ IViewObject parent = Widget.Superview as IViewObject;
+ if (parent == null) {
+ var wb = Widget.Window as WindowBackend;
+ return wb == null || wb.Sensitive;
+ }
+ if (!parent.Backend.Sensitive)
+ return false;
+ return parent.Backend.ParentIsSensitive ();
+ }
+
+ internal void UpdateSensitiveStatus (NSView view, bool parentIsSensitive)
+ {
+ if (view is NSControl)
+ ((NSControl)view).Enabled = parentIsSensitive && sensitive;
+
+ foreach (var s in view.Subviews) {
+ if (s is IViewObject)
+ ((IViewObject)s).Backend.UpdateSensitiveStatus (s, parentIsSensitive);
+ else
+ UpdateSensitiveStatus (s, sensitive && parentIsSensitive);
+ }
+ }
+
public virtual bool CanGetFocus {
- get { return true; }
- set { }
+ get { return canGetFocus; }
+ set {
+ canGetFocus = value;
+ if (!Widget.AcceptsFirstResponder ())
+ canGetFocus = false;
+ }
}
public virtual bool HasFocus {
- get { return false; }
+ get {
+ return Widget.Window != null && Widget.Window.FirstResponder == Widget;
+ }
}
- public void SetFocus ()
+ public virtual void SetFocus ()
{
+ if (Widget.Window != null && CanGetFocus)
+ Widget.Window.MakeFirstResponder (Widget);
}
public string TooltipText {
@@ -184,28 +247,105 @@ namespace Xwt.Mac
{
}
- public virtual SizeRequestMode SizeRequestMode {
- get { return SizeRequestMode.HeightForWidth; }
- }
-
Size IWidgetBackend.Size {
get { return new Size (Widget.WidgetWidth (), Widget.WidgetHeight ()); }
}
- NSView IMacViewBackend.View {
- get { return (NSView) Widget; }
- }
-
public static NSView GetWidget (IWidgetBackend w)
{
- return ((IMacViewBackend)w).View;
+ return ((ViewBackend)w).Widget;
}
public static NSView GetWidget (Widget w)
{
- return GetWidget ((IWidgetBackend)WidgetRegistry.GetBackend (w));
+ return GetWidget ((IWidgetBackend)Toolkit.GetBackend (w));
+ }
+
+ public static NSView GetWidgetWithPlacement (IWidgetBackend childBackend)
+ {
+ var backend = (ViewBackend)childBackend;
+ var child = backend.Widget;
+ var wrapper = child.Superview as WidgetPlacementWrapper;
+ if (wrapper != null)
+ return wrapper;
+
+ if (!NeedsAlignmentWrapper (backend.Frontend))
+ return child;
+
+ wrapper = new WidgetPlacementWrapper ();
+ wrapper.SetChild (child, backend.Frontend);
+ return wrapper;
+ }
+
+ public static NSView SetChildPlacement (IWidgetBackend childBackend)
+ {
+ var backend = (ViewBackend)childBackend;
+ var child = backend.Widget;
+ var wrapper = child.Superview as WidgetPlacementWrapper;
+ var fw = backend.Frontend;
+
+ if (!NeedsAlignmentWrapper (fw)) {
+ if (wrapper != null) {
+ var parent = wrapper.Superview;
+ child.RemoveFromSuperview ();
+ ReplaceSubview (wrapper, child);
+ }
+ return child;
+ }
+
+ if (wrapper == null) {
+ wrapper = new WidgetPlacementWrapper ();
+ var f = child.Frame;
+ ReplaceSubview (child, wrapper);
+ wrapper.SetChild (child, backend.Frontend);
+ wrapper.Frame = f;
+ } else
+ wrapper.UpdateChildPlacement ();
+ return wrapper;
+ }
+
+ public static void RemoveChildPlacement (NSView w)
+ {
+ if (w == null)
+ return;
+ if (w is WidgetPlacementWrapper) {
+ var wp = (WidgetPlacementWrapper)w;
+ wp.Subviews [0].RemoveFromSuperview ();
+ }
}
+ static bool NeedsAlignmentWrapper (Widget fw)
+ {
+ return fw.HorizontalPlacement != WidgetPlacement.Fill || fw.VerticalPlacement != WidgetPlacement.Fill || fw.Margin.VerticalSpacing != 0 || fw.Margin.HorizontalSpacing != 0;
+ }
+
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ SetChildPlacement (childBackend);
+ }
+
+ public static void ReplaceSubview (NSView oldChild, NSView newChild)
+ {
+ var vo = oldChild as IViewObject;
+ if (vo != null && vo.Backend.Frontend.Parent != null) {
+ var ba = vo.Backend.Frontend.Parent.GetBackend () as ViewBackend;
+ if (ba != null) {
+ ba.ReplaceChild (oldChild, newChild);
+ return;
+ }
+ }
+ var f = oldChild.Frame;
+ oldChild.Superview.ReplaceSubviewWith (oldChild, newChild);
+ newChild.Frame = f;
+ }
+
+ public virtual void ReplaceChild (NSView oldChild, NSView newChild)
+ {
+ var f = oldChild.Frame;
+ oldChild.Superview.ReplaceSubviewWith (oldChild, newChild);
+ newChild.Frame = f;
+ }
+
public virtual object Font {
get {
if (Widget is NSControl)
@@ -219,12 +359,20 @@ namespace Xwt.Mac
((NSControl)(object)Widget).Font = (NSFont) value;
if (Widget is NSText)
((NSText)(object)Widget).Font = (NSFont) value;
+ ResetFittingSize ();
}
}
public virtual Xwt.Drawing.Color BackgroundColor {
- get;
- set;
+ get {
+ return this.backgroundColor;
+ }
+ set {
+ this.backgroundColor = value;
+ if (Widget.Layer == null)
+ Widget.WantsLayer = true;
+ Widget.Layer.BackgroundColor = value.ToCGColor ();
+ }
}
#region IWidgetBackend implementation
@@ -233,76 +381,93 @@ namespace Xwt.Mac
{
var lo = Widget.ConvertPointToBase (new PointF ((float)widgetCoordinates.X, (float)widgetCoordinates.Y));
lo = Widget.Window.ConvertBaseToScreen (lo);
- return new Point (lo.X, lo.Y);
+ return MacDesktopBackend.ToDesktopRect (new RectangleF (lo.X, lo.Y, 0, Widget.IsFlipped ? 0 : Widget.Frame.Height)).Location;
}
protected virtual Size GetNaturalSize ()
{
-// double w1 = Widget.FittingSize.Width;
- return new Size (Widget.WidgetWidth(), Widget.WidgetHeight ());
+ if (sizeCalcPending) {
+ sizeCalcPending = false;
+ var f = Widget.Frame;
+ SizeToFit ();
+ lastFittingSize = new Size (Widget.WidgetWidth (), Widget.WidgetHeight ());
+ Widget.Frame = f;
+ }
+ return lastFittingSize;
}
- public WidgetSize GetPreferredWidth ()
+ public virtual Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- var w = GetNaturalSize ().Width;
- var s = new Xwt.WidgetSize (w, w);
- if (minWidth != -1 && s.MinSize > minWidth)
- s.MinSize = minWidth;
- return s;
+ return GetNaturalSize ();
}
- public WidgetSize GetPreferredHeight ()
+ protected double minWidth = -1, minHeight = -1;
+
+ public void SetMinSize (double width, double height)
{
- var h = GetNaturalSize ().Height;
- var s = new Xwt.WidgetSize (h, h);
- if (minHeight != -1 && s.MinSize > minHeight)
- s.MinSize = minHeight;
- return s;
+ minWidth = width;
+ minHeight = height;
}
- public WidgetSize GetPreferredHeightForWidth (double width)
+ protected void ResetFittingSize ()
{
- return GetPreferredHeight ();
+ sizeCalcPending = true;
}
- public WidgetSize GetPreferredWidthForHeight (double height)
+ public void SizeToFit ()
{
- return GetPreferredWidth ();
+ OnSizeToFit ();
+// if (minWidth != -1 && Widget.Frame.Width < minWidth || minHeight != -1 && Widget.Frame.Height < minHeight)
+// Widget.SetFrameSize (new SizeF (Math.Max (Widget.Frame.Width, (float)minWidth), Math.Max (Widget.Frame.Height, (float)minHeight)));
}
- double minWidth = -1, minHeight = -1;
-
- public void SetMinSize (double width, double height)
+ protected virtual Size CalcFittingSize ()
{
- minWidth = width;
- minHeight = height;
+ return Size.Zero;
+ }
+
+ static readonly Selector sizeToFitSel = new Selector ("sizeToFit");
+
+ protected virtual void OnSizeToFit ()
+ {
+ if (Widget.RespondsToSelector (sizeToFitSel)) {
+ Messaging.void_objc_msgSend (Widget.Handle, sizeToFitSel.Handle);
+ } else {
+ var s = CalcFittingSize ();
+ if (!s.IsZero)
+ Widget.SetFrameSize (new SizeF ((float)s.Width, (float)s.Height));
+ }
}
- public void SetNaturalSize (double width, double height)
+ public void SetSizeRequest (double width, double height)
{
// Nothing to do
}
public virtual void UpdateLayout ()
{
- var m = Frontend.Margin;
- Widget.SetBoundsOrigin (new PointF (-(float)m.Left, -(float)m.Top));
if (autosize)
AutoUpdateSize ();
}
void AutoUpdateSize ()
- {
- var ws = Frontend.Surface.GetPreferredWidth ();
- var h = Frontend.Surface.GetPreferredHeightForWidth (ws.NaturalSize);
- Widget.SetWidgetBounds (new Rectangle (0, 0, ws.NaturalSize, h.NaturalSize));
+ { var s = Frontend.Surface.GetPreferredSize ();
+ Widget.SetFrameSize (new SizeF ((float)s.Width, (float)s.Height));
}
+
+ NSObject gotFocusObserver;
public virtual void EnableEvent (object eventId)
{
if (eventId is WidgetEvent) {
WidgetEvent ev = (WidgetEvent) eventId;
currentEvents |= ev;
+ switch (ev) {
+ case WidgetEvent.GotFocus:
+ case WidgetEvent.LostFocus:
+ SetupFocusEvents (Widget.GetType ());
+ break;
+ }
}
}
@@ -320,8 +485,12 @@ namespace Xwt.Mac
static Selector prepareForDragOperationSel = new Selector ("prepareForDragOperation:");
static Selector performDragOperationSel = new Selector ("performDragOperation:");
static Selector concludeDragOperationSel = new Selector ("concludeDragOperation:");
+ static Selector becomeFirstResponderSel = new Selector ("becomeFirstResponder");
+ static Selector resignFirstResponderSel = new Selector ("resignFirstResponder");
+
static HashSet<Type> typesConfiguredForDragDrop = new HashSet<Type> ();
-
+ static HashSet<Type> typesConfiguredForFocusEvents = new HashSet<Type> ();
+
static void SetupForDragDrop (Type type)
{
lock (typesConfiguredForDragDrop) {
@@ -336,6 +505,17 @@ namespace Xwt.Mac
}
}
}
+
+ static void SetupFocusEvents (Type type)
+ {
+ lock (typesConfiguredForFocusEvents) {
+ if (typesConfiguredForFocusEvents.Add (type)) {
+ Class c = new Class (type);
+ c.AddMethod (becomeFirstResponderSel.Handle, new Func<IntPtr,IntPtr,bool> (OnBecomeFirstResponder), "B@:");
+ c.AddMethod (resignFirstResponderSel.Handle, new Func<IntPtr,IntPtr,bool> (OnResignFirstResponder), "B@:");
+ }
+ }
+ }
public void DragStart (DragStartData sdata)
{
@@ -374,7 +554,7 @@ namespace Xwt.Mac
IViewObject ob = Runtime.GetNSObject (sender) as IViewObject;
if (ob == null)
return NSDragOperation.None;
- var backend = (ViewBackend<T,S>) WidgetRegistry.GetBackend (ob.Frontend);
+ var backend = ob.Backend;
NSDraggingInfo di = new NSDraggingInfo (dragInfo);
var types = di.DraggingPasteboard.Types.Select (t => ToXwtDragType (t)).ToArray ();
@@ -407,8 +587,8 @@ namespace Xwt.Mac
{
IViewObject ob = Runtime.GetNSObject (sender) as IViewObject;
if (ob != null) {
- var backend = (ViewBackend<T,S>) WidgetRegistry.GetBackend (ob.Frontend);
- Toolkit.Invoke (delegate {
+ var backend = ob.Backend;
+ backend.ApplicationContext.InvokeUserCode (delegate {
backend.eventSink.OnDragLeave (EventArgs.Empty);
});
}
@@ -420,7 +600,7 @@ namespace Xwt.Mac
if (ob == null)
return false;
- var backend = (ViewBackend<T,S>) WidgetRegistry.GetBackend (ob.Frontend);
+ var backend = ob.Backend;
NSDraggingInfo di = new NSDraggingInfo (dragInfo);
var types = di.DraggingPasteboard.Types.Select (t => ToXwtDragType (t)).ToArray ();
@@ -428,7 +608,7 @@ namespace Xwt.Mac
if ((backend.currentEvents & WidgetEvent.DragDropCheck) != 0) {
var args = new DragCheckEventArgs (pos, types, ConvertAction (di.DraggingSourceOperationMask));
- bool res = Toolkit.Invoke (delegate {
+ bool res = backend.ApplicationContext.InvokeUserCode (delegate {
backend.eventSink.OnDragDropCheck (args);
});
if (args.Result == DragDropResult.Canceled || !res)
@@ -443,7 +623,7 @@ namespace Xwt.Mac
if (ob == null)
return false;
- var backend = (ViewBackend<T,S>) WidgetRegistry.GetBackend (ob.Frontend);
+ var backend = ob.Backend;
NSDraggingInfo di = new NSDraggingInfo (dragInfo);
var pos = new Point (di.DraggingLocation.X, di.DraggingLocation.Y);
@@ -452,7 +632,7 @@ namespace Xwt.Mac
TransferDataStore store = new TransferDataStore ();
FillDataStore (store, di.DraggingPasteboard, ob.View.RegisteredDragTypes ());
var args = new DragEventArgs (pos, store, ConvertAction (di.DraggingSourceOperationMask));
- Toolkit.Invoke (delegate {
+ backend.ApplicationContext.InvokeUserCode (delegate {
backend.eventSink.OnDragDrop (args);
});
return args.Success;
@@ -467,14 +647,14 @@ namespace Xwt.Mac
protected virtual void OnDragOverCheck (NSDraggingInfo di, DragOverCheckEventArgs args)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragOverCheck (args);
});
}
protected virtual void OnDragOver (NSDraggingInfo di, DragOverEventArgs args)
{
- Toolkit.Invoke (delegate {
+ ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragOver (args);
});
}
@@ -539,6 +719,7 @@ namespace Xwt.Mac
if (type == TransferDataType.Uri) return NSPasteboard.NSFilenamesType;
if (type == TransferDataType.Image) return NSPasteboard.NSPictType;
if (type == TransferDataType.Rtf) return NSPasteboard.NSRtfType;
+ if (type == TransferDataType.Html) return NSPasteboard.NSHtmlType;
return type.Id;
}
@@ -552,22 +733,98 @@ namespace Xwt.Mac
return TransferDataType.Image;
if (type == NSPasteboard.NSRtfType)
return TransferDataType.Rtf;
+ if (type == NSPasteboard.NSHtmlType)
+ return TransferDataType.Html;
return TransferDataType.FromId (type);
}
+
+ static bool OnBecomeFirstResponder (IntPtr sender, IntPtr sel)
+ {
+ IViewObject ob = Runtime.GetNSObject (sender) as IViewObject;
+ var canGetIt = ob.Backend.canGetFocus;
+ if (canGetIt)
+ ob.Backend.ApplicationContext.InvokeUserCode (ob.Backend.EventSink.OnGotFocus);
+ return canGetIt;
+ }
+ static bool OnResignFirstResponder (IntPtr sender, IntPtr sel)
+ {
+ IViewObject ob = Runtime.GetNSObject (sender) as IViewObject;
+ ob.Backend.ApplicationContext.InvokeUserCode (ob.Backend.EventSink.OnLostFocus);
+ return true;
+ }
+
#endregion
}
- public interface IMacViewBackend
+ sealed class WidgetPlacementWrapper: NSControl, IViewObject
{
- NSView View { get; }
- Widget Frontend { get; }
- void NotifyPreferredSizeChanged ();
- IWidgetEventSink EventSink { get; }
+ NSView child;
+ Widget w;
- // To be called when the widget is a root and is not inside a Xwt window. For example, when it is in a popover or a tooltip
- // In that case, the widget has to listen to the change event of the children and resize itself
- void SetAutosizeMode (bool autosize);
+ public WidgetPlacementWrapper ()
+ {
+ }
+
+ NSView IViewObject.View {
+ get { return this; }
+ }
+
+ ViewBackend IViewObject.Backend {
+ get {
+ var vo = child as IViewObject;
+ return vo != null ? vo.Backend : null;
+ }
+ set {
+ var vo = child as IViewObject;
+ if (vo != null)
+ vo.Backend = value;
+ }
+ }
+
+ public override bool IsFlipped {
+ get {
+ return true;
+ }
+ }
+
+ public void SetChild (NSView child, Widget w)
+ {
+ this.child = child;
+ this.w = w;
+ AddSubview (child);
+ }
+
+ public override void SetFrameSize (SizeF newSize)
+ {
+ base.SetFrameSize (newSize);
+ if (w != null)
+ UpdateChildPlacement ();
+ }
+
+ public void UpdateChildPlacement ()
+ {
+ double cheight = Frame.Height - w.Margin.VerticalSpacing;
+ double cwidth = Frame.Width - w.Margin.HorizontalSpacing;
+ double cx = w.MarginLeft;
+ double cy = w.MarginTop;
+
+ var s = w.Surface.GetPreferredSize (cwidth, cheight);
+ if (w.HorizontalPlacement != WidgetPlacement.Fill) {
+ cx += (cwidth - s.Width) * w.HorizontalPlacement.GetValue ();
+ cwidth = s.Width;
+ }
+ if (w.VerticalPlacement != WidgetPlacement.Fill) {
+ cy += (cheight - s.Height) * w.VerticalPlacement.GetValue ();
+ cheight = s.Height;
+ }
+ child.Frame = new RectangleF ((float)cx, (float)cy, (float)cwidth, (float)cheight);
+ }
+
+ public override void SizeToFit ()
+ {
+ base.SizeToFit ();
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/Xwt.Mac/WindowBackend.cs b/external/xwt/Xwt.Mac/Xwt.Mac/WindowBackend.cs
index 30c6057..59c1b2a 100644
--- a/external/xwt/Xwt.Mac/Xwt.Mac/WindowBackend.cs
+++ b/external/xwt/Xwt.Mac/Xwt.Mac/WindowBackend.cs
@@ -33,7 +33,7 @@ using MonoMac.AppKit;
using MonoMac.Foundation;
using System.Drawing;
using MonoMac.ObjCRuntime;
-using Xwt.Engine;
+
namespace Xwt.Mac
{
@@ -42,7 +42,9 @@ namespace Xwt.Mac
WindowBackendController controller;
IWindowFrameEventSink eventSink;
Window frontend;
- IMacViewBackend child;
+ ViewBackend child;
+ NSView childView;
+ bool sensitive = true;
public WindowBackend (IntPtr ptr): base (ptr)
{
@@ -54,11 +56,21 @@ namespace Xwt.Mac
controller.Window = this;
StyleMask |= NSWindowStyle.Resizable | NSWindowStyle.Closable | NSWindowStyle.Miniaturizable;
ContentView.AutoresizesSubviews = true;
+ ContentView.Hidden = true;
+
+ // TODO: do it only if mouse move events are enabled in a widget
+ AcceptsMouseMovedEvents = true;
+
Center ();
}
- public virtual void InitializeBackend (object frontend)
+ public IWindowFrameEventSink EventSink {
+ get { return (IWindowFrameEventSink)eventSink; }
+ }
+
+ public virtual void InitializeBackend (object frontend, ApplicationContext context)
{
+ this.ApplicationContext = context;
this.frontend = (Window) frontend;
}
@@ -67,6 +79,11 @@ namespace Xwt.Mac
this.eventSink = eventSink;
}
+ public ApplicationContext ApplicationContext {
+ get;
+ private set;
+ }
+
public object NativeWidget {
get {
return this;
@@ -94,11 +111,19 @@ namespace Xwt.Mac
}
}
+ public double Opacity {
+ get { return AlphaValue; }
+ set { AlphaValue = (float)value; }
+ }
+
public bool Sensitive {
get {
- return true;
+ return sensitive;
}
set {
+ sensitive = value;
+ if (child != null)
+ child.UpdateSensitiveStatus (child.Widget, sensitive);
}
}
@@ -114,7 +139,35 @@ namespace Xwt.Mac
public void SetFocus ()
{
}
-
+
+ public bool FullScreen {
+ get {
+ if (MacSystemInformation.OsVersion < MacSystemInformation.Lion)
+ return false;
+
+ return (StyleMask & NSWindowStyle.FullScreenWindow) != 0;
+
+ }
+ set {
+ if (MacSystemInformation.OsVersion < MacSystemInformation.Lion)
+ return;
+
+ if (value != ((StyleMask & NSWindowStyle.FullScreenWindow) != 0)) {
+ //HACK: workaround for MonoMac not allowing null as argument
+ MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (
+ Handle,
+ MonoMac.ObjCRuntime.Selector.GetHandle ("toggleFullScreen:"),
+ IntPtr.Zero);
+ }
+ }
+ }
+
+ object IWindowFrameBackend.Screen {
+ get {
+ return Screen;
+ }
+ }
+
#region IWindowBackend implementation
void IBackend.EnableEvent (object eventId)
{
@@ -123,6 +176,7 @@ namespace Xwt.Mac
switch (@event) {
case WindowFrameEvent.BoundsChanged:
DidResize += HandleDidResize;
+ DidMoved += HandleDidResize;
break;
case WindowFrameEvent.Hidden:
EnableVisibilityEvent (@event);
@@ -175,14 +229,14 @@ namespace Xwt.Mac
}
void OnHidden () {
- Toolkit.Invoke (delegate ()
+ ApplicationContext.InvokeUserCode (delegate ()
{
eventSink.OnHidden ();
});
}
void OnShown () {
- Toolkit.Invoke (delegate ()
+ ApplicationContext.InvokeUserCode (delegate ()
{
eventSink.OnShown ();
});
@@ -205,6 +259,7 @@ namespace Xwt.Mac
switch (@event) {
case WindowFrameEvent.BoundsChanged:
DidResize -= HandleDidResize;
+ DidMoved -= HandleDidResize;
break;
case WindowFrameEvent.Hidden:
this.WillClose -= OnWillClose;
@@ -219,7 +274,13 @@ namespace Xwt.Mac
void HandleDidResize (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ OnBoundsChanged ();
+ }
+
+ protected virtual void OnBoundsChanged ()
+ {
+ LayoutWindow ();
+ ApplicationContext.InvokeUserCode (delegate {
eventSink.OnBoundsChanged (((IWindowBackend)this).Bounds);
});
}
@@ -227,16 +288,26 @@ namespace Xwt.Mac
void IWindowBackend.SetChild (IWidgetBackend child)
{
if (this.child != null) {
- this.child.View.RemoveFromSuperview ();
+ ViewBackend.RemoveChildPlacement (this.child.Widget);
+ this.child.Widget.RemoveFromSuperview ();
+ childView = null;
}
- this.child = (IMacViewBackend) child;
+ this.child = (ViewBackend) child;
if (child != null) {
- ContentView.AddSubview (this.child.View);
- SetPadding (frontend.Padding.Left, frontend.Padding.Top, frontend.Padding.Right, frontend.Padding.Bottom);
- this.child.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
+ childView = ViewBackend.GetWidgetWithPlacement (child);
+ ContentView.AddSubview (childView);
+ LayoutWindow ();
+ childView.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
}
}
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ var w = ViewBackend.SetChildPlacement (childBackend);
+ LayoutWindow ();
+ w.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
+ }
+
bool IWindowFrameBackend.Decorated {
get {
return (StyleMask & NSWindowStyle.Titled) != 0;
@@ -277,14 +348,7 @@ namespace Xwt.Mac
public void SetPadding (double left, double top, double right, double bottom)
{
- if (child != null) {
- var frame = ContentView.Frame;
- frame.X += (float) left;
- frame.Width -= (float) (left + right);
- frame.Y += (float) top;
- frame.Height -= (float) (top + bottom);
- child.View.Frame = frame;
- }
+ LayoutWindow ();
}
void IWindowFrameBackend.Move (double x, double y)
@@ -293,21 +357,28 @@ namespace Xwt.Mac
SetFrame (r, true);
}
- void IWindowFrameBackend.Resize (double width, double height)
+ void IWindowFrameBackend.SetSize (double width, double height)
{
var cr = ContentRectFor (Frame);
+ if (width == -1)
+ width = cr.Width;
+ if (height == -1)
+ height = cr.Height;
var r = FrameRectFor (new System.Drawing.RectangleF ((float)cr.X, (float)cr.Y, (float)width, (float)height));
SetFrame (r, true);
+ LayoutWindow ();
}
Rectangle IWindowFrameBackend.Bounds {
get {
- var r = ContentRectFor (Frame);
+ var b = ContentRectFor (Frame);
+ var r = MacDesktopBackend.ToDesktopRect (b);
return new Rectangle ((int)r.X, (int)r.Y, (int)r.Width, (int)r.Height);
}
set {
- var r = FrameRectFor (new System.Drawing.RectangleF ((float)value.X, (float)value.Y, (float)value.Width, (float)value.Height));
- SetFrame (r, true);
+ var r = MacDesktopBackend.FromDesktopRect (value);
+ var fr = FrameRectFor (r);
+ SetFrame (fr, true);
}
}
@@ -342,16 +413,44 @@ namespace Xwt.Mac
{
}
- public void SetMinSize (Size s)
+ public virtual void SetMinSize (Size s)
{
+ var b = ((IWindowBackend)this).Bounds;
+ if (b.Size.Width < s.Width)
+ b.Width = s.Width;
+ if (b.Size.Height < s.Height)
+ b.Height = s.Height;
+
+ if (b != ((IWindowBackend)this).Bounds)
+ ((IWindowBackend)this).Bounds = b;
+
+ var r = FrameRectFor (new RectangleF (0, 0, (float)s.Width, (float)s.Height));
+ MinSize = r.Size;
}
- public void SetIcon (object imageBackend)
+ public void SetIcon (ImageDescription icon)
{
}
+
+ public virtual void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ minSize = decorationSize = Size.Zero;
+ }
- public virtual Size ImplicitMinSize {
- get { return new Size (0,0); }
+ public virtual void LayoutWindow ()
+ {
+ LayoutContent (ContentView.Frame);
+ }
+
+ public void LayoutContent (RectangleF frame)
+ {
+ if (child != null) {
+ frame.X += (float) frontend.Padding.Left;
+ frame.Width -= (float) (frontend.Padding.HorizontalSpacing);
+ frame.Y += (float) frontend.Padding.Top;
+ frame.Height -= (float) (frontend.Padding.VerticalSpacing);
+ childView.Frame = frame;
+ }
}
}
diff --git a/external/xwt/Xwt.Mac/icons/magnifier-zoom-in.png b/external/xwt/Xwt.Mac/icons/magnifier-zoom-in.png
deleted file mode 100755
index 37f4ef9..0000000
Binary files a/external/xwt/Xwt.Mac/icons/magnifier-zoom-in.png and /dev/null differ
diff --git a/external/xwt/Xwt.Mac/icons/magnifier-zoom-out.png b/external/xwt/Xwt.Mac/icons/magnifier-zoom-out.png
deleted file mode 100755
index 4fa98f0..0000000
Binary files a/external/xwt/Xwt.Mac/icons/magnifier-zoom-out.png and /dev/null differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-actual.png b/external/xwt/Xwt.Mac/icons/zoom-actual.png
new file mode 100644
index 0000000..ca4eb61
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-actual.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-actual at 2x.png b/external/xwt/Xwt.Mac/icons/zoom-actual at 2x.png
new file mode 100644
index 0000000..79e1d1f
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-actual at 2x.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-in.png b/external/xwt/Xwt.Mac/icons/zoom-in.png
new file mode 100644
index 0000000..c46b4cb
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-in.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-in at 2x.png b/external/xwt/Xwt.Mac/icons/zoom-in at 2x.png
new file mode 100644
index 0000000..1b8d9dd
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-in at 2x.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-out.png b/external/xwt/Xwt.Mac/icons/zoom-out.png
new file mode 100644
index 0000000..1044ffb
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-out.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-out at 2x.png b/external/xwt/Xwt.Mac/icons/zoom-out at 2x.png
new file mode 100644
index 0000000..6095433
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-out at 2x.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-to-fit.png b/external/xwt/Xwt.Mac/icons/zoom-to-fit.png
new file mode 100644
index 0000000..e7b5855
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-to-fit.png differ
diff --git a/external/xwt/Xwt.Mac/icons/zoom-to-fit at 2x.png b/external/xwt/Xwt.Mac/icons/zoom-to-fit at 2x.png
new file mode 100644
index 0000000..25aa652
Binary files /dev/null and b/external/xwt/Xwt.Mac/icons/zoom-to-fit at 2x.png differ
diff --git a/external/xwt/Xwt.WPF/Xwt.WPF.csproj b/external/xwt/Xwt.WPF/Xwt.WPF.csproj
old mode 100755
new mode 100644
index bec2acd..57225a5
--- a/external/xwt/Xwt.WPF/Xwt.WPF.csproj
+++ b/external/xwt/Xwt.WPF/Xwt.WPF.csproj
@@ -15,7 +15,7 @@
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;</DefineConstants>
+ <DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
@@ -35,9 +35,15 @@
<AssemblyOriginatorKeyFile>..\xwt.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="PresentationFramework.Aero" />
+ <Reference Include="PresentationCore">
+ <Package>/Users/lluis/prog/work/libs/PresentationCore.dll</Package>
+ </Reference>
+ <Reference Include="PresentationFramework">
+ <Package>/Users/lluis/prog/work/libs/PresentationFramework.dll</Package>
+ </Reference>
+ <Reference Include="PresentationFramework.Aero">
+ <Package>/Users/lluis/prog/work/libs/PresentationFramework.Aero.dll</Package>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
@@ -48,6 +54,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Xwt.WPFBackend.CellViews\CanvasCellViewBackend.cs" />
<Compile Include="Xwt.WPFBackend.Interop\NativeStockIcon.cs" />
<Compile Include="Xwt.WPFBackend.Utilities\CellUtil.cs" />
<Compile Include="Xwt.WPFBackend.Utilities\ImageToImageSourceConverter.cs" />
@@ -56,22 +63,33 @@
<Compile Include="Xwt.WPFBackend\Backend.cs" />
<Compile Include="Xwt.WPFBackend\BooleanToValueConverter.cs" />
<Compile Include="Xwt.WPFBackend\ButtonBackend.cs" />
- <Compile Include="Xwt.WPFBackend\CanvasBackend.cs" />
<Compile Include="Xwt.WPFBackend\CheckBoxBackend.cs" />
<Compile Include="Xwt.WPFBackend\CheckboxMenuItemBackend.cs" />
<Compile Include="Xwt.WPFBackend\ClipboardBackend.cs" />
<Compile Include="Xwt.WPFBackend\ComboBoxBackend.cs" />
<Compile Include="Xwt.WPFBackend\ComboBoxEntryBackend.cs" />
<Compile Include="Xwt.WPFBackend\ComboBoxTextEntryBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\DatePickerBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\EmbedNativeWidgetBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\ScrollbarBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\SliderBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\SpinButtonBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\RadioButtonBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\ImagePatternBackendHandler.cs" />
+ <Compile Include="Xwt.WPFBackend\GradientBackendHandler.cs" />
+ <Compile Include="Xwt.WPFBackend\SelectColorDialogBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\TextLayoutBackendHandler.cs" />
+ <Compile Include="Xwt.WPFBackend\ImageBuilderBackendHandler.cs" />
+ <Compile Include="Xwt.WPFBackend\DrawingContext.cs" />
+ <Compile Include="Xwt.WPFBackend\ContextBackendHandler.cs" />
<Compile Include="Xwt.WPFBackend\ExRichTextBox.cs" />
+ <Compile Include="Xwt.WPFBackend\SaveFileDialogBackend.cs" />
<Compile Include="Xwt.WPFBackend\LinkLabelBackend.cs" />
<Compile Include="Xwt.WPFBackend\PopoverBackend.cs" />
<Compile Include="Xwt.WPFBackend\ProgressBarBackend.cs" />
<Compile Include="Xwt.WPFBackend\CustomWidgetBackend.cs" />
<Compile Include="Xwt.WPFBackend\DelegatedCommand.cs" />
<Compile Include="Xwt.WPFBackend\DialogBackend.cs" />
- <Compile Include="Xwt.WPFBackend\DrawingContext.cs" />
- <Compile Include="Xwt.WPFBackend\ContextBackendHandler.cs" />
<Compile Include="Xwt.WPFBackend\DropDownButton.cs" />
<Compile Include="Xwt.WPFBackend\ExCanvas.cs" />
<Compile Include="Xwt.WPFBackend\ExComboBox.cs" />
@@ -79,17 +97,15 @@
<Compile Include="Xwt.WPFBackend\ExListBox.cs" />
<Compile Include="Xwt.WPFBackend\ExListView.cs" />
<Compile Include="Xwt.WPFBackend\ExListViewItem.cs" />
+ <Compile Include="Xwt.WPFBackend\ExpanderBackend.cs" />
<Compile Include="Xwt.WPFBackend\ExScrollViewer.cs" />
<Compile Include="Xwt.WPFBackend\ExTextBox.cs" />
<Compile Include="Xwt.WPFBackend\ExTreeView.cs" />
<Compile Include="Xwt.WPFBackend\ExTreeViewItem.cs" />
<Compile Include="Xwt.WPFBackend\FileDialogBackend.cs" />
<Compile Include="Xwt.WPFBackend\FrameBackend.cs" />
- <Compile Include="Xwt.WPFBackend\GradientBackendHandler.cs" />
- <Compile Include="Xwt.WPFBackend\ImageBuilderBackendHandler.cs" />
<Compile Include="Xwt.WPFBackend\ImageHandler.cs" />
<Compile Include="Xwt.WPFBackend.Interop\NativeMethods.cs" />
- <Compile Include="Xwt.WPFBackend\ImagePatternBackendHandler.cs" />
<Compile Include="Xwt.WPFBackend\ImageViewBackend.cs" />
<Compile Include="Xwt.WPFBackend\LabelBackend.cs" />
<Compile Include="Xwt.WPFBackend\BoxBackend.cs" />
@@ -114,8 +130,6 @@
<Compile Include="Xwt.WPFBackend\SeparatorMenuItemBackend.cs" />
<Compile Include="Xwt.WPFBackend\SpinnerBackend.cs" />
<Compile Include="Xwt.WPFBackend\TextEntryBackend.cs" />
- <Compile Include="Xwt.WPFBackend\TextLayoutBackendHandler.cs" />
- <Compile Include="Xwt.WPFBackend\TextLayoutContext.cs" />
<Compile Include="Xwt.WPFBackend\Timeout.cs" />
<Compile Include="Xwt.WPFBackend\ToggleButtonBackend.cs" />
<Compile Include="Xwt.WPFBackend\TreeStoreBackend.cs" />
@@ -125,6 +139,7 @@
<Compile Include="Xwt.WPFBackend\TreeViewDropAdorner.cs" />
<Compile Include="Xwt.WPFBackend\Util.cs" />
<Compile Include="Xwt.WPFBackend\ValuesContainer.cs" />
+ <Compile Include="Xwt.WPFBackend\CanvasBackend.cs" />
<Compile Include="Xwt.WPFBackend\WidgetBackend.cs" />
<Compile Include="Xwt.WPFBackend\WindowBackend.cs" />
<Compile Include="Xwt.WPFBackend\WindowFrameBackend.cs" />
@@ -133,6 +148,8 @@
<Compile Include="Xwt.WPFBackend\ScrollAdjustmentBackend.cs" />
<Compile Include="Xwt.WPFBackend\CustomScrollViewPort.cs" />
<Compile Include="Xwt.WPFBackend\RichTextViewBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\WpfDesktopBackend.cs" />
+ <Compile Include="Xwt.WPFBackend\WindowsSpinButton.xaml.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@@ -156,9 +173,8 @@
<SubType>Designer</SubType>
</Resource>
</ItemGroup>
- <ItemGroup />
<ItemGroup>
<EmbeddedResource Include="icons\list-add.png" />
<EmbeddedResource Include="icons\list-remove.png" />
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend.CellViews/CanvasCellViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend.CellViews/CanvasCellViewBackend.cs
new file mode 100644
index 0000000..ed2d84b
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend.CellViews/CanvasCellViewBackend.cs
@@ -0,0 +1,111 @@
+//
+// CanvasCellViewBackend.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+//
+// 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.Windows;
+using Xwt.Backends;
+
+namespace Xwt.WPFBackend
+{
+ class CanvasCellViewBackend : ExCanvas, ICellDataSource
+ {
+ public CanvasCellViewBackend()
+ {
+ DataContextChanged += OnDataChanged;
+ }
+
+ void OnDataChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ if (e.OldValue != null)
+ ((ValuesContainer)e.OldValue).PropertyChanged -= CanvasCellRenderer_PropertyChanged;
+ ((ValuesContainer)DataContext).PropertyChanged += CanvasCellRenderer_PropertyChanged;
+ }
+
+ void CanvasCellRenderer_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ InvalidateMeasure();
+ InvalidateVisual();
+ }
+
+ public event DependencyPropertyChangedEventHandler CellViewChanged;
+
+ public static readonly DependencyProperty CellViewProperty =
+ DependencyProperty.Register("CellView", typeof(CanvasCellView),
+ typeof(CanvasCellViewBackend), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnCellViewChanged)));
+
+ public ICanvasCellViewFrontend CellView
+ {
+ get { return (ICanvasCellViewFrontend)GetValue (CellViewProperty); }
+ set { SetValue(CellViewProperty, value); }
+ }
+
+ public static void OnCellViewChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+ {
+ var sl = sender as CanvasCellViewBackend;
+ if (sl != null)
+ sl.RaiseCellViewChangedEvent(e);
+ }
+
+ private void RaiseCellViewChangedEvent(DependencyPropertyChangedEventArgs e)
+ {
+ if (this.CellViewChanged != null)
+ this.CellViewChanged(this, e);
+ }
+
+ protected override void OnRender(System.Windows.Media.DrawingContext dc)
+ {
+ base.OnRender(dc);
+ CellView.Initialize(this);
+ CellView.ApplicationContext.InvokeUserCode (delegate
+ {
+ DrawingContext ctx = new DrawingContext(dc, 1);
+ CellView.Draw (ctx, new Rectangle (this.RenderTransform.Value.OffsetX, this.RenderTransform.Value.OffsetY, this.RenderSize.Width, this.RenderSize.Height));
+ });
+ }
+
+ protected override System.Windows.Size MeasureOverride(System.Windows.Size constraint)
+ {
+ var size = new System.Windows.Size();
+ CellView.Initialize (this);
+ CellView.ApplicationContext.InvokeUserCode (delegate
+ {
+ var s = CellView.GetRequiredSize ();
+ size = new System.Windows.Size(s.Width, s.Height);
+ });
+ if (size.Width > constraint.Width)
+ size.Width = constraint.Width;
+ if (size.Height > constraint.Height)
+ size.Height = constraint.Height;
+ return size;
+ }
+
+ public object GetValue(IDataField field)
+ {
+ if (DataContext == null)
+ return null;
+ return ((ValuesContainer)DataContext)[field.Index];
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
index b020008..60ca3b0 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/CellUtil.cs
@@ -66,19 +66,30 @@ namespace Xwt.WPFBackend.Utilities
ImageCellView imageView = view as ImageCellView;
if (imageView != null) {
- FrameworkElementFactory factory = new FrameworkElementFactory (typeof (SWC.Image));
+ FrameworkElementFactory factory = new FrameworkElementFactory (typeof (ImageBox));
factory.SetValue (FrameworkElement.MarginProperty, CellMargins);
if (imageView.ImageField != null) {
var binding = new Binding (dataPath + "[" + imageView.ImageField.Index + "]")
{ Converter = new ImageToImageSourceConverter () };
- factory.SetBinding (SWC.Image.SourceProperty, binding);
+ factory.SetBinding (ImageBox.ImageSourceProperty, binding);
}
return factory;
}
+ CanvasCellView canvasView = view as CanvasCellView;
+ if (canvasView != null)
+ {
+ FrameworkElementFactory factory = new FrameworkElementFactory(typeof(CanvasCellViewBackend));
+ factory.SetValue(FrameworkElement.MarginProperty, CellMargins);
+
+ factory.SetValue(CanvasCellViewBackend.CellViewProperty, view);
+
+ return factory;
+ }
+
throw new NotImplementedException ();
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/ImageToImageSourceConverter.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/ImageToImageSourceConverter.cs
index 9ff0711..3fa19a3 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/ImageToImageSourceConverter.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend.Utilities/ImageToImageSourceConverter.cs
@@ -28,7 +28,8 @@ using System;
using System.Globalization;
using System.Windows.Data;
using Xwt.Drawing;
-using Xwt.Engine;
+using Xwt.Backends;
+
namespace Xwt.WPFBackend.Utilities
{
@@ -41,7 +42,7 @@ namespace Xwt.WPFBackend.Utilities
if (image == null)
return null;
- return DataConverter.AsImageSource (WidgetRegistry.GetBackend (image));
+ return image.ToImageDescription ();
}
public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/AlertDialogBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/AlertDialogBackend.cs
index 2785adc..53b9d94 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/AlertDialogBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/AlertDialogBackend.cs
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using System.Windows;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
@@ -48,6 +48,10 @@ namespace Xwt.WPFBackend
this.defaultResult = MessageBoxResult.Cancel;
}
+ public void Initialize (ApplicationContext actx)
+ {
+ }
+
public Command Run (WindowFrame transientFor, MessageDescription message)
{
this.icon = GetIcon (message.Icon);
@@ -59,7 +63,7 @@ namespace Xwt.WPFBackend
message.SecondaryText = String.Empty;
}
- var wb = (WindowFrameBackend)WidgetRegistry.GetBackend (transientFor);
+ var wb = (WindowFrameBackend)Toolkit.GetBackend (transientFor);
if (wb != null) {
this.dialogResult = MessageBox.Show (wb.Window, message.Text,message.SecondaryText,
this.buttons, this.icon, this.defaultResult, this.options);
@@ -77,20 +81,17 @@ namespace Xwt.WPFBackend
set;
}
- MessageBoxImage GetIcon (string iconText)
+ MessageBoxImage GetIcon (Xwt.Drawing.Image icon)
{
- switch (iconText) {
- case StockIcons.Error:
+ if (icon == Xwt.StockIcons.Error)
return MessageBoxImage.Error;
- case StockIcons.Warning:
+ if (icon == Xwt.StockIcons.Warning)
return MessageBoxImage.Warning;
- case StockIcons.Information:
+ if (icon == Xwt.StockIcons.Information)
return MessageBoxImage.Information;
- case StockIcons.Question:
+ if (icon == Xwt.StockIcons.Question)
return MessageBoxImage.Question;
- default:
- return MessageBoxImage.None;
- }
+ return MessageBoxImage.None;
}
Command ConvertResultToCommand (MessageBoxResult dialogResult)
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/Backend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/Backend.cs
index cd52c19..d34a85f 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/Backend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/Backend.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+using Xwt.Backends;
namespace Xwt.WPFBackend
{
public abstract class Backend
@@ -31,9 +32,10 @@ namespace Xwt.WPFBackend
{
protected object frontend;
- void IBackend.InitializeBackend (object frontend)
+ public virtual void InitializeBackend (object frontend, ApplicationContext context)
{
this.frontend = frontend;
+ Context = context;
}
public virtual void EnableEvent (object eventId)
@@ -47,5 +49,7 @@ namespace Xwt.WPFBackend
public object Frontend {
get { return frontend; }
}
+
+ public ApplicationContext Context { get; private set; }
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs
index d4d1677..754d533 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs
@@ -33,7 +33,7 @@ using System.Windows.Markup;
using System.Windows.Media;
using SWC = System.Windows.Controls;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
@@ -95,21 +95,16 @@ namespace Xwt.WPFBackend
Button.InvalidateMeasure ();
}
- public void SetContent (string label, object imageBackend, ContentPosition position)
+ public void SetContent (string label, ImageDescription image, ContentPosition position)
{
- if (imageBackend == null)
+ if (image.IsNull)
Button.Content = label;
else
{
SWC.DockPanel grid = new SWC.DockPanel ();
- var img = DataConverter.AsImageSource (imageBackend);
- SWC.Image imageCtrl = new SWC.Image
- {
- Source = img,
- Width = img.Width,
- Height = img.Height
- };
+ var imageCtrl = new ImageBox (Context);
+ imageCtrl.ImageSource = image;
SWC.DockPanel.SetDock (imageCtrl, DataConverter.ToWpfDock (position));
grid.Children.Add (imageCtrl);
@@ -150,7 +145,7 @@ namespace Xwt.WPFBackend
void HandleWidgetClicked (object sender, EventArgs e)
{
- Toolkit.Invoke (EventSink.OnClicked);
+ Context.InvokeUserCode (EventSink.OnClicked);
}
private static ResourceDictionary buttonsDictionary;
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CanvasBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CanvasBackend.cs
index 04d35ac..dcfe7ee 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CanvasBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CanvasBackend.cs
@@ -1,84 +1,70 @@
-//
-// CanvasBackend.cs
-//
-// Author:
-// Eric Maupin <ermau at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin, Inc.
-//
-// 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.Drawing;
+using System.Linq;
+using System.Text;
+using Xwt.Backends;
using System.Windows;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using Xwt.Engine;
using SWC = System.Windows.Controls;
-using Xwt.Backends;
-using PixelFormat = System.Drawing.Imaging.PixelFormat;
+using System.Windows.Media;
namespace Xwt.WPFBackend
{
- public class CanvasBackend
+ class CanvasBackend
: WidgetBackend, ICanvasBackend
{
+ #region ICanvasBackend Members
+
public CanvasBackend ()
{
- Canvas = new ExCanvas();
- Canvas.Render += OnRender;
+ Canvas = new ExCanvas ();
+ Canvas.RenderAction = Render;
+ }
- this.image = new SWC.Image();
- SWC.Panel.SetZIndex (this.image, -1);
+ private ExCanvas Canvas
+ {
+ get { return (ExCanvas) Widget; }
+ set { Widget = value; }
+ }
- Canvas.Children.Add (this.image);
+ private ICanvasEventSink CanvasEventSink
+ {
+ get { return (ICanvasEventSink) EventSink; }
}
- public void QueueDraw()
+ protected override void SetWidgetColor (Drawing.Color value)
{
- this.fullRedraw = true;
+ // Do nothing
+ }
- if (!this.queued) {
- Toolkit.QueueExitAction (Render);
- this.queued = true;
+ private void Render (System.Windows.Media.DrawingContext dc)
+ {
+ if (BackgroundColorSet) {
+ SolidColorBrush mySolidColorBrush = new SolidColorBrush ();
+ mySolidColorBrush.Color = BackgroundColor.ToWpfColor ();
+ Rect myRect = new Rect (0, 0, Widget.ActualWidth, Widget.ActualHeight);
+ dc.DrawRectangle (mySolidColorBrush, null, myRect);
}
+
+ var ctx = new Xwt.WPFBackend.DrawingContext (dc, Widget.GetScaleFactor ());
+ CanvasEventSink.OnDraw (ctx, new Rectangle (0, 0, Widget.ActualWidth, Widget.ActualHeight));
}
- public void QueueDraw (Rectangle rect)
+ public void QueueDraw ()
{
- if (this.fullRedraw)
- return;
-
- this.dirtyRects.Add (rect.ToInt32Rect());
+ Canvas.InvalidateVisual ();
+ }
- if (!this.queued) {
- Toolkit.QueueExitAction (Render);
- this.queued = true;
- }
+ public void QueueDraw (Rectangle rect)
+ {
+ Canvas.InvalidateVisual ();
}
public void AddChild (IWidgetBackend widget, Rectangle bounds)
{
UIElement element = widget.NativeWidget as UIElement;
if (element == null)
- throw new ArgumentException();
+ throw new ArgumentException ();
if (!Canvas.Children.Contains (element))
Canvas.Children.Add (element);
@@ -90,115 +76,37 @@ namespace Xwt.WPFBackend
{
FrameworkElement element = widget.NativeWidget as FrameworkElement;
if (element == null)
- throw new ArgumentException();
-
- double hratio = HeightPixelRatio;
- double wratio = WidthPixelRatio;
-
- SWC.Canvas.SetTop (element, bounds.Top * hratio);
- SWC.Canvas.SetLeft (element, bounds.Left * wratio);
-
- // We substract the widget margin here because the size we are assigning is the actual size, not including the WPF marings
- var h = bounds.Height - ((WidgetBackend)widget).Frontend.Margin.VerticalSpacing;
- var w = bounds.Width - ((WidgetBackend)widget).Frontend.Margin.HorizontalSpacing;
-
- element.Height = (h > 0) ? h * hratio : 0;
- element.Width = (w > 0) ? w * wratio : 0;
-
- ((FrameworkElement) widget.NativeWidget).UpdateLayout();
+ throw new ArgumentException ();
+
+ SWC.Canvas.SetTop (element, bounds.Top);
+ SWC.Canvas.SetLeft (element, bounds.Left);
+
+ var h = bounds.Height;
+ var w = bounds.Width;
+
+ h = (h > 0) ? h : 0;
+ w = (w > 0) ? w : 0;
+
+ // Measure the widget again using the allocation constraints. This is necessary
+ // because WPF widgets my cache some measurement information based on the
+ // constraints provided in the last Measure call (which when calculating the
+ // preferred size is normally set to infinite.
+ element.InvalidateMeasure ();
+ element.Measure (new System.Windows.Size (w, h));
+ element.Height = h;
+ element.Width = w;
+ element.UpdateLayout ();
}
public void RemoveChild (IWidgetBackend widget)
{
UIElement element = widget.NativeWidget as UIElement;
if (element == null)
- throw new ArgumentException();
+ throw new ArgumentException ();
Canvas.Children.Remove (element);
}
- private bool queued;
- private bool fullRedraw;
-
- private readonly SWC.Image image;
- private WriteableBitmap wbitmap;
- private Bitmap bbitmap;
- private readonly List<Int32Rect> dirtyRects = new List<Int32Rect> ();
-
- private double pwidth = -1;
- private double pheight = -1;
-
- private ExCanvas Canvas
- {
- get { return (ExCanvas) Widget; }
- set { Widget = value; }
- }
-
- private ICanvasEventSink CanvasEventSink
- {
- get { return (ICanvasEventSink) EventSink; }
- }
-
- private void OnRender (object sender, EventArgs e)
- {
- Render();
- }
-
- private void Render()
- {
- this.queued = false;
-
- if (!Widget.IsVisible)
- return;
-
- if (Canvas.ActualHeight != this.pheight || Canvas.ActualWidth != this.pwidth)
- {
- double heightRatio = HeightPixelRatio;
- double widthRatio = WidthPixelRatio;
-
- int nheight = (int) Math.Round (Canvas.ActualHeight * heightRatio) + 1;
- int nwidth = (int) Math.Round (Canvas.ActualWidth * widthRatio) + 1;
-
- if (nheight == 0 || nwidth == 0)
- return;
-
- this.wbitmap = new WriteableBitmap (nwidth, nheight, widthRatio * 96, heightRatio * 96, PixelFormats.Pbgra32, null);
- this.bbitmap = new Bitmap (nwidth, nheight, this.wbitmap.BackBufferStride, PixelFormat.Format32bppPArgb, this.wbitmap.BackBuffer);
- this.image.Source = this.wbitmap;
-
- this.pheight = Canvas.ActualHeight;
- this.pwidth = Canvas.ActualWidth;
- }
-
- this.wbitmap.Lock();
-
- using (Graphics g = Graphics.FromImage (this.bbitmap))
- CanvasEventSink.OnDraw (new DrawingContext (g), new Rectangle (0, 0, this.wbitmap.PixelWidth, this.wbitmap.PixelHeight));
-
- if (this.fullRedraw || this.dirtyRects.Count == 0) {
- this.wbitmap.AddDirtyRect (new Int32Rect (0, 0, this.wbitmap.PixelWidth, this.wbitmap.PixelHeight));
- this.fullRedraw = false;
- } else {
- for (int i = 0; i < this.dirtyRects.Count; ++i) {
- Int32Rect r = this.dirtyRects [i];
- if (r.X >= this.wbitmap.PixelWidth || r.Y >= this.wbitmap.PixelHeight)
- continue;
-
- if (r.X < 0)
- r.X = 0;
- if (r.Y < 0)
- r.Y = 0;
- if (r.X + r.Width > this.wbitmap.PixelWidth)
- r.Width = this.wbitmap.PixelWidth - r.X;
- if (r.Y + r.Height > this.wbitmap.PixelHeight)
- r.Height = this.wbitmap.PixelHeight - r.Y;
-
- this.wbitmap.AddDirtyRect (r);
- }
- }
-
- this.dirtyRects.Clear();
- this.wbitmap.Unlock();
- }
+ #endregion
}
-}
\ No newline at end of file
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CheckBoxBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CheckBoxBackend.cs
index 7f27597..0bb6d25 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CheckBoxBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CheckBoxBackend.cs
@@ -28,7 +28,7 @@ using System;
using System.Windows;
using System.Windows.Controls;
using Xwt.Backends;
-using Xwt.Engine;
+
using WindowsCheckBox = System.Windows.Controls.CheckBox;
namespace Xwt.WPFBackend
@@ -44,9 +44,9 @@ namespace Xwt.WPFBackend
public void SetContent (IWidgetBackend widget)
{
if (widget == null)
- throw new ArgumentNullException ("widget");
-
- CheckBox.Content = widget.NativeWidget;
+ CheckBox.Content = null;
+ else
+ CheckBox.Content = widget.NativeWidget;
}
public void SetContent (string label)
@@ -89,6 +89,7 @@ namespace Xwt.WPFBackend
case CheckBoxEvent.Toggled:
CheckBox.Checked += OnChecked;
+ CheckBox.Unchecked += OnChecked;
break;
}
}
@@ -105,6 +106,7 @@ namespace Xwt.WPFBackend
case CheckBoxEvent.Toggled:
CheckBox.Checked -= OnChecked;
+ CheckBox.Unchecked -= OnChecked;
break;
}
}
@@ -112,12 +114,12 @@ namespace Xwt.WPFBackend
private void OnChecked (object sender, RoutedEventArgs routedEventArgs)
{
- Toolkit.Invoke (CheckBoxEventSink.OnToggled);
+ Context.InvokeUserCode (CheckBoxEventSink.OnToggled);
}
private void OnClicked (object sender, RoutedEventArgs e)
{
- Toolkit.Invoke (CheckBoxEventSink.OnClicked);
+ Context.InvokeUserCode (CheckBoxEventSink.OnClicked);
}
protected ICheckBoxEventSink CheckBoxEventSink
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs
index df213ca..34c3987 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ClipboardBackend.cs
@@ -1,4 +1,4 @@
-//
+//
// ClipboardBackend.cs
//
// Author:
@@ -32,25 +32,55 @@ using WindowsClipboard = System.Windows.Clipboard;
namespace Xwt.WPFBackend
{
- public class ClipboardBackend
- : IClipboardBackend
+ public class WpfClipboardBackend
+ : ClipboardBackend
{
- public void Clear ()
+ public override void Clear ()
{
WindowsClipboard.Clear();
}
- public void SetData (TransferDataType type, Func<object> dataSource)
+ public override void SetData (TransferDataType type, Func<object> dataSource)
{
if (type == null)
throw new ArgumentNullException ("type");
if (dataSource == null)
throw new ArgumentNullException ("dataSource");
+ if (type == TransferDataType.Html) {
+ WindowsClipboard.SetData (type.ToWpfDataFormat (), GenerateCFHtml (dataSource ().ToString ()));
+ } else {
+ WindowsClipboard.SetData (type.ToWpfDataFormat (), dataSource ());
+ }
+ }
- WindowsClipboard.SetData (type.ToWpfDataFormat (), dataSource ());
+ static readonly string emptyCFHtmlHeader = GenerateCFHtmlHeader (0, 0, 0, 0);
+
+ /// <summary>
+ /// Generates a CF_HTML cliboard format document
+ /// </summary>
+ string GenerateCFHtml (string htmlFragment)
+ {
+ int startHTML = emptyCFHtmlHeader.Length;
+ int startFragment = startHTML;
+ int endFragment = startFragment + System.Text.Encoding.UTF8.GetByteCount (htmlFragment);
+ int endHTML = endFragment;
+ return GenerateCFHtmlHeader (startHTML, endHTML, startFragment, endFragment) + htmlFragment;
+ }
+
+ /// <summary>
+ /// Generates a CF_HTML clipboard format header.
+ /// </summary>
+ static string GenerateCFHtmlHeader (int startHTML, int endHTML, int startFragment, int endFragment)
+ {
+ return
+ "Version:0.9" + Environment.NewLine +
+ string.Format ("StartHTML: {0:d8}", startHTML) + Environment.NewLine +
+ string.Format ("EndHTML: {0:d8}", endHTML) + Environment.NewLine +
+ string.Format ("StartFragment: {0:d8}", startFragment) + Environment.NewLine +
+ string.Format ("EndFragment: {0:d8}", endFragment) + Environment.NewLine;
}
- public bool IsTypeAvailable (TransferDataType type)
+ public override bool IsTypeAvailable (TransferDataType type)
{
if (type == null)
throw new ArgumentNullException ("type");
@@ -58,18 +88,18 @@ namespace Xwt.WPFBackend
return WindowsClipboard.ContainsData (type.ToWpfDataFormat ());
}
- public object GetData (TransferDataType type)
+ public override object GetData (TransferDataType type)
{
if (type == null)
throw new ArgumentNullException ("type");
- while (!IsTypeAvailable (type))
- Thread.Sleep (1);
+ if (!IsTypeAvailable (type))
+ return null;
return WindowsClipboard.GetData (type.ToWpfDataFormat ());
}
- public IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state)
+ public override IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state)
{
if (type == null)
throw new ArgumentNullException ("type");
@@ -80,7 +110,7 @@ namespace Xwt.WPFBackend
.ContinueWith (t => callback (t));
}
- public object EndGetData (IAsyncResult ares)
+ public override object EndGetData (IAsyncResult ares)
{
if (ares == null)
throw new ArgumentNullException ("ares");
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxBackend.cs
index b2d5d5f..0921c8f 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxBackend.cs
@@ -131,7 +131,7 @@ namespace Xwt.WPFBackend
private void OnSelectionChanged (object sender, SelectionChangedEventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (ComboBoxEventSink.OnSelectionChanged);
+ Context.InvokeUserCode (ComboBoxEventSink.OnSelectionChanged);
}
private DataTemplate GetDataTemplate (IList<CellView> views)
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxTextEntryBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxTextEntryBackend.cs
index 68919c4..607ba3b 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxTextEntryBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ComboBoxTextEntryBackend.cs
@@ -30,7 +30,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
@@ -53,6 +53,12 @@ namespace Xwt.WPFBackend
set { this.combobox.Text = value ?? String.Empty; }
}
+ public Alignment TextAlignment
+ {
+ get { return DataConverter.ToXwtAlignment (this.combobox.HorizontalContentAlignment); }
+ set { this.combobox.HorizontalContentAlignment = DataConverter.ToWpfAlignment (value); }
+ }
+
public string PlaceholderText
{
get { return this.placeholderText; }
@@ -89,6 +95,8 @@ namespace Xwt.WPFBackend
}
}
+ public bool MultiLine { get; set; }
+
public override void EnableEvent (object eventId)
{
base.EnableEvent (eventId);
@@ -122,7 +130,7 @@ namespace Xwt.WPFBackend
private void OnTextChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (TextEntryEventSink.OnChanged);
+ Context.InvokeUserCode (TextEntryEventSink.OnChanged);
}
private void UpdatePlaceholder (string newPlaceholder, bool focused)
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs
index a10422b..3eff6ac 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// ContextBackendHandler.cs
//
// Author:
@@ -28,420 +28,314 @@
// THE SOFTWARE.
using System;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
using System.Linq;
using System.Windows;
using System.Windows.Media.Imaging;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Color = Xwt.Drawing.Color;
using Font = Xwt.Drawing.Font;
+using System.Windows.Media;
+using SW = System.Windows;
+using SWM = System.Windows.Media;
+using System.Collections.Generic;
namespace Xwt.WPFBackend
{
- public class ContextBackendHandler
- : Backend, IContextBackendHandler
+ public class WpfContextBackendHandler
+ : ContextBackendHandler
{
- public void Save (object backend)
+ public override void Save (object backend)
{
var c = (DrawingContext) backend;
- c.Save();
+ c.Save ();
}
- public void Restore (object backend)
+ public override void Restore (object backend)
{
var c = (DrawingContext) backend;
- c.Restore();
+ c.Restore ();
}
- public void SetGlobalAlpha (object backend, double alpha)
+ public override void SetGlobalAlpha (object backend, double alpha)
{
- // TODO
+ var c = (DrawingContext)backend;
+ c.Context.PushOpacity (alpha);
+ c.NotifyPush ();
}
- public void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
- // ensure sweep angle is always positive
- if (angle2 < angle1)
- angle2 = 360 + angle2;
- ArcInternal (backend, xc, yc, radius, angle1, angle2);
+ Arc (backend, xc, yc, radius, angle1, angle2, false);
}
- public void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public override void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
{
- // ensure sweep angle is always negative
- if (angle1 < angle2)
- angle1 = 360 + angle1;
- ArcInternal (backend, xc, yc, radius, angle1, angle2);
+ Arc (backend, xc, yc, radius, angle1, angle2, true);
}
- void ArcInternal (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ public void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2, bool inverse)
{
var c = (DrawingContext)backend;
- c.Path.AddArc ((float)(xc - radius), (float)(yc - radius), (float)radius * 2, (float)radius * 2, (float)angle1,
- (float)(angle2 - angle1));
- var current = c.Path.GetLastPoint ();
- c.CurrentX = current.X;
- c.CurrentY = current.Y;
- }
+ if (angle1 == angle2)
+ return;
- public void Clip (object backend)
- {
- var c = (DrawingContext) backend;
- c.Graphics.SetClip (c.Path);
- c.Path.Reset ();
- }
+ if (angle1 > angle2)
+ angle2 += (Math.Truncate (angle1 / 360) + 1) * 360;
- public void ClipPreserve (object backend)
- {
- var c = (DrawingContext) backend;
- c.Graphics.SetClip (c.Path);
+ double nextAngle;
+
+ do {
+ nextAngle = angle2 - angle1 < 360 ? angle2 : angle1 + 359;
+
+ var p1 = new SW.Point (xc + radius * Math.Cos (angle1 * Math.PI / 180.0), yc + radius * Math.Sin (angle1 * Math.PI / 180.0));
+ var p2 = new SW.Point (xc + radius * Math.Cos (nextAngle * Math.PI / 180.0), yc + radius * Math.Sin (nextAngle * Math.PI / 180.0));
+
+ c.ConnectToLastFigure (p1, true);
+
+ var largeArc = inverse ? nextAngle - angle1 < 180 : nextAngle - angle1 > 180;
+ var direction = inverse ? SweepDirection.Counterclockwise : SweepDirection.Clockwise;
+ c.Path.Segments.Add (new ArcSegment (p2, new SW.Size (radius, radius), 0, largeArc, direction, true));
+ angle1 = nextAngle;
+ c.EndPoint = p2;
+ }
+ while (nextAngle < angle2);
}
- public void ClosePath (object backend)
+ public override void Clip (object backend)
{
- var c = (DrawingContext) backend;
- c.Path.CloseFigure();
+ var c = (DrawingContext)backend;
+ c.Context.PushClip (c.Geometry);
+ c.ResetPath ();
+ c.NotifyPush ();
}
- public void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
+ public override void ClipPreserve (object backend)
{
var c = (DrawingContext)backend;
- c.Path.AddBezier (c.CurrentX, c.CurrentY,
- (float)x1, (float)y1,
- (float)x2, (float)y2,
- (float)x3, (float)y3);
- c.CurrentX = (float)x3;
- c.CurrentY = (float)y3;
+ c.Context.PushClip (c.Geometry);
+ c.NotifyPush ();
}
- public void Fill (object backend)
+ public override void ClosePath (object backend)
{
- var c = (DrawingContext) backend;
- c.Graphics.FillPath (c.Brush, c.Path);
- c.Path.Reset();
- c.CurrentX = 0;
- c.CurrentY = 0;
+ var c = (DrawingContext)backend;
+ if (c.LastFigureStart != c.EndPoint) {
+ var p = c.LastFigureStart;
+ c.ConnectToLastFigure (c.LastFigureStart, true);
+ c.Path.IsClosed = true;
+ c.NewFigure (p);
+ }
}
- public void FillPreserve (object backend)
+ public override void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
{
- var c = (DrawingContext) backend;
- c.Graphics.FillPath (c.Brush, c.Path);
+ var c = (DrawingContext)backend;
+ c.Path.Segments.Add (new BezierSegment (new SW.Point (x1, y1), new SW.Point (x2, y2), new SW.Point (x3, y3), true));
+ c.EndPoint = new SW.Point (x3, y3);
}
- public void LineTo (object backend, double x, double y)
+ public override void Fill (object backend)
{
- var c = (DrawingContext) backend;
-
- c.Path.AddLine (c.CurrentX, c.CurrentY, (float) x, (float) y);
- c.CurrentX = (float) x;
- c.CurrentY = (float) y;
+ var c = (DrawingContext)backend;
+ c.Context.DrawGeometry (c.Brush, null, c.Geometry);
+ c.ResetPath ();
}
- public void MoveTo (object backend, double x, double y)
+ public override void FillPreserve (object backend)
{
- var c = (DrawingContext) backend;
- if (c.CurrentX != x || c.CurrentY != y) {
- c.Path.StartFigure ();
- c.CurrentX = (float)x;
- c.CurrentY = (float)y;
- }
+ var c = (DrawingContext)backend;
+ c.Context.DrawGeometry (c.Brush, null, c.Geometry);
}
- public void NewPath (object backend)
+ public override void LineTo (object backend, double x, double y)
{
var c = (DrawingContext) backend;
- c.Path.Reset();
- c.CurrentX = 0;
- c.CurrentY = 0;
+ c.Path.Segments.Add (new LineSegment (new SW.Point (x, y), true) { IsSmoothJoin = true });
+ c.EndPoint = new SW.Point (x, y);
}
- public void Rectangle (object backend, double x, double y, double width, double height)
+ public override void MoveTo (object backend, double x, double y)
{
var c = (DrawingContext) backend;
- if (c.CurrentX != x || c.CurrentY != y)
- c.Path.StartFigure ();
- c.Path.AddRectangle (new RectangleF ((float)x, (float)y, (float)width, (float)height));
- c.CurrentX = (float)x;
- c.CurrentY = (float)y;
- }
- public void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
- {
- var c = (DrawingContext)backend;
- c.Path.AddBezier (c.CurrentX, c.CurrentY,
- (float)(c.CurrentX + dx1), (float)(c.CurrentY + dy1),
- (float)(c.CurrentX + dx2), (float)(c.CurrentY + dy2),
- (float)(c.CurrentX + dx3), (float)(c.CurrentY + dy3));
- c.CurrentX = (float)(c.CurrentX + dx3);
- c.CurrentY = (float)(c.CurrentX + dy3);
+ // Close the current path without a stroke, this will make sure
+ // that the are that the path covers is filled if Fill is called.
+ if (c.LastFigureStart != c.EndPoint)
+ c.ConnectToLastFigure (c.LastFigureStart, false);
+ c.NewFigure (new SW.Point (x, y));
}
- public void RelLineTo (object backend, double dx, double dy)
+ public override void NewPath (object backend)
{
var c = (DrawingContext) backend;
-
- float x = c.CurrentX;
- float y = c.CurrentY;
- c.CurrentX += (float)dx;
- c.CurrentY += (float)dy;
-
- c.Path.AddLine (x, y, c.CurrentX, c.CurrentY);
+ c.ResetPath ();
}
- public void RelMoveTo (object backend, double dx, double dy)
+ public override void Rectangle (object backend, double x, double y, double width, double height)
{
+ MoveTo (backend, x, y);
var c = (DrawingContext) backend;
- c.Path.StartFigure ();
- c.CurrentX += (float)dx;
- c.CurrentY += (float)dy;
+ var points = new SW.Point[] { new SW.Point (x + width, y), new SW.Point (x + width, y + height), new SW.Point (x, y + height), new SW.Point (x, y) };
+ c.Path.Segments.Add (new PolyLineSegment (points, true));
+ c.Path.IsClosed = true;
+ c.NewFigure (new SW.Point (x, y));
}
- public void Stroke (object backend)
+ public override void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{
- var c = (DrawingContext) backend;
- c.Graphics.DrawPath (c.Pen, c.Path);
- c.Path.Reset();
- c.CurrentX = 0;
- c.CurrentY = 0;
+ var c = (DrawingContext)backend;
+ var x = c.EndPoint.X;
+ var y = c.EndPoint.Y;
+ CurveTo (c, x + dx1, y + dy1, x + dx2, y + dy2, x + dx3, y + dy3);
}
- public void StrokePreserve (object backend)
+ public override void RelLineTo (object backend, double dx, double dy)
{
- var c = (DrawingContext) backend;
- c.Graphics.DrawPath (c.Pen, c.Path);
+ var c = (DrawingContext)backend;
+ var dest = new SW.Point (c.EndPoint.X + dx, c.EndPoint.Y + dy);
+ c.Path.Segments.Add (new LineSegment (dest, true) { IsSmoothJoin = true });
+ c.EndPoint = dest;
}
- public void SetColor (object backend, Color color)
+ public override void RelMoveTo (object backend, double dx, double dy)
{
- var c = (DrawingContext) backend;
-
- var dc = color.ToDrawingColor ();
- c.SetColor (dc);
+ var c = (DrawingContext)backend;
+ MoveTo (backend, c.EndPoint.X + dx, c.EndPoint.Y + dy);
}
- public void SetLineWidth (object backend, double width)
+ public override void Stroke (object backend)
{
var c = (DrawingContext) backend;
- c.SetWidth ((float) width);
+ c.Context.DrawGeometry (null, c.Pen, c.Geometry);
+ c.ResetPath ();
}
- public void SetLineDash (object backend, double offset, params double[] pattern)
+ public override void StrokePreserve (object backend)
{
- var c = (DrawingContext) backend;
-
- if (pattern.Length != 0) {
- c.Pen.DashOffset = (float) (offset / c.Pen.Width);
- float[] fp = new float [pattern.Length];
- for (int i = 0; i < fp.Length; ++i)
- fp [i] = (float) (pattern [i] / c.Pen.Width);
-
- c.Pen.DashStyle = DashStyle.Custom;
- c.Pen.DashPattern = fp;
- } else
- c.Pen.DashStyle = DashStyle.Solid;
+ var c = (DrawingContext)backend;
+ c.Context.DrawGeometry (null, c.Pen, c.Geometry);
}
- public void SetPattern (object backend, object p)
+ public override void SetColor (object backend, Color color)
{
var c = (DrawingContext) backend;
-
- if (p is LinearGradient) {
- c.Brush = ((LinearGradient) p).CreateBrush ();
- } else if (p is RadialGradient) {
- c.Brush = ((RadialGradient) p).CreateBrush ();
- } else if (p is Brush)
- c.Brush = (Brush) p;
+ c.SetColor (color.ToWpfColor ());
}
- public void SetFont (object backend, Font font)
+ public override void SetLineWidth (object backend, double width)
{
var c = (DrawingContext) backend;
- c.Font.Dispose();
- c.Font = font.ToDrawingFont ();
+ c.SetThickness (width);
}
- public void DrawTextLayout (object backend, TextLayout layout, double x, double y)
+ public override void SetLineDash (object backend, double offset, params double[] pattern)
{
var c = (DrawingContext)backend;
- System.Drawing.StringFormat stringFormat = TextLayoutContext.StringFormat;
- StringTrimming trimming = layout.Trimming.ToDrawingStringTrimming ();
-
- if (layout.Height > 0 && stringFormat.Trimming != trimming) {
- stringFormat = (System.Drawing.StringFormat)stringFormat.Clone ();
- stringFormat.Trimming = trimming;
- }
-
- var font = layout.Font.ToDrawingFont ();
-
- if (layout.Width == -1 && layout.Height == -1) {
- c.Graphics.DrawString (layout.Text, font, c.Brush, (float)x, (float)y, stringFormat);
- } else {
- Size measure = layout.GetSize ();
- float h = layout.Height > 0 ? (float)layout.Height : (float)measure.Height;
- c.Graphics.DrawString (layout.Text, font, c.Brush,
- new RectangleF ((float)x, (float)y, (float)measure.Width, h),
- stringFormat);
- }
+ c.SetDash (offset, pattern);
}
- public void DrawImage (object backend, object img, double x, double y, double alpha)
+ public override void SetPattern (object backend, object p)
{
var c = (DrawingContext) backend;
+ if (p is ImagePattern)
+ p = ((ImagePattern)p).GetBrush (c.ScaleFactor);
+ c.SetPattern ((System.Windows.Media.Brush)p);
+ }
- Bitmap bmp = DataConverter.AsBitmap (img);
- DrawImageCore (c.Graphics, bmp, (float) x, (float) y, bmp.Width, bmp.Height, (float)alpha);
+ public override void DrawTextLayout (object backend, TextLayout layout, double x, double y)
+ {
+ var c = (DrawingContext) backend;
+ var t = (TextLayoutBackend)Toolkit.GetBackend (layout);
+ t.FormattedText.SetForegroundBrush (c.Brush);
+ c.Context.DrawText (t.FormattedText, new SW.Point (x, y));
}
- public void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha)
+ public override void DrawImage (object backend, ImageDescription img, double x, double y)
{
var c = (DrawingContext) backend;
+ WpfImage bmp = (WpfImage) img.Backend;
- Bitmap bmp = DataConverter.AsBitmap (img);
- DrawImageCore (c.Graphics, bmp, (float) x, (float) y, (float) width, (float) height, (float) alpha);
+ bmp.Draw (ApplicationContext, c.Context, c.ScaleFactor, x, y, img);
}
- public void DrawImage (object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha)
+ public override void DrawImage (object backend, ImageDescription img, Rectangle srcRect, Rectangle destRect)
{
var c = (DrawingContext) backend;
+ WpfImage bmp = (WpfImage)img.Backend;
- Bitmap bmp = DataConverter.AsBitmap (img);
+ c.Context.PushClip (new RectangleGeometry (destRect.ToWpfRect ()));
+ c.Context.PushTransform (new TranslateTransform (destRect.X - srcRect.X, destRect.Y - srcRect.Y));
+ var sw = destRect.Width / srcRect.Width;
+ var sh = destRect.Height / srcRect.Height;
+ c.Context.PushTransform (new ScaleTransform (sw, sh));
+ bmp.Draw (ApplicationContext, c.Context, c.ScaleFactor, 0, 0, img);
- DrawImageCore (c.Graphics, bmp, srcRect, destRect, (float) alpha);
+ c.Context.Pop (); // Scale
+ c.Context.Pop (); // Translate
+ c.Context.Pop (); // Clip
}
- public void Rotate (object backend, double angle)
+ public override void Rotate (object backend, double angle)
{
var c = (DrawingContext)backend;
- c.Graphics.RotateTransform ((float)angle);
+ c.PushTransform (new RotateTransform (angle));
}
- public void Scale (object backend, double scaleX, double scaleY)
- {
- var c = (DrawingContext)backend;
- c.Graphics.ScaleTransform ((float)scaleX, (float)scaleY);
- }
-
- public void Translate (object backend, double tx, double ty)
+ public override void Scale (object backend, double scaleX, double scaleY)
{
var c = (DrawingContext)backend;
- c.Graphics.TranslateTransform ((float)tx, (float)ty);
+ c.PushTransform (new ScaleTransform (scaleX, scaleY));
}
- public void TransformPoint (object backend, ref double x, ref double y)
+ public override void Translate (object backend, double tx, double ty)
{
- var m = ((DrawingContext)backend).Graphics.Transform;
- PointF p = new PointF ((float)x, (float)y);
- PointF[] pts = new PointF[] { p };
- m.TransformPoints (pts);
- x = pts[0].X;
- y = pts[0].Y;
+ var c = (DrawingContext)backend;
+ var t = new TranslateTransform (tx, ty);
+ c.PushTransform (t);
}
- public void TransformDistance (object backend, ref double dx, ref double dy)
+ public override Drawing.Matrix GetCTM (object backend)
{
- var m = ((DrawingContext)backend).Graphics.Transform;
- PointF p = new PointF ((float)dx, (float)dy);
- PointF[] pts = new PointF[] {p};
- m.TransformVectors (pts);
- dx = pts[0].X;
- dy = pts[0].Y;
+ var c = (DrawingContext)backend;
+ SWM.Matrix m = c.CurrentTransform;
+ return new Drawing.Matrix (m.M11, m.M12, m.M21, m.M22, m.OffsetX, m.OffsetY);
}
- public void TransformPoints (object backend, Point[] points)
- {
- var m = ((DrawingContext)backend).Graphics.Transform;
- PointF[] pts = new PointF[points.Length];
- for (int i = 0; i < points.Length; ++i) {
- pts[i].X = (float)points[i].X;
- pts[i].Y = (float)points[i].Y;
- }
- m.TransformPoints (pts);
- for (int i = 0; i < points.Length; ++i) {
- points[i].X = pts[i].X;
- points[i].Y = pts[i].Y;
- }
- }
+ public override object CreatePath ()
+ {
+ return new DrawingContext ();
+ }
- public void TransformDistances (object backend, Distance[] vectors)
+ public override object CopyPath (object backend)
{
- var m = ((DrawingContext)backend).Graphics.Transform;
- PointF[] pts = new PointF[vectors.Length];
- for (int i = 0; i < vectors.Length; ++i) {
- pts[i].X = (float)vectors[i].Dx;
- pts[i].Y = (float)vectors[i].Dy;
- }
- m.TransformVectors (pts);
- for (int i = 0; i < vectors.Length; ++i) {
- vectors[i].Dx = pts[i].X;
- vectors[i].Dy = pts[i].Y;
- }
+ return new DrawingContext ((DrawingContext)backend);
}
- public void Dispose (object backend)
- {
- ((DrawingContext)backend).Dispose();
+ public override void AppendPath (object backend, object otherBackend)
+ {
+ var c = (DrawingContext)backend;
+ var other = (DrawingContext)otherBackend;
+ foreach (var s in other.Path.Segments)
+ c.Path.Segments.Add (s);
}
- internal static void DrawImageCore (Graphics g, Bitmap bmp, float x, float y, float width, float height, float alpha)
- {
- if (bmp == null)
- throw new ArgumentException();
-
- if (alpha < 1) {
- var attr = new ImageAttributes ();
-
- float[][] matrixItems = new[] {
- new float[] { 1, 0, 0, 0, 0 },
- new float[] { 0, 1, 0, 0, 0 },
- new float[] { 0, 0, 1, 0, 0 },
- new float[] { 0, 0, 0, alpha, 0 },
- new float[] { 0, 0, 0, 0, 1 },
- };
-
- attr.SetColorMatrix (new ColorMatrix (matrixItems), ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
-
- PointF[] points = new PointF[3];
- points [0] = new PointF (x, y);
- points [1] = new PointF (x + width, y);
- points [2] = new PointF (x, y + height);
+ public override bool IsPointInFill (object backend, double x, double y)
+ {
+ var c = (DrawingContext)backend;
+ return c.Geometry.FillContains (new SW.Point (x, y));
+ }
- g.DrawImage (bmp, points, new RectangleF (0, 0, bmp.Width, bmp.Height), GraphicsUnit.Pixel, attr);
- }
- else
- g.DrawImage (bmp, x, y, width, height);
+ public override bool IsPointInStroke (object backend, double x, double y)
+ {
+ var c = (DrawingContext)backend;
+ return c.Geometry.StrokeContains (c.Pen, new SW.Point (x, y));
}
- internal void DrawImageCore (Graphics g, Bitmap bmp, Rectangle srcRect, Rectangle destRect, float alpha)
+ public override void Dispose (object backend)
{
- if (alpha < 1)
- {
- var attr = new ImageAttributes ();
-
- float[][] matrixItems = new[] {
- new float[] { 1, 0, 0, 0, 0 },
- new float[] { 0, 1, 0, 0, 0 },
- new float[] { 0, 0, 1, 0, 0 },
- new float[] { 0, 0, 0, alpha, 0 },
- new float[] { 0, 0, 0, 0, 1 },
- };
-
- attr.SetColorMatrix (new ColorMatrix (matrixItems), ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
-
- PointF[] points = new PointF[3];
- points[0] = new PointF ((float) destRect.X, (float) destRect.Y);
- points[1] = new PointF ((float) (destRect.X + destRect.Width), (float) destRect.Y);
- points[2] = new PointF ((float) destRect.X, (float) (destRect.Y + destRect.Height));
-
- g.DrawImage (bmp, points, srcRect.ToSDRectF (), GraphicsUnit.Pixel, attr);
- }
- else
- g.DrawImage (bmp, destRect.ToSDRectF (), srcRect.ToSDRectF (), GraphicsUnit.Pixel);
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs
index d35f6cd..deb0946 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs
@@ -249,7 +249,7 @@ namespace Xwt.WPFBackend
viewport = newViewport;
if (!viewportAdjustmentQueued) {
viewportAdjustmentQueued = true;
- Xwt.Engine.Toolkit.QueueExitAction (delegate
+ Application.MainLoop.QueueExitAction (delegate
{
// Adjust the position, if it now falls outside the extents.
// Doing it in an exit action to make sure the adjustement
@@ -281,22 +281,22 @@ namespace Xwt.WPFBackend
protected double VerticalPageIncrement
{
- get { return (this.verticalBackend != null) ? this.verticalBackend.PageIncrement : ViewportHeight; }
+ get { return (this.verticalBackend != null) ? this.verticalBackend.PageIncrement : 10; }
}
protected double HorizontalPageIncrement
{
- get { return (this.horizontalBackend != null) ? this.horizontalBackend.PageIncrement : ViewportWidth; }
+ get { return (this.horizontalBackend != null) ? this.horizontalBackend.PageIncrement : 10; }
}
protected double VerticalStepIncrement
{
- get { return (this.verticalBackend != null) ? this.verticalBackend.StepIncrement : 12; }
+ get { return (this.verticalBackend != null) ? this.verticalBackend.StepIncrement : 1; }
}
protected double HorizontalStepIncrement
{
- get { return (this.horizontalBackend != null) ? this.horizontalBackend.StepIncrement : 12; }
+ get { return (this.horizontalBackend != null) ? this.horizontalBackend.StepIncrement : 1; }
}
protected override WSize MeasureOverride (WSize constraint)
@@ -348,7 +348,8 @@ namespace Xwt.WPFBackend
child.Arrange (new Rect (0, 0, childSize.Width, childSize.Height));
child.UpdateLayout ();
- ((IWidgetSurface)(((IWpfWidget)child).Backend.Frontend)).Reallocate ();
+ if (child is IWpfWidget)
+ ((IWidgetSurface)(((IWpfWidget)child).Backend.Frontend)).Reallocate ();
return finalSize;
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomWidgetBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomWidgetBackend.cs
index bdaea90..ebd6a60 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomWidgetBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/CustomWidgetBackend.cs
@@ -60,24 +60,9 @@ namespace Xwt.WPFBackend
// The size of the container is the size of the child,
// so we redirect size calculations to the child.
- public override WidgetSize GetPreferredWidth ()
+ public override Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- return child != null ? child.Surface.GetPreferredWidth () : new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredHeightForWidth (double width)
- {
- return child != null ? child.Surface.GetPreferredHeightForWidth (width) : new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredHeight ()
- {
- return child != null ? child.Surface.GetPreferredHeight () : new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredWidthForHeight (double width)
- {
- return child != null ? child.Surface.GetPreferredWidthForHeight (width) : new WidgetSize (0);
+ return child != null ? child.Surface.GetPreferredSize (widthConstraint, heightConstraint) : Size.Zero;
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DataConverter.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DataConverter.cs
index 7d73c75..ef0fc70 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DataConverter.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DataConverter.cs
@@ -36,8 +36,6 @@ using System.Windows.Input;
using SW = System.Windows;
using SWC = System.Windows.Controls;
using SWM = System.Windows.Media;
-using SD = System.Drawing;
-using SDI = System.Drawing.Imaging;
using Xwt.Drawing;
using Color = Xwt.Drawing.Color;
using FontStretch = Xwt.Drawing.FontStretch;
@@ -62,11 +60,6 @@ namespace Xwt.WPFBackend
return new SW.Rect (rect.X, rect.Y, rect.Width, rect.Height);
}
- public static SD.RectangleF ToSDRectF (this Rectangle rect)
- {
- return new SD.RectangleF ((float) rect.X, (float) rect.Y, (float) rect.Width, (float) rect.Height);
- }
-
public static Int32Rect ToInt32Rect (this Rectangle rect)
{
return new Int32Rect ((int) rect.X, (int) rect.Y, (int) rect.Width, (int) rect.Height);
@@ -82,11 +75,6 @@ namespace Xwt.WPFBackend
return new SW.Point (point.X, point.Y);
}
- public static Size ToXwtSize (this SD.SizeF self)
- {
- return new Size (self.Width, self.Height);
- }
-
//
// Alignment
//
@@ -99,6 +87,15 @@ namespace Xwt.WPFBackend
}
}
+ public static Alignment ToXwtAlignment (this SW.TextAlignment alignment)
+ {
+ switch (alignment) {
+ case SW.TextAlignment.Left: return Alignment.Start;
+ case SW.TextAlignment.Center: return Alignment.Center;
+ default: return Alignment.End;
+ }
+ }
+
public static SW.HorizontalAlignment ToWpfAlignment (this Alignment alignment)
{
switch (alignment) {
@@ -108,6 +105,15 @@ namespace Xwt.WPFBackend
}
}
+ public static SW.TextAlignment ToTextAlignment (this Alignment alignment)
+ {
+ switch (alignment) {
+ case Alignment.Start: return SW.TextAlignment.Left;
+ case Alignment.Center: return SW.TextAlignment.Center;
+ default: return SW.TextAlignment.Right;
+ }
+ }
+
//
// Color
//
@@ -134,35 +140,6 @@ namespace Xwt.WPFBackend
(byte)(color.Blue * 255.0));
}
- public static System.Drawing.Color ToDrawingColor (this Color color)
- {
- return System.Drawing.Color.FromArgb (
- (byte) (color.Alpha * 255.0),
- (byte) (color.Red * 255.0),
- (byte) (color.Green * 255.0),
- (byte) (color.Blue * 255.0));
- }
-
- //
- // Font
- //
- public static SD.Font ToDrawingFont (this Font font)
- {
- SD.FontStyle style = font.Style.ToDrawingFontStyle ();
- if (font.Weight > FontWeight.Normal)
- style |= SD.FontStyle.Bold;
-
- return new SD.Font (font.Family, (float)font.Size, style);
- }
-
- public static SD.StringTrimming ToDrawingStringTrimming (this Xwt.Drawing.TextTrimming value)
- {
- if (value == Xwt.Drawing.TextTrimming.Word) return SD.StringTrimming.Word;
- if (value == Xwt.Drawing.TextTrimming.WordElipsis) return SD.StringTrimming.EllipsisWord;
-
- return SD.StringTrimming.Word;
- }
-
public static FontStyle ToXwtFontStyle (this SW.FontStyle value)
{
// No, SW.FontStyles is not an enum
@@ -180,19 +157,6 @@ namespace Xwt.WPFBackend
return SW.FontStyles.Normal;
}
- public static SD.FontStyle ToDrawingFontStyle (this FontStyle value)
- {
- switch (value) {
- case FontStyle.Normal:
- return SD.FontStyle.Regular;
- case FontStyle.Italic:
- return SD.FontStyle.Italic;
-
- default:
- throw new NotImplementedException();
- }
- }
-
public static FontStretch ToXwtFontStretch (this SW.FontStretch value)
{
// No, SW.FontStretches is not an enum
@@ -288,94 +252,18 @@ namespace Xwt.WPFBackend
}
}
- public static SDI.PixelFormat ToPixelFormat (this ImageFormat self)
- {
- switch (self) {
- case ImageFormat.ARGB32:
- return SDI.PixelFormat.Format32bppArgb;
- case ImageFormat.RGB24:
- return SDI.PixelFormat.Format24bppRgb;
- default:
- throw new ArgumentException();
- }
- }
-
- public static SDI.PixelFormat ToPixelFormat (this SW.Media.PixelFormat self)
- {
- if (self == SWM.PixelFormats.Rgb24)
- return SDI.PixelFormat.Format24bppRgb;
- if (self == SWM.PixelFormats.Bgra32)
- return SDI.PixelFormat.Format32bppArgb;
- if (self == SWM.PixelFormats.Pbgra32)
- return SDI.PixelFormat.Format32bppPArgb;
- if (self == SWM.PixelFormats.Prgba64)
- return SDI.PixelFormat.Format64bppPArgb;
- if (self == SWM.PixelFormats.Indexed1)
- return SDI.PixelFormat.Format1bppIndexed;
- if (self == SWM.PixelFormats.Indexed4)
- return SDI.PixelFormat.Format4bppIndexed;
- if (self == SWM.PixelFormats.Indexed8)
- return SDI.PixelFormat.Format8bppIndexed;
- if (self == SWM.PixelFormats.Gray16)
- return SDI.PixelFormat.Format16bppGrayScale;
- if (self == SWM.PixelFormats.Bgr24)
- return SDI.PixelFormat.Format24bppRgb;
- if (self == SWM.PixelFormats.Bgr32)
- return SDI.PixelFormat.Format32bppRgb;
-
- throw new ArgumentException();
- }
-
- public static SD.Bitmap AsBitmap (object backend)
- {
- var bmp = backend as SD.Bitmap;
- if (bmp == null) {
- var bs = backend as SWM.Imaging.BitmapSource;
- if (bs != null) {
- if (bs.Format == SWM.PixelFormats.Indexed1 || bs.Format == SWM.PixelFormats.Indexed2 || bs.Format == SWM.PixelFormats.Indexed4 || bs.Format == SWM.PixelFormats.Indexed8) {
- // The conversion method below doesn't work for indexed formats, since it only copies pixel data, not the palette.
- // Since there is no way of creating a palette for a Bitmap, a solution is to convert the image source to a non-indexed
- // format before converting to Bitmap
- var fcb = new SWM.Imaging.FormatConvertedBitmap ();
- fcb.BeginInit ();
- fcb.Source = bs;
- fcb.DestinationFormat = SWM.PixelFormats.Pbgra32;
- fcb.EndInit ();
- bs = fcb;
- }
- bmp = new SD.Bitmap (bs.PixelWidth, bs.PixelHeight, bs.Format.ToPixelFormat ());
- SDI.BitmapData data = bmp.LockBits (new System.Drawing.Rectangle (0, 0, bmp.Width, bmp.Height), SDI.ImageLockMode.WriteOnly,
- bmp.PixelFormat);
- bs.CopyPixels (new Int32Rect (0, 0, bmp.Width, bmp.Height), data.Scan0, data.Height * data.Stride, data.Stride);
- bmp.UnlockBits (data);
- }
- }
-
- return bmp;
- }
-
[DllImport ("gdi32")]
private static extern int DeleteObject (IntPtr o);
public static SWM.ImageSource AsImageSource (object nativeImage)
{
- var source = nativeImage as SWM.ImageSource;
- if (source == null) {
- var bitmap = nativeImage as SD.Bitmap;
- if (bitmap != null) {
- IntPtr ptr = bitmap.GetHbitmap ();
-
- try {
- return SW.Interop.Imaging.CreateBitmapSourceFromHBitmap (ptr, IntPtr.Zero, Int32Rect.Empty,
- SWM.Imaging.BitmapSizeOptions.FromEmptyOptions ());
- }
- finally {
- DeleteObject (ptr);
- }
- }
- }
+ var source = nativeImage as WpfImage;
+ return source.MainFrame;
+ }
- return source;
+ public static SWM.ImageSource ToImageSource (this Xwt.Backends.ImageDescription img)
+ {
+ return AsImageSource (img.Backend);
}
//
@@ -403,6 +291,7 @@ namespace Xwt.WPFBackend
{
if (type == TransferDataType.Text) return DataFormats.UnicodeText;
if (type == TransferDataType.Rtf) return DataFormats.Rtf;
+ if (type == TransferDataType.Html) return DataFormats.Html;
if (type == TransferDataType.Uri) return DataFormats.FileDrop;
if (type == TransferDataType.Image) return DataFormats.Bitmap;
return type.Id;
@@ -414,6 +303,7 @@ namespace Xwt.WPFBackend
if (type == DataFormats.Rtf) return TransferDataType.Rtf;
if (type == DataFormats.FileDrop) return TransferDataType.Uri;
if (type == DataFormats.Bitmap) return TransferDataType.Image;
+ if (type == DataFormats.Html) return TransferDataType.Html;
return TransferDataType.FromId (type);
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DatePickerBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DatePickerBackend.cs
new file mode 100644
index 0000000..de3b23a
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DatePickerBackend.cs
@@ -0,0 +1,93 @@
+//
+// DatePickerBackend.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+//
+// 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.Linq;
+using System.Text;
+using Xwt.WPFBackend;
+using Xwt.Backends;
+using WindowsDatePicker = System.Windows.Controls.DatePicker;
+
+namespace Xwt.WPFBackend
+{
+ public class DatePickerBackend : WidgetBackend, IDatePickerBackend
+ {
+ public DatePickerBackend()
+ {
+ Widget = new WindowsDatePicker();
+ }
+
+ protected WindowsDatePicker DatePicker
+ {
+ get { return (WindowsDatePicker)Widget; }
+ }
+
+ protected new IDatePickerEventSink EventSink
+ {
+ get { return (IDatePickerEventSink)base.EventSink; }
+ }
+
+ public DateTime DateTime
+ {
+ get
+ {
+ return DatePicker.SelectedDate ?? new DateTime(0);
+ }
+ set
+ {
+ DatePicker.SelectedDate = value;
+ }
+ }
+
+ public override void EnableEvent(object eventId)
+ {
+ base.EnableEvent(eventId);
+ if (eventId is DatePickerEvent)
+ {
+ if ((DatePickerEvent)eventId == DatePickerEvent.ValueChanged)
+ DatePicker.SelectedDateChanged += HandleValueChanged;
+ }
+ }
+
+ public override void DisableEvent(object eventId)
+ {
+ base.DisableEvent(eventId);
+ if (eventId is DatePickerEvent)
+ {
+ if ((DatePickerEvent)eventId == DatePickerEvent.ValueChanged)
+ DatePicker.SelectedDateChanged -= HandleValueChanged;
+ }
+ }
+
+ void HandleValueChanged(object sender, EventArgs e)
+ {
+ Context.InvokeUserCode(delegate
+ {
+ EventSink.ValueChanged();
+ });
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DialogBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DialogBackend.cs
index a1ed273..379451f 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DialogBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DialogBackend.cs
@@ -32,7 +32,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Input;
using Xwt.Backends;
-using Xwt.Engine;
+
using SWC = System.Windows.Controls;
namespace Xwt.WPFBackend
@@ -81,6 +81,7 @@ namespace Xwt.WPFBackend
separator.InvalidateMeasure ();
separator.Measure (new System.Windows.Size (double.PositiveInfinity, double.PositiveInfinity));
s.Height += buttonContainer.DesiredSize.Height + separator.DesiredSize.Height;
+ s.Width = System.Math.Max(buttonContainer.DesiredSize.Width, separator.DesiredSize.Width);
base.SetMinSize (s);
}
@@ -109,7 +110,6 @@ namespace Xwt.WPFBackend
if (parent != null)
Window.Owner = ((WindowFrameBackend) parent).Window;
Window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
- Window.ShowInTaskbar = false;
Window.ShowDialog ();
}
@@ -128,7 +128,7 @@ namespace Xwt.WPFBackend
private void OnButtonClicked (DialogButton button)
{
- Toolkit.Invoke (() => DialogEventSink.OnDialogButtonClicked (button));
+ Context.InvokeUserCode (() => DialogEventSink.OnDialogButtonClicked (button));
}
private static readonly ItemsPanelTemplate PanelTemplate;
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DrawingContext.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DrawingContext.cs
index 8f91ae2..0f684ad 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/DrawingContext.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/DrawingContext.cs
@@ -24,172 +24,244 @@
// 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.Linq;
using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Drawing2D;
+using System.Windows.Media;
+using SWM = System.Windows.Media;
+using SW = System.Windows;
namespace Xwt.WPFBackend
{
internal class DrawingContext:IDisposable
{
- internal DrawingContext (Graphics graphics)
- {
- if (graphics == null)
- throw new ArgumentNullException ("graphics");
-
- graphics.SmoothingMode = SmoothingMode.None;
- graphics.PixelOffsetMode = PixelOffsetMode.Half;
- graphics.CompositingQuality = CompositingQuality.HighSpeed;
+ Stack<ContextData> pushes = new Stack<ContextData> ();
+ TransformGroup transforms = new TransformGroup ();
+ int pushCount;
+ bool disposed;
+ bool positionSet;
+
+ PathGeometry geometry;
+ SWM.Brush patternBrush;
+ SWM.SolidColorBrush colorBrush;
+
+ public double ScaleFactor { get; set; }
- // necessary for correct text rendering with System.Drawing
- //graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit;
- // necessary for none-pixelated text drawing in images, revert to above line if it introduces a performance problem
- graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
+ public SW.Point LastFigureStart { get; set; }
+ public SW.Point EndPoint { get; set; }
- Graphics = graphics;
+ public PathFigure Path { get; private set; }
+ public SWM.Pen Pen { get; private set; }
+
+ public SWM.Brush Brush {
+ get {
+ return patternBrush ?? colorBrush;
+ }
}
- internal DrawingContext (DrawingContext context)
+ public SWM.Matrix CurrentTransform {
+ get {
+ TransformCollection children = transforms.Children;
+ Matrix ctm = Matrix.Identity;
+ foreach (Transform t in children) {
+ ctm.Prepend (t.Value);
+ };
+ return ctm;
+ }
+ }
+
+ class ContextData
{
-
- context.CopyTo (this, false);
-
- CurrentX = context.CurrentX;
- CurrentY = context.CurrentY;
+ public int PushCount;
+ public Color CurrentColor;
+ public double Thickness;
+ public DashStyle DashStyle;
+ public Brush Pattern;
+ public int TransformCount;
}
- internal readonly Graphics Graphics;
- Font font = null;
+ public System.Windows.Media.DrawingContext Context { get; private set; }
- internal Font Font {
- get { return font ?? (font = new Font (FontFamily.GenericSansSerif, 12));}
- set { font = value;}
+ internal DrawingContext (System.Windows.Media.DrawingContext dc, double scaleFactor)
+ {
+ Context = dc;
+ ScaleFactor = scaleFactor;
+ AllocatePen (Color.FromRgb (0, 0, 0), 1, DashStyles.Solid);
+ ResetPath ();
}
- Color color = Color.Black;
- float width = 1;
- Pen pen = null;
+ internal DrawingContext (DrawingContext context)
+ {
+ Context = context.Context;
- internal Pen Pen {
- get { return pen ?? (pen = new Pen (color, width));}
- set { pen = value;}
- }
+ if (context.Pen != null)
+ AllocatePen (context.colorBrush.Color, context.Pen.Thickness, context.Pen.DashStyle);
- Brush brush = null;
+ patternBrush = context.patternBrush;
- internal Brush Brush {
- get { return brush ?? (brush = new SolidBrush (color));}
- set { brush = value;}
+ geometry = (PathGeometry) context.Geometry.Clone ();
+ Path = geometry.Figures[geometry.Figures.Count - 1];
+ positionSet = context.positionSet;
}
- internal GraphicsState State;
- internal float CurrentX;
- internal float CurrentY;
- GraphicsPath path = null;
+ internal DrawingContext()
+ {
+ ResetPath ();
+ }
- internal GraphicsPath Path {
- get { return path ?? (path = new GraphicsPath ());}
- set { path = value;}
+ public void Save ()
+ {
+ var cd = new ContextData () {
+ Thickness = Pen.Thickness,
+ CurrentColor = colorBrush.Color,
+ PushCount = pushCount,
+ Pattern = patternBrush,
+ DashStyle = Pen.DashStyle,
+ TransformCount = transforms.Children.Count,
+ };
+ pushes.Push (cd);
+ pushCount = 0;
}
- internal void SetColor (Color color)
+ public void Restore ()
{
- if (this.color == color)
+ if (pushes.Count == 0)
return;
-
- if (pen != null)
- pen.Color = color;
-
- if (brush != null) {
- SolidBrush solidBrush = brush as SolidBrush;
- if (solidBrush == null) {
- brush.Dispose ();
- brush = null;
- } else
- solidBrush.Color = color;
- }
- this.color = color;
+ for (int n = 0; n < pushCount; n++)
+ Context.Pop ();
+
+ var cd = pushes.Pop ();
+ pushCount = cd.PushCount;
+
+ while (transforms.Children.Count > cd.TransformCount)
+ transforms.Children.RemoveAt (transforms.Children.Count - 1);
+
+ AllocatePen (cd.CurrentColor, cd.Thickness, cd.DashStyle);
+ patternBrush = cd.Pattern;
}
-
- internal void SetWidth (float width)
+
+ public void NotifyPush ()
{
- if (this.width != width) {
- if (pen != null) {
- pen.Width = width;
- }
- }
- this.width = width;
+ pushCount++;
}
-
- internal void CopyTo (DrawingContext dc, bool toCurrent)
+
+ public void PushTransform (Transform t)
{
- if (toCurrent)
- dc.Graphics.Restore (this.State);
- else
- dc.State = this.Graphics.Save ();
- dc.Font = this.font;
- dc.Brush = this.brush;
- dc.Pen = this.pen;
- dc.SetWidth (this.width);
- dc.SetColor (this.color);
- dc.CurrentX = this.CurrentX;
- dc.CurrentY = this.CurrentY;
- if (this.path != null && this.path.PointCount > 0)
- dc.Path = (GraphicsPath) this.path.Clone ();
+ Context.PushTransform (t);
+ transforms.Children.Add (t);
+ pushCount++;
}
-
- internal void Save ()
+
+ public void SetColor (Color color)
{
- if (this.contexts == null)
- this.contexts = new Stack<DrawingContext> ();
+ patternBrush = null;
+ AllocatePen (color, Pen != null ? Pen.Thickness : 1, Pen != null ? Pen.DashStyle : DashStyles.Solid);
+ }
- this.contexts.Push (new DrawingContext (this));
+ public void SetThickness (double t)
+ {
+ var ds = Pen.DashStyle;
+ if (ds != DashStyles.Solid) {
+ var dashes = Pen.DashStyle.Dashes.Clone ();
+ for (int n = 0; n < dashes.Count; n++)
+ dashes[n] = (dashes[n] * Pen.Thickness) / t;
+ var offset = (Pen.DashStyle.Offset * Pen.Thickness) / t;
+ ds = new DashStyle (dashes, offset);
+ }
+ AllocatePen (colorBrush.Color, t, ds);
}
-
- internal void Restore ()
+
+ internal void SetDash (double offset, double[] pattern)
{
- if (this.contexts == null || this.contexts.Count == 0)
- throw new InvalidOperationException ();
+ DashStyle ds = new DashStyle (pattern.Select (d => d / Pen.Thickness), offset);
+ AllocatePen (colorBrush.Color, Pen.Thickness, ds);
+ }
- var dc = this.contexts.Pop ();
+ void AllocatePen (Color color, double thickness, DashStyle dashStyle)
+ {
+ if (colorBrush != null && color == colorBrush.Color) {
+ if (Pen.Thickness != thickness || !dashStyle.Equals (Pen.DashStyle))
+ Pen = new SWM.Pen (colorBrush, thickness) {
+ DashStyle = dashStyle
+ };
+ }
+ else
+ {
+ colorBrush = new SolidColorBrush (color);
+ Pen = new SWM.Pen (colorBrush, thickness) {
+ DashStyle = dashStyle
+ };
+ }
+ Pen.DashCap = PenLineCap.Flat;
+ }
- dc.CopyTo (this, true);
- dc.Dispose (true);
+ public void SetPattern (Brush brush)
+ {
+ patternBrush = brush;
+ }
+ public void NewFigure (SW.Point p)
+ {
+ if (Path.Segments.Count > 0) {
+ Path = new PathFigure ();
+ geometry.Figures.Add (Path);
+ }
+ LastFigureStart = p;
+ EndPoint = p;
+ Path.StartPoint = p;
+ positionSet = true;
}
- private Stack<DrawingContext> contexts;
+ public void ConnectToLastFigure (SW.Point p, bool stroke)
+ {
+ if (EndPoint != p) {
+ var pathIsOpen = Path.Segments.Count != 0 || geometry.Figures.Count > 1 || positionSet;
+ if (pathIsOpen) {
+ // LastFigureStart = p;
+ Path.Segments.Add (new LineSegment (p, stroke));
+ }
+ else
+ NewFigure (p);
+ }
+ if (!stroke)
+ LastFigureStart = p;
+ }
+
+ public void ResetPath ()
+ {
+ Path = new PathFigure ();
+ geometry = new PathGeometry ();
+ geometry.Figures.Add (Path);
+ Path.StartPoint = EndPoint = new SW.Point (0, 0);
+ positionSet = false;
+ }
+
+ public PathGeometry Geometry {
+ get { return geometry; }
+ }
- public void Dispose (bool stacked)
+ public SW.Point GetStartPoint ()
{
- if (!stacked) {
- if (font != null)
- font.Dispose ();
- if (brush != null)
- brush.Dispose ();
- if (pen != null)
- pen.Dispose ();
+ if (Path.Segments.Count == 0)
+ return Path.StartPoint;
+ var last = Path.Segments[0];
+ if (last is LineSegment)
+ return ((LineSegment)last).Point;
+ if (last is PolyLineSegment) {
+ var p = ((PolyLineSegment)last).Points;
+ return p[0];
}
-
- if (path != null)
- path.Dispose ();
-
- if (contexts != null)
- while (contexts.Count!=0) {
- var c = contexts.Pop ();
- c.Dispose (true);
- }
- font = null;
- brush = null;
- pen = null;
- path = null;
+ return Path.StartPoint;
}
-
+
public void Dispose ()
{
- Dispose (false);
+ if (!disposed) {
+ Context.Close ();
+ disposed = true;
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/EmbedNativeWidgetBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/EmbedNativeWidgetBackend.cs
new file mode 100644
index 0000000..53e8ded
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/EmbedNativeWidgetBackend.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using Xwt.Backends;
+using Xwt.WPFBackend.Utilities;
+
+namespace Xwt.WPFBackend
+{
+ class EmbedNativeWidgetBackend: WidgetBackend, IEmbeddedWidgetBackend
+ {
+ public void SetContent(object nativeWidget)
+ {
+ if (nativeWidget is FrameworkElement)
+ Widget = (FrameworkElement)nativeWidget;
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExCanvas.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExCanvas.cs
index 4edea75..1792f4f 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExCanvas.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExCanvas.cs
@@ -33,14 +33,13 @@ namespace Xwt.WPFBackend
internal class ExCanvas
: WpfCanvas, IWpfWidget
{
- public event EventHandler Render;
+ public Action<System.Windows.Media.DrawingContext> RenderAction;
protected override void OnRender (System.Windows.Media.DrawingContext dc)
{
- var render = Render;
+ var render = RenderAction;
if (render != null)
- render (this, EventArgs.Empty);
-
+ render (dc);
base.OnRender (dc);
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeView.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeView.cs
index f268c1b..0d3207c 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeView.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeView.cs
@@ -3,6 +3,7 @@
//
// Author:
// Eric Maupin <ermau at xamarin.com>
+// David Karlaš <david.karlas at gmail.com>
//
// Copyright (c) 2012 Xamarin, Inc.
//
@@ -34,6 +35,8 @@ using System.Windows;
using System.Windows.Controls;
using System.Collections.Generic;
using SWC = System.Windows.Controls;
+using WKey = System.Windows.Input.Key;
+using System.Windows.Input;
namespace Xwt.WPFBackend
{
@@ -43,6 +46,16 @@ namespace Xwt.WPFBackend
public ExTreeView()
{
SelectedItems = new ObservableCollection<object> ();
+ Loaded += new RoutedEventHandler(ExTreeView_Loaded);
+ }
+
+ void ExTreeView_Loaded(object sender, RoutedEventArgs e)
+ {
+ if (SelectionMode == SWC.SelectionMode.Single)
+ {
+ if (Items.Count > 0)
+ SelectItem(Items[0]);
+ }
}
public event EventHandler SelectedItemsChanged;
@@ -261,5 +274,169 @@ namespace Xwt.WPFBackend
var view = (ExTreeView) dependencyObject;
view.OnSelectionModeChanged (e);
}
+
+ public void SelectItem(object item)
+ {
+ SelectItem(ContainerFromObject(item));
+ }
+
+ ExTreeViewItem shiftStart = null;
+ ExTreeViewItem shiftEnd = null;
+
+ private bool ShiftPressed
+ {
+ get
+ {
+ return Keyboard.IsKeyDown(WKey.RightShift) || Keyboard.IsKeyDown(WKey.LeftShift);
+ }
+ }
+
+ private bool CtrlPressed
+ {
+ get
+ {
+ return Keyboard.IsKeyDown(WKey.RightCtrl) || Keyboard.IsKeyDown(WKey.LeftCtrl);
+ }
+ }
+
+ protected override void OnGotFocus(RoutedEventArgs e)
+ {
+ base.OnGotFocus(e);
+ FocusItem(focusedTreeViewItem);
+ }
+
+ public void SelectItem(ExTreeViewItem item)
+ {
+ FocusItem(item);
+ if (!CtrlPressed)
+ SelectedItems.Clear();
+ if (ShiftPressed)
+ {
+ if (shiftEnd != null)//Erase previous selection of shift
+ foreach (var forEachItem in GetItemsBetween(shiftStart, shiftEnd))
+ SelectedItems.Remove(forEachItem.DataContext);
+ shiftEnd = item;
+ foreach (var forEachItem in GetItemsBetween(shiftStart, shiftEnd))
+ SelectedItems.Add(forEachItem.DataContext);
+ }
+ else
+ {
+ shiftEnd = null;
+ shiftStart = item;
+ if (CtrlPressed && SelectedItems.Contains(item.DataContext))
+ SelectedItems.Remove(item.DataContext);
+ else
+ SelectedItems.Add(item.DataContext);
+ }
+ }
+
+ private IEnumerable<ExTreeViewItem> GetAllVisibleItems(ItemsControl itemsControl)
+ {
+ foreach (var item in itemsControl.Items)
+ {
+ ExTreeViewItem treeViewItem = (ExTreeViewItem)itemsControl.ItemContainerGenerator.ContainerFromItem(item);
+ if (treeViewItem == null)
+ continue;
+ if (treeViewItem.IsVisible && treeViewItem.Visibility == Visibility.Visible)
+ {
+ yield return treeViewItem;
+ if (treeViewItem.IsExpanded)
+ foreach (var childItem in GetAllVisibleItems(treeViewItem))
+ yield return childItem;
+ }
+ }
+ }
+
+ private IEnumerable<ExTreeViewItem> GetItemsBetween(ExTreeViewItem startItem, ExTreeViewItem endItem)
+ {
+ var allVisibleItems = GetAllVisibleItems(this).ToList();
+ var startIndex = allVisibleItems.IndexOf(startItem);
+ var endIndex = allVisibleItems.IndexOf(endItem);
+
+ if (endIndex == startIndex)
+ return new List<ExTreeViewItem> { endItem };
+ var filteredItems = new List<ExTreeViewItem>();
+ if (endIndex > startIndex)
+ for (int i = startIndex; i <= endIndex; i++)
+ filteredItems.Add(allVisibleItems[i]);
+ else
+ for (int i = startIndex; i >= endIndex; i--)
+ filteredItems.Add(allVisibleItems[i]);
+ return filteredItems;
+ }
+
+ private ExTreeViewItem focusedTreeViewItem = null;
+ protected override void OnKeyDown(System.Windows.Input.KeyEventArgs e)
+ {
+ e.Handled = true;
+ if (e.Key == WKey.Down)
+ {
+ if (CtrlPressed && !ShiftPressed)
+ {
+ FocusItem(GetNextItem(focusedTreeViewItem));
+ }
+ else
+ {
+ SelectItem(GetNextItem(focusedTreeViewItem));
+ }
+ }
+ else if (e.Key == WKey.Up)
+ {
+ if (CtrlPressed && !ShiftPressed)
+ {
+ FocusItem(GetPrevItem(focusedTreeViewItem));
+ }
+ else
+ {
+ SelectItem(GetPrevItem(focusedTreeViewItem));
+ }
+ }
+ else if (e.Key == WKey.Space)
+ {
+ SelectItem(focusedTreeViewItem);
+ }
+ else if (e.Key == WKey.Right && !CtrlPressed)
+ {
+ focusedTreeViewItem.IsExpanded = true;
+ }
+ else if (e.Key == WKey.Left && !CtrlPressed)
+ {
+ focusedTreeViewItem.IsExpanded = false;
+ }
+ else
+ {
+ e.Handled = false;
+ }
+ base.OnKeyDown(e);
+ }
+
+ private void FocusItem(ExTreeViewItem exTreeViewItem)
+ {
+ if (exTreeViewItem != null)
+ {
+ focusedTreeViewItem = exTreeViewItem;
+ exTreeViewItem.Focus();
+ }
+ }
+
+ private ExTreeViewItem GetPrevItem(ExTreeViewItem p)
+ {
+ var items = GetAllVisibleItems(this).ToList();
+ int indexOfP = items.IndexOf(p);
+ if (indexOfP == 0)
+ return p;
+ else
+ return items[indexOfP - 1];
+ }
+
+ private ExTreeViewItem GetNextItem(ExTreeViewItem p)
+ {
+ var items = GetAllVisibleItems(this).ToList();
+ int indexOfP = items.IndexOf(p);
+ if (indexOfP + 1 == items.Count)
+ return p;
+ else
+ return items[indexOfP + 1];
+ }
}
}
\ No newline at end of file
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeViewItem.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeViewItem.cs
index 263c6fe..ec42969 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeViewItem.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExTreeViewItem.cs
@@ -3,6 +3,7 @@
//
// Author:
// Eric Maupin <ermau at xamarin.com>
+// David Karlaš <david.karlas at gmail.com>
//
// Copyright (c) 2012 Xamarin, Inc.
//
@@ -30,6 +31,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using SWC = System.Windows.Controls;
using WKey = System.Windows.Input.Key;
+using Xwt.Backends;
namespace Xwt.WPFBackend
{
@@ -47,6 +49,30 @@ namespace Xwt.WPFBackend
this.view = view;
}
+ protected override void OnExpanded (RoutedEventArgs e)
+ {
+ var node = (TreeStoreNode)DataContext;
+ view.Backend.Context.InvokeUserCode (delegate {
+ ((ITreeViewEventSink)view.Backend.EventSink).OnRowExpanding (node);
+ });
+
+ base.OnExpanded (e);
+
+ view.Backend.Context.InvokeUserCode (delegate {
+ ((ITreeViewEventSink)view.Backend.EventSink).OnRowExpanded (node);
+ });
+ }
+
+ protected override void OnCollapsed(RoutedEventArgs e)
+ {
+ if (!IsExpanded)
+ UnselectChildren((object o, ExTreeViewItem i) =>
+ {
+ return i != this;
+ });
+ base.OnCollapsed(e);
+ }
+
public int Level {
get {
if (this.level == -1) {
@@ -60,22 +86,24 @@ namespace Xwt.WPFBackend
public void SelectChildren (Func<object, ExTreeViewItem, bool> selector)
{
- TreeView.SelectedItems.Add (DataContext);
+ if (selector(this.DataContext, this))
+ TreeView.SelectedItems.Add (DataContext);
foreach (var item in Items) {
- var treeItem = GetTreeItem (item);
- if (selector (item, treeItem))
+ var treeItem = (ExTreeViewItem)ItemContainerGenerator.ContainerFromItem(item);
+ if (treeItem != null && selector (item, treeItem))
treeItem.SelectChildren (selector);
}
}
public void UnselectChildren (Func<object, ExTreeViewItem, bool> selector)
{
- TreeView.SelectedItems.Remove (DataContext);
+ if (selector(this.DataContext, this))
+ TreeView.SelectedItems.Remove(DataContext);
foreach (var item in Items) {
- var treeItem = GetTreeItem (item);
- if (selector (item, treeItem))
+ var treeItem = (ExTreeViewItem)ItemContainerGenerator.ContainerFromItem(item);
+ if (treeItem != null && selector (item, treeItem))
treeItem.UnselectChildren (selector);
}
}
@@ -88,79 +116,10 @@ namespace Xwt.WPFBackend
return new ExTreeViewItem (this.view);
}
- protected override void OnMouseLeftButtonDown (MouseButtonEventArgs e)
- {
- bool add = true;
-
- if (TreeView.SelectedItems.Count > 0 && this.view.SelectionMode == SWC.SelectionMode.Extended) {
- if (!(Keyboard.IsKeyDown (WKey.LeftCtrl) || Keyboard.IsKeyDown (WKey.RightCtrl))) {
- if (Keyboard.IsKeyDown (WKey.LeftShift)) {
- var lastSelected = TreeView.ContainerFromObject (TreeView.SelectedItems [TreeView.SelectedItems.Count - 1]);
-
- TreeView.SelectedItems.Clear();
-
- ExTreeViewItem top, bottom;
- if (Level == lastSelected.Level) {
- top = this;
- bottom = lastSelected;
- } else {
- top = (Level < lastSelected.Level) ? this : lastSelected;
- bottom = (Level > lastSelected.Level) ? this : lastSelected;
- }
-
- var itemControl = ItemsControlFromItemContainer (top);
- var items = itemControl.Items;
- var g = itemControl.ItemContainerGenerator;
-
- ExTreeViewItem currentTop = top;
- ExTreeViewItem currentBottom = FindSameLevelParent (bottom, top.Level);
-
- bool adding = false;
- for (int i = 0; i < items.Count; ++i) {
- object item = items [i];
- TreeViewItem container = (TreeViewItem)g.ContainerFromItem (item);
-
- bool endpoint = (container == currentTop || container == currentBottom);
-
- if (endpoint) {
- if (currentTop != currentBottom)
- adding = !adding;
- }
- else if (!adding)
- continue;
-
- TreeView.SelectedItems.Add (item);
-
- if (endpoint && !adding) {
- if (bottom != currentBottom) {
- i = -1;
-
- items = currentBottom.Items;
- g = currentBottom.ItemContainerGenerator;
- currentTop = (ExTreeViewItem)g.ContainerFromItem (items [0]);
- currentBottom = FindSameLevelParent (bottom, currentBottom.Level + 1);
- }
- else
- break;
- }
- }
- }
- else
- TreeView.SelectedItems.Clear ();
- } else if (IsSelected)
- add = false;
- }
-
- if (!add || !IsSelected) {
- if (add)
- TreeView.SelectedItems.Add (DataContext);
- else
- TreeView.SelectedItems.Remove (DataContext);
-
- e.Handled = true;
- }
-
- base.OnMouseLeftButtonDown (e);
+ protected override void OnMouseLeftButtonDown (MouseButtonEventArgs e) {
+ view.SelectItem(this);
+ e.Handled = true;
+ base.OnMouseLeftButtonDown(e);
}
private ExTreeView TreeView
@@ -174,16 +133,6 @@ namespace Xwt.WPFBackend
}
}
- private ExTreeViewItem FindSameLevelParent (ExTreeViewItem item, int parentLevel)
- {
- while (item.Level != parentLevel) {
- item = ItemsControlFromItemContainer (item) as ExTreeViewItem;
- if (item == null)
- return null;
- }
-
- return item;
- }
private void FindParent()
{
@@ -194,11 +143,6 @@ namespace Xwt.WPFBackend
}
}
- private ExTreeViewItem GetTreeItem (object item)
- {
- return item as ExTreeViewItem ?? (ExTreeViewItem) TreeView.ItemContainerGenerator.ContainerFromItem (item);
- }
-
private void OnLoaded (object sender, RoutedEventArgs routedEventArgs)
{
ItemsControl parent = ItemsControlFromItemContainer (this);
@@ -216,5 +160,16 @@ namespace Xwt.WPFBackend
column.Width = Double.NaN;
}
}
+
+ protected override void OnKeyDown(System.Windows.Input.KeyEventArgs e)
+ {
+ //We can't allow TreeViewItem(our base class) to get this message(OnKeyDown) because it will mess with our ExTreeView handling
+ }
+
+ protected override void OnGotFocus(RoutedEventArgs e)
+ {
+ BringIntoView();
+ //We can't allow TreeViewItem(our base class) to get this message(OnGotFocus) because it will also select this item which we don't want
+ }
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExpanderBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExpanderBackend.cs
new file mode 100644
index 0000000..61ca1f1
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ExpanderBackend.cs
@@ -0,0 +1,120 @@
+//
+// ExpanderBackend.cs
+//
+// Author:
+// Sam Clarke <sam at samclarke.com>
+//
+// Copyright (c) 2013 Sam Clarke
+//
+// 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 SWC = System.Windows.Controls;
+using Xwt.Backends;
+
+namespace Xwt.WPFBackend
+{
+ class ExpanderBackend : WidgetBackend, IExpanderBackend
+ {
+ public ExpanderBackend()
+ {
+ Widget = new SWC.Expander();
+
+ Widget.Expanded += delegate {
+ EventSink.OnPreferredSizeChanged();
+ };
+ Widget.Collapsed += delegate {
+ EventSink.OnPreferredSizeChanged();
+ };
+ }
+
+ protected new SWC.Expander Widget
+ {
+ get { return (SWC.Expander)base.Widget; }
+ set { base.Widget = value; }
+ }
+
+ protected new IExpandEventSink EventSink
+ {
+ get { return (IExpandEventSink)base.EventSink; }
+ }
+
+ public string Label
+ {
+ get {
+ return Widget.Header.ToString();
+ }
+ set {
+ Widget.Header = value;
+ }
+ }
+
+ public bool Expanded
+ {
+ get {
+ return Widget.IsExpanded;
+ }
+ set {
+ Widget.IsExpanded = value;
+ }
+ }
+
+ public void SetContent(IWidgetBackend child)
+ {
+ if (child == null)
+ Widget.Content = null;
+ else
+ Widget.Content = child.NativeWidget;
+ }
+
+ public override void EnableEvent(object eventId)
+ {
+ base.EnableEvent(eventId);
+
+ if (eventId is ExpandEvent)
+ {
+ if ((ExpandEvent)eventId == ExpandEvent.ExpandChanged)
+ {
+ Widget.Expanded += HandleExpandedChanged;
+ Widget.Collapsed += HandleExpandedChanged;
+ }
+ }
+ }
+
+ public override void DisableEvent(object eventId)
+ {
+ base.DisableEvent(eventId);
+
+ if (eventId is ExpandEvent)
+ {
+ if ((ExpandEvent)eventId == ExpandEvent.ExpandChanged)
+ {
+ Widget.Expanded -= HandleExpandedChanged;
+ Widget.Collapsed -= HandleExpandedChanged;
+ }
+ }
+ }
+
+ void HandleExpandedChanged(object sender, System.Windows.RoutedEventArgs e)
+ {
+ Context.InvokeUserCode(delegate
+ {
+ EventSink.ExpandChanged();
+ });
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/FontBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/FontBackendHandler.cs
index 8b54741..b38965a 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/FontBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/FontBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// FontBackendHandler.cs
//
// Authors:
@@ -26,6 +26,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+using System.Linq;
using SW = System.Windows;
using Xwt.Backends;
@@ -35,28 +36,48 @@ using FontFamily = System.Windows.Media.FontFamily;
namespace Xwt.WPFBackend
{
- public class FontBackendHandler : IFontBackendHandler
+ public class WpfFontBackendHandler : FontBackendHandler
{
- public object Create (string fontName, double size, FontSizeUnit sizeUnit, FontStyle style, FontWeight weight, FontStretch stretch)
+ public override object GetSystemDefaultFont ()
+ {
+ double size = GetPointsFromDeviceUnits (SW.SystemFonts.MessageFontSize);
+
+ return new FontData (SW.SystemFonts.MessageFontFamily, size) {
+ Style = SW.SystemFonts.MessageFontStyle,
+ Weight = SW.SystemFonts.MessageFontWeight
+ };
+ }
+
+ public override System.Collections.Generic.IEnumerable<string> GetInstalledFonts ()
{
- return new FontData (new FontFamily (fontName), size, sizeUnit);
+ return System.Windows.Media.Fonts.SystemFontFamilies.Select (f => f.Source);
+ }
+
+ public override object Create (string fontName, double size, FontStyle style, FontWeight weight, FontStretch stretch)
+ {
+ size = GetPointsFromDeviceUnits (size);
+ return new FontData (new FontFamily (fontName), size) {
+ Style = style.ToWpfFontStyle (),
+ Weight = weight.ToWpfFontWeight (),
+ Stretch = stretch.ToWpfFontStretch ()
+ };
}
- public object Copy (object handle)
+ public override object Copy (object handle)
{
var font = (FontData)handle;
return font.Clone ();
}
- public object SetSize (object handle, double size, FontSizeUnit sizeUnit)
+ public override object SetSize (object handle, double size)
{
var font = (FontData)handle;
font = font.Clone ();
- font.Size = size;
+ font.Size = GetPointsFromDeviceUnits (size);
return font;
}
- public object SetFamily (object handle, string family)
+ public override object SetFamily (object handle, string family)
{
var font = (FontData)handle;
font = font.Clone ();
@@ -64,7 +85,7 @@ namespace Xwt.WPFBackend
return font;
}
- public object SetStyle (object handle, FontStyle style)
+ public override object SetStyle (object handle, FontStyle style)
{
var font = (FontData)handle;
font = font.Clone ();
@@ -72,7 +93,7 @@ namespace Xwt.WPFBackend
return font;
}
- public object SetWeight (object handle, FontWeight weight)
+ public override object SetWeight (object handle, FontWeight weight)
{
var font = (FontData)handle;
font = font.Clone ();
@@ -80,7 +101,7 @@ namespace Xwt.WPFBackend
return font;
}
- public object SetStretch (object handle, FontStretch stretch)
+ public override object SetStretch (object handle, FontStretch stretch)
{
var font = (FontData)handle;
font = font.Clone ();
@@ -88,49 +109,36 @@ namespace Xwt.WPFBackend
return font;
}
- public double GetSize (object handle)
+ public override double GetSize (object handle)
{
var font = (FontData)handle;
- return font.Size;
+ return GetDeviceUnitsFromPoints (font.Size);
}
- public string GetFamily (object handle)
+ public override string GetFamily (object handle)
{
var font = (FontData)handle;
return font.Family.Source;
}
- public FontStyle GetStyle (object handle)
+ public override FontStyle GetStyle (object handle)
{
var font = (FontData)handle;
return DataConverter.ToXwtFontStyle (font.Style);
}
- public FontStretch GetStretch (object handle)
+ public override FontStretch GetStretch (object handle)
{
var font = (FontData)handle;
return DataConverter.ToXwtFontStretch (font.Stretch);
}
- public FontWeight GetWeight (object handle)
+ public override FontWeight GetWeight (object handle)
{
var font = (FontData)handle;
return DataConverter.ToXwtFontWeight (font.Weight);
}
- internal static double GetPointsFromPixels (double pixels, double dpi)
- {
- return (pixels / dpi) * 72;
- }
-
- internal static double GetPointsFromPixels (SW.Controls.Control control)
- {
- Size pixelRatios = control.GetPixelRatios ();
- double dpi = (pixelRatios.Width * 96); // 96 DPI is WPF's unit
-
- return GetPointsFromPixels (control.FontSize, dpi);
- }
-
internal static double GetDeviceUnitsFromPoints (double points)
{
return points * (96d / 72d);
@@ -144,15 +152,14 @@ namespace Xwt.WPFBackend
internal class FontData
{
- public FontData (FontFamily family, double size, FontSizeUnit unit)
+ public FontData (FontFamily family, double size)
{
- Unit = unit;
Family = family;
Size = size;
}
- public FontData (string family, double size, FontSizeUnit unit) :
- this (new FontFamily (family), size, unit)
+ public FontData (string family, double size) :
+ this (new FontFamily (family), size)
{
}
@@ -161,24 +168,22 @@ namespace Xwt.WPFBackend
public SW.FontWeight Weight { get; set; }
public SW.FontStyle Style { get; set; }
public SW.FontStretch Stretch { get; set; }
- public FontSizeUnit Unit { get; set; }
public double GetDeviceIndependentPixelSize (SW.Controls.Control control)
{
- if (Unit == FontSizeUnit.Points)
- return FontBackendHandler.GetDeviceUnitsFromPoints (Size);
- else {
- Size pixelRatios = control.GetPixelRatios ();
- return Size / pixelRatios.Width;
- }
+ return WpfFontBackendHandler.GetDeviceUnitsFromPoints (Size);
+ }
+
+ public double GetDeviceIndependentPixelSize ()
+ {
+ return WpfFontBackendHandler.GetDeviceUnitsFromPoints (Size);
}
public static FontData FromControl (SW.Controls.Control control)
{
- Size pixelRatios = control.GetPixelRatios ();
- var pixelSize = control.FontSize * pixelRatios.Width;
+ double size = WpfFontBackendHandler.GetPointsFromDeviceUnits (control.FontSize);
- return new FontData (control.FontFamily, pixelSize, FontSizeUnit.Pixels) {
+ return new FontData (control.FontFamily, size) {
Style = control.FontStyle,
Stretch = control.FontStretch,
Weight = control.FontWeight
@@ -188,7 +193,7 @@ namespace Xwt.WPFBackend
// Didn't implement IClone on purpose (recommended by the Framework Design guidelines)
public FontData Clone ()
{
- return new FontData (Family, Size, Unit) {
+ return new FontData (Family, Size) {
Style = Style,
Stretch = Stretch,
Weight = Weight
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/GradientBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/GradientBackendHandler.cs
index 29d9826..e7938b5 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/GradientBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/GradientBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// GradientBackendHandler.cs
//
// Author:
@@ -26,104 +26,45 @@
using System;
using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Drawing2D;
using System.Linq;
using Xwt.Backends;
using Color = Xwt.Drawing.Color;
-using DrawingColor = System.Drawing.Color;
+using System.Windows.Media;
+using SW = System.Windows;
namespace Xwt.WPFBackend
{
- public class GradientBackendHandler
- : Backend, IGradientBackendHandler
+ public class WpfGradientBackendHandler
+ : GradientBackendHandler
{
- public object CreateLinear (double x0, double y0, double x1, double y1)
- {
- return new LinearGradient (
- new PointF ((float) x0, (float) y0),
- new PointF ((float) x1, (float) y1));
- }
-
- public object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
- {
- return new RadialGradient (cx0, cy0, radius0, cx1, cy1, radius1);
- }
-
- public void AddColorStop (object backend, double position, Color color)
+ public override object CreateLinear (double x0, double y0, double x1, double y1)
{
- ((GradientBase)backend).ColorStops.Add (new Tuple<double, Color> (position, color));
+ return new LinearGradientBrush () {
+ StartPoint = new SW.Point (x0, y0),
+ EndPoint = new SW.Point (x1, y1),
+ MappingMode = BrushMappingMode.Absolute
+ };
}
- }
-
- internal class RadialGradient
- : GradientBase
- {
- GraphicsPath path;
- double cx0, cy0, r0;
- double cx1, cy1, r1;
- public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
+ public override void Dispose (object backend)
{
- this.cx0 = cx0;
- this.cy0 = cy0;
- this.r0 = radius0;
-
- this.cx1 = cx1;
- this.cy1 = cy1;
- this.r1 = radius1;
}
- public override Brush CreateBrush ()
+ public override object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
{
- var path = new GraphicsPath ();
- path.AddEllipse (new RectangleF ((float)(cx0 - r0), (float)(cy0 - r0), (float)(r0 * 2), (float)(r0 * 2)));
-
- var brush = new PathGradientBrush (path);
-
- var orderedStops = ColorStops.OrderBy (t => t.Item1).ToArray ();
- var colors = orderedStops.Select (i => i.Item2.ToDrawingColor ()).ToArray ();
- var stops = orderedStops.Select (i => (float) (i.Item1)).ToArray ();
-
- brush.InterpolationColors = new ColorBlend (colors.Length) {
- Colors = colors,
- Positions = stops
+ return new RadialGradientBrush () {
+ GradientOrigin = new SW.Point (cx0, cy0),
+ Center = new SW.Point (cx1, cy1),
+ RadiusX = radius1,
+ RadiusY = radius1,
+ MappingMode = BrushMappingMode.Absolute
};
- return brush;
}
- }
- internal class LinearGradient
- : GradientBase
- {
- public LinearGradient (PointF start, PointF end)
+ public override void AddColorStop (object backend, double position, Color color)
{
- Start = start;
- End = end;
+ ((GradientBrush)backend).GradientStops.Add (new GradientStop (color.ToWpfColor (), position));
}
-
- public override System.Drawing.Brush CreateBrush ()
- {
- if (ColorStops.Count == 0)
- throw new ArgumentException ();
-
- var stops = ColorStops.OrderBy (t => t.Item1).ToArray ();
- var first = stops[0];
- var last = stops[stops.Length - 1];
-
- var brush = new System.Drawing.Drawing2D.LinearGradientBrush (Start, End, first.Item2.ToDrawingColor (),
- last.Item2.ToDrawingColor ());
- return brush;
-
- }
- internal readonly PointF Start;
- internal readonly PointF End;
- }
-
- internal abstract class GradientBase
- {
- internal readonly List<Tuple<double, Color>> ColorStops = new List<Tuple<double, Color>> ();
- public abstract Brush CreateBrush ();
}
-}
\ No newline at end of file
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageBuilderBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageBuilderBackendHandler.cs
index 60fe8a4..bcdb710 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageBuilderBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageBuilderBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// ImageBuilderBackendHandler.cs
//
// Author:
@@ -24,35 +24,52 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System.Drawing;
using Xwt.Backends;
using Xwt.Drawing;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
namespace Xwt.WPFBackend
{
- public class ImageBuilderBackendHandler
- : IImageBuilderBackendHandler
+ public class WpfImageBuilderBackendHandler
+ : ImageBuilderBackendHandler
{
- public object CreateImageBuilder (int width, int height, ImageFormat format)
+ class ImageBuilder: DrawingVisual
+ {
+ public int Width;
+ public int Height;
+ public DrawingContext Context;
+ }
+
+ public override object CreateImageBuilder (int width, int height, ImageFormat format)
{
- return new Bitmap (width, height, format.ToPixelFormat ());
+ return new ImageBuilder () {
+ Width = width,
+ Height = height
+ };
}
- public object CreateContext (object backend)
+ public override object CreateContext (object backend)
{
- Bitmap bmp = (Bitmap) backend;
- return new DrawingContext (Graphics.FromImage (bmp));
+ var visual = (ImageBuilder)backend;
+ visual.Context = new DrawingContext (visual.RenderOpen (), visual.GetScaleFactor ());
+ return visual.Context;
}
- public object CreateImage (object backend)
+ public override object CreateImage (object backend)
{
- return DataConverter.AsImageSource (backend);
+ var visual = (ImageBuilder)backend;
+ var ratios = visual.GetPixelRatios ();
+ visual.Context.Dispose ();
+ var bmp = new RenderTargetBitmap (visual.Width, visual.Height, ratios.Height * 96, ratios.Width * 96, PixelFormats.Pbgra32);
+ bmp.Render(visual);
+ return new WpfImage (bmp);
}
- public void Dispose (object backend)
+ public override void Dispose (object backend)
{
- Bitmap bmp = (Bitmap) backend;
- bmp.Dispose();
+ var bmp = (ImageBuilder)backend;
+ bmp.Context.Dispose ();
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageHandler.cs
index 2c798c4..2aa6b2b 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// ImageHandler.cs
//
// Author:
@@ -27,17 +27,16 @@
// THE SOFTWARE.
using System;
-using System.Drawing;
-using System.Drawing.Imaging;
using System.IO;
+using System.Linq;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Xwt.Backends;
using Xwt.WPFBackend.Interop;
-using Color = System.Drawing.Color;
using SWM = System.Windows.Media;
using SWMI = System.Windows.Media.Imaging;
+using System.Collections.Generic;
namespace Xwt.WPFBackend
{
@@ -51,66 +50,144 @@ namespace Xwt.WPFBackend
img.StreamSource = stream;
img.EndInit();
- return img;
+ var bmp = img as BitmapSource;
+ if (bmp != null && (bmp.DpiX != 96 || bmp.DpiY != 96))
+ return new WpfImage (ConvertBitmapTo96DPI (bmp));
+
+ return new WpfImage (img);
}
- public override object LoadFromIcon (string id, IconSize size)
+ public static BitmapSource ConvertBitmapTo96DPI (BitmapSource bitmapImage)
{
- if (Environment.OSVersion.Version.Major <= 5)
- throw new NotImplementedException();
+ double dpi = 96;
+ int width = bitmapImage.PixelWidth;
+ int height = bitmapImage.PixelHeight;
+
+ int stride = width * (bitmapImage.Format.BitsPerPixel + 7) / 8;
+ byte[] pixelData = new byte[stride * height];
+ bitmapImage.CopyPixels (pixelData, stride, 0);
+
+ return BitmapSource.Create (width, height, dpi, dpi, bitmapImage.Format, null, pixelData, stride);
+ }
+
+ public override object CreateCustomDrawn (ImageDrawCallback drawCallback)
+ {
+ return new WpfImage (drawCallback);
+ }
+
+ public override object CreateMultiResolutionImage (System.Collections.Generic.IEnumerable<object> images)
+ {
+ var refImg = (WpfImage)images.First ();
+ var f = refImg.Frames[0];
+ var frames = images.Cast<WpfImage> ().Select (img => new WpfImage.ImageFrame (img.Frames[0].ImageSource, f.Width, f.Height));
+ return new WpfImage (frames);
+ }
+
+ public override object CreateMultiSizeIcon (IEnumerable<object> images)
+ {
+ return new WpfImage (images.Cast<WpfImage> ().SelectMany (i => i.Frames));
+ }
+
+ public override void SaveToStream (object backend, Stream stream, Drawing.ImageFileType fileType)
+ {
+ var image = DataConverter.AsImageSource(backend) as BitmapSource;
+ BitmapEncoder encoder;
+ switch (fileType) {
+ case Drawing.ImageFileType.Png: encoder = new PngBitmapEncoder (); break;
+ case Drawing.ImageFileType.Jpeg: encoder = new JpegBitmapEncoder (); break;
+ case Drawing.ImageFileType.Bmp: encoder = new BmpBitmapEncoder (); break;
+ default: throw new NotSupportedException ("Image format not supported");
+ }
+ encoder.Frames.Add (BitmapFrame.Create (image));
+ encoder.Save (stream);
+ }
- var options = GetNativeStockOptionsFromSize (size);
+ public override Drawing.Image GetStockIcon (string id)
+ {
+ var img1 = RenderStockIcon (id, NativeStockIconOptions.Small);
+ var img2 = RenderStockIcon (id, NativeStockIconOptions.Large);
+ var img3 = RenderStockIcon (id, NativeStockIconOptions.ShellSize);
+ var img4 = RenderStockIcon (id, default (NativeStockIconOptions));
+
+ return ApplicationContext.Toolkit.WrapImage (CreateMultiSizeIcon (new object[] { img1, img2, img3, img4 }));
+ }
+
+ object RenderStockIcon (string id, NativeStockIconOptions options)
+ {
+ if (Environment.OSVersion.Version.Major <= 5)
+ throw new NotImplementedException ();
switch (id) {
- case StockIcons.Add:
+ case StockIconId.Add:
using (var s = typeof (ImageHandler).Assembly.GetManifestResourceStream ("Xwt.WPF.icons.list-add.png"))
return LoadFromStream (s);
+ case StockIconId.Remove:
+ using (var s = typeof (ImageHandler).Assembly.GetManifestResourceStream ("Xwt.WPF.icons.list-remove.png"))
+ return LoadFromStream (s);
+
+ case StockIconId.Error:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Error, options));
+ case StockIconId.Information:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Info, options));
+ case StockIconId.OrientationLandscape:
+ case StockIconId.OrientationPortrait:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Help, options));
//throw new NotImplementedException();
- case StockIcons.Error:
- return NativeMethods.GetImage (NativeStockIcon.Error, options);
- case StockIcons.Information:
- return NativeMethods.GetImage (NativeStockIcon.Info, options);
- case StockIcons.OrientationLandscape:
- case StockIcons.OrientationPortrait:
- return NativeMethods.GetImage (NativeStockIcon.Help, options);
- //throw new NotImplementedException();
- case StockIcons.Question:
- return NativeMethods.GetImage (NativeStockIcon.Help, options);
- case StockIcons.Remove:
- using (var s = typeof (ImageHandler).Assembly.GetManifestResourceStream ("Xwt.WPF.icons.list-remove.png"))
- return LoadFromStream (s);
- case StockIcons.Warning:
- return NativeMethods.GetImage (NativeStockIcon.Warning, options);
- case StockIcons.Zoom100:
- case StockIcons.ZoomFit:
- case StockIcons.ZoomIn:
- case StockIcons.ZoomOut:
- return NativeMethods.GetImage (NativeStockIcon.Find, options);
+ case StockIconId.Question:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Help, options));
+ case StockIconId.Warning:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Warning, options));
+ case StockIconId.Zoom100:
+ case StockIconId.ZoomFit:
+ case StockIconId.ZoomIn:
+ case StockIconId.ZoomOut:
+ return new WpfImage (NativeMethods.GetImage (NativeStockIcon.Find, options));
- default:
- throw new ArgumentException ("Unknown icon id", "id");
+ default:
+ throw new ArgumentException ("Unknown icon id", "id");
}
}
- public override Xwt.Drawing.Color GetPixel (object handle, int x, int y)
+ public override Xwt.Drawing.Color GetBitmapPixel (object handle, int x, int y)
{
- throw new NotImplementedException ();
- }
+ var wpfImage = (WpfImage)handle;
+ BitmapSource img = wpfImage.MainFrame as BitmapSource;
+ if (img == null)
+ throw new NotSupportedException ("Invalid image format");
+ if (img.Format.BitsPerPixel != 32)
+ throw new NotSupportedException ("Image format not supported");
- public override void SetPixel (object handle, int x, int y, Drawing.Color color)
- {
- throw new NotImplementedException ();
+ wpfImage.AllocatePixelData ();
+ var offset = wpfImage.GetPixelOffset (x, y);
+ return Xwt.Drawing.Color.FromBytes (wpfImage.PixelData[offset + 2], wpfImage.PixelData[offset + 1], wpfImage.PixelData[offset], wpfImage.PixelData[offset + 3]);
}
- private static NativeStockIconOptions GetNativeStockOptionsFromSize (IconSize size)
+ public override void SetBitmapPixel (object handle, int x, int y, Drawing.Color color)
{
- switch (size) {
- case IconSize.Small:
- return NativeStockIconOptions.Small;
+ var wpfImage = (WpfImage)handle;
+ var img = (BitmapSource)wpfImage.MainFrame;
+ if (img == null)
+ throw new NotSupportedException ("Invalid image format");
+ if (img.Format.BitsPerPixel != 32)
+ throw new NotSupportedException ("Image format not supported");
- default:
- return NativeStockIconOptions.Large;
+ var bitmapImage = img as WriteableBitmap;
+
+ if (!(bitmapImage is WriteableBitmap)) {
+ bitmapImage = new WriteableBitmap (img);
+ ((WpfImage)handle).MainFrame = bitmapImage;
}
+
+ wpfImage.AllocatePixelData ();
+ var offset = wpfImage.GetPixelOffset (x, y);
+ wpfImage.PixelData[offset] = (byte)(color.Blue * 255);
+ wpfImage.PixelData[offset + 1] = (byte)(color.Green * 255);
+ wpfImage.PixelData[offset + 2] = (byte)(color.Red * 255);
+ wpfImage.PixelData[offset + 3] = (byte)(color.Alpha * 255);
+
+ bitmapImage.Lock ();
+ bitmapImage.WritePixels (new Int32Rect (x, y, 1, 1), wpfImage.PixelData, wpfImage.Stride, offset);
+ bitmapImage.Unlock ();
}
private static double WidthToDPI (SWMI.BitmapSource img, double pixels)
@@ -123,30 +200,65 @@ namespace Xwt.WPFBackend
return pixels * 96 / img.DpiY;
}
- public override Size GetSize (object handle)
+ public static double WidthToPixels (ImageSource img)
{
- BitmapSource source = handle as BitmapSource;
- if (source != null)
- return new Size (source.PixelWidth, source.PixelHeight);
+ if (img is SWMI.BitmapSource) {
+ var bs = (BitmapSource)img;
+ return (bs.DpiX * bs.Width) / 96;
+ }
+ else
+ return img.Width;
+ }
- Bitmap bitmp = handle as Bitmap;
- if (bitmp != null)
- return new Size (bitmp.Width, bitmp.Height);
+ public static double HeightToPixels (ImageSource img)
+ {
+ if (img is SWMI.BitmapSource) {
+ var bs = (BitmapSource)img;
+ return (bs.DpiY * bs.Height) / 96;
+ }
+ else
+ return img.Height;
+ }
+
+ public override object ConvertToBitmap (object img, int width, int height, Xwt.Drawing.ImageFormat format)
+ {
+ var wpfImage = (WpfImage)img;
+ return new WpfImage (wpfImage.GetBestFrame (ApplicationContext, 1, width, height, true));
+ }
- throw new ArgumentException();
+ public override bool HasMultipleSizes (object handle)
+ {
+ return false;
}
- public override object Resize (object handle, double width, double height)
+ public override bool IsBitmap (object handle)
{
- var oldImg = (SWMI.BitmapSource)handle;
+ return true;
+ }
- width = WidthToDPI (oldImg, width);
- height = HeightToDPI (oldImg, height);
+ public override Size GetSize (object handle)
+ {
+ var source = (WpfImage) handle;
+ return source.Size;
+ }
+
+ public override object CopyBitmap (object handle)
+ {
+ return new WpfImage (((SWMI.BitmapSource)DataConverter.AsImageSource (handle)).Clone ());
+ }
+
+ public override object CropBitmap(object handle, int srcX, int srcY, int w, int h)
+ {
+ var oldImg = (SWMI.BitmapSource)DataConverter.AsImageSource (handle);
+
+ double width = WidthToDPI (oldImg, w);
+ double height = HeightToDPI (oldImg, h);
SWM.DrawingVisual visual = new SWM.DrawingVisual ();
using (SWM.DrawingContext ctx = visual.RenderOpen ())
{
- ctx.DrawImage (oldImg, new System.Windows.Rect (0, 0, width, height));
+ //Not sure whether this actually works, untested
+ ctx.DrawImage(oldImg, new System.Windows.Rect (-srcX, -srcY, srcX+width, srcY+height));
}
SWMI.RenderTargetBitmap bmp = new SWMI.RenderTargetBitmap ((int)width, (int)height, oldImg.DpiX, oldImg.DpiY, PixelFormats.Pbgra32);
@@ -155,46 +267,250 @@ namespace Xwt.WPFBackend
return bmp;
}
- public override object Copy (object handle)
+ public override void CopyBitmapArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY)
{
- return ((SWMI.BitmapSource)handle).Clone ();
+ throw new NotImplementedException ();
}
+ }
- public override object Crop(object handle, int srcX, int srcY, int w, int h)
+ class WpfImage
+ {
+ public class ImageFrame
{
- var oldImg = (SWMI.BitmapSource)handle;
+ public ImageSource ImageSource { get; set; }
+ public double Width { get; private set; }
+ public double Height { get; private set; }
+ public double Scale { get; set; }
+ public ImageFrame (ImageSource pix)
+ {
+ ImageSource = pix;
+ Width = pix.Width;
+ Height = pix.Height;
+ Scale = 1;
+ }
+ public ImageFrame (ImageSource pix, double width, double height)
+ {
+ ImageSource = pix;
+ Width = width;
+ Height = height;
+ Scale = pix.Width / width;
+ }
+ public void Dispose ()
+ {
+ }
+ }
- double width = WidthToDPI (oldImg, w);
- double height = HeightToDPI (oldImg, h);
+ ImageDrawCallback drawCallback;
+
+ public byte[] PixelData;
+ public int Stride;
+ public bool PixelWritePending;
+
+ ImageFrame[] frames;
+
+ public WpfImage (ImageSource image)
+ {
+ if (image is BitmapFrame)
+ this.frames = ((BitmapFrame)image).Decoder.Frames.Select (f => new ImageFrame (f)).ToArray ();
+ else
+ this.frames = new ImageFrame[] { new ImageFrame (image) };
+ }
+
+ public WpfImage (IEnumerable<ImageSource> images)
+ {
+ this.frames = images.Select (f => new ImageFrame (f)).ToArray ();
+ }
+
+ public WpfImage (IEnumerable<ImageFrame> frames)
+ {
+ this.frames = frames.ToArray ();
+ }
+
+ public WpfImage (ImageDrawCallback drawCallback)
+ {
+ this.drawCallback = drawCallback;
+ }
+
+ public ImageFrame[] Frames
+ {
+ get { return frames; }
+ }
+
+ public ImageSource MainFrame
+ {
+ get { return frames[0].ImageSource; }
+ set { frames[0].ImageSource = value; }
+ }
+
+ public bool HasMultipleSizes
+ {
+ get { return frames != null && frames.Length> 1 || drawCallback != null; }
+ }
+ public Size Size {
+ get { return frames.Length > 0 ? new Size (frames[0].Width, frames[0].Height) : Size.Zero; }
+ }
+
+ public int GetPixelOffset (int x, int y)
+ {
+ if (frames.Length == 0)
+ throw new NotSupportedException ();
+ BitmapSource img = frames[0].ImageSource as BitmapSource;
+ return y * Stride + x * ((img.Format.BitsPerPixel + 7) / 8);
+ }
+
+ public void AllocatePixelData ()
+ {
+ if (PixelData == null) {
+ BitmapSource img = frames[0].ImageSource as BitmapSource;
+ var height = (int) ImageHandler.HeightToPixels (img);
+ var width = (int) ImageHandler.WidthToPixels (img);
+ Stride = (width * img.Format.BitsPerPixel + 7) / 8;
+ PixelData = new byte[height * Stride];
+ img.CopyPixels (PixelData, Stride, 0);
+ }
+ }
+
+ ImageSource FindFrame (double width, double height, double scaleFactor)
+ {
+ if (frames == null)
+ return null;
+ if (frames.Length == 1)
+ return frames[0].ImageSource;
+
+ ImageSource best = null;
+ int bestSizeMatch = 0;
+ double bestResolutionMatch = 0;
+
+ foreach (var f in frames) {
+ int sizeMatch;
+ if (f.Width == width && f.Height == height) {
+ if (f.Scale == scaleFactor)
+ return f.ImageSource; // Exact match
+ sizeMatch = 2; // Exact size
+ }
+ else if (f.Width >= width && f.Height >= height)
+ sizeMatch = 1; // Bigger size
+ else
+ sizeMatch = 0; // Smaller size
+
+ var resolutionMatch = ((double)f.ImageSource.Width * (double)f.ImageSource.Height) / ((double)width * (double)height * scaleFactor);
+
+ if (best == null ||
+ (bestResolutionMatch < 1 && resolutionMatch > bestResolutionMatch) ||
+ (bestResolutionMatch >= 1 && resolutionMatch >= 1 && resolutionMatch <= bestResolutionMatch && (sizeMatch >= bestSizeMatch))) {
+ best = f.ImageSource;
+ bestSizeMatch = sizeMatch;
+ bestResolutionMatch = resolutionMatch;
+ }
+ }
+
+ return best;
+ }
+
+ public ImageSource GetBestFrame (ApplicationContext actx, Visual w, double width, double height, bool forceExactSize)
+ {
+ return GetBestFrame (actx, w.GetScaleFactor (), width, height, forceExactSize);
+ }
+
+ public ImageSource GetBestFrame (ApplicationContext actx, double scaleFactor, double width, double height, bool forceExactSize)
+ {
+ var f = FindFrame (width, height, scaleFactor);
+ if (f == null || (forceExactSize && (f.Width != (int)width || f.Height != (int)height)))
+ return RenderFrame (actx, scaleFactor, width, height);
+ else
+ return f;
+ }
+
+ ImageSource RenderFrame (ApplicationContext actx, double scaleFactor, double width, double height)
+ {
+ ImageDescription idesc = new ImageDescription () {
+ Alpha = 1,
+ Size = new Size (width * scaleFactor, height * scaleFactor)
+ };
SWM.DrawingVisual visual = new SWM.DrawingVisual ();
- using (SWM.DrawingContext ctx = visual.RenderOpen ())
- {
- //Not sure whether this actually works, untested
- ctx.DrawImage(oldImg, new System.Windows.Rect (-srcX, -srcY, srcX+width, srcY+height));
+ using (SWM.DrawingContext ctx = visual.RenderOpen ()) {
+ Draw (actx, ctx, 1, 0, 0, idesc);
}
- SWMI.RenderTargetBitmap bmp = new SWMI.RenderTargetBitmap ((int)width, (int)height, oldImg.DpiX, oldImg.DpiY, PixelFormats.Pbgra32);
+ SWMI.RenderTargetBitmap bmp = new SWMI.RenderTargetBitmap ((int)idesc.Size.Width, (int)idesc.Size.Height, 96, 96, PixelFormats.Pbgra32);
bmp.Render (visual);
+ var f = new ImageFrame (bmp, width, height);
+ AddFrame (f);
return bmp;
}
- public override object ChangeOpacity (object backend, double opacity)
+ void AddFrame (ImageFrame frame)
{
- Bitmap bitmap = DataConverter.AsBitmap (backend);
- if (bitmap == null)
- throw new ArgumentException ();
- Bitmap result = new Bitmap (bitmap.Width, bitmap.Height, bitmap.PixelFormat);
- Graphics g = Graphics.FromImage (result);
- ContextBackendHandler.DrawImageCore (g, bitmap, 0, 0, bitmap.Width, bitmap.Height, (float)opacity);
- g.Dispose ();
- return result;
+ if (frames == null)
+ frames = new ImageFrame[] { frame };
+ else {
+ Array.Resize (ref frames, frames.Length + 1);
+ frames[frames.Length - 1] = frame;
+ }
}
- public override void CopyArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY)
+ public void Draw (ApplicationContext actx, SWM.DrawingContext dc, double scaleFactor, double x, double y, ImageDescription idesc)
{
- throw new NotImplementedException ();
+ if (drawCallback != null) {
+ DrawingContext c = new DrawingContext (dc, scaleFactor);
+ actx.InvokeUserCode (delegate {
+ drawCallback (c, new Rectangle (x, y, idesc.Size.Width, idesc.Size.Height));
+ });
+ }
+ else {
+ if (idesc.Alpha < 1)
+ dc.PushOpacity (idesc.Alpha);
+
+ var f = GetBestFrame (actx, scaleFactor, idesc.Size.Width, idesc.Size.Height, false);
+ dc.DrawImage (f, new Rect (x, y, idesc.Size.Width, idesc.Size.Height));
+
+ if (idesc.Alpha < 1)
+ dc.Pop ();
+ }
+ }
+ }
+
+ public class ImageBox : System.Windows.Controls.Canvas
+ {
+ ApplicationContext actx;
+
+ public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register ("ImageSource", typeof (ImageDescription), typeof (ImageBox), new PropertyMetadata (ImageDescription.Null));
+
+ public ImageBox ()
+ {
+ this.actx = ToolkitEngineBackend.GetToolkitBackend<WPFEngine> ().ApplicationContext;
+ }
+
+ public ImageBox (ApplicationContext actx)
+ {
+ this.actx = actx;
+ }
+
+ protected override void OnRender (System.Windows.Media.DrawingContext dc)
+ {
+ var image = ImageSource;
+ if (!image.IsNull) {
+ var x = (RenderSize.Width - image.Size.Width) / 2;
+ var y = (RenderSize.Height - image.Size.Height) / 2;
+ ((WpfImage)image.Backend).Draw (actx, dc, this.GetScaleFactor (), x, y, image);
+ }
+ }
+
+ public ImageDescription ImageSource
+ {
+ get { return (ImageDescription)this.GetValue (ImageSourceProperty); }
+ set { SetValue (ImageSourceProperty, value); }
+ }
+
+ protected override System.Windows.Size MeasureOverride (System.Windows.Size constraint)
+ {
+ var image = ImageSource;
+ if (!image.IsNull)
+ return new System.Windows.Size (image.Size.Width, image.Size.Height);
+ else
+ return new System.Windows.Size (0, 0);
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImagePatternBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImagePatternBackendHandler.cs
index f6f0e0b..8449b19 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImagePatternBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImagePatternBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// ImagePatternBackendHandler.cs
//
// Author:
@@ -26,17 +26,54 @@
using System;
using Xwt.Backends;
-using System.Drawing;
+using System.Windows.Media;
namespace Xwt.WPFBackend
{
- public class ImagePatternBackendHandler
- : IImagePatternBackendHandler
+ public class WpfImagePatternBackendHandler
+ : ImagePatternBackendHandler
{
- public object Create (object img)
+ public override object Create (ImageDescription img)
+ {
+ return new ImagePattern (ApplicationContext, img);
+ }
+
+ public override void Dispose (object img)
+ {
+ }
+ }
+
+ class ImagePattern
+ {
+ ApplicationContext actx;
+ ImageDescription image;
+ double scaleFactor;
+ ImageBrush brush;
+
+ public ImagePattern (ApplicationContext actx, ImageDescription im)
+ {
+ this.actx = actx;
+ this.image = im;
+ }
+
+ public ImageBrush GetBrush (double scaleFactor)
{
- Bitmap bmp = DataConverter.AsBitmap (img);
- return new TextureBrush (bmp, System.Drawing.Drawing2D.WrapMode.Tile);
+ if (brush == null || scaleFactor != this.scaleFactor) {
+ this.scaleFactor = scaleFactor;
+ var ib = (WpfImage)image.Backend;
+ var bmp = ib.GetBestFrame (actx, scaleFactor, image.Size.Width, image.Size.Height, true);
+ brush = new ImageBrush (bmp) {
+ TileMode = TileMode.Tile,
+ ViewportUnits = BrushMappingMode.Absolute,
+ AlignmentY = System.Windows.Media.AlignmentY.Top,
+ AlignmentX = System.Windows.Media.AlignmentX.Left,
+ Stretch = System.Windows.Media.Stretch.None,
+ Viewport = new System.Windows.Rect (0, 0, image.Size.Width * scaleFactor, image.Size.Height * scaleFactor),
+ Opacity = image.Alpha
+ };
+ brush.RelativeTransform = new ScaleTransform (1d/scaleFactor, 1d/scaleFactor);
+ }
+ return brush;
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageViewBackend.cs
index eb0746e..905212d 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageViewBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ImageViewBackend.cs
@@ -25,7 +25,6 @@
// THE SOFTWARE.
using System;
-using System.Drawing;
using System.Windows.Media;
using Xwt.Backends;
using Image = System.Windows.Controls.Image;
@@ -37,25 +36,22 @@ namespace Xwt.WPFBackend
{
public ImageViewBackend()
{
- Widget = new Image ();
}
- public void SetImage (object nativeImage)
+ protected override void Initialize ()
{
- if (nativeImage == null)
- throw new ArgumentNullException ("nativeImage");
-
- ImageSource source = DataConverter.AsImageSource (nativeImage);
-
- if (source == null)
- throw new ArgumentException ("nativeImage is not of the expected type", "nativeImage");
+ base.Initialize ();
+ Widget = new ImageBox (Context);
+ }
- Image.Source = source;
+ public void SetImage (ImageDescription image)
+ {
+ Image.ImageSource = image;
}
- protected Image Image
+ protected ImageBox Image
{
- get { return (Image) NativeWidget; }
+ get { return (ImageBox)NativeWidget; }
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/LabelBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/LabelBackend.cs
index 3f68abd..1918533 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/LabelBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/LabelBackend.cs
@@ -55,6 +55,10 @@ namespace Xwt.WPFBackend
}
}
+ public void SetFormattedText (FormattedText text)
+ {
+ }
+
public Xwt.Drawing.Color TextColor {
get {
SWM.Color color = SystemColors.ControlColor;
@@ -102,14 +106,6 @@ namespace Xwt.WPFBackend
Label.TextBlock.TextWrapping = TextWrapping.Wrap;
}
}
-
- public override WidgetSize GetPreferredWidth ()
- {
- if (Label.TextBlock.TextWrapping == TextWrapping.Wrap)
- return new WidgetSize (0);
- else
- return base.GetPreferredWidth ();
- }
}
class WpfLabel : SWC.Label, IWpfWidget
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/LinkLabelBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/LinkLabelBackend.cs
index 621b4e1..c2be1ca 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/LinkLabelBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/LinkLabelBackend.cs
@@ -68,6 +68,10 @@ namespace Xwt.WPFBackend
}
}
+ public void SetFormattedText(FormattedText text)
+ {
+ }
+
public Alignment TextAlignment
{
get { return DataConverter.ToXwtAlignment (Widget.HorizontalContentAlignment); }
@@ -124,7 +128,7 @@ namespace Xwt.WPFBackend
void HandleClicked (object sender, EventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (() => {
+ Context.InvokeUserCode (() => {
EventSink.OnNavigateToUrl (Uri);
});
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListBoxBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListBoxBackend.cs
index 2a7397a..f5dc6cb 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListBoxBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListBoxBackend.cs
@@ -116,9 +116,9 @@ namespace Xwt.WPFBackend
public override void EnableEvent (object eventId)
{
base.EnableEvent (eventId);
- if (eventId is ListBoxEvent) {
- switch ((ListBoxEvent)eventId) {
- case ListBoxEvent.SelectionChanged:
+ if (eventId is TableViewEvent) {
+ switch ((TableViewEvent)eventId) {
+ case TableViewEvent.SelectionChanged:
ListBox.SelectionChanged += OnSelectionChanged;
break;
}
@@ -128,9 +128,9 @@ namespace Xwt.WPFBackend
public override void DisableEvent (object eventId)
{
base.DisableEvent (eventId);
- if (eventId is ListBoxEvent) {
- switch ((ListBoxEvent)eventId) {
- case ListBoxEvent.SelectionChanged:
+ if (eventId is TableViewEvent) {
+ switch ((TableViewEvent)eventId) {
+ case TableViewEvent.SelectionChanged:
ListBox.SelectionChanged -= OnSelectionChanged;
break;
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs
index 45d5882..9a271d0 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ListViewBackend.cs
@@ -29,7 +29,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
-using Xwt.Engine;
+
using Xwt.WPFBackend.Utilities;
using SWC = System.Windows.Controls;
using Xwt.Backends;
@@ -198,7 +198,7 @@ namespace Xwt.WPFBackend
private void OnSelectionChanged (object sender, SelectionChangedEventArgs e)
{
- Toolkit.Invoke (ListViewEventSink.OnSelectionChanged);
+ Context.InvokeUserCode (ListViewEventSink.OnSelectionChanged);
}
private bool headersVisible;
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuBackend.cs
index f097360..5596538 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuBackend.cs
@@ -37,12 +37,13 @@ using Xwt.Backends;
namespace Xwt.WPFBackend
{
- public class MenuBackend : IMenuBackend
+ public class MenuBackend : Backend, IMenuBackend
{
List<MenuItemBackend> items;
- public void InitializeBackend (object frontend)
+ public override void InitializeBackend (object frontend, ApplicationContext context)
{
+ base.InitializeBackend (frontend, context);
items = new List<MenuItemBackend> ();
}
@@ -122,14 +123,6 @@ namespace Xwt.WPFBackend
menu.IsOpen = true;
}
- public void EnableEvent (object eventId)
- {
- }
-
- public void DisableEvent (object eventId)
- {
- }
-
private ContextMenu menu;
internal ContextMenu CreateContextMenu()
{
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuButtonBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuButtonBackend.cs
index 93b8176..1daefe5 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuButtonBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuButtonBackend.cs
@@ -27,7 +27,7 @@
using System;
using System.Windows;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
@@ -65,7 +65,7 @@ namespace Xwt.WPFBackend
private void OnMenuOpening (object sender, DropDownButton.MenuOpeningEventArgs e)
{
- Toolkit.Invoke (() =>
+ Context.InvokeUserCode (() =>
e.ContextMenu = ((MenuBackend) MenuButtonEventSink.OnCreateMenu ()).CreateContextMenu ());
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuItemBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuItemBackend.cs
index d7a856e..20792c2 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuItemBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/MenuItemBackend.cs
@@ -34,11 +34,11 @@ using System.Windows;
using SWC = System.Windows.Controls;
using SWMI = System.Windows.Media.Imaging;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
- public class MenuItemBackend : IMenuItemBackend
+ public class MenuItemBackend : Backend, IMenuItemBackend
{
object item;
SWC.MenuItem menuItem;
@@ -62,10 +62,6 @@ namespace Xwt.WPFBackend
this.eventSink = eventSink;
}
- public void InitializeBackend (object frontend)
- {
- }
-
public object Item {
get { return this.item; }
}
@@ -102,20 +98,12 @@ namespace Xwt.WPFBackend
set { this.menuItem.Visibility = (value) ? Visibility.Visible : Visibility.Collapsed; }
}
- public void SetImage (object imageBackend)
+ public void SetImage (ImageDescription imageBackend)
{
- if (imageBackend == null)
+ if (imageBackend.IsNull)
this.menuItem.Icon = null;
else
- {
- var img = (SWMI.BitmapSource) imageBackend;
- this.menuItem.Icon = new System.Windows.Controls.Image
- {
- Source = img,
- Width = img.Width,
- Height = img.Height
- };
- }
+ this.menuItem.Icon = new ImageBox (Context) { ImageSource = imageBackend };
}
public void SetSubmenu (IMenuBackend menu)
@@ -155,7 +143,7 @@ namespace Xwt.WPFBackend
this.type = type;
}
- public void EnableEvent (object eventId)
+ public override void EnableEvent (object eventId)
{
if (menuItem == null)
return;
@@ -169,7 +157,7 @@ namespace Xwt.WPFBackend
}
}
- public void DisableEvent (object eventId)
+ public override void DisableEvent (object eventId)
{
if (menuItem == null)
return;
@@ -185,7 +173,7 @@ namespace Xwt.WPFBackend
void MenuItemClickHandler (object sender, EventArgs args)
{
- Toolkit.Invoke (eventSink.OnClicked);
+ Context.InvokeUserCode (eventSink.OnClicked);
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/NotebookBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/NotebookBackend.cs
index d6223cb..2dfb563 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/NotebookBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/NotebookBackend.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
-using Xwt.Engine;
+
using SWC = System.Windows.Controls;
using Xwt.Backends;
@@ -134,7 +134,7 @@ namespace Xwt.WPFBackend
private void OnCurrentTabChanged (object sender, SelectionChangedEventArgs e)
{
- Toolkit.Invoke (NotebookEventSink.OnCurrentTabChanged);
+ Context.InvokeUserCode (NotebookEventSink.OnCurrentTabChanged);
}
protected TabControl TabControl {
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/PanedBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/PanedBackend.cs
index 2563b75..a4d7207 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/PanedBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/PanedBackend.cs
@@ -31,7 +31,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using Xwt.Backends;
-using Xwt.Engine;
+
using Orientation = Xwt.Backends.Orientation;
using SW = System.Windows;
using SWC = System.Windows.Controls;
@@ -151,10 +151,9 @@ namespace Xwt.WPFBackend
public double Position
{
get {
- return position != -1 ? position * (direction == Orientation.Horizontal ? WidthPixelRatio : HeightPixelRatio) : 0;
+ return position != -1 ? position : 0;
}
set {
- value /= direction == Orientation.Horizontal ? WidthPixelRatio : HeightPixelRatio;
if (position != value) {
position = value;
NotifyPositionChanged ();
@@ -165,7 +164,7 @@ namespace Xwt.WPFBackend
internal void NotifyPositionChanged ()
{
if (this.reportPositionChanged)
- Toolkit.Invoke (((IPanedEventSink)EventSink).OnPositionChanged);
+ Context.InvokeUserCode (((IPanedEventSink)EventSink).OnPositionChanged);
}
PanelInfo GetPanel (int panel)
@@ -214,118 +213,34 @@ namespace Xwt.WPFBackend
UpdateSplitterVisibility ();
}
- public override WidgetSize GetPreferredWidth ()
- {
- if (panel1.HasWidget && panel2.HasWidget) {
- if (direction == Orientation.Horizontal) {
- var ws = panel1.WidgetSurface.GetPreferredWidth ();
- ws += panel2.WidgetSurface.GetPreferredWidth ();
- ws += SplitterSize;
- return ws;
- }
- else {
- var ws = panel1.WidgetSurface.GetPreferredWidth ();
- return ws.UnionWith (panel2.WidgetSurface.GetPreferredWidth ());
- }
- }
- else if (panel1.HasWidget)
- return panel1.WidgetSurface.GetPreferredWidth ();
- else if (panel2.HasWidget)
- return panel2.WidgetSurface.GetPreferredWidth ();
- else
- return new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredHeightForWidth (double width)
+ public override Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
if (panel1.HasWidget && panel2.HasWidget) {
- var tempPos = position;
- var availableWidth = width - SplitterSize;
+ double w, h;
if (direction == Orientation.Horizontal) {
- if (!panel1.Shrink) {
- var w1 = panel1.WidgetSurface.GetPreferredWidth ().MinSize;
- if (tempPos < w1)
- tempPos = w1;
- }
- if (!panel2.Shrink) {
- var w2 = panel2.WidgetSurface.GetPreferredWidth ().MinSize;
- if (availableWidth - tempPos < w2)
- tempPos = availableWidth - w2;
- }
- var ws = panel1.WidgetSurface.GetPreferredHeightForWidth (tempPos);
- ws = ws.UnionWith (panel2.WidgetSurface.GetPreferredHeightForWidth (availableWidth - tempPos));
- return ws;
- }
- else {
- var ws = panel1.WidgetSurface.GetPreferredHeightForWidth (width);
- ws = ws.UnionWith (panel2.WidgetSurface.GetPreferredHeightForWidth (width));
- ws += SplitterSize;
- return ws;
- }
- }
- else if (panel1.HasWidget)
- return panel1.WidgetSurface.GetPreferredHeightForWidth (width);
- else if (panel2.HasWidget)
- return panel2.WidgetSurface.GetPreferredHeightForWidth (width);
- else
- return new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredHeight ()
- {
- if (panel1.HasWidget && panel2.HasWidget) {
- if (direction == Orientation.Vertical) {
- var ws = panel1.WidgetSurface.GetPreferredHeight ();
- ws += panel2.WidgetSurface.GetPreferredHeight ();
- ws += SplitterSize;
- return ws;
- }
- else {
- var ws = panel1.WidgetSurface.GetPreferredHeight ();
- return ws.UnionWith (panel2.WidgetSurface.GetPreferredHeight ());
- }
- }
- else if (panel1.HasWidget)
- return panel1.WidgetSurface.GetPreferredHeight ();
- else if (panel2.HasWidget)
- return panel2.WidgetSurface.GetPreferredHeight ();
- else
- return new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredWidthForHeight (double width)
- {
- if (panel1.HasWidget && panel2.HasWidget) {
- var tempPos = position;
- var availableWidth = width - SplitterSize;
- if (direction == Orientation.Vertical) {
- if (!panel1.Shrink) {
- var w1 = panel1.WidgetSurface.GetPreferredHeight ().MinSize;
- if (tempPos < w1)
- tempPos = w1;
- }
- if (!panel2.Shrink) {
- var w2 = panel2.WidgetSurface.GetPreferredHeight ().MinSize;
- if (availableWidth - tempPos < w2)
- tempPos = availableWidth - w2;
- }
- var ws = panel1.WidgetSurface.GetPreferredWidthForHeight (tempPos);
- ws = ws.UnionWith (panel2.WidgetSurface.GetPreferredWidthForHeight (availableWidth - tempPos));
- return ws;
+ var s1 = panel1.WidgetSurface.GetPreferredSize (SizeConstraint.Unconstrained, heightConstraint);
+ var s2 = panel2.WidgetSurface.GetPreferredSize (SizeConstraint.Unconstrained, heightConstraint);
+ w = s1.Width + s2.Width + SplitterSize;
+ h = Math.Max (s1.Height, s2.Height);
}
else {
- var ws = panel1.WidgetSurface.GetPreferredWidthForHeight (width);
- ws = ws.UnionWith (panel2.WidgetSurface.GetPreferredWidthForHeight (width));
- ws += SplitterSize;
- return ws;
+ var s1 = panel1.WidgetSurface.GetPreferredSize (widthConstraint, SizeConstraint.Unconstrained);
+ var s2 = panel2.WidgetSurface.GetPreferredSize (widthConstraint, SizeConstraint.Unconstrained);
+ h = s1.Height + s2.Height + SplitterSize;
+ w = Math.Max (s1.Width, s2.Width);
}
+ if (widthConstraint.IsConstrained && w > widthConstraint.AvailableSize)
+ w = widthConstraint.AvailableSize;
+ if (heightConstraint.IsConstrained && h > heightConstraint.AvailableSize)
+ h = heightConstraint.AvailableSize;
+ return new Size (w, h);
}
else if (panel1.HasWidget)
- return panel1.WidgetSurface.GetPreferredWidthForHeight (width);
+ return panel1.WidgetSurface.GetPreferredSize (widthConstraint, heightConstraint);
else if (panel2.HasWidget)
- return panel2.WidgetSurface.GetPreferredWidthForHeight (width);
+ return panel2.WidgetSurface.GetPreferredSize (widthConstraint, heightConstraint);
else
- return new WidgetSize (0);
+ return Size.Zero;
}
internal void ArrangeChildren (SW.Size size)
@@ -349,19 +264,19 @@ namespace Xwt.WPFBackend
var oldPanel2Size = oldAvailableSize - position - SplitterSize;
position = availableSize - oldPanel2Size - SplitterSize;
}
- else if (!IsFixed (panel1))
+ else if (!IsFixed (panel1) && lastSize != 0)
position = availableSize * (position / oldAvailableSize);
}
if (!panel1.Shrink) {
var w = panel1.WidgetSurface;
- var min = direction == Orientation.Horizontal ? w.GetPreferredWidth ().MinSize: w.GetPreferredHeight ().MinSize;
+ var min = direction == Orientation.Horizontal ? w.GetPreferredSize ().Width: w.GetPreferredSize ().Height;
if (position < min)
position = min;
}
if (!panel2.Shrink) {
var w = panel2.WidgetSurface;
- var min = direction == Orientation.Horizontal ? w.GetPreferredWidth ().MinSize : w.GetPreferredHeight ().MinSize;
+ var min = direction == Orientation.Horizontal ? w.GetPreferredSize ().Width : w.GetPreferredSize ().Height;
if (availableSize - position < min) {
position = availableSize - min;
}
@@ -439,7 +354,7 @@ namespace Xwt.WPFBackend
// This line is hack to fix a measuring issue with Grid. For some reason, the grid 'remembers' the constraint
// parameter, so if MeasureOverride is called with a constraining size, but ArrangeOverride is later called
// with a bigger size, the Grid still uses the constrained size when determining the size of the children
- constraint = new SW.Size (double.PositiveInfinity, double.PositiveInfinity);
+ //constraint = new SW.Size (double.PositiveInfinity, double.PositiveInfinity);
var s = base.MeasureOverride (constraint);
return Backend.MeasureOverride (constraint, s);
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/PopoverBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/PopoverBackend.cs
index 40b1a5b..0852cf5 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/PopoverBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/PopoverBackend.cs
@@ -30,7 +30,7 @@ using System.Windows.Media;
namespace Xwt.WPFBackend
{
- public class PopoverBackend : IPopoverBackend
+ public class PopoverBackend : Backend, IPopoverBackend
{
public Xwt.Popover.Position ActualPosition {
get; set;
@@ -44,8 +44,8 @@ namespace Xwt.WPFBackend
get; set;
}
- Popover Frontend {
- get; set;
+ new Popover Frontend {
+ get { return (Popover)base.frontend; }
}
System.Windows.Controls.Primitives.Popup NativeWidget {
@@ -87,19 +87,14 @@ namespace Xwt.WPFBackend
EventSink = sink;
}
- public void InitializeBackend (object frontend)
- {
- Frontend = (Popover) frontend;
- }
-
- public void EnableEvent (object eventId)
+ public override void EnableEvent (object eventId)
{
if (eventId is PopoverEvent)
if ((PopoverEvent)eventId == PopoverEvent.Closed)
NativeWidget.Closed +=new EventHandler(NativeWidget_Closed);
}
- public void DisableEvent (object eventId)
+ public override void DisableEvent (object eventId)
{
if (eventId is PopoverEvent)
if ((PopoverEvent) eventId == PopoverEvent.Closed)
@@ -109,8 +104,8 @@ namespace Xwt.WPFBackend
public void Show (Xwt.Popover.Position orientation, Xwt.Widget reference, Xwt.Rectangle positionRect, Widget child)
{
ActualPosition = orientation;
- Border.Child = (System.Windows.FrameworkElement) Xwt.Engine.WidgetRegistry.GetNativeWidget (child);
- NativeWidget.PlacementTarget =(System.Windows.FrameworkElement) Xwt.Engine.WidgetRegistry.GetNativeWidget (reference);
+ Border.Child = (System.Windows.FrameworkElement)Context.Toolkit.GetNativeWidget (child);
+ NativeWidget.PlacementTarget = (System.Windows.FrameworkElement)Context.Toolkit.GetNativeWidget (reference);
NativeWidget.IsOpen = true;
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/RadioButtonBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/RadioButtonBackend.cs
new file mode 100644
index 0000000..dc163d7
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/RadioButtonBackend.cs
@@ -0,0 +1,194 @@
+//
+// RadioButtonBackend.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+//
+// 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.Windows;
+using System.Windows.Controls;
+using Xwt.Backends;
+
+using WindowsRadioButton = System.Windows.Controls.RadioButton;
+using System.Collections.Generic;
+
+namespace Xwt.WPFBackend
+{
+ public class RadioButtonBackend
+ : WidgetBackend, IRadioButtonBackend
+ {
+ public RadioButtonBackend()
+ {
+ Widget = new WindowsRadioButton();
+ RadioButton.GroupName = Guid.NewGuid().ToString();//Prevent WPF from managing RadioButton groups
+ RadioButton.IsChecked = true;//GTK has default true
+ }
+
+ public void SetContent(IWidgetBackend widget)
+ {
+ if (widget == null)
+ RadioButton.Content = null;
+ else
+ RadioButton.Content = widget.NativeWidget;
+ }
+
+ public void SetContent(string label)
+ {
+ RadioButton.Content = new TextBlock { Text = label };
+ }
+
+ public bool Active
+ {
+ get { return RadioButton.IsChecked.HasValue && RadioButton.IsChecked.Value; }
+ set { RadioButton.IsChecked = value; }
+ }
+
+ public override void EnableEvent(object eventId)
+ {
+ base.EnableEvent(eventId);
+ if (eventId is RadioButtonEvent)
+ {
+ switch ((RadioButtonEvent)eventId)
+ {
+ case RadioButtonEvent.Clicked:
+ RadioButton.Click += OnClicked;
+ break;
+ case RadioButtonEvent.ActiveChanged:
+ RadioButton.Checked += OnChecked;
+ RadioButton.Unchecked += OnChecked;
+ break;
+ }
+ }
+ }
+
+ public override void DisableEvent(object eventId)
+ {
+ base.DisableEvent(eventId);
+ if (eventId is RadioButtonEvent)
+ {
+ switch ((RadioButtonEvent)eventId)
+ {
+ case RadioButtonEvent.Clicked:
+ RadioButton.Click -= OnClicked;
+ break;
+ case RadioButtonEvent.ActiveChanged:
+ RadioButton.Checked -= OnChecked;
+ RadioButton.Unchecked -= OnChecked;
+ break;
+ }
+ }
+ }
+
+ private void OnChecked(object sender, RoutedEventArgs routedEventArgs)
+ {
+ Context.InvokeUserCode(RadioButtonEventSink.OnToggled);
+ }
+
+ private void OnClicked(object sender, RoutedEventArgs e)
+ {
+ Context.InvokeUserCode(RadioButtonEventSink.OnClicked);
+ }
+
+ protected IRadioButtonEventSink RadioButtonEventSink
+ {
+ get { return (IRadioButtonEventSink)EventSink; }
+ }
+
+ protected WindowsRadioButton RadioButton
+ {
+ get { return (WindowsRadioButton)Widget; }
+ }
+
+ public class WindowsRadioButtonGroup
+ {
+ List<WindowsRadioButton> items = new List<WindowsRadioButton>();
+ WindowsRadioButton activeRadioButton;
+
+ internal void Add(WindowsRadioButton r)
+ {
+ items.Add(r);
+ if (activeRadioButton == null && (r.IsChecked ?? false))
+ {
+ activeRadioButton = r;
+ }
+ else if (r.IsChecked ?? false)
+ {
+ r.IsChecked = false;
+ }
+ r.Checked += new RoutedEventHandler(r_Checked);
+ }
+
+ void r_Checked(object sender, RoutedEventArgs e)
+ {
+ var r = (WindowsRadioButton)sender;
+ if (r == activeRadioButton)
+ {
+ if (!(r.IsChecked ?? false))
+ activeRadioButton = null;
+ }
+ else
+ {
+ if (r.IsChecked ?? false)
+ if (activeRadioButton == null)
+ {
+ activeRadioButton = r;
+ }
+ else
+ {
+ activeRadioButton.IsChecked = false;
+ activeRadioButton = r;
+ }
+ }
+ }
+
+ internal void Remove(WindowsRadioButton r)
+ {
+ if (r == activeRadioButton)
+ activeRadioButton = null;
+ items.Remove(r);
+ r.Checked -= new RoutedEventHandler(r_Checked);
+ }
+ }
+
+ private WindowsRadioButtonGroup radioGroup = null;
+ public object Group
+ {
+ get
+ {
+ if (radioGroup == null)
+ {
+ radioGroup = new WindowsRadioButtonGroup();
+ radioGroup.Add(RadioButton);
+ }
+ return radioGroup;
+ }
+ set
+ {
+ if (radioGroup != null)
+ radioGroup.Remove(RadioButton);
+ radioGroup = (WindowsRadioButtonGroup)value;
+ if (radioGroup != null)
+ radioGroup.Add(RadioButton);
+ }
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
index 54aa366..13be8fa 100755
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
@@ -85,7 +85,7 @@ namespace Xwt.WPFBackend
void HyperlinkNavigated (object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (() => {
+ Context.InvokeUserCode (() => {
EventSink.OnNavigateToUrl (e.Uri);
e.Handled = true;
});
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SaveFileDialogBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SaveFileDialogBackend.cs
new file mode 100644
index 0000000..0e41f7a
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SaveFileDialogBackend.cs
@@ -0,0 +1,42 @@
+//
+// OpenFileDialogBackend.cs
+//
+// Author:
+// Eric Maupin <ermau at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin, Inc.
+//
+// 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.Collections.Generic;
+using Xwt.Backends;
+using WindowsSaveFileDialog = Microsoft.Win32.SaveFileDialog;
+
+namespace Xwt.WPFBackend
+{
+ public class SaveFileDialogBackend
+ : FileDialogBackend<WindowsSaveFileDialog>, ISaveFileDialogBackend
+ {
+ public override void Initialize (IEnumerable<FileDialogFilter> newFilters, bool multiselect, string initialFileName)
+ {
+ this.dialog = new WindowsSaveFileDialog();
+ base.Initialize (newFilters, initialFileName);
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollAdjustmentBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollAdjustmentBackend.cs
index f5ddb5c..034aa93 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollAdjustmentBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollAdjustmentBackend.cs
@@ -51,7 +51,7 @@ namespace Xwt.WPFBackend
{
// The offset is relative to 0, it has to be converted to the lower/upper value range
scrollValue = LowerValue + offset;
- Xwt.Engine.Toolkit.Invoke (EventSink.OnValueChanged);
+ Context.InvokeUserCode (EventSink.OnValueChanged);
}
public double Value
@@ -64,34 +64,43 @@ namespace Xwt.WPFBackend
}
}
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ this.lowerValue = lowerValue;
+ this.upperValue = upperValue;
+ this.pageSize = pageSize;
+ InvalidateExtent ();
+
+ this.pageIncrement = pageIncrement;
+ this.stepIncrement = stepIncrement;
+ InvalidateScrollInfo ();
+
+ Value = value;
+ }
+
public double LowerValue
{
get { return lowerValue; }
- set { lowerValue = value; InvalidateExtent (); }
}
public double UpperValue
{
get { return upperValue; }
- set { upperValue = value; InvalidateExtent (); }
}
public double PageIncrement
{
get { return pageIncrement; }
- set { pageIncrement = value; InvalidateScrollInfo (); }
}
public double StepIncrement
{
get { return stepIncrement; }
- set { stepIncrement = value; InvalidateScrollInfo (); }
}
public double PageSize
{
get { return pageSize; }
- set { pageSize = value; InvalidateExtent (); }
}
void InvalidateScrollInfo ()
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollViewBackend.cs
index 18bdcf9..0a76276 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollViewBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollViewBackend.cs
@@ -98,17 +98,19 @@ namespace Xwt.WPFBackend
if (child == null)
return;
+ SetChildPlacement (child);
ScrollAdjustmentBackend vbackend = null, hbackend = null;
var widget = (WidgetBackend)child;
-
if (widget.EventSink.SupportsCustomScrolling ()) {
vbackend = new ScrollAdjustmentBackend ();
hbackend = new ScrollAdjustmentBackend ();
- widget.EventSink.SetScrollAdjustments (hbackend, vbackend);
}
ScrollViewer.Content = new CustomScrollViewPort (widget.NativeWidget, vbackend, hbackend);
ScrollViewer.CanContentScroll = true;
+
+ if (vbackend != null)
+ widget.EventSink.SetScrollAdjustments (hbackend, vbackend);
}
public void SetChildSize (Size s)
@@ -120,12 +122,10 @@ namespace Xwt.WPFBackend
{
get
{
- double wratio = WidthPixelRatio;
- double hratio = HeightPixelRatio;
- return new Rectangle ( ScrollViewer.HorizontalOffset * hratio,
- ScrollViewer.VerticalOffset * hratio,
- ScrollViewer.ViewportWidth * wratio,
- ScrollViewer.ViewportHeight * hratio);
+ return new Rectangle ( ScrollViewer.HorizontalOffset,
+ ScrollViewer.VerticalOffset,
+ ScrollViewer.ViewportWidth,
+ ScrollViewer.ViewportHeight);
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollbarBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollbarBackend.cs
new file mode 100644
index 0000000..5979558
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ScrollbarBackend.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Xwt.Backends;
+using SWC = System.Windows.Controls;
+
+namespace Xwt.WPFBackend
+{
+ class ScrollbarBackend : WidgetBackend, IScrollbarBackend, IScrollAdjustmentBackend
+ {
+ IScrollAdjustmentEventSink eventSink;
+
+ #region IScrollbarBackend Members
+
+ public void Initialize (Orientation dir)
+ {
+ Widget = new System.Windows.Controls.Primitives.ScrollBar () {
+ Orientation = dir == Orientation.Horizontal ? SWC.Orientation.Horizontal : SWC.Orientation.Vertical
+ };
+ }
+
+ public IScrollAdjustmentBackend CreateAdjustment ()
+ {
+ return this;
+ }
+
+ protected SWC.Primitives.ScrollBar Scrollbar
+ {
+ get { return (SWC.Primitives.ScrollBar)Widget; }
+ }
+
+ #endregion
+
+ #region IScrollAdjustmentBackend Members
+
+ public void Initialize (IScrollAdjustmentEventSink eventSink)
+ {
+ }
+
+ public double Value
+ {
+ get
+ {
+ return Scrollbar.Value;
+ }
+ set
+ {
+ Scrollbar.Value = value;
+ }
+ }
+
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ Scrollbar.Minimum = lowerValue;
+ Scrollbar.Maximum = upperValue;
+ Scrollbar.ViewportSize = pageSize;
+ }
+
+ #endregion
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectColorDialogBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectColorDialogBackend.cs
new file mode 100644
index 0000000..b40f8f5
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectColorDialogBackend.cs
@@ -0,0 +1,108 @@
+//
+// SelectColorDialogBackend.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+//
+// 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.ComponentModel;
+using System.IO;
+using System.Windows.Forms;
+using System.Windows.Interop;
+using Xwt.Backends;
+using IWin32Window = System.Windows.Forms.IWin32Window;
+using Xwt.Drawing;
+using System.Runtime.InteropServices;
+
+namespace Xwt.WPFBackend
+{
+ public class SelectColorDialogBackend
+ : Backend, ISelectColorDialogBackend
+ {
+ private ColorDialogWithTitle dialog;
+
+ public SelectColorDialogBackend()
+ {
+ dialog = new ColorDialogWithTitle();
+ }
+
+ public bool Run(IWindowFrameBackend parent, string title, bool supportsAlpha)
+ {
+ //TODO: Support alpha + create custom WPF solution?
+ dialog.Title = title;
+ if (parent != null)
+ return (this.dialog.ShowDialog(new WpfWin32Window(((WindowFrameBackend)parent).Window)) == DialogResult.OK);
+ else
+ return (this.dialog.ShowDialog() == DialogResult.OK);
+ }
+
+ public void Dispose()
+ {
+ this.dialog.Dispose();
+ }
+
+ public Color Color
+ {
+ get
+ {
+ return Color.FromBytes(this.dialog.Color.R, this.dialog.Color.G, this.dialog.Color.B, this.dialog.Color.A);
+ }
+ set
+ {
+ this.dialog.Color = System.Drawing.Color.FromArgb((byte)(value.Alpha * 255), (byte)(value.Red * 255), (byte)(value.Green * 255), (byte)(value.Blue * 255));
+ }
+ }
+
+
+ private class ColorDialogWithTitle : ColorDialog
+ {
+ public string Title { get; set; }
+ [DllImport("user32.dll")]
+ private static extern bool SetWindowText(IntPtr hWnd, string title);
+ protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
+ {
+ IntPtr hookProc = base.HookProc(hWnd, msg, wparam, lparam);
+ if (msg == 0x0110 && Title != null)//WM_INITDIALOG
+ {
+ SetWindowText(hWnd, Title);
+ }
+ return hookProc;
+ }
+ }
+
+ private class WpfWin32Window
+ : IWin32Window
+ {
+ public WpfWin32Window(System.Windows.Window window)
+ {
+ this.helper = new WindowInteropHelper(window);
+ }
+
+ public IntPtr Handle
+ {
+ get { return this.helper.Handle; }
+ }
+
+ private readonly WindowInteropHelper helper;
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectFolderDialogBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectFolderDialogBackend.cs
index 14a6f86..94d88ed 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectFolderDialogBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SelectFolderDialogBackend.cs
@@ -63,6 +63,14 @@ namespace Xwt.WPFBackend
get { return new[] { Folder }; }
}
+ public bool CanCreateFolders {
+ get { return dialog != null ? dialog.ShowNewFolderButton : false; }
+ set {
+ if (dialog != null)
+ dialog.ShowNewFolderButton = value;
+ }
+ }
+
public string CurrentFolder
{
get
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SeparatorBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SeparatorBackend.cs
index 8bdb465..cb520e5 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SeparatorBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SeparatorBackend.cs
@@ -53,20 +53,12 @@ namespace Xwt.WPFBackend
set { Widget = value; }
}
- public override WidgetSize GetPreferredHeight()
+ public override Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
if (this.direction == Orientation.Vertical)
- return new WidgetSize (((FrameworkElement) Widget.Parent).ActualHeight / HeightPixelRatio);
-
- return new WidgetSize (1);
- }
-
- public override WidgetSize GetPreferredWidth()
- {
- if (this.direction == Orientation.Horizontal)
- return new WidgetSize (((FrameworkElement) Widget.Parent).ActualWidth / WidthPixelRatio);
-
- return new WidgetSize (1);
+ return new Size (1, heightConstraint.IsConstrained ? heightConstraint.AvailableSize : 0);
+ else
+ return new Size (widthConstraint.IsConstrained ? widthConstraint.AvailableSize : 0, 1);
}
}
}
\ No newline at end of file
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SliderBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SliderBackend.cs
new file mode 100644
index 0000000..1106b02
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SliderBackend.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Xwt.Backends;
+using SWC = System.Windows.Controls;
+
+namespace Xwt.WPFBackend
+{
+ class SliderBackend: WidgetBackend, ISliderBackend
+ {
+ #region ISliderBackend Members
+
+ public void Initialize (Orientation dir)
+ {
+ Widget = new System.Windows.Controls.Slider () {
+ Orientation = dir == Orientation.Horizontal ? SWC.Orientation.Horizontal : SWC.Orientation.Vertical
+ };
+ }
+
+ protected SWC.Slider Slider
+ {
+ get { return (SWC.Slider)Widget; }
+ }
+
+ protected ISliderEventSink SliderEventSink
+ {
+ get { return (ISliderEventSink)EventSink; }
+ }
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is SliderEvent)
+ Slider.ValueChanged += ValueChanged;
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is SliderEvent)
+ Slider.ValueChanged -= ValueChanged;
+ }
+
+ void ValueChanged (object sender, System.Windows.RoutedPropertyChangedEventArgs<double> e)
+ {
+ Context.InvokeUserCode (SliderEventSink.ValueChanged);
+ }
+
+ public double Value
+ {
+ get
+ {
+ return Slider.Value;
+ }
+ set
+ {
+ Slider.Value = value;
+ }
+ }
+
+ public double MinimumValue
+ {
+ get
+ {
+ return Slider.Minimum;
+ }
+ set
+ {
+ Slider.Minimum = value;
+ }
+ }
+
+ public double MaximumValue
+ {
+ get
+ {
+ return Slider.Maximum;
+ }
+ set
+ {
+ Slider.Maximum = value;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/SpinButtonBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SpinButtonBackend.cs
new file mode 100644
index 0000000..a910531
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/SpinButtonBackend.cs
@@ -0,0 +1,201 @@
+//
+// SpinButtonBackend.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+//
+// 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.Windows;
+using System.Windows.Controls;
+using Xwt.Backends;
+
+using System.Collections.Generic;
+
+namespace Xwt.WPFBackend
+{
+ public class SpinButtonBackend
+ : WidgetBackend, ISpinButtonBackend
+ {
+ public SpinButtonBackend()
+ {
+ Widget = new WindowsSpinButton();
+ }
+
+ public bool Wrap
+ {
+ get
+ {
+ return SpinButton.Wrap;
+ }
+ set
+ {
+ SpinButton.Wrap = value;
+ }
+ }
+
+ public double Value
+ {
+ get
+ {
+ return SpinButton.Value;
+ }
+ set
+ {
+ SpinButton.Value = value;
+ }
+ }
+
+ public void SetButtonStyle(Xwt.ButtonStyle buttonStyle)
+ {
+ //TODO: impelement SetButtonStyle in WpfSpinButton
+ }
+
+ public double MinimumValue
+ {
+ get
+ {
+ return SpinButton.MinimumValue;
+ }
+ set
+ {
+ SpinButton.MinimumValue = value;
+ }
+ }
+
+ public double MaximumValue
+ {
+ get
+ {
+ return SpinButton.MaximumValue;
+ }
+ set
+ {
+ SpinButton.MaximumValue = value;
+ }
+ }
+
+ public bool IsIndeterminate
+ {
+ get
+ {
+ return SpinButton.IsIndeterminate;
+ }
+ set
+ {
+ SpinButton.IsIndeterminate = value;
+ }
+ }
+
+ public string IndeterminateMessage
+ {
+ get
+ {
+ return SpinButton.IndeterminateMessage;
+ }
+ set
+ {
+ SpinButton.IndeterminateMessage = value;
+ }
+ }
+
+ public double IncrementValue
+ {
+ get
+ {
+ return SpinButton.Increment;
+ }
+ set
+ {
+ SpinButton.Increment = value;
+ }
+ }
+
+ public int Digits
+ {
+ get
+ {
+ return SpinButton.DecimalPlaces;
+ }
+ set
+ {
+ SpinButton.DecimalPlaces = value;
+ }
+ }
+
+ public double ClimbRate
+ {
+ get
+ {
+ return SpinButton.ClimbRate;
+ }
+ set
+ {
+ SpinButton.ClimbRate = value;
+ }
+ }
+
+
+ public override void EnableEvent(object eventId)
+ {
+ base.EnableEvent(eventId);
+ if (eventId is SpinButtonEvent)
+ {
+ switch ((SpinButtonEvent)eventId)
+ {
+ case SpinButtonEvent.ValueChanged:
+ SpinButton.OnValueChanged += SpinButton_OnValueChanged;
+ break;
+ }
+ }
+ }
+
+
+ public override void DisableEvent(object eventId)
+ {
+ base.DisableEvent(eventId);
+ if (eventId is SpinButtonEvent)
+ {
+ switch ((SpinButtonEvent)eventId)
+ {
+ case SpinButtonEvent.ValueChanged:
+ SpinButton.OnValueChanged -= SpinButton_OnValueChanged;
+ break;
+ }
+ }
+ }
+
+ void SpinButton_OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ Context.InvokeUserCode(SpinButtonEventSink.ValueChanged);
+ }
+
+ protected ISpinButtonEventSink SpinButtonEventSink
+ {
+ get { return (ISpinButtonEventSink)EventSink; }
+ }
+
+ protected WindowsSpinButton SpinButton
+ {
+ get { return (WindowsSpinButton)Widget; }
+ }
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextEntryBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextEntryBackend.cs
index 7f8c353..096ec66 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextEntryBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextEntryBackend.cs
@@ -54,6 +54,12 @@ namespace Xwt.WPFBackend
set { TextBox.Text = value; }
}
+ public virtual Alignment TextAlignment
+ {
+ get { return DataConverter.ToXwtAlignment (TextBox.TextAlignment); }
+ set { TextBox.TextAlignment = DataConverter.ToTextAlignment (value); }
+ }
+
public string PlaceholderText
{
get { return TextBox.PlaceholderText; }
@@ -72,6 +78,11 @@ namespace Xwt.WPFBackend
set { TextBox.ShowFrame = value; }
}
+ // TODO
+ public bool MultiLine {
+ get; set;
+ }
+
public override void EnableEvent (object eventId)
{
base.EnableEvent (eventId);
@@ -114,7 +125,7 @@ namespace Xwt.WPFBackend
private void OnTextChanged (object s, TextChangedEventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (EventSink.OnChanged);
+ Context.InvokeUserCode (EventSink.OnChanged);
}
}
}
\ No newline at end of file
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutBackendHandler.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutBackendHandler.cs
index 7a67499..9c52af1 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutBackendHandler.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutBackendHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// TextLayoutBackendHandler.cs
//
// Author:
@@ -26,58 +26,162 @@
// THE SOFTWARE.
using System;
-using System.Drawing;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Font = Xwt.Drawing.Font;
+using System.Windows.Media;
+using System.Windows;
namespace Xwt.WPFBackend
{
- public class TextLayoutBackendHandler
- : ITextLayoutBackendHandler
+ public class WpfTextLayoutBackendHandler
+ : TextLayoutBackendHandler
{
- public object Create (Context context)
+ public override object Create ()
+ {
+ return new TextLayoutBackend ();
+ }
+
+ public override void SetWidth (object backend, double value)
+ {
+ var t = (TextLayoutBackend)backend;
+ if (value >= 0)
+ t.FormattedText.MaxTextWidth = value;
+ else
+ t.Rebuild (null, false, true);
+ }
+
+ public override void SetHeight (object backend, double value)
+ {
+ var t = (TextLayoutBackend)backend;
+ if (value >= 0)
+ t.FormattedText.MaxTextHeight = value;
+ else
+ t.Rebuild (null, true, false);
+ }
+
+ public override void SetText (object backend, string text)
+ {
+ var t = (TextLayoutBackend)backend;
+ t.Rebuild (text);
+ }
+
+ public override void SetFont (object backend, Font font)
{
- var drawingContext = (DrawingContext)WidgetRegistry.GetBackend (context);
- return new TextLayoutContext (drawingContext);
+ var t = (TextLayoutBackend)backend;
+ t.SetFont (font);
}
- public object Create (ICanvasBackend canvas)
+ public override void SetTrimming (object backend, Xwt.Drawing.TextTrimming textTrimming)
{
- var drawingContext = new DrawingContext (Graphics.FromImage (new Bitmap (1, 1)));
- return new TextLayoutContext (drawingContext);
+ var t = (TextLayoutBackend)backend;
+ switch (textTrimming) {
+ case Xwt.Drawing.TextTrimming.WordElipsis:
+ t.FormattedText.Trimming = System.Windows.TextTrimming.WordEllipsis;
+ break;
+ default:
+ t.FormattedText.Trimming = System.Windows.TextTrimming.None;
+ break;
+ }
}
- public void SetWidth (object backend, double value)
+ public override Size GetSize (object backend)
{
- ((TextLayoutContext) backend).Width = value;
+ var t = (TextLayoutBackend)backend;
+ return new Size (t.FormattedText.WidthIncludingTrailingWhitespace, t.FormattedText.Height);
}
-
- public void SetHeight (object backend, double value)
+
+ public override Point GetCoordinateFromIndex (object backend, int index)
+ {
+ return Point.Zero;
+ }
+
+ public override int GetIndexFromCoordinates (object backend, double x, double y)
+ {
+ return 0;
+ }
+
+ public override void AddAttribute (object backend, TextAttribute attribute)
{
- ((TextLayoutContext) backend).Height = value;
+ var t = (TextLayoutBackend)backend;
+ if (attribute is FontStyleTextAttribute) {
+ var xa = (FontStyleTextAttribute)attribute;
+ t.FormattedText.SetFontStyle (xa.Style.ToWpfFontStyle (), xa.StartIndex, xa.Count);
+ }
+ else if (attribute is FontWeightTextAttribute) {
+ var xa = (FontWeightTextAttribute)attribute;
+ t.FormattedText.SetFontWeight (xa.Weight.ToWpfFontWeight (), xa.StartIndex, xa.Count);
+ }
+ else if (attribute is ColorTextAttribute) {
+ var xa = (ColorTextAttribute)attribute;
+ t.FormattedText.SetForegroundBrush (new SolidColorBrush (xa.Color.ToWpfColor ()), xa.StartIndex, xa.Count);
+ }
+ else if (attribute is StrikethroughTextAttribute) {
+ var xa = (StrikethroughTextAttribute)attribute;
+ var dec = new TextDecoration (TextDecorationLocation.Strikethrough, null, 0, TextDecorationUnit.FontRecommended, TextDecorationUnit.FontRecommended);
+ TextDecorationCollection col = new TextDecorationCollection ();
+ col.Add (dec);
+ t.FormattedText.SetTextDecorations (col, xa.StartIndex, xa.Count);
+ }
+ else if (attribute is UnderlineTextAttribute) {
+ var xa = (UnderlineTextAttribute)attribute;
+ var dec = new TextDecoration (TextDecorationLocation.Underline, null, 0, TextDecorationUnit.FontRecommended, TextDecorationUnit.FontRecommended);
+ TextDecorationCollection col = new TextDecorationCollection ();
+ col.Add (dec);
+ t.FormattedText.SetTextDecorations (col, xa.StartIndex, xa.Count);
+ }
}
-
- public void SetText (object backend, string text)
+
+ public override void ClearAttributes (object backend)
{
- ((TextLayoutContext) backend).Text = text;
}
+ }
+
+ class TextLayoutBackend
+ {
+ System.Windows.Media.FormattedText formattedText;
- public void SetFont (object backend, Font font)
+ public System.Windows.Media.FormattedText FormattedText
{
- ((TextLayoutContext) backend).Font = font.ToDrawingFont();
+ get
+ {
+ if (formattedText == null)
+ Rebuild ("");
+ return formattedText;
+ }
}
-
- public void SetTrimming (object backend, TextTrimming textTrimming)
+
+ public void Rebuild (string newText = null, bool keepWidth = true, bool keepHeight = true)
{
- ((TextLayoutContext) backend).StringTrimming = textTrimming.ToDrawingStringTrimming();
-
+ var font = new Typeface ("Verdana");
+ var dir = System.Windows.FlowDirection.LeftToRight;
+ var old = formattedText;
+ if (old != null && old.Text != null && newText == null)
+ newText = old.Text;
+ formattedText = new System.Windows.Media.FormattedText(newText ?? "", System.Globalization.CultureInfo.CurrentCulture, dir, font, 36, System.Windows.Media.Brushes.Black);
+ if (old != null) {
+ if (old.MaxTextWidth != 0 && keepWidth)
+ formattedText.MaxTextWidth = old.MaxTextWidth;
+ if (old.MaxTextHeight != 0 && keepHeight)
+ formattedText.MaxTextHeight = old.MaxTextHeight;
+ }
+ if (Font != null)
+ SetFont (Font);
}
-
- public Size GetSize (object backend)
+
+ public void SetFont (Font font)
{
- return ((TextLayoutContext) backend).GetSize ();
+ this.Font = font;
+ var f = (FontData)Toolkit.GetBackend (font);
+ FormattedText.SetFontFamily (f.Family);
+ FormattedText.SetFontSize (f.GetDeviceIndependentPixelSize ());
+ FormattedText.SetFontStretch (f.Stretch);
+ FormattedText.SetFontStyle (f.Style);
+ FormattedText.SetFontWeight (f.Weight);
}
+
+ public DrawingContext Context;
+ public Font Font;
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutContext.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutContext.cs
deleted file mode 100644
index 6157a9d..0000000
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TextLayoutContext.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// TextLayoutContext.cs
-//
-// Author:
-// Eric Maupin <ermau at xamarin.com>
-// Lytico (http://limada.sourceforge.net)
-//
-// Copyright (c) 2012 Xamarin, Inc.
-//
-// 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.Drawing;
-
-namespace Xwt.WPFBackend
-{
- internal class TextLayoutContext
- {
- private readonly DrawingContext context;
-
- internal TextLayoutContext (DrawingContext context)
- {
- this.context = context;
- this.StringTrimming = StringTrimming.Word;
- }
-
- internal double Width;
- internal double Height;
- internal string Text;
- internal Font Font;
- internal StringTrimming StringTrimming;
-
- public static readonly StringFormat StringFormat =
- // The following FormatFlags are equivalent to StringFormat.GenericTypographic plus Word Trimming
- new StringFormat {
- Trimming = StringTrimming.Word,
- FormatFlags=StringFormatFlags.LineLimit | StringFormatFlags.FitBlackBox | StringFormatFlags.NoClip
- };
-
- public Size GetSize ()
- {
- return context.Graphics.MeasureString (Text, Font, (int) Width, StringFormat).ToXwtSize ();
- }
- }
-}
\ No newline at end of file
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ToggleButtonBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ToggleButtonBackend.cs
index 4882985..68759be 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/ToggleButtonBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/ToggleButtonBackend.cs
@@ -89,7 +89,7 @@ namespace Xwt.WPFBackend
private void OnButtonToggled (object s, RoutedEventArgs e)
{
- Xwt.Engine.Toolkit.Invoke (EventSink.OnToggled);
+ Context.InvokeUserCode (EventSink.OnToggled);
}
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
index 3848add..84053cc 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
@@ -9,7 +9,7 @@
<Setter.Value>
<ControlTemplate TargetType="l:ExTreeViewItem">
<StackPanel>
- <Border Name="HBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
+ <Border Name="HBorder" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" BorderThickness="1" Padding="{TemplateBinding Padding}">
<GridViewRowPresenter x:Name="PART_Header" Content="{TemplateBinding Header}" Columns="{Binding Path=View.Columns, RelativeSource={RelativeSource AncestorType={x:Type l:ExTreeView}}}" />
</Border>
<ItemsPresenter x:Name="ItemsHost" />
@@ -35,24 +35,32 @@
</MultiTrigger.Conditions>
<Setter Property="MinHeight" Value="19" />
</MultiTrigger>
-
+
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="HBorder" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
</Trigger>
-
+
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True" />
<Condition Property="IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="HBorder" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
+ <Setter TargetName="HBorder" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
</MultiTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="False" />
+ <Condition Property="IsFocused" Value="False" />
+ </MultiTrigger.Conditions>
+ <Setter TargetName="HBorder" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
+ </MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeViewBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeViewBackend.cs
index 6c2e707..b32ddaf 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeViewBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/TreeViewBackend.cs
@@ -32,7 +32,7 @@ using System.Windows.Documents;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Shapes;
-using Xwt.Engine;
+
using Xwt.Backends;
using Xwt.WPFBackend.Utilities;
using System.Windows;
@@ -212,9 +212,6 @@ namespace Xwt.WPFBackend
nodePosition = null;
this.dropPosition = pos = RowDropPosition.Into;
- x *= WidthPixelRatio;
- y *= HeightPixelRatio;
-
var result = VisualTreeHelper.HitTest (Tree, new System.Windows.Point (x, y)) as PointHitTestResult;
var element = (result != null) ? result.VisualHit as FrameworkElement : null;
@@ -285,29 +282,14 @@ namespace Xwt.WPFBackend
get { return -1; }
}
- public override WidgetSize GetPreferredHeight()
- {
- return new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredHeightForWidth(double width)
- {
- return GetPreferredHeight ();
- }
-
- public override WidgetSize GetPreferredWidth()
- {
- return new WidgetSize (0);
- }
-
- public override WidgetSize GetPreferredWidthForHeight(double height)
+ public override Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- return GetPreferredWidth ();
+ return Size.Zero;
}
private void OnSelectedItemsChanged (object sender, EventArgs e)
{
- Toolkit.Invoke (TreeViewEventSink.OnSelectionChanged);
+ Context.InvokeUserCode (TreeViewEventSink.OnSelectionChanged);
}
protected override void OnDragOver (object sender, DragOverEventArgs e)
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/Util.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/Util.cs
index 928d713..936304d 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/Util.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/Util.cs
@@ -40,5 +40,15 @@ namespace Xwt.WPFBackend
Matrix m = source.CompositionTarget.TransformToDevice;
return new Size (m.M11, m.M22);
}
+
+ public static double GetScaleFactor (this Visual self)
+ {
+ PresentationSource source = PresentationSource.FromVisual (self);
+ if (source == null)
+ return 1;
+
+ Matrix m = source.CompositionTarget.TransformToDevice;
+ return m.M11;
+ }
}
}
\ No newline at end of file
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WPFEngine.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WPFEngine.cs
old mode 100755
new mode 100644
index c12eade..5311544
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WPFEngine.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WPFEngine.cs
@@ -8,7 +8,7 @@
// Eric Maupin <ermau at xamarin.com>
//
// Copyright (c) 2011 Carlos Alberto Cortez
-// Copyright (c) 2012 Lu�s Reis
+// Copyright (c) 2012 Lu�s Reis
// Copyright (c) 2012 Thomas Ziegler
// Copyright (c) 2012 Xamarin, Inc.
//
@@ -34,11 +34,11 @@ using System.Windows;
using System.Windows.Threading;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
- public class WPFEngine : Xwt.Backends.EngineBackend
+ public class WPFEngine : Xwt.Backends.ToolkitEngineBackend
{
System.Windows.Application application;
@@ -49,54 +49,65 @@ namespace Xwt.WPFBackend
if (application == null)
application = new System.Windows.Application ();
- WidgetRegistry.RegisterBackend (typeof (Window), typeof (WindowBackend));
- WidgetRegistry.RegisterBackend (typeof (Dialog), typeof (DialogBackend));
- WidgetRegistry.RegisterBackend (typeof (Notebook), typeof (NotebookBackend));
- WidgetRegistry.RegisterBackend (typeof (Menu), typeof (MenuBackend));
- WidgetRegistry.RegisterBackend (typeof (MenuItem), typeof (MenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof (CheckBoxMenuItem), typeof (CheckboxMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof (RadioButtonMenuItem), typeof (RadioButtonMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof (SeparatorMenuItem), typeof (SeparatorMenuItemBackend));
- WidgetRegistry.RegisterBackend (typeof (Table), typeof (BoxBackend));
- WidgetRegistry.RegisterBackend (typeof (Box), typeof (BoxBackend));
- WidgetRegistry.RegisterBackend (typeof (Label), typeof (LabelBackend));
- WidgetRegistry.RegisterBackend (typeof (TextEntry), typeof (TextEntryBackend));
- WidgetRegistry.RegisterBackend (typeof (Button), typeof (ButtonBackend));
- WidgetRegistry.RegisterBackend (typeof (ToggleButton), typeof (ToggleButtonBackend));
- WidgetRegistry.RegisterBackend (typeof (MenuButton), typeof (MenuButtonBackend));
- WidgetRegistry.RegisterBackend (typeof (CheckBox), typeof (CheckBoxBackend));
- WidgetRegistry.RegisterBackend (typeof (TreeView), typeof (TreeViewBackend));
- WidgetRegistry.RegisterBackend (typeof (TreeStore), typeof (TreeStoreBackend));
- WidgetRegistry.RegisterBackend (typeof (ImageView), typeof (ImageViewBackend));
- WidgetRegistry.RegisterBackend (typeof (Separator), typeof (SeparatorBackend));
- WidgetRegistry.RegisterBackend (typeof (Image), typeof (ImageHandler));
- WidgetRegistry.RegisterBackend (typeof (Font), typeof (FontBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (Clipboard), typeof (ClipboardBackend));
- WidgetRegistry.RegisterBackend (typeof (ComboBox), typeof (ComboBoxBackend));
- WidgetRegistry.RegisterBackend (typeof (ComboBoxEntry), typeof (ComboBoxEntryBackend));
- WidgetRegistry.RegisterBackend (typeof (ScrollView), typeof (ScrollViewBackend));
- WidgetRegistry.RegisterBackend (typeof (Frame), typeof (FrameBackend));
- WidgetRegistry.RegisterBackend (typeof (Canvas), typeof (CanvasBackend));
- WidgetRegistry.RegisterBackend (typeof (Context), typeof (ContextBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (Gradient), typeof (GradientBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (TextLayout), typeof (TextLayoutBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (Widget), typeof (CustomWidgetBackend));
- WidgetRegistry.RegisterBackend (typeof (Paned), typeof (PanedBackend));
- WidgetRegistry.RegisterBackend (typeof (ScrollAdjustment), typeof (ScrollAdjustmentBackend));
- WidgetRegistry.RegisterBackend (typeof (OpenFileDialog), typeof (OpenFileDialogBackend));
- WidgetRegistry.RegisterBackend (typeof (SelectFolderDialog), typeof (SelectFolderDialogBackend));
- WidgetRegistry.RegisterBackend (typeof (IAlertDialogBackend), typeof (AlertDialogBackend));
- WidgetRegistry.RegisterBackend (typeof (ImageBuilder), typeof (ImageBuilderBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (ImagePattern), typeof (ImagePatternBackendHandler));
- WidgetRegistry.RegisterBackend (typeof (ListView), typeof (ListViewBackend));
- WidgetRegistry.RegisterBackend (typeof (ListStore), typeof (ListDataSource));
- WidgetRegistry.RegisterBackend (typeof (ListBox), typeof (ListBoxBackend));
- WidgetRegistry.RegisterBackend (typeof (Placement), typeof (BoxBackend));
- WidgetRegistry.RegisterBackend (typeof (Popover), typeof (PopoverBackend));
- WidgetRegistry.RegisterBackend (typeof (ProgressBar), typeof (ProgressBarBackend));
- WidgetRegistry.RegisterBackend (typeof (RichTextView), typeof (RichTextViewBackend));
- WidgetRegistry.RegisterBackend (typeof (LinkLabel), typeof (LinkLabelBackend));
- WidgetRegistry.RegisterBackend (typeof (Spinner), typeof (SpinnerBackend));
+ application.ShutdownMode = ShutdownMode.OnExplicitShutdown;
+
+ RegisterBackend<IWindowBackend, WindowBackend> ();
+ RegisterBackend<IDialogBackend, DialogBackend> ();
+ RegisterBackend<INotebookBackend, NotebookBackend> ();
+ RegisterBackend<IMenuBackend, MenuBackend> ();
+ RegisterBackend<IMenuItemBackend, MenuItemBackend> ();
+ RegisterBackend<ICheckBoxMenuItemBackend, CheckboxMenuItemBackend> ();
+ RegisterBackend<IRadioButtonMenuItemBackend, RadioButtonMenuItemBackend> ();
+ RegisterBackend<ISeparatorMenuItemBackend, SeparatorMenuItemBackend> ();
+ RegisterBackend<IBoxBackend, BoxBackend> ();
+ RegisterBackend<ILabelBackend, LabelBackend> ();
+ RegisterBackend<ITextEntryBackend, TextEntryBackend> ();
+ RegisterBackend<IButtonBackend, ButtonBackend> ();
+ RegisterBackend<IToggleButtonBackend, ToggleButtonBackend> ();
+ RegisterBackend<IMenuButtonBackend, MenuButtonBackend> ();
+ RegisterBackend<ICheckBoxBackend, CheckBoxBackend> ();
+ RegisterBackend<ITreeViewBackend, TreeViewBackend> ();
+ RegisterBackend<ITreeStoreBackend, TreeStoreBackend> ();
+ RegisterBackend<IImageViewBackend, ImageViewBackend> ();
+ RegisterBackend<ISeparatorBackend, SeparatorBackend> ();
+ RegisterBackend<ImageBackendHandler, ImageHandler> ();
+ RegisterBackend<FontBackendHandler, WpfFontBackendHandler> ();
+ RegisterBackend<ClipboardBackend, WpfClipboardBackend> ();
+ RegisterBackend<IComboBoxBackend, ComboBoxBackend> ();
+ RegisterBackend<IComboBoxEntryBackend, ComboBoxEntryBackend> ();
+ RegisterBackend<IScrollViewBackend, ScrollViewBackend> ();
+ RegisterBackend<IFrameBackend, FrameBackend> ();
+ RegisterBackend<ICanvasBackend, CanvasBackend> ();
+ RegisterBackend<ContextBackendHandler, WpfContextBackendHandler> ();
+ RegisterBackend<DrawingPathBackendHandler, WpfContextBackendHandler> ();
+ RegisterBackend<GradientBackendHandler, WpfGradientBackendHandler> ();
+ RegisterBackend<TextLayoutBackendHandler, WpfTextLayoutBackendHandler> ();
+ RegisterBackend<ICustomWidgetBackend, CustomWidgetBackend> ();
+ RegisterBackend<IPanedBackend, PanedBackend> ();
+ RegisterBackend<IScrollAdjustmentBackend, ScrollAdjustmentBackend> ();
+ RegisterBackend<IOpenFileDialogBackend, OpenFileDialogBackend> ();
+ RegisterBackend<ISaveFileDialogBackend, SaveFileDialogBackend> ();
+ RegisterBackend<ISelectFolderDialogBackend, SelectFolderDialogBackend> ();
+ RegisterBackend<IAlertDialogBackend, AlertDialogBackend> ();
+ RegisterBackend<ImageBuilderBackendHandler, WpfImageBuilderBackendHandler> ();
+ RegisterBackend<ImagePatternBackendHandler, WpfImagePatternBackendHandler> ();
+ RegisterBackend<IListViewBackend, ListViewBackend> ();
+ RegisterBackend<IListStoreBackend, ListDataSource> ();
+ RegisterBackend<IListBoxBackend, ListBoxBackend> ();
+ RegisterBackend<IPopoverBackend, PopoverBackend> ();
+ RegisterBackend<IProgressBarBackend, ProgressBarBackend> ();
+ RegisterBackend<IRichTextViewBackend, RichTextViewBackend> ();
+ RegisterBackend<ILinkLabelBackend, LinkLabelBackend> ();
+ RegisterBackend<ISpinnerBackend, SpinnerBackend> ();
+ RegisterBackend<DesktopBackend, WpfDesktopBackend>();
+ RegisterBackend<IExpanderBackend, ExpanderBackend>();
+ RegisterBackend<IDatePickerBackend, DatePickerBackend>();
+ RegisterBackend<ISelectColorDialogBackend, SelectColorDialogBackend>();
+ RegisterBackend<IRadioButtonBackend, RadioButtonBackend>();
+ RegisterBackend<ISpinButtonBackend, SpinButtonBackend>();
+ RegisterBackend<ISliderBackend, SliderBackend> ();
+ RegisterBackend<IScrollbarBackend, ScrollbarBackend> ();
+ RegisterBackend<IEmbeddedWidgetBackend, EmbedNativeWidgetBackend>();
}
public override void DispatchPendingEvents()
@@ -147,13 +158,13 @@ namespace Xwt.WPFBackend
public override object GetNativeWidget (Widget w)
{
- var backend = (IWpfWidgetBackend) WidgetRegistry.GetBackend (w);
+ var backend = (IWpfWidgetBackend) Toolkit.GetBackend (w);
return backend.Widget;
}
public override object GetNativeParentWindow (Widget w)
{
- var backend = (IWpfWidgetBackend) WidgetRegistry.GetBackend (w);
+ var backend = (IWpfWidgetBackend)Toolkit.GetBackend (w);
FrameworkElement e = backend.Widget;
while ((e = e.Parent as FrameworkElement) != null)
@@ -165,9 +176,14 @@ namespace Xwt.WPFBackend
public override bool HasNativeParent (Widget w)
{
- var backend = (IWpfWidgetBackend) WidgetRegistry.GetBackend (w);
+ var backend = (IWpfWidgetBackend)Toolkit.GetBackend (w);
return backend.Widget.Parent != null;
}
+
+ public override object GetNativeImage (Image image)
+ {
+ return DataConverter.AsImageSource (Toolkit.GetBackend (image));
+ }
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs
index ce4650d..5605665 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs
@@ -39,7 +39,7 @@ using SWC = System.Windows.Controls; // When we need to resolve ambigituies.
using SW = System.Windows; // When we need to resolve ambigituies.
using Xwt.Backends;
-using Xwt.Engine;
+
using Color = Xwt.Drawing.Color;
namespace Xwt.WPFBackend
@@ -134,6 +134,11 @@ namespace Xwt.WPFBackend
}
}
+ public bool BackgroundColorSet
+ {
+ get { return customBackgroundColor.HasValue; }
+ }
+
SWM.Color GetWidgetColor ()
{
if (Widget is Control) {
@@ -149,7 +154,7 @@ namespace Xwt.WPFBackend
return SystemColors.ControlColor;
}
- void SetWidgetColor (Color value)
+ protected virtual void SetWidgetColor (Color value)
{
if ((Widget is Control))
((Control)Widget).Background = ResPool.GetSolidBrush (value);
@@ -168,12 +173,17 @@ namespace Xwt.WPFBackend
}
}
+ public double Opacity {
+ get { return Widget.Opacity; }
+ set { Widget.Opacity = value; }
+ }
+
FontData GetWidgetFont ()
{
if (!(Widget is Control)) {
- double size = FontBackendHandler.GetPointsFromDeviceUnits (SystemFonts.MessageFontSize);
+ double size = WpfFontBackendHandler.GetPointsFromDeviceUnits (SystemFonts.MessageFontSize);
- return new FontData (SystemFonts.MessageFontFamily, size, Drawing.FontSizeUnit.Points) {
+ return new FontData (SystemFonts.MessageFontFamily, size) {
Style = SystemFonts.MessageFontStyle,
Weight = SystemFonts.MessageFontWeight
};
@@ -215,7 +225,7 @@ namespace Xwt.WPFBackend
}
public Size Size {
- get { return new Size (Widget.ActualWidth, Widget.ActualHeight); }
+ get { return new Size (Widget.RenderSize.Width, Widget.RenderSize.Height); }
}
public virtual bool Visible {
@@ -235,30 +245,21 @@ namespace Xwt.WPFBackend
public Point ConvertToScreenCoordinates (Point widgetCoordinates)
{
- double wratio = WidthPixelRatio;
- double hratio = HeightPixelRatio;
-
var p = Widget.PointToScreen (new System.Windows.Point (
- widgetCoordinates.X / wratio, widgetCoordinates.Y / hratio));
+ widgetCoordinates.X, widgetCoordinates.Y));
- return new Point (p.X * wratio, p.Y * hratio);
+ return new Point (p.X, p.Y);
}
SW.Size lastNaturalSize;
- void GetWidgetDesiredSize (double availableWidth, double availableHeight, out SW.Size minSize, out SW.Size naturalSize)
+ void GetWidgetDesiredSize (double availableWidth, double availableHeight, out SW.Size size)
{
// Calculates the desired size of widget.
if (!Widget.IsMeasureValid) {
try {
calculatingPreferredSize = true;
- gettingNaturalSize = true;
- Widget.Measure (new System.Windows.Size (availableWidth, availableHeight));
- lastNaturalSize = Widget.DesiredSize;
- gettingNaturalSize = false;
-
- Widget.InvalidateMeasure ();
Widget.Measure (new System.Windows.Size (availableWidth, availableHeight));
}
finally {
@@ -266,46 +267,21 @@ namespace Xwt.WPFBackend
gettingNaturalSize = false;
}
}
- minSize = Widget.DesiredSize;
- naturalSize = lastNaturalSize;
+ size = Widget.DesiredSize;
}
- // The GetPreferred* methods are called when the corresponding OnGetPreferred* methods in the
- // XWT widget are not overriden, or if they are overriden and the new implementation calls
- // base.OnGetPreferred*. For this reason, we have to ensure that the widget's MeasureOverride
- // method doesn't end calling the frontend OnGetPreferred* methods. To avoid it we set
+ // The GetPreferredSize method is called when the corresponding OnGetPreferredSize method in the
+ // XWT widget is not overriden, or if it is overriden and the new implementation calls
+ // base.OnGetPreferredSize. For this reason, we have to ensure that the widget's MeasureOverride
+ // method doesn't end calling the frontend OnGetPreferredSize method. To avoid it we set
// the calculatingPreferredSize flag to true, and we check this flag in MeasureOverride
- public virtual WidgetSize GetPreferredWidth ()
- {
- SW.Size minSize, natSize;
- Widget.InvalidateMeasure ();
- GetWidgetDesiredSize (Double.PositiveInfinity, Double.PositiveInfinity, out minSize, out natSize);
- return new WidgetSize (minSize.Width * WidthPixelRatio - Frontend.Margin.HorizontalSpacing, natSize.Width * WidthPixelRatio - Frontend.Margin.HorizontalSpacing);
- }
-
- public virtual WidgetSize GetPreferredHeight ()
- {
- SW.Size minSize, natSize;
- Widget.InvalidateMeasure ();
- GetWidgetDesiredSize (Double.PositiveInfinity, Double.PositiveInfinity, out minSize, out natSize);
- return new WidgetSize (minSize.Height * WidthPixelRatio - Frontend.Margin.VerticalSpacing, natSize.Height * HeightPixelRatio - Frontend.Margin.VerticalSpacing);
- }
-
- public virtual WidgetSize GetPreferredWidthForHeight (double height)
- {
- SW.Size minSize, natSize;
- Widget.InvalidateMeasure ();
- GetWidgetDesiredSize (Double.PositiveInfinity, height, out minSize, out natSize);
- return new WidgetSize (minSize.Width * WidthPixelRatio - Frontend.Margin.HorizontalSpacing, natSize.Width * WidthPixelRatio - Frontend.Margin.HorizontalSpacing);
- }
-
- public virtual WidgetSize GetPreferredHeightForWidth (double width)
+ public virtual Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- SW.Size minSize, natSize;
+ SW.Size size;
Widget.InvalidateMeasure ();
- GetWidgetDesiredSize (width, Double.PositiveInfinity, out minSize, out natSize);
- return new WidgetSize (minSize.Height * HeightPixelRatio - Frontend.Margin.VerticalSpacing, natSize.Height * HeightPixelRatio - Frontend.Margin.VerticalSpacing);
+ GetWidgetDesiredSize (widthConstraint.IsConstrained ? widthConstraint.AvailableSize : Double.PositiveInfinity, heightConstraint.IsConstrained ? heightConstraint.AvailableSize : Double.PositiveInfinity, out size);
+ return new Size (size.Width, size.Height);
}
/// <summary>
@@ -316,68 +292,45 @@ namespace Xwt.WPFBackend
/// <returns></returns>
public System.Windows.Size MeasureOverride (System.Windows.Size constraint, System.Windows.Size wpfMeasure)
{
- // Calculate the natural size, if that's what is being measured
+ var defNaturalSize = eventSink.GetDefaultNaturalSize ();
- if (gettingNaturalSize) {
- var defNaturalSize = eventSink.GetDefaultNaturalSize ();
-
- // -2 means use the WPF default, -1 use the XWT default, any other other value is used as custom natural size
- var nw = DefaultNaturalWidth;
- if (nw == -1) {
- nw = defNaturalSize.Width;
- if (nw == 0)
- nw = wpfMeasure.Width;
- wpfMeasure.Width = nw;
- }
- else if (nw != -2)
- wpfMeasure.Width = nw;
-
- var nh = DefaultNaturalHeight;
- if (nh == -1) {
- nh = defNaturalSize.Height;
- if (nh == 0)
- nh = wpfMeasure.Height;
- wpfMeasure.Height = nh;
- }
- else if (nh != -2)
- wpfMeasure.Height = nh;
+ // -2 means use the WPF default, -1 use the XWT default, any other other value is used as custom natural size
+ var nw = DefaultNaturalWidth;
+ if (nw == -1) {
+ nw = defNaturalSize.Width;
+ if (nw == 0)
+ nw = wpfMeasure.Width;
+ wpfMeasure.Width = nw;
}
+ else if (nw != -2)
+ wpfMeasure.Width = nw;
+
+ var nh = DefaultNaturalHeight;
+ if (nh == -1) {
+ nh = defNaturalSize.Height;
+ if (nh == 0)
+ nh = wpfMeasure.Height;
+ wpfMeasure.Height = nh;
+ }
+ else if (nh != -2)
+ wpfMeasure.Height = nh;
// If we are calculating the default preferred size of the widget we end here.
// See note above about when GetPreferred* methods are called.
if (calculatingPreferredSize)
return wpfMeasure;
- Toolkit.Invoke (delegate
- {
- if (eventSink.GetSizeRequestMode () == SizeRequestMode.HeightForWidth) {
+ if ((enabledEvents & WidgetEvent.PreferredSizeCheck) != 0) {
+ Context.InvokeUserCode (delegate
+ {
// Calculate the preferred width through the frontend if there is an overriden OnGetPreferredWidth, but only do it
- // if we are not given a constraint. If there is a width constraint, we'll use that constraint value for calculating the height
- if ((enabledEvents & WidgetEvent.PreferredWidthCheck) != 0 && constraint.Width == Double.PositiveInfinity) {
- var ws = eventSink.OnGetPreferredWidth ();
- wpfMeasure.Width = constraint.Width = gettingNaturalSize ? ws.NaturalSize : ws.MinSize;
- }
-
- // Now calculate the preferred height for that width, also using the override if available
- if ((enabledEvents & WidgetEvent.PreferredHeightForWidthCheck) != 0) {
- var ws = eventSink.OnGetPreferredHeightForWidth (constraint.Width);
- wpfMeasure.Height = gettingNaturalSize ? ws.NaturalSize : ws.MinSize;
- }
- }
- else {
- // Calculate the preferred height through the frontend, if there is an overriden OnGetPreferredHeight
- if ((enabledEvents & WidgetEvent.PreferredHeightCheck) != 0 && constraint.Height == Double.PositiveInfinity) {
- var ws = eventSink.OnGetPreferredHeight ();
- wpfMeasure.Height = constraint.Height = gettingNaturalSize ? ws.NaturalSize : ws.MinSize;
- }
-
- // Now calculate the preferred width for that height, also using the override if available
- if ((enabledEvents & WidgetEvent.PreferredWidthForHeightCheck) != 0) {
- var ws = eventSink.OnGetPreferredWidthForHeight (constraint.Height);
- wpfMeasure.Width = gettingNaturalSize ? ws.NaturalSize : ws.MinSize;
- }
- }
- });
+ // if we are not given a constraint. If there is a width constraint, we'll use that constraint value for calculating the height
+ var cw = double.IsPositiveInfinity (constraint.Width) ? SizeConstraint.Unconstrained : constraint.Width;
+ var ch = double.IsPositiveInfinity (constraint.Height) ? SizeConstraint.Unconstrained : constraint.Height;
+ var ws = eventSink.GetPreferredSize (cw, ch);
+ wpfMeasure = new System.Windows.Size (ws.Width, ws.Height);
+ });
+ }
return wpfMeasure;
}
@@ -400,30 +353,53 @@ namespace Xwt.WPFBackend
get { return -2; }
}
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ SetChildPlacement (childBackend);
+ }
+
+ public static void SetChildPlacement (IWidgetBackend childBackend)
+ {
+ var w = ((WidgetBackend)childBackend);
+ w.Widget.Margin = new Thickness (w.Frontend.MarginLeft, w.Frontend.MarginTop, w.Frontend.MarginRight, w.Frontend.MarginBottom);
+ switch (w.Frontend.HorizontalPlacement) {
+ case WidgetPlacement.Start: w.Widget.HorizontalAlignment = HorizontalAlignment.Left; break;
+ case WidgetPlacement.Center: w.Widget.HorizontalAlignment = HorizontalAlignment.Center; break;
+ case WidgetPlacement.End: w.Widget.HorizontalAlignment = HorizontalAlignment.Right; break;
+ case WidgetPlacement.Fill: w.Widget.HorizontalAlignment = HorizontalAlignment.Stretch; break;
+ }
+ switch (w.Frontend.VerticalPlacement) {
+ case WidgetPlacement.Start: w.Widget.VerticalAlignment = VerticalAlignment.Top; break;
+ case WidgetPlacement.Center: w.Widget.VerticalAlignment = VerticalAlignment.Center; break;
+ case WidgetPlacement.End: w.Widget.VerticalAlignment = VerticalAlignment.Bottom; break;
+ case WidgetPlacement.Fill: w.Widget.VerticalAlignment = VerticalAlignment.Stretch; break;
+ }
+ }
+
public void SetMinSize (double width, double height)
{
if (width == -1)
Widget.ClearValue (FrameworkElement.MinWidthProperty);
else
- Widget.MinWidth = width / WidthPixelRatio;
+ Widget.MinWidth = width;
if (height == -1)
Widget.ClearValue (FrameworkElement.MinHeightProperty);
else
- Widget.MinHeight = height / HeightPixelRatio;
+ Widget.MinHeight = height;
}
- public void SetNaturalSize (double width, double height)
+ public void SetSizeRequest (double width, double height)
{
if (width == -1)
Widget.ClearValue (FrameworkElement.WidthProperty);
else
- Widget.Width = width / WidthPixelRatio;
+ Widget.Width = width;
if (height == -1)
Widget.ClearValue (FrameworkElement.HeightProperty);
else
- Widget.Height = height / HeightPixelRatio;
+ Widget.Height = height;
}
public void SetCursor (CursorType cursor)
@@ -452,8 +428,6 @@ namespace Xwt.WPFBackend
public virtual void UpdateLayout ()
{
- Xwt.Widget frontend = (Xwt.Widget)Frontend;
- widget.Margin = new Thickness (frontend.Margin.Left, frontend.Margin.Top, frontend.Margin.Right, frontend.Margin.Bottom);
}
public override void EnableEvent (object eventId)
@@ -465,7 +439,7 @@ namespace Xwt.WPFBackend
Widget.KeyDown += WidgetKeyDownHandler;
break;
case WidgetEvent.KeyReleased:
- Widget.KeyDown += WidgetKeyUpHandler;
+ Widget.KeyUp += WidgetKeyUpHandler;
break;
case WidgetEvent.ButtonPressed:
Widget.MouseDown += WidgetMouseDownHandler;
@@ -552,7 +526,7 @@ namespace Xwt.WPFBackend
}
}
- protected double WidthPixelRatio
+ public double aWidthPixelRatio
{
get
{
@@ -565,7 +539,7 @@ namespace Xwt.WPFBackend
}
}
- protected double HeightPixelRatio
+ public double aHeightPixelRatio
{
get
{
@@ -578,16 +552,11 @@ namespace Xwt.WPFBackend
}
}
- protected double DPI
- {
- get { return WidthPixelRatio * 96; }
- }
-
void WidgetKeyDownHandler (object sender, System.Windows.Input.KeyEventArgs e)
{
KeyEventArgs args;
if (MapToXwtKeyArgs (e, out args)) {
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnKeyPressed (args);
});
if (args.Handled)
@@ -599,7 +568,8 @@ namespace Xwt.WPFBackend
{
KeyEventArgs args;
if (MapToXwtKeyArgs (e, out args)) {
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate
+ {
eventSink.OnKeyReleased (args);
});
if (args.Handled)
@@ -622,7 +592,7 @@ namespace Xwt.WPFBackend
void WidgetMouseDownHandler (object o, MouseButtonEventArgs e)
{
var args = ToXwtButtonArgs (e);
- Toolkit.Invoke (delegate () {
+ Context.InvokeUserCode (delegate () {
eventSink.OnButtonPressed (args);
});
if (args.Handled)
@@ -632,7 +602,8 @@ namespace Xwt.WPFBackend
void WidgetMouseUpHandler (object o, MouseButtonEventArgs e)
{
var args = ToXwtButtonArgs (e);
- Toolkit.Invoke (delegate () {
+ Context.InvokeUserCode (delegate ()
+ {
eventSink.OnButtonReleased (args);
});
if (args.Handled)
@@ -643,8 +614,8 @@ namespace Xwt.WPFBackend
{
var pos = e.GetPosition (Widget);
return new ButtonEventArgs () {
- X = pos.X * WidthPixelRatio,
- Y = pos.Y * HeightPixelRatio,
+ X = pos.X,
+ Y = pos.Y,
MultiplePress = e.ClickCount,
Button = e.ChangedButton.ToXwtButton ()
};
@@ -652,12 +623,12 @@ namespace Xwt.WPFBackend
void WidgetGotFocusHandler (object o, RoutedEventArgs e)
{
- Toolkit.Invoke (this.eventSink.OnGotFocus);
+ Context.InvokeUserCode (this.eventSink.OnGotFocus);
}
void WidgetLostFocusHandler (object o, RoutedEventArgs e)
{
- Toolkit.Invoke (eventSink.OnLostFocus);
+ Context.InvokeUserCode (eventSink.OnLostFocus);
}
DragDropData DragDropInfo {
@@ -772,7 +743,7 @@ namespace Xwt.WPFBackend
return;
DragStartData dragData = null;
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
dragData = eventSink.OnDragStarted ();
});
@@ -837,21 +808,21 @@ namespace Xwt.WPFBackend
protected virtual void OnDragFinished (object sender, DragFinishedEventArgs e)
{
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
this.eventSink.OnDragFinished (e);
});
}
protected virtual void OnDragOver (object sender, DragOverEventArgs e)
{
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnDragOver (e);
});
}
protected virtual void OnDragLeave (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnDragLeave (e);
});
}
@@ -887,7 +858,7 @@ namespace Xwt.WPFBackend
if ((enabledEvents & WidgetEvent.DragOverCheck) > 0) {
var checkArgs = new DragOverCheckEventArgs (pos, types, proposedAction);
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnDragOverCheck (checkArgs);
});
if (checkArgs.AllowedAction == DragDropAction.None) {
@@ -932,7 +903,7 @@ namespace Xwt.WPFBackend
if ((enabledEvents & WidgetEvent.DragDropCheck) > 0) {
var checkArgs = new DragCheckEventArgs (pos, types, actualEffect.ToXwtDropAction ());
- bool res = Toolkit.Invoke (delegate {
+ bool res = Context.InvokeUserCode (delegate {
eventSink.OnDragDropCheck (checkArgs);
});
@@ -947,7 +918,7 @@ namespace Xwt.WPFBackend
FillDataStore (store, e.Data, DragDropInfo.TargetTypes);
var args = new DragEventArgs (pos, store, actualEffect.ToXwtDropAction ());
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnDragDrop (args);
});
@@ -963,21 +934,23 @@ namespace Xwt.WPFBackend
private void WidgetMouseEnteredHandler (object sender, MouseEventArgs e)
{
- Toolkit.Invoke (eventSink.OnMouseEntered);
+ Context.InvokeUserCode (eventSink.OnMouseEntered);
}
private void WidgetMouseExitedHandler (object sender, MouseEventArgs e)
{
- Toolkit.Invoke (eventSink.OnMouseExited);
+ Context.InvokeUserCode (eventSink.OnMouseExited);
}
private void WidgetMouseMoveHandler (object sender, MouseEventArgs e)
{
- Toolkit.Invoke (() => {
- var p = e.GetPosition (Widget);
- eventSink.OnMouseMoved (new MouseMovedEventArgs (
- e.Timestamp, p.X * WidthPixelRatio, p.Y * HeightPixelRatio));
+ var p = e.GetPosition (Widget);
+ var a = new MouseMovedEventArgs(e.Timestamp, p.X, p.Y);
+ Context.InvokeUserCode (() => {
+ eventSink.OnMouseMoved(a);
});
+ if (a.Handled)
+ e.Handled = true;
}
private int mouseScrollCumulation = 0;
@@ -988,14 +961,18 @@ namespace Xwt.WPFBackend
int jumps = mouseScrollCumulation / 120;
mouseScrollCumulation %= 120;
var p = e.GetPosition(Widget);
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
for (int i = 0; i < jumps; i++) {
- eventSink.OnMouseScrolled(new MouseScrolledEventArgs(
- e.Timestamp, p.X * WidthPixelRatio, p.Y * HeightPixelRatio, ScrollDirection.Up));
+ var a = new MouseScrolledEventArgs(e.Timestamp, p.X, p.Y, ScrollDirection.Up);
+ eventSink.OnMouseScrolled(a);
+ if (a.Handled)
+ e.Handled = true;
}
for (int i = 0; i > jumps; i--) {
- eventSink.OnMouseScrolled(new MouseScrolledEventArgs(
- e.Timestamp, p.X * WidthPixelRatio, p.Y * HeightPixelRatio, ScrollDirection.Down));
+ var a = new MouseScrolledEventArgs(e.Timestamp, p.X, p.Y, ScrollDirection.Down);
+ eventSink.OnMouseScrolled(a);
+ if (a.Handled)
+ e.Handled = true;
}
});
}
@@ -1003,7 +980,7 @@ namespace Xwt.WPFBackend
private void WidgetOnSizeChanged (object sender, SizeChangedEventArgs e)
{
if (Widget.IsVisible)
- Toolkit.Invoke (this.eventSink.OnBoundsChanged);
+ Context.InvokeUserCode (this.eventSink.OnBoundsChanged);
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowBackend.cs
index fff4f88..6268549 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowBackend.cs
@@ -98,6 +98,14 @@ namespace Xwt.WPFBackend
// is not a problem when setting the child before showing the
// window, but it may be a problem if the window is already visible.
widget.SizeChanged += ChildSizeChanged;
+
+ if (child != null)
+ UpdateChildPlacement (child);
+ }
+
+ public virtual void UpdateChildPlacement (IWidgetBackend childBackend)
+ {
+ WidgetBackend.SetChildPlacement (childBackend);
}
void ChildSizeChanged (object o, SizeChangedEventArgs args)
@@ -145,8 +153,9 @@ namespace Xwt.WPFBackend
Window.MinWidth = r.Width;
}
- public virtual Size ImplicitMinSize {
- get { return new Size (0,0); }
+ public virtual void GetMetrics (out Size minSize, out Size decorationSize)
+ {
+ minSize = decorationSize = Size.Zero;
}
}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs
index ecd6d34..f4561b1 100644
--- a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowFrameBackend.cs
@@ -31,7 +31,7 @@ using System.Text;
using System.Windows;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.WPFBackend
{
@@ -45,9 +45,10 @@ namespace Xwt.WPFBackend
{
}
- void IBackend.InitializeBackend (object frontend)
+ void IBackend.InitializeBackend (object frontend, ApplicationContext context)
{
this.frontend = (WindowFrame) frontend;
+ Context = context;
}
void IWindowFrameBackend.Initialize (IWindowFrameEventSink eventSink)
@@ -56,6 +57,8 @@ namespace Xwt.WPFBackend
Initialize ();
}
+ public ApplicationContext Context { get; private set; }
+
public virtual void Initialize ()
{
}
@@ -117,9 +120,9 @@ namespace Xwt.WPFBackend
}
}
- public void SetIcon (object imageBackend)
+ public void SetIcon (ImageDescription imageBackend)
{
- window.Icon = DataConverter.AsImageSource (imageBackend);
+ window.Icon = imageBackend.ToImageSource ();
}
string IWindowFrameBackend.Title {
@@ -130,7 +133,18 @@ namespace Xwt.WPFBackend
bool IWindowFrameBackend.Visible
{
get { return window.Visibility == Visibility.Visible; }
- set { window.Visibility = value ? Visibility.Visible : Visibility.Hidden; }
+ set {
+ if (value)
+ window.Show ();
+ else
+ window.Hide ();
+ }
+ }
+
+ public double Opacity
+ {
+ get { return window.Opacity; }
+ set { window.Opacity = value; }
}
void IWindowFrameBackend.Present ()
@@ -138,23 +152,39 @@ namespace Xwt.WPFBackend
window.Activate ();
}
+
+ bool IWindowFrameBackend.FullScreen {
+ get {
+ return false;
+ }
+ set {
+ }
+ }
+
+ object IWindowFrameBackend.Screen {
+ get {
+ var sb = Bounds;
+ return System.Windows.Forms.Screen.FromRectangle (new System.Drawing.Rectangle ((int)sb.X, (int)sb.Y, (int)sb.Width, (int)sb.Height));
+ }
+ }
+
public void Move (double x, double y)
{
var value = ToNonClientRect (new Rectangle (x, y, 1, 1));
window.Top = value.Top;
window.Left = value.Left;
- Toolkit.Invoke (delegate
+ Context.InvokeUserCode (delegate
{
eventSink.OnBoundsChanged (Bounds);
});
}
- public void Resize (double width, double height)
+ public void SetSize (double width, double height)
{
var value = ToNonClientRect (new Rectangle (0, 0, width, height));
window.Width = value.Width;
window.Height = value.Height;
- Toolkit.Invoke (delegate
+ Context.InvokeUserCode (delegate
{
eventSink.OnBoundsChanged (Bounds);
});
@@ -172,7 +202,7 @@ namespace Xwt.WPFBackend
window.Left = value.Left;
window.Width = value.Width;
window.Height = value.Height;
- Toolkit.Invoke (delegate {
+ Context.InvokeUserCode (delegate {
eventSink.OnBoundsChanged (Bounds);
});
}
@@ -224,7 +254,7 @@ namespace Xwt.WPFBackend
void BoundsChangedHandler (object o, EventArgs args)
{
- Toolkit.Invoke (delegate () {
+ Context.InvokeUserCode (delegate () {
eventSink.OnBoundsChanged (Bounds);
});
}
@@ -233,7 +263,7 @@ namespace Xwt.WPFBackend
{
if((bool)e.NewValue)
{
- Toolkit.Invoke (delegate ()
+ Context.InvokeUserCode (delegate ()
{
eventSink.OnShown ();
});
@@ -244,7 +274,7 @@ namespace Xwt.WPFBackend
{
if((bool)e.NewValue == false)
{
- Toolkit.Invoke (delegate ()
+ Context.InvokeUserCode (delegate ()
{
eventSink.OnHidden ();
});
@@ -253,7 +283,7 @@ namespace Xwt.WPFBackend
private void ClosingHandler (object sender, System.ComponentModel.CancelEventArgs e)
{
- Toolkit.Invoke (delegate ()
+ Context.InvokeUserCode (delegate ()
{
e.Cancel = eventSink.OnCloseRequested ();
});
@@ -302,8 +332,8 @@ namespace Xwt.WPFBackend
loc.Y += border.Height;
if (((IWindowFrameBackend)this).Decorated) {
- size.Height -= SystemParameters.CaptionHeight;
- loc.Y += SystemParameters.CaptionHeight;
+ size.Height -= SystemParameters.WindowCaptionHeight;
+ loc.Y += SystemParameters.WindowCaptionHeight;
}
if (HasMenu) {
size.Height -= SystemParameters.MenuBarHeight;
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowsSpinButton.xaml.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowsSpinButton.xaml.cs
new file mode 100644
index 0000000..5bd1d0e
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WindowsSpinButton.xaml.cs
@@ -0,0 +1,457 @@
+//
+// WindowsSpinButton.cs
+//
+// Author:
+// David Karlaš <david.karlas at gmail.com>
+//
+// 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.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+using System.Globalization;
+using System.ComponentModel;
+using System.Windows.Controls.Primitives;
+
+namespace Xwt.WPFBackend
+{
+ using Key = System.Windows.Input.Key;
+ public partial class WindowsSpinButton : UserControl
+ {
+ #region DependencyProperty
+ public static readonly DependencyProperty IncrementProperty =
+ DependencyProperty.Register("Increment", typeof(double),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(0.1));
+
+ public double Increment
+ {
+ get { return (double)GetValue(IncrementProperty); }
+ set { SetValue(IncrementProperty, value); }
+ }
+
+ public static readonly DependencyProperty DecimalPlacesProperty =
+ DependencyProperty.Register("DecimalPlaces", typeof(int),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(1));
+
+ public int DecimalPlaces
+ {
+ get { return (int)GetValue(DecimalPlacesProperty); }
+ set { SetValue(DecimalPlacesProperty, value); }
+ }
+
+ public static readonly DependencyProperty ValueProperty =
+ DependencyProperty.Register("Value", typeof(double),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(0.0, new PropertyChangedCallback(OnValuePropertyChanged)));
+
+ public static void OnValuePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+ {
+ var sl = sender as WindowsSpinButton;
+ if (sl != null)
+ sl.RaiseValueChangedEvent(e);
+ }
+
+ private void RaiseValueChangedEvent(DependencyPropertyChangedEventArgs e)
+ {
+ if (this.OnValueChanged != null)
+ this.OnValueChanged(this, e);
+ }
+
+ public event PropertyChangedCallback OnValueChanged;
+
+ public double Value
+ {
+ get { return (double)GetValue(ValueProperty); }
+ set { SetValue(ValueProperty, Math.Round(value, DecimalPlaces)); }
+ }
+
+ public static readonly DependencyProperty WrapProperty =
+ DependencyProperty.Register("Wrap", typeof(bool),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(false));
+
+ public bool Wrap
+ {
+ get { return (bool)GetValue(WrapProperty); }
+ set { SetValue(WrapProperty, value); }
+ }
+
+ public static readonly DependencyProperty MinimumValueProperty =
+ DependencyProperty.Register("MinimumValue", typeof(double),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(0.0));
+
+ public double MinimumValue
+ {
+ get { return (double)GetValue(MinimumValueProperty); }
+ set { SetValue(MinimumValueProperty, value); }
+ }
+
+ public static readonly DependencyProperty MaximumValueProperty =
+ DependencyProperty.Register("MaximumValue", typeof(double),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(1.0));
+
+ public double MaximumValue
+ {
+ get { return (double)GetValue(MaximumValueProperty); }
+ set { SetValue(MaximumValueProperty, value); }
+ }
+
+ public static readonly DependencyProperty ClimbRateProperty =
+ DependencyProperty.Register("ClimbRate", typeof(double),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(0.0));
+
+ public double ClimbRate
+ {
+ get { return (double)GetValue(ClimbRateProperty); }
+ set { SetValue(ClimbRateProperty, value); }
+ }
+
+ public static readonly DependencyProperty IsIndeterminateProperty =
+ DependencyProperty.Register("IsIndeterminate", typeof(bool),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(false));
+
+ public bool IsIndeterminate
+ {
+ get { return (bool)GetValue(IsIndeterminateProperty); }
+ set { SetValue(IsIndeterminateProperty, value); }
+ }
+
+ public static readonly DependencyProperty IndeterminateMessageProperty =
+ DependencyProperty.Register("IndeterminateMessage", typeof(string),
+ typeof(WindowsSpinButton), new FrameworkPropertyMetadata(""));
+
+ public string IndeterminateMessage
+ {
+ get { return (string)GetValue(IndeterminateMessageProperty); }
+ set { SetValue(IndeterminateMessageProperty, value); }
+ }
+ #endregion
+
+ #region General
+ Grid mainGrid;
+ TextBox textBox;
+ RepeatButton buttonUp;
+ RepeatButton buttonDown;
+ public WindowsSpinButton()
+ {
+ this.Loaded += UserControl_Loaded;
+ //MainGrid
+ mainGrid = new Grid();
+ mainGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
+ mainGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(16) });
+
+ //Textbox
+ textBox = new TextBox();
+ textBox.Text = "0";
+ textBox.HorizontalAlignment = HorizontalAlignment.Stretch;
+ textBox.MinWidth = 25;
+ textBox.PreviewKeyDown += textBox_PreviewKeyDown;
+ textBox.PreviewKeyUp += textBox_PreviewKeyUp;
+ textBox.MouseWheel += textBox_MouseWheel;
+ mainGrid.Children.Add(textBox);
+
+ //ButtonsGrid
+ Grid buttonsGrid = new Grid();
+ buttonsGrid.ClipToBounds = false;
+ buttonsGrid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) });
+ buttonsGrid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) });
+
+ buttonUp = new RepeatButton();
+ buttonUp.Focusable = false;
+ buttonsGrid.Children.Add(buttonUp);
+ Grid.SetRow(buttonUp, 0);
+ buttonUp.Click += ButtonUp_Click;
+ buttonUp.Interval = 20;
+ buttonUp.Delay = 400;
+ buttonUp.MouseRightButtonUp += buttonUp_MouseRightButtonUp;
+ buttonUp.PreviewMouseLeftButtonDown += buttonUp_PreviewMouseLeftButtonDown;
+ var buttonUpPolygonPoints = new PointCollection(3);
+ buttonUpPolygonPoints.Add(new System.Windows.Point(0, 5));
+ buttonUpPolygonPoints.Add(new System.Windows.Point(3, 0));
+ buttonUpPolygonPoints.Add(new System.Windows.Point(6, 5));
+ buttonUp.Content = new Polygon()
+ {
+ Points = buttonUpPolygonPoints,
+ Fill = Brushes.Black,
+ SnapsToDevicePixels = true,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center
+ };
+
+
+ buttonDown = new RepeatButton();
+ buttonDown.Focusable = false;
+ buttonsGrid.Children.Add(buttonDown);
+ Grid.SetRow(buttonDown, 1);
+ buttonDown.Click += ButtonDown_Click;
+ buttonDown.Interval = 20;
+ buttonDown.Delay = 400;
+ buttonDown.MouseRightButtonUp += buttonDown_MouseRightButtonUp;
+ buttonDown.PreviewMouseLeftButtonDown += buttonDown_PreviewMouseLeftButtonDown;
+ var buttonDownPolygonPoints = new PointCollection(3);
+ buttonDownPolygonPoints.Add(new System.Windows.Point(0, 0));
+ buttonDownPolygonPoints.Add(new System.Windows.Point(3, 5));
+ buttonDownPolygonPoints.Add(new System.Windows.Point(6, 0));
+ buttonDown.Content = new Polygon()
+ {
+ Points = buttonDownPolygonPoints,
+ Fill = Brushes.Black,
+ SnapsToDevicePixels = true,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center
+ };
+
+ mainGrid.Children.Add(buttonsGrid);
+ Grid.SetColumn(buttonsGrid, 1);
+ Content = mainGrid;
+ }
+ private bool valueChangedByUser = false;
+ private void UpdateTextbox()
+ {
+ if (IsIndeterminate && !valueChangedByUser)
+ textBox.Text = IndeterminateMessage;
+ else
+ textBox.Text = string.Format("{0:N" + DecimalPlaces + "}", Value);
+ if (!Wrap)
+ {
+ buttonUp.IsEnabled = Value != MaximumValue && IsEnabled;
+ buttonDown.IsEnabled = Value != MinimumValue && IsEnabled;
+ }
+ }
+
+
+ private void UserControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ UpdateTextbox();
+ }
+
+ private void parseTextBox()
+ {
+ //Simulating GTK behavior by ignoring Culture and GroupSeperator
+ string stringValue = textBox.Text;
+ string[] stringSplitedValue = stringValue.Split('.', ',');
+ if (stringSplitedValue.Length > 1)
+ stringValue = stringSplitedValue[0] + "." + stringSplitedValue[1];
+ else
+ stringValue = stringSplitedValue[0];
+ double newValue = 0;
+ if (double.TryParse(stringValue, System.Globalization.NumberStyles.Number, CultureInfo.InvariantCulture, out newValue))
+ {
+ if (newValue > MaximumValue)
+ newValue = MaximumValue;
+ else if (newValue < MinimumValue)
+ newValue = MinimumValue;
+ Value = newValue;
+ }
+ else
+ Value = MinimumValue;
+ valueChangedByUser = true;
+ UpdateTextbox();
+ }
+
+ private void DecreaseValue(double valueToSubstract)
+ {
+ valueChangedByUser = true;
+ if (Wrap && Value == MinimumValue)
+ {
+ Value = MaximumValue;
+ }
+ else
+ {
+ if (Value - valueToSubstract < MinimumValue)
+ Value = MinimumValue;
+ else
+ Value -= valueToSubstract;
+ }
+ UpdateTextbox();
+ }
+
+ private void IncreaseValue(double valueToAdd)
+ {
+ valueChangedByUser = true;
+ if (Wrap && Value == MaximumValue)
+ {
+ Value = MinimumValue;
+ }
+ else
+ {
+ if (Value + valueToAdd > MaximumValue)
+ Value = MaximumValue;
+ else
+ Value += valueToAdd;
+ }
+ UpdateTextbox();
+ }
+
+ #endregion
+
+ #region UpDownButtons
+ private void ButtonUp_Click(object sender, RoutedEventArgs e)
+ {
+ double valueToAdd = 0;
+ if (!buttonUpJustPressed)
+ valueToAdd += ClimbRate;
+ buttonUpJustPressed = false;
+ valueToAdd += Increment;
+ IncreaseValue(valueToAdd);
+ }
+
+ private void ButtonDown_Click(object sender, RoutedEventArgs e)
+ {
+ double valueToSubstract = 0;
+ if (!buttonDownJustPressed)
+ valueToSubstract += ClimbRate;
+ buttonDownJustPressed = false;
+ valueToSubstract += Increment;
+ DecreaseValue(valueToSubstract);
+ }
+
+ private void buttonUp_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
+ {
+ Value = MaximumValue;
+ UpdateTextbox();
+ }
+
+ private void buttonDown_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
+ {
+ Value = MinimumValue;
+ UpdateTextbox();
+ }
+
+ private bool buttonUpJustPressed = false;
+ private bool buttonDownJustPressed = false;
+
+ private void buttonUp_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ buttonUpJustPressed = true;
+ }
+
+ private void buttonDown_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ buttonDownJustPressed = true;
+ }
+ #endregion
+
+ #region Keyboard
+ DispatcherTimer keyboardTimer;
+
+
+ private void textBox_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
+ {
+ if (e.Key == Key.Return || e.Key == Key.Tab)
+ parseTextBox();
+ else if (e.Key == Key.Up)
+ {
+ IncreaseValue(Increment);
+ StartKeyboardTimer();
+ }
+ else if (e.Key == Key.Down)
+ {
+ DecreaseValue(Increment);
+ StartKeyboardTimer();
+ }
+ else if (e.Key == Key.PageDown)
+ {
+ DecreaseValue(Increment * 10);
+ StartKeyboardTimer();
+ }
+ else if (e.Key == Key.PageUp)
+ {
+ IncreaseValue(Increment * 10);
+ StartKeyboardTimer();
+ }
+ pressedKey = e.Key;
+ }
+
+ private void textBox_PreviewKeyUp(object sender, System.Windows.Input.KeyEventArgs e)
+ {
+ if (e.Key == Key.PageUp || e.Key == Key.PageDown || e.Key == Key.Down || e.Key == Key.Up)
+ {
+ StopKeyboardTimer();
+ }
+ }
+
+ private void StartKeyboardTimer()
+ {
+ if (keyboardTimer == null)
+ {
+ keyboardTimer = new DispatcherTimer();
+ keyboardTimer.Tick += new EventHandler(OnKeyboardTimeout);
+ }
+ else
+ if (keyboardTimer.IsEnabled)
+ return;
+
+ keyboardTimer.Interval = TimeSpan.FromMilliseconds(buttonDown.Delay);
+ keyboardTimer.Start();
+ }
+ private void StopKeyboardTimer()
+ {
+ if (keyboardTimer != null)
+ keyboardTimer.Stop();
+ }
+
+ Key pressedKey;
+
+ private void OnKeyboardTimeout(object sender, EventArgs e)
+ {
+ TimeSpan interval = TimeSpan.FromMilliseconds(buttonDown.Interval);
+ if (keyboardTimer.Interval != interval)
+ keyboardTimer.Interval = interval;
+ switch (pressedKey)
+ {
+ case Key.Up:
+ IncreaseValue((Increment + ClimbRate));
+ break;
+ case Key.Down:
+ DecreaseValue((Increment + ClimbRate));
+ break;
+ case Key.PageUp:
+ IncreaseValue((Increment + ClimbRate) * 10);
+ break;
+ case Key.PageDown:
+ DecreaseValue((Increment + ClimbRate) * 10);
+ break;
+ default:
+ keyboardTimer.Stop();
+ break;
+ }
+ }
+ #endregion
+
+ #region MouseWheel
+ private void textBox_MouseWheel(object sender, MouseWheelEventArgs e)
+ {
+ if (e.Delta > 0)
+ IncreaseValue(Increment);
+ else
+ DecreaseValue(Increment);
+ }
+ #endregion
+ }
+}
diff --git a/external/xwt/Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs
new file mode 100644
index 0000000..b07c6d3
--- /dev/null
+++ b/external/xwt/Xwt.WPF/Xwt.WPFBackend/WpfDesktopBackend.cs
@@ -0,0 +1,81 @@
+//
+// WpfDesktopBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using SWF = System.Windows.Forms;
+using System.Collections.Generic;
+
+namespace Xwt.WPFBackend
+{
+ public class WpfDesktopBackend: DesktopBackend
+ {
+ public WpfDesktopBackend ()
+ {
+ Microsoft.Win32.SystemEvents.DisplaySettingsChanged += delegate
+ {
+ System.Windows.Application.Current.Dispatcher.BeginInvoke (new Action (OnScreensChanged));
+ };
+ }
+
+ #region implemented abstract members of DesktopBackend
+
+ public override Point GetMouseLocation()
+ {
+ var loc = SWF.Cursor.Position;
+ return new Point (loc.X, loc.Y);
+ }
+
+ public override IEnumerable<object> GetScreens ()
+ {
+ return SWF.Screen.AllScreens;
+ }
+
+ public override bool IsPrimaryScreen (object backend)
+ {
+ return ((SWF.Screen)backend) == SWF.Screen.PrimaryScreen;
+ }
+
+ public override Rectangle GetScreenBounds (object backend)
+ {
+ var r = ((SWF.Screen)backend).Bounds;
+ return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ }
+
+ public override Rectangle GetScreenVisibleBounds (object backend)
+ {
+ var r = ((SWF.Screen)backend).WorkingArea;
+ return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ }
+
+ public override string GetScreenDeviceName (object backend)
+ {
+ return ((SWF.Screen)backend).DeviceName;
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt.XamMac/Xwt.XamMac.csproj b/external/xwt/Xwt.XamMac/Xwt.XamMac.csproj
new file mode 100644
index 0000000..9944ec4
--- /dev/null
+++ b/external/xwt/Xwt.XamMac/Xwt.XamMac.csproj
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B570A438-DCCB-494A-B87C-5CB0113978DB}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Xwt.XamMac</RootNamespace>
+ <AssemblyName>Xwt.XamMac</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>none</DebugType>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="XamMac, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\Xwt.Mac\**\*.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/external/xwt/Xwt.sln b/external/xwt/Xwt.sln
index 14dcda3..3a34a3f 100644
--- a/external/xwt/Xwt.sln
+++ b/external/xwt/Xwt.sln
@@ -7,79 +7,414 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Gtk", "Xwt.Gtk\Xwt.Gtk.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Mac", "Xwt.Mac\Xwt.Mac.csproj", "{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacTest", "MacTest\MacTest.csproj", "{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.WPF", "Xwt.WPF\Xwt.WPF.csproj", "{C93D746E-1586-4D4F-B411-BF5A966E6A08}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Testing", "Testing", "{164E1FED-7688-4AE9-B19B-012F8784F9DD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkTestRunner", "Testing\GtkTestRunner.csproj", "{BC764278-4141-483C-8643-2EA8C40373B2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacTestRunner", "Testing\MacTestRunner.csproj", "{0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfTestRunner", "Testing\WpfTestRunner.csproj", "{C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestApps", "TestApps", "{83D74DDF-581E-4E2A-AE02-F4047A5B96C7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples", "Samples\Samples.csproj", "{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkTest", "GtkTest\GtkTest.csproj", "{0AF50CE4-E455-4A9D-92AD-711CBD068A55}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.WPF", "Xwt.WPF\Xwt.WPF.csproj", "{C93D746E-1586-4D4F-B411-BF5A966E6A08}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacTest", "MacTest\MacTest.csproj", "{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfTest", "WpfTest\WpfTest.csproj", "{E41F4448-15C3-4E95-B310-FD333FDF5D2F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MixedGtkMacTest", "MixedGtkMacTest\MixedGtkMacTest.csproj", "{14CF6E75-0D08-4BBD-B0F5-742196E5656D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ AppStore|Any CPU = AppStore|Any CPU
+ AppStore|Mixed Platforms = AppStore|Mixed Platforms
+ AppStore|x86 = AppStore|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Linux-Debug|Any CPU = Linux-Debug|Any CPU
+ Linux-Debug|Mixed Platforms = Linux-Debug|Mixed Platforms
+ Linux-Debug|x86 = Linux-Debug|x86
Mac-Debug|Any CPU = Mac-Debug|Any CPU
+ Mac-Debug|Mixed Platforms = Mac-Debug|Mixed Platforms
+ Mac-Debug|x86 = Mac-Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
Win-Debug|Any CPU = Win-Debug|Any CPU
- Linux-Debug|Any CPU = Linux-Debug|Any CPU
+ Win-Debug|Mixed Platforms = Win-Debug|Mixed Platforms
+ Win-Debug|x86 = Win-Debug|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|Any CPU.ActiveCfg = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|Any CPU.Build.0 = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|Mixed Platforms.ActiveCfg = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|Mixed Platforms.Build.0 = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|x86.ActiveCfg = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.AppStore|x86.Build.0 = AppStore|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Debug|x86.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Linux-Debug|x86.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Mac-Debug|x86.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|x86.ActiveCfg = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Release|x86.Build.0 = Release|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}.Win-Debug|x86.Build.0 = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|Mixed Platforms.ActiveCfg = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|Mixed Platforms.Build.0 = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|x86.ActiveCfg = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.AppStore|x86.Build.0 = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Debug|x86.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Debug|x86.Build.0 = Debug|x86
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|x86.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Linux-Debug|x86.Build.0 = Debug|x86
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|x86.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Mac-Debug|x86.Build.0 = Debug|x86
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|Mixed Platforms.Build.0 = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|x86.ActiveCfg = Release|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Release|x86.Build.0 = Release|x86
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|Any CPU.ActiveCfg = Debug|x86
{0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|Any CPU.Build.0 = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|x86.ActiveCfg = Debug|x86
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55}.Win-Debug|x86.Build.0 = Debug|x86
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Release|x86.ActiveCfg = Release|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Release|x86.ActiveCfg = Release|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Debug|x86.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Release|Any CPU.Build.0 = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Release|x86.ActiveCfg = Release|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Debug|x86.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Release|x86.ActiveCfg = Release|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Release|x86.ActiveCfg = Release|Any CPU
{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Release|x86.ActiveCfg = Release|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BC764278-4141-483C-8643-2EA8C40373B2}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.AppStore|Any CPU.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.AppStore|Mixed Platforms.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.AppStore|Mixed Platforms.Build.0 = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.AppStore|x86.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.AppStore|x86.Build.0 = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Debug|x86.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Debug|x86.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Linux-Debug|Any CPU.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Linux-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Linux-Debug|x86.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Linux-Debug|x86.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Mac-Debug|Any CPU.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Mac-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Mac-Debug|x86.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Mac-Debug|x86.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Release|Any CPU.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Release|Mixed Platforms.Build.0 = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Release|x86.ActiveCfg = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Release|x86.Build.0 = Release|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Win-Debug|Any CPU.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Win-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Win-Debug|x86.ActiveCfg = Debug|x86
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F}.Win-Debug|x86.Build.0 = Debug|x86
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Linux-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Linux-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Linux-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Linux-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Linux-Debug|x86.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Mac-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|x86.ActiveCfg = Release|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.AppStore|Mixed Platforms.ActiveCfg = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.AppStore|Mixed Platforms.Build.0 = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.AppStore|x86.ActiveCfg = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|x86.ActiveCfg = Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Linux-Debug|Any CPU.ActiveCfg = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Linux-Debug|Mixed Platforms.ActiveCfg = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Linux-Debug|Mixed Platforms.Build.0 = Linux-Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Linux-Debug|x86.ActiveCfg = Linux-Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Mac-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Mac-Debug|x86.ActiveCfg = Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Release|x86.ActiveCfg = Release|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Win-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Win-Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Win-Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {C93D746E-1586-4D4F-B411-BF5A966E6A08}.Win-Debug|x86.ActiveCfg = Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.AppStore|Mixed Platforms.ActiveCfg = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.AppStore|Mixed Platforms.Build.0 = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.AppStore|x86.ActiveCfg = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Debug|x86.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Debug|x86.Build.0 = Debug|x86
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Linux-Debug|Any CPU.ActiveCfg = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Linux-Debug|Mixed Platforms.ActiveCfg = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Linux-Debug|Mixed Platforms.Build.0 = Linux-Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Linux-Debug|x86.ActiveCfg = Linux-Debug|Any CPU
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Mac-Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Mac-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Mac-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Mac-Debug|x86.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Mac-Debug|x86.Build.0 = Debug|x86
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|Mixed Platforms.Build.0 = Release|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|x86.ActiveCfg = Release|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Release|x86.Build.0 = Release|x86
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|Any CPU.ActiveCfg = Debug|x86
{E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|Any CPU.Build.0 = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|Mixed Platforms.Build.0 = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|x86.ActiveCfg = Debug|x86
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F}.Win-Debug|x86.Build.0 = Debug|x86
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {BC764278-4141-483C-8643-2EA8C40373B2} = {164E1FED-7688-4AE9-B19B-012F8784F9DD}
+ {0017C823-67F6-4DFA-8C2C-E23CD1E33D8F} = {164E1FED-7688-4AE9-B19B-012F8784F9DD}
+ {C13CB518-B840-4FE7-AF3D-8C517A2FAD1F} = {164E1FED-7688-4AE9-B19B-012F8784F9DD}
+ {88C04B85-B69B-47B4-AB9F-64F6DD4E0897} = {83D74DDF-581E-4E2A-AE02-F4047A5B96C7}
+ {0AF50CE4-E455-4A9D-92AD-711CBD068A55} = {83D74DDF-581E-4E2A-AE02-F4047A5B96C7}
+ {2B7FF081-FE53-42F7-9D5D-D4B38E548F94} = {83D74DDF-581E-4E2A-AE02-F4047A5B96C7}
+ {E41F4448-15C3-4E95-B310-FD333FDF5D2F} = {83D74DDF-581E-4E2A-AE02-F4047A5B96C7}
+ {14CF6E75-0D08-4BBD-B0F5-742196E5656D} = {83D74DDF-581E-4E2A-AE02-F4047A5B96C7}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = GtkTest\GtkTest.csproj
diff --git a/external/xwt/Xwt/Xwt.Backends/ApplicationContext.cs b/external/xwt/Xwt/Xwt.Backends/ApplicationContext.cs
new file mode 100644
index 0000000..f53b462
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ApplicationContext.cs
@@ -0,0 +1,60 @@
+//
+// ToolkitContext.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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;
+
+
+namespace Xwt.Backends
+{
+ public class ApplicationContext
+ {
+ Toolkit toolkit;
+
+ internal ApplicationContext (Toolkit toolkit)
+ {
+ this.toolkit = toolkit;
+ }
+
+ public bool InvokeUserCode (Action a)
+ {
+ return toolkit.Invoke (a);
+ }
+
+ public void EnterUserCode ()
+ {
+ toolkit.EnterUserCode ();
+ }
+
+ public void ExitUserCode (Exception error)
+ {
+ toolkit.ExitUserCode (error);
+ }
+
+ public Toolkit Toolkit {
+ get { return toolkit; }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/BackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/BackendHandler.cs
new file mode 100644
index 0000000..1c4623c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/BackendHandler.cs
@@ -0,0 +1,42 @@
+//
+// IBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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;
+
+
+namespace Xwt.Backends
+{
+ public abstract class BackendHandler
+ {
+ internal void Initialize (Toolkit toolkit)
+ {
+ ApplicationContext = toolkit.Context;
+ }
+
+ protected ApplicationContext ApplicationContext { get; private set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/BackendHost.cs b/external/xwt/Xwt/Xwt.Backends/BackendHost.cs
index ae50489..d7a0743 100644
--- a/external/xwt/Xwt/Xwt.Backends/BackendHost.cs
+++ b/external/xwt/Xwt/Xwt.Backends/BackendHost.cs
@@ -25,16 +25,12 @@
// THE SOFTWARE.
using System;
using System.Collections.Generic;
-using Xwt.Engine;
+
namespace Xwt.Backends
{
public class BackendHost<T,B>: BackendHost where B:IBackend
{
- public BackendHost ()
- {
- }
-
public new T Parent {
get { return (T)base.Parent; }
set { base.Parent = value; }
@@ -44,18 +40,20 @@ namespace Xwt.Backends
get { return (B)base.Backend; }
}
}
-
+
public class BackendHost
{
IBackend backend;
bool usingCustomBackend;
-
+ Toolkit engine;
+
HashSet<object> defaultEnabledEvents;
public BackendHost ()
{
+ engine = Toolkit.CurrentEngine;
}
-
+
public void SetCustomBackend (IBackend backend)
{
this.backend = backend;
@@ -70,7 +68,22 @@ namespace Xwt.Backends
return backend;
}
}
-
+
+ public Toolkit ToolkitEngine {
+ get {
+ if (engine != null)
+ return engine;
+ return engine = Toolkit.CurrentEngine;
+ }
+ internal set {
+ engine = value;
+ }
+ }
+
+ internal ToolkitEngineBackend EngineBackend {
+ get { return ToolkitEngine.Backend; }
+ }
+
internal bool BackendCreated {
get { return backend != null; }
}
@@ -83,14 +96,7 @@ namespace Xwt.Backends
protected virtual IBackend OnCreateBackend ()
{
- Type t = Parent.GetType ();
- while (t != typeof(object)) {
- IBackend b = WidgetRegistry.CreateBackend<IBackend> (t);
- if (b != null)
- return b;
- t = t.BaseType;
- }
- return null;
+ return EngineBackend.CreateBackendForFrontend (Parent.GetType ());
}
public void EnsureBackendLoaded ()
@@ -103,14 +109,14 @@ namespace Xwt.Backends
{
if (usingCustomBackend) {
usingCustomBackend = false;
- backend.InitializeBackend (Parent);
+ backend.InitializeBackend (Parent, engine.Context);
OnBackendCreated ();
}
else if (backend == null) {
backend = OnCreateBackend ();
if (backend == null)
throw new InvalidOperationException ("No backend found for object: " + Parent.GetType ());
- backend.InitializeBackend (Parent);
+ backend.InitializeBackend (Parent, engine.Context);
OnBackendCreated ();
}
}
@@ -123,7 +129,7 @@ namespace Xwt.Backends
public void OnAfterEventRemove (object eventId, Delegate eventDelegate)
{
- if (eventDelegate != null && !DefaultEnabledEvents.Contains (eventId))
+ if (eventDelegate == null && !DefaultEnabledEvents.Contains (eventId))
Backend.DisableEvent (eventId);
}
diff --git a/external/xwt/Xwt/Xwt.Backends/BackendTypeAttribute.cs b/external/xwt/Xwt/Xwt.Backends/BackendTypeAttribute.cs
new file mode 100644
index 0000000..27679be
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/BackendTypeAttribute.cs
@@ -0,0 +1,44 @@
+//
+// BackendTypeAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ [AttributeUsage (AttributeTargets.Class)]
+ public class BackendTypeAttribute: Attribute
+ {
+ public BackendTypeAttribute (Type type)
+ {
+ Type = type;
+ }
+
+ public Type Type {
+ get;
+ private set;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ClipboardBackend.cs b/external/xwt/Xwt/Xwt.Backends/ClipboardBackend.cs
new file mode 100644
index 0000000..7663d98
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ClipboardBackend.cs
@@ -0,0 +1,41 @@
+//
+// IClipboardBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public abstract class ClipboardBackend: BackendHandler
+ {
+ public abstract void Clear ();
+ public abstract void SetData (TransferDataType type, Func<object> dataSource);
+
+ public abstract bool IsTypeAvailable (TransferDataType type);
+ public abstract object GetData (TransferDataType type);
+ public abstract IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state);
+ public abstract object EndGetData (IAsyncResult ares);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ContextBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/ContextBackendHandler.cs
new file mode 100644
index 0000000..1860f2b
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ContextBackendHandler.cs
@@ -0,0 +1,84 @@
+//
+// IContextBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+// Hywel Thomas <hywel.w.thomas at gmail.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public abstract class ContextBackendHandler: DrawingPathBackendHandler
+ {
+ public abstract void Save (object backend);
+
+ public abstract void Restore (object backend);
+
+ public abstract void Clip (object backend);
+
+ public abstract void ClipPreserve(object backend);
+
+ public abstract void Fill (object backend);
+
+ public abstract void FillPreserve (object backend);
+
+ public abstract void NewPath (object backend);
+
+ public abstract void Stroke (object backend);
+
+ public abstract void StrokePreserve (object backend);
+
+ public abstract void SetColor (object backend, Xwt.Drawing.Color color);
+
+ public abstract void SetLineWidth (object backend, double width);
+
+ public abstract void SetLineDash (object backend, double offset, params double[] pattern);
+
+ public abstract void SetPattern (object backend, object p);
+
+ public abstract void DrawTextLayout (object backend, TextLayout layout, double x, double y);
+
+ public abstract void DrawImage (object backend, ImageDescription img, double x, double y);
+
+ public abstract void DrawImage (object backend, ImageDescription img, Rectangle srcRect, Rectangle destRect);
+
+ public abstract void Rotate (object backend, double angle);
+
+ public abstract void Scale (object backend, double scaleX, double scaleY);
+
+ public abstract void Translate (object backend, double tx, double ty);
+
+ public abstract Matrix GetCTM (object backend);
+
+ public abstract bool IsPointInStroke (object backend, double x, double y);
+
+ /// <summary>
+ /// Sets a global alpha to be applied to all drawing operations.
+ /// It doesn't affect colors that have already been set.
+ /// </summary>
+ public abstract void SetGlobalAlpha (object backend, double globalAlpha);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/DesktopBackend.cs b/external/xwt/Xwt/Xwt.Backends/DesktopBackend.cs
new file mode 100644
index 0000000..0a6377b
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/DesktopBackend.cs
@@ -0,0 +1,96 @@
+//
+// DesktopBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public abstract class DesktopBackend: BackendHandler
+ {
+ /// <summary>
+ /// Gets the current global mouse location.
+ /// </summary>
+ /// <returns>The mouse location.</returns>
+ public abstract Point GetMouseLocation ();
+
+ /// <summary>
+ /// List of screens that compose the desktop
+ /// </summary>
+ public abstract IEnumerable<object> GetScreens ();
+
+ /// <summary>
+ /// Determines whether the provided screen is the primary screen
+ /// </summary>
+ /// <returns><c>true</c> if the screen is the primary screen; otherwise, <c>false</c>.</returns>
+ /// <param name="backend">Screen backend</param>
+ /// <remarks>The primary screen is considered the screen where the 'main desktop' lives.</remarks>
+ public abstract bool IsPrimaryScreen (object backend);
+
+ /// <summary>
+ /// Gets the bounds of a screen, in desktop coordinates
+ /// </summary>
+ /// <returns>The screen bounds.</returns>
+ /// <param name="backend">A screen backend</param>
+ public abstract Rectangle GetScreenBounds (object backend);
+
+ /// <summary>
+ /// Gets the visible bounds of a screen (excluding dock area and other decorations), in desktop coordinates
+ /// </summary>
+ /// <returns>The screen bounds.</returns>
+ /// <param name="backend">A screen backend</param>
+ public abstract Rectangle GetScreenVisibleBounds (object backend);
+
+ /// <summary>
+ /// Gets the name of the screen device.
+ /// </summary>
+ /// <returns>The screen device name.</returns>
+ /// <param name="backend">A screen backend</param>
+ public abstract string GetScreenDeviceName (object backend);
+
+ /// <summary>
+ /// Gets the scale factor for the screen.
+ /// </summary>
+ /// <returns>The scale factor.</returns>
+ /// <param name="backend">A screen backend</param>
+ /// <remarks>The normal value is 1. In a retina display the value is 2.</remarks>
+ public virtual double GetScaleFactor (object backend)
+ {
+ return 1d;
+ }
+
+ /// <summary>
+ /// Raises the ScreensChanged event.
+ /// </summary>
+ /// <remarks>To be called by the subclass when there is a change in the configuration of screens</remarks>
+ public void OnScreensChanged ()
+ {
+ ApplicationContext.InvokeUserCode (delegate {
+ Desktop.NotifyScreensChanged ();
+ });
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/DisposableResourceBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/DisposableResourceBackendHandler.cs
new file mode 100644
index 0000000..992aa82
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/DisposableResourceBackendHandler.cs
@@ -0,0 +1,41 @@
+//
+// ResourceBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public class DisposableResourceBackendHandler: BackendHandler
+ {
+ public virtual bool DisposeHandleOnUiThread {
+ get { return false; }
+ }
+
+ public virtual void Dispose (object backend)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/DrawingPathBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/DrawingPathBackendHandler.cs
new file mode 100644
index 0000000..1502203
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/DrawingPathBackendHandler.cs
@@ -0,0 +1,63 @@
+//
+// DrawingPathBackendHandler.cs
+//
+// Author:
+// Alex Corrado <corrado at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public abstract class DrawingPathBackendHandler: DisposableResourceBackendHandler
+ {
+ public abstract void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2);
+
+ public abstract void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2);
+
+ public abstract void ClosePath (object backend);
+
+ public abstract void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3);
+
+ public abstract void LineTo (object backend, double x, double y);
+
+ public abstract void MoveTo (object backend, double x, double y);
+
+ public abstract void Rectangle (object backend, double x, double y, double width, double height);
+
+ public abstract void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
+
+ public abstract void RelLineTo (object backend, double dx, double dy);
+
+ public abstract void RelMoveTo (object backend, double dx, double dy);
+
+ public abstract object CreatePath ();
+
+ public abstract object CopyPath (object backend);
+
+ public abstract void AppendPath (object backend, object otherBackend);
+
+ public abstract bool IsPointInFill (object backend, double x, double y);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/EngineBackend.cs b/external/xwt/Xwt/Xwt.Backends/EngineBackend.cs
deleted file mode 100755
index 881f4e5..0000000
--- a/external/xwt/Xwt/Xwt.Backends/EngineBackend.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-//
-// EngineBackend.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-// Eric Maupin <ermau at xamarin.com>
-//
-// Copyright (c) 2011-2012 Xamarin Inc
-//
-// 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.Reflection;
-using System.IO;
-using Xwt.Drawing;
-using Xwt.Engine;
-
-namespace Xwt.Backends
-{
- public abstract class EngineBackend
- {
- /// <summary>
- /// Initializes the application.
- /// </summary>
- public virtual void InitializeApplication ()
- {
- }
-
- /// <summary>
- /// Runs the main GUI loop
- /// </summary>
- public abstract void RunApplication ();
-
- /// <summary>
- /// Exits the main GUI loop
- /// </summary>
- public abstract void ExitApplication ();
-
- /// <summary>
- /// Asynchronously invokes <paramref name="action"/> on the engine UI thread.
- /// </summary>
- /// <param name="action">The action to invoke.</param>
- /// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
- public abstract void InvokeAsync (Action action);
-
- /// <summary>
- /// Begins invoking <paramref name="action"/> on a timer period of <paramref name="timeSpan"/>.
- /// </summary>
- /// <param name="action">The function to invoke. Returning <c>false</c> stops the timer.</param>
- /// <param name="timeSpan">The period before the initial invoke and between subsequent invokes.</param>
- /// <returns>An identifying object that can be used to cancel the timer with <seealso cref="CancelTimerInvoke"/>.</returns>
- /// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
- /// <seealso cref="CancelTimerInvoke"/>
- public abstract object TimerInvoke (Func<bool> action, TimeSpan timeSpan);
-
- /// <summary>
- /// Cancels an invoke timer started from <see cref="TimerInvoke"/>.
- /// </summary>
- /// <param name="id">The unique object returned from <see cref="TimerInvoke"/>.</param>
- /// <exception cref="ArgumentNullException"><paramref name="id"/> is <c>null</c>.</exception>
- public abstract void CancelTimerInvoke (object id);
-
- /// <summary>
- /// Gets a reference to the native widget wrapped by an XWT widget
- /// </summary>
- /// <returns>
- /// The native widget.
- /// </returns>
- /// <param name='w'>
- /// A widget
- /// </param>
- public abstract object GetNativeWidget (Widget w);
-
- /// <summary>
- /// Gets a reference to the image object wrapped by an XWT Image
- /// </summary>
- /// <returns>
- /// The native image.
- /// </returns>
- /// <param name='image'>
- /// An image.
- /// </param>
- public virtual object GetNativeImage (Image image)
- {
- return WidgetRegistry.GetBackend (image);
- }
-
- public virtual void ShowWebBrowser (NavigateToUrlEventArgs e)
- {
- if (!e.Handled && e.Uri != null) {
- System.Diagnostics.Process.Start (e.Uri.ToString ());
- e.SetHandled ();
- }
- }
-
- /// <summary>
- /// Dispatches pending events in the UI event queue
- /// </summary>
- public abstract void DispatchPendingEvents ();
-
- /// <summary>
- /// Gets the backend for a native window.
- /// </summary>
- /// <returns>
- /// The backend for the window.
- /// </returns>
- /// <param name='nativeWindow'>
- /// A native window reference.
- /// </param>
- public abstract IWindowFrameBackend GetBackendForWindow (object nativeWindow);
-
- /// <summary>
- /// Gets the native parent window of a widget
- /// </summary>
- /// <returns>
- /// The native parent window.
- /// </returns>
- /// <param name='w'>
- /// A widget
- /// </param>
- /// <remarks>
- /// This method is used by XWT to get the window of a widget, when the widget is
- /// embedded in a native application
- /// </remarks>
- public virtual object GetNativeParentWindow (Widget w)
- {
- return null;
- }
-
- /// <summary>
- /// Gets a value indicating whether this <see cref="Xwt.Backends.EngineBackend"/> handles size negotiation on its own
- /// </summary>
- /// <value>
- /// <c>true</c> if the engine backend handles size negotiation; otherwise, <c>false</c>.
- /// </value>
- public virtual bool HandlesSizeNegotiation {
- get { return false; }
- }
-
- /// <summary>
- /// Registers a callback to be invoked just before the execution returns to the main loop
- /// </summary>
- /// <param name='action'>
- /// Callback to execute
- /// </param>
- /// <remarks>
- /// The default implementation does the invocation using InvokeAsync.
- /// </remarks>
- public virtual void InvokeBeforeMainLoop (Action action)
- {
- InvokeAsync (action);
- }
-
- /// <summary>
- /// Determines whether a widget has a native parent widget
- /// </summary>
- /// <returns><c>true</c> if the widget has native parent; otherwise, <c>false</c>.</returns>
- /// <param name="w">The widget.</param>
- /// <remarks>This funciton is used to determine if a widget is a child of another non-XWT widget
- /// </remarks>
- public abstract bool HasNativeParent (Widget w);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/ExtensionMethods.cs b/external/xwt/Xwt/Xwt.Backends/ExtensionMethods.cs
new file mode 100644
index 0000000..c24a570
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ExtensionMethods.cs
@@ -0,0 +1,75 @@
+//
+// ExtensionMethods.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public static class ExtensionMethods
+ {
+ public static object GetBackend (this XwtComponent obj)
+ {
+ if (obj != null)
+ return ((IFrontend)obj).Backend;
+ else
+ return null;
+ }
+
+ public static IWidgetBackend GetBackend (this Widget obj)
+ {
+ if (obj != null)
+ return (IWidgetBackend)((IFrontend)obj).Backend;
+ else
+ return null;
+ }
+
+ public static object GetBackend (this XwtObject obj)
+ {
+ if (obj != null)
+ return ((IFrontend)obj).Backend;
+ else
+ return null;
+ }
+
+ public static ImageDescription ToImageDescription (this Image img)
+ {
+ return img != null ? img.ImageDescription : ImageDescription.Null;
+ }
+
+ public static double GetValue (this WidgetPlacement al)
+ {
+ switch (al) {
+ case WidgetPlacement.Center:
+ return 0.5;
+ case WidgetPlacement.End:
+ return 1;
+ default:
+ return 0;
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/FontBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/FontBackendHandler.cs
new file mode 100644
index 0000000..49b4144
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/FontBackendHandler.cs
@@ -0,0 +1,141 @@
+//
+// IFontBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+using System.Collections.Generic;
+
+namespace Xwt.Backends
+{
+ public abstract class FontBackendHandler: BackendHandler
+ {
+ Font systemFont;
+ Font systemMonospaceFont;
+ Font systemSerifFont;
+ Font systemSansSerifFont;
+
+ internal Font SystemFont {
+ get {
+ if (systemFont == null)
+ systemFont = new Font (GetSystemDefaultFont (), ApplicationContext.Toolkit);
+ return systemFont;
+ }
+ }
+
+ internal Font SystemMonospaceFont {
+ get {
+ if (systemMonospaceFont == null) {
+ var f = GetSystemDefaultMonospaceFont ();
+ if (f != null)
+ systemMonospaceFont = new Font (f, ApplicationContext.Toolkit);
+ else
+ systemMonospaceFont = SystemFont.WithFamily ("Courier New, Courier, monospace");
+ }
+ return systemMonospaceFont;
+ }
+ }
+
+ internal Font SystemSerifFont {
+ get {
+ if (systemSerifFont == null) {
+ var f = GetSystemDefaultSerifFont ();
+ if (f != null)
+ systemSerifFont = new Font (f, ApplicationContext.Toolkit);
+ else
+ systemSerifFont = SystemFont.WithFamily ("Times New Roman, Times, serif");
+ }
+ return systemSerifFont;
+ }
+ }
+
+ internal Font SystemSansSerifFont {
+ get {
+ if (systemSansSerifFont == null) {
+ var f = GetSystemDefaultSansSerifFont ();
+ if (f != null)
+ systemSansSerifFont = new Font (f, ApplicationContext.Toolkit);
+ else
+ systemSansSerifFont = SystemFont.WithFamily ("Lucida Sans Unicode, Lucida Grande, Arial, Helvetica, sans-serif");
+ }
+ return systemSansSerifFont;
+ }
+ }
+
+ public abstract object GetSystemDefaultFont ();
+
+ /// <summary>
+ /// Gets the system default serif font, or null if there is no default for such font
+ /// </summary>
+ public virtual object GetSystemDefaultSerifFont ()
+ {
+ return null;
+ }
+
+ /// <summary>
+ /// Gets the system default sans-serif font, or null if there is no default for such font
+ /// </summary>
+ public virtual object GetSystemDefaultSansSerifFont ()
+ {
+ return null;
+ }
+
+ /// <summary>
+ /// Gets the system default monospace font, or null if there is no default for such font
+ /// </summary>
+ public virtual object GetSystemDefaultMonospaceFont ()
+ {
+ return null;
+ }
+
+ public abstract IEnumerable<string> GetInstalledFonts ();
+
+ /// <summary>
+ /// Creates a new font. Returns null if the font family is not available in the system
+ /// </summary>
+ /// <param name="fontName">Font family name</param>
+ /// <param name="size">Size in points</param>
+ /// <param name="style">Style</param>
+ /// <param name="weight">Weight</param>
+ /// <param name="stretch">Stretch</param>
+ public abstract object Create (string fontName, double size, FontStyle style, FontWeight weight, FontStretch stretch);
+
+ public abstract object Copy (object handle);
+
+ public abstract object SetSize (object handle, double size);
+ public abstract object SetFamily (object handle, string family);
+ public abstract object SetStyle (object handle, FontStyle style);
+ public abstract object SetWeight (object handle, FontWeight weight);
+ public abstract object SetStretch (object handle, FontStretch stretch);
+
+ public abstract double GetSize (object handle);
+ public abstract string GetFamily (object handle);
+ public abstract FontStyle GetStyle (object handle);
+ public abstract FontWeight GetWeight (object handle);
+ public abstract FontStretch GetStretch (object handle);
+
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/GnomeSystemBackend.cs b/external/xwt/Xwt/Xwt.Backends/GnomeSystemBackend.cs
new file mode 100644
index 0000000..2361bc5
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/GnomeSystemBackend.cs
@@ -0,0 +1,37 @@
+//
+// GnomeSystemBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ class GnomeSystemBackend: SystemBackend
+ {
+ public GnomeSystemBackend ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/GradientBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/GradientBackendHandler.cs
new file mode 100644
index 0000000..d54f8eb
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/GradientBackendHandler.cs
@@ -0,0 +1,39 @@
+//
+// IGradientBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public abstract class GradientBackendHandler: DisposableResourceBackendHandler
+ {
+ public abstract object CreateLinear (double x0, double y0, double x1, double y1);
+ public abstract object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1);
+ public abstract void AddColorStop (object backend, double position, Color color);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/IAlertDialogBackend.cs b/external/xwt/Xwt/Xwt.Backends/IAlertDialogBackend.cs
index e7ba183..491a1b0 100644
--- a/external/xwt/Xwt/Xwt.Backends/IAlertDialogBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IAlertDialogBackend.cs
@@ -30,6 +30,8 @@ namespace Xwt.Backends
{
public interface IAlertDialogBackend: IDisposable
{
+ void Initialize (ApplicationContext context);
+
Command Run (WindowFrame transientFor, MessageDescription message);
bool ApplyToAll { get; }
diff --git a/external/xwt/Xwt/Xwt.Backends/IBackend.cs b/external/xwt/Xwt/Xwt.Backends/IBackend.cs
index 76f3284..0e4fd8e 100755
--- a/external/xwt/Xwt/Xwt.Backends/IBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IBackend.cs
@@ -26,11 +26,12 @@
using System;
-namespace Xwt
+
+namespace Xwt.Backends
{
public interface IBackend
{
- void InitializeBackend (object frontend);
+ void InitializeBackend (object frontend, ApplicationContext context);
void EnableEvent (object eventId);
void DisableEvent (object eventId);
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IBackendHandler.cs
deleted file mode 100644
index 2c60679..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IBackendHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// IBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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;
-
-namespace Xwt.Backends
-{
- public interface IBackendHandler
- {
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IButtonBackend.cs b/external/xwt/Xwt/Xwt.Backends/IButtonBackend.cs
index 39e5272..ffde146 100755
--- a/external/xwt/Xwt/Xwt.Backends/IButtonBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IButtonBackend.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
+using Xwt.Drawing;
namespace Xwt.Backends
{
@@ -32,7 +33,7 @@ namespace Xwt.Backends
{
void SetButtonStyle (ButtonStyle style);
void SetButtonType (ButtonType type);
- void SetContent (string label, object imageBackend, ContentPosition position);
+ void SetContent (string label, ImageDescription image, ContentPosition position);
}
public interface IButtonEventSink: IWidgetEventSink
diff --git a/external/xwt/Xwt/Xwt.Backends/ICanvasCellViewFrontend.cs b/external/xwt/Xwt/Xwt.Backends/ICanvasCellViewFrontend.cs
new file mode 100644
index 0000000..fdf50b4
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ICanvasCellViewFrontend.cs
@@ -0,0 +1,39 @@
+//
+// ICanvasCellViewFrontend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ICanvasCellViewFrontend: ICellViewFrontend
+ {
+ ApplicationContext ApplicationContext { get; }
+ void Draw (object ctxBackend, Rectangle cellArea);
+ Rectangle GetDrawingAreaForBounds (Rectangle cellBounds);
+ Size GetRequiredSize ();
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ICellViewFrontend.cs b/external/xwt/Xwt/Xwt.Backends/ICellViewFrontend.cs
new file mode 100644
index 0000000..3fb370f
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ICellViewFrontend.cs
@@ -0,0 +1,36 @@
+//
+// ICellViewFrontend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ICellViewFrontend
+ {
+ void Initialize (ICellDataSource source);
+ bool Visible { get; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ICheckBoxCellViewFrontend.cs b/external/xwt/Xwt/Xwt.Backends/ICheckBoxCellViewFrontend.cs
new file mode 100644
index 0000000..b8d6902
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ICheckBoxCellViewFrontend.cs
@@ -0,0 +1,40 @@
+//
+// ICheckBoxCellViewFrontend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ICheckBoxCellViewFrontend: ICellViewFrontend
+ {
+ bool Active { get; }
+ bool Editable { get; }
+
+ bool RaiseToggled ();
+
+ IDataField<bool> ActiveField { get; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/IChildPlacementHandler.cs b/external/xwt/Xwt/Xwt.Backends/IChildPlacementHandler.cs
new file mode 100644
index 0000000..c8934e0
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/IChildPlacementHandler.cs
@@ -0,0 +1,38 @@
+//
+// IChildPlacementHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+
+ public interface IChildPlacementHandler
+ {
+ void UpdateChildPlacement (IWidgetBackend childBackend);
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Backends/IClipboardBackend.cs b/external/xwt/Xwt/Xwt.Backends/IClipboardBackend.cs
deleted file mode 100644
index e13f343..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IClipboardBackend.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// IClipboardBackend.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc
-//
-// 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;
-
-namespace Xwt.Backends
-{
- public interface IClipboardBackend
- {
- void Clear ();
- void SetData (TransferDataType type, Func<object> dataSource);
-
- bool IsTypeAvailable (TransferDataType type);
- object GetData (TransferDataType type);
- IAsyncResult BeginGetData (TransferDataType type, AsyncCallback callback, object state);
- object EndGetData (IAsyncResult ares);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IContextBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IContextBackendHandler.cs
deleted file mode 100644
index 7a2df00..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IContextBackendHandler.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// IContextBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-// Hywel Thomas <hywel.w.thomas at gmail.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-
-namespace Xwt.Backends
-{
- public interface IContextBackendHandler: IBackendHandler
- {
- void Save (object backend);
-
- void Restore (object backend);
-
- void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2);
-
- void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2);
-
- void Clip (object backend);
-
- void ClipPreserve(object backend);
-
- void ClosePath(object backend);
-
- void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3);
-
- void Fill (object backend);
-
- void FillPreserve (object backend);
-
- void LineTo (object backend, double x, double y);
-
- void MoveTo (object backend, double x, double y);
-
- void NewPath (object backend);
-
- void Rectangle (object backend, double x, double y, double width, double height);
-
- void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
-
- void RelLineTo (object backend, double dx, double dy);
-
- void RelMoveTo (object backend, double dx, double dy);
-
- void Stroke (object backend);
-
- void StrokePreserve (object backend);
-
- void SetColor (object backend, Xwt.Drawing.Color color);
-
- void SetLineWidth (object backend, double width);
-
- void SetLineDash (object backend, double offset, params double[] pattern);
-
- void SetPattern (object backend, object p);
-
- void SetFont (object backend, Font font);
-
- void DrawTextLayout (object backend, TextLayout layout, double x, double y);
-
- void DrawImage (object backend, object img, double x, double y, double alpha);
-
- void DrawImage (object backend, object img, double x, double y, double width, double height, double alpha);
-
- void DrawImage (object backend, object img, Rectangle srcRect, Rectangle destRect, double alpha);
-
- void Rotate (object backend, double angle);
-
- void Scale (object backend, double scaleX, double scaleY);
-
- void Translate (object backend, double tx, double ty);
-
- void TransformPoint (object backend, ref double x, ref double y);
-
- void TransformDistance (object backend, ref double dx, ref double dy);
-
- void TransformPoints (object backend, Point[] points);
-
- void TransformDistances (object backend, Distance[] vectors);
-
- /// <summary>
- /// Sets a global alpha to be applied to all drawing operations.
- /// It doesn't affect colors that have already been set.
- /// </summary>
- void SetGlobalAlpha (object backend, double globalAlpha);
-
- void Dispose (object backend);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/ICustomWidgetBackend.cs b/external/xwt/Xwt/Xwt.Backends/ICustomWidgetBackend.cs
index bfd4fbe..8bdac0f 100644
--- a/external/xwt/Xwt/Xwt.Backends/ICustomWidgetBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ICustomWidgetBackend.cs
@@ -27,7 +27,7 @@ using System;
namespace Xwt.Backends
{
- public interface ICustomWidgetBackend: IWidgetBackend
+ public interface ICustomWidgetBackend: IWidgetBackend, IChildPlacementHandler
{
void SetContent (IWidgetBackend widget);
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IEmbeddedWidgetBackend.cs b/external/xwt/Xwt/Xwt.Backends/IEmbeddedWidgetBackend.cs
new file mode 100644
index 0000000..e38e54c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/IEmbeddedWidgetBackend.cs
@@ -0,0 +1,70 @@
+//
+// IEmbeddedWidgetBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface IEmbeddedWidgetBackend: IWidgetBackend
+ {
+ void SetContent (object nativeWidget);
+ }
+
+ [BackendType (typeof(IEmbeddedWidgetBackend))]
+ internal class EmbeddedNativeWidget: Widget
+ {
+ object nativeWidget;
+ Widget sourceWidget;
+
+ class EmbeddedNativeWidgetBackendHost: WidgetBackendHost<EmbeddedNativeWidget,IEmbeddedWidgetBackend>
+ {
+ protected override void OnBackendCreated ()
+ {
+ Backend.SetContent (Parent.nativeWidget);
+ base.OnBackendCreated ();
+ }
+ }
+
+ protected override Xwt.Backends.BackendHost CreateBackendHost ()
+ {
+ return new EmbeddedNativeWidgetBackendHost ();
+ }
+
+ public EmbeddedNativeWidget (object nativeWidget, Widget sourceWidget)
+ {
+ this.nativeWidget = nativeWidget;
+ this.sourceWidget = sourceWidget;
+ }
+
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
+ {
+ if (sourceWidget != null)
+ return sourceWidget.Surface.GetPreferredSize (widthConstraint, heightConstraint);
+ else
+ return Size.Zero;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/IExpandBackend.cs b/external/xwt/Xwt/Xwt.Backends/IExpandBackend.cs
index c1bc21a..8c50fa9 100644
--- a/external/xwt/Xwt/Xwt.Backends/IExpandBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IExpandBackend.cs
@@ -2,7 +2,7 @@ using System;
namespace Xwt.Backends
{
- public interface IExpanderBackend
+ public interface IExpanderBackend: IWidgetBackend, IChildPlacementHandler
{
string Label { get; set; }
bool Expanded { get; set; }
diff --git a/external/xwt/Xwt/Xwt.Backends/IFontBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IFontBackendHandler.cs
deleted file mode 100644
index 6e7a8f2..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IFontBackendHandler.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// IFontBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-
-namespace Xwt.Backends
-{
- public interface IFontBackendHandler: IBackendHandler
- {
- object Create (string fontName, double size, FontSizeUnit sizeUnit, FontStyle style, FontWeight weight, FontStretch stretch);
- object Copy (object handle);
-
- object SetSize (object handle, double size, FontSizeUnit unit);
- object SetFamily (object handle, string family);
- object SetStyle (object handle, FontStyle style);
- object SetWeight (object handle, FontWeight weight);
- object SetStretch (object handle, FontStretch stretch);
-
- double GetSize (object handle);
- string GetFamily (object handle);
- FontStyle GetStyle (object handle);
- FontWeight GetWeight (object handle);
- FontStretch GetStretch (object handle);
-
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IFrameBackend.cs b/external/xwt/Xwt/Xwt.Backends/IFrameBackend.cs
index 977291c..6c03d17 100644
--- a/external/xwt/Xwt/Xwt.Backends/IFrameBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IFrameBackend.cs
@@ -28,7 +28,7 @@ using Xwt.Drawing;
namespace Xwt.Backends
{
- public interface IFrameBackend: IWidgetBackend
+ public interface IFrameBackend: IWidgetBackend, IChildPlacementHandler
{
string Label { get; set; }
Color BorderColor { get; set; }
diff --git a/external/xwt/Xwt/Xwt.Backends/IFrontend.cs b/external/xwt/Xwt/Xwt.Backends/IFrontend.cs
index 93d06fa..c56d33e 100644
--- a/external/xwt/Xwt/Xwt.Backends/IFrontend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IFrontend.cs
@@ -25,11 +25,13 @@
// THE SOFTWARE.
using System;
+
namespace Xwt.Backends
{
- interface IFrontend
+ internal interface IFrontend
{
object Backend { get; }
+ Toolkit ToolkitEngine { get; }
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IGradientBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IGradientBackendHandler.cs
deleted file mode 100644
index 53c0ddb..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IGradientBackendHandler.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// IGradientBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-
-namespace Xwt.Backends
-{
- public interface IGradientBackendHandler: IBackendHandler
- {
- object CreateLinear (double x0, double y0, double x1, double y1);
- object CreateRadial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1);
- void AddColorStop (object backend, double position, Color color);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IImageBuilderBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IImageBuilderBackendHandler.cs
deleted file mode 100644
index 1240237..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IImageBuilderBackendHandler.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// IImageBuilder.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-
-namespace Xwt.Backends
-{
- public interface IImageBuilderBackendHandler: IBackendHandler
- {
- object CreateImageBuilder (int width, int height, ImageFormat format);
- object CreateContext (object backend);
- object CreateImage (object backend);
- void Dispose (object backend);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IImageCellViewFrontend.cs b/external/xwt/Xwt/Xwt.Backends/IImageCellViewFrontend.cs
new file mode 100644
index 0000000..afb90d6
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/IImageCellViewFrontend.cs
@@ -0,0 +1,36 @@
+//
+// IImageCellViewFrontend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public interface IImageCellViewFrontend: ICellViewFrontend
+ {
+ Image Image { get; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/IImagePatternBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/IImagePatternBackendHandler.cs
deleted file mode 100644
index 97613b5..0000000
--- a/external/xwt/Xwt/Xwt.Backends/IImagePatternBackendHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// IImagePatternBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc
-//
-// 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;
-
-namespace Xwt.Backends
-{
- public interface IImagePatternBackendHandler: IBackendHandler
- {
- object Create (object img);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/IImageViewBackend.cs b/external/xwt/Xwt/Xwt.Backends/IImageViewBackend.cs
index d156ad8..69014d1 100644
--- a/external/xwt/Xwt/Xwt.Backends/IImageViewBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IImageViewBackend.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Drawing;
namespace Xwt.Backends
{
@@ -32,10 +33,8 @@ namespace Xwt.Backends
/// <summary>
/// Sets the image view to use the supplied image backend.
/// </summary>
- /// <param name="nativeImage">A native image widget.</param>
- /// <exception cref="ArgumentNullException"><paramref name="nativeImage"/> is <c>null</c>.</exception>
- /// <exception cref="ArgumentException"><paramref name="nativeImage"/> is not of the expected type.</exception>
- void SetImage (object nativeImage);
+ /// <param name="image">An image</param>
+ void SetImage (ImageDescription image);
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/ILabelBackend.cs b/external/xwt/Xwt/Xwt.Backends/ILabelBackend.cs
index a4e6c5e..70c22d7 100755
--- a/external/xwt/Xwt/Xwt.Backends/ILabelBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ILabelBackend.cs
@@ -36,5 +36,6 @@ namespace Xwt.Backends
Alignment TextAlignment { get; set; }
EllipsizeMode Ellipsize { get; set; }
WrapMode Wrap { get; set; }
+ void SetFormattedText (FormattedText text);
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IListBoxBackend.cs b/external/xwt/Xwt/Xwt.Backends/IListBoxBackend.cs
index 7b53866..06f17da 100644
--- a/external/xwt/Xwt/Xwt.Backends/IListBoxBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IListBoxBackend.cs
@@ -27,6 +27,9 @@ using System;
namespace Xwt.Backends
{
+ /// <summary>
+ /// ListBox backend
+ /// </summary>
public interface IListBoxBackend: IWidgetBackend, IScrollableWidgetBackend
{
void SetViews (CellViewCollection views);
@@ -38,15 +41,15 @@ namespace Xwt.Backends
void SelectRow (int pos);
void UnselectRow (int pos);
}
-
- public interface IListBoxEventSink: IWidgetEventSink
- {
- void OnSelectionChanged ();
- }
-
- public enum ListBoxEvent
+
+ /// <summary>
+ /// Event sink for IListBoxBackend implementations
+ /// </summary>
+ /// <remarks>
+ /// Event IDs: ListViewEvent, TableViewEvent
+ /// </remarks>
+ public interface IListBoxEventSink: IListViewEventSink
{
- SelectionChanged
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IListViewBackend.cs b/external/xwt/Xwt/Xwt.Backends/IListViewBackend.cs
index 84cb529..26ac6c1 100644
--- a/external/xwt/Xwt/Xwt.Backends/IListViewBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IListViewBackend.cs
@@ -39,8 +39,14 @@ namespace Xwt.Backends
bool HeadersVisible { get; set; }
}
+ public enum ListViewEvent
+ {
+ RowActivated
+ }
+
public interface IListViewEventSink: ITableViewEventSink
{
+ void OnRowActivated (int rowIndex);
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IMenuButtonBackend.cs b/external/xwt/Xwt/Xwt.Backends/IMenuButtonBackend.cs
index 158a42b..42c37e9 100644
--- a/external/xwt/Xwt/Xwt.Backends/IMenuButtonBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IMenuButtonBackend.cs
@@ -31,7 +31,7 @@ namespace Xwt.Backends
{
}
- public interface IMenuButtonEventSink
+ public interface IMenuButtonEventSink: IButtonEventSink
{
IMenuBackend OnCreateMenu ();
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IMenuItemBackend.cs b/external/xwt/Xwt/Xwt.Backends/IMenuItemBackend.cs
index b869725..8967643 100644
--- a/external/xwt/Xwt/Xwt.Backends/IMenuItemBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IMenuItemBackend.cs
@@ -42,8 +42,8 @@ namespace Xwt.Backends
/// <summary>
/// Sets the image to display for the menu item.
/// </summary>
- /// <param name="imageBackend">The image backend to set as the image for this menu item.</param>
- void SetImage (object imageBackend);
+ /// <param name="image">The image backend to set as the image for this menu item.</param>
+ void SetImage (ImageDescription image);
/// <summary>
/// Gets or sets the label for the menu item.
diff --git a/external/xwt/Xwt/Xwt.Backends/INotebookBackend.cs b/external/xwt/Xwt/Xwt.Backends/INotebookBackend.cs
index 31e42aa..91d5d3e 100755
--- a/external/xwt/Xwt/Xwt.Backends/INotebookBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/INotebookBackend.cs
@@ -28,7 +28,7 @@ using System;
namespace Xwt.Backends
{
- public interface INotebookBackend: IWidgetBackend
+ public interface INotebookBackend: IWidgetBackend, IChildPlacementHandler
{
void Add (IWidgetBackend widget, NotebookTab tab);
void Remove (IWidgetBackend widget);
diff --git a/external/xwt/Xwt/Xwt.Backends/IPanedBackend.cs b/external/xwt/Xwt/Xwt.Backends/IPanedBackend.cs
index f5c6e2e..3da2136 100755
--- a/external/xwt/Xwt/Xwt.Backends/IPanedBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IPanedBackend.cs
@@ -28,7 +28,7 @@ using System;
namespace Xwt.Backends
{
- public interface IPanedBackend: IWidgetBackend
+ public interface IPanedBackend: IWidgetBackend, IChildPlacementHandler
{
/// <summary>
/// Initializes the paned
diff --git a/external/xwt/Xwt/Xwt.Backends/IRadioButtonBackend.cs b/external/xwt/Xwt/Xwt.Backends/IRadioButtonBackend.cs
new file mode 100644
index 0000000..bedf450
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/IRadioButtonBackend.cs
@@ -0,0 +1,68 @@
+//
+// IRadioButtonBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface IRadioButtonBackend: IWidgetBackend
+ {
+ void SetContent (IWidgetBackend widget);
+ void SetContent (string label);
+
+ /// <summary>
+ /// Gets or sets the group of the radio button
+ /// </summary>
+ /// <value>The group.</value>
+ /// <remarks>
+ /// If the radio button has not been explicitly assigned to a group the getter
+ /// should return a group which contains this radio as only member.
+ /// If a group has previously been set using the setter, the getter must return that group.
+ /// The setter will be invoked using a value obtained from the getter of this or any other
+ /// radio button. It will never be null.
+ /// </remarks>
+ object Group { get; set; }
+
+ /// <summary>
+ /// Gets or sets whether the radiobutton is checked. If set to 'true', this radio button is checked,
+ /// and any other button in the same group has to be unchecked. If set to 'false', this radio buttton
+ /// is unchecked, and no other button is checked.
+ /// </summary>
+ bool Active { get; set; }
+ }
+
+ public interface IRadioButtonEventSink: IWidgetEventSink
+ {
+ void OnClicked ();
+ void OnToggled ();
+ }
+
+ public enum RadioButtonEvent
+ {
+ Clicked = 1,
+ ActiveChanged = 2
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ISaveFileDialogBackend.cs b/external/xwt/Xwt/Xwt.Backends/ISaveFileDialogBackend.cs
index c7bbff4..6a96ef1 100644
--- a/external/xwt/Xwt/Xwt.Backends/ISaveFileDialogBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ISaveFileDialogBackend.cs
@@ -27,7 +27,7 @@ using System;
namespace Xwt.Backends
{
- public interface ISaveFileDialogBackend
+ public interface ISaveFileDialogBackend: IFileDialogBackend
{
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IScrollAdjustmentBackend.cs b/external/xwt/Xwt/Xwt.Backends/IScrollAdjustmentBackend.cs
index cf285f2..a3b85a1 100644
--- a/external/xwt/Xwt/Xwt.Backends/IScrollAdjustmentBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IScrollAdjustmentBackend.cs
@@ -30,6 +30,10 @@ namespace Xwt.Backends
/// <summary>
/// A backend for a scrollbar
/// </summary>
+ /// <remarks>
+ /// XWT supports creating standalone ScrollAdjustment instances, but toolkits don't need to provide
+ /// a backend for those cases, since XWT uses a default platform-agnostic implementation.
+ /// </remarks>
public interface IScrollAdjustmentBackend: IBackend
{
/// <summary>
@@ -54,47 +58,16 @@ namespace Xwt.Backends
double Value { get; set; }
/// <summary>
- /// Gets or sets the lowest value of the scroll range.
+ /// Sets the scroll range and the inital value
/// </summary>
- /// <value>
- /// The lower value.
- /// </value>
- /// <remarks>It must be <= UpperValue</remarks>
- double LowerValue { get; set; }
-
- /// <summary>
- /// Gets or sets the highest value of the scroll range
- /// </summary>
- /// <value>
- /// The upper value.
- /// </value>
- /// <remarks>It must be >= LowerValue</remarks>
- double UpperValue { get; set; }
-
- /// <summary>
- /// How much Value will be incremented when you click on the scrollbar to move
- /// to the next page (when the scrollbar supports it)
- /// </summary>
- /// <value>
- /// The page increment.
- /// </value>
- double PageIncrement { get; set; }
-
- /// <summary>
- /// How much the Value is incremented/decremented when you click on the down/up button in the scrollbar
- /// </summary>
- /// <value>
- /// The step increment.
- /// </value>
- double StepIncrement { get; set; }
-
- /// <summary>
- /// Size of the visible range
- /// </summary>
- /// <remarks>
- /// For example, if LowerValue=0, UpperValue=100, Value=25 and PageSize=50, the visible range will be 25 to 75
- /// </remarks>
- double PageSize { get; set; }
+ /// <param name="lowerValue">The lowest value of the scroll range</param>
+ /// <param name="upperValue">The highest value of the scroll range</param>
+ /// <param name="pageSize">Size of the visible range</param>
+ /// <param name="pageIncrement">How much Value will be incremented when you click on the scrollbar to move
+ /// to the next page (when the scrollbar supports it)</param>
+ /// <param name="stepIncrement">How much the Value is incremented/decremented when you click on the down/up button in the scrollbar</param>
+ /// <param name="value">Value.</param>
+ void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value);
}
public interface IScrollAdjustmentEventSink
diff --git a/external/xwt/Xwt/Xwt.Backends/IScrollViewBackend.cs b/external/xwt/Xwt/Xwt.Backends/IScrollViewBackend.cs
index 3795299..f5c8cc0 100644
--- a/external/xwt/Xwt/Xwt.Backends/IScrollViewBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IScrollViewBackend.cs
@@ -27,7 +27,7 @@ using System;
namespace Xwt.Backends
{
- public interface IScrollViewBackend: IWidgetBackend
+ public interface IScrollViewBackend: IWidgetBackend, IChildPlacementHandler
{
void SetChild (IWidgetBackend child);
diff --git a/external/xwt/Xwt/Xwt.Backends/IScrollbarBackend.cs b/external/xwt/Xwt/Xwt.Backends/IScrollbarBackend.cs
new file mode 100644
index 0000000..ce01360
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/IScrollbarBackend.cs
@@ -0,0 +1,47 @@
+//
+// IScrollbarBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface IScrollbarBackend: IWidgetBackend
+ {
+ /// <summary>
+ /// Initializes the paned
+ /// </summary>
+ /// <param name='dir'>
+ /// Orientation of the paned
+ /// </param>
+ void Initialize (Orientation dir);
+
+ /// <summary>
+ /// Gets the adjustment object bound to the scrollbar
+ /// </summary>
+ /// <returns>The adjustment.</returns>
+ IScrollAdjustmentBackend CreateAdjustment ();
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ISegmentedButtonBackend.cs b/external/xwt/Xwt/Xwt.Backends/ISegmentedButtonBackend.cs
new file mode 100644
index 0000000..7dd2703
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ISegmentedButtonBackend.cs
@@ -0,0 +1,37 @@
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ISegmentedButtonBackend : IWidgetBackend
+ {
+ void AddChildButton (int index, Button button);
+ void RemoveChildButton (int index);
+ void ReplaceChildButton (int index, Button button);
+ int Spacing { get; set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs b/external/xwt/Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs
index 5759dee..692917b 100644
--- a/external/xwt/Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs
@@ -76,6 +76,12 @@ namespace Xwt.Backends
string CurrentFolder { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance can create folders.
+ /// </summary>
+ /// <value><c>true</c> if this instance can create folders; otherwise, <c>false</c>.</value>
+ bool CanCreateFolders { get; set; }
+
+ /// <summary>
/// Runs the dialog, allowing the user to select a folder
/// </summary>
/// <param name='parent'>
diff --git a/external/xwt/Xwt/Xwt.Backends/ISliderBackend.cs b/external/xwt/Xwt/Xwt.Backends/ISliderBackend.cs
new file mode 100644
index 0000000..56115b8
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ISliderBackend.cs
@@ -0,0 +1,56 @@
+//
+// ISliderBackend.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin, Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ISliderBackend : IWidgetBackend
+ {
+ /// <summary>
+ /// Initializes the slider
+ /// </summary>
+ /// <param name='dir'>
+ /// Orientation of the slider
+ /// </param>
+ void Initialize (Orientation dir);
+
+ double Value { get; set; }
+ double MinimumValue { get; set; }
+ double MaximumValue { get; set; }
+ }
+
+ public interface ISliderEventSink: IWidgetEventSink
+ {
+ void ValueChanged ();
+ }
+
+ public enum SliderEvent
+ {
+ ValueChanged
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ISpinButtonBackend.cs b/external/xwt/Xwt/Xwt.Backends/ISpinButtonBackend.cs
index 8ad34b4..c751235 100644
--- a/external/xwt/Xwt/Xwt.Backends/ISpinButtonBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ISpinButtonBackend.cs
@@ -38,6 +38,8 @@ namespace Xwt.Backends
double MaximumValue { get; set; }
double IncrementValue { get; set; }
void SetButtonStyle (ButtonStyle style);
+ string IndeterminateMessage { get; set; }
+ bool IsIndeterminate { get; set; }
}
public interface ISpinButtonEventSink: IWidgetEventSink
diff --git a/external/xwt/Xwt/Xwt.Backends/IStatusIconBackend.cs b/external/xwt/Xwt/Xwt.Backends/IStatusIconBackend.cs
index 50f068f..f5bad76 100644
--- a/external/xwt/Xwt/Xwt.Backends/IStatusIconBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IStatusIconBackend.cs
@@ -33,7 +33,7 @@ namespace Xwt.Backends
{
void SetMenu (object menuBackend);
- void SetImage (object imageBackend);
+ void SetImage (ImageDescription img);
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/ITextCellViewFrontend.cs b/external/xwt/Xwt/Xwt.Backends/ITextCellViewFrontend.cs
new file mode 100644
index 0000000..69b4b88
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ITextCellViewFrontend.cs
@@ -0,0 +1,41 @@
+//
+// ITextCellViewFrontend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public interface ITextCellViewFrontend: ICellViewFrontend
+ {
+ string Markup { get; }
+ string Text { get; }
+ bool Editable { get; }
+
+ bool RaiseTextChanged ();
+
+ IDataField TextField { get; set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ITextEntryBackend.cs b/external/xwt/Xwt/Xwt.Backends/ITextEntryBackend.cs
index bb6c1a6..9c02ea5 100644
--- a/external/xwt/Xwt/Xwt.Backends/ITextEntryBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ITextEntryBackend.cs
@@ -30,9 +30,11 @@ namespace Xwt.Backends
public interface ITextEntryBackend: IWidgetBackend
{
string Text { get; set; }
+ Alignment TextAlignment { get; set; }
string PlaceholderText { get; set; }
bool ReadOnly { get; set; }
bool ShowFrame { get; set; }
+ bool MultiLine { get; set; }
}
public interface ITextEntryEventSink: IWidgetEventSink
diff --git a/external/xwt/Xwt/Xwt.Backends/ITextLayoutBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/ITextLayoutBackendHandler.cs
deleted file mode 100644
index 8076726..0000000
--- a/external/xwt/Xwt/Xwt.Backends/ITextLayoutBackendHandler.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// ITextLayoutBackendHandler.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-// Lytico (http://limada.sourceforge.net)
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-
-namespace Xwt.Backends
-{
- public interface ITextLayoutBackendHandler: IBackendHandler
- {
- object Create (Context context);
- object Create (ICanvasBackend canvas);
-
- void SetWidth (object backend, double value);
- void SetHeight (object backend, double value);
- void SetText (object backend, string text);
- void SetFont (object backend, Font font);
- void SetTrimming (object backend, TextTrimming textTrimming);
- Size GetSize (object backend);
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Backends/ITreeViewBackend.cs b/external/xwt/Xwt/Xwt.Backends/ITreeViewBackend.cs
index 3b66e2e..d86ec58 100644
--- a/external/xwt/Xwt/Xwt.Backends/ITreeViewBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ITreeViewBackend.cs
@@ -51,11 +51,25 @@ namespace Xwt.Backends
public enum ListViewColumnChange
{
Title,
- Cells
+ Cells,
+ IsResizeable,
+ SortDirection,
+ SortDataField,
+ IsSortIndicatorShown
}
+ public enum TreeViewEvent
+ {
+ RowActivated,
+ RowExpanding,
+ RowExpanded
+ }
+
public interface ITreeViewEventSink: ITableViewEventSink
{
+ void OnRowActivated (TreePosition position);
+ void OnRowExpanding (TreePosition position);
+ void OnRowExpanded (TreePosition position);
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/IWidgetBackend.cs b/external/xwt/Xwt/Xwt.Backends/IWidgetBackend.cs
old mode 100755
new mode 100644
index 557176e..82ee2fb
--- a/external/xwt/Xwt/Xwt.Backends/IWidgetBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IWidgetBackend.cs
@@ -48,6 +48,8 @@ namespace Xwt.Backends
bool Sensitive { get; set; }
bool CanGetFocus { get; set; }
bool HasFocus { get; }
+ double Opacity { get; set; }
+
Size Size { get; }
Point ConvertToScreenCoordinates (Point widgetCoordinates);
@@ -61,16 +63,14 @@ namespace Xwt.Backends
/// Minimum height. If the value is -1, it means no minimum height.
/// </param>
void SetMinSize (double width, double height);
- void SetNaturalSize (double width, double height);
+ void SetSizeRequest (double width, double height);
void SetFocus ();
void UpdateLayout ();
- WidgetSize GetPreferredWidth ();
- WidgetSize GetPreferredHeightForWidth (double width);
- WidgetSize GetPreferredHeight ();
- WidgetSize GetPreferredWidthForHeight (double height);
-
+
+ Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint);
+
object NativeWidget { get; }
/// <summary>
@@ -144,11 +144,8 @@ namespace Xwt.Backends
void OnMouseScrolled(MouseScrolledEventArgs args);
// Events
- WidgetSize OnGetPreferredWidth ();
- WidgetSize OnGetPreferredHeight ();
- WidgetSize OnGetPreferredHeightForWidth (double width);
- WidgetSize OnGetPreferredWidthForHeight (double height);
-
+ Size GetPreferredSize (SizeConstraint widthConstraint = default(SizeConstraint), SizeConstraint heightConstraint = default(SizeConstraint));
+
/// <summary>
/// Notifies the frontend that the preferred size of this widget has changed
/// </summary>
@@ -162,8 +159,7 @@ namespace Xwt.Backends
/// a result of clicking on it.
/// </remarks>
void OnPreferredSizeChanged ();
- SizeRequestMode GetSizeRequestMode ();
-
+
bool SupportsCustomScrolling ();
void SetScrollAdjustments (IScrollAdjustmentBackend horizontal, IScrollAdjustmentBackend vertical);
@@ -180,6 +176,7 @@ namespace Xwt.Backends
/// </remarks>
Size GetDefaultNaturalSize ();
}
+
[Flags]
public enum WidgetEvent
@@ -191,20 +188,17 @@ namespace Xwt.Backends
DragLeave = 1 << 4,
KeyPressed = 1 << 5,
KeyReleased = 1 << 6,
- PreferredWidthCheck = 1 << 7,
- PreferredHeightCheck = 1 << 8,
- PreferredWidthForHeightCheck = 1 << 9,
- PreferredHeightForWidthCheck = 1 << 10,
- GotFocus = 1 << 11,
- LostFocus = 1 << 12,
- MouseEntered = 1 << 13,
- MouseExited = 1 << 14,
- ButtonPressed = 1 << 15,
- ButtonReleased = 1 << 16,
- MouseMoved = 1 << 17,
- DragStarted = 1 << 18,
- BoundsChanged = 1 << 19,
- MouseScrolled = 1 << 20
+ PreferredSizeCheck = 1 << 7,
+ GotFocus = 1 << 8,
+ LostFocus = 1 << 9,
+ MouseEntered = 1 << 10,
+ MouseExited = 1 << 11,
+ ButtonPressed = 1 << 12,
+ ButtonReleased = 1 << 13,
+ MouseMoved = 1 << 14,
+ DragStarted = 1 << 15,
+ BoundsChanged = 1 << 16,
+ MouseScrolled = 1 << 17
}
public class DragStartData
diff --git a/external/xwt/Xwt/Xwt.Backends/IWindowBackend.cs b/external/xwt/Xwt/Xwt.Backends/IWindowBackend.cs
index bf7aa3c..066404a 100755
--- a/external/xwt/Xwt/Xwt.Backends/IWindowBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IWindowBackend.cs
@@ -29,21 +29,22 @@ using Xwt;
namespace Xwt.Backends
{
- public interface IWindowBackend: IWindowFrameBackend
+ public interface IWindowBackend: IWindowFrameBackend, IChildPlacementHandler
{
void SetChild (IWidgetBackend child);
void SetMainMenu (IMenuBackend menu);
void SetPadding (double left, double top, double right, double bottom);
/// <summary>
- /// Gets the minimum size of the window, without including the content
+ /// Get size information about the window
/// </summary>
- /// <remarks>
- /// This property should return the minimum size of the decorations around
- /// the content widget. It should include for example the minimum size required
- /// by the menu bar, dialog button bar, etc. Do not include content padding.
- /// </remarks>
- Size ImplicitMinSize { get; }
+ /// <param name="minSize">The minimum size that the content area can have.
+ /// For example, in a dialog the content are must be at least as wide as the width
+ /// of the button bar</param>
+ /// <param name="decorationSize">the size of the decorations around
+ /// the content widget. It should include for example the size required
+ /// by the menu bar, dialog button bar, etc.</param>
+ void GetMetrics (out Size minSize, out Size decorationSize);
/// <summary>
/// Sets the minimum size of the window
diff --git a/external/xwt/Xwt/Xwt.Backends/IWindowFrameBackend.cs b/external/xwt/Xwt/Xwt.Backends/IWindowFrameBackend.cs
index 3251804..c2121a0 100644
--- a/external/xwt/Xwt/Xwt.Backends/IWindowFrameBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/IWindowFrameBackend.cs
@@ -43,14 +43,14 @@ namespace Xwt.Backends
/// Sets the size of the window
/// </summary>
/// <param name='width'>
- /// New width.
+ /// New width, or -1 if the width doesn't have to be changed
/// </param>
/// <param name='height'>
- /// New height.
+ /// New height, or -1 if the height doesn't have to be changed
/// </param>
/// <remarks>
/// </remarks>
- void Resize (double width, double height);
+ void SetSize (double width, double height);
bool Visible { get; set; }
string Title { get; set; }
@@ -59,14 +59,27 @@ namespace Xwt.Backends
bool ShowInTaskbar { get; set; }
void SetTransientFor (IWindowFrameBackend window);
bool Resizable { get; set; }
+ double Opacity { get; set; }
- void SetIcon (object imageBackend);
+ void SetIcon (ImageDescription image);
/// <summary>
/// Presents a window to the user. This may mean raising the window in the stacking order,
/// deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus
/// </summary>
void Present ();
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this window is in full screen mode
+ /// </summary>
+ /// <value><c>true</c> if the window is in full screen mode; otherwise, <c>false</c>.</value>
+ bool FullScreen { get; set; }
+
+ /// <summary>
+ /// Gets the screen on which most of the area of this window is placed
+ /// </summary>
+ /// <value>The screen.</value>
+ object Screen { get; }
}
public interface IWindowFrameEventSink
diff --git a/external/xwt/Xwt/Xwt.Backends/ImageBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/ImageBackendHandler.cs
index 4e0a363..29a7f41 100644
--- a/external/xwt/Xwt/Xwt.Backends/ImageBackendHandler.cs
+++ b/external/xwt/Xwt/Xwt.Backends/ImageBackendHandler.cs
@@ -28,20 +28,17 @@ using System;
using System.IO;
using System.Reflection;
using Xwt.Drawing;
+using System.Collections.Generic;
namespace Xwt.Backends
{
- public abstract class ImageBackendHandler: IBackendHandler
+ public abstract class ImageBackendHandler: DisposableResourceBackendHandler
{
public virtual object CreateBackend ()
{
throw new NotSupportedException ();
}
- public virtual void Dispose (object backend)
- {
- }
-
public virtual object LoadFromResource (Assembly asm, string name)
{
using (var s = asm.GetManifestResourceStream (name)) {
@@ -56,26 +53,96 @@ namespace Xwt.Backends
using (var s = File.OpenRead (file))
return LoadFromStream (s);
}
+
+ /// <summary>
+ /// Creates an image that is custom drawn
+ /// </summary>
+ /// <returns>The custom drawn.</returns>
+ /// <param name="drawCallback">The callback to be used to draw the image. The arguments are: the context backend, the bounds where to draw</param>
+ public virtual object CreateCustomDrawn (ImageDrawCallback drawCallback)
+ {
+ throw new NotSupportedException ();
+ }
+
+ /// <summary>
+ /// Creates an image with multiple representations in different sizes
+ /// </summary>
+ /// <returns>The image backend</returns>
+ /// <param name="images">Backends of the different image representations</param>
+ /// <remarks>The first image of the list if the reference image, the one with scale factor = 1</remarks>
+ public virtual object CreateMultiResolutionImage (IEnumerable<object> images)
+ {
+ throw new NotSupportedException ();
+ }
+ public virtual object CreateMultiSizeIcon (IEnumerable<object> images)
+ {
+ throw new NotSupportedException ();
+ }
+
public abstract object LoadFromStream (Stream stream);
-
- public abstract object LoadFromIcon (string id, IconSize size);
-
+
+ public abstract void SaveToStream (object backend, System.IO.Stream stream, ImageFileType fileType);
+
+ public abstract Image GetStockIcon (string id);
+
+ /// <summary>
+ /// Determines whether this instance is a bitmap
+ /// </summary>
+ /// <param name="handle">Image handle</param>
+ public abstract bool IsBitmap (object handle);
+
+ /// <summary>
+ /// Converts an image to a bitmap of the specified size
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="handle">Image handle.</param>
+ /// <param name="width">Width.</param>
+ /// <param name="height">Height.</param>
+ public abstract object ConvertToBitmap (object handle, int pixelWidth, int pixelHeight, ImageFormat format);
+
+ /// <summary>
+ /// Returns True if the image has multiple representations of different sizes.
+ /// </summary>
+ /// <param name="handle">Image handle.</param>
+ /// <remarks>For example, it would return True for a .ico file which as several representations of the image in different sizes</remarks>
+ public abstract bool HasMultipleSizes (object handle);
+
+ /// <summary>
+ /// Gets the size of an image
+ /// </summary>
+ /// <returns>The size of the image, or a size of (0,0) if there is no known size for the image</returns>
+ /// <param name="handle">Image handle</param>
+ /// <remarks>
+ /// This method should return a size of (0,0) if the image doesn't have an intrinsic size.
+ /// For example: if the image is a vecor image, or if is an icon composed of images of different sizes.
+ /// </remarks>
public abstract Size GetSize (object handle);
- public abstract object Resize (object handle, double width, double height);
-
- public abstract object Copy (object handle);
+ public abstract object CopyBitmap (object handle);
- public abstract void CopyArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY);
+ public abstract void CopyBitmapArea (object srcHandle, int srcX, int srcY, int width, int height, object destHandle, int destX, int destY);
- public abstract object Crop (object handle, int srcX, int srcY, int width, int height);
+ public abstract object CropBitmap (object handle, int srcX, int srcY, int width, int height);
- public abstract object ChangeOpacity (object backend, double opacity);
+ public abstract void SetBitmapPixel (object handle, int x, int y, Color color);
- public abstract void SetPixel (object handle, int x, int y, Color color);
-
- public abstract Color GetPixel (object handle, int x, int y);
+ public abstract Color GetBitmapPixel (object handle, int x, int y);
+ }
+
+ public delegate void ImageDrawCallback (object contextBackend, Rectangle bounds);
+
+ public struct ImageDescription
+ {
+ public static ImageDescription Null = new ImageDescription ();
+
+ public bool IsNull {
+ get { return Backend == null; }
+ }
+
+ public object Backend { get; set; }
+ public Size Size { get; set; }
+ public double Alpha { get; set; }
}
}
diff --git a/external/xwt/Xwt/Xwt.Backends/ImageBuilderBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/ImageBuilderBackendHandler.cs
new file mode 100644
index 0000000..07a1d64
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ImageBuilderBackendHandler.cs
@@ -0,0 +1,38 @@
+//
+// IImageBuilder.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ public abstract class ImageBuilderBackendHandler: DisposableResourceBackendHandler
+ {
+ public abstract object CreateImageBuilder (int width, int height, ImageFormat format);
+ public abstract object CreateContext (object backend);
+ public abstract object CreateImage (object backend);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ImagePatternBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/ImagePatternBackendHandler.cs
new file mode 100644
index 0000000..b618d87
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ImagePatternBackendHandler.cs
@@ -0,0 +1,35 @@
+//
+// IImagePatternBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public abstract class ImagePatternBackendHandler: DisposableResourceBackendHandler
+ {
+ public abstract object Create (ImageDescription img);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/MacSystemBackend.cs b/external/xwt/Xwt/Xwt.Backends/MacSystemBackend.cs
new file mode 100644
index 0000000..bf326bb
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/MacSystemBackend.cs
@@ -0,0 +1,37 @@
+//
+// MacSystemBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ class MacSystemBackend: SystemBackend
+ {
+ public MacSystemBackend ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ResourceManager.cs b/external/xwt/Xwt/Xwt.Backends/ResourceManager.cs
new file mode 100644
index 0000000..f954b37
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ResourceManager.cs
@@ -0,0 +1,103 @@
+//
+// ResourceManager.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ static class ResourceManager
+ {
+ static bool finalized;
+ static Dictionary<object,Action<object>> resources = new Dictionary<object,Action<object>> ();
+ static Dictionary<object,Action<object>> freedResources = new Dictionary<object,Action<object>> ();
+
+ public static void RegisterResource (object res, Action<object> disposeCallback = null)
+ {
+ if (finalized)
+ return;
+ lock (resources)
+ resources [res] = disposeCallback;
+ }
+
+ public static bool FreeResource (object res)
+ {
+ if (finalized || res == null)
+ return true;
+
+ lock (resources) {
+ Action<object> disposer;
+ if (!resources.TryGetValue (res, out disposer))
+ return false;
+
+ resources.Remove (res);
+
+ if (System.Threading.Thread.CurrentThread == Application.UIThread) {
+ DisposeResource (res, disposer);
+ } else {
+ lock (freedResources) {
+ if (freedResources.Count == 0)
+ Application.Invoke (DisposeResources);
+ freedResources [res] = disposer;
+ }
+ }
+ return true;
+ }
+ }
+
+ static void DisposeResource (object res, Action<object> disposer)
+ {
+ try {
+ if (disposer != null)
+ disposer (res);
+ else if (res is IDisposable)
+ ((IDisposable)res).Dispose ();
+ } catch (Exception ex) {
+ Application.NotifyException (ex);
+ }
+ }
+
+ internal static void DisposeResources ()
+ {
+ lock (freedResources) {
+ if (finalized)
+ return;
+ foreach (var r in freedResources) {
+ DisposeResource (r.Key, r.Value);
+ }
+ freedResources.Clear ();
+ }
+ }
+
+ internal static void Dispose ()
+ {
+ lock (freedResources) {
+ DisposeResources ();
+ finalized = true;
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/StockIconId.cs b/external/xwt/Xwt/Xwt.Backends/StockIconId.cs
new file mode 100644
index 0000000..71d7065
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/StockIconId.cs
@@ -0,0 +1,46 @@
+//
+// StockIconId.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ public class StockIconId
+ {
+ public const string Error = "Error";
+ public const string Warning = "Warning";
+ public const string Information = "Information";
+ public const string Question = "Question";
+ public const string OrientationPortrait = "Portrait";
+ public const string OrientationLandscape = "Landscape";
+ public const string ZoomIn = "ZoomIn";
+ public const string ZoomOut = "ZoomOut";
+ public const string ZoomFit = "ZoomFit";
+ public const string Zoom100 = "Zoom100";
+ public const string Add = "Add";
+ public const string Remove = "Remove";
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/SystemBackend.cs b/external/xwt/Xwt/Xwt.Backends/SystemBackend.cs
new file mode 100644
index 0000000..35c84e8
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/SystemBackend.cs
@@ -0,0 +1,50 @@
+//
+// SystemBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Diagnostics;
+using Xwt.Drawing;
+
+namespace Xwt.Backends
+{
+ class SystemBackend
+ {
+ public virtual void OpenFile (string filename)
+ {
+ Process.Start ("file://" + filename);
+ }
+
+ public virtual void OpenFolder (string folderPath)
+ {
+ Process.Start ("file://" + folderPath);
+ }
+
+ public virtual void OpenUrl (string url)
+ {
+ Process.Start (url);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/TextLayoutBackendHandler.cs b/external/xwt/Xwt/Xwt.Backends/TextLayoutBackendHandler.cs
new file mode 100644
index 0000000..e618190
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/TextLayoutBackendHandler.cs
@@ -0,0 +1,51 @@
+//
+// ITextLayoutBackendHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+// Lytico (http://limada.sourceforge.net)
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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 Xwt.Drawing;
+using System.Collections.Generic;
+
+namespace Xwt.Backends
+{
+ public abstract class TextLayoutBackendHandler: DisposableResourceBackendHandler
+ {
+ public abstract object Create ();
+
+ public abstract void SetWidth (object backend, double value);
+ public abstract void SetHeight (object backend, double value);
+ public abstract void SetText (object backend, string text);
+ public abstract void SetFont (object backend, Font font);
+ public abstract void SetTrimming (object backend, TextTrimming textTrimming);
+ public abstract Size GetSize (object backend);
+ public abstract int GetIndexFromCoordinates (object backend, double x, double y);
+ public abstract Point GetCoordinateFromIndex (object backend, int index);
+
+ public abstract void AddAttribute (object backend, TextAttribute attribute);
+ public abstract void ClearAttributes (object backend);
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/ToolkitEngineBackend.cs b/external/xwt/Xwt/Xwt.Backends/ToolkitEngineBackend.cs
new file mode 100755
index 0000000..21289db
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/ToolkitEngineBackend.cs
@@ -0,0 +1,323 @@
+//
+// EngineBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+// Eric Maupin <ermau at xamarin.com>
+//
+// Copyright (c) 2011-2012 Xamarin Inc
+//
+// 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.Reflection;
+using System.IO;
+using Xwt.Drawing;
+
+using System.Collections.Generic;
+
+namespace Xwt.Backends
+{
+ public abstract class ToolkitEngineBackend
+ {
+ Dictionary<Type,Type> backendTypes;
+ Dictionary<Type,Type> backendTypesByFrontend;
+ Toolkit toolkit;
+ bool isGuest;
+
+ internal void Initialize (Toolkit toolkit, bool isGuest)
+ {
+ this.toolkit = toolkit;
+ this.isGuest = isGuest;
+ if (backendTypes == null) {
+ backendTypes = new Dictionary<Type, Type> ();
+ backendTypesByFrontend = new Dictionary<Type, Type> ();
+ InitializeBackends ();
+ }
+ InitializeApplication ();
+ }
+
+ public static T GetToolkitBackend<T> () where T : ToolkitEngineBackend
+ {
+ return (T)Toolkit.GetToolkitBackend (typeof (T));
+ }
+
+ public ApplicationContext ApplicationContext {
+ get { return toolkit.Context; }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this toolkit is running as a guest of another toolkit
+ /// </summary>
+ /// <remarks>
+ /// A toolkit is a guest toolkit when it is loaded after the main toolkit of an application
+ /// </remarks>
+ public bool IsGuest {
+ get { return isGuest; }
+ }
+
+ /// <summary>
+ /// Initializes the application.
+ /// </summary>
+ public virtual void InitializeApplication ()
+ {
+ }
+
+ /// <summary>
+ /// Initializes the widget registry used by the application.
+ /// </summary>
+ /// <remarks>
+ /// Don't do any toolkit initialization there, do them in InitializeApplication.
+ /// Override to register the backend classes, by calling RegisterBackend() methods.
+ /// </remarks>
+ public virtual void InitializeBackends ()
+ {
+ }
+
+ /// <summary>
+ /// Runs the main GUI loop
+ /// </summary>
+ public abstract void RunApplication ();
+
+ /// <summary>
+ /// Exits the main GUI loop
+ /// </summary>
+ public abstract void ExitApplication ();
+
+ /// <summary>
+ /// Releases all resource used by the <see cref="Xwt.Backends.ToolkitEngineBackend"/> object.
+ /// </summary>
+ public virtual void Dispose ()
+ {
+ }
+
+ /// <summary>
+ /// Asynchronously invokes <paramref name="action"/> on the engine UI thread.
+ /// </summary>
+ /// <param name="action">The action to invoke.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
+ public abstract void InvokeAsync (Action action);
+
+ /// <summary>
+ /// Begins invoking <paramref name="action"/> on a timer period of <paramref name="timeSpan"/>.
+ /// </summary>
+ /// <param name="action">The function to invoke. Returning <c>false</c> stops the timer.</param>
+ /// <param name="timeSpan">The period before the initial invoke and between subsequent invokes.</param>
+ /// <returns>An identifying object that can be used to cancel the timer with <seealso cref="CancelTimerInvoke"/>.</returns>
+ /// <exception cref="ArgumentNullException"><paramref name="action"/> is <c>null</c>.</exception>
+ /// <seealso cref="CancelTimerInvoke"/>
+ public abstract object TimerInvoke (Func<bool> action, TimeSpan timeSpan);
+
+ /// <summary>
+ /// Cancels an invoke timer started from <see cref="TimerInvoke"/>.
+ /// </summary>
+ /// <param name="id">The unique object returned from <see cref="TimerInvoke"/>.</param>
+ /// <exception cref="ArgumentNullException"><paramref name="id"/> is <c>null</c>.</exception>
+ public abstract void CancelTimerInvoke (object id);
+
+ /// <summary>
+ /// Gets a reference to the native widget wrapped by an XWT widget
+ /// </summary>
+ /// <returns>
+ /// The native widget.
+ /// </returns>
+ /// <param name='w'>
+ /// A widget
+ /// </param>
+ public abstract object GetNativeWidget (Widget w);
+
+ /// <summary>
+ /// Gets a reference to the image object wrapped by an XWT Image
+ /// </summary>
+ /// <returns>
+ /// The native image.
+ /// </returns>
+ /// <param name='image'>
+ /// An image.
+ /// </param>
+ public virtual object GetNativeImage (Image image)
+ {
+ return Toolkit.GetBackend (image);
+ }
+
+ /// <summary>
+ /// Dispatches pending events in the UI event queue
+ /// </summary>
+ public abstract void DispatchPendingEvents ();
+
+ /// <summary>
+ /// Gets the backend for a native window.
+ /// </summary>
+ /// <returns>
+ /// The backend for the window.
+ /// </returns>
+ /// <param name='nativeWindow'>
+ /// A native window reference.
+ /// </param>
+ public abstract IWindowFrameBackend GetBackendForWindow (object nativeWindow);
+
+ /// <summary>
+ /// Gets the native parent window of a widget
+ /// </summary>
+ /// <returns>
+ /// The native parent window.
+ /// </returns>
+ /// <param name='w'>
+ /// A widget
+ /// </param>
+ /// <remarks>
+ /// This method is used by XWT to get the window of a widget, when the widget is
+ /// embedded in a native application
+ /// </remarks>
+ public virtual object GetNativeParentWindow (Widget w)
+ {
+ return null;
+ }
+
+ /// <summary>
+ /// Gets the backend for a native drawing context.
+ /// </summary>
+ /// <returns>The backend for context.</returns>
+ /// <param name="nativeContext">The native context.</param>
+ public virtual object GetBackendForContext (object nativeContext)
+ {
+ return nativeContext;
+ }
+
+ public virtual object GetBackendForImage (object nativeImage)
+ {
+ return nativeImage;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this <see cref="Xwt.Backends.EngineBackend"/> handles size negotiation on its own
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if the engine backend handles size negotiation; otherwise, <c>false</c>.
+ /// </value>
+ public virtual bool HandlesSizeNegotiation {
+ get { return false; }
+ }
+
+ void CheckInitialized ()
+ {
+ if (backendTypes == null)
+ throw new InvalidOperationException ("XWT toolkit not initialized");
+ }
+
+ internal IBackend CreateBackendForFrontend (Type frontendType)
+ {
+ CheckInitialized ();
+
+ Type bt = null;
+ if (!backendTypesByFrontend.TryGetValue (frontendType, out bt)) {
+ var attr = (BackendTypeAttribute) Attribute.GetCustomAttribute (frontendType, typeof(BackendTypeAttribute), true);
+ if (attr == null || attr.Type == null)
+ throw new InvalidOperationException ("Backend type not specified for type: " + frontendType);
+ if (!typeof(IBackend).IsAssignableFrom (attr.Type))
+ throw new InvalidOperationException ("Backend type for frontend '" + frontendType + "' is not a IBackend implementation");
+ backendTypes.TryGetValue (attr.Type, out bt);
+ backendTypesByFrontend [frontendType] = bt;
+ }
+ if (bt == null)
+ return null;
+ return (IBackend) Activator.CreateInstance (bt);
+ }
+
+ internal object CreateBackend (Type backendType)
+ {
+ CheckInitialized ();
+ Type bt = null;
+
+ if (!backendTypes.TryGetValue (backendType, out bt))
+ return null;
+ var res = Activator.CreateInstance (bt);
+ if (!backendType.IsInstanceOfType (res))
+ throw new InvalidOperationException ("Invalid backend type. Expected '" + backendType + "' found '" + res.GetType () + "'");
+ if (res is BackendHandler)
+ ((BackendHandler)res).Initialize (toolkit);
+ return res;
+ }
+
+ internal T CreateBackend<T> ()
+ {
+ return (T) CreateBackend (typeof(T));
+ }
+
+ public void RegisterBackend<Backend, Implementation> () where Implementation: Backend
+ {
+ CheckInitialized ();
+ backendTypes [typeof(Backend)] = typeof(Implementation);
+ }
+
+ public T CreateFrontend<T> (object backend)
+ {
+ return (T) Activator.CreateInstance (typeof(T), backend);
+ }
+
+ /// <summary>
+ /// Registers a callback to be invoked just before the execution returns to the main loop
+ /// </summary>
+ /// <param name='action'>
+ /// Callback to execute
+ /// </param>
+ /// <remarks>
+ /// The default implementation does the invocation using InvokeAsync.
+ /// </remarks>
+ public virtual void InvokeBeforeMainLoop (Action action)
+ {
+ InvokeAsync (action);
+ }
+
+ /// <summary>
+ /// Determines whether a widget has a native parent widget
+ /// </summary>
+ /// <returns><c>true</c> if the widget has native parent; otherwise, <c>false</c>.</returns>
+ /// <param name="w">The widget.</param>
+ /// <remarks>This funciton is used to determine if a widget is a child of another non-XWT widget
+ /// </remarks>
+ public abstract bool HasNativeParent (Widget w);
+
+ /// <summary>
+ /// Renders a widget into a bitmap
+ /// </summary>
+ /// <param name="w">A widget</param>
+ /// <returns>An image backend</returns>
+ public virtual object RenderWidget (Widget w)
+ {
+ throw new NotSupportedException ();
+ }
+
+ /// <summary>
+ /// Renders an image at the provided native context
+ /// </summary>
+ /// <param name="nativeContext">Native context.</param>
+ /// <param name="img">Image.</param>
+ /// <param name="x">The x coordinate.</param>
+ /// <param name="y">The y coordinate.</param>
+ public virtual void RenderImage (object nativeWidget, object nativeContext, ImageDescription img, double x, double y)
+ {
+ }
+
+ public virtual ToolkitFeatures SupportedFeatures {
+ get { return ToolkitFeatures.All; }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/TransferDataStore.cs b/external/xwt/Xwt/Xwt.Backends/TransferDataStore.cs
index 6d1f25e..acfd27f 100644
--- a/external/xwt/Xwt/Xwt.Backends/TransferDataStore.cs
+++ b/external/xwt/Xwt/Xwt.Backends/TransferDataStore.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Xwt.Drawing;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.Backends
{
diff --git a/external/xwt/Xwt/Xwt.Backends/WindowsSystemBackend.cs b/external/xwt/Xwt/Xwt.Backends/WindowsSystemBackend.cs
new file mode 100644
index 0000000..de9fd65
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Backends/WindowsSystemBackend.cs
@@ -0,0 +1,37 @@
+//
+// WindowsSystemBackend.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Backends
+{
+ class WindowsSystemBackend: SystemBackend
+ {
+ public WindowsSystemBackend ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Backends/XwtWidgetBackend.cs b/external/xwt/Xwt/Xwt.Backends/XwtWidgetBackend.cs
index b713ca7..506c429 100644
--- a/external/xwt/Xwt/Xwt.Backends/XwtWidgetBackend.cs
+++ b/external/xwt/Xwt/Xwt.Backends/XwtWidgetBackend.cs
@@ -24,8 +24,19 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+
+
+
namespace Xwt.Backends
{
+ /// <summary>
+ /// Base backend class for XWT-based widgets
+ /// </summary>
+ /// <remarks>
+ /// This class can be used to implement backends fully based on XWT widgets.
+ /// For example, XWT has an implementation of a color selector. If a backend
+ /// doesn't have native color selector, the XWT one will be used.
+ /// </remarks>
public class XwtWidgetBackend: Widget, IWidgetBackend
{
protected Widget Frontend {
@@ -41,7 +52,7 @@ namespace Xwt.Backends
}
#region IBackend implementation
- void IBackend.InitializeBackend (object frontend)
+ void IBackend.InitializeBackend (object frontend, ApplicationContext toolkit)
{
Frontend = (Widget) frontend;
}
@@ -67,10 +78,10 @@ namespace Xwt.Backends
MinHeight = height;
}
- void IWidgetBackend.SetNaturalSize (double width, double height)
+ void IWidgetBackend.SetSizeRequest (double width, double height)
{
- NaturalWidth = width;
- NaturalHeight = height;
+ WidthRequest = width;
+ HeightRequest = height;
}
void IWidgetBackend.UpdateLayout ()
@@ -78,24 +89,9 @@ namespace Xwt.Backends
Surface.Reallocate ();
}
- WidgetSize IWidgetBackend.GetPreferredWidth ()
- {
- return Surface.GetPreferredWidth ();
- }
-
- WidgetSize IWidgetBackend.GetPreferredHeightForWidth (double width)
- {
- return Surface.GetPreferredHeightForWidth (width);
- }
-
- WidgetSize IWidgetBackend.GetPreferredHeight ()
- {
- return Surface.GetPreferredHeight ();
- }
-
- WidgetSize IWidgetBackend.GetPreferredWidthForHeight (double height)
+ Size IWidgetBackend.GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- return Surface.GetPreferredWidthForHeight (height);
+ return Surface.GetPreferredSize (widthConstraint, heightConstraint);
}
void IWidgetBackend.SetDragSource (TransferDataType[] types, DragDropAction dragAction)
diff --git a/external/xwt/Xwt/Xwt.Drawing/BackgroundTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/BackgroundTextAttribute.cs
new file mode 100644
index 0000000..1835c95
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/BackgroundTextAttribute.cs
@@ -0,0 +1,51 @@
+//
+// BackgroundTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+
+ public sealed class BackgroundTextAttribute: TextAttribute
+ {
+ public Color Color { get; set; }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as BackgroundTextAttribute;
+ return ot != null && Color.Equals (ot.Color) && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Color.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/BitmapImage.cs b/external/xwt/Xwt/Xwt.Drawing/BitmapImage.cs
new file mode 100644
index 0000000..0e8396e
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/BitmapImage.cs
@@ -0,0 +1,82 @@
+//
+// Bitmap.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Drawing
+{
+ public class BitmapImage: Image
+ {
+ public BitmapImage (BitmapImage image): base (image.ToolkitEngine.ImageBackendHandler.CopyBitmap (image.Backend), image.ToolkitEngine)
+ {
+ }
+
+ internal BitmapImage (object backend): base (backend)
+ {
+ }
+
+ internal BitmapImage (Image origImage): base (origImage)
+ {
+ // shares the backend of the image
+ }
+
+ void MakeWrittable ()
+ {
+ // If the bitmap only has one reference, that reference is the one held by this instance, so
+ // no other image is referencing this one. In that case, the bitmap can be safely modified.
+ // On the other hand, if the bitmap is being referenced by another image, an local copy
+ // has to be made
+
+ if (NativeRef.ReferenceCount > 1) {
+ Backend = ToolkitEngine.ImageBackendHandler.CopyBitmap (Backend);
+ NativeRef.ReleaseReference (true);
+ NativeRef = new NativeImageRef (Backend, ToolkitEngine);
+ }
+ }
+
+ public void SetPixel (int x, int y, Color color)
+ {
+ MakeWrittable ();
+ ToolkitEngine.ImageBackendHandler.SetBitmapPixel (Backend, x, y, color);
+ }
+
+ public Color GetPixel (int x, int y)
+ {
+ return ToolkitEngine.ImageBackendHandler.GetBitmapPixel (Backend, x, y);
+ }
+
+ public void CopyArea (int srcX, int srcY, int width, int height, BitmapImage dest, int destX, int destY)
+ {
+ dest.MakeWrittable ();
+ ToolkitEngine.ImageBackendHandler.CopyBitmapArea (Backend, srcX, srcY, width, height, dest.Backend, destX, destY);
+ }
+
+ public BitmapImage Crop (int srcX, int srcY, int width, int height)
+ {
+ return new BitmapImage (ToolkitEngine.ImageBackendHandler.CropBitmap (Backend, srcX, srcY, width, height));
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Drawing/Color.cs b/external/xwt/Xwt/Xwt.Drawing/Color.cs
index 271d267..f765459 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Color.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Color.cs
@@ -25,12 +25,19 @@
// THE SOFTWARE.
using System;
+using System.ComponentModel;
+using System.Windows.Markup;
namespace Xwt.Drawing
{
+ [TypeConverter (typeof(ColorValueConverter))]
+ [ValueSerializer (typeof(ColorValueSerializer))]
+ [Serializable]
public struct Color
{
double r, g, b, a;
+
+ [NonSerialized]
HslColor hsl;
public double Red {
@@ -198,9 +205,12 @@ namespace Xwt.Drawing
public static bool TryParse (string name, out Color color)
{
+ if (name == null)
+ throw new ArgumentNullException ("name");
+
uint val;
- if (!TryParseColourFromHex (name, out val)) {
- color = Colors.White;
+ if (name.Length == 0 || !TryParseColourFromHex (name, out val)) {
+ color = default (Color);
return false;
}
color = Color.FromBytes ((byte)(val >> 24), (byte)((val >> 16) & 0xff), (byte)((val >> 8) & 0xff), (byte)(val & 0xff));
@@ -212,7 +222,7 @@ namespace Xwt.Drawing
{
val = 0;
- if (str.Length > 9)
+ if (str[0] != '#' || str.Length > 9)
return false;
if (!uint.TryParse (str.Substring (1), System.Globalization.NumberStyles.HexNumber, null, out val))
@@ -246,7 +256,13 @@ namespace Xwt.Drawing
public override int GetHashCode ()
{
- return r.GetHashCode () ^ g.GetHashCode () ^ b.GetHashCode () ^ a.GetHashCode ();
+ unchecked {
+ var hash = r.GetHashCode ();
+ hash = (hash * 397) ^ g.GetHashCode ();
+ hash = (hash * 397) ^ b.GetHashCode ();
+ hash = (hash * 397) ^ a.GetHashCode ();
+ return hash;
+ }
}
public override string ToString ()
@@ -254,5 +270,46 @@ namespace Xwt.Drawing
return string.Format ("[Color: Red={0}, Green={1}, Blue={2}, Alpha={3}]", Red, Green, Blue, Alpha);
}
}
+
+ class ColorValueConverter: TypeConverter
+ {
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+ {
+ return destinationType == typeof(string);
+ }
+
+ public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
+ {
+ return sourceType == typeof(string);
+ }
+ }
+
+ class ColorValueSerializer: ValueSerializer
+ {
+ public override bool CanConvertFromString (string value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override bool CanConvertToString (object value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override string ConvertToString (object value, IValueSerializerContext context)
+ {
+ Color s = (Color) value;
+ return "#" + ((int)(s.Red * 255)).ToString ("x2") + ((int)(s.Green * 255)).ToString ("x2") + ((int)(s.Blue * 255)).ToString ("x2") + ((int)(s.Alpha * 255)).ToString ("x2");
+ }
+
+ public override object ConvertFromString (string value, IValueSerializerContext context)
+ {
+ Color c;
+ if (!Color.TryParse (value, out c))
+ return c;
+ else
+ throw new InvalidOperationException ("Could not parse color value: " + value);
+ }
+ }
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/ColorTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/ColorTextAttribute.cs
new file mode 100644
index 0000000..84a137a
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/ColorTextAttribute.cs
@@ -0,0 +1,51 @@
+//
+// ColorTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+
+ public sealed class ColorTextAttribute: TextAttribute
+ {
+ public Color Color { get; set; }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as ColorTextAttribute;
+ return ot != null && Color == ot.Color && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Color.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/Context.cs b/external/xwt/Xwt/Xwt.Drawing/Context.cs
index 446d4a4..99ebe08 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Context.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Context.cs
@@ -24,30 +24,33 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.Drawing
{
- public sealed class Context: XwtObject, IDisposable
+ public sealed class Context: DrawingPath
{
- static IContextBackendHandler handler;
+ ContextBackendHandler handler;
Pattern pattern;
- Font font;
double globalAlpha = 1;
+ Stack<double> alphaStack = new Stack<double> ();
- static Context ()
+ internal Context (object backend, Toolkit toolkit): this (backend, toolkit, toolkit.ContextBackendHandler)
{
- handler = WidgetRegistry.CreateSharedBackend<IContextBackendHandler> (typeof(Context));
}
-
- protected override IBackendHandler BackendHandler {
- get {
- return handler;
- }
+
+ internal Context (object backend, Toolkit toolkit, ContextBackendHandler handler): base (backend, toolkit, handler)
+ {
+ this.handler = handler;
}
-
- internal Context (object backend): base (backend)
+
+ internal ContextBackendHandler Handler {
+ get { return handler; }
+ }
+
+ internal void Reset (Widget forWidget)
{
}
@@ -60,11 +63,14 @@ namespace Xwt.Drawing
public void Save ()
{
handler.Save (Backend);
+ alphaStack.Push (globalAlpha);
}
public void Restore ()
{
handler.Restore (Backend);
+ if (alphaStack.Count > 0)
+ globalAlpha = alphaStack.Pop ();
}
public double GlobalAlpha {
@@ -79,72 +85,8 @@ namespace Xwt.Drawing
{
handler.SetColor (Backend, color);
}
-
- /// <summary>
- /// Adds a circular arc of the given radius to the current path.
- /// The arc is centered at (xc, yc),
- /// begins at angle1 and proceeds in the direction
- /// of increasing angles to end at angle2.
- /// If angle2 is less than angle1,
- /// it will be progressively increased by 1 degree until it is greater than angle1.
- /// If there is a current point, an initial line segment will be added to the path
- /// to connect the current point to the beginning of the arc.
- /// If this initial line is undesired,
- /// it can be avoided by calling NewPath() before calling Arc().
- /// </summary>
- /// <param name='xc'>
- /// Xc.
- /// </param>
- /// <param name='yc'>
- /// Yc.
- /// </param>
- /// <param name='radius'>
- /// Radius.
- /// </param>
- /// <param name='angle1'>
- /// Angle1 in degrees
- /// </param>
- /// <param name='angle2'>
- /// Angle2 in degrees
- /// </param>
- public void Arc (double xc, double yc, double radius, double angle1, double angle2)
- {
- handler.Arc (Backend, xc, yc, radius, angle1, angle2);
- }
/// <summary>
- /// Adds a circular arc of the given radius to the current path.
- /// The arc is centered at (xc, yc),
- /// begins at angle1 and proceeds in the direction
- /// of decreasing angles to end at angle2.
- /// If angle2 is greater than angle1 it will be progressively decreased
- /// by 1 degree until it is less than angle1.
- /// If there is a current point, an initial line segment will be added to the path
- /// to connect the current point to the beginning of the arc.
- /// If this initial line is undesired,
- /// it can be avoided by calling NewPath() before calling ArcNegative().
- /// </summary>
- /// <param name='xc'>
- /// Xc.
- /// </param>
- /// <param name='yc'>
- /// Yc.
- /// </param>
- /// <param name='radius'>
- /// Radius.
- /// </param>
- /// <param name='angle1'>
- /// Angle1 in degrees
- /// </param>
- /// <param name='angle2'>
- /// Angle2 in degrees
- /// </param>
- public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
- {
- handler.ArcNegative (Backend, xc, yc, radius, angle1, angle2);
- }
-
- /// <summary>
/// Establishes a new clip region by intersecting the current clip region with the current Path
/// as it would be filled by fill() and according to the current fill rule.
/// After clip(), the current path will be cleared from the Context.
@@ -165,43 +107,6 @@ namespace Xwt.Drawing
handler.ClipPreserve (Backend);
}
- public void ClosePath ()
- {
- handler.ClosePath (Backend);
- }
-
- public void CurveTo (Point p1, Point p2, Point p3)
- {
- CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
- }
-
- /// <summary>
- /// Adds a cubic Bezier spline to the path from the current point to position (x3, y3) in user-space coordinates,
- /// using (x1, y1) and (x2, y2) as the control points.
- /// </summary>
- /// <param name='x1'>
- /// X1.
- /// </param>
- /// <param name='y1'>
- /// Y1.
- /// </param>
- /// <param name='x2'>
- /// X2.
- /// </param>
- /// <param name='y2'>
- /// Y2.
- /// </param>
- /// <param name='x3'>
- /// X3.
- /// </param>
- /// <param name='y3'>
- /// Y3.
- /// </param>
- public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
- {
- handler.CurveTo (Backend, x1, y1, x2, y2, x3, y3);
- }
-
public void Fill ()
{
handler.Fill (Backend);
@@ -211,136 +116,12 @@ namespace Xwt.Drawing
{
handler.FillPreserve (Backend);
}
-
- public void LineTo (Point p)
- {
- LineTo (p.X, p.Y);
- }
-
- public void LineTo (double x, double y)
- {
- handler.LineTo (Backend, x, y);
- }
-
- public void MoveTo (Point p)
- {
- MoveTo (p.X, p.Y);
- }
-
- /// <summary>
- /// If the current subpath is not empty, begin a new subpath.
- /// After this call the current point will be (x, y).
- /// </summary>
- /// <param name='x'>
- /// X.
- /// </param>
- /// <param name='y'>
- /// Y.
- /// </param>
- public void MoveTo (double x, double y)
- {
- handler.MoveTo (Backend, x, y);
- }
-
+
public void NewPath ()
{
handler.NewPath (Backend);
}
-
- public void Rectangle (Rectangle rectangle)
- {
- Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
- }
-
- public void Rectangle (Point p, double width, double height)
- {
- Rectangle (p.X, p.Y, width, height);
- }
-
- public void Rectangle (double x, double y, double width, double height)
- {
- handler.Rectangle (Backend, x, y, width, height);
- }
-
- public void RelCurveTo (Distance d1, Distance d2, Distance d3)
- {
- RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
- }
-
- /// <summary>
- /// Relative-coordinate version of curve_to().
- /// All offsets are relative to the current point.
- /// Adds a cubic Bezier spline to the path from the current point to a point offset
- /// from the current point by (dx3, dy3), using points offset by (dx1, dy1) and (dx2, dy2)
- /// as the control points. After this call the current point will be offset by (dx3, dy3).
- /// Given a current point of (x, y), RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
- /// is logically equivalent to CurveTo(x + dx1, y + dy1, x + dx2, y + dy2, x + dx3, y + dy3).
- /// </summary>
- /// <param name='dx1'>
- /// Dx1.
- /// </param>
- /// <param name='dy1'>
- /// Dy1.
- /// </param>
- /// <param name='dx2'>
- /// Dx2.
- /// </param>
- /// <param name='dy2'>
- /// Dy2.
- /// </param>
- /// <param name='dx3'>
- /// Dx3.
- /// </param>
- /// <param name='dy3'>
- /// Dy3.
- /// </param>
- public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
- {
- handler.RelCurveTo (Backend, dx1, dy1, dx2, dy2, dx3, dy3);
- }
-
- public void RelLineTo (Distance d)
- {
- RelLineTo (d.Dx, d.Dy);
- }
-
- /// <summary>
- /// Adds a line to the path from the current point to a point that
- /// is offset from the current point by (dx, dy) in user space.
- /// After this call the current point will be offset by (dx, dy).
- /// Given a current point of (x, y),
- /// RelLineTo(dx, dy) is logically equivalent to LineTo(x + dx, y + dy).
- /// </summary>
- /// <param name='dx'>
- /// Dx.
- /// </param>
- /// <param name='dy'>
- /// Dy.
- /// </param>
- public void RelLineTo (double dx, double dy)
- {
- handler.RelLineTo (Backend, dx, dy);
- }
-
- /// <summary>
- /// If the current subpath is not empty, begin a new subpath.
- /// After this call the current point will offset by (x, y).
- /// Given a current point of (x, y),
- /// RelMoveTo(dx, dy) is logically equivalent to MoveTo(x + dx, y + dy).
- /// </summary>
- /// <param name='d'>
- /// D.
- /// </param>
- public void RelMoveTo (Distance d)
- {
- RelMoveTo (d.Dx, d.Dy);
- }
-
- public void RelMoveTo (double dx, double dy)
- {
- handler.RelMoveTo (Backend, dx, dy);
- }
-
+
public void Stroke ()
{
handler.Stroke (Backend);
@@ -365,50 +146,48 @@ namespace Xwt.Drawing
{
handler.DrawTextLayout (Backend, layout, x, y);
}
-
- public void DrawImage (Image img, Point location)
- {
- handler.DrawImage (Backend, GetBackend (img), location.X, location.Y, 1);
- }
-
- public void DrawImage (Image img, double x, double y)
- {
- handler.DrawImage (Backend, GetBackend (img), x, y, 1);
- }
-
- public void DrawImage (Image img, Point location, double alpha)
+
+ public void DrawImage (Image img, Point location, double alpha = 1)
{
- handler.DrawImage (Backend, GetBackend (img), location.X, location.Y, alpha);
+ DrawImage (img, location.X, location.Y, alpha);
}
- public void DrawImage (Image img, double x, double y, double alpha)
+ public void DrawImage (Image img, double x, double y, double alpha = 1)
{
- handler.DrawImage (Backend, GetBackend (img), x, y, alpha);
+ if (!img.HasFixedSize)
+ throw new InvalidOperationException ("Image doesn't have a fixed size");
+
+ var idesc = img.ImageDescription;
+ idesc.Alpha *= alpha;
+ handler.DrawImage (Backend, idesc, x, y);
}
-
- public void DrawImage (Image img, Rectangle rect)
+
+ public void DrawImage (Image img, Rectangle rect, double alpha = 1)
{
- handler.DrawImage (Backend, GetBackend (img), rect.X, rect.Y, rect.Width, rect.Height, 1);
+ DrawImage (img, rect.X, rect.Y, rect.Width, rect.Height, alpha);
}
- public void DrawImage (Image img, double x, double y, double width, double height)
+ public void DrawImage (Image img, double x, double y, double width, double height, double alpha = 1)
{
- handler.DrawImage (Backend, GetBackend (img), x, y, width, height, 1);
+ var idesc = img.ImageDescription;
+ idesc.Alpha *= alpha;
+ idesc.Size = new Size (width, height);
+ handler.DrawImage (Backend, idesc, x, y);
}
- public void DrawImage (Image img, Rectangle rect, double alpha)
- {
- handler.DrawImage (Backend, GetBackend (img), rect.X, rect.Y, rect.Width, rect.Height, alpha);
- }
-
public void DrawImage (Image img, Rectangle srcRect, Rectangle destRect)
{
- handler.DrawImage (Backend, GetBackend (img), srcRect, destRect, 1);
+ DrawImage (img, srcRect, destRect, 1);
}
public void DrawImage (Image img, Rectangle srcRect, Rectangle destRect, double alpha)
{
- handler.DrawImage (Backend, GetBackend (img), srcRect, destRect, alpha);
+ if (!img.HasFixedSize)
+ throw new InvalidOperationException ("Image doesn't have a fixed size");
+
+ var idesc = img.ImageDescription;
+ idesc.Alpha *= alpha;
+ handler.DrawImage (Backend, idesc, srcRect, destRect);
}
/// <summary>
@@ -442,21 +221,55 @@ namespace Xwt.Drawing
{
handler.Translate (Backend, p.X, p.Y);
}
+
+ /// <summary>
+ /// Returns a copy of the current transformation matrix (CTM)
+ /// </summary>
+ public Matrix GetCTM ()
+ {
+ return handler.GetCTM (Backend);
+ }
/// <summary>
/// Transforms the point (x, y) by the current transformation matrix (CTM)
/// </summary>
public void TransformPoint (ref double x, ref double y)
{
- handler.TransformPoint (Backend, ref x, ref y);
+ Matrix m = GetCTM ();
+ Point p = m.Transform (new Point (x, y));
+ x = p.X;
+ y = p.Y;
}
/// <summary>
+ /// Transforms the point (x, y) by the current transformation matrix (CTM)
+ /// </summary>
+ public Point TransformPoint (Point p)
+ {
+ Matrix m = GetCTM ();
+ return m.Transform (p);
+ }
+
+ /// <summary>
/// Transforms the distance (dx, dy) by the scale and rotation elements (only) of the CTM
/// </summary>
public void TransformDistance (ref double dx, ref double dy)
{
- handler.TransformDistance (Backend, ref dx, ref dy);
+ Matrix m = GetCTM ();
+ Point p = m.TransformVector (new Point (dx, dy));
+ dx = p.X;
+ dy = p.Y;
+ }
+
+ /// <summary>
+ /// Transforms the distance (dx, dy) by the scale and rotation elements (only) of the CTM
+ /// </summary>
+ public Distance TransformDistance (Distance distance)
+ {
+ double dx = distance.Dx;
+ double dy = distance.Dy;
+ TransformDistance (ref dx, ref dy);
+ return new Distance (dx, dy);
}
/// <summary>
@@ -464,7 +277,8 @@ namespace Xwt.Drawing
/// </summary>
public void TransformPoints (Point[] points)
{
- handler.TransformPoints (Backend, points);
+ Matrix m = GetCTM ();
+ m.Transform (points);
}
/// <summary>
@@ -472,14 +286,38 @@ namespace Xwt.Drawing
/// </summary>
public void TransformDistances (Distance[] vectors)
{
- handler.TransformDistances (Backend, vectors);
+ Point p;
+ Matrix m = GetCTM ();
+ for (int i = 0; i < vectors.Length; ++i) {
+ p = (Point)vectors[i];
+ m.TransformVector (p);
+ vectors[i].Dx = p.X;
+ vectors[i].Dy = p.Y;
+ }
}
- public void Dispose ()
+ public bool IsPointInStroke (Point p)
{
- handler.Dispose (Backend);
+ return IsPointInStroke (p.X, p.Y);
}
+ /// <summary>
+ /// Tests whether the given point is inside the area that would be affected if Stroke were called on this Context.
+ /// </summary>
+ /// <returns>
+ /// <c>true</c> if the specified point would be in the stroke; otherwise, <c>false</c>.
+ /// </returns>
+ /// <param name='x'>
+ /// The x coordinate.
+ /// </param>
+ /// <param name='y'>
+ /// The y coordinate.
+ /// </param>
+ public bool IsPointInStroke (double x, double y)
+ {
+ return handler.IsPointInStroke (Backend, x, y);
+ }
+
public Pattern Pattern {
get { return pattern; }
set {
@@ -488,14 +326,6 @@ namespace Xwt.Drawing
}
}
- public Font Font {
- get { return font; }
- set {
- font = value;
- handler.SetFont (Backend, value);
- }
- }
-
/// <summary>
/// Sets the dash pattern to be used by stroke().
/// A dash pattern is specified by dashes, an array of positive values.
diff --git a/external/xwt/Xwt/Xwt.Drawing/DrawingImage.cs b/external/xwt/Xwt/Xwt.Drawing/DrawingImage.cs
new file mode 100644
index 0000000..4a3c82e
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/DrawingImage.cs
@@ -0,0 +1,55 @@
+//
+// DrawingImage.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Drawing
+{
+ public class DrawingImage: Image
+ {
+ public DrawingImage ()
+ {
+ Backend = Toolkit.CurrentEngine.ImageBackendHandler.CreateCustomDrawn (Draw);
+ Init ();
+ }
+
+ void Draw (object ctx, Rectangle bounds)
+ {
+ var c = new Context (ctx, ToolkitEngine);
+ c.Reset (null);
+ OnDraw (c, bounds);
+ }
+
+ protected virtual void OnDraw (Context ctx, Rectangle bounds)
+ {
+ }
+
+ protected override Size GetDefaultSize ()
+ {
+ return Size.Zero;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Drawing/DrawingPath.cs b/external/xwt/Xwt/Xwt.Drawing/DrawingPath.cs
new file mode 100644
index 0000000..9cb57ba
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/DrawingPath.cs
@@ -0,0 +1,348 @@
+//
+// DrawingPath.cs
+//
+// Author:
+// Alex Corrado <corrado at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Backends;
+
+namespace Xwt.Drawing
+{
+ public class DrawingPath: XwtObject, IDisposable
+ {
+ DrawingPathBackendHandler handler;
+
+ public DrawingPath ()
+ {
+ handler = Toolkit.CurrentEngine.VectorImageRecorderContextHandler;
+ Backend = handler.CreatePath ();
+ Init ();
+ }
+
+ internal DrawingPath (object backend, Toolkit toolkit, DrawingPathBackendHandler h): base (backend, toolkit)
+ {
+ handler = h;
+ Init ();
+ }
+
+ void Init ()
+ {
+ if (handler.DisposeHandleOnUiThread)
+ ResourceManager.RegisterResource (Backend, handler.Dispose);
+ else
+ GC.SuppressFinalize (this);
+ }
+
+ public void Dispose ()
+ {
+ if (handler.DisposeHandleOnUiThread) {
+ GC.SuppressFinalize (this);
+ ResourceManager.FreeResource (Backend);
+ }
+ else
+ handler.Dispose (Backend);
+ }
+
+ ~DrawingPath ()
+ {
+ ResourceManager.FreeResource (Backend);
+ }
+
+ /// <summary>
+ /// Copies the current drawing path.
+ /// </summary>
+ /// <returns>A new DrawingPath instance that is a copy of the current drawing path.</returns>
+ public DrawingPath CopyPath ()
+ {
+ return new DrawingPath (handler.CopyPath (Backend), ToolkitEngine, handler);
+ }
+
+ /// <summary>
+ /// Adds a circular arc of the given radius to the current path.
+ /// The arc is centered at (xc, yc),
+ /// begins at angle1 and proceeds in the direction
+ /// of increasing angles to end at angle2.
+ /// If angle2 is less than angle1,
+ /// it will be progressively increased by 1 degree until it is greater than angle1.
+ /// If there is a current point, an initial line segment will be added to the path
+ /// to connect the current point to the beginning of the arc.
+ /// If this initial line is undesired,
+ /// it can be avoided by calling NewPath() before calling Arc().
+ /// </summary>
+ /// <param name='xc'>
+ /// Xc.
+ /// </param>
+ /// <param name='yc'>
+ /// Yc.
+ /// </param>
+ /// <param name='radius'>
+ /// Radius.
+ /// </param>
+ /// <param name='angle1'>
+ /// Angle1 in degrees
+ /// </param>
+ /// <param name='angle2'>
+ /// Angle2 in degrees
+ /// </param>
+ public void Arc (double xc, double yc, double radius, double angle1, double angle2)
+ {
+ if (radius <= 0)
+ throw new ArgumentException ("Radius must be greater than zero");
+ handler.Arc (Backend, xc, yc, radius, angle1, angle2);
+ }
+
+ /// <summary>
+ /// Adds a circular arc of the given radius to the current path.
+ /// The arc is centered at (xc, yc),
+ /// begins at angle1 and proceeds in the direction
+ /// of decreasing angles to end at angle2.
+ /// If angle2 is greater than angle1 it will be progressively decreased
+ /// by 1 degree until it is less than angle1.
+ /// If there is a current point, an initial line segment will be added to the path
+ /// to connect the current point to the beginning of the arc.
+ /// If this initial line is undesired,
+ /// it can be avoided by calling NewPath() before calling ArcNegative().
+ /// </summary>
+ /// <param name='xc'>
+ /// Xc.
+ /// </param>
+ /// <param name='yc'>
+ /// Yc.
+ /// </param>
+ /// <param name='radius'>
+ /// Radius.
+ /// </param>
+ /// <param name='angle1'>
+ /// Angle1 in degrees
+ /// </param>
+ /// <param name='angle2'>
+ /// Angle2 in degrees
+ /// </param>
+ public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
+ {
+ handler.ArcNegative (Backend, xc, yc, radius, angle1, angle2);
+ }
+
+ public void ClosePath ()
+ {
+ handler.ClosePath (Backend);
+ }
+
+ public void CurveTo (Point p1, Point p2, Point p3)
+ {
+ CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
+ }
+
+ /// <summary>
+ /// Adds a cubic Bezier spline to the path from the current point to position (x3, y3) in user-space coordinates,
+ /// using (x1, y1) and (x2, y2) as the control points.
+ /// </summary>
+ /// <param name='x1'>
+ /// X1.
+ /// </param>
+ /// <param name='y1'>
+ /// Y1.
+ /// </param>
+ /// <param name='x2'>
+ /// X2.
+ /// </param>
+ /// <param name='y2'>
+ /// Y2.
+ /// </param>
+ /// <param name='x3'>
+ /// X3.
+ /// </param>
+ /// <param name='y3'>
+ /// Y3.
+ /// </param>
+ public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
+ {
+ handler.CurveTo (Backend, x1, y1, x2, y2, x3, y3);
+ }
+
+ public void LineTo (Point p)
+ {
+ LineTo (p.X, p.Y);
+ }
+
+ public void LineTo (double x, double y)
+ {
+ handler.LineTo (Backend, x, y);
+ }
+
+ public void MoveTo (Point p)
+ {
+ MoveTo (p.X, p.Y);
+ }
+
+ /// <summary>
+ /// If the current subpath is not empty, begin a new subpath.
+ /// After this call the current point will be (x, y).
+ /// </summary>
+ /// <param name='x'>
+ /// X.
+ /// </param>
+ /// <param name='y'>
+ /// Y.
+ /// </param>
+ public void MoveTo (double x, double y)
+ {
+ handler.MoveTo (Backend, x, y);
+ }
+
+ public void Rectangle (Rectangle rectangle)
+ {
+ Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
+ }
+
+ public void Rectangle (Point p, double width, double height)
+ {
+ Rectangle (p.X, p.Y, width, height);
+ }
+
+ public void Rectangle (double x, double y, double width, double height)
+ {
+ handler.Rectangle (Backend, x, y, width, height);
+ }
+
+ public void RelCurveTo (Distance d1, Distance d2, Distance d3)
+ {
+ RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
+ }
+
+ /// <summary>
+ /// Relative-coordinate version of curve_to().
+ /// All offsets are relative to the current point.
+ /// Adds a cubic Bezier spline to the path from the current point to a point offset
+ /// from the current point by (dx3, dy3), using points offset by (dx1, dy1) and (dx2, dy2)
+ /// as the control points. After this call the current point will be offset by (dx3, dy3).
+ /// Given a current point of (x, y), RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3)
+ /// is logically equivalent to CurveTo(x + dx1, y + dy1, x + dx2, y + dy2, x + dx3, y + dy3).
+ /// </summary>
+ /// <param name='dx1'>
+ /// Dx1.
+ /// </param>
+ /// <param name='dy1'>
+ /// Dy1.
+ /// </param>
+ /// <param name='dx2'>
+ /// Dx2.
+ /// </param>
+ /// <param name='dy2'>
+ /// Dy2.
+ /// </param>
+ /// <param name='dx3'>
+ /// Dx3.
+ /// </param>
+ /// <param name='dy3'>
+ /// Dy3.
+ /// </param>
+ public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ {
+ handler.RelCurveTo (Backend, dx1, dy1, dx2, dy2, dx3, dy3);
+ }
+
+ public void RelLineTo (Distance d)
+ {
+ RelLineTo (d.Dx, d.Dy);
+ }
+
+ /// <summary>
+ /// Adds a line to the path from the current point to a point that
+ /// is offset from the current point by (dx, dy) in user space.
+ /// After this call the current point will be offset by (dx, dy).
+ /// Given a current point of (x, y),
+ /// RelLineTo(dx, dy) is logically equivalent to LineTo(x + dx, y + dy).
+ /// </summary>
+ /// <param name='dx'>
+ /// Dx.
+ /// </param>
+ /// <param name='dy'>
+ /// Dy.
+ /// </param>
+ public void RelLineTo (double dx, double dy)
+ {
+ handler.RelLineTo (Backend, dx, dy);
+ }
+
+ /// <summary>
+ /// If the current subpath is not empty, begin a new subpath.
+ /// After this call the current point will offset by (x, y).
+ /// Given a current point of (x, y),
+ /// RelMoveTo(dx, dy) is logically equivalent to MoveTo(x + dx, y + dy).
+ /// </summary>
+ /// <param name='d'>
+ /// D.
+ /// </param>
+ public void RelMoveTo (Distance d)
+ {
+ RelMoveTo (d.Dx, d.Dy);
+ }
+
+ public void RelMoveTo (double dx, double dy)
+ {
+ handler.RelMoveTo (Backend, dx, dy);
+ }
+
+ /// <summary>
+ /// Appends the given path onto the current path.
+ /// </summary>
+ /// <param name='p'>
+ /// The path to append.
+ /// </param>
+ public void AppendPath (DrawingPath p)
+ {
+ if (p is Context)
+ throw new NotSupportedException ("Can't directly append a Context object to a path");
+ if (!(handler is VectorImageRecorderContextHandler) && (p.Backend is VectorBackend)) {
+ var c = (VectorBackend)p.Backend;
+ ToolkitEngine.VectorImageRecorderContextHandler.Draw (handler, Backend, c.ToVectorImageData ());
+ } else {
+ handler.AppendPath (Backend, p.Backend);
+ }
+ }
+
+ public bool IsPointInFill (Point p)
+ {
+ return IsPointInFill (p.X, p.Y);
+ }
+
+ /// <summary>
+ /// Tests whether the given point is inside the area that would be affected if the current path were filled.
+ /// </summary>
+ /// <returns>
+ /// <c>true</c> if the specified point would be in the fill; otherwise, <c>false</c>.
+ /// </returns>
+ /// <param name='x'>
+ /// The x coordinate.
+ /// </param>
+ /// <param name='y'>
+ /// The y coordinate.
+ /// </param>
+ public bool IsPointInFill (double x, double y)
+ {
+ return handler.IsPointInFill (Backend, x, y);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Drawing/Font.cs b/external/xwt/Xwt/Xwt.Drawing/Font.cs
index 24e57f7..9afc235 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Font.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Font.cs
@@ -26,35 +26,39 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+using System.Windows.Markup;
+using System.ComponentModel;
+using System.Text;
+using System.Globalization;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+
namespace Xwt.Drawing
{
+ [TypeConverter (typeof(FontValueConverter))]
+ [ValueSerializer (typeof(FontValueSerializer))]
public sealed class Font: XwtObject
{
- static IFontBackendHandler handler;
- FontSizeUnit unit;
-
- static Font ()
+ FontBackendHandler handler;
+
+ internal Font (object backend): this (backend, null)
{
- handler = WidgetRegistry.CreateSharedBackend<IFontBackendHandler> (typeof(Font));
- }
-
- protected override IBackendHandler BackendHandler {
- get {
- return handler;
- }
}
- internal Font (object backend)
+ internal Font (object backend, Toolkit toolkit)
{
+ if (toolkit != null)
+ ToolkitEngine = toolkit;
+ handler = ToolkitEngine.FontBackendHandler;
if (backend == null)
throw new ArgumentNullException ("backend");
Backend = backend;
}
/// <summary>
- /// Creates a new font description from a string representation in the form "[FAMILY] [SIZE]"
+ /// Creates a new font description from a string representation in the form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]"
/// </summary>
/// <returns>
/// The new font
@@ -62,30 +66,148 @@ namespace Xwt.Drawing
/// <param name='name'>
/// Font description
/// </param>
+ /// <remarks>
+ /// Creates a new font description from a string representation in the form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]",
+ /// where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a
+ /// whitespace separated list of words where each WORD describes one of style, weight or stretch, and SIZE is a
+ /// decimal number (size in points). Any one of the options may be absent. If FAMILY-LIST is absent, the default
+ /// font family will be used. If STYLE-OPTIONS is missing, then all style options will be set to the default values.
+ /// If SIZE is missing, the size in the resulting font description will be set to the default font size.
+ /// If the font doesn't exist, it returns the system font.
+ /// </remarks>
public static Font FromName (string name)
{
- name = name.Trim ();
- if (name.Length == 0)
- throw new ArgumentException ("Font family name not specified");
- int sizeIndex = name.LastIndexOf (' ');
- double size = 0;
- FontSizeUnit unit = FontSizeUnit.Points;
- if (sizeIndex != -1) {
- var s = name.Substring (sizeIndex + 1);
- name = name.Substring (0, sizeIndex);
- if (s.EndsWith ("px")) {
- s = s.Substring (0, s.Length - 2);
- unit = FontSizeUnit.Pixels;
- }
- if (!double.TryParse (s, out size))
- throw new ArgumentException ("Invalid font size: " + s);
+ var toolkit = Toolkit.CurrentEngine;
+ var handler = toolkit.FontBackendHandler;
+
+ double size = -1;
+ FontStyle style = FontStyle.Normal;
+ FontWeight weight = FontWeight.Normal;
+ FontStretch stretch = FontStretch.Normal;
+
+ int i = name.LastIndexOf (' ');
+ int lasti = name.Length;
+ do {
+ string token = name.Substring (i + 1, lasti - i - 1);
+ FontStyle st;
+ FontWeight fw;
+ FontStretch fs;
+ double siz;
+ if (double.TryParse (token, NumberStyles.Any, CultureInfo.InvariantCulture, out siz)) // Try parsing the number first, since Enum.TryParse can also parse numbers
+ size = siz;
+ else if (Enum.TryParse<FontStyle> (token, true, out st) && st != FontStyle.Normal)
+ style = st;
+ else if (Enum.TryParse<FontWeight> (token, true, out fw) && fw != FontWeight.Normal)
+ weight = fw;
+ else if (Enum.TryParse<FontStretch> (token, true, out fs) && fs != FontStretch.Normal)
+ stretch = fs;
+ else if (token.Length > 0)
+ break;
+
+ lasti = i;
+ if (i <= 0)
+ break;
+
+ i = name.LastIndexOf (' ', i - 1);
+ } while (true);
+
+ string fname = lasti > 0 ? name.Substring (0, lasti) : string.Empty;
+ fname = fname.Length > 0 ? GetSupportedFont (fname) : Font.SystemFont.Family;
+
+ if (size == -1)
+ size = SystemFont.Size;
+
+ var fb = handler.Create (fname, size, style, weight, stretch);
+ if (fb != null)
+ return new Font (fb, toolkit);
+ else
+ return Font.SystemFont;
+ }
+
+ static string GetSupportedFont (string fontNames)
+ {
+ LoadInstalledFonts ();
+
+ int i = fontNames.IndexOf (',');
+ if (i == -1) {
+ var f = fontNames.Trim ();
+ string nf;
+ if (installedFonts.TryGetValue (f, out nf))
+ return nf;
+ else
+ return GetDefaultFont (f);
}
- return new Font (handler.Create (name, size, unit, FontStyle.Normal, FontWeight.Normal, FontStretch.Normal));
+
+ string[] names = fontNames.Split (new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
+ if (names.Length == 0)
+ throw new ArgumentException ("Font family name not provided");
+
+ foreach (var name in names) {
+ var n = name.Trim ();
+ if (installedFonts.ContainsKey (n))
+ return n;
+ }
+ return GetDefaultFont (fontNames.Trim (' ',','));
}
-
+
+ static string GetDefaultFont (string unknownFont)
+ {
+ Console.WriteLine ("Font '" + unknownFont + "' not available in the system. Using '" + Font.SystemFont.Family + "' instead");
+ return Font.SystemFont.Family;
+ }
+
+ static Dictionary<string,string> installedFonts;
+ static ReadOnlyCollection<string> installedFontsArray;
+
+
+ static void LoadInstalledFonts ()
+ {
+ if (installedFonts == null) {
+ installedFonts = new Dictionary<string,string> (StringComparer.OrdinalIgnoreCase);
+ foreach (var f in Toolkit.CurrentEngine.FontBackendHandler.GetInstalledFonts ())
+ installedFonts [f] = f;
+ installedFontsArray = new ReadOnlyCollection<string> (installedFonts.Values.ToArray ());
+ }
+ }
+
+ public static ReadOnlyCollection<string> AvailableFontFamilies {
+ get {
+ LoadInstalledFonts ();
+ return installedFontsArray;
+ }
+ }
+
+ public static Font SystemFont {
+ get { return Toolkit.CurrentEngine.FontBackendHandler.SystemFont; }
+ }
+
+ public static Font SystemMonospaceFont {
+ get {
+ return Toolkit.CurrentEngine.FontBackendHandler.SystemMonospaceFont;
+ }
+ }
+
+ public static Font SystemSerifFont {
+ get {
+ return Toolkit.CurrentEngine.FontBackendHandler.SystemSerifFont;
+ }
+ }
+
+ public static Font SystemSansSerifFont {
+ get {
+ return Toolkit.CurrentEngine.FontBackendHandler.SystemSansSerifFont;
+ }
+ }
+
+ /// <summary>
+ /// Returns a copy of the font using the provided font family
+ /// </summary>
+ /// <returns>The new font</returns>
+ /// <param name="fontFamily">A comma separated list of families</param>
public Font WithFamily (string fontFamily)
{
- return new Font (handler.SetFamily (Backend, fontFamily));
+ fontFamily = GetSupportedFont (fontFamily);
+ return new Font (ToolkitEngine.FontBackendHandler.SetFamily (Backend, fontFamily), ToolkitEngine);
}
public string Family {
@@ -103,24 +225,14 @@ namespace Xwt.Drawing
}
}
- public FontSizeUnit SizeUnit {
- get { return unit; }
- }
-
-
- public Font WithPointSize (double size)
- {
- return new Font (handler.SetSize (Backend, size, FontSizeUnit.Points));
- }
-
- public Font WithPixelSize (double size)
+ public Font WithSize (double size)
{
- return new Font (handler.SetSize (Backend, size, FontSizeUnit.Pixels));
+ return new Font (handler.SetSize (Backend, size));
}
public Font WithScaledSize (double scale)
{
- return new Font (handler.SetSize (Backend, Size * scale, unit));
+ return new Font (handler.SetSize (Backend, Size * scale), ToolkitEngine);
}
public FontStyle Style {
@@ -131,7 +243,7 @@ namespace Xwt.Drawing
public Font WithStyle (FontStyle style)
{
- return new Font (handler.SetStyle (Backend, style));
+ return new Font (handler.SetStyle (Backend, style), ToolkitEngine);
}
public FontWeight Weight {
@@ -142,7 +254,7 @@ namespace Xwt.Drawing
public Font WithWeight (FontWeight weight)
{
- return new Font (handler.SetWeight (Backend, weight));
+ return new Font (handler.SetWeight (Backend, weight), ToolkitEngine);
}
public FontStretch Stretch {
@@ -153,16 +265,37 @@ namespace Xwt.Drawing
public Font WithStretch (FontStretch stretch)
{
- return new Font (handler.SetStretch (Backend, stretch));
+ return new Font (handler.SetStretch (Backend, stretch), ToolkitEngine);
}
- }
- public enum FontSizeUnit
- {
- Pixels,
- Points
+ public override string ToString ()
+ {
+ StringBuilder sb = new StringBuilder (Family);
+ if (Style != FontStyle.Normal)
+ sb.Append (' ').Append (Style);
+ if (Weight != FontWeight.Normal)
+ sb.Append (' ').Append (Weight);
+ if (Stretch != FontStretch.Normal)
+ sb.Append (' ').Append (Stretch);
+ sb.Append (' ').Append (Size.ToString (CultureInfo.InvariantCulture));
+ return sb.ToString ();
+ }
+
+ public override bool Equals (object obj)
+ {
+ var other = obj as Font;
+ if (other == null)
+ return false;
+
+ return Family == other.Family && Style == other.Style && Weight == other.Weight && Stretch == other.Stretch && Size == other.Size;
+ }
+
+ public override int GetHashCode ()
+ {
+ return ToString().GetHashCode ();
+ }
}
-
+
public enum FontStyle
{
Normal,
@@ -227,5 +360,42 @@ namespace Xwt.Drawing
/// </summary>
UltraExpanded
}
+
+
+ class FontValueConverter: TypeConverter
+ {
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+ {
+ return destinationType == typeof(string);
+ }
+
+ public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
+ {
+ return sourceType == typeof(string);
+ }
+ }
+
+ class FontValueSerializer: ValueSerializer
+ {
+ public override bool CanConvertFromString (string value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override bool CanConvertToString (object value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override string ConvertToString (object value, IValueSerializerContext context)
+ {
+ return value.ToString ();
+ }
+
+ public override object ConvertFromString (string value, IValueSerializerContext context)
+ {
+ return Font.FromName (value);
+ }
+ }
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/FontStyleTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/FontStyleTextAttribute.cs
new file mode 100644
index 0000000..5a226bd
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/FontStyleTextAttribute.cs
@@ -0,0 +1,50 @@
+//
+// FontStyleTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+ public sealed class FontStyleTextAttribute: TextAttribute
+ {
+ public FontStyle Style { get; set; }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as FontStyleTextAttribute;
+ return ot != null && Style.Equals (ot.Style) && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Style.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/FontTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/FontTextAttribute.cs
new file mode 100644
index 0000000..38412a8
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/FontTextAttribute.cs
@@ -0,0 +1,59 @@
+//
+// FontTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+ public sealed class FontTextAttribute: TextAttribute
+ {
+ Font font;
+
+ public Font Font {
+ get {
+ return font ?? Font.SystemFont;
+ }
+ set {
+ font = value;
+ }
+ }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as FontTextAttribute;
+ return ot != null && Font.Equals (ot.Font) && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Font.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/FontWeightTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/FontWeightTextAttribute.cs
new file mode 100644
index 0000000..bfa7a7f
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/FontWeightTextAttribute.cs
@@ -0,0 +1,50 @@
+//
+// FontWeightTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+ public sealed class FontWeightTextAttribute: TextAttribute
+ {
+ public FontWeight Weight { get; set; }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as FontWeightTextAttribute;
+ return ot != null && Weight.Equals (ot.Weight) && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Weight.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/Gradient.cs b/external/xwt/Xwt/Xwt.Drawing/Gradient.cs
index a161aab..24403ff 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Gradient.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Gradient.cs
@@ -26,28 +26,15 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.Drawing
{
public abstract class Gradient: Pattern
{
- static IGradientBackendHandler handler;
-
- static Gradient ()
- {
- handler = WidgetRegistry.CreateSharedBackend<IGradientBackendHandler> (typeof(Gradient));
- }
-
- protected override Xwt.Backends.IBackendHandler BackendHandler {
- get {
- return handler;
- }
- }
-
public Gradient AddColorStop (double pos, Color color)
{
- handler.AddColorStop (Backend, pos, color);
+ ToolkitEngine.GradientBackendHandler.AddColorStop (Backend, pos, color);
return this;
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/Image.cs b/external/xwt/Xwt/Xwt.Drawing/Image.cs
index f4577dc..2e9f463 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Image.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Image.cs
@@ -25,129 +25,566 @@
// THE SOFTWARE.
using System;
+using System.Linq;
using Xwt.Backends;
-using Xwt.Engine;
+
using System.Reflection;
using System.IO;
+using System.Collections.Generic;
namespace Xwt.Drawing
{
- public sealed class Image: XwtObject, IDisposable
+ public class Image: XwtObject, IDisposable
{
- static ImageBackendHandler handler;
-
- static Image ()
+ Size requestedSize;
+ internal NativeImageRef NativeRef;
+ internal double requestedAlpha = 1;
+
+ internal Image ()
{
- handler = WidgetRegistry.CreateSharedBackend<ImageBackendHandler> (typeof(Image));
- }
-
- protected override IBackendHandler BackendHandler {
- get {
- return handler;
- }
}
internal Image (object backend): base (backend)
{
+ Init ();
}
- public Image (Image image): base (handler.Copy (image.Backend))
+ internal Image (object backend, Toolkit toolkit): base (backend, toolkit)
+ {
+ Init ();
+ }
+
+ /// <summary>
+ /// Creates a new image that is a copy of another image
+ /// </summary>
+ /// <param name="image">Image.</param>
+ public Image (Image image): base (image.Backend, image.ToolkitEngine)
+ {
+ NativeRef = image.NativeRef;
+ Init ();
+ }
+
+ internal void Init ()
{
+ if (NativeRef == null) {
+ NativeRef = new NativeImageRef (Backend, ToolkitEngine);
+ } else
+ NativeRef.AddReference ();
}
+ ~Image ()
+ {
+ Dispose (false);
+ }
+
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (NativeRef != null)
+ NativeRef.ReleaseReference (disposing);
+ }
+
+
+ internal ImageDescription ImageDescription {
+ get {
+ return new ImageDescription () {
+ Alpha = requestedAlpha,
+ Size = Size,
+ Backend = Backend
+ };
+ }
+ }
+
+ /// <summary>
+ /// Loads an image from a resource
+ /// </summary>
+ /// <returns>An image</returns>
+ /// <param name="type">Type which identifies the assembly from which to load the image</param>
+ /// <param name="resource">Resource name</param>
+ /// <remarks>
+ /// This method will look for alternative versions of the image with different resolutions.
+ /// For example, if a resource is named "foo.png", this method will load
+ /// other resources with the name "foo at XXX.png", where XXX can be any arbitrary string. For example "foo at 2x.png".
+ /// Each of those resources will be considered different versions of the same image.
+ /// </remarks>
public static Image FromResource (Type type, string resource)
{
- var img = handler.LoadFromResource (type.Assembly, resource);
- if (img == null)
- throw new InvalidOperationException ("Resource not found: " + resource);
- return new Image (img);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ if (resource == null)
+ throw new ArgumentNullException ("resource");
+
+ return FromResource (type.Assembly, resource);
}
-
- public static Image FromResource (Assembly asm, string resource)
+
+ /// <summary>
+ /// Loads an image from a resource
+ /// </summary>
+ /// <returns>An image</returns>
+ /// <param name="assembly">The assembly from which to load the image</param>
+ /// <param name="resource">Resource name</param>
+ /// <remarks>
+ /// This method will look for alternative versions of the image with different resolutions.
+ /// For example, if a resource is named "foo.png", this method will load
+ /// other resources with the name "foo at XXX.png", where XXX can be any arbitrary string. For example "foo at 2x.png".
+ /// Each of those resources will be considered different versions of the same image.
+ /// </remarks>
+ public static Image FromResource (Assembly assembly, string resource)
{
- var img = handler.LoadFromResource (asm, resource);
+ if (assembly == null)
+ throw new ArgumentNullException ("assembly");
+ if (resource == null)
+ throw new ArgumentNullException ("resource");
+
+ var toolkit = Toolkit.CurrentEngine;
+
+ var name = Path.GetFileNameWithoutExtension (resource);
+
+ var img = toolkit.ImageBackendHandler.LoadFromResource (assembly, resource);
if (img == null)
throw new InvalidOperationException ("Resource not found: " + resource);
- return new Image (img);
+
+ var reqSize = toolkit.ImageBackendHandler.GetSize (img);
+
+ List<object> altImages = new List<object> ();
+ foreach (var r in assembly.GetManifestResourceNames ()) {
+ int i = r.LastIndexOf ('@');
+ if (i != -1) {
+ string rname = r.Substring (0, i);
+ if (rname == resource || rname == name) {
+ var rim = toolkit.ImageBackendHandler.LoadFromResource (assembly, r);
+ if (rim != null)
+ altImages.Add (rim);
+ }
+ }
+ }
+ if (altImages.Count > 0) {
+ altImages.Insert (0, img);
+ img = toolkit.ImageBackendHandler.CreateMultiResolutionImage (altImages);
+ }
+ return new Image (img, toolkit) {
+ requestedSize = reqSize
+ };
}
-
+
+ public static Image CreateMultiSizeIcon (IEnumerable<Image> images)
+ {
+ return new Image (Toolkit.CurrentEngine.ImageBackendHandler.CreateMultiSizeIcon (images.Select (i => i.GetBackend ())));
+ }
+
+/* static bool ParseImageName (string resourceId, string fileName, out int size, out int scale)
+ {
+ if (!fileName.StartsWith (resourceId)) {
+ size = -1;
+ scale = -1;
+ return false;
+ }
+
+ size = -1;
+ int i = fileName.LastIndexOf ('.');
+ if (i < 0)
+ i = fileName.Length - 1;
+
+ scale = ParseScale (fileName, ref i);
+ size = ParseSize (fileName, ref i);
+
+ return i == resourceId.Length - 1;
+ }
+
+ static int ParseScale (string s, ref int i)
+ {
+ if (i > 1 && s [i] >= '0' && s [i] <= '9' && s [i - 1] == '@') {
+ var scale = s [i] - '0';
+ i = i - 2;
+ return scale;
+ } else
+ return 1;
+ }
+
+ static int ParseSize (string s, ref int i)
+ {
+ int end = i;
+ int n = i;
+ while (n >= 0 && char.IsDigit (s[n]))
+ n--;
+ if (end == n || n < 0 || s [n] != 'x')
+ return -1;
+
+ var x = n;
+ var n2 = end;
+ n--;
+
+ while (n >= 0 && n2 > x && s[n] == s[n2]) {
+ n--;
+ n2--;
+ }
+ if (n2 == x && n >= 0 && s[n] == '_') {
+ i = n - 1;
+ return int.Parse (s.Substring (x + 1, end - x - 1));
+ }
+ else
+ return -1;
+ }*/
+
public static Image FromFile (string file)
{
- return new Image (handler.LoadFromFile (file));
+ var toolkit = Toolkit.CurrentEngine;
+ return new Image (toolkit.ImageBackendHandler.LoadFromFile (file), toolkit);
}
public static Image FromStream (Stream stream)
{
- return new Image (handler.LoadFromStream (stream));
+ var toolkit = Toolkit.CurrentEngine;
+ return new Image (toolkit.ImageBackendHandler.LoadFromStream (stream), toolkit);
}
- public static Image FromIcon (string id, IconSize size)
+ public void Save (string file, ImageFileType fileType)
{
- return new Image (handler.LoadFromIcon (id, size));
+ using (var f = File.OpenWrite (file))
+ Save (f, fileType);
}
-
+
+ public void Save (Stream stream, ImageFileType fileType)
+ {
+ ToolkitEngine.ImageBackendHandler.SaveToStream (ToBitmap ().Backend, stream, fileType);
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this image has fixed size.
+ /// </summary>
+ /// <value><c>true</c> if this image has fixed size; otherwise, <c>false</c>.</value>
+ /// <remarks>
+ /// Some kinds of images such as vector images or multiple-size icons don't have a fixed size,
+ /// and a specific size has to be chosen before they can be used. A size can be chosen by using
+ /// the WithSize method.
+ /// </remarks>
+ public bool HasFixedSize {
+ get { return !Size.IsZero; }
+ }
+
+ /// <summary>
+ /// Gets the size of the image
+ /// </summary>
+ /// <value>The size of the image, or Size.Zero if the image doesn't have an intrinsic size</value>
public Size Size {
- get { return handler.GetSize (Backend); }
+ get {
+ return !requestedSize.IsZero ? requestedSize : GetDefaultSize ();
+ }
+ internal set {
+ requestedSize = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets the width of the image
+ /// </summary>
+ /// <value>The width.</value>
+ public double Width {
+ get { return Size.Width; }
+ }
+
+ /// <summary>
+ /// Gets the height of the image
+ /// </summary>
+ /// <value>The height.</value>
+ public double Height {
+ get { return Size.Height; }
+ }
+
+ /// <summary>
+ /// Applies an alpha filter to the image
+ /// </summary>
+ /// <returns>A new image with the alpha filter applied</returns>
+ /// <param name="alpha">Alpha to apply</param>
+ /// <remarks>This is a lightweight operation. The alpha filter is applied when the image is rendered.
+ /// The method doesn't make a copy of the image data.</remarks>
+ public Image WithAlpha (double alpha)
+ {
+ return new Image (this) {
+ requestedSize = requestedSize,
+ requestedAlpha = alpha
+ };
+ }
+
+ /// <summary>
+ /// Retuns a copy of the image with a specific size
+ /// </summary>
+ /// <returns>A new image with the new size</returns>
+ /// <param name="width">Width.</param>
+ /// <param name="height">Height.</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithSize (double width, double height)
+ {
+ return new Image (this) {
+ requestedSize = new Size (width, height)
+ };
+ }
+
+ /// <summary>
+ /// Retuns a copy of the image with a specific size
+ /// </summary>
+ /// <returns>A new image with the new size</returns>
+ /// <param name="size">The size.</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithSize (Size size)
+ {
+ return new Image (this) {
+ requestedSize = size
+ };
+ }
+
+ /// <summary>
+ /// Retuns a copy of the image with a specific size
+ /// </summary>
+ /// <returns>A new image with the new size</returns>
+ /// <param name="squaredSize">Width and height of the image (the image is expected to be squared)</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithSize (double squaredSize)
+ {
+ return new Image (this) {
+ requestedSize = new Size (squaredSize, squaredSize)
+ };
+ }
+
+ /// <summary>
+ /// Retuns a copy of the image with a specific size
+ /// </summary>
+ /// <returns>A new image with the new size</returns>
+ /// <param name="size">New size</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithSize (IconSize size)
+ {
+ Size s;
+
+ switch (size) {
+ case IconSize.Small: s = new Size (16, 16); break;
+ case IconSize.Medium: s = new Size (24, 24); break;
+ case IconSize.Large: s = new Size (32, 32); break;
+ default: throw new ArgumentOutOfRangeException ("size");
+ }
+
+ return new Image (this) {
+ requestedSize = s
+ };
+ }
+
+ internal Size GetFixedSize ()
+ {
+ var size = Size;
+ if (size.IsZero)
+ throw new InvalidOperationException ("Image size has not been set and the image doesn't have a default size");
+ return size;
+ }
+
+ /// <summary>
+ /// Retuns a copy of the image with a size that fits the provided size limits
+ /// </summary>
+ /// <returns>The image</returns>
+ /// <param name="maxWidth">Max width.</param>
+ /// <param name="maxHeight">Max height.</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithBoxSize (double maxWidth, double maxHeight)
+ {
+ var size = GetFixedSize ();
+ var ratio = Math.Min (maxWidth / size.Width, maxHeight / size.Height);
+
+ return new Image (this) {
+ requestedSize = new Size (size.Width * ratio, size.Height * ratio)
+ };
}
- public void SetPixel (int x, int y, Color color)
+ /// <summary>
+ /// Retuns a copy of the image with a size that fits the provided size limits
+ /// </summary>
+ /// <returns>The image</returns>
+ /// <param name="maxSize">Max width and height (the image is expected to be squared)</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithBoxSize (double maxSize)
{
- handler.SetPixel (Backend, x, y, color);
+ return WithBoxSize (maxSize, maxSize);
}
- public Color GetPixel (int x, int y)
+ /// <summary>
+ /// Retuns a copy of the image with a size that fits the provided size limits
+ /// </summary>
+ /// <returns>The image</returns>
+ /// <param name="size">Max width and height</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
+ public Image WithBoxSize (Size size)
{
- return handler.GetPixel (Backend, x, y);
+ return WithBoxSize (size.Width, size.Height);
}
+ /// <summary>
+ /// Retuns a scaled copy of the image
+ /// </summary>
+ /// <returns>The image</returns>
+ /// <param name="scale">Scale to apply to the image size</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
public Image Scale (double scale)
{
+ if (!HasFixedSize)
+ throw new InvalidOperationException ("Image must have a size in order to be scaled");
+
double w = Size.Width * scale;
double h = Size.Height * scale;
- return new Image (handler.Resize (Backend, w, h));
+ return new Image (this) {
+ requestedSize = new Size (w, h)
+ };
}
+ /// <summary>
+ /// Retuns a scaled copy of the image
+ /// </summary>
+ /// <returns>The image</returns>
+ /// <param name="scaleX">Scale to apply to the width of the image</param>
+ /// <param name="scaleY">Scale to apply to the height of the image</param>
+ /// <remarks>
+ /// This is a lightweight operation. The image is scaled when it is rendered.
+ /// The method doesn't make a copy of the image data.
+ /// </remarks>
public Image Scale (double scaleX, double scaleY)
{
+ if (!HasFixedSize)
+ throw new InvalidOperationException ("Image must have a size in order to be scaled");
+
double w = Size.Width * scaleX;
double h = Size.Height * scaleY;
- return new Image (handler.Resize (Backend, w, h));
+ return new Image (this) {
+ requestedSize = new Size (w, h)
+ };
}
-
- public Image Resize (double width, double height)
+
+ /// <summary>
+ /// Converts the image to a bitmap
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="format">Bitmap format</param>
+ public BitmapImage ToBitmap (ImageFormat format = ImageFormat.ARGB32)
{
- return new Image (handler.Resize (Backend, width, height));
+ var s = GetFixedSize ();
+ return ToBitmap ((int)s.Width, (int)s.Height);
}
-
- public Image ResizeToFitBox (double width, double height)
+
+ /// <summary>
+ /// Converts the image to a bitmap
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="renderTarget">Widget to be used as reference for determining the resolution of the bitmap</param>
+ /// <param name="format">Bitmap format</param>
+ public BitmapImage ToBitmap (Widget renderTarget, ImageFormat format = ImageFormat.ARGB32)
{
- double r = Math.Min (width / Size.Width, height / Size.Height);
- return new Image (handler.Resize (Backend, Size.Width * r, Size.Height * r));
+ if (renderTarget.ParentWindow == null)
+ throw new InvalidOperationException ("renderTarget is not bound to a window");
+ return ToBitmap (renderTarget.ParentWindow, format);
}
-
- public Image ToGrayscale ()
+
+ /// <summary>
+ /// Converts the image to a bitmap
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="renderTarget">Window to be used as reference for determining the resolution of the bitmap</param>
+ /// <param name="format">Bitmap format</param>
+ public BitmapImage ToBitmap (WindowFrame renderTarget, ImageFormat format = ImageFormat.ARGB32)
{
- throw new NotImplementedException ();
+ return ToBitmap (renderTarget.Screen, format);
}
-
- public Image ChangeOpacity (double opacity)
+
+ /// <summary>
+ /// Converts the image to a bitmap
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="renderTarget">Screen to be used as reference for determining the resolution of the bitmap</param>
+ /// <param name="format">Bitmap format</param>
+ public BitmapImage ToBitmap (Screen renderTarget, ImageFormat format = ImageFormat.ARGB32)
{
- return new Image (handler.ChangeOpacity (Backend, opacity));
+ var s = GetFixedSize ();
+ return ToBitmap ((int)(s.Width * renderTarget.ScaleFactor), (int)(s.Height * renderTarget.ScaleFactor), format);
}
-
- public void CopyArea (int srcX, int srcY, int width, int height, Image dest, int destX, int destY)
+
+ /// <summary>
+ /// Converts the image to a bitmap
+ /// </summary>
+ /// <returns>The bitmap.</returns>
+ /// <param name="pixelWidth">Width of the image in real pixels</param>
+ /// <param name="pixelHeight">Height of the image in real pixels</param>
+ /// <param name="format">Bitmap format</param>
+ public BitmapImage ToBitmap (int pixelWidth, int pixelHeight, ImageFormat format = ImageFormat.ARGB32)
{
- handler.CopyArea (Backend, srcX, srcY, width, height, dest.Backend, destX, destY);
+ var bmp = ToolkitEngine.ImageBackendHandler.ConvertToBitmap (Backend, pixelWidth, pixelHeight, format);
+ return new BitmapImage (bmp);
}
-
- public Image Crop (int srcX, int srcY, int width, int height)
+
+ protected virtual Size GetDefaultSize ()
{
- return new Image (handler.Crop (Backend, srcX, srcY, width, height));
+ return ToolkitEngine.ImageBackendHandler.GetSize (Backend);
}
-
- public void Dispose ()
+ }
+
+ class NativeImageRef
+ {
+ object backend;
+ int referenceCount = 1;
+ Toolkit toolkit;
+
+ public int ReferenceCount {
+ get { return referenceCount; }
+ }
+
+ public NativeImageRef (object backend, Toolkit toolkit)
{
- handler.Dispose (Backend);
+ this.backend = backend;
+ this.toolkit = toolkit;
+
+ if (toolkit.ImageBackendHandler.DisposeHandleOnUiThread)
+ ResourceManager.RegisterResource (backend, toolkit.ImageBackendHandler.Dispose);
+ }
+
+ public void AddReference ()
+ {
+ System.Threading.Interlocked.Increment (ref referenceCount);
+ }
+
+ public void ReleaseReference (bool disposing)
+ {
+ if (System.Threading.Interlocked.Decrement (ref referenceCount) == 0) {
+ if (disposing) {
+ if (toolkit.ImageBackendHandler.DisposeHandleOnUiThread)
+ ResourceManager.FreeResource (backend);
+ else
+ toolkit.ImageBackendHandler.Dispose (backend);
+ } else
+ ResourceManager.FreeResource (backend);
+ }
}
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/ImageBuilder.cs b/external/xwt/Xwt/Xwt.Drawing/ImageBuilder.cs
index f3782e3..9eebdf5 100644
--- a/external/xwt/Xwt/Xwt.Drawing/ImageBuilder.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/ImageBuilder.cs
@@ -26,65 +26,74 @@
using System;
using Xwt;
using Xwt.Backends;
-using Xwt.Engine;
+using System.Collections.Generic;
+
namespace Xwt.Drawing
{
public sealed class ImageBuilder: XwtObject, IDisposable
{
Context ctx;
- static IImageBuilderBackendHandler handler;
- object backend;
- int width;
- int height;
-
- static ImageBuilder ()
- {
- handler = WidgetRegistry.CreateSharedBackend<IImageBuilderBackendHandler> (typeof(ImageBuilder));
- }
-
- public ImageBuilder (int width, int height): this (width, height, ImageFormat.ARGB32)
- {
- }
-
- public ImageBuilder (int width, int height, ImageFormat format)
+ VectorBackend backend;
+ double width;
+ double height;
+
+ public ImageBuilder (double width, double height)
{
+ backend = new VectorContextBackend (ToolkitEngine, width, height);
+ ctx = new Context (backend, ToolkitEngine, ToolkitEngine.VectorImageRecorderContextHandler);
+ ctx.Reset (null);
this.width = width;
this.height = height;
- backend = handler.CreateImageBuilder (width, height, format);
- ctx = new Context (handler.CreateContext (backend));
}
- public int Width {
- get { return width; }
+ public double Width {
+ get { return width; }
}
- public int Height {
+ public double Height {
get { return height; }
}
public void Dispose ()
{
ctx.Dispose ();
- handler.Dispose (backend);
- }
-
- protected override IBackendHandler BackendHandler {
- get {
- return handler;
- }
}
-
+
public Context Context {
get {
return ctx;
}
}
- public Image ToImage ()
+ public Image ToVectorImage ()
{
- return new Image (handler.CreateImage (backend));
+ return new VectorImage (new Size (width, height), backend.ToVectorImageData ());
+ }
+
+ public BitmapImage ToBitmap (ImageFormat format = ImageFormat.ARGB32)
+ {
+ return ToVectorImage ().ToBitmap (format);
+ }
+
+ public BitmapImage ToBitmap (Widget renderTarget, ImageFormat format = ImageFormat.ARGB32)
+ {
+ return ToVectorImage ().ToBitmap (renderTarget, format);
+ }
+
+ public BitmapImage ToBitmap (Window renderTarget, ImageFormat format = ImageFormat.ARGB32)
+ {
+ return ToVectorImage ().ToBitmap (renderTarget, format);
+ }
+
+ public BitmapImage ToBitmap (Screen renderTarget, ImageFormat format = ImageFormat.ARGB32)
+ {
+ return ToVectorImage ().ToBitmap (renderTarget, format);
+ }
+
+ public BitmapImage ToBitmap (int pixelWidth, int pixelHeight, ImageFormat format = ImageFormat.ARGB32)
+ {
+ return ToVectorImage ().ToBitmap (pixelWidth, pixelHeight, format);
}
}
}
-
diff --git a/external/xwt/Xwt/Xwt.Drawing/ImageFileType.cs b/external/xwt/Xwt/Xwt.Drawing/ImageFileType.cs
new file mode 100644
index 0000000..6faa65b
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/ImageFileType.cs
@@ -0,0 +1,37 @@
+//
+// ImageFileType.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt.Drawing
+{
+ public enum ImageFileType
+ {
+ Jpeg,
+ Png,
+ Bmp
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Drawing/ImagePattern.cs b/external/xwt/Xwt/Xwt.Drawing/ImagePattern.cs
index dfc774c..1e69a98 100644
--- a/external/xwt/Xwt/Xwt.Drawing/ImagePattern.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/ImagePattern.cs
@@ -25,28 +25,15 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt.Drawing
{
public sealed class ImagePattern: Pattern
{
- static IImagePatternBackendHandler handler;
-
- static ImagePattern ()
- {
- handler = WidgetRegistry.CreateSharedBackend<IImagePatternBackendHandler> (typeof(ImagePattern));
- }
-
- protected override Xwt.Backends.IBackendHandler BackendHandler {
- get {
- return handler;
- }
- }
-
- public ImagePattern (Image img)
+ public ImagePattern (Image image)
{
- Backend = ((IImagePatternBackendHandler)BackendHandler).Create (GetBackend (img));
+ SetBackend (ToolkitEngine.ImagePatternBackendHandler, ToolkitEngine.ImagePatternBackendHandler.Create (image != null ? image.ImageDescription : ImageDescription.Null));
}
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/LinearGradient.cs b/external/xwt/Xwt/Xwt.Drawing/LinearGradient.cs
index ec394a8..27e46ce 100644
--- a/external/xwt/Xwt/Xwt.Drawing/LinearGradient.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/LinearGradient.cs
@@ -33,7 +33,7 @@ namespace Xwt.Drawing
{
public LinearGradient (double xStart, double yStart, double xEnd, double yEnd)
{
- Backend = ((IGradientBackendHandler)BackendHandler).CreateLinear (xStart, yStart, xEnd, yEnd);
+ SetBackend (ToolkitEngine.GradientBackendHandler, ToolkitEngine.GradientBackendHandler.CreateLinear (xStart, yStart, xEnd, yEnd));
}
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/LinkTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/LinkTextAttribute.cs
new file mode 100644
index 0000000..6e8dc47
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/LinkTextAttribute.cs
@@ -0,0 +1,49 @@
+//
+// LinkTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+ public sealed class LinkTextAttribute: TextAttribute
+ {
+ public string Target { get; set; }
+
+ public override bool Equals (object t)
+ {
+ var ot = t as LinkTextAttribute;
+ return ot != null && Target == ot.Target && base.Equals (t);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ (Target != null ? Target.GetHashCode () : 0);
+ }
+ }
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/Matrix.cs b/external/xwt/Xwt/Xwt.Drawing/Matrix.cs
index f83ba6a..f2f89c3 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Matrix.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Matrix.cs
@@ -41,21 +41,21 @@ namespace Xwt.Drawing
public class Matrix
{
- double m11;
- double m12;
- double m21;
- double m22;
- double offsetX;
- double offsetY;
+ public double M11 { get; set; }
+ public double M12 { get; set; }
+ public double M21 { get; set; }
+ public double M22 { get; set; }
+ public double OffsetX { get; set; }
+ public double OffsetY { get; set; }
public Matrix (double m11, double m12, double m21, double m22, double offsetX, double offsetY)
{
- this.m11 = m11;
- this.m12 = m12;
- this.m21 = m21;
- this.m22 = m22;
- this.offsetX = offsetX;
- this.offsetY = offsetY;
+ this.M11 = m11;
+ this.M12 = m12;
+ this.M21 = m21;
+ this.M22 = m22;
+ this.OffsetX = offsetX;
+ this.OffsetY = offsetY;
}
public Matrix (Matrix m) : this(m.M11, m.M12, m.M21, m.M22, m.OffsetX, m.OffsetY)
@@ -69,30 +69,35 @@ namespace Xwt.Drawing
public void Append (Matrix matrix)
{
- var _m11 = m11 * matrix.M11 + m12 * matrix.M21;
- var _m12 = m11 * matrix.M12 + m12 * matrix.M22;
- var _m21 = m21 * matrix.M11 + m22 * matrix.M21;
- var _m22 = m21 * matrix.M12 + m22 * matrix.M22;
-
- var _offsetX = offsetX * matrix.M11 + offsetY * matrix.M21 + matrix.OffsetX;
- var _offsetY = offsetX * matrix.M12 + offsetY * matrix.M22 + matrix.OffsetY;
-
- m11 = _m11;
- m12 = _m12;
- m21 = _m21;
- m22 = _m22;
- offsetX = _offsetX;
- offsetY = _offsetY;
+ Append (matrix.M11, matrix.M12, matrix.M21, matrix.M22, matrix.OffsetX, matrix.OffsetY);
+ }
+
+ protected void Append (double m11, double m12, double m21, double m22, double offsetX, double offsetY)
+ {
+ var _m11 = M11 * m11 + M12 * m21;
+ var _m12 = M11 * m12 + M12 * m22;
+ var _m21 = M21 * m11 + M22 * m21;
+ var _m22 = M21 * m12 + M22 * m22;
+
+ var _offsetX = OffsetX * m11 + OffsetY * m21 + offsetX;
+ var _offsetY = OffsetX * m12 + OffsetY * m22 + offsetY;
+
+ M11 = _m11;
+ M12 = _m12;
+ M21 = _m21;
+ M22 = _m22;
+ OffsetX = _offsetX;
+ OffsetY = _offsetY;
}
public bool Equals (Matrix value)
{
- return (m11 == value.M11 &&
- m12 == value.M12 &&
- m21 == value.M21 &&
- m22 == value.M22 &&
- offsetX == value.OffsetX &&
- offsetY == value.OffsetY);
+ return (M11 == value.M11 &&
+ M12 == value.M12 &&
+ M21 == value.M21 &&
+ M22 == value.M22 &&
+ OffsetX == value.OffsetX &&
+ OffsetY == value.OffsetY);
}
public override bool Equals (object o)
@@ -110,12 +115,12 @@ namespace Xwt.Drawing
public override int GetHashCode ()
{
- int h = m11.GetHashCode ();
- h = (h << 5) - h + m21.GetHashCode ();
- h = (h << 5) - h + m12.GetHashCode ();
- h = (h << 5) - h + m22.GetHashCode ();
- h = (h << 5) - h + offsetX.GetHashCode ();
- h = (h << 5) - h + offsetY.GetHashCode ();
+ int h = M11.GetHashCode ();
+ h = (h << 5) - h + M21.GetHashCode ();
+ h = (h << 5) - h + M12.GetHashCode ();
+ h = (h << 5) - h + M22.GetHashCode ();
+ h = (h << 5) - h + OffsetX.GetHashCode ();
+ h = (h << 5) - h + OffsetY.GetHashCode ();
return h;
}
@@ -128,20 +133,20 @@ namespace Xwt.Drawing
/* 1/(ad-bc)[d -b; -c a] */
- var _m11 = m22;
- var _m12 = -m12;
- var _m21 = -m21;
- var _m22 = m11;
+ var _m11 = M22;
+ var _m12 = -M12;
+ var _m21 = -M21;
+ var _m22 = M11;
- var _offsetX = m21 * offsetY - m22 * offsetX;
- var _offsetY = m12 * offsetX - m11 * offsetY;
+ var _offsetX = M21 * OffsetY - M22 * OffsetX;
+ var _offsetY = M12 * OffsetX - M11 * OffsetY;
- m11 = _m11 / d;
- m12 = _m12 / d;
- m21 = _m21 / d;
- m22 = _m22 / d;
- offsetX = _offsetX / d;
- offsetY = _offsetY / d;
+ M11 = _m11 / d;
+ M12 = _m12 / d;
+ M21 = _m21 / d;
+ M22 = _m22 / d;
+ OffsetX = _offsetX / d;
+ OffsetY = _offsetY / d;
}
public static Matrix Multiply (Matrix trans1, Matrix trans2)
@@ -172,38 +177,40 @@ namespace Xwt.Drawing
public void Prepend (Matrix matrix)
{
- var _m11 = matrix.M11 * m11 + matrix.M12 * m21;
- var _m12 = matrix.M11 * m12 + matrix.M12 * m22;
- var _m21 = matrix.M21 * m11 + matrix.M22 * m21;
- var _m22 = matrix.M21 * m12 + matrix.M22 * m22;
+ var _m11 = matrix.M11 * M11 + matrix.M12 * M21;
+ var _m12 = matrix.M11 * M12 + matrix.M12 * M22;
+ var _m21 = matrix.M21 * M11 + matrix.M22 * M21;
+ var _m22 = matrix.M21 * M12 + matrix.M22 * M22;
- var _offsetX = matrix.OffsetX * m11 + matrix.OffsetY * m21 + offsetX;
- var _offsetY = matrix.OffsetX * m12 + matrix.OffsetY * m22 + offsetY;
+ var _offsetX = matrix.OffsetX * M11 + matrix.OffsetY * M21 + OffsetX;
+ var _offsetY = matrix.OffsetX * M12 + matrix.OffsetY * M22 + OffsetY;
- m11 = _m11;
- m12 = _m12;
- m21 = _m21;
- m22 = _m22;
- offsetX = _offsetX;
- offsetY = _offsetY;
+ M11 = _m11;
+ M12 = _m12;
+ M21 = _m21;
+ M22 = _m22;
+ OffsetX = _offsetX;
+ OffsetY = _offsetY;
}
public void Rotate (double angle)
{
- // R_theta==[costheta -sintheta; sintheta costheta],
- var theta = angle * pi180;
- var cos = Math.Cos (theta);
- var sin = Math.Sin (theta);
-
- var _m11 = cos * this.m11 + sin * this.m21;
- var _m12 = cos * this.m12 + sin * this.m22;
- var _m21 = cos * this.m21 - sin * this.m11;
- var _m22 = cos * this.m22 - sin * this.m12;
-
- this.m11 = _m11;
- this.m12 = _m12;
- this.m21 = _m21;
- this.m22 = _m22;
+ angle = angle % 360;
+ if (angle == 90 || angle == -270)
+ Append (0, 1, -1, 0, 0, 0);
+ else if (angle == -90 || angle == 270)
+ Append (0, -1, 1, 0, 0, 0);
+ else if (angle == 180 || angle == -180)
+ Append (-1, 0, 0, -1, 0, 0);
+ else if (angle == 0)
+ return;
+ else {
+ var theta = angle * pi180;
+
+ var cos = Math.Cos (theta);
+ var sin = Math.Sin (theta);
+ Append (cos, sin, -sin, cos, 0, 0);
+ }
}
public void RotateAt (double angle, double centerX, double centerY)
@@ -229,8 +236,7 @@ namespace Xwt.Drawing
public void Scale (double scaleX, double scaleY)
{
- var scale = new Matrix (scaleX, 0, 0, scaleY, 0, 0);
- Append (scale);
+ Append (scaleX, 0, 0, scaleY, 0, 0);
}
public void ScaleAt (double scaleX, double scaleY, double centerX, double centerY)
@@ -256,19 +262,18 @@ namespace Xwt.Drawing
public void SetIdentity ()
{
- m11 = m22 = 1.0;
- m12 = m21 = 0.0;
- offsetX = offsetY = 0.0;
+ M11 = M22 = 1.0;
+ M12 = M21 = 0.0;
+ OffsetX = OffsetY = 0.0;
}
const double pi180 = Math.PI / 180;
public void Skew (double skewX, double skewY)
{
- var skew_m = new Matrix (1, Math.Tan (skewY * pi180),
- Math.Tan (skewX * pi180), 1,
- 0, 0);
- Append (skew_m);
+ Append (1, Math.Tan (skewY * pi180),
+ Math.Tan (skewX * pi180), 1,
+ 0, 0);
}
public void SkewPrepend (double skewX, double skewY)
@@ -284,18 +289,18 @@ namespace Xwt.Drawing
return this.GetType ().Name + "=Identity";
else
return string.Format (this.GetType ().Name + "{{M11={0} M12={1} M21={2} M22={3} OffsetX={4} OffsetY={5}}}",
- m11.ToString (CultureInfo.InvariantCulture),
- m12.ToString (CultureInfo.InvariantCulture),
- m21.ToString (CultureInfo.InvariantCulture),
- m22.ToString (CultureInfo.InvariantCulture),
- offsetX.ToString (CultureInfo.InvariantCulture),
- offsetY.ToString (CultureInfo.InvariantCulture));
+ M11.ToString (CultureInfo.InvariantCulture),
+ M12.ToString (CultureInfo.InvariantCulture),
+ M21.ToString (CultureInfo.InvariantCulture),
+ M22.ToString (CultureInfo.InvariantCulture),
+ OffsetX.ToString (CultureInfo.InvariantCulture),
+ OffsetY.ToString (CultureInfo.InvariantCulture));
}
public Point Transform (Point point)
{
- return new Point (point.X * m11 + point.Y * m21 + offsetX,
- point.X * m12 + point.Y * m22 + offsetY);
+ return new Point (point.X * M11 + point.Y * M21 + OffsetX,
+ point.X * M12 + point.Y * M22 + OffsetY);
}
public void Transform (Point[] points)
@@ -303,6 +308,13 @@ namespace Xwt.Drawing
double x;
double y;
var len = points.Length;
+ var m11 = this.M11;
+ var m12 = this.M12;
+ var m21 = this.M21;
+ var m22 = this.M22;
+ var offsetX = this.OffsetX;
+ var offsetY = this.OffsetY;
+
for (int i = 0; i < len; i++) {
x = points [i].X;
y = points [i].Y;
@@ -313,7 +325,7 @@ namespace Xwt.Drawing
public Point TransformVector (Point vector)
{
- return new Point (vector.X * m11 + vector.Y * m21, vector.X * m12 + vector.Y * m22);
+ return new Point (vector.X * M11 + vector.Y * M21, vector.X * M12 + vector.Y * M22);
}
public void TransformVector (Point[] vectors)
@@ -321,6 +333,11 @@ namespace Xwt.Drawing
double x;
double y;
var len = vectors.Length;
+ var m11 = this.M11;
+ var m12 = this.M12;
+ var m21 = this.M21;
+ var m22 = this.M22;
+
for (int i = 0; i < len; i++) {
x = vectors [i].X;
y = vectors [i].Y;
@@ -331,8 +348,8 @@ namespace Xwt.Drawing
public void Translate (double offsetX, double offsetY)
{
- this.offsetX += offsetX;
- this.offsetY += offsetY;
+ this.OffsetX += offsetX;
+ this.OffsetY += offsetY;
}
public void TranslatePrepend (double offsetX, double offsetY)
@@ -343,7 +360,7 @@ namespace Xwt.Drawing
}
public double Determinant {
- get { return m11 * m22 - m12 * m21; }
+ get { return M11 * M22 - M12 * M21; }
}
public bool HasInverse {
@@ -356,42 +373,12 @@ namespace Xwt.Drawing
public bool IsIdentity {
get {
- return (m11 == 1.0d && m12 == 0.0d &&
- m21 == 0.0d && m22 == 1.0d &&
- offsetX == 0.0d && offsetY == 0.0d);
+ return (M11 == 1.0d && M12 == 0.0d &&
+ M21 == 0.0d && M22 == 1.0d &&
+ OffsetX == 0.0d && OffsetY == 0.0d);
}
}
- public double M11 {
- get { return m11; }
- set { m11 = value; }
- }
-
- public double M12 {
- get { return m12; }
- set { m12 = value; }
- }
-
- public double M21 {
- get { return m21; }
- set { m21 = value; }
- }
-
- public double M22 {
- get { return m22; }
- set { m22 = value; }
- }
-
- public double OffsetX {
- get { return offsetX; }
- set { offsetX = value; }
- }
-
- public double OffsetY {
- get { return offsetY; }
- set { offsetY = value; }
- }
-
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/Pattern.cs b/external/xwt/Xwt/Xwt.Drawing/Pattern.cs
index 7702e65..a13068c 100644
--- a/external/xwt/Xwt/Xwt.Drawing/Pattern.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/Pattern.cs
@@ -25,14 +25,41 @@
// THE SOFTWARE.
using System;
+using Xwt.Backends;
namespace Xwt.Drawing
{
- public abstract class Pattern: XwtObject
+ public abstract class Pattern: XwtObject, IDisposable
{
+ DisposableResourceBackendHandler handler;
+
internal Pattern ()
{
}
+
+ internal void SetBackend (DisposableResourceBackendHandler handler, object backend)
+ {
+ Backend = backend;
+ this.handler = handler;
+ if (handler.DisposeHandleOnUiThread)
+ ResourceManager.RegisterResource (backend, handler.Dispose);
+ else
+ GC.SuppressFinalize (this);
+ }
+
+ ~Pattern ()
+ {
+ ResourceManager.FreeResource (Backend);
+ }
+
+ public void Dispose ()
+ {
+ if (handler.DisposeHandleOnUiThread) {
+ GC.SuppressFinalize (this);
+ ResourceManager.FreeResource (Backend);
+ } else
+ handler.Dispose (Backend);
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/RadialGradient.cs b/external/xwt/Xwt/Xwt.Drawing/RadialGradient.cs
index 4056764..4e0ff56 100644
--- a/external/xwt/Xwt/Xwt.Drawing/RadialGradient.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/RadialGradient.cs
@@ -33,7 +33,7 @@ namespace Xwt.Drawing
{
public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
{
- Backend = ((IGradientBackendHandler)BackendHandler).CreateRadial (cx0, cy0, radius0, cx1, cy1, radius1);
+ SetBackend (ToolkitEngine.GradientBackendHandler, ToolkitEngine.GradientBackendHandler.CreateRadial (cx0, cy0, radius0, cx1, cy1, radius1));
}
}
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/StrikethroughTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/StrikethroughTextAttribute.cs
new file mode 100644
index 0000000..5efa95e
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/StrikethroughTextAttribute.cs
@@ -0,0 +1,56 @@
+//
+// StrikethroughTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+
+ public sealed class StrikethroughTextAttribute: TextAttribute
+ {
+ public StrikethroughTextAttribute ()
+ {
+ Strikethrough = true;
+ }
+
+ public bool Strikethrough { get; set; }
+
+ public override bool Equals (object ob)
+ {
+ var t = ob as StrikethroughTextAttribute;
+ return t != null && t.Strikethrough == Strikethrough && base.Equals (ob);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Strikethrough.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/TextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/TextAttribute.cs
new file mode 100644
index 0000000..ab7863c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/TextAttribute.cs
@@ -0,0 +1,60 @@
+//
+// TextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+ public abstract class TextAttribute
+ {
+ public int StartIndex { get; set; }
+ public int Count { get; set; }
+
+ internal TextAttribute ()
+ {
+ }
+
+ public TextAttribute Clone ()
+ {
+ return (TextAttribute)MemberwiseClone ();
+ }
+
+ public override bool Equals (object ob)
+ {
+ var t = ob as TextAttribute;
+ return t != null && t.GetType () == GetType () && t.StartIndex == StartIndex && t.Count == Count;
+ }
+
+ public override int GetHashCode ()
+ {
+ return GetType().GetHashCode () ^ StartIndex ^ Count;
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/TextLayout.cs b/external/xwt/Xwt/Xwt.Drawing/TextLayout.cs
index 9e11f40..c1d8fbe 100644
--- a/external/xwt/Xwt/Xwt.Drawing/TextLayout.cs
+++ b/external/xwt/Xwt/Xwt.Drawing/TextLayout.cs
@@ -26,54 +26,93 @@
// THE SOFTWARE.
using System;
-using Xwt.Engine;
+
using Xwt.Backends;
+using System.Collections.Generic;
namespace Xwt.Drawing
{
- public sealed class TextLayout: XwtObject
+ public sealed class TextLayout: XwtObject, IDisposable
{
- static ITextLayoutBackendHandler handler;
-
+ TextLayoutBackendHandler handler;
+
Font font;
string text;
double width = -1;
double height = -1;
TextTrimming textTrimming;
-
- static TextLayout ()
+ List<TextAttribute> attributes;
+
+ public TextLayout ()
{
- handler = WidgetRegistry.CreateSharedBackend<ITextLayoutBackendHandler> (typeof(TextLayout));
- }
-
- protected override IBackendHandler BackendHandler {
- get {
- return handler;
- }
+ handler = ToolkitEngine.TextLayoutBackendHandler;
+ Backend = handler.Create ();
+ Font = Font.SystemFont;
+ Setup ();
}
-
+
public TextLayout (Canvas canvas)
{
- Backend = handler.Create ((ICanvasBackend)WidgetRegistry.GetBackend (canvas));
+ ToolkitEngine = canvas.Surface.ToolkitEngine;
+ handler = ToolkitEngine.TextLayoutBackendHandler;
+ Backend = handler.Create ();
Font = canvas.Font;
+ Setup ();
}
-
- public TextLayout (Context ctx)
+
+ internal TextLayout (Toolkit tk)
{
- Backend = handler.Create (ctx);
+ ToolkitEngine = tk;
+ handler = ToolkitEngine.TextLayoutBackendHandler;
+ Backend = handler.Create ();
+ Setup ();
+ }
+
+ void Setup ()
+ {
+ if (handler.DisposeHandleOnUiThread)
+ ResourceManager.RegisterResource (Backend, handler.Dispose);
+ else
+ GC.SuppressFinalize (this);
}
+ public void Dispose ()
+ {
+ if (handler.DisposeHandleOnUiThread) {
+ GC.SuppressFinalize (this);
+ ResourceManager.FreeResource (Backend);
+ } else
+ handler.Dispose (Backend);
+ }
+
+ ~TextLayout ()
+ {
+ ResourceManager.FreeResource (Backend);
+ }
+
+ internal TextLayoutData GetData ()
+ {
+ return new TextLayoutData () {
+ Width = width,
+ Height = height,
+ Text = text,
+ Font = font,
+ TextTrimming = textTrimming,
+ Attributes = attributes != null ? new List<TextAttribute> (attributes) : null
+ };
+ }
+
public Font Font {
get { return font; }
set { font = value; handler.SetFont (Backend, value); }
}
-
+
public string Text {
get { return text; }
set { text = value;
handler.SetText (Backend, text); }
}
-
+
/// <summary>
/// Gets or sets the desired width.
/// </summary>
@@ -84,7 +123,7 @@ namespace Xwt.Drawing
get { return width; }
set { width = value; handler.SetWidth (Backend, value); }
}
-
+
/// <summary>
/// Gets or sets desired Height.
/// </summary>
@@ -95,7 +134,7 @@ namespace Xwt.Drawing
get { return this.height; }
set { this.height = value; handler.SetHeight (Backend, value); }
}
-
+
/// <summary>
/// measures the text
/// if Width is other than -1, it measures the height according to Width
@@ -108,16 +147,188 @@ namespace Xwt.Drawing
{
return handler.GetSize (Backend);
}
-
+
public TextTrimming Trimming {
get { return textTrimming; }
set { textTrimming = value; handler.SetTrimming (Backend, value); }
}
+
+ /// <summary>
+ /// Converts from a X and Y position within the layout to the character at this position.
+ /// </summary>
+ /// <returns>The index of the character.</returns>
+ /// <param name="x">The x coordinate.</param>
+ /// <param name="y">The y coordinate.</param>
+ public int GetIndexFromCoordinates (double x, double y)
+ {
+ return handler.GetIndexFromCoordinates (Backend, x, y);
+ }
+
+ /// <summary>
+ /// Converts from a Position within the layout to the character at this position.
+ /// </summary>
+ /// <returns>The index of the character.</returns>
+ /// <param name="p">The position.</param>
+ public int GetIndexFromCoordinates (Point p)
+ {
+ return handler.GetIndexFromCoordinates (Backend, p.X, p.Y);
+ }
+
+ /// <summary>
+ /// Obtains the graphical coordinate of an character in the layout.
+ /// </summary>
+ /// <returns>The extends from the character at index.</returns>
+ /// <param name="index">The index of the character.</param>
+ public Point GetCoordinateFromIndex (int index)
+ {
+ return handler.GetCoordinateFromIndex (Backend, index);
+ }
+
+ List<TextAttribute> Attributes {
+ get {
+ if (attributes == null)
+ attributes = new List<TextAttribute> ();
+ return attributes;
+ }
+ }
+
+ string markup;
+ public string Markup {
+ get { return markup; }
+ set {
+ markup = value;
+ var t = FormattedText.FromMarkup (markup);
+ Text = t.Text;
+ ClearAttributes ();
+ foreach (var at in attributes)
+ AddAttribute (at);
+ }
+ }
+
+ public void AddAttribute (TextAttribute attribute)
+ {
+ Attributes.Add (attribute.Clone ());
+ handler.AddAttribute (Backend, attribute);
+ }
+
+ public void ClearAttributes ()
+ {
+ Attributes.Clear ();
+ handler.ClearAttributes (Backend);
+ }
+
+ /// <summary>
+ /// Sets the foreground color of a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="color">The color of the text.</param>
+ /// <param name="startIndex">Start index of the first character to apply the foreground color to.</param>
+ /// <param name="count">The number of characters to apply the foreground color to.</param>
+ public void SetForeground (Color color, int startIndex, int count)
+ {
+ AddAttribute (new ColorTextAttribute () { StartIndex = startIndex, Count = count, Color = color });
+ }
+
+ /// <summary>
+ /// Sets the background color of a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="color">The color of the text background.</param>
+ /// <param name="startIndex">Start index of the first character to apply the background color to.</param>
+ /// <param name="count">The number of characters to apply the background color to.</param>
+ public void SetBackgound (Color color, int startIndex, int count)
+ {
+ AddAttribute (new BackgroundTextAttribute () { StartIndex = startIndex, Count = count, Color = color });
+ }
+
+ /// <summary>
+ /// Sets the font weight of a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="weight">The font weight of the text.</param>
+ /// <param name="startIndex">Start index of the first character to apply the font weight to.</param>
+ /// <param name="count">The number of characters to apply the font weight to.</param>
+ public void SetFontWeight (FontWeight weight, int startIndex, int count)
+ {
+ AddAttribute (new FontWeightTextAttribute () { StartIndex = startIndex, Count = count, Weight = weight });
+ }
+
+ /// <summary>
+ /// Sets the font style of a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="style">The font style of the text.</param>
+ /// <param name="startIndex">Start index of the first character to apply the font style to.</param>
+ /// <param name="count">The number of characters to apply the font style to.</param>
+ public void SetFontStyle (FontStyle style, int startIndex, int count)
+ {
+ AddAttribute (new FontStyleTextAttribute () { StartIndex = startIndex, Count = count, Style = style });
+ }
+
+ /// <summary>
+ /// Underlines a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="startIndex">Start index of the first character to underline.</param>
+ /// <param name="count">The number of characters to underline.</param>
+ public void SetUnderline (int startIndex, int count)
+ {
+ AddAttribute (new UnderlineTextAttribute () { StartIndex = startIndex, Count = count});
+ }
+
+ /// <summary>
+ /// Adds a strike-through to a part of text inside the <see cref="T:Xwt.Drawing.TextLayout"/> object.
+ /// </summary>
+ /// <param name="startIndex">Start index of the first character to strike-through.</param>
+ /// <param name="count">The number of characters to strike-through.</param>
+ public void SetStrikethrough (int startIndex, int count)
+ {
+ AddAttribute (new StrikethroughTextAttribute () { StartIndex = startIndex, Count = count});
+ }
}
-
+
public enum TextTrimming {
Word,
WordElipsis
}
+
+ class TextLayoutData
+ {
+ public double Width = -1;
+ public double Height = -1;
+ public string Text;
+ public Font Font;
+ public TextTrimming TextTrimming;
+ public List<TextAttribute> Attributes;
+
+ public void InitLayout (TextLayout la)
+ {
+ if (Width != -1)
+ la.Width = Width;
+ if (Height != -1)
+ la.Height = Height;
+ if (Text != null)
+ la.Text = Text;
+ if (Font != null)
+ la.Font = Font;
+ if (TextTrimming != default(TextTrimming))
+ la.Trimming = TextTrimming;
+ if (Attributes != null) {
+ foreach (var at in Attributes)
+ la.AddAttribute (at);
+ }
+ }
+
+ public bool Equals (TextLayoutData other)
+ {
+ if (Width != other.Width || Height != other.Height || Text != other.Text || Font != other.Font || TextTrimming != other.TextTrimming)
+ return false;
+ if (Attributes == null && other.Attributes == null)
+ return true;
+ if (Attributes != null || other.Attributes != null)
+ return false;
+ if (Attributes.Count != other.Attributes.Count)
+ return false;
+ for (int n=0; n<Attributes.Count; n++)
+ if (!Attributes [n].Equals (other.Attributes [n]))
+ return false;
+ return true;
+ }
+ }
}
diff --git a/external/xwt/Xwt/Xwt.Drawing/UnderlineTextAttribute.cs b/external/xwt/Xwt/Xwt.Drawing/UnderlineTextAttribute.cs
new file mode 100644
index 0000000..16cb242
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/UnderlineTextAttribute.cs
@@ -0,0 +1,56 @@
+//
+// UnderlineTextAttribute.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+
+namespace Xwt.Drawing
+{
+
+ public sealed class UnderlineTextAttribute: TextAttribute
+ {
+ public UnderlineTextAttribute ()
+ {
+ Underline = true;
+ }
+
+ public bool Underline { get; set; }
+
+ public override bool Equals (object ob)
+ {
+ var t = ob as UnderlineTextAttribute;
+ return t != null && t.Underline == Underline && base.Equals (ob);
+ }
+
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode () ^ Underline.GetHashCode ();
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Drawing/VectorImage.cs b/external/xwt/Xwt/Xwt.Drawing/VectorImage.cs
new file mode 100644
index 0000000..ee2ba3c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Drawing/VectorImage.cs
@@ -0,0 +1,720 @@
+//
+// VectorImage.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Xwt.Drawing
+{
+ class VectorImage: DrawingImage
+ {
+ VectorImageData data;
+
+ public VectorImage (Size s, VectorImageData data)
+ {
+ this.data = data;
+ Size = s;
+ }
+
+ protected override void OnDraw (Context ctx, Rectangle bounds)
+ {
+ ctx.Save ();
+ ctx.Translate (bounds.Location);
+ ctx.Scale (bounds.Width / Size.Width, bounds.Height / Size.Height);
+ ToolkitEngine.VectorImageRecorderContextHandler.Draw (ctx.Handler, Toolkit.GetBackend (ctx), data);
+ ctx.Restore ();
+ }
+ }
+
+ class VectorImageData
+ {
+ public DrawingCommand[] Commands;
+ public double[] Doubles;
+ public Color[] Colors;
+ public int[] Ints;
+ public Rectangle[] Rectangles;
+ public object[] Objects;
+ public ImageDescription[] Images;
+ public TextLayoutData[] TextLayouts;
+ }
+
+ enum DrawingCommand
+ {
+ Save,
+ Restore,
+ SetGlobalAlpha,
+ SetColor,
+ Clip,
+ ClipPreserve,
+ Arc,
+ ArcNegative,
+ ClosePath,
+ CurveTo,
+ LineTo,
+ Fill,
+ FillPreserve,
+ NewPath,
+ Stroke,
+ StrokePreserve,
+ SetLineWidth,
+ SetLineDash,
+ SetPattern,
+ DrawTextLayout,
+ CanDrawImage,
+ DrawImage,
+ DrawImage2,
+ Rotate,
+ Scale,
+ Translate,
+ MoveTo,
+ Rectangle,
+ RelCurveTo,
+ RelLineTo,
+ RelMoveTo,
+ AppendPath,
+ End
+ }
+
+ class VectorContextBackend: VectorBackend
+ {
+ double width;
+ double height;
+ object imageBuilder;
+
+ public VectorContextBackend (Toolkit toolkit, double width, double height): base (toolkit)
+ {
+ NativePathHandler = toolkit.ContextBackendHandler;
+ NativeContextHandler = toolkit.ContextBackendHandler;
+ this.width = width;
+ this.height = height;
+ }
+
+ public override object CreateNativeBackend ()
+ {
+ imageBuilder = toolkit.ImageBuilderBackendHandler.CreateImageBuilder ((int)width, (int)height, ImageFormat.ARGB32);
+ if (toolkit.ImageBuilderBackendHandler.DisposeHandleOnUiThread)
+ ResourceManager.RegisterResource (imageBuilder);
+ else
+ GC.SuppressFinalize (this);
+
+ return toolkit.ImageBuilderBackendHandler.CreateContext (imageBuilder);
+ }
+
+ ~VectorContextBackend ()
+ {
+ if (imageBuilder != null)
+ ResourceManager.FreeResource (imageBuilder);
+ }
+
+ public override void Dispose ()
+ {
+ base.Dispose ();
+ if (imageBuilder != null) {
+ if (toolkit.ImageBuilderBackendHandler.DisposeHandleOnUiThread) {
+ GC.SuppressFinalize (this);
+ ResourceManager.FreeResource (imageBuilder);
+ }
+ else
+ toolkit.ImageBuilderBackendHandler.Dispose (imageBuilder);
+ }
+ }
+ }
+
+ class VectorPathBackend: VectorBackend
+ {
+ public VectorPathBackend (Toolkit toolkit): base (toolkit)
+ {
+ NativePathHandler = toolkit.DrawingPathBackendHandler;
+ }
+
+ public override object CreateNativeBackend ()
+ {
+ return toolkit.DrawingPathBackendHandler.CreatePath ();
+ }
+ }
+
+ abstract class VectorBackend
+ {
+ public List<DrawingCommand> Commands = new List<DrawingCommand> ();
+ public List<double> Doubles = new List<double> ();
+ public List<Color> Colors = new List<Color> ();
+ public List<int> Ints = new List<int> ();
+ public List<Rectangle> Rectangles = new List<Rectangle> ();
+ public List<object> Objects = new List<object> ();
+ public List<ImageDescription> Images = new List<ImageDescription> ();
+ public List<TextLayoutData> TextLayouts = new List<TextLayoutData> ();
+
+ public object NativeBackend;
+ public DrawingPathBackendHandler NativePathHandler;
+ public ContextBackendHandler NativeContextHandler;
+ protected Toolkit toolkit;
+
+ public VectorBackend (Toolkit toolkit)
+ {
+ this.toolkit = toolkit;
+ }
+
+ public void AddTextLayout (TextLayoutData td)
+ {
+ var found = TextLayouts.FirstOrDefault (t => t.Equals (td)) ?? td;
+ TextLayouts.Add (found);
+ }
+
+ public abstract object CreateNativeBackend ();
+
+ public VectorPathBackend CopyPath ()
+ {
+ var c = new VectorPathBackend (toolkit);
+ c.Commands.AddRange (Commands);
+ c.Doubles.AddRange (Doubles);
+ c.Colors.AddRange (Colors);
+ c.Images.AddRange (Images);
+ c.Ints.AddRange (Ints);
+ c.Rectangles.AddRange (Rectangles);
+ c.Objects.AddRange (Objects);
+ c.TextLayouts.AddRange (TextLayouts);
+ if (NativeBackend != null)
+ c.NativeBackend = c.NativePathHandler.CopyPath (NativeBackend);
+ return c;
+ }
+
+ public VectorImageData ToVectorImageData ()
+ {
+ return new VectorImageData () {
+ Commands = Commands.ToArray (),
+ Doubles = Doubles.ToArray (),
+ Colors = Colors.ToArray (),
+ Images = Images.ToArray (),
+ Ints = Ints.ToArray (),
+ Rectangles = Rectangles.ToArray (),
+ Objects = Objects.ToArray (),
+ TextLayouts = TextLayouts.ToArray (),
+ };
+ }
+
+ public virtual void Dispose ()
+ {
+ if (NativeBackend != null)
+ NativePathHandler.Dispose (NativeBackend);
+ }
+ }
+
+ class VectorImageRecorderContextHandler: ContextBackendHandler
+ {
+ Toolkit toolkit;
+
+ public VectorImageRecorderContextHandler (Toolkit toolkit)
+ {
+ this.toolkit = toolkit;
+ }
+
+ #region implemented abstract members of DrawingPathBackendHandler
+
+ public override void Arc (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Arc);
+ ctx.Doubles.Add (xc);
+ ctx.Doubles.Add (yc);
+ ctx.Doubles.Add (radius);
+ ctx.Doubles.Add (angle1);
+ ctx.Doubles.Add (angle2);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.Arc (ctx.NativeBackend, xc, yc, radius, angle1, angle2);
+ }
+
+ public override void ArcNegative (object backend, double xc, double yc, double radius, double angle1, double angle2)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.ArcNegative);
+ ctx.Doubles.Add (xc);
+ ctx.Doubles.Add (yc);
+ ctx.Doubles.Add (radius);
+ ctx.Doubles.Add (angle1);
+ ctx.Doubles.Add (angle2);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.ArcNegative (ctx.NativeBackend, xc, yc, radius, angle1, angle2);
+ }
+
+ public override void ClosePath (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.ClosePath);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.ClosePath (ctx.NativeBackend);
+ }
+
+ public override void CurveTo (object backend, double x1, double y1, double x2, double y2, double x3, double y3)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.CurveTo);
+ ctx.Doubles.Add (x1);
+ ctx.Doubles.Add (y1);
+ ctx.Doubles.Add (x2);
+ ctx.Doubles.Add (y2);
+ ctx.Doubles.Add (x3);
+ ctx.Doubles.Add (y3);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.CurveTo (ctx.NativeBackend, x1, y1, x2, y2, x3, y3);
+ }
+
+ public override void LineTo (object backend, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.LineTo);
+ ctx.Doubles.Add (x);
+ ctx.Doubles.Add (y);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.LineTo (ctx.NativeBackend, x, y);
+ }
+
+ public override void MoveTo (object backend, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.MoveTo);
+ ctx.Doubles.Add (x);
+ ctx.Doubles.Add (y);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.MoveTo (ctx.NativeBackend, x, y);
+ }
+
+ public override void Rectangle (object backend, double x, double y, double width, double height)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Rectangle);
+ ctx.Doubles.Add (x);
+ ctx.Doubles.Add (y);
+ ctx.Doubles.Add (width);
+ ctx.Doubles.Add (height);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.Rectangle (ctx.NativeBackend, x, y, width, height);
+ }
+
+ public override void RelCurveTo (object backend, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.RelCurveTo);
+ ctx.Doubles.Add (dx1);
+ ctx.Doubles.Add (dy1);
+ ctx.Doubles.Add (dx2);
+ ctx.Doubles.Add (dy2);
+ ctx.Doubles.Add (dx3);
+ ctx.Doubles.Add (dy3);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.RelCurveTo (ctx.NativeBackend, dx1, dy1, dx2, dy2, dx3, dy3);
+ }
+
+ public override void RelLineTo (object backend, double dx, double dy)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.RelLineTo);
+ ctx.Doubles.Add (dx);
+ ctx.Doubles.Add (dy);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.RelLineTo (ctx.NativeBackend, dx, dy);
+ }
+
+ public override void RelMoveTo (object backend, double dx, double dy)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.RelMoveTo);
+ ctx.Doubles.Add (dx);
+ ctx.Doubles.Add (dy);
+
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.RelMoveTo (ctx.NativeBackend, dx, dy);
+ }
+
+ public override object CreatePath ()
+ {
+ return new VectorPathBackend (toolkit);
+ }
+
+ public override object CopyPath (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ return ctx.CopyPath ();
+ }
+
+ public override void AppendPath (object backend, object otherBackend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.AppendPath);
+
+ if (otherBackend is VectorBackend) {
+ var data = ((VectorBackend)otherBackend).ToVectorImageData ();
+ ctx.Objects.Add (data);
+ if (ctx.NativeBackend != null)
+ toolkit.VectorImageRecorderContextHandler.Draw (ctx.NativePathHandler, ctx.NativeBackend, data);
+ } else {
+ otherBackend = ctx.NativePathHandler.CopyPath (otherBackend);
+ ctx.Objects.Add (otherBackend);
+ if (ctx.NativeBackend != null)
+ ctx.NativePathHandler.AppendPath (ctx.NativeBackend, otherBackend);
+ }
+ }
+
+ #endregion
+
+ #region implemented abstract members of ContextBackendHandler
+
+ public override void Save (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Save);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.Save (ctx.NativeBackend);
+ }
+
+ public override void Restore (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Restore);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.Restore (ctx.NativeBackend);
+ }
+
+ public override void Clip (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Clip);
+ }
+
+ public override void ClipPreserve (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.ClipPreserve);
+ }
+
+ public override void Fill (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Fill);
+ }
+
+ public override void FillPreserve (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.FillPreserve);
+ }
+
+ public override void NewPath (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.NewPath);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.NewPath (ctx.NativeBackend);
+ }
+
+ public override void Stroke (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Stroke);
+ }
+
+ public override void StrokePreserve (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.StrokePreserve);
+ }
+
+ public override void SetColor (object backend, Color color)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.SetColor);
+ ctx.Colors.Add (color);
+ }
+
+ public override void SetLineWidth (object backend, double width)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.SetLineWidth);
+ ctx.Doubles.Add (width);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.SetLineWidth (ctx.NativeBackend, width);
+ }
+
+ public override void SetLineDash (object backend, double offset, params double[] pattern)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.SetLineDash);
+ ctx.Doubles.Add (offset);
+ ctx.Ints.Add (pattern.Length);
+ for (int n=0; n<pattern.Length; n++)
+ ctx.Doubles.Add (pattern [n]);
+ }
+
+ public override void SetPattern (object backend, object p)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.SetPattern);
+ ctx.Objects.Add (p);
+ }
+
+ public override void DrawTextLayout (object backend, TextLayout layout, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.DrawTextLayout);
+ var la = layout.GetData ();
+ ctx.AddTextLayout (la);
+ ctx.Doubles.Add (x);
+ ctx.Doubles.Add (y);
+ }
+
+ public override void DrawImage (object backend, ImageDescription img, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.DrawImage);
+ ctx.Images.Add (img);
+ ctx.Doubles.Add (x);
+ ctx.Doubles.Add (y);
+ }
+
+ public override void DrawImage (object backend, ImageDescription img, Xwt.Rectangle srcRect, Xwt.Rectangle destRect)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.DrawImage2);
+ ctx.Images.Add (img);
+ ctx.Rectangles.Add (srcRect);
+ ctx.Rectangles.Add (destRect);
+ }
+
+ public override void Rotate (object backend, double angle)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Rotate);
+ ctx.Doubles.Add (angle);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.Rotate (ctx.NativeBackend, angle);
+ }
+
+ public override void Scale (object backend, double scaleX, double scaleY)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Scale);
+ ctx.Doubles.Add (scaleX);
+ ctx.Doubles.Add (scaleY);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.Scale (ctx.NativeBackend, scaleX, scaleY);
+ }
+
+ public override void Translate (object backend, double tx, double ty)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.Translate);
+ ctx.Doubles.Add (tx);
+ ctx.Doubles.Add (ty);
+
+ if (ctx.NativeBackend != null && ctx.NativeContextHandler != null)
+ ctx.NativeContextHandler.Translate (ctx.NativeBackend, tx, ty);
+ }
+
+ public override Matrix GetCTM (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ CreateNativePathBackend (ctx);
+ return ctx.NativeContextHandler.GetCTM (ctx.NativeBackend);
+ }
+
+ public override bool IsPointInStroke (object backend, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ CreateNativePathBackend (ctx);
+ return ctx.NativeContextHandler.IsPointInStroke (ctx.NativeBackend, x, y);
+ }
+
+ public override void SetGlobalAlpha (object backend, double globalAlpha)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Commands.Add (DrawingCommand.SetGlobalAlpha);
+ ctx.Doubles.Add (globalAlpha);
+ }
+
+ public override bool IsPointInFill (object backend, double x, double y)
+ {
+ var ctx = (VectorBackend)backend;
+ CreateNativePathBackend (ctx);
+ return ctx.NativePathHandler.IsPointInFill (ctx.NativeBackend, x, y);
+ }
+
+ public override void Dispose (object backend)
+ {
+ var ctx = (VectorBackend)backend;
+ ctx.Dispose ();
+ }
+
+ void CreateNativePathBackend (VectorBackend b)
+ {
+ if (b.NativeBackend == null) {
+ b.NativeBackend = b.CreateNativeBackend ();
+ Draw (b.NativePathHandler, b.NativeBackend, b.ToVectorImageData ());
+ }
+ }
+
+ #endregion
+
+ internal void Draw (DrawingPathBackendHandler targetHandler, object ctx, VectorImageData cm)
+ {
+ int di = 0;
+ int ci = 0;
+ int ii = 0;
+ int ri = 0;
+ int oi = 0;
+ int imi = 0;
+ int ti = 0;
+
+ ContextBackendHandler handler = targetHandler as ContextBackendHandler;
+ DrawingPathBackendHandler pathHandler = targetHandler;
+
+ for (int n=0; n<cm.Commands.Length; n++)
+ {
+ switch (cm.Commands [n]) {
+ case DrawingCommand.AppendPath:
+ var p = cm.Objects [oi++];
+ if (p is VectorImageData)
+ Draw (targetHandler, ctx, (VectorImageData)p);
+ else
+ pathHandler.AppendPath (ctx, p);
+ break;
+ case DrawingCommand.Arc:
+ pathHandler.Arc (ctx, cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.ArcNegative:
+ pathHandler.ArcNegative (ctx, cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.Clip:
+ handler.Clip (ctx);
+ break;
+ case DrawingCommand.ClipPreserve:
+ handler.ClipPreserve (ctx);
+ break;
+ case DrawingCommand.ClosePath:
+ pathHandler.ClosePath (ctx);
+ break;
+ case DrawingCommand.CurveTo:
+ pathHandler.CurveTo (ctx, cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.DrawImage2:
+ handler.DrawImage (ctx, cm.Images [imi++], cm.Rectangles [ri++], cm.Rectangles [ri++]);
+ break;
+ case DrawingCommand.DrawImage:
+ handler.DrawImage (ctx, cm.Images [imi++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.DrawTextLayout:
+ var lad = (TextLayoutData)cm.TextLayouts [ti++];
+ var la = new TextLayout (toolkit);
+ lad.InitLayout (la);
+ handler.DrawTextLayout (ctx, la, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.Fill:
+ handler.Fill (ctx);
+ break;
+ case DrawingCommand.FillPreserve:
+ handler.FillPreserve (ctx);
+ break;
+ case DrawingCommand.LineTo:
+ pathHandler.LineTo (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.MoveTo:
+ pathHandler.MoveTo (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.NewPath:
+ handler.NewPath (ctx);
+ break;
+ case DrawingCommand.Rectangle:
+ pathHandler.Rectangle (ctx, cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.RelCurveTo:
+ pathHandler.RelCurveTo (ctx, cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.RelLineTo:
+ pathHandler.RelLineTo (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.RelMoveTo:
+ pathHandler.RelMoveTo (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.Restore:
+ handler.Restore (ctx);
+ break;
+ case DrawingCommand.Rotate:
+ handler.Rotate (ctx, cm.Doubles [di++]);
+ break;
+ case DrawingCommand.Save:
+ handler.Save (ctx);
+ break;
+ case DrawingCommand.Scale:
+ handler.Scale (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ case DrawingCommand.SetColor:
+ handler.SetColor (ctx, cm.Colors [ci++]);
+ break;
+ case DrawingCommand.SetGlobalAlpha:
+ handler.SetGlobalAlpha (ctx, cm.Doubles [di++]);
+ break;
+ case DrawingCommand.SetLineDash:
+ var off = cm.Doubles [di++];
+ var ds = new double [cm.Ints [ii++]];
+ for (int i = 0; i < ds.Length; i++)
+ ds [i] = cm.Doubles [di++];
+ handler.SetLineDash (ctx, off, ds);
+ break;
+ case DrawingCommand.SetLineWidth:
+ handler.SetLineWidth (ctx, cm.Doubles [di++]);
+ break;
+ case DrawingCommand.SetPattern:
+ handler.SetPattern (ctx, cm.Objects [oi++]);
+ break;
+ case DrawingCommand.Stroke:
+ handler.Stroke (ctx);
+ break;
+ case DrawingCommand.StrokePreserve:
+ handler.StrokePreserve (ctx);
+ break;
+ case DrawingCommand.Translate:
+ handler.Translate (ctx, cm.Doubles [di++], cm.Doubles [di++]);
+ break;
+ }
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Engine/Toolkit.cs b/external/xwt/Xwt/Xwt.Engine/Toolkit.cs
deleted file mode 100644
index 77b57a1..0000000
--- a/external/xwt/Xwt/Xwt.Engine/Toolkit.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-//
-// Toolkit.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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;
-
-namespace Xwt.Engine
-{
- public static class Toolkit
- {
- static int inUserCode;
- static Queue<Action> exitActions = new Queue<Action> ();
- static bool exitCallbackRegistered;
-
- public static bool Invoke (Action a)
- {
- try {
- EnterUserCode ();
- a ();
- ExitUserCode (null);
- return true;
- } catch (Exception ex) {
- ExitUserCode (ex);
- return false;
- }
- }
-
- public static void InvokePlatformCode (Action a)
- {
- try {
- ExitUserCode (null);
- a ();
- } finally {
- EnterUserCode ();
- }
- }
-
- public static void EnterUserCode ()
- {
- inUserCode++;
- }
-
- public static void ExitUserCode (Exception error)
- {
- if (error != null) {
- Invoke (delegate {
- Application.NotifyException (error);
- });
- }
- if (inUserCode <= 1) {
- while (exitActions.Count > 0) {
- try {
- exitActions.Dequeue ()();
- } catch (Exception ex) {
- Invoke (delegate {
- Application.NotifyException (ex);
- });
- }
- }
- }
- inUserCode--;
- }
-
- static void DispatchExitActions ()
- {
- // This pair of calls will flush the exit action queue
- exitCallbackRegistered = false;
- EnterUserCode ();
- ExitUserCode (null);
- }
-
- public static void QueueExitAction (Action a)
- {
- exitActions.Enqueue (a);
-
- if (inUserCode <= 0) {
- // Not in an XWT handler. This may happen when embedding XWT in another toolkit and
- // XWT widgets are manipulated from event handlers of the native toolkit which
- // are not invoked using Toolkit.Invoke.
- if (!exitCallbackRegistered) {
- exitCallbackRegistered = true;
- // Try to use a native method of queuing exit actions
- Application.EngineBackend.InvokeBeforeMainLoop (DispatchExitActions);
- }
- }
- }
-
- public static bool InUserCode {
- get { return inUserCode > 0; }
- }
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Engine/WidgetRegistry.cs b/external/xwt/Xwt/Xwt.Engine/WidgetRegistry.cs
deleted file mode 100755
index 62f00a5..0000000
--- a/external/xwt/Xwt/Xwt.Engine/WidgetRegistry.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// WidgetRegistry.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Backends;
-using Xwt.Drawing;
-
-namespace Xwt.Engine
-{
- public static class WidgetRegistry
- {
- static Dictionary<Type,Type> backendTypes = new Dictionary<Type, Type> ();
- static Dictionary<Type,object> sharedBackends = new Dictionary<Type, object> ();
-
- internal static T CreateBackend<T> (Type widgetType)
- {
- Type bt;
- if (!backendTypes.TryGetValue (widgetType, out bt))
- return default(T);
- object res = Activator.CreateInstance (bt);
- if (!typeof(T).IsInstanceOfType (res))
- throw new InvalidOperationException ("Invalid backend type.");
- return (T) res;
- }
-
- internal static T CreateSharedBackend<T> (Type widgetType)
- {
- object res;
- if (!sharedBackends.TryGetValue (widgetType, out res))
- res = sharedBackends [widgetType] = CreateBackend<T> (widgetType);
- return (T)res;
- }
-
- public static void RegisterBackend (Type widgetType, Type backendType)
- {
- backendTypes [widgetType] = backendType;
- }
-
- public static object GetBackend (object obj)
- {
- if (obj is IFrontend)
- return ((IFrontend)obj).Backend;
- else if (obj == null)
- return null;
- else
- throw new InvalidOperationException ("Object doesn't have a backend");
- }
-
- public static T CreateFrontend<T> (object backend)
- {
- return (T) Activator.CreateInstance (typeof(T), backend);
- }
-
- public static object GetNativeWidget (Widget w)
- {
- w.SetExtractedAsNative ();
- return Application.EngineBackend.GetNativeWidget (w);
- }
-
- public static object GetNativeImage (Image image)
- {
- return Application.EngineBackend.GetNativeImage (image);
- }
-
- public static WindowFrame WrapWindow (object nativeWindow)
- {
- if (nativeWindow == null)
- return null;
- return new NativeWindowFrame (Application.EngineBackend.GetBackendForWindow (nativeWindow));
- }
- }
-
- class NativeWindowFrame: WindowFrame
- {
- public NativeWindowFrame (IWindowFrameBackend backend)
- {
- BackendHost.SetCustomBackend (backend);
- }
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt.Formats/MarkdownTextFormat.cs b/external/xwt/Xwt/Xwt.Formats/MarkdownTextFormat.cs
index a863646..db3c9c5 100644
--- a/external/xwt/Xwt/Xwt.Formats/MarkdownTextFormat.cs
+++ b/external/xwt/Xwt/Xwt.Formats/MarkdownTextFormat.cs
@@ -146,13 +146,26 @@ namespace Xwt.Formats
// List
else if ((trimmed [0] == '+' || trimmed [0] == '-' || trimmed [0] == '*') && (trimmed [1] == ' ' || trimmed [1] == '\t')) {
buffer.EmitOpenList ();
- var bullet = line[0].ToString ();
+ var bullet = trimmed[0].ToString ();
for (; i < lines.Length; i++) {
- line = lines[i];
- if (!line.StartsWith (bullet))
+ trimmed = lines[i].TrimStart ();
+ if (!trimmed.StartsWith (bullet))
break;
buffer.EmitOpenBullet ();
- ParseInline (buffer, line.TrimStart ('+', '-', '*', ' ', '\t'));
+ var lineBreaks = new List<string> ();
+ lineBreaks.Add (trimmed.TrimStart ('+', '-', '*', ' ', '\t'));
+ while (i + 1 < lines.Length)
+ {
+ string nextTrimmed = lines[i + 1].TrimStart ();
+ if (nextTrimmed.Length > 0 && !nextTrimmed.StartsWith (bullet))
+ {
+ lineBreaks.Add (nextTrimmed);
+ i++;
+ }
+ else
+ break;
+ }
+ ParseInline (buffer, string.Join (" ", lineBreaks));
buffer.EmitCloseBullet ();
}
i--;
diff --git a/external/xwt/Xwt/Xwt.Formats/PlainTextFormat.cs b/external/xwt/Xwt/Xwt.Formats/PlainTextFormat.cs
new file mode 100644
index 0000000..63fa7ae
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Formats/PlainTextFormat.cs
@@ -0,0 +1,17 @@
+using System;
+using System.IO;
+
+using Xwt.Backends;
+
+namespace Xwt.Formats
+{
+ public class PlainTextFormat : TextFormat
+ {
+ public override void Parse (Stream input, IRichTextBuffer buffer)
+ {
+ using (var reader = new StreamReader (input))
+ buffer.EmitText (reader.ReadToEnd (), RichTextInlineStyle.Normal);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt.Formats/TextFormat.cs b/external/xwt/Xwt/Xwt.Formats/TextFormat.cs
index 592a843..9218fa8 100644
--- a/external/xwt/Xwt/Xwt.Formats/TextFormat.cs
+++ b/external/xwt/Xwt/Xwt.Formats/TextFormat.cs
@@ -34,6 +34,7 @@ namespace Xwt.Formats
public abstract class TextFormat
{
public static readonly TextFormat Markdown = new MarkdownTextFormat ();
+ public static readonly TextFormat Plain = new PlainTextFormat ();
// Parses the given input stream into the given buffer
public abstract void Parse (Stream input, IRichTextBuffer buffer);
diff --git a/external/xwt/Xwt/Xwt.Motion/Animation.cs b/external/xwt/Xwt/Xwt.Motion/Animation.cs
new file mode 100644
index 0000000..d9682f1
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/Animation.cs
@@ -0,0 +1,134 @@
+//
+// Tweener.cs
+//
+// Author:
+// Jason Smith <jason.smith at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Diagnostics;
+
+namespace Xwt.Motion
+{
+ public class Animation
+ {
+ double beginAt;
+ double finishAt;
+ Easing easing;
+ Action<double> step;
+ List<Animation> children;
+ Action finished;
+ bool finishedTriggered;
+
+ public Animation ()
+ {
+ children = new List<Animation> ();
+ easing = Easing.Linear;
+ step = f => {};
+ }
+
+ public Animation (Action<double> callback, double start = 0.0f, double end = 1.0f, Easing easing = null, Action finished = null)
+ {
+ children = new List<Animation> ();
+ this.easing = easing ?? Easing.Linear;
+ this.finished = finished;
+
+ var transform = AnimationExtensions.Interpolate (start, end);
+ step = f => callback (transform (f));
+ }
+
+ public IEnumerable<Animation> ConcurrentAnimations {
+ get { return children; }
+ }
+
+ public void Commit (IAnimatable owner, string name, uint rate = 16, uint length = 250,
+ Easing easing = null, Action<double, bool> finished = null, Func<bool> repeat = null)
+ {
+ owner.Animate (name, this, rate, length, easing, finished, repeat);
+ }
+
+ public Animation AddConcurrent (Animation animation, double beginAt = 0.0f, double finishAt = 1.0f)
+ {
+ if (beginAt < 0 || beginAt > 1)
+ throw new ArgumentOutOfRangeException ("beginAt");
+
+ if (finishAt < 0 || finishAt > 1)
+ throw new ArgumentOutOfRangeException ("finishAt");
+
+ if (finishAt <= beginAt)
+ throw new ArgumentException ("finishAt must be greater than beginAt");
+
+ animation.beginAt = beginAt;
+ animation.finishAt = finishAt;
+ children.Add (animation);
+ return this;
+ }
+
+ public Animation AddConcurrent (Action<double> callback, double start = 0.0f, double end = 1.0f, Easing easing = null, double beginAt = 0.0f, double finishAt = 1.0f)
+ {
+ if (beginAt < 0 || beginAt > 1)
+ throw new ArgumentOutOfRangeException ("beginAt");
+
+ if (finishAt < 0 || finishAt > 1)
+ throw new ArgumentOutOfRangeException ("finishAt");
+
+ if (finishAt <= beginAt)
+ throw new ArgumentException ("finishAt must be greater than beginAt");
+
+ Animation child = new Animation (callback, start, end, easing);
+ child.beginAt = beginAt;
+ child.finishAt = finishAt;
+ children.Add (child);
+ return this;
+ }
+
+ public Action<double> GetCallback ()
+ {
+ Action<double> result = f => {
+ step (easing.Func (f));
+ foreach (var animation in children) {
+ if (animation.finishedTriggered)
+ continue;
+
+ double val = Math.Max (0.0f, Math.Min (1.0f, (f - animation.beginAt) / (animation.finishAt - animation.beginAt)));
+
+ if (val <= 0.0f) // not ready to process yet
+ continue;
+
+ var callback = animation.GetCallback ();
+ callback (val);
+
+ if (val >= 1.0f) {
+ animation.finishedTriggered = true;
+ if (animation.finished != null)
+ animation.finished ();
+ }
+ }
+ };
+ return result;
+ }
+ }
+
+
+}
+
diff --git a/external/xwt/Xwt/Xwt.Motion/AnimationExtensions.cs b/external/xwt/Xwt/Xwt.Motion/AnimationExtensions.cs
new file mode 100644
index 0000000..782e867
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/AnimationExtensions.cs
@@ -0,0 +1,218 @@
+//
+// Tweener.cs
+//
+// Author:
+// Jason Smith <jason.smith at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Diagnostics;
+
+namespace Xwt.Motion
+{
+ public static class AnimationExtensions
+ {
+ class Info
+ {
+ public Easing Easing { get; set; }
+ public uint Rate { get; set; }
+ public uint Length { get; set; }
+ public IAnimatable Owner { get; set; }
+ public Action<double> callback;
+ public Action<double, bool> finished;
+ public Func<bool> repeat;
+ public Tweener tweener;
+ }
+
+ static Dictionary<string, Info> animations;
+ static Dictionary<string, int> kinetics;
+
+ static AnimationExtensions ()
+ {
+ animations = new Dictionary<string, Info> ();
+ kinetics = new Dictionary<string, int> ();
+ }
+
+ public static void AnimateKinetic (this IAnimatable self, string name, Func<double, double, bool> callback, double velocity, double drag, Action finished = null)
+ {
+ self.AbortAnimation (name);
+ name += self.GetHashCode ().ToString ();
+
+ double sign = velocity / Math.Abs (velocity);
+ velocity = Math.Abs (velocity);
+
+ var tick = Ticker.Default.Insert (step => {
+ var ms = step;
+
+ velocity -= drag * ms;
+ velocity = Math.Max (0, velocity);
+
+ bool result = false;
+ if (velocity > 0) {
+ result = callback (sign * velocity * ms, velocity);
+ }
+
+ if (!result) {
+ if (finished != null)
+ finished ();
+ kinetics.Remove (name);
+ }
+ return result;
+ });
+
+ kinetics [name] = tick;
+ }
+
+ public static void Animate (this IAnimatable self, string name, Animation animation, uint rate = 16, uint length = 250,
+ Easing easing = null, Action<double, bool> finished = null, Func<bool> repeat = null)
+ {
+ self.Animate (name, animation.GetCallback (), rate, length, easing, finished, repeat);
+ }
+
+ public static Func<double, double> Interpolate (double start, double end = 1.0f, double reverseVal = 0.0f, bool reverse = false)
+ {
+ double target = (reverse ? reverseVal : end);
+ return x => start + (target - start) * x;
+ }
+
+ public static void Animate (this IAnimatable self, string name, Action<double> callback, double start, double end, uint rate = 16, uint length = 250,
+ Easing easing = null, Action<double, bool> finished = null, Func<bool> repeat = null)
+ {
+ self.Animate<double> (name, Interpolate (start, end), callback, rate, length, easing, finished, repeat);
+ }
+
+ public static void Animate (this IAnimatable self, string name, Action<double> callback, uint rate = 16, uint length = 250,
+ Easing easing = null, Action<double, bool> finished = null, Func<bool> repeat = null)
+ {
+ self.Animate<double> (name, x => x, callback, rate, length, easing, finished, repeat);
+ }
+
+ public static void Animate<T> (this IAnimatable self, string name, Func<double, T> transform, Action<T> callback, uint rate = 16, uint length = 250,
+ Easing easing = null, Action<T, bool> finished = null, Func<bool> repeat = null)
+ {
+ if (transform == null)
+ throw new ArgumentNullException ("transform");
+ if (callback == null)
+ throw new ArgumentNullException ("callback");
+ if (self == null)
+ throw new ArgumentNullException ("widget");
+
+ self.AbortAnimation (name);
+ name += self.GetHashCode ().ToString ();
+
+ Action<double> step = f => callback (transform(f));
+ Action<double, bool> final = null;
+ if (finished != null)
+ final = (f, b) => finished (transform(f), b);
+
+ var info = new Info {
+ Rate = rate,
+ Length = length,
+ Easing = easing ?? Easing.Linear
+ };
+
+ Tweener tweener = new Tweener (info.Length, info.Rate);
+ tweener.Easing = info.Easing;
+ tweener.Handle = name;
+ tweener.ValueUpdated += HandleTweenerUpdated;
+ tweener.Finished += HandleTweenerFinished;
+
+ info.tweener = tweener;
+ info.callback = step;
+ info.finished = final;
+ info.repeat = repeat;
+ info.Owner = self;
+
+ animations[name] = info;
+
+ info.callback (0.0f);
+ tweener.Start ();
+ }
+
+ public static bool AbortAnimation (this IAnimatable self, string handle)
+ {
+ handle += self.GetHashCode ().ToString ();
+ if (animations.ContainsKey (handle)) {
+ Info info = animations [handle];
+ info.tweener.ValueUpdated -= HandleTweenerUpdated;
+ info.tweener.Finished -= HandleTweenerFinished;
+ info.tweener.Stop ();
+
+ animations.Remove (handle);
+ if (info.finished != null)
+ info.finished (1.0f, true);
+ return true;
+
+ } else if (kinetics.ContainsKey (handle)) {
+ Ticker.Default.Remove (kinetics[handle]);
+ kinetics.Remove (handle);
+ }
+ return false;
+ }
+
+ public static bool AnimationIsRunning (this IAnimatable self, string handle)
+ {
+ handle += self.GetHashCode ().ToString ();
+ return animations.ContainsKey (handle);
+ }
+
+ static void HandleTweenerUpdated (object o, EventArgs args)
+ {
+ Tweener tweener = o as Tweener;
+ Info info = animations[tweener.Handle];
+
+ info.Owner.BatchBegin ();
+ info.callback (tweener.Value);
+ info.Owner.BatchCommit ();
+ }
+
+ static void HandleTweenerFinished (object o, EventArgs args)
+ {
+ Tweener tweener = o as Tweener;
+ Info info = animations[tweener.Handle];
+
+ bool repeat = false;
+ if (info.repeat != null)
+ repeat = info.repeat ();
+
+ info.Owner.BatchBegin ();
+ info.callback (tweener.Value);
+
+ if (!repeat) {
+ animations.Remove (tweener.Handle);
+ tweener.ValueUpdated -= HandleTweenerUpdated;
+ tweener.Finished -= HandleTweenerFinished;
+ }
+
+ if (info.finished != null)
+ info.finished (tweener.Value, false);
+
+ info.Owner.BatchCommit ();
+
+ if (repeat) {
+ tweener.Start ();
+ }
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Motion/Easing.cs b/external/xwt/Xwt/Xwt.Motion/Easing.cs
new file mode 100644
index 0000000..432cc5c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/Easing.cs
@@ -0,0 +1,96 @@
+//
+// Tweener.cs
+//
+// Author:
+// Jason Smith <jason.smith at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Diagnostics;
+
+namespace Xwt.Motion
+{
+
+ public class Easing
+ {
+ public static readonly Easing Linear = new Easing (x => x);
+
+ public static readonly Easing SinOut = new Easing (x => Math.Sin (x * Math.PI * 0.5f));
+ public static readonly Easing SinIn = new Easing (x => 1.0f - Math.Cos (x * Math.PI * 0.5f));
+ public static readonly Easing SinInOut = new Easing (x => -Math.Cos (Math.PI * x) / 2.0f + 0.5f);
+
+ public static readonly Easing CubicIn = new Easing (x => x * x * x);
+ public static readonly Easing CubicOut = new Easing (x => Math.Pow (x - 1.0f, 3.0f) + 1.0f);
+ public static readonly Easing CubicInOut = new Easing (x => x < 0.5f ? Math.Pow (x * 2.0f, 3.0f) / 2.0f :
+ (Math.Pow ((x-1)*2.0f, 3.0f) + 2.0f) / 2.0f);
+
+ public static readonly Easing BounceOut;
+ public static readonly Easing BounceIn;
+
+ public static readonly Easing SpringIn = new Easing (x => x * x * ((1.70158f + 1) * x - 1.70158f));
+ public static readonly Easing SpringOut = new Easing (x => (x - 1) * (x - 1) * ((1.70158f + 1) * (x - 1) + 1.70158f) + 1);
+
+ static Easing ()
+ {
+ BounceOut = new Easing (p => {
+ if (p < (1 / 2.75f))
+ {
+ return 7.5625f * p * p;
+ }
+ else if (p < (2 / 2.75f))
+ {
+ p -= (1.5f / 2.75f);
+
+ return 7.5625f * p * p + .75f;
+ }
+ else if (p < (2.5f / 2.75f))
+ {
+ p -= (2.25f / 2.75f);
+
+ return 7.5625f * p * p + .9375f;
+ }
+ else
+ {
+ p -= (2.625f / 2.75f);
+
+ return 7.5625f * p * p + .984375f;
+ }
+ });
+
+ BounceIn = new Easing (p => 1.0f - BounceOut.Func (p));
+ }
+
+ internal Func<double, double> Func { get; private set; }
+
+ public Easing (Func<double, double> easingFunc)
+ {
+ Func = easingFunc;
+ }
+
+ public static implicit operator Easing (Func<double, double> func)
+ {
+ return new Easing (func);
+ }
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Motion/IAnimatable.cs b/external/xwt/Xwt/Xwt.Motion/IAnimatable.cs
new file mode 100644
index 0000000..e6cdab0
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/IAnimatable.cs
@@ -0,0 +1,39 @@
+//
+// Tweener.cs
+//
+// Author:
+// Jason Smith <jason.smith at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Diagnostics;
+
+namespace Xwt.Motion
+{
+ public interface IAnimatable
+ {
+ void BatchBegin ();
+ void BatchCommit ();
+ }
+
+}
diff --git a/external/xwt/Xwt/Xwt.Motion/ObjectTransforms.cs b/external/xwt/Xwt/Xwt.Motion/ObjectTransforms.cs
new file mode 100644
index 0000000..9a74d4c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/ObjectTransforms.cs
@@ -0,0 +1,66 @@
+//
+// ObjectInterpolators.cs
+//
+// Author:
+// Jérémie Laval <jeremie dotlaval at gmail dot com>
+//
+// Copyright (c) 2013 Jérémie Laval
+//
+// 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 Xwt.Drawing;
+
+namespace Xwt.Motion
+{
+ public static class ObjectTransforms
+ {
+ public static Func<double, Color> GetColorTransform (Color initialColor, Color endColor)
+ {
+ return ratio => new Color (Interpolate (ratio, initialColor.Red, endColor.Red),
+ Interpolate (ratio, initialColor.Green, endColor.Green),
+ Interpolate (ratio, initialColor.Blue, endColor.Blue),
+ Interpolate (ratio, initialColor.Alpha, endColor.Alpha));
+ }
+
+ public static Func<double, Point> GetPointTransform (Point initialPoint, Point endPoint)
+ {
+ return ratio => new Point (Interpolate (ratio, initialPoint.X, endPoint.X),
+ Interpolate (ratio, initialPoint.Y, endPoint.Y));
+ }
+
+ public static Func<double, Size> GetSizeTransform (Size initialSize, Size endSize)
+ {
+ return ratio => new Size (Interpolate (ratio, initialSize.Width, endSize.Width),
+ Interpolate (ratio, initialSize.Height, endSize.Height));
+ }
+
+ public static Func<double, Rectangle> GetRectangleTransform (Rectangle initialRectangle, Rectangle endRectangle)
+ {
+ return ratio => new Rectangle (Interpolate (ratio, initialRectangle.X, endRectangle.X),
+ Interpolate (ratio, initialRectangle.Y, endRectangle.Y),
+ Interpolate (ratio, initialRectangle.Width, endRectangle.Width),
+ Interpolate (ratio, initialRectangle.Height, endRectangle.Height));
+ }
+
+ static double Interpolate (double ratio, double beginValue, double endValue)
+ {
+ return beginValue - (endValue - beginValue) * ratio;
+ }
+ }
+}
diff --git a/external/xwt/Xwt/Xwt.Motion/Tweener.cs b/external/xwt/Xwt/Xwt.Motion/Tweener.cs
new file mode 100644
index 0000000..073b1ef
--- /dev/null
+++ b/external/xwt/Xwt/Xwt.Motion/Tweener.cs
@@ -0,0 +1,215 @@
+//
+// Tweener.cs
+//
+// Author:
+// Jason Smith <jason.smith at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc.
+//
+// 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.Linq;
+using System.Diagnostics;
+using System.Threading;
+
+namespace Xwt.Motion
+{
+ internal class Ticker
+ {
+ static Ticker ticker;
+ public static Ticker Default {
+ internal set { ticker = value; }
+ get { return ticker ?? (ticker = new Ticker ()); }
+ }
+
+ readonly List<Tuple<int, Func<long, bool>>> timeouts;
+ int count;
+ bool enabled;
+ readonly Stopwatch stopwatch;
+ IDisposable timer;
+
+ internal Ticker ()
+ {
+ count = 0;
+ timeouts = new List<Tuple<int, Func<long, bool>>> ();
+ stopwatch = new Stopwatch ();
+ }
+
+ bool HandleElapsed ()
+ {
+ if (timeouts.Count > 0) {
+ SendSignals ();
+ stopwatch.Reset ();
+ stopwatch.Start ();
+ }
+ return enabled;
+ }
+
+ protected void SendSignals (int timestep = -1)
+ {
+ long step = (timestep >= 0) ? timestep : stopwatch.ElapsedMilliseconds;
+ stopwatch.Reset ();
+ stopwatch.Start ();
+
+ var localCopy = new List<Tuple<int, Func<long, bool>>> (timeouts);
+ foreach (var timeout in localCopy) {
+ bool remove = !timeout.Item2 (step);
+ if (remove)
+ timeouts.RemoveAll (t => t.Item1 == timeout.Item1);
+ }
+
+ if (!timeouts.Any ()) {
+ enabled = false;
+ Disable ();
+ }
+ }
+
+ void Enable ()
+ {
+ stopwatch.Reset ();
+ stopwatch.Start ();
+ EnableTimer ();
+ }
+
+ void Disable ()
+ {
+ stopwatch.Reset ();
+ DisableTimer ();
+ }
+
+ protected virtual void EnableTimer ()
+ {
+ timer = Xwt.Application.TimeoutInvoke (16, HandleElapsed);
+ }
+
+ protected virtual void DisableTimer ()
+ {
+ timer.Dispose ();
+ timer = null;
+ }
+
+ public virtual int Insert (Func<long, bool> timeout)
+ {
+ count++;
+ timeouts.Add (new Tuple<int,Func<long, bool>> (count, timeout));
+
+ if (!enabled) {
+ enabled = true;
+ Enable ();
+ }
+
+ return count;
+ }
+
+ public virtual void Remove (int handle)
+ {
+ timeouts.RemoveAll (t => t.Item1 == handle);
+
+ if (!timeouts.Any ()) {
+ enabled = false;
+ Disable ();
+ }
+ }
+ }
+
+ public class Tweener
+ {
+ public uint Length { get; private set; }
+ public uint Rate { get; private set; }
+ public double Value { get; private set; }
+ public Easing Easing { get; set; }
+ public bool Loop { get; set; }
+ public string Handle { get; set; }
+
+ public event EventHandler ValueUpdated;
+ public event EventHandler Finished;
+
+ int timer;
+ long lastMilliseconds;
+
+ public Tweener (uint length, uint rate)
+ {
+ Value = 0.0f;
+ Length = length;
+ Loop = false;
+ Rate = rate;
+ Easing = Easing.Linear;
+ }
+
+ ~Tweener ()
+ {
+ if (timer != 0)
+ Ticker.Default.Remove (timer);
+ timer = 0;
+ }
+
+ public void Start ()
+ {
+ Pause ();
+
+ lastMilliseconds = 0;
+ timer = Ticker.Default.Insert (step => {
+ var ms = step + lastMilliseconds;
+
+ double rawValue = Math.Min (1.0f, ms / (double) Length);
+ Value = Easing.Func (rawValue);
+
+ lastMilliseconds = ms;
+
+ if (ValueUpdated != null)
+ ValueUpdated (this, EventArgs.Empty);
+
+ if (rawValue >= 1.0f)
+ {
+ if (Loop) {
+ lastMilliseconds = 0;
+ Value = 0.0f;
+ return true;
+ }
+
+ if (Finished != null)
+ Finished (this, EventArgs.Empty);
+ Value = 0.0f;
+ timer = 0;
+ return false;
+ }
+ return true;
+ });
+ }
+
+ public void Stop ()
+ {
+ Pause ();
+ Value = 1.0f;
+ if (Finished != null)
+ Finished (this, EventArgs.Empty);
+ Value = 0.0f;
+ }
+
+ public void Pause ()
+ {
+ if (timer != 0) {
+ Ticker.Default.Remove (timer);
+ timer = 0;
+ }
+ }
+ }
+}
diff --git a/external/xwt/Xwt/Xwt.csproj b/external/xwt/Xwt/Xwt.csproj
index 43815c9..fca7d58 100644
--- a/external/xwt/Xwt/Xwt.csproj
+++ b/external/xwt/Xwt/Xwt.csproj
@@ -38,9 +38,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
- <Compile Include="Xwt\ReliefFrame.cs">
- <SubType>Component</SubType>
- </Compile>
<Compile Include="Xwt\Widget.cs">
<SubType>Component</SubType>
</Compile>
@@ -53,14 +50,10 @@
<Compile Include="Xwt\Label.cs">
<SubType>Component</SubType>
</Compile>
- <Compile Include="Xwt.Engine\WidgetRegistry.cs">
- <SubType>Component</SubType>
- </Compile>
<Compile Include="Xwt.Backends\IWidgetBackend.cs" />
<Compile Include="Xwt.Backends\ILabelBackend.cs" />
<Compile Include="Xwt.Backends\IWindowBackend.cs" />
<Compile Include="Xwt\Application.cs" />
- <Compile Include="Xwt.Backends\EngineBackend.cs" />
<Compile Include="Xwt.Backends\IBackend.cs" />
<Compile Include="Xwt\XwtComponent.cs">
<SubType>Component</SubType>
@@ -98,11 +91,9 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="Xwt\DataStore.cs" />
- <Compile Include="Xwt\SizeRequestMode.cs" />
<Compile Include="Xwt\Rectangle.cs" />
<Compile Include="Xwt\Point.cs" />
<Compile Include="Xwt\Size.cs" />
- <Compile Include="Xwt\WidgetSize.cs" />
<Compile Include="Xwt\Alignment.cs" />
<Compile Include="Xwt.Drawing\Image.cs" />
<Compile Include="Xwt\TreeStore.cs">
@@ -114,17 +105,14 @@
<Compile Include="Xwt\CellViewCollection.cs" />
<Compile Include="Xwt\CellView.cs" />
<Compile Include="Xwt\TextCellView.cs" />
- <Compile Include="Xwt\IconTextCellView.cs" />
<Compile Include="Xwt\ComboBoxCellView.cs" />
<Compile Include="Xwt.Backends\ITreeViewBackend.cs" />
<Compile Include="Xwt.Backends\ITreeStoreBackend.cs" />
<Compile Include="Xwt\XwtObject.cs" />
- <Compile Include="Xwt.Backends\IBackendHandler.cs" />
<Compile Include="Xwt.Backends\ImageBackendHandler.cs" />
<Compile Include="Xwt\ImageCellView.cs" />
<Compile Include="Xwt.Drawing\Context.cs" />
<Compile Include="Xwt\Distance.cs" />
- <Compile Include="Xwt.Backends\IContextBackendHandler.cs" />
<Compile Include="Xwt\Canvas.cs">
<SubType>Component</SubType>
</Compile>
@@ -137,10 +125,7 @@
<Compile Include="Xwt.Drawing\RadialGradient.cs" />
<Compile Include="Xwt.Drawing\TextLayout.cs" />
<Compile Include="Xwt.Drawing\Font.cs" />
- <Compile Include="Xwt.Drawing\Matrix.cs" />
- <Compile Include="Xwt.Backends\IGradientBackendHandler.cs" />
- <Compile Include="Xwt.Backends\IFontBackendHandler.cs" />
- <Compile Include="Xwt.Backends\ITextLayoutBackendHandler.cs" />
+ <Compile Include="Xwt.Drawing\Matrix.cs" />
<Compile Include="Xwt\ButtonEventArgs.cs" />
<Compile Include="Xwt\MouseMovedEventArgs.cs" />
<Compile Include="Xwt\SelectionMode.cs" />
@@ -245,16 +230,12 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="Xwt.Backends\IComboBoxEntryBackend.cs" />
- <Compile Include="Xwt.Engine\Toolkit.cs" />
<Compile Include="Xwt\TreeViewStatus.cs" />
<Compile Include="Xwt\Clipboard.cs" />
- <Compile Include="Xwt.Backends\IClipboardBackend.cs" />
<Compile Include="Xwt\PointerButton.cs" />
<Compile Include="Xwt.Drawing\ImageBuilder.cs" />
- <Compile Include="Xwt.Backends\IImageBuilderBackendHandler.cs" />
<Compile Include="Xwt.Drawing\ImageFormat.cs" />
<Compile Include="Xwt.Drawing\ImagePattern.cs" />
- <Compile Include="Xwt.Backends\IImagePatternBackendHandler.cs" />
<Compile Include="Xwt\CheckBoxMenuItem.cs">
<SubType>Component</SubType>
</Compile>
@@ -342,6 +323,7 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="Xwt.Backends\IExpandBackend.cs" />
+ <Compile Include="Xwt.Backends\ToolkitEngineBackend.cs" />
<Compile Include="Xwt\MouseScrolledEventArgs.cs" />
<Compile Include="Xwt\LinkLabel.cs">
<SubType>Component</SubType>
@@ -365,6 +347,79 @@
<Compile Include="Xwt.Backends\IRichTextViewBackend.cs" />
<Compile Include="Xwt.Formats\TextFormat.cs" />
<Compile Include="Xwt.Formats\MarkdownTextFormat.cs" />
+ <Compile Include="Xwt.Backends\ContextBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\BackendHandler.cs" />
+ <Compile Include="Xwt.Backends\GradientBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\FontBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\ImagePatternBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\ImageBuilderBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\TextLayoutBackendHandler.cs" />
+ <Compile Include="Xwt.Backends\ClipboardBackend.cs" />
+ <Compile Include="Xwt.Backends\ApplicationContext.cs" />
+ <Compile Include="Xwt\Toolkit.cs" />
+ <Compile Include="Xwt.Drawing\DrawingPath.cs" />
+ <Compile Include="Xwt.Backends\DrawingPathBackendHandler.cs" />
+ <Compile Include="Xwt\Desktop.cs" />
+ <Compile Include="Xwt\Screen.cs" />
+ <Compile Include="Xwt.Backends\DesktopBackend.cs" />
+ <Compile Include="Xwt.Backends\BackendTypeAttribute.cs" />
+ <Compile Include="Xwt.Backends\IEmbeddedWidgetBackend.cs" />
+ <Compile Include="Xwt\ListViewRowEventArgs.cs" />
+ <Compile Include="Xwt\TreeViewRowEventArgs.cs" />
+ <Compile Include="Xwt\CanvasCellView.cs" />
+ <Compile Include="Xwt\SegmentedButton.cs" />
+ <Compile Include="Xwt.Backends\ISegmentedButtonBackend.cs" />
+ <Compile Include="Xwt.Backends\SystemBackend.cs" />
+ <Compile Include="Xwt.Backends\WindowsSystemBackend.cs" />
+ <Compile Include="Xwt.Backends\MacSystemBackend.cs" />
+ <Compile Include="Xwt.Backends\GnomeSystemBackend.cs" />
+ <Compile Include="Xwt\DesktopType.cs" />
+ <Compile Include="Xwt.Backends\StockIconId.cs" />
+ <Compile Include="Xwt.Drawing\DrawingImage.cs" />
+ <Compile Include="Xwt.Drawing\BitmapImage.cs" />
+ <Compile Include="Xwt.Formats\PlainTextFormat.cs" />
+ <Compile Include="Xwt.Drawing\ImageFileType.cs" />
+ <Compile Include="Xwt\Slider.cs" />
+ <Compile Include="Xwt.Backends\ISliderBackend.cs" />
+ <Compile Include="Xwt.Drawing\VectorImage.cs" />
+ <Compile Include="Xwt\RadioButton.cs" />
+ <Compile Include="Xwt.Backends\IRadioButtonBackend.cs" />
+ <Compile Include="Xwt\FormattedText.cs" />
+ <Compile Include="Xwt.Drawing\BackgroundTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\FontWeightTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\FontStyleTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\UnderlineTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\StrikethroughTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\FontTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\ColorTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\LinkTextAttribute.cs" />
+ <Compile Include="Xwt.Drawing\TextAttribute.cs" />
+ <Compile Include="Xwt\WidgetEventArgs.cs" />
+ <Compile Include="Xwt.Backends\IImageCellViewFrontend.cs" />
+ <Compile Include="Xwt.Backends\ICellViewFrontend.cs" />
+ <Compile Include="Xwt.Backends\ITextCellViewFrontend.cs" />
+ <Compile Include="Xwt.Backends\ICanvasCellViewFrontend.cs" />
+ <Compile Include="Xwt.Backends\ICheckBoxCellViewFrontend.cs" />
+ <Compile Include="Xwt.Backends\ExtensionMethods.cs" />
+ <Compile Include="Xwt\Scrollbar.cs" />
+ <Compile Include="Xwt\HScrollbar.cs" />
+ <Compile Include="Xwt\VScrollbar.cs" />
+ <Compile Include="Xwt.Backends\IScrollbarBackend.cs" />
+ <Compile Include="Xwt\SizeConstraint.cs" />
+ <Compile Include="Xwt\WidgetAlignment.cs" />
+ <Compile Include="Xwt.Backends\IChildPlacementHandler.cs" />
+ <Compile Include="Xwt\TableCalc.cs" />
+ <Compile Include="Xwt\VSlider.cs" />
+ <Compile Include="Xwt\HSlider.cs" />
+ <Compile Include="Xwt.Backends\ResourceManager.cs" />
+ <Compile Include="Xwt.Backends\DisposableResourceBackendHandler.cs" />
+ <Compile Include="Xwt.Motion\Animation.cs" />
+ <Compile Include="Xwt.Motion\AnimationExtensions.cs" />
+ <Compile Include="Xwt.Motion\Easing.cs" />
+ <Compile Include="Xwt.Motion\Tweener.cs" />
+ <Compile Include="Xwt.Motion\IAnimatable.cs" />
+ <Compile Include="Xwt\WindowLocation.cs" />
+ <Compile Include="Xwt.Motion\ObjectTransforms.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup />
@@ -378,4 +433,7 @@
</MonoDevelop>
</ProjectExtensions>
<ItemGroup />
-</Project>
\ No newline at end of file
+ <ItemGroup>
+ <Folder Include="Xwt.Motion\" />
+ </ItemGroup>
+</Project>
diff --git a/external/xwt/Xwt/Xwt/Application.cs b/external/xwt/Xwt/Xwt/Application.cs
index f14e6b5..5deb685 100755
--- a/external/xwt/Xwt/Xwt/Application.cs
+++ b/external/xwt/Xwt/Xwt/Application.cs
@@ -25,19 +25,24 @@
// THE SOFTWARE.
using System;
-using System.Reflection;
using Xwt.Backends;
-using Xwt.Engine;
+
using System.Threading.Tasks;
namespace Xwt
{
public static class Application
{
- static readonly TaskScheduler taskScheduler = new XwtTaskScheduler ();
+ static Toolkit toolkit;
+ static ToolkitEngineBackend engine;
+ static UILoop mainLoop;
public static TaskScheduler UITaskScheduler {
- get { return taskScheduler; }
+ get { return Toolkit.CurrentEngine.Scheduler; }
+ }
+
+ public static UILoop MainLoop {
+ get { return mainLoop; }
}
internal static System.Threading.Thread UIThread {
@@ -45,12 +50,6 @@ namespace Xwt
private set;
}
- static EngineBackend engine;
-
- internal static EngineBackend EngineBackend {
- get { return engine; }
- }
-
public static void Initialize ()
{
if (engine != null)
@@ -60,30 +59,62 @@ namespace Xwt
public static void Initialize (ToolkitType type)
{
- Initialize (GetBackendType (type));
+ Initialize (Toolkit.GetBackendType (type));
}
public static void Initialize (string backendType)
{
- InitBackend (backendType);
- engine.InitializeApplication ();
+ if (engine != null)
+ return;
+
+ toolkit = Toolkit.Load (backendType, false);
+ toolkit.SetActive ();
+ engine = toolkit.Backend;
+ mainLoop = new UILoop (toolkit);
+
UIThread = System.Threading.Thread.CurrentThread;
+
+ toolkit.EnterUserCode ();
+ }
+
+ public static void InitializeAsGuest (ToolkitType type)
+ {
+ Initialize (type);
+ toolkit.ExitUserCode (null);
}
+ public static void InitializeAsGuest (string backendType)
+ {
+ Initialize (backendType);
+ toolkit.ExitUserCode (null);
+ }
+
public static void Run ()
{
- Toolkit.InvokePlatformCode (delegate {
+ toolkit.InvokePlatformCode (delegate {
engine.RunApplication ();
});
}
public static void Exit ()
{
- Toolkit.InvokePlatformCode (delegate {
+ toolkit.InvokePlatformCode (delegate {
engine.ExitApplication ();
});
}
- /// <summary>
+
+ /// <summary>
+ /// Releases all resource used by the application
+ /// </summary>
+ /// <remarks>This method must be called before the application process ends</remarks>
+ public static void Dispose ()
+ {
+ ResourceManager.Dispose ();
+ Toolkit.DisposeAll ();
+ }
+
+
+ /// <summary>
/// Invokes an action in the GUI thread
/// </summary>
/// <param name='action'>
@@ -91,13 +122,16 @@ namespace Xwt
/// </param>
public static void Invoke (Action action)
{
+ if (action == null)
+ throw new ArgumentNullException ("action");
+
engine.InvokeAsync (delegate {
try {
- Toolkit.EnterUserCode ();
+ toolkit.EnterUserCode ();
action ();
- Toolkit.ExitUserCode (null);
+ toolkit.ExitUserCode (null);
} catch (Exception ex) {
- Toolkit.ExitUserCode (ex);
+ toolkit.ExitUserCode (ex);
}
});
}
@@ -119,6 +153,11 @@ namespace Xwt
/// </remarks>
public static IDisposable TimeoutInvoke (int ms, Func<bool> action)
{
+ if (action == null)
+ throw new ArgumentNullException ("action");
+ if (ms < 0)
+ throw new ArgumentException ("ms can't be negative");
+
return TimeoutInvoke (TimeSpan.FromMilliseconds (ms), action);
}
@@ -139,31 +178,26 @@ namespace Xwt
/// </remarks>
public static IDisposable TimeoutInvoke (TimeSpan timeSpan, Func<bool> action)
{
+ if (action == null)
+ throw new ArgumentNullException ("action");
+ if (timeSpan.Ticks < 0)
+ throw new ArgumentException ("timeSpan can't be negative");
+
Timer t = new Timer ();
t.Id = engine.TimerInvoke (delegate {
bool res = false;
try {
- Toolkit.EnterUserCode ();
+ toolkit.EnterUserCode ();
res = action ();
- Toolkit.ExitUserCode (null);
+ toolkit.ExitUserCode (null);
} catch (Exception ex) {
- Toolkit.ExitUserCode (ex);
+ toolkit.ExitUserCode (ex);
}
return res;
}, timeSpan);
return t;
}
- public static void DispatchPendingEvents ()
- {
- try {
- Toolkit.ExitUserCode (null);
- engine.DispatchPendingEvents ();
- } finally {
- Toolkit.EnterUserCode ();
- }
- }
-
public static StatusIcon CreateStatusIcon ()
{
return new StatusIcon ();
@@ -179,52 +213,6 @@ namespace Xwt
Application.engine.CancelTimerInvoke (Id);
}
}
-
- static bool LoadBackend (string type)
- {
- int i = type.IndexOf (',');
- string assembly = type.Substring (i+1).Trim ();
- type = type.Substring (0, i).Trim ();
- try {
- Assembly asm = Assembly.Load (assembly);
- if (asm != null) {
- Type t = asm.GetType (type);
- if (t != null) {
- engine = (EngineBackend) Activator.CreateInstance (t);
- return true;
- }
- }
- }
- catch (Exception ex) {
- Console.WriteLine (ex);
- }
- return false;
- }
-
- static void InitBackend (string type)
- {
- Toolkit.EnterUserCode ();
- if (type != null && LoadBackend (type))
- return;
-
- throw new InvalidOperationException ("Xwt engine not found");
- }
-
- internal static string GetBackendType (ToolkitType type)
- {
- string version = typeof(Application).Assembly.GetName ().Version.ToString ();
-
- switch (type) {
- case ToolkitType.Gtk:
- return "Xwt.GtkBackend.GtkEngine, Xwt.Gtk, Version=" + version;
- case ToolkitType.Cocoa:
- return "Xwt.Mac.MacEngine, Xwt.Mac, Version=" + version;
- case ToolkitType.Wpf:
- return "Xwt.WPFBackend.WPFEngine, Xwt.WPF, Version=" + version;
- default:
- throw new ArgumentException ("Invalid toolkit type");
- }
- }
internal static void NotifyException (Exception ex)
{
@@ -240,11 +228,40 @@ namespace Xwt
}
}
+ public class UILoop
+ {
+ Toolkit toolkit;
+
+ internal UILoop (Toolkit toolkit)
+ {
+ this.toolkit = toolkit;
+ }
+
+ public void DispatchPendingEvents ()
+ {
+ try {
+ toolkit.ExitUserCode (null);
+ toolkit.Backend.DispatchPendingEvents ();
+ } finally {
+ toolkit.EnterUserCode ();
+ }
+ }
+
+ public void QueueExitAction (Action action)
+ {
+ if (action == null)
+ throw new ArgumentNullException ("action");
+ toolkit.QueueExitAction (action);
+ }
+ }
+
+
public enum ToolkitType
{
- Gtk,
- Cocoa,
- Wpf
+ Gtk = 1,
+ Cocoa = 2,
+ Wpf = 3,
+ XamMac = 4
}
}
diff --git a/external/xwt/Xwt/Xwt/Box.cs b/external/xwt/Xwt/Xwt/Box.cs
old mode 100755
new mode 100644
index 980564e..454a298
--- a/external/xwt/Xwt/Xwt/Box.cs
+++ b/external/xwt/Xwt/Xwt/Box.cs
@@ -34,6 +34,7 @@ using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(IBoxBackend))]
public class Box: Widget
{
ChildrenCollection<BoxPlacement> children;
@@ -80,7 +81,10 @@ namespace Xwt
public double Spacing {
get { return spacing; }
- set { spacing = value; OnPreferredSizeChanged (); }
+ set {
+ spacing = value > 0 ? value : 0;
+ OnPreferredSizeChanged ();
+ }
}
public ChildrenCollection<BoxPlacement> Placements {
@@ -90,48 +94,118 @@ namespace Xwt
public IEnumerable<Widget> Children {
get { return children.Select (c => c.Child); }
}
-
+
public void PackStart (Widget widget)
{
- PackStart (widget, BoxMode.None, 0);
+ Pack (widget, false, WidgetPlacement.Fill, PackOrigin.Start);
}
- public void PackStart (Widget widget, BoxMode mode)
+ public void PackStart (Widget widget, bool expand)
{
- PackStart (widget, mode, 0);
+ Pack (widget, expand, WidgetPlacement.Fill, PackOrigin.Start);
}
-
- public void PackStart (Widget widget, BoxMode mode, int padding)
+
+ public void PackStart (Widget widget, bool expand, bool fill)
+ {
+ WidgetPlacement align = fill ? WidgetPlacement.Fill : WidgetPlacement.Center;
+ Pack (widget, expand, align, PackOrigin.Start);
+ }
+
+ public void PackStart (Widget widget, bool expand = false, WidgetPlacement vpos = WidgetPlacement.Fill, WidgetPlacement hpos = WidgetPlacement.Fill, double marginLeft = -1, double marginTop = -1, double marginRight = -1, double marginBottom = -1, double margin = -1)
+ {
+ Pack (widget, expand, vpos, hpos, marginLeft, marginTop, marginRight, marginBottom, margin, PackOrigin.Start);
+ }
+
+ [Obsolete ("BoxMode is going away")]
+ public void PackStart (Widget widget, BoxMode mode)
{
- Pack (widget, mode, padding, PackOrigin.Start);
+ bool expand = (mode & BoxMode.Expand) != 0;
+ bool fill = (mode & BoxMode.Fill) != 0;
+ PackStart (widget, expand, fill);
}
public void PackEnd (Widget widget)
{
- PackEnd (widget, BoxMode.None, 0);
+ Pack (widget, false, WidgetPlacement.Fill, PackOrigin.End);
}
+ public void PackEnd (Widget widget, bool expand)
+ {
+ Pack (widget, expand, WidgetPlacement.Fill, PackOrigin.End);
+ }
+
+ public void PackEnd (Widget widget, bool expand, bool fill)
+ {
+ WidgetPlacement align = fill ? WidgetPlacement.Fill : WidgetPlacement.Center;
+ Pack (widget, expand, align, PackOrigin.End);
+ }
+
+ public void PackEnd (Widget widget, bool expand = false, WidgetPlacement hpos = WidgetPlacement.Fill, WidgetPlacement vpos = WidgetPlacement.Fill, double marginLeft = -1, double marginTop = -1, double marginRight = -1, double marginBottom = -1, double margin = -1)
+ {
+ Pack (widget, expand, vpos, hpos, marginLeft, marginTop, marginRight, marginBottom, margin, PackOrigin.End);
+ }
+
+ [Obsolete ("BoxMode is going away")]
public void PackEnd (Widget widget, BoxMode mode)
{
- PackEnd (widget, mode, 0);
+ bool expand = (mode & BoxMode.Expand) != 0;
+ bool fill = (mode & BoxMode.Fill) != 0;
+ PackEnd (widget, expand, fill);
}
-
- public void PackEnd (Widget widget, BoxMode mode, int padding)
+
+
+ void Pack (Widget widget, bool expand, WidgetPlacement vpos, WidgetPlacement hpos, double marginLeft, double marginTop, double marginRight, double marginBottom, double margin, PackOrigin ptype)
{
- Pack (widget, mode, padding, PackOrigin.End);
+ WidgetPlacement align;
+
+ if (direction == Orientation.Horizontal) {
+ align = hpos;
+ if (vpos != default (WidgetPlacement))
+ widget.VerticalPlacement = vpos;
+ } else {
+ align = vpos;
+ if (hpos != default (WidgetPlacement))
+ widget.HorizontalPlacement = hpos;
+ }
+ if (margin != -1)
+ widget.Margin = margin;
+ if (marginLeft != -1)
+ widget.MarginLeft = marginLeft;
+ if (marginTop != -1)
+ widget.MarginTop = marginTop;
+ if (marginTop != -1)
+ widget.MarginRight = marginRight;
+ if (marginBottom != -1)
+ widget.MarginBottom = marginBottom;
+ Pack (widget, expand, align, PackOrigin.Start);
}
-
- void Pack (Widget widget, BoxMode mode, int padding, PackOrigin ptype)
+
+ void Pack (Widget widget, bool? expand, WidgetPlacement align, PackOrigin ptype)
{
+ if (expand.HasValue) {
+ if (direction == Orientation.Vertical)
+ widget.ExpandVertical = expand.Value;
+ else
+ widget.ExpandHorizontal = expand.Value;
+ }
+ if (align != default (WidgetPlacement)) {
+ if (direction == Orientation.Vertical)
+ widget.VerticalPlacement = align;
+ else
+ widget.HorizontalPlacement = align;
+ }
+
+ if (widget == null)
+ throw new ArgumentNullException ("widget");
var p = new BoxPlacement ((WidgetBackendHost)BackendHost, widget);
- p.BoxMode = mode;
- p.Padding = padding;
p.PackOrigin = ptype;
children.Add (p);
}
public bool Remove (Widget widget)
{
+ if (widget == null)
+ throw new ArgumentNullException ("widget");
for (int n=0; n<children.Count; n++) {
if (children[n].Child == widget) {
children.RemoveAt (n);
@@ -174,11 +248,11 @@ namespace Xwt
OnRemove (oldWidget);
OnAdd (newWidget, placement);
}
-
+
protected override void OnReallocate ()
{
var size = Backend.Size;
- if (size.Width == 0 || size.Height == 0)
+ if (size.Width <= 0 || size.Height <= 0)
return;
var visibleChildren = children.Where (c => c.Child.Visible).ToArray ();
@@ -186,192 +260,121 @@ namespace Xwt
Rectangle[] rects = new Rectangle [visibleChildren.Length];
if (direction == Orientation.Horizontal) {
- CalcDefaultSizes (Surface.SizeRequestMode, size.Width, size.Height);
+ CalcDefaultSizes (size.Width, size.Height);
double xs = 0;
double xe = size.Width + spacing;
for (int n=0; n<visibleChildren.Length; n++) {
var bp = visibleChildren [n];
+ double availableWidth = bp.NextSize >= 0 ? bp.NextSize : 0;
if (bp.PackOrigin == PackOrigin.End)
- xe -= bp.NextSize + spacing;
- double x = bp.PackOrigin == PackOrigin.Start ? xs : xe;
+ xe -= availableWidth + spacing;
+
+ var slot = new Rectangle (bp.PackOrigin == PackOrigin.Start ? xs : xe, 0, availableWidth, size.Height);
widgets[n] = (IWidgetBackend)GetBackend (bp.Child);
- rects[n] = new Rectangle (x, 0, bp.NextSize >= 0 ? bp.NextSize : 0, size.Height >= 0 ? size.Height : 0);
+ rects[n] = bp.Child.Surface.GetPlacementInRect (slot).Round ().WithPositiveSize ();
+
if (bp.PackOrigin == PackOrigin.Start)
- xs += bp.NextSize + spacing;
+ xs += availableWidth + spacing;
}
} else {
- CalcDefaultSizes (Surface.SizeRequestMode, size.Height, size.Width);
+ CalcDefaultSizes (size.Width, size.Height);
double ys = 0;
double ye = size.Height + spacing;
for (int n=0; n<visibleChildren.Length; n++) {
var bp = visibleChildren [n];
+ double availableHeight = bp.NextSize >= 0 ? bp.NextSize : 0;
if (bp.PackOrigin == PackOrigin.End)
- ye -= bp.NextSize + spacing;
- double y = bp.PackOrigin == PackOrigin.Start ? ys : ye;
+ ye -= availableHeight + spacing;
+
+ var slot = new Rectangle (0, bp.PackOrigin == PackOrigin.Start ? ys : ye, size.Width, availableHeight);
widgets[n] = (IWidgetBackend)GetBackend (bp.Child);
- rects[n] = new Rectangle (0, y, size.Width >= 0 ? size.Width : 0, bp.NextSize >= 0 ? bp.NextSize : 0);
+ rects[n] = bp.Child.Surface.GetPlacementInRect (slot).Round ().WithPositiveSize ();
+
if (bp.PackOrigin == PackOrigin.Start)
- ys += bp.NextSize + spacing;
+ ys += availableHeight + spacing;
}
}
Backend.SetAllocation (widgets, rects);
- if (!Application.EngineBackend.HandlesSizeNegotiation) {
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation) {
foreach (var bp in visibleChildren)
bp.Child.Surface.Reallocate ();
}
}
- void CalcDefaultSizes (SizeRequestMode mode, double totalSize, double lengthConstraint)
+ void CalcDefaultSizes (double width, double height)
{
- bool calcHeights = direction == Orientation.Vertical;
- bool useLengthConstraint = mode == SizeRequestMode.HeightForWidth && calcHeights || mode == SizeRequestMode.WidthForHeight && !calcHeights;
+ bool vertical = direction == Orientation.Vertical;
int nexpands = 0;
- double naturalSize = 0;
-
+ double requiredSize = 0;
+ double availableSize = vertical ? height : width;
+
+ var widthConstraint = vertical ? SizeConstraint.WithSize (width) : SizeConstraint.Unconstrained;
+ var heightConstraint = vertical ? SizeConstraint.Unconstrained : SizeConstraint.WithSize (height);
+
var visibleChildren = children.Where (b => b.Child.Visible).ToArray ();
- var sizes = new Dictionary<BoxPlacement,WidgetSize> ();
-
+ var sizes = new Dictionary<BoxPlacement,double> ();
+
// Get the natural size of each child
foreach (var bp in visibleChildren) {
- WidgetSize s;
- if (useLengthConstraint)
- s = GetPreferredLengthForSize (mode, bp.Child, lengthConstraint);
- else
- s = GetPreferredSize (calcHeights, bp.Child);
- sizes [bp] = s;
- naturalSize += s.NaturalSize;
- bp.NextSize = s.NaturalSize;
- if ((bp.BoxMode & BoxMode.Expand) != 0)
+ Size s;
+ s = bp.Child.Surface.GetPreferredSize (widthConstraint, heightConstraint, true);
+ bp.NextSize = vertical ? s.Height : s.Width;
+ sizes [bp] = bp.NextSize;
+ requiredSize += bp.NextSize;
+ if (bp.Child.ExpandsForOrientation (direction))
nexpands++;
}
- double remaining = totalSize - naturalSize - (spacing * (double)(visibleChildren.Length - 1));
+ double remaining = availableSize - requiredSize - (spacing * (double)(visibleChildren.Length - 1));
if (remaining < 0) {
// The box is not big enough to fit the widgets using its natural size.
// We have to shrink the widgets.
- // List of widgets that we have to shrink
- var toShrink = new List<BoxPlacement> (visibleChildren);
-
// The total amount we have to shrink
double shrinkSize = -remaining;
- while (toShrink.Count > 0 && shrinkSize > 0) {
- SizeSplitter sizePart = new SizeSplitter (shrinkSize, toShrink.Count);
- shrinkSize = 0;
- for (int i=0; i < toShrink.Count; i++) {
- var bp = toShrink[i];
- bp.NextSize -= sizePart.NextSizePart ();
-
- WidgetSize size = sizes [bp];
-
- if (bp.NextSize < size.MinSize) {
- // If the widget can't be shrinked anymore, we remove it from the shrink list
- // and increment the remaining shrink size. We'll loop again and this size will be
- // substracted from the cells which can still be reduced
- shrinkSize += (size.MinSize - bp.NextSize);
- bp.NextSize = size.MinSize;
- toShrink.RemoveAt (i);
- i--;
- }
- }
- }
+ var sizePart = new SizeSplitter (shrinkSize, visibleChildren.Length);
+ foreach (var bp in visibleChildren)
+ bp.NextSize -= sizePart.NextSizePart ();
}
else {
var expandRemaining = new SizeSplitter (remaining, nexpands);
foreach (var bp in visibleChildren) {
- if ((bp.BoxMode & BoxMode.Expand) != 0)
+ if (bp.Child.ExpandsForOrientation (direction))
bp.NextSize += expandRemaining.NextSizePart ();
}
}
}
- protected override WidgetSize OnGetPreferredWidth ()
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- WidgetSize s = new WidgetSize ();
-
+ Size s = new Size ();
+ int count = 0;
+
if (direction == Orientation.Horizontal) {
- int count = 0;
foreach (var cw in Children.Where (b => b.Visible)) {
- s += cw.Surface.GetPreferredWidth ();
+ var wsize = cw.Surface.GetPreferredSize (SizeConstraint.Unconstrained, heightConstraint, true);
+ s.Width += wsize.Width;
+ if (wsize.Height > s.Height)
+ s.Height = wsize.Height;
count++;
}
if (count > 0)
- s += spacing * (double)(count - 1);
+ s.Width += spacing * (double)(count - 1);
} else {
- foreach (var cw in Children.Where (b => b.Visible))
- s = s.UnionWith (cw.Surface.GetPreferredWidth ());
- }
- return s;
- }
-
- protected override WidgetSize OnGetPreferredHeight ()
- {
- WidgetSize s = new WidgetSize ();
-
- if (direction == Orientation.Vertical) {
- int count = 0;
foreach (var cw in Children.Where (b => b.Visible)) {
- s += cw.Surface.GetPreferredHeight ();
- count++;
- }
- if (count > 0)
- s += spacing * (double)(count - 1);
- } else {
- foreach (var cw in Children.Where (b => b.Visible))
- s = s.UnionWith (cw.Surface.GetPreferredHeight ());
- }
- return s;
- }
-
- protected override WidgetSize OnGetPreferredHeightForWidth (double width)
- {
- return GetPreferredLengthForSize (SizeRequestMode.HeightForWidth, width);
- }
-
- protected override WidgetSize OnGetPreferredWidthForHeight (double height)
- {
- return GetPreferredLengthForSize (SizeRequestMode.WidthForHeight, height);
- }
-
- WidgetSize GetPreferredLengthForSize (SizeRequestMode mode, double width)
- {
- WidgetSize s = new WidgetSize ();
-
- if ((direction == Orientation.Horizontal && mode == SizeRequestMode.HeightForWidth) || (direction == Orientation.Vertical && mode == SizeRequestMode.WidthForHeight)) {
- CalcDefaultSizes (mode, width, -1);
- foreach (var bp in children.Where (b => b.Child.Visible)) {
- s = s.UnionWith (GetPreferredLengthForSize (mode, bp.Child, bp.NextSize));
- }
- }
- else {
- int count = 0;
- foreach (var bp in children.Where (b => b.Child.Visible)) {
- s += GetPreferredLengthForSize (mode, bp.Child, width);
+ var wsize = cw.Surface.GetPreferredSize (widthConstraint, SizeConstraint.Unconstrained, true);
+ s.Height += wsize.Height;
+ if (wsize.Width > s.Width)
+ s.Width = wsize.Width;
count++;
}
if (count > 0)
- s += spacing * (double)(count - 1);
+ s.Height += spacing * (double)(count - 1);
}
return s;
}
-
- WidgetSize GetPreferredSize (bool calcHeight, Widget w)
- {
- if (calcHeight)
- return w.Surface.GetPreferredHeight ();
- else
- return w.Surface.GetPreferredWidth ();
- }
-
- WidgetSize GetPreferredLengthForSize (SizeRequestMode mode, Widget w, double width)
- {
- if (mode == SizeRequestMode.WidthForHeight)
- return w.Surface.GetPreferredWidthForHeight (width);
- else
- return w.Surface.GetPreferredHeightForWidth (width);
- }
}
[Flags]
@@ -388,8 +391,6 @@ namespace Xwt
{
IContainerEventSink<BoxPlacement> parent;
int position;
- BoxMode boxMode = BoxMode.None;
- int padding;
PackOrigin packType = PackOrigin.Start;
Widget child;
@@ -400,7 +401,7 @@ namespace Xwt
}
internal double NextSize;
-
+
public int Position {
get {
return this.position;
@@ -410,28 +411,6 @@ namespace Xwt
parent.ChildChanged (this, "Position");
}
}
-
- [DefaultValue (BoxMode.None)]
- public BoxMode BoxMode {
- get {
- return this.boxMode;
- }
- set {
- boxMode = value;
- parent.ChildChanged (this, "BoxMode");
- }
- }
-
- [DefaultValue (0)]
- public int Padding {
- get {
- return this.padding;
- }
- set {
- padding = value;
- parent.ChildChanged (this, "Padding");
- }
- }
[DefaultValue (PackOrigin.Start)]
public PackOrigin PackOrigin {
diff --git a/external/xwt/Xwt/Xwt/Button.cs b/external/xwt/Xwt/Xwt/Button.cs
index cecd21a..f86330c 100755
--- a/external/xwt/Xwt/Xwt/Button.cs
+++ b/external/xwt/Xwt/Xwt/Button.cs
@@ -27,9 +27,11 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
+using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(IButtonBackend))]
public class Button: Widget
{
EventHandler clicked;
@@ -87,33 +89,37 @@ namespace Xwt
get { return (IButtonBackend) BackendHost.Backend; }
}
+ [DefaultValue ("")]
public string Label {
- get { return label; }
+ get { return label ?? ""; }
set {
label = value;
- Backend.SetContent (label, XwtObject.GetBackend (image), imagePosition);
+ Backend.SetContent (label, image != null ? image.ImageDescription : ImageDescription.Null, imagePosition);
OnPreferredSizeChanged ();
}
}
-
+
+ [DefaultValue (null)]
public Image Image {
get { return image; }
set {
image = value;
- Backend.SetContent (label, XwtObject.GetBackend (value), imagePosition);
+ Backend.SetContent (label, image != null ? image.ImageDescription : ImageDescription.Null, imagePosition);
OnPreferredSizeChanged ();
}
}
+ [DefaultValue (ContentPosition.Left)]
public ContentPosition ImagePosition {
get { return imagePosition; }
set {
imagePosition = value;
- Backend.SetContent (label, XwtObject.GetBackend (image), imagePosition);
+ Backend.SetContent (label, image != null ? image.ImageDescription : ImageDescription.Null, imagePosition);
OnPreferredSizeChanged ();
}
}
+ [DefaultValue (ButtonStyle.Normal)]
public ButtonStyle Style {
get { return style; }
set {
@@ -123,6 +129,7 @@ namespace Xwt
}
}
+ [DefaultValue (ButtonType.Normal)]
public ButtonType Type {
get { return type; }
set {
diff --git a/external/xwt/Xwt/Xwt/Canvas.cs b/external/xwt/Xwt/Xwt/Canvas.cs
index 0b5efc0..8bd6e51 100644
--- a/external/xwt/Xwt/Xwt/Canvas.cs
+++ b/external/xwt/Xwt/Xwt/Canvas.cs
@@ -24,32 +24,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-//
-// Canvas.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Backends;
@@ -59,6 +33,7 @@ using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(ICanvasBackend))]
public class Canvas: Widget
{
Dictionary<Widget,Rectangle> positions;
@@ -69,7 +44,8 @@ namespace Xwt
{
Context ctx = null;
try {
- ctx = new Context (context);
+ ctx = new Context (context, ToolkitEngine);
+ ctx.Reset (Parent);
((Canvas)Parent).OnDraw (ctx, dirtyRect);
}
finally {
@@ -115,8 +91,8 @@ namespace Xwt
/// </remarks>
public void AddChild (Widget w, double x, double y)
{
- var pw = w.Surface.GetPreferredWidth ().NaturalSize;
- AddChild (w, new Rectangle (x, y, pw, w.Surface.GetPreferredHeightForWidth (pw).NaturalSize));
+ var s = w.Surface.GetPreferredSize (SizeConstraint.Unconstrained, SizeConstraint.Unconstrained);
+ AddChild (w, new Rectangle (x, y, s.Width, s.Height));
}
/// <summary>
diff --git a/external/xwt/Xwt/Xwt/CanvasCellView.cs b/external/xwt/Xwt/Xwt/CanvasCellView.cs
new file mode 100644
index 0000000..c1b8e9d
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/CanvasCellView.cs
@@ -0,0 +1,85 @@
+//
+// CanvasCellView.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+using Xwt.Backends;
+
+namespace Xwt
+{
+ public class CanvasCellView: CellView, ICanvasCellViewFrontend
+ {
+ public CanvasCellView ()
+ {
+ }
+
+ /// <summary>
+ /// Called when the cell needs to be redrawn
+ /// </summary>
+ /// <param name='ctx'>
+ /// Drawing context
+ /// </param>
+ protected virtual void OnDraw (Context ctx, Rectangle cellArea)
+ {
+ }
+
+ protected virtual Rectangle OnGetDrawingAreaForBounds (Rectangle cellBounds)
+ {
+ return cellBounds;
+ }
+
+ protected virtual Size OnGetRequiredSize ()
+ {
+ return new Size ();
+ }
+
+ #region ICanvasCellRenderer implementation
+
+ void ICanvasCellViewFrontend.Draw (object ctxBackend, Rectangle cellArea)
+ {
+ using (var ctx = new Context (ctxBackend, Toolkit.CurrentEngine)) {
+ ctx.Reset (null);
+ OnDraw (ctx, cellArea);
+ }
+ }
+
+ Rectangle ICanvasCellViewFrontend.GetDrawingAreaForBounds (Rectangle cellBounds)
+ {
+ return OnGetDrawingAreaForBounds (cellBounds);
+ }
+
+ Size ICanvasCellViewFrontend.GetRequiredSize ()
+ {
+ return OnGetRequiredSize ();
+ }
+
+ ApplicationContext ICanvasCellViewFrontend.ApplicationContext {
+ get { return new ApplicationContext (Toolkit.CurrentEngine); }
+ }
+
+ #endregion
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/CellView.cs b/external/xwt/Xwt/Xwt/CellView.cs
index 02c7db5..bb378a5 100644
--- a/external/xwt/Xwt/Xwt/CellView.cs
+++ b/external/xwt/Xwt/Xwt/CellView.cs
@@ -26,20 +26,72 @@
using System;
using Xwt.Drawing;
+using Xwt.Backends;
+using System.ComponentModel;
namespace Xwt
{
- public class CellView
+ public class CellView: ICellViewFrontend
{
- public static CellView GetDefaultCellView (DataField field)
+ /// <summary>
+ /// Gets the default cell view for the provided field type
+ /// </summary>
+ /// <returns>The default cell view.</returns>
+ /// <param name="field">Field.</param>
+ public static CellView GetDefaultCellView (IDataField field)
{
if (field.Index == -1)
throw new InvalidOperationException ("Field must be bound to a data source");
if (field.FieldType == typeof(bool))
- return new CheckBoxCellView (field);
+ return new CheckBoxCellView ((IDataField<bool>)field);
else if (field.FieldType == typeof(Image))
- return new ImageCellView (field);
+ return new ImageCellView ((IDataField<Image>)field);
return new TextCellView (field);
}
+
+ /// <summary>
+ /// Data source object to be used to get the data with which to fill the cell
+ /// </summary>
+ /// <value>The data source.</value>
+ protected ICellDataSource DataSource { get; private set; }
+
+ bool visible = true;
+
+ public IDataField<bool> VisibleField { get; set; }
+
+ [DefaultValue (true)]
+ public bool Visible {
+ get { return GetValue (VisibleField, visible); }
+ set { visible = value; }
+ }
+
+ void ICellViewFrontend.Initialize (ICellDataSource source)
+ {
+ DataSource = source;
+ OnDataChanged ();
+ }
+
+ /// <summary>
+ /// Gets the value of a field
+ /// </summary>
+ /// <returns>The value.</returns>
+ /// <param name="field">Field.</param>
+ /// <param name="defaultValue">Default value to be returned if the field has no value</param>
+ /// <typeparam name="T">Type of the value</typeparam>
+ protected T GetValue<T> (IDataField<T> field, T defaultValue = default(T))
+ {
+ if (DataSource != null && field != null) {
+ var result = DataSource.GetValue (field);
+ return result == DBNull.Value ? defaultValue : (T) result;
+ }
+ return defaultValue;
+ }
+
+ /// <summary>
+ /// Invoked when the data source changes
+ /// </summary>
+ protected virtual void OnDataChanged ()
+ {
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/CheckBox.cs b/external/xwt/Xwt/Xwt/CheckBox.cs
index 3df0d50..51abf43 100644
--- a/external/xwt/Xwt/Xwt/CheckBox.cs
+++ b/external/xwt/Xwt/Xwt/CheckBox.cs
@@ -26,9 +26,12 @@
using System;
using System.ComponentModel;
using Xwt.Backends;
+using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(ICheckBoxBackend))]
+ [ContentProperty("Content")]
public class CheckBox: Widget
{
Widget content;
@@ -50,7 +53,8 @@ namespace Xwt
static CheckBox ()
{
- MapEvent (ButtonEvent.Clicked, typeof(CheckBox), "OnClicked");
+ MapEvent (CheckBoxEvent.Clicked, typeof(CheckBox), "OnClicked");
+ MapEvent (CheckBoxEvent.Toggled, typeof(CheckBox), "OnToggled");
}
public CheckBox ()
@@ -80,7 +84,8 @@ namespace Xwt
OnPreferredSizeChanged ();
}
}
-
+
+ [DefaultValue (null)]
public new Widget Content {
get { return content; }
set {
diff --git a/external/xwt/Xwt/Xwt/CheckBoxCellView.cs b/external/xwt/Xwt/Xwt/CheckBoxCellView.cs
index c12afe0..afb39d1 100644
--- a/external/xwt/Xwt/Xwt/CheckBoxCellView.cs
+++ b/external/xwt/Xwt/Xwt/CheckBoxCellView.cs
@@ -29,28 +29,58 @@ using System;
using Xwt.Drawing;
using System.Collections.ObjectModel;
using System.Collections.Generic;
+using System.ComponentModel;
+using Xwt.Backends;
namespace Xwt
{
- public class CheckBoxCellView: CellView
+ public sealed class CheckBoxCellView: CellView, ICheckBoxCellViewFrontend
{
+ bool active;
+ bool editable;
+
+ public IDataField<bool> ActiveField { get; set; }
+ public IDataField<bool> EditableField { get; set; }
+
public CheckBoxCellView ()
{
}
- public CheckBoxCellView (DataField field)
+ public CheckBoxCellView (IDataField<bool> field)
{
ActiveField = field;
}
- public DataField ActiveField { get; set; }
-
- public event EventHandler ActiveChanged;
+ [DefaultValue (false)]
+ public bool Active {
+ get { return GetValue (ActiveField, active); }
+ set { active = value; }
+ }
- public void RaiseActiveChanged ()
+ [DefaultValue (false)]
+ public bool Editable {
+ get {
+ return GetValue (EditableField, editable);
+ }
+ set {
+ editable = value;
+ }
+ }
+
+ public event EventHandler<WidgetEventArgs> Toggled;
+
+ /// <summary>
+ /// Raises the toggled event
+ /// </summary>
+ /// <returns><c>true</c>, if the event was handled, <c>false</c> otherwise.</returns>
+ public bool RaiseToggled ()
{
- if (ActiveChanged != null)
- ActiveChanged (this, EventArgs.Empty);
+ if (Toggled != null) {
+ var args = new WidgetEventArgs ();
+ Toggled (this, args);
+ return args.Handled;
+ }
+ return false;
}
}
}
diff --git a/external/xwt/Xwt/Xwt/CheckBoxMenuItem.cs b/external/xwt/Xwt/Xwt/CheckBoxMenuItem.cs
index fab57ff..cb4cd8b 100644
--- a/external/xwt/Xwt/Xwt/CheckBoxMenuItem.cs
+++ b/external/xwt/Xwt/Xwt/CheckBoxMenuItem.cs
@@ -29,6 +29,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(ICheckBoxMenuItemBackend))]
public class CheckBoxMenuItem: MenuItem
{
public CheckBoxMenuItem ()
diff --git a/external/xwt/Xwt/Xwt/Clipboard.cs b/external/xwt/Xwt/Xwt/Clipboard.cs
index 0dc7768..5e14742 100644
--- a/external/xwt/Xwt/Xwt/Clipboard.cs
+++ b/external/xwt/Xwt/Xwt/Clipboard.cs
@@ -27,20 +27,14 @@ using System;
using System.Linq;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt
{
public static class Clipboard
{
- static IClipboardBackend _backend;
-
- static IClipboardBackend Backend {
- get {
- if (_backend == null)
- _backend = WidgetRegistry.CreateSharedBackend<IClipboardBackend> (typeof(Clipboard));
- return _backend;
- }
+ static ClipboardBackend Backend {
+ get { return Toolkit.CurrentEngine.ClipboardBackend; }
}
public static void Clear ()
diff --git a/external/xwt/Xwt/Xwt/ColorSelector.cs b/external/xwt/Xwt/Xwt/ColorSelector.cs
index 6246cd6..689443e 100644
--- a/external/xwt/Xwt/Xwt/ColorSelector.cs
+++ b/external/xwt/Xwt/Xwt/ColorSelector.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
namespace Xwt
{
+ [BackendType (typeof(IColorSelectorBackend))]
public class ColorSelector: Widget
{
protected new class WidgetBackendHost: Widget.WidgetBackendHost, IColorSelectorEventSink
@@ -38,7 +39,7 @@ namespace Xwt
protected override IBackend OnCreateBackend ()
{
var b = base.OnCreateBackend ();
- if (b is ICustomWidgetBackend)
+ if (b == null)
b = new DefaultColorSelectorBackend ();
return b;
}
@@ -126,8 +127,8 @@ namespace Xwt
colorBox = new ColorSelectionBox () { MinHeight = 20 };
- selBox.Attach (hsBox, 0, 0);
- selBox.Attach (lightBox, 1, 0);
+ selBox.Add (hsBox, 0, 0);
+ selBox.Add (lightBox, 1, 0);
box.PackStart (selBox);
@@ -135,34 +136,34 @@ namespace Xwt
VBox entryBox = new VBox ();
Table entryTable = new Table ();
- entryTable.Attach (new Label ("Color:"), 0, 0);
- entryTable.Attach (colorBox, 1, 5, 0, 1);
- entryTable.Attach (new HSeparator (), 0, 5, 1, 2);
+ entryTable.Add (new Label ("Color:"), 0, 0);
+ entryTable.Add (colorBox, 1, 0, colspan:4);
+ entryTable.Add (new HSeparator (), 0, 1, colspan:5);
int r = 2;
- entryTable.Attach (new Label ("Hue:"), 0, r);
- entryTable.Attach (hueEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
+ entryTable.Add (new Label ("Hue:"), 0, r);
+ entryTable.Add (hueEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
- entryTable.Attach (new Label ("Saturation:"), 0, r);
- entryTable.Attach (satEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
+ entryTable.Add (new Label ("Saturation:"), 0, r);
+ entryTable.Add (satEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
- entryTable.Attach (new Label ("Light:"), 0, r);
- entryTable.Attach (lightEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
+ entryTable.Add (new Label ("Light:"), 0, r);
+ entryTable.Add (lightEntry = new TextEntry () { MinWidth = entryWidth }, 1, r++);
r = 2;
- entryTable.Attach (new Label ("Red:"), 3, r);
- entryTable.Attach (redEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
+ entryTable.Add (new Label ("Red:"), 3, r);
+ entryTable.Add (redEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
- entryTable.Attach (new Label ("Green:"), 3, r);
- entryTable.Attach (greenEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
+ entryTable.Add (new Label ("Green:"), 3, r);
+ entryTable.Add (greenEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
- entryTable.Attach (new Label ("Blue:"), 3, r);
- entryTable.Attach (blueEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
+ entryTable.Add (new Label ("Blue:"), 3, r);
+ entryTable.Add (blueEntry = new TextEntry () { MinWidth = entryWidth }, 4, r++);
Label label;
- entryTable.Attach (alphaSeparator = new HSeparator (), 0, 5, r, ++r);
- entryTable.Attach (label = new Label ("Opacity:"), 0, r);
- entryTable.Attach (alphaEntry = new TextEntry () { MinWidth = entryWidth }, 1, r);
+ entryTable.Add (alphaSeparator = new HSeparator (), 0, r++, colspan:5);
+ entryTable.Add (label = new Label ("Opacity:"), 0, r);
+ entryTable.Add (alphaEntry = new TextEntry () { MinWidth = entryWidth }, 1, r);
alphaControls.Add (alphaSeparator);
alphaControls.Add (label);
@@ -351,16 +352,16 @@ namespace Xwt
protected override void OnDraw (Context ctx, Rectangle dirtyRect)
{
if (colorBox == null) {
- ImageBuilder ib = new ImageBuilder (size, size);
- for (int i=0; i<size; i++) {
- for (int j=0; j<size; j++) {
- ib.Context.Rectangle (i, j, 1, 1);
- ib.Context.SetColor (GetColor (i,j));
- ib.Context.Fill ();
+ using (var ib = new ImageBuilder (size, size)) {
+ for (int i=0; i<size; i++) {
+ for (int j=0; j<size; j++) {
+ ib.Context.Rectangle (i, j, 1, 1);
+ ib.Context.SetColor (GetColor (i,j));
+ ib.Context.Fill ();
+ }
}
+ colorBox = ib.ToBitmap (this);
}
- colorBox = ib.ToImage ();
- ib.Dispose ();
}
ctx.DrawImage (colorBox, padding, padding);
ctx.SetLineWidth (1);
diff --git a/external/xwt/Xwt/Xwt/ComboBox.cs b/external/xwt/Xwt/Xwt/ComboBox.cs
index 596926d..a095f7b 100644
--- a/external/xwt/Xwt/Xwt/ComboBox.cs
+++ b/external/xwt/Xwt/Xwt/ComboBox.cs
@@ -25,10 +25,12 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+using System.ComponentModel;
+
namespace Xwt
{
+ [BackendType (typeof(IComboBoxBackend))]
public class ComboBox: Widget
{
CellViewCollection views;
@@ -76,6 +78,7 @@ namespace Xwt
get { return views; }
}
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public ItemCollection Items {
get {
if (itemCollection == null) {
@@ -89,9 +92,12 @@ namespace Xwt
}
}
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public IListDataSource ItemsSource {
get { return source; }
set {
+ BackendHost.ToolkitEngine.ValidateObject (value);
+
if (source != null) {
source.RowChanged -= HandleModelChanged;
source.RowDeleted -= HandleModelChanged;
@@ -100,8 +106,8 @@ namespace Xwt
}
source = value;
- Backend.SetSource (source, source is IFrontend ? (IBackend) WidgetRegistry.GetBackend (source) : null);
-
+ Backend.SetSource (source, source is IFrontend ? (IBackend) Toolkit.GetBackend (source) : null);
+
if (source != null) {
source.RowChanged += HandleModelChanged;
source.RowDeleted += HandleModelChanged;
@@ -115,12 +121,14 @@ namespace Xwt
{
OnPreferredSizeChanged ();
}
-
+
+ [DefaultValue (-1)]
public int SelectedIndex {
get { return Backend.SelectedRow; }
set { Backend.SelectedRow = value; }
}
-
+
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public object SelectedItem {
get {
if (Backend.SelectedRow == -1)
@@ -128,10 +136,11 @@ namespace Xwt
return Items [Backend.SelectedRow];
}
set {
- SelectedIndex = Items.IndexOf (value);
+ SelectedIndex = Items.IndexOf (withItem: value);
}
}
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public string SelectedText {
get {
if (Backend.SelectedRow == -1)
@@ -139,10 +148,11 @@ namespace Xwt
return (string)Items.DataSource.GetValue (Backend.SelectedRow, 0);
}
set {
- SelectedIndex = Items.IndexOf (value);
+ SelectedIndex = Items.IndexOf (withLabel: value);
}
}
+ [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public Func<int,bool> RowSeparatorCheck {
get; set;
}
diff --git a/external/xwt/Xwt/Xwt/ComboBoxCellView.cs b/external/xwt/Xwt/Xwt/ComboBoxCellView.cs
index 5dfb728..434286f 100644
--- a/external/xwt/Xwt/Xwt/ComboBoxCellView.cs
+++ b/external/xwt/Xwt/Xwt/ComboBoxCellView.cs
@@ -32,7 +32,7 @@ using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace Xwt {
- public class ComboBoxCellView: CellView
+ public sealed class ComboBoxCellView: CellView
{
}
}
diff --git a/external/xwt/Xwt/Xwt/ComboBoxEntry.cs b/external/xwt/Xwt/Xwt/ComboBoxEntry.cs
index 1ae65a4..0499c93 100644
--- a/external/xwt/Xwt/Xwt/ComboBoxEntry.cs
+++ b/external/xwt/Xwt/Xwt/ComboBoxEntry.cs
@@ -28,10 +28,11 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IComboBoxEntryBackend))]
public class ComboBoxEntry: ComboBox
{
TextEntry entry;
- DataField textField;
+ IDataField<object> textField;
protected new class WidgetBackendHost: ComboBox.WidgetBackendHost
{
@@ -68,7 +69,7 @@ namespace Xwt
/// <value>
/// The text field.
/// </value>
- public DataField TextField {
+ public IDataField<object> TextField {
get { return textField; }
set {
textField = value;
diff --git a/external/xwt/Xwt/Xwt/Command.cs b/external/xwt/Xwt/Xwt/Command.cs
index 2588e3a..bbf5e53 100644
--- a/external/xwt/Xwt/Xwt/Command.cs
+++ b/external/xwt/Xwt/Xwt/Command.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Drawing;
namespace Xwt
{
@@ -39,7 +40,7 @@ namespace Xwt
public string Label { get; private set; }
- public string Icon { get; private set; }
+ public Image Icon { get; private set; }
public bool IsStockButton { get; private set; }
diff --git a/external/xwt/Xwt/Xwt/CursorType.cs b/external/xwt/Xwt/Xwt/CursorType.cs
index 32a6e11..4e2f062 100644
--- a/external/xwt/Xwt/Xwt/CursorType.cs
+++ b/external/xwt/Xwt/Xwt/CursorType.cs
@@ -24,26 +24,76 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using System.ComponentModel;
+using System.Windows.Markup;
+using System.Collections.Generic;
namespace Xwt
{
+ [TypeConverter (typeof(CursorTypeValueConverter))]
+ [ValueSerializer (typeof(CursorTypeValueSerializer))]
public class CursorType
{
- internal CursorType ()
+ string id;
+ static Dictionary<string,CursorType> cursors = new Dictionary<string, CursorType> ();
+
+ internal CursorType (string id)
{
// Maybe some day we'll support creating custom cursors
+ this.id = id;
+ cursors [id] = this;
+ }
+
+ public static readonly CursorType Arrow = new CursorType ("Arrow");
+ public static readonly CursorType IBeam = new CursorType ("IBeam");
+ public static readonly CursorType Crosshair = new CursorType ("Crosshair");
+ public static readonly CursorType ResizeLeft = new CursorType ("ResizeLeft");
+ public static readonly CursorType ResizeRight = new CursorType ("ResizeRight");
+ public static readonly CursorType ResizeLeftRight = new CursorType ("ResizeLeftRight");
+ public static readonly CursorType ResizeUp = new CursorType ("ResizeUp");
+ public static readonly CursorType ResizeDown = new CursorType ("ResizeDown");
+ public static readonly CursorType ResizeUpDown = new CursorType ("ResizeUpDown");
+ public static readonly CursorType Hand = new CursorType ("Hand");
+
+
+ class CursorTypeValueConverter: TypeConverter
+ {
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+ {
+ return destinationType == typeof(string);
+ }
+
+ public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
+ {
+ return sourceType == typeof(string);
+ }
}
- public static readonly CursorType Arrow = new CursorType ();
- public static readonly CursorType IBeam = new CursorType ();
- public static readonly CursorType Crosshair = new CursorType ();
- public static readonly CursorType ResizeLeft = new CursorType ();
- public static readonly CursorType ResizeRight = new CursorType ();
- public static readonly CursorType ResizeLeftRight = new CursorType ();
- public static readonly CursorType ResizeUp = new CursorType ();
- public static readonly CursorType ResizeDown = new CursorType ();
- public static readonly CursorType ResizeUpDown = new CursorType ();
- public static readonly CursorType Hand = new CursorType ();
+ class CursorTypeValueSerializer: ValueSerializer
+ {
+ public override bool CanConvertFromString (string value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override bool CanConvertToString (object value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override string ConvertToString (object value, IValueSerializerContext context)
+ {
+ CursorType s = (CursorType) value;
+ return s.id;
+ }
+
+ public override object ConvertFromString (string value, IValueSerializerContext context)
+ {
+ CursorType ct;
+ cursors.TryGetValue (value, out ct);
+ return ct;
+ }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/DataField.cs b/external/xwt/Xwt/Xwt/DataField.cs
index 5e615fb..39c1859 100644
--- a/external/xwt/Xwt/Xwt/DataField.cs
+++ b/external/xwt/Xwt/Xwt/DataField.cs
@@ -31,27 +31,33 @@ namespace Xwt
public interface IDataField
{
int Index { get; }
+ Type FieldType { get; }
}
- public abstract class DataField: IDataField
+ public interface IDataField<T>: IDataField
+ {
+ }
+
+ internal interface IDataFieldInternal
+ {
+ void SetIndex (int index);
+ }
+
+ public class DataField<T>: IDataField<T>, IDataFieldInternal
{
public DataField ()
{
Index = -1;
}
- public int Index { get; internal set; }
-
- public abstract Type FieldType { get; }
- }
-
- public class DataField<T>: DataField
- {
- public DataField ()
+ public int Index { get; private set; }
+
+ void IDataFieldInternal.SetIndex (int index)
{
+ Index = index;
}
- public override Type FieldType {
+ public virtual Type FieldType {
get { return typeof(T); }
}
}
diff --git a/external/xwt/Xwt/Xwt/DatePicker.cs b/external/xwt/Xwt/Xwt/DatePicker.cs
index 02e301e..b373776 100644
--- a/external/xwt/Xwt/Xwt/DatePicker.cs
+++ b/external/xwt/Xwt/Xwt/DatePicker.cs
@@ -35,6 +35,7 @@ namespace Xwt
DateTime
}
+ [BackendType (typeof(IDatePickerBackend))]
public class DatePicker : Widget
{
protected new class WidgetBackendHost: Widget.WidgetBackendHost, IDatePickerEventSink
diff --git a/external/xwt/Xwt/Xwt/Desktop.cs b/external/xwt/Xwt/Xwt/Desktop.cs
new file mode 100644
index 0000000..949ff85
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/Desktop.cs
@@ -0,0 +1,204 @@
+//
+// Desktop.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Linq;
+using System.Collections.ObjectModel;
+using Xwt.Backends;
+using System.IO;
+using System.Runtime.InteropServices;
+
+namespace Xwt
+{
+ /// <summary>
+ /// Provides information about the screens that compose the desktop
+ /// </summary>
+ public static class Desktop
+ {
+ static Screen[] screens;
+ static Screen primary;
+ static SystemBackend systemBackend;
+
+ static Desktop ()
+ {
+ if (Path.DirectorySeparatorChar == '\\') {
+ DesktopType = DesktopType.Windows;
+ systemBackend = new WindowsSystemBackend ();
+ } else if (IsRunningOnMac ()) {
+ DesktopType = DesktopType.Mac;
+ systemBackend = new MacSystemBackend ();
+ } else {
+ DesktopType = DesktopType.Linux;
+ systemBackend = new GnomeSystemBackend ();
+ }
+ }
+
+ //From Managed.Windows.Forms/XplatUI
+ static bool IsRunningOnMac ()
+ {
+ IntPtr buf = IntPtr.Zero;
+ try {
+ buf = Marshal.AllocHGlobal (8192);
+ // This is a hacktastic way of getting sysname from uname ()
+ if (uname (buf) == 0) {
+ string os = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (buf);
+ if (os == "Darwin")
+ return true;
+ }
+ } catch {
+ } finally {
+ if (buf != IntPtr.Zero)
+ System.Runtime.InteropServices.Marshal.FreeHGlobal (buf);
+ }
+ return false;
+ }
+
+ [DllImport ("libc")]
+ static extern int uname (IntPtr buf);
+
+ public static DesktopType DesktopType { get; private set; }
+
+ /// <summary>
+ /// Occurs when there is some change in the geometry of the screens
+ /// </summary>
+ public static event EventHandler ScreensChanged;
+
+ internal static void NotifyScreensChanged ()
+ {
+ screens = null;
+ if (ScreensChanged != null)
+ ScreensChanged (null, EventArgs.Empty);
+ }
+
+ /// <summary>
+ /// Gets the current global mouse location.
+ /// </summary>
+ /// <returns>The mouse location.</returns>
+ public static Point MouseLocation {
+ get {
+ return Toolkit.CurrentEngine.DesktopBackend.GetMouseLocation ();
+ }
+ }
+
+ /// <summary>
+ /// List of screens that compose the desktop
+ /// </summary>
+ /// <value>The screens.</value>
+ public static ReadOnlyCollection<Screen> Screens {
+ get {
+ SetupScreens ();
+ return new ReadOnlyCollection<Screen> (screens);
+ }
+ }
+
+ static void SetupScreens ()
+ {
+ if (screens == null) {
+ screens = Toolkit.CurrentEngine.DesktopBackend.GetScreens ().Select (s => new Screen (s)).ToArray ();
+ primary = screens.FirstOrDefault (s => s.IsPrimary);
+ }
+ }
+
+ /// <summary>
+ /// Gets the primary screen.
+ /// </summary>
+ /// <remarks>
+ /// The primary screen is considered the screen where the 'main desktop' lives.
+ /// </remarks>
+ public static Screen PrimaryScreen {
+ get {
+ SetupScreens ();
+ return primary;
+ }
+ }
+
+ /// <summary>
+ /// Bounds of the desktop
+ /// </summary>
+ /// <remarks>
+ /// The bounds of the desktop is the union of the areas of all screens
+ /// </remarks>
+ public static Rectangle Bounds {
+ get {
+ Rectangle r = new Rectangle (0,0,0,0);
+ foreach (var s in Screens)
+ r = r.Union (s.Bounds);
+ return r;
+ }
+ }
+
+ /// <summary>
+ /// Gets the screen at location.
+ /// </summary>
+ /// <returns>The screen at location.</returns>
+ /// <param name="p">A point</param>
+ public static Screen GetScreenAtLocation (Point p)
+ {
+ return GetScreenAtLocation (p.X, p.Y);
+ }
+
+ /// <summary>
+ /// Gets the screen at location.
+ /// </summary>
+ /// <returns>The screen at location.</returns>
+ /// <param name="x">The x coordinate.</param>
+ /// <param name="y">The y coordinate.</param>
+ public static Screen GetScreenAtLocation (double x, double y)
+ {
+ return Screens.FirstOrDefault (s => s.Bounds.Contains (x, y));
+ }
+
+ internal static Screen GetScreen (object sb)
+ {
+ foreach (var s in Screens) {
+ var backend = Toolkit.GetBackend (s);
+ if (backend == sb || backend.Equals (sb))
+ return s;
+ }
+ return null;
+ }
+
+ public static void OpenFile (string filename)
+ {
+ systemBackend.OpenFile (filename);
+ }
+
+ public static void OpenFolder (string folderPath)
+ {
+ systemBackend.OpenFolder (folderPath);
+ }
+
+ public static void OpenUrl (string url)
+ {
+ systemBackend.OpenUrl (url);
+ }
+
+ public static void OpenUrl (Uri uri)
+ {
+ systemBackend.OpenUrl (uri.ToString ());
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/DesktopType.cs b/external/xwt/Xwt/Xwt/DesktopType.cs
new file mode 100644
index 0000000..c24d4c3
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/DesktopType.cs
@@ -0,0 +1,37 @@
+//
+// OperatingSystemType.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public enum DesktopType
+ {
+ Linux,
+ Windows,
+ Mac
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/Dialog.cs b/external/xwt/Xwt/Xwt/Dialog.cs
index 91b9b4b..41a4b1a 100644
--- a/external/xwt/Xwt/Xwt/Dialog.cs
+++ b/external/xwt/Xwt/Xwt/Dialog.cs
@@ -26,10 +26,11 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IDialogBackend))]
public class Dialog: Window
{
DialogButtonCollection commands;
@@ -94,8 +95,11 @@ namespace Xwt
public Command Run (WindowFrame parent)
{
- Toolkit.InvokePlatformCode (delegate {
- Backend.RunLoop ((IWindowFrameBackend) WidgetRegistry.GetBackend (parent));
+ BackendHost.ToolkitEngine.ValidateObject (parent);
+ AdjustSize ();
+
+ BackendHost.ToolkitEngine.InvokePlatformCode (delegate {
+ Backend.RunLoop ((IWindowFrameBackend) Toolkit.GetBackend (parent));
});
return resultCommand;
}
diff --git a/external/xwt/Xwt/Xwt/Distance.cs b/external/xwt/Xwt/Xwt/Distance.cs
index e29ebdc..9027c2a 100644
--- a/external/xwt/Xwt/Xwt/Distance.cs
+++ b/external/xwt/Xwt/Xwt/Distance.cs
@@ -25,6 +25,8 @@
// THE SOFTWARE.
using System;
+using System.ComponentModel;
+using System.Globalization;
namespace Xwt
{
@@ -32,14 +34,85 @@ namespace Xwt
{
double dx, dy;
+ public static readonly Distance Zero;
+
+ public Distance (double dx, double dy)
+ {
+ this.dx = dx;
+ this.dy = dy;
+ }
+
+ public bool IsZero {
+ get {
+ return ((dx == 0) && (dy == 0));
+ }
+ }
+
+ [DefaultValue (0d)]
public double Dx {
- get { return dx; }
- set { dx = value; }
+ get {
+ return dx;
+ }
+ set {
+ dx = value;
+ }
}
+ [DefaultValue (0d)]
public double Dy {
- get { return dy; }
- set { dy = value; }
+ get {
+ return dy;
+ }
+ set {
+ dy = value;
+ }
+ }
+
+ public static Distance operator + (Distance d1, Distance d2)
+ {
+ return new Distance (d1.dx + d2.dx, d1.dy + d2.dy);
+ }
+
+ public static Distance operator - (Distance d1, Distance d2)
+ {
+ return new Distance (d1.dx - d2.dx, d1.dy - d2.dy);
+ }
+
+ public static bool operator == (Distance d1, Distance d2)
+ {
+ return (d1.dx == d2.dx) && (d1.dy == d2.dy);
+ }
+
+ public static bool operator != (Distance d1, Distance d2)
+ {
+ return (d1.dx != d2.dx) || (d1.dy != d2.dy);
+ }
+
+ public static explicit operator Point (Distance distance)
+ {
+ return new Point (distance.dx, distance.dx);
+ }
+
+ public static explicit operator Size (Distance distance)
+ {
+ return new Size (distance.dx, distance.dx);
+ }
+
+ public override bool Equals (object ob)
+ {
+ return (ob is Distance) && this == (Distance)ob;
+ }
+
+ public override int GetHashCode ()
+ {
+ unchecked {
+ return (dx.GetHashCode () * 397) ^ dy.GetHashCode ();
+ }
+ }
+
+ public override string ToString ()
+ {
+ return String.Format ("{{Dx={0} Dy={1}}}", dx.ToString (CultureInfo.InvariantCulture), dy.ToString (CultureInfo.InvariantCulture));
}
}
}
diff --git a/external/xwt/Xwt/Xwt/DragOperation.cs b/external/xwt/Xwt/Xwt/DragOperation.cs
index 61f4a88..cf97bae 100644
--- a/external/xwt/Xwt/Xwt/DragOperation.cs
+++ b/external/xwt/Xwt/Xwt/DragOperation.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Xwt.Drawing;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
@@ -73,6 +73,7 @@ namespace Xwt
{
if (started)
throw new InvalidOperationException ("The drag image must be set before starting the drag operation");
+ source.Surface.ToolkitEngine.ValidateObject (image);
this.image = image;
this.hotX = hotX;
this.hotY = hotY;
@@ -94,7 +95,9 @@ namespace Xwt
internal DragStartData GetStartData ()
{
- return new DragStartData (data, action, WidgetRegistry.GetBackend (image), hotX, hotY);
+ if (image == null)
+ throw new InvalidOperationException ("The drag image must be set before starting the drag operation");
+ return new DragStartData (data, action, image.ToBitmap ().GetBackend (), hotX, hotY);
}
}
diff --git a/external/xwt/Xwt/Xwt/Expander.cs b/external/xwt/Xwt/Xwt/Expander.cs
index 986532a..1f8e064 100644
--- a/external/xwt/Xwt/Xwt/Expander.cs
+++ b/external/xwt/Xwt/Xwt/Expander.cs
@@ -2,9 +2,12 @@ using System;
using Xwt.Backends;
using System.ComponentModel;
using Xwt.Drawing;
+using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(IExpanderBackend))]
+ [ContentProperty("Content")]
public class Expander: Widget
{
EventHandler expandChanged;
@@ -31,24 +34,29 @@ namespace Xwt
{
}
+ [DefaultValue ("")]
public string Label {
get {
- return Backend.Label;
+ return Backend.Label ?? "";
}
set {
Backend.Label = value;
+ OnPreferredSizeChanged ();
}
}
+ [DefaultValue (false)]
public bool Expanded {
get {
return Backend.Expanded;
}
set {
Backend.Expanded = value;
+ OnPreferredSizeChanged ();
}
}
+ [DefaultValue (null)]
public new Widget Content {
get { return child; }
set {
diff --git a/external/xwt/Xwt/Xwt/FileDialog.cs b/external/xwt/Xwt/Xwt/FileDialog.cs
index 41b0178..6bae1ce 100644
--- a/external/xwt/Xwt/Xwt/FileDialog.cs
+++ b/external/xwt/Xwt/Xwt/FileDialog.cs
@@ -26,11 +26,11 @@
using System;
using Xwt.Backends;
using System.ComponentModel;
-using Xwt.Engine;
+
namespace Xwt
{
- public class FileDialog: Component
+ public abstract class FileDialog: XwtComponent
{
FileDialogFilterCollection filters;
bool running;
@@ -42,13 +42,9 @@ namespace Xwt
string fileName;
string[] fileNames = new string[0];
- BackendHost<FileDialog,IFileDialogBackend> backendHost;
-
internal FileDialog ()
{
filters = new FileDialogFilterCollection (AddRemoveItem);
- backendHost = new BackendHost<FileDialog,IFileDialogBackend> ();
- backendHost.Parent = this;
}
internal FileDialog (string title): this ()
@@ -57,7 +53,7 @@ namespace Xwt
}
IFileDialogBackend Backend {
- get { return backendHost.Backend; }
+ get { return (IFileDialogBackend) base.BackendHost.Backend; }
}
void AddRemoveItem (FileDialogFilter filter, bool added)
@@ -186,7 +182,7 @@ namespace Xwt
Backend.ActiveFilter = activeFilter;
if (!string.IsNullOrEmpty (title))
Backend.Title = title;
- return Backend.Run ((IWindowFrameBackend)WidgetRegistry.GetBackend (parentWindow));
+ return Backend.Run ((IWindowFrameBackend)BackendHost.ToolkitEngine.GetSafeBackend (parentWindow));
} finally {
currentFolder = Backend.CurrentFolder;
activeFilter = Backend.ActiveFilter;
diff --git a/external/xwt/Xwt/Xwt/FormattedText.cs b/external/xwt/Xwt/Xwt/FormattedText.cs
new file mode 100644
index 0000000..8dd7981
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/FormattedText.cs
@@ -0,0 +1,288 @@
+//
+// FormattedText.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Drawing;
+using System.Text;
+using System.Globalization;
+
+namespace Xwt
+{
+ public class FormattedText
+ {
+ List<TextAttribute> attributes = new List<TextAttribute> ();
+
+ public List<TextAttribute> Attributes {
+ get { return attributes; }
+ }
+
+ public string Text { get; set; }
+
+ class SpanInfo: List<TextAttribute>
+ {
+ public string Tag;
+ }
+
+ public static FormattedText FromMarkup (string markup)
+ {
+ FormattedText t = new FormattedText ();
+ t.ParseMarkup (markup);
+ return t;
+ }
+
+ void ParseMarkup (string markup)
+ {
+ Stack<SpanInfo> formatStack = new Stack<SpanInfo> ();
+ StringBuilder sb = new StringBuilder ();
+ int last = 0;
+ int i = markup.IndexOf ('<');
+ while (i != -1) {
+ sb.Append (markup, last, i - last);
+ if (PushSpan (formatStack, markup, sb.Length, ref i)) {
+ last = i;
+ i = markup.IndexOf ('<', i);
+ continue;
+ }
+ if (PopSpan (formatStack, markup, sb.Length, ref i)) {
+ last = i;
+ i = markup.IndexOf ('<', i);
+ continue;
+ }
+ last = i;
+ i = markup.IndexOf ('<', i + 1);
+ }
+ sb.Append (markup.Substring (last, markup.Length - last));
+ Text = sb.ToString ();
+ }
+
+ bool PushSpan (Stack<SpanInfo> formatStack, string markup, int textIndex, ref int i)
+ {
+ // <span kk="jj">
+
+ int k = i;
+ k++; // Skip the <
+
+ string tag;
+ if (!ReadId (markup, ref k, out tag))
+ return false;
+
+ SpanInfo span = new SpanInfo ();
+ span.Tag = tag;
+
+ switch (tag) {
+ case "b":
+ span.Add (new FontWeightTextAttribute () { Weight = FontWeight.Bold });
+ break;
+ case "i":
+ span.Add (new FontStyleTextAttribute () { Style = FontStyle.Italic });
+ break;
+ case "s":
+ span.Add (new StrikethroughTextAttribute ());
+ break;
+ case "u":
+ span.Add (new UnderlineTextAttribute ());
+ break;
+ case "span":
+ ParseAttributes (span, markup, ref k);
+ break;
+// case "small":
+// case "big":
+// case "tt":
+ }
+ if (span.Count == 0)
+ return false;
+
+ if (!ReadCharToken (markup, '>', ref k))
+ return false;
+
+ foreach (var att in span)
+ att.StartIndex = textIndex;
+
+ formatStack.Push (span);
+ i = k;
+ return true;
+ }
+
+ bool PopSpan (Stack<SpanInfo> formatStack, string markup, int textIndex, ref int i)
+ {
+ if (formatStack.Count == 0)
+ return false;
+
+ int k = i;
+ k++; // Skip the <
+
+ if (!ReadCharToken (markup, '/', ref k))
+ return false;
+
+ string tag;
+ if (!ReadId (markup, ref k, out tag))
+ return false;
+
+ // Make sure the closing tag matches the opened tag
+ if (!string.Equals (tag, formatStack.Peek ().Tag, StringComparison.InvariantCultureIgnoreCase))
+ return false;
+
+ if (!ReadCharToken (markup, '>', ref k))
+ return false;
+
+ var span = formatStack.Pop ();
+ foreach (var attr in span) {
+ attr.Count = textIndex - attr.StartIndex;
+ if (attr.Count > 0)
+ attributes.Add (attr);
+ }
+ i = k;
+ return true;
+ }
+
+ bool ParseAttributes (SpanInfo span, string markup, ref int i)
+ {
+ int k = i;
+
+ while (true) {
+ string name;
+ if (!ReadId (markup, ref k, out name))
+ return true; // No more attributes
+
+ if (!ReadCharToken (markup, '=', ref k))
+ return false;
+
+ char endChar;
+ if (ReadCharToken (markup, '"', ref k))
+ endChar = '"';
+ else if (ReadCharToken (markup, '\'', ref k))
+ endChar = '\'';
+ else
+ return false;
+
+ int n = markup.IndexOf (endChar, k);
+ if (n == -1)
+ return false;
+
+ string val = markup.Substring (k, n - k);
+ var attr = CreateAttribute (name, val);
+ if (attr != null) {
+ i = n + 1;
+ span.Add (attr);
+ }
+ else
+ return false;
+ }
+ }
+
+ TextAttribute CreateAttribute (string name, string val)
+ {
+ switch (name) {
+ case "font":
+ case "font_desc":
+ return new FontTextAttribute () { Font = Font.FromName (val) };
+
+/* case "size":
+ case "font_size":
+ double s;
+ if (!double.TryParse (val, NumberStyles.Any, CultureInfo.InvariantCulture, out s))
+ return null;
+ return new FontSizeTextAttribute () { Size = s };
+*/
+ case "font_weight":
+ case "weight":
+ FontWeight w;
+ if (!Enum.TryParse<FontWeight> (val, true, out w))
+ return null;
+ return new FontWeightTextAttribute () { Weight = w };
+
+ case "foreground":
+ case "fgcolor":
+ case "color":
+ Color c;
+ if (!Color.TryParse (val, out c))
+ return null;
+ return new ColorTextAttribute () { Color = c };
+
+ case "background":
+ case "bgcolor":
+ Color bc;
+ if (!Color.TryParse (val, out bc))
+ return null;
+ return new BackgroundTextAttribute () { Color = bc };
+
+ case "underline":
+ return new UnderlineTextAttribute ();
+
+ case "strikethrough":
+ return new StrikethroughTextAttribute ();
+ }
+ return null;
+ }
+
+ bool ReadId (string markup, ref int i, out string tag)
+ {
+ tag = null;
+
+ int k = i;
+ if (!SkipWhitespace (markup, ref k))
+ return false;
+
+ var start = k;
+ while (k < markup.Length) {
+ char c = markup [k];
+ if (!char.IsLetterOrDigit (c) && c != '_' && c != '-')
+ break;
+ k++;
+ }
+ if (start == k)
+ return false;
+
+ tag = markup.Substring (start, k - start);
+ i = k;
+ return true;
+ }
+
+ bool ReadCharToken (string markup, char c, ref int i)
+ {
+ int k = i;
+ if (!SkipWhitespace (markup, ref k))
+ return false;
+
+ if (markup [k] == c) {
+ i = k + 1;
+ return true;
+ } else
+ return false;
+ }
+
+ bool SkipWhitespace (string markup, ref int k)
+ {
+ while (k < markup.Length) {
+ if (!char.IsWhiteSpace (markup [k]))
+ return true;
+ k++;
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/Frame.cs b/external/xwt/Xwt/Xwt/Frame.cs
index 0b7e01a..c0f1d12 100644
--- a/external/xwt/Xwt/Xwt/Frame.cs
+++ b/external/xwt/Xwt/Xwt/Frame.cs
@@ -27,9 +27,12 @@ using System;
using Xwt.Backends;
using System.ComponentModel;
using Xwt.Drawing;
+using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(IFrameBackend))]
+ [ContentProperty("Content")]
public class Frame: Widget
{
Widget child;
@@ -90,6 +93,7 @@ namespace Xwt
}
}
+ [DefaultValue (0d)]
public double PaddingLeft {
get { return padding.Left; }
set {
@@ -98,6 +102,7 @@ namespace Xwt
}
}
+ [DefaultValue (0d)]
public double PaddingRight {
get { return padding.Right; }
set {
@@ -106,6 +111,7 @@ namespace Xwt
}
}
+ [DefaultValue (0d)]
public double PaddingTop {
get { return padding.Top; }
set {
@@ -114,6 +120,7 @@ namespace Xwt
}
}
+ [DefaultValue (0d)]
public double PaddingBottom {
get { return padding.Bottom; }
set {
@@ -132,39 +139,43 @@ namespace Xwt
get { return borderWidth; }
set {
borderWidth = value;
- UpdatePadding ();
+ UpdateBorderWidth ();
}
}
+ [DefaultValue (0d)]
public double BorderWidthLeft {
get { return borderWidth.Left; }
set {
borderWidth.Left = value;
- UpdatePadding ();
+ UpdateBorderWidth ();
}
}
+ [DefaultValue (0d)]
public double BorderWidthRight {
get { return borderWidth.Right; }
set {
borderWidth.Right = value;
- UpdatePadding ();
+ UpdateBorderWidth ();
}
}
+ [DefaultValue (0d)]
public double BorderWidthTop {
get { return borderWidth.Top; }
set {
borderWidth.Top = value;
- UpdatePadding ();
+ UpdateBorderWidth ();
}
}
+ [DefaultValue (0d)]
public double BorderWidthBottom {
get { return borderWidth.Bottom; }
set {
borderWidth.Bottom = value;
- UpdatePadding ();
+ UpdateBorderWidth ();
}
}
@@ -178,7 +189,8 @@ namespace Xwt
get { return Backend.BorderColor; }
set { Backend.BorderColor = value; }
}
-
+
+ [DefaultValue (null)]
public new Widget Content {
get { return child; }
set {
diff --git a/external/xwt/Xwt/Xwt/HScrollbar.cs b/external/xwt/Xwt/Xwt/HScrollbar.cs
new file mode 100644
index 0000000..3b5ad4a
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/HScrollbar.cs
@@ -0,0 +1,37 @@
+//
+// HScrollbar.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class HScrollbar: Scrollbar
+ {
+ public HScrollbar (): base (Xwt.Backends.Orientation.Horizontal)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/HSlider.cs b/external/xwt/Xwt/Xwt/HSlider.cs
new file mode 100644
index 0000000..590f88a
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/HSlider.cs
@@ -0,0 +1,38 @@
+//
+// HSlider.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt
+{
+ public class HSlider: Slider
+ {
+ public HSlider (): base (Orientation.Horizontal)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/IListDataSource.cs b/external/xwt/Xwt/Xwt/IListDataSource.cs
index cb77c12..64c3667 100644
--- a/external/xwt/Xwt/Xwt/IListDataSource.cs
+++ b/external/xwt/Xwt/Xwt/IListDataSource.cs
@@ -114,5 +114,19 @@ namespace Xwt
private set;
}
}
+
+ /// <summary>
+ /// Data source for cell views
+ /// </summary>
+ /// <remarks>Provides the data required for filling the content of a cell</remarks>
+ public interface ICellDataSource
+ {
+ /// <summary>
+ /// Gets the value of a field
+ /// </summary>
+ /// <returns>The value.</returns>
+ /// <param name="field">Field.</param>
+ object GetValue (IDataField field);
+ }
}
diff --git a/external/xwt/Xwt/Xwt/IWidgetSurface.cs b/external/xwt/Xwt/Xwt/IWidgetSurface.cs
index fc33223..7767a63 100644
--- a/external/xwt/Xwt/Xwt/IWidgetSurface.cs
+++ b/external/xwt/Xwt/Xwt/IWidgetSurface.cs
@@ -27,55 +27,49 @@
using System;
using System.Collections.Generic;
+
namespace Xwt
{
public interface IWidgetSurface
{
void Reallocate ();
- SizeRequestMode SizeRequestMode { get; }
-
- /// <summary>
- /// Gets the preferred width of the widget (includes the margin)
- /// </summary>
- /// <returns>
- /// The preferred width.
- /// </returns>
- WidgetSize GetPreferredWidth ();
-
/// <summary>
- /// Gets the preferred height of the widget (includes the margin)
+ /// Gets the preferred size of the widget
/// </summary>
/// <returns>
- /// The preferred height.
+ /// The preferred size.
/// </returns>
- WidgetSize GetPreferredHeight ();
+ /// <remarks>
+ /// The returned size is >= 0. If a constraint is specified, the returned size will not
+ /// be bigger than the constraint.
+ /// </remarks>
+ Size GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint, bool includeMargin = false);
/// <summary>
- /// Gets the preferred height for a given width (includes the margin). Called only when using HeightForWidth size request mode.
+ /// Gets the preferred size of the widget
/// </summary>
/// <returns>
- /// The preferred height
+ /// The preferred size.
/// </returns>
- /// <param name='width'>
- /// Width.
- /// </param>
- WidgetSize GetPreferredHeightForWidth (double width);
-
- /// <summary>
- /// Gets the preferred width for a given height (includes the margin). Called only when using WidthForHeight size request mode.
- /// </summary>
- /// <returns>
- /// The preferred width
- /// </returns>
- /// <param name='height'>
- /// Height.
- /// </param>
- ///
- WidgetSize GetPreferredWidthForHeight (double height);
-
+ /// <remarks>
+ /// The returned size is >= 0
+ /// </remarks>
+ Size GetPreferredSize (bool includeMargin = false);
+
object NativeWidget { get; }
+
IEnumerable<Widget> Children { get; }
+
+ Toolkit ToolkitEngine { get; }
+
+ /// <summary>
+ /// Given a rectangle that defines the available area for a widget, returns the area that the widget will fill,
+ /// taking into account the margin and alignment settings.
+ /// </summary>
+ /// <returns>The placement in rect.</returns>
+ /// <param name="rect">Rect.</param>
+ Rectangle GetPlacementInRect (Rectangle rect);
}
}
diff --git a/external/xwt/Xwt/Xwt/IconTextCellView.cs b/external/xwt/Xwt/Xwt/IconTextCellView.cs
deleted file mode 100644
index f084813..0000000
--- a/external/xwt/Xwt/Xwt/IconTextCellView.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// IconTextCellView.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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 Xwt.Drawing;
-using System.Collections.ObjectModel;
-using System.Collections.Generic;
-
-namespace Xwt
-{
- public class IconTextCellView: CellView
- {
- public DataField TextColumn { get; set; }
- public DataField DescriptionColumn { get; set; }
- public DataField ImageColumn { get; set; }
- }
-}
diff --git a/external/xwt/Xwt/Xwt/ImageCellView.cs b/external/xwt/Xwt/Xwt/ImageCellView.cs
index ba49e40..9bf110d 100644
--- a/external/xwt/Xwt/Xwt/ImageCellView.cs
+++ b/external/xwt/Xwt/Xwt/ImageCellView.cs
@@ -25,21 +25,37 @@
// THE SOFTWARE.
using System;
+using Xwt.Drawing;
+using System.ComponentModel;
+using Xwt.Backends;
namespace Xwt
{
- public class ImageCellView: CellView
+ public sealed class ImageCellView: CellView, IImageCellViewFrontend
{
+ Image image;
+
public ImageCellView ()
{
}
- public ImageCellView (DataField imageField)
+ public ImageCellView (IDataField<Image> imageField)
{
ImageField = imageField;
}
- public DataField ImageField { get; set; }
+ public ImageCellView (Image image)
+ {
+ this.image = image;
+ }
+
+ public IDataField<Image> ImageField { get; set; }
+
+ [DefaultValue (null)]
+ public Image Image {
+ get { return GetValue (ImageField, image); }
+ set { image = value; }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ImageView.cs b/external/xwt/Xwt/Xwt/ImageView.cs
index 8981994..7fe0daa 100644
--- a/external/xwt/Xwt/Xwt/ImageView.cs
+++ b/external/xwt/Xwt/Xwt/ImageView.cs
@@ -26,9 +26,11 @@
using System;
using Xwt.Drawing;
using Xwt.Backends;
+using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(IImageViewBackend))]
public class ImageView: Widget
{
Image image;
@@ -45,12 +47,13 @@ namespace Xwt
IImageViewBackend Backend {
get { return (IImageViewBackend) BackendHost.Backend; }
}
-
+
+ [DefaultValue (null)]
public Image Image {
get { return image; }
set {
image = value;
- Backend.SetImage (XwtObject.GetBackend (value));
+ Backend.SetImage (image != null ? image.ImageDescription : ImageDescription.Null);
OnPreferredSizeChanged ();
}
}
diff --git a/external/xwt/Xwt/Xwt/ItemCollection.cs b/external/xwt/Xwt/Xwt/ItemCollection.cs
index f09a5bc..2b65bde 100644
--- a/external/xwt/Xwt/Xwt/ItemCollection.cs
+++ b/external/xwt/Xwt/Xwt/ItemCollection.cs
@@ -50,6 +50,14 @@ namespace Xwt
store = new ListStore (labelField, dataField);
}
+ internal DataField<string> LabelField {
+ get { return labelField; }
+ }
+
+ internal DataField<object> DataField {
+ get { return dataField; }
+ }
+
public void Add (object item, string label)
{
Add (new ItemWithLabel () { Item = item, Label = label });
@@ -75,6 +83,18 @@ namespace Xwt
store.SetValue (index, dataField, item);
}
}
+
+ public int IndexOf (object withItem = null, string withLabel = null)
+ {
+ for (int i = 0; i < Count; i++) {
+ if (withItem != null && withItem.Equals (store.GetValue (i, dataField)))
+ return i;
+ if (withLabel != null && withLabel.Equals (store.GetValue (i, labelField)))
+ return i;
+ }
+
+ return -1;
+ }
protected override void RemoveItem (int index)
{
diff --git a/external/xwt/Xwt/Xwt/Label.cs b/external/xwt/Xwt/Xwt/Label.cs
index d60c85a..de385aa 100755
--- a/external/xwt/Xwt/Xwt/Label.cs
+++ b/external/xwt/Xwt/Xwt/Label.cs
@@ -27,9 +27,11 @@
using System;
using Xwt.Drawing;
using Xwt.Backends;
+using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(ILabelBackend))]
public class Label: Widget
{
ILabelBackend Backend {
@@ -44,7 +46,8 @@ namespace Xwt
{
Backend.Text = text;
}
-
+
+ [DefaultValue ("")]
public string Text {
get { return Backend.Text; }
set {
@@ -53,11 +56,22 @@ namespace Xwt
}
}
+ string markup;
+ public string Markup {
+ get { return markup; }
+ set {
+ markup = value;
+ var t = FormattedText.FromMarkup (markup);
+ Backend.SetFormattedText (t);
+ }
+ }
+
public Color TextColor {
get { return Backend.TextColor; }
set { Backend.TextColor = value; }
}
-
+
+ [DefaultValue (Alignment.Start)]
public Alignment TextAlignment {
get { return Backend.TextAlignment; }
set {
@@ -66,6 +80,7 @@ namespace Xwt
}
}
+ [DefaultValue (EllipsizeMode.None)]
public EllipsizeMode Ellipsize {
get { return Backend.Ellipsize; }
set {
@@ -74,6 +89,7 @@ namespace Xwt
}
}
+ [DefaultValue (WrapMode.None)]
public WrapMode Wrap {
get { return Backend.Wrap; }
set {
diff --git a/external/xwt/Xwt/Xwt/LinkLabel.cs b/external/xwt/Xwt/Xwt/LinkLabel.cs
index d950611..61731d0 100644
--- a/external/xwt/Xwt/Xwt/LinkLabel.cs
+++ b/external/xwt/Xwt/Xwt/LinkLabel.cs
@@ -50,6 +50,7 @@ namespace Xwt
}
}
+ [BackendType (typeof(ILinkLabelBackend))]
public class LinkLabel: Label
{
protected new class WidgetBackendHost : Label.WidgetBackendHost, ILinkLabelEventSink
@@ -113,8 +114,10 @@ namespace Xwt
if (navigateToUrl != null)
navigateToUrl (this, e);
- // this method checks for e.Handled
- Application.EngineBackend.ShowWebBrowser (e);
+ if (!e.Handled && e.Uri != null) {
+ Desktop.OpenUrl (e.Uri);
+ e.SetHandled ();
+ }
}
static void DummyHandleNavigateToUrl (object sender, NavigateToUrlEventArgs e)
diff --git a/external/xwt/Xwt/Xwt/ListBox.cs b/external/xwt/Xwt/Xwt/ListBox.cs
index 4efae33..e7d5b9c 100644
--- a/external/xwt/Xwt/Xwt/ListBox.cs
+++ b/external/xwt/Xwt/Xwt/ListBox.cs
@@ -26,13 +26,14 @@
using System;
using Xwt.Backends;
using System.ComponentModel;
-using Xwt.Engine;
+
namespace Xwt
{
/// <summary>
/// A list of selectable items
/// </summary>
+ [BackendType (typeof(IListBoxBackend))]
public class ListBox: Widget
{
CellViewCollection views;
@@ -52,12 +53,23 @@ namespace Xwt
((ListBox)Parent).OnSelectionChanged (EventArgs.Empty);
}
+ public void OnRowActivated (int rowIndex)
+ {
+ ((ListBox)Parent).OnRowActivated (new ListViewRowEventArgs (rowIndex));
+ }
+
public override Size GetDefaultNaturalSize ()
{
return Xwt.Backends.DefaultNaturalSizes.ComboBox;
}
}
+ static ListBox ()
+ {
+ MapEvent (TableViewEvent.SelectionChanged, typeof(ListView), "OnSelectionChanged");
+ MapEvent (ListViewEvent.RowActivated, typeof(ListView), "OnRowActivated");
+ }
+
IListBoxBackend Backend {
get { return (IListBoxBackend) BackendHost.Backend; }
}
@@ -90,6 +102,8 @@ namespace Xwt
if (itemCollection == null) {
itemCollection = new ItemCollection ();
DataSource = itemCollection.DataSource;
+ views.Clear ();
+ views.Add (new TextCellView (itemCollection.LabelField));
} else {
if (DataSource != itemCollection.DataSource)
throw new InvalidOperationException ("The Items collection can't be used when a custom DataSource is set");
@@ -110,6 +124,7 @@ namespace Xwt
public IListDataSource DataSource {
get { return source; }
set {
+ BackendHost.ToolkitEngine.ValidateObject (value);
if (source != null) {
source.RowChanged -= HandleModelChanged;
source.RowDeleted -= HandleModelChanged;
@@ -118,8 +133,8 @@ namespace Xwt
}
source = value;
- Backend.SetSource (source, source is IFrontend ? (IBackend) WidgetRegistry.GetBackend (source) : null);
-
+ Backend.SetSource (source, source is IFrontend ? (IBackend) Toolkit.GetBackend (source) : null);
+
if (source != null) {
source.RowChanged += HandleModelChanged;
source.RowDeleted += HandleModelChanged;
@@ -272,12 +287,12 @@ namespace Xwt
/// </summary>
public event EventHandler SelectionChanged {
add {
- BackendHost.OnBeforeEventAdd (ListBoxEvent.SelectionChanged, selectionChanged);
+ BackendHost.OnBeforeEventAdd (TableViewEvent.SelectionChanged, selectionChanged);
selectionChanged += value;
}
remove {
selectionChanged -= value;
- BackendHost.OnAfterEventRemove (ListBoxEvent.SelectionChanged, selectionChanged);
+ BackendHost.OnAfterEventRemove (TableViewEvent.SelectionChanged, selectionChanged);
}
}
@@ -292,6 +307,32 @@ namespace Xwt
if (selectionChanged != null)
selectionChanged (this, args);
}
+
+ /// <summary>
+ /// Raises the row activated event.
+ /// </summary>
+ /// <param name="a">The alpha component.</param>
+ protected virtual void OnRowActivated (ListViewRowEventArgs a)
+ {
+ if (rowActivated != null)
+ rowActivated (this, a);
+ }
+
+ EventHandler<ListViewRowEventArgs> rowActivated;
+
+ /// <summary>
+ /// Occurs when the user double-clicks on a row
+ /// </summary>
+ public event EventHandler<ListViewRowEventArgs> RowActivated {
+ add {
+ BackendHost.OnBeforeEventAdd (ListViewEvent.RowActivated, rowActivated);
+ rowActivated += value;
+ }
+ remove {
+ rowActivated -= value;
+ BackendHost.OnAfterEventRemove (ListViewEvent.RowActivated, rowActivated);
+ }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ListStore.cs b/external/xwt/Xwt/Xwt/ListStore.cs
index 013867f..7a2a18d 100644
--- a/external/xwt/Xwt/Xwt/ListStore.cs
+++ b/external/xwt/Xwt/Xwt/ListStore.cs
@@ -29,11 +29,13 @@ using Xwt.Backends;
using System.Linq;
using System.Collections.Generic;
+
namespace Xwt
{
+ [BackendType (typeof(IListStoreBackend))]
public class ListStore: XwtComponent, IListDataSource
{
- DataField[] fields;
+ IDataField[] fields;
class ListStoreBackendHost: BackendHost<ListStore,IListStoreBackend>
{
@@ -49,12 +51,12 @@ namespace Xwt
return new ListStoreBackendHost ();
}
- public ListStore (params DataField[] fields)
+ public ListStore (params IDataField[] fields)
{
for (int n=0; n<fields.Length; n++) {
if (fields[n].Index != -1)
throw new InvalidOperationException ("DataField object already belongs to another data store");
- fields[n].Index = n;
+ ((IDataFieldInternal)fields[n]).SetIndex (n);
}
this.fields = fields;
}
@@ -73,12 +75,12 @@ namespace Xwt
}
}
- public T GetValue<T> (int row, DataField<T> column)
+ public T GetValue<T> (int row, IDataField<T> column)
{
return (T) Backend.GetValue (row, column.Index);
}
- public void SetValue<T> (int row, DataField<T> column, T value)
+ public void SetValue<T> (int row, IDataField<T> column, T value)
{
Backend.SetValue (row, column.Index, value);
}
@@ -152,7 +154,7 @@ namespace Xwt
public event EventHandler<ListRowEventArgs> RowChanged;
public event EventHandler<ListRowOrderEventArgs> RowsReordered;
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
diff --git a/external/xwt/Xwt/Xwt/ListView.cs b/external/xwt/Xwt/Xwt/ListView.cs
index 9a16623..92379a1 100644
--- a/external/xwt/Xwt/Xwt/ListView.cs
+++ b/external/xwt/Xwt/Xwt/ListView.cs
@@ -27,10 +27,11 @@
using System;
using Xwt.Backends;
using System.ComponentModel;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IListViewBackend))]
public class ListView: Widget, IColumnContainer, IScrollableWidget
{
ListViewColumnCollection columns;
@@ -47,9 +48,14 @@ namespace Xwt
public void OnSelectionChanged ()
{
- ((ListView)Parent).OnSelectionChanged (EventArgs.Empty);
+ Parent.OnSelectionChanged (EventArgs.Empty);
}
+ public void OnRowActivated (int rowIndex)
+ {
+ Parent.OnRowActivated (new ListViewRowEventArgs (rowIndex));
+ }
+
public override Size GetDefaultNaturalSize ()
{
return Xwt.Backends.DefaultNaturalSizes.ListView;
@@ -59,6 +65,7 @@ namespace Xwt
static ListView ()
{
MapEvent (TableViewEvent.SelectionChanged, typeof(ListView), "OnSelectionChanged");
+ MapEvent (ListViewEvent.RowActivated, typeof(ListView), "OnRowActivated");
}
public ListView (IListDataSource source): this ()
@@ -109,8 +116,8 @@ namespace Xwt
}
set {
if (dataSource != value) {
+ Backend.SetSource (value, value is IFrontend ? (IBackend)BackendHost.ToolkitEngine.GetSafeBackend (value) : null);
dataSource = value;
- Backend.SetSource (dataSource, dataSource is IFrontend ? (IBackend) WidgetRegistry.GetBackend (dataSource) : null);
}
}
}
@@ -192,7 +199,33 @@ namespace Xwt
selectionChanged -= value;
BackendHost.OnAfterEventRemove (TableViewEvent.SelectionChanged, selectionChanged);
}
- }
+ }
+
+ /// <summary>
+ /// Raises the row activated event.
+ /// </summary>
+ /// <param name="a">The alpha component.</param>
+ protected virtual void OnRowActivated (ListViewRowEventArgs a)
+ {
+ if (rowActivated != null)
+ rowActivated (this, a);
+ }
+
+ EventHandler<ListViewRowEventArgs> rowActivated;
+
+ /// <summary>
+ /// Occurs when the user double-clicks on a row
+ /// </summary>
+ public event EventHandler<ListViewRowEventArgs> RowActivated {
+ add {
+ BackendHost.OnBeforeEventAdd (ListViewEvent.RowActivated, rowActivated);
+ rowActivated += value;
+ }
+ remove {
+ rowActivated -= value;
+ BackendHost.OnAfterEventRemove (ListViewEvent.RowActivated, rowActivated);
+ }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ListViewColumn.cs b/external/xwt/Xwt/Xwt/ListViewColumn.cs
index db213a2..3172e5f 100644
--- a/external/xwt/Xwt/Xwt/ListViewColumn.cs
+++ b/external/xwt/Xwt/Xwt/ListViewColumn.cs
@@ -33,6 +33,22 @@ using System.ComponentModel;
namespace Xwt
{
+ /// <summary>
+ /// Determines the direction of a sort.
+ /// </summary>
+ public enum ColumnSortDirection
+ {
+ /// <summary>
+ /// Sorts the column in ascending order.
+ /// </summary>
+ Ascending,
+
+ /// <summary>
+ /// Sorts the column in descending order.
+ /// </summary>
+ Descending
+ }
+
public class ListViewColumn: ICellContainer
{
CellViewCollection views;
@@ -90,5 +106,70 @@ namespace Xwt
if (Parent != null)
Parent.UpdateColumn (this, Handle, ListViewColumnChange.Cells);
}
+
+ bool isResizeable;
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this column is user resizeable.
+ /// </summary>
+ /// <value><c>true</c> if this column is user resizeable; otherwise, <c>false</c>.</value>
+ public bool IsResizeable {
+ get {
+ return isResizeable;
+ }
+ set {
+ isResizeable = value;
+ if (Parent != null)
+ Parent.UpdateColumn (this, Handle, ListViewColumnChange.IsResizeable);
+ }
+ }
+
+ ColumnSortDirection sortDirection;
+
+ /// <summary>
+ /// The direction the sort indicator should show.
+ /// </summary>
+ public ColumnSortDirection SortDirection {
+ get {
+ return sortDirection;
+ }
+ set {
+ sortDirection = value;
+ if (Parent != null)
+ Parent.UpdateColumn (this, Handle, ListViewColumnChange.SortDirection);
+ }
+ }
+
+ IDataField sortDataField;
+
+ /// <summary>
+ /// The column that is used for sorting if the column is selected for sorting.
+ /// </summary>
+ public IDataField SortDataField {
+ get {
+ return sortDataField;
+ }
+ set {
+ sortDataField = value;
+ if (Parent != null)
+ Parent.UpdateColumn (this, Handle, ListViewColumnChange.SortDataField);
+ }
+ }
+
+ bool isSortIndicatorShown;
+
+ /// <summary>
+ /// Gets or sets a value indicating whether a sort indicator is shown.
+ /// </summary>
+ public bool IsSortIndicatorShown {
+ get {
+ return isSortIndicatorShown;
+ }
+ set {
+ isSortIndicatorShown = value;
+ if (Parent != null)
+ Parent.UpdateColumn (this, Handle, ListViewColumnChange.IsSortIndicatorShown);
+ }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ListViewColumnCollection.cs b/external/xwt/Xwt/Xwt/ListViewColumnCollection.cs
index 5561a8e..846ac2e 100644
--- a/external/xwt/Xwt/Xwt/ListViewColumnCollection.cs
+++ b/external/xwt/Xwt/Xwt/ListViewColumnCollection.cs
@@ -51,12 +51,28 @@ namespace Xwt
}
}
- public void Add (string title, params DataField[] fields)
+ public ListViewColumn Add (string title, params IDataField[] fields)
{
ListViewColumn col = new ListViewColumn (title);
foreach (var f in fields)
col.Views.Add (CellView.GetDefaultCellView (f));
- Add (col);
+ base.Add (col);
+ return col;
+ }
+
+ public ListViewColumn Add (string title, params CellView[] cells)
+ {
+ ListViewColumn col = new ListViewColumn (title);
+ foreach (var c in cells)
+ col.Views.Add (c);
+ base.Add (col);
+ return col;
+ }
+
+ public new ListViewColumn Add (ListViewColumn col)
+ {
+ base.Add (col);
+ return col;
}
protected override void InsertItem (int index, ListViewColumn item)
diff --git a/external/xwt/Xwt/Xwt/ListViewRowEventArgs.cs b/external/xwt/Xwt/Xwt/ListViewRowEventArgs.cs
new file mode 100644
index 0000000..fd27307
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/ListViewRowEventArgs.cs
@@ -0,0 +1,40 @@
+//
+// RowEventArgs.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class ListViewRowEventArgs: EventArgs
+ {
+ public ListViewRowEventArgs (int rowIndex)
+ {
+ RowIndex = rowIndex;
+ }
+
+ public int RowIndex { get; private set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/Menu.cs b/external/xwt/Xwt/Xwt/Menu.cs
index b3d6a74..93cd9b2 100644
--- a/external/xwt/Xwt/Xwt/Menu.cs
+++ b/external/xwt/Xwt/Xwt/Menu.cs
@@ -26,10 +26,11 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IMenuBackend))]
public class Menu: XwtComponent
{
MenuItemCollection items;
@@ -49,22 +50,31 @@ namespace Xwt
internal void InsertItem (int n, MenuItem item)
{
- Backend.InsertItem (n, (IMenuItemBackend)WidgetRegistry.GetBackend (item));
+ Backend.InsertItem (n, (IMenuItemBackend)BackendHost.ToolkitEngine.GetSafeBackend (item));
}
internal void RemoveItem (MenuItem item)
{
- Backend.RemoveItem ((IMenuItemBackend)WidgetRegistry.GetBackend (item));
+ Backend.RemoveItem ((IMenuItemBackend)BackendHost.ToolkitEngine.GetSafeBackend (item));
}
-
+
+ /// <summary>
+ /// Shows the menu at the current position of the cursor
+ /// </summary>
public void Popup ()
{
Backend.Popup ();
}
-
+
+ /// <summary>
+ /// Shows the menu at the specified location
+ /// </summary>
+ /// <param name="parentWidget">Widget upon which to show the menu</param>
+ /// <param name="x">The x coordinate, relative to the widget origin</param>
+ /// <param name="y">The y coordinate, relative to the widget origin</param>
public void Popup (Widget parentWidget, double x, double y)
{
- Backend.Popup ((IWidgetBackend)WidgetRegistry.GetBackend (parentWidget), x, y);
+ Backend.Popup ((IWidgetBackend)BackendHost.ToolkitEngine.GetSafeBackend (parentWidget), x, y);
}
/// <summary>
diff --git a/external/xwt/Xwt/Xwt/MenuButton.cs b/external/xwt/Xwt/Xwt/MenuButton.cs
index 9d887bc..6d9abef 100644
--- a/external/xwt/Xwt/Xwt/MenuButton.cs
+++ b/external/xwt/Xwt/Xwt/MenuButton.cs
@@ -26,10 +26,11 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IMenuButtonBackend))]
public class MenuButton: Button
{
Menu menu;
@@ -86,7 +87,11 @@ namespace Xwt
IMenuBackend CreateMenu ()
{
- return ((IMenuBackend)WidgetRegistry.GetBackend (OnCreateMenu()));
+ Menu menu = null;
+ BackendHost.ToolkitEngine.Invoke (delegate {
+ menu = OnCreateMenu();
+ });
+ return ((IMenuBackend)BackendHost.ToolkitEngine.GetSafeBackend (menu));
}
protected virtual Menu OnCreateMenu ()
diff --git a/external/xwt/Xwt/Xwt/MenuItem.cs b/external/xwt/Xwt/Xwt/MenuItem.cs
index ff33e12..b462779 100644
--- a/external/xwt/Xwt/Xwt/MenuItem.cs
+++ b/external/xwt/Xwt/Xwt/MenuItem.cs
@@ -28,10 +28,11 @@ using System;
using Xwt.Backends;
using System.ComponentModel;
using Xwt.Drawing;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IMenuItemBackend))]
public class MenuItem: XwtComponent, ICellContainer
{
CellViewCollection cells;
@@ -70,8 +71,7 @@ namespace Xwt
public MenuItem (Command command): this ()
{
Label = command.Label;
- if (!string.IsNullOrEmpty (command.Icon))
- Image = Image.FromIcon (command.Icon, IconSize.Small);
+ Image = command.Icon;
}
public MenuItem (string label): this ()
@@ -103,7 +103,7 @@ namespace Xwt
public Image Image {
get { return image; }
- set { image = value; Backend.SetImage (XwtObject.GetBackend (value)); }
+ set { image = value; Backend.SetImage (image != null ? image.ImageDescription : ImageDescription.Null); }
}
public void Show ()
@@ -127,8 +127,8 @@ namespace Xwt
public Menu SubMenu {
get { return subMenu; }
set {
+ Backend.SetSubmenu ((IMenuBackend)BackendHost.ToolkitEngine.GetSafeBackend (value));
subMenu = value;
- Backend.SetSubmenu ((IMenuBackend) WidgetRegistry.GetBackend (subMenu));
}
}
diff --git a/external/xwt/Xwt/Xwt/MessageDialog.cs b/external/xwt/Xwt/Xwt/MessageDialog.cs
index c8d5a7f..c3e1a79 100644
--- a/external/xwt/Xwt/Xwt/MessageDialog.cs
+++ b/external/xwt/Xwt/Xwt/MessageDialog.cs
@@ -26,7 +26,7 @@
using System;
using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
@@ -144,12 +144,12 @@ namespace Xwt
}
#endregion
- static Command GenericAlert (WindowFrame parent, string icon, string primaryText, string secondaryText, params Command[] buttons)
+ static Command GenericAlert (WindowFrame parent, Xwt.Drawing.Image icon, string primaryText, string secondaryText, params Command[] buttons)
{
return GenericAlert (parent, icon, primaryText, secondaryText, buttons.Length - 1, buttons);
}
- static Command GenericAlert (WindowFrame parent, string icon, string primaryText, string secondaryText, int defaultButton, params Command[] buttons)
+ static Command GenericAlert (WindowFrame parent, Xwt.Drawing.Image icon, string primaryText, string secondaryText, int defaultButton, params Command[] buttons)
{
GenericMessage message = new GenericMessage () {
Icon = icon,
@@ -167,9 +167,10 @@ namespace Xwt
{
if (message.ApplyToAllButton != null)
return message.ApplyToAllButton;
-
- IAlertDialogBackend backend = WidgetRegistry.CreateBackend<IAlertDialogBackend> (typeof(IAlertDialogBackend));
-
+
+ IAlertDialogBackend backend = Toolkit.CurrentEngine.Backend.CreateBackend<IAlertDialogBackend> ();
+ backend.Initialize (Toolkit.CurrentEngine.Context);
+
using (backend) {
var res = backend.Run (parent ?? RootWindow, message);
@@ -195,7 +196,7 @@ namespace Xwt
internal Command ApplyToAllButton { get; set; }
- public string Icon { get; set; }
+ public Xwt.Drawing.Image Icon { get; set; }
public string Text { get; set; }
public string SecondaryText { get; set; }
diff --git a/external/xwt/Xwt/Xwt/ModifierKeys.cs b/external/xwt/Xwt/Xwt/ModifierKeys.cs
index 8421e4d..852b8ba 100644
--- a/external/xwt/Xwt/Xwt/ModifierKeys.cs
+++ b/external/xwt/Xwt/Xwt/ModifierKeys.cs
@@ -27,13 +27,14 @@ using System;
namespace Xwt
{
+ [Flags]
public enum ModifierKeys
{
- None,
- Alt,
- Control,
- Shift,
- Command
+ None = 0,
+ Alt = 0x1 << 0,
+ Control = 0x1 << 1,
+ Shift = 0x1 << 2,
+ Command = 0x1 << 3
}
}
diff --git a/external/xwt/Xwt/Xwt/Notebook.cs b/external/xwt/Xwt/Xwt/Notebook.cs
index c65fc19..3cae0a9 100755
--- a/external/xwt/Xwt/Xwt/Notebook.cs
+++ b/external/xwt/Xwt/Xwt/Notebook.cs
@@ -30,6 +30,7 @@ using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(INotebookBackend))]
public class Notebook: Widget
{
ChildrenCollection<NotebookTab> tabs;
diff --git a/external/xwt/Xwt/Xwt/OpenFileDialog.cs b/external/xwt/Xwt/Xwt/OpenFileDialog.cs
index 0e33c8d..99afdaa 100644
--- a/external/xwt/Xwt/Xwt/OpenFileDialog.cs
+++ b/external/xwt/Xwt/Xwt/OpenFileDialog.cs
@@ -24,9 +24,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IOpenFileDialogBackend))]
public class OpenFileDialog: FileDialog
{
public OpenFileDialog ()
diff --git a/external/xwt/Xwt/Xwt/Paned.cs b/external/xwt/Xwt/Xwt/Paned.cs
index a454504..dce339d 100755
--- a/external/xwt/Xwt/Xwt/Paned.cs
+++ b/external/xwt/Xwt/Xwt/Paned.cs
@@ -30,6 +30,7 @@ using System.Windows.Markup;
namespace Xwt
{
+ [BackendType (typeof(IPanedBackend))]
public class Paned: Widget
{
Orientation direction;
@@ -45,7 +46,7 @@ namespace Xwt
// We always want to listen this event because we use it
// to reallocate the children
- if (!Application.EngineBackend.HandlesSizeNegotiation)
+ if (!EngineBackend.HandlesSizeNegotiation)
b.EnableEvent (PanedEvent.PositionChanged);
return b;
@@ -171,7 +172,7 @@ namespace Xwt
void NotifyPositionChanged ()
{
- if (!Application.EngineBackend.HandlesSizeNegotiation) {
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation) {
if (panel1.Content != null)
panel1.Content.Surface.Reallocate ();
if (panel2.Content != null)
diff --git a/external/xwt/Xwt/Xwt/Placement.cs b/external/xwt/Xwt/Xwt/Placement.cs
index ee8fa36..e1a4999 100644
--- a/external/xwt/Xwt/Xwt/Placement.cs
+++ b/external/xwt/Xwt/Xwt/Placement.cs
@@ -10,6 +10,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IBoxBackend))]
public class Placement : Widget
{
Widget child;
@@ -107,72 +108,40 @@ namespace Xwt
protected override void OnReallocate ()
{
- var size = Backend.Size;
- double childWidth, childHeight;
-
if (child != null) {
- if (child.Surface.SizeRequestMode == SizeRequestMode.HeightForWidth) {
- childWidth = child.Surface.GetPreferredWidth ().NaturalSize;
- if (childWidth > size.Width)
- childWidth = size.Width;
- childHeight = child.Surface.GetPreferredHeightForWidth (childWidth).NaturalSize;
- if (childHeight > size.Height)
- childHeight = size.Height;
- }
- else {
- childHeight = child.Surface.GetPreferredHeight ().NaturalSize;
- if (childHeight > size.Height)
- childHeight = size.Height;
- childWidth = child.Surface.GetPreferredWidthForHeight (childHeight).NaturalSize;
- if (childWidth > size.Width)
- childWidth = size.Width;
- }
-
- if (childWidth < 0)
- childWidth = 0;
- if (childHeight < 0)
- childHeight = 0;
-
- var x = XAlign * (size.Width - childWidth - Padding.HorizontalSpacing) + Padding.Left - Padding.Right;
- var y = YAlign * (size.Height - childHeight - Padding.VerticalSpacing) + Padding.Top - Padding.Bottom;
+ var size = Backend.Size;
+ var availableWidth = size.Width - child.Margin.HorizontalSpacing - Padding.HorizontalSpacing;
+ var availableHeight = size.Height - child.Margin.VerticalSpacing - Padding.VerticalSpacing;
+ var childSize = child.Surface.GetPreferredSize (availableWidth, availableHeight);
+ var x = child.Margin.Left + Padding.Left + XAlign * (availableWidth - childSize.Width);
+ var y = child.Margin.Top + Padding.Top + YAlign * (availableHeight - childSize.Height);
- Backend.SetAllocation (new[] { (IWidgetBackend)GetBackend (child) }, new[] { new Rectangle (x, y, childWidth, childHeight) });
+ Backend.SetAllocation (new[] { (IWidgetBackend)GetBackend (child) }, new[] { new Rectangle (x, y, childSize.Width, childSize.Height).Round () });
- if (!Application.EngineBackend.HandlesSizeNegotiation)
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation)
child.Surface.Reallocate ();
}
}
- protected override WidgetSize OnGetPreferredHeight ()
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- WidgetSize s = new WidgetSize ();
- if (child != null)
- s += child.Surface.GetPreferredHeight ();
- return s;
- }
-
- protected override WidgetSize OnGetPreferredWidth ()
- {
- WidgetSize s = new WidgetSize ();
- if (child != null)
- s += child.Surface.GetPreferredWidth ();
- return s;
- }
-
- protected override WidgetSize OnGetPreferredHeightForWidth (double width)
- {
- WidgetSize s = new WidgetSize ();
- if (child != null)
- s += child.Surface.GetPreferredHeightForWidth (width);
- return s;
- }
+ if (child != null) {
+ var s = new Size (child.Margin.HorizontalSpacing + Padding.HorizontalSpacing, child.Margin.VerticalSpacing + Padding.VerticalSpacing);
- protected override WidgetSize OnGetPreferredWidthForHeight (double height)
- {
- WidgetSize s = new WidgetSize ();
- if (child != null)
- s += child.Surface.GetPreferredWidthForHeight (height);
- return s;
+ if (widthConstraint.IsConstrained) {
+ widthConstraint = widthConstraint.AvailableSize - s.Width;
+ if (widthConstraint.AvailableSize <= 0)
+ return s;
+ }
+ if (heightConstraint.IsConstrained) {
+ heightConstraint = heightConstraint.AvailableSize - child.Margin.VerticalSpacing - Padding.VerticalSpacing;
+ if (heightConstraint.AvailableSize <= 0)
+ return s;
+ }
+ return s + child.Surface.GetPreferredSize (widthConstraint, heightConstraint);
+ }
+ else
+ return new Size (Padding.HorizontalSpacing, Padding.VerticalSpacing);
}
}
}
diff --git a/external/xwt/Xwt/Xwt/Point.cs b/external/xwt/Xwt/Xwt/Point.cs
index e96c5bf..777ca87 100755
--- a/external/xwt/Xwt/Xwt/Point.cs
+++ b/external/xwt/Xwt/Xwt/Point.cs
@@ -65,7 +65,14 @@ namespace Xwt {
public override int GetHashCode ()
{
- return X.GetHashCode () ^ Y.GetHashCode ();
+ unchecked {
+ return (X.GetHashCode () * 397) ^ Y.GetHashCode ();
+ }
+ }
+
+ public Point Offset (Point offset)
+ {
+ return Offset (offset.X, offset.Y);
}
public Point Offset (double dx, double dy)
diff --git a/external/xwt/Xwt/Xwt/Popover.cs b/external/xwt/Xwt/Xwt/Popover.cs
index 76186eb..9e855b5 100644
--- a/external/xwt/Xwt/Xwt/Popover.cs
+++ b/external/xwt/Xwt/Xwt/Popover.cs
@@ -26,11 +26,12 @@
using System;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IPopoverBackend))]
public class Popover : XwtComponent
{
public enum Position {
diff --git a/external/xwt/Xwt/Xwt/ProgressBar.cs b/external/xwt/Xwt/Xwt/ProgressBar.cs
index 025d081..08df913 100644
--- a/external/xwt/Xwt/Xwt/ProgressBar.cs
+++ b/external/xwt/Xwt/Xwt/ProgressBar.cs
@@ -27,9 +27,11 @@
using System;
using Xwt.Backends;
using Xwt.Drawing;
+using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(IProgressBarBackend))]
public class ProgressBar : Widget
{
double fraction = 0.0;
@@ -47,7 +49,8 @@ namespace Xwt
IProgressBarBackend Backend {
get { return (IProgressBarBackend) BackendHost.Backend; }
}
-
+
+ [DefaultValue (0d)]
public double Fraction {
get { return fraction; }
set {
@@ -61,6 +64,7 @@ namespace Xwt
}
}
+ [DefaultValue (false)]
public bool Indeterminate {
get { return indeterminate; }
set {
diff --git a/external/xwt/Xwt/Xwt/RadioButton.cs b/external/xwt/Xwt/Xwt/RadioButton.cs
new file mode 100644
index 0000000..f5a220b
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/RadioButton.cs
@@ -0,0 +1,285 @@
+//
+// CheckBox.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc
+//
+// 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.ComponentModel;
+using Xwt.Backends;
+using System.Windows.Markup;
+using System.Linq;
+using System.Collections.Generic;
+
+namespace Xwt
+{
+ [BackendType (typeof(IRadioButtonBackend))]
+ [ContentProperty("Content")]
+ public class RadioButton: Widget
+ {
+ Widget content;
+ string label = "";
+ RadioButtonGroup radioGroup;
+
+ EventHandler clicked;
+ EventHandler activeChanged;
+ EventHandler activeSet;
+
+ protected new class WidgetBackendHost: Widget.WidgetBackendHost, IRadioButtonEventSink
+ {
+ public void OnClicked ()
+ {
+ ((RadioButton)Parent).OnClicked (EventArgs.Empty);
+ }
+ public void OnToggled ()
+ {
+ ((RadioButton)Parent).OnActiveChanged (EventArgs.Empty);
+ }
+ }
+
+ static RadioButton ()
+ {
+ MapEvent (RadioButtonEvent.Clicked, typeof(RadioButton), "OnClicked");
+ MapEvent (RadioButtonEvent.ActiveChanged, typeof(RadioButton), "OnActiveChanged");
+ MapEvent (RadioButtonEvent.ActiveChanged, typeof(RadioButton), "OnActivated");
+ }
+
+ public RadioButton ()
+ {
+ }
+
+ public RadioButton (string label): this ()
+ {
+ Label = label;
+ }
+
+ public RadioButton (Widget content): this ()
+ {
+ Content = content;
+ }
+
+ protected override BackendHost CreateBackendHost ()
+ {
+ return new WidgetBackendHost ();
+ }
+
+ IRadioButtonBackend Backend {
+ get { return (IRadioButtonBackend) BackendHost.Backend; }
+ }
+
+ [DefaultValue ("")]
+ public string Label {
+ get { return label; }
+ set {
+ label = value;
+ Backend.SetContent (label);
+ OnPreferredSizeChanged ();
+ }
+ }
+
+ [DefaultValue (null)]
+ public new Widget Content {
+ get { return content; }
+ set {
+ if (content != null)
+ UnregisterChild (content);
+ content = value;
+ if (content != null)
+ RegisterChild (content);
+ Backend.SetContent ((IWidgetBackend)GetBackend (content));
+ OnPreferredSizeChanged ();
+ }
+ }
+
+ public RadioButtonGroup Group {
+ get {
+ if (radioGroup == null)
+ Group = new RadioButtonGroup () { GroupBackend = Backend.Group };
+ return radioGroup;
+ }
+ set {
+ if (radioGroup != null)
+ radioGroup.Remove (this);
+ radioGroup = value;
+ if (radioGroup == null)
+ radioGroup = new RadioButtonGroup ();
+
+ if (radioGroup.GroupBackend == null)
+ radioGroup.GroupBackend = Backend.Group;
+ else
+ Backend.Group = radioGroup.GroupBackend;
+ radioGroup.Add (this);
+ }
+ }
+
+ [DefaultValue (false)]
+ public bool Active {
+ get { return Backend.Active; }
+ set {
+ if (!value && Active && radioGroup != null)
+ radioGroup.ResetSelection ();
+ Backend.Active = value;
+ }
+ }
+
+ protected virtual void OnClicked (EventArgs e)
+ {
+ if (clicked != null)
+ clicked (this, e);
+ }
+
+ protected virtual void OnActiveChanged (EventArgs e)
+ {
+ if (activeChanged != null)
+ activeChanged (this, e);
+ }
+
+ protected virtual void OnActivated (EventArgs e)
+ {
+ if (activeSet != null)
+ activeSet (this, e);
+ }
+
+ public event EventHandler Clicked {
+ add {
+ BackendHost.OnBeforeEventAdd (RadioButtonEvent.Clicked, clicked);
+ clicked += value;
+ }
+ remove {
+ clicked -= value;
+ BackendHost.OnAfterEventRemove (RadioButtonEvent.Clicked, clicked);
+ }
+ }
+
+ public event EventHandler ActiveChanged {
+ add {
+ BackendHost.OnBeforeEventAdd (RadioButtonEvent.ActiveChanged, activeChanged);
+ activeChanged += value;
+ }
+ remove {
+ activeChanged -= value;
+ BackendHost.OnAfterEventRemove (RadioButtonEvent.ActiveChanged, activeChanged);
+ }
+ }
+
+ public event EventHandler Activated {
+ add {
+ if (activeSet == null)
+ ActiveChanged += HandleActiveChanged;
+ activeSet += value;
+ }
+ remove {
+ activeSet -= value;
+ if (activeSet == null)
+ ActiveChanged -= HandleActiveChanged;
+ }
+ }
+
+ void HandleActiveChanged (object sender, EventArgs e)
+ {
+ if (Active)
+ OnActivated (e);
+ }
+ }
+
+
+ public class RadioButtonGroup
+ {
+ internal object GroupBackend;
+
+ List<RadioButton> items = new List<RadioButton> ();
+ EventHandler activeEvent;
+ RadioButton activeRadioButton;
+ bool eventsEnabled;
+
+ public RadioButton ActiveRadioButton {
+ get {
+ if (eventsEnabled)
+ return activeRadioButton;
+ else {
+ EnableActiveEvent ();
+ return activeRadioButton = items.FirstOrDefault (r => r.Active);
+ }
+ }
+ }
+
+ internal void Add (RadioButton r)
+ {
+ items.Add (r);
+ if (eventsEnabled)
+ r.ActiveChanged += HandleActiveChanged;
+ }
+
+ internal void Remove (RadioButton r)
+ {
+ items.Remove (r);
+ if (eventsEnabled)
+ r.ActiveChanged -= HandleActiveChanged;
+ }
+
+ public event EventHandler ActiveRadioButtonChanged {
+ add {
+ if (!eventsEnabled)
+ EnableActiveEvent ();
+ activeEvent += value;
+ }
+ remove {
+ activeEvent -= value;
+ }
+ }
+
+ public void ClearActive ()
+ {
+ if (ActiveRadioButton != null)
+ ActiveRadioButton.Active = false;
+ }
+
+ void EnableActiveEvent ()
+ {
+ if (!eventsEnabled) {
+ eventsEnabled = true;
+ foreach (var b in items)
+ b.ActiveChanged += HandleActiveChanged;
+ }
+ }
+
+ void HandleActiveChanged (object sender, EventArgs e)
+ {
+ if (((RadioButton)sender).Active)
+ SetActive ((RadioButton)sender);
+ }
+
+ void SetActive (RadioButton r)
+ {
+ var old = activeRadioButton;
+ activeRadioButton = r;
+ if (old != r && activeEvent != null)
+ activeEvent (this, EventArgs.Empty);
+ }
+
+ internal void ResetSelection ()
+ {
+ SetActive (null);
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/RadioButtonMenuItem.cs b/external/xwt/Xwt/Xwt/RadioButtonMenuItem.cs
index bd69063..26a32e0 100644
--- a/external/xwt/Xwt/Xwt/RadioButtonMenuItem.cs
+++ b/external/xwt/Xwt/Xwt/RadioButtonMenuItem.cs
@@ -31,9 +31,10 @@ using System.Linq;
namespace Xwt
{
+ [BackendType (typeof(IRadioButtonMenuItemBackend))]
public class RadioButtonMenuItem: MenuItem
{
- RadioButtonGroup radioGroup;
+ RadioButtonMenuItemGroup radioGroup;
public RadioButtonMenuItem ()
{
@@ -61,7 +62,7 @@ namespace Xwt
}
}
- public RadioButtonGroup RadioButtonGroup {
+ public RadioButtonMenuItemGroup Group {
get { return radioGroup; }
set {
if (radioGroup != null)
@@ -92,7 +93,7 @@ namespace Xwt
}
}
- public class RadioButtonGroup
+ public class RadioButtonMenuItemGroup
{
internal List<object> Items = new List<object> ();
}
diff --git a/external/xwt/Xwt/Xwt/Rectangle.cs b/external/xwt/Xwt/Xwt/Rectangle.cs
index 76905d2..f9d24ae 100755
--- a/external/xwt/Xwt/Xwt/Rectangle.cs
+++ b/external/xwt/Xwt/Xwt/Rectangle.cs
@@ -72,7 +72,13 @@ namespace Xwt
public override int GetHashCode ()
{
- return ((int)Height + (int)Width) ^ (int)X + (int)Y;
+ unchecked {
+ var hash = X.GetHashCode ();
+ hash = (hash * 397) ^ Y.GetHashCode ();
+ hash = (hash * 397) ^ Width.GetHashCode ();
+ hash = (hash * 397) ^ Height.GetHashCode ();
+ return hash;
+ }
}
public static bool operator == (Rectangle r1, Rectangle r2)
@@ -88,7 +94,7 @@ namespace Xwt
// Hit Testing / Intersection / Union
public bool Contains (Rectangle rect)
{
- return (rect == Intersect (this, rect));
+ return X <= rect.X && Right >= rect.Right && Y <= rect.Y && Bottom >= rect.Bottom;
}
public bool Contains (Point pt)
@@ -226,5 +232,19 @@ namespace Xwt
Math.Round (Height)
);
}
+
+ /// <summary>
+ /// Returns a copy of the rectangle, ensuring that the width and height are greater or equal to zero
+ /// </summary>
+ /// <returns>The new rectangle</returns>
+ public Rectangle WithPositiveSize ()
+ {
+ return new Rectangle (
+ X,
+ Y,
+ Width >= 0 ? Width : 0,
+ Height >= 0 ? Height : 0
+ );
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ReliefFrame.cs b/external/xwt/Xwt/Xwt/ReliefFrame.cs
deleted file mode 100644
index a825600..0000000
--- a/external/xwt/Xwt/Xwt/ReliefFrame.cs
+++ /dev/null
@@ -1,287 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Xwt.Drawing;
-
-namespace Xwt
-{
- public class ReliefFrame : Canvas
- {
- // http://graphics.stanford.edu/courses/cs248-98-fall/Final/q1.html
- const double ArcToBezier = 0.55228475;
- double padding = 12.0;
- double? radius = null;
- Color bgcolor;
-
- public ReliefFrame ()
- {
- bgcolor = base.BackgroundColor;
- }
-
- public ReliefFrame (Widget content)
- : this ()
- {
- Content = content;
- }
-
- public new Color BackgroundColor
- {
- get { return bgcolor; }
- set
- {
- bgcolor = value;
- QueueDraw ();
- }
- }
-
- public new Widget Content
- {
- get { return Children.SingleOrDefault (); }
- set
- {
- if (Content != null)
- RemoveChild (Content);
- if (value != null)
- AddChild (value);
- }
- }
-
- public double? CornerRadius
- {
- get { return radius; }
- set
- {
- if (radius == value)
- return;
-
- radius = value;
- QueueDraw ();
- }
- }
-
- public double Padding
- {
- get { return padding; }
- set
- {
- if (padding == value)
- return;
-
- padding = value;
- OnPreferredSizeChanged ();
- }
- }
-
- protected override WidgetSize OnGetPreferredHeight ()
- {
- return Content.Surface.GetPreferredHeight () + (2 * padding);
- }
-
- protected override WidgetSize OnGetPreferredWidth ()
- {
- return Content.Surface.GetPreferredWidth () + (2 * padding);
- }
-
- protected override WidgetSize OnGetPreferredHeightForWidth (double width)
- {
- return Content.Surface.GetPreferredHeightForWidth (Math.Max (width - (2 * padding), 0)) + (2 * padding);
- }
-
- protected override WidgetSize OnGetPreferredWidthForHeight (double height)
- {
- return Content.Surface.GetPreferredWidthForHeight (Math.Max (height - (2 * padding), 0)) + (2 * padding);
- }
-
- protected override void OnReallocate ()
- {
- base.OnReallocate ();
- UpdateChildBounds ();
- }
-
- void UpdateChildBounds ()
- {
- SetChildBounds (Content, new Rectangle (padding, padding, Math.Max (Size.Width - (2 * padding), 0), Math.Max (Size.Height - (2 * padding), 0)));
- }
-
- static void DrawBorder (Context ctx, double x, double y, double w, double h, double radius)
- {
- ctx.NewPath ();
-
- // test limits (without using multiplication)
- if (radius > w - radius)
- radius = w / 2;
- if (radius > h - radius)
- radius = h / 2;
-
- // approximate (quite close) the arc using a bezier curve
- double arc = ArcToBezier * radius;
-
- // top-left corner
- ctx.MoveTo (x + radius, y);
-
- // top edge
- ctx.LineTo (x + w - radius, y);
-
- // top-right corner
- ctx.CurveTo (x + w - radius + arc, y, x + w, y + arc, x + w, y + radius);
-
- // right edge
- ctx.LineTo (x + w, y + h - radius);
-
- // bottom-right corner
- ctx.CurveTo (x + w, y + h - radius + arc, x + w + arc - radius, y + h, x + w - radius, y + h);
-
- // bottom edge
- ctx.LineTo (x + radius, y + h);
-
- // bottom-left corner
- ctx.CurveTo (x + radius - arc, y + h, x, y + h - arc, x, y + h - radius);
-
- // left edge
- ctx.LineTo (x, y + radius);
-
- // top-left corner
- ctx.CurveTo (x, y + radius - arc, x + radius - arc, y, x + radius, y);
- }
-
- static Color GetColor (Color color, double percent)
- {
- return new Color (color.Red * percent, color.Green * percent, color.Blue * percent);
- }
-
- RadialGradient GetCornerGradient (double x, double y, double radius, double thickness)
- {
- var gradient = new RadialGradient (x, y, radius - thickness, x, y, radius + thickness);
- gradient.AddColorStop (0, BackgroundColor);
- gradient.AddColorStop (1, GetColor (BackgroundColor, 0.75));
- return gradient;
- }
-
- LinearGradient GetBottomEdgeGradient (double bottom, double thickness)
- {
- var gradient = new LinearGradient (0, bottom - thickness, 0, bottom + thickness);
- gradient.AddColorStop (0, BackgroundColor);
- gradient.AddColorStop (1, GetColor (BackgroundColor, 0.75));
- return gradient;
- }
-
- LinearGradient GetTopEdgeGradient (double top, double thickness)
- {
- var gradient = new LinearGradient (0, top - thickness, 0, top + thickness);
- gradient.AddColorStop (0, GetColor (BackgroundColor, 0.75));
- gradient.AddColorStop (1, BackgroundColor);
- return gradient;
- }
-
- LinearGradient GetRightEdgeGradient (double right, double thickness)
- {
- var gradient = new LinearGradient (right - thickness, 0, right + thickness, 0);
- gradient.AddColorStop (0, BackgroundColor);
- gradient.AddColorStop (1, GetColor (BackgroundColor, 0.75));
- return gradient;
- }
-
- LinearGradient GetLeftEdgeGradient (double left, double thickness)
- {
- var gradient = new LinearGradient (left - thickness, 0, left + thickness, 0);
- gradient.AddColorStop (0, GetColor (BackgroundColor, 0.75));
- gradient.AddColorStop (1, BackgroundColor);
- return gradient;
- }
-
- void DrawBorder (Context ctx, double x, double y, double w, double h, double radius, double thickness)
- {
- // test limits (without using multiplication)
- if (radius > w - radius)
- radius = w / 2;
- if (radius > h - radius)
- radius = h / 2;
-
- // approximate (quite close) the arc using a bezier curve
- double arc = ArcToBezier * radius;
-
- ctx.SetLineWidth (thickness);
-
- // top-left corner
- ctx.NewPath ();
- ctx.MoveTo (x, y + radius);
- ctx.CurveTo (x, y + radius - arc, x + radius - arc, y, x + radius, y);
- ctx.Pattern = GetCornerGradient (x + radius, y + radius, radius, thickness / 2);
- ctx.Stroke ();
-
- // top edge
- ctx.NewPath ();
- ctx.MoveTo (x + radius - 0.5, y);
- ctx.LineTo (x + w - radius + 0.5, y);
- ctx.Pattern = GetTopEdgeGradient (y, thickness / 2);
- ctx.Stroke ();
-
- // top-right corner
- ctx.NewPath ();
- ctx.MoveTo (x + w - radius, y);
- ctx.CurveTo (x + w - radius + arc, y, x + w, y + arc, x + w, y + radius);
- ctx.Pattern = GetCornerGradient (x + w - radius, y + radius, radius, thickness / 2);
- ctx.Stroke ();
-
- // right edge
- ctx.NewPath ();
- ctx.MoveTo (x + w, y + radius - 0.5);
- ctx.LineTo (x + w, y + h - radius + 0.5);
- ctx.Pattern = GetRightEdgeGradient (x + w, thickness / 2);
- ctx.Stroke ();
-
- // bottom-right corner
- ctx.NewPath ();
- ctx.MoveTo (x + w, y + h - radius);
- ctx.CurveTo (x + w, y + h - radius + arc, x + w + arc - radius, y + h, x + w - radius, y + h);
- ctx.Pattern = GetCornerGradient (x + w - radius, y + h - radius, radius, thickness / 2);
- ctx.Stroke ();
-
- // bottom edge
- ctx.NewPath ();
- ctx.MoveTo (x + w - radius + 0.5, y + h);
- ctx.LineTo (x + radius - 0.5, y + h);
- ctx.Pattern = GetBottomEdgeGradient (y + h, thickness / 2);
- ctx.Stroke ();
-
- // bottom-left corner
- ctx.NewPath ();
- ctx.MoveTo (x + radius, y + h);
- ctx.CurveTo (x + radius - arc, y + h, x, y + h - arc, x, y + h - radius);
- ctx.Pattern = GetCornerGradient (x + radius, y + h - radius, radius, thickness / 2);
- ctx.Stroke ();
-
- // left edge
- ctx.NewPath ();
- ctx.MoveTo (x, y + h - radius + 0.5);
- ctx.LineTo (x, y + radius - 0.5);
- ctx.Pattern = GetLeftEdgeGradient (x, thickness / 2);
- ctx.Stroke ();
- }
-
- protected override void OnDraw (Context ctx, Rectangle dirtyRect)
- {
- double radius = CornerRadius ?? Math.Min (Size.Width, Size.Height) / 6.4;
- double h = Size.Height - 1.0;
- double w = Size.Width - 1.0;
- double x = 0.5;
- double y = 0.5;
-
- ctx.Save ();
-
- // Background
- DrawBorder (ctx, x, y, w, h, radius);
- ctx.SetColor (BackgroundColor);
- ctx.Fill ();
-
- // Border
- h = Size.Height - 6;
- w = Size.Width - 6;
- x = y = 3;
- DrawBorder (ctx, x, y, w, h, radius, 6);
-
- ctx.Restore ();
- }
- }
-}
diff --git a/external/xwt/Xwt/Xwt/RichTextView.cs b/external/xwt/Xwt/Xwt/RichTextView.cs
index 2a9fb92..3d31317 100644
--- a/external/xwt/Xwt/Xwt/RichTextView.cs
+++ b/external/xwt/Xwt/Xwt/RichTextView.cs
@@ -35,6 +35,7 @@ using Xwt.Formats;
namespace Xwt
{
+ [BackendType (typeof(IRichTextViewBackend))]
public class RichTextView : Widget
{
protected new class WidgetBackendHost : Widget.WidgetBackendHost, IRichTextViewEventSink
@@ -86,6 +87,7 @@ namespace Xwt
var buffer = Backend.CreateBuffer ();
format.Parse (input, buffer);
Backend.SetBuffer (buffer);
+ OnPreferredSizeChanged ();
}
protected override BackendHost CreateBackendHost ()
@@ -98,8 +100,10 @@ namespace Xwt
if (navigateToUrl != null)
navigateToUrl (this, e);
- if (!e.Handled)
- Application.EngineBackend.ShowWebBrowser (e);
+ if (!e.Handled && e.Uri != null) {
+ Desktop.OpenUrl (e.Uri);
+ e.SetHandled ();
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/SaveFileDialog.cs b/external/xwt/Xwt/Xwt/SaveFileDialog.cs
index 5ce753b..fa6b16c 100644
--- a/external/xwt/Xwt/Xwt/SaveFileDialog.cs
+++ b/external/xwt/Xwt/Xwt/SaveFileDialog.cs
@@ -24,9 +24,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(ISaveFileDialogBackend))]
public class SaveFileDialog: FileDialog
{
public SaveFileDialog ()
diff --git a/external/xwt/Xwt/Xwt/Screen.cs b/external/xwt/Xwt/Xwt/Screen.cs
new file mode 100644
index 0000000..ec02981
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/Screen.cs
@@ -0,0 +1,94 @@
+//
+// Screen.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ /// <summary>
+ /// Object representing a physical screen
+ /// </summary>
+ public class Screen: XwtObject
+ {
+ internal Screen (object backend): this (backend, null)
+ {
+ }
+
+ internal Screen (object backend, Toolkit toolkit): base (backend, toolkit)
+ {
+ }
+
+ /// <summary>
+ /// Bounds of the screen, including the dock area (and menu bar on Mac)
+ /// </summary>
+ /// <value>The bounds.</value>
+ public Rectangle Bounds {
+ get {
+ return ToolkitEngine.DesktopBackend.GetScreenBounds (Backend);
+ }
+ }
+
+ /// <summary>
+ /// Bounds of the screen, not including the dock area (or menu bar on Mac)
+ /// </summary>
+ public Rectangle VisibleBounds {
+ get {
+ return ToolkitEngine.DesktopBackend.GetScreenVisibleBounds (Backend);
+ }
+ }
+
+ /// <summary>
+ /// Gets the name of the device.
+ /// </summary>
+ /// <value>The name of the device.</value>
+ public string DeviceName {
+ get {
+ return ToolkitEngine.DesktopBackend.GetScreenDeviceName (Backend);
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this screen is the primary screen
+ /// </summary>
+ /// <value><c>true</c> if this instance is the primary screen; otherwise, <c>false</c>.</value>
+ /// <remarks>The primary screen is considered the screen where the 'main desktop' lives.</remarks>
+ public bool IsPrimary {
+ get {
+ return ToolkitEngine.DesktopBackend.IsPrimaryScreen (Backend);
+ }
+ }
+
+ /// <summary>
+ /// Gets the screen scale factor.
+ /// </summary>
+ /// <value>This is the scale of user space pixels in relation to phisical pixels. The normal value is 1. In a retina display the value is 2.</value>
+ public double ScaleFactor {
+ get {
+ return ToolkitEngine.DesktopBackend.GetScaleFactor (Backend);
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/ScrollAdjustment.cs b/external/xwt/Xwt/Xwt/ScrollAdjustment.cs
index d7ac912..258117c 100644
--- a/external/xwt/Xwt/Xwt/ScrollAdjustment.cs
+++ b/external/xwt/Xwt/Xwt/ScrollAdjustment.cs
@@ -28,18 +28,32 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IScrollAdjustmentBackend))]
public class ScrollAdjustment: XwtComponent
{
+ double lowerValue;
+ double upperValue;
+ double stepIncrement;
+ double pageIncrement;
+ double pageSize;
+
EventHandler valueChanged;
class ScrollAdjustmentBackendHost: BackendHost<ScrollAdjustment,IScrollAdjustmentBackend>, IScrollAdjustmentEventSink
{
+ protected override IBackend OnCreateBackend ()
+ {
+ // When creating a standalone ScrollAdjustment (not bound to any widget) we always use
+ // a default platform-agnostic implementation
+ return new DefaultScrollAdjustmentBackend ();
+ }
+
protected override void OnBackendCreated ()
{
base.OnBackendCreated ();
Backend.Initialize (this);
}
-
+
public void OnValueChanged ()
{
Parent.OnValueChanged (EventArgs.Empty);
@@ -58,17 +72,18 @@ namespace Xwt
public ScrollAdjustment ()
{
- LowerValue = 0;
- UpperValue = 100;
- Value = 0;
- PageSize = 10;
- StepIncrement = 1;
- PageIncrement = 10;
+ lowerValue = 0;
+ upperValue = 100;
+ pageSize = 10;
+ stepIncrement = 1;
+ pageIncrement = 10;
+ UpdateRange ();
}
- internal ScrollAdjustment (IBackend backend)
+ internal ScrollAdjustment (IScrollAdjustmentBackend backend)
{
BackendHost.SetCustomBackend (backend);
+ backend.Initialize ((ScrollAdjustmentBackendHost)BackendHost);
}
IScrollAdjustmentBackend Backend {
@@ -107,30 +122,74 @@ namespace Xwt
get { return Backend.Value; }
set { Backend.Value = value; }
}
-
+
+ /// <summary>
+ /// Gets or sets the lowest value of the scroll range.
+ /// </summary>
+ /// <value>
+ /// The lower value.
+ /// </value>
+ /// <remarks>It must be <= UpperValue</remarks>
public double LowerValue {
- get { return Backend.LowerValue; }
- set { Backend.LowerValue = value; }
+ get { return lowerValue; }
+ set { lowerValue = value; UpdateRange (); }
}
-
+
+ /// <summary>
+ /// Gets or sets the highest value of the scroll range
+ /// </summary>
+ /// <value>
+ /// The upper value.
+ /// </value>
+ /// <remarks>It must be >= LowerValue</remarks>
public double UpperValue {
- get { return Backend.UpperValue; }
- set { Backend.UpperValue = value; }
+ get { return upperValue; }
+ set { upperValue = value; UpdateRange (); }
}
-
+
+ /// <summary>
+ /// How much Value will be incremented when you click on the scrollbar to move
+ /// to the next page (when the scrollbar supports it)
+ /// </summary>
+ /// <value>
+ /// The page increment.
+ /// </value>
public double PageIncrement {
- get { return Backend.PageIncrement; }
- set { Backend.PageIncrement = value; }
+ get { return pageIncrement; }
+ set { pageIncrement = value; UpdateRange (); }
}
-
+
+ /// <summary>
+ /// How much the Value is incremented/decremented when you click on the down/up button in the scrollbar
+ /// </summary>
+ /// <value>
+ /// The step increment.
+ /// </value>
public double StepIncrement {
- get { return Backend.StepIncrement; }
- set { Backend.StepIncrement = value; }
+ get { return stepIncrement; }
+ set { stepIncrement = value; UpdateRange (); }
}
-
+
+ /// <summary>
+ /// Size of the visible range
+ /// </summary>
+ /// <remarks>
+ /// For example, if LowerValue=0, UpperValue=100, Value=25 and PageSize=50, the visible range will be 25 to 75
+ /// </remarks>
public double PageSize {
- get { return Backend.PageSize; }
- set { Backend.PageSize = value; }
+ get { return pageSize; }
+ set { pageSize = value; UpdateRange (); }
+ }
+
+ void UpdateRange ()
+ {
+ var realUpper = Math.Max (lowerValue, upperValue);
+ var realPageSize = Math.Min (pageSize, realUpper - lowerValue);
+ var realValue = Math.Min (Value, realUpper - realPageSize);
+ if (realValue < lowerValue)
+ realValue = lowerValue;
+ Backend.SetRange (lowerValue, realUpper, realPageSize, pageIncrement, stepIncrement, realValue);
+ OnAdjustmentChanged ();
}
protected virtual void OnValueChanged (EventArgs e)
@@ -149,6 +208,51 @@ namespace Xwt
BackendHost.OnAfterEventRemove (ScrollAdjustmentEvent.ValueChanged, valueChanged);
}
}
+
+ /// <summary>
+ /// </summary>
+ /// <remarks>
+ /// This method is called when one of the properties of the adjustment changes.
+ /// It is not called if the Value changes. You can override OnValueChanged for
+ /// this use case.
+ /// </remarks>
+ protected virtual void OnAdjustmentChanged ()
+ {
+ }
+
+ class DefaultScrollAdjustmentBackend: IScrollAdjustmentBackend
+ {
+ IScrollAdjustmentEventSink eventSink;
+ double currentValue;
+
+ public void Initialize (IScrollAdjustmentEventSink eventSink)
+ {
+ this.eventSink = eventSink;
+ }
+
+ public double Value {
+ get { return currentValue; }
+ set { currentValue = value; eventSink.OnValueChanged (); }
+ }
+
+ public void SetRange (double lowerValue, double upperValue, double pageSize, double pageIncrement, double stepIncrement, double value)
+ {
+ if (Value != value)
+ Value = value;
+ }
+
+ public void InitializeBackend (object frontend, ApplicationContext context)
+ {
+ }
+
+ public void EnableEvent (object eventId)
+ {
+ }
+
+ public void DisableEvent (object eventId)
+ {
+ }
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/ScrollView.cs b/external/xwt/Xwt/Xwt/ScrollView.cs
index 20cb454..395afca 100644
--- a/external/xwt/Xwt/Xwt/ScrollView.cs
+++ b/external/xwt/Xwt/Xwt/ScrollView.cs
@@ -28,6 +28,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IScrollViewBackend))]
public class ScrollView: Widget
{
Widget child;
@@ -81,18 +82,9 @@ namespace Xwt
protected override void OnReallocate ()
{
+ if (child != null && !child.SupportsCustomScrolling)
+ Backend.SetChildSize (child.Surface.GetPreferredSize (SizeConstraint.Unconstrained, SizeConstraint.Unconstrained));
base.OnReallocate ();
- if (child != null && !child.SupportsCustomScrolling) {
- if (child.Surface.SizeRequestMode == SizeRequestMode.HeightForWidth) {
- var w = child.Surface.GetPreferredWidth ();
- var h = child.Surface.GetPreferredHeightForWidth (w.NaturalSize);
- Backend.SetChildSize (new Size (w.NaturalSize, h.NaturalSize));
- } else {
- var h = child.Surface.GetPreferredHeight ();
- var w = child.Surface.GetPreferredWidthForHeight (h.NaturalSize);
- Backend.SetChildSize (new Size (w.NaturalSize, h.NaturalSize));
- }
- }
}
public ScrollPolicy VerticalScrollPolicy {
diff --git a/external/xwt/Xwt/Xwt/Scrollbar.cs b/external/xwt/Xwt/Xwt/Scrollbar.cs
new file mode 100644
index 0000000..17edd4c
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/Scrollbar.cs
@@ -0,0 +1,164 @@
+//
+// Scrollbar.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt
+{
+ [BackendType (typeof(IScrollbarBackend))]
+ public class Scrollbar: Widget
+ {
+ Orientation orientation;
+ ScrollAdjustment adjustment;
+
+ internal Scrollbar (Orientation orientation)
+ {
+ this.orientation = orientation;
+ }
+
+ protected new class WidgetBackendHost: Widget.WidgetBackendHost<Scrollbar,IScrollbarBackend>
+ {
+ protected override void OnBackendCreated ()
+ {
+ Backend.Initialize (Parent.orientation);
+ base.OnBackendCreated ();
+ }
+ }
+
+ protected override BackendHost CreateBackendHost ()
+ {
+ return new WidgetBackendHost ();
+ }
+
+ IScrollbarBackend Backend {
+ get { return (IScrollbarBackend) BackendHost.Backend; }
+ }
+
+ public ScrollAdjustment ScrollAdjustment {
+ get {
+ if (adjustment == null)
+ adjustment = new ScrollAdjustment (Backend.CreateAdjustment ());
+ return adjustment;
+ }
+ }
+
+ /// <summary>
+ /// Updates the adjustment value to ensure that a range is in the current page
+ /// </summary>
+ /// <param name='lower'>
+ /// The lower value
+ /// </param>
+ /// <param name='upper'>
+ /// The upper value
+ /// </param>
+ /// <remarks>
+ /// Updates the adjustment value to ensure that the range between lower and upper is in the current page
+ /// (i.e. between Value and Value + PageSize). If the range is larger than the page size, then only the
+ /// start of it will be in the current page. A "Changed" event will be raised if the value is changed.
+ /// </remarks>
+ public void ClampPage (double lower, double upper)
+ {
+ if (upper - lower >= PageSize || upper <= lower) {
+ Value = lower;
+ return;
+ }
+ if (lower >= Value && upper < Value + PageSize)
+ return;
+ if (lower < Value)
+ Value = lower;
+ else
+ Value = upper - PageSize;
+ }
+
+ public double Value {
+ get { return ScrollAdjustment.Value; }
+ set { ScrollAdjustment.Value = value; }
+ }
+
+ public double LowerValue {
+ get { return ScrollAdjustment.LowerValue; }
+ set { ScrollAdjustment.LowerValue = value; OnAdjustmentChanged (); }
+ }
+
+ public double UpperValue {
+ get { return ScrollAdjustment.UpperValue; }
+ set { ScrollAdjustment.UpperValue = value; OnAdjustmentChanged (); }
+ }
+
+ public double PageIncrement {
+ get { return ScrollAdjustment.PageIncrement; }
+ set { ScrollAdjustment.PageIncrement = value; OnAdjustmentChanged (); }
+ }
+
+ public double StepIncrement {
+ get { return ScrollAdjustment.StepIncrement; }
+ set { ScrollAdjustment.StepIncrement = value; OnAdjustmentChanged (); }
+ }
+
+ public double PageSize {
+ get { return ScrollAdjustment.PageSize; }
+ set { ScrollAdjustment.PageSize = value; OnAdjustmentChanged (); }
+ }
+
+ EventHandler valueChanged;
+
+ public event EventHandler ValueChanged {
+ add {
+ if (valueChanged == null)
+ ScrollAdjustment.ValueChanged += HandleValueChanged;
+ valueChanged += value;
+ }
+ remove {
+ valueChanged -= value;
+ if (valueChanged == null)
+ ScrollAdjustment.ValueChanged -= HandleValueChanged;
+ }
+ }
+
+ void HandleValueChanged (object sender, EventArgs e)
+ {
+ OnValueChanged (e);
+ }
+
+ protected virtual void OnValueChanged (EventArgs e)
+ {
+ if (valueChanged != null)
+ valueChanged (this, e);
+ }
+
+ /// <summary>
+ /// </summary>
+ /// <remarks>
+ /// This method is called when one of the properties of the adjustment changes.
+ /// It is not called if the Value changes. You can override OnValueChanged for
+ /// this use case.
+ /// </remarks>
+ protected virtual void OnAdjustmentChanged ()
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/SegmentedButton.cs b/external/xwt/Xwt/Xwt/SegmentedButton.cs
new file mode 100644
index 0000000..a27be07
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/SegmentedButton.cs
@@ -0,0 +1,123 @@
+//
+// SegmentedButton.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc
+//
+// 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.ObjectModel;
+using System.Collections.Generic;
+
+using Xwt.Backends;
+using Xwt.Drawing;
+
+namespace Xwt
+{
+ /// <summary>
+ /// A segmented button is an horizontal row of button homogeneously sized
+ /// </summary>
+ [BackendType (typeof(ISegmentedButtonBackend))]
+ public class SegmentedButton : Widget
+ {
+ class ButtonCollection : Collection<Button>
+ {
+ SegmentedButton parent;
+
+ ISegmentedButtonBackend Backend {
+ get {
+ return parent.Backend;
+ }
+ }
+
+ internal ButtonCollection (SegmentedButton parent)
+ {
+ this.parent = parent;
+ }
+
+ protected override void InsertItem (int index, Button item)
+ {
+ parent.RegisterChild (item);
+ Backend.AddChildButton (index, item);
+ base.InsertItem (index, item);
+ }
+
+ protected override void RemoveItem (int index)
+ {
+ parent.UnregisterChild (this [index]);
+ Backend.RemoveChildButton (index);
+ base.RemoveItem (index);
+ }
+
+ protected override void SetItem (int index, Button item)
+ {
+ parent.UnregisterChild (this [index]);
+ parent.RegisterChild (item);
+ Backend.ReplaceChildButton (index, item);
+ base.SetItem (index, item);
+ }
+
+ protected override void ClearItems ()
+ {
+ for (int i = 0; i < Count; i++) {
+ parent.UnregisterChild (this [i]);
+ Backend.RemoveChildButton (i);
+ }
+ base.ClearItems ();
+ }
+ }
+
+ ButtonCollection items;
+
+ public SegmentedButton ()
+ {
+ }
+
+ public SegmentedButton (IEnumerable<Button> buttons)
+ {
+ foreach (var button in buttons)
+ Items.Add (button);
+ }
+
+ ISegmentedButtonBackend Backend {
+ get { return (ISegmentedButtonBackend) BackendHost.Backend; }
+ }
+
+ public Collection<Button> Items {
+ get {
+ if (items == null)
+ items = new ButtonCollection (this);
+ return items;
+ }
+ }
+
+ public int ButtonDefaultSpacing {
+ get {
+ return Backend.Spacing;
+ }
+ set {
+ Backend.Spacing = value;
+ }
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/SelectColorDialog.cs b/external/xwt/Xwt/Xwt/SelectColorDialog.cs
index d2b37bc..496c304 100644
--- a/external/xwt/Xwt/Xwt/SelectColorDialog.cs
+++ b/external/xwt/Xwt/Xwt/SelectColorDialog.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using Xwt.Drawing;
-using Xwt.Engine;
+
using Xwt.Backends;
namespace Xwt
@@ -85,11 +85,11 @@ namespace Xwt
/// </summary>
public bool Run (WindowFrame parentWindow)
{
- var backend = WidgetRegistry.CreateBackend<ISelectColorDialogBackend> (GetType ());
+ var backend = Toolkit.CurrentEngine.Backend.CreateBackend<ISelectColorDialogBackend> ();
try {
if (color != Colors.Transparent)
backend.Color = color;
- return backend.Run ((IWindowFrameBackend)WidgetRegistry.GetBackend (parentWindow), title, supportsAlpha);
+ return backend.Run ((IWindowFrameBackend)Toolkit.CurrentEngine.GetSafeBackend (parentWindow), title, supportsAlpha);
} finally {
color = backend.Color;
backend.Dispose ();
diff --git a/external/xwt/Xwt/Xwt/SelectFolderDialog.cs b/external/xwt/Xwt/Xwt/SelectFolderDialog.cs
index 7ddb1d3..e2e2409 100644
--- a/external/xwt/Xwt/Xwt/SelectFolderDialog.cs
+++ b/external/xwt/Xwt/Xwt/SelectFolderDialog.cs
@@ -25,15 +25,17 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(ISelectFolderDialogBackend))]
public class SelectFolderDialog: XwtComponent
{
bool running;
bool multiselect;
string currentFolder;
+ bool canCreateFolders;
string title = "";
string folder;
string[] folders = new string[0];
@@ -101,7 +103,21 @@ namespace Xwt
currentFolder = value;
}
}
-
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance can create folders.
+ /// </summary>
+ /// <value><c>true</c> if this instance can create folders; otherwise, <c>false</c>.</value>
+ public bool CanCreateFolders {
+ get { return running ? Backend.CanCreateFolders : canCreateFolders; }
+ set {
+ if (running)
+ Backend.CanCreateFolders = value;
+ else
+ canCreateFolders = value;
+ }
+ }
+
/// <summary>
/// Gets or sets a value indicating whether the user can select multiple files
/// </summary>
@@ -139,7 +155,8 @@ namespace Xwt
Backend.CurrentFolder = currentFolder;
if (!string.IsNullOrEmpty (title))
Backend.Title = title;
- return Backend.Run ((IWindowFrameBackend)WidgetRegistry.GetBackend (parentWindow));
+ Backend.CanCreateFolders = canCreateFolders;
+ return Backend.Run ((IWindowFrameBackend)BackendHost.ToolkitEngine.GetSafeBackend (parentWindow));
} finally {
currentFolder = Backend.CurrentFolder;
folder = Backend.Folder;
diff --git a/external/xwt/Xwt/Xwt/Separator.cs b/external/xwt/Xwt/Xwt/Separator.cs
index 1d9de79..41786be 100644
--- a/external/xwt/Xwt/Xwt/Separator.cs
+++ b/external/xwt/Xwt/Xwt/Separator.cs
@@ -28,6 +28,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(ISeparatorBackend))]
public abstract class Separator: Widget
{
internal abstract Orientation Orientation { get; }
diff --git a/external/xwt/Xwt/Xwt/SeparatorMenuItem.cs b/external/xwt/Xwt/Xwt/SeparatorMenuItem.cs
index 92d7a58..4a33bb4 100644
--- a/external/xwt/Xwt/Xwt/SeparatorMenuItem.cs
+++ b/external/xwt/Xwt/Xwt/SeparatorMenuItem.cs
@@ -24,9 +24,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(ISeparatorMenuItemBackend))]
public class SeparatorMenuItem: MenuItem
{
public SeparatorMenuItem ()
diff --git a/external/xwt/Xwt/Xwt/Size.cs b/external/xwt/Xwt/Xwt/Size.cs
index 5884763..65d31c9 100755
--- a/external/xwt/Xwt/Xwt/Size.cs
+++ b/external/xwt/Xwt/Xwt/Size.cs
@@ -92,11 +92,16 @@ namespace Xwt {
return (s1.width != s2.width) || (s1.height != s2.height);
}
- public static explicit operator Point(Size size)
+ public static explicit operator Point (Size size)
{
return new Point (size.Width, size.Height);
}
+ public static explicit operator Distance (Size size)
+ {
+ return new Distance (size.Width, size.Height);
+ }
+
public override bool Equals (object ob)
{
return (ob is Size) && this == (Size)ob;
@@ -104,7 +109,9 @@ namespace Xwt {
public override int GetHashCode ()
{
- return width.GetHashCode () ^ height.GetHashCode ();
+ unchecked {
+ return (width.GetHashCode () * 397) ^ height.GetHashCode ();
+ }
}
public override string ToString ()
@@ -150,9 +157,9 @@ namespace Xwt {
if (i == -1)
return Size.Zero;
double w, h;
- if (!double.TryParse (value.Substring (0, i), out w))
+ if (!double.TryParse (value.Substring (0, i), NumberStyles.Any, CultureInfo.InvariantCulture, out w))
return Size.Zero;
- if (!double.TryParse (value.Substring (i+1), out h))
+ if (!double.TryParse (value.Substring (i+1), NumberStyles.Any, CultureInfo.InvariantCulture, out h))
return Size.Zero;
return new Size (w, h);
}
diff --git a/external/xwt/Xwt/Xwt/SizeConstraint.cs b/external/xwt/Xwt/Xwt/SizeConstraint.cs
new file mode 100644
index 0000000..016c3ce
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/SizeConstraint.cs
@@ -0,0 +1,112 @@
+//
+// SizeConstraint.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public struct SizeConstraint
+ {
+ // The value '0' is used for Unconstrained, since that's the default value of SizeContraint
+ // Since a constraint of '0' is valid, we use NegativeInfinity as a marker for constraint=0.
+ double value;
+
+ public static readonly SizeConstraint Unconstrained;
+
+ static public implicit operator SizeConstraint (double size)
+ {
+ return new SizeConstraint () { AvailableSize = size };
+ }
+
+ public static SizeConstraint WithSize (double size)
+ {
+ return new SizeConstraint () { AvailableSize = size };
+ }
+
+ public double AvailableSize {
+ get {
+ if (double.IsNegativeInfinity (value))
+ return 0;
+ else
+ return value;
+ }
+ set {
+ if (value <= 0)
+ this.value = double.NegativeInfinity;
+ else
+ this.value = value;
+ }
+ }
+
+ public bool IsConstrained {
+ get { return value != 0; }
+ }
+
+ public static bool operator == (SizeConstraint s1, SizeConstraint s2)
+ {
+ return (s1.value == s2.value);
+ }
+
+ public static bool operator != (SizeConstraint s1, SizeConstraint s2)
+ {
+ return (s1.value != s2.value);
+ }
+
+ public static SizeConstraint operator + (SizeConstraint c, double s)
+ {
+ if (!c.IsConstrained)
+ return c;
+ else
+ return SizeConstraint.WithSize (c.AvailableSize + s);
+ }
+
+ public static SizeConstraint operator - (SizeConstraint c, double s)
+ {
+ if (!c.IsConstrained)
+ return c;
+ else
+ return SizeConstraint.WithSize (Math.Max (c.AvailableSize - s, 0));
+ }
+
+ public override bool Equals (object ob)
+ {
+ return (ob is SizeConstraint) && this == (SizeConstraint)ob;
+ }
+
+ public override int GetHashCode ()
+ {
+ return value.GetHashCode ();
+ }
+
+ public override string ToString ()
+ {
+ if (IsConstrained)
+ return AvailableSize.ToString ();
+ else
+ return "Unconstrained";
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/SizeRequestMode.cs b/external/xwt/Xwt/Xwt/SizeRequestMode.cs
deleted file mode 100644
index 56416a9..0000000
--- a/external/xwt/Xwt/Xwt/SizeRequestMode.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// SizeRequestMode.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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;
-
-namespace Xwt
-{
- public enum SizeRequestMode
- {
- HeightForWidth,
- WidthForHeight
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt/Slider.cs b/external/xwt/Xwt/Xwt/Slider.cs
new file mode 100644
index 0000000..05441a6
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/Slider.cs
@@ -0,0 +1,99 @@
+//
+// Slider.cs
+//
+// Author:
+// Jérémie Laval <jeremie.laval at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin, Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt
+{
+ [BackendType (typeof(ISliderBackend))]
+ public abstract class Slider : Widget
+ {
+ Orientation orientation;
+
+ internal Slider (Orientation orientation)
+ {
+ this.orientation = orientation;
+ }
+
+ protected new class WidgetBackendHost: Widget.WidgetBackendHost<Slider,ISliderBackend>, ISliderEventSink
+ {
+ protected override void OnBackendCreated ()
+ {
+ Backend.Initialize (Parent.orientation);
+ base.OnBackendCreated ();
+ }
+
+ public void ValueChanged ()
+ {
+ ((Slider)Parent).OnValueChanged (EventArgs.Empty);
+ }
+ }
+
+ ISliderBackend Backend {
+ get { return (ISliderBackend) BackendHost.Backend; }
+ }
+
+ protected override BackendHost CreateBackendHost ()
+ {
+ return new WidgetBackendHost ();
+ }
+
+ public double Value {
+ get { return Backend.Value; }
+ set { Backend.Value = value; }
+ }
+
+ public double MinimumValue {
+ get { return Backend.MinimumValue; }
+ set { Backend.MinimumValue = value; }
+ }
+
+ public double MaximumValue {
+ get { return Backend.MaximumValue; }
+ set { Backend.MaximumValue = value; }
+ }
+
+ protected virtual void OnValueChanged (EventArgs e)
+ {
+ if (valueChanged != null)
+ valueChanged (this, e);
+ }
+
+ EventHandler valueChanged;
+
+ public event EventHandler ValueChanged {
+ add {
+ BackendHost.OnBeforeEventAdd (SliderEvent.ValueChanged, valueChanged);
+ valueChanged += value;
+ }
+ remove {
+ valueChanged -= value;
+ BackendHost.OnAfterEventRemove (SliderEvent.ValueChanged, valueChanged);
+ }
+ }
+ }
+}
diff --git a/external/xwt/Xwt/Xwt/SpinButton.cs b/external/xwt/Xwt/Xwt/SpinButton.cs
index 0dea808..1d733bc 100644
--- a/external/xwt/Xwt/Xwt/SpinButton.cs
+++ b/external/xwt/Xwt/Xwt/SpinButton.cs
@@ -29,6 +29,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(ISpinButtonBackend))]
public class SpinButton : Widget
{
ButtonStyle style;
@@ -93,6 +94,16 @@ namespace Xwt
OnPreferredSizeChanged ();
}
}
+
+ public string IndeterminateMessage {
+ get { return Backend.IndeterminateMessage; }
+ set { Backend.IndeterminateMessage = value; }
+ }
+
+ public bool IsIndeterminate {
+ get { return Backend.IsIndeterminate; }
+ set { Backend.IsIndeterminate = value; }
+ }
protected virtual void OnValueChanged (EventArgs e)
{
diff --git a/external/xwt/Xwt/Xwt/Spinner.cs b/external/xwt/Xwt/Xwt/Spinner.cs
index 41ec830..ffd62ef 100644
--- a/external/xwt/Xwt/Xwt/Spinner.cs
+++ b/external/xwt/Xwt/Xwt/Spinner.cs
@@ -26,9 +26,11 @@
using System;
using Xwt.Backends;
+using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(ISpinnerBackend))]
public class Spinner : Widget
{
ISpinnerBackend Backend {
@@ -39,6 +41,7 @@ namespace Xwt
{
}
+ [DefaultValue (false)]
public bool Animate {
get {
return Backend.IsAnimating;
diff --git a/external/xwt/Xwt/Xwt/StatusIcon.cs b/external/xwt/Xwt/Xwt/StatusIcon.cs
index b8cf889..1e5fb97 100644
--- a/external/xwt/Xwt/Xwt/StatusIcon.cs
+++ b/external/xwt/Xwt/Xwt/StatusIcon.cs
@@ -32,6 +32,7 @@ using Xwt.Backends;
namespace Xwt
{
+ [BackendType (typeof(IStatusIconBackend))]
public class StatusIcon : XwtComponent
{
Image image;
@@ -48,7 +49,7 @@ namespace Xwt
public Image Image {
get { return image; }
- set { image = value; Backend.SetImage (XwtObject.GetBackend (value)); }
+ set { image = value; Backend.SetImage (image != null ? image.ImageDescription : ImageDescription.Null); }
}
IStatusIconBackend Backend {
diff --git a/external/xwt/Xwt/Xwt/StockIcons.cs b/external/xwt/Xwt/Xwt/StockIcons.cs
index 33bb079..bdd2371 100644
--- a/external/xwt/Xwt/Xwt/StockIcons.cs
+++ b/external/xwt/Xwt/Xwt/StockIcons.cs
@@ -24,23 +24,30 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using Xwt.Drawing;
+using Xwt.Backends;
namespace Xwt
{
public static class StockIcons
{
- public const string Error = "Error";
- public const string Warning = "Warning";
- public const string Information = "Information";
- public const string Question = "Question";
- public const string OrientationPortrait = "Portrait";
- public const string OrientationLandscape = "Landscape";
- public const string ZoomIn = "ZoomIn";
- public const string ZoomOut = "ZoomOut";
- public const string ZoomFit = "ZoomFit";
- public const string Zoom100 = "Zoom100";
- public const string Add = "Add";
- public const string Remove = "Remove";
+ static Image GetIcon (string id)
+ {
+ return Toolkit.CurrentEngine.GetStockIcon (id);
+ }
+
+ public static Image Error { get { return GetIcon (StockIconId.Error); } }
+ public static Image Warning { get { return GetIcon (StockIconId.Warning); } }
+ public static Image Information { get { return GetIcon (StockIconId.Information); } }
+ public static Image Question { get { return GetIcon (StockIconId.Question); } }
+ public static Image OrientationPortrait { get { return GetIcon (StockIconId.OrientationPortrait); } }
+ public static Image OrientationLandscape { get { return GetIcon (StockIconId.OrientationLandscape); } }
+ public static Image ZoomIn { get { return GetIcon (StockIconId.ZoomIn); } }
+ public static Image ZoomOut { get { return GetIcon (StockIconId.ZoomOut); } }
+ public static Image ZoomFit { get { return GetIcon (StockIconId.ZoomFit); } }
+ public static Image Zoom100 { get { return GetIcon (StockIconId.Zoom100); } }
+ public static Image Add { get { return GetIcon (StockIconId.Add); } }
+ public static Image Remove { get { return GetIcon (StockIconId.Remove); } }
}
}
diff --git a/external/xwt/Xwt/Xwt/Table.cs b/external/xwt/Xwt/Xwt/Table.cs
old mode 100755
new mode 100644
index 81a356b..276fbf0
--- a/external/xwt/Xwt/Xwt/Table.cs
+++ b/external/xwt/Xwt/Xwt/Table.cs
@@ -35,9 +35,10 @@ using Xwt.Drawing;
namespace Xwt
{
- public class Table: Widget
+ [BackendType (typeof(IBoxBackend))]
+ public partial class Table: Widget
{
- ChildrenCollection<TablePlacement> children;
+ ChildrenCollection<TablePlacement> placements;
double defaultRowSpacing = 6;
double defaultColSpacing = 6;
Dictionary<int,double> rowSpacing;
@@ -77,9 +78,7 @@ namespace Xwt
public Table ()
{
- children = new ChildrenCollection<TablePlacement> ((WidgetBackendHost)BackendHost);
- // For some reason the table has a black background by default in WPF. Lets work around that
- BackgroundColor = Colors.White;
+ placements = new ChildrenCollection<TablePlacement> ((WidgetBackendHost)BackendHost);
}
[DefaultValue(6)]
@@ -111,46 +110,92 @@ namespace Xwt
}
public ChildrenCollection<TablePlacement> Placements {
- get { return children; }
+ get { return placements; }
}
public IEnumerable<Widget> Children {
- get { return children.Select (c => c.Child); }
+ get { return placements.Select (c => c.Child); }
}
+ [Obsolete ("Use the Add method")]
public void Attach (Widget widget, int left, int top)
{
- Attach (widget, left, top, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand);
+ Attach (widget, left, top, null, null);
}
- public void Attach (Widget widget, int left, int top, AttachOptions xOptions, AttachOptions yOptions)
+ [Obsolete ("Use the Add method")]
+ public void Attach (Widget widget, int left, int top, AttachOptions? xOptions, AttachOptions? yOptions)
{
Attach (widget, left, left + 1, top, top + 1, xOptions, yOptions);
}
-
+
+ [Obsolete ("Use the Add method")]
public void Attach (Widget widget, int left, int right, int top, int bottom)
{
- Attach (widget, left, right, top, bottom, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand);
+ Attach (widget, left, right, top, bottom, (AttachOptions?)null, (AttachOptions?)null);
}
- public void Attach (Widget widget, int left, int right, int top, int bottom, AttachOptions xOptions, AttachOptions yOptions)
+ public void Add (Widget widget, int left, int top, int rowspan = 1, int colspan = 1, bool hexpand = false, bool vexpand = false, WidgetPlacement hpos = WidgetPlacement.Fill, WidgetPlacement vpos = WidgetPlacement.Fill, double marginLeft = -1, double marginTop = -1, double marginRight = -1, double marginBottom = -1, double margin = -1)
+ {
+ if (vpos != default (WidgetPlacement))
+ widget.VerticalPlacement = vpos;
+ if (hpos != default (WidgetPlacement))
+ widget.HorizontalPlacement = hpos;
+
+ widget.ExpandHorizontal = hexpand;
+ widget.ExpandVertical = vexpand;
+
+ if (margin != -1)
+ widget.Margin = margin;
+ if (marginLeft != -1)
+ widget.MarginLeft = marginLeft;
+ if (marginTop != -1)
+ widget.MarginTop = marginTop;
+ if (marginTop != -1)
+ widget.MarginRight = marginRight;
+ if (marginBottom != -1)
+ widget.MarginBottom = marginBottom;
+
+ var p = new TablePlacement ((WidgetBackendHost)BackendHost, widget) {
+ Left = left,
+ Right = left + colspan,
+ Top = top,
+ Bottom = top + rowspan
+ };
+ placements.Add (p);
+ }
+
+ public void Attach (Widget widget, int left, int right, int top, int bottom, AttachOptions? xOptions = null, AttachOptions? yOptions = null)
{
+ if (xOptions != null) {
+ widget.ExpandHorizontal = (xOptions.Value & AttachOptions.Expand) != 0;
+ if ((xOptions.Value & AttachOptions.Fill) != 0)
+ widget.HorizontalPlacement = WidgetPlacement.Fill;
+ else
+ widget.HorizontalPlacement = WidgetPlacement.Center;
+ }
+ if (yOptions != null) {
+ widget.ExpandVertical = (yOptions.Value & AttachOptions.Expand) != 0;
+ if ((yOptions.Value & AttachOptions.Fill) != 0)
+ widget.VerticalPlacement = WidgetPlacement.Fill;
+ else
+ widget.VerticalPlacement = WidgetPlacement.Center;
+ }
+
var p = new TablePlacement ((WidgetBackendHost)BackendHost, widget) {
Left = left,
Right = right,
Top = top,
- Bottom = bottom,
- XOptions = xOptions,
- YOptions = yOptions
+ Bottom = bottom
};
- children.Add (p);
+ placements.Add (p);
}
public bool Remove (Widget widget)
{
- for (int n=0; n<children.Count; n++) {
- if (children[n].Child == widget) {
- children.RemoveAt (n);
+ for (int n=0; n<placements.Count; n++) {
+ if (placements[n].Child == widget) {
+ placements.RemoveAt (n);
return true;
}
}
@@ -159,7 +204,7 @@ namespace Xwt
public void InsertRow (int top, int bottom)
{
- var potentials = children.Where (c => c.Top >= top);
+ var potentials = placements.Where (c => c.Top >= top);
var shift = bottom - top;
foreach (var toShift in potentials) {
toShift.Top += shift;
@@ -172,7 +217,7 @@ namespace Xwt
/// </summary>
public void Clear ()
{
- children.Clear ();
+ placements.Clear ();
}
void OnAdd (Widget child, TablePlacement placement)
@@ -200,423 +245,34 @@ namespace Xwt
OnRemove (oldWidget);
OnAdd (newWidget, placement);
}
-
+
protected override void OnReallocate ()
{
- var size = Backend.Size;
- var mode = Surface.SizeRequestMode;
- if (mode == SizeRequestMode.HeightForWidth) {
- CalcDefaultSizes (mode, size.Width, false, true);
- CalcDefaultSizes (mode, size.Height, true, true);
- } else {
- CalcDefaultSizes (mode, size.Height, true, true);
- CalcDefaultSizes (mode, size.Width, false, true);
- }
-
- var visibleChildren = children.Where (c => c.Child.Visible).ToArray ();
+ Reallocate (Backend.Size);
+
+ TablePlacement[] visibleChildren = VisibleChildren ();
IWidgetBackend[] widgets = new IWidgetBackend [visibleChildren.Length];
Rectangle[] rects = new Rectangle [visibleChildren.Length];
for (int n=0; n<visibleChildren.Length; n++) {
var bp = visibleChildren [n];
widgets [n] = (IWidgetBackend)GetBackend (bp.Child);
- rects [n] = new Rectangle (bp.NextX, bp.NextY, bp.NextWidth, bp.NextHeight);
+ var margin = bp.Child.Margin;
+ rects [n] = new Rectangle (bp.NextX + margin.Left, bp.NextY + margin.Top, bp.NextWidth - margin.HorizontalSpacing, bp.NextHeight - margin.VerticalSpacing).Round ().WithPositiveSize ();
}
-
+
Backend.SetAllocation (widgets, rects);
-
- if (!Application.EngineBackend.HandlesSizeNegotiation) {
+
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation) {
foreach (var bp in visibleChildren)
bp.Child.Surface.Reallocate ();
}
}
-
- double GetSpacing (int cell, bool isRow)
- {
- double sp;
- if (isRow) {
- if (rowSpacing != null && rowSpacing.TryGetValue (cell, out sp))
- return sp;
- else
- return defaultRowSpacing;
- } else {
- if (colSpacing != null && colSpacing.TryGetValue (cell, out sp))
- return sp;
- else
- return defaultColSpacing;
- }
- }
-
- void CalcDefaultSizes (SizeRequestMode mode, bool calcHeights, out TablePlacement[] visibleChildren, out Dictionary<int,WidgetSize> fixedSizesByCell, out HashSet<int> cellsWithExpand, out WidgetSize[] sizes, out double spacing)
- {
- bool useLengthConstraint = mode == SizeRequestMode.HeightForWidth && calcHeights || mode == SizeRequestMode.WidthForHeight && !calcHeights;
- visibleChildren = children.Where (b => b.Child.Visible).ToArray ();
- int lastCell = 0;
- fixedSizesByCell = new Dictionary<int, WidgetSize> ();
- cellsWithExpand = new HashSet<int> ();
- HashSet<int> cellsWithWidget = new HashSet<int> ();
- sizes = new WidgetSize [visibleChildren.Length];
-
- // Get the size of each widget and store the fixed sizes for widgets which don't span more than one cell
-
- for (int n=0; n<visibleChildren.Length; n++) {
- var bp = visibleChildren[n];
- int start = GetStartAttach (bp, calcHeights);
- int end = GetEndAttach (bp, calcHeights);
-
- if (end > lastCell)
- lastCell = end;
-
- // Check if the cell is expandable and store the value
- AttachOptions ops = calcHeights ? bp.YOptions : bp.XOptions;
- for (int i=start; i < end; i++) {
- cellsWithWidget.Add (i);
- if ((ops & AttachOptions.Expand) != 0)
- cellsWithExpand.Add (i);
- }
-
- WidgetSize s;
- if (useLengthConstraint)
- s = GetPreferredLengthForSize (mode, bp.Child, calcHeights ? bp.NextWidth : bp.NextHeight);
- else
- s = GetPreferredSize (calcHeights, bp.Child);
- sizes [n] = s;
-
- if (end == start + 1) {
- // The widget only takes one cell. Store its size if it is the biggest
- bool changed = false;
- WidgetSize fs;
- fixedSizesByCell.TryGetValue (start, out fs);
- if (s.MinSize > fs.MinSize) {
- fs.MinSize = s.MinSize;
- changed = true;
- }
- if (s.NaturalSize > fs.NaturalSize) {
- fs.NaturalSize = s.NaturalSize;
- changed = true;
- }
- if (changed)
- fixedSizesByCell [start] = fs;
- }
- }
-
- // For widgets that span more than one cell, calculate the floating size, that is, the size
- // which is not taken by other fixed size widgets
-
- List<TablePlacement> widgetsToAdjust = new List<TablePlacement> ();
- Dictionary<TablePlacement,WidgetSize[]> growSizes = new Dictionary<TablePlacement, WidgetSize[]> ();
-
- for (int n=0; n<visibleChildren.Length; n++) {
- var bp = visibleChildren[n];
- int start = GetStartAttach (bp, calcHeights);
- int end = GetEndAttach (bp, calcHeights);
- if (end == start + 1)
- continue;
- widgetsToAdjust.Add (bp);
-
- WidgetSize fixedSize = new WidgetSize (0);
-
- // We are going to calculate the spacing included in the widget's span of cells
- // (there is spacing between each cell)
- double spanSpacing = 0;
-
- for (int c = start; c < end; c++) {
- WidgetSize fs;
- fixedSizesByCell.TryGetValue (c, out fs);
- fixedSize += fs;
- if (c != start && c != end)
- spanSpacing += GetSpacing (c, calcHeights);
- }
-
- // sizeToGrow is the size that the whole cell span has to grow in order to fit
- // this widget. We substract the spacing between cells because that space will
- // be used by the widget, so we don't need to allocate more size for it
-
- WidgetSize sizeToGrow = sizes [n] - fixedSize - new WidgetSize (spanSpacing);
-
- WidgetSize sizeToGrowPart = new WidgetSize (sizeToGrow.MinSize / (end - start), sizeToGrow.NaturalSize / (end - start));
-
- // Split the size to grow between the cells of the widget. We need to know how much size the widget
- // requires for each cell it covers.
-
- WidgetSize[] widgetGrowSizes = new WidgetSize [end - start];
- for (int i=0; i<widgetGrowSizes.Length; i++)
- widgetGrowSizes [i] = sizeToGrowPart;
- growSizes[bp] = widgetGrowSizes;
- }
-
- // Now size-to-grow values have to be adjusted. For example, let's say widget A requires 100px for column 1 and 100px for column 2, and widget B requires
- // 60px for column 2 and 60px for column 3. So the widgets are overlapping at column 2. Since A requires at least 100px in column 2, it means that B can assume
- // that it will have 100px available in column 2, which means 40px more than it requested. Those extra 40px can then be substracted from the 60px that
- // it required for column 3.
-
- foreach (var n in cellsWithWidget) {
- // Get a list of all widgets that cover this cell
- var colCells = widgetsToAdjust.Where (bp => GetStartAttach (bp, calcHeights) <= n && GetEndAttach (bp, calcHeights) > n).ToArray ();
- WidgetSize maxv = new WidgetSize (0);
- TablePlacement maxtMin = null;
- TablePlacement maxtNatural = null;
-
- // Find the widget that requires the maximum size for this cell
- foreach (var bp in colCells) {
- WidgetSize cv = growSizes[bp][n - GetStartAttach (bp, calcHeights)];
- if (cv.MinSize > maxv.MinSize) {
- maxv.MinSize = cv.MinSize;
- maxtMin = bp;
- }
- if (cv.NaturalSize > maxv.NaturalSize) {
- maxv.NaturalSize = cv.NaturalSize;
- maxtNatural = bp;
- }
- }
-
- // Adjust the required size of all widgets of the cell (excluding the widget with the max size)
- foreach (var bp in colCells) {
- WidgetSize[] widgetGrows = growSizes[bp];
- int cellIndex = n - GetStartAttach (bp, calcHeights);
- if (bp != maxtMin) {
- double cv = widgetGrows[cellIndex].MinSize;
- // splitExtraSpace is the additional space that the widget can take from this cell (because there is a widget
- // that is requiring more space), split among all other cells of the widget
- double splitExtraSpace = (maxv.MinSize - cv) / (widgetGrows.Length - 1);
- for (int i=0; i<widgetGrows.Length; i++)
- widgetGrows[i].MinSize -= splitExtraSpace;
- }
- if (bp != maxtNatural) {
- double cv = widgetGrows[cellIndex].NaturalSize;
- double splitExtraSpace = (maxv.NaturalSize - cv) / (widgetGrows.Length - 1);
- for (int i=0; i<widgetGrows.Length; i++)
- widgetGrows[i].NaturalSize -= splitExtraSpace;
- }
- }
- }
-
- // Find the maximum size-to-grow for each cell
-
- Dictionary<int,WidgetSize> finalGrowTable = new Dictionary<int, WidgetSize> ();
-
- foreach (var bp in widgetsToAdjust) {
- int start = GetStartAttach (bp, calcHeights);
- int end = GetEndAttach (bp, calcHeights);
- WidgetSize[] widgetGrows = growSizes[bp];
- for (int n=start; n<end; n++) {
- WidgetSize curGrow;
- finalGrowTable.TryGetValue (n, out curGrow);
- var val = widgetGrows [n - start];
- if (val.MinSize > curGrow.MinSize)
- curGrow.MinSize = val.MinSize;
- if (val.NaturalSize > curGrow.NaturalSize)
- curGrow.NaturalSize = val.NaturalSize;
- finalGrowTable [n] = curGrow;
- }
- }
-
- // Add the final size-to-grow to the fixed sizes calculated at the begining
-
- foreach (var it in finalGrowTable) {
- WidgetSize ws;
- fixedSizesByCell.TryGetValue (it.Key, out ws);
- fixedSizesByCell [it.Key] = it.Value + ws;
- }
-
- spacing = 0;
- for (int n=1; n<lastCell; n++) {
- if (cellsWithWidget.Contains (n))
- spacing += GetSpacing (n, calcHeights);
- }
-
- }
-
- void CalcDefaultSizes (SizeRequestMode mode, double totalSize, bool calcHeights, bool calcOffsets)
+ protected override Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- TablePlacement[] visibleChildren;
- Dictionary<int,WidgetSize> fixedSizesByCell;
- HashSet<int> cellsWithExpand;
- WidgetSize[] sizes;
- double spacing;
-
- CalcDefaultSizes (mode, calcHeights, out visibleChildren, out fixedSizesByCell, out cellsWithExpand, out sizes, out spacing);
-
- double naturalSize = 0;
-
- // Get the total natural size
- foreach (var ws in fixedSizesByCell.Values)
- naturalSize += ws.NaturalSize;
-
- double remaining = totalSize - naturalSize - spacing;
-
- if (remaining < 0) {
- // The box is not big enough to fit the widgets using its natural size.
- // We have to shrink the cells
-
- // List of cell indexes that we have to shrink
- var toShrink = new List<int> (fixedSizesByCell.Keys);
-
- // The total amount we have to shrink
- double shrinkSize = -remaining;
-
- while (toShrink.Count > 0 && shrinkSize > 0) {
- SizeSplitter sizePart = new SizeSplitter (shrinkSize, toShrink.Count);
- shrinkSize = 0;
- for (int i=0; i < toShrink.Count; i++) {
- int n = toShrink[i];
- double reduction = sizePart.NextSizePart ();
- WidgetSize size;
- fixedSizesByCell.TryGetValue (n, out size);
- size.NaturalSize -= reduction;
-
- if (size.NaturalSize < size.MinSize) {
- // If the widget can't be shrinked anymore, we remove it from the shrink list
- // and increment the remaining shrink size. We'll loop again and this size will be
- // substracted from the cells which can still be reduced
- shrinkSize += (size.MinSize - size.NaturalSize);
- size.NaturalSize = size.MinSize;
- toShrink.RemoveAt (i);
- i--;
- }
- fixedSizesByCell [n] = size;
- }
- }
- }
- else {
- int nexpands = cellsWithExpand.Count;
- var expandRemaining = new SizeSplitter (remaining, nexpands);
- foreach (var c in cellsWithExpand) {
- WidgetSize ws;
- fixedSizesByCell.TryGetValue (c, out ws);
- ws.NaturalSize += expandRemaining.NextSizePart ();
- fixedSizesByCell [c] = ws;
- }
- }
-
- for (int n=0; n<visibleChildren.Length; n++) {
- var bp = visibleChildren[n];
- double allocatedSize = 0;
- double cellOffset = 0;
- AttachOptions ops = calcHeights ? bp.YOptions : bp.XOptions;
-
- int start = GetStartAttach (bp, calcHeights);
- int end = GetEndAttach (bp, calcHeights);
- for (int i=start; i<end; i++) {
- WidgetSize ws;
- fixedSizesByCell.TryGetValue (i, out ws);
- allocatedSize += ws.NaturalSize;
- if (i != start)
- allocatedSize += GetSpacing (i, calcHeights);
- }
-
- if ((ops & AttachOptions.Fill) == 0) {
- double s = sizes[n].NaturalSize;
- if (s < allocatedSize) {
- cellOffset = (allocatedSize - s) / 2;
- allocatedSize = s;
- }
- }
-
- // cellOffset is the offset of the widget inside the cell. We store it in NextX/Y, and
- // will be used below to calculate the total offset of the widget
-
- if (calcHeights) {
- bp.NextHeight = allocatedSize;
- bp.NextY = cellOffset;
- }
- else {
- bp.NextWidth = allocatedSize;
- bp.NextX = cellOffset;
- }
- }
-
- if (calcOffsets) {
- var sortedChildren = visibleChildren.OrderBy (c => GetStartAttach (c, calcHeights)).ToArray();
- var cells = fixedSizesByCell.OrderBy (c => c.Key);
- double offset = 0;
- int n = 0;
- foreach (var c in cells) {
- if (c.Key > 0)
- offset += GetSpacing (c.Key, calcHeights);
- while (n < sortedChildren.Length && GetStartAttach (sortedChildren[n], calcHeights) == c.Key) {
- // In the loop above we store the offset of the widget inside the cell in the NextX/Y field
- // so now we have to add (not just assign) the offset of the cell to NextX/Y
- if (calcHeights)
- sortedChildren[n].NextY += offset;
- else
- sortedChildren[n].NextX += offset;
- n++;
- }
- offset += c.Value.NaturalSize;
- }
- }
- }
-
- WidgetSize CalcSize (bool calcHeights)
- {
- TablePlacement[] visibleChildren;
- Dictionary<int,WidgetSize> fixedSizesByCell;
- HashSet<int> cellsWithExpand;
- WidgetSize[] sizes;
- double spacing;
- SizeRequestMode mode = calcHeights ? SizeRequestMode.WidthForHeight : SizeRequestMode.HeightForWidth;
-
- CalcDefaultSizes (mode, calcHeights, out visibleChildren, out fixedSizesByCell, out cellsWithExpand, out sizes, out spacing);
-
- WidgetSize size = new WidgetSize (spacing);
- foreach (var s in fixedSizesByCell.Values)
- size += s;
- return size;
- }
-
- protected override WidgetSize OnGetPreferredWidth ()
- {
- return CalcSize (false);
- }
-
- protected override WidgetSize OnGetPreferredHeight ()
- {
- return CalcSize (true);
- }
-
- protected override WidgetSize OnGetPreferredHeightForWidth (double width)
- {
- CalcDefaultSizes (SizeRequestMode.HeightForWidth, width, false, false);
- return CalcSize (true);
- }
-
- protected override WidgetSize OnGetPreferredWidthForHeight (double height)
- {
- CalcDefaultSizes (SizeRequestMode.WidthForHeight, height, true, false);
- return CalcSize (false);
- }
-
- int GetStartAttach (TablePlacement tp, bool calcHeight)
- {
- if (calcHeight)
- return tp.Top;
- else
- return tp.Left;
- }
-
- int GetEndAttach (TablePlacement tp, bool calcHeight)
- {
- if (calcHeight)
- return tp.Bottom;
- else
- return tp.Right;
- }
-
- WidgetSize GetPreferredSize (bool calcHeight, Widget w)
- {
- if (calcHeight)
- return w.Surface.GetPreferredHeight ();
- else
- return w.Surface.GetPreferredWidth ();
- }
-
- WidgetSize GetPreferredLengthForSize (SizeRequestMode mode, Widget w, double width)
- {
- if (mode == SizeRequestMode.WidthForHeight)
- return w.Surface.GetPreferredWidthForHeight (width);
- else
- return w.Surface.GetPreferredHeightForWidth (width);
+ var wc = widthConstraint.IsConstrained ? widthConstraint.AvailableSize : double.PositiveInfinity;
+ var hc = heightConstraint.IsConstrained ? heightConstraint.AvailableSize : double.PositiveInfinity;
+ return GetPreferredSize (wc, hc);
}
}
@@ -625,7 +281,6 @@ namespace Xwt
{
IContainerEventSink<TablePlacement> parent;
int left, right, top, bottom;
- AttachOptions xOptions, yOptions;
Widget child;
internal TablePlacement (IContainerEventSink<TablePlacement> parent, Widget child)
@@ -687,21 +342,42 @@ namespace Xwt
parent.ChildReplaced (this, old, value);
}
}
-
- public AttachOptions XOptions {
- get { return xOptions; }
- set {
- xOptions = value;
- parent.ChildChanged (this, "XOptions");
- }
+
+ internal Size GetPreferredSize (double width, double height)
+ {
+ var wc = double.IsPositiveInfinity (width) ? SizeConstraint.Unconstrained : SizeConstraint.WithSize (width);
+ var hc = double.IsPositiveInfinity (height) ? SizeConstraint.Unconstrained : SizeConstraint.WithSize (height);
+ return Child.Surface.GetPreferredSize (wc, hc);
}
- public AttachOptions YOptions {
- get { return yOptions; }
- set {
- yOptions = value;
- parent.ChildChanged (this, "YOptions");
- }
+ internal float GetAlignmentForOrientation (Orientation o)
+ {
+ var p = child.AlignmentForOrientation (o);
+ if (p == WidgetPlacement.Fill)
+ return float.NaN;
+ else
+ return (float)p.GetValue ();
+ }
+
+ internal bool GetExpandsForOrientation (Orientation o)
+ {
+ return child.ExpandsForOrientation (o);
+ }
+
+ internal double LeftMargin {
+ get { return child.MarginLeft; }
+ }
+
+ internal double TopMargin {
+ get { return child.MarginTop; }
+ }
+
+ internal double RightMargin {
+ get { return child.MarginRight; }
+ }
+
+ internal double BottomMargin {
+ get { return child.MarginBottom; }
}
}
diff --git a/external/xwt/Xwt/Xwt/TableCalc.cs b/external/xwt/Xwt/Xwt/TableCalc.cs
new file mode 100644
index 0000000..42c8f50
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/TableCalc.cs
@@ -0,0 +1,521 @@
+//
+// TableLayout.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Xwt
+{
+ partial class Table
+ {
+ void Reallocate (Size size)
+ {
+ TablePlacement[] visibleChildren = VisibleChildren ();
+ var childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, false);
+ var w = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Horizontal);
+ CalcCellSizes (w, size.Width, true);
+ childrenSizes = GetPreferredChildrenSizes (visibleChildren, true, false);
+ var h = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+ CalcCellSizes (h, size.Height, true);
+ }
+
+ Size GetPreferredSize (double widthConstraint, double heightConstraint)
+ {
+ TablePlacement[] visibleChildren = VisibleChildren ();
+
+ if (double.IsPositiveInfinity (widthConstraint) && double.IsPositiveInfinity (heightConstraint)) {
+ var childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, false);
+ var w = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Horizontal);
+ var h = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+ return new Size (w.TotalSize, h.TotalSize);
+ }
+ else if (double.IsPositiveInfinity (widthConstraint)) {
+ var childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, false);
+ var h = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+ CalcCellSizes (h, heightConstraint, false);
+
+ childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, true);
+ var w = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Horizontal);
+ return new Size (w.TotalSize, heightConstraint);
+ }
+ else if (double.IsPositiveInfinity (heightConstraint)) {
+ var childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, false);
+ var w = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Horizontal);
+ CalcCellSizes (w, widthConstraint, false);
+
+ childrenSizes = GetPreferredChildrenSizes (visibleChildren, true, false);
+ var h = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+ return new Size (widthConstraint, h.TotalSize);
+ }
+ else {
+ var childrenSizes = GetPreferredChildrenSizes (visibleChildren, false, false);
+ var width = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Horizontal);
+ var height = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+
+ if (width.TotalSize <= widthConstraint)
+ return new Size (width.TotalSize, height.TotalSize);
+
+ CalcCellSizes (width, widthConstraint, false);
+ childrenSizes = GetPreferredChildrenSizes (visibleChildren, true, false);
+ height = CalcPreferredCellSizes (visibleChildren, childrenSizes, Orientation.Vertical);
+ return new Size (widthConstraint, Math.Min (heightConstraint, height.TotalSize));
+ }
+ }
+
+ TablePlacement[] VisibleChildren ()
+ {
+ TablePlacement[] result = new TablePlacement[placements.Count];
+
+ int j = 0;
+ for (int i = 0; i < placements.Count; i++) {
+ var item = placements[i];
+ if (item.Child.Visible) {
+ result[j] = item;
+ j++;
+ }
+ }
+
+ if (j != placements.Count) {
+ Array.Resize (ref result, j);
+ }
+
+ return result;
+ }
+
+ double GetSpacing (int cell, Orientation orientation)
+ {
+ double sp;
+ if (orientation == Orientation.Vertical) {
+ if (rowSpacing != null && rowSpacing.TryGetValue (cell, out sp))
+ return sp;
+ else
+ return defaultRowSpacing;
+ } else {
+ if (colSpacing != null && colSpacing.TryGetValue (cell, out sp))
+ return sp;
+ else
+ return defaultColSpacing;
+ }
+ }
+
+ // Get the preferred size of each child widget, including the margins
+ Size[] GetPreferredChildrenSizes (TablePlacement[] visibleChildren, bool useWidthConstraint, bool useHeightConstraint)
+ {
+ var sizes = new Size [visibleChildren.Length];
+ for (int n=0; n<visibleChildren.Length; n++) {
+ var bp = visibleChildren[n];
+ Size s;
+ if (useWidthConstraint)
+ s = bp.GetPreferredSize (bp.NextWidth - bp.LeftMargin - bp.RightMargin, double.PositiveInfinity);
+ else if (useHeightConstraint)
+ s = bp.GetPreferredSize (double.PositiveInfinity, bp.NextHeight - bp.TopMargin - bp.BottomMargin);
+ else
+ s = bp.GetPreferredSize (double.PositiveInfinity, double.PositiveInfinity);
+ s.Width += bp.LeftMargin + bp.RightMargin;
+ s.Height += bp.TopMargin + bp.BottomMargin;
+ sizes [n] = s;
+ }
+ return sizes;
+ }
+
+ /// <summary>
+ /// Calculates the preferred size of each cell (either height or width, depending on the provided orientation)
+ /// </summary>
+ /// <param name="mode">Mode.</param>
+ /// <param name="orientation">Wether we are calculating the vertical size or the horizontal size</param>
+ /// <param name="visibleChildren">List of children that are visible, and for which the size is being calculated.</param>
+ /// <param name="fixedSizesByCell">Cells which have a fixed size</param>
+ /// <param name="cellsWithExpand">Cells which are expandable.</param>
+ /// <param name="sizes">Calculated size of each cell</param>
+ /// <param name="spacing">Spacing to use for each cell</param>
+ CellSizeVector CalcPreferredCellSizes (TablePlacement[] visibleChildren, Size[] childrenSizes, Orientation orientation)
+ {
+ Dictionary<int,double> fixedSizesByCell;
+ HashSet<int> cellsWithExpand;
+ double[] sizes;
+ double spacing;
+
+ int lastCell = 0;
+
+ fixedSizesByCell = new Dictionary<int, double> ();
+ cellsWithExpand = new HashSet<int> ();
+ HashSet<int> cellsWithWidget = new HashSet<int> ();
+ sizes = new double [visibleChildren.Length];
+
+ // Get the size of each widget and store the fixed sizes for widgets which don't span more than one cell
+
+ for (int n=0; n<visibleChildren.Length; n++) {
+ var bp = visibleChildren[n];
+ int start = GetStartAttach (bp, orientation);
+ int end = GetEndAttach (bp, orientation);
+
+ if (end > lastCell)
+ lastCell = end;
+
+ // Check if the cell is expandable and store the value
+ bool expand = bp.GetExpandsForOrientation (orientation);
+ for (int i=start; i < end; i++) {
+ cellsWithWidget.Add (i);
+ if (expand)
+ cellsWithExpand.Add (i);
+ }
+
+ double s = orientation == Orientation.Vertical ? childrenSizes[n].Height : childrenSizes[n].Width;
+ sizes [n] = s;
+
+ if (end == start + 1) {
+ // The widget only takes one cell. Store its size if it is the biggest
+ bool changed = false;
+ double fs;
+ if (!fixedSizesByCell.TryGetValue (start, out fs))
+ changed = true;
+ if (s > fs) {
+ fs = s;
+ changed = true;
+ }
+ if (changed)
+ fixedSizesByCell [start] = fs;
+ }
+ }
+
+ // For widgets that span more than one cell, calculate the floating size, that is, the size
+ // which is not taken by other fixed size widgets
+
+ List<TablePlacement> widgetsToAdjust = new List<TablePlacement> ();
+ Dictionary<TablePlacement,double[]> growSizes = new Dictionary<TablePlacement, double[]> ();
+
+ for (int n=0; n<visibleChildren.Length; n++) {
+ var bp = visibleChildren[n];
+ int start = GetStartAttach (bp, orientation);
+ int end = GetEndAttach (bp, orientation);
+ if (end == start + 1)
+ continue;
+ widgetsToAdjust.Add (bp);
+
+ double fixedSize = 0;
+
+ // We are going to calculate the spacing included in the widget's span of cells
+ // (there is spacing between each cell)
+ double spanSpacing = 0;
+
+ for (int c = start; c < end; c++) {
+ double fs;
+ fixedSizesByCell.TryGetValue (c, out fs);
+ fixedSize += fs;
+ if (c != start && c != end)
+ spanSpacing += GetSpacing (c, orientation);
+ }
+
+ // sizeToGrow is the size that the whole cell span has to grow in order to fit
+ // this widget. We substract the spacing between cells because that space will
+ // be used by the widget, so we don't need to allocate more size for it
+
+ double sizeToGrow = sizes [n] - fixedSize - spanSpacing;
+
+ double sizeToGrowPart = sizeToGrow / (end - start);
+
+ // Split the size to grow between the cells of the widget. We need to know how much size the widget
+ // requires for each cell it covers.
+
+ double[] widgetGrowSizes = new double [end - start];
+ for (int i=0; i<widgetGrowSizes.Length; i++)
+ widgetGrowSizes [i] = sizeToGrowPart;
+ growSizes[bp] = widgetGrowSizes;
+ }
+
+ // Now size-to-grow values have to be adjusted. For example, let's say widget A requires 100px for column 1 and 100px for column 2, and widget B requires
+ // 60px for column 2 and 60px for column 3. So the widgets are overlapping at column 2. Since A requires at least 100px in column 2, it means that B can assume
+ // that it will have 100px available in column 2, which means 40px more than it requested. Those extra 40px can then be substracted from the 60px that
+ // it required for column 3.
+
+ foreach (var n in cellsWithWidget) {
+ double maxv = 0;
+ TablePlacement maxtNatural = null;
+
+ // Find the widget that requires the maximum size for this cell
+ foreach (var bp in widgetsToAdjust) {
+ // could be expressed as where clause, but this is faster and performance matters here
+ if (GetStartAttach (bp, orientation) <= n && GetEndAttach (bp, orientation) > n) {
+ double cv = growSizes[bp][n - GetStartAttach (bp, orientation)];
+ if (cv > maxv) {
+ maxv = cv;
+ maxtNatural = bp;
+ }
+ }
+ }
+
+ // Adjust the required size of all widgets of the cell (excluding the widget with the max size)
+ foreach (var bp in widgetsToAdjust) {
+ if (GetStartAttach (bp, orientation) <= n && GetEndAttach (bp, orientation) > n) {
+ double[] widgetGrows = growSizes[bp];
+ int cellIndex = n - GetStartAttach (bp, orientation);
+ if (bp != maxtNatural) {
+ double cv = widgetGrows[cellIndex];
+ double splitExtraSpace = (maxv - cv) / (widgetGrows.Length - 1);
+ for (int i=0; i<widgetGrows.Length; i++)
+ widgetGrows[i] -= splitExtraSpace;
+ }
+ }
+ }
+ }
+
+ // Find the maximum size-to-grow for each cell
+
+ Dictionary<int,double> finalGrowTable = new Dictionary<int, double> ();
+
+ foreach (var bp in widgetsToAdjust) {
+ int start = GetStartAttach (bp, orientation);
+ int end = GetEndAttach (bp, orientation);
+ double[] widgetGrows = growSizes[bp];
+ for (int n=start; n<end; n++) {
+ double curGrow;
+ finalGrowTable.TryGetValue (n, out curGrow);
+ var val = widgetGrows [n - start];
+ if (val > curGrow)
+ curGrow = val;
+ finalGrowTable [n] = curGrow;
+ }
+ }
+
+ // Add the final size-to-grow to the fixed sizes calculated at the begining
+
+ foreach (var it in finalGrowTable) {
+ double ws;
+ fixedSizesByCell.TryGetValue (it.Key, out ws);
+ fixedSizesByCell [it.Key] = it.Value + ws;
+ }
+
+ spacing = 0;
+ for (int n=1; n<lastCell; n++) {
+ if (cellsWithWidget.Contains (n))
+ spacing += GetSpacing (n, orientation);
+ }
+
+ return new CellSizeVector () {
+ visibleChildren = visibleChildren,
+ fixedSizesByCell = fixedSizesByCell,
+ cellsWithExpand = cellsWithExpand,
+ sizes = sizes,
+ spacing = spacing,
+ orientation = orientation
+ };
+ }
+
+ /// <summary>
+ /// Calculates size of each cell, taking into account their preferred size, expansion/fill requests, and the available space.
+ /// Calculation is done only for the provided orientation (either height or width).
+ /// </summary>
+ /// <param name="mode">Mode.</param>
+ /// <param name="availableSize">Total size available</param>
+ /// <param name="calcOffsets"></param>
+ void CalcCellSizes (CellSizeVector cellSizes, double availableSize, bool calcOffsets)
+ {
+ TablePlacement[] visibleChildren = cellSizes.visibleChildren;
+ Dictionary<int,double> fixedSizesByCell = cellSizes.fixedSizesByCell;
+ double[] sizes = cellSizes.sizes;
+ double spacing = cellSizes.spacing;
+ Orientation orientation = cellSizes.orientation;
+
+ // Get the total natural size
+ double naturalSize = fixedSizesByCell.Values.Sum ();
+
+ double remaining = availableSize - naturalSize - spacing;
+
+ if (availableSize - spacing <= 0) {
+ foreach (var i in fixedSizesByCell.Keys.ToArray ())
+ fixedSizesByCell [i] = 0;
+ }
+ else if (remaining < 0) {
+ // The box is not big enough to fit the widgets using its natural size.
+ // We have to shrink the cells. We do a proportional reduction
+
+ // List of cell indexes that we have to shrink
+ var toShrink = new List<int> (fixedSizesByCell.Keys);
+
+ // The total amount we have to shrink
+ double splitSize = (availableSize - spacing) / toShrink.Count;
+
+ // We have to reduce all cells proportionally, but if a cell is much bigger that
+ // its proportionally allocated space, then we reduce this one before the others
+
+ var smallCells = fixedSizesByCell.Where (c => c.Value < splitSize);
+ var belowSplitSize = smallCells.Sum (c => splitSize - c.Value);
+
+ var bigCells = fixedSizesByCell.Where (c => c.Value > splitSize);
+ var overSplitSize = bigCells.Sum (c => c.Value - splitSize);
+
+ ReduceProportional (fixedSizesByCell, bigCells.Select (c => c.Key), overSplitSize - belowSplitSize);
+
+ var newNatural = fixedSizesByCell.Sum (c => c.Value);
+ ReduceProportional (fixedSizesByCell, fixedSizesByCell.Keys, (availableSize - spacing) - newNatural);
+
+ RoundSizes (fixedSizesByCell);
+ }
+ else {
+ // Distribute remaining space among the extensible widgets
+ HashSet<int> cellsWithExpand = cellSizes.cellsWithExpand;
+ int nexpands = cellsWithExpand.Count;
+ var expandRemaining = new SizeSplitter (remaining, nexpands);
+ foreach (var c in cellsWithExpand) {
+ double ws;
+ fixedSizesByCell.TryGetValue (c, out ws);
+ ws += expandRemaining.NextSizePart ();
+ fixedSizesByCell [c] = ws;
+ }
+ }
+
+ // Calculate the offset of each widget, relative to the cell (so 0 means at the left/top of the cell).
+
+ for (int n=0; n<visibleChildren.Length; n++) {
+ var bp = visibleChildren[n];
+ double allocatedSize = 0;
+ double cellOffset = 0;
+
+ int start = GetStartAttach (bp, orientation);
+ int end = GetEndAttach (bp, orientation);
+ for (int i=start; i<end; i++) {
+ double ws;
+ fixedSizesByCell.TryGetValue (i, out ws);
+ allocatedSize += ws;
+ if (i != start)
+ allocatedSize += GetSpacing (i, orientation);
+ }
+
+ var al = bp.GetAlignmentForOrientation (orientation);
+ if (!double.IsNaN (al)) {
+ double s = sizes[n];
+ if (s < allocatedSize) {
+ cellOffset = (allocatedSize - s) * al;
+ allocatedSize = s;
+ }
+ }
+
+ // cellOffset is the offset of the widget inside the cell. We store it in NextX/Y, and
+ // will be used below to calculate the total offset of the widget
+
+ if (orientation == Orientation.Vertical) {
+ bp.NextHeight = allocatedSize;
+ bp.NextY = cellOffset;
+ }
+ else {
+ bp.NextWidth = allocatedSize;
+ bp.NextX = cellOffset;
+ }
+ }
+
+ if (calcOffsets) {
+ // Calculate the final offset of each widget, relative to the table origin
+ var sortedChildren = visibleChildren.OrderBy (c => GetStartAttach (c, orientation)).ToArray();
+ var cells = fixedSizesByCell.OrderBy (c => c.Key);
+ double offset = 0;
+ int n = 0;
+ foreach (var c in cells) {
+ if (c.Key > 0)
+ offset += GetSpacing (c.Key, orientation);
+ while (n < sortedChildren.Length && GetStartAttach (sortedChildren[n], orientation) == c.Key) {
+ // In the loop above we store the offset of the widget inside the cell in the NextX/Y field
+ // so now we have to add (not just assign) the offset of the cell to NextX/Y
+ if (orientation == Orientation.Vertical)
+ sortedChildren[n].NextY += offset;
+ else
+ sortedChildren[n].NextX += offset;
+ n++;
+ }
+ offset += c.Value;
+ }
+ }
+ }
+
+ void ReduceProportional (Dictionary<int,double> sizes, IEnumerable<int> indexes, double amount)
+ {
+ var total = indexes.Sum (i => sizes[i]);
+ foreach (var i in indexes.ToArray ()) {
+ double size = sizes [i];
+ var am = amount * (size / total);
+ sizes [i] = size - am;
+ }
+ }
+
+ void RoundSizes (Dictionary<int,double> sizes)
+ {
+ double rem = 0;
+ for (int i = 0; i < sizes.Count; i++) {
+ var kvp = sizes.ElementAt (i);
+ double size = Math.Floor (kvp.Value);
+ rem += kvp.Value - size;
+ sizes[kvp.Key] = size;
+ }
+ while (rem > 0) {
+ for (int i = 0; i < sizes.Count; i++) {
+ var kvp = sizes.ElementAt (i);
+ sizes[kvp.Key] = kvp.Value - 1;
+ if (--rem <= 0)
+ break;
+ }
+ }
+ }
+
+ class CellSizeVector
+ {
+ internal TablePlacement[] visibleChildren;
+ internal Dictionary<int,double> fixedSizesByCell;
+ internal HashSet<int> cellsWithExpand;
+ internal double[] sizes;
+ internal double spacing;
+ internal Orientation orientation;
+ double totalSize = -1;
+
+ public double TotalSize {
+ get {
+ if (totalSize == -1) {
+ totalSize = spacing;
+ foreach (var s in fixedSizesByCell.Values)
+ totalSize += s;
+ }
+ return totalSize;
+ }
+ }
+ }
+
+ int GetStartAttach (TablePlacement tp, Orientation orientation)
+ {
+ if (orientation == Orientation.Vertical)
+ return tp.Top;
+ else
+ return tp.Left;
+ }
+
+ int GetEndAttach (TablePlacement tp, Orientation orientation)
+ {
+ if (orientation == Orientation.Vertical)
+ return tp.Bottom;
+ else
+ return tp.Right;
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/TextCellView.cs b/external/xwt/Xwt/Xwt/TextCellView.cs
index e6bf35a..cf8471c 100644
--- a/external/xwt/Xwt/Xwt/TextCellView.cs
+++ b/external/xwt/Xwt/Xwt/TextCellView.cs
@@ -28,20 +28,81 @@ using System;
using Xwt.Drawing;
using System.Collections.ObjectModel;
using System.Collections.Generic;
+using System.ComponentModel;
+using Xwt.Backends;
namespace Xwt
{
- public class TextCellView: CellView
+ public sealed class TextCellView: CellView, ITextCellViewFrontend
{
+ string text;
+ string markup;
+ bool editable;
+
+ public IDataField TextField { get; set; }
+ public IDataField<string> MarkupField { get; set; }
+ public IDataField<bool> EditableField { get; set; }
+
public TextCellView ()
{
}
- public TextCellView (DataField textField)
+ public TextCellView (IDataField textField)
{
TextField = textField;
}
- public DataField TextField { get; set; }
+ public TextCellView (string text)
+ {
+ this.text = text;
+ }
+
+ [DefaultValue (null)]
+ public string Text {
+ get {
+ if (TextField != null && DataSource != null)
+ return Convert.ToString (DataSource.GetValue (TextField));
+ else
+ return text;
+ }
+ set {
+ text = value;
+ }
+ }
+
+ [DefaultValue (null)]
+ public string Markup {
+ get {
+ return GetValue (MarkupField, markup);
+ }
+ set {
+ markup = value;
+ }
+ }
+
+ [DefaultValue (false)]
+ public bool Editable {
+ get {
+ return GetValue (EditableField, editable);
+ }
+ set {
+ editable = value;
+ }
+ }
+
+ /// <summary>
+ /// Occurs when the text of the cell is modified.
+ /// </summary>
+ public event EventHandler<WidgetEventArgs> TextChanged;
+
+ bool ITextCellViewFrontend.RaiseTextChanged ()
+ {
+ if (TextChanged != null) {
+ var args = new WidgetEventArgs ();
+ TextChanged (this, args);
+ return args.Handled;
+ }
+ return false;
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/TextEntry.cs b/external/xwt/Xwt/Xwt/TextEntry.cs
index 67b4554..b7c7889 100644
--- a/external/xwt/Xwt/Xwt/TextEntry.cs
+++ b/external/xwt/Xwt/Xwt/TextEntry.cs
@@ -29,6 +29,7 @@ using System.ComponentModel;
namespace Xwt
{
+ [BackendType (typeof(ITextEntryBackend))]
public class TextEntry: Widget
{
EventHandler changed;
@@ -69,7 +70,12 @@ namespace Xwt
get { return Backend.Text; }
set { Backend.Text = value; }
}
-
+
+ public Alignment TextAlignment {
+ get { return Backend.TextAlignment; }
+ set { Backend.TextAlignment = value; }
+ }
+
[DefaultValue ("")]
public string PlaceholderText {
get { return Backend.PlaceholderText; }
@@ -88,6 +94,12 @@ namespace Xwt
set { Backend.ShowFrame = value; }
}
+ [DefaultValue (true)]
+ public bool MultiLine {
+ get { return Backend.MultiLine; }
+ set { Backend.MultiLine = value; }
+ }
+
protected virtual void OnChanged (EventArgs e)
{
if (changed != null)
diff --git a/external/xwt/Xwt/Xwt/ToggleButton.cs b/external/xwt/Xwt/Xwt/ToggleButton.cs
index 7e74c08..98a6683 100644
--- a/external/xwt/Xwt/Xwt/ToggleButton.cs
+++ b/external/xwt/Xwt/Xwt/ToggleButton.cs
@@ -29,6 +29,7 @@ using Xwt.Drawing;
namespace Xwt
{
+ [BackendType (typeof(IToggleButtonBackend))]
public class ToggleButton: Button
{
EventHandler toggledEvent;
diff --git a/external/xwt/Xwt/Xwt/Toolkit.cs b/external/xwt/Xwt/Xwt/Toolkit.cs
new file mode 100644
index 0000000..ac4caec
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/Toolkit.cs
@@ -0,0 +1,445 @@
+//
+// ToolkitEngine.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis at xamarin.com>
+//
+// Copyright (c) 2012 Xamarin Inc
+//
+// 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 Xwt.Backends;
+using Xwt.Drawing;
+using System.Reflection;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Xwt
+{
+ public sealed class Toolkit: IFrontend
+ {
+ static Toolkit currentEngine;
+ static Dictionary<Type, Toolkit> toolkits = new Dictionary<Type, Toolkit> ();
+
+ ToolkitEngineBackend backend;
+ ApplicationContext context;
+ XwtTaskScheduler scheduler;
+ ToolkitType toolkitType;
+
+ int inUserCode;
+ Queue<Action> exitActions = new Queue<Action> ();
+ bool exitCallbackRegistered;
+
+ Dictionary<string,Image> stockIcons = new Dictionary<string, Image> ();
+
+ public static Toolkit CurrentEngine {
+ get { return currentEngine; }
+ }
+
+ public static IEnumerable<Toolkit> LoadedToolkits {
+ get { return toolkits.Values; }
+ }
+
+ internal ApplicationContext Context {
+ get { return context; }
+ }
+
+ internal ToolkitEngineBackend Backend {
+ get { return backend; }
+ }
+
+ internal XwtTaskScheduler Scheduler {
+ get { return scheduler; }
+ }
+
+ object IFrontend.Backend {
+ get { return backend; }
+ }
+ Toolkit IFrontend.ToolkitEngine {
+ get { return this; }
+ }
+
+ private Toolkit ()
+ {
+ context = new ApplicationContext (this);
+ scheduler = new XwtTaskScheduler (this);
+ }
+
+ public ToolkitType Type {
+ get { return toolkitType; }
+ }
+
+ internal static void DisposeAll ()
+ {
+ foreach (var t in toolkits.Values)
+ t.Backend.Dispose ();
+ }
+
+ public static Toolkit Load (string fullTypeName)
+ {
+ return Load (fullTypeName, true);
+ }
+
+ internal static Toolkit Load (string fullTypeName, bool isGuest)
+ {
+ Toolkit t = new Toolkit ();
+ if (!string.IsNullOrEmpty (fullTypeName)) {
+ t.LoadBackend (fullTypeName, isGuest, true);
+ return t;
+ }
+
+ if (t.LoadBackend (GetBackendType (ToolkitType.Gtk), isGuest, false))
+ return t;
+
+ if (t.LoadBackend (GetBackendType (ToolkitType.Cocoa), isGuest, false))
+ return t;
+
+ if (t.LoadBackend (GetBackendType (ToolkitType.Wpf), isGuest, false))
+ return t;
+
+ throw new InvalidOperationException ("Xwt engine not found");
+ }
+
+ public static Toolkit Load (ToolkitType type)
+ {
+ var et = toolkits.Values.FirstOrDefault (tk => tk.toolkitType == type);
+ if (et != null)
+ return et;
+
+ Toolkit t = new Toolkit ();
+ t.toolkitType = type;
+ t.LoadBackend (GetBackendType (type), true, true);
+ return t;
+ }
+
+ /// <summary>
+ /// Tries to load a toolkit
+ /// </summary>
+ /// <returns><c>true</c>, the toolkit could be loaded, <c>false</c> otherwise.</returns>
+ /// <param name="type">Toolkit type</param>
+ /// <param name="toolkit">The loaded toolkit</param>
+ public static bool TryLoad (ToolkitType type, out Toolkit toolkit)
+ {
+ var et = toolkits.Values.FirstOrDefault (tk => tk.toolkitType == type);
+ if (et != null) {
+ toolkit = et;
+ return true;
+ }
+
+ Toolkit t = new Toolkit ();
+ t.toolkitType = type;
+ if (t.LoadBackend (GetBackendType (type), true, false)) {
+ toolkit = t;
+ return true;
+ }
+ toolkit = null;
+ return false;
+ }
+
+ internal static string GetBackendType (ToolkitType type)
+ {
+ string version = typeof(Application).Assembly.GetName ().Version.ToString ();
+
+ switch (type) {
+ case ToolkitType.Gtk:
+ return "Xwt.GtkBackend.GtkEngine, Xwt.Gtk, Version=" + version;
+ case ToolkitType.Cocoa:
+ return "Xwt.Mac.MacEngine, Xwt.Mac, Version=" + version;
+ case ToolkitType.Wpf:
+ return "Xwt.WPFBackend.WPFEngine, Xwt.WPF, Version=" + version;
+ case ToolkitType.XamMac:
+ return "Xwt.Mac.MacEngine, Xwt.XamMac, Version=" + version;
+ default:
+ throw new ArgumentException ("Invalid toolkit type");
+ }
+ }
+
+ bool LoadBackend (string type, bool isGuest, bool throwIfFails)
+ {
+ int i = type.IndexOf (',');
+ string assembly = type.Substring (i+1).Trim ();
+ type = type.Substring (0, i).Trim ();
+ try {
+ Assembly asm = Assembly.Load (assembly);
+ if (asm != null) {
+ Type t = asm.GetType (type);
+ if (t != null) {
+ backend = (ToolkitEngineBackend) Activator.CreateInstance (t);
+ Initialize (isGuest);
+ return true;
+ }
+ }
+ }
+ catch (Exception ex) {
+ if (throwIfFails)
+ throw new Exception ("Toolkit could not be loaded", ex);
+ Application.NotifyException (ex);
+ }
+ if (throwIfFails)
+ throw new Exception ("Toolkit could not be loaded");
+ return false;
+ }
+
+ void Initialize (bool isGuest)
+ {
+ toolkits[Backend.GetType ()] = this;
+ backend.Initialize (this, isGuest);
+ ContextBackendHandler = Backend.CreateBackend<ContextBackendHandler> ();
+ GradientBackendHandler = Backend.CreateBackend<GradientBackendHandler> ();
+ TextLayoutBackendHandler = Backend.CreateBackend<TextLayoutBackendHandler> ();
+ FontBackendHandler = Backend.CreateBackend<FontBackendHandler> ();
+ ClipboardBackend = Backend.CreateBackend<ClipboardBackend> ();
+ ImageBuilderBackendHandler = Backend.CreateBackend<ImageBuilderBackendHandler> ();
+ ImagePatternBackendHandler = Backend.CreateBackend<ImagePatternBackendHandler> ();
+ ImageBackendHandler = Backend.CreateBackend<ImageBackendHandler> ();
+ DrawingPathBackendHandler = Backend.CreateBackend<DrawingPathBackendHandler> ();
+ DesktopBackend = Backend.CreateBackend<DesktopBackend> ();
+ VectorImageRecorderContextHandler = new VectorImageRecorderContextHandler (this);
+ }
+
+ internal static ToolkitEngineBackend GetToolkitBackend (Type type)
+ {
+ Toolkit t;
+ if (toolkits.TryGetValue (type, out t))
+ return t.backend;
+ else
+ return null;
+ }
+
+ internal void SetActive ()
+ {
+ currentEngine = this;
+ }
+
+ public object GetNativeWidget (Widget w)
+ {
+ ValidateObject (w);
+ w.SetExtractedAsNative ();
+ return backend.GetNativeWidget (w);
+ }
+
+ public object GetNativeImage (Image image)
+ {
+ ValidateObject (image);
+ return backend.GetNativeImage (image);
+ }
+
+ public T CreateObject<T> () where T:new()
+ {
+ var oldEngine = currentEngine;
+ try {
+ currentEngine = this;
+ return new T ();
+ } finally {
+ currentEngine = oldEngine;
+ }
+ }
+
+ public bool Invoke (Action a)
+ {
+ var oldEngine = currentEngine;
+ try {
+ currentEngine = this;
+ EnterUserCode ();
+ a ();
+ ExitUserCode (null);
+ return true;
+ } catch (Exception ex) {
+ ExitUserCode (ex);
+ return false;
+ } finally {
+ currentEngine = oldEngine;
+ }
+ }
+
+ internal void InvokePlatformCode (Action a)
+ {
+ try {
+ ExitUserCode (null);
+ a ();
+ } finally {
+ EnterUserCode ();
+ }
+ }
+
+ internal void EnterUserCode ()
+ {
+ inUserCode++;
+ }
+
+ internal void ExitUserCode (Exception error)
+ {
+ if (error != null) {
+ Invoke (delegate {
+ Application.NotifyException (error);
+ });
+ }
+ if (inUserCode == 1 && !exitCallbackRegistered) {
+ while (exitActions.Count > 0) {
+ try {
+ exitActions.Dequeue ()();
+ } catch (Exception ex) {
+ Invoke (delegate {
+ Application.NotifyException (ex);
+ });
+ }
+ }
+ }
+ inUserCode--;
+ }
+
+ void DispatchExitActions ()
+ {
+ // This pair of calls will flush the exit action queue
+ exitCallbackRegistered = false;
+ EnterUserCode ();
+ ExitUserCode (null);
+ }
+
+ internal void QueueExitAction (Action a)
+ {
+ exitActions.Enqueue (a);
+
+ if (inUserCode == 0) {
+ // Not in an XWT handler. This may happen when embedding XWT in another toolkit and
+ // XWT widgets are manipulated from event handlers of the native toolkit which
+ // are not invoked using ApplicationContext.InvokeUserCode.
+ if (!exitCallbackRegistered) {
+ exitCallbackRegistered = true;
+ // Try to use a native method of queuing exit actions
+ Toolkit.CurrentEngine.Backend.InvokeBeforeMainLoop (DispatchExitActions);
+ }
+ }
+ }
+
+ public bool InUserCode {
+ get { return inUserCode > 0; }
+ }
+
+ public WindowFrame WrapWindow (object nativeWindow)
+ {
+ if (nativeWindow == null)
+ return null;
+ return new NativeWindowFrame (backend.GetBackendForWindow (nativeWindow));
+ }
+
+ public Widget WrapWidget (object nativeWidget)
+ {
+ var externalWidget = nativeWidget as Widget;
+ if (externalWidget != null) {
+ if (externalWidget.Surface.ToolkitEngine == this)
+ return externalWidget;
+ nativeWidget = externalWidget.Surface.ToolkitEngine.GetNativeWidget (externalWidget);
+ }
+ return new EmbeddedNativeWidget (nativeWidget, externalWidget);
+ }
+
+ public Image WrapImage (object nativeImage)
+ {
+ return new Image (backend.GetBackendForImage (nativeImage));
+ }
+
+ public Context WrapContext (object nativeContext)
+ {
+ return new Context (backend.GetBackendForContext (nativeContext), this);
+ }
+
+ public object ValidateObject (object obj)
+ {
+ if (obj is IFrontend) {
+ if (((IFrontend)obj).ToolkitEngine != this)
+ throw new InvalidOperationException ("Object belongs to a different toolkit");
+ }
+ return obj;
+ }
+
+ public object GetSafeBackend (object obj)
+ {
+ ValidateObject (obj);
+ return GetBackend (obj);
+ }
+
+ public static object GetBackend (object obj)
+ {
+ if (obj is IFrontend)
+ return ((IFrontend)obj).Backend;
+ else if (obj == null)
+ return null;
+ else
+ throw new InvalidOperationException ("Object doesn't have a backend");
+ }
+
+ public T CreateFrontend<T> (object ob)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public Image RenderWidget (Widget widget)
+ {
+ return new Image (backend.RenderWidget (widget));
+ }
+
+ public void RenderImage (object nativeWidget, object nativeContext, Image img, double x, double y)
+ {
+ img.GetFixedSize (); // Ensure that it has a size
+ backend.RenderImage (nativeWidget, nativeContext, img.ImageDescription, x, y);
+ }
+
+ public ToolkitFeatures SupportedFeatures {
+ get { return backend.SupportedFeatures; }
+ }
+
+ internal Image GetStockIcon (string id)
+ {
+ Image img;
+ if (!stockIcons.TryGetValue (id, out img))
+ stockIcons [id] = img = ImageBackendHandler.GetStockIcon (id);
+ return img;
+ }
+
+ internal ContextBackendHandler ContextBackendHandler;
+ internal GradientBackendHandler GradientBackendHandler;
+ internal TextLayoutBackendHandler TextLayoutBackendHandler;
+ internal FontBackendHandler FontBackendHandler;
+ internal ClipboardBackend ClipboardBackend;
+ internal ImageBuilderBackendHandler ImageBuilderBackendHandler;
+ internal ImagePatternBackendHandler ImagePatternBackendHandler;
+ internal ImageBackendHandler ImageBackendHandler;
+ internal DrawingPathBackendHandler DrawingPathBackendHandler;
+ internal DesktopBackend DesktopBackend;
+ internal VectorImageRecorderContextHandler VectorImageRecorderContextHandler;
+ }
+
+ class NativeWindowFrame: WindowFrame
+ {
+ public NativeWindowFrame (IWindowFrameBackend backend)
+ {
+ BackendHost.SetCustomBackend (backend);
+ }
+ }
+
+ [Flags]
+ public enum ToolkitFeatures: int
+ {
+ WidgetOpacity = 1,
+ WindowOpacity = 2,
+ All = WidgetOpacity | WindowOpacity
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/TransferDataSource.cs b/external/xwt/Xwt/Xwt/TransferDataSource.cs
index b810ad8..bd066ba 100644
--- a/external/xwt/Xwt/Xwt/TransferDataSource.cs
+++ b/external/xwt/Xwt/Xwt/TransferDataSource.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Xwt.Drawing;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
diff --git a/external/xwt/Xwt/Xwt/TransferDataType.cs b/external/xwt/Xwt/Xwt/TransferDataType.cs
index 375992d..3613bea 100644
--- a/external/xwt/Xwt/Xwt/TransferDataType.cs
+++ b/external/xwt/Xwt/Xwt/TransferDataType.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Xwt.Drawing;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
@@ -56,12 +56,17 @@ namespace Xwt
/// The RTF data type
/// </summary>
public static readonly TransferDataType Rtf = FromId ("rtf");
-
+
/// <summary>
/// The image data type
/// </summary>
public static readonly TransferDataType Image = FromId ("image");
-
+
+ /// <summary>
+ /// The HTML data type
+ /// </summary>
+ public static readonly TransferDataType Html = FromId ("html");
+
private TransferDataType (string id)
{
this.id = id;
diff --git a/external/xwt/Xwt/Xwt/TreeNavigator.cs b/external/xwt/Xwt/Xwt/TreeNavigator.cs
index eaf95db..272c637 100644
--- a/external/xwt/Xwt/Xwt/TreeNavigator.cs
+++ b/external/xwt/Xwt/Xwt/TreeNavigator.cs
@@ -112,13 +112,13 @@ namespace Xwt
return this;
}
- public TreeNavigator SetValue<T> (DataField<T> field, T data)
+ public TreeNavigator SetValue<T> (IDataField<T> field, T data)
{
backend.SetValue (pos, field.Index, data);
return this;
}
- public T GetValue<T> (DataField<T> field)
+ public T GetValue<T> (IDataField<T> field)
{
return (T) backend.GetValue (pos, field.Index);
}
diff --git a/external/xwt/Xwt/Xwt/TreeStore.cs b/external/xwt/Xwt/Xwt/TreeStore.cs
index 0897b01..c063886 100644
--- a/external/xwt/Xwt/Xwt/TreeStore.cs
+++ b/external/xwt/Xwt/Xwt/TreeStore.cs
@@ -31,11 +31,13 @@ using System.Collections.Generic;
using Xwt.Backends;
using System.ComponentModel;
+
namespace Xwt
{
+ [BackendType (typeof(ITreeStoreBackend))]
public class TreeStore: XwtComponent, ITreeDataSource
{
- DataField[] fields;
+ IDataField[] fields;
class TreeStoreBackendHost: BackendHost<TreeStore,ITreeStoreBackend>
{
@@ -54,12 +56,12 @@ namespace Xwt
return new TreeStoreBackendHost ();
}
- public TreeStore (params DataField[] fields)
+ public TreeStore (params IDataField[] fields)
{
for (int n=0; n<fields.Length; n++) {
if (fields[n].Index != -1)
throw new InvalidOperationException ("DataField object already belongs to another data store");
- fields[n].Index = n;
+ ((IDataFieldInternal)fields[n]).SetIndex (n);
}
this.fields = fields;
}
@@ -189,7 +191,7 @@ namespace Xwt
public event EventHandler<TreeNodeEventArgs> NodeChanged;
public event EventHandler<TreeNodeOrderEventArgs> NodesReordered;
- public void InitializeBackend (object frontend)
+ public void InitializeBackend (object frontend, ApplicationContext context)
{
}
diff --git a/external/xwt/Xwt/Xwt/TreeView.cs b/external/xwt/Xwt/Xwt/TreeView.cs
index 8362e31..2be7699 100755
--- a/external/xwt/Xwt/Xwt/TreeView.cs
+++ b/external/xwt/Xwt/Xwt/TreeView.cs
@@ -30,10 +30,11 @@ using Xwt.Drawing;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(ITreeViewBackend))]
public class TreeView: Widget, IColumnContainer, IScrollableWidget
{
ListViewColumnCollection columns;
@@ -54,6 +55,21 @@ namespace Xwt
((TreeView)Parent).OnSelectionChanged (EventArgs.Empty);
}
+ public void OnRowActivated (TreePosition position)
+ {
+ ((TreeView)Parent).OnRowActivated (new TreeViewRowEventArgs (position));
+ }
+
+ public void OnRowExpanded (TreePosition position)
+ {
+ ((TreeView)Parent).OnRowExpanded (new TreeViewRowEventArgs (position));
+ }
+
+ public void OnRowExpanding (TreePosition position)
+ {
+ ((TreeView)Parent).OnRowExpanding (new TreeViewRowEventArgs (position));
+ }
+
public override Size GetDefaultNaturalSize ()
{
return Xwt.Backends.DefaultNaturalSizes.TreeView;
@@ -63,6 +79,9 @@ namespace Xwt
static TreeView ()
{
MapEvent (TableViewEvent.SelectionChanged, typeof(TreeView), "OnSelectionChanged");
+ MapEvent (TreeViewEvent.RowActivated, typeof(TreeView), "OnRowActivated");
+ MapEvent (TreeViewEvent.RowExpanded, typeof(TreeView), "OnRowExpanded");
+ MapEvent (TreeViewEvent.RowExpanding, typeof(TreeView), "OnRowExpanding");
}
/// <summary>
@@ -128,8 +147,8 @@ namespace Xwt
}
set {
if (dataSource != value) {
+ Backend.SetSource (value, value is IFrontend ? (IBackend)BackendHost.ToolkitEngine.GetSafeBackend (value) : null);
dataSource = value;
- Backend.SetSource (dataSource, dataSource is IFrontend ? (IBackend)WidgetRegistry.GetBackend (dataSource) : null);
}
}
}
@@ -283,6 +302,20 @@ namespace Xwt
{
Backend.CollapseRow (pos);
}
+
+ /// <summary>
+ /// Recursively expands all nodes of the tree
+ /// </summary>
+ public void ExpandAll ()
+ {
+ if (DataSource != null) {
+ var nc = DataSource.GetChildrenCount (null);
+ for (int n=0; n<nc; n++) {
+ var p = DataSource.GetChild (null, n);
+ Backend.ExpandRow (p, true);
+ }
+ }
+ }
/// <summary>
/// Saves the status of the tree
@@ -371,6 +404,84 @@ namespace Xwt
BackendHost.OnAfterEventRemove (TableViewEvent.SelectionChanged, selectionChanged);
}
}
+
+ /// <summary>
+ /// Raises the row activated event.
+ /// </summary>
+ /// <param name="a">The alpha component.</param>
+ protected virtual void OnRowActivated (TreeViewRowEventArgs a)
+ {
+ if (rowActivated != null)
+ rowActivated (this, a);
+ }
+
+ EventHandler<TreeViewRowEventArgs> rowActivated;
+
+ /// <summary>
+ /// Occurs when the user double-clicks on a row
+ /// </summary>
+ public event EventHandler<TreeViewRowEventArgs> RowActivated {
+ add {
+ BackendHost.OnBeforeEventAdd (TreeViewEvent.RowActivated, rowActivated);
+ rowActivated += value;
+ }
+ remove {
+ rowActivated -= value;
+ BackendHost.OnAfterEventRemove (TreeViewEvent.RowActivated, rowActivated);
+ }
+ }
+
+ /// <summary>
+ /// Raises the row expanding event.
+ /// </summary>
+ /// <param name="a">The alpha component.</param>
+ protected virtual void OnRowExpanding (TreeViewRowEventArgs a)
+ {
+ if (rowExpanding != null)
+ rowExpanding (this, a);
+ }
+
+ EventHandler<TreeViewRowEventArgs> rowExpanding;
+
+ /// <summary>
+ /// Occurs just before a row is expanded
+ /// </summary>
+ public event EventHandler<TreeViewRowEventArgs> RowExpanding {
+ add {
+ BackendHost.OnBeforeEventAdd (TreeViewEvent.RowExpanding, rowExpanding);
+ rowExpanding += value;
+ }
+ remove {
+ rowExpanding -= value;
+ BackendHost.OnAfterEventRemove (TreeViewEvent.RowExpanding, rowExpanding);
+ }
+ }
+
+ /// <summary>
+ /// Raises the row expanding event.
+ /// </summary>
+ /// <param name="a">The alpha component.</param>
+ protected virtual void OnRowExpanded (TreeViewRowEventArgs a)
+ {
+ if (rowExpanded != null)
+ rowExpanded (this, a);
+ }
+
+ EventHandler<TreeViewRowEventArgs> rowExpanded;
+
+ /// <summary>
+ /// Occurs just before a row is expanded
+ /// </summary>
+ public event EventHandler<TreeViewRowEventArgs> RowExpanded {
+ add {
+ BackendHost.OnBeforeEventAdd (TreeViewEvent.RowExpanded, rowExpanded);
+ rowExpanded += value;
+ }
+ remove {
+ rowExpanded -= value;
+ BackendHost.OnAfterEventRemove (TreeViewEvent.RowExpanded, rowExpanded);
+ }
+ }
}
interface IColumnContainer
diff --git a/external/xwt/Xwt/Xwt/TreeViewRowEventArgs.cs b/external/xwt/Xwt/Xwt/TreeViewRowEventArgs.cs
new file mode 100644
index 0000000..f7146e7
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/TreeViewRowEventArgs.cs
@@ -0,0 +1,40 @@
+//
+// TreeViewRowEventArgs.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class TreeViewRowEventArgs: EventArgs
+ {
+ public TreeViewRowEventArgs (TreePosition position)
+ {
+ Position = position;
+ }
+
+ public TreePosition Position { get; private set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/VScrollbar.cs b/external/xwt/Xwt/Xwt/VScrollbar.cs
new file mode 100644
index 0000000..0bb7d64
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/VScrollbar.cs
@@ -0,0 +1,37 @@
+//
+// VScrollbar.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class VScrollbar: Scrollbar
+ {
+ public VScrollbar (): base (Xwt.Backends.Orientation.Vertical)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/VSlider.cs b/external/xwt/Xwt/Xwt/VSlider.cs
new file mode 100644
index 0000000..1f4e3e3
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/VSlider.cs
@@ -0,0 +1,38 @@
+//
+// VSlider.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 Xwt.Backends;
+
+namespace Xwt
+{
+ public class VSlider: Slider
+ {
+ public VSlider (): base (Orientation.Vertical)
+ {
+ }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/Widget.cs b/external/xwt/Xwt/Xwt/Widget.cs
old mode 100755
new mode 100644
index b8c6377..6fe72c8
--- a/external/xwt/Xwt/Xwt/Widget.cs
+++ b/external/xwt/Xwt/Xwt/Widget.cs
@@ -30,31 +30,40 @@ using System;
using System.ComponentModel;
using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
using Xwt.Drawing;
using System.Reflection;
using System.Xaml;
using System.Linq;
+using Xwt.Motion;
namespace Xwt
{
- public abstract class Widget: XwtComponent, IWidgetSurface
+ [BackendType (typeof(IWidgetBackend))]
+ public abstract class Widget: XwtComponent, IWidgetSurface, IAnimatable
{
+ static bool DebugWidgetLayout = false;
+ static int DebugWidgetLayoutIndent = 0;
+
static Widget[] emptyList = new Widget[0];
List<Widget> children;
WidgetSpacing margin;
- WidgetSize width;
- WidgetSize height;
- bool widthCached;
- bool heightCached;
+ Size cachedSize;
+ SizeConstraint cachedWidthConstraint;
+ SizeConstraint cachedHeightConstraint;
+ bool sizeCached;
DragOperation currentDragOperation;
Widget contentWidget;
WindowFrame parentWindow;
double minWidth = -1, minHeight = -1;
- double naturalWidth = -1, naturalHeight = -1;
+ double widthRequest = -1, heightRequest = -1;
CursorType cursor;
- double referenceWidth, referenceHeight;
-
+
+ WidgetPlacement alignVertical = WidgetPlacement.Fill;
+ WidgetPlacement alignHorizontal = WidgetPlacement.Fill;
+ bool expandVertical;
+ bool expandHorizontal;
+
EventHandler<DragOverCheckEventArgs> dragOverCheck;
EventHandler<DragOverEventArgs> dragOver;
EventHandler<DragCheckEventArgs> dragDropCheck;
@@ -94,17 +103,19 @@ namespace Xwt
protected override IBackend OnCreateBackend ()
{
var backend = base.OnCreateBackend ();
- if (backend == null || backend is XwtWidgetBackend) {
+ if (backend == null) {
// If this is a custom widget, not implemented in Xwt, then we provide the default
// backend, which allows setting a content widget
- Type t = Parent.GetType ();
- Type wt = typeof(Widget);
- while (t != wt) {
- if (t.Assembly == wt.Assembly)
- return null; // It's a core widget
- t = t.BaseType;
+ if (!(Parent is XwtWidgetBackend)) {
+ Type t = Parent.GetType ();
+ Type wt = typeof(Widget);
+ while (t != wt) {
+ if (t.Assembly == wt.Assembly)
+ return null; // It's a core widget
+ t = t.BaseType;
+ }
}
- return WidgetRegistry.CreateBackend<IBackend> (wt);
+ return ToolkitEngine.Backend.CreateBackend<ICustomWidgetBackend> ();
}
return backend;
}
@@ -176,31 +187,11 @@ namespace Xwt
Parent.OnKeyReleased (args);
}
- WidgetSize IWidgetEventSink.OnGetPreferredWidth ()
- {
- return Parent.OnGetPreferredWidth ();
- }
-
- WidgetSize IWidgetEventSink.OnGetPreferredHeight ()
- {
- return Parent.OnGetPreferredWidth ();
- }
-
- WidgetSize IWidgetEventSink.OnGetPreferredHeightForWidth (double width)
+ Size IWidgetEventSink.GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- return Parent.OnGetPreferredHeightForWidth (width);
+ return Parent.OnGetPreferredSize (widthConstraint, heightConstraint);
}
-
- WidgetSize IWidgetEventSink.OnGetPreferredWidthForHeight (double height)
- {
- return Parent.OnGetPreferredWidthForHeight (height);
- }
-
- SizeRequestMode IWidgetEventSink.GetSizeRequestMode ()
- {
- return Parent.Surface.SizeRequestMode;
- }
-
+
void IWidgetEventSink.OnGotFocus ()
{
Parent.OnGotFocus (EventArgs.Empty);
@@ -283,16 +274,13 @@ namespace Xwt
MapEvent (WidgetEvent.MouseMoved, typeof(Widget), "OnMouseMoved");
MapEvent (WidgetEvent.DragStarted, typeof(Widget), "OnDragStarted");
MapEvent (WidgetEvent.BoundsChanged, typeof(Widget), "OnBoundsChanged");
- MapEvent (WidgetEvent.PreferredHeightCheck, typeof (Widget), "OnGetPreferredHeight");
- MapEvent (WidgetEvent.PreferredWidthCheck, typeof (Widget), "OnGetPreferredWidth");
- MapEvent (WidgetEvent.PreferredHeightForWidthCheck, typeof (Widget), "OnGetPreferredHeightForWidth");
- MapEvent (WidgetEvent.PreferredWidthForHeightCheck, typeof (Widget), "OnGetPreferredWidthForHeight");
+ MapEvent (WidgetEvent.PreferredSizeCheck, typeof (Widget), "OnGetPreferredSize");
MapEvent (WidgetEvent.MouseScrolled, typeof(Widget), "OnMouseScrolled");
}
internal protected static IBackend GetBackend (Widget w)
{
- if (w.Backend is XwtWidgetBackend)
+ if (w != null && w.Backend is XwtWidgetBackend)
return GetBackend ((XwtWidgetBackend)w.Backend);
return w != null ? w.Backend : null;
}
@@ -325,9 +313,9 @@ namespace Xwt
if (Parent != null)
return Parent.ParentWindow;
else if (parentWindow == null) {
- var p = Application.EngineBackend.GetNativeParentWindow (this);
+ var p = BackendHost.EngineBackend.GetNativeParentWindow (this);
if (p != null)
- parentWindow = WidgetRegistry.WrapWindow (p);
+ parentWindow = BackendHost.ToolkitEngine.WrapWindow (p);
}
return parentWindow;
}
@@ -356,41 +344,102 @@ namespace Xwt
set {
margin = value;
OnPreferredSizeChanged ();
+ OnPlacementChanged ();
}
}
+ [DefaultValue (0d)]
public double MarginLeft {
get { return margin.Left; }
set {
margin.Left = value;
OnPreferredSizeChanged ();
+ OnPlacementChanged ();
}
}
+ [DefaultValue (0d)]
public double MarginRight {
get { return margin.Right; }
set {
margin.Right = value;
OnPreferredSizeChanged ();
+ OnPlacementChanged ();
}
}
+ [DefaultValue (0d)]
public double MarginTop {
get { return margin.Top; }
set {
margin.Top = value;
OnPreferredSizeChanged ();
+ OnPlacementChanged ();
}
}
+ [DefaultValue (0d)]
public double MarginBottom {
get { return margin.Bottom; }
set {
margin.Bottom = value;
OnPreferredSizeChanged ();
+ OnPlacementChanged ();
+ }
+ }
+
+ public WidgetPlacement VerticalPlacement {
+ get { return alignVertical; }
+ set {
+ alignVertical = value;
+ OnPreferredSizeChanged ();
+ OnPlacementChanged ();
+ }
+ }
+
+ public WidgetPlacement HorizontalPlacement {
+ get { return alignHorizontal; }
+ set {
+ alignHorizontal = value;
+ OnPreferredSizeChanged ();
+ OnPlacementChanged ();
+ }
+ }
+
+ internal WidgetPlacement AlignmentForOrientation (Orientation or)
+ {
+ if (or == Orientation.Vertical)
+ return VerticalPlacement;
+ else
+ return HorizontalPlacement;
+ }
+
+ public bool ExpandVertical {
+ get { return expandVertical; }
+ set {
+ expandVertical = value;
+ OnPreferredSizeChanged ();
+ OnPlacementChanged ();
+ }
+ }
+
+ public bool ExpandHorizontal {
+ get { return expandHorizontal; }
+ set {
+ expandHorizontal = value;
+ OnPreferredSizeChanged ();
+ OnPlacementChanged ();
}
}
+ internal bool ExpandsForOrientation (Orientation or)
+ {
+ if (or == Orientation.Vertical)
+ return ExpandVertical;
+ else
+ return ExpandHorizontal;
+ }
+
public void Show ()
{
Visible = true;
@@ -427,6 +476,12 @@ namespace Xwt
get { return Backend.HasFocus; }
}
+ [DefaultValue (1d)]
+ public double Opacity {
+ get { return Backend.Opacity; }
+ set { Backend.Opacity = value; }
+ }
+
[DefaultValue (null)]
public string Name { get; set; }
@@ -510,13 +565,13 @@ namespace Xwt
/// Natural width for the widget. If set to -1, the default natural size is used.
/// </remarks>
[DefaultValue((double)-1)]
- public double NaturalWidth {
- get { return minWidth; }
+ public double WidthRequest {
+ get { return widthRequest; }
set {
if (value < -1)
throw new ArgumentException ("NaturalWidth can't be less that -1");
- naturalWidth = value;
- Backend.SetNaturalSize (naturalWidth >= 0 ? naturalWidth : -1, naturalHeight >= 0 ? naturalHeight : -1);
+ widthRequest = value;
+ Backend.SetSizeRequest (widthRequest >= 0 ? widthRequest : -1, heightRequest >= 0 ? heightRequest : -1);
OnPreferredSizeChanged ();
}
}
@@ -531,13 +586,13 @@ namespace Xwt
/// Natural height for the widget. If set to -1, the default natural size is used.
/// </remarks>
[DefaultValue((double)-1)]
- public double NaturalHeight {
- get { return naturalHeight; }
+ public double HeightRequest {
+ get { return heightRequest; }
set {
if (value < -1)
throw new ArgumentException ("NaturalHeight can't be less that -1");
- naturalHeight = value;
- Backend.SetNaturalSize (naturalWidth >= 0 ? naturalWidth : -1, naturalHeight >= 0 ? naturalHeight : -1);
+ heightRequest = value;
+ Backend.SetSizeRequest (widthRequest >= 0 ? widthRequest : -1, heightRequest >= 0 ? heightRequest : -1);
OnPreferredSizeChanged ();
}
}
@@ -550,10 +605,10 @@ namespace Xwt
/// </value>
public Font Font {
get {
- return new Font (Backend.Font);
+ return new Font (Backend.Font, BackendHost.ToolkitEngine);
}
set {
- Backend.Font = WidgetRegistry.GetBackend (value);
+ Backend.Font = BackendHost.ToolkitEngine.GetSafeBackend (value);
}
}
@@ -561,9 +616,10 @@ namespace Xwt
get { return Backend.BackgroundColor; }
set { Backend.BackgroundColor = value; }
}
-
+
+ [DefaultValue ("")]
public string TooltipText {
- get { return Backend.TooltipText; }
+ get { return Backend.TooltipText ?? ""; }
set { Backend.TooltipText = value; }
}
@@ -573,6 +629,7 @@ namespace Xwt
/// <value>
/// The cursor.
/// </value>
+ [DefaultValue ("")]
public CursorType Cursor {
get { return cursor ?? CursorType.Arrow; }
set {
@@ -580,7 +637,12 @@ namespace Xwt
Backend.SetCursor (value);
}
}
-
+
+ public bool ShouldSerializeCursor ()
+ {
+ return Cursor != CursorType.Arrow;
+ }
+
public Point ConvertToScreenCoordinates (Point widgetCoordinates)
{
return Backend.ConvertToScreenCoordinates (widgetCoordinates);
@@ -826,26 +888,28 @@ namespace Xwt
// If bounds have changed and the widget has not a parent, chances are that
// the widget is embedded in a native application, in which case we
// have to call Reallocate here (which is normally called by the root XWT window)
- if (!Application.EngineBackend.HandlesSizeNegotiation && Parent == null)
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation && Parent == null)
Surface.Reallocate ();
OnBoundsChanged ();
}
- protected virtual void OnMouseScrolled(MouseScrolledEventArgs args)
- {
- if (mouseScrolled != null)
- mouseScrolled(this, args);
- }
+ protected virtual void OnMouseScrolled (MouseScrolledEventArgs args)
+ {
+ if (mouseScrolled != null)
+ mouseScrolled(this, args);
+ }
internal void SetExtractedAsNative ()
{
// If the widget is going to be embedded in another toolkit it is not going
// to receive Reallocate calls from its parent, so the widget has to reallocate
// itself when its size changes
- BoundsChanged += delegate {
- OnReallocate ();
- };
+ if (boundsChanged == null) {
+ BoundsChanged += delegate {
+ OnReallocate ();
+ };
+ }
}
protected virtual void OnBoundsChanged ()
@@ -861,112 +925,100 @@ namespace Xwt
void ResetCachedSizes ()
{
- widthCached = false;
- heightCached = false;
+ sizeCached = false;
+ }
+
+ Rectangle IWidgetSurface.GetPlacementInRect (Rectangle rect)
+ {
+ rect.X += Margin.Left;
+ rect.Y += Margin.Top;
+ rect.Width -= Margin.HorizontalSpacing;
+ rect.Height -= Margin.VerticalSpacing;
+ if (HorizontalPlacement != WidgetPlacement.Fill || VerticalPlacement != WidgetPlacement.Fill) {
+ var s = Surface.GetPreferredSize (rect.Width, rect.Height);
+ if (s.Width > rect.Width)
+ s.Width = rect.Width;
+ if (s.Height > rect.Height)
+ s.Height = rect.Height;
+ if (HorizontalPlacement != WidgetPlacement.Fill) {
+ rect.X += (rect.Width - s.Width) * HorizontalPlacement.GetValue ();
+ rect.Width = s.Width;
+ }
+ if (VerticalPlacement != WidgetPlacement.Fill) {
+ rect.Y += (rect.Height - s.Height) * VerticalPlacement.GetValue ();
+ rect.Height = s.Height;
+ }
+ }
+ if (rect.Width < 0)
+ rect.Width = 0;
+ if (rect.Height < 0)
+ rect.Height = 0;
+ return rect;
}
void IWidgetSurface.Reallocate ()
{
reallocationQueue.Remove (this);
+ if (DebugWidgetLayout) {
+ LayoutLog ("Reallocate: {0} - {1}", Size, GetWidgetDesc ());
+ DebugWidgetLayoutIndent += 3;
+ }
+
OnReallocate ();
+
+ if (DebugWidgetLayout)
+ DebugWidgetLayoutIndent -= 3;
}
-
- SizeRequestMode IWidgetSurface.SizeRequestMode {
- get { return OnGetSizeRequestMode (); }
- }
-
- WidgetSize IWidgetSurface.GetPreferredWidth ()
+
+ Size IWidgetSurface.GetPreferredSize (bool includeMargin)
{
- if (widthCached)
- return width;
- else {
- if (minWidth != -1 && naturalWidth != -1)
- return new WidgetSize (minWidth, naturalWidth);
- width = OnGetPreferredWidth () + Margin.HorizontalSpacing;
- if (naturalWidth != -1)
- width.NaturalSize = naturalWidth;
- if (minWidth != -1)
- width.MinSize = minWidth;
- if (width.NaturalSize < width.MinSize)
- width.NaturalSize = width.MinSize;
- if (!Application.EngineBackend.HandlesSizeNegotiation)
- widthCached = true;
- return width;
- }
+ return ((IWidgetSurface)this).GetPreferredSize (SizeConstraint.Unconstrained, SizeConstraint.Unconstrained, includeMargin);
}
-
- WidgetSize IWidgetSurface.GetPreferredHeight ()
+
+ Size IWidgetSurface.GetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint, bool includeMargin)
{
- if (heightCached)
- return height;
- else {
- if (minHeight != -1 && naturalHeight != -1)
- return new WidgetSize (minHeight, naturalHeight);
- height = OnGetPreferredHeight () + Margin.VerticalSpacing;
- if (naturalHeight != -1)
- height.NaturalSize = naturalHeight;
- if (minHeight != -1)
- height.MinSize = minHeight;
- if (height.NaturalSize < height.MinSize)
- height.NaturalSize = height.MinSize;
- if (!Application.EngineBackend.HandlesSizeNegotiation)
- heightCached = true;
- return height;
+ if (includeMargin) {
+ return Surface.GetPreferredSize (widthConstraint - margin.HorizontalSpacing, heightConstraint - margin.VerticalSpacing, false) + new Size (Margin.HorizontalSpacing, Margin.VerticalSpacing);
}
- }
-
- WidgetSize IWidgetSurface.GetPreferredHeightForWidth (double width)
- {
- if (referenceWidth == width && heightCached)
- return height;
- else {
- referenceWidth = width;
- if (!Application.EngineBackend.HandlesSizeNegotiation)
- heightCached = true;
- if (minHeight != -1 && naturalHeight != -1)
- return new WidgetSize (minHeight, naturalHeight);
- // Horizontal margin is substracted here because that's space which
- // can't really be used to render the widget
- width = Math.Max (width - Margin.HorizontalSpacing, 0);
- height = OnGetPreferredHeightForWidth (width) + Margin.VerticalSpacing;
- if (naturalHeight != -1)
- height.NaturalSize = naturalHeight;
- if (minHeight != -1)
- height.MinSize = minHeight;
- if (height.NaturalSize < height.MinSize)
- height.NaturalSize = height.MinSize;
- return height;
- }
- }
-
- WidgetSize IWidgetSurface.GetPreferredWidthForHeight (double height)
- {
- if (referenceHeight == height && widthCached)
- return width;
+
+ if (sizeCached && widthConstraint == cachedWidthConstraint && heightConstraint == cachedHeightConstraint)
+ return cachedSize;
else {
- referenceHeight = height;
- if (!Application.EngineBackend.HandlesSizeNegotiation)
- widthCached = true;
- if (minWidth != -1 && naturalWidth != -1)
- return new WidgetSize (minWidth, naturalWidth);
- // Vertical margin is substracted here because that's space which
- // can't really be used to render the widget
- height = Math.Max (height - Margin.VerticalSpacing, 0);
- width = OnGetPreferredWidthForHeight (height) + Margin.HorizontalSpacing;
- if (naturalWidth != -1)
- width.NaturalSize = naturalWidth;
- if (minWidth != -1)
- width.MinSize = minWidth;
- if (width.NaturalSize < width.MinSize)
- width.NaturalSize = width.MinSize;
- return width;
+ if (DebugWidgetLayout) {
+ LayoutLog ("GetPreferredSize: wc:{0} hc:{1} - {2}", widthConstraint, heightConstraint, GetWidgetDesc ());
+ DebugWidgetLayoutIndent += 3;
+ }
+
+ cachedSize = OnGetPreferredSize (widthConstraint, heightConstraint);
+
+ if (DebugWidgetLayout)
+ DebugWidgetLayoutIndent -= 3;
+
+ if (minWidth > cachedSize.Width)
+ cachedSize.Width = minWidth;
+ if (minHeight > cachedSize.Height)
+ cachedSize.Height = minHeight;
+ if (cachedSize.Width < 0)
+ cachedSize.Width = 0;
+ if (cachedSize.Height < 0)
+ cachedSize.Height = 0;
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation) {
+ sizeCached = true;
+ cachedWidthConstraint = widthConstraint;
+ cachedHeightConstraint = heightConstraint;
+ }
+ return cachedSize;
}
}
-
+
object IWidgetSurface.NativeWidget {
get { return Backend.NativeWidget; }
}
+ Toolkit IWidgetSurface.ToolkitEngine {
+ get { return BackendHost.ToolkitEngine; }
+ }
+
protected virtual void OnReallocate ()
{
if (children != null) {
@@ -974,43 +1026,13 @@ namespace Xwt
w.Surface.Reallocate ();
}
}
-
- protected virtual SizeRequestMode OnGetSizeRequestMode ()
- {
- return SizeRequestMode.HeightForWidth;
- }
-
-
- /// <summary>
- /// Gets the preferred width of the widget (it must not include the widget margin)
- /// </summary>
- protected virtual WidgetSize OnGetPreferredWidth ()
- {
- return Backend.GetPreferredWidth ();
- }
-
- /// <summary>
- /// Gets the preferred height of the widget (it must not include the widget margin)
- /// </summary>
- protected virtual WidgetSize OnGetPreferredHeight ()
- {
- return Backend.GetPreferredHeight ();
- }
-
- /// <summary>
- /// Gets the preferred height of the widget for a given width (it must not include the widget margin)
- /// </summary>
- protected virtual WidgetSize OnGetPreferredHeightForWidth (double width)
- {
- return Backend.GetPreferredHeightForWidth (width);
- }
-
+
/// <summary>
- /// Gets the preferred width of the widget for a given height (it must not include the widget margin)
+ /// Gets the preferred size of the widget (it must not include the widget margin)
/// </summary>
- protected virtual WidgetSize OnGetPreferredWidthForHeight (double height)
+ protected virtual Size OnGetPreferredSize (SizeConstraint widthConstraint, SizeConstraint heightConstraint)
{
- return Backend.GetPreferredWidthForHeight (height);
+ return Backend.GetPreferredSize (widthConstraint, heightConstraint);
}
void OnChildPreferredSizeChanged ()
@@ -1025,29 +1047,12 @@ namespace Xwt
// of this widget. If it does, the size change notification
// has to be propagated to the parent
- var oldWidth = width;
- var oldHeight = height;
-
+ var oldSize = cachedSize;
+
ResetCachedSizes ();
- bool changed = true;
-
- if (Surface.SizeRequestMode == SizeRequestMode.HeightForWidth) {
- var nw = Surface.GetPreferredWidth ();
- if (nw == oldWidth) {
- var nh = Surface.GetPreferredHeightForWidth (Backend.Size.Width);
- if (nh == oldHeight)
- changed = false;
- }
- } else {
- var nh = Surface.GetPreferredHeight ();
- if (nh == oldHeight) {
- var nw = Surface.GetPreferredWidthForHeight (Backend.Size.Height);
- if (nw == oldWidth)
- changed = false;
- }
- }
- if (changed)
+ var s = Surface.GetPreferredSize (SizeConstraint.Unconstrained, SizeConstraint.Unconstrained);
+ if (s != oldSize)
NotifySizeChangeToParent ();
else
QueueForReallocate (this);
@@ -1055,7 +1060,6 @@ namespace Xwt
static HashSet<Widget> resizeRequestQueue = new HashSet<Widget> ();
static HashSet<Widget> reallocationQueue = new HashSet<Widget> ();
- static List<int> resizeDepths = new List<int> ();
static List<Widget> resizeWidgets = new List<Widget> ();
static List<Window> resizeWindows = new List<Window> ();
static bool delayedSizeNegotiationRequested;
@@ -1069,23 +1073,51 @@ namespace Xwt
ResetCachedSizes ();
Backend.UpdateLayout ();
- if (!Application.EngineBackend.HandlesSizeNegotiation)
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation)
NotifySizeChangeToParent ();
}
+
+ internal void OnPlacementChanged ()
+ {
+ if (Parent != null)
+ Parent.OnChildPlacementChanged (this);
+ else if (parentWindow is Window)
+ ((Window)parentWindow).OnChildPlacementChanged (this);
+ }
+
+ protected virtual void OnChildPlacementChanged (Widget child)
+ {
+ var ph = Backend as IChildPlacementHandler;
+ if (ph != null)
+ ph.UpdateChildPlacement (child.GetBackend ());
+ else
+ QueueForReallocate ();
+ }
+
+ public void QueueForReallocate ()
+ {
+ reallocationQueue.Add (this);
+ QueueDelayedResizeRequest ();
+ }
+
+ static void QueueDelayedResizeRequest ()
+ {
+ if (!delayedSizeNegotiationRequested) {
+ delayedSizeNegotiationRequested = true;
+ Application.MainLoop.QueueExitAction (DelayedResizeRequest);
+ }
+ }
void NotifySizeChangeToParent ()
{
if (Parent != null) {
QueueForSizeCheck (Parent);
- if (!delayedSizeNegotiationRequested) {
- delayedSizeNegotiationRequested = true;
- Toolkit.QueueExitAction (DelayedResizeRequest);
- }
+ QueueDelayedResizeRequest ();
}
else if (parentWindow is Window) {
QueueWindowSizeNegotiation ((Window)parentWindow);
}
- else if (Application.EngineBackend.HasNativeParent (this)) {
+ else if (BackendHost.EngineBackend.HasNativeParent (this)) {
// This may happen when the widget is embedded in another toolkit. In this case,
// this is the root widget, so it has to reallocate itself
@@ -1096,10 +1128,7 @@ namespace Xwt
internal static void QueueWindowSizeNegotiation (Window window)
{
resizeWindows.Add ((Window)window);
- if (!delayedSizeNegotiationRequested) {
- delayedSizeNegotiationRequested = true;
- Toolkit.QueueExitAction (DelayedResizeRequest);
- }
+ QueueDelayedResizeRequest ();
}
void QueueForReallocate (Widget w)
@@ -1109,37 +1138,46 @@ namespace Xwt
void QueueForSizeCheck (Widget w)
{
- if (resizeRequestQueue.Add (w)) {
- int depth = w.Depth;
- bool inserted = false;
- for (int n=0; n<resizeDepths.Count; n++) {
- if (resizeDepths[n] < depth) {
- resizeDepths.Insert (n, depth);
- resizeWidgets.Insert (n, w);
- inserted = true;
- break;
- }
- }
- if (!inserted) {
- resizeDepths.Add (depth);
- resizeWidgets.Add (w);
- }
- }
+ if (resizeRequestQueue.Add (w))
+ resizeWidgets.Add (w);
}
-
+
static void DelayedResizeRequest ()
{
+ if (DebugWidgetLayout)
+ LayoutLog (">> Begin Delayed Relayout");
+
// First of all, query the preferred size for those
// widgets that were changed
try {
+ // We have to recalculate the size of each widget starting from the leafs and ending
+ // at the root of the widget hierarchy. We do it in several waves, since new widgets
+ // may be added to the list while doing the size checks
+
int n = 0;
+ int[] depths = null;
+ Widget[] items = null;
+
while (n < resizeWidgets.Count) {
- var w = resizeWidgets[n];
- w.OnChildPreferredSizeChanged ();
- n++;
+ int remaining = resizeWidgets.Count - n;
+ if (items == null || items.Length < remaining) {
+ depths = new int[remaining];
+ items = new Widget[remaining];
+ }
+ resizeWidgets.CopyTo (n, items, 0, remaining);
+
+ for (int k=0; k<remaining; k++)
+ depths[k] = items[k].Depth;
+
+ Array.Sort (depths, items, 0, remaining);
+
+ for (int k=remaining - 1; k>=0; k--)
+ items[k].OnChildPreferredSizeChanged ();
+
+ n += remaining;
}
-
+
// Now reallocate the widgets whose size has actually changed
var toReallocate = reallocationQueue.OrderBy (w => w.Depth).ToArray ();
@@ -1155,11 +1193,12 @@ namespace Xwt
}
} finally {
resizeRequestQueue.Clear ();
- resizeDepths.Clear ();
resizeWidgets.Clear ();
reallocationQueue.Clear ();
resizeWindows.Clear ();
delayedSizeNegotiationRequested = false;
+ if (DebugWidgetLayout)
+ LayoutLog (">> End Delayed Relayout");
}
}
@@ -1170,6 +1209,21 @@ namespace Xwt
return 0;
}
}
+
+ string GetWidgetDesc ()
+ {
+ if (Parent != null) {
+ int i = Parent.Surface.Children.ToList ().IndexOf (this);
+ return this + " [" + GetHashCode() + "] (" + i + ")";
+ }
+ else
+ return this.ToString ();
+ }
+
+ static void LayoutLog (string str, params object[] args)
+ {
+ Console.WriteLine (new String (' ', DebugWidgetLayoutIndent) + string.Format (str, args));
+ }
IEnumerable<Widget> IWidgetSurface.Children {
get {
@@ -1179,9 +1233,15 @@ namespace Xwt
protected void RegisterChild (Widget w)
{
+ if (w.Parent != null)
+ throw new InvalidOperationException ("Widget is already a child of another widget");
+ if (w.Surface.ToolkitEngine != Surface.ToolkitEngine)
+ throw new InvalidOperationException ("Widget belongs to a different toolkit");
if (children == null)
children = new List<Widget> ();
w.Parent = this;
+ if (w.Backend is XwtWidgetBackend)
+ ((XwtWidgetBackend)w.Backend).Parent = this;
children.Add (w);
// Make sure the widget is queued for reallocation
@@ -1193,8 +1253,18 @@ namespace Xwt
if (children == null || !children.Remove (w))
throw new InvalidOperationException ("Widget is not a child of this widget");
w.Parent = null;
+ if (w.Backend is XwtWidgetBackend)
+ ((XwtWidgetBackend)w.Backend).Parent = null;
}
+ void IAnimatable.BatchBegin ()
+ {
+ }
+
+ void IAnimatable.BatchCommit ()
+ {
+ }
+
/// <summary>
/// Raised when the mouse is moved over the widget in a drag&drop operation
/// </summary>
diff --git a/external/xwt/Xwt/Xwt/WidgetAlignment.cs b/external/xwt/Xwt/Xwt/WidgetAlignment.cs
new file mode 100644
index 0000000..21ca8d0
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/WidgetAlignment.cs
@@ -0,0 +1,38 @@
+//
+// WidgetAlignment.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public enum WidgetPlacement
+ {
+ Start = 1,
+ Center = 2,
+ End = 3,
+ Fill = 4
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/WidgetEventArgs.cs b/external/xwt/Xwt/Xwt/WidgetEventArgs.cs
new file mode 100644
index 0000000..b6e2c78
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/WidgetEventArgs.cs
@@ -0,0 +1,40 @@
+//
+// WidgetEventArgs.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public class WidgetEventArgs: EventArgs
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether the event has been handled.
+ /// </summary>
+ /// <value><c>true</c> if handled; otherwise, <c>false</c>.</value>
+ /// <remarks>This property can be set to <c>true</c> to prevent the execution of the default handler of the event</remarks>
+ public bool Handled { get; set; }
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/WidgetSize.cs b/external/xwt/Xwt/Xwt/WidgetSize.cs
deleted file mode 100644
index e9395ac..0000000
--- a/external/xwt/Xwt/Xwt/WidgetSize.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-//
-// WidgetSize.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc
-//
-// 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;
-
-namespace Xwt
-{
- public struct WidgetSize
- {
- public WidgetSize (double minAndNatural): this ()
- {
- MinSize = minAndNatural;
- NaturalSize = minAndNatural;
- }
-
- public WidgetSize (double min, double natural): this ()
- {
- MinSize = min;
- NaturalSize = natural;
- }
-
- public double MinSize { get; set; }
- public double NaturalSize { get; set; }
-
- public override bool Equals (object obj)
- {
- if (!(obj is WidgetSize))
- return false;
- WidgetSize s = (WidgetSize) obj;
- return s.MinSize == MinSize && s.NaturalSize == NaturalSize;
- }
-
- public override int GetHashCode ()
- {
- return MinSize.GetHashCode () ^ NaturalSize.GetHashCode ();
- }
-
- public static WidgetSize operator + (WidgetSize sz1, WidgetSize sz2)
- {
- return new WidgetSize (sz1.MinSize + sz2.MinSize, sz1.NaturalSize + sz2.NaturalSize);
- }
-
- public static bool operator == (WidgetSize sz_a, WidgetSize sz_b)
- {
- return ((sz_a.MinSize == sz_b.MinSize) && (sz_a.NaturalSize == sz_b.NaturalSize));
- }
-
- public static bool operator != (WidgetSize sz_a, WidgetSize sz_b)
- {
- return ((sz_a.MinSize != sz_b.MinSize) || (sz_a.NaturalSize != sz_b.NaturalSize));
- }
-
- public static WidgetSize operator - (WidgetSize sz1, WidgetSize sz2)
- {
- return new WidgetSize (sz1.MinSize - sz2.MinSize, sz1.NaturalSize - sz2.NaturalSize);
- }
-
- public static WidgetSize operator + (WidgetSize sz1, double sz2)
- {
- return new WidgetSize (sz1.MinSize + sz2, sz1.NaturalSize + sz2);
- }
-
- public static WidgetSize operator - (WidgetSize sz1, double sz2)
- {
- return new WidgetSize (sz1.MinSize - sz2, sz1.NaturalSize - sz2);
- }
-
- public WidgetSize UnionWith (WidgetSize s2)
- {
- return new WidgetSize (Math.Max (MinSize, s2.MinSize), Math.Max (NaturalSize, s2.NaturalSize));
- }
-
- public override string ToString ()
- {
- return string.Format ("[WidgetSize: MinSize={0}, NaturalSize={1}]", MinSize, NaturalSize);
- }
- }
-}
-
diff --git a/external/xwt/Xwt/Xwt/WidgetSpacing.cs b/external/xwt/Xwt/Xwt/WidgetSpacing.cs
index 623bf13..09998a9 100644
--- a/external/xwt/Xwt/Xwt/WidgetSpacing.cs
+++ b/external/xwt/Xwt/Xwt/WidgetSpacing.cs
@@ -28,14 +28,19 @@ using System;
using System.ComponentModel;
using System.Collections.Generic;
using Xwt.Backends;
-using Xwt.Engine;
+
using Xwt.Drawing;
using System.Reflection;
using System.Xaml;
using System.Linq;
+using System.Windows.Markup;
+using System.Text;
+using System.Globalization;
namespace Xwt
{
+ [TypeConverter (typeof(WidgetSpacingValueConverter))]
+ [ValueSerializer (typeof(WidgetSpacingValueSerializer))]
public struct WidgetSpacing
{
static public implicit operator WidgetSpacing (double value)
@@ -66,21 +71,77 @@ namespace Xwt
public double VerticalSpacing {
get { return Top + Bottom; }
}
+
+ public double GetSpacingForOrientation (Orientation orientation)
+ {
+ if (orientation == Orientation.Vertical)
+ return Top + Bottom;
+ else
+ return Left + Right;
+ }
+ }
+
+
+ class WidgetSpacingValueConverter: TypeConverter
+ {
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
+ {
+ return destinationType == typeof(string);
+ }
-/* public void Set (double left, double top, double right, double bottom)
+ public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
{
- Left = left;
- Top = top;
- Bottom = bottom;
- Right = right;
+ return sourceType == typeof(string);
+ }
+ }
+
+ class WidgetSpacingValueSerializer: ValueSerializer
+ {
+ public override bool CanConvertFromString (string value, IValueSerializerContext context)
+ {
+ return true;
+ }
+
+ public override bool CanConvertToString (object value, IValueSerializerContext context)
+ {
+ return true;
}
- public void SetAll (double padding)
+ public override string ConvertToString (object value, IValueSerializerContext context)
{
- Left = padding;
- Top = padding;
- Bottom = padding;
- Right = padding;
- }*/
+ WidgetSpacing s = (WidgetSpacing) value;
+ if (s.Left == s.Right && s.Right == s.Top && s.Top == s.Bottom)
+ return s.Left.ToString (CultureInfo.InvariantCulture);
+ if (s.Bottom != 0)
+ return s.Left.ToString (CultureInfo.InvariantCulture) + " " + s.Top.ToString (CultureInfo.InvariantCulture) + " " + s.Right.ToString (CultureInfo.InvariantCulture) + " " + s.Bottom.ToString (CultureInfo.InvariantCulture);
+ if (s.Right != 0)
+ return s.Left.ToString (CultureInfo.InvariantCulture) + " " + s.Top.ToString (CultureInfo.InvariantCulture) + " " + s.Right.ToString (CultureInfo.InvariantCulture);
+ return s.Left.ToString (CultureInfo.InvariantCulture) + " " + s.Top.ToString (CultureInfo.InvariantCulture);
+ }
+
+ public override object ConvertFromString (string value, IValueSerializerContext context)
+ {
+ WidgetSpacing c = new WidgetSpacing ();
+ string[] values = value.Split (new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+ if (values.Length == 0)
+ return c;
+
+ double v;
+ if (double.TryParse (values [0], NumberStyles.Any, CultureInfo.InvariantCulture, out v))
+ c.Left = v;
+
+ if (value.Length == 1) {
+ c.Top = c.Right = c.Bottom = v;
+ return c;
+ }
+
+ if (value.Length >= 2 && double.TryParse (values [1], NumberStyles.Any, CultureInfo.InvariantCulture, out v))
+ c.Top = v;
+ if (value.Length >= 3 && double.TryParse (values [2], NumberStyles.Any, CultureInfo.InvariantCulture, out v))
+ c.Right = v;
+ if (value.Length >= 4 && double.TryParse (values [3], NumberStyles.Any, CultureInfo.InvariantCulture, out v))
+ c.Bottom = v;
+ return c;
+ }
}
}
diff --git a/external/xwt/Xwt/Xwt/Window.cs b/external/xwt/Xwt/Xwt/Window.cs
old mode 100755
new mode 100644
index 186bb87..55f83dd
--- a/external/xwt/Xwt/Xwt/Window.cs
+++ b/external/xwt/Xwt/Xwt/Window.cs
@@ -26,17 +26,18 @@
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
namespace Xwt
{
+ [BackendType (typeof(IWindowBackend))]
public class Window: WindowFrame
{
Widget child;
WidgetSpacing padding;
Menu mainMenu;
bool shown;
-
+
protected new class WindowBackendHost: WindowFrame.WindowBackendHost
{
}
@@ -48,7 +49,7 @@ namespace Xwt
public Window ()
{
- Padding = 6;
+ Padding = 12;
}
public Window (string title): base (title)
@@ -58,7 +59,12 @@ namespace Xwt
IWindowBackend Backend {
get { return (IWindowBackend) BackendHost.Backend; }
}
-
+
+ public WindowLocation InitialLocation {
+ get { return initialLocation; }
+ set { initialLocation = value; }
+ }
+
public WidgetSpacing Padding {
get { return padding; }
set {
@@ -110,7 +116,7 @@ namespace Xwt
}
set {
mainMenu = value;
- Backend.SetMainMenu ((IMenuBackend)WidgetRegistry.GetBackend (mainMenu));
+ Backend.SetMainMenu ((IMenuBackend)BackendHost.ToolkitEngine.GetSafeBackend (mainMenu));
}
}
@@ -123,15 +129,15 @@ namespace Xwt
child.SetParentWindow (null);
this.child = value;
child.SetParentWindow (this);
- Backend.SetChild ((IWidgetBackend)WidgetRegistry.GetBackend (child));
- if (!Application.EngineBackend.HandlesSizeNegotiation)
+ Backend.SetChild ((IWidgetBackend)BackendHost.ToolkitEngine.GetSafeBackend (child));
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation)
Widget.QueueWindowSizeNegotiation (this);
}
}
protected override void OnReallocate ()
{
- if (child != null && !Application.EngineBackend.HandlesSizeNegotiation) {
+ if (child != null && !BackendHost.EngineBackend.HandlesSizeNegotiation) {
child.Surface.Reallocate ();
}
}
@@ -140,13 +146,13 @@ namespace Xwt
bool heightSet;
bool locationSet;
Rectangle initialBounds;
+ WindowLocation initialLocation = WindowLocation.CenterParent;
internal override void SetBackendSize (double width, double height)
{
- if (shown || Application.EngineBackend.HandlesSizeNegotiation) {
+ if (shown)
base.SetBackendSize (width, height);
- }
- if (!shown) {
+ else {
if (width != -1) {
initialBounds.Width = width;
widthSet = true;
@@ -160,7 +166,7 @@ namespace Xwt
internal override void SetBackendLocation (double x, double y)
{
- if (shown || Application.EngineBackend.HandlesSizeNegotiation)
+ if (shown || BackendHost.EngineBackend.HandlesSizeNegotiation)
base.SetBackendLocation (x, y);
if (!shown) {
locationSet = true;
@@ -172,11 +178,11 @@ namespace Xwt
{
get
{
- return shown ? base.BackendBounds : initialBounds;
+ return shown || BackendHost.EngineBackend.HandlesSizeNegotiation ? base.BackendBounds : initialBounds;
}
set
{
- if (shown || Application.EngineBackend.HandlesSizeNegotiation)
+ if (shown || BackendHost.EngineBackend.HandlesSizeNegotiation)
base.BackendBounds = value;
if (!shown) {
widthSet = heightSet = locationSet = true;
@@ -185,7 +191,14 @@ namespace Xwt
}
}
- internal void AdjustSize ()
+ internal void OnChildPlacementChanged (Widget child)
+ {
+ Backend.UpdateChildPlacement (child.GetBackend ());
+ if (!BackendHost.EngineBackend.HandlesSizeNegotiation)
+ Widget.QueueWindowSizeNegotiation (this);
+ }
+
+ internal override void AdjustSize ()
{
if (child == null)
return;
@@ -194,36 +207,58 @@ namespace Xwt
var size = shown ? Size : initialBounds.Size;
- var w = s.GetPreferredWidth ();
+ var wc = (shown || widthSet) ? SizeConstraint.WithSize (size.Width - padding.HorizontalSpacing) : SizeConstraint.Unconstrained;
+ var hc = (shown || heightSet) ? SizeConstraint.WithSize (size.Height - padding.VerticalSpacing) : SizeConstraint.Unconstrained;
- if (!shown && !widthSet)
- size.Width = w.NaturalSize + padding.HorizontalSpacing;
+ var ws = s.GetPreferredSize (wc, hc, true);
- var h = s.GetPreferredHeightForWidth (size.Width - padding.HorizontalSpacing);
+ if (!shown) {
+ if (!widthSet)
+ size.Width = ws.Width + padding.HorizontalSpacing;
+ if (!heightSet)
+ size.Height = ws.Height + padding.VerticalSpacing;
+ }
- if (!shown && !heightSet)
- size.Height = h.NaturalSize + padding.VerticalSpacing;
+ Size mMinSize, mDecorationsSize;
+ Backend.GetMetrics (out mMinSize, out mDecorationsSize);
- if (w.MinSize + padding.HorizontalSpacing > size.Width)
- size.Width = w.MinSize + padding.HorizontalSpacing;
- if (h.MinSize + padding.VerticalSpacing > size.Height)
- size.Height = h.MinSize + padding.VerticalSpacing;
+ if (ws.Width < mMinSize.Width)
+ ws.Width = mMinSize.Width;
+ if (ws.Height < mMinSize.Height)
+ ws.Height = mMinSize.Height;
- if (!Application.EngineBackend.HandlesSizeNegotiation || !shown) {
-
+ if (ws.Width > size.Width)
+ size.Width = ws.Width;
+ if (ws.Height > size.Height)
+ size.Height = ws.Height;
+
+ if (!shown) {
shown = true;
+
+ if (!locationSet && initialLocation != WindowLocation.Manual) {
+ Point center;
+ if (initialLocation == WindowLocation.CenterScreen || TransientFor == null)
+ center = Desktop.PrimaryScreen.VisibleBounds.Center;
+ else
+ center = TransientFor.ScreenBounds.Center;
+ initialBounds.X = center.X - size.Width / 2;
+ initialBounds.Y = center.Y - size.Height / 2;
+ locationSet = true;
+ }
if (size != Size) {
if (locationSet)
- Backend.Bounds = initialBounds;
+ Backend.Bounds = new Rectangle (initialBounds.X, initialBounds.Y, size.Width, size.Height);
else
- Size = size + Backend.ImplicitMinSize;
- }
- else if (locationSet)
+ Backend.SetSize (size.Width, size.Height);
+ } else if (locationSet && !shown)
Backend.Move (initialBounds.X, initialBounds.Y);
- Backend.SetMinSize (Backend.ImplicitMinSize + new Size (w.MinSize + padding.HorizontalSpacing, h.MinSize + padding.VerticalSpacing));
+ } else {
+ if (size != Size)
+ Backend.SetSize (size.Width, size.Height);
}
+ Backend.SetMinSize (mDecorationsSize + new Size (ws.Width + padding.HorizontalSpacing, ws.Height + padding.VerticalSpacing));
}
}
}
diff --git a/external/xwt/Xwt/Xwt/WindowFrame.cs b/external/xwt/Xwt/Xwt/WindowFrame.cs
index c87da5c..2bc1f92 100644
--- a/external/xwt/Xwt/Xwt/WindowFrame.cs
+++ b/external/xwt/Xwt/Xwt/WindowFrame.cs
@@ -51,13 +51,15 @@
// THE SOFTWARE.
using System;
using Xwt.Backends;
-using Xwt.Engine;
+
using System.ComponentModel;
using Xwt.Drawing;
+using Xwt.Motion;
namespace Xwt
{
- public class WindowFrame: XwtComponent
+ [BackendType (typeof(IWindowFrameBackend))]
+ public class WindowFrame: XwtComponent, IAnimatable
{
EventHandler boundsChanged;
EventHandler shown;
@@ -153,6 +155,8 @@ namespace Xwt
if (value.Height < 0)
value.Height = 0;
BackendBounds = value;
+ if (Visible)
+ AdjustSize ();
}
}
@@ -172,6 +176,8 @@ namespace Xwt
if (value < 0)
value = 0;
SetBackendSize (value, -1);
+ if (Visible)
+ AdjustSize ();
}
}
@@ -181,9 +187,15 @@ namespace Xwt
if (value < 0)
value = 0;
SetBackendSize (-1, value);
+ if (Visible)
+ AdjustSize ();
}
}
-
+
+ /// <summary>
+ /// Size of the window, not including the decorations
+ /// </summary>
+ /// <value>The size.</value>
public Size Size {
get { return BackendBounds.Size; }
set {
@@ -192,6 +204,8 @@ namespace Xwt
if (value.Height < 0)
value.Height = 0;
SetBackendSize (value.Width, value.Height);
+ if (Visible)
+ AdjustSize ();
}
}
@@ -207,7 +221,7 @@ namespace Xwt
public Image Icon {
get { return icon; }
- set { Backend.SetIcon((value as IFrontend).Backend); }
+ set { icon = value; Backend.SetIcon (icon != null ? icon.ImageDescription : ImageDescription.Null); }
}
public bool Decorated {
@@ -237,12 +251,45 @@ namespace Xwt
get { return Backend.Visible; }
set { Backend.Visible = value; }
}
+
+ public double Opacity {
+ get { return Backend.Opacity; }
+ set { Backend.Opacity = value; }
+ }
+ /// <summary>
+ /// Gets or sets a value indicating whether this window is in full screen mode
+ /// </summary>
+ /// <value><c>true</c> if the window is in full screen mode; otherwise, <c>false</c>.</value>
+ public bool FullScreen {
+ get { return Backend.FullScreen; }
+ set { Backend.FullScreen = value; }
+ }
+
+ /// <summary>
+ /// Gets the screen on which most of the area of this window is placed
+ /// </summary>
+ /// <value>The screen.</value>
+ public Screen Screen {
+ get {
+ if (!Visible)
+ throw new InvalidOperationException ("The window is not visible");
+ return Desktop.GetScreen (Backend.Screen);
+ }
+ }
+
public void Show ()
{
- Visible = true;
+ if (!Visible) {
+ AdjustSize ();
+ Visible = true;
+ }
}
+ internal virtual void AdjustSize ()
+ {
+ }
+
/// <summary>
/// Presents a window to the user. This may mean raising the window in the stacking order,
/// deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus
@@ -280,8 +327,7 @@ namespace Xwt
internal virtual void SetBackendSize (double width, double height)
{
- size = new Size (width != -1 ? width : Width, height != -1 ? height : Height);
- Backend.Resize (size.Width, size.Height);
+ Backend.SetSize (width, height);
}
internal virtual void SetBackendLocation (double x, double y)
@@ -318,7 +364,7 @@ namespace Xwt
{
if (!pendingReallocation) {
pendingReallocation = true;
- Toolkit.QueueExitAction (delegate {
+ BackendHost.ToolkitEngine.QueueExitAction (delegate {
pendingReallocation = false;
OnReallocate ();
});
@@ -329,6 +375,14 @@ namespace Xwt
{
}
+ void IAnimatable.BatchBegin ()
+ {
+ }
+
+ void IAnimatable.BatchCommit ()
+ {
+ }
+
public event EventHandler BoundsChanged {
add {
boundsChanged += value;
diff --git a/external/xwt/Xwt/Xwt/WindowLocation.cs b/external/xwt/Xwt/Xwt/WindowLocation.cs
new file mode 100644
index 0000000..4d1c566
--- /dev/null
+++ b/external/xwt/Xwt/Xwt/WindowLocation.cs
@@ -0,0 +1,48 @@
+//
+// WindowLocation.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Xwt
+{
+ public enum WindowLocation
+ {
+ /// <summary>
+ /// The window is placed in the coordinates specified in the window bounds
+ /// </summary>
+ Manual,
+
+ /// <summary>
+ /// The window is centered on the parent, or on the screen if it doesn't have a parent
+ /// </summary>
+ CenterParent,
+
+ /// <summary>
+ /// The window is centered on the screen
+ /// </summary>
+ CenterScreen
+ }
+}
+
diff --git a/external/xwt/Xwt/Xwt/XwtComponent.cs b/external/xwt/Xwt/Xwt/XwtComponent.cs
index c9ce05a..ec952c5 100755
--- a/external/xwt/Xwt/Xwt/XwtComponent.cs
+++ b/external/xwt/Xwt/Xwt/XwtComponent.cs
@@ -26,7 +26,7 @@
using System;
using System.ComponentModel;
-using Xwt.Engine;
+
using System.Collections.Generic;
using System.Reflection;
using Xwt.Backends;
@@ -47,15 +47,19 @@ namespace Xwt
{
return new BackendHost ();
}
-
+
protected BackendHost BackendHost {
get { return backendHost; }
}
+ Toolkit IFrontend.ToolkitEngine {
+ get { return backendHost.ToolkitEngine; }
+ }
+
object IFrontend.Backend {
get { return backendHost.Backend; }
}
-
+
protected static void MapEvent (object eventId, Type type, string methodName)
{
EventUtil.MapEvent (eventId, type, methodName);
diff --git a/external/xwt/Xwt/Xwt/XwtObject.cs b/external/xwt/Xwt/Xwt/XwtObject.cs
index 640989f..f145bac 100644
--- a/external/xwt/Xwt/Xwt/XwtObject.cs
+++ b/external/xwt/Xwt/Xwt/XwtObject.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
-using Xwt.Engine;
+
using Xwt.Backends;
namespace Xwt
@@ -33,18 +33,28 @@ namespace Xwt
public abstract class XwtObject: IFrontend
{
object backend;
+
+ internal Toolkit ToolkitEngine { get; set; }
+
+ protected XwtObject (object backend): this (backend, Toolkit.CurrentEngine)
+ {
+ }
- protected XwtObject (object backend)
+ protected XwtObject (object backend, Toolkit toolkit)
{
this.backend = backend;
+ ToolkitEngine = Toolkit.CurrentEngine;
}
protected XwtObject ()
{
+ ToolkitEngine = Toolkit.CurrentEngine;
+ }
+
+ Toolkit IFrontend.ToolkitEngine {
+ get { return ToolkitEngine; }
}
- protected abstract IBackendHandler BackendHandler { get; }
-
protected object Backend {
get {
LoadBackend ();
@@ -58,7 +68,7 @@ namespace Xwt
object IFrontend.Backend {
get { return Backend; }
}
-
+
protected void LoadBackend ()
{
if (backend == null) {
diff --git a/external/xwt/Xwt/Xwt/XwtTaskScheduler.cs b/external/xwt/Xwt/Xwt/XwtTaskScheduler.cs
index aa302bb..6de4cf8 100644
--- a/external/xwt/Xwt/Xwt/XwtTaskScheduler.cs
+++ b/external/xwt/Xwt/Xwt/XwtTaskScheduler.cs
@@ -37,10 +37,17 @@ namespace Xwt
/// </summary>
class XwtTaskScheduler : TaskScheduler
{
+ Toolkit toolkit;
+
+ public XwtTaskScheduler (Toolkit toolkit)
+ {
+ this.toolkit = toolkit;
+ }
+
protected override void QueueTask (Task task)
{
if (Application.UIThread != null)
- Xwt.Application.Invoke (() => TryExecuteTask (task));
+ Xwt.Application.Invoke (() => toolkit.Invoke (() => TryExecuteTask (task)));
else
TryExecuteTask (task);
}
diff --git a/install-sh b/install-sh
index a9244eb..377bb86 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
@@ -156,7 +156,7 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -202,7 +202,7 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
@@ -240,7 +240,7 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
@@ -354,7 +354,7 @@ do
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
+ # other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
diff --git a/man/Makefile.in b/man/Makefile.in
index 4c47d8a..6d89e18 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -299,6 +298,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
@@ -307,10 +308,10 @@ distdir: $(DISTFILES)
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them" >&2; \
+ echo " typically 'make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
diff --git a/missing b/missing
index 86a8fc3..9a55648 100755
--- a/missing
+++ b/missing
@@ -1,10 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2012-01-06.13; # UTC
+scriptversion=2012-01-06.18; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -26,7 +25,7 @@ scriptversion=2012-01-06.13; # UTC
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
@@ -34,7 +33,7 @@ run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-# In the cases where this matters, `missing' is being run in the
+# In the cases where this matters, 'missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
@@ -65,7 +64,7 @@ case $1 in
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
@@ -74,20 +73,20 @@ Options:
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
+ aclocal touch file 'aclocal.m4'
+ autoconf touch file 'configure'
+ autoheader touch file 'config.h.in'
autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
+ automake touch all 'Makefile.in' files
+ bison create 'y.tab.[ch]', if possible, from existing .[ch]
+ flex create 'lex.yy.c', if possible, from existing .c
help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
+ lex create 'lex.yy.c', if possible, from existing .c
makeinfo touch the output file
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+ yacc create 'y.tab.[ch]', if possible, from existing .[ch]
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake at gnu.org>."
exit $?
@@ -99,8 +98,8 @@ Send bug reports to <bug-automake at gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
@@ -127,7 +126,7 @@ case $1 in
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
+ # running '$TOOL --version' or '$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
@@ -139,27 +138,27 @@ esac
case $program in
aclocal*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
+WARNING: '$1' is $msg. You should only need it if
+ you modified 'acinclude.m4' or '${configure_ac}'. You might want
+ to install the Automake and Perl packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+WARNING: '$1' is $msg. You should only need it if
+ you modified '${configure_ac}'. You might want to install the
+ Autoconf and GNU m4 packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
+WARNING: '$1' is $msg. You should only need it if
+ you modified 'acconfig.h' or '${configure_ac}'. You might want
+ to install the Autoconf and GNU m4 packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
@@ -176,9 +175,9 @@ WARNING: \`$1' is $msg. You should only need it if
automake*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
+WARNING: '$1' is $msg. You should only need it if
+ you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
+ You might want to install the Automake and Perl packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
@@ -187,10 +186,10 @@ WARNING: \`$1' is $msg. You should only need it if
autom4te*)
echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
+WARNING: '$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
+ You can get '$1' as part of Autoconf from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
@@ -210,10 +209,10 @@ WARNING: \`$1' is needed, but is $msg.
bison*|yacc*)
echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
+WARNING: '$1' $msg. You should only need it if
+ you modified a '.y' file. You may need the Bison package
in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
+ Bison from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG=\${$#}
@@ -240,10 +239,10 @@ WARNING: \`$1' $msg. You should only need it if
lex*|flex*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
+WARNING: '$1' is $msg. You should only need it if
+ you modified a '.l' file. You may need the Flex package
in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
+ Flex from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG=\${$#}
@@ -263,10 +262,10 @@ WARNING: \`$1' is $msg. You should only need it if
help2man*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
+WARNING: '$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
+ Help2man package in order for those modifications to take
+ effect. You can get Help2man from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -281,12 +280,12 @@ WARNING: \`$1' is $msg. You should only need it if
makeinfo*)
echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
+WARNING: '$1' is $msg. You should only need it if
+ you modified a '.texi' or '.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
+ call might also be the consequence of using a buggy 'make' (AIX,
+ DU, IRIX). You might want to install the Texinfo package or
+ the GNU make package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -310,12 +309,12 @@ WARNING: \`$1' is $msg. You should only need it if
*)
echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
+WARNING: '$1' is needed, and is $msg.
You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
+ proper tools for further handling them. Check the 'README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
+ some other package would contain this missing '$1' program."
exit 1
;;
esac
diff --git a/monodevelop b/monodevelop
index dac25b8..10b3c6c 100644
--- a/monodevelop
+++ b/monodevelop
@@ -20,6 +20,11 @@ else
_MONO_OPTIONS=$MONO_OPTIONS
fi
+MONO_RECOMMENDED_VERSION_FOR_SGEN=3.0
+if pkg-config --atleast-version=$MONO_RECOMMENDED_VERSION_FOR_SGEN mono; then
+ MONO_OPTIONS="$MONO_OPTIONS --gc=sgen"
+fi
+
if [ -n "$_MD_REDIRECT_LOG" ]; then
mkdir -p `dirname "$_MD_REDIRECT_LOG"`
$MONO_EXEC $_MONO_OPTIONS "$EXE_PATH" $* 2>&1 | tee "$_MD_REDIRECT_LOG"
diff --git a/monodevelop.in b/monodevelop.in
index dac25b8..10b3c6c 100755
--- a/monodevelop.in
+++ b/monodevelop.in
@@ -20,6 +20,11 @@ else
_MONO_OPTIONS=$MONO_OPTIONS
fi
+MONO_RECOMMENDED_VERSION_FOR_SGEN=3.0
+if pkg-config --atleast-version=$MONO_RECOMMENDED_VERSION_FOR_SGEN mono; then
+ MONO_OPTIONS="$MONO_OPTIONS --gc=sgen"
+fi
+
if [ -n "$_MD_REDIRECT_LOG" ]; then
mkdir -p `dirname "$_MD_REDIRECT_LOG"`
$MONO_EXEC $_MONO_OPTIONS "$EXE_PATH" $* 2>&1 | tee "$_MD_REDIRECT_LOG"
diff --git a/po/Makefile b/po/Makefile
index 4a29b29..14be1c2 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# po/Makefile. Generated from Makefile.in by configure.
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -66,89 +65,89 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /tmp/monodevelop/main/missing --run aclocal-1.11
+ACLOCAL = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/missing --run aclocal-1.12
ACLOCAL_FLAGS =
ALL_LINGUAS = cs da de es fr ja pt_BR tr pl it zh_TW zh_CN ru sl ca gl pt sv nl id hu nb
AMTAR = $${TAR-tar}
-ASSEMBLY_VERSION = 4.0.0.0
-AUTOCONF = ${SHELL} /tmp/monodevelop/main/missing --run autoconf
-AUTOHEADER = ${SHELL} /tmp/monodevelop/main/missing --run autoheader
-AUTOMAKE = ${SHELL} /tmp/monodevelop/main/missing --run automake-1.11
+ASSEMBLY_VERSION = 4.0.12.0
+AUTOCONF = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/missing --run automake-1.12
AWK = gawk
CSC = /usr/bin/dmcs
CSC_FLAGS = -debug -codepage:utf8
CYGPATH_W = echo
-DEFS = -DPACKAGE_NAME=\"monodevelop\" -DPACKAGE_TARNAME=\"monodevelop\" -DPACKAGE_VERSION=\"4.0.5\" -DPACKAGE_STRING=\"monodevelop\ 4.0.5\" -DPACKAGE_BUGREPORT=\"monodevelop-list at lists.ximian.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"monodevelop\" -DVERSION=\"4.0.5\" -DGETTEXT_PACKAGE=\"monodevelop\"
+DEFS = -DPACKAGE_NAME=\"monodevelop\" -DPACKAGE_TARNAME=\"monodevelop\" -DPACKAGE_VERSION=\"4.0.12\" -DPACKAGE_STRING=\"monodevelop\ 4.0.12\" -DPACKAGE_BUGREPORT=\"monodevelop-list at lists.ximian.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"monodevelop\" -DVERSION=\"4.0.12\" -DGETTEXT_PACKAGE=\"monodevelop\"
DYLD_FALLBACK_LIBRARY_PATH =
ECHO_C =
ECHO_N = -n
ECHO_T =
GCONF_SHARP_CFLAGS =
-GCONF_SHARP_LIBS = -r:/usr/lib/cli/gconf-sharp-2.0/gconf-sharp.dll
+GCONF_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gconf-sharp.dll
GETTEXT_PACKAGE = monodevelop
GLADE_SHARP_CFLAGS = -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glade-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
-GLADE_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/cli/glade-sharp-2.0/glade-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll
+GLADE_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glade-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll
GLIB_SHARP_CFLAGS = -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
-GLIB_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll
-GNOME_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/share/gapi-2.0/art-api.xml -I:/usr/share/gapi-2.0/gnome-vfs-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
-GNOME_SHARP_LIBS = -r:/usr/lib/cli/gnome-sharp-2.24/gnome-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/cli/art-sharp-2.0/art-sharp.dll -r:/usr/lib/cli/gnome-vfs-sharp-2.0/gnome-vfs-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll
-GNOME_VFS_SHARP_CFLAGS = -I:/usr/share/gapi-2.0/gnome-vfs-api.xml
-GNOME_VFS_SHARP_LIBS = -r:/usr/lib/cli/gnome-vfs-sharp-2.0/gnome-vfs-sharp.dll
+GLIB_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll
+GNOME_SHARP_CFLAGS = -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gnome-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/art-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gnome-vfs-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
+GNOME_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gnome-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/art-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll -r:/usr/ [...]
+GNOME_VFS_SHARP_CFLAGS = -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gnome-vfs-api.xml
+GNOME_VFS_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gnome-vfs-sharp.dll
GTK_SHARP_CFLAGS = -I:/usr/lib/pkgconfig/../../share/gapi-2.0/pango-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/atk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gdk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/gtk-api.xml -I:/usr/lib/pkgconfig/../../share/gapi-2.0/glib-api.xml
-GTK_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/cli/pango-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/atk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gdk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/cli/glib-sharp-2.0/glib-sharp.dll
+GTK_SHARP_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LD_LIBRARY_PATH =
+LD_LIBRARY_PATH = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/install/lib
LIBOBJS =
LIBS =
LIB_PREFIX = .so
LIB_SUFFIX =
LTLIBOBJS =
MAINT =
-MAKEINFO = ${SHELL} /tmp/monodevelop/main/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/missing --run makeinfo
MCS = /usr/bin/gmcs
MD_ADDIN_DIR = $(prefix)/lib/monodevelop/AddIns
MD_ASSEMBLY_DIR = $(prefix)/lib/monodevelop/bin
MD_DIR = $(prefix)/lib/monodevelop
-MKDIR_P = /bin/mkdir -p
+MKDIR_P = /usr/bin/mkdir -p
MONO = /usr/bin/mono
MONODOC_CFLAGS =
MONODOC_LIBS = /r:/usr/lib/mono/monodoc/monodoc.dll
MONO_GAC_PREFIX = /usr/local:
-MONO_NUNIT_CFLAGS =
-MONO_NUNIT_LIBS =
+MONO_NUNIT_CFLAGS =
+MONO_NUNIT_LIBS = -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.core.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.core.interfaces.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.core.extensions.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.framework.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.framework.extensions.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.mocks.dll -r:/usr/lib/pkgconfig/../../lib/mono/4.0/nunit.util.dll -r:/usr/lib/pkgconfig/../../lib/mono/4 [...]
MSGFMT = /usr/bin/msgfmt
MSGMERGE = /usr/bin/msgmerge
PACKAGE = monodevelop
PACKAGE_BUGREPORT = monodevelop-list at lists.ximian.com
PACKAGE_NAME = monodevelop
-PACKAGE_STRING = monodevelop 4.0.5
+PACKAGE_STRING = monodevelop 4.0.12
PACKAGE_TARNAME = monodevelop
PACKAGE_URL =
-PACKAGE_VERSION = 4.0.5
-PACKAGE_VERSION_LABEL = 4.0.5
-PATH = /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+PACKAGE_VERSION = 4.0.12
+PACKAGE_VERSION_LABEL = 4.0.12
+PATH = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
-PKG_CONFIG_PATH = /tmp/monodevelop/local-config:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:
+PKG_CONFIG_PATH = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/local-config:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/install/lib/pkgconfig
RUNTIME = /usr/bin/mono
SET_MAKE =
-SHELL = /bin/bash
+SHELL = /bin/sh
SQLITE_XML =
STRIP =
UNMANAGED_DEPENDENCIES_MONO_CFLAGS =
UNMANAGED_DEPENDENCIES_MONO_LIBS =
UPDATE_DESKTOP_DB =
UPDATE_MIME_DB = /usr/bin/update-mime-database
-VERSION = 4.0.5
-abs_builddir = /tmp/monodevelop/main/po
-abs_srcdir = /tmp/monodevelop/main/po
-abs_top_builddir = /tmp/monodevelop/main
-abs_top_srcdir = /tmp/monodevelop/main
+VERSION = 4.0.12
+abs_builddir = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/po
+abs_srcdir = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/po
+abs_top_builddir = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main
+abs_top_srcdir = /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main
am__leading_dot = .
am__tar = tar --format=ustar -chf - "$$tardir"
am__untar = tar -xf -
@@ -165,13 +164,13 @@ host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /tmp/monodevelop/main/install-sh
+install_sh = ${SHELL} /home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
+mkdir_p = /usr/bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
@@ -205,7 +204,7 @@ MD_LAUNCH_SETUP = \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN = $(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
all: all-am
@@ -248,6 +247,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/po/Makefile.in b/po/Makefile.in
index cc489ac..283e24e 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -205,7 +204,7 @@ MD_LAUNCH_SETUP = \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN = $(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
all: all-am
@@ -248,6 +247,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/Makefile.in b/src/Makefile.in
index df92d04..e96d437 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -260,11 +259,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -328,6 +327,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -391,6 +394,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -550,21 +567,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/AspNet/Makefile.in b/src/addins/AspNet/Makefile.in
index 38b69b3..b7dfe5f 100644
--- a/src/addins/AspNet/Makefile.in
+++ b/src/addins/AspNet/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -263,11 +262,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -331,6 +330,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -394,6 +397,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -553,21 +570,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.in b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.in
index 34ed1da..181c820 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.in
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -249,6 +248,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml
index 57ffbc7..e731f68 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.addin.xml
@@ -6,7 +6,7 @@
url = "http://monodevelop.com/"
description = "Support for ASP.NET MVC projects."
category = "Web Development"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import file = "Templates/Controller.xft.xml"/>
@@ -39,12 +39,12 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="XmlEditor" version="4.0.5" />
- <Addin id="AspNet" version="4.0.5" />
- <Addin id="SourceEditor2" version="4.0.5" />
- <Addin id="TextTemplating" version="4.0.5" />
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="XmlEditor" version="4.0.12" />
+ <Addin id="AspNet" version="4.0.12" />
+ <Addin id="SourceEditor2" version="4.0.12" />
+ <Addin id="TextTemplating" version="4.0.12" />
</Dependencies>
<Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs
index 654d51f..ae862e3 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/Parser/RazorCSharpParser.cs
@@ -48,6 +48,7 @@ using System.Web.WebPages.Razor;
using System.Configuration;
using MonoDevelop.Projects;
using MonoDevelop.AspNet.StateEngine;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace MonoDevelop.AspNet.Mvc.Parser
{
@@ -82,7 +83,7 @@ namespace MonoDevelop.AspNet.Mvc.Parser
currentDocument = openDocuments.FirstOrDefault (d => d != null && d.FileName == fileName);
// We need document and project to be loaded to correctly initialize Razor Host.
this.project = project as DotNetProject;
- if (this.project == null || (currentDocument == null && !TryAddDocument (fileName)))
+ if (currentDocument == null && !TryAddDocument (fileName))
return new RazorCSharpParsedDocument (fileName, new RazorCSharpPageInfo ());
this.aspProject = project as AspMvcProject;
@@ -184,12 +185,14 @@ namespace MonoDevelop.AspNet.Mvc.Parser
RazorEngineHost CreateRazorHost (string fileName)
{
- var projectFile = project.GetProjectFile (fileName);
- if (projectFile != null && projectFile.Generator == "RazorTemplatePreprocessor") {
- var h = MonoDevelop.RazorGenerator.PreprocessedRazorHost.Create (fileName);
- h.DesignTimeMode = true;
- h.EnableLinePragmas = false;
- return h;
+ if (project != null) {
+ var projectFile = project.GetProjectFile (fileName);
+ if (projectFile != null && projectFile.Generator == "RazorTemplatePreprocessor") {
+ var h = MonoDevelop.RazorGenerator.PreprocessedRazorHost.Create (fileName);
+ h.DesignTimeMode = true;
+ h.EnableLinePragmas = false;
+ return h;
+ }
}
string virtualPath = "~/Views/Default.cshtml";
@@ -375,7 +378,9 @@ namespace MonoDevelop.AspNet.Mvc.Parser
string CreateCodeFile ()
{
var unit = capturedArgs.GeneratorResults.GeneratedCode;
- var provider = project.LanguageBinding.GetCodeDomProvider ();
+ System.CodeDom.Compiler.CodeDomProvider provider = project != null
+ ? project.LanguageBinding.GetCodeDomProvider ()
+ : new Microsoft.CSharp.CSharpCodeProvider ();
using (var sw = new StringWriter ()) {
provider.GenerateCodeFromCompileUnit (unit, sw, new System.CodeDom.Compiler.CodeGeneratorOptions () {
// HACK: we use true, even though razor uses false, to work around a mono bug where it omits the
@@ -391,7 +396,26 @@ namespace MonoDevelop.AspNet.Mvc.Parser
// Creates compilation that includes underlying C# file for Razor view
ICompilation CreateCompilation ()
{
- return TypeSystemService.GetProjectContext (project).AddOrUpdateFiles (parsedCodeFile.ParsedFile).CreateCompilation ();
+ if (project != null) {
+ return TypeSystemService.GetProjectContext (project).AddOrUpdateFiles (parsedCodeFile.ParsedFile).CreateCompilation ();
+ }
+ return new SimpleCompilation (
+ new DefaultUnresolvedAssembly (Path.ChangeExtension (parsedCodeFile.FileName, ".dll")),
+ GetDefaultAssemblies ()
+ );
+ }
+
+ //FIXME: make this better reflect the real set of assemblies used by razor
+ static IEnumerable<IUnresolvedAssembly> GetDefaultAssemblies ()
+ {
+ var runtime = Runtime.SystemAssemblyService.DefaultRuntime;
+ var fx = Runtime.SystemAssemblyService.GetTargetFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_5);
+ if (!runtime.IsInstalled (fx))
+ fx = Runtime.SystemAssemblyService.GetTargetFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.NET_4_0);
+ foreach (var assembly in new [] { "System", "System.Core", "System.Xml", "System.Web.Mvc,Version=3.0.0.0" }) {
+ var path = Runtime.SystemAssemblyService.DefaultAssemblyContext.GetAssemblyLocation (assembly, fx);
+ yield return TypeSystemService.LoadAssemblyContext (runtime, fx, path);
+ }
}
void OnTextReplacing (object sender, DocumentChangeEventArgs e)
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.MonoDevelop.AspNet.Mvc.addin.xml b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.MonoDevelop.AspNet.Mvc.addin.xml
new file mode 100644
index 0000000..e731f68
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.MonoDevelop.AspNet.Mvc.addin.xml
@@ -0,0 +1,215 @@
+<Addin id = "AspNet.Mvc"
+ namespace = "MonoDevelop"
+ name = "ASP.NET MVC Support"
+ author = "Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://monodevelop.com/"
+ description = "Support for ASP.NET MVC projects."
+ category = "Web Development"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import file = "Templates/Controller.xft.xml"/>
+ <Import file = "Templates/ViewPage.xft.xml"/>
+ <Import file = "Templates/ViewContentPage.xft.xml"/>
+ <Import file = "Templates/UserControl.xft.xml"/>
+ <Import file = "Templates/ViewMasterPage.xft.xml" />
+ <Import file = "Templates/Project.xpt.xml" />
+ <Import file = "Templates/EmptyProject.xpt.xml"/>
+ <Import file = "Templates/GlobalAsax.xft.xml"/>
+ <Import file = "Templates/WebConfigApp.xft.xml"/>
+ <Import file = "Templates/WebConfigViews.xft.xml"/>
+ <Import file = "Templates/ProjectMvc3.xpt.xml" />
+ <Import file = "Templates/EmptyProjectMvc3.xpt.xml" />
+ <Import file = "Templates/GlobalAsaxMvc3.xft.xml" />
+ <Import file = "Templates/WebConfigAppMvc3.xft.xml" />
+ <Import file = "Templates/WebConfigViewsMvc3.xft.xml" />
+ <Import file = "Templates/ProjectWithUnitTest.xpt.xml" />
+ <Import file = "Templates/ProjectMvc3WithUnitTest.xpt.xml" />
+ <Import file = "Templates/ProjectMvc3Razor.xpt.xml" />
+ <Import file = "Templates/ProjectMvc3RazorWithUnitTest.xpt.xml" />
+ <Import file = "Templates/LayoutPage.xft.xml" />
+ <Import file = "Templates/ViewPageRazor.xft.xml" />
+ <Import file = "Templates/PartialViewPageRazor.xft.xml" />
+ <Import file = "Templates/PreprocessedRazorTemplate.xft.xml" />
+ <Import file = "CodeTemplates/CSharp/AddView/Aspx/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddView/Razor/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddController/Empty.tt" />
+ <Import file = "CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="XmlEditor" version="4.0.12" />
+ <Addin id="AspNet" version="4.0.12" />
+ <Addin id="SourceEditor2" version="4.0.12" />
+ <Addin id="TextTemplating" version="4.0.12" />
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProjectSubtype
+ guid="{603c0e0b-db56-11dc-be95-000d561079b0}"
+ type="MonoDevelop.AspNet.Mvc.AspMvc1Project"
+ insertbefore="MonoDevelop.AspNet.AspNetAppProject"
+ />
+ <DotNetProjectSubtype
+ guid="{F85E285D-A4E0-4152-9332-AB1D724D3325}"
+ type="MonoDevelop.AspNet.Mvc.AspMvc2Project"
+ insertbefore="MonoDevelop.AspNet.AspNetAppProject"
+ />
+ <DotNetProjectSubtype
+ guid="{E53F8FEA-EAE0-44A6-8774-FFD645390401}"
+ type="MonoDevelop.AspNet.Mvc.AspMvc3Project"
+ insertbefore="MonoDevelop.AspNet.AspNetAppProject"
+ />
+ <DotNetProjectSubtype
+ guid="{E3E379DF-F4C6-4180-9B81-6769533ABE47}"
+ type="MonoDevelop.AspNet.Mvc.AspMvc4Project"
+ insertbefore="MonoDevelop.AspNet.AspNetAppProject"
+ />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "AspMvcController"
+ file = "Templates/Controller.xft.xml"/>
+ <FileTemplate id = "AspMvcViewPage"
+ file = "Templates/ViewPage.xft.xml"/>
+ <FileTemplate id = "AspMvcViewContentPage"
+ file = "Templates/ViewContentPage.xft.xml"/>
+ <FileTemplate id = "AspMvcUserControl"
+ file = "Templates/UserControl.xft.xml"/>
+ <FileTemplate id = "AspMvcViewMasterPage"
+ file = "Templates/ViewMasterPage.xft.xml" />
+ <FileTemplate id = "AspMvcGlobalAsax"
+ file = "Templates/GlobalAsax.xft.xml" />
+ <FileTemplate id = "AspMvcWebConfigApp"
+ file = "Templates/WebConfigApp.xft.xml" />
+ <FileTemplate id = "AspMvcWebConfigViews"
+ file = "Templates/WebConfigViews.xft.xml" />
+ <FileTemplate id = "AspMvc3GlobalAsax"
+ file = "Templates/GlobalAsaxMvc3.xft.xml" />
+ <FileTemplate id = "AspMvc3WebConfigApp"
+ file = "Templates/WebConfigAppMvc3.xft.xml" />
+ <FileTemplate id = "AspMvc3WebConfigViews"
+ file = "Templates/WebConfigViewsMvc3.xft.xml" />
+ <FileTemplate id = "AspMvcViewPageRazor"
+ file = "Templates/ViewPageRazor.xft.xml" />
+ <FileTemplate id = "AspMvcLayoutPage"
+ file = "Templates/LayoutPage.xft.xml" />
+ <FileTemplate id = "AspMvcPartialViewPageRazor"
+ file = "Templates/PartialViewPageRazor.xft.xml" />
+ <FileTemplate id = "PreprocessedRazorTemplate"
+ file = "Templates/PreprocessedRazorTemplate.xft.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "AspMvcProject-Empty" file = "Templates/EmptyProject.xpt.xml"/>
+ <ProjectTemplate id = "AspMvcProject" file = "Templates/Project.xpt.xml" />
+ <ProjectTemplate id = "AspMvcProjectWithUnitTest" file = "Templates/ProjectWithUnitTest.xpt.xml" />
+ <Condition id="AssemblyInstalled" name="System.Web.Mvc" minVersion="3.0.0.0">
+ <ProjectTemplate id = "AspMvc3Project-Empty" file = "Templates/EmptyProjectMvc3.xpt.xml" />
+ <ProjectTemplate id = "AspMvc3Project" file = "Templates/ProjectMvc3.xpt.xml" />
+ <ProjectTemplate id = "AspMvc3ProjectWithUnitTest" file = "Templates/ProjectMvc3WithUnitTest.xpt.xml" />
+ <ProjectTemplate id = "AspMvc3Project-Razor" file = "Templates/ProjectMvc3Razor.xpt.xml" />
+ <ProjectTemplate id = "AspMvc3Project-RazorWithUnitTest" file = "Templates/ProjectMvc3RazorWithUnitTest.xpt.xml" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
+ <ProjectBinding id = "AspNetMvc1" class = "MonoDevelop.AspNet.Mvc.AspMvc1ProjectBinding" />
+ <ProjectBinding id = "AspNetMvc2" class = "MonoDevelop.AspNet.Mvc.AspMvc2ProjectBinding" />
+ <ProjectBinding id = "AspNetMvc3" class = "MonoDevelop.AspNet.Mvc.AspMvc3ProjectBinding" />
+ <ProjectBinding id = "AspNetMvc4" class = "MonoDevelop.AspNet.Mvc.AspMvc4ProjectBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.AspNet.Mvc.AspMvcProject" />
+ <DataType class = "MonoDevelop.AspNet.Mvc.AspMvcProjectConfiguration" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "ASP.NET" id = "AspNet">
+ <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddController"
+ _label = "Controller..."
+ _description = "Add an ASP.NET MVC controller" />
+ <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddView"
+ _label = "View..."
+ _description = "Add an ASP.NET MVC view" />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/TextEditor">
+ <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToView"
+ _label = "Go To View"
+ defaultHandler = "MonoDevelop.AspNet.Mvc.GoToViewCommandHandler"
+ description = "Go to the corresponding view file" />
+ <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddViewFromController"
+ _label = "Add View..."
+ defaultHandler = "MonoDevelop.AspNet.Mvc.AddViewFromControllerCommandHandler"
+ description = "Add an ASP.NET MVC view" />
+ <Command id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToController"
+ _label = "Go To Controller"
+ defaultHandler = "MonoDevelop.AspNet.Mvc.GoToControllerCommandHandler"
+ description = "Go to the corresponding controller file" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <Condition id="activeproject" value="AspNetMvc">
+ <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddController" insertbefore="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" disabledVisible="false"/>
+ <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddView" disabledVisible="false" />
+ <SeparatorItem id = "MvcAddSeparator" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <Condition id="FileType" fileExtensions=".cs">
+ <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToView" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.AddViewFromController" />
+ <SeparatorItem id = "MvcSeparator1" />
+ </Condition>
+ <Condition id="FileType" fileExtensions=".cshtml,.aspx">
+ <CommandItem id = "MonoDevelop.AspNet.Mvc.AspMvcCommands.GoToController" insertbefore="MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <SeparatorItem id = "MvcSeparator2" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id="AspMvcFolderNodeBuilderExtension" class = "MonoDevelop.AspNet.Mvc.Gui.FolderNodeBuilderExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.AspNet.Mvc.Parser.RazorCSharpParser" mimeType="text/x-cshtml" />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/Razor/CompletionBuilders">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Razor/CompletionBuilders">
+ <Class class = "MonoDevelop.AspNet.Mvc.Completion.RazorCSharpCompletionBuilder" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-cshtml" _description="ASP.NET MVC Razor View" icon="md-html-file-icon" isText="true">
+ <File pattern="*.cshtml" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions=".cshtml" class = "MonoDevelop.AspNet.Mvc.Gui.RazorCSharpEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeTemplates">
+ <CodeTemplate file="Razor-templates.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeFormatters">
+ <Formatter mimeType="text/x-cshtml" class="MonoDevelop.AspNet.Mvc.Formatting.RazorCSharpFormatter" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CustomTools">
+ <!-- NOTE: we explicitly do no call this "RazorGenerator" to avoid conflicts with http://razorgenerator.codeplex.com/ -->
+ <Tool name="RazorTemplatePreprocessor" type="MonoDevelop.RazorGenerator.RazorTemplatePreprocessor"/>
+ </Extension>
+</Addin>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.csproj.FilesWrittenAbsolute.txt b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..de375c1
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,41 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.MonoDevelop.AspNet.Mvc.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/ControllerWithEmptyReadAndWriteActions.tt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddController/Empty.tt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Razor/Empty.tt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Error.cshtml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/HomeController.cs
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/HomeControllerTest.cs
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/PreprocessedRazorTemplate.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/ViewPageRazor.cshtml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/_Layout.cshtml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/_ViewStart.cshtml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Controller.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/EmptyProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/GlobalAsax.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/Project.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/UserControl.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ViewContentPage.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ViewMasterPage.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ViewPage.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/WebConfigApp.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/WebConfigViews.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/CodeTemplates/CSharp/AddView/Aspx/Empty.tt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/EmptyProjectMvc3.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/GlobalAsaxMvc3.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/WebConfigAppMvc3.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/WebConfigViewsMvc3.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3Razor.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3WithUnitTest.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ProjectWithUnitTest.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ProjectMvc3RazorWithUnitTest.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/LayoutPage.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/PartialViewPageRazor.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Templates/ViewPageRazor.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/Razor-templates.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.dll.mdb
diff --git a/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.gtk-gui.gui.stetic b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9c7eb40
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet.Mvc/obj/Debug/MonoDevelop.AspNet.Mvc.gtk-gui.gui.stetic
@@ -0,0 +1,638 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll" />
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet.Mvc/MonoDevelop.AspNet.Mvc.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Mvc.Gui.AddViewDialog" design-size="470 393">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Add View</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">nameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Template:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">templateCombo</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_View Engine:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">viewEngineCombo</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="Validate" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="templateCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="Validate" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="viewEngineCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="ViewEngineChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">4</property>
+ <property name="TopPadding">4</property>
+ <property name="RightPadding">4</property>
+ <property name="BottomPadding">4</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="partialCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Partial view</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateMasterPanelSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="stronglyTypedCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Strongly typed</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateTypePanelSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="typePanel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Data class:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">dataClassCombo</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="dataClassAlignment">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="dataClassCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="DataClassChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="masterCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Has _master page or layout:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateMasterPanelSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="masterPanel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_File:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">masterEntry</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="masterEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="MasterChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="masterButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="ShowMasterSelectionDialog" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="placeholderBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">P_rimary placeholder: </property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="primaryPlaceholderCombo">
+ <property name="MemberName" />
+ <property name="WidthRequest">250</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="Validate" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Options</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Mvc.Gui.AddControllerDialog" design-size="400 157">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Add Controller</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">nameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Template:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">templateCombo</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="Validate" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="templateCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/Makefile.in b/src/addins/AspNet/MonoDevelop.AspNet/Makefile.in
index 11bb637..0333c6a 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/Makefile.in
+++ b/src/addins/AspNet/MonoDevelop.AspNet/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs
index 8d5547c..e5faaa0 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlClosingTagState.cs
@@ -51,43 +51,39 @@ namespace MonoDevelop.AspNet.StateEngine
{
this.warnAutoClose = warnAutoClose;
}
-
+
public override State PushChar (char c, MonoDevelop.Xml.StateEngine.IParseContext context, ref string rollback)
{
//NOTE: This is (mostly) duplicated in HtmlTagState
- //handle "paragraph" tags implicitly closed by block-level elements
+ //handle inline tags implicitly closed by block-level elements
if (context.CurrentStateLength == 1 && context.PreviousState is XmlNameState)
{
XClosingTag ct = (XClosingTag) context.Nodes.Peek ();
- //Note: the node stack will always be at least 1 deep due to the XDocument
- XElement parent = context.Nodes.Peek (1) as XElement;
-
-
- while (parent != null && parent.Name.IsValid && !parent.Name.HasPrefix && !ct.Name.HasPrefix
- && ct.Name.IsValid
- && string.Compare (ct.Name.Name, parent.Name.Name, StringComparison.OrdinalIgnoreCase) != 0
- && !ElementTypes.IsInline (ct.Name.Name)
- && (ElementTypes.IsInline (parent.Name.Name) || ElementTypes.IsParagraph (parent.Name.Name))
- )
- {
-
- context.Nodes.Pop ();
- context.Nodes.Pop ();
- if (warnAutoClose) {
- context.LogWarning (string.Format ("Tag '{0}' implicitly closed by closing tag '{1}'.",
- parent.Name.Name, ct.Name.Name), parent.Region);
+ if (!ct.Name.HasPrefix && ct.Name.IsValid) {
+ //Note: the node stack will always be at least 1 deep due to the XDocument
+ var parent = context.Nodes.Peek (1) as XElement;
+ //if it's not a matching closing tag
+ if (!string.Equals (ct.Name.Name, parent.Name.Name, StringComparison.OrdinalIgnoreCase)) {
+ //attempt to implicitly close the parents
+ while (parent.ValidAndNoPrefix () && parent.IsImplicitlyClosedBy (ct)) {
+ context.Nodes.Pop ();
+ context.Nodes.Pop ();
+ if (warnAutoClose) {
+ context.LogWarning (string.Format ("Tag '{0}' implicitly closed by closing tag '{1}'.",
+ parent.Name.Name, ct.Name.Name), parent.Region);
+ }
+ //parent.Region.End = element.Region.Start;
+ //parent.Region.EndColumn = Math.Max (parent.Region.EndColumn - 1, 1);
+ parent.Close (parent);
+ context.Nodes.Push (ct);
+
+ parent = context.Nodes.Peek (1) as XElement;
+ }
}
- //parent.Region.End = element.Region.Start;
- //parent.Region.EndColumn = Math.Max (parent.Region.EndColumn - 1, 1);
- parent.Close (parent);
- context.Nodes.Push (ct);
-
- parent = context.Nodes.Peek (1) as XElement;
}
}
return base.PushChar (c, context, ref rollback);
}
-
}
}
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs
index 06e08da..8473d94 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlScriptBodyState.cs
@@ -56,6 +56,7 @@ namespace MonoDevelop.AspNet.StateEngine
var closing = new XClosingTag (new XName ("script"), context.LocationMinus (CLOSE.Length));
closing.End (context.Location);
el.Close (closing);
+ rollback = string.Empty;
return Parent;
}
} else {
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs
index 1cffdf5..dfadd68 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.StateEngine/HtmlTagState.cs
@@ -66,34 +66,32 @@ namespace MonoDevelop.AspNet.StateEngine
public override State PushChar (char c, IParseContext context, ref string rollback)
{
- if (context.CurrentStateLength == 0 && context.PreviousState is HtmlScriptBodyState)
+ if (context.CurrentStateLength == 1 && context.PreviousState is HtmlScriptBodyState)
return Parent;
//NOTE: This is (mostly) duplicated in HtmlClosingTagState
//handle "paragraph" tags implicitly closed by block-level elements
if (context.CurrentStateLength == 1 && context.PreviousState is XmlNameState) {
XElement element = (XElement) context.Nodes.Peek ();
- //Note: the node stack will always be at least 1 deep due to the XDocument
- XElement parent = context.Nodes.Peek (1) as XElement;
-
- while (parent != null && parent.Name.IsValid && !parent.Name.HasPrefix && !element.Name.HasPrefix
- && element.Name.IsValid
- && !ElementTypes.IsInline (element.Name.Name)
- && (ElementTypes.IsInline (parent.Name.Name) || ElementTypes.IsParagraph (parent.Name.Name))
- )
- {
- context.Nodes.Pop ();
- context.Nodes.Pop ();
- if (warnAutoClose) {
- context.LogWarning (string.Format ("Tag '{0}' implicitly closed by tag '{1}'.",
- parent.Name.Name, element.Name.Name), parent.Region);
+
+ if (!element.Name.HasPrefix && element.Name.IsValid) {
+ //Note: the node stack will always be at least 1 deep due to the XDocument
+ var parent = context.Nodes.Peek (1) as XElement;
+
+ while (parent.ValidAndNoPrefix () && parent.IsImplicitlyClosedBy (element)) {
+ context.Nodes.Pop ();
+ context.Nodes.Pop ();
+ if (warnAutoClose) {
+ context.LogWarning (string.Format ("Tag '{0}' implicitly closed by tag '{1}'.",
+ parent.Name.Name, element.Name.Name), parent.Region);
+ }
+ //parent.Region.End = element.Region.Start;
+ //parent.Region.EndColumn = Math.Max (parent.Region.EndColumn - 1, 1);
+ parent.Close (parent);
+ context.Nodes.Push (element);
+
+ parent = context.Nodes.Peek (1) as XElement;
}
- //parent.Region.End = element.Region.Start;
- //parent.Region.EndColumn = Math.Max (parent.Region.EndColumn - 1, 1);
- parent.Close (parent);
- context.Nodes.Push (element);
-
- parent = context.Nodes.Peek (1) as XElement;
}
}
@@ -119,4 +117,23 @@ namespace MonoDevelop.AspNet.StateEngine
return ret;
}
}
+
+ static class HtmlDomExtensions
+ {
+ public static bool ValidAndNoPrefix (this INamedXObject element)
+ {
+ return element != null && element.Name.IsValid && !element.Name.HasPrefix;
+ }
+
+ //TODO: implement real implicit closing logic from HTML5 spec
+ // see http://www.w3.org/html/wg/drafts/html/master/syntax.html#syntax-tag-omission
+ public static bool IsImplicitlyClosedBy (this XElement parent, INamedXObject current)
+ {
+ //inline and paragraph tags are implicitly closed by block tags and paragraph tags
+ if (ElementTypes.IsInline (parent.Name.Name) || ElementTypes.IsParagraph (parent.Name.Name))
+ return ElementTypes.IsBlock (current.Name.Name) || ElementTypes.IsParagraph (current.Name.Name);
+
+ return false;
+ }
+ }
}
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml
index a481777..632d264 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.addin.xml
@@ -6,7 +6,7 @@
url = "http://www.monodevelop.com/"
description = "Support for ASP.NET projects, including editing, compiling, previewing and deploying to remote servers."
category = "Web Development"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import file="Schemas/xhtml1-strict.xsd" />
@@ -15,12 +15,12 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
- <Addin id="Deployment" version="4.0.5"/>
- <Addin id="XmlEditor" version="4.0.5" />
- <Addin id="SourceEditor2" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ <Addin id="XmlEditor" version="4.0.12" />
+ <Addin id="SourceEditor2" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
index 9c9a07d..c20705f 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.csproj
@@ -87,11 +87,6 @@
<Name>ICSharpCode.NRefactory.CSharp</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -102,6 +97,16 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\xwt\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs
index f6b69e7..6420627 100755
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs
@@ -93,6 +93,16 @@ namespace MonoDevelop.AspNet
return result;
}
+
+ static void AddErrorsToResult (BuildResult result, string filename, IList<Error> errors)
+ {
+ foreach (var err in errors) {
+ if (err.ErrorType == ErrorType.Warning)
+ result.AddWarning (filename, err.Region.BeginLine, err.Region.BeginColumn, null, err.Message);
+ else
+ result.AddError (filename, err.Region.BeginLine, err.Region.BeginColumn, null, err.Message);
+ }
+ }
public static BuildResult GenerateCodeBehind (
AspNetAppProject project,
@@ -103,9 +113,7 @@ namespace MonoDevelop.AspNet
ccu = null;
var result = new BuildResult ();
string className = document.Info.InheritedClass;
-
- foreach (var err in document.Errors)
- result.AddError (filename, err.Region.BeginLine, err.Region.BeginColumn, null, err.Message);
+ AddErrorsToResult (result, filename, document.Errors);
if (result.ErrorCount > 0)
return result;
@@ -116,8 +124,7 @@ namespace MonoDevelop.AspNet
var memberList = new MemberListBuilder (refman, document.XDocument);
memberList.Build ();
- foreach (var err in memberList.Errors)
- result.AddError (filename, err.Region.BeginLine, err.Region.BeginColumn, null, err.Message);
+ AddErrorsToResult (result, filename, memberList.Errors);
if (result.ErrorCount > 0)
return result;
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs
index 2b01039..5782767 100644
--- a/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs
+++ b/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/ElementTypes.cs
@@ -43,14 +43,14 @@ namespace MonoDevelop.Html
"form", "head", "html", "map", "noscript",
"object", "ol", "optgroup", "pre", "script",
"select", "style", "table", "tbody", "tfoot",
- "thead", "tr", "ul"
+ "thead", "tr", "td", "th", "ul", "div"
};
public static readonly ICollection<string> Paragraph = new string[] {
"area", "base", "blockquote", "br", "button", "caption",
- "col", "dd", "div", "dt", "h1", "h2", "h3", "h4", "h5",
+ "col", "dd", "dt", "h1", "h2", "h3", "h4", "h5",
"h6", "hr", "input", "li", "link", "meta", "option", "p",
- "param", "td", "textarea", "th", "title"
+ "param", "textarea", "title"
};
public static readonly ICollection<string> Inline = new string[] {
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.MD1Serialization.md1format.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.MD1Serialization.md1format.xml
new file mode 100644
index 0000000..11a4d7d
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.MD1Serialization.md1format.xml
@@ -0,0 +1,13 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.AspNet.AspNetAppProject" customDataItem="MonoDevelop.AspNet.MD1Serialization.MD1AspNetCustomDataItem" >
+ <ItemProperty member="xspParameters" name = "XspParameters" />
+ <ItemProperty member="verifyCodeBehindFields" name = "VerifyCodeBehindFields" />
+ <ItemProperty member="verifyCodeBehindEvents" name = "VerifyCodeBehindEvents" />
+ <ItemProperty member="webDeployTargets" name = "WebDeployTargets" />
+ <ItemProperty member="webDeployTargets" scope="*" name="Target" valueType="MonoDevelop.AspNet.Deployment.WebDeployTarget" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.AspNet.AspNetAppProjectConfiguration" >
+ <ItemProperty member="disableCodeBehindGeneration" name="AspNet/DisableCodeBehindGeneration" defaultValue="false"/>
+ <ItemProperty member="nonStandardOutputDirectory" name="AspNet/nonStandardOutputDirectory" defaultValue="false"/>
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.addin.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.addin.xml
new file mode 100644
index 0000000..632d264
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.addin.xml
@@ -0,0 +1,280 @@
+<Addin id = "AspNet"
+ namespace = "MonoDevelop"
+ name = "ASP.NET Project Support"
+ author = "Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com/"
+ description = "Support for ASP.NET projects, including editing, compiling, previewing and deploying to remote servers."
+ category = "Web Development"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import file="Schemas/xhtml1-strict.xsd" />
+ <Import file="Schemas/xhtml1-transitional.xsd" />
+ <Import file="Schemas/xhtml1-frameset.xsd" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ <Addin id="XmlEditor" version="4.0.12" />
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProjectSubtype
+ id="MonoDevelop.AspNet.AspNetAppProject"
+ guid="{349c5851-65df-11da-9384-00065b846f21}"
+ type="MonoDevelop.AspNet.AspNetAppProject"
+ />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/Html/DocTypes">
+ <ExtensionNode name = "DocType" type = "MonoDevelop.Html.DocTypeExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Asp/CompletionBuilders">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "WebForm-Empty"
+ resource = "WebForm-Empty.xft.xml"/>
+ <FileTemplate id = "WebForm-CodeBehind"
+ resource = "WebForm-CodeBehind.xft.xml"/>
+ <FileTemplate id = "WebForm-CodeBehindNonPartial"
+ resource = "WebForm-CodeBehindNonPartial.xft.xml"/>
+
+ <FileTemplate id = "WebHandler-Empty"
+ resource = "WebHandler-Empty.xft.xml"/>
+ <FileTemplate id = "WebHandler-CodeBehind"
+ resource = "WebHandler-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "WebControl-Empty"
+ resource = "WebControl-Empty.xft.xml"/>
+ <FileTemplate id = "WebControl-CodeBehind"
+ resource = "WebControl-CodeBehind.xft.xml"/>
+ <FileTemplate id = "WebControl-CodeBehindNonPartial"
+ resource = "WebControl-CodeBehindNonPartial.xft.xml"/>
+
+ <FileTemplate id = "WebService-Empty"
+ resource = "WebService-Empty.xft.xml"/>
+ <FileTemplate id = "WebService-CodeBehind"
+ resource = "WebService-CodeBehind.xft.xml"/>
+
+ <FileTemplate id = "MasterPage-Empty"
+ resource = "MasterPage-Empty.xft.xml" />
+ <FileTemplate id = "MasterPage-CodeBehind"
+ resource = "MasterPage-CodeBehind.xft.xml" />
+ <FileTemplate id = "MasterPage-CodeBehindNonPartial"
+ resource = "MasterPage-CodeBehindNonPartial.xft.xml" />
+
+ <FileTemplate id = "NestedMasterPage"
+ resource = "NestedMasterPage.xft.xml" />
+ <FileTemplate id = "NestedMasterPage-CodeBehind"
+ resource = "NestedMasterPage-CodeBehind.xft.xml" />
+
+ <FileTemplate id = "GlobalAsax-Empty"
+ resource = "GlobalAsax-Empty.xft.xml" />
+ <FileTemplate id = "GlobalAsax-CodeBehind"
+ resource = "GlobalAsax-CodeBehind.xft.xml" />
+
+ <FileTemplate id = "WebConfig-Application"
+ resource = "WebConfig-Application.xft.xml" />
+ <FileTemplate id = "WebConfig-SubDir"
+ resource = "WebConfig-SubDir.xft.xml" />
+
+ <FileTemplate id = "WebContentForm-CodeBehind"
+ resource = "WebContentForm-CodeBehind.xft.xml" />
+ <FileTemplate id = "WebContentForm"
+ resource = "WebContentForm.xft.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplateTypes">
+ <FileTemplateType name = "AspNetFile" class = "MonoDevelop.AspNet.AspNetFileDescriptionTemplate"/>
+ <FileTemplateType name = "AspNetMasterContentFile" class = "MonoDevelop.AspNet.MasterContentFileDescriptionTemplate"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "WebApplication" resource = "WebApplication.xpt.xml"/>
+ <ProjectTemplate id = "WebApplication-Empty" resource = "WebApplication-Empty.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "AspNetWebFiles"
+ insertafter = "Xml"
+ _label = "ASP.NET Files"
+ extensions = "*.aspx,*.ashx,*.asmx,*.ascx,*.master,*.asax" />
+ <FileFilter id = "Html"
+ _label = "HTML Files"
+ extensions = "*.htm,*.html"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
+ <ProjectBinding id = "AspNetApplication" class = "MonoDevelop.AspNet.AspNetAppProjectBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.AspNet.Parser.AspNetParser" mimeType="application/x-aspx, application/x-ascx, application/x-master-page" />
+ <Parser class = "MonoDevelop.Html.HtmlParser" mimeType=".text/html, application/x-spark" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.AspNet.AspNetAppProject" />
+ <DataType class = "MonoDevelop.AspNet.AspNetAppProjectConfiguration" />
+ <DataType class = "MonoDevelop.AspNet.AspNetToolboxNode" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Run">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <Section id = "XspOptions"
+ _label = "XSP Web Server"
+ class = "MonoDevelop.AspNet.Gui.XspOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <Section id = "AspNetConfiguration"
+ _label = "ASP.NET Options"
+ class = "MonoDevelop.AspNet.Gui.AspNetConfigurationPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Deployment">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <Section id = "MonoDevelop.AspNet.Deployment"
+ _label = "Web Deployment Targets"
+ class = "MonoDevelop.AspNet.Deployment.WebDeployOptionsPanel"
+ fill = "true" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <Class class = "MonoDevelop.AspNet.VerifyCodeBehindBuildStep" insertafter="MidStep" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxLoaders">
+ <Class id="AspNetToolboxLoader" class="MonoDevelop.AspNet.AspNetToolboxLoader"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxProviders">
+ <Class id="AspNetDefaultControlToolboxProvider" class="MonoDevelop.AspNet.AspNetToolboxProvider"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "ASP.NET" id = "AspNet">
+ <Command id = "MonoDevelop.AspNet.AspNetCommands.AddAspNetDirectory"
+ _label = "ASP.NET Directory"
+ type="array" />
+ <Command id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject"
+ defaultHandler = "MonoDevelop.AspNet.Deployment.ProjectDeployHandler"
+ _label = "Deploy to Web..." />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <ItemSet id = "AspNetDirectories" _label = "ASP.NET Directory" insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.NewFolder">
+ <CommandItem id = "MonoDevelop.AspNet.AspNetCommands.AddAspNetDirectory" />
+ </ItemSet>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id="MonoDevelop.AspNet.ProjectFolderNodeBuilderExtension" class = "MonoDevelop.AspNet.ProjectFolderNodeBuilderExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Tools">
+ <Condition id="ItemType" value="MonoDevelop.AspNet.AspNetAppProject">
+ <CommandItem id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Project">
+ <CommandItem id = "MonoDevelop.AspNet.Deployment.WebDeployCommands.DeployProject" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/CustomModes">
+ <SyntaxMode mimeTypes="application/x-aspx" class="MonoDevelop.AspNet.AspNetSyntaxMode"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="application/x-aspx" _description="ASP.NET page" icon="md-html-file-icon" isText="true">
+ <File pattern="*.aspx" />
+ </MimeType>
+ <MimeType id="application/x-ascx" _description="ASP.NET user control" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ascx" />
+ </MimeType>
+ <MimeType id="application/x-asax" _description="ASP.NET global application class" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asax" />
+ </MimeType>
+ <MimeType id="application/x-ashx" _description="ASP.NET handler" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ashx" />
+ </MimeType>
+ <MimeType id="application/x-asmx" _description="ASP.NET web service" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asmx" />
+ </MimeType>
+ <MimeType id="application/x-asix" _description="ASP.NET image generator" icon="md-html-file-icon" isText="true">
+ <File pattern="*.asix" />
+ </MimeType>
+ <MimeType id="application/x-master-page" _description="ASP.NET master page" icon="md-html-file-icon" isText="true">
+ <File pattern="*.master|*.Master" />
+ </MimeType>
+ <MimeType id="application/javascript" _description="Javascript source code" icon="md-html-file-icon" isText="true">
+ <File pattern="*.js" />
+ </MimeType>
+ <MimeType id="text/css" _description="CSS document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.css" />
+ </MimeType>
+ <MimeType id="text/x-less" _description="LESS, CSS document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.less" />
+ </MimeType>
+ <MimeType id="text/html" _description="HTML document" icon="md-html-file-icon" isText="true">
+ <File pattern="*.html|*.htm" />
+ </MimeType>
+ <MimeType id="application/x-spark" _description="Spark View template" icon="md-html-file-icon" isText="true"
+ baseType="text/html">
+ <File pattern="*.spark" />
+ </MimeType>
+ <MimeType id="application/typescript" _description="Typescript source code" icon="md-html-file-icon" isText="true">
+ <File pattern="*.ts" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions=".aspx, .ascx, .master" class = "MonoDevelop.AspNet.Gui.AspNetEditorExtension" />
+ <Class fileExtensions=".html, .htm, .spark" class = "MonoDevelop.AspNet.Gui.HtmlEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Html/DocTypes">
+ <DocType name = "XHTML 1.0 Strict"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">"
+ xsdFile = "xhtml1-strict.xsd" />
+ <DocType name = "XHTML 1.0 Transitional"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
+ xsdFile = "xhtml1-transitional.xsd" />
+ <DocType name = "XHTML 1.0 Frameset"
+ fullName = "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">"
+ xsdFile = "xhtml1-frameset.xsd" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployServiceExtensions">
+ <Class id="AspNetDeploy" insertbefore="PrepareDeploy" class = "MonoDevelop.AspNet.Deployment.AspNetDeployServiceExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/ExecutionHandlers">
+ <ExecutionHandler id="AspNet" class = "MonoDevelop.AspNet.AspNetExecutionHandler"/>
+ </Extension>
+</Addin>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-CodeBehind.xft.xml
new file mode 100644
index 0000000..a316ac0
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-CodeBehind.xft.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/08/21"
+ LastModified="2006/08/21">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Global.asax with CodeBehind</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">Global.asax</DefaultFilename>
+ <_Description>Creates an ASP.NET Global.asax file with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="Global.asax">
+ <FileText>
+<![CDATA[<%@ Application Inherits="${Namespace}.Global" %>]]>
+ </FileText>
+ </AspNetFile>
+ <CodeTranslationFile name="Global.asax.${LanguageExtension}" DependsOn="Global.asax" >
+<![CDATA[using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Web;
+using System.Web.SessionState;
+
+namespace ${Namespace}
+{
+ public class Global : System.Web.HttpApplication
+ {
+ protected void Application_Start (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Session_Start (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_BeginRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_EndRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_AuthenticateRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_Error (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Session_End (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_End (Object sender, EventArgs e)
+ {
+
+ }
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-Empty.xft.xml
new file mode 100644
index 0000000..4cb76fb
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-Empty.xft.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/08/21"
+ LastModified="2006/08/21">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Global.asax</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">Global.asax</DefaultFilename>
+ <_Description>Creates an ASP.NET Global.asax file.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="Global.asax">
+ <FileText>
+<![CDATA[<%@ Application Language="${AspNetLanguage}" %>
+<script runat="server">
+${CodeRegion:script1}
+</script>
+]]>
+ </FileText>
+ <CodeTranslationFile TagName="script1">
+<![CDATA[using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Web;
+using System.Web.SessionState;
+
+namespace ${Namespace}
+{
+ public class Global : System.Web.HttpApplication
+ {
+ protected void Application_Start (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Session_Start (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_BeginRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_EndRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_AuthenticateRequest (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_Error (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Session_End (Object sender, EventArgs e)
+ {
+
+ }
+
+ protected void Application_End (Object sender, EventArgs e)
+ {
+
+ }
+ }
+}]]>
+ </CodeTranslationFile>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehind.xft.xml
new file mode 100644
index 0000000..861f7ae
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehind.xft.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<Template Originator="John Anderson"
+ Created="2007/02/03"
+ LastModified="2007/02/03">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Master Page with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an ASP.NET Master Page with a CodeBehind class.</_Description>
+ <ProjectType>AspNetApp</ProjectType>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" />
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.master">
+ <FileText>
+ <![CDATA[<%@ Master Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+<div id="container">
+<form runat="server">
+ <asp:contentplaceholder id="contentPlaceHolder" runat="server" />
+</form>
+</div>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier} : System.Web.UI.MasterPage
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="${Name}.master.designer.${LanguageExtension}" ShowAutogenerationNotice="True"
+ AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.master" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier}
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehindNonPartial.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehindNonPartial.xft.xml
new file mode 100644
index 0000000..4ebcee4
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehindNonPartial.xft.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<Template Originator="John Anderson"
+ Created="2007/02/03"
+ LastModified="2007/02/03">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Master Page with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an ASP.NET Master Page with a CodeBehind class.</_Description>
+ <ProjectType>AspNetApp</ProjectType>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" />
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.master">
+ <FileText>
+ <![CDATA[<%@ Master Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+<div id="container">
+<form runat="server">
+ <asp:contentplaceholder id="contentPlaceHolder" runat="server" />
+</form>
+</div>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public class ${EscapedIdentifier} : System.Web.UI.MasterPage
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-Empty.xft.xml
new file mode 100644
index 0000000..48c8a1c
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-Empty.xft.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<Template Originator="John Anderson"
+ Created="2007/02/03"
+ LastModified="2007/02/03">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Master Page without CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Master Page.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.master">
+ <FileText>
+ <![CDATA[<%@ Master Language="${AspNetLanguage}"%>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+<div id="container">
+<form runat="server">
+ <asp:contentplaceholder id="contentPlaceHolder" runat="server" />
+</form>
+</div>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage-CodeBehind.xft.xml
new file mode 100644
index 0000000..9099b87
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage-CodeBehind.xft.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<Template Originator ="Michael Hutchinson"
+ Created ="2009/02/24"
+ LastModified="2009/02/24">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Nested Master Page with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an ASP.NET Nested Master Page with a CodeBehind class.</_Description>
+ <ProjectType>AspNetApp</ProjectType>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" />
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetMasterContentFile name="${Name}.master">
+ <FileText>
+ <![CDATA[<%@ Master Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" Inherits="${Namespace}.${Name}" %>
+<%@ MasterType VirtualPath="${AspNetMaster}" %>
+${AspNetMasterContent}
+]]>
+ </FileText>
+ </AspNetMasterContentFile>
+
+ <CodeTranslationFile name="${Name}.master.${LanguageExtension}" DependsOn="${Name}.master" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier} : System.Web.UI.MasterPage
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="${Name}.master.designer.${LanguageExtension}" ShowAutogenerationNotice="True"
+ AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.master" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier}
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage.xft.xml
new file mode 100644
index 0000000..8204878
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage.xft.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<Template Originator ="Michael Hutchinson"
+ Created ="2009/02/24"
+ LastModified="2009/02/24">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Nested Master Page</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an ASP.NET Nested Master Page.</_Description>
+ <ProjectType>AspNetApp</ProjectType>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ClrVersion Condition="GreaterThanOrEqual" ClrVersion="Net_2_0" />
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetMasterContentFile name="${Name}.master">
+ <FileText>
+ <![CDATA[<%@ Master Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" %>
+${AspNetMasterContent}
+]]>
+ </FileText>
+ </AspNetMasterContentFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication-Empty.xpt.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication-Empty.xpt.xml
new file mode 100644
index 0000000..59e6bb0
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication-Empty.xpt.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template originator="Michael Hutchinson"
+ created="2006/06/06"
+ lastModified="2006/06/06">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Empty Web Application</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-project-web</Icon>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an empty ASP.NET Web Application project.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = "." type = "AspNetApp">
+ <Options />
+ <References>
+ <Reference type="Package" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ </References>
+ <Files>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication.xpt.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication.xpt.xml
new file mode 100644
index 0000000..00668fc
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication.xpt.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<Template originator="Michael Hutchinson"
+ created="2006/06/06"
+ lastModified="2006/06/06">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Application</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-project-web</Icon>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates a new ASP.NET Web Application project.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Default.aspx"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = "." type = "AspNetApp">
+ <Options />
+ <References>
+ <Reference type="Package" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference type="Package" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ </References>
+ <Files>
+ <FileTemplateReference TemplateID="GlobalAsax-CodeBehind" name="Global.asax" />
+ <FileTemplateReference TemplateID="WebConfig-Application" name="web.config" />
+
+ <AspNetFile name="Default.aspx" DefaultExtension=".aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" />
+ </form>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="Default.aspx.${LanguageExtension}">
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier} : System.Web.UI.Page
+ {
+ public void button1Clicked (object sender, EventArgs args)
+ {
+ button1.Text = "You clicked me";
+ }
+ }
+}]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="Default.aspx.designer.${LanguageExtension}"
+ ShowAutogenerationNotice="True"
+ AddStandardHeader="False"
+ SuppressAutoOpen="True">
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier}
+ {
+ protected System.Web.UI.WebControls.Button button1;
+ }
+}]]>
+ </CodeTranslationFile>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-Application.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-Application.xft.xml
new file mode 100644
index 0000000..6043103
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-Application.xft.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Michael Hutchinson"
+ Created="2007/09/10"
+ LastModified="2007/09/10">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Application Configuration</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">web.config</DefaultFilename>
+ <_Description>Creates an ASP.NET web.config file for an application.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="web.config" RequireProject="True"/>
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="web.config">
+ <FileText>
+<![CDATA[<?xml version="1.0" ?>
+<!--
+Web.config file for ${ProjectName}.
+
+The settings that can be used in this file are documented at
+http://www.mono-project.com/Config_system.web and
+http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
+-->
+<configuration>
+ <system.web>
+ <compilation
+ defaultLanguage="${AspNetLanguage}"
+ debug="true"
+ >
+ <assemblies>
+ </assemblies>
+ </compilation>
+
+ <customErrors
+ mode="RemoteOnly"
+ >
+ </customErrors>
+
+ <authentication
+ mode="None"
+ >
+ </authentication>
+
+ <authorization>
+ <allow users="*" />
+ </authorization>
+
+ <httpHandlers>
+ </httpHandlers>
+
+ <trace
+ enabled="false"
+ localOnly="true"
+ pageOutput="false"
+ requestLimit="10"
+ traceMode="SortByTime"
+ />
+
+ <sessionState
+ mode="InProc"
+ cookieless="false"
+ timeout="20"
+ />
+
+ <globalization
+ requestEncoding="utf-8"
+ responseEncoding="utf-8"
+ />
+
+ <pages>
+ </pages>
+ </system.web>
+</configuration>]]>
+ </FileText>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-SubDir.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-SubDir.xft.xml
new file mode 100644
index 0000000..dcde19b
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-SubDir.xft.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Michael Hutchinson"
+ Created="2006/09/10"
+ LastModified="2007/09/10">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Subdirectory Web Configuration</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <DefaultFilename IsFixed="True">web.config</DefaultFilename>
+ <_Description>Creates an ASP.NET web.config file for a subdirectory.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject ExcludedCreationPaths="" ExcludedFiles="web.config" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="web.config">
+ <FileText>
+<![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!--
+Web.config file for ${ProjectRelativeDirectory}.
+
+The settings that can be used in this file are documented at
+http://www.mono-project.com/Config_system.web and
+http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
+-->
+<configuration>
+ <system.web>
+
+ </system.web>
+</configuration>]]>
+ </FileText>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm-CodeBehind.xft.xml
new file mode 100644
index 0000000..8810bee
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm-CodeBehind.xft.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<Template Originator ="Michael Hutchinson"
+ Created ="2009/02/24"
+ LastModified="2009/02/24">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Content Form with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Form that is the child of a Master Page, with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetMasterContentFile name="${Name}.aspx" DefaultExtension=".aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" MasterPageFile="${AspNetMaster}" %>
+<%@ MasterType VirtualPath="${AspNetMaster}" %>
+${AspNetMasterContent}
+]]>
+ </FileText>
+ </AspNetMasterContentFile>
+ <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier} : System.Web.UI.Page
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="${Name}.aspx.designer.${LanguageExtension}" ShowAutogenerationNotice="True"
+ AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.aspx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+namespace ${Namespace} {
+ public partial class ${EscapedIdentifier}
+ {
+ }
+}
+]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm.xft.xml
new file mode 100644
index 0000000..651ab78
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm.xft.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<Template Originator ="Michael Hutchinson"
+ Created ="2009/02/24"
+ LastModified="2009/02/24">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Content Form</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Form that is the child of a Master Page.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetMasterContentFile name="${Name}.aspx" DefaultExtension=".aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" MasterPageFile="${AspNetMaster}" %>
+${AspNetMasterContent}
+]]>
+ </FileText>
+ </AspNetMasterContentFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehind.xft.xml
new file mode 100644
index 0000000..08e441e
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehind.xft.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/18">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>User Control with CodeBehind</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET user control with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile DefaultExtension=".ascx" name="${Name}.ascx">
+ <FileText>
+<![CDATA[<%@ Control Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.ascx.${LanguageExtension}" DependsOn="${Name}.ascx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier} : System.Web.UI.UserControl
+ {
+ }
+}]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="${Name}.ascx.designer.${LanguageExtension}" ShowAutogenerationNotice="True"
+ AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.ascx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier}
+ {
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehindNonPartial.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehindNonPartial.xft.xml
new file mode 100644
index 0000000..2cfebf9
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehindNonPartial.xft.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/18">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>User Control with CodeBehind</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET user control with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile DefaultExtension=".ascx" name="${Name}.ascx">
+ <FileText>
+<![CDATA[<%@ Control Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.ascx.${LanguageExtension}" DependsOn="${Name}.ascx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier} : System.Web.UI.UserControl
+ {
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-Empty.xft.xml
new file mode 100644
index 0000000..9876b2f
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-Empty.xft.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/06">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>User Control</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an empty ASP.NET user control.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.ascx">
+ <FileText>
+<![CDATA[<%@ Control Language="${AspNetLanguage}" ClassName="${Namespace}.${Name}" %>
+
+<script runat="server">
+
+</script>]]>
+ </FileText>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehind.xft.xml
new file mode 100644
index 0000000..0f09abb
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehind.xft.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/09"
+ LastModified="2007/09/05">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Form with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Form with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.aspx" DefaultExtension=".aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ </form>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier} : System.Web.UI.Page
+ {
+
+ }
+}]]>
+ </CodeTranslationFile>
+ <CodeTranslationFile name="${Name}.aspx.designer.${LanguageExtension}" ShowAutogenerationNotice="True"
+ AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.aspx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public partial class ${EscapedIdentifier}
+ {
+
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehindNonPartial.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehindNonPartial.xft.xml
new file mode 100644
index 0000000..f9576b6
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehindNonPartial.xft.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/09"
+ LastModified="2007/09/05">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Form with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Form with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.aspx" DefaultExtension=".aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" Inherits="${Namespace}.${Name}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ </form>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.aspx.${LanguageExtension}" DependsOn="${Name}.aspx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace} {
+
+ public class ${EscapedIdentifier} : System.Web.UI.Page
+ {
+
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-Empty.xft.xml
new file mode 100644
index 0000000..db8ed37
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-Empty.xft.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/06">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Form</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Form.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.aspx">
+ <FileText>
+ <![CDATA[<%@ Page Language="${AspNetLanguage}" %>
+${Doctype}
+<html>
+<head runat="server">
+ <title>${Name}</title>
+ <script runat="server">
+
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server">
+
+ </form>
+</body>
+</html>]]>
+ </FileText>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-CodeBehind.xft.xml
new file mode 100644
index 0000000..54f7de0
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-CodeBehind.xft.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/18">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Handler with CodeBehind</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Handler with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.ashx">
+ <FileText>
+<![CDATA[<%@ WebHandler Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.ashx.${LanguageExtension}" DependsOn="${Name}.ashx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.UI;
+
+namespace ${Namespace}
+{
+
+ public class ${EscapedIdentifier} : System.Web.IHttpHandler
+ {
+
+ public void ProcessRequest (HttpContext context)
+ {
+
+ }
+
+ public bool IsReusable {
+ get {
+ return false;
+ }
+ }
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-Empty.xft.xml
new file mode 100644
index 0000000..7aadf98
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-Empty.xft.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/06/06"
+ LastModified="2006/06/06">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Handler</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>ASP.NET</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET Web Handler.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.ashx">
+ <FileText>
+<![CDATA[<%@ WebHandler Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>
+${CodeRegion:script1}
+]]> </FileText>
+ <CodeTranslationFile TagName="script1">
+<![CDATA[using System;
+using System.Web;
+
+namespace ${Namespace}
+{
+
+ public class ${EscapedIdentifier} : System.Web.IHttpHandler
+ {
+
+ public void ProcessRequest (HttpContext context)
+ {
+ }
+
+ public bool IsReusable {
+ get {
+ return false;
+ }
+ }
+ }
+}]]>
+ </CodeTranslationFile>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-CodeBehind.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-CodeBehind.xft.xml
new file mode 100644
index 0000000..f141194
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-CodeBehind.xft.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/07/13"
+ LastModified="2006/07/13">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Service with CodeBehind</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET web service with a CodeBehind class.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.asmx">
+ <FileText>
+<![CDATA[<%@ WebService Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>]]>
+ </FileText>
+ </AspNetFile>
+
+ <CodeTranslationFile name="${Name}.asmx.${LanguageExtension}" DependsOn="${Name}.asmx" >
+<![CDATA[using System;
+using System.Web;
+using System.Web.Services;
+
+namespace ${Namespace}
+{
+ public class ${EscapedIdentifier} : System.Web.Services.WebService
+ {
+
+ }
+}]]>
+ </CodeTranslationFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-Empty.xft.xml b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-Empty.xft.xml
new file mode 100644
index 0000000..8a1f4be
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-Empty.xft.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template Originator="Michael Hutchinson"
+ Created="2006/07/13"
+ LastModified="2006/07/13">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Web Service</_Name>
+ <_Category>ASP.NET</_Category>
+ <Icon>md-html-file-icon</Icon>
+ <LanguageName>*</LanguageName>
+ <ProjectType>AspNetApp</ProjectType>
+ <_Description>Creates an ASP.NET web service.</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <AspNetFile name="${Name}.asmx">
+ <FileText>
+<![CDATA[<%@ WebService Language="${AspNetLanguage}" Class="${Namespace}.${Name}" %>
+${CodeRegion:script1}
+]]>
+ </FileText>
+ <CodeTranslationFile TagName="script1">
+<![CDATA[using System;
+using System.Web.Services;
+
+namespace ${Namespace}
+{
+ class ${EscapedIdentifier}
+ {
+ }
+}]]>
+ </CodeTranslationFile>
+ </AspNetFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.csproj.FilesWrittenAbsolute.txt b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..56e1206
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,35 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebHandler-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebService-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.GlobalAsax-Empty.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.MasterPage-CodeBehindNonPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebControl-CodeBehindNonPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebForm-CodeBehindNonPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebApplication-Empty.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-Application.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebConfig-SubDir.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.MonoDevelop.AspNet.MD1Serialization.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.NestedMasterPage-CodeBehind.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.Templates.WebContentForm.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/Schemas/xhtml1-frameset.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/Schemas/xhtml1-strict.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/Schemas/xhtml1-transitional.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/Schemas/readme.txt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/Schemas/W3C-License.html
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.dll.mdb
diff --git a/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.gtk-gui.gui.stetic b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9c44c34
--- /dev/null
+++ b/src/addins/AspNet/MonoDevelop.AspNet/obj/Debug/MonoDevelop.AspNet.gtk-gui.gui.stetic
@@ -0,0 +1,1115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.dll" />
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.AspNet/MonoDevelop.AspNet.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Gui.AspNetConfigurationPanelWidget" design-size="496 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Code Generation</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="disableCodeBehindGeneration">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Disable automatic updating of CodeBehind partial classes</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Gui.XspOptionsPanelWidget" design-size="358 387">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>General Options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="ipAddress">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Port number:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">IP address:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="portNumber">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">32767</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="verboseCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Verbose console output</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Security</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">SSL mode:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">SSL protocol:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="sslMode">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="updateSensitivity" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="sslProtocol">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="updateSensitivity" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>SSL Key</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="certLocation">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="keyType">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="updateSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="passwordOptions">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="updateSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="passwordEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="keyLocation">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Key type:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Key location:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Certificate location:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Password:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.AspNet.Deployment.WebDeployOptionsPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="targetView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="addButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Activated" handler="AddActivated" />
+ <signal name="Clicked" handler="AddActivated" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="editButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Activated" handler="EditActivated" />
+ <signal name="Clicked" handler="EditActivated" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Activated" handler="RemoveActivated" />
+ <signal name="Clicked" handler="RemoveActivated" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Window" id="MonoDevelop.AspNet.Deployment.WebTargetEditor" design-size="400 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title">WebTargetEditor</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Deployment.WebDeployTargetEditor" design-size="400 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Edit Web Deployment Target</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">9</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">7</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>General Options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>File Copying</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="fileCopyHbox">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="fileCopyBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="HasDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.AspNet.Deployment.WebDeployLaunchDialog" design-size="511 353">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Deploy to Web</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">9</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="titleLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><big><b>Deploying Web Project...</b></big></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Targets to which the project should be deployed:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="targetView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button6">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-edit Menu</property>
+ <property name="Label" translatable="yes">_Edit targets</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-11</property>
+ <signal name="Clicked" handler="editTargetsClicked" />
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDeploy">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-ok Menu</property>
+ <property name="Label" translatable="yes">_Deploy</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/CBinding/CBinding.Autotools/obj/Debug/CBinding.Autotools.csproj.FilesWrittenAbsolute.txt b/src/addins/CBinding/CBinding.Autotools/obj/Debug/CBinding.Autotools.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..8d0dd97
--- /dev/null
+++ b/src/addins/CBinding/CBinding.Autotools/obj/Debug/CBinding.Autotools.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CBinding.Autotools.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CBinding.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/CBinding.Autotools/obj/Debug/MonoDevelop.CBinding.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/CBinding.Autotools/obj/Debug/MonoDevelop.CBinding.Autotools.dll.mdb
diff --git a/src/addins/CBinding/CBinding.addin.xml b/src/addins/CBinding/CBinding.addin.xml
index 28e16e6..ebad3f5 100644
--- a/src/addins/CBinding/CBinding.addin.xml
+++ b/src/addins/CBinding/CBinding.addin.xml
@@ -6,16 +6,16 @@
url = "http://www.monodevelop.com"
description = "C/C++ Language binding"
category = "Language bindings"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id = "Core" version = "4.0.5"/>
- <Addin id = "Ide" version = "4.0.5"/>
- <Addin id = "Deployment" version = "4.0.5"/>
- <Addin id = "Deployment.Linux" version = "4.0.5"/>
- <Addin id = "SourceEditor2" version = "4.0.5" />
- <Addin id = "DesignerSupport" version = "4.0.5" />
- <Addin id = "Refactoring" version = "4.0.5" />
+ <Addin id = "Core" version = "4.0.12"/>
+ <Addin id = "Ide" version = "4.0.12"/>
+ <Addin id = "Deployment" version = "4.0.12"/>
+ <Addin id = "Deployment.Linux" version = "4.0.12"/>
+ <Addin id = "SourceEditor2" version = "4.0.12" />
+ <Addin id = "DesignerSupport" version = "4.0.12" />
+ <Addin id = "Refactoring" version = "4.0.12" />
</Dependencies>
<Extension path = "/MonoDevelop/Core/StockIcons">
@@ -241,7 +241,7 @@
</Runtime>
<Dependencies>
- <Addin id = "MonoDevelop.Autotools" version = "4.0.5"/>
+ <Addin id = "MonoDevelop.Autotools" version = "4.0.12"/>
</Dependencies>
<Extension path = "/Autotools/SimpleSetups">
diff --git a/src/addins/CBinding/CBinding.csproj b/src/addins/CBinding/CBinding.csproj
index d0696b7..b620648 100644
--- a/src/addins/CBinding/CBinding.csproj
+++ b/src/addins/CBinding/CBinding.csproj
@@ -101,11 +101,6 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -116,6 +111,11 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
diff --git a/src/addins/CBinding/Makefile.in b/src/addins/CBinding/Makefile.in
index 30a28fd..47904ca 100644
--- a/src/addins/CBinding/Makefile.in
+++ b/src/addins/CBinding/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/CBinding/obj/Debug/CBinding.CBinding.addin.xml b/src/addins/CBinding/obj/Debug/CBinding.CBinding.addin.xml
new file mode 100644
index 0000000..ebad3f5
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.CBinding.addin.xml
@@ -0,0 +1,262 @@
+<Addin id = "CBinding"
+ namespace = "MonoDevelop"
+ name = "C/C++ Language Binding"
+ author = "Marcos David Marín Amador"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com"
+ description = "C/C++ Language binding"
+ category = "Language bindings"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id = "Core" version = "4.0.12"/>
+ <Addin id = "Ide" version = "4.0.12"/>
+ <Addin id = "Deployment" version = "4.0.12"/>
+ <Addin id = "Deployment.Linux" version = "4.0.12"/>
+ <Addin id = "SourceEditor2" version = "4.0.12" />
+ <Addin id = "DesignerSupport" version = "4.0.12" />
+ <Addin id = "Refactoring" version = "4.0.12" />
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-union" resource = "Icons.16x16.Union" size="Menu"/>
+ <StockIcon stockid = "md-protected-union" resource = "Icons.16x16.ProtectedUnion" size="Menu"/>
+ <StockIcon stockid = "md-private-union" resource = "Icons.16x16.PrivateUnion" size="Menu"/>
+ <StockIcon stockid = "md-c-file" resource = "text-x-csrc.16x16.png" size="Menu" />
+ <StockIcon stockid = "md-h-file" resource = "text-x-chdr.16x16.png" size="Menu" />
+ <StockIcon stockid = "md-cpp-file" resource = "text-x-c++src.16x16.png" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter
+ id = "CPP"
+ insertbefore = "AllFiles"
+ _label = "C++ Files"
+ extensions = "*.cpp,*.h,*.hpp,*.cxx,*.cc,*.hh,*.hxx"/>
+ <FileFilter
+ id = "C"
+ insertbefore = "AllFiles"
+ _label = "C Files"
+ extensions = "*.c,*.h"/>
+ <FileFilter
+ id = "Objective C"
+ insertbefore = "AllFiles"
+ _label = "Objective C Files"
+ extensions = "*.m,*.h"/>
+ <FileFilter
+ id = "Objective C++"
+ insertbefore = "AllFiles"
+ _label = "Objective C++ Files"
+ extensions = "*.mm,*.M,*.h"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "EmptyCSourceFile" resource = "EmptyCSourceFile.xft.xml"/>
+ <FileTemplate id = "EmptyCHeaderFile" resource = "EmptyCHeaderFile.xft.xml"/>
+ <FileTemplate id = "EmptyCppSourceFile" resource = "EmptyCppSourceFile.xft.xml"/>
+ <FileTemplate id = "EmptyCppHeaderFile" resource = "EmptyCppHeaderFile.xft.xml"/>
+ <FileTemplate id = "EmptyObjCSourceFile" resource = "EmptyObjCSourceFile.xft.xml"/>
+ <FileTemplate id = "EmptyObjCppSourceFile" resource = "EmptyObjCppSourceFile.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <!-- C -->
+ <ProjectTemplate id = "EmptyCProject" resource = "EmptyCProject.xpt.xml"/>
+ <ProjectTemplate id = "SharedLibraryCProject" resource = "SharedLibraryCProject.xpt.xml"/>
+ <ProjectTemplate id = "StaticLibraryCProject" resource = "StaticLibraryCProject.xpt.xml"/>
+ <ProjectTemplate id = "ConsoleCProject" resource = "ConsoleCProject.xpt.xml"/>
+
+ <!-- C++ -->
+ <ProjectTemplate id = "EmptyCppProject" resource = "EmptyCppProject.xpt.xml"/>
+ <ProjectTemplate id = "SharedLibraryCppProject" resource = "SharedLibraryCppProject.xpt.xml"/>
+ <ProjectTemplate id = "StaticLibraryCppProject" resource = "StaticLibraryCppProject.xpt.xml"/>
+ <ProjectTemplate id = "ConsoleCppProject" resource = "ConsoleCppProject.xpt.xml"/>
+
+ <!-- ObjC -->
+ <ProjectTemplate id = "ConsoleObjCProject" resource = "ConsoleObjCProject.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-csrc" icon="md-c-file" isText="true">
+ <File pattern="*.c" />
+ </MimeType>
+ <MimeType id="text/x-chdr" icon="md-h-file" isText="true">
+ <File pattern="*.h" />
+ </MimeType>
+ <MimeType id="text/x-c++src" icon="md-cpp-file" isText="true">
+ <File pattern="*.cpp" />
+ <File pattern="*.cc" />
+ <File pattern="*.cxx" />
+ </MimeType>
+ <MimeType id="text/x-c++hdr" icon="md-h-file" isText="true">
+ <File pattern="*.hpp" />
+ <File pattern="*.hh" />
+ <File pattern="*.hxx" />
+ </MimeType>
+ <MimeType id="text/x-objcsrc" icon="md-c-file" isText="true">
+ <File pattern="*.m" />
+ </MimeType>
+ <MimeType id="text/x-objc++src" icon="md-cpp-file" isText="true">
+ <File pattern="*.mm" />
+ <File pattern="*.M" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
+ <ProjectBinding id = "CProject" class = "CBinding.CProjectBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/LanguageBindings">
+ <LanguageBinding
+ id = "C"
+ supportedextensions = ".c,.h"
+ class = "CBinding.CLanguageBinding"/>
+ <LanguageBinding
+ id = "CPP"
+ supportedextensions = ".cpp,.cxx,.cc,.h,.hpp,.hh,.hxx"
+ class = "CBinding.CppLanguageBinding"/>
+ <LanguageBinding
+ id = "Objective C"
+ supportedextensions = ".m,.h"
+ class = "CBinding.ObjCLanguageBinding"/>
+ <LanguageBinding
+ id = "Objective C++"
+ supportedextensions = ".mm,.M"
+ class = "CBinding.ObjCppLanguageBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/Projects">
+ <Section
+ id = "CBindingOptions"
+ _label = "C/C++"
+ class = "CBinding.GeneralOptionsPanelBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build">
+ <Condition id = "ItemType" value = "CBinding.CProject">
+ <Section
+ id = "CompilerPanel"
+ _label = "Compiler"
+ insertafter = "Compile"
+ class = "CBinding.CompilerPanelBinding"/>
+ <Section
+ id = "CodeGenerationPanel"
+ _label = "Code Generation"
+ class = "CBinding.CodeGenerationPanelBinding"/>
+ <Section
+ id = "OutputOptionsPanel"
+ _label = "Output"
+ class = "CBinding.OutputOptionsPanelBinding"/>
+ </Condition>
+ </Extension>
+
+ <ExtensionPoint path = "/CBinding/Views/ProjectBrowser/ContextMenu/PackagesFolderNode" name = "Packages folder context menu">
+ <Description>Context menu for packages folder in the solution pad.</Description>
+ <ExtensionNodeSet id = "MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/CBinding/Views/ProjectBrowser/ContextMenu/PackageNode" name = "ProjectPackage context menu">
+ <Description>Context menu for a package in the solution pad.</Description>
+ <ExtensionNodeSet id = "MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "CBinding.ProjectPad.ProjectReferencesExtension" class = "CBinding.ProjectPad.ProjectReferencesExtension"/>
+ <NodeBuilder id = "CBinding.ProjectPad.ProjectNodeExtension" class = "CBinding.ProjectPad.ProjectNodeExtension"/>
+ <NodeBuilder id = "CBinding.ProjectPad.ProjectPackagesFolderNodeBuilder" class = "CBinding.ProjectPad.ProjectPackagesFolderNodeBuilder"/>
+ <NodeBuilder id = "CBinding.ProjectPad.ProjectPackageNodeBuilder" class = "CBinding.ProjectPad.ProjectPackageNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ClassPad">
+ <NodeBuilder id = "CBinding.Navigation.ProjectNodeBuilderExtension" class = "CBinding.Navigation.ProjectNodeBuilderExtension"/>
+ <NodeBuilder id = "CBinding.Navigation.NamespaceNodeBuilder" class = "CBinding.Navigation.NamespaceNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.FunctionNodeBuilder" class = "CBinding.Navigation.FunctionNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.GlobalsNodeBuilder" class = "CBinding.Navigation.GlobalsNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.ClassNodeBuilder" class = "CBinding.Navigation.ClassNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.StructureNodeBuilder" class = "CBinding.Navigation.StructureNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.MemberNodeBuilder" class = "CBinding.Navigation.MemberNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.VariableNodeBuilder" class = "CBinding.Navigation.VariableNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.MacroDefinitionsNodeBuilder" class = "CBinding.Navigation.MacroDefinitionsNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.MacroNodeBuilder" class = "CBinding.Navigation.MacroNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.EnumerationNodeBuilder" class = "CBinding.Navigation.EnumerationNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.EnumeratorNodeBuilder" class = "CBinding.Navigation.EnumeratorNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.UnionNodeBuilder" class = "CBinding.Navigation.UnionNodeBuilder"/>
+ <NodeBuilder id = "CBinding.Navigation.TypedefNodeBuilder" class = "CBinding.Navigation.TypedefNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "C/C++" id = "C/C++">
+ <Command id = "CBinding.CProjectCommands.AddPackage" _label = "Edit Packages..." />
+ <Command id = "CBinding.CProjectCommands.UpdateClassPad" _label = "Update class pad" icon = "res:update" />
+ <Command id = "CBinding.CProjectCommands.ShowPackageDetails" _label = "Details..." />
+ </Category>
+ </Extension>
+
+ <Extension path = "/CBinding/Views/ProjectBrowser/ContextMenu/PackagesFolderNode">
+ <CommandItem id = "CBinding.CProjectCommands.AddPackage"/>
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Project">
+ <CommandItem id = "CBinding.CProjectCommands.UpdateClassPad"/>
+ </Extension>
+
+ <Extension path = "/CBinding/Views/ProjectBrowser/ContextMenu/PackageNode">
+ <CommandItem id = "CBinding.CProjectCommands.ShowPackageDetails"/>
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy"/>
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Condition id="ItemType" value="CBinding.CProject">
+ <Class id = "ExtraSteps" class = "CBinding.CProjectServiceExtension"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions=".c,.cpp,.cxx,.cc,.h,.hpp,.hh,.hxx,.m,.mm,.M" class = "CBinding.CTextEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "CBinding.CProjectConfiguration"/>
+ <DataType class = "CBinding.CProject"/>
+ <DataType class = "CBinding.GccCompiler"/>
+ <DataType class = "CBinding.GppCompiler"/>
+ <DataType class = "CBinding.Package"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <SolutionItem type="CBinding.CProject" extension="cproj" guid="{2857B73E-F847-4B02-9238-064979017E93}"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+
+<!-- Current Autotools AddIn is very .NET specific
+ <Module>
+ <Runtime>
+ <Import assembly = "CBinding.Autotools.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id = "MonoDevelop.Autotools" version = "4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/Autotools/SimpleSetups">
+ <Class class = "CBinding.Autotools.CAutotoolsSetup"/>
+ </Extension>
+ </Module>
+-->
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class="CBinding.Parser.CDocumentParser" mimeType = "text/x-csrc, text/x-chdr, text/x-c++src, text/x-c++hdr, text/x-objcsrc, text/x-objc++src" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <Condition id="FileType" fileExtensions=".c,.cpp,.cxx,.cc,.h,.hpp,.hh,.hxx,.m,.mm,.M">
+ <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration" insertafter="MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations" />
+ </Condition>
+ </Extension>
+</Addin>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.csproj.FilesWrittenAbsolute.txt b/src/addins/CBinding/obj/Debug/CBinding.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..309e42d
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,45 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.CBinding.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCSourceFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCHeaderFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppHeaderFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppSourceFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCppProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCppProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCppProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleObjCProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCSourceFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCppSourceFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.Icons.16x16.PrivateUnion
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.Icons.16x16.ProtectedUnion
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.Icons.16x16.Union
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.update
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.Icons.16x16.ProjectReference
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.22x22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.32x32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.48x48.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.22x22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.32x32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.48x48.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.22x22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.32x32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.48x48.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.22x22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.32x32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.48x48.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.c-icon-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/CBinding.icons.cpp-icon-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CBinding.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/MonoDevelop.CBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CBinding/obj/Debug/MonoDevelop.CBinding.dll.mdb
diff --git a/src/addins/CBinding/obj/Debug/CBinding.gtk-gui.gui.stetic b/src/addins/CBinding/obj/Debug/CBinding.gtk-gui.gui.stetic
new file mode 100644
index 0000000..f6625df
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.gtk-gui.gui.stetic
@@ -0,0 +1,2218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/MonoDevelop.CBinding.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="CBinding.CodeGenerationPanel" design-size="611 396">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">3</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">5</property>
+ <property name="ColumnSpacing">5</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Warning Level:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Optimization Level:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="optimizationSpinButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">3</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="targetComboBox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Executable
+Static Library
+Shared Object</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">1</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="noWarningRadio">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">no warnings</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="normalWarningRadio">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">normal</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="allWarningRadio">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">all</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="warningsAsErrorsCheckBox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Treat warnings as errors</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="Xpad">13</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Define Symbols:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="defineSymbolsTextEntry">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">A space seperated list of symbols to define.</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Padding">14</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame2">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <property name="LabelYalign">0</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.Table" id="table5">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">9</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Extra Linker Options</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Extra Compiler Options</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="extraCompilerTextView">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">A newline seperated list of extra options to send to the compiler.
+One option can be in more than one line.
+Example:
+ `pkg-config
+ --cflags
+ cairo`</property>
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow5">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="extraLinkerTextView">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">A newline seperated list of extra options to send to the linker.
+One option can be in more than one line.
+Example:
+ `pkg-config
+ --libs
+ cairo`</property>
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel12">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Extra Options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Code Generation</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">10</property>
+ <property name="ColumnSpacing">10</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="addLibButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Add</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnLibAdded" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Library:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="libAddEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnLibAddEntryChanged" />
+ <signal name="Activated" handler="OnLibAddEntryActivated" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="libTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnLibTreeViewCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="browseButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Browse...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBrowseButtonClick" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeLibButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Remove</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnRemoveLibButtonClicked" />
+ <signal name="Clicked" handler="OnLibRemoved" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Libraries</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">10</property>
+ <property name="ColumnSpacing">10</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="libPathEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnLibPathEntryChanged" />
+ <signal name="Activated" handler="OnLibPathEntryActivated" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="quickInsertLibButton">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Insert a macro.</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">></property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Library:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="libPathAddButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Add</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnLibPathAdded" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="libPathTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnLibPathTreeViewCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="libPathBrowseButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Browse...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnLibPathBrowseButtonClick" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="libPathRemoveButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Remove</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnLibPathRemoveButtonClicked" />
+ <signal name="Clicked" handler="OnLibPathRemoved" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">10</property>
+ <property name="ColumnSpacing">10</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="includePathEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnIncludePathEntryChanged" />
+ <signal name="Activated" handler="OnIncludePathEntryActivated" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="quickInsertIncludeButton">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Insert a macro.</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">></property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="includePathAddButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Add</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnIncludePathAdded" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Include:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="includePathTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnIncludePathTreeViewCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="includePathBrowseButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Browse...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnIncludePathBrowseButtonClick" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="includePathRemoveButton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Remove</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnIncludePathRemoveButtonClicked" />
+ <signal name="Clicked" handler="OnIncludePathRemoved" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Paths</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="CBinding.CompilerPanel" design-size="300 300">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="compilerComboBox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnCompilerComboBoxChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="useCcacheCheckBox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use ccache</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="CBinding.EditPackagesDialog" design-size="580 449">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Edit packages</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">183</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <signal name="SwitchPage" handler="OnNotebook1SwitchPage" />
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="normalPackageTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnNonSelectedPackageCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelSystemPackages">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">System Packages</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="projectPackageTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnNonSelectedPackageCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelProjectPackages">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Project Packages</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HeightRequest">21</property>
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="detailsButton">
+ <property name="MemberName" />
+ <property name="WidthRequest">33</property>
+ <property name="HeightRequest">33</property>
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnDetailsButtonClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Selected packages:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="selectedPackageTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnSelectedPackagesTreeViewCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="WidthRequest">33</property>
+ <property name="HeightRequest">33</property>
+ <property name="Sensitive">False</property>
+ <property name="Tooltip">Remove selected package from the project.</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-remove Menu</property>
+ <property name="Label" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnRemoveButtonClicked" />
+ <signal name="Clicked" handler="OnRemoveButtonClick" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Padding">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <signal name="Clicked" handler="OnCancelButtonClick" />
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <signal name="Clicked" handler="OnOkButtonClick" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="CBinding.OutputOptionsPanel" design-size="412 273">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Output</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Output Name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="XPadding">15</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Output Path:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="XPadding">15</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Parameters:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="XPadding">15</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="outputEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="outputNameTextEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="parametersTextEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="externalConsoleCheckbox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Run on e_xternal console</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnExternalConsoleCheckboxClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="pauseCheckbox">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Pause _console output</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="CBinding.GeneralOptionsPanel" design-size="457 300">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">5</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cCombo">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Default compiler to use for new C projects.</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnCComboChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cppCombo">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Default compiler to use for new C++ projects.</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnCppComboChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="ctagsBrowse">
+ <property name="MemberName">ctagsBrowse</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-open Menu</property>
+ <property name="Label" translatable="yes">Browse</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCtagsBrowseClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="ctagsEntry">
+ <property name="MemberName">ctagsEntry</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Default C Compiler:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Default C++ Compiler:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xpad">10</property>
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">CTags: </property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="parseLocalVariablesCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Parse Local Variables</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="XPadding">10</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="parseSystemTagsCheck">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Choose whether you want to parse system tags or not, if you do you will get completion for things like printf, but the tag parsing process will take considerably longer.</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Parse System Tags</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="XPadding">10</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="CBinding.PackageDetails" design-size="608 518">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Package Details</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="descriptionLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp">label12</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Version:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Description:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="nameLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label10</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="versionLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label11</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Requires:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.TreeView" id="requiresTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Libs:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.TreeView" id="libPathsTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport2">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.TreeView" id="libsTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">CFlags:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport3">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.TreeView" id="cflagsTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.c-icon-32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.c-icon-32.png
new file mode 100644
index 0000000..9552692
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.c-icon-32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.cpp-icon-32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.cpp-icon-32.png
new file mode 100644
index 0000000..1852d6b
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.cpp-icon-32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.16x16.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.16x16.png
new file mode 100644
index 0000000..252c197
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.16x16.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.22x22.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.22x22.png
new file mode 100644
index 0000000..62097bd
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.22x22.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.32x32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.32x32.png
new file mode 100644
index 0000000..1eef832
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.32x32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.48x48.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.48x48.png
new file mode 100644
index 0000000..87d4a16
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++hdr.48x48.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.16x16.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.16x16.png
new file mode 100644
index 0000000..031bcb9
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.16x16.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.22x22.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.22x22.png
new file mode 100644
index 0000000..721e238
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.22x22.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.32x32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.32x32.png
new file mode 100644
index 0000000..f557f2a
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.32x32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.48x48.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.48x48.png
new file mode 100644
index 0000000..87c347e
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-c++src.48x48.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.16x16.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.16x16.png
new file mode 100644
index 0000000..85d2b53
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.16x16.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.22x22.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.22x22.png
new file mode 100644
index 0000000..108c255
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.22x22.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.32x32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.32x32.png
new file mode 100644
index 0000000..b0535e9
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.32x32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.48x48.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.48x48.png
new file mode 100644
index 0000000..89994af
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-chdr.48x48.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.16x16.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.16x16.png
new file mode 100644
index 0000000..27090f2
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.16x16.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.22x22.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.22x22.png
new file mode 100644
index 0000000..6b316e2
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.22x22.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.32x32.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.32x32.png
new file mode 100644
index 0000000..bc18196
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.32x32.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.48x48.png b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.48x48.png
new file mode 100644
index 0000000..9ad7648
Binary files /dev/null and b/src/addins/CBinding/obj/Debug/CBinding.icons.text-x-csrc.48x48.png differ
diff --git a/src/addins/CBinding/obj/Debug/CBinding.md1format.xml b/src/addins/CBinding/obj/Debug/CBinding.md1format.xml
new file mode 100644
index 0000000..9b00c93
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.md1format.xml
@@ -0,0 +1,27 @@
+<SerializationMap>
+ <DataItem class = "CBinding.CProject">
+ <ItemProperty member="compiler_manager" name="compiler" valueType="CBinding.CCompiler"/>
+ <ItemProperty member="language" />
+ <ItemProperty member="target" name="Target"/>
+ <ItemProperty member="Packages" />
+ </DataItem>
+ <DataItem class = "CBinding.CProjectConfiguration">
+ <ItemProperty member="output" name="Output/output"/>
+ <ItemProperty member="target" name="Build/target"/>
+ <ItemProperty member="includes" name="Includes"/>
+ <ItemProperty member="includes" scope="*" name="Include" valueType="System.String"/>
+ <ItemProperty member="libpaths" name="LibPaths"/>
+ <ItemProperty member="libpaths" scope="*" name="LibPath" valueType="System.String"/>
+ <ItemProperty member="libs" name="Libs"/>
+ <ItemProperty member="libs" scope="*" name="Lib" valueType="System.String"/>
+ <ItemProperty member="warning_level" name="CodeGeneration/WarningLevel"/>
+ <ItemProperty member="warnings_as_errors" name="CodeGeneration/WarningsAsErrors"/>
+ <ItemProperty member="optimization" name="CodeGeneration/OptimizationLevel"/>
+ <ItemProperty member="extra_compiler_args" name="CodeGeneration/ExtraCompilerArguments"/>
+ <ItemProperty member="extra_linker_args" name="CodeGeneration/ExtraLinkerArguments"/>
+ <ItemProperty member="define_symbols" name="CodeGeneration/DefineSymbols"/>
+ <ItemProperty member="source_directory_path" name="SourceDirectory" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ <ItemProperty member="use_ccache" name="UseCcache" defaultValue="false"/>
+ <ItemProperty member="precompileHeaders" name="PrecompileHeaders" defaultValue="true"/>
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCProject.xpt.xml
new file mode 100644
index 0000000..2e9722c
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCProject.xpt.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>C</_Category>
+ <Icon>md-project-console|res:c-icon-32.png</Icon>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates simple hello world C project.</_Description>
+ <DefaultFilename>ConsoleCProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "Bin"
+ ExternalConsole = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.c" AddStandardHeader="True"><![CDATA[#include <stdio.h>
+
+int main (int argc, char *argv[])
+{
+ printf ("Hello world!\n");
+
+ return 0;
+}
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCppProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCppProject.xpt.xml
new file mode 100644
index 0000000..1038406
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleCppProject.xpt.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>C/C++</_Category>
+ <Icon>md-project-console|res:cpp-icon-32.png</Icon>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates simple hello world C++ project.</_Description>
+ <DefaultFilename>ConsoleCppProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "Bin"
+ ExternalConsole = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.cpp" AddStandardHeader="True"><![CDATA[#include <iostream>
+using namespace std;
+
+int main (int argc, char *argv[])
+{
+ cout << "Hello world!" << endl;
+
+ return 0;
+}
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleObjCProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleObjCProject.xpt.xml
new file mode 100644
index 0000000..239c6c9
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.ConsoleObjCProject.xpt.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Levi Bard"
+ created = "07/30/2010"
+ lastModified = "07/30/2010">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>C</_Category>
+ <Icon>md-project-console|res:c-icon-32.png</Icon>
+ <LanguageName>Objective C</LanguageName>
+ <_Description>Creates simple hello world Objective C project.</_Description>
+ <DefaultFilename>ConsoleObjCProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "Bin"
+ ExternalConsole = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.m" AddStandardHeader="True"><![CDATA[#import <stdio.h>
+
+int main( int argc, const char *argv[] ) {
+ printf( "hello world\n" );
+ return 0;
+}
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCHeaderFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCHeaderFile.xft.xml
new file mode 100644
index 0000000..8f5eb8f
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCHeaderFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Marcos David Marin Amador"
+ Language="C"
+ Created="08/03/2007"
+ LastModified="08/03/2007">
+
+ <TemplateConfiguration>
+ <_Name>Empty C Header File</_Name>
+ <Icon>res:text-x-chdr.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates an empty C header file.</_Description>
+ <DefaultFilename>EmptyCHeaderFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".h" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCProject.xpt.xml
new file mode 100644
index 0000000..a78ee97
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCProject.xpt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "04/12/2007"
+ lastModified = "06/13/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Empty C Project</_Name>
+ <_Category>C</_Category>
+ <Icon>md-project|res:c-icon-32.png</Icon>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates an empty C solution.</_Description>
+ <DefaultFilename>EmptyCProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "Bin"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCSourceFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCSourceFile.xft.xml
new file mode 100644
index 0000000..7ee58aa
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCSourceFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Marcos David Marin Amador"
+ Language="C"
+ Created="08/03/2007"
+ LastModified="08/03/2007">
+
+ <TemplateConfiguration>
+ <_Name>Empty C Source File</_Name>
+ <Icon>res:text-x-csrc.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates an empty C source file.</_Description>
+ <DefaultFilename>EmptyCSourceFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".c" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppHeaderFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppHeaderFile.xft.xml
new file mode 100644
index 0000000..65543f2
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppHeaderFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Marcos David Marin Amador"
+ Language="CPP"
+ Created="08/03/2007"
+ LastModified="08/03/2007">
+
+ <TemplateConfiguration>
+ <_Name>Empty C++ Header File</_Name>
+ <Icon>res:text-x-chdr.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates an empty C++ header file.</_Description>
+ <DefaultFilename>EmptyCppHeaderFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".h" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppProject.xpt.xml
new file mode 100644
index 0000000..f3880c9
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppProject.xpt.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "04/17/2007"
+ lastModified = "06/13/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Empty C++ Project</_Name>
+ <_Category>C/C++</_Category>
+ <Icon>md-project|res:cpp-icon-32.png</Icon>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates an empty C++ solution.</_Description>
+ <DefaultFilename>EmptyCppProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "Bin"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppSourceFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppSourceFile.xft.xml
new file mode 100644
index 0000000..327da67
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyCppSourceFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Marcos David Marin Amador"
+ Language="CPP"
+ Created="08/03/2007"
+ LastModified="08/03/2007">
+
+ <TemplateConfiguration>
+ <_Name>Empty C++ Source File</_Name>
+ <Icon>res:text-x-c++src.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates an empty C++ source file.</_Description>
+ <DefaultFilename>EmptyCppSourceFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".cpp" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCSourceFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCSourceFile.xft.xml
new file mode 100644
index 0000000..c49d10e
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCSourceFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Levi Bard"
+ Language="Objective C"
+ Created="07/10/2010"
+ LastModified="07/10/2010">
+
+ <TemplateConfiguration>
+ <_Name>Empty Objective C Source File</_Name>
+ <Icon>res:text-x-csrc.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>Objective C</LanguageName>
+ <_Description>Creates an empty Objective C source file.</_Description>
+ <DefaultFilename>EmptyObjCSourceFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".m" DefaultName="EmptyObjCSourceFile" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCppSourceFile.xft.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCppSourceFile.xft.xml
new file mode 100644
index 0000000..0c9c9a3
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.EmptyObjCppSourceFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Levi Bard"
+ Language="Objective C++"
+ Created="07/10/2010"
+ LastModified="07/10/2010">
+
+ <TemplateConfiguration>
+ <_Name>Empty Objective C++ Source File</_Name>
+ <Icon>res:text-x-csrc.32x32.png</Icon>
+ <_Category>General</_Category>
+ <LanguageName>Objective C++</LanguageName>
+ <_Description>Creates an empty Objective C++ source file.</_Description>
+ <DefaultFilename>EmptyObjCppSourceFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".mm" DefaultName="EmptyObjCppSourceFile" AddStandardHeader="True"/>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCProject.xpt.xml
new file mode 100644
index 0000000..cde35a3
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCProject.xpt.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Shared Library</_Name>
+ <_Category>C</_Category>
+ <Icon>md-project-library|res:c-icon-32.png</Icon>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates simple shared library C project.</_Description>
+ <DefaultFilename>SharedLibraryCProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "SharedLibrary"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.h" AddStandardHeader="True"><![CDATA[
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+/* Add function prototypes here */
+
+#endif
+]]></File>
+ <File name = "main.c"><![CDATA[#include "main.h"
+
+/* Add function definitions here */
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCppProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCppProject.xpt.xml
new file mode 100644
index 0000000..c88b7a9
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.SharedLibraryCppProject.xpt.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Shared Library</_Name>
+ <_Category>C/C++</_Category>
+ <Icon>md-project-library|res:cpp-icon-32.png</Icon>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates simple shared library C++ project.</_Description>
+ <DefaultFilename>SharedLibraryCppProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "SharedLibrary"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.h" AddStandardHeader="True"><![CDATA[#ifndef __MAIN_H__
+#define __MAIN_H__
+
+// Add function prototypes here
+
+#endif
+]]></File>
+ <File name = "main.cpp" AddStandardHeader="True"><![CDATA[#include "main.h"
+
+// Add function definitions here
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCProject.xpt.xml
new file mode 100644
index 0000000..4eeddad
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCProject.xpt.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Static Library</_Name>
+ <_Category>C</_Category>
+ <Icon>md-project-library|res:c-icon-32.png</Icon>
+ <LanguageName>C</LanguageName>
+ <_Description>Creates simple static library C project.</_Description>
+ <DefaultFilename>StaticLibraryCProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "StaticLibrary"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.h" AddStandardHeader="True"><![CDATA[#ifndef __MAIN_H__
+#define __MAIN_H__
+
+/* Add function prototypes here */
+
+#endif
+]]></File>
+ <File name = "main.c" AddStandardHeader="True"><![CDATA[#include "main.h"
+
+/* Add function definitions here */
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
+
diff --git a/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCppProject.xpt.xml b/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCppProject.xpt.xml
new file mode 100644
index 0000000..203ce8c
--- /dev/null
+++ b/src/addins/CBinding/obj/Debug/CBinding.templates.StaticLibraryCppProject.xpt.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<Template
+ originator = "Marcos David Marin Amador"
+ created = "08/16/2007"
+ lastModified = "08/16/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Static Library</_Name>
+ <_Category>C/C++</_Category>
+ <Icon>md-project-library|res:cpp-icon-32.png</Icon>
+ <LanguageName>CPP</LanguageName>
+ <_Description>Creates simple static library C++ project.</_Description>
+ <DefaultFilename>StaticLibraryCppProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "." type = "C/C++">
+ <Options
+ Target = "StaticLibrary"
+ PauseConsoleOutput = "True"
+ CompilerArgs = ""
+ LinkerArgs = ""/>
+
+ <Files>
+ <File name = "main.h" AddStandardHeader="True"><![CDATA[
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+// Add function prototypes here
+
+#endif
+]]></File>
+ <File name = "main.cpp" AddStandardHeader="True"><![CDATA[#include "main.h"
+
+// Add function definitions here
+]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CBinding/templates/ConsoleCProject.xpt.xml b/src/addins/CBinding/templates/ConsoleCProject.xpt.xml
index 3b056af..2e9722c 100644
--- a/src/addins/CBinding/templates/ConsoleCProject.xpt.xml
+++ b/src/addins/CBinding/templates/ConsoleCProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-console|res:c-icon-32.png</Icon>
<LanguageName>C</LanguageName>
<_Description>Creates simple hello world C project.</_Description>
+ <DefaultFilename>ConsoleCProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/ConsoleCppProject.xpt.xml b/src/addins/CBinding/templates/ConsoleCppProject.xpt.xml
index cc7bc55..1038406 100644
--- a/src/addins/CBinding/templates/ConsoleCppProject.xpt.xml
+++ b/src/addins/CBinding/templates/ConsoleCppProject.xpt.xml
@@ -8,9 +8,10 @@
<TemplateConfiguration>
<_Name>Console Project</_Name>
<_Category>C/C++</_Category>
- <Icon>md-project-console|res:cpp-icon-32.png</Icon>
+ <Icon>md-project-console|res:cpp-icon-32.png</Icon>
<LanguageName>CPP</LanguageName>
<_Description>Creates simple hello world C++ project.</_Description>
+ <DefaultFilename>ConsoleCppProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/ConsoleObjCProject.xpt.xml b/src/addins/CBinding/templates/ConsoleObjCProject.xpt.xml
index 210d478..239c6c9 100644
--- a/src/addins/CBinding/templates/ConsoleObjCProject.xpt.xml
+++ b/src/addins/CBinding/templates/ConsoleObjCProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-console|res:c-icon-32.png</Icon>
<LanguageName>Objective C</LanguageName>
<_Description>Creates simple hello world Objective C project.</_Description>
+ <DefaultFilename>ConsoleObjCProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/EmptyCHeaderFile.xft.xml b/src/addins/CBinding/templates/EmptyCHeaderFile.xft.xml
index de006b1..8f5eb8f 100644
--- a/src/addins/CBinding/templates/EmptyCHeaderFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyCHeaderFile.xft.xml
@@ -11,10 +11,11 @@
<_Category>General</_Category>
<LanguageName>C</LanguageName>
<_Description>Creates an empty C header file.</_Description>
+ <DefaultFilename>EmptyCHeaderFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".h" DefaultName="EmptyCHeaderFile" AddStandardHeader="True"/>
+ <File DefaultExtension=".h" AddStandardHeader="True"/>
</TemplateFiles>
<FileOptions/>
diff --git a/src/addins/CBinding/templates/EmptyCProject.xpt.xml b/src/addins/CBinding/templates/EmptyCProject.xpt.xml
index 29ac48c..a78ee97 100644
--- a/src/addins/CBinding/templates/EmptyCProject.xpt.xml
+++ b/src/addins/CBinding/templates/EmptyCProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project|res:c-icon-32.png</Icon>
<LanguageName>C</LanguageName>
<_Description>Creates an empty C solution.</_Description>
+ <DefaultFilename>EmptyCProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/EmptyCSourceFile.xft.xml b/src/addins/CBinding/templates/EmptyCSourceFile.xft.xml
index 34af9fb..7ee58aa 100644
--- a/src/addins/CBinding/templates/EmptyCSourceFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyCSourceFile.xft.xml
@@ -11,10 +11,11 @@
<_Category>General</_Category>
<LanguageName>C</LanguageName>
<_Description>Creates an empty C source file.</_Description>
+ <DefaultFilename>EmptyCSourceFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".c" DefaultName="EmptyCSourceFile" AddStandardHeader="True"/>
+ <File DefaultExtension=".c" AddStandardHeader="True"/>
</TemplateFiles>
<FileOptions/>
diff --git a/src/addins/CBinding/templates/EmptyCppHeaderFile.xft.xml b/src/addins/CBinding/templates/EmptyCppHeaderFile.xft.xml
index 76f523f..65543f2 100644
--- a/src/addins/CBinding/templates/EmptyCppHeaderFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyCppHeaderFile.xft.xml
@@ -11,10 +11,11 @@
<_Category>General</_Category>
<LanguageName>CPP</LanguageName>
<_Description>Creates an empty C++ header file.</_Description>
+ <DefaultFilename>EmptyCppHeaderFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".h" DefaultName="EmptyCppHeaderFile" AddStandardHeader="True"/>
+ <File DefaultExtension=".h" AddStandardHeader="True"/>
</TemplateFiles>
<FileOptions/>
diff --git a/src/addins/CBinding/templates/EmptyCppProject.xpt.xml b/src/addins/CBinding/templates/EmptyCppProject.xpt.xml
index a22dac7..f3880c9 100644
--- a/src/addins/CBinding/templates/EmptyCppProject.xpt.xml
+++ b/src/addins/CBinding/templates/EmptyCppProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project|res:cpp-icon-32.png</Icon>
<LanguageName>CPP</LanguageName>
<_Description>Creates an empty C++ solution.</_Description>
+ <DefaultFilename>EmptyCppProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/EmptyCppSourceFile.xft.xml b/src/addins/CBinding/templates/EmptyCppSourceFile.xft.xml
index c271e4f..327da67 100644
--- a/src/addins/CBinding/templates/EmptyCppSourceFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyCppSourceFile.xft.xml
@@ -11,10 +11,11 @@
<_Category>General</_Category>
<LanguageName>CPP</LanguageName>
<_Description>Creates an empty C++ source file.</_Description>
+ <DefaultFilename>EmptyCppSourceFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".cpp" DefaultName="EmptyCfile" AddStandardHeader="True"/>
+ <File DefaultExtension=".cpp" AddStandardHeader="True"/>
</TemplateFiles>
<FileOptions/>
diff --git a/src/addins/CBinding/templates/EmptyObjCSourceFile.xft.xml b/src/addins/CBinding/templates/EmptyObjCSourceFile.xft.xml
index f36f4ea..c49d10e 100644
--- a/src/addins/CBinding/templates/EmptyObjCSourceFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyObjCSourceFile.xft.xml
@@ -11,6 +11,7 @@
<_Category>General</_Category>
<LanguageName>Objective C</LanguageName>
<_Description>Creates an empty Objective C source file.</_Description>
+ <DefaultFilename>EmptyObjCSourceFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/addins/CBinding/templates/EmptyObjCppSourceFile.xft.xml b/src/addins/CBinding/templates/EmptyObjCppSourceFile.xft.xml
index 0b7c411..0c9c9a3 100644
--- a/src/addins/CBinding/templates/EmptyObjCppSourceFile.xft.xml
+++ b/src/addins/CBinding/templates/EmptyObjCppSourceFile.xft.xml
@@ -11,6 +11,7 @@
<_Category>General</_Category>
<LanguageName>Objective C++</LanguageName>
<_Description>Creates an empty Objective C++ source file.</_Description>
+ <DefaultFilename>EmptyObjCppSourceFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/addins/CBinding/templates/SharedLibraryCProject.xpt.xml b/src/addins/CBinding/templates/SharedLibraryCProject.xpt.xml
index 85d67bf..cde35a3 100644
--- a/src/addins/CBinding/templates/SharedLibraryCProject.xpt.xml
+++ b/src/addins/CBinding/templates/SharedLibraryCProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-library|res:c-icon-32.png</Icon>
<LanguageName>C</LanguageName>
<_Description>Creates simple shared library C project.</_Description>
+ <DefaultFilename>SharedLibraryCProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/SharedLibraryCppProject.xpt.xml b/src/addins/CBinding/templates/SharedLibraryCppProject.xpt.xml
index 01419b2..c88b7a9 100644
--- a/src/addins/CBinding/templates/SharedLibraryCppProject.xpt.xml
+++ b/src/addins/CBinding/templates/SharedLibraryCppProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-library|res:cpp-icon-32.png</Icon>
<LanguageName>CPP</LanguageName>
<_Description>Creates simple shared library C++ project.</_Description>
+ <DefaultFilename>SharedLibraryCppProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/StaticLibraryCProject.xpt.xml b/src/addins/CBinding/templates/StaticLibraryCProject.xpt.xml
index 83316c1..4eeddad 100644
--- a/src/addins/CBinding/templates/StaticLibraryCProject.xpt.xml
+++ b/src/addins/CBinding/templates/StaticLibraryCProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-library|res:c-icon-32.png</Icon>
<LanguageName>C</LanguageName>
<_Description>Creates simple static library C project.</_Description>
+ <DefaultFilename>StaticLibraryCProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CBinding/templates/StaticLibraryCppProject.xpt.xml b/src/addins/CBinding/templates/StaticLibraryCppProject.xpt.xml
index 9ec1983..203ce8c 100644
--- a/src/addins/CBinding/templates/StaticLibraryCppProject.xpt.xml
+++ b/src/addins/CBinding/templates/StaticLibraryCppProject.xpt.xml
@@ -11,6 +11,7 @@
<Icon>md-project-library|res:cpp-icon-32.png</Icon>
<LanguageName>CPP</LanguageName>
<_Description>Creates simple static library C++ project.</_Description>
+ <DefaultFilename>StaticLibraryCppProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj b/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
index af97018..f2b5dca 100644
--- a/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
+++ b/src/addins/CSharpBinding/AspNet/CSharpBinding.AspNet.csproj
@@ -107,7 +107,7 @@
<Name>MonoDevelop.Debugger</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
<Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
<Name>Mono.Debugging</Name>
<Private>False</Private>
diff --git a/src/addins/CSharpBinding/AspNet/Makefile.in b/src/addins/CSharpBinding/AspNet/Makefile.in
index 9af89cd..049eebd 100644
--- a/src/addins/CSharpBinding/AspNet/Makefile.in
+++ b/src/addins/CSharpBinding/AspNet/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/CSharpBinding/AspNet/obj/Debug/CSharpBinding.AspNet.csproj.FilesWrittenAbsolute.txt b/src/addins/CSharpBinding/AspNet/obj/Debug/CSharpBinding.AspNet.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..0cef4e8
--- /dev/null
+++ b/src/addins/CSharpBinding/AspNet/obj/Debug/CSharpBinding.AspNet.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.AspNet.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/AspNet/obj/Debug/MonoDevelop.CSharpBinding.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/AspNet/obj/Debug/MonoDevelop.CSharpBinding.AspNet.dll.mdb
diff --git a/src/addins/CSharpBinding/AssemblyInfo.cs b/src/addins/CSharpBinding/AssemblyInfo.cs
index c4c7fc6..255ca3b 100644
--- a/src/addins/CSharpBinding/AssemblyInfo.cs
+++ b/src/addins/CSharpBinding/AssemblyInfo.cs
@@ -1,9 +1,11 @@
// Autogenerated from CSharpBinding.addin.xml
using System.Reflection;
+using System.Runtime.CompilerServices;
[assembly: AssemblyProduct ("MonoDevelop")]
[assembly: AssemblyTitle ("CSharp Language Binding")]
[assembly: AssemblyDescription ("CSharp Language Binding")]
[assembly: AssemblyVersion ("2.6")]
[assembly: AssemblyCopyright ("MIT X11")]
+[assembly: InternalsVisibleTo("UnitTests")]
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/Autotools/Makefile.in b/src/addins/CSharpBinding/Autotools/Makefile.in
index 6ab72f2..bb09738 100644
--- a/src/addins/CSharpBinding/Autotools/Makefile.in
+++ b/src/addins/CSharpBinding/Autotools/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/CSharpBinding/Autotools/obj/Debug/Autotools.csproj.FilesWrittenAbsolute.txt b/src/addins/CSharpBinding/Autotools/obj/Debug/Autotools.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..d1967ad
--- /dev/null
+++ b/src/addins/CSharpBinding/Autotools/obj/Debug/Autotools.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.Autotools.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/Autotools/obj/Debug/MonoDevelop.CSharpBinding.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/Autotools/obj/Debug/MonoDevelop.CSharpBinding.Autotools.dll.mdb
diff --git a/src/addins/CSharpBinding/CSharpBinding.addin.xml b/src/addins/CSharpBinding/CSharpBinding.addin.xml
index 7de5970..0d4002e 100644
--- a/src/addins/CSharpBinding/CSharpBinding.addin.xml
+++ b/src/addins/CSharpBinding/CSharpBinding.addin.xml
@@ -6,13 +6,13 @@
url = "http://www.monodevelop.com/"
description = "CSharp Language Binding"
category = "Language bindings"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="SourceEditor2" version="4.0.5"/>
- <Addin id="Refactoring" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
</Dependencies>
<ConditionType id="MSBuildTargetIsAvailable" type="MonoDevelop.Projects.Formats.MSBuild.TargetsAvailableCondition" />
@@ -114,6 +114,7 @@
<Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.Completion.CSharpCompletionTextEditorExtension" />
<Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.Highlighting.HighlightUsagesExtension" />
<Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.PathedDocumentTextEditorExtension" />
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.UnitTestTextEditorExtension" />
</Extension>
<Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
@@ -129,6 +130,9 @@
<MimeType id="text/x-csharp" _description="C# source code" icon="md-csharp-file" isText="true">
<File pattern="*.cs" />
</MimeType>
+ <MimeType id="application/csproject+xml" _description="C# project file" baseType="application/xml">
+ <File pattern="*.csproj" />
+ </MimeType>
</Extension>
<Extension path = "/MonoDevelop/Ide/CodeFormatters">
@@ -197,6 +201,10 @@
_title = "Move type to another file"
_description = "Moves current type to another file that matches the name of the type."
class = "MonoDevelop.CSharp.Refactoring.CodeActions.MoveTypeToFile" />
+ <Action mimeType="text/x-csharp"
+ _title = "Convert to enum"
+ _description = "Converts constant fields to enumeration"
+ class = "MonoDevelop.CSharp.Refactoring.CodeActions.ConvertToEnumAction" />
</Extension>
<Extension path = "/MonoDevelop/Ide/TextEditorResolver">
@@ -267,7 +275,7 @@
<Import assembly="MonoDevelop.CSharpBinding.Autotools.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Autotools" version="4.0.5"/>
+ <Addin id="Autotools" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Autotools/SimpleSetups">
<Class class="CSharpBinding.Autotools.CSharpAutotoolsSetup" />
@@ -279,7 +287,7 @@
<Import assembly="MonoDevelop.CSharpBinding.AspNet.dll"/>
</Runtime>
<Dependencies>
- <Addin id="AspNet" version="4.0.5"/>
+ <Addin id="AspNet" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Asp/CompletionBuilders">
<Class class = "MonoDevelop.CSharp.Completion.AspLanguageBuilder" />
diff --git a/src/addins/CSharpBinding/CSharpBinding.csproj b/src/addins/CSharpBinding/CSharpBinding.csproj
index 2ec1b98..a36adc9 100644
--- a/src/addins/CSharpBinding/CSharpBinding.csproj
+++ b/src/addins/CSharpBinding/CSharpBinding.csproj
@@ -56,11 +56,6 @@
<Name>MonoDevelop.Debugger</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj">
<Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project>
<Name>MonoDevelop.DesignerSupport</Name>
@@ -101,6 +96,26 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory.IKVM\ICSharpCode.NRefactory.IKVM.csproj">
+ <Project>{A727169F-D94F-443F-B305-B057D7F3B420}</Project>
+ <Name>ICSharpCode.NRefactory.IKVM</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\xwt\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\NUnit\MonoDevelop.NUnit.csproj">
+ <Project>{A7A4246D-CEC4-42DF-A3C1-C31B9F51C4EC}</Project>
+ <Name>MonoDevelop.NUnit</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
@@ -290,6 +305,9 @@
<Compile Include="MonoDevelop.CSharp.Completion\ArrayTypeParameterDataProvider.cs" />
<Compile Include="MonoDevelop.CSharp.CodeGeneration\ImplementInterfaceMembersGenerator.cs" />
<Compile Include="MonoDevelop.CSharp.Completion\TypeParameterDataProvider.cs" />
+ <Compile Include="MonoDevelop.CSharp.Refactoring.CodeActions\Actions\ConvertToEnumAction.cs" />
+ <Compile Include="MonoDevelop.CSharp.Refactoring.CodeActions\Actions\ConvertToEnumDialog.cs" />
+ <Compile Include="MonoDevelop.CSharp.UnitTests\UnitTestTextEditorExtension.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
@@ -311,5 +329,6 @@
<Folder Include="MonoDevelop.CSharp.Refactoring.CodeIssues\" />
<Folder Include="MonoDevelop.CSharp.Refactoring.CodeIssues\NamingInspection\" />
<Folder Include="MonoDevelop.CSharp.Tooltips\" />
+ <Folder Include="MonoDevelop.CSharp.UnitTests\" />
</ItemGroup>
</Project>
diff --git a/src/addins/CSharpBinding/Makefile.in b/src/addins/CSharpBinding/Makefile.in
index 8425524..cf88ecb 100644
--- a/src/addins/CSharpBinding/Makefile.in
+++ b/src/addins/CSharpBinding/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -329,11 +328,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -397,6 +396,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -460,6 +463,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -618,21 +635,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all: csproj_build
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs
index c3bc4cd..777f523 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs
@@ -171,7 +171,17 @@ namespace MonoDevelop.CSharp.Completion
unit = null;
CSharpUnresolvedFile = null;
UnresolvedFileCompilation = null;
- Document.DocumentParsed -= HandleDocumentParsed;
+ Document.DocumentParsed -= HandleDocumentParsed;
+ if (unstableTypeSystemSegmentTree != null) {
+ unstableTypeSystemSegmentTree.RemoveListener ();
+ unstableTypeSystemSegmentTree = null;
+ }
+
+ if (validTypeSystemSegmentTree != null) {
+ validTypeSystemSegmentTree.RemoveListener ();
+ validTypeSystemSegmentTree = null;
+ }
+
base.Dispose ();
}
@@ -181,10 +191,19 @@ namespace MonoDevelop.CSharp.Completion
if (newDocument == null)
return;
var newTree = TypeSystemSegmentTree.Create (Document);
- if (typeSystemSegmentTree != null)
- typeSystemSegmentTree.RemoveListener ();
- typeSystemSegmentTree = newTree;
- typeSystemSegmentTree.InstallListener (document.Editor.Document);
+
+ if (unstableTypeSystemSegmentTree != null)
+ unstableTypeSystemSegmentTree.RemoveListener ();
+
+ if (!newDocument.HasErrors) {
+ if (validTypeSystemSegmentTree != null)
+ validTypeSystemSegmentTree.RemoveListener ();
+ validTypeSystemSegmentTree = newTree;
+ unstableTypeSystemSegmentTree = null;
+ } else {
+ unstableTypeSystemSegmentTree = newTree;
+ }
+ newTree.InstallListener (document.Editor.Document);
this.Unit = newDocument.GetAst<SyntaxTree> ();
this.CSharpUnresolvedFile = newDocument.ParsedFile as CSharpUnresolvedFile;
@@ -251,6 +270,35 @@ namespace MonoDevelop.CSharp.Completion
{
CSharpCompletionDataList List { get; set; }
}
+
+ ICompletionContextProvider CreateContextProvider ()
+ {
+ return new CompletionContextProvider (document, validTypeSystemSegmentTree, unstableTypeSystemSegmentTree);
+ }
+
+ CSharpTypeResolveContext CreateTypeResolveContext ()
+ {
+ var compilation = UnresolvedFileCompilation;
+ var rctx = new CSharpTypeResolveContext (compilation.MainAssembly);
+ var loc = TextEditorData.Caret.Location;
+ rctx = rctx.WithUsingScope (CSharpUnresolvedFile.GetUsingScope (loc).Resolve (compilation));
+ int offset = TextEditorData.Caret.Offset;
+ var curDef = GetTypeAt (offset);
+ if (curDef != null) {
+ var resolvedDef = curDef.Resolve (rctx).GetDefinition ();
+ if (resolvedDef == null)
+ return rctx;
+ rctx = rctx.WithCurrentTypeDefinition (resolvedDef);
+ var foundMember = GetMemberAt (offset);
+ if (foundMember != null) {
+ var curMember = resolvedDef.Members.FirstOrDefault (m => m.Region.FileName == foundMember.Region.FileName && m.Region.Begin == foundMember.Region.Begin);
+ if (curMember != null)
+ rctx = rctx.WithCurrentMember (curMember);
+ }
+ }
+
+ return rctx;
+ }
ICompletionDataList InternalHandleCodeCompletion (CodeCompletionContext completionContext, char completionChar, bool ctrlSpace, ref int triggerWordLength)
{
@@ -261,21 +309,29 @@ namespace MonoDevelop.CSharp.Completion
}
if (Unit == null || CSharpUnresolvedFile == null)
return null;
- if(typeSystemSegmentTree == null)
+ if(unstableTypeSystemSegmentTree == null && validTypeSystemSegmentTree == null)
return null;
var list = new CSharpCompletionDataList ();
list.Resolver = CSharpUnresolvedFile != null ? CSharpUnresolvedFile.GetResolver (UnresolvedFileCompilation, Document.Editor.Caret.Location) : new CSharpResolver (Compilation);
- var ctx = CSharpUnresolvedFile.GetTypeResolveContext (UnresolvedFileCompilation, data.Caret.Location) as CSharpTypeResolveContext;
+ var ctx = CreateTypeResolveContext ();
+ var completionDataFactory = new CompletionDataFactory (this, new CSharpResolver (ctx));
var engine = new CSharpCompletionEngine (
data.Document,
- typeSystemSegmentTree,
- new CompletionDataFactory (this, new CSharpResolver (ctx)),
+ CreateContextProvider (),
+ completionDataFactory,
Document.GetProjectContext (),
ctx
);
-
+ completionDataFactory.Engine = engine;
+ engine.AutomaticallyAddImports = AddImportedItemsToCompletionList.Value;
+ engine.IncludeKeywordsInCompletionList = IncludeKeywordsInCompletionList.Value;
+ if (FilterCompletionListByEditorBrowsable) {
+ engine.EditorBrowsableBehavior = IncludeEditorBrowsableAdvancedMembers ? EditorBrowsableBehavior.IncludeAdvanced : EditorBrowsableBehavior.Normal;
+ } else {
+ engine.EditorBrowsableBehavior = EditorBrowsableBehavior.Ignore;
+ }
if (Document.HasProject) {
var configuration = Document.Project.GetConfiguration (MonoDevelop.Ide.IdeApp.Workspace.ActiveConfiguration) as DotNetProjectConfiguration;
var par = configuration != null ? configuration.CompilationParameters as CSharpCompilerParameters : null;
@@ -332,10 +388,10 @@ namespace MonoDevelop.CSharp.Completion
{
var engine = new CSharpParameterCompletionEngine (
TextEditorData.Document,
- typeSystemSegmentTree,
+ CreateContextProvider (),
this,
Document.GetProjectContext (),
- CSharpUnresolvedFile.GetTypeResolveContext (Document.Compilation, document.Editor.Caret.Location) as CSharpTypeResolveContext
+ CreateTypeResolveContext ()
);
List<string> list;
int cparam = engine.GetCurrentParameterIndex (provider.StartOffset, document.Editor.Caret.Offset, out list);
@@ -491,10 +547,10 @@ namespace MonoDevelop.CSharp.Completion
try {
var engine = new CSharpParameterCompletionEngine (
TextEditorData.Document,
- typeSystemSegmentTree,
+ CreateContextProvider (),
this,
Document.GetProjectContext (),
- CSharpUnresolvedFile.GetTypeResolveContext (Document.Compilation, document.Editor.Caret.Location) as CSharpTypeResolveContext
+ CreateTypeResolveContext ()
);
return engine.GetParameterDataProvider (completionContext.TriggerOffset, completionChar) as ParameterDataProvider;
} catch (Exception e) {
@@ -532,10 +588,10 @@ namespace MonoDevelop.CSharp.Completion
{
var engine = new CSharpParameterCompletionEngine (
TextEditorData.Document,
- typeSystemSegmentTree,
+ CreateContextProvider (),
this,
Document.GetProjectContext (),
- CSharpUnresolvedFile.GetTypeResolveContext (Document.Compilation, document.Editor.Caret.Location) as CSharpTypeResolveContext
+ CreateTypeResolveContext ()
);
engine.SetOffset (document.Editor.Caret.Offset);
return engine.GetParameterCompletionCommandOffset (out cpos);
@@ -545,10 +601,10 @@ namespace MonoDevelop.CSharp.Completion
{
var engine = new CSharpParameterCompletionEngine (
TextEditorData.Document,
- typeSystemSegmentTree,
+ CreateContextProvider (),
this,
Document.GetProjectContext (),
- CSharpUnresolvedFile.GetTypeResolveContext (Document.Compilation, document.Editor.Caret.Location) as CSharpTypeResolveContext
+ CreateTypeResolveContext ()
);
List<string> list;
return engine.GetCurrentParameterIndex (startOffset, document.Editor.Caret.Offset, out list);
@@ -600,22 +656,28 @@ namespace MonoDevelop.CSharp.Completion
#region ICompletionDataFactory implementation
- class CompletionDataFactory : ICompletionDataFactory
+ internal class CompletionDataFactory : ICompletionDataFactory
{
- CSharpCompletionTextEditorExtension ext;
+ internal readonly CSharpCompletionTextEditorExtension ext;
// readonly CSharpResolver state;
readonly TypeSystemAstBuilder builder;
+ public CSharpCompletionEngine Engine {
+ get;
+ set;
+ }
+
public CompletionDataFactory (CSharpCompletionTextEditorExtension ext, CSharpResolver state)
{
// this.state = state;
- builder = new TypeSystemAstBuilder(state);
+ if (state != null)
+ builder = new TypeSystemAstBuilder(state);
this.ext = ext;
}
ICompletionData ICompletionDataFactory.CreateEntityCompletionData (IEntity entity)
{
- return new MemberCompletionData (ext, entity, OutputFlags.IncludeGenerics | OutputFlags.HideArrayBrackets | OutputFlags.IncludeParameterName) {
+ return new MemberCompletionData (this, entity, OutputFlags.IncludeGenerics | OutputFlags.HideArrayBrackets | OutputFlags.IncludeParameterName) {
HideExtensionParameter = true
};
}
@@ -657,7 +719,7 @@ namespace MonoDevelop.CSharp.Completion
public override TooltipInformation CreateTooltipInformation (bool smartWrap)
{
- return tooltipFunc (List, smartWrap);
+ return tooltipFunc != null ? tooltipFunc (List, smartWrap) : new TooltipInformation ();
}
protected List<ICompletionData> overloads;
@@ -755,12 +817,13 @@ namespace MonoDevelop.CSharp.Completion
return result;
}
- public TypeCompletionData (IType type, CSharpCompletionTextEditorExtension ext, Lazy<string> displayText, string icon) : base (null, displayText, icon)
+ public TypeCompletionData (IType type, CSharpCompletionTextEditorExtension ext, Lazy<string> displayText, string icon, bool addConstructors) : base (null, displayText, icon)
{
this.type = type;
this.ext = ext;
this.file = ext.CSharpUnresolvedFile;
this.compilation = ext.UnresolvedFileCompilation;
+
}
Dictionary<string, ICSharpCode.NRefactory.Completion.ICompletionData> addedDatas = new Dictionary<string, ICSharpCode.NRefactory.Completion.ICompletionData> ();
@@ -795,8 +858,20 @@ namespace MonoDevelop.CSharp.Completion
return new GenericTooltipCompletionData ((list, sw) => MemberCompletionData.CreateTooltipInformation (ext, list.Resolver, entity, sw), text, entity.GetStockIcon ());
}
- ICompletionData ICompletionDataFactory.CreateTypeCompletionData (IType type, bool showFullName, bool isInAttributeContext)
+ ICompletionData ICompletionDataFactory.CreateTypeCompletionData (IType type, bool showFullName, bool isInAttributeContext, bool addConstructors)
{
+ if (addConstructors) {
+ ICompletionData constructorResult = null;
+ foreach (var ctor in type.GetConstructors ()) {
+ if (constructorResult != null) {
+ constructorResult.AddOverload (((ICompletionDataFactory)this).CreateEntityCompletionData (ctor));
+ } else {
+ constructorResult = ((ICompletionDataFactory)this).CreateEntityCompletionData (ctor);
+ }
+ }
+ return constructorResult;
+ }
+
Lazy<string> displayText = new Lazy<string> (delegate {
string name = showFullName ? builder.ConvertType(type).ToString() : type.Name;
if (isInAttributeContext && name.EndsWith("Attribute") && name.Length > "Attribute".Length) {
@@ -807,7 +882,8 @@ namespace MonoDevelop.CSharp.Completion
var result = new TypeCompletionData (type, ext,
displayText,
- type.GetStockIcon ());
+ type.GetStockIcon (),
+ addConstructors);
return result;
}
@@ -885,10 +961,178 @@ namespace MonoDevelop.CSharp.Completion
}
- ICompletionData ICompletionDataFactory.CreateImportCompletionData(IType type, bool useFullName)
+ class FormatItemCompletionData : CompletionData
+ {
+ string format;
+ string description;
+ object example;
+
+ public FormatItemCompletionData (string format, string description, object example)
+ {
+ this.format = format;
+ this.description = description;
+ this.example = example;
+ }
+
+
+ public override string DisplayText {
+ get {
+ return format;
+ }
+ }
+ public override string GetDisplayDescription (bool isSelected)
+ {
+ return "- <span foreground=\"darkgray\" size='small'>" + description + "</span>";
+ }
+
+
+ string rightSideDescription = null;
+ public override string GetRightSideDescription (bool isSelected)
+ {
+ if (rightSideDescription == null) {
+ try {
+ rightSideDescription = "<span size='small'>" + string.Format ("{0:" +format +"}", example) +"</span>";
+ } catch (Exception e) {
+ rightSideDescription = "";
+ LoggingService.LogError ("Format error.", e);
+ }
+ }
+ return rightSideDescription;
+ }
+
+ public override string CompletionText {
+ get {
+ return format;
+ }
+ }
+
+ public override int CompareTo (object obj)
+ {
+ return 0;
+ }
+ }
+
+
+ ICompletionData ICompletionDataFactory.CreateFormatItemCompletionData(string format, string description, object example)
+ {
+ return new FormatItemCompletionData (format, description, example);
+ }
+
+
+ class ImportSymbolCompletionData : CompletionData
+ {
+ IType type;
+ ParsedDocument unit;
+ MonoDevelop.Ide.Gui.Document doc;
+ bool useFullName;
+ bool addConstructors;
+
+ public IType Type {
+ get { return this.type; }
+ }
+
+ public ImportSymbolCompletionData (MonoDevelop.Ide.Gui.Document doc, bool useFullName, IType type, bool addConstructors)
+ {
+ this.doc = doc;
+ this.useFullName = useFullName;
+ this.type = type;
+ this.unit = doc.ParsedDocument;
+ this.addConstructors = addConstructors;
+ }
+
+ bool initialized = false;
+ bool generateUsing, insertNamespace;
+
+ void Initialize ()
+ {
+ if (initialized)
+ return;
+ initialized = true;
+ if (string.IsNullOrEmpty (type.Namespace))
+ return;
+ generateUsing = !useFullName;
+ insertNamespace = useFullName;
+ }
+
+ #region IActionCompletionData implementation
+ public override void InsertCompletionText (CompletionListWindow window, ref KeyActions ka, Gdk.Key closeChar, char keyChar, Gdk.ModifierType modifier)
+ {
+ Initialize ();
+ using (var undo = doc.Editor.OpenUndoGroup ()) {
+ string text = insertNamespace ? type.Namespace + "." + type.Name : type.Name;
+ if (text != GetCurrentWord (window)) {
+ if (window.WasShiftPressed && generateUsing)
+ text = type.Namespace + "." + text;
+ window.CompletionWidget.SetCompletionText (window.CodeCompletionContext, GetCurrentWord (window), text);
+ }
+
+ if (!window.WasShiftPressed && generateUsing) {
+ var generator = CodeGenerator.CreateGenerator (doc);
+ if (generator != null) {
+ generator.AddGlobalNamespaceImport (doc, type.Namespace);
+ // reparse
+ doc.UpdateParseDocument ();
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region ICompletionData implementation
+ public override IconId Icon {
+ get {
+ return type.GetStockIcon ();
+ }
+ }
+
+ public override string DisplayText {
+ get {
+ return type.Name;
+ }
+ }
+
+ static string GetDefaultDisplaySelection (string description, bool isSelected)
+ {
+ if (!isSelected)
+ return "<span foreground=\"darkgray\">" + description + "</span>";
+ return description;
+ }
+
+ string displayDescription = null;
+ public override string GetDisplayDescription (bool isSelected)
+ {
+ if (displayDescription == null) {
+ Initialize ();
+ if (generateUsing || insertNamespace) {
+ displayDescription = string.Format (GettextCatalog.GetString ("(from '{0}')"), type.Namespace);
+ } else {
+ displayDescription = "";
+ }
+ }
+ return GetDefaultDisplaySelection (displayDescription, isSelected);
+ }
+
+ public override string Description {
+ get {
+ Initialize ();
+ if (generateUsing)
+ return string.Format (GettextCatalog.GetString ("Add namespace import '{0}'"), type.Namespace);
+ return null;
+ }
+ }
+
+ public override string CompletionText {
+ get {
+ return type.Name;
+ }
+ }
+ #endregion
+ }
+
+
+ ICompletionData ICompletionDataFactory.CreateImportCompletionData(IType type, bool useFullName, bool addConstructors)
{
- // atm only used in #develop
- throw new NotImplementedException ();
+ return new ImportSymbolCompletionData (ext.Document, useFullName, type, addConstructors);
}
}
@@ -934,9 +1178,10 @@ namespace MonoDevelop.CSharp.Completion
#endregion
#region TypeSystemSegmentTree
-
- internal TypeSystemSegmentTree typeSystemSegmentTree;
-
+
+ TypeSystemSegmentTree validTypeSystemSegmentTree;
+ TypeSystemSegmentTree unstableTypeSystemSegmentTree;
+
internal class TypeSystemTreeSegment : TreeSegment
{
public IUnresolvedEntity Entity {
@@ -949,16 +1194,19 @@ namespace MonoDevelop.CSharp.Completion
this.Entity = entity;
}
}
+
+ internal TypeSystemTreeSegment GetMemberSegmentAt (int offset)
+ {
+ TypeSystemTreeSegment result = null;
+ if (unstableTypeSystemSegmentTree != null)
+ result = unstableTypeSystemSegmentTree.GetMemberSegmentAt (offset);
+ if (result == null && validTypeSystemSegmentTree != null)
+ result = validTypeSystemSegmentTree.GetMemberSegmentAt (offset);
+ return result;
+ }
- internal class TypeSystemSegmentTree : SegmentTree<TypeSystemTreeSegment>, ICompletionContextProvider
+ internal class TypeSystemSegmentTree : SegmentTree<TypeSystemTreeSegment>
{
- MonoDevelop.Ide.Gui.Document document;
-
- public TypeSystemSegmentTree (MonoDevelop.Ide.Gui.Document document)
- {
- this.document = document;
- }
-
public IUnresolvedTypeDefinition GetTypeAt (int offset)
{
IUnresolvedTypeDefinition result = null;
@@ -990,7 +1238,7 @@ namespace MonoDevelop.CSharp.Completion
internal static TypeSystemSegmentTree Create (MonoDevelop.Ide.Gui.Document document)
{
- TypeSystemSegmentTree result = new TypeSystemSegmentTree (document);
+ TypeSystemSegmentTree result = new TypeSystemSegmentTree ();
foreach (var type in document.ParsedDocument.TopLevelTypeDefinitions)
AddType (document, result, type);
@@ -1016,8 +1264,47 @@ namespace MonoDevelop.CSharp.Completion
foreach (var nested in type.NestedTypes)
AddType (document, result, nested);
}
+ }
+
+ public IUnresolvedTypeDefinition GetTypeAt (int offset)
+ {
+ if (unstableTypeSystemSegmentTree == null && validTypeSystemSegmentTree == null)
+ return null;
+ IUnresolvedTypeDefinition type = null;
+ if (unstableTypeSystemSegmentTree != null)
+ type = unstableTypeSystemSegmentTree.GetTypeAt (offset);
+ if (type == null && validTypeSystemSegmentTree != null)
+ type = validTypeSystemSegmentTree.GetTypeAt (offset);
+ return type;
+ }
+
+ public IUnresolvedMember GetMemberAt (int offset)
+ {
+ if (unstableTypeSystemSegmentTree == null && validTypeSystemSegmentTree == null)
+ return null;
- #region ICompletionContextProvider implementation
+ IUnresolvedMember member = null;
+ if (unstableTypeSystemSegmentTree != null)
+ member = unstableTypeSystemSegmentTree.GetMemberAt (offset);
+ if (member == null && validTypeSystemSegmentTree != null)
+ member = validTypeSystemSegmentTree.GetMemberAt (offset);
+ return member;
+ }
+ #endregion
+
+
+ class CompletionContextProvider : ICompletionContextProvider
+ {
+ MonoDevelop.Ide.Gui.Document document;
+ TypeSystemSegmentTree validTypeSystemSegmentTree;
+ TypeSystemSegmentTree unstableTypeSystemSegmentTree;
+
+ public CompletionContextProvider (MonoDevelop.Ide.Gui.Document document, TypeSystemSegmentTree validTypeSystemSegmentTree, TypeSystemSegmentTree unstableTypeSystemSegmentTree)
+ {
+ this.document = document;
+ this.validTypeSystemSegmentTree = validTypeSystemSegmentTree;
+ this.unstableTypeSystemSegmentTree = unstableTypeSystemSegmentTree;
+ }
IList<string> ICompletionContextProvider.ConditionalSymbols {
get {
@@ -1031,6 +1318,31 @@ namespace MonoDevelop.CSharp.Completion
currentMember = GetMemberAt (offset);
}
+ public IUnresolvedTypeDefinition GetTypeAt (int offset)
+ {
+ if (unstableTypeSystemSegmentTree == null && validTypeSystemSegmentTree == null)
+ return null;
+ IUnresolvedTypeDefinition type = null;
+ if (unstableTypeSystemSegmentTree != null)
+ type = unstableTypeSystemSegmentTree.GetTypeAt (offset);
+ if (type == null && validTypeSystemSegmentTree != null)
+ type = validTypeSystemSegmentTree.GetTypeAt (offset);
+ return type;
+ }
+
+ public IUnresolvedMember GetMemberAt (int offset)
+ {
+ if (unstableTypeSystemSegmentTree == null && validTypeSystemSegmentTree == null)
+ return null;
+
+ IUnresolvedMember member = null;
+ if (unstableTypeSystemSegmentTree != null)
+ member = unstableTypeSystemSegmentTree.GetMemberAt (offset);
+ if (member == null && validTypeSystemSegmentTree != null)
+ member = validTypeSystemSegmentTree.GetMemberAt (offset);
+ return member;
+ }
+
Tuple<string, TextLocation> ICompletionContextProvider.GetMemberTextToCaret (int caretOffset, IUnresolvedTypeDefinition currentType, IUnresolvedMember currentMember)
{
int startOffset;
@@ -1048,7 +1360,6 @@ namespace MonoDevelop.CSharp.Completion
}
--startOffset;
}
-
return Tuple.Create (caretOffset > startOffset ? document.Editor.GetTextAt (startOffset, caretOffset - startOffset) : "",
(TextLocation)document.Editor.OffsetToLocation (startOffset));
}
@@ -1058,22 +1369,6 @@ namespace MonoDevelop.CSharp.Completion
{
return new CSharpAstResolver (resolver, rootNode, document.ParsedDocument.ParsedFile as CSharpUnresolvedFile);
}
- #endregion
}
-
- public IUnresolvedTypeDefinition GetTypeAt (int offset)
- {
- if (typeSystemSegmentTree == null)
- return null;
- return typeSystemSegmentTree.GetTypeAt (offset);
- }
-
- public IUnresolvedMember GetMemberAt (int offset)
- {
- if (typeSystemSegmentTree == null)
- return null;
- return typeSystemSegmentTree.GetMemberAt (offset);
- }
- #endregion
}
}
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/EventCreationCompletionData.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/EventCreationCompletionData.cs
index fa433a4..9ac73ca 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/EventCreationCompletionData.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/EventCreationCompletionData.cs
@@ -82,7 +82,7 @@ namespace MonoDevelop.CSharp.Completion
editor.Replace (initialOffset, editor.Caret.Offset - initialOffset, this.DisplayText + (AddSemicolon ? ";" : ""));
// Search opening bracket of member
- int pos = callingMember != null ? editor.Document.LocationToOffset (callingMember.BodyRegion.BeginLine, callingMember.BodyRegion.BeginColumn) : initialOffset;
+ int pos = callingMember != null && !callingMember.BodyRegion.Begin.IsEmpty ? editor.Document.LocationToOffset (callingMember.BodyRegion.BeginLine, callingMember.BodyRegion.BeginColumn) : initialOffset;
while (pos < editor.Document.TextLength && editor.Document.GetCharAt (pos) != '{') {
pos++;
}
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/MemberCompletionData.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/MemberCompletionData.cs
index 0aecc87..e44ac80 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/MemberCompletionData.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/MemberCompletionData.cs
@@ -30,7 +30,6 @@ using System.Linq;
using System.Text;
using System.Xml;
using MonoDevelop.Ide.CodeCompletion;
-
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.Gui.Content;
@@ -55,50 +54,48 @@ namespace MonoDevelop.CSharp.Completion
OutputFlags flags;
bool hideExtensionParameter = true;
static CSharpAmbience ambience = new CSharpAmbience ();
-
string completionString;
string displayText;
-
Dictionary<string, CompletionData> overloads;
-
+
Mono.TextEditor.TextEditorData Editor {
get {
return editorCompletion.TextEditorData;
}
}
-
+
MonoDevelop.CSharp.Formatting.CSharpFormattingPolicy Policy {
get {
return editorCompletion.FormattingPolicy;
}
}
-
+
public override string Description {
get {
return "";
}
}
-
+
public override string CompletionText {
get { return completionString; }
set { completionString = value; }
}
-
+
public override string DisplayText {
get {
if (displayText == null) {
- displayText = ambience.GetString (Entity, flags | OutputFlags.HideGenericParameterNames);
+ displayText = ambience.GetString (Entity.SymbolKind == SymbolKind.Constructor ? Entity.DeclaringTypeDefinition : Entity, flags | OutputFlags.HideGenericParameterNames);
}
return displayText;
}
}
-
+
public override IconId Icon {
get {
- return Entity.GetStockIcon ();
+ return (Entity.SymbolKind == SymbolKind.Constructor ? Entity.DeclaringTypeDefinition : Entity).GetStockIcon ();
}
}
-
+
public bool HideExtensionParameter {
get {
return hideExtensionParameter;
@@ -107,13 +104,27 @@ namespace MonoDevelop.CSharp.Completion
hideExtensionParameter = value;
}
}
-
- public bool IsDelegateExpected { get; set; }
+
+ bool isDelegateExpected;
+ public bool IsDelegateExpected {
+ get {
+ return isDelegateExpected || factory != null && factory.Engine.PossibleDelegates.Count > 0;
+ }
+ set {
+ isDelegateExpected = value;
+ }
+ }
ICompilation compilation;
CSharpUnresolvedFile file;
+ CSharpCompletionTextEditorExtension.CompletionDataFactory factory;
+
+ public MemberCompletionData (CSharpCompletionTextEditorExtension.CompletionDataFactory factory, IEntity entity, OutputFlags flags) : this(factory.ext, entity, flags)
+ {
+ this.factory = factory;
+ }
- public MemberCompletionData (CSharpCompletionTextEditorExtension editorCompletion, IEntity entity, OutputFlags flags)
+ public MemberCompletionData (CSharpCompletionTextEditorExtension editorCompletion, IEntity entity, OutputFlags flags)
{
compilation = editorCompletion.UnresolvedFileCompilation;
file = editorCompletion.CSharpUnresolvedFile;
@@ -126,7 +137,7 @@ namespace MonoDevelop.CSharp.Completion
if (m != null && m.IsObsolete ())
DisplayFlags |= DisplayFlags.Obsolete;
}
-
+
public bool SearchBracket (int start, out int pos)
{
pos = -1;
@@ -142,8 +153,8 @@ namespace MonoDevelop.CSharp.Completion
}
return false;
}
-
- bool HasNonMethodMembersWithSameName (IMember member)
+
+ static bool HasNonMethodMembersWithSameName (IMember member)
{
return member.DeclaringType.GetFields ().Cast<INamedElement> ()
.Concat (member.DeclaringType.GetProperties ().Cast<INamedElement> ())
@@ -151,21 +162,40 @@ namespace MonoDevelop.CSharp.Completion
.Concat (member.DeclaringType.GetNestedTypes ().Cast<INamedElement> ())
.Any (e => e.Name == member.Name);
}
-
- bool HasAnyOverloadWithParameters (IMethod method)
+
+ static bool HasAnyOverloadWithParameters (IMethod method)
{
- return method.DeclaringType.GetMethods ().Any (m => m.Parameters.Count > 0);
+ if (method.SymbolKind == SymbolKind.Constructor)
+ return method.DeclaringType.GetConstructors ().Any (m => m.Parameters.Count > 0);
+ return method.DeclaringType.GetMethods ().Any (m => m.Name == method.Name && m.Parameters.Count > 0);
}
-
+
public override void InsertCompletionText (CompletionListWindow window, ref KeyActions ka, Gdk.Key closeChar, char keyChar, Gdk.ModifierType modifier)
{
+ InsertCompletionText (window, ref ka, closeChar, keyChar, modifier, CompletionTextEditorExtension.AddParenthesesAfterCompletion, CompletionTextEditorExtension.AddOpeningOnly);
+ }
+
+ bool IsBracketAlreadyInserted ()
+ {
+ int offset = Editor.Caret.Offset;
+ while (offset < Editor.Length) {
+ char ch = Editor.GetCharAt (offset);
+ if (!char.IsLetterOrDigit (ch) && !char.IsWhiteSpace (ch)) {
+ return ch == '(';
+ }
+ offset++;
+ }
+ return false;
+ }
+
+ public void InsertCompletionText (CompletionListWindow window, ref KeyActions ka, Gdk.Key closeChar, char keyChar, Gdk.ModifierType modifier, bool addParens, bool addOpeningOnly)
+ {
string text = CompletionText;
string partialWord = GetCurrentWord (window);
int skipChars = 0;
bool runParameterCompletionCommand = false;
- if (keyChar == '(' && !IsDelegateExpected && Entity is IMethod && !HasNonMethodMembersWithSameName ((IMember)Entity)) {
-
+ if (addParens && !IsDelegateExpected && Entity is IMethod && !HasNonMethodMembersWithSameName ((IMember)Entity) && !IsBracketAlreadyInserted ()) {
var line = Editor.GetLine (Editor.Caret.Line);
var method = (IMethod)Entity;
var start = window.CodeCompletionContext.TriggerOffset + partialWord.Length + 2;
@@ -185,70 +215,104 @@ namespace MonoDevelop.CSharp.Completion
bool insertSemicolon = false;
if (string.IsNullOrEmpty ((textBefore + textToEnd).Trim ()))
insertSemicolon = true;
-
+ if (Entity.SymbolKind == SymbolKind.Constructor)
+ insertSemicolon = false;
int pos;
- if (SearchBracket (window.CodeCompletionContext.TriggerOffset + partialWord.Length, out pos)) {
- window.CompletionWidget.SetCompletionText (window.CodeCompletionContext, partialWord, text);
- ka |= KeyActions.Ignore;
- int bracketOffset = pos + text.Length - partialWord.Length;
-
- if (CSharpTextEditorIndentation.OnTheFlyFormatting) {
- // correct white space before method call.
- char charBeforeBracket = bracketOffset > 1 ? Editor.GetCharAt (bracketOffset - 2) : '\0';
- if (Policy.BeforeMethodCallParentheses) {
- if (charBeforeBracket != ' ') {
- Editor.Insert (bracketOffset - 1, " ");
- bracketOffset++;
- }
- } else {
- if (char.IsWhiteSpace (charBeforeBracket)) {
- while (bracketOffset > 1 && char.IsWhiteSpace (Editor.GetCharAt (bracketOffset - 2))) {
- Editor.Remove (bracketOffset - 1, 1);
- bracketOffset--;
+// if (SearchBracket (window.CodeCompletionContext.TriggerOffset + partialWord.Length, out pos)) {
+// window.CompletionWidget.SetCompletionText (window.CodeCompletionContext, partialWord, text);
+// ka |= KeyActions.Ignore;
+// int bracketOffset = pos + text.Length - partialWord.Length;
+//
+// if (CSharpTextEditorIndentation.OnTheFlyFormatting) {
+// // correct white space before method call.
+// char charBeforeBracket = bracketOffset > 1 ? Editor.GetCharAt (bracketOffset - 2) : '\0';
+// if (Policy.BeforeMethodCallParentheses) {
+// if (charBeforeBracket != ' ') {
+// Editor.Insert (bracketOffset - 1, " ");
+// bracketOffset++;
+// }
+// } else {
+// if (char.IsWhiteSpace (charBeforeBracket)) {
+// while (bracketOffset > 1 && char.IsWhiteSpace (Editor.GetCharAt (bracketOffset - 2))) {
+// Editor.Remove (bracketOffset - 1, 1);
+// bracketOffset--;
+// }
+// }
+// }
+// }
+//
+// Editor.Caret.Offset = bracketOffset;
+//// Currently broken/needs fine tuning:
+//// if (insertSemicolon && Editor.GetCharAt (bracketOffset - 1) == '(') {
+//// Editor.Insert (bracketOffset + 1, ";");
+//// // Need to reinsert the ')' as skip char because we inserted the ';' after the ')' and skip chars get deleted
+//// // when an insert after the skip char position occur.
+//// Editor.SetSkipChar (bracketOffset, ')');
+//// Editor.SetSkipChar (bracketOffset + 1, ';');
+//// }
+// if (runParameterCompletionCommand)
+// editorCompletion.RunParameterCompletionCommand ();
+// return;
+// }
+ Gdk.Key[] keys = new [] { Gdk.Key.Return, Gdk.Key.Tab, Gdk.Key.space, Gdk.Key.KP_Enter, Gdk.Key.ISO_Enter };
+ if (keys.Contains (closeChar) || keyChar == '.') {
+ if (HasAnyOverloadWithParameters (method)) {
+ if (addOpeningOnly) {
+ text += "(|";
+ skipChars = 0;
+ } else {
+ if (keyChar == '.') {
+ text += "()";
+ skipChars = 0;
+ } else {
+ if (insertSemicolon) {
+ text += "(|);";
+ skipChars = 2;
+ } else {
+ text += "(|)";
+ skipChars = 1;
}
}
}
- }
-
- Editor.Caret.Offset = bracketOffset;
-// Currently broken/needs fine tuning:
-// if (insertSemicolon && Editor.GetCharAt (bracketOffset - 1) == '(') {
-// Editor.Insert (bracketOffset + 1, ";");
-// // Need to reinsert the ')' as skip char because we inserted the ';' after the ')' and skip chars get deleted
-// // when an insert after the skip char position occur.
-// Editor.SetSkipChar (bracketOffset, ')');
-// Editor.SetSkipChar (bracketOffset + 1, ';');
-// }
- if (runParameterCompletionCommand)
- editorCompletion.RunParameterCompletionCommand ();
- return;
- }
-
- if (HasAnyOverloadWithParameters (method)) {
- if (insertSemicolon) {
- text += "(|);";
- skipChars = 2;
+ runParameterCompletionCommand = true;
} else {
- text += "(|)";
- skipChars = 1;
+ if (addOpeningOnly) {
+ text += "(|";
+ skipChars = 0;
+ } else {
+ if (keyChar == '.') {
+ text += "().|";
+ skipChars = 0;
+ } else {
+ if (insertSemicolon) {
+ text += "();|";
+ } else {
+ text += "()|";
+ }
+ }
+ }
}
- runParameterCompletionCommand = true;
- } else {
- if (insertSemicolon) {
- text += "();|";
- } else {
- text += "()|";
+ if (keyChar == '(') {
+ var skipChar = Editor.SkipChars.LastOrDefault ();
+ if (skipChar != null && skipChar.Offset == (window.CodeCompletionContext.TriggerOffset + partialWord.Length) && skipChar.Char == ')')
+ Editor.Remove (skipChar.Offset, 1);
}
}
- if (keyChar == '(') {
- var skipChar = Editor.SkipChars.LastOrDefault ();
- if (skipChar != null && skipChar.Offset == (window.CodeCompletionContext.TriggerOffset + partialWord.Length) && skipChar.Char == ')')
- Editor.Remove (skipChar.Offset, 1);
- }
-
ka |= KeyActions.Ignore;
}
-
+ if ((DisplayFlags & DisplayFlags.NamedArgument) == DisplayFlags.NamedArgument &&
+ (closeChar == Gdk.Key.Tab ||
+ closeChar == Gdk.Key.KP_Tab ||
+ closeChar == Gdk.Key.ISO_Left_Tab ||
+ closeChar == Gdk.Key.Return ||
+ closeChar == Gdk.Key.KP_Enter ||
+ closeChar == Gdk.Key.ISO_Enter)) {
+ if (Policy.AroundAssignmentParentheses)
+ text += " ";
+ text += "=";
+ if (Policy.AroundAssignmentParentheses)
+ text += " ";
+ }
window.CompletionWidget.SetCompletionText (window.CodeCompletionContext, partialWord, text);
int offset = Editor.Caret.Offset;
for (int i = 0; i < skipChars; i++) {
@@ -259,11 +323,11 @@ namespace MonoDevelop.CSharp.Completion
if (runParameterCompletionCommand)
editorCompletion.RunParameterCompletionCommand ();
}
-
+
void SetMember (IEntity entity)
{
this.Entity = entity;
- this.completionString = displayText = entity.Name;
+ this.completionString = displayText = (Entity.SymbolKind == SymbolKind.Constructor ? Entity.DeclaringTypeDefinition : Entity).Name;
}
TypeSystemAstBuilder GetBuilder (ICompilation compilation)
@@ -297,239 +361,244 @@ namespace MonoDevelop.CSharp.Completion
}
public ConversionFlags ConversionFlags { get; set; }
-
#region ConvertEntity
- public string ConvertEntity(IEntity entity)
+ public string ConvertEntity (IEntity entity)
{
if (entity == null)
- throw new ArgumentNullException("entity");
+ throw new ArgumentNullException ("entity");
- StringWriter writer = new StringWriter();
- ConvertEntity(entity, new TextWriterOutputFormatter(writer), FormattingOptionsFactory.CreateMono ());
- return writer.ToString();
+ StringWriter writer = new StringWriter ();
+ ConvertEntity (entity, new TextWriterOutputFormatter (writer), FormattingOptionsFactory.CreateMono ());
+ return writer.ToString ();
}
-
- public void ConvertEntity(IEntity entity, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
+
+ public void ConvertEntity (IEntity entity, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
{
if (entity == null)
- throw new ArgumentNullException("entity");
+ throw new ArgumentNullException ("entity");
if (formatter == null)
- throw new ArgumentNullException("formatter");
+ throw new ArgumentNullException ("formatter");
if (formattingPolicy == null)
- throw new ArgumentNullException("options");
+ throw new ArgumentNullException ("options");
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
- EntityDeclaration node = astBuilder.ConvertEntity(entity);
- PrintModifiers(node.Modifiers, formatter);
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
+ EntityDeclaration node = astBuilder.ConvertEntity (entity);
+ PrintModifiers (node.Modifiers, formatter);
if ((ConversionFlags & ConversionFlags.ShowDefinitionKeyword) == ConversionFlags.ShowDefinitionKeyword) {
if (node is TypeDeclaration) {
switch (((TypeDeclaration)node).ClassType) {
case ClassType.Class:
- formatter.WriteKeyword("class");
+ formatter.WriteKeyword ("class");
break;
case ClassType.Struct:
- formatter.WriteKeyword("struct");
+ formatter.WriteKeyword ("struct");
break;
case ClassType.Interface:
- formatter.WriteKeyword("interface");
+ formatter.WriteKeyword ("interface");
break;
case ClassType.Enum:
- formatter.WriteKeyword("enum");
+ formatter.WriteKeyword ("enum");
break;
default:
- throw new Exception("Invalid value for ClassType");
+ throw new Exception ("Invalid value for ClassType");
}
- formatter.Space();
+ formatter.Space ();
} else if (node is DelegateDeclaration) {
- formatter.WriteKeyword("delegate");
- formatter.Space();
+ formatter.WriteKeyword ("delegate");
+ formatter.Space ();
} else if (node is EventDeclaration) {
- formatter.WriteKeyword("event");
- formatter.Space();
+ formatter.WriteKeyword ("event");
+ formatter.Space ();
}
}
if ((ConversionFlags & ConversionFlags.ShowReturnType) == ConversionFlags.ShowReturnType) {
- var rt = node.GetChildByRole(Roles.Type);
+ var rt = node.GetChildByRole (Roles.Type);
if (!rt.IsNull) {
- rt.AcceptVisitor(new CSharpOutputVisitor(formatter, formattingPolicy));
- formatter.Space();
+ rt.AcceptVisitor (new CSharpOutputVisitor (formatter, formattingPolicy));
+ formatter.Space ();
}
}
if (entity is ITypeDefinition)
- WriteTypeDeclarationName((ITypeDefinition)entity, formatter, formattingPolicy);
+ WriteTypeDeclarationName ((ITypeDefinition)entity, formatter, formattingPolicy);
else
- WriteMemberDeclarationName((IMember)entity, formatter, formattingPolicy);
+ WriteMemberDeclarationName ((IMember)entity, formatter, formattingPolicy);
- if ((ConversionFlags & ConversionFlags.ShowParameterList) == ConversionFlags.ShowParameterList && HasParameters(entity)) {
- formatter.WriteToken(entity.EntityType == EntityType.Indexer ? "[" : "(");
+ if ((ConversionFlags & ConversionFlags.ShowParameterList) == ConversionFlags.ShowParameterList && HasParameters (entity)) {
+ formatter.WriteToken (entity.SymbolKind == SymbolKind.Indexer ? "[" : "(");
bool first = true;
foreach (var param in node.GetChildrenByRole(Roles.Parameter)) {
if (first) {
first = false;
} else {
- formatter.WriteToken(",");
- formatter.Space();
+ formatter.WriteToken (",");
+ formatter.Space ();
}
- param.AcceptVisitor(new CSharpOutputVisitor(formatter, formattingPolicy));
+ param.AcceptVisitor (new CSharpOutputVisitor (formatter, formattingPolicy));
}
- formatter.WriteToken(entity.EntityType == EntityType.Indexer ? "]" : ")");
+ formatter.WriteToken (entity.SymbolKind == SymbolKind.Indexer ? "]" : ")");
}
if ((ConversionFlags & ConversionFlags.ShowBody) == ConversionFlags.ShowBody && !(node is TypeDeclaration)) {
IProperty property = entity as IProperty;
if (property != null) {
- formatter.Space();
- formatter.WriteToken("{");
- formatter.Space();
+ formatter.Space ();
+ formatter.WriteToken ("{");
+ formatter.Space ();
if (property.CanGet) {
- formatter.WriteKeyword("get");
- formatter.WriteToken(";");
- formatter.Space();
+ formatter.WriteKeyword ("get");
+ formatter.WriteToken (";");
+ formatter.Space ();
}
if (property.CanSet) {
- formatter.WriteKeyword("set");
- formatter.WriteToken(";");
- formatter.Space();
+ formatter.WriteKeyword ("set");
+ formatter.WriteToken (";");
+ formatter.Space ();
}
- formatter.WriteToken("}");
+ formatter.WriteToken ("}");
} else {
- formatter.WriteToken(";");
+ formatter.WriteToken (";");
}
}
}
-
- bool HasParameters(IEntity e)
+
+ bool HasParameters (IEntity e)
{
- switch (e.EntityType) {
- case EntityType.TypeDefinition:
+ switch (e.SymbolKind) {
+ case SymbolKind.TypeDefinition:
return ((ITypeDefinition)e).Kind == TypeKind.Delegate;
- case EntityType.Indexer:
- case EntityType.Method:
- case EntityType.Operator:
- case EntityType.Constructor:
- case EntityType.Destructor:
+ case SymbolKind.Indexer:
+ case SymbolKind.Method:
+ case SymbolKind.Operator:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
return true;
default:
return false;
}
}
-
- TypeSystemAstBuilder CreateAstBuilder()
+ public string ConvertConstantValue (object constantValue)
+ {
+ if (constantValue == null)
+ return "null";
+ return constantValue.ToString ();
+ }
+
+ TypeSystemAstBuilder CreateAstBuilder ()
{
return builder;
}
-
- void WriteTypeDeclarationName(ITypeDefinition typeDef, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
+
+ void WriteTypeDeclarationName (ITypeDefinition typeDef, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
{
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
if (typeDef.DeclaringTypeDefinition != null) {
- WriteTypeDeclarationName(typeDef.DeclaringTypeDefinition, formatter, formattingPolicy);
- formatter.WriteToken(".");
+ WriteTypeDeclarationName (typeDef.DeclaringTypeDefinition, formatter, formattingPolicy);
+ formatter.WriteToken (".");
} else if ((ConversionFlags & ConversionFlags.UseFullyQualifiedTypeNames) == ConversionFlags.UseFullyQualifiedTypeNames) {
- formatter.WriteIdentifier(typeDef.Namespace);
- formatter.WriteToken(".");
+ formatter.WriteIdentifier (typeDef.Namespace);
+ formatter.WriteToken (".");
}
- formatter.WriteIdentifier(typeDef.Name);
+ formatter.WriteIdentifier (typeDef.Name);
if ((ConversionFlags & ConversionFlags.ShowTypeParameterList) == ConversionFlags.ShowTypeParameterList) {
- var outputVisitor = new CSharpOutputVisitor(formatter, formattingPolicy);
- outputVisitor.WriteTypeParameters(astBuilder.ConvertEntity(typeDef).GetChildrenByRole(Roles.TypeParameter));
+ var outputVisitor = new CSharpOutputVisitor (formatter, formattingPolicy);
+ outputVisitor.WriteTypeParameters (astBuilder.ConvertEntity (typeDef).GetChildrenByRole (Roles.TypeParameter));
}
}
-
- void WriteMemberDeclarationName(IMember member, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
+
+ void WriteMemberDeclarationName (IMember member, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
{
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
if ((ConversionFlags & ConversionFlags.ShowDeclaringType) == ConversionFlags.ShowDeclaringType) {
- ConvertType(member.DeclaringType, formatter, formattingPolicy);
- formatter.WriteToken(".");
+ ConvertType (member.DeclaringType, formatter, formattingPolicy);
+ formatter.WriteToken (".");
}
- switch (member.EntityType) {
- case EntityType.Indexer:
- formatter.WriteKeyword("this");
+ switch (member.SymbolKind) {
+ case SymbolKind.Indexer:
+ formatter.WriteKeyword ("this");
break;
- case EntityType.Constructor:
- formatter.WriteIdentifier(member.DeclaringType.Name);
+ case SymbolKind.Constructor:
+ formatter.WriteIdentifier (member.DeclaringType.Name);
break;
- case EntityType.Destructor:
- formatter.WriteToken("~");
- formatter.WriteIdentifier(member.DeclaringType.Name);
+ case SymbolKind.Destructor:
+ formatter.WriteToken ("~");
+ formatter.WriteIdentifier (member.DeclaringType.Name);
break;
- case EntityType.Operator:
+ case SymbolKind.Operator:
switch (member.Name) {
case "op_Implicit":
- formatter.WriteKeyword("implicit");
- formatter.Space();
- formatter.WriteKeyword("operator");
- formatter.Space();
- ConvertType(member.ReturnType, formatter, formattingPolicy);
+ formatter.WriteKeyword ("implicit");
+ formatter.Space ();
+ formatter.WriteKeyword ("operator");
+ formatter.Space ();
+ ConvertType (member.ReturnType, formatter, formattingPolicy);
break;
case "op_Explicit":
- formatter.WriteKeyword("explicit");
- formatter.Space();
- formatter.WriteKeyword("operator");
- formatter.Space();
- ConvertType(member.ReturnType, formatter, formattingPolicy);
+ formatter.WriteKeyword ("explicit");
+ formatter.Space ();
+ formatter.WriteKeyword ("operator");
+ formatter.Space ();
+ ConvertType (member.ReturnType, formatter, formattingPolicy);
break;
default:
- formatter.WriteKeyword("operator");
- formatter.Space();
- var operatorType = OperatorDeclaration.GetOperatorType(member.Name);
+ formatter.WriteKeyword ("operator");
+ formatter.Space ();
+ var operatorType = OperatorDeclaration.GetOperatorType (member.Name);
if (operatorType.HasValue)
- formatter.WriteToken(OperatorDeclaration.GetToken(operatorType.Value));
+ formatter.WriteToken (OperatorDeclaration.GetToken (operatorType.Value));
else
- formatter.WriteIdentifier(member.Name);
+ formatter.WriteIdentifier (member.Name);
break;
}
break;
default:
- formatter.WriteIdentifier(member.Name);
+ formatter.WriteIdentifier (member.Name);
break;
}
- if ((ConversionFlags & ConversionFlags.ShowTypeParameterList) == ConversionFlags.ShowTypeParameterList && member.EntityType == EntityType.Method) {
- var outputVisitor = new CSharpOutputVisitor(formatter, formattingPolicy);
- outputVisitor.WriteTypeParameters(astBuilder.ConvertEntity(member).GetChildrenByRole(Roles.TypeParameter));
+ if ((ConversionFlags & ConversionFlags.ShowTypeParameterList) == ConversionFlags.ShowTypeParameterList && member.SymbolKind == SymbolKind.Method) {
+ var outputVisitor = new CSharpOutputVisitor (formatter, formattingPolicy);
+ outputVisitor.WriteTypeParameters (astBuilder.ConvertEntity (member).GetChildrenByRole (Roles.TypeParameter));
}
}
-
- void PrintModifiers(Modifiers modifiers, IOutputFormatter formatter)
+
+ void PrintModifiers (Modifiers modifiers, IOutputFormatter formatter)
{
foreach (var m in CSharpModifierToken.AllModifiers) {
if ((modifiers & m) == m) {
- formatter.WriteKeyword(CSharpModifierToken.GetModifierName(m));
- formatter.Space();
+ formatter.WriteKeyword (CSharpModifierToken.GetModifierName (m));
+ formatter.Space ();
}
}
}
#endregion
- public string ConvertVariable(IVariable v)
+ public string ConvertVariable (IVariable v)
{
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
- AstNode astNode = astBuilder.ConvertVariable(v);
- return astNode.ToString().TrimEnd(';', '\r', '\n');
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
+ AstNode astNode = astBuilder.ConvertVariable (v);
+ return astNode.ToString ().TrimEnd (';', '\r', '\n');
}
-
- public string ConvertType(IType type)
+
+ public string ConvertType (IType type)
{
if (type == null)
- throw new ArgumentNullException("type");
+ throw new ArgumentNullException ("type");
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
- AstType astType = astBuilder.ConvertType(type);
- return astType.ToString();
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
+ AstType astType = astBuilder.ConvertType (type);
+ return astType.ToString ();
}
-
- public void ConvertType(IType type, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
+
+ public void ConvertType (IType type, IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy)
{
- TypeSystemAstBuilder astBuilder = CreateAstBuilder();
- AstType astType = astBuilder.ConvertType(type);
- astType.AcceptVisitor(new CSharpOutputVisitor(formatter, formattingPolicy));
+ TypeSystemAstBuilder astBuilder = CreateAstBuilder ();
+ AstType astType = astBuilder.ConvertType (type);
+ astType.AcceptVisitor (new CSharpOutputVisitor (formatter, formattingPolicy));
}
-
- public string WrapComment(string comment)
+
+ public string WrapComment (string comment)
{
return "// " + comment;
}
@@ -577,7 +646,7 @@ namespace MonoDevelop.CSharp.Completion
var type = entity as IType;
var def = type.GetDefinition ();
if (def != null) {
- if (!string.IsNullOrEmpty(def.ParentAssembly.AssemblyName)) {
+ if (!string.IsNullOrEmpty (def.ParentAssembly.AssemblyName)) {
var project = def.GetSourceProject ();
if (project != null) {
var relPath = FileService.AbsoluteToRelativePath (project.BaseDirectory, def.Region.FileName);
@@ -623,7 +692,7 @@ namespace MonoDevelop.CSharp.Completion
var def = type.GetDefinition ();
if (def != null) {
- if (createFooter && !string.IsNullOrEmpty(def.ParentAssembly.AssemblyName))
+ if (createFooter && !string.IsNullOrEmpty (def.ParentAssembly.AssemblyName))
tooltipInfo.FooterMarkup = "<small> From " + AmbienceService.EscapeText (def.ParentAssembly.AssemblyName) + "</small>";
tooltipInfo.SummaryMarkup = AmbienceService.GetSummaryMarkup (def) ?? "";
}
@@ -634,8 +703,6 @@ namespace MonoDevelop.CSharp.Completion
{
return CreateTooltipInformation (compilation, file, editorCompletion.TextEditorData, editorCompletion.FormattingPolicy, Entity, smartWrap);
}
-
-
#region IOverloadedCompletionData implementation
class OverloadSorter : IComparer<ICompletionData>
@@ -643,7 +710,7 @@ namespace MonoDevelop.CSharp.Completion
public OverloadSorter ()
{
}
-
+
public int Compare (ICompletionData x, ICompletionData y)
{
var mx = ((MemberCompletionData)x).Entity as IMember;
@@ -662,10 +729,10 @@ namespace MonoDevelop.CSharp.Completion
string sx = mx.ReflectionName;// ambience.GetString (mx, flags);
string sy = my.ReflectionName;// ambience.GetString (my, flags);
result = sx.Length.CompareTo (sy.Length);
- return result == 0? string.Compare (sx, sy) : result;
+ return result == 0 ? string.Compare (sx, sy) : result;
}
}
-
+
public override IEnumerable<ICompletionData> OverloadedData {
get {
if (overloads == null)
@@ -677,16 +744,16 @@ namespace MonoDevelop.CSharp.Completion
return sorted;
}
}
-
+
public override bool HasOverloads {
get { return overloads != null && overloads.Count > 0; }
}
-
+
public override void AddOverload (ICSharpCode.NRefactory.Completion.ICompletionData data)
{
- AddOverload ((MemberCompletionData) data);
+ AddOverload ((MemberCompletionData)data);
}
-
+
public void AddOverload (MemberCompletionData overload)
{
if (overloads == null)
@@ -701,7 +768,7 @@ namespace MonoDevelop.CSharp.Completion
string MemberId = (overload.Entity as IMember).GetIdString ();
if (MemberId != (this.Entity as IMember).GetIdString () && !overloads.ContainsKey (MemberId)) {
- overloads[MemberId] = overload;
+ overloads [MemberId] = overload;
//if any of the overloads is obsolete, we should not mark the item obsolete
if (!(overload.Entity as IMember).IsObsolete ())
@@ -709,7 +776,6 @@ namespace MonoDevelop.CSharp.Completion
}
}
}
-
#endregion
#region IEntityCompletionData implementation
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanel.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanel.cs
index 358a0ff..73a7794 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanel.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanel.cs
@@ -30,6 +30,7 @@ using MonoDevelop.Projects.Text;
using System.Xml;
using MonoDevelop.Ide.Gui.Dialogs;
using System;
+using MonoDevelop.Ide.Gui.Content;
namespace MonoDevelop.CSharp.Formatting
{
@@ -50,7 +51,12 @@ namespace MonoDevelop.CSharp.Formatting
protected override void LoadFrom (CSharpFormattingPolicy policy)
{
- panel.Policy = policy.Clone ();
+ panel.SetPolicy (policy.Clone (), GetCurrentOtherPolicy<TextStylePolicy> ());
+ }
+
+ public override void PanelSelected ()
+ {
+ panel.SetPolicy (GetCurrentOtherPolicy<TextStylePolicy> ());
}
protected override CSharpFormattingPolicy GetPolicy ()
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanelWidget.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanelWidget.cs
index 010bf1b..ed8089a 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanelWidget.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicyPanelWidget.cs
@@ -29,6 +29,9 @@ using MonoDevelop.Core;
using MonoDevelop.Ide;
using System.Collections.Generic;
using MonoDevelop.Ide.CodeFormatting;
+using MonoDevelop.Ide.Gui.Content;
+
+
namespace MonoDevelop.CSharp.Formatting
{
[System.ComponentModel.ToolboxItem(true)]
@@ -49,17 +52,28 @@ namespace Example {
}
}
}";
+ TextStylePolicy textStylePolicy;
CSharpFormattingPolicy policy;
public CSharpFormattingPolicy Policy {
get {
return policy;
}
- set {
- policy = value;
- FormatSample ();
- }
}
-
+
+
+ public void SetPolicy (CSharpFormattingPolicy cSharpFormattingPolicy, TextStylePolicy textStylePolicy)
+ {
+ this.policy = cSharpFormattingPolicy;
+ this.textStylePolicy = textStylePolicy;
+ FormatSample ();
+ }
+
+ public void SetPolicy (TextStylePolicy textStylePolicy)
+ {
+ this.textStylePolicy = textStylePolicy;
+ FormatSample ();
+ }
+
public CSharpFormattingPolicyPanelWidget ()
{
this.Build ();
@@ -81,7 +95,12 @@ namespace Example {
public void FormatSample ()
{
var formatter = new CSharpFormatter ();
- texteditor.Document.Text = formatter.FormatText (policy, null, CSharpFormatter.MimeType, example, 0, example.Length);
+ if (textStylePolicy != null) {
+ texteditor.Options.IndentationSize = textStylePolicy.IndentWidth;
+ texteditor.Options.TabSize = textStylePolicy.TabWidth;
+ texteditor.Options.TabsToSpaces = textStylePolicy.TabsToSpaces;
+ }
+ texteditor.Document.Text = formatter.FormatText (policy, textStylePolicy, CSharpFormatter.MimeType, example, 0, example.Length);
}
void HandleButtonEditClicked (object sender, EventArgs e)
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs
index 50fa5cb..a204871 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs
@@ -210,7 +210,7 @@ namespace MonoDevelop.CSharp.Formatting
{
if (e.RemovalLength != 1)
return;
- stateTracker.UpdateEngine (e.Offset + e.InsertionLength + 1);
+ stateTracker.UpdateEngine (Math.Min (textEditorData.Document.TextLength, e.Offset + e.InsertionLength + 1));
if (wasInVerbatimString && !stateTracker.Engine.IsInsideVerbatimString) {
textEditorData.Document.TextReplacing -= HandleTextReplacing;
textEditorData.Document.TextReplaced -= HandleTextReplaced;;
@@ -468,7 +468,7 @@ namespace MonoDevelop.CSharp.Formatting
if (keyChar == '>' && stateTracker.Engine.IsInsideDocLineComment) {
var location = Editor.Caret.Location;
string lineText = Editor.GetLineText (Editor.Caret.Line);
- int startIndex = Math.Min (location.Column - 1, lineText.Length - 1);
+ int startIndex = Math.Min (location.Column - 2, lineText.Length - 1);
while (startIndex >= 0 && lineText [startIndex] != '<') {
--startIndex;
if (lineText [startIndex] == '/') {
@@ -478,11 +478,11 @@ namespace MonoDevelop.CSharp.Formatting
}
}
if (startIndex >= 0) {
- int endIndex = startIndex;
- while (endIndex <= location.Column && endIndex < lineText.Length && !Char.IsWhiteSpace (lineText [endIndex])) {
+ int endIndex = startIndex + 1;
+ while (endIndex <= location.Column -1 && endIndex < lineText.Length && Char.IsLetter (lineText [endIndex])) {
endIndex++;
}
- string tag = endIndex - startIndex - 1 > 0 ? lineText.Substring (startIndex + 1, endIndex - startIndex - 2) : null;
+ string tag = endIndex - startIndex > 0 ? lineText.Substring (startIndex + 1, endIndex - startIndex - 1) : null;
if (!string.IsNullOrEmpty (tag) && CSharpCompletionEngine.CommentTags.Any (t => t == tag)) {
Editor.Document.Insert (Editor.Caret.Offset, "</" + tag + ">", AnchorMovementType.BeforeInsertion);
}
@@ -879,11 +879,13 @@ namespace MonoDevelop.CSharp.Formatting
return false;
//check that the newline command actually inserted a newline
textEditorData.EnsureCaretIsNotVirtual ();
- string nextLine = textEditorData.Document.GetTextAt (textEditorData.Document.GetLine (lineNumber + 1)).TrimStart ();
+ var nextLineSegment = textEditorData.Document.GetLine (lineNumber + 1);
+ string nextLine = nextLineSegment != null ? textEditorData.Document.GetTextAt (nextLineSegment).TrimStart () : "";
if (trimmedPreviousLine.Length > "///".Length || nextLine.StartsWith ("///", StringComparison.Ordinal)) {
- var insertionPoint = line.Offset + line.GetIndentation (textEditorData.Document).Length;
- textEditorData.Insert (insertionPoint, "/// ");
+ var insertionPoint = textEditorData.Caret.Offset;
+ int inserted = textEditorData.Insert (insertionPoint, "/// ");
+ textEditorData.Caret.Offset = insertionPoint + inserted;
return true;
}
//multi-line comments
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs
index a75515e..d696a48 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs
@@ -207,8 +207,8 @@ namespace MonoDevelop.CSharp.Formatting
int startDelta = 1;
if (exact) {
text = data.Editor.Text;
- var seg = ext.typeSystemSegmentTree.GetMemberSegmentAt (startOffset);
- var seg2 = ext.typeSystemSegmentTree.GetMemberSegmentAt (endOffset);
+ var seg = ext.GetMemberSegmentAt (startOffset);
+ var seg2 = ext.GetMemberSegmentAt (endOffset);
if (seg != null && seg == seg2) {
var member = seg.Entity;
if (member == null || member.Region.IsEmpty || member.BodyRegion.End.IsEmpty)
@@ -226,7 +226,7 @@ namespace MonoDevelop.CSharp.Formatting
formattingRegion = new DomRegion (data.Editor.OffsetToLocation (startOffset), data.Editor.OffsetToLocation (endOffset));
}
} else {
- var seg = ext.typeSystemSegmentTree.GetMemberSegmentAt (startOffset - 1);
+ var seg = ext.GetMemberSegmentAt (startOffset - 1);
if (seg == null) {
return;
}
@@ -257,7 +257,7 @@ namespace MonoDevelop.CSharp.Formatting
data.Editor.Replace (translatedOffset, replaceLength, insertText);
}, (replaceOffset, replaceLength, insertText) => {
int translatedOffset = realTextDelta + replaceOffset;
- if (translatedOffset < 0 || translatedOffset + replaceLength > data.Editor.Length)
+ if (translatedOffset < 0 || translatedOffset + replaceLength > data.Editor.Length || replaceLength < 0)
return true;
return data.Editor.GetTextAt (translatedOffset, replaceLength) == insertText;
});
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
index 805a205..eec461e 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs
@@ -50,6 +50,7 @@ using MonoDevelop.Core;
using ICSharpCode.NRefactory.CSharp.Analysis;
using ICSharpCode.NRefactory;
using MonoDevelop.Refactoring;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CSharp.Highlighting
@@ -138,14 +139,16 @@ namespace MonoDevelop.CSharp.Highlighting
if (guiDocument != null && SemanticHighlightingEnabled) {
var parsedDocument = guiDocument.ParsedDocument;
if (parsedDocument != null) {
- unit = parsedDocument.GetAst<SyntaxTree> ();
- parsedFile = parsedDocument.ParsedFile as CSharpUnresolvedFile;
if (guiDocument.Project != null && guiDocument.IsCompileableInProject) {
src = new CancellationTokenSource ();
var newResolverTask = guiDocument.GetSharedResolver ();
var cancellationToken = src.Token;
System.Threading.Tasks.Task.Factory.StartNew (delegate {
var newResolver = newResolverTask.Result;
+ if (newResolver == null)
+ return;
+ unit = newResolver.RootNode as SyntaxTree;
+ parsedFile = newResolver.UnresolvedFile;
var visitor = new QuickTaskVisitor (newResolver, cancellationToken);
try {
unit.AcceptVisitor (visitor);
@@ -244,6 +247,8 @@ namespace MonoDevelop.CSharp.Highlighting
parameterModifierColor = "Keyword(Parameter)";
inactiveCodeColor = "Excluded Code";
syntaxErrorColor = "Syntax Error";
+
+ stringFormatItemColor = "String Format Items";
}
protected override void Colorize(TextLocation start, TextLocation end, string color)
@@ -385,7 +390,7 @@ namespace MonoDevelop.CSharp.Highlighting
if (_commentRule == null)
return;
var joinedTasks = string.Join ("", CommentTag.SpecialCommentTags.Select (t => t.Tag));
- _commentRule.Delimiter = new string ("&()<>{}[]~!%^*-+=|\\#/:;\"' ,\t.?".Where (c => joinedTasks.IndexOf (c) < 0).ToArray ());
+ _commentRule.SetDelimiter (new string ("&()<>{}[]~!%^*-+=|\\#/:;\"' ,\t.?".Where (c => joinedTasks.IndexOf (c) < 0).ToArray ()));
_commentRule.Keywords = new[] {
new Keywords {
Color = "Comment Tag",
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
index 0e77b36..7b2a408 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
@@ -27,25 +27,36 @@ using System;
using MonoDevelop.Ide.Gui.Content;
using Mono.TextEditor;
using System.Collections.Generic;
-using Gdk;
-using MonoDevelop.CSharp.Resolver;
-using MonoDevelop.Projects.Text;
using System.Linq;
using MonoDevelop.Core;
-using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.CSharp.Resolver;
using MonoDevelop.Ide.FindInFiles;
-using MonoDevelop.SourceEditor;
using ICSharpCode.NRefactory.Semantics;
using ICSharpCode.NRefactory.CSharp;
-using ICSharpCode.NRefactory.CSharp.TypeSystem;
using MonoDevelop.SourceEditor.QuickTasks;
namespace MonoDevelop.CSharp.Highlighting
{
- public class HighlightUsagesExtension : TextEditorExtension, IUsageProvider
+ class HighlightUsagesExtension : TextEditorExtension, IUsageProvider
{
- public readonly List<TextSegment> UsagesSegments = new List<TextSegment> ();
+ internal class UsageSegment
+ {
+ public readonly ReferenceUsageType UsageType;
+ public readonly TextSegment TextSegment;
+
+ public UsageSegment (ReferenceUsageType usageType, int offset, int length)
+ {
+ this.UsageType = usageType;
+ this.TextSegment = new TextSegment (offset, length);
+ }
+
+ public static implicit operator TextSegment (UsageSegment usage)
+ {
+ return usage.TextSegment;
+ }
+ }
+
+ public readonly List<UsageSegment> UsagesSegments = new List<UsageSegment> ();
CSharpSyntaxMode syntaxMode;
TextEditorData textEditorData;
@@ -88,7 +99,7 @@ namespace MonoDevelop.CSharp.Highlighting
RemoveTimer ();
}
- uint popupTimer = 0;
+ uint popupTimer;
public bool IsTimerOnQueue {
get {
@@ -178,19 +189,18 @@ namespace MonoDevelop.CSharp.Highlighting
offset < sr.Offset && sr.EndOffset < endOffset)) {
editor.TextViewMargin.AlphaBlendSearchResults = alphaBlend = true;
}
- UsagesSegments.Add (new TextSegment (offset, endOffset - offset));
- marker.Usages.Add (new TextSegment (offset, endOffset - offset));
+ UsagesSegments.Add (new UsageSegment (r.ReferenceUsageType, offset, endOffset - offset));
+ marker.Usages.Add (new UsageSegment (r.ReferenceUsageType, offset, endOffset - offset));
lineNumbers.Add (r.Region.BeginLine);
}
}
foreach (int line in lineNumbers)
textEditorData.Document.CommitLineUpdate (line);
- UsagesSegments.Sort ((x, y) => x.Offset.CompareTo (y.Offset));
+ UsagesSegments.Sort ((x, y) => x.TextSegment.Offset.CompareTo (y.TextSegment.Offset));
}
OnUsagesUpdated (EventArgs.Empty);
}
-
static readonly List<MemberReference> emptyList = new List<MemberReference> ();
IEnumerable<MemberReference> GetReferences (ResolveResult resolveResult)
{
@@ -246,62 +256,68 @@ namespace MonoDevelop.CSharp.Highlighting
}
- public class UsageMarker : TextLineMarker, IBackgroundMarker
+ public class UsageMarker : TextLineMarker
{
- List<TextSegment> usages = new List<TextSegment> ();
+ List<UsageSegment> usages = new List<UsageSegment> ();
- public List<TextSegment> Usages {
+ public List<UsageSegment> Usages {
get { return this.usages; }
}
public bool Contains (int offset)
{
- return usages.Any (u => u.Offset <= offset && offset <= u.EndOffset);
+ return usages.Any (u => u.TextSegment.Offset <= offset && offset <= u.TextSegment.EndOffset);
}
-
- public bool DrawBackground (TextEditor editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg)
+
+ public override bool DrawBackground (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
- drawBg = false;
- if (selectionStart >= 0 || editor.CurrentMode is TextLinkEditMode || editor.TextViewMargin.SearchResultMatchCount > 0)
- return true;
+ if (metrics.SelectionStart >= 0 || editor.CurrentMode is TextLinkEditMode || editor.TextViewMargin.SearchResultMatchCount > 0)
+ return false;
foreach (var usage in Usages) {
- int markerStart = usage.Offset;
- int markerEnd = usage.EndOffset;
+ int markerStart = usage.TextSegment.Offset;
+ int markerEnd = usage.TextSegment.EndOffset;
- if (markerEnd < startOffset || markerStart > endOffset)
- return true;
+ if (markerEnd < metrics.TextStartOffset || markerStart > metrics.TextEndOffset)
+ return false;
double @from;
double to;
- if (markerStart < startOffset && endOffset < markerEnd) {
- @from = startXPos;
- to = endXPos;
+ if (markerStart < metrics.TextStartOffset && metrics.TextEndOffset < markerEnd) {
+ @from = metrics.TextRenderStartPosition;
+ to = metrics.TextRenderEndPosition;
} else {
- int start = startOffset < markerStart ? markerStart : startOffset;
- int end = endOffset < markerEnd ? endOffset : markerEnd;
+ int start = metrics.TextStartOffset < markerStart ? markerStart : metrics.TextStartOffset;
+ int end = metrics.TextEndOffset < markerEnd ? metrics.TextEndOffset : markerEnd;
uint curIndex = 0, byteIndex = 0;
- TextViewMargin.TranslateToUTF8Index (layout.LineChars, (uint)(start - startOffset), ref curIndex, ref byteIndex);
+ TextViewMargin.TranslateToUTF8Index (metrics.Layout.LineChars, (uint)(start - metrics.TextStartOffset), ref curIndex, ref byteIndex);
- int x_pos = layout.Layout.IndexToPos ((int)byteIndex).X;
+ int x_pos = metrics.Layout.Layout.IndexToPos ((int)byteIndex).X;
- @from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+ @from = metrics.TextRenderStartPosition + (int)(x_pos / Pango.Scale.PangoScale);
- TextViewMargin.TranslateToUTF8Index (layout.LineChars, (uint)(end - startOffset), ref curIndex, ref byteIndex);
- x_pos = layout.Layout.IndexToPos ((int)byteIndex).X;
+ TextViewMargin.TranslateToUTF8Index (metrics.Layout.LineChars, (uint)(end - metrics.TextStartOffset), ref curIndex, ref byteIndex);
+ x_pos = metrics.Layout.Layout.IndexToPos ((int)byteIndex).X;
- to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+ to = metrics.TextRenderStartPosition + (int)(x_pos / Pango.Scale.PangoScale);
}
@from = System.Math.Max (@from, editor.TextViewMargin.XOffset);
to = System.Math.Max (to, editor.TextViewMargin.XOffset);
if (@from < to) {
- cr.Color = (HslColor)editor.ColorStyle.UsagesRectangle.SecondColor;
+ Mono.TextEditor.Highlighting.AmbientColor colorStyle;
+ if ((usage.UsageType & ReferenceUsageType.Write) == ReferenceUsageType.Write) {
+ colorStyle = editor.ColorStyle.ChangingUsagesRectangle;
+ } else {
+ colorStyle = editor.ColorStyle.UsagesRectangle;
+ }
+
+ cr.Color = (HslColor)colorStyle.SecondColor;
cr.Rectangle (@from + 1, y + 1, to - @from - 1, editor.LineHeight - 2);
cr.Fill ();
- cr.Color = (HslColor)editor.ColorStyle.UsagesRectangle.Color;
+ cr.Color = (HslColor)colorStyle.Color;
cr.Rectangle (@from + 0.5, y + 0.5, to - @from, editor.LineHeight - 1);
cr.Stroke ();
}
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/MoveToUsagesHandler.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/MoveToUsagesHandler.cs
index 45f093e..547ce73 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/MoveToUsagesHandler.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/MoveToUsagesHandler.cs
@@ -37,7 +37,7 @@ namespace MonoDevelop.CSharp.Highlighting
NextUsage
}
- public class MoveToPrevUsageHandler : CommandHandler
+ class MoveToPrevUsageHandler : CommandHandler
{
protected override void Update (CommandInfo info)
{
@@ -65,13 +65,13 @@ namespace MonoDevelop.CSharp.Highlighting
var caretOffset = doc.Editor.Caret.Offset;
for (int i = 0; i < ext.UsagesSegments.Count; i++) {
- if (ext.UsagesSegments [i].Contains (caretOffset))
+ if (ext.UsagesSegments [i].TextSegment.Contains (caretOffset))
MoveToNextUsageHandler.MoveToSegment (doc, ext.UsagesSegments [(i + ext.UsagesSegments.Count - 1) % ext.UsagesSegments.Count]);
}
}
}
- public class MoveToNextUsageHandler : CommandHandler
+ class MoveToNextUsageHandler : CommandHandler
{
protected override void Update (CommandInfo info)
{
@@ -97,7 +97,7 @@ namespace MonoDevelop.CSharp.Highlighting
var caretOffset = doc.Editor.Caret.Offset;
for (int i = 0; i < ext.UsagesSegments.Count; i++) {
- if (ext.UsagesSegments [i].Contains (caretOffset))
+ if (ext.UsagesSegments [i].TextSegment.Contains (caretOffset))
MoveToNextUsageHandler.MoveToSegment (doc, ext.UsagesSegments [(i + 1) % ext.UsagesSegments.Count]);
}
}
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs
index 7ba4106..fe726c8 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs
@@ -141,7 +141,7 @@ namespace MonoDevelop.CSharp.Parser
static bool LastToken(AstNode arg)
{
- return !(arg is NewLineNode || arg is WhitespaceNode || arg is ICSharpCode.NRefactory.CSharp.Comment);
+ return !(arg.Role == Roles.NewLine || arg.Role == Roles.Whitespace || arg.Role == Roles.Comment);
}
public override object VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration, object data)
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumAction.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumAction.cs
new file mode 100644
index 0000000..a97081d
--- /dev/null
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumAction.cs
@@ -0,0 +1,508 @@
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using ICSharpCode.NRefactory.PatternMatching;
+using MonoDevelop.CodeActions;
+using ICSharpCode.NRefactory;
+using System.Threading;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.CSharp.Refactoring;
+using ICSharpCode.Decompiler.ILAst;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.CSharp.Refactoring.CodeActions
+{
+ /// <summary>
+ /// Generates an enumeration from const fields
+ /// </summary>
+ public class ConvertToEnumAction : MonoDevelop.CodeActions.CodeActionProvider
+ {
+ public override IEnumerable<MonoDevelop.CodeActions.CodeAction> GetActions(MonoDevelop.Ide.Gui.Document document, object refactoringContext, TextLocation loc, CancellationToken cancellationToken)
+ {
+ MDRefactoringContext context = (MDRefactoringContext)refactoringContext;
+
+ if (context.IsInvalid) {
+ yield break;
+ }
+
+ VariableInitializer currentVariable = context.GetNode<VariableInitializer>();
+ if (currentVariable == null) {
+ yield break;
+ }
+
+ FieldDeclaration currentField = currentVariable.Parent as FieldDeclaration;
+ if (currentField == null) {
+ yield break;
+ }
+
+ if (!currentField.Modifiers.HasFlag(Modifiers.Const)) {
+ yield break;
+ }
+
+ PrimitiveType baseType = TypeToIntegerPrimitive(context, currentField.ReturnType);
+ if (baseType == null) {
+ //Can't make enums of these types
+ yield break;
+ }
+
+ TypeDeclaration containerType = currentVariable.GetParent<TypeDeclaration>();
+
+ //Get all the fields/variables that the enum can possibly cover
+ //Don't check the name just yet. That'll come later.
+
+ var constFields = containerType.Members.OfType<FieldDeclaration>()
+ .Where(field => field.GetParent<TypeDeclaration>() == containerType && field.HasModifier(Modifiers.Const)).ToList();
+
+ var constVariables = constFields.SelectMany(field => field.Variables).ToList();
+
+ //Now, it's time to check the name of the selected variable
+ //We'll use this to search for prefixes later
+
+ var names = constVariables.Select(variable => variable.Name).ToList();
+ string currentName = currentVariable.Name;
+
+ //Now, find the common name prefixes
+ //If the variable is called 'A_B_C_D', then 'A', 'A_B' and 'A_B_C' are
+ //the potentially available prefixes.
+ //Note that the common prefixes are the ones that more than one variable
+ //has.
+ //Each prefix has an associated action.
+
+ foreach (var prefix in GetCommonPrefixes (currentName, names)) {
+ string title = string.Format(GettextCatalog.GetString("Create enum '{0}'"), prefix);
+
+ yield return new DefaultCodeAction(title, (newDocument, newLoc) => {
+ PrepareToRunAction (prefix, baseType, containerType, constVariables, cancellationToken, newDocument, newLoc);
+ });
+ }
+ }
+
+ void PrepareToRunAction (string prefix, PrimitiveType baseType, TypeDeclaration containerType, List<VariableInitializer> variables, CancellationToken cancellationToken, MonoDevelop.Ide.Gui.Document newDocument, TextLocation newLoc)
+ {
+ List<string> names = variables.Select(variable => variable.Name).ToList();
+ Dictionary<string, string> newNames = names.ToDictionary(originalName => originalName, originalName => {
+ if (!originalName.StartsWith(prefix)) {
+ return originalName;
+ }
+ int startName = prefix.Length;
+ while (startName < originalName.Length - 1 && originalName[startName] == '_') {
+ ++startName;
+ }
+ return originalName.Substring(startName);
+ });
+
+ MDRefactoringContext context = new MDRefactoringContext (newDocument, newLoc, cancellationToken);
+
+ string enumName;
+ using (var dialog = new ConvertToEnumDialog (prefix, variables, variables.Where(variable => variable.Name.StartsWith(prefix, StringComparison.InvariantCulture)
+ && VariableHasSpecifiedIntegerType(context, variable, baseType)).ToList(), newNames))
+ {
+ if (dialog.Run (/*MonoDevelop.Ide.IdeApp.Workbench.RootWindow*/) != Xwt.Command.Ok) {
+ return;
+ }
+ enumName = dialog.EnumName;
+ variables = dialog.SelectedVariables;
+ newNames = dialog.NewNames;
+ }
+
+ Script script = context.StartScript ();
+
+ RunAction (context, baseType, enumName, newNames, containerType, variables, script);
+
+ }
+
+ void RunAction(RefactoringContext context, AstType baseType, string enumName, Dictionary<string, string> newNames, TypeDeclaration containerTypeDeclaration, List<VariableInitializer> variables, Script script)
+ {
+ var names = variables.Select (variable => variable.Name).ToList ();
+ var containerType = (context.Resolve(containerTypeDeclaration) as TypeResolveResult).Type;
+
+ var fields = containerTypeDeclaration.Members.OfType<FieldDeclaration>().Where(field => field.Modifiers.HasFlag(Modifiers.Const)).ToList();
+ List<VariableInitializer> variableUnitsToRemove = new List<VariableInitializer>(variables);
+ List<FieldDeclaration> fieldsToRemove = new List<FieldDeclaration>();
+
+ foreach (var field in fields) {
+ if (field.Variables.All(variableUnitsToRemove.Contains)) {
+ fieldsToRemove.Add(field);
+
+ variableUnitsToRemove.RemoveAll(field.Variables.Contains);
+ }
+ }
+
+ var generatedEnum = CreateEnumDeclaration(baseType, enumName, variables, names, newNames);
+
+ AstNode root = GetRootNodeOf(containerTypeDeclaration);
+ var newRoot = root.Clone();
+
+ FixIdentifiers(context, enumName, variables, containerType, baseType, names, newNames, root, newRoot);
+ foreach (var member in root.Descendants.OfType<MemberReferenceExpression>().Where (member => names.Contains (member.MemberName))) {
+ if (variables.Any(variable => variable.Descendants.Contains(member))) {
+ //Already handled
+ continue;
+ }
+
+ var resolvedIdentifier = context.Resolve(member) as MemberResolveResult;
+ if (resolvedIdentifier == null) {
+ continue;
+ }
+
+ if (resolvedIdentifier.Type.Equals(containerType)) {
+ continue;
+ }
+
+ var equivalentMember = GetEquivalentNodeFor(root, newRoot, member);
+ MemberReferenceExpression memberToReplace = (MemberReferenceExpression)equivalentMember;
+
+ var replacement = CreateReplacementMemberReference(enumName, baseType, newNames, memberToReplace);
+ memberToReplace.ReplaceWith(replacement);
+ }
+
+ //Fix the file
+ InsertAfterEquivalent(root, newRoot, containerTypeDeclaration.LBraceToken, generatedEnum, Roles.TypeMemberRole);
+
+ foreach (var variableToRemove in variableUnitsToRemove) {
+ GetEquivalentNodeFor(root, newRoot, variableToRemove).Remove();
+ }
+ foreach (var fieldToRemove in fieldsToRemove) {
+ GetEquivalentNodeFor(root, newRoot, fieldToRemove).Remove();
+ }
+
+ script.Replace(root, newRoot);
+
+ ReplaceVariableReferences(context, root, baseType, enumName, script, newNames, variables);
+ }
+
+ static void ReplaceVariableReferences(RefactoringContext context, AstNode root, AstType baseType, string enumName, Script script, Dictionary<string, string> newNames, IEnumerable<VariableInitializer> variables)
+ {
+ var resolveResults = variables.Select(variable => (MemberResolveResult)context.Resolve(variable));
+ var resolvedFields = resolveResults.Select(resolveResult => resolveResult.Member);
+ script.DoGlobalOperationOn(resolvedFields, (newCtx, newScript, foundNodes) => {
+ foreach (var foundNode in foundNodes) {
+ TypeDeclaration newContainerType = foundNode.GetParent<TypeDeclaration>();
+ if (root.Descendants.OfType<TypeDeclaration>().Select(type => ((TypeResolveResult)context.Resolve(type)).Type.FullName).ToList().Contains(((TypeResolveResult)newCtx.Resolve(newContainerType)).Type.FullName)) {
+ //This file has already been fixed
+ return;
+ }
+ var identifierExpr = foundNode as IdentifierExpression;
+ if (identifierExpr != null) {
+ newScript.Replace(identifierExpr, CreateIdentifierReplacement(enumName, baseType, newNames, identifierExpr));
+ continue;
+ }
+ var memberRef = foundNode as MemberReferenceExpression;
+ if (memberRef != null) {
+ var replacement = CreateReplacementMemberReference(enumName, baseType, newNames, memberRef);
+ newScript.Replace(memberRef, replacement);
+ }
+ }
+ });
+ }
+
+ TypeDeclaration CreateEnumDeclaration(AstType baseType, string enumName, List<VariableInitializer> variables, List<string> names, Dictionary<string, string> newNames)
+ {
+ TypeDeclaration generatedEnum = new TypeDeclaration();
+ generatedEnum.ClassType = ClassType.Enum;
+ generatedEnum.BaseTypes.Add(baseType.Clone());
+ generatedEnum.Name = enumName;
+ generatedEnum.Modifiers = GetCombinedModifier((Modifiers)variables.Select(variable => ((FieldDeclaration)variable.Parent).Modifiers).Aggregate(0, (prev, newModifier) => prev | (int)newModifier));
+ foreach (var variable in variables) {
+ var generatedMember = new EnumMemberDeclaration();
+ generatedMember.Name = newNames[variable.Name];
+ var value = variable.Initializer.Clone();
+ foreach (var identifier in value.DescendantsAndSelf.OfType<IdentifierExpression>().Where(identifier => names.Contains(identifier.Identifier))) {
+ var newIdentifier = new IdentifierExpression(newNames[identifier.Identifier]);
+ if (identifier == value) {
+ value = newIdentifier;
+ break;
+ }
+ identifier.ReplaceWith(newIdentifier);
+ }
+ generatedMember.Initializer = value;
+ generatedEnum.Members.Add(generatedMember);
+ }
+ return generatedEnum;
+ }
+
+ /// <summary>
+ /// Determines whether the initialized variable has the specified primitive integer type
+ /// </summary>
+ /// <returns><c>true</c> if the initialized variable has the specified type; otherwise, <c>false</c>.</returns>
+ /// <param name="context">The context to use.</param>
+ /// <param name="variable">The variable initializer to check.</param>
+ /// <param name="type">The type to compare with.</param>
+ bool VariableHasSpecifiedIntegerType(RefactoringContext context, VariableInitializer variable, AstType type)
+ {
+ return TypeToIntegerPrimitive(context, variable.GetParent<FieldDeclaration>().ReturnType).Match(type).Success;
+ }
+
+ static Dictionary<string, PrimitiveType> primitiveTypes = new Dictionary<string, PrimitiveType>();
+
+ static ConvertToEnumAction()
+ {
+ primitiveTypes.Add(typeof(byte).FullName, new PrimitiveType("byte"));
+ primitiveTypes.Add(typeof(sbyte).FullName, new PrimitiveType("sbyte"));
+
+ primitiveTypes.Add(typeof(short).FullName, new PrimitiveType("short"));
+ primitiveTypes.Add(typeof(int).FullName, new PrimitiveType("int"));
+ primitiveTypes.Add(typeof(long).FullName, new PrimitiveType("long"));
+
+ primitiveTypes.Add(typeof(ushort).FullName, new PrimitiveType("ushort"));
+ primitiveTypes.Add(typeof(uint).FullName, new PrimitiveType("uint"));
+ primitiveTypes.Add(typeof(ulong).FullName, new PrimitiveType("ulong"));
+ }
+
+ /// <summary>
+ /// Gets a PrimitiveType instance from an AstType.
+ /// Only returns integer types (and never the char type)
+ /// </summary>
+ /// <returns>The integer primitive.</returns>
+ /// <param name="context">The context to use.</param>
+ /// <param name="type">The AstType to get the primitive from.</param>
+ PrimitiveType TypeToIntegerPrimitive(RefactoringContext context, AstType type)
+ {
+ var resolvedType = context.ResolveType(type) as DefaultResolvedTypeDefinition;
+
+ PrimitiveType primitiveType;
+ if (!primitiveTypes.TryGetValue(resolvedType.FullName, out primitiveType)) {
+ return null;
+ }
+
+ return primitiveType;
+ }
+
+ static Expression CreateReplacementMemberReference(string enumName, AstType baseType, Dictionary<string, string> newNames, MemberReferenceExpression memberToReplace)
+ {
+ return new ParenthesizedExpression(new CastExpression(baseType.Clone(), new MemberReferenceExpression(new MemberReferenceExpression(memberToReplace.Target.Clone(), enumName), newNames [memberToReplace.MemberName])));
+ }
+
+ void FixIdentifiers(RefactoringContext context, string enumName, List<VariableInitializer> variables, IType containerType, AstType baseType, List<string> names, Dictionary<string, string> newNames, AstNode root, AstNode newRoot)
+ {
+ foreach (var identifier in root.Descendants.OfType<IdentifierExpression> ().Where (identifier => names.Contains (identifier.Identifier))) {
+ if (variables.Any(variable => variable.Descendants.Contains(identifier))) {
+ //Already handled
+ continue;
+ }
+ var resolvedIdentifier = context.Resolve(identifier) as MemberResolveResult;
+ if (resolvedIdentifier == null) {
+ continue;
+ }
+ if (resolvedIdentifier.Type.Equals(containerType)) {
+ continue;
+ }
+ var replacement = CreateIdentifierReplacement(enumName, baseType, newNames, identifier);
+ GetEquivalentNodeFor(root, newRoot, identifier).ReplaceWith(replacement);
+ }
+ }
+
+ static ParenthesizedExpression CreateIdentifierReplacement(string enumName, AstType baseType, Dictionary<string, string> newNames, IdentifierExpression identifier)
+ {
+ var replacement = new ParenthesizedExpression(new CastExpression(baseType.Clone(), new MemberReferenceExpression(new IdentifierExpression(enumName), newNames [identifier.Identifier])));
+ return replacement;
+ }
+
+ /// <summary>
+ /// Finds the corresponding node in another ("new") AST.
+ /// Assumes entities have not been renamed and no statements have been removed.
+ /// </summary>
+ /// <returns>The equivalent node in the new AST.</returns>
+ /// <param name="root">The root of the first ("old") AST.</param>
+ /// <param name="newRoot">The root of the new AST.</param>
+ /// <param name="nodeToFind">Node (from the old AST) to find in the new one.</param>
+ AstNode GetEquivalentNodeFor(AstNode root, AstNode newRoot, AstNode nodeToFind)
+ {
+ if (nodeToFind == null) {
+ throw new ArgumentNullException("nodeToFind");
+ }
+
+ if (nodeToFind.Parent != root) {
+ AstNode foundRoot = GetEquivalentNodeFor(root, newRoot, nodeToFind.Parent);
+ if (foundRoot == null) {
+ //If the equivalent of the parent does not exist in the new AST,
+ //then neither does this node.
+ return null;
+ }
+ newRoot = foundRoot;
+ root = nodeToFind.Parent;
+ }
+
+ //At this point, the roots are the parents of the nodes to check
+ //root is the parent of the nodeToFind, and newRoot is the parent of the node to return
+
+ var block = root as BlockStatement;
+ if (block != null && nodeToFind.Role == BlockStatement.StatementRole) {
+ //This could be a problem if statements were removed in the new AST,
+ //but fortunately that's not the problem we're trying to solve.
+ return ((BlockStatement)newRoot).Statements.ElementAt(block.TakeWhile(statement => statement != nodeToFind).Count());
+ }
+
+ //First, we'll narrow down the search - the equivalent node *always* has the same type and role as nodeToFind
+ //The Role check will help e.g. in binary expressions (where there is a 'Left' and a 'Right' role)
+ var candidates = newRoot.Children.Where(child => child.GetType() == nodeToFind.GetType() && child.Role == nodeToFind.Role);
+ var entity = nodeToFind as EntityDeclaration;
+ if (entity != null) {
+ var field = nodeToFind as FieldDeclaration;
+ if (field != null) {
+ //Fields have to be treated separately because fields have no names
+ candidates = candidates.Where(candidate => IsEquivalentField((FieldDeclaration) candidate, field));
+ }
+ else {
+ //Some entities can be distinguished by name.
+ candidates = candidates.Where(candidate => ((EntityDeclaration)candidate).Name == entity.Name);
+
+ var method = nodeToFind as MethodDeclaration;
+ if (method != null) {
+ //Methods, however, can be overloaded - so their names aren't enough.
+ candidates = candidates.Where(candidate => CheckIfMethodsHaveSameParameters((MethodDeclaration) candidate, method));
+ }
+ }
+ }
+
+ var ns = nodeToFind as NamespaceDeclaration;
+ if (ns != null) {
+ candidates = candidates.Where(candidate => ((NamespaceDeclaration)candidate).Name == ns.Name).ToList();
+ if (candidates.Count() > 1) {
+ throw new NotImplementedException("Two or more namespace declarations with the same name are siblings. This case is not currently supported by this action.");
+ }
+ }
+
+ var initializer = nodeToFind as VariableInitializer;
+ if (initializer != null) {
+ candidates = candidates.Where(candidate => ((VariableInitializer)candidate).Name == initializer.Name);
+ }
+
+ var equivalentNode = candidates.SingleOrDefault();
+ return equivalentNode;
+ }
+
+ bool IsEquivalentField(FieldDeclaration field1, FieldDeclaration field2) {
+ return field1.Variables.Any(variable1 => {
+ return field2.Variables.Any(variable2 => variable1.Name == variable2.Name);
+ });
+ }
+
+ bool CheckIfMethodsHaveSameParameters(MethodDeclaration methodDeclaration, MethodDeclaration comparedMethod)
+ {
+ if (methodDeclaration.Parameters.Count != comparedMethod.Parameters.Count) {
+ return false;
+ }
+
+ ParameterDeclaration param1 = methodDeclaration.Parameters.FirstOrDefault();
+ ParameterDeclaration param2 = comparedMethod.Parameters.FirstOrDefault();
+
+ while (param1 != null) {
+ //If the names or initializers are different, this will still match.
+ //But if the type or order changes, this will complain
+ if (!param1.Type.Match(param2.Type).Success) {
+ return false;
+ }
+
+ param1 = (ParameterDeclaration) param1.GetNextSibling(node => node is ParameterDeclaration);
+ param2 = (ParameterDeclaration) param2.GetNextSibling(node => node is ParameterDeclaration);
+ }
+
+ return true;
+ }
+
+ void InsertAfterEquivalent<T>(AstNode root, AstNode newRoot, AstNode prevNode, T newNode, Role<T> role)
+ where T : AstNode
+ {
+ AstNode equivalentPrevNode = GetEquivalentNodeFor(root, newRoot, prevNode);
+ equivalentPrevNode.Parent.InsertChildAfter<T>(equivalentPrevNode, newNode, role);
+ }
+
+ /// <summary>
+ /// Gets the least permissive access modifier that still allows access to
+ /// fields or methods with the specified modifiers.
+ /// This will ignore all modifiers unrelated to access - such as const and readonly
+ /// </summary>
+ /// <returns>A modifier that is at least as permissive as all provided modifiers.</returns>
+ /// <param name="modifiers">The modifiers to use.</param>
+ Modifiers GetCombinedModifier(Modifiers modifiers)
+ {
+ if (modifiers.HasFlag(Modifiers.Public))
+ return Modifiers.Public;
+
+ Modifiers combinedModifier = 0;
+ if (modifiers.HasFlag(Modifiers.Protected)) {
+ combinedModifier |= Modifiers.Protected;
+ }
+ if (modifiers.HasFlag(Modifiers.Internal)) {
+ combinedModifier |= Modifiers.Internal;
+ }
+
+ //No modifier if the fields are all private.
+ return combinedModifier;
+ }
+
+ /// <summary>
+ /// Gets all prefixes that more than one name have.
+ /// </summary>
+ /// <returns>The common prefixes.</returns>
+ /// <param name="currentName">The name to use.</param>
+ /// <param name="names">The names to check.</param>
+ IEnumerable<string> GetCommonPrefixes(string currentName, IEnumerable<string> names)
+ {
+ //Find the indexes that 'split' words in the variable name
+ var boundariesForCurrentWord = GetWordsBoundaries(currentName);
+
+ //Get the candidate prefixes
+ List<string> proposedPrefixes = boundariesForCurrentWord.Select(boundary => currentName.Substring(0, boundary)).ToList();
+
+ //Return only the prefixes that more than one variable has.
+ return proposedPrefixes.Where(prefix => names.Count(name => name.StartsWith(prefix, StringComparison.InvariantCulture)) > 1);
+ }
+
+ List<int> GetWordsBoundaries(string name)
+ {
+ List<int> foundBoundaries = new List<int>();
+ for (int i = 1; i < name.Length - 1; ++i) {
+ char chr = name [i];
+ if (chr == '_') {
+ foundBoundaries.Add(i);
+ continue;
+ }
+
+ if (char.IsUpper(chr) && char.IsLower(name [i - 1])) {
+ foundBoundaries.Add(i);
+ continue;
+ }
+ }
+
+ return foundBoundaries;
+ }
+
+ AstNode GetRootNodeOf(AstNode node)
+ {
+ while (node.Parent != null) {
+ node = node.Parent;
+ }
+
+ return node;
+ }
+ }
+}
+
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumDialog.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumDialog.cs
new file mode 100644
index 0000000..0beedc4
--- /dev/null
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/Actions/ConvertToEnumDialog.cs
@@ -0,0 +1,122 @@
+//
+// ConvertToEnumDialog.cs
+//
+// Author:
+// Luís Reis <luiscubal at gmail.com>
+//
+// Copyright (c) 2013 Luís Reis
+//
+// 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.Linq;
+using MonoDevelop.Core;
+using System.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp;
+
+namespace MonoDevelop.CSharp.Refactoring.CodeActions
+{
+ public class ConvertToEnumDialog : Xwt.Dialog
+ {
+ Xwt.TextEntry enumNameEntry;
+ Xwt.ListView variableList;
+ Xwt.ListStore variableStore;
+ Xwt.DataField<bool> enabledField;
+ Xwt.ListViewColumn enabledColumn;
+ Xwt.DataField<string> oldNameField;
+ Xwt.ListViewColumn oldNameColumn;
+ Xwt.DataField<string> newNameField;
+ Xwt.ListViewColumn newNameColumn;
+ List<VariableInitializer> variables;
+
+ public ConvertToEnumDialog(string proposedEnumName, List<VariableInitializer> variables, List<VariableInitializer> defaultActiveVariables, Dictionary<string, string> newNames) {
+ this.variables = variables;
+
+ Title = GettextCatalog.GetString("Convert fields to enumeration");
+
+ Xwt.VBox vbox = new Xwt.VBox ();
+
+ vbox.PackStart(new Xwt.Label(GettextCatalog.GetString("Name of enum")));
+
+ enumNameEntry = new Xwt.TextEntry ();
+ enumNameEntry.Text = proposedEnumName;
+ vbox.PackStart (enumNameEntry);
+
+ vbox.PackStart (new Xwt.Label (GettextCatalog.GetString ("Variables to include")));
+
+ variableList = new Xwt.ListView ();
+ enabledField = new Xwt.DataField<bool> ();
+ oldNameField = new Xwt.DataField<string> ();
+ newNameField = new Xwt.DataField<string> ();
+
+ variableStore = new Xwt.ListStore (enabledField, oldNameField, newNameField);
+ variableList.DataSource = variableStore;
+
+ enabledColumn = new Xwt.ListViewColumn (GettextCatalog.GetString ("Included"), new Xwt.CheckBoxCellView(enabledField) { Editable = true });
+ variableList.Columns.Add (enabledColumn);
+ oldNameColumn = new Xwt.ListViewColumn(GettextCatalog.GetString("Field name"), new Xwt.TextCellView(oldNameField) { Editable = false });
+ variableList.Columns.Add (oldNameColumn);
+ newNameColumn = new Xwt.ListViewColumn(GettextCatalog.GetString("Enum name"), new Xwt.TextCellView(newNameField) { Editable = true, });
+ variableList.Columns.Add (newNameColumn);
+
+ for (int i = 0; i < variables.Count; ++i) {
+ var variable = variables[i];
+
+ variableStore.AddRow ();
+ variableStore.SetValue (i, enabledField, defaultActiveVariables.Contains(variable));
+ variableStore.SetValue (i, oldNameField, variable.Name);
+
+ variableStore.SetValue (i, newNameField, newNames [variable.Name]);
+ }
+
+ vbox.PackStart (variableList, true, true);
+
+ vbox.PackStart (new Xwt.Label (GettextCatalog.GetString ("Warning: This may take a while...")));
+
+ Content = vbox;
+
+ Buttons.Add (new Xwt.DialogButton(Xwt.Command.Ok));
+ Buttons.Add (new Xwt.DialogButton(Xwt.Command.Cancel));
+ }
+
+ public string EnumName {
+ get { return enumNameEntry.Text; }
+ }
+
+ public List<VariableInitializer> SelectedVariables
+ {
+ get {
+ return variables.Where((variable, idx) => variableStore.GetValue<bool>(idx, enabledField)).ToList();
+ }
+ }
+
+ public Dictionary<string, string> NewNames
+ {
+ get {
+ var newNames = new Dictionary<string, string> ();
+
+ for (int i = 0; i < variableStore.RowCount; ++i) {
+ newNames[variableStore.GetValue<string>(i, oldNameField)] = variableStore.GetValue<string>(i, newNameField);
+ }
+
+ return newNames;
+ }
+ }
+ }
+}
+
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs
index cb348c2..48168b3 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringScript.cs
@@ -257,69 +257,51 @@ namespace MonoDevelop.CSharp.Refactoring.CodeActions
DisposeOnClose ();
}
- public override void Rename (IEntity entity, string name)
+ public override void Rename (ISymbol symbol, string name)
{
- RenameRefactoring.Rename (entity, name);
+ if (symbol is IEntity)
+ RenameRefactoring.Rename ((IEntity)symbol, name);
+ if (symbol is IVariable)
+ RenameRefactoring.RenameVariable ((IVariable)symbol, name);
+ if (symbol is INamespace)
+ RenameRefactoring.RenameNamespace ((INamespace)symbol, name);
+ if (symbol is ITypeParameter)
+ RenameRefactoring.RenameTypeParameter ((ITypeParameter)symbol, name);
}
- public override void Rename (IVariable variable, string name)
+ public override void DoGlobalOperationOn (IEnumerable<IEntity> entities, Action<RefactoringContext, Script, IEnumerable<AstNode>> callback, string operationName = null)
{
- RenameRefactoring.RenameVariable (variable, name);
- }
+ using (var monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor (operationName ?? GettextCatalog.GetString ("Performing refactoring task..."), null)) {
+ var col = entities.SelectMany (entity => ReferenceFinder.FindReferences (entity, true, monitor)).OfType<CSharpReferenceFinder.CSharpMemberReference> ().GroupBy(reference => reference.FileName);
- public override void Rename (INamespace ns, string name)
- {
- RenameRefactoring.RenameNamespace (ns, name);
- }
+ foreach (var r in col) {
+ string filename = r.Key;
- public override void RenameTypeParameter (IType typeParameter, string name = null)
- {
- RenameRefactoring.RenameTypeParameter ((ITypeParameter)typeParameter, name);
- }
+ bool isOpen;
+ System.Text.Encoding encoding;
+ bool hadBom;
- public override void DoGlobalOperationOn (IEntity entity, Action<RefactoringContext, Script, AstNode> callback, string operationName = null)
- {
- using (var monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor (operationName ?? GettextCatalog.GetString ("Performing refactoring task..."), null)) {
- var col = ReferenceFinder.FindReferences (entity, true, monitor);
+ var data = TextFileProvider.Instance.GetTextEditorData (filename, out hadBom, out encoding, out isOpen);
- string oldFileName = null;
- MDRefactoringContext ctx = null;
- MDRefactoringScript script = null;
- TextEditorData data = null;
- bool hadBom = false;
- System.Text.Encoding encoding = null;
- bool isOpen = true;
+ var firstReference = r.First ();
- foreach (var r in col) {
- var memberRef = r as CSharpReferenceFinder.CSharpMemberReference;
- if (memberRef == null)
- continue;
+ var project = firstReference.Project;
- if (oldFileName != memberRef.FileName) {
- if (oldFileName != null && !isOpen) {
- script.Dispose ();
- Mono.TextEditor.Utils.TextFileUtility.WriteText (oldFileName, data.Text, encoding, hadBom);
- }
+ ParsedDocument parsedDocument;
+ using (var reader = new StreamReader (data.OpenStream ()))
+ parsedDocument = new MonoDevelop.CSharp.Parser.TypeSystemParser ().Parse (true, filename, reader, project);
- data = TextFileProvider.Instance.GetTextEditorData (memberRef.FileName, out hadBom, out encoding, out isOpen);
- var project = memberRef.Project;
+ var resolver = new CSharpAstResolver (TypeSystemService.GetCompilation (project), firstReference.SyntaxTree, parsedDocument.ParsedFile as CSharpUnresolvedFile);
- ParsedDocument parsedDocument;
- using (var reader = new StreamReader (data.OpenStream ()))
- parsedDocument = new MonoDevelop.CSharp.Parser.TypeSystemParser ().Parse (true, memberRef.FileName, reader, project);
- var resolver = new CSharpAstResolver (TypeSystemService.GetCompilation (project), memberRef.SyntaxTree, parsedDocument.ParsedFile as CSharpUnresolvedFile);
+ var ctx = new MDRefactoringContext (project as DotNetProject, data, parsedDocument, resolver, firstReference.AstNode.StartLocation, this.context.CancellationToken);
+ var script = new MDRefactoringScript (ctx, FormattingOptions);
- ctx = new MDRefactoringContext (project as DotNetProject, data, parsedDocument, resolver, memberRef.AstNode.StartLocation, this.context.CancellationToken);
- script = new MDRefactoringScript (ctx, FormattingOptions);
- oldFileName = memberRef.FileName;
- }
+ callback (ctx, script, r.Select (reference => reference.AstNode));
- callback (ctx, script, memberRef.AstNode);
- }
-
- if (oldFileName != null && !isOpen) {
- script.Dispose ();
- Mono.TextEditor.Utils.TextFileUtility.WriteText (oldFileName, data.Text, encoding, hadBom);
+ if (!isOpen) {
+ script.Dispose ();
+ Mono.TextEditor.Utils.TextFileUtility.WriteText (filename, data.Text, encoding, hadBom);
+ }
}
}
}
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
index 45a2b42..e2f29dd 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
@@ -671,7 +671,7 @@ namespace MonoDevelop.CSharp.Refactoring
// foreach (var type in options.ImplementingType.BaseTypes) {
// if (type.Kind == TypeKind.Interface)
// continue;
-// if (type.Members.Any (m => m.Name == member.Name && member.EntityType == m.EntityType /* && DomMethod.ParameterListEquals (member.Parameters, m.Parameters)*/ )) {
+// if (type.Members.Any (m => m.Name == member.Name && member.SymbolKind == m.SymbolKind /* && DomMethod.ParameterListEquals (member.Parameters, m.Parameters)*/ )) {
// isFromInterface = false;
// break;
// }
@@ -720,7 +720,7 @@ namespace MonoDevelop.CSharp.Refactoring
} else {
AppendIndent (result);
bodyStartOffset = result.Length;
- if (property.EntityType == EntityType.Indexer) {
+ if (property.SymbolKind == SymbolKind.Indexer) {
result.Append ("return base[");
if (property.Parameters.Count > 0)
result.Append (CSharpAmbience.FilterName (property.Parameters.First ().Name));
@@ -754,7 +754,7 @@ namespace MonoDevelop.CSharp.Refactoring
} else {
AppendIndent (result);
bodyStartOffset = result.Length;
- if (property.EntityType == EntityType.Indexer) {
+ if (property.SymbolKind == SymbolKind.Indexer) {
result.Append ("base[");
if (property.Parameters.Count > 0)
result.Append (CSharpAmbience.FilterName (property.Parameters.First ().Name));
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpReferenceFinder.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpReferenceFinder.cs
index f1c2b90..ce08a78 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpReferenceFinder.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpReferenceFinder.cs
@@ -143,7 +143,7 @@ namespace MonoDevelop.CSharp.Refactoring
if (node is NamespaceDeclaration) {
var nsd = ((NamespaceDeclaration)node);
- node = nsd.Identifiers.LastOrDefault (n => n.Name == memberName) ?? nsd.Identifiers.FirstOrDefault ();
+ node = nsd.NamespaceName;
if (node == null)
return null;
}
@@ -175,8 +175,45 @@ namespace MonoDevelop.CSharp.Refactoring
var region = new DomRegion (fileName, node.StartLocation, node.EndLocation);
- var length = node is PrimitiveType ? keywordName.Length : node.EndLocation.Column - node.StartLocation.Column;
- return new CSharpMemberReference (project, originalNode, syntaxTree, valid, region, editor.LocationToOffset (region.Begin), length);
+ var length = node is PrimitiveType ? keywordName.Length : node.EndLocation.Column - node.StartLocation.Column;
+
+ var reference = new CSharpMemberReference (project, originalNode, syntaxTree, valid, region, editor.LocationToOffset (region.Begin), length);
+
+ reference.ReferenceUsageType = GetUsage (originalNode);
+ return reference;
+ }
+
+ // same logic than the extract method analyzation, unfortunately it's not reusable in this context
+ // we need to do it bottom up here.
+ ReferenceUsageType GetUsage (AstNode node)
+ {
+ if (node.Parent is UnaryOperatorExpression) {
+ var unaryOperatorExpression = (UnaryOperatorExpression)node.Parent;
+ if (unaryOperatorExpression.Operator == UnaryOperatorType.Increment ||
+ unaryOperatorExpression.Operator == UnaryOperatorType.Decrement ||
+ unaryOperatorExpression.Operator == UnaryOperatorType.PostIncrement ||
+ unaryOperatorExpression.Operator == UnaryOperatorType.PostDecrement) {
+ return ReferenceUsageType.ReadWrite;
+ }
+ } else if (node.Parent is DirectionExpression) {
+ var de = (DirectionExpression)node.Parent;
+ if (de.FieldDirection == FieldDirection.Ref)
+ return ReferenceUsageType.ReadWrite;
+ if (de.FieldDirection == FieldDirection.Out)
+ return ReferenceUsageType.Write;
+ } else if (node.Parent is AssignmentExpression) {
+ var ae = (AssignmentExpression)node.Parent;
+ if (ae.Left == node)
+ return ReferenceUsageType.Write;
+ } else if (node is VariableInitializer) {
+ return ReferenceUsageType.Write;
+ } else if (node is ParameterDeclaration) {
+ return ReferenceUsageType.Write;
+ } else if (node.Parent is ForeachStatement) {
+ if (node.Role == Roles.Identifier)
+ return ReferenceUsageType.Write;
+ }
+ return ReferenceUsageType.Read;
}
public class CSharpMemberReference : MemberReference
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.Tooltips/LanguageItemTooltipProvider.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.Tooltips/LanguageItemTooltipProvider.cs
index 94a2b58..b85e4fd 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp.Tooltips/LanguageItemTooltipProvider.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.Tooltips/LanguageItemTooltipProvider.cs
@@ -126,6 +126,8 @@ namespace MonoDevelop.SourceEditor
public void Dispose ()
{
DestroyLastTooltipWindow ();
+ lastNode = null;
+ lastResult = null;
}
#endregion
@@ -232,6 +234,12 @@ namespace MonoDevelop.SourceEditor
sig.BreakLineAfterReturnType = false;
return sig.GetKeywordTooltip ("void", null);
}
+ if (data.Node is NullReferenceExpression) {
+ var resolver = (doc.ParsedDocument.ParsedFile as CSharpUnresolvedFile).GetResolver (doc.Compilation, doc.Editor.Caret.Location);
+ var sig = new SignatureMarkupCreator (resolver, doc.GetFormattingPolicy ().CreateOptions ());
+ sig.BreakLineAfterReturnType = false;
+ return sig.GetKeywordTooltip ("null", null);
+ }
if (result is UnknownIdentifierResolveResult) {
return new TooltipInformation () {
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp.UnitTests/UnitTestTextEditorExtension.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp.UnitTests/UnitTestTextEditorExtension.cs
new file mode 100644
index 0000000..7aa365d
--- /dev/null
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp.UnitTests/UnitTestTextEditorExtension.cs
@@ -0,0 +1,503 @@
+//
+// UnitTestTextEditorExtension.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 MonoDevelop.Ide.Gui.Content;
+using ICSharpCode.NRefactory.CSharp;
+using MonoDevelop.Refactoring;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Threading;
+using System.Linq;
+using Mono.TextEditor;
+using MonoDevelop.NUnit;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Tasks;
+using MonoDevelop.Ide;
+using MonoDevelop.Components.Docking;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Components.Commands;
+using Gdk;
+using Gtk;
+using System.Text;
+using MonoDevelop.AnalysisCore;
+
+namespace MonoDevelop.CSharp
+{
+ class UnitTestTextEditorExtension : TextEditorExtension
+ {
+ public override void Initialize ()
+ {
+ base.Initialize ();
+ Document.DocumentParsed += HandleDocumentParsed;
+ }
+
+ public override void Dispose ()
+ {
+ RemoveHandler ();
+ Document.DocumentParsed -= HandleDocumentParsed;
+ base.Dispose ();
+ }
+
+ CancellationTokenSource src = new CancellationTokenSource ();
+
+ void HandleDocumentParsed (object sender, EventArgs e)
+ {
+ if (!AnalysisOptions.EnableUnitTestEditorIntegration)
+ return;
+ src.Cancel ();
+ src = new CancellationTokenSource ();
+ var token = src.Token;
+ ThreadPool.QueueUserWorkItem (delegate {
+ var resolver = document.GetSharedResolver ();
+ if (resolver.Result == null)
+ return;
+ var visitor = new NUnitVisitor (resolver.Result);
+ try {
+ visitor.VisitSyntaxTree (document.ParsedDocument.GetAst<SyntaxTree> ());
+ } catch (Exception ex) {
+ LoggingService.LogError ("Exception while analyzing ast for unit tests.", ex);
+ return;
+ }
+ if (token.IsCancellationRequested)
+ return;
+ Application.Invoke (delegate {
+ if (document.Editor.Parent.ActionMargin.IsVisible ^ (visitor.FoundTests.Count > 0))
+ document.Editor.Parent.QueueDraw ();
+ document.Editor.Parent.ActionMargin.IsVisible = visitor.FoundTests.Count > 0;
+
+ foreach (var oldMarker in currentMarker)
+ document.Editor.Document.RemoveMarker (oldMarker);
+
+ foreach (var foundTest in visitor.FoundTests) {
+ if (token.IsCancellationRequested)
+ return;
+ var unitTestMarker = new UnitTestMarker (foundTest, document);
+ currentMarker.Add (unitTestMarker);
+ document.Editor.Document.AddMarker (foundTest.LineNumber, unitTestMarker);
+ }
+ });
+ });
+ }
+
+
+ static uint timeoutHandler;
+
+ static void RemoveHandler ()
+ {
+ if (timeoutHandler != 0) {
+ GLib.Source.Remove (timeoutHandler);
+ timeoutHandler = 0;
+ }
+ }
+
+ List<UnitTestMarker> currentMarker = new List<UnitTestMarker>();
+
+ class UnitTestMarker : MarginMarker
+ {
+ readonly NUnitVisitor.UnitTest unitTest;
+ readonly MonoDevelop.Ide.Gui.Document doc;
+
+ public UnitTestMarker(NUnitVisitor.UnitTest unitTest, MonoDevelop.Ide.Gui.Document doc)
+ {
+ this.unitTest = unitTest;
+ this.doc = doc;
+ }
+
+ public override bool CanDrawForeground (Margin margin)
+ {
+ return margin is ActionMargin;
+ }
+
+ public override void InformMouseHover (TextEditor editor, Margin margin, MarginMouseEventArgs args)
+ {
+ string toolTip;
+ if (unitTest.IsFixture) {
+ if (isFailed) {
+ toolTip = GettextCatalog.GetString ("NUnit Fixture failed (click to run)");
+ if (!string.IsNullOrEmpty (failMessage))
+ toolTip += Environment.NewLine + failMessage.TrimEnd ();
+ } else {
+ toolTip = GettextCatalog.GetString ("NUnit Fixture (click to run)");
+ }
+ } else {
+ if (isFailed) {
+ toolTip = GettextCatalog.GetString ("NUnit Test failed (click to run)");
+ if (!string.IsNullOrEmpty (failMessage))
+ toolTip += Environment.NewLine + failMessage.TrimEnd ();
+ foreach (var id in unitTest.TestCases) {
+ var test = NUnitService.Instance.SearchTestById (unitTest.UnitTestIdentifier + id);
+ if (test != null) {
+ var result = test.GetLastResult ();
+ if (result.IsFailure) {
+ if (!string.IsNullOrEmpty (result.Message)) {
+ toolTip += Environment.NewLine + "Test" + id +":";
+ toolTip += Environment.NewLine + result.Message.TrimEnd ();
+ }
+ }
+ }
+
+ }
+ } else {
+ toolTip = GettextCatalog.GetString ("NUnit Test (click to run)");
+ }
+
+ }
+ editor.TooltipText = toolTip;
+ }
+
+ static Gtk.Menu menu;
+
+ public override void InformMousePress (TextEditor editor, Margin margin, MarginMouseEventArgs args)
+ {
+ if (menu != null) {
+ menu.Destroy ();
+ }
+ var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode ();
+
+ menu = new Gtk.Menu ();
+ if (unitTest.IsFixture) {
+ var menuItem = new Gtk.MenuItem ("_Run All");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, false).Run;
+ menu.Add (menuItem);
+ if (debugModeSet != null) {
+ menuItem = new Gtk.MenuItem ("_Debug All");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, true).Run;
+ menu.Add (menuItem);
+ }
+ } else {
+ if (unitTest.TestCases.Count == 0) {
+ var menuItem = new Gtk.MenuItem ("_Run");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, false).Run;
+ menu.Add (menuItem);
+ if (debugModeSet != null) {
+ menuItem = new Gtk.MenuItem ("_Debug");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, true).Run;
+ menu.Add (menuItem);
+ }
+ } else {
+ var menuItem = new Gtk.MenuItem ("_Run All");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, false).Run;
+ menu.Add (menuItem);
+ if (debugModeSet != null) {
+ menuItem = new Gtk.MenuItem ("_Debug All");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier, true).Run;
+ menu.Add (menuItem);
+ }
+ menu.Add (new Gtk.SeparatorMenuItem ());
+ foreach (var id in unitTest.TestCases) {
+ var submenu = new Gtk.Menu ();
+ menuItem = new Gtk.MenuItem ("_Run");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier + id, false).Run;
+ submenu.Add (menuItem);
+ if (debugModeSet != null) {
+ menuItem = new Gtk.MenuItem ("_Debug");
+ menuItem.Activated += new TestRunner (doc, unitTest.UnitTestIdentifier + id, true).Run;
+ submenu.Add (menuItem);
+ }
+
+ var label = "Test" + id;
+ string tooltip = null;
+ var test = NUnitService.Instance.SearchTestById (unitTest.UnitTestIdentifier + id);
+ if (test != null) {
+ var result = test.GetLastResult ();
+ if (result != null && result.IsFailure) {
+ tooltip = result.Message;
+ label += "!";
+ }
+ }
+
+ var subMenuItem = new Gtk.MenuItem (label);
+ if (!string.IsNullOrEmpty (tooltip))
+ subMenuItem.TooltipText = tooltip;
+ subMenuItem.Submenu = submenu;
+ menu.Add (subMenuItem);
+ }
+ }
+ }
+ menu.ShowAll ();
+ editor.TextArea.ResetMouseState ();
+ GtkWorkarounds.ShowContextMenu (menu, editor, new Gdk.Rectangle ((int)args.X, (int)args.Y, 1, 1));
+ }
+
+ class TestRunner
+ {
+ readonly MonoDevelop.Ide.Gui.Document doc;
+ readonly string testCase;
+ readonly bool debug;
+
+ public TestRunner (MonoDevelop.Ide.Gui.Document doc, string testCase, bool debug)
+ {
+ this.doc = doc;
+ this.testCase = testCase;
+ this.debug = debug;
+ }
+
+ bool TimeoutHandler ()
+ {
+ var test = NUnitService.Instance.SearchTestById (testCase);
+ if (test != null) {
+ RunTest (test);
+ timeoutHandler = 0;
+ } else {
+ return true;
+ }
+ return false;
+ }
+
+
+ internal void Run (object sender, EventArgs e)
+ {
+ menu.Destroy ();
+ menu = null;
+ if (IdeApp.ProjectOperations.IsBuilding (IdeApp.ProjectOperations.CurrentSelectedSolution) ||
+ IdeApp.ProjectOperations.IsRunning (IdeApp.ProjectOperations.CurrentSelectedSolution))
+ return;
+ var buildOperation = IdeApp.ProjectOperations.Build (IdeApp.ProjectOperations.CurrentSelectedSolution);
+ buildOperation.Completed += delegate {
+ if (!buildOperation.Success)
+ return;
+ RemoveHandler ();
+ timeoutHandler = GLib.Timeout.Add (200, TimeoutHandler);
+ };
+ }
+
+ void RunTest (UnitTest test)
+ {
+ NUnitService.ResetResult (test.RootTest);
+ var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode ();
+ MonoDevelop.Core.Execution.IExecutionHandler ctx = null;
+ if (debug && debugModeSet != null) {
+ foreach (var executionMode in debugModeSet.ExecutionModes) {
+ if (test.CanRun (executionMode.ExecutionHandler)) {
+ ctx = executionMode.ExecutionHandler;
+ break;
+ }
+ }
+ }
+ NUnitService.Instance.RunTest (test, ctx).Completed += delegate {
+ Application.Invoke (delegate {
+ doc.Editor.Parent.QueueDraw ();
+ });
+ };
+ }
+
+
+ }
+
+ bool isFailed;
+ string failMessage;
+ public override void DrawForeground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ cr.Arc (metrics.X + metrics.Width / 2 + 2, metrics.Y + metrics.Height / 2, 7 * editor.Options.Zoom, 0, Math.PI * 2);
+ isFailed = false;
+ var test = NUnitService.Instance.SearchTestById (unitTest.UnitTestIdentifier);
+ bool searchCases = false;
+ if (test != null) {
+ var result = test.GetLastResult ();
+ if (result == null || result.IsNotRun) {
+ cr.Color = new Cairo.Color (0.5, 0.5, 0.5);
+ searchCases = true;
+ } else if (result.IsSuccess) {
+ cr.Color = new Cairo.Color (0, 1, 0, test.IsHistoricResult ? 0.2 : 1.0);
+ } else if (result.IsFailure) {
+ cr.Color = new Cairo.Color (1, 0, 0, test.IsHistoricResult ? 0.2 : 1.0);
+ failMessage = result.Message;
+ isFailed = true;
+ } else if (result.IsInconclusive) {
+ cr.Color = new Cairo.Color (0, 1, 1, test.IsHistoricResult ? 0.2 : 1.0);
+ }
+ } else {
+ cr.Color = new Cairo.Color (0.5, 0.5, 0.5);
+ searchCases = true;
+ }
+
+ if (searchCases) {
+ foreach (var caseId in unitTest.TestCases) {
+ test = NUnitService.Instance.SearchTestById (unitTest.UnitTestIdentifier + caseId);
+ if (test != null) {
+ var result = test.GetLastResult ();
+ if (result == null || result.IsNotRun || test.IsHistoricResult) {
+ } else if (result.IsSuccess) {
+ cr.Color = new Cairo.Color (0, 1, 0);
+ } else if (result.IsFailure) {
+ cr.Color = new Cairo.Color (1, 0, 0);
+ failMessage = result.Message;
+ isFailed = true;
+ break;
+ } else if (result.IsInconclusive) {
+ cr.Color = new Cairo.Color (0, 1, 1);
+ }
+ }
+ }
+ }
+
+ cr.FillPreserve ();
+
+ if (test != null) {
+ var result = test.GetLastResult ();
+ if (result == null || result.IsNotRun) {
+ cr.Color = new Cairo.Color (0.2, 0.2, 0.2);
+ cr.Stroke ();
+ } else if (result.IsSuccess && !test.IsHistoricResult) {
+ cr.Color = new Cairo.Color (0, 0.5, 0);
+ cr.Stroke ();
+ } else if (result.IsFailure && !test.IsHistoricResult) {
+ cr.Color = new Cairo.Color (0.5, 0, 0);
+ cr.Stroke ();
+ } else if (result.IsInconclusive && !test.IsHistoricResult) {
+ cr.Color = new Cairo.Color (0, 0.7, 0.7);
+ cr.Stroke ();
+ }
+ }
+ cr.NewPath ();
+ }
+ }
+
+ class NUnitVisitor : DepthFirstAstVisitor
+ {
+ readonly CSharpAstResolver resolver;
+ List<UnitTest> foundTests = new List<UnitTest> ();
+
+ public IList<UnitTest> FoundTests {
+ get {
+ return foundTests;
+ }
+ }
+
+ public class UnitTest
+ {
+ public int LineNumber { get; set; }
+ public bool IsFixture { get; set; }
+ public string UnitTestIdentifier { get; set; }
+ public List<string> TestCases = new List<string> ();
+
+ public UnitTest (int lineNumber)
+ {
+ this.LineNumber = lineNumber;
+ }
+ }
+
+ public NUnitVisitor (CSharpAstResolver resolver)
+ {
+ this.resolver = resolver;
+ }
+
+ string GetFullName (TypeDeclaration typeDeclaration)
+ {
+ var parts = new List<string> ();
+
+ while (true) {
+ parts.Add (typeDeclaration.Name);
+ if (typeDeclaration.Parent is TypeDeclaration) {
+ typeDeclaration = (TypeDeclaration)typeDeclaration.Parent;
+ } else {
+ break;
+ }
+ };
+
+ var ns = typeDeclaration.Parent as NamespaceDeclaration;
+ if (ns != null)
+ parts.Add (ns.FullName);
+ parts.Reverse ();
+ return string.Join (".", parts);
+ }
+
+ void AppendConstant (StringBuilder sb, object constantValue)
+ {
+ if (constantValue is string)
+ sb.Append ('"');
+ if (constantValue is char)
+ sb.Append ('\"');
+ sb.Append (constantValue);
+ if (constantValue is string)
+ sb.Append ('"');
+ if (constantValue is char)
+ sb.Append ('\"');
+ }
+
+ string BuildArguments (IAttribute attr)
+ {
+ StringBuilder sb = new StringBuilder ();
+ foreach (var arg in attr.PositionalArguments) {
+ if (sb.Length > 0)
+ sb.Append (", ");
+ var cr = arg as ConversionResolveResult;
+ if (cr != null) {
+ AppendConstant (sb, cr.Input.ConstantValue);
+ continue;
+ }
+ AppendConstant (sb, arg.ConstantValue);
+ }
+ return sb.ToString ();
+ }
+
+ public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+ {
+ var result = resolver.Resolve (methodDeclaration) as MemberResolveResult;
+ if (result == null)
+ return;
+ var method = result.Member as IMethod;
+
+ UnitTest test = null;
+
+ foreach (var attr in method.Attributes) {
+ if (attr.AttributeType.ReflectionName == "NUnit.Framework.TestAttribute") {
+ if (test == null) {
+ test = new UnitTest (methodDeclaration.NameToken.StartLocation.Line);
+ test.UnitTestIdentifier = GetFullName ((TypeDeclaration)methodDeclaration.Parent) + "." + methodDeclaration.Name;
+ foundTests.Add (test);
+ }
+ } else if (attr.AttributeType.ReflectionName == "NUnit.Framework.TestCaseAttribute") {
+ test.TestCases.Add ("(" + BuildArguments (attr) + ")");
+ }
+ }
+ }
+
+ public override void VisitTypeDeclaration (TypeDeclaration typeDeclaration)
+ {
+ var result = resolver.Resolve (typeDeclaration);
+
+ foreach (var attr in result.Type.GetDefinition ().Attributes) {
+
+ if (attr.AttributeType.ReflectionName == "NUnit.Framework.TestFixtureAttribute") {
+ var unitTest = new UnitTest (typeDeclaration.NameToken.StartLocation.Line);
+ unitTest.IsFixture = true;
+ unitTest.UnitTestIdentifier = GetFullName (typeDeclaration);
+ foundTests.Add (unitTest);
+ }
+ }
+ base.VisitTypeDeclaration (typeDeclaration);
+ }
+
+ public override void VisitBlockStatement (BlockStatement blockStatement)
+ {
+ }
+ }
+ }
+}
+
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/AstAmbience.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/AstAmbience.cs
index 6114f44..03ce68f 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/AstAmbience.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/AstAmbience.cs
@@ -216,11 +216,21 @@ namespace MonoDevelop.CSharp
sb.Append (initializer.Name);
if (IsObsolete (initializer.Parent as EntityDeclaration))
return "<s>" + sb.ToString () + "</s>";
+ } else if (e is FixedVariableInitializer) {
+ var initializer = (FixedVariableInitializer)e;
+ sb.Append (initializer.Name);
+ if (IsObsolete (initializer.Parent as EntityDeclaration))
+ return "<s>" + sb.ToString () + "</s>";
} else if (e is FieldDeclaration) {
var field = (FieldDeclaration)e;
if (!field.Variables.Any ())
return "";
sb.Append (field.Variables.First ().Name);
+ } else if (e is FixedFieldDeclaration) {
+ var field = (FixedFieldDeclaration)e;
+ if (!field.Variables.Any ())
+ return "";
+ sb.Append (field.Variables.First ().Name);
} else if (e is EventDeclaration) {
var evt = (EventDeclaration)e;
if (!evt.Variables.Any ())
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpBindingCompilerManager.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpBindingCompilerManager.cs
index 50367e1..94663c5 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpBindingCompilerManager.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpBindingCompilerManager.cs
@@ -27,6 +27,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using System.Linq;
using System.Diagnostics;
using System.Text.RegularExpressions;
using System.Text;
@@ -159,12 +160,19 @@ namespace MonoDevelop.CSharp
}
}
}
-
+
+ if (alreadyAddedReference.Any (reference => SystemAssemblyService.ContainsReferenceToSystemRuntime (reference))) {
+ LoggingService.LogInfo ("Found PCLv2 assembly.");
+ var facades = runtime.FindFacadeAssembliesForPCL (project.TargetFramework);
+ foreach (var facade in facades)
+ AppendQuoted (sb, "/r:", facade);
+ }
+
string sysCore = project.AssemblyContext.GetAssemblyFullName ("System.Core", project.TargetFramework);
- if (sysCore != null) {
- sysCore = project.AssemblyContext.GetAssemblyLocation (sysCore, project.TargetFramework);
- if (sysCore != null && !alreadyAddedReference.Contains (sysCore))
- AppendQuoted (sb, "/r:", sysCore);
+ if (sysCore != null && !alreadyAddedReference.Contains (sysCore)) {
+ var asm = project.AssemblyContext.GetAssemblyFromFullName (sysCore, null, project.TargetFramework);
+ if (asm != null)
+ AppendQuoted (sb, "/r:", asm.Location);
}
sb.AppendLine ("/nologo");
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs
index b27ccfc..92b58cc 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpEnhancedCodeProvider.cs
@@ -35,7 +35,6 @@ using System.CodeDom;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
using ICSharpCode.NRefactory.CSharp;
-using Mono.Cecil;
using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
@@ -60,13 +59,13 @@ namespace MonoDevelop.CSharp
}
static readonly Lazy<IUnresolvedAssembly> mscorlib = new Lazy<IUnresolvedAssembly>(
- delegate {
- return new CecilLoader().LoadAssemblyFile(typeof(object).Assembly.Location);
+ delegate {
+ return new IkvmLoader ().LoadAssemblyFile(typeof(object).Assembly.Location);
});
static readonly Lazy<IUnresolvedAssembly> systemCore = new Lazy<IUnresolvedAssembly>(
delegate {
- return new CecilLoader().LoadAssemblyFile(typeof(System.Linq.Enumerable).Assembly.Location);
+ return new IkvmLoader ().LoadAssemblyFile(typeof(System.Linq.Enumerable).Assembly.Location);
});
static readonly Lazy<ICompilation> Compilation = new Lazy<ICompilation>(
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpLanguageBinding.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpLanguageBinding.cs
index e077944..8bab19e 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpLanguageBinding.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpLanguageBinding.cs
@@ -85,8 +85,10 @@ namespace MonoDevelop.CSharp
if (SupportedPlatforms.Contains (platform))
pars.PlatformTarget = platform;
string debugAtt = projectOptions.GetAttribute ("DefineDebug");
- if (string.Compare ("True", debugAtt, StringComparison.OrdinalIgnoreCase) == 0)
+ if (string.Compare ("True", debugAtt, StringComparison.OrdinalIgnoreCase) == 0) {
pars.AddDefineSymbol ("DEBUG");
+ pars.DebugType = "full";
+ }
string releaseAtt = projectOptions.GetAttribute ("Release");
if (string.Compare ("True", releaseAtt, StringComparison.OrdinalIgnoreCase) == 0)
pars.Optimize = true;
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
index 4f204fb..906e7a6 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
@@ -43,20 +43,39 @@ namespace MonoDevelop.CSharp
{
public override void Dispose ()
{
- Document.Editor.Caret.PositionChanged -= UpdatePath;
+ if (caret != null) {
+ caret.PositionChanged -= UpdatePath;
+ caret = null;
+ }
+ if (ext != null) {
+ ext.TypeSegmentTreeUpdated -= HandleTypeSegmentTreeUpdated;
+ ext = null;
+ }
+ currentPath = null;
+ lastType = null;
+ lastMember = null;
base.Dispose ();
}
bool isPathSet;
+
+ Mono.TextEditor.Caret caret;
+ CSharpCompletionTextEditorExtension ext;
public override void Initialize ()
{
CurrentPath = new PathEntry[] { new PathEntry (GettextCatalog.GetString ("No selection")) { Tag = null } };
isPathSet = false;
UpdatePath (null, null);
- Document.Editor.Caret.PositionChanged += UpdatePath;
- var ext = Document.GetContent<CSharpCompletionTextEditorExtension> ();
- ext.TypeSegmentTreeUpdated += (o, s) => UpdatePath (null, null);
+ caret = Document.Editor.Caret;
+ caret.PositionChanged += UpdatePath;
+ ext = Document.GetContent<CSharpCompletionTextEditorExtension> ();
+ ext.TypeSegmentTreeUpdated += HandleTypeSegmentTreeUpdated;
+ }
+
+ void HandleTypeSegmentTreeUpdated (object sender, EventArgs e)
+ {
+ UpdatePath (null, null);
}
#region IPathedDocument implementation
@@ -97,6 +116,9 @@ namespace MonoDevelop.CSharp
if (member is FieldDeclaration) {
foreach (var variable in ((FieldDeclaration)member).Variables)
memberList.Add (variable);
+ } else if (member is FixedFieldDeclaration) {
+ foreach (var variable in ((FixedFieldDeclaration)member).Variables)
+ memberList.Add (variable);
} else if (member is EventDeclaration) {
foreach (var variable in ((EventDeclaration)member).Variables)
memberList.Add (variable);
@@ -115,6 +137,9 @@ namespace MonoDevelop.CSharp
if (member is FieldDeclaration) {
foreach (var variable in ((FieldDeclaration)member).Variables)
memberList.Add (variable);
+ } if (member is FixedFieldDeclaration) {
+ foreach (var variable in ((FixedFieldDeclaration)member).Variables)
+ memberList.Add (variable);
} else {
memberList.Add (member);
}
@@ -179,6 +204,9 @@ namespace MonoDevelop.CSharp
}
if (node is EntityDeclaration)
return ((EntityDeclaration)node).Name;
+ if (node is FixedVariableInitializer) {
+ return ((FixedVariableInitializer)node).Name;
+ }
return ((VariableInitializer)node).Name;
}
@@ -370,8 +398,22 @@ namespace MonoDevelop.CSharp
return;
var loc = Document.Editor.Caret.Location;
+ var compExt = Document.GetContent<CSharpCompletionTextEditorExtension> ();
+ var caretOffset = Document.Editor.Caret.Offset;
+ var segType = compExt.GetTypeAt (caretOffset);
+ if (segType != null)
+ loc = segType.Region.Begin;
var curType = (EntityDeclaration)unit.GetNodeAt (loc, n => n is TypeDeclaration || n is DelegateDeclaration);
+
+
+ var segMember = compExt.GetMemberAt (caretOffset);
+ if (segMember != null) {
+ loc = segMember.Region.Begin;
+ } else {
+ loc = Document.Editor.Caret.Location;
+ }
+
var curMember = unit.GetNodeAt<EntityDeclaration> (loc);
if (curType == curMember)
curMember = null;
diff --git a/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs b/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
index 0f28c66..852204e 100644
--- a/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
+++ b/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
@@ -139,28 +139,28 @@ namespace MonoDevelop.CSharp
if (entity == null)
throw new ArgumentNullException ("entity");
string result;
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
result = GetTypeMarkup ((ITypeDefinition)entity);
break;
- case EntityType.Field:
+ case SymbolKind.Field:
result = GetFieldMarkup ((IField)entity);
break;
- case EntityType.Property:
- case EntityType.Indexer:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
result = GetPropertyMarkup ((IProperty)entity);
break;
- case EntityType.Event:
+ case SymbolKind.Event:
result = GetEventMarkup ((IEvent)entity);
break;
- case EntityType.Method:
- case EntityType.Operator:
+ case SymbolKind.Method:
+ case SymbolKind.Operator:
result = GetMethodMarkup ((IMethod)entity);
break;
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
result = GetConstructorMarkup ((IMethod)entity);
break;
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
result = GetDestructorMarkup ((IMethod)entity);
break;
default:
@@ -190,7 +190,7 @@ namespace MonoDevelop.CSharp
switch (entity.Accessibility) {
case Accessibility.Internal:
- if (entity.EntityType != EntityType.TypeDefinition)
+ if (entity.SymbolKind != SymbolKind.TypeDefinition)
result.Append (Highlight ("internal ", colorStyle.KeywordModifiers));
break;
case Accessibility.ProtectedAndInternal:
@@ -210,9 +210,14 @@ namespace MonoDevelop.CSharp
result.Append (Highlight ("public ", colorStyle.KeywordModifiers));
break;
}
+ var field = entity as IField;
- if (entity is IField && ((IField)entity).IsConst) {
- result.Append (Highlight ("const ", colorStyle.KeywordModifiers));
+ if (field != null) {
+ if (field.IsFixed) {
+ result.Append (Highlight ("fixed ", colorStyle.KeywordModifiers));
+ } else if (field.IsConst) {
+ result.Append (Highlight ("const ", colorStyle.KeywordModifiers));
+ }
} else if (entity.IsStatic) {
result.Append (Highlight ("static ", colorStyle.KeywordModifiers));
} else if (entity.IsSealed) {
@@ -235,7 +240,6 @@ namespace MonoDevelop.CSharp
result.Append (Highlight ("virtual ", colorStyle.KeywordModifiers));
}
}
- var field = entity as IField;
if (field != null) {
if (field.IsVolatile)
result.Append (Highlight ("volatile ", colorStyle.KeywordModifiers));
@@ -607,7 +611,7 @@ namespace MonoDevelop.CSharp
var result = new StringBuilder ();
if (variable.IsConst)
- result.Append (Highlight ("const", colorStyle.KeywordModifiers));
+ result.Append (Highlight ("const ", colorStyle.KeywordModifiers));
result.Append (GetTypeReferenceString (variable.Type));
if (BreakLineAfterReturnType) {
@@ -652,7 +656,19 @@ namespace MonoDevelop.CSharp
result.Append (HighlightSemantically (CSharpAmbience.FilterName (field.Name), colorStyle.UserFieldDeclaration));
- if (field.IsConst) {
+ if (field.IsFixed){
+ if (formattingOptions.SpaceBeforeArrayDeclarationBrackets) {
+ result.Append (" [");
+ } else {
+ result.Append ("[");
+ }
+ if (formattingOptions.SpacesWithinBrackets)
+ result.Append (" ");
+ AppendConstant (result, field.Type, field.ConstantValue);
+ if (formattingOptions.SpacesWithinBrackets)
+ result.Append (" ");
+ result.Append ("]");
+ } else if (field.IsConst) {
if (isEnum && !(field.DeclaringTypeDefinition.Attributes.Any (attr => attr.AttributeType.FullName == "System.FlagsAttribute"))) {
return result.ToString ();
}
@@ -683,7 +699,7 @@ namespace MonoDevelop.CSharp
AppendExplicitInterfaces (result, method);
- if (method.EntityType == EntityType.Operator) {
+ if (method.SymbolKind == SymbolKind.Operator) {
result.Append ("operator ");
result.Append (CSharpAmbience.GetOperator (method.Name));
} else {
@@ -785,7 +801,7 @@ namespace MonoDevelop.CSharp
AppendExplicitInterfaces (result, property);
- if (property.EntityType == EntityType.Indexer) {
+ if (property.SymbolKind == SymbolKind.Indexer) {
result.Append (Highlight ("this", colorStyle.KeywordAccessors));
} else {
result.Append (HighlightSemantically (CSharpAmbience.FilterName (property.Name), colorStyle.UserPropertyDeclaration));
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.CSharpBinding.addin.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.CSharpBinding.addin.xml
new file mode 100644
index 0000000..0d4002e
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.CSharpBinding.addin.xml
@@ -0,0 +1,300 @@
+<Addin id = "CSharpBinding"
+ namespace = "MonoDevelop"
+ name = "CSharp Language Binding"
+ author = "Todd Berman"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com/"
+ description = "CSharp Language Binding"
+ category = "Language bindings"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
+ </Dependencies>
+
+ <ConditionType id="MSBuildTargetIsAvailable" type="MonoDevelop.Projects.Formats.MSBuild.TargetsAvailableCondition" />
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.CodeGeneration.CodeGenerationCommands.ShowCodeGenerationWindow"
+ _label = "S_how Code Generation Window"
+ shortcut = "Alt|Insert" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProject
+ language="C#"
+ extension="csproj"
+ guid="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ import="$(MSBuildBinPath)\Microsoft.CSharp.targets"
+ resourceHandler="MonoDevelop.CSharp.Project.CSharpResourceIdBuilder"
+ />
+ <Condition id="MSBuildTargetIsAvailable" target="$(MSBuildExtensionsPath)\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets">
+ <DotNetProjectSubtype
+ guid="{786C830F-07A1-408B-BD7F-6EE04809D6DB}"
+ type="MonoDevelop.Projects.PortableDotNetProject"
+ useXBuild="true">
+ <AddImport language="C#" projects="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <RemoveImport language="C#" projects="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ </DotNetProjectSubtype>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "CSharpEmptyFile" resource = "EmptyCSharpFile.xft.xml"/>
+ <FileTemplate id = "CSharpAssemblyInfo" resource = "AssemblyInfo.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "CSharpConsoleProject" resource = "ConsoleProject.xpt.xml"/>
+ <ProjectTemplate id = "CSharpEmptyProject" resource = "EmptyProject.xpt.xml"/>
+ <ProjectTemplate id = "CSharpGtkSharp2Project" resource = "GtkSharp2Project.xpt.xml"/>
+ <ProjectTemplate id = "CSharpLibrary" resource = "Library.xpt.xml"/>
+ <Condition id="MSBuildTargetIsAvailable" target="$(MSBuildExtensionsPath)\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets">
+ <ProjectTemplate id = "CSharpPortableLibrary" resource = "PortableLibrary.xpt.xml" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "CSharp"
+ insertbefore = "Assemblies"
+ _label = "C# Files"
+ extensions = "*.cs"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build/General">
+ <Condition id="ActiveLanguage" value="C#">
+ <Panel id = "CSharpCompilerOptionsPanel"
+ _label = "C#"
+ class = "MonoDevelop.CSharp.Project.CompilerOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build/Compiler">
+ <Condition id="ActiveLanguage" value="C#">
+ <Panel id = "CSharpCodeGenerationPanel"
+ _label = "Compiler"
+ class = "MonoDevelop.CSharp.Project.CodeGenerationPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/LanguageBindings">
+ <LanguageBinding id = "CSharp"
+ supportedextensions = ".cs"
+ class = "MonoDevelop.CSharp.CSharpLanguageBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ReferenceFinder">
+ <ReferenceFinder supportedmimetypes = "text/x-csharp"
+ class = "MonoDevelop.CSharp.Refactoring.CSharpReferenceFinder" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.CSharp.Project.CSharpCompilerParameters" />
+ <DataType class = "MonoDevelop.CSharp.Project.CSharpProjectParameters" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <!-- indent engine must be before the completion text editor engine,
+ otherwise stuff like
+
+ int Foo {
+ get;private set';'
+
+ will end up as
+
+ int Foo {
+ get;
+ privaet;
+
+ -->
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.Formatting.CSharpTextEditorIndentation" />
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.Completion.CSharpCompletionTextEditorExtension" />
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.Highlighting.HighlightUsagesExtension" />
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.PathedDocumentTextEditorExtension" />
+ <Class fileExtensions = ".cs" class = "MonoDevelop.CSharp.UnitTestTextEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-csharp-file" resource = "C#.FileIcon" size="Menu" />
+ <StockIcon stockid = "md-csharp-project" resource = "csharp-project-16.png" size="Menu"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-csharp" _description="C# source code" icon="md-csharp-file" isText="true">
+ <File pattern="*.cs" />
+ </MimeType>
+ <MimeType id="application/csproject+xml" _description="C# project file" baseType="application/xml">
+ <File pattern="*.csproj" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeFormatters">
+ <Formatter mimeType="text/x-csharp" class="MonoDevelop.CSharp.Formatting.CSharpFormatter" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Ambiences">
+ <Ambience mimeType="text/x-csharp" class = "MonoDevelop.CSharp.CSharpAmbience" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class="MonoDevelop.CSharp.Parser.TypeSystemParser" mimeType = "text/x-csharp" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/FoldingParser">
+ <Parser class = "MonoDevelop.CSharp.Parser.CSharpFoldingParser" mimeType="text/x-csharp" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/CodeGenerators">
+ <Generator class="MonoDevelop.CSharp.Refactoring.CSharpCodeGenerator" mimeType = "text/x-csharp" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets/Mono" >
+ <Policies resource="MonoCSharpPolicy.xml" />
+ <Policies resource="MonoNameConventionPolicy.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="KR" _name="K&R style" allowDiffSerialize="false">
+ <Policies resource="KRCSharpPolicy.xml" />
+ <Policies resource="InvariantTextStylePolicy.xml" />
+ </PolicySet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="1TBS" _name="SharpDevelop style (1TBS)" allowDiffSerialize="false">
+ <Policies resource="SharpDevelopCSharpPolicy.xml" />
+ <Policies resource="InvariantTextStylePolicy.xml" />
+ </PolicySet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets/VisualStudio" >
+ <Policies resource="AllmanCSharpPolicy.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="Whitesmiths" _name="Whitesmiths style" allowDiffSerialize="false">
+ <Policies resource="WhitesmithsCSharpPolicy.xml" />
+ <Policies resource="InvariantTextStylePolicy.xml" />
+ </PolicySet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="GNU" _name="GNU style" allowDiffSerialize="false">
+ <Policies resource="GNUCSharpPolicy.xml" />
+ <Policies resource="GNUTextStylePolicy.xml" />
+ </PolicySet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels">
+ <Panel id = "CSharpFormatting" _label = "C# Format" mimeType="text/x-csharp" class = "MonoDevelop.CSharp.Formatting.CSharpFormattingPolicyPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Refactoring/CodeActions">
+ <Action mimeType="text/x-csharp"
+ _title = "Move type to another file"
+ _description = "Moves current type to another file that matches the name of the type."
+ class = "MonoDevelop.CSharp.Refactoring.CodeActions.MoveTypeToFile" />
+ <Action mimeType="text/x-csharp"
+ _title = "Convert to enum"
+ _description = "Converts constant fields to enumeration"
+ class = "MonoDevelop.CSharp.Refactoring.CodeActions.ConvertToEnumAction" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorResolver">
+ <Resolver class = "MonoDevelop.CSharp.Resolver.TextEditorResolverProvider" mimeType="text/x-csharp" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/TextEditor">
+ <Command id = "MonoDevelop.CSharp.Highlighting.MoveToUsagesCommand.PrevUsage"
+ defaultHandler = "MonoDevelop.CSharp.Highlighting.MoveToPrevUsageHandler"
+ shortcut = "Ctrl|Shift|Up"
+ macShortcut = "Meta|Shift|Up"
+ _label = "_Move to prev usage"/>
+ <Command id = "MonoDevelop.CSharp.Highlighting.MoveToUsagesCommand.NextUsage"
+ defaultHandler = "MonoDevelop.CSharp.Highlighting.MoveToNextUsageHandler"
+ shortcut = "Ctrl|Shift|Down"
+ macShortcut = "Meta|Shift|Down"
+ _label = "_Move to next usage"/>
+
+ <Command id = "MonoDevelop.CSharp.ExpandCommands.ExpandSelection"
+ defaultHandler = "MonoDevelop.CSharp.ExpandSelectionHandler"
+ shortcut = "Alt|Shift|Up"
+ macShortcut = "Alt|Shift|Up"
+ _label = "_Expand selection"/>
+
+ <Command id = "MonoDevelop.CSharp.ExpandCommands.ShrinkSelection"
+ defaultHandler = "MonoDevelop.CSharp.ShrinkSelectionHandler"
+ shortcut = "Alt|Shift|Down"
+ macShortcut = "Alt|Shift|Down"
+ _label = "_Shrink selection"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Refactoring/CodeGenerators">
+ <Class class = "MonoDevelop.CodeGeneration.CreateConstructorGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.ReadonlyPropertyGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.PropertyGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.ImplementInterfaceMembersGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.OverrideMembersGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.ToStringGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.RaiseEventMethodGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.EqualityMembersGenerator" />
+ <Class class = "MonoDevelop.CodeGeneration.WriteLineGenerator" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Refactoring/CodeActionSource">
+ <Source class ="MonoDevelop.CSharp.Refactoring.CodeActions.NRefactoryCodeActionSource"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Refactoring/CodeIssueSource">
+ <Source class ="MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryCodeIssueSource"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels/SourceCode">
+ <Section id="NameConventions" _label="Name Conventions" fill = "true" class="MonoDevelop.CSharp.Refactoring.CodeIssues.NameConventionPanel" />
+ </Extension>
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/SourceCode">
+ <Section id="NameConventions" _label="Name Conventions" fill = "true" class="MonoDevelop.CSharp.Refactoring.CodeIssues.NameConventionPanel" />
+ </Extension>
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/SourceCode">
+ <Section id="NameConventions" _label="Name Conventions" fill = "true" class="MonoDevelop.CSharp.Refactoring.CodeIssues.NameConventionPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/TooltipProviders">
+ <Class id="LanguageItem" class="MonoDevelop.SourceEditor.LanguageItemTooltipProvider" />
+ </Extension>
+
+ <Module>
+ <Runtime>
+ <Import assembly="MonoDevelop.CSharpBinding.Autotools.dll"/>
+ </Runtime>
+ <Dependencies>
+ <Addin id="Autotools" version="4.0.12"/>
+ </Dependencies>
+ <Extension path = "/MonoDevelop/Autotools/SimpleSetups">
+ <Class class="CSharpBinding.Autotools.CSharpAutotoolsSetup" />
+ </Extension>
+ </Module>
+
+ <Module>
+ <Runtime>
+ <Import assembly="MonoDevelop.CSharpBinding.AspNet.dll"/>
+ </Runtime>
+ <Dependencies>
+ <Addin id="AspNet" version="4.0.12"/>
+ </Dependencies>
+ <Extension path = "/MonoDevelop/Asp/CompletionBuilders">
+ <Class class = "MonoDevelop.CSharp.Completion.AspLanguageBuilder" />
+ </Extension>
+ <Extension path = "/MonoDevelop/Ide/ReferenceFinder">
+ <ReferenceFinder supportedmimetypes = "application/x-aspx,application/x-ascx,application/x-asax,application/x-ashx,application/x-asmx,application/x-asix"
+ class = "MonoDevelop.CSharp.Refactoring.ASPNetReferenceFinder" />
+ </Extension>
+ </Module>
+</Addin>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.AllmanCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.AllmanCSharpPolicy.xml
new file mode 100644
index 0000000..0cd6d68
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.AllmanCSharpPolicy.xml
@@ -0,0 +1,158 @@
+<!--
+
+AllmanCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="False">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>True</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLine</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLine</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLine</InterfaceBraceStyle>
+ <StructBraceStyle>NextLine</StructBraceStyle>
+ <EnumBraceStyle>NextLine</EnumBraceStyle>
+ <MethodBraceStyle>NextLine</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>NextLine</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLine</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLine</DestructorBraceStyle>
+ <PropertyBraceStyle>NextLine</PropertyBraceStyle>
+ <PropertyGetBraceStyle>NextLine</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>NextLine</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>NextLine</EventBraceStyle>
+ <EventAddBraceStyle>NextLine</EventAddBraceStyle>
+ <EventRemoveBraceStyle>NextLine</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>NextLine</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>NewLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>NewLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>NewLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>DoNotCare</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>DoNotChange</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>NextLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>False</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>False</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>False</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>False</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>False</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>False</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUCSharpPolicy.xml
new file mode 100644
index 0000000..5aaf35a
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUCSharpPolicy.xml
@@ -0,0 +1,159 @@
+<!--
+
+GNUCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="False">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>True</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLine</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLine</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLine</InterfaceBraceStyle>
+ <StructBraceStyle>NextLine</StructBraceStyle>
+ <EnumBraceStyle>NextLine</EnumBraceStyle>
+ <MethodBraceStyle>NextLine</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>EndOfLine</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLine</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLine</DestructorBraceStyle>
+ <PropertyBraceStyle>EndOfLine</PropertyBraceStyle>
+ <PropertyGetBraceStyle>EndOfLine</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>EndOfLine</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>EndOfLine</EventBraceStyle>
+ <EventAddBraceStyle>EndOfLine</EventAddBraceStyle>
+ <EventRemoveBraceStyle>EndOfLine</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>NextLineShifted2</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>SameLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>SameLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>SameLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>SameLine</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>WrapIfTooLong</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>EndOfLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>False</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>False</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>False</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>False</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>False</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>False</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUTextStylePolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUTextStylePolicy.xml
new file mode 100644
index 0000000..e04fa32
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUTextStylePolicy.xml
@@ -0,0 +1,37 @@
+<!--
+
+GNUTextStylePolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<TextStylePolicy scope="text/x-csharp">
+ <FileWidth>120</FileWidth>
+ <TabWidth>4</TabWidth>
+ <IndentWidth>2</IndentWidth>
+ <TabsToSpaces>True</TabsToSpaces>
+ <NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
+ <RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
+ <EolMarker>Unix</EolMarker>
+</TextStylePolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.InvariantTextStylePolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.InvariantTextStylePolicy.xml
new file mode 100644
index 0000000..f5716cb
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.InvariantTextStylePolicy.xml
@@ -0,0 +1,9 @@
+<TextStylePolicy scope="text/x-csharp">
+ <FileWidth>120</FileWidth>
+ <TabWidth>4</TabWidth>
+ <IndentWidth>4</IndentWidth>
+ <TabsToSpaces>False</TabsToSpaces>
+ <NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
+ <RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
+ <EolMarker>Unix</EolMarker>
+</TextStylePolicy>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.KRCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.KRCSharpPolicy.xml
new file mode 100644
index 0000000..394433a
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.KRCSharpPolicy.xml
@@ -0,0 +1,158 @@
+<!--
+
+KRCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="False">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>True</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLine</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLine</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLine</InterfaceBraceStyle>
+ <StructBraceStyle>NextLine</StructBraceStyle>
+ <EnumBraceStyle>NextLine</EnumBraceStyle>
+ <MethodBraceStyle>NextLine</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>EndOfLine</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLine</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLine</DestructorBraceStyle>
+ <PropertyBraceStyle>EndOfLine</PropertyBraceStyle>
+ <PropertyGetBraceStyle>EndOfLine</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>EndOfLine</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>EndOfLine</EventBraceStyle>
+ <EventAddBraceStyle>EndOfLine</EventAddBraceStyle>
+ <EventRemoveBraceStyle>EndOfLine</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>EndOfLine</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>SameLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>SameLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>SameLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>SameLine</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>WrapIfTooLong</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>EndOfLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>False</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>False</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>False</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>False</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>False</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>False</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.MonoCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.MonoCSharpPolicy.xml
new file mode 100644
index 0000000..9a47d6b
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.MonoCSharpPolicy.xml
@@ -0,0 +1,158 @@
+<!--
+
+MonoCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="True">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>False</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLine</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLine</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLine</InterfaceBraceStyle>
+ <StructBraceStyle>NextLine</StructBraceStyle>
+ <EnumBraceStyle>NextLine</EnumBraceStyle>
+ <MethodBraceStyle>NextLine</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>EndOfLine</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLine</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLine</DestructorBraceStyle>
+ <PropertyBraceStyle>EndOfLine</PropertyBraceStyle>
+ <PropertyGetBraceStyle>EndOfLine</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>EndOfLine</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>EndOfLine</EventBraceStyle>
+ <EventAddBraceStyle>EndOfLine</EventAddBraceStyle>
+ <EventRemoveBraceStyle>EndOfLine</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>EndOfLine</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>SameLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>SameLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>SameLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>SameLine</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>WrapIfTooLong</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>EndOfLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>True</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>True</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>True</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>True</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>True</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>True</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.SharpDevelopCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.SharpDevelopCSharpPolicy.xml
new file mode 100644
index 0000000..bd493ce
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.SharpDevelopCSharpPolicy.xml
@@ -0,0 +1,158 @@
+<!--
+
+SharpDevelopCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="False">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>True</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLine</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLine</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLine</InterfaceBraceStyle>
+ <StructBraceStyle>NextLine</StructBraceStyle>
+ <EnumBraceStyle>NextLine</EnumBraceStyle>
+ <MethodBraceStyle>NextLine</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>EndOfLine</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLine</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLine</DestructorBraceStyle>
+ <PropertyBraceStyle>EndOfLine</PropertyBraceStyle>
+ <PropertyGetBraceStyle>EndOfLine</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>EndOfLine</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>EndOfLine</EventBraceStyle>
+ <EventAddBraceStyle>EndOfLine</EventAddBraceStyle>
+ <EventRemoveBraceStyle>EndOfLine</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>EndOfLine</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>SameLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>SameLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>SameLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>SameLine</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>WrapIfTooLong</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>EndOfLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>False</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>False</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>False</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>False</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>False</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>False</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.WhitesmithsCSharpPolicy.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.WhitesmithsCSharpPolicy.xml
new file mode 100644
index 0000000..240e8c7
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.WhitesmithsCSharpPolicy.xml
@@ -0,0 +1,158 @@
+<!--
+
+WhitesmithsCSharpPolicy.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<CSharpFormattingPolicy scope="text/x-csharp" allowDiffSerialize="False">
+ <IndentNamespaceBody>True</IndentNamespaceBody>
+ <IndentClassBody>True</IndentClassBody>
+ <IndentInterfaceBody>True</IndentInterfaceBody>
+ <IndentStructBody>True</IndentStructBody>
+ <IndentEnumBody>True</IndentEnumBody>
+ <IndentMethodBody>True</IndentMethodBody>
+ <IndentPropertyBody>True</IndentPropertyBody>
+ <IndentEventBody>True</IndentEventBody>
+ <IndentBlocks>True</IndentBlocks>
+ <IndentSwitchBody>True</IndentSwitchBody>
+ <IndentCaseBody>True</IndentCaseBody>
+ <IndentBreakStatements>True</IndentBreakStatements>
+ <AlignEmbeddedUsingStatements>True</AlignEmbeddedUsingStatements>
+ <AlignEmbeddedIfStatements>True</AlignEmbeddedIfStatements>
+ <PropertyFormatting>AllowOneLine</PropertyFormatting>
+ <NamespaceBraceStyle>NextLineShifted</NamespaceBraceStyle>
+ <ClassBraceStyle>NextLineShifted</ClassBraceStyle>
+ <InterfaceBraceStyle>NextLineShifted</InterfaceBraceStyle>
+ <StructBraceStyle>NextLineShifted</StructBraceStyle>
+ <EnumBraceStyle>NextLineShifted</EnumBraceStyle>
+ <MethodBraceStyle>NextLineShifted</MethodBraceStyle>
+ <AnonymousMethodBraceStyle>NextLineShifted</AnonymousMethodBraceStyle>
+ <ConstructorBraceStyle>NextLineShifted</ConstructorBraceStyle>
+ <DestructorBraceStyle>NextLineShifted</DestructorBraceStyle>
+ <PropertyBraceStyle>NextLineShifted</PropertyBraceStyle>
+ <PropertyGetBraceStyle>NextLineShifted</PropertyGetBraceStyle>
+ <PropertySetBraceStyle>NextLineShifted</PropertySetBraceStyle>
+ <AllowPropertyGetBlockInline>True</AllowPropertyGetBlockInline>
+ <AllowPropertySetBlockInline>True</AllowPropertySetBlockInline>
+ <EventBraceStyle>NextLineShifted</EventBraceStyle>
+ <EventAddBraceStyle>NextLineShifted</EventAddBraceStyle>
+ <EventRemoveBraceStyle>NextLineShifted</EventRemoveBraceStyle>
+ <AllowEventAddBlockInline>True</AllowEventAddBlockInline>
+ <AllowEventRemoveBlockInline>True</AllowEventRemoveBlockInline>
+ <StatementBraceStyle>NextLineShifted</StatementBraceStyle>
+ <AllowIfBlockInline>False</AllowIfBlockInline>
+ <ElseNewLinePlacement>SameLine</ElseNewLinePlacement>
+ <ElseIfNewLinePlacement>DoNotCare</ElseIfNewLinePlacement>
+ <CatchNewLinePlacement>SameLine</CatchNewLinePlacement>
+ <FinallyNewLinePlacement>SameLine</FinallyNewLinePlacement>
+ <WhileNewLinePlacement>SameLine</WhileNewLinePlacement>
+ <ArrayInitializerWrapping>WrapIfTooLong</ArrayInitializerWrapping>
+ <ArrayInitializerBraceStyle>EndOfLine</ArrayInitializerBraceStyle>
+ <KeepCommentsAtFirstColumn>True</KeepCommentsAtFirstColumn>
+ <BeforeMethodDeclarationParentheses>False</BeforeMethodDeclarationParentheses>
+ <BetweenEmptyMethodDeclarationParentheses>False</BetweenEmptyMethodDeclarationParentheses>
+ <BeforeMethodDeclarationParameterComma>False</BeforeMethodDeclarationParameterComma>
+ <AfterMethodDeclarationParameterComma>True</AfterMethodDeclarationParameterComma>
+ <WithinMethodDeclarationParentheses>False</WithinMethodDeclarationParentheses>
+ <BeforeMethodCallParentheses>False</BeforeMethodCallParentheses>
+ <BetweenEmptyMethodCallParentheses>False</BetweenEmptyMethodCallParentheses>
+ <BeforeMethodCallParameterComma>False</BeforeMethodCallParameterComma>
+ <AfterMethodCallParameterComma>True</AfterMethodCallParameterComma>
+ <WithinMethodCallParentheses>False</WithinMethodCallParentheses>
+ <BeforeFieldDeclarationComma>False</BeforeFieldDeclarationComma>
+ <AfterFieldDeclarationComma>True</AfterFieldDeclarationComma>
+ <BeforeLocalVariableDeclarationComma>False</BeforeLocalVariableDeclarationComma>
+ <AfterLocalVariableDeclarationComma>True</AfterLocalVariableDeclarationComma>
+ <BeforeConstructorDeclarationParentheses>False</BeforeConstructorDeclarationParentheses>
+ <BetweenEmptyConstructorDeclarationParentheses>False</BetweenEmptyConstructorDeclarationParentheses>
+ <BeforeConstructorDeclarationParameterComma>False</BeforeConstructorDeclarationParameterComma>
+ <AfterConstructorDeclarationParameterComma>True</AfterConstructorDeclarationParameterComma>
+ <WithinConstructorDeclarationParentheses>False</WithinConstructorDeclarationParentheses>
+ <BeforeIndexerDeclarationBracket>True</BeforeIndexerDeclarationBracket>
+ <WithinIndexerDeclarationBracket>False</WithinIndexerDeclarationBracket>
+ <BeforeIndexerDeclarationParameterComma>False</BeforeIndexerDeclarationParameterComma>
+ <AfterIndexerDeclarationParameterComma>True</AfterIndexerDeclarationParameterComma>
+ <BeforeDelegateDeclarationParentheses>False</BeforeDelegateDeclarationParentheses>
+ <BetweenEmptyDelegateDeclarationParentheses>False</BetweenEmptyDelegateDeclarationParentheses>
+ <BeforeDelegateDeclarationParameterComma>False</BeforeDelegateDeclarationParameterComma>
+ <AfterDelegateDeclarationParameterComma>False</AfterDelegateDeclarationParameterComma>
+ <WithinDelegateDeclarationParentheses>False</WithinDelegateDeclarationParentheses>
+ <NewParentheses>False</NewParentheses>
+ <IfParentheses>True</IfParentheses>
+ <WhileParentheses>True</WhileParentheses>
+ <ForParentheses>True</ForParentheses>
+ <ForeachParentheses>True</ForeachParentheses>
+ <CatchParentheses>True</CatchParentheses>
+ <SwitchParentheses>True</SwitchParentheses>
+ <LockParentheses>True</LockParentheses>
+ <UsingParentheses>True</UsingParentheses>
+ <AroundAssignmentParentheses>True</AroundAssignmentParentheses>
+ <AroundLogicalOperatorParentheses>True</AroundLogicalOperatorParentheses>
+ <AroundEqualityOperatorParentheses>True</AroundEqualityOperatorParentheses>
+ <AroundRelationalOperatorParentheses>True</AroundRelationalOperatorParentheses>
+ <AroundBitwiseOperatorParentheses>True</AroundBitwiseOperatorParentheses>
+ <AroundAdditiveOperatorParentheses>True</AroundAdditiveOperatorParentheses>
+ <AroundMultiplicativeOperatorParentheses>True</AroundMultiplicativeOperatorParentheses>
+ <AroundShiftOperatorParentheses>True</AroundShiftOperatorParentheses>
+ <AroundNullCoalescingOperator>True</AroundNullCoalescingOperator>
+ <WithinParentheses>False</WithinParentheses>
+ <WithinIfParentheses>False</WithinIfParentheses>
+ <WithinWhileParentheses>False</WithinWhileParentheses>
+ <WithinForParentheses>False</WithinForParentheses>
+ <WithinForEachParentheses>False</WithinForEachParentheses>
+ <WithinCatchParentheses>False</WithinCatchParentheses>
+ <WithinSwitchParentheses>False</WithinSwitchParentheses>
+ <WithinLockParentheses>False</WithinLockParentheses>
+ <WithinUsingParentheses>False</WithinUsingParentheses>
+ <WithinCastParentheses>False</WithinCastParentheses>
+ <WithinSizeOfParentheses>False</WithinSizeOfParentheses>
+ <BeforeSizeOfParentheses>False</BeforeSizeOfParentheses>
+ <WithinTypeOfParentheses>False</WithinTypeOfParentheses>
+ <WithinNewParentheses>False</WithinNewParentheses>
+ <BetweenEmptyNewParentheses>False</BetweenEmptyNewParentheses>
+ <BeforeNewParameterComma>False</BeforeNewParameterComma>
+ <AfterNewParameterComma>True</AfterNewParameterComma>
+ <BeforeTypeOfParentheses>False</BeforeTypeOfParentheses>
+ <WithinCheckedExpressionParantheses>False</WithinCheckedExpressionParantheses>
+ <ConditionalOperatorBeforeConditionSpace>True</ConditionalOperatorBeforeConditionSpace>
+ <ConditionalOperatorAfterConditionSpace>True</ConditionalOperatorAfterConditionSpace>
+ <ConditionalOperatorBeforeSeparatorSpace>True</ConditionalOperatorBeforeSeparatorSpace>
+ <ConditionalOperatorAfterSeparatorSpace>True</ConditionalOperatorAfterSeparatorSpace>
+ <SpacesWithinBrackets>False</SpacesWithinBrackets>
+ <SpacesBeforeBrackets>False</SpacesBeforeBrackets>
+ <BeforeBracketComma>False</BeforeBracketComma>
+ <AfterBracketComma>True</AfterBracketComma>
+ <SpacesBeforeForSemicolon>False</SpacesBeforeForSemicolon>
+ <SpacesAfterForSemicolon>True</SpacesAfterForSemicolon>
+ <SpacesAfterTypecast>False</SpacesAfterTypecast>
+ <SpacesBeforeArrayDeclarationBrackets>False</SpacesBeforeArrayDeclarationBrackets>
+ <BlankLinesBeforeUsings>0</BlankLinesBeforeUsings>
+ <BlankLinesAfterUsings>1</BlankLinesAfterUsings>
+ <BlankLinesBeforeFirstDeclaration>0</BlankLinesBeforeFirstDeclaration>
+ <BlankLinesBetweenTypes>1</BlankLinesBetweenTypes>
+ <BlankLinesBetweenFields>0</BlankLinesBetweenFields>
+ <BlankLinesBetweenEventFields>0</BlankLinesBetweenEventFields>
+ <BlankLinesBetweenMembers>1</BlankLinesBetweenMembers>
+</CSharpFormattingPolicy>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.csproj.FilesWrittenAbsolute.txt b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..442f8f4
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,26 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.ConsoleProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyCSharpFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.GtkSharp2Project.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.Library.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.CSharpBinding.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.AssemblyInfo.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.AllmanCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.InvariantTextStylePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.KRCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.MonoCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.SharpDevelopCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.WhitesmithsCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUCSharpPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Formatting.policies.GNUTextStylePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.MonoDevelop.CSharp.Refactoring.CodeIssues.NamingInspection.MonoNameConventionPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.PortableLibrary.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.C#.FileIcon
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-icon-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-project-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/MonoDevelop.CSharpBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/CSharpBinding/obj/Debug/MonoDevelop.CSharpBinding.dll.mdb
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.gtk-gui.gui.stetic b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.gtk-gui.gui.stetic
new file mode 100644
index 0000000..5f87e64
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.gtk-gui.gui.stetic
@@ -0,0 +1,2582 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.CSharp.Project.CodeGenerationPanelWidget" design-size="389 412">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox62">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label82">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>General Options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox56">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label81">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox65">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">6</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableOptimizationCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable _optimizations</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="generateOverflowChecksCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Generate overflow checks</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="generateXmlOutputCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Generate _xml documentation</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboPlatforms">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items">Any CPU
+x86
+x64
+Itanium</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboDebug">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items">Full
+Symbols only
+None</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Platform target:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Debug information:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label87">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Define S_ymbols:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">symbolsEntry</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="symbolsEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label93">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Warnings</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox48">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label73">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox67">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox60">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label85">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Warning Level:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">warningLevelSpinButton</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="warningLevelSpinButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">4</property>
+ <property name="PageIncrement">1</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">2</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label86">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Ignore warnings:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">warningLevelSpinButton</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="ignoreWarningsEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="warningsAsErrorsCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Treat warnings as _errors</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label94">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Additional Options</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label74">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label88">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Additional arguments:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">warningLevelSpinButton</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="additionalArgsEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.CSharp.Project.CompilerOptionsPanelWidget" design-size="471 438">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label82">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Code Generation</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label76">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table7">
+ <property name="MemberName" />
+ <property name="NRows">5</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="codepageEntry">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox57">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="compileTargetCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="iconEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compiler Code Page:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Win32 Icon:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label86">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compile _Target:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label88">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Main Class:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">mainClassEntry</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="mainClassEntry">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="noStdLibCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Do not reference mscorlib.dll</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label83">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Language Options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label75">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label74">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">C# Language Version:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="langVerCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="allowUnsafeCodeCheckButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Allow '_unsafe' code</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.CSharp.Formatting.CSharpFormattingPolicyPanelWidget" design-size="283 300">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Preview:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.CSharp.Formatting.NewFormattingProfileDialog" design-size="370 179">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">New Profile</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Profile name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryProfileName</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryProfileName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Initialize from profile:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">comboboxInitFrom</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxInitFrom">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.CSharp.Formatting.CSharpFormattingProfileDialog" design-size="880 551">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">424</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Category:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxCategories">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Notebook" id="notebookCategories">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">3</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox8">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewIndentOptions">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewBracePositions">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">10</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryAfterUsings">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBeforeFirstDeclaration">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBeforUsings">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBetweenEvents">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBetweenFields">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBetweenMembers">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">9</property>
+ <property name="BottomAttach">10</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryBetweenTypes">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Blank lines in namespaces</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Blank lines in types</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Blank lines in compilation unit</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label15">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Before using declaration:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label16">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">After using declaration:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label19">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Between type declarations:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label20">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Before first declaration:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label21">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Between field declarations:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label22">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Between other member declarations:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">9</property>
+ <property name="BottomAttach">10</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label23">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Between simple event declarations:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label14">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page5</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow3">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewWrappingCategory">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page6</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow2">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewInsertWhiteSpaceCategory">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page3</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow4">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewNewLines">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page4</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Preview:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.CSharp.Refactoring.CodeIssues.NameConventionPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewConventions">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Window" id="MonoDevelop.CodeGeneration.GenerateCodeWindow" design-size="288 369">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">GenerateCodeWindow</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Decorated">False</property>
+ <property name="SkipPagerHint">True</property>
+ <property name="SkipTaskbarHint">True</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Generate</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewGenerateActions</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelDescription">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.CSharp.Refactoring.CodeIssues.NameConventionEditRuleDialog" design-size="646 508">
+ <property name="MemberName" />
+ <property name="WidthRequest">640</property>
+ <property name="HeightRequest">480</property>
+ <property name="Title" translatable="yes">Edit Naming Rule</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Resizable">False</property>
+ <property name="DestroyWithParent">True</property>
+ <property name="SkipPagerHint">True</property>
+ <property name="SkipTaskbarHint">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Rule:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entry1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryRuleName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewEntities">
+ <property name="MemberName" />
+ <property name="WidthRequest">0</property>
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAccessibility">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Affected entities:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Accessibility:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Static/Non Static</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonStatic">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Static member and types</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonInstanceMembers">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Instance members and locals</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryPrefix">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPrefixAllowed">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entrySuffix">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Prefix:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Suffix:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Optional Prefixes:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Style:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonPascalCase">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_PascalCase</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonCamelCase">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_camelCase</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonAllUpper">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_ALL__Upper</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonAllLower">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">all__l_ower</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonFirstUpper">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_First__upper</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-icon-32.png b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-icon-32.png
new file mode 100644
index 0000000..460dbcc
Binary files /dev/null and b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-icon-32.png differ
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-project-16.png b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-project-16.png
new file mode 100644
index 0000000..0767e45
Binary files /dev/null and b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.icons.csharp-project-16.png differ
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.md1format.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.md1format.xml
new file mode 100644
index 0000000..73b05d4
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.md1format.xml
@@ -0,0 +1,20 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.CSharp.Project.CSharpCompilerParameters">
+ <LiteralProperty name="compiler" value="Mcs" />
+ <ItemProperty member="warninglevel" name = "warninglevel"/>
+ <ItemProperty member="noWarnings" name="nowarn" defaultValue=""/>
+ <ItemProperty member="optimize" name="optimize"/>
+ <ItemProperty member="unsafecode" name="unsafecodeallowed"/>
+ <ItemProperty member="generateOverflowChecks" name="generateoverflowchecks"/>
+ <ItemProperty member="mainclass" name="mainclass" defaultValue=""/>
+ <ItemProperty member="definesymbols" name="definesymbols" defaultValue="" />
+ <ItemProperty member="generateXmlDocumentation" name="generatexmldocumentation"/>
+ <ItemProperty member="win32Icon" name="win32Icon" defaultValue="" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ <ItemProperty member="win32Resource" name="win32Resource" defaultValue="" />
+ <ItemProperty member="codePage" name="codepage" defaultValue="0"/>
+ <ItemProperty member="additionalArgs" name="additionalargs" defaultValue="" />
+ <ItemProperty member="LangVersion" name="langversion" defaultValue="Default"/>
+ <ItemProperty member="treatWarningsAsErrors" name="warningsAsErrors" defaultValue="False"/>
+ <ItemProperty member="warningsNotAsErrors" name="warningsNotAsErrors" defaultValue=""/>
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.AssemblyInfo.xft.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.AssemblyInfo.xft.xml
new file mode 100644
index 0000000..0c67485
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.AssemblyInfo.xft.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Michael Hutchinson"
+ Created="2007/12/13"
+ LastModified="2007/12/13">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Assembly Information</_Name>
+ <_Category>Misc</_Category>
+ <Icon>md-text-file-icon</Icon>
+ <LanguageName>C#</LanguageName>
+ <DefaultFilename IsFixed="True">AssemblyInfo.cs</DefaultFilename>
+ <_Description>A file defining assembly information attributes.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="AssemblyInfo.cs" RequireProject="True"/>
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <File name="Properties/AssemblyInfo.cs" AddStandardHeader="True">
+ <![CDATA[using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("${ProjectName}")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("${AuthorCompany}")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("${AuthorCopyright}")]
+[assembly: AssemblyTrademark("${AuthorTrademark}")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+]]></File>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.ConsoleProject.xpt.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.ConsoleProject.xpt.xml
new file mode 100644
index 0000000..ecd138d
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.ConsoleProject.xpt.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<Template originator = "Mike Krueger"
+ created = "06/10/2001"
+ lastModified = "02/01/2003">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>C#</_Category>
+ <Icon>md-project-console|res:csharp-icon-32.png</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates a new C# console project.</_Description>
+ <DefaultFilename>ConsoleProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Program.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options ExternalConsole="True"/>
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+ <Files>
+ <File name="Program.cs" AddStandardHeader="True"><![CDATA[using System;
+
+namespace ${Namespace}
+{
+ class MainClass
+ {
+ public static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World!");
+ }
+ }
+}]]></File>
+ <FileTemplateReference TemplateID="CSharpAssemblyInfo" name="AssemblyInfo.cs" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyCSharpFile.xft.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyCSharpFile.xft.xml
new file mode 100644
index 0000000..a845de4
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyCSharpFile.xft.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Krueger" Language="C#" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty File</_Name>
+ <Icon>md-text-file-icon</Icon>
+ <_Category>General</_Category>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates an empty C# file.</_Description>
+ <DefaultFilename>EmptyCSharpFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".cs" DefaultName="EmptyCSharpfile" AddStandardHeader="True">
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyProject.xpt.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyProject.xpt.xml
new file mode 100644
index 0000000..d7043c2
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.EmptyProject.xpt.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<Template originator = "Mike Krueger"
+ created = "01/10/2001"
+ lastModified = "02/01/2003">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Empty Project</_Name>
+ <_Category>C#</_Category>
+ <Icon>md-project|res:csharp-icon-32.png</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates an empty C# project.</_Description>
+ <DefaultFilename>EmptyProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "."/>
+ </Combine>
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.GtkSharp2Project.xpt.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.GtkSharp2Project.xpt.xml
new file mode 100644
index 0000000..0af987f
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.GtkSharp2Project.xpt.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<Template originator = "Ben Motmans"
+ created = "02/16/2005"
+ lastModified = "02/16/2005">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Gtk# 2.0 Project</_Name>
+ <_Category>C#</_Category>
+ <Icon>md-project-gui|res:csharp-icon-32.png</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates a Gtk# 2.0 project.</_Description>
+ <DefaultFilename>GtkSharpProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Program.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options Target = "WinExe"/>
+
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" SpecificVersion="false" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="atk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ </References>
+
+ <Files>
+
+ <!-- A window template -->
+
+ <Widget>
+ <SteticTemplate>
+ <widget class="Gtk.Window" id="MainWindow" design-size="400 300">
+ <property name="Title" translatable="yes">${Name}</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <signal name="DeleteEvent" handler="OnDeleteEvent" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </SteticTemplate>
+
+ <!-- Class bound to the window -->
+
+ <File name="MainWindow.cs" AddStandardHeader="True">
+<![CDATA[using System;
+using Gtk;
+
+public partial class MainWindow: Gtk.Window
+{
+ public MainWindow (): base (Gtk.WindowType.Toplevel)
+ {
+ Build ();
+ }
+
+ protected void OnDeleteEvent (object sender, DeleteEventArgs a)
+ {
+ Application.Quit ();
+ a.RetVal = true;
+ }
+}]]>
+ </File>
+ </Widget>
+
+ <!-- The main class -->
+
+ <File name="Program.cs" AddStandardHeader="True">
+<![CDATA[using System;
+using Gtk;
+
+namespace ${Namespace}
+{
+ class MainClass
+ {
+ public static void Main (string[] args)
+ {
+ Application.Init ();
+ MainWindow win = new MainWindow ();
+ win.Show ();
+ Application.Run ();
+ }
+ }
+}]]>
+ </File>
+
+ <FileTemplateReference TemplateID="CSharpAssemblyInfo" name="AssemblyInfo.cs" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.Library.xpt.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.Library.xpt.xml
new file mode 100644
index 0000000..b40abfb
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.Library.xpt.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<Template originator = "Mike Krueger"
+ created = "02/01/2003"
+ lastModified = "02/01/2003">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Library</_Name>
+ <_Category>C#</_Category>
+ <Icon>md-project-library|res:csharp-icon-32.png</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates an empty C# class library</_Description>
+ <DefaultFilename>EmptyLibrary</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "MyClass.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options Target = "Library" PauseConsoleOutput = "False" />
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+ <Files>
+ <FileTemplateReference TemplateID="EmptyClass" name="MyClass.cs" />
+ <FileTemplateReference TemplateID="CSharpAssemblyInfo" name="AssemblyInfo.cs" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.PortableLibrary.xpt.xml b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.PortableLibrary.xpt.xml
new file mode 100644
index 0000000..8063b48
--- /dev/null
+++ b/src/addins/CSharpBinding/obj/Debug/CSharpBinding.templates.PortableLibrary.xpt.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<Template originator = "Jeffrey Stedfast"
+ created = "04/03/2012"
+ lastModified = "07/12/2013">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Portable Library</_Name>
+ <_Category>C#</_Category>
+ <Icon>md-project-library|res:csharp-icon-32.png</Icon>
+ <LanguageName>C#</LanguageName>
+ <_Description>Creates a C# library that can be used in Windows, Silverlight, Windows Phone, MonoTouch and Mono for Android.</_Description>
+ <DefaultFilename>PortableLibrary</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "MyClass.cs"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = "." type = "PortableDotNet">
+ <Options Target = "Library" TargetFrameworkVersion = ".NETPortable,Version=v4.0,Profile=Profile136"/>
+ <References>
+ <Reference type="Gac" refto="System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
+ <Reference type="Gac" refto="System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
+ <Reference type="Gac" refto="System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
+ </References>
+ <Files>
+ <FileTemplateReference TemplateID="EmptyClass" name="MyClass.cs" />
+ <FileTemplateReference TemplateID="CSharpAssemblyInfo" name="AssemblyInfo.cs" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/CSharpBinding/templates/ConsoleProject.xpt.xml b/src/addins/CSharpBinding/templates/ConsoleProject.xpt.xml
index 6dff2b9..ecd138d 100644
--- a/src/addins/CSharpBinding/templates/ConsoleProject.xpt.xml
+++ b/src/addins/CSharpBinding/templates/ConsoleProject.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project-console|res:csharp-icon-32.png</Icon>
<LanguageName>C#</LanguageName>
<_Description>Creates a new C# console project.</_Description>
+ <DefaultFilename>ConsoleProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/CSharpBinding/templates/EmptyCSharpFile.xft.xml b/src/addins/CSharpBinding/templates/EmptyCSharpFile.xft.xml
index 380c8e7..a845de4 100644
--- a/src/addins/CSharpBinding/templates/EmptyCSharpFile.xft.xml
+++ b/src/addins/CSharpBinding/templates/EmptyCSharpFile.xft.xml
@@ -7,6 +7,7 @@
<_Category>General</_Category>
<LanguageName>C#</LanguageName>
<_Description>Creates an empty C# file.</_Description>
+ <DefaultFilename>EmptyCSharpFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/addins/CSharpBinding/templates/EmptyProject.xpt.xml b/src/addins/CSharpBinding/templates/EmptyProject.xpt.xml
index 4183e0a..d7043c2 100644
--- a/src/addins/CSharpBinding/templates/EmptyProject.xpt.xml
+++ b/src/addins/CSharpBinding/templates/EmptyProject.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project|res:csharp-icon-32.png</Icon>
<LanguageName>C#</LanguageName>
<_Description>Creates an empty C# project.</_Description>
+ <DefaultFilename>EmptyProject</DefaultFilename>
</TemplateConfiguration>
<Combine name = "${ProjectName}" directory = ".">
diff --git a/src/addins/CSharpBinding/templates/GtkSharp2Project.xpt.xml b/src/addins/CSharpBinding/templates/GtkSharp2Project.xpt.xml
index b5a8236..0af987f 100644
--- a/src/addins/CSharpBinding/templates/GtkSharp2Project.xpt.xml
+++ b/src/addins/CSharpBinding/templates/GtkSharp2Project.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project-gui|res:csharp-icon-32.png</Icon>
<LanguageName>C#</LanguageName>
<_Description>Creates a Gtk# 2.0 project.</_Description>
+ <DefaultFilename>GtkSharpProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/CSharpBinding/templates/Library.xpt.xml b/src/addins/CSharpBinding/templates/Library.xpt.xml
index 502208b..b40abfb 100644
--- a/src/addins/CSharpBinding/templates/Library.xpt.xml
+++ b/src/addins/CSharpBinding/templates/Library.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project-library|res:csharp-icon-32.png</Icon>
<LanguageName>C#</LanguageName>
<_Description>Creates an empty C# class library</_Description>
+ <DefaultFilename>EmptyLibrary</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/CSharpBinding/templates/PortableLibrary.xpt.xml b/src/addins/CSharpBinding/templates/PortableLibrary.xpt.xml
index dda1244..8063b48 100644
--- a/src/addins/CSharpBinding/templates/PortableLibrary.xpt.xml
+++ b/src/addins/CSharpBinding/templates/PortableLibrary.xpt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Template originator = "Jeffrey Stedfast"
created = "04/03/2012"
- lastModified = "04/03/2012">
+ lastModified = "07/12/2013">
<!-- Template Header -->
<TemplateConfiguration>
@@ -9,7 +9,8 @@
<_Category>C#</_Category>
<Icon>md-project-library|res:csharp-icon-32.png</Icon>
<LanguageName>C#</LanguageName>
- <_Description>Creates a C# library that can be used in Windows, Silverlight, Windows Phone, Xbox 360, MonoTouch and Mono for Android.</_Description>
+ <_Description>Creates a C# library that can be used in Windows, Silverlight, Windows Phone, MonoTouch and Mono for Android.</_Description>
+ <DefaultFilename>PortableLibrary</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
@@ -24,7 +25,7 @@
</Options>
<Project name = "${ProjectName}" directory = "." type = "PortableDotNet">
- <Options Target = "Library" TargetFrameworkVersion = ".NETPortable,Version=v4.0,Profile=Profile1"/>
+ <Options Target = "Library" TargetFrameworkVersion = ".NETPortable,Version=v4.0,Profile=Profile136"/>
<References>
<Reference type="Gac" refto="System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
<Reference type="Gac" refto="System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" />
diff --git a/src/addins/ChangeLogAddIn/ChangeLogAddIn.addin.xml b/src/addins/ChangeLogAddIn/ChangeLogAddIn.addin.xml
index 61123cd..ff818cc 100644
--- a/src/addins/ChangeLogAddIn/ChangeLogAddIn.addin.xml
+++ b/src/addins/ChangeLogAddIn/ChangeLogAddIn.addin.xml
@@ -6,16 +6,16 @@
url = "http://monodevelop.com"
description = "Add-in for working with ChangeLog files"
category = "Version Control"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="ChangeLogAddIn.dll" />
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="VersionControl" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/VersionControl/CommitDialogExtensions">
diff --git a/src/addins/ChangeLogAddIn/ChangeLogAddIn.csproj b/src/addins/ChangeLogAddIn/ChangeLogAddIn.csproj
index 2ecefcc..9cd114e 100644
--- a/src/addins/ChangeLogAddIn/ChangeLogAddIn.csproj
+++ b/src/addins/ChangeLogAddIn/ChangeLogAddIn.csproj
@@ -67,11 +67,6 @@
<Name>MonoDevelop.Debugger</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj">
<Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project>
<Name>MonoDevelop.DesignerSupport</Name>
@@ -82,6 +77,11 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Posix" />
diff --git a/src/addins/ChangeLogAddIn/Makefile.in b/src/addins/ChangeLogAddIn/Makefile.in
index dc1432f..361f994 100644
--- a/src/addins/ChangeLogAddIn/Makefile.in
+++ b/src/addins/ChangeLogAddIn/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.ChangeLogAddIn.addin.xml b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.ChangeLogAddIn.addin.xml
new file mode 100644
index 0000000..ff818cc
--- /dev/null
+++ b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.ChangeLogAddIn.addin.xml
@@ -0,0 +1,65 @@
+<Addin id = "ChangeLogAddIn"
+ namespace = "MonoDevelop"
+ name = "ChangeLog Add-in"
+ author = "Jacob Ilsø Christensen"
+ copyright = "LGPL"
+ url = "http://monodevelop.com"
+ description = "Add-in for working with ChangeLog files"
+ category = "Version Control"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="ChangeLogAddIn.dll" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/VersionControl/CommitDialogExtensions">
+ <Class class="MonoDevelop.ChangeLogAddIn.CommitDialogExtensionWidget" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.ChangeLogAddIn.ChangeLogCommands.InsertEntry"
+ defaultHandler = "MonoDevelop.ChangeLogAddIn.InsertEntryHandler"
+ _label = "Insert ChangeLog Entry" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/MainMenu/Edit">
+ <CommandItem id="MonoDevelop.ChangeLogAddIn.ChangeLogCommands.InsertEntry" insertafter="Separator5"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/VersionControl">
+ <ComplexCondition>
+ <Or>
+ <Condition id="ItemType" value="SolutionItem" />
+ <Condition id="ItemType" value="Solution" />
+ </Or>
+ <Section id = "ChangeLogIntegration" _label = "ChangeLog Integration" fill="true" class="MonoDevelop.ChangeLogAddIn.ProjectOptionPanel" />
+ </ComplexCondition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/VersionControl">
+ <Section id = "DefaultChangeLogIntegration" _label = "ChangeLog Integration" fill="true" class="MonoDevelop.ChangeLogAddIn.ProjectOptionPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels/VersionControl">
+ <Section id = "DefaultChangeLogIntegration" _label = "ChangeLog Integration" fill="true" class="MonoDevelop.ChangeLogAddIn.ProjectOptionPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets/Mono" >
+ <Policies resource="Policies.xml"/>
+ </Extension>
+
+ <!-- for MD1 migration -->
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.SolutionItem"
+ name = "MonoDevelop.ChangeLogAddIn.ChangeLogInfo" type = "MonoDevelop.ChangeLogAddIn.OldChangeLogData" />
+ <ItemProperty class = "MonoDevelop.Projects.Solution"
+ name = "MonoDevelop.ChangeLogAddIn.ChangeLogInfo" type = "MonoDevelop.ChangeLogAddIn.OldChangeLogData" />
+ </Extension>
+
+</Addin>
diff --git a/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.Policies.xml b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.Policies.xml
new file mode 100644
index 0000000..a727ac5
--- /dev/null
+++ b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.Policies.xml
@@ -0,0 +1,3 @@
+<ChangeLogPolicy id="Mono" UpdateMode="Directory" VcsIntegration="Enabled" allowDiffSerialize="True">
+ <MessageStyle Header="${Date:yyyy-MM-dd} ${AuthorName} <${AuthorEmail}>

" Indent="	" FirstFilePrefix="* " FileSeparator=":
* " LastFilePostfix=": " LineAlign="2" InterMessageLines="1" IncludeDirectoryPaths="False"/>
+</ChangeLogPolicy>
\ No newline at end of file
diff --git a/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.csproj.FilesWrittenAbsolute.txt b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..b19a915
--- /dev/null
+++ b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.ChangeLogAddIn.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.Policies.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/ChangeLogAddIn/ChangeLogAddIn.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/ChangeLogAddIn/ChangeLogAddIn.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.dll.mdb
diff --git a/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.gtk-gui.gui.stetic b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.gtk-gui.gui.stetic
new file mode 100644
index 0000000..cc2a22e
--- /dev/null
+++ b/src/addins/ChangeLogAddIn/obj/Debug/ChangeLogAddIn.gtk-gui.gui.stetic
@@ -0,0 +1,534 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/ChangeLogAddIn/ChangeLogAddIn.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.ChangeLogAddIn.AddLogEntryDialog" design-size="573 510">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">ChangeLog</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">116</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Modified ChangeLog files:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="fileList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">ChangeLog entry:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Text" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxNewFile">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image36">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-new SmallToolbar</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">This ChangeLog file does not exist and will be created.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxNoFile">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image37">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-warning SmallToolbar</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">This ChangeLog file does not exist and will <b>not</b> be created.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image38">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-info SmallToolbar</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">To change the ChangeLog creation and update policies, open the options dialog of the project or solution and click on the 'ChangeLog Integration" section.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="ChangeLogAddIn.AddLogEntryDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button7">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button119">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.ChangeLogAddIn.ProjectOptionPanelWidget" design-size="542 406">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="noneRadioButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label">radiobutton1</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Disable ChangeLog support</b>
+No ChangeLog entries will be generated for this project.</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="nearestRadioButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Custom policy</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="LabelProp" translatable="yes"><b>Update nearest ChangeLog</b>
+The nearest ChangeLog file in the directory hierarchy will be updated (below the commit directory). If none is found, a warning message will be shown. ChangeLog files will never be automatically created.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="oneChangeLogInProjectRootDirectoryRadioButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">One ChangeLog in the project root directory</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="LabelProp" translatable="yes"><b>Single project ChangeLog</b>
+All changes done in the project files will be logged in a single ChangeLog file, located at the project root directory. The ChangeLog file will be created if it doesn't exist.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="oneChangeLogInEachDirectoryRadioButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">One ChangeLog in each directory</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="LabelProp" translatable="yes"><b>One ChangeLog in each directory</b>
+File changes will be logged in a ChangeLog located at the file's directory. The ChangeLog file will be created if it doesn't exist.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="TopPadding">18</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkVersionControl">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Integrate with _version control</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkRequireOnCommit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Require ChangeLog entries for all files when committing</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="ValueChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">ChangeLog Generation</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="MonoDevelop.VersionControl.CommitMessageStylePanelWidget" id="messageWidget">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <signal name="Changed" handler="OnMessageWidgetChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Message Style</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/Deployment/Makefile.in b/src/addins/Deployment/Makefile.in
index 0ce3988..9202b21 100644
--- a/src/addins/Deployment/Makefile.in
+++ b/src/addins/Deployment/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -260,11 +259,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -328,6 +327,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -391,6 +394,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -550,21 +567,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/Makefile.in b/src/addins/Deployment/MonoDevelop.Deployment.Linux/Makefile.in
index e10046c..def4b57 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment.Linux/Makefile.in
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/MonoDevelop.Deployment.Linux.addin.xml b/src/addins/Deployment/MonoDevelop.Deployment.Linux/MonoDevelop.Deployment.Linux.addin.xml
index 0502597..82b9a77 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment.Linux/MonoDevelop.Deployment.Linux.addin.xml
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/MonoDevelop.Deployment.Linux.addin.xml
@@ -6,7 +6,7 @@
url = "http://www.monodevelop.com"
description = "Provides basic deployment services for Linux"
category = "Deployment"
- version = "4.0.5"
+ version = "4.0.12"
flags = "Hidden"
compatVersion = "4.0">
@@ -15,9 +15,9 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="Deployment" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Ide/Commands">
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/app.desktop.xft.xml b/src/addins/Deployment/MonoDevelop.Deployment.Linux/app.desktop.xft.xml
index 5760300..003ee41 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment.Linux/app.desktop.xft.xml
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/app.desktop.xft.xml
@@ -6,10 +6,11 @@
<Icon>md-gui-file</Icon>
<_Category>Deployment</_Category>
<_Description>Creates a Desktop Entry file.</_Description>
+ <DefaultFilename>app</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
-<File DefaultExtension=".desktop" DefaultName="app">
+<File DefaultExtension=".desktop">
[Desktop Entry]
Encoding=UTF-8
Type=Application
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.DesktopInfo.xml b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.DesktopInfo.xml
new file mode 100644
index 0000000..b540761
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.DesktopInfo.xml
@@ -0,0 +1,146 @@
+<DesktopInfo>
+
+<Categories>
+ <Category name="AudioVideo" _label="A multimedia (audio/video) application" main="yes"/>
+ <Category name="Audio" _label="An audio application" main="yes" related="AudioVideo"/>
+ <Category name="Video" _label="A video application" main="yes" related="AudioVideo"/>
+ <Category name="Development" _label="An application for development" main="yes"/>
+ <Category name="Education" _label="Educational software" main="yes"/>
+ <Category name="Game" _label="A game" main="yes"/>
+ <Category name="Graphics" _label="Graphical application" main="yes"/>
+ <Category name="Network" _label="Network application such as a web browser" main="yes"/>
+ <Category name="Office" _label="An office type application" main="yes"/>
+ <Category name="Settings" _label="Settings applications" main="yes"/>
+ <Category name="System" _label="System application, 'System Tools' such as say a log viewer or network monitor" main="yes"/>
+ <Category name="Utility" _label="Small utility application, 'Accessories'" main="yes"/>
+ <Category name="Building" _label="A tool to build applications" related="Development" />
+ <Category name="Debugger" _label="A tool to debug applications" related="Development" />
+ <Category name="IDE" _label="IDE application" related="Development" />
+ <Category name="GUIDesigner" _label="A GUI designer application" related="Development" />
+ <Category name="Profiling" _label="A profiling tool" related="Development" />
+ <Category name="RevisionControl" _label="Applications like cvs or subversion" related="Development" />
+ <Category name="Translation" _label="A translation tool" related="Development" />
+ <Category name="Calendar" _label="Calendar application" related="Office"/>
+ <Category name="ContactManagement" _label="E.g. an address book" related="Office"/>
+ <Category name="Database" _label="Application to manage a database" related="Office;Development;AudioVideo"/>
+ <Category name="Dictionary" _label="A dictionary" related="Office;TextTools"/>
+ <Category name="Chart" _label="Chart application" related="Office"/>
+ <Category name="Email" _label="Email application" related="Office;Network"/>
+ <Category name="Finance" _label="Application to manage your finance" related="Office"/>
+ <Category name="FlowChart" _label="A flowchart application" related="Office"/>
+ <Category name="PDA" _label="Tool to manage your PDA" related="Office"/>
+ <Category name="ProjectManagement" _label="Project management application" related="Office;Development"/>
+ <Category name="Presentation" _label="Presentation software" related="Office"/>
+ <Category name="Spreadsheet" _label="A spreadsheet" related="Office"/>
+ <Category name="WordProcessor" _label="A word processor" related="Office"/>
+ <Category name="2DGraphics" _label="2D based graphical application" related="Graphics"/>
+ <Category name="VectorGraphics" _label="Vector based graphical application" related="Graphics;2DGraphics"/>
+ <Category name="RasterGraphics" _label="Raster based graphical application" related="Graphics;2DGraphics"/>
+ <Category name="3DGraphics" _label="3D based graphical application" related="Graphics"/>
+ <Category name="Scanning" _label="Tool to scan a file/text" related="Graphics"/>
+ <Category name="OCR" _label="Optical character recognition application" related="Graphics;Scanning"/>
+ <Category name="Photography" _label="Camera tools, etc." related="Graphics;Office"/>
+ <Category name="Publishing" _label="Desktop Publishing applications and Color Management tools" related="Graphics;Office"/>
+ <Category name="Viewer" _label="Tool to view e.g. a graphic or pdf file" related="Graphics;Office"/>
+ <Category name="TextTools" _label="A text tool utility" related="Utility"/>
+ <Category name="DesktopSettings" _label="Configuration tool for the GUI" related="Settings"/>
+ <Category name="HardwareSettings" _label="A tool to manage hardware components, like sound cards, video cards or printers" related="Settings"/>
+ <Category name="Printing" _label="A tool to manage printers" related="HardwareSettings;Settings"/>
+ <Category name="PackageManager" _label="A package manager application" related="Settings"/>
+ <Category name="Dialup" _label="A dial-up program" related="Network"/>
+ <Category name="InstantMessaging" _label="An instant messaging client" related="Network"/>
+ <Category name="Chat" _label="A chat client" related="Network"/>
+ <Category name="IRCClient" _label="An IRC client" related="Network"/>
+ <Category name="FileTransfer" _label="Tools like FTP or P2P programs" related="Network"/>
+ <Category name="HamRadio" _label="HAM radio software" related="Network;Audio"/>
+ <Category name="News" _label="A news reader or a news ticker" related="Network"/>
+ <Category name="P2P" _label="A P2P program" related="Network"/>
+ <Category name="RemoteAccess" _label="A tool to remotely manage your PC" related="Network"/>
+ <Category name="Telephony" _label="Telephony via PC" related="Network"/>
+ <Category name="TelephonyTools" _label="Telephony tools, to dial a number, manage PBX, ..." related="Utility"/>
+ <Category name="VideoConference" _label="Video Conference software" related="Network"/>
+ <Category name="WebBrowser" _label="A web browser" related="Network"/>
+ <Category name="WebDevelopment" _label="A tool for web developers" related="Network;Development"/>
+ <Category name="Midi" _label="An app related to MIDI" related="AudioVideo;Audio"/>
+ <Category name="Mixer" _label="Just a mixer" related="AudioVideo;Audio"/>
+ <Category name="Sequencer" _label="A sequencer" related="AudioVideo;Audio"/>
+ <Category name="Tuner" _label="A tuner" related="AudioVideo;Audio"/>
+ <Category name="TV" _label="A TV application" related="AudioVideo;Video"/>
+ <Category name="AudioVideoEditing" _label="Application to edit audio/video files" related="Audio;Video;AudioVideo"/>
+ <Category name="Player" _label="Application to play audio/video files" related="Audio;Video;AudioVideo"/>
+ <Category name="Recorder" _label="Application to record audio/video files" related="Audio;Video;AudioVideo"/>
+ <Category name="DiscBurning" _label="Application to burn a disc" related="AudioVideo"/>
+ <Category name="ActionGame" _label="An action game" related="Game"/>
+ <Category name="AdventureGame" _label="Adventure style game" related="Game"/>
+ <Category name="ArcadeGame" _label="Arcade style game" related="Game"/>
+ <Category name="BoardGame" _label="A board game" related="Game"/>
+ <Category name="BlocksGame" _label="Falling blocks game" related="Game"/>
+ <Category name="CardGame" _label="A card game" related="Game"/>
+ <Category name="KidsGame" _label="A game for kids" related="Game"/>
+ <Category name="LogicGame" _label="Logic games like puzzles, etc" related="Game"/>
+ <Category name="RolePlaying" _label="A role playing game" related="Game"/>
+ <Category name="Simulation" _label="A simulation game" related="Game"/>
+ <Category name="SportsGame" _label="A sports game" related="Game"/>
+ <Category name="StrategyGame" _label="A strategy game" related="Game"/>
+ <Category name="Art" _label="Software to teach arts" related="Education"/>
+ <Category name="Construction" _label="Construction" related="Education"/>
+ <Category name="Music" _label="Musical software" related="AudioVideo;Education"/>
+ <Category name="Languages" _label="Software to learn foreign languages" related="Education"/>
+ <Category name="Science" _label="Scientific software" related="Education"/>
+ <Category name="ArtificialIntelligence" _label="Artificial Intelligence software" related="Education;Science"/>
+ <Category name="Astronomy" _label="Astronomy software" related="Education;Science"/>
+ <Category name="Biology" _label="Biology software" related="Education;Science"/>
+ <Category name="Chemistry" _label="Chemistry software" related="Education;Science"/>
+ <Category name="ComputerScience" _label="ComputerSience software" related="Education;Science"/>
+ <Category name="DataVisualization" _label="Data visualization software" related="Education;Science"/>
+ <Category name="Economy" _label="Economy software" related="Education"/>
+ <Category name="Electricity" _label="Electricity software" related="Education;Science"/>
+ <Category name="Geography" _label="Geography software" related="Education"/>
+ <Category name="Geology" _label="Geology software" related="Education;Science"/>
+ <Category name="Geoscience" _label="Geoscience software" related="Education;Science"/>
+ <Category name="History" _label="History software" related="Education"/>
+ <Category name="ImageProcessing" _label="Image Processing software" related="Education;Science"/>
+ <Category name="Literature" _label="Literature software" related="Education"/>
+ <Category name="Math" _label="Math software" related="Education;Science"/>
+ <Category name="NumericalAnalysis" _label="Numerical analysis software" related="Education;Science;Math"/>
+ <Category name="MedicalSoftware" _label="Medical software" related="Education;Science"/>
+ <Category name="Physics" _label="Physics software" related="Education;Science"/>
+ <Category name="Robotics" _label="Robotics software" related="Education;Science"/>
+ <Category name="Sports" _label="Sports software" related="Education"/>
+ <Category name="ParallelComputing" _label="Parallel computing software" related="Education;Science;ComputerScience"/>
+ <Category name="Amusement" _label="A simple amusement"/>
+ <Category name="Archiving" _label="A tool to archive/backup data" related="Utility"/>
+ <Category name="Compression" _label="A tool to manage compressed data/archives" related="Utility;Archiving"/>
+ <Category name="Electronics" _label="Electronics software, e.g. a circuit designer"/>
+ <Category name="Emulator" _label="Emulator of another platform, such as a DOS emulator" related="System;Game"/>
+ <Category name="Engineering" _label="Engineering software, e.g. CAD programs"/>
+ <Category name="FileTools" _label="A file tool utility" related="Utility;System"/>
+ <Category name="FileManager" _label="A file manager" related="System;FileTools"/>
+ <Category name="TerminalEmulator" _label="A terminal emulator application" related="System"/>
+ <Category name="Filesystem" _label="A file system tool" related="System"/>
+ <Category name="Monitor" _label="Monitor application/applet that monitors some resource or activity" related="System"/>
+ <Category name="Security" _label="A security tool" related="Settings;System"/>
+ <Category name="Accessibility" _label="Accessibility" related="Settings;Utility"/>
+ <Category name="Calculator" _label="A calculator" related="Utility"/>
+ <Category name="Clock" _label="A clock application/applet" related="Utility"/>
+ <Category name="TextEditor" _label="A text editor" related="Utility"/>
+ <Category name="Documentation" _label="Help or documentation"/>
+ <Category name="Core" _label="Important application, core to the desktop such as a file manager or a help browser"/>
+ <Category name="KDE" _label="Application based on KDE libraries" related="QT"/>
+ <Category name="GNOME" _label="Application based on GNOME libraries" related="GTK"/>
+ <Category name="GTK" _label="Application based on GTK+ libraries "/>
+ <Category name="QT" _label="Application based on Qt libraries "/>
+ <Category name="Motif" _label="Application based on Motif libraries"/>
+ <Category name="Java" _label="Application based on Java GUI libraries, such as AWT or Swing"/>
+ <Category name="ConsoleOnly" _label="Application that only works inside a terminal (text-based or command line application)"/>
+</Categories>
+
+<Environments>
+ <Environment name="GNOME" _label="GNOME Desktop"/>
+ <Environment name="KDE" _label="KDE Desktop"/>
+ <Environment name="ROX" _label="ROX Desktop"/>
+ <Environment name="XFCE" _label="XFCE Desktop"/>
+ <Environment name="Old" _label="Legacy menu systems"/>
+</Environments>
+
+</DesktopInfo>
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.addin.xml b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.addin.xml
new file mode 100644
index 0000000..82b9a77
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.addin.xml
@@ -0,0 +1,101 @@
+<Addin id = "Deployment.Linux"
+ namespace = "MonoDevelop"
+ name = "Deployment Services for Linux"
+ author = "Lluis Sanchez, Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com"
+ description = "Provides basic deployment services for Linux"
+ category = "Deployment"
+ version = "4.0.12"
+ flags = "Hidden"
+ compatVersion = "4.0">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.Deployment.Linux.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployDirectoryResolvers">
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployServiceExtensions">
+ <Class id="Deployment.Linux" insertbefore="PrepareDeploy" class = "MonoDevelop.Deployment.Linux.LinuxDeployExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+<!-- <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.TargetDirectoryId" type = "System.String" />
+--> </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+<!-- <NodeBuilder class = "MonoDevelop.Deployment.NodeBuilders.PackagingProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Deployment.NodeBuilders.PackageNodeBuilder"/>
+--> </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons" extension-nodes="StockIcon" description="Stock icons|Available from MonoDevelop.Core.Gui.Services.Resources.">
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <Condition id="Platform" value="linux">
+ <DisplayBinding id = "Desktop Entry" insertbefore="DefaultDisplayBinding"
+ class = "MonoDevelop.Deployment.Linux.DotDesktopDisplayBinding"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Deployment">
+ <ComplexCondition>
+ <And>
+ <Condition id="ItemType" value="Project" />
+ <Condition id="Platform" value="linux" />
+ </And>
+ <Section id = "LinuxDeployment" _label = "Linux Deployment Settings" class="MonoDevelop.Deployment.Linux.BasicOptionPanel"/>
+ </ComplexCondition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployDirectoryResolvers">
+ <Condition id="Platform" value="linux">
+ <Class class = "MonoDevelop.Deployment.Linux.LinuxDirectoryResolver" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.SolutionItem"
+ name = "Deployment.LinuxDeployData" type = "MonoDevelop.Deployment.Linux.LinuxDeployData" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployDirectories">
+ <Condition id="Platform" value="linux">
+ <DeployDirectory id="Linux.PkgConfig" _label="pkg-config folder" />
+ <DeployDirectory id="Linux.DesktopApplications" _label=".desktop application folder" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+ <Condition id="Platform" value="linux">
+ <Class class = "MonoDevelop.Deployment.Linux.LinuxIntegrationProjectFeature" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <Condition id="Platform" value="linux">
+ <FileTemplate resource = "app.desktop.xft.xml"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/StartupHandlers">
+ <Condition id="Platform" value="linux">
+ <Class class="MonoDevelop.Deployment.Linux.LinuxDeploymentSetup" />
+ </Condition>
+ </Extension>
+</Addin>
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.app.desktop.xft.xml b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.app.desktop.xft.xml
new file mode 100644
index 0000000..003ee41
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.app.desktop.xft.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Desktop Application Launcher</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Deployment</_Category>
+ <_Description>Creates a Desktop Entry file.</_Description>
+ <DefaultFilename>app</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+<File DefaultExtension=".desktop">
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=${Name}
+Exec=
+Terminal=false
+</File>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.csproj.FilesWrittenAbsolute.txt b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..0b8677b
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,8 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.DesktopInfo.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.MonoDevelop.Deployment.Linux.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.app.desktop.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.dll.mdb
diff --git a/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.gtk-gui.gui.stetic b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9a3f093
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment.Linux/obj/Debug/MonoDevelop.Deployment.Linux.gtk-gui.gui.stetic
@@ -0,0 +1,1285 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.Linux.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Linux.BasicOptionPanelWidget" design-size="409 245">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxExe">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkScript">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Generate launch script</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCheckScriptClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ <property name="CanFocus">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Script name:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryScript">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkDesktop">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Generate .desktop file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxLibrary">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkPcFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Generate .pc file for the library</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Linux.DesktopPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="LabelProp">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Linux.DotDesktopViewWidget" design-size="724 482">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="TabPos">Left</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Desktop Entry Type:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboType">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items">Application
+Link
+Directory</property>
+ <property name="Active">0</property>
+ <signal name="Changed" handler="OnComboTypeChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Show strings for locale:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboLocales">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboLocalesChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonNewLocale">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">New locale...</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table6">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryComment">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryCommentChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryGenericName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryGenericNameChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryIcon">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryIconChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="WidthChars">50</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Icon:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Generic name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Comment:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label20">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableCommand">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkTerminal">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Run in terminal</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCheckTerminalClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryExec">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryExecChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPath">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryTryExec">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryTryExecChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Command:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label15">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Test exe:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label16">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Working path:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxUrl">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label18">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Url:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryUrl">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryUrlChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Header</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxMenu">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkShowInMenu">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show in desktop menu</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCheckShowInMenuClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator5">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxCategories">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label17">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Menu categories:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="HeightRequest">150</property>
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeCategories">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddCategories">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddCategoriesClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveCategory">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveCategoryClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator6">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the environments that should display this desktop entry:</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioAlwaysShow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Always show</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioAlwaysShowClicked" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioOnlyShowIn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Only show in the following environments:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioOnlyShowInClicked" />
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioNotShowIn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Not show in the following environments:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioNotShowInClicked" />
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeEnvs">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="LabelProp" translatable="yes">Menu entry</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableMimeTypes">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">MIME types supported by this application:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeMimeTypes">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddMimeType">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddMimeTypeClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveMimeType">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveMimeTypeClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="LabelProp" translatable="yes">Mime types</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeEntries">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddEntryClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveEntryClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Other entries</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Deployment.Linux.MenuCategorySelectorDialog" design-size="652 484">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Title" translatable="yes">Menu Category Selection</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label19">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the categories you want to assign to the desktop entry:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/Makefile.in b/src/addins/Deployment/MonoDevelop.Deployment/Makefile.in
index 7c2a35b..61e00b2 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment/Makefile.in
+++ b/src/addins/Deployment/MonoDevelop.Deployment/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Targets/BinariesZipPackageBuilder.cs b/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Targets/BinariesZipPackageBuilder.cs
index 80d85f8..b663c99 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Targets/BinariesZipPackageBuilder.cs
+++ b/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Targets/BinariesZipPackageBuilder.cs
@@ -68,14 +68,12 @@ namespace MonoDevelop.Deployment.Targets
try {
SolutionConfigurationSelector conf = (SolutionConfigurationSelector) configuration;
- if (RootSolutionItem.NeedsBuilding (conf)) {
- BuildResult res = RootSolutionItem.Build (monitor, conf);
- if (res.ErrorCount > 0) {
- foreach (BuildError e in res.Errors)
- monitor.ReportError (e.ToString (), null);
- monitor.ReportError (GettextCatalog.GetString ("The source project failed to build."), null);
- return false;
- }
+ BuildResult res = RootSolutionItem.Build (monitor, conf);
+ if (res.ErrorCount > 0) {
+ foreach (BuildError e in res.Errors)
+ monitor.ReportError (e.ToString (), null);
+ monitor.ReportError (GettextCatalog.GetString ("The source project failed to build."), null);
+ return false;
}
tmpFolder = FileService.CreateTempDirectory ();
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.addin.xml b/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.addin.xml
index f9a91ad..e81c19b 100644
--- a/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.addin.xml
+++ b/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.addin.xml
@@ -6,14 +6,14 @@
url = "http://www.monodevelop.com"
description = "Provides basic deployment services"
category = "Deployment"
- version = "4.0.5"
+ version = "4.0.12"
flags = "Hidden"
compatVersion = "4.0">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Ide/Commands">
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.MonoDevelop.Deployment.addin.xml b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.MonoDevelop.Deployment.addin.xml
new file mode 100644
index 0000000..e81c19b
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.MonoDevelop.Deployment.addin.xml
@@ -0,0 +1,203 @@
+<Addin id = "Deployment"
+ namespace = "MonoDevelop"
+ name = "Deployment Services Core"
+ author = "Lluis Sanchez, Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com"
+ description = "Provides basic deployment services"
+ category = "Deployment"
+ version = "4.0.12"
+ flags = "Hidden"
+ compatVersion = "4.0">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "Deployment" id = "Deployment">
+ <Command id = "MonoDevelop.Deployment.Commands.CreatePackage"
+ defaultHandler = "MonoDevelop.Deployment.CreatePackageHandler"
+ icon = "md-package"
+ _label = "Create Package..." />
+ <Command id = "MonoDevelop.Deployment.Commands.AddPackage"
+ defaultHandler = "MonoDevelop.Deployment.AddPackageHandler"
+ _label = "Add Package..." />
+ <Command id = "MonoDevelop.Deployment.Commands.Install"
+ defaultHandler = "MonoDevelop.Deployment.InstallHandler"
+ _label = "Install..." />
+ </Category>
+ </Extension>
+
+
+ <!-- Extension Points -->
+
+ <ExtensionPoint path = "/MonoDevelop/DeployService/PackageBuilders">
+ <Description>Deployment handlers. Specified classes must implement IDeployHandler.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/DeployFileCopiers" name = "File copiers">
+ <Description>File copiers for deployment handlers. Specified classes must implement IDeployFileCopier.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/DeployServiceExtensions" name="Deploy service extensions">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/PackageBuilderEditors" description="Package builder editors">
+ <Description>Editors for package builders. Specified classes must implement IPackageBuilderEditor.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/FileCopyConfigurationEditors" name = "Editors for file copy congigurations">
+ <Description>Editors for file copy congigurations. Specified classes must implement IFileCopyConfigurationEditor.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/ContextMenu/ProjectPad/Package" name="Package context menu">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/ContextMenu/ProjectPad/PackagingProject" name="Packaging project context menu">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/DeployDirectories" name="Deploy directories">
+ <ExtensionNode name="DeployDirectory" type="MonoDevelop.Deployment.DeployDirectoryNodeType" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/DeployPlatforms" name="Deploy platforms">
+ <ExtensionNode name="DeployPlatform" type="MonoDevelop.Deployment.DeployPlatformNodeType" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/DeployDirectoryResolvers" name="Deploy directory resolvers">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Tools">
+ <Condition id="ItemType" value="Solution|Project">
+ <CommandItem id = "MonoDevelop.Deployment.Commands.CreatePackage" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
+ <CommandItem id = "MonoDevelop.Deployment.Commands.Install" insertafter="ExportSeparator"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Project">
+ <CommandItem id = "MonoDevelop.Deployment.Commands.CreatePackage" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.Deployment.Targets.LocalFileCopyConfiguration" />
+ <DataType class = "MonoDevelop.Deployment.Targets.SshFuseFileCopyConfiguration" />
+ <DataType class = "MonoDevelop.Deployment.PackagingProject" />
+ <DataType class = "MonoDevelop.Deployment.PackagingProjectConfiguration" />
+ <DataType class = "MonoDevelop.Deployment.Targets.BinariesZipPackageBuilder" />
+ <DataType class = "MonoDevelop.Deployment.Targets.SourcesZipPackageBuilder" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DeployService/PackageBuilders">
+ <Class class = "MonoDevelop.Deployment.Targets.SourcesZipPackageBuilder" />
+ <Class class = "MonoDevelop.Deployment.Targets.BinariesZipPackageBuilder" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployFileCopiers">
+ <Class class = "MonoDevelop.Deployment.Targets.LocalFileCopyHandler" />
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.Deployment.Targets.SshFuseFileCopyHandler" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployServiceExtensions">
+ <Class id="PrepareDeploy" class = "MonoDevelop.Deployment.DeployServiceExtension" />
+ <Class id="DefaultDeploy" class = "MonoDevelop.Deployment.DefaultDeployServiceExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/PackageBuilderEditors">
+ <Class class = "MonoDevelop.Deployment.Gui.SourcesZipDeployEditor" />
+ <Class class = "MonoDevelop.Deployment.Gui.BinariesZipDeployEditor" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/FileCopyConfigurationEditors">
+ <Class class = "MonoDevelop.Deployment.Gui.LocalFileCopyConfigurationEditor" />
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.Deployment.Gui.SshFuseFileCopyConfigurationEditor" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
+ <Class class = "MonoDevelop.Deployment.Gui.PropertyProvider"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.Deploy" type = "System.Boolean" />
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.TargetDirectoryId" type = "System.String" />
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.RelativeDeployPath" type = "System.String" />
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.HasPathReferences" type = "System.Boolean" />
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "DeployService.UseProjectRelativePath" type = "System.Boolean" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "PackagingProject" resource = "PackagingProject.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.Deployment.NodeBuilders.PackagingProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Deployment.NodeBuilders.PackageNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/ContextMenu/ProjectPad/Package">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Build" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Options" />
+ <SeparatorItem />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/ContextMenu/ProjectPad/PackagingProject">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Build" />
+ <CommandItem id = "MonoDevelop.Deployment.Commands.AddPackage" />
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-packaging-project" icon = "md-project|res:packaging-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-packaging-project" icon = "md-project|res:packaging-16.png" size = "Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels">
+ <Section id = "Deployment" _label = "Deployment" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployDirectories">
+ <DeployDirectory id="ProgramFiles" _label="Program files" />
+ <DeployDirectory id="ProgramFilesRoot" _label="Program files root folder" />
+ <DeployDirectory id="Binaries" _label="Binaries" />
+ <DeployDirectory id="Gac" _label="Global Assembly Cache" />
+ <DeployDirectory id="CommonApplicationData" _label="Shared application data" />
+ <DeployDirectory id="CommonApplicationDataRoot" _label="Shared application data root folder" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/DeployPlatforms">
+ <DeployPlatform id="Linux" _label="Linux" />
+ <DeployPlatform id="Windows" _label="Microsoft Windows" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+<!-- <Class class = "MonoDevelop.Deployment.Gui.PackagingFeature" /> -->
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+</Addin>
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.csproj.FilesWrittenAbsolute.txt b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..3e94b07
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,11 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.package-x-generic.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.templates.PackagingProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.MonoDevelop.Deployment.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.dll.mdb
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.gtk-gui.gui.stetic b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.gtk-gui.gui.stetic
new file mode 100644
index 0000000..3266f27
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.gtk-gui.gui.stetic
@@ -0,0 +1,2470 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.LocalFileCopyConfigurationEditorWidget" design-size="348 50">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target directory:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ <signal name="PathChanged" handler="OnFolderEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.FileCopyConfigurationSelector" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboHandlers">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboHandlersChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.EventBox" id="editorBox">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.CommandDeployEditorWidget" design-size="300 166">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Command:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="cmdEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnCmdEntryChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Arguments:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="argsEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnArgsEntryChanged" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkExternal">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Run in external console</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCheckExternalClicked" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkDisposeExternal">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Dispose console after running</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCheckDisposeExternalClicked" />
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Deployment.Gui.DeployDialog" design-size="573 433">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Create Package</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Image" id="image2">
+ <property name="MemberName" />
+ <property name="Pixbuf">resource:package-x-generic.png</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">3</property>
+ <property name="ShowBorder">False</property>
+ <property name="BorderWidth">6</property>
+ <signal name="SelectPage" handler="OnNotebookSelectPage" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><big><b>Package Type</b></big></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the type of package to create:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="targetsTree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp">page5</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="pageSelectProject">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTitle1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><big><b>Select Project</b></big></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator4">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the project or solution for which you want to create a package:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Deployment.Gui.EntrySelectionTree" id="entryTree">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp">page3</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><big><b>Package Settings</b></big></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator3">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.EventBox" id="editorBox">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="saveSeparator">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Save this package configuration in the solution</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCheckSaveClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="pageSave">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><big><b>Save Package Configuration</b></big></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator5">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Enter the name you want to give to this package configuration:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entrySaveName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxSaveProject">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator6">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label15">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Where do you want to save this configuration?</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCreateProject">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Save in a new Packaging Project</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioCreateProjectClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableNewProject">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboCreateProject">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryProjectName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes">Packages</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Project name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label16">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Create in solution:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioAddProject">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Add to existing Packaging Project</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioAddProjectClicked" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxAddProject">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Project:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboSelProject">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="LabelProp">page4</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.Deployment.DeployDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonBack">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-back</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonBackClicked" />
+ <property name="label">gtk-go-back</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonNext">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-forward</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonNextClicked" />
+ <property name="label">gtk-go-forward</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Deployment.Gui.InstallDialog" design-size="453 193">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Install Project</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Directory prefix:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ <property name="BrowserTitle">Select Directory</property>
+ <signal name="PathChanged" handler="OnFolderEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Application name (to use as subdirectory name in the installation prefix):</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="WidthRequest">275</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnNameEntryChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.Deployment.InstallDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button19">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.SourcesZipEditorWidget" design-size="452 132">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the archive file name and format:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboFormat">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboFormatChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ <signal name="PathChanged" handler="OnFolderEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryZip">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryZipChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboZip">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboZipChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target folder:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">File format:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.EntrySelectionTree" design-size="300 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Deployment.Gui.EditPackageDialog" design-size="599 450">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <signal name="SwitchPage" handler="OnNotebookSwitchPage" />
+ <child>
+ <widget class="Gtk.VBox" id="targetBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="WidthChars">40</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Package Settings</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the projects and solutions you want to include in the package:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Deployment.Gui.EntrySelectionTree" id="entrySelector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <signal name="SelectionChanged" handler="OnEntrySelectorSelectionChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Projects/Solutions</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="pageFiles">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="MonoDevelop.Deployment.DeployFileListWidget" id="fileListView">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Files</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okbutton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnOkbuttonClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.BinariesZipEditorWidget" design-size="443 176">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the archive file name and location:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboConfiguration">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboConfigurationChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboPlatform">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboPlatformChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ <signal name="PathChanged" handler="OnFolderEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryZip">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryZipChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboZip">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboZipChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Configuration:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target folder:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target platform:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.DeployFileListWidget" design-size="569 391">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelFiles">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The following files will be included in the package:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboConfigs">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboConfigsChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="fileList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="RulesHint">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.PackagingFeatureWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="box">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Deployment.FileReplaceDialog" design-size="425 420">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Replace existing file?</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">6</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <signal name="DeleteEvent" handler="DeleteActivated" />
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">4</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Image" id="image1">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-warning Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">8</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b><big>Deploy file already exists. Do you want to replace it?</big></b></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ <property name="Justify">Fill</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">There is already a file in the target directory that has the same name as the source file. You can keep the existing target file, or overwrite it with the source file.</property>
+ <property name="Wrap">True</property>
+ <property name="Justify">Fill</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioReplace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="replaceLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label25">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="sourceName">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Selectable">True</property>
+ <property name="Ellipsize">Middle</property>
+ <property name="MaxWidthChars">35</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label26">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Modified:</property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="sourceModified">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioKeep">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="keepLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox8">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label27">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="targetName">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Selectable">True</property>
+ <property name="Ellipsize">Middle</property>
+ <property name="MaxWidthChars">35</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox9">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label28">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Modified:</property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="targetModified">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioNewest">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="newestLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label20">
+ <property name="MemberName" />
+ <property name="Xpad">2</property>
+ <property name="LabelProp" translatable="yes">The source file will replace the existing target file if it has been modified more recently.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="applyAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Apply this decision to _all files in this operation</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="cancelButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-cancel Button</property>
+ <property name="Label" translatable="yes">_Cancel deployment</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-6</property>
+ <signal name="Clicked" handler="CancelClicked" />
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okButton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <signal name="Clicked" handler="OkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Deployment.Gui.SshFuseFileCopyConfigurationEditorWidget" design-size="367 146">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryDirectory">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="DirectoryChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryHostName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="HostnameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryUserName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="UserNameChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Host name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Directory:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Username:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Note: the SSH key for this host must be installed on your system. If it is password protected, the password must be loaded into a running SSH authentication daemon, such as <i>ssh-agent</i> or <i>seahorse-agent</i>.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ <property name="Justify">Fill</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.package-x-generic.png b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.package-x-generic.png
new file mode 100644
index 0000000..c6e58ae
Binary files /dev/null and b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.package-x-generic.png differ
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-16.png b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-16.png
new file mode 100644
index 0000000..6b94324
Binary files /dev/null and b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-16.png differ
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-32.png b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-32.png
new file mode 100644
index 0000000..374b9a8
Binary files /dev/null and b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.icons.packaging-32.png differ
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.md1format.xml b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.md1format.xml
new file mode 100644
index 0000000..4503c10
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.md1format.xml
@@ -0,0 +1,11 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.Deployment.PackageBuilder" customDataItem="MonoDevelop.Deployment.MD1Serializer">
+ <ItemProperty member="excludedFiles" name="ExcludedFiles"/>
+ <ItemProperty member="excludedFiles" scope="*" name="File"/>
+ <ItemProperty member="md1ChildEntries" name="ChildEntries"/>
+ <ItemProperty member="md1ChildEntries" scope="*" name="Entry" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ <ItemProperty member="md1RootEntry" name="rootEntry" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.ProjectFile" customDataItem = "MonoDevelop.Deployment.MD1ProjectFileSerializer" >
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.templates.PackagingProject.xpt.xml b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.templates.PackagingProject.xpt.xml
new file mode 100644
index 0000000..9788aa3
--- /dev/null
+++ b/src/addins/Deployment/MonoDevelop.Deployment/obj/Debug/MonoDevelop.Deployment.templates.PackagingProject.xpt.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Template originator = "Lluis Sanchez">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Packaging project</_Name>
+ <_Category>Other</_Category>
+ <Icon>md-project|res:packaging-32.png</Icon>
+ <_Description>Create a project which can generate packages for a solution</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <CombineEntry name = "${ProjectName}" directory = "." type = "MonoDevelop.Deployment.PackagingProject">
+ </CombineEntry>
+ </Combine>
+</Template>
diff --git a/src/addins/GnomePlatform/GnomePlatform.addin.xml b/src/addins/GnomePlatform/GnomePlatform.addin.xml
index d249eb5..5e6e6f9 100644
--- a/src/addins/GnomePlatform/GnomePlatform.addin.xml
+++ b/src/addins/GnomePlatform/GnomePlatform.addin.xml
@@ -7,15 +7,15 @@
description = "GNOME Platform Support for MonoDevelop"
category = "MonoDevelop Core"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="GnomePlatform.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Core/PlatformService">
diff --git a/src/addins/GnomePlatform/GnomePlatform.cs b/src/addins/GnomePlatform/GnomePlatform.cs
index 7c2a09c..53a45f3 100644
--- a/src/addins/GnomePlatform/GnomePlatform.cs
+++ b/src/addins/GnomePlatform/GnomePlatform.cs
@@ -195,10 +195,12 @@ namespace MonoDevelop.Platform
delegate string TerminalRunnerHandler (string command, string args, string dir, string title, bool pause);
-
+ delegate string TerminalOpenFolderRunnerHandler (string dir);
+
string terminal_command;
bool terminal_probed;
TerminalRunnerHandler runner;
+ TerminalOpenFolderRunnerHandler openDirectoryRunner;
public override IProcessAsyncOperation StartConsoleProcess (string command, string arguments, string workingDirectory,
IDictionary<string, string> environmentVariables,
@@ -249,7 +251,33 @@ namespace MonoDevelop.Platform
EscapeDir (dir),
title);
}
-
+
+ private static string KdeTerminalRunner (string command, string args, string dir, string title, bool pause)
+ {
+ string extra_commands = pause
+ ? BashPause.Replace ("'", "\"")
+ : String.Empty;
+
+ return String.Format (@" --nofork --caption ""{4}"" --workdir=""{3}"" -e ""bash"" -c '{0} {1} ; {2}'",
+ command,
+ args,
+ extra_commands,
+ EscapeDir (dir),
+ title);
+ }
+
+ private static string GnomeTerminalOpenFolderRunner (string dir) {
+ return string.Format(@" --working-directory=""{0}""", EscapeDir(dir));
+ }
+
+ private static string XtermOpenFolderRunner (string dir) {
+ return string.Format(@" -e bash -c ""cd {0}""", EscapeDir(dir));
+ }
+
+ private static string KdeTerminalOpenFolderRunner (string dir) {
+ return string.Format(@" --nofork --workdir=""{0}""", EscapeDir(dir));
+ }
+
private static string EscapeArgs (string args)
{
return args.Replace ("\\", "\\\\").Replace ("\"", "\\\"");
@@ -276,32 +304,45 @@ namespace MonoDevelop.Platform
terminal_probed = true;
- string fallback_terminal = "xterm";
+ string fallback_terminal = PropertyService.Get ("MonoDevelop.Shell", "xterm");
string preferred_terminal;
TerminalRunnerHandler preferred_runner = null;
TerminalRunnerHandler fallback_runner = XtermRunner;
+ TerminalOpenFolderRunnerHandler preferedOpenFolderRunner = null;
+ TerminalOpenFolderRunnerHandler fallbackOpenFolderRunner = XtermOpenFolderRunner;
+
if (!String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("GNOME_DESKTOP_SESSION_ID"))) {
preferred_terminal = "gnome-terminal";
preferred_runner = GnomeTerminalRunner;
+ preferedOpenFolderRunner = GnomeTerminalOpenFolderRunner;
}
else if (!String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MATE_DESKTOP_SESSION_ID"))) {
preferred_terminal = "mate-terminal";
preferred_runner = GnomeTerminalRunner;
+ preferedOpenFolderRunner = GnomeTerminalOpenFolderRunner;
+ }
+ else if (!String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("KDE_SESSION_VERSION"))) {
+ preferred_terminal = "konsole";
+ preferred_runner = KdeTerminalRunner;
+ preferedOpenFolderRunner = KdeTerminalOpenFolderRunner;
}
else {
preferred_terminal = fallback_terminal;
preferred_runner = fallback_runner;
+ preferedOpenFolderRunner = fallbackOpenFolderRunner;
}
terminal_command = FindExec (preferred_terminal);
if (terminal_command != null) {
runner = preferred_runner;
+ openDirectoryRunner = preferedOpenFolderRunner;
return;
}
terminal_command = FindExec (fallback_terminal);
runner = fallback_runner;
+ openDirectoryRunner = fallbackOpenFolderRunner;
}
private string FindExec (string command)
@@ -333,14 +374,7 @@ namespace MonoDevelop.Platform
}
#endregion
-
- //FIXME: probe for terminal
- static string TerminalCommand {
- get {
- return PropertyService.Get ("MonoDevelop.Shell", "gnome-terminal");
- }
- }
-
+
public override bool CanOpenTerminal {
get {
return true;
@@ -349,7 +383,8 @@ namespace MonoDevelop.Platform
public override void OpenInTerminal (FilePath directory)
{
- Runtime.ProcessService.StartProcess (TerminalCommand, "", directory, null);
+ ProbeTerminal ();
+ Runtime.ProcessService.StartProcess (terminal_command, openDirectoryRunner(directory), directory, null);
}
}
diff --git a/src/addins/GnomePlatform/Makefile.in b/src/addins/GnomePlatform/Makefile.in
index dce01b2..6c8fdc8 100644
--- a/src/addins/GnomePlatform/Makefile.in
+++ b/src/addins/GnomePlatform/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/GnomePlatform/obj/Debug/GnomePlatform.GnomePlatform.addin.xml b/src/addins/GnomePlatform/obj/Debug/GnomePlatform.GnomePlatform.addin.xml
new file mode 100644
index 0000000..5e6e6f9
--- /dev/null
+++ b/src/addins/GnomePlatform/obj/Debug/GnomePlatform.GnomePlatform.addin.xml
@@ -0,0 +1,24 @@
+<Addin id = "GnomePlatform"
+ namespace = "MonoDevelop"
+ name = "GNOME Platform Support"
+ author = "Geoff Norton"
+ copyright = "MIT X11"
+ url = "http://monodevelop.com/"
+ description = "GNOME Platform Support for MonoDevelop"
+ category = "MonoDevelop Core"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="GnomePlatform.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Core/PlatformService">
+ <Class class = "MonoDevelop.Platform.GnomePlatform"/>
+ </Extension>
+</Addin>
diff --git a/src/addins/GnomePlatform/obj/Debug/GnomePlatform.csproj.FilesWrittenAbsolute.txt b/src/addins/GnomePlatform/obj/Debug/GnomePlatform.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..ac6c45f
--- /dev/null
+++ b/src/addins/GnomePlatform/obj/Debug/GnomePlatform.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/GnomePlatform/obj/Debug/GnomePlatform.GnomePlatform.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/GnomePlatform.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/GnomePlatform.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/GnomePlatform.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/GnomePlatform/obj/Debug/GnomePlatform.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/GnomePlatform/obj/Debug/GnomePlatform.dll.mdb
diff --git a/src/addins/ILAsmBinding/ILAsmBinding.addin.xml b/src/addins/ILAsmBinding/ILAsmBinding.addin.xml
index defe310..9c9e0b8 100644
--- a/src/addins/ILAsmBinding/ILAsmBinding.addin.xml
+++ b/src/addins/ILAsmBinding/ILAsmBinding.addin.xml
@@ -6,15 +6,15 @@
url = "http://www.monodevelop.com"
description = "ILAsm Language Binding"
category = "Language bindings"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly = "ILAsmBinding.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Ide/ProjectTemplates">
diff --git a/src/addins/ILAsmBinding/ILAsmConsoleProject.xpt.xml b/src/addins/ILAsmBinding/ILAsmConsoleProject.xpt.xml
index 3be0d16..ba88acb 100644
--- a/src/addins/ILAsmBinding/ILAsmConsoleProject.xpt.xml
+++ b/src/addins/ILAsmBinding/ILAsmConsoleProject.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project</Icon>
<LanguageName>IL</LanguageName>
<_Description>IL Console Project</_Description>
+ <DefaultFilename>ILConsoleProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/ILAsmBinding/Makefile.in b/src/addins/ILAsmBinding/Makefile.in
index fb3366a..ba31c8b 100644
--- a/src/addins/ILAsmBinding/Makefile.in
+++ b/src/addins/ILAsmBinding/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmBinding.addin.xml b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmBinding.addin.xml
new file mode 100644
index 0000000..9c9e0b8
--- /dev/null
+++ b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmBinding.addin.xml
@@ -0,0 +1,45 @@
+<Addin id = "ILAsmBinding"
+ namespace = "MonoDevelop"
+ name = "ILAsm Language Binding"
+ author = "Mike Krüger"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com"
+ description = "ILAsm Language Binding"
+ category = "Language bindings"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly = "ILAsmBinding.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "ILAsmConsoleProject" resource = "ILAsmConsoleProject.xpt.xml"/>
+ </Extension>
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "ILAsm Files" _label = "ILAsm Files" extensions = "*.il"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build">
+ <Condition id="ActiveLanguage" value = "IL">
+ <Section id = "ILAsmCompilerParametersPanel" _label = "Compiler" class = "ILAsmBinding.CompilerParametersPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/LanguageBindings">
+ <LanguageBinding id = "ILAsm" supportedextensions = ".il" class = "ILAsmBinding.ILAsmLanguageBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "ILAsmBinding.ILAsmCompilerParameters" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProject language="IL" extension="ilproj" guid="{B4EC64DC-6D44-11DD-AAB0-C9A155D89593}"/>
+ </Extension>
+
+</Addin>
diff --git a/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmConsoleProject.xpt.xml b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmConsoleProject.xpt.xml
new file mode 100644
index 0000000..ba88acb
--- /dev/null
+++ b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmConsoleProject.xpt.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<Template originator = "John Luke"
+ created = "04/25/2004"
+ lastModified = "04/25/2004">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>IL</_Category>
+ <Icon>md-project</Icon>
+ <LanguageName>IL</LanguageName>
+ <_Description>IL Console Project</_Description>
+ <DefaultFilename>ILConsoleProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "main.il"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options/>
+ <Files>
+ <File name="main.il"><![CDATA[.assembly HelloWorld
+{
+}
+
+.assembly extern mscorlib { }
+
+.namespace DefaultNamespace
+{
+ .class private auto ansi beforefieldinit MainClass
+ {
+ .method public hidebysig static void Main(string[] args) cil managed
+ {
+ .entrypoint
+ .maxstack 1
+ ldstr "Hello World!"
+ call void [mscorlib]System.Console::WriteLine(string)
+ ret
+ }
+ }
+}]]></File>
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.csproj.FilesWrittenAbsolute.txt b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..dd4ef06
--- /dev/null
+++ b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmConsoleProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.ILAsmBinding.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/ILAsmBinding.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/ILAsmBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.dll.mdb
diff --git a/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.gtk-gui.gui.stetic b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.gtk-gui.gui.stetic
new file mode 100644
index 0000000..492007a
--- /dev/null
+++ b/src/addins/ILAsmBinding/obj/Debug/ILAsmBinding.gtk-gui.gui.stetic
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/ILAsmBinding.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="ILAsmBinding.CompilerParametersPanelWidget" design-size="340 110">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label86">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compile _Target:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox57">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="compileTargetCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonIncludeDebugInfo">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include debug information</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Code Generation</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MacPlatform/MacInterop/LaunchServices.cs b/src/addins/MacPlatform/MacInterop/LaunchServices.cs
index d18a772..4cb8a79 100644
--- a/src/addins/MacPlatform/MacInterop/LaunchServices.cs
+++ b/src/addins/MacPlatform/MacInterop/LaunchServices.cs
@@ -45,6 +45,47 @@ namespace MonoDevelop.MacInterop
public bool Async { get; set; }
public bool NewInstance { get; set; }
}
+
+ public class LaunchServicesException : Exception
+ {
+ public LaunchServicesException (int errorCode)
+ : base ("Failed to start process: " + LookupErrorMessage (errorCode))
+ {
+ }
+
+ static string LookupErrorMessage (int errorCode)
+ {
+ switch (errorCode) {
+ case -10660: return "Can not launch applications from trash folder";
+ case -10661: return "Incorrect executable";
+ case -10662: return "Attribute not found";
+ case -10663: return "The attribute not settable";
+ case -10664: return "Incompatible application version";
+ case -10665: return "Required Rosetta environment not found";
+ case -10810: return "Unknown error";
+ case -10811: return "Not an application";
+ case -10813: return "Data Unavailable";
+ case -10814: return "Application not found";
+ case -10815: return "Unknown item type";
+ case -10816: return "Data too old";
+ case -10817: return "Data error";
+ case -10818: return "Launch in progress";
+ case -10819: return "Not registered";
+ case -10820: return "App does not claim type";
+ case -10821: return "App does not support scheme";
+ case -10822: return "Server communication error";
+ case -10823: return "Cannot set info";
+ case -10824: return "No registration info";
+ case -10825: return "App is incompatible with the system version";
+ case -10826: return "No launch permission";
+ case -10827: return "Executable is missing";
+ case -10828: return "Required Classic environment not found";
+ case -10829: return "Multiple sessions not supported";
+ default:
+ return String.Format ("Unknown LaunchServices return code {0}", errorCode);
+ }
+ }
+ }
public static class LaunchServices
{
@@ -102,7 +143,7 @@ namespace MonoDevelop.MacInterop
var status = LSOpenApplication (ref appParams, out psn);
if (status != OSStatus.Ok)
- throw new Exception ("Failed to start process: " + ((int)status).ToString ());
+ throw new LaunchServicesException ((int)status);
} finally {
if (appParams.application != IntPtr.Zero)
Marshal.FreeHGlobal (appParams.application);
@@ -163,4 +204,4 @@ namespace MonoDevelop.MacInterop
Ok = 0
}
}
-}
\ No newline at end of file
+}
diff --git a/src/addins/MacPlatform/MacMenu/MDLinkMenuItem.cs b/src/addins/MacPlatform/MacMenu/MDLinkMenuItem.cs
index 88c462c..f955d64 100644
--- a/src/addins/MacPlatform/MacMenu/MDLinkMenuItem.cs
+++ b/src/addins/MacPlatform/MacMenu/MDLinkMenuItem.cs
@@ -43,7 +43,7 @@ namespace MonoDevelop.MacIntegration.MacMenu
Action = MDMenuItem.ActionSel;
}
- [Export ("run")]
+ [Export (MDMenuItem.ActionSelName)]
public void Run ()
{
MonoDevelop.Ide.DesktopService.ShowUrl (lce.Url);
@@ -53,7 +53,7 @@ namespace MonoDevelop.MacIntegration.MacMenu
// We can justify this because safari 3.2.1 does it ("do you want to close all tabs?").
static bool IsGloballyDisabled {
get {
- return !MonoDevelop.Ide.IdeApp.Workbench.HasToplevelFocus;
+ return MonoDevelop.Ide.DesktopService.IsModalDialogRunning ();
}
}
diff --git a/src/addins/MacPlatform/MacMenu/MDMenu.cs b/src/addins/MacPlatform/MacMenu/MDMenu.cs
index 5d03d48..c181434 100644
--- a/src/addins/MacPlatform/MacMenu/MDMenu.cs
+++ b/src/addins/MacPlatform/MacMenu/MDMenu.cs
@@ -149,7 +149,15 @@ namespace MonoDevelop.MacIntegration.MacMenu
void MenuNeedsUpdate (NSMenu menu)
{
Debug.Assert (menu == this);
- UpdateCommands ();
+
+ // MacOS calls this for each menu when it's about to open, but also for every menu on every keystroke.
+ // We only want to do the update when the menu's about to open, since it's expensive. Checking whether
+ // NSMenuProperty.Image needs to be updated is the only way to distinguish between these cases.
+ //
+ // http://www.cocoabuilder.com/archive/cocoa/285859-reason-for-menuneedsupdate-notification.html
+ //
+ if (PropertiesToUpdate ().HasFlag (NSMenuProperty.Image))
+ UpdateCommands ();
}
public static void ShowLastSeparator (ref NSMenuItem lastSeparator)
diff --git a/src/addins/MacPlatform/MacMenu/MDMenuItem.cs b/src/addins/MacPlatform/MacMenu/MDMenuItem.cs
index cefa188..af2df66 100644
--- a/src/addins/MacPlatform/MacMenu/MDMenuItem.cs
+++ b/src/addins/MacPlatform/MacMenu/MDMenuItem.cs
@@ -38,7 +38,8 @@ namespace MonoDevelop.MacIntegration.MacMenu
//TODO: autohide, arrray
class MDMenuItem : NSMenuItem, IUpdatableMenuItem
{
- public static Selector ActionSel = new Selector ("run:");
+ public const string ActionSelName = "run:";
+ public static Selector ActionSel = new Selector (ActionSelName);
CommandEntry ce;
CommandManager manager;
@@ -58,7 +59,7 @@ namespace MonoDevelop.MacIntegration.MacMenu
public CommandEntry CommandEntry { get { return ce; } }
- [Export ("run:")]
+ [Export (ActionSelName)]
public void Run (NSMenuItem sender)
{
var a = sender as MDExpandedArrayItem;
@@ -77,7 +78,7 @@ namespace MonoDevelop.MacIntegration.MacMenu
// We can justify this because safari 3.2.1 does it ("do you want to close all tabs?").
public static bool IsGloballyDisabled {
get {
- return !MonoDevelop.Ide.IdeApp.Workbench.HasToplevelFocus;
+ return MonoDevelop.Ide.DesktopService.IsModalDialogRunning ();
}
}
diff --git a/src/addins/MacPlatform/MacPlatform.addin.xml b/src/addins/MacPlatform/MacPlatform.addin.xml
index 3c8c143..386f3b6 100644
--- a/src/addins/MacPlatform/MacPlatform.addin.xml
+++ b/src/addins/MacPlatform/MacPlatform.addin.xml
@@ -7,7 +7,7 @@
description = "Mac Platform Support for MonoDevelop"
category = "Platform Support"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoMac.dll" />
@@ -15,7 +15,7 @@
</Runtime>
<Dependencies>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Core/PlatformService">
diff --git a/src/addins/MacPlatform/MacPlatform.cs b/src/addins/MacPlatform/MacPlatform.cs
index 1a9963c..3bd5a48 100644
--- a/src/addins/MacPlatform/MacPlatform.cs
+++ b/src/addins/MacPlatform/MacPlatform.cs
@@ -70,6 +70,9 @@ namespace MonoDevelop.MacIntegration
public MacPlatformService ()
{
+ if (IntPtr.Size == 8)
+ throw new Exception ("Mac integration is not yet 64-bit safe");
+
if (initedGlobal)
throw new Exception ("Only one MacPlatformService instance allowed");
initedGlobal = true;
@@ -123,6 +126,13 @@ namespace MonoDevelop.MacIntegration
}
}
+ public override Xwt.Toolkit LoadNativeToolkit ()
+ {
+ var path = Path.GetDirectoryName (GetType ().Assembly.Location);
+ System.Reflection.Assembly.LoadFrom (Path.Combine (path, "Xwt.Mac.dll"));
+ return Xwt.Toolkit.Load (Xwt.ToolkitType.Cocoa);
+ }
+
protected override string OnGetMimeTypeForUri (string uri)
{
var ext = Path.GetExtension (uri);
@@ -275,7 +285,7 @@ namespace MonoDevelop.MacIntegration
ApplicationEvents.Quit += delegate (object sender, ApplicationQuitEventArgs e)
{
// We can only attempt to quit safely if all windows are GTK windows and not modal
- if (GtkQuartz.GetToplevels ().All (t => t.Value != null && (!t.Value.Visible || !t.Value.Modal))) {
+ if (!IsModalDialogRunning ()) {
e.UserCancelled = !IdeApp.Exit ();
e.Handled = true;
return;
@@ -660,5 +670,10 @@ end tell", directory.ToString ().Replace ("\"", "\\\"")));
IntPtr.Zero);
}
}
+
+ public override bool IsModalDialogRunning ()
+ {
+ return GtkQuartz.GetToplevels ().Any (t => t.Key.IsVisible && (t.Value == null || t.Value.Modal));
+ }
}
}
diff --git a/src/addins/MacPlatform/MacPlatform.csproj b/src/addins/MacPlatform/MacPlatform.csproj
index 5383a36..6d1ee8d 100644
--- a/src/addins/MacPlatform/MacPlatform.csproj
+++ b/src/addins/MacPlatform/MacPlatform.csproj
@@ -59,6 +59,15 @@
<Name>MonoDevelop.Ide</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\xwt\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\xwt\Xwt.Mac\Xwt.Mac.csproj">
+ <Project>{B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}</Project>
+ <Name>Xwt.Mac</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
diff --git a/src/addins/MacPlatform/Makefile.in b/src/addins/MacPlatform/Makefile.in
index afbe160..f61fd97 100644
--- a/src/addins/MacPlatform/Makefile.in
+++ b/src/addins/MacPlatform/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/Makefile.in b/src/addins/Makefile.in
index 01cd54b..55b9391 100644
--- a/src/addins/Makefile.in
+++ b/src/addins/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -290,11 +289,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -358,6 +357,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -421,6 +424,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -580,21 +597,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/Makefile.in b/src/addins/MonoDevelop.AssemblyBrowser/Makefile.in
index 6be6ee6..db8b934 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/Makefile.in
+++ b/src/addins/MonoDevelop.AssemblyBrowser/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.addin.xml b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.addin.xml
index 66616ff..84bfac7 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.addin.xml
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.addin.xml
@@ -6,13 +6,13 @@
url = ""
description = "Provides an assembly browser for the MonoDevelop"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="Refactoring" version="4.0.5"/>
- <Addin id="CSharpBinding" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
+ <Addin id="CSharpBinding" version="4.0.12"/>
</Dependencies>
<!-- Extension points -->
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.csproj b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.csproj
index 94cecfb..e6aa792 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.csproj
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser.csproj
@@ -115,6 +115,10 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
+ <Project>{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006}</Project>
+ <Name>ICSharpCode.NRefactory.Cecil</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserViewContent.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserViewContent.cs
index 2488982..5c2c572 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserViewContent.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserViewContent.cs
@@ -70,7 +70,7 @@ namespace MonoDevelop.AssemblyBrowser
public override void Load (string fileName)
{
- this.ContentName = MonoDevelop.Core.GettextCatalog.GetString ("Assembly Browser");
+ ContentName = GettextCatalog.GetString ("Assembly Browser");
widget.AddReferenceByFileName (fileName);
}
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs
index 30bdd2b..1f80448 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs
@@ -51,6 +51,8 @@ using MonoDevelop.SourceEditor;
using XmlDocIdLib;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Components;
+using System.Threading.Tasks;
+using System.Threading;
namespace MonoDevelop.AssemblyBrowser
{
@@ -371,7 +373,13 @@ namespace MonoDevelop.AssemblyBrowser
ITreeNavigator SearchMember (string helpUrl)
{
- return SearchMember (TreeView.GetRootNode (), helpUrl);
+ var nav = SearchMember (TreeView.GetRootNode (), helpUrl);
+ if (nav != null)
+ return nav;
+ // Constructor may be a generated default without implementation.
+ if (helpUrl.StartsWith ("M:", StringComparison.Ordinal) && helpUrl.EndsWith (".#ctor", StringComparison.Ordinal))
+ return SearchMember ("T" + helpUrl.Substring (1, helpUrl.Length - 1 - ".#ctor".Length));
+ return null;
}
static void AppendTypeReference (StringBuilder result, ITypeReference type)
@@ -408,6 +416,10 @@ namespace MonoDevelop.AssemblyBrowser
if (type is IUnresolvedTypeDefinition) {
result.Append (((IUnresolvedTypeDefinition)type).FullName);
}
+
+ if (type is TypeParameterReference) {
+ result.Append ("`" +((TypeParameterReference)type).Index);
+ }
}
static void AppendHelpParameterList (StringBuilder result, IList<IUnresolvedParameter> parameters)
@@ -437,13 +449,13 @@ namespace MonoDevelop.AssemblyBrowser
{
StringBuilder sb;
- switch (member.EntityType) {
- case EntityType.TypeDefinition:
+ switch (member.SymbolKind) {
+ case SymbolKind.TypeDefinition:
var type = member as IUnresolvedTypeDefinition;
if (type.TypeParameters.Count == 0)
return "T:" + type.FullName;
return "T:" + type.FullName + "`" + type.TypeParameters.Count;
- case EntityType.Method:
+ case SymbolKind.Method:
var method = (IUnresolvedMethod)member;
sb = new StringBuilder ();
sb.Append ("M:");
@@ -456,7 +468,7 @@ namespace MonoDevelop.AssemblyBrowser
}
AppendHelpParameterList (sb, method.Parameters);
return sb.ToString ();
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
var constructor = (IUnresolvedMethod)member;
sb = new StringBuilder ();
sb.Append ("M:");
@@ -464,16 +476,16 @@ namespace MonoDevelop.AssemblyBrowser
sb.Append (".#ctor");
AppendHelpParameterList (sb, constructor.Parameters);
return sb.ToString ();
- case EntityType.Destructor: // todo
+ case SymbolKind.Destructor: // todo
return "todo";
- case EntityType.Property:
+ case SymbolKind.Property:
sb = new StringBuilder ();
sb.Append ("P:");
sb.Append (member.DeclaringTypeDefinition.ReflectionName);
sb.Append (".");
sb.Append (member.Name);
return sb.ToString ();
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
var indexer = (IUnresolvedProperty)member;
sb = new StringBuilder ();
sb.Append ("P:");
@@ -481,21 +493,21 @@ namespace MonoDevelop.AssemblyBrowser
sb.Append (".Item");
AppendHelpParameterList (sb, indexer.Parameters);
return sb.ToString ();
- case EntityType.Field:
+ case SymbolKind.Field:
sb = new StringBuilder ();
sb.Append ("F:");
sb.Append (member.DeclaringTypeDefinition.ReflectionName);
sb.Append (".");
sb.Append (member.Name);
return sb.ToString ();
- case EntityType.Event:
+ case SymbolKind.Event:
sb = new StringBuilder ();
sb.Append ("E:");
sb.Append (member.DeclaringTypeDefinition.ReflectionName);
sb.Append (".");
sb.Append (member.Name);
return sb.ToString ();
- case EntityType.Operator: // todo
+ case SymbolKind.Operator: // todo
return "todo";
}
return "unknown entity: " + member;
@@ -569,7 +581,7 @@ namespace MonoDevelop.AssemblyBrowser
{
if (nav == null)
return null;
- bool searchType = helpUrl.StartsWith ("T:");
+ bool searchType = helpUrl.StartsWith ("T:", StringComparison.Ordinal);
do {
if (IsMatch (nav, helpUrl, searchType)) {
inspectEditor.ClearSelection ();
@@ -1173,36 +1185,88 @@ namespace MonoDevelop.AssemblyBrowser
ITreeNavigator nav = SearchMember (url);
if (definitions == null) // we've been disposed
return;
- if (nav == null) {
- if (currentAssembly != null) {
- var cecilObject = loader.GetCecilObject (currentAssembly.UnresolvedAssembly);
- if (cecilObject != null) {
- foreach (var reference in cecilObject.MainModule.AssemblyReferences) {
- string fileName = currentAssembly.LookupAssembly (reference.FullName);
- if (string.IsNullOrEmpty (fileName))
- continue;
- AddReferenceByFileName (fileName, true);
- nav = SearchMember (url);
- if (nav != null)
- break;
- }
+ if (nav != null)
+ return;
+ if (currentAssembly != null) {
+ OpenFromAssembly (url, currentAssembly);
+ } else {
+ OpenFromAssemblyNames (url);
+ }
+ }
+
+ void OpenFromAssembly (string url, AssemblyLoader currentAssembly)
+ {
+ var cecilObject = loader.GetCecilObject (currentAssembly.UnresolvedAssembly);
+ if (cecilObject == null)
+ return;
+
+ int i = 0;
+ System.Action loadNext = null;
+ var references = cecilObject.MainModule.AssemblyReferences;
+ loadNext = () => {
+ var reference = references [i];
+ string fileName = currentAssembly.LookupAssembly (reference.FullName);
+ if (string.IsNullOrEmpty (fileName)) {
+ LoggingService.LogWarning ("Assembly browser: Can't find assembly: " + reference.FullName + ".");
+ if (++i == references.Count)
+ LoggingService.LogError ("Assembly browser: Can't find: " + url + ".");
+ else
+ loadNext ();
+ return;
+ }
+ var result = AddReferenceByFileName (fileName, true);
+ result.LoadingTask.ContinueWith (t2 => {
+ t2.Wait ();
+ if (definitions == null) // disposed
+ return;
+ var nav = SearchMember (url);
+ if (nav == null) {
+ if (++i == references.Count)
+ LoggingService.LogError ("Assembly browser: Can't find: " + url + ".");
+ else
+ loadNext ();
}
+ }, TaskScheduler.Current);
+ };
+ }
- } else {
- foreach (var definition in definitions.ToArray ()) {
- var cecilObject = loader.GetCecilObject (definition.UnresolvedAssembly);
- if (cecilObject == null)
- continue;
- foreach (var assemblyNameReference in cecilObject.MainModule.AssemblyReferences) {
- AddReferenceByAssemblyName (assemblyNameReference);
- }
+ void OpenFromAssemblyNames (string url)
+ {
+ List<Task> tasks = new List<Task> ();
+ foreach (var definition in definitions.ToArray ()) {
+ var cecilObject = loader.GetCecilObject (definition.UnresolvedAssembly);
+ if (cecilObject == null) {
+ LoggingService.LogWarning ("Assembly browser: Can't find assembly: " + definition.UnresolvedAssembly.FullAssemblyName + ".");
+ continue;
+ }
+ foreach (var assemblyNameReference in cecilObject.MainModule.AssemblyReferences) {
+ var result = AddReferenceByAssemblyName (assemblyNameReference);
+ if (result == null) {
+ LoggingService.LogWarning ("Assembly browser: Can't find assembly: " + assemblyNameReference.FullName + ".");
+ } else {
+ tasks.Add (result.LoadingTask);
}
}
- nav = SearchMember (url);
- }
- if (nav == null) {
- LoggingService.LogError ("Can't open: " + url + " (not found).");
}
+ if (tasks.Count == 0) {
+ var nav = SearchMember (url);
+ if (nav == null) {
+ LoggingService.LogError ("Assembly browser: Can't find: " + url + ".");
+ }
+ return;
+ };
+ Task.Factory.ContinueWhenAll (tasks.ToArray (), tarr => {
+ var exceptions = tarr.Where (t => t.IsFaulted).Select (t => t.Exception).ToArray ();
+ if (exceptions != null) {
+ throw new AggregateException (exceptions).Flatten ();
+ }
+ if (definitions == null) // disposed
+ return;
+ var nav = SearchMember (url);
+ if (nav == null) {
+ LoggingService.LogError ("Assembly browser: Can't find: " + url + ".");
+ }
+ }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Current);
}
public void SelectAssembly (string fileName)
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/IAssemblyBrowserNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/IAssemblyBrowserNodeBuilder.cs
index 889c38e..f779d3d 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/IAssemblyBrowserNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/IAssemblyBrowserNodeBuilder.cs
@@ -37,7 +37,6 @@ namespace MonoDevelop.AssemblyBrowser
public interface IAssemblyBrowserNodeBuilder
{
string GetDocumentationMarkup (ITreeNavigator navigator);
- string GetDescription (ITreeNavigator navigator);
List<ReferenceSegment> Disassemble (TextEditorData data, ITreeNavigator navigator);
List<ReferenceSegment> Decompile (TextEditorData data, ITreeNavigator navigator, bool publicOnly);
}
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyBrowserTypeNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyBrowserTypeNodeBuilder.cs
index 43f91c0..e6479db 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyBrowserTypeNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyBrowserTypeNodeBuilder.cs
@@ -69,8 +69,8 @@ namespace MonoDevelop.AssemblyBrowser
if (e2 == null)
return 1;
- if (e1.EntityType != e2.EntityType)
- return e2.EntityType.CompareTo (e1.EntityType);
+ if (e1.SymbolKind != e2.SymbolKind)
+ return e2.SymbolKind.CompareTo (e1.SymbolKind);
return e1.Name.CompareTo (e2.Name);
} catch (Exception e) {
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyNodeBuilder.cs
index 555f1ef..cc3b805 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/AssemblyNodeBuilder.cs
@@ -151,21 +151,6 @@ namespace MonoDevelop.AssemblyBrowser
return GettextCatalog.GetString ("Unknown");
}
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- var compilationUnit = Widget.CecilLoader.GetCecilObject (((AssemblyLoader)navigator.DataItem).UnresolvedAssembly);
- StringBuilder result = new StringBuilder ();
- PrintAssemblyHeader (result, compilationUnit);
-
- result.Append (String.Format (GettextCatalog.GetString ("<b>Name:</b>\t{0}"),
- compilationUnit.Name.FullName));
- result.AppendLine ();
- result.Append (String.Format (GettextCatalog.GetString ("<b>Type:</b>\t{0}"),
- GetTypeString (compilationUnit.MainModule.Kind)));
- result.AppendLine ();
- return result.ToString ();
- }
-
public List<ReferenceSegment> Disassemble (TextEditorData data, ITreeNavigator navigator)
{
var assembly = ((AssemblyLoader)navigator.DataItem).UnresolvedAssembly;
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomEventNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomEventNodeBuilder.cs
index 5830905..f91fd75 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomEventNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomEventNodeBuilder.cs
@@ -62,8 +62,12 @@ namespace MonoDevelop.AssemblyBrowser
public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
{
var evt = (IUnresolvedEvent)dataObject;
- var resolved = Resolve (treeBuilder, evt);
- label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ try {
+ var resolved = Resolve (treeBuilder, evt);
+ label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ } catch (Exception) {
+ label = evt.Name;
+ }
if (evt.IsPrivate || evt.IsInternal)
label = DomMethodNodeBuilder.FormatPrivate (label);
icon = ImageService.GetPixbuf (evt.GetStockIcon (), Gtk.IconSize.Menu);
@@ -86,20 +90,6 @@ namespace MonoDevelop.AssemblyBrowser
}
#region IAssemblyBrowserNodeBuilder
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- var evt = (IUnresolvedEvent)navigator.DataItem;
- var resolved = Resolve (navigator, evt);
- StringBuilder result = new StringBuilder ();
- result.Append ("<span font_family=\"monospace\">");
- result.Append (Ambience.GetString (resolved, OutputFlags.AssemblyBrowserDescription));
- result.Append ("</span>");
- result.AppendLine ();
- DomMethodNodeBuilder.PrintDeclaringType (result, navigator);
- DomTypeNodeBuilder.PrintAssembly (result, navigator);
- return result.ToString ();
- }
-
List<ReferenceSegment> IAssemblyBrowserNodeBuilder.Disassemble (TextEditorData data, ITreeNavigator navigator)
{
if (DomMethodNodeBuilder.HandleSourceCodeEntity (navigator, data))
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomFieldNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomFieldNodeBuilder.cs
index 68bb962..33db750 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomFieldNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomFieldNodeBuilder.cs
@@ -63,28 +63,20 @@ namespace MonoDevelop.AssemblyBrowser
public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
{
var field = (IUnresolvedField)dataObject;
- var resolved = Resolve (treeBuilder, field);
- label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ try {
+ var resolved = Resolve (treeBuilder, field);
+ label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ } catch (Exception) {
+ label = field.Name;
+ }
+
if (field.IsPrivate || field.IsInternal)
label = DomMethodNodeBuilder.FormatPrivate (label);
icon = ImageService.GetPixbuf (field.GetStockIcon (), Gtk.IconSize.Menu);
}
#region IAssemblyBrowserNodeBuilder
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- var field = (IUnresolvedField)navigator.DataItem;
- var resolved = Resolve (navigator, field);
- StringBuilder result = new StringBuilder ();
- result.Append ("<span font_family=\"monospace\">");
- result.Append (Ambience.GetString (resolved, OutputFlags.AssemblyBrowserDescription));
- result.Append ("</span>");
- result.AppendLine ();
- DomMethodNodeBuilder.PrintDeclaringType (result, navigator);
- DomTypeNodeBuilder.PrintAssembly (result, navigator);
- return result.ToString ();
- }
-
+
List<ReferenceSegment> IAssemblyBrowserNodeBuilder.Disassemble (TextEditorData data, ITreeNavigator navigator)
{
if (DomMethodNodeBuilder.HandleSourceCodeEntity (navigator, data))
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomMethodNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomMethodNodeBuilder.cs
index 113cbb1..6caebe1 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomMethodNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomMethodNodeBuilder.cs
@@ -64,7 +64,7 @@ namespace MonoDevelop.AssemblyBrowser
public override string GetNodeName (ITreeNavigator thisNode, object dataObject)
{
var method = (IUnresolvedMethod)dataObject;
- if (method.EntityType == EntityType.Constructor || method.EntityType == EntityType.Destructor)
+ if (method.SymbolKind == SymbolKind.Constructor || method.SymbolKind == SymbolKind.Destructor)
return method.DeclaringTypeDefinition.Name;
return method.Name;
}
@@ -78,7 +78,11 @@ namespace MonoDevelop.AssemblyBrowser
var method = (IUnresolvedMethod)dataObject;
var dt = new DefaultResolvedTypeDefinition (GetContext (treeBuilder), method.DeclaringTypeDefinition);
var resolved = (DefaultResolvedMethod)Resolve (treeBuilder, method, dt);
- label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ try {
+ label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ } catch (Exception) {
+ label = method.Name;
+ }
if (method.IsPrivate || method.IsInternal)
label = DomMethodNodeBuilder.FormatPrivate (label);
@@ -97,20 +101,6 @@ namespace MonoDevelop.AssemblyBrowser
result.AppendLine ();
}
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- var method = (IUnresolvedMethod)navigator.DataItem;
- var resolved = Resolve (navigator, method);
- StringBuilder result = new StringBuilder ();
- result.Append ("<span font_family=\"monospace\">");
- result.Append (Ambience.GetString (resolved, OutputFlags.AssemblyBrowserDescription));
- result.Append ("</span>");
- result.AppendLine ();
- PrintDeclaringType (result, navigator);
- DomTypeNodeBuilder.PrintAssembly (result, navigator);
- return result.ToString ();
- }
-
static string GetInstructionOffset (Instruction instruction)
{
return String.Format ("IL_{0:X4}", instruction.Offset);
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomPropertyNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomPropertyNodeBuilder.cs
index 8d21ee1..65183fc 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomPropertyNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomPropertyNodeBuilder.cs
@@ -64,8 +64,12 @@ namespace MonoDevelop.AssemblyBrowser
public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
{
var property = (IUnresolvedProperty)dataObject;
- var resolved = Resolve (treeBuilder, property);
- label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ try {
+ var resolved = Resolve (treeBuilder, property);
+ label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.CompletionListFomat);
+ } catch (Exception) {
+ label = property.Name;
+ }
if (property.IsPrivate || property.IsInternal)
label = DomMethodNodeBuilder.FormatPrivate (label);
icon = ImageService.GetPixbuf (property.GetStockIcon (), Gtk.IconSize.Menu);
@@ -82,20 +86,7 @@ namespace MonoDevelop.AssemblyBrowser
#region IAssemblyBrowserNodeBuilder
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- var property = (IUnresolvedProperty)navigator.DataItem;
- var resolved = Resolve (navigator, property);
- StringBuilder result = new StringBuilder ();
- result.Append ("<span font_family=\"monospace\">");
- result.Append (Ambience.GetString (resolved, OutputFlags.AssemblyBrowserDescription));
- result.Append ("</span>");
- result.AppendLine ();
- DomMethodNodeBuilder.PrintDeclaringType (result, navigator);
- DomTypeNodeBuilder.PrintAssembly (result, navigator);
- return result.ToString ();
- }
-
+
List<ReferenceSegment> IAssemblyBrowserNodeBuilder.Disassemble (TextEditorData data, ITreeNavigator navigator)
{
if (DomMethodNodeBuilder.HandleSourceCodeEntity (navigator, data))
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomTypeNodeBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomTypeNodeBuilder.cs
index 6c42195..f919c52 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomTypeNodeBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/DomTypeNodeBuilder.cs
@@ -112,8 +112,12 @@ namespace MonoDevelop.AssemblyBrowser
public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
{
var type = (IUnresolvedTypeDefinition)dataObject;
- var resolved = Resolve (treeBuilder, type);
- label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.UseNETTypeNames);
+ try {
+ var resolved = Resolve (treeBuilder, type);
+ label = Ambience.GetString (resolved, OutputFlags.ClassBrowserEntries | OutputFlags.IncludeMarkup | OutputFlags.UseNETTypeNames);
+ } catch (Exception) {
+ label = type.Name;
+ }
if (type.IsPrivate)
label = DomMethodNodeBuilder.FormatPrivate (label);
icon = ImageService.GetPixbuf (type.GetStockIcon (), Gtk.IconSize.Menu);
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/NamespaceBuilder.cs b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/NamespaceBuilder.cs
index 37af374..a210d58 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/NamespaceBuilder.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/TreeNodes/NamespaceBuilder.cs
@@ -97,20 +97,7 @@ namespace MonoDevelop.AssemblyBrowser
}
#region IAssemblyBrowserNodeBuilder
- string IAssemblyBrowserNodeBuilder.GetDescription (ITreeNavigator navigator)
- {
- Namespace ns = (Namespace)navigator.DataItem;
- StringBuilder result = new StringBuilder ();
- if (!String.IsNullOrEmpty (ns.Name)) {
- result.Append ("<span font_family=\"monospace\">");
-// result.Append (Ambience.GetString (ns.Name, OutputFlags.AssemblyBrowserDescription));
- result.Append ("</span>");
- result.AppendLine ();
- }
- DomTypeNodeBuilder.PrintAssembly (result, navigator);
- return result.ToString ();
- }
-
+
public List<ReferenceSegment> Disassemble (TextEditorData data, ITreeNavigator navigator)
{
// bool publicOnly = Widget.PublicApiOnly;
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/MonoDevelop.AssemblyBrowser.AssemblyBrowserWidget.cs b/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/MonoDevelop.AssemblyBrowser.AssemblyBrowserWidget.cs
index cc346de..5ebb678 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/MonoDevelop.AssemblyBrowser.AssemblyBrowserWidget.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/MonoDevelop.AssemblyBrowser.AssemblyBrowserWidget.cs
@@ -16,7 +16,7 @@ namespace MonoDevelop.AssemblyBrowser
private global::Gtk.VBox searchWidget;
private global::Gtk.ScrolledWindow scrolledwindow1;
private global::Gtk.TreeView searchTreeview;
-
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/generated.cs b/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/generated.cs
index 8d3a3ae..75935e2 100644
--- a/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/generated.cs
+++ b/src/addins/MonoDevelop.AssemblyBrowser/gtk-gui/generated.cs
@@ -5,7 +5,7 @@ namespace Stetic
internal class Gui
{
private static bool initialized;
-
+
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
@@ -13,12 +13,12 @@ namespace Stetic
}
}
}
-
+
internal class BinContainer
{
private Gtk.Widget child;
private Gtk.UIManager uimanager;
-
+
public static BinContainer Attach (Gtk.Bin bin)
{
BinContainer bc = new BinContainer ();
@@ -27,32 +27,32 @@ namespace Stetic
bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc;
}
-
+
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{
if ((this.child != null)) {
args.Requisition = this.child.SizeRequest ();
}
}
-
+
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{
if ((this.child != null)) {
this.child.Allocation = args.Allocation;
}
}
-
+
private void OnAdded (object sender, Gtk.AddedArgs args)
{
this.child = args.Widget;
}
-
+
public void SetUiManager (Gtk.UIManager uim)
{
this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized);
}
-
+
private void OnRealized (object sender, System.EventArgs args)
{
if ((this.uimanager != null)) {
@@ -65,14 +65,14 @@ namespace Stetic
}
}
}
-
+
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
-
+
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.MonoDevelop.AssemblyBrowser.addin.xml b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.MonoDevelop.AssemblyBrowser.addin.xml
new file mode 100644
index 0000000..84bfac7
--- /dev/null
+++ b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.MonoDevelop.AssemblyBrowser.addin.xml
@@ -0,0 +1,44 @@
+<Addin id = "AssemblyBrowser"
+ namespace = "MonoDevelop"
+ name = "MonoDevelop Assembly Browser"
+ author = "Mike Krüger"
+ copyright = ""
+ url = ""
+ description = "Provides an assembly browser for the MonoDevelop"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
+ <Addin id="CSharpBinding" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension points -->
+ <ExtensionPoint path = "/MonoDevelop/AssemblyBrowser/TypeNode/ContextMenu">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.AssemblyBrowser.ShowAssemblyBrowser"
+ defaultHandler = "MonoDevelop.AssemblyBrowser.AssemblyBrowserHandler"
+ _label = "_Assembly browser" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding id = "AssemblyBrowser" class = "MonoDevelop.AssemblyBrowser.AssemblyBrowserDisplayBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/AssemblyBrowser/TypeNode/ContextMenu">
+ <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.FindReferences" />
+ <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.FindDerivedClasses" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/View">
+ <CommandItem id = "MonoDevelop.AssemblyBrowser.ShowAssemblyBrowser" insertbefore="ViewSeparator3" />
+ </Extension>
+
+</Addin>
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..f92cd45
--- /dev/null
+++ b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.MonoDevelop.AssemblyBrowser.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/AssemblyBrowser/MonoDevelop.AssemblyBrowser.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/AssemblyBrowser/MonoDevelop.AssemblyBrowser.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.dll.mdb
diff --git a/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.gtk-gui.gui.stetic b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.gtk-gui.gui.stetic
new file mode 100644
index 0000000..3eef8c0
--- /dev/null
+++ b/src/addins/MonoDevelop.AssemblyBrowser/obj/Debug/MonoDevelop.AssemblyBrowser.gtk-gui.gui.stetic
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/MonoDevelop.CSharpBinding.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/AssemblyBrowser/MonoDevelop.AssemblyBrowser.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.AssemblyBrowser.AssemblyBrowserWidget" design-size="702 482">
+ <action-group name="Default">
+ <action id="NavigateBackwardAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Navigate backward</property>
+ <property name="ShortLabel" translatable="yes">Navigate backward</property>
+ <property name="StockId">gtk-go-back</property>
+ <signal name="Activated" handler="OnNavigateBackwardActionActivated" />
+ </action>
+ <action id="NavigateForwardAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Navigate forward</property>
+ <property name="ShortLabel" translatable="yes">Navigate forward</property>
+ <property name="StockId">gtk-go-forward</property>
+ <signal name="Activated" handler="OnNavigateForwardActionActivated" />
+ </action>
+ </action-group>
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">2</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">271</property>
+ <child>
+ <widget class="Gtk.Alignment" id="treeViewPlaceholder">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="ShowBorder">False</property>
+ <child>
+ <widget class="MonoDevelop.Components.CompactScrolledWindow" id="documentationScrolledWindow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowBorderLine">False</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="searchWidget">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="searchTreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Autotools/Makefile.in b/src/addins/MonoDevelop.Autotools/Makefile.in
index bf1fb79..d02bd74 100644
--- a/src/addins/MonoDevelop.Autotools/Makefile.in
+++ b/src/addins/MonoDevelop.Autotools/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs b/src/addins/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
index a6b6f98..8bbfc36 100644
--- a/src/addins/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
+++ b/src/addins/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
@@ -91,8 +91,6 @@ namespace MonoDevelop.Autotools
} finally {
monitor.EndTask ();
}
-
- entry.SetNeedsBuilding (false);
return entry;
}
@@ -201,8 +199,6 @@ namespace MonoDevelop.Autotools
BuildResult cr = ParseOutput (tf, output, project.BaseDirectory, regexError, regexWarning);
if (exitCode != 0 && cr.FailedBuildCount == 0)
cr.AddError (GettextCatalog.GetString ("Build failed. See Build Output panel."));
- else
- entry.SetNeedsBuilding (false, configuration);
return cr;
}
diff --git a/src/addins/MonoDevelop.Autotools/MonoDevelop.Autotools.addin.xml b/src/addins/MonoDevelop.Autotools/MonoDevelop.Autotools.addin.xml
index 1fbb06b..2a4d720 100644
--- a/src/addins/MonoDevelop.Autotools/MonoDevelop.Autotools.addin.xml
+++ b/src/addins/MonoDevelop.Autotools/MonoDevelop.Autotools.addin.xml
@@ -6,7 +6,7 @@
url = "http://monodevelop.com"
description = "Allows generating simple makefiles and Autotools based makefiles for projects"
category = "Project Import and Export"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.Autotools.dll" />
@@ -19,10 +19,10 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="Deployment" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path = "/MonoDevelop/Autotools/SimpleSetups">
diff --git a/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.MonoDevelop.Autotools.addin.xml b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.MonoDevelop.Autotools.addin.xml
new file mode 100644
index 0000000..2a4d720
--- /dev/null
+++ b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.MonoDevelop.Autotools.addin.xml
@@ -0,0 +1,148 @@
+<Addin id = "Autotools"
+ namespace = "MonoDevelop"
+ name = "Makefile generation"
+ author = "Matthias Braun, Scott Ellington"
+ copyright = "LGPL"
+ url = "http://monodevelop.com"
+ description = "Allows generating simple makefiles and Autotools based makefiles for projects"
+ category = "Project Import and Export"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.Autotools.dll" />
+ <Import file="templates/autogen.sh.template"/>
+ <Import file="templates/Makefile.am.project.template"/>
+ <Import file="templates/Makefile.include"/>
+ <Import file="templates/configure.ac.template"/>
+ <Import file="templates/exe.wrapper.in.template"/>
+ <Import file="templates/expansions.m4"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path = "/MonoDevelop/Autotools/SimpleSetups">
+ <Description>Simple autotools setups. Specified classes must implement ISimpleAutotoolsSetup</Description>
+ <ExtensionNode name ="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Autotools/MakefileHandlers">
+ <Description>Makefile handlers. Specified classes must implement IMakefileHandler</Description>
+ <ExtensionNode name ="Class" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "AutotoolNodeExtension" class = "MonoDevelop.Autotools.NodeExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.Autotools.MakefileProjectServiceExtension" id="MakefileProjectServiceExtension" insertafter="FinalStep"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Condition id="Platform" value="!windows">
+ <Category _name = "Autotools" id = "Autotools">
+ <Command id = "MonoDevelop.Autotools.Commands.GenerateFiles"
+ _label = "Generate Makefiles..."
+ description="Generate Makefiles for a solution"/>
+ <Command id = "MonoDevelop.Autotools.Commands.SynchWithMakefile"
+ type="check"
+ _label = "Include in Synchronized Makefile" />
+ </Category>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Tools">
+ <Condition id="ItemType" value="Solution|Project">
+ <Condition id="Platform" value="!windows">
+ <CommandItem id = "MonoDevelop.Autotools.Commands.GenerateFiles" insertafter="ExportListSeparator"/>
+ </Condition>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Project">
+ <Condition id="Platform" value="!windows">
+ <CommandItem id = "MonoDevelop.Autotools.Commands.GenerateFiles" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/QuickProperties">
+ <Condition id="Platform" value="!windows">
+ <Condition id="ItemType" value="ProjectFile">
+ <CommandItem id = "MonoDevelop.Autotools.Commands.SynchWithMakefile" />
+ </Condition>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <Condition id="Platform" value="!windows">
+ <NodeBuilder class = "MonoDevelop.Autotools.FileNodeBuilderExtension"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DeployService/PackageBuilders">
+ <Condition id="Platform" value="!windows">
+ <Condition id="Platform" value="!windows">
+ <Class class="MonoDevelop.Autotools.TarballDeployTarget" />
+ </Condition>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Deployment/PackageBuilderEditors">
+ <Condition id="Platform" value="!windows">
+ <Condition id="Platform" value="!windows">
+ <Class class="MonoDevelop.Autotools.TarballTargetEditor" />
+ </Condition>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.Autotools.TarballDeployTarget" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Common">
+ <Condition id="Platform" value="!windows">
+ <Condition id="ItemType" value="Project">
+ <Section id= "Makefile" _label = "Makefile Integration"
+ class = "MonoDevelop.Autotools.MakefileOptionPanel" />
+ </Condition>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.Project"
+ name = "MonoDevelop.Autotools.MakefileInfo" type = "MonoDevelop.Autotools.MakefileData" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.Autotools.PropertyProvider"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/Applications">
+ <Condition id="Platform" value="!windows">
+ <Application id = "generate-makefiles" class = "MonoDevelop.Autotools.MakefileGeneratorTool" description = "Makefile generator tool"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Autotools/MakefileHandlers">
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.Autotools.SolutionMakefileHandler"/>
+ <Class class = "MonoDevelop.Autotools.SimpleProjectMakefileHandler"/>
+ </Condition>
+ </Extension>
+
+<!--
+ <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+ <Class class = "MonoDevelop.Autotools.MakefileIntegrationFeature" />
+ </Extension>
+-->
+
+</Addin>
diff --git a/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..849e2dd
--- /dev/null
+++ b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,18 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.MonoDevelop.Autotools.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/Makefile.am.project.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/Makefile.include
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/autogen.sh.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/configure.ac.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/exe.wrapper.in.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/package.pc.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/Makefile.noauto.project.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/Makefile.solution.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/rules.make
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/configure.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/make-dist.targets
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/templates/expansions.m4
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/MonoDevelop.Autotools.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Autotools/MonoDevelop.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.dll.mdb
diff --git a/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.gtk-gui.gui.stetic b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.gtk-gui.gui.stetic
new file mode 100644
index 0000000..58f8635
--- /dev/null
+++ b/src/addins/MonoDevelop.Autotools/obj/Debug/MonoDevelop.Autotools.gtk-gui.gui.stetic
@@ -0,0 +1,2271 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Autotools/MonoDevelop.Autotools.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.Autotools.MakefileOptionPanelWidget" design-size="589 368">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbEnableMakefileIntegration">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable makefile Integration in this project</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnEnableMakefileIntegrationClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="headerSep1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">9</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbBuildTarget">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Build target name:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCbBuildTargetClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbCleanTarget">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Clean target name:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCbCleanTargetClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbRunTarget">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Execute target name:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCbRunTargetClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileEntryMakefilePath">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="BrowserTitle" />
+ <signal name="FocusOutEvent" handler="OnFileEntryMakefilePathFocusOutEvent" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="comboAssemblyName">
+ <property name="MemberName" />
+ <property name="WidthRequest">300</property>
+ <property name="Visible">False</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="comboOutputDir">
+ <property name="MemberName" />
+ <property name="WidthRequest">300</property>
+ <property name="Visible">False</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="BuildTargetName">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="ExecuteTargetName">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="CleanTargetName">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="headerSep2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the makefile targets that should be executed for the build and clean operations:</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Build processes:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblAssemblyNameVar">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Assembly Name variable:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblMakefileName">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Makefile path:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblOutputDirVar">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Output directory variable:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinProcesses">
+ <property name="MemberName">spinProcesses</property>
+ <property name="CanFocus">True</property>
+ <property name="Lower">1</property>
+ <property name="Upper">64</property>
+ <property name="PageIncrement">1</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Makefile</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbFileSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable project file synchronization</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCbFileSyncClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">6</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbKeepDeployFilesSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Deployment files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbKeepDeployFilesSyncClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbKeepFilesSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Source code files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbKeepFilesSyncClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbKeepOthersSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Other Files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbKeepOthersSyncClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbKeepResourcesSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Resources</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbKeepResourcesSyncClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboDeployFilesVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboFilesVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboOthersVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboResourcesVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboResourcesVarChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryDeployFilesPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryFilesPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryResourcesPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="entryOthersPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the kind of files you want to synchronize with the makefile. For each file kind please specify the makefile variable that holds the list and optionally a prefix to be prepended to each file name.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="RightAttach">3</property>
+ <property name="YPadding">9</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblCol2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Makefile variable name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblCol3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Prefix:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Files</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbKeepRefSync">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable references synchronization</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbKeepRefSyncClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator5">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">8</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="cbAutotoolsProject">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Look for packages in configure.in</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <signal name="Clicked" handler="OnCbAutotoolsProjectClicked" />
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboAsmRefVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboAsmRefVarChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboPackageRefVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboPackageRefVarChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboProjectRefVar">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboProjectRefVarChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryAsmRefPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPackageRefPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryProjectRefPattern">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="fileEntryConfigureInPath">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the kind of references you want to synchronize with the makefile. For each reference type please specify the makefile variable that holds the list, and optionally a prefix to be prepended to each reference name. You can specify the same variable name for several types of references.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="RightAttach">3</property>
+ <property name="YPadding">9</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblAsmRef">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Assembly References</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblCol5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Makefile variable name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblCol6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Prefix:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblConfigureInPath">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Path for configure.in</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblPackageRef">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Package References</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblProjectRef">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Project References</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">References</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the Compiler message format for parsing the compiler errors and warnings. You can either select one of the built-in options, or specify custom regular expressions for errors and warnings. The regex must be the .net style regex. The following named groups are relevant : file, line, column, number (error number) and message.</property>
+ <property name="Wrap">True</property>
+ <property name="Justify">Fill</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryErrorRegex">
+ <property name="MemberName" />
+ <property name="WidthRequest">350</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryWarningRegex">
+ <property name="MemberName" />
+ <property name="WidthRequest">350</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox6">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="comboMessageType">
+ <property name="MemberName" />
+ <property name="WidthRequest">150</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboMessageTypeChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblErrorRegex">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Error regex :</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblMessageType">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compiler :</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lblWarningRegex">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Warnings regex :</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Messages Regex</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Autotools.TarballBuilderEditorWidget" design-size="620 307">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Deploy directory:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ <property name="BrowserTitle">Target Directory</property>
+ <signal name="PathChanged" handler="OnFolderEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioUseExisting">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use existing Makefiles</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioUseExistingClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioGenerate">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Generate new Makefiles</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Clicked" handler="OnRadioGenerateClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxGenerate">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="boxConfig">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Default configuration:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboConfigs">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboConfigsChanged" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxConfig1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Select the kind of Makefile to generate:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="rbAutotools">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Autotools based</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">groupKind</property>
+ <signal name="Toggled" handler="OnRbAutotoolsToggled" />
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="WidthRequest">550</property>
+ <property name="LabelProp" translatable="yes"><b>Autotools based Makefile</b>
+Generates a Makefile structure based on Autotools, with the standard targets and configuration scripts.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="WidthRequest">24</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="rbSimple">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Simple</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">groupKind</property>
+ <signal name="Toggled" handler="OnRbSimpleToggled" />
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="WidthRequest">550</property>
+ <property name="LabelProp" translatable="yes"><b>Simple Makefile</b>
+Generates set of Makefiles with the most common targets, and a configuration script that does a basic check of package dependencies.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">24</property>
+ <property name="TopPadding">8</property>
+ <property name="BottomPadding">8</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="autofooProperties">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Edit configure switches</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnAutofooPropertiesClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Autotools.MakefileIntegrationFeatureWidget" design-size="300 300">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Autotools.GenerateMakefilesDialog" design-size="614 359">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Generate Makefiles</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the kind of Makefile you want to generate:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="rbSimple">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Simple</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">groupKind</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">550</property>
+ <property name="LabelProp" translatable="yes"><b>Simple Makefile</b>
+Generates set of Makefiles with the most common targets, and a configuration script that does a basic check of package dependencies.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="rbAutotools">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Autotools based</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">groupKind</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="WidthRequest">550</property>
+ <property name="LabelProp" translatable="yes"><b>Autotools based Makefile</b>
+Generates a Makefile structure based on Autotools, with the standard targets and configuration scripts.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="WidthRequest">580</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the configuration that the Makefile will build by default. Other configurations can be selected via the '--config' option of the generated configure script.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Default configuration:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboConfigs">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Autotools.MakefileSwitchEditorWidget" design-size="652 367">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">11</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Switch list</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Use the following list to define new switches usable with autotools configure script. Each switch is mapped to a define that you can use to do conditional compilation in your source files.</property>
+ <property name="Wrap">True</property>
+ <property name="WidthChars">78</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment4">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Button" id="addBtn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnAddBtnClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="remBtn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnRemBtnClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="BottomPadding">8</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="itemTv">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Autotools.MakefileSwitchEditor" design-size="400 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Switch editor</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Alignment" id="align">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Makefile.am b/src/addins/MonoDevelop.Debugger.Soft/Makefile.am
index d4409ae..c4c422e 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/Makefile.am
+++ b/src/addins/MonoDevelop.Debugger.Soft/Makefile.am
@@ -1,4 +1,3 @@
SUBDIRS = \
- Mono.Debugging.Soft \
MonoDevelop.Debugger.Soft \
MonoDevelop.Debugger.Soft.AspNet
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Makefile.in b/src/addins/MonoDevelop.Debugger.Soft/Makefile.in
index 82fd47f..510ddcf 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/Makefile.in
+++ b/src/addins/MonoDevelop.Debugger.Soft/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -225,7 +224,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = \
- Mono.Debugging.Soft \
MonoDevelop.Debugger.Soft \
MonoDevelop.Debugger.Soft.AspNet
@@ -264,11 +262,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -332,6 +330,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -395,6 +397,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -554,21 +570,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile.in b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile.in
deleted file mode 100644
index 9b417ea..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile.in
+++ /dev/null
@@ -1,427 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/xbuild.include ChangeLog
-subdir = src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ACLOCAL_FLAGS = @ACLOCAL_FLAGS@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CSC = @CSC@
-CSC_FLAGS = @CSC_FLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DYLD_FALLBACK_LIBRARY_PATH = @DYLD_FALLBACK_LIBRARY_PATH@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
-GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
-GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
-GLIB_SHARP_CFLAGS = @GLIB_SHARP_CFLAGS@
-GLIB_SHARP_LIBS = @GLIB_SHARP_LIBS@
-GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
-GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
-GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
-GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
-GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
-GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_PREFIX = @LIB_PREFIX@
-LIB_SUFFIX = @LIB_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MCS = @MCS@
-MD_ADDIN_DIR = @MD_ADDIN_DIR@
-MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
-MD_DIR = @MD_DIR@
-MKDIR_P = @MKDIR_P@
-MONO = @MONO@
-MONODOC_CFLAGS = @MONODOC_CFLAGS@
-MONODOC_LIBS = @MONODOC_LIBS@
-MONO_GAC_PREFIX = @MONO_GAC_PREFIX@
-MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
-MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
-MSGFMT = @MSGFMT@
-MSGMERGE = @MSGMERGE@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PACKAGE_VERSION_LABEL = @PACKAGE_VERSION_LABEL@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RUNTIME = @RUNTIME@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SQLITE_XML = @SQLITE_XML@
-STRIP = @STRIP@
-UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
-UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
-UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
-UPDATE_MIME_DB = @UPDATE_MIME_DB@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gtksharp_prefix = @gtksharp_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ALL_CSPROJ = $(wildcard *.csproj)
-MAIN_SLN = $(top_builddir)/Main.sln
- at ENABLE_GNOMEPLATFORM_TRUE@PROFILE_NAME = Debug
- at ENABLE_MACPLATFORM_TRUE@PROFILE_NAME = DebugMac
- at ENABLE_WINDOWSPLATFORM_TRUE@PROFILE_NAME = DebugWin32
-XBUILD = xbuild
-XBUILD_VERBOSITY = quiet
-XBUILD_ARGS = /verbosity:$(XBUILD_VERBOSITY) /nologo /property:CodePage=65001
-XBUILD_PROFILE = /property:Configuration=$(PROFILE_NAME)
-
-# Figure out how far we are from top_builddir
-DEPTH = $(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..')
-EXTS := *.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt
-ALL_FILES := $(EXTS) \
- $(addprefix */,$(EXTS)) \
- $(addprefix */*/,$(EXTS)) \
- $(addprefix */*/*/,$(EXTS)) \
- $(addprefix */*/*/*/,$(EXTS)) \
- $(addprefix */*/*/*/*/,$(EXTS)) \
- $(wildcard icons/*) \
- $(wildcard templates/*)
-
-WILDCARDED_FILES := $(wildcard $(ALL_FILES))
-EXTRA_DIST = \
- $(wildcard $(ALL_FILES))
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/xbuild.include $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-$(top_srcdir)/xbuild.include:
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-all: csproj_build
-
-clean: csproj_clean
-
-csproj_build:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Building $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \
- fi
-
-csproj_clean:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Cleaning $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \
- fi
-
-sln_build:
- @echo Building $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE)
-
-sln_clean:
- @echo Cleaning $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE) /t:Clean
-
-print_extradist:
- @echo $(WILDCARDED_FILES)
-
-.PHONY: all clean csproj_build csproj_clean sln_build sln_clean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj
deleted file mode 100644
index c5302eb..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/Mono.Debugging.Soft.csproj
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.Debugging.Soft</RootNamespace>
- <AssemblyName>Mono.Debugging.Soft</AssemblyName>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\..\core\Mono.Debugging\mono.debugging.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>True</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.Debugger.Soft</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.Debugger.Soft</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\contrib\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
- <Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
- <Name>Mono.Debugger.Soft</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\external\cecil\Mono.Cecil.csproj">
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
- <Name>Mono.Cecil</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\external\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj">
- <Project>{8559DD7F-A16F-46D0-A05A-9139FAEBA8FD}</Project>
- <Name>Mono.Cecil.Mdb</Name>
- <Private>False</Private>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ArrayAdaptor.cs" />
- <Compile Include="FieldValueReference.cs" />
- <Compile Include="PropertyValueReference.cs" />
- <Compile Include="SoftDebuggerSession.cs" />
- <Compile Include="VariableValueReference.cs" />
- <Compile Include="SoftEvaluationContext.cs" />
- <Compile Include="SoftDebuggerAdaptor.cs" />
- <Compile Include="SoftDebuggerBacktrace.cs" />
- <Compile Include="SoftDebuggerStartInfo.cs" />
- <Compile Include="LoggingService.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="StringAdaptor.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <None Include="Makefile.am" />
- </ItemGroup>
-</Project>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
deleted file mode 100644
index b21b37f..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerAdaptor.cs
+++ /dev/null
@@ -1,1628 +0,0 @@
-//
-// SoftDebuggerAdaptor.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2011,2012 Xamain Inc. (http://www.xamarin.com)
-//
-// 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.Linq;
-using System.Diagnostics;
-using Mono.Debugger.Soft;
-using Mono.Debugging.Evaluation;
-using Mono.Debugging.Client;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-using System.Reflection.Emit;
-using ST = System.Threading;
-using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Soft
-{
- public class SoftDebuggerAdaptor : ObjectValueAdaptor
- {
- static Dictionary<Type, OpCode> convertOps = new Dictionary<Type, OpCode> ();
- delegate object TypeCastDelegate (object value);
-
- static SoftDebuggerAdaptor ()
- {
- convertOps.Add (typeof (double), OpCodes.Conv_R8);
- convertOps.Add (typeof (float), OpCodes.Conv_R4);
- convertOps.Add (typeof (ulong), OpCodes.Conv_U8);
- convertOps.Add (typeof (uint), OpCodes.Conv_U4);
- convertOps.Add (typeof (ushort), OpCodes.Conv_U2);
- convertOps.Add (typeof (char), OpCodes.Conv_U2);
- convertOps.Add (typeof (byte), OpCodes.Conv_U1);
- convertOps.Add (typeof (long), OpCodes.Conv_I8);
- convertOps.Add (typeof (int), OpCodes.Conv_I4);
- convertOps.Add (typeof (short), OpCodes.Conv_I2);
- convertOps.Add (typeof (sbyte), OpCodes.Conv_I1);
- }
-
- public SoftDebuggerAdaptor ()
- {
- }
-
- public override string CallToString (EvaluationContext ctx, object obj)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
-
- if (obj == null)
- return null;
-
- if (obj is StringMirror)
- return ((StringMirror)obj).Value;
-
- if (obj is EnumMirror)
- return ((EnumMirror) obj).StringValue;
-
- if (obj is PrimitiveValue)
- return ((PrimitiveValue)obj).Value.ToString ();
-
- if (obj is PointerValue)
- return string.Format ("0x{0:x}", ((PointerValue)obj).Address);
-
- if ((obj is StructMirror) && ((StructMirror)obj).Type.IsPrimitive) {
- // Boxed primitive
- StructMirror sm = (StructMirror) obj;
- if (sm.Fields.Length > 0 && (sm.Fields[0] is PrimitiveValue))
- return ((PrimitiveValue)sm.Fields[0]).Value.ToString ();
- } else if ((obj is ObjectMirror) && cx.Options.AllowTargetInvoke) {
- ObjectMirror ob = (ObjectMirror) obj;
- MethodMirror method = OverloadResolve (cx, "ToString", ob.Type, new TypeMirror[0], true, false, false);
- if (method != null && method.DeclaringType.FullName != "System.Object") {
- StringMirror res = cx.RuntimeInvoke (method, obj, new Value[0]) as StringMirror;
- return res != null ? res.Value : null;
- }
- } else if ((obj is StructMirror) && cx.Options.AllowTargetInvoke) {
- StructMirror ob = (StructMirror) obj;
- MethodMirror method = OverloadResolve (cx, "ToString", ob.Type, new TypeMirror[0], true, false, false);
- if (method != null && method.DeclaringType.FullName != "System.ValueType") {
- StringMirror res = cx.RuntimeInvoke (method, obj, new Value[0]) as StringMirror;
- return res != null ? res.Value : null;
- }
- }
-
- return GetDisplayTypeName (GetValueTypeName (ctx, obj));
- }
-
- public override object TryConvert (EvaluationContext ctx, object obj, object targetType)
- {
- object res = TryCast (ctx, obj, targetType);
-
- if (res != null || obj == null)
- return res;
-
- object otype = GetValueType (ctx, obj);
- if (otype is Type) {
- if (targetType is TypeMirror)
- targetType = Type.GetType (((TypeMirror)targetType).FullName, false);
-
- Type tt = targetType as Type;
- if (tt != null) {
- try {
- if (obj is PrimitiveValue)
- obj = ((PrimitiveValue)obj).Value;
- res = System.Convert.ChangeType (obj, tt);
- return CreateValue (ctx, res);
- } catch {
- }
- }
- }
- return null;
- }
-
- static TypeCastDelegate GenerateTypeCastDelegate (string methodName, Type fromType, Type toType)
- {
- var argTypes = new Type[] {
- typeof (object)
- };
- var method = new DynamicMethod (methodName, typeof (object), argTypes, true);
- ILGenerator il = method.GetILGenerator ();
- ConstructorInfo ctorInfo;
- MethodInfo methodInfo;
- OpCode conv;
-
- il.Emit (OpCodes.Ldarg_0);
- il.Emit (OpCodes.Unbox_Any, fromType);
-
- if (fromType.IsSubclassOf (typeof (System.Nullable))) {
- PropertyInfo propInfo = fromType.GetProperty ("Value");
- methodInfo = propInfo.GetGetMethod ();
-
- il.Emit (OpCodes.Stloc_0);
- il.Emit (OpCodes.Ldloca_S);
- il.Emit (OpCodes.Call, methodInfo);
-
- fromType = methodInfo.ReturnType;
- }
-
- if (!convertOps.TryGetValue (toType, out conv)) {
- argTypes = new Type[] {
- fromType
- };
-
- if (toType == typeof (string)) {
- methodInfo = fromType.GetMethod ("ToString", new Type[0]);
- il.Emit (OpCodes.Call, methodInfo);
- } else if ((methodInfo = toType.GetMethod ("op_Explicit", argTypes)) != null) {
- il.Emit (OpCodes.Call, methodInfo);
- } else if ((methodInfo = toType.GetMethod ("op_Implicit", argTypes)) != null) {
- il.Emit (OpCodes.Call, methodInfo);
- } else if ((ctorInfo = toType.GetConstructor (argTypes)) != null) {
- il.Emit (OpCodes.Call, ctorInfo);
- } else {
- // No idea what else to try...
- throw new InvalidCastException ();
- }
- } else {
- il.Emit (conv);
- }
-
- il.Emit (OpCodes.Box, toType);
- il.Emit (OpCodes.Ret);
-
- return (TypeCastDelegate) method.CreateDelegate (typeof (TypeCastDelegate));
- }
-
- static object DynamicCast (object value, Type target)
- {
- string methodName = string.Format ("CastFrom{0}To{1}", value.GetType ().Name, target.Name);
- TypeCastDelegate method = GenerateTypeCastDelegate (methodName, value.GetType (), target);
-
- return method.Invoke (value);
- }
-
- object TryForceCast (EvaluationContext ctx, Value value, TypeMirror fromType, TypeMirror toType)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- MethodMirror method;
-
- method = OverloadResolve (cx, "op_Explicit", toType, new TypeMirror[] { fromType }, false, true, false);
- if (method != null)
- return cx.RuntimeInvoke (method, toType, new Value[] { value });
-
- method = OverloadResolve (cx, "op_Implicit", toType, new TypeMirror[] { fromType }, false, true, false);
- if (method != null)
- return cx.RuntimeInvoke (method, toType, new Value[] { value });
-
- // Finally, try a ctor...
- try {
- return CreateValue (ctx, toType, value);
- } catch {
- return null;
- }
- }
-
- public override object TryCast (EvaluationContext ctx, object obj, object targetType)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- TypeMirror toType = targetType as TypeMirror;
- TypeMirror fromType;
-
- if (obj == null)
- return null;
-
- object valueType = GetValueType (ctx, obj);
- if (valueType is TypeMirror) {
- fromType = (TypeMirror) valueType;
-
- if (toType != null && toType.IsAssignableFrom (fromType))
- return obj;
-
- // Try casting the primitive type of the enum
- EnumMirror em = obj as EnumMirror;
- if (em != null)
- return TryCast (ctx, CreateValue (ctx, em.Value), targetType);
-
- if (toType == null)
- return null;
-
- MethodMirror method;
-
- if (toType.CSharpName == "string") {
- method = OverloadResolve (cx, "ToString", fromType, new TypeMirror[0], true, false, false);
- if (method != null)
- return cx.RuntimeInvoke (method, obj, new Value[0]);
- }
-
- if (fromType.IsGenericType && fromType.FullName.StartsWith ("System.Nullable`1", StringComparison.Ordinal)) {
- method = OverloadResolve (cx, "get_Value", fromType, new TypeMirror[0], true, false, false);
- if (method != null) {
- obj = cx.RuntimeInvoke (method, obj, new Value[0]);
- return TryCast (ctx, obj, targetType);
- }
- }
-
- return TryForceCast (ctx, (Value) obj, fromType, toType);
- } else if (valueType is Type) {
- if (toType != null) {
- if (toType.IsEnum) {
- PrimitiveValue casted = TryCast (ctx, obj, toType.EnumUnderlyingType) as PrimitiveValue;
- if (casted == null)
- return null;
- return cx.Session.VirtualMachine.CreateEnumMirror (toType, casted);
- }
-
- targetType = Type.GetType (toType.FullName, false);
- }
-
- Type tt = targetType as Type;
- if (tt != null) {
- if (tt.IsAssignableFrom ((Type) valueType))
- return obj;
-
- try {
- if (tt.IsPrimitive || tt == typeof (string)) {
- if (obj is PrimitiveValue)
- obj = ((PrimitiveValue) obj).Value;
-
- if (obj == null)
- return null;
-
- object res;
-
- try {
- res = System.Convert.ChangeType (obj, tt);
- } catch {
- res = DynamicCast (obj, tt);
- }
-
- return CreateValue (ctx, res);
- } else {
- fromType = (TypeMirror) ForceLoadType (ctx, ((Type) valueType).FullName);
- if (toType == null)
- toType = (TypeMirror) ForceLoadType (ctx, tt.FullName);
-
- return TryForceCast (ctx, (Value) obj, fromType, toType);
- }
- } catch {
- }
- }
- }
-
- return null;
- }
-
- public override IStringAdaptor CreateStringAdaptor (EvaluationContext ctx, object str)
- {
- return new StringAdaptor ((StringMirror) str);
- }
-
- public override ICollectionAdaptor CreateArrayAdaptor (EvaluationContext ctx, object arr)
- {
- return new ArrayAdaptor ((ArrayMirror) arr);
- }
-
- public override object CreateNullValue (EvaluationContext ctx, object type)
- {
- return null;
- }
-
- public override object CreateTypeObject (EvaluationContext ctx, object type)
- {
- TypeMirror t = (TypeMirror) type;
- return t.GetTypeObject ();
- }
-
- public override object CreateValue (EvaluationContext ctx, object type, params object[] args)
- {
- ctx.AssertTargetInvokeAllowed ();
-
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- TypeMirror t = (TypeMirror) type;
-
- TypeMirror[] types = new TypeMirror [args.Length];
- Value[] values = new Value[args.Length];
- for (int n = 0; n < args.Length; n++) {
- types[n] = ToTypeMirror (ctx, GetValueType (ctx, args[n]));
- values[n] = (Value) args[n];
- }
-
- MethodMirror ctor = OverloadResolve (cx, ".ctor", t, types, true, true, true);
- if (ctor == null)
- return null;
-
- return t.NewInstance (cx.Thread, ctor, values);
- }
-
- public override object CreateValue (EvaluationContext ctx, object value)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- if (value is string)
- return cx.Thread.Domain.CreateString ((string)value);
- else
- return cx.Session.VirtualMachine.CreateValue (value);
- }
-
- public override object GetBaseValue (EvaluationContext ctx, object val)
- {
- return val;
- }
-
- public override bool NullableHasValue (EvaluationContext ctx, object type, object obj)
- {
- ValueReference hasValue = GetMember (ctx, type, obj, "has_value");
-
- return (bool) hasValue.ObjectValue;
- }
-
- public override ValueReference NullableGetValue (EvaluationContext ctx, object type, object obj)
- {
- return GetMember (ctx, type, obj, "value");
- }
-
- public override object GetEnclosingType (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- return cx.Frame.Method.DeclaringType;
- }
-
- public override string[] GetImportedNamespaces (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- HashSet<string> namespaces = new HashSet<string> ();
- foreach (TypeMirror type in cx.Session.GetAllTypes ())
- namespaces.Add (type.Namespace);
-
- string[] nss = new string [namespaces.Count];
- namespaces.CopyTo (nss);
- return nss;
- }
-
- public override ValueReference GetIndexerReference (EvaluationContext ctx, object target, object[] indices)
- {
- object valueType = GetValueType (ctx, target);
- TypeMirror targetType = null;
-
- if (valueType is Type)
- targetType = (TypeMirror) ForceLoadType (ctx, ((Type) valueType).FullName);
- else if (valueType is TypeMirror)
- targetType = (TypeMirror) valueType;
- else
- return null;
-
- Value[] values = new Value [indices.Length];
- TypeMirror[] types = new TypeMirror [indices.Length];
- for (int n=0; n<indices.Length; n++) {
- types [n] = ToTypeMirror (ctx, GetValueType (ctx, indices [n]));
- values [n] = (Value) indices [n];
- }
-
- List<MethodMirror> candidates = new List<MethodMirror> ();
- List<PropertyInfoMirror> props = new List<PropertyInfoMirror> ();
-
- TypeMirror type = targetType;
- while (type != null) {
- foreach (PropertyInfoMirror prop in type.GetProperties ()) {
- MethodMirror met = prop.GetGetMethod (true);
- if (met != null && !met.IsStatic && met.GetParameters ().Length > 0) {
- candidates.Add (met);
- props.Add (prop);
- }
- }
- type = type.BaseType;
- }
-
- MethodMirror idx = OverloadResolve ((SoftEvaluationContext) ctx, targetType.Name, null, types, candidates, true);
- int i = candidates.IndexOf (idx);
-
- MethodMirror getter = props[i].GetGetMethod (true);
- if (getter == null)
- return null;
-
- return new PropertyValueReference (ctx, props[i], target, null, getter, values);
- }
-
- static bool InGeneratedClosureOrIteratorType (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- if (cx.Frame.Method.IsStatic)
- return false;
- TypeMirror tm = cx.Frame.Method.DeclaringType;
- return IsGeneratedType (tm);
- }
-
- internal static bool IsGeneratedType (TypeMirror tm)
- {
- //
- // This should cover all C# generated special containers
- // - anonymous methods
- // - lambdas
- // - iterators
- // - async methods
- //
- // which allow stepping into
- //
- return tm.Name[0] == '<' &&
- // mcs is of the form <${NAME}>.c__{KIND}${NUMBER}
- (tm.Name.IndexOf (">c__") > 0 ||
- // csc is of form <${NAME}>d__${NUMBER}
- tm.Name.IndexOf (">d__") > 0);
- }
-
- internal static string GetNameFromGeneratedType (TypeMirror tm)
- {
- return tm.Name.Substring (1, tm.Name.IndexOf ('>') - 1);
- }
-
- static bool IsHoistedThisReference (FieldInfoMirror field)
- {
- // mcs is "<>f__this" or "$this" (if in an async compiler generated type)
- // csc is "<>4__this"
- return field.Name == "$this" ||
- (field.Name.StartsWith ("<>", StringComparison.Ordinal) &&
- field.Name.EndsWith ("__this", StringComparison.Ordinal));
- }
-
- static bool IsClosureReferenceField (FieldInfoMirror field)
- {
- // mcs is "<>f__ref"
- // csc is "CS$<>"
- return field.Name.StartsWith ("CS$<>", StringComparison.Ordinal) ||
- field.Name.StartsWith ("<>f__ref", StringComparison.Ordinal);
- }
-
- static bool IsClosureReferenceLocal (LocalVariable local)
- {
- if (local.Name == null)
- return false;
-
- // mcs is "$locvar" or starts with '<'
- // csc is "CS$<>"
- return local.Name.Length == 0 || local.Name[0] == '<' || local.Name.StartsWith ("$locvar", StringComparison.Ordinal) ||
- local.Name.StartsWith ("CS$<>", StringComparison.Ordinal);
- }
-
- static bool IsGeneratedTemporaryLocal (LocalVariable local)
- {
- return local.Name != null && local.Name.StartsWith ("CS$", StringComparison.Ordinal);
- }
-
- static string GetHoistedIteratorLocalName (FieldInfoMirror field)
- {
- //mcs captured args, of form <$>name
- if (field.Name.StartsWith ("<$>", StringComparison.Ordinal)) {
- return field.Name.Substring (3);
- }
-
- // csc, mcs locals of form <name>__0
- if (field.Name.StartsWith ("<", StringComparison.Ordinal)) {
- int i = field.Name.IndexOf ('>');
- if (i > 1) {
- return field.Name.Substring (1, i - 1);
- }
- }
- return null;
- }
-
- IEnumerable<ValueReference> GetHoistedLocalVariables (SoftEvaluationContext cx, ValueReference vthis)
- {
- if (vthis == null)
- return new ValueReference [0];
-
- object val = vthis.Value;
- if (IsNull (cx, val))
- return new ValueReference [0];
-
- TypeMirror tm = (TypeMirror) vthis.Type;
- bool isIterator = IsGeneratedType (tm);
-
- var list = new List<ValueReference> ();
- TypeMirror type = (TypeMirror) vthis.Type;
- foreach (FieldInfoMirror field in type.GetFields ()) {
- if (IsHoistedThisReference (field))
- continue;
- if (IsClosureReferenceField (field)) {
- list.AddRange (GetHoistedLocalVariables (cx, new FieldValueReference (cx, field, val, type)));
- continue;
- }
- if (field.Name.StartsWith ("<", StringComparison.Ordinal)) {
- if (isIterator) {
- var name = GetHoistedIteratorLocalName (field);
- if (!string.IsNullOrEmpty (name)) {
- list.Add (new FieldValueReference (cx, field, val, type, name, ObjectValueFlags.Variable));
- }
- }
- } else if (!field.Name.Contains ("$")) {
- list.Add (new FieldValueReference (cx, field, val, type, field.Name, ObjectValueFlags.Variable));
- }
- }
- return list;
- }
-
- ValueReference GetHoistedThisReference (SoftEvaluationContext cx)
- {
- try {
- Value val = cx.Frame.GetThis ();
- TypeMirror type = (TypeMirror) GetValueType (cx, val);
- return GetHoistedThisReference (cx, type, val);
- } catch (AbsentInformationException) {
- }
- return null;
- }
-
- ValueReference GetHoistedThisReference (SoftEvaluationContext cx, TypeMirror type, object val)
- {
- foreach (FieldInfoMirror field in type.GetFields ()) {
- if (IsHoistedThisReference (field)) {
- return new FieldValueReference (cx, field, val, type, "this", ObjectValueFlags.Literal);
- } else if (IsClosureReferenceField (field)) {
- var fieldRef = new FieldValueReference (cx, field, val, type);
- var thisRef = GetHoistedThisReference (cx, field.FieldType, fieldRef.Value);
- if (thisRef != null)
- return thisRef;
- }
- }
- return null;
- }
-
- // if the local does not have a name, constructs one from the index
- static string GetLocalName (SoftEvaluationContext cx, LocalVariable local)
- {
- if (!string.IsNullOrEmpty (local.Name) || cx.SourceCodeAvailable)
- return local.Name;
- return "loc" + local.Index;
- }
-
- protected override ValueReference OnGetLocalVariable (EvaluationContext ctx, string name)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- if (InGeneratedClosureOrIteratorType (cx))
- return FindByName (OnGetLocalVariables (cx), v => v.Name, name, ctx.CaseSensitive);
-
- try {
- LocalVariable local = null;
- if (!cx.SourceCodeAvailable) {
- if (name.StartsWith ("loc", StringComparison.Ordinal)) {
- int idx;
- if (int.TryParse (name.Substring (3), out idx))
- local = cx.Frame.Method.GetLocals ().FirstOrDefault (loc => loc.Index == idx);
- }
- } else {
- local = ctx.CaseSensitive
- ? cx.Frame.GetVisibleVariableByName (name)
- : FindByName (cx.Frame.GetVisibleVariables(), v => v.Name, name, false);
- }
- if (local != null) {
- return new VariableValueReference (ctx, GetLocalName (cx, local), local);
- }
- return FindByName (OnGetLocalVariables (ctx), v => v.Name, name, ctx.CaseSensitive);
- } catch (AbsentInformationException) {
- return null;
- }
- }
-
- protected override IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- if (InGeneratedClosureOrIteratorType (cx)) {
- ValueReference vthis = GetThisReference (cx);
- return GetHoistedLocalVariables (cx, vthis).Union (GetLocalVariables (cx));
- }
- else
- return GetLocalVariables (cx);
- }
-
- IEnumerable<ValueReference> GetLocalVariables (SoftEvaluationContext cx)
- {
- IList<LocalVariable> locals;
- try {
- locals = cx.Frame.GetVisibleVariables ();
- } catch (AbsentInformationException) {
- yield break;
- }
- foreach (LocalVariable local in locals) {
- if (local.IsArg)
- continue;
- if (IsClosureReferenceLocal (local) && IsGeneratedType (local.Type)) {
- foreach (var gv in GetHoistedLocalVariables (cx, new VariableValueReference (cx, local.Name, local))) {
- yield return gv;
- }
- } else if (!IsGeneratedTemporaryLocal (local)) {
- yield return new VariableValueReference (cx, GetLocalName (cx, local), local);
- }
- }
- }
-
- public override bool HasMember (EvaluationContext ctx, object type, string memberName, BindingFlags bindingFlags)
- {
- TypeMirror tm = (TypeMirror) type;
-
- while (tm != null) {
- FieldInfoMirror field = FindByName (tm.GetFields (), f => f.Name, memberName, ctx.CaseSensitive);
- if (field != null)
- return true;
-
- PropertyInfoMirror prop = FindByName (tm.GetProperties (), p => p.Name, memberName, ctx.CaseSensitive);
- if (prop != null) {
- MethodMirror getter = prop.GetGetMethod (bindingFlags.HasFlag (BindingFlags.NonPublic));
- if (getter != null)
- return true;
- }
-
- if (bindingFlags.HasFlag (BindingFlags.DeclaredOnly))
- break;
-
- tm = tm.BaseType;
- }
-
- return false;
- }
-
- static bool IsAnonymousType (TypeMirror type)
- {
- return type.Name.StartsWith ("<>__AnonType", StringComparison.Ordinal);
- }
-
- protected override ValueReference GetMember (EvaluationContext ctx, object t, object co, string name)
- {
- TypeMirror type = t as TypeMirror;
-
- while (type != null) {
- FieldInfoMirror field = FindByName (type.GetFields (), f => f.Name, name, ctx.CaseSensitive);
- if (field != null && (field.IsStatic || co != null))
- return new FieldValueReference (ctx, field, co, type);
-
- PropertyInfoMirror prop = FindByName (type.GetProperties (), p => p.Name, name, ctx.CaseSensitive);
- if (prop != null && (IsStatic (prop) || co != null)) {
- // Optimization: if the property has a CompilerGenerated backing field, use that instead.
- // This way we avoid overhead of invoking methods on the debugee when the value is requested.
- string cgFieldName = string.Format ("<{0}>{1}", prop.Name, IsAnonymousType (type) ? "" : "k__BackingField");
- if ((field = FindByName (type.GetFields (), f => f.Name, cgFieldName, true)) != null && IsCompilerGenerated (field))
- return new FieldValueReference (ctx, field, co, type, prop.Name, ObjectValueFlags.Property);
-
- // Backing field not available, so do things the old fashioned way.
- MethodMirror getter = prop.GetGetMethod (true);
- if (getter == null)
- return null;
-
- return new PropertyValueReference (ctx, prop, co, type, getter, null);
- }
-
- type = type.BaseType;
- }
-
- return null;
- }
-
- static bool IsCompilerGenerated (FieldInfoMirror field)
- {
- CustomAttributeDataMirror[] attrs = field.GetCustomAttributes (true);
- var cga = GetAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute> (attrs);
- return cga != null;
- }
-
- static bool IsStatic (PropertyInfoMirror prop)
- {
- MethodMirror met = prop.GetGetMethod (true) ?? prop.GetSetMethod (true);
- return met.IsStatic;
- }
-
- static T FindByName<T> (IEnumerable<T> elems, Func<T,string> getName, string name, bool caseSensitive)
- {
- T best = default(T);
- foreach (T t in elems) {
- string n = getName (t);
- if (n == name)
- return t;
- if (!caseSensitive && n.Equals (name, StringComparison.CurrentCultureIgnoreCase))
- best = t;
- }
- return best;
- }
-
- protected override IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags)
- {
- Dictionary<string, PropertyInfoMirror> subProps = new Dictionary<string, PropertyInfoMirror> ();
- TypeMirror type = t as TypeMirror;
- TypeMirror realType = null;
- if (co != null && (bindingFlags & BindingFlags.Instance) != 0)
- realType = GetValueType (ctx, co) as TypeMirror;
-
- // First of all, get a list of properties overriden in sub-types
- while (realType != null && realType != type) {
- foreach (PropertyInfoMirror prop in realType.GetProperties (bindingFlags | BindingFlags.DeclaredOnly)) {
- MethodMirror met = prop.GetGetMethod (true);
- if (met == null || met.GetParameters ().Length != 0 || met.IsAbstract || !met.IsVirtual || met.IsStatic)
- continue;
- if (met.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!met.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
- subProps [prop.Name] = prop;
- }
- realType = realType.BaseType;
- }
-
- while (type != null) {
- foreach (FieldInfoMirror field in type.GetFields ()) {
- if (field.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
- continue;
- if (!field.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
- continue;
- if (field.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!field.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
- yield return new FieldValueReference (ctx, field, co, type);
- }
- foreach (PropertyInfoMirror prop in type.GetProperties (bindingFlags)) {
- MethodMirror getter = prop.GetGetMethod (true);
- if (getter == null || getter.GetParameters ().Length != 0 || getter.IsAbstract)
- continue;
- if (getter.IsStatic && ((bindingFlags & BindingFlags.Static) == 0))
- continue;
- if (!getter.IsStatic && ((bindingFlags & BindingFlags.Instance) == 0))
- continue;
- if (getter.IsPublic && ((bindingFlags & BindingFlags.Public) == 0))
- continue;
- if (!getter.IsPublic && ((bindingFlags & BindingFlags.NonPublic) == 0))
- continue;
-
- // If a property is overriden, return the override instead of the base property
- PropertyInfoMirror overridden;
- if (getter.IsVirtual && subProps.TryGetValue (prop.Name, out overridden)) {
- getter = overridden.GetGetMethod (true);
- if (getter == null)
- continue;
-
- yield return new PropertyValueReference (ctx, overridden, co, overridden.DeclaringType, getter, null);
- } else {
- yield return new PropertyValueReference (ctx, prop, co, type, getter, null);
- }
- }
- if ((bindingFlags & BindingFlags.DeclaredOnly) != 0)
- break;
- type = type.BaseType;
- }
- }
-
- public override void GetNamespaceContents (EvaluationContext ctx, string namspace, out string[] childNamespaces, out string[] childTypes)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- HashSet<string> types = new HashSet<string> ();
- HashSet<string> namespaces = new HashSet<string> ();
- string namspacePrefix = namspace.Length > 0 ? namspace + "." : "";
- foreach (TypeMirror type in cx.Session.GetAllTypes ()) {
- if (type.Namespace == namspace || type.Namespace.StartsWith (namspacePrefix, StringComparison.InvariantCulture)) {
- namespaces.Add (type.Namespace);
- types.Add (type.FullName);
- }
- }
- childNamespaces = new string [namespaces.Count];
- namespaces.CopyTo (childNamespaces);
-
- childTypes = new string [types.Count];
- types.CopyTo (childTypes);
- }
-
- protected override IEnumerable<ValueReference> OnGetParameters (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- LocalVariable[] locals;
- try {
- locals = cx.Frame.Method.GetLocals ();
- } catch (AbsentInformationException) {
- yield break;
- }
-
- foreach (LocalVariable var in locals) {
- if (var.IsArg) {
- string name = !string.IsNullOrEmpty (var.Name) ? var.Name : "arg" + var.Index;
- yield return new VariableValueReference (ctx, name, var);
- }
- }
- }
-
- protected override ValueReference OnGetThisReference (EvaluationContext ctx)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- if (InGeneratedClosureOrIteratorType (cx))
- return GetHoistedThisReference (cx);
-
- return GetThisReference (cx);
- }
-
- ValueReference GetThisReference (SoftEvaluationContext cx)
- {
- try {
- if (cx.Frame.Method.IsStatic)
- return null;
- Value val = cx.Frame.GetThis ();
- return LiteralValueReference.CreateTargetObjectLiteral (cx, "this", val);
- } catch (AbsentInformationException) {
- return null;
- }
- }
-
- public override ValueReference GetCurrentException (EvaluationContext ctx)
- {
- try {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- ObjectMirror exc = cx.Session.GetExceptionObject (cx.Thread);
- if (exc != null)
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, ctx.Options.CurrentExceptionTag, exc);
- else
- return null;
- } catch (AbsentInformationException) {
- return null;
- }
- }
-
-
- public override object[] GetTypeArgs (EvaluationContext ctx, object type)
- {
- string s = ((TypeMirror)type).FullName;
- int i = s.IndexOf ('`');
- List<string> names = new List<string> ();
- if (i != -1) {
- i = s.IndexOf ('[', i);
- if (i == -1)
- return new object [0];
- int si = ++i;
- int nt = 0;
- for (; i < s.Length && (nt > 0 || s[i] != ']'); i++) {
- if (s[i] == '[')
- nt++;
- else if (s[i] == ']')
- nt--;
- else if (s[i] == ',' && nt == 0) {
- names.Add (s.Substring (si, i - si));
- si = i + 1;
- }
- }
- names.Add (s.Substring (si, i - si));
- object[] types = new object [names.Count];
- for (int n=0; n<names.Count; n++) {
- string tn = names [n];
- if (tn.StartsWith ("[", StringComparison.Ordinal))
- tn = tn.Substring (1, tn.Length - 2);
- types [n] = GetType (ctx, tn);
- if (types [n] == null)
- return new object [0];
- }
- return types;
- }
- return new object [0];
- }
-
- public override object GetType (EvaluationContext ctx, string name, object[] typeArgs)
- {
- SoftEvaluationContext cx = (SoftEvaluationContext) ctx;
- int i = name.IndexOf (',');
- if (i != -1) {
- // Find first comma outside brackets
- int nest = 0;
- for (int n=0; n<name.Length; n++) {
- char c = name [n];
- if (c == '[')
- nest++;
- else if (c == ']')
- nest--;
- else if (c == ',' && nest == 0) {
- name = name.Substring (0, n).Trim ();
- break;
- }
- }
- }
-
- if (typeArgs != null && typeArgs.Length > 0){
- string args = "";
- foreach (object t in typeArgs) {
- if (args.Length > 0)
- args += ",";
- string tn;
- if (t is TypeMirror) {
- TypeMirror atm = (TypeMirror) t;
- tn = atm.FullName + "," + atm.Assembly.GetName ();
- } else {
- Type atm = (Type) t;
- tn = atm.FullName + "," + atm.Assembly.GetName ();
- }
- if (tn.IndexOf (',') != -1)
- tn = "[" + tn + "]";
- args += tn;
- }
- name += "[" +args + "]";
- }
-
- TypeMirror tm = cx.Session.GetType (name);
- if (tm != null)
- return tm;
- foreach (AssemblyMirror asm in cx.Thread.Domain.GetAssemblies ()) {
- tm = asm.GetType (name, false, false);
- if (tm != null)
- return tm;
- }
- return null;
- }
-
- public override object GetParentType (EvaluationContext ctx, object type)
- {
- TypeMirror tm = type as TypeMirror;
-
- if (tm != null) {
- int plus = tm.FullName.LastIndexOf ('+');
-
- return plus != -1 ? GetType (ctx, tm.FullName.Substring (0, plus)) : null;
- }
-
- return ((Type) type).DeclaringType;
- }
-
- public override IEnumerable<object> GetNestedTypes (EvaluationContext ctx, object type)
- {
- TypeMirror t = (TypeMirror) type;
- foreach (TypeMirror nt in t.GetNestedTypes ())
- yield return nt;
- }
-
- public override string GetTypeName (EvaluationContext ctx, object type)
- {
- TypeMirror tm = type as TypeMirror;
- if (tm != null) {
- if (IsGeneratedType (tm)) {
- // Return the name of the container-type.
- return tm.FullName.Substring (0, tm.FullName.LastIndexOf ('+'));
- }
-
- return tm.FullName;
- }
-
- return ((Type)type).FullName;
- }
-
- public override object GetValueType (EvaluationContext ctx, object val)
- {
- if (val is ArrayMirror)
- return ((ArrayMirror)val).Type;
- if (val is ObjectMirror)
- return ((ObjectMirror)val).Type;
- if (val is EnumMirror)
- return ((EnumMirror)val).Type;
- if (val is StructMirror)
- return ((StructMirror)val).Type;
- if (val is PointerValue)
- return ((PointerValue) val).Type;
- if (val is PrimitiveValue) {
- PrimitiveValue pv = (PrimitiveValue) val;
- if (pv.Value == null)
- return typeof(Object);
-
- return pv.Value.GetType ();
- }
-
- throw new NotSupportedException ();
- }
-
- public override object GetBaseType (EvaluationContext ctx, object type)
- {
- if (type is TypeMirror)
- return ((TypeMirror)type).BaseType;
-
- return null;
- }
-
- public override bool HasMethod (EvaluationContext gctx, object targetType, string methodName, object[] argTypes, BindingFlags flags)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
- TypeMirror[] types = null;
-
- if (argTypes != null) {
- types = new TypeMirror [argTypes.Length];
- for (int n=0; n<argTypes.Length; n++) {
- if (argTypes [n] is TypeMirror)
- types [n] = (TypeMirror) argTypes [n];
- else
- types [n] = (TypeMirror) GetType (ctx, ((Type)argTypes[n]).FullName);
- }
- }
-
- MethodMirror met = OverloadResolve (ctx, methodName, (TypeMirror) targetType, types, (flags & BindingFlags.Instance) != 0, (flags & BindingFlags.Static) != 0, false);
- return met != null;
- }
-
- public override bool IsExternalType (EvaluationContext gctx, object type)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
- TypeMirror tm = type as TypeMirror;
- if (tm != null)
- return ctx.Session.IsExternalCode (tm);
- else
- return true;
- }
-
- public override bool IsString (EvaluationContext ctx, object val)
- {
- return val is StringMirror;
- }
-
- public override bool IsArray (EvaluationContext ctx, object val)
- {
- return val is ArrayMirror;
- }
-
- public override bool IsValueType (object type)
- {
- TypeMirror t = type as TypeMirror;
- return t != null && t.IsValueType;
- }
-
- public override bool IsClass (object type)
- {
- TypeMirror t = type as TypeMirror;
- return t != null && (t.IsClass || t.IsValueType) && !t.IsPrimitive;
- }
-
- public override bool IsNull (EvaluationContext ctx, object val)
- {
- return val == null || ((val is PrimitiveValue) && ((PrimitiveValue)val).Value == null) || ((val is PointerValue) && ((PointerValue)val).Address == 0);
- }
-
- public override bool IsPrimitive (EvaluationContext ctx, object val)
- {
- return val is PrimitiveValue || val is StringMirror || ((val is StructMirror) && ((StructMirror)val).Type.IsPrimitive) || val is PointerValue;
- }
-
- public override bool IsPointer (EvaluationContext ctx, object val)
- {
- return val is PointerValue;
- }
-
- public override bool IsEnum (EvaluationContext ctx, object val)
- {
- return val is EnumMirror;
- }
-
- protected override TypeDisplayData OnGetTypeDisplayData (EvaluationContext gctx, object type)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
-
- bool isCompilerGenerated = false;
- string nameString = null;
- string typeString = null;
- string valueString = null;
- string proxyType = null;
- Dictionary<string, DebuggerBrowsableState> memberData = null;
-
- try {
- TypeMirror t = (TypeMirror) type;
- foreach (CustomAttributeDataMirror attr in t.GetCustomAttributes (true)) {
- string attName = attr.Constructor.DeclaringType.FullName;
- if (attName == "System.Diagnostics.DebuggerDisplayAttribute") {
- DebuggerDisplayAttribute at = BuildAttribute<DebuggerDisplayAttribute> (attr);
- nameString = at.Name;
- typeString = at.Type;
- valueString = at.Value;
- }
- else if (attName == "System.Diagnostics.DebuggerTypeProxyAttribute") {
- DebuggerTypeProxyAttribute at = BuildAttribute<DebuggerTypeProxyAttribute> (attr);
- proxyType = at.ProxyTypeName;
- if (!string.IsNullOrEmpty (proxyType))
- ForceLoadType (ctx, proxyType);
- }
- else if (attName == "System.Runtime.CompilerServices.CompilerGeneratedAttribute")
- isCompilerGenerated = true;
- }
- foreach (FieldInfoMirror fi in t.GetFields ()) {
- CustomAttributeDataMirror[] attrs = fi.GetCustomAttributes (true);
- DebuggerBrowsableAttribute att = GetAttribute <DebuggerBrowsableAttribute> (attrs);
- if (att == null) {
- var cga = GetAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute> (attrs);
- if (cga != null)
- att = new DebuggerBrowsableAttribute (DebuggerBrowsableState.Never);
- }
- if (att != null) {
- if (memberData == null)
- memberData = new Dictionary<string, DebuggerBrowsableState> ();
- memberData [fi.Name] = att.State;
- }
- }
- foreach (PropertyInfoMirror pi in t.GetProperties ()) {
- DebuggerBrowsableAttribute att = GetAttribute <DebuggerBrowsableAttribute> (pi.GetCustomAttributes (true));
- if (att != null) {
- if (memberData == null)
- memberData = new Dictionary<string, DebuggerBrowsableState> ();
- memberData [pi.Name] = att.State;
- }
- }
- } catch (Exception ex) {
- ctx.Session.WriteDebuggerOutput (true, ex.ToString ());
- }
- return new TypeDisplayData (proxyType, valueString, typeString, nameString, isCompilerGenerated, memberData);
- }
-
- static T GetAttribute<T> (CustomAttributeDataMirror[] attrs)
- {
- foreach (CustomAttributeDataMirror attr in attrs) {
- if (attr.Constructor.DeclaringType.FullName == typeof(T).FullName)
- return BuildAttribute<T> (attr);
- }
- return default(T);
- }
-
- public override bool IsTypeLoaded (EvaluationContext gctx, string typeName)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
-
- return ctx.Session.GetType (typeName) != null;
- }
-
- public override bool IsTypeLoaded (EvaluationContext ctx, object type)
- {
- TypeMirror tm = (TypeMirror) type;
-
- if (tm.VirtualMachine.Version.AtLeast (2, 23))
- return tm.IsInitialized;
-
- return IsTypeLoaded (ctx, tm.FullName);
- }
-
- public override bool ForceLoadType (EvaluationContext gctx, object type)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
- TypeMirror tm = (TypeMirror) type;
-
- if (!tm.VirtualMachine.Version.AtLeast (2, 23))
- return IsTypeLoaded (gctx, tm.FullName);
-
- if (tm.IsInitialized)
- return true;
-
- if (!tm.Attributes.HasFlag (TypeAttributes.BeforeFieldInit))
- return false;
-
- MethodMirror cctor = OverloadResolve (ctx, ".cctor", tm, new TypeMirror[0], false, true, false);
- if (cctor == null)
- return true;
-
- try {
- tm.InvokeMethod (ctx.Thread, cctor, new Value[0], InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded);
- } catch {
- return false;
- } finally {
- ctx.Session.StackVersion++;
- }
-
- return true;
- }
-
- static T BuildAttribute<T> (CustomAttributeDataMirror attr)
- {
- List<object> args = new List<object> ();
- foreach (CustomAttributeTypedArgumentMirror arg in attr.ConstructorArguments) {
- object val = arg.Value;
- if (val is TypeMirror) {
- // The debugger attributes that take a type as parameter of the constructor have
- // a corresponding constructor overload that takes a type name. We'll use that
- // constructor because we can't load target types in the debugger process.
- // So what we do here is convert the Type to a String.
- TypeMirror tm = (TypeMirror) val;
- val = tm.FullName + ", " + tm.Assembly.ManifestModule.Name;
- } else if (val is EnumMirror) {
- EnumMirror em = (EnumMirror) val;
- val = em.Value;
- }
- args.Add (val);
- }
- Type type = typeof(T);
- object at = Activator.CreateInstance (type, args.ToArray ());
- foreach (CustomAttributeNamedArgumentMirror arg in attr.NamedArguments) {
- object val = arg.TypedValue.Value;
- string postFix = "";
- if (arg.TypedValue.ArgumentType == typeof(Type))
- postFix = "TypeName";
- if (arg.Field != null)
- type.GetField (arg.Field.Name + postFix).SetValue (at, val);
- else if (arg.Property != null)
- type.GetProperty (arg.Property.Name + postFix).SetValue (at, val, null);
- }
- return (T) at;
- }
-
- TypeMirror ToTypeMirror (EvaluationContext ctx, object type)
- {
- TypeMirror t = type as TypeMirror;
- if (t != null)
- return t;
- return (TypeMirror) GetType (ctx, ((Type)type).FullName);
- }
-
- public override object RuntimeInvoke (EvaluationContext gctx, object targetType, object target, string methodName, object[] argTypes, object[] argValues)
- {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
- TypeMirror type = ToTypeMirror (ctx, targetType);
-
- ctx.AssertTargetInvokeAllowed ();
-
- TypeMirror[] types = new TypeMirror [argTypes.Length];
- for (int n=0; n<argTypes.Length; n++)
- types [n] = ToTypeMirror (ctx, argTypes [n]);
-
- Value[] values = new Value[argValues.Length];
- for (int n=0; n<argValues.Length; n++)
- values[n] = (Value) argValues [n];
-
- MethodMirror method = OverloadResolve (ctx, methodName, type, types, target != null, target == null, true);
- return ctx.RuntimeInvoke (method, target ?? targetType, values);
- }
-
- public static MethodMirror OverloadResolve (SoftEvaluationContext ctx, string methodName, TypeMirror type, TypeMirror[] argtypes, bool allowInstance, bool allowStatic, bool throwIfNotFound)
- {
- List<MethodMirror> candidates = new List<MethodMirror> ();
- var cache = ctx.Session.OverloadResolveCache;
- TypeMirror currentType = type;
-
- while (currentType != null) {
- MethodMirror[] methods = null;
-
- if (ctx.CaseSensitive) {
- lock (cache) {
- cache.TryGetValue (Tuple.Create (currentType, methodName), out methods);
- }
- }
-
- if (methods == null) {
- if (currentType.VirtualMachine.Version.AtLeast (2, 7))
- methods = currentType.GetMethodsByNameFlags (methodName, BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.Static, !ctx.CaseSensitive);
- else
- methods = currentType.GetMethods ();
-
- if (ctx.CaseSensitive) {
- lock (cache) {
- cache [Tuple.Create (currentType, methodName)] = methods;
- }
- }
- }
-
- foreach (MethodMirror met in methods) {
- if (met.Name == methodName || (!ctx.CaseSensitive && met.Name.Equals (methodName, StringComparison.CurrentCultureIgnoreCase))) {
- ParameterInfoMirror[] pars = met.GetParameters ();
- if (argtypes == null || pars.Length == argtypes.Length && ((met.IsStatic && allowStatic) || (!met.IsStatic && allowInstance)))
- candidates.Add (met);
- }
- }
-
- if (argtypes == null && candidates.Count > 0)
- break; // when argtypes is null, we are just looking for *any* match (not a specific match)
-
- if (methodName == ".ctor")
- break; // Can't create objects using constructor from base classes
-
- // Make sure that we always pull in at least System.Object methods (this is mostly needed for cases where 'type' was an interface)
- if (currentType.BaseType == null && currentType.FullName != "System.Object")
- currentType = ctx.Session.GetType ("System.Object");
- else
- currentType = currentType.BaseType;
- }
-
- return OverloadResolve (ctx, type.Name, methodName, argtypes, candidates, throwIfNotFound);
- }
-
- static bool IsApplicable (SoftEvaluationContext ctx, MethodMirror method, TypeMirror[] types, out string error, out int matchCount)
- {
- ParameterInfoMirror[] mparams = method.GetParameters ();
- matchCount = 0;
-
- for (int i = 0; i < types.Length; i++) {
- TypeMirror param_type = mparams[i].ParameterType;
-
- if (param_type.FullName == types [i].FullName) {
- matchCount++;
- continue;
- }
-
- if (param_type.IsAssignableFrom (types [i]))
- continue;
-
- error = String.Format (
- "Argument {0}: Cannot implicitly convert `{1}' to `{2}'",
- i, types [i].FullName, param_type.FullName);
- return false;
- }
-
- error = null;
- return true;
- }
-
- static MethodMirror OverloadResolve (SoftEvaluationContext ctx, string typeName, string methodName, TypeMirror[] argtypes, List<MethodMirror> candidates, bool throwIfNotFound)
- {
- if (candidates.Count == 0) {
- if (throwIfNotFound) {
- if (methodName == null)
- throw new EvaluatorException ("Indexer not found in type `{0}'.", typeName);
-
- throw new EvaluatorException ("Method `{0}' not found in type `{1}'.", methodName, typeName);
- } else
- return null;
- }
-
- if (argtypes == null) {
- // This is just a probe to see if the type contains *any* methods of the given name
- return candidates[0];
- }
-
- if (candidates.Count == 1) {
- string error;
- int matchCount;
-
- if (IsApplicable (ctx, candidates[0], argtypes, out error, out matchCount))
- return candidates [0];
-
- if (throwIfNotFound)
- throw new EvaluatorException ("Invalid arguments for method `{0}': {1}", methodName, error);
- else
- return null;
- }
-
- // Ok, now we need to find an exact match.
- MethodMirror match = null;
- int bestCount = -1;
- bool repeatedBestCount = false;
-
- foreach (MethodMirror method in candidates) {
- string error;
- int matchCount;
-
- if (!IsApplicable (ctx, method, argtypes, out error, out matchCount))
- continue;
-
- if (matchCount == bestCount) {
- repeatedBestCount = true;
- } else if (matchCount > bestCount) {
- match = method;
- bestCount = matchCount;
- repeatedBestCount = false;
- }
- }
-
- if (match == null) {
- if (!throwIfNotFound)
- return null;
- if (methodName != null)
- throw new EvaluatorException ("Invalid arguments for method `{0}'.", methodName);
- else
- throw new EvaluatorException ("Invalid arguments for indexer.");
- }
-
- if (repeatedBestCount) {
- // If there is an ambiguous match, just pick the first match. If the user was expecting
- // something else, he can provide more specific arguments
-
-/* if (!throwIfNotFound)
- return null;
- if (methodName != null)
- throw new EvaluatorException ("Ambiguous method `{0}'; need to use full name", methodName);
- else
- throw new EvaluatorException ("Ambiguous arguments for indexer.", methodName);
-*/ }
-
- return match;
- }
-
- public override object TargetObjectToObject (EvaluationContext gctx, object obj)
- {
- if (obj is StringMirror) {
- StringMirror mirror = (StringMirror) obj;
- string str;
-
- if (gctx.Options.EllipsizeStrings) {
- if (mirror.VirtualMachine.Version.AtLeast (2, 10)) {
- int length = mirror.Length;
-
- if (length > gctx.Options.EllipsizedLength)
- str = new string (mirror.GetChars (0, gctx.Options.EllipsizedLength)) + EvaluationOptions.Ellipsis;
- else
- str = mirror.Value;
- } else {
- str = mirror.Value;
- if (str.Length > gctx.Options.EllipsizedLength)
- str = str.Substring (0, gctx.Options.EllipsizedLength) + EvaluationOptions.Ellipsis;
- }
- } else {
- str = mirror.Value;
- }
-
- return str;
- } else if (obj is PrimitiveValue) {
- return ((PrimitiveValue)obj).Value;
- } else if (obj is PointerValue) {
- return new IntPtr (((PointerValue)obj).Address);
- } else if (obj is StructMirror) {
- StructMirror sm = (StructMirror) obj;
-
- if (sm.Type.IsPrimitive) {
- // Boxed primitive
- if (sm.Type.FullName == "System.IntPtr")
- return new IntPtr ((long)((PrimitiveValue)sm.Fields[0]).Value);
- if (sm.Fields.Length > 0 && (sm.Fields[0] is PrimitiveValue))
- return ((PrimitiveValue)sm.Fields[0]).Value;
- } else if (sm.Type.FullName == "System.Decimal") {
- SoftEvaluationContext ctx = (SoftEvaluationContext) gctx;
- MethodMirror method = OverloadResolve (ctx, "GetBits", sm.Type, new TypeMirror[1] { sm.Type }, false, true, false);
- if (method != null) {
- ArrayMirror array;
-
- try {
- array = sm.Type.InvokeMethod (ctx.Thread, method, new Value[1] { sm }, InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded) as ArrayMirror;
- } catch {
- array = null;
- } finally {
- ctx.Session.StackVersion++;
- }
-
- if (array != null) {
- int[] bits = new int [4];
- for (int i = 0; i < 4; i++)
- bits[i] = (int) TargetObjectToObject (gctx, array[i]);
-
- return new decimal (bits);
- }
- }
- }
- }
- return base.TargetObjectToObject (gctx, obj);
- }
- }
-
- class MethodCall: AsyncOperation
- {
- SoftEvaluationContext ctx;
- MethodMirror function;
- object obj;
- Value[] args;
- Value result;
- IAsyncResult handle;
- Exception exception;
- ST.ManualResetEvent shutdownEvent = new ST.ManualResetEvent (false);
- const InvokeOptions options = InvokeOptions.DisableBreakpoints | InvokeOptions.SingleThreaded;
-
- public MethodCall (SoftEvaluationContext ctx, MethodMirror function, object obj, Value[] args)
- {
- this.ctx = ctx;
- this.function = function;
- this.obj = obj;
- this.args = args;
- }
-
- public override string Description {
- get {
- return function.DeclaringType.FullName + "." + function.Name;
- }
- }
-
- public override void Invoke ()
- {
- try {
- if (obj is ObjectMirror)
- handle = ((ObjectMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
- else if (obj is TypeMirror)
- handle = ((TypeMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
- else if (obj is StructMirror)
- handle = ((StructMirror)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
- else if (obj is PrimitiveValue)
- handle = ((PrimitiveValue)obj).BeginInvokeMethod (ctx.Thread, function, args, options, null, null);
- else
- throw new ArgumentException ("Soft debugger method calls cannot be invoked on objects of type " + obj.GetType ().Name);
- } catch (InvocationException ex) {
- ctx.Session.StackVersion++;
- exception = ex;
- } catch (Exception ex) {
- ctx.Session.StackVersion++;
- LoggingService.LogError ("Error in soft debugger method call thread on " + GetInfo (), ex);
- exception = ex;
- }
- }
-
- public override void Abort ()
- {
- if (handle is IInvokeAsyncResult) {
- var info = GetInfo ();
- LoggingService.LogMessage ("Aborting invocation of " + info);
- ((IInvokeAsyncResult) handle).Abort ();
- // Don't wait for the abort to finish. The engine will do it.
- } else {
- throw new NotSupportedException ();
- }
- }
-
- public override void Shutdown ()
- {
- shutdownEvent.Set ();
- }
-
- void EndInvoke ()
- {
- try {
- if (obj is ObjectMirror)
- result = ((ObjectMirror)obj).EndInvokeMethod (handle);
- else if (obj is TypeMirror)
- result = ((TypeMirror)obj).EndInvokeMethod (handle);
- else if (obj is StructMirror)
- result = ((StructMirror)obj).EndInvokeMethod (handle);
- else
- result = ((PrimitiveValue)obj).EndInvokeMethod (handle);
- } catch (InvocationException ex) {
- if (!Aborting && ex.Exception != null) {
- string ename = ctx.Adapter.GetValueTypeName (ctx, ex.Exception);
- ValueReference vref = ctx.Adapter.GetMember (ctx, null, ex.Exception, "Message");
- if (vref != null) {
- exception = new Exception (ename + ": " + (string)vref.ObjectValue);
- return;
- } else {
- exception = new Exception (ename);
- return;
- }
- }
- exception = ex;
- } catch (Exception ex) {
- LoggingService.LogError ("Error in soft debugger method call thread on " + GetInfo (), ex);
- exception = ex;
- } finally {
- ctx.Session.StackVersion++;
- }
- }
-
- string GetInfo ()
- {
- try {
- TypeMirror type = null;
- if (obj is ObjectMirror)
- type = ((ObjectMirror)obj).Type;
- else if (obj is TypeMirror)
- type = (TypeMirror)obj;
- else if (obj is StructMirror)
- type = ((StructMirror)obj).Type;
- return string.Format ("method {0} on object {1}",
- function == null? "[null]" : function.FullName,
- type == null? "[null]" : type.FullName);
- } catch (Exception ex) {
- LoggingService.LogError ("Error getting info for SDB MethodCall", ex);
- return "";
- }
- }
-
- public override bool WaitForCompleted (int timeout)
- {
- if (handle == null)
- return true;
- int res = ST.WaitHandle.WaitAny (new ST.WaitHandle[] { handle.AsyncWaitHandle, shutdownEvent }, timeout);
- if (res == 0) {
- EndInvoke ();
- return true;
- }
- // Return true if shut down.
- return res == 1;
- }
-
- public Value ReturnValue {
- get {
- if (exception != null)
- throw new EvaluatorException (exception.Message);
- return result;
- }
- }
- }
-}
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
deleted file mode 100644
index a307fbe..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerBacktrace.cs
+++ /dev/null
@@ -1,213 +0,0 @@
-//
-// SoftDebuggerBacktrace.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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.Linq;
-using System.Text;
-using System.Collections.Generic;
-using Mono.Debugging.Client;
-using Mono.Debugging.Backend;
-using MDB = Mono.Debugger.Soft;
-using DC = Mono.Debugging.Client;
-using Mono.Debugging.Evaluation;
-
-namespace Mono.Debugging.Soft
-{
- internal class SoftDebuggerStackFrame : Mono.Debugging.Client.StackFrame {
- public Mono.Debugger.Soft.StackFrame StackFrame {
- get; private set;
- }
-
- public SoftDebuggerStackFrame (Mono.Debugger.Soft.StackFrame frame, string addressSpace, SourceLocation location, string language, bool isExternalCode, bool hasDebugInfo, bool isDebuggerHidden, string fullModuleName, string fullTypeName)
- : base (frame.ILOffset, addressSpace, location, language, isExternalCode, hasDebugInfo, isDebuggerHidden, fullModuleName, fullTypeName)
- {
- StackFrame = frame;
- }
- }
-
- public class SoftDebuggerBacktrace: BaseBacktrace
- {
- MDB.StackFrame[] frames;
- SoftDebuggerSession session;
- MDB.ThreadMirror thread;
- int stackVersion;
-
- public SoftDebuggerBacktrace (SoftDebuggerSession session, MDB.ThreadMirror thread): base (session.Adaptor)
- {
- this.session = session;
- this.thread = thread;
- stackVersion = session.StackVersion;
- if (thread != null)
- this.frames = thread.GetFrames ();
- else
- this.frames = new MDB.StackFrame[0];
- }
-
- void ValidateStack ()
- {
- if (stackVersion != session.StackVersion && thread != null)
- frames = thread.GetFrames ();
- }
-
- public override DC.StackFrame[] GetStackFrames (int firstIndex, int lastIndex)
- {
- ValidateStack ();
-
- if (lastIndex < 0)
- lastIndex = frames.Length - 1;
-
- List<DC.StackFrame> list = new List<DC.StackFrame> ();
- for (int n = firstIndex; n <= lastIndex && n < frames.Length; n++)
- list.Add (CreateStackFrame (frames[n], n));
-
- return list.ToArray ();
- }
-
- public override int FrameCount {
- get {
- ValidateStack ();
- return frames.Length;
- }
- }
-
- DC.StackFrame CreateStackFrame (MDB.StackFrame frame, int frameIndex)
- {
- MDB.MethodMirror method = frame.Method;
- MDB.TypeMirror type = method.DeclaringType;
- string fileName = frame.FileName;
- string typeFullName = null;
- string typeFQN = null;
- string methodName;
-
- if (fileName != null)
- fileName = SoftDebuggerSession.NormalizePath (fileName);
-
- if (method.VirtualMachine.Version.AtLeast (2, 12) && method.IsGenericMethod) {
- StringBuilder name = new StringBuilder (method.Name);
-
- name.Append ('<');
-
- if (method.VirtualMachine.Version.AtLeast (2, 15)) {
- bool first = true;
-
- foreach (var argumentType in method.GetGenericArguments ()) {
- if (!first)
- name.Append (", ");
-
- name.Append (session.Adaptor.GetDisplayTypeName (argumentType.FullName));
- first = false;
- }
- }
-
- name.Append ('>');
-
- methodName = name.ToString ();
- } else {
- methodName = method.Name;
- }
-
- // Compiler generated anonymous/lambda methods
- bool special_method = false;
- if (methodName [0] == '<' && methodName.Contains (">m__")) {
- int nidx = methodName.IndexOf (">m__", StringComparison.Ordinal) + 2;
- methodName = "AnonymousMethod" + methodName.Substring (nidx, method.Name.Length - nidx);
- special_method = true;
- }
-
- if (type != null) {
- string typeDisplayName = session.Adaptor.GetDisplayTypeName (type.FullName);
-
- if (SoftDebuggerAdaptor.IsGeneratedType (type)) {
- // The user-friendly method name is embedded in the generated type name
- var mn = SoftDebuggerAdaptor.GetNameFromGeneratedType (type);
-
- // Strip off the generated type name
- int dot = typeDisplayName.LastIndexOf ('.');
- var tname = typeDisplayName.Substring (0, dot);
-
- // Keep any type arguments
- int targs = typeDisplayName.LastIndexOf ('<');
- if (targs > dot + 1)
- mn += typeDisplayName.Substring (targs, typeDisplayName.Length - targs);
-
- typeDisplayName = tname;
-
- if (special_method)
- typeDisplayName += "." + mn;
- else
- methodName = mn;
- }
-
- methodName = typeDisplayName + "." + methodName;
-
- typeFQN = type.Module.FullyQualifiedName;
- typeFullName = type.FullName;
- }
-
- bool hidden = false;
- if (session.VirtualMachine.Version.AtLeast (2, 21)) {
- var ctx = GetEvaluationContext (frameIndex, session.EvaluationOptions);
- var hiddenAttr = session.Adaptor.GetType (ctx, "System.Diagnostics.DebuggerHiddenAttribute") as MDB.TypeMirror;
-
- hidden = method.GetCustomAttributes (hiddenAttr, true).Any ();
- }
-
- var location = new DC.SourceLocation (methodName, fileName, frame.LineNumber, frame.ColumnNumber);
- var external = session.IsExternalCode (frame);
- string addressSpace = string.Empty;
- string language;
-
- if (frame.Method != null) {
- if (frame.IsNativeTransition) {
- language = "Transition";
- } else {
- addressSpace = method.FullName;
- language = "Managed";
- }
- } else {
- language = "Native";
- }
-
- return new SoftDebuggerStackFrame (frame, addressSpace, location, language, external, true, hidden, typeFQN, typeFullName);
- }
-
- protected override EvaluationContext GetEvaluationContext (int frameIndex, EvaluationOptions options)
- {
- ValidateStack ();
- if (frameIndex >= frames.Length)
- return null;
-
- MDB.StackFrame frame = frames [frameIndex];
- return new SoftEvaluationContext (session, frame, options);
- }
-
- public override AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count)
- {
- return session.Disassemble (frames [frameIndex], firstLine, count);
- }
- }
-}
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs
deleted file mode 100644
index 3e34e5b..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerSession.cs
+++ /dev/null
@@ -1,2580 +0,0 @@
-//
-// SoftDebuggerSession.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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.
-
-//#define DEBUG_EVENT_QUEUEING
-
-using System;
-using System.IO;
-using System.Net;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Reflection;
-using System.Net.Sockets;
-using System.Globalization;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-using Mono.Cecil.Mdb;
-using Mono.CompilerServices.SymbolWriter;
-using Mono.Debugging.Client;
-using Mono.Debugger.Soft;
-using Mono.Debugging.Evaluation;
-using MDB = Mono.Debugger.Soft;
-
-namespace Mono.Debugging.Soft
-{
- public class SoftDebuggerSession : DebuggerSession
- {
- VirtualMachine vm;
- Thread eventHandler;
- Dictionary<string, List<TypeMirror>> source_to_type = new Dictionary<string, List<TypeMirror>> (PathComparer);
- Dictionary<TypeMirror, string[]> type_to_source = new Dictionary<TypeMirror, string[]> ();
- bool useFullPaths = true;
- Dictionary<string,TypeMirror> types = new Dictionary<string, TypeMirror> ();
- Dictionary<string, MonoSymbolFile> symbolFiles = new Dictionary<string, MonoSymbolFile> ();
- Dictionary<EventRequest,BreakInfo> breakpoints = new Dictionary<EventRequest,BreakInfo> ();
- List<BreakInfo> pending_bes = new List<BreakInfo> ();
- ThreadMirror current_thread, recent_thread;
- ProcessInfo[] procs;
- ThreadInfo[] current_threads;
- bool started;
- bool autoStepInto;
- internal int StackVersion;
- StepEventRequest currentStepRequest;
- long currentAddress = -1;
- ExceptionEventRequest unhandledExceptionRequest;
- string remoteProcessName;
- Dictionary<long,long> localThreadIds = new Dictionary<long, long> ();
- IConnectionDialog connectionDialog;
- TypeLoadEventRequest typeLoadReq, typeLoadTypeNameReq;
-
- Dictionary<long,ObjectMirror> activeExceptionsByThread = new Dictionary<long, ObjectMirror> ();
-
- Thread outputReader;
- Thread errorReader;
-
- IAsyncResult connectionHandle;
- SoftDebuggerStartArgs startArgs;
-
- LinkedList<List<Event>> queuedEventSets = new LinkedList<List<Event>> ();
-
- List<string> userAssemblyNames;
- List<AssemblyMirror> assemblyFilters;
- Dictionary<string, string> assemblyPathMap;
-
- bool loggedSymlinkedRuntimesBug = false;
-
- Dictionary<Tuple<TypeMirror,string>, MethodMirror[]> overloadResolveCache;
-
- public SoftDebuggerAdaptor Adaptor {
- get { return adaptor; }
- }
-
- readonly SoftDebuggerAdaptor adaptor = new SoftDebuggerAdaptor ();
-
- public SoftDebuggerSession ()
- {
- Adaptor.BusyStateChanged += delegate(object sender, BusyStateEventArgs e) {
- SetBusyState (e);
- };
- overloadResolveCache = new Dictionary<Tuple<TypeMirror,string>, MethodMirror[]> ();
- }
-
- protected override void OnRun (DebuggerStartInfo startInfo)
- {
- if (HasExited)
- throw new InvalidOperationException ("Already exited");
-
- var dsi = (SoftDebuggerStartInfo) startInfo;
- if (dsi.StartArgs is SoftDebuggerLaunchArgs) {
- StartLaunching (dsi);
- } else if (dsi.StartArgs is SoftDebuggerConnectArgs) {
- StartConnecting (dsi);
- } else if (dsi.StartArgs is SoftDebuggerListenArgs) {
- StartListening (dsi);
- } else if (dsi.StartArgs.ConnectionProvider != null) {
- StartConnection (dsi);
- } else {
- throw new ArgumentException ("StartArgs has no ConnectionProvider");
- }
- }
-
- void StartConnection (SoftDebuggerStartInfo dsi)
- {
- startArgs = dsi.StartArgs;
-
- RegisterUserAssemblies (dsi);
-
- if (!String.IsNullOrEmpty (dsi.LogMessage))
- LogWriter (false, dsi.LogMessage + "\n");
-
- AsyncCallback callback = null;
- int attemptNumber = 0;
- int maxAttempts = startArgs.MaxConnectionAttempts;
- int timeBetweenAttempts = startArgs.TimeBetweenConnectionAttempts;
- callback = delegate (IAsyncResult ar) {
- try {
- string appName;
- VirtualMachine vm;
- startArgs.ConnectionProvider.EndConnect (ar, out vm, out appName);
- remoteProcessName = appName;
- ConnectionStarted (vm);
- return;
- } catch (Exception ex) {
- attemptNumber++;
- if (!ShouldRetryConnection (ex, attemptNumber)
- || !startArgs.ConnectionProvider.ShouldRetryConnection (ex)
- || attemptNumber == maxAttempts
- || HasExited)
- {
- OnConnectionError (ex);
- return;
- }
- }
- try {
- if (timeBetweenAttempts > 0)
- Thread.Sleep (timeBetweenAttempts);
- ConnectionStarting (startArgs.ConnectionProvider.BeginConnect (dsi, callback), dsi, false, 0);
- } catch (Exception ex2) {
- OnConnectionError (ex2);
- }
- };
- //the "listening" value is never used, pass a dummy value
- ConnectionStarting (startArgs.ConnectionProvider.BeginConnect (dsi, callback), dsi, false, 0);
- }
-
- void StartLaunching (SoftDebuggerStartInfo dsi)
- {
- var args = (SoftDebuggerLaunchArgs) dsi.StartArgs;
- var runtime = Path.Combine (Path.Combine (args.MonoRuntimePrefix, "bin"), "mono");
- RegisterUserAssemblies (dsi);
-
- var psi = new System.Diagnostics.ProcessStartInfo (runtime) {
- Arguments = string.Format ("\"{0}\" {1}", dsi.Command, dsi.Arguments),
- WorkingDirectory = dsi.WorkingDirectory,
- RedirectStandardOutput = true,
- RedirectStandardError = true,
- UseShellExecute = false,
- CreateNoWindow = true,
- };
-
- LaunchOptions options = null;
-
- if (dsi.UseExternalConsole && args.ExternalConsoleLauncher != null) {
- options = new LaunchOptions ();
- options.CustomTargetProcessLauncher = args.ExternalConsoleLauncher;
- psi.RedirectStandardOutput = false;
- psi.RedirectStandardError = false;
- }
-
- var sdbLog = Environment.GetEnvironmentVariable ("MONODEVELOP_SDB_LOG");
- if (!String.IsNullOrEmpty (sdbLog)) {
- options = options ?? new LaunchOptions ();
- options.AgentArgs = string.Format ("loglevel=1,logfile='{0}'", sdbLog);
- }
-
- foreach (var env in args.MonoRuntimeEnvironmentVariables)
- psi.EnvironmentVariables[env.Key] = env.Value;
-
- foreach (var env in dsi.EnvironmentVariables)
- psi.EnvironmentVariables[env.Key] = env.Value;
-
- if (!String.IsNullOrEmpty (dsi.LogMessage))
- OnDebuggerOutput (false, dsi.LogMessage + "\n");
-
- var callback = HandleConnectionCallbackErrors ((IAsyncResult ar) => {
- ConnectionStarted (VirtualMachineManager.EndLaunch (ar));
- });
- ConnectionStarting (VirtualMachineManager.BeginLaunch (psi, callback, options), dsi, true, 0);
- }
-
- /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
- protected void StartListening (SoftDebuggerStartInfo dsi)
- {
- int dp, cp;
- StartListening (dsi, out dp, out cp);
- }
-
- /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
- protected void StartListening (SoftDebuggerStartInfo dsi, out int assignedDebugPort)
- {
- int cp;
- StartListening (dsi, out assignedDebugPort, out cp);
- }
-
- /// <summary>Starts the debugger listening for a connection over TCP/IP</summary>
- protected void StartListening (SoftDebuggerStartInfo dsi,
- out int assignedDebugPort, out int assignedConsolePort)
- {
-
- IPEndPoint dbgEP, conEP;
- InitForRemoteSession (dsi, out dbgEP, out conEP);
-
- var callback = HandleConnectionCallbackErrors (delegate (IAsyncResult ar) {
- ConnectionStarted (VirtualMachineManager.EndListen (ar));
- });
- var a = VirtualMachineManager.BeginListen (dbgEP, conEP, callback, out assignedDebugPort, out assignedConsolePort);
- ConnectionStarting (a, dsi, true, 0);
- }
-
- protected virtual bool ShouldRetryConnection (Exception ex, int attemptNumber)
- {
- var sx = ex as SocketException;
- if (sx != null) {
- if (sx.ErrorCode == 10061) //connection refused
- return true;
- }
- return false;
- }
-
- protected void StartConnecting (SoftDebuggerStartInfo dsi)
- {
- StartConnecting (dsi, dsi.StartArgs.MaxConnectionAttempts, dsi.StartArgs.TimeBetweenConnectionAttempts);
- }
-
- /// <summary>Starts the debugger connecting to a remote IP</summary>
- protected void StartConnecting (SoftDebuggerStartInfo dsi, int maxAttempts, int timeBetweenAttempts)
- {
- if (timeBetweenAttempts < 0 || timeBetweenAttempts > 10000)
- throw new ArgumentException ("timeBetweenAttempts");
-
- IPEndPoint dbgEP, conEP;
- InitForRemoteSession (dsi, out dbgEP, out conEP);
-
- AsyncCallback callback = null;
- int attemptNumber = 0;
- callback = delegate (IAsyncResult ar) {
- try {
- ConnectionStarted (VirtualMachineManager.EndConnect (ar));
- return;
- } catch (Exception ex) {
- attemptNumber++;
- if (!ShouldRetryConnection (ex, attemptNumber) || attemptNumber == maxAttempts || HasExited) {
- OnConnectionError (ex);
- return;
- }
- }
- try {
- if (timeBetweenAttempts > 0)
- System.Threading.Thread.Sleep (timeBetweenAttempts);
-
- ConnectionStarting (VirtualMachineManager.BeginConnect (dbgEP, conEP, callback), dsi, false, attemptNumber);
-
- } catch (Exception ex2) {
- OnConnectionError (ex2);
- }
- };
-
- ConnectionStarting (VirtualMachineManager.BeginConnect (dbgEP, conEP, callback), dsi, false, 0);
- }
-
- void InitForRemoteSession (SoftDebuggerStartInfo dsi, out IPEndPoint dbgEP, out IPEndPoint conEP)
- {
- if (remoteProcessName != null)
- throw new InvalidOperationException ("Cannot initialize connection more than once");
-
- var args = (SoftDebuggerRemoteArgs) dsi.StartArgs;
-
- remoteProcessName = args.AppName;
-
- RegisterUserAssemblies (dsi);
-
- dbgEP = new IPEndPoint (args.Address, args.DebugPort);
- conEP = args.RedirectOutput? new IPEndPoint (args.Address, args.OutputPort) : null;
-
- if (!String.IsNullOrEmpty (dsi.LogMessage))
- LogWriter (false, dsi.LogMessage + "\n");
- }
-
- ///<summary>Catches errors in async callbacks and hands off to OnConnectionError</summary>
- AsyncCallback HandleConnectionCallbackErrors (AsyncCallback callback)
- {
- return delegate (IAsyncResult ar) {
- connectionHandle = null;
- try {
- callback (ar);
- } catch (Exception ex) {
- OnConnectionError (ex);
- }
- };
- }
-
- /// <summary>
- /// Called if an error happens while making the connection. Default terminates the session.
- /// </summary>
- protected virtual void OnConnectionError (Exception ex)
- {
- //if the exception was caused by cancelling the session
- if (HasExited)
- return;
-
- if (!HandleException (new ConnectionException (ex))) {
- LoggingService.LogAndShowException ("Unhandled error launching soft debugger", ex);
- }
-
- // The session is dead
- // HandleException doesn't actually handle exceptions, it just displays them.
- EndSession ();
- }
-
- void ConnectionStarting (IAsyncResult connectionHandle, DebuggerStartInfo dsi, bool listening, int attemptNumber)
- {
- if (this.connectionHandle != null && (attemptNumber == 0 || !this.connectionHandle.IsCompleted))
- throw new InvalidOperationException ("Already connecting");
-
- this.connectionHandle = connectionHandle;
-
- if (ConnectionDialogCreator != null && attemptNumber == 0) {
- connectionDialog = ConnectionDialogCreator ();
- connectionDialog.UserCancelled += delegate {
- EndSession ();
- };
- }
- if (connectionDialog != null)
- connectionDialog.SetMessage (dsi, GetConnectingMessage (dsi), listening, attemptNumber);
- }
-
- protected virtual string GetConnectingMessage (DebuggerStartInfo dsi)
- {
- return null;
- }
-
- void EndLaunch ()
- {
- HideConnectionDialog ();
- if (connectionHandle != null) {
- if (startArgs != null && startArgs.ConnectionProvider != null) {
- startArgs.ConnectionProvider.CancelConnect (connectionHandle);
- startArgs = null;
- } else {
- VirtualMachineManager.CancelConnection (connectionHandle);
- }
- connectionHandle = null;
- }
- }
-
- protected virtual void EndSession ()
- {
- if (!HasExited) {
- EndLaunch ();
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
- }
- }
-
- public Dictionary<Tuple<TypeMirror, string>, MethodMirror[]> OverloadResolveCache {
- get {
- return overloadResolveCache;
- }
- }
-
- void HideConnectionDialog ()
- {
- if (connectionDialog != null) {
- connectionDialog.Dispose ();
- connectionDialog = null;
- }
- }
-
- /// <summary>
- /// If subclasses do an async connect in OnRun, they should pass the resulting VM to this method.
- /// If the vm is null, the session will be closed.
- /// </summary>
- void ConnectionStarted (VirtualMachine vm)
- {
- if (this.vm != null)
- throw new InvalidOperationException ("The VM has already connected");
-
- if (vm == null) {
- EndSession ();
- return;
- }
-
- connectionHandle = null;
-
- this.vm = vm;
-
- //full paths, from GetSourceFiles (true), are only supported by sdb protocol 2.2 and later
- useFullPaths = vm.Version.AtLeast (2, 2);
-
- ConnectOutput (vm.StandardOutput, false);
- ConnectOutput (vm.StandardError, true);
-
- HideConnectionDialog ();
-
- vm.EnableEvents (EventType.AssemblyLoad, EventType.ThreadStart, EventType.ThreadDeath,
- EventType.AssemblyUnload, EventType.UserBreak, EventType.UserLog);
- try {
- unhandledExceptionRequest = vm.CreateExceptionRequest (null, false, true);
- unhandledExceptionRequest.Enable ();
- } catch (NotSupportedException) {
- //Mono < 2.6.3 doesn't support catching unhandled exceptions
- }
-
- if (vm.Version.AtLeast (2, 9)) {
- /* Created later */
- } else {
- vm.EnableEvents (EventType.TypeLoad);
- }
-
- started = true;
-
- /* Wait for the VMStart event */
- HandleEventSet (vm.GetNextEventSet ());
-
- eventHandler = new Thread (EventHandler);
- eventHandler.Name = "SDB Event Handler";
- eventHandler.IsBackground = true;
- eventHandler.Start ();
- }
-
- void RegisterUserAssemblies (SoftDebuggerStartInfo dsi)
- {
- if (Options.ProjectAssembliesOnly && dsi.UserAssemblyNames != null) {
- assemblyFilters = new List<AssemblyMirror> ();
- userAssemblyNames = dsi.UserAssemblyNames.Select (x => x.ToString ()).ToList ();
- }
-
- assemblyPathMap = dsi.AssemblyPathMap;
- if (assemblyPathMap == null)
- assemblyPathMap = new Dictionary<string, string> ();
- }
-
- protected bool SetSocketTimeouts (int sendTimeout, int receiveTimeout, int keepaliveInterval)
- {
- try {
- if (vm.Version.AtLeast (2, 4)) {
- vm.EnableEvents (EventType.KeepAlive);
- vm.SetSocketTimeouts (sendTimeout, receiveTimeout, keepaliveInterval);
- return true;
- }
-
- return false;
- } catch {
- return false;
- }
- }
-
- protected void ConnectOutput (StreamReader reader, bool error)
- {
- Thread t = (error ? errorReader : outputReader);
- if (t != null || reader == null)
- return;
- t = new Thread (delegate () {
- ReadOutput (reader, error);
- });
- t.Name = error? "SDB error reader" : "SDB output reader";
- t.IsBackground = true;
- t.Start ();
-
- if (error)
- errorReader = t;
- else
- outputReader = t;
- }
-
- void ReadOutput (StreamReader reader, bool isError)
- {
- try {
- var buffer = new char [1024];
- while (!HasExited) {
- int c = reader.Read (buffer, 0, buffer.Length);
- if (c > 0) {
- OnTargetOutput (isError, new string (buffer, 0, c));
- } else {
- //FIXME: workaround for buggy console stream that never blocks
- Thread.Sleep (250);
- }
- }
- } catch {
- // Ignore
- }
- }
-
- protected virtual void OnResumed ()
- {
- current_threads = null;
- current_thread = null;
- procs = null;
- activeExceptionsByThread.Clear ();
- }
-
- public VirtualMachine VirtualMachine {
- get { return vm; }
- }
-
- public TypeMirror GetType (string fullName)
- {
- TypeMirror tm;
- types.TryGetValue (fullName, out tm);
- return tm;
- }
-
- public IEnumerable<TypeMirror> GetAllTypes ()
- {
- return types.Values;
- }
-
- protected override bool AllowBreakEventChanges {
- get { return true; }
- }
-
- public override void Dispose ()
- {
- base.Dispose ();
-
- if (symbolFiles == null)
- return;
-
- if (!HasExited)
- EndLaunch ();
-
- foreach (var symfile in symbolFiles)
- symfile.Value.Dispose ();
-
- symbolFiles.Clear ();
- symbolFiles = null;
-
- if (!HasExited) {
- if (vm != null) {
- ThreadPool.QueueUserWorkItem (delegate {
- try {
- vm.Exit (0);
- } catch (VMDisconnectedException) {
- } catch (Exception ex) {
- LoggingService.LogError ("Error exiting SDB VM:", ex);
- }
- });
- }
- }
-
- Adaptor.Dispose ();
- }
-
- protected override void OnAttachToProcess (long processId)
- {
- throw new NotSupportedException ();
- }
-
- protected override void OnContinue ()
- {
- ThreadPool.QueueUserWorkItem (delegate {
- try {
- Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock
- OnResumed ();
- vm.Resume ();
- DequeueEventsForFirstThread ();
- } catch (Exception ex) {
- if (!HandleException (ex))
- OnDebuggerOutput (true, ex.ToString ());
- }
- });
- }
-
- protected override void OnDetach ()
- {
- throw new NotSupportedException ();
- }
-
- protected override void OnExit ()
- {
- HasExited = true;
- EndLaunch ();
- if (vm != null) {
- try {
- vm.Exit (0);
- } catch (VMDisconnectedException) {
- // The VM was already disconnected, ignore.
- } catch (SocketException se) {
- // This will often happen during normal operation
- LoggingService.LogError ("Error closing debugger session", se);
- } catch (IOException ex) {
- // This will often happen during normal operation
- LoggingService.LogError ("Error closing debugger session", ex);
- }
- }
- QueueEnsureExited ();
- }
-
- void QueueEnsureExited ()
- {
- if (vm != null) {
- //FIXME: this might never get reached if the IDE is Exited first
- try {
- if (vm.Process != null) {
- ThreadPool.QueueUserWorkItem (delegate {
- // This is a workaround for a mono bug
- // Without this call, the process may become zombie in mono < 2.10.2
- vm.Process.WaitForExit ();
- });
- }
- } catch {
- // Ignore
- }
- var t = new System.Timers.Timer ();
- t.Interval = 3000;
- t.Elapsed += delegate {
- try {
- t.Enabled = false;
- t.Dispose ();
- EnsureExited ();
- } catch (Exception ex) {
- LoggingService.LogError ("Failed to force-terminate process", ex);
- }
- try {
- if (vm != null) {
- //this is a no-op if it already closed
- vm.ForceDisconnect ();
- }
- } catch (Exception ex) {
- LoggingService.LogError ("Failed to force-close debugger connection", ex);
- }
- };
- t.Enabled = true;
- }
- }
-
- /// <summary>This is a fallback in case the debugger agent doesn't respond to an exit call</summary>
- protected virtual void EnsureExited ()
- {
- try {
- if (vm != null && vm.TargetProcess != null && !vm.TargetProcess.HasExited)
- vm.TargetProcess.Kill ();
- } catch (Exception ex) {
- LoggingService.LogError ("Error force-terminating soft debugger process", ex);
- }
- }
-
- protected override void OnFinish ()
- {
- Step (StepDepth.Out, StepSize.Line);
- }
-
- protected override ProcessInfo[] OnGetProcesses ()
- {
- if (procs == null) {
- if (remoteProcessName != null || vm.TargetProcess == null) {
- procs = new ProcessInfo[] { new ProcessInfo (0, remoteProcessName ?? "mono") };
- } else {
- try {
- procs = new ProcessInfo[] { new ProcessInfo (vm.TargetProcess.Id, vm.TargetProcess.ProcessName) };
- } catch (Exception ex) {
- if (!loggedSymlinkedRuntimesBug) {
- loggedSymlinkedRuntimesBug = true;
- LoggingService.LogError ("Error getting debugger process info. Known Mono bug with symlinked runtimes.", ex);
- }
- procs = new ProcessInfo[] { new ProcessInfo (0, "mono") };
- }
- }
- }
- return new ProcessInfo[] { new ProcessInfo (procs[0].Id, procs[0].Name) };
- }
-
- protected override Backtrace OnGetThreadBacktrace (long processId, long threadId)
- {
- return GetThreadBacktrace (GetThread (processId, threadId));
- }
-
- Backtrace GetThreadBacktrace (ThreadMirror thread)
- {
- return new Backtrace (new SoftDebuggerBacktrace (this, thread));
- }
-
- static string GetThreadName (ThreadMirror t)
- {
- string name = t.Name;
- if (string.IsNullOrEmpty (name)) {
- if (t.IsThreadPoolThread)
- return "<Thread Pool>";
- }
- return name;
- }
-
- protected override ThreadInfo[] OnGetThreads (long processId)
- {
- if (current_threads == null) {
- IList<ThreadMirror> mirrors = vm.GetThreads ();
- var threads = new ThreadInfo[mirrors.Count];
- for (int i = 0; i < mirrors.Count; i++) {
- ThreadMirror t = mirrors [i];
- threads[i] = new ThreadInfo (processId, GetId (t), GetThreadName (t), null);
- }
- current_threads = threads;
- }
- return current_threads;
- }
-
- ThreadMirror GetThread (long processId, long threadId)
- {
- foreach (ThreadMirror t in vm.GetThreads ())
- if (GetId (t) == threadId)
- return t;
- return null;
- }
-
- ThreadInfo GetThread (ProcessInfo process, ThreadMirror thread)
- {
- long tid = GetId (thread);
- foreach (var t in OnGetThreads (process.Id))
- if (t.Id == tid)
- return t;
- return null;
- }
-
- protected override BreakEventInfo OnInsertBreakEvent (BreakEvent ev)
- {
- lock (pending_bes) {
- var bi = new BreakInfo ();
-
- if (HasExited) {
- bi.SetStatus (BreakEventStatus.Disconnected, null);
- return bi;
- }
-
- if (ev is FunctionBreakpoint) {
- var fb = (FunctionBreakpoint) ev;
- bool resolved = false;
-
- foreach (var location in FindFunctionLocations (fb.FunctionName, fb.ParamTypes)) {
- string paramList = "(" + string.Join (", ", fb.ParamTypes) + ")";
- OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint for '{0}{1}' to {2}:{3} [0x{4:x5}].\n",
- fb.FunctionName, paramList, location.SourceFile, location.LineNumber, location.ILOffset));
-
- bi.FileName = location.SourceFile;
- bi.Location = location;
-
- InsertBreakpoint (fb, bi);
- bi.SetStatus (BreakEventStatus.Bound, null);
- resolved = true;
- }
-
- if (!resolved) {
- // FIXME: handle types like GenericType<>, GenericType<SomeOtherType>, and GenericType<...>+NestedGenricType<...>
- int dot = fb.FunctionName.LastIndexOf ('.');
- if (dot != -1)
- bi.TypeName = fb.FunctionName.Substring (0, dot);
-
- bi.SetStatus (BreakEventStatus.NotBound, null);
- pending_bes.Add (bi);
- }
- } else if (ev is Breakpoint) {
- var bp = (Breakpoint) ev;
- bool insideLoadedRange;
- bool resolved = false;
- bool generic;
-
- bi.FileName = bp.FileName;
-
- foreach (var location in FindLocationsByFile (bp.FileName, bp.Line, bp.Column, out generic, out insideLoadedRange)) {
- OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint at '{0}:{1},{2}' to {3} [0x{4:x5}].\n",
- bp.FileName, bp.Line, bp.Column, GetPrettyMethodName (location.Method), location.ILOffset));
-
- bi.Location = location;
- InsertBreakpoint (bp, bi);
- bi.SetStatus (BreakEventStatus.Bound, null);
- resolved = true;
- }
-
- if (resolved) {
- // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
- if (generic)
- pending_bes.Add (bi);
- } else {
- pending_bes.Add (bi);
- if (insideLoadedRange)
- bi.SetStatus (BreakEventStatus.Invalid, null);
- else
- bi.SetStatus (BreakEventStatus.NotBound, null);
- }
- } else if (ev is Catchpoint) {
- var cp = (Catchpoint) ev;
- TypeMirror type;
-
- if (!types.TryGetValue (cp.ExceptionName, out type)) {
- //
- // Same as in FindLocationByFile (), fetch types matching the type name
- if (vm.Version.AtLeast (2, 9)) {
- foreach (TypeMirror t in vm.GetTypes (cp.ExceptionName, false))
- ProcessType (t);
- }
- }
-
- if (types.TryGetValue (cp.ExceptionName, out type)) {
- InsertCatchpoint (cp, bi, type);
- bi.SetStatus (BreakEventStatus.Bound, null);
- } else {
- bi.TypeName = cp.ExceptionName;
- pending_bes.Add (bi);
- bi.SetStatus (BreakEventStatus.NotBound, null);
- }
- }
-
- /*
- * TypeLoad events lead to too much wire traffic + suspend/resume work, so
- * filter them using the file names used by pending breakpoints.
- */
- if (vm.Version.AtLeast (2, 9)) {
- var sourceFileList = pending_bes.Where (b => b.FileName != null).Select (b => b.FileName).ToArray ();
- if (sourceFileList.Length > 0) {
- //HACK: explicitly try lowercased drivename on windows, since csc (when not hosted in VS) lowercases
- //the drivename in the pdb files that get converted to mdbs as-is
- //FIXME: we should really do a case-insensitive request on Win/Mac, when sdb supports that
- if (IsWindows) {
- int originalCount = sourceFileList.Length;
- Array.Resize (ref sourceFileList, originalCount * 2);
- for (int i = 0; i < originalCount; i++) {
- string n = sourceFileList[i];
- sourceFileList[originalCount + i] = char.ToLower (n[0]) + n.Substring (1);
- }
- }
-
- if (typeLoadReq == null) {
- typeLoadReq = vm.CreateTypeLoadRequest ();
- }
- typeLoadReq.Enabled = false;
- typeLoadReq.SourceFileFilter = sourceFileList;
- typeLoadReq.Enabled = true;
- }
-
- var typeNameList = pending_bes.Where (b => b.TypeName != null).Select (b => b.TypeName).ToArray ();
- if (typeNameList.Length > 0) {
- // Use a separate request since the filters are ANDed together
- if (typeLoadTypeNameReq == null) {
- typeLoadTypeNameReq = vm.CreateTypeLoadRequest ();
- }
- typeLoadTypeNameReq.Enabled = false;
- typeLoadTypeNameReq.TypeNameFilter = typeNameList;
- typeLoadTypeNameReq.Enabled = true;
- }
- }
-
- return bi;
- }
- }
-
- protected override void OnRemoveBreakEvent (BreakEventInfo binfo)
- {
- if (HasExited)
- return;
-
- lock (pending_bes) {
- var bi = (BreakInfo) binfo;
- if (bi.Requests.Count != 0) {
- foreach (var request in bi.Requests)
- request.Enabled = false;
-
- RemoveQueuedBreakEvents (bi.Requests);
- }
-
- pending_bes.Remove (bi);
- }
- }
-
- protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
- {
- if (HasExited)
- return;
-
- lock (pending_bes) {
- var bi = (BreakInfo) binfo;
- if (bi.Requests.Count != 0) {
- foreach (var request in bi.Requests)
- request.Enabled = enable;
-
- if (!enable)
- RemoveQueuedBreakEvents (bi.Requests);
- }
- }
- }
-
- protected override void OnUpdateBreakEvent (BreakEventInfo binfo)
- {
- }
-
- void InsertBreakpoint (Breakpoint bp, BreakInfo bi)
- {
- EventRequest request;
-
- request = vm.SetBreakpoint (bi.Location.Method, bi.Location.ILOffset);
- request.Enabled = bp.Enabled;
- bi.Requests.Add (request);
-
- breakpoints[request] = bi;
-
- if (bi.Location.LineNumber != bp.Line || bi.Location.ColumnNumber != bp.Column)
- bi.AdjustBreakpointLocation (bi.Location.LineNumber, bi.Location.ColumnNumber);
- }
-
- void InsertCatchpoint (Catchpoint cp, BreakInfo bi, TypeMirror excType)
- {
- EventRequest request;
-
- request = vm.CreateExceptionRequest (excType, true, true);
- request.Count = cp.HitCount; // Note: need to set HitCount *before* enabling
- request.Enabled = cp.Enabled;
-
- bi.Requests.Add (request);
- }
-
- static bool CheckTypeName (string typeName, string name)
- {
- // if the name provided is empty, it matches anything.
- if (name.Length == 0)
- return true;
-
- if (name.StartsWith ("global::", StringComparison.Ordinal)) {
- if (typeName != name.Substring ("global::".Length))
- return false;
- } else if (name.StartsWith ("::", StringComparison.Ordinal)) {
- if (typeName != name.Substring ("::".Length))
- return false;
- } else {
- // be a little more flexible with what we match... i.e. "Console" should match "System.Console"
- if (typeName.Length > name.Length) {
- if (!typeName.EndsWith (name, StringComparison.InvariantCulture))
- return false;
-
- char delim = typeName[typeName.Length - name.Length];
- if (delim != '.' && delim != '+')
- return false;
- } else if (typeName != name) {
- return false;
- }
- }
-
- return true;
- }
-
- static bool CheckTypeName (TypeMirror type, string name)
- {
- if (name.Length == 0) {
- // empty name matches anything
- return true;
- }
-
- if (name[name.Length - 1] == '?') {
- // canonicalize the user-specified nullable type
- return CheckTypeName (type, string.Format ("System.Nullable<{0}>", name.Substring (0, name.Length - 1)));
- }
-
- if (type.IsArray) {
- int startIndex = name.LastIndexOf ('[');
- int endIndex = name.Length - 1;
-
- if (startIndex == -1 || name[endIndex] != ']') {
- // the user-specified type is not an array
- return false;
- }
-
- var rank = name.Substring (startIndex + 1, endIndex - (startIndex + 1)).Split (new char[] { ',' });
- if (rank.Length != type.GetArrayRank ())
- return false;
-
- return CheckTypeName (type.GetElementType (), name.Substring (0, startIndex).TrimEnd ());
- }
-
- if (type.IsPointer) {
- if (name.Length < 2 || name[name.Length - 1] != '*')
- return false;
-
- return CheckTypeName (type.GetElementType (), name.Substring (0, name.Length - 1).TrimEnd ());
- }
-
- if (type.IsGenericType) {
- int startIndex = name.IndexOf ('<');
- int endIndex = name.Length - 1;
-
- if (startIndex == -1 || name[endIndex] != '>') {
- // the user-specified type is not a generic type
- return false;
- }
-
- // make sure that the type name matches (minus generics)
- string subName = name.Substring (0, startIndex);
- string typeName = type.FullName;
- int tick;
-
- if ((tick = typeName.IndexOf ('`')) != -1)
- typeName = typeName.Substring (0, tick);
-
- if (!CheckTypeName (typeName, subName))
- return false;
-
- string[] paramTypes;
- if (!FunctionBreakpoint.TryParseParameters (name, startIndex + 1, endIndex, out paramTypes))
- return false;
-
- TypeMirror[] argTypes = type.GetGenericArguments ();
- if (paramTypes.Length != argTypes.Length)
- return false;
-
- for (int i = 0; i < paramTypes.Length; i++) {
- if (!CheckTypeName (argTypes[i], paramTypes[i]))
- return false;
- }
- } else if (!CheckTypeName (type.CSharpName, name)) {
- if (!CheckTypeName (type.FullName, name))
- return false;
- }
-
- return true;
- }
-
- static bool CheckMethodParams (MethodMirror method, string[] paramTypes)
- {
- if (paramTypes == null) {
- // User supplied no params to match against, match anything we find.
- return true;
- }
-
- var parameters = method.GetParameters ();
- if (parameters.Length != paramTypes.Length)
- return false;
-
- for (int i = 0; i < paramTypes.Length; i++) {
- if (!CheckTypeName (parameters[i].ParameterType, paramTypes[i]))
- return false;
- }
-
- return true;
- }
-
- bool IsGenericMethod (MethodMirror method)
- {
- return vm.Version.AtLeast (2, 12) && method.IsGenericMethod;
- }
-
- IEnumerable<Location> FindFunctionLocations (string function, string[] paramTypes)
- {
- if (!started)
- yield break;
-
- if (vm.Version.AtLeast (2, 9)) {
- int dot = function.LastIndexOf ('.');
- if (dot == -1 || dot + 1 == function.Length)
- yield break;
-
- // FIXME: handle types like GenericType<>, GenericType<SomeOtherType>, and GenericType<...>+NestedGenricType<...>
- string methodName = function.Substring (dot + 1);
- string typeName = function.Substring (0, dot);
-
- // FIXME: need a way of querying all types so we can substring match typeName (e.g. user may have typed "Console" instead of "System.Console")
- foreach (var type in vm.GetTypes (typeName, false)) {
- ProcessType (type);
-
- foreach (var method in type.GetMethodsByNameFlags (methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, false)) {
- if (!CheckMethodParams (method, paramTypes))
- continue;
-
- Location location = GetLocFromMethod (method);
- if (location != null)
- yield return location;
- }
- }
- }
-
- yield break;
- }
-
- IList<Location> FindLocationsByFile (string file, int line, int column, out bool genericTypeOrMethod, out bool insideLoadedRange)
- {
- List<Location> locations = new List<Location> ();
-
- genericTypeOrMethod = false;
- insideLoadedRange = false;
-
- if (!started)
- return locations;
-
- string filename = PathToFileName (file);
-
- //
- // Fetch types matching the source file from the debuggee, and add them
- // to the source file->type mapping tables.
- // This is needed because we don't receive type load events for all types,
- // just the ones which match a source file with an existing breakpoint.
- //
- if (vm.Version.AtLeast (2, 9)) {
- //FIXME: do a case insensitive request on Win/Mac when sdb supports it (currently asserts NOTIMPLEMENTED)
- var typesInFile = vm.GetTypesForSourceFile (filename, false);
-
- //HACK: explicitly try lowercased drivename on windows, since csc (when not hosted in VS) lowercases
- //the drivename in the pdb files that get converted to mdbs as-is
- if (typesInFile.Count == 0 && IsWindows) {
- string alternateCaseFilename = char.ToLower (filename[0]) + filename.Substring (1);
- typesInFile = vm.GetTypesForSourceFile (alternateCaseFilename, false);
- }
-
- foreach (TypeMirror t in typesInFile)
- ProcessType (t);
- }
-
- // Try already loaded types in the current source file
- List<TypeMirror> types;
-
- if (source_to_type.TryGetValue (filename, out types)) {
- foreach (TypeMirror type in types) {
- bool genericMethod;
- bool insideRange;
-
- var loc = GetLocFromType (type, filename, line, column, out genericMethod, out insideRange);
- if (insideRange)
- insideLoadedRange = true;
-
- if (loc != null) {
- if (genericMethod || type.IsGenericType)
- genericTypeOrMethod = true;
-
- locations.Add (loc);
- }
- }
- }
-
- return locations;
- }
-
- public override bool CanCancelAsyncEvaluations {
- get {
- return Adaptor.IsEvaluating;
- }
- }
-
- protected override void OnCancelAsyncEvaluations ()
- {
- Adaptor.CancelAsyncOperations ();
- }
-
- protected override void OnNextInstruction ()
- {
- Step (StepDepth.Over, StepSize.Min);
- }
-
- protected override void OnNextLine ()
- {
- Step (StepDepth.Over, StepSize.Line);
- }
-
- void Step (StepDepth depth, StepSize size)
- {
- ThreadPool.QueueUserWorkItem (delegate {
- try {
- Adaptor.CancelAsyncOperations (); // This call can block, so it has to run in background thread to avoid keeping the main session lock
- var req = vm.CreateStepRequest (current_thread);
- req.Depth = depth;
- req.Size = size;
- req.Filter = StepFilter.StaticCtor | StepFilter.DebuggerHidden;
- if (assemblyFilters != null && assemblyFilters.Count > 0)
- req.AssemblyFilter = assemblyFilters;
- req.Enabled = true;
- currentStepRequest = req;
- OnResumed ();
- vm.Resume ();
- DequeueEventsForFirstThread ();
- } catch (CommandException ex) {
- string reason;
-
- switch (ex.ErrorCode) {
- case ErrorCode.INVALID_FRAMEID: reason = "invalid frame id"; break;
- case ErrorCode.NOT_SUSPENDED: reason = "VM not suspended"; break;
- case ErrorCode.ERR_UNLOADED: reason = "AppDomain has been unloaded"; break;
- case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET: reason = "no sequence point at the specified IL offset"; break;
- default: reason = ex.ErrorCode.ToString (); break;
- }
-
- OnDebuggerOutput (true, string.Format ("Step request failed: {0}.", reason));
- LoggingService.LogError ("Step request failed", ex);
- } catch (Exception ex) {
- OnDebuggerOutput (true, string.Format ("Step request failed: {0}", ex.Message));
- LoggingService.LogError ("Step request failed", ex);
- }
- });
- }
-
- void EventHandler ()
- {
- while (true) {
- try {
- EventSet e = vm.GetNextEventSet ();
- var type = e[0].EventType;
- if (type == EventType.VMDeath || type == EventType.VMDisconnect) {
- break;
- }
- HandleEventSet (e);
- } catch (Exception ex) {
- if (HasExited)
- break;
-
- if (!HandleException (ex))
- OnDebuggerOutput (true, ex.ToString ());
-
- if (ex is VMDisconnectedException || ex is IOException || ex is SocketException)
- break;
- }
- }
-
- try {
- // This is a workaround for a mono bug
- // Without this call, the process may become zombie in mono < 2.10.2
- if (vm.Process != null)
- vm.Process.WaitForExit (1);
- } catch {
- // Ignore
- }
-
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
- }
-
- protected override bool HandleException (Exception ex)
- {
- HideConnectionDialog ();
-
- if (HasExited)
- return true;
-
- if (ex is VMDisconnectedException || ex is IOException) {
- ex = new DisconnectedException (ex);
- HasExited = true;
- } else if (ex is SocketException) {
- ex = new DebugSocketException (ex);
- HasExited = true;
- }
-
- return base.HandleException (ex);
- }
-
- // This method dispatches an event set.
- //
- // Based on the subset of events for which we register, and the contract for EventSet contents (equivalent to
- // Java - http://download.oracle.com/javase/1.5.0/docs/guide/jpda/jdi/com/sun/jdi/event/EventSet.html)
- // we know that event sets we receive are either:
- // 1) Set of step and break events for a location in a single thread.
- // 2) Set of catchpoints for a single exception.
- // 3) A single event of any other kind.
- // We verify these assumptions where possible, because things will break in horrible ways if they are wrong.
- //
- // If we are currently stopped on a thread, and the break events are on a different thread, we must queue
- // that event set and dequeue it next time we resume. This eliminates race conditions when multiple threads
- // hit breakpoints or catchpoints simultaneously.
- //
- void HandleEventSet (EventSet es)
- {
-#if DEBUG_EVENT_QUEUEING
- if (!(es[0] is TypeLoadEvent))
- Console.WriteLine ("pp eventset({0}): {1}", es.Events.Length, es[0]);
-#endif
- var type = es[0].EventType;
- bool isBreakEvent = type == EventType.Step || type == EventType.Breakpoint || type == EventType.Exception || type == EventType.UserBreak;
-
- if (isBreakEvent) {
- if (current_thread != null && es[0].Thread.Id != current_thread.Id) {
- QueueBreakEventSet (es.Events);
- } else {
- HandleBreakEventSet (es.Events, false);
- }
- } else {
- if (es.Events.Length != 1)
- throw new InvalidOperationException ("EventSet has unexpected combination of events");
- HandleEvent (es[0]);
- vm.Resume ();
- }
- }
-
- static bool IsStepIntoRequest (StepEventRequest stepRequest)
- {
- return stepRequest.Depth == StepDepth.Into;
- }
-
- static bool IsStepOutRequest (StepEventRequest stepRequest)
- {
- return stepRequest.Depth == StepDepth.Out;
- }
-
- static bool IsPropertyOrOperatorMethod (MDB.MethodMirror method)
- {
- string name = method.Name;
-
- return method.IsSpecialName &&
- name.StartsWith ("get_", StringComparison.Ordinal) ||
- name.StartsWith ("set_", StringComparison.Ordinal) ||
- name.StartsWith ("op_", StringComparison.Ordinal);
- }
-
- void HandleBreakEventSet (Event[] es, bool dequeuing)
- {
- if (dequeuing && HasExited)
- return;
-
- bool resume = true;
- bool steppedOut = false;
- bool steppedInto = false;
- bool redoCurrentStep = false;
- ObjectMirror exception = null;
- TargetEventType etype = TargetEventType.TargetStopped;
- BreakEvent breakEvent = null;
-
- if (es[0] is ExceptionEvent) {
- var bad = es.FirstOrDefault (ee => ee.EventType != EventType.Exception);
- if (bad != null)
- throw new Exception ("Catchpoint eventset had unexpected event type " + bad.GetType ());
- var ev = (ExceptionEvent)es[0];
- if (ev.Request == unhandledExceptionRequest)
- etype = TargetEventType.UnhandledException;
- else
- etype = TargetEventType.ExceptionThrown;
- exception = ev.Exception;
- if (ev.Request != unhandledExceptionRequest || exception.Type.FullName != "System.Threading.ThreadAbortException")
- resume = false;
- }
- else {
- //always need to evaluate all breakpoints, some might be tracepoints or conditional bps with counters
- foreach (Event e in es) {
- if (e.EventType == EventType.Breakpoint) {
- var be = e as BreakpointEvent;
- BreakInfo binfo;
-
- if (!HandleBreakpoint (e.Thread, be.Request)) {
- etype = TargetEventType.TargetHitBreakpoint;
- autoStepInto = false;
- resume = false;
- }
-
- if (breakpoints.TryGetValue (be.Request, out binfo)) {
- if (currentStepRequest != null &&
- binfo.Location.ILOffset == currentAddress &&
- e.Thread.Id == currentStepRequest.Thread.Id)
- redoCurrentStep = true;
-
- breakEvent = binfo.BreakEvent;
- }
- } else if (e.EventType == EventType.Step) {
- var stepRequest = e.Request as StepEventRequest;
- steppedInto = IsStepIntoRequest (stepRequest);
- steppedOut = IsStepOutRequest (stepRequest);
- etype = TargetEventType.TargetStopped;
- resume = false;
- } else if (e.EventType == EventType.UserBreak) {
- etype = TargetEventType.TargetStopped;
- autoStepInto = false;
- resume = false;
- } else {
- throw new Exception ("Break eventset had unexpected event type " + e.GetType ());
- }
- }
- }
-
- if (redoCurrentStep) {
- StepDepth depth = currentStepRequest.Depth;
- StepSize size = currentStepRequest.Size;
-
- current_thread = recent_thread = es[0].Thread;
- currentStepRequest.Enabled = false;
- currentStepRequest = null;
-
- Step (depth, size);
- } else if (resume) {
- //all breakpoints were conditional and evaluated as false
- vm.Resume ();
- DequeueEventsForFirstThread ();
- } else {
- if (currentStepRequest != null) {
- currentStepRequest.Enabled = false;
- currentStepRequest = null;
- }
-
- current_thread = recent_thread = es[0].Thread;
-
- if (exception != null)
- activeExceptionsByThread [current_thread.ThreadId] = exception;
-
- var backtrace = GetThreadBacktrace (current_thread);
- bool stepOut = false;
-
- if (backtrace.FrameCount > 0) {
- var frame = backtrace.GetFrame (0) as SoftDebuggerStackFrame;
- currentAddress = frame != null ? frame.Address : -1;
- if (frame != null) {
- if (steppedInto) {
- if (Options.StepOverPropertiesAndOperators && IsPropertyOrOperatorMethod (frame.StackFrame.Method)) {
- // We will want to call StepInto once StepOut returns...
- autoStepInto = true;
- stepOut = true;
- } else if (SoftDebuggerAdaptor.IsGeneratedType (frame.StackFrame.Method.DeclaringType)) {
- // User asked to step in, but we landed in an autogenerated type (probably an iterator)
- autoStepInto = true;
- stepOut = true;
- }
- }
- }
- }
-
- if (stepOut) {
- Step (StepDepth.Out, StepSize.Min);
- } else if (steppedOut && autoStepInto) {
- autoStepInto = false;
- Step (StepDepth.Into, StepSize.Min);
- } else {
- var args = new TargetEventArgs (etype);
- args.Process = OnGetProcesses () [0];
- args.Thread = GetThread (args.Process, current_thread);
- args.Backtrace = backtrace;
- args.BreakEvent = breakEvent;
-
- OnTargetEvent (args);
- }
- }
- }
-
- void HandleEvent (Event e)
- {
- lock (pending_bes) {
- switch (e.EventType) {
- case EventType.AssemblyLoad: {
- var ae = (AssemblyLoadEvent) e;
- bool isExternal = !UpdateAssemblyFilters (ae.Assembly) && userAssemblyNames != null;
- string flagExt = isExternal? " [External]" : "";
- OnDebuggerOutput (false, string.Format ("Loaded assembly: {0}{1}\n", ae.Assembly.Location, flagExt));
- break;
- }
- case EventType.AssemblyUnload: {
- var aue = (AssemblyUnloadEvent) e;
-
- if (assemblyFilters != null) {
- int index = assemblyFilters.IndexOf (aue.Assembly);
- if (index != -1)
- assemblyFilters.RemoveAt (index);
- }
-
- // Mark affected breakpoints as pending again
- var affectedBreakpoints = new List<KeyValuePair<EventRequest, BreakInfo>> (
- breakpoints.Where (x=> (x.Value.Location.Method.DeclaringType.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase)))
- );
- foreach (KeyValuePair<EventRequest,BreakInfo> breakpoint in affectedBreakpoints) {
- string file = PathToFileName (breakpoint.Value.Location.SourceFile);
- int line = breakpoint.Value.Location.LineNumber;
- OnDebuggerOutput (false, string.Format ("Re-pending breakpoint at {0}:{1}\n", file, line));
- breakpoints.Remove (breakpoint.Key);
- pending_bes.Add (breakpoint.Value);
- }
-
- // Remove affected types from the loaded types list
- var affectedTypes = new List<string> (
- from pair in types
- where pair.Value.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase)
- select pair.Key
- );
- foreach (string typename in affectedTypes) {
- types.Remove (typename);
- }
-
- foreach (var pair in source_to_type) {
- pair.Value.RemoveAll (delegate (TypeMirror mirror){
- return mirror.Assembly.Location.Equals (aue.Assembly.Location, StringComparison.OrdinalIgnoreCase);
- });
- }
- OnDebuggerOutput (false, string.Format ("Unloaded assembly: {0}\n", aue.Assembly.Location));
- break;
- }
- case EventType.VMStart: {
- OnStarted (new ThreadInfo (0, GetId (e.Thread), GetThreadName (e.Thread), null));
- //HACK: 2.6.1 VM doesn't emit type load event, so work around it
- var t = vm.RootDomain.Corlib.GetType ("System.Exception", false, false);
- if (t != null)
- ResolveBreakpoints (t);
- break;
- }
- case EventType.TypeLoad: {
- var t = ((TypeLoadEvent)e).Type;
- string typeName = t.FullName;
-
- if (types.ContainsKey (typeName)) {
- /* This can happen since we manually add entries to 'types' */
- /*
- if (typeName != "System.Exception" && typeName != "<Module>")
- LoggingService.LogError ("Type '" + typeName + "' loaded more than once", null);
- */
- } else {
- ResolveBreakpoints (t);
- }
- break;
- }
- case EventType.ThreadStart: {
- var ts = (ThreadStartEvent) e;
- var name = GetThreadName (ts.Thread);
- var id = GetId (ts.Thread);
- OnDebuggerOutput (false, string.Format ("Thread started: {0} #{1}\n", name, id));
- OnTargetEvent (new TargetEventArgs (TargetEventType.ThreadStarted) {
- Thread = new ThreadInfo (0, id, name, null),
- });
- break;
- }
- case EventType.ThreadDeath: {
- var ts = (ThreadDeathEvent) e;
- var name = GetThreadName (ts.Thread);
- var id = GetId (ts.Thread);
- OnDebuggerOutput (false, string.Format ("Thread finished: {0} #{1}\n", name, id));
- OnTargetEvent (new TargetEventArgs (TargetEventType.ThreadStopped) {
- Thread = new ThreadInfo (0, id, ts.Thread.Name, null),
- });
- break;
- }
- case EventType.UserLog: {
- var ul = (UserLogEvent) e;
- OnDebuggerOutput (false, string.Format ("[{0}:{1}] {2}\n", ul.Level, ul.Category, ul.Message));
- break;
- }
- default:
- LoggingService.LogMessage ("Unknown debugger event type {0}", e.GetType ());
- break;
- }
- }
- }
-
- public ObjectMirror GetExceptionObject (ThreadMirror thread)
- {
- ObjectMirror obj;
- if (activeExceptionsByThread.TryGetValue (thread.ThreadId, out obj))
- return obj;
-
- return null;
- }
-
- void QueueBreakEventSet (Event[] eventSet)
- {
-#if DEBUG_EVENT_QUEUEING
- Console.WriteLine ("qq eventset({0}): {1}", eventSet.Length, eventSet[0]);
-#endif
- var events = new List<Event> (eventSet);
- lock (queuedEventSets) {
- queuedEventSets.AddLast (events);
- }
- }
-
- void RemoveQueuedBreakEvents (List<EventRequest> requests)
- {
- int resume = 0;
-
- lock (queuedEventSets) {
- var node = queuedEventSets.First;
-
- while (node != null) {
- List<Event> q = node.Value;
-
- for (int i = 0; i < q.Count; i++) {
- foreach (var request in requests) {
- if (q[i].Request == request) {
- q.RemoveAt (i--);
- break;
- }
- }
- }
-
- if (q.Count == 0) {
- var d = node;
- node = node.Next;
- queuedEventSets.Remove (d);
- resume++;
- } else {
- node = node.Next;
- }
- }
- }
-
- for (int i = 0; i < resume; i++)
- vm.Resume ();
- }
-
- void DequeueEventsForFirstThread ()
- {
- List<List<Event>> dequeuing;
- lock (queuedEventSets) {
- if (queuedEventSets.Count < 1)
- return;
-
- dequeuing = new List<List<Event>> ();
- var node = queuedEventSets.First;
-
- //making this the current thread means that all events from other threads will get queued
- current_thread = node.Value[0].Thread;
- while (node != null) {
- if (node.Value[0].Thread.Id == current_thread.Id) {
- var d = node;
- node = node.Next;
- dequeuing.Add (d.Value);
- queuedEventSets.Remove (d);
- } else {
- node = node.Next;
- }
- }
- }
-
-#if DEBUG_EVENT_QUEUEING
- foreach (var e in dequeuing)
- Console.WriteLine ("dq eventset({0}): {1}", e.Count, e[0]);
-#endif
-
- //firing this off in a thread prevents possible infinite recursion
- ThreadPool.QueueUserWorkItem (delegate {
- if (!HasExited) {
- foreach (var es in dequeuing) {
- try {
- HandleBreakEventSet (es.ToArray (), true);
- } catch (Exception ex) {
- if (!HandleException (ex))
- OnDebuggerOutput (true, ex.ToString ());
-
- if (ex is VMDisconnectedException || ex is IOException || ex is SocketException) {
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetExited));
- break;
- }
- }
- }
- }
- });
- }
-
- bool HandleBreakpoint (ThreadMirror thread, EventRequest er)
- {
- BreakInfo binfo;
- if (!breakpoints.TryGetValue (er, out binfo))
- return false;
-
- var bp = binfo.BreakEvent as Breakpoint;
- if (bp == null)
- return false;
-
- binfo.IncrementHitCount ();
- if (!binfo.HitCountReached)
- return true;
-
- if (!string.IsNullOrEmpty (bp.ConditionExpression)) {
- string res = EvaluateExpression (thread, bp.ConditionExpression, bp);
- if (bp.BreakIfConditionChanges) {
- if (res == binfo.LastConditionValue)
- return true;
- binfo.LastConditionValue = res;
- } else {
- if (res == null || res.ToLowerInvariant () != "true")
- return true;
- }
- }
- switch (bp.HitAction) {
- case HitAction.CustomAction:
- // If custom action returns true, execution must continue
- return binfo.RunCustomBreakpointAction (bp.CustomActionId);
- case HitAction.PrintExpression: {
- string exp = EvaluateTrace (thread, bp.TraceExpression);
- binfo.UpdateLastTraceValue (exp);
- return true;
- }
- case HitAction.Break:
- return false;
- }
- return false;
- }
-
- string EvaluateTrace (ThreadMirror thread, string exp)
- {
- var sb = new StringBuilder ();
- int last = 0;
- int i = exp.IndexOf ('{');
- while (i != -1) {
- if (i < exp.Length - 1 && exp [i+1] == '{') {
- sb.Append (exp.Substring (last, i - last + 1));
- last = i + 2;
- i = exp.IndexOf ('{', i + 2);
- continue;
- }
- int j = exp.IndexOf ('}', i + 1);
- if (j == -1)
- break;
- string se = exp.Substring (i + 1, j - i - 1);
- se = EvaluateExpression (thread, se, null);
- sb.Append (exp.Substring (last, i - last));
- sb.Append (se);
- last = j + 1;
- i = exp.IndexOf ('{', last);
- }
- sb.Append (exp.Substring (last, exp.Length - last));
- return sb.ToString ();
- }
-
- static SourceLocation GetSourceLocation (MDB.StackFrame frame)
- {
- return new SourceLocation (frame.Method.Name, frame.FileName, frame.LineNumber, frame.ColumnNumber);
- }
-
- static string FormatSourceLocation (Breakpoint bp)
- {
- if (string.IsNullOrEmpty (bp.FileName))
- return null;
-
- var location = Path.GetFileName (bp.FileName);
- if (bp.OriginalLine > 0) {
- location += ":" + bp.OriginalLine;
- if (bp.OriginalColumn > 0)
- location += "," + bp.OriginalColumn;
- }
-
- return location;
- }
-
- static bool IsBoolean (ValueReference vr)
- {
- if (vr.Type is Type && ((Type) vr.Type) == typeof (bool))
- return true;
-
- if (vr.Type is TypeMirror && ((TypeMirror) vr.Type).FullName == "System.Boolean")
- return true;
-
- return false;
- }
-
- string EvaluateExpression (ThreadMirror thread, string expression, Breakpoint bp)
- {
- try {
- var frames = thread.GetFrames ();
- if (frames.Length == 0)
- return string.Empty;
-
- EvaluationOptions ops = Options.EvaluationOptions.Clone ();
- ops.AllowTargetInvoke = true;
-
- var ctx = new SoftEvaluationContext (this, frames[0], ops);
-
- if (bp != null) {
- // validate conditional breakpoint expressions so that we can provide error reporting to the user
- var vr = ctx.Evaluator.ValidateExpression (ctx, expression);
- if (!vr.IsValid) {
- string message = string.Format ("Invalid expression in conditional breakpoint. {0}", vr.Message);
- string location = FormatSourceLocation (bp);
-
- if (!string.IsNullOrEmpty (location))
- message = location + ": " + message;
-
- OnDebuggerOutput (true, message);
- return string.Empty;
- }
-
- // resolve types...
- if (ctx.SourceCodeAvailable)
- expression = ctx.Evaluator.Resolve (this, GetSourceLocation (frames[0]), expression);
- }
-
- ValueReference val = ctx.Evaluator.Evaluate (ctx, expression);
- if (bp != null && !bp.BreakIfConditionChanges && !IsBoolean (val)) {
- string message = string.Format ("Expression in conditional breakpoint did not evaluate to a boolean value: {0}", bp.ConditionExpression);
- string location = FormatSourceLocation (bp);
-
- if (!string.IsNullOrEmpty (location))
- message = location + ": " + message;
-
- OnDebuggerOutput (true, message);
- return string.Empty;
- }
-
- return val.CreateObjectValue (false).Value;
- } catch (EvaluatorException ex) {
- string message;
-
- if (bp != null) {
- message = string.Format ("Failed to evaluate expression in conditional breakpoint. {0}", ex.Message);
- string location = FormatSourceLocation (bp);
-
- if (!string.IsNullOrEmpty (location))
- message = location + ": " + message;
- } else {
- message = ex.ToString ();
- }
-
- OnDebuggerOutput (true, message);
- return string.Empty;
- } catch (Exception ex) {
- OnDebuggerOutput (true, ex.ToString ());
- return string.Empty;
- }
- }
-
- void ProcessType (TypeMirror t)
- {
- string typeName = t.FullName;
-
- if (types.ContainsKey (typeName))
- return;
- types [typeName] = t;
-
- //get the source file paths
- //full paths, from GetSourceFiles (true), are only supported by sdb protocol 2.2 and later
- string[] sourceFiles;
- if (useFullPaths) {
- sourceFiles = t.GetSourceFiles (true);
- } else {
- sourceFiles = t.GetSourceFiles ();
-
- //HACK: if mdb paths are windows paths but the sdb agent is on unix, it won't map paths to filenames correctly
- if (IsWindows) {
- for (int i = 0; i < sourceFiles.Length; i++) {
- string s = sourceFiles[i];
- if (s != null && !s.StartsWith ("/", StringComparison.Ordinal))
- sourceFiles[i] = Path.GetFileName (s);
- }
- }
- }
-
- for (int n=0; n<sourceFiles.Length; n++)
- sourceFiles[n] = NormalizePath (sourceFiles[n]);
-
- foreach (string s in sourceFiles) {
- List<TypeMirror> typesList;
-
- if (source_to_type.TryGetValue (s, out typesList)) {
- typesList.Add (t);
- } else {
- typesList = new List<TypeMirror> ();
- typesList.Add (t);
- source_to_type[s] = typesList;
- }
- }
-
- type_to_source [t] = sourceFiles;
- }
-
- static string[] GetParamTypes (MethodMirror method)
- {
- List<string> paramTypes = new List<string> ();
-
- foreach (var param in method.GetParameters ())
- paramTypes.Add (param.ParameterType.CSharpName);
-
- return paramTypes.ToArray ();
- }
-
- string GetPrettyMethodName (MethodMirror method)
- {
- var name = new StringBuilder ();
-
- name.Append (Adaptor.GetDisplayTypeName (method.ReturnType.FullName));
- name.Append (" ");
- name.Append (Adaptor.GetDisplayTypeName (method.DeclaringType.FullName));
- name.Append (".");
- name.Append (method.Name);
-
- if (method.VirtualMachine.Version.AtLeast (2, 12)) {
- if (method.IsGenericMethodDefinition || method.IsGenericMethod) {
- name.Append ("<");
- if (method.VirtualMachine.Version.AtLeast (2, 15)) {
- var types = method.GetGenericArguments ();
- for (int i = 0; i < types.Length; i++) {
- if (i != 0)
- name.Append (", ");
- name.Append (Adaptor.GetDisplayTypeName (types[i].FullName));
- }
- }
- name.Append (">");
- }
- }
-
- name.Append (" (");
- var @params = method.GetParameters ();
- for (int i = 0; i < @params.Length; i++) {
- if (i != 0)
- name.Append (", ");
- if (@params[i].Attributes.HasFlag (ParameterAttributes.Out)) {
- if (@params[i].Attributes.HasFlag (ParameterAttributes.In))
- name.Append ("ref ");
- else
- name.Append ("out ");
- }
- name.Append (Adaptor.GetDisplayTypeName (@params[i].ParameterType.FullName));
- name.Append (" ");
- name.Append (@params[i].Name);
- }
- name.Append (")");
-
- return name.ToString ();
- }
-
- void ResolveBreakpoints (TypeMirror type)
- {
- var resolved = new List<BreakInfo> ();
- Location loc;
-
- ProcessType (type);
-
- // First, resolve FunctionBreakpoints
- foreach (var bi in pending_bes.Where (b => b.BreakEvent is FunctionBreakpoint)) {
- if (CheckTypeName (type, bi.TypeName)) {
- var bp = (FunctionBreakpoint) bi.BreakEvent;
- string methodName = bp.FunctionName.Substring (bi.TypeName.Length + 1);
-
- foreach (var method in type.GetMethodsByNameFlags (methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, false)) {
- if (!CheckMethodParams (method, bp.ParamTypes))
- continue;
-
- loc = GetLocFromMethod (method);
- if (loc != null) {
- string paramList = "(" + string.Join (", ", bp.ParamTypes ?? GetParamTypes (method)) + ")";
- OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint for '{0}{1}' to {2}:{3} [0x{4:x5}].\n",
- bp.FunctionName, paramList, loc.SourceFile, loc.LineNumber, loc.ILOffset));
-
- ResolvePendingBreakpoint (bi, loc);
-
- // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
- if (bp.ParamTypes != null && !type.IsGenericType && !IsGenericMethod (method))
- resolved.Add (bi);
- }
- }
- }
- }
-
- foreach (var be in resolved)
- pending_bes.Remove (be);
- resolved.Clear ();
-
- // Now resolve normal Breakpoints
- foreach (string s in type_to_source [type]) {
- foreach (var bi in pending_bes.Where (b => (b.BreakEvent is Breakpoint) && !(b.BreakEvent is FunctionBreakpoint))) {
- var bp = (Breakpoint) bi.BreakEvent;
- if (PathsAreEqual (PathToFileName (bp.FileName), s)) {
- bool insideLoadedRange;
- bool genericMethod;
-
- loc = GetLocFromType (type, s, bp.Line, bp.Column, out genericMethod, out insideLoadedRange);
- if (loc != null) {
- OnDebuggerOutput (false, string.Format ("Resolved pending breakpoint at '{0}:{1},{2}' to {3} [0x{4:x5}].\n",
- s, bp.Line, bp.Column, GetPrettyMethodName (loc.Method), loc.ILOffset));
- ResolvePendingBreakpoint (bi, loc);
-
- // Note: if the type or method is generic, there may be more instances so don't assume we are done resolving the breakpoint
- if (!genericMethod && !type.IsGenericType)
- resolved.Add (bi);
- } else {
- if (insideLoadedRange) {
- bi.SetStatus (BreakEventStatus.Invalid, null);
- }
- }
- }
- }
-
- foreach (var be in resolved)
- pending_bes.Remove (be);
- resolved.Clear ();
- }
-
- // Thirdly, resolve pending catchpoints
- foreach (var bi in pending_bes.Where (b => b.BreakEvent is Catchpoint)) {
- var cp = (Catchpoint) bi.BreakEvent;
- if (cp.ExceptionName == type.FullName) {
- ResolvePendingCatchpoint (bi, type);
- resolved.Add (bi);
- }
- }
-
- foreach (var be in resolved)
- pending_bes.Remove (be);
- }
-
- internal static string NormalizePath (string path)
- {
- if (!IsWindows && path.StartsWith ("\\", StringComparison.Ordinal))
- return path.Replace ('\\', '/');
-
- return path;
- }
-
- string PathToFileName (string path)
- {
- if (useFullPaths)
- return path;
-
- return Path.GetFileName (path);
- }
-
- [DllImport ("libc")]
- static extern IntPtr realpath (string path, IntPtr buffer);
-
- static string ResolveFullPath (string path)
- {
- if (IsWindows)
- return Path.GetFullPath (path);
-
- const int PATHMAX = 4096 + 1;
- IntPtr buffer = IntPtr.Zero;
-
- try {
- buffer = Marshal.AllocHGlobal (PATHMAX);
- var result = realpath (path, buffer);
- return result == IntPtr.Zero ? "" : Marshal.PtrToStringAuto (buffer);
- } finally {
- if (buffer != IntPtr.Zero)
- Marshal.FreeHGlobal (buffer);
- }
- }
-
- static bool PathsAreEqual (string p1, string p2)
- {
- if (PathComparer.Compare (p1, p2) == 0)
- return true;
-
- var rp1 = ResolveFullPath (p1);
- var rp2 = ResolveFullPath (p2);
-
- return PathComparer.Compare (rp1, rp2) == 0;
- }
-
- Location GetLocFromMethod (MethodMirror method)
- {
- // Return the location of the method.
- return method.Locations.Count > 0 ? method.Locations[0] : null;
- }
-
- bool CheckBetterMatch (TypeMirror type, string file, int line, Location found)
- {
- if (type.Assembly == null)
- return false;
-
- string assemblyFileName;
- if (!assemblyPathMap.TryGetValue (type.Assembly.GetName ().FullName, out assemblyFileName))
- assemblyFileName = type.Assembly.Location;
-
- if (assemblyFileName == null)
- return false;
-
- string mdbFileName = assemblyFileName + ".mdb";
- int foundDelta = found.LineNumber - line;
- MonoSymbolFile mdb;
- int fileId = -1;
-
- try {
- if (!symbolFiles.TryGetValue (mdbFileName, out mdb)) {
- if (!File.Exists (mdbFileName))
- return false;
-
- mdb = MonoSymbolFile.ReadSymbolFile (mdbFileName);
- symbolFiles.Add (mdbFileName, mdb);
- }
-
- foreach (var src in mdb.Sources) {
- if (src.FileName == file) {
- fileId = src.Index;
- break;
- }
- }
-
- if (fileId == -1)
- return false;
-
- foreach (var method in mdb.Methods) {
- var table = method.GetLineNumberTable ();
- foreach (var entry in table.LineNumbers) {
- if (entry.File != fileId)
- continue;
-
- if (entry.Row >= line && (entry.Row - line) < foundDelta)
- return true;
- }
- }
- } catch {
- }
-
- return false;
- }
-
- Location GetLocFromType (TypeMirror type, string file, int line, int column, out bool genericMethod, out bool insideTypeRange)
- {
- Location target_loc = null;
- bool fuzzy = true;
-
- insideTypeRange = false;
- genericMethod = false;
-
- //Console.WriteLine ("Trying to resolve {0}:{1},{2} in type {3}", file, line, column, type.Name);
- foreach (MethodMirror method in type.GetMethods ()) {
- List<Location> locations = new List<Location> ();
- int rangeFirstLine = int.MaxValue;
- int rangeLastLine = -1;
-
- foreach (Location location in method.Locations) {
- string srcFile = location.SourceFile;
-
- //Console.WriteLine ("\tExamining {0}:{1}...", srcFile, location.LineNumber);
-
- if (srcFile != null && PathsAreEqual (PathToFileName (NormalizePath (srcFile)), file)) {
- if (location.LineNumber < rangeFirstLine)
- rangeFirstLine = location.LineNumber;
-
- if (location.LineNumber > rangeLastLine)
- rangeLastLine = location.LineNumber;
-
- if (line >= rangeFirstLine && line <= rangeLastLine)
- insideTypeRange = true;
-
- if (location.LineNumber >= line && line >= rangeFirstLine) {
- if (target_loc != null) {
- if (location.LineNumber > line) {
- if (target_loc.LineNumber - line > location.LineNumber - line) {
- // Grab the location closest to the requested line
- //Console.WriteLine ("\t\tLocation is closest match. (ILOffset = 0x{0:x5})", location.ILOffset);
- locations.Clear ();
- locations.Add (location);
- target_loc = location;
- }
- } else if (target_loc.LineNumber != line) {
- // Previous match was a fuzzy match, but now we've found an exact line match
- //Console.WriteLine ("\t\tLocation is exact line match. (ILOffset = 0x{0:x5})", location.ILOffset);
- locations.Clear ();
- locations.Add (location);
- target_loc = location;
- fuzzy = false;
- } else {
- // Line number matches exactly, use the location with the lowest ILOffset
- if (location.ILOffset < target_loc.ILOffset)
- target_loc = location;
-
- locations.Add (location);
- fuzzy = false;
- }
- } else {
- //Console.WriteLine ("\t\tLocation is first possible match. (ILOffset = 0x{0:x5})", location.ILOffset);
- fuzzy = location.LineNumber != line;
- locations.Add (location);
- target_loc = location;
- }
- }
- } else {
- rangeFirstLine = int.MaxValue;
- rangeLastLine = -1;
- }
- }
-
- if (target_loc != null) {
- genericMethod = IsGenericMethod (method);
-
- // If we got a fuzzy match, then we need to make sure that there isn't a better
- // match in another method (e.g. code might have been extracted out into another
- // method by the compiler.
- if (!fuzzy) {
- // Exact line match... now find the best column match.
- locations.Sort (new LocationComparer ());
-
- // Find the closest-matching location based on column.
- target_loc = locations[0];
- for (int i = 1; i < locations.Count; i++) {
- if (locations[i].ColumnNumber > column)
- break;
-
- // if the column numbers match, then target_loc should have the lower ILOffset (which we want)
- if (target_loc.ColumnNumber == locations[i].ColumnNumber)
- continue;
-
- target_loc = locations[i];
- }
-
- return target_loc;
- }
- }
- }
-
- if (target_loc != null && fuzzy && CheckBetterMatch (type, file, line, target_loc)) {
- insideTypeRange = false;
- return null;
- }
-
- return target_loc;
- }
-
- void ResolvePendingBreakpoint (BreakInfo bi, Location l)
- {
- bi.Location = l;
- InsertBreakpoint ((Breakpoint) bi.BreakEvent, bi);
- bi.SetStatus (BreakEventStatus.Bound, null);
- }
-
- void ResolvePendingCatchpoint (BreakInfo bi, TypeMirror type)
- {
- InsertCatchpoint ((Catchpoint) bi.BreakEvent, bi, type);
- bi.SetStatus (BreakEventStatus.Bound, null);
- }
-
- bool UpdateAssemblyFilters (AssemblyMirror asm)
- {
- var name = asm.GetName ().FullName;
- bool found = false;
- if (userAssemblyNames != null) {
- //HACK: not sure how else to handle xsp-compiled pages
- if (name.StartsWith ("App_", StringComparison.Ordinal)) {
- found = true;
- } else {
- foreach (var n in userAssemblyNames) {
- if (n == name) {
- found = true;
- }
- }
- }
- }
-
- if (found) {
- assemblyFilters.Add (asm);
- return true;
- }
-
- return false;
- }
-
- internal void WriteDebuggerOutput (bool isError, string msg)
- {
- OnDebuggerOutput (isError, msg);
- }
-
- protected override void OnSetActiveThread (long processId, long threadId)
- {
- }
-
- protected override void OnStepInstruction ()
- {
- Step (StepDepth.Into, StepSize.Min);
- }
-
- protected override void OnStepLine ()
- {
- Step (StepDepth.Into, StepSize.Line);
- }
-
- protected override void OnStop ()
- {
- vm.Suspend ();
-
- //emit a stop event at the current position of the most recent thread
- //we use "getprocesses" instead of "ongetprocesses" because it attaches the process to the session
- //using private Mono.Debugging API, so our thread/backtrace calls will cache stuff that will get used later
- var process = GetProcesses () [0];
- EnsureRecentThreadIsValid (process);
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetStopped) {
- Process = process,
- Thread = GetThread (process, recent_thread),
- Backtrace = GetThreadBacktrace (recent_thread)});
- }
-
- void EnsureRecentThreadIsValid (ProcessInfo process)
- {
- var infos = process.GetThreads ();
-
- if (ThreadIsAlive (recent_thread) && HasUserFrame (GetId (recent_thread), infos))
- return;
-
- var threads = vm.GetThreads ();
- foreach (var thread in threads) {
- if (ThreadIsAlive (thread) && HasUserFrame (GetId (thread), infos)) {
- recent_thread = thread;
- return;
- }
- }
- recent_thread = threads[0];
- }
-
- long GetId (ThreadMirror thread)
- {
- long id;
- if (!localThreadIds.TryGetValue (thread.ThreadId, out id)) {
- id = localThreadIds.Count + 1;
- localThreadIds [thread.ThreadId] = id;
- }
- return id;
- }
-
- static bool ThreadIsAlive (ThreadMirror thread)
- {
- if (thread == null)
- return false;
- var state = thread.ThreadState;
- return state != ThreadState.Stopped && state != ThreadState.Aborted;
- }
-
- //we use the Mono.Debugging classes because they are cached
- bool HasUserFrame (long tid, ThreadInfo[] infos)
- {
- foreach (var t in infos) {
- if (t.Id != tid)
- continue;
- var bt = t.Backtrace;
- for (int i = 0; i < bt.FrameCount; i++) {
- var frame = bt.GetFrame (i);
- if (frame != null && !frame.IsExternalCode)
- return true;
- }
- return false;
- }
- return false;
- }
-
- public bool IsExternalCode (Mono.Debugger.Soft.StackFrame frame)
- {
- return frame.Method == null || string.IsNullOrEmpty (frame.FileName)
- || (assemblyFilters != null && !assemblyFilters.Contains (frame.Method.DeclaringType.Assembly));
- }
-
- public bool IsExternalCode (TypeMirror type)
- {
- return assemblyFilters != null && !assemblyFilters.Contains (type.Assembly);
- }
-
- protected override AssemblyLine[] OnDisassembleFile (string file)
- {
- List<TypeMirror> types;
- if (!source_to_type.TryGetValue (file, out types))
- return new AssemblyLine [0];
-
- var lines = new List<AssemblyLine> ();
- foreach (TypeMirror type in types) {
- foreach (MethodMirror met in type.GetMethods ()) {
- string srcFile = met.SourceFile != null ? NormalizePath (met.SourceFile) : null;
-
- if (srcFile == null || !PathsAreEqual (srcFile, file))
- continue;
-
- var body = met.GetMethodBody ();
- int lastLine = -1;
- int firstPos = lines.Count;
- string addrSpace = met.FullName;
-
- foreach (var ins in body.Instructions) {
- Location loc = met.LocationAtILOffset (ins.Offset);
- if (loc != null && lastLine == -1) {
- lastLine = loc.LineNumber;
- for (int n=firstPos; n<lines.Count; n++) {
- AssemblyLine old = lines [n];
- lines [n] = new AssemblyLine (old.Address, old.AddressSpace, old.Code, loc.LineNumber);
- }
- }
- lines.Add (new AssemblyLine (ins.Offset, addrSpace, Disassemble (ins), loc != null ? loc.LineNumber : lastLine));
- }
- }
- }
- lines.Sort (delegate (AssemblyLine a1, AssemblyLine a2) {
- int res = a1.SourceLine.CompareTo (a2.SourceLine);
- if (res != 0)
- return res;
-
- return a1.Address.CompareTo (a2.Address);
- });
- return lines.ToArray ();
- }
-
- public AssemblyLine[] Disassemble (Mono.Debugger.Soft.StackFrame frame, int firstLine, int count)
- {
- MethodBodyMirror body = frame.Method.GetMethodBody ();
- var instructions = body.Instructions;
- ILInstruction current = null;
- foreach (var ins in instructions) {
- if (ins.Offset >= frame.ILOffset) {
- current = ins;
- break;
- }
- }
- if (current == null)
- return new AssemblyLine [0];
-
- var result = new List<AssemblyLine> ();
-
- int pos = firstLine;
-
- while (firstLine < 0 && count > 0) {
- if (current.Previous == null) {
-// result.Add (new AssemblyLine (99999, "<" + (pos++) + ">"));
- result.Add (AssemblyLine.OutOfRange);
- count--;
- firstLine++;
- } else {
- current = current.Previous;
- firstLine++;
- }
- }
-
- while (current != null && firstLine > 0) {
- current = current.Next;
- firstLine--;
- }
-
- while (count > 0) {
- if (current != null) {
- Location loc = frame.Method.LocationAtILOffset (current.Offset);
- result.Add (new AssemblyLine (current.Offset, frame.Method.FullName, Disassemble (current), loc != null ? loc.LineNumber : -1));
- current = current.Next;
- pos++;
- } else
- result.Add (AssemblyLine.OutOfRange);
-// result.Add (new AssemblyLine (99999, "<" + (pos++) + ">"));
- count--;
- }
- return result.ToArray ();
- }
-
- static string EscapeString (string text)
- {
- StringBuilder sb = new StringBuilder ();
-
- sb.Append ('"');
- for (int i = 0; i < text.Length; i++) {
- char c = text[i];
- string txt;
- switch (c) {
- case '"': txt = "\\\""; break;
- case '\0': txt = @"\0"; break;
- case '\\': txt = @"\\"; break;
- case '\a': txt = @"\a"; break;
- case '\b': txt = @"\b"; break;
- case '\f': txt = @"\f"; break;
- case '\v': txt = @"\v"; break;
- case '\n': txt = @"\n"; break;
- case '\r': txt = @"\r"; break;
- case '\t': txt = @"\t"; break;
- default:
- if (char.GetUnicodeCategory (c) == UnicodeCategory.OtherNotAssigned) {
- sb.AppendFormat ("\\u{0:X4}", c);
- } else {
- sb.Append (c);
- }
- continue;
- }
- sb.Append (txt);
- }
- sb.Append ('"');
-
- return sb.ToString ();
- }
-
- string Disassemble (ILInstruction ins)
- {
- string oper;
- if (ins.Operand is MethodMirror)
- oper = ((MethodMirror)ins.Operand).FullName;
- else if (ins.Operand is TypeMirror)
- oper = ((TypeMirror)ins.Operand).FullName;
- else if (ins.Operand is ILInstruction)
- oper = ((ILInstruction)ins.Operand).Offset.ToString ("x8");
- else if (ins.Operand is string)
- oper = EscapeString ((string) ins.Operand);
- else if (ins.Operand == null)
- oper = string.Empty;
- else
- oper = ins.Operand.ToString ();
-
- return ins.OpCode + " " + oper;
- }
-
- readonly static bool IsWindows;
- readonly static bool IsMac;
- readonly static StringComparer PathComparer;
-
- static bool IgnoreFilenameCase {
- get {
- return IsMac || IsWindows;
- }
- }
-
- static SoftDebuggerSession ()
- {
- IsWindows = Path.DirectorySeparatorChar == '\\';
- IsMac = !IsWindows && IsRunningOnMac();
- PathComparer = (IgnoreFilenameCase)? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal;
- ThreadMirror.NativeTransitions = true;
- }
-
- //From Managed.Windows.Forms/XplatUI
- static bool IsRunningOnMac ()
- {
- IntPtr buf = IntPtr.Zero;
- try {
- buf = Marshal.AllocHGlobal (8192);
- // This is a hacktastic way of getting sysname from uname ()
- if (uname (buf) == 0) {
- string os = Marshal.PtrToStringAnsi (buf);
- if (os == "Darwin")
- return true;
- }
- } catch {
- } finally {
- if (buf != IntPtr.Zero)
- Marshal.FreeHGlobal (buf);
- }
- return false;
- }
-
- [System.Runtime.InteropServices.DllImport ("libc")]
- static extern int uname (IntPtr buf);
- }
-
- class LocationComparer : IComparer<Location>
- {
- public int Compare (Location loc0, Location loc1)
- {
- if (loc0.LineNumber < loc1.LineNumber)
- return -1;
- if (loc0.LineNumber > loc1.LineNumber)
- return 1;
-
- if (loc0.ColumnNumber < loc1.ColumnNumber)
- return -1;
- if (loc0.ColumnNumber > loc1.ColumnNumber)
- return 1;
-
- return loc0.ILOffset - loc1.ILOffset;
- }
- }
-
- class BreakInfo: BreakEventInfo
- {
- public Location Location;
- public List<EventRequest> Requests = new List<EventRequest> ();
- public string LastConditionValue;
- public string FileName;
- public string TypeName;
- }
-
- class DisconnectedException: DebuggerException
- {
- public DisconnectedException (Exception ex):
- base ("The connection with the debugger has been lost. The target application may have exited.", ex)
- {
- }
- }
-
- class DebugSocketException: DebuggerException
- {
- public DebugSocketException (Exception ex):
- base ("Could not open port for debugger. Another process may be using the port.", ex)
- {
- }
- }
-
- class ConnectionException : DebuggerException
- {
- public ConnectionException (Exception ex):
- base ("Could not connect to the debugger.", ex)
- {
- }
- }
-}
diff --git a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs b/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs
deleted file mode 100644
index 04ad760..0000000
--- a/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/SoftDebuggerStartInfo.cs
+++ /dev/null
@@ -1,206 +0,0 @@
-//
-// SoftDebuggerStartInfo.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc. (http://www.novell.com)
-//
-// 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 Mono.Debugging.Client;
-using System.Collections.Generic;
-using System.Reflection;
-using System.IO;
-using System.Net;
-using Mono.Debugger.Soft;
-
-namespace Mono.Debugging.Soft
-{
- public class SoftDebuggerStartInfo : DebuggerStartInfo
- {
- public SoftDebuggerStartInfo (string monoRuntimePrefix, Dictionary<string,string> monoRuntimeEnvironmentVariables)
- : this (new SoftDebuggerLaunchArgs (monoRuntimePrefix, monoRuntimeEnvironmentVariables))
- {
- }
-
- public SoftDebuggerStartInfo (SoftDebuggerStartArgs startArgs)
- {
- if (startArgs == null)
- throw new ArgumentNullException ("startArgs");
- this.StartArgs = startArgs;
- }
-
- /// <summary>
- /// Names of assemblies that are user code.
- /// </summary>
- public List<AssemblyName> UserAssemblyNames { get; set; }
-
- /// <summary>
- /// A mapping of AssemblyNames to their paths.
- /// </summary>
- public Dictionary<string, string> AssemblyPathMap { get; set; }
-
- /// <summary>
- /// The session will output this to the debug log as soon as it starts. It can be used to log warnings from
- /// creating the SoftDebuggerStartInfo
- /// </summary>
- public string LogMessage { get; set; }
-
- /// <summary>
- /// Args for starting the debugger connection.
- /// </summary>
- public SoftDebuggerStartArgs StartArgs { get; set; }
- }
-
- public interface ISoftDebuggerConnectionProvider
- {
- IAsyncResult BeginConnect (DebuggerStartInfo dsi, AsyncCallback callback);
- void EndConnect (IAsyncResult result, out VirtualMachine vm, out string appName);
- void CancelConnect (IAsyncResult result);
- bool ShouldRetryConnection (Exception ex);
- }
-
- public abstract class SoftDebuggerStartArgs
- {
- public SoftDebuggerStartArgs ()
- {
- MaxConnectionAttempts = 1;
- TimeBetweenConnectionAttempts = 500;
- }
-
- public abstract ISoftDebuggerConnectionProvider ConnectionProvider { get; }
-
- /// <summary>
- /// Maximum number of connection attempts. Zero or less means infinite attempts. Default is 1.
- /// </summary>
- public int MaxConnectionAttempts { get; set; }
-
- /// <summary>
- /// The time between connection attempts, in milliseconds. Default is 500.
- /// </summary>
- public int TimeBetweenConnectionAttempts { get; set; }
- }
-
- public abstract class SoftDebuggerRemoteArgs : SoftDebuggerStartArgs
- {
- public SoftDebuggerRemoteArgs (string appName, IPAddress address, int debugPort, int outputPort)
- {
- if (address == null)
- throw new ArgumentNullException ("address");
- if (debugPort < 0)
- throw new ArgumentException ("Debug port cannot be less than zero", "debugPort");
-
- this.AppName = appName;
- this.Address = address;
- this.DebugPort = debugPort;
- this.OutputPort = outputPort;
- }
-
- /// <summary>
- /// The IP address for the connection.
- /// </summary>
- public IPAddress Address { get; private set; }
-
- /// <summary>
- /// Port for the debugger connection. Zero means random port.
- /// </summary>
- public int DebugPort { get; private set; }
-
- /// <summary>
- /// Port for the console connection. Zero means random port, less than zero means that output is not redirected.
- /// </summary>
- public int OutputPort { get; private set; }
-
- /// <summary>
- /// Application name that will be shown in the debugger.
- /// </summary>
- public string AppName { get; private set; }
-
- public bool RedirectOutput { get { return OutputPort >= 0; } }
- }
-
- /// <summary>
- /// Args for the debugger to listen for an incoming connection from a debuggee.
- /// </summary>
- public sealed class SoftDebuggerListenArgs : SoftDebuggerRemoteArgs
- {
- public SoftDebuggerListenArgs (string appName, IPAddress address, int debugPort)
- : this (appName, address, debugPort, -1) {}
-
- public SoftDebuggerListenArgs (string appName, IPAddress address, int debugPort, int outputPort)
- : base (appName, address, debugPort, outputPort)
- {
- }
-
- public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
- }
-
- /// <summary>
- /// Args for the debugger to connect to target that is listening.
- /// </summary>
- public sealed class SoftDebuggerConnectArgs : SoftDebuggerRemoteArgs
- {
- public SoftDebuggerConnectArgs (string appName, IPAddress address, int debugPort)
- : this (appName, address, debugPort, -1) {}
-
- public SoftDebuggerConnectArgs (string appName, IPAddress address, int debugPort, int outputPort)
- : base (appName, address, debugPort, outputPort)
- {
- if (debugPort == 0)
- throw new ArgumentException ("Debug port cannot be zero when connecting", "debugPort");
- if (outputPort == 0)
- throw new ArgumentException ("Output port cannot be zero when connecting", "outputPort");
- }
-
- public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
- }
-
- /// <summary>
- /// Options for the debugger to start a process directly.
- /// </summary>
- public sealed class SoftDebuggerLaunchArgs : SoftDebuggerStartArgs
- {
- public SoftDebuggerLaunchArgs (string monoRuntimePrefix, Dictionary<string,string> monoRuntimeEnvironmentVariables)
- {
- if (string.IsNullOrEmpty (monoRuntimePrefix))
- throw new ArgumentException ("monoRuntimePrefix");
-
- this.MonoRuntimePrefix = monoRuntimePrefix;
- this.MonoRuntimeEnvironmentVariables = monoRuntimeEnvironmentVariables;
- }
-
- /// <summary>
- /// Prefix into which the target Mono runtime is installed.
- /// </summary>
- public string MonoRuntimePrefix { get; private set; }
-
- /// <summary>
- /// Environment variables for the Mono runtime.
- /// </summary>
- public Dictionary<string,string> MonoRuntimeEnvironmentVariables { get; private set; }
-
- /// <summary>
- /// Launcher for the external console. May be null if the app does not run on an external console.
- /// </summary>
- public Mono.Debugger.Soft.LaunchOptions.TargetProcessLauncher ExternalConsoleLauncher { get; set; }
-
- public override ISoftDebuggerConnectionProvider ConnectionProvider { get { return null; } }
- }
-}
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile.in b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile.in
index db683ad..61ee841 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile.in
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Manifest.addin.xml b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Manifest.addin.xml
index b958b76..4109d1a 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Manifest.addin.xml
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/Manifest.addin.xml
@@ -5,13 +5,13 @@
description = "Mono Soft Debugger Support for ASP.NET"
copyright = "MIT X11"
category = "Debugging"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="MonoDevelop.Core" version="4.0.5"/>
- <Addin id="MonoDevelop.Debugger" version="4.0.5"/>
- <Addin id="MonoDevelop.AspNet" version="4.0.5"/>
- <Addin id="MonoDevelop.Debugger.Soft" version="4.0.5"/>
+ <Addin id="MonoDevelop.Core" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger" version="4.0.12"/>
+ <Addin id="MonoDevelop.AspNet" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger.Soft" version="4.0.12"/>
</Dependencies>
<Extension path="/MonoDevelop/Debugging/DebuggerEngines">
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
index ef0ca39..d4cde03 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/MonoDevelop.Debugger.Soft.AspNet.csproj
@@ -52,11 +52,6 @@
<Name>MonoDevelop.Core</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
<Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project>
<Name>Mono.TextEditor</Name>
@@ -77,16 +72,6 @@
<Name>MonoDevelop.Ide</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
- <Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
- <Name>Mono.Debugging.Soft</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\contrib\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
- <Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
- <Name>Mono.Debugger.Soft</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\Deployment\MonoDevelop.Deployment\MonoDevelop.Deployment.csproj">
<Project>{9BC670A8-1851-40EC-9685-279F4C98433D}</Project>
<Name>MonoDevelop.Deployment</Name>
@@ -107,6 +92,21 @@
<Name>MonoDevelop.SourceEditor</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
+ <Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
+ <Name>Mono.Debugging.Soft</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
+ <Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
+ <Name>Mono.Debugger.Soft</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AspNetSoftDebuggerEngine.cs" />
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.Manifest.addin.xml b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.Manifest.addin.xml
new file mode 100644
index 0000000..4109d1a
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.Manifest.addin.xml
@@ -0,0 +1,24 @@
+<Addin id = "MonoDevelop.Debugger.Soft.AspNet"
+ name = "Mono Soft Debugger Support for ASP.NET"
+ author = "Michael Hutchinson"
+ url = "http://www.mono-project.com"
+ description = "Mono Soft Debugger Support for ASP.NET"
+ copyright = "MIT X11"
+ category = "Debugging"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="MonoDevelop.Core" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger" version="4.0.12"/>
+ <Addin id="MonoDevelop.AspNet" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger.Soft" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path="/MonoDevelop/Debugging/DebuggerEngines">
+ <DebuggerEngine
+ id="Mono.Debugger.Soft.AspNet"
+ name="Mono Soft Debugger for ASP.NET"
+ features="Breakpoints, Pause, Stepping, DebugFile, ConditionalBreakpoints, Tracepoints, Catchpoints, Disassembly"
+ type="MonoDevelop.Debugger.Soft.AspNet.AspNetSoftDebuggerEngine" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..d93c1d2
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.Manifest.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.AspNet/obj/Debug/MonoDevelop.Debugger.Soft.AspNet.dll.mdb
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile.in b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile.in
index 05569e0..7698dfb 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile.in
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Manifest.addin.xml b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Manifest.addin.xml
index c79dd3c..1d2936a 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Manifest.addin.xml
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/Manifest.addin.xml
@@ -5,11 +5,11 @@
description = "Mono Soft Debugger Support"
copyright = "MIT X11"
category = "Debugging"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="MonoDevelop.Core" version="4.0.5"/>
- <Addin id="MonoDevelop.Debugger" version="4.0.5"/>
+ <Addin id="MonoDevelop.Core" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger" version="4.0.12"/>
</Dependencies>
<Runtime>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.csproj b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.csproj
index b303baf..fe2e826 100644
--- a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.csproj
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.csproj
@@ -49,11 +49,6 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
<Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project>
<Name>Mono.TextEditor</Name>
@@ -74,20 +69,23 @@
<Name>MonoDevelop.Core</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
+ <ProjectReference Include="..\..\..\..\external\cecil\Mono.Cecil.csproj">
+ <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
+ <Name>Mono.Cecil</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
<Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
<Name>Mono.Debugging.Soft</Name>
- <Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\..\contrib\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugger.Soft\Mono.Debugger.Soft.csproj">
<Project>{372E8E3E-29D5-4B4D-88A2-4711CD628C4E}</Project>
<Name>Mono.Debugger.Soft</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\..\external\cecil\Mono.Cecil.csproj">
- <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
- <Name>Mono.Cecil</Name>
- <Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.Manifest.addin.xml b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.Manifest.addin.xml
new file mode 100644
index 0000000..1d2936a
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.Manifest.addin.xml
@@ -0,0 +1,35 @@
+<Addin id = "MonoDevelop.Debugger.Soft"
+ name = "Mono Soft Debugger Support"
+ author = "Lluis Sanchez"
+ url = "http://www.mono-project.com/Soft_Debugger"
+ description = "Mono Soft Debugger Support"
+ copyright = "MIT X11"
+ category = "Debugging"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="MonoDevelop.Core" version="4.0.12"/>
+ <Addin id="MonoDevelop.Debugger" version="4.0.12"/>
+ </Dependencies>
+
+ <Runtime>
+ <Import assembly="Mono.Debugging.Soft.dll" />
+ <Import assembly="Mono.Debugger.Soft.dll" />
+ </Runtime>
+
+ <Extension path="/MonoDevelop/Debugging/DebuggerEngines">
+ <DebuggerEngine
+ id="Mono.Debugger.Soft"
+ name="Mono Soft Debugger"
+ features="Breakpoints, Pause, Stepping, DebugFile, ConditionalBreakpoints, Tracepoints, Catchpoints, Disassembly"
+ type="MonoDevelop.Debugger.Soft.SoftDebuggerEngine" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Debugging/DebuggerEngines">
+ <DebuggerEngine
+ id="Mono.Debugger.Soft.Custom"
+ name="Custom Command Mono Soft Debugger"
+ features="Breakpoints, Pause, Stepping, DebugFile, ConditionalBreakpoints, Tracepoints, Catchpoints, Disassembly"
+ type="MonoDevelop.Debugger.Soft.CustomSoftDebuggerEngine" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..6a39553
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.Manifest.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/obj/Debug/MonoDevelop.Debugger.Soft.dll.mdb
diff --git a/src/addins/MonoDevelop.Debugger/Makefile.in b/src/addins/MonoDevelop.Debugger/Makefile.in
index 69af538..858d577 100644
--- a/src/addins/MonoDevelop.Debugger/Makefile.in
+++ b/src/addins/MonoDevelop.Debugger/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -253,6 +252,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/obj/Debug/MonoDevelop.Debugger.Tests.TestApp.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/obj/Debug/MonoDevelop.Debugger.Tests.TestApp.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..7688df3
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/obj/Debug/MonoDevelop.Debugger.Tests.TestApp.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.Debugger.Tests.TestApp.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.Debugger.Tests.TestApp.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/obj/Debug/MonoDevelop.Debugger.Tests.TestApp.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests.TestApp/obj/Debug/MonoDevelop.Debugger.Tests.TestApp.exe.mdb
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/MonoDevelop.Debugger.Tests.csproj b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/MonoDevelop.Debugger.Tests.csproj
index b5fac57..2ab3713 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/MonoDevelop.Debugger.Tests.csproj
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/MonoDevelop.Debugger.Tests.csproj
@@ -9,6 +9,8 @@
<OutputType>Library</OutputType>
<RootNamespace>MonoDevelop.Debugger.Tests</RootNamespace>
<AssemblyName>MonoDevelop.Debugger.Tests</AssemblyName>
+ <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
@@ -31,9 +33,11 @@
<Reference Include="System.Core" />
<Reference Include="nunit.core">
<HintPath>..\..\NUnit\lib\nunit.core.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\NUnit\lib\nunit.framework.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -56,11 +60,6 @@
<Name>UnitTests</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
<Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
<Name>MonoDevelop.Core</Name>
@@ -89,6 +88,12 @@
<ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj">
<Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project>
<Name>Mono.Addins</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/obj/Debug/MonoDevelop.Debugger.Tests.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/obj/Debug/MonoDevelop.Debugger.Tests.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..cc1002f
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/obj/Debug/MonoDevelop.Debugger.Tests.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.Debugger.Tests.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.Debugger.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/obj/Debug/MonoDevelop.Debugger.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.Tests/obj/Debug/MonoDevelop.Debugger.Tests.dll.mdb
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml
index d1720e7..ea673c9 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.addin.xml
@@ -6,11 +6,11 @@
description = "Support for Debugging projects"
copyright = "MIT X11"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path="/MonoDevelop/Debugging/DebuggerEngines">
@@ -211,7 +211,7 @@
</Extension>
<Extension path = "/MonoDevelop/Core/ExecutionModes">
- <ModeSetType class="MonoDevelop.Debugger.DebugExecutionModeSet"/>
+ <ModeSetType id="MonoDevelop.Debugger" class="MonoDevelop.Debugger.DebugExecutionModeSet"/>
</Extension>
<Extension path = "/MonoDevelop/Core/StockIcons">
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
index d9f8a73..9c59aa4 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
@@ -67,11 +67,6 @@
<Name>MonoDevelop.Ide</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
<Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project>
<Name>Mono.TextEditor</Name>
@@ -92,6 +87,11 @@
<Name>Xwt</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -203,6 +203,12 @@
<EmbeddedResource Include="icons\MonoDevelop.Close.Selected.png">
<LogicalName>MonoDevelop.Close.Selected.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\exception-icon.png">
+ <LogicalName>exception-icon.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\exception-icon%402x.png">
+ <LogicalName>exception-icon at 2x.png</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs
index 262cd3a..1b7865d 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/AttachToProcessDialog.cs
@@ -37,26 +37,55 @@ namespace MonoDevelop.Debugger
public partial class AttachToProcessDialog : Gtk.Dialog
{
List<DebuggerEngine> currentDebEngines;
- Dictionary<long, List<DebuggerEngine>> procEngines = new Dictionary<long,List<DebuggerEngine>> ();
- List<ProcessInfo> procs = new List<ProcessInfo> ();
+ Dictionary<long, List<DebuggerEngine>> procEngines;
+ List<ProcessInfo> procs;
Gtk.ListStore store;
TreeViewState state;
-
+ uint timeoutHandler;
+
public AttachToProcessDialog()
{
this.Build();
-
+
store = new Gtk.ListStore (typeof(ProcessInfo), typeof(string), typeof(string));
tree.Model = store;
tree.AppendColumn ("PID", new Gtk.CellRendererText (), "text", 1);
tree.AppendColumn ("Process Name", new Gtk.CellRendererText (), "text", 2);
-
- DebuggerEngine[] debEngines = DebuggingService.GetDebuggerEngines ();
- foreach (DebuggerEngine de in debEngines) {
+
+ state = new TreeViewState (tree, 1);
+
+ Refresh ();
+
+ comboDebs.Sensitive = false;
+ buttonOk.Sensitive = false;
+ tree.Selection.UnselectAll ();
+ tree.Selection.Changed += OnSelectionChanged;
+
+ Gtk.TreeIter it;
+ if (store.GetIterFirst (out it))
+ tree.Selection.SelectIter (it);
+
+ timeoutHandler = GLib.Timeout.Add (3000, Refresh);
+ }
+
+ public override void Destroy ()
+ {
+ if (timeoutHandler != 0)
+ GLib.Source.Remove (timeoutHandler);
+ base.Destroy ();
+ }
+
+ bool Refresh ()
+ {
+ procEngines = new Dictionary<long,List<DebuggerEngine>> ();
+ procs = new List<ProcessInfo> ();
+
+ foreach (DebuggerEngine de in DebuggingService.GetDebuggerEngines ()) {
if ((de.SupportedFeatures & DebuggerFeatures.Attaching) == 0)
continue;
try {
- foreach (ProcessInfo pi in de.GetAttachableProcesses ()) {
+ var infos = de.GetAttachableProcesses ();
+ foreach (ProcessInfo pi in infos) {
List<DebuggerEngine> engs;
if (!procEngines.TryGetValue (pi.Id, out engs)) {
engs = new List<DebuggerEngine> ();
@@ -66,50 +95,39 @@ namespace MonoDevelop.Debugger
engs.Add (de);
}
} catch (Exception ex) {
- LoggingService.LogError ("Could not get attachablbe processes.", ex);
+ LoggingService.LogError ("Could not get attachable processes.", ex);
}
comboDebs.AppendText (de.Name);
}
-
- state = new TreeViewState (tree, 1);
-
- FillList ();
-
- comboDebs.Sensitive = false;
- buttonOk.Sensitive = false;
- tree.Selection.Changed += OnSelectionChanged;
-
- Gtk.TreeIter it;
- if (store.GetIterFirst (out it))
- tree.Selection.SelectIter (it);
- OnSelectionChanged (null, null);
+ FillList ();
+ return true;
}
-
+
void FillList ()
{
state.Save ();
-
+
store.Clear ();
string filter = entryFilter.Text;
foreach (ProcessInfo pi in procs) {
if (filter.Length == 0 || pi.Id.ToString().Contains (filter) || pi.Name.Contains (filter))
store.AppendValues (pi, pi.Id.ToString (), pi.Name);
}
-
+
state.Load ();
-
+
if (tree.Selection.CountSelectedRows () == 0) {
Gtk.TreeIter it;
if (store.GetIterFirst (out it))
tree.Selection.SelectIter (it);
}
}
-
+
void OnSelectionChanged (object s, EventArgs args)
{
((Gtk.ListStore)comboDebs.Model).Clear ();
-
+
Gtk.TreeIter iter;
if (tree.Selection.GetSelected (out iter)) {
ProcessInfo pi = (ProcessInfo) store.GetValue (iter, 0);
@@ -131,7 +149,12 @@ namespace MonoDevelop.Debugger
{
FillList ();
}
-
+
+ protected virtual void OnRowActivated (object o, Gtk.RowActivatedArgs args)
+ {
+ Respond (Gtk.ResponseType.Ok);
+ }
+
public ProcessInfo SelectedProcess {
get {
Gtk.TreeIter iter;
@@ -139,7 +162,7 @@ namespace MonoDevelop.Debugger
return (ProcessInfo) store.GetValue (iter, 0);
}
}
-
+
public DebuggerEngine SelectedDebugger {
get {
return currentDebEngines [comboDebs.Active];
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
index 9c60130..ecd8486 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
@@ -42,7 +42,7 @@ namespace MonoDevelop.Debugger
{
public class BreakpointPad : IPadContent
{
- BreakpointStore bps;
+ BreakpointStore breakpoints;
PadTreeView tree;
Gtk.TreeStore store;
@@ -155,7 +155,7 @@ namespace MonoDevelop.Debugger
control.ShowAll ();
- bps = DebuggingService.Breakpoints;
+ breakpoints = DebuggingService.Breakpoints;
UpdateDisplay ();
@@ -164,10 +164,10 @@ namespace MonoDevelop.Debugger
breakpointAddedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointAdded);
breakpointChangedHandler = DispatchService.GuiDispatch<EventHandler> (OnBreakpointChanged);
- DebuggingService.Breakpoints.BreakpointAdded += breakpointAddedHandler;
- DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
- DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
- DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler;
+ breakpoints.BreakpointAdded += breakpointAddedHandler;
+ breakpoints.BreakpointRemoved += breakpointRemovedHandler;
+ breakpoints.Changed += breakpointChangedHandler;
+ breakpoints.BreakpointUpdated += breakpointUpdatedHandler;
DebuggingService.PausedEvent += OnDebuggerStatusCheck;
DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
@@ -182,10 +182,10 @@ namespace MonoDevelop.Debugger
public void Dispose ()
{
- DebuggingService.Breakpoints.BreakpointAdded -= breakpointAddedHandler;
- DebuggingService.Breakpoints.BreakpointRemoved -= breakpointRemovedHandler;
- DebuggingService.Breakpoints.Changed -= breakpointChangedHandler;
- DebuggingService.Breakpoints.BreakpointUpdated -= breakpointUpdatedHandler;
+ breakpoints.BreakpointAdded -= breakpointAddedHandler;
+ breakpoints.BreakpointRemoved -= breakpointRemovedHandler;
+ breakpoints.Changed -= breakpointChangedHandler;
+ breakpoints.BreakpointUpdated -= breakpointUpdatedHandler;
DebuggingService.PausedEvent -= OnDebuggerStatusCheck;
DebuggingService.ResumedEvent -= OnDebuggerStatusCheck;
@@ -213,7 +213,7 @@ namespace MonoDevelop.Debugger
[CommandHandler (DebugCommands.EnableDisableBreakpoint)]
protected void OnEnableDisable ()
{
- DebuggingService.Breakpoints.Changed -= breakpointChangedHandler;
+ breakpoints.Changed -= breakpointChangedHandler;
try {
bool enable = false;
@@ -245,7 +245,7 @@ namespace MonoDevelop.Debugger
store.SetValue (iter, (int) Columns.Selected, enable);
}
} finally {
- DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
+ breakpoints.Changed += breakpointChangedHandler;
}
}
@@ -266,7 +266,7 @@ namespace MonoDevelop.Debugger
{
bool deleted = false;
- DebuggingService.Breakpoints.BreakpointRemoved -= breakpointRemovedHandler;
+ breakpoints.BreakpointRemoved -= breakpointRemovedHandler;
try {
// Note: since we'll be modifying the list of breakpoints, we need to sort
@@ -281,11 +281,12 @@ namespace MonoDevelop.Debugger
continue;
var bp = (Breakpoint) store.GetValue (iter, (int) Columns.Breakpoint);
- bps.Remove (bp);
+ lock (breakpoints)
+ breakpoints.Remove (bp);
deleted = true;
}
} finally {
- DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
+ breakpoints.BreakpointRemoved += breakpointRemovedHandler;
}
return deleted;
@@ -352,7 +353,7 @@ namespace MonoDevelop.Debugger
void ItemToggled (object o, ToggledArgs args)
{
- DebuggingService.Breakpoints.Changed -= breakpointChangedHandler;
+ breakpoints.Changed -= breakpointChangedHandler;
try {
TreeIter iter;
@@ -365,7 +366,7 @@ namespace MonoDevelop.Debugger
store.SetValue (iter, (int) Columns.Selected, bp.Enabled);
}
} finally {
- DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
+ breakpoints.Changed += breakpointChangedHandler;
}
}
@@ -377,30 +378,33 @@ namespace MonoDevelop.Debugger
treeState.Save ();
store.Clear ();
- if (bps != null) {
- foreach (Breakpoint bp in bps.GetBreakpoints ()) {
- string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString () : "";
- string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
- string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
- string name;
-
- if (bp is FunctionBreakpoint) {
- FunctionBreakpoint fb = (FunctionBreakpoint) bp;
-
- if (fb.ParamTypes != null)
- name = fb.FunctionName + "(" + string.Join (", ", fb.ParamTypes) + ")";
+ if (breakpoints != null) {
+ lock (breakpoints) {
+ foreach (Breakpoint bp in breakpoints.GetBreakpoints ()) {
+ string hitCount = bp.HitCountMode != HitCountMode.None ? bp.CurrentHitCount.ToString () : "";
+ string traceExp = bp.HitAction == HitAction.PrintExpression ? bp.TraceExpression : "";
+ string traceVal = bp.HitAction == HitAction.PrintExpression ? bp.LastTraceValue : "";
+ string name;
+
+ if (bp is FunctionBreakpoint) {
+ FunctionBreakpoint fb = (FunctionBreakpoint) bp;
+
+ if (fb.ParamTypes != null)
+ name = fb.FunctionName + "(" + string.Join (", ", fb.ParamTypes) + ")";
+ else
+ name = fb.FunctionName;
+ } else {
+ name = string.Format ("{0}:{1},{2}", ((Breakpoint) bp).FileName, bp.Line, bp.Column);
+ }
+
+ if (bp.Enabled)
+ store.AppendValues ("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
else
- name = fb.FunctionName;
- } else {
- name = string.Format ("{0}:{1},{2}", ((Breakpoint) bp).FileName, bp.Line, bp.Column);
+ store.AppendValues ("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
}
-
- if (bp.Enabled)
- store.AppendValues ("md-breakpoint", true, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
- else
- store.AppendValues ("md-breakpoint-disabled", false, name, bp, bp.ConditionExpression, traceExp, hitCount, traceVal);
}
}
+
treeState.Load ();
}
@@ -441,7 +445,7 @@ namespace MonoDevelop.Debugger
void OnDebuggerStatusCheck (object s, EventArgs a)
{
if (control != null)
- control.Sensitive = !DebuggingService.Breakpoints.IsReadOnly;
+ control.Sensitive = !breakpoints.IsReadOnly;
}
void OnRowActivated (object o, Gtk.RowActivatedArgs args)
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs
index a27d1ad..0927f64 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugCommands.cs
@@ -382,12 +382,19 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
- DebuggingService.Breakpoints.Clear ();
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints)
+ breakpoints.Clear ();
}
protected override void Update (CommandInfo info)
{
- info.Enabled = !DebuggingService.Breakpoints.IsReadOnly && DebuggingService.Breakpoints.Count > 0;
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints)
+ info.Enabled = !breakpoints.IsReadOnly && breakpoints.Count > 0;
+
info.Visible = DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
}
}
@@ -396,10 +403,11 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
- var bp = DebuggingService.Breakpoints.Toggle (
- IdeApp.Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Column);
+ var breakpoints = DebuggingService.Breakpoints;
+ Breakpoint bp;
+
+ lock (breakpoints)
+ bp = breakpoints.Toggle (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line, IdeApp.Workbench.ActiveDocument.Editor.Caret.Column);
// If the breakpoint could not be inserted in the caret location, move the caret
// to the real line of the breakpoint, so that if the Toggle command is run again,
@@ -441,27 +449,28 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
- IEnumerable brs = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp.Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line);
-
- foreach (Breakpoint bp in brs)
- bp.Enabled = !bp.Enabled;
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints) {
+ foreach (var bp in breakpoints.GetBreakpointsAtFileLine (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line))
+ bp.Enabled = !bp.Enabled;
+ }
}
protected override void Update (CommandInfo info)
{
+ var breakpoints = DebuggingService.Breakpoints;
+
info.Visible = DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
if (IdeApp.Workbench.ActiveDocument != null &&
- IdeApp.Workbench.ActiveDocument.Editor != null &&
- IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
- !DebuggingService.Breakpoints.IsReadOnly) {
- info.Enabled = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp. Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
- }
- else
+ IdeApp.Workbench.ActiveDocument.Editor != null &&
+ IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
+ !breakpoints.IsReadOnly) {
+ lock (breakpoints)
+ info.Enabled = breakpoints.GetBreakpointsAtFileLine (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
+ } else {
info.Enabled = false;
+ }
}
}
@@ -469,23 +478,29 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
+ var breakpoints = DebuggingService.Breakpoints;
bool enable = false;
- foreach (BreakEvent bp in DebuggingService.Breakpoints) {
- if (!bp.Enabled) {
- enable = true;
- break;
+ lock (breakpoints) {
+ foreach (BreakEvent bp in breakpoints) {
+ if (!bp.Enabled) {
+ enable = true;
+ break;
+ }
}
- }
- foreach (BreakEvent bp in DebuggingService.Breakpoints) {
- bp.Enabled = enable;
+ foreach (BreakEvent bp in breakpoints) {
+ bp.Enabled = enable;
+ }
}
}
protected override void Update (CommandInfo info)
{
- info.Enabled = !DebuggingService.Breakpoints.IsReadOnly && DebuggingService.Breakpoints.Count > 0;
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints)
+ info.Enabled = !breakpoints.IsReadOnly && breakpoints.Count > 0;
info.Visible = DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
}
}
@@ -507,28 +522,33 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
- IEnumerable<Breakpoint> brs = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp.Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line);
-
- List<Breakpoint> list = new List<Breakpoint> (brs);
- foreach (Breakpoint bp in list)
- DebuggingService.Breakpoints.Remove (bp);
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints) {
+ IEnumerable<Breakpoint> brs = breakpoints.GetBreakpointsAtFileLine (
+ IdeApp.Workbench.ActiveDocument.FileName,
+ IdeApp.Workbench.ActiveDocument.Editor.Caret.Line);
+
+ List<Breakpoint> list = new List<Breakpoint> (brs);
+ foreach (Breakpoint bp in list)
+ breakpoints.Remove (bp);
+ }
}
protected override void Update (CommandInfo info)
{
+ var breakpoints = DebuggingService.Breakpoints;
+
info.Visible = DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
if (IdeApp.Workbench.ActiveDocument != null &&
- IdeApp.Workbench.ActiveDocument.Editor != null &&
- IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
- !DebuggingService.Breakpoints.IsReadOnly) {
- info.Enabled = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp. Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
- }
- else
+ IdeApp.Workbench.ActiveDocument.Editor != null &&
+ IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
+ !breakpoints.IsReadOnly) {
+ lock (breakpoints)
+ info.Enabled = breakpoints.GetBreakpointsAtFileLine (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
+ } else {
info.Enabled = false;
+ }
}
}
@@ -537,8 +557,12 @@ namespace MonoDevelop.Debugger
protected override void Run ()
{
Breakpoint bp = new Breakpoint (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line, IdeApp.Workbench.ActiveDocument.Editor.Caret.Column);
- if (DebuggingService.ShowBreakpointProperties (bp, true))
- DebuggingService.Breakpoints.Add (bp);
+ if (DebuggingService.ShowBreakpointProperties (bp, true)) {
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints)
+ breakpoints.Add (bp);
+ }
}
protected override void Update (CommandInfo info)
@@ -549,9 +573,9 @@ namespace MonoDevelop.Debugger
IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
!DebuggingService.Breakpoints.IsReadOnly) {
info.Enabled = true;
- }
- else
+ } else {
info.Enabled = false;
+ }
}
}
@@ -560,8 +584,12 @@ namespace MonoDevelop.Debugger
protected override void Run ()
{
FunctionBreakpoint bp = new FunctionBreakpoint ("", "C#");
- if (DebuggingService.ShowBreakpointProperties (bp, true))
- DebuggingService.Breakpoints.Add (bp);
+ if (DebuggingService.ShowBreakpointProperties (bp, true)) {
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints)
+ breakpoints.Add (bp);
+ }
}
protected override void Update (CommandInfo info)
@@ -575,27 +603,33 @@ namespace MonoDevelop.Debugger
{
protected override void Run ()
{
- IList<Breakpoint> brs = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp.Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line);
+ var breakpoints = DebuggingService.Breakpoints;
+ IList<Breakpoint> brs;
+
+ lock (breakpoints) {
+ brs = breakpoints.GetBreakpointsAtFileLine (
+ IdeApp.Workbench.ActiveDocument.FileName,
+ IdeApp.Workbench.ActiveDocument.Editor.Caret.Line);
+ }
if (brs.Count > 0)
- DebuggingService.ShowBreakpointProperties (brs [0], false);
+ DebuggingService.ShowBreakpointProperties (brs[0], false);
}
protected override void Update (CommandInfo info)
{
+ var breakpoints = DebuggingService.Breakpoints;
+
info.Visible = DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints);
if (IdeApp.Workbench.ActiveDocument != null &&
- IdeApp.Workbench.ActiveDocument.Editor != null &&
- IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
- !DebuggingService.Breakpoints.IsReadOnly) {
- info.Enabled = DebuggingService.Breakpoints.GetBreakpointsAtFileLine (
- IdeApp. Workbench.ActiveDocument.FileName,
- IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
- }
- else
+ IdeApp.Workbench.ActiveDocument.Editor != null &&
+ IdeApp.Workbench.ActiveDocument.FileName != FilePath.Null &&
+ !breakpoints.IsReadOnly) {
+ lock (breakpoints)
+ info.Enabled = breakpoints.GetBreakpointsAtFileLine (IdeApp.Workbench.ActiveDocument.FileName, IdeApp.Workbench.ActiveDocument.Editor.Caret.Line).Count > 0;
+ } else {
info.Enabled = false;
+ }
}
}
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugTextMarker.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugTextMarker.cs
index 8bb94b8..bad40ef 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugTextMarker.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebugTextMarker.cs
@@ -57,12 +57,18 @@ namespace MonoDevelop.Debugger
this.editor = editor;
}
+ public bool CanDrawBackground { get { return false; } }
- public override void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
+ public void DrawBackground (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override void Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
if (!(this is CurrentDebugLineTextMarker) && LineSegment.Markers.Any (m => m is CurrentDebugLineTextMarker))
return;
- base.Draw (editor, cr, layout, selected, startOffset, endOffset, y, startXPos, endXPos);
+ base.Draw (editor, cr, y, metrics);
}
public void DrawIcon (Mono.TextEditor.TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double x, double y, double width, double height)
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
index 2d74fde..1de15db 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
@@ -139,11 +139,13 @@ namespace MonoDevelop.Debugger
Breakpoint bp = new Breakpoint (watch.File, watch.Line);
bp.TraceExpression = "{" + watch.Expression + "}";
bp.HitAction = HitAction.PrintExpression;
- breakpoints.Add (bp);
+ lock (breakpoints)
+ breakpoints.Add (bp);
pinnedWatches.Bind (watch, bp);
} else {
pinnedWatches.Bind (watch, null);
- breakpoints.Remove (watch.BoundTracer);
+ lock (breakpoints)
+ breakpoints.Remove (watch.BoundTracer);
}
}
@@ -220,7 +222,8 @@ namespace MonoDevelop.Debugger
bp.HitAction = HitAction.PrintExpression;
bp.TraceExpression = dlg.Text;
bp.ConditionExpression = dlg.Condition;
- Breakpoints.Add (bp);
+ lock (breakpoints)
+ breakpoints.Add (bp);
}
dlg.Destroy ();
}
@@ -553,7 +556,6 @@ namespace MonoDevelop.Debugger
Cleanup ();
throw;
}
-
}
static bool ExceptionHandler (Exception ex)
@@ -876,24 +878,26 @@ namespace MonoDevelop.Debugger
static void OnLineCountChanged (object ob, LineCountEventArgs a)
{
- foreach (Breakpoint bp in breakpoints.GetBreakpoints ()) {
- if (bp.FileName == a.TextFile.Name) {
- if (bp.Line > a.LineNumber) {
- // If the line that has the breakpoint is deleted, delete the breakpoint, otherwise update the line #.
- if (bp.Line + a.LineCount >= a.LineNumber)
- breakpoints.UpdateBreakpointLine (bp, bp.Line + a.LineCount);
- else
+ lock (breakpoints) {
+ foreach (Breakpoint bp in breakpoints.GetBreakpoints ()) {
+ if (bp.FileName == a.TextFile.Name) {
+ if (bp.Line > a.LineNumber) {
+ // If the line that has the breakpoint is deleted, delete the breakpoint, otherwise update the line #.
+ if (bp.Line + a.LineCount >= a.LineNumber)
+ breakpoints.UpdateBreakpointLine (bp, bp.Line + a.LineCount);
+ else
+ breakpoints.Remove (bp);
+ } else if (bp.Line == a.LineNumber && a.LineCount < 0)
breakpoints.Remove (bp);
}
- else if (bp.Line == a.LineNumber && a.LineCount < 0)
- breakpoints.Remove (bp);
}
}
}
static void OnStoreUserPrefs (object s, UserPreferencesEventArgs args)
{
- args.Properties.SetValue ("MonoDevelop.Ide.DebuggingService.Breakpoints", breakpoints.Save ());
+ lock (breakpoints)
+ args.Properties.SetValue ("MonoDevelop.Ide.DebuggingService.Breakpoints", breakpoints.Save ());
args.Properties.SetValue ("MonoDevelop.Ide.DebuggingService.PinnedWatches", pinnedWatches);
}
@@ -902,17 +906,24 @@ namespace MonoDevelop.Debugger
XmlElement elem = args.Properties.GetValue<XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints");
if (elem == null)
elem = args.Properties.GetValue<XmlElement> ("MonoDevelop.Ide.DebuggingService");
- if (elem != null)
- breakpoints.Load (elem);
+
+ if (elem != null) {
+ lock (breakpoints)
+ breakpoints.Load (elem);
+ }
+
PinnedWatchStore wstore = args.Properties.GetValue<PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches");
if (wstore != null)
pinnedWatches.LoadFrom (wstore);
- pinnedWatches.BindAll (breakpoints);
+
+ lock (breakpoints)
+ pinnedWatches.BindAll (breakpoints);
}
static void OnSolutionClosed (object s, EventArgs args)
{
- breakpoints.Clear ();
+ lock (breakpoints)
+ breakpoints.Clear ();
}
static string ResolveType (string identifier, SourceLocation location)
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs
index 882cf9b..6cbcd25 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DisassemblyView.cs
@@ -45,7 +45,7 @@ namespace MonoDevelop.Debugger
public class DisassemblyView: AbstractViewContent, IClipboardHandler
{
Gtk.ScrolledWindow sw;
- Mono.TextEditor.TextEditor editor;
+ TextEditor editor;
int firstLine;
int lastLine;
Dictionary<string,int> addressLines = new Dictionary<string,int> ();
@@ -62,12 +62,12 @@ namespace MonoDevelop.Debugger
public DisassemblyView ()
{
- UntitledName = GettextCatalog.GetString ("Disassembly");
+ ContentName = GettextCatalog.GetString ("Disassembly");
sw = new Gtk.ScrolledWindow ();
- editor = new Mono.TextEditor.TextEditor ();
+ editor = new TextEditor ();
editor.Document.ReadOnly = true;
- editor.Options = new MonoDevelop.Ide.Gui.CommonTextEditorOptions () {
+ editor.Options = new CommonTextEditorOptions {
ShowLineNumberMargin = false,
};
@@ -102,7 +102,13 @@ namespace MonoDevelop.Debugger
public override void Load (string fileName)
{
}
-
+
+ public override bool IsFile {
+ get {
+ return false;
+ }
+ }
+
public void Update ()
{
autoRefill = false;
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
index 3ce714a..023d796 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
@@ -49,8 +49,6 @@ namespace MonoDevelop.Debugger
stackStore = new TreeStore (typeof(string), typeof(string), typeof(int), typeof(int));
treeStack.Model = stackStore;
var crt = new CellRendererText ();
- crt.WrapWidth = 200;
- crt.WrapMode = Pango.WrapMode.WordChar;
treeStack.AppendColumn ("", crt, "markup", 0);
treeStack.ShowExpanders = false;
@@ -94,7 +92,7 @@ namespace MonoDevelop.Debugger
stackStore.Clear ();
valueView.ClearValues ();
- labelType.Markup = GettextCatalog.GetString ("<b>{0}</b> has been thrown", exception.Type);
+ labelType.Markup = GettextCatalog.GetString ("A <b>{0}</b> was thrown.", exception.Type);
labelMessage.Text = string.IsNullOrEmpty (exception.Message) ?
string.Empty :
exception.Message;
@@ -120,7 +118,7 @@ namespace MonoDevelop.Debugger
}
foreach (ExceptionStackFrame frame in exc.StackTrace) {
- string text = GLib.Markup.EscapeText (frame.DisplayText);
+ string text = string.Format ("<b>{0}</b>", GLib.Markup.EscapeText (frame.DisplayText));
if (!string.IsNullOrEmpty (frame.File)) {
text += "\n<small>" + GLib.Markup.EscapeText (frame.File);
if (frame.Line > 0) {
@@ -130,6 +128,7 @@ namespace MonoDevelop.Debugger
}
text += "</small>";
}
+
if (!it.Equals (TreeIter.Zero))
stackStore.AppendValues (it, text, frame.File, frame.Line, frame.Column);
else
@@ -166,9 +165,11 @@ namespace MonoDevelop.Debugger
box.Spacing = 6;
box.PackStart (widget, true, true, 0);
HButtonBox buttonBox = new HButtonBox ();
+ buttonBox.Layout = ButtonBoxStyle.End;
buttonBox.BorderWidth = 6;
+ buttonBox.Spacing = 12;
- var copy = new Gtk.Button (GettextCatalog.GetString ("Copy to Clipboard"));
+ var copy = new Gtk.Button (GettextCatalog.GetString ("Copy"));
buttonBox.PackStart (copy, false, false, 0);
copy.Clicked += HandleCopyClicked;
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionsDialog.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionsDialog.cs
index 1eba2d6..34ac6ad 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionsDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionsDialog.cs
@@ -49,7 +49,7 @@ namespace MonoDevelop.Debugger
public ExceptionsDialog()
{
- this.Build();
+ this.Build ();
storeExceptions = new ListStore (typeof(String));
treeExceptions.Selection.Mode = SelectionMode.Multiple;
@@ -64,10 +64,13 @@ namespace MonoDevelop.Debugger
treeSelected.AppendColumn ("", new CellRendererText (), "text", 0);
tstateSel = new TreeViewState (treeSelected, 0);
storeSelection.SetSortColumnId (0, SortType.Ascending);
-
- foreach (Catchpoint cp in DebuggingService.Breakpoints.GetCatchpoints ())
- selectedClasses.Add (cp.ExceptionName);
-
+
+ var breakpoints = DebuggingService.Breakpoints;
+ lock (breakpoints) {
+ foreach (Catchpoint cp in breakpoints.GetCatchpoints ())
+ selectedClasses.Add (cp.ExceptionName);
+ }
+
LoadExceptions ();
FillSelection ();
@@ -192,14 +195,19 @@ namespace MonoDevelop.Debugger
protected virtual void OnButtonOkClicked (object sender, EventArgs e)
{
- foreach (Catchpoint cp in new List<Catchpoint> (DebuggingService.Breakpoints.GetCatchpoints ())) {
- if (!selectedClasses.Contains (cp.ExceptionName))
- DebuggingService.Breakpoints.Remove (cp);
- else
- selectedClasses.Remove (cp.ExceptionName);
+ var breakpoints = DebuggingService.Breakpoints;
+
+ lock (breakpoints) {
+ foreach (Catchpoint cp in new List<Catchpoint> (breakpoints.GetCatchpoints ())) {
+ if (!selectedClasses.Contains (cp.ExceptionName))
+ breakpoints.Remove (cp);
+ else
+ selectedClasses.Remove (cp.ExceptionName);
+ }
+
+ foreach (string exc in selectedClasses)
+ breakpoints.AddCatchpoint (exc);
}
- foreach (string exc in selectedClasses)
- DebuggingService.Breakpoints.AddCatchpoint (exc);
}
[GLib.ConnectBefore]
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExpressionEvaluatorDialog.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExpressionEvaluatorDialog.cs
index 70ddca4..3927e50 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExpressionEvaluatorDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExpressionEvaluatorDialog.cs
@@ -83,9 +83,13 @@ namespace MonoDevelop.Debugger
void OnEditKeyPress (object sender, KeyPressEventArgs args)
{
if (currentCompletionData != null) {
- bool ret = CompletionWindowManager.PreProcessKeyEvent (args.Event.Key, (char)args.Event.Key, args.Event.State);
- CompletionWindowManager.PostProcessKeyEvent (args.Event.Key, (char)args.Event.Key, args.Event.State);
- args.RetVal = ret;
+ char keyChar = (char)args.Event.Key;
+ if ((args.Event.Key == Gdk.Key.Down || args.Event.Key == Gdk.Key.Up)) {
+ keyChar = '\0';
+ }
+ var retVal = CompletionWindowManager.PreProcessKeyEvent (args.Event.Key, keyChar, args.Event.State);
+ CompletionWindowManager.PostProcessKeyEvent (args.Event.Key, keyChar, args.Event.State);
+ args.RetVal = retVal;
}
Application.Invoke (delegate {
@@ -137,7 +141,7 @@ namespace MonoDevelop.Debugger
string ICompletionWidget.GetText (int startOffset, int endOffset)
{
- if (startOffset < 0) startOffset = 0;
+ if (startOffset < 0 || startOffset > entry.Text.Length) startOffset = 0;
if (endOffset > entry.Text.Length) endOffset = entry.Text.Length;
return entry.Text.Substring (startOffset, endOffset - startOffset);
}
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
index 141c93d..a98f19c 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Extensions.cs
@@ -41,43 +41,36 @@ namespace MonoDevelop.Debugger
ExecutionContext context = new ExecutionContext (DebuggingService.GetExecutionHandler (), IdeApp.Workbench.ProgressMonitors);
return opers.CanExecute (entry, context);
}
-
+
public static IAsyncOperation Debug (this ProjectOperations opers, IBuildTarget entry)
{
if (opers.CurrentRunOperation != null && !opers.CurrentRunOperation.IsCompleted)
return opers.CurrentRunOperation;
- string oldLayout = IdeApp.Workbench.CurrentLayout;
- IdeApp.Workbench.CurrentLayout = "Debug";
-
ExecutionContext context = new ExecutionContext (DebuggingService.GetExecutionHandler (), IdeApp.Workbench.ProgressMonitors, IdeApp.Workspace.ActiveExecutionTarget);
IAsyncOperation op = opers.Execute (entry, context);
- op.Completed += delegate {
- Gtk.Application.Invoke (delegate {
- IdeApp.Workbench.CurrentLayout = oldLayout;
- });
- };
+ SwitchToDebugLayout (op);
return op;
}
-
+
public static bool CanDebugFile (this ProjectOperations opers, string file)
{
ExecutionContext context = new ExecutionContext (DebuggingService.GetExecutionHandler (), IdeApp.Workbench.ProgressMonitors);
return opers.CanExecuteFile (file, context);
}
-
+
public static IAsyncOperation DebugFile (this ProjectOperations opers, string file)
{
ExecutionContext context = new ExecutionContext (DebuggingService.GetExecutionHandler (), IdeApp.Workbench.ProgressMonitors);
return opers.ExecuteFile (file, context);
}
-
+
public static IAsyncOperation DebugApplication (this ProjectOperations opers, string executableFile)
{
if (opers.CurrentRunOperation != null && !opers.CurrentRunOperation.IsCompleted)
return opers.CurrentRunOperation;
-
+
string oldLayout = IdeApp.Workbench.CurrentLayout;
IdeApp.Workbench.CurrentLayout = "Debug";
@@ -90,18 +83,20 @@ namespace MonoDevelop.Debugger
IdeApp.Workbench.CurrentLayout = oldLayout;
});
};
-
+
opers.CurrentRunOperation = monitor.AsyncOperation;
return opers.CurrentRunOperation;
}
-
+
public static IAsyncOperation AttachToProcess (this ProjectOperations opers, DebuggerEngine debugger, ProcessInfo proc)
{
if (opers.CurrentRunOperation != null && !opers.CurrentRunOperation.IsCompleted)
return opers.CurrentRunOperation;
-
- opers.CurrentRunOperation = DebuggingService.AttachToProcess (debugger, proc);
-
+
+ IAsyncOperation oper = DebuggingService.AttachToProcess (debugger, proc);
+ SwitchToDebugLayout (oper);
+
+ opers.CurrentRunOperation = oper;
return opers.CurrentRunOperation;
}
@@ -114,5 +109,17 @@ namespace MonoDevelop.Debugger
{
return doc.FileName != FilePath.Null && IdeApp.ProjectOperations.CanDebugFile (doc.FileName);
}
+
+ static void SwitchToDebugLayout (IAsyncOperation oper)
+ {
+ string oldLayout = IdeApp.Workbench.CurrentLayout;
+ IdeApp.Workbench.CurrentLayout = "Debug";
+
+ oper.Completed += delegate {
+ DispatchService.GuiDispatch (delegate {
+ IdeApp.Workbench.CurrentLayout = oldLayout;
+ });
+ };
+ }
}
}
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
index 0f4447c..d3b132d 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
@@ -37,7 +37,7 @@ namespace MonoDevelop.Debugger
StackFrame lastFrame;
HashSet<string> lastExpressions = new HashSet<string> ();
- public LocalsPad()
+ public LocalsPad ()
{
tree.AllowEditing = true;
tree.AllowAdding = false;
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
index 42b1f65..bf6f0bf 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
@@ -48,7 +48,7 @@ namespace MonoDevelop.Debugger
}
}
- public ObjectValuePad()
+ public ObjectValuePad ()
{
scrolled = new ScrolledWindow ();
scrolled.HscrollbarPolicy = PolicyType.Automatic;
@@ -120,7 +120,6 @@ namespace MonoDevelop.Debugger
protected virtual void OnDebuggerPaused (object s, EventArgs a)
{
- tree.Sensitive = true;
}
protected virtual void OnDebuggerResumed (object s, EventArgs a)
@@ -129,13 +128,11 @@ namespace MonoDevelop.Debugger
tree.ChangeCheckpoint ();
initialResume = false;
- tree.Sensitive = false;
}
protected virtual void OnDebuggerStopped (object s, EventArgs a)
{
tree.ResetChangeTracking ();
- tree.Sensitive = false;
initialResume = true;
}
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs
index da0efcb..39b0c48 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValueTreeView.cs
@@ -56,9 +56,6 @@ namespace MonoDevelop.Debugger
TreeStore store;
TreeViewState state;
string createMsg;
- bool allowAdding;
- bool allowEditing;
- bool allowExpanding = true;
bool restoringState = false;
bool compact;
StackFrame frame;
@@ -98,16 +95,15 @@ namespace MonoDevelop.Debugger
const int ValueCol = 1;
const int TypeCol = 2;
const int ObjectCol = 3;
- const int ExpandedCol = 4;
- const int NameEditableCol = 5;
- const int ValueEditableCol = 6;
- const int IconCol = 7;
- const int NameColorCol = 8;
- const int ValueColorCol = 9;
- const int ValueButtonVisibleCol = 10;
- const int PinIconCol = 11;
- const int LiveUpdateIconCol = 12;
- const int ViewerButtonVisibleCol = 13;
+ const int NameEditableCol = 4;
+ const int ValueEditableCol = 5;
+ const int IconCol = 6;
+ const int NameColorCol = 7;
+ const int ValueColorCol = 8;
+ const int ValueButtonVisibleCol = 9;
+ const int PinIconCol = 10;
+ const int LiveUpdateIconCol = 11;
+ const int ViewerButtonVisibleCol = 12;
public event EventHandler StartEditing;
public event EventHandler EndEditing;
@@ -132,7 +128,7 @@ namespace MonoDevelop.Debugger
public ObjectValueTreeView ()
{
- store = new TreeStore (typeof(string), typeof(string), typeof(string), typeof(ObjectValue), typeof(bool), typeof(bool), typeof(bool), typeof(string), typeof(string), typeof(string), typeof(bool), typeof(string), typeof(Gdk.Pixbuf), typeof(bool));
+ store = new TreeStore (typeof(string), typeof(string), typeof(string), typeof(ObjectValue), typeof(bool), typeof(bool), typeof(string), typeof(string), typeof(string), typeof(bool), typeof(string), typeof(Gdk.Pixbuf), typeof(bool));
Model = store;
RulesHint = true;
EnableSearch = false;
@@ -346,7 +342,8 @@ namespace MonoDevelop.Debugger
state.Load ();
restoringState = false;
}
-
+
+ bool allowAdding;
public bool AllowAdding {
get {
return allowAdding;
@@ -356,7 +353,8 @@ namespace MonoDevelop.Debugger
Refresh ();
}
}
-
+
+ bool allowEditing;
public bool AllowEditing {
get {
return allowEditing;
@@ -373,12 +371,18 @@ namespace MonoDevelop.Debugger
}
public bool RootPinAlwaysVisible { get; set; }
-
+
+ bool allowExpanding = true;
public bool AllowExpanding {
- get { return this.allowExpanding; }
- set { this.allowExpanding = value; }
+ get { return allowExpanding; }
+ set { allowExpanding = value; }
+ }
+
+ bool CanQueryDebugger {
+ get {
+ return DebuggingService.IsConnected && DebuggingService.IsPaused;
+ }
}
-
public PinnedWatch PinnedWatch { get; set; }
@@ -526,17 +530,17 @@ namespace MonoDevelop.Debugger
LoadState ();
}
- void RefreshRow (TreeIter it)
+ void RefreshRow (TreeIter iter)
{
- ObjectValue val = (ObjectValue) store.GetValue (it, ObjectCol);
+ ObjectValue val = (ObjectValue) store.GetValue (iter, ObjectCol);
UnregisterValue (val);
- RemoveChildren (it);
+ RemoveChildren (iter);
TreeIter parent;
- if (!store.IterParent (out parent, it))
+ if (!store.IterParent (out parent, iter))
parent = TreeIter.Zero;
- if (frame != null && frame.DebuggerSession.IsConnected) {
+ if (CanQueryDebugger && frame != null) {
EvaluationOptions ops = frame.DebuggerSession.Options.EvaluationOptions.Clone ();
ops.AllowMethodEvaluation = true;
ops.AllowToStringCalls = true;
@@ -547,30 +551,31 @@ namespace MonoDevelop.Debugger
val.Refresh (ops);
// Don't update the name for the values entered by the user
- if (store.IterDepth (it) == 0)
+ if (store.IterDepth (iter) == 0)
val.Name = oldName;
}
- SetValues (parent, it, val.Name, val);
- RegisterValue (val, it);
+ SetValues (parent, iter, val.Name, val);
+ RegisterValue (val, iter);
}
- void RemoveChildren (TreeIter it)
+ void RemoveChildren (TreeIter iter)
{
- TreeIter cit;
- while (store.IterChildren (out cit, it)) {
- ObjectValue val = (ObjectValue) store.GetValue (cit, ObjectCol);
+ TreeIter citer;
+
+ while (store.IterChildren (out citer, iter)) {
+ ObjectValue val = (ObjectValue) store.GetValue (citer, ObjectCol);
if (val != null)
UnregisterValue (val);
- RemoveChildren (cit);
- store.Remove (ref cit);
+ RemoveChildren (citer);
+ store.Remove (ref citer);
}
}
- void RegisterValue (ObjectValue val, TreeIter it)
+ void RegisterValue (ObjectValue val, TreeIter iter)
{
if (val.IsEvaluating) {
- nodes [val] = new TreeRowReference (store, store.GetPath (it));
+ nodes [val] = new TreeRowReference (store, store.GetPath (iter));
val.ValueChanged += OnValueUpdated;
}
}
@@ -744,9 +749,8 @@ namespace MonoDevelop.Debugger
store.SetValue (it, ValueCol, strval);
store.SetValue (it, TypeCol, val.TypeName);
store.SetValue (it, ObjectCol, val);
- store.SetValue (it, ExpandedCol, !hasChildren);
- store.SetValue (it, NameEditableCol, !hasParent && allowAdding);
- store.SetValue (it, ValueEditableCol, canEdit && allowEditing);
+ store.SetValue (it, NameEditableCol, !hasParent && AllowAdding);
+ store.SetValue (it, ValueEditableCol, canEdit && AllowEditing);
store.SetValue (it, IconCol, icon);
store.SetValue (it, NameColorCol, nameColor);
store.SetValue (it, ValueColorCol, valueColor);
@@ -786,6 +790,7 @@ namespace MonoDevelop.Debugger
case ObjectValueFlags.Namespace: return "md-name-space";
case ObjectValueFlags.Group: return "md-open-resource-folder";
case ObjectValueFlags.Field: source = "field"; break;
+ case ObjectValueFlags.Variable: return "md-variable";
default: return "md-empty";
}
@@ -822,10 +827,12 @@ namespace MonoDevelop.Debugger
protected override void OnRowCollapsed (TreeIter iter, TreePath path)
{
- store.SetValue (iter, ExpandedCol, false);
base.OnRowCollapsed (iter, path);
+
if (compact)
ColumnsAutosize ();
+
+ ScrollToCell (path, expCol, true, 0f, 0f);
}
static Task<ObjectValue[]> GetChildrenAsync (ObjectValue value)
@@ -872,7 +879,6 @@ namespace MonoDevelop.Debugger
protected override void OnRowExpanded (TreeIter iter, TreePath path)
{
- store.SetValue (iter, ExpandedCol, true);
TreeIter it;
if (store.IterChildren (out it, iter)) {
@@ -884,6 +890,8 @@ namespace MonoDevelop.Debugger
}
base.OnRowExpanded (iter, path);
+
+ ScrollToCell (path, expCol, true, 0f, 0f);
}
string GetIterPath (TreeIter iter)
@@ -1106,72 +1114,109 @@ namespace MonoDevelop.Debugger
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
- // Ignore if editing a cell, or if not editable
- if (!AllowEditing || !AllowAdding || editing)
+ // Ignore if editing a cell
+ if (editing)
return base.OnKeyPressEvent (evnt);
-
- // Delete the current item with any delete key
+
+ TreePath[] selected = Selection.GetSelectedRows ();
+ bool changed = false;
+ TreePath lastPath;
+
+ if (selected == null || selected.Length < 1)
+ return base.OnKeyPressEvent (evnt);
+
switch (evnt.Key) {
+ case Gdk.Key.Left:
+ case Gdk.Key.KP_Left:
+ foreach (var path in selected) {
+ lastPath = path.Copy ();
+ if (GetRowExpanded (path)) {
+ CollapseRow (path);
+ changed = true;
+ } else if (path.Up ()) {
+ Selection.UnselectPath (lastPath);
+ Selection.SelectPath (path);
+ changed = true;
+ }
+ }
+ break;
+ case Gdk.Key.Right:
+ case Gdk.Key.KP_Right:
+ foreach (var path in selected) {
+ if (!GetRowExpanded (path)) {
+ ExpandRow (path, false);
+ changed = true;
+ } else {
+ lastPath = path.Copy ();
+ path.Down ();
+ if (lastPath.Compare (path) != 0) {
+ Selection.UnselectPath (lastPath);
+ Selection.SelectPath (path);
+ changed = true;
+ }
+ }
+ }
+ break;
case Gdk.Key.Delete:
case Gdk.Key.KP_Delete:
case Gdk.Key.BackSpace:
- if (Selection.CountSelectedRows () > 0) {
- bool deleted = false;
- string expression;
- ObjectValue val;
- TreeIter iter;
-
- // get a list of the selected rows (in reverse order so that we delete children before parents)
- var selected = Selection.GetSelectedRows ();
- Array.Sort (selected, new TreePathComparer (true));
-
- foreach (var path in selected) {
- if (!Model.GetIter (out iter, path))
- continue;
-
- val = (ObjectValue)store.GetValue (iter, ObjectCol);
- expression = GetFullExpression (iter);
-
- // Lookup and remove
- if (val != null && values.Contains (val)) {
- RemoveValue (val);
- deleted = true;
- } else if (!string.IsNullOrEmpty (expression) && valueNames.Contains (expression)) {
- RemoveExpression (expression);
- deleted = true;
- }
- }
+ string expression;
+ ObjectValue val;
+ TreeIter iter;
- if (deleted)
- return true;
+ if (!AllowEditing || !AllowAdding)
+ return base.OnKeyPressEvent (evnt);
+
+ // Note: since we'll be modifying the tree, we need to make changes from bottom to top
+ Array.Sort (selected, new TreePathComparer (true));
+
+ foreach (var path in selected) {
+ if (!Model.GetIter (out iter, path))
+ continue;
+
+ val = (ObjectValue)store.GetValue (iter, ObjectCol);
+ expression = GetFullExpression (iter);
+
+ // Lookup and remove
+ if (val != null && values.Contains (val)) {
+ RemoveValue (val);
+ changed = true;
+ } else if (!string.IsNullOrEmpty (expression) && valueNames.Contains (expression)) {
+ RemoveExpression (expression);
+ changed = true;
+ }
}
break;
}
+
+ if (changed)
+ return true;
+
return base.OnKeyPressEvent (evnt);
}
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
allowStoreColumnSizes = true;
- bool res = base.OnButtonPressEvent (evnt);
- TreePath path;
- TreeViewColumn col;
- CellRenderer cr;
+ bool retval = base.OnButtonPressEvent (evnt);
//HACK: show context menu in release event instead of show event to work around gtk bug
if (evnt.TriggersContextMenu ()) {
// ShowPopup (evnt);
return true;
}
+
+ TreeViewColumn col;
+ CellRenderer cr;
+ TreePath path;
- if (evnt.Button == 1 && GetCellAtPos ((int)evnt.X, (int)evnt.Y, out path, out col, out cr)) {
+ if (CanQueryDebugger && evnt.Button == 1 && GetCellAtPos ((int)evnt.X, (int)evnt.Y, out path, out col, out cr)) {
TreeIter it;
store.GetIter (out it, path);
if (cr == crpViewer) {
ObjectValue val = (ObjectValue) store.GetValue (it, ObjectCol);
DebuggingService.ShowValueVisualizer (val);
- }
- else if (!editing) {
+ } else if (!editing) {
if (cr == crpButton) {
RefreshRow (it);
} else if (cr == crpPin) {
@@ -1193,7 +1238,7 @@ namespace MonoDevelop.Debugger
}
}
- return res;
+ return retval;
}
protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt)
@@ -1219,6 +1264,20 @@ namespace MonoDevelop.Debugger
{
IdeApp.CommandService.ShowContextMenu (this, evt, menuSet, this);
}
+
+ [CommandUpdateHandler (EditCommands.SelectAll)]
+ protected void UpdateSelectAll (CommandInfo cmd)
+ {
+ TreeIter iter;
+
+ cmd.Enabled = store.GetIterFirst (out iter);
+ }
+
+ [CommandHandler (EditCommands.SelectAll)]
+ protected void OnSelectAll ()
+ {
+ Selection.SelectAll ();
+ }
[CommandHandler (EditCommands.Copy)]
protected void OnCopy ()
@@ -1303,15 +1362,17 @@ namespace MonoDevelop.Debugger
return;
}
- if (!allowAdding) {
+ if (!AllowAdding) {
cinfo.Visible = false;
return;
}
+
TreePath[] sel = Selection.GetSelectedRows ();
if (sel.Length == 0) {
cinfo.Enabled = false;
return;
}
+
foreach (TreePath tp in sel) {
if (tp.Depth > 1) {
cinfo.Enabled = false;
@@ -1353,20 +1414,26 @@ namespace MonoDevelop.Debugger
[CommandUpdateHandler (EditCommands.Rename)]
protected void OnUpdateRename (CommandInfo cinfo)
{
- cinfo.Visible = allowAdding;
+ cinfo.Visible = AllowAdding;
cinfo.Enabled = Selection.GetSelectedRows ().Length == 1;
}
protected override void OnRowActivated (TreePath path, TreeViewColumn column)
{
base.OnRowActivated (path, column);
- TreeIter it;
- TreePath[] sel = Selection.GetSelectedRows ();
- if (store.GetIter (out it, sel[0])) {
- ObjectValue val = (ObjectValue) store.GetValue (it, ObjectCol);
- if (val != null && val.Name == DebuggingService.DebuggerSession.EvaluationOptions.CurrentExceptionTag)
- DebuggingService.ShowExceptionCaughtDialog ();
- }
+
+ if (!CanQueryDebugger)
+ return;
+
+ TreePath[] selected = Selection.GetSelectedRows ();
+ TreeIter iter;
+
+ if (!store.GetIter (out iter, selected[0]))
+ return;
+
+ ObjectValue val = (ObjectValue) store.GetValue (iter, ObjectCol);
+ if (val != null && val.Name == DebuggingService.DebuggerSession.EvaluationOptions.CurrentExceptionTag)
+ DebuggingService.ShowExceptionCaughtDialog ();
}
@@ -1593,7 +1660,7 @@ namespace MonoDevelop.Debugger
Mono.Debugging.Client.CompletionData GetCompletionData (string exp)
{
- if (frame != null && frame.DebuggerSession.IsConnected)
+ if (CanQueryDebugger && frame != null)
return frame.GetExpressionCompletionData (exp);
return null;
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/StackTracePad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/StackTracePad.cs
index 731e306..8b63abd 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/StackTracePad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/StackTracePad.cs
@@ -45,6 +45,17 @@ namespace MonoDevelop.Debugger
{
public class StackTracePad : Gtk.ScrolledWindow, IPadContent
{
+ const int IconColumn = 0;
+ const int MethodColumn = 1;
+ const int FileColumn = 2;
+ const int LangColumn = 3;
+ const int AddrColumn = 4;
+ const int ForegroundColumn = 5;
+ const int StyleColumn = 6;
+ const int FrameColumn = 7;
+ const int FrameIndexColumn = 8;
+ const int CanRefreshColumn = 9;
+
Backtrace current_backtrace;
PadTreeView tree;
@@ -68,12 +79,13 @@ namespace MonoDevelop.Debugger
menuSet.AddItem (EditCommands.SelectAll);
menuSet.AddItem (EditCommands.Copy);
- store = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Pango.Style), typeof (object), typeof (bool));
+ store = new ListStore (typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (Pango.Style), typeof (object), typeof (int), typeof (bool));
tree = new PadTreeView (store);
tree.RulesHint = true;
tree.HeadersVisible = true;
tree.Selection.Mode = SelectionMode.Multiple;
+ tree.SearchEqualFunc = Search;
tree.EnableSearch = true;
tree.SearchColumn = 1;
tree.ButtonPressEvent += HandleButtonPressEvent;
@@ -82,7 +94,7 @@ namespace MonoDevelop.Debugger
TreeViewColumn col = new TreeViewColumn ();
CellRenderer crp = new CellRendererIcon ();
col.PackStart (crp, false);
- col.AddAttribute (crp, "stock_id", 0);
+ col.AddAttribute (crp, "stock_id", IconColumn);
tree.AppendColumn (col);
TreeViewColumn FrameCol = new TreeViewColumn ();
@@ -90,11 +102,11 @@ namespace MonoDevelop.Debugger
refresh = new CellRendererIcon ();
refresh.Pixbuf = ImageService.GetPixbuf (Gtk.Stock.Refresh).ScaleSimple (12, 12, Gdk.InterpType.Hyper);
FrameCol.PackStart (refresh, false);
- FrameCol.AddAttribute (refresh, "visible", 8);
+ FrameCol.AddAttribute (refresh, "visible", CanRefreshColumn);
FrameCol.PackStart (tree.TextRenderer, true);
- FrameCol.AddAttribute (tree.TextRenderer, "text", 1);
- FrameCol.AddAttribute (tree.TextRenderer, "foreground", 5);
- FrameCol.AddAttribute (tree.TextRenderer, "style", 6);
+ FrameCol.AddAttribute (tree.TextRenderer, "text", MethodColumn);
+ FrameCol.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
+ FrameCol.AddAttribute (tree.TextRenderer, "style", StyleColumn);
FrameCol.Resizable = true;
FrameCol.Alignment = 0.0f;
tree.AppendColumn (FrameCol);
@@ -102,22 +114,22 @@ namespace MonoDevelop.Debugger
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("File");
col.PackStart (tree.TextRenderer, false);
- col.AddAttribute (tree.TextRenderer, "text", 2);
- col.AddAttribute (tree.TextRenderer, "foreground", 5);
+ col.AddAttribute (tree.TextRenderer, "text", FileColumn);
+ col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Language");
col.PackStart (tree.TextRenderer, false);
- col.AddAttribute (tree.TextRenderer, "text", 3);
- col.AddAttribute (tree.TextRenderer, "foreground", 5);
+ col.AddAttribute (tree.TextRenderer, "text", LangColumn);
+ col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Address");
col.PackStart (tree.TextRenderer, false);
- col.AddAttribute (tree.TextRenderer, "text", 4);
- col.AddAttribute (tree.TextRenderer, "foreground", 5);
+ col.AddAttribute (tree.TextRenderer, "text", AddrColumn);
+ col.AddAttribute (tree.TextRenderer, "foreground", ForegroundColumn);
tree.AppendColumn (col);
Add (tree);
@@ -130,6 +142,13 @@ namespace MonoDevelop.Debugger
DebuggingService.CurrentFrameChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnFrameChanged));
tree.RowActivated += OnRowActivated;
}
+
+ bool Search (TreeModel model, int column, string key, TreeIter iter)
+ {
+ string value = (string) model.GetValue (iter, column);
+
+ return !value.Contains (key);
+ }
void IPadContent.Initialize (IPadWindow window)
{
@@ -197,13 +216,14 @@ namespace MonoDevelop.Debugger
file = frame.SourceLocation.FileName;
if (frame.SourceLocation.Line != -1)
file += ":" + frame.SourceLocation.Line;
- } else
+ } else {
file = string.Empty;
+ }
var style = frame.IsExternalCode ? Pango.Style.Italic : Pango.Style.Normal;
store.AppendValues (icon, method, file, frame.Language, "0x" + frame.Address.ToString ("x"), null,
- style, frame, !options.AllowDisplayStringEvaluation);
+ style, frame, i, !options.AllowDisplayStringEvaluation);
}
}
@@ -247,29 +267,29 @@ namespace MonoDevelop.Debugger
options.AllowMethodEvaluation = true;
options.AllowToStringCalls = true;
- var frame = (StackFrame) store.GetValue (iter, 7);
+ var frame = (StackFrame) store.GetValue (iter, FrameColumn);
var method = EvaluateMethodName (frame, options);
- store.SetValue (iter, 1, method);
- store.SetValue (iter, 8, false);
+ store.SetValue (iter, MethodColumn, method);
+ store.SetValue (iter, CanRefreshColumn, false);
}
}
public void UpdateCurrentFrame ()
{
- TreeIter it;
- int n = 0;
+ TreeIter iter;
- if (!store.GetIterFirst (out it))
+ if (!store.GetIterFirst (out iter))
return;
do {
- if (n == DebuggingService.CurrentFrameIndex)
- store.SetValue (it, 0, Gtk.Stock.GoForward);
+ int frame = (int) store.GetValue (iter, FrameIndexColumn);
+
+ if (frame == DebuggingService.CurrentFrameIndex)
+ store.SetValue (iter, IconColumn, Gtk.Stock.GoForward);
else
- store.SetValue (it, 0, null);
- n++;
- } while (store.IterNext (ref it));
+ store.SetValue (iter, IconColumn, null);
+ } while (store.IterNext (ref iter));
}
protected void OnFrameChanged (object o, EventArgs args)
@@ -325,12 +345,12 @@ namespace MonoDevelop.Debugger
options.AllowToStringCalls = true;
do {
- if ((bool) store.GetValue (iter, 8)) {
- var frame = (StackFrame) store.GetValue (iter, 7);
+ if ((bool) store.GetValue (iter, CanRefreshColumn)) {
+ var frame = (StackFrame) store.GetValue (iter, FrameColumn);
var method = EvaluateMethodName (frame, options);
- store.SetValue (iter, 1, method);
- store.SetValue (iter, 8, false);
+ store.SetValue (iter, MethodColumn, method);
+ store.SetValue (iter, CanRefreshColumn, false);
}
} while (store.IterNext (ref iter));
}
@@ -339,8 +359,10 @@ namespace MonoDevelop.Debugger
void ActivateFrame ()
{
TreePath[] selected = tree.Selection.GetSelectedRows ();
- if (selected.Length > 0)
- DebuggingService.CurrentFrameIndex = selected[0].Indices [0];
+ TreeIter iter;
+
+ if (selected.Length > 0 && store.GetIter (out iter, selected[0]))
+ DebuggingService.CurrentFrameIndex = (int) store.GetValue (iter, FrameIndexColumn);
}
[CommandHandler (EditCommands.SelectAll)]
@@ -352,18 +374,23 @@ namespace MonoDevelop.Debugger
[CommandHandler (EditCommands.Copy)]
internal void OnCopy ()
{
- TreeModel model;
StringBuilder txt = new StringBuilder ();
- foreach (Gtk.TreePath p in tree.Selection.GetSelectedRows (out model)) {
- TreeIter it;
- if (!model.GetIter (out it, p))
+ TreeModel model;
+ TreeIter iter;
+
+ foreach (TreePath path in tree.Selection.GetSelectedRows (out model)) {
+ if (!model.GetIter (out iter, path))
continue;
- string met = (string) model.GetValue (it, 1);
- string file = (string) model.GetValue (it, 2);
+
+ string method = (string) model.GetValue (iter, MethodColumn);
+ string file = (string) model.GetValue (iter, FileColumn);
+
if (txt.Length > 0)
txt.Append ('\n');
- txt.AppendFormat ("{0} in {1}", met, file);
+
+ txt.AppendFormat ("{0} in {1}", method, file);
}
+
Clipboard clipboard = Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
clipboard.Text = txt.ToString ();
clipboard = Clipboard.Get (Gdk.Atom.Intern ("PRIMARY", false));
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ThreadsPad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ThreadsPad.cs
index 21083cd..75cbdf4 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ThreadsPad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ThreadsPad.cs
@@ -43,11 +43,10 @@ namespace MonoDevelop.Debugger
{
public class ThreadsPad : Gtk.ScrolledWindow, IPadContent
{
+ TreeViewState treeViewState;
PadTreeView tree;
TreeStore store;
- TreeViewState treeViewState;
-
enum Columns
{
Icon,
@@ -58,7 +57,7 @@ namespace MonoDevelop.Debugger
Location
}
- public ThreadsPad()
+ public ThreadsPad ()
{
this.ShadowType = ShadowType.None;
@@ -210,19 +209,16 @@ namespace MonoDevelop.Debugger
void OnDebuggerPaused (object s, EventArgs a)
{
- Sensitive = true;
UpdateDisplay ();
}
void OnDebuggerResumed (object s, EventArgs a)
{
- Sensitive = false;
UpdateDisplay ();
}
void OnDebuggerStopped (object s, EventArgs a)
{
- Sensitive = false;
UpdateDisplay ();
}
}
diff --git a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
index c7aa667..e32cab3 100644
--- a/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
+++ b/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
@@ -70,12 +70,6 @@ namespace MonoDevelop.Debugger
{
tree.AddExpression (expression);
}
-
- protected override void OnDebuggerStopped (object s, EventArgs a)
- {
- base.OnDebuggerStopped (s, a);
- tree.Sensitive = true;
- }
#region IMementoCapable implementation
diff --git a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.AttachToProcessDialog.cs b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.AttachToProcessDialog.cs
index bc31afa..7861400 100644
--- a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.AttachToProcessDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.AttachToProcessDialog.cs
@@ -15,7 +15,7 @@ namespace MonoDevelop.Debugger
private global::Gtk.ComboBox comboDebs;
private global::Gtk.Button buttonCancel;
private global::Gtk.Button buttonOk;
-
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
diff --git a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.BreakpointPropertiesDialog.cs b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.BreakpointPropertiesDialog.cs
index 1532fda..c77a10c 100644
--- a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.BreakpointPropertiesDialog.cs
+++ b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.BreakpointPropertiesDialog.cs
@@ -310,6 +310,7 @@ namespace MonoDevelop.Debugger
this.comboHitCountMode.AppendText (global::Mono.Unix.Catalog.GetString ("Break when the hit count is equal to"));
this.comboHitCountMode.AppendText (global::Mono.Unix.Catalog.GetString ("Break when the hit count is greater than"));
this.comboHitCountMode.AppendText (global::Mono.Unix.Catalog.GetString ("Break when the hit count is greater than or equal to"));
+ this.comboHitCountMode.AppendText (global::Mono.Unix.Catalog.GetString ("Break when the hit count is a multiple of"));
this.comboHitCountMode.Name = "comboHitCountMode";
this.comboHitCountMode.Active = 0;
this.hbox1.Add (this.comboHitCountMode);
diff --git a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs
index 2d823ee..d415a63 100644
--- a/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs
+++ b/src/addins/MonoDevelop.Debugger/gtk-gui/MonoDevelop.Debugger.ExceptionCaughtWidget.cs
@@ -6,16 +6,16 @@ namespace MonoDevelop.Debugger
{
private global::Gtk.VBox dialog1_VBox;
private global::Gtk.VBox vbox2;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Image imageWarning;
+ private global::Gtk.VBox vboxExceptionInfo;
private global::Gtk.Label labelType;
private global::Gtk.Label labelMessage;
- private global::Gtk.Notebook notebook1;
private global::Gtk.ScrolledWindow GtkScrolledWindow1;
private global::Gtk.TreeView treeStack;
- private global::Gtk.Label label2;
private global::Gtk.ScrolledWindow GtkScrolledWindow;
private global::MonoDevelop.Debugger.ObjectValueTreeView valueView;
- private global::Gtk.Label page1;
-
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -25,63 +25,80 @@ namespace MonoDevelop.Debugger
// Container child MonoDevelop.Debugger.ExceptionCaughtWidget.Gtk.Container+ContainerChild
this.dialog1_VBox = new global::Gtk.VBox ();
this.dialog1_VBox.Name = "dialog1_VBox";
- this.dialog1_VBox.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.vbox2 = new global::Gtk.VBox ();
this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- this.vbox2.BorderWidth = ((uint)(6));
// Container child vbox2.Gtk.Box+BoxChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 12;
+ this.hbox2.BorderWidth = ((uint)(12));
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.imageWarning = new global::Gtk.Image ();
+ this.imageWarning.Name = "imageWarning";
+ this.imageWarning.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("exception-icon.png");
+ this.hbox2.Add (this.imageWarning);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.imageWarning]));
+ w1.Position = 0;
+ w1.Expand = false;
+ w1.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.vboxExceptionInfo = new global::Gtk.VBox ();
+ this.vboxExceptionInfo.Name = "vboxExceptionInfo";
+ this.vboxExceptionInfo.Spacing = 6;
+ // Container child vboxExceptionInfo.Gtk.Box+BoxChild
this.labelType = new global::Gtk.Label ();
this.labelType.Name = "labelType";
this.labelType.Xalign = 0F;
this.labelType.LabelProp = "<b>Exception</b> has been thrown";
this.labelType.UseMarkup = true;
- this.vbox2.Add (this.labelType);
- global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.labelType]));
- w1.Position = 0;
- w1.Expand = false;
- w1.Fill = false;
- // Container child vbox2.Gtk.Box+BoxChild
+ this.vboxExceptionInfo.Add (this.labelType);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vboxExceptionInfo [this.labelType]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vboxExceptionInfo.Gtk.Box+BoxChild
this.labelMessage = new global::Gtk.Label ();
this.labelMessage.WidthRequest = 500;
this.labelMessage.Name = "labelMessage";
this.labelMessage.Xalign = 0F;
this.labelMessage.LabelProp = "test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test";
this.labelMessage.Wrap = true;
- this.vbox2.Add (this.labelMessage);
- global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.labelMessage]));
- w2.Position = 1;
- w2.Expand = false;
- w2.Fill = false;
+ this.labelMessage.Selectable = true;
+ this.vboxExceptionInfo.Add (this.labelMessage);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vboxExceptionInfo [this.labelMessage]));
+ w3.Position = 1;
+ w3.Expand = false;
+ w3.Fill = false;
+ this.hbox2.Add (this.vboxExceptionInfo);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.vboxExceptionInfo]));
+ w4.Position = 1;
+ w4.Expand = false;
+ w4.Fill = false;
+ this.vbox2.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
+ w5.Position = 0;
+ w5.Expand = false;
+ w5.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
- this.notebook1 = new global::Gtk.Notebook ();
- this.notebook1.CanFocus = true;
- this.notebook1.Name = "notebook1";
- this.notebook1.CurrentPage = 0;
- // Container child notebook1.Gtk.Notebook+NotebookChild
this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow1.HeightRequest = 128;
this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
- this.GtkScrolledWindow1.BorderWidth = ((uint)(3));
// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
this.treeStack = new global::Gtk.TreeView ();
this.treeStack.CanFocus = true;
this.treeStack.Name = "treeStack";
this.treeStack.HeadersVisible = false;
this.GtkScrolledWindow1.Add (this.treeStack);
- this.notebook1.Add (this.GtkScrolledWindow1);
- // Notebook tab
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Stack Trace");
- this.notebook1.SetTabLabel (this.GtkScrolledWindow1, this.label2);
- this.label2.ShowAll ();
- // Container child notebook1.Gtk.Notebook+NotebookChild
+ this.vbox2.Add (this.GtkScrolledWindow1);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow1]));
+ w7.Position = 1;
+ // Container child vbox2.Gtk.Box+BoxChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.HeightRequest = 128;
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
- this.GtkScrolledWindow.BorderWidth = ((uint)(3));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.valueView = new global::MonoDevelop.Debugger.ObjectValueTreeView ();
this.valueView.CanFocus = true;
@@ -94,21 +111,12 @@ namespace MonoDevelop.Debugger
this.valueView.PinnedWatchLine = 0;
this.valueView.CompactView = false;
this.GtkScrolledWindow.Add (this.valueView);
- this.notebook1.Add (this.GtkScrolledWindow);
- global::Gtk.Notebook.NotebookChild w6 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1 [this.GtkScrolledWindow]));
- w6.Position = 1;
- // Notebook tab
- this.page1 = new global::Gtk.Label ();
- this.page1.Name = "page1";
- this.page1.LabelProp = global::Mono.Unix.Catalog.GetString ("Details");
- this.notebook1.SetTabLabel (this.GtkScrolledWindow, this.page1);
- this.page1.ShowAll ();
- this.vbox2.Add (this.notebook1);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.notebook1]));
- w7.Position = 2;
+ this.vbox2.Add (this.GtkScrolledWindow);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow]));
+ w9.Position = 2;
this.dialog1_VBox.Add (this.vbox2);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.dialog1_VBox [this.vbox2]));
- w8.Position = 0;
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.dialog1_VBox [this.vbox2]));
+ w10.Position = 0;
this.Add (this.dialog1_VBox);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/src/addins/MonoDevelop.Debugger/gtk-gui/generated.cs b/src/addins/MonoDevelop.Debugger/gtk-gui/generated.cs
index a76b138..36abc51 100644
--- a/src/addins/MonoDevelop.Debugger/gtk-gui/generated.cs
+++ b/src/addins/MonoDevelop.Debugger/gtk-gui/generated.cs
@@ -5,7 +5,7 @@ namespace Stetic
internal class Gui
{
private static bool initialized;
-
+
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
@@ -13,7 +13,7 @@ namespace Stetic
}
}
}
-
+
internal class IconLoader
{
public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
@@ -47,12 +47,12 @@ namespace Stetic
}
}
}
-
+
internal class BinContainer
{
private Gtk.Widget child;
private Gtk.UIManager uimanager;
-
+
public static BinContainer Attach (Gtk.Bin bin)
{
BinContainer bc = new BinContainer ();
@@ -61,32 +61,32 @@ namespace Stetic
bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc;
}
-
+
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{
if ((this.child != null)) {
args.Requisition = this.child.SizeRequest ();
}
}
-
+
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{
if ((this.child != null)) {
this.child.Allocation = args.Allocation;
}
}
-
+
private void OnAdded (object sender, Gtk.AddedArgs args)
{
this.child = args.Widget;
}
-
+
public void SetUiManager (Gtk.UIManager uim)
{
this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized);
}
-
+
private void OnRealized (object sender, System.EventArgs args)
{
if ((this.uimanager != null)) {
@@ -99,14 +99,14 @@ namespace Stetic
}
}
}
-
+
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
-
+
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;
diff --git a/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic b/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic
index c222ef0..4993703 100644
--- a/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic
+++ b/src/addins/MonoDevelop.Debugger/gtk-gui/gui.stetic
@@ -917,7 +917,8 @@ Break when the hit count is less than
Break when the hit count is less than or equal to
Break when the hit count is equal to
Break when the hit count is greater than
-Break when the hit count is greater than or equal to</property>
+Break when the hit count is greater than or equal to
+Break when the hit count is a multiple of</property>
<property name="Active">0</property>
</widget>
<packing>
@@ -1756,24 +1757,74 @@ Break when the hit count is greater than or equal to</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="MonoDevelop.Debugger.ExceptionCaughtWidget" design-size="541 358">
+ <widget class="Gtk.Bin" id="MonoDevelop.Debugger.ExceptionCaughtWidget" design-size="612 362">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
<widget class="Gtk.VBox" id="dialog1_VBox">
<property name="MemberName" />
- <property name="BorderWidth">2</property>
<child>
<widget class="Gtk.VBox" id="vbox2">
<property name="MemberName" />
- <property name="Spacing">6</property>
- <property name="BorderWidth">6</property>
<child>
- <widget class="Gtk.Label" id="labelType">
+ <widget class="Gtk.HBox" id="hbox2">
<property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="LabelProp"><b>Exception</b> has been thrown</property>
- <property name="UseMarkup">True</property>
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Image" id="imageWarning">
+ <property name="MemberName" />
+ <property name="Pixbuf">resource:exception-icon.png</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxExceptionInfo">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelType">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp"><b>Exception</b> has been thrown</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMessage">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test</property>
+ <property name="Wrap">True</property>
+ <property name="Selectable">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="Position">0</property>
@@ -1783,56 +1834,31 @@ Break when the hit count is greater than or equal to</property>
</packing>
</child>
<child>
- <widget class="Gtk.Label" id="labelMessage">
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
<property name="MemberName" />
- <property name="WidthRequest">500</property>
- <property name="Xalign">0</property>
- <property name="LabelProp">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test</property>
- <property name="Wrap">True</property>
+ <property name="HeightRequest">128</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeStack">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
+ <property name="AutoSize">False</property>
</packing>
</child>
<child>
- <widget class="Gtk.Notebook" id="notebook1">
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
<property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="CurrentPage">0</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <property name="BorderWidth">3</property>
- <child>
- <widget class="Gtk.TreeView" id="treeStack">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShowScrollbars">True</property>
- <property name="HeadersVisible">False</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="Gtk.Label" id="label2">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes">Stack Trace</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
+ <property name="HeightRequest">128</property>
+ <property name="ShadowType">In</property>
<child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <property name="BorderWidth">3</property>
- <child>
- <widget class="MonoDevelop.Debugger.ObjectValueTreeView" id="valueView">
+ <widget class="MonoDevelop.Debugger.ObjectValueTreeView" id="valueView">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="ShowScrollbars">True</property>
@@ -1844,20 +1870,6 @@ Break when the hit count is greater than or equal to</property>
<property name="PinnedWatchLine">0</property>
<property name="CompactView">False</property>
</widget>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Label" id="page1">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes">Details</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
</child>
</widget>
<packing>
diff --git a/src/addins/MonoDevelop.Debugger/icons/exception-icon.png b/src/addins/MonoDevelop.Debugger/icons/exception-icon.png
new file mode 100644
index 0000000..84656b5
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/icons/exception-icon.png differ
diff --git a/src/addins/MonoDevelop.Debugger/icons/exception-icon at 2x.png b/src/addins/MonoDevelop.Debugger/icons/exception-icon at 2x.png
new file mode 100644
index 0000000..cf73280
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/icons/exception-icon at 2x.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.MonoDevelop.Debugger.addin.xml b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.MonoDevelop.Debugger.addin.xml
new file mode 100644
index 0000000..ea673c9
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.MonoDevelop.Debugger.addin.xml
@@ -0,0 +1,251 @@
+<Addin id = "Debugger"
+ namespace = "MonoDevelop"
+ name = "Debugger support for MonoDevelop"
+ author = "Ankit Jain, Lluis Sanchez"
+ url = "http://www.monodevelop.com"
+ description = "Support for Debugging projects"
+ copyright = "MIT X11"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path="/MonoDevelop/Debugging/DebuggerEngines">
+ <Description>Debug session factories. Specified classes must implement MonoDevelop.Debugger.IDebuggerEngine</Description>
+ <ExtensionNode name="DebuggerEngine" type="MonoDevelop.Debugger.DebuggerEngineExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path="/MonoDevelop/Debugging/Evaluators">
+ <Description>Expression evaluator factories. Specified classes must implement MonoDevelop.Debugger.IExpressionEvaluator</Description>
+ <ExtensionNode name="ExpressionEvaluator" type="MonoDevelop.Debugger.ExpressionEvaluatorExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path="/MonoDevelop/Debugging/ValueVisualizers">
+ <Description>Value visualizers. Specified classes must implement MonoDevelop.Debugger.IValueVisualizer</Description>
+ <ExtensionNode name="Type"/>
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/Pads">
+ <Category id="Debug" _name="Debug Windows">
+ <Pad id = "MonoDevelop.Debugger.WatchPad" defaultLayout="Debug" defaultPlacement = "Bottom" icon="md-view-debug-watch" class = "MonoDevelop.Debugger.WatchPad" _label="Watch" />
+ <Pad id = "MonoDevelop.Debugger.LocalsPad" defaultLayout="Debug" defaultPlacement = "Bottom" icon="md-view-debug-locals" class = "MonoDevelop.Debugger.LocalsPad" _label="Locals" />
+ <Pad id = "MonoDevelop.Debugger.BreakpointPad" defaultLayout="Debug" defaultPlacement = "Bottom" icon="md-view-debug-breakpoints" class = "MonoDevelop.Debugger.BreakpointPad" _label="Breakpoints" />
+ <Pad id = "MonoDevelop.Debugger.ThreadsPad" defaultLayout="Debug" defaultPlacement = "Bottom" icon="md-view-debug-threads" class = "MonoDevelop.Debugger.ThreadsPad" _label="Threads" />
+ <Pad id = "MonoDevelop.Debugger.StackTracePad" defaultLayout="Debug" defaultPlacement = "MonoDevelop.Debugger.WatchPad/Right Bottom" icon="md-view-debug-call-stack" class = "MonoDevelop.Debugger.StackTracePad" _label="Call Stack" />
+ <Pad id = "MonoDevelop.Debugger.ImmediatePad" defaultLayout="Debug" defaultPlacement = "MonoDevelop.Debugger.StackTracePad/Center Bottom" class = "MonoDevelop.Debugger.ImmediatePad" _label="Immediate" />
+ </Category>
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/WorkbenchLayouts">
+ <Layout id="Debug" _name="Debug" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Debugging/ValueVisualizers">
+ <Type class="MonoDevelop.Debugger.Visualizer.TextVisualizer" />
+ <Type class="MonoDevelop.Debugger.Visualizer.PixbufVisualizer" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/StartupHandlers">
+ <Class class="MonoDevelop.Debugger.Initializer" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/Project">
+ <Command id = "MonoDevelop.Debugger.DebugCommands.Debug"
+ defaultHandler = "MonoDevelop.Debugger.DebugHandler"
+ icon = "md-execute-debug"
+ shortcut = "F5"
+ macShortcut = "Meta|Return"
+ _description = "Start debugging"
+ _label = "Start _Debugging" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.DebugEntry"
+ defaultHandler = "MonoDevelop.Debugger.DebugEntryHandler"
+ icon = "md-execute-debug"
+ _description = "Debug current project"
+ _label = "Start D_ebugging Item" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "Debug" id = "Debug">
+
+ <Command id = "MonoDevelop.Debugger.DebugCommands.DebugApplication"
+ defaultHandler = "MonoDevelop.Debugger.DebugApplicationHandler"
+ _label = "Debug Application..." />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.AttachToProcess"
+ defaultHandler = "MonoDevelop.Debugger.AttachToProcessHandler"
+ _label = "Attach to Process..." />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.Detach"
+ defaultHandler = "MonoDevelop.Debugger.DetachFromProcessHandler"
+ _label = "Detach" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.Pause"
+ defaultHandler = "MonoDevelop.Debugger.PauseDebugHandler"
+ shortcut = "Control|Break"
+ _label = "Pause"
+ _description = "Pause Execution"
+ macShortcut = "Alt|Meta|P"
+ icon="md-pause-debug"/>
+ <Command id = "MonoDevelop.Debugger.DebugCommands.Continue"
+ defaultHandler = "MonoDevelop.Debugger.ContinueDebugHandler"
+ _label = "Continue"
+ _description = "Continue Execution"
+ icon="md-continue-debug"/>
+ <Command id = "MonoDevelop.Debugger.DebugCommands.StepOver"
+ defaultHandler = "MonoDevelop.Debugger.StepOverHandler"
+ _label = "Step Over"
+ _description = "Step Over"
+ shortcut = "F10"
+ macShortcut = "Shift|Meta|O"
+ icon="md-step-over-debug"/>
+ <Command id = "MonoDevelop.Debugger.DebugCommands.StepInto"
+ defaultHandler = "MonoDevelop.Debugger.StepIntoHandler"
+ _label = "Step Into"
+ _description = "Step Into"
+ shortcut = "F11"
+ macShortcut = "Shift|Meta|I"
+ icon="md-step-into-debug" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.StepOut"
+ defaultHandler = "MonoDevelop.Debugger.StepOutHandler"
+ _label = "Step Out"
+ _description = "Step Out"
+ shortcut = "Shift|F11"
+ macShortcut = "Shift|Meta|U"
+ icon="md-step-out-debug"/>
+ <Command id = "MonoDevelop.Debugger.DebugCommands.NewBreakpoint"
+ defaultHandler = "MonoDevelop.Debugger.NewBreakpointHandler"
+ _label = "New Breakpoint..."
+ icon = "md-breakpoint-new" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.NewFunctionBreakpoint"
+ defaultHandler = "MonoDevelop.Debugger.NewFunctionBreakpointHandler"
+ _label = "New Function Breakpoint..."
+ icon = "md-breakpoint-new" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.RemoveBreakpoint"
+ defaultHandler = "MonoDevelop.Debugger.RemoveBreakpointHandler"
+ _label = "Remove Breakpoint" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ShowBreakpointProperties"
+ defaultHandler = "MonoDevelop.Debugger.ShowBreakpointPropertiesHandler"
+ _label = "Breakpoint Properties" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ToggleBreakpoint"
+ _label = "Toggle Breakpoint"
+ icon = "md-breakpoint"
+ defaultHandler = "MonoDevelop.Debugger.ToggleBreakpointHandler"
+ shortcut = "F9"
+ macShortcut = "Meta|\" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.AddTracepoint"
+ _label = "Add Tracepoint"
+ defaultHandler = "MonoDevelop.Debugger.AddTracepointHandler"
+ shortcut = "Control|Shift|F9" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.EnableDisableBreakpoint"
+ _label = "Enable/Disable Breakpoint"
+ defaultHandler = "MonoDevelop.Debugger.EnableDisableBreakpointHandler"
+ icon = "md-breakpoint-on-off"
+ shortcut = "Control|F9"
+ macShortcut = "Alt|Meta|/" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.DisableAllBreakpoints"
+ _label = "Enable or Disable All Breakpoints"
+ icon = "md-breakpoint-disable-all"
+ defaultHandler = "MonoDevelop.Debugger.DisableAllBreakpointsHandler" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ClearAllBreakpoints"
+ defaultHandler = "MonoDevelop.Debugger.ClearAllBreakpointsHandler"
+ icon = "md-breakpoint-remove-all"
+ _label = "Clear All Breakpoints" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ShowDisassembly"
+ _label = "Show Disassembly"
+ defaultHandler = "MonoDevelop.Debugger.ShowDisassemblyHandler" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator"
+ _label = "Expression Evaluator"
+ shortcut = "Shift|F9"
+ defaultHandler = "MonoDevelop.Debugger.ExpressionEvaluatorCommand" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.SelectExceptions"
+ _label = "Exceptions..."
+ defaultHandler = "MonoDevelop.Debugger.SelectExceptionsCommand" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.ShowCurrentExecutionLine"
+ _label = "Show Current Execution Line"
+ shortcut = "Alt|*"
+ defaultHandler = "MonoDevelop.Debugger.ShowCurrentExecutionLineCommand" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.AddWatch"
+ _description = "Add expression to watch pad"
+ _label = "Add watch" />
+ <Command id = "MonoDevelop.Debugger.DebugCommands.StopEvaluation"
+ _description = "Stops the execution of the expression being evaluated by the debugger"
+ defaultHandler = "MonoDevelop.Debugger.StopEvaluationHandler"
+ _label = "Stop Evaluation" />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/View">
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ShowDisassembly" insertafter="MonoDevelop.Ide.Commands.ViewCommands.ViewList"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Run">
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.Debug" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.Run"/>
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.Pause" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.Stop"/>
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StopEvaluation" />
+ <SeparatorItem id = "MonoDevelop.Debugger.ExternalDebuggingSection" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.DebugApplication" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.AttachToProcess" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.Detach" />
+ <SeparatorItem id = "MonoDevelop.Debugger.SteppingSection" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepOver" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepInto" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepOut" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ShowCurrentExecutionLine" />
+ <SeparatorItem id = "MonoDevelop.Debugger.BreakpointsSection" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.NewFunctionBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.NewBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ToggleBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.AddTracepoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.EnableDisableBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.DisableAllBreakpoints" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ClearAllBreakpoints" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.SelectExceptions" />
+ <SeparatorItem id = "MonoDevelop.Debugger.ToolsSection" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+ <Condition id="ItemType" value="IBuildTarget">
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.DebugEntry" insertafter="MonoDevelop.Ide.Commands.ProjectCommands.RunEntry" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/ExecutionModes">
+ <ModeSetType id="MonoDevelop.Debugger" class="MonoDevelop.Debugger.DebugExecutionModeSet"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-execute-debug" icon = "gtk-execute|res:debug-overlay-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-execute-debug" icon = "gtk-execute|res:debug-overlay-22.png" size = "SmallToolbar"/>
+ <StockIcon stockid = "md-execute-debug" icon = "gtk-execute|res:debug-overlay-24.png" size = "LargeToolbar"/>
+ <StockIcon stockid = "md-continue-debug" resource = "icoDebug-Continue.png" size = "Menu"/>
+ <StockIcon stockid = "md-pause-debug" resource = "icoDebug-Pause.png" size = "Menu"/>
+ <StockIcon stockid = "md-step-into-debug" resource = "icoDebug-StepIn.png" size = "Menu"/>
+ <StockIcon stockid = "md-step-out-debug" resource = "icoDebug-StepOut.png" size = "Menu"/>
+ <StockIcon stockid = "md-step-over-debug" resource = "icoDebug-StepOver.png" size = "Menu"/>
+ <StockIcon stockid = "md-view-debug-breakpoints" resource = "view-debug-breakpoints-16.png" size="Menu" />
+ <StockIcon stockid = "md-view-debug-call-stack" resource = "view-debug-call-stack-16.png" size="Menu" />
+ <StockIcon stockid = "md-view-debug-locals" resource = "view-debug-locals-16.png" size="Menu" />
+ <StockIcon stockid = "md-view-debug-threads" resource = "view-debug-threads-16.png" size="Menu" />
+ <StockIcon stockid = "md-view-debug-watch" resource = "view-debug-watch-16.png" size="Menu" />
+ <StockIcon stockid = "md-bug" resource = "bug-16.png" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CommandBar">
+ <ItemSet id = "Debug">
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.Continue" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.Pause" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepOver" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepInto" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.StepOut" />
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/Projects">
+ <Section id = "Debugger" _label = "Debugger" icon="md-bug" fill="true" class = "MonoDevelop.Debugger.DebuggerOptionsPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class class="MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..e178396
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,26 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.MonoDevelop.Debugger.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-breakpoints-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-call-stack-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-locals-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-threads-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-watch-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Pause.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepIn.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOut.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOver.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Continue.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.bug-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.lightning.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.Over.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon%402x.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.dll.mdb
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.gtk-gui.gui.stetic b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.gtk-gui.gui.stetic
new file mode 100644
index 0000000..4993703
--- /dev/null
+++ b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.gtk-gui.gui.stetic
@@ -0,0 +1,1996 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.AttachToProcessDialog" design-size="656 413">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Attach to Process</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">3</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Attach to:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryFilter">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryFilterChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Debugger:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboDebs">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Attach</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.ExceptionsDialog" design-size="910 451">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Exceptions</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">3</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Exceptions:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image15">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-find Menu</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryFilter">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryFilterChanged" />
+ <signal name="Activated" handler="OnEntryFilterActivated" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeExceptions">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ <signal name="KeyPressEvent" handler="OnTreeExceptionsKeyPressEvent" />
+ <signal name="ButtonPressEvent" handler="OnTreeExceptionsButtonPressEvent" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-forward Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-back Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Stop in exceptions:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeSelected">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ <signal name="KeyPressEvent" handler="OnTreeSelectedKeyPressEvent" />
+ <signal name="ButtonPressEvent" handler="OnTreeSelectedButtonPressEvent" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.ExpressionEvaluatorDialog" design-size="716 410">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Expression Evaluator</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEval">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="HasDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Evaluate</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonEvalClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="MonoDevelop.Debugger.ObjectValueTreeView" id="valueTree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="AllowAdding">False</property>
+ <property name="AllowEditing">False</property>
+ <property name="AllowPinning">False</property>
+ <property name="RootPinAlwaysVisible">False</property>
+ <property name="AllowExpanding">False</property>
+ <property name="PinnedWatchLine">0</property>
+ <property name="CompactView">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.BreakpointPropertiesDialog" design-size="512 522">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Breakpoint Properties</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxProperties">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Location</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignLocation">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.Table" id="tableLocation">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryFileFunction">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hboxLineColumn">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinLine">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Lower">1</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hboxColumn">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Column:</property>
+ <property name="Justify">Right</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinColumn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Lower">1</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelFileFunction">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelLine">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Line:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Condition</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignCondition">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxConditionOptions">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioBreakAlways">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Always break</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioBreakAlwaysToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioBreakWhenTrue">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Break when condition is true</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioBreakAlwaysToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioBreakWhenChanges">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Break when the expression changes</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioBreakAlwaysToggled" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignConditionExpression">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.HBox" id="hboxConditionExpression">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelConditionExpression">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Condition expression:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryCondition">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelHitCount">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Hit Count</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignHitCount">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxHitCount">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelWhenHit">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">When the condition is hit:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboHitCountMode">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Always break
+Break when the hit count is less than
+Break when the hit count is less than or equal to
+Break when the hit count is equal to
+Break when the hit count is greater than
+Break when the hit count is greater than or equal to
+Break when the hit count is a multiple of</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinHitCount">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100000000</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Action</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignAction">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxAction">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">When the breakpoint is hit:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioActionBreak">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Break</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group2</property>
+ <signal name="Toggled" handler="OnRadioActionBreakToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioActionTrace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Write expression to the output</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group2</property>
+ <signal name="Toggled" handler="OnRadioActionBreakToggled" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignTraceExpression">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.HBox" id="boxTraceExpression">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTraceExpression">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Expression:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryTraceExpression">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.BusyEvaluatorDialog" design-size="381 126">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">The Debugger is Busy</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The Debugger is waiting for an expression evaluation to finish.</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Method:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMethod">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp"><mehtod></property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Stop Debugger</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonCancelClicked" />
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Keep Waiting</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Debugger.DebuggerOptionsPanelWidget" design-size="523 241">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkProjectCodeOnly">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Debug project code only; do not step into framework code.</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkStepOverPropertiesAndOperators">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Step over properties and operators</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkAllowEval">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Allow implicit property evaluation and method invocation</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckAllowEvalToggled" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignmentAllowToString">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkAllowToString">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Call string-conversion function on objects in variables windows</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkShowBaseGroup">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show inherited class members in a base class group</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkGroupPrivate">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Group non-public members</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkGroupStatic">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Group static members</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableEval">
+ <property name="MemberName" />
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">ms</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelEvalTimeout">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Evaluation Timeout:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinTimeout">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">1000000</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">100</property>
+ <property name="ClimbRate">100</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">General</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelPriorityList">
+ <property name="MemberName" />
+ <property name="WidthRequest">417</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">This priority list will be used when selecting the engine to be used for debugging an application.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.PriorityList" id="prioritylist">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelPreferredDebuggers">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Preferred Debuggers</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.AddTracePointDialog" design-size="540 208">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Add Tracepoint</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryCondition">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryTrace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Trace Text:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Condition:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="WidthRequest">450</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><small>Expressions to be evaluated by the debugger can be included in the text by surrounding them with curly braces, for example: "Value is {n}".</small></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">450</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><small>When set, the text will be printed only when this condition evaluates to true.</small></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="HasDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Debugger.ExceptionCaughtWidget" design-size="612 362">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Image" id="imageWarning">
+ <property name="MemberName" />
+ <property name="Pixbuf">resource:exception-icon.png</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxExceptionInfo">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelType">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp"><b>Exception</b> has been thrown</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMessage">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test</property>
+ <property name="Wrap">True</property>
+ <property name="Selectable">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="HeightRequest">128</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeStack">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="HeightRequest">128</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="MonoDevelop.Debugger.ObjectValueTreeView" id="valueView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="AllowAdding">False</property>
+ <property name="AllowEditing">True</property>
+ <property name="AllowPinning">False</property>
+ <property name="RootPinAlwaysVisible">False</property>
+ <property name="AllowExpanding">False</property>
+ <property name="PinnedWatchLine">0</property>
+ <property name="CompactView">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Debugger.Viewers.ValueVisualizerDialog" design-size="628 433">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Value Visualizer</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="mainBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">View as:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboVisualizers">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboVisualizersChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.Over.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.Over.png
new file mode 100644
index 0000000..b5c1570
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.Over.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.png
new file mode 100644
index 0000000..bb21852
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.MonoDevelop.Close.Selected.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.bug-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.bug-16.png
new file mode 100755
index 0000000..cb0ec4b
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.bug-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-16.png
new file mode 100644
index 0000000..4e465eb
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-22.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-22.png
new file mode 100644
index 0000000..3cbd943
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-22.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-24.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-24.png
new file mode 100644
index 0000000..ca91ecf
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-24.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-32.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-32.png
new file mode 100644
index 0000000..ce909a0
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.debug-overlay-32.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon.png
new file mode 100644
index 0000000..84656b5
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon at 2x.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon at 2x.png
new file mode 100644
index 0000000..cf73280
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.exception-icon at 2x.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Continue.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Continue.png
new file mode 100644
index 0000000..718497c
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Continue.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Pause.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Pause.png
new file mode 100644
index 0000000..1d29457
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-Pause.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepIn.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepIn.png
new file mode 100644
index 0000000..e486a5a
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepIn.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOut.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOut.png
new file mode 100644
index 0000000..1d6c993
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOut.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOver.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOver.png
new file mode 100644
index 0000000..e0e6f45
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.icoDebug-StepOver.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.lightning.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.lightning.png
new file mode 100755
index 0000000..c8ce332
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.lightning.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-breakpoints-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-breakpoints-16.png
new file mode 100755
index 0000000..beb2ba2
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-breakpoints-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-call-stack-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-call-stack-16.png
new file mode 100755
index 0000000..7267af8
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-call-stack-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-locals-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-locals-16.png
new file mode 100755
index 0000000..d38c058
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-locals-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-threads-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-threads-16.png
new file mode 100755
index 0000000..06a9cbb
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-threads-16.png differ
diff --git a/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-watch-16.png b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-watch-16.png
new file mode 100755
index 0000000..0eede0c
Binary files /dev/null and b/src/addins/MonoDevelop.Debugger/obj/Debug/MonoDevelop.Debugger.icons.view-debug-watch-16.png differ
diff --git a/src/addins/MonoDevelop.DesignerSupport/Makefile.in b/src/addins/MonoDevelop.DesignerSupport/Makefile.in
index d945f87..8867c86 100644
--- a/src/addins/MonoDevelop.DesignerSupport/Makefile.in
+++ b/src/addins/MonoDevelop.DesignerSupport/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectFileDescriptor.cs b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectFileDescriptor.cs
index 98b74f5..010a8b8 100644
--- a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectFileDescriptor.cs
+++ b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectFileDescriptor.cs
@@ -110,8 +110,6 @@ namespace MonoDevelop.DesignerSupport
protected override bool IsReadOnly (string propertyName)
{
- if (propertyName == "ResourceId" && file.BuildAction != MonoDevelop.Projects.BuildAction.EmbeddedResource)
- return true;
return false;
}
@@ -130,12 +128,12 @@ namespace MonoDevelop.DesignerSupport
}
}
- public override bool CanConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType)
+ public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof (string);
}
- public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
+ public override object ConvertTo (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
{
return (string)value;
}
diff --git a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs
index 1000ed9..824cb71 100644
--- a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs
+++ b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/ToolboxWidget.cs
@@ -139,6 +139,9 @@ namespace MonoDevelop.DesignerSupport.Toolbox
{
categories.Add (category);
foreach (Item item in category.Items) {
+ if (item.Icon == null)
+ continue;
+
this.iconSize.Width = Math.Max (this.iconSize.Width, item.Icon.Width);
this.iconSize.Height = Math.Max (this.iconSize.Height, item.Icon.Height);
}
@@ -768,13 +771,17 @@ namespace MonoDevelop.DesignerSupport.Toolbox
protected override void OnSetScrollAdjustments (Adjustment hAdjustement, Adjustment vAdjustement)
{
this.hAdjustement = hAdjustement;
- this.hAdjustement.ValueChanged += delegate {
- this.QueueDraw ();
- };
+ if (this.hAdjustement != null) {
+ this.hAdjustement.ValueChanged += delegate {
+ this.QueueDraw ();
+ };
+ }
this.vAdjustement = vAdjustement;
- this.vAdjustement.ValueChanged += delegate {
- this.QueueDraw ();
- };
+ if (this.vAdjustement != null) {
+ this.vAdjustement.ValueChanged += delegate {
+ this.QueueDraw ();
+ };
+ }
}
#endregion
diff --git a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.addin.xml b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.addin.xml
index d781b15..77b0eff 100644
--- a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.addin.xml
+++ b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.addin.xml
@@ -7,15 +7,15 @@
description = "Supporting services and pads for visual design tools."
category = "MonoDevelop Core"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly = "MonoDevelop.DesignerSupport.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<!-- Extension points -->
diff --git a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs
index 0428d77..efc4f63 100644
--- a/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs
+++ b/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/ClassOutlineTextEditorExtension.cs
@@ -92,7 +92,9 @@ namespace MonoDevelop.DesignerSupport
if (Document != null)
Document.DocumentParsed -= UpdateDocumentOutline;
RemoveRefillOutlineStoreTimeout ();
-
+ lastCU = null;
+ settings = null;
+ comparer = null;
base.Dispose ();
}
@@ -257,10 +259,14 @@ namespace MonoDevelop.DesignerSupport
return;
var w = (ScrolledWindow)outlineTreeView.Parent;
w.Destroy ();
- outlineTreeModelSort.Dispose ();
- outlineTreeModelSort = null;
- outlineTreeStore.Dispose ();
- outlineTreeStore = null;
+ if (outlineTreeModelSort != null) {
+ outlineTreeModelSort.Dispose ();
+ outlineTreeModelSort = null;
+ }
+ if (outlineTreeStore != null) {
+ outlineTreeStore.Dispose ();
+ outlineTreeStore = null;
+ }
outlineTreeView = null;
settings = null;
foreach (var tw in toolbarWidgets)
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.MonoDevelop.DesignerSupport.addin.xml b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.MonoDevelop.DesignerSupport.addin.xml
new file mode 100644
index 0000000..77b0eff
--- /dev/null
+++ b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.MonoDevelop.DesignerSupport.addin.xml
@@ -0,0 +1,150 @@
+<Addin id = "DesignerSupport"
+ namespace = "MonoDevelop"
+ name = "Visual Designer Support"
+ author = "Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com/"
+ description = "Supporting services and pads for visual design tools."
+ category = "MonoDevelop Core"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly = "MonoDevelop.DesignerSupport.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension points -->
+
+ <ExtensionPoint path = "/MonoDevelop/DesignerSupport/ToolboxProviders" name = "Toolbox item providers">
+ <Description>Provides items to the toolbox. Must implement MonoDevelop.DesignerSupport.Toolbox.IToolboxDefaultProvider and/or IToolboxDynamicProvider</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/DesignerSupport/ToolboxLoaders" name = "Toolbox loaders">
+ <Description>Used to load ItemToolboxNodes into the ToolboxMust implement
+ MonoDevelop.DesignerSupport.Toolbox.IToolboxItemLoader</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/DesignerSupport/PropertyProviders" name = "Providers for the property grid">
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/DesignerSupport/ToolboxItemContextMenu" name = "Toolbox item context menu">
+ <Description>Context menu for toolbox items.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders" extension-nodes="Class">
+ <Class class = "MonoDevelop.DesignerSupport.Projects.ProjectItemPropertyProvider"/>
+ <Class class = "MonoDevelop.DesignerSupport.Projects.SolutionItemPropertyProvider"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.DesignerSupport.Toolbox.ToolboxItemToolboxNode" />
+ <DataType class = "MonoDevelop.DesignerSupport.Toolbox.TextToolboxNode" />
+ <DataType class = "MonoDevelop.DesignerSupport.Toolbox.TypeToolboxNode" />
+ <DataType class = "MonoDevelop.DesignerSupport.Toolbox.ItemToolboxNode" name = "item" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads">
+ <Pad id = "MonoDevelop.DesignerSupport.ToolboxPad"
+ class = "MonoDevelop.DesignerSupport.ToolboxPad"
+ _label="Toolbox"
+ icon = "md-toolbox-pad"
+ defaultLayout="*"
+ defaultPlacement="Right"
+ defaultStatus="AutoHide"
+ />
+ <Pad id = "MonoDevelop.DesignerSupport.PropertyPad"
+ class = "MonoDevelop.DesignerSupport.PropertyPad"
+ _label="Properties"
+ icon = "md-properties-pad"
+ defaultLayout="*"
+ defaultPlacement="MonoDevelop.DesignerSupport.ToolboxPad/bottom; right"
+ defaultStatus="AutoHide"
+ />
+ <Pad id = "MonoDevelop.DesignerSupport.DocumentOutlinePad"
+ class = "MonoDevelop.DesignerSupport.DocumentOutlinePad"
+ _label="Document Outline"
+ icon="md-pad-document-outline"
+ defaultLayout="*"
+ defaultPlacement="MonoDevelop.DesignerSupport.PropertyPad/center; bottom"
+ defaultStatus="AutoHide"
+ />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/WorkbenchLayouts">
+ <Layout id="VisualDesign" _name="Visual Design">
+ <LayoutPad id="MonoDevelop.DesignerSupport.ToolboxPad" status="Dockable" />
+ <LayoutPad id="MonoDevelop.DesignerSupport.PropertyPad" status="Dockable" />
+ <LayoutPad id="MonoDevelop.DesignerSupport.DocumentOutlinePad" status="Dockable" />
+ </Layout>
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/WorkbenchLayouts/Solution">
+ <LayoutPad id="MonoDevelop.DesignerSupport.ToolboxPad" placement="Right" status="AutoHide" />
+ <LayoutPad id="MonoDevelop.DesignerSupport.PropertyPad" placement="Right" status="AutoHide" />
+ <LayoutPad id="MonoDevelop.DesignerSupport.DocumentOutlinePad" placement="Right" status="AutoHide" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-design-categorise" resource = "group-by-category.png" size="Menu" />
+ <StockIcon stockid = "md-design-listboxtoggle" resource = "md-design-listboxtoggle.png" />
+ <StockIcon stockid = "md-properties-pad" resource = "properties-pad-16.png" size="Menu" />
+ <StockIcon stockid = "md-toolbox-pad" resource = "toolbox-pad-16.png" size="Menu" />
+ <StockIcon stockid = "md-pad-document-outline" resource = "pad-document-outline-16.png" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.DesignerSupport.Projects.ComponentNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ClassPad">
+ <NodeBuilder class = "MonoDevelop.DesignerSupport.Projects.ComponentNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.DesignerSupport.Commands.SelectItems"
+ defaultHandler = "MonoDevelop.DesignerSupport.SelectItemsCommandHandler"
+ _label = "Add Items..." />
+ <Command id = "MonoDevelop.DesignerSupport.Commands.SwitchBetweenRelatedFiles"
+ _label = "Switch between related files "
+ _description = "Switch between related files, such as CodeBehind, headers, etc."
+ defaultHandler="MonoDevelop.DesignerSupport.SwitchBetweenRelatedFilesCommand"
+ shortcut="Control|Alt|Up"
+ macShortcut="Control|Meta|Up" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/ContextMenu/DocumentTab">
+ <CommandItem id = "MonoDevelop.DesignerSupport.Commands.SwitchBetweenRelatedFiles" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxItemContextMenu">
+ <CommandItem id = "MonoDevelop.DesignerSupport.Commands.SelectItems" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class class = "MonoDevelop.DesignerSupport.Projects.PropertyPadTextEditorExtension" />
+ <Class class = "MonoDevelop.DesignerSupport.ClassOutlineTextEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxProviders">
+ <Class class="MonoDevelop.DesignerSupport.Toolbox.CodeTemplateToolboxProvider" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="LocalConfig" path="Toolbox.xml" />
+ <!-- 2.6 -->
+ <Migration sourceVersion="2.6" kind="LocalConfig" path="Toolbox.xml" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..9bcb1e0
--- /dev/null
+++ b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,11 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.MonoDevelop.DesignerSupport.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.group-by-category.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.md-design-listboxtoggle.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.properties-pad-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.toolbox-pad-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.pad-document-outline-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.dll.mdb
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.gtk-gui.gui.stetic b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.gtk-gui.gui.stetic
new file mode 100644
index 0000000..37f2b3a
--- /dev/null
+++ b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.gtk-gui.gui.stetic
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog" design-size="642 433">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Toolbox Item Selector</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Type of component:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboType">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboTypeChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VSeparator" id="vseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button24">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-add Menu</property>
+ <property name="Label" translatable="yes">Add Assembly...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButton24Clicked" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkGroupByCat">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Group by component category</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCheckbutton1Clicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.DesignerSupport.ClassOutlineSortingPreferencesDialog" design-size="424 367">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Document Outline Preferences</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="DestroyWithParent">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label">
+ <property name="MemberName" />
+ <property name="WidthRequest">400</property>
+ <property name="LabelProp" translatable="yes">Group sorting order when grouping is enabled:</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.PriorityList" id="priorityList">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.group-by-category.png b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.group-by-category.png
new file mode 100755
index 0000000..5c28dc9
Binary files /dev/null and b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.group-by-category.png differ
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.md-design-listboxtoggle.png b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.md-design-listboxtoggle.png
new file mode 100755
index 0000000..52ffff9
Binary files /dev/null and b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.md-design-listboxtoggle.png differ
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.pad-document-outline-16.png b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.pad-document-outline-16.png
new file mode 100755
index 0000000..977879d
Binary files /dev/null and b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.pad-document-outline-16.png differ
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.properties-pad-16.png b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.properties-pad-16.png
new file mode 100755
index 0000000..dbf7250
Binary files /dev/null and b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.properties-pad-16.png differ
diff --git a/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.toolbox-pad-16.png b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.toolbox-pad-16.png
new file mode 100755
index 0000000..12f988e
Binary files /dev/null and b/src/addins/MonoDevelop.DesignerSupport/obj/Debug/MonoDevelop.DesignerSupport.icons.toolbox-pad-16.png differ
diff --git a/src/addins/MonoDevelop.DocFood/DocFood.addin.xml b/src/addins/MonoDevelop.DocFood/DocFood.addin.xml
index 2f15511..3ee8635 100644
--- a/src/addins/MonoDevelop.DocFood/DocFood.addin.xml
+++ b/src/addins/MonoDevelop.DocFood/DocFood.addin.xml
@@ -6,16 +6,16 @@
url = "http://www.monodevelop.com/"
description = "DocFood is an automated comment generator"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.DocFood.dll" />
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="Refactoring" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
</Dependencies>
diff --git a/src/addins/MonoDevelop.DocFood/Makefile.in b/src/addins/MonoDevelop.DocFood/Makefile.in
index 0b5dada..632ad64 100644
--- a/src/addins/MonoDevelop.DocFood/Makefile.in
+++ b/src/addins/MonoDevelop.DocFood/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood.csproj b/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood.csproj
index 071b518..99aba32 100644
--- a/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood.csproj
+++ b/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood.csproj
@@ -123,11 +123,6 @@
<Name>MonoDevelop.SourceEditor</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -138,5 +133,10 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
</Project>
diff --git a/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs b/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
index 1915d99..8e4be99 100644
--- a/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
+++ b/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
@@ -63,7 +63,7 @@ namespace MonoDevelop.DocFood
continue;
IMember documentMember = null;
foreach (var searchedMember in type.Members.Where (m => m.Name == member.Name)) {
- if (searchedMember.EntityType == member.EntityType && searchedMember.Name == member.Name) {
+ if (searchedMember.SymbolKind == member.SymbolKind && searchedMember.Name == member.Name) {
if ((searchedMember is IParameterizedMember) && ((IParameterizedMember)searchedMember).Parameters.Count != ((IParameterizedMember)member).Parameters.Count)
continue;
if (searchedMember.Accessibility != member.Accessibility)
@@ -131,26 +131,26 @@ namespace MonoDevelop.DocFood
static string GetType (IEntity member)
{
- switch (member.EntityType) {
- case EntityType.Event:
+ switch (member.SymbolKind) {
+ case SymbolKind.Event:
return "event";
- case EntityType.Field:
+ case SymbolKind.Field:
return "field";
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
return "constructor";
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
return "destructor";
- case EntityType.Operator:
+ case SymbolKind.Operator:
return "operator";
- case EntityType.Method:
+ case SymbolKind.Method:
return "method";
// case MemberType.Parameter:
// return "parameter";
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
return "indexer";
- case EntityType.Property:
+ case SymbolKind.Property:
return "property";
- case EntityType.TypeDefinition:
+ case SymbolKind.TypeDefinition:
switch (((ITypeDefinition)member).Kind) {
case TypeKind.Class:
return "class";
diff --git a/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.addin.xml b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.addin.xml
new file mode 100644
index 0000000..3ee8635
--- /dev/null
+++ b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.addin.xml
@@ -0,0 +1,59 @@
+<Addin id = "DocFood"
+ namespace = "MonoDevelop"
+ name = "DocFood"
+ author = "Mike Krüger"
+ copyright = "MIT X11"
+ url = "http://www.monodevelop.com/"
+ description = "DocFood is an automated comment generator"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.DocFood.dll" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Refactoring" version="4.0.12"/>
+ </Dependencies>
+
+
+ <Extension path = "/MonoDevelop/Ide/Commands/TextEditor">
+<!-- <Command id = "MonoDevelop.DocFood.Commands.DocumentThis"
+ defaultHandler = "MonoDevelop.DocFood.DocumentThisHandler"
+ _label = "Document this" /> -->
+ <Command id = "MonoDevelop.DocFood.Commands.DocumentBuffer"
+ defaultHandler = "MonoDevelop.DocFood.DocumentBufferHandler"
+ _label = "Document buffer" />
+ </Extension>
+
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions = ".cs" class = "MonoDevelop.DocFood.DocFoodTextEditorExtension" insertbefore = "MonoDevelop.CSharp.Completion.CSharpTextEditorCompletion" />
+ </Extension>
+
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Edit">
+<!-- <CommandItem id="MonoDevelop.DocFood.Commands.DocumentThis" /> -->
+ <CommandItem id="MonoDevelop.DocFood.Commands.DocumentBuffer" insertafter = "MonoDevelop.Ide.Commands.EditCommands.InsertStandardHeader"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/DocumentationGenerator">
+ <Class class = "MonoDevelop.DocFood.DocGenerator"/>
+ </Extension>
+
+
+
+ <!--
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog">
+ <Section id = "DocFood" _label = "DocFood">
+ <Section id = "Options" _label = "Options" class = "MonoDevelop.DocFood.Options.OptionsPanelPanel" />
+ <Section id = "Expansions" _label = "Expansions" class = "MonoDevelop.DocFood.Options.ExpansionsPanel" />
+ <Section id = "Acronyms" _label = "Acronyms" class = "MonoDevelop.DocFood.Options.AcronymsPanel" />
+ <Section id = "NoTheReordering" _label = '"No the" Words' class = "MonoDevelop.DocFood.Options.NoTheReordering" />
+ <Section id = "OfTheReordering" _label = '"Of the" Reordering' class = "MonoDevelop.DocFood.Options.OfTheReordering" />
+ <Section id = "Rules" _label = "Rules" class = "MonoDevelop.DocFood.Options.RulesPanel" />
+ </Section>
+ </Extension> -->
+</Addin>
diff --git a/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.config.xml b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.config.xml
new file mode 100644
index 0000000..c96b517
--- /dev/null
+++ b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.config.xml
@@ -0,0 +1,562 @@
+<DocFood>
+ <WordLists>
+ <List name="ofThe">
+ <Word>color</Word>
+ <Word>content</Word>
+ <Word>duration</Word>
+ <Word>height</Word>
+ <Word>index</Word>
+ <Word>kind</Word>
+ <Word>length</Word>
+ <Word>name</Word>
+ <Word>size</Word>
+ <Word>state</Word>
+ <Word>type</Word>
+ <Word>width</Word>
+ </List>
+
+ <List name="prefixThe">
+ <Word>actual</Word>
+ <Word>average</Word>
+ <Word>calculated</Word>
+ <Word>default</Word>
+ <Word>display</Word>
+ <Word>empty</Word>
+ <Word>end</Word>
+ <Word>expected</Word>
+ <Word>final</Word>
+ <Word>first</Word>
+ <Word>full</Word>
+ <Word>initial</Word>
+ <Word>last</Word>
+ <Word>long</Word>
+ <Word>maximum</Word>
+ <Word>minimum</Word>
+ <Word>new</Word>
+ <Word>old</Word>
+ <Word>optimum</Word>
+ <Word>partial</Word>
+ <Word>processed</Word>
+ <Word>random</Word>
+ <Word>short</Word>
+ <Word>specified</Word>
+ <Word>start</Word>
+ <Word>total</Word>
+ </List>
+
+ <List name="noThe">
+ <Word>a</Word>
+ <Word>all</Word>
+ <Word>an</Word>
+ <Word>another</Word>
+ <Word>any</Word>
+ <Word>anything</Word>
+ <Word>as</Word>
+ <Word>at</Word>
+ <Word>down</Word>
+ <Word>for</Word>
+ <Word>from</Word>
+ <Word>her</Word>
+ <Word>his</Word>
+ <Word>if</Word>
+ <Word>it</Word>
+ <Word>its</Word>
+ <Word>me</Word>
+ <Word>my</Word>
+ <Word>our</Word>
+ <Word>some</Word>
+ <Word>something</Word>
+ <Word>the</Word>
+ <Word>their</Word>
+ <Word>to</Word>
+ <Word>up</Word>
+ <Word>you</Word>
+ <Word>your</Word>
+ </List>
+
+ <List name="acronyms">
+ <Word>ADO</Word>
+ <Word>ANSI</Word>
+ <Word>API</Word>
+ <Word>ARGB</Word>
+ <Word>ASCII</Word>
+ <Word>ASP</Word>
+ <Word>BLOB</Word>
+ <Word>BOID</Word>
+ <Word>CAB</Word>
+ <Word>CDO</Word>
+ <Word>CLSID</Word>
+ <Word>COM</Word>
+ <Word>DAO</Word>
+ <Word>DCOM</Word>
+ <Word>DES</Word>
+ <Word>DOM</Word>
+ <Word>DSA</Word>
+ <Word>DTE</Word>
+ <Word>EBCDIC</Word>
+ <Word>ECMA</Word>
+ <Word>EMF</Word>
+ <Word>EOF</Word>
+ <Word>ETP</Word>
+ <Word>EULA</Word>
+ <Word>FAQ</Word>
+ <Word>GDI</Word>
+ <Word>GIF</Word>
+ <Word>GUI</Word>
+ <Word>GUID</Word>
+ <Word>IDE</Word>
+ <Word>IDL</Word>
+ <Word>IIS</Word>
+ <Word>IME</Word>
+ <Word>ISAPI</Word>
+ <Word>JIT</Word>
+ <Word>JPEG</Word>
+ <Word>LDAP</Word>
+ <Word>MDI</Word>
+ <Word>MIME</Word>
+ <Word>MPEG</Word>
+ <Word>MRU</Word>
+ <Word>MSDE</Word>
+ <Word>MSIL</Word>
+ <Word>MTA</Word>
+ <Word>MUI</Word>
+ <Word>ODBC</Word>
+ <Word>OLE</Word>
+ <Word>POP3</Word>
+ <Word>RAD</Word>
+ <Word>RESX</Word>
+ <Word>RSA</Word>
+ <Word>SAX</Word>
+ <Word>SDI</Word>
+ <Word>SOAP</Word>
+ <Word>UDP</Word>
+ <Word>UI</Word>
+ <Word>URI</Word>
+ <Word>URL</Word>
+ <Word>UTC</Word>
+ <Word>UTF16</Word>
+ <Word>UTF8</Word>
+ <Word>UUID</Word>
+ <Word>VSA</Word>
+ <Word>VSIP</Word>
+ <Word>WMI</Word>
+ </List>
+ </WordLists>
+
+ <WordExpansion>
+ <Word from="addr" to="address"/>
+ <Word from="alt" to="alternate"/>
+ <Word from="anim" to="animation"/>
+ <Word from="arg" to="argument"/>
+ <Word from="args" to="arguments"/>
+ <Word from="bg" to="background"/>
+ <Word from="buf" to="buffer"/>
+ <Word from="btn" to="button"/>
+ <Word from="calc" to="calculate"/>
+ <Word from="cmp" to="compare"/>
+ <Word from="cnt" to="count"/>
+ <Word from="coord" to="coordinate"/>
+ <Word from="ctx" to="context"/>
+ <Word from="cur" to="current"/>
+ <Word from="dest" to="destination"/>
+ <Word from="doc" to="document"/>
+ <Word from="docs" to="documents"/>
+ <Word from="elem" to="element"/>
+ <Word from="err" to="error"/>
+ <Word from="grp" to="group"/>
+ <Word from="id" to="identifier"/>
+ <Word from="ids" to="identifiers"/>
+ <Word from="idx" to="index"/>
+ <Word from="img" to="image"/>
+ <Word from="len" to="length"/>
+ <Word from="loc" to="location"/>
+ <Word from="mid" to="middle"/>
+ <Word from="min" to="minimum"/>
+ <Word from="msg" to="message"/>
+ <Word from="num" to="number"/>
+ <Word from="obj" to="object"/>
+ <Word from="objs" to="objects"/>
+ <Word from="orig" to="original"/>
+ <Word from="param" to="parameter"/>
+ <Word from="params" to="parameters"/>
+ <Word from="pkg" to="package"/>
+ <Word from="pos" to="position"/>
+ <Word from="pref" to="preference"/>
+ <Word from="prev" to="previous"/>
+ <Word from="prop" to="property"/>
+ <Word from="props" to="properties"/>
+ <Word from="pt" to="point"/>
+ <Word from="ref" to="reference"/>
+ <Word from="refs" to="references"/>
+ <Word from="rnd" to="random"/>
+ <Word from="src" to="source"/>
+ <Word from="stmt" to="statement"/>
+ <Word from="str" to="string"/>
+ <Word from="sz" to="size"/>
+ <Word from="trunc" to="truncate"/>
+ <Word from="txt" to="text"/>
+ <Word from="ui" to="user interface"/>
+ <Word from="val" to="value"/>
+ <Word from="var" to="variable"/>
+ <Word from="vars" to="variables"/>
+ <Word from="win" to="window"/>
+ <Word from="wnd" to="window"/>
+ </WordExpansion>
+
+ <Macros>
+ <Macro tag = "True" value = "<c>true</c>" />
+ <Macro tag = "False" value = "<c>false</c>" />
+ <Macro tag = "Null" value = '<see langword="null"/>' />
+ </Macros>
+
+ <Rules>
+ <Switch>
+ <Case type="class">
+ <Section name="summary">${AllWords}.</Section>
+ </Case>
+ <Case type="delegate">
+ <Section name="summary">${AllWords}.</Section>
+ </Case>
+ <Case type="enum">
+ <Section name="summary">${AllWords}.</Section>
+ </Case>
+ <Case type="interface">
+ <Section name="summary">${AllWords}.</Section>
+ </Case>
+ <Case type="struct">
+ <Section name="summary">${AllWords}.</Section>
+ </Case>
+ <Case type="field">
+ <Switch>
+ <Case modifier="Const">
+ <Section name="summary">Constant ${AllWords}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">${Sentence}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+ <Case type="constructor">
+ <Switch>
+ <Case modifier="Static">
+ <Section name="summary">Initializes the ${DeclaringType} ${DeclaringTypeKind}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">Initializes a new instance of the ${DeclaringType} ${DeclaringTypeKind}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="destructor">
+ <Section name="summary">Releases unmanaged resources and performs other cleanup operations before the ${DeclaringType} is reclaimed by garbage collection.</Section>
+ </Case>
+
+ <Case type="event">
+ <Section name="summary">Occurs when ${AllWords}.</Section>
+ </Case>
+
+ <Case type="indexer">
+ <Switch>
+ <Case parameter="0:index">
+ <Section name="summary">${AccessText} the ${DeclaringType} at the specified index.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">${AccessText} the ${DeclaringType} with the specified ${ParameterSentence}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="method">
+ <Switch>
+ <Case startsWithWord="On">
+ <Section name="summary">Raises the ${AllWordsExceptFirst} event.</Section>
+ </Case>
+
+ <Case startsWithWord="Is,Has,Can">
+ <Switch>
+ <Case wordCount="1">
+ <Switch>
+ <Case modifier="Static">
+ <Section name="summary">Determines if ${AllWords} ${ParameterSentence}.</Section>
+ <Section name="returns">${True} if ${AllWords} ${ParameterSentence}; otherwise, ${False}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">Determines whether this instance ${AllWords} ${ParameterSentence}.</Section>
+ <Section name="returns">${True} if this instance ${AllWords} ${ParameterSentence}; otherwise, ${False}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+ <Default>
+ <If paramCount="0">
+ <Switch>
+ <Case modifier="Static">
+ <Section name="summary">Determines if ${AllWords}.</Section>
+ <Section name="returns">${True} if ${AllWords}; otherwise, ${False}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">Determines whether this instance ${AllWords}.</Section>
+ <Section name="returns">${True} if this instance ${AllWords}; otherwise, ${False}.</Section>
+ </Default>
+ </Switch>
+ </If>
+ <IfNot paramCount="0">
+ <Switch>
+ <Case modifier="Static">
+ <Section name="summary">Determines if ${AllWords} the specified ${ParameterSentence}.</Section>
+ <Section name="returns">${True} if ${AllWords} the specified ${ParameterSentence}; otherwise, ${False}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">Determines whether this instance ${AllWords} the specified ${ParameterSentence}.</Section>
+ <Section name="returns">${True} if this instance ${AllWords} the specified ${ParameterSentence}; otherwise, ${False}.</Section>
+ </Default>
+ </Switch>
+
+ </IfNot>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case name = "Dispose" paramCount="0">
+ <Section name="summary" override="true">Releases all resource used by the ${DeclaringType} object.</Section>
+ <Section name="remarks" override="true">Call ${Member} when you are finished using the ${DeclaringType}. The ${Member} method leaves the ${DeclaringType} in an unusable state. After calling ${Member}, you must release all references to the ${DeclaringType} so the garbage collector can reclaim the memory that the ${DeclaringType} was occupying.</Section>
+ </Case>
+
+ <Case name = "Equals" paramCount="1" returns="System.Boolean">
+ <Section name="summary" override="true">Determines whether the specified ${Parameter0.Type} is equal to the current ${DeclaringType}.</Section>
+ <Section name="param0" override="true">The ${Parameter0.Type} to compare with the current ${DeclaringType}.</Section>
+ <Section name="returns" override="true">${True} if the specified ${Parameter0.Type} is equal to the current ${DeclaringType}; otherwise, ${False}.</Section>
+ </Case>
+ <Case name = "GetHashCode" paramCount="0" returns="System.Int32">
+ <Section name="summary" override="true">Serves as a hash function for a ${DeclaringType} object.</Section>
+ <Section name="returns" override="true">A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.</Section>
+ </Case>
+ <Case name = "ToString" paramCount="0" returns="System.String">
+ <Section name="summary" override="true">Returns a ${ReturnType} that represents the current ${DeclaringType}.</Section>
+ <Section name="returns" override="true">A ${ReturnType} that represents the current ${DeclaringType}.</Section>
+ </Case>
+
+ <Case name = "Main">
+ <Section name="summary">The entry point of the program, where the program control starts and ends.</Section>
+ <If paramCount="1">
+ <Section name="param0">The command-line arguments.</Section>
+ </If>
+ <If returns="System.Int32">
+ <Section name="returns">The exit code that is given to the operating system after the program ends.</Section>
+ </If>
+ </Case>
+ <Case wordCount="1">
+ <If paramCount="0">
+ <Section name="summary">${FirstAsVerb} this instance.</Section>
+ </If>
+ <IfNot paramCount="0">
+ <Section name="summary">${FirstAsVerb} the specified ${ParameterList}.</Section>
+ </IfNot>
+ </Case>
+ <Case endsWith="At,Between">
+ <Section name="summary">${Sentence} ${ParameterList}.</Section>
+ <IfNot returns="System.Void">
+ <Section name="returns">The ${ReturnType}.</Section>
+ </IfNot>
+ </Case>
+ <Default>
+ <If paramCount="0">
+ <Section name="summary">${Sentence}.</Section>
+ </If>
+ <IfNot paramCount="0">
+ <Section name="summary">${Sentence}.</Section>
+ </IfNot>
+ <Switch>
+ <Case returns="System.Boolean">
+ <Section name="returns">${True}, if ${AllWordsExceptFirst} was ${FirstAsVerbPastParticiple}, ${False} otherwise.</Section>
+ </Case>
+ <Default>
+ <IfNot returns="System.Void">
+ <Section name="returns">The ${AllWordsExceptFirst}.</Section>
+ </IfNot>
+ </Default>
+ </Switch>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="operator">
+ <Switch>
+ <Case name="+" paramCount="2">
+ <Section name="summary">Adds a ${Parameter0.Type} to a ${Parameter1.Type}, yielding a new ${ReturnType}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to add.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to add.</Section>
+ <Section name="returns">The ${ReturnType} that is the sum of the values of ${Parameter0.Name} and ${Parameter1.Name}.</Section>
+ </Case>
+ <Case name="-" paramCount="2">
+ <Section name="summary">Subtracts a ${Parameter0.Type} from a ${Parameter1.Type}, yielding a new ${ReturnType}.</Section>
+ <Section name="param0" override="true">The ${Parameter0.Type} to subtract from (the minuend).</Section>
+ <Section name="param1" override="true">The ${Parameter1.Type} to subtract (the subtrahend).</Section>
+ <Section name="returns">The ${ReturnType} that is the ${Parameter0.Name} minus ${Parameter1.Name}.</Section>
+ </Case>
+ <Case name="*" paramCount="2">
+ <Section name="summary">Computes the product of ${Parameter0.Name} and ${Parameter1.name}, yielding a new ${ReturnType}.</Section>
+ <Section name="param0" override="true">The ${Parameter0.Type} to multiply.</Section>
+ <Section name="param1" override="true">The ${Parameter1.Type} to multiply.</Section>
+ <Section name="returns">The ${ReturnType} that is the ${Parameter0.Name} * ${Parameter1.Name}.</Section>
+ </Case>
+ <Case name="/" paramCount="2">
+ <Section name="summary">Computes the division of ${Parameter0.Name} and ${Parameter1.name}, yielding a new ${ReturnType}.</Section>
+ <Section name="param0" override="true">The ${Parameter0.Type} to divide (the divident).</Section>
+ <Section name="param1" override="true">The ${Parameter1.Type} to divide (the divisor).</Section>
+ <Section name="returns">The ${ReturnType} that is the ${Parameter0.Name} / ${Parameter1.Name}.</Section>
+ </Case>
+
+ <Case name="==" paramCount="2">
+ <Section name="summary">Determines whether a specified instance of ${Parameter0.Type} is equal to another specified ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} and ${Parameter1.Name} are equal; otherwise, ${False}.</Section>
+ </Case>
+ <Case name="!=" paramCount="2">
+ <Section name="summary">Determines whether a specified instance of ${Parameter0.Type} is not equal to another specified ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} and ${Parameter1.Name} are not equal; otherwise, ${False}.</Section>
+ </Case>
+ <Case name=">" paramCount="2">
+ <Section name="summary">Determines whether one specified ${Parameter0.Type} is greater than another specfied ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} is greater than ${Parameter1.Name}; otherwise, ${False}.</Section>
+ </Case>
+ <Case name=">=" paramCount="2">
+ <Section name="summary">Determines whether one specified ${Parameter0.Type} is greater than or equal to another specfied ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} is greater than or equal to ${Parameter1.Name}; otherwise, ${False}.</Section>
+ </Case>
+ <Case name="<" paramCount="2">
+ <Section name="summary">Determines whether one specified ${Parameter0.Type} is lower than another specfied ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} is lower than ${Parameter1.Name}; otherwise, ${False}.</Section>
+ </Case>
+ <Case name="<=" paramCount="2">
+ <Section name="summary">Determines whether one specified ${Parameter0.Type} is lower than or equal to another specfied ${Parameter1.Type}.</Section>
+ <Section name="param0" override="true">The first ${Parameter0.Type} to compare.</Section>
+ <Section name="param1" override="true">The second ${Parameter1.Type} to compare.</Section>
+ <Section name="returns">${True} if ${Parameter0.Name} is lower than or equal to ${Parameter1.Name}; otherwise, ${False}.</Section>
+ </Case>
+ </Switch>
+ </Case>
+
+ <Case type="property">
+ <Switch>
+ <Case startsWithWord="Is,Has,Can">
+ <Switch>
+ <Case modifier="Static">
+ <Section name="summary">${AccessText} a value indicating ${AllWords}.</Section>
+ <Section name="value">${True} if ${AllWords}; otherwise, ${False}.</Section>
+ </Case>
+ <Default>
+ <Section name="summary">${AccessText} a value indicating whether this instance ${AllWords}.</Section>
+ <Section name="value">${True} if this instance ${AllWords}; otherwise, ${False}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+ <Case returns="System.Boolean">
+ <If wordCount="1">
+ <Section name="summary">${AccessText} a value indicating whether this ${DeclaringType} is ${AllWords}.</Section>
+ <Section name="value">${True} if ${AllWords}; otherwise, ${False}.</Section>
+ </If>
+ <IfNot wordCount="1">
+ <Section name="summary">${AccessText} a value indicating whether this ${DeclaringType} ${AllWords}.</Section>
+ <Section name="value">${True} if ${AllWords}; otherwise, ${False}.</Section>
+ </IfNot>
+ </Case>
+ <Default>
+ <Section name="summary">${AccessText} ${Sentence}.</Section>
+ <Section name="value">${Sentence}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="parameter">
+ <Switch>
+ <Case returns="System.Boolean">
+ <Section name="param">If set to ${True} ${AllWords}.</Section>
+ </Case>
+ <Case endsWith="EventArgs">
+ <Section name="param">The ${ParameterType} instance containing the event data.</Section>
+ </Case>
+ <Case name = "i">
+ <Section name="param">The index.</Section>
+ </Case>
+ <Case name = "x">
+ <Section name="param">The x coordinate.</Section>
+ </Case>
+ <Case name = "y">
+ <Section name="param">The y coordinate.</Section>
+ </Case>
+ <Case name = "z">
+ <Section name="param">The z coordinate.</Section>
+ </Case>
+ <Case name = "w">
+ <Section name="param">The width.</Section>
+ </Case>
+ <Case name = "h">
+ <Section name="param">The height.</Section>
+ </Case>
+
+ <Case name = "r">
+ <Section name="param">The red component.</Section>
+ </Case>
+ <Case name = "g">
+ <Section name="param">The green component.</Section>
+ </Case>
+ <Case name = "b">
+ <Section name="param">The blue component.</Section>
+ </Case>
+ <Case name = "a">
+ <Section name="param">The alpha component.</Section>
+ </Case>
+
+ <Case name = "x1">
+ <Section name="param">The first x value.</Section>
+ </Case>
+ <Case name = "x2">
+ <Section name="param">The second x value.</Section>
+ </Case>
+
+ <Case name = "y1">
+ <Section name="param">The first y value.</Section>
+ </Case>
+ <Case name = "y2">
+ <Section name="param">The second y value.</Section>
+ </Case>
+
+ <Case name = "z1">
+ <Section name="param">The first z value.</Section>
+ </Case>
+ <Case name = "z2">
+ <Section name="param">The second z value.</Section>
+ </Case>
+ <Default>
+ <Section name="param">${AllWords}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="exception">
+ <Switch>
+ <Default>
+ <Section name="exception">Is thrown when ${Sentence}.</Section>
+ </Default>
+ </Switch>
+ </Case>
+
+ <Case type="typeparam">
+ <Switch>
+ <Default>
+ <Section name="typeparam">The ${TypeParamNumber} type parameter.</Section>
+ </Default>
+ </Switch>
+ </Case>
+ </Switch>
+ </Rules>
+</DocFood>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..c507ea9
--- /dev/null
+++ b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.DocFood.config.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.DocFood.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.DocFood.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.dll.mdb
diff --git a/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.gtk-gui.gui.stetic b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.gtk-gui.gui.stetic
new file mode 100644
index 0000000..4ae1dc1
--- /dev/null
+++ b/src/addins/MonoDevelop.DocFood/obj/Debug/MonoDevelop.DocFood.gtk-gui.gui.stetic
@@ -0,0 +1,998 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/MonoDevelop.DocFood.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.AcronymsPanelWidget" design-size="514 493">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes">All words that consist of only consonants (like sql) and/or upper case letters (like HTML) are treated as acronyms. However the acronym recognition can be improved by defining acronyms.</property>
+ <property name="WrapMode">Word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Acronyms:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewAcronyms</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAcronyms">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">A_cronym:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.OptionsPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbutton1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable automatic documentation</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Macros</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.RulesPanelWidget" design-size="433 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The rules are defined using XML. Click HELP for a full explaination.</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-help</property>
+ <property name="label">gtk-help</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.OfTheReorderingWidget" design-size="424 334">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes">All words that consist of only consonants (like sql) and/or upper case letters (like HTML) are treated as acronyms. However the acronym recognition can be improved by defining acronyms.</property>
+ <property name="WrapMode">Word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">"of the" reordering words:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewAcronyms</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAcronyms">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">A_cronym:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Prefix words for the reordering:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewAcronyms</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow2">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAcronyms1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">A_cronym:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.NoTheReorderingWidget" design-size="424 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes">All words that consist of only consonants (like sql) and/or upper case letters (like HTML) are treated as acronyms. However the acronym recognition can be improved by defining acronyms.</property>
+ <property name="WrapMode">Word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Acronyms:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewAcronyms</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAcronyms">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">A_cronym:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.DocFood.Options.ExpansionsPanelWidget" design-size="417 298">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes">All words that consist of only consonants (like sql) and/or upper case letters (like HTML) are treated as acronyms. However the acronym recognition can be improved by defining acronyms.</property>
+ <property name="WrapMode">Word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Acronyms:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewAcronyms</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewAcronyms">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Gettext/Makefile.in b/src/addins/MonoDevelop.Gettext/Makefile.in
index b3f5026..ac1e7b1 100644
--- a/src/addins/MonoDevelop.Gettext/Makefile.in
+++ b/src/addins/MonoDevelop.Gettext/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml b/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
index 7a20984..9547375 100644
--- a/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
+++ b/src/addins/MonoDevelop.Gettext/MonoDevelop.Gettext.addin.xml
@@ -7,18 +7,18 @@
url = "http://www.monodevelop.com/"
description = "Provides support for adding/editing PO files."
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly = "MonoDevelop.Gettext.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
- <Addin id="Autotools" version="4.0.5"/>
- <Addin id="Deployment" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="Autotools" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
</Dependencies>
<!-- Extension Points -->
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.MonoDevelop.Gettext.addin.xml b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.MonoDevelop.Gettext.addin.xml
new file mode 100644
index 0000000..9547375
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.MonoDevelop.Gettext.addin.xml
@@ -0,0 +1,196 @@
+<Addin
+ id = "Gettext"
+ namespace = "MonoDevelop"
+ name = "Gettext Translations Support"
+ author = "Rafael 'Monoman' Teixeira\nDavid Makovský"
+ copyright = "X11"
+ url = "http://www.monodevelop.com/"
+ description = "Provides support for adding/editing PO files."
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly = "MonoDevelop.Gettext.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="Autotools" version="4.0.12"/>
+ <Addin id="Deployment" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension Points -->
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/TranslationProject" name="Translation project context menu">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Deployment/ProjectBrowser/ContextMenu/Translation" name="Translation context menu">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Gettext/FileScanners" name="File scanners">
+ <ExtensionNode name="Scanner" />
+ <ExtensionNode name="RegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.RegexScannerExtensionNode" />
+ <ExtensionNode name="XmlRegexScanner" type="MonoDevelop.Gettext.ExtensionNodes.XmlRegexScannerExtensionNode" />
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Core/Applications">
+ <Application id = "gettext-update" class = "MonoDevelop.Gettext.GettextTool" description = "Gettext update tool"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.Gettext.Commands.AddTranslation"
+ icon = "md-gettext-locale"
+ _label = "_Add Translation..."
+ _description = "Add another translation (language) for a solution or project" />
+ <Command id = "MonoDevelop.Gettext.Commands.UpdateTranslations"
+ _label = "U_pdate Translations"
+ _description = "Updates all translation files." />
+ <Command id = "MonoDevelop.Gettext.Commands.UpdateTranslation"
+ _label = "_Update Translation"
+ _description = "Updates this translation." />
+ <Command id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
+ type = "check"
+ _label = "_Scan for Translations"
+ _description = "Include this file in the translations scan." />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" />
+ <StockIcon stockid = "md-gettext-locale" resource = "locale_16x16.png" size = "Menu" />
+ <StockIcon stockid = "md-gettext-locale" resource = "locale_22x22.png" size = "Button" />
+ <StockIcon stockid = "md-gettext-locale" resource = "locale_32x32.png" size = "Dnd" />
+ <StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-16.png" size = "Menu" />
+ <StockIcon stockid = "md-gettext-project" icon = "md-project|res:gettext-overlay-32.png" size = "Dnd"/>
+ <StockIcon stockid = "md-po-file" resource = "locale_22x22.png" />
+ <StockIcon stockid = "md-po-file" resource = "locale_16x16.png" size = "Menu" />
+ <StockIcon stockid = "md-po-file" resource = "locale_22x22.png" size = "Button" />
+ <StockIcon stockid = "md-po-file" resource = "locale_32x32.png" size = "Dnd" />
+<!-- <StockIcon stockid = "md-translation-fuzzy" resource = "translation-fuzzy-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-translation-missing" resource = "translation-missing-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-translation-valid" resource = "translation-valid-16.png" size = "Menu"/>-->
+ <StockIcon stockid = "silk_accept" resource = "silk_accept.png" size = "Menu"/>
+ <StockIcon stockid = "silk_error" resource = "silk_error.png" size = "Menu"/>
+ <StockIcon stockid = "silk_exclamation" resource = "silk_exclamation.png" size = "Menu"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-gettext-translation" icon="md-po-file" isText="true">
+ <File pattern="*.po" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "PoFiles" _label = "PO Files" extensions = "*.po"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding id = "GettextEditor" insertbefore ="DefaultDisplayBinding" class = "MonoDevelop.Gettext.GettextEditorDisplayBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.Gettext.TranslationProject" />
+ <DataType class = "MonoDevelop.Gettext.TranslationProjectConfiguration" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+ <Condition id="ItemType" value="MonoDevelop.Gettext.Translation">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" insertafter="ActionsSectionEnd" />
+ <CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslation" />
+ </Condition>
+ <Condition id="ItemType" value="MonoDevelop.Gettext.TranslationProject">
+ <CommandItem id = "MonoDevelop.Gettext.Commands.UpdateTranslations" />
+ <CommandItem id = "MonoDevelop.Gettext.Commands.AddTranslation"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/QuickProperties">
+ <Condition id="ItemType" value="ProjectFile">
+ <CommandItem id = "MonoDevelop.Gettext.Commands.ScanForTranslations"
+ insertafter = "MonoDevelop.Autotools.Commands.SynchWithMakefile" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "MonoDevelop.Gettext.TranslationInfo" resource = "TranslationProject.xpt.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.TranslationNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Gettext.NodeBuilders.ProjectFileNodeBuilderExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders">
+ <Class class = "MonoDevelop.Gettext.PropertyProvider"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.ProjectFile"
+ name = "Gettext.ScanForTranslations" type = "System.Boolean" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+ <Class class = "MonoDevelop.Gettext.GettextFeature" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Autotools/MakefileHandlers">
+ <Class class = "MonoDevelop.Gettext.MakefileHandler"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Gettext/FileScanners">
+ <XmlRegexScanner extension="glade">
+ <Include regex='translatable\s*=\s*"yes"\s*>([^<]*)<' escapeMode="Xml" />
+ </XmlRegexScanner>
+ <XmlRegexScanner extension="xml" mimeType="application/xml">
+ <Include regex='\s_[-A-Za-z0-9._:]+\s*=\s*"([^"]+)"' escapeMode="Xml" />
+ <Include regex="<_[^>]+>((?:.|\n)*?)</_[^>]+>" escapeMode="Xml" />
+ </XmlRegexScanner>
+ <RegexScanner extension="vb">
+ <Exclude regex='".*?[^"]"(?!")' /> <!-- Strings-->
+ <Exclude regex="'(?:(?!').)*" /> <!-- Line comments -->
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
+ <Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
+ <Transform regex='""' value='"' />
+ </RegexScanner>
+ <RegexScanner extension="boo">
+ <Exclude regex='".*?"' /> <!-- Strings -->
+ <Exclude regex="'.*?'" /> <!-- Strings -->
+ <Exclude regex='"""(?:.|\n)*?"""' /> <!-- Strings -->
+ <Exclude regex='//(?:(?!//).)*' /> <!-- Line comments -->
+ <Exclude regex='/\*(?:.|\n)*?\*/' /> <!-- Block comments -->
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"' />
+ <Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"' plural="true"/>
+ </RegexScanner>
+ <RegexScanner extension="cs">
+ <Exclude regex='@".*?"' /> <!-- Strings starting with @ -->
+ <Exclude regex='(?<!@)".*?(?<!\\)"' /> <!-- Strings-->
+ <Exclude regex='//(?:(?!//).)*' /> <!-- Line comments -->
+ <Exclude regex='/\*(?:.|\n)*?\*/' /> <!-- Block comments -->
+
+ <Include regex='\[\s*LocalizedDisplayName?\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='\[\s*LocalizedDescription\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='\[\s*LocalizedCategory\s*\(\s*"(.*?[^\\])"\s*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
+
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
+
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
+
+ <Include regex='GetString\s*\(\s*"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='GetPluralString\s*\(\s*"(.*?[^\\])"\s*,\s*"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='GetString\s*\(\s*@"(.*?[^\\])"\s*[,\)]' regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
+ <Include regex='GetPluralString\s*\(\s*@"(.*?[^\\])"\s*,\s*@"(.*?[^\\])"\s*[,\)]' plural="true" regexOptions="Singleline" escapeMode="CSharpVerbatim"/>
+ <Transform regex='([^\\])"\s*\+\s*"' value='$1' regexOptions="Singleline"/><!-- strip out "+" concatenations -->
+
+ <Include regex='\[\s*IssueDescription\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='\[\s*ContextAction\s*\(\s*"(.*?[^\\])".*\)\s*\]' regexOptions="Singleline" escapeMode="CSharp"/>
+ <Include regex='TranslateString\s*\(\s*"(.*?[^\\])"\s*[\)]' regexOptions="Singleline" escapeMode="CSharp"/>
+ </RegexScanner>
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..a187e43
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,22 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/am/MonoDevelop.Gettext.templates.Makefile.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.MonoDevelop.Gettext.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.TranslationProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_22x22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_32x32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-fuzzy-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-missing-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-valid-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_accept.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_error.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_exclamation.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.Makefile.template
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/am/MonoDevelop.Gettext.resources.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/Gettext/MonoDevelop.Gettext.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/Gettext/MonoDevelop.Gettext.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/Gettext/am/MonoDevelop.Gettext.resources.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.dll.mdb
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.gtk-gui.gui.stetic b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9e30ff6
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.gtk-gui.gui.stetic
@@ -0,0 +1,1848 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Gettext/MonoDevelop.Gettext.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.Gettext.Editor.CatalogHeadersWidget" design-size="672 613">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">1</property>
+ <property name="TabPos">Left</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">6</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryBugzilla">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryProjectName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryProjectVersion">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Last modification:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Comments:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">textviewComments</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Project name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryProjectName</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">P_roject version:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryProjectVersion</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Bugzilla URL:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryBugzilla</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Creation date:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelPoLastModification">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelPotCreation">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textviewComments">
+ <property name="MemberName" />
+ <property name="HeightRequest">180</property>
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Project settings</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">6</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboboxentryCharset">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryLanguageGroupEmail">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryLanguageGroupName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryTranslatorEmail">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryTranslatorName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">4</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryPluralsForms">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Translator name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryTranslatorName</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">T_ranslator e-mail:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryTranslatorEmail</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Language group:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryLanguageGroupName</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">L_anguage group e-mail:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryLanguageGroupEmail</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Charset:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label15">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Plural forms:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryPluralsForms</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Language settings</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Gettext.Translator.LanguageChooserDialog" design-size="466 415">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Create New Localization</property>
+ <property name="Icon">resource:locale_16x16.png</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Gravity">Center</property>
+ <property name="SkipTaskbarHint">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">16</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">8</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="tableKnown">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="WidthRequest">170</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Language:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">languageTreeView</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="HeightRequest">200</property>
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="languageTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonUseCoutry">
+ <property name="MemberName" />
+ <property name="WidthRequest">220</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">U_se Country Code</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="ChangeSensitivity" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="countryTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonKnown">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Known Language</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame2">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hboxUser">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">L_ocale:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryLocale</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryLocale">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryLocaleChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonCustom">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_User Defined Locale</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.Gettext.LanguageChooserDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOK">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Gettext.TranslationProjectOptionsDialog" design-size="519 426">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Translation Options</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">1</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Package name:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPackageName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryRelPath">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderentrySystemPath">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonRelPath">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Relative to output path:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonSystemPath">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_System path:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Output</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame2">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The catalog initialization string should look like:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame3">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.Label" id="labelInitString">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Mono.Unix.Catalog.Init ("i18n", "./locale");</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Init String</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Settings</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewProjectList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Include in Projects</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Gettext.POEditorWidget" design-size="748 638">
+ <action-group name="Default" />
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebookPages">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="ShowBorder">False</property>
+ <property name="ShowTabs">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Filter:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.SearchEntry" id="searchEntryFilter">
+ <property name="MemberName" />
+ <property name="ForceFilterButtonVisible">False</property>
+ <property name="IsCheckMenu">False</property>
+ <property name="ActiveFilterID">0</property>
+ <property name="Ready">False</property>
+ <property name="HasFocus">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ToggleButton" id="togglebuttonOk">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">resource:silk_accept.png</property>
+ <property name="Label" translatable="yes">Valid</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ToggleButton" id="togglebuttonMissing">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">resource:silk_exclamation.png</property>
+ <property name="Label" translatable="yes">Missing</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ToggleButton" id="togglebuttonFuzzy">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">resource:silk_error.png</property>
+ <property name="Label" translatable="yes">Fuzzy</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">186</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewEntries">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="Homogeneous">True</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Comments:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">textviewComments</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textviewComments">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="AcceptsTab">False</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Translated (msgstr):</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">notebookTranslated</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Notebook" id="notebookTranslated">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Original (msgid):</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonWhiteSpaces">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">S_how whitespaces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindowOriginal">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox8">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Original plural (msgid_plural):</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindowPlural">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">F_ound in:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeviewFoundIn</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewFoundIn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Toolbar" id="toolbarPages">
+ <property name="MemberName" />
+ <property name="ShowArrow">False</property>
+ <property name="ButtonStyle">Icons</property>
+ <property name="IconSize">LargeToolbar</property>
+ <node name="toolbarPages" type="Toolbar" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ProgressBar" id="progressbar1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Gettext.GettextFeatureWidget" design-size="500 239">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the languages you want to support (more languages can be added later):</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewTranslations">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-16.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-16.png
new file mode 100644
index 0000000..728c2a3
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-16.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-32.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-32.png
new file mode 100644
index 0000000..9fc3638
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.gettext-overlay-32.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_16x16.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_16x16.png
new file mode 100644
index 0000000..6479612
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_16x16.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_22x22.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_22x22.png
new file mode 100644
index 0000000..38b36b4
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_22x22.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_32x32.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_32x32.png
new file mode 100644
index 0000000..608a0b1
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.locale_32x32.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_accept.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_accept.png
new file mode 100644
index 0000000..2045f2a
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_accept.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_error.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_error.png
new file mode 100644
index 0000000..8d23700
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_error.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_exclamation.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_exclamation.png
new file mode 100644
index 0000000..5a3f8f1
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.silk_exclamation.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-fuzzy-16.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-fuzzy-16.png
new file mode 100644
index 0000000..11d8e2c
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-fuzzy-16.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-missing-16.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-missing-16.png
new file mode 100644
index 0000000..38dd43a
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-missing-16.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-valid-16.png b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-valid-16.png
new file mode 100644
index 0000000..25eda90
Binary files /dev/null and b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.icons.translation-valid-16.png differ
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.Makefile.template b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.Makefile.template
new file mode 100644
index 0000000..021a638
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.Makefile.template
@@ -0,0 +1,30 @@
+
+# Warning: This is an automatically generated file, do not edit!
+
+srcdir=.
+top_srcdir=%%TOP_SRCDIR%%
+
+include $(top_srcdir)/Makefile.include
+include $(top_srcdir)/config.make
+
+BUILD_DIR = %%BUILD_DIR%%
+INSTALL_DIR = %%INSTALL_DIR%%
+
+FILES = %%FILES%%
+
+GMO_FILES = $(patsubst %.po,$(BUILD_DIR)/%.gmo,$(FILES))
+MO_FILES = $(foreach po,$(FILES), $(INSTALL_DIR)/$(basename $(po))/LC_MESSAGES/$(PACKAGE).mo)
+
+%%ALL_TARGET%%: $(GMO_FILES)
+
+$(GMO_FILES): $(BUILD_DIR)/%.gmo: %.po
+ mkdir -p $(BUILD_DIR)
+ msgfmt '$<' -o '$@'
+
+$(MO_FILES): $(INSTALL_DIR)/%/LC_MESSAGES/$(PACKAGE).mo : $(BUILD_DIR)/%.gmo
+ mkdir -p $(dir $@)
+ cp '$<' '$@'
+
+install-local: $(MO_FILES)
+
+CLEANFILES = $(GMO_FILES)
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.TranslationProject.xpt.xml b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.TranslationProject.xpt.xml
new file mode 100644
index 0000000..1c2799e
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/MonoDevelop.Gettext.templates.TranslationProject.xpt.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template originator = "Mike Krüger">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Translation Project</_Name>
+ <_Category>Other</_Category>
+ <Icon>md-project|res:gettext-overlay-32.png</Icon>
+ <_Description>Creates a translation project.</_Description>
+ <DefaultFilename>TranslationProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <CombineEntry name = "${ProjectName}"
+ directory = "."
+ type = "MonoDevelop.Gettext.TranslationProject"
+ packageName="i8n1"
+ outputType="RelativeToOutput"
+ relPath="locale" />
+ </Combine>
+
+</Template>
diff --git a/src/addins/MonoDevelop.Gettext/obj/Debug/am/MonoDevelop.Gettext.templates.Makefile.template b/src/addins/MonoDevelop.Gettext/obj/Debug/am/MonoDevelop.Gettext.templates.Makefile.template
new file mode 100644
index 0000000..3962478
--- /dev/null
+++ b/src/addins/MonoDevelop.Gettext/obj/Debug/am/MonoDevelop.Gettext.templates.Makefile.template
@@ -0,0 +1,32 @@
+
+# Warning: This is an automatically generated file, do not edit!
+
+CLEANFILES = $(GMO_FILES)
+
+include $(top_srcdir)/Makefile.include
+
+PACKAGE = @PACKAGE@
+BUILD_DIR = %%BUILD_DIR%%
+INSTALL_DIR = %%INSTALL_DIR%%
+
+FILES = %%FILES%%
+
+GMO_FILES = $(patsubst %.po,$(BUILD_DIR)/%.gmo,$(FILES))
+MO_FILES = $(foreach po,$(FILES), $(INSTALL_DIR)/$(basename $(po))/LC_MESSAGES/$(PACKAGE).mo)
+
+all: $(GMO_FILES)
+
+install: $(MO_FILES)
+
+uninstall:
+ for lang in $(basename $(FILES)); do \
+ rm -f $(INSTALL_DIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
+ done
+
+$(GMO_FILES): $(BUILD_DIR)/%.gmo: %.po
+ mkdir -p $(BUILD_DIR)
+ msgfmt '$<' -o '$@'
+
+$(MO_FILES): $(INSTALL_DIR)/%/LC_MESSAGES/$(PACKAGE).mo : $(BUILD_DIR)/%.gmo
+ mkdir -p $(dir $@)
+ @INSTALL_DATA@ '$<' '$@'
diff --git a/src/addins/MonoDevelop.Gettext/templates/TranslationProject.xpt.xml b/src/addins/MonoDevelop.Gettext/templates/TranslationProject.xpt.xml
index 6406a87..1c2799e 100644
--- a/src/addins/MonoDevelop.Gettext/templates/TranslationProject.xpt.xml
+++ b/src/addins/MonoDevelop.Gettext/templates/TranslationProject.xpt.xml
@@ -7,6 +7,7 @@
<_Category>Other</_Category>
<Icon>md-project|res:gettext-overlay-32.png</Icon>
<_Description>Creates a translation project.</_Description>
+ <DefaultFilename>TranslationProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/MonoDevelop.GtkCore/Makefile.in b/src/addins/MonoDevelop.GtkCore/Makefile.in
index 6e8e935..869ac64 100644
--- a/src/addins/MonoDevelop.GtkCore/Makefile.in
+++ b/src/addins/MonoDevelop.GtkCore/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -288,11 +287,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -356,6 +355,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -419,6 +422,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -576,21 +593,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all: csproj_build
diff --git a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderDisplayBinding.cs b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderDisplayBinding.cs
index 79fda9d..603b0be 100644
--- a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderDisplayBinding.cs
+++ b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/GuiBuilderDisplayBinding.cs
@@ -51,7 +51,7 @@ namespace MonoDevelop.GtkCore.GuiBuilder
if (excludeThis)
return false;
- if (fileName.IsNullOrEmpty == null)
+ if (fileName.IsNullOrEmpty)
return false;
if (GetWindow (fileName) == null)
diff --git a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.addin.xml b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.addin.xml
index 92601ac..c3a1ede 100644
--- a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.addin.xml
+++ b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.addin.xml
@@ -6,7 +6,7 @@
url = ""
description = "Provides support for visual design of GTK# windows, dialogs and widgets."
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="libstetic.dll"/>
@@ -17,9 +17,9 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.ActionGroup">
diff --git a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkDesignInfo.cs b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkDesignInfo.cs
index 13f3bbc..db68f3e 100644
--- a/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkDesignInfo.cs
+++ b/src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore/GtkDesignInfo.cs
@@ -235,7 +235,6 @@ namespace MonoDevelop.GtkCore
try {
FileInfo fi = new FileInfo (SteticFile);
fi.LastWriteTime = DateTime.Now;
- project.SetNeedsBuilding (true);
} catch {
// Ignore errors here
}
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/GladeUtils.cs b/src/addins/MonoDevelop.GtkCore/libstetic/GladeUtils.cs
index 9874e7c..0541f67 100644
--- a/src/addins/MonoDevelop.GtkCore/libstetic/GladeUtils.cs
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/GladeUtils.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using System.Reflection;
using System.Collections;
using System.Runtime.InteropServices;
@@ -28,7 +29,11 @@ namespace Stetic {
doctype.SystemId != Glade20SystemId)
throw new GladeException ("Not a glade file according to doctype");
*/
- XmlReader reader = Registry.GladeImportXsl.Transform (doc, null, (XmlResolver)null);
+
+ StringWriter sw = new StringWriter ();
+ XmlWriter xw = XmlWriter.Create (sw);
+ Registry.GladeImportXsl.Transform (doc, xw);
+ XmlReader reader = XmlReader.Create (sw.ToString ());
doc = new XmlDocument ();
doc.PreserveWhitespace = true;
doc.Load (reader);
@@ -38,7 +43,10 @@ namespace Stetic {
public static XmlDocument XslExportTransform (XmlDocument doc)
{
- XmlReader reader = Registry.GladeExportXsl.Transform (doc, null, (XmlResolver)null);
+ StringWriter sw = new StringWriter ();
+ XmlWriter xw = XmlWriter.Create (sw);
+ Registry.GladeExportXsl.Transform (doc, xw);
+ XmlReader reader = XmlReader.Create (sw.ToString ());
doc = new XmlDocument ();
doc.PreserveWhitespace = true;
doc.Load (reader);
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/Makefile.in b/src/addins/MonoDevelop.GtkCore/libstetic/Makefile.in
index cd42137..7ced5e6 100644
--- a/src/addins/MonoDevelop.GtkCore/libstetic/Makefile.in
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/Placeholder.cs b/src/addins/MonoDevelop.GtkCore/libstetic/Placeholder.cs
index d5a6b69..877f738 100644
--- a/src/addins/MonoDevelop.GtkCore/libstetic/Placeholder.cs
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/Placeholder.cs
@@ -103,11 +103,12 @@ namespace Stetic {
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
- Cairo.LinearGradient pat = new Cairo.LinearGradient (rect.X + rect.Width*fx, rect.Y + rect.Height*fy, rect.X + rect.Width*fw, rect.Y + rect.Height*fh);
- pat.AddColorStop (0, c1);
- pat.AddColorStop (1, c2);
- cr.Pattern = pat;
- cr.FillPreserve ();
+ using (var pat = new Cairo.LinearGradient (rect.X + rect.Width*fx, rect.Y + rect.Height*fy, rect.X + rect.Width*fw, rect.Y + rect.Height*fh)) {
+ pat.AddColorStop (0, c1);
+ pat.AddColorStop (1, c2);
+ cr.Pattern = pat;
+ cr.FillPreserve ();
+ }
}
bool IEditableObject.CanDelete {
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/Registry.cs b/src/addins/MonoDevelop.GtkCore/libstetic/Registry.cs
index 978c6ee..d6c5c65 100644
--- a/src/addins/MonoDevelop.GtkCore/libstetic/Registry.cs
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/Registry.cs
@@ -10,7 +10,7 @@ namespace Stetic {
static ArrayList libraries = new ArrayList ();
static ArrayList classes = new ArrayList ();
- static XslTransform gladeImport, gladeExport;
+ static XslCompiledTransform gladeImport, gladeExport;
static WidgetLibrary coreLib;
public static event EventHandler RegistryChanging;
@@ -183,8 +183,8 @@ namespace Stetic {
doc.FirstChild.PrependChild (doc.ImportNode (elem, true));
}
- gladeImport = new XslTransform ();
- gladeImport.Load (doc, null, null);
+ gladeImport = new XslCompiledTransform ();
+ gladeImport.Load (doc);
doc = CreateGladeTransformBase ();
@@ -193,8 +193,8 @@ namespace Stetic {
doc.FirstChild.PrependChild (doc.ImportNode (elem, true));
}
- gladeExport = new XslTransform ();
- gladeExport.Load (doc, null, null);
+ gladeExport = new XslCompiledTransform ();
+ gladeExport.Load (doc);
}
static XmlDocument CreateGladeTransformBase ()
@@ -218,13 +218,13 @@ namespace Stetic {
}
}
- public static XslTransform GladeImportXsl {
+ public static XslCompiledTransform GladeImportXsl {
get {
return gladeImport;
}
}
- public static XslTransform GladeExportXsl {
+ public static XslCompiledTransform GladeExportXsl {
get {
return gladeExport;
}
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.stetic.glade b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.stetic.glade
new file mode 100644
index 0000000..9f58816
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.stetic.glade
@@ -0,0 +1,2107 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="SelectImageDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select Image</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">650</property>
+ <property name="default_height">450</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+ <signal name="switch_page" handler="OnCurrentPageChanged" last_modification_time="Thu, 18 May 2006 12:07:20 GMT"/>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="iconScrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkImage" id="previewIcon">
+ <property name="visible">True</property>
+ <property name="icon_size">4</property>
+ <property name="icon_name">gtk-missing-image</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">3</property>
+ <property name="ypad">3</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Icon Name:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">iconNameEntry</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="iconNameEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnIconNameChanged" last_modification_time="Fri, 10 Mar 2006 13:48:39 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="iconSizeCombo">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes"></property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ <signal name="changed" handler="OnIconSizeChanged" last_modification_time="Fri, 10 Mar 2006 13:50:33 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Themed Icons</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow7">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="resourceList">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="buttonAdd">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnAddResource" last_modification_time="Fri, 10 Mar 2006 11:17:29 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="buttonRemove">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnRemoveResource" last_modification_time="Fri, 10 Mar 2006 11:17:42 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkImage" id="previewResource">
+ <property name="width_request">30</property>
+ <property name="height_request">30</property>
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Resource Name:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="resourceNameEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnResourceNameChanged" last_modification_time="Fri, 10 Mar 2006 16:31:30 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Resources</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFileChooserWidget" id="fileChooser">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+ <property name="local_only">True</property>
+ <property name="select_multiple">False</property>
+ <property name="show_hidden">False</property>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Files</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="FlagsSelectorDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Flags</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">500</property>
+ <property name="default_height">450</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow8">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="treeView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="TextEditorDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Text</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">600</property>
+ <property name="default_height">350</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow9">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_CHAR</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkTranslatable">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Translatable</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="OnTranslatableToggled" last_modification_time="Fri, 17 Mar 2006 16:37:34 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="translationTable">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Translation Context Hint:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Comment for Translators</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="entryContext">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="entryComment">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="SelectIconDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select Image</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">650</property>
+ <property name="default_height">450</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+ <signal name="switch_page" handler="OnCurrentPageChanged" last_modification_time="Thu, 18 May 2006 12:05:33 GMT"/>
+
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="iconScrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkImage" id="previewIcon">
+ <property name="visible">True</property>
+ <property name="icon_size">4</property>
+ <property name="icon_name">gtk-missing-image</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xpad">3</property>
+ <property name="ypad">3</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Icon Name:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">stockIconEntry</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="stockIconEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnIconNameChanged" last_modification_time="Fri, 10 Mar 2006 13:48:39 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="labelWarningIcon">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHSeparator" id="hseparator2">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="border_width">3</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-warning</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="labelWarning">
+ <property name="width_request">513</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The selected icon may not show at run time if the required icon factory is not properly initialized.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Stock Icons</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="customIconScrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnAddIcon" last_modification_time="Wed, 17 May 2006 11:25:29 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-edit</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnEditIcon" last_modification_time="Wed, 17 May 2006 11:24:58 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button5">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnRemoveIcon" last_modification_time="Wed, 17 May 2006 11:25:18 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Project Icons</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="EditIconDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Edit Icon</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">650</property>
+ <property name="default_height">400</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area4">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton4">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Icon name:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="nameEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <property name="width_chars">20</property>
+ <signal name="changed" handler="OnNameChanged" last_modification_time="Wed, 17 May 2006 15:53:15 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radioSingle">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Single source icon</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="clicked" handler="OnSingleClicked" last_modification_time="Wed, 17 May 2006 12:17:45 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hboxSingle">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="width_request">12</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Image:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkImage" id="imageImage">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="imageLabel">
+ <property name="visible">True</property>
+ <property name="label">image name</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button9">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Select Image...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnSelectImage" last_modification_time="Wed, 17 May 2006 12:11:57 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radioMultiple">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Multiple source icon</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radioSingle</property>
+ <signal name="clicked" handler="OnMultipleClicked" last_modification_time="Wed, 17 May 2006 12:18:00 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">3</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="width_request">12</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hboxMultiple">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow13">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="sourceList">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkButton" id="button10">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnAddSource" last_modification_time="Wed, 17 May 2006 12:12:11 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button11">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnRemoveSource" last_modification_time="Wed, 17 May 2006 12:12:21 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="EditIconFactoryDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Edit Icon Factory</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="default_width">450</property>
+ <property name="default_height">460</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button17">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-7</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox22">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="iconListScrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox4">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="button18">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnAddIcon" last_modification_time="Wed, 17 May 2006 11:25:29 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button19">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-edit</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnEditIcon" last_modification_time="Wed, 17 May 2006 11:24:58 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button20">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="OnRemoveIcon" last_modification_time="Wed, 17 May 2006 11:25:18 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="AddNonContainerDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Widget Designer</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</property>
+ <property name="resizable">False</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area5">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton5">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox23">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-warning</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="mainBox">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="width_request">449</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">You are trying to add a non-container widget into the main window. In <b>GTK#</b>, widget positioning is controlled by a special type of widgets called <b>Container</b> widgets. If you don't place the widget into a container, it will fill the all the available space in the window. Are you sure you want to continue?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox24">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">To know more about this topic see the article:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="linkButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">GTK# Widget Layout and Packing</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="showCheck">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Don't show this message again</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.objects.xml b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.objects.xml
new file mode 100644
index 0000000..ea3407f
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.objects.xml
@@ -0,0 +1,2292 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<objects xmlns:xsl="http://www.w3.org/1999/XSL/Transform" gtk-version="2.4">
+
+ <object type="Gtk.Widget,gtk-sharp" wrapper="Stetic.Wrapper.Widget">
+ <itemgroups>
+ <itemgroup label="Common Widget Properties">
+ <property name="MemberName"
+ editor="Stetic.Editor.Identifier"
+ description="Name of the member to which this widget is bound." />
+ <property name="WidthRequest" min="-1" />
+ <property name="HeightRequest" min="-1" />
+ <property name="Visible" glade-override="true" default="true"/>
+ <property name="Sensitive" glade-override="true" />
+ <property name="Tooltip" label="Tooltip" glade-name="tooltip"
+ description="Tooltip for this widget"
+ translatable="true" />
+ <property name="CanDefault" />
+ <property name="InWindow" internal="true"/>
+ <property name="HasDefault" glade-override="true">
+ <invisible-if name="InWindow" value="false" />
+ </property>
+ <property name="CanFocus" />
+ <property name="Events" default="0"/>
+ <property name="ExtensionEvents" />
+ <property name="IsScrollable" internal="true"/>
+ <property name="ShowScrollbars" label="Show Scrollbars" default="false">
+ <invisible-if name="IsScrollable" value="false" />
+ </property>
+ <property name="GeneratePublic" internal="true" default="true"/>
+ <property name="Name" internal="true"
+ min="1"
+ init-with-name="true"
+ editor="Stetic.Editor.Identifier"/>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Common Widget Signals">
+ <signal name="AccelCanActivate" />
+ <signal name="AccelClosuresChanged" />
+ <signal name="ButtonPressEvent" />
+ <signal name="ButtonReleaseEvent" />
+ <signal name="ChildNotified" />
+ <signal name="ClientEvent" />
+ <signal name="ConfigureEvent" />
+ <signal name="DeleteEvent" />
+ <signal name="DestroyEvent" />
+ <signal name="DirectionChanged" />
+ <signal name="DragBegin" />
+ <signal name="DragDataDelete"/>
+ <signal name="DragDataGet" />
+ <signal name="DragDataReceived" />
+ <signal name="DragDrop" />
+ <signal name="DragEnd" />
+ <signal name="DragLeave" />
+ <signal name="DragMotion" />
+ <signal name="EnterNotifyEvent" />
+ <signal name="ExposeEvent" />
+ <signal name="Focused" />
+ <signal name="FocusGrabbed" />
+ <signal name="FocusInEvent" />
+ <signal name="FocusOutEvent" />
+ <signal name="GrabBrokenEvent" gtk-version="2.8"/>
+ <signal name="GrabNotify" />
+ <signal name="HelpShown" />
+ <signal name="Hidden" />
+ <signal name="HierarchyChanged" />
+ <signal name="KeyPressEvent" />
+ <signal name="KeyReleaseEvent" />
+ <signal name="LeaveNotifyEvent" />
+ <signal name="MapEvent" />
+ <signal name="Mapped" />
+ <signal name="MnemonicActivated" />
+ <signal name="MotionNotifyEvent" />
+ <signal name="NoExposeEvent" />
+ <signal name="ParentSet" />
+ <signal name="PopupMenu" />
+ <signal name="PropertyNotifyEvent" />
+ <signal name="ProximityInEvent" />
+ <signal name="ProximityOutEvent" />
+ <signal name="Realized" />
+ <signal name="ScreenChanged" />
+ <signal name="ScrollEvent" />
+ <signal name="SelectionClearEvent" />
+ <signal name="SelectionGet" />
+ <signal name="SelectionNotifyEvent" />
+ <signal name="SelectionReceived" />
+ <signal name="SelectionRequestEvent" />
+ <signal name="Shown" />
+ <signal name="SizeAllocated" />
+ <signal name="SizeRequested" />
+ <signal name="StateChanged" />
+ <signal name="StyleSet" />
+ <signal name="UnmapEvent" />
+ <signal name="Unmapped" />
+ <signal name="Unrealized" />
+ <signal name="VisibilityNotifyEvent" />
+ <signal name="WidgetEvent" />
+ <signal name="WidgetEventAfter" />
+ <signal name="WindowStateEvent" />
+ </itemgroup>
+ </signals>
+
+ <glade-transform>
+ <!-- "events" property has extra spaces around "|"s -->
+ <import>
+ <xsl:template match="widget/property[@name='events']/text()">
+ <xsl:call-template name="GtkWidget_fixevents">
+ <xsl:with-param name="string" select="." />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="GtkWidget_fixevents">
+ <xsl:param name="string"/>
+ <xsl:choose>
+ <xsl:when test="contains($string, ' | ')">
+ <xsl:value-of select="substring-before($string, ' | ')"/>
+ <xsl:text>|</xsl:text>
+ <xsl:call-template name="GtkWidget_fixevents">
+ <xsl:with-param name="string" select="substring-after($string, ' | ')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ </import>
+ <export>
+ <xsl:template match="widget/property[@name='events']/text()">
+ <xsl:call-template name="GtkWidget_breakevents">
+ <xsl:with-param name="string" select="." />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="GtkWidget_breakevents">
+ <xsl:param name="string"/>
+ <xsl:choose>
+ <xsl:when test="contains($string, '|')">
+ <xsl:value-of select="substring-before($string, '|')"/>
+ <xsl:text> | </xsl:text>
+ <xsl:call-template name="GtkWidget_breakevents">
+ <xsl:with-param name="string" select="substring-after($string, '|')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ </export>
+ </glade-transform>
+ </object>
+
+ <object type="Gtk.Container,gtk-sharp" wrapper="Stetic.Wrapper.Container" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup name="Commands">
+ <command name="IncreaseBorderWidth" label="Increase Border Width" icon="res:inc-border.png" />
+ <command name="DecreaseBorderWidth" label="Decrease Border Width" icon="res:dec-border.png" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Container Signals">
+ <signal name="Added" />
+ <signal name="FocusChildSet" />
+ <signal name="Removed" />
+ <signal name="ResizeChecked" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Container+ContainerChild,gtk-sharp" wrapper="Stetic.Wrapper.Container+ContainerChild" />
+
+ <object type="Gtk.Window,gtk-sharp" base-type="Gtk.Container" wrapper="Stetic.Wrapper.Window"
+ label="Window" icon="window.png" palette-category="window" init-properties="Type">
+ <itemgroups>
+ <itemgroup label="Window Properties">
+ <property name="Title" init-with-name="true" translatable="true" />
+ <property name="Icon" />
+ <property name="Type" glade-override="true" internal="true" />
+ <property name="TypeHint" glade-override="true" />
+ <property name="WindowPosition" />
+ <property name="Modal" glade-override="true" default="false" />
+ <property name="BorderWidth" default="0"/>
+ </itemgroup>
+ <itemgroup label="Window Size Properties" name="Size">
+ <property name="Resizable" default="true"/>
+ <property name="AllowGrow" default="true"/>
+ <property name="AllowShrink" default="false"/>
+ <property name="DefaultWidth" min="-1"/>
+ <property name="DefaultHeight" min="-1"/>
+ </itemgroup>
+ <itemgroup label="Miscellaneous Window Properties" name="Misc">
+ <property name="AcceptFocus" default="true"/>
+ <property name="Decorated" default="true"/>
+ <property name="DestroyWithParent" default="false"/>
+ <property name="Gravity" default="NorthWest"/>
+ <property name="Role" />
+ <property name="SkipPagerHint" default="false"/>
+ <property name="SkipTaskbarHint" default="false"/>
+ <property name="FocusOnMap" gtk-version="2.6"/>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Window Signals">
+ <signal name="DefaultActivated" />
+ <signal name="FrameEvent" />
+ <signal name="FocusActivated" />
+ <signal name="KeysChanged" />
+ <signal name="MoveFocus" />
+ <signal name="SetFocus" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Misc,gtk-sharp" wrapper="Stetic.Wrapper.Misc" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup label="Miscellaneous Alignment Properties">
+ <property name="Xpad" />
+ <property name="Ypad" />
+ <property name="Xalign" min="0.0" max="1.0" />
+ <property name="Yalign" min="0.0" max="1.0" />
+ <command name="AlignLeft" label="Align Left" icon="gtk-justify-left" />
+ <command name="AlignCenter" label="Align Center" icon="gtk-justify-center" />
+ <command name="AlignRight" label="Align Right" icon="gtk-justify-right" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Paned,gtk-sharp" wrapper="Stetic.Wrapper.Paned" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Pane Properties">
+ <property name="Position" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Paned Signals">
+ <signal name="CycleChildFocus" />
+ <signal name="ToggleHandleFocus" />
+ <signal name="AcceptPosition" />
+ <signal name="CancelPosition" />
+ <signal name="MoveHandle" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="Gtk.Paned+PanedChild,gtk-sharp">
+ <itemgroups>
+ <itemgroup label="Pane Child Layout">
+ <property name="Resize" />
+ <property name="Shrink" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Range,gtk-sharp" wrapper="Stetic.Wrapper.Range" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup label="Range Properties">
+ <property name="UpdatePolicy" />
+ <property name="Inverted" />
+ <property name="Adjustment.Lower" />
+ <property name="Adjustment.Upper" />
+ <property name="Adjustment.PageIncrement" />
+ <property name="Adjustment.PageSize" />
+ <property name="Adjustment.StepIncrement" />
+ <property name="Adjustment.Value" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Range Signals">
+ <signal name="AdjustBounds" />
+ <signal name="ValueChanged" />
+ <signal name="MoveSlider" />
+ <signal name="ChangeValue" gtk-version="2.6"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Scale,gtk-sharp" wrapper="Stetic.Wrapper.Scale" base-type="Gtk.Range">
+ <itemgroups>
+ <itemgroup label="Scale Properties">
+ <property name="DrawValue" ignore-default="true" />
+ <property name="Digits">
+ <disabled-if name="DrawValue" value="false" />
+ </property>
+ <property name="ValuePos" ignore-default="true" >
+ <disabled-if name="DrawValue" value="false" />
+ </property>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Scale Signals">
+ <signal name="FormatValue" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Alignment,gtk-sharp" base-type="Gtk.Container" label="Alignment" icon="alignment.png"
+ init-properties="Xalign Yalign Xscale Yscale" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Alignment Properties">
+ <property name="Xscale" />
+ <property name="Yscale" />
+ <property name="Xalign" />
+ <property name="Yalign" />
+ <property name="LeftPadding" />
+ <property name="TopPadding" />
+ <property name="RightPadding" />
+ <property name="BottomPadding" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Arrow,gtk-sharp" base-type="Gtk.Misc"
+ label="Arrow" icon="arrow.png" palette-category="widget" init-properties="ArrowType ShadowType">
+ <itemgroups>
+ <itemgroup label="Arrow Properties">
+ <property name="ArrowType" />
+ <property name="ShadowType" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Bin,gtk-sharp" base-type="Gtk.Container" wrapper="Stetic.Wrapper.Bin"
+ label="Bin" icon="custom.png">
+ </object>
+
+ <object type="Gtk.Box,gtk-sharp" wrapper="Stetic.Wrapper.Box" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Box Properties">
+ <property name="Homogeneous" />
+ <property name="Spacing" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <contextmenu>
+ <command name="InsertBefore" label="Insert Before"
+ description="Insert an empty row/column before the selected one">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+
+ <command name="InsertAfter" label="Insert After"
+ description="Insert an empty row/column after the selected one">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ </contextmenu>
+ </object>
+
+ <object type="Gtk.Box+BoxChild,gtk-sharp" wrapper="Stetic.Wrapper.Box+BoxChild">
+ <itemgroups>
+ <itemgroup label="Box Child Layout">
+ <property name="PackType" />
+ <property name="Position" ignore-default="true"/>
+ <property name="AutoSize" label="Auto Size"
+ description="If set, the other packing properties for this cell will be automatically adjusted as other widgets are added to and removed from the container" />
+ <property name="Expand">
+ <disabled-if name="AutoSize" value="true" />
+ </property>
+ <property name="Fill">
+ <disabled-if name="AutoSize" value="true" />
+ <disabled-if name="Expand" value="false" />
+ </property>
+ <property name="Padding" />
+ <command name="BoxExpand" label="Expand" icon="res:box-expand.png" />
+ <command name="BoxFill" label="Fill" icon="res:box-fill.png" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.ButtonBox,gtk-sharp" base-type="Gtk.Box" wrapper="Stetic.Wrapper.ButtonBox">
+ <itemgroups>
+ <itemgroup label="Button Box Properties">
+ <property name="Size" label="Size"
+ description="The number of buttons"
+ min="0" />
+ <property name="LayoutStyle" />
+ </itemgroup>
+ </itemgroups>
+ <contextmenu>
+ <command name="InsertBefore" label="Insert Button Before"
+ description="Insert a new button before the selected one" >
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="InsertAfter" label="Insert Button After"
+ description="Insert a new button after the selected one">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ </contextmenu>
+ </object>
+ <object type="Gtk.ButtonBox+ButtonBoxChild,gtk-sharp" wrapper="Stetic.Wrapper.ButtonBox+ButtonBoxChild">
+ <itemgroups>
+ <itemgroup label="Button Box Child Layout">
+ <property name="InDialog" internal="true" />
+ <property name="Secondary">
+ <invisible-if name="InDialog" value="true" />
+ </property>
+ <property name="Position" />
+ <property name="Expand" />
+ <property name="Fill">
+ <disabled-if name="Expand" value="false" />
+ </property>
+ <property name="Padding" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Button,gtk-sharp" wrapper="Stetic.Wrapper.Button" base-type="Gtk.Container"
+ label="Button" icon="button.png" palette-category="widget">
+ <itemgroups>
+ <itemgroup label="Button Properties">
+ <property name="UseStock" internal="true" />
+ <property name="Type" label="Button Type"
+ description="The type of button" />
+ <property name="StockId" label="Stock Item"
+ description="The stock button ID"
+ editor="Stetic.Editor.StockItem">
+ <invisible-if name="Type" value="TextOnly" />
+ <invisible-if name="Type" value="TextAndIcon" />
+ <invisible-if name="Type" value="Custom" />
+ </property>
+ <property name="Icon" label="Icon"
+ description="The icon to display in the button"
+ editor="Stetic.Editor.ImageSelector">
+ <invisible-if name="Type" value="StockItem" />
+ <invisible-if name="Type" value="TextOnly" />
+ <invisible-if name="Type" value="Custom" />
+ </property>
+ <property name="Label" translatable="true">
+ <invisible-if name="Type" value="StockItem" />
+ <invisible-if name="Type" value="Custom" />
+ </property>
+ <property name="UseUnderline">
+ <invisible-if name="Type" value="StockItem" />
+ <invisible-if name="Type" value="Custom" />
+ </property>
+ <property name="IsDialogButton" internal="true" />
+ <property name="ResponseId" label="Response Id" glade-name="response_id"
+ description="The response ID to emit when this button is clicked."
+ editor="Stetic.Editor.ResponseId">
+ <invisible-if name="IsDialogButton" value="false" />
+ </property>
+ </itemgroup>
+ <itemgroup label="Extra Button Properties" name="Extra">
+ <property name="FocusOnClick" />
+ <property name="Relief" />
+ <property name="Xalign" />
+ <property name="Yalign" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Button Signals">
+ <signal name="Activated" />
+ <signal name="Clicked" />
+ <signal name="Entered" />
+ <signal name="Left" />
+ <signal name="Pressed" />
+ <signal name="Released" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Calendar,gtk-sharp" base-type="Gtk.Widget"
+ label="Calendar" icon="calendar.png" palette-category="widget">
+ <itemgroups>
+ <itemgroup label="Calendar Properties">
+ <property name="DisplayOptions" glade-name="display_options" internal="true" />
+ <property name="ShowHeading" />
+ <property name="ShowDayNames" />
+ <property name="ShowWeekNumbers" />
+ <property name="NoMonthChange" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Calendar Signals">
+ <signal name="PrevMonth" />
+ <signal name="DaySelected" />
+ <signal name="NextMonth" />
+ <signal name="MonthChanged" />
+ <signal name="PrevYear" />
+ <signal name="DaySelectedDoubleClick" />
+ <signal name="NextYear" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.ToggleButton,gtk-sharp" base-type="Gtk.Button"
+ label="Toggle Button" icon="togglebutton.png" palette-category="widget">
+ <itemgroups>
+ <itemgroup label="Toggle Button Properties">
+ <property name="Active" />
+ <property name="Inconsistent" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Toggle Button Signals">
+ <signal name="Toggled" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Button" />
+ </signals>
+ </object>
+
+ <object type="Gtk.CheckButton,gtk-sharp" wrapper="Stetic.Wrapper.CheckButton"
+ label="Check Box" icon="checkbutton.png" palette-category="widget"
+ hexpandable="true" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Check Box Properties">
+ <property name="Label" init-with-name="true" translatable="true" />
+ <property name="Active" />
+ <property name="Inconsistent" />
+ <property name="DrawIndicator" ignore-default="true"/>
+ <property name="HasLabel" internal="true" />
+ <property name="UseUnderline" />
+ <command name="RestoreLabel" label="Restore Label" icon="res:add-check-label.png"
+ description="Restore the button's label">
+ <disabled-if name="HasLabel" value="true" />
+ </command>
+ <command name="RemoveLabel" label="Remove Label" icon="res:remove-check-label.png"
+ description="Remove the button's label">
+ <disabled-if name="HasLabel" value="false" />
+ </command>
+ </itemgroup>
+ <itemgroup ref="Gtk.Button.Extra" />
+ </itemgroups>
+ <signals>
+ <itemgroup ref="Gtk.Button" />
+ <itemgroup ref="Gtk.ToggleButton" />
+ </signals>
+ <contextmenu>
+ <command ref="RemoveLabel" />
+ <command ref="RestoreLabel" />
+ </contextmenu>
+ </object>
+
+ <object type="Gtk.MenuItem,gtk-sharp" wrapper="Stetic.Wrapper.MenuItem"
+ label="Menu Item">
+ <itemgroups>
+ <itemgroup label="Menu Item Properties">
+ <property name="Label" translatable="true" glade-name="label" label="Label"
+ description="The text of the menu item" />
+ <property name="UseUnderline" glade-name="use_underline" label="Use Underline"
+ description="If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key" />
+ <property name="HasSubmenu" internal="true" />
+ <property name="Accelerator" editor="Stetic.Editor.Accelerator">
+ <disabled-if name="HasSubmenu" value="true" />
+ </property>
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Menu Item Signals">
+ <signal name="Activated" />
+ <signal name="ActivateItem" />
+ <signal name="Deselected" />
+ <signal name="Selected" />
+ <signal name="Toggled" />
+ <signal name="ToggleSizeAllocated" />
+ <signal name="ToggleSizeRequested" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ </signals>
+
+ <glade-transform>
+ <!-- A regular MenuItem with no label is really a SeparatorMenuItem -->
+ <import>
+ <xsl:template match="widget[@class='GtkMenuItem']">
+ <xsl:choose>
+ <xsl:when test="not(property[@name='label']) and not(property[@name='stock_item'])">
+ <widget class="GtkSeparatorMenuItem">
+ <xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute>
+ <xsl:apply-templates select="node()" />
+ </widget>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ </import>
+ </glade-transform>
+ </object>
+
+ <object type="Gtk.CheckMenuItem,gtk-sharp" label="Check Menu Item">
+ <itemgroups>
+ <itemgroup label="Check Menu Item Properties">
+ <property ref="Gtk.MenuItem.Label" />
+ <property ref="Gtk.MenuItem.UseUnderline" />
+ <property ref="Gtk.MenuItem.Accelerator" />
+ <property name="Active" />
+ <property name="Inconsistent" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Check Menu Item Signals">
+ <signal name="Toggled" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.MenuItem" />
+ </signals>
+ </object>
+
+ <object type="Gtk.ColorButton,gtk-sharp" wrapper="Stetic.Wrapper.ColorButton"
+ label="Color Button" icon="colorbutton.png" palette-category="widget" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Color Button Properties">
+ <property name="Title" translatable="true" />
+ <property name="UseAlpha" internal="true" />
+ <property name="Alpha" min="-1" max="65535" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Button.Extra" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Color Button Signals">
+ <signal name="ColorSet" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Button" />
+ </signals>
+ </object>
+
+ <object type="Gtk.ComboBox,gtk-sharp" wrapper="Stetic.Wrapper.ComboBox"
+ label="Combo Box" icon="combo.png" palette-category="widget" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Combo Box Properties">
+ <property name="IsTextCombo" label="Text ComboBox"
+ description="Checked if the combo box displays a list of strings" />
+ <property name="Items" translatable="true" label="Items" glade-name="items"
+ description="The items to display in the Combo Box, one per line"
+ editor="Stetic.Editor.StringArray">
+ <disabled-if name="IsTextCombo" value="false" />
+ </property>
+ <property name="Active" min="-1" default="-1"/>
+ <property name="HasFrame" gtk-version="2.6"/>
+ <property name="AddTearoffs" gtk-version="2.6"/>
+ <property name="FocusOnClick" gtk-version="2.6"/>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="ComboBox Signals">
+ <signal name="Changed" />
+ <signal name="EditingDone" gtk-version="2.6"/>
+ <signal name="WidgetRemoved" gtk-version="2.6"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.ComboBoxEntry,gtk-sharp" wrapper="Stetic.Wrapper.ComboBoxEntry" icon="comboentry.png"
+ label="Combo Box Entry" palette-category="widget" base-type="Gtk.ComboBox">
+ </object>
+
+ <object type="Gtk.Dialog,gtk-sharp" wrapper="Stetic.Wrapper.Dialog"
+ label="Dialog Box" icon="dialog.png" palette-category="window" base-type="Gtk.Window">
+ <itemgroups>
+ <itemgroup label="Dialog Properties">
+ <property name="Buttons" label="Number of Buttons"
+ description="The number of buttons"
+ min="1" />
+ <property name="HelpButton" label="Help Button"
+ description="Whether or not to display a 'Help' button" />
+ <property name="HasSeparator" default="true"/>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Dialog Signals">
+ <signal name="Close" />
+ <signal name="Response" />
+ </itemgroup>
+ </signals>
+ <internal-children>
+ <property name="VBox" glade-name="vbox" />
+ <property name="ActionArea" glade-name="action_area" />
+ </internal-children>
+ </object>
+
+ <object type="Gtk.DrawingArea,gtk-sharp" base-type="Gtk.Widget"
+ label="Drawing Area" icon="drawingarea.png" palette-category="widget"
+ hexpandable="true" vexpandable="true">
+ </object>
+
+ <object type="Gtk.Entry,gtk-sharp" base-type="Gtk.Widget"
+ label="Entry" icon="entry.png" palette-category="widget"
+ hexpandable="true" wrapper="Stetic.Wrapper.Entry">
+ <itemgroups>
+ <itemgroup label="Entry Properties">
+ <property name="Text" translatable="true" />
+ <property name="IsEditable" />
+ <property name="WidthChars" min="-1"/>
+ <property name="MaxLength" />
+ <property name="HasFrame" />
+ <property name="ActivatesDefault" />
+ <property name="Visibility" />
+ </itemgroup>
+ <itemgroup label="Extra Entry Properties" name="Extra">
+ <property name="InvisibleChar" />
+ <property name="Xalign" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Entry Signals">
+ <signal name="InsertAtCursor" />
+ <signal name="ToggleOverwrite" />
+ <signal name="PopulatePopup" />
+ <signal name="ClipboardCopied" />
+ <signal name="ClipboardPasted" />
+ <signal name="DeleteFromCursor" />
+ <signal name="Activated" />
+ <signal name="ClipboardCut" />
+ <signal name="MoveCursor" />
+ <signal name="Changed" />
+ <signal name="TextDeleted" />
+ <signal name="TextInserted" />
+ <signal name="EditingDone" />
+ <signal name="WidgetRemoved" />
+ <signal name="Backspace" gtk-version="2.6"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.EventBox,gtk-sharp" base-type="Gtk.Container"
+ label="Event Box" icon="eventbox.png" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Event Box Properties">
+ <property name="AboveChild" />
+ <property name="VisibleWindow" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Expander,gtk-sharp" base-type="Gtk.Container" wrapper="Stetic.Wrapper.Expander"
+ label="Expander" icon="expander.png" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Expander Properties">
+ <property name="Expanded" />
+ <property name="Spacing" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Expander Signals">
+ <signal name="Activated" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Fixed,gtk-sharp" wrapper="Stetic.Wrapper.Fixed" base-type="Gtk.Container"
+ label="Fixed" icon="fixed.png" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Fixed Properties">
+ <property name="HasWindow" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.Fixed+FixedChild,gtk-sharp" wrapper="Stetic.Wrapper.Fixed+FixedChild">
+ <itemgroups>
+ <itemgroup label="Fixed Child Layout">
+ <property name="X" />
+ <property name="Y" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.FontButton,gtk-sharp" wrapper="Stetic.Wrapper.FontButton"
+ label="Font Button" icon="fontbutton.png" palette-category="widget" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Font Button Properties">
+ <property name="Title" translatable="true" />
+ <property name="FontName" />
+ <property name="ShowSize" />
+ <property name="ShowStyle" />
+ <property name="UseFont" />
+ <property name="UseSize">
+ <disabled-if name="UseFont" value="false" />
+ </property>
+ </itemgroup>
+ <itemgroup ref="Gtk.Button.Extra" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Font Button Signals">
+ <signal name="FontSet" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Button" />
+ </signals>
+ </object>
+
+ <object type="Gtk.Frame,gtk-sharp" wrapper="Stetic.Wrapper.Frame" base-type="Gtk.Container"
+ label="Frame" icon="frame.png" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Frame Properties">
+ <property name="ShadowType" />
+ <property name="LabelXalign" />
+ <property name="LabelYalign" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.HBox,gtk-sharp" base-type="Gtk.Box"
+ label="HBox" icon="hbox.png" palette-category="container">
+ </object>
+
+ <object type="Gtk.HButtonBox,gtk-sharp" base-type="Gtk.ButtonBox"
+ label="HButtonBox" icon="hbuttonbox.png" palette-category="container"
+ hexpandable="true">
+ <glade-transform>
+ <!-- If a child has a "response_id" of -11 (GTK_RESPONSE_HELP), it should be packed with the "secondary" property -->
+ <import>
+ <xsl:template match="widget[@class='GtkHButtonBox']/child/widget[@class='GtkButton']">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ <xsl:if test="number (property[@name='response_id']) = -11">
+ <packing>
+ <property name="secondary">True</property>
+ </packing>
+ </xsl:if>
+ </xsl:template>
+ </import>
+ </glade-transform>
+ </object>
+
+ <object type="Gtk.HPaned,gtk-sharp" base-type="Gtk.Paned"
+ label="HPaned" icon="hpaned.png" palette-category="container"
+ hexpandable="true">
+ </object>
+
+ <object type="Gtk.HScale,gtk-sharp" wrapper="Stetic.Wrapper.HScale"
+ label="Horizontal Scale" icon="hscale.png" palette-category="widget"
+ hexpandable="true" base-type="Gtk.Scale">
+ </object>
+
+ <object type="Gtk.HScrollbar,gtk-sharp" wrapper="Stetic.Wrapper.HScrollbar"
+ label="Horizontal Scrollbar" icon="hscrollbar.png" palette-category="widget"
+ hexpandable="true" base-type="Gtk.Range">
+ </object>
+
+ <object type="Gtk.HSeparator,gtk-sharp" base-type="Gtk.Widget"
+ label="Horizontal Separator" icon="hseparator.png" palette-category="widget"
+ hexpandable="true">
+ </object>
+
+ <object type="Gtk.Image,gtk-sharp" wrapper="Stetic.Wrapper.Image"
+ label="Image" icon="image.png" palette-category="widget" base-type="Gtk.Misc">
+ <itemgroups>
+ <itemgroup label="Image Properties">
+ <property name="Pixbuf" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.ImageMenuItem,gtk-sharp" wrapper="Stetic.Wrapper.ImageMenuItem"
+ label="Image Menu Item">
+ <itemgroups>
+ <itemgroup label="Image Menu Item Properties">
+ <property name="Image" editor="Stetic.Editor.Image" />
+ <property ref="Gtk.MenuItem.Label" />
+ <property ref="Gtk.MenuItem.UseUnderline" />
+ <property ref="Gtk.MenuItem.Accelerator" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.MenuItem" />
+ </signals>
+ </object>
+
+ <object type="Gtk.Label,gtk-sharp" wrapper="Stetic.Wrapper.Label"
+ label="Label" icon="label.png" palette-category="widget" base-type="Gtk.Misc">
+ <itemgroups>
+ <itemgroup label="Label Properties">
+ <property name="LabelProp" init-with-name="true" translatable="true" default=""/>
+ <property name="UseMarkup" />
+ <property name="UseUnderline" />
+ <property name="Wrap" />
+ <property name="MnemonicWidget" glade-override="true" editor="Stetic.Editor.WidgetSelector" default=""/>
+ <property name="Justify" />
+ <property name="Selectable" />
+ <property name="Ellipsize" gtk-version="2.6"/>
+ <property name="WidthChars" min="-1" gtk-version="2.6" />
+ <property name="MaxWidthChars" min="-1" gtk-version="2.6" />
+ <property name="SingleLineMode" gtk-version="2.6" />
+ <property name="Angle" gtk-version="2.6" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Label Signals">
+ <signal name="CopyClipboard" />
+ <signal name="MoveCursor" />
+ <signal name="PopulatePopup" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.MenuBar,gtk-sharp" wrapper="Stetic.Wrapper.MenuBar"
+ label="Menu Bar" icon="menubar.png" palette-category="widget" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="MenuBar Properties">
+ <property name="PackDirection" gtk-version="2.8" />
+ <property name="ChildPackDirection" gtk-version="2.8" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Menu Bar Signals">
+ <signal name="Deactivated" />
+ <signal name="SelectionDone" />
+ <signal name="MoveCurrent" />
+ <signal name="ActivateCurrent" />
+ <signal name="Canceled" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Menu,gtk-sharp" label="Menu" icon="menu.png" base-type="Gtk.Container">
+ <signals>
+ <itemgroup label="Menu Signals">
+ <signal name="Deactivated" />
+ <signal name="SelectionDone" />
+ <signal name="MoveCurrent" />
+ <signal name="ActivateCurrent" />
+ <signal name="Canceled" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="Gtk.Menu+MenuChild,gtk-sharp" />
+
+<!-- Code generation not implemented for MessageDialog
+
+ <object type="Stetic.MessageDialog" cname="GtkMessageDialog" wrapper="Stetic.Wrapper.Window"
+ label="Message Dialog" icon="messagedialog.png" palette-category="window">
+ <itemgroups>
+ <itemgroup label="Message Dialog Properties">
+ <property ref="Gtk.Window.Title" />
+ <property name="MessageType" label="Message Type"
+ description="The type of message dialog this is" />
+ <property name="PrimaryText" translatable="true" label="Primary Text"
+ description="The primary message text" />
+ <property name="SecondaryText" translatable="true" label="Secondary Text"
+ description="The secondary message text" />
+ <property name="Buttons" label="Buttons"
+ description="The buttons to offer" />
+ <property ref="Gtk.Window.Icon" />
+ <property ref="Gtk.Window.WindowPosition" />
+ <property ref="Gtk.Window.Modal" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Dialog.Misc" />
+ <itemgroup ref="Gtk.Window.Size" />
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container.Commands" />
+ </itemgroups>
+ <signals>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.Window" />
+ <itemgroup ref="Gtk.Dialog" />
+ </signals>
+ </object>
+-->
+
+ <object type="Gtk.Notebook,gtk-sharp" wrapper="Stetic.Wrapper.Notebook" base-type="Gtk.Container"
+ label="Notebook" icon="notebook.png" palette-category="container">
+ <itemgroups>
+ <itemgroup label="Notebook Properties">
+ <property name="CurrentPage" />
+ <property name="EnablePopup" />
+ <property name="TabPos" />
+ <property name="ShowBorder" />
+ <property name="ShowTabs" />
+ <property name="Scrollable" />
+ <property name="BorderWidth" />
+ <command name="InsertBefore" label="Insert Page Before"
+ description="Insert a blank page before this one">
+ <invisible-if check="ChildrenAllowed" />
+ <disabled-if check="CheckInsertBefore" />
+ </command>
+ <command name="InsertAfter" label="Insert Page After"
+ description="Insert a blank page after this one" >
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Notebook Signals">
+ <signal name="FocusTab" />
+ <signal name="ChangeCurrentPage" />
+ <signal name="MoveFocusOut" />
+ <signal name="SwitchPage" />
+ <signal name="SelectPage" />
+ </itemgroup>
+ </signals>
+ <contextmenu>
+ <command name="PreviousPage" label="Go to Previous Page"
+ description="Show the previous page">
+ <disabled-if check="CheckPreviousPage" />
+ </command>
+ <command name="NextPage" label="Go to Next Page"
+ description="Show the next page">
+ <disabled-if check="CheckNextPage" />
+ </command>
+ <command name="DeletePage" label="Delete Page"
+ description="Delete the current page">
+ <invisible-if check="ChildrenAllowed" />
+ <disabled-if check="CheckDeletePage" />
+ </command>
+ <command name="SwapPrevious" label="Swap with Previous Page"
+ description="Swap the contents of this page with the contents of the previous page">
+ <invisible-if check="ChildrenAllowed" />
+ <disabled-if check="CheckPreviousPage" />
+ </command>
+ <command name="SwapNext" label="Swap with Next Page"
+ description="Swap the contents of this page with the contents of the next page">
+ <invisible-if check="ChildrenAllowed" />
+ <disabled-if check="CheckNextPage" />
+ </command>
+ <command ref="InsertBefore" />
+ <command ref="InsertAfter" />
+ </contextmenu>
+ </object>
+ <object type="Gtk.Notebook+NotebookChild,gtk-sharp">
+ <itemgroups>
+ <itemgroup label="Notebook Child Layout">
+ <property name="Position" />
+ <property name="TabPack" />
+ <property name="TabExpand" />
+ <property name="TabFill" />
+ <property name="MenuLabel" translatable="true" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.OptionMenu,gtk-sharp" wrapper="Stetic.Wrapper.OptionMenu"
+ label="Option Menu" icon="optionmenu.png" deprecated="true" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Option Menu Properties">
+ <property name="Active" glade-name="history" label="Active"
+ description="The active menu item" min="0" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Option Menu Signals">
+ <signal name="Changed" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Button" />
+ </signals>
+ <internal-children>
+ <property name="Menu" glade-name="menu" />
+ </internal-children>
+ </object>
+
+ <object type="Gtk.ProgressBar,gtk-sharp" base-type="Gtk.Widget"
+ label="Progress Bar" icon="progressbar.png" palette-category="widget"
+ hexpandable="true">
+ <itemgroups>
+ <itemgroup label="Progress Bar Properties">
+ <property name="Orientation" />
+ <property name="Text" translatable="true" />
+ <property name="Fraction" />
+ <property name="PulseStep" />
+ <property name="Ellipsize" gtk-version="2.6"/>
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.RadioButton,gtk-sharp" wrapper="Stetic.Wrapper.RadioButton"
+ label="Radio Button" icon="radiobutton.png" palette-category="widget"
+ hexpandable="true" init-properties="Label" base-type="Gtk.CheckButton">
+ <itemgroups>
+ <itemgroup label="Radio Button Properties">
+ <property name="Group" label="Group"
+ description="The name of the radio button group that this button belongs to"
+ editor="Stetic.Editor.GroupPicker" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Radio Button Signals">
+ <signal name="GroupChanged" />
+ </itemgroup>
+ </signals>
+ </object>
+<!--
+ <object type="Gtk.RadioMenuItem,gtk-sharp" wrapper="Stetic.Wrapper.RadioMenuItem"
+ label="Radio Menu Item">
+ <itemgroups>
+ <itemgroup label="Radio Menu Item Properties">
+ <property ref="Gtk.MenuItem.Label" />
+ <property ref="Gtk.MenuItem.UseUnderline" />
+ <property ref="Gtk.MenuItem.Accelerator" />
+ <property name="Group" label="Group"
+ description="The name of the radio menu item group that this menu item belongs to"
+ editor="Stetic.Editor.GroupPicker" />
+ <property name="Active" />
+ <property name="Inconsistent" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Radio Menu Item Signals">
+ <signal name="Toggled" />
+ <signal name="GroupChanged" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.MenuItem" />
+ </signals>
+ </object>
+
+ <object type="Gtk.ToolItem,gtk-sharp" wrapper="Stetic.Wrapper.Widget">
+ <signals>
+ <itemgroup label="Tool Item Signals">
+ <signal name="ToolbarReconfigured" />
+ <signal name="CreateMenuProxy" />
+ <signal name="TooltipSet" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.ToolButton,gtk-sharp" wrapper="Stetic.Wrapper.ToolButton"
+ label="Toolbar Button" icon="button.png" palette-category="toolbaritem">
+ <itemgroups>
+ <itemgroup label="Toolbar Button Properties">
+ <property name="Type" label="Button Type"
+ description="The type of button" />
+ <property name="StockId" label="Stock Item"
+ description="The stock button ID"
+ editor="Stetic.Editor.StockItem">
+ <invisible-if name="Type" value="TextAndIcon" />
+ </property>
+ <property name="Icon" label="Icon"
+ description="The icon to display in the button"
+ editor="Stetic.Editor.ImageSelector">
+ <invisible-if name="Type" value="StockItem" />
+ </property>
+ <property name="Label" translatable="true" />
+ <property name="UseUnderline">
+ <invisible-if name="Type" value="StockItem" />
+ </property>
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Tool Button Signals">
+ <signal name="Clicked" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.ToolItem" />
+ </signals>
+ </object>
+
+ <object type="Gtk.RadioToolButton,gtk-sharp" wrapper="Stetic.Wrapper.RadioToolButton"
+ label="Toolbar Radio Button" icon="radiobutton.png" palette-category="toolbaritem">
+ <itemgroups>
+ <itemgroup label="Toolbar Radio Button Properties">
+ <property ref="Gtk.ToolButton.Icon" />
+ <property ref="Gtk.ToolButton.Label" />
+ <property ref="Gtk.ToolButton.UseUnderline" />
+ <property name="Group" label="Group"
+ description="The name of the radio toolbar item group that this toolbar item belongs to"
+ editor="Stetic.Editor.GroupPicker" />
+ <property name="Active" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Radio Tool Button Signals">
+ <signal name="Toggled" />
+ <signal name="Clicked" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.ToolItem" />
+ </signals>
+ </object>
+-->
+
+ <object type="Gtk.ScrolledWindow,gtk-sharp" wrapper="Stetic.Wrapper.ScrolledWindow"
+ label="Scrolled Window" icon="scrolledwindow.png" palette-category="container"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Scrolled Window Properties">
+ <property name="VscrollbarPolicy" default="Automatic" />
+ <property name="HscrollbarPolicy" default="Automatic" />
+ <property name="ShadowType" />
+ <property name="WindowPlacement" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Scrolled Window Signals">
+ <signal name="MoveFocusOut" />
+ <signal name="ScrollChild" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.SeparatorMenuItem,gtk-sharp"
+ label="Separator Menu Item" icon="hseparator.png">
+ <itemgroups>
+ <itemgroup ref="Gtk.Widget" important="false" />
+ </itemgroups>
+ <signals>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.MenuItem" />
+ </signals>
+ </object>
+
+<!-- <object type="Gtk.SeparatorToolItem,gtk-sharp"
+ label="Toolbar Separator" icon="vseparator.png" palette-category="toolbaritem">
+ <itemgroups>
+ <itemgroup label="Toolbar Separator Properties">
+ <property name="Draw" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.ToolItem" />
+ </signals>
+ </object>
+-->
+
+ <object type="Gtk.SpinButton,gtk-sharp" wrapper="Stetic.Wrapper.SpinButton" base-type="Gtk.Widget"
+ label="Spin Button" icon="spinbutton.png" palette-category="widget" init-properties="Lower Upper StepIncrement">
+ <itemgroups>
+ <itemgroup label="Range Properties">
+ <property name="Adjustment.Lower" />
+ <property name="Adjustment.Upper" />
+ <property name="Adjustment.PageIncrement" />
+ <property name="Adjustment.PageSize" />
+ <property name="Adjustment.StepIncrement" />
+ </itemgroup>
+ <itemgroup label="Spin Button Properties" important="true">
+ <property name="ClimbRate" />
+ <property name="Digits" />
+ <property name="Numeric" />
+ <property name="SnapToTicks" />
+ <property name="UpdatePolicy" />
+ <property name="Value" />
+ <property name="Wrap" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Spin Button Signals">
+ <signal name="ChangeValue" />
+ <signal name="Input" />
+ <signal name="ValueChanged" />
+ <signal name="Output" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Entry" />
+ </signals>
+ </object>
+
+ <object type="Gtk.Statusbar,gtk-sharp" base-type="Gtk.HBox"
+ label="Statusbar" icon="statusbar.png" palette-category="widget"
+ hexpandable="true">
+ <itemgroups>
+ <itemgroup label="Status Bar Properties">
+ <property name="HasResizeGrip" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Statusbar Signals">
+ <signal name="TextPopped" />
+ <signal name="TextPushed" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.Table,gtk-sharp" wrapper="Stetic.Wrapper.Table" base-type="Gtk.Container"
+ label="Table" icon="table.png" palette-category="container" init-properties="NRows NColumns Homogeneous">
+ <itemgroups>
+ <itemgroup label="Table Properties">
+ <property name="NRows" min="1"/>
+ <property name="NColumns" min="1"/>
+ <property name="Homogeneous" />
+ <property name="RowSpacing" />
+ <property name="ColumnSpacing" />
+ <property name="BorderWidth" />
+ </itemgroup>
+ </itemgroups>
+ <contextmenu>
+ <command name="InsertRowBefore" label="Insert Row Before"
+ description="Insert an empty row above the selected row">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="InsertRowAfter" label="Insert Row After"
+ description="Insert an empty row below the selected row">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="InsertColumnBefore" label="Insert Column Before"
+ description="Insert an empty column before the selected column">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="InsertColumnAfter" label="Insert Column After"
+ description="Insert an empty column after the selected column">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="DeleteRow" label="Delete Row"
+ description="Delete the selected row">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ <command name="DeleteColumn" label="Delete Column"
+ description="Delete the selected column">
+ <invisible-if check="ChildrenAllowed" />
+ </command>
+ </contextmenu>
+
+ <glade-transform>
+ <!-- Child packing options are non-standard ("expand" instead of "GTK_EXPAND") -->
+ <import>
+ <xsl:template match="widget[@class='GtkTable']/child/packing/property[@name='x_options' or @name='y_options']/text()">
+ <xsl:call-template name="GtkTable_fixoptions">
+ <xsl:with-param name="string" select="." />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="GtkTable_fixoptions">
+ <xsl:param name="string"/>
+ <xsl:choose>
+ <xsl:when test="contains($string, '|')">
+ <xsl:call-template name="GtkTable_fixoptions">
+ <xsl:with-param name="string" select="substring-before($string, '|')"/>
+ </xsl:call-template>
+ <xsl:text>|</xsl:text>
+ <xsl:call-template name="GtkTable_fixoptions">
+ <xsl:with-param name="string" select="substring-after($string, '|')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>GTK_</xsl:text>
+ <xsl:value-of select="translate($string,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ </import>
+ <export>
+ <xsl:template match="widget[@class='GtkTable']/child/packing/property[@name='x_options' or @name='y_options']/text()">
+ <xsl:call-template name="GtkTable_breakoptions">
+ <xsl:with-param name="options" select="." />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="GtkTable_breakoptions">
+ <xsl:param name="string"/>
+ <xsl:choose>
+ <xsl:when test="contains($string, '|')">
+ <xsl:call-template name="GtkTable_breakoptions">
+ <xsl:with-param name="string" select="substring-before($string, '|')"/>
+ </xsl:call-template>
+ <xsl:text>|</xsl:text>
+ <xsl:call-template name="GtkTable_breakoptions">
+ <xsl:with-param name="string" select="substring-after($string, '|')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="translate(substring-after($string, 'GTK_'),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ </export>
+ </glade-transform>
+ </object>
+ <object type="Gtk.Table+TableChild,gtk-sharp" wrapper="Stetic.Wrapper.Table+TableChild">
+ <itemgroups>
+ <itemgroup label="Table Child Layout">
+ <property name="TopAttach" />
+ <property name="BottomAttach" />
+ <property name="LeftAttach" />
+ <property name="RightAttach" />
+ <property name="XPadding" />
+ <property name="YPadding" />
+ <property name="AutoSize" label="Auto Size"
+ description="If set, the other packing properties for this cell will be automatically adjusted as other widgets are added to and removed from the container" />
+ <property name="XOptions" internal="true" />
+ <property name="YOptions" internal="true" />
+ <property name="XExpand" label="Expand Horizontally"
+ description="Whether or not the table cell should expand horizontally">
+ <disabled-if name="AutoSize" value="true" />
+ </property>
+ <property name="XFill" label="Fill Horizontally"
+ description="Whether or not the widget should expand to fill its cell horizontally">
+ <disabled-if name="AutoSize" value="true" />
+ <disabled-if name="XExpand" value="true" />
+ </property>
+ <property name="XShrink" label="Shrink Horizontally"
+ description="Whether or not the table cell should shrink horizontally">
+ <disabled-if name="AutoSize" value="true" />
+ </property>
+ <property name="YExpand" label="Expand Vertically"
+ description="Whether or not the table cell should expand vertically">
+ <disabled-if name="AutoSize" value="true" />
+ </property>
+ <property name="YFill" label="Fill Vertically"
+ description="Whether or not the widget should expand to fill its cell vertically">
+ <disabled-if name="AutoSize" value="true" />
+ <disabled-if name="YExpand" value="true" />
+ </property>
+ <property name="YShrink" label="Shrink Vertically"
+ description="Whether or not the table cell should shrink vertically">
+ <disabled-if name="AutoSize" value="true" />
+ </property>
+ <command name="CellXExpand" label="Expand Horizontally" icon="res:cell-expand-h.png" />
+ <command name="CellXFill" label="Fill Horizontally" icon="res:cell-fill-h.png" />
+ <command name="CellYExpand" label="Expand Vertically" icon="res:cell-expand-v.png" />
+ <command name="CellYFill" label="Fill Vertically" icon="res:cell-fill-v.png" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.TextView,gtk-sharp" wrapper="Stetic.Wrapper.TextView"
+ label="Text View" icon="textview.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Text View Properties">
+ <property name="Editable" />
+ <property name="CursorVisible" />
+ <property name="Overwrite" />
+ <property name="AcceptsTab" />
+ <property name="Tabs" />
+ <property name="Text" translatable="true" label="Text" glade-name="text"
+ description="The initial text to display in the Text View"
+ editor="Stetic.Editor.Text" />
+ <property name="Justification" />
+ <property name="WrapMode" />
+ <property name="PixelsAboveLines" />
+ <property name="PixelsBelowLines" />
+ <property name="PixelsInsideWrap" />
+ <property name="LeftMargin" />
+ <property name="RightMargin" />
+ <property name="Indent" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Text View Signals">
+ <signal name="PasteClipboard" />
+ <signal name="InsertAtCursor" />
+ <signal name="CutClipboard" />
+ <signal name="ToggleOverwrite" />
+ <signal name="PageHorizontally" />
+ <signal name="MoveFocus" />
+ <signal name="CopyClipboard" />
+ <signal name="DeleteFromCursor" />
+ <signal name="PopulatePopup" />
+ <signal name="MoveCursor" />
+ <signal name="SetAnchor" />
+ <signal name="ScrollAdjustmentsSet" />
+ <signal name="Backspace" gtk-version="2.6"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+<!-- <object type="Gtk.ToggleToolButton,gtk-sharp" wrapper="Stetic.Wrapper.ToggleToolButton"
+ label="Toolbar Toggle Button" icon="checkbutton.png" palette-category="toolbaritem">
+ <itemgroups>
+ <itemgroup label="Toolbar Toggle Button Properties">
+ <property ref="Gtk.ToolButton.Icon" />
+ <property ref="Gtk.ToolButton.Label" />
+ <property ref="Gtk.ToolButton.UseUnderline" />
+ <property name="Active" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ <signals>
+ <itemgroup label="Toggle Tool Button Signals">
+ <signal name="Toggled" />
+ <signal name="Clicked" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Widget" />
+ <itemgroup ref="Gtk.Container" />
+ <itemgroup ref="Gtk.ToolItem" />
+ </signals>
+ </object>
+-->
+ <object type="Gtk.Toolbar,gtk-sharp" wrapper="Stetic.Wrapper.ActionToolbarWrapper"
+ label="Toolbar" icon="toolbar.png" palette-category="widget" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Tool Bar Properties">
+ <property name="Orientation" />
+ <property name="ShowArrow" />
+ <property name="Tooltips" />
+ <property name="ButtonStyle" label="Toolbar style" default="Default"/>
+ <property name="ToolbarStyle" ignore-default="true" internal="true"/>
+ <property name="ButtonIconSize" label="Icon size" default="Default" />
+ <property name="IconSize" ignore-default="true" internal="true" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Toolbar Signals">
+ <signal name="OrientationChanged" />
+ <signal name="PopupContextMenu" />
+ <signal name="StyleChanged" />
+ </itemgroup>
+ </signals>
+ </object>
+<!--
+ <object type="Gtk.Toolbar+ToolbarChild,gtk-sharp" wrapper="Stetic.Wrapper.Toolbar+ToolbarChild">
+ <itemgroups>
+ <itemgroup label="Tool Bar Child Properties">
+ <property name="Homogeneous" />
+ <property name="Expand" />
+ <property name="ToolItem" internal="true" />
+ <property name="ToolItem.IsImportant" />
+ <property name="ToolItem.VisibleHorizontal" />
+ <property name="ToolItem.VisibleVertical" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+-->
+ <object type="Gtk.TreeView,gtk-sharp" wrapper="Stetic.Wrapper.TreeView"
+ label="Tree View" icon="treeview.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Tree View Properties">
+ <property name="EnableSearch" />
+ <property name="FixedHeightMode" />
+ <property name="HeadersVisible" />
+ <property name="Reorderable" />
+ <property name="RulesHint" />
+ <property name="SearchColumn" min="-1"/>
+ <property name="Model" />
+ <property name="HeadersClickable" gtk-version="2.6" default="true"/>
+ <property name="HoverSelection" gtk-version="2.6" />
+ <property name="HoverExpand" gtk-version="2.6" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Tree View Signals">
+ <signal name="CursorChanged" />
+ <signal name="TestCollapseRow" />
+ <signal name="RowActivated" />
+ <signal name="ExpandCollapseCursorRow" />
+ <signal name="ColumnsChanged" />
+ <signal name="UnselectAll" />
+ <signal name="SelectCursorParent" />
+ <signal name="RowCollapsed" />
+ <signal name="SelectAll" />
+ <signal name="SelectCursorRow" />
+ <signal name="TestExpandRow" />
+ <signal name="StartInteractiveSearch" />
+ <signal name="MoveCursor" />
+ <signal name="RowExpanded" />
+ <signal name="ToggleCursorRow" />
+ <signal name="ScrollAdjustmentsSet" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.NodeView,gtk-sharp" wrapper="Stetic.Wrapper.TreeView"
+ label="Node View" icon="treeview.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.TreeView">
+ </object>
+
+ <object type="Gtk.IconView,gtk-sharp" wrapper="Stetic.Wrapper.IconView"
+ label="Icon View" icon="iconview.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Container" gtk-version="2.6">
+ <itemgroups>
+ <itemgroup label="Icon View Properties">
+ <property name="Columns" />
+ <property name="ColumnSpacing" />
+ <property name="ItemWidth" min="-1" />
+ <property name="Margin" min="0" />
+ <property name="Orientation" />
+ <property name="Reorderable" gtk-version="2.8"/>
+ <property name="RowSpacing" />
+ <property name="SelectionMode" />
+ <property name="Spacing" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Icon View Signals">
+ <signal name="SelectionChanged" />
+ <signal name="AllUnselected" />
+ <signal name="ItemActivated" />
+ <signal name="AllSelected" />
+ <signal name="ToggleCursorItem" />
+ <signal name="MoveCursor" />
+ <signal name="ActivateCursorItem" />
+ <signal name="SelectCursorItem" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.VBox,gtk-sharp" base-type="Gtk.Box"
+ label="VBox" icon="vbox.png" palette-category="container">
+ </object>
+
+ <object type="Gtk.VButtonBox,gtk-sharp" base-type="Gtk.ButtonBox"
+ label="VButtonBox" icon="vbuttonbox.png" palette-category="container"
+ vexpandable="true">
+ </object>
+
+ <object type="Gtk.Viewport,gtk-sharp" wrapper="Stetic.Wrapper.Viewport"
+ label="Viewport" icon="viewport.png" base-type="Gtk.Container">
+ <itemgroups>
+ <itemgroup label="Viewport Properties">
+ <property name="ShadowType" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Viewport Signals">
+ <signal name="ScrollAdjustmentsSet" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.VPaned,gtk-sharp" base-type="Gtk.Paned"
+ label="VPaned" icon="vpaned.png" palette-category="container"
+ vexpandable="true">
+ </object>
+
+ <object type="Gtk.VScale,gtk-sharp" wrapper="Stetic.Wrapper.VScale"
+ label="Vertical Scale" icon="vscale.png" palette-category="widget"
+ vexpandable="true" base-type="Gtk.Scale">
+ </object>
+
+ <object type="Gtk.VScrollbar,gtk-sharp" wrapper="Stetic.Wrapper.VScrollbar"
+ label="Vertical Scrollbar" icon="vscrollbar.png" palette-category="widget"
+ vexpandable="true" base-type="Gtk.Range">
+ </object>
+
+ <object type="Gtk.VSeparator,gtk-sharp" base-type="Gtk.Widget"
+ label="Vertical Separator" icon="vseparator.png" palette-category="widget"
+ vexpandable="true">
+ </object>
+
+ <object type="Stetic.Custom" cname="Custom" base-type="Gtk.Widget"
+ label="Custom Widget" icon="custom.png" palette-category="widget">
+ <itemgroups>
+ <itemgroup label="Custom Widget Properties">
+ <property name="CreationFunction" glade-name="creation_function" />
+ <property name="LastModificationTime" glade-name="last_modification_time" internal="true" />
+ <property name="String1" glade-name="string1" />
+ <property name="String2" glade-name="string2" />
+ <property name="Int1" glade-name="int1" />
+ <property name="Int2" glade-name="int2" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+<!-- 2.6
+ <object type="Gtk.AboutDialog,gtk-sharp" wrapper="Stetic.Wrapper.AboutDialog"
+ label="About Dialog" icon="aboutdialog.png" palette-category="window">
+ <itemgroups>
+ <itemgroup label="About Dialog Properties">
+ <property name="Name" translatable="true" />
+ <property name="Version" translatable="true" />
+ <property name="Logo" glade-override="true"
+ editor="Stetic.Editor.ImageFile" />
+ <property name="Comments" translatable="true" />
+ <property name="Copyright" translatable="true" />
+ <property name="Website" translatable="true" />
+ <property name="WebsiteLabel" translatable="true" />
+ <property name="Authors" translatable="true" />
+ <property name="Documenters" translatable="true" />
+ <property name="Artists" translatable="true" />
+ <property name="TranslatorCredits" translatable="true" />
+ <property name="License" translatable="true" editor="Stetic.Editor.Text" />
+ <property ref="Gtk.Window.Icon" />
+ <property ref="Gtk.Window.WindowPosition" />
+ <property ref="Gtk.Window.Modal" />
+ </itemgroup>
+ <itemgroup ref="Gtk.Dialog.Misc" />
+ <itemgroup ref="Gtk.Window.Size" />
+ <itemgroup ref="Gtk.Widget" />
+ </itemgroups>
+ </object>
+-->
+
+ <object type="Gtk.ColorSelection,gtk-sharp" wrapper="Stetic.Wrapper.Widget"
+ label="Color Selection" icon="colorselection.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup label="Color Selection Properties">
+ <property name="HasPalette" />
+ <property name="HasOpacityControl" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Color Selection Signals">
+ <signal name="ColorChanged" />
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.ColorSelectionDialog,gtk-sharp" base-type="Gtk.Dialog" wrapper="Stetic.Wrapper.Dialog"
+ label="Color Selection Dialog" icon="colorselectiondialog.png" palette-category="window">
+ <internal-children>
+ <property name="ColorSelection" glade-name="color_selection" />
+ <property name="OkButton" glade-name="ok_button" />
+ <property name="CancelButton" glade-name="cancel_button" />
+ <property name="HelpButton" glade-name="help_button" />
+ <property name="VBox" glade-name="vbox" />
+ <property name="ActionArea" glade-name="action_area" />
+ </internal-children>
+ </object>
+
+ <object type="Gtk.FileChooserWidget,gtk-sharp" wrapper="Stetic.Wrapper.Widget"
+ label="File Chooser Widget" icon="fileselection.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" init-properties="Action" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup label="File Chooser Widget Properties">
+ <property name="Action" />
+ <property name="LocalOnly" />
+ <property name="SelectMultiple">
+ <disabled-if name="Action" value="Save" />
+ <disabled-if name="Action" value="CreateFolder" />
+ </property>
+ <property name="ShowHidden" gtk-version="2.6"/>
+ <property name="DoOverwriteConfirmation" gtk-version="2.8" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="File Chooser Widget Signals">
+ <signal name="SelectionChanged" />
+ <signal name="FileActivated" />
+ <signal name="UpdatePreview" />
+ <signal name="CurrentFolderChanged" />
+ <signal name="ConfirmOverwrite" gtk-version="2.8"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.FileChooserButton,gtk-sharp" wrapper="Stetic.Wrapper.Container" init-properties="Title Action"
+ label="File Chooser Button" icon="fileselection.png" palette-category="widget"
+ hexpandable="true" base-type="Gtk.Container" gtk-version="2.6">
+ <itemgroups>
+ <itemgroup label="File Chooser Button Properties">
+ <property name="Title" translatable="true" />
+ <property name="Action" />
+ <property name="LocalOnly" />
+ <property name="SelectMultiple">
+ <disabled-if name="Action" value="Save" />
+ <disabled-if name="Action" value="CreateFolder" />
+ </property>
+ <property name="WidthChars" min="-1"/>
+ <property name="ShowHidden" gtk-version="2.6"/>
+ <property name="DoOverwriteConfirmation" gtk-version="2.8" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="File Chooser Button Signals">
+ <signal name="SelectionChanged" />
+ <signal name="FileActivated" />
+ <signal name="UpdatePreview" />
+ <signal name="CurrentFolderChanged" />
+ <signal name="ConfirmOverwrite" gtk-version="2.8"/>
+ </itemgroup>
+ </signals>
+ </object>
+
+ <object type="Gtk.FileChooserDialog,gtk-sharp" base-type="Gtk.Dialog"
+ label="File Chooser Dialog" icon="fileselection.png" palette-category="window">
+ <itemgroups>
+ <itemgroup label="File Chooser Dialog Properties">
+ <property name="Action" />
+ <property name="LocalOnly" />
+ <property name="SelectMultiple">
+ <disabled-if name="Action" value="Save" />
+ <disabled-if name="Action" value="CreateFolder" />
+ </property>
+ <property name="ShowHidden" gtk-version="2.6"/>
+ <property name="DoOverwriteConfirmation" gtk-version="2.8" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="File Chooser Dialog Signals">
+ <signal name="SelectionChanged" />
+ <signal name="FileActivated" />
+ <signal name="UpdatePreview" />
+ <signal name="CurrentFolderChanged" />
+ <signal name="ConfirmOverwrite" gtk-version="2.8"/>
+ </itemgroup>
+ </signals>
+ <internal-children>
+ <property name="VBox" glade-name="vbox" />
+ <property name="ActionArea" glade-name="action_area" />
+ </internal-children>
+ </object>
+
+ <object type="Gtk.FontSelection,gtk-sharp" wrapper="Stetic.Wrapper.Widget"
+ label="Font Selection" icon="fontselection.png" palette-category="widget"
+ hexpandable="true" vexpandable="true" base-type="Gtk.Widget">
+ <itemgroups>
+ <itemgroup label="Font Selection Properties">
+ <property name="FontName" />
+ <property name="PreviewText" translatable="true" />
+ </itemgroup>
+ </itemgroups>
+ </object>
+
+ <object type="Gtk.FontSelectionDialog,gtk-sharp" base-type="Gtk.Dialog" wrapper="Stetic.Wrapper.FontSelectionDialog"
+ label="Font Selection Dialog" icon="fontselectiondialog.png" palette-category="window">
+ <internal-children>
+ <property name="VBox" glade-name="vbox" />
+ <property name="ActionArea" glade-name="action_area" />
+ <property name="FontSelection" glade-name="font_selection" />
+ <property name="OkButton" glade-name="ok_button" />
+ <property name="CancelButton" glade-name="cancel_button" />
+ <property name="ApplyButton" glade-name="help_button" />
+ </internal-children>
+ </object>
+
+ <object type="Stetic.ErrorWidget" wrapper="Stetic.ErrorWidgetWrapper">
+ </object>
+
+ <object type="Gtk.Action,gtk-sharp" label="Action" wrapper="Stetic.Wrapper.Action"
+ init-properties="Name Label Tooltip StockId" >
+ <itemgroups>
+ <itemgroup label="Action Properties">
+ <property name="Name" editor="Stetic.Editor.Identifier" min="1"/>
+ <property name="Type" />
+ <property name="Accelerator" editor="Stetic.Editor.Accelerator" />
+ <property name="HideIfEmpty" />
+ <property name="IsImportant" />
+ <property name="Label" translatable="true"/>
+ <property name="Sensitive" />
+ <property name="ShortLabel" default="" translatable="true"/>
+ <property name="StockId" editor="Stetic.Editor.StockItem"/>
+ <property name="Tooltip" translatable="true"/>
+ <property name="Visible" />
+ <property name="VisibleHorizontal" />
+ <property name="VisibleVertical" />
+ <property name="VisibleOverflown" gtk-version="2.6"/>
+ <property name="DrawAsRadio" label="Draw as radio">
+ <invisible-if name="Type" value="Action" />
+ </property>
+ <property name="Active">
+ <invisible-if name="Type" value="Action" />
+ </property>
+ <property name="Value">
+ <invisible-if name="Type" value="Action" />
+ <invisible-if name="Type" value="Toggle" />
+ </property>
+ <property name="Group" label="Group"
+ description="The name of the radio action group that this action belongs to"
+ editor="Stetic.Editor.GroupPicker">
+ <invisible-if name="Type" value="Action" />
+ <invisible-if name="Type" value="Toggle" />
+ </property>
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="Action Signals">
+ <signal name="Activated" />
+ <signal name="Changed" />
+ <signal name="Toggled" />
+ </itemgroup>
+ </signals>
+ </object>
+
+
+
+ <enum type="Gdk.ExtensionMode,gdk-sharp">
+ <value name="None" label="None"
+ description="No extension events are desired" />
+ <value name="All" label="All"
+ description="All extension events are desired" />
+ <value name="Cursor" label="Only if cursor displayed"
+ description="Extension events are desired only if a cursor will be displayed for the device" />
+ </enum>
+
+ <enum type="Gdk.EventMask,gdk-sharp">
+ <value name="ExposureMask" label="Expose"
+ description="Receive expose events" />
+ <value name="PointerMotionMask" label="All pointer motion"
+ description="Receive all pointer motion events" />
+ <value name="PointerMotionHintMask" label="Requested pointer motion"
+ description="Receive pointer motion events when requested" />
+ <value name="ButtonMotionMask" label="Pointer motion w/ any button"
+ description="Receive pointer motion events while any button is pressed" />
+ <value name="Button1MotionMask" label="Pointer motion w/ button 1"
+ description="Receive pointer motion events while button 1 is pressed" />
+ <value name="Button2MotionMask" label="Pointer motion w/ button 2"
+ description="Receive pointer motion events while button 2 is pressed" />
+ <value name="Button3MotionMask" label="Pointer motion w/ button 3"
+ description="Receive pointer motion events while button 3 is pressed" />
+ <value name="ButtonPressMask" label="Button press"
+ description="Receive button press events" />
+ <value name="ButtonReleaseMask" label="Button release"
+ description="Receive button release events" />
+ <value name="KeyPressMask" label="Key press"
+ description="Receive key press events" />
+ <value name="KeyReleaseMask" label="Key release"
+ description="Receive key release events" />
+ <value name="EnterNotifyMask" label="Window enter"
+ description="Receive window enter events" />
+ <value name="LeaveNotifyMask" label="Window leave"
+ description="Receive window leave events" />
+ <value name="FocusChangeMask" label="Focus change"
+ description="Receive focus change events" />
+ <value name="StructureMask" label="Window structure change"
+ description="Receive events about window configuration change" />
+ <value name="PropertyChangeMask" label="Property change"
+ description="Receive property change events" />
+ <value name="VisibilityNotifyMask" label="Visibility change"
+ description="Receive visibility change events" />
+ <value name="ProximityInMask" label="Proximity in"
+ description="Receive proximity in events" />
+ <value name="ProximityOutMask" label="Proximity out"
+ description="Receive proximity out events" />
+ <value name="SubstructureMask" label="Window substructure change"
+ description="Receive events about window configuration changes of child windows" />
+ <value name="ScrollMask" label="Scroll"
+ description="Receive scroll events" />
+ <value name="AllEventsMask" />
+ </enum>
+
+ <enum type="Gdk.Gravity,gdk-sharp">
+ <value name="NorthWest" label="Northwest"
+ description="The reference point is at the top left corner" />
+ <value name="North" label="North"
+ description="The reference point is at the middle of the top edge" />
+ <value name="NorthEast" label="Northeast"
+ description="The reference point is at the top right corner" />
+ <value name="West" label="West"
+ description="The reference point is at the middle of the left edge" />
+ <value name="Center" label="Center"
+ description="The reference point is at the center of the window" />
+ <value name="East" label="East"
+ description="The reference point is at the middle of the right edge" />
+ <value name="SouthWest" label="Southwest"
+ description="The reference point is at the lower left corner" />
+ <value name="South" label="South"
+ description="The reference point is at the middle of the lower edge" />
+ <value name="SouthEast" label="Southeast"
+ description="The reference point is at the lower right corner" />
+ <value name="Static" label="Static"
+ description="The reference point is at the top left corner of the window itself, ignoring window manager decorations" />
+ </enum>
+
+ <enum type="Gdk.WindowTypeHint,gdk-sharp">
+ <value name="Normal" label="Normal"
+ description="Normal toplevel window" />
+ <value name="Dialog" label="Dialog"
+ description="Dialog window" />
+ <value name="Menu" label="Menu"
+ description="Window used to implement a menu" />
+ <value name="Toolbar" label="Toolbar"
+ description="Window used to implement a toolbar" />
+ <value name="Splashscreen" label="Splash screen"
+ description="Window used to display a splash screen" />
+ <value name="Utility" label="Utility"
+ description="Utility windows which are not detached toolbars or dialogs" />
+ <value name="Dock" label="Dock"
+ description="Used for creating dock or panel windows" />
+ <value name="Desktop" label="Desktop"
+ description="Used for creating the desktop background window" />
+ </enum>
+
+ <enum type="Gtk.ArrowType,gtk-sharp">
+ <value name="Up" label="Up"
+ description="Up" />
+ <value name="Down" label="Down"
+ description="Down" />
+ <value name="Left" label="Left"
+ description="Left" />
+ <value name="Right" label="Right"
+ description="Right" />
+ </enum>
+
+ <enum type="Gtk.AttachOptions,gtk-sharp">
+ <value name="Expand" label="Expand"
+ description="The widget should expand to take up any extra space in its container that has been allocated" />
+ <value name="Shrink" label="Shrink"
+ description="The widget should shrink as and when possible" />
+ <value name="Fill" label="Fill"
+ description="The widget should fill the space allocated to it" />
+ </enum>
+
+ <enum type="Gtk.ButtonBoxStyle,gtk-sharp">
+ <value name="DefaultStyle" label="Default"
+ description="Default packing" />
+ <value name="Spread" label="Spread"
+ description="Buttons are evenly spread across the ButtonBox" />
+ <value name="Edge" label="Edge"
+ description="Buttons are placed at the edges of the ButtonBox" />
+ <value name="Start" label="Start"
+ description="Buttons are grouped towards the start (left or top) of the box" />
+ <value name="End" label="End"
+ description="Buttons are grouped toward the end (right or bottom) of the box" />
+ </enum>
+
+ <enum type="Gtk.ButtonsType,gtk-sharp">
+ <value name="None" label="None"
+ description="No buttons at all" />
+ <value name="Ok" label="OK"
+ description="an OK button" />
+ <value name="Close" label="Close"
+ description="a Close button" />
+ <value name="Cancel" label="Cancel"
+ description="a Cancel button" />
+ <value name="YesNo" label="Yes / No"
+ description="Yes and No buttons" />
+ <value name="OkCancel" label="OK / Cancel"
+ description="OK and Cancel buttons" />
+ </enum>
+
+ <enum type="Gtk.CornerType,gtk-sharp">
+ <value name="TopLeft" label="Top Left"
+ description="Place the scrollbars on the right and bottom of the contents" />
+ <value name="BottomLeft" label="Bottom Left"
+ description="Place the scrollbrs on the top and right of the contents" />
+ <value name="TopRight" label="Top Right"
+ description="Place the scrollbrs on the left and bottom of the contents" />
+ <value name="BottomRight" label="Bottom Right"
+ description="Place the scrollbrs on the top and left of the contents" />
+ </enum>
+
+ <enum type="Gtk.FileChooserAction,gtk-sharp">
+ <value name="Open" label="Open"
+ description="Open mode. The file chooser will only let the user pick an existing file." />
+ <value name="Save" label="Save"
+ description="Save mode. The file chooser will let the user pick an existing file, or type in a new filename." />
+ <value name="SelectFolder" label="Select Folder"
+ description="Open mode for selecting folders. The file chooser will let the user pick an existing folder." />
+ <value name="CreateFolder" label="Create Folder"
+ description="Mode for creating a new folder. The file chooser will let the user name an existing or new folder." />
+ </enum>
+
+ <enum type="Gtk.IconSize,gtk-sharp">
+ <value name="Invalid" label="Invalid"
+ description="Invalid" />
+ <value name="Menu" label="Menu"
+ description="The size of an icon an a menu item" />
+ <value name="SmallToolbar" label="Small Toolbar"
+ description="The size of an icon in a small toolbar" />
+ <value name="LargeToolbar" label="Large Toolbar"
+ description="The size of an icon in a large toolbar" />
+ <value name="Button" label="Button"
+ description="The size of an icon in a button" />
+ <value name="Dnd" label="Drag and Drop"
+ description="The size of an icon in a drag-and-drop operation" />
+ <value name="Dialog" label="Dialog"
+ description="The size of an icon in a dialog box" />
+ </enum>
+
+ <enum type="Stetic.Wrapper.ActionToolbarWrapper+ToolbarIconSize">
+ <value name="Menu" label="Menu"
+ description="The size of an icon an a menu item" />
+ <value name="SmallToolbar" label="Small Toolbar"
+ description="The size of an icon in a small toolbar" />
+ <value name="LargeToolbar" label="Large Toolbar"
+ description="The size of an icon in a large toolbar" />
+ <value name="Button" label="Button"
+ description="The size of an icon in a button" />
+ <value name="Dnd" label="Drag and Drop"
+ description="The size of an icon in a drag-and-drop operation" />
+ <value name="Dialog" label="Dialog"
+ description="The size of an icon in a dialog box" />
+ <value name="Default" label="System Default"
+ description="Use the system default size" />
+ </enum>
+
+ <enum type="Gtk.Justification,gtk-sharp">
+ <value name="Left" label="Left"
+ description="The text is placed at the left edge of the label" />
+ <value name="Right" label="Right"
+ description="The text is placed at the right edge of the label" />
+ <value name="Center" label="Center"
+ description="The text is placed in the center of the label" />
+ <value name="Fill" label="Fill"
+ description="The text is distributed across the label" />
+ </enum>
+
+ <enum type="Gtk.MessageType,gtk-sharp">
+ <value name="Info" label="Info"
+ description="Informational message" />
+ <value name="Warning" label="Warning"
+ description="Non-fatal warning message" />
+ <value name="Question" label="Question"
+ description="Question requiring a choice" />
+ <value name="Error" label="Error"
+ description="Fatal error message" />
+ </enum>
+
+ <enum type="Gtk.Orientation,gtk-sharp">
+ <value name="Horizontal" label="Horizontal"
+ description="The widget is in horizontal orientation" />
+ <value name="Vertical" label="Vertical"
+ description="The widget is in vertical orientation" />
+ </enum>
+
+ <enum type="Gtk.PackType,gtk-sharp">
+ <value name="Start" label="Start"
+ description="The child is packed into the start (left or top) of the box" />
+ <value name="End" label="End"
+ description="The child is packed into the end (right or bottom) of the box" />
+ </enum>
+
+ <enum type="Gtk.PolicyType,gtk-sharp">
+ <value name="Always" label="Always"
+ description="The scrollbar is always visible" />
+ <value name="Automatic" label="Automatic"
+ description="The scrollbar will appear and disappear as necessary" />
+ <value name="Never" label="Never"
+ description="The scrollbar will never appear" />
+ </enum>
+
+ <enum type="Gtk.PositionType,gtk-sharp">
+ <value name="Left" label="Left"
+ description="The feature is at the left edge" />
+ <value name="Right" label="Right"
+ description="The feature is at the right edge" />
+ <value name="Top" label="Top"
+ description="The feature is at the top edge" />
+ <value name="Bottom" label="Bottom"
+ description="The feature is at the bottom edge" />
+ </enum>
+
+ <enum type="Gtk.ProgressBarOrientation,gtk-sharp">
+ <value name="LeftToRight" label="Left to right"
+ description="A horizontal progress bar growing from left to right" />
+ <value name="RightToLeft" label="Right to left"
+ description="A horizontal progress bar growing from right to left" />
+ <value name="BottomToTop" label="Bottom to top"
+ description="A vertical progress bar growing from bottom to top" />
+ <value name="TopToBottom" label="Top to bottom"
+ description="A vertical progress bar growing from top to bottom" />
+ </enum>
+
+ <enum type="Gtk.ReliefStyle,gtk-sharp">
+ <value name="Normal" label="Normal"
+ description="Draw a normal relief around the button" />
+ <value name="Half" label="Half"
+ description="Draw a half relief around the button" />
+ <value name="None" label="None"
+ description="Draw no relief around the button" />
+ </enum>
+
+ <enum type="Gtk.ResponseType,gtk-sharp">
+ <value name="None" label="None"
+ description="None" />
+ <value name="Reject" label="Reject"
+ description="Reject" />
+ <value name="Accept" label="Accept"
+ description="Accept" />
+ <value name="DeleteEvent" />
+ <value name="Ok" label="OK"
+ description="OK" />
+ <value name="Cancel" label="Cancel"
+ description="Cancel" />
+ <value name="Close" label="Close"
+ description="Close" />
+ <value name="Yes" label="Yes"
+ description="Yes" />
+ <value name="No" label="No"
+ description="No" />
+ <value name="Apply" label="Apply"
+ description="Apply" />
+ <value name="Help" label="Help"
+ description="Help" />
+ </enum>
+
+ <enum type="Gtk.ShadowType,gtk-sharp">
+ <value name="None" label="None"
+ description="No outline" />
+ <value name="In" label="In"
+ description="The outline is bevelled inwards" />
+ <value name="Out" label="Out"
+ description="The outline is bevelled outwards, like a button" />
+ <value name="EtchedIn" label="Etched in"
+ description="" />
+ <value name="EtchedOut" label="Etched out"
+ description="" />
+ </enum>
+
+ <enum type="Gtk.SpinButtonUpdatePolicy,gtk-sharp">
+ <value name="Always" label="Always"
+ description="When refreshing the SpinButton, the value is always displayed" />
+ <value name="IfValid" label="If valid"
+ description="When refreshing the SpinButton, the value is only displayed if it is within the SpinButton's bounds" />
+ </enum>
+
+ <enum type="Stetic.Wrapper.ActionToolbarWrapper+ToolbarStyle">
+ <value name="Default" label="System Default"
+ description="Use the system default style" />
+ <value name="Icons" label="Icons"
+ description="Buttons display only icons in the toolbar" />
+ <value name="Text" label="Text"
+ description="Buttons display only text labels in the toolbar" />
+ <value name="Both" label="Both"
+ description="Buttons display text and icons in the toolbar" />
+ <value name="BothHoriz" label="Both horizontally"
+ description="Buttons display icons and text alongside each other, rather than vertically stacked" />
+ </enum>
+
+ <enum type="Gtk.UpdateType,gtk-sharp">
+ <value name="Continuous" label="Continuous"
+ description="The range value will change continuously as the slider is moved" />
+ <value name="Discontinuous" label="Discontinuous"
+ description="The range value will change only after the user releases the mouse button" />
+ <value name="Delayed" label="Delayed"
+ description="The range value will change if the user stops sliding the slider for a moment" />
+ </enum>
+
+ <enum type="Gtk.WindowPosition,gtk-sharp">
+ <value name="None" label="Not specified"
+ description="The window can be placed wherever the window manager chooses" />
+ <value name="Center" label="Centered"
+ description="The window should be placed in the center of the screen" />
+ <value name="Mouse" label="At mouse position"
+ description="The window should be placed at the current mouse position" />
+ <value name="CenterAlways" label="Always centered"
+ description="The window should be kept centered even if it changes size" />
+ <value name="CenterOnParent" label="Centered on parent"
+ description="Center the window on the parent window that it is transient for" />
+ </enum>
+
+ <enum type="Gtk.WindowType,gtk-sharp">
+ <value name="Toplevel" label="Toplevel"
+ description="A regular window or dialog" />
+ <value name="Popup" label="Popup"
+ description="A special window such as a tooltip" />
+ </enum>
+
+ <enum type="Gtk.WrapMode,gtk-sharp">
+ <value name="None" label="None"
+ description="Do not wrap lines; just make the text area wider" />
+ <value name="Char" label="Character"
+ description="Wrap text, breaking lines between any characters" />
+ <value name="Word" label="Word"
+ description="Wrap text, breaking lines between words" />
+ <value name="WordChar" label="Word or Character"
+ description="Wrap text, preferably breaking lines between words, but also breaking between characters if needed" />
+ </enum>
+
+ <enum type="Stetic.Wrapper.Button+ButtonType">
+ <value name="StockItem" label="Stock button"
+ description="Button displaying stock icon and text" />
+ <value name="TextOnly" label="Text only"
+ description="Button displaying text only" />
+ <value name="TextAndIcon" label="Text and Icon"
+ description="Button displaying an icon and application-provided text" />
+ <value name="Custom" label="Custom"
+ description="Button with entirely custom contents" />
+ </enum>
+
+ <enum type="Stetic.Wrapper.ToolButton+ButtonType">
+ <value name="StockItem" label="Stock button"
+ description="Button displaying stock icon and text" />
+ <value name="TextAndIcon" label="Text and Icon"
+ description="Button displaying an icon and application-provided text" />
+ </enum>
+
+ <enum type="Stetic.Wrapper.Action+ActionType">
+ <value name="Action" label="Action"
+ description="An normal action" />
+ <value name="Toggle" label="Toggle Action"
+ description="The action can be toggled between two states" />
+ <value name="Radio" label="Radio Action"
+ description="The action is controlled by a radio button" />
+ </enum>
+
+ <enum type="Pango.EllipsizeMode, pango-sharp">
+ <value name="None" label="None"
+ description="No ellipsization" />
+ <value name="Start" label="Start"
+ description="Omit characters at the start of the text" />
+ <value name="Middle" label="Middle"
+ description="Omit characters in the middle of the text" />
+ <value name="End" label="End"
+ description="Omit characters at the end of the text" />
+ </enum>
+
+ <enum type="Gtk.SelectionMode, gtk-sharp">
+ <value name="None" label="None"
+ description="Nothing can be selected" />
+ <value name="Single" label="Single"
+ description="Only one item can be selected at any given moment. Other items can have focus, but will not be marked as selected" />
+ <value name="Browse" label="Browse"
+ description="Only one item can be selected at any given moment. Any item currently having focus will be marked as selected" />
+ <value name="Multiple" label="Multiple"
+ description="Several items may be selected or unselected with a click or using the spacebar. The selection can be done using the Ctrl and Shift modifier keys in the usual way" />
+ </enum>
+
+ <enum type="Gtk.PackDirection, gtk-sharp">
+ <value name="Ttb" label="Top to bottom"
+ description="Top to bottom" />
+ <value name="Btt" label="Bottom to top"
+ description="Bottom to top" />
+ <value name="Rtl" label="Right to left"
+ description="Right to left" />
+ <value name="Ltr" label="Left to right"
+ description="Left to right" />
+ </enum>
+
+</objects>
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.accellabel.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.accellabel.png
new file mode 100644
index 0000000..6ba42ba
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.accellabel.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.actiongroup.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.actiongroup.png
new file mode 100644
index 0000000..de43e0a
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.actiongroup.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-check-label.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-check-label.png
new file mode 100644
index 0000000..cf3ad0c
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-check-label.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-menu.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-menu.png
new file mode 100644
index 0000000..19a9861
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-menu.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.alignment.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.alignment.png
new file mode 100644
index 0000000..5d7d311
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.alignment.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.arrow.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.arrow.png
new file mode 100644
index 0000000..c9153b6
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.arrow.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-expand.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-expand.png
new file mode 100644
index 0000000..9569039
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-expand.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-fill.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-fill.png
new file mode 100644
index 0000000..b0d67b5
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-fill.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.button.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.button.png
new file mode 100644
index 0000000..db816c2
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.button.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.calendar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.calendar.png
new file mode 100644
index 0000000..c3cdf73
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.calendar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-h.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-h.png
new file mode 100644
index 0000000..539a6f7
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-h.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-v.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-v.png
new file mode 100644
index 0000000..658e63d
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-v.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-h.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-h.png
new file mode 100644
index 0000000..30162bf
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-h.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-v.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-v.png
new file mode 100644
index 0000000..95a9c1a
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-v.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.checkbutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.checkbutton.png
new file mode 100644
index 0000000..71565b0
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.checkbutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorbutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorbutton.png
new file mode 100644
index 0000000..281288d
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorbutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselection.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselection.png
new file mode 100644
index 0000000..281288d
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselection.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselectiondialog.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselectiondialog.png
new file mode 100644
index 0000000..281288d
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselectiondialog.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.combo.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.combo.png
new file mode 100644
index 0000000..dab25d3
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.combo.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.comboentry.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.comboentry.png
new file mode 100644
index 0000000..13e02c8
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.comboentry.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.custom.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.custom.png
new file mode 100644
index 0000000..df61924
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.custom.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dec-border.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dec-border.png
new file mode 100644
index 0000000..c5e5ae5
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dec-border.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dialog.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dialog.png
new file mode 100644
index 0000000..6e81b2f
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dialog.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.drawingarea.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.drawingarea.png
new file mode 100644
index 0000000..ee65bba
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.drawingarea.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.entry.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.entry.png
new file mode 100644
index 0000000..d97bb9f
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.entry.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.eventbox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.eventbox.png
new file mode 100644
index 0000000..c89d490
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.eventbox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.expander.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.expander.png
new file mode 100644
index 0000000..35d1c41
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.expander.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fileselection.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fileselection.png
new file mode 100644
index 0000000..03bda09
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fileselection.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fixed.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fixed.png
new file mode 100644
index 0000000..e6d5ece
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fixed.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontbutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontbutton.png
new file mode 100644
index 0000000..fe7a790
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontbutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselection.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselection.png
new file mode 100644
index 0000000..fe7a790
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselection.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselectiondialog.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselectiondialog.png
new file mode 100644
index 0000000..6936c47
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselectiondialog.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.frame.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.frame.png
new file mode 100644
index 0000000..8a4c1f3
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.frame.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe-not.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe-not.png
new file mode 100644
index 0000000..3b1e292
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe-not.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe.png
new file mode 100644
index 0000000..2f25501
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.handlebox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.handlebox.png
new file mode 100644
index 0000000..be064c6
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.handlebox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbox.png
new file mode 100644
index 0000000..6971a332
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbuttonbox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbuttonbox.png
new file mode 100644
index 0000000..e38a4c5
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbuttonbox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hpaned.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hpaned.png
new file mode 100644
index 0000000..e2847ab
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hpaned.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscale.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscale.png
new file mode 100644
index 0000000..310e01c
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscale.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscrollbar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscrollbar.png
new file mode 100644
index 0000000..717b656
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscrollbar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hseparator.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hseparator.png
new file mode 100644
index 0000000..b32843a
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hseparator.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.iconview.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.iconview.png
new file mode 100644
index 0000000..b875d37
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.iconview.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.image.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.image.png
new file mode 100644
index 0000000..7f790e5
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.image.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.inc-border.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.inc-border.png
new file mode 100644
index 0000000..7f457c3
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.inc-border.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.label.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.label.png
new file mode 100644
index 0000000..9299f0f
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.label.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menu.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menu.png
new file mode 100644
index 0000000..bcfdc9d
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menu.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menubar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menubar.png
new file mode 100644
index 0000000..14298a1
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menubar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.messagedialog.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.messagedialog.png
new file mode 100644
index 0000000..a5330e2
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.messagedialog.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.missing.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.missing.png
new file mode 100644
index 0000000..589da69
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.missing.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.notebook.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.notebook.png
new file mode 100644
index 0000000..7d8f706
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.notebook.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.optionmenu.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.optionmenu.png
new file mode 100644
index 0000000..d682108
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.optionmenu.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.progressbar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.progressbar.png
new file mode 100644
index 0000000..f48b47c
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.progressbar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.radiobutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.radiobutton.png
new file mode 100644
index 0000000..c85d949
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.radiobutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-check-label.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-check-label.png
new file mode 100644
index 0000000..25136e6
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-check-label.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-menu.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-menu.png
new file mode 100644
index 0000000..4777667
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-menu.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.scrolledwindow.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.scrolledwindow.png
new file mode 100644
index 0000000..1032374
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.scrolledwindow.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.spinbutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.spinbutton.png
new file mode 100644
index 0000000..9e98bb0
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.spinbutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.statusbar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.statusbar.png
new file mode 100644
index 0000000..26d8c2f
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.statusbar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.table.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.table.png
new file mode 100644
index 0000000..dc5886c
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.table.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.textview.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.textview.png
new file mode 100644
index 0000000..642be08
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.textview.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.togglebutton.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.togglebutton.png
new file mode 100644
index 0000000..62c13fa
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.togglebutton.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.toolbar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.toolbar.png
new file mode 100644
index 0000000..27b486a
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.toolbar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.treeview.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.treeview.png
new file mode 100644
index 0000000..f6fd7d9
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.treeview.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbox.png
new file mode 100644
index 0000000..fce6eb1
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbuttonbox.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbuttonbox.png
new file mode 100644
index 0000000..68defd7
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbuttonbox.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.viewport.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.viewport.png
new file mode 100644
index 0000000..deccf53
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.viewport.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vpaned.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vpaned.png
new file mode 100644
index 0000000..60628f4
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vpaned.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscale.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscale.png
new file mode 100644
index 0000000..dbdc71e
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscale.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscrollbar.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscrollbar.png
new file mode 100644
index 0000000..09f8008
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscrollbar.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vseparator.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vseparator.png
new file mode 100644
index 0000000..6904fc2
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vseparator.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.widget.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.widget.png
new file mode 100644
index 0000000..7f5844b
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.widget.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.window.png b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.window.png
new file mode 100644
index 0000000..8f82250
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.window.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/libstetic.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/libstetic.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..9cc501f
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/libstetic.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,80 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.stetic.glade
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.objects.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.accellabel.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.actiongroup.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-check-label.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.add-menu.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.alignment.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.arrow.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-expand.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.box-fill.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.button.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.calendar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-h.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-expand-v.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-h.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.cell-fill-v.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.checkbutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorbutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselection.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.colorselectiondialog.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.combo.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.comboentry.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.custom.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dec-border.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.dialog.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.drawingarea.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.entry.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.eventbox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.expander.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fileselection.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fixed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontbutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselection.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.fontselectiondialog.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.frame.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.globe-not.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.handlebox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hbuttonbox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hpaned.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscale.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hscrollbar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.hseparator.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.iconview.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.image.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.inc-border.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.label.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menu.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.menubar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.messagedialog.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.missing.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.notebook.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.optionmenu.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.progressbar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.radiobutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-check-label.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.remove-menu.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.scrolledwindow.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.spinbutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.statusbar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.table.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.textview.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.togglebutton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.toolbar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.treeview.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vbuttonbox.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.viewport.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vpaned.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscale.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vscrollbar.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.vseparator.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.widget.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/Stetic.wrapper.pixmaps.window.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libstetic.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libstetic.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libstetic.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/libstetic.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libstetic/obj/Debug/libstetic.dll.mdb
diff --git a/src/addins/MonoDevelop.GtkCore/libsteticui/Makefile.in b/src/addins/MonoDevelop.GtkCore/libsteticui/Makefile.in
index 09ae89c..7aca580 100644
--- a/src/addins/MonoDevelop.GtkCore/libsteticui/Makefile.in
+++ b/src/addins/MonoDevelop.GtkCore/libsteticui/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.GtkCore/libsteticui/PropertyTree.cs b/src/addins/MonoDevelop.GtkCore/libsteticui/PropertyTree.cs
index 37a1b71..f89aa36 100644
--- a/src/addins/MonoDevelop.GtkCore/libsteticui/PropertyTree.cs
+++ b/src/addins/MonoDevelop.GtkCore/libsteticui/PropertyTree.cs
@@ -536,7 +536,8 @@ namespace Stetic
else {
session.Dispose ();
((InternalTree)previous_parent).Editing = false;
- box.Unparent ();
+ if (box.Parent != null)
+ box.Unparent ();
}
}
diff --git a/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.action.png b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.action.png
new file mode 100644
index 0000000..fa6a6c8
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.action.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..965aa42
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.action.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.missing.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libsteticui.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libsteticui.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/libsteticui.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.dll.mdb
diff --git a/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.missing.png b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.missing.png
new file mode 100644
index 0000000..589da69
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/libsteticui/obj/Debug/libsteticui.missing.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.MonoDevelop.GtkCore.addin.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.MonoDevelop.GtkCore.addin.xml
new file mode 100644
index 0000000..c3a1ede
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.MonoDevelop.GtkCore.addin.xml
@@ -0,0 +1,186 @@
+<Addin id = "GtkCore"
+ namespace = "MonoDevelop"
+ name = "GTK# Visual Designer"
+ author = "Lluis Sanchez Gual"
+ copyright = "X11"
+ url = ""
+ description = "Provides support for visual design of GTK# windows, dialogs and widgets."
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="libstetic.dll"/>
+ <Import file="libstetic.dll.config"/>
+ <Import assembly="libsteticui.dll"/>
+ <Import file="libsteticui.dll.config"/>
+ <Import assembly="MonoDevelop.GtkCore.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.ActionGroup">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.UserInterfaceFolder">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.Component">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.StockIcons">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/WorkbenchContexts/Edit">
+ <ContextPad id = "MonoDevelop.GtkCore.GuiBuilder.GuiBuilderProjectPad" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.ProjectFolderNodeBuilderExtension"/>
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.ProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.WidgetNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.WindowsFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.ActionGroupNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.GtkCore.NodeBuilders.StockIconsNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "DialogFileTemplate" resource = "Dialog.xft.xml"/>
+ <FileTemplate id = "DrawingAreaFileTemplate" resource = "DrawingArea.xft.xml"/>
+ <FileTemplate id = "WindowFileTemplate" resource = "Window.xft.xml"/>
+ <FileTemplate id = "WidgetFileTemplate" resource = "Widget.xft.xml"/>
+ <FileTemplate id = "ActionGroupFileTemplate" resource = "ActionGroup.xft.xml"/>
+ <FileTemplate id = "PartialDialogFileTemplate" resource = "DialogPartial.xft.xml"/>
+ <FileTemplate id = "PartialWindowFileTemplate" resource = "WindowPartial.xft.xml"/>
+ <FileTemplate id = "PartialWidgetFileTemplate" resource = "WidgetPartial.xft.xml"/>
+ <FileTemplate id = "PartialActionGroupFileTemplate" resource = "ActionGroupPartial.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding insertbefore = "DefaultDisplayBinding"
+ class = "MonoDevelop.GtkCore.GuiBuilder.GuiBuilderDisplayBinding" />
+ <DisplayBinding
+ class = "MonoDevelop.GtkCore.GuiBuilder.ActionGroupDisplayBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "Gtk# Designer" id = "GtkCore">
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.AddNewDialog"
+ icon = "md-gtkcore-dialog"
+ _label = "New Dialog..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.AddNewWindow"
+ icon = "md-gtkcore-window"
+ _label = "New Window..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.AddNewWidget"
+ icon = "md-gtkcore-widget"
+ _label = "New Widget..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.AddNewActionGroup"
+ icon = "md-gtkcore-actiongroup"
+ _label = "New Action Group..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.ImportGladeFile"
+ _label = "Import Glade file..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.EditIcons"
+ _label = "Edit Project Icons..." />
+ <Command id = "MonoDevelop.GtkCore.GtkCommands.GtkSettings"
+ _label = "GTK# support settings..." />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <Condition id="ItemType" value="Project|ProjectFolder">
+ <SeparatorItem insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.AddFiles" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewDialog" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewWindow" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewWidget" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewActionGroup" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.UserInterfaceFolder">
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewDialog" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewWindow" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewWidget" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.AddNewActionGroup" />
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.EditIcons" />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.ImportGladeFile" />
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.GtkSettings" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.Component">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.ActionGroup">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/GtkCore/ContextMenu/ProjectPad.StockIcons">
+ <CommandItem id = "MonoDevelop.GtkCore.GtkCommands.EditIcons" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.Project"
+ name = "GtkDesignInfo"
+ skipEmpty = "True"
+ type = "MonoDevelop.GtkCore.GtkDesignInfo" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/StartupHandlers">
+ <Class class="MonoDevelop.GtkCore.GtkCoreStartupCommand" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Common">
+ <Condition id="ItemType" value ="DotNetProject">
+ <Section id = "SteticOptionsPanel"
+ _label = "GTK# Settings"
+ fill="true"
+ class = "MonoDevelop.GtkCore.Dialogs.WidgetBuilderOptionPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplateTypes">
+ <FileTemplateType name = "Widget" class = "MonoDevelop.GtkCore.WidgetFileDescriptionTemplate"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-gtkcore-window" resource = "window.png" />
+ <StockIcon stockid = "md-gtkcore-dialog" resource = "dialog.png" />
+ <StockIcon stockid = "md-gtkcore-widget" resource = "widget.png" />
+ <StockIcon stockid = "md-gtkcore-actiongroup" resource = "actiongroup.png" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Class class = "MonoDevelop.GtkCore.GuiBuilder.GtkProjectServiceExtension" insertafter="MidStep"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxProviders">
+ <Class class = "MonoDevelop.GtkCore.GuiBuilder.ToolboxProvider" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/DesignerSupport/ToolboxLoaders">
+ <Class id="ToolboxItemLoader" class="MonoDevelop.GtkCore.GuiBuilder.ToolboxLoader"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.GtkCore.GuiBuilder.ComponentToolboxNode" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+ <Class class = "MonoDevelop.GtkCore.Dialogs.GtkProjectFeature" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/Projects">
+ <Panel _label = "GTK# Designer" class = "MonoDevelop.GtkCore.Dialogs.GtkDesignerOptionPanel" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..a469538
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,19 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.MonoDevelop.GtkCore.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Dialog.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Window.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Widget.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroup.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroupPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DialogPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WidgetPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DrawingArea.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WindowPartial.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gui.glade
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.widget.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.actiongroup.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.image-x-generic.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/MonoDevelop.GtkCore.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.GtkCore/MonoDevelop.GtkCore.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.dll.mdb
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gtk-gui.gui.stetic b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gtk-gui.gui.stetic
new file mode 100644
index 0000000..df56f23
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gtk-gui.gui.stetic
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Deployment/MonoDevelop.Deployment.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.GtkCore/libstetic.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.GtkCore/libsteticui.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.GtkCore/MonoDevelop.GtkCore.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.GtkCore.Dialogs.GtkDesignerOptionsPanelWidget" design-size="503 22">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSwitchLayout">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Automatically switch to the "GUI Builder" layout when opening the designer</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gui.glade b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gui.glade
new file mode 100644
index 0000000..92f5740
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.gui.glade
@@ -0,0 +1,710 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkDialog" id="SelectRenamedClassDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">GUI Designer</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="labelMessage">
+ <property name="width_request">549</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The class that was bound to the design currently edited could not be found. Please select the class you want to bind to the design:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="treeClasses">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="BindDesignDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Bind Widget Design</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okButton">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="labelMessage">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The widget design {0} is not currently bound to a class.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radioSelect">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Bind the design to an existing class</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="OnSelectToggled" last_modification_time="Mon, 27 Feb 2006 15:28:25 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="width_request">24</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select a class: </property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="comboClasses">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radioCreate">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Create a new class</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radioSelect</property>
+ <signal name="toggled" handler="OnSelectToggled" last_modification_time="Mon, 27 Feb 2006 15:28:54 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="tableNewClass">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Name:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Namespace:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Location:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="width_request">24</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="entryClassName">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnEntryChanged" last_modification_time="Mon, 27 Feb 2006 18:53:06 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="entryNamespace">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="OnEntryChanged" last_modification_time="Mon, 27 Feb 2006 18:53:28 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEventBox" id="fileEntryBox">
+ <property name="visible">True</property>
+ <property name="visible_window">True</property>
+ <property name="above_child">False</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="ConfirmWindowDeleteDialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">MonoDevelop</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-no</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-9</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-yes</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-8</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-question</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label">
+ <property name="visible">True</property>
+ <property name="label">Are you sure you want to delete the window '{0}'?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkbox">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Also remove the file '{0}'</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.actiongroup.png b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.actiongroup.png
new file mode 100644
index 0000000..de43e0a
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.actiongroup.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.image-x-generic.png b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.image-x-generic.png
new file mode 100644
index 0000000..68da502
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.image-x-generic.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.widget.png b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.widget.png
new file mode 100644
index 0000000..7f5844b
Binary files /dev/null and b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.icons.widget.png differ
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroup.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroup.xft.xml
new file mode 100644
index 0000000..ebac9f6
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroup.xft.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>ActionGroup</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a global Action Group.</_Description>
+ <DefaultFilename>ActionGroup</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <action-group name="${FullName}">
+ </action-group>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.ActionGroup" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <BaseConstructorArgs>
+ <PrimitiveExpression Value="${FullName}"/>
+ </BaseConstructorArgs>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <TypeReferenceExpression Type="Stetic.Gui" />
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ThisReferenceExpression/>
+ <TypeOfExpression Type="${FullName}" />
+ </Parameters>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroupPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroupPartial.xft.xml
new file mode 100644
index 0000000..64e6f8f
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.ActionGroupPartial.xft.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>ActionGroup</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a global Action Group.</_Description>
+ <DefaultFilename>ActionGroup</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <action-group name="${FullName}">
+ </action-group>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true" IsPartial="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.ActionGroup" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <BaseConstructorArgs>
+ <PrimitiveExpression Value="${FullName}"/>
+ </BaseConstructorArgs>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <ThisReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Dialog.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Dialog.xft.xml
new file mode 100644
index 0000000..ebb5716
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Dialog.xft.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Dialog</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a Gtk dialog.</_Description>
+ <DefaultFilename>Dialog</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Dialog" id="${FullName}" design-size="400 300">
+ <property name="Events">0</property>
+ <property name="Title" translatable="yes">dialog1</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <property name="HasSeparator">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Events">0</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">0</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Events">0</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="IsDialogButton">True</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Events">0</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="IsDialogButton">True</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Dialog" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <TypeReferenceExpression Type="Stetic.Gui" />
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ThisReferenceExpression/>
+ <TypeOfExpression Type="${FullName}" />
+ </Parameters>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DialogPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DialogPartial.xft.xml
new file mode 100644
index 0000000..69f7d18
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DialogPartial.xft.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Dialog</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a Gtk dialog.</_Description>
+ <DefaultFilename>Dialog</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Dialog" id="${FullName}" design-size="400 300">
+ <property name="Events">0</property>
+ <property name="Title" translatable="yes">dialog1</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <property name="HasSeparator">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Events">0</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">0</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Events">0</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="IsDialogButton">True</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Events">0</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="IsDialogButton">True</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true" IsPartial="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Dialog" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <ThisReferenceExpression />
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DrawingArea.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DrawingArea.xft.xml
new file mode 100644
index 0000000..78de0bc
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.DrawingArea.xft.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Kestner" Created="2/11/2009" LastModified="2/11/2009">
+ <TemplateConfiguration>
+ <_Name>Custom Drawn Widget</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a custom Gtk.DrawingArea subclass.</_Description>
+ <DefaultFilename>DrawingArea</DefaultFilename>
+ </TemplateConfiguration>
+ <TemplateFiles>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.DrawingArea" />
+ </BaseTypes>
+ <CustomAttributes>
+ <AttributeDeclaration Name="System.ComponentModel.ToolboxItem">
+ <Arguments>
+ <AttributeArgument>
+ <Value><PrimitiveExpression Value="True" ValueType="System.Boolean"/></Value>
+ </AttributeArgument>
+ </Arguments>
+ </AttributeDeclaration>
+ </CustomAttributes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <Statements>
+ <CommentStatement>
+ <Comment>
+ <Comment Text="Insert initialization code here." />
+ </Comment>
+ </CommentStatement>
+ </Statements>
+ </Constructor>
+ <MemberMethod Name="OnButtonPressEvent" Attributes="Family, Override">
+ <Parameters>
+ <ParameterDeclarationExpression Name="ev" Type="Gdk.EventButton"/>
+ </Parameters>
+ <ReturnType><TypeReference BaseType="System.Boolean"/></ReturnType>
+ <Statements>
+ <CommentStatement>
+ <Comment>
+ <Comment Text="Insert button press handling code here." />
+ </Comment>
+ </CommentStatement>
+ <MethodReturnStatement>
+ <Expression>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="OnButtonPressEvent">
+ <TargetObject>
+ <BaseReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ArgumentReferenceExpression ParameterName="ev" />
+ </Parameters>
+ </MethodInvokeExpression>
+ </Expression>
+ </MethodReturnStatement>
+ </Statements>
+ </MemberMethod>
+ <MemberMethod Name="OnExposeEvent" Attributes="Family, Override">
+ <Parameters>
+ <ParameterDeclarationExpression Name="ev" Type="Gdk.EventExpose"/>
+ </Parameters>
+ <ReturnType><TypeReference BaseType="System.Boolean"/></ReturnType>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="OnExposeEvent">
+ <TargetObject>
+ <BaseReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ArgumentReferenceExpression ParameterName="ev" />
+ </Parameters>
+ </MethodInvokeExpression>
+ <CommentStatement>
+ <Comment>
+ <Comment Text="Insert drawing code here." />
+ </Comment>
+ </CommentStatement>
+ <MethodReturnStatement>
+ <Expression>
+ <PrimitiveExpression Value="True" ValueType="System.Boolean"/>
+ </Expression>
+ </MethodReturnStatement>
+ </Statements>
+ </MemberMethod>
+ <MemberMethod Name="OnSizeAllocated" Attributes="Family, Override">
+ <Parameters>
+ <ParameterDeclarationExpression Name="allocation" Type="Gdk.Rectangle" />
+ </Parameters>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="OnSizeAllocated">
+ <TargetObject>
+ <BaseReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ArgumentReferenceExpression ParameterName="allocation" />
+ </Parameters>
+ </MethodInvokeExpression>
+ <CommentStatement>
+ <Comment>
+ <Comment Text="Insert layout code here." />
+ </Comment>
+ </CommentStatement>
+ </Statements>
+ </MemberMethod>
+ <MemberMethod Name="OnSizeRequested" Attributes="Family, Override">
+ <Parameters>
+ <ParameterDeclarationExpression Name="requisition" Type="Gtk.Requisition" Direction="Ref" />
+ </Parameters>
+ <Statements>
+ <CommentStatement>
+ <Comment>
+ <Comment Text="Calculate desired size here." />
+ </Comment>
+ </CommentStatement>
+ <AssignStatement>
+ <Left>
+ <FieldReferenceExpression FieldName="Height">
+ <TargetObject>
+ <ArgumentReferenceExpression ParameterName="requisition" />
+ </TargetObject>
+ </FieldReferenceExpression>
+ </Left>
+ <Right>
+ <PrimitiveExpression Value="50" ValueType="System.Int32" />
+ </Right>
+ </AssignStatement>
+ <AssignStatement>
+ <Left>
+ <FieldReferenceExpression FieldName="Width">
+ <TargetObject>
+ <ArgumentReferenceExpression ParameterName="requisition" />
+ </TargetObject>
+ </FieldReferenceExpression>
+ </Left>
+ <Right>
+ <PrimitiveExpression Value="50" ValueType="System.Int32" />
+ </Right>
+ </AssignStatement>
+ </Statements>
+ </MemberMethod>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Widget.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Widget.xft.xml
new file mode 100644
index 0000000..e2701bd
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Widget.xft.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Widget</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a custom Gtk Widget.</_Description>
+ <DefaultFilename>Widget</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Bin" id="${FullName}" design-size="300 300">
+ <property name="Visible">false</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Bin" />
+ </BaseTypes>
+ <CustomAttributes>
+ <AttributeDeclaration Name="System.ComponentModel.ToolboxItem">
+ <Arguments>
+ <AttributeArgument>
+ <Value><PrimitiveExpression Value="True" ValueType="System.Boolean"/></Value>
+ </AttributeArgument>
+ </Arguments>
+ </AttributeDeclaration>
+ </CustomAttributes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <TypeReferenceExpression Type="Stetic.Gui" />
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ThisReferenceExpression/>
+ <TypeOfExpression Type="${FullName}" />
+ </Parameters>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WidgetPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WidgetPartial.xft.xml
new file mode 100644
index 0000000..72941c7
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WidgetPartial.xft.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Widget</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a custom Gtk Widget.</_Description>
+ <DefaultFilename>Widget</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Bin" id="${FullName}" design-size="300 300">
+ <property name="Visible">false</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true" IsPartial="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Bin" />
+ </BaseTypes>
+ <CustomAttributes>
+ <AttributeDeclaration Name="System.ComponentModel.ToolboxItem">
+ <Arguments>
+ <AttributeArgument>
+ <Value><PrimitiveExpression Value="True" ValueType="System.Boolean"/></Value>
+ </AttributeArgument>
+ </Arguments>
+ </AttributeDeclaration>
+ </CustomAttributes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <ThisReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Window.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Window.xft.xml
new file mode 100644
index 0000000..e7bdf2c
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.Window.xft.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Window</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a Gtk Window</_Description>
+ <DefaultFilename>Window</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Disabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Window" id="${FullName}" design-size="400 300">
+ <property name="Title" translatable="yes">${Name}</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Window" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <BaseConstructorArgs>
+ <FieldReferenceExpression FieldName="Toplevel">
+ <TargetObject>
+ <TypeReferenceExpression Type="Gtk.WindowType" />
+ </TargetObject>
+ </FieldReferenceExpression>
+ </BaseConstructorArgs>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <TypeReferenceExpression Type="Stetic.Gui" />
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ <Parameters>
+ <ThisReferenceExpression/>
+ <TypeOfExpression Type="${FullName}" />
+ </Parameters>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WindowPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WindowPartial.xft.xml
new file mode 100644
index 0000000..cc0fe73
--- /dev/null
+++ b/src/addins/MonoDevelop.GtkCore/obj/Debug/MonoDevelop.GtkCore.templates.WindowPartial.xft.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Window</_Name>
+ <Icon>md-gui-file</Icon>
+ <_Category>Gtk</_Category>
+ <LanguageName>*</LanguageName>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a Gtk Window</_Description>
+ <DefaultFilename>Window</DefaultFilename>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <PartialTypeSupport Requirement="Enabled" />
+ </Conditions>
+
+ <TemplateFiles>
+ <Widget DefaultName="${Name}">
+ <SteticTemplate>
+ <widget class="Gtk.Window" id="${FullName}" design-size="400 300">
+ <property name="Title" translatable="yes">${Name}</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </SteticTemplate>
+ <CodeDomFile>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true" IsPartial="true">
+ <BaseTypes>
+ <TypeReference BaseType="Gtk.Window" />
+ </BaseTypes>
+ <Members>
+ <Constructor Attributes="Public, Final">
+ <BaseConstructorArgs>
+ <FieldReferenceExpression FieldName="Toplevel">
+ <TargetObject>
+ <TypeReferenceExpression Type="Gtk.WindowType" />
+ </TargetObject>
+ </FieldReferenceExpression>
+ </BaseConstructorArgs>
+ <Statements>
+ <MethodInvokeExpression>
+ <Method>
+ <MethodReferenceExpression MethodName="Build">
+ <TargetObject>
+ <ThisReferenceExpression/>
+ </TargetObject>
+ </MethodReferenceExpression>
+ </Method>
+ </MethodInvokeExpression>
+ </Statements>
+ </Constructor>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </Widget>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/ActionGroup.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/ActionGroup.xft.xml
index 6d2eaeb..ebac9f6 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/ActionGroup.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/ActionGroup.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a global Action Group.</_Description>
+ <DefaultFilename>ActionGroup</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/ActionGroupPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/ActionGroupPartial.xft.xml
index 06a682f..64e6f8f 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/ActionGroupPartial.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/ActionGroupPartial.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a global Action Group.</_Description>
+ <DefaultFilename>ActionGroup</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/Dialog.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/Dialog.xft.xml
index 8c06740..ebb5716 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/Dialog.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/Dialog.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a Gtk dialog.</_Description>
+ <DefaultFilename>Dialog</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/DialogPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/DialogPartial.xft.xml
index ae2bdaa..69f7d18 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/DialogPartial.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/DialogPartial.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a Gtk dialog.</_Description>
+ <DefaultFilename>Dialog</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/DrawingArea.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/DrawingArea.xft.xml
index 5a106fb..78de0bc 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/DrawingArea.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/DrawingArea.xft.xml
@@ -7,6 +7,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a custom Gtk.DrawingArea subclass.</_Description>
+ <DefaultFilename>DrawingArea</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
<CodeDomFile>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/Widget.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/Widget.xft.xml
index 0760fd3..e2701bd 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/Widget.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/Widget.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a custom Gtk Widget.</_Description>
+ <DefaultFilename>Widget</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/WidgetPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/WidgetPartial.xft.xml
index 8db5853..72941c7 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/WidgetPartial.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/WidgetPartial.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a custom Gtk Widget.</_Description>
+ <DefaultFilename>Widget</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/Window.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/Window.xft.xml
index 3f39207..e7bdf2c 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/Window.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/Window.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a Gtk Window</_Description>
+ <DefaultFilename>Window</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.GtkCore/templates/WindowPartial.xft.xml b/src/addins/MonoDevelop.GtkCore/templates/WindowPartial.xft.xml
index 096952c..cc0fe73 100644
--- a/src/addins/MonoDevelop.GtkCore/templates/WindowPartial.xft.xml
+++ b/src/addins/MonoDevelop.GtkCore/templates/WindowPartial.xft.xml
@@ -8,6 +8,7 @@
<LanguageName>*</LanguageName>
<ProjectType>DotNet</ProjectType>
<_Description>Creates a Gtk Window</_Description>
+ <DefaultFilename>Window</DefaultFilename>
</TemplateConfiguration>
<Conditions>
diff --git a/src/addins/MonoDevelop.HexEditor/Makefile.in b/src/addins/MonoDevelop.HexEditor/Makefile.in
index 2712d99..1248bc6 100644
--- a/src/addins/MonoDevelop.HexEditor/Makefile.in
+++ b/src/addins/MonoDevelop.HexEditor/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.addin.xml b/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.addin.xml
index 185a8da..0378e1e 100644
--- a/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.addin.xml
+++ b/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.addin.xml
@@ -6,16 +6,16 @@
url = ""
description = "Provides a hex editor for MonoDevelop"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.HexEditor.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="AssemblyBrowser" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="AssemblyBrowser" version="4.0.12"/>
</Dependencies>
<!--
<Extension path = "/MonoDevelop/Ide/Commands">
diff --git a/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.csproj b/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.csproj
index 0bd59c0..dd500ee 100644
--- a/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.csproj
+++ b/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor.csproj
@@ -153,11 +153,6 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\CSharpBinding\CSharpBinding.csproj">
<Project>{07CC7654-27D6-421D-A64C-0FFA40456FA2}</Project>
<Name>CSharpBinding</Name>
@@ -168,5 +163,10 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
</Project>
diff --git a/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.MonoDevelop.HexEditor.addin.xml b/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.MonoDevelop.HexEditor.addin.xml
new file mode 100644
index 0000000..0378e1e
--- /dev/null
+++ b/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.MonoDevelop.HexEditor.addin.xml
@@ -0,0 +1,42 @@
+<Addin id = "HexEditor"
+ namespace = "MonoDevelop"
+ name = "MonoDevelop Hex Editor"
+ author = "Mike Krüger"
+ copyright = ""
+ url = ""
+ description = "Provides a hex editor for MonoDevelop"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.HexEditor.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="AssemblyBrowser" version="4.0.12"/>
+ </Dependencies>
+ <!--
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.HexEditor.Commands.ShowHexEditor" _label = "Open with _hex editor" />
+ </Extension> -->
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding
+ id = "HexEditor"
+ insertafter ="AssemblyBrowser"
+ class = "MonoDevelop.HexEditor.HexEditorDisplayBinding" />
+ </Extension>
+ <!--
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "HexEditorNodeExtension" class = "MonoDevelop.HexEditor.HexEditorNodeExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Tools">
+ <Condition id="ItemType" value="ProjectFile">
+ <CommandItem id = "MonoDevelop.HexEditor.Commands.ShowHexEditor" insertafter="FindInFilesSeparator" insertbefore="CombineOptionsSeparator"/>
+ </Condition>
+ </Extension>
+ -->
+</Addin>
diff --git a/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.gtk-gui.gui.stetic b/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9a1b8a3
--- /dev/null
+++ b/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.gtk-gui.gui.stetic
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ </configuration>
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.HexEditor.dll" internal="true" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Core.Gui.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ </import>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.HexEditor/obj/Debug/MonoDevelop.HexEditor.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.HexEditor/obj/Debug/MonoDevelop.HexEditor.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..bd70544
--- /dev/null
+++ b/src/addins/MonoDevelop.HexEditor/obj/Debug/MonoDevelop.HexEditor.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/obj/Debug/MHex.MonoDevelop.HexEditor.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/HexEditor/MonoDevelop.HexEditor.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/HexEditor/MonoDevelop.HexEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/obj/Debug/MonoDevelop.HexEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.HexEditor/obj/Debug/MonoDevelop.HexEditor.dll.mdb
diff --git a/src/addins/MonoDevelop.Refactoring/Makefile.in b/src/addins/MonoDevelop.Refactoring/Makefile.in
index e81bf4d..018a66a 100644
--- a/src/addins/MonoDevelop.Refactoring/Makefile.in
+++ b/src/addins/MonoDevelop.Refactoring/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisCommands.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisCommands.cs
index cb36620..9e202ee 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisCommands.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisCommands.cs
@@ -38,6 +38,7 @@ using ICSharpCode.NRefactory.CSharp;
using MonoDevelop.AnalysisCore.Fixes;
using MonoDevelop.Ide;
using MonoDevelop.CodeIssues;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.AnalysisCore
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisOptions.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisOptions.cs
index 9760ad9..cedc34c 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisOptions.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/AnalysisOptions.cs
@@ -35,6 +35,9 @@ namespace MonoDevelop.AnalysisCore
public static PropertyWrapper<bool> AnalysisEnabled {
get { return QuickTaskStrip.EnableFancyFeatures; }
}
+
+ public readonly static PropertyWrapper<bool> EnableUnitTestEditorIntegration = new PropertyWrapper<bool> ("Testing.EnableUnitTestEditorIntegration", false);
+
}
}
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/FixableResult.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/FixableResult.cs
index 82be707..ae1ecc4 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/FixableResult.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/FixableResult.cs
@@ -31,6 +31,7 @@ using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.CSharp;
using Mono.TextEditor;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.AnalysisCore
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Fixes/GenericFix.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Fixes/GenericFix.cs
index 9d76c40..80beed8 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Fixes/GenericFix.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Fixes/GenericFix.cs
@@ -30,6 +30,7 @@ using ICSharpCode.NRefactory.CSharp;
using MonoDevelop.CodeIssues;
using MonoDevelop.Ide;
using Mono.TextEditor;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.AnalysisCore.Fixes
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/AnalysisOptionsPanel.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/AnalysisOptionsPanel.cs
index ec1139b..b8ddfd0 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/AnalysisOptionsPanel.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/AnalysisOptionsPanel.cs
@@ -1,77 +1,80 @@
-//
-// AnalysisOptionsPanel.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc.
-//
-// 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 MonoDevelop.Ide.Gui.Dialogs;
-using Gtk;
-using MonoDevelop.Core;
-using MonoDevelop.Ide;
-
-namespace MonoDevelop.AnalysisCore.Gui
-{
- public class AnalysisOptionsPanel : OptionsPanel
- {
- AnalysisOptionsWidget widget;
-
- public override Widget CreatePanelWidget ()
- {
- return widget = new AnalysisOptionsWidget () {
- AnalysisEnabled = AnalysisOptions.AnalysisEnabled
- };
- }
-
- public override void ApplyChanges ()
- {
- AnalysisOptions.AnalysisEnabled.Set (widget.AnalysisEnabled);
- }
- }
-
- class AnalysisOptionsWidget : VBox
- {
- CheckButton enabledCheck;
-
- public AnalysisOptionsWidget ()
- {
- enabledCheck = new CheckButton (GettextCatalog.GetString ("Enable source analysis of open files"));
- PackStart (enabledCheck, false, false, 0);
- if (GC.MaxGeneration == 0) {
- HBox hb = new HBox ();
- hb.Spacing = 6;
- hb.PackStart (ImageService.GetImage (Stock.DialogWarning, IconSize.Dialog), false, false, 0);
- hb.PackStart (new Label (GettextCatalog.GetString ("Note: Source analysis may be slow with the current garbage collector.\nUse a generational GC like sgen to get best performance.")), true, true, 0);
- PackStart (hb, false, false, 32);
- }
-
- ShowAll ();
- }
-
- public bool AnalysisEnabled {
- get { return enabledCheck.Active; }
- set { enabledCheck.Active = value; }
- }
- }
-}
-
+//
+// AnalysisOptionsPanel.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc.
+//
+// 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 MonoDevelop.Ide.Gui.Dialogs;
+using Gtk;
+using MonoDevelop.Core;
+using MonoDevelop.Ide;
+
+namespace MonoDevelop.AnalysisCore.Gui
+{
+ public class AnalysisOptionsPanel : OptionsPanel
+ {
+ AnalysisOptionsWidget widget;
+
+ public override Widget CreatePanelWidget ()
+ {
+ return widget = new AnalysisOptionsWidget () {
+ AnalysisEnabled = AnalysisOptions.AnalysisEnabled,
+ UnitTestIntegrationEnabled = AnalysisOptions.EnableUnitTestEditorIntegration
+ };
+ }
+
+ public override void ApplyChanges ()
+ {
+ AnalysisOptions.AnalysisEnabled.Set (widget.AnalysisEnabled);
+ AnalysisOptions.EnableUnitTestEditorIntegration.Set (widget.UnitTestIntegrationEnabled);
+ }
+ }
+
+ class AnalysisOptionsWidget : VBox
+ {
+ CheckButton enabledCheck;
+ CheckButton enabledTest;
+
+ public AnalysisOptionsWidget ()
+ {
+ enabledCheck = new CheckButton (GettextCatalog.GetString ("Enable source analysis of open files"));
+ PackStart (enabledCheck, false, false, 0);
+ enabledTest = new CheckButton (GettextCatalog.GetString ("Enable text editor unit test integration"));
+ PackStart (enabledTest, false, false, 0);
+
+ ShowAll ();
+ }
+
+ public bool AnalysisEnabled {
+ get { return enabledCheck.Active; }
+ set { enabledCheck.Active = value; }
+ }
+
+ public bool UnitTestIntegrationEnabled {
+ get { return enabledTest.Active; }
+ set { enabledTest.Active = value; }
+ }
+ }
+}
+
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs
index 6ad184b..78b3822 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs
@@ -28,6 +28,7 @@ using Mono.TextEditor;
using MonoDevelop.SourceEditor;
using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.AnalysisCore.Gui
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
index 2b0fd04..5a3c2d6 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
@@ -34,6 +34,7 @@ using Mono.TextEditor;
using System.Linq;
using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.AnalysisCore.Gui
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Result.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Result.cs
index 6940a46..0e89e12 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Result.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Result.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
+using ICSharpCode.NRefactory.Refactoring;
using MonoDevelop.AnalysisCore.Extensions;
using MonoDevelop.SourceEditor;
using ICSharpCode.NRefactory.TypeSystem;
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
index 0418fc7..d324d4c 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
@@ -93,6 +93,7 @@ namespace MonoDevelop.CodeActions
document.DocumentParsed -= HandleDocumentDocumentParsed;
document.Editor.Parent.BeginHover -= HandleBeginHover;
RemoveWidget ();
+ Fixes = null;
base.Dispose ();
}
TextLocation loc;
@@ -220,11 +221,12 @@ namespace MonoDevelop.CodeActions
if (args.Button != 0)
return;
var line = editor.GetLine (loc.Line);
- var x = editor.ColumnToX (line, loc.Column) - editor.HAdjustment.Value;
- var y = editor.LineToY (line.LineNumber) - editor.VAdjustment.Value;
+ var x = editor.ColumnToX (line, loc.Column) - editor.HAdjustment.Value + editor.TextViewMargin.TextStartPosition;
+ var y = editor.LineToY (line.LineNumber + 1) - editor.VAdjustment.Value;
if (args.X - x >= 0 * editor.Options.Zoom &&
args.X - x < tagMarkerWidth * editor.Options.Zoom &&
- y - args.Y < (tagMarkerHeight) * editor.Options.Zoom) {
+ args.Y - y < (editor.LineHeight / 2) * editor.Options.Zoom) {
+ result.Cursor = null;
Popup ();
} else {
codeActionEditorExtension.CancelSmartTagPopupTimeout ();
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionWidget.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionWidget.cs
index d0370a0..eee874f 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionWidget.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionWidget.cs
@@ -40,6 +40,8 @@ using ICSharpCode.NRefactory.Semantics;
using MonoDevelop.CodeActions;
using MonoDevelop.Refactoring;
using MonoDevelop.Projects;
+using MonoDevelop.Core.ProgressMonitoring;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeActions
{
@@ -160,7 +162,7 @@ namespace MonoDevelop.CodeActions
foreach (var fix_ in fixes.Where (f => f.BoundToIssue != null)) {
var fix = fix_;
- foreach (var inspector_ in RefactoringService.GetInspectors (document.Editor.MimeType).Where (i => i.GetSeverity () != ICSharpCode.NRefactory.CSharp.Severity.None)) {
+ foreach (var inspector_ in RefactoringService.GetInspectors (document.Editor.MimeType).Where (i => i.GetSeverity () != Severity.None)) {
var inspector = inspector_;
if (inspector.IdString.IndexOf (fix.BoundToIssue.FullName, StringComparison.Ordinal) < 0)
@@ -201,17 +203,25 @@ namespace MonoDevelop.CodeActions
node,
ref resolveResult
);
+
+ foreach (var t in possibleNamespaces.Where (tp => tp.OnlyAddReference)) {
+ var menuItem = new Gtk.MenuItem (t.GetImportText ());
+ menuItem.Activated += delegate {
+ new ResolveCommandHandler.AddImport (document, resolveResult, null, t.Reference, true, node).Run ();
+ menu.Destroy ();
+ };
+ menu.Add (menuItem);
+ items++;
+ }
bool addUsing = !(resolveResult is AmbiguousTypeResolveResult);
if (addUsing) {
foreach (var t in possibleNamespaces.Where (tp => tp.IsAccessibleWithGlobalUsing)) {
string ns = t.Namespace;
var reference = t.Reference;
- var menuItem = new Gtk.MenuItem (string.Format ("using {0};", ns));
+ var menuItem = new Gtk.MenuItem (t.GetImportText ());
menuItem.Activated += delegate {
new ResolveCommandHandler.AddImport (document, resolveResult, ns, reference, true, node).Run ();
- if (reference != null)
- document.Project.Items.Add (reference);
menu.Destroy ();
};
menu.Add (menuItem);
@@ -224,7 +234,7 @@ namespace MonoDevelop.CodeActions
foreach (var t in possibleNamespaces) {
string ns = t.Namespace;
var reference = t.Reference;
- var menuItem = new Gtk.MenuItem (GettextCatalog.GetString ("{0}", ns + "." + document.Editor.GetTextBetween (node.StartLocation, node.EndLocation)));
+ var menuItem = new Gtk.MenuItem (t.GetInsertNamespaceText (document.Editor.GetTextBetween (node.StartLocation, node.EndLocation)));
menuItem.Activated += delegate {
new ResolveCommandHandler.AddImport (document, resolveResult, ns, reference, false, node).Run ();
menu.Destroy ();
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
index 27fa09c..5f07495 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs
@@ -40,6 +40,7 @@ using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.CodeIssues;
using Mono.TextEditor;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueAddinNode.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueAddinNode.cs
index d74d0f0..2d3b8b2 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueAddinNode.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueAddinNode.cs
@@ -29,6 +29,7 @@ using Mono.Addins;
using MonoDevelop.Core;
using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueOptionsDialog.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueOptionsDialog.cs
index 00ec427..5bb02a1 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueOptionsDialog.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueOptionsDialog.cs
@@ -31,6 +31,7 @@ using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.CSharp;
using Gtk;
using MonoDevelop.CodeActions;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePad.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePad.cs
index 52dcf31..e19b4d6 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePad.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePad.cs
@@ -40,6 +40,7 @@ using MonoDevelop.Core;
using System.Threading.Tasks;
using ICSharpCode.NRefactory.TypeSystem;
using System.IO;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
@@ -162,7 +163,7 @@ namespace MonoDevelop.CodeIssues
get {
if (issueControl == null)
issueControl = new CodeIssuePadControl ();
- return (Gtk.Widget)Xwt.Engine.WidgetRegistry.GetNativeWidget (issueControl);
+ return (Gtk.Widget)Xwt.Toolkit.CurrentEngine.GetNativeWidget (issueControl);
}
}
}
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs
index 32e00a4..90b107b 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs
@@ -35,6 +35,7 @@ using System.Collections.Generic;
using Mono.TextEditor;
using MonoDevelop.SourceEditor.QuickTasks;
using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueProvider.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueProvider.cs
index a880c74..2add7aa 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueProvider.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssueProvider.cs
@@ -29,7 +29,8 @@ using ICSharpCode.NRefactory.CSharp.Refactoring;
using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.NRefactory;
using System.Threading;
-using MonoDevelop.Core;
+using MonoDevelop.Core;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.CodeIssues
{
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs
index b47b4d1..4de4db1 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs
@@ -101,7 +101,7 @@ namespace MonoDevelop.Refactoring.Rename
if (options.SelectedItem is IEntity) {
var member = (IEntity)options.SelectedItem;
- if (member.EntityType == EntityType.Constructor || member.EntityType == EntityType.Destructor) {
+ if (member.SymbolKind == SymbolKind.Constructor || member.SymbolKind == SymbolKind.Destructor) {
entry.Text = member.DeclaringType.Name;
} else {
entry.Text = member.Name;
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
index 5d65403..35f6fb4 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
@@ -186,7 +186,7 @@ namespace MonoDevelop.Refactoring.Rename
{
if (options.SelectedItem is IVariable) {
var field = options.SelectedItem as IField;
- if (field != null && field.Accessibility != Accessibility.Private) {
+ if (field != null && (field.Accessibility != Accessibility.Private || field.DeclaringTypeDefinition != null && field.DeclaringTypeDefinition.Parts.Count > 1)) {
MessageService.ShowCustomDialog (new RenameItemDialog (options, this));
return;
}
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.addin.xml b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.addin.xml
index 82d8817..293d6a4 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.addin.xml
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.addin.xml
@@ -7,17 +7,17 @@
url = "http://www.monodevelop.com/"
description = "Provides refactoring support to MonoDevelop"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly = "MonoDevelop.Refactoring.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
- <Addin id="SourceEditor2" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
</Dependencies>
<!-- Extension Points -->
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.csproj b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.csproj
index a5fc436..e9a4d6a 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.csproj
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.csproj
@@ -162,11 +162,6 @@
<Name>ICSharpCode.NRefactory.CSharp</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -180,6 +175,12 @@
<ProjectReference Include="..\..\..\external\xwt\Xwt\Xwt.csproj">
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
<Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ExtensionMethods.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ExtensionMethods.cs
index b77dd42..7eab1ab 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ExtensionMethods.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ExtensionMethods.cs
@@ -31,24 +31,50 @@ using ICSharpCode.NRefactory.CSharp.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.Semantics;
using System.Threading.Tasks;
+using MonoDevelop.Core;
+using System.Threading;
namespace MonoDevelop.Refactoring
{
public static class ExtensionMethods
{
+ static CancellationTokenSource sharedTokenSource = new CancellationTokenSource ();
+
class ResolverAnnotation
{
- public Task<CSharpAstResolver> Task;
+ public TaskWrapper Task;
public CSharpUnresolvedFile ParsedFile;
}
+ public class TaskWrapper {
+ readonly Task<CSharpAstResolver> underlyingTask;
+
+ public CSharpAstResolver Result {
+ get {
+ if (underlyingTask.IsCanceled)
+ return null;
+ try {
+ return underlyingTask.Result;
+ } catch (Exception e) {
+ LoggingService.LogWarning ("Exception while getting shared AST resolver.", e);
+ return null;
+ }
+ }
+ }
+ public TaskWrapper (Task<CSharpAstResolver> underlyingTask)
+ {
+ this.underlyingTask = underlyingTask;
+ }
+
+ }
+
/// <summary>
/// Returns a full C# syntax tree resolver which is shared between semantic highlighting, source analysis and refactoring.
/// For code analysis tasks this should be used instead of generating an own resolver. Only exception is if a local resolving is done using a
/// resolve navigator.
/// Note: The shared resolver is fully resolved.
/// </summary>
- public static Task<CSharpAstResolver> GetSharedResolver (this Document document)
+ public static TaskWrapper GetSharedResolver (this Document document)
{
var parsedDocument = document.ParsedDocument;
if (parsedDocument == null)
@@ -58,7 +84,8 @@ namespace MonoDevelop.Refactoring
var parsedFile = parsedDocument.ParsedFile as CSharpUnresolvedFile;
if (unit == null || parsedFile == null)
return null;
-
+ var compilation = document.Compilation;
+
var resolverAnnotation = document.Annotation<ResolverAnnotation> ();
if (resolverAnnotation != null) {
@@ -66,17 +93,27 @@ namespace MonoDevelop.Refactoring
return resolverAnnotation.Task;
document.RemoveAnnotations<ResolverAnnotation> ();
}
-
+ sharedTokenSource.Cancel ();
+ sharedTokenSource = new CancellationTokenSource ();
+ var token = sharedTokenSource.Token;
var resolveTask = Task.Factory.StartNew (delegate {
- var result = new CSharpAstResolver (document.Compilation, unit, parsedFile);
- result.ApplyNavigator (new ConstantModeResolveVisitorNavigator (ResolveVisitorNavigationMode.Resolve, null));
- return result;
- });
+ try {
+ var result = new CSharpAstResolver (compilation, unit, parsedFile);
+ result.ApplyNavigator (new ConstantModeResolveVisitorNavigator (ResolveVisitorNavigationMode.Resolve, null), token);
+ return result;
+ } catch (OperationCanceledException) {
+ return null;
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while creating the resolver.", e);
+ return null;
+ }
+ }, token);
+ var wrapper = new TaskWrapper (resolveTask);
document.AddAnnotation (new ResolverAnnotation {
- Task = resolveTask,
+ Task = wrapper,
ParsedFile = parsedFile
});
- return resolveTask;
+ return wrapper;
}
sealed class ConstantModeResolveVisitorNavigator : IResolveVisitorNavigator
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ImportSymbolHandler.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ImportSymbolHandler.cs
index 126cd01..c240a44 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ImportSymbolHandler.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ImportSymbolHandler.cs
@@ -165,20 +165,27 @@ namespace MonoDevelop.Refactoring
}
}
+ static string GetDefaultDisplaySelection (string description, bool isSelected)
+ {
+ if (!isSelected)
+ return "<span foreground=\"darkgray\">" + description + "</span>";
+ return description;
+ }
+
string displayDescription = null;
- public override string DisplayDescription {
- get {
- if (displayDescription == null) {
- Initialize ();
- if (generateUsing || insertNamespace) {
- displayDescription = string.Format (GettextCatalog.GetString ("(from '{0}')"), type.Namespace);
- } else {
- displayDescription = "";
- }
+ public override string GetDisplayDescription (bool isSelected)
+ {
+ if (displayDescription == null) {
+ Initialize ();
+ if (generateUsing || insertNamespace) {
+ displayDescription = string.Format (GettextCatalog.GetString ("(from '{0}')"), type.Namespace);
+ } else {
+ displayDescription = "";
}
- return displayDescription;
}
+ return GetDefaultDisplaySelection (displayDescription, isSelected);
}
+
public override string Description {
get {
@@ -234,3 +241,275 @@ namespace MonoDevelop.Refactoring
}
}
}
+
+/*
+//
+// RefactoryCommands.cs
+//
+// Author:
+// Mike Krüger <mkrueger at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// 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.Text;
+using System.Threading;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Projects;
+using MonoDevelop.Projects.Text;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.Ide.Gui.Dialogs;
+using MonoDevelop.Ide.FindInFiles;
+using MonoDevelop.Refactoring;
+using MonoDevelop.Ide;
+using System.Linq;
+using MonoDevelop.Ide.CodeCompletion;
+using Mono.TextEditor;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Ide.TypeSystem;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using MonoDevelop.Ide.TypeSystem;
+
+namespace MonoDevelop.Refactoring
+{
+ class GenerateNamespaceImport
+ {
+ public bool GenerateUsing { get; set; }
+ public bool InsertNamespace { get; set; }
+ }
+
+ class ImportSymbolCache
+ {
+ Dictionary<string, GenerateNamespaceImport> cache = new Dictionary<string, GenerateNamespaceImport> ();
+
+ public GenerateNamespaceImport GetResult (IUnresolvedFile unit, string typeNamespace, string typeName, MonoDevelop.Ide.Gui.Document doc)
+ {
+ GenerateNamespaceImport result;
+ if (cache.TryGetValue (typeNamespace, out result))
+ return result;
+ result = new GenerateNamespaceImport ();
+ cache[typeNamespace] = result;
+ TextEditorData data = doc.Editor;
+
+ result.InsertNamespace = false;
+ var loc = new TextLocation (data.Caret.Line, data.Caret.Column);
+ foreach (var ns in RefactoringOptions.GetUsedNamespaces (doc, loc)) {
+ if (typeNamespace == ns) {
+ result.GenerateUsing = false;
+ return result;
+ }
+ }
+
+ result.GenerateUsing = true;
+ string name = typeName;
+
+ foreach (string ns in RefactoringOptions.GetUsedNamespaces (doc, loc)) {
+ if (doc.Compilation.MainAssembly.GetTypeDefinition (ns, name, 0) != null) {
+ result.GenerateUsing = false;
+ result.InsertNamespace = true;
+ return result;
+ }
+ }
+ return result;
+ }
+ }
+
+ class ImportSymbolCompletionData : CompletionData
+ {
+ internal readonly string typeName;
+ ParsedDocument unit;
+ MonoDevelop.Ide.Gui.Document doc;
+ ImportSymbolCache cache;
+ TypeKind kind;
+ Lazy<FrameworkLookup.AssemblyLookup> lookup;
+ MonoDevelop.Projects.ProjectReference reference;
+ public ImportSymbolCompletionData (MonoDevelop.Ide.Gui.Document doc, ImportSymbolCache cache, string typeName, TypeKind kind, Lazy<FrameworkLookup.AssemblyLookup> lookup, MonoDevelop.Projects.ProjectReference reference)
+ {
+ this.doc = doc;
+ this.cache = cache;
+ this.unit = doc.ParsedDocument;
+ this.kind = kind;
+ this.typeName = typeName;
+ this.lookup = lookup;
+ this.reference = reference;
+ }
+
+ bool initialized = false;
+ bool generateReference;
+ bool generateUsing;
+ bool insertNamespace;
+
+ void Initialize ()
+ {
+ if (initialized)
+ return;
+ initialized = true;
+ var netProject = (DotNetProject)doc.Project;
+ generateReference = true;
+ foreach (var r in netProject.References) {
+ if (r.Equals (reference)) {
+ generateReference = false;
+ break;
+ }
+ }
+ var result = cache.GetResult (unit.ParsedFile, lookup.Value.Namespace, typeName, doc);
+ generateUsing = result.GenerateUsing;
+ insertNamespace = result.InsertNamespace;
+ }
+
+ #region IActionCompletionData implementation
+ public override void InsertCompletionText (CompletionListWindow window, ref KeyActions ka, Gdk.Key closeChar, char keyChar, Gdk.ModifierType modifier)
+ {
+ Initialize ();
+ string text = insertNamespace ? lookup.Value.Namespace + "." + typeName : typeName;
+ if (text != GetCurrentWord (window)) {
+ if (window.WasShiftPressed && generateReference)
+ text = lookup.Value.Namespace + "." + text;
+ window.CompletionWidget.SetCompletionText (window.CodeCompletionContext, GetCurrentWord (window), text);
+ }
+
+ if (generateReference) {
+ var project = doc.Project;
+ project.Items.Add (reference);
+ IdeApp.ProjectOperations.Save (project);
+ }
+
+ if (!window.WasShiftPressed && generateUsing) {
+ var generator = CodeGenerator.CreateGenerator (doc);
+ if (generator != null) {
+ generator.AddGlobalNamespaceImport (doc, lookup.Value.Namespace);
+ // reparse
+ doc.UpdateParseDocument ();
+ }
+ }
+ }
+ #endregion
+
+ #region ICompletionData implementation
+ public override IconId Icon {
+ get {
+ switch (kind) {
+ case TypeKind.Delegate:
+ return MonoDevelop.Ide.Gui.Stock.Delegate;
+ case TypeKind.Struct:
+ return MonoDevelop.Ide.Gui.Stock.Struct;
+ case TypeKind.Interface:
+ return MonoDevelop.Ide.Gui.Stock.Interface;
+ case TypeKind.Enum:
+ return MonoDevelop.Ide.Gui.Stock.Enum;
+ default:
+ return MonoDevelop.Ide.Gui.Stock.Class;
+ }
+ }
+ }
+
+ public override string DisplayText {
+ get {
+ return typeName;
+ }
+ }
+
+ string displayDescription = null;
+ public override string DisplayDescription {
+ get {
+ if (displayDescription == null) {
+ Initialize ();
+ if (generateReference) {
+ displayDescription = string.Format (GettextCatalog.GetString ("(reference '{0}')"), reference.Reference);
+ } else if (generateUsing) {
+ displayDescription = string.Format (GettextCatalog.GetString ("(from '{0}')"), lookup.Value.Namespace);
+ } else {
+ displayDescription = "";
+ }
+ }
+ return displayDescription;
+ }
+ }
+
+ public override string Description {
+ get {
+ return DisplayDescription;
+ }
+ }
+
+ public override string CompletionText {
+ get {
+ return typeName;
+ }
+ }
+ #endregion
+ }
+
+ public class ImportSymbolHandler: CommandHandler
+ {
+ protected override void Run ()
+ {
+ var doc = IdeApp.Workbench.ActiveDocument;
+ if (doc == null || doc.FileName == FilePath.Null || doc.ParsedDocument == null)
+ return;
+ ITextEditorExtension ext = doc.EditorExtension;
+ while (ext != null && !(ext is CompletionTextEditorExtension))
+ ext = ext.Next;
+ if (ext == null)
+ return;
+
+ var dom = doc.Compilation;
+ ImportSymbolCache cache = new ImportSymbolCache ();
+ List<ImportSymbolCompletionData> typeList = new List<ImportSymbolCompletionData> ();
+ Dictionary<string, MonoDevelop.Projects.ProjectReference> referenceCache = new Dictionary<string, MonoDevelop.Projects.ProjectReference> ();
+ var netProject = (DotNetProject)doc.Project;
+ foreach (var type in TypeSystemService.GetFrameworkLookup (netProject).GetAllTypes ()) {
+ var r = type.Item3.Value;
+ MonoDevelop.Projects.ProjectReference reference;
+ if (!referenceCache.TryGetValue (r.FullName, out reference)) {
+ var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
+ if (systemAssembly == null) {
+ reference = null;
+ } else {
+ reference = new MonoDevelop.Projects.ProjectReference (systemAssembly);
+ }
+ referenceCache [r.FullName] = reference;
+ }
+ if (reference == null)
+ continue;
+ typeList.Add (new ImportSymbolCompletionData (doc, cache, type.Item2, type.Item1, type.Item3, reference));
+ }
+
+ typeList.Sort (delegate (ImportSymbolCompletionData left, ImportSymbolCompletionData right) {
+ return left.typeName.CompareTo (right.typeName);
+ });
+
+
+ var completionList = new CompletionDataList ();
+ completionList.IsSorted = true;
+
+ typeList.ForEach (cd => completionList.Add (cd));
+
+ ((CompletionTextEditorExtension)ext).ShowCompletion (completionList);
+ }
+ }
+}
+ * */
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs
index 32bbe35..d6271c0 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs
@@ -43,6 +43,7 @@ using ICSharpCode.NRefactory.Semantics;
using MonoDevelop.CodeActions;
using MonoDevelop.SourceEditor.QuickTasks;
using MonoDevelop.Projects;
+using MonoDevelop.Ide.Gui.Components;
namespace MonoDevelop.Refactoring
{
@@ -206,8 +207,12 @@ namespace MonoDevelop.Refactoring
}
}
- IEnumerable<MonoDevelop.CodeActions.CodeAction> validActions;
- MonoDevelop.Ide.TypeSystem.ParsedDocument lastDocument;
+ class RefactoringDocumentInfo
+ {
+ public IEnumerable<MonoDevelop.CodeActions.CodeAction> validActions;
+ public MonoDevelop.Ide.TypeSystem.ParsedDocument lastDocument;
+ }
+
DocumentLocation lastLocation;
@@ -269,23 +274,27 @@ namespace MonoDevelop.Refactoring
ciset.CommandInfos.Add (info, new Action (new RefactoringOperationWrapper (refactoring, options).Operation));
}
}
-
+ var refactoringInfo = doc.Annotation<RefactoringDocumentInfo> ();
+ if (refactoringInfo == null) {
+ refactoringInfo = new RefactoringDocumentInfo ();
+ doc.AddAnnotation (refactoringInfo);
+ }
var loc = doc.Editor.Caret.Location;
bool first = true;
- if (lastDocument != doc.ParsedDocument || loc != lastLocation) {
+ if (refactoringInfo.lastDocument != doc.ParsedDocument || loc != lastLocation) {
if (QuickTaskStrip.EnableFancyFeatures) {
var ext = doc.GetContent <CodeActionEditorExtension> ();
- validActions = ext != null ? ext.GetCurrentFixes () : null;
+ refactoringInfo.validActions = ext != null ? ext.GetCurrentFixes () : null;
} else {
- validActions = RefactoringService.GetValidActions (doc, loc).Result;
+ refactoringInfo.validActions = RefactoringService.GetValidActions (doc, loc).Result;
}
lastLocation = loc;
- lastDocument = doc.ParsedDocument;
+ refactoringInfo.lastDocument = doc.ParsedDocument;
}
- if (validActions != null) {
- foreach (var fix_ in validActions) {
+ if (refactoringInfo.validActions != null) {
+ foreach (var fix_ in refactoringInfo.validActions) {
var fix = fix_;
if (first) {
first = false;
diff --git a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs
index 8822f3d..e568de4 100644
--- a/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs
+++ b/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ResolveCommandHandler.cs
@@ -47,6 +47,8 @@ using ICSharpCode.NRefactory.CSharp.Refactoring;
using MonoDevelop.Core.Assemblies;
using MonoDevelop.Projects;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
+using MonoDevelop.Core.ProgressMonitoring;
+using ICSharpCode.NRefactory.Completion;
namespace MonoDevelop.Refactoring
{
@@ -97,15 +99,26 @@ namespace MonoDevelop.Refactoring
var possibleNamespaces = GetPossibleNamespaces (doc, node, ref resolveResult);
+ foreach (var t in possibleNamespaces.Where (tp => tp.OnlyAddReference)) {
+ var reference = t.Reference;
+ var info = resolveMenu.CommandInfos.Add (
+ t.GetImportText (),
+ new System.Action (new AddImport (doc, resolveResult, null, reference, true, node).Run)
+ );
+ info.Icon = MonoDevelop.Ide.Gui.Stock.AddNamespace;
+
+ }
+
+
bool addUsing = !(resolveResult is AmbiguousTypeResolveResult);
if (addUsing) {
foreach (var t in possibleNamespaces.Where (tp => tp.IsAccessibleWithGlobalUsing)) {
string ns = t.Namespace;
var reference = t.Reference;
var info = resolveMenu.CommandInfos.Add (
- string.Format ("using {0};", ns),
+ t.GetImportText (),
new System.Action (new AddImport (doc, resolveResult, ns, reference, true, node).Run)
- );
+ );
info.Icon = MonoDevelop.Ide.Gui.Stock.AddNamespace;
}
}
@@ -119,7 +132,7 @@ namespace MonoDevelop.Refactoring
foreach (var t in possibleNamespaces) {
string ns = t.Namespace;
var reference = t.Reference;
- resolveMenu.CommandInfos.Add (string.Format ("{0}", ns + "." + doc.Editor.GetTextBetween (node.StartLocation, node.EndLocation)), new System.Action (new AddImport (doc, resolveResult, ns, reference, false, node).Run));
+ resolveMenu.CommandInfos.Add (t.GetInsertNamespaceText (doc.Editor.GetTextBetween (node.StartLocation, node.EndLocation)), new System.Action (new AddImport (doc, resolveResult, ns, reference, false, node).Run));
}
}
@@ -212,6 +225,7 @@ namespace MonoDevelop.Refactoring
{
public string Namespace { get; private set; }
public bool IsAccessibleWithGlobalUsing { get; private set; }
+ public bool OnlyAddReference { get { return !IsAccessibleWithGlobalUsing && Reference != null; } }
public MonoDevelop.Projects.ProjectReference Reference { get; private set; }
public PossibleNamespace (string @namespace, bool isAccessibleWithGlobalUsing, MonoDevelop.Projects.ProjectReference reference = null)
@@ -220,6 +234,50 @@ namespace MonoDevelop.Refactoring
this.IsAccessibleWithGlobalUsing = isAccessibleWithGlobalUsing;
this.Reference = reference;
}
+
+ string GetLibraryName ()
+ {
+ var txt = Reference.Reference;
+ int idx = txt.IndexOf (',');
+ if (idx >= 0)
+ return txt.Substring (0, idx);
+ return txt;
+ }
+
+ public string GetImportText ()
+ {
+ if (OnlyAddReference)
+ return GettextCatalog.GetString (
+ "Reference '{0}'",
+ GetLibraryName ());
+ if (Reference != null)
+ return GettextCatalog.GetString (
+ "Reference '{0}' and use '{1}'",
+ GetLibraryName (),
+ string.Format ("using {0};", Namespace));
+
+ return string.Format ("using {0};", Namespace);
+ }
+
+ public string GetInsertNamespaceText (string member)
+ {
+ if (Reference != null)
+ return GettextCatalog.GetString (
+ "Reference '{0}' and use '{1}'",
+ GetLibraryName (),
+ Namespace + "." + member
+ );
+ return Namespace + "." + member;
+ }
+ }
+
+ internal static bool CanBeReferenced (Project project, SystemAssembly systemAssembly)
+ {
+ var netProject = project as DotNetProject;
+ if (netProject == null)
+ return false;
+ var result = netProject.TargetRuntime.AssemblyContext.GetAssemblyNameForVersion(systemAssembly.FullName, netProject.TargetFramework);
+ return !string.IsNullOrEmpty (result);
}
static IEnumerable<PossibleNamespace> GetPossibleNamespaces (Document doc, AstNode node, ResolveResult resolveResult, DocumentLocation location)
@@ -227,6 +285,9 @@ namespace MonoDevelop.Refactoring
var unit = doc.ParsedDocument.GetAst<SyntaxTree> ();
if (unit == null)
yield break;
+ var project = doc.Project;
+ if (project == null)
+ yield break;
int tc = GetTypeParameterCount (node);
var attribute = unit.GetNodeAt<ICSharpCode.NRefactory.CSharp.Attribute> (location);
@@ -234,28 +295,37 @@ namespace MonoDevelop.Refactoring
var compilations = new List<Tuple<ICompilation, MonoDevelop.Projects.ProjectReference>> ();
compilations.Add (Tuple.Create (doc.Compilation, (MonoDevelop.Projects.ProjectReference)null));
- var referencedItems = doc.Project.GetReferencedItems (IdeApp.Workspace.ActiveConfiguration).ToList ();
- foreach (var project in doc.Project.ParentSolution.GetAllProjects ()) {
- if (project == doc.Project || referencedItems.Contains (project))
- continue;
- var comp = TypeSystemService.GetCompilation (project);
- if (comp == null)
- continue;
- compilations.Add (Tuple.Create (comp, new MonoDevelop.Projects.ProjectReference (project)));
+ var referencedItems = IdeApp.Workspace != null ? project.GetReferencedItems (IdeApp.Workspace.ActiveConfiguration).ToList () : (IEnumerable<SolutionItem>) new SolutionItem[0];
+ var solution = project != null ? project.ParentSolution : null;
+ if (solution != null) {
+ foreach (var curProject in solution.GetAllProjects ()) {
+ if (curProject == project || referencedItems.Contains (curProject))
+ continue;
+ var comp = TypeSystemService.GetCompilation (curProject);
+ if (comp == null)
+ continue;
+ compilations.Add (Tuple.Create (comp, new MonoDevelop.Projects.ProjectReference (curProject)));
+ }
}
- var netProject = doc.Project as DotNetProject;
+ var netProject = project as DotNetProject;
if (netProject == null)
yield break;
- var frameworkLookup = TypeSystemService.GetFrameworkLookup (netProject);
-
- if (resolveResult is UnknownMemberResolveResult) {
+ FrameworkLookup frameworkLookup;
+ if (!TypeSystemService.TryGetFrameworkLookup (netProject, out frameworkLookup))
+ frameworkLookup = null;
+ if (frameworkLookup != null && resolveResult is UnknownMemberResolveResult) {
var umResult = (UnknownMemberResolveResult)resolveResult;
- foreach (var r in frameworkLookup.LookupExtensionMethod (umResult.MemberName)) {
- var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
- if (systemAssembly == null)
- continue;
- compilations.Add (Tuple.Create (TypeSystemService.GetCompilation (systemAssembly, doc.Compilation), new MonoDevelop.Projects.ProjectReference (systemAssembly)));
+ try {
+ foreach (var r in frameworkLookup.GetExtensionMethodLookups (umResult)) {
+ var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
+ if (systemAssembly == null)
+ continue;
+ if (CanBeReferenced (doc.Project, systemAssembly))
+ compilations.Add (Tuple.Create (TypeSystemService.GetCompilation (systemAssembly, doc.Compilation), new MonoDevelop.Projects.ProjectReference (systemAssembly)));
+ }
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while looking up framework extension methods.", e);
}
}
bool foundIdentifier = false;
@@ -264,6 +334,8 @@ namespace MonoDevelop.Refactoring
var compilation = comp.Item1;
var requiredReference = comp.Item2;
if (resolveResult is AmbiguousTypeResolveResult) {
+ if (compilation != doc.Compilation)
+ continue;
var aResult = resolveResult as AmbiguousTypeResolveResult;
var file = doc.ParsedDocument.ParsedFile as CSharpUnresolvedFile;
var scope = file.GetUsingScope (location).Resolve (compilation);
@@ -338,14 +410,43 @@ namespace MonoDevelop.Refactoring
}
}
// Try to search framework types
- if (!foundIdentifier && resolveResult is UnknownIdentifierResolveResult) {
+ if (!foundIdentifier && frameworkLookup != null && resolveResult is UnknownIdentifierResolveResult) {
var uiResult = resolveResult as UnknownIdentifierResolveResult;
- string possibleAttributeName = isInsideAttributeType ? uiResult.Identifier + "Attribute" : uiResult.Identifier;
- foreach (var r in frameworkLookup.LookupIdentifier (possibleAttributeName, tc)) {
- var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
- if (systemAssembly == null)
- continue;
- yield return new PossibleNamespace (r.Namespace, true, new MonoDevelop.Projects.ProjectReference (systemAssembly));
+ if (uiResult != null) {
+ var lookups = new List<Tuple<FrameworkLookup.AssemblyLookup, SystemAssembly>> ();
+ try {
+ foreach (var r in frameworkLookup.GetLookups (uiResult, tc, isInsideAttributeType)) {
+ var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
+ if (systemAssembly == null)
+ continue;
+ if (CanBeReferenced (doc.Project, systemAssembly))
+ lookups.Add (Tuple.Create (r, systemAssembly));
+ }
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while looking up framework types.", e);
+ }
+ foreach(var kv in lookups)
+ yield return new PossibleNamespace (kv.Item1.Namespace, true, new MonoDevelop.Projects.ProjectReference (kv.Item2));
+
+ }
+ }
+ if (!foundIdentifier && frameworkLookup != null && resolveResult is UnknownMemberResolveResult) {
+ var uiResult = resolveResult as UnknownMemberResolveResult;
+ if (uiResult != null) {
+ var lookups = new List<Tuple<FrameworkLookup.AssemblyLookup, SystemAssembly>> ();
+ try {
+ foreach (var r in frameworkLookup.GetLookups (uiResult, node.ToString (), tc, isInsideAttributeType)) {
+ var systemAssembly = netProject.AssemblyContext.GetAssemblyFromFullName (r.FullName, r.Package, netProject.TargetFramework);
+ if (systemAssembly == null)
+ continue;
+ if (CanBeReferenced (doc.Project, systemAssembly))
+ lookups.Add (Tuple.Create (r, systemAssembly));
+ }
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while looking up framework types.", e);
+ }
+ foreach(var kv in lookups)
+ yield return new PossibleNamespace (kv.Item1.Namespace, true, new MonoDevelop.Projects.ProjectReference (kv.Item2));
}
}
@@ -374,8 +475,14 @@ namespace MonoDevelop.Refactoring
{
var loc = doc.Editor.Caret.Location;
- if (reference != null)
- doc.Project.Items.Add (reference);
+ if (reference != null) {
+ var project = doc.Project;
+ project.Items.Add (reference);
+ IdeApp.ProjectOperations.Save (project);
+ }
+
+ if (string.IsNullOrEmpty (ns))
+ return;
if (!addUsing) {
// var unit = doc.ParsedDocument.GetAst<SyntaxTree> ();
diff --git a/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.MonoDevelop.Refactoring.addin.xml b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.MonoDevelop.Refactoring.addin.xml
new file mode 100644
index 0000000..293d6a4
--- /dev/null
+++ b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.MonoDevelop.Refactoring.addin.xml
@@ -0,0 +1,217 @@
+<Addin
+ id = "Refactoring"
+ namespace = "MonoDevelop"
+ name = "Refactoring Support"
+ author = "Mike Krüger"
+ copyright = "X11"
+ url = "http://www.monodevelop.com/"
+ description = "Provides refactoring support to MonoDevelop"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly = "MonoDevelop.Refactoring.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension Points -->
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/Refactorings" name = "Refactorings">
+ <ExtensionNode name="Class"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/CodeGenerators" name = "Code Generators">
+ <ExtensionNode name="Class"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/ASTProvider" name = "ASTProviders">
+ <ExtensionNode name="Class"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/CodeActions" name = "CodeAction">
+ <ExtensionNode name="Action" type ="MonoDevelop.CodeActions.CodeActionAddinNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/CodeActionSource" name = "CodeActionSource">
+ <ExtensionNode name="Source"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/CodeIssues" name = "CodeIssue">
+ <ExtensionNode name="CodeIssue" type ="MonoDevelop.CodeIssues.CodeIssueAddinNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Refactoring/CodeIssueSource" name = "CodeIssueSource">
+ <ExtensionNode name="Source"/>
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <ExtensionNodeSet id="MonoDevelop.AnalysisCore.Rules">
+ <ExtensionNode name="Category" type="MonoDevelop.Ide.Codons.CategoryNode">
+ <ExtensionNodeSet id="MonoDevelop.AnalysisCore.Rules" />
+ </ExtensionNode>
+ <ExtensionNode name="Rule" type="MonoDevelop.AnalysisCore.Extensions.NamedAnalysisRuleAddinNode" />
+ <ExtensionNode name="Adaptor" type="MonoDevelop.AnalysisCore.Extensions.AdaptorAnalysisRuleAddinNode" />
+ </ExtensionNodeSet>
+
+ <ExtensionPoint path = "/MonoDevelop/AnalysisCore/Rules" name = "Analysis Rules">
+ <Description>Analysis rules.</Description>
+ <ExtensionNodeSet id="MonoDevelop.AnalysisCore.Rules" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/AnalysisCore/Types" name = "Analysis rule input/output types">
+ <Description>Analysis rule input/output types.</Description>
+ <ExtensionNode name="Type" type="MonoDevelop.AnalysisCore.Extensions.AnalysisTypeExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/AnalysisCore/FixHandlers" name = "Fix handlers">
+ <Description>Fix handlers. Classes must implement IAnalysisFixHandler.</Description>
+ <ExtensionNode name="Handler" type="MonoDevelop.AnalysisCore.Extensions.FixHandlerExtensionNode" />
+ </ExtensionPoint>
+ <!--
+ <Extension path = "/MonoDevelop/Ide/Pads">
+ <Pad id="MonoDevelop.Refactoring.CodeIssuePad" _label="Code Issues" class="MonoDevelop.CodeIssues.CodeIssuePad" defaultPlacement = "Bottom"/>
+ </Extension>
+-->
+ <!-- Text editor integration -->
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class class = "MonoDevelop.AnalysisCore.Gui.ResultsEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/TooltipProviders">
+ <Class id="AnalysisResults" class="MonoDevelop.AnalysisCore.Gui.ResultTooltipProvider" insertafter="Debug" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/AnalysisCore/Rules">
+ <Rule _name="Code Issue Analysis" input="Document" func="MonoDevelop.CodeIssues.CodeAnalysisRunner.Check" />
+ </Extension>
+
+ <!-- RefactoryCommands -->
+ <Extension path = "/MonoDevelop/Ide/Commands">
+
+ <Category _name = "Code Navigation" id = "CodeNavigation">
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.GotoDeclaration"
+ defaultHandler = "MonoDevelop.Refactoring.GotoDeclarationHandler"
+ _label = "_Go to declaration"
+ shortcut = "F12"
+ macShortcut = "Meta|D"/>
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindReferences"
+ defaultHandler = "MonoDevelop.Refactoring.FindReferencesHandler"
+ _label = "_Find references"
+ shortcut = "Shift|F12"
+ macShortcut = "Shift|Meta|R"/>
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindAllReferences"
+ defaultHandler = "MonoDevelop.Refactoring.FindAllReferencesHandler"
+ _label = "_Find references of all overloads" />
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.FindDerivedClasses"
+ defaultHandler = "MonoDevelop.Refactoring.FindDerivedClassesHandler"
+ _label = "Find _derived classes" />
+ </Category>
+
+ <Category _name = "Refactoring" id = "Refactoring">
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.Resolve"
+ defaultHandler = "MonoDevelop.Refactoring.ResolveCommandHandler"
+ type="array"
+ _label = "Resolve"/>
+
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.CurrentRefactoryOperations"
+ defaultHandler = "MonoDevelop.Refactoring.CurrentRefactoryOperationsHandler"
+ type="array"
+ _label = "Refactory Operations" />
+
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.QuickFix"
+ _label = "Quick fix..."
+ shortcut = "Alt|Return"
+ macShortcut = "Alt|Return" />
+
+ <Command id = "MonoDevelop.Refactoring.RefactoryCommands.ImportSymbol"
+ defaultHandler = "MonoDevelop.Refactoring.ImportSymbolHandler"
+ _label = "Import Symbol..."
+ shortcut = "Control|Alt|space"
+ macShortcut = "Control|Alt|space" />
+
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.Resolve" insertbefore="MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations"/>
+
+ <ItemSet id = "Fix" _label = "Fix" autohide="true"
+ insertafter="MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations" insertbefore="MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator">
+ <CommandItem id = "MonoDevelop.AnalysisCore.AnalysisCommands.FixOperations" />
+ </ItemSet>
+
+
+ <CommandItem id = "MonoDevelop.Refactoring.RefactoryCommands.CurrentRefactoryOperations" insertafter="MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations" insertbefore="MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator"/>
+-
+ <CommandItem id = "MonoDevelop.CodeGeneration.CodeGenerationCommands.ShowCodeGenerationWindow"
+ insertafter="MonoDevelop.Ide.Commands.TextEditorCommands.ShowCodeTemplateWindow" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class class = "MonoDevelop.Refactoring.Rename.RenameTextEditorExtension" />
+ <Class class = "MonoDevelop.CodeActions.CodeActionEditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Edit">
+ <CommandItem id = "MonoDevelop.CodeGeneration.CodeGenerationCommands.ShowCodeGenerationWindow"
+ insertafter="MonoDevelop.Ide.Commands.TextEditorCommands.ShowCodeTemplateWindow" />
+ </Extension>
+
+ <!-- Quick fix commands -->
+
+ <Extension path = "/MonoDevelop/Ide/Commands/Refactoring">
+ <Command id = "MonoDevelop.AnalysisCore.AnalysisCommands.FixOperations" type="array"
+ defaultHandler="MonoDevelop.AnalysisCore.FixOperationsHandler"
+ _label = "Fixes" />
+ <Command id = "MonoDevelop.AnalysisCore.AnalysisCommands.ShowFixes"
+ defaultHandler="MonoDevelop.AnalysisCore.ShowFixesHandler"
+ _label = "Show Fixes"
+ _description="Shows a list of fixes for problems at the current location"
+ macShortcut="Control|."
+ shortcut = "Control|." />
+ </Extension>
+
+ <!-- Options panels -->
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/SourceCode">
+ <Section id = "C#" _label = "C#">
+ <Section id = "Inspection" _label = "Code inspection" fill="true"
+ class="MonoDevelop.CodeIssues.CodeIssuePanel"/>
+ <Section id = "CodeActions" _label = "Context Actions" fill="true"
+ icon="md-text-quickfix"
+ class="MonoDevelop.CodeActions.CodeActionPanel"/>
+ </Section>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor">
+ <Section id = "Analysis" _label = "Source Analysis" fill="true"
+ class="MonoDevelop.AnalysisCore.Gui.AnalysisOptionsPanel"/>
+ </Extension>
+
+ <!-- Extensions to the addin points defined by this addin -->
+
+ <Extension path = "/MonoDevelop/AnalysisCore/Types">
+ <Type name="Document" class="MonoDevelop.Ide.Gui.Document" />
+ <Type name="CompilationUnit" class="MonoDevelop.Projects.Dom.ICompilationUnit" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/AnalysisCore/Rules">
+ <Adaptor func="MonoDevelop.AnalysisCore.Rules.Adapters.GetCompilationUnit"
+ input="Document" output="CompilationUnit" />
+ <Category _name="Design Guidelines" id="Design">
+<!-- <Rule _name="Naming Conventions" input="CompilationUnit"
+ func="MonoDevelop.AnalysisCore.Rules.NamingConventions.ClassNaming" />-->
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/AnalysisCore/FixHandlers">
+ <Handler fixName="RenameMember" class = "MonoDevelop.AnalysisCore.Fixes.RenameMemberHandler" />
+ <Handler fixName="Generic" class = "MonoDevelop.AnalysisCore.Fixes.GenericFixHandler" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..6cbf669
--- /dev/null
+++ b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.MonoDevelop.Refactoring.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.dll.mdb
diff --git a/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.gtk-gui.gui.stetic b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.gtk-gui.gui.stetic
new file mode 100644
index 0000000..9ba10cf
--- /dev/null
+++ b/src/addins/MonoDevelop.Refactoring/obj/Debug/MonoDevelop.Refactoring.gtk-gui.gui.stetic
@@ -0,0 +1,1025 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Refactoring.RefactoringPreviewDialog" design-size="400 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Refactoring Preview</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">List of changes for this refactoring:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewPreview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Refactoring.Rename.RenameItemDialog" design-size="365 154">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Rename {0}</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelNewName">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">New na_me:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entry</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="renameFileFlag">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Rename file that contains public class</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="imageWarning">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-apply Button</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelWarning">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonPreview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">_Preview</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Refactoring.EncapsulateFieldDialog" design-size="465 427">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Encapsulate Fields</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonSelectAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Select All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonUnselectAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Unselect All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelUpdateRefs">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Update references:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hboxUpdateRefs">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelSpacer">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxUpdateChoices">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioUpdateExternal">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_External</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioUpdateAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_All</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="imageError">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelError">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Refactoring.OverridesImplementsDialog" design-size="595 469">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonSelectAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Select All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonUnselectAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Unselect All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.CodeActions.ContextActionPanelWidget" design-size="300 280">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Filter:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">searchentryFilter</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.SearchEntry" id="searchentryFilter">
+ <property name="MemberName" />
+ <property name="ForceFilterButtonVisible">False</property>
+ <property name="IsCheckMenu">False</property>
+ <property name="ActiveFilterID">0</property>
+ <property name="Ready">True</property>
+ <property name="HasFocus">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewContextActions">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelDescription">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.CodeIssues.CodeIssuePanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Filter:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">searchentryFilter</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.SearchEntry" id="searchentryFilter">
+ <property name="MemberName" />
+ <property name="ForceFilterButtonVisible">False</property>
+ <property name="IsCheckMenu">False</property>
+ <property name="ActiveFilterID">0</property>
+ <property name="Ready">True</property>
+ <property name="HasFocus">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewInspections">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelDescription">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.CodeIssues.CodeIssueOptionsDialog" design-size="234 252">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Code Issue Options</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="WindowPosition">Center</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">6</property>
+ <property name="Resizable">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelInspectionTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">label1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonHide">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Do not show</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonHint">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Hint</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonSuggestion">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Suggestion</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonWarning">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Warning</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobuttonError">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Error</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.RegexToolkit/Makefile.in b/src/addins/MonoDevelop.RegexToolkit/Makefile.in
index 459f7ce..d1954bc 100644
--- a/src/addins/MonoDevelop.RegexToolkit/Makefile.in
+++ b/src/addins/MonoDevelop.RegexToolkit/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.addin.xml b/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.addin.xml
index ff4b3b5..361d4f2 100644
--- a/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.addin.xml
+++ b/src/addins/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.addin.xml
@@ -7,15 +7,15 @@
url = "http://www.monodevelop.com/"
description = "Provides a testing workbench for regular expressions"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly = "MonoDevelop.RegexToolkit.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<!-- Extension Points -->
diff --git a/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.MonoDevelop.RegexToolkit.addin.xml b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.MonoDevelop.RegexToolkit.addin.xml
new file mode 100644
index 0000000..361d4f2
--- /dev/null
+++ b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.MonoDevelop.RegexToolkit.addin.xml
@@ -0,0 +1,35 @@
+<Addin
+ id = "RegexToolkit"
+ namespace = "MonoDevelop"
+ name = "Regex Toolkit"
+ author = "Mike Krüger"
+ copyright = "X11"
+ url = "http://www.monodevelop.com/"
+ description = "Provides a testing workbench for regular expressions"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly = "MonoDevelop.RegexToolkit.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension Points -->
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.RegexToolkit.Commands.ShowRegexToolkit"
+ defaultHandler = "MonoDevelop.RegexToolkit.ShowRegexToolkitHandler"
+ _label = "_Regex Toolkit..." />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Tools">
+ <CommandItem id = "MonoDevelop.RegexToolkit.Commands.ShowRegexToolkit" insertbefore="OptionsSection" />
+ </Extension>
+
+</Addin>
diff --git a/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.RegexElements.xml b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.RegexElements.xml
new file mode 100644
index 0000000..49cecf3
--- /dev/null
+++ b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.RegexElements.xml
@@ -0,0 +1,208 @@
+<RegexElements>
+
+ <Group _name="Character Escapes">
+ <Element _name = "\a" _description="Matches a bell (alarm) \u0007.">\a</Element>
+ <Element _name = "\b" _description="Matches a backspace \u0008 if in a [] character class.">\b</Element>
+ <Element _name = "\t" _description="Matches a tab \u0009.">\t</Element>
+ <Element _name = "\r" _description="Matches a carriage return \u000D.">\r</Element>
+ <Element _name = "\v" _description="Matches a vertical tab \u000B.">\v</Element>
+ <Element _name = "\f" _description="Matches a form feed \u000C.">\f</Element>
+ <Element _name = "\n" _description="Matches a new line \u000A.">\n</Element>
+ <Element _name = "\e" _description="Matches an escape \u001B.">\e</Element>
+ <Element _name = "\040" _description=
+"Matches an ASCII character as octal (up to three digits);
+numbers with no leading zero are backreferences if they have
+only one digit or if they correspond to a capturing group number.
+(For more information, see Backreferences.)
+For example, the character \040 represents a space.">\040</Element>
+ <Element _name = "\x20" _description="Matches an ASCII character using hexadecimal representation
+(exactly two digits).">\x20</Element>
+ <Element _name = "\cC" _description="Matches an ASCII control character;
+for example, \cC is control-C.">\cC</Element>
+ <Element _name = "\u0020" _description="Matches a Unicode character using hexadecimal representation
+(exactly four digits).">\u0020</Element>
+ </Group>
+
+ <Group _name="Substitutions">
+ <Element _name = "$number" _description="Substitutes the last substring matched by group number 'number' (decimal).">$number</Element>
+ <Element _name = "${name}" _description="Substitutes the last substring matched by a (?<name>) group.">${name}</Element>
+ <Element _name = "$$" _description="Substitutes a single '$' literal.">$$</Element>
+ <Element _name = "$&" _description="Substitutes a copy of the entire match itself.">$&</Element>
+ <Element _name = "$`" _description="Substitutes all the text of the input string before the match.">$`</Element>
+ <Element _name = "$'" _description="Substitutes all the text of the input string after the match.">$'</Element>
+ <Element _name = "$+" _description="Substitutes the last group captured.">$+</Element>
+ <Element _name = "$_" _description="Substitutes the entire input string.">$_</Element>
+ </Group>
+
+ <Group _name="Character Classes">
+ <Element _name = "[character_group]" _description="Positive character group.
+Matches any character in the specified character group.">[]</Element>
+ <Element _name = "[^character_group]" _description="Negative character group.
+Matches any character not in the specified character group.">[^]</Element>
+ <Element _name = "[firstCharacter-lastCharacter]" _description="Character range.
+Matches any character in a range of characters.">[-]</Element>
+ <Element _name = "." _description="The period character.
+Matches any character except \n.
+If modified by the Singleline option, a period character matches any character.">.</Element>
+ <Element _name = "\p{name}" _description=
+"Matches any character in the Unicode general category
+or named block specified by name (for example, Ll, Nd, Z, IsGreek, and IsBoxDrawing).">\p{}</Element>
+ <Element _name = "\P{name}" _description=
+"Matches any character not in Unicode general category
+or named block specified in name."></Element>
+ <Element _name = "\w" _description="Matches any word character.">\w</Element>
+ <Element _name = "\W" _description="Matches any nonword character.">\W</Element>
+ <Element _name = "\s" _description="Matches any white-space character.">\s</Element>
+ <Element _name = "\S" _description="Matches any non-white-space character.">\S</Element>
+ <Element _name = "\d" _description="Matches any digit character.">\d</Element>
+ <Element _name = "\D" _description="Matches any nondigit character.">\D</Element>
+ </Group>
+
+ <Group _name="Atomic Zero-Width Assertions">
+ <Element _name = "^" _description=
+"Specifies that the match must occur at the beginning of
+the string or the beginning of the line.">^</Element>
+ <Element _name = "$" _description=
+"Specifies that the match must occur at the end of the
+string, before \n at the end of the string, or at the
+end of the line.">$</Element>
+ <Element _name = "\A" _description=
+"Specifies that the match must occur at the beginning of
+the string (ignores the Multiline option).">\A</Element>
+ <Element _name = "\Z" _description=
+"Specifies that the match must occur at the end of the
+string or before \n at the end of the string (ignores
+the Multiline option).">\Z</Element>
+ <Element _name = "\z" _description=
+"Specifies that the match must occur at the end of the
+string (ignores the Multiline option).">\z</Element>
+ <Element _name = "\G" _description=
+"Specifies that the match must occur at the point where
+the previous match ended. When used with Match.NextMatch(),
+this ensures that matches are all contiguous.">\G</Element>
+ <Element _name = "\b" _description=
+"Specifies that the match must occur on a boundary
+between \w (alphanumeric) and \W (nonalphanumeric) characters.
+The match must occur on word boundaries (that is, at the first
+or last characters in words separated by any nonalphanumeric
+characters). The match can also occur on a word boundary at
+the end of the string.">\b</Element>
+ <Element _name = "\B" _description= "Specifies that the match must not occur on a \b boundary.">\B</Element>
+ </Group>
+
+ <Group _name="Quantifiers">
+ <Element _name = "*" _description=
+"Specifies zero or more matches;
+for example, \w* or (abc)*. Equivalent to {0,}.">*</Element>
+ <Element _name = "+" _description=
+"Specifies one or more matches;
+for example, \w+ or (abc)+. Equivalent to {1,}.">+</Element>
+ <Element _name = "?" _description=
+"Specifies zero or one matches;
+for example, \w? or (abc)?. Equivalent to {0,1}.">?</Element>
+ <Element _name = "{n}" _description=
+"Specifies exactly n matches;
+for example, (pizza){2}.">{}</Element>
+ <Element _name = "{n,}" _description=
+"Specifies at least n matches;
+for example, (abc){2,}.">{,}</Element>
+ <Element _name = "{n,m}" _description="Specifies at least n, but no more than m, matches.">{,}</Element>
+ <Element _name = "*?" _description=
+"Specifies the first match that consumes as few repeats
+as possible (equivalent to lazy *).">*?</Element>
+ <Element _name = "+?" _description=
+"Specifies as few repeats as possible, but at least one
+(equivalent to lazy +).">+?</Element>
+ <Element _name = "??" _description="Specifies zero repeats if possible, or one (lazy ?).">??</Element>
+ <Element _name = "{n}?" _description="Equivalent to {n} (lazy {n}).">{}?</Element>
+ <Element _name = "{n,}?" _description=
+"Specifies as few repeats as possible,
+but at least n (lazy {n,}).">{,}?</Element>
+ <Element _name = "{n,m}?" _description=
+"Specifies as few repeats as possible
+between n and m (lazy {n,m}).">{,}?</Element>
+ </Group>
+
+ <Group _name="Grouping Constructs">
+ <Element _name = "(subexpression)" _description=
+"Captures the matched subexpression (or noncapturing group;
+for more information, see the ExplicitCapture option in
+Regular Expression Options). Captures using () are numbered
+automatically based on the order of the opening parenthesis,
+starting from one. ">()</Element>
+ <Element _name = "(?<name> subexpression)" _description=
+"Captures the matched subexpression into a group name or
+number name. The string used for name must not contain
+any punctuation and cannot begin with a number. ">(?<>)</Element>
+ <Element _name = "(?<name1-name2> subexpression)" _description=
+"Deletes the definition of the previously defined group name2
+and stores in group name1 the interval between the previously
+defined name2 group and the current group.">(?<->)</Element>
+ <Element _name = "(?: subexpression)" _description=
+"Noncapturing group.
+Does not capture the substring matched by the subexpression.">(?:)</Element>
+ <Element _name = "(?imnsx-imnsx: subexpression)" _description=
+"Applies or disables the specified options within the subexpression.">(?-:)</Element>
+ <Element _name = "(?= subexpression)" _description=
+"Zero-width positive lookahead assertion.
+Continues match only if the subexpression matches at this
+position on the right.">(?= )</Element>
+ <Element _name = "(?! subexpression)" _description=
+"Zero-width negative lookahead assertion.
+Continues match only if the subexpression does not match
+at this position on the right.
+For example, \b(?!un)\w+\b matches words that do not begin with un.">(?! )</Element>
+ <Element _name = "(?<= subexpression)" _description=
+"Zero-width positive lookbehind assertion.
+Continues match only if the subexpression matches at this
+position on the left.
+For example, (?<=19)99 matches instances of 99 that follow 19.
+This construct does not backtrack.">(?<= )</Element>
+ <Element _name = "(?<! subexpression)" _description=
+"Zero-width negative lookbehind assertion.
+Continues match only if the subexpression does not
+match at the position on the left.">(?<! )</Element>
+ <Element _name = "(?> subexpression)" _description=
+"Nonbacktracking subexpression (also known as a 'greedy' subexpression.)
+The subexpression is fully matched once, and then does not participate
+piecemeal in backtracking. (That is, the subexpression matches only strings
+that would be matched by the subexpression alone.)">(?> )</Element>
+ </Group>
+
+ <Group _name="Backreference Constructs">
+ <Element _name = "\number" _description=
+"Backreference.
+For example, (\w)\1 finds doubled word characters.">\</Element>
+ <Element _name = "\k<name>" _description=
+"Named backreference.
+For example, (?<char>\w)\k<char> finds doubled word characters.
+The expression (?<43>\w)\43 does the same. You can use single quotes
+ instead of angle brackets; for example, \k'char'.">\k</Element>
+ </Group>
+
+ <Group _name="Alternation Constructs">
+ <Element _name = "|" _description=
+"Matches any one of the terms separated by the | (vertical bar) character;
+for example, cat|dog|tiger. The leftmost successful match wins.">|</Element>
+ <Element _name = "(?(expression)yes|no)" _description="Matches the 'yes' part if the expression matches at this point; otherwise, matches the 'no' part.">(?()|)</Element>
+ <Element _name = "(?(name)yes|no)" _description=
+"Matches the 'yes' part if the named capture string has a match;
+otherwise, matches the 'no' part. The 'no' part can be omitted.
+If the given name does not correspond to the name or number of a
+capturing group used in this expression, the alternation construct
+is interpreted as an expression test.">(?()|)</Element>
+ </Group>
+
+ <Group _name="Miscellaneous Constructs">
+ <Element _name = "(?imnsx-imnsx)" _description=
+"Sets or disables options such as case insensitivity to be
+turned on or off in the middle of a pattern.">(?-)</Element>
+ <Element _name = "(?# )" _description=
+"Inline comment inserted within a regular expression.
+The comment terminates at the first closing parenthesis character.">(?# )</Element>
+ <Element _name = "# [to end of line]" _description=
+"X-mode comment. The comment begins at an unescaped # and
+continues to the end of the line."># </Element>
+ </Group>
+
+</RegexElements>
diff --git a/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..f2ff7a0
--- /dev/null
+++ b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.MonoDevelop.RegexToolkit.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.RegexElements.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.dll.mdb
diff --git a/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.gtk-gui.gui.stetic b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.gtk-gui.gui.stetic
new file mode 100644
index 0000000..89ccdcc
--- /dev/null
+++ b/src/addins/MonoDevelop.RegexToolkit/obj/Debug/MonoDevelop.RegexToolkit.gtk-gui.gui.stetic
@@ -0,0 +1,396 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..\..\MonoDevelop.RegexToolkit</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.RegexToolkit/MonoDevelop.RegexToolkit.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.RegexToolkit.RegexToolkitWidget" design-size="544 603">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">359</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Regular Expression</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">inputTextview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryRegEx">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonReplace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Replace</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryReplace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="expandMatches">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Expand matches</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="BorderWidth">3</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonStart">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-media-play Menu</property>
+ <property name="Label" translatable="yes">Start Regular E_xpression</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Options:</property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">optionsTreeview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow5">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="optionsTreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="HelpWidget">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Input:</property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">inputTextview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="inputTextview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="resultsTreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Matches</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="replaceResultTextview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Replace</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.RegexToolkit.ElementHelpWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Elements:</property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">elementsTreeview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="elementsscrolledwindow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="elementsTreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.SourceEditor2/Makefile.in b/src/addins/MonoDevelop.SourceEditor2/Makefile.in
index 2359337..fc7bd0a 100644
--- a/src/addins/MonoDevelop.SourceEditor2/Makefile.in
+++ b/src/addins/MonoDevelop.SourceEditor2/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionAppearancePanel.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionAppearancePanel.cs
new file mode 100644
index 0000000..c51e040
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionAppearancePanel.cs
@@ -0,0 +1,83 @@
+//
+// CompletionAppearancePanel.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 MonoDevelop.Ide.Gui.Dialogs;
+using MonoDevelop.Ide.Gui.Content;
+
+namespace MonoDevelop.SourceEditor.OptionPanels
+{
+ [System.ComponentModel.ToolboxItem(false)]
+ partial class CompletionAppearancePanel : Gtk.Bin, IOptionsPanel
+ {
+ public CompletionAppearancePanel ()
+ {
+ this.Build ();
+ filterByBrowsableCheckbutton.Toggled += FilterToggled;
+ }
+
+ void FilterToggled (object sender, EventArgs e)
+ {
+ label4.Sensitive = label5.Sensitive =
+ normalOnlyRadiobutton.Sensitive = includeAdvancedRadiobutton.Sensitive = filterByBrowsableCheckbutton.Active;
+ }
+
+ #region IOptionsPanel implementation
+
+ void IOptionsPanel.Initialize (OptionsDialog dialog, object dataObject)
+ {
+ }
+
+ Gtk.Widget IOptionsPanel.CreatePanelWidget ()
+ {
+ spinbutton1.Value = CompletionTextEditorExtension.CompletionListRows;
+ filterByBrowsableCheckbutton.Active = CompletionTextEditorExtension.FilterCompletionListByEditorBrowsable;
+ normalOnlyRadiobutton.Active = !CompletionTextEditorExtension.IncludeEditorBrowsableAdvancedMembers;
+ includeAdvancedRadiobutton.Active = CompletionTextEditorExtension.IncludeEditorBrowsableAdvancedMembers;
+ FilterToggled (this, EventArgs.Empty);
+ return this;
+ }
+
+ bool IOptionsPanel.IsVisible ()
+ {
+ return true;
+ }
+
+ bool IOptionsPanel.ValidateChanges ()
+ {
+ return true;
+ }
+
+ void IOptionsPanel.ApplyChanges ()
+ {
+ CompletionTextEditorExtension.CompletionListRows.Value = spinbutton1.ValueAsInt;
+ CompletionTextEditorExtension.FilterCompletionListByEditorBrowsable.Value = filterByBrowsableCheckbutton.Active;
+ CompletionTextEditorExtension.IncludeEditorBrowsableAdvancedMembers.Value = includeAdvancedRadiobutton.Active;
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionOptionsPanel.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionOptionsPanel.cs
new file mode 100644
index 0000000..4a8ca65
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/CompletionOptionsPanel.cs
@@ -0,0 +1,90 @@
+//
+// CompletionOptionsPanel.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 MonoDevelop.Ide.Gui.Dialogs;
+using MonoDevelop.Ide.Gui.Content;
+
+namespace MonoDevelop.SourceEditor.OptionPanels
+{
+ [System.ComponentModel.ToolboxItem(false)]
+ partial class CompletionOptionsPanel : Gtk.Bin, IOptionsPanel
+ {
+ public CompletionOptionsPanel ()
+ {
+ this.Build ();
+ insertParenthesesCheckbutton.Toggled += InsertParensToggled;
+ }
+
+ void InsertParensToggled (object sender, EventArgs e)
+ {
+ openingRadiobutton.Sensitive = bothRadiobutton.Sensitive = insertParenthesesCheckbutton.Active;
+ }
+
+ #region IOptionsPanel implementation
+
+ void IOptionsPanel.Initialize (OptionsDialog dialog, object dataObject)
+ {
+ }
+
+ Gtk.Widget IOptionsPanel.CreatePanelWidget ()
+ {
+ codeCompletioncheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableCodeCompletion;
+ enableParameterInsightCheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableParameterInsight;
+ autoCodeCompletionCheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion;
+ showImportsCheckbutton.Active = CompletionTextEditorExtension.AddImportedItemsToCompletionList;
+ includeKeywordsCheckbutton.Active = CompletionTextEditorExtension.IncludeKeywordsInCompletionList;
+ insertParenthesesCheckbutton.Active = CompletionTextEditorExtension.AddParenthesesAfterCompletion;
+ openingRadiobutton.Active = CompletionTextEditorExtension.AddOpeningOnly;
+ bothRadiobutton.Active = !CompletionTextEditorExtension.AddOpeningOnly;
+ InsertParensToggled (this, EventArgs.Empty);
+ return this;
+ }
+
+ bool IOptionsPanel.IsVisible ()
+ {
+ return true;
+ }
+
+ bool IOptionsPanel.ValidateChanges ()
+ {
+ return true;
+ }
+
+ void IOptionsPanel.ApplyChanges ()
+ {
+ DefaultSourceEditorOptions.Instance.EnableCodeCompletion = codeCompletioncheckbutton.Active;
+ DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion = autoCodeCompletionCheckbutton.Active;
+ DefaultSourceEditorOptions.Instance.EnableParameterInsight = enableParameterInsightCheckbutton.Active;
+ CompletionTextEditorExtension.AddImportedItemsToCompletionList.Value = showImportsCheckbutton.Active;
+ CompletionTextEditorExtension.IncludeKeywordsInCompletionList.Value = includeKeywordsCheckbutton.Active;
+ CompletionTextEditorExtension.AddParenthesesAfterCompletion.Value = insertParenthesesCheckbutton.Active;
+ CompletionTextEditorExtension.AddOpeningOnly.Value = openingRadiobutton.Active;
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
index 70043e6..2f5109e 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/GeneralOptionsPanel.cs
@@ -35,49 +35,28 @@ namespace MonoDevelop.SourceEditor.OptionPanels
public GeneralOptionsPanel()
{
this.Build();
- this.codeCompletioncheckbutton.Toggled += HandleCodeCompletioncheckbuttonToggled;
-
+
this.comboboxLineEndings.AppendText (GettextCatalog.GetString ("Always ask for conversion"));
this.comboboxLineEndings.AppendText (GettextCatalog.GetString ("Leave line endings as is"));
this.comboboxLineEndings.AppendText (GettextCatalog.GetString ("Always convert line endings"));
this.comboboxLineEndings.Active = (int)DefaultSourceEditorOptions.Instance.LineEndingConversion;
}
- void HandleCodeCompletioncheckbuttonToggled (object sender, EventArgs e)
- {
- this.enableParameterInsightCheckbutton.Sensitive =
- this.autoCodeCompletionCheckbutton.Sensitive =
- this.hideObsoleteItemsCheckbutton.Sensitive =
- this.codeCompletioncheckbutton.Active;
- }
-
-
public virtual Gtk.Widget CreatePanelWidget ()
{
- this.codeCompletioncheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableCodeCompletion;
this.foldingCheckbutton.Active = DefaultSourceEditorOptions.Instance.ShowFoldMargin;
this.foldregionsCheckbutton.Active = DefaultSourceEditorOptions.Instance.DefaultRegionsFolding;
this.foldCommentsCheckbutton.Active = DefaultSourceEditorOptions.Instance.DefaultCommentFolding;
- this.enableParameterInsightCheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion;
- this.enableParameterInsightCheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableParameterInsight;
- this.autoCodeCompletionCheckbutton.Active = DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion;
this.antiAliasingCheckbutton.Active = DefaultSourceEditorOptions.Instance.UseAntiAliasing;
-// this.hideObsoleteItemsCheckbutton.Active = CompletionTextEditorExtension.HideObsoleteItems;
- this.hideObsoleteItemsCheckbutton.Hide ();
- HandleCodeCompletioncheckbuttonToggled (this, EventArgs.Empty);
return this;
}
public virtual void ApplyChanges ()
{
- DefaultSourceEditorOptions.Instance.EnableCodeCompletion = this.codeCompletioncheckbutton.Active;
DefaultSourceEditorOptions.Instance.DefaultRegionsFolding = this.foldregionsCheckbutton.Active;
DefaultSourceEditorOptions.Instance.DefaultCommentFolding = this.foldCommentsCheckbutton.Active;
- DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion = this.autoCodeCompletionCheckbutton.Active;
- DefaultSourceEditorOptions.Instance.EnableParameterInsight = this.enableParameterInsightCheckbutton.Active;
DefaultSourceEditorOptions.Instance.UseAntiAliasing = this.antiAliasingCheckbutton.Active;
DefaultSourceEditorOptions.Instance.LineEndingConversion = (LineEndingConversion)this.comboboxLineEndings.Active;
-// CompletionTextEditorExtension.HideObsoleteItems.Set (this.hideObsoleteItemsCheckbutton.Active);
if (DefaultSourceEditorOptions.Instance.ShowFoldMargin != this.foldingCheckbutton.Active) {
DefaultSourceEditorOptions.Instance.ShowFoldMargin = this.foldingCheckbutton.Active;
HighlightingPanel.UpdateActiveDocument ();
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTask.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTask.cs
index 77fcd9d..2ad37cf 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTask.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTask.cs
@@ -33,7 +33,7 @@ using MonoDevelop.Core;
using MonoDevelop.Ide;
using MonoDevelop.Components.Commands;
using ICSharpCode.NRefactory;
-using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.SourceEditor.QuickTasks
{
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs
index 1f98625..adc2127 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
using Gdk;
using MonoDevelop.Core;
using ICSharpCode.NRefactory;
-using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.SourceEditor.QuickTasks
{
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
index 501e42e..32c23c0 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
@@ -7,16 +7,16 @@
description = "Provides a text editor for the MonoDevelop based on Mono.TextEditor"
category = "MonoDevelop Core"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.SourceEditor2.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="Debugger" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Debugger" version="4.0.12"/>
</Dependencies>
<!-- Extension points -->
@@ -190,6 +190,8 @@
<Section id = "General" insertbefore="Formatting" _label = "General" icon="md-text-editor" fill="true" class = "MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel"/>
<Section id = "Markers" _label = "Markers and Rulers" icon="md-markers-rulers" class = "MonoDevelop.SourceEditor.OptionPanels.MarkerPanel"/>
<Section id = "Behavior" _label = "Behavior" icon="md-text-editor-behavior" class = "MonoDevelop.SourceEditor.OptionPanels.BehaviorPanel"/>
+ <Section id = "CompletionBehavior" _label = "Completion Behavior" class = "MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel"/>
+ <Section id = "CompletionAppearance" _label = "Completion Appearance" class = "MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel"/>
<Section id = "SyntaxHighlighting" _label = "Syntax Highlighting" fill="true" icon="md-syntax-highlighting" class = "MonoDevelop.SourceEditor.OptionPanels.HighlightingPanel"/>
</Extension>
@@ -203,7 +205,7 @@
</Extension>
<Extension path = "/MonoDevelop/Ide/Fonts">
- <Font name ="MessageBubbles" _displayName="Message bubbles" default ="_DEFAULT_SANS"/>
+ <Font name ="MessageBubbles" _displayName="Message bubbles" default ="_DEFAULT_SANS" defaultMac = "Lucida Grande 10"/>
<Font name ="LanguageTooltips" _displayName="Editor tooltips" default ="_DEFAULT_SANS"/>
</Extension>
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
index 453d7ec..400d192 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
@@ -56,11 +56,6 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -76,11 +71,6 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
- <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
- <Name>ICSharpCode.NRefactory.CSharp</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj">
<Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project>
<Name>Mono.Addins</Name>
@@ -89,6 +79,12 @@
<ProjectReference Include="..\..\..\external\xwt\Xwt\Xwt.csproj">
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
<Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -156,7 +152,6 @@
<Compile Include="gtk-gui\MonoDevelop.SourceEditor.PrintSettingsWidget.cs" />
<Compile Include="MonoDevelop.SourceEditor\MessageBubbleCommands.cs" />
<Compile Include="MonoDevelop.SourceEditor\MessageBubbleTextMarker.cs" />
- <Compile Include="MonoDevelop.SourceEditor\MessageBubbleHighlightPopupWindow.cs" />
<Compile Include="MonoDevelop.SourceEditor\MessageBubbleCache.cs" />
<Compile Include="MonoDevelop.SourceEditor.OptionPanels\ColorShemeEditor.cs" />
<Compile Include="gtk-gui\MonoDevelop.SourceEditor.OptionPanels.ColorShemeEditor.cs" />
@@ -172,6 +167,11 @@
<Compile Include="MonoDevelop.SourceEditor.QuickTasks\IUsageProvider.cs" />
<Compile Include="MonoDevelop.SourceEditor\FileRegistry.cs" />
<Compile Include="MonoDevelop.SourceEditor\SearchAndReplaceOptions.cs" />
+ <Compile Include="MonoDevelop.SourceEditor\ErrorText.cs" />
+ <Compile Include="MonoDevelop.SourceEditor.OptionPanels\CompletionOptionsPanel.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel.cs" />
+ <Compile Include="MonoDevelop.SourceEditor.OptionPanels\CompletionAppearancePanel.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs
index 8565583..2e227c1 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs
@@ -30,10 +30,10 @@ using System;
using System.Collections.Generic;
using Mono.TextEditor;
+using MonoDevelop.Debugger;
using MonoDevelop.Components;
using Mono.Debugging.Client;
using TextEditor = Mono.TextEditor.TextEditor;
-using MonoDevelop.Debugger;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.Semantics;
@@ -85,6 +85,98 @@ namespace MonoDevelop.SourceEditor
return index;
}
+
+ static string GetLocalExpression (TextEditor editor, LocalResolveResult lr, DomRegion expressionRegion)
+ {
+ var start = new DocumentLocation (expressionRegion.BeginLine, expressionRegion.BeginColumn);
+ var end = new DocumentLocation (expressionRegion.EndLine, expressionRegion.EndColumn);
+ var ed = (ExtensibleTextEditor) editor;
+
+ // In a setter, the 'value' variable will have a begin line/column of 0,0 which is an undefined offset
+ if (lr.Variable.Region.BeginLine != 0 && lr.Variable.Region.BeginColumn != 0) {
+ // Use the start and end offsets of the variable region so that we get the "@" in variable names like "@class"
+ start = new DocumentLocation (lr.Variable.Region.BeginLine, lr.Variable.Region.BeginColumn);
+ end = new DocumentLocation (lr.Variable.Region.EndLine, lr.Variable.Region.EndColumn);
+ }
+
+ string expression = ed.GetTextBetween (start, end).Trim ();
+
+ // Note: When the LocalResolveResult is a parameter, the Variable.Region includes the type
+ if (lr.IsParameter) {
+ int index = IndexOfLastWhiteSpace (expression);
+ if (index != -1)
+ expression = expression.Substring (index + 1);
+ }
+
+ return expression;
+ }
+
+ static string GetMemberExpression (TextEditor editor, MemberResolveResult mr, DomRegion expressionRegion)
+ {
+ var ed = (ExtensibleTextEditor) editor;
+ string expression = null;
+ string member = null;
+
+ if (mr.Member != null) {
+ if (mr.Member is IProperty) {
+ // Visual Studio will evaluate Properties if you hover over their definitions...
+ var prop = (IProperty) mr.Member;
+
+ if (prop.CanGet) {
+ if (prop.IsStatic)
+ expression = prop.FullName;
+ else
+ member = prop.Name;
+ } else {
+ return null;
+ }
+ } else if (mr.Member is IField) {
+ var field = (IField) mr.Member;
+
+ if (field.IsStatic)
+ expression = field.FullName;
+ else
+ member = field.Name;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+
+ if (expression == null) {
+ if (mr.TargetResult != null) {
+ var targetRegion = mr.TargetResult.GetDefinitionRegion ();
+
+ if (mr.TargetResult is LocalResolveResult) {
+ expression = GetLocalExpression (editor, (LocalResolveResult) mr.TargetResult, targetRegion);
+ } else if (mr.TargetResult is MemberResolveResult) {
+ expression = GetMemberExpression (editor, (MemberResolveResult) mr.TargetResult, targetRegion);
+ } else if (mr.TargetResult is InitializedObjectResolveResult) {
+ return null;
+ } else if (mr.TargetResult is ThisResolveResult) {
+ return member;
+ } else if (!targetRegion.IsEmpty) {
+ var start = new DocumentLocation (targetRegion.BeginLine, targetRegion.BeginColumn);
+ var end = new DocumentLocation (targetRegion.EndLine, targetRegion.EndColumn);
+ expression = ed.GetTextBetween (start, end).Trim ();
+ }
+
+ if (expression == null) {
+ var start = new DocumentLocation (expressionRegion.BeginLine, expressionRegion.BeginColumn);
+ var end = new DocumentLocation (expressionRegion.EndLine, expressionRegion.EndColumn);
+ return ed.GetTextBetween (start, end).Trim ();
+ }
+ }
+
+ if (!string.IsNullOrEmpty (expression))
+ expression += "." + member;
+ else
+ expression = member;
+ }
+
+ return expression;
+ }
public override TooltipItem GetItem (TextEditor editor, int offset)
{
@@ -99,20 +191,16 @@ namespace MonoDevelop.SourceEditor
return null;
var ed = (ExtensibleTextEditor)editor;
-
- string expression = null;
int startOffset = 0, length = 0;
+ DomRegion expressionRegion;
+ string expression = null;
+ ResolveResult res;
+
if (ed.IsSomethingSelected && offset >= ed.SelectionRange.Offset && offset <= ed.SelectionRange.EndOffset) {
expression = ed.SelectedText;
startOffset = ed.SelectionRange.Offset;
length = ed.SelectionRange.Length;
- } else {
- DomRegion expressionRegion;
- ResolveResult res = ed.GetLanguageItem (offset, out expressionRegion);
-
- if (res == null || res.IsError || res.GetType () == typeof (ResolveResult))
- return null;
-
+ } else if ((res = ed.GetLanguageItem (offset, out expressionRegion)) != null && !res.IsError && res.GetType () != typeof (ResolveResult)) {
//Console.WriteLine ("res is a {0}", res.GetType ().Name);
if (expressionRegion.IsEmpty)
@@ -120,11 +208,15 @@ namespace MonoDevelop.SourceEditor
if (res is NamespaceResolveResult ||
res is ConversionResolveResult ||
+ res is ConstantResolveResult ||
res is ForEachResolveResult ||
res is TypeIsResolveResult ||
res is TypeOfResolveResult ||
res is ErrorResolveResult)
return null;
+
+ if (res.IsCompileTimeConstant)
+ return null;
var start = new DocumentLocation (expressionRegion.BeginLine, expressionRegion.BeginColumn);
var end = new DocumentLocation (expressionRegion.EndLine, expressionRegion.EndColumn);
@@ -134,23 +226,7 @@ namespace MonoDevelop.SourceEditor
length = endOffset - startOffset;
if (res is LocalResolveResult) {
- var lr = (LocalResolveResult) res;
-
- // Use the start and end offsets of the variable region so that we get the "@" in variable names like "@class"
- start = new DocumentLocation (lr.Variable.Region.BeginLine, lr.Variable.Region.BeginColumn);
- end = new DocumentLocation (lr.Variable.Region.EndLine, lr.Variable.Region.EndColumn);
- startOffset = editor.Document.LocationToOffset (start);
- endOffset = editor.Document.LocationToOffset (end);
-
- expression = ed.GetTextBetween (startOffset, endOffset).Trim ();
-
- // Note: When the LocalResolveResult is a parameter, the Variable.Region includes the type
- if (lr.IsParameter) {
- int index = IndexOfLastWhiteSpace (expression);
- if (index != -1)
- expression = expression.Substring (index + 1);
- }
-
+ expression = GetLocalExpression (editor, (LocalResolveResult) res, expressionRegion);
length = expression.Length;
} else if (res is InvocationResolveResult) {
var ir = (InvocationResolveResult) res;
@@ -160,48 +236,22 @@ namespace MonoDevelop.SourceEditor
expression = ir.Member.DeclaringType.FullName;
} else if (res is MemberResolveResult) {
- var mr = (MemberResolveResult) res;
-
- if (mr.TargetResult == null) {
- // User is hovering over a member definition...
-
- if (mr.Member is IProperty) {
- // Visual Studio will evaluate Properties if you hover over their definitions...
- var prop = (IProperty) mr.Member;
-
- if (prop.CanGet) {
- if (prop.IsStatic)
- expression = prop.FullName;
- else
- expression = prop.Name;
- } else {
- return null;
- }
- } else if (mr.Member is IField) {
- var field = (IField) mr.Member;
-
- if (field.IsStatic)
- expression = field.FullName;
- else
- expression = field.Name;
- } else {
- return null;
- }
- }
-
- // If the TargetResult is not null, then treat it like any other ResolveResult.
- } else if (res is ConstantResolveResult) {
- // Fall through...
+ expression = GetMemberExpression (editor, (MemberResolveResult) res, expressionRegion);
+ } else if (res is NamedArgumentResolveResult) {
+ expression = ed.GetTextBetween (start, end);
} else if (res is ThisResolveResult) {
- // Fall through...
+ expression = ed.GetTextBetween (start, end);
} else if (res is TypeResolveResult) {
- // Fall through...
+ expression = ed.GetTextBetween (start, end);
} else {
return null;
}
-
- if (expression == null)
- expression = ed.GetTextBetween (start, end);
+ } else {
+ var data = editor.GetTextEditorData ();
+ startOffset = data.FindCurrentWordStart (offset);
+ int endOffset = data.FindCurrentWordEnd (offset);
+
+ expression = ed.GetTextBetween (ed.OffsetToLocation (startOffset), ed.OffsetToLocation (endOffset));
}
if (string.IsNullOrEmpty (expression))
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ErrorText.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ErrorText.cs
new file mode 100644
index 0000000..dadd156
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ErrorText.cs
@@ -0,0 +1,60 @@
+//
+// ErrorText.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+using Mono.TextEditor;
+using MonoDevelop.Debugger;
+using MonoDevelop.Ide.Tasks;
+using System.Collections.Generic;
+using MonoDevelop.Ide;
+using System.Text.RegularExpressions;
+using Mono.TextEditor.Highlighting;
+using MonoDevelop.Ide.Fonts;
+using MonoDevelop.Components;
+
+namespace MonoDevelop.SourceEditor
+{
+ public class ErrorText
+ {
+ public Task Task { get; set; }
+ public bool IsError { get; set; }
+ public string ErrorMessage { get; set; }
+
+ public ErrorText (Task task, bool isError, string errorMessage)
+ {
+ this.Task = task;
+ this.IsError = isError;
+ this.ErrorMessage = errorMessage;
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[ErrorText: IsError={0}, ErrorMessage={1}]", IsError, ErrorMessage);
+ }
+ }
+
+}
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
index f3fef66..73741fd 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
@@ -172,7 +172,8 @@ namespace MonoDevelop.SourceEditor
protected override void OnDestroyed ()
{
UnregisterAdjustments ();
-
+ resolveResult = null;
+ Extension = null;
ExtensionContext = null;
view = null;
base.OnDestroyed ();
@@ -318,9 +319,6 @@ namespace MonoDevelop.SourceEditor
DocumentLine line = Document.GetLine (Caret.Line);
if (line == null)
return true;
- bool inChar = false;
- bool inComment = false;
- bool inString = false;
// string escape = "\"";
var stack = line.StartSpan.Clone ();
var sm = Document.SyntaxMode as SyntaxMode;
@@ -329,24 +327,11 @@ namespace MonoDevelop.SourceEditor
foreach (Span span in stack) {
if (string.IsNullOrEmpty (span.Color))
continue;
- if (span.Color == "string.other") {
- inStringOrComment = inChar = inString = true;
- break;
- }
- if (span.Color == "string.single" || span.Color == "string.double" || span.Color.StartsWith ("comment")) {
+ if (span.Color.StartsWith ("String", StringComparison.Ordinal) || span.Color.StartsWith ("Comment", StringComparison.Ordinal)) {
inStringOrComment = true;
- inChar |= span.Color == "string.single";
- inComment |= span.Color.StartsWith ("comment");
- inString = !inChar && !inComment;
- //escape = span.Escape;
break;
}
}
- if (Caret.Offset > 0) {
- char c = GetCharAt (Caret.Offset - 1);
- if (c == '"' || c == '\'')
- inStringOrComment = inChar = inString = true;
- }
// insert template when space is typed (currently disabled - it's annoying).
bool templateInserted = false;
@@ -363,7 +348,7 @@ namespace MonoDevelop.SourceEditor
// special handling for escape chars inside ' and "
if (Caret.Offset > 0) {
char charBefore = Document.GetCharAt (Caret.Offset - 1);
- if (inStringOrComment && (ch == '"' || (inChar && ch == '\'')) && charBefore == '\\')
+ if (inStringOrComment && ch == '"' && charBefore == '\\')
skipChar = null;
}
char insertionChar = '\0';
@@ -389,7 +374,7 @@ namespace MonoDevelop.SourceEditor
}
} else {
char charBefore = Document.GetCharAt (Caret.Offset - 1);
- if (!inString && !inComment && !inChar && ch == '"' && charBefore != '\\') {
+ if (!inStringOrComment && ch == '"' && charBefore != '\\') {
insertMatchingBracket = true;
insertionChar = '"';
}
@@ -574,17 +559,13 @@ namespace MonoDevelop.SourceEditor
var ctx = ExtensionContext ?? AddinManager.AddinEngine;
CommandEntrySet cset = IdeApp.CommandService.CreateCommandEntrySet (ctx, menuPath);
Gtk.Menu menu = IdeApp.CommandService.CreateMenu (cset);
-
var imMenu = CreateInputMethodMenuItem (GettextCatalog.GetString ("_Input Methods"));
if (imMenu != null) {
menu.Append (new SeparatorMenuItem ());
menu.Append (imMenu);
}
- menu.Destroyed += delegate {
- this.QueueDraw ();
- };
-
+ menu.Hidden += HandleMenuHidden;
if (evt != null) {
GtkWorkarounds.ShowContextMenu (menu, this, evt);
} else {
@@ -592,6 +573,16 @@ namespace MonoDevelop.SourceEditor
GtkWorkarounds.ShowContextMenu (menu, this, new Gdk.Rectangle (pt.X, pt.Y, 1, (int)LineHeight));
}
}
+
+ void HandleMenuHidden (object sender, EventArgs e)
+ {
+ var menu = sender as Gtk.Menu;
+ menu.Hidden -= HandleMenuHidden;
+ GLib.Timeout.Add (10, delegate {
+ menu.Destroy ();
+ return false;
+ });
+ }
#region Templates
int FindPrevWordStart (int offset)
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/FileRegistry.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/FileRegistry.cs
index 4120481..7cec9ed 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/FileRegistry.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/FileRegistry.cs
@@ -82,7 +82,7 @@ namespace MonoDevelop.SourceEditor
foreach (var view in openFiles) {
if (SkipView (view) || !string.Equals (view.ContentName, file.FileName, fileNameComparer))
continue;
- if (!view.IsDirty && IdeApp.Workbench.AutoReloadDocuments)
+ if (!view.IsDirty && (IdeApp.Workbench.AutoReloadDocuments || file.AutoReload))
view.SourceEditorWidget.Reload ();
else
foundOneChange = true;
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs
index d903708..39f06ea 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs
@@ -34,7 +34,6 @@ using MonoDevelop.Ide.Gui;
using MonoDevelop.Core;
using MonoDevelop.Ide.Fonts;
using ICSharpCode.NRefactory.TypeSystem;
-using ICSharpCode.NRefactory.CSharp.Resolver;
using MonoDevelop.Ide.TypeSystem;
using ICSharpCode.NRefactory.Semantics;
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs
index 8e3027a..5e2bf2b 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleCache.cs
@@ -29,6 +29,7 @@ using Mono.TextEditor;
using MonoDevelop.Ide;
using MonoDevelop.Ide.Fonts;
using Mono.TextEditor.Highlighting;
+using MonoDevelop.Components;
namespace MonoDevelop.SourceEditor
{
@@ -41,23 +42,135 @@ namespace MonoDevelop.SourceEditor
internal Dictionary<DocumentLine, double> lineWidthDictionary = new Dictionary<DocumentLine, double> ();
internal TextEditor editor;
-
- internal Cairo.Color[,,,,] warningMatrix, errorMatrix;
- internal Cairo.Color errorGc, warningGc;
- internal Cairo.Color gcLight, gcSelected;
-
+
internal Pango.FontDescription fontDescription;
+ public MessageBubbleTextMarker CurrentSelectedTextMarker;
+
public MessageBubbleCache (TextEditor editor)
{
this.editor = editor;
- errorPixbuf = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Error, Gtk.IconSize.Menu);
- warningPixbuf = ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Warning, Gtk.IconSize.Menu);
+ errorPixbuf = ImageService.GetPixbuf ("md-bubble-error", Gtk.IconSize.Menu);
+ warningPixbuf = ImageService.GetPixbuf ("md-bubble-warning", Gtk.IconSize.Menu);
editor.EditorOptionsChanged += HandleEditorEditorOptionsChanged;
+ editor.LeaveNotifyEvent += HandleLeaveNotifyEvent;
+ editor.MotionNotifyEvent += HandleMotionNotifyEvent;
+ editor.TextArea.BeginHover += HandleBeginHover;
fontDescription = FontService.GetFontDescription ("MessageBubbles");
-
- SetColors ();
+ }
+
+ void HandleMotionNotifyEvent (object o, Gtk.MotionNotifyEventArgs args)
+ {
+ if (CurrentSelectedTextMarker == null)
+ DestroyPopoverWindow ();
+ }
+
+ uint hoverTimeout;
+
+ void CancelHoverTimeout ()
+ {
+ if (hoverTimeout != 0) {
+ GLib.Source.Remove (hoverTimeout);
+ hoverTimeout = 0;
+ }
+ }
+ MessageBubblePopoverWindow popoverWindow;
+
+
+ class MessageBubblePopoverWindow : PopoverWindow
+ {
+ readonly MessageBubbleCache cache;
+ readonly MessageBubbleTextMarker marker;
+
+ public MessageBubblePopoverWindow (MessageBubbleCache cache, MessageBubbleTextMarker marker)
+ {
+ this.cache = cache;
+ this.marker = marker;
+ ShowArrow = true;
+ Opacity = 0.9;
+ }
+
+ protected override void OnSizeRequested (ref Gtk.Requisition requisition)
+ {
+ base.OnSizeRequested (ref requisition);
+ double y = 0;
+ foreach (var layout in marker.Layouts) {
+ requisition.Width = Math.Max (layout.Width + 8, requisition.Width);
+ y += layout.Height;
+ }
+ requisition.Height = (int)y + 12;
+ }
+
+ protected override bool OnEnterNotifyEvent (Gdk.EventCrossing evnt)
+ {
+ cache.DestroyPopoverWindow ();
+ return base.OnEnterNotifyEvent (evnt);
+ }
+
+ protected override void OnDrawContent (Gdk.EventExpose evnt, Cairo.Context g)
+ {
+ Theme.BorderColor = marker.TagColor.Color;
+ g.Rectangle (0, 0, Allocation.Width, Allocation.Height);
+ g.Color = marker.TagColor.Color;
+ g.Fill ();
+
+ double y = 8;
+ double x = 4;
+ foreach (var layout in marker.Layouts) {
+ g.Save ();
+ g.Translate (x, y);
+ g.Color = marker.TagColor.SecondColor;
+ g.ShowLayout (layout.Layout);
+ g.Restore ();
+ y += layout.Height;
+ }
+
+ }
+ }
+
+ public void StartHover (MessageBubbleTextMarker marker, double bubbleX, double bubbleY, double bubbleWidth, bool isReduced)
+ {
+ CancelHoverTimeout ();
+ if (removedMarker == marker) {
+ CurrentSelectedTextMarker = marker;
+ return;
+ }
+
+ hoverTimeout = GLib.Timeout.Add (200, delegate {
+ CurrentSelectedTextMarker = marker;
+ editor.QueueDraw ();
+
+ DestroyPopoverWindow ();
+
+ if (marker.Layouts == null || marker.Layouts.Count < 2 && !isReduced)
+ return false;
+ popoverWindow = new MessageBubblePopoverWindow (this, marker);
+ popoverWindow.ShowPopup (editor, new Gdk.Rectangle ((int)(bubbleX + editor.TextViewMargin.XOffset), (int)bubbleY, (int)bubbleWidth, (int)editor.LineHeight) ,PopupPosition.Top);
+ return false;
+ });
+ }
+
+ MessageBubbleTextMarker removedMarker;
+
+ void HandleBeginHover (object sender, EventArgs e)
+ {
+ CancelHoverTimeout ();
+ removedMarker = CurrentSelectedTextMarker;
+ if (CurrentSelectedTextMarker == null)
+ return;
+ CurrentSelectedTextMarker = null;
+ editor.QueueDraw ();
+ }
+
+ void HandleLeaveNotifyEvent (object o, Gtk.LeaveNotifyEventArgs args)
+ {
+ DestroyPopoverWindow ();
+ CancelHoverTimeout ();
+ if (CurrentSelectedTextMarker == null)
+ return;
+ CurrentSelectedTextMarker = null;
+ editor.QueueDraw ();
}
public bool RemoveLine (DocumentLine line)
@@ -68,18 +181,27 @@ namespace MonoDevelop.SourceEditor
return true;
}
+ void DestroyPopoverWindow ()
+ {
+ if (popoverWindow != null) {
+ popoverWindow.Destroy ();
+ popoverWindow = null;
+ }
+ }
+
public void Dispose ()
{
+ CancelHoverTimeout ();
+ DestroyPopoverWindow ();
+ editor.TextArea.BeginHover -= HandleBeginHover;
+ editor.LeaveNotifyEvent -= HandleLeaveNotifyEvent;
+ editor.MotionNotifyEvent -= HandleMotionNotifyEvent;
editor.EditorOptionsChanged -= HandleEditorEditorOptionsChanged;
if (textWidthDictionary != null) {
foreach (var l in textWidthDictionary.Values) {
l.Layout.Dispose ();
}
}
- if (fontDescription != null) {
- fontDescription.Dispose ();
- fontDescription = null;
- }
}
static string GetFirstLine (ErrorText errorText)
@@ -104,94 +226,13 @@ namespace MonoDevelop.SourceEditor
}
return result;
}
-
- void SetColors ()
- {
- ColorScheme style = editor.ColorStyle;
- errorGc = (HslColor)(style.MessageBubbleError.Color);
- warningGc = (HslColor)(style.MessageBubbleWarning.Color);
- errorMatrix = CreateColorMatrix (editor, true);
- warningMatrix = CreateColorMatrix (editor, false);
-
- gcSelected = (HslColor)style.SelectedText.Foreground;
- gcLight = new Cairo.Color (1, 1, 1);
- }
-
+
void HandleEditorEditorOptionsChanged (object sender, EventArgs e)
{
- SetColors ();
lineWidthDictionary.Clear ();
OnChanged (EventArgs.Empty);
}
-
- static void AdjustColorMatrix (Cairo.Color[,,,,] colorMatrix , int side, Cairo.Color baseColor)
- {
- var hsl = (HslColor)baseColor;
- hsl.L *= 1.2;
- colorMatrix [side, 0, 0, 0, 0] = hsl; // light top
- colorMatrix [side, 1, 0, 0, 0] = baseColor; // light below
-
- hsl = (HslColor)baseColor;
- hsl.L *= 1.05;
- colorMatrix [side, 0, 1, 0, 0] = hsl; // dark top
-
- hsl = (HslColor)baseColor;
- hsl.L *= 0.95;
- colorMatrix [side, 1, 1, 0, 0] = hsl; // dark below
-
- hsl = (HslColor)baseColor;
- hsl.L *= 0.98;
- colorMatrix [side, 0, 2, 0, 0] = hsl; // line top
-
- hsl = (HslColor)baseColor;
- hsl.L *= 0.92;
- colorMatrix [side, 1, 2, 0, 0] = hsl; // line below
-
- }
-
- static Cairo.Color[,,,,] CreateColorMatrix (TextEditor editor, bool isError)
- {
- Cairo.Color[,,,,] colorMatrix = new Cairo.Color[2, 2, 3, 2, 2];
-
- ColorScheme style = editor.ColorStyle;
- var baseColor = (isError ? style.MessageBubbleError : style.MessageBubbleWarning).SecondColor;
-
- AdjustColorMatrix (colorMatrix, 0, baseColor);
-
- var hsl = (HslColor)baseColor;
- hsl.S *= 0.6;
- baseColor = hsl;
- AdjustColorMatrix (colorMatrix, 1, hsl);
-
- double factor = 1.03;
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 2; j++) {
- for (int k = 0; k < 3; k++) {
- HslColor color = colorMatrix [i, j, k, 0, 0];
- color.L *= factor;
- colorMatrix [i, j, k, 1, 0] = color;
- }
- }
- }
- var selectionColor = style.SelectedText.Background;
- const double bubbleAlpha = 0.1;
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 2; j++) {
- for (int k = 0; k < 3; k++) {
- for (int l = 0; l < 2; l++) {
- var color = colorMatrix [i, j, k, l, 0];
- colorMatrix [i, j, k, l, 1] = new Cairo.Color (
- (color.R * bubbleAlpha + selectionColor.R * (1 - bubbleAlpha)),
- (color.G * bubbleAlpha + selectionColor.G * (1 - bubbleAlpha)),
- (color.B * bubbleAlpha + selectionColor.B * (1 - bubbleAlpha))
- );
- }
- }
- }
- }
- return colorMatrix;
- }
-
+
internal class LayoutDescriptor
{
public Pango.Layout Layout { get; set; }
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs
deleted file mode 100644
index bdb5549..0000000
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleHighlightPopupWindow.cs
+++ /dev/null
@@ -1,170 +0,0 @@
-//
-// MessageBubbleHighlightPopupWindow.cs
-//
-// Author:
-// Mike Krüger <mkrueger at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
-// 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.Linq;
-using Gtk;
-using MonoDevelop.Ide;
-using MonoDevelop.Components;
-using Mono.TextEditor;
-using Mono.TextEditor.Theatrics;
-
-namespace MonoDevelop.SourceEditor
-{
- public class MessageBubbleHighlightPopupWindow : BounceFadePopupWindow
- {
- MessageBubbleTextMarker marker;
-// new Gdk.Rectangle bounds;
-
- public MessageBubbleHighlightPopupWindow (SourceEditorView view, MessageBubbleTextMarker marker)
- : base (view.TextEditor)
- {
- this.marker = marker;
-
- ExpandWidth = 36;
- ExpandHeight = 2;
- BounceEasing = Mono.TextEditor.Theatrics.Easing.Sine;
- Duration = 150;
- }
-
- protected override Gdk.Rectangle CalculateInitialBounds ()
- {
- var bounds = marker.ErrorTextBounds;
- int spaceX = bounds.Width / 2;
- return new Gdk.Rectangle (bounds.X - spaceX,
- (int)(bounds.Y - Editor.LineHeight),
- bounds.Width + spaceX * 2,
- (int)(bounds.Height + Editor.LineHeight * 2));
- }
-
- protected override void OnAnimationCompleted ()
- {
- Destroy ();
- }
-
- protected override bool OnExposeEvent (Gdk.EventExpose evnt)
- {
- using (var cr = Gdk.CairoHelper.Create (evnt.Window)) {
- cr.SetSourceRGBA (1, 1, 1, 0);
- cr.Operator = Cairo.Operator.Source;
- cr.Paint ();
- }
-
- var bounds = marker.ErrorTextBounds;
- using (var cr = Gdk.CairoHelper.Create (evnt.Window)) {
- cr.Translate (width / 2, height / 2);
- cr.Scale (1 + scale / 8, 1 + scale / 8);
- int x = -(bounds.Width) / 2;
- int y = -bounds.Height / 2;
-
- if (marker.FitsInSameLine) {
- cr.MoveTo (x + Editor.LineHeight / 2, y);
- cr.LineTo (x, 0);
- cr.LineTo (x + Editor.LineHeight / 2, bounds.Height / 2);
- } else {
- cr.MoveTo (x, -bounds.Height / 2);
- cr.LineTo (x, bounds.Height / 2);
- }
- cr.LineTo (x + bounds.Width, bounds.Height / 2);
- cr.LineTo (x + bounds.Width, y);
- cr.ClosePath ();
-
- Mono.TextEditor.HslColor hsl = marker.colorMatrix [0, 0, 0, 0, 0];
- double delta = 1 + 2 - scale;
- hsl.S += delta;
- var color = (Cairo.Color)hsl;
- color.A = opacity;
- cr.Color = color;
- cr.FillPreserve ();
- color = marker.colorMatrix [0, 0, 2, 0, 0];
- color.A = opacity;
- cr.Color = color;
- cr.Stroke ();
- int errorCounterWidth = 0;
-
- marker.EnsureLayoutCreated (base.Editor);
-
- if (marker.Errors.Count > 1) {
- double rY = y + Editor.LineHeight / 6;
- int ew, eh;
- marker.errorCountLayout.GetPixelSize (out ew, out eh);
- errorCounterWidth = ew + 10;
- int rX = x + bounds.Width - errorCounterWidth;
-
- int rW = errorCounterWidth - 2;
- double rH = Editor.LineHeight * 3 / 4;
-
- BookmarkMarker.DrawRoundRectangle (cr, rX, rY, 8, rW, rH);
- cr.Color = new Cairo.Color (0.5, 0.5, 0.5);
- cr.Fill ();
-
- cr.MoveTo (rX + rW / 2 - rW / 4, rY + rH - rH / 4);
- cr.LineTo (rX + rW / 2 + rW / 4, rY + rH - rH / 4);
- cr.LineTo (rX + rW / 2, rY + rH / 4);
- cr.ClosePath ();
-
- cr.Color = new Cairo.Color (1, 1, 1);
- cr.Fill ();
- }
-
- cr.Color = Editor.ColorStyle.MessageBubbleError.Color;
-
- int layoutWidth, layoutHeight;
- marker.Layouts [0].Layout.GetPixelSize (out layoutWidth, out layoutHeight);
- double ly;
- if (marker.CollapseExtendedErrors || marker.Errors.Count == 1) {
- ly = 1 + y + (bounds.Height - layoutHeight) / 2;
- double x2 = x + MessageBubbleTextMarker.border;
- if (marker.FitsInSameLine)
- x2 += 1 + Editor.LineHeight / 2;
- cr.Translate (x2, ly);
- cr.ShowLayout (marker.Layouts [0].Layout);
-
- } else {
- ly = 1 + y + (Editor.LineHeight - layoutHeight) / 2;
- for (int i = 0; i < marker.Errors.Count; i++) {
- marker.Layouts [i].Layout.GetPixelSize (out layoutWidth, out layoutHeight);
- cr.Save ();
- double x2;
- if (i == 0) {
- x2 = x + bounds.Width - layoutWidth - errorCounterWidth;
- } else {
- x2 = x + MessageBubbleTextMarker.border;
- }
- if (marker.FitsInSameLine)
- x2 += Editor.LineHeight / 2;
- cr.Translate (x2, ly);
- cr.ShowLayout (marker.Layouts [i].Layout);
- cr.Restore ();
- ly += Editor.LineHeight;
- }
- }
-
-
- }
- return false;
- }
- }
-}
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs
index 95562a8..aa5766b 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker.cs
@@ -34,38 +34,17 @@ using MonoDevelop.Ide;
using System.Text.RegularExpressions;
using Mono.TextEditor.Highlighting;
using MonoDevelop.Ide.Fonts;
+using MonoDevelop.Components;
+using Gtk;
namespace MonoDevelop.SourceEditor
{
- public class ErrorText
+ partial class MessageBubbleTextMarker : MarginMarker, IDisposable, IActionTextLineMarker
{
- public bool IsError { get; set; }
- public string ErrorMessage { get; set; }
-
- public ErrorText (bool isError, string errorMessage)
- {
- this.IsError = isError;
- this.ErrorMessage = errorMessage;
- }
-
- public override string ToString ()
- {
- return string.Format ("[ErrorText: IsError={0}, ErrorMessage={1}]", IsError, ErrorMessage);
- }
- }
-
- public class MessageBubbleTextMarker : TextLineMarker, IBackgroundMarker, IIconBarMarker, IExtendingTextLineMarker, IDisposable, IActionTextLineMarker
- {
- MessageBubbleCache cache;
+ readonly MessageBubbleCache cache;
internal const int border = 4;
-// bool fitCalculated = false;
- bool fitsInSameLine = true;
- public bool FitsInSameLine {
- get { return this.fitsInSameLine; }
- }
-
TextEditor editor {
get { return cache.editor;}
}
@@ -75,25 +54,6 @@ namespace MonoDevelop.SourceEditor
set { task.Completed = !value; }
}
- bool collapseExtendedErrors = true;
- public bool CollapseExtendedErrors {
- get { return collapseExtendedErrors; }
- set {
- if (collapseExtendedErrors == value)
- return;
- collapseExtendedErrors = value;
- int lineNumber = editor.Document.OffsetToLineNumber (lineSegment.Offset);
- if (collapseExtendedErrors) {
- editor.Document.UnRegisterVirtualTextMarker (this);
- } else {
- var fitting = IsCurrentErrorTextFitting ();
- for (int i = fitting ? 1 : 0; i < errors.Count; i++)
- editor.Document.RegisterVirtualTextMarker (lineNumber + i + (fitting ? 0 : 1), this);
- }
- editor.Document.CommitMultipleLineUpdate (lineNumber, lineNumber + errors.Count + 1);
- }
- }
-
public bool UseVirtualLines { get; set; }
List<ErrorText> errors = new List<ErrorText> ();
@@ -172,27 +132,38 @@ namespace MonoDevelop.SourceEditor
// fitsInSameLine = editor.TextViewMargin.XOffset + textWidth + LayoutWidth + cache.errorPixbuf.Width + border + editor.LineHeight / 2 < editor.Allocation.Width;
// }
+ public override TextLineMarkerFlags Flags {
+ get {
+ if (lineSegment != null && lineSegment.Markers.Any (m => m is DebugTextMarker))
+ return TextLineMarkerFlags.None;
+
+ return TextLineMarkerFlags.DrawsSelection;
+ }
+ }
+
string initialText;
+ bool isError;
internal MessageBubbleTextMarker (MessageBubbleCache cache, Task task, DocumentLine lineSegment, bool isError, string errorMessage)
{
+ if (cache == null)
+ throw new ArgumentNullException ("cache");
this.cache = cache;
this.task = task;
this.IsVisible = true;
this.lineSegment = lineSegment;
this.initialText = editor.Document.GetTextAt (lineSegment);
- this.Flags = TextLineMarkerFlags.DrawsSelection;
- AddError (isError, errorMessage);
+ this.isError = isError;
+ AddError (task, isError, errorMessage);
// cache.Changed += (sender, e) => CalculateLineFit (editor, lineSegment);
}
static System.Text.RegularExpressions.Regex mcsErrorFormat = new System.Text.RegularExpressions.Regex ("(.+)\\(CS\\d+\\)\\Z");
- public void AddError (bool isError, string errorMessage)
+ public void AddError (Task task, bool isError, string errorMessage)
{
var match = mcsErrorFormat.Match (errorMessage);
if (match.Success)
errorMessage = match.Groups [1].Value;
- errors.Add (new ErrorText (isError, errorMessage));
- CollapseExtendedErrors = true;
+ errors.Add (new ErrorText (task, isError, errorMessage));
DisposeLayout ();
}
@@ -208,27 +179,88 @@ namespace MonoDevelop.SourceEditor
public void Dispose ()
{
DisposeLayout ();
- if (!CollapseExtendedErrors)
- editor.Document.UnRegisterVirtualTextMarker (this);
+
}
internal Pango.Layout errorCountLayout;
List<MessageBubbleCache.LayoutDescriptor> layouts;
- internal Cairo.Color[,,,,] colorMatrix {
+ internal AmbientColor MarkerColor {
get {
- bool isError = errors.Any (e => e.IsError);
- return isError ? cache.errorMatrix : cache.warningMatrix;
+ return isError ? editor.ColorStyle.MessageBubbleErrorMarker : editor.ColorStyle.MessageBubbleWarningMarker;
}
}
-
- internal Cairo.Color gc {
+
+ internal AmbientColor TagColor {
get {
- bool isError = errors.Any (e => e.IsError);
- return isError ? cache.errorGc : cache.warningGc;
+ return isError ? editor.ColorStyle.MessageBubbleErrorTag : editor.ColorStyle.MessageBubbleWarningTag;
}
}
-
+
+ internal AmbientColor LineColor {
+ get {
+ return isError ? editor.ColorStyle.MessageBubbleErrorLine : editor.ColorStyle.MessageBubbleWarningLine;
+ }
+ }
+
+ internal AmbientColor CounterColor {
+ get {
+ return isError ? editor.ColorStyle.MessageBubbleErrorCounter : editor.ColorStyle.MessageBubbleWarningCounter;
+ }
+ }
+
+ internal AmbientColor IconMarginColor {
+ get {
+ return isError ? editor.ColorStyle.MessageBubbleErrorIconMargin : editor.ColorStyle.MessageBubbleWarningIconMargin;
+ }
+ }
+
+ Cairo.Color BlendSelection (Cairo.Color color, bool selected)
+ {
+ if (!selected)
+ return color;
+ var selectionColor = editor.ColorStyle.SelectedText.Background;
+ const double bubbleAlpha = 0.1;
+ return new Cairo.Color (
+ (color.R * bubbleAlpha + selectionColor.R * (1 - bubbleAlpha)),
+ (color.G * bubbleAlpha + selectionColor.G * (1 - bubbleAlpha)),
+ (color.B * bubbleAlpha + selectionColor.B * (1 - bubbleAlpha))
+ );
+ }
+
+ Cairo.Color Highlight (Cairo.Color color, bool highlighted)
+ {
+ if (!highlighted)
+ return color;
+ var selectionColor = editor.ColorStyle.PlainText.Background;
+ const double bubbleAlpha = 0.7;
+ return new Cairo.Color (
+ (color.R * bubbleAlpha + selectionColor.R * (1 - bubbleAlpha)),
+ (color.G * bubbleAlpha + selectionColor.G * (1 - bubbleAlpha)),
+ (color.B * bubbleAlpha + selectionColor.B * (1 - bubbleAlpha))
+ );
+ }
+
+ Cairo.Color GetLineColor (bool highlighted, bool selected)
+ {
+ return BlendSelection (Highlight (LineColor.Color, highlighted), selected);
+ }
+
+ Cairo.Color GetMarkerColor (bool highlighted, bool selected)
+ {
+ return BlendSelection (Highlight (MarkerColor.Color, highlighted), selected);
+ }
+
+ Cairo.Color GetLineColorBottom (bool highlighted, bool selected)
+ {
+ return BlendSelection (Highlight (LineColor.SecondColor, highlighted), selected);
+ }
+
+ Cairo.Color GetLineColorBorder (bool highlighted, bool selected)
+ {
+ return BlendSelection (Highlight (LineColor.BorderColor, highlighted), selected);
+ }
+
internal IList<MessageBubbleCache.LayoutDescriptor> Layouts {
get { return layouts; }
}
@@ -245,7 +277,7 @@ namespace MonoDevelop.SourceEditor
if (errorCountLayout == null && errors.Count > 1) {
errorCountLayout = new Pango.Layout (editor.PangoContext);
- errorCountLayout.FontDescription = cache.fontDescription;
+ errorCountLayout.FontDescription = FontService.GetFontDescription ("MessageBubbles");
errorCountLayout.SetText (errors.Count.ToString ());
}
}
@@ -261,8 +293,6 @@ namespace MonoDevelop.SourceEditor
get {
if (layouts == null)
return 0;
- if (!CollapseExtendedErrors && errors.Count > 1)
- return layouts.Max (l => l.Width);
return layouts [0].Width;
}
}
@@ -289,336 +319,6 @@ namespace MonoDevelop.SourceEditor
}
}
- void DrawMessageExtendIcon (Mono.TextEditor.TextEditor editor, Cairo.Context g, double y, int errorCounterWidth, int eh)
- {
- EnsureLayoutCreated (editor);
- double rW = errorCounterWidth - 2;
- double rH = editor.LineHeight * 3 / 4;
-
- double rX = editor.Allocation.Width - rW - 2;
- double rY = y + (editor.LineHeight - rH) / 2;
- BookmarkMarker.DrawRoundRectangle (g, rX, rY, 8, rW, rH);
-
- g.Color = oldIsOver ? new Cairo.Color (0.3, 0.3, 0.3) : new Cairo.Color (0.5, 0.5, 0.5);
- g.Fill ();
- if (CollapseExtendedErrors) {
- if (errorCountLayout != null) {
- g.Color = cache.gcLight;
- g.Save ();
- g.Translate (rX + rW / 4, rY + (rH - eh) / 2);
- g.ShowLayout (errorCountLayout);
- g.Restore ();
- } else {
- g.MoveTo (rX + rW / 2 - rW / 4, rY + rH / 4);
- g.LineTo (rX + rW / 2 + rW / 4, rY + rH / 4);
- g.LineTo (rX + rW / 2, rY + rH - rH / 4);
- g.ClosePath ();
-
- g.Color = new Cairo.Color (1, 1, 1);
- g.Fill ();
- }
- } else {
- g.MoveTo (rX + rW / 2 - rW / 4, rY + rH - rH / 4);
- g.LineTo (rX + rW / 2 + rW / 4, rY + rH - rH / 4);
- g.LineTo (rX + rW / 2, rY + rH / 4);
- g.ClosePath ();
-
- g.Color = new Cairo.Color (1, 1, 1);
- g.Fill ();
- }
- }
-
- public bool DrawBackground (TextEditor editor, Cairo.Context g, TextViewMargin.LayoutWrapper layout2, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg)
- {
- if (!IsVisible)
- return true;
- EnsureLayoutCreated (editor);
- double x = editor.TextViewMargin.XOffset;
- int right = editor.Allocation.Width;
- bool isCaretInLine = startOffset <= editor.Caret.Offset && editor.Caret.Offset <= endOffset;
- var lineTextPx = editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition + layout2.PangoWidth / Pango.Scale.PangoScale;
- int errorCounterWidth = GetErrorCountBounds (layout2).Item1;
-// int eh = GetErrorCountBounds ().Item2;
- double x2 = System.Math.Max (right - LayoutWidth - border - (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) - errorCounterWidth, fitsInSameLine ? editor.TextViewMargin.XOffset + editor.LineHeight / 2 : editor.TextViewMargin.XOffset);
-
- bool isEolSelected = editor.IsSomethingSelected && editor.SelectionMode != SelectionMode.Block ? editor.SelectionRange.Contains (lineSegment.Offset + lineSegment.Length) : false;
-
- int active = editor.Document.GetTextAt (lineSegment) == initialText ? 0 : 1;
- int highlighted = active == 0 && isCaretInLine ? 1 : 0;
- int selected = 0;
-
- double topSize = Math.Floor (editor.LineHeight / 2);
- double bottomSize = editor.LineHeight / 2 + editor.LineHeight % 2;
-
- if (!fitsInSameLine) {
- if (isEolSelected) {
- x -= (int)editor.HAdjustment.Value;
- editor.TextViewMargin.DrawRectangleWithRuler (g, x, new Cairo.Rectangle (x, y + editor.LineHeight, editor.TextViewMargin.TextStartPosition, editor.LineHeight), editor.ColorStyle.PlainText.Background, true);
- editor.TextViewMargin.DrawRectangleWithRuler (g, x + editor.TextViewMargin.TextStartPosition, new Cairo.Rectangle (x + editor.TextViewMargin.TextStartPosition, y + editor.LineHeight, editor.Allocation.Width + (int)editor.HAdjustment.Value, editor.LineHeight), editor.ColorStyle.SelectedText.Background, true);
- x += (int)editor.HAdjustment.Value;
- } else {
- editor.TextViewMargin.DrawRectangleWithRuler (g, x, new Cairo.Rectangle (x, y + editor.LineHeight, x2, editor.LineHeight), editor.ColorStyle.PlainText.Background, true);
- }
- }
- DrawRectangle (g, x, y, right, topSize);
- g.Color = colorMatrix [active, TOP, LIGHT, highlighted, selected];
- g.Fill ();
- DrawRectangle (g, x, y + topSize, right, bottomSize);
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, selected];
- g.Fill ();
-
- g.MoveTo (new Cairo.PointD (x, y + 0.5));
- g.LineTo (new Cairo.PointD (x + right, y + 0.5));
- g.Color = colorMatrix [active, TOP, LINE, highlighted, selected];
- g.Stroke ();
-
- g.MoveTo (new Cairo.PointD (x, y + editor.LineHeight - 0.5));
- g.LineTo (new Cairo.PointD ((fitsInSameLine ? x + right : x2 + 1), y + editor.LineHeight - 0.5));
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.Stroke ();
- if (editor.Options.ShowRuler) {
- double divider = Math.Max (editor.TextViewMargin.XOffset, x + editor.TextViewMargin.RulerX);
- g.MoveTo (new Cairo.PointD (divider + 0.5, y));
- g.LineTo (new Cairo.PointD (divider + 0.5, y + editor.LineHeight));
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.Stroke ();
- }
-
-// draw background
- if (layout2.StartSet || selectionStart == endOffset) {
- double startX;
- double endX;
-
- if (selectionStart != endOffset) {
- var start = layout2.Layout.IndexToPos ((int)layout2.SelectionStartIndex);
- startX = (int)(start.X / Pango.Scale.PangoScale);
- var end = layout2.Layout.IndexToPos ((int)layout2.SelectionEndIndex);
- endX = (int)(end.X / Pango.Scale.PangoScale);
- } else {
- startX = x2;
- endX = startX;
- }
-
- if (editor.MainSelection.SelectionMode == SelectionMode.Block && startX == endX)
- endX = startX + 2;
- startX += startXPos;
- endX += startXPos;
- startX = Math.Max (editor.TextViewMargin.XOffset, startX);
-// clip region to textviewmargin start
- if (isEolSelected)
- endX = editor.Allocation.Width + (int)editor.HAdjustment.Value;
- if (startX < endX) {
- DrawRectangle (g, startX, y, endX - startX, topSize);
- g.Color = colorMatrix [active, TOP, LIGHT, highlighted, 1];
- g.Fill ();
- DrawRectangle (g, startX, y + topSize, endX - startX, bottomSize);
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, 1];
- g.Fill ();
-
- g.MoveTo (new Cairo.PointD (startX, y + 0.5));
- g.LineTo (new Cairo.PointD (endX, y + 0.5));
- g.Color = colorMatrix [active, TOP, LINE, highlighted, 1];
- g.Stroke ();
-
- if (startX < x2) {
- g.MoveTo (new Cairo.PointD (startX, y + editor.LineHeight - 0.5));
- g.LineTo (new Cairo.PointD (System.Math.Min (endX, x2 + 1), y + editor.LineHeight - 0.5));
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, 1];
- g.Stroke ();
- if (x2 + 1 < endX) {
- g.MoveTo (new Cairo.PointD (x2 + 1, y + editor.LineHeight - 0.5));
- g.LineTo (new Cairo.PointD (endX, y + editor.LineHeight - 0.5));
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, 1];
- g.Stroke ();
- }
- }
-
- if (editor.Options.ShowRuler) {
- double divider = Math.Max (editor.TextViewMargin.XOffset, x + editor.TextViewMargin.RulerX);
- g.MoveTo (new Cairo.PointD (divider + 0.5, y));
- g.LineTo (new Cairo.PointD (divider + 0.5, y + editor.LineHeight));
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, 1];
- g.Stroke ();
- }
- }
- }
-
- if (!fitsInSameLine)
- y += editor.LineHeight;
- double y2 = y + 0.5;
- double y2Bottom = y2 + editor.LineHeight - 1;
- selected = isEolSelected && (CollapseExtendedErrors) ? 1 : 0;
- if (x2 < lineTextPx)
- x2 = lineTextPx;
-
-// draw message text background
- if (CollapseExtendedErrors) {
- if (!fitsInSameLine) {
-// draw box below line
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2 - 1));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2 - 1));
- g.ClosePath ();
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, selected];
- g.Fill ();
-
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2 - 1));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.Stroke ();
- } else {
-// draw 'arrow marker' in the same line
- if (errors.Count > 1) {
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2));
- double mid = y2 + topSize;
- g.LineTo (new Cairo.PointD (x2 - editor.LineHeight / 2 + 0.5, mid));
-
- g.LineTo (new Cairo.PointD (right, mid));
- g.LineTo (new Cairo.PointD (right, y2));
- g.ClosePath ();
- g.Color = colorMatrix [active, TOP, DARK, highlighted, selected];
- g.Fill ();
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (x2 - editor.LineHeight / 2 + 0.5, mid));
-
- g.LineTo (new Cairo.PointD (right, mid));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.ClosePath ();
-
- g.Color = colorMatrix [active, BOTTOM, DARK, highlighted, selected];
- g.Fill ();
- }
-
-// draw border
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2));
- g.LineTo (new Cairo.PointD (x2 - editor.LineHeight / 2 + 0.5, y2 + editor.LineHeight / 2));
-
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2));
- g.ClosePath ();
-
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.Stroke ();
- }
- } else {
- if (!fitsInSameLine) {
-// draw box below line
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2 - 1));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2 - 1));
- g.ClosePath ();
- } else {
-// draw filled arrow box
- if (!(errors.Count == 1 && !CollapseExtendedErrors)) {
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2));
- g.LineTo (new Cairo.PointD (x2 - editor.LineHeight / 2 + 0.5, y2 + editor.LineHeight / 2));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2Bottom));
- g.LineTo (new Cairo.PointD (right, y2));
- g.ClosePath ();
- }
- }
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, selected];
- g.Fill ();
-
-// draw light bottom line
- g.MoveTo (new Cairo.PointD (right, y2Bottom));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- g.Stroke ();
-
-// stroke left line
- if (fitsInSameLine) {
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2));
- g.LineTo (new Cairo.PointD (x2 - editor.LineHeight / 2 + 0.5, y2 + editor.LineHeight / 2));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom));
- } else {
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y2 - 1));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2Bottom + 1));
- }
-
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.Stroke ();
-
-// stroke top line
- if (fitsInSameLine) {
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.MoveTo (new Cairo.PointD (right, y2));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y2));
- g.Stroke ();
- }
- }
-
- if (editor.Options.ShowRuler) {
- double divider = Math.Max (editor.TextViewMargin.XOffset, x + editor.TextViewMargin.RulerX);
- if (divider >= x2) {
- g.MoveTo (new Cairo.PointD (divider + 0.5, y2));
- g.LineTo (new Cairo.PointD (divider + 0.5, y2Bottom));
- g.Color = colorMatrix [active, BOTTOM, DARK, highlighted, selected];
- g.Stroke ();
- }
- }
-
-
- for (int i = 0; i < layouts.Count; i++) {
- if (!IsCurrentErrorTextFitting (layout2) && !CollapseExtendedErrors)
- break;
-
- var layout = layouts [i];
- x2 = right - layout.Width - border - (ShowIconsInBubble ? cache.errorPixbuf.Width : 0);
- if (i == 0) {
- x2 -= errorCounterWidth;
- if (x2 < lineTextPx) {
- // if (CollapseExtendedErrors) {
- x2 = lineTextPx;
- // }
- }
- }
-// x2 = System.Math.Max (x2, fitsInSameLine ? editor.TextViewMargin.XOffset + editor.LineHeight / 2 : editor.TextViewMargin.XOffset);
-
- if (i > 0) {
- editor.TextViewMargin.DrawRectangleWithRuler (g, x, new Cairo.Rectangle (x, y, right, editor.LineHeight), isEolSelected ? editor.ColorStyle.SelectedText.Background : editor.ColorStyle.PlainText.Background, true);
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y + editor.LineHeight));
- g.LineTo (new Cairo.PointD (right, y + editor.LineHeight));
- g.LineTo (new Cairo.PointD (right, y));
- g.ClosePath ();
-
- if (CollapseExtendedErrors) {
- using (var pat = new Cairo.LinearGradient (x2, y, x2, y + editor.LineHeight)) {
- pat.AddColorStop (0, colorMatrix [active, TOP, LIGHT, highlighted, selected]);
- pat.AddColorStop (1, colorMatrix [active, BOTTOM, LIGHT, highlighted, selected]);
- g.Pattern = pat;
- }
- } else {
- g.Color = colorMatrix [active, TOP, LIGHT, highlighted, selected];
- }
- g.Fill ();
- if (editor.Options.ShowRuler) {
- double divider = Math.Max (editor.TextViewMargin.XOffset, x + editor.TextViewMargin.RulerX);
- if (divider >= x2) {
- g.MoveTo (new Cairo.PointD (divider + 0.5, y));
- g.LineTo (new Cairo.PointD (divider + 0.5, y + editor.LineHeight));
- g.Color = colorMatrix [active, BOTTOM, DARK, highlighted, selected];
- g.Stroke ();
- }
- }
- }
- g.Color = (HslColor)(selected == 0 ? gc : cache.gcSelected);
- g.Save ();
- g.Translate (x2 + (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) + border, y + (editor.LineHeight - layout.Height) / 2 + layout.Height % 2);
- g.ShowLayout (layout.Layout);
- g.Restore ();
- y += editor.LineHeight;
- if (!UseVirtualLines)
- break;
- }
- return true;
- }
-
static void DrawRectangle (Cairo.Context g, double x, double y, double width, double height)
{
double right = x + width;
@@ -630,237 +330,269 @@ namespace MonoDevelop.SourceEditor
g.LineTo (new Cairo.PointD (x, y));
g.ClosePath ();
}
- #region IIconBarMarker implementation
- public void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double x, double y, double width, double height)
+ #region IActionTextMarker implementation
+ public bool MousePressed (TextEditor editor, MarginMouseEventArgs args)
{
- Gdk.CairoHelper.SetSourcePixbuf (
- cr,
- errors.Any (e => e.IsError) ? cache.errorPixbuf : cache.warningPixbuf,
- (int)(x + (width - cache.errorPixbuf.Width) / 2),
- (int)(y + (height - cache.errorPixbuf.Height) / 2));
- cr.Paint ();
+ return false;
}
- public void MousePress (MarginMouseEventArgs args)
+ public void MouseHover (TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
{
+ if (LineSegment == null)
+ return;
+ if (bubbleDrawX < args.X && args.X < bubbleDrawX + bubbleWidth) {
+ editor.HideTooltip ();
+ result.Cursor = null;
+ cache.StartHover (this, bubbleDrawX, bubbleDrawY, bubbleWidth, bubbleIsReduced);
+ }
}
+ #endregion
- public void MouseRelease (MarginMouseEventArgs args)
+ double bubbleDrawX, bubbleDrawY;
+ double bubbleWidth;
+ bool bubbleIsReduced;
+
+ public override void Draw (TextEditor editor, Cairo.Context g, double y, LineMetrics metrics)
{
+
}
-
- public void MouseHover (MarginMouseEventArgs args)
+
+ public override void DrawAfterEol (TextEditor textEditor, Cairo.Context g, double y, EndOfLineMetrics metrics)
{
- var sb = new System.Text.StringBuilder ();
- foreach (var error in errors) {
- if (sb.Length > 0)
- sb.AppendLine ();
- sb.Append (error.ErrorMessage);
+ EnsureLayoutCreated (editor);
+ int errorCounterWidth = 0, eh = 0;
+ if (errorCountLayout != null)
+ errorCountLayout.GetPixelSize (out errorCounterWidth, out eh);
+
+ var sx = metrics.TextRenderEndPosition;
+ var width = LayoutWidth + errorCounterWidth + editor.LineHeight;
+ var drawLayout = layouts[0].Layout;
+ int ex = 0 , ey = 0;
+ bool customLayout = sx + width > editor.Allocation.Width;
+ bool hideText = false;
+ bubbleIsReduced = customLayout;
+ if (customLayout) {
+ width = editor.Allocation.Width - sx;
+ string text = layouts[0].Layout.Text;
+ drawLayout = new Pango.Layout (editor.PangoContext);
+ drawLayout.FontDescription = cache.fontDescription;
+ for (int j = text.Length - 4; j > 0; j--) {
+ drawLayout.SetText (text.Substring (0, j) + "...");
+ drawLayout.GetPixelSize (out ex, out ey);
+ if (ex + (errorCountLayout != null ? errorCounterWidth : 0) + editor.LineHeight < width)
+ break;
+ }
+ if (ex + (errorCountLayout != null ? errorCounterWidth : 0) + editor.LineHeight > width) {
+ hideText = true;
+ drawLayout.SetMarkup ("<span weight='heavy'>···</span>");
+ width = Math.Max (17, errorCounterWidth) + editor.LineHeight;
+ sx = Math.Min (sx, editor.Allocation.Width - width);
+ }
}
- args.Editor.TooltipText = sb.ToString ();
- }
-
- #endregion
+ bubbleDrawX = sx - editor.TextViewMargin.XOffset;
+ bubbleDrawY = y;
+ bubbleWidth = width;
+ g.RoundedRectangle (sx, y + 1, width, editor.LineHeight - 2, editor.LineHeight / 2 - 1);
+ g.Color = TagColor.Color;
+ g.Fill ();
- public Gdk.Rectangle ErrorTextBounds {
- get {
- int lineNumber = editor.Document.OffsetToLineNumber (lineSegment.Offset);
-
- double y = editor.Allocation.Y + editor.LineToY (lineNumber) - (int)editor.VAdjustment.Value;
- double height = editor.LineHeight * errors.Count;
- if (!fitsInSameLine)
- y += editor.LineHeight;
- int errorCounterWidth = GetErrorCountBounds ().Item1;
-
- double labelWidth = LayoutWidth + border + (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) + errorCounterWidth;
- if (fitsInSameLine)
- labelWidth += editor.LineHeight / 2;
-
- var layout = editor.TextViewMargin.GetLayout (lineSegment);
- var lineTextPx = editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition + layout.PangoWidth / Pango.Scale.PangoScale;
- labelWidth = Math.Min (editor.Allocation.Width - lineTextPx - editor.TextViewMargin.TextStartPosition, labelWidth);
-
- return new Gdk.Rectangle ((int)(editor.Allocation.Width - labelWidth), (int)y, (int)labelWidth, (int)height);
+ if (errorCounterWidth > 0 && errorCountLayout != null) {
+ g.RoundedRectangle (sx + width - errorCounterWidth - editor.LineHeight / 2, y + 2, errorCounterWidth, editor.LineHeight - 4, editor.LineHeight / 2 - 3);
+ g.Color = CounterColor.Color;
+ g.Fill ();
+
+ g.Save ();
+ g.Translate (sx + width - errorCounterWidth - editor.LineHeight / 2 + (errorCounterWidth - errorCounterWidth) / 2, y + 1);
+ g.Color = CounterColor.SecondColor;
+ g.ShowLayout (errorCountLayout);
+ g.Restore ();
}
- }
- #region IActionTextMarker implementation
- public bool MousePressed (TextEditor editor, MarginMouseEventArgs args)
- {
- if (MouseIsOverMarker (editor, args)) {
- CollapseExtendedErrors = !CollapseExtendedErrors;
- editor.QueueDraw ();
- return true;
+ if (errorCounterWidth <= 0 || errorCountLayout == null || !hideText) {
+ g.Save ();
+ g.Translate (sx + editor.LineHeight / 2, y + (editor.LineHeight - layouts [0].Height) / 2 + layouts [0].Height % 2);
+ g.Color = TagColor.SecondColor;
+ g.ShowLayout (drawLayout);
+ g.Restore ();
}
- MouseIsOverMarker (editor, args);
- return false;
+
+ if (customLayout)
+ drawLayout.Dispose ();
+
}
- bool MouseIsOverMarker (TextEditor editor, MarginMouseEventArgs args)
+ #region MarginMarker
+
+ public override bool CanDrawBackground (Margin margin)
{
- int lineNumber = editor.Document.OffsetToLineNumber (lineSegment.Offset);
- double y = editor.LineToY (lineNumber) - editor.VAdjustment.Value;
- if (fitsInSameLine) {
- if (args.Y < y + 2 || args.Y > y + editor.LineHeight - 2)
- return false;
- } else {
- if (args.Y < y + editor.LineHeight + 2 || args.Y > y + editor.LineHeight * 2 - 2)
- return false;
- }
-
- int errorCounterWidth = GetErrorCountBounds ().Item1;
- if (errorCounterWidth > 0)
- return editor.Allocation.Width - editor.TextViewMargin.XOffset - 2 - errorCounterWidth <= args.X;
- return false;
+ return margin is FoldMarkerMargin || margin is GutterMargin || margin is IconMargin || margin is ActionMargin;
}
-
- bool IsCurrentErrorTextFitting (TextViewMargin.LayoutWrapper wrapper = null)
+
+ public override bool CanDrawForeground (Margin margin)
{
- int errorCounterWidth = GetErrorCountBounds (wrapper).Item1;
- double labelWidth = LayoutWidth + border + (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) + errorCounterWidth + editor.LineHeight / 2;
-
- var layout = wrapper ?? editor.TextViewMargin.GetLayout (lineSegment);
-
- var lineTextPx = editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition + layout.PangoWidth / Pango.Scale.PangoScale;
-
- if (wrapper == null && layout.IsUncached)
- layout.Dispose ();
-
- return labelWidth < editor.Allocation.Width - lineTextPx - editor.TextViewMargin.TextStartPosition;
+ return margin is IconMargin;
}
- int MouseIsOverError (TextEditor editor, MarginMouseEventArgs args)
+ void DrawIconMarginBackground (TextEditor ed, Cairo.Context cr, MarginDrawMetrics metrics)
{
- if (layouts == null)
- return -1;
- int lineNumber = editor.Document.OffsetToLineNumber (lineSegment.Offset);
- double y = editor.LineToY (lineNumber) - editor.VAdjustment.Value;
- double height = editor.LineHeight * errors.Count;
- if (!fitsInSameLine)
- y += editor.LineHeight;
-// Console.WriteLine (lineNumber + ": height={0}, y={1}, args={2}", height, y, args.Y);
- if (y > args.Y || args.Y > y + height)
- return -1;
- int error = (int)((args.Y - y) / editor.LineHeight);
-// Console.WriteLine ("error:" + error);
- if (error >= layouts.Count)
- return -1;
- int errorCounterWidth = GetErrorCountBounds ().Item1;
-
- double labelWidth = LayoutWidth + border + (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) + errorCounterWidth + editor.LineHeight / 2;
-
- var layout = editor.TextViewMargin.GetLayout (lineSegment);
-
- var lineTextPx = editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition + layout.PangoWidth / Pango.Scale.PangoScale;
-
- labelWidth = Math.Min (editor.Allocation.Width - lineTextPx - editor.TextViewMargin.TextStartPosition, labelWidth);
-
- if (editor.Allocation.Width - editor.TextViewMargin.XOffset - labelWidth < args.X)
- return error;
-
- return -1;
+ cr.Rectangle (metrics.X, metrics.Y, metrics.Width, metrics.Height);
+ cr.Color = IconMarginColor.Color;
+ cr.Fill ();
+ cr.MoveTo (metrics.Right - 0.5, metrics.Y);
+ cr.LineTo (metrics.Right - 0.5, metrics.Bottom);
+ cr.Color = IconMarginColor.BorderColor;
+ cr.Stroke ();
+ if (cache.CurrentSelectedTextMarker != null && cache.CurrentSelectedTextMarker != this) {
+ cr.Rectangle (metrics.X, metrics.Y, metrics.Width, metrics.Height);
+ cr.Color = new Cairo.Color (ed.ColorStyle.IndicatorMargin.Color.R, ed.ColorStyle.IndicatorMargin.Color.G, ed.ColorStyle.IndicatorMargin.Color.B, 0.5);
+ cr.Fill ();
+ }
}
- bool oldIsOver = false;
+ public override void DrawForeground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ cr.Save ();
+ cr.Translate (
+ metrics.X + 0.5 + (metrics.Width - cache.errorPixbuf.Width) / 2,
+ metrics.Y + 0.5 + (metrics.Height - cache.errorPixbuf.Height) / 2
+ );
+ Gdk.CairoHelper.SetSourcePixbuf (
+ cr,
+ errors.Any (e => e.IsError) ? cache.errorPixbuf : cache.warningPixbuf, 0, 0);
+ cr.Paint ();
+ cr.Restore ();
+
+ }
- public void MouseHover (TextEditor editor, MarginMouseEventArgs args, TextLineMarkerHoverResult result)
+ public override bool DrawBackground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
{
- if (this.LineSegment == null)
- return;
- bool isOver = MouseIsOverMarker (editor, args);
- if (isOver != oldIsOver)
- editor.Document.CommitLineUpdate (this.LineSegment);
- oldIsOver = isOver;
-
- int errorNumber = MouseIsOverError (editor, args);
- if (errorNumber >= 0) {
- result.Cursor = null;
- if (!isOver)
- // don't show tooltip when hovering over error counter layout.
- result.TooltipMarkup = GLib.Markup.EscapeText (errors[errorNumber].ErrorMessage);
+ if (metrics.Margin is FoldMarkerMargin || metrics.Margin is GutterMargin || metrics.Margin is ActionMargin)
+ return DrawMarginBackground (editor, metrics.Margin, cr, metrics.Area, lineSegment, metrics.LineNumber, metrics.X, metrics.Y, metrics.Height);
+ if (metrics.Margin is IconMargin) {
+ DrawIconMarginBackground (editor, cr, metrics);
+ return true;
}
-
+ return false;
}
- #endregion
-
- public override void Draw (TextEditor editor, Cairo.Context g, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
- {
- var bounds = GetErrorCountBounds ();
- int errorCounterWidth = bounds.Item1;
- int eh = bounds.Item2;
-
- if (errorCounterWidth > 0)
- DrawMessageExtendIcon (editor, g, y, errorCounterWidth, eh);
+ bool DrawMarginBackground (TextEditor e, Margin margin, Cairo.Context cr, Cairo.Rectangle area, DocumentLine documentLine, long line, double x, double y, double lineHeight)
+ {
+ if (cache.CurrentSelectedTextMarker != null && cache.CurrentSelectedTextMarker != this)
+ return false;
+ cr.Rectangle (x, y, margin.Width, lineHeight);
+ cr.Color = LineColor.Color;
+ cr.Fill ();
+ return true;
}
- #region IExtendingTextMarker implementation
- public void Draw (TextEditor editor, Cairo.Context g, int lineNr, Cairo.Rectangle lineArea)
+
+ #endregion
+
+ #region text background
+
+ public override bool DrawBackground (TextEditor editor, Cairo.Context g, double y, LineMetrics metrics)
{
+ if (!IsVisible)
+ return false;
+ bool markerShouldDrawnAsHidden = cache.CurrentSelectedTextMarker != null && cache.CurrentSelectedTextMarker != this;
+
+ if (metrics.LineSegment.Markers.Any (m => m is DebugTextMarker))
+ return false;
+
EnsureLayoutCreated (editor);
- int lineNumber = editor.Document.OffsetToLineNumber (lineSegment.Offset);
- int errorNumber = lineNr - lineNumber;
- if (!IsCurrentErrorTextFitting ())
- errorNumber--;
double x = editor.TextViewMargin.XOffset;
- double y = lineArea.Y;
- double right = editor.Allocation.Width;
- int errorCounterWidth = GetErrorCountBounds ().Item1;
-// int eh = GetErrorCountBounds ().Item2;
-
- double x2 = System.Math.Max (right - LayoutWidth - border - (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) - errorCounterWidth, fitsInSameLine ? editor.TextViewMargin.XOffset + editor.LineHeight / 2 : editor.TextViewMargin.XOffset);
- if (errors.Count == 1)
- x2 = editor.TextViewMargin.XOffset;
-// bool isEolSelected = editor.IsSomethingSelected && editor.SelectionMode != SelectionMode.Block ? editor.SelectionRange.Contains (lineSegment.Offset + lineSegment.EditableLength) : false;
+ int right = editor.Allocation.Width;
+ bool isCaretInLine = metrics.TextStartOffset <= editor.Caret.Offset && editor.Caret.Offset <= metrics.TextEndOffset;
+ int errorCounterWidth = GetErrorCountBounds (metrics.Layout).Item1;
+
+ double x2 = System.Math.Max (right - LayoutWidth - border - (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) - errorCounterWidth, editor.TextViewMargin.XOffset + editor.LineHeight / 2);
+
+ bool isEolSelected = editor.IsSomethingSelected && editor.SelectionMode != Mono.TextEditor.SelectionMode.Block ? editor.SelectionRange.Contains (lineSegment.Offset + lineSegment.Length) : false;
+
int active = editor.Document.GetTextAt (lineSegment) == initialText ? 0 : 1;
- bool isCaretInLine = lineSegment.Offset <= editor.Caret.Offset && editor.Caret.Offset <= lineSegment.EndOffsetIncludingDelimiter;
- int highlighted = active == 0 && isCaretInLine ? 1 : 0;
- int selected = 0;
- var layout = layouts [errorNumber];
- x2 = right - LayoutWidth - border - (ShowIconsInBubble ? cache.errorPixbuf.Width : 0);
-
- x2 -= errorCounterWidth;
- x2 = System.Math.Max (x2, fitsInSameLine ? editor.TextViewMargin.XOffset + editor.LineHeight / 2 : editor.TextViewMargin.XOffset);
-
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y + editor.LineHeight));
- g.LineTo (new Cairo.PointD (right, y + editor.LineHeight));
- g.LineTo (new Cairo.PointD (right, y));
- g.ClosePath ();
- g.Color = colorMatrix [active, BOTTOM, LIGHT, highlighted, selected];
- g.Fill ();
-
- g.Color = colorMatrix [active, BOTTOM, LINE, highlighted, selected];
- g.MoveTo (new Cairo.PointD (x2 + 0.5, y));
- g.LineTo (new Cairo.PointD (x2 + 0.5, y + editor.LineHeight));
- if (errorNumber == errors.Count - 1)
- g.LineTo (new Cairo.PointD (lineArea.X + lineArea.Width, y + editor.LineHeight));
- g.Stroke ();
-
+ bool highlighted = active == 0 && isCaretInLine;
+
+ // draw background
+ if (!markerShouldDrawnAsHidden) {
+ DrawRectangle (g, x, y, right, editor.LineHeight);
+ g.Color = LineColor.Color;
+ g.Fill ();
+
+ if (metrics.Layout.StartSet || metrics.SelectionStart == metrics.TextEndOffset) {
+ double startX;
+ double endX;
+
+ if (metrics.SelectionStart != metrics.TextEndOffset) {
+ var start = metrics.Layout.Layout.IndexToPos ((int)metrics.Layout.SelectionStartIndex);
+ startX = (int)(start.X / Pango.Scale.PangoScale);
+ var end = metrics.Layout.Layout.IndexToPos ((int)metrics.Layout.SelectionEndIndex);
+ endX = (int)(end.X / Pango.Scale.PangoScale);
+ } else {
+ startX = x2;
+ endX = startX;
+ }
+
+ if (editor.MainSelection.SelectionMode == Mono.TextEditor.SelectionMode.Block && startX == endX)
+ endX = startX + 2;
+ startX += metrics.TextRenderStartPosition;
+ endX += metrics.TextRenderStartPosition;
+ startX = Math.Max (editor.TextViewMargin.XOffset, startX);
+ // clip region to textviewmargin start
+ if (isEolSelected)
+ endX = editor.Allocation.Width + (int)editor.HAdjustment.Value;
+ if (startX < endX) {
+ DrawRectangle (g, startX, y, endX - startX, editor.LineHeight);
+ g.Color = GetLineColor (highlighted, true);
+ g.Fill ();
+ }
+ }
+ DrawErrorMarkers (editor, g, metrics, y);
+ }
+
+ double y2 = y + 0.5;
+ double y2Bottom = y2 + editor.LineHeight - 1;
+ var selected = isEolSelected;
+ var lineTextPx = editor.TextViewMargin.XOffset + editor.TextViewMargin.TextStartPosition + metrics.Layout.PangoWidth / Pango.Scale.PangoScale;
+ if (x2 < lineTextPx)
+ x2 = lineTextPx;
+
if (editor.Options.ShowRuler) {
double divider = Math.Max (editor.TextViewMargin.XOffset, x + editor.TextViewMargin.RulerX);
if (divider >= x2) {
- g.MoveTo (new Cairo.PointD (divider + 0.5, y));
- g.LineTo (new Cairo.PointD (divider + 0.5, y + editor.LineHeight));
- g.Color = colorMatrix [active, BOTTOM, DARK, highlighted, selected];
+ g.MoveTo (new Cairo.PointD (divider + 0.5, y2));
+ g.LineTo (new Cairo.PointD (divider + 0.5, y2Bottom));
+ g.Color = GetLineColorBorder (highlighted, selected);
g.Stroke ();
}
}
- g.Save ();
- g.Translate (x2 + (ShowIconsInBubble ? cache.errorPixbuf.Width : 0) + border, y + (editor.LineHeight - layout.Height) / 2 + layout.Height % 2);
- g.Color = selected == 0 ? gc : cache.gcSelected;
- g.ShowLayout (layout.Layout);
- g.Restore ();
-
- if (ShowIconsInBubble) {
- var pixbuf = errors [errorNumber].IsError ? cache.errorPixbuf: cache.warningPixbuf;
- Gdk.CairoHelper.SetSourcePixbuf (g, pixbuf, x2, y + (editor.LineHeight - cache.errorPixbuf.Height) / 2);
- g.Paint ();
+
+ return true;
+ }
+
+ void DrawErrorMarkers (TextEditor editor, Cairo.Context g, LineMetrics metrics, double y)
+ {
+ uint curIndex = 0, byteIndex = 0;
+
+ var o = metrics.LineSegment.Offset;
+
+ foreach (var task in errors.Select (t => t.Task)) {
+ int index = (int)metrics.Layout.TranslateToUTF8Index ((uint)(task.Column - 1), ref curIndex, ref byteIndex);
+ var pos = metrics.Layout.Layout.IndexToPos (index);
+ var co = o + task.Column - 1;
+ g.Color = GetMarkerColor (false, metrics.SelectionStart <= co && co < metrics.SelectionEnd);
+ g.MoveTo (
+ metrics.TextRenderStartPosition + editor.TextViewMargin.TextStartPosition + pos.X / Pango.Scale.PangoScale,
+ y + editor.LineHeight - 3
+ );
+ g.RelLineTo (3, 3);
+ g.RelLineTo (-6, 0);
+ g.ClosePath ();
+
+ g.Fill ();
}
}
-
+
#endregion
-
}
}
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker_TextBackground.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker_TextBackground.cs
new file mode 100644
index 0000000..c977b74
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/MessageBubbleTextMarker_TextBackground.cs
@@ -0,0 +1,39 @@
+//
+// MessageBubbleTextMarker_TextBackground.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Mono.TextEditor;
+using System;
+using System.Linq;
+using MonoDevelop.Components;
+using MonoDevelop.Debugger;
+
+namespace MonoDevelop.SourceEditor
+{
+ partial class MessageBubbleTextMarker : IBackgroundMarker
+ {
+ }
+}
+
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs
index e524cd6..c90d425 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/PinnedWatchWidget.cs
@@ -33,6 +33,7 @@ using System.Collections.Generic;
using Mono.Debugging.Client;
using MonoDevelop.Core;
using MonoDevelop.Ide;
+using Gtk;
namespace MonoDevelop.SourceEditor
{
@@ -138,7 +139,13 @@ namespace MonoDevelop.SourceEditor
{
base.OnSizeAllocated (allocation);
}
-
+
+ const int defaultMaxHeight = 240;
+ protected override void OnSizeRequested (ref Requisition requisition)
+ {
+ base.OnSizeRequested (ref requisition);
+ requisition.Height = Math.Min (Math.Max (Allocation.Height, defaultMaxHeight), requisition.Height);
+ }
[GLib.ConnectBeforeAttribute]
void HandleValueTreeButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs
index 2c1e9aa..b5c3429 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs
@@ -172,7 +172,8 @@ namespace MonoDevelop.SourceEditor
//FireSearchPatternChanged ();
}
UpdateSearchPattern ();
-
+ SetSearchOptions ();
+
//searchEntry.Model = searchHistory;
searchEntry.Entry.KeyReleaseEvent += delegate {
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
index f844a53..0e963a8 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
@@ -69,6 +69,7 @@ namespace MonoDevelop.SourceEditor
TextLineMarker currentDebugLineMarker;
TextLineMarker debugStackLineMarker;
int lastDebugLine = -1;
+ BreakpointStore breakpoints;
EventHandler currentFrameChanged;
EventHandler<BreakpointEventArgs> breakpointAdded;
EventHandler<BreakpointEventArgs> breakpointRemoved;
@@ -187,57 +188,15 @@ namespace MonoDevelop.SourceEditor
breakpointStatusChanged = (EventHandler<BreakpointEventArgs>)DispatchService.GuiDispatch (new EventHandler<BreakpointEventArgs> (OnBreakpointStatusChanged));
widget = new SourceEditorWidget (this);
- widget.TextEditor.Document.SyntaxModeChanged += delegate(object sender, SyntaxModeChangeEventArgs e) {
- var oldProvider = e.OldMode as IQuickTaskProvider;
- if (oldProvider != null)
- widget.RemoveQuickTaskProvider (oldProvider);
- var newProvider = e.NewMode as IQuickTaskProvider;
- if (newProvider != null)
- widget.AddQuickTaskProvider (newProvider);
- };
- widget.TextEditor.Document.TextReplaced += delegate(object sender, DocumentChangeEventArgs args) {
- if (!inLoad) {
- if (widget.TextEditor.Document.IsInAtomicUndo) {
- wasEdited = true;
- } else {
- InformAutoSave ();
- }
- }
- int startIndex = args.Offset;
- int endIndex = startIndex + Math.Max (args.RemovalLength, args.InsertionLength);
- foreach (var marker in currentErrorMarkers) {
- if (marker.LineSegment.Contains (args.Offset) || marker.LineSegment.Contains (args.Offset + args.InsertionLength) || args.Offset < marker.LineSegment.Offset && marker.LineSegment.Offset < args.Offset + args.InsertionLength) {
- markersToRemove.Enqueue (marker);
- }
- }
- ResetRemoveMarker ();
- };
-
- widget.TextEditor.Document.LineChanged += delegate(object sender, LineEventArgs e) {
- UpdateBreakpoints ();
- UpdateWidgetPositions ();
- if (messageBubbleCache != null && messageBubbleCache.RemoveLine (e.Line)) {
- MessageBubbleTextMarker marker = currentErrorMarkers.FirstOrDefault (m => m.LineSegment == e.Line);
- if (marker != null) {
-
- widget.TextEditor.TextViewMargin.RemoveCachedLine (e.Line);
- // ensure that the line cache is renewed
- marker.GetLineHeight (widget.TextEditor);
- }
- }
- };
-
- widget.TextEditor.Document.BeginUndo += delegate {
- wasEdited = false;
- };
-
- widget.TextEditor.Document.EndUndo += delegate {
- if (wasEdited)
- InformAutoSave ();
- };
- widget.TextEditor.Document.Undone += (o, a) => AutoSave.InformAutoSaveThread (Document);
- widget.TextEditor.Document.Redone += (o, a) => AutoSave.InformAutoSaveThread (Document);
-
+ widget.TextEditor.Document.SyntaxModeChanged += HandleSyntaxModeChanged;
+ widget.TextEditor.Document.TextReplaced += HandleTextReplaced;
+ widget.TextEditor.Document.LineChanged += HandleLineChanged;
+
+ widget.TextEditor.Document.BeginUndo += HandleBeginUndo;
+ widget.TextEditor.Document.EndUndo += HandleEndUndo;
+ widget.TextEditor.Document.Undone += HandleUndone;
+ widget.TextEditor.Document.Redone += HandleUndone;
+
widget.TextEditor.Document.TextReplacing += OnTextReplacing;
widget.TextEditor.Document.TextReplaced += OnTextReplaced;
widget.TextEditor.Document.ReadOnlyCheckDelegate = CheckReadOnly;
@@ -246,10 +205,7 @@ namespace MonoDevelop.SourceEditor
// this.IsDirty = Document.IsDirty;
// };
- widget.TextEditor.Caret.PositionChanged += delegate {
- OnCaretPositionSet (EventArgs.Empty);
- FireCompletionContextChanged ();
- };
+ widget.TextEditor.Caret.PositionChanged += HandlePositionChanged;
widget.TextEditor.IconMargin.ButtonPressed += OnIconButtonPress;
debugStackLineMarker = new DebugStackLineTextMarker (widget.TextEditor);
@@ -268,14 +224,15 @@ namespace MonoDevelop.SourceEditor
TextEditorService.FileExtensionAdded += HandleFileExtensionAdded;
TextEditorService.FileExtensionRemoved += HandleFileExtensionRemoved;
+ breakpoints = DebuggingService.Breakpoints;
DebuggingService.DebugSessionStarted += OnDebugSessionStarted;
DebuggingService.CurrentFrameChanged += currentFrameChanged;
DebuggingService.StoppedEvent += currentFrameChanged;
DebuggingService.ResumedEvent += currentFrameChanged;
- DebuggingService.Breakpoints.BreakpointAdded += breakpointAdded;
- DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemoved;
- DebuggingService.Breakpoints.BreakpointStatusChanged += breakpointStatusChanged;
- DebuggingService.Breakpoints.BreakpointModified += breakpointStatusChanged;
+ breakpoints.BreakpointAdded += breakpointAdded;
+ breakpoints.BreakpointRemoved += breakpointRemoved;
+ breakpoints.BreakpointStatusChanged += breakpointStatusChanged;
+ breakpoints.BreakpointModified += breakpointStatusChanged;
DebuggingService.PinnedWatches.WatchAdded += OnWatchAdded;
DebuggingService.PinnedWatches.WatchRemoved += OnWatchRemoved;
DebuggingService.PinnedWatches.WatchChanged += OnWatchChanged;
@@ -291,6 +248,73 @@ namespace MonoDevelop.SourceEditor
FileRegistry.Add (this);
}
+ void HandleLineChanged (object sender, LineEventArgs e)
+ {
+ UpdateBreakpoints ();
+ UpdateWidgetPositions ();
+ if (messageBubbleCache != null && messageBubbleCache.RemoveLine (e.Line)) {
+ MessageBubbleTextMarker marker = currentErrorMarkers.FirstOrDefault (m => m.LineSegment == e.Line);
+ if (marker != null) {
+ widget.TextEditor.TextViewMargin.RemoveCachedLine (e.Line);
+ // ensure that the line cache is renewed
+ marker.GetLineHeight (widget.TextEditor);
+ }
+ }
+ }
+
+ void HandleTextReplaced (object sender, DocumentChangeEventArgs args)
+ {
+ if (!inLoad) {
+ if (widget.TextEditor.Document.IsInAtomicUndo) {
+ wasEdited = true;
+ }
+ else {
+ InformAutoSave ();
+ }
+ }
+ int startIndex = args.Offset;
+ int endIndex = startIndex + Math.Max (args.RemovalLength, args.InsertionLength);
+ foreach (var marker in currentErrorMarkers) {
+ if (marker.LineSegment.Contains (args.Offset) || marker.LineSegment.Contains (args.Offset + args.InsertionLength) || args.Offset < marker.LineSegment.Offset && marker.LineSegment.Offset < args.Offset + args.InsertionLength) {
+ markersToRemove.Enqueue (marker);
+ }
+ }
+ ResetRemoveMarker ();
+ }
+
+ void HandleSyntaxModeChanged (object sender, SyntaxModeChangeEventArgs e)
+ {
+ var oldProvider = e.OldMode as IQuickTaskProvider;
+ if (oldProvider != null)
+ widget.RemoveQuickTaskProvider (oldProvider);
+ var newProvider = e.NewMode as IQuickTaskProvider;
+ if (newProvider != null)
+ widget.AddQuickTaskProvider (newProvider);
+ }
+
+
+ void HandleEndUndo (object sender, TextDocument.UndoOperationEventArgs e)
+ {
+ if (wasEdited)
+ InformAutoSave ();
+ }
+
+ void HandleBeginUndo (object sender, EventArgs e)
+ {
+ wasEdited = false;
+ }
+
+ void HandleUndone (object sender, TextDocument.UndoOperationEventArgs e)
+ {
+ AutoSave.InformAutoSaveThread (Document);
+ }
+
+ void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
+ {
+ OnCaretPositionSet (EventArgs.Empty);
+ FireCompletionContextChanged ();
+ }
+
void HandleFileExtensionRemoved (object sender, FileExtensionEventArgs args)
{
if (ContentName == null || args.Extension.File.FullPath != Path.GetFullPath (ContentName))
@@ -474,7 +498,7 @@ namespace MonoDevelop.SourceEditor
widget.UpdateLineCol ();
}
- MessageBubbleHighlightPopupWindow messageBubbleHighlightPopupWindow = null;
+ // MessageBubbleHighlightPopupWindow messageBubbleHighlightPopupWindow = null;
void HandleWidgetTextEditorOptionsChanged (object sender, EventArgs e)
{
@@ -497,8 +521,8 @@ namespace MonoDevelop.SourceEditor
marker.SetPrimaryError (task.Description);
if (TextEditor != null && TextEditor.IsComposited) {
- if (messageBubbleHighlightPopupWindow != null)
- messageBubbleHighlightPopupWindow.Destroy ();
+ /*if (messageBubbleHighlightPopupWindow != null)
+ messageBubbleHighlightPopupWindow.Destroy ();*/
/* messageBubbleHighlightPopupWindow = new MessageBubbleHighlightPopupWindow (this, marker);
messageBubbleHighlightPopupWindow.Destroyed += delegate {
messageBubbleHighlightPopupWindow = null;
@@ -548,7 +572,7 @@ namespace MonoDevelop.SourceEditor
continue;
var marker = currentErrorMarkers.FirstOrDefault (m => m.LineSegment == lineSegment);
if (marker != null) {
- marker.AddError (task.Severity == TaskSeverity.Error, task.Description);
+ marker.AddError (task, task.Severity == TaskSeverity.Error, task.Description);
continue;
}
MessageBubbleTextMarker errorTextMarker = new MessageBubbleTextMarker (messageBubbleCache, task, lineSegment, task.Severity == TaskSeverity.Error, task.Description);
@@ -567,8 +591,8 @@ namespace MonoDevelop.SourceEditor
//the window has a reference to the markers we're destroying
//so if the error markers get cleared out while it's running, its expose will
//NRE and bring down MD
- if (messageBubbleHighlightPopupWindow != null)
- messageBubbleHighlightPopupWindow.Destroy ();
+ /*if (messageBubbleHighlightPopupWindow != null)
+ messageBubbleHighlightPopupWindow.Destroy ();*/
currentErrorMarkers.ForEach (em => {
widget.Document.RemoveMarker (em);
@@ -597,8 +621,7 @@ namespace MonoDevelop.SourceEditor
AutoSave.RemoveAutoSaveFile (ContentName);
if (ContentName != fileName) {
- if (!FileService.RequestFileEdit (fileName))
- return;
+ FileService.RequestFileEdit (fileName);
writeAllowed = true;
writeAccessChecked = true;
}
@@ -821,14 +844,14 @@ namespace MonoDevelop.SourceEditor
LoadExtensions ();
this.IsDirty = !didLoadCleanly;
UpdateTasks (null, null);
- widget.TextEditor.VAdjustment.Changed += HandleTextEditorVAdjustmentChanged;
+ widget.TextEditor.SizeAllocated += HandleTextEditorVAdjustmentChanged;
if (didLoadCleanly)
Document.InformLoadComplete ();
}
void HandleTextEditorVAdjustmentChanged (object sender, EventArgs e)
{
- widget.TextEditor.VAdjustment.Changed -= HandleTextEditorVAdjustmentChanged;
+ widget.TextEditor.SizeAllocated -= HandleTextEditorVAdjustmentChanged;
LoadSettings ();
}
@@ -947,8 +970,8 @@ namespace MonoDevelop.SourceEditor
this.isDisposed = true;
Counters.LoadedEditors--;
- if (messageBubbleHighlightPopupWindow != null)
- messageBubbleHighlightPopupWindow.Destroy ();
+ /* if (messageBubbleHighlightPopupWindow != null)
+ messageBubbleHighlightPopupWindow.Destroy ();*/
IdeApp.Preferences.DefaultHideMessageBubblesChanged -= HandleIdeAppPreferencesDefaultHideMessageBubblesChanged;
IdeApp.Preferences.ShowMessageBubblesChanged -= HandleIdeAppPreferencesShowMessageBubblesChanged;
@@ -958,6 +981,15 @@ namespace MonoDevelop.SourceEditor
ClipbardRingUpdated -= UpdateClipboardRing;
+ widget.TextEditor.Document.SyntaxModeChanged -= HandleSyntaxModeChanged;
+ widget.TextEditor.Document.TextReplaced -= HandleTextReplaced;
+ widget.TextEditor.Document.LineChanged -= HandleLineChanged;
+ widget.TextEditor.Document.BeginUndo -= HandleBeginUndo;
+ widget.TextEditor.Document.EndUndo -= HandleEndUndo;
+ widget.TextEditor.Document.Undone -= HandleUndone;
+ widget.TextEditor.Document.Redone -= HandleUndone;
+ widget.TextEditor.Caret.PositionChanged -= HandlePositionChanged;
+ widget.TextEditor.IconMargin.ButtonPressed -= OnIconButtonPress;
widget.TextEditor.Document.TextReplacing -= OnTextReplacing;
widget.TextEditor.Document.TextReplaced -= OnTextReplaced;
widget.TextEditor.Document.ReadOnlyCheckDelegate = null;
@@ -970,10 +1002,10 @@ namespace MonoDevelop.SourceEditor
DebuggingService.CurrentFrameChanged -= currentFrameChanged;
DebuggingService.StoppedEvent -= currentFrameChanged;
DebuggingService.ResumedEvent -= currentFrameChanged;
- DebuggingService.Breakpoints.BreakpointAdded -= breakpointAdded;
- DebuggingService.Breakpoints.BreakpointRemoved -= breakpointRemoved;
- DebuggingService.Breakpoints.BreakpointStatusChanged -= breakpointStatusChanged;
- DebuggingService.Breakpoints.BreakpointModified -= breakpointStatusChanged;
+ breakpoints.BreakpointAdded -= breakpointAdded;
+ breakpoints.BreakpointRemoved -= breakpointRemoved;
+ breakpoints.BreakpointStatusChanged -= breakpointStatusChanged;
+ breakpoints.BreakpointModified -= breakpointStatusChanged;
DebuggingService.PinnedWatches.WatchAdded -= OnWatchAdded;
DebuggingService.PinnedWatches.WatchRemoved -= OnWatchRemoved;
DebuggingService.PinnedWatches.WatchChanged -= OnWatchChanged;
@@ -1012,7 +1044,7 @@ namespace MonoDevelop.SourceEditor
{
if (!writeAccessChecked && !IsUntitled) {
writeAccessChecked = true;
- writeAllowed = FileService.RequestFileEdit (ContentName);
+ writeAllowed = FileService.RequestFileEdit (ContentName, false);
}
return IsUntitled || writeAllowed;
}
@@ -1212,15 +1244,18 @@ namespace MonoDevelop.SourceEditor
if (!forceUpdate) {
int i = 0, count = 0;
bool mismatch = false;
- foreach (Breakpoint bp in DebuggingService.Breakpoints.GetBreakpointsAtFile (fp.FullPath)) {
- count++;
- if (i < breakpointSegments.Count) {
- int lineNumber = widget.TextEditor.Document.OffsetToLineNumber (breakpointSegments [i].Offset);
- if (lineNumber != bp.Line) {
- mismatch = true;
- break;
+
+ lock (breakpoints) {
+ foreach (var bp in breakpoints.GetBreakpointsAtFile (fp.FullPath)) {
+ count++;
+ if (i < breakpointSegments.Count) {
+ int lineNumber = widget.TextEditor.Document.OffsetToLineNumber (breakpointSegments [i].Offset);
+ if (lineNumber != bp.Line) {
+ mismatch = true;
+ break;
+ }
+ i++;
}
- i++;
}
}
@@ -1240,9 +1275,12 @@ namespace MonoDevelop.SourceEditor
}
breakpointSegments.Clear ();
- foreach (Breakpoint bp in DebuggingService.Breakpoints.GetBreakpointsAtFile (fp.FullPath)) {
- lineNumbers.Add (bp.Line);
- AddBreakpoint (bp);
+
+ lock (breakpoints) {
+ foreach (Breakpoint bp in breakpoints.GetBreakpointsAtFile (fp.FullPath)) {
+ lineNumbers.Add (bp.Line);
+ AddBreakpoint (bp);
+ }
}
foreach (int lineNumber in lineNumbers) {
@@ -1344,7 +1382,8 @@ namespace MonoDevelop.SourceEditor
if (args.LineSegment != null) {
int column = TextEditor.Caret.Line == args.LineNumber ? TextEditor.Caret.Column : 1;
- DebuggingService.Breakpoints.Toggle (this.Document.FileName, args.LineNumber, column);
+ lock (breakpoints)
+ breakpoints.Toggle (this.Document.FileName, args.LineNumber, column);
}
}
}
@@ -1781,8 +1820,16 @@ namespace MonoDevelop.SourceEditor
{
if (data == null || data.Document == null)
return;
+
int triggerOffset = ctx.TriggerOffset;
int length = String.IsNullOrEmpty (partial_word) ? 0 : partial_word.Length;
+
+ // for named arguments invoke(arg:<Expr>);
+ if (complete_word.EndsWith (":", StringComparison.Ordinal)) {
+ if (data.GetCharAt (triggerOffset + length) == ':')
+ length++;
+ }
+
bool blockMode = false;
if (data.IsSomethingSelected) {
blockMode = data.MainSelection.SelectionMode == Mono.TextEditor.SelectionMode.Block;
diff --git a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
index c0f3c4f..e4cf2ee 100644
--- a/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
@@ -44,8 +44,8 @@ using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Ide.TypeSystem;
using Mono.TextEditor.Highlighting;
using MonoDevelop.SourceEditor.QuickTasks;
-using ICSharpCode.NRefactory.CSharp;
using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Refactoring;
namespace MonoDevelop.SourceEditor
{
@@ -236,9 +236,11 @@ namespace MonoDevelop.SourceEditor
void FancyFeaturesChanged (object sender, EventArgs e)
{
if (QuickTaskStrip.EnableFancyFeatures) {
+ GtkWorkarounds.SetOverlayScrollbarPolicy (scrolledWindow, PolicyType.Automatic, PolicyType.Never);
scrolledWindow.VScrollbar.SizeRequested += SuppressSize;
scrolledWindow.VScrollbar.ExposeEvent += SuppressExpose;
} else {
+ GtkWorkarounds.SetOverlayScrollbarPolicy (scrolledWindow, PolicyType.Automatic, PolicyType.Automatic);
scrolledWindow.VScrollbar.SizeRequested -= SuppressSize;
scrolledWindow.VScrollbar.ExposeEvent -= SuppressExpose;
}
@@ -377,7 +379,8 @@ namespace MonoDevelop.SourceEditor
this.lastActiveEditor = null;
this.splittedTextEditor = null;
view = null;
-
+ parsedDocument = null;
+
// IdeApp.Workbench.StatusBar.ClearCaretState ();
if (parseInformationUpdaterWorkerThread != null) {
parseInformationUpdaterWorkerThread.Dispose ();
@@ -1044,6 +1047,9 @@ namespace MonoDevelop.SourceEditor
public void Reload ()
{
try {
+ if (!System.IO.File.Exists (view.ContentName))
+ return;
+
view.StoreSettings ();
reloadSettings = true;
view.Load (view.ContentName);
@@ -1634,11 +1640,11 @@ namespace MonoDevelop.SourceEditor
}
}
- public override void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
+ public override void Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
Color = Info.ErrorType == ErrorType.Warning ? editor.ColorStyle.UnderlineWarning.Color : editor.ColorStyle.UnderlineError.Color;
- base.Draw (editor, cr, layout, selected, startOffset, endOffset, y, startXPos, endXPos);
+ base.Draw (editor, cr, y, metrics);
}
}
}
diff --git a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel.cs b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel.cs
new file mode 100644
index 0000000..2ec1f37
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel.cs
@@ -0,0 +1,197 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.SourceEditor.OptionPanels
+{
+ internal partial class CompletionAppearancePanel
+ {
+ private global::Gtk.VBox vbox1;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.Label label2;
+ private global::Gtk.SpinButton spinbutton1;
+ private global::Gtk.Label label3;
+ private global::Gtk.Alignment alignment3;
+ private global::Gtk.VBox vbox5;
+ private global::Gtk.CheckButton filterByBrowsableCheckbutton;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Fixed fixed1;
+ private global::Gtk.RadioButton normalOnlyRadiobutton;
+ private global::Gtk.Alignment alignment1;
+ private global::Gtk.Label label4;
+ private global::Gtk.HBox hbox3;
+ private global::Gtk.Fixed fixed2;
+ private global::Gtk.RadioButton includeAdvancedRadiobutton;
+ private global::Gtk.Alignment alignment2;
+ private global::Gtk.Label label5;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel";
+ // Container child MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel.Gtk.Container+ContainerChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 6;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Completion list has");
+ this.hbox1.Add (this.label2);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2]));
+ w1.Position = 0;
+ w1.Expand = false;
+ w1.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.spinbutton1 = new global::Gtk.SpinButton (0, 100, 1);
+ this.spinbutton1.CanFocus = true;
+ this.spinbutton1.Name = "spinbutton1";
+ this.spinbutton1.Adjustment.PageIncrement = 10;
+ this.spinbutton1.ClimbRate = 1;
+ this.spinbutton1.Numeric = true;
+ this.hbox1.Add (this.spinbutton1);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinbutton1]));
+ w2.Position = 1;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label3 = new global::Gtk.Label ();
+ this.label3.Name = "label3";
+ this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("rows");
+ this.hbox1.Add (this.label3);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label3]));
+ w3.Position = 2;
+ w3.Expand = false;
+ w3.Fill = false;
+ this.vbox1.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.alignment3 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment3.Name = "alignment3";
+ this.alignment3.LeftPadding = ((uint)(12));
+ // Container child alignment3.Gtk.Container+ContainerChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.filterByBrowsableCheckbutton = new global::Gtk.CheckButton ();
+ this.filterByBrowsableCheckbutton.CanFocus = true;
+ this.filterByBrowsableCheckbutton.Name = "filterByBrowsableCheckbutton";
+ this.filterByBrowsableCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Filter members by [EditorBrowsable] attribute");
+ this.filterByBrowsableCheckbutton.Active = true;
+ this.filterByBrowsableCheckbutton.DrawIndicator = true;
+ this.filterByBrowsableCheckbutton.UseUnderline = true;
+ this.vbox5.Add (this.filterByBrowsableCheckbutton);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.filterByBrowsableCheckbutton]));
+ w5.Position = 0;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.fixed1 = new global::Gtk.Fixed ();
+ this.fixed1.Name = "fixed1";
+ this.fixed1.HasWindow = false;
+ this.hbox2.Add (this.fixed1);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.fixed1]));
+ w6.Position = 0;
+ w6.Expand = false;
+ w6.Padding = ((uint)(6));
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.normalOnlyRadiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("_Show Normal members only"));
+ this.normalOnlyRadiobutton.CanFocus = true;
+ this.normalOnlyRadiobutton.Name = "normalOnlyRadiobutton";
+ this.normalOnlyRadiobutton.DrawIndicator = true;
+ this.normalOnlyRadiobutton.UseUnderline = true;
+ this.normalOnlyRadiobutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.hbox2.Add (this.normalOnlyRadiobutton);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.normalOnlyRadiobutton]));
+ w7.Position = 1;
+ this.vbox5.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.hbox2]));
+ w8.Position = 1;
+ w8.Expand = false;
+ w8.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment1.Name = "alignment1";
+ this.alignment1.LeftPadding = ((uint)(38));
+ // Container child alignment1.Gtk.Container+ContainerChild
+ this.label4 = new global::Gtk.Label ();
+ this.label4.Name = "label4";
+ this.label4.Xalign = 0F;
+ this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("<i>EditorBrowsableState.Always</i>");
+ this.label4.UseMarkup = true;
+ this.alignment1.Add (this.label4);
+ this.vbox5.Add (this.alignment1);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.alignment1]));
+ w10.Position = 2;
+ w10.Expand = false;
+ w10.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.hbox3 = new global::Gtk.HBox ();
+ this.hbox3.Name = "hbox3";
+ this.hbox3.Spacing = 6;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.fixed2 = new global::Gtk.Fixed ();
+ this.fixed2.Name = "fixed2";
+ this.fixed2.HasWindow = false;
+ this.hbox3.Add (this.fixed2);
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.fixed2]));
+ w11.Position = 0;
+ w11.Expand = false;
+ w11.Padding = ((uint)(6));
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.includeAdvancedRadiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("Show Normal and _Advanced members"));
+ this.includeAdvancedRadiobutton.CanFocus = true;
+ this.includeAdvancedRadiobutton.Name = "includeAdvancedRadiobutton";
+ this.includeAdvancedRadiobutton.DrawIndicator = true;
+ this.includeAdvancedRadiobutton.UseUnderline = true;
+ this.includeAdvancedRadiobutton.Group = this.normalOnlyRadiobutton.Group;
+ this.hbox3.Add (this.includeAdvancedRadiobutton);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.includeAdvancedRadiobutton]));
+ w12.Position = 1;
+ this.vbox5.Add (this.hbox3);
+ global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.hbox3]));
+ w13.Position = 3;
+ w13.Expand = false;
+ w13.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.alignment2 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment2.Name = "alignment2";
+ this.alignment2.LeftPadding = ((uint)(38));
+ // Container child alignment2.Gtk.Container+ContainerChild
+ this.label5 = new global::Gtk.Label ();
+ this.label5.Name = "label5";
+ this.label5.Xalign = 0F;
+ this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("<i>EditorBrowsableState.Always and EditorBrowsableState.Advanced</i>");
+ this.label5.UseMarkup = true;
+ this.alignment2.Add (this.label5);
+ this.vbox5.Add (this.alignment2);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.alignment2]));
+ w15.Position = 4;
+ w15.Expand = false;
+ w15.Fill = false;
+ this.alignment3.Add (this.vbox5);
+ this.vbox1.Add (this.alignment3);
+ global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment3]));
+ w17.Position = 1;
+ w17.Expand = false;
+ w17.Fill = false;
+ this.Add (this.vbox1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel.cs b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel.cs
new file mode 100644
index 0000000..44edca2
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel.cs
@@ -0,0 +1,195 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.SourceEditor.OptionPanels
+{
+ internal partial class CompletionOptionsPanel
+ {
+ private global::Gtk.VBox vbox1;
+ private global::Gtk.CheckButton codeCompletioncheckbutton;
+ private global::Gtk.CheckButton enableParameterInsightCheckbutton;
+ private global::Gtk.Label GtkLabel14;
+ private global::Gtk.Alignment alignment3;
+ private global::Gtk.VBox vbox5;
+ private global::Gtk.CheckButton autoCodeCompletionCheckbutton;
+ private global::Gtk.CheckButton showImportsCheckbutton;
+ private global::Gtk.CheckButton includeKeywordsCheckbutton;
+ private global::Gtk.CheckButton insertParenthesesCheckbutton;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Fixed fixed1;
+ private global::Gtk.RadioButton openingRadiobutton;
+ private global::Gtk.HBox hbox3;
+ private global::Gtk.Fixed fixed2;
+ private global::Gtk.RadioButton bothRadiobutton;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel";
+ // Container child MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel.Gtk.Container+ContainerChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 6;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.codeCompletioncheckbutton = new global::Gtk.CheckButton ();
+ this.codeCompletioncheckbutton.CanFocus = true;
+ this.codeCompletioncheckbutton.Name = "codeCompletioncheckbutton";
+ this.codeCompletioncheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Enable code completion");
+ this.codeCompletioncheckbutton.DrawIndicator = true;
+ this.codeCompletioncheckbutton.UseUnderline = true;
+ this.vbox1.Add (this.codeCompletioncheckbutton);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.codeCompletioncheckbutton]));
+ w1.Position = 0;
+ w1.Expand = false;
+ w1.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.enableParameterInsightCheckbutton = new global::Gtk.CheckButton ();
+ this.enableParameterInsightCheckbutton.CanFocus = true;
+ this.enableParameterInsightCheckbutton.Name = "enableParameterInsightCheckbutton";
+ this.enableParameterInsightCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Enable _parameter insight");
+ this.enableParameterInsightCheckbutton.Active = true;
+ this.enableParameterInsightCheckbutton.DrawIndicator = true;
+ this.enableParameterInsightCheckbutton.UseUnderline = true;
+ this.vbox1.Add (this.enableParameterInsightCheckbutton);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.enableParameterInsightCheckbutton]));
+ w2.Position = 1;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.GtkLabel14 = new global::Gtk.Label ();
+ this.GtkLabel14.Name = "GtkLabel14";
+ this.GtkLabel14.Xalign = 0F;
+ this.GtkLabel14.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Behavior</b>");
+ this.GtkLabel14.UseMarkup = true;
+ this.vbox1.Add (this.GtkLabel14);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.GtkLabel14]));
+ w3.Position = 2;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.alignment3 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
+ this.alignment3.Name = "alignment3";
+ this.alignment3.LeftPadding = ((uint)(12));
+ // Container child alignment3.Gtk.Container+ContainerChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.autoCodeCompletionCheckbutton = new global::Gtk.CheckButton ();
+ this.autoCodeCompletionCheckbutton.CanFocus = true;
+ this.autoCodeCompletionCheckbutton.Name = "autoCodeCompletionCheckbutton";
+ this.autoCodeCompletionCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Show completion list after a character is typed");
+ this.autoCodeCompletionCheckbutton.DrawIndicator = true;
+ this.autoCodeCompletionCheckbutton.UseUnderline = true;
+ this.vbox5.Add (this.autoCodeCompletionCheckbutton);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.autoCodeCompletionCheckbutton]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.showImportsCheckbutton = new global::Gtk.CheckButton ();
+ this.showImportsCheckbutton.CanFocus = true;
+ this.showImportsCheckbutton.Name = "showImportsCheckbutton";
+ this.showImportsCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Show import items");
+ this.showImportsCheckbutton.DrawIndicator = true;
+ this.showImportsCheckbutton.UseUnderline = true;
+ this.vbox5.Add (this.showImportsCheckbutton);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.showImportsCheckbutton]));
+ w5.Position = 1;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.includeKeywordsCheckbutton = new global::Gtk.CheckButton ();
+ this.includeKeywordsCheckbutton.CanFocus = true;
+ this.includeKeywordsCheckbutton.Name = "includeKeywordsCheckbutton";
+ this.includeKeywordsCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Include _keywords in completion list");
+ this.includeKeywordsCheckbutton.DrawIndicator = true;
+ this.includeKeywordsCheckbutton.UseUnderline = true;
+ this.vbox5.Add (this.includeKeywordsCheckbutton);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.includeKeywordsCheckbutton]));
+ w6.Position = 2;
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.insertParenthesesCheckbutton = new global::Gtk.CheckButton ();
+ this.insertParenthesesCheckbutton.CanFocus = true;
+ this.insertParenthesesCheckbutton.Name = "insertParenthesesCheckbutton";
+ this.insertParenthesesCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("A_utomatically insert parentheses after completion:");
+ this.insertParenthesesCheckbutton.DrawIndicator = true;
+ this.insertParenthesesCheckbutton.UseUnderline = true;
+ this.vbox5.Add (this.insertParenthesesCheckbutton);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.insertParenthesesCheckbutton]));
+ w7.Position = 3;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.fixed1 = new global::Gtk.Fixed ();
+ this.fixed1.Name = "fixed1";
+ this.fixed1.HasWindow = false;
+ this.hbox2.Add (this.fixed1);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.fixed1]));
+ w8.Position = 0;
+ w8.Expand = false;
+ w8.Padding = ((uint)(6));
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.openingRadiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("_Opening only"));
+ this.openingRadiobutton.CanFocus = true;
+ this.openingRadiobutton.Name = "openingRadiobutton";
+ this.openingRadiobutton.DrawIndicator = true;
+ this.openingRadiobutton.UseUnderline = true;
+ this.openingRadiobutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.hbox2.Add (this.openingRadiobutton);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.openingRadiobutton]));
+ w9.Position = 1;
+ this.vbox5.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.hbox2]));
+ w10.Position = 4;
+ w10.Expand = false;
+ w10.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.hbox3 = new global::Gtk.HBox ();
+ this.hbox3.Name = "hbox3";
+ this.hbox3.Spacing = 6;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.fixed2 = new global::Gtk.Fixed ();
+ this.fixed2.Name = "fixed2";
+ this.fixed2.HasWindow = false;
+ this.hbox3.Add (this.fixed2);
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.fixed2]));
+ w11.Position = 0;
+ w11.Expand = false;
+ w11.Padding = ((uint)(6));
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.bothRadiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("_Both opening and closing"));
+ this.bothRadiobutton.CanFocus = true;
+ this.bothRadiobutton.Name = "bothRadiobutton";
+ this.bothRadiobutton.DrawIndicator = true;
+ this.bothRadiobutton.UseUnderline = true;
+ this.bothRadiobutton.Group = this.openingRadiobutton.Group;
+ this.hbox3.Add (this.bothRadiobutton);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.bothRadiobutton]));
+ w12.Position = 1;
+ this.vbox5.Add (this.hbox3);
+ global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.hbox3]));
+ w13.Position = 5;
+ w13.Expand = false;
+ w13.Fill = false;
+ this.alignment3.Add (this.vbox5);
+ this.vbox1.Add (this.alignment3);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment3]));
+ w15.Position = 3;
+ w15.Expand = false;
+ w15.Fill = false;
+ this.Add (this.vbox1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel.cs b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel.cs
index adcffb4..ce798ea 100644
--- a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel.cs
+++ b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel.cs
@@ -8,18 +8,8 @@ namespace MonoDevelop.SourceEditor.OptionPanels
private global::Gtk.Label GtkLabel13;
private global::Gtk.Alignment alignment2;
private global::Gtk.VBox vbox4;
- private global::Gtk.CheckButton codeCompletioncheckbutton;
- private global::Gtk.HBox hbox2;
- private global::Gtk.Fixed fixed1;
- private global::Gtk.CheckButton autoCodeCompletionCheckbutton;
private global::Gtk.HBox hbox3;
private global::Gtk.Fixed fixed2;
- private global::Gtk.HBox hbox4;
- private global::Gtk.Fixed fixed3;
- private global::Gtk.CheckButton enableParameterInsightCheckbutton;
- private global::Gtk.HBox hbox5;
- private global::Gtk.Fixed fixed4;
- private global::Gtk.CheckButton hideObsoleteItemsCheckbutton;
private global::Gtk.HBox hbox1;
private global::Gtk.Label label1;
private global::Gtk.ComboBox comboboxLineEndings;
@@ -33,7 +23,7 @@ namespace MonoDevelop.SourceEditor.OptionPanels
private global::Gtk.Alignment alignment4;
private global::Gtk.VBox vbox6;
private global::Gtk.CheckButton antiAliasingCheckbutton;
-
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -64,46 +54,6 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.vbox4.Name = "vbox4";
this.vbox4.Spacing = 6;
// Container child vbox4.Gtk.Box+BoxChild
- this.codeCompletioncheckbutton = new global::Gtk.CheckButton ();
- this.codeCompletioncheckbutton.CanFocus = true;
- this.codeCompletioncheckbutton.Name = "codeCompletioncheckbutton";
- this.codeCompletioncheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Enable _code completion");
- this.codeCompletioncheckbutton.DrawIndicator = true;
- this.codeCompletioncheckbutton.UseUnderline = true;
- this.vbox4.Add (this.codeCompletioncheckbutton);
- global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.codeCompletioncheckbutton]));
- w2.Position = 0;
- w2.Expand = false;
- w2.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.hbox2 = new global::Gtk.HBox ();
- this.hbox2.Name = "hbox2";
- this.hbox2.Spacing = 6;
- // Container child hbox2.Gtk.Box+BoxChild
- this.fixed1 = new global::Gtk.Fixed ();
- this.fixed1.Name = "fixed1";
- this.fixed1.HasWindow = false;
- this.hbox2.Add (this.fixed1);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.fixed1]));
- w3.Position = 0;
- w3.Expand = false;
- w3.Padding = ((uint)(6));
- // Container child hbox2.Gtk.Box+BoxChild
- this.autoCodeCompletionCheckbutton = new global::Gtk.CheckButton ();
- this.autoCodeCompletionCheckbutton.CanFocus = true;
- this.autoCodeCompletionCheckbutton.Name = "autoCodeCompletionCheckbutton";
- this.autoCodeCompletionCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Aggressively trigger code completion list");
- this.autoCodeCompletionCheckbutton.DrawIndicator = true;
- this.autoCodeCompletionCheckbutton.UseUnderline = true;
- this.hbox2.Add (this.autoCodeCompletionCheckbutton);
- global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.autoCodeCompletionCheckbutton]));
- w4.Position = 1;
- this.vbox4.Add (this.hbox2);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
- w5.Position = 1;
- w5.Expand = false;
- w5.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
this.hbox3 = new global::Gtk.HBox ();
this.hbox3.Name = "hbox3";
this.hbox3.Spacing = 6;
@@ -112,72 +62,15 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.fixed2.Name = "fixed2";
this.fixed2.HasWindow = false;
this.hbox3.Add (this.fixed2);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.fixed2]));
- w6.Position = 0;
- w6.Expand = false;
- w6.Padding = ((uint)(6));
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.fixed2]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Padding = ((uint)(6));
this.vbox4.Add (this.hbox3);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox3]));
- w7.Position = 2;
- w7.Expand = false;
- w7.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.hbox4 = new global::Gtk.HBox ();
- this.hbox4.Name = "hbox4";
- this.hbox4.Spacing = 6;
- // Container child hbox4.Gtk.Box+BoxChild
- this.fixed3 = new global::Gtk.Fixed ();
- this.fixed3.Name = "fixed3";
- this.fixed3.HasWindow = false;
- this.hbox4.Add (this.fixed3);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.fixed3]));
- w8.Position = 0;
- w8.Expand = false;
- w8.Padding = ((uint)(6));
- // Container child hbox4.Gtk.Box+BoxChild
- this.enableParameterInsightCheckbutton = new global::Gtk.CheckButton ();
- this.enableParameterInsightCheckbutton.CanFocus = true;
- this.enableParameterInsightCheckbutton.Name = "enableParameterInsightCheckbutton";
- this.enableParameterInsightCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Enable _parameter insight");
- this.enableParameterInsightCheckbutton.Active = true;
- this.enableParameterInsightCheckbutton.DrawIndicator = true;
- this.enableParameterInsightCheckbutton.UseUnderline = true;
- this.hbox4.Add (this.enableParameterInsightCheckbutton);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.enableParameterInsightCheckbutton]));
- w9.Position = 1;
- this.vbox4.Add (this.hbox4);
- global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox4]));
- w10.Position = 3;
- w10.Expand = false;
- w10.Fill = false;
- // Container child vbox4.Gtk.Box+BoxChild
- this.hbox5 = new global::Gtk.HBox ();
- this.hbox5.Name = "hbox5";
- this.hbox5.Spacing = 6;
- // Container child hbox5.Gtk.Box+BoxChild
- this.fixed4 = new global::Gtk.Fixed ();
- this.fixed4.Name = "fixed4";
- this.fixed4.HasWindow = false;
- this.hbox5.Add (this.fixed4);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox5 [this.fixed4]));
- w11.Position = 0;
- w11.Expand = false;
- w11.Padding = ((uint)(6));
- // Container child hbox5.Gtk.Box+BoxChild
- this.hideObsoleteItemsCheckbutton = new global::Gtk.CheckButton ();
- this.hideObsoleteItemsCheckbutton.CanFocus = true;
- this.hideObsoleteItemsCheckbutton.Name = "hideObsoleteItemsCheckbutton";
- this.hideObsoleteItemsCheckbutton.Label = global::Mono.Unix.Catalog.GetString ("_Hide obsolete items");
- this.hideObsoleteItemsCheckbutton.DrawIndicator = true;
- this.hideObsoleteItemsCheckbutton.UseUnderline = true;
- this.hbox5.Add (this.hideObsoleteItemsCheckbutton);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox5 [this.hideObsoleteItemsCheckbutton]));
- w12.Position = 1;
- this.vbox4.Add (this.hbox5);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox5]));
- w13.Position = 4;
- w13.Expand = false;
- w13.Fill = false;
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox3]));
+ w3.Position = 0;
+ w3.Expand = false;
+ w3.Fill = false;
// Container child vbox4.Gtk.Box+BoxChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
@@ -188,29 +81,29 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("_Line ending conversion:");
this.label1.UseUnderline = true;
this.hbox1.Add (this.label1);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label1]));
- w14.Position = 0;
- w14.Expand = false;
- w14.Fill = false;
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label1]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.comboboxLineEndings = global::Gtk.ComboBox.NewText ();
this.comboboxLineEndings.Name = "comboboxLineEndings";
this.hbox1.Add (this.comboboxLineEndings);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.comboboxLineEndings]));
- w15.Position = 1;
- w15.Expand = false;
- w15.Fill = false;
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.comboboxLineEndings]));
+ w5.Position = 1;
+ w5.Expand = false;
+ w5.Fill = false;
this.vbox4.Add (this.hbox1);
- global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox1]));
- w16.Position = 5;
- w16.Expand = false;
- w16.Fill = false;
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox1]));
+ w6.Position = 1;
+ w6.Expand = false;
+ w6.Fill = false;
this.alignment2.Add (this.vbox4);
this.vbox1.Add (this.alignment2);
- global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment2]));
- w18.Position = 1;
- w18.Expand = false;
- w18.Fill = false;
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment2]));
+ w8.Position = 1;
+ w8.Expand = false;
+ w8.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.GtkLabel14 = new global::Gtk.Label ();
this.GtkLabel14.Name = "GtkLabel14";
@@ -218,10 +111,10 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.GtkLabel14.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Code Folding</b>");
this.GtkLabel14.UseMarkup = true;
this.vbox1.Add (this.GtkLabel14);
- global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.GtkLabel14]));
- w19.Position = 2;
- w19.Expand = false;
- w19.Fill = false;
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.GtkLabel14]));
+ w9.Position = 2;
+ w9.Expand = false;
+ w9.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.alignment3 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.alignment3.Name = "alignment3";
@@ -238,10 +131,10 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.foldingCheckbutton.DrawIndicator = true;
this.foldingCheckbutton.UseUnderline = true;
this.vbox5.Add (this.foldingCheckbutton);
- global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldingCheckbutton]));
- w20.Position = 0;
- w20.Expand = false;
- w20.Fill = false;
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldingCheckbutton]));
+ w10.Position = 0;
+ w10.Expand = false;
+ w10.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.foldregionsCheckbutton = new global::Gtk.CheckButton ();
this.foldregionsCheckbutton.CanFocus = true;
@@ -250,10 +143,10 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.foldregionsCheckbutton.DrawIndicator = true;
this.foldregionsCheckbutton.UseUnderline = true;
this.vbox5.Add (this.foldregionsCheckbutton);
- global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldregionsCheckbutton]));
- w21.Position = 1;
- w21.Expand = false;
- w21.Fill = false;
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldregionsCheckbutton]));
+ w11.Position = 1;
+ w11.Expand = false;
+ w11.Fill = false;
// Container child vbox5.Gtk.Box+BoxChild
this.foldCommentsCheckbutton = new global::Gtk.CheckButton ();
this.foldCommentsCheckbutton.CanFocus = true;
@@ -262,16 +155,16 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.foldCommentsCheckbutton.DrawIndicator = true;
this.foldCommentsCheckbutton.UseUnderline = true;
this.vbox5.Add (this.foldCommentsCheckbutton);
- global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldCommentsCheckbutton]));
- w22.Position = 2;
- w22.Expand = false;
- w22.Fill = false;
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.foldCommentsCheckbutton]));
+ w12.Position = 2;
+ w12.Expand = false;
+ w12.Fill = false;
this.alignment3.Add (this.vbox5);
this.vbox1.Add (this.alignment3);
- global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment3]));
- w24.Position = 3;
- w24.Expand = false;
- w24.Fill = false;
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment3]));
+ w14.Position = 3;
+ w14.Expand = false;
+ w14.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.GtkLabel15 = new global::Gtk.Label ();
this.GtkLabel15.Name = "GtkLabel15";
@@ -279,10 +172,10 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.GtkLabel15.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Appearance</b>");
this.GtkLabel15.UseMarkup = true;
this.vbox1.Add (this.GtkLabel15);
- global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.GtkLabel15]));
- w25.Position = 4;
- w25.Expand = false;
- w25.Fill = false;
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.GtkLabel15]));
+ w15.Position = 4;
+ w15.Expand = false;
+ w15.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.alignment4 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.alignment4.Name = "alignment4";
@@ -299,16 +192,16 @@ namespace MonoDevelop.SourceEditor.OptionPanels
this.antiAliasingCheckbutton.DrawIndicator = true;
this.antiAliasingCheckbutton.UseUnderline = true;
this.vbox6.Add (this.antiAliasingCheckbutton);
- global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox6 [this.antiAliasingCheckbutton]));
- w26.Position = 0;
- w26.Expand = false;
- w26.Fill = false;
+ global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox6 [this.antiAliasingCheckbutton]));
+ w16.Position = 0;
+ w16.Expand = false;
+ w16.Fill = false;
this.alignment4.Add (this.vbox6);
this.vbox1.Add (this.alignment4);
- global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment4]));
- w28.Position = 5;
- w28.Expand = false;
- w28.Fill = false;
+ global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.alignment4]));
+ w18.Position = 5;
+ w18.Expand = false;
+ w18.Fill = false;
this.Add (this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
index e9ae9da..5ad2382 100644
--- a/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
+++ b/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
@@ -7,6 +7,7 @@
<import>
<widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
<widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
<widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
<widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" internal="true" />
</import>
@@ -40,60 +41,6 @@
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.CheckButton" id="codeCompletioncheckbutton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">Enable _code completion</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Fixed" id="fixed1">
- <property name="MemberName" />
- <property name="HasWindow">False</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- <property name="Padding">6</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.CheckButton" id="autoCodeCompletionCheckbutton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">_Aggressively trigger code completion list</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
<widget class="Gtk.HBox" id="hbox3">
<property name="MemberName" />
<property name="Spacing">6</property>
@@ -111,84 +58,7 @@
</child>
</widget>
<packing>
- <property name="Position">2</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox4">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Fixed" id="fixed3">
- <property name="MemberName" />
- <property name="HasWindow">False</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- <property name="Padding">6</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.CheckButton" id="enableParameterInsightCheckbutton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">Enable _parameter insight</property>
- <property name="Active">True</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">3</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox5">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Fixed" id="fixed4">
- <property name="MemberName" />
- <property name="HasWindow">False</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- <property name="Expand">False</property>
- <property name="Padding">6</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.CheckButton" id="hideObsoleteItemsCheckbutton">
- <property name="MemberName">hideObsoleteItemsCheckbutton</property>
- <property name="CanFocus">True</property>
- <property name="Label" translatable="yes">_Hide obsolete items</property>
- <property name="DrawIndicator">True</property>
- <property name="HasLabel">True</property>
- <property name="UseUnderline">True</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">4</property>
+ <property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -227,7 +97,7 @@
</child>
</widget>
<packing>
- <property name="Position">5</property>
+ <property name="Position">1</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -2359,4 +2229,439 @@
</widget>
</child>
</widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel" design-size="345 291">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="codeCompletioncheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Enable code completion</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableParameterInsightCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable _parameter insight</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Behavior</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoCodeCompletionCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show completion list after a character is typed</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="showImportsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show import items</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="includeKeywordsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include _keywords in completion list</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="insertParenthesesCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">A_utomatically insert parentheses after completion:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="openingRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Opening only</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed2">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="bothRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Both opening and closing</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel" design-size="427 423">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Completion list has</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinbutton1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">rows</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="filterByBrowsableCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Filter members by [EditorBrowsable] attribute</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="normalOnlyRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show Normal members only</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">38</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><i>EditorBrowsableState.Always</i></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed2">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="includeAdvancedRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show Normal and _Advanced members</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">38</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><i>EditorBrowsableState.Always and EditorBrowsableState.Advanced</i></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.addin.xml b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.addin.xml
new file mode 100644
index 0000000..32c23c0
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.addin.xml
@@ -0,0 +1,218 @@
+<Addin id = "SourceEditor2"
+ namespace = "MonoDevelop"
+ name = "MonoDevelop Source Editor"
+ author = "Mike Krüger"
+ copyright = ""
+ url = ""
+ description = "Provides a text editor for the MonoDevelop based on Mono.TextEditor"
+ category = "MonoDevelop Core"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.SourceEditor2.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="Debugger" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension points -->
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor" name = "Editor context menu">
+ <Description>Context menu for the editor.</Description>;
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ <ConditionType id="FileType" type="MonoDevelop.Ide.Extensions.FileTypeCondition">
+ <Description>Type of the file being edited.</Description>
+ </ConditionType>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/ContextMenu/NavigationBar" name = "Navigation bar context menu">
+ <Description>Context menu for the navigation bar.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/ContextMenu/Scrollbar" name = "Scroll bar context menu">
+ <Description>Context menu for the navigation bar.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/IconContextMenu/Editor" name = "Editor context menu">
+ <Description>Context menu for the editor's icon margin.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ <ConditionType id="FileType" type="MonoDevelop.Ide.Extensions.FileTypeCondition">
+ <Description>Type of the file being edited.</Description>
+ </ConditionType>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/EditActions" name = "Custom edit actions">
+ <Description>Custom edit actions for the editor.</Description>
+ <ExtensionNode name="EditAction" type="MonoDevelop.SourceEditor.Codons.EditActionCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/Formatters" name = "Formatters">
+ <Description>Custom edit actions for the editor.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/TooltipProviders" name = "Tooltip providers">
+ <Description>Tooltip providers. Classes must implement ITooltipProvider.</Description>
+ <ExtensionNode name="Class" />
+ <ConditionType id="FileType" type="MonoDevelop.Ide.Extensions.FileTypeCondition">
+ <Description>Type of the file being edited.</Description>
+ </ConditionType>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/SyntaxModes" name = "Text editor syntax modes">
+ <Description>Syntax modes</Description>
+ <ExtensionNode name="Templates" type="MonoDevelop.SourceEditor.Extension.TemplateCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/Styles" name = "Text editor styles">
+ <Description>Styles</Description>
+ <ExtensionNode name="Templates" type="MonoDevelop.SourceEditor.Extension.TemplateCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/SourceEditor2/CustomModes" name = "Text editor custom syntax modes">
+ <Description>Styles</Description>
+ <ExtensionNode name="SyntaxMode" type="MonoDevelop.SourceEditor.SyntaxModeCodon"/>
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+ <Extension path = "/MonoDevelop/SourceEditor2/TooltipProviders">
+ <Class id="Debug" class="MonoDevelop.SourceEditor.DebugValueTooltipProvider" />
+ <Class id="CompileError" class="MonoDevelop.SourceEditor.CompileErrorTooltipProvider" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations"
+ defaultHandler = "MonoDevelop.SourceEditor.MarkerOperationsHandler"
+ _label = "MarkerOperations"
+ type = "array"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/TextEditor">
+ <Command id = "MonoDevelop.SourceEditor.SourceEditorCommands.DynamicAbbrev"
+ defaultHandler = "MonoDevelop.SourceEditor.DynamicAbbrevHandler"
+ _label = "Dynamic abbrev"
+ _description = "Cycles completing the current word from matching words in all open files"
+ macShortcut = "Ctrl|/"
+ shortcut = "Alt|/" />
+ <Command id = "MonoDevelop.SourceEditor.SourceEditorCommands.PulseCaret"
+ _label = "Find caret"
+ _description = "Animates the text editor caret to help find it"
+ shortcut = "Ctrl||"
+ macShortcut = "Meta||" />
+ <Command id = "MonoDevelop.SourceEditor.SourceEditorCommands.ToggleErrorTextMarker"
+ _label = "Toggle message bubble"
+ _description = "Toggles message bubble on/off"/>
+
+ <Command id = "MonoDevelop.SourceEditor.MessageBubbleCommands.HideIssues"
+ defaultHandler = "MonoDevelop.SourceEditor.HideIssuesHandler"
+ _label = "_Hide Issues"/>
+
+ <Command id = "MonoDevelop.SourceEditor.MessageBubbleCommands.ToggleIssues"
+ defaultHandler = "MonoDevelop.SourceEditor.ToggleIssuesHandler"
+ _label = "Toggle Issues"
+ type="array"/>
+
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.Top"
+ _label = "_Top"/>
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.Bottom"
+ _label = "_Bottom"/>
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.PgUp"
+ _label = "_Page Up"/>
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.PgDown"
+ _label = "P_age Down"/>
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.ShowTasks"
+ _label = "Show _Tasks"
+ type="radio"/>
+ <Command id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.ShowMinimap"
+ _label = "Show _Minimap"
+ type="radio"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding
+ id = "TextEditor"
+ insertafter ="DefaultDisplayBinding"
+ class = "MonoDevelop.SourceEditor.SourceEditorDisplayBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <CommandItem id = "MonoDevelop.SourceEditor.SourceEditorCommands.MarkerOperations" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste" />
+ <SeparatorItem id = "Separator2" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.IndentSelection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.UnIndentSelection" />
+ <SeparatorItem id = "Separator3" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowCodeTemplateWindow" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Scrollbar">
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.Top" />
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.Bottom" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.PgUp" />
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.PgDown" />
+ <SeparatorItem id = "Separator2" />
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.ShowTasks" />
+ <CommandItem id = "MonoDevelop.SourceEditor.QuickTasks.ScrollbarCommand.ShowMinimap" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/NavigationBar">
+ <CommandItem id = "MonoDevelop.SourceEditor.NavigationBarCommands.ToggleNavPanelViews" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/IconContextMenu/Editor">
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.ToggleBookmark" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.ClearBookmarks" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.NewBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.RemoveBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ToggleBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.EnableDisableBreakpoint" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.DisableAllBreakpoints" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ClearAllBreakpoints" />
+ <CommandItem id = "MonoDevelop.Debugger.DebugCommands.ShowBreakpointProperties" />
+ <CommandItem id = "MonoDevelop.SourceEditor.SourceEditorCommands.ToggleErrorTextMarker" />
+ </Extension>
+
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor">
+ <Section id = "General" insertbefore="Formatting" _label = "General" icon="md-text-editor" fill="true" class = "MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel"/>
+ <Section id = "Markers" _label = "Markers and Rulers" icon="md-markers-rulers" class = "MonoDevelop.SourceEditor.OptionPanels.MarkerPanel"/>
+ <Section id = "Behavior" _label = "Behavior" icon="md-text-editor-behavior" class = "MonoDevelop.SourceEditor.OptionPanels.BehaviorPanel"/>
+ <Section id = "CompletionBehavior" _label = "Completion Behavior" class = "MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel"/>
+ <Section id = "CompletionAppearance" _label = "Completion Appearance" class = "MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel"/>
+ <Section id = "SyntaxHighlighting" _label = "Syntax Highlighting" fill="true" icon="md-syntax-highlighting" class = "MonoDevelop.SourceEditor.OptionPanels.HighlightingPanel"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/View">
+ <ItemSet id = "MessageBubbles" _label = "_Message Bubbles" insertafter="MonoDevelop.Ide.Commands.ViewCommands.ViewList" insertbefore="ViewSeparator3">
+ <CommandItem id = "MonoDevelop.SourceEditor.SourceEditorCommands.ToggleErrorTextMarker" />
+ <CommandItem id = "MonoDevelop.SourceEditor.MessageBubbleCommands.HideIssues" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.SourceEditor.MessageBubbleCommands.ToggleIssues" />
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Fonts">
+ <Font name ="MessageBubbles" _displayName="Message bubbles" default ="_DEFAULT_SANS" defaultMac = "Lucida Grande 10"/>
+ <Font name ="LanguageTooltips" _displayName="Editor tooltips" default ="_DEFAULT_SANS"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="UserData" path="syntaxmodes" targetPath="HighlightingSchemes" isDirectory="true" />
+ <!-- 2.6+ -->
+ <Migration sourceVersion="2.6+" kind="UserData" path="HighlightingSchemes" isDirectory="true" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.searchoptions.png b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.searchoptions.png
new file mode 100644
index 0000000..0be6338
Binary files /dev/null and b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.searchoptions.png differ
diff --git a/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..0a08644
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.MonoDevelop.SourceEditor.searchoptions.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor2.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor2.dll.mdb
diff --git a/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.gtk-gui.gui.stetic b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.gtk-gui.gui.stetic
new file mode 100644
index 0000000..5ad2382
--- /dev/null
+++ b/src/addins/MonoDevelop.SourceEditor2/obj/Debug/MonoDevelop.SourceEditor.gtk-gui.gui.stetic
@@ -0,0 +1,2667 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.GeneralOptionsPanel" design-size="454 364">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel13">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Coding</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed2">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Line ending conversion:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">comboboxLineEndings</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxLineEndings">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Code Folding</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="foldingCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable code _folding</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="foldregionsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Fold #_regions by default</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="foldCommentsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Fold _comments by default</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel15">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Appearance</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment4">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="antiAliasingCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Use anti aliasing</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.MarkerPanel" design-size="383 418">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>General</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="showLineNumbersCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show line numbers</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="underlineErrorsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Underline errors</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="highlightMatchingBracketCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Highlight matching braces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="highlightCurrentLineCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Highlight _current line</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="showRulerCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show _column ruler</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableAnimationCheckbutton1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Enable animations</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableHighlightUsagesCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Highlight _identifier references</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="drawIndentMarkersCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show indentation guides</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableQuickDiffCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Visualize changed lines</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">8</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">4</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonLineEndings">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include Line Endings</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonSpaces">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include _Spaces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonTabs">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include Tabs</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Show invisible characters:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="showWhitespacesCombobox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">9</property>
+ <property name="AutoSize">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.BehaviorPanel" design-size="368 436">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Automatic behaviors</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoInsertBraceCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Insert matching brace</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="fixed1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="smartSemicolonPlaceCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Smart semicolon placement</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonOnTheFlyFormatting">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Enable on the fly code formatting</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonFormatOnSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Format document on save</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonAutoSetSearchPatternCasing">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Automatically set search pattern case sensitivity</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Indentation</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Indentation mode:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="indentationCombobox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="tabAsReindentCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Interpret tab _keystroke as reindent command</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Navigation</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment4">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="useViModesCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use _Vi modes</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Word _break mode:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="controlLeftRightCombobox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.HighlightingPanel" design-size="342 332">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Syntax highlighting</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableHighlightingCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Enable highlighting</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableSemanticHighlightingCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">E_nable semantic highlighting</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Color scheme</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.TreeView" id="styleTreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonNew">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-new</property>
+ <property name="label">gtk-new</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">_Edit</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="addButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonExport">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Export</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.SearchAndReplaceWidget" design-size="412 67">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Table" id="table">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="BorderWidth">4</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSearchMode">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <child>
+ <widget class="Gtk.Arrow" id="searchButtonModeArrow">
+ <property name="MemberName" />
+ <property name="ArrowType">Up</property>
+ <property name="ShadowType">None</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="MonoDevelop.Components.SearchEntry" id="searchEntry">
+ <property name="MemberName" />
+ <property name="ForceFilterButtonVisible">False</property>
+ <property name="HasFrame">True</property>
+ <property name="RoundedShape">False</property>
+ <property name="IsCheckMenu">False</property>
+ <property name="ActiveFilterID">0</property>
+ <property name="Ready">False</property>
+ <property name="HasFocus">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSearchBackward">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox2">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image2">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-go-up Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSearchForward">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox3">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image3">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-go-down Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="closeButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox4">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image4">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-close Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="entryReplace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonReplace">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox5">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image5">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-find-and-replace Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonReplaceAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox6">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image6">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-find-and-replace Menu</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">All</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.GotoLineNumberWidget" design-size="221 33">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Entry" id="entryLineNumber">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonGoToLine">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox2">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image2">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-jump-to Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="closeButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
+ <child>
+ <widget class="Gtk.EventBox" id="eventbox1">
+ <property name="MemberName" />
+ <property name="AboveChild">True</property>
+ <property name="VisibleWindow">False</property>
+ <child>
+ <widget class="Gtk.Image" id="image1">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-close Menu</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.PrintSettingsWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.SourceEditor.OptionPanels.ColorShemeEditor" design-size="760 458">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Edit color sheme</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryName</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Description:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryDescription</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryDescription">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">415</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Colors</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewColors">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebookColorChooser">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">1</property>
+ <property name="ShowBorder">False</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonBg">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonFg">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Background:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">colorbutton2</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Foreground:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">colorbutton1</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonBold">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">B_old</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonItalic">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Italic</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonBorder">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonPrimary">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonSecondary">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Secondary Color:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">colorbutton2</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Border Color:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">colorbutton2</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Primary Color:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">colorbutton1</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Preview:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindowTextEditor">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.SourceEditor.OptionPanels.NewColorShemeDialog" design-size="393 148">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Create new color sheme</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxBaseStyle">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryDescription">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Based on:</property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">combobox1</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryName</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Description:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryDescription</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.CompletionOptionsPanel" design-size="345 291">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="codeCompletioncheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Enable code completion</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="enableParameterInsightCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable _parameter insight</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel14">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Behavior</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoCodeCompletionCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show completion list after a character is typed</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="showImportsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show import items</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="includeKeywordsCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include _keywords in completion list</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="insertParenthesesCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">A_utomatically insert parentheses after completion:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="openingRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Opening only</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed2">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="bothRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Both opening and closing</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.OptionPanels.CompletionAppearancePanel" design-size="427 423">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Completion list has</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="spinbutton1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">rows</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="filterByBrowsableCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Filter members by [EditorBrowsable] attribute</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="normalOnlyRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Show Normal members only</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">38</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><i>EditorBrowsableState.Always</i></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed2">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="includeAdvancedRadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show Normal and _Advanced members</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">38</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><i>EditorBrowsableState.Always and EditorBrowsableState.Advanced</i></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDevelop.WebReferences/Makefile.in b/src/addins/MonoDevelop.WebReferences/Makefile.in
index adfe848..f3b25f0 100644
--- a/src/addins/MonoDevelop.WebReferences/Makefile.in
+++ b/src/addins/MonoDevelop.WebReferences/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs b/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs
index bf0e416..eac81ec 100644
--- a/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs
+++ b/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs
@@ -127,15 +127,15 @@ namespace MonoDevelop.WebReferences.WS
protected override string CreateProxyFile (DotNetProject dotNetProject, FilePath basePath, string proxyNamespace, string referenceName)
{
// Setup the proxy namespace and compile unit
- ICodeGenerator codeGen = GetProvider (dotNetProject).CreateGenerator();
- CodeNamespace codeNamespace = new CodeNamespace(proxyNamespace);
+ CodeDomProvider codeProv = GetProvider (dotNetProject);
+ CodeNamespace codeNamespace = new CodeNamespace (proxyNamespace);
CodeConstructor urlConstructor = new CodeConstructor ();
- CodeCompileUnit codeUnit = new CodeCompileUnit();
- codeUnit.Namespaces.Add(codeNamespace);
+ CodeCompileUnit codeUnit = new CodeCompileUnit ();
+ codeUnit.Namespaces.Add (codeNamespace);
// Setup the importer and import the service description into the code unit
- ServiceDescriptionImporter importer = Library.ReadServiceDescriptionImporter(protocol);
- importer.Import(codeNamespace, codeUnit);
+ ServiceDescriptionImporter importer = Library.ReadServiceDescriptionImporter (protocol);
+ importer.Import (codeNamespace, codeUnit);
// Add the new Constructor with Url as a paremeter
// Search for the class which inherit SoapHttpClientProtocol (Which is the Service Class)
@@ -156,10 +156,10 @@ namespace MonoDevelop.WebReferences.WS
// Generate the code and save the file
string fileSpec = Path.Combine (basePath, dotNetProject.LanguageBinding.GetFileName (referenceName));
- StreamWriter writer = new StreamWriter(fileSpec);
- codeGen.GenerateCodeFromCompileUnit(codeUnit, writer, new CodeGeneratorOptions());
+ StreamWriter writer = new StreamWriter (fileSpec);
+ codeProv.GenerateCodeFromCompileUnit (codeUnit, writer, new CodeGeneratorOptions ());
- writer.Close();
+ writer.Close ();
return fileSpec;
}
diff --git a/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.addin.xml b/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.addin.xml
index 19e45a8..ee81734 100644
--- a/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.addin.xml
+++ b/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.addin.xml
@@ -7,15 +7,15 @@
url = "http://www.monodevelop.com"
description = "Provides support for adding and maintianing Web References for CSharp and VB projects."
category = "Web Development"
- version = "4.0.5" >
+ version = "4.0.12" >
<Runtime>
<Import assembly = "MonoDevelop.WebReferences.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path = "/MonoDevelop/WebReferences/ContextMenu/ProjectPad/WebReferenceFolder">
diff --git a/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.WebReferenceItem.png b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.WebReferenceItem.png
new file mode 100644
index 0000000..e6939b3
Binary files /dev/null and b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.WebReferenceItem.png differ
diff --git a/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.disco.html b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.disco.html
new file mode 100644
index 0000000..cf8124c
--- /dev/null
+++ b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.disco.html
@@ -0,0 +1,27 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes" version="4.0" encoding="us-ascii" media-type="text/html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
+<xsl:template match="/">
+<Html>
+ <Head>
+ <Title></Title>
+ <style type="text/css">
+ BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
+ LI { margin-bottom:15px; }
+ </style>
+ </Head>
+ <Body>
+ Discovery document
+ <ul>
+ <xsl:for-each select="services/service">
+ <li>
+ <xsl:element name="a">
+ <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
+ <xsl:value-of select="@name" />
+ </xsl:element>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </Body>
+</Html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.wsdl.html b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.wsdl.html
new file mode 100644
index 0000000..429141c
--- /dev/null
+++ b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.wsdl.html
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:output method="html" indent="yes" version="4.0" encoding="us-ascii" media-type="text/html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />
+<xsl:template match="/">
+<Html>
+<Head>
+ <Title></Title>
+ <style type="text/css">
+ BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
+ LI { margin-bottom: 15px }
+ </style>
+</Head>
+<Body>
+ <xsl:for-each select="services/service">
+ <b><xsl:value-of select="@name" /></b>
+ <br/>
+ <br/>
+ <xsl:for-each select="comment">
+ <xsl:value-of select="@text" />
+ </xsl:for-each>
+ <ul>
+ <xsl:for-each select="method">
+ <li>
+ <xsl:value-of select="@return" /> <b><xsl:value-of select="@name" /> </b>
+ (
+ <xsl:for-each select="parameter">
+ <xsl:value-of select="@type" /> : <xsl:value-of select="@name" />,
+ </xsl:for-each>
+ )
+ <br/>
+ <xsl:for-each select="comment">
+ <xsl:value-of select="@text" />
+ </xsl:for-each>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:for-each>
+ </Body>
+</Html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.addin.xml b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.addin.xml
new file mode 100644
index 0000000..ee81734
--- /dev/null
+++ b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.addin.xml
@@ -0,0 +1,87 @@
+<Addin
+ id = "WebReferences"
+ namespace = "MonoDevelop"
+ name = "Project Web References"
+ author = "Gideon de Swardt"
+ copyright = "LGPL"
+ url = "http://www.monodevelop.com"
+ description = "Provides support for adding and maintianing Web References for CSharp and VB projects."
+ category = "Web Development"
+ version = "4.0.12" >
+
+ <Runtime>
+ <Import assembly = "MonoDevelop.WebReferences.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path = "/MonoDevelop/WebReferences/ContextMenu/ProjectPad/WebReferenceFolder">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/WebReferences/ContextMenu/ProjectPad/WebReferenceItem">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.WebReferences.NodeBuilders.ProjectFolderNodeBuilderExtension"/>
+ <NodeBuilder class = "MonoDevelop.WebReferences.NodeBuilders.ProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.WebReferences.NodeBuilders.WebReferenceFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.WebReferences.NodeBuilders.WebReferenceNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "Web Reference" id = "WebReferences">
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.Add"
+ _label = "Add Web Reference"
+ icon = "md-webreference-item" />
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.UpdateAll"
+ _label = "Update Web References"
+ icon = "gtk-reload" />
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.Update"
+ _label = "Update Web Reference"
+ icon = "gtk-reload" />
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.DeleteAll"
+ _label = "Delete All"
+ icon = "gtk-delete" />
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.Delete"
+ _label = "Delete"
+ icon = "gtk-delete" />
+ <Command id = "MonoDevelop.WebReferences.WebReferenceCommands.Configure"
+ _label = "Configure"
+ icon = "gtk-preferences" />
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/Add">
+ <Condition id="ItemType" value="DotNetProject">
+ <SeparatorItem insertafter = "MonoDevelop.Ide.Commands.ProjectCommands.AddFiles" />
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.Add"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/WebReferences/ContextMenu/ProjectPad/WebReferenceFolder">
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.Add" />
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.UpdateAll" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/WebReferences/ContextMenu/ProjectPad/WebReferenceItem">
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.Update" />
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.Delete" />
+ <CommandItem id = "MonoDevelop.WebReferences.WebReferenceCommands.Configure" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-webreference-item" resource = "WebReferenceItem.png" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.WebReferences.WCF.WCFMetadata" />
+ <DataType class = "MonoDevelop.WebReferences.WCF.WCFMetadataStorage" />
+ <DataType class = "MonoDevelop.WebReferences.WS.WebReferences" />
+ <DataType class = "MonoDevelop.WebReferences.WS.WebReferenceUrl" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..5c36081
--- /dev/null
+++ b/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,8 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.disco.html
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.wsdl.html
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.MonoDevelop.WebReferences.Resources.WebReferenceItem.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.WebReferences/MonoDevelop.WebReferences.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.WebReferences/MonoDevelop.WebReferences.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/obj/Debug/MonoDevelop.WebReferences.dll.mdb
diff --git a/src/addins/MonoDevelop.XmlEditor/Makefile.in b/src/addins/MonoDevelop.XmlEditor/Makefile.in
index 511ea6f..eafa069 100644
--- a/src/addins/MonoDevelop.XmlEditor/Makefile.in
+++ b/src/addins/MonoDevelop.XmlEditor/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml
index 99b5ca1..7348295 100644
--- a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml
+++ b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.addin.xml
@@ -6,7 +6,7 @@
url = "http://md-xed.sourceforge.net"
description = "XML Editor"
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.XmlEditor.dll" />
@@ -21,10 +21,10 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="DesignerSupport" version="4.0.5"/>
- <Addin id="SourceEditor2" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path = "/MonoDevelop/XmlEditor/XmlFileAssociations">
diff --git a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj
index 3e2a7a0..25d7f90 100644
--- a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj
+++ b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.csproj
@@ -76,11 +76,6 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj">
<Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project>
<Name>MonoDevelop.SourceEditor</Name>
@@ -106,6 +101,16 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\xwt\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
diff --git a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs
index be574ea..71311ee 100644
--- a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs
+++ b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlEditorService.cs
@@ -144,23 +144,23 @@ namespace MonoDevelop.XmlEditor
/// <returns>The output of the transform.</returns>
public static string Transform (string input, string transform)
{
- StringReader inputString = new StringReader(input);
- XPathDocument sourceDocument = new XPathDocument(inputString);
+ StringReader inputString = new StringReader (input);
+ XPathDocument sourceDocument = new XPathDocument (inputString);
- StringReader transformString = new StringReader(transform);
- XPathDocument transformDocument = new XPathDocument(transformString);
+ StringReader transformString = new StringReader (transform);
+ XPathDocument transformDocument = new XPathDocument (transformString);
- XslTransform xslTransform = new XslTransform();
- xslTransform.Load(transformDocument, new XmlUrlResolver(), null);
-
- MemoryStream outputStream = new MemoryStream();
- XmlTextWriter writer = new XmlTextWriter(outputStream, Encoding.UTF8);
-
- xslTransform.Transform(sourceDocument, null, writer, new XmlUrlResolver());
+ XslCompiledTransform xslTransform = new XslCompiledTransform ();
+ xslTransform.Load (transformDocument, null, new XmlUrlResolver ());
+
+ MemoryStream outputStream = new MemoryStream ();
+ XmlTextWriter writer = new XmlTextWriter (outputStream, Encoding.UTF8);
- int preambleLength = Encoding.UTF8.GetPreamble().Length;
- byte[] outputBytes = outputStream.ToArray();
- return UTF8Encoding.UTF8.GetString(outputBytes, preambleLength, outputBytes.Length - preambleLength);
+ xslTransform.Transform (sourceDocument, writer);
+
+ int preambleLength = Encoding.UTF8.GetPreamble ().Length;
+ byte[] outputBytes = outputStream.ToArray ();
+ return UTF8Encoding.UTF8.GetString (outputBytes, preambleLength, outputBytes.Length - preambleLength);
}
public static string CreateSchema (Document doc, string xml)
@@ -244,7 +244,7 @@ namespace MonoDevelop.XmlEditor
| XmlSchemaValidationFlags.ProcessSchemaLocation
| XmlSchemaValidationFlags.ReportValidationWarnings;
settings.ValidationType = ValidationType.Schema;
- settings.ProhibitDtd = false;
+ settings.DtdProcessing = DtdProcessing.Parse;
ValidationEventHandler validationHandler = delegate (object sender, System.Xml.Schema.ValidationEventArgs args) {
if (args.Severity == XmlSeverityType.Warning) {
@@ -345,17 +345,17 @@ namespace MonoDevelop.XmlEditor
return error? null: schema;
}
- public static XslTransform ValidateStylesheet (IProgressMonitor monitor, string xml, string fileName)
+ public static XslCompiledTransform ValidateStylesheet (IProgressMonitor monitor, string xml, string fileName)
{
monitor.BeginTask (GettextCatalog.GetString ("Validating stylesheet..."), 1);
bool error = true;
- XslTransform xslt = null;
+ XslCompiledTransform xslt = null;
try {
StringReader reader = new StringReader (xml);
XPathDocument doc = new XPathDocument (reader);
- xslt = new XslTransform ();
- xslt.Load (doc, new XmlUrlResolver (), null);
+ xslt = new XslCompiledTransform ();
+ xslt.Load (doc, null, new XmlUrlResolver ());
error = false;
} catch (XsltCompileException ex) {
monitor.ReportError (ex.Message, ex);
@@ -390,12 +390,16 @@ namespace MonoDevelop.XmlEditor
var dlg = new SelectFileDialog (GettextCatalog.GetString ("Select XSLT Stylesheet")) {
TransientFor = IdeApp.Workbench.RootWindow,
};
- dlg.AddFilter (new SelectFileDialogFilter (GettextCatalog.GetString ("XML Files", "*.xml")) {
- MimeTypes = { "text/xml", "application/xml" },
- });
- dlg.AddFilter (new SelectFileDialogFilter (GettextCatalog.GetString ("XSL Files"), "*.xslt", "*.xsl") {
- MimeTypes = { "text/x-xslt" },
- });
+ dlg.AddFilter (new SelectFileDialogFilter (
+ GettextCatalog.GetString ("XML Files"),
+ new string[] { "*.xml" },
+ new string[] { "text/xml", "application/xml" }
+ ));
+ dlg.AddFilter (new SelectFileDialogFilter(
+ GettextCatalog.GetString ("XSL Files"),
+ new string[] { "*.xslt", "*.xsl" },
+ new string[] { "text/x-xslt" }
+ ));
dlg.AddAllFilesFilter ();
if (dlg.Run ())
diff --git a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs
index 5b39617..5230bec 100755
--- a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs
+++ b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlFileAssociation.cs
@@ -22,7 +22,6 @@
// THE SOFTWARE.
using MonoDevelop.Core;
-using System;
using System.Xml;
namespace MonoDevelop.XmlEditor
@@ -51,7 +50,7 @@ namespace MonoDevelop.XmlEditor
public string Extension { get; private set; }
public string NamespacePrefix { get; private set; }
- ICustomXmlSerializer ICustomXmlSerializer.ReadFrom (XmlReader reader)
+ public ICustomXmlSerializer ReadFrom (XmlReader reader)
{
while (reader.Read ()) {
if (reader.NodeType == XmlNodeType.Element && reader.Name == schemaAssociationElementName) {
@@ -64,7 +63,7 @@ namespace MonoDevelop.XmlEditor
return null;
}
- void ICustomXmlSerializer.WriteTo (XmlWriter writer)
+ public void WriteTo (XmlWriter writer)
{
writer.WriteStartElement (schemaAssociationElementName);
writer.WriteAttributeString (extensionAttributeName, Extension);
diff --git a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
index 0c8b629..fa80303 100644
--- a/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
+++ b/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
@@ -640,7 +640,7 @@ namespace MonoDevelop.XmlEditor
GettextCatalog.GetString ("Error reading file '{0}'.", stylesheetFileName), null);
return;
}
- System.Xml.Xsl.XslTransform xslt =
+ System.Xml.Xsl.XslCompiledTransform xslt =
XmlEditorService.ValidateStylesheet (monitor, xsltContent, stylesheetFileName);
if (xslt == null)
return;
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
index 6718052..fd43f32 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataImageTestFixture.cs
@@ -1,29 +1,23 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.CompletionData
-{
+{
[TestFixture]
- public class XmlCompletionDataImageTestFixture
+ public class XmlCompletionDataIconTestFixture
{
- [Test]
- public void ImageNotNull()
- {
- XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.XmlElement);
- Assert.IsNotNull(data.Image);
+ [Test]
+ public void IconNotNull ()
+ {
+ XmlCompletionData data = new XmlCompletionData ("foo");
+ Assert.IsFalse (data.Icon.IsNull);
}
- [Test]
- public void ImageNotEmptyString()
- {
- XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.XmlElement);
- Assert.IsTrue(data.Image.Length > 0);
+ [Test]
+ public void IconNotEmptyString ()
+ {
+ XmlCompletionData data = new XmlCompletionData ("foo");
+ Assert.IsTrue (data.Icon.Name.Length > 0);
}
}
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
index 7de313f..d674e74 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/CompletionData/XmlCompletionDataStringTestFixture.cs
@@ -1,11 +1,5 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.CompletionData
{
@@ -16,28 +10,28 @@ namespace MonoDevelop.XmlEditor.Tests.CompletionData
public void XmlElementCompletionString()
{
XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.XmlElement);
- Assert.AreEqual("foo", data.CompletionString);
+ Assert.AreEqual("foo", data.CompletionText);
}
[Test]
public void NamespaceUriCompletionString()
{
XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.NamespaceUri);
- Assert.AreEqual("foo", data.CompletionString);
+ Assert.AreEqual("foo", data.CompletionText);
}
[Test]
public void AttributeCompletionString()
{
XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.XmlAttribute);
- Assert.AreEqual("foo", data.CompletionString);
+ Assert.AreEqual("foo", data.CompletionText);
}
[Test]
public void AttributeValueCompletionString()
{
XmlCompletionData data = new XmlCompletionData("foo", XmlCompletionData.DataType.XmlAttributeValue);
- Assert.AreEqual("foo", data.CompletionString);
+ Assert.AreEqual("foo", data.CompletionText);
}
}
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs
index 5251240..e2dcb84 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeGroupReferenceSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
+using MonoDevelop.XmlEditor.Completion;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:attributeGroup/@ref is located in the schema.
/// </summary>
[TestFixture]
@@ -54,5 +51,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\t</xs:element>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs
index f89c3eb..34c64b3 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeReferenceSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
+using MonoDevelop.XmlEditor.Completion;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:attribute/@ref is located in the schema.
/// </summary>
[TestFixture]
@@ -69,5 +66,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
" </xs:attribute>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs
index 7fbc3f4..3b9228f 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeSelectedTestFixture.cs
@@ -1,15 +1,12 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- [TestFixture]
+/* [TestFixture]
public class AttributeSelectedTestFixture : SchemaTestFixtureBase
{
XmlSchemaAttribute schemaAttribute;
@@ -39,5 +36,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
" </xs:element>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs
index 1122524..9171517 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/AttributeTypeSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that a xs:attribute/@type can be located in the schema.
/// </summary>
[TestFixture]
@@ -67,5 +64,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
" </xs:simpleType>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs
index 0f2d5f8..d97abae 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:element/@ref is located in the schema.
/// </summary>
[TestFixture]
@@ -77,5 +74,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs
index 9d50df7..d7f103f 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementReferenceWithPrefixSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:element/@ref='prefix:name' is located in the schema.
/// </summary>
[TestFixture]
@@ -75,5 +72,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs
index aedb0f1..6cd6dfd 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementSelectedTestFixture.cs
@@ -1,15 +1,12 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- [TestFixture]
+/* [TestFixture]
public class ElementSelectedTestFixture : SchemaTestFixtureBase
{
XmlSchemaElement schemaElement;
@@ -48,5 +45,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"</xs:element>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs
index d2338ef..4977893 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:element/@type is located in the schema.
/// </summary>
[TestFixture]
@@ -53,5 +50,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\t</xs:complexType>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs
index 1c3f444..1638c30 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/ElementTypeWithPrefixSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:element/@type="prefix:name" is located in the schema.
/// </summary>
[TestFixture]
@@ -56,5 +53,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\t</xs:element>\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs
index 2ce493f..cc0011a 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/FindSchemaObject/GroupReferenceSelectedTestFixture.cs
@@ -1,16 +1,13 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
using System.Xml.Schema;
using MonoDevelop.XmlEditor.Tests.Schema;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
{
- /// <summary>
+/* /// <summary>
/// Tests that an xs:group/@ref is located in the schema.
/// </summary>
[TestFixture]
@@ -88,5 +85,5 @@ namespace MonoDevelop.XmlEditor.Tests.FindSchemaObject
"\r\n" +
"</xs:schema>";
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs
index f3c6b72..dcf2f6a 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/MimeTypeHandledTests.cs
@@ -1,7 +1,4 @@
-
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
+using NUnit.Framework;
namespace MonoDevelop.XmlEditor.Tests
{
@@ -10,7 +7,7 @@ namespace MonoDevelop.XmlEditor.Tests
/// "application/xml" are handled by the
/// XmlEditorViewContent.
/// </summary>
- [TestFixture]
+/* [TestFixture]
public class MimeTypeHandledTests
{
[Test]
@@ -36,5 +33,5 @@ namespace MonoDevelop.XmlEditor.Tests
{
Assert.IsFalse(XmlEditorViewContent.IsMimeTypeHandled("unknown/xml"));
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj b/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj
index 5e820e1..9776a37 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/MonoDevelop.XmlEditor.Tests.csproj
@@ -9,12 +9,14 @@
<OutputType>Library</OutputType>
<AssemblyName>MonoDevelop.XmlEditor.Tests</AssemblyName>
<RootNamespace>MonoDevelop.XmlEditor.Tests</RootNamespace>
+ <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>True</Optimize>
- <OutputPath>bin\Debug</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -26,7 +28,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>True</Optimize>
- <OutputPath>bin\Release</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
@@ -50,6 +52,10 @@
<Name>MonoDevelop.Ide</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
+ <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
+ <Name>ICSharpCode.NRefactory</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
@@ -152,4 +158,4 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs
index 70c5f07..011f626 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementStartPathTestFixture.cs
@@ -1,8 +1,5 @@
-
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs
index d770b9a..8ff9c5c 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ActiveElementUnderCursorTests.cs
@@ -1,8 +1,5 @@
-
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs
index 6f7bea6..3f18883 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameTestFixture.cs
@@ -1,8 +1,6 @@
-
using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs
index e6702dd..8ac5ac6 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/AttributeNameUnderCursorTests.cs
@@ -1,7 +1,5 @@
-
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs
index 00d2ce2..36724da 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/InsideAttributeValueTestFixture.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs
index 5f1e875..54beae0 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/NamespaceDeclarationTestFixture.cs
@@ -1,8 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs
index d8fe2ca..dbe84d5 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/ParentElementPathTestFixture.cs
@@ -1,8 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs
index 74cd2b8..3abbb92 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Parser/QualifiedNameTestFixture.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
+using NUnit.Framework;
using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Parser
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs
index 6cef922..4df417d 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/NoElementPathTestFixture.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
namespace MonoDevelop.XmlEditor.Tests.Paths
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs
index 4c34ce3..a9a376b 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/SingleElementPathTestFixture.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
namespace MonoDevelop.XmlEditor.Tests.Paths
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs
index 296b314..0f74db3 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Paths/TwoElementPathTestFixture.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
namespace MonoDevelop.XmlEditor.Tests.Paths
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
index 5b25c03..c3b8037 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.cs
@@ -1,42 +1,37 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
-using MonoDevelop.XmlEditor.Tests.Schema;
-
-namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
-{
- /// <summary>
- /// Tests that schemas referenced via xs:include elements are used when
- /// generating completion data.
- /// </summary>
- [TestFixture]
- public class AttributeGroupRefSchemaIncludeTestFixture : AttributeGroupRefTestFixture
- {
- [TestFixtureTearDown]
- public void FixtureTearDown()
- {
- SchemaIncludeTestFixtureHelper.FixtureTearDown();
- }
-
- protected override XmlSchemaCompletionData CreateSchemaCompletionDataObject()
- {
- return SchemaIncludeTestFixtureHelper.CreateSchemaCompletionDataObject(GetMainSchema(), GetSchema());
- }
-
- string GetMainSchema()
- {
- return "<xs:schema \r\n" +
- "targetNamespace=\"http://www.w3schools.com\" \r\n" +
- "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" \r\n" +
- "elementFormDefault=\"qualified\">\r\n" +
- "\t<xs:include schemaLocation=\"include.xsd\"/>\r\n" +
- "</xs:schema>";
- }
- }
-}
+using NUnit.Framework;
+using MonoDevelop.XmlEditor.Completion;
+using MonoDevelop.XmlEditor.Tests.Utils;
+using MonoDevelop.XmlEditor.Tests.Schema;
+
+namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
+{
+ /// <summary>
+ /// Tests that schemas referenced via xs:include elements are used when
+ /// generating completion data.
+ /// </summary>
+ [TestFixture]
+ [Ignore]
+ public class AttributeGroupRefSchemaIncludeTestFixture : AttributeGroupRefTestFixture
+ {
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ SchemaIncludeTestFixtureHelper.FixtureTearDown();
+ }
+
+ protected override XmlSchemaCompletionData CreateSchemaCompletionDataObject()
+ {
+ return SchemaIncludeTestFixtureHelper.CreateSchemaCompletionDataObject(GetMainSchema(), GetSchema());
+ }
+
+ string GetMainSchema()
+ {
+ return "<xs:schema \r\n" +
+ "targetNamespace=\"http://www.w3schools.com\" \r\n" +
+ "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" \r\n" +
+ "elementFormDefault=\"qualified\">\r\n" +
+ "\t<xs:include schemaLocation=\"include.xsd\"/>\r\n" +
+ "</xs:schema>";
+ }
+ }
+}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs
index e6537cc..06041c6 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Includes/TwoElementSchemaIncludeTestFixture.cs
@@ -1,42 +1,37 @@
+using MonoDevelop.XmlEditor.Completion;
+using NUnit.Framework;
+using MonoDevelop.XmlEditor.Tests.Utils;
+using MonoDevelop.XmlEditor.Tests.Schema;
-using MonoDevelop.XmlEditor;
-using MonoDevelop.Ide.CodeCompletion;
-using NUnit.Framework;
-using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
-using MonoDevelop.XmlEditor.Tests.Schema;
-
-namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
-{
- /// <summary>
- /// Tests that schemas referenced via xs:include elements are used when
- /// generating completion data.
- /// </summary>
- [TestFixture]
- public class TwoElementSchemaIncludeTestFixture : TwoElementSchemaTestFixture
- {
- [TestFixtureTearDown]
- public void FixtureTearDown()
- {
- SchemaIncludeTestFixtureHelper.FixtureTearDown();
- }
-
- protected override XmlSchemaCompletionData CreateSchemaCompletionDataObject()
- {
- return SchemaIncludeTestFixtureHelper.CreateSchemaCompletionDataObject(GetMainSchema(), GetSchema());
- }
-
- string GetMainSchema()
- {
- return "<xs:schema \r\n" +
- "targetNamespace=\"http://www.w3schools.com\" \r\n" +
- "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" \r\n" +
- "elementFormDefault=\"qualified\">\r\n" +
- "\t<xs:include schemaLocation=\"include.xsd\"/>\r\n" +
- "</xs:schema>";
- }
- }
-}
+namespace MonoDevelop.XmlEditor.Tests.Schema.Includes
+{
+ /// <summary>
+ /// Tests that schemas referenced via xs:include elements are used when
+ /// generating completion data.
+ /// </summary>
+ [TestFixture]
+ [Ignore]
+ public class TwoElementSchemaIncludeTestFixture : TwoElementSchemaTestFixture
+ {
+ [TestFixtureTearDown]
+ public void FixtureTearDown()
+ {
+ SchemaIncludeTestFixtureHelper.FixtureTearDown();
+ }
+
+ protected override XmlSchemaCompletionData CreateSchemaCompletionDataObject()
+ {
+ return SchemaIncludeTestFixtureHelper.CreateSchemaCompletionDataObject(GetMainSchema(), GetSchema());
+ }
+
+ string GetMainSchema()
+ {
+ return "<xs:schema \r\n" +
+ "targetNamespace=\"http://www.w3schools.com\" \r\n" +
+ "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" \r\n" +
+ "elementFormDefault=\"qualified\">\r\n" +
+ "\t<xs:include schemaLocation=\"include.xsd\"/>\r\n" +
+ "</xs:schema>";
+ }
+ }
+}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs
index c5645cb..c635f94 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema.Uri/GetUriTestFixture.cs
@@ -1,12 +1,6 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
-using System.IO;
-using System.Text;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.Schema.Uri
{
@@ -21,7 +15,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema.Uri
{
string fileName = @"C:\temp\foo.xml";
string expectedUri = "file:///C:/temp/foo.xml";
-
+
Assert.AreEqual(expectedUri, XmlSchemaCompletionData.GetUri(fileName));
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs
index 0e58b82..baccd90 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AbstractElementTestFixture.cs
@@ -1,9 +1,6 @@
-
-using MonoDevelop.XmlEditor;
using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,9 +10,9 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AbstractElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] itemsElementChildren;
- ICompletionData[] fileElementAttributes;
- ICompletionData[] fileElementChildren;
+ CompletionDataList itemsElementChildren;
+ CompletionDataList fileElementAttributes;
+ CompletionDataList fileElementChildren;
public override void FixtureInit()
{
@@ -35,7 +32,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void ItemsElementHasTwoChildElements()
{
- Assert.AreEqual(2, itemsElementChildren.Length,
+ Assert.AreEqual(2, itemsElementChildren.Count,
"Should be 2 child elements.");
}
@@ -60,7 +57,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void FileElementHasTwoChildElements()
{
- Assert.AreEqual(2, fileElementChildren.Length, "Should be 2 child elements.");
+ Assert.AreEqual(2, fileElementChildren.Count, "Should be 2 child elements.");
}
protected override string GetSchema()
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs
index a85ca51..241c719 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AllElementTestFixture.cs
@@ -1,9 +1,6 @@
-
-using MonoDevelop.XmlEditor;
using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,9 +11,9 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AllElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] personElementChildren;
- ICompletionData[] firstNameAttributes;
- ICompletionData[] firstNameElementChildren;
+ CompletionDataList personElementChildren;
+ CompletionDataList firstNameAttributes;
+ CompletionDataList firstNameElementChildren;
public override void FixtureInit()
{
@@ -32,20 +29,20 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void PersonElementHasTwoChildElements()
{
- Assert.AreEqual(2, personElementChildren.Length,
+ Assert.AreEqual(2, personElementChildren.Count,
"Should be 2 child elements.");
}
[Test]
public void FirstNameElementHasAttribute()
{
- Assert.AreEqual(1, firstNameAttributes.Length, "Should have one attribute.");
+ Assert.AreEqual(1, firstNameAttributes.Count, "Should have one attribute.");
}
[Test]
public void FirstNameElementHasChildren()
{
- Assert.AreEqual(2, firstNameElementChildren.Length,
+ Assert.AreEqual(2, firstNameElementChildren.Count,
"Should be 2 child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs
index d9c8d12..90f5ea8 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeAnnotationTestFixture.cs
@@ -1,10 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -15,8 +11,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AttributeAnnotationTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] fooAttributeCompletionData;
- ICompletionData[] barAttributeCompletionData;
+ CompletionDataList fooAttributeCompletionData;
+ CompletionDataList barAttributeCompletionData;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs
index 74eb9b2..ecc4d15 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeGroupRefTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AttributeGroupRefTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributeCompletionData;
+ CompletionDataList attributeCompletionData;
public override void FixtureInit()
{
@@ -25,7 +22,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AttributeCount()
{
- Assert.AreEqual(4, attributeCompletionData.Length, "Should be 4 attributes.");
+ Assert.AreEqual(4, attributeCompletionData.Count, "Should be 4 attributes.");
}
[Test]
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs
index 5112559..8fb20a7 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeRefTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AttributeRefTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributes;
+ CompletionDataList attributes;
public override void FixtureInit()
{
@@ -25,7 +22,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void HtmlAttributeCount()
{
- Assert.AreEqual(4, attributes.Length,
+ Assert.AreEqual(4, attributes.Count,
"Should be 4 attributes.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs
index db0be3c..530b728 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/AttributeValueAnnotationTestFixture.cs
@@ -1,10 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -15,7 +11,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class AttributeValueAnnotationTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] barAttributeValuesCompletionData;
+ CompletionDataList barAttributeValuesCompletionData;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs
index bb2c612..a62b190 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChildElementAttributesTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ChildElementAttributesTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributes;
+ CompletionDataList attributes;
public override void FixtureInit()
{
@@ -27,7 +24,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AttributeCount()
{
- Assert.AreEqual(10, attributes.Length, "Should be one attribute.");
+ Assert.AreEqual(10, attributes.Count, "Should be one attribute.");
}
[Test]
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs
index 0a1a55a..fa85794 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ChoiceTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,7 +11,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ChoiceTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] noteChildElements;
+ CompletionDataList noteChildElements;
public override void FixtureInit()
{
@@ -30,7 +27,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("title", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
@@ -40,14 +37,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
[Test]
public void NoteHasTwoChildElements()
{
- Assert.AreEqual(2, noteChildElements.Length,
+ Assert.AreEqual(2, noteChildElements.Count,
"Should be two child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs
index 5358a1d..3db0909 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ComplexContentExtensionTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,8 +10,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ComplexContentExtensionTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] bodyChildElements;
- ICompletionData[] bodyAttributes;
+ CompletionDataList bodyChildElements;
+ CompletionDataList bodyAttributes;
public override void FixtureInit()
{
@@ -32,7 +29,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
path.Elements.Add(new QualifiedName("body", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("title", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
@@ -43,14 +40,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
path.Elements.Add(new QualifiedName("body", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
[Test]
public void BodyHasTwoChildElements()
{
- Assert.AreEqual(2, bodyChildElements.Length,
+ Assert.AreEqual(2, bodyChildElements.Count,
"Should be two child elements.");
}
@@ -71,7 +68,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void BodyAttributeCount()
{
- Assert.AreEqual(1, bodyAttributes.Length,
+ Assert.AreEqual(1, bodyAttributes.Count,
"Should be one attribute.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs
index 8cb0ea8..2f37f1b 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/DuplicateElementTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class DuplicateElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] htmlChildElements;
+ CompletionDataList htmlChildElements;
public override void FixtureInit()
{
@@ -26,7 +23,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void HtmlHasTwoChildElements()
{
- Assert.AreEqual(2, htmlChildElements.Length,
+ Assert.AreEqual(2, htmlChildElements.Count,
"Should be 2 child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs
index ab06bc0..c3cf343 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementAnnotationTestFixture.cs
@@ -1,10 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -15,8 +11,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ElementAnnotationTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] fooChildElementCompletionData;
- ICompletionData[] rootElementCompletionData;
+ CompletionDataList fooChildElementCompletionData;
+ CompletionDataList rootElementCompletionData;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs
index 20e4e3e..f4b2484 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementRefAnnotationTestFixture.cs
@@ -1,10 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -15,7 +11,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ElementRefAnnotationTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] fooChildElementCompletionData;
+ CompletionDataList fooChildElementCompletionData;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
index 52fdd84..d0e6c65 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ElementWithAttributeSchemaTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,8 +10,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ElementWithAttributeSchemaTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributeCompletionData;
- string[] attributeName;
+ CompletionDataList attributeCompletionData;
+ string attributeName;
public override void FixtureInit()
{
@@ -22,25 +19,19 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path);
- attributeName = attributeCompletionData[0].Text;
+ attributeName = attributeCompletionData[0].DisplayText;
}
[Test]
public void AttributeCount()
{
- Assert.AreEqual(1, attributeCompletionData.Length, "Should be one attribute.");
+ Assert.AreEqual(1, attributeCompletionData.Count, "Should be one attribute.");
}
[Test]
public void AttributeName()
{
- Assert.AreEqual("name", attributeName[0], "Attribute name is incorrect.");
- }
-
- [Test]
- public void AttributeNameOverloadCount()
- {
- Assert.AreEqual(1, attributeName.Length, "Should only be one item in the array.");
+ Assert.AreEqual("name", attributeName, "Attribute name is incorrect.");
}
[Test]
@@ -48,9 +39,9 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
{
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("foobar", "http://www.w3schools.com"));
- ICompletionData[] attributes = SchemaCompletionData.GetAttributeCompletionData(path);
+ CompletionDataList attributes = SchemaCompletionData.GetAttributeCompletionData(path);
- Assert.AreEqual(0, attributes.Length, "Should not find attributes for unknown element.");
+ Assert.AreEqual(0, attributes.Count, "Should not find attributes for unknown element.");
}
protected override string GetSchema()
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs
index c16e374..cfd9e4c 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/EnumAttributeValueTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class EnumAttributeValueTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributeValues;
+ CompletionDataList attributeValues;
public override void FixtureInit()
{
@@ -39,7 +36,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void IdAttributeValueCount()
{
- Assert.AreEqual(2, attributeValues.Length, "Expecting 2 attribute values.");
+ Assert.AreEqual(2, attributeValues.Count, "Expecting 2 attribute values.");
}
protected override string GetSchema()
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs
index 27d129c..106f67d 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ExtensionElementTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,13 +10,13 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class ExtensionElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] schemaChildElements;
- ICompletionData[] annotationChildElements;
- ICompletionData[] annotationAttributes;
- ICompletionData[] includeAttributes;
- ICompletionData[] appInfoAttributes;
- //ICompletionData[] schemaAttributes;
- ICompletionData[] fooAttributes;
+ CompletionDataList schemaChildElements;
+ CompletionDataList annotationChildElements;
+ CompletionDataList annotationAttributes;
+ CompletionDataList includeAttributes;
+ CompletionDataList appInfoAttributes;
+ //CompletionDataList schemaAttributes;
+ CompletionDataList fooAttributes;
public override void FixtureInit()
{
@@ -53,7 +50,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void SchemaHasSevenChildElements()
{
- Assert.AreEqual(7, schemaChildElements.Length,
+ Assert.AreEqual(7, schemaChildElements.Count,
"Should be 7 child elements.");
}
@@ -91,7 +88,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AnnotationElementHasOneAttribute()
{
- Assert.AreEqual(1, annotationAttributes.Length, "Should be one attribute.");
+ Assert.AreEqual(1, annotationAttributes.Count, "Should be one attribute.");
}
[Test]
@@ -104,7 +101,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AnnotationHasTwoChildElements()
{
- Assert.AreEqual(2, annotationChildElements.Length,
+ Assert.AreEqual(2, annotationChildElements.Count,
"Should be 2 child elements.");
}
@@ -125,7 +122,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void IncludeElementHasOneAttribute()
{
- Assert.AreEqual(1, includeAttributes.Length, "Should be one attribute.");
+ Assert.AreEqual(1, includeAttributes.Count, "Should be one attribute.");
}
[Test]
@@ -138,7 +135,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AppInfoElementHasOneAttribute()
{
- Assert.AreEqual(1, appInfoAttributes.Length, "Should be one attribute.");
+ Assert.AreEqual(1, appInfoAttributes.Count, "Should be one attribute.");
}
[Test]
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
index 4184fdf..93147ee 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/FindAttributeFromComplexTypeTestFixture.cs
@@ -1,9 +1,5 @@
-
-using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
using System.Xml.Schema;
namespace MonoDevelop.XmlEditor.Tests.Schema
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs
index f9f7f92..b3f5e6e 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GetSchemaFromFileNameTestFixture.cs
@@ -1,12 +1,10 @@
-
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
-using System;
using MonoDevelop.XmlEditor.Tests.Utils;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
- [TestFixture]
+/* [TestFixture]
public class GetSchemaFromFileNameTestFixture
{
XmlSchemaCompletionDataCollection schemas;
@@ -21,7 +19,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
expectedNamespace = completionData.NamespaceUri;
completionData.FileName = @"/home/Schemas/MySchema.xsd";
schemas.Add(completionData);
-
+
provider = new XmlCompletionDataProvider(schemas, completionData, String.Empty, null);
}
@@ -44,5 +42,5 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
{
Assert.IsNull(schemas.GetSchemaFromFileName(@"/Test/test.xsd"));
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs
index 327cfb7..042b181 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefCompositorTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -17,8 +14,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class GroupRefAsCompositorTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] rootChildElements;
- ICompletionData[] fooAttributes;
+ CompletionDataList rootChildElements;
+ CompletionDataList fooAttributes;
public override void FixtureInit()
{
@@ -35,7 +32,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void RootHasTwoChildElements()
{
- Assert.AreEqual(2, rootChildElements.Length,
+ Assert.AreEqual(2, rootChildElements.Count,
"Should be two child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs
index 96b0a4e..94d47ab 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/GroupRefTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,8 +10,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class GroupRefTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] childElements;
- ICompletionData[] paraAttributes;
+ CompletionDataList childElements;
+ CompletionDataList paraAttributes;
public override void FixtureInit()
{
@@ -32,7 +29,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void BodyHasFourChildElements()
{
- Assert.AreEqual(4, childElements.Length,
+ Assert.AreEqual(4, childElements.Count,
"Should be 4 child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs
index dc09f1e..b5e5b77 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/MissingSchemaElementTestFixture.cs
@@ -1,16 +1,13 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
[TestFixture]
public class MissingSchemaElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] barElementAttributes;
+ CompletionDataList barElementAttributes;
public override void FixtureInit()
{
@@ -23,7 +20,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void BarHasOneAttribute()
{
- Assert.AreEqual(1, barElementAttributes.Length, "Should have 1 attribute.");
+ Assert.AreEqual(1, barElementAttributes.Count, "Should have 1 attribute.");
}
protected override string GetSchema()
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs
index dd53e13..415d3cb 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NamespaceCompletionTestFixture.cs
@@ -1,8 +1,6 @@
-
+using MonoDevelop.XmlEditor.Completion;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
@@ -14,7 +12,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class NamespaceCompletionTestFixture
{
- ICompletionData[] namespaceCompletionData;
+ CompletionDataList namespaceCompletionData;
string firstNamespace = "http://foo.com/foo.xsd";
string secondNamespace = "http://bar.com/bar.xsd";
@@ -30,13 +28,13 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
reader = new StringReader(GetSchema(secondNamespace));
schema = new XmlSchemaCompletionData(reader);
items.Add(schema);
- namespaceCompletionData = items.GetNamespaceCompletionData();
+ namespaceCompletionData = new CompletionDataList(items.GetNamespaceCompletionData());
}
[Test]
public void NamespaceCount()
{
- Assert.AreEqual(2, namespaceCompletionData.Length,
+ Assert.AreEqual(2, namespaceCompletionData.Count,
"Should be 2 namespaces.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
index 2bc83b9..a8a22b8 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedAttributeGroupRefTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class NestedAttributeGroupRefTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributeCompletionData;
+ CompletionDataList attributeCompletionData;
public override void FixtureInit()
{
@@ -25,7 +22,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void AttributeCount()
{
- Assert.AreEqual(7, attributeCompletionData.Length, "Should be 7 attributes.");
+ Assert.AreEqual(7, attributeCompletionData.Count, "Should be 7 attributes.");
}
[Test]
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs
index 6abb31e..ba7a905 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedChoiceTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,8 +11,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class NestedChoiceTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] noteChildElements;
- ICompletionData[] titleChildElements;
+ CompletionDataList noteChildElements;
+ CompletionDataList titleChildElements;
public override void FixtureInit()
{
@@ -33,7 +30,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void TitleHasTwoChildElements()
{
- Assert.AreEqual(2, titleChildElements.Length,
+ Assert.AreEqual(2, titleChildElements.Count,
"Should be 2 child elements.");
}
@@ -43,14 +40,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
[Test]
public void NoteHasTwoChildElements()
{
- Assert.AreEqual(2, noteChildElements.Length,
+ Assert.AreEqual(2, noteChildElements.Count,
"Should be two child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs
index 58bfeb3..6a74b85 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedElementSchemaTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -11,7 +8,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
public class NestedElementSchemaTestFixture : SchemaTestFixtureBase
{
XmlElementPath noteElementPath;
- ICompletionData[] elementData;
+ CompletionDataList elementData;
public override void FixtureInit()
{
@@ -24,7 +21,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void NoteHasOneChildElementCompletionDataItem()
{
- Assert.AreEqual(1, elementData.Length, "Should be one child element completion data item.");
+ Assert.AreEqual(1, elementData.Count, "Should be one child element completion data item.");
}
[Test]
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs
index 4df0583..7c2958d 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/NestedSequenceTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,7 +11,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class NestedSequenceSchemaTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] noteChildElements;
+ CompletionDataList noteChildElements;
public override void FixtureInit()
{
@@ -29,7 +26,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("title", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
@@ -39,14 +36,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlElementPath path = new XmlElementPath();
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("text", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
[Test]
public void NoteHasTwoChildElements()
{
- Assert.AreEqual(2, noteChildElements.Length,
+ Assert.AreEqual(2, noteChildElements.Count,
"Should be two child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs
index 90ca113..88cc647 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/ReferencedElementsTestFixture.cs
@@ -1,17 +1,14 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
[TestFixture]
public class ReferencedElementsTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] shipOrderAttributes;
- ICompletionData[] shipToAttributes;
+ CompletionDataList shipOrderAttributes;
+ CompletionDataList shipToAttributes;
XmlElementPath shipToPath;
XmlElementPath shipOrderPath;
@@ -36,7 +33,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void OneShipOrderAttribute()
{
- Assert.AreEqual(1, shipOrderAttributes.Length, "Should only have one shiporder attribute.");
+ Assert.AreEqual(1, shipOrderAttributes.Count, "Should only have one shiporder attribute.");
}
[Test]
@@ -49,7 +46,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void OneShipToAttribute()
{
- Assert.AreEqual(1, shipToAttributes.Length, "Should only have one shipto attribute.");
+ Assert.AreEqual(1, shipToAttributes.Count, "Should only have one shipto attribute.");
}
[Test]
@@ -62,14 +59,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void ShipOrderChildElementsCount()
{
- Assert.AreEqual(1, SchemaCompletionData.GetChildElementCompletionData(shipOrderPath).Length,
+ Assert.AreEqual(1, SchemaCompletionData.GetChildElementCompletionData(shipOrderPath).Count,
"Should be one child element.");
}
[Test]
public void ShipOrderHasShipToChildElement()
{
- ICompletionData[] data = SchemaCompletionData.GetChildElementCompletionData(shipOrderPath);
+ CompletionDataList data = SchemaCompletionData.GetChildElementCompletionData(shipOrderPath);
Assert.IsTrue(SchemaTestFixtureBase.Contains(data, "shipto"),
"Incorrect child element name.");
}
@@ -77,14 +74,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void ShipToChildElementsCount()
{
- Assert.AreEqual(2, SchemaCompletionData.GetChildElementCompletionData(shipToPath).Length,
+ Assert.AreEqual(2, SchemaCompletionData.GetChildElementCompletionData(shipToPath).Count,
"Should be 2 child elements.");
}
[Test]
public void ShipToHasNameChildElement()
{
- ICompletionData[] data = SchemaCompletionData.GetChildElementCompletionData(shipToPath);
+ CompletionDataList data = SchemaCompletionData.GetChildElementCompletionData(shipToPath);
Assert.IsTrue(SchemaTestFixtureBase.Contains(data, "name"),
"Incorrect child element name.");
}
@@ -92,7 +89,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void ShipToHasAddressChildElement()
{
- ICompletionData[] data = SchemaCompletionData.GetChildElementCompletionData(shipToPath);
+ CompletionDataList data = SchemaCompletionData.GetChildElementCompletionData(shipToPath);
Assert.IsTrue(SchemaTestFixtureBase.Contains(data, "address"),
"Incorrect child element name.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs
index d1a99cb..0a6053f 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/RestrictionElementTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,10 +10,10 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class RestrictionElementTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] childElements;
- ICompletionData[] attributes;
- ICompletionData[] annotationChildElements;
- ICompletionData[] choiceChildElements;
+ CompletionDataList childElements;
+ CompletionDataList attributes;
+ CompletionDataList annotationChildElements;
+ CompletionDataList choiceChildElements;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs
index 51b3f9e..3fc9b0c 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaAssociationTests.cs
@@ -1,3 +1,4 @@
+using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
using System.IO;
@@ -13,20 +14,20 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
XmlWriter writer;
[SetUp]
- public void Init()
+ public void Init ()
{
- xml = new StringBuilder();
- XmlWriterSettings settings = new XmlWriterSettings();
+ xml = new StringBuilder ();
+ XmlWriterSettings settings = new XmlWriterSettings ();
settings.Indent = true;
settings.OmitXmlDeclaration = true;
settings.IndentChars = "\t";
- writer = XmlWriter.Create(xml, settings);
+ writer = XmlWriter.Create (xml, settings);
}
[Test]
public void ToXml()
{
- XmlSchemaAssociation schema = new XmlSchemaAssociation(".xml", "http://mono-project.com");
+ XmlFileAssociation schema = new XmlFileAssociation (".xml", "http://mono-project.com", null);
schema.WriteTo(writer);
string expectedXml = "<SchemaAssociation extension=\".xml\" namespace=\"http://mono-project.com\" prefix=\"\" />";
@@ -36,13 +37,13 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void FromXml()
{
- XmlSchemaAssociation expectedSchema = new XmlSchemaAssociation(".xml", "http://mono-project.com");
+ XmlFileAssociation expectedSchema = new XmlFileAssociation (".xml", "http://mono-project.com", null);
expectedSchema.WriteTo(writer);
string propertiesXml = "<SerializedNode>" + xml.ToString() + "</SerializedNode>";
- XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- XmlSchemaAssociation schema = new MonoDevelop.XmlEditor.XmlSchemaAssociation(String.Empty);
- schema = (XmlSchemaAssociation)schema.ReadFrom(reader);
+ XmlTextReader reader = new XmlTextReader (new StringReader(propertiesXml));
+ XmlFileAssociation schema = new XmlFileAssociation ();
+ schema = (XmlFileAssociation)schema.ReadFrom (reader);
Assert.AreEqual(expectedSchema.Extension, schema.Extension);
Assert.AreEqual(expectedSchema.NamespacePrefix, schema.NamespacePrefix);
@@ -54,8 +55,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
{
string propertiesXml = "<SerializedNode/>";
XmlTextReader reader = new XmlTextReader(new StringReader(propertiesXml));
- XmlSchemaAssociation schema = new MonoDevelop.XmlEditor.XmlSchemaAssociation(String.Empty);
- Assert.IsNull(schema.ReadFrom(reader));
+ XmlFileAssociation schema = new XmlFileAssociation();
+ Assert.IsNull(schema.ReadFrom (reader));
}
}
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs
index 9fcbc87..731c9c1 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SchemaTestFixtureBase.cs
@@ -1,6 +1,6 @@
-
+using ICSharpCode.NRefactory.Completion;
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using NUnit.Framework;
using System;
using System.IO;
@@ -9,7 +9,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
{
[TestFixture]
public abstract class SchemaTestFixtureBase
- {
+ {
XmlSchemaCompletionData schemaCompletionData;
/// <summary>
@@ -48,12 +48,12 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
/// <summary>
/// Checks whether the specified name exists in the completion data.
/// </summary>
- public static bool Contains(ICompletionData[] items, string name)
+ public static bool Contains(CompletionDataList items, string name)
{
bool Contains = false;
foreach (ICompletionData data in items) {
- if (data.Text[0] == name) {
+ if (data.DisplayText == name) {
Contains = true;
break;
}
@@ -66,12 +66,12 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
/// Checks whether the completion data specified by name has
/// the correct description.
/// </summary>
- public static bool ContainsDescription(ICompletionData[] items, string name, string description)
+ public static bool ContainsDescription(CompletionDataList items, string name, string description)
{
bool Contains = false;
foreach (ICompletionData data in items) {
- if (data.Text[0] == name) {
+ if (data.DisplayText == name) {
if (data.Description == description) {
Contains = true;
break;
@@ -86,12 +86,12 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
/// Gets a count of the number of occurrences of a particular name
/// in the completion data.
/// </summary>
- public static int GetItemCount(ICompletionData[] items, string name)
+ public static int GetItemCount(CompletionDataList items, string name)
{
int count = 0;
foreach (ICompletionData data in items) {
- if (data.Text[0] == name) {
+ if (data.DisplayText == name) {
++count;
}
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs
index 225f634..56f0c88 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SequencedChoiceTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,7 +11,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class SequencedChoiceTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] noteChildElements;
+ CompletionDataList noteChildElements;
public override void FixtureInit()
{
@@ -31,7 +28,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("title", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
@@ -42,14 +39,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com"));
path.Elements.Add(new QualifiedName("title", "http://www.w3schools.com"));
- Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Length,
+ Assert.AreEqual(0, SchemaCompletionData.GetChildElementCompletionData(path).Count,
"Should be no child elements.");
}
[Test]
public void NoteHasTwoChildElements()
{
- Assert.AreEqual(2, noteChildElements.Length,
+ Assert.AreEqual(2, noteChildElements.Count,
"Should be two child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
index aa565f6..a9d29ac 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SimpleContentWithAttributeTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -13,7 +10,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class SimpleContentWithAttributeSchemaTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] attributeCompletionData;
+ CompletionDataList attributeCompletionData;
public override void FixtureInit()
{
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs
index fdd0dd4..62ba570 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/SingleElementSchemaTestFixture.cs
@@ -1,9 +1,6 @@
-
using MonoDevelop.Ide.CodeCompletion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -14,8 +11,8 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[TestFixture]
public class SingleElementSchemaTestFixture : SchemaTestFixtureBase
{
- ICompletionData[] childElementCompletionData;
- ICompletionData[] attributeCompletionData;
+ CompletionDataList childElementCompletionData;
+ CompletionDataList attributeCompletionData;
public override void FixtureInit()
{
@@ -40,14 +37,14 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void NoteElementHasNoAttributes()
{
- Assert.AreEqual(0, attributeCompletionData.Length,
+ Assert.AreEqual(0, attributeCompletionData.Count,
"Not expecting any attributes.");
}
[Test]
public void NoteElementHasNoChildElements()
{
- Assert.AreEqual(0, childElementCompletionData.Length, "" +
+ Assert.AreEqual(0, childElementCompletionData.Count, "" +
"Not expecting any child elements.");
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs
index 62a3472..7d8b7f6 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/TwoElementSchemaTestFixture.cs
@@ -1,9 +1,5 @@
-
using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
namespace MonoDevelop.XmlEditor.Tests.Schema
{
@@ -33,16 +29,16 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void TextElementHasOneAttribute()
{
- ICompletionData[] attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath);
+ CompletionDataList attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath);
- Assert.AreEqual(1, attributesCompletionData.Length,
+ Assert.AreEqual(1, attributesCompletionData.Count,
"Should have 1 text attribute.");
}
[Test]
public void TextElementAttributeName()
{
- ICompletionData[] attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath);
+ CompletionDataList attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath);
Assert.IsTrue(SchemaTestFixtureBase.Contains(attributesCompletionData, "foo"),
"Unexpected text attribute name.");
}
@@ -50,36 +46,36 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void NoteElementHasChildElement()
{
- ICompletionData[] childElementCompletionData
+ CompletionDataList childElementCompletionData
= SchemaCompletionData.GetChildElementCompletionData(noteElementPath);
- Assert.AreEqual(1, childElementCompletionData.Length,
+ Assert.AreEqual(1, childElementCompletionData.Count,
"Should be one child.");
}
[Test]
public void NoteElementHasNoAttributes()
{
- ICompletionData[] attributeCompletionData
+ CompletionDataList attributeCompletionData
= SchemaCompletionData.GetAttributeCompletionData(noteElementPath);
- Assert.AreEqual(0, attributeCompletionData.Length,
+ Assert.AreEqual(0, attributeCompletionData.Count,
"Should no attributes.");
}
[Test]
public void OneRootElement()
{
- ICompletionData[] elementCompletionData
+ CompletionDataList elementCompletionData
= SchemaCompletionData.GetElementCompletionData();
- Assert.AreEqual(1, elementCompletionData.Length, "Should be 1 root element.");
+ Assert.AreEqual(1, elementCompletionData.Count, "Should be 1 root element.");
}
[Test]
public void RootElementIsNote()
{
- ICompletionData[] elementCompletionData
+ CompletionDataList elementCompletionData
= SchemaCompletionData.GetElementCompletionData();
Assert.IsTrue(Contains(elementCompletionData, "note"),
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
index b2f3bcb..dc6cc26 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XhtmlStrictSchemaTestFixture.cs
@@ -1,9 +1,7 @@
-
-using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.XmlEditor.Completion;
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
-using System.IO;
using System.Xml;
using MonoDevelop.XmlEditor.Tests.Utils;
@@ -17,7 +15,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
{
XmlSchemaCompletionData schemaCompletionData;
XmlElementPath h1Path;
- ICompletionData[] h1Attributes;
+ CompletionDataList h1Attributes;
string namespaceURI = "http://www.w3.org/1999/xhtml";
[TestFixtureSetUp]
@@ -39,7 +37,7 @@ namespace MonoDevelop.XmlEditor.Tests.Schema
[Test]
public void H1HasAttributes()
{
- Assert.IsTrue(h1Attributes.Length > 0, "Should have at least one attribute.");
+ Assert.IsTrue(h1Attributes.Count > 0, "Should have at least one attribute.");
}
}
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs
index a120afd..b98ab6e 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XmlSchemaNamespaceTests.cs
@@ -1,4 +1,3 @@
-
using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs
index 5061b71..8f17198 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Schema/XsdSchemaTestFixture.cs
@@ -1,251 +1,250 @@
-
-using MonoDevelop.Ide.CodeCompletion;
-using MonoDevelop.XmlEditor;
-using NUnit.Framework;
-using System;
-using System.IO;
-using System.Xml;
-using MonoDevelop.XmlEditor.Tests.Utils;
-
-namespace MonoDevelop.XmlEditor.Tests.Schema
-{
- /// <summary>
- /// Tests the xsd schema.
- /// </summary>
- [TestFixture]
- public class XsdSchemaTestFixture
- {
- XmlSchemaCompletionData schemaCompletionData;
- XmlElementPath choicePath;
- XmlElementPath elementPath;
- XmlElementPath simpleEnumPath;
- XmlElementPath enumPath;
- XmlElementPath allElementPath;
- XmlElementPath allElementAnnotationPath;
- ICompletionData[] choiceAttributes;
- ICompletionData[] elementAttributes;
- ICompletionData[] simpleEnumElements;
- ICompletionData[] enumAttributes;
- ICompletionData[] elementFormDefaultAttributeValues;
- ICompletionData[] blockDefaultAttributeValues;
- ICompletionData[] finalDefaultAttributeValues;
- ICompletionData[] mixedAttributeValues;
- ICompletionData[] maxOccursAttributeValues;
- ICompletionData[] allElementChildElements;
- ICompletionData[] allElementAnnotationChildElements;
-
- string namespaceURI = "http://www.w3.org/2001/XMLSchema";
- string prefix = "xs";
-
- [TestFixtureSetUp]
- public void FixtureInit()
- {
- XmlTextReader reader = ResourceManager.GetXsdSchema();
- schemaCompletionData = new XmlSchemaCompletionData(reader);
-
- // Set up choice element's path.
- choicePath = new XmlElementPath();
- choicePath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
- choicePath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
- choicePath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
-
- mixedAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(choicePath, "mixed");
-
- choicePath.Elements.Add(new QualifiedName("choice", namespaceURI, prefix));
-
- // Get choice element info.
- choiceAttributes = schemaCompletionData.GetAttributeCompletionData(choicePath);
- maxOccursAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(choicePath, "maxOccurs");
-
- // Set up element path.
- elementPath = new XmlElementPath();
- elementPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
-
- elementFormDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "elementFormDefault");
- blockDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "blockDefault");
- finalDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "finalDefault");
-
- elementPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
-
- // Get element attribute info.
- elementAttributes = schemaCompletionData.GetAttributeCompletionData(elementPath);
-
- // Set up simple enum type path.
- simpleEnumPath = new XmlElementPath();
- simpleEnumPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
- simpleEnumPath.Elements.Add(new QualifiedName("simpleType", namespaceURI, prefix));
- simpleEnumPath.Elements.Add(new QualifiedName("restriction", namespaceURI, prefix));
-
- // Get child elements.
- simpleEnumElements = schemaCompletionData.GetChildElementCompletionData(simpleEnumPath);
-
- // Set up enum path.
- enumPath = new XmlElementPath();
- enumPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
- enumPath.Elements.Add(new QualifiedName("simpleType", namespaceURI, prefix));
- enumPath.Elements.Add(new QualifiedName("restriction", namespaceURI, prefix));
- enumPath.Elements.Add(new QualifiedName("enumeration", namespaceURI, prefix));
-
- // Get attributes.
- enumAttributes = schemaCompletionData.GetAttributeCompletionData(enumPath);
+using MonoDevelop.Ide.CodeCompletion;
+using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
+using NUnit.Framework;
+using System.Xml;
+using MonoDevelop.XmlEditor.Tests.Utils;
+
+namespace MonoDevelop.XmlEditor.Tests.Schema
+{
+ /// <summary>
+ /// Tests the xsd schema.
+ /// </summary>
+ [TestFixture]
+ public class XsdSchemaTestFixture
+ {
+ XmlSchemaCompletionData schemaCompletionData;
+ XmlElementPath choicePath;
+ XmlElementPath elementPath;
+ XmlElementPath simpleEnumPath;
+ XmlElementPath enumPath;
+ XmlElementPath allElementPath;
+ XmlElementPath allElementAnnotationPath;
+ CompletionDataList choiceAttributes;
+ CompletionDataList elementAttributes;
+ CompletionDataList simpleEnumElements;
+ CompletionDataList enumAttributes;
+ CompletionDataList elementFormDefaultAttributeValues;
+ CompletionDataList blockDefaultAttributeValues;
+ CompletionDataList finalDefaultAttributeValues;
+ CompletionDataList mixedAttributeValues;
+ CompletionDataList maxOccursAttributeValues;
+ CompletionDataList allElementChildElements;
+ CompletionDataList allElementAnnotationChildElements;
+
+ string namespaceURI = "http://www.w3.org/2001/XMLSchema";
+ string prefix = "xs";
+
+ [TestFixtureSetUp]
+ public void FixtureInit()
+ {
+ XmlTextReader reader = ResourceManager.GetXsdSchema();
+ schemaCompletionData = new XmlSchemaCompletionData(reader);
+
+ // Set up choice element's path.
+ choicePath = new XmlElementPath();
+ choicePath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+ choicePath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
+ choicePath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
+
+ mixedAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(choicePath, "mixed");
+
+ choicePath.Elements.Add(new QualifiedName("choice", namespaceURI, prefix));
+
+ // Get choice element info.
+ choiceAttributes = schemaCompletionData.GetAttributeCompletionData(choicePath);
+ maxOccursAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(choicePath, "maxOccurs");
+
+ // Set up element path.
+ elementPath = new XmlElementPath();
+ elementPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+
+ elementFormDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "elementFormDefault");
+ blockDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "blockDefault");
+ finalDefaultAttributeValues = schemaCompletionData.GetAttributeValueCompletionData(elementPath, "finalDefault");
+
+ elementPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
+
+ // Get element attribute info.
+ elementAttributes = schemaCompletionData.GetAttributeCompletionData(elementPath);
+
+ // Set up simple enum type path.
+ simpleEnumPath = new XmlElementPath();
+ simpleEnumPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+ simpleEnumPath.Elements.Add(new QualifiedName("simpleType", namespaceURI, prefix));
+ simpleEnumPath.Elements.Add(new QualifiedName("restriction", namespaceURI, prefix));
+
+ // Get child elements.
+ simpleEnumElements = schemaCompletionData.GetChildElementCompletionData(simpleEnumPath);
+
+ // Set up enum path.
+ enumPath = new XmlElementPath();
+ enumPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+ enumPath.Elements.Add(new QualifiedName("simpleType", namespaceURI, prefix));
+ enumPath.Elements.Add(new QualifiedName("restriction", namespaceURI, prefix));
+ enumPath.Elements.Add(new QualifiedName("enumeration", namespaceURI, prefix));
+
+ // Get attributes.
+ enumAttributes = schemaCompletionData.GetAttributeCompletionData(enumPath);
+
+ // Set up xs:all path.
+ allElementPath = new XmlElementPath();
+ allElementPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+ allElementPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
+ allElementPath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
+ allElementPath.Elements.Add(new QualifiedName("all", namespaceURI, prefix));
+
+ // Get child elements of the xs:all element.
+ allElementChildElements = schemaCompletionData.GetChildElementCompletionData(allElementPath);
+
+ // Set up the path to the annotation element that is a child of xs:all.
+ allElementAnnotationPath = new XmlElementPath();
+ allElementAnnotationPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
+ allElementAnnotationPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
+ allElementAnnotationPath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
+ allElementAnnotationPath.Elements.Add(new QualifiedName("all", namespaceURI, prefix));
+ allElementAnnotationPath.Elements.Add(new QualifiedName("annotation", namespaceURI, prefix));
- // Set up xs:all path.
- allElementPath = new XmlElementPath();
- allElementPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
- allElementPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
- allElementPath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
- allElementPath.Elements.Add(new QualifiedName("all", namespaceURI, prefix));
-
- // Get child elements of the xs:all element.
- allElementChildElements = schemaCompletionData.GetChildElementCompletionData(allElementPath);
-
- // Set up the path to the annotation element that is a child of xs:all.
- allElementAnnotationPath = new XmlElementPath();
- allElementAnnotationPath.Elements.Add(new QualifiedName("schema", namespaceURI, prefix));
- allElementAnnotationPath.Elements.Add(new QualifiedName("element", namespaceURI, prefix));
- allElementAnnotationPath.Elements.Add(new QualifiedName("complexType", namespaceURI, prefix));
- allElementAnnotationPath.Elements.Add(new QualifiedName("all", namespaceURI, prefix));
- allElementAnnotationPath.Elements.Add(new QualifiedName("annotation", namespaceURI, prefix));
-
- // Get the xs:all annotation child element.
- allElementAnnotationChildElements = schemaCompletionData.GetChildElementCompletionData(allElementAnnotationPath);
- }
-
- [Test]
- public void ChoiceHasAttributes()
- {
- Assert.IsTrue(choiceAttributes.Length > 0, "Should have at least one attribute.");
- }
-
- [Test]
- public void ChoiceHasMinOccursAttribute()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(choiceAttributes, "minOccurs"),
- "Attribute minOccurs missing.");
- }
-
- [Test]
- public void ChoiceHasMaxOccursAttribute()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(choiceAttributes, "maxOccurs"),
- "Attribute maxOccurs missing.");
- }
-
- /// <summary>
- /// Tests that prohibited attributes are not added to the completion data.
- /// </summary>
- [Test]
- public void ChoiceDoesNotHaveNameAttribute()
- {
- Assert.IsFalse(SchemaTestFixtureBase.Contains(choiceAttributes, "name"),
- "Attribute name should not exist.");
- }
-
- /// <summary>
- /// Tests that prohibited attributes are not added to the completion data.
- /// </summary>
- [Test]
- public void ChoiceDoesNotHaveRefAttribute()
- {
- Assert.IsFalse(SchemaTestFixtureBase.Contains(choiceAttributes, "ref"),
- "Attribute ref should not exist.");
- }
-
- /// <summary>
- /// Duplicate attribute test.
- /// </summary>
- [Test]
- public void ElementNameAttributeAppearsOnce()
- {
- int nameAttributeCount = SchemaTestFixtureBase.GetItemCount(elementAttributes, "name");
- Assert.AreEqual(1, nameAttributeCount, "Should be only one name attribute.");
- }
-
- [Test]
- public void ElementHasIdAttribute()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(elementAttributes, "id"),
- "id attribute missing.");
- }
-
- [Test]
- public void SimpleRestrictionTypeHasEnumChildElement()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(simpleEnumElements, "xs:enumeration"),
- "enumeration element missing.");
- }
-
- [Test]
- public void EnumHasValueAttribute()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(enumAttributes, "value"),
- "Attribute value missing.");
- }
-
- [Test]
- public void ElementFormDefaultAttributeHasValueQualified()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(elementFormDefaultAttributeValues, "qualified"),
- "Attribute value 'qualified' missing.");
- }
-
- [Test]
- public void BlockDefaultAttributeHasValueAll()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(blockDefaultAttributeValues, "#all"),
- "Attribute value '#all' missing.");
- }
-
- [Test]
- public void BlockDefaultAttributeHasValueExtension()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(blockDefaultAttributeValues, "extension"),
- "Attribute value 'extension' missing.");
- }
-
- [Test]
- public void FinalDefaultAttributeHasValueList()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(finalDefaultAttributeValues, "list"),
- "Attribute value 'list' missing.");
- }
-
- /// <summary>
- /// xs:boolean tests.
- /// </summary>
- [Test]
- public void MixedAttributeHasValueTrue()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(mixedAttributeValues, "true"),
- "Attribute value 'true' missing.");
- }
-
- [Test]
- public void MaxOccursAttributeHasValueUnbounded()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(maxOccursAttributeValues, "unbounded"),
- "Attribute value 'unbounded' missing.");
+ // Get the xs:all annotation child element.
+ allElementAnnotationChildElements = schemaCompletionData.GetChildElementCompletionData(allElementAnnotationPath);
+ }
+
+ [Test]
+ public void ChoiceHasAttributes()
+ {
+ Assert.IsTrue(choiceAttributes.Count > 0, "Should have at least one attribute.");
+ }
+
+ [Test]
+ public void ChoiceHasMinOccursAttribute()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(choiceAttributes, "minOccurs"),
+ "Attribute minOccurs missing.");
+ }
+
+ [Test]
+ public void ChoiceHasMaxOccursAttribute()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(choiceAttributes, "maxOccurs"),
+ "Attribute maxOccurs missing.");
+ }
+
+ /// <summary>
+ /// Tests that prohibited attributes are not added to the completion data.
+ /// </summary>
+ [Test]
+ public void ChoiceDoesNotHaveNameAttribute()
+ {
+ Assert.IsFalse(SchemaTestFixtureBase.Contains(choiceAttributes, "name"),
+ "Attribute name should not exist.");
+ }
+
+ /// <summary>
+ /// Tests that prohibited attributes are not added to the completion data.
+ /// </summary>
+ [Test]
+ public void ChoiceDoesNotHaveRefAttribute()
+ {
+ Assert.IsFalse(SchemaTestFixtureBase.Contains(choiceAttributes, "ref"),
+ "Attribute ref should not exist.");
+ }
+
+ /// <summary>
+ /// Duplicate attribute test.
+ /// </summary>
+ [Test]
+ public void ElementNameAttributeAppearsOnce()
+ {
+ int nameAttributeCount = SchemaTestFixtureBase.GetItemCount(elementAttributes, "name");
+ Assert.AreEqual(1, nameAttributeCount, "Should be only one name attribute.");
+ }
+
+ [Test]
+ public void ElementHasIdAttribute()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(elementAttributes, "id"),
+ "id attribute missing.");
+ }
+
+ [Test]
+ public void SimpleRestrictionTypeHasEnumChildElement()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(simpleEnumElements, "xs:enumeration"),
+ "enumeration element missing.");
+ }
+
+ [Test]
+ public void EnumHasValueAttribute()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(enumAttributes, "value"),
+ "Attribute value missing.");
+ }
+
+ [Test]
+ public void ElementFormDefaultAttributeHasValueQualified()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(elementFormDefaultAttributeValues, "qualified"),
+ "Attribute value 'qualified' missing.");
+ }
+
+ [Test]
+ public void BlockDefaultAttributeHasValueAll()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(blockDefaultAttributeValues, "#all"),
+ "Attribute value '#all' missing.");
+ }
+
+ [Test]
+ public void BlockDefaultAttributeHasValueExtension()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(blockDefaultAttributeValues, "extension"),
+ "Attribute value 'extension' missing.");
+ }
+
+ [Test]
+ public void FinalDefaultAttributeHasValueList()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(finalDefaultAttributeValues, "list"),
+ "Attribute value 'list' missing.");
+ }
+
+ /// <summary>
+ /// xs:boolean tests.
+ /// </summary>
+ [Test]
+ [Ignore]
+ public void MixedAttributeHasValueTrue()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(mixedAttributeValues, "true"),
+ "Attribute value 'true' missing.");
+ }
+
+ [Test]
+ public void MaxOccursAttributeHasValueUnbounded()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(maxOccursAttributeValues, "unbounded"),
+ "Attribute value 'unbounded' missing.");
+ }
+
+ [Test]
+ public void AllElementHasAnnotationChildElement()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementChildElements, "xs:annotation"),
+ "Should have an annotation child element.");
+ }
+
+ [Test]
+ public void AllElementHasElementChildElement()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementChildElements, "xs:element"),
+ "Should have an child element called 'element'.");
}
- [Test]
- public void AllElementHasAnnotationChildElement()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementChildElements, "xs:annotation"),
- "Should have an annotation child element.");
- }
-
- [Test]
- public void AllElementHasElementChildElement()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementChildElements, "xs:element"),
- "Should have an child element called 'element'.");
- }
-
- [Test]
- public void AllElementAnnotationHasDocumentationChildElement()
- {
- Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementAnnotationChildElements, "xs:documentation"),
- "Should have documentation child element.");
- }
- }
-}
+ [Test]
+ public void AllElementAnnotationHasDocumentationChildElement()
+ {
+ Assert.IsTrue(SchemaTestFixtureBase.Contains(allElementAnnotationChildElements, "xs:documentation"),
+ "Should have documentation child element.");
+ }
+ }
+}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs
index 157ac4f..493e495 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Utils/ResourceManager.cs
@@ -1,5 +1,3 @@
-
-using System;
using System.IO;
using System.Reflection;
using System.Xml;
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs b/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
index b3ffbeb..bdb1799 100755
--- a/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/Utils/SchemaIncludeTestFixtureHelper.cs
@@ -1,5 +1,4 @@
-
-using MonoDevelop.XmlEditor;
+using MonoDevelop.XmlEditor.Completion;
using System;
using System.IO;
using System.Text;
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs
index bfcf10d..5404997 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/RunXPathQueryTests.cs
@@ -1,4 +1,3 @@
-
using MonoDevelop.XmlEditor;
using NUnit.Framework;
using System;
@@ -9,7 +8,7 @@ using System.Xml.XPath;
namespace MonoDevelop.XmlEditor.Tests.XPathQuery
{
- [TestFixture]
+/* [TestFixture]
public class RunXPathQueryTests
{
[Test]
@@ -18,6 +17,7 @@ namespace MonoDevelop.XmlEditor.Tests.XPathQuery
string xml = "<root>\r\n" +
"\t<foo/>\r\n" +
"</root>";
+
XPathNodeMatch[] nodes = XmlEditorView.SelectNodes(xml, "//foo");
XPathNodeMatch node = nodes[0];
IXmlLineInfo lineInfo = node as IXmlLineInfo;
@@ -165,5 +165,5 @@ namespace MonoDevelop.XmlEditor.Tests.XPathQuery
Assert.AreEqual("Id", node.Value);
Assert.AreEqual("@Id", node.DisplayValue);
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs
index 6279ba3..def98dd 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathHistoryListTests.cs
@@ -1,14 +1,11 @@
-
-using MonoDevelop.Core;
using NUnit.Framework;
-using System;
using System.IO;
using System.Text;
using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.XPathQuery
{
- [TestFixture]
+/* [TestFixture]
public class XPathHistoryListTests
{
StringBuilder xml;
@@ -106,5 +103,5 @@ namespace MonoDevelop.XmlEditor.Tests.XPathQuery
list = (XPathHistoryList)list.ReadFrom(reader);
Assert.AreEqual(0, list.GetXPaths().Length);
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs
index 02d4500..45ac127 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XPathNamespaceListTests.cs
@@ -8,7 +8,7 @@ using System.Xml;
namespace MonoDevelop.XmlEditor.Tests.XPathQuery
{
- [TestFixture]
+/* [TestFixture]
public class XPathNamespaceListTests
{
StringBuilder xml;
@@ -126,5 +126,5 @@ namespace MonoDevelop.XmlEditor.Tests.XPathQuery
list = (XPathNamespaceList)list.ReadFrom(reader);
Assert.AreEqual(0, list.GetNamespaces().Length);
}
- }
+ }*/
}
diff --git a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs
index b42e0f3..069c100 100644
--- a/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs
+++ b/src/addins/MonoDevelop.XmlEditor/Tests/XPathQuery/XmlNamespaceTests.cs
@@ -1,7 +1,6 @@
using MonoDevelop.XmlEditor;
using NUnit.Framework;
-using System;
namespace MonoDevelop.XmlEditor.Tests.XPathQuery
{
diff --git a/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.Xml.Formatting.MonoXmlPolicy.xml b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.Xml.Formatting.MonoXmlPolicy.xml
new file mode 100644
index 0000000..c85c952
--- /dev/null
+++ b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.Xml.Formatting.MonoXmlPolicy.xml
@@ -0,0 +1,19 @@
+<XmlFormattingPolicy scope="application/xml" allowDiffSerialize="True">
+ <DefaultFormat
+ OmitXmlDeclaration="False"
+ NewLineChars="
"
+ IndentContent="True"
+ ContentIndentString=" "
+ AttributesInNewLine="False"
+ MaxAttributesPerLine="10"
+ AttributesIndentString=" "
+ AlignAttributes="False"
+ AlignAttributeValues="False"
+ QuoteChar="""
+ SpacesBeforeAssignment="0"
+ SpacesAfterAssignment="0"
+ EmptyLinesBeforeStart="0"
+ EmptyLinesAfterStart="0"
+ EmptyLinesBeforeEnd="0"
+ EmptyLinesAfterEnd="0" />
+</XmlFormattingPolicy>
diff --git a/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.XmlEditor.addin.xml b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.XmlEditor.addin.xml
new file mode 100644
index 0000000..7348295
--- /dev/null
+++ b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.XmlEditor.addin.xml
@@ -0,0 +1,157 @@
+<Addin name = "XML Editor"
+ id = "XmlEditor"
+ namespace = "MonoDevelop"
+ author = "Matt Ward, Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://md-xed.sourceforge.net"
+ description = "XML Editor"
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.XmlEditor.dll" />
+ <Import file="schemas/appconfig.xsd" />
+ <Import file="schemas/MonoDevelopAddIn.xsd" />
+ <Import file="schemas/readme.txt" />
+ <Import file="schemas/XMLSchema.xsd" />
+ <Import file="schemas/W3C-License.html" />
+ <Import file="schemas/xslt.xsd" />
+ <Import file="schemas/manifest.xsd" />
+ <Import file="schemas/nant.xsd" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="DesignerSupport" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path = "/MonoDevelop/XmlEditor/XmlFileAssociations">
+ <ExtensionNode name = "Association" type = "MonoDevelop.XmlEditor.XmlFileAssociationNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/XmlEditor/XmlSchemas">
+ <ExtensionNode name = "Schema" type = "MonoDevelop.XmlEditor.XmlSchemaNode" />
+ </ExtensionPoint>
+
+ <!-- Additional file extensions that will be opened in the XML editor -->
+ <Extension path = "/MonoDevelop/XmlEditor/XmlFileAssociations">
+ <Association extension = ".build" namespaceUri="http://nant.sf.net/release/0.85-rc3/nant.xsd" />
+ <Association extension = ".config" namespaceUri="urn:app-config" />
+ <Association extension = ".xsd" namespaceUri="http://www.w3.org/2001/XMLSchema" namespacePrefix="xs" />
+ <Association extension = ".xsl" namespaceUri="http://www.w3.org/1999/XSL/Transform" namespacePrefix="xsl" />
+ <Association extension = ".xslt" namespaceUri="http://www.w3.org/1999/XSL/Transform" namespacePrefix="xsl" />
+ <Association extension = ".stetic" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/XmlEditor/XmlSchemas">
+ <Schema file="schemas/appconfig.xsd" />
+ <Schema file="schemas/MonoDevelopAddIn.xsd" />
+ <Schema file="schemas/XMLSchema.xsd" />
+ <Schema file="schemas/xslt.xsd" />
+ <Schema file="schemas/manifest.xsd" />
+ <Schema file="schemas/nant.xsd" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class id="MonoDevelop.XmlEditor.XmlTextEditorExtension" class = "MonoDevelop.XmlEditor.XmlTextEditorExtension" />
+ </Extension>
+
+ <!-- Commands -->
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "XmlEditor" id="XmlEditor">
+ <Command id = "MonoDevelop.XmlEditor.Commands.CreateSchema"
+ _label = "Create _Schema"
+ description = "Creates a schema from XML"/>
+ <Command id = "MonoDevelop.XmlEditor.Commands.Validate"
+ _label = "_Validate"
+ description = "Validates the XML against a schema"/><!--
+ <Command id = "MonoDevelop.XmlEditor.Commands.OpenXPathQueryPad"
+ defaultHandler = "MonoDevelop.XmlEditor.OpenXPathQueryPadCommand"
+ _label = "_XPath Query..."
+ description = "Opens XPath Query window"/>
+ <Command id = "MonoDevelop.XmlEditor.Commands.RemoveXPathHighlighting"
+ defaultHandler = "MonoDevelop.XmlEditor.RemoveXPathHighlightingCommand"
+ _label = "Remove XPath _Highlighting"
+ description = "Removes the highlighted XPath matches."/>-->
+ <Command id = "MonoDevelop.XmlEditor.Commands.AssignStylesheet"
+ _label = "_Assign XSLT..."
+ description = "Assigns a stylesheet to the current xml document"/>
+ <Command id = "MonoDevelop.XmlEditor.Commands.OpenStylesheet"
+ _label = "_Open XSLT"
+ description = "Opens the assigned stylesheet"/>
+ <Command id = "MonoDevelop.XmlEditor.Commands.RunXslTransform"
+ _label = "Run XSL_T"
+ shortcut = "Alt|Control|T"
+ description = "Runs an XSL transform"/>
+ <Command id = "MonoDevelop.XmlEditor.Commands.GoToSchemaDefinition"
+ _label = "_Go to Schema Definition"
+ description = "Jumps to the schema definition"/>
+ </Category>
+ </Extension>
+
+ <!-- XML menu -->
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Tools">
+ <ItemSet id = "XmlMenu" insertafter = "AddinManagerSeparator" _label = "_XML" >
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.CreateSchema" />
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.GoToSchemaDefinition" />
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.Validate" /><!--
+ <SeparatorItem id = "XPathCommandsSeparator"/>
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.OpenXPathQueryPad" />
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.RemoveXPathHighlighting" />
+ <SeparatorItem id = "StylesheetCommandsSeparator"/>-->
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.AssignStylesheet"/>
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.OpenStylesheet"/>
+ <CommandItem id = "MonoDevelop.XmlEditor.Commands.RunXslTransform"/>
+ <SeparatorItem/>
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor/Behavior">
+ <Section id = "XmlFormattingOptions" insertbefore="Formatting" _label = "XML" fill="true" class = "MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanel"/>
+ </Extension>
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/TextEditor">
+ <Section id = "XmlSchemas" _label = "XML Schemas" fill="true" class = "MonoDevelop.XmlEditor.Gui.XmlSchemasPanel"/>
+ </Extension>
+
+ <!-- XPath Query pad -->
+ <!-- Bug in the DockFrame (gitem is null but code calls SetVisible
+ when visible is false) prevents us from using setting the XPathQueryPad
+ to be a pad
+ <Extension path = "/MonoDevelop/Ide/Pads">
+ <Pad id = "MonoDevelop.XmlEditor.XPathQueryPad"
+ class = "MonoDevelop.XmlEditor.XPathQueryPad"
+ defaultPlacement = "Bottom"
+ _label = "XPath Query"/>
+ </Extension>-->
+
+ <!-- Put the XPath Query pad in the View menu -->
+ <!--<Extension path = "/SharpDevelop/Workbench/Contexts/Edit">
+ <ContextPad id = "MonoDevelop.XmlEditor.XPathQueryPad"/>
+ </Extension>-->
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.XmlEditor.XmlDocumentParser" mimeType = "application/xml" id = "XmlParser"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CodeFormatters">
+ <Formatter mimeType="text/xml" class="MonoDevelop.Xml.Formatting.XmlFormatter" />
+ <Formatter mimeType="application/xml" class="MonoDevelop.Xml.Formatting.XmlFormatter" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets/Mono" >
+ <Policies resource="MonoXmlPolicy.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels">
+ <Panel id = "XmlFormatting" _label = "XML Format" mimeType="application/xml" class = "MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="UserData" path="schemas" targetPath="XmlSchemas" isDirectory="true" />
+ <!-- 2.6+ -->
+ <Migration sourceVersion="2.6+" kind="UserData" path="XmlSchemas" isDirectory="true" />
+ </Extension>
+</Addin>
diff --git a/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..85cd100
--- /dev/null
+++ b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,15 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.XmlEditor.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.MonoDevelop.Xml.Formatting.MonoXmlPolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/appconfig.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/MonoDevelopAddIn.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/manifest.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/nant.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/readme.txt
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/W3C-License.html
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/XMLSchema.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/schemas/xslt.xsd
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.dll.mdb
diff --git a/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.gtk-gui.gui.stetic b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.gtk-gui.gui.stetic
new file mode 100644
index 0000000..0096e79
--- /dev/null
+++ b/src/addins/MonoDevelop.XmlEditor/obj/Debug/MonoDevelop.XmlEditor.gtk-gui.gui.stetic
@@ -0,0 +1,491 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../build/AddIns/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.XmlEditor.Gui.XmlEditorOptionsPanelWidget" design-size="367 300">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoCompleteElementsCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Automatically insert closing tags</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoAddPunctuationCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Automatically insert punctuation (="", />, etc.)</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="showSchemaAnnotationCheck">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show schema annotation</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.XmlEditor.Gui.XmlSchemasPanelWidget" design-size="569 340">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Registered Schemas</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="registeredSchemasView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="registeredSchemasAddButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="addRegisteredSchema" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="registeredSchemasRemoveButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="removeRegisteredSchema" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Default File Associations</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="defaultAssociationsView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="defaultAssociationsAddButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="addFileAssociation" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="defaultAssociationsRemoveButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="removeFileAssocation" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Xml.Formatting.XmlFormattingPolicyPanelWidget" design-size="544 349">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxScopes">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelScopes">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Enter one or several xpath expressions to which this format applies:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableScopes">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.PropertyGrid.PropertyGrid" id="propertyGrid">
+ <property name="MemberName" />
+ <property name="ShowToolbar">False</property>
+ <property name="ShowHelp">False</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdvanced">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Advanced Settings</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonAdvancedClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/MonoDeveloperExtensions/Makefile.in b/src/addins/MonoDeveloperExtensions/Makefile.in
index 92bc2a3..f9efd97 100644
--- a/src/addins/MonoDeveloperExtensions/Makefile.in
+++ b/src/addins/MonoDeveloperExtensions/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -289,11 +288,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -357,6 +356,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -420,6 +423,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -577,21 +594,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all: csproj_build
diff --git a/src/addins/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml b/src/addins/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
index d0a5d85..31e5a0d 100644
--- a/src/addins/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
+++ b/src/addins/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
@@ -6,15 +6,15 @@
url = "http://www.monodevelop.com"
description = "Provides some IDE extensions useful for developing and building the Mono class libraries."
category = "Project Import and Export"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDeveloperExtensions.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/ProjectModel/FileFormats">
@@ -51,7 +51,7 @@
<Import assembly="MonoDeveloperExtensions_nunit.dll"/>
</Runtime>
<Dependencies>
- <Addin id="NUnit" version="4.0.5"/>
+ <Addin id="NUnit" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/NUnit/TestProviders">
<Class id = "MonoTestProvider" class = "MonoDeveloper.MonoTestProvider"/>
diff --git a/src/addins/MonoDeveloperExtensions/MonoSolutionItemHandler.cs b/src/addins/MonoDeveloperExtensions/MonoSolutionItemHandler.cs
index 8b9bb81..1a9cdc6 100644
--- a/src/addins/MonoDeveloperExtensions/MonoSolutionItemHandler.cs
+++ b/src/addins/MonoDeveloperExtensions/MonoSolutionItemHandler.cs
@@ -337,6 +337,10 @@ namespace MonoDeveloper
project.FileRenamedInProject -= OnFileRenamedInProject;
IdeApp.Workspace.SolutionLoaded -= CombineOpened;
}
+
+ public void OnModified (string hint)
+ {
+ }
public string GetTestFileBase ()
{
diff --git a/src/addins/MonoDeveloperExtensions/NUnit/Makefile.in b/src/addins/MonoDeveloperExtensions/NUnit/Makefile.in
index 1e305c2..9838d69 100644
--- a/src/addins/MonoDeveloperExtensions/NUnit/Makefile.in
+++ b/src/addins/MonoDeveloperExtensions/NUnit/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/MonoDeveloperExtensions/NUnit/obj/Debug/NUnit.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDeveloperExtensions/NUnit/obj/Debug/NUnit.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..226c7a6
--- /dev/null
+++ b/src/addins/MonoDeveloperExtensions/NUnit/obj/Debug/NUnit.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDeveloperExtensions/MonoDeveloperExtensions_nunit.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDeveloperExtensions/MonoDeveloperExtensions_nunit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDeveloperExtensions/NUnit/obj/Debug/MonoDeveloperExtensions_nunit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDeveloperExtensions/NUnit/obj/Debug/MonoDeveloperExtensions_nunit.dll.mdb
diff --git a/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.MonoDeveloperExtensions.addin.xml b/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.MonoDeveloperExtensions.addin.xml
new file mode 100644
index 0000000..31e5a0d
--- /dev/null
+++ b/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.MonoDeveloperExtensions.addin.xml
@@ -0,0 +1,60 @@
+<Addin id = "MonoDeveloperExtensions"
+ namespace = "MonoDevelop"
+ name = "IDE Extensions for developers of the Mono framework"
+ author = "Lluis Sanchez Gual"
+ copyright = "(c) 2005 Novell, Inc."
+ url = "http://www.monodevelop.com"
+ description = "Provides some IDE extensions useful for developing and building the Mono class libraries."
+ category = "Project Import and Export"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDeveloperExtensions.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/ProjectModel/FileFormats">
+ <FileFormat id = "MonoMakefile" name="Mono Makefile"
+ class = "MonoDeveloper.MonoMakefileFormat" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels">
+ <Condition id="ItemType" value = "MonoDeveloper.MonoMakefile">
+ <Section id = "MonoMakefileOptionsPanel"
+ _label = "Output"
+ class = "MonoDevelop.Projects.Gui.Dialogs.OutputOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "MonoDeveloper.Commands.Install"
+ defaultHandler = "MonoDeveloper.InstallHandler"
+ icon = "gtk-network"
+ _label = "Install" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+ <Condition id="activeproject" value="MonoMakefile">
+ <CommandItem id = "MonoDeveloper.Commands.Install"
+ insertafter = "BuildGroupSeparator"
+ insertbefore = "Add" />
+ <SeparatorItem id = "svnSep" />
+ </Condition>
+ </Extension>
+
+ <Module>
+ <Runtime>
+ <Import assembly="MonoDeveloperExtensions_nunit.dll"/>
+ </Runtime>
+ <Dependencies>
+ <Addin id="NUnit" version="4.0.12"/>
+ </Dependencies>
+ <Extension path = "/MonoDevelop/NUnit/TestProviders">
+ <Class id = "MonoTestProvider" class = "MonoDeveloper.MonoTestProvider"/>
+ </Extension>
+ </Module>
+</Addin>
diff --git a/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.csproj.FilesWrittenAbsolute.txt b/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..a459ab7
--- /dev/null
+++ b/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.MonoDeveloperExtensions.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDeveloperExtensions/MonoDeveloperExtensions.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDeveloperExtensions/MonoDeveloperExtensions.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/MonoDeveloperExtensions/obj/Debug/MonoDeveloperExtensions.dll.mdb
diff --git a/src/addins/NUnit/Commands/NUnitCommands.cs b/src/addins/NUnit/Commands/NUnitCommands.cs
index bb2af88..f0d9322 100644
--- a/src/addins/NUnit/Commands/NUnitCommands.cs
+++ b/src/addins/NUnit/Commands/NUnitCommands.cs
@@ -36,6 +36,7 @@ namespace MonoDevelop.NUnit.Commands
{
RunAllTests,
RunTest,
+ DebugTest,
RunTestWith,
ShowTestCode,
SelectTestInTree,
diff --git a/src/addins/NUnit/Gui/CircleImage.cs b/src/addins/NUnit/Gui/CircleImage.cs
index b4c3c8b..1561087 100644
--- a/src/addins/NUnit/Gui/CircleImage.cs
+++ b/src/addins/NUnit/Gui/CircleImage.cs
@@ -29,20 +29,27 @@
using System;
using Gdk;
using MonoDevelop.Core;
+using MonoDevelop.Ide;
namespace MonoDevelop.NUnit
{
static class CircleImage
{
internal static Gdk.Pixbuf Running;
- internal static Gdk.Pixbuf Failure;
internal static Gdk.Pixbuf None;
internal static Gdk.Pixbuf NotRun;
+ internal static Gdk.Pixbuf Loading;
+
+ internal static Gdk.Pixbuf Failure;
internal static Gdk.Pixbuf Success;
internal static Gdk.Pixbuf SuccessAndFailure;
internal static Gdk.Pixbuf Inconclusive;
- internal static Gdk.Pixbuf Loading;
+ internal static Gdk.Pixbuf OldFailure;
+ internal static Gdk.Pixbuf OldSuccess;
+ internal static Gdk.Pixbuf OldSuccessAndFailure;
+ internal static Gdk.Pixbuf OldInconclusive;
+
static CircleImage ()
{
try {
@@ -54,6 +61,10 @@ namespace MonoDevelop.NUnit
SuccessAndFailure = Gdk.Pixbuf.LoadFromResource ("NUnit.SuccessAndFailed.png");
Loading = Gdk.Pixbuf.LoadFromResource ("NUnit.Loading.png");
Inconclusive = Gdk.Pixbuf.LoadFromResource ("NUnit.Inconclusive.png");
+ OldFailure = ImageService.MakeTransparent (Failure, 0.4);
+ OldSuccess = ImageService.MakeTransparent (Success, 0.4);
+ OldSuccessAndFailure = ImageService.MakeTransparent (SuccessAndFailure, 0.4);
+ OldInconclusive = ImageService.MakeTransparent (Inconclusive, 0.4);
} catch (Exception e) {
LoggingService.LogError ("Error while loading icons.", e);
}
diff --git a/src/addins/NUnit/Gui/TestNodeBuilder.cs b/src/addins/NUnit/Gui/TestNodeBuilder.cs
index 003b33d..9146ffc 100644
--- a/src/addins/NUnit/Gui/TestNodeBuilder.cs
+++ b/src/addins/NUnit/Gui/TestNodeBuilder.cs
@@ -93,15 +93,14 @@ namespace MonoDevelop.NUnit
if (res == null)
icon = CircleImage.None;
else if (res.ErrorsAndFailures > 0 && res.Passed > 0)
- icon = CircleImage.SuccessAndFailure;
+ icon = test.IsHistoricResult ? CircleImage.OldSuccessAndFailure : CircleImage.SuccessAndFailure;
else if (res.IsInconclusive)
- icon = CircleImage.Inconclusive;
+ icon = test.IsHistoricResult ? CircleImage.OldInconclusive : CircleImage.Inconclusive;
else if (res.IsFailure)
- icon = CircleImage.Failure;
- else if (res.IsSuccess) {
- icon = CircleImage.Success;
-
- } else if (res.IsNotRun)
+ icon = test.IsHistoricResult ? CircleImage.OldFailure : CircleImage.Failure;
+ else if (res.IsSuccess)
+ icon = test.IsHistoricResult ? CircleImage.OldSuccess : CircleImage.Success;
+ else if (res.IsNotRun)
icon = CircleImage.NotRun;
else
icon = CircleImage.None;
diff --git a/src/addins/NUnit/Gui/TestPad.cs b/src/addins/NUnit/Gui/TestPad.cs
index bcd85de..e9a3ba4 100644
--- a/src/addins/NUnit/Gui/TestPad.cs
+++ b/src/addins/NUnit/Gui/TestPad.cs
@@ -42,6 +42,7 @@ using MonoDevelop.Components.Docking;
using MonoDevelop.Ide;
using MonoDevelop.Projects;
using Mono.TextEditor;
+using System.Linq;
namespace MonoDevelop.NUnit
{
@@ -420,6 +421,33 @@ namespace MonoDevelop.NUnit
}
}
+ [CommandHandler (TestCommands.DebugTest)]
+ protected void OnDebugTest (object data)
+ {
+ var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode ();
+ var mode = debugModeSet.ExecutionModes.First (m => m.Id == (string)data);
+ RunSelectedTest (mode.ExecutionHandler);
+ }
+
+ [CommandUpdateHandler (TestCommands.DebugTest)]
+ protected void OnUpdateDebugTest (CommandArrayInfo info)
+ {
+ var debugModeSet = Runtime.ProcessService.GetDebugExecutionMode ();
+ if (debugModeSet == null)
+ return;
+
+ UnitTest test = GetSelectedTest ();
+ if (test == null)
+ return;
+
+ foreach (var mode in debugModeSet.ExecutionModes) {
+ if (test.CanRun (mode.ExecutionHandler))
+ info.Add (GettextCatalog.GetString ("Debug Test ({0})", mode.Name), mode.Id);
+ }
+ if (info.Count == 1)
+ info [0].Text = GettextCatalog.GetString ("Debug Test");
+ }
+
public TestPad ()
{
base.TreeView.CurrentItemActivated += delegate {
@@ -453,7 +481,7 @@ namespace MonoDevelop.NUnit
UnitTest test = nav.DataItem as UnitTest;
if (test == null)
return;
- TestSession.ResetResult (test.RootTest);
+ NUnitService.ResetResult (test.RootTest);
this.buttonRun.Sensitive = false;
this.buttonRunAll.Sensitive = false;
diff --git a/src/addins/NUnit/Gui/TestResultsPad.cs b/src/addins/NUnit/Gui/TestResultsPad.cs
index 8fd1973..750e729 100644
--- a/src/addins/NUnit/Gui/TestResultsPad.cs
+++ b/src/addins/NUnit/Gui/TestResultsPad.cs
@@ -365,7 +365,7 @@ namespace MonoDevelop.NUnit
{
string msg = GettextCatalog.GetString ("Internal error");
if (errorMessage != null)
- msg += ": " + errorMessage;
+ msg += ": " + Escape (errorMessage);
Gdk.Pixbuf stock = failuresTreeView.RenderIcon (Gtk.Stock.DialogError, Gtk.IconSize.Menu, "");
TreeIter testRow = failuresStore.AppendValues (stock, msg, null, null, 0);
@@ -632,7 +632,14 @@ namespace MonoDevelop.NUnit
outputView.Buffer.Insert (ref it, result.ConsoleError);
outputView.ScrollMarkOnscreen (outputView.Buffer.InsertMark);
}
-
+
+ void ITestProgressMonitor.WriteGlobalLog (string message)
+ {
+ TextIter it = outputView.Buffer.EndIter;
+ outputView.Buffer.Insert (ref it, message);
+ outputView.ScrollMarkOnscreen (outputView.Buffer.InsertMark);
+ }
+
string Escape (string s)
{
return GLib.Markup.EscapeText (s);
@@ -735,6 +742,12 @@ namespace MonoDevelop.NUnit
monitor.ReportRuntimeError (message, exception);
});
}
+ public void WriteGlobalLog (string message)
+ {
+ DispatchService.GuiDispatch (delegate {
+ monitor.WriteGlobalLog (message);
+ });
+ }
public bool IsCancelRequested {
get { return monitor.IsCancelRequested; }
}
diff --git a/src/addins/NUnit/Makefile.in b/src/addins/NUnit/Makefile.in
index 5503a5d..287220a 100644
--- a/src/addins/NUnit/Makefile.in
+++ b/src/addins/NUnit/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -288,11 +287,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -356,6 +355,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -419,6 +422,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -576,21 +593,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all: csproj_build
diff --git a/src/addins/NUnit/MonoDevelop.NUnit.csproj b/src/addins/NUnit/MonoDevelop.NUnit.csproj
index 5c1607a..5826517 100644
--- a/src/addins/NUnit/MonoDevelop.NUnit.csproj
+++ b/src/addins/NUnit/MonoDevelop.NUnit.csproj
@@ -66,6 +66,8 @@
<Reference Include="nunit.util">
<HintPath>lib\nunit.util.dll</HintPath>
</Reference>
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
diff --git a/src/addins/NUnit/MonoDevelopNUnit.addin.xml b/src/addins/NUnit/MonoDevelopNUnit.addin.xml
index d8dad38..cf06382 100644
--- a/src/addins/NUnit/MonoDevelopNUnit.addin.xml
+++ b/src/addins/NUnit/MonoDevelopNUnit.addin.xml
@@ -6,7 +6,7 @@
url = "http://monodevelop.com"
description = "Integrates NUnit into the MonoDevelop IDE."
category = "Testing"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.NUnit.dll" />
@@ -17,8 +17,8 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<!-- Extension Points -->
@@ -106,6 +106,9 @@
_label = "Run With"
type="array"
_description="Runs tests using a special execution mode."/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.DebugTest"
+ _label = "Debug Test"
+ type="array" />
<Command id = "MonoDevelop.NUnit.Commands.TestCommands.RunTest" _label = "Run Test" />
<Command id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestCode" _label = "Show test source code" />
<Command id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" _label = "Go to failure" />
@@ -140,6 +143,7 @@
<Extension path = "/MonoDevelop/NUnit/ContextMenu/TestPad">
<CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RunTest" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.DebugTest" />
<ItemSet id = "RunTestWith" _label = "Run Test With">
<CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RunTestWith" />
</ItemSet>
@@ -214,9 +218,13 @@
<ItemProperty class = "MonoDevelop.Projects.SolutionItemConfiguration"
name = "UnitTestInformation" type = "MonoDevelop.NUnit.UnitTestOptionsSet" />
<ItemProperty class = "MonoDevelop.Projects.DotNetProject"
- name = "TestRunnerType" type = "System.String" />
+ name = "TestRunnerType" type = "System.String" external="false" />
<ItemProperty class = "MonoDevelop.Projects.DotNetProject"
- name = "TestRunnerAssembly" type = "MonoDevelop.Core.FilePath" />
+ name = "TestRunnerAssembly" type = "MonoDevelop.Core.FilePath" external="false" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerCommand" type = "MonoDevelop.Core.FilePath" external="false" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerArgs" type = "System.String" external="false" />
</Extension>
</Addin>
diff --git a/src/addins/NUnit/NUnitRunner/Makefile.in b/src/addins/NUnit/NUnitRunner/Makefile.in
index 7d17815..7f0ec0f 100644
--- a/src/addins/NUnit/NUnitRunner/Makefile.in
+++ b/src/addins/NUnit/NUnitRunner/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/NUnit/NUnitRunner/obj/Debug/NUnitRunner.csproj.FilesWrittenAbsolute.txt b/src/addins/NUnit/NUnitRunner/obj/Debug/NUnitRunner.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..122bd4d
--- /dev/null
+++ b/src/addins/NUnit/NUnitRunner/obj/Debug/NUnitRunner.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/NUnit/NUnitRunner.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/NUnit/NUnitRunner.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/NUnitRunner/obj/Debug/NUnitRunner.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/NUnitRunner/obj/Debug/NUnitRunner.dll.mdb
diff --git a/src/addins/NUnit/Services/ExternalTestRunner.cs b/src/addins/NUnit/Services/ExternalTestRunner.cs
index efd9678..480c845 100644
--- a/src/addins/NUnit/Services/ExternalTestRunner.cs
+++ b/src/addins/NUnit/Services/ExternalTestRunner.cs
@@ -239,7 +239,7 @@ namespace MonoDevelop.NUnit.External
UnitTestResult singleTestResult;
public bool Canceled;
- public LocalTestMonitor (TestContext context, ExternalTestRunner runner, UnitTest rootTest, string rootFullName, bool singleTestRun)
+ public LocalTestMonitor (TestContext context, UnitTest rootTest, string rootFullName, bool singleTestRun)
{
// this.rootFullName = rootFullName;
this.rootTest = rootTest;
diff --git a/src/addins/NUnit/Services/ITestProgressMonitor.cs b/src/addins/NUnit/Services/ITestProgressMonitor.cs
index beef8b7..96fbc51 100644
--- a/src/addins/NUnit/Services/ITestProgressMonitor.cs
+++ b/src/addins/NUnit/Services/ITestProgressMonitor.cs
@@ -35,6 +35,7 @@ namespace MonoDevelop.NUnit
void BeginTest (UnitTest test);
void EndTest (UnitTest test, UnitTestResult result);
void ReportRuntimeError (string message, Exception exception);
+ void WriteGlobalLog (string message);
bool IsCancelRequested { get; }
event TestHandler CancelRequested;
diff --git a/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs b/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs
index 0358717..2c79dda 100644
--- a/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs
+++ b/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs
@@ -42,6 +42,9 @@ using NUnit.Core;
using NUnit.Core.Filters;
using MonoDevelop.NUnit.External;
using MonoDevelop.Ide;
+using System.Xml.Linq;
+using System.Linq;
+using System.Globalization;
namespace MonoDevelop.NUnit
{
@@ -92,6 +95,24 @@ namespace MonoDevelop.NUnit
assembly = type = null;
}
+ public virtual void GetCustomConsoleRunner (out string command, out string args)
+ {
+ command = args = null;
+ }
+
+ ProcessExecutionCommand GetCustomConsoleRunnerCommand ()
+ {
+ string file, args;
+
+ GetCustomConsoleRunner (out file, out args);
+ file = file != null ? file.Trim () : null;
+ if (string.IsNullOrEmpty (file))
+ return null;
+
+ var cmd = Runtime.ProcessService.CreateCommand (file);
+ cmd.Arguments = args;
+ return cmd;
+ }
protected override void OnActiveConfigurationChanged ()
{
@@ -337,6 +358,10 @@ namespace MonoDevelop.NUnit
protected override bool OnCanRun (MonoDevelop.Core.Execution.IExecutionHandler executionContext)
{
+ var runnerCmd = GetCustomConsoleRunnerCommand ();
+ if (runnerCmd != null) {
+ return executionContext.CanExecute (runnerCmd);
+ }
return Runtime.ProcessService.IsValidForRemoteHosting (executionContext);
}
@@ -355,9 +380,12 @@ namespace MonoDevelop.NUnit
internal UnitTestResult RunUnitTest (UnitTest test, string suiteName, string pathName, string testName, TestContext testContext)
{
+ var runnerExe = GetCustomConsoleRunnerCommand ();
+ if (runnerExe != null)
+ return RunWithConsoleRunner (runnerExe, test, suiteName, pathName, testName, testContext);
ExternalTestRunner runner = (ExternalTestRunner)Runtime.ProcessService.CreateExternalProcessObject (typeof(ExternalTestRunner), testContext.ExecutionContext, UserAssemblyPaths);
- LocalTestMonitor localMonitor = new LocalTestMonitor (testContext, runner, test, suiteName, testName != null);
+ LocalTestMonitor localMonitor = new LocalTestMonitor (testContext, test, suiteName, testName != null);
ITestFilter filter = null;
if (test != null) {
@@ -430,6 +458,147 @@ namespace MonoDevelop.NUnit
t = t.Parent;
}
}
+
+ UnitTestResult RunWithConsoleRunner (ProcessExecutionCommand cmd, UnitTest test, string suiteName, string pathName, string testName, TestContext testContext)
+ {
+ var outFile = Path.GetTempFileName ();
+ LocalConsole cons = new LocalConsole ();
+
+ try {
+ if (!string.IsNullOrEmpty (cmd.Arguments))
+ cmd.Arguments += " ";
+ cmd.Arguments += "\"-xml=" + outFile + "\" " + AssemblyPath;
+ if (!string.IsNullOrEmpty (testName))
+ cmd.Arguments += " -run=" + suiteName + "." + testName;
+ else if (!string.IsNullOrEmpty (suiteName))
+ cmd.Arguments += " -run=" + suiteName;
+ var p = testContext.ExecutionContext.Execute (cmd, cons);
+
+ testContext.Monitor.CancelRequested += p.Cancel;
+ if (testContext.Monitor.IsCancelRequested)
+ p.Cancel ();
+ p.WaitForCompleted ();
+
+ if (new FileInfo (outFile).Length == 0)
+ throw new Exception ("Command failed");
+
+ LocalTestMonitor localMonitor = new LocalTestMonitor (testContext, test, suiteName, testName != null);
+ XDocument doc = XDocument.Load (outFile);
+ if (doc.Root != null) {
+ var root = doc.Root.Elements ("test-suite").FirstOrDefault ();
+ if (root != null) {
+ cons.SetDone ();
+ var ot = cons.Out.ReadToEnd ();
+ var et = cons.Error.ReadToEnd ();
+ testContext.Monitor.WriteGlobalLog (ot);
+ if (!string.IsNullOrEmpty (et)) {
+ testContext.Monitor.WriteGlobalLog ("ERROR:\n");
+ testContext.Monitor.WriteGlobalLog (et);
+ }
+
+ bool macunitStyle = doc.Root.Element ("environment") != null && doc.Root.Element ("environment").Attribute ("macunit-version") != null;
+ return ReportXmlResult (localMonitor, root, "", macunitStyle);
+ }
+ }
+ throw new Exception ("Test results could not be parsed.");
+ } catch (Exception ex) {
+ cons.SetDone ();
+ var ot = cons.Out.ReadToEnd ();
+ var et = cons.Error.ReadToEnd ();
+ testContext.Monitor.WriteGlobalLog (ot);
+ if (!string.IsNullOrEmpty (et)) {
+ testContext.Monitor.WriteGlobalLog ("ERROR:\n");
+ testContext.Monitor.WriteGlobalLog (et);
+ }
+ testContext.Monitor.ReportRuntimeError ("Test execution failed.\n" + ot + "\n" + et, ex);
+ return UnitTestResult.CreateIgnored ("Test execution failed");
+ } finally {
+ File.Delete (outFile);
+ }
+ }
+
+ UnitTestResult ReportXmlResult (IRemoteEventListener listener, XElement elem, string testPrefix, bool macunitStyle)
+ {
+ UnitTestResult result = new UnitTestResult ();
+ var time = (string)elem.Attribute ("time");
+ if (time != null)
+ result.Time = TimeSpan.FromSeconds (double.Parse (time, CultureInfo.InvariantCulture));
+ result.TestDate = DateTime.Now;
+
+ var reason = elem.Element ("reason");
+ if (reason != null)
+ result.Message = (string) reason;
+
+ var failure = elem.Element ("failure");
+ if (failure != null) {
+ var msg = failure.Element ("message");
+ if (msg != null)
+ result.Message = (string)msg;
+ var stack = failure.Element ("stack-trace");
+ if (stack != null)
+ result.StackTrace = (string)stack;
+ }
+
+ switch ((string)elem.Attribute ("result")) {
+ case "Error":
+ case "Failure":
+ result.Status = ResultStatus.Failure;
+ break;
+ case "Success":
+ result.Status = ResultStatus.Success;
+ break;
+ case "Ignored":
+ result.Status = ResultStatus.Ignored;
+ break;
+ default:
+ result.Status = ResultStatus.Inconclusive;
+ break;
+ }
+
+ if (elem.Name == "test-suite") {
+ // nunitlite does not emit <test-suite type="Namespace" elements so we need to fake
+ // them by deconstructing the full type name and emitting the suite started events manually
+ var names = new List<string> ();
+ if (!macunitStyle || (string)elem.Attribute ("type") == "Assembly")
+ names.Add ("<root>");
+ else
+ names.AddRange (elem.Attribute ("name").Value.Split ('.'));
+
+ for (int i = 0; i < names.Count; i ++)
+ listener.SuiteStarted (testPrefix + string.Join (".", names.Take (i + 1)));
+
+ var name = (string)elem.Attribute ("type") == "Assembly" ? "<root>" : (string) elem.Attribute ("name");
+ var cts = elem.Element ("results");
+ if (cts != null) {
+ foreach (var ct in cts.Elements ()) {
+ var r = ReportXmlResult (listener, ct, name != "<root>" ? testPrefix + name + "." : "", macunitStyle);
+ result.Add (r);
+ }
+ }
+ for (int i = 0; i < names.Count; i ++)
+ listener.SuiteFinished (testPrefix + string.Join (".", names.Take (i + 1)), result);
+ } else {
+ string name = (string)elem.Attribute ("name");
+ switch (result.Status) {
+ case ResultStatus.Success:
+ result.Passed++;
+ break;
+ case ResultStatus.Failure:
+ result.Failures++;
+ break;
+ case ResultStatus.Ignored:
+ result.Ignored++;
+ break;
+ case ResultStatus.Inconclusive:
+ result.Inconclusive++;
+ break;
+ }
+
+ listener.TestStarted (name);
+ listener.TestFinished (name, result);
+ }
+ return result;
+ }
protected abstract string AssemblyPath {
get;
diff --git a/src/addins/NUnit/Services/NUnitProjectTestSuite.cs b/src/addins/NUnit/Services/NUnitProjectTestSuite.cs
index ff6b840..3461283 100644
--- a/src/addins/NUnit/Services/NUnitProjectTestSuite.cs
+++ b/src/addins/NUnit/Services/NUnitProjectTestSuite.cs
@@ -63,14 +63,14 @@ namespace MonoDevelop.NUnit
public static NUnitProjectTestSuite CreateTest (DotNetProject project)
{
foreach (var p in project.References)
- if (p.Reference.IndexOf ("nunit.framework") != -1 || p.Reference.IndexOf ("nunit.core") != -1)
+ if (p.Reference.IndexOf ("GuiUnit") != -1 || p.Reference.IndexOf ("nunit.framework") != -1 || p.Reference.IndexOf ("nunit.core") != -1)
return new NUnitProjectTestSuite (project);
return null;
}
protected override SourceCodeLocation GetSourceCodeLocation (string fixtureTypeNamespace, string fixtureTypeName, string methodName)
{
- if (fixtureTypeName == null)
+ if (string.IsNullOrEmpty (fixtureTypeName) || string.IsNullOrEmpty (fixtureTypeName))
return null;
var ctx = TypeSystemService.GetCompilation (project);
var cls = ctx.MainAssembly.GetTypeDefinition (fixtureTypeNamespace, fixtureTypeName, 0);
@@ -122,6 +122,13 @@ namespace MonoDevelop.NUnit
assembly = asm != null ? project.BaseDirectory.Combine (asm.ToString ()).ToString () : null;
}
+ public override void GetCustomConsoleRunner (out string command, out string args)
+ {
+ var r = project.ExtendedProperties ["TestRunnerCommand"];
+ command = r != null ? project.BaseDirectory.Combine (r.ToString ()).ToString () : null;
+ args = (string)project.ExtendedProperties ["TestRunnerArgs"];
+ }
+
protected override string AssemblyPath {
get { return project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration); }
}
diff --git a/src/addins/NUnit/Services/NUnitService.cs b/src/addins/NUnit/Services/NUnitService.cs
index 4f0cab7..441c717 100644
--- a/src/addins/NUnit/Services/NUnitService.cs
+++ b/src/addins/NUnit/Services/NUnitService.cs
@@ -187,6 +187,17 @@ namespace MonoDevelop.NUnit
}
return null;
}
+
+ public UnitTest SearchTestById (string id)
+ {
+ foreach (UnitTest t in RootTests) {
+ UnitTest r = SearchTestById (t, id);
+ if (r != null)
+ return r;
+ }
+ return null;
+ }
+
UnitTest SearchTest (UnitTest test, string fullName)
{
@@ -194,7 +205,7 @@ namespace MonoDevelop.NUnit
return null;
if (test.FullName == fullName)
return test;
-
+
UnitTestGroup group = test as UnitTestGroup;
if (group != null) {
foreach (UnitTest t in group.Tests) {
@@ -205,7 +216,25 @@ namespace MonoDevelop.NUnit
}
return null;
}
-
+
+ UnitTest SearchTestById (UnitTest test, string id)
+ {
+ if (test == null)
+ return null;
+ if (test.TestId == id)
+ return test;
+
+ UnitTestGroup group = test as UnitTestGroup;
+ if (group != null) {
+ foreach (UnitTest t in group.Tests) {
+ UnitTest result = SearchTestById (t, id);
+ if (result != null)
+ return result;
+ }
+ }
+ return null;
+ }
+
public UnitTest FindRootTest (IWorkspaceObject item)
{
return FindRootTest (RootTests, item);
@@ -252,8 +281,12 @@ namespace MonoDevelop.NUnit
public UnitTest BuildTest (IWorkspaceObject entry)
{
foreach (ITestProvider p in providers) {
- UnitTest t = p.CreateUnitTest (entry);
- if (t != null) return t;
+ try {
+ UnitTest t = p.CreateUnitTest (entry);
+ if (t != null)
+ return t;
+ } catch {
+ }
}
return null;
}
@@ -274,11 +307,24 @@ namespace MonoDevelop.NUnit
if (TestSuiteChanged != null)
TestSuiteChanged (this, EventArgs.Empty);
}
-
+
+ public static void ResetResult (UnitTest test)
+ {
+ if (test == null)
+ return;
+ test.ResetLastResult ();
+ UnitTestGroup group = test as UnitTestGroup;
+ if (group == null)
+ return;
+ foreach (UnitTest t in new List<UnitTest> (group.Tests))
+ ResetResult (t);
+ }
+
public event EventHandler TestSuiteChanged;
}
-
+
+
class TestSession: IAsyncOperation, ITestProgressMonitor
{
UnitTest test;
@@ -306,7 +352,7 @@ namespace MonoDevelop.NUnit
void RunTests ()
{
try {
- ResetResult (test);
+ NUnitService.ResetResult (test);
monitor.InitializeTestRun (test);
TestContext ctx = new TestContext (monitor, context, DateTime.Now);
test.Run (ctx);
@@ -328,18 +374,6 @@ namespace MonoDevelop.NUnit
Completed (this);
}
- public static void ResetResult (UnitTest test)
- {
- if (test == null)
- return;
- test.ResetLastResult ();
- UnitTestGroup group = test as UnitTestGroup;
- if (group == null)
- return;
- foreach (UnitTest t in new List<UnitTest> (group.Tests))
- ResetResult (t);
- }
-
void ITestProgressMonitor.BeginTest (UnitTest test)
{
monitor.BeginTest (test);
@@ -355,6 +389,11 @@ namespace MonoDevelop.NUnit
monitor.ReportRuntimeError (message, exception);
}
+ void ITestProgressMonitor.WriteGlobalLog (string message)
+ {
+ monitor.WriteGlobalLog (message);
+ }
+
bool ITestProgressMonitor.IsCancelRequested {
get { return monitor.IsCancelRequested; }
}
diff --git a/src/addins/NUnit/Services/UnitTest.cs b/src/addins/NUnit/Services/UnitTest.cs
index 9adc3e6..5d83b60 100644
--- a/src/addins/NUnit/Services/UnitTest.cs
+++ b/src/addins/NUnit/Services/UnitTest.cs
@@ -48,6 +48,8 @@ namespace MonoDevelop.NUnit
IWorkspaceObject ownerSolutionItem;
SolutionEntityItem ownerSolutionEntityItem;
UnitTestResultsStore results;
+ bool historicResult;
+ bool resultLoaded;
public string FixtureTypeNamespace {
get;
@@ -248,14 +250,24 @@ namespace MonoDevelop.NUnit
public UnitTestResult GetLastResult ()
{
+ if (!resultLoaded) {
+ resultLoaded = true;
+ lastResult = Results.GetLastResult (DateTime.Now);
+ if (lastResult != null)
+ historicResult = true;
+ }
return lastResult;
}
public void ResetLastResult ()
{
- lastResult = null;
+ historicResult = true;
OnTestStatusChanged ();
}
+
+ public bool IsHistoricResult {
+ get { return historicResult; }
+ }
public UnitTestCollection GetRegressions (DateTime fromDate, DateTime toDate)
{
@@ -399,7 +411,11 @@ namespace MonoDevelop.NUnit
result.TestDate = context.TestDate;
// if ((int)result.Status == 0)
// result.Status = ResultStatus.Ignored;
+
lastResult = result;
+ historicResult = false;
+ resultLoaded = true;
+
IResultsStore store = GetResultsStore ();
if (store != null)
store.RegisterResult (ActiveConfiguration, this, result);
diff --git a/src/addins/NUnit/Services/UnitTestResult.cs b/src/addins/NUnit/Services/UnitTestResult.cs
index 3133d3b..c81ab3b 100644
--- a/src/addins/NUnit/Services/UnitTestResult.cs
+++ b/src/addins/NUnit/Services/UnitTestResult.cs
@@ -98,6 +98,7 @@ namespace MonoDevelop.NUnit
public ResultStatus Status {
get { return status; }
+ set { status = value; }
}
public bool IsFailure {
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Failed.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Failed.png
new file mode 100644
index 0000000..252e757
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Failed.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Inconclusive.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Inconclusive.png
new file mode 100644
index 0000000..2d0f1e3
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Inconclusive.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Loading.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Loading.png
new file mode 100644
index 0000000..31294df
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Loading.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.None.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.None.png
new file mode 100644
index 0000000..ba9bb60
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.None.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.NotRun.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.NotRun.png
new file mode 100644
index 0000000..24d5fcf
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.NotRun.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Running.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Running.png
new file mode 100644
index 0000000..64d7590
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Running.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Success.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Success.png
new file mode 100644
index 0000000..4484e0a
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Success.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.SuccessAndFailed.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.SuccessAndFailed.png
new file mode 100644
index 0000000..20bb91f
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.SuccessAndFailed.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit-overlay-32.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit-overlay-32.png
new file mode 100644
index 0000000..d615a80
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit-overlay-32.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit.png
new file mode 100644
index 0000000..2acfb31
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-16.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-16.png
new file mode 100644
index 0000000..b23af82
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-16.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-24.png b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-24.png
new file mode 100644
index 0000000..ec1c3f0
Binary files /dev/null and b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-24.png differ
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.MonoDevelopNUnit.addin.xml b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.MonoDevelopNUnit.addin.xml
new file mode 100644
index 0000000..cf06382
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.MonoDevelopNUnit.addin.xml
@@ -0,0 +1,230 @@
+<Addin id = "NUnit"
+ namespace = "MonoDevelop"
+ name = "NUnit support"
+ author = "Lluis Sanchez, John Luke"
+ copyright = "MIT X11"
+ url = "http://monodevelop.com"
+ description = "Integrates NUnit into the MonoDevelop IDE."
+ category = "Testing"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.NUnit.dll" />
+ <Import assembly="nunit.core.dll" />
+ <Import assembly="nunit.core.interfaces.dll" />
+ <Import assembly="nunit.framework.dll" />
+ <Import assembly="nunit.util.dll" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension Points -->
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/TestProviders" name = "Test providers">
+ <Description>Test providers. Specified classes must implement ITestProvider.</Description>
+ <ExtensionNode name ="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/TestChart">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/TestPad">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/TestResultsPad">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/NUnitAssemblyGroup">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/TestAssembly">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/NUnitAssemblyGroupConfiguration">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/UnitTestOptions/GeneralOptions">
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/NUnit/UnitTestOptions/ConfigurationOptions">
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection"/>
+ </ExtensionPoint>
+
+
+ <!-- Extensions -->
+
+ <Extension path="/MonoDevelop/Core/SupportPackages">
+ <Condition id="PackageNotInstalled" name="mono-nunit" version="2.7">
+ <Package name="nunit" version="2.4" clrVersion="Default">
+ <Assembly file="nunit.core.dll" />
+ <Assembly file="nunit.core.interfaces.dll" />
+ <Assembly file="nunit.framework.dll" />
+ </Package>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads">
+ <SolutionPad id = "MonoDevelop.NUnit.TestPad" defaultLayout="*" defaultPlacement = "Right" defaultStatus="AutoHide" _label = "Unit Tests" icon = "nunit-pad-icon" class = "MonoDevelop.NUnit.TestPad">
+ <PadOption id = "ShowTestTime" _label = "Show Test Time" defaultValue = "False" />
+ <PadOption id = "ShowTestCounters" _label = "Show Test Counters" defaultValue = "False" />
+ <NodeBuilder id = "TestNode" class = "MonoDevelop.NUnit.TestNodeBuilder"/>
+ </SolutionPad>
+ <Pad id="MonoDevelop.NUnit.TestResultsPad" _label="Test Results" icon="nunit-pad-icon" class="MonoDevelop.NUnit.TestResultsPad" defaultPlacement = "Bottom" defaultLayout="UnitTesting" defaultStatus="AutoHide"/>
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/WorkbenchLayouts">
+ <Layout id="UnitTesting" _name="Unit Testing">
+ <LayoutPad id="MonoDevelop.NUnit.TestPad" status="Dockable" />
+ <LayoutPad id="MonoDevelop.NUnit.TestResultsPad" status="Dockable" />
+ </Layout>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "NUnitAssemblyGroupNodeBuilder" class = "MonoDevelop.NUnit.NUnitAssemblyGroupNodeBuilder"/>
+ <NodeBuilder id = "NUnitAssemblyGroupConfigurationNodeBuilder" class = "MonoDevelop.NUnit.NUnitAssemblyGroupConfigurationNodeBuilder"/>
+ <NodeBuilder id = "TestAssemblyNodeBuilder" class = "MonoDevelop.NUnit.TestAssemblyNodeBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "NUnit" id = "NUnit">
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.RunAllTests"
+ _label = "Run Unit Tests"
+ _description="Runs all tests of the current selected project."
+ shortcut="Control|T"
+ defaultHandler="MonoDevelop.NUnit.Commands.RunAllTestsHandler"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.RunTestWith"
+ _label = "Run With"
+ type="array"
+ _description="Runs tests using a special execution mode."/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.DebugTest"
+ _label = "Debug Test"
+ type="array" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.RunTest" _label = "Run Test" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestCode" _label = "Show test source code" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" _label = "Go to failure" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.SelectTestInTree" _label = "Select test in tree" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestDetails" _label = "Show results pad" />
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.UseTimeScale" _label = "Proportional time scale" type="check"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.SingleDayResult" _label = "Show one result per day" type="check"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowResults" _label = "Results chart" type="radio"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowTime" _label = "Time chart" type="radio"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowSuccessfulTests" _label = "Show successful tests" type="check"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowFailedTests" _label = "Show failed tests" type="check"/>
+ <Command id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowIgnoredTests" _label = "Show ignored tests" type="check"/>
+ <Command id = "MonoDevelop.NUnit.Commands.NUnitProjectCommands.AddAssembly" _label = "Add assembly..."/>
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Run">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RunAllTests" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/NUnitAssemblyGroup">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/NUnitAssemblyGroupConfiguration">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.NUnitProjectCommands.AddAssembly" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/ProjectPad/TestAssembly">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/TestPad">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RunTest" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.DebugTest" />
+ <ItemSet id = "RunTestWith" _label = "Run Test With">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.RunTestWith" />
+ </ItemSet>
+ <SeparatorItem id = "s0" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestCode" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestDetails" />
+ <SeparatorItem id = "s1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Options" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/TestResultsPad">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.GoToFailure" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.ShowTestCode" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestCommands.SelectTestInTree" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/ContextMenu/TestChart">
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowResults" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowTime" />
+ <SeparatorItem id = "s1" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowSuccessfulTests" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowFailedTests" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.ShowIgnoredTests" />
+ <SeparatorItem id = "s2" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.UseTimeScale" />
+ <CommandItem id = "MonoDevelop.NUnit.Commands.TestChartCommands.SingleDayResult" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/UnitTestOptions/GeneralOptions">
+ <Section id = "Configurations"
+ _label = "Configurations" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/UnitTestOptions/ConfigurationOptions">
+ <Section id = "NUnitOptionsPanel"
+ _label = "${Configuration}"
+ class = "MonoDevelop.NUnit.NUnitOptionsPanel"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+<!-- <ProjectTemplate id = "NUnitAssemblyGroup" resource = "NUnitAssemblyGroup.xpt.xml"/>-->
+ <ProjectTemplate id = "NUnitProject" resource = "NUnitProject.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "NUnitTestClass" resource = "NUnitTestClass.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/FileFormats">
+ <FileFormat id="NUnitAssemblyGroupFileFormat"
+ class="MonoDevelop.NUnit.NUnitAssemblyGroupFileFormat"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/NUnit/TestProviders">
+ <Class id="SystemTestProvider" class="MonoDevelop.NUnit.SystemTestProvider" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "nunit-pad-icon" resource = "unit-test-16.png" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Class class = "MonoDevelop.NUnit.NUnitProjectServiceExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.NUnit.NUnitAssemblyGroupProject" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ <ItemProperty class = "MonoDevelop.Projects.SolutionItemConfiguration"
+ name = "UnitTestInformation" type = "MonoDevelop.NUnit.UnitTestOptionsSet" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerType" type = "System.String" external="false" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerAssembly" type = "MonoDevelop.Core.FilePath" external="false" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerCommand" type = "MonoDevelop.Core.FilePath" external="false" />
+ <ItemProperty class = "MonoDevelop.Projects.DotNetProject"
+ name = "TestRunnerArgs" type = "System.String" external="false" />
+ </Extension>
+
+</Addin>
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.csproj.FilesWrittenAbsolute.txt b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..66a219c
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,22 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitAssemblyGroup.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitTestClass.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.MonoDevelopNUnit.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Running.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Failed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.SuccessAndFailed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.None.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.NotRun.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Loading.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Success.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.nunit-overlay-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.unit-test-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.Gui.NUnit.Inconclusive.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/NUnit/MonoDevelop.NUnit.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/NUnit/MonoDevelop.NUnit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.dll.mdb
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.gtk-gui.gui.stetic b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.gtk-gui.gui.stetic
new file mode 100644
index 0000000..b198c1b
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.gtk-gui.gui.stetic
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/NUnit/MonoDevelop.NUnit.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.NUnit.NUnitOptionsWidget" design-size="450 380">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="useParentCheck">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Use parent test settings</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The following filter will be applied when running the tests:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="noFilterRadio">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Don't apply any filter</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">noFilterRadio</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="includeRadio">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Include the following categories</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">noFilterRadio</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="excludeRadio">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Exclude the following categories</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">noFilterRadio</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Categories:</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="categoryTree">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="addButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.md1format.xml b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.md1format.xml
new file mode 100644
index 0000000..b113d05
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.md1format.xml
@@ -0,0 +1,18 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.CSharp.Project.CSharpCompilerParameters">
+ <ItemProperty member="warninglevel" name = "warninglevel"/>
+ <ItemProperty member="noWarnings" name="nowarn" defaultValue=""/>
+ <ItemProperty member="optimize" name="optimize"/>
+ <ItemProperty member="unsafecode" name="unsafecodeallowed"/>
+ <ItemProperty member="generateOverflowChecks" name="generateoverflowchecks"/>
+ <ItemProperty member="mainclass" name="mainclass"/>
+ <ItemProperty member="definesymbols" name="definesymbols" defaultValue="" />
+ <ItemProperty member="generateXmlDocumentation" name="generatexmldocumentation"/>
+ <ItemProperty member="win32Icon" name="win32Icon" defaultValue="" />
+ <ItemProperty member="win32Resource" name="win32Resource" defaultValue="" />
+ <ItemProperty member="codePage" name="codepage" defaultValue="0"/>
+ <ItemProperty member="additionalArgs" name="additionalargs" defaultValue="" />
+ <ItemProperty member="langVersion" name="langversion" defaultValue="Default"/>
+ <LiteralProperty name="compiler" value="Mcs" />
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitAssemblyGroup.xpt.xml b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitAssemblyGroup.xpt.xml
new file mode 100644
index 0000000..4471cae
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitAssemblyGroup.xpt.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Template originator = "Lluis Sanchez"
+ created = "12/07/2005"
+ lastModified = "12/07/2005">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>NUnit assembly test collection</_Name>
+ <_Category>NUnit</_Category>
+ <Icon>md-project|res:nunit-overlay-32.png</Icon>
+ <_Description>Create an NUnit assembly test collection</_Description>
+ <DefaultFilename>NUnitAssemblyGroup</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <CombineEntry name = "${ProjectName}" directory = "." type = "MonoDevelop.NUnit.NUnitAssemblyGroupProject">
+ </CombineEntry>
+ </Combine>
+</Template>
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitProject.xpt.xml b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitProject.xpt.xml
new file mode 100644
index 0000000..c8ba897
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitProject.xpt.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<Template originator = "Lluis Sanchez">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>NUnit Library Project</_Name>
+ <_Category>NUnit</_Category>
+ <Icon>md-project|res:nunit-overlay-32.png</Icon>
+ <_Description>Creates an NUnit library</_Description>
+ <LanguageName>*</LanguageName>
+ <DefaultFilename>NUnitProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options Target = "Library" />
+
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" refto="nunit.framework" SpecificVersion = "false" LocalCopy = "false" />
+ </References>
+
+ <Files>
+ <CodeDomFile name="Test">
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ <NamespaceImport Namespace="NUnit.Framework" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <CustomAttributes>
+ <AttributeDeclaration Name="TestFixture" />
+ </CustomAttributes>
+ <Members>
+ <MemberMethod Attributes="Public, Final" Name="TestCase" ReturnType="System.Void">
+ <CustomAttributes>
+ <AttributeDeclaration Name="Test" />
+ </CustomAttributes>
+ </MemberMethod>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitTestClass.xft.xml b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitTestClass.xft.xml
new file mode 100644
index 0000000..f604ae2
--- /dev/null
+++ b/src/addins/NUnit/obj/Debug/MonoDevelop.NUnit.templates.NUnitTestClass.xft.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="21/6/2006" LastModified="21/6/2006">
+
+ <TemplateConfiguration>
+ <_Name>Test Fixture</_Name>
+ <Icon>md-text-file-icon|res:nunit-overlay-32.png</Icon>
+ <_Category>NUnit</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates a Test Fixture.</_Description>
+ <DefaultFilename>NUnitTestClass</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <CodeDomFile>
+ <AssemblyReference>nunit.framework</AssemblyReference>
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ <NamespaceImport Namespace="NUnit.Framework" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true">
+ <CustomAttributes>
+ <AttributeDeclaration Name="TestFixture" />
+ </CustomAttributes>
+ <Members>
+ <MemberMethod Attributes="Public, Final" Name="TestCase" ReturnType="System.Void">
+ <CustomAttributes>
+ <AttributeDeclaration Name="Test" />
+ </CustomAttributes>
+ </MemberMethod>
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/NUnit/templates/NUnitAssemblyGroup.xpt.xml b/src/addins/NUnit/templates/NUnitAssemblyGroup.xpt.xml
index ee807cb..4471cae 100644
--- a/src/addins/NUnit/templates/NUnitAssemblyGroup.xpt.xml
+++ b/src/addins/NUnit/templates/NUnitAssemblyGroup.xpt.xml
@@ -9,6 +9,7 @@
<_Category>NUnit</_Category>
<Icon>md-project|res:nunit-overlay-32.png</Icon>
<_Description>Create an NUnit assembly test collection</_Description>
+ <DefaultFilename>NUnitAssemblyGroup</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/NUnit/templates/NUnitProject.xpt.xml b/src/addins/NUnit/templates/NUnitProject.xpt.xml
index 796ab65..c8ba897 100644
--- a/src/addins/NUnit/templates/NUnitProject.xpt.xml
+++ b/src/addins/NUnit/templates/NUnitProject.xpt.xml
@@ -8,6 +8,7 @@
<Icon>md-project|res:nunit-overlay-32.png</Icon>
<_Description>Creates an NUnit library</_Description>
<LanguageName>*</LanguageName>
+ <DefaultFilename>NUnitProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/NUnit/templates/NUnitTestClass.xft.xml b/src/addins/NUnit/templates/NUnitTestClass.xft.xml
index 6e7b3eb..f604ae2 100644
--- a/src/addins/NUnit/templates/NUnitTestClass.xft.xml
+++ b/src/addins/NUnit/templates/NUnitTestClass.xft.xml
@@ -7,6 +7,7 @@
<_Category>NUnit</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates a Test Fixture.</_Description>
+ <DefaultFilename>NUnitTestClass</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/addins/TextTemplating/Makefile.in b/src/addins/TextTemplating/Makefile.in
index e4149e4..7bf7bfe 100644
--- a/src/addins/TextTemplating/Makefile.in
+++ b/src/addins/TextTemplating/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -265,11 +264,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -333,6 +332,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -396,6 +399,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -555,21 +572,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/GenerationTests.cs b/src/addins/TextTemplating/Mono.TextTemplating.Tests/GenerationTests.cs
index 1a4bd2b..a9b9a3e 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating.Tests/GenerationTests.cs
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/GenerationTests.cs
@@ -69,7 +69,10 @@ namespace Mono.TextTemplating.Tests
string className = "GeneratedTextTransformation4f504ca0";
string code = GenerateCode (host, input, className, newline);
Assert.AreEqual (0, host.Errors.Count);
- Assert.AreEqual (expectedOutput, TemplatingEngineHelper.StripHeader (code, newline));
+
+ var generated = TemplatingEngineHelper.CleanCodeDom (code, newline);
+ expectedOutput = TemplatingEngineHelper.CleanCodeDom (expectedOutput, newline);
+ Assert.AreEqual (expectedOutput, generated);
}
#region Helpers
@@ -117,7 +120,7 @@ namespace Microsoft.VisualStudio.TextTemplating {
#line 9 """"
-
+
baz \#>
#line default
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/Makefile.in b/src/addins/TextTemplating/Mono.TextTemplating.Tests/Makefile.in
index 96db2fd..eab3610 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating.Tests/Makefile.in
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/Mono.TextTemplating.Tests.csproj b/src/addins/TextTemplating/Mono.TextTemplating.Tests/Mono.TextTemplating.Tests.csproj
index 1c2db59..a342070 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating.Tests/Mono.TextTemplating.Tests.csproj
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/Mono.TextTemplating.Tests.csproj
@@ -9,12 +9,14 @@
<OutputType>Library</OutputType>
<AssemblyName>Mono.TextTemplating.Tests</AssemblyName>
<RootNamespace>Mono.TextTemplating.Tests</RootNamespace>
+ <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
- <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.TextTemplating</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -22,20 +24,20 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
- <OutputPath>..\..\..\..\build\AddIns\MonoDevelop.TextTemplating</OutputPath>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="nunit.core">
- <HintPath>..\..\NUnit\lib\nunit.core.dll</HintPath>
- <Private>False</Private>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\NUnit\lib\nunit.framework.dll</HintPath>
<Private>False</Private>
</Reference>
+ <Reference Include="nunit.core">
+ <HintPath>..\..\NUnit\lib\nunit.core.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ParsingTests.cs" />
@@ -52,4 +54,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplateEnginePreprocessTemplateTests.cs b/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplateEnginePreprocessTemplateTests.cs
index 2c75e84..824a06e 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplateEnginePreprocessTemplateTests.cs
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplateEnginePreprocessTemplateTests.cs
@@ -43,7 +43,7 @@ namespace Mono.TextTemplating.Tests
"<#@ template language=\"C#\" #>\r\n" +
"Test\r\n";
- string expectedOutput = OutputSample1;
+ string expectedOutput = TemplatingEngineHelper.CleanCodeDom (OutputSample1, "\n");
string output = Preprocess (input);
Assert.AreEqual (expectedOutput, output);
@@ -55,7 +55,7 @@ namespace Mono.TextTemplating.Tests
string input = InputTemplate_ControlBlockAfterIncludedTemplateWithClassFeatureBlock;
DummyHost host = CreateDummyHostForControlBlockAfterIncludedTemplateWithClassFeatureBlockTest ();
- string expectedOutput = Output_ControlBlockAfterIncludedTemplateWithClassFeatureBlock;
+ string expectedOutput = TemplatingEngineHelper.CleanCodeDom (Output_ControlBlockAfterIncludedTemplateWithClassFeatureBlock, "\n");
string output = Preprocess (input, host);
Assert.AreEqual (expectedOutput, output, output);
@@ -80,8 +80,7 @@ namespace Mono.TextTemplating.Tests
string output = engine.PreprocessTemplate (input, host, className, classNamespace, out language, out references);
ReportErrors (host.Errors);
if (output != null) {
- output = output.Replace ("\r\n", "\n");
- return TemplatingEngineHelper.StripHeader (output, "\n");
+ return TemplatingEngineHelper.CleanCodeDom (output, "\n");
}
return null;
}
@@ -161,6 +160,7 @@ namespace Templating {
this.GenerationEnvironment = null;
#line 2 """"
+
this.Write(""Test\r\n"");
#line default
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplatingEngineHelper.cs b/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplatingEngineHelper.cs
index 977d260..da43292 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplatingEngineHelper.cs
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/TemplatingEngineHelper.cs
@@ -31,15 +31,36 @@ namespace Mono.TextTemplating.Tests
{
public static class TemplatingEngineHelper
{
- public static string StripHeader (string input, string newLine)
+ /// <summary>
+ /// Cleans CodeDOM generated code so that Windows/Mac and Mono/.NET output can be compared.
+ /// </summary>
+ public static string CleanCodeDom (string input, string newLine)
{
using (var writer = new StringWriter ()) {
using (var reader = new StringReader (input)) {
- for (int i = 0; i < 9; i++) {
- reader.ReadLine ();
- }
+
+ bool afterLineDirective = true;
+ bool stripHeader = true;
+
string line;
while ((line = reader.ReadLine ()) != null) {
+
+ if (stripHeader) {
+ if (line.StartsWith ("//", StringComparison.Ordinal) || string.IsNullOrWhiteSpace (line))
+ continue;
+ stripHeader = false;
+ }
+
+ if (afterLineDirective) {
+ if (string.IsNullOrWhiteSpace (line))
+ continue;
+ afterLineDirective = false;
+ }
+
+ if (line.Contains ("#line")) {
+ afterLineDirective = true;
+ }
+
writer.Write (line);
writer.Write (newLine);
}
diff --git a/src/addins/TextTemplating/Mono.TextTemplating.Tests/obj/Debug/Mono.TextTemplating.Tests.csproj.FilesWrittenAbsolute.txt b/src/addins/TextTemplating/Mono.TextTemplating.Tests/obj/Debug/Mono.TextTemplating.Tests.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..8249c7d
--- /dev/null
+++ b/src/addins/TextTemplating/Mono.TextTemplating.Tests/obj/Debug/Mono.TextTemplating.Tests.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/Mono.TextTemplating.Tests.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/Mono.TextTemplating.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/Mono.TextTemplating.Tests/obj/Debug/Mono.TextTemplating.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/Mono.TextTemplating.Tests/obj/Debug/Mono.TextTemplating.Tests.dll.mdb
diff --git a/src/addins/TextTemplating/Mono.TextTemplating/Makefile.in b/src/addins/TextTemplating/Mono.TextTemplating/Makefile.in
index 1e091a7..5510457 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating/Makefile.in
+++ b/src/addins/TextTemplating/Mono.TextTemplating/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/ParsedTemplate.cs b/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/ParsedTemplate.cs
index a9619d5..baddb84 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/ParsedTemplate.cs
+++ b/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/ParsedTemplate.cs
@@ -183,7 +183,7 @@ namespace Mono.TextTemplating
}
//try to resolve path relative to the file that included it
- if (!Path.IsPathRooted (fileName)) {
+ if (relativeToDirectory != null && !Path.IsPathRooted (fileName)) {
string possible = Path.Combine (relativeToDirectory, fileName);
if (File.Exists (possible))
fileName = possible;
diff --git a/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs b/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs
index 3c08199..8e6bad8 100644
--- a/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs
+++ b/src/addins/TextTemplating/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs
@@ -477,7 +477,7 @@ namespace Mono.TextTemplating
st = new CodeExpressionStatement (new CodeMethodInvokeExpression (writeMeth, new CodePrimitiveExpression (seg.Text)));
break;
case SegmentType.Helper:
- type.Members.Add (new CodeSnippetTypeMember (seg.Text) { LinePragma = location });
+ type.Members.Add (CreateSnippetMember (seg.Text, location));
helperMode = true;
break;
default:
@@ -489,7 +489,7 @@ namespace Mono.TextTemplating
//TODO: is there a way to do this for languages that use indentation for blocks, e.g. python?
using (var writer = new StringWriter ()) {
settings.Provider.GenerateCodeFromStatement (st, writer, null);
- type.Members.Add (new CodeSnippetTypeMember (writer.ToString ()) { LinePragma = location });
+ type.Members.Add (CreateSnippetMember (writer.ToString (), location ));
}
} else {
st.LinePragma = location;
@@ -512,7 +512,7 @@ namespace Mono.TextTemplating
foreach (var processor in settings.DirectiveProcessors.Values) {
string classCode = processor.GetClassCodeForProcessingRun ();
if (classCode != null)
- type.Members.Add (new CodeSnippetTypeMember (classCode));
+ type.Members.Add (CreateSnippetMember (classCode));
}
//generate the Host property if needed
@@ -530,6 +530,20 @@ namespace Mono.TextTemplating
}
return ccu;
}
+
+ static bool isMono = Type.GetType ("Mono.Runtime") != null;
+
+ static CodeSnippetTypeMember CreateSnippetMember (string value, CodeLinePragma location = null)
+ {
+ //HACK: workaround for Mono not indenting first line of member snippet when inserting into class
+ const string indent = "\n ";
+ if (isMono && !char.IsWhiteSpace (value[0]))
+ value = indent + value;
+
+ return new CodeSnippetTypeMember (value) {
+ LinePragma = location
+ };
+ }
static void GenerateHostProperty (CodeTypeDeclaration type, TemplateSettings settings)
{
diff --git a/src/addins/TextTemplating/Mono.TextTemplating/obj/Debug/Mono.TextTemplating.csproj.FilesWrittenAbsolute.txt b/src/addins/TextTemplating/Mono.TextTemplating/obj/Debug/Mono.TextTemplating.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..53df326
--- /dev/null
+++ b/src/addins/TextTemplating/Mono.TextTemplating/obj/Debug/Mono.TextTemplating.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/Mono.TextTemplating.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/Mono.TextTemplating.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/Mono.TextTemplating/obj/Debug/Mono.TextTemplating.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/Mono.TextTemplating/obj/Debug/Mono.TextTemplating.dll.mdb
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Makefile.in b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Makefile.in
index e13c5c8..4149d5e 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Makefile.in
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.addin.xml b/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.addin.xml
index 2d6538e..9662ded 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.addin.xml
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.addin.xml
@@ -6,16 +6,16 @@
url = "http://monodevelop.com"
description = "Support for editing and running T4 text templates."
category = "IDE extensions"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="Mono.TextTemplating.dll" />
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="SourceEditor2" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/SourceEditor2/SyntaxModes">
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.csproj b/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.csproj
index 641a215..0bb9b97 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.csproj
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.csproj
@@ -45,7 +45,6 @@
<Compile Include="TextTemplatingFilePreprocessor.cs" />
<Compile Include="TextTemplatingFileGenerator.cs" />
<Compile Include="MonoDevelopTemplatingHost.cs" />
- <Compile Include="ThreadAsyncOperation.cs" />
<Compile Include="ProjectFileTemplatingHost.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4PreprocessedTemplateCSharp.xft.xml b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4PreprocessedTemplateCSharp.xft.xml
index c6f4b5e..c508b96 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4PreprocessedTemplateCSharp.xft.xml
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4PreprocessedTemplateCSharp.xft.xml
@@ -9,6 +9,7 @@
<Icon></Icon>
<_Category>Text Templating</_Category>
<_Description>A T4 template that will be preprocessed into a partial class.</_Description>
+ <DefaultFilename>PreprocessedT4Template</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4TemplateCSharp.xft.xml b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4TemplateCSharp.xft.xml
index ea3952f..9956d16 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4TemplateCSharp.xft.xml
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/Templates/T4TemplateCSharp.xft.xml
@@ -9,6 +9,7 @@
<Icon></Icon>
<_Category>Text Templating</_Category>
<_Description>A T4 template for generating code or text files.</_Description>
+ <DefaultFilename>T4Template</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFileGenerator.cs b/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFileGenerator.cs
index 1dcd8f3..ce05822 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFileGenerator.cs
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFileGenerator.cs
@@ -40,7 +40,7 @@ namespace MonoDevelop.TextTemplating
host.AddMonoDevelopHostImport ();
var defaultOutputName = file.FilePath.ChangeExtension (".cs"); //cs extension for VS compat
- string ns = TextTemplatingFilePreprocessor.GetNamespaceHint (file, defaultOutputName);
+ string ns = CustomToolService.GetFileNamespace (file, defaultOutputName);
TextTemplatingFilePreprocessor.LogicalSetData ("NamespaceHint", ns, result.Errors);
host.ProcessTemplate (file.FilePath, defaultOutputName);
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs b/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs
index 544fb77..654a900 100644
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/TextTemplatingFilePreprocessor.cs
@@ -65,7 +65,7 @@ namespace MonoDevelop.TextTemplating
string[] references;
string className = provider.CreateValidIdentifier (file.FilePath.FileNameWithoutExtension);
- string classNamespace = GetNamespaceHint (file, outputFile);
+ string classNamespace = CustomToolService.GetFileNamespace (file, outputFile);
LogicalSetData ("NamespaceHint", classNamespace, result.Errors);
host.PreprocessTemplate (file.FilePath, className, classNamespace, outputFile, encoding, out langauge, out references);
@@ -77,17 +77,6 @@ namespace MonoDevelop.TextTemplating
}, result);
}
- internal static string GetNamespaceHint (ProjectFile file, string outputFile)
- {
- string ns = file.CustomToolNamespace;
- if (string.IsNullOrEmpty (ns) && !string.IsNullOrEmpty (outputFile)) {
- var dnp = file.Project as DotNetProject;
- if (dnp != null)
- ns = dnp.GetDefaultNamespace (outputFile);
- }
- return ns;
- }
-
static bool warningLogged;
internal static void LogicalSetData (string name, object value,
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/ThreadAsyncOperation.cs b/src/addins/TextTemplating/MonoDevelop.TextTemplating/ThreadAsyncOperation.cs
deleted file mode 100644
index ee45dc9..0000000
--- a/src/addins/TextTemplating/MonoDevelop.TextTemplating/ThreadAsyncOperation.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// TextTemplatingFileGenerator.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc.
-//
-// 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 MonoDevelop.Ide.CustomTools;
-using System.CodeDom.Compiler;
-using MonoDevelop.Projects;
-using System.IO;
-using Mono.TextTemplating;
-using MonoDevelop.Core;
-using System.Threading;
-namespace MonoDevelop.TextTemplating
-{
- public class ThreadAsyncOperation : IAsyncOperation
- {
- Thread thread;
- bool cancelled;
- SingleFileCustomToolResult result;
- Action task;
-
- public ThreadAsyncOperation (Action task, SingleFileCustomToolResult result)
- {
- if (result == null)
- throw new ArgumentNullException ("result");
-
- this.task = task;
- this.result = result;
- thread = new Thread (Run);
- thread.Start ();
- }
-
- void Run ()
- {
- try {
- task ();
- } catch (ThreadAbortException ex) {
- result.UnhandledException = ex;
- Thread.ResetAbort ();
- } catch (Exception ex) {
- result.UnhandledException = ex;
- }
- if (Completed != null)
- Completed (this);
- }
-
- public event OperationHandler Completed;
-
- public void Cancel ()
- {
- cancelled = true;
- thread.Abort ();
- }
-
- public void WaitForCompleted ()
- {
- thread.Join ();
- }
-
- public bool IsCompleted {
- get { return !thread.IsAlive; }
- }
-
- public bool Success {
- get { return !cancelled && result.Success; }
- }
-
- public bool SuccessWithWarnings {
- get { return !cancelled && result.SuccessWithWarnings; }
- }
- }
-}
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.MonoDevelop.TextTemplating.addin.xml b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.MonoDevelop.TextTemplating.addin.xml
new file mode 100644
index 0000000..9662ded
--- /dev/null
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.MonoDevelop.TextTemplating.addin.xml
@@ -0,0 +1,56 @@
+<Addin id = "TextTemplating"
+ namespace = "MonoDevelop"
+ name = "Text Templating"
+ author = "Michael Hutchinson"
+ copyright = "MIT X11"
+ url = "http://monodevelop.com"
+ description = "Support for editing and running T4 text templates."
+ category = "IDE extensions"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="Mono.TextTemplating.dll" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/SyntaxModes">
+ <Templates resource="T4SyntaxMode.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="application/t4-template" _description="Text template" icon="md-template" isText="true">
+ <File pattern="*.tt" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "T4Templates"
+ _label = "T4 Templates"
+ extensions = "*.tt" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.TextTemplating.Parser.T4Parser" mimeType="application/t4-template" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class fileExtensions = ".tt" class = "MonoDevelop.TextTemplating.Gui.T4EditorExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "T4TemplateCSharp"
+ file = "Templates/T4TemplateCSharp.xft.xml"/>
+ <FileTemplate id = "T4PreprocessedTemplateCSharp"
+ file = "Templates/T4PreprocessedTemplateCSharp.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CustomTools">
+ <Tool name="TextTemplatingFileGenerator" type="MonoDevelop.TextTemplating.TextTemplatingFileGenerator"/>
+ <Tool name="TextTemplatingFilePreprocessor" type="MonoDevelop.TextTemplating.TextTemplatingFilePreprocessor"/>
+ </Extension>
+</Addin>
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.T4SyntaxMode.xml b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.T4SyntaxMode.xml
new file mode 100644
index 0000000..09b6d4c
--- /dev/null
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.T4SyntaxMode.xml
@@ -0,0 +1,242 @@
+<!-- CSharpSyntaxMode.xml
+
+ Author:
+ Michael Hutchinson <mhutchinson at novell.com>
+
+ Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "T4" mimeTypes="application/t4-template">
+ <Span color="String" rule="t4">
+ <Begin>
+</Begin>
+ <End>qkl6ynrv7y234crtnq238rtxck3</End>
+ </Span>
+ <Span color = "Razor Code" tagColor="Html Server-Side Script" rule = "directive">
+ <Begin><#@</Begin>
+ <End>#></End>
+ </Span>
+
+ <Rule name="t4">
+ <!-- directives -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script" rule = "directive">
+ <Begin><#@</Begin>
+ <End>#></End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script" rule = "csharp">
+ <Begin><#=</Begin>
+ <End>#></End>
+ </Span>
+
+ <Span color = "Razor Code" tagColor="Html Server-Side Script" rule = "csharp">
+ <Begin><#+</Begin>
+ <End>#></End>
+ </Span>
+
+ <Span color = "Razor Code" tagColor="Html Server-Side Script" rule = "csharp">
+ <Begin><#</Begin>
+ <End>#></End>
+ </Span>
+ </Rule>
+
+ <Rule name = "directive">
+ <Span color = "String" rule="InLiteral">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="InLiteral">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <!-- attributes -->
+ <Match color = "Keyword(Type)">[A-Za-z0-9_]+(:[A-Za-z0-9_]+)?[\s\n\r]*=</Match>
+ </Rule>
+
+ <Rule name = "csharp">
+ <Span color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "false" escape='""'>
+ <Begin>@"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\"'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\'">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ <Word>base</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>as</Word>
+ <Word>is</Word>
+ <Word>new</Word>
+ <Word>sizeof</Word>
+ <Word>typeof</Word>
+ <Word>stackalloc</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ <Word>switch</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>foreach</Word>
+ <Word>in</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>yield</Word>
+ <Word>partial</Word>
+ <Word>global</Word>
+ <Word>where</Word>
+ <Word>__arglist</Word>
+ <Word>__makeref</Word>
+ <Word>__reftype</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>abstract</Word>
+ <Word>const</Word>
+ <Word>event</Word>
+ <Word>extern</Word>
+ <Word>override</Word>
+ <Word>readonly</Word>
+ <Word>sealed</Word>
+ <Word>static</Word>
+ <Word>virtual</Word>
+ <Word>volatile</Word>
+
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ <Word>internal</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ <Word>byte</Word>
+ <Word>char</Word>
+ <Word>decimal</Word>
+ <Word>double</Word>
+ <Word>enum</Word>
+ <Word>float</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+ <Word>sbyte</Word>
+ <Word>short</Word>
+ <Word>struct</Word>
+ <Word>uint</Word>
+ <Word>ushort</Word>
+ <Word>ulong</Word>
+ <Word>object</Word>
+ <Word>string</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>using</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
+ <Word>get</Word>
+ <Word>set</Word>
+ <Word>add</Word>
+ <Word>remove</Word>
+ <Word>value</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>interface</Word>
+ <Word>delegate</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ <Word>params</Word>
+ <Word>ref</Word>
+ <Word>out</Word>
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ <Word>explicit</Word>
+ <Word>implicit</Word>
+
+ <Word>operator</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>checked</Word>
+ <Word>unchecked</Word>
+ <Word>fixed</Word>
+ <Word>unsafe</Word>
+ <Word>lock</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.csproj.FilesWrittenAbsolute.txt b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..c1ceb7d
--- /dev/null
+++ b/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,8 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.MonoDevelop.TextTemplating.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.T4SyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/Templates/T4TemplateCSharp.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/Templates/T4PreprocessedTemplateCSharp.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/MonoDevelop.TextTemplating.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/MonoDevelop.TextTemplating/obj/Debug/MonoDevelop.TextTemplating.dll.mdb
diff --git a/src/addins/TextTemplating/TextTransform/Makefile.in b/src/addins/TextTemplating/TextTransform/Makefile.in
index d914a9a..30d275d 100644
--- a/src/addins/TextTemplating/TextTransform/Makefile.in
+++ b/src/addins/TextTemplating/TextTransform/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/TextTemplating/TextTransform/obj/Debug/TextTransform.csproj.FilesWrittenAbsolute.txt b/src/addins/TextTemplating/TextTransform/obj/Debug/TextTransform.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..afa26de
--- /dev/null
+++ b/src/addins/TextTemplating/TextTransform/obj/Debug/TextTransform.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/TextTransform.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.TextTemplating/TextTransform.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/TextTransform/obj/Debug/TextTransform.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/TextTemplating/TextTransform/obj/Debug/TextTransform.exe.mdb
diff --git a/src/addins/VBNetBinding/Makefile.in b/src/addins/VBNetBinding/Makefile.in
index 95bb4f0..af1bf37 100644
--- a/src/addins/VBNetBinding/Makefile.in
+++ b/src/addins/VBNetBinding/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/VBNetBinding/VBNetBinding.addin.xml b/src/addins/VBNetBinding/VBNetBinding.addin.xml
index ea5a75b..c16a1cc 100644
--- a/src/addins/VBNetBinding/VBNetBinding.addin.xml
+++ b/src/addins/VBNetBinding/VBNetBinding.addin.xml
@@ -6,11 +6,11 @@
url = "http://bard.sytes.net/vbnetbinding"
description = "VB.NET Language Binding"
category = "Language bindings"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.VBNetBinding.addin.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.VBNetBinding.addin.xml
new file mode 100644
index 0000000..c16a1cc
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.VBNetBinding.addin.xml
@@ -0,0 +1,91 @@
+<Addin id = "VBBinding"
+ namespace = "MonoDevelop"
+ name = "VB.NET Language Binding"
+ author = "Levi Bard"
+ copyright = "LGPL"
+ url = "http://bard.sytes.net/vbnetbinding"
+ description = "VB.NET Language Binding"
+ category = "Language bindings"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <DotNetProject
+ language="VBNet"
+ extension="vbproj"
+ guid="{F184B08F-C81C-45F6-A57F-5ABD9991F28F}"
+ import="$(MSBuildBinPath)\Microsoft.VisualBasic.targets"
+ resourceHandler="MonoDevelop.VBNetBinding.VBNetResourceIdBuilder"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "VBNet"
+ insertbefore = "AllFiles"
+ _label = "VB.NET Files"
+ extensions = "*.vb"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "EmptyVBFile" resource = "EmptyVBFile.xft.xml"/>
+ <FileTemplate id = "VBAssemblyInfo" resource = "AssemblyInfo.xft.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "EmptyVBProject" resource = "EmptyVBProject.xpt.xml"/>
+ <ProjectTemplate id = "VBConsoleApplicationProject" resource = "VBConsoleApplicationProject.xpt.xml"/>
+ <ProjectTemplate id = "VBGtkSharp2Project" resource = "VBGtkSharp2Project.xpt.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build/General">
+ <Condition id="ActiveLanguage" value="VBNet">
+ <Panel id = "VBNetProjectOptionsPanel"
+ _label = "General Options"
+ class = "MonoDevelop.VBNetBinding.ProjectOptionsPanel"/>
+ <Panel id = "VBNetOutputOptionsPanel"
+ _label = "Imports"
+ class = "MonoDevelop.VBNetBinding.ImportOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels/Build/Compiler">
+ <Condition id="ActiveLanguage" value="VBNet">
+ <Panel id = "VBNetConfigurationOptionsPanel"
+ _label = "Compiler Options"
+ class = "MonoDevelop.VBNetBinding.ConfigurationOptionsPanel"/>
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-vb-file" resource = "VB.FileIcon" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-vb" _description="Visual Basic source code" icon="md-vb-file" isText="true">
+ <File pattern="*.vb" />
+ </MimeType>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/LanguageBindings">
+ <LanguageBinding id = "VBNet"
+ supportedextensions = ".vb"
+ class = "MonoDevelop.VBNetBinding.VBLanguageBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/SerializableClasses">
+ <DataType class = "MonoDevelop.VBNetBinding.VBCompilerParameters" />
+ <DataType class = "MonoDevelop.VBNetBinding.Import" />
+ </Extension>
+ <!--
+ <Extension path = "/MonoDevelop/ProjectModel/DomParser">
+ <Parser class = "MonoDevelop.VBNetBinding.DomParser" fileExtensions=".vb" />
+ </Extension>-->
+
+</Addin>
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.csproj.FilesWrittenAbsolute.txt b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..2579b34
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,14 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBConsoleApplicationProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBGtkSharp2Project.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.VBNetBinding.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.AssemblyInfo.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.icons.VB.FileIcon
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.icons.vb-icon-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/VBNetBinding.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.VBNetBinding.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/BackendBindings/MonoDevelop.VBNetBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/MonoDevelop.VBNetBinding.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VBNetBinding/obj/Debug/MonoDevelop.VBNetBinding.dll.mdb
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.gtk-gui.gui.stetic b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.gtk-gui.gui.stetic
new file mode 100644
index 0000000..269949c
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.gtk-gui.gui.stetic
@@ -0,0 +1,1172 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/AddIns/BackendBindings/MonoDevelop.VBNetBinding.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="MonoDevelop.VBNetBinding.ProjectOptionsPanelWidget" design-size="366 318">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">9</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="cmbCodePage">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbOptionCompare">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbOptionExplicit">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbOptionInfer">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbOptionStrict">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="compileTargetCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="entryMainClass">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="iconEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Option Infer:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">8</property>
+ <property name="BottomAttach">9</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Win32 Icon:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">My Type:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Option Explicit:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Option Strict:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Option Compare:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compiler Code Page:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label86">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Compile _Target:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label88">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Main Class:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">mainClassEntry</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="txtMyType">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VBNetBinding.ConfigurationOptionsPanelWidget" design-size="384 440">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label82">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Optimization/Debug options</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label76">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbDebugType">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbDefineDEBUG">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbDefineTRACE">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbOptimize">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label86">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Debug Type:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label87">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Define DEBUG:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label88">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Define TRACE:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label94">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Optimize:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label83">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Warnings</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label77">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbEnableWarnings">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label91">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Treat as error:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label92">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Enable Warnings:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label93">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Don't warn about:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txtDontWarnAbout">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txtTreatAsError">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label85">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Misc</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label79">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbGenerateXmlDocumentation">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="cmbRemoveIntegerChecks">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label89">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Additional compiler arguments:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label90">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Generate XML documentation:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label95">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Remove integer checks:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label96">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Define constants:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txtAdditionalArguments">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txtDefineConstants">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VBNetBinding.ImportsOptionsPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="cmdAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Add</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCmdAddClicked" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txtImport">
+ <property name="MemberName">txtImport</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnTxtImportChanged" />
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="cmdRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Remove</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCmdRemoveClicked" after="yes" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.icons.vb-icon-32.png b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.icons.vb-icon-32.png
new file mode 100644
index 0000000..ecfa3ca
Binary files /dev/null and b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.icons.vb-icon-32.png differ
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.md1format.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.md1format.xml
new file mode 100644
index 0000000..1451c26
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.md1format.xml
@@ -0,0 +1,16 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.VBNetBinding.VBCompilerParameters">
+ <ItemProperty member="noWarnings" name="nowarn"/>
+ <ItemProperty member="optimize" name="optimize"/>
+ <ItemProperty member="generateOverflowChecks" name="generateoverflowchecks"/>
+ <ItemProperty member="definesymbols" name="definesymbols" />
+ <ItemProperty member="additionalParameters" name="additionalParameters" />
+ <ItemProperty member="defineDebug" name="defineDebug" />
+ <ItemProperty member="defineTrace" name="defineTrace" />
+ <ItemProperty member="debugType" name="debugType" />
+ <ItemProperty member="documentationFile" name="documentationFile" />
+ <ItemProperty member="warningsAsErrors" name="warningsAsErrors" />
+ <ItemProperyt member="treatWarningsAsErrors" name="treatWarningsAsErrors" />
+ <ItemProperty member="warningLevel" name="warningLevel" />
+ </DataItem>
+</SerializationMap>
\ No newline at end of file
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.AssemblyInfo.xft.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.AssemblyInfo.xft.xml
new file mode 100644
index 0000000..77e136a
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.AssemblyInfo.xft.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<Template
+ Originator="Michael Hutchinson"
+ Created="2007/12/31"
+ LastModified="2007/12/31">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Assembly Information</_Name>
+ <_Category>Misc</_Category>
+ <Icon>md-text-file-icon</Icon>
+ <LanguageName>VBNet</LanguageName>
+ <DefaultFilename IsFixed="True">AssemblyInfo.vb</DefaultFilename>
+ <_Description>A file defining assembly information attributes.</_Description>
+ </TemplateConfiguration>
+
+ <Conditions>
+ <ParentProject PermittedCreationPaths="" ExcludedFiles="AssemblyInfo.vb" RequireProject="True"/>
+ </Conditions>
+
+ <!-- Template Content -->
+ <TemplateFiles>
+ <File name="AssemblyInfo.vb" AddStandardHeader="True">
+ <![CDATA[Imports System.Reflection
+Imports System.Runtime.CompilerServices
+
+' Information about this assembly is defined by the following attributes.
+' Change them to the values specific to your project.
+
+<assembly: AssemblyTitle("${ProjectName}")>
+<assembly: AssemblyDescription("")>
+<assembly: AssemblyConfiguration("")>
+<assembly: AssemblyCompany("")>
+<assembly: AssemblyProduct("")>
+<assembly: AssemblyCopyright("")>
+<assembly: AssemblyTrademark("")>
+<assembly: AssemblyCulture("")>
+
+' The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+' If the build and revision are set to '*' they will be updated automatically.
+
+<assembly: AssemblyVersion("1.0.0.0")>
+
+' The following attributes are used to specify the signing key for the assembly,
+' if desired. See the Mono documentation for more information about signing.
+
+<assembly: AssemblyDelaySign(false)>
+<assembly: AssemblyKeyFile("")>
+]]></File>
+ </TemplateFiles>
+</Template>
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBFile.xft.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBFile.xft.xml
new file mode 100644
index 0000000..423bfaa
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBFile.xft.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Template Originator="Levi Bard" Language="VBNet" Created="10/19/2004" LastModified="10/19/2004">
+
+ <TemplateConfiguration>
+ <_Name>Empty File</_Name>
+ <Icon>md-text-file-icon</Icon>
+ <_Category>General</_Category>
+ <LanguageName>VBNet</LanguageName>
+ <_Description>Creates an empty VB.Net file.</_Description>
+ <DefaultFilename>EmptyVBFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".vb" AddStandardHeader="True">
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBProject.xpt.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBProject.xpt.xml
new file mode 100644
index 0000000..cebfe47
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.EmptyVBProject.xpt.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<Template originator = "Levi Bard"
+ created = "10/19/2004"
+ lastModified = "10/19/2004">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Empty Project</_Name>
+ <_Category>VBNet</_Category>
+ <Icon>md-project|res:vb-icon-32.png</Icon>
+ <LanguageName>VBNet</LanguageName>
+ <_Description>Creates an empty VB.Net solution.</_Description>
+ <DefaultFilename>EmptyVBProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" directory = "."/>
+ </Combine>
+</Template>
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBConsoleApplicationProject.xpt.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBConsoleApplicationProject.xpt.xml
new file mode 100644
index 0000000..06184ff
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBConsoleApplicationProject.xpt.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<Template originator = "Levi Bard"
+ created = "10/19/2004"
+ lastModified = "10/23/2004">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Console Project</_Name>
+ <_Category>VBNet</_Category>
+ <Icon>md-project-console|res:vb-icon-32.png</Icon>
+ <LanguageName>VBNet</LanguageName>
+ <_Description>Create a console VB.Net project</_Description>
+ <DefaultFilename>ConsoleVBProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Application.vb"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options ExternalConsole="True"/>
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+ <Files>
+ <File name = "Application.vb" AddStandardHeader="True">
+<![CDATA[
+
+Public Class Application
+ Public Shared Sub Main()
+ System.Console.WriteLine("Hello world!")
+ End Sub
+End Class
+]]></File>
+ <FileTemplateReference TemplateID="VBAssemblyInfo" name="AssemblyInfo.vb" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBGtkSharp2Project.xpt.xml b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBGtkSharp2Project.xpt.xml
new file mode 100644
index 0000000..854febe
--- /dev/null
+++ b/src/addins/VBNetBinding/obj/Debug/VBNetBinding.templates.VBGtkSharp2Project.xpt.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<Template originator = "Ben Motmans"
+ created = "02/16/2005"
+ lastModified = "02/16/2005">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Gtk# 2.0 Project</_Name>
+ <_Category>VBNet</_Category>
+ <Icon>md-project-gui|res:vb-icon-32.png</Icon>
+ <LanguageName>VBNet</LanguageName>
+ <_Description>Creates a VB.NET Gtk# 2.0 project.</_Description>
+ <DefaultFilename>Gtk2VBProject</DefaultFilename>
+ </TemplateConfiguration>
+
+ <!-- Actions -->
+ <Actions>
+ <Open filename = "Main.vb"/>
+ </Actions>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = ".">
+ <Options>
+ <StartupProject>${ProjectName}</StartupProject>
+ </Options>
+
+ <Project name = "${ProjectName}" directory = ".">
+ <Options Target="WinExe"/>
+
+ <References>
+ <Reference type="Package" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <Reference type="Package" SpecificVersion="false" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference type="Package" SpecificVersion="false" refto="atk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ </References>
+
+ <Files>
+ <File name="Main.vb" AddStandardHeader="True"><![CDATA[Imports System
+Imports Gtk
+
+Public Class MainClass
+
+ Public Shared Sub Main ()
+ Application.Init ()
+ Dim win as new MyWindow ()
+ win.Show ()
+ Application.Run ()
+ End Sub
+
+End Class]]></File>
+ <File name="MyWindow.vb" AddStandardHeader="True"><![CDATA[Imports System
+Imports Gtk
+
+Public Class MyWindow
+ Inherits Window
+
+ Public Sub New ()
+ MyBase.New("MyWindow")
+
+ Me.SetDefaultSize (400, 300)
+ AddHandler MyBase.DeleteEvent, AddressOf OnMyWindowDelete
+ Me.ShowAll ()
+ End Sub
+
+ Private Sub OnMyWindowDelete (ByVal sender As Object, ByVal a As DeleteEventArgs)
+ Application.Quit ()
+ a.RetVal = true
+ End Sub
+
+End Class]]></File>
+ <FileTemplateReference TemplateID="VBAssemblyInfo" name="AssemblyInfo.vb" />
+ </Files>
+ </Project>
+ </Combine>
+</Template>
diff --git a/src/addins/VBNetBinding/templates/EmptyVBFile.xft.xml b/src/addins/VBNetBinding/templates/EmptyVBFile.xft.xml
index c54f72a..423bfaa 100644
--- a/src/addins/VBNetBinding/templates/EmptyVBFile.xft.xml
+++ b/src/addins/VBNetBinding/templates/EmptyVBFile.xft.xml
@@ -7,10 +7,11 @@
<_Category>General</_Category>
<LanguageName>VBNet</LanguageName>
<_Description>Creates an empty VB.Net file.</_Description>
+ <DefaultFilename>EmptyVBFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".vb" DefaultName="EmptyVBfile" AddStandardHeader="True">
+ <File DefaultExtension=".vb" AddStandardHeader="True">
</File>
</TemplateFiles>
diff --git a/src/addins/VBNetBinding/templates/EmptyVBProject.xpt.xml b/src/addins/VBNetBinding/templates/EmptyVBProject.xpt.xml
index 8187f34..cebfe47 100644
--- a/src/addins/VBNetBinding/templates/EmptyVBProject.xpt.xml
+++ b/src/addins/VBNetBinding/templates/EmptyVBProject.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project|res:vb-icon-32.png</Icon>
<LanguageName>VBNet</LanguageName>
<_Description>Creates an empty VB.Net solution.</_Description>
+ <DefaultFilename>EmptyVBProject</DefaultFilename>
</TemplateConfiguration>
<!-- Template Content -->
diff --git a/src/addins/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml b/src/addins/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml
index 43b7b12..06184ff 100644
--- a/src/addins/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml
+++ b/src/addins/VBNetBinding/templates/VBConsoleApplicationProject.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project-console|res:vb-icon-32.png</Icon>
<LanguageName>VBNet</LanguageName>
<_Description>Create a console VB.Net project</_Description>
+ <DefaultFilename>ConsoleVBProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml b/src/addins/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml
index 61ed9d6..854febe 100644
--- a/src/addins/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml
+++ b/src/addins/VBNetBinding/templates/VBGtkSharp2Project.xpt.xml
@@ -10,6 +10,7 @@
<Icon>md-project-gui|res:vb-icon-32.png</Icon>
<LanguageName>VBNet</LanguageName>
<_Description>Creates a VB.NET Gtk# 2.0 project.</_Description>
+ <DefaultFilename>Gtk2VBProject</DefaultFilename>
</TemplateConfiguration>
<!-- Actions -->
diff --git a/src/addins/VersionControl/Makefile.am b/src/addins/VersionControl/Makefile.am
index a775cec..19a1809 100644
--- a/src/addins/VersionControl/Makefile.am
+++ b/src/addins/VersionControl/Makefile.am
@@ -1,2 +1,8 @@
-SUBDIRS = MonoDevelop.VersionControl MonoDevelop.VersionControl.Subversion MonoDevelop.VersionControl.Subversion.Unix MonoDevelop.VersionControl.Git
+SUBDIRS = \
+ MonoDevelop.VersionControl \
+ MonoDevelop.VersionControl.Subversion \
+ MonoDevelop.VersionControl.Subversion.Unix \
+ MonoDevelop.VersionControl.Git \
+ MonoDevelop.VersionControl.Subversion.Tests \
+ MonoDevelop.VersionControl.Git.Tests
diff --git a/src/addins/VersionControl/Makefile.in b/src/addins/VersionControl/Makefile.in
index d214a1b..91ec35f 100644
--- a/src/addins/VersionControl/Makefile.in
+++ b/src/addins/VersionControl/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -225,7 +224,14 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = MonoDevelop.VersionControl MonoDevelop.VersionControl.Subversion MonoDevelop.VersionControl.Subversion.Unix MonoDevelop.VersionControl.Git
+SUBDIRS = \
+ MonoDevelop.VersionControl \
+ MonoDevelop.VersionControl.Subversion \
+ MonoDevelop.VersionControl.Subversion.Unix \
+ MonoDevelop.VersionControl.Git \
+ MonoDevelop.VersionControl.Subversion.Tests \
+ MonoDevelop.VersionControl.Git.Tests
+
all: all-recursive
.SUFFIXES:
@@ -261,11 +267,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -329,6 +335,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -392,6 +402,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -551,21 +575,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseGitRepositoryTests.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseGitRepositoryTests.cs
new file mode 100644
index 0000000..a1de556
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseGitRepositoryTests.cs
@@ -0,0 +1,220 @@
+//
+// RepositoryTests.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoDevelop.Core;
+using MonoDevelop.VersionControl;
+using MonoDevelop.VersionControl.Git;
+using MonoDevelop.VersionControl.Tests;
+using NGit;
+using NUnit.Framework;
+using System.IO;
+using System;
+using NGit.Storage.File;
+using NGit.Api;
+
+namespace MonoDevelop.VersionControl.Git.Tests
+{
+ [TestFixture]
+ public class BaseGitUtilsTest : BaseRepoUtilsTest
+ {
+ protected GitRepository repo;
+ protected GitRepository repo2;
+
+ [SetUp]
+ public override void Setup ()
+ {
+ // Generate directories and a svn util.
+ rootUrl = new FilePath (FileService.CreateTempDirectory () + Path.DirectorySeparatorChar);
+ rootCheckout = new FilePath (FileService.CreateTempDirectory () + Path.DirectorySeparatorChar);
+ Directory.CreateDirectory (rootUrl.FullPath + "repo.git");
+ repoLocation = "file:///" + rootUrl.FullPath + "repo.git";
+
+ // Initialize the bare repo.
+ InitCommand ci = new InitCommand ();
+ ci.SetDirectory (new Sharpen.FilePath (rootUrl.FullPath + "repo.git"));
+ ci.SetBare (true);
+ ci.Call ();
+ FileRepository bare = new FileRepository (new Sharpen.FilePath (rootUrl.FullPath + "repo.git"));
+ string branch = Constants.R_HEADS + "master";
+
+ RefUpdate head = bare.UpdateRef (Constants.HEAD);
+ head.DisableRefLog ();
+ head.Link (branch);
+
+ // Check out the repository.
+ Checkout (rootCheckout);
+ repo = GetRepo (repoLocation, rootCheckout);
+ }
+
+ [TearDown]
+ public override void TearDown ()
+ {
+ DeleteDirectory (rootUrl);
+ DeleteDirectory (rootCheckout);
+ }
+
+ [Test]
+ public override void CheckoutExists ()
+ {
+ Assert.True (Directory.Exists (rootCheckout + ".git"));
+ }
+
+ [Test]
+ public override void FileIsAdded ()
+ {
+ FilePath added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+
+ VersionInfo vi = repo.GetVersionInfo (added);
+ Assert.AreEqual (VersionStatus.Versioned, (VersionStatus.Versioned & vi.Status));
+ Assert.IsFalse (vi.CanAdd);
+ Assert.IsFalse (vi.CanRevert);
+ }
+
+ [Test]
+ [Ignore]
+ public override void FileIsCommitted ()
+ {
+ FilePath added = rootCheckout + "testfile";
+
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ ChangeSet changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "test";
+ repo.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+
+ VersionInfo vi = repo.GetVersionInfo (added);
+ Assert.AreEqual (VersionStatus.ScheduledAdd, (VersionStatus.ScheduledAdd & vi.Status));
+ }
+
+ [Test]
+ [Ignore]
+ // Works but doesn't delete the files on Windows.
+ public override void UpdateIsDone ()
+ {
+ // Update fails on repositories with nothing in them.
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ ChangeSet changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "test";
+ repo.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ repo.Push (new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor (), repo.GetCurrentRemote (), repo.GetCurrentBranch ());
+
+ // Checkout a second repository.
+ FilePath second = new FilePath (FileService.CreateTempDirectory () + Path.DirectorySeparatorChar);
+ Checkout (second);
+ added = second + "testfile2";
+ File.Create (added).Close ();
+ repo2.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "test2";
+ repo2.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ repo2.Push (new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor (), repo2.GetCurrentRemote (), repo2.GetCurrentBranch ());
+
+ repo.Update (repo.RootPath, true, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ Assert.True (File.Exists (rootCheckout + "testfile2"));
+
+ DeleteDirectory (second);
+ }
+
+ [Test]
+ public override void LogIsProper ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ ChangeSet changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "File committed";
+ repo.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ foreach (Revision rev in repo.GetHistory (added, null)) {
+ Assert.AreEqual ("File committed", rev.Message);
+ }
+ }
+
+ [Test]
+ public override void DiffIsProper ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ ChangeSet changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "File committed";
+ repo.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ File.AppendAllText (added, "text" + Environment.NewLine);
+
+ string difftext = @"@@ -0,0 +1 @@
++text
+";
+ Assert.AreEqual (difftext, repo.GenerateDiff (added, repo.GetVersionInfo (added)).Content.Replace ("\n", "\r\n"));
+ }
+
+ [Test]
+ public override void Reverts ()
+ {
+ string added = rootCheckout + "testfile";
+ string content = "text";
+
+ File.Create (added).Close ();
+ repo.Add (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ ChangeSet changes = repo.CreateChangeSet (repo.RootPath);
+ changes.AddFile (added);
+ changes.GlobalComment = "File committed";
+ repo.Commit (changes, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+
+ // Revert to head.
+ File.WriteAllText (added, content);
+ repo.Revert (added, false, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ Assert.AreEqual (repo.GetBaseText (added), File.ReadAllText (added));
+ }
+
+ #region Util
+
+ public override void Checkout (string path)
+ {
+ GitRepository _repo = GetRepo (repoLocation, path);
+ _repo.Checkout (path, true, new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor ());
+ if (repo == null)
+ repo = _repo;
+ else
+ repo2 = _repo;
+ }
+
+ public GitRepository GetRepo (string url, string path)
+ {
+ return new GitRepository (path, url);
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs
new file mode 100644
index 0000000..5fe742d
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/BaseRepositoryTests.cs
@@ -0,0 +1,92 @@
+//
+// RepositoryTests.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 NUnit.Framework;
+using System.IO;
+using System;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.VersionControl.Tests
+{
+ [TestFixture]
+ public abstract class BaseRepoUtilsTest
+ {
+ protected FilePath repoLocation = "";
+ protected FilePath rootUrl = "";
+ protected FilePath rootCheckout;
+
+ [SetUp]
+ public abstract void Setup ();
+
+ [TearDown]
+ public abstract void TearDown ();
+
+ [Test]
+ public abstract void CheckoutExists ();
+
+ [Test]
+ public abstract void FileIsAdded ();
+
+ [Test]
+ public abstract void FileIsCommitted ();
+
+ [Test]
+ public abstract void UpdateIsDone ();
+
+ [Test]
+ public abstract void LogIsProper ();
+
+ [Test]
+ public abstract void DiffIsProper ();
+
+ [Test]
+ public abstract void Reverts ();
+
+ #region Util
+
+ public abstract void Checkout (string path);
+
+ public static void DeleteDirectory (string path)
+ {
+ string[] files = Directory.GetFiles (path);
+ string[] dirs = Directory.GetDirectories (path);
+
+ foreach (var file in files) {
+ File.SetAttributes (file, FileAttributes.Normal);
+ File.Delete (file);
+ }
+
+ foreach (var dir in dirs) {
+ DeleteDirectory (dir);
+ }
+
+ Directory.Delete (path, true);
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.am b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.am
new file mode 100644
index 0000000..5a8c3c5
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.am
@@ -0,0 +1,5 @@
+include $(top_srcdir)/xbuild.include
+
+if ! ENABLE_GIT
+SKIP=y
+endif
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.in
new file mode 100644
index 0000000..c02c601
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile.in
@@ -0,0 +1,429 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/xbuild.include
+subdir = src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_FLAGS = @ACLOCAL_FLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CSC = @CSC@
+CSC_FLAGS = @CSC_FLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DYLD_FALLBACK_LIBRARY_PATH = @DYLD_FALLBACK_LIBRARY_PATH@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
+GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
+GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
+GLIB_SHARP_CFLAGS = @GLIB_SHARP_CFLAGS@
+GLIB_SHARP_LIBS = @GLIB_SHARP_LIBS@
+GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
+GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
+GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
+GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
+GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
+GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_PREFIX = @LIB_PREFIX@
+LIB_SUFFIX = @LIB_SUFFIX@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MCS = @MCS@
+MD_ADDIN_DIR = @MD_ADDIN_DIR@
+MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
+MD_DIR = @MD_DIR@
+MKDIR_P = @MKDIR_P@
+MONO = @MONO@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_LIBS = @MONODOC_LIBS@
+MONO_GAC_PREFIX = @MONO_GAC_PREFIX@
+MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
+MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_LABEL = @PACKAGE_VERSION_LABEL@
+PATH = @PATH@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RUNTIME = @RUNTIME@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_XML = @SQLITE_XML@
+STRIP = @STRIP@
+UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
+UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
+UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
+UPDATE_MIME_DB = @UPDATE_MIME_DB@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gtksharp_prefix = @gtksharp_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ALL_CSPROJ = $(wildcard *.csproj)
+MAIN_SLN = $(top_builddir)/Main.sln
+ at ENABLE_GNOMEPLATFORM_TRUE@PROFILE_NAME = Debug
+ at ENABLE_MACPLATFORM_TRUE@PROFILE_NAME = DebugMac
+ at ENABLE_WINDOWSPLATFORM_TRUE@PROFILE_NAME = DebugWin32
+XBUILD = xbuild
+XBUILD_VERBOSITY = quiet
+XBUILD_ARGS = /verbosity:$(XBUILD_VERBOSITY) /nologo /property:CodePage=65001
+XBUILD_PROFILE = /property:Configuration=$(PROFILE_NAME)
+
+# Figure out how far we are from top_builddir
+DEPTH = $(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..')
+EXTS := *.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt
+ALL_FILES := $(EXTS) \
+ $(addprefix */,$(EXTS)) \
+ $(addprefix */*/,$(EXTS)) \
+ $(addprefix */*/*/,$(EXTS)) \
+ $(addprefix */*/*/*/,$(EXTS)) \
+ $(addprefix */*/*/*/*/,$(EXTS)) \
+ $(wildcard icons/*) \
+ $(wildcard templates/*)
+
+WILDCARDED_FILES := $(wildcard $(ALL_FILES))
+EXTRA_DIST = \
+ $(wildcard $(ALL_FILES))
+
+ at ENABLE_GIT_FALSE@SKIP = y
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/xbuild.include $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/xbuild.include:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+all: csproj_build
+
+clean: csproj_clean
+
+csproj_build:
+ @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
+ echo Building $(ALL_CSPROJ); \
+ for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \
+ fi
+
+csproj_clean:
+ @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
+ echo Cleaning $(ALL_CSPROJ); \
+ for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \
+ fi
+
+sln_build:
+ @echo Building $(MAIN_SLN)
+ $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE)
+
+sln_clean:
+ @echo Cleaning $(MAIN_SLN)
+ $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE) /t:Clean
+
+print_extradist:
+ @echo $(WILDCARDED_FILES)
+
+.PHONY: all clean csproj_build csproj_clean sln_build sln_clean
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj
new file mode 100644
index 0000000..119b69a
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F3AC14B0-3D1F-4B9B-95E8-384056060F33}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>MonoDevelop.VersionControl.Git.Tests</RootNamespace>
+ <AssemblyName>MonoDevelop.VersionControl.Git.Tests</AssemblyName>
+ <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework">
+ <Private>False</Private>
+ <HintPath>..\..\NUnit\lib\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="BaseGitRepositoryTests.cs" />
+ <Compile Include="BaseRepositoryTests.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
+ <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
+ <Name>MonoDevelop.Core</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.VersionControl.Git\MonoDevelop.VersionControl.Git.csproj">
+ <Project>{0413DB7D-8B35-423F-9752-D75C9225E7DE}</Project>
+ <Name>MonoDevelop.VersionControl.Git</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.VersionControl\MonoDevelop.VersionControl.csproj">
+ <Project>{19DE0F35-D204-4FD8-A553-A19ECE05E24D}</Project>
+ <Name>MonoDevelop.VersionControl</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\ngit\NGit\NGit.csproj">
+ <Project>{E3BFF8B4-189C-496A-A817-7E8B31E22B91}</Project>
+ <Name>NGit</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\ngit\NSch\NSch.csproj">
+ <Project>{A19E6F3F-A25B-4B01-8922-CF0CC35C781D}</Project>
+ <Name>NSch</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\ngit\Sharpen\Sharpen.csproj">
+ <Project>{72944A6C-45FF-4EF8-B349-8C9CABF519D4}</Project>
+ <Name>Sharpen</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\ngit\Sharpen.Unix\Sharpen.Unix.csproj">
+ <Project>{849AE05D-0058-4A8C-A0E8-77DC6BB12E52}</Project>
+ <Name>Sharpen.Unix</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/obj/Debug/MonoDevelop.VersionControl.Git.Tests.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/obj/Debug/MonoDevelop.VersionControl.Git.Tests.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..16bb01e
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/obj/Debug/MonoDevelop.VersionControl.Git.Tests.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.VersionControl.Git.Tests.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.VersionControl.Git.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/obj/Debug/MonoDevelop.VersionControl.Git.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/obj/Debug/MonoDevelop.VersionControl.Git.Tests.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile.in
index ffff284..e0f1e4b 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile.in
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.addin.xml
index 5dcfc76..7023909 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.addin.xml
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.addin.xml
@@ -6,7 +6,7 @@
url = "http://www.monodevelop.com/"
description = "Git support for the Version Control Add-in"
category = "Version Control"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="MonoDevelop.VersionControl.Git.dll"/>
@@ -14,9 +14,9 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="VersionControl" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
</Dependencies>
<Extension path="/MonoDevelop/VersionControl/VersionControlSystems">
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
index 72e3fca..b6a498e 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
@@ -77,6 +77,8 @@
<Compile Include="MonoDevelop.VersionControl.Git\GitCommitDialogExtension.cs" />
<Compile Include="MonoDevelop.VersionControl.Git\GitSupportFeature.cs" />
<Compile Include="MonoDevelop.VersionControl.Git\FilteredStatus.cs" />
+ <Compile Include="MonoDevelop.VersionControl.Git\UserGitConfigDialog.cs" />
+ <Compile Include="gtk-gui\MonoDevelop.VersionControl.Git.UserGitConfigDialog.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\core\Mono.Texteditor\Mono.TextEditor.csproj">
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/EditBranchDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/EditBranchDialog.cs
index eda9d06..c23ffda 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/EditBranchDialog.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/EditBranchDialog.cs
@@ -107,10 +107,26 @@ namespace MonoDevelop.VersionControl.Git
labelError.Markup = "<span color='red'>" + GettextCatalog.GetString ("A branch with this name already exists") + "</span>";
labelError.Show ();
buttonOk.Sensitive = false;
+ } else if (!IsValidBranchName (entryName.Text)) {
+ labelError.Markup = "<span color='red'>" + GettextCatalog.GetString (@"A branch name can not:
+Start with '.' or end with '/' or '.lock'
+Contain a ' ', '..', '~', '^', ':', '\', '?', '['") + "</span>";
+ labelError.Show ();
+ buttonOk.Sensitive = false;
} else
labelError.Hide ();
}
-
+
+ static bool IsValidBranchName (string name)
+ {
+ // List from: https://github.com/git/git/blob/master/refs.c#L21
+ if (name.StartsWith (".") || name.EndsWith ("/") || name.EndsWith (".lock"))
+ return false;
+ if (name.Contains (" ") || name.Contains ("~") || name.Contains ("..") || name.Contains ("^") || name.Contains (":") || name.Contains ("\\") || name.Contains ("?") || name.Contains ("["))
+ return false;
+ return true;
+ }
+
protected virtual void OnCheckTrackToggled (object sender, System.EventArgs e)
{
UpdateStatus ();
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/FilteredStatus.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/FilteredStatus.cs
index 7099028..b01cca0 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/FilteredStatus.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/FilteredStatus.cs
@@ -37,6 +37,7 @@ namespace MonoDevelop.VersionControl.Git
class FilteredStatus : NGit.Api.StatusCommand
{
WorkingTreeIterator iter;
+ IndexDiff diff;
IEnumerable<string> Files {
get; set;
@@ -73,7 +74,13 @@ namespace MonoDevelop.VersionControl.Git
}
diff.Diff ();
- return new NGit.Api.Status(diff);
+ this.diff = diff;
+ return new NGit.Api.Status (diff);
+ }
+
+ public virtual ICollection<string> GetIgnoredNotInIndex()
+ {
+ return diff.GetIgnoredNotInIndex ();
}
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs
index 587647e..91d4b64 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCommitDialogExtension.cs
@@ -75,20 +75,32 @@ namespace MonoDevelop.VersionControl.Git
}
if (sol == null)
return true;
+
+ string user;
+ string email;
+ repo.GetUserInfo (out user, out email);
string val = sol.UserProperties.GetValue<string> ("GitUserInfo");
if (val == "UsingMD") {
// If the solution is configured to use the MD configuration, make sure the Git config is up to date.
- string user;
- string email;
- repo.GetUserInfo (out user, out email);
if (user != sol.AuthorInformation.Name || email != sol.AuthorInformation.Email)
repo.SetUserInfo (sol.AuthorInformation.Name, sol.AuthorInformation.Email);
}
else if (val != "UsingGIT") {
- string user;
- string email;
- repo.GetUserInfo (out user, out email);
+ if (repo.IsUserInfoDefault ()) {
+ var dlg = new UserGitConfigDialog ();
+ try {
+ if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
+ user = dlg.UserText;
+ email = dlg.EmailText;
+ repo.SetUserInfo (dlg.UserText, dlg.EmailText);
+ } else
+ return false;
+ } finally {
+ dlg.Destroy ();
+ }
+ }
+
if (user != sol.AuthorInformation.Name || email != sol.AuthorInformation.Email) {
// There is a conflict. Ask the user what to do
string gitInfo = GetDesc (user, email);
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
index 5f90782..bddc2b9 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
@@ -112,10 +112,6 @@ namespace MonoDevelop.VersionControl.Git
}
}
- public FilePath RootPath {
- get; private set;
- }
-
public override void CopyConfigurationFrom (Repository other)
{
base.CopyConfigurationFrom (other);
@@ -315,7 +311,7 @@ namespace MonoDevelop.VersionControl.Git
GetDirectoryVersionInfoCore (repository, rev, files.ToArray (), existingFiles, nonVersionedMissingFiles, versions);
- // Existing files for which git did not report an status are supposed to be tracked
+ // Existing files for which git did not report a status are supposed to be tracked
foreach (FilePath file in existingFiles.Where (f => files.Contains (f))) {
VersionInfo vi = new VersionInfo (file, "", false, VersionStatus.Versioned, rev, VersionStatus.Versioned, null);
versions.Add (vi);
@@ -332,8 +328,8 @@ namespace MonoDevelop.VersionControl.Git
void GetDirectoryVersionInfoCore (NGit.Repository repository, GitRevision rev, FilePath [] localPaths, HashSet<FilePath> existingFiles, HashSet<FilePath> nonVersionedMissingFiles, List<VersionInfo> versions)
{
-
- var status = new FilteredStatus (repository, repository.ToGitPath (localPaths)).Call ();
+ var filteredStatus = new FilteredStatus (repository, repository.ToGitPath (localPaths));
+ var status = filteredStatus.Call ();
HashSet<string> added = new HashSet<string> ();
Action<IEnumerable<string>, VersionStatus> AddFiles = delegate(IEnumerable<string> files, VersionStatus fstatus) {
foreach (string file in files) {
@@ -342,7 +338,7 @@ namespace MonoDevelop.VersionControl.Git
FilePath statFile = repository.FromGitPath (file);
existingFiles.Remove (statFile.CanonicalPath);
nonVersionedMissingFiles.Remove (statFile.CanonicalPath);
- versions.Add (new VersionInfo (statFile, "", false, fstatus, rev, VersionStatus.Versioned, null));
+ versions.Add (new VersionInfo (statFile, "", false, fstatus, rev, fstatus == VersionStatus.Ignored ? VersionStatus.Unversioned : VersionStatus.Versioned, null));
}
};
@@ -353,6 +349,7 @@ namespace MonoDevelop.VersionControl.Git
AddFiles (status.GetMissing (), VersionStatus.Versioned | VersionStatus.ScheduledDelete);
AddFiles (status.GetConflicting (), VersionStatus.Versioned | VersionStatus.Conflicted);
AddFiles (status.GetUntracked (), VersionStatus.Unversioned);
+ AddFiles (filteredStatus.GetIgnoredNotInIndex (), VersionStatus.Ignored);
}
protected override VersionControlOperation GetSupportedOperations (VersionInfo vinfo)
@@ -424,18 +421,9 @@ namespace MonoDevelop.VersionControl.Git
IEnumerable<DiffEntry> statusList = null;
monitor.BeginTask (GettextCatalog.GetString ("Updating"), 5);
-
+
// Fetch remote commits
- string remote = GetCurrentRemote ();
- if (remote == null)
- throw new InvalidOperationException ("No remotes defined");
- monitor.Log.WriteLine (GettextCatalog.GetString ("Fetching from '{0}'", remote));
- RemoteConfig remoteConfig = new RemoteConfig (RootRepository.GetConfig (), remote);
- Transport tn = Transport.Open (RootRepository, remoteConfig);
- using (var gm = new GitMonitor (monitor))
- tn.Fetch (gm, null);
- monitor.Step (1);
-
+ Fetch (monitor);
string upstreamRef = GitUtil.GetUpstreamSource (RootRepository, GetCurrentBranch ());
if (upstreamRef == null)
upstreamRef = GetCurrentRemote () + "/" + GetCurrentBranch ();
@@ -454,6 +442,20 @@ namespace MonoDevelop.VersionControl.Git
monitor.EndTask ();
}
+ public void Fetch (IProgressMonitor monitor)
+ {
+ string remote = GetCurrentRemote ();
+ if (remote == null)
+ throw new InvalidOperationException ("No remotes defined");
+
+ monitor.Log.WriteLine (GettextCatalog.GetString ("Fetching from '{0}'", remote));
+ RemoteConfig remoteConfig = new RemoteConfig (RootRepository.GetConfig (), remote);
+ Transport tn = Transport.Open (RootRepository, remoteConfig);
+ using (var gm = new GitMonitor (monitor))
+ tn.Fetch (gm, null);
+ monitor.Step (1);
+ }
+
public void Rebase (string upstreamRef, bool saveLocalChanges, IProgressMonitor monitor)
{
StashCollection stashes = GitUtil.GetStashes (RootRepository);
@@ -468,12 +470,11 @@ namespace MonoDevelop.VersionControl.Git
stash = stashes.Create (gm, GetStashName ("_tmp_"));
monitor.Step (1);
}
-
+
NGit.Api.Git git = new NGit.Api.Git (RootRepository);
RebaseCommand rebase = git.Rebase ();
rebase.SetOperation (RebaseCommand.Operation.BEGIN);
rebase.SetUpstream (upstreamRef);
-
var gmonitor = new GitMonitor (monitor);
rebase.SetProgressMonitor (gmonitor);
@@ -641,7 +642,7 @@ namespace MonoDevelop.VersionControl.Git
NGit.Api.Git git = new NGit.Api.Git (RootRepository);
NGit.Api.CommitCommand commit = git.Commit ();
commit.SetMessage (message);
-
+
if (changeSet.ExtendedProperties.Contains ("Git.AuthorName")) {
commit.SetAuthor ((string)changeSet.ExtendedProperties ["Git.AuthorName"], (string)changeSet.ExtendedProperties ["Git.AuthorEmail"]);
}
@@ -676,6 +677,12 @@ namespace MonoDevelop.VersionControl.Git
iter.Next (1);
}
}
+
+ public bool IsUserInfoDefault ()
+ {
+ UserConfig config = RootRepository.GetConfig ().Get (UserConfig.KEY);
+ return config.IsCommitterNameImplicit () && config.IsCommitterEmailImplicit ();
+ }
public void GetUserInfo (out string name, out string email)
{
@@ -699,6 +706,7 @@ namespace MonoDevelop.VersionControl.Git
cmd.SetRemote ("origin");
cmd.SetBranch ("refs/heads/master");
cmd.SetDirectory ((string)targetLocalPath);
+ cmd.SetCloneSubmodules (true);
using (var gm = new GitMonitor (monitor, 4)) {
cmd.SetProgressMonitor (gm);
cmd.Call ();
@@ -796,7 +804,7 @@ namespace MonoDevelop.VersionControl.Git
monitor.BeginTask (null, files.Length);
foreach (FilePath p in changedFiles) {
- FileService.NotifyFileChanged (p);
+ FileService.NotifyFileChanged (p, true);
monitor.Step (1);
}
foreach (FilePath p in removedFiles) {
@@ -835,7 +843,16 @@ namespace MonoDevelop.VersionControl.Git
protected override void OnRevertToRevision (FilePath localPath, Revision revision, IProgressMonitor monitor)
{
- throw new System.NotImplementedException ();
+ NGit.Repository repo = GetRepository (localPath);
+ NGit.Api.Git git = new NGit.Api.Git (repo);
+ GitRevision gitRev = (GitRevision)revision;
+
+ // Rewrite file data from selected revision.
+ foreach (var path in GetFilesInPaths (new FilePath[] { localPath })) {
+ MonoDevelop.Projects.Text.TextFile.WriteFile (path, GetCommitTextContent (gitRev.Commit, path), null);
+ }
+
+ monitor.ReportSuccess (GettextCatalog.GetString ("Successfully reverted {0} to revision {1}", localPath, gitRev));
}
@@ -852,37 +869,96 @@ namespace MonoDevelop.VersionControl.Git
cmd.Call ();
}
}
-
- protected override void OnDeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor)
+
+ protected override void OnDeleteFiles (FilePath[] path, bool force, IProgressMonitor monitor)
{
- DeleteCore (localPaths, force, monitor);
- // Untracked files are not deleted by the rm command, so delete them now
- foreach (var f in localPaths)
- if (File.Exists (f))
- File.Delete (f);
}
-
- protected override void OnDeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor)
+
+ protected override void OnDeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
{
- DeleteCore (localPaths, force, monitor);
+ DeleteCore (localPaths, force, monitor, keepLocal);
- // Untracked files are not deleted by the rm command, so delete them now
- foreach (var f in localPaths)
- if (Directory.Exists (f))
- Directory.Delete (f, true);
+ foreach (var path in localPaths) {
+ if (keepLocal) {
+ // Undo addition of files.
+ VersionInfo info = GetVersionInfo (path, VersionInfoQueryFlags.IgnoreCache);
+ if (info != null && info.HasLocalChange (VersionStatus.ScheduledAdd)) {
+ // Revert addition.
+ Revert (path, false, monitor);
+ }
+ } else {
+ // Untracked files are not deleted by the rm command, so delete them now
+ if (File.Exists (path))
+ File.Delete (path);
+ }
+ }
+ }
+
+ protected override void OnDeleteDirectories (FilePath[] path, bool force, IProgressMonitor monitor)
+ {
+ }
+
+ protected override void OnDeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
+ DeleteCore (localPaths, force, monitor, keepLocal);
+
+ foreach (var path in localPaths) {
+ if (keepLocal) {
+ // Undo addition of directories and files.
+ foreach (var info in GetDirectoryVersionInfo (path, false, true)) {
+ if (info != null && info.HasLocalChange (VersionStatus.ScheduledAdd)) {
+ // Revert addition.
+ Revert (path, false, monitor);
+ }
+ }
+ } else {
+ // Untracked files are not deleted by the rm command, so delete them now
+ foreach (var f in localPaths)
+ if (Directory.Exists (f))
+ Directory.Delete (f, true);
+ }
+ }
}
- void DeleteCore (FilePath[] localPaths, bool force, IProgressMonitor monitor)
+ void DeleteCore (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
{
foreach (var group in localPaths.GroupBy (p => GetRepository (p))) {
+ List<FilePath> backupFiles = new List<FilePath> ();
var repository = group.Key;
var files = group;
var git = new NGit.Api.Git (repository);
RmCommand rm = git.Rm ();
- foreach (var f in files)
+ foreach (var f in files) {
+ // Create backups.
+ if (keepLocal) {
+ string newPath = "";
+ if (f.IsDirectory) {
+ newPath = FileService.CreateTempDirectory ();
+ FileService.CopyDirectory (f, newPath);
+ } else {
+ newPath = Path.GetTempFileName ();
+ File.Copy (f, newPath, true);
+ }
+ backupFiles.Add (newPath);
+ }
+
rm.AddFilepattern (repository.ToGitPath (f));
- rm.Call ();
+ }
+
+ try {
+ rm.Call ();
+ } finally {
+ // Restore backups.
+ if (keepLocal) {
+ foreach (var backup in backupFiles) {
+ if (backup.IsDirectory)
+ FileService.MoveDirectory (backup, files.ElementAt (backupFiles.IndexOf (backup)));
+ else
+ File.Move (backup, files.ElementAt (backupFiles.IndexOf (backup)));
+ }
+ }
+ }
}
}
@@ -1260,8 +1336,8 @@ namespace MonoDevelop.VersionControl.Git
var modified = changes.Where (c => c.GetChangeType () != DiffEntry.ChangeType.ADD).Select (c => GetRepository (c.GetNewPath ()).FromGitPath (c.GetNewPath ())).ToList ();
monitor.BeginTask (GettextCatalog.GetString ("Updating solution"), removed.Count + modified.Count);
-
- FileService.NotifyFilesChanged (modified);
+
+ FileService.NotifyFilesChanged (modified, true);
monitor.Step (modified.Count);
FileService.NotifyFilesRemoved (removed);
@@ -1411,6 +1487,40 @@ namespace MonoDevelop.VersionControl.Git
return null;
return new GitRevision (this, revision.GitRepository, id.Name);
}
+
+ protected override void OnIgnore (FilePath[] paths)
+ {
+ List<FilePath> ignored = new List<FilePath> ();
+ string txt;
+ using (StreamReader br = new StreamReader (RootPath + Path.DirectorySeparatorChar + ".gitignore")) {
+ while ((txt = br.ReadLine ()) != null) {
+ ignored.Add (txt);
+ }
+ }
+
+ StringBuilder sb = new StringBuilder ();
+ foreach (var path in paths.Except (ignored))
+ sb.AppendLine (RootRepository.ToGitPath (path));
+
+ File.AppendAllText (RootPath + Path.DirectorySeparatorChar + ".gitignore", sb.ToString ());
+ }
+
+ protected override void OnUnignore (FilePath[] paths)
+ {
+ List<string> ignored = new List<string> ();
+ string txt;
+ using (StreamReader br = new StreamReader (RootPath + Path.DirectorySeparatorChar + ".gitignore")) {
+ while ((txt = br.ReadLine ()) != null) {
+ ignored.Add (txt);
+ }
+ }
+
+ StringBuilder sb = new StringBuilder ();
+ foreach (var path in ignored.Except (RootRepository.ToGitPath (paths)))
+ sb.AppendLine (path);
+
+ File.WriteAllText (RootPath + Path.DirectorySeparatorChar + ".gitignore", sb.ToString ());
+ }
}
public class GitRevision: Revision
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs
index 50d92b1..3b8ac11 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs
@@ -91,8 +91,18 @@ namespace MonoDevelop.VersionControl.Git
try {
if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
dlg.Hide ();
- using (IProgressMonitor monitor = VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Merging branch '{0}'...", dlg.SelectedBranch))) {
- repo.Merge (dlg.SelectedBranch, dlg.StageChanges, monitor);
+ if (rebasing) {
+ using (IProgressMonitor monitor = VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Rebasing branch '{0}'...", dlg.SelectedBranch))) {
+ if (dlg.IsRemote)
+ repo.Fetch (monitor);
+ repo.Rebase (dlg.SelectedBranch, dlg.StageChanges, monitor);
+ }
+ } else {
+ using (IProgressMonitor monitor = VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Merging branch '{0}'...", dlg.SelectedBranch))) {
+ if (dlg.IsRemote)
+ repo.Fetch (monitor);
+ repo.Merge (dlg.SelectedBranch, dlg.StageChanges, monitor);
+ }
}
}
} finally {
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/MergeDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/MergeDialog.cs
index 3b3d5ae..7051f5a 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/MergeDialog.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/MergeDialog.cs
@@ -63,6 +63,7 @@ namespace MonoDevelop.VersionControl.Git
if (rebasing) {
labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
+ buttonOk.Label = GettextCatalog.GetString ("Rebase");
}
checkStage.Active = true;
@@ -78,6 +79,10 @@ namespace MonoDevelop.VersionControl.Git
get { return checkStage.Active; }
}
+ public bool IsRemote {
+ get { return currentType == "remote"; }
+ }
+
void HandleTreeSelectionChanged (object sender, EventArgs e)
{
TreeIter it;
@@ -116,7 +121,7 @@ namespace MonoDevelop.VersionControl.Git
if (rebasing) {
switch (currentType) {
case "branch": txt = GettextCatalog.GetString ("The branch <b>{1}</b> will be rebased to the branch <b>{0}</b>.", currentSel, cb); break;
- case "tag": txt = GettextCatalog.GetString ("The branch <b>{1}</b> witl be rebased to the tag <b>{0}</b>.", currentSel, cb); break;
+ case "tag": txt = GettextCatalog.GetString ("The branch <b>{1}</b> will be rebased to the tag <b>{0}</b>.", currentSel, cb); break;
case "remote": txt = GettextCatalog.GetString ("The branch <b>{1}</b> will be rebased to the remote branch <b>{0}</b>.", currentSel, cb); break;
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/UserGitConfigDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/UserGitConfigDialog.cs
new file mode 100644
index 0000000..e68dba1
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/UserGitConfigDialog.cs
@@ -0,0 +1,55 @@
+//
+// UserGitConfigDialog.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace MonoDevelop.VersionControl.Git
+{
+ public partial class UserGitConfigDialog : Gtk.Dialog
+ {
+ public UserGitConfigDialog ()
+ {
+ this.Build ();
+ SetResponseSensitive (Gtk.ResponseType.Ok, false);
+ }
+
+ protected void OnChanged (object sender, EventArgs e)
+ {
+ bool allowedOk = !String.IsNullOrWhiteSpace (usernameEntry.Text) &&
+ !String.IsNullOrWhiteSpace (emailEntry.Text);
+
+ SetResponseSensitive (Gtk.ResponseType.Ok, allowedOk);
+ }
+
+ public string UserText {
+ get { return usernameEntry.Text; }
+ }
+
+ public string EmailText {
+ get { return emailEntry.Text; }
+ }
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/MonoDevelop.VersionControl.Git.UserGitConfigDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/MonoDevelop.VersionControl.Git.UserGitConfigDialog.cs
new file mode 100644
index 0000000..b19a5b1
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/MonoDevelop.VersionControl.Git.UserGitConfigDialog.cs
@@ -0,0 +1,171 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.VersionControl.Git
+{
+ public partial class UserGitConfigDialog
+ {
+ private global::Gtk.VBox vbox2;
+ private global::Gtk.VBox vbox5;
+ private global::Gtk.Label label1;
+ private global::Gtk.Entry usernameEntry;
+ private global::Gtk.VBox vbox6;
+ private global::Gtk.Label label2;
+ private global::Gtk.Entry emailEntry;
+ private global::Gtk.VBox vbox4;
+ private global::Gtk.RadioButton globalConfigRadio;
+ private global::Gtk.RadioButton repoConfigRadio;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.VersionControl.Git.UserGitConfigDialog
+ this.Name = "MonoDevelop.VersionControl.Git.UserGitConfigDialog";
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child MonoDevelop.VersionControl.Git.UserGitConfigDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.vbox2 = new global::Gtk.VBox ();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.label1 = new global::Gtk.Label ();
+ this.label1.Name = "label1";
+ this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Username");
+ this.vbox5.Add (this.label1);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label1]));
+ w2.Position = 0;
+ w2.Expand = false;
+ w2.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.usernameEntry = new global::Gtk.Entry ();
+ this.usernameEntry.CanFocus = true;
+ this.usernameEntry.Name = "usernameEntry";
+ this.usernameEntry.IsEditable = true;
+ this.usernameEntry.InvisibleChar = '●';
+ this.vbox5.Add (this.usernameEntry);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.usernameEntry]));
+ w3.Position = 1;
+ w3.Expand = false;
+ w3.Fill = false;
+ this.vbox2.Add (this.vbox5);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox5]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.vbox6 = new global::Gtk.VBox ();
+ this.vbox6.Name = "vbox6";
+ this.vbox6.Spacing = 6;
+ // Container child vbox6.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Email");
+ this.vbox6.Add (this.label2);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox6 [this.label2]));
+ w5.Position = 0;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child vbox6.Gtk.Box+BoxChild
+ this.emailEntry = new global::Gtk.Entry ();
+ this.emailEntry.CanFocus = true;
+ this.emailEntry.Name = "emailEntry";
+ this.emailEntry.IsEditable = true;
+ this.emailEntry.InvisibleChar = '●';
+ this.vbox6.Add (this.emailEntry);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox6 [this.emailEntry]));
+ w6.Position = 1;
+ w6.Expand = false;
+ w6.Fill = false;
+ this.vbox2.Add (this.vbox6);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox6]));
+ w7.Position = 1;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.vbox4 = new global::Gtk.VBox ();
+ this.vbox4.Name = "vbox4";
+ this.vbox4.Spacing = 6;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.globalConfigRadio = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("Global Config (Recommended)"));
+ this.globalConfigRadio.CanFocus = true;
+ this.globalConfigRadio.Name = "globalConfigRadio";
+ this.globalConfigRadio.DrawIndicator = true;
+ this.globalConfigRadio.UseUnderline = true;
+ this.globalConfigRadio.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.vbox4.Add (this.globalConfigRadio);
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.globalConfigRadio]));
+ w8.Position = 0;
+ w8.Expand = false;
+ w8.Fill = false;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.repoConfigRadio = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("Repository Config"));
+ this.repoConfigRadio.CanFocus = true;
+ this.repoConfigRadio.Name = "repoConfigRadio";
+ this.repoConfigRadio.DrawIndicator = true;
+ this.repoConfigRadio.UseUnderline = true;
+ this.repoConfigRadio.Group = this.globalConfigRadio.Group;
+ this.vbox4.Add (this.repoConfigRadio);
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.repoConfigRadio]));
+ w9.Position = 1;
+ w9.Expand = false;
+ w9.Fill = false;
+ this.vbox2.Add (this.vbox4);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox4]));
+ w10.Position = 2;
+ w10.Expand = false;
+ w10.Fill = false;
+ w1.Add (this.vbox2);
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+ w11.Position = 0;
+ w11.Expand = false;
+ w11.Fill = false;
+ // Internal child MonoDevelop.VersionControl.Git.UserGitConfigDialog.ActionArea
+ global::Gtk.HButtonBox w12 = this.ActionArea;
+ w12.Name = "dialog1_ActionArea";
+ w12.Spacing = 10;
+ w12.BorderWidth = ((uint)(5));
+ w12.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w13 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonCancel]));
+ w13.Expand = false;
+ w13.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseStock = true;
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = "gtk-ok";
+ this.AddActionWidget (this.buttonOk, -5);
+ global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonOk]));
+ w14.Position = 1;
+ w14.Expand = false;
+ w14.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 400;
+ this.DefaultHeight = 240;
+ this.Show ();
+ this.usernameEntry.Changed += new global::System.EventHandler (this.OnChanged);
+ this.emailEntry.Changed += new global::System.EventHandler (this.OnChanged);
+ }
+ }
+}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/generated.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/generated.cs
index 8d3a3ae..ee800ab 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/generated.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/generated.cs
@@ -5,7 +5,7 @@ namespace Stetic
internal class Gui
{
private static bool initialized;
-
+
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
@@ -13,12 +13,12 @@ namespace Stetic
}
}
}
-
+
internal class BinContainer
{
private Gtk.Widget child;
private Gtk.UIManager uimanager;
-
+
public static BinContainer Attach (Gtk.Bin bin)
{
BinContainer bc = new BinContainer ();
@@ -27,52 +27,53 @@ namespace Stetic
bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc;
}
-
+
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{
if ((this.child != null)) {
args.Requisition = this.child.SizeRequest ();
}
}
-
+
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{
if ((this.child != null)) {
this.child.Allocation = args.Allocation;
}
}
-
+
private void OnAdded (object sender, Gtk.AddedArgs args)
{
this.child = args.Widget;
}
-
+
public void SetUiManager (Gtk.UIManager uim)
{
this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized);
}
-
+
private void OnRealized (object sender, System.EventArgs args)
{
if ((this.uimanager != null)) {
Gtk.Widget w;
w = this.child.Toplevel;
- if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) {
+ if (((w != null)
+ && typeof(Gtk.Window).IsInstanceOfType (w))) {
((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
this.uimanager = null;
}
}
}
}
-
+
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
-
+
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/gui.stetic b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/gui.stetic
index b4014df..723f836 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/gui.stetic
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/gtk-gui/gui.stetic
@@ -5,9 +5,9 @@
<target-gtk-version>2.12</target-gtk-version>
</configuration>
<import>
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
<widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
<widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.dll" />
- <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
<widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll" internal="true" />
</import>
<widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.PushDialog" design-size="730 540">
@@ -1880,4 +1880,148 @@
</widget>
</child>
</widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.UserGitConfigDialog" design-size="400 184">
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Username</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="usernameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Email</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="emailEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.MonoDevelop.VersionControl.Git.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.MonoDevelop.VersionControl.Git.addin.xml
new file mode 100644
index 0000000..7023909
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.MonoDevelop.VersionControl.Git.addin.xml
@@ -0,0 +1,109 @@
+<Addin id = "VersionControl.Git"
+ namespace = "MonoDevelop"
+ name = "Git support"
+ author = "Dale Ragan, Lluis Sanchez"
+ copyright = "LGPL"
+ url = "http://www.monodevelop.com/"
+ description = "Git support for the Version Control Add-in"
+ category = "Version Control"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.VersionControl.Git.dll"/>
+ <Import assembly="NGit.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path="/MonoDevelop/VersionControl/VersionControlSystems">
+ <Class class="MonoDevelop.VersionControl.Git.GitClient"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/VersionControl">
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.Push"
+ _label = "Push Changes..."
+ defaultHandler = "MonoDevelop.VersionControl.Git.PushCommandHandler"
+ description = "Push changes to a remote repository."/>
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.SwitchToBranch"
+ _label = "Switch to Branch"
+ type="radio|array"
+ defaultHandler = "MonoDevelop.VersionControl.Git.SwitchToBranchHandler"
+ description = "Switch to branch."/>
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.ManageBranches"
+ _label = "Manage Branches and Remotes"
+ defaultHandler = "MonoDevelop.VersionControl.Git.ManageBranchesHandler" />
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.Merge"
+ _label = "Merge Branch..."
+ defaultHandler = "MonoDevelop.VersionControl.Git.MergeBranchHandler" />
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.Rebase"
+ _label = "Rebase to Branch..."
+ defaultHandler = "MonoDevelop.VersionControl.Git.RebaseBranchHandler" />
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.Stash"
+ _label = "Stash..."
+ description = "Stash the changes in a dirty working directory away."
+ defaultHandler = "MonoDevelop.VersionControl.Git.StashHandler" />
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.StashPop"
+ _label = "Pop stash"
+ description = "Remove a single stashed state from the stash list and apply it on top of the current working tree state."
+ defaultHandler = "MonoDevelop.VersionControl.Git.StashPopHandler" />
+ <Command id = "MonoDevelop.VersionControl.Git.Commands.ManageStashes"
+ _label = "Manage stashes"
+ defaultHandler = "MonoDevelop.VersionControl.Git.ManageStashesHandler" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/VersionControl">
+ <SeparatorItem insertafter="MonoDevelop.VersionControl.Commands.CommitSolution"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Push" />
+ <ItemSet id = "SwitchToBranch" _label = "Switch to Branch" autohide="true">
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.SwitchToBranch"/>
+ </ItemSet>
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Merge"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Rebase"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.ManageBranches"/>
+ <SeparatorItem />
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Stash"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.StashPop"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.ManageStashes"/>
+ <SeparatorItem />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+ <ItemSet id = "SwitchToBranch" _label = "Switch to Branch" autohide="true" insertafter = "VersionControl">
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.SwitchToBranch"/>
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/VersionControl">
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Push" insertbefore="MonoDevelop.VersionControl.Commands.Publish"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Git.Commands.Merge"/>
+ <SeparatorItem />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "VersionControlNodeExtension" class = "MonoDevelop.VersionControl.Git.GitNodeBuilderExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/VersionControl/CommitDialogExtensions">
+ <Class class="MonoDevelop.VersionControl.Git.GitCommitDialogExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/VersionControl">
+ <Section id = "Git" _label = "Git" class = "MonoDevelop.VersionControl.Git.GitOptionsPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "vc-git-tag" resource = "tag_blue.png"/>
+ <StockIcon stockid = "vc-git-source" resource = "server.png"/>
+ <StockIcon stockid = "vc-git-branch" resource = "arrow_branch.png"/>
+ </Extension>
+
+<!-- <Extension path = "/MonoDevelop/Ide/ProjectFeatures">
+ <Class class = "MonoDevelop.VersionControl.Git.GitSupportFeature" />
+ </Extension>
+-->
+</Addin>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..c4b8e4c
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,9 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.MonoDevelop.VersionControl.Git.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.arrow_branch.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.server.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.tag_blue.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.gtk-gui.gui.stetic b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.gtk-gui.gui.stetic
new file mode 100644
index 0000000..723f836
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.gtk-gui.gui.stetic
@@ -0,0 +1,2027 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.dll" />
+ <widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.Git.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.PushDialog" design-size="730 540">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Push to Repository</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Push to:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="remoteCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnRemoteComboChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Branch:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="branchCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnBranchComboChanged" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.VersionControl.Views.ChangeSetView" id="changeList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Push Changes</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.UserInfoConflictDialog" design-size="529 249">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">User Information Conflict</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="WidthRequest">503</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The user name and email configured for the Git repository does not match the user information configured in MonoDevelop. Which user information do you want to use?</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioMD">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use the MonoDevelop configuration:</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">27</property>
+ <child>
+ <widget class="Gtk.Label" id="labelMD">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">name <email></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">27</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">If you chose this option the Git configuration will be overwritten.</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radiobutton2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use the Git configuration:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">27</property>
+ <child>
+ <widget class="Gtk.Label" id="labelGit">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">name <email></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.ConflictResolutionDialog" design-size="991 534">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Merge Conflict Resolution</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTop">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">A merge conflict has been detected in file <b>SomeFile.txt</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.VersionControl.Views.MergeWidget" id="mergeWidget">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Abort Update</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-6</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Skip Patch</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-7</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button24">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Accept Merge</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.GitConfigurationDialog" design-size="602 410">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Git Repository Configuration</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listBranches">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-new</property>
+ <signal name="Clicked" handler="OnButtonAddBranchClicked" />
+ <property name="label">gtk-new</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEditBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Clicked" handler="OnButtonEditBranchClicked" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-delete</property>
+ <signal name="Clicked" handler="OnButtonRemoveBranchClicked" />
+ <property name="label">gtk-delete</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSetDefaultBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Switch to Branch</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonSetDefaultBranchClicked" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Branches</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeRemotes">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddRemote">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddRemoteClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEditRemote">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Clicked" handler="OnButtonEditRemoteClicked" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveRemote">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveRemoteClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonTrackRemote">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Track in Local Branch</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonTrackRemoteClicked" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Remote Sources</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.EditBranchDialog" design-size="400 200">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Branch Properties</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelError">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Error</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkTrack">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Track a branch or tag:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckTrackToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboSources">
+ <property name="MemberName" />
+ <property name="IsTextCombo">False</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.EditRemoteDialog" design-size="422 206">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Remote Source</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPushUrl">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryPushUrlChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryUrl">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryUrlChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Url:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Push Url:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkImportTags">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Import tags</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.MergeDialog" design-size="469 487">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="labelHeader">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the branch to be merged with the current branch:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelOper">
+ <property name="MemberName" />
+ <property name="WidthRequest">443</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp">The remote branch <b>origin/blablabla</b> will be merged into the branch <b>master</b>.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkStage">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Stash/unstash local changes before/after the merge</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Merge</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.CredentialsDialog" design-size="500 132">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Git Credentials</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">4</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTop">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Credentials required for the repository: {0}</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">4</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonNo">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-no</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonNoClicked" />
+ <property name="label">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonYes">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-yes</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonYesClicked" />
+ <property name="label">gtk-yes</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.Git.GitOptionsPanelWidget" design-size="391 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkStashBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Automatically stash/unstash changes when switching branches</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Behavior of the Update command:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkRebase">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use the Rebase option for merging</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkStashUpdate">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Automatically stash/unstash local changes</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.StashManagerDialog" design-size="575 367">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Stash Manager</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="list">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxButtons">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonApplyRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Apply and Remove</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonApplyRemoveClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonApply">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Apply</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonApplyClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonBranch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Convert to Branch</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDelete">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonDeleteClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.NewStashDialog" design-size="412 114">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Stash</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Comment:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryComment">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.Git.GitCommitDialogExtensionWidget" design-size="319 114">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkPush">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Push changes to remote repository after commit</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkAuthor">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Override the commit author</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckAuthorToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="authorBox">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entry2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMail">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Author e-mail:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelName">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Author name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Git.UserGitConfigDialog" design-size="400 184">
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Username</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="usernameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Email</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="emailEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.arrow_branch.png b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.arrow_branch.png
new file mode 100644
index 0000000..7542db1
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.arrow_branch.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.server.png b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.server.png
new file mode 100644
index 0000000..720a237
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.server.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.tag_blue.png b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.tag_blue.png
new file mode 100644
index 0000000..9757fc6
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl.Git/obj/Debug/MonoDevelop.VersionControl.Git.icons.tag_blue.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/BaseSvnRepositoryTests.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/BaseSvnRepositoryTests.cs
new file mode 100644
index 0000000..55ddf1a
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/BaseSvnRepositoryTests.cs
@@ -0,0 +1,185 @@
+//
+// RepositoryTests.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoDevelop.Core;
+using MonoDevelop.Core.ProgressMonitoring;
+using MonoDevelop.VersionControl;
+using MonoDevelop.VersionControl.Subversion;
+using MonoDevelop.VersionControl.Tests;
+using NUnit.Framework;
+using System.Diagnostics;
+using System.IO;
+
+namespace MonoDevelop.VersionControl.Subversion.Tests
+{
+ [TestFixture]
+ public abstract class BaseSvnUtilsTest : BaseRepoUtilsTest
+ {
+ protected SubversionBackend backend;
+ protected SubversionRepository repo;
+ protected Process svnServe = null;
+
+ [SetUp]
+ public override void Setup ()
+ {
+ Process svnAdmin;
+ ProcessStartInfo info;
+
+ // Generate directories and a svn util.
+ rootCheckout = new FilePath (FileService.CreateTempDirectory () + Path.DirectorySeparatorChar);
+
+ // Create repo in "repo".
+ svnAdmin = new Process ();
+ info = new ProcessStartInfo ();
+ info.FileName = "svnadmin";
+ info.Arguments = "create " + rootUrl + Path.DirectorySeparatorChar + "repo";
+ info.WindowStyle = ProcessWindowStyle.Hidden;
+ svnAdmin.StartInfo = info;
+ svnAdmin.Start ();
+ svnAdmin.WaitForExit ();
+
+ // Create host (Win32)
+ // This needs to be done after doing the svnAdmin creation.
+ // And before checkout.
+ if (svnServe != null) {
+ info = new ProcessStartInfo ();
+ info.FileName = "svnserve";
+ info.Arguments = "-dr " + rootUrl;
+ info.WindowStyle = ProcessWindowStyle.Hidden;
+ svnServe.StartInfo = info;
+ svnServe.Start ();
+
+ // Create user to auth.
+ using (var perm = File. CreateText (rootUrl + Path.DirectorySeparatorChar + "repo" +
+ Path.DirectorySeparatorChar + "conf" + Path.DirectorySeparatorChar + "svnserve.conf")) {
+ perm.WriteLine ("[general]");
+ perm.WriteLine ("anon-access = write");
+ perm.WriteLine ("[sasl]");
+ }
+ }
+
+ // Check out the repository.
+ Checkout (rootCheckout);
+ repo = GetRepo (repoLocation, rootCheckout);
+ }
+
+ [TearDown]
+ public override void TearDown ()
+ {
+ DeleteDirectory (rootUrl);
+ DeleteDirectory (rootCheckout);
+ }
+
+ [Test]
+ public override void CheckoutExists ()
+ {
+ Assert.True (Directory.Exists (rootCheckout + ".svn"));
+ }
+
+ [Test]
+ public override void FileIsAdded ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+
+ foreach (var vi in backend.Status (repo, added, SvnRevision.First))
+ Assert.AreEqual (VersionStatus.ScheduledAdd, (VersionStatus.ScheduledAdd & vi.Status));
+ }
+
+ [Test]
+ public override void FileIsCommitted ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { rootCheckout }, "File committed", new NullProgressMonitor ());
+
+ foreach (var vi in backend.Status (repo, added, SvnRevision.First))
+ Assert.AreEqual (VersionStatus.Versioned, vi.Status);
+ }
+
+ [Test]
+ public override void UpdateIsDone ()
+ {
+ FilePath second = new FilePath (FileService.CreateTempDirectory () + Path.DirectorySeparatorChar);
+ Checkout (second);
+
+ string added = second + "testfile";
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { second }, "Check text", new NullProgressMonitor ());
+
+ backend.Update (rootCheckout, true, new NullProgressMonitor ());
+ Assert.True (File.Exists (rootCheckout + "testfile"));
+ DeleteDirectory (second);
+ }
+
+ [Test]
+ public override void Reverts ()
+ {
+ string added = rootCheckout + "testfile";
+ string content = "text";
+
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { rootCheckout }, "File committed", new NullProgressMonitor ());
+
+ // Revert to head.
+ File.WriteAllText (added, content);
+
+ backend.Revert (new FilePath[] { added }, false, new NullProgressMonitor ());
+ Assert.AreEqual (backend.GetTextBase (added), File.ReadAllText (added));
+
+ // Revert revision.
+ File.AppendAllText (added, content);
+ File.Copy (added, added + "2");
+
+ backend.Commit (new FilePath[] { added }, "File modified", new NullProgressMonitor ());
+ backend.RevertRevision (added, new SvnRevision (repo, 2), new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { added }, "File reverted", new NullProgressMonitor ());
+
+ Assert.AreNotEqual (File.ReadAllText (added + "2"), File.ReadAllText (added));
+ }
+
+ #region Util
+
+ public override void Checkout (string path)
+ {
+ backend.Checkout (repoLocation,
+ path, SvnRevision.Head,
+ true, new NullProgressMonitor ());
+ }
+
+ public virtual SubversionRepository GetRepo (string url, string path)
+ {
+ return null;
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.am b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.am
new file mode 100644
index 0000000..a6dcb0e
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.am
@@ -0,0 +1,5 @@
+include $(top_srcdir)/xbuild.include
+
+if ! ENABLE_SUBVERSION
+SKIP=y
+endif
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.in
new file mode 100644
index 0000000..5b055c7
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile.in
@@ -0,0 +1,429 @@
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/xbuild.include
+subdir = src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_FLAGS = @ACLOCAL_FLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CSC = @CSC@
+CSC_FLAGS = @CSC_FLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DYLD_FALLBACK_LIBRARY_PATH = @DYLD_FALLBACK_LIBRARY_PATH@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
+GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
+GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
+GLIB_SHARP_CFLAGS = @GLIB_SHARP_CFLAGS@
+GLIB_SHARP_LIBS = @GLIB_SHARP_LIBS@
+GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
+GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
+GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
+GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
+GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
+GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_PREFIX = @LIB_PREFIX@
+LIB_SUFFIX = @LIB_SUFFIX@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MCS = @MCS@
+MD_ADDIN_DIR = @MD_ADDIN_DIR@
+MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
+MD_DIR = @MD_DIR@
+MKDIR_P = @MKDIR_P@
+MONO = @MONO@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_LIBS = @MONODOC_LIBS@
+MONO_GAC_PREFIX = @MONO_GAC_PREFIX@
+MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
+MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_LABEL = @PACKAGE_VERSION_LABEL@
+PATH = @PATH@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RUNTIME = @RUNTIME@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_XML = @SQLITE_XML@
+STRIP = @STRIP@
+UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
+UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
+UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
+UPDATE_MIME_DB = @UPDATE_MIME_DB@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gtksharp_prefix = @gtksharp_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ALL_CSPROJ = $(wildcard *.csproj)
+MAIN_SLN = $(top_builddir)/Main.sln
+ at ENABLE_GNOMEPLATFORM_TRUE@PROFILE_NAME = Debug
+ at ENABLE_MACPLATFORM_TRUE@PROFILE_NAME = DebugMac
+ at ENABLE_WINDOWSPLATFORM_TRUE@PROFILE_NAME = DebugWin32
+XBUILD = xbuild
+XBUILD_VERBOSITY = quiet
+XBUILD_ARGS = /verbosity:$(XBUILD_VERBOSITY) /nologo /property:CodePage=65001
+XBUILD_PROFILE = /property:Configuration=$(PROFILE_NAME)
+
+# Figure out how far we are from top_builddir
+DEPTH = $(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..')
+EXTS := *.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt
+ALL_FILES := $(EXTS) \
+ $(addprefix */,$(EXTS)) \
+ $(addprefix */*/,$(EXTS)) \
+ $(addprefix */*/*/,$(EXTS)) \
+ $(addprefix */*/*/*/,$(EXTS)) \
+ $(addprefix */*/*/*/*/,$(EXTS)) \
+ $(wildcard icons/*) \
+ $(wildcard templates/*)
+
+WILDCARDED_FILES := $(wildcard $(ALL_FILES))
+EXTRA_DIST = \
+ $(wildcard $(ALL_FILES))
+
+ at ENABLE_SUBVERSION_FALSE@SKIP = y
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/xbuild.include $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/xbuild.include:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+all: csproj_build
+
+clean: csproj_clean
+
+csproj_build:
+ @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
+ echo Building $(ALL_CSPROJ); \
+ for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \
+ fi
+
+csproj_clean:
+ @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
+ echo Cleaning $(ALL_CSPROJ); \
+ for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \
+ fi
+
+sln_build:
+ @echo Building $(MAIN_SLN)
+ $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE)
+
+sln_clean:
+ @echo Cleaning $(MAIN_SLN)
+ $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE) /t:Clean
+
+print_extradist:
+ @echo $(WILDCARDED_FILES)
+
+.PHONY: all clean csproj_build csproj_clean sln_build sln_clean
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj
new file mode 100644
index 0000000..7018639
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/MonoDevelop.VersionControl.Subversion.Tests.csproj
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{ABB21D58-6EFA-49EA-9555-EDDEC8123DD6}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>MonoDevelop.VersionControl.Subversion.Tests</RootNamespace>
+ <AssemblyName>MonoDevelop.VersionControl.Subversion.Tests</AssemblyName>
+ <TestRunnerCommand>..\..\..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>False</Optimize>
+ <OutputPath>..\..\..\..\build\tests</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework">
+ <Private>False</Private>
+ <HintPath>..\..\NUnit\lib\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="RepositoryTests.cs" />
+ <Compile Include="BaseSvnRepositoryTests.cs" />
+ <Compile Include="..\MonoDevelop.VersionControl.Git.Tests\BaseRepositoryTests.cs">
+ <Link>BaseRepositoryTests.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
+ <Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
+ <Name>MonoDevelop.Core</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.VersionControl.Subversion\MonoDevelop.VersionControl.Subversion.csproj">
+ <Project>{183E084F-2C3B-4A6D-A8CE-6CDF3DC499AC}</Project>
+ <Name>MonoDevelop.VersionControl.Subversion</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.VersionControl\MonoDevelop.VersionControl.csproj">
+ <Project>{19DE0F35-D204-4FD8-A553-A19ECE05E24D}</Project>
+ <Name>MonoDevelop.VersionControl</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoDevelop.VersionControl.Subversion.Unix\MonoDevelop.VersionControl.Subversion.Unix.csproj">
+ <Project>{E2CAB397-D00C-4D11-8F5F-E3A052092969}</Project>
+ <Name>MonoDevelop.VersionControl.Subversion.Unix</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\mono-addins\Mono.Addins\Mono.Addins.csproj">
+ <Project>{91DD5A2D-9FE3-4C3C-9253-876141874DAD}</Project>
+ <Name>Mono.Addins</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/RepositoryTests.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/RepositoryTests.cs
new file mode 100644
index 0000000..3bad2d3
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/RepositoryTests.cs
@@ -0,0 +1,96 @@
+//
+// RepositoryTests.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoDevelop.Core;
+using MonoDevelop.Core.ProgressMonitoring;
+using MonoDevelop.VersionControl;
+using MonoDevelop.VersionControl.Subversion;
+using MonoDevelop.VersionControl.Subversion.Unix;
+using NUnit.Framework;
+using System.IO;
+using System;
+
+namespace VersionControl.Subversion.Unix.Tests
+{
+ [TestFixture]
+ public class UnixSvnUtilsTest : MonoDevelop.VersionControl.Subversion.Tests.BaseSvnUtilsTest
+ {
+ [SetUp]
+ public override void Setup ()
+ {
+ rootUrl = new FilePath (FileService.CreateTempDirectory ());
+ repoLocation = "file://" + rootUrl + "/repo";
+ backend = new UnixSvnBackend ();
+ base.Setup ();
+ }
+
+ [Test]
+ public override void LogIsProper ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { rootCheckout }, "File committed", new NullProgressMonitor ());
+ foreach (var rev in backend.Log (repo, added, SvnRevision.First, SvnRevision.Working)) {
+ Assert.AreEqual ("File committed", rev.Message);
+ foreach (var change in rev.ChangedFiles) {
+ Assert.AreEqual (RevisionAction.Add, change.Action);
+ Assert.AreEqual (repoLocation + "//testfile", change.Path);
+ }
+ }
+ }
+
+ [Test]
+ public override void DiffIsProper ()
+ {
+ string added = rootCheckout + "testfile";
+ File.Create (added).Close ();
+ backend.Add (added, false, new NullProgressMonitor ());
+ backend.Commit (new FilePath[] { rootCheckout }, "File committed", new NullProgressMonitor ());
+ File.AppendAllText (added, "text" + Environment.NewLine);
+
+ string difftext = @"Index: " + added + @"
+===================================================================
+--- " + added + @" (revision 1)
++++ " + added + @" (working copy)
+@@ -0,0 +1 @@
++text
+";
+
+ Assert.AreEqual (difftext, backend.GetUnifiedDiff (added, false, false));
+ }
+
+ #region Util
+
+ public override SubversionRepository GetRepo (string url, string path)
+ {
+ return new SubversionRepository (new SvnClient (), url, path);
+ }
+
+ #endregion
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/obj/Debug/MonoDevelop.VersionControl.Subversion.Tests.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/obj/Debug/MonoDevelop.VersionControl.Subversion.Tests.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..9509d75
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/obj/Debug/MonoDevelop.VersionControl.Subversion.Tests.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.VersionControl.Subversion.Tests.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/MonoDevelop.VersionControl.Subversion.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/obj/Debug/MonoDevelop.VersionControl.Subversion.Tests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Tests/obj/Debug/MonoDevelop.VersionControl.Subversion.Tests.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile.in
index d1b98ea..6f16a93 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile.in
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix.addin.xml
index 73082cb..b40ac76 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix.addin.xml
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix.addin.xml
@@ -6,13 +6,13 @@
url = "http://taubz.for.net/code/diff"
description = "Subversion support for Linux and MacOSX"
category = "Version Control"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="VersionControl" version="4.0.5"/>
- <Addin id="VersionControl.Subversion" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
+ <Addin id="VersionControl.Subversion" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/VersionControl/VersionControlSystems">
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibApr.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibApr.cs
index b99d5f1..4bec0c5 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibApr.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibApr.cs
@@ -43,12 +43,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
return ptr;
}
- public abstract void initialize();
- public abstract IntPtr pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
+ public abstract int initialize();
+ public abstract int pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
public abstract void pool_destroy(IntPtr pool);
public abstract IntPtr hash_first(IntPtr pool, IntPtr hash);
public abstract IntPtr hash_next(IntPtr hashindex);
public abstract void hash_this(IntPtr hashindex, out IntPtr key, out int keylen, out IntPtr val);
+ public abstract IntPtr hash_get(IntPtr ht, IntPtr key, int klen);
public abstract IntPtr array_make(IntPtr pool, int nelts, int elt_size);
public abstract IntPtr array_push(IntPtr arr);
public abstract IntPtr pstrdup(IntPtr pool, string s);
@@ -67,12 +68,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
{
private const string aprlib = "libapr-0.so.0";
- public override void initialize() { apr_initialize (); }
- public override IntPtr pool_create_ex (out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator) { return apr_pool_create_ex(out pool, parent, abort, allocator); }
+ public override int initialize() { return apr_initialize (); }
+ public override int pool_create_ex (out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator) { return apr_pool_create_ex(out pool, parent, abort, allocator); }
public override void pool_destroy(IntPtr pool) { apr_pool_destroy (pool); }
public override IntPtr hash_first(IntPtr pool, IntPtr hash) { return apr_hash_first (pool, hash); }
public override IntPtr hash_next(IntPtr hashindex) { return apr_hash_next(hashindex); }
public override void hash_this(IntPtr hashindex, out IntPtr key, out int keylen, out IntPtr val) { apr_hash_this(hashindex, out key, out keylen, out val); }
+ public override IntPtr hash_get(IntPtr ht, IntPtr key, int klen) { return apr_hash_get (ht, key, klen); }
public override IntPtr array_make(IntPtr pool, int nelts, int elt_size) { return apr_array_make(pool, nelts, elt_size); }
public override IntPtr array_push(IntPtr arr) { return apr_array_push (arr); }
public override IntPtr pstrdup(IntPtr pool, string s) { return apr_pstrdup(pool, s); }
@@ -80,12 +82,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
public override int file_open(ref IntPtr newf, string fname, int flag, int perm, IntPtr pool) { return apr_file_open(ref newf, fname, flag, perm, pool); }
public override int file_close (IntPtr file) { return apr_file_close (file); }
- [DllImport(aprlib)] static extern void apr_initialize();
- [DllImport(aprlib)] static extern IntPtr apr_pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
+ [DllImport(aprlib)] static extern int apr_initialize();
+ [DllImport(aprlib)] static extern int apr_pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
[DllImport(aprlib)] static extern void apr_pool_destroy(IntPtr pool);
[DllImport(aprlib)] static extern IntPtr apr_hash_first(IntPtr pool, IntPtr hash);
[DllImport(aprlib)] static extern IntPtr apr_hash_next(IntPtr hashindex);
[DllImport(aprlib)] static extern void apr_hash_this(IntPtr hashindex, out IntPtr key, out int keylen, out IntPtr val);
+ [DllImport(aprlib)] static extern IntPtr apr_hash_get(IntPtr ht, IntPtr key, int klen);
[DllImport(aprlib)] static extern IntPtr apr_array_make(IntPtr pool, int nelts, int elt_size);
[DllImport(aprlib)] static extern IntPtr apr_array_push(IntPtr arr);
[DllImport(aprlib)] static extern IntPtr apr_pstrdup(IntPtr pool, string s);
@@ -98,12 +101,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
{
private const string aprlib = "libapr-1.so.0";
- public override void initialize() { apr_initialize (); }
- public override IntPtr pool_create_ex (out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator) { return apr_pool_create_ex(out pool, parent, abort, allocator); }
+ public override int initialize() { return apr_initialize (); }
+ public override int pool_create_ex (out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator) { return apr_pool_create_ex(out pool, parent, abort, allocator); }
public override void pool_destroy(IntPtr pool) { apr_pool_destroy (pool); }
public override IntPtr hash_first(IntPtr pool, IntPtr hash) { return apr_hash_first (pool, hash); }
public override IntPtr hash_next(IntPtr hashindex) { return apr_hash_next(hashindex); }
public override void hash_this(IntPtr hashindex, out IntPtr key, out int keylen, out IntPtr val) { apr_hash_this(hashindex, out key, out keylen, out val); }
+ public override IntPtr hash_get(IntPtr ht, IntPtr key, int klen) { return apr_hash_get (ht, key, klen); }
public override IntPtr array_make(IntPtr pool, int nelts, int elt_size) { return apr_array_make(pool, nelts, elt_size); }
public override IntPtr array_push(IntPtr arr) { return apr_array_push (arr); }
public override IntPtr pstrdup(IntPtr pool, string s) { return apr_pstrdup(pool, s); }
@@ -111,12 +115,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
public override int file_open(ref IntPtr newf, string fname, int flag, int perm, IntPtr pool) { return apr_file_open(ref newf, fname, flag, perm, pool); }
public override int file_close (IntPtr file) { return apr_file_close (file); }
- [DllImport(aprlib)] static extern void apr_initialize();
- [DllImport(aprlib)] static extern IntPtr apr_pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
+ [DllImport(aprlib)] static extern int apr_initialize();
+ [DllImport(aprlib)] static extern int apr_pool_create_ex(out IntPtr pool, IntPtr parent, IntPtr abort, IntPtr allocator);
[DllImport(aprlib)] static extern void apr_pool_destroy(IntPtr pool);
[DllImport(aprlib)] static extern IntPtr apr_hash_first(IntPtr pool, IntPtr hash);
[DllImport(aprlib)] static extern IntPtr apr_hash_next(IntPtr hashindex);
[DllImport(aprlib)] static extern void apr_hash_this(IntPtr hashindex, out IntPtr key, out int keylen, out IntPtr val);
+ [DllImport(aprlib)] static extern IntPtr apr_hash_get(IntPtr ht, IntPtr key, int klen);
[DllImport(aprlib)] static extern IntPtr apr_array_make(IntPtr pool, int nelts, int elt_size);
[DllImport(aprlib)] static extern IntPtr apr_array_push(IntPtr arr);
[DllImport(aprlib)] static extern IntPtr apr_pstrdup(IntPtr pool, string s);
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient.cs
index fdf1c6a..c7091c0 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient.cs
@@ -12,7 +12,7 @@ using MonoDevelop.Core;
using MonoDevelop.VersionControl;
using MonoDevelop.VersionControl.Subversion.Gui;
-using svn_revnum_t = System.Int32;
+using svn_revnum_t = System.IntPtr;
using off_t = System.Int64;
using size_t = System.Int32;
@@ -36,8 +36,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
return null;
}
- public abstract void config_ensure (string config_dir, IntPtr pool);
- public abstract void config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool);
+ public abstract IntPtr config_ensure (string config_dir, IntPtr pool);
+ public abstract IntPtr config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool);
public abstract void auth_open (out IntPtr auth_baton, IntPtr providers, IntPtr pool);
public abstract void auth_set_parameter (IntPtr auth_baton, string name, IntPtr value);
public abstract IntPtr auth_get_parameter (IntPtr auth_baton, string name);
@@ -57,7 +57,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public abstract IntPtr client_create_context (out IntPtr ctx, IntPtr pool);
public abstract IntPtr client_ls (out IntPtr dirents, string path_or_url,
- ref Rev revision, int recurse, IntPtr ctx,
+ ref Rev revision, bool recurse, IntPtr ctx,
IntPtr pool);
public abstract IntPtr client_status (IntPtr result_rev, string path, ref Rev revision,
@@ -69,8 +69,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public abstract IntPtr client_log (IntPtr apr_array_header_t_targets,
ref Rev rev_start, ref Rev rev_end,
- int discover_changed_paths,
- int strict_node_history,
+ bool discover_changed_paths,
+ bool strict_node_history,
svn_log_message_receiver_t receiver,
IntPtr receiver_baton,
IntPtr ctx, IntPtr pool);
@@ -88,27 +88,29 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
//public abstract IntPtr stream_set_read (IntPtr stream, svn_readwrite_fn_t reader);
- public abstract IntPtr stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
+ public abstract void stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
- public abstract IntPtr client_update (IntPtr result_rev, string path, ref Rev revision,
+ public abstract IntPtr client_update (svn_revnum_t result_rev, string path, ref Rev revision,
bool recurse, IntPtr ctx, IntPtr pool);
public abstract IntPtr client_delete (ref IntPtr commit_info_p, IntPtr apr_array_header_t_targets,
- int force, IntPtr ctx, IntPtr pool);
+ bool force, IntPtr ctx, IntPtr pool);
- public abstract IntPtr client_add3 (string path, int recurse, int force, int no_ignore, IntPtr ctx, IntPtr pool);
+ public abstract IntPtr client_add3 (string path, bool recurse, bool force, bool no_ignore, IntPtr ctx, IntPtr pool);
public abstract IntPtr client_commit (ref IntPtr svn_client_commit_info_t_commit_info,
- IntPtr apr_array_header_t_targets, int nonrecursive,
+ IntPtr apr_array_header_t_targets,
+ bool nonrecursive,
IntPtr ctx, IntPtr pool);
- public abstract IntPtr client_revert (IntPtr apr_array_header_t_targets, int recursive,
+ public abstract IntPtr client_revert (IntPtr apr_array_header_t_targets,
+ bool recursive,
IntPtr ctx, IntPtr pool);
- public abstract IntPtr client_resolved (string path, int recursive, IntPtr ctx, IntPtr pool);
+ public abstract IntPtr client_resolved (string path, bool recursive, IntPtr ctx, IntPtr pool);
public abstract IntPtr client_move (ref IntPtr commit_info_p, string srcPath, ref Rev rev,
- string destPath, int force, IntPtr ctx, IntPtr pool);
+ string destPath, bool force, IntPtr ctx, IntPtr pool);
public abstract IntPtr client_checkout (IntPtr result_rev, string url, string path, ref Rev rev,
bool recurse, IntPtr ctx, IntPtr pool);
@@ -116,8 +118,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public abstract IntPtr client_mkdir2 (ref IntPtr commit_info, IntPtr apr_array_paths, IntPtr ctx, IntPtr pool);
public abstract IntPtr client_diff (IntPtr diff_options, string path1, ref Rev revision1,
- string path2, ref Rev revision2, int recurse,
- int ignore_ancestry, int no_diff_deleted,
+ string path2, ref Rev revision2, bool recurse,
+ bool ignore_ancestry, bool no_diff_deleted,
IntPtr outfile, IntPtr errfile,
IntPtr ctx, IntPtr pool);
@@ -135,24 +137,29 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
IntPtr ctx,
IntPtr pool);
- public abstract IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, int steal_lock, IntPtr ctx, IntPtr pool);
+ public abstract IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, bool steal_lock, IntPtr ctx, IntPtr pool);
- public abstract IntPtr client_unlock (IntPtr apr_array_header_t_targets, int break_lock, IntPtr ctx, IntPtr pool);
-
- public abstract IntPtr client_prop_get (out IntPtr value, string name, string target, ref Rev revision, int recurse, IntPtr ctx, IntPtr pool);
+ public abstract IntPtr client_unlock (IntPtr apr_array_header_t_targets, bool break_lock, IntPtr ctx, IntPtr pool);
+ public abstract IntPtr client_propget (out IntPtr value, string name, string target, ref Rev revision, bool recurse, IntPtr ctx, IntPtr pool);
+
+ public abstract IntPtr client_propset (string propname, IntPtr propval, string target, bool recurse, IntPtr pool);
+
public abstract IntPtr client_blame (string path, ref Rev rev_start, ref Rev rev_end, svn_client_blame_receiver_t receiver, IntPtr baton, IntPtr ctx, IntPtr pool);
-
- public abstract void strerror (int statcode, byte[] buf, int bufsize);
+
+ public abstract IntPtr wc_context_create (out IntPtr svn_wc_context_t, IntPtr config, IntPtr result_pool, IntPtr scratch_pool);
+
+ // TODO: Check if intptr
+ public abstract IntPtr strerror (int statcode, byte[] buf, int bufsize);
public abstract IntPtr path_internal_style (string path, IntPtr pool);
public class DirEnt {
public readonly string Name;
public readonly bool IsDirectory;
- public readonly long Size;
+ public readonly Int64 Size;
public readonly bool HasProps;
- public readonly int CreatedRevision;
+ public readonly svn_revnum_t CreatedRevision;
public readonly DateTime Time;
public readonly string LastAuthor;
@@ -164,7 +171,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
IsDirectory = ent.kind == svn_node_kind_t.Dir;
Size = ent.size;
HasProps = ent.has_props;
- CreatedRevision = (int) ent.created_rev;
+ CreatedRevision = ent.created_rev;
Time = Epoch.AddTicks(ent.time * 10);
LastAuthor = ent.last_author;
}
@@ -265,7 +272,6 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
}
}
}
-
// Native Interop
[StructLayout(LayoutKind.Sequential)]
public struct svn_client_ctx_t {
@@ -275,7 +281,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public svn_client_get_commit_log_t LogMsgFunc;
public IntPtr logmsg_baton;
public IntPtr config;
- public IntPtr cancel_func;
+ public svn_cancel_func_t cancel_func;
public IntPtr cancel_baton;
public svn_wc_notify_func2_t NotifyFunc2;
public IntPtr notify_baton2;
@@ -288,7 +294,10 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public IntPtr mimetypes_map;
public svn_wc_conflict_resolver_func_t conflict_func;
public IntPtr conflict_baton;
- public string client_name;
+ public IntPtr client_name;
+ public svn_wc_conflict_resolver_func2_t conflict_func2;
+ public IntPtr conflict_baton2;
+ public IntPtr wc_ctx;
}
[StructLayout(LayoutKind.Sequential)]
@@ -309,7 +318,14 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public IntPtr path_prefix;
public IntPtr prop_name;
public IntPtr rev_prop;
-
+ public svn_revnum_t old_revision;
+ /* C Unsigned Long */
+ public IntPtr hunk_original_start;
+ public IntPtr hunk_original_length;
+ public IntPtr hunk_modified_start;
+ public IntPtr hunk_modified_length;
+ public IntPtr hunk_matched_line;
+ public IntPtr hunk_fuzz;
}
[StructLayout(LayoutKind.Sequential)]
@@ -344,16 +360,18 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
Dir,
Unknown
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
internal struct svn_dirent_t {
public svn_node_kind_t kind;
- public long size;
+ public Int64 size;
[MarshalAs (UnmanagedType.Bool)] public bool has_props;
public svn_revnum_t created_rev;
public long time; // created
[MarshalAs (UnmanagedType.LPStr)] public string last_author;
}
-
+
+ /* svn_wc_schedule_t */
public enum NodeSchedule {
Normal,
Add,
@@ -422,6 +440,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public Rev file_external_rev;
}
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_wc_status2_t {
public IntPtr to_svn_wc_entry_t;
public svn_wc_status_kind text_status; // Field not shown in the documentation
@@ -434,15 +453,16 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public IntPtr repos_lock;
public IntPtr url;
public svn_revnum_t ood_last_cmt_rev;
- public long ood_last_cmt_date;
+ public Int64 ood_last_cmt_date;
public svn_node_kind_t ood_kind;
- public string ood_last_cmt_author;
+ public IntPtr ood_last_cmt_author;
public IntPtr tree_conflict;
[MarshalAs (UnmanagedType.Bool)] public bool file_external;
public svn_wc_status_kind pristine_text_status;
public svn_wc_status_kind pristine_prop_status;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_lock_t {
public string path;
public string token;
@@ -505,7 +525,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
Date,
Committed,
Previous,
- Base,
+ Base,
Working,
Head
}
@@ -515,39 +535,46 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public struct svn_opt_revision_value_t {
public long number_or_date;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_log_changed_path_t {
public char action;
public string copy_from_path;
public svn_revnum_t copy_from_rev;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_cred_simple_t {
[MarshalAs (UnmanagedType.LPStr)] public string username;
[MarshalAs (UnmanagedType.LPStr)] public string password;
[MarshalAs (UnmanagedType.Bool)] public bool may_save;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_cred_username_t {
[MarshalAs (UnmanagedType.LPStr)] public string username;
[MarshalAs (UnmanagedType.Bool)] public bool may_save;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_cred_ssl_server_trust_t {
[MarshalAs (UnmanagedType.Bool)] public bool may_save;
- public uint accepted_failures;
+ public UInt32 accepted_failures;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_cred_ssl_client_cert_t {
[MarshalAs (UnmanagedType.LPStr)] public string cert_file;
[MarshalAs (UnmanagedType.Bool)] public bool may_save;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_cred_ssl_client_cert_pw_t {
[MarshalAs (UnmanagedType.LPStr)] public string password;
[MarshalAs (UnmanagedType.Bool)] public bool may_save;
}
-
+
+ [StructLayout (LayoutKind.Sequential)]
public struct svn_auth_ssl_server_cert_info_t {
[MarshalAs (UnmanagedType.LPStr)] public string hostname;
[MarshalAs (UnmanagedType.LPStr)] public string fingerprint;
@@ -592,6 +619,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
Unlocked,
FailedLock,
FailedUnlock
+ // TODO: Add more enum data
}
public enum NotifyState {
@@ -602,7 +630,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
Obstructed,
Changed,
Merged,
- Conflicted
+ Conflicted,
+ SourceMissing
}
public enum NotifyLockState {
@@ -626,35 +655,41 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public delegate IntPtr svn_auth_simple_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, [MarshalAs (UnmanagedType.LPStr)] string user_name, [MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
public delegate IntPtr svn_auth_username_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, [MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
- public delegate IntPtr svn_auth_ssl_server_trust_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, uint failures, ref svn_auth_ssl_server_cert_info_t cert_info, [MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
+ public delegate IntPtr svn_auth_ssl_server_trust_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, UInt32 failures, ref svn_auth_ssl_server_cert_info_t cert_info,[MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
+
public delegate IntPtr svn_auth_ssl_client_cert_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, [MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
+
public delegate IntPtr svn_auth_ssl_client_cert_pw_prompt_func_t (ref IntPtr cred, IntPtr baton, [MarshalAs (UnmanagedType.LPStr)] string realm, [MarshalAs (UnmanagedType.Bool)] bool may_save, IntPtr pool);
-
- public delegate IntPtr svn_log_message_receiver_t (IntPtr baton, IntPtr apr_hash_changed_paths,
+
+ public delegate IntPtr svn_log_message_receiver_t (IntPtr baton,IntPtr apr_hash_changed_paths,
svn_revnum_t revision, IntPtr author, IntPtr date,
IntPtr message, IntPtr pool);
-
+
public delegate IntPtr svn_readwrite_fn_t (IntPtr baton, IntPtr data, ref size_t len);
-
+
public delegate void svn_wc_notify_func_t (IntPtr baton, IntPtr path, NotifyAction action, svn_node_kind_t kind,
IntPtr mime_type, NotifyState content_state, NotifyState prop_state,
svn_revnum_t revision);
-
+
public delegate void svn_wc_notify_func2_t (IntPtr baton, ref svn_wc_notify_t notify, IntPtr pool);
-
+
public delegate IntPtr svn_client_get_commit_log_t (ref IntPtr log_msg, ref IntPtr tmp_file, IntPtr commit_items,
IntPtr baton, IntPtr pool);
-
+
public delegate IntPtr svn_client_get_commit_log2_t (ref IntPtr log_msg, ref IntPtr tmp_file, IntPtr commit_items,
IntPtr baton, IntPtr pool);
public delegate IntPtr svn_client_get_commit_log3_t (ref IntPtr log_msg, ref IntPtr tmp_file, IntPtr commit_items,
IntPtr baton, IntPtr pool);
- public delegate IntPtr svn_client_blame_receiver_t (IntPtr baton, long line_no, svn_revnum_t revision, string author, string date, string line, IntPtr pool);
+ public delegate IntPtr svn_client_blame_receiver_t (IntPtr baton, Int64 line_no, svn_revnum_t revision, string author, string date, string line, IntPtr pool);
public delegate void svn_ra_progress_notify_func_t (off_t progress, off_t total, off_t baton, IntPtr pool);
- public delegate IntPtr svn_wc_conflict_resolver_func_t (out IntPtr result, out IntPtr description, IntPtr baton, IntPtr pool);
+ public delegate IntPtr svn_wc_conflict_resolver_func_t (out IntPtr result, IntPtr description, IntPtr baton, IntPtr pool);
+
+ public delegate IntPtr svn_wc_conflict_resolver_func2_t (out IntPtr result, IntPtr description, IntPtr baton, IntPtr result_pool, IntPtr scratch_pool);
+
+ public delegate IntPtr svn_cancel_func_t (IntPtr baton);
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient0.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient0.cs
index 17ae67f..a57348f 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient0.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient0.cs
@@ -35,7 +35,7 @@ using MonoDevelop.Core;
using MonoDevelop.VersionControl;
using MonoDevelop.VersionControl.Subversion.Gui;
-using svn_revnum_t = System.Int32;
+using svn_revnum_t = System.IntPtr;
namespace MonoDevelop.VersionControl.Subversion.Unix {
@@ -47,14 +47,14 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
return svn_client_root_url_from_path (ref url, path_or_url, ctx, pool);
}
- public override void config_ensure (string config_dir, IntPtr pool)
+ public override IntPtr config_ensure (string config_dir, IntPtr pool)
{
- svn_config_ensure (config_dir, pool);
+ return svn_config_ensure (config_dir, pool);
}
- public override void config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool)
+ public override IntPtr config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool)
{
- svn_config_get_config (ref cfg_hash, config_dir, pool);
+ return svn_config_get_config (ref cfg_hash, config_dir, pool);
}
public override void auth_open (out IntPtr auth_baton, IntPtr providers, IntPtr pool)
@@ -133,7 +133,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
}
public override IntPtr client_ls (out IntPtr dirents, string path_or_url,
- ref Rev revision, int recurse, IntPtr ctx,
+ ref Rev revision, bool recurse, IntPtr ctx,
IntPtr pool)
{
return svn_client_ls (out dirents, path_or_url, ref revision, recurse, ctx, pool);
@@ -151,8 +151,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public override IntPtr client_log (IntPtr apr_array_header_t_targets,
ref Rev rev_start, ref Rev rev_end,
- int discover_changed_paths,
- int strict_node_history,
+ bool discover_changed_paths,
+ bool strict_node_history,
svn_log_message_receiver_t receiver,
IntPtr receiver_baton,
IntPtr ctx, IntPtr pool)
@@ -187,49 +187,49 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
//public override IntPtr stream_set_read (IntPtr stream, svn_readwrite_fn_t reader);
- public override IntPtr stream_set_write (IntPtr stream, svn_readwrite_fn_t writer)
+ public override void stream_set_write (IntPtr stream, svn_readwrite_fn_t writer)
{
- return svn_stream_set_write (stream, writer);
+ svn_stream_set_write (stream, writer);
}
- public override IntPtr client_update (IntPtr result_rev, string path, ref Rev revision,
+ public override IntPtr client_update (svn_revnum_t result_rev, string path, ref Rev revision,
bool recurse, IntPtr ctx, IntPtr pool)
{
return svn_client_update (result_rev, path, ref revision, recurse, ctx, pool);
}
public override IntPtr client_delete (ref IntPtr commit_info_p, IntPtr apr_array_header_t_targets,
- int force, IntPtr ctx, IntPtr pool)
+ bool force, IntPtr ctx, IntPtr pool)
{
return svn_client_delete (ref commit_info_p, apr_array_header_t_targets, force, ctx, pool);
}
- public override IntPtr client_add3 (string path, int recurse, int force, int no_ignore, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_add3 (string path, bool recurse, bool force, bool no_ignore, IntPtr ctx, IntPtr pool)
{
return svn_client_add3 (path, recurse, force, no_ignore, ctx, pool);
}
public override IntPtr client_commit (ref IntPtr svn_client_commit_info_t_commit_info,
- IntPtr apr_array_header_t_targets, int nonrecursive,
+ IntPtr apr_array_header_t_targets, bool nonrecursive,
IntPtr ctx, IntPtr pool)
{
return svn_client_commit (ref svn_client_commit_info_t_commit_info, apr_array_header_t_targets,
nonrecursive, ctx, pool);
}
- public override IntPtr client_revert (IntPtr apr_array_header_t_targets, int recursive,
+ public override IntPtr client_revert (IntPtr apr_array_header_t_targets, bool recursive,
IntPtr ctx, IntPtr pool)
{
return svn_client_revert (apr_array_header_t_targets, recursive, ctx, pool);
}
- public override IntPtr client_resolved (string path, int recursive, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_resolved (string path, bool recursive, IntPtr ctx, IntPtr pool)
{
return svn_client_resolved (path, recursive, ctx, pool);
}
public override IntPtr client_move (ref IntPtr commit_info_p, string srcPath, ref Rev rev,
- string destPath, int force, IntPtr ctx, IntPtr pool)
+ string destPath, bool force, IntPtr ctx, IntPtr pool)
{
return svn_client_move (ref commit_info_p, srcPath, ref rev, destPath, force, ctx, pool);
}
@@ -246,8 +246,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
}
public override IntPtr client_diff (IntPtr diff_options, string path1, ref Rev revision1,
- string path2, ref Rev revision2, int recurse,
- int ignore_ancestry, int no_diff_deleted,
+ string path2, ref Rev revision2, bool recurse,
+ bool ignore_ancestry, bool no_diff_deleted,
IntPtr outfile, IntPtr errfile,
IntPtr ctx, IntPtr pool)
{
@@ -275,29 +275,39 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
merge_options, ctx, pool);
}
- public override IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, int steal_lock, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, bool steal_lock, IntPtr ctx, IntPtr pool)
{
return svn_client_lock (apr_array_header_t_targets, comment, steal_lock, ctx, pool);
}
- public override IntPtr client_unlock (IntPtr apr_array_header_t_targets, int break_lock, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_unlock (IntPtr apr_array_header_t_targets, bool break_lock, IntPtr ctx, IntPtr pool)
{
return svn_client_unlock (apr_array_header_t_targets, break_lock, ctx, pool);
}
- public override IntPtr client_prop_get (out IntPtr value, string name, string target, ref Rev revision, int recurse, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_propget (out IntPtr value, string name, string target, ref Rev revision, bool recurse, IntPtr ctx, IntPtr pool)
{
- return svn_client_prop_get (out value, name, target, ref revision, recurse, ctx, pool);
+ return svn_client_propget (out value, name, target, ref revision, recurse, ctx, pool);
+ }
+
+ public override IntPtr client_propset (string propname, IntPtr propval, string target, bool recurse, IntPtr pool)
+ {
+ return svn_client_propset (propname, propval, target, recurse, pool);
}
public override IntPtr client_blame (string path, ref Rev rev_start, ref Rev rev_end, svn_client_blame_receiver_t receiver, System.IntPtr baton, System.IntPtr ctx, System.IntPtr pool)
{
return svn_client_blame (path, ref rev_start, ref rev_end, receiver, baton, ctx, pool);
}
+
+ public override IntPtr wc_context_create (out IntPtr svn_wc_context_t, IntPtr config, IntPtr result_pool, IntPtr scratch_pool)
+ {
+ return svn_wc_context_create (out svn_wc_context_t, config, result_pool, scratch_pool);
+ }
- public override void strerror (int statcode, byte[] buf, int bufsize)
+ public override IntPtr strerror (int statcode, byte[] buf, int bufsize)
{
- svn_strerror (statcode, buf, bufsize);
+ return svn_strerror (statcode, buf, bufsize);
}
public override IntPtr path_internal_style (string path, IntPtr pool)
@@ -327,8 +337,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_create_context(out IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_ls (out IntPtr dirents, string path_or_url,
- ref Rev revision, int recurse, IntPtr ctx,
- IntPtr pool);
+ ref Rev revision, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_status2 (IntPtr svn_revnum_t, string path, ref Rev revision,
svn_wc_status_func2_t status_func, IntPtr status_baton,
@@ -341,8 +351,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_log (IntPtr apr_array_header_t_targets,
ref Rev rev_start, ref Rev rev_end,
- int discover_changed_paths,
- int strict_node_history,
+ [MarshalAs (UnmanagedType.Bool)] bool discover_changed_paths,
+ [MarshalAs (UnmanagedType.Bool)] bool strict_node_history,
svn_log_message_receiver_t receiver,
IntPtr receiver_baton,
IntPtr ctx, IntPtr pool);
@@ -360,28 +370,36 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
//[DllImport(svnclientlib)] static extern IntPtr svn_stream_set_read (IntPtr stream, svn_readwrite_fn_t reader);
- [DllImport(svnclientlib)] static extern IntPtr svn_stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
+ [DllImport(svnclientlib)] static extern void svn_stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_update (IntPtr result_rev, string path, ref Rev revision,
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_update (svn_revnum_t result_rev, string path, ref Rev revision,
[MarshalAs (UnmanagedType.Bool)] bool recurse,
IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_delete (ref IntPtr commit_info_p, IntPtr apr_array_header_t_targets,
- int force, IntPtr ctx, IntPtr pool);
+ [MarshalAs (UnmanagedType.Bool)] bool force, IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_add3 (string path, int recurse, int force, int no_ignore, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_add3 (string path, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ [MarshalAs (UnmanagedType.Bool)] bool force,
+ [MarshalAs (UnmanagedType.Bool)] bool no_ignore,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_commit (ref IntPtr svn_client_commit_info_t_commit_info,
- IntPtr apr_array_header_t_targets, int nonrecursive,
+ IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool nonrecursive,
IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_revert (IntPtr apr_array_header_t_targets, int recursive,
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_revert (IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool recursive,
IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_resolved (string path, int recursive, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_resolved (string path,
+ [MarshalAs (UnmanagedType.Bool)] bool recursive,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_move (ref IntPtr commit_info_p, string srcPath, ref Rev rev,
- string destPath, int force, IntPtr ctx, IntPtr pool);
+ string destPath, [MarshalAs (UnmanagedType.Bool)] bool force,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_checkout (IntPtr result_rev, string url, string path, ref Rev rev,
[MarshalAs (UnmanagedType.Bool)] bool recurse,
@@ -391,9 +409,9 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_diff (IntPtr diff_options, string path1,
ref Rev revision1, string path2,
- ref Rev revision2, int recurse,
- int ignore_ancestry,
- int no_diff_deleted,
+ ref Rev revision2, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ [MarshalAs (UnmanagedType.Bool)] bool ignore_ancestry,
+ [MarshalAs (UnmanagedType.Bool)] bool no_diff_deleted,
IntPtr outfile,
IntPtr errfile,
IntPtr ctx,
@@ -412,15 +430,27 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
IntPtr ctx,
IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_lock (IntPtr apr_array_header_t_targets, string comment, int steal_lock, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_lock (IntPtr apr_array_header_t_targets, string comment,
+ [MarshalAs (UnmanagedType.Bool)] bool steal_lock,
+ IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_unlock (IntPtr apr_array_header_t_targets, int break_lock, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_unlock (IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool break_lock,
+ IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_prop_get (out IntPtr value, string name, string target, ref Rev revision, int recurse, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_propget (out IntPtr value, string name, string target,
+ ref Rev revision,
+ [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ IntPtr ctx, IntPtr pool);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_propset (string propname, IntPtr propval, string target,
+ [MarshalAs (UnmanagedType.Bool)] bool recurse, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_blame (string path, ref Rev rev_start, ref Rev rev_end, svn_client_blame_receiver_t receiver, IntPtr baton, IntPtr ctx, IntPtr pool);
-
- [DllImport(svnclientlib)] static extern void svn_strerror (int statcode, byte[] buf, int bufsize);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_wc_context_create (out IntPtr svn_wc_context_t, IntPtr svn_config_ensure, IntPtr result_pool, IntPtr scratch_pool);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_strerror (int statcode, byte[] buf, int bufsize);
[DllImport(svnclientlib)] static extern IntPtr svn_path_internal_style (string path, IntPtr pool);
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient1.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient1.cs
index 5882a0b..5e8c624 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient1.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/LibSvnClient1.cs
@@ -35,7 +35,7 @@ using MonoDevelop.Core;
using MonoDevelop.VersionControl;
using MonoDevelop.VersionControl.Subversion.Gui;
-using svn_revnum_t = System.Int32;
+using svn_revnum_t = System.IntPtr;
namespace MonoDevelop.VersionControl.Subversion.Unix {
@@ -47,14 +47,14 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
return svn_client_root_url_from_path (ref url, path_or_url, ctx, pool);
}
- public override void config_ensure (string config_dir, IntPtr pool)
+ public override IntPtr config_ensure (string config_dir, IntPtr pool)
{
- svn_config_ensure (config_dir, pool);
+ return svn_config_ensure (config_dir, pool);
}
- public override void config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool)
+ public override IntPtr config_get_config (ref IntPtr cfg_hash, string config_dir, IntPtr pool)
{
- svn_config_get_config (ref cfg_hash, config_dir, pool);
+ return svn_config_get_config (ref cfg_hash, config_dir, pool);
}
public override void auth_open (out IntPtr auth_baton, IntPtr providers, IntPtr pool)
@@ -133,7 +133,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
}
public override IntPtr client_ls (out IntPtr dirents, string path_or_url,
- ref Rev revision, int recurse, IntPtr ctx,
+ ref Rev revision, bool recurse, IntPtr ctx,
IntPtr pool)
{
return svn_client_ls (out dirents, path_or_url, ref revision, recurse, ctx, pool);
@@ -151,8 +151,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
public override IntPtr client_log (IntPtr apr_array_header_t_targets,
ref Rev rev_start, ref Rev rev_end,
- int discover_changed_paths,
- int strict_node_history,
+ bool discover_changed_paths,
+ bool strict_node_history,
svn_log_message_receiver_t receiver,
IntPtr receiver_baton,
IntPtr ctx, IntPtr pool)
@@ -187,49 +187,50 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
//public override IntPtr stream_set_read (IntPtr stream, svn_readwrite_fn_t reader);
- public override IntPtr stream_set_write (IntPtr stream, svn_readwrite_fn_t writer)
+ public override void stream_set_write (IntPtr stream, svn_readwrite_fn_t writer)
{
- return svn_stream_set_write (stream, writer);
+ svn_stream_set_write (stream, writer);
}
- public override IntPtr client_update (IntPtr result_rev, string path, ref Rev revision,
+ public override IntPtr client_update (svn_revnum_t result_rev, string path, ref Rev revision,
bool recurse, IntPtr ctx, IntPtr pool)
{
return svn_client_update (result_rev, path, ref revision, recurse, ctx, pool);
}
public override IntPtr client_delete (ref IntPtr commit_info_p, IntPtr apr_array_header_t_targets,
- int force, IntPtr ctx, IntPtr pool)
+ bool force, IntPtr ctx, IntPtr pool)
{
return svn_client_delete (ref commit_info_p, apr_array_header_t_targets, force, ctx, pool);
}
- public override IntPtr client_add3 (string path, int recurse, int force, int no_ignore, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_add3 (string path, bool recurse, bool force, bool no_ignore, IntPtr ctx, IntPtr pool)
{
return svn_client_add3 (path, recurse, force, no_ignore, ctx, pool);
}
public override IntPtr client_commit (ref IntPtr svn_client_commit_info_t_commit_info,
- IntPtr apr_array_header_t_targets, int nonrecursive,
+ IntPtr apr_array_header_t_targets,
+ bool nonrecursive,
IntPtr ctx, IntPtr pool)
{
return svn_client_commit (ref svn_client_commit_info_t_commit_info, apr_array_header_t_targets,
nonrecursive, ctx, pool);
}
- public override IntPtr client_revert (IntPtr apr_array_header_t_targets, int recursive,
+ public override IntPtr client_revert (IntPtr apr_array_header_t_targets, bool recursive,
IntPtr ctx, IntPtr pool)
{
return svn_client_revert (apr_array_header_t_targets, recursive, ctx, pool);
}
- public override IntPtr client_resolved (string path, int recursive, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_resolved (string path, bool recursive, IntPtr ctx, IntPtr pool)
{
return svn_client_resolved (path, recursive, ctx, pool);
}
public override IntPtr client_move (ref IntPtr commit_info_p, string srcPath, ref Rev rev,
- string destPath, int force, IntPtr ctx, IntPtr pool)
+ string destPath, bool force, IntPtr ctx, IntPtr pool)
{
return svn_client_move (ref commit_info_p, srcPath, ref rev, destPath, force, ctx, pool);
}
@@ -246,8 +247,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
}
public override IntPtr client_diff (IntPtr diff_options, string path1, ref Rev revision1,
- string path2, ref Rev revision2, int recurse,
- int ignore_ancestry, int no_diff_deleted,
+ string path2, ref Rev revision2, bool recurse,
+ bool ignore_ancestry, bool no_diff_deleted,
IntPtr outfile, IntPtr errfile,
IntPtr ctx, IntPtr pool)
{
@@ -275,29 +276,39 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
merge_options, ctx, pool);
}
- public override IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, int steal_lock, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_lock (IntPtr apr_array_header_t_targets, string comment, bool steal_lock, IntPtr ctx, IntPtr pool)
{
return svn_client_lock (apr_array_header_t_targets, comment, steal_lock, ctx, pool);
}
- public override IntPtr client_unlock (IntPtr apr_array_header_t_targets, int break_lock, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_unlock (IntPtr apr_array_header_t_targets, bool break_lock, IntPtr ctx, IntPtr pool)
{
return svn_client_unlock (apr_array_header_t_targets, break_lock, ctx, pool);
}
- public override IntPtr client_prop_get (out IntPtr value, string name, string target, ref Rev revision, int recurse, IntPtr ctx, IntPtr pool)
+ public override IntPtr client_propget (out IntPtr value, string name, string target, ref Rev revision, bool recurse, IntPtr ctx, IntPtr pool)
{
- return svn_client_prop_get (out value, name, target, ref revision, recurse, ctx, pool);
+ return svn_client_propget (out value, name, target, ref revision, recurse, ctx, pool);
+ }
+
+ public override IntPtr client_propset (string propname, IntPtr propval, string target, bool recurse, IntPtr pool)
+ {
+ return svn_client_propset (propname, propval, target, recurse, pool);
}
public override IntPtr client_blame (string path, ref Rev rev_start, ref Rev rev_end, svn_client_blame_receiver_t receiver, System.IntPtr baton, System.IntPtr ctx, System.IntPtr pool)
{
return svn_client_blame (path, ref rev_start, ref rev_end, receiver, baton, ctx, pool);
}
+
+ public override IntPtr wc_context_create (out IntPtr svn_wc_context_t, IntPtr config, IntPtr result_pool, IntPtr scratch_pool)
+ {
+ return svn_wc_context_create (out svn_wc_context_t, config, result_pool, scratch_pool);
+ }
- public override void strerror (int statcode, byte[] buf, int bufsize)
+ public override IntPtr strerror (int statcode, byte[] buf, int bufsize)
{
- svn_strerror (statcode, buf, bufsize);
+ return svn_strerror (statcode, buf, bufsize);
}
public override IntPtr path_internal_style (string path, IntPtr pool)
@@ -327,8 +338,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_create_context(out IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_ls (out IntPtr dirents, string path_or_url,
- ref Rev revision, int recurse, IntPtr ctx,
- IntPtr pool);
+ ref Rev revision, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_status2 (IntPtr svn_revnum_t, string path, ref Rev revision,
svn_wc_status_func2_t status_func, IntPtr status_baton,
@@ -341,8 +352,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_log (IntPtr apr_array_header_t_targets,
ref Rev rev_start, ref Rev rev_end,
- int discover_changed_paths,
- int strict_node_history,
+ [MarshalAs (UnmanagedType.Bool)] bool discover_changed_paths,
+ [MarshalAs (UnmanagedType.Bool)] bool strict_node_history,
svn_log_message_receiver_t receiver,
IntPtr receiver_baton,
IntPtr ctx, IntPtr pool);
@@ -360,28 +371,36 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
//[DllImport(svnclientlib)] static extern IntPtr svn_stream_set_read (IntPtr stream, svn_readwrite_fn_t reader);
- [DllImport(svnclientlib)] static extern IntPtr svn_stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
+ [DllImport(svnclientlib)] static extern void svn_stream_set_write (IntPtr stream, svn_readwrite_fn_t writer);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_update (IntPtr result_rev, string path, ref Rev revision,
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_update (svn_revnum_t result_rev, string path, ref Rev revision,
[MarshalAs (UnmanagedType.Bool)] bool recurse,
IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_delete (ref IntPtr commit_info_p, IntPtr apr_array_header_t_targets,
- int force, IntPtr ctx, IntPtr pool);
+ [MarshalAs (UnmanagedType.Bool)] bool force, IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_add3 (string path, int recurse, int force, int no_ignore, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_add3 (string path, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ [MarshalAs (UnmanagedType.Bool)] bool force,
+ [MarshalAs (UnmanagedType.Bool)] bool no_ignore,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_commit (ref IntPtr svn_client_commit_info_t_commit_info,
- IntPtr apr_array_header_t_targets, int nonrecursive,
+ IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool nonrecursive,
IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_revert (IntPtr apr_array_header_t_targets, int recursive,
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_revert (IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool recursive,
IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_resolved (string path, int recursive, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_resolved (string path,
+ [MarshalAs (UnmanagedType.Bool)] bool recursive,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_move (ref IntPtr commit_info_p, string srcPath, ref Rev rev,
- string destPath, int force, IntPtr ctx, IntPtr pool);
+ string destPath, [MarshalAs (UnmanagedType.Bool)] bool force,
+ IntPtr ctx, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_checkout (IntPtr result_rev, string url, string path, ref Rev rev,
[MarshalAs (UnmanagedType.Bool)] bool recurse,
@@ -391,9 +410,9 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
[DllImport(svnclientlib)] static extern IntPtr svn_client_diff (IntPtr diff_options, string path1,
ref Rev revision1, string path2,
- ref Rev revision2, int recurse,
- int ignore_ancestry,
- int no_diff_deleted,
+ ref Rev revision2, [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ [MarshalAs (UnmanagedType.Bool)] bool ignore_ancestry,
+ [MarshalAs (UnmanagedType.Bool)] bool no_diff_deleted,
IntPtr outfile,
IntPtr errfile,
IntPtr ctx,
@@ -412,15 +431,27 @@ namespace MonoDevelop.VersionControl.Subversion.Unix {
IntPtr ctx,
IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_lock (IntPtr apr_array_header_t_targets, string comment, int steal_lock, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_lock (IntPtr apr_array_header_t_targets, string comment,
+ [MarshalAs (UnmanagedType.Bool)] bool steal_lock,
+ IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_unlock (IntPtr apr_array_header_t_targets, int break_lock, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_unlock (IntPtr apr_array_header_t_targets,
+ [MarshalAs (UnmanagedType.Bool)] bool break_lock,
+ IntPtr ctx, IntPtr pool);
- [DllImport(svnclientlib)] static extern IntPtr svn_client_prop_get (out IntPtr value, string name, string target, ref Rev revision, int recurse, IntPtr ctx, IntPtr pool);
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_propget (out IntPtr value, string name, string target,
+ ref Rev revision,
+ [MarshalAs (UnmanagedType.Bool)] bool recurse,
+ IntPtr ctx, IntPtr pool);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_client_propset (string propname, IntPtr propval, string target,
+ [MarshalAs (UnmanagedType.Bool)] bool recurse, IntPtr pool);
[DllImport(svnclientlib)] static extern IntPtr svn_client_blame (string path, ref Rev rev_start, ref Rev rev_end, svn_client_blame_receiver_t receiver, IntPtr baton, IntPtr ctx, IntPtr pool);
-
- [DllImport(svnclientlib)] static extern void svn_strerror (int statcode, byte[] buf, int bufsize);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_wc_context_create (out IntPtr svn_wc_context_t, IntPtr svn_config_ensure, IntPtr result_pool, IntPtr scratch_pool);
+
+ [DllImport(svnclientlib)] static extern IntPtr svn_strerror (int statcode, byte[] buf, int bufsize);
[DllImport(svnclientlib)] static extern IntPtr svn_path_internal_style (string path, IntPtr pool);
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs
index 9577d62..fefb955 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs
@@ -9,12 +9,13 @@ using MonoDevelop.Core;
using MonoDevelop.VersionControl.Subversion.Gui;
using System.Text;
-using svn_revnum_t = System.Int32;
+using svn_revnum_t = System.IntPtr;
using size_t = System.Int32;
+using MonoDevelop.Projects.Text;
namespace MonoDevelop.VersionControl.Subversion.Unix
{
- class SvnClient : SubversionVersionControl
+ public class SvnClient : SubversionVersionControl
{
internal static LibApr apr;
static Lazy<bool> isInstalled;
@@ -28,11 +29,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
public static void CheckError (IntPtr error, int? allowedError)
{
string msg = null;
+ int errorCode = 0; // Innermost error-code.
while (error != IntPtr.Zero) {
LibSvnClient.svn_error_t error_t = (LibSvnClient.svn_error_t) Marshal.PtrToStructure (error, typeof (LibSvnClient.svn_error_t));
if (allowedError.HasValue && error_t.apr_err == allowedError.Value)
return;
+ errorCode = error_t.apr_err;
if (msg != null)
msg += "\n" + GetErrorMessage (error_t);
else
@@ -41,9 +44,9 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
if (msg == null)
msg = GettextCatalog.GetString ("Unknown error");
-
- throw new SubversionException (msg);
}
+ if (msg != null)
+ throw new SubversionException (msg, errorCode);
}
static string GetErrorMessage (LibSvnClient.svn_error_t error)
@@ -74,10 +77,10 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
return Marshal.PtrToStringAnsi (res);
}
- static bool CheckInstalled ()
+ internal static bool CheckInstalled ()
{
// libsvn_client may be linked to libapr-0 or libapr-1, and we need to bind the LibApr class
- // the the same library. The following code detects the required libapr version and loads it.
+ // to the same library. The following code detects the required libapr version and loads it.
int aprver = GetLoadAprLib (-1);
svn = LibSvnClient.GetLib ();
if (svn == null) {
@@ -116,12 +119,6 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
}
}
- public override string Id {
- get {
- return "MonoDevelop.VersionControl.Subversion.SubversionVersionControl";
- }
- }
-
public override bool IsInstalled {
get { return isInstalled.Value; }
}
@@ -157,14 +154,18 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
}
}
- class UnixSvnBackend : SubversionBackend
+ public class UnixSvnBackend : SubversionBackend
{
protected static LibApr apr {
get { return SvnClient.apr; }
}
protected static LibSvnClient svn {
- get { return SvnClient.svn; }
+ get {
+ if (SvnClient.svn == null)
+ SvnClient.CheckInstalled ();
+ return SvnClient.svn;
+ }
}
static void CheckError (IntPtr error)
@@ -182,7 +183,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
return SvnClient.newpool (parent);
}
- bool disposed = false;
+ bool pre_1_7;
+ bool disposed = false;
IntPtr auth_baton;
IntPtr pool;
IntPtr ctx;
@@ -198,7 +200,10 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
LibSvnClient.NotifyLockState requiredLockState;
// retain this so the delegates aren't GC'ed
- LibSvnClient.svn_client_ctx_t ctxstruct;
+ LibSvnClient.svn_wc_notify_func2_t notify_func;
+ LibSvnClient.svn_client_get_commit_log_t log_func;
+ IntPtr config_hash;
+ IntPtr wc_ctx;
static bool IsBinary (byte[] buffer, long length)
{
@@ -211,6 +216,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
public UnixSvnBackend ()
{
+ pre_1_7 = GetVersion ().StartsWith ("1.6");
// Allocate the APR pool and the SVN client context.
pool = newpool (IntPtr.Zero);
@@ -224,25 +230,30 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
throw new InvalidOperationException ("Could not create a Subversion client context.");
// Set the callbacks on the client context structure.
-
- // This is quite a roudabout way of doing this. The task
- // is to set the notify field of the unmanaged structure
- // at the address 'ctx' -- with the address of a delegate.
- // There's no way to get an address for the delegate directly,
- // as far as I could figure out, so instead I create a managed
- // structure that mirrors the start of the unmanaged structure
- // I want to modify. Then I marshal the managed structure
- // *onto* to unmanaged one, overwriting fields in the process.
- // I don't use references to the structure itself in the API
- // calls because it needs to be allocated by SVN. I hope
- // this doesn't cause any memory leaks.
- ctxstruct = new LibSvnClient.svn_client_ctx_t ();
- ctxstruct.NotifyFunc2 = new LibSvnClient.svn_wc_notify_func2_t (svn_wc_notify_func_t_impl);
- ctxstruct.LogMsgFunc = new LibSvnClient.svn_client_get_commit_log_t (svn_client_get_commit_log_impl);
+ notify_func = new LibSvnClient.svn_wc_notify_func2_t (svn_wc_notify_func_t_impl);
+ Marshal.WriteIntPtr (ctx,
+ (int) Marshal.OffsetOf (typeof (LibSvnClient.svn_client_ctx_t), "NotifyFunc2"),
+ Marshal.GetFunctionPointerForDelegate (notify_func));
+ log_func = new LibSvnClient.svn_client_get_commit_log_t (svn_client_get_commit_log_impl);
+ Marshal.WriteIntPtr (ctx,
+ (int) Marshal.OffsetOf (typeof (LibSvnClient.svn_client_ctx_t), "LogMsgFunc"),
+ Marshal.GetFunctionPointerForDelegate (log_func));
// Load user and system configuration
- svn.config_get_config (ref ctxstruct.config, null, pool);
-
+ svn.config_get_config (ref config_hash, null, pool);
+ Marshal.WriteIntPtr (ctx,
+ (int) Marshal.OffsetOf (typeof (LibSvnClient.svn_client_ctx_t), "config"),
+ config_hash);
+
+ if (!pre_1_7) {
+ IntPtr scratch = newpool (IntPtr.Zero);
+ svn.wc_context_create (out wc_ctx, config_hash, pool, scratch);
+ Marshal.WriteIntPtr (ctx,
+ (int) Marshal.OffsetOf (typeof (LibSvnClient.svn_client_ctx_t), "wc_ctx"),
+ wc_ctx);
+ apr.pool_destroy (scratch);
+ }
+
IntPtr providers = apr.array_make (pool, 16, IntPtr.Size);
IntPtr item;
@@ -285,13 +296,13 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
item = apr.array_push (providers);
svn.client_get_ssl_client_cert_pw_prompt_provider (item, OnAuthSslClientCertPwPromptCallback, IntPtr.Zero, 2, pool);
-
+
// Create the authentication baton
-
- svn.auth_open (out auth_baton, providers, pool);
- ctxstruct.auth_baton = auth_baton;
-
- Marshal.StructureToPtr (ctxstruct, ctx, false);
+ svn.auth_open (out auth_baton, providers, pool);
+
+ Marshal.WriteIntPtr (ctx,
+ (int) Marshal.OffsetOf (typeof(LibSvnClient.svn_client_ctx_t), "auth_baton"),
+ auth_baton);
}
public void Dispose ()
@@ -358,7 +369,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
}
static LibSvnClient.svn_auth_ssl_server_trust_prompt_func_t OnAuthSslServerTrustPromptCallback = OnAuthSslServerTrustPrompt;
- static IntPtr OnAuthSslServerTrustPrompt (ref IntPtr cred, IntPtr baton, string realm, uint failures, ref LibSvnClient.svn_auth_ssl_server_cert_info_t cert_info, bool may_save, IntPtr pool)
+ static IntPtr OnAuthSslServerTrustPrompt (ref IntPtr cred, IntPtr baton, string realm, UInt32 failures, ref LibSvnClient.svn_auth_ssl_server_cert_info_t cert_info, bool may_save, IntPtr pool)
{
LibSvnClient.svn_auth_cred_ssl_server_trust_t data = new LibSvnClient.svn_auth_cred_ssl_server_trust_t ();
@@ -453,7 +464,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
pathorurl = NormalizePath (pathorurl, localpool);
CheckError (svn.client_ls (out hash, pathorurl, ref revision,
- recurse ? 1 : 0, ctx, localpool));
+ recurse, ctx, localpool));
IntPtr item = apr.hash_first (localpool, hash);
while (item != IntPtr.Zero) {
@@ -536,9 +547,9 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
strptr = Marshal.StringToHGlobalAnsi (pathorurl);
Marshal.WriteIntPtr (first, strptr);
- LogCollector collector = new LogCollector ((SubversionRepository)repo, ret);
+ LogCollector collector = new LogCollector ((SubversionRepository)repo, ret, ctx);
- CheckError (svn.client_log (array, ref revisionStart, ref revisionEnd, 1, 0,
+ CheckError (svn.client_log (array, ref revisionStart, ref revisionEnd, true, false,
collector.Func,
IntPtr.Zero, ctx, localpool));
} finally {
@@ -558,10 +569,18 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
LibSvnClient.Rev revisionStart = (LibSvnClient.Rev) revStart;
LibSvnClient.Rev revisionEnd = (LibSvnClient.Rev) revEnd;
-
- int numAnnotations = File.ReadAllLines (((SubversionRepository)repo).GetPathToBaseText(file)).Length;
+
+ MemoryStream data = new MemoryStream ();
+ int numAnnotations = 0;
+ Cat (file, SvnRevision.Base, data);
+
+ using (StreamReader reader = new StreamReader (data)) {
+ reader.BaseStream.Seek (0, SeekOrigin.Begin);
+ while (reader.ReadLine () != null)
+ numAnnotations++;
+ }
+
Annotation[] annotations = new Annotation [numAnnotations];
-
AnnotationCollector collector = new AnnotationCollector (annotations);
IntPtr localpool = newpool (pool);
@@ -580,18 +599,34 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
public override string GetTextAtRevision (string pathorurl, Revision revision)
{
+ return null;
+ }
+
+ public override string GetTextAtRevision (string pathorurl, Revision revision, string rootPath)
+ {
MemoryStream memstream = new MemoryStream ();
- Cat (pathorurl, (SvnRevision) revision, memstream);
+ try {
+ Cat (pathorurl, (SvnRevision) revision, memstream);
+ } catch (SubversionException e) {
+ // File got added/removed at some point.
+ // SVN_ERR_FS_NOT_FOUND
+ if (e.ErrorCode == 160013)
+ return "";
+ // We tried on a directory
+ // SVN_ERR_FS_NOT_FILE
+ if (e.ErrorCode == 160017)
+ return "";
+ throw;
+ }
var buffer = memstream.GetBuffer ();
try {
if (IsBinary (buffer, memstream.Length))
return null;
- return System.Text.Encoding.UTF8.GetString (buffer, 0, (int) memstream.Length);
+ return Encoding.UTF8.GetString (buffer, 0, (int) memstream.Length);
} catch {
+ return "";
}
-
- return System.Text.Encoding.ASCII.GetString (buffer, 0, (int) memstream.Length);
}
public void Cat (string pathorurl, SvnRevision rev, Stream stream)
@@ -608,8 +643,9 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
StreamCollector collector = new StreamCollector (stream);
IntPtr svnstream = svn.stream_create (IntPtr.Zero, localpool);
svn.stream_set_write (svnstream, collector.Func);
- LibSvnClient.Rev peg_revision = LibSvnClient.Rev.Blank;
- CheckError (svn.client_cat2 (svnstream, pathorurl, ref peg_revision, ref revision, ctx, localpool), 195007);
+ // Setting peg_revision to revision.
+ // Otherwise, it will use Head as peg and it will throw exceptions.
+ CheckError (svn.client_cat2 (svnstream, pathorurl, ref revision, ref revision, ctx, localpool), 195007);
} finally {
apr.pool_destroy (localpool);
TryEndOperation ();
@@ -630,10 +666,12 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
IntPtr localpool = newpool (pool);
try {
string pathorurl = NormalizePath (path, localpool);
- CheckError (svn.client_update (IntPtr.Zero, pathorurl, ref rev, recurse, ctx, localpool));
+ IntPtr result = Marshal.AllocHGlobal (IntPtr.Size);
+ CheckError (svn.client_update (result, pathorurl, ref rev, recurse, ctx, localpool));
+ Marshal.FreeHGlobal (result);
} finally {
foreach (string file in updateFileList)
- FileService.NotifyFileChanged (file);
+ FileService.NotifyFileChanged (file, true);
updateFileList = null;
apr.pool_destroy (localpool);
@@ -661,7 +699,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, pathorurl));
}
- CheckError (svn.client_revert (array, recurse ? 1 : 0, ctx, localpool));
+ CheckError (svn.client_revert (array, recurse, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
@@ -681,7 +719,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
try {
string pathorurl = NormalizePath (path, localpool);
- CheckError (svn.client_resolved (pathorurl, recurse ? 1 : 0, ctx, localpool));
+ CheckError (svn.client_resolved (pathorurl, recurse, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
@@ -701,7 +739,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
IntPtr localpool = newpool (pool);
try {
string pathorurl = NormalizePath (path, localpool);
- CheckError (svn.client_add3 (pathorurl, (recurse ? 1 : 0), 1, 0, ctx, localpool));
+ CheckError (svn.client_add3 (pathorurl, recurse, true, false, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
@@ -753,12 +791,11 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
}
-
+
IntPtr commit_info = IntPtr.Zero;
-
commitmessage = message;
- CheckError (svn.client_commit (ref commit_info, array, 0, ctx, localpool));
+ CheckError (svn.client_commit (ref commit_info, array, false, ctx, localpool));
unsafe {
if (commit_info != IntPtr.Zero) {
monitor.Log.WriteLine ();
@@ -825,7 +862,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
//}
IntPtr commit_info = IntPtr.Zero;
- CheckError (svn.client_delete (ref commit_info, array, (force ? 1 : 0), ctx, localpool));
+ CheckError (svn.client_delete (ref commit_info, array, force, ctx, localpool));
} finally {
commitmessage = null;
updatemonitor = null;
@@ -851,7 +888,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
string nsrcPath = NormalizePath (srcPath, localpool);
string ndestPath = NormalizePath (destPath, localpool);
CheckError (svn.client_move (ref commit_info, nsrcPath, ref revision,
- ndestPath, (force ? 1 : 0), ctx, localpool));
+ ndestPath, force, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
@@ -877,7 +914,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
lockFileList = new ArrayList ();
requiredLockState = LibSvnClient.NotifyLockState.Locked;
- CheckError (svn.client_lock (array, comment, stealLock ? 1 : 0, ctx, localpool));
+ CheckError (svn.client_lock (array, comment, stealLock, ctx, localpool));
if (paths.Length != lockFileList.Count)
throw new SubversionException ("Lock operation failed.");
} finally {
@@ -906,7 +943,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
lockFileList = new ArrayList ();
requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
- CheckError (svn.client_unlock (array, breakLock ? 1 : 0, ctx, localpool));
+ CheckError (svn.client_unlock (array, breakLock, ctx, localpool));
if (paths.Length != lockFileList.Count)
throw new SubversionException ("Lock operation failed.");
} finally {
@@ -941,7 +978,7 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
if (res1 == 0 && res2 == 0) {
string npath1 = NormalizePath (path1, localpool);
string npath2 = NormalizePath (path2, localpool);
- CheckError (svn.client_diff (options, npath1, ref revision1, npath2, ref revision2, (recursive ? 1 : 0), 0, 1, outfile, errfile, ctx, localpool));
+ CheckError (svn.client_diff (options, npath1, ref revision1, npath2, ref revision2, recursive, false, true, outfile, errfile, ctx, localpool));
return MonoDevelop.Projects.Text.TextFile.ReadFile (fout).Text;
} else {
throw new Exception ("Could not get diff information");
@@ -956,7 +993,6 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
} finally {
try {
// Cleanup
- apr.pool_destroy (localpool);
if (outfile != IntPtr.Zero)
apr.file_close (outfile);
if (errfile != IntPtr.Zero)
@@ -965,9 +1001,11 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
FileService.DeleteFile (ferr);
if (fout != null)
FileService.DeleteFile (fout);
-
+ } catch {
+ } finally {
+ apr.pool_destroy (localpool);
TryEndOperation ();
- } catch {}
+ }
}
}
@@ -1004,6 +1042,103 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
TryEndOperation ();
}
}
+
+ public override void Ignore (FilePath[] paths)
+ {
+ TryStartOperation ();
+
+ IntPtr localpool = newpool (pool);
+ IntPtr hash_item, hash_name, hash_val;
+ int length;
+ IntPtr result;
+ IntPtr props_ptr = IntPtr.Zero;
+ StringBuilder props = new StringBuilder ();
+ string new_path;
+ LibSvnClient.svn_string_t new_props;
+ LibSvnClient.Rev rev = LibSvnClient.Rev.Working;
+ try {
+ foreach (var path in paths) {
+ new_path = NormalizePath (path, localpool);
+ CheckError (svn.client_propget (out result, "svn:ignore", Path.GetDirectoryName (new_path),
+ ref rev, false, ctx, localpool));
+ hash_item = apr.hash_first (localpool, result);
+ while (hash_item != IntPtr.Zero) {
+ apr.hash_this (hash_item, out hash_name, out length, out hash_val);
+ new_props = (LibSvnClient.svn_string_t) Marshal.PtrToStructure (hash_val, typeof (LibSvnClient.svn_string_t));
+ props.Append (Marshal.PtrToStringAnsi (new_props.data));
+ hash_item = apr.hash_next (hash_item);
+ }
+ props.AppendLine (Path.GetFileName (new_path));
+ new_props = new LibSvnClient.svn_string_t ();
+ new_props.data = Marshal.StringToHGlobalAnsi (props.ToString ());
+ new_props.len = props.Length;
+ props_ptr = apr.pcalloc (localpool, new_props);
+ CheckError (svn.client_propset ("svn:ignore", props_ptr, Path.GetDirectoryName (new_path), false, localpool));
+ }
+ } finally {
+ apr.pool_destroy (localpool);
+ TryEndOperation ();
+ }
+ }
+
+ public override void Unignore (FilePath[] paths)
+ {
+ TryStartOperation ();
+
+ IntPtr localpool = newpool (pool);
+ IntPtr hash_item, hash_name, hash_val;
+ int length;
+ IntPtr result;
+ IntPtr props_ptr = IntPtr.Zero;
+ StringBuilder props = new StringBuilder ();
+ string new_path;
+ LibSvnClient.svn_string_t new_props;
+ LibSvnClient.Rev rev = LibSvnClient.Rev.Working;
+ int index;
+ string props_str;
+ try {
+ foreach (var path in paths) {
+ new_path = NormalizePath (path, localpool);
+ CheckError (svn.client_propget (out result, "svn:ignore", Path.GetDirectoryName (new_path),
+ ref rev, false, ctx, localpool));
+ hash_item = apr.hash_first (localpool, result);
+ while (hash_item != IntPtr.Zero) {
+ apr.hash_this (hash_item, out hash_name, out length, out hash_val);
+ new_props = (LibSvnClient.svn_string_t) Marshal.PtrToStructure (hash_val, typeof (LibSvnClient.svn_string_t));
+ props.Append (Marshal.PtrToStringAnsi (new_props.data));
+ hash_item = apr.hash_next (hash_item);
+ }
+ props_str = props.ToString ();
+ index = props_str.IndexOf (Path.GetFileName (new_path) + Environment.NewLine);
+ props_str = (index < 0) ? props_str : props_str.Remove (index, Path.GetFileName(new_path).Length+1);
+
+ new_props = new LibSvnClient.svn_string_t ();
+ new_props.data = Marshal.StringToHGlobalAnsi (props_str);
+ new_props.len = props_str.Length;
+ props_ptr = apr.pcalloc (localpool, new_props);
+ CheckError (svn.client_propset ("svn:ignore", props_ptr, Path.GetDirectoryName (new_path), false, localpool));
+ }
+ } finally {
+ apr.pool_destroy (localpool);
+ TryEndOperation ();
+ }
+ }
+
+ public override string GetTextBase (string sourcefile)
+ {
+ MemoryStream data = new MemoryStream ();
+ try {
+ Cat (sourcefile, SvnRevision.Base, data);
+ return TextFile.ReadFile (sourcefile, data).Text;
+ // This outputs the contents of the base revision
+ // of a file to a stream.
+ } catch (SubversionException e) {
+ // This occurs when we don't have a base file for
+ // the target file. We have no way of knowing if
+ // a file has a base version therefore this will do.
+ return String.Empty;
+ }
+ }
IntPtr svn_client_get_commit_log_impl (ref IntPtr log_msg, ref IntPtr tmp_file,
IntPtr commit_items, IntPtr baton, IntPtr pool)
@@ -1016,9 +1151,6 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
void TryStartOperation ()
{
lock (sync) {
- Console.WriteLine ("*************************************");
- Console.WriteLine (Environment.StackTrace);
- Console.WriteLine ("*************************************");
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
@@ -1309,14 +1441,16 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
List<SvnRevision> logs;
SubversionRepository repo;
+ IntPtr ctx;
public LibSvnClient.svn_log_message_receiver_t Func {
get; private set;
}
- public LogCollector (SubversionRepository repo, List<SvnRevision> logs) {
+ public LogCollector (SubversionRepository repo, List<SvnRevision> logs, IntPtr ctx) {
this.repo = repo;
this.logs = logs;
+ this.ctx = ctx;
Func = CollectorFunc;
}
@@ -1353,7 +1487,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix
}
IntPtr result = IntPtr.Zero;
- SvnClient.CheckError (svn.client_root_url_from_path (ref result, repo.RootPath, IntPtr.Zero, pool));
+
+ SvnClient.CheckError (svn.client_root_url_from_path (ref result, repo.RootPath, ctx, pool));
if (result == IntPtr.Zero) // Should never happen
items.Add (new RevisionPath (name, ac, ""));
else
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.MonoDevelop.VersionControl.Subversion.Unix.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.MonoDevelop.VersionControl.Subversion.Unix.addin.xml
new file mode 100644
index 0000000..b40ac76
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.MonoDevelop.VersionControl.Subversion.Unix.addin.xml
@@ -0,0 +1,23 @@
+<Addin id = "VersionControl.Subversion.Unix"
+ namespace = "MonoDevelop"
+ name = "Subversion support"
+ author = "Joshua Tauberer, Lluis Sanchez"
+ copyright = "LGPL"
+ url = "http://taubz.for.net/code/diff"
+ description = "Subversion support for Linux and MacOSX"
+ category = "Version Control"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
+ <Addin id="VersionControl.Subversion" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/VersionControl/VersionControlSystems">
+ <Condition id="Platform" value="!windows">
+ <Class class = "MonoDevelop.VersionControl.Subversion.Unix.SvnClient" />
+ </Condition>
+ </Extension>
+</Addin>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..cd2217d
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.MonoDevelop.VersionControl.Subversion.Unix.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.Unix.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.Unix.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.Unix.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/obj/Debug/MonoDevelop.VersionControl.Subversion.Unix.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile.in
index 05bed43..1c17ab1 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile.in
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -252,6 +251,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.addin.xml
index e5531f1..8368784 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.addin.xml
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.addin.xml
@@ -7,12 +7,12 @@
description = "Subversion core engine"
category = "Version Control"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="VersionControl" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/Ide/Commands/VersionControl">
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.csproj b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.csproj
index 922d13b..23cc404 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.csproj
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion.csproj
@@ -59,31 +59,6 @@
<Name>ICSharpCode.NRefactory</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
- <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
- <Name>ICSharpCode.NRefactory.CSharp</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor.csproj">
- <Project>{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}</Project>
- <Name>MonoDevelop.SourceEditor</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
- <Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
- <Name>MonoDevelop.Debugger</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj">
- <Project>{2C24D515-4A2C-445C-8419-C09231913CFA}</Project>
- <Name>MonoDevelop.DesignerSupport</Name>
- <Private>False</Private>
- </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Posix" />
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
index f28edba..d24705e 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
@@ -13,8 +13,6 @@ namespace MonoDevelop.VersionControl.Subversion
{
public class SubversionRepository: UrlBasedRepository
{
- FilePath rootPath;
-
public SubversionRepository ()
{
Url = "svn://";
@@ -23,13 +21,9 @@ namespace MonoDevelop.VersionControl.Subversion
public SubversionRepository (SubversionVersionControl vcs, string url, FilePath rootPath): base (vcs)
{
Url = url;
- this.rootPath = !rootPath.IsNullOrEmpty ? rootPath.CanonicalPath : null;
- }
-
- public FilePath RootPath {
- get { return rootPath; }
+ RootPath = !rootPath.IsNullOrEmpty ? rootPath.CanonicalPath : null;
}
-
+
public override string[] SupportedProtocols {
get {
return new string[] {"svn", "svn+ssh", "http", "https", "file"};
@@ -56,9 +50,8 @@ namespace MonoDevelop.VersionControl.Subversion
}
}
- SubversionVersionControl VersionControlSystem {
- get { return (SubversionVersionControl) base.VersionControlSystem;
- }
+ new SubversionVersionControl VersionControlSystem {
+ get { return (SubversionVersionControl)base.VersionControlSystem; }
}
SubversionBackend backend;
@@ -70,27 +63,19 @@ namespace MonoDevelop.VersionControl.Subversion
}
}
- static bool IsVersioned (FilePath sourcefile)
+ bool IsVersioned (FilePath sourcefile)
{
- return SubversionVersionControl.IsVersioned (sourcefile);
+ return GetVersionInfo (sourcefile, VersionInfoQueryFlags.IgnoreCache).IsVersioned;
}
public override string GetBaseText (FilePath sourcefile)
{
- // The base file will not exist if the file has just been
- // added to svn and not committed
- var baseFile = Svn.GetPathToBaseText (sourcefile);
- return File.Exists (baseFile) ? File.ReadAllText (baseFile) : "";
- }
-
- public string GetPathToBaseText (FilePath sourcefile)
- {
- return Svn.GetPathToBaseText (sourcefile);
+ return Svn.GetTextBase (sourcefile);
}
protected override string OnGetTextAtRevision (FilePath repositoryPath, Revision revision)
{
- return Svn.GetTextAtRevision (repositoryPath, revision);
+ return Svn.GetTextAtRevision (repositoryPath, revision, RootPath);
}
protected override Revision[] OnGetHistory (FilePath sourcefile, Revision since)
@@ -162,7 +147,7 @@ namespace MonoDevelop.VersionControl.Subversion
CreateDirectory (paths, message, monitor);
Svn.Checkout (this.Url + "/" + serverPath, localPath, null, true, monitor);
- rootPath = localPath;
+ RootPath = localPath;
Set<FilePath> dirs = new Set<FilePath> ();
PublishDir (dirs, localPath, false, monitor);
@@ -244,7 +229,7 @@ namespace MonoDevelop.VersionControl.Subversion
{
foreach (FilePath path in paths) {
if (IsVersioned (path) && File.Exists (path) && !Directory.Exists (path)) {
- if (rootPath.IsNull)
+ if (RootPath.IsNull)
throw new UserException (GettextCatalog.GetString ("Project publishing failed. There is a stale .svn folder in the path '{0}'", path.ParentDirectory));
VersionInfo srcInfo = GetVersionInfo (path, VersionInfoQueryFlags.IgnoreCache);
if (srcInfo.HasLocalChange (VersionStatus.ScheduledDelete)) {
@@ -260,25 +245,27 @@ namespace MonoDevelop.VersionControl.Subversion
// Copy the file over the old one and clean up
File.Copy (tmp, path, true);
File.Delete (tmp);
+ continue;
}
}
else {
+ VersionInfo srcInfo = GetVersionInfo (path, VersionInfoQueryFlags.IgnoreCache);
if (!IsVersioned (path.ParentDirectory)) {
// The file/folder belongs to an unversioned folder. We can add it by versioning the parent
// folders up to the root of the repository
- if (!path.IsChildPathOf (rootPath))
+ if (!path.IsChildPathOf (RootPath))
throw new InvalidOperationException ("File outside the repository directory");
List<FilePath> dirChain = new List<FilePath> ();
FilePath parentDir = path.CanonicalPath;
do {
parentDir = parentDir.ParentDirectory;
- if (Directory.Exists (SubversionVersionControl.GetDirectoryDotSvn (parentDir)))
+ if (IsVersioned (parentDir))
break;
dirChain.Add (parentDir);
}
- while (parentDir != rootPath);
+ while (parentDir != RootPath);
// Found all parent unversioned dirs. Versin them now.
dirChain.Reverse ();
@@ -289,8 +276,8 @@ namespace MonoDevelop.VersionControl.Subversion
}
VersionControlService.NotifyFileStatusChanged (args);
}
- Svn.Add (path, recurse, monitor);
}
+ Svn.Add (path, recurse, monitor);
}
}
@@ -395,12 +382,12 @@ namespace MonoDevelop.VersionControl.Subversion
string df = Path.GetDirectoryName (dst);
copiedFolders [df] = df;
}
-
+
// Delete all old files which have not been replaced
ArrayList foldersToDelete = new ArrayList ();
foreach (string oldFile in oldFiles) {
if (!copiedFiles.Contains (oldFile)) {
- DeleteFile (oldFile, true, monitor);
+ DeleteFile (oldFile, true, monitor, false);
string fd = Path.GetDirectoryName (oldFile);
if (!copiedFolders.Contains (fd) && !foldersToDelete.Contains (fd))
foldersToDelete.Add (fd);
@@ -413,7 +400,7 @@ namespace MonoDevelop.VersionControl.Subversion
}
// Delete the source directory
- DeleteDirectory (srcPath, true, monitor);
+ DeleteDirectory (srcPath, true, monitor, false);
}
else {
if (Directory.Exists (destPath))
@@ -463,30 +450,68 @@ namespace MonoDevelop.VersionControl.Subversion
collection.Add(f);
}
-
protected override void OnDeleteFiles (FilePath[] paths, bool force, IProgressMonitor monitor)
{
+ }
+
+ protected override void OnDeleteFiles (FilePath[] paths, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
foreach (string path in paths) {
- if (IsVersioned (path))
- Svn.Delete (path, force, monitor);
- else {
- VersionInfo srcInfo = GetVersionInfo (path, VersionInfoQueryFlags.IgnoreCache);
- if (srcInfo != null && srcInfo.HasLocalChange (VersionStatus.ScheduledAdd)) {
- // Revert the add command
- Revert (path, false, monitor);
+ if (IsVersioned (path)) {
+ string newPath = String.Empty;
+ if (keepLocal) {
+ newPath = Path.GetTempFileName ();
+ File.Copy (path, newPath, true);
}
- File.Delete (path);
+ try {
+ Svn.Delete (path, force, monitor);
+ } finally {
+ if (keepLocal)
+ File.Move (newPath, path);
+ }
+ } else {
+ if (keepLocal) {
+ VersionInfo srcInfo = GetVersionInfo (path, VersionInfoQueryFlags.IgnoreCache);
+ if (srcInfo != null && srcInfo.HasLocalChange (VersionStatus.ScheduledAdd)) {
+ // Revert the add command
+ Revert (path, false, monitor);
+ }
+ } else
+ File.Delete (path);
}
}
}
protected override void OnDeleteDirectories (FilePath[] paths, bool force, IProgressMonitor monitor)
{
+ }
+
+ protected override void OnDeleteDirectories (FilePath[] paths, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
foreach (string path in paths) {
- if (IsVersioned (path))
- Svn.Delete (path, force, monitor);
- else
- Directory.Delete (path, true);
+ if (IsVersioned (path)) {
+ string newPath = String.Empty;
+ if (keepLocal) {
+ newPath = FileService.CreateTempDirectory ();
+ FileService.CopyDirectory (path, newPath);
+ }
+ try {
+ Svn.Delete (path, force, monitor);
+ } finally {
+ if (keepLocal)
+ FileService.MoveDirectory (newPath, path);
+ }
+ } else {
+ if (keepLocal) {
+ foreach (var info in GetDirectoryVersionInfo (path, false, true)) {
+ if (info != null && info.HasLocalChange (VersionStatus.ScheduledAdd)) {
+ // Revert the add command
+ Revert (path, false, monitor);
+ }
+ }
+ } else
+ Directory.Delete (path, true);
+ }
}
}
@@ -525,14 +550,14 @@ namespace MonoDevelop.VersionControl.Subversion
{
List<Annotation> annotations = new List<Annotation> (Svn.GetAnnotations (this, localPath, SvnRevision.First, SvnRevision.Base));
Annotation nextRev = new Annotation (GettextCatalog.GetString ("working copy"), "", DateTime.MinValue);
- var baseDocument = new Mono.TextEditor.TextDocument (File.ReadAllText (GetPathToBaseText (localPath)));
+ var baseDocument = new Mono.TextEditor.TextDocument (GetBaseText (localPath));
var workingDocument = new Mono.TextEditor.TextDocument (File.ReadAllText (localPath));
// "SubversionException: blame of the WORKING revision is not supported"
foreach (var hunk in baseDocument.Diff (workingDocument)) {
- annotations.RemoveRange (hunk.InsertStart, hunk.Inserted);
+ annotations.RemoveRange (hunk.RemoveStart, hunk.Removed);
for (int i = 0; i < hunk.Inserted; ++i) {
- annotations.Insert (hunk.InsertStart, nextRev);
+ annotations.Insert (hunk.InsertStart - 1, nextRev);
}
}
@@ -561,5 +586,15 @@ namespace MonoDevelop.VersionControl.Subversion
return patch.ToString ();
}
+
+ protected override void OnIgnore (FilePath[] paths)
+ {
+ Svn.Ignore (paths);
+ }
+
+ protected override void OnUnignore (FilePath[] paths)
+ {
+ Svn.Unignore (paths);
+ }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionVersionControl.cs b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionVersionControl.cs
index 946d9ec..2cc4c2c 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionVersionControl.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionVersionControl.cs
@@ -1,9 +1,7 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.IO;
-using System.Runtime.InteropServices;
using MonoDevelop.Core;
using MonoDevelop.VersionControl.Subversion.Gui;
@@ -11,19 +9,15 @@ namespace MonoDevelop.VersionControl.Subversion
{
public abstract class SubversionVersionControl : VersionControlSystem
{
- internal static string GetTextBase(string sourcefile)
+ internal static string GetDirectoryDotSvn (FilePath path)
{
- return Path.Combine (Path.GetDirectoryName(sourcefile), ".svn", "text-base", Path.GetFileName(sourcefile) + ".svn-base");
- }
-
- internal static string GetDirectoryDotSvn (string sourcepath)
- {
- return Path.Combine(sourcepath, ".svn");
- }
+ if (path.IsEmpty || path.ParentDirectory.IsEmpty || path.IsNull || path.ParentDirectory.IsNull)
+ return String.Empty;
- internal static bool IsVersioned (FilePath sourcefile)
- {
- return File.Exists (GetTextBase (sourcefile)) || Directory.Exists (GetDirectoryDotSvn (sourcefile));
+ if (Directory.Exists (path.Combine (".svn")))
+ return path;
+
+ return GetDirectoryDotSvn (path.ParentDirectory);
}
public override string Name
@@ -37,16 +31,11 @@ namespace MonoDevelop.VersionControl.Subversion
public override Repository GetRepositoryReference (FilePath path, string id)
{
- try {
- if (!IsVersioned (path))
- return null;
- string url = GetPathUrl (path);
- return new SubversionRepository (this, url, path);
- } catch (Exception ex) {
- // No SVN
- LoggingService.LogError (ex.ToString ());
- return null;
- }
+ string svnPath = GetDirectoryDotSvn (path);
+ if (svnPath != String.Empty)
+ return new SubversionRepository (this, String.Empty, svnPath);
+
+ return null;
}
protected override Repository OnCreateRepositoryInstance ()
@@ -62,20 +51,13 @@ namespace MonoDevelop.VersionControl.Subversion
public abstract class SubversionBackend
{
- string GetTextBase (string sourcefile)
- {
- return SubversionVersionControl.GetTextBase (sourcefile);
- }
-
- string GetDirectoryDotSvn (string sourcepath)
+ public abstract string GetTextBase (string sourcefile);
+
+ string GetDirectoryDotSvn (FilePath path)
{
- return SubversionVersionControl.GetDirectoryDotSvn (sourcepath);
+ return SubversionVersionControl.GetDirectoryDotSvn (path);
}
-
- public string GetPathToBaseText (FilePath sourcefile) {
- return GetTextBase (sourcefile);
- }
-
+
public Revision[] GetHistory (Repository repo, FilePath sourcefile, Revision since)
{
List<Revision> revs = new List<Revision>();
@@ -105,26 +87,31 @@ namespace MonoDevelop.VersionControl.Subversion
/// <param name='revision'>
/// Revision.
/// </param>
+ [Obsolete ("Use the overload with rootPath parameter")]
public abstract string GetTextAtRevision (string repositoryPath, Revision revision);
+
+ public virtual string GetTextAtRevision (string repositoryPath, Revision revision, string rootPath)
+ {
+ return GetTextAtRevision (repositoryPath, revision);
+ }
internal protected virtual VersionControlOperation GetSupportedOperations (Repository repo, VersionInfo vinfo, VersionControlOperation defaultValue)
{
if (vinfo.IsVersioned && File.Exists (vinfo.LocalPath) && !Directory.Exists (vinfo.LocalPath) && vinfo.HasLocalChange (VersionStatus.ScheduledDelete))
defaultValue |= VersionControlOperation.Add;
return defaultValue;
- }
-
+ }
+
public VersionInfo GetVersionInfo (Repository repo, FilePath localPath, bool getRemoteStatus)
{
// Check for directory before checking for file, since directory links may appear as files
- if (Directory.Exists (GetDirectoryDotSvn (localPath)) || Directory.Exists (localPath))
+ if (Directory.Exists (localPath))
return GetDirStatus (repo, localPath, getRemoteStatus);
- else if (File.Exists (GetTextBase(localPath)) || File.Exists (localPath))
+ if (File.Exists (localPath))
return GetFileStatus (repo, localPath, getRemoteStatus);
- else
- return VersionInfo.CreateUnversioned (localPath, false);
- }
-
+ return VersionInfo.CreateUnversioned (localPath, false);
+ }
+
private VersionInfo GetFileStatus (Repository repo, FilePath sourcefile, bool getRemoteStatus)
{
SubversionRepository srepo = (SubversionRepository) repo;
@@ -199,16 +186,20 @@ namespace MonoDevelop.VersionControl.Subversion
public abstract void RevertRevision (FilePath path, Revision revision, IProgressMonitor monitor);
public abstract void RevertToRevision (FilePath path, Revision revision, IProgressMonitor monitor);
-
- public abstract void Add (FilePath path, bool recurse, IProgressMonitor monitor);
-
- public abstract void Delete (FilePath path, bool force, IProgressMonitor monitor);
-
+
+ public abstract void Add (FilePath path, bool recurse, IProgressMonitor monitor);
+
+ public abstract void Delete (FilePath path, bool force, IProgressMonitor monitor);
+
+ public abstract void Ignore (FilePath[] paths);
+
+ public abstract void Unignore (FilePath[] paths);
+
public IEnumerable<DirectoryEntry> List (FilePath path, bool recurse)
{
return List (path, recurse, SvnRevision.Head);
- }
-
+ }
+
public IEnumerable<DirectoryEntry> ListUrl (string url, bool recurse)
{
return ListUrl (url, recurse, SvnRevision.Head);
@@ -280,7 +271,21 @@ namespace MonoDevelop.VersionControl.Subversion
}
- public class SubversionException : ApplicationException {
- public SubversionException(string message) : base(message) { }
+ public class SubversionException : ApplicationException
+ {
+ public int ErrorCode {
+ get;
+ private set;
+ }
+
+ public SubversionException (string message, int errorCode) : base (message)
+ {
+ ErrorCode = errorCode;
+ }
+
+ public SubversionException (string message) : base (message)
+ {
+ ErrorCode = 0;
+ }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.MonoDevelop.VersionControl.Subversion.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.MonoDevelop.VersionControl.Subversion.addin.xml
new file mode 100644
index 0000000..8368784
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.MonoDevelop.VersionControl.Subversion.addin.xml
@@ -0,0 +1,37 @@
+<Addin id = "VersionControl.Subversion"
+ namespace = "MonoDevelop"
+ name = "Subversion core engine"
+ author = "Joshua Tauberer"
+ copyright = "LGPL"
+ url = "http://taubz.for.net/code/diff"
+ description = "Subversion core engine"
+ category = "Version Control"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="VersionControl" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/Ide/Commands/VersionControl">
+ <Command id = "MonoDevelop.VersionControl.Subversion.Commands.Resolve"
+ _label = "Resolve"
+ description = "Resolve conflicts on working copy files or directories."/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder class = "MonoDevelop.VersionControl.Subversion.SubversionNodeExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad/VersionControl">
+ <Condition id="ItemType" value="IFileItem|IFolderItem">
+ <CommandItem id = "MonoDevelop.VersionControl.Subversion.Commands.Resolve" insertafter="MonoDevelop.VersionControl.Commands.Revert" />
+ </Condition>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/VersionControl/StatusViewCommands">
+ <CommandItem id = "MonoDevelop.VersionControl.Subversion.Commands.Resolve" type="MonoDevelop.VersionControl.Subversion.SubversionCommandHandler"/>
+ </Extension>
+</Addin>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..84cc5aa
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,7 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.objects.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.MonoDevelop.VersionControl.Subversion.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.gui.stetic b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.gui.stetic
new file mode 100644
index 0000000..4e1887d
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.gui.stetic
@@ -0,0 +1,1036 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.dll" />
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.Subversion.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Subversion.Gui.UserPasswordDialog" design-size="433 229">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Subversion</property>
+ <property name="Modal">True</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>User credentials are required to access the Subversion repository.</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRealm">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Realm</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryPwd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="Visibility">False</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryUser">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">User:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelPwd">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Password:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSavePwd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Remember password</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.VersionControl.Subversion.UserPasswordDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button7">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Subversion.Gui.SslServerTrustDialog" design-size="508 415">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Repository Certified by an Unknown Authority</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Image" id="image1">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-warning Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Unable to verify the identity of host as a trusted site.</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelReason">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp"><b>Reason</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">6</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Host name</b>:</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Issued by:</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Issued on:</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Expires on:</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Fingerprint:</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Auth. Realm:</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelFprint">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label14</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelFrom">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label12</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelHost">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label10</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelIssuer">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label11</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRealm">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label9</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelUntil">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label13</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label15">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Do you want to accept the certificate and connect to the repository?</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioAccept">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Accept this certificate permanently</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioAcceptSession">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Accept this certificate temporarily for this session</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioNotAccept">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Do not accept this certificate and do not connect to this repository</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">8</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.VersionControl.Subversion.SslServerTrustDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button98">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button104">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Subversion.Gui.ClientCertificateDialog" design-size="492 213">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Client Certificate Required</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>A client certificate is needed to connect to the repository</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRealm">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Realm</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Please provide a path to the required certificate:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileentry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Remember certificate location</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.VersionControl.Subversion.ClientCertificateDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button34">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button24">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Subversion.Gui.ClientCertificatePasswordDialog" design-size="414 217">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Password for client certificate</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>A client certificate is needed to connect to the repository</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRealm">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Realm</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Please provide the passphrase required to access to the certificate:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Password:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryPwd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="Visibility">False</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Remember password</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.VersionControl.Subversion.ClientCertificatePasswordDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button23">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button28">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.objects.xml b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.objects.xml
new file mode 100644
index 0000000..2c33b19
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/obj/Debug/MonoDevelop.VersionControl.Subversion.gtk-gui.objects.xml
@@ -0,0 +1,2 @@
+<objects attr-sync="on">
+</objects>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/Makefile.in b/src/addins/VersionControl/MonoDevelop.VersionControl/Makefile.in
index 2948195..db31141 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/Makefile.in
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs
index 38616e1..7439951 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Dialogs/CommitDialog.cs
@@ -75,17 +75,22 @@ namespace MonoDevelop.VersionControl.Dialogs
foreach (ChangeSetItem info in changeSet.Items) {
Gdk.Pixbuf statusicon = VersionControlService.LoadIconForStatus (info.Status);
string lstatus = VersionControlService.GetStatusLabel (info.Status);
-
- string localpath = (!info.LocalPath.IsChildPathOf (changeSet.BaseLocalPath)?
- ".":
- (string) info.LocalPath.ToRelative (changeSet.BaseLocalPath));
+ string localpath;
+
+ if (info.IsDirectory)
+ localpath = (!info.LocalPath.IsChildPathOf (changeSet.BaseLocalPath)?
+ ".":
+ (string) info.LocalPath.ToRelative (changeSet.BaseLocalPath));
+ else
+ localpath = System.IO.Path.GetFileName((string) info.LocalPath);
+
if (localpath.Length > 0 && localpath[0] == System.IO.Path.DirectorySeparatorChar) localpath = localpath.Substring(1);
if (localpath == "") { localpath = "."; } // not sure if this happens
store.AppendValues (statusicon, lstatus, localpath, true, info);
selected.Add (info.LocalPath);
}
-
+
if (string.IsNullOrEmpty (changeSet.GlobalComment)) {
AuthorInformation aInfo;
CommitMessageFormat fmt = VersionControlService.GetCommitMessageFormat (changeSet, out aInfo);
@@ -96,11 +101,12 @@ namespace MonoDevelop.VersionControl.Dialogs
textview.Buffer.Changed += OnTextChanged;
- // Focus the text view and move the insert point to the begining. Makes it easier to insert
+ // Focus the text view and move the insert point to the beginning. Makes it easier to insert
// a comment header.
textview.Buffer.MoveMark (textview.Buffer.InsertMark, textview.Buffer.StartIter);
textview.Buffer.MoveMark (textview.Buffer.SelectionBound, textview.Buffer.StartIter);
textview.GrabFocus ();
+ textview.Buffer.MarkSet += OnMarkSet;
}
void HandleAllowCommitChanged (object sender, EventArgs e)
@@ -121,6 +127,46 @@ namespace MonoDevelop.VersionControl.Dialogs
protected void OnButtonCommitClicked (object sender, System.EventArgs e)
{
+ // In case we have local unsaved files with changes, throw a dialog for the user.
+ System.Collections.Generic.List<Document> docList = new System.Collections.Generic.List<Document> ();
+ foreach (var item in IdeApp.Workbench.Documents) {
+ if (!item.IsDirty || !selected.Contains (item.FileName))
+ continue;
+ docList.Add (item);
+ }
+
+ if (docList.Count != 0) {
+ AlertButton response = MessageService.GenericAlert (
+ MonoDevelop.Ide.Gui.Stock.Question,
+ GettextCatalog.GetString ("You are trying to commit files which have unsaved changes."),
+ GettextCatalog.GetString ("Do you want to save the changes before committing?"),
+ new AlertButton[] {
+ AlertButton.Cancel,
+ new AlertButton ("Don't Save"),
+ AlertButton.Save
+ }
+ );
+
+ if (response == AlertButton.Cancel)
+ return;
+
+ if (response == AlertButton.Save) {
+ // Go through all the items and save them.
+ foreach (var item in docList)
+ item.Save ();
+
+ // Check if save failed on any item and abort.
+ foreach (var item in docList)
+ if (item.IsDirty) {
+ MessageService.ShowMessage (GettextCatalog.GetString (
+ "Some files could not be saved. Commit operation aborted"));
+ return;
+ }
+ }
+
+ docList.Clear ();
+ }
+
// Update the change set
ArrayList todel = new ArrayList ();
foreach (ChangeSetItem it in changeSet.Items) {
@@ -158,10 +204,26 @@ namespace MonoDevelop.VersionControl.Dialogs
}
Respond (Gtk.ResponseType.Ok);
}
+
+ void UpdatePositionLabel (TextIter iter)
+ {
+ int row = iter.Line + 1;
+ int col = iter.LineOffset + 1;
+ label3.Text = String.Format ("{0}/{1}", row, col);
+ }
+
+ void OnMarkSet (object o, MarkSetArgs e)
+ {
+ if (e.Mark != textview.Buffer.InsertMark)
+ return;
+
+ UpdatePositionLabel (e.Location);
+ }
void OnTextChanged (object s, EventArgs args)
{
changeSet.GlobalComment = Message;
+ UpdatePositionLabel (textview.Buffer.GetIterAtOffset (textview.Buffer.CursorPosition));
}
public void EndCommit (bool success)
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameWidget.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameWidget.cs
index 5ec816b..98c148c 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameWidget.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameWidget.cs
@@ -101,15 +101,27 @@ namespace MonoDevelop.VersionControl.Views
this.info = info;
var sourceEditor = info.Document.GetContent<MonoDevelop.SourceEditor.SourceEditorView> ();
- vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
+ vAdjustment = new Adjustment (
+ sourceEditor.TextEditor.VAdjustment.Value,
+ sourceEditor.TextEditor.VAdjustment.Lower,
+ sourceEditor.TextEditor.VAdjustment.Upper,
+ sourceEditor.TextEditor.VAdjustment.StepIncrement,
+ sourceEditor.TextEditor.VAdjustment.PageIncrement,
+ sourceEditor.TextEditor.VAdjustment.PageSize);
vAdjustment.Changed += HandleAdjustmentChanged;
vScrollBar = new VScrollbar (vAdjustment);
AddChild (vScrollBar);
- hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
+ hAdjustment = new Adjustment (
+ sourceEditor.TextEditor.HAdjustment.Value,
+ sourceEditor.TextEditor.HAdjustment.Lower,
+ sourceEditor.TextEditor.HAdjustment.Upper,
+ sourceEditor.TextEditor.HAdjustment.StepIncrement,
+ sourceEditor.TextEditor.HAdjustment.PageIncrement,
+ sourceEditor.TextEditor.HAdjustment.PageSize);
hAdjustment.Changed += HandleAdjustmentChanged;
-
+
hScrollBar = new HScrollbar (hAdjustment);
AddChild (hScrollBar);
@@ -177,7 +189,7 @@ namespace MonoDevelop.VersionControl.Views
children.ForEach (child => callback (child.Child));
}
- public void AddChild (Gtk.Widget child)
+ void AddChild (Gtk.Widget child)
{
child.Parent = this;
children.Add (new ContainerChild (this, child));
@@ -205,8 +217,14 @@ namespace MonoDevelop.VersionControl.Views
protected override void OnDestroyed ()
{
base.OnDestroyed ();
- children.ForEach (child => child.Child.Destroy ());
- children.Clear ();
+ hScrollBar.Destroy ();
+ hAdjustment.Destroy ();
+
+ vScrollBar.Destroy ();
+ vAdjustment.Destroy ();
+
+ editor.Destroy ();
+ overview.Destroy ();
}
protected override void OnSizeAllocated (Rectangle allocation)
@@ -358,6 +376,9 @@ namespace MonoDevelop.VersionControl.Views
Pango.Layout layout;
double dragPosition = -1;
+
+ TextDocument document;
+
public BlameRenderer (BlameWidget widget)
{
this.widget = widget;
@@ -365,8 +386,9 @@ namespace MonoDevelop.VersionControl.Views
annotations = new List<Annotation> ();
UpdateAnnotations (null, null);
// widget.Document.Saved += UpdateAnnotations;
- widget.Editor.Document.TextReplacing += EditorDocumentTextReplacing;
- widget.Editor.Document.LineChanged += EditorDocumentLineChanged;
+ document = widget.Editor.Document;
+ document.TextReplacing += EditorDocumentTextReplacing;
+ document.LineChanged += EditorDocumentLineChanged;
widget.vScrollBar.ValueChanged += delegate {
QueueDraw ();
};
@@ -388,8 +410,11 @@ namespace MonoDevelop.VersionControl.Views
{
base.OnDestroyed ();
// widget.Document.Saved -= UpdateAnnotations;
- widget.Editor.Document.TextReplacing -= EditorDocumentTextReplacing;
- widget.Editor.Document.LineChanged -= EditorDocumentLineChanged;
+ if (document != null) {
+ document.TextReplacing -= EditorDocumentTextReplacing;
+ document.LineChanged -= EditorDocumentLineChanged;
+ document = null;
+ }
if (layout != null) {
layout.Dispose ();
layout = null;
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffWidget.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffWidget.cs
index d4bc2aa..c51f6ef 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffWidget.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffWidget.cs
@@ -129,7 +129,7 @@ namespace MonoDevelop.VersionControl.Views
notebook1.Page = 1;
UpdatePatchView ();
} else {
- buttonDiff.Label = GettextCatalog.GetString ("_Patch");
+ buttonDiff.Label = GettextCatalog.GetString ("Unified Diff");
notebook1.Page = 0;
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
index 501073f..5f4c461 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs
@@ -435,8 +435,6 @@ namespace MonoDevelop.VersionControl.Views
protected override void OnDestroyed ()
{
- base.OnDestroyed ();
-
if (vAdjustment != null) {
vAdjustment.Destroy ();
hAdjustment.Destroy ();
@@ -446,8 +444,15 @@ namespace MonoDevelop.VersionControl.Views
adj.Destroy ();
vAdjustment = null;
}
-
+
+ foreach (var hscrollbar in hScrollBars) {
+ Remove (hscrollbar);
+ hscrollbar.Destroy ();
+ }
+
children.ForEach (child => child.Child.Destroy ());
+
+ base.OnDestroyed ();
}
#endregion
@@ -884,14 +889,14 @@ namespace MonoDevelop.VersionControl.Views
GetPointer (out mx, out my);
// mx -= (int)x;
// my -= (int)y;
- Cairo.RadialGradient gradient = new Cairo.RadialGradient (mx, my, h,
- mx, my, 2);
- var color = (Mono.TextEditor.HslColor)Style.Mid (StateType.Normal);
- color.L *= 1.05;
- gradient.AddColorStop (0, color);
- color.L *= 1.07;
- gradient.AddColorStop (1, color);
- cr.Pattern = gradient;
+ using (var gradient = new Cairo.RadialGradient (mx, my, h, mx, my, 2)) {
+ var color = (Mono.TextEditor.HslColor)Style.Mid (StateType.Normal);
+ color.L *= 1.05;
+ gradient.AddColorStop (0, color);
+ color.L *= 1.07;
+ gradient.AddColorStop (1, color);
+ cr.Pattern = gradient;
+ }
} else {
cr.Color = (Mono.TextEditor.HslColor)Style.Mid (StateType.Normal);
}
@@ -1044,15 +1049,15 @@ namespace MonoDevelop.VersionControl.Views
void FillGradient (Cairo.Context cr, double y, double h)
{
cr.Rectangle (0.5, y, Allocation.Width, h);
- var grad = new Cairo.LinearGradient (0, y, Allocation.Width, y);
- var col = (Mono.TextEditor.HslColor)Style.Base (StateType.Normal);
- col.L *= 0.95;
- grad.AddColorStop (0, col);
- grad.AddColorStop (0.7, (Mono.TextEditor.HslColor)Style.Base (StateType.Normal));
- grad.AddColorStop (1, col);
- cr.Pattern = grad;
-
- cr.Fill ();
+ using (var grad = new Cairo.LinearGradient (0, y, Allocation.Width, y)) {
+ var col = (Mono.TextEditor.HslColor)Style.Base (StateType.Normal);
+ col.L *= 0.95;
+ grad.AddColorStop (0, col);
+ grad.AddColorStop (0.7, (Mono.TextEditor.HslColor)Style.Base (StateType.Normal));
+ grad.AddColorStop (1, col);
+ cr.Pattern = grad;
+ cr.Fill ();
+ }
}
void DrawBar (Cairo.Context cr, double y, double h)
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogView.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogView.cs
index 16123c4..5c781f2 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogView.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogView.cs
@@ -2,9 +2,9 @@ using System;
using System.IO;
using Gtk;
using MonoDevelop.Core;
+using MonoDevelop.Components.Commands;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide;
-using System.Text;
using System.Linq;
namespace MonoDevelop.VersionControl.Views
@@ -13,7 +13,7 @@ namespace MonoDevelop.VersionControl.Views
{
}
- public class LogView : BaseView, ILogView
+ public class LogView : BaseView, ILogView
{
LogWidget widget;
VersionInfo vinfo;
@@ -22,7 +22,7 @@ namespace MonoDevelop.VersionControl.Views
public LogWidget LogWidget {
get {
- return this.widget;
+ return widget;
}
}
@@ -153,6 +153,19 @@ namespace MonoDevelop.VersionControl.Views
{
}
#endregion
+
+ [CommandHandler (MonoDevelop.Ide.Commands.EditCommands.Copy)]
+ protected void OnCopy ()
+ {
+ string data = widget.DiffText;
+ if (data == null)
+ return;
+
+ var clipboard = Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
+ clipboard.Text = data;
+ clipboard = Clipboard.Get (Gdk.Atom.Intern ("PRIMARY", false));
+ clipboard.Text = data;
+ }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
index bb42aa6..aa7a933 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/LogWidget.cs
@@ -53,7 +53,7 @@ namespace MonoDevelop.VersionControl.Views
ListStore logstore = new ListStore (typeof (Revision));
FileTreeView treeviewFiles;
TreeStore changedpathstore;
- Gtk.Button revertButton, revertToButton;
+ Gtk.Button revertButton, revertToButton, refreshButton;
SearchEntry searchEntry;
string currentFilter;
@@ -132,6 +132,10 @@ namespace MonoDevelop.VersionControl.Views
// revertToButton.Sensitive = false;
revertToButton.Clicked += new EventHandler (RevertToRevisionClicked);
+ refreshButton = new DocumentToolButton (Gtk.Stock.Refresh, GettextCatalog.GetString ("Refresh"));
+// refreshButton.Sensitive = false;
+ refreshButton.Clicked += new EventHandler (RefreshClicked);
+
searchEntry = new SearchEntry ();
searchEntry.WidthRequest = 200;
searchEntry.ForceFilterButtonVisible = true;
@@ -183,11 +187,11 @@ namespace MonoDevelop.VersionControl.Views
scrolledwindowFiles.Child = treeviewFiles;
scrolledwindowFiles.ShowAll ();
- changedpathstore = new TreeStore (typeof(Gdk.Pixbuf), typeof (string), // icon/file name
- typeof(Gdk.Pixbuf), typeof (string), // icon/operation
+ changedpathstore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), // icon/file name
+ typeof (Gdk.Pixbuf), typeof (string), // icon/operation
typeof (string), // path
typeof (string), // revision path (invisible)
- typeof (string[]) // diff
+ typeof (string []) // diff
);
TreeViewColumn colChangedFile = new TreeViewColumn ();
@@ -253,6 +257,7 @@ namespace MonoDevelop.VersionControl.Views
{
toolbar.Add (revertButton);
toolbar.Add (revertToButton);
+ toolbar.Add (refreshButton);
Gtk.HBox a = new Gtk.HBox ();
a.PackEnd (searchEntry, false, false, 0);
@@ -281,20 +286,28 @@ namespace MonoDevelop.VersionControl.Views
scrolledLog.Hide ();
}
- void RevertToRevisionClicked (object src, EventArgs args) {
+ void RevertToRevisionClicked (object src, EventArgs args)
+ {
Revision d = SelectedRevision;
if (RevertRevisionsCommands.RevertToRevision (info.Repository, info.Item.Path, d, false))
VersionControlService.SetCommitComment (info.Item.Path,
string.Format ("(Revert to revision {0})", d.ToString ()), true);
}
- void RevertRevisionClicked (object src, EventArgs args) {
+ void RevertRevisionClicked (object src, EventArgs args)
+ {
Revision d = SelectedRevision;
if (RevertRevisionsCommands.RevertRevision (info.Repository, info.Item.Path, d, false))
VersionControlService.SetCommitComment (info.Item.Path,
string.Format ("(Revert revision {0})", d.ToString ()), true);
}
+ void RefreshClicked (object src, EventArgs args)
+ {
+ ShowLoading ();
+ info.Start (true);
+ }
+
void HandleTreeviewFilesDiffLineActivated (object sender, EventArgs e)
{
TreePath[] paths = treeviewFiles.Selection.GetSelectedRows ();
@@ -325,7 +338,8 @@ namespace MonoDevelop.VersionControl.Views
i++;
}
}
-
+
+ const int colOperation = 4;
const int colPath = 5;
const int colDiff = 6;
@@ -337,11 +351,12 @@ namespace MonoDevelop.VersionControl.Views
if (diff != null)
return;
- string path = (string)changedpathstore .GetValue (args.Iter, colPath);
+ string path = (string)changedpathstore.GetValue (args.Iter, colPath);
+
changedpathstore.SetValue (iter, colDiff, new string[] { GettextCatalog.GetString ("Loading data...") });
var rev = SelectedRevision;
ThreadPool.QueueUserWorkItem (delegate {
- string text;
+ string text = "";
try {
text = info.Repository.GetTextAtRevision (path, rev);
} catch (Exception e) {
@@ -368,7 +383,7 @@ namespace MonoDevelop.VersionControl.Views
} else {
var changedDocument = new Mono.TextEditor.TextDocument (text);
if (prevRev == null) {
- lines = new string[changedDocument.LineCount];
+ lines = new string [changedDocument.LineCount];
for (int i = 0; i < changedDocument.LineCount; i++) {
lines[i] = "+ " + changedDocument.GetLineText (i + 1).TrimEnd ('\r','\n');
}
@@ -377,12 +392,25 @@ namespace MonoDevelop.VersionControl.Views
try {
prevRevisionText = info.Repository.GetTextAtRevision (path, prevRev);
} catch (Exception e) {
- // The file did not exist at this point in time, so just treat it as empty
+ Application.Invoke (delegate {
+ LoggingService.LogError ("Error while getting revision text", e);
+ MessageService.ShowError ("Error while getting revision text.", "The file may not be part of the working copy.");
+ });
+ return;
}
-
+
+ if (String.IsNullOrEmpty (text)) {
+ if (!String.IsNullOrEmpty (prevRevisionText)) {
+ lines = new string [changedDocument.LineCount];
+ for (int i = 0; i < changedDocument.LineCount; i++) {
+ lines [i] = "- " + changedDocument.GetLineText (i + 1).TrimEnd ('\r','\n');
+ }
+ }
+ }
+
var originalDocument = new Mono.TextEditor.TextDocument (prevRevisionText);
- originalDocument.FileName = "Revision " + prevRev.ToString ();
- changedDocument.FileName = "Revision " + rev.ToString ();
+ originalDocument.FileName = "Revision " + prevRev;
+ changedDocument.FileName = "Revision " + rev;
lines = Mono.TextEditor.Utils.Diff.GetDiffString (originalDocument, changedDocument).Split ('\n');
}
}
@@ -404,7 +432,7 @@ namespace MonoDevelop.VersionControl.Views
TreeIter iter;
if (!treeviewFiles.Selection.GetSelected (out iter))
return;
- string path = (string)changedpathstore.GetValue (iter, 5);
+ string path = (string)changedpathstore.GetValue (iter, colPath);
ThreadPool.QueueUserWorkItem (delegate {
string text = info.Repository.GetTextAtRevision (path, rev);
string prevRevision = text; // info.Repository.GetTextAtRevision (path, rev.GetPrevious ());
@@ -526,7 +554,7 @@ namespace MonoDevelop.VersionControl.Views
CellRendererDiff rc = (CellRendererDiff)cell;
string[] lines = (string[])changedpathstore.GetValue (iter, colDiff);
if (lines == null)
- lines = new string[] { (string)changedpathstore.GetValue (iter, 4) };
+ lines = new string[] { (string)changedpathstore.GetValue (iter, colOperation) };
rc.InitCell (treeviewFiles, changedpathstore.IterDepth (iter) != 0, lines, changedpathstore.GetPath (iter));
}
@@ -685,5 +713,17 @@ namespace MonoDevelop.VersionControl.Views
currentRevisionShortened = false;
}
}
+
+ internal string DiffText {
+ get {
+ TreeIter iter;
+ if (treeviewFiles.Selection.GetSelected (out iter)) {
+ string [] items = changedpathstore.GetValue (iter, colDiff) as string [];
+ if (items != null)
+ return String.Join (Environment.NewLine, items);
+ }
+ return null;
+ }
+ }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs
index e514e6b..f57c6cc 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/StatusView.cs
@@ -106,16 +106,20 @@ namespace MonoDevelop.VersionControl.Views
VersionControlItem item = items [0];
if (item.VersionInfo.IsVersioned) {
- if (test) return true;
- StatusView d = new StatusView (item.Path, item.Repository);
- IdeApp.Workbench.OpenDocument (d, true);
+ if (test)
+ return true;
+
+ if (!BringStatusViewToFront (item.Path)) {
+ StatusView d = new StatusView (item.Path, item.Repository);
+ IdeApp.Workbench.OpenDocument (d, true);
+ }
return true;
}
return false;
}
public StatusView (string filepath, Repository vc)
- : base(Path.GetFileName(filepath) + " Status")
+ : base (Path.GetFileName (filepath) + " Status")
{
this.vc = vc;
this.filepath = filepath;
@@ -396,7 +400,7 @@ namespace MonoDevelop.VersionControl.Views
}
}
- private void StartUpdate ()
+ void StartUpdate ()
{
if (!remoteStatus)
status.Text = GettextCatalog.GetString ("Scanning for changes...");
@@ -482,7 +486,7 @@ namespace MonoDevelop.VersionControl.Views
commitBox.Visible = filelist.Selection.CountSelectedRows () != 0;
}
- private void Update ()
+ void Update ()
{
localDiff.Clear ();
remoteDiff.Clear ();
@@ -683,12 +687,12 @@ namespace MonoDevelop.VersionControl.Views
return null;
}
- private void OnShowRemoteStatusClicked(object src, EventArgs args) {
+ void OnShowRemoteStatusClicked(object src, EventArgs args) {
remoteStatus = true;
StartUpdate ();
}
- private void OnCommitClicked (object src, EventArgs args)
+ void OnCommitClicked (object src, EventArgs args)
{
// Nothing to commit
if (changeSet.IsEmpty)
@@ -708,7 +712,7 @@ namespace MonoDevelop.VersionControl.Views
}
- private void OnTestExpandRow (object sender, Gtk.TestExpandRowArgs args)
+ void OnTestExpandRow (object sender, Gtk.TestExpandRowArgs args)
{
bool filled = (bool) filestore.GetValue (args.Iter, ColFilled);
if (!filled) {
@@ -1039,6 +1043,18 @@ namespace MonoDevelop.VersionControl.Views
rc.InitCell (filelist, true, lines, path);
}
}
+
+ static bool BringStatusViewToFront (string filepath)
+ {
+ foreach (var doc in IdeApp.Workbench.Documents) {
+ StatusView view = doc.GetContent<StatusView> ();
+ if (view != null && view.filepath == filepath) {
+ doc.Select ();
+ return true;
+ }
+ }
+ return false;
+ }
}
class FileTreeView: TreeView
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/VersionControlDocumentInfo.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/VersionControlDocumentInfo.cs
index 1be63eb..a42e2d8 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/VersionControlDocumentInfo.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/VersionControlDocumentInfo.cs
@@ -77,9 +77,9 @@ namespace MonoDevelop.VersionControl.Views
this.Repository = repository;
}
- public void Start ()
+ public void Start (bool rerun = false)
{
- if (alreadyStarted)
+ if (!rerun && alreadyStarted)
return;
alreadyStarted = true;
ThreadPool.QueueUserWorkItem (delegate {
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.csproj b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.csproj
index f7565af..8bff118 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.csproj
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.csproj
@@ -57,11 +57,6 @@
<Name>MonoDevelop.DesignerSupport</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\..\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\MonoDevelop.Debugger\MonoDevelop.Debugger.csproj">
<Project>{2357AABD-08C7-4808-A495-8FF2D3CDFDB0}</Project>
<Name>MonoDevelop.Debugger</Name>
@@ -77,6 +72,11 @@
<Name>Mono.Addins</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data" />
@@ -230,6 +230,7 @@
<Compile Include="MonoDevelop.VersionControl\MergeCommand.cs" />
<Compile Include="MonoDevelop.VersionControl\BlameCommand.cs" />
<Compile Include="MonoDevelop.VersionControl\VersionInfoCache.cs" />
+ <Compile Include="MonoDevelop.VersionControl\IgnoreCommand.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs
index 49d778a..621b64c 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/AddRemoveMoveCommand.cs
@@ -113,7 +113,7 @@ namespace MonoDevelop.VersionControl
return true;
string msg = GettextCatalog.GetString ("Are you sure you want to remove the selected items from the version control system?");
- string msg2 = GettextCatalog.GetString ("The files will be removed from disk");
+ string msg2 = GettextCatalog.GetString ("The files will be kept on disk.");
if (MessageService.Confirm (msg, msg2, AlertButton.Delete))
new RemoveWorker (items).Start();
return true;
@@ -135,10 +135,10 @@ namespace MonoDevelop.VersionControl
foreach (VersionControlItemList list in items.SplitByRepository ()) {
VersionControlItemList files = list.GetFiles ();
if (files.Count > 0)
- files[0].Repository.DeleteFiles (files.Paths, true, Monitor);
+ files[0].Repository.DeleteFiles (files.Paths, true, Monitor, true);
VersionControlItemList dirs = list.GetDirectories ();
if (dirs.Count > 0)
- dirs[0].Repository.DeleteDirectories (dirs.Paths, true, Monitor);
+ dirs[0].Repository.DeleteDirectories (dirs.Paths, true, Monitor, true);
}
Gtk.Application.Invoke (delegate {
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs
index e3e0348..f23ef23 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs
@@ -26,29 +26,32 @@ namespace MonoDevelop.VersionControl
Annotate,
ShowAnnotations,
HideAnnotations,
- CreatePatch
+ CreatePatch,
+ Ignore,
+ Unignore
}
- class SolutionVersionControlCommandHalder: CommandHandler
+ class SolutionVersionControlCommandHandler: CommandHandler
{
VersionControlItemList GetItems ()
{
VersionControlItemList list = new VersionControlItemList ();
- IWorkspaceObject wob;
+ WorkspaceItem wob;
+ SolutionItem sol;
Repository repo = null;
wob = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem;
if (wob != null)
repo = VersionControlService.GetRepository (wob);
if (repo == null) {
- wob = IdeApp.ProjectOperations.CurrentSelectedSolutionItem;
- if (wob != null)
- repo = VersionControlService.GetRepository (wob);
+ sol = IdeApp.ProjectOperations.CurrentSelectedSolutionItem;
+ if (sol != null)
+ repo = VersionControlService.GetRepository (sol);
}
if (repo == null || repo.VersionControlSystem == null || !repo.VersionControlSystem.IsInstalled)
return list;
-
- list.Add (new VersionControlItem (repo, wob, wob.BaseDirectory, true, null));
+
+ list.Add (new VersionControlItem (repo, wob, wob.FileName, true, null));
return list;
}
@@ -70,12 +73,13 @@ namespace MonoDevelop.VersionControl
}
}
- class FileVersionControlCommandHalder: CommandHandler
+ class FileVersionControlCommandHandler: CommandHandler
{
protected VersionControlItemList GetItems ()
{
VersionControlItemList list = new VersionControlItemList ();
VersionControlItem it = GetItem ();
+
if (it != null)
list.Add (it);
return list;
@@ -116,7 +120,7 @@ namespace MonoDevelop.VersionControl
}
}
- class UpdateCommandHandler: SolutionVersionControlCommandHalder
+ class UpdateCommandHandler: SolutionVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -124,23 +128,23 @@ namespace MonoDevelop.VersionControl
}
}
- class StatusCommandHandler: SolutionVersionControlCommandHalder
+ class StatusCommandHandler: SolutionVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
return StatusView.Show (items, test);
}
}
-
- class CommitCommandHandler: SolutionVersionControlCommandHalder
+
+ class CommitCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
return CommitCommand.Commit (items, test);
}
}
-
- class AddCommandHandler: FileVersionControlCommandHalder
+
+ class AddCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -154,7 +158,7 @@ namespace MonoDevelop.VersionControl
}
}
- class RemoveCommandHandler: FileVersionControlCommandHalder
+ class RemoveCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -168,7 +172,7 @@ namespace MonoDevelop.VersionControl
}
}
- class RevertCommandHandler: FileVersionControlCommandHalder
+ class RevertCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -182,7 +186,7 @@ namespace MonoDevelop.VersionControl
}
}
- class LockCommandHandler: FileVersionControlCommandHalder
+ class LockCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -196,7 +200,7 @@ namespace MonoDevelop.VersionControl
}
}
- class UnlockCommandHandler: FileVersionControlCommandHalder
+ class UnlockCommandHandler: FileVersionControlCommandHandler
{
protected override bool RunCommand (VersionControlItemList items, bool test)
{
@@ -210,7 +214,35 @@ namespace MonoDevelop.VersionControl
}
}
- class CurrentFileDiffHandler : FileVersionControlCommandHalder
+ class IgnoreCommandHandler : FileVersionControlCommandHandler
+ {
+ protected override bool RunCommand (VersionControlItemList items, bool test)
+ {
+ return IgnoreCommand.Ignore (items, test);
+ }
+
+ protected override void Update (CommandInfo info)
+ {
+ base.Update (info);
+ info.Text = GettextCatalog.GetString ("Add to ignore list");
+ }
+ }
+
+ class UnignoreCommandHandler : FileVersionControlCommandHandler
+ {
+ protected override bool RunCommand (VersionControlItemList items, bool test)
+ {
+ return UnignoreCommand.Unignore (items, test);
+ }
+
+ protected override void Update (CommandInfo info)
+ {
+ base.Update (info);
+ info.Text = GettextCatalog.GetString ("Remove from ignore list");
+ }
+ }
+
+ class CurrentFileDiffHandler : FileVersionControlCommandHandler
{
protected override void Run ()
{
@@ -219,7 +251,7 @@ namespace MonoDevelop.VersionControl
}
}
- class CurrentFileBlameHandler : FileVersionControlCommandHalder
+ class CurrentFileBlameHandler : FileVersionControlCommandHandler
{
protected override void Run ()
{
@@ -228,7 +260,7 @@ namespace MonoDevelop.VersionControl
}
}
- class CurrentFileLogHandler : FileVersionControlCommandHalder
+ class CurrentFileLogHandler : FileVersionControlCommandHandler
{
protected override void Run ()
{
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitCommand.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitCommand.cs
index 71f8425..2425a64 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitCommand.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitCommand.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
+using System.Linq;
using MonoDevelop.VersionControl.Dialogs;
using MonoDevelop.Core;
using MonoDevelop.Ide;
@@ -11,28 +12,57 @@ namespace MonoDevelop.VersionControl
{
public static bool Commit (VersionControlItemList items, bool test)
{
- if (items.Count != 1)
- return false;
+ int filesToCommit = 0;
+ VersionControlItemList[] itemListsByRepo = items.SplitByRepository ();
+
+ foreach (VersionControlItemList itemList in itemListsByRepo) {
+ // Generate base folder path.
+ FilePath basePath = itemList.FindMostSpecificParent ();
+ Repository repo = itemList.First ().Repository;
- VersionControlItem item = items [0];
- if (item.VersionInfo.CanCommit) {
- if (test) return true;
- ChangeSet cset = item.Repository.CreateChangeSet (item.Path);
+ ChangeSet cset = repo.CreateChangeSet (basePath);
cset.GlobalComment = VersionControlService.GetCommitComment (cset.BaseLocalPath);
-
- foreach (VersionInfo vi in item.Repository.GetDirectoryVersionInfo (item.Path, false, true))
- if (vi.HasLocalChanges)
- cset.AddFile (vi);
+
+ foreach (var item in itemList) {
+ if (!item.VersionInfo.CanCommit)
+ continue;
+
+ if (item.Path.IsDirectory) {
+ // We don't run checks for directories, we throw dialog if there are no changes.
+ if (test)
+ return true;
+
+ foreach (VersionInfo vi in repo.GetDirectoryVersionInfo (item.Path, false, true))
+ if (vi.HasLocalChanges) {
+ filesToCommit++;
+ cset.AddFile (vi);
+ }
+ } else {
+ VersionInfo vi = repo.GetVersionInfo (item.Path);
+ if (vi.HasLocalChanges) {
+ if (test)
+ return true;
+
+ filesToCommit++;
+ cset.AddFile (vi);
+ }
+ }
+ }
+
+ // In case of no local changes.
+ if (test)
+ return false;
+
if (!cset.IsEmpty) {
- Commit (item.Repository, cset, false);
+ Commit (repo, cset, false);
} else {
MessageService.ShowMessage (GettextCatalog.GetString ("There are no changes to be committed."));
- return false;
+ continue;
}
}
- return false;
+ return filesToCommit != 0;
}
-
+
public static bool Commit (Repository vc, ChangeSet changeSet, bool test)
{
try {
@@ -43,7 +73,8 @@ namespace MonoDevelop.VersionControl
}
if (vc.GetVersionInfo (changeSet.BaseLocalPath).CanCommit) {
- if (test) return true;
+ if (test)
+ return true;
if (!VersionControlService.NotifyPrepareCommit (vc, changeSet))
return false;
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CreatePatchCommand.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CreatePatchCommand.cs
index e54587c..ae0ca43 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CreatePatchCommand.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CreatePatchCommand.cs
@@ -59,8 +59,8 @@ namespace MonoDevelop.VersionControl
bool can = CanCreatePatch (items);
if (test || !can){ return can; }
- FilePath basePath = FindMostSpecificParent (items, FilePath.Null);
- if (FilePath.Empty == basePath)
+ FilePath basePath = items.FindMostSpecificParent ();
+ if (FilePath.Null == basePath)
return false;
ChangeSet cset = new ChangeSet (items[0].Repository, basePath);
@@ -126,26 +126,5 @@ namespace MonoDevelop.VersionControl
if (null == items || 0 == items.Count){ return false; }
return items.All (i => i.VersionInfo.CanRevert);
}
-
- // Finds the most specific ancestor path of a set of version control items.
- // suggested is a suggested parent to try, or FilePath.Null.
- // Returns FilePath.Empty if no parent is found.
- private static FilePath FindMostSpecificParent (VersionControlItemList items, FilePath suggested)
- {
- if (null == items || 0 == items.Count){ return FilePath.Empty; }
-
- if (FilePath.Null == suggested) {
- suggested = items[0].IsDirectory? items[0].Path.FullPath: items[0].Path.ParentDirectory.FullPath;
- }
-
- foreach (FilePath path in items.Paths) {
- if (!path.IsChildPathOf (suggested)) {
- FilePath parent = suggested.ParentDirectory.FullPath;
- return (Path.GetPathRoot (parent) == parent)? parent: FindMostSpecificParent (items, parent);
- }
- }
-
- return suggested.FullPath;
- }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs
new file mode 100644
index 0000000..d2dcccc
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/IgnoreCommand.cs
@@ -0,0 +1,161 @@
+//
+// IgnoreCommand.cs
+//
+// Author:
+// Therzok <teromario at yahoo.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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 MonoDevelop.Components.Commands;
+using MonoDevelop.Core;
+using MonoDevelop.VersionControl.Dialogs;
+using MonoDevelop.Ide;
+using System;
+using System.Linq;
+using System.Xml;
+
+namespace MonoDevelop.VersionControl
+{
+ class IgnoreCommand : CommandHandler
+ {
+ public static bool Ignore (VersionControlItemList items, bool test)
+ {
+ if (IgnoreInternal (items, test))
+ return true;
+ return false;
+ }
+
+ static bool IgnoreInternal (VersionControlItemList items, bool test)
+ {
+ try {
+ if (test)
+ return items.All (x => x.VersionInfo.Status == VersionStatus.Unversioned);
+
+ if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to ignore the selected files?"),
+ AlertButton.No, AlertButton.Yes) != AlertButton.Yes)
+ return false;
+
+ new IgnoreWorker (items).Start();
+ return true;
+ }
+ catch (Exception ex) {
+ if (test)
+ LoggingService.LogError (ex.ToString ());
+ else
+ MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
+ return false;
+ }
+ }
+
+ private class IgnoreWorker : Task
+ {
+ VersionControlItemList items;
+
+ public IgnoreWorker (VersionControlItemList items)
+ {
+ this.items = items;
+ }
+
+ protected override string GetDescription()
+ {
+ return GettextCatalog.GetString ("Ignoring ...");
+ }
+
+ protected override void Run ()
+ {
+ foreach (VersionControlItemList list in items.SplitByRepository ())
+ list[0].Repository.Ignore (list.Paths);
+
+ Monitor.ReportSuccess (GettextCatalog.GetString ("Ignore operation completed."));
+ Gtk.Application.Invoke (delegate {
+ foreach (VersionControlItem item in items)
+ if (!item.IsDirectory)
+ FileService.NotifyFileChanged (item.Path);
+
+ VersionControlService.NotifyFileStatusChanged (items);
+ });
+ }
+ }
+ }
+
+ class UnignoreCommand : CommandHandler
+ {
+ public static bool Unignore (VersionControlItemList items, bool test)
+ {
+ if (UnignoreInternal (items, test))
+ return true;
+ return false;
+ }
+
+ static bool UnignoreInternal (VersionControlItemList items, bool test)
+ {
+ try {
+ // NGit doesn't return a version info for ignored files.
+ if (test)
+ return items.All (x => (x.VersionInfo.Status & (VersionStatus.ScheduledIgnore | VersionStatus.Ignored)) != VersionStatus.Unversioned);
+
+ if (MessageService.AskQuestion (GettextCatalog.GetString ("Are you sure you want to unignore the selected files?"),
+ AlertButton.No, AlertButton.Yes) != AlertButton.Yes)
+ return false;
+
+ new UnignoreWorker (items).Start();
+ return true;
+ }
+ catch (Exception ex) {
+ if (test)
+ LoggingService.LogError (ex.ToString ());
+ else
+ MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
+ return false;
+ }
+ }
+
+ private class UnignoreWorker : Task
+ {
+ VersionControlItemList items;
+
+ public UnignoreWorker (VersionControlItemList items)
+ {
+ this.items = items;
+ }
+
+ protected override string GetDescription()
+ {
+ return GettextCatalog.GetString ("Unignoring ...");
+ }
+
+ protected override void Run ()
+ {
+ foreach (VersionControlItemList list in items.SplitByRepository ())
+ list[0].Repository.Unignore (list.Paths);
+
+ Monitor.ReportSuccess (GettextCatalog.GetString ("Unignore operation completed."));
+ Gtk.Application.Invoke (delegate {
+ foreach (VersionControlItem item in items)
+ if (!item.IsDirectory)
+ FileService.NotifyFileChanged (item.Path);
+
+ VersionControlService.NotifyFileStatusChanged (items);
+ });
+ }
+ }
+ }
+}
+
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
index 4707fe9..bbabf1c 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs
@@ -17,9 +17,15 @@ namespace MonoDevelop.VersionControl
VersionControlSystem vcs;
[ItemProperty ("VcsType")]
- string vcsName;
-
- int references;
+ string vcsName;
+
+ int references;
+
+ public MonoDevelop.Core.FilePath RootPath
+ {
+ get;
+ protected set;
+ }
public event EventHandler NameChanged;
@@ -126,7 +132,8 @@ namespace MonoDevelop.VersionControl
if (vinfo.IsVersioned) {
operations = VersionControlOperation.Commit | VersionControlOperation.Update | VersionControlOperation.Log;
if (exists) {
- operations |= VersionControlOperation.Remove;
+ if (!vinfo.HasLocalChange (VersionStatus.ScheduledDelete))
+ operations |= VersionControlOperation.Remove;
if (vinfo.HasLocalChanges || vinfo.IsDirectory)
operations |= VersionControlOperation.Revert;
}
@@ -166,7 +173,8 @@ namespace MonoDevelop.VersionControl
public IEnumerable<VersionInfo> GetVersionInfo (IEnumerable<FilePath> paths, VersionInfoQueryFlags queryFlags = VersionInfoQueryFlags.None)
{
if ((queryFlags & VersionInfoQueryFlags.IgnoreCache) != 0) {
- var res = OnGetVersionInfo (paths, (queryFlags & VersionInfoQueryFlags.IncludeRemoteStatus) != 0);
+ // We shouldn't use IEnumerable because elements don't save property modifications.
+ var res = OnGetVersionInfo (paths, (queryFlags & VersionInfoQueryFlags.IncludeRemoteStatus) != 0).ToList ();
infoCache.SetStatus (res);
return res;
}
@@ -332,7 +340,7 @@ namespace MonoDevelop.VersionControl
}
- // Returns a path to the last version of the file updated from the repository
+ // Returns the content of the file in the base revision of the working copy.
public abstract string GetBaseText (FilePath localFile);
// Returns the revision history of a file
@@ -434,8 +442,8 @@ namespace MonoDevelop.VersionControl
public void Revert (FilePath[] localPaths, bool recurse, IProgressMonitor monitor)
{
- OnRevert (localPaths, recurse, monitor);
ClearCachedVersionInfo (localPaths);
+ OnRevert (localPaths, recurse, monitor);
}
public void Revert (FilePath localPath, bool recurse, IProgressMonitor monitor)
@@ -447,16 +455,16 @@ namespace MonoDevelop.VersionControl
public void RevertRevision (FilePath localPath, Revision revision, IProgressMonitor monitor)
{
- OnRevertRevision (localPath, revision, monitor);
ClearCachedVersionInfo (localPath);
+ OnRevertRevision (localPath, revision, monitor);
}
protected abstract void OnRevertRevision (FilePath localPath, Revision revision, IProgressMonitor monitor);
public void RevertToRevision (FilePath localPath, Revision revision, IProgressMonitor monitor)
{
- OnRevertToRevision (localPath, revision, monitor);
ClearCachedVersionInfo (localPath);
+ OnRevertToRevision (localPath, revision, monitor);
}
protected abstract void OnRevertToRevision (FilePath localPath, Revision revision, IProgressMonitor monitor);
@@ -515,44 +523,60 @@ namespace MonoDevelop.VersionControl
// files. The default implementetions performs a system file delete.
public void DeleteFile (FilePath localPath, bool force, IProgressMonitor monitor)
{
- DeleteFiles (new FilePath[] { localPath }, force, monitor);
+ DeleteFile (localPath, force, monitor, true);
+ }
+
+ public void DeleteFile (FilePath localPath, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
+ DeleteFiles (new FilePath[] { localPath }, force, monitor, keepLocal);
}
public void DeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor)
{
+ DeleteFiles (localPaths, force, monitor, true);
+ }
+
+ public void DeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
+ OnDeleteFiles (localPaths, force, monitor, keepLocal);
ClearCachedVersionInfo (localPaths);
- OnDeleteFiles (localPaths, force, monitor);
}
- protected virtual void OnDeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor)
+ [Obsolete ("Use overload the overload with keepLocal parameter")]
+ protected abstract void OnDeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor);
+
+ protected virtual void OnDeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
{
- foreach (string localPath in localPaths) {
- if (Directory.Exists (localPath))
- Directory.Delete (localPath, true);
- else
- File.Delete (localPath);
- }
+ OnDeleteFiles (localPaths, force, monitor);
}
public void DeleteDirectory (FilePath localPath, bool force, IProgressMonitor monitor)
{
- DeleteDirectories (new FilePath[] { localPath }, force, monitor);
+ DeleteDirectory (localPath, force, monitor, true);
+ }
+
+ public void DeleteDirectory (FilePath localPath, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
+ DeleteDirectories (new FilePath[] { localPath }, force, monitor, keepLocal);
}
public void DeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor)
{
+ DeleteDirectories (localPaths, force, monitor, true);
+ }
+
+ public void DeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
+ {
+ OnDeleteDirectories (localPaths, force, monitor, keepLocal);
ClearCachedVersionInfo (localPaths);
- OnDeleteDirectories (localPaths, force, monitor);
}
-
- protected virtual void OnDeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor)
+
+ [Obsolete ("Use overload the overload with keepLocal parameter")]
+ protected abstract void OnDeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor);
+
+ protected virtual void OnDeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor, bool keepLocal)
{
- foreach (string localPath in localPaths) {
- if (Directory.Exists (localPath))
- Directory.Delete (localPath, true);
- else
- File.Delete (localPath);
- }
+ OnDeleteDirectories (localPaths, force, monitor);
}
// Creates a local directory.
@@ -737,6 +761,24 @@ namespace MonoDevelop.VersionControl
/// A revision
/// </param>
protected abstract RevisionPath[] OnGetRevisionChanges (Revision revision);
+
+ // Ignores a file for version control operations.
+ public void Ignore (FilePath[] localPath)
+ {
+ ClearCachedVersionInfo (localPath);
+ OnIgnore (localPath);
+ }
+
+ protected abstract void OnIgnore (FilePath[] localPath);
+
+ // Unignores a file for version control operations.
+ public void Unignore (FilePath[] localPath)
+ {
+ ClearCachedVersionInfo (localPath);
+ OnUnignore (localPath);
+ }
+
+ protected abstract void OnUnignore (FilePath[] localPath);
}
public class Annotation
@@ -799,6 +841,7 @@ namespace MonoDevelop.VersionControl
}
}
+ [Flags]
public enum VersionInfoQueryFlags
{
None = 0,
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnknownRepository.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnknownRepository.cs
index d0cae07..8982ee2 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnknownRepository.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/UnknownRepository.cs
@@ -93,6 +93,14 @@ namespace MonoDevelop.VersionControl
protected override void OnDeleteDirectories (FilePath[] path, bool force, IProgressMonitor monitor)
{
}
+
+ protected override void OnIgnore (FilePath[] path)
+ {
+ }
+
+ protected override void OnUnignore (FilePath[] path)
+ {
+ }
public override Annotation[] GetAnnotations (MonoDevelop.Core.FilePath repositoryPath)
{
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlCommandHandler.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlCommandHandler.cs
index 5e063f1..d1e6fd3 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlCommandHandler.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlCommandHandler.cs
@@ -52,7 +52,7 @@ namespace MonoDevelop.VersionControl
}
}
- public VersionControlItemList GetItems ()
+ public VersionControlItemList GetItems (bool projRecurse = true)
{
// Cached items are used only in the status view, not in the project pad.
if (items != null)
@@ -61,21 +61,21 @@ namespace MonoDevelop.VersionControl
// Don't cache node items because they can change
VersionControlItemList nodeItems = new VersionControlItemList ();
foreach (ITreeNavigator node in CurrentNodes) {
- VersionControlItem item = CreateItem (node.DataItem);
+ VersionControlItem item = CreateItem (node.DataItem, projRecurse);
if (item != null)
nodeItems.Add (item);
}
return nodeItems;
}
- public VersionControlItem CreateItem (object obj)
+ public VersionControlItem CreateItem (object obj, bool projRecurse = true)
{
string path;
bool isDir;
IWorkspaceObject pentry;
Repository repo;
VersionInfo versionInfo = null;
-
+
if (obj is ProjectFile) {
ProjectFile file = (ProjectFile)obj;
path = file.FilePath;
@@ -88,10 +88,20 @@ namespace MonoDevelop.VersionControl
isDir = false;
pentry = file.ParentWorkspaceObject;
} else if (obj is ProjectFolder) {
- ProjectFolder f = ((ProjectFolder)obj);
+ ProjectFolder f = (ProjectFolder)obj;
path = f.Path;
isDir = true;
pentry = f.ParentWorkspaceObject;
+ } else if (!projRecurse && obj is Solution) {
+ Solution sol = (Solution)obj;
+ path = sol.FileName;
+ isDir = false;
+ pentry = sol;
+ } else if (!projRecurse && obj is Project) {
+ Project proj = (Project)obj;
+ path = proj.FileName;
+ isDir = false;
+ pentry = proj;
} else if (obj is IWorkspaceObject) {
pentry = ((IWorkspaceObject)obj);
path = pentry.BaseDirectory;
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlFileSystemExtension.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlFileSystemExtension.cs
index a5c8bdc..7e564af 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlFileSystemExtension.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlFileSystemExtension.cs
@@ -32,6 +32,10 @@ namespace MonoDevelop.VersionControl
if (path == prj.BaseDirectory || path.IsChildPathOf (prj.BaseDirectory))
return VersionControlService.GetRepository (prj);
}
+ foreach (Solution sol in IdeApp.Workspace.GetAllSolutions ()) {
+ if (path == sol.BaseDirectory || path.IsChildPathOf (sol.BaseDirectory))
+ return VersionControlService.GetRepository (sol);
+ }
return null;
}
@@ -49,15 +53,15 @@ namespace MonoDevelop.VersionControl
public override void MoveFile (FilePath source, FilePath dest)
{
IProgressMonitor monitor = new NullProgressMonitor ();
-
+
Repository srcRepo = GetRepository (source);
Repository dstRepo = GetRepository (dest);
- if (dstRepo.CanMoveFilesFrom (srcRepo, source, dest))
+ if (dstRepo != null && dstRepo.CanMoveFilesFrom (srcRepo, source, dest))
srcRepo.MoveFile (source, dest, true, monitor);
else {
CopyFile (source, dest, true);
- srcRepo.DeleteFile (source, true, monitor);
+ srcRepo.DeleteFile (source, true, monitor, false);
}
}
@@ -74,7 +78,7 @@ namespace MonoDevelop.VersionControl
public override void DeleteFile (FilePath file)
{
Repository repo = GetRepository (file);
- repo.DeleteFile (file, true, new NullProgressMonitor ());
+ repo.DeleteFile (file, true, new NullProgressMonitor (), false);
}
public override void CreateDirectory (FilePath path)
@@ -95,14 +99,14 @@ namespace MonoDevelop.VersionControl
srcRepo.MoveDirectory (sourcePath, destPath, true, monitor);
else {
CopyDirectory (sourcePath, destPath);
- srcRepo.DeleteDirectory (sourcePath, true, monitor);
+ srcRepo.DeleteDirectory (sourcePath, true, monitor, false);
}
}
-
+
public override void DeleteDirectory (FilePath path)
{
Repository repo = GetRepository (path);
- repo.DeleteDirectory (path, true, new NullProgressMonitor ());
+ repo.DeleteDirectory (path, true, new NullProgressMonitor (), false);
}
public override bool RequestFileEdit (FilePath file)
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlItemList.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlItemList.cs
index 52a17fd..379dd70 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlItemList.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlItemList.cs
@@ -78,5 +78,12 @@ namespace MonoDevelop.VersionControl
return paths;
}
}
+
+ // Finds the most specific ancestor path of a set of version control items.
+ // Returns FilePath.Null if no parent is found.
+ public FilePath FindMostSpecificParent ()
+ {
+ return FilePath.GetCommonRootPath (Paths);
+ }
}
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlNodeExtension.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlNodeExtension.cs
index 166428b..f62334d 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlNodeExtension.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlNodeExtension.cs
@@ -296,7 +296,8 @@ namespace MonoDevelop.VersionControl
protected void UpdateStatus(CommandInfo item) {
TestCommand(Commands.Status, item);
}
-
+
+ [AllowMultiSelection]
[CommandHandler (Commands.Commit)]
protected void OnCommit() {
RunCommand (Commands.Commit, false);
@@ -343,12 +344,12 @@ namespace MonoDevelop.VersionControl
[AllowMultiSelection]
[CommandHandler (Commands.Revert)]
protected void OnRevert() {
- RunCommand(Commands.Revert, false);
+ RunCommand(Commands.Revert, false, false);
}
[CommandUpdateHandler (Commands.Revert)]
protected void UpdateRevert(CommandInfo item) {
- TestCommand(Commands.Revert, item);
+ TestCommand(Commands.Revert, item, false);
}
[AllowMultiSelection]
@@ -394,10 +395,37 @@ namespace MonoDevelop.VersionControl
protected void UpdateCreatePatch(CommandInfo item) {
TestCommand(Commands.CreatePatch, item);
}
-
- private void TestCommand(Commands cmd, CommandInfo item) {
- TestResult res = RunCommand(cmd, true);
- if (res == TestResult.NoVersionControl && cmd == Commands.Log) {
+
+ [AllowMultiSelection]
+ [CommandHandler (Commands.Ignore)]
+ protected void OnIgnore ()
+ {
+ RunCommand(Commands.Ignore, false);
+ }
+
+ [CommandUpdateHandler (Commands.Ignore)]
+ protected void UpdateIgnore (CommandInfo item)
+ {
+ TestCommand(Commands.Ignore, item);
+ }
+
+ [AllowMultiSelection]
+ [CommandHandler (Commands.Unignore)]
+ protected void OnUnignore ()
+ {
+ RunCommand(Commands.Unignore, false);
+ }
+
+ [CommandUpdateHandler (Commands.Unignore)]
+ protected void UpdateUnignore (CommandInfo item)
+ {
+ TestCommand(Commands.Unignore, item);
+ }
+
+ private void TestCommand(Commands cmd, CommandInfo item, bool projRecurse = true)
+ {
+ TestResult res = RunCommand(cmd, true, projRecurse);
+ if (res == TestResult.NoVersionControl && cmd == Commands.Log) {
// Use the update command to show the "not available" message
item.Icon = null;
item.Enabled = false;
@@ -406,9 +434,9 @@ namespace MonoDevelop.VersionControl
item.Visible = res == TestResult.Enable;
}
- private TestResult RunCommand (Commands cmd, bool test)
+ private TestResult RunCommand (Commands cmd, bool test, bool projRecurse = true)
{
- VersionControlItemList items = GetItems ();
+ VersionControlItemList items = GetItems (projRecurse);
foreach (VersionControlItem it in items) {
if (it.Repository == null) {
@@ -464,8 +492,14 @@ namespace MonoDevelop.VersionControl
case Commands.CreatePatch:
res = CreatePatchCommand.CreatePatch (items, test);
break;
- }
- }
+ case Commands.Ignore:
+ res = IgnoreCommand.Ignore (items, test);
+ break;
+ case Commands.Unignore:
+ res = UnignoreCommand.Unignore (items, test);
+ break;
+ }
+ }
catch (Exception ex) {
if (test)
LoggingService.LogError (ex.ToString ());
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
index cdba596..eddcd3d 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionControlService.cs
@@ -193,7 +193,7 @@ namespace MonoDevelop.VersionControl
return repo;
}
- static Repository GetRepositoryReference (string path, string id)
+ public static Repository GetRepositoryReference (string path, string id)
{
foreach (VersionControlSystem vcs in GetVersionControlSystems ()) {
Repository repo = vcs.GetRepositoryReference (path, id);
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionInfo.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionInfo.cs
index 6224360..700aa29 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionInfo.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/VersionInfo.cs
@@ -40,7 +40,8 @@ namespace MonoDevelop.VersionControl
status == other.status &&
revision == other.revision &&
remoteStatus == other.remoteStatus &&
- remoteRevision == other.remoteRevision;
+ remoteRevision == other.remoteRevision &&
+ AllowedOperations == other.AllowedOperations;
}
internal void Init (Repository repo)
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/VersionControl.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl/VersionControl.addin.xml
index 3ee183c..27bf15d 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/VersionControl.addin.xml
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/VersionControl.addin.xml
@@ -7,7 +7,7 @@
description = "A MonoDevelop addin for using version control systems like Subversion"
category = "Version Control"
flags = "Hidden"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import file="comment.png" />
@@ -24,9 +24,9 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="SourceEditor2" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
</Dependencies>
<ExtensionPoint path = "/MonoDevelop/VersionControl/VersionControlSystems" name = "Version control systems">
@@ -96,7 +96,7 @@
</ExtensionPoint>
<Extension path = "/MonoDevelop/Core/FileSystemExtensions">
- <Class class = "MonoDevelop.VersionControl.VersionControlFileSystemExtension" />
+ <Class class = "MonoDevelop.VersionControl.VersionControlFileSystemExtension" insertafter = "MidStep" />
</Extension>
<Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
@@ -197,6 +197,12 @@
_label = "Create _Patch"
icon = "vc-diff"
description = "Create a patch representing local changes."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Ignore"
+ _label = "Add to ignore list"
+ description = "Add items to version control ignore list"/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Unignore"
+ _label = "Remove from ignore list"
+ description = "Add items to version control ignore list"/>
<Command id = "MonoDevelop.VersionControl.Views.BlameCommands.CopyRevision"
_label = "_Copy revision"/>
@@ -213,6 +219,7 @@
<CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Annotate"/>
</ItemSet>
+ <SeparatorItem/>
</Extension>
<Extension path = "/MonoDevelop/Ide/MainMenu">
@@ -229,6 +236,8 @@
<CommandItem id = "MonoDevelop.VersionControl.Commands.Revert"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Lock"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Unlock"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Ignore"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unignore"/>
<SeparatorItem/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
@@ -253,6 +262,8 @@
<CommandItem id = "MonoDevelop.VersionControl.Commands.Add"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Remove"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Revert"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Ignore"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unignore"/>
<Condition id="ItemType" value="IFileItem">
<CommandItem id = "MonoDevelop.VersionControl.Commands.Lock"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Unlock"/>
@@ -261,8 +272,8 @@
<CommandItem id = "MonoDevelop.VersionControl.Commands.Update"/>
<Condition id="ItemType" value="IFolderItem">
<CommandItem id = "MonoDevelop.VersionControl.Commands.Status"/>
- <CommandItem id = "MonoDevelop.VersionControl.Commands.Commit"/>
</Condition>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Commit"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.CreatePatch"/>
<CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.Dialogs.CommitDialog.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.Dialogs.CommitDialog.cs
index 13e2be1..cbe86d9 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.Dialogs.CommitDialog.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.Dialogs.CommitDialog.cs
@@ -8,10 +8,12 @@ namespace MonoDevelop.VersionControl.Dialogs
private global::Gtk.Label label1;
private global::Gtk.ScrolledWindow scrolledwindow1;
private global::Gtk.TreeView fileList;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.Label label2;
+ private global::Gtk.Label label3;
private global::Gtk.VBox vboxExtensions;
private global::Gtk.ScrolledWindow scrolledwindow2;
private global::Gtk.TextView textview;
- private global::Gtk.Label label2;
private global::Gtk.Button button29;
private global::Gtk.Button buttonCommit;
@@ -60,15 +62,45 @@ namespace MonoDevelop.VersionControl.Dialogs
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.scrolledwindow1]));
w4.Position = 1;
// Container child mainBox.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.Xalign = 0F;
+ this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Commit _message:");
+ this.label2.UseUnderline = true;
+ this.hbox1.Add (this.label2);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2]));
+ w5.Position = 0;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.label3 = new global::Gtk.Label ();
+ this.label3.Name = "label3";
+ this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("1/1");
+ this.hbox1.Add (this.label3);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label3]));
+ w6.PackType = ((global::Gtk.PackType)(1));
+ w6.Position = 1;
+ w6.Expand = false;
+ w6.Fill = false;
+ this.mainBox.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.hbox1]));
+ w7.Position = 2;
+ w7.Expand = false;
+ w7.Fill = false;
+ // Container child mainBox.Gtk.Box+BoxChild
this.vboxExtensions = new global::Gtk.VBox ();
this.vboxExtensions.Name = "vboxExtensions";
this.vboxExtensions.Spacing = 6;
this.mainBox.Add (this.vboxExtensions);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.vboxExtensions]));
- w5.PackType = ((global::Gtk.PackType)(1));
- w5.Position = 2;
- w5.Expand = false;
- w5.Fill = false;
+ global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.vboxExtensions]));
+ w8.PackType = ((global::Gtk.PackType)(1));
+ w8.Position = 3;
+ w8.Expand = false;
+ w8.Fill = false;
// Container child mainBox.Gtk.Box+BoxChild
this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
this.scrolledwindow2.CanFocus = true;
@@ -80,31 +112,19 @@ namespace MonoDevelop.VersionControl.Dialogs
this.textview.Name = "textview";
this.scrolledwindow2.Add (this.textview);
this.mainBox.Add (this.scrolledwindow2);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.scrolledwindow2]));
- w7.PackType = ((global::Gtk.PackType)(1));
- w7.Position = 3;
- // Container child mainBox.Gtk.Box+BoxChild
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.Xalign = 0F;
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Commit _message:");
- this.label2.UseUnderline = true;
- this.mainBox.Add (this.label2);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.label2]));
- w8.PackType = ((global::Gtk.PackType)(1));
- w8.Position = 4;
- w8.Expand = false;
- w8.Fill = false;
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.mainBox [this.scrolledwindow2]));
+ w10.PackType = ((global::Gtk.PackType)(1));
+ w10.Position = 4;
w1.Add (this.mainBox);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1 [this.mainBox]));
- w9.Position = 0;
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1 [this.mainBox]));
+ w11.Position = 0;
// Internal child MonoDevelop.VersionControl.Dialogs.CommitDialog.ActionArea
- global::Gtk.HButtonBox w10 = this.ActionArea;
- w10.Events = ((global::Gdk.EventMask)(256));
- w10.Name = "VersionControlAddIn.CommitDialog_ActionArea";
- w10.Spacing = 6;
- w10.BorderWidth = ((uint)(5));
- w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ global::Gtk.HButtonBox w12 = this.ActionArea;
+ w12.Events = ((global::Gdk.EventMask)(256));
+ w12.Name = "VersionControlAddIn.CommitDialog_ActionArea";
+ w12.Spacing = 6;
+ w12.BorderWidth = ((uint)(5));
+ w12.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child VersionControlAddIn.CommitDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.button29 = new global::Gtk.Button ();
this.button29.CanDefault = true;
@@ -114,9 +134,9 @@ namespace MonoDevelop.VersionControl.Dialogs
this.button29.UseUnderline = true;
this.button29.Label = "gtk-cancel";
this.AddActionWidget (this.button29, -6);
- global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.button29]));
- w11.Expand = false;
- w11.Fill = false;
+ global::Gtk.ButtonBox.ButtonBoxChild w13 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.button29]));
+ w13.Expand = false;
+ w13.Fill = false;
// Container child VersionControlAddIn.CommitDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonCommit = new global::Gtk.Button ();
this.buttonCommit.CanDefault = true;
@@ -124,36 +144,33 @@ namespace MonoDevelop.VersionControl.Dialogs
this.buttonCommit.Name = "buttonCommit";
this.buttonCommit.UseUnderline = true;
// Container child buttonCommit.Gtk.Container+ContainerChild
- global::Gtk.Alignment w12 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+ global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w13 = new global::Gtk.HBox ();
- w13.Spacing = 2;
+ global::Gtk.HBox w15 = new global::Gtk.HBox ();
+ w15.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w14 = new global::Gtk.Image ();
- w14.Pixbuf = global::Stetic.IconLoader.LoadIcon (
- this,
- "vc-commit",
- global::Gtk.IconSize.Menu
- );
- w13.Add (w14);
+ global::Gtk.Image w16 = new global::Gtk.Image ();
+ w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "vc-commit", global::Gtk.IconSize.Menu);
+ w15.Add (w16);
// Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w16 = new global::Gtk.Label ();
- w16.LabelProp = global::Mono.Unix.Catalog.GetString ("C_ommit");
- w16.UseUnderline = true;
- w13.Add (w16);
- w12.Add (w13);
- this.buttonCommit.Add (w12);
- w10.Add (this.buttonCommit);
- global::Gtk.ButtonBox.ButtonBoxChild w20 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonCommit]));
- w20.Position = 1;
- w20.Expand = false;
- w20.Fill = false;
+ global::Gtk.Label w18 = new global::Gtk.Label ();
+ w18.LabelProp = global::Mono.Unix.Catalog.GetString ("C_ommit");
+ w18.UseUnderline = true;
+ w15.Add (w18);
+ w14.Add (w15);
+ this.buttonCommit.Add (w14);
+ w12.Add (this.buttonCommit);
+ global::Gtk.ButtonBox.ButtonBoxChild w22 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonCommit]));
+ w22.Position = 1;
+ w22.Expand = false;
+ w22.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.DefaultWidth = 628;
this.DefaultHeight = 481;
this.label2.MnemonicWidget = this.textview;
+ this.label3.MnemonicWidget = this.textview;
this.Hide ();
this.buttonCommit.Clicked += new global::System.EventHandler (this.OnButtonCommitClicked);
}
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.UrlBasedRepositoryEditor.cs b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.UrlBasedRepositoryEditor.cs
index d3f2274..1077cc4 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.UrlBasedRepositoryEditor.cs
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/MonoDevelop.VersionControl.UrlBasedRepositoryEditor.cs
@@ -21,7 +21,7 @@ namespace MonoDevelop.VersionControl
private global::Gtk.Entry repositoryServerEntry;
private global::Gtk.Entry repositoryUrlEntry;
private global::Gtk.Entry repositoryUserEntry;
-
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -58,14 +58,13 @@ namespace MonoDevelop.VersionControl
this.hbox2 = new global::Gtk.HBox ();
this.hbox2.Name = "hbox2";
// Container child hbox2.Gtk.Box+BoxChild
- this.repositoryPortSpin = new global::Gtk.SpinButton (0, 99999, 1);
+ this.repositoryPortSpin = new global::Gtk.SpinButton (0D, 99999D, 1D);
this.repositoryPortSpin.CanFocus = true;
this.repositoryPortSpin.Name = "repositoryPortSpin";
- this.repositoryPortSpin.Adjustment.PageIncrement = 10;
- this.repositoryPortSpin.Adjustment.PageSize = 10;
- this.repositoryPortSpin.ClimbRate = 1;
+ this.repositoryPortSpin.Adjustment.PageIncrement = 10D;
+ this.repositoryPortSpin.ClimbRate = 1D;
this.repositoryPortSpin.Numeric = true;
- this.repositoryPortSpin.Value = 1;
+ this.repositoryPortSpin.Value = 1D;
this.hbox2.Add (this.repositoryPortSpin);
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.repositoryPortSpin]));
w3.Position = 0;
@@ -158,7 +157,7 @@ namespace MonoDevelop.VersionControl
this.labelError = new global::Gtk.Label ();
this.labelError.Name = "labelError";
this.labelError.Xalign = 0F;
- this.labelError.LabelProp = global::Mono.Unix.Catalog.GetString ("<small><span color='red'>Invalid URL</span></small>");
+ this.labelError.LabelProp = global::Mono.Unix.Catalog.GetString ("<small><span color=\'red\'>Invalid URL</span></small>");
this.labelError.UseMarkup = true;
this.table1.Add (this.labelError);
global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1 [this.labelError]));
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/gui.stetic b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/gui.stetic
index 6c03744..7f5f465 100644
--- a/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/gui.stetic
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/gtk-gui/gui.stetic
@@ -759,7 +759,6 @@
<property name="CanFocus">True</property>
<property name="Upper">99999</property>
<property name="PageIncrement">10</property>
- <property name="PageSize">10</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
@@ -1098,6 +1097,47 @@
</packing>
</child>
<child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Commit _message:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">textview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">?/?</property>
+ <property name="MnemonicWidget">textview</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
<widget class="Gtk.VBox" id="vboxExtensions">
<property name="MemberName" />
<property name="Spacing">6</property>
@@ -1110,7 +1150,7 @@
</widget>
<packing>
<property name="PackType">End</property>
- <property name="Position">2</property>
+ <property name="Position">3</property>
<property name="AutoSize">False</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -1131,24 +1171,8 @@
</widget>
<packing>
<property name="PackType">End</property>
- <property name="Position">3</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Label" id="label2">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="LabelProp" translatable="yes">Commit _message:</property>
- <property name="UseUnderline">True</property>
- <property name="MnemonicWidget">textview</property>
- </widget>
- <packing>
- <property name="PackType">End</property>
<property name="Position">4</property>
<property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
</packing>
</child>
</widget>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.Policies.xml b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.Policies.xml
new file mode 100644
index 0000000..159a9cf
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.Policies.xml
@@ -0,0 +1,3 @@
+<VersionControlPolicy id="Mono" allowDiffSerialize="True">
+ <CommitMessageStyle Header="" Indent="" FirstFilePrefix="* " FileSeparator=":
* " LastFilePostfix=": " LineAlign="2" InterMessageLines="1" IncludeDirectoryPaths="False"/>
+</VersionControlPolicy>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.VersionControl.addin.xml b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.VersionControl.addin.xml
new file mode 100644
index 0000000..27bf15d
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.VersionControl.addin.xml
@@ -0,0 +1,361 @@
+<Addin id = "VersionControl"
+ namespace = "MonoDevelop"
+ name = "Version Control Support"
+ author = "Joshua Tauberer"
+ copyright = "LGPL"
+ url = "http://taubz.for.net/code/diff"
+ description = "A MonoDevelop addin for using version control systems like Subversion"
+ category = "Version Control"
+ flags = "Hidden"
+ version = "4.0.12">
+
+ <Runtime>
+ <Import file="comment.png" />
+ <Import file="menu_add.png" />
+ <Import file="menu_commit.png" />
+ <Import file="menu_diff.png" />
+ <Import file="menu_log.png" />
+ <Import file="menu_remote_status.png" />
+ <Import file="menu_remove.png" />
+ <Import file="menu_resolve.png" />
+ <Import file="menu_revert.png" />
+ <Import file="menu_status.png" />
+ <Import file="menu_update.png" />
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="SourceEditor2" version="4.0.12"/>
+ </Dependencies>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/VersionControlSystems" name = "Version control systems">
+ <Description>Version control systems</Description>
+ <ExtensionNode name="Class">
+ <Description>The specified class must subclass VersionControlSystem.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/CommitDialogExtensions" name = "Commit dialog extensions">
+ <Description>Commit dialog extensions.</Description>
+ <ExtensionNode name="Class">
+ <Description>The specified class must subclass CommitDialogExtension.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/StatusViewCommands" name = "Status View Commands">
+ <Description>Commands to be shown in the context menu of the status view. The id must match an existing code. The provided type must be a subclass of VersionControlCommandHandler.</Description>
+ <ExtensionNode name="CommandItem" />
+ <ExtensionNode name="SeparatorItem" type="MonoDevelop.Components.Commands.ExtensionNodes.SeparatorItemCodon" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/BlameView/ContextMenu" name = "Blame view context menu">
+ <Description>Context menu for the blame view.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/DiffViewHandler" name = "Diff view handler">
+ <Description>Handler used to create the a diff view which can display the current file.</Description>
+ <ExtensionNode name="Handler" objectType="MonoDevelop.VersionControl.IDiffViewHandler" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/VersionControl/DiffViewHandler">
+ <Handler class = "MonoDevelop.VersionControl.DefaultDiffViewHandler" />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/BlameViewHandler" name = "Blame view handler">
+ <Description>Handler used to create the a blame view which can display the current file.</Description>
+ <ExtensionNode name="Handler" objectType="MonoDevelop.VersionControl.IBlameViewHandler" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/VersionControl/BlameViewHandler">
+ <Handler class = "MonoDevelop.VersionControl.DefaultBlameViewHandler" />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/LogViewHandler" name = "Log view handler">
+ <Description>Handler used to create the a log view which can display the current file.</Description>
+ <ExtensionNode name="Handler" objectType="MonoDevelop.VersionControl.ILogViewHandler" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/VersionControl/LogViewHandler">
+ <Handler class = "MonoDevelop.VersionControl.DefaultLogViewHandler" />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/MergeViewHandler" name = "Merge view handler">
+ <Description>Handler used to create the a merge view which can display the current file.</Description>
+ <ExtensionNode name="Handler" objectType="MonoDevelop.VersionControl.IMergeViewHandler" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/VersionControl/MergeViewHandler">
+ <Handler class = "MonoDevelop.VersionControl.DefaultMergeViewHandler" />
+ </Extension>
+
+ <ExtensionPoint path = "/MonoDevelop/VersionControl/DiffView/ContextMenu" name = "Diff view context menu">
+ <Description>Context menu for the diff view.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionPoint>
+
+ <Extension path = "/MonoDevelop/Core/FileSystemExtensions">
+ <Class class = "MonoDevelop.VersionControl.VersionControlFileSystemExtension" insertafter = "MidStep" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <PadOption id = "ShowVersionControlOverlays" _label = "Show version control overlay icons" defaultValue = "True" />
+ <NodeBuilder id = "VersionControlNodeExtension" class = "MonoDevelop.VersionControl.VersionControlNodeExtension"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "vc-add-command" file = "menu_add.png" size="Menu" />
+ <StockIcon stockid = "vc-remove-command" file = "menu_remove.png" size="Menu" />
+ <StockIcon stockid = "vc-resolve-command" file = "menu_resolve.png" size="Menu" />
+ <StockIcon stockid = "vc-revert-command" file = "menu_revert.png" size="Menu" />
+ <StockIcon stockid = "vc-diff" file = "menu_diff.png" size="Menu" />
+ <StockIcon stockid = "vc-log" file = "menu_log.png" size="Menu" />
+ <StockIcon stockid = "vc-status" file = "menu_status.png" size="Menu" />
+ <StockIcon stockid = "vc-update" file = "menu_update.png" size="Menu" />
+ <StockIcon stockid = "vc-commit" file = "menu_commit.png" size="Menu" />
+ <StockIcon stockid = "vc-remote-status" file = "menu_remote_status.png" size="Menu" />
+ <StockIcon stockid = "vc-comment" file = "comment.png" size="Menu" />
+ <StockIcon stockid = "md-version-control" resource = "version-control-16.png" size="Menu" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Category _name = "Version Control" id = "VersionControl">
+ <Command id = "MonoDevelop.VersionControl.Commands.Add"
+ _label = "_Add"
+ icon = "vc-add-command"
+ defaultHandler = "MonoDevelop.VersionControl.AddCommandHandler"
+ description = "Add node to repository in the next commit."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Remove"
+ _label = "_Remove"
+ icon = "vc-remove-command"
+ defaultHandler = "MonoDevelop.VersionControl.RemoveCommandHandler"
+ description = "Remove node to repository in the next commit."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Commit"
+ _label = "_Commit"
+ icon = "vc-commit"
+ description = "Commits a file or directory into the repository."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.CommitSolution"
+ _label = "_Commit Solution"
+ icon = "vc-commit"
+ defaultHandler="MonoDevelop.VersionControl.CommitCommandHandler"
+ description = "Commits solution changes into the repository."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Diff"
+ _label = "_Diff"
+ icon = "vc-diff"
+ defaultHandler = "MonoDevelop.VersionControl.CurrentFileDiffHandler"
+ description = "Show the changes made to the local copy since the last update."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Revert"
+ _label = "_Revert"
+ icon = "vc-revert-command"
+ defaultHandler = "MonoDevelop.VersionControl.RevertCommandHandler"
+ description = "Restore pristine working copy file (undo most local edits)."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Log"
+ _label = "_Log"
+ icon = "vc-log"
+ defaultHandler = "MonoDevelop.VersionControl.CurrentFileLogHandler"
+ description = "Shows the commit history of the file or folder."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Status"
+ _label = "_Review Changes"
+ icon = "vc-status"
+ description = "Shows the status of files in the folder."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.SolutionStatus"
+ _label = "_Review Solution Changes"
+ icon = "vc-status"
+ defaultHandler="MonoDevelop.VersionControl.StatusCommandHandler"
+ description = "Shows the status of files in the solution."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Update"
+ _label = "_Update"
+ icon = "vc-update"
+ description = "Updates the local copy with remote changes."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.UpdateSolution"
+ _label = "_Update Solution"
+ icon = "vc-update"
+ defaultHandler="MonoDevelop.VersionControl.UpdateCommandHandler"
+ description = "Updates the local copy with remote changes."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Publish"
+ _label = "_Publish..."
+ description = "Publish actual project into repository."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Checkout"
+ defaultHandler = "MonoDevelop.VersionControl.CheckoutCommand"
+ _label = "C_heckout..."
+ icon = "vc-update"
+ description = "Checkout a project from repository."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Lock"
+ _label = "Lock"
+ defaultHandler = "MonoDevelop.VersionControl.LockCommandHandler"
+ description = "Lock files in the repository, so that no other user can change them."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Unlock"
+ _label = "Release Lock"
+ defaultHandler = "MonoDevelop.VersionControl.UnlockCommandHandler"
+ description = "Unlock files in the repository, so that other user can change them."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Annotate"
+ _label = "Show Annotations"
+ defaultHandler = "MonoDevelop.VersionControl.CurrentFileBlameHandler"
+ description = "Show the origin of each line in a file."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.CreatePatch"
+ _label = "Create _Patch"
+ icon = "vc-diff"
+ description = "Create a patch representing local changes."/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Ignore"
+ _label = "Add to ignore list"
+ description = "Add items to version control ignore list"/>
+ <Command id = "MonoDevelop.VersionControl.Commands.Unignore"
+ _label = "Remove from ignore list"
+ description = "Add items to version control ignore list"/>
+
+ <Command id = "MonoDevelop.VersionControl.Views.BlameCommands.CopyRevision"
+ _label = "_Copy revision"/>
+ <Command id = "MonoDevelop.VersionControl.Views.BlameCommands.ShowDiff"
+ _label = "_Show diff"/>
+ <Command id = "MonoDevelop.VersionControl.Views.BlameCommands.ShowLog"
+ _label = "S_how log"/>
+ </Category>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/DocumentTab">
+ <ItemSet id = "VersionControl" _label = "_Version Control" insertafter = "SaveSeparator">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Annotate"/>
+ </ItemSet>
+ <SeparatorItem/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu">
+ <ItemSet id = "VersionControl" _label = "_Version Control" insertafter = "Run" >
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Checkout" />
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Publish"/>
+ <SeparatorItem/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.UpdateSolution"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.SolutionStatus"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.CommitSolution"/>
+ <SeparatorItem/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Add"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Remove"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Revert"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Lock"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unlock"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Ignore"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unignore"/>
+ <SeparatorItem/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Annotate"/>
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+ <ItemSet id = "VersionControl" _label = "_Version Control">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Annotate"/>
+ </ItemSet>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+ <Condition id="ItemType" value="IFileItem|IFolderItem">
+ <ItemSet id = "VersionControl" _label = "_Version Control" insertafter = "Tools">
+ <Condition id="ItemType" value="Project|WorkspaceItem">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Publish"/>
+ </Condition>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Add"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Remove"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Revert"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Ignore"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unignore"/>
+ <Condition id="ItemType" value="IFileItem">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Lock"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unlock"/>
+ </Condition>
+ <SeparatorItem id = "CommandSeparator" />
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Update"/>
+ <Condition id="ItemType" value="IFolderItem">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Status"/>
+ </Condition>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Commit"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Diff"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.CreatePatch"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Log"/>
+ <Condition id="ItemType" value="IFileItem">
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Annotate"/>
+ </Condition>
+ </ItemSet>
+ <SeparatorItem />
+ </Condition>
+ </Extension>
+ <Extension path = "/MonoDevelop/VersionControl/StatusViewCommands">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.Open" type="MonoDevelop.VersionControl.OpenCommandHandler"/>
+ <SeparatorItem id = "CommandSeparator0" />
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Update" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Diff" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.CreatePatch" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Log" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <SeparatorItem id = "CommandSeparator1" />
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Remove" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Revert" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <SeparatorItem id = "CommandSeparator2" />
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Lock" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.Unlock" type="MonoDevelop.VersionControl.AddinCommandHandler"/>
+ <SeparatorItem id = "CommandSeparator3" />
+ </Extension>
+ <!--
+ <Extension path="/MonoDevelop/SourceEditor2/ContextMenu/Editor">
+
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.ShowAnnotations"/>
+ <CommandItem id = "MonoDevelop.VersionControl.Commands.HideAnnotations"/>
+ </Extension> -->
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels">
+ <Section id="VersionControl" _label="Version Control">
+ <ComplexCondition>
+ <Or>
+ <Condition id="ItemType" value="SolutionItem" />
+ <Condition id="ItemType" value="Solution" />
+ </Or>
+ <Section id = "VersionControlGeneral" _label = "Commit Message Style" fill="true" class="MonoDevelop.VersionControl.VersionControlPolicyPanel" />
+ </ComplexCondition>
+ </Section>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels/VersionControl">
+ <Section id = "VersionControlGeneral" _label = "Commit Message Style" fill="true" class="MonoDevelop.VersionControl.VersionControlPolicyPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog/VersionControl">
+ <Section id = "VersionControlGeneral" _label = "Commit Message Style" fill="true" class="MonoDevelop.VersionControl.VersionControlPolicyPanel" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets/Mono" >
+ <Policies resource="Policies.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/TypeSystem/Parser">
+ <Parser class = "MonoDevelop.VersionControl.Views.DiffParser" id = "DiffParser" mimeType="text/x-patch" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/StartupHandlers">
+ <Class class = "MonoDevelop.VersionControl.Views.SubviewAttachmentHandler"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/VersionControl/BlameView/ContextMenu">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/VersionControl/DiffView/ContextMenu">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="Cache" path="version-control-commit-msg" />
+ <Migration sourceVersion="2.4" kind="Config" path="VersionControl.config" />
+ <!-- 2.6+ -->
+ <Migration sourceVersion="2.6+" kind="Cache" path="version-control-commit-msg" />
+ <Migration sourceVersion="2.6+" kind="Config" path="VersionControl.config" />
+ </Extension>
+</Addin>
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.csproj.FilesWrittenAbsolute.txt b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..261fc7a
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,30 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_added.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_modified.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_conflicted.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_locked.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_removed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.repository.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_controled.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unversioned.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_lock_required.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unlocked.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.version-control-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.VersionControl.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.Policies.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_log.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_diff.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_update.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_status.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_commit.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_remote_status.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_add.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_remove.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_resolve.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/comment.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/menu_revert.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/VersionControl/MonoDevelop.VersionControl.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.dll.mdb
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.gtk-gui.gui.stetic b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.gtk-gui.gui.stetic
new file mode 100644
index 0000000..7f5f465
--- /dev/null
+++ b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.gtk-gui.gui.stetic
@@ -0,0 +1,1824 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../../build/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor2.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
+ <widget-library name="../../../../../build/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
+ <widget-library name="../../../../../build/AddIns/VersionControl/MonoDevelop.VersionControl.dll" internal="true" />
+ </import>
+ <icon-factory>
+ <icon-set id="vcs-repository">
+ <source>
+ <property name="Image">resource:repository.png</property>
+ </source>
+ </icon-set>
+ </icon-factory>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Dialogs.SelectRepositoryDialog" design-size="617 438">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Select Repository</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName">notebook</property>
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <signal name="ChangeCurrentPage" handler="OnNotebookChangeCurrentPage" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Type:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="repCombo">
+ <property name="MemberName">repCombo</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnRepComboChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.EventBox" id="repoContainer">
+ <property name="MemberName">repoContainer</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Connect to Repository</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="repoTree">
+ <property name="MemberName">repoTree</property>
+ <property name="CanFocus">True</property>
+ <signal name="CursorChanged" handler="OnRepoTreeCursorChanged" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VButtonBox" id="vbuttonbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">Start</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName">buttonAdd</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName">buttonRemove</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName">buttonEdit</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Clicked" handler="OnButtonEditClicked" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Registered Repositories</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="boxFolder">
+ <property name="MemberName">boxFolder</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryFolder">
+ <property name="MemberName">entryFolder</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryFolderChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonBrowse">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Browse...</property>
+ <signal name="Clicked" handler="OnButtonBrowseClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxMessage">
+ <property name="MemberName">boxMessage</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryMessage">
+ <property name="MemberName">entryMessage</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEditMessage">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName">entryName</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Repository:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMessage">
+ <property name="MemberName">labelMessage</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Message:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelName">
+ <property name="MemberName">labelName</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Module name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRepository">
+ <property name="MemberName">labelRepository</property>
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelTargetDir">
+ <property name="MemberName">labelTargetDir</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target directory:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="VersionControlAddIn.SelectRepositoryDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button559">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName">buttonOk</property>
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Dialogs.EditRepositoryDialog" design-size="537 414">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Repository Configuration</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="DefaultWidth">500</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox3">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName">entryName</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Type:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="versionControlType">
+ <property name="MemberName">versionControlType</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnVersionControlTypeChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.EventBox" id="repoEditorContainer">
+ <property name="MemberName">repoEditorContainer</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="GtkDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button10">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.UrlBasedRepositoryEditor" design-size="407 254">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">8</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ComboBox" id="comboProtocol">
+ <property name="MemberName">comboProtocol</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboProtocolChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.SpinButton" id="repositoryPortSpin">
+ <property name="MemberName">repositoryPortSpin</property>
+ <property name="CanFocus">True</property>
+ <property name="Upper">99999</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">1</property>
+ <signal name="ValueChanged" handler="OnRepositoryPortSpinValueChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="RightAttach">2</property>
+ <property name="YPadding">6</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Server:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Url:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Protocol:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Port:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">5</property>
+ <property name="BottomAttach">6</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Path:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">User:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelError">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><small><span color='red'>Invalid URL</span></small></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="repositoryPathEntry">
+ <property name="MemberName">repositoryPathEntry</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnRepositoryPathEntryChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">6</property>
+ <property name="BottomAttach">7</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="repositoryServerEntry">
+ <property name="MemberName">repositoryServerEntry</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnRepositoryServerEntryChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="repositoryUrlEntry">
+ <property name="MemberName">repositoryUrlEntry</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnRepositoryUrlEntryChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="repositoryUserEntry">
+ <property name="MemberName">repositoryUserEntry</property>
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnRepositoryUserEntryChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">7</property>
+ <property name="BottomAttach">8</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.VersionControl.Dialogs.CommitDialog" design-size="628 481">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Commit Files</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="mainBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The following files will be committed:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="fileList">
+ <property name="MemberName">fileList</property>
+ <property name="CanFocus">True</property>
+ <property name="SearchColumn">2</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Commit _message:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">textview</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">?/?</property>
+ <property name="MnemonicWidget">textview</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vboxExtensions">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview">
+ <property name="MemberName">textview</property>
+ <property name="CanFocus">True</property>
+ <property name="Text" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="VersionControlAddIn.CommitDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button29">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonCommit">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:vc-commit Menu</property>
+ <property name="Label" translatable="yes">C_ommit</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonCommitClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.CommitMessageStylePanelWidget" design-size="580 421">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryHeader">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryHeaderChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Message Header:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableFlags">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkIncludeDirs">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Include file directories</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckIncludeDirsToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkIndent">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Align message text</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckIndentToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkIndentEntries">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Indent entries</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckIndentEntriesToggled" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkLineSep">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Add a blank line between messages</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckLineSepToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkMsgInNewLine">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">File list and message in separate lines</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckMsgInNewLineToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkOneLinePerFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">One line per file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckOneLinePerFileToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkUseBullets">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use bullets</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckUseBulletsToggled" />
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkWrap">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Wrap</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckWrapToggled" />
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Preview:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="VscrollbarPolicy">Never</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="textview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.Views.DiffWidget" design-size="514 303">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="ShowBorder">False</property>
+ <property name="ShowTabs">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxComparisonView">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.VersionControl.Views.LogWidget" design-size="682 446">
+ <action-group name="Default" />
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">204</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">236</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledLoading">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Loading...</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledLog">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewLog">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.EventBox" id="commitBox">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">8</property>
+ <child>
+ <widget class="Gtk.Image" id="imageUser">
+ <property name="MemberName" />
+ <property name="WidthRequest">32</property>
+ <property name="HeightRequest">32</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelAuthor">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Author</property>
+ <property name="Selectable">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRevision">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp">Revision</property>
+ <property name="Selectable">True</property>
+ <signal name="ButtonPressEvent" handler="OnLabelRevisionButtonPressEvent" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelDate">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">Date</property>
+ <property name="Selectable">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.TextView" id="textviewDetails">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Editable">False</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindowFiles">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_added.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_added.png
new file mode 100644
index 0000000..cefd791
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_added.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_conflicted.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_conflicted.png
new file mode 100644
index 0000000..84bd855
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_conflicted.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_controled.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_controled.png
new file mode 100644
index 0000000..87783fc
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_controled.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_lock_required.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_lock_required.png
new file mode 100644
index 0000000..d99b196
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_lock_required.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_locked.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_locked.png
new file mode 100644
index 0000000..d0b71eb
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_locked.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_modified.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_modified.png
new file mode 100644
index 0000000..f6977c6
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_modified.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_normal.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_normal.png
new file mode 100644
index 0000000..5ddd1ac
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_normal.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_removed.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_removed.png
new file mode 100644
index 0000000..255f2fc
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_removed.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unlocked.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unlocked.png
new file mode 100644
index 0000000..6a6777e
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unlocked.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unversioned.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unversioned.png
new file mode 100644
index 0000000..6b4c367
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.overlay_unversioned.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.repository.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.repository.png
new file mode 100644
index 0000000..ece6892
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.repository.png differ
diff --git a/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.version-control-16.png b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.version-control-16.png
new file mode 100644
index 0000000..621745e
Binary files /dev/null and b/src/addins/VersionControl/MonoDevelop.VersionControl/obj/Debug/MonoDevelop.VersionControl.version-control-16.png differ
diff --git a/src/addins/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs b/src/addins/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs
index cd1da5c..b94e317 100644
--- a/src/addins/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs
+++ b/src/addins/WindowsPlatform/Dialogs/OpenFileDialogHandler.cs
@@ -82,7 +82,7 @@ namespace MonoDevelop.Platform
paths [n] = fileDlg.FileNames [n];
data.SelectedFiles = paths;
- if (dlg.SelectedEncodingId != null)
+ if (dlg.SelectedEncodingId != 0)
data.Encoding = dlg.SelectedEncodingId > 0 ? Encoding.GetEncoding (dlg.SelectedEncodingId) : null;
if (dlg.SelectedViewer != null)
data.SelectedViewer = dlg.SelectedViewer;
diff --git a/src/addins/WindowsPlatform/GdkWin32.cs b/src/addins/WindowsPlatform/GdkWin32.cs
new file mode 100644
index 0000000..d19f892
--- /dev/null
+++ b/src/addins/WindowsPlatform/GdkWin32.cs
@@ -0,0 +1,216 @@
+//
+// GdkWin32.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson at gmail.com>
+//
+// Copyright (C) 2011 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2012-2013 Xamarin Inc. (https://www.xamarin.com)
+//
+// 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.Reflection;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using Microsoft.WindowsAPICodePack.Dialogs;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.Platform
+{
+ public static class GdkWin32
+ {
+ static readonly uint GotGdkEventsMessage = RegisterWindowMessage ("GDK_WIN32_GOT_EVENTS");
+
+ [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern IntPtr gdk_win32_drawable_get_handle (IntPtr drawable);
+
+ [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern IntPtr gdk_win32_hdc_get (IntPtr drawable, IntPtr gc, int usage);
+
+ [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern void gdk_win32_hdc_release (IntPtr drawable, IntPtr gc, int usage);
+
+ [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern IntPtr gdk_win32_set_modal_dialog_libgtk_only (IntPtr window);
+
+ [DllImport ("User32.dll", SetLastError=true, CharSet=CharSet.Auto)]
+ static extern uint RegisterWindowMessage (string lpString);
+
+ public static IntPtr HgdiobjGet (Gdk.Drawable drawable)
+ {
+ return gdk_win32_drawable_get_handle (drawable.Handle);
+ }
+
+ public static IntPtr HdcGet (Gdk.Drawable drawable, Gdk.GC gc, Gdk.GCValuesMask usage)
+ {
+ return gdk_win32_hdc_get (drawable.Handle, gc.Handle, (int) usage);
+ }
+
+ public static void HdcRelease (Gdk.Drawable drawable, Gdk.GC gc, Gdk.GCValuesMask usage)
+ {
+ gdk_win32_hdc_release (drawable.Handle, gc.Handle, (int) usage);
+ }
+
+ public static bool RunModalWin32Dialog (CommonFileDialog dialog, Gtk.Window parent)
+ {
+ while (Gtk.Application.EventsPending ())
+ Gtk.Application.RunIteration ();
+
+ IntPtr ph = HgdiobjGet (parent.GdkWindow);
+
+ IntPtr hdlg = IntPtr.Zero;
+ dialog.DialogOpening += delegate {
+ try {
+ hdlg = GetDialogHandle (dialog);
+ SetGtkDialogHook (hdlg);
+ } catch (Exception ex) {
+ LoggingService.LogError ("Failed to hook win32 dialog messages", ex);
+ }
+ };
+
+ bool result;
+ try {
+ result = dialog.ShowDialog (ph) == CommonFileDialogResult.Ok;
+ } finally {
+ if (hdlg != IntPtr.Zero)
+ ClearGtkDialogHook (hdlg);
+ }
+ return result;
+ }
+
+ // logic based on run_mainloop_hook in gtkprintoperation-win32.c
+ static IntPtr GtkWindowProc (IntPtr hdlg, uint uiMsg, IntPtr wParam, IntPtr lParam)
+ {
+ if (uiMsg == GotGdkEventsMessage) {
+ while (Gtk.Application.EventsPending ())
+ Gtk.Application.RunIteration ();
+ return IntPtr.Zero;
+ }
+ return CallWindowProc (dialogWndProc, hdlg, uiMsg, wParam, lParam);
+ }
+
+ static IntPtr GetDialogHandle (CommonFileDialog dialog)
+ {
+ var f = typeof (CommonFileDialog).GetField ("nativeDialog", BindingFlags.NonPublic | BindingFlags.Instance);
+ var obj = f.GetValue (dialog);
+ var ow = (IOleWindow) obj;
+ IntPtr handle;
+ var hr = ow.GetWindow (out handle);
+ if (hr != 0)
+ throw Marshal.GetExceptionForHR (hr);
+ return handle;
+ }
+
+ static void SetGtkDialogHook (IntPtr hdlg)
+ {
+ if (dialogWndProc != IntPtr.Zero)
+ throw new InvalidOperationException ("There is already an active hook");
+ gdk_win32_set_modal_dialog_libgtk_only (hdlg);
+ dialogWndProc = GetWindowLongPtr (hdlg, DWLP_DLGPROC);
+ SetWindowLongPtr (hdlg, DWLP_DLGPROC, Marshal.GetFunctionPointerForDelegate (GtkWindowProcDelegate));
+ }
+
+ static void ClearGtkDialogHook (IntPtr hdlg)
+ {
+ gdk_win32_set_modal_dialog_libgtk_only (IntPtr.Zero);
+ if (dialogWndProc != IntPtr.Zero)
+ SetWindowLongPtr (hdlg, DWLP_DLGPROC, dialogWndProc);
+ dialogWndProc = IntPtr.Zero;
+ }
+
+ static IntPtr dialogWndProc;
+
+ static readonly WindowProc GtkWindowProcDelegate = GtkWindowProc;
+ static readonly int DWLP_DLGPROC = IntPtr.Size; // DWLP_MSGRESULT + sizeof(LRESULT);
+
+ [DllImport("user32.dll")]
+ static extern IntPtr CallWindowProc (IntPtr lpPrevWndFunc, IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
+
+ static IntPtr SetWindowLongPtr (IntPtr hWnd, int nIndex, IntPtr dwNewLong)
+ {
+ if (IntPtr.Size == 4)
+ return SetWindowLongPtr32 (hWnd, nIndex, dwNewLong);
+ return SetWindowLongPtr64 (hWnd, nIndex, dwNewLong);
+ }
+
+ [DllImport ("user32.dll", EntryPoint="SetWindowLongPtr")]
+ static extern IntPtr SetWindowLongPtr64 (IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+
+ [DllImport("user32.dll", EntryPoint="SetWindowLong")]
+ static extern IntPtr SetWindowLongPtr32 (IntPtr hWnd, int nIndex, IntPtr dwNewLong);
+
+ static IntPtr GetWindowLongPtr (IntPtr hWnd, int nIndex)
+ {
+ if (IntPtr.Size == 4)
+ return GetWindowLongPtr32 (hWnd, nIndex);
+ return GetWindowLongPtr64 (hWnd, nIndex);
+ }
+
+ [DllImport ("user32.dll", EntryPoint="GetWindowLongPtr")]
+ static extern IntPtr GetWindowLongPtr64 (IntPtr hWnd, int nIndex);
+
+ [DllImport("user32.dll", EntryPoint="GetWindowLong")]
+ static extern IntPtr GetWindowLongPtr32 (IntPtr hWnd, int nIndex);
+
+ delegate IntPtr WindowProc (IntPtr hdlg, uint uiMsg, IntPtr wParam, IntPtr lParam);
+ }
+
+
+ [ComImport]
+ [Guid("00000114-0000-0000-C000-000000000046")]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ interface IOleWindow
+ {
+ /// <summary>
+ /// Returns the window handle to one of the windows participating in in-place activation
+ /// (frame, document, parent, or in-place object window).
+ /// </summary>
+ /// <param name="phwnd">Pointer to where to return the window handle.</param>
+ int GetWindow (out IntPtr phwnd) ;
+
+ /// <summary>
+ /// Determines whether context-sensitive help mode should be entered during an
+ /// in-place activation session.
+ /// </summary>
+ /// <param name="fEnterMode"><c>true</c> if help mode should be entered;
+ /// <c>false</c> if it should be exited.</param>
+ void ContextSensitiveHelp ([In, MarshalAs(UnmanagedType.Bool)] bool fEnterMode) ;
+ }
+
+ [ComImport]
+ [Guid ( "b4db1657-70d7-485e-8e3e-6fcb5a5c1802" )]
+ [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+ interface IModalWindow
+ {
+ int Show ([In] IntPtr parent);
+ }
+
+ public class GtkWin32Proxy : IWin32Window
+ {
+ public GtkWin32Proxy (Gtk.Window gtkWindow)
+ {
+ Handle = GdkWin32.HgdiobjGet (gtkWindow.RootWindow);
+ }
+
+ public IntPtr Handle { get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/src/addins/WindowsPlatform/Makefile.in b/src/addins/WindowsPlatform/Makefile.in
index 66625b8..9a71764 100644
--- a/src/addins/WindowsPlatform/Makefile.in
+++ b/src/addins/WindowsPlatform/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/WindowsPlatform/WindowsPlatform.addin.xml b/src/addins/WindowsPlatform/WindowsPlatform.addin.xml
index 30e91f9..9c1bb06 100644
--- a/src/addins/WindowsPlatform/WindowsPlatform.addin.xml
+++ b/src/addins/WindowsPlatform/WindowsPlatform.addin.xml
@@ -6,15 +6,15 @@
url = "http://monodevelop.com/"
description = "Windows Platform Support for MonoDevelop"
category = "Platform Support"
- version = "4.0.5">
+ version = "4.0.12">
<Runtime>
<Import assembly="WindowsPlatform.dll"/>
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
</Dependencies>
diff --git a/src/addins/WindowsPlatform/WindowsPlatform.cs b/src/addins/WindowsPlatform/WindowsPlatform.cs
index aab22a3..6ff77f8 100644
--- a/src/addins/WindowsPlatform/WindowsPlatform.cs
+++ b/src/addins/WindowsPlatform/WindowsPlatform.cs
@@ -1,18 +1,46 @@
+//
+// WindowsPlatform.cs
+//
+// Author:
+// Jonathan Pobst <monkey at jpobst.com>
+// Lluis Sanchez Gual <lluis at novell.com>
+// Michael Hutchinson <m.j.hutchinson at gmail.com>
+//
+// Copyright (C) 2007-2011 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2012-2013 Xamarin Inc. (https://www.xamarin.com)
+//
+// 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.IO;
using System.Drawing;
using System.Drawing.Imaging;
-using System.Runtime.InteropServices;
-using System.Collections;
+using System.Runtime.InteropServices;
using System.Collections.Generic;
using Microsoft.Win32;
-using CustomControls.OS;
-using CustomControls.Controls;
-using System.Windows.Forms;
+using CustomControls.OS;
using MonoDevelop.Ide.Desktop;
using System.Diagnostics;
-using MonoDevelop.Core.Execution;
-
+using MonoDevelop.Core.Execution;
+
namespace MonoDevelop.Platform
{
public class WindowsPlatform : PlatformService
@@ -77,7 +105,7 @@ namespace MonoDevelop.Platform
string key = shinfo.iIcon.ToString () + " - " + shinfo.szDisplayName;
Gdk.Pixbuf pix;
if (!icons.TryGetValue (key, out pix)) {
- System.Drawing.Icon icon = System.Drawing.Icon.FromHandle (shinfo.hIcon);
+ var icon = Icon.FromHandle (shinfo.hIcon);
pix = CreateFromResource (icon.ToBitmap ());
icons[key] = pix;
}
@@ -174,15 +202,15 @@ namespace MonoDevelop.Platform
}
public override IProcessAsyncOperation StartConsoleProcess (string command, string arguments, string workingDirectory,
- IDictionary<string, string> environmentVariables,
+ IDictionary<string, string> environmentVariables,
string title, bool pauseWhenFinished)
{
string args = "/C \"title " + title + " && \"" + command + "\" " + arguments;
if (pauseWhenFinished)
- args += " & pause\"";
+ args += " & pause\"";
else
- args += "\"";
-
+ args += "\"";
+
var psi = new ProcessStartInfo ("cmd.exe", args) {
CreateNoWindow = false,
WorkingDirectory = workingDirectory,
@@ -190,53 +218,16 @@ namespace MonoDevelop.Platform
};
foreach (var env in environmentVariables)
psi.EnvironmentVariables [env.Key] = env.Value;
-
+
ProcessWrapper proc = new ProcessWrapper ();
proc.StartInfo = psi;
proc.Start ();
return proc;
- }
-
- protected override RecentFiles CreateRecentFilesProvider ()
- {
- return new MonoDevelop.Platform.WindowsRecentFiles ();
}
- }
-
- public static class GdkWin32
- {
- [System.Runtime.InteropServices.DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr gdk_win32_drawable_get_handle (IntPtr drawable);
-
- [System.Runtime.InteropServices.DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr gdk_win32_hdc_get (IntPtr drawable, IntPtr gc, int usage);
- [System.Runtime.InteropServices.DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
- static extern void gdk_win32_hdc_release (IntPtr drawable, IntPtr gc, int usage);
-
- public static IntPtr HgdiobjGet (Gdk.Drawable drawable)
- {
- return gdk_win32_drawable_get_handle (drawable.Handle);
- }
-
- public static IntPtr HdcGet (Gdk.Drawable drawable, Gdk.GC gc, Gdk.GCValuesMask usage)
- {
- return gdk_win32_hdc_get (drawable.Handle, gc.Handle, (int) usage);
- }
-
- public static void HdcRelease (Gdk.Drawable drawable, Gdk.GC gc, Gdk.GCValuesMask usage)
- {
- gdk_win32_hdc_release (drawable.Handle, gc.Handle, (int) usage);
- }
- }
-
- public class GtkWin32Proxy : IWin32Window
- {
- public GtkWin32Proxy (Gtk.Window gtkWindow)
+ protected override RecentFiles CreateRecentFilesProvider ()
{
- Handle = GdkWin32.HgdiobjGet (gtkWindow.RootWindow);
+ return new WindowsRecentFiles ();
}
-
- public IntPtr Handle { get; private set; }
}
}
diff --git a/src/addins/WindowsPlatform/WindowsPlatform.csproj b/src/addins/WindowsPlatform/WindowsPlatform.csproj
index be4ad32..5b6cc1f 100644
--- a/src/addins/WindowsPlatform/WindowsPlatform.csproj
+++ b/src/addins/WindowsPlatform/WindowsPlatform.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -44,6 +44,10 @@
<Reference Include="Microsoft.WindowsAPICodePack.Shell">
<HintPath>Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
+ <Reference Include="PresentationFramework" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="System.Xaml" />
+ <Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
@@ -90,6 +94,7 @@
</Compile>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Enums.cs" />
+ <Compile Include="GdkWin32.cs" />
<Compile Include="structs.cs" />
<Compile Include="Win32.cs" />
<Compile Include="WindowsPlatform.cs" />
diff --git a/src/addins/prj2make-sharp-lib/Makefile.in b/src/addins/prj2make-sharp-lib/Makefile.in
index 519220c..e70de41 100644
--- a/src/addins/prj2make-sharp-lib/Makefile.in
+++ b/src/addins/prj2make-sharp-lib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/addins/prj2make-sharp-lib/obj/Debug/prj2make-sharp-lib.csproj.FilesWrittenAbsolute.txt b/src/addins/prj2make-sharp-lib/obj/Debug/prj2make-sharp-lib.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..3e9aca1
--- /dev/null
+++ b/src/addins/prj2make-sharp-lib/obj/Debug/prj2make-sharp-lib.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/prj2make-sharp-lib/obj/Debug/prj2makesharplib.prj2make-sharp-lib.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.MsVisualStudio/MonoDevelop.MsVisualStudio.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/AddIns/MonoDevelop.MsVisualStudio/MonoDevelop.MsVisualStudio.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/prj2make-sharp-lib/obj/Debug/MonoDevelop.MsVisualStudio.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/addins/prj2make-sharp-lib/obj/Debug/MonoDevelop.MsVisualStudio.dll.mdb
diff --git a/src/addins/prj2make-sharp-lib/obj/Debug/prj2makesharplib.prj2make-sharp-lib.addin.xml b/src/addins/prj2make-sharp-lib/obj/Debug/prj2makesharplib.prj2make-sharp-lib.addin.xml
new file mode 100644
index 0000000..865600c
--- /dev/null
+++ b/src/addins/prj2make-sharp-lib/obj/Debug/prj2makesharplib.prj2make-sharp-lib.addin.xml
@@ -0,0 +1,23 @@
+<Addin id = "Prj2Make"
+ namespace = "MonoDevelop"
+ name = "Visual Studio .NET Project Support"
+ author = "Francisco 'Paco' Martinez, Ankit Jain"
+ copyright = "LGPL"
+ url = ""
+ description = "Importer for VS2003 projects"
+ category = "Project Import and Export"
+ version = "4.0.12">
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="CSharpBinding" version="4.0.12"/>
+ <Addin id="VBBinding" version="4.0.12"/>
+ </Dependencies>
+
+ <Extension path = "/MonoDevelop/ProjectModel/FileFormats">
+ <FileFormat id="VS2003ProjectFileFormat"
+ class="MonoDevelop.Prj2Make.VS2003ProjectFileFormat"/>
+ </Extension>
+</Addin>
+
diff --git a/src/addins/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml b/src/addins/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml
index 3bee223..865600c 100644
--- a/src/addins/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml
+++ b/src/addins/prj2make-sharp-lib/prj2make-sharp-lib.addin.xml
@@ -6,13 +6,13 @@
url = ""
description = "Importer for VS2003 projects"
category = "Project Import and Export"
- version = "4.0.5">
+ version = "4.0.12">
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
- <Addin id="Ide" version="4.0.5"/>
- <Addin id="CSharpBinding" version="4.0.5"/>
- <Addin id="VBBinding" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
+ <Addin id="Ide" version="4.0.12"/>
+ <Addin id="CSharpBinding" version="4.0.12"/>
+ <Addin id="VBBinding" version="4.0.12"/>
</Dependencies>
<Extension path = "/MonoDevelop/ProjectModel/FileFormats">
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index d6f8af7..3b02756 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -1,5 +1,4 @@
SUBDIRS = \
- Mono.Debugging \
MonoDevelop.Projects.Formats.MSBuild \
MonoDevelop.Core \
Mono.Texteditor \
diff --git a/src/core/Makefile.in b/src/core/Makefile.in
index b8897a3..a50220a 100644
--- a/src/core/Makefile.in
+++ b/src/core/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -225,7 +224,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = \
- Mono.Debugging \
MonoDevelop.Projects.Formats.MSBuild \
MonoDevelop.Core \
Mono.Texteditor \
@@ -266,11 +264,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -334,6 +332,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -397,6 +399,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -556,21 +572,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/core/Mono.Debugging/Makefile.in b/src/core/Mono.Debugging/Makefile.in
deleted file mode 100644
index 5046db2..0000000
--- a/src/core/Mono.Debugging/Makefile.in
+++ /dev/null
@@ -1,427 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/xbuild.include ChangeLog
-subdir = src/core/Mono.Debugging
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ACLOCAL_FLAGS = @ACLOCAL_FLAGS@
-ALL_LINGUAS = @ALL_LINGUAS@
-AMTAR = @AMTAR@
-ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CSC = @CSC@
-CSC_FLAGS = @CSC_FLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DYLD_FALLBACK_LIBRARY_PATH = @DYLD_FALLBACK_LIBRARY_PATH@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-GCONF_SHARP_CFLAGS = @GCONF_SHARP_CFLAGS@
-GCONF_SHARP_LIBS = @GCONF_SHARP_LIBS@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GLADE_SHARP_CFLAGS = @GLADE_SHARP_CFLAGS@
-GLADE_SHARP_LIBS = @GLADE_SHARP_LIBS@
-GLIB_SHARP_CFLAGS = @GLIB_SHARP_CFLAGS@
-GLIB_SHARP_LIBS = @GLIB_SHARP_LIBS@
-GNOME_SHARP_CFLAGS = @GNOME_SHARP_CFLAGS@
-GNOME_SHARP_LIBS = @GNOME_SHARP_LIBS@
-GNOME_VFS_SHARP_CFLAGS = @GNOME_VFS_SHARP_CFLAGS@
-GNOME_VFS_SHARP_LIBS = @GNOME_VFS_SHARP_LIBS@
-GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
-GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD_LIBRARY_PATH = @LD_LIBRARY_PATH@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_PREFIX = @LIB_PREFIX@
-LIB_SUFFIX = @LIB_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MCS = @MCS@
-MD_ADDIN_DIR = @MD_ADDIN_DIR@
-MD_ASSEMBLY_DIR = @MD_ASSEMBLY_DIR@
-MD_DIR = @MD_DIR@
-MKDIR_P = @MKDIR_P@
-MONO = @MONO@
-MONODOC_CFLAGS = @MONODOC_CFLAGS@
-MONODOC_LIBS = @MONODOC_LIBS@
-MONO_GAC_PREFIX = @MONO_GAC_PREFIX@
-MONO_NUNIT_CFLAGS = @MONO_NUNIT_CFLAGS@
-MONO_NUNIT_LIBS = @MONO_NUNIT_LIBS@
-MSGFMT = @MSGFMT@
-MSGMERGE = @MSGMERGE@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PACKAGE_VERSION_LABEL = @PACKAGE_VERSION_LABEL@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RUNTIME = @RUNTIME@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SQLITE_XML = @SQLITE_XML@
-STRIP = @STRIP@
-UNMANAGED_DEPENDENCIES_MONO_CFLAGS = @UNMANAGED_DEPENDENCIES_MONO_CFLAGS@
-UNMANAGED_DEPENDENCIES_MONO_LIBS = @UNMANAGED_DEPENDENCIES_MONO_LIBS@
-UPDATE_DESKTOP_DB = @UPDATE_DESKTOP_DB@
-UPDATE_MIME_DB = @UPDATE_MIME_DB@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gtksharp_prefix = @gtksharp_prefix@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ALL_CSPROJ = $(wildcard *.csproj)
-MAIN_SLN = $(top_builddir)/Main.sln
- at ENABLE_GNOMEPLATFORM_TRUE@PROFILE_NAME = Debug
- at ENABLE_MACPLATFORM_TRUE@PROFILE_NAME = DebugMac
- at ENABLE_WINDOWSPLATFORM_TRUE@PROFILE_NAME = DebugWin32
-XBUILD = xbuild
-XBUILD_VERBOSITY = quiet
-XBUILD_ARGS = /verbosity:$(XBUILD_VERBOSITY) /nologo /property:CodePage=65001
-XBUILD_PROFILE = /property:Configuration=$(PROFILE_NAME)
-
-# Figure out how far we are from top_builddir
-DEPTH = $(shell echo "$(top_builddir)" | tr '/' '\n' | grep -c '..')
-EXTS := *.bmp *.cs *.csproj *.html *.png *.snk *.config *.stetic *.glade *.xml *.xsd *.exe.addins *.template *.tt *.txt
-ALL_FILES := $(EXTS) \
- $(addprefix */,$(EXTS)) \
- $(addprefix */*/,$(EXTS)) \
- $(addprefix */*/*/,$(EXTS)) \
- $(addprefix */*/*/*/,$(EXTS)) \
- $(addprefix */*/*/*/*/,$(EXTS)) \
- $(wildcard icons/*) \
- $(wildcard templates/*)
-
-WILDCARDED_FILES := $(wildcard $(ALL_FILES))
-EXTRA_DIST = \
- $(wildcard $(ALL_FILES))
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/xbuild.include $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/core/Mono.Debugging/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/core/Mono.Debugging/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-$(top_srcdir)/xbuild.include:
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-all: csproj_build
-
-clean: csproj_clean
-
-csproj_build:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Building $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p; done \
- fi
-
-csproj_clean:
- @if test x$(SKIP) != xy -a $(DEPTH) -gt $(MAKELEVEL); then \
- echo Cleaning $(ALL_CSPROJ); \
- for p in $(ALL_CSPROJ); do $(XBUILD) $(XBUILD_ARGS) $$p /t:Clean; done \
- fi
-
-sln_build:
- @echo Building $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE)
-
-sln_clean:
- @echo Cleaning $(MAIN_SLN)
- $(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) $(XBUILD_PROFILE) /t:Clean
-
-print_extradist:
- @echo $(WILDCARDED_FILES)
-
-.PHONY: all clean csproj_build csproj_clean sln_build sln_clean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs b/src/core/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs
deleted file mode 100644
index ae381c3..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Backend/IBacktrace.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend
-{
- public interface IBacktrace
- {
- int FrameCount { get; }
- StackFrame[] GetStackFrames (int firstIndex, int lastIndex);
- ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options);
- ObjectValue[] GetParameters (int frameIndex, EvaluationOptions options);
- ObjectValue GetThisReference (int frameIndex, EvaluationOptions options);
- ExceptionInfo GetException (int frameIndex, EvaluationOptions options);
- ObjectValue[] GetAllLocals (int frameIndex, EvaluationOptions options);
- ObjectValue[] GetExpressionValues (int frameIndex, string[] expressions, EvaluationOptions options);
- CompletionData GetExpressionCompletionData (int frameIndex, string exp);
- AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count);
- ValidationResult ValidateExpression (int frameIndex, string expression, EvaluationOptions options);
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs b/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs
deleted file mode 100644
index 1abf0e6..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueSource.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-// IObjectValueSource.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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 Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend
-{
- public interface IObjectValueSource
- {
- ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options);
- EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options);
- ObjectValue GetValue (ObjectPath path, EvaluationOptions options);
-
- object GetRawValue (ObjectPath path, EvaluationOptions options);
- void SetRawValue (ObjectPath path, object value, EvaluationOptions options);
- }
-
- public interface IRawValue
- {
- object CallMethod (string name, object[] parameters, EvaluationOptions options);
- object GetMemberValue (string name, EvaluationOptions options);
- void SetMemberValue (string name, object value, EvaluationOptions options);
- }
-
- public interface IRawValueArray
- {
- object GetValue (int[] index);
- void SetValue (int[] index, object value);
- int[] Dimensions { get; }
- Array ToArray ();
- }
-
- public interface IRawValueString
- {
- string Substring (int index, int length);
- string Value { get; }
- int Length { get; }
- }
-
- [Serializable]
- public class EvaluationResult
- {
- public EvaluationResult (string value)
- {
- Value = value;
- }
-
- public EvaluationResult (string value, string displayValue)
- {
- Value = value;
- DisplayValue = displayValue;
- }
-
- public string Value { get; private set; }
- public string DisplayValue { get; private set; }
-
- public override string ToString ()
- {
- return Value;
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs b/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs
deleted file mode 100644
index c0443dd..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Backend/IObjectValueUpdater.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// IObjectValueUpdater.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// 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 Mono.Debugging.Client;
-
-namespace Mono.Debugging.Backend
-{
- public interface IObjectValueUpdater
- {
- void RegisterUpdateCallbacks (UpdateCallback[] callbacks);
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs
deleted file mode 100644
index 2f152db..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/Backtrace.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Client
-{
- [Serializable]
- public class Backtrace
- {
- IBacktrace serverBacktrace;
- int count;
-
- [NonSerialized]
- DebuggerSession session;
-
- List<StackFrame> frames;
-
- public Backtrace (IBacktrace serverBacktrace)
- {
- this.serverBacktrace = serverBacktrace;
-
- count = serverBacktrace.FrameCount;
-
- // Get some initial frames
- if (count > 0)
- GetFrame (0);
- }
-
- internal void Attach (DebuggerSession session)
- {
- this.session = session;
- if (frames != null) {
- foreach (StackFrame f in frames)
- f.Attach (session);
- }
- }
-
- public int FrameCount
- {
- get { return count; }
- }
-
- public StackFrame GetFrame (int n)
- {
- if (frames == null)
- frames = new List<StackFrame>();
-
- if (n >= frames.Count) {
- StackFrame[] newSet = serverBacktrace.GetStackFrames(frames.Count, n + 20);
- foreach (StackFrame sf in newSet) {
- sf.SourceBacktrace = serverBacktrace;
- sf.Index = frames.Count;
- frames.Add (sf);
- sf.Attach (session);
- }
- }
-
- if (frames.Count > 0)
- return frames[System.Math.Min (System.Math.Max (0, n), frames.Count - 1)];
-
- return null;
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs
deleted file mode 100644
index 5735895..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/BreakEventInfo.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-//
-// BreakEventInfo.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2011 Novell, Inc (http://www.novell.com)
-//
-// 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;
-
-namespace Mono.Debugging.Client
-{
- /// <summary>
- /// This class can be used to manage and get information about a breakpoint
- /// at debug-time. It is intended to be used by DebuggerSession subclasses.
- /// </summary>
- public class BreakEventInfo
- {
- DebuggerSession session;
- int adjustedColumn = -1;
- int adjustedLine = -1;
-
- /// <summary>
- /// Gets or sets the implementation specific handle of the breakpoint
- /// </summary>
- public object Handle { get; set; }
-
- /// <summary>
- /// Break event that this instance represents
- /// </summary>
- public BreakEvent BreakEvent { get; internal set; }
-
- /// <summary>
- /// Gets the status of the break event
- /// </summary>
- public BreakEventStatus Status { get; private set; }
-
- /// <summary>
- /// Gets a description of the status
- /// </summary>
- public string StatusMessage { get; private set; }
-
- internal void AttachSession (DebuggerSession s, BreakEvent ev)
- {
- session = s;
- BreakEvent = ev;
- session.NotifyBreakEventStatusChanged (BreakEvent);
- if (adjustedLine != -1 || adjustedColumn != -1)
- session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, adjustedLine, adjustedColumn);
- }
-
- /// <summary>
- /// Adjusts the location of a breakpoint
- /// </summary>
- /// <param name='newLine'>
- /// New line.
- /// </param>
- /// <remarks>
- /// This method can be used to temporarily change source code line of the breakpoint.
- /// This is useful, for example, when two adjacent lines are mapped to a single
- /// native offset. If the breakpoint is set to the first of those lines, the debugger
- /// might end stopping in the second line, because it has the same native offset.
- /// To avoid this confusion situation, the debugger implementation may decide to
- /// adjust the position of the breakpoint, and move it to the second line.
- /// This line adjustment has effect only during the debug session, and is automatically
- /// reset when it terminates.
- /// </remarks>
- public void AdjustBreakpointLocation (int newLine, int newColumn)
- {
- if (session != null) {
- session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, newLine, newColumn);
- } else {
- adjustedColumn = newColumn;
- adjustedLine = newLine;
- }
- }
-
- /// <summary>
- /// Increments the hit count.
- /// </summary>
- /// <returns><c>true</c> if the break event should trigger, or <c>false</c> otherwise.</returns>
- public bool HitCountReached
- {
- get {
- switch (BreakEvent.HitCountMode) {
- case HitCountMode.LessThan:
- return BreakEvent.CurrentHitCount < BreakEvent.HitCount;
- case HitCountMode.LessThanOrEqualTo:
- return BreakEvent.CurrentHitCount <= BreakEvent.HitCount;
- case HitCountMode.EqualTo:
- return BreakEvent.CurrentHitCount == BreakEvent.HitCount;
- case HitCountMode.GreaterThan:
- return BreakEvent.CurrentHitCount > BreakEvent.HitCount;
- case HitCountMode.GreaterThanOrEqualTo:
- return BreakEvent.CurrentHitCount >= BreakEvent.HitCount;
- default:
- return true;
- }
- }
- }
-
- public void IncrementHitCount ()
- {
- if (BreakEvent.HitCountMode != HitCountMode.None) {
- BreakEvent.CurrentHitCount++;
- BreakEvent.NotifyUpdate ();
- }
- }
-
- [Obsolete ("Use IncrementHitCount() instead")]
- public void UpdateHitCount (int count)
- {
- BreakEvent.CurrentHitCount = count;
- BreakEvent.NotifyUpdate ();
- }
-
- public void SetStatus (BreakEventStatus s, string statusMessage)
- {
- if (s != Status) {
- Status = s;
- StatusMessage = statusMessage;
- if (session != null)
- session.NotifyBreakEventStatusChanged (BreakEvent);
- }
- }
-
- public bool RunCustomBreakpointAction (string actionId)
- {
- BreakEventHitHandler h = session.CustomBreakEventHitHandler;
- return h != null && h (actionId, BreakEvent);
- }
-
- public void UpdateLastTraceValue (string value)
- {
- BreakEvent.LastTraceValue = value;
- BreakEvent.NotifyUpdate ();
- if (value != null) {
- if (session.BreakpointTraceHandler != null)
- session.BreakpointTraceHandler (BreakEvent, value);
- else
- session.OnDebuggerOutput (false, value + "\n");
- }
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
deleted file mode 100644
index a42f45f..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-// Breakpoint.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// 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.Xml;
-
-namespace Mono.Debugging.Client
-{
- [Serializable]
- public class Breakpoint: BreakEvent
- {
- bool breakIfConditionChanges;
- string conditionExpression;
- string lastConditionValue;
- int adjustedColumn = -1;
- int adjustedLine = -1;
- string fileName;
- int column;
- int line;
-
- public Breakpoint (string fileName, int line, int column)
- {
- FileName = fileName;
- Column = column;
- Line = line;
- }
-
- public Breakpoint (string fileName, int line) : this (fileName, line, 1)
- {
- }
-
- internal Breakpoint (XmlElement elem): base (elem)
- {
- string s = elem.GetAttribute ("file");
- if (!string.IsNullOrEmpty (s))
- fileName = s;
-
- s = elem.GetAttribute ("line");
- if (string.IsNullOrEmpty (s) || !int.TryParse (s, out line))
- line = 1;
-
- s = elem.GetAttribute ("column");
- if (string.IsNullOrEmpty (s) || !int.TryParse (s, out column))
- column = 1;
-
- s = elem.GetAttribute ("conditionExpression");
- if (!string.IsNullOrEmpty (s))
- conditionExpression = s;
-
- s = elem.GetAttribute ("breakIfConditionChanges");
- if (!string.IsNullOrEmpty (s) && !bool.TryParse (s, out breakIfConditionChanges))
- breakIfConditionChanges = false;
- }
-
- internal override XmlElement ToXml (XmlDocument doc)
- {
- XmlElement elem = base.ToXml (doc);
-
- if (!string.IsNullOrEmpty (fileName))
- elem.SetAttribute ("file", fileName);
-
- elem.SetAttribute ("line", line.ToString ());
- elem.SetAttribute ("column", column.ToString ());
-
- if (!string.IsNullOrEmpty (conditionExpression)) {
- elem.SetAttribute ("conditionExpression", conditionExpression);
- if (breakIfConditionChanges)
- elem.SetAttribute ("breakIfConditionChanges", "True");
- }
-
- return elem;
- }
-
- public string FileName {
- get { return fileName; }
- protected set { fileName = value; }
- }
-
- public int OriginalColumn {
- get { return column; }
- }
-
- public int Column {
- get { return adjustedColumn == -1 ? column : adjustedColumn; }
- protected set { column = value; }
- }
-
- public int OriginalLine {
- get { return line; }
- }
-
- public int Line {
- get { return adjustedLine == -1 ? line : adjustedLine; }
- protected set { line = value; }
- }
-
- public void SetColumn (int newColumn)
- {
- ResetAdjustedColumn ();
- column = newColumn;
- }
-
- public void SetLine (int newLine)
- {
- ResetAdjustedLine ();
- line = newLine;
- }
-
- internal void SetAdjustedColumn (int newColumn)
- {
- adjustedColumn = newColumn;
- }
-
- internal void SetAdjustedLine (int newLine)
- {
- adjustedLine = newLine;
- }
-
- // FIXME: make this private
- internal void ResetAdjustedColumn ()
- {
- adjustedColumn = -1;
- }
-
- // FIXME: make this private
- internal void ResetAdjustedLine ()
- {
- adjustedLine = -1;
- }
-
- public override bool Reset ()
- {
- bool changed = base.Reset () || HasAdjustedLine || HasAdjustedColumn;
-
- lastConditionValue = null;
- adjustedColumn = -1;
- adjustedLine = -1;
-
- return changed;
- }
-
- // FIXME: make this private
- internal bool HasAdjustedColumn {
- get { return adjustedColumn != -1; }
- }
-
- // FIXME: make this private
- internal bool HasAdjustedLine {
- get { return adjustedLine != -1; }
- }
-
- public string ConditionExpression {
- get {
- return conditionExpression;
- }
- set {
- conditionExpression = value;
- }
- }
-
- public string LastConditionValue {
- get {
- return lastConditionValue;
- }
- set {
- lastConditionValue = value;
- }
- }
-
- public bool BreakIfConditionChanges {
- get {
- return breakIfConditionChanges;
- }
- set {
- breakIfConditionChanges = value;
- }
- }
-
- public override void CopyFrom (BreakEvent ev)
- {
- base.CopyFrom (ev);
-
- Breakpoint bp = (Breakpoint) ev;
-
- breakIfConditionChanges = bp.breakIfConditionChanges;
- conditionExpression = bp.conditionExpression;
- fileName = bp.fileName;
- column = bp.column;
- line = bp.line;
- }
- }
-
- public enum HitCountMode {
- None,
- LessThan,
- LessThanOrEqualTo,
- EqualTo,
- GreaterThan,
- GreaterThanOrEqualTo
- }
-
- public enum HitAction
- {
- Break,
- PrintExpression,
- CustomAction
- }
-
- public delegate bool BreakEventHitHandler (string actionId, BreakEvent be);
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
deleted file mode 100644
index b9f3d34..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
+++ /dev/null
@@ -1,1522 +0,0 @@
-// DebuggerSession.cs
-//
-// Author:
-// Ankit Jain <jankit at novell.com>
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// 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 Mono.Debugging.Backend;
-using System.Diagnostics;
-using System.Threading;
-
-namespace Mono.Debugging.Client
-{
- public delegate void TargetEventHandler (object sender, TargetEventArgs args);
- public delegate void ProcessEventHandler(int process_id);
- public delegate void ThreadEventHandler(int thread_id);
- public delegate bool ExceptionHandler (Exception ex);
- public delegate string TypeResolverHandler (string identifier, SourceLocation location);
- public delegate void BreakpointTraceHandler (BreakEvent be, string trace);
- public delegate IExpressionEvaluator GetExpressionEvaluatorHandler (string extension);
- public delegate IConnectionDialog ConnectionDialogCreator ();
-
- public abstract class DebuggerSession: IDisposable
- {
- InternalDebuggerSession frontend;
- Dictionary<BreakEvent,BreakEventInfo> breakpoints = new Dictionary<BreakEvent,BreakEventInfo> ();
- BreakpointStore breakpointStore;
- OutputWriterDelegate outputWriter;
- OutputWriterDelegate logWriter;
- bool disposed;
- bool attached;
- bool ownedBreakpointStore;
- object slock = new object ();
- object olock = new object ();
- ThreadInfo activeThread;
- BreakEventHitHandler customBreakpointHitHandler;
- ExceptionHandler exceptionHandler;
- DebuggerSessionOptions options;
- Dictionary<string,string> resolvedExpressionCache = new Dictionary<string, string> ();
- bool adjustingBreakpoints;
-
- ProcessInfo[] currentProcesses;
-
- /// <summary>
- /// Reports a debugger event
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetEvent;
-
- /// <summary>
- /// Raised when the debugger resumes execution after being stopped
- /// </summary>
- public event EventHandler TargetStarted;
-
- /// <summary>
- /// Raised when the underlying debugging engine has been initialized and it is ready to start execution.
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetReady;
-
- /// <summary>
- /// Raised when the debugging session is paused
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetStopped;
-
- /// <summary>
- /// Raised when the execution is interrupted by an external event
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetInterrupted;
-
- /// <summary>
- /// Raised when a breakpoint is hit
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetHitBreakpoint;
-
- /// <summary>
- /// Raised when the execution is interrupted due to receiving a signal
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetSignaled;
-
- /// <summary>
- /// Raised when the debugged process exits
- /// </summary>
- public event EventHandler TargetExited;
-
- /// <summary>
- /// Raised when an exception for which there is a catchpoint is thrown
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetExceptionThrown;
-
- /// <summary>
- /// Raised when an exception is unhandled
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetUnhandledException;
-
- /// <summary>
- /// Raised when a thread is started in the debugged process
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetThreadStarted;
-
- /// <summary>
- /// Raised when a thread is stopped in the debugged process
- /// </summary>
- public event EventHandler<TargetEventArgs> TargetThreadStopped;
-
- /// <summary>
- /// Raised when the 'busy state' of the debugger changes.
- /// The debugger may switch to busy state if it is in the middle
- /// of an expression evaluation which can't be aborted.
- /// </summary>
- public event EventHandler<BusyStateEventArgs> BusyStateChanged;
-
- public DebuggerSession ()
- {
- UseOperationThread = true;
- frontend = new InternalDebuggerSession (this);
- }
-
- /// <summary>
- /// Releases all resource used by the <see cref="Mono.Debugging.Client.DebuggerSession"/> object.
- /// </summary>
- /// <remarks>
- /// Call <see cref="Dispose"/> when you are finished using the <see cref="Mono.Debugging.Client.DebuggerSession"/>.
- /// The <see cref="Dispose"/> method leaves the <see cref="Mono.Debugging.Client.DebuggerSession"/> in an unusable
- /// state. After calling <see cref="Dispose"/>, you must release all references to the
- /// <see cref="Mono.Debugging.Client.DebuggerSession"/> so the garbage collector can reclaim the memory that the
- /// <see cref="Mono.Debugging.Client.DebuggerSession"/> was occupying.
- /// </remarks>
- public virtual void Dispose ()
- {
- Dispatch (delegate {
- if (!disposed) {
- disposed = true;
- if (!ownedBreakpointStore)
- Breakpoints = null;
- }
- });
- }
-
- /// <summary>
- /// Gets or sets an exception handler to be invoked when an exception is raised by the debugger engine.
- /// </summary>
- /// <remarks>
- /// Notice that this handler will be used to report exceptions in the debugger, not exceptions raised
- /// in the debugged process.
- /// </remarks>
- public ExceptionHandler ExceptionHandler {
- get { return exceptionHandler; }
- set { exceptionHandler = value; }
- }
-
- /// <summary>
- /// Gets or sets the connection dialog creator callback.
- /// </summary>
- public ConnectionDialogCreator ConnectionDialogCreator { get; set; }
-
- /// <summary>
- /// Gets or sets the breakpoint trace handler.
- /// </summary>
- /// <remarks>
- /// This handler is invoked when the value of a tracepoint has to be printed
- /// </remarks>
- public BreakpointTraceHandler BreakpointTraceHandler { get; set; }
-
- /// <summary>
- /// Gets or sets the type resolver handler.
- /// </summary>
- /// <remarks>
- /// This handler is invoked when the expression evaluator needs to resolve a type name.
- /// </remarks>
- public TypeResolverHandler TypeResolverHandler { get; set; }
-
- /// <summary>
- /// Gets or sets the an expression evaluator provider
- /// </summary>
- /// <remarks>
- /// This handler is invoked when the debugger needs to get an evaluator for a specific type of file
- /// </remarks>
- public GetExpressionEvaluatorHandler GetExpressionEvaluator { get; set; }
-
- /// <summary>
- /// Gets or sets the custom break event hit handler.
- /// </summary>
- /// <remarks>
- /// This handler is invoked when a custom breakpoint is hit to determine if the debug session should
- /// continue or stop.
- /// </remarks>
- public BreakEventHitHandler CustomBreakEventHitHandler {
- get {
- return customBreakpointHitHandler;
- }
- set {
- customBreakpointHitHandler = value;
- }
- }
-
- /// <summary>
- /// Gets or sets the breakpoint store for the debugger session.
- /// </summary>
- public BreakpointStore Breakpoints {
- get {
- lock (slock) {
- if (breakpointStore == null) {
- Breakpoints = new BreakpointStore ();
- ownedBreakpointStore = true;
- }
- return breakpointStore;
- }
- }
- set {
- lock (slock) {
- if (breakpointStore != null) {
- foreach (BreakEvent bp in breakpointStore) {
- RemoveBreakEvent (bp);
- NotifyBreakEventStatusChanged (bp);
- }
- breakpointStore.BreakEventAdded -= OnBreakpointAdded;
- breakpointStore.BreakEventRemoved -= OnBreakpointRemoved;
- breakpointStore.BreakEventModified -= OnBreakpointModified;
- breakpointStore.BreakEventEnableStatusChanged -= OnBreakpointStatusChanged;
- breakpointStore.CheckingReadOnly -= BreakpointStoreCheckingReadOnly;
- breakpointStore.ResetAdjustedBreakpoints ();
- }
-
- breakpointStore = value;
- ownedBreakpointStore = false;
-
- if (breakpointStore != null) {
- if (IsConnected) {
- foreach (BreakEvent bp in breakpointStore)
- AddBreakEvent (bp);
- }
- breakpointStore.BreakEventAdded += OnBreakpointAdded;
- breakpointStore.BreakEventRemoved += OnBreakpointRemoved;
- breakpointStore.BreakEventModified += OnBreakpointModified;
- breakpointStore.BreakEventEnableStatusChanged += OnBreakpointStatusChanged;
- breakpointStore.CheckingReadOnly += BreakpointStoreCheckingReadOnly;
- }
- }
- }
- }
-
- void Dispatch (Action action)
- {
- if (UseOperationThread) {
- ThreadPool.QueueUserWorkItem (delegate {
- lock (slock) {
- action ();
- }
- });
- } else {
- lock (slock) {
- action ();
- }
- }
- }
-
- /// <summary>
- /// Starts a debugging session
- /// </summary>
- /// <param name='startInfo'>
- /// Startup information
- /// </param>
- /// <param name='options'>
- /// Session options
- /// </param>
- /// <exception cref='ArgumentNullException'>
- /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
- /// </exception>
- public void Run (DebuggerStartInfo startInfo, DebuggerSessionOptions options)
- {
- if (startInfo == null)
- throw new ArgumentNullException ("startInfo");
- if (options == null)
- throw new ArgumentNullException ("options");
-
- lock (slock) {
- this.options = options;
- OnRunning ();
- Dispatch (delegate {
- try {
- OnRun (startInfo);
- } catch (Exception ex) {
- ForceExit ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Starts a debugging session by attaching the debugger to a running process
- /// </summary>
- /// <param name='proc'>
- /// Process information
- /// </param>
- /// <param name='options'>
- /// Debugging options
- /// </param>
- /// <exception cref='ArgumentNullException'>
- /// Is thrown when an argument passed to a method is invalid because it is <see langword="null" /> .
- /// </exception>
- public void AttachToProcess (ProcessInfo proc, DebuggerSessionOptions options)
- {
- if (proc == null)
- throw new ArgumentNullException ("proc");
- if (options == null)
- throw new ArgumentNullException ("options");
-
- lock (slock) {
- this.options = options;
- OnRunning ();
- Dispatch (delegate {
- try {
- OnAttachToProcess (proc.Id);
- attached = true;
- } catch (Exception ex) {
- ForceExit ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Detaches this debugging session from the debugged process
- /// </summary>
- public void Detach ()
- {
- lock (slock) {
- try {
- OnDetach ();
- } catch (Exception ex) {
- if (!HandleException (ex))
- throw;
- }
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this <see cref="Mono.Debugging.Client.DebuggerSession"/> has been attached to a process using the Attach method.
- /// </summary>
- /// <value>
- /// <c>true</c> if attached to process; otherwise, <c>false</c>.
- /// </value>
- public bool AttachedToProcess {
- get {
- lock (slock) {
- return attached;
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the active thread.
- /// </summary>
- /// <remarks>
- /// This property can only be used when the debugger is paused
- /// </remarks>
- public ThreadInfo ActiveThread {
- get {
- lock (slock) {
- return activeThread;
- }
- }
- set {
- lock (slock) {
- try {
- activeThread = value;
- OnSetActiveThread (activeThread.ProcessId, activeThread.Id);
- } catch (Exception ex) {
- if (!HandleException (ex))
- throw;
- }
- }
- }
- }
-
-
- /// <summary>
- /// Executes one line of code
- /// </summary>
- public void NextLine ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnNextLine ();
- } catch (Exception ex) {
- ForceStop ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Executes one line of code, stepping into method invocations
- /// </summary>
- public void StepLine ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnStepLine ();
- } catch (Exception ex) {
- ForceStop ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Executes one low level instruction
- /// </summary>
- public void NextInstruction ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnNextInstruction ();
- } catch (Exception ex) {
- ForceStop ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Executes one low level instruction, stepping into method invocations
- /// </summary>
- public void StepInstruction ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnStepInstruction ();
- } catch (Exception ex) {
- ForceStop ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Resumes the execution of the debugger and stops when the current method is exited
- /// </summary>
- public void Finish ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnFinish ();
- } catch (Exception ex) {
- ForceExit ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Returns the status of a breakpoint for this debugger session.
- /// </summary>
- public BreakEventStatus GetBreakEventStatus (BreakEvent be)
- {
- if (IsConnected) {
- BreakEventInfo binfo;
- lock (breakpoints) {
- if (breakpoints.TryGetValue (be, out binfo))
- return binfo.Status;
- }
- }
- return BreakEventStatus.NotBound;
- }
-
- /// <summary>
- /// Returns a status message of a breakpoint for this debugger session.
- /// </summary>
- public string GetBreakEventStatusMessage (BreakEvent be)
- {
- if (IsConnected) {
- BreakEventInfo binfo;
- lock (breakpoints) {
- if (breakpoints.TryGetValue (be, out binfo)) {
- if (binfo.StatusMessage != null)
- return binfo.StatusMessage;
- switch (binfo.Status) {
- case BreakEventStatus.BindError: return "The breakpoint could not be bound";
- case BreakEventStatus.Bound: return "";
- case BreakEventStatus.Disconnected: return "";
- case BreakEventStatus.Invalid: return "The breakpoint location is invalid. Perhaps the source line does " +
- "not contain any statements, or the source does not correspond to the current binary";
- case BreakEventStatus.NotBound: return "The breakpoint could not yet be bound to a valid location";
- }
- }
- }
- }
- return "The breakpoint will not currently be hit";
- }
-
- void AddBreakEvent (BreakEvent be)
- {
- try {
- var eventInfo = OnInsertBreakEvent (be);
- if (eventInfo == null)
- throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
- lock (breakpoints) {
- breakpoints [be] = eventInfo;
- }
- eventInfo.AttachSession (this, be);
- } catch (Exception ex) {
- string msg;
-
- if (be is FunctionBreakpoint)
- msg = "Could not set breakpoint at location '" + ((FunctionBreakpoint) be).FunctionName + ":" + ((FunctionBreakpoint) be).Line + "'";
- else if (be is Breakpoint)
- msg = "Could not set breakpoint at location '" + ((Breakpoint) be).FileName + ":" + ((Breakpoint) be).Line + "'";
- else
- msg = "Could not set catchpoint for exception '" + ((Catchpoint) be).ExceptionName + "'";
-
- msg += " (" + ex.Message + ")";
- OnDebuggerOutput (false, msg + "\n");
- HandleException (ex);
- return;
- }
- }
-
- bool RemoveBreakEvent (BreakEvent be)
- {
- lock (breakpoints) {
- BreakEventInfo binfo;
- if (breakpoints.TryGetValue (be, out binfo)) {
- try {
- OnRemoveBreakEvent (binfo);
- } catch (Exception ex) {
- if (IsConnected)
- OnDebuggerOutput (false, ex.Message);
- HandleException (ex);
- return false;
- }
- breakpoints.Remove (be);
- }
- return true;
- }
- }
-
- void UpdateBreakEventStatus (BreakEvent be)
- {
- lock (breakpoints) {
- BreakEventInfo binfo;
- if (breakpoints.TryGetValue (be, out binfo)) {
- try {
- OnEnableBreakEvent (binfo, be.Enabled);
- } catch (Exception ex) {
- if (IsConnected)
- OnDebuggerOutput (false, ex.Message);
- HandleException (ex);
- }
- }
- }
- }
-
- void UpdateBreakEvent (BreakEvent be)
- {
- lock (breakpoints) {
- BreakEventInfo binfo;
- if (breakpoints.TryGetValue (be, out binfo))
- OnUpdateBreakEvent (binfo);
- }
- }
-
- void OnBreakpointAdded (object s, BreakEventArgs args)
- {
- lock (breakpoints) {
- if (adjustingBreakpoints)
- return;
- }
- lock (slock) {
- if (IsConnected)
- AddBreakEvent (args.BreakEvent);
- }
- }
-
- void OnBreakpointRemoved (object s, BreakEventArgs args)
- {
- lock (breakpoints) {
- if (adjustingBreakpoints)
- return;
- }
- lock (slock) {
- if (IsConnected)
- RemoveBreakEvent (args.BreakEvent);
- }
- }
-
- void OnBreakpointModified (object s, BreakEventArgs args)
- {
- lock (slock) {
- if (IsConnected)
- UpdateBreakEvent (args.BreakEvent);
- }
- }
-
- void OnBreakpointStatusChanged (object s, BreakEventArgs args)
- {
- lock (slock) {
- if (IsConnected)
- UpdateBreakEventStatus (args.BreakEvent);
- }
- }
-
- void BreakpointStoreCheckingReadOnly (object sender, ReadOnlyCheckEventArgs e)
- {
- // When this used 'lock', it was a common cause of deadlocks, as it is called on a timeout from the GUI
- // thread, so if something else held the session lock, the GUI would deadlock. Instead we use TryEnter,
- // so the worst that can happen is that users won't be able to modify breakpoints.
- //FIXME: why do we always lock accesses to AllowBreakEventChanges? Only MonoDebuggerSession needs it locked.
- bool entered = false;
- try {
- entered = Monitor.TryEnter (slock, TimeSpan.FromMilliseconds (10));
- e.SetReadOnly (!entered || !AllowBreakEventChanges);
- } finally {
- if (entered)
- Monitor.Exit (slock);
- }
- }
-
- /// <summary>
- /// Gets the debugger options object
- /// </summary>
- public DebuggerSessionOptions Options {
- get { return options; }
- }
-
- /// <summary>
- /// Gets or sets the evaluation options.
- /// </summary>
- public EvaluationOptions EvaluationOptions {
- get { return options.EvaluationOptions; }
- set { options.EvaluationOptions = value; }
- }
-
- /// <summary>
- /// Resumes the execution of the debugger
- /// </summary>
- public void Continue ()
- {
- lock (slock) {
- OnRunning ();
- Dispatch (delegate {
- try {
- OnContinue ();
- } catch (Exception ex) {
- ForceStop ();
- if (!HandleException (ex))
- throw;
- }
- });
- }
- }
-
- /// <summary>
- /// Pauses the execution of the debugger
- /// </summary>
- public void Stop ()
- {
- Dispatch (delegate {
- try {
- OnStop ();
- } catch (Exception ex) {
- if (!HandleException (ex))
- throw;
- }
- });
- }
-
- /// <summary>
- /// Stops the execution of the debugger by killing the debugged process
- /// </summary>
- public void Exit ()
- {
- Dispatch (delegate {
- try {
- OnExit ();
- } catch (Exception ex) {
- if (!HandleException (ex))
- throw;
- }
- });
- }
-
- /// <summary>
- /// Gets a value indicating whether the debuggee is currently connected
- /// </summary>
- public bool IsConnected {
- get; private set;
- }
-
- /// <summary>
- /// Gets a value indicating whether the debuggee is currently running (not paused by the debugger)
- /// </summary>
- public bool IsRunning {
- get; private set;
- }
-
- /// <summary>
- /// Gets a value indicating whether the debuggee has exited.
- /// </summary>
- public bool HasExited {
- get; protected set;
- }
-
- /// <summary>
- /// Gets a list of all processes
- /// </summary>
- /// <remarks>
- /// This method can only be used when the debuggee is stopped by the debugger
- /// </remarks>
- public ProcessInfo[] GetProcesses ()
- {
- lock (slock) {
- if (currentProcesses == null) {
- currentProcesses = OnGetProcesses ();
- foreach (ProcessInfo p in currentProcesses)
- p.Attach (this);
- }
- return currentProcesses;
- }
- }
-
- /// <summary>
- /// Gets or sets the output writer callback.
- /// </summary>
- /// <remarks>
- /// This callback is invoked to print debuggee output
- /// </remarks>
- public OutputWriterDelegate OutputWriter {
- get { return outputWriter; }
- set {
- lock (olock) {
- outputWriter = value;
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the log writer.
- /// </summary>
- /// <remarks>
- /// This callback is invoked to print debugger log messages
- /// </remarks>
- public OutputWriterDelegate LogWriter {
- get { return logWriter; }
- set {
- lock (olock) {
- logWriter = value;
- }
- }
- }
-
- /// <summary>
- /// Gets the disassembly of a source code file
- /// </summary>
- /// <returns>
- /// An array of AssemblyLine, with one element for each source code line that could be disassembled
- /// </returns>
- /// <param name='file'>
- /// The file.
- /// </param>
- /// <remarks>
- /// This method can only be used when the debuggee is stopped by the debugger
- /// </remarks>
- public AssemblyLine[] DisassembleFile (string file)
- {
- lock (slock) {
- return OnDisassembleFile (file);
- }
- }
-
- public string ResolveExpression (string expression, string file, int line, int column)
- {
- return ResolveExpression (expression, new SourceLocation (null, file, line, column));
- }
-
- public virtual string ResolveExpression (string expression, SourceLocation location)
- {
- if (TypeResolverHandler == null)
- return expression;
- else {
- string key = expression + " " + location;
- string resolved;
- if (!resolvedExpressionCache.TryGetValue (key, out resolved)) {
- try {
- resolved = OnResolveExpression (expression, location);
- } catch (Exception ex) {
- OnDebuggerOutput (true, "Error while resolving expression: " + ex.Message);
- }
- resolvedExpressionCache [key] = resolved;
- }
- return resolved ?? expression;
- }
- }
-
- /// <summary>
- /// Stops the execution of background evaluations being done by the debugger
- /// </summary>
- /// <remarks>
- /// This method can only be used when the debuggee is stopped by the debugger
- /// </remarks>
- public void CancelAsyncEvaluations ()
- {
- if (UseOperationThread) {
- ThreadPool.QueueUserWorkItem (delegate {
- OnCancelAsyncEvaluations ();
- });
- } else
- OnCancelAsyncEvaluations ();
- }
-
- /// <summary>
- /// Gets a value indicating whether there are background evaluations being done by the debugger
- /// which can be cancelled.
- /// </summary>
- /// <remarks>
- /// This method can only be used when the debuggee is stopped by the debugger
- /// </remarks>
- public virtual bool CanCancelAsyncEvaluations {
- get { return false; }
- }
-
- /// <summary>
- /// Override to stop the execution of background evaluations being done by the debugger
- /// </summary>
- protected virtual void OnCancelAsyncEvaluations ()
- {
- }
-
- Mono.Debugging.Evaluation.ExpressionEvaluator defaultResolver = new Mono.Debugging.Evaluation.NRefactoryExpressionEvaluator ();
- Dictionary <string, IExpressionEvaluator> evaluators = new Dictionary <string, IExpressionEvaluator> ();
-
- internal IExpressionEvaluator FindExpressionEvaluator (StackFrame frame)
- {
- if (GetExpressionEvaluator == null)
- return null;
-
- string fn = frame.SourceLocation == null ? null : frame.SourceLocation.FileName;
- if (String.IsNullOrEmpty (fn))
- return null;
-
- fn = System.IO.Path.GetExtension (fn);
- IExpressionEvaluator result;
- if (evaluators.TryGetValue (fn, out result))
- return result;
-
- result = GetExpressionEvaluator(fn);
-
- evaluators[fn] = result;
-
- return result;
- }
-
- public Mono.Debugging.Evaluation.ExpressionEvaluator GetEvaluator (StackFrame frame)
- {
- IExpressionEvaluator result = FindExpressionEvaluator (frame);
- if (result == null)
- return defaultResolver;
- return result.Evaluator;
- }
-
-
- /// <summary>
- /// Called when an expression needs to be resolved
- /// </summary>
- /// <param name='expression'>
- /// The expression
- /// </param>
- /// <param name='location'>
- /// The source code location
- /// </param>
- /// <returns>
- /// The resolved expression
- /// </returns>
- protected virtual string OnResolveExpression (string expression, SourceLocation location)
- {
- return defaultResolver.Resolve (this, location, expression);
- }
-
- internal protected string ResolveIdentifierAsType (string identifier, SourceLocation location)
- {
- if (TypeResolverHandler != null)
- return TypeResolverHandler (identifier, location);
-
- return null;
- }
-
- internal ThreadInfo[] GetThreads (long processId)
- {
- lock (slock) {
- ThreadInfo[] threads = OnGetThreads (processId);
- foreach (ThreadInfo t in threads)
- t.Attach (this);
- return threads;
- }
- }
-
- internal Backtrace GetBacktrace (long processId, long threadId)
- {
- lock (slock) {
- Backtrace bt = OnGetThreadBacktrace (processId, threadId);
- if (bt != null)
- bt.Attach (this);
- return bt;
- }
- }
-
- void ForceStop ()
- {
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetStopped);
- OnTargetEvent (args);
- }
-
- void ForceExit ()
- {
- TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetExited);
- OnTargetEvent (args);
- }
-
- internal protected void OnTargetEvent (TargetEventArgs args)
- {
- currentProcesses = null;
-
- if (args.Process != null)
- args.Process.Attach (this);
- if (args.Thread != null) {
- args.Thread.Attach (this);
- activeThread = args.Thread;
- }
- if (args.Backtrace != null)
- args.Backtrace.Attach (this);
-
- EventHandler<TargetEventArgs> evnt = null;
- switch (args.Type) {
- case TargetEventType.ExceptionThrown:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetExceptionThrown;
- break;
- case TargetEventType.TargetExited:
- lock (slock) {
- IsRunning = false;
- IsConnected = false;
- HasExited = true;
- }
- EventHandler handler = TargetExited;
- if (handler != null)
- handler (this, args);
- break;
- case TargetEventType.TargetHitBreakpoint:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetHitBreakpoint;
- break;
- case TargetEventType.TargetInterrupted:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetInterrupted;
- break;
- case TargetEventType.TargetSignaled:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetSignaled;
- break;
- case TargetEventType.TargetStopped:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetStopped;
- break;
- case TargetEventType.UnhandledException:
- lock (slock) {
- IsRunning = false;
- args.IsStopEvent = true;
- }
- evnt = TargetUnhandledException;
- break;
- case TargetEventType.TargetReady:
- evnt = TargetReady;
- break;
- case TargetEventType.ThreadStarted:
- evnt = TargetThreadStarted;
- break;
- case TargetEventType.ThreadStopped:
- evnt = TargetThreadStopped;
- break;
- }
-
- if (evnt != null)
- evnt (this, args);
-
- EventHandler<TargetEventArgs> targetEvent = TargetEvent;
- if (targetEvent != null)
- targetEvent (this, args);
- }
-
- internal void OnRunning ()
- {
- IsRunning = true;
- if (TargetStarted != null)
- TargetStarted (this, EventArgs.Empty);
- }
-
- internal protected void OnStarted ()
- {
- OnStarted (null);
- }
-
- internal protected virtual void OnStarted (ThreadInfo t)
- {
- if (HasExited)
- return;
-
- OnTargetEvent (new TargetEventArgs (TargetEventType.TargetReady) { Thread = t });
-
- lock (slock) {
- if (!HasExited) {
- IsConnected = true;
- foreach (BreakEvent bp in breakpointStore)
- AddBreakEvent (bp);
- }
- }
- }
-
- internal protected void OnTargetOutput (bool isStderr, string text)
- {
- lock (olock) {
- if (outputWriter != null)
- outputWriter (isStderr, text);
- }
- }
-
- internal protected void OnDebuggerOutput (bool isStderr, string text)
- {
- lock (olock) {
- if (logWriter != null)
- logWriter (isStderr, text);
- }
- }
-
- internal protected void SetBusyState (BusyStateEventArgs args)
- {
- if (BusyStateChanged != null)
- BusyStateChanged (this, args);
- }
-
- /// <summary>
- /// Tries to bind all unbound breakpoints of a source file
- /// </summary>
- /// <param name='fullFilePath'>
- /// Source file path
- /// </param>
- /// <remarks>
- /// This method can be called by a subclass to ask the debugger session to attempt
- /// to bind all unbound breakpoints defined on the given file. This method could
- /// be called, for example, when a new assembly that contains this file is loaded
- /// into memory. It is not necessary to use this method if the subclass keeps
- /// track of unbound breakpoints by itself.
- /// </remarks>
- internal protected void BindSourceFileBreakpoints (string fullFilePath)
- {
- lock (breakpoints) {
- // Make a copy of the breakpoints table since it can be modified while iterating
- Dictionary<BreakEvent, BreakEventInfo> breakpointsCopy = new Dictionary<BreakEvent, BreakEventInfo> (breakpoints);
- foreach (KeyValuePair<BreakEvent, BreakEventInfo> bps in breakpointsCopy) {
- Breakpoint bp = bps.Key as Breakpoint;
- if (bp != null && bps.Value.Status == BreakEventStatus.NotBound) {
- if (string.Compare (System.IO.Path.GetFullPath (bp.FileName), fullFilePath, System.IO.Path.DirectorySeparatorChar == '\\') == 0)
- RetryEventBind (bps.Value);
- }
- }
- }
- }
-
- void RetryEventBind (BreakEventInfo binfo)
- {
- // Try inserting the breakpoint again
- BreakEvent be = binfo.BreakEvent;
- try {
- binfo = OnInsertBreakEvent (be);
- if (binfo == null)
- throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
- lock (breakpoints) {
- breakpoints [be] = binfo;
- }
- binfo.AttachSession (this, be);
- } catch (Exception ex) {
- Breakpoint bp = be as Breakpoint;
- if (bp != null)
- OnDebuggerOutput (false, "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + " (" + ex.Message + ")\n");
- else
- OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "' (" + ex.Message + ")\n");
- HandleException (ex);
- }
- }
-
- /// <summary>
- /// Unbinds all bound breakpoints of a source file
- /// </summary>
- /// <param name='fullFilePath'>
- /// The source file path
- /// </param>
- /// <remarks>
- /// This method can be called by a subclass to ask the debugger session to
- /// unbind all bound breakpoints defined on the given file. This method could
- /// be called, for example, when an assembly that contains this file is unloaded
- /// from memory. It is not necessary to use this method if the subclass keeps
- /// track of unbound breakpoints by itself.
- /// </remarks>
- internal protected void UnbindSourceFileBreakpoints (string fullFilePath)
- {
- List<BreakEventInfo> toUpdate = new List<BreakEventInfo> ();
- lock (breakpoints) {
- // Make a copy of the breakpoints table since it can be modified while iterating
- Dictionary<BreakEvent, BreakEventInfo> breakpointsCopy = new Dictionary<BreakEvent, BreakEventInfo> (breakpoints);
- foreach (KeyValuePair<BreakEvent, BreakEventInfo> bps in breakpointsCopy) {
- Breakpoint bp = bps.Key as Breakpoint;
- if (bp != null && bps.Value.Status == BreakEventStatus.Bound) {
- if (System.IO.Path.GetFullPath (bp.FileName) == fullFilePath)
- toUpdate.Add (bps.Value);
- }
- }
- foreach (BreakEventInfo be in toUpdate) {
- breakpoints.Remove (be.BreakEvent);
- NotifyBreakEventStatusChanged (be.BreakEvent);
- }
- }
- }
-
- internal void NotifyBreakEventStatusChanged (BreakEvent be)
- {
- var s = GetBreakEventStatus (be);
- if (s == BreakEventStatus.BindError || s == BreakEventStatus.Invalid)
- OnDebuggerOutput (true, GetBreakEventErrorMessage (be) + ": " + GetBreakEventStatusMessage (be) + "\n");
- Breakpoints.NotifyStatusChanged (be);
- }
-
- string GetBreakEventErrorMessage (BreakEvent be)
- {
- Breakpoint bp = be as Breakpoint;
- if (bp != null)
- return string.Format ("Could not insert breakpoint at '{0}:{1}'", bp.FileName, bp.Line);
- Catchpoint cp = (Catchpoint) be;
- return string.Format ("Could not enable catchpoint for exception '{0}'", cp.ExceptionName);
- }
-
- /// <summary>
- /// Reports an unhandled exception in the debugger
- /// </summary>
- /// <returns>
- /// True if the debugger engine handles the exception. False otherwise.
- /// </returns>
- /// <param name='ex'>
- /// The exception
- /// </param>
- /// <remarks>
- /// This method can be used by subclasses to report errors in the debugger that must be reported
- /// to the user.
- /// </remarks>
- protected virtual bool HandleException (Exception ex)
- {
- if (exceptionHandler != null)
- return exceptionHandler (ex);
-
- return false;
- }
-
- internal void AdjustBreakpointLocation (Breakpoint b, int newLine, int newColumn)
- {
- lock (breakpoints) {
- try {
- adjustingBreakpoints = true;
- Breakpoints.AdjustBreakpointLine (b, newLine, newColumn);
- } finally {
- adjustingBreakpoints = false;
- }
- }
- }
-
- /// <summary>
- /// When set, operations such as OnRun, OnAttachToProcess, OnStepLine, etc, are run in
- /// a background thread, so it will not block the caller of the corresponding public methods.
- /// </summary>
- protected bool UseOperationThread { get; set; }
-
- /// <summary>
- /// Called to start the execution of the debugger
- /// </summary>
- /// <param name='startInfo'>
- /// Startup information
- /// </param>
- protected abstract void OnRun (DebuggerStartInfo startInfo);
-
- /// <summary>
- /// Called to attach the debugger to a running process
- /// </summary>
- /// <param name='processId'>
- /// Process identifier.
- /// </param>
- protected abstract void OnAttachToProcess (long processId);
-
- /// <summary>
- /// Called to detach the debugging session from the running process
- /// </summary>
- protected abstract void OnDetach ();
-
- /// <summary>
- /// Called when the active thread has to be changed
- /// </summary>
- /// <param name='processId'>
- /// Process identifier.
- /// </param>
- /// <param name='threadId'>
- /// Thread identifier.
- /// </param>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnSetActiveThread (long processId, long threadId);
-
- /// <summary>
- /// Called when the debug session has to be paused
- /// </summary>
- protected abstract void OnStop ();
-
- /// <summary>
- /// Called when the target process has to be exited
- /// </summary>
- protected abstract void OnExit ();
-
-
- /// <summary>
- /// Called to step one source code line
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnStepLine ();
-
- /// <summary>
- /// Called to step one source line, but step over method calls
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnNextLine ();
-
- /// <summary>
- /// Called to step one instruction
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnStepInstruction ();
-
- /// <summary>
- // Called to step one instruction, but step over method calls
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnNextInstruction ();
-
- /// <summary>
- /// Called to continue execution until leaving the current method
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnFinish ();
-
- /// <summary>
- /// Called to resume execution
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract void OnContinue ();
-
- //breakpoints etc
-
- /// <summary>
- /// Called to insert a new breakpoint or catchpoint
- /// </summary>
- /// <param name='breakEvent'>
- /// The break event.
- /// </param>
- /// <remarks>
- /// Implementations of this method must: (1) create (and return) an instance of BreakEventInfo
- /// (or a subclass of it). (2) Attempt to activate a breakpoint at the location
- /// specified in breakEvent. If the breakpoint cannot be activated at the time this
- /// method is called, it is the responsibility of the DebuggerSession subclass
- /// to attempt it later on.
- /// The BreakEventInfo object can be used to change the status of the breakpoint,
- /// update the hit point, etc.
- /// </remarks>
- protected abstract BreakEventInfo OnInsertBreakEvent (BreakEvent breakEvent);
-
- /// <summary>
- /// Called when a breakpoint has been removed.
- /// </summary>
- /// <param name='eventInfo'>
- /// The breakpoint
- /// </param>
- /// <remarks>
- /// Implementations of this method should remove or disable the breakpoint
- /// in the debugging engine.
- /// </remarks>
- protected abstract void OnRemoveBreakEvent (BreakEventInfo eventInfo);
-
- /// <summary>
- /// Called when information about a breakpoint has changed
- /// </summary>
- /// <param name='eventInfo'>
- /// The break event
- /// </param>
- /// <remarks>
- /// This method is called when some information about the breakpoint changes.
- /// Notice that the file and line of a breakpoint or the exception name of
- /// a catchpoint can't be modified. Changes of the Enabled property are
- /// notified by calling OnEnableBreakEvent.
- /// </remarks>
- protected abstract void OnUpdateBreakEvent (BreakEventInfo eventInfo);
-
- /// <summary>
- /// Called when a break event is enabled or disabled
- /// </summary>
- /// <param name='eventInfo'>
- /// The break event
- /// </param>
- /// <param name='enable'>
- /// The new status
- /// </param>
- protected abstract void OnEnableBreakEvent (BreakEventInfo eventInfo, bool enable);
-
- /// <summary>
- /// Queried when the debugger session has to check if changes in breakpoints are allowed or not
- /// </summary>
- /// <value>
- /// <c>true</c> if break event changes are allowed; otherwise, <c>false</c>.
- /// </value>
- /// <remarks>
- /// This property should return false if at the time it is invoked the debugger engine doesn't support
- /// adding, removing or doing changes in breakpoints.
- /// </remarks>
- protected virtual bool AllowBreakEventChanges { get { return true; } }
-
- /// <summary>
- /// Called to get a list of the threads of a process
- /// </summary>
- /// <param name='processId'>
- /// Process identifier.
- /// </param>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract ThreadInfo[] OnGetThreads (long processId);
-
- /// <summary>
- /// Called to get a list of all debugee processes
- /// </summary>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract ProcessInfo[] OnGetProcesses ();
-
- /// <summary>
- /// Called to get the backtrace of a thread
- /// </summary>
- /// <param name='processId'>
- /// Process identifier.
- /// </param>
- /// <param name='threadId'>
- /// Thread identifier.
- /// </param>
- /// <remarks>
- /// This method can only be called when the debuggee is stopped by the debugger
- /// </remarks>
- protected abstract Backtrace OnGetThreadBacktrace (long processId, long threadId);
-
- /// <summary>
- /// Called to gets the disassembly of a source code file
- /// </summary>
- /// <returns>
- /// An array of AssemblyLine, with one element for each source code line that could be disassembled
- /// </returns>
- /// <param name='file'>
- /// The file.
- /// </param>
- /// <remarks>
- /// This method can only be used when the debuggee is stopped by the debugger
- /// </remarks>
- protected virtual AssemblyLine[] OnDisassembleFile (string file)
- {
- return null;
- }
-
- protected IDebuggerSessionFrontend Frontend {
- get {
- return frontend;
- }
- }
- }
-
- class InternalDebuggerSession: IDebuggerSessionFrontend
- {
- DebuggerSession session;
-
- public InternalDebuggerSession (DebuggerSession session)
- {
- this.session = session;
- }
-
- public void NotifyTargetEvent (TargetEventArgs args)
- {
- session.OnTargetEvent (args);
- }
-
- public void NotifyTargetOutput (bool isStderr, string text)
- {
- session.OnTargetOutput (isStderr, text);
- }
-
- public void NotifyDebuggerOutput (bool isStderr, string text)
- {
- session.OnDebuggerOutput (isStderr, text);
- }
-
- public void NotifyStarted (ThreadInfo t)
- {
- session.OnStarted (t);
- }
-
- public void NotifyStarted ()
- {
- session.OnStarted ();
- }
-
- public void BindSourceFileBreakpoints (string fullFilePath)
- {
- session.BindSourceFileBreakpoints (fullFilePath);
- }
-
- public void UnbindSourceFileBreakpoints (string fullFilePath)
- {
- session.UnbindSourceFileBreakpoints (fullFilePath);
- }
- }
-
- public delegate void OutputWriterDelegate (bool isStderr, string text);
-
- public class BusyStateEventArgs: EventArgs
- {
- public bool IsBusy { get; internal set; }
-
- public string Description { get; internal set; }
- }
-
- public interface IConnectionDialog : IDisposable
- {
- event EventHandler UserCancelled;
-
- //message may be null in which case the dialog should construct a default
- void SetMessage (DebuggerStartInfo dsi, string message, bool listening, int attemptNumber);
- }
-}
-
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs
deleted file mode 100644
index 6b12dfc..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/EvaluationOptions.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// EvaluationOptions.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// 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;
-
-namespace Mono.Debugging.Client
-{
- [Serializable]
- public class EvaluationOptions
- {
- bool allowMethodEvaluation;
- bool allowToStringCalls;
-
- public static readonly char Ellipsis = '…';
-
- public static EvaluationOptions DefaultOptions {
- get {
- EvaluationOptions ops = new EvaluationOptions ();
- ops.EvaluationTimeout = 1000;
- ops.MemberEvaluationTimeout = 5000;
- ops.AllowTargetInvoke = true;
- ops.AllowMethodEvaluation = true;
- ops.AllowToStringCalls = true;
- ops.FlattenHierarchy = true;
- ops.GroupPrivateMembers = true;
- ops.GroupStaticMembers = true;
- ops.GroupUserPrivateMembers = false;
- ops.UseExternalTypeResolver = true;
- ops.IntegerDisplayFormat = IntegerDisplayFormat.Decimal;
- ops.CurrentExceptionTag = "$exception";
- ops.EllipsizeStrings = true;
- ops.EllipsizedLength = 100;
- ops.ChunkRawStrings = false;
- return ops;
- }
- }
-
- public EvaluationOptions Clone ()
- {
- return (EvaluationOptions) MemberwiseClone ();
- }
-
- public bool ChunkRawStrings { get; set; }
-
- public bool EllipsizeStrings { get; set; }
- public int EllipsizedLength { get; set; }
-
- public int EvaluationTimeout { get; set; }
- public int MemberEvaluationTimeout { get; set; }
- public bool AllowTargetInvoke { get; set; }
-
- public bool AllowMethodEvaluation {
- get { return allowMethodEvaluation && AllowTargetInvoke; }
- set { allowMethodEvaluation = value; }
- }
-
- public bool AllowToStringCalls {
- get { return allowToStringCalls && AllowTargetInvoke; }
- set { allowToStringCalls = value; }
- }
-
- public bool AllowDisplayStringEvaluation {
- get { return AllowTargetInvoke; }
- }
-
- public bool AllowDebuggerProxy {
- get { return AllowTargetInvoke; }
- }
-
- public bool FlattenHierarchy { get; set; }
-
- public bool GroupPrivateMembers { get; set; }
-
- public bool GroupUserPrivateMembers { get; set; }
-
- public bool GroupStaticMembers { get; set; }
-
- public bool UseExternalTypeResolver { get; set; }
-
- [Obsolete ("Use the type's BeforeFieldInit attribute instead")]
- public bool AllowImplicitTypeLoading { get { return true; } set { } }
-
- public IntegerDisplayFormat IntegerDisplayFormat { get; set; }
-
- public string CurrentExceptionTag { get; set; }
- }
-
- public enum IntegerDisplayFormat
- {
- Decimal,
- Hexadecimal
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs
deleted file mode 100644
index 36e6381..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/ExceptionInfo.cs
+++ /dev/null
@@ -1,254 +0,0 @@
-//
-// ExceptionInfo.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
-// 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.Text;
-
-namespace Mono.Debugging.Client
-{
- [Serializable]
- public class ExceptionInfo
- {
- ObjectValue exception;
- ObjectValue messageObject;
-
- [NonSerialized]
- ExceptionStackFrame[] frames;
-
- [NonSerialized]
- ExceptionInfo innerException;
-
- /// <summary>
- /// The provided value can have the following members:
- /// Type of the object: type of the exception
- /// Message: Message of the exception
- /// Instance: Raw instance of the exception
- /// StackTrace: an array of frames. Each frame must have:
- /// Value of the object: display text of the frame
- /// File: name of the file
- /// Line: line
- /// Col: column
- /// InnerException: inner exception, following the same format described above.
- /// </summary>
- public ExceptionInfo (ObjectValue exception)
- {
- this.exception = exception;
- if (exception.IsEvaluating || exception.IsEvaluatingGroup)
- exception.ValueChanged += HandleExceptionValueChanged;
- }
-
- void LoadMessage ()
- {
- if (messageObject == null) {
- messageObject = exception.GetChild ("Message");
- if (messageObject != null && messageObject.IsEvaluating)
- messageObject.ValueChanged += HandleMessageValueChanged;
- }
- }
-
- void HandleMessageValueChanged (object sender, EventArgs e)
- {
- frames = null;
- NotifyChanged ();
- }
-
- void HandleExceptionValueChanged (object sender, EventArgs e)
- {
- frames = null;
- if (exception.IsEvaluatingGroup)
- exception = exception.GetArrayItem (0);
- LoadMessage ();
- NotifyChanged ();
- }
-
- void NotifyChanged ()
- {
- EventHandler evnt = Changed;
- if (evnt != null)
- evnt (this, EventArgs.Empty);
- }
-
- public string Type {
- get { return exception.TypeName; }
- }
-
- public string Message {
- get {
- LoadMessage ();
- if (messageObject != null && messageObject.IsEvaluating)
- return "Loading...";
- return messageObject != null ? messageObject.Value : null;
- }
- }
-
- public ObjectValue Instance {
- get {
- return exception.GetChild ("Instance");
- }
- }
-
- public bool IsEvaluating {
- get { return exception.IsEvaluating || exception.IsEvaluatingGroup; }
- }
-
- public bool StackIsEvaluating {
- get {
- ObjectValue stackTrace = exception.GetChild ("StackTrace");
- if (stackTrace != null)
- return stackTrace.IsEvaluating;
- else
- return false;
- }
- }
-
- public ExceptionStackFrame[] StackTrace {
- get {
- if (frames != null)
- return frames;
-
- ObjectValue stackTrace = exception.GetChild ("StackTrace");
- if (stackTrace == null)
- return frames = new ExceptionStackFrame [0];
-
- if (stackTrace.IsEvaluating) {
- frames = new ExceptionStackFrame [0];
- stackTrace.ValueChanged += HandleExceptionValueChanged;
- return frames;
- }
- List<ExceptionStackFrame> list = new List<ExceptionStackFrame> ();
- foreach (ObjectValue val in stackTrace.GetAllChildren ())
- list.Add (new ExceptionStackFrame (val));
- frames = list.ToArray ();
- return frames;
- }
- }
-
- public ExceptionInfo InnerException {
- get {
- if (innerException == null) {
- ObjectValue innerVal = exception.GetChild ("InnerException");
- if (innerVal == null || innerVal.IsError || innerVal.IsUnknown)
- return null;
- if (innerVal.IsEvaluating) {
- innerVal.ValueChanged += delegate { NotifyChanged (); };
- return null;
- }
- innerException = new ExceptionInfo (innerVal);
- innerException.Changed += delegate {
- NotifyChanged ();
- };
- }
- return innerException;
- }
- }
-
- public event EventHandler Changed;
-
- internal void ConnectCallback (StackFrame parentFrame)
- {
- ObjectValue.ConnectCallbacks (parentFrame, exception);
- }
-
- public override string ToString ()
- {
- StringBuilder sb = new StringBuilder ();
- var chain = new List<ExceptionInfo> ();
- ExceptionInfo e = this;
- while (e != null) {
- chain.Insert (0, e);
- if (sb.Length > 0)
- sb.Append (" ---> ");
- sb.Append (e.Type).Append (": ").Append (e.Message);
- e = e.InnerException;
- }
- sb.AppendLine ();
- foreach (var ex in chain) {
- if (ex != chain[0])
- sb.AppendLine (" --- End of inner exception stack trace ---");
- foreach (var f in ex.StackTrace) {
- sb.Append (" at ").Append (f.DisplayText);
- if (!string.IsNullOrEmpty (f.File))
- sb.Append (" in ").Append (f.File).Append (":").Append (f.Line);
- sb.AppendLine ();
- }
- }
- return sb.ToString ();
- }
- }
-
- public class ExceptionStackFrame
- {
- ObjectValue frame;
-
- /// <summary>
- /// The provided value must have a specific structure.
- /// The Value property is the display text.
- /// A child "File" member must be the name of the file.
- /// A child "Line" member must be the line.
- /// A child "Col" member must be the column.
- /// </summary>
- public ExceptionStackFrame (ObjectValue value)
- {
- frame = value;
- }
-
- public string File {
- get {
- ObjectValue file = frame.GetChild ("File");
- if (file != null)
- return file.Value;
- else
- return null;
- }
- }
-
- public int Line {
- get {
- ObjectValue val = frame.GetChild ("Line");
- if (val != null)
- return int.Parse (val.Value);
- else
- return 0;
- }
- }
-
- public int Column {
- get {
- ObjectValue val = frame.GetChild ("Column");
- if (val != null)
- return int.Parse (val.Value);
- else
- return 0;
- }
- }
-
- public string DisplayText {
- get { return frame.Value; }
- }
- }
-}
-
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs
deleted file mode 100644
index dde0531..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/ObjectValue.cs
+++ /dev/null
@@ -1,784 +0,0 @@
-// ObjectValue.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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.Text;
-using Mono.Debugging.Backend;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Mono.Debugging.Client
-{
- [Serializable]
- public class ObjectValue
- {
- ObjectPath path;
- int arrayCount = -1;
- bool isNull;
- string name;
- string value;
- string typeName;
- string displayValue;
- string childSelector;
- ObjectValueFlags flags;
- IObjectValueSource source;
- IObjectValueUpdater updater;
- List<ObjectValue> children;
- ManualResetEvent evaluatedEvent;
-
- [NonSerialized]
- UpdateCallback updateCallback;
-
- [NonSerialized]
- EventHandler valueChanged;
-
- [NonSerialized]
- StackFrame parentFrame;
-
- static ObjectValue Create (IObjectValueSource source, ObjectPath path, string typeName)
- {
- ObjectValue ob = new ObjectValue ();
- ob.source = source;
- ob.path = path;
- ob.typeName = typeName;
- return ob;
- }
-
- public static ObjectValue CreateObject (IObjectValueSource source, ObjectPath path, string typeName, string value, ObjectValueFlags flags, ObjectValue[] children)
- {
- return CreateObject (source, path, typeName, new EvaluationResult (value), flags, children);
- }
-
- public static ObjectValue CreateObject (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags, ObjectValue[] children)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.path = path;
- ob.flags = flags | ObjectValueFlags.Object;
- ob.value = value.Value;
- ob.displayValue = value.DisplayValue;
- if (children != null) {
- ob.children = new List<ObjectValue> ();
- ob.children.AddRange (children);
- }
- return ob;
- }
-
- public static ObjectValue CreateNullObject (IObjectValueSource source, string name, string typeName, ObjectValueFlags flags)
- {
- return CreateNullObject (source, new ObjectPath (name), typeName, flags);
- }
-
- public static ObjectValue CreateNullObject (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.flags = flags | ObjectValueFlags.Object;
- ob.value = "(null)";
- ob.isNull = true;
- return ob;
- }
-
- public static ObjectValue CreatePrimitive (IObjectValueSource source, ObjectPath path, string typeName, EvaluationResult value, ObjectValueFlags flags)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.flags = flags | ObjectValueFlags.Primitive;
- ob.value = value.Value;
- ob.displayValue = value.DisplayValue;
- return ob;
- }
-
- public static ObjectValue CreateArray (IObjectValueSource source, ObjectPath path, string typeName, int arrayCount, ObjectValueFlags flags, ObjectValue[] children)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.arrayCount = arrayCount;
- ob.flags = flags | ObjectValueFlags.Array;
- ob.value = "[" + arrayCount + "]";
- if (children != null && children.Length > 0) {
- ob.children = new List<ObjectValue> ();
- ob.children.AddRange (children);
- }
- return ob;
- }
-
- public static ObjectValue CreateUnknown (IObjectValueSource source, ObjectPath path, string typeName)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.flags = ObjectValueFlags.Unknown | ObjectValueFlags.ReadOnly;
- return ob;
- }
-
- public static ObjectValue CreateUnknown (string name)
- {
- return CreateUnknown (null, new ObjectPath (name), "");
- }
-
- public static ObjectValue CreateError (IObjectValueSource source, ObjectPath path, string typeName, string value, ObjectValueFlags flags)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.flags = flags | ObjectValueFlags.Error;
- ob.value = value;
- return ob;
- }
-
- public static ObjectValue CreateImplicitNotSupported (IObjectValueSource source, ObjectPath path, string typeName, ObjectValueFlags flags)
- {
- return CreateNotSupported (source, path, typeName, "Implicit evaluation is disabled", flags);
- }
-
- public static ObjectValue CreateNotSupported (IObjectValueSource source, ObjectPath path, string typeName, string message, ObjectValueFlags flags)
- {
- ObjectValue ob = Create (source, path, typeName);
- ob.flags = flags | ObjectValueFlags.NotSupported;
- ob.value = message;
- return ob;
- }
-
- public static ObjectValue CreateFatalError (string name, string message, ObjectValueFlags flags)
- {
- ObjectValue ob = new ObjectValue ();
- ob.flags = flags | ObjectValueFlags.Error;
- ob.value = message;
- ob.name = name;
- return ob;
- }
-
- public static ObjectValue CreateEvaluating (IObjectValueUpdater updater, ObjectPath path, ObjectValueFlags flags)
- {
- ObjectValue ob = Create (null, path, null);
- ob.updater = updater;
- ob.path = path;
- ob.flags = flags | ObjectValueFlags.Evaluating;
- return ob;
- }
-
- /// <summary>
- /// Gets the flags of the value
- /// </summary>
- public ObjectValueFlags Flags {
- get { return flags; }
- }
-
- /// <summary>
- /// Name of the value (for example, the property name)
- /// </summary>
- public string Name {
- get {
- if (name == null)
- return path [path.Length - 1];
- else
- return name;
- }
- set {
- name = value;
- }
- }
-
- /// <summary>
- /// Gets or sets the value of the object
- /// </summary>
- /// <value>
- /// The value.
- /// </value>
- /// <exception cref='InvalidOperationException'>
- /// Is thrown when trying to set a value on a read-only ObjectValue
- /// </exception>
- /// <remarks>
- /// This value is a string representation of the ObjectValue. The content depends on several evaluation
- /// options. For example, if ToString calls are enabled, this value will be the result of calling
- /// ToString.
- /// If the object is a primitive type, in general the Value will be an expression that represents the
- /// value in the target language. For example, when debugging C#, if the property is an string, the value
- /// will include the quotation marks and chars like '\' will be properly escaped.
- /// If you need to get the real CLR value of the object, use GetRawValue.
- /// </remarks>
- public virtual string Value {
- get {
- return value;
- }
- set {
- if (IsReadOnly || source == null)
- throw new InvalidOperationException ("Value is not editable");
- EvaluationResult res = source.SetValue (path, value, null);
- if (res != null) {
- this.value = res.Value;
- displayValue = res.DisplayValue;
- isNull = value == null;
- }
- }
- }
-
- /// <summary>
- /// Gets or sets the display value of this object
- /// </summary>
- /// <remarks>
- /// This method returns a string to be used when showing the value of this object.
- /// In most cases, the Value and DisplayValue properties return the same text, but there are some cases
- /// in which DisplayValue may return a more convenient textual representation of the value, which
- /// may not be a valid target language expression.
- /// For example in C#, an enum Value includes the full enum type name (e.g. "Gtk.ResponseType.OK"),
- /// while DisplayValue only has the enum value name ("OK").
- /// </remarks>
- public string DisplayValue {
- get { return displayValue ?? Value; }
- set { displayValue = value; }
- }
-
- /// <summary>
- /// Sets the value of this object, using the default evaluation options
- /// </summary>
- public void SetValue (string value)
- {
- SetValue (value, parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Sets the value of this object, using the specified evaluation options
- /// </summary>
- /// <param name='value'>
- /// The value
- /// </param>
- /// <param name='options'>
- /// The options
- /// </param>
- /// <exception cref='InvalidOperationException'>
- /// Is thrown if the value is read-only
- /// </exception>
- public void SetValue (string value, EvaluationOptions options)
- {
- if (IsReadOnly || source == null)
- throw new InvalidOperationException ("Value is not editable");
- EvaluationResult res = source.SetValue (path, value, options);
- if (res != null) {
- this.value = res.Value;
- displayValue = res.DisplayValue;
- }
- }
-
- /// <summary>
- /// Gets the raw value of this object
- /// </summary>
- /// <returns>
- /// The raw value.
- /// </returns>
- /// <remarks>
- /// This method can be used to get the CLR value of the object. For example, if this ObjectValue is
- /// a property of type String, this method will return the System.String value of the property.
- /// If this ObjectValue refers to an object instead of a primitive value, then a RawValue object
- /// will be returned. RawValue can be used to get and set members of an object, and to call methods.
- /// If this ObjectValue refers to an array, then a RawValueArray object will be returned.
- /// </remarks>
- public object GetRawValue ()
- {
- EvaluationOptions ops = parentFrame.DebuggerSession.EvaluationOptions.Clone ();
- ops.EllipsizeStrings = false;
-
- return GetRawValue (ops);
- }
-
- /// <summary>
- /// Gets the raw value of this object
- /// </summary>
- /// <param name='options'>
- /// The evaluation options
- /// </param>
- /// <returns>
- /// The raw value.
- /// </returns>
- /// <remarks>
- /// This method can be used to get the CLR value of the object. For example, if this ObjectValue is
- /// a property of type String, this method will return the System.String value of the property.
- /// If this ObjectValue refers to an object instead of a primitive value, then a RawValue object
- /// will be returned. RawValue can be used to get and set members of an object, and to call methods.
- /// If this ObjectValue refers to an array, then a RawValueArray object will be returned.
- /// </remarks>
- public object GetRawValue (EvaluationOptions options)
- {
- object res = source.GetRawValue (path, options);
- RawValue val = res as RawValue;
- if (val != null)
- val.options = options;
- return res;
- }
-
- /// <summary>
- /// Sets the raw value of this object
- /// </summary>
- /// <param name='value'>
- /// The value
- /// </param>
- /// <remarks>
- /// The provided value can be a primitive type, a RawValue object or a RawValueArray object.
- /// </remarks>
- public void SetRawValue (object value)
- {
- SetRawValue (value, parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Sets the raw value of this object
- /// </summary>
- /// <param name='value'>
- /// The value
- /// </param>
- /// <param name='options'>
- /// The evaluation options
- /// </param>
- /// <remarks>
- /// The provided value can be a primitive type, a RawValue object or a RawValueArray object.
- /// </remarks>
- public void SetRawValue (object value, EvaluationOptions options)
- {
- source.SetRawValue (path, value, options);
- }
-
- /// <summary>
- /// Full name of the type of the object
- /// </summary>
- public string TypeName {
- get { return typeName; }
- set { typeName = value; }
- }
-
- /// <summary>
- /// Gets or sets the child selector.
- /// </summary>
- /// <remarks>
- /// The child selector is an expression which can be concatenated to a parent expression to get this child.
- /// For example, if this object is a reference to a field named 'foo' of an object, the child
- /// selector is '.foo'.
- /// </remarks>
- public string ChildSelector {
- get {
- if (childSelector != null)
- return childSelector;
- if ((flags & ObjectValueFlags.ArrayElement) != 0)
- return Name;
- else
- return "." + Name;
- }
- set { childSelector = value; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this object has children.
- /// </summary>
- /// <value>
- /// <c>true</c> if this instance has children; otherwise, <c>false</c>.
- /// </value>
- public bool HasChildren {
- get {
- if (isNull)
- return false;
- if (IsEvaluating)
- return false;
- if (children != null)
- return children.Count > 0;
- else if (source == null)
- return false;
- else if (IsArray)
- return arrayCount > 0;
- else if (IsObject)
- return true;
- else
- return false;
- }
- }
-
- /// <summary>
- /// Gets a child value
- /// </summary>
- /// <returns>
- /// The child.
- /// </returns>
- /// <param name='name'>
- /// Name of the member
- /// </param>
- /// <remarks>
- /// This method can be used to get a member of an object (such as a field or property)
- /// </remarks>
- public ObjectValue GetChild (string name)
- {
- return GetChild (name, parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Gets a child value
- /// </summary>
- /// <returns>
- /// The child.
- /// </returns>
- /// <param name='name'>
- /// Name of the member
- /// </param>
- /// <param name='options'>
- /// Options to be used to evaluate the child
- /// </param>
- /// <remarks>
- /// This method can be used to get a member of an object (such as a field or property)
- /// </remarks>
- public ObjectValue GetChild (string name, EvaluationOptions options)
- {
- if (IsArray)
- throw new InvalidOperationException ("Object is an array.");
- if (IsEvaluating)
- return null;
-
- if (children == null) {
- children = new List<ObjectValue> ();
- if (source != null) {
- try {
- ObjectValue[] cs = source.GetChildren (path, -1, -1, options);
- ConnectCallbacks (parentFrame, cs);
- children.AddRange (cs);
- } catch (Exception ex) {
- children = null;
- return CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly);
- }
- }
- }
-
- foreach (ObjectValue ob in children) {
- if (ob.Name == name)
- return ob;
- }
-
- return null;
- }
-
- /// <summary>
- /// Gets all children of the object
- /// </summary>
- /// <returns>
- /// An array of all child values
- /// </returns>
- public ObjectValue[] GetAllChildren ()
- {
- return GetAllChildren (parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Gets all children of the object
- /// </summary>
- /// <returns>
- /// An array of all child values
- /// </returns>
- /// <param name='options'>
- /// Options to be used to evaluate the children
- /// </param>
- public ObjectValue[] GetAllChildren (EvaluationOptions options)
- {
- if (IsEvaluating)
- return new ObjectValue[0];
-
- if (IsArray) {
- GetArrayItem (arrayCount - 1);
- return children.ToArray ();
- }
-
- if (children == null) {
- children = new List<ObjectValue> ();
- if (source != null) {
- try {
- ObjectValue[] cs = source.GetChildren (path, -1, -1, options);
- ConnectCallbacks (parentFrame, cs);
- children.AddRange (cs);
- } catch (Exception ex) {
- if (parentFrame != null)
- parentFrame.DebuggerSession.OnDebuggerOutput (true, ex.ToString ());
- children.Add (CreateFatalError ("", ex.Message, ObjectValueFlags.ReadOnly));
- }
- }
- }
-
- return children.ToArray ();
- }
-
- /// <summary>
- /// Gets an item of an array
- /// </summary>
- /// <returns>
- /// The array item.
- /// </returns>
- /// <param name='index'>
- /// Item index
- /// </param>
- /// <exception cref='InvalidOperationException'>
- /// Is thrown if this object is not an array (IsArray returns false)
- /// </exception>
- public ObjectValue GetArrayItem (int index)
- {
- return GetArrayItem (index, parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Gets an item of an array
- /// </summary>
- /// <returns>
- /// The array item.
- /// </returns>
- /// <param name='index'>
- /// Item index
- /// </param>
- /// <param name='options'>
- /// Options to be used to evaluate the item
- /// </param>
- /// <exception cref='InvalidOperationException'>
- /// Is thrown if this object is not an array (IsArray returns false)
- /// </exception>
- public ObjectValue GetArrayItem (int index, EvaluationOptions options)
- {
- if (!IsArray)
- throw new InvalidOperationException ("Object is not an array.");
- if (index >= arrayCount || index < 0 || IsEvaluating)
- throw new IndexOutOfRangeException ();
-
- if (children == null)
- children = new List<ObjectValue> ();
- if (index >= children.Count) {
- int nc = (index + 50);
- if (nc > arrayCount) nc = arrayCount;
- nc = nc - children.Count;
- try {
- ObjectValue[] items = source.GetChildren (path, children.Count, nc, options);
- ConnectCallbacks (parentFrame, items);
- children.AddRange (items);
- } catch (Exception ex) {
- return CreateFatalError ("", ex.Message, ObjectValueFlags.ArrayElement | ObjectValueFlags.ReadOnly);
- }
- }
- return children [index];
- }
-
- /// <summary>
- /// Gets the number of items of an array
- /// </summary>
- /// <exception cref='InvalidOperationException'>
- /// Is thrown if this object is not an array (IsArray returns false)
- /// </exception>
- public int ArrayCount {
- get {
- if (!IsArray)
- throw new InvalidOperationException ("Object is not an array.");
- if (IsEvaluating)
- return 0;
- return arrayCount;
- }
- }
-
- public bool IsReadOnly {
- get { return HasFlag (ObjectValueFlags.ReadOnly); }
- }
-
- public bool IsArray {
- get { return HasFlag (ObjectValueFlags.Array); }
- }
-
- public bool IsObject {
- get { return HasFlag (ObjectValueFlags.Object); }
- }
-
- public bool IsPrimitive {
- get { return HasFlag (ObjectValueFlags.Primitive); }
- }
-
- public bool IsUnknown {
- get { return HasFlag (ObjectValueFlags.Unknown); }
- }
-
- public bool IsNotSupported {
- get { return HasFlag (ObjectValueFlags.NotSupported); }
- }
-
- public bool IsError {
- get { return HasFlag (ObjectValueFlags.Error); }
- }
-
- public bool IsEvaluating {
- get { return HasFlag (ObjectValueFlags.Evaluating); }
- }
-
- public bool IsEvaluatingGroup {
- get { return HasFlag (ObjectValueFlags.EvaluatingGroup); }
- }
-
- public bool CanRefresh {
- get { return source != null && !HasFlag (ObjectValueFlags.NoRefresh); }
- }
-
- public bool HasFlag (ObjectValueFlags flag)
- {
- return (flags & flag) != 0;
- }
-
- public event EventHandler ValueChanged {
- add {
- lock (this) {
- if (IsEvaluating)
- valueChanged += value;
- else
- value (this, EventArgs.Empty);
- }
- }
- remove {
- lock (this) {
- valueChanged -= value;
- }
- }
- }
-
- /// <summary>
- /// Refreshes the value of this object
- /// </summary>
- /// <remarks>
- /// This method can be called to get a more up-to-date value for this object.
- /// </remarks>
- public void Refresh ()
- {
- Refresh (parentFrame.DebuggerSession.EvaluationOptions);
- }
-
- /// <summary>
- /// Refreshes the value of this object
- /// </summary>
- /// <remarks>
- /// This method can be called to get a more up-to-date value for this object.
- /// </remarks>
- public void Refresh (EvaluationOptions options)
- {
- if (!CanRefresh)
- return;
- ObjectValue val = source.GetValue (path, options);
- UpdateFrom (val, false);
- }
-
- /// <summary>
- /// Gets a wait handle which can be used to wait for the evaluation of this object to end
- /// </summary>
- /// <value>
- /// The wait handle.
- /// </value>
- public WaitHandle WaitHandle {
- get {
- lock (this) {
- if (evaluatedEvent == null)
- evaluatedEvent = new ManualResetEvent (!IsEvaluating);
- return evaluatedEvent;
- }
- }
- }
-
- internal IObjectValueUpdater Updater {
- get { return updater; }
- }
-
- internal void UpdateFrom (ObjectValue val, bool notify)
- {
- lock (this) {
- arrayCount = val.arrayCount;
- if (val.name != null)
- name = val.name;
- value = val.value;
- displayValue = val.displayValue;
- typeName = val.typeName;
- flags = val.flags;
- source = val.source;
- children = val.children;
- path = val.path;
- updater = val.updater;
- ConnectCallbacks (parentFrame, this);
- if (evaluatedEvent != null)
- evaluatedEvent.Set ();
- if (notify && valueChanged != null)
- valueChanged (this, EventArgs.Empty);
- }
- }
-
- internal UpdateCallback GetUpdateCallback ()
- {
- if (IsEvaluating) {
- if (updateCallback == null)
- updateCallback = new UpdateCallback (new UpdateCallbackProxy (this), path);
- return updateCallback;
- } else
- return null;
- }
-
- ~ObjectValue ()
- {
- if (updateCallback != null)
- System.Runtime.Remoting.RemotingServices.Disconnect ((UpdateCallbackProxy)updateCallback.Callback);
- }
-
- internal static void ConnectCallbacks (StackFrame parentFrame, params ObjectValue[] values)
- {
- Dictionary<IObjectValueUpdater, List<UpdateCallback>> callbacks = null;
- List<ObjectValue> valueList = new List<ObjectValue> (values);
- for (int n=0; n<valueList.Count; n++) {
- ObjectValue val = valueList [n];
- val.parentFrame = parentFrame;
- UpdateCallback cb = val.GetUpdateCallback ();
- if (cb != null) {
- if (callbacks == null)
- callbacks = new Dictionary<IObjectValueUpdater, List<UpdateCallback>> ();
- List<UpdateCallback> list;
- if (!callbacks.TryGetValue (val.Updater, out list)) {
- list = new List<UpdateCallback> ();
- callbacks [val.Updater] = list;
- }
- list.Add (cb);
- }
- if (val.children != null)
- valueList.AddRange (val.children);
- }
- if (callbacks != null) {
- // Do the callback connection in a background thread
- System.Threading.ThreadPool.QueueUserWorkItem (delegate {
- foreach (KeyValuePair<IObjectValueUpdater, List<UpdateCallback>> cbs in callbacks) {
- cbs.Key.RegisterUpdateCallbacks (cbs.Value.ToArray ());
- }
- });
- }
- }
- }
-
- class UpdateCallbackProxy: MarshalByRefObject, IObjectValueUpdateCallback
- {
- WeakReference valRef;
-
- public void UpdateValue (ObjectValue newValue)
- {
- ObjectValue val = valRef.Target as ObjectValue;
- if (val != null)
- val.UpdateFrom (newValue, true);
- }
-
- public UpdateCallbackProxy (ObjectValue val)
- {
- valRef = new WeakReference (val);
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Client/RawValue.cs b/src/core/Mono.Debugging/Mono.Debugging.Client/RawValue.cs
deleted file mode 100644
index 4af836d..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Client/RawValue.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-//
-// RawValue.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
-// 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 Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Client
-{
- /// <summary>
- /// Represents an object in the process being debugged
- /// </summary>
- [Serializable]
- public class RawValue
- {
- IRawValue source;
- internal EvaluationOptions options;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValue"/> class.
- /// </summary>
- /// <param name='source'>
- /// Value source
- /// </param>
- public RawValue (IRawValue source)
- {
- this.source = source;
- }
-
- internal IRawValue Source {
- get { return this.source; }
- }
-
- /// <summary>
- /// Full name of the type of the object
- /// </summary>
- public string TypeName { get; set; }
-
- /// <summary>
- /// Invokes a method on the object
- /// </summary>
- /// <returns>
- /// The result of the invocation
- /// </returns>
- /// <param name='methodName'>
- /// The name of the method
- /// </param>
- /// <param name='parameters'>
- /// The parameters (primitive type values, RawValue instances or RawValueArray instances)
- /// </param>
- public object CallMethod (string methodName, params object[] parameters)
- {
- object res = source.CallMethod (methodName, parameters, options);
- RawValue val = res as RawValue;
- if (val != null)
- val.options = options;
- return res;
- }
-
- /// <summary>
- /// Gets the value of a field or property
- /// </summary>
- /// <returns>
- /// The value (a primitive type value, a RawValue instance or a RawValueArray instance)
- /// </returns>
- /// <param name='name'>
- /// Name of the field or property
- /// </param>
- public object GetMemberValue (string name)
- {
- object res = source.GetMemberValue (name, options);
- RawValue val = res as RawValue;
- if (val != null)
- val.options = options;
- return res;
- }
-
- /// <summary>
- /// Sets the value of a field or property
- /// </summary>
- /// <param name='name'>
- /// Name of the field or property
- /// </param>
- /// <param name='value'>
- /// The value (a primitive type value, a RawValue instance or a RawValueArray instance)
- /// </param>
- public void SetMemberValue (string name, object value)
- {
- source.SetMemberValue (name, value, options);
- }
- }
-
- /// <summary>
- /// Represents an array of objects in the process being debugged
- /// </summary>
- [Serializable]
- public class RawValueArray
- {
- IRawValueArray source;
- int[] dimensions;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValueArray"/> class.
- /// </summary>
- /// <param name='source'>
- /// Value source.
- /// </param>
- public RawValueArray (IRawValueArray source)
- {
- this.source = source;
- }
-
- internal IRawValueArray Source {
- get { return this.source; }
- }
-
- /// <summary>
- /// Full type name of the array items
- /// </summary>
- public string ElementTypeName { get; set; }
-
- /// <summary>
- /// Gets or sets the item at the specified index.
- /// </summary>
- /// <param name='index'>
- /// The index
- /// </param>
- /// <remarks>
- /// The item value can be a primitive type value, a RawValue instance or a RawValueArray instance.
- /// </remarks>
- public object this [int index] {
- get {
- return source.GetValue (new int[] { index });
- }
- set {
- source.SetValue (new int[] { index }, value);
- }
- }
-
- /// <summary>
- /// Returns an array with all items of the RawValueArray
- /// </summary>
- /// <remarks>
- /// This method is useful to avoid unnecessary debugger-debuggee roundtrips
- /// when processing all items of an array. For example, if a RawValueArray
- /// represents an image encoded in a byte[], getting the values one by one
- /// using the indexer is very slow. The ToArray() will return the whole byte[]
- /// in a single call.
- /// </remarks>
- public Array ToArray ()
- {
- return source.ToArray ();
- }
-
- /// <summary>
- /// Gets the length of the array
- /// </summary>
- public int Length {
- get {
- if (dimensions == null)
- dimensions = source.Dimensions;
- return dimensions[0];
- }
- }
- }
-
- /// <summary>
- /// Represents a string object in the process being debugged
- /// </summary>
- [Serializable]
- public class RawValueString
- {
- IRawValueString source;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="Mono.Debugging.Client.RawValueString"/> class.
- /// </summary>
- /// <param name='source'>
- /// Value source.
- /// </param>
- public RawValueString (IRawValueString source)
- {
- this.source = source;
- }
-
- internal IRawValueString Source {
- get { return this.source; }
- }
-
- /// <summary>
- /// Gets the length of the string
- /// </summary>
- public int Length {
- get { return source.Length; }
- }
-
- /// <summary>
- /// Gets a substring of the string
- /// </summary>
- /// <param name='index'>
- /// The starting index of the requested substring.
- /// </param>
- /// <param name='length'>
- /// The length of the requested substring.
- /// </param>
- public string Substring (int index, int length)
- {
- return source.Substring (index, length);
- }
-
- /// <summary>
- /// Gets the value.
- /// </summary>
- /// <value>
- /// The value.
- /// </value>
- public string Value {
- get { return source.Value; }
- }
- }
-}
-
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs
deleted file mode 100644
index 347b248..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/BaseTypeViewSource.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// BaseTypeViewSource.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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 Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Evaluation
-{
- public class BaseTypeViewSource: RemoteFrameObject, IObjectValueSource
- {
- EvaluationContext ctx;
- object type;
- object obj;
- IObjectSource objectSource;
-
- public BaseTypeViewSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
- {
- this.ctx = ctx;
- this.type = type;
- this.obj = obj;
- this.objectSource = objectSource;
- }
-
- public static ObjectValue CreateBaseTypeView (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
- {
- BaseTypeViewSource src = new BaseTypeViewSource (ctx, objectSource, type, obj);
- src.Connect ();
- string tname = ctx.Adapter.GetDisplayTypeName (ctx, type);
- ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("base"), tname, "{" + tname + "}", ObjectValueFlags.Type|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
- val.ChildSelector = "";
- return val;
- }
-
- #region IObjectValueSource implementation
-
- public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
- {
- EvaluationContext cctx = ctx.WithOptions (options);
- return cctx.Adapter.GetObjectValueChildren (cctx, objectSource, type, obj, index, count, false);
- }
-
- public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
- {
- throw new NotSupportedException();
- }
-
- public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
- {
- throw new NotSupportedException();
- }
-
- public object GetRawValue (ObjectPath path, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
-
- public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
-
- #endregion
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs
deleted file mode 100644
index 225ca14..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/FilteredMembersSource.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-//
-// FilteredMembersSource.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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.Linq;
-using System.Text;
-using System.Reflection;
-using Mono.Debugging.Client;
-using Mono.Debugging.Backend;
-using System.Diagnostics;
-
-namespace Mono.Debugging.Evaluation
-{
- public class FilteredMembersSource: RemoteFrameObject, IObjectValueSource
- {
- object obj;
- object type;
- EvaluationContext ctx;
- BindingFlags bindingFlags;
- IObjectSource objectSource;
-
- public FilteredMembersSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
- {
- this.ctx = ctx;
- this.obj = obj;
- this.type = type;
- this.bindingFlags = bindingFlags;
- this.objectSource = objectSource;
- }
-
- public static ObjectValue CreateNonPublicsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
- {
- return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Non-public members");
- }
-
- public static ObjectValue CreateStaticsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
- {
- return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Static members");
- }
-
- static ObjectValue CreateNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags, string label)
- {
- FilteredMembersSource src = new FilteredMembersSource (ctx, objectSource, type, obj, bindingFlags);
- src.Connect ();
- ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
- val.ChildSelector = "";
- return val;
- }
-
- public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
- {
- EvaluationContext cctx = ctx.WithOptions (options);
- var names = new ObjectValueNameTracker (cctx);
- object tdataType = null;
- TypeDisplayData tdata = null;
- List<ObjectValue> list = new List<ObjectValue> ();
- foreach (ValueReference val in cctx.Adapter.GetMembersSorted (cctx, objectSource, type, obj, bindingFlags)) {
- object decType = val.DeclaringType;
- if (decType != null && decType != tdataType) {
- tdataType = decType;
- tdata = cctx.Adapter.GetTypeDisplayData (cctx, decType);
- }
- DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
- if (state == DebuggerBrowsableState.Never)
- continue;
- ObjectValue oval = val.CreateObjectValue (options);
- names.Disambiguate (val, oval);
- list.Add (oval);
- }
- if ((bindingFlags & BindingFlags.NonPublic) == 0) {
- BindingFlags newFlags = bindingFlags | BindingFlags.NonPublic;
- newFlags &= ~BindingFlags.Public;
- list.Add (CreateNonPublicsNode (cctx, objectSource, type, obj, newFlags));
- }
- return list.ToArray ();
- }
-
- public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
- {
- throw new NotSupportedException ();
- }
-
- public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
- {
- throw new NotSupportedException ();
- }
-
- public object GetRawValue (ObjectPath path, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
-
- public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
deleted file mode 100644
index 39e5c46..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
+++ /dev/null
@@ -1,1317 +0,0 @@
-//
-// NRefactoryExpressionEvaluatorVisitor.cs
-//
-// Author: Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// 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.Runtime.InteropServices;
-using System.Reflection;
-
-using Mono.Debugging.Client;
-
-using ICSharpCode.NRefactory.CSharp;
-
-namespace Mono.Debugging.Evaluation
-{
- public class NRefactoryExpressionEvaluatorVisitor : IAstVisitor<ValueReference>
- {
- Dictionary<string,ValueReference> userVariables;
- EvaluationOptions options;
- EvaluationContext ctx;
- object expectedType;
- string expression;
-
- public NRefactoryExpressionEvaluatorVisitor (EvaluationContext ctx, string expression, object expectedType, Dictionary<string,ValueReference> userVariables)
- {
- this.ctx = ctx;
- this.expression = expression;
- this.expectedType = expectedType;
- this.userVariables = userVariables;
- this.options = ctx.Options;
- }
-
- static Exception ParseError (string message, params object[] args)
- {
- return new EvaluatorException (message, args);
- }
-
- static Exception NotSupported ()
- {
- return new NotSupportedExpressionException ();
- }
-
- static string ResolveTypeName (AstType type)
- {
- string name = type.ToString ();
- if (name.StartsWith ("global::", StringComparison.Ordinal))
- name = name.Substring ("global::".Length);
- return name;
- }
-
- static long GetInteger (object val)
- {
- try {
- return Convert.ToInt64 (val);
- } catch {
- throw ParseError ("Expected integer value.");
- }
- }
-
- static string GetCommonOperationType (object v1, object v2)
- {
- if (v1 is double || v2 is double)
- return "System.Double";
-
- if (v1 is float || v2 is float)
- return "System.Double";
-
- return "System.Int64";
- }
-
- static Type GetCommonType (object v1, object v2)
- {
- int s1 = Marshal.SizeOf (v1);
- if (IsUnsigned (s1))
- s1 += 8;
- int s2 = Marshal.SizeOf (v2);
- if (IsUnsigned (s2))
- s2 += 8;
- if (s1 > s2)
- return v1.GetType ();
- else
- return v2.GetType ();
- }
-
- static bool IsUnsigned (object v)
- {
- return (v is byte) || (v is ushort) || (v is uint) || (v is ulong);
- }
-
- static object EvaluateOperation (BinaryOperatorType op, double v1, double v2)
- {
- switch (op) {
- case BinaryOperatorType.Add: return v1 + v2;
- case BinaryOperatorType.Divide: return v1 / v2;
- case BinaryOperatorType.Multiply: return v1 * v2;
- case BinaryOperatorType.Subtract: return v1 - v2;
- case BinaryOperatorType.GreaterThan: return v1 > v2;
- case BinaryOperatorType.GreaterThanOrEqual: return v1 >= v2;
- case BinaryOperatorType.LessThan: return v1 < v2;
- case BinaryOperatorType.LessThanOrEqual: return v1 <= v2;
- case BinaryOperatorType.Equality: return v1 == v2;
- case BinaryOperatorType.InEquality: return v1 != v2;
- default: throw ParseError ("Invalid binary operator.");
- }
- }
-
- static object EvaluateOperation (BinaryOperatorType op, long v1, long v2)
- {
- switch (op) {
- case BinaryOperatorType.Add: return v1 + v2;
- case BinaryOperatorType.BitwiseAnd: return v1 & v2;
- case BinaryOperatorType.BitwiseOr: return v1 | v2;
- case BinaryOperatorType.ExclusiveOr: return v1 ^ v2;
- case BinaryOperatorType.Divide: return v1 / v2;
- case BinaryOperatorType.Modulus: return v1 % v2;
- case BinaryOperatorType.Multiply: return v1 * v2;
- case BinaryOperatorType.ShiftLeft: return v1 << (int) v2;
- case BinaryOperatorType.ShiftRight: return v1 >> (int) v2;
- case BinaryOperatorType.Subtract: return v1 - v2;
- case BinaryOperatorType.GreaterThan: return v1 > v2;
- case BinaryOperatorType.GreaterThanOrEqual: return v1 >= v2;
- case BinaryOperatorType.LessThan: return v1 < v2;
- case BinaryOperatorType.LessThanOrEqual: return v1 <= v2;
- case BinaryOperatorType.Equality: return v1 == v2;
- case BinaryOperatorType.InEquality: return v1 != v2;
- default: throw ParseError ("Invalid binary operator.");
- }
- }
-
- static object EvaluateStringOperation (BinaryOperatorType op, object v1, object v2)
- {
- switch (op) {
- case BinaryOperatorType.Equality:
- if (!(v1 == null || v1 is string) || !(v2 == null || v2 is string))
- throw ParseError ("Invalid operands in binary operator.");
- return ((string) v1) == ((string) v2);
- case BinaryOperatorType.InEquality:
- if (!(v1 == null || v1 is string) || !(v2 == null || v2 is string))
- throw ParseError ("Invalid operands in binary operator.");
- return ((string) v1) != ((string) v2);
- case BinaryOperatorType.Add:
- if (v1 == null) return v2.ToString ();
- if (v2 == null) return v1.ToString ();
- return v1.ToString () + v2.ToString ();
- default:
- throw ParseError ("Invalid operands in binary operator.");
- }
- }
-
- static void ConvertValues<T> (EvaluationContext ctx, object actualV1, object actualV2, object toType, out T v1, out T v2)
- {
- try {
- object c1 = ctx.Adapter.Cast (ctx, actualV1, toType);
- v1 = (T) ctx.Adapter.TargetObjectToObject (ctx, c1);
-
- object c2 = ctx.Adapter.Cast (ctx, actualV2, toType);
- v2 = (T) ctx.Adapter.TargetObjectToObject (ctx, c2);
- } catch {
- throw ParseError ("Invalid operands in binary operator.");
- }
- }
-
- static bool CheckReferenceEquality (EvaluationContext ctx, object v1, object v2)
- {
- if (v1 == null && v2 == null)
- return true;
-
- if (v1 == null || v2 == null)
- return false;
-
- object objectType = ctx.Adapter.GetType (ctx, "System.Object");
- object[] argTypes = new object[] {
- objectType, objectType
- };
- object[] args = new object[] {
- v1, v2
- };
-
- object result = ctx.Adapter.RuntimeInvoke (ctx, objectType, null, "ReferenceEquals", argTypes, args);
- var literal = LiteralValueReference.CreateTargetObjectLiteral (ctx, "result", result);
-
- return (bool) literal.ObjectValue;
- }
-
- static bool CheckEquality (EvaluationContext ctx, bool negate, object v1, object v2)
- {
- if (v1 == null && v2 == null)
- return true;
-
- if (v1 == null || v2 == null)
- return false;
-
- string method = negate ? "op_Inequality" : "op_Equality";
- object v1type = ctx.Adapter.GetValueType (ctx, v1);
- object v2type = ctx.Adapter.GetValueType (ctx, v2);
- object[] argTypes = new object[] { v2type };
- object target, targetType;
- object[] args;
-
- if (ctx.Adapter.HasMethod (ctx, v1type, method, argTypes, BindingFlags.Instance | BindingFlags.Public)) {
- args = new object[] { v2 };
- targetType = v1type;
- negate = false;
- target = v1;
- } else {
- method = ctx.Adapter.IsValueType (v1type) ? "Equals" : "ReferenceEquals";
- targetType = ctx.Adapter.GetType (ctx, "System.Object");
- argTypes = new object[] { targetType, targetType };
- args = new object[] { v1, v2 };
- target = null;
- }
-
- object result = ctx.Adapter.RuntimeInvoke (ctx, targetType, target, method, argTypes, args);
- var literal = LiteralValueReference.CreateTargetObjectLiteral (ctx, "result", result);
- bool retval = (bool) literal.ObjectValue;
-
- return negate ? !retval : retval;
- }
-
- ValueReference EvaluateBinaryOperatorExpression (BinaryOperatorType op, ValueReference left, Expression rightExp)
- {
- if (op == BinaryOperatorType.ConditionalAnd) {
- object val = left.ObjectValue;
- if (!(val is bool))
- throw ParseError ("Left operand of logical And must be a boolean.");
- if (!(bool)val)
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, false);
- ValueReference vr = rightExp.AcceptVisitor<ValueReference> (this);
- if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
- throw ParseError ("Right operand of logical And must be a boolean.");
- return vr;
- } else if (op == BinaryOperatorType.ConditionalOr) {
- object val = left.ObjectValue;
- if (!(val is bool))
- throw ParseError ("Left operand of logical Or must be a boolean.");
- if ((bool)val)
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, true);
- ValueReference vr = rightExp.AcceptVisitor<ValueReference> (this);
- if (vr == null || ctx.Adapter.GetTypeName (ctx, vr.Type) != "System.Boolean")
- throw ParseError ("Right operand of logical Or must be a boolean.");
- return vr;
- }
-
- ValueReference right = rightExp.AcceptVisitor<ValueReference> (this);
- object targetVal1 = left.Value;
- object targetVal2 = right.Value;
- object val1 = left.ObjectValue;
- object val2 = right.ObjectValue;
-
- if (op == BinaryOperatorType.Add) {
- if (val1 is string || val2 is string) {
- if (!(val1 is string) && val1 != null)
- val1 = ctx.Adapter.CallToString (ctx, targetVal1);
- if (!(val2 is string) && val2 != null)
- val2 = ctx.Adapter.CallToString (ctx, targetVal2);
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, (string) val1 + (string) val2);
- }
- }
-
- if ((op == BinaryOperatorType.ExclusiveOr) && (val1 is bool) && (val2 is bool))
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, (bool) val1 ^ (bool) val2);
-
- if ((val1 == null || !ctx.Adapter.IsPrimitive (ctx, targetVal1)) && (val2 == null || !ctx.Adapter.IsPrimitive (ctx, targetVal2))) {
- switch (op) {
- case BinaryOperatorType.Equality:
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, CheckEquality (ctx, false, targetVal1, targetVal2));
- case BinaryOperatorType.InEquality:
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, CheckEquality (ctx, true, targetVal1, targetVal2));
- }
- }
-
- object res;
-
- if (val1 is string || val2 is string) {
- res = EvaluateStringOperation (op, val1, val2);
- } else {
- if (val1 == null || val2 == null || (val1 is bool) || (val2 is bool))
- throw ParseError ("Invalid operands in binary operator.");
-
- string opTypeName = GetCommonOperationType (val1, val2);
- object opType = ctx.Adapter.GetType (ctx, opTypeName);
-
- if (opTypeName == "System.Double") {
- double v1, v2;
-
- ConvertValues<double> (ctx, targetVal1, targetVal2, opType, out v1, out v2);
- res = EvaluateOperation (op, v1, v2);
- } else {
- long v1, v2;
-
- ConvertValues<long> (ctx, targetVal1, targetVal2, opType, out v1, out v2);
- res = EvaluateOperation (op, v1, v2);
- }
- }
-
- if (!(res is bool) && !(res is string)) {
- if (ctx.Adapter.IsEnum (ctx, targetVal1)) {
- object tval = ctx.Adapter.Cast (ctx, ctx.Adapter.CreateValue (ctx, res), ctx.Adapter.GetValueType (ctx, targetVal1));
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, tval);
- }
-
- if (ctx.Adapter.IsEnum (ctx, targetVal2)) {
- object tval = ctx.Adapter.Cast (ctx, ctx.Adapter.CreateValue (ctx, res), ctx.Adapter.GetValueType (ctx, targetVal2));
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, tval);
- }
-
- res = Convert.ChangeType (res, GetCommonType (val1, val2));
- }
-
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, res);
- }
-
- static string ResolveType (EvaluationContext ctx, MemberReferenceExpression mre, List<object> args)
- {
- string parent, name;
-
- if (mre.Target is MemberReferenceExpression) {
- parent = ResolveType (ctx, (MemberReferenceExpression) mre.Target, args);
- } else if (mre.Target is IdentifierExpression) {
- parent = ((IdentifierExpression) mre.Target).Identifier;
- } else {
- return null;
- }
-
- name = parent + "." + mre.MemberName;
- if (mre.TypeArguments.Count > 0) {
- name += "`" + mre.TypeArguments.Count;
- foreach (var arg in mre.TypeArguments) {
- object resolved = arg.Resolve (ctx);
-
- if (resolved == null)
- return null;
-
- args.Add (resolved);
- }
- }
-
- return name;
- }
-
- static object ResolveType (EvaluationContext ctx, MemberReferenceExpression mre)
- {
- var args = new List<object> ();
- var name = ResolveType (ctx, mre, args);
-
- if (name == null)
- return null;
-
- if (args.Count > 0)
- return ctx.Adapter.GetType (ctx, name, args.ToArray ());
-
- return ctx.Adapter.GetType (ctx, name);
- }
-
- static ValueReference ResolveTypeValueReference (EvaluationContext ctx, MemberReferenceExpression mre)
- {
- object resolved = ResolveType (ctx, mre);
-
- if (resolved != null) {
- ctx.Adapter.ForceLoadType (ctx, resolved);
-
- return new TypeValueReference (ctx, resolved);
- }
-
- throw ParseError ("Could not resolve type: {0}", mre);
- }
-
- static ValueReference ResolveTypeValueReference (EvaluationContext ctx, AstType type)
- {
- object resolved = type.Resolve (ctx);
-
- if (resolved != null) {
- ctx.Adapter.ForceLoadType (ctx, resolved);
-
- return new TypeValueReference (ctx, resolved);
- }
-
- throw ParseError ("Could not resolve type: {0}", ResolveTypeName (type));
- }
-
- #region IAstVisitor implementation
-
- public ValueReference VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUndocumentedExpression (UndocumentedExpression undocumentedExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitArrayCreateExpression (ArrayCreateExpression arrayCreateExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitArrayInitializerExpression (ArrayInitializerExpression arrayInitializerExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitAsExpression (AsExpression asExpression)
- {
- var type = asExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
- if (type == null)
- throw ParseError ("Invalid type in cast.");
-
- var val = asExpression.Expression.AcceptVisitor<ValueReference> (this);
- var result = ctx.Adapter.TryCast (ctx, val.Value, type.Type);
-
- if (result == null)
- return new NullValueReference (ctx, type.Type);
-
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, result);
- }
-
- public ValueReference VisitAssignmentExpression (AssignmentExpression assignmentExpression)
- {
- if (!options.AllowMethodEvaluation)
- throw NotSupported ();
-
- var left = assignmentExpression.Left.AcceptVisitor<ValueReference> (this);
-
- if (assignmentExpression.Operator == AssignmentOperatorType.Assign) {
- var right = assignmentExpression.Right.AcceptVisitor<ValueReference> (this);
- left.Value = right.Value;
- } else {
- BinaryOperatorType op;
-
- switch (assignmentExpression.Operator) {
- case AssignmentOperatorType.Add: op = BinaryOperatorType.Add; break;
- case AssignmentOperatorType.Subtract: op = BinaryOperatorType.Subtract; break;
- case AssignmentOperatorType.Multiply: op = BinaryOperatorType.Multiply; break;
- case AssignmentOperatorType.Divide: op = BinaryOperatorType.Divide; break;
- case AssignmentOperatorType.Modulus: op = BinaryOperatorType.Modulus; break;
- case AssignmentOperatorType.ShiftLeft: op = BinaryOperatorType.ShiftLeft; break;
- case AssignmentOperatorType.ShiftRight: op = BinaryOperatorType.ShiftRight; break;
- case AssignmentOperatorType.BitwiseAnd: op = BinaryOperatorType.BitwiseAnd; break;
- case AssignmentOperatorType.BitwiseOr: op = BinaryOperatorType.BitwiseOr; break;
- case AssignmentOperatorType.ExclusiveOr: op = BinaryOperatorType.ExclusiveOr; break;
- default: throw ParseError ("Invalid operator in assignment.");
- }
-
- var result = EvaluateBinaryOperatorExpression (op, left, assignmentExpression.Right);
- left.Value = result.Value;
- }
-
- return left;
- }
-
- public ValueReference VisitBaseReferenceExpression (BaseReferenceExpression baseReferenceExpression)
- {
- var self = ctx.Adapter.GetThisReference (ctx);
-
- if (self != null)
- return LiteralValueReference.CreateTargetBaseObjectLiteral (ctx, expression, self.Value);
- else
- throw ParseError ("'base' reference not available in static methods.");
- }
-
- public ValueReference VisitBinaryOperatorExpression (BinaryOperatorExpression binaryOperatorExpression)
- {
- var left = binaryOperatorExpression.Left.AcceptVisitor<ValueReference> (this);
-
- return EvaluateBinaryOperatorExpression (binaryOperatorExpression.Operator, left, binaryOperatorExpression.Right);
- }
-
- public ValueReference VisitCastExpression (CastExpression castExpression)
- {
- var type = castExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
- if (type == null)
- throw ParseError ("Invalid type in cast.");
-
- var val = castExpression.Expression.AcceptVisitor<ValueReference> (this);
- object result = ctx.Adapter.TryCast (ctx, val.Value, type.Type);
- if (result == null)
- throw ParseError ("Invalid cast.");
-
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, result);
- }
-
- public ValueReference VisitCheckedExpression (CheckedExpression checkedExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitConditionalExpression (ConditionalExpression conditionalExpression)
- {
- ValueReference val = conditionalExpression.Condition.AcceptVisitor<ValueReference> (this);
- if (val is TypeValueReference)
- throw NotSupported ();
-
- if ((bool) val.ObjectValue)
- return conditionalExpression.TrueExpression.AcceptVisitor<ValueReference> (this);
-
- return conditionalExpression.FalseExpression.AcceptVisitor<ValueReference> (this);
- }
-
- public ValueReference VisitDefaultValueExpression (DefaultValueExpression defaultValueExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitDirectionExpression (DirectionExpression directionExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitIdentifierExpression (IdentifierExpression identifierExpression)
- {
- var name = identifierExpression.Identifier;
-
- if (name == "__EXCEPTION_OBJECT__")
- return ctx.Adapter.GetCurrentException (ctx);
-
- // Look in user defined variables
-
- ValueReference userVar;
- if (userVariables.TryGetValue (name, out userVar))
- return userVar;
-
- // Look in variables
-
- ValueReference var = ctx.Adapter.GetLocalVariable (ctx, name);
- if (var != null)
- return var;
-
- // Look in parameters
-
- var = ctx.Adapter.GetParameter (ctx, name);
- if (var != null)
- return var;
-
- // Look in instance fields and properties
-
- ValueReference self = ctx.Adapter.GetThisReference (ctx);
-
- if (self != null) {
- // check for fields and properties in this instance
- var = ctx.Adapter.GetMember (ctx, self, self.Type, self.Value, name);
- if (var != null)
- return var;
- }
-
- // Look in static fields & properties of the enclosing type and all parent types
-
- object type = ctx.Adapter.GetEnclosingType (ctx);
- object vtype = type;
-
- while (vtype != null) {
- // check for static fields and properties
- var = ctx.Adapter.GetMember (ctx, null, vtype, null, name);
- if (var != null)
- return var;
-
- vtype = ctx.Adapter.GetParentType (ctx, vtype);
- }
-
- // Look in types
-
- vtype = ctx.Adapter.GetType (ctx, name);
- if (vtype != null)
- return new TypeValueReference (ctx, vtype);
-
- // Look in nested types
-
- if (type != null) {
- foreach (object ntype in ctx.Adapter.GetNestedTypes (ctx, type)) {
- if (TypeValueReference.GetTypeName (ctx.Adapter.GetTypeName (ctx, ntype)) == name)
- return new TypeValueReference (ctx, ntype);
- }
-
- string[] namespaces = ctx.Adapter.GetImportedNamespaces (ctx);
- if (namespaces.Length > 0) {
- // Look in namespaces
- foreach (string ns in namespaces) {
- string nm = ns + "." + name;
- vtype = ctx.Adapter.ForceLoadType (ctx, nm);
- if (vtype != null)
- return new TypeValueReference (ctx, vtype);
- }
-
- foreach (string ns in namespaces) {
- if (ns == name || ns.StartsWith (name + ".", StringComparison.InvariantCulture))
- return new NamespaceValueReference (ctx, name);
- }
- }
- }
-
- if (self == null && ctx.Adapter.HasMember (ctx, type, name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
- string message = string.Format ("An object reference is required for the non-static field, method, or property '{0}.{1}'.",
- ctx.Adapter.GetDisplayTypeName (ctx, type), name);
- throw ParseError (message);
- }
-
- throw ParseError ("Unknown identifier: {0}", name);
- }
-
- public ValueReference VisitIndexerExpression (IndexerExpression indexerExpression)
- {
- int n = 0;
-
- var target = indexerExpression.Target.AcceptVisitor<ValueReference> (this);
- if (target is TypeValueReference)
- throw NotSupported ();
-
- if (ctx.Adapter.IsArray (ctx, target.Value)) {
- int[] indexes = new int [indexerExpression.Arguments.Count];
-
- foreach (var arg in indexerExpression.Arguments) {
- var index = arg.AcceptVisitor<ValueReference> (this);
- indexes[n++] = (int) Convert.ChangeType (index.ObjectValue, typeof (int));
- }
-
- return new ArrayValueReference (ctx, target.Value, indexes);
- }
-
- object[] args = new object [indexerExpression.Arguments.Count];
- foreach (var arg in indexerExpression.Arguments)
- args[n++] = arg.AcceptVisitor<ValueReference> (this).Value;
-
- var indexer = ctx.Adapter.GetIndexerReference (ctx, target.Value, args);
- if (indexer == null)
- throw NotSupported ();
-
- return indexer;
- }
-
- public ValueReference VisitInvocationExpression (InvocationExpression invocationExpression)
- {
- if (!options.AllowMethodEvaluation)
- throw NotSupported ();
-
- bool invokeBaseMethod = false;
- ValueReference target = null;
- string methodName;
-
- object[] types = new object [invocationExpression.Arguments.Count];
- object[] args = new object [invocationExpression.Arguments.Count];
- int n = 0;
-
- foreach (var arg in invocationExpression.Arguments) {
- var vref = arg.AcceptVisitor<ValueReference> (this);
- args[n] = vref.Value;
- types[n] = ctx.Adapter.GetValueType (ctx, args[n]);
- n++;
- }
-
- if (invocationExpression.Target is MemberReferenceExpression) {
- var field = (MemberReferenceExpression) invocationExpression.Target;
- target = field.Target.AcceptVisitor<ValueReference> (this);
- if (field.Target is BaseReferenceExpression)
- invokeBaseMethod = true;
- methodName = field.MemberName;
- } else if (invocationExpression.Target is IdentifierExpression) {
- methodName = ((IdentifierExpression) invocationExpression.Target).Identifier;
- var vref = ctx.Adapter.GetThisReference (ctx);
-
- if (vref != null && ctx.Adapter.HasMethod (ctx, vref.Type, methodName, BindingFlags.Instance)) {
- // There is an instance method for 'this', although it may not have an exact signature match. Check it now.
- if (ctx.Adapter.HasMethod (ctx, vref.Type, methodName, types, BindingFlags.Instance)) {
- target = vref;
- } else {
- // There isn't an instance method with exact signature match.
- // If there isn't a static method, then use the instance method,
- // which will report the signature match error when invoked
- object etype = ctx.Adapter.GetEnclosingType (ctx);
- if (!ctx.Adapter.HasMethod (ctx, etype, methodName, types, BindingFlags.Static))
- target = vref;
- }
- } else {
- if (ctx.Adapter.HasMethod (ctx, ctx.Adapter.GetEnclosingType (ctx), methodName, types, BindingFlags.Instance))
- throw new EvaluatorException ("Cannot invoke an instance method from a static method.");
- target = null;
- }
- } else {
- throw NotSupported ();
- }
-
- object vtype = target != null ? target.Type : ctx.Adapter.GetEnclosingType (ctx);
- object vtarget = (target is TypeValueReference) || target == null ? null : target.Value;
-
- if (invokeBaseMethod)
- vtype = ctx.Adapter.GetBaseType (ctx, vtype);
-
- object res = ctx.Adapter.RuntimeInvoke (ctx, vtype, vtarget, methodName, types, args);
- if (res != null)
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, res);
-
- return LiteralValueReference.CreateVoidReturnLiteral (ctx, expression);
- }
-
- public ValueReference VisitIsExpression (IsExpression isExpression)
- {
- // FIXME: we could probably implement this one...
- throw NotSupported ();
- }
-
- public ValueReference VisitLambdaExpression (LambdaExpression lambdaExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitMemberReferenceExpression (MemberReferenceExpression memberReferenceExpression)
- {
- if (memberReferenceExpression.TypeArguments.Count > 0)
- return ResolveTypeValueReference (ctx, memberReferenceExpression);
-
- var target = memberReferenceExpression.Target.AcceptVisitor<ValueReference> (this);
- var member = target.GetChild (memberReferenceExpression.MemberName, ctx.Options);
-
- if (member == null) {
- if (ctx.Adapter.IsNull (ctx, target.Value))
- throw new EvaluatorException ("{0} is null", target.Name);
-
- throw ParseError ("Unknown member: {0}", memberReferenceExpression.MemberName);
- }
-
- return member;
- }
-
- public ValueReference VisitNamedArgumentExpression (NamedArgumentExpression namedArgumentExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitNamedExpression (NamedExpression namedExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitNullReferenceExpression (NullReferenceExpression nullReferenceExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitObjectCreateExpression (ObjectCreateExpression objectCreateExpression)
- {
- var type = objectCreateExpression.Type.AcceptVisitor<ValueReference> (this) as TypeValueReference;
- var args = new List<object> ();
-
- foreach (var arg in objectCreateExpression.Arguments) {
- var val = arg.AcceptVisitor<ValueReference> (this);
- args.Add (val != null ? val.Value : null);
- }
-
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, expression, ctx.Adapter.CreateValue (ctx, type.Type, args.ToArray ()));
- }
-
- public ValueReference VisitAnonymousTypeCreateExpression (AnonymousTypeCreateExpression anonymousTypeCreateExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitParenthesizedExpression (ParenthesizedExpression parenthesizedExpression)
- {
- return parenthesizedExpression.Expression.AcceptVisitor<ValueReference> (this);
- }
-
- public ValueReference VisitPointerReferenceExpression (PointerReferenceExpression pointerReferenceExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitPrimitiveExpression (PrimitiveExpression primitiveExpression)
- {
- if (primitiveExpression.Value != null)
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, primitiveExpression.Value);
-
- if (expectedType != null)
- return new NullValueReference (ctx, expectedType);
-
- return new NullValueReference (ctx, ctx.Adapter.GetType (ctx, "System.Object"));
- }
-
- public ValueReference VisitSizeOfExpression (SizeOfExpression sizeOfExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitStackAllocExpression (StackAllocExpression stackAllocExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitThisReferenceExpression (ThisReferenceExpression thisReferenceExpression)
- {
- var self = ctx.Adapter.GetThisReference (ctx);
-
- if (self == null)
- throw ParseError ("'this' reference not available in the current evaluation context.");
-
- return self;
- }
-
- public ValueReference VisitTypeOfExpression (TypeOfExpression typeOfExpression)
- {
- var name = ResolveTypeName (typeOfExpression.Type);
- var type = typeOfExpression.Type.Resolve (ctx);
-
- if (type == null)
- throw ParseError ("Could not load type: {0}", name);
-
- object result = ctx.Adapter.CreateTypeObject (ctx, type);
- if (result == null)
- throw NotSupported ();
-
- return LiteralValueReference.CreateTargetObjectLiteral (ctx, name, result);
- }
-
- public ValueReference VisitTypeReferenceExpression (TypeReferenceExpression typeReferenceExpression)
- {
- var type = typeReferenceExpression.Type.Resolve (ctx);
-
- if (type != null) {
- ctx.Adapter.ForceLoadType (ctx, type);
-
- return new TypeValueReference (ctx, type);
- }
-
- var name = ResolveTypeName (typeReferenceExpression.Type);
-
- // Assume it is a namespace.
- return new NamespaceValueReference (ctx, name);
- }
-
- public ValueReference VisitUnaryOperatorExpression (UnaryOperatorExpression unaryOperatorExpression)
- {
- var vref = unaryOperatorExpression.Expression.AcceptVisitor<ValueReference> (this);
- var val = vref.ObjectValue;
- object newVal;
- long num;
-
- switch (unaryOperatorExpression.Operator) {
- case UnaryOperatorType.BitNot:
- num = ~GetInteger (val);
- val = Convert.ChangeType (num, val.GetType ());
- break;
- case UnaryOperatorType.Minus:
- num = -GetInteger (val);
- val = Convert.ChangeType (num, val.GetType ());
- break;
- case UnaryOperatorType.Not:
- if (!(val is bool))
- throw ParseError ("Expected boolean type in Not operator.");
-
- val = !(bool) val;
- break;
- case UnaryOperatorType.PostDecrement:
- num = GetInteger (val) - 1;
- newVal = Convert.ChangeType (num, val.GetType ());
- vref.Value = ctx.Adapter.CreateValue (ctx, newVal);
- break;
- case UnaryOperatorType.Decrement:
- num = GetInteger (val) - 1;
- val = Convert.ChangeType (num, val.GetType ());
- vref.Value = ctx.Adapter.CreateValue (ctx, val);
- break;
- case UnaryOperatorType.PostIncrement:
- num = GetInteger (val) + 1;
- newVal = Convert.ChangeType (num, val.GetType ());
- vref.Value = ctx.Adapter.CreateValue (ctx, newVal);
- break;
- case UnaryOperatorType.Increment:
- num = GetInteger (val) + 1;
- val = Convert.ChangeType (num, val.GetType ());
- vref.Value = ctx.Adapter.CreateValue (ctx, val);
- break;
- case UnaryOperatorType.Plus:
- break;
- default:
- throw NotSupported ();
- }
-
- return LiteralValueReference.CreateObjectLiteral (ctx, expression, val);
- }
-
- public ValueReference VisitUncheckedExpression (UncheckedExpression uncheckedExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitEmptyExpression (EmptyExpression emptyExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryExpression (QueryExpression queryExpression)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryContinuationClause (QueryContinuationClause queryContinuationClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryFromClause (QueryFromClause queryFromClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryLetClause (QueryLetClause queryLetClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryWhereClause (QueryWhereClause queryWhereClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryJoinClause (QueryJoinClause queryJoinClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryOrderClause (QueryOrderClause queryOrderClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryOrdering (QueryOrdering queryOrdering)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQuerySelectClause (QuerySelectClause querySelectClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitQueryGroupClause (QueryGroupClause queryGroupClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitAttribute (ICSharpCode.NRefactory.CSharp.Attribute attribute)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitAttributeSection (AttributeSection attributeSection)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitDelegateDeclaration (DelegateDeclaration delegateDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitTypeDeclaration (TypeDeclaration typeDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUsingAliasDeclaration (UsingAliasDeclaration usingAliasDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUsingDeclaration (UsingDeclaration usingDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitExternAliasDeclaration (ExternAliasDeclaration externAliasDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitBlockStatement (BlockStatement blockStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitBreakStatement (BreakStatement breakStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitCheckedStatement (CheckedStatement checkedStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitContinueStatement (ContinueStatement continueStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitDoWhileStatement (DoWhileStatement doWhileStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitEmptyStatement (EmptyStatement emptyStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitExpressionStatement (ExpressionStatement expressionStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitFixedStatement (FixedStatement fixedStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitForeachStatement (ForeachStatement foreachStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitForStatement (ForStatement forStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitGotoCaseStatement (GotoCaseStatement gotoCaseStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitGotoDefaultStatement (GotoDefaultStatement gotoDefaultStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitGotoStatement (GotoStatement gotoStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitIfElseStatement (IfElseStatement ifElseStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitLabelStatement (LabelStatement labelStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitLockStatement (LockStatement lockStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitReturnStatement (ReturnStatement returnStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitSwitchStatement (SwitchStatement switchStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitSwitchSection (SwitchSection switchSection)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitCaseLabel (CaseLabel caseLabel)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitThrowStatement (ThrowStatement throwStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitTryCatchStatement (TryCatchStatement tryCatchStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitCatchClause (CatchClause catchClause)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUncheckedStatement (UncheckedStatement uncheckedStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUnsafeStatement (UnsafeStatement unsafeStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitUsingStatement (UsingStatement usingStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitVariableDeclarationStatement (VariableDeclarationStatement variableDeclarationStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitWhileStatement (WhileStatement whileStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitYieldBreakStatement (YieldBreakStatement yieldBreakStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitYieldReturnStatement (YieldReturnStatement yieldReturnStatement)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitAccessor (Accessor accessor)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitConstructorInitializer (ConstructorInitializer constructorInitializer)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitEventDeclaration (EventDeclaration eventDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitCustomEventDeclaration (CustomEventDeclaration customEventDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitFieldDeclaration (FieldDeclaration fieldDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitIndexerDeclaration (IndexerDeclaration indexerDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitMethodDeclaration (MethodDeclaration methodDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitParameterDeclaration (ParameterDeclaration parameterDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitVariableInitializer (VariableInitializer variableInitializer)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitFixedVariableInitializer (FixedVariableInitializer fixedVariableInitializer)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitSyntaxTree (SyntaxTree syntaxTree)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitSimpleType (SimpleType simpleType)
- {
- return ResolveTypeValueReference (ctx, simpleType);
- }
-
- public ValueReference VisitMemberType (MemberType memberType)
- {
- return ResolveTypeValueReference (ctx, memberType);
- }
-
- public ValueReference VisitComposedType (ComposedType composedType)
- {
- return ResolveTypeValueReference (ctx, composedType);
- }
-
- public ValueReference VisitArraySpecifier (ArraySpecifier arraySpecifier)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitPrimitiveType (PrimitiveType primitiveType)
- {
- return ResolveTypeValueReference (ctx, primitiveType);
- }
-
- public ValueReference VisitComment (Comment comment)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitWhitespace (WhitespaceNode whitespaceNode)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitText (TextNode textNode)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitNewLine (NewLineNode newLineNode)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitPreProcessorDirective (PreProcessorDirective preProcessorDirective)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitDocumentationReference (DocumentationReference documentationReference)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitTypeParameterDeclaration (TypeParameterDeclaration typeParameterDeclaration)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitConstraint (Constraint constraint)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitCSharpTokenNode (CSharpTokenNode cSharpTokenNode)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitIdentifier (Identifier identifier)
- {
- throw NotSupported ();
- }
-
- public ValueReference VisitPatternPlaceholder (AstNode placeholder, ICSharpCode.NRefactory.PatternMatching.Pattern pattern)
- {
- throw NotSupported ();
- }
-
- #endregion
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
deleted file mode 100644
index d981f78..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/ObjectValueAdaptor.cs
+++ /dev/null
@@ -1,1329 +0,0 @@
-//
-// ObjectValueAdaptor.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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.Linq;
-using System.Text;
-using System.Reflection;
-using System.Diagnostics;
-using System.Collections.Generic;
-
-using Mono.Debugging.Client;
-using Mono.Debugging.Backend;
-
-namespace Mono.Debugging.Evaluation
-{
- public abstract class ObjectValueAdaptor: IDisposable
- {
- Dictionary<string, TypeDisplayData> typeDisplayData = new Dictionary<string, TypeDisplayData> ();
-
- // Time to wait while evaluating before switching to async mode
- public int DefaultEvaluationWaitTime { get; set; }
-
- public event EventHandler<BusyStateEventArgs> BusyStateChanged;
-
- AsyncEvaluationTracker asyncEvaluationTracker = new AsyncEvaluationTracker ();
- AsyncOperationManager asyncOperationManager = new AsyncOperationManager ();
- static Dictionary<string, string> netToCSharpTypes = new Dictionary<string, string> ();
-
- static ObjectValueAdaptor ()
- {
- netToCSharpTypes["System.Void"] = "void";
- netToCSharpTypes["System.Object"] = "object";
- netToCSharpTypes["System.Boolean"] = "bool";
- netToCSharpTypes["System.Byte"] = "byte";
- netToCSharpTypes["System.SByte"] = "sbyte";
- netToCSharpTypes["System.Char"] = "char";
- netToCSharpTypes["System.Enum"] = "enum";
- netToCSharpTypes["System.Int16"] = "short";
- netToCSharpTypes["System.Int32"] = "int";
- netToCSharpTypes["System.Int64"] = "long";
- netToCSharpTypes["System.UInt16"] = "ushort";
- netToCSharpTypes["System.UInt32"] = "uint";
- netToCSharpTypes["System.UInt64"] = "ulong";
- netToCSharpTypes["System.Single"] = "float";
- netToCSharpTypes["System.Double"] = "double";
- netToCSharpTypes["System.Decimal"] = "decimal";
- netToCSharpTypes["System.String"] = "string";
- }
-
- public ObjectValueAdaptor ()
- {
- DefaultEvaluationWaitTime = 100;
-
- asyncOperationManager.BusyStateChanged += delegate(object sender, BusyStateEventArgs e) {
- OnBusyStateChanged (e);
- };
- asyncEvaluationTracker.WaitTime = DefaultEvaluationWaitTime;
- }
-
- public void Dispose ()
- {
- asyncEvaluationTracker.Dispose ();
- asyncOperationManager.Dispose ();
- }
-
- public ObjectValue CreateObjectValue (EvaluationContext ctx, IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
- {
- try {
- return CreateObjectValueImpl (ctx, source, path, obj, flags);
- } catch (EvaluatorAbortedException ex) {
- return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
- } catch (EvaluatorException ex) {
- return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
- } catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- return ObjectValue.CreateFatalError (path.LastName, ex.Message, flags);
- }
- }
-
- public virtual string GetDisplayTypeName (string typeName)
- {
- return GetDisplayTypeName (typeName.Replace ('+', '.'), 0, typeName.Length);
- }
-
- public string GetDisplayTypeName (EvaluationContext ctx, object type)
- {
- return GetDisplayTypeName (GetTypeName (ctx, type));
- }
-
- string GetDisplayTypeName (string typeName, int startIndex, int endIndex)
- {
- // Note: '[' denotes the start of an array
- // '`' denotes a generic type
- // ',' denotes the start of the assembly name
- int tokenIndex = typeName.IndexOfAny (new char [] { '[', '`', ',' }, startIndex, endIndex - startIndex);
- List<string> genericArgs = null;
- string array = string.Empty;
- int genericEndIndex = -1;
- int typeEndIndex;
-
- retry:
- if (tokenIndex == -1) // Simple type
- return GetShortTypeName (typeName.Substring (startIndex, endIndex - startIndex));
-
- if (typeName[tokenIndex] == ',') // Simple type with an assembly name
- return GetShortTypeName (typeName.Substring (startIndex, tokenIndex - startIndex));
-
- // save the index of the end of the type name
- typeEndIndex = tokenIndex;
-
- // decode generic args first, if this is a generic type
- if (typeName[tokenIndex] == '`') {
- genericEndIndex = typeName.IndexOf ('[', tokenIndex, endIndex - tokenIndex);
- if (genericEndIndex == -1) {
- // Mono's compiler seems to generate non-generic types with '`'s in the name
- // e.g. __EventHandler`1_FileCopyEventArgs_DelegateFactory_2
- tokenIndex = typeName.IndexOfAny (new char [] { '[', ',' }, tokenIndex, endIndex - tokenIndex);
- goto retry;
- }
-
- tokenIndex = genericEndIndex;
- genericArgs = GetGenericArguments (typeName, ref tokenIndex, endIndex);
- }
-
- // decode array rank info
- while (tokenIndex < endIndex && typeName[tokenIndex] == '[') {
- int arrayEndIndex = typeName.IndexOf (']', tokenIndex, endIndex - tokenIndex);
- if (arrayEndIndex == -1)
- break;
- arrayEndIndex++;
- array += typeName.Substring (tokenIndex, arrayEndIndex - tokenIndex);
- tokenIndex = arrayEndIndex;
- }
-
- string name = typeName.Substring (startIndex, typeEndIndex - startIndex);
-
- if (genericArgs == null)
- return GetShortTypeName (name) + array;
-
- // Use the prettier name for nullable types
- if (name == "System.Nullable" && genericArgs.Count == 1)
- return genericArgs[0] + "?" + array;
-
- // Insert the generic arguments next to each type.
- // for example: Foo`1+Bar`1[System.Int32,System.String]
- // is converted to: Foo<int>.Bar<string>
- StringBuilder sb = new StringBuilder (name);
- int i = typeEndIndex + 1;
- int genericIndex = 0;
- int argCount, next;
-
- while (i < genericEndIndex) {
- // decode the argument count
- argCount = 0;
- while (i < genericEndIndex && char.IsDigit (typeName[i])) {
- argCount = (argCount * 10) + (typeName[i] - '0');
- i++;
- }
-
- // insert the argument types
- sb.Append ('<');
- while (argCount > 0 && genericIndex < genericArgs.Count) {
- sb.Append (genericArgs[genericIndex++]);
- if (--argCount > 0)
- sb.Append (',');
- }
- sb.Append ('>');
-
- // Find the end of the next generic type component
- if ((next = typeName.IndexOf ('`', i, genericEndIndex - i)) == -1)
- next = genericEndIndex;
-
- // Append the next generic type component
- sb.Append (typeName.Substring (i, next - i));
-
- i = next + 1;
- }
-
- return sb.ToString () + array;
- }
-
- List<string> GetGenericArguments (string typeName, ref int i, int endIndex)
- {
- // Get a list of the generic arguments.
- // When returning, i points to the next char after the closing ']'
- List<string> genericArgs = new List<string> ();
- i++;
- while (i < endIndex && typeName [i] != ']') {
- int pend = FindTypeEnd (typeName, i, endIndex);
- bool escaped = typeName [i] == '[';
- genericArgs.Add (GetDisplayTypeName (typeName, escaped ? i + 1 : i, escaped ? pend - 1 : pend));
- i = pend;
- if (i < endIndex && typeName[i] == ',')
- i++;
- }
- i++;
- return genericArgs;
- }
-
- int FindTypeEnd (string s, int i, int endIndex)
- {
- int bc = 0;
- while (i < endIndex) {
- char c = s[i];
- if (c == '[')
- bc++;
- else if (c == ']') {
- if (bc > 0)
- bc--;
- else
- return i;
- }
- else if (c == ',' && bc == 0)
- return i;
- i++;
- }
- return i;
- }
-
- public virtual string GetShortTypeName (string typeName)
- {
- int star = typeName.IndexOf ('*');
- string name, ptr, csharp;
-
- if (star != -1) {
- name = typeName.Substring (0, star);
- ptr = typeName.Substring (star);
- } else {
- ptr = string.Empty;
- name = typeName;
- }
-
- if (netToCSharpTypes.TryGetValue (name, out csharp))
- return csharp + ptr;
-
- return typeName;
- }
-
- public virtual void OnBusyStateChanged (BusyStateEventArgs e)
- {
- EventHandler<BusyStateEventArgs> evnt = BusyStateChanged;
- if (evnt != null)
- evnt (this, e);
- }
-
- public abstract ICollectionAdaptor CreateArrayAdaptor (EvaluationContext ctx, object arr);
- public abstract IStringAdaptor CreateStringAdaptor (EvaluationContext ctx, object str);
-
- public abstract bool IsNull (EvaluationContext ctx, object val);
- public abstract bool IsPrimitive (EvaluationContext ctx, object val);
- public abstract bool IsPointer (EvaluationContext ctx, object val);
- public abstract bool IsString (EvaluationContext ctx, object val);
- public abstract bool IsArray (EvaluationContext ctx, object val);
- public abstract bool IsEnum (EvaluationContext ctx, object val);
- public abstract bool IsValueType (object type);
- public abstract bool IsClass (object type);
- public abstract object TryCast (EvaluationContext ctx, object val, object type);
-
- public abstract object GetValueType (EvaluationContext ctx, object val);
- public abstract string GetTypeName (EvaluationContext ctx, object type);
- public abstract object[] GetTypeArgs (EvaluationContext ctx, object type);
- public abstract object GetBaseType (EvaluationContext ctx, object type);
-
- public virtual bool IsNullableType (EvaluationContext ctx, object type)
- {
- return type != null && GetTypeName (ctx, type).StartsWith ("System.Nullable`1", StringComparison.Ordinal);
- }
-
- public virtual bool NullableHasValue (EvaluationContext ctx, object type, object obj)
- {
- ValueReference hasValue = GetMember (ctx, type, obj, "HasValue");
-
- return (bool) hasValue.ObjectValue;
- }
-
- public virtual ValueReference NullableGetValue (EvaluationContext ctx, object type, object obj)
- {
- return GetMember (ctx, type, obj, "Value");
- }
-
- public virtual bool IsFlagsEnumType (EvaluationContext ctx, object type)
- {
- return true;
- }
-
- public virtual IEnumerable<EnumMember> GetEnumMembers (EvaluationContext ctx, object type)
- {
- object longType = GetType (ctx, "System.Int64");
- TypeValueReference tref = new TypeValueReference (ctx, type);
- foreach (ValueReference cr in tref.GetChildReferences (ctx.Options)) {
- object c = TryCast (ctx, cr.Value, longType);
- if (c == null)
- continue;
- long val = (long) TargetObjectToObject (ctx, c);
- EnumMember em = new EnumMember () { Name = cr.Name, Value = val };
- yield return em;
- }
- }
-
- public object GetBaseType (EvaluationContext ctx, object type, bool includeObjectClass)
- {
- object bt = GetBaseType (ctx, type);
- string tn = bt != null ? GetTypeName (ctx, bt) : null;
- if (!includeObjectClass && bt != null && (tn == "System.Object" || tn == "System.ValueType"))
- return null;
- else
- return bt;
- }
-
- public virtual bool IsClassInstance (EvaluationContext ctx, object val)
- {
- return IsClass (GetValueType (ctx, val));
- }
-
- public virtual bool IsExternalType (EvaluationContext ctx, object type)
- {
- return false;
- }
-
- public object GetType (EvaluationContext ctx, string name)
- {
- return GetType (ctx, name, null);
- }
-
- public abstract object GetType (EvaluationContext ctx, string name, object[] typeArgs);
-
- public virtual string GetValueTypeName (EvaluationContext ctx, object val)
- {
- return GetTypeName (ctx, GetValueType (ctx, val));
- }
-
- public virtual object CreateTypeObject (EvaluationContext ctx, object type)
- {
- return default (object);
- }
-
- public virtual bool IsTypeLoaded (EvaluationContext ctx, string typeName)
- {
- object t = GetType (ctx, typeName);
-
- if (t == null)
- return false;
-
- return IsTypeLoaded (ctx, t);
- }
-
- public virtual bool IsTypeLoaded (EvaluationContext ctx, object type)
- {
- return true;
- }
-
- public virtual object ForceLoadType (EvaluationContext ctx, string typeName)
- {
- object t = GetType (ctx, typeName);
-
- if (t == null || IsTypeLoaded (ctx, t))
- return t;
-
- if (ForceLoadType (ctx, t))
- return t;
-
- return null;
- }
-
- public virtual bool ForceLoadType (EvaluationContext ctx, object type)
- {
- return true;
- }
-
- public abstract object CreateValue (EvaluationContext ctx, object value);
-
- public abstract object CreateValue (EvaluationContext ctx, object type, params object[] args);
-
- public abstract object CreateNullValue (EvaluationContext ctx, object type);
-
- public virtual object GetBaseValue (EvaluationContext ctx, object val)
- {
- return val;
- }
-
- public virtual string[] GetImportedNamespaces (EvaluationContext ctx)
- {
- return new string[0];
- }
-
- public virtual void GetNamespaceContents (EvaluationContext ctx, string namspace, out string[] childNamespaces, out string[] childTypes)
- {
- childTypes = childNamespaces = new string[0];
- }
-
- protected virtual ObjectValue CreateObjectValueImpl (EvaluationContext ctx, Mono.Debugging.Backend.IObjectValueSource source, ObjectPath path, object obj, ObjectValueFlags flags)
- {
- object type = obj != null ? GetValueType (ctx, obj) : null;
- string typeName = type != null ? GetTypeName (ctx, type) : "";
-
- if (obj == null || IsNull (ctx, obj)) {
- return ObjectValue.CreateNullObject (source, path, GetDisplayTypeName (typeName), flags);
- }
- else if (IsPrimitive (ctx, obj) || IsEnum (ctx,obj)) {
- return ObjectValue.CreatePrimitive (source, path, GetDisplayTypeName (typeName), ctx.Evaluator.TargetObjectToExpression (ctx, obj), flags);
- }
- else if (IsArray (ctx, obj)) {
- return ObjectValue.CreateObject (source, path, GetDisplayTypeName (typeName), ctx.Evaluator.TargetObjectToExpression (ctx, obj), flags, null);
- }
- else {
- EvaluationResult tvalue = null;
- TypeDisplayData tdata = null;
- string tname;
-
- if (IsNullableType (ctx, type)) {
- if (NullableHasValue (ctx, type, obj)) {
- ValueReference value = NullableGetValue (ctx, type, obj);
-
- tdata = GetTypeDisplayData (ctx, value.Type);
- obj = value.Value;
- } else {
- tdata = GetTypeDisplayData (ctx, type);
- tvalue = new EvaluationResult ("null");
- }
-
- tname = GetDisplayTypeName (typeName);
- } else {
- tdata = GetTypeDisplayData (ctx, type);
-
- if (!string.IsNullOrEmpty (tdata.TypeDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
- tname = EvaluateDisplayString (ctx, obj, tdata.TypeDisplayString);
- else
- tname = GetDisplayTypeName (typeName);
- }
-
- if (tvalue == null) {
- if (!string.IsNullOrEmpty (tdata.ValueDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
- tvalue = new EvaluationResult (EvaluateDisplayString (ctx, obj, tdata.ValueDisplayString));
- else
- tvalue = ctx.Evaluator.TargetObjectToExpression (ctx, obj);
- }
-
- ObjectValue oval = ObjectValue.CreateObject (source, path, tname, tvalue, flags, null);
- if (!string.IsNullOrEmpty (tdata.NameDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
- oval.Name = EvaluateDisplayString (ctx, obj, tdata.NameDisplayString);
- return oval;
- }
- }
-
- public ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object obj, int firstItemIndex, int count)
- {
- return GetObjectValueChildren (ctx, objectSource, GetValueType (ctx, obj), obj, firstItemIndex, count, true);
- }
-
- public virtual ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, int firstItemIndex, int count, bool dereferenceProxy)
- {
- if (obj is EvaluationResult)
- return new ObjectValue[0];
-
- if (IsArray (ctx, obj)) {
- ArrayElementGroup agroup = new ArrayElementGroup (ctx, CreateArrayAdaptor (ctx, obj));
- return agroup.GetChildren (ctx.Options);
- }
-
- if (IsPrimitive (ctx, obj))
- return new ObjectValue[0];
-
- if (IsNullableType (ctx, type)) {
- if (NullableHasValue (ctx, type, obj)) {
- ValueReference value = NullableGetValue (ctx, type, obj);
-
- return GetObjectValueChildren (ctx, objectSource, value.Type, value.Value, firstItemIndex, count, dereferenceProxy);
- } else {
- return new ObjectValue[0];
- }
- }
-
- bool showRawView = false;
-
- // If there is a proxy, it has to show the members of the proxy
- object proxy = obj;
- if (dereferenceProxy) {
- proxy = GetProxyObject (ctx, obj);
- if (proxy != obj) {
- type = GetValueType (ctx, proxy);
- showRawView = true;
- }
- }
-
- TypeDisplayData tdata = GetTypeDisplayData (ctx, type);
- bool groupPrivateMembers = ctx.Options.GroupPrivateMembers && (ctx.Options.GroupUserPrivateMembers || IsExternalType (ctx, type));
-
- List<ObjectValue> values = new List<ObjectValue> ();
- BindingFlags flattenFlag = ctx.Options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly;
- BindingFlags nonNonPublicFlag = groupPrivateMembers || showRawView ? (BindingFlags)0 : BindingFlags.NonPublic;
- BindingFlags staticFlag = ctx.Options.GroupStaticMembers ? (BindingFlags)0 : BindingFlags.Static;
- BindingFlags access = BindingFlags.Public | BindingFlags.Instance | flattenFlag | nonNonPublicFlag | staticFlag;
-
- // Load all members to a list before creating the object values,
- // to avoid problems with objects being invalidated due to evaluations in the target,
- List<ValueReference> list = new List<ValueReference> ();
- list.AddRange (GetMembersSorted (ctx, objectSource, type, proxy, access));
- var names = new ObjectValueNameTracker (ctx);
- object tdataType = type;
-
- foreach (ValueReference val in list) {
- try {
- object decType = val.DeclaringType;
- if (decType != null && decType != tdataType) {
- tdataType = decType;
- tdata = GetTypeDisplayData (ctx, decType);
- }
- DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
- if (state == DebuggerBrowsableState.Never)
- continue;
-
- if (state == DebuggerBrowsableState.RootHidden && dereferenceProxy) {
- object ob = val.Value;
- if (ob != null) {
- values.Clear ();
- values.AddRange (GetObjectValueChildren (ctx, val, ob, -1, -1));
- showRawView = true;
- break;
- }
- }
- else {
- ObjectValue oval = val.CreateObjectValue (true);
- names.Disambiguate (val, oval);
- values.Add (oval);
- }
-
- }
- catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- values.Add (ObjectValue.CreateError (null, new ObjectPath (val.Name), GetDisplayTypeName (GetTypeName (ctx, val.Type)), ex.Message, val.Flags));
- }
- }
-
- if (showRawView) {
- values.Add (RawViewSource.CreateRawView (ctx, objectSource, obj));
- }
- else {
- if (IsArray (ctx, proxy)) {
- ICollectionAdaptor col = CreateArrayAdaptor (ctx, proxy);
- ArrayElementGroup agroup = new ArrayElementGroup (ctx, col);
- ObjectValue val = ObjectValue.CreateObject (null, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.ReadOnly, values.ToArray ());
- values = new List<ObjectValue> ();
- values.Add (val);
- values.AddRange (agroup.GetChildren (ctx.Options));
- }
- else {
- if (ctx.Options.GroupStaticMembers && HasMembers (ctx, type, proxy, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | flattenFlag)) {
- access = BindingFlags.Static | BindingFlags.Public | flattenFlag | nonNonPublicFlag;
- values.Add (FilteredMembersSource.CreateStaticsNode (ctx, objectSource, type, proxy, access));
- }
- if (groupPrivateMembers && HasMembers (ctx, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag))
- values.Add (FilteredMembersSource.CreateNonPublicsNode (ctx, objectSource, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag));
-
- if (!ctx.Options.FlattenHierarchy) {
- object baseType = GetBaseType (ctx, type, false);
- if (baseType != null)
- values.Insert (0, BaseTypeViewSource.CreateBaseTypeView (ctx, objectSource, baseType, proxy));
- }
- }
- }
- return values.ToArray ();
- }
-
- public ObjectValue[] GetExpressionValuesAsync (EvaluationContext ctx, string[] expressions)
- {
- ObjectValue[] values = new ObjectValue[expressions.Length];
- for (int n = 0; n < values.Length; n++) {
- string exp = expressions[n];
- // This is a workaround to a bug in mono 2.0. That mono version fails to compile
- // an anonymous method here
- ExpData edata = new ExpData (ctx, exp, this);
- values[n] = asyncEvaluationTracker.Run (exp, ObjectValueFlags.Literal, edata.Run);
- }
- return values;
- }
-
- class ExpData
- {
- public EvaluationContext ctx;
- public string exp;
- public ObjectValueAdaptor adaptor;
-
- public ExpData (EvaluationContext ctx, string exp, ObjectValueAdaptor adaptor)
- {
- this.ctx = ctx;
- this.exp = exp;
- this.adaptor = adaptor;
- }
-
- public ObjectValue Run ()
- {
- return adaptor.GetExpressionValue (ctx, exp);
- }
- }
-
- public virtual ValueReference GetIndexerReference (EvaluationContext ctx, object target, object[] indices)
- {
- return null;
- }
-
- public ValueReference GetLocalVariable (EvaluationContext ctx, string name)
- {
- return OnGetLocalVariable (ctx, name);
- }
-
- protected virtual ValueReference OnGetLocalVariable (EvaluationContext ctx, string name)
- {
- ValueReference best = null;
- foreach (ValueReference var in GetLocalVariables (ctx)) {
- if (var.Name == name)
- return var;
- if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
- best = var;
- }
- return best;
- }
-
- public virtual ValueReference GetParameter (EvaluationContext ctx, string name)
- {
- return OnGetParameter (ctx, name);
- }
-
- protected virtual ValueReference OnGetParameter (EvaluationContext ctx, string name)
- {
- ValueReference best = null;
- foreach (ValueReference var in GetParameters (ctx)) {
- if (var.Name == name)
- return var;
- if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
- best = var;
- }
- return best;
- }
-
- public IEnumerable<ValueReference> GetLocalVariables (EvaluationContext ctx)
- {
- return OnGetLocalVariables (ctx);
- }
-
- public ValueReference GetThisReference (EvaluationContext ctx)
- {
- return OnGetThisReference (ctx);
- }
-
- public IEnumerable<ValueReference> GetParameters (EvaluationContext ctx)
- {
- return OnGetParameters (ctx);
- }
-
- protected virtual IEnumerable<ValueReference> OnGetLocalVariables (EvaluationContext ctx)
- {
- yield break;
- }
-
- protected virtual IEnumerable<ValueReference> OnGetParameters (EvaluationContext ctx)
- {
- yield break;
- }
-
- protected virtual ValueReference OnGetThisReference (EvaluationContext ctx)
- {
- return null;
- }
-
- public virtual ValueReference GetCurrentException (EvaluationContext ctx)
- {
- return null;
- }
-
- public virtual object GetEnclosingType (EvaluationContext ctx)
- {
- return null;
- }
-
- public virtual CompletionData GetExpressionCompletionData (EvaluationContext ctx, string exp)
- {
- int i;
- if (exp.Length == 0)
- return null;
-
- if (exp [exp.Length - 1] == '.') {
- exp = exp.Substring (0, exp.Length - 1);
- i = 0;
- while (i < exp.Length) {
- ValueReference vr = null;
- try {
- vr = ctx.Evaluator.Evaluate (ctx, exp.Substring (i), null);
- if (vr != null) {
- CompletionData data = new CompletionData ();
- foreach (ValueReference cv in vr.GetChildReferences (ctx.Options))
- data.Items.Add (new CompletionItem (cv.Name, cv.Flags));
- data.ExpressionLength = 0;
- return data;
- }
- } catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- }
- i++;
- }
- return null;
- }
-
- i = exp.Length - 1;
- bool lastWastLetter = false;
- while (i >= 0) {
- char c = exp [i--];
- if (!char.IsLetterOrDigit (c) && c != '_')
- break;
- lastWastLetter = !char.IsDigit (c);
- }
- if (lastWastLetter) {
- string partialWord = exp.Substring (i+1);
-
- CompletionData data = new CompletionData ();
- data.ExpressionLength = partialWord.Length;
-
- // Local variables
-
- foreach (ValueReference vc in GetLocalVariables (ctx))
- if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
- data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
-
- // Parameters
-
- foreach (ValueReference vc in GetParameters (ctx))
- if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
- data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
-
- // Members
-
- ValueReference thisobj = GetThisReference (ctx);
-
- if (thisobj != null)
- data.Items.Add (new CompletionItem ("this", ObjectValueFlags.Field | ObjectValueFlags.ReadOnly));
-
- object type = GetEnclosingType (ctx);
-
- foreach (ValueReference vc in GetMembers (ctx, null, type, thisobj != null ? thisobj.Value : null))
- if (vc.Name.StartsWith (partialWord, StringComparison.InvariantCulture))
- data.Items.Add (new CompletionItem (vc.Name, vc.Flags));
-
- if (data.Items.Count > 0)
- return data;
- }
- return null;
- }
-
- public IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, IObjectSource objectSource, object t, object co)
- {
- foreach (ValueReference val in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
- val.ParentSource = objectSource;
- yield return val;
- }
- }
-
- public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object co, string name)
- {
- return GetMember (ctx, objectSource, GetValueType (ctx, co), co, name);
- }
-
- public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object t, object co, string name)
- {
- ValueReference m = GetMember (ctx, t, co, name);
- if (m != null)
- m.ParentSource = objectSource;
- return m;
- }
-
- protected virtual ValueReference GetMember (EvaluationContext ctx, object t, object co, string name)
- {
- ValueReference best = null;
- foreach (ValueReference var in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
- if (var.Name == name)
- return var;
- if (!ctx.Evaluator.CaseSensitive && var.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase))
- best = var;
- }
- return best;
- }
-
- internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co)
- {
- return GetMembersSorted (ctx, objectSource, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
- }
-
- internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags)
- {
- List<ValueReference> list = new List<ValueReference> ();
- foreach (ValueReference vr in GetMembers (ctx, t, co, bindingFlags)) {
- vr.ParentSource = objectSource;
- list.Add (vr);
- }
- list.Sort (delegate (ValueReference v1, ValueReference v2) {
- return v1.Name.CompareTo (v2.Name);
- });
- return list;
- }
-
- public bool HasMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags)
- {
- return GetMembers (ctx, t, co, bindingFlags).Any ();
- }
-
- public bool HasMember (EvaluationContext ctx, object type, string memberName)
- {
- return HasMember (ctx, type, memberName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
- }
-
- public abstract bool HasMember (EvaluationContext ctx, object type, string memberName, BindingFlags bindingFlags);
-
- /// <summary>
- /// Returns all members of a type. The following binding flags have to be honored:
- /// BindingFlags.Static, BindingFlags.Instance, BindingFlags.Public, BindingFlags.NonPublic, BindingFlags.DeclareOnly
- /// </summary>
- protected abstract IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, object t, object co, BindingFlags bindingFlags);
-
- public virtual IEnumerable<object> GetNestedTypes (EvaluationContext ctx, object type)
- {
- yield break;
- }
-
- public virtual object GetParentType (EvaluationContext ctx, object type)
- {
- if ((type is Type))
- return ((Type) type).DeclaringType;
-
- var name = GetTypeName (ctx, type);
- int plus = name.LastIndexOf ('+');
-
- return plus != -1 ? GetType (ctx, name.Substring (0, plus)) : null;
- }
-
- public virtual object CreateArray (EvaluationContext ctx, object type, object[] values)
- {
- object arrType = GetType (ctx, "System.Collections.ArrayList");
- object arrayList = CreateValue (ctx, arrType, new object[0]);
- object[] objTypes = new object[] { GetType (ctx, "System.Object") };
- foreach (object value in values)
- RuntimeInvoke (ctx, arrType, arrayList, "Add", objTypes, new object[] { value });
-
- object typof = CreateTypeObject (ctx, type);
- objTypes = new object[] { GetType (ctx, "System.Type") };
- return RuntimeInvoke (ctx, arrType, arrayList, "ToArray", objTypes, new object[] { typof });
- }
-
- public virtual object ToRawValue (EvaluationContext ctx, IObjectSource source, object obj)
- {
- if (IsEnum (ctx, obj)) {
- object longType = GetType (ctx, "System.Int64");
- object c = Cast (ctx, obj, longType);
- return TargetObjectToObject (ctx, c);
- }
-
- if (ctx.Options.ChunkRawStrings && IsString (ctx, obj)) {
- IStringAdaptor adaptor = CreateStringAdaptor (ctx, obj);
- return new RawValueString (new RemoteRawValueString (adaptor, obj));
- }
-
- if (IsPrimitive (ctx, obj))
- return TargetObjectToObject (ctx, obj);
-
- if (IsArray (ctx, obj)) {
- ICollectionAdaptor adaptor = CreateArrayAdaptor (ctx, obj);
- return new RawValueArray (new RemoteRawValueArray (ctx, source, adaptor, obj));
- }
-
- return new RawValue (new RemoteRawValue (ctx, source, obj));
- }
-
- public virtual object FromRawValue (EvaluationContext ctx, object obj)
- {
- if (obj is RawValue) {
- RemoteRawValue val = ((RawValue)obj).Source as RemoteRawValue;
- if (val == null)
- throw new InvalidOperationException ("Unknown RawValue source: " + ((RawValue)obj).Source);
- return val.TargetObject;
- }
- else if (obj is RawValueArray) {
- RemoteRawValueArray val = ((RawValueArray)obj).Source as RemoteRawValueArray;
- if (val == null)
- throw new InvalidOperationException ("Unknown RawValueArray source: " + ((RawValueArray)obj).Source);
- return val.TargetObject;
- }
- else if (obj is RawValueString) {
- RemoteRawValueString val = ((RawValueString)obj).Source as RemoteRawValueString;
- if (val == null)
- throw new InvalidOperationException ("Unknown RawValueString source: " + ((RawValueString)obj).Source);
- return val.TargetObject;
- }
- else {
- if (obj is Array) {
- Array arr = (Array) obj;
- if (obj.GetType ().GetElementType () == typeof(RawValue)) {
- throw new NotSupportedException ();
- } else {
- object elemType = GetType (ctx, obj.GetType ().GetElementType ().FullName);
- if (elemType == null)
- throw new EvaluatorException ("Unknown target type: {0}", obj.GetType ().GetElementType ().FullName);
- object[] values = new object [arr.Length];
- for (int n=0; n<values.Length; n++)
- values [n] = FromRawValue (ctx, arr.GetValue (n));
- return CreateArray (ctx, elemType, values);
- }
- }
- return CreateValue (ctx, obj);
- }
- }
-
- public virtual object TargetObjectToObject (EvaluationContext ctx, object obj)
- {
- if (IsNull (ctx, obj))
- return null;
-
- if (IsArray (ctx, obj)) {
- ICollectionAdaptor adaptor = CreateArrayAdaptor (ctx, obj);
- string ename = GetDisplayTypeName (GetTypeName (ctx, adaptor.ElementType));
- int[] dims = adaptor.GetDimensions ();
- StringBuilder tn = new StringBuilder ("[");
- for (int n=0; n<dims.Length; n++) {
- if (n>0)
- tn.Append (',');
- tn.Append (dims[n]);
- }
- tn.Append ("]");
- int i = ename.LastIndexOf ('>');
- if (i == -1) i = 0;
- i = ename.IndexOf ('[', i);
- if (i != -1)
- return new EvaluationResult ("{" + ename.Substring (0, i) + tn + ename.Substring (i) + "}");
-
- return new EvaluationResult ("{" + ename + tn + "}");
- }
-
- if (IsEnum (ctx, obj)) {
- object type = GetValueType (ctx, obj);
- object longType = GetType (ctx, "System.Int64");
- object c = Cast (ctx, obj, longType);
- long val = (long) TargetObjectToObject (ctx, c);
- long rest = val;
- string typeName = GetTypeName (ctx, type);
- string composed = string.Empty;
- string composedDisplay = string.Empty;
- foreach (EnumMember em in GetEnumMembers (ctx, type)) {
- if (em.Value == val)
- return new EvaluationResult (typeName + "." + em.Name, em.Name);
- else {
- if (em.Value != 0 && (rest & em.Value) == em.Value) {
- rest &= ~em.Value;
- if (composed.Length > 0) {
- composed += "|";
- composedDisplay += "|";
- }
- composed += typeName + "." + em.Name;
- composedDisplay += em.Name;
- }
- }
- }
-
- if (IsFlagsEnumType (ctx, type) && rest == 0 && composed.Length > 0)
- return new EvaluationResult (composed, composedDisplay);
-
- return new EvaluationResult (val.ToString ());
- }
-
- if (GetValueTypeName (ctx, obj) == "System.Decimal") {
- string res = CallToString (ctx, obj);
- // This returns the decimal formatted using the current culture. It has to be converted to invariant culture.
- decimal dec = decimal.Parse (res);
- res = dec.ToString (System.Globalization.CultureInfo.InvariantCulture);
- return new EvaluationResult (res);
- }
-
- if (IsClassInstance (ctx, obj)) {
- TypeDisplayData tdata = GetTypeDisplayData (ctx, GetValueType (ctx, obj));
- if (!string.IsNullOrEmpty (tdata.ValueDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
- return new EvaluationResult (EvaluateDisplayString (ctx, obj, tdata.ValueDisplayString));
-
- // Return the type name
- if (ctx.Options.AllowToStringCalls) {
- try {
- return new EvaluationResult ("{" + CallToString (ctx, obj) + "}");
- } catch (TimeOutException) {
- // ToString() timed out, fall back to default behavior.
- }
- }
-
- if (!string.IsNullOrEmpty (tdata.TypeDisplayString) && ctx.Options.AllowDisplayStringEvaluation)
- return new EvaluationResult ("{" + EvaluateDisplayString (ctx, obj, tdata.TypeDisplayString) + "}");
-
- return new EvaluationResult ("{" + GetDisplayTypeName (GetValueTypeName (ctx, obj)) + "}");
- }
-
- return new EvaluationResult ("{" + CallToString (ctx, obj) + "}");
- }
-
- public object Convert (EvaluationContext ctx, object obj, object targetType)
- {
- if (obj == null)
- return null;
-
- object res = TryConvert (ctx, obj, targetType);
- if (res != null)
- return res;
-
- throw new EvaluatorException ("Can't convert an object of type '{0}' to type '{1}'", GetValueTypeName (ctx, obj), GetTypeName (ctx, targetType));
- }
-
- public virtual object TryConvert (EvaluationContext ctx, object obj, object targetType)
- {
- return TryCast (ctx, obj, targetType);
- }
-
- public virtual object Cast (EvaluationContext ctx, object obj, object targetType)
- {
- if (obj == null)
- return null;
-
- object res = TryCast (ctx, obj, targetType);
- if (res != null)
- return res;
-
- throw new EvaluatorException ("Can't cast an object of type '{0}' to type '{1}'", GetValueTypeName (ctx, obj), GetTypeName (ctx, targetType));
- }
-
- public virtual string CallToString (EvaluationContext ctx, object obj)
- {
- return GetValueTypeName (ctx, obj);
- }
-
- public object GetProxyObject (EvaluationContext ctx, object obj)
- {
- TypeDisplayData data = GetTypeDisplayData (ctx, GetValueType (ctx, obj));
- if (string.IsNullOrEmpty (data.ProxyType) || !ctx.Options.AllowDebuggerProxy)
- return obj;
-
- object[] typeArgs = null;
-
- int i = data.ProxyType.IndexOf ('`');
- if (i != -1) {
- // The proxy type is an uninstantiated generic type.
- // The number of type args of the proxy must match the args of the target object
- int j = i + 1;
- for (; j < data.ProxyType.Length && char.IsDigit (data.ProxyType[j]); j++);
- int np = int.Parse (data.ProxyType.Substring (i + 1, j - i - 1));
- typeArgs = GetTypeArgs (ctx, GetValueType (ctx, obj));
- if (typeArgs.Length != np)
- return obj;
- }
-
- object ttype = GetType (ctx, data.ProxyType, typeArgs);
- if (ttype == null) {
- i = data.ProxyType.IndexOf (',');
- if (i != -1)
- ttype = GetType (ctx, data.ProxyType.Substring (0, i).Trim (), typeArgs);
- }
- if (ttype == null)
- throw new EvaluatorException ("Unknown type '{0}'", data.ProxyType);
-
- try {
- object val = CreateValue (ctx, ttype, obj);
- return val ?? obj;
- } catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- return obj;
- }
- }
-
- public TypeDisplayData GetTypeDisplayData (EvaluationContext ctx, object type)
- {
- if (!IsClass (type))
- return TypeDisplayData.Default;
-
- TypeDisplayData td;
- string tname = GetTypeName (ctx, type);
- if (typeDisplayData.TryGetValue (tname, out td))
- return td;
-
- try {
- td = OnGetTypeDisplayData (ctx, type);
- }
- catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- }
- if (td == null)
- typeDisplayData[tname] = td = TypeDisplayData.Default;
- else
- typeDisplayData[tname] = td;
- return td;
- }
-
- protected virtual TypeDisplayData OnGetTypeDisplayData (EvaluationContext ctx, object type)
- {
- return null;
- }
-
- public string EvaluateDisplayString (EvaluationContext ctx, object obj, string exp)
- {
- StringBuilder sb = new StringBuilder ();
- int i = exp.IndexOf ("{");
- int last = 0;
-
- while (i != -1 && i < exp.Length) {
- sb.Append (exp.Substring (last, i - last));
- i++;
-
- int j = exp.IndexOf ("}", i);
- if (j == -1)
- return exp;
-
- string mem = exp.Substring (i, j - i).Trim ();
- if (mem.Length == 0)
- return exp;
-
- string[] props = mem.Split (new char[] { '.' });
- ValueReference member = null;
- object val = obj;
-
- for (int k = 0; k < props.Length; k++) {
- member = GetMember (ctx, null, GetValueType (ctx, val), val, props[k]);
- if (member == null)
- break;
-
- val = member.Value;
- }
-
- if (member != null) {
- var str = ctx.Evaluator.TargetObjectToString (ctx, val);
- if (str == null)
- sb.Append ("null");
- else
- sb.Append (str);
- } else {
- sb.Append ("{Unknown member '" + mem + "'}");
- }
-
- last = j + 1;
- i = exp.IndexOf ("{", last);
- }
-
- sb.Append (exp.Substring (last));
-
- return sb.ToString ();
- }
-
- public void AsyncExecute (AsyncOperation operation, int timeout)
- {
- asyncOperationManager.Invoke (operation, timeout);
- }
-
- public ObjectValue CreateObjectValueAsync (string name, ObjectValueFlags flags, ObjectEvaluatorDelegate evaluator)
- {
- return asyncEvaluationTracker.Run (name, flags, evaluator);
- }
-
- public bool IsEvaluating {
- get { return asyncEvaluationTracker.IsEvaluating; }
- }
-
- public void CancelAsyncOperations ( )
- {
- asyncEvaluationTracker.Stop ();
- asyncOperationManager.AbortAll ();
- asyncEvaluationTracker.WaitForStopped ();
- }
-
- public ObjectValue GetExpressionValue (EvaluationContext ctx, string exp)
- {
- try {
- ValueReference var = ctx.Evaluator.Evaluate (ctx, exp);
- if (var != null) {
- return var.CreateObjectValue (ctx.Options);
- }
- else
- return ObjectValue.CreateUnknown (exp);
- }
- catch (ImplicitEvaluationDisabledException) {
- return ObjectValue.CreateImplicitNotSupported (ctx.ExpressionValueSource, new ObjectPath (exp), "", ObjectValueFlags.None);
- }
- catch (NotSupportedExpressionException ex) {
- return ObjectValue.CreateNotSupported (ctx.ExpressionValueSource, new ObjectPath (exp), ex.Message, "", ObjectValueFlags.None);
- }
- catch (EvaluatorException ex) {
- return ObjectValue.CreateError (ctx.ExpressionValueSource, new ObjectPath (exp), "", ex.Message, ObjectValueFlags.None);
- }
- catch (Exception ex) {
- ctx.WriteDebuggerError (ex);
- return ObjectValue.CreateUnknown (exp);
- }
- }
-
- public bool HasMethod (EvaluationContext ctx, object targetType, string methodName)
- {
- BindingFlags flags = BindingFlags.Instance | BindingFlags.Static;
- if (!ctx.Evaluator.CaseSensitive)
- flags |= BindingFlags.IgnoreCase;
- return HasMethod (ctx, targetType, methodName, null, flags);
- }
-
- public bool HasMethod (EvaluationContext ctx, object targetType, string methodName, BindingFlags flags)
- {
- return HasMethod (ctx, targetType, methodName, null, flags);
- }
-
- // argTypes can be null, meaning that it has to return true if there is any method with that name
- // flags will only contain Static or Instance flags
- public virtual bool HasMethod (EvaluationContext ctx, object targetType, string methodName, object[] argTypes, BindingFlags flags)
- {
- return false;
- }
-
- public virtual object RuntimeInvoke (EvaluationContext ctx, object targetType, object target, string methodName, object[] argTypes, object[] argValues)
- {
- return null;
- }
-
- public virtual ValidationResult ValidateExpression (EvaluationContext ctx, string expression)
- {
- return ctx.Evaluator.ValidateExpression (ctx, expression);
- }
- }
-
- public class TypeDisplayData
- {
- public string ProxyType { get; internal set; }
- public string ValueDisplayString { get; internal set; }
- public string TypeDisplayString { get; internal set; }
- public string NameDisplayString { get; internal set; }
- public bool IsCompilerGenerated { get; internal set; }
-
- public bool IsProxyType {
- get { return ProxyType != null; }
- }
-
- public static readonly TypeDisplayData Default = new TypeDisplayData (null, null, null, null, false, null);
-
- public Dictionary<string, DebuggerBrowsableState> MemberData { get; internal set; }
-
- public TypeDisplayData (string proxyType, string valueDisplayString, string typeDisplayString,
- string nameDisplayString, bool isCompilerGenerated, Dictionary<string, DebuggerBrowsableState> memberData)
- {
- ProxyType = proxyType;
- ValueDisplayString = valueDisplayString;
- TypeDisplayString = typeDisplayString;
- NameDisplayString = nameDisplayString;
- IsCompilerGenerated = isCompilerGenerated;
- MemberData = memberData;
- }
-
- public DebuggerBrowsableState GetMemberBrowsableState (string name)
- {
- if (MemberData == null)
- return DebuggerBrowsableState.Collapsed;
-
- DebuggerBrowsableState state;
- if (MemberData.TryGetValue (name, out state))
- return state;
- else
- return DebuggerBrowsableState.Collapsed;
- }
- }
-
- class ObjectValueNameTracker
- {
- Dictionary<string,KeyValuePair<ObjectValue, ValueReference>> names = new Dictionary<string,KeyValuePair<ObjectValue, ValueReference>> ();
- EvaluationContext ctx;
-
- public ObjectValueNameTracker (EvaluationContext ctx)
- {
- this.ctx = ctx;
- }
-
- /// <summary>
- /// Disambiguate the ObjectValue's name (in the case where the property name also exists in a base class).
- /// </summary>
- /// <param name='val'>
- /// The ValueReference.
- /// </param>
- /// <param name='oval'>
- /// The ObjectValue.
- /// </param>
- public void Disambiguate (ValueReference val, ObjectValue oval)
- {
- KeyValuePair<ObjectValue, ValueReference> other;
- if (names.TryGetValue (oval.Name, out other)) {
- object tn = val.DeclaringType;
-
- if (tn != null)
- oval.Name += " (" + ctx.Adapter.GetDisplayTypeName (ctx, tn) + ")";
- if (!other.Key.Name.EndsWith (")", StringComparison.Ordinal)) {
- tn = other.Value.DeclaringType;
- if (tn != null)
- other.Key.Name += " (" + ctx.Adapter.GetDisplayTypeName (ctx, tn) + ")";
- }
- }
-
- names [oval.Name] = new KeyValuePair<ObjectValue, ValueReference> (oval, val);
- }
- }
-
- public struct EnumMember
- {
- public string Name { get; set; }
- public long Value { get; set; }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs
deleted file mode 100644
index 836cf37..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/RawViewSource.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-// RawViewSource.cs
-//
-// Authors: Lluis Sanchez Gual <lluis at novell.com>
-// Jeffrey Stedfast <jeff at xamarin.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
-//
-// 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 Mono.Debugging.Backend;
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Evaluation
-{
- public class RawViewSource: RemoteFrameObject, IObjectValueSource
- {
- object obj;
- EvaluationContext ctx;
- IObjectSource objectSource;
-
- public RawViewSource (EvaluationContext ctx, IObjectSource objectSource, object obj)
- {
- this.ctx = ctx;
- this.obj = obj;
- this.objectSource = objectSource;
- }
-
- public static ObjectValue CreateRawView (EvaluationContext ctx, IObjectSource objectSource, object obj)
- {
- RawViewSource src = new RawViewSource (ctx, objectSource, obj);
- src.Connect ();
- ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
- val.ChildSelector = "";
- return val;
- }
-
- public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
- {
- EvaluationContext cctx = ctx.WithOptions (options);
- return cctx.Adapter.GetObjectValueChildren (cctx, objectSource, cctx.Adapter.GetValueType (cctx, obj), obj, index, count, false);
- }
-
- public ObjectValue GetValue (ObjectPath path, EvaluationOptions options)
- {
- throw new NotSupportedException ();
- }
-
- public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options)
- {
- throw new NotSupportedException ();
- }
-
- public void SetRawValue (ObjectPath path, object value, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
-
- public object GetRawValue (ObjectPath path, EvaluationOptions options)
- {
- throw new System.NotImplementedException ();
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs b/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs
deleted file mode 100644
index a673f38..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.Evaluation/TypeValueReference.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-// TypeValueReference.cs
-//
-// Author:
-// Lluis Sanchez Gual <lluis at novell.com>
-//
-// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
-// 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.Linq;
-using System.Diagnostics;
-using System.Collections.Generic;
-using System.Reflection;
-
-using Mono.Debugging.Client;
-
-namespace Mono.Debugging.Evaluation
-{
- public class TypeValueReference: ValueReference
- {
- object type;
- string name;
- string fullName;
-
- public TypeValueReference (EvaluationContext ctx, object type)
- : base (ctx)
- {
- this.type = type;
- fullName = ctx.Adapter.GetDisplayTypeName (ctx, type);
- name = GetTypeName (fullName);
- }
-
- internal static string GetTypeName (string tname)
- {
- tname = tname.Replace ('+','.');
- int sep1 = tname.IndexOf ('<');
- int sep2 = tname.IndexOf ('[');
- if (sep2 != -1 && (sep2 < sep1 || sep1 == -1))
- sep1 = sep2;
- if (sep1 == -1)
- sep1 = tname.Length - 1;
- int i = tname.LastIndexOf ('.', sep1);
- if (i != -1)
- return tname.Substring (i + 1);
- else
- return tname;
- }
-
- public override object Value {
- get {
- throw new NotSupportedException ();
- }
- set {
- throw new NotSupportedException();
- }
- }
-
-
- public override object Type {
- get {
- return type;
- }
- }
-
- public override object ObjectValue {
- get {
- throw new NotSupportedException ();
- }
- }
-
-
- public override string Name {
- get {
- return name;
- }
- }
-
- public override ObjectValueFlags Flags {
- get {
- return ObjectValueFlags.Type;
- }
- }
-
- protected override ObjectValue OnCreateObjectValue (EvaluationOptions options)
- {
- return Mono.Debugging.Client.ObjectValue.CreateObject (this, new ObjectPath (Name), "<type>", fullName, Flags, null);
- }
-
- public override ValueReference GetChild (string name, EvaluationOptions options)
- {
- EvaluationContext ctx = GetContext (options);
- foreach (ValueReference val in ctx.Adapter.GetMembers (ctx, this, type, null)) {
- if (val.Name == name)
- return val;
- }
- foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type)) {
- string tn = ctx.Adapter.GetTypeName (ctx, t);
- if (GetTypeName (tn) == name)
- return new TypeValueReference (ctx, t);
- }
- return null;
- }
-
- public override ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options)
- {
- EvaluationContext ctx = GetContext (options);
- try {
- List<ObjectValue> list = new List<ObjectValue> ();
- BindingFlags flattenFlag = options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly;
- BindingFlags flags = BindingFlags.Static | BindingFlags.Public | flattenFlag;
- bool groupPrivateMembers = options.GroupPrivateMembers && (options.GroupUserPrivateMembers || ctx.Adapter.IsExternalType (ctx, type));
- if (!groupPrivateMembers)
- flags |= BindingFlags.NonPublic;
-
- TypeDisplayData tdata = ctx.Adapter.GetTypeDisplayData (ctx, type);
- object tdataType = type;
-
- foreach (ValueReference val in ctx.Adapter.GetMembersSorted (ctx, this, type, null, flags)) {
- object decType = val.DeclaringType;
- if (decType != null && decType != tdataType) {
- tdataType = decType;
- tdata = ctx.Adapter.GetTypeDisplayData (ctx, decType);
- }
- DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
- if (state == DebuggerBrowsableState.Never)
- continue;
-
- ObjectValue oval = val.CreateObjectValue (options);
- list.Add (oval);
- }
-
- List<ObjectValue> nestedTypes = new List<ObjectValue> ();
- foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type))
- nestedTypes.Add (new TypeValueReference (ctx, t).CreateObjectValue (options));
-
- nestedTypes.Sort (delegate (ObjectValue v1, ObjectValue v2) {
- return v1.Name.CompareTo (v2.Name);
- });
-
- list.AddRange (nestedTypes);
-
- if (groupPrivateMembers)
- list.Add (FilteredMembersSource.CreateNonPublicsNode (ctx, this, type, null, BindingFlags.NonPublic | BindingFlags.Static | flattenFlag));
-
- if (!options.FlattenHierarchy) {
- object baseType = ctx.Adapter.GetBaseType (ctx, type, false);
- if (baseType != null) {
- TypeValueReference baseRef = new TypeValueReference (ctx, baseType);
- ObjectValue baseVal = baseRef.CreateObjectValue (false);
- baseVal.Name = "base";
- list.Insert (0, baseVal);
- }
- }
-
- return list.ToArray ();
- } catch (Exception ex) {
- Console.WriteLine (ex);
- ctx.WriteDebuggerOutput (ex.Message);
- return new ObjectValue [0];
- }
- }
-
- public override IEnumerable<ValueReference> GetChildReferences (EvaluationOptions options)
- {
- EvaluationContext ctx = GetContext (options);
- try {
- List<ValueReference> list = new List<ValueReference> ();
- list.AddRange (ctx.Adapter.GetMembersSorted (ctx, this, type, null, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static));
-
- List<ValueReference> nestedTypes = new List<ValueReference> ();
- foreach (object t in ctx.Adapter.GetNestedTypes (ctx, type))
- nestedTypes.Add (new TypeValueReference (ctx, t));
-
- nestedTypes.Sort (delegate (ValueReference v1, ValueReference v2) {
- return v1.Name.CompareTo (v2.Name);
- });
- list.AddRange (nestedTypes);
- return list;
- } catch (Exception ex) {
- Console.WriteLine (ex);
- ctx.WriteDebuggerOutput (ex.Message);
- return new ValueReference[0];
- }
- }
- }
-}
diff --git a/src/core/Mono.Debugging/Mono.Debugging.csproj b/src/core/Mono.Debugging/Mono.Debugging.csproj
deleted file mode 100644
index de0bbdf..0000000
--- a/src/core/Mono.Debugging/Mono.Debugging.csproj
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.Debugging</RootNamespace>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>mono.debugging.snk</AssemblyOriginatorKeyFile>
- <AssemblyName>Mono.Debugging</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>True</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\..\build\bin</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>..\..\..\build\bin</OutputPath>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>False</ConsolePause>
- <Execution>
- <Execution clr-version="Net_2_0" />
- </Execution>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Mono.Debugging.Client\IExpressionEvaluator.cs" />
- <Compile Include="Mono.Debugging.Client\Breakpoint.cs" />
- <Compile Include="Mono.Debugging.Client\DebuggerSession.cs" />
- <Compile Include="Mono.Debugging.Client\Backtrace.cs" />
- <Compile Include="Mono.Debugging.Client\DebuggerStartInfo.cs" />
- <Compile Include="Mono.Debugging.Client\ProcessEventArgs.cs" />
- <Compile Include="Mono.Debugging.Client\SourceLocation.cs" />
- <Compile Include="Mono.Debugging.Client\StackFrame.cs" />
- <Compile Include="Mono.Debugging.Client\TargetEventArgs.cs" />
- <Compile Include="Mono.Debugging.Client\TargetEventType.cs" />
- <Compile Include="Mono.Debugging.Client\ThreadEventArgs.cs" />
- <Compile Include="Mono.Debugging.Backend\IBacktrace.cs" />
- <Compile Include="Mono.Debugging.Backend\IDebuggerSessionFrontend.cs" />
- <Compile Include="Mono.Debugging.Client\BreakpointStore.cs" />
- <Compile Include="Mono.Debugging.Client\BreakpointEventArgs.cs" />
- <Compile Include="Mono.Debugging.Client\ObjectValue.cs" />
- <Compile Include="Mono.Debugging.Backend\IObjectValueSource.cs" />
- <Compile Include="Mono.Debugging.Client\ObjectValueFlags.cs" />
- <Compile Include="Mono.Debugging.Client\ObjectPath.cs" />
- <Compile Include="Mono.Debugging.Client\ThreadInfo.cs" />
- <Compile Include="Mono.Debugging.Client\ProcessInfo.cs" />
- <Compile Include="Mono.Debugging.Client\AssemblyLine.cs" />
- <Compile Include="Mono.Debugging.Backend\DissassemblyBuffer.cs" />
- <Compile Include="Mono.Debugging.Client\CompletionData.cs" />
- <Compile Include="Mono.Debugging.Client\Catchpoint.cs" />
- <Compile Include="Mono.Debugging.Client\BreakEvent.cs" />
- <Compile Include="Mono.Debugging.Client\CatchpointEventArgs.cs" />
- <Compile Include="Mono.Debugging.Client\BreakEventArgs.cs" />
- <Compile Include="Mono.Debugging.Client\DebuggerFeatures.cs" />
- <Compile Include="Mono.Debugging.Backend\IObjectValueUpdater.cs" />
- <Compile Include="Mono.Debugging.Backend\IObjectValueUpdateCallback.cs" />
- <Compile Include="Mono.Debugging.Backend\UpdateCallback.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ArrayElementGroup.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ArrayValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\AsyncEvaluationTracker.cs" />
- <Compile Include="Mono.Debugging.Evaluation\AsyncOperationManager.cs" />
- <Compile Include="Mono.Debugging.Evaluation\EvaluationContext.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ExpressionEvaluator.cs" />
- <Compile Include="Mono.Debugging.Evaluation\FilteredMembersSource.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ICollectionAdaptor.cs" />
- <Compile Include="Mono.Debugging.Evaluation\LiteralValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NamespaceValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NullValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ObjectValueAdaptor.cs" />
- <Compile Include="Mono.Debugging.Evaluation\RawViewSource.cs" />
- <Compile Include="Mono.Debugging.Evaluation\RemoteFrameObject.cs" />
- <Compile Include="Mono.Debugging.Evaluation\TimedEvaluator.cs" />
- <Compile Include="Mono.Debugging.Evaluation\TimeOutException.cs" />
- <Compile Include="Mono.Debugging.Evaluation\TypeValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ValueReference.cs" />
- <Compile Include="Mono.Debugging.Evaluation\UserVariableReference.cs" />
- <Compile Include="Mono.Debugging.Client\DebuggerException.cs" />
- <Compile Include="Mono.Debugging.Client\DebuggerSessionOptions.cs" />
- <Compile Include="Mono.Debugging.Client\EvaluationOptions.cs" />
- <Compile Include="Mono.Debugging.Evaluation\BaseBacktrace.cs" />
- <Compile Include="Mono.Debugging.Evaluation\BaseTypeViewSource.cs" />
- <Compile Include="Mono.Debugging.Evaluation\IObjectSource.cs" />
- <Compile Include="Mono.Debugging.Client\RawValue.cs" />
- <Compile Include="Mono.Debugging.Evaluation\RemoteRawValue.cs" />
- <Compile Include="Mono.Debugging.Client\ExceptionInfo.cs" />
- <Compile Include="Mono.Debugging.Evaluation\ExceptionInfoSource.cs" />
- <Compile Include="Mono.Debugging.Client\BreakEventStatus.cs" />
- <Compile Include="Mono.Debugging.Client\BreakEventInfo.cs" />
- <Compile Include="Mono.Debugging.Client\FunctionBreakpoint.cs" />
- <Compile Include="Mono.Debugging.Evaluation\IStringAdaptor.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionEvaluator.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionEvaluatorVisitor.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NRefactoryExpressionResolverVisitor.cs" />
- <Compile Include="Mono.Debugging.Evaluation\NRefactoryExtensions.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Folder Include="Mono.Debugging.Evaluation\" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
- <Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
- <Name>ICSharpCode.NRefactory</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
- <Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
- <Name>ICSharpCode.NRefactory.CSharp</Name>
- </ProjectReference>
- </ItemGroup>
-</Project>
diff --git a/src/core/Mono.Texteditor/Makefile.in b/src/core/Mono.Texteditor/Makefile.in
index 0017cad..c5159c0 100644
--- a/src/core/Mono.Texteditor/Makefile.in
+++ b/src/core/Mono.Texteditor/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -253,6 +252,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
index 5d64fb6..e267acb 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
@@ -45,7 +45,11 @@ namespace Mono.TextEditor
CloneableStack<Span> spanStack;
static CloneableStack<Span> emptySpan = new CloneableStack<Span> ();
public CloneableStack<Span> SpanStack {
- get { return spanStack ?? emptySpan; }
+ get {
+ if (spanStack == null)
+ spanStack = emptySpan.Clone ();
+ return spanStack;
+ }
set { spanStack = value; }
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
index 5540c90..0b375ae 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
@@ -110,6 +110,9 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Usages(Rectangle)", VSSetting="color=MarkerFormatDefinition/HighlightedReference/Background,secondcolor=MarkerFormatDefinition/HighlightedReference/Background")]
public AmbientColor UsagesRectangle { get; private set; }
+ [ColorDescription("Changing usages(Rectangle)", VSSetting="color=MarkerFormatDefinition/HighlightedReference/Background,secondcolor=MarkerFormatDefinition/HighlightedReference/Background")]
+ public AmbientColor ChangingUsagesRectangle { get; private set; }
+
[ColorDescription("Breakpoint Marker")]
public AmbientColor BreakpointMarker { get; private set; }
@@ -155,11 +158,35 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Completion Border(Inactive)")]
public AmbientColor CompletionInactiveBorder { get; private set; }
- [ColorDescription("Message Bubble Error")]
- public AmbientColor MessageBubbleError { get; private set; }
-
- [ColorDescription("Message Bubble Warning")]
- public AmbientColor MessageBubbleWarning { get; private set; }
+ [ColorDescription("Message Bubble Error Marker")]
+ public AmbientColor MessageBubbleErrorMarker { get; private set; }
+
+ [ColorDescription("Message Bubble Error Tag")]
+ public AmbientColor MessageBubbleErrorTag { get; private set; }
+
+ [ColorDescription("Message Bubble Error Line")]
+ public AmbientColor MessageBubbleErrorLine { get; private set; }
+
+ [ColorDescription("Message Bubble Error Counter")]
+ public AmbientColor MessageBubbleErrorCounter { get; private set; }
+
+ [ColorDescription("Message Bubble Error IconMargin")]
+ public AmbientColor MessageBubbleErrorIconMargin { get; private set; }
+
+ [ColorDescription("Message Bubble Warning Marker")]
+ public AmbientColor MessageBubbleWarningMarker { get; private set; }
+
+ [ColorDescription("Message Bubble Warning Tag")]
+ public AmbientColor MessageBubbleWarningTag { get; private set; }
+
+ [ColorDescription("Message Bubble Warning Line")]
+ public AmbientColor MessageBubbleWarningLine { get; private set; }
+
+ [ColorDescription("Message Bubble Warning Counter")]
+ public AmbientColor MessageBubbleWarningCounter { get; private set; }
+
+ [ColorDescription("Message Bubble Warning IconMargin")]
+ public AmbientColor MessageBubbleWarningIconMargin { get; private set; }
#endregion
#region Text Colors
@@ -362,6 +389,9 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Syntax Error", VSSetting = "Syntax Error")]
public ChunkStyle SyntaxError { get; private set; }
+ [ColorDescription("String Format Items", VSSetting = "String")]
+ public ChunkStyle StringFormatItems { get; private set; }
+
[ColorDescription("Breakpoint Text", VSSetting = "Breakpoint (Enabled)")]
public ChunkStyle BreakpointText { get; private set; }
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs
index a1d9643..28e543c 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Match.cs
@@ -65,8 +65,7 @@ namespace Mono.TextEditor.Highlighting
protected readonly static int[] emptyMatch = new int[0];
public virtual int[] TryMatch (string text, int matchOffset)
{
- string matchStr = text.Substring (matchOffset);
- var match = regex.Match (matchStr);
+ var match = regex.Match (text, matchOffset);
if (match.Success) {
var result = new int[match.Groups.Count];
for (int i = 0; i < result.Length; i++) {
@@ -100,7 +99,7 @@ namespace Mono.TextEditor.Highlighting
if (!string.IsNullOrEmpty (expression)) {
var result = new Match ();
- result.Pattern = "^" + expression;
+ result.Pattern = "\\G" + expression;
result.regex = new System.Text.RegularExpressions.Regex (result.Pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
XmlReadHelper.ReadList (reader, Node, delegate () {
@@ -119,7 +118,7 @@ namespace Mono.TextEditor.Highlighting
string pattern = reader.ReadElementString ();
Match result2 = pattern == "CSharpNumber" ? new CSharpNumberMatch () : new Match ();
result2.Color = color;
- result2.Pattern = "^" + pattern;
+ result2.Pattern = "\\G" + pattern;
result2.regex = new System.Text.RegularExpressions.Regex (result2.Pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
return result2;
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
index ae8b027..2754e7e 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
@@ -126,11 +126,24 @@ namespace Mono.TextEditor.Highlighting
string delimiter;
bool delimiterSet;
- public string Delimiter {
- get {
- return !delimiterSet ? mode.Delimiter : delimiter;
+
+ public string GetDelimiter (SyntaxMode mode)
+ {
+ if (mode == null)
+ return delimiter;
+ return !delimiterSet ? mode.GetDelimiter (null) : delimiter;
+ }
+
+ public void SetDelimiter (string value)
+ {
+ delimiter = value;
+ delimiterSet = true;
+ }
+
+ public bool HasDelimiter {
+ get {
+ return delimiterSet;
}
- set { delimiter = value; delimiterSet = true; }
}
public Marker[] PrevMarker {
@@ -139,16 +152,18 @@ namespace Mono.TextEditor.Highlighting
}
}
- SyntaxMode mode;
-
- public Rule (SyntaxMode mode)
+ public Rule ()
+ {
+ }
+
+ [Obsolete("This constructor is obsolete use parameterless constructor instead.")]
+ public Rule (SyntaxMode obsolteMode)
{
- this.mode = mode;
}
public virtual Rule GetRule (TextDocument doc, string name)
{
- return mode.GetRule (doc, name);
+ return (doc.SyntaxMode as SyntaxMode).GetRule (doc, name);
}
public override string ToString ()
@@ -244,7 +259,7 @@ namespace Mono.TextEditor.Highlighting
{
switch (reader.LocalName) {
case "Delimiters":
- this.Delimiter = reader.ReadElementString ();
+ this.SetDelimiter (reader.ReadElementString ());
return true;
case "Property":
string name = reader.GetAttribute ("name");
@@ -335,7 +350,7 @@ namespace Mono.TextEditor.Highlighting
public const string Node = "Rule";
public static Rule Read (SyntaxMode mode, XmlReader reader, bool ignoreCaseDefault)
{
- Rule result = new Rule (mode);
+ Rule result = new Rule ();
result.Name = reader.GetAttribute ("name");
result.DefaultColor = reader.GetAttribute ("color");
result.IgnoreCase = ignoreCaseDefault;
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs
index e841e92..12f48a5 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Span.cs
@@ -37,7 +37,8 @@ namespace Mono.TextEditor.Highlighting
{
None = 0,
StartsLine = 1,
- FirstNonWs = 2
+ FirstNonWs = 2,
+ NewWord = 4
}
[Flags]
@@ -94,7 +95,27 @@ namespace Mono.TextEditor.Highlighting
set;
}
- public string Escape {
+ string endTagColor;
+ public string EndTagColor {
+ get {
+ return endTagColor ?? TagColor;
+ }
+ set {
+ endTagColor = value;
+ }
+ }
+
+ string beginTagColor;
+ public string BeginTagColor {
+ get {
+ return beginTagColor ?? TagColor;
+ }
+ set {
+ beginTagColor = value;
+ }
+ }
+
+ public Regex Escape {
get;
set;
}
@@ -136,7 +157,7 @@ namespace Mono.TextEditor.Highlighting
public override string ToString ()
{
- return String.Format ("[Span: Color={0}, Rule={1}, Begin={2}, End={3}, Escape={4}, stopAtEol={5}]", Color, Rule, Begin, End, String.IsNullOrEmpty (Escape) ? "not set" : "'" + Escape +"'", StopAtEol);
+ return String.Format ("[Span: Color={0}, Rule={1}, Begin={2}, End={3}, Escape={4}, stopAtEol={5}]", Color, Rule, Begin, End, Escape == null ? "not set" : "'" + Escape +"'", StopAtEol);
}
public Span Clone ()
@@ -158,6 +179,8 @@ namespace Mono.TextEditor.Highlighting
newSpan.Rule = Rule;
newSpan.StopAtEol = StopAtEol;
newSpan.TagColor = TagColor;
+ newSpan.BeginTagColor = beginTagColor;
+ newSpan.EndTagColor = endTagColor;
return newSpan;
}
@@ -177,9 +200,10 @@ namespace Mono.TextEditor.Highlighting
result.Rule = reader.GetAttribute ("rule");
result.Color = reader.GetAttribute ("color");
result.TagColor = reader.GetAttribute ("tagColor");
- result.NextColor = reader.GetAttribute ("nextColor");
-
- result.Escape = reader.GetAttribute ("escape");
+ result.NextColor = reader.GetAttribute ("nextColor");
+
+ string escape = reader.GetAttribute("escape");
+ result.Escape = string.IsNullOrEmpty(escape) ? null : new Regex(escape);
string stopateol = reader.GetAttribute ("stopateol");
if (!String.IsNullOrEmpty (stopateol)) {
@@ -200,12 +224,14 @@ namespace Mono.TextEditor.Highlighting
string beginFlags = reader.GetAttribute ("flags");
if (!string.IsNullOrEmpty (beginFlags))
result.BeginFlags = (SpanBeginFlags)Enum.Parse (typeof(SpanBeginFlags), beginFlags);
+ result.BeginTagColor = reader.GetAttribute ("color");
result.Begin = new Regex (reader.ReadElementString ());
return true;
case "End":
string endFlags = reader.GetAttribute ("flags");
if (!string.IsNullOrEmpty (endFlags))
result.EndFlags = (SpanEndFlags)Enum.Parse (typeof(SpanEndFlags), endFlags);
+ result.EndTagColor = reader.GetAttribute ("color");
result.End = new Regex (reader.ReadElementString ());
return true;
case "Exit":
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
index 1931113..1dbee1f 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
@@ -95,11 +95,11 @@ namespace Mono.TextEditor.Highlighting
}
}
- protected SyntaxMode () : base (null)
+ protected SyntaxMode ()
{
DefaultColor = "Plain Text";
Name = "<root>";
- this.Delimiter = "&()<>{}[]~!%^*-+=|\\#/:;\"' ,\t.?";
+ SetDelimiter ("&()<>{}[]~!%^*-+=|\\#/:;\"' ,\t.?");
}
public SyntaxMode (TextDocument doc) : this ()
@@ -199,6 +199,8 @@ namespace Mono.TextEditor.Highlighting
protected CloneableStack<Span> spanStack;
protected Stack<Rule> ruleStack;
protected TextDocument doc;
+
+ internal Func<bool> IsAtWordStart = () => true;
int maxEnd;
public Rule CurRule {
@@ -296,7 +298,7 @@ namespace Mono.TextEditor.Highlighting
public Rule GetRule (Span span)
{
if (string.IsNullOrEmpty (span.Rule))
- return new Rule (mode);
+ return new Rule ();
return CurRule.GetRule (doc, span.Rule);
}
@@ -358,6 +360,8 @@ namespace Mono.TextEditor.Highlighting
bool mismatch = false;
if ((span.BeginFlags & SpanBeginFlags.FirstNonWs) == SpanBeginFlags.FirstNonWs)
mismatch = CurText.Take (i).Any (ch => !char.IsWhiteSpace (ch));
+ if ((span.BeginFlags & SpanBeginFlags.NewWord) == SpanBeginFlags.NewWord)
+ mismatch = !IsAtWordStart ();
if (mismatch)
continue;
FoundSpanBegin (span, i, match.Length);
@@ -412,15 +416,9 @@ namespace Mono.TextEditor.Highlighting
Span cur = CurSpan;
if (cur != null) {
if (cur.Escape != null) {
- bool mismatch = false;
- for (int j = 0; j < cur.Escape.Length; j++) {
- if (textIndex + j >= CurText.Length || CurText [textIndex + j] != cur.Escape [j]) {
- mismatch = true;
- break;
- }
- }
- if (!mismatch) {
- int j = i + cur.Escape.Length - 1;
+ RegexMatch match = cur.Escape.TryMatch(CurText, textIndex);
+ if (match.Success) {
+ int j = i + match.Length - 1;
ParseChar (ref i, CurText [textIndex]);
i = j;
continue;
@@ -458,6 +456,7 @@ namespace Mono.TextEditor.Highlighting
spanParser.FoundSpanEnd = FoundSpanEnd;
spanParser.FoundSpanExit = FoundSpanExit;
spanParser.ParseChar += ParseChar;
+ spanParser.IsAtWordStart = () => wordbuilder.Length == 0;
if (line == null)
throw new ArgumentNullException ("line");
}
@@ -556,7 +555,7 @@ namespace Mono.TextEditor.Highlighting
curChunk.Offset = offset;
curChunk.Length = length;
- curChunk.Style = span.TagColor ?? GetChunkStyle (span);
+ curChunk.Style = span.BeginTagColor ?? GetChunkStyle (span);
curChunk.SpanStack.Push (span);
AddChunk (ref curChunk, 0, curChunk.Style);
foreach (SemanticRule semanticRule in spanRule.SemanticRules) {
@@ -580,7 +579,7 @@ namespace Mono.TextEditor.Highlighting
curChunk.Offset = offset;
curChunk.Length = length;
- curChunk.Style = span.TagColor ?? GetChunkStyle (span);
+ curChunk.Style = span.EndTagColor ?? GetChunkStyle (span);
AddChunk (ref curChunk, 0, defaultStyle);
spanParser.PopSpan ();
}
@@ -589,13 +588,13 @@ namespace Mono.TextEditor.Highlighting
public void ParseChar (ref int i, char ch)
{
Rule cur = spanParser.CurRule;
- bool isWordPart = cur.Delimiter.IndexOf (ch) < 0;
+ bool isWordPart = cur.GetDelimiter (mode).IndexOf (ch) < 0;
if (inWord && !isWordPart || !inWord && isWordPart)
AddChunk (ref curChunk, 0, curChunk.Style = GetStyle (curChunk) ?? GetSpanStyle ());
inWord = isWordPart;
- if (cur.HasMatches && (i - curChunk.Offset == 0 || string.IsNullOrEmpty (cur.Delimiter))) {
+ if (cur.HasMatches && (i - curChunk.Offset == 0 || string.IsNullOrEmpty (cur.GetDelimiter (mode)))) {
Match foundMatch = null;
var foundMatchLength = new int[0];
int textOffset = i - spanParser.StartOffset;
@@ -651,6 +650,7 @@ namespace Mono.TextEditor.Highlighting
length = System.Math.Min (doc.TextLength - offset, length);
curChunk = new Chunk (offset, 0, GetSpanStyle ());
spanParser.ParseSpans (offset, length);
+ curChunk.SpanStack = spanParser.SpanStack;
curChunk.Length = offset + length - curChunk.Offset;
if (curChunk.Length > 0) {
curChunk.Style = GetStyle (curChunk) ?? GetSpanStyle ();
@@ -798,12 +798,13 @@ namespace Mono.TextEditor.Highlighting
Rule DeepCopy (TextDocument doc, SyntaxMode mode, Rule rule)
{
- var newRule = new Rule (mode);
+ var newRule = new Rule ();
newRule.spans = new Span[rule.Spans.Length];
for (int i = 0; i < rule.Spans.Length; i++) {
newRule.spans [i] = rule.Spans [i].Clone ();
}
- newRule.Delimiter = rule.Delimiter;
+ if (rule.HasDelimiter)
+ newRule.SetDelimiter (rule.GetDelimiter (null));
newRule.IgnoreCase = rule.IgnoreCase;
newRule.Name = rule.Name;
newRule.DefaultColor = rule.DefaultColor;
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
index e8964d3..590535b 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
@@ -378,10 +378,16 @@ namespace Mono.TextEditor.Highlighting
static string Scan (Stream stream, string attribute)
{
- var reader = XmlReader.Create (stream);
- while (reader.Read () && !reader.IsStartElement ())
- ;
- return reader.GetAttribute (attribute);
+ try {
+ var reader = XmlReader.Create (stream);
+ while (reader.Read () && !reader.IsStartElement ())
+ ;
+ return reader.GetAttribute (attribute);
+ } catch (Exception e) {
+ Console.WriteLine ("Error while scanning xml:");
+ Console.WriteLine (e);
+ return null;
+ }
}
public static List<ValidationEventArgs> ValidateStyleFile (string fileName)
@@ -419,8 +425,12 @@ namespace Mono.TextEditor.Highlighting
} else if (file.EndsWith (".json", StringComparison.Ordinal)) {
using (var stream = File.OpenRead (file)) {
string styleName = ScanStyle (stream);
- styleLookup [styleName] = new UrlStreamProvider (file);
- isLoadedFromFile [styleName] = file;
+ if (!string.IsNullOrEmpty (styleName)) {
+ styleLookup [styleName] = new UrlStreamProvider (file);
+ isLoadedFromFile [styleName] = file;
+ } else {
+ Console.WriteLine ("Invalid .json syntax sheme file : " + file);
+ }
}
} else if (file.EndsWith (".vssettings", StringComparison.Ordinal)) {
using (var stream = File.OpenRead (file)) {
@@ -455,13 +465,19 @@ namespace Mono.TextEditor.Highlighting
static string ScanStyle (Stream stream)
{
- var file = new StreamReader (stream);
- file.ReadLine ();
- var nameLine = file.ReadLine ();
- var match = nameRegex.Match (nameLine);
- if (!match.Success)
+ try {
+ var file = new StreamReader (stream);
+ file.ReadLine ();
+ var nameLine = file.ReadLine ();
+ var match = nameRegex.Match (nameLine);
+ if (!match.Success)
+ return null;
+ return match.Groups[1].Value;
+ } catch (Exception e) {
+ Console.WriteLine ("Error while scanning json:");
+ Console.WriteLine (e);
return null;
- return match.Groups[1].Value;
+ }
}
public static void AddSyntaxMode (IStreamProvider provider)
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Utils/Diff.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Utils/Diff.cs
index 808ae1e..2f4b3c1 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Utils/Diff.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Utils/Diff.cs
@@ -102,13 +102,16 @@ namespace Mono.TextEditor.Utils
public struct Hunk
{
public static readonly Hunk Empty = new Hunk (0, 0, 0, 0);
-
+
public bool IsEmpty {
get {
return InsertStart <= 0;
}
}
-
+
+ // TODO: Add option to change this value.
+ public readonly int Context;
+
public readonly int InsertStart;
public readonly int RemoveStart;
@@ -121,6 +124,17 @@ namespace Mono.TextEditor.Utils
this.RemoveStart = removeStart;
this.Removed = removed;
this.Inserted = inserted;
+ this.Context = 3;
+ }
+
+ public int DistanceTo(Hunk other)
+ {
+ return other.RemoveStart - (this.RemoveStart + this.Removed);
+ }
+
+ public bool Overlaps(Hunk other)
+ {
+ return DistanceTo (other) < this.Context * 2;
}
public static bool operator ==(Hunk left, Hunk right)
@@ -375,7 +389,7 @@ namespace Mono.TextEditor.Utils
// SMS
/// <summary>
- /// This is the divide-and-conquer implementation of the longes common-subsequence (LCS)
+ /// This is the divide-and-conquer implementation of the longest common-subsequence (LCS)
/// algorithm.
/// The published algorithm passes recursively parts of the A and B sequences.
/// To avoid copying these arrays the lower and upper bounds are passed while the sequences stay constant.
@@ -424,40 +438,95 @@ namespace Mono.TextEditor.Utils
}
}
// LCS()
-
-
+
+ static void WriteHunks (Queue<Hunk> qh, TextDocument baseDocument, TextDocument changedDocument, StringBuilder sb)
+ {
+ Hunk item;
+ int remStart;
+ int insStart;
+ int distance = 0;
+
+ do {
+ item = qh.Dequeue ();
+ remStart = System.Math.Max (1, item.RemoveStart - (distance != 0 ? distance : item.Context));
+ insStart = System.Math.Max (1, item.InsertStart - (distance != 0 ? distance : item.Context));
+
+ for (int i = System.Math.Min (remStart, insStart); i < item.RemoveStart; i++) {
+ sb.AppendLine (" " + baseDocument.GetLineText (i, false));
+ }
+ for (int i = item.RemoveStart; i < item.RemoveStart + item.Removed; i++) {
+ sb.AppendLine ("-" + baseDocument.GetLineText (i, false));
+ }
+ for (int i = item.InsertStart; i < item.InsertStart + item.Inserted; i++) {
+ sb.AppendLine ("+" + changedDocument.GetLineText (i, false));
+ }
+
+ if (qh.Count != 0)
+ distance = item.DistanceTo (qh.Peek ());
+ } while (qh.Count != 0);
+
+ int remEnd = System.Math.Min (baseDocument.LineCount, item.RemoveStart + item.Removed + item.Context);
+ for (int i = item.RemoveStart + item.Removed; i < remEnd; i++) {
+ sb.AppendLine (" " + baseDocument.GetLineText (i, false));
+ }
+ }
+
public static string GetDiffString (TextDocument baseDocument, TextDocument changedDocument)
{
return GetDiffString (baseDocument.Diff (changedDocument), baseDocument, changedDocument, baseDocument.FileName, changedDocument.FileName);
}
-
+
public static string GetDiffString (IEnumerable<Hunk> diff, TextDocument baseDocument, TextDocument changedDocument, string baseFileName, string changedFileName)
{
if (diff == null)
return "";
+
StringBuilder sb = new StringBuilder ();
+ IEnumerator<Hunk> he = diff.GetEnumerator ();
+ he.MoveNext ();
+
+ Queue<Hunk> qh = new Queue<Hunk> ();
+ Hunk current;
+ Hunk next;
+
+ if (he.Current.IsEmpty)
+ return "";
+
sb.AppendLine ("--- " + baseFileName);
sb.AppendLine ("+++ " + changedFileName);
-
- foreach (var item in diff) {
- int remStart = System.Math.Max (1, item.RemoveStart - 3);
- int remEnd = System.Math.Min (baseDocument.LineCount, item.RemoveStart + item.Removed + 3);
- int insStart = System.Math.Max (1, item.InsertStart - 3);
- int insEnd = System.Math.Min (changedDocument.LineCount, item.InsertStart + item.Inserted + 3);
-
- sb.AppendLine ("@@ -" + remStart + "," + (remEnd - remStart) + " +" + insStart + "," + (insEnd - insStart) + " @@");
- for (int i = System.Math.Min (remStart, insStart); i < item.RemoveStart; i++) {
- sb.AppendLine (" " + baseDocument.GetLineText (i, false));
- }
- for (int i = item.RemoveStart; i < item.RemoveStart + item.Removed; i++) {
- sb.AppendLine ("-" + baseDocument.GetLineText (i, false));
- }
- for (int i = item.InsertStart; i < item.InsertStart + item.Inserted; i++) {
- sb.AppendLine ("+" + changedDocument.GetLineText (i, false));
- }
- for (int i = item.RemoveStart + item.Removed; i < remEnd; i++) {
- sb.AppendLine (" " + baseDocument.GetLineText (i, false));
+
+ current = he.Current;
+
+ qh.Enqueue (current);
+ int remStart = System.Math.Max (1, current.RemoveStart - current.Context);
+ int remEnd = System.Math.Min (baseDocument.LineCount, current.RemoveStart + current.Removed + current.Context);
+ int insStart = System.Math.Max (1, current.InsertStart - current.Context);
+ int insEnd = System.Math.Min (changedDocument.LineCount, current.InsertStart + current.Inserted + current.Context);
+
+ while (he.MoveNext ()) {
+ next = he.Current;
+
+ if (current.Overlaps (next)) {
+ // Change upper bounds.
+ remEnd = System.Math.Min (baseDocument.LineCount, next.RemoveStart + next.Removed + next.Context);
+ insEnd = System.Math.Min (changedDocument.LineCount, next.InsertStart + next.Inserted + next.Context);
+ } else {
+ sb.AppendLine ("@@ -" + remStart + "," + (remEnd - remStart) + " +" + insStart + "," + (insEnd - insStart) + " @@");
+ WriteHunks (qh, baseDocument, changedDocument, sb);
+
+ remStart = System.Math.Max (1, next.RemoveStart - next.Context);
+ remEnd = System.Math.Min (baseDocument.LineCount, next.RemoveStart + next.Removed + next.Context);
+ insStart = System.Math.Max (1, next.InsertStart - next.Context);
+ insEnd = System.Math.Min (changedDocument.LineCount, next.InsertStart + next.Inserted + next.Context);
}
+ qh.Enqueue (next);
+
+ current = next;
+ }
+
+ if (qh.Count != 0) {
+ sb.AppendLine ("@@ -" + remStart + "," + (remEnd - remStart) + " +" + insStart + "," + (insEnd - insStart) + " @@");
+ WriteHunks (qh, baseDocument, changedDocument, sb);
}
return sb.ToString ();
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/NewViEditMode.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/NewViEditMode.cs
new file mode 100644
index 0000000..2527e95
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/NewViEditMode.cs
@@ -0,0 +1,125 @@
+//
+// NewViEditMode.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson at gmail.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Text;
+using System.Text.RegularExpressions;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Mono.TextEditor.Vi
+{
+ public class NewViEditMode : EditMode
+ {
+ ViStatusArea statusArea;
+ TextEditor viTextEditor;
+
+ protected ViEditor ViEditor { get ; private set ;}
+
+ public NewViEditMode ()
+ {
+ ViEditor = new ViEditor (this);
+ ViEditor.ModeChanged += (sender, e) => {
+ if (statusArea != null)
+ statusArea.ShowCaret = ViEditor.Mode == ViEditorMode.Command;
+ };
+ ViEditor.MessageChanged += (sender, e) => {
+ if (statusArea != null)
+ statusArea.Message = ViEditor.Message;
+ };
+ }
+
+ protected override void OnAddedToEditor (TextEditorData data)
+ {
+ ViEditor.SetMode (ViEditorMode.Normal);
+ SetCaretMode (CaretMode.Block, data);
+ ViActions.RetreatFromLineEnd (data);
+
+ viTextEditor = data.Parent;
+ if (viTextEditor != null) {
+ statusArea = new ViStatusArea (viTextEditor);
+ }
+ }
+
+ protected override void OnRemovedFromEditor (TextEditorData data)
+ {
+ SetCaretMode (CaretMode.Insert, data);
+
+ if (viTextEditor != null) {
+ statusArea.RemoveFromParentAndDestroy ();
+ statusArea = null;
+ viTextEditor = null;
+ }
+ }
+
+ public override void AllocateTextArea (TextEditor textEditor, TextArea textArea, Gdk.Rectangle allocation)
+ {
+ statusArea.AllocateArea (textArea, allocation);
+ }
+
+ protected override void HandleKeypress (Gdk.Key key, uint unicodeKey, Gdk.ModifierType modifier)
+ {
+ ViEditor.ProcessKey (modifier, key, (char)unicodeKey);
+ }
+
+ public new TextEditor Editor { get { return base.Editor; } }
+ public new TextEditorData Data { get { return base.Data; } }
+
+ public override bool WantsToPreemptIM {
+ get {
+ switch (ViEditor.Mode) {
+ case ViEditorMode.Insert:
+ case ViEditorMode.Replace:
+ return false;
+ case ViEditorMode.Normal:
+ case ViEditorMode.Visual:
+ case ViEditorMode.VisualLine:
+ default:
+ return true;
+ }
+ }
+ }
+
+ protected override void CaretPositionChanged ()
+ {
+ ViEditor.OnCaretPositionChanged ();
+ }
+
+ public void SetCaretMode (CaretMode mode)
+ {
+ SetCaretMode (mode, Data);
+ }
+
+ static void SetCaretMode (CaretMode mode, TextEditorData data)
+ {
+ if (data.Caret.Mode == mode)
+ return;
+ data.Caret.Mode = mode;
+ data.Document.RequestUpdate (new SinglePositionUpdate (data.Caret.Line, data.Caret.Column));
+ data.Document.CommitDocumentUpdate ();
+ }
+ }
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilderContext.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilderContext.cs
index 5094c4f..456b43b 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilderContext.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilderContext.cs
@@ -197,7 +197,7 @@ namespace Mono.TextEditor.Vi
{ 'o', FoldActions.OpenFold },
}},
{ 'g', new ViCommandMap () {
- { 'g', CaretMoveActions.ToDocumentStart },
+ { 'g', GotoLine, true },
}},
{ 'r', ViBuilders.ReplaceChar },
{ '~', ViActions.ToggleCase },
@@ -310,6 +310,13 @@ namespace Mono.TextEditor.Vi
ctx.RunAction ((ViEditor e) => ViActions.Up (e.Data));
return Open (ctx);
}
+
+ static bool GotoLine (ViBuilderContext ctx)
+ {
+ ctx.RunAction ((ViEditor e) => ViEditorActions.CaretToLineNumber (ctx.Multiplier, e));
+ ctx.RunAction ((ViEditor e) => CaretMoveActions.LineFirstNonWhitespace (e.Data));
+ return true;
+ }
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilders.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilders.cs
index c381ac9..20a8d05 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilders.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViBuilders.cs
@@ -150,6 +150,13 @@ namespace Mono.TextEditor.Vi
ctx.Builder = (ViBuilderContext x) => {
int c = (int)x.LastKey.Char;
if (c >= (int)'0' && c <= (int)'9') {
+ //don't eat '0' if not preceded by non-zero digit
+ //pass on to interpret as goto line start
+ if (c == (int)'0' && factor == 1) {
+ ctx.Multiplier *= multiplier;
+ ctx.Builder = nextBuilder;
+ return ctx.Builder (ctx);
+ }
int d = c - (int)'0';
multiplier = multiplier * factor + d;
factor *= 10;
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditor.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditor.cs
index 4deb30e..83110bd 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditor.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditor.cs
@@ -59,8 +59,35 @@ namespace Mono.TextEditor.Vi
public TextEditorData Data { get { return editMode.Data; } }
public TextDocument Document { get { return Data.Document; } }
ViBuilderContext Context { get; set; }
- public string Message { get; private set; }
- public ViEditorMode Mode { get; private set; }
+
+ public event EventHandler ModeChanged;
+ public event EventHandler MessageChanged;
+
+ string message;
+ public string Message {
+ get {
+ return message;
+ }
+ private set {
+ message = value;
+ var e = MessageChanged;
+ if (e != null)
+ e (this, EventArgs.Empty);
+ }
+ }
+
+ ViEditorMode mode;
+ public ViEditorMode Mode {
+ get {
+ return mode;
+ }
+ private set {
+ mode = value;
+ var e = ModeChanged;
+ if (e != null)
+ e (this, EventArgs.Empty);
+ }
+ }
//shared between editors in the same process
//TODO: maybe move these into some kind of shared context to pass around explicitly
@@ -280,7 +307,8 @@ namespace Mono.TextEditor.Vi
Replace, // R
Visual, // v
VisualLine, // V
- VisualBlock // ^V TODO
+ VisualBlock, // ^V TODO
+ Command,
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditorActions.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditorActions.cs
index e02021b..8c65bf9 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditorActions.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViEditorActions.cs
@@ -51,5 +51,10 @@ namespace Mono.TextEditor.Vi
{
ed.Data.Caret.Line = System.Math.Max (0, ed.Editor.PointToLocation (0, ed.Editor.LineHeight - 1).Line);
}
+
+ public static void CaretToLineNumber (int lineNumber, ViEditor ed)
+ {
+ ed.Data.Caret.Line = System.Math.Max (1, lineNumber);
+ }
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs
index a9f0ad7..935c774 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs
@@ -34,70 +34,6 @@ using System.Linq;
namespace Mono.TextEditor.Vi
{
- public class NewViEditMode : EditMode
- {
- protected ViEditor ViEditor { get ; private set ;}
-
- public NewViEditMode ()
- {
- ViEditor = new ViEditor (this);
- }
-
- protected override void HandleKeypress (Gdk.Key key, uint unicodeKey, Gdk.ModifierType modifier)
- {
- ViEditor.ProcessKey (modifier, key, (char)unicodeKey);
- }
-
- public new TextEditor Editor { get { return base.Editor; } }
- public new TextEditorData Data { get { return base.Data; } }
-
- public override bool WantsToPreemptIM {
- get {
- switch (ViEditor.Mode) {
- case ViEditorMode.Insert:
- case ViEditorMode.Replace:
- return false;
- case ViEditorMode.Normal:
- case ViEditorMode.Visual:
- case ViEditorMode.VisualLine:
- default:
- return true;
- }
- }
- }
-
- protected override void OnAddedToEditor (TextEditorData data)
- {
- ViEditor.SetMode (ViEditorMode.Normal);
- SetCaretMode (CaretMode.Block, data);
- ViActions.RetreatFromLineEnd (data);
- }
-
- protected override void OnRemovedFromEditor (TextEditorData data)
- {
- SetCaretMode (CaretMode.Insert, data);
- }
-
- protected override void CaretPositionChanged ()
- {
- ViEditor.OnCaretPositionChanged ();
- }
-
- public void SetCaretMode (CaretMode mode)
- {
- SetCaretMode (mode, Data);
- }
-
- static void SetCaretMode (CaretMode mode, TextEditorData data)
- {
- if (data.Caret.Mode == mode)
- return;
- data.Caret.Mode = mode;
- data.Document.RequestUpdate (new SinglePositionUpdate (data.Caret.Line, data.Caret.Column));
- data.Document.CommitDocumentUpdate ();
- }
- }
-
public class ViEditMode : EditMode
{
bool searchBackward;
@@ -110,9 +46,8 @@ namespace Mono.TextEditor.Vi
}
set {
curState = value;
- if (viTextEditor != null) {
- viTextEditor.Caret.IsVisible = curState != State.Command;
- viTextEditor.RequestResetCaretBlink ();
+ if (statusArea != null) {
+ statusArea.ShowCaret = curState == State.Command;
}
}
}
@@ -123,7 +58,6 @@ namespace Mono.TextEditor.Vi
Dictionary<char,ViMark> marks = new Dictionary<char, ViMark>();
Dictionary<char,ViMacro> macros = new Dictionary<char, ViMacro>();
char macros_lastplayed = '@'; // start with the illegal macro character
- string statusText = "";
/// <summary>
/// The macro currently being implemented. Will be set to null and checked as a flag when required.
@@ -133,19 +67,15 @@ namespace Mono.TextEditor.Vi
public virtual string Status {
get {
- return statusText;
+ return statusArea.Message;
}
protected set {
- if (currentMacro == null) {
- statusText = value;
- } else {
- statusText = value + " recording";
+ if (currentMacro != null) {
+ value = value + " recording";
}
-
- if (curState == State.Command && viTextEditor != null) {
- viTextEditor.RequestResetCaretBlink ();
- statusArea.QueueDraw ();
+ if (viTextEditor != null) {
+ statusArea.Message = value;
}
}
}
@@ -298,23 +228,24 @@ namespace Mono.TextEditor.Vi
viTextEditor = data.Parent;
if (viTextEditor != null) {
- statusArea = new ViStatusArea (viTextEditor, this);
- viTextEditor.AddTopLevelWidget (statusArea, 0, 0);
- ((TextEditor.EditorContainerChild)viTextEditor[statusArea]).FixedPosition = true;
- statusArea.Show ();
+ statusArea = new ViStatusArea (viTextEditor);
}
}
protected override void OnRemovedFromEditor (TextEditorData data)
{
data.Caret.Mode = CaretMode.Insert;
+
if (viTextEditor != null) {
- viTextEditor.Remove (statusArea);
- statusArea.Destroy ();
+ statusArea.RemoveFromParentAndDestroy ();
statusArea = null;
viTextEditor = null;
}
+ }
+ public override void AllocateTextArea (TextEditor textEditor, TextArea textArea, Gdk.Rectangle allocation)
+ {
+ statusArea.AllocateArea (textArea, allocation);
}
void Reset (string status)
@@ -1208,100 +1139,6 @@ namespace Mono.TextEditor.Vi
NameMacro,
PlayMacro
}
-
- public override void AllocateTextArea (TextEditor textEditor, TextArea textArea, Gdk.Rectangle allocation)
- {
- if (!statusArea.Visible)
- statusArea.Show ();
- allocation.Height -= (int)textArea.LineHeight;
- if (textArea.Allocation != allocation)
- textArea.SizeAllocate (allocation);
- statusArea.SetSizeRequest (allocation.Width, (int)viTextEditor.LineHeight);
- viTextEditor.MoveTopLevelWidget (statusArea, 0, allocation.Height);
- }
-
- class ViStatusArea : Gtk.DrawingArea
- {
- TextEditor editor;
- ViEditMode editMode;
-
- public ViStatusArea (TextEditor editor, ViEditMode editMode)
- {
- this.editor = editor;
- this.editMode = editMode;
- editor.TextViewMargin.CaretBlink += HandleCaretBlink;
- editor.Caret.PositionChanged += HandlePositionChanged;
- }
-
- void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
- {
- QueueDraw ();
- }
-
- void HandleCaretBlink (object sender, EventArgs e)
- {
- QueueDraw ();
- }
-
- protected override void OnDestroyed ()
- {
- editor.Caret.PositionChanged -= HandlePositionChanged;
- editor.TextViewMargin.CaretBlink -= HandleCaretBlink;
- base.OnDestroyed ();
- }
-
- protected override bool OnExposeEvent (Gdk.EventExpose evnt)
- {
- using (Cairo.Context cr = Gdk.CairoHelper.Create (evnt.Window)) {
- cr.Rectangle (evnt.Region.Clipbox.X, evnt.Region.Clipbox.Y, evnt.Region.Clipbox.Width, evnt.Region.Clipbox.Height);
- cr.Color = editor.ColorStyle.PlainText.Background;
- cr.Fill ();
- using (var layout = PangoUtil.CreateLayout (editor)) {
- layout.FontDescription = editor.Options.Font;
-
- layout.SetText ("000,00-00");
- int minstatusw, minstatush;
- layout.GetPixelSize (out minstatusw, out minstatush);
-
- var line = editor.GetLine (editor.Caret.Line);
- var visColumn = line.GetVisualColumn (editor.GetTextEditorData (), editor.Caret.Column);
-
- if (visColumn != editor.Caret.Column) {
- layout.SetText (editor.Caret.Line + "," + editor.Caret.Column + "-" + visColumn);
- } else {
- layout.SetText (editor.Caret.Line + "," + editor.Caret.Column);
- }
-
- int statusw, statush;
- layout.GetPixelSize (out statusw, out statush);
-
- statusw = System.Math.Max (statusw, minstatusw);
-
- statusw += 8;
- cr.MoveTo (Allocation.Width - statusw, 0);
- statusw += 8;
- cr.Color = editor.ColorStyle.PlainText.Foreground;
- cr.ShowLayout (layout);
-
-
- layout.SetText (editMode.Status);
- int w, h;
- layout.GetPixelSize (out w, out h);
- var x = System.Math.Min (0, -w + Allocation.Width - editor.TextViewMargin.CharWidth - statusw);
- cr.MoveTo (x, 0);
- cr.Color = editor.ColorStyle.PlainText.Foreground;
- cr.ShowLayout (layout);
- if (editMode.CurState == ViEditMode.State.Command) {
- if (editor.TextViewMargin.caretBlink) {
- cr.Rectangle (w + x, 0, (int)editor.TextViewMargin.CharWidth, (int)editor.LineHeight);
- cr.Fill ();
- }
- }
- }
- }
- return true;
- }
- }
}
public enum Motion {
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
new file mode 100644
index 0000000..a3270a4
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
@@ -0,0 +1,159 @@
+//
+// ViStatusArea.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+// Michael Hutchinson <m.j.hutchinson at gmail.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace Mono.TextEditor.Vi
+{
+ class ViStatusArea : Gtk.DrawingArea
+ {
+ TextEditor editor;
+ bool showCaret;
+ string statusText;
+
+ public ViStatusArea (TextEditor editor)
+ {
+ this.editor = editor;
+ editor.TextViewMargin.CaretBlink += HandleCaretBlink;
+ editor.Caret.PositionChanged += HandlePositionChanged;
+
+ editor.AddTopLevelWidget (this, 0, 0);
+ ((TextEditor.EditorContainerChild)editor[this]).FixedPosition = true;
+ Show ();
+ }
+
+ void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
+ {
+ QueueDraw ();
+ }
+
+ void HandleCaretBlink (object sender, EventArgs e)
+ {
+ QueueDraw ();
+ }
+
+ public void RemoveFromParentAndDestroy ()
+ {
+ editor.Remove (this);
+ Destroy ();
+ }
+
+ protected override void OnDestroyed ()
+ {
+ editor.Caret.PositionChanged -= HandlePositionChanged;
+ editor.TextViewMargin.CaretBlink -= HandleCaretBlink;
+ base.OnDestroyed ();
+ }
+
+ public void AllocateArea (TextArea textArea, Gdk.Rectangle allocation)
+ {
+ if (!Visible)
+ Show ();
+ allocation.Height -= (int)textArea.LineHeight;
+ if (textArea.Allocation != allocation)
+ textArea.SizeAllocate (allocation);
+ SetSizeRequest (allocation.Width, (int)editor.LineHeight);
+ editor.MoveTopLevelWidget (this, 0, allocation.Height);
+ }
+
+ public bool ShowCaret {
+ get { return showCaret; }
+ set {
+ if (showCaret != value) {
+ showCaret = value;
+ editor.Caret.IsVisible = !showCaret;
+ editor.RequestResetCaretBlink ();
+ QueueDraw ();
+ }
+ }
+ }
+
+ public string Message {
+ get { return statusText; }
+ set {
+ if (statusText == value)
+ return;
+ statusText = value;
+ if (showCaret) {
+ editor.RequestResetCaretBlink ();
+ }
+ QueueDraw ();
+ }
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ using (Cairo.Context cr = Gdk.CairoHelper.Create (evnt.Window)) {
+ cr.Rectangle (evnt.Region.Clipbox.X, evnt.Region.Clipbox.Y, evnt.Region.Clipbox.Width, evnt.Region.Clipbox.Height);
+ cr.Color = editor.ColorStyle.PlainText.Background;
+ cr.Fill ();
+ using (var layout = PangoUtil.CreateLayout (editor)) {
+ layout.FontDescription = editor.Options.Font;
+
+ layout.SetText ("000,00-00");
+ int minstatusw, minstatush;
+ layout.GetPixelSize (out minstatusw, out minstatush);
+
+ var line = editor.GetLine (editor.Caret.Line);
+ var visColumn = line.GetVisualColumn (editor.GetTextEditorData (), editor.Caret.Column);
+
+ if (visColumn != editor.Caret.Column) {
+ layout.SetText (editor.Caret.Line + "," + editor.Caret.Column + "-" + visColumn);
+ } else {
+ layout.SetText (editor.Caret.Line + "," + editor.Caret.Column);
+ }
+
+ int statusw, statush;
+ layout.GetPixelSize (out statusw, out statush);
+
+ statusw = System.Math.Max (statusw, minstatusw);
+
+ statusw += 8;
+ cr.MoveTo (Allocation.Width - statusw, 0);
+ statusw += 8;
+ cr.Color = editor.ColorStyle.PlainText.Foreground;
+ cr.ShowLayout (layout);
+
+ layout.SetText (statusText ?? "");
+ int w, h;
+ layout.GetPixelSize (out w, out h);
+ var x = System.Math.Min (0, -w + Allocation.Width - editor.TextViewMargin.CharWidth - statusw);
+ cr.MoveTo (x, 0);
+ cr.Color = editor.ColorStyle.PlainText.Foreground;
+ cr.ShowLayout (layout);
+ if (ShowCaret) {
+ if (editor.TextViewMargin.caretBlink) {
+ cr.Rectangle (w + x, 0, (int)editor.TextViewMargin.CharWidth, (int)editor.LineHeight);
+ cr.Fill ();
+ }
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor.csproj b/src/core/Mono.Texteditor/Mono.TextEditor.csproj
index 5db2282..a393640 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor.csproj
+++ b/src/core/Mono.Texteditor/Mono.TextEditor.csproj
@@ -214,6 +214,17 @@
<Compile Include="Mono.TextEditor\ITextEditorOptions.cs" />
<Compile Include="Mono.TextEditor.Vi\ViModeAbortException.cs" />
<Compile Include="Mono.TextEditor\ITextPasteHandler.cs" />
+ <Compile Include="Mono.TextEditor.Vi\NewViEditMode.cs" />
+ <Compile Include="Mono.TextEditor.Vi\ViStatusArea.cs" />
+ <Compile Include="Mono.TextEditor\MarginMarker.cs" />
+ <Compile Include="Mono.TextEditor\UnderlineMarker.cs" />
+ <Compile Include="Mono.TextEditor\IBackgroundMarker.cs" />
+ <Compile Include="Mono.TextEditor\LineBackgroundMarker.cs" />
+ <Compile Include="Mono.TextEditor\IIconBarMarker.cs" />
+ <Compile Include="Mono.TextEditor\UrlMarker.cs" />
+ <Compile Include="Mono.TextEditor\StyleTextLineMarker.cs" />
+ <Compile Include="Mono.TextEditor\Standalone\UnicodeNewline.cs" />
+ <Compile Include="Mono.TextEditor\Gui\ActionMargin.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Mono.TextEditor.dll.config">
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Actions/ClipboardActions.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Actions/ClipboardActions.cs
index 455b2ca..50435ed 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Actions/ClipboardActions.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Actions/ClipboardActions.cs
@@ -82,13 +82,13 @@ namespace Mono.TextEditor
{
}
- string GetCopiedPlainText ()
+ string GetCopiedPlainText (string eol = "\n")
{
var plainText = new StringBuilder ();
bool first = true;
foreach (var line in copiedColoredChunks) {
if (!first) {
- plainText.AppendLine ();
+ plainText.Append (eol);
} else {
first = false;
}
@@ -106,10 +106,6 @@ namespace Mono.TextEditor
return;
switch (info) {
case TextType:
- // Windows specific hack to work around bug: Bug 661973 - copy operation in TextEditor braks text lines with duplicate line endings when the file has CRLF
- // Remove when https://bugzilla.gnome.org/show_bug.cgi?id=640439 is fixed.
-
-
selection_data.Text = GetCopiedPlainText ();
break;
case RichTextType:
@@ -373,9 +369,7 @@ namespace Mono.TextEditor
clipboard.RequestText (delegate(Clipboard clp, string text) {
if (string.IsNullOrEmpty (text))
return;
- using (var undo = data.OpenUndoGroup ()) {
- result = PastePlainText (data, insertionOffset, text, preserveSelection);
- }
+ result = PastePlainText (data, insertionOffset, text, preserveSelection);
});
}
@@ -385,34 +379,34 @@ namespace Mono.TextEditor
static int PastePlainText (TextEditorData data, int offset, string text, bool preserveSelection = false, byte[] copyData = null)
{
int inserted = 0;
- using (var undo = data.OpenUndoGroup ()) {
- var version = data.Document.Version;
- if (!preserveSelection)
- data.DeleteSelectedText (!data.IsSomethingSelected || data.MainSelection.SelectionMode != SelectionMode.Block);
- data.EnsureCaretIsNotVirtual ();
- if (data.IsSomethingSelected && data.MainSelection.SelectionMode == SelectionMode.Block) {
- var selection = data.MainSelection;
- var visualInsertLocation = data.LogicalToVisualLocation (selection.Anchor);
- for (int lineNumber = selection.MinLine; lineNumber <= selection.MaxLine; lineNumber++) {
- var lineSegment = data.GetLine (lineNumber);
- int insertOffset = lineSegment.GetLogicalColumn (data, visualInsertLocation.Column) - 1;
- string textToInsert;
- if (lineSegment.Length < insertOffset) {
- int visualLastColumn = lineSegment.GetVisualColumn (data, lineSegment.Length + 1);
- int charsToInsert = visualInsertLocation.Column - visualLastColumn;
- int spaceCount = charsToInsert % data.Options.TabSize;
- textToInsert = new string ('\t', (charsToInsert - spaceCount) / data.Options.TabSize) + new string (' ', spaceCount) + text;
- insertOffset = lineSegment.Length;
- } else {
- textToInsert = text;
- }
- inserted = data.Insert (lineSegment.Offset + insertOffset, textToInsert);
+ var undo = data.OpenUndoGroup ();
+ var version = data.Document.Version;
+ if (!preserveSelection)
+ data.DeleteSelectedText (!data.IsSomethingSelected || data.MainSelection.SelectionMode != SelectionMode.Block);
+ data.EnsureCaretIsNotVirtual ();
+ if (data.IsSomethingSelected && data.MainSelection.SelectionMode == SelectionMode.Block) {
+ var selection = data.MainSelection;
+ var visualInsertLocation = data.LogicalToVisualLocation (selection.Anchor);
+ for (int lineNumber = selection.MinLine; lineNumber <= selection.MaxLine; lineNumber++) {
+ var lineSegment = data.GetLine (lineNumber);
+ int insertOffset = lineSegment.GetLogicalColumn (data, visualInsertLocation.Column) - 1;
+ string textToInsert;
+ if (lineSegment.Length < insertOffset) {
+ int visualLastColumn = lineSegment.GetVisualColumn (data, lineSegment.Length + 1);
+ int charsToInsert = visualInsertLocation.Column - visualLastColumn;
+ int spaceCount = charsToInsert % data.Options.TabSize;
+ textToInsert = new string ('\t', (charsToInsert - spaceCount) / data.Options.TabSize) + new string (' ', spaceCount) + text;
+ insertOffset = lineSegment.Length;
+ } else {
+ textToInsert = text;
}
- } else {
- offset = version.MoveOffsetTo (data.Document.Version, offset);
- inserted = data.PasteText (offset, text, copyData);
+ inserted = data.Insert (lineSegment.Offset + insertOffset, textToInsert);
}
+ } else {
+ offset = version.MoveOffsetTo (data.Document.Version, offset);
+ inserted = data.PasteText (offset, text, copyData, ref undo);
}
+ undo.Dispose ();
return inserted;
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs
index 2621dd9..134f8d7 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs
@@ -30,155 +30,9 @@ using System.Threading;
namespace Mono.TextEditor
{
- // copied from nrefactory.
- public abstract class AbstractAnnotatable
+ [Obsolete("Use ICSharpCode.NRefactory.AbstractAnnotatable")]
+ public abstract class AbstractAnnotatable : ICSharpCode.NRefactory.AbstractAnnotatable
{
- // 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)
- protected object annotations;
-
- sealed class AnnotationList : List<object>, ICloneable
- {
- // There are two uses for this custom list type:
- // 1) it's private, and thus (unlike List<object>) cannot be confused with real annotations
- // 2) It allows us to simplify the cloning logic by making the list behave the same as a clonable annotation.
- public AnnotationList (int initialCapacity) : base(initialCapacity)
- {
- }
-
- public object Clone ()
- {
- lock (this) {
- AnnotationList copy = new AnnotationList (this.Count);
- for (int i = 0; i < this.Count; i++) {
- object obj = this [i];
- ICloneable c = obj as ICloneable;
- copy.Add (c != null ? c.Clone () : obj);
- }
- return copy;
- }
- }
- }
-
- public virtual void AddAnnotation (object annotation)
- {
- if (annotation == null)
- throw new ArgumentNullException ("annotation");
- retry: // Retry until successful
- object oldAnnotation = Interlocked.CompareExchange (ref this.annotations, annotation, null);
- if (oldAnnotation == null) {
- return; // we successfully added a single annotation
- }
- AnnotationList list = oldAnnotation as AnnotationList;
- if (list == null) {
- // we need to transform the old annotation into a list
- list = new AnnotationList (4);
- list.Add (oldAnnotation);
- list.Add (annotation);
- if (Interlocked.CompareExchange (ref this.annotations, list, oldAnnotation) != oldAnnotation) {
- // the transformation failed (some other thread wrote to this.annotations first)
- goto retry;
- }
- } else {
- // once there's a list, use simple locking
- lock (list) {
- list.Add (annotation);
- }
- }
- }
-
- public virtual void RemoveAnnotations<T> () where T : class
- {
- retry: // Retry until successful
- object oldAnnotations = this.annotations;
- AnnotationList list = oldAnnotations as AnnotationList;
- if (list != null) {
- lock (list)
- list.RemoveAll (obj => obj is T);
- } else if (oldAnnotations is T) {
- if (Interlocked.CompareExchange (ref this.annotations, null, oldAnnotations) != oldAnnotations) {
- // Operation failed (some other thread wrote to this.annotations first)
- goto retry;
- }
- }
- }
-
- public virtual void RemoveAnnotations (Type type)
- {
- if (type == null)
- throw new ArgumentNullException ("type");
- retry: // Retry until successful
- object oldAnnotations = this.annotations;
- AnnotationList list = oldAnnotations as AnnotationList;
- if (list != null) {
- lock (list)
- list.RemoveAll (obj => type.IsInstanceOfType (obj));
- } else if (type.IsInstanceOfType (oldAnnotations)) {
- if (Interlocked.CompareExchange (ref this.annotations, null, oldAnnotations) != oldAnnotations) {
- // Operation failed (some other thread wrote to this.annotations first)
- goto retry;
- }
- }
- }
-
- public T Annotation<T> () where T: class
- {
- object annotations = this.annotations;
- AnnotationList list = annotations as AnnotationList;
- if (list != null) {
- lock (list) {
- foreach (object obj in list) {
- T t = obj as T;
- if (t != null)
- return t;
- }
- return null;
- }
- } else {
- return annotations as T;
- }
- }
-
- public object Annotation (Type type)
- {
- if (type == null)
- throw new ArgumentNullException ("type");
- object annotations = this.annotations;
- AnnotationList list = annotations as AnnotationList;
- if (list != null) {
- lock (list) {
- foreach (object obj in list) {
- if (type.IsInstanceOfType (obj))
- return obj;
- }
- }
- } else {
- if (type.IsInstanceOfType (annotations))
- return annotations;
- }
- return null;
- }
-
- /// <summary>
- /// Gets all annotations stored on this AstNode.
- /// </summary>
- public IEnumerable<object> Annotations {
- get {
- object annotations = this.annotations;
- AnnotationList list = annotations as AnnotationList;
- if (list != null) {
- lock (list) {
- return list.ToArray ();
- }
- } else {
- if (annotations != null)
- return new object[] { annotations };
- else
- return Enumerable.Empty<object> ();
- }
- }
- }
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
index 3b21721..c4fc657 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
@@ -38,6 +38,13 @@ namespace Mono.TextEditor
{
}
+ public bool CanDrawBackground { get { return false; } }
+
+ public void DrawBackground (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height)
+ {
+ throw new NotSupportedException ();
+ }
+
public void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine lineSegment, int lineNumber, double x, double y, double width, double height)
{
if (lineSegment.IsBookmarked) {
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Document/IWordFindStrategy.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Document/IWordFindStrategy.cs
index 559ae92..0ebf5c8 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Document/IWordFindStrategy.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Document/IWordFindStrategy.cs
@@ -1,4 +1,4 @@
-//
+//
// IWordFindStrategy.cs
//
// Author:
@@ -32,94 +32,94 @@ namespace Mono.TextEditor
{
public interface IWordFindStrategy
{
- int FindNextWordOffset (TextDocument doc, int offset);
- int FindPrevWordOffset (TextDocument doc, int offset);
- int FindNextSubwordOffset (TextDocument doc, int offset);
- int FindPrevSubwordOffset (TextDocument doc, int offset);
- int FindCurrentWordStart (TextDocument doc, int offset);
- int FindCurrentWordEnd (TextDocument doc, int offset);
- }
-
- public abstract class WordFindStrategy : IWordFindStrategy
- {
- public enum CharacterClass {
- Unknown,
- Whitespace,
- IdentifierPart,
- UppercaseLetter,
- LowercaseLetter,
- Digit
- }
-
- public static CharacterClass GetCharacterClass (char ch)
- {
- return GetCharacterClass (ch, false, false);
- }
-
- public static CharacterClass GetCharacterClass (char ch, bool subword, bool treat_)
- {
- if (Char.IsWhiteSpace (ch))
- return CharacterClass.Whitespace;
- if (Char.IsDigit (ch))
- return subword? CharacterClass.Digit : CharacterClass.IdentifierPart;
- if (Char.IsLetter (ch)) {
- if (!subword)
- return CharacterClass.IdentifierPart;
- else if (Char.IsUpper (ch))
- return CharacterClass.UppercaseLetter;
- else
- return CharacterClass.LowercaseLetter;
- }
- if (!subword && treat_ && ch == '_')
- return CharacterClass.IdentifierPart;
- return CharacterClass.Unknown;
- }
-
- public abstract int FindNextWordOffset (TextDocument doc, int offset);
- public abstract int FindPrevWordOffset (TextDocument doc, int offset);
-
- public virtual int FindNextSubwordOffset (TextDocument doc, int offset)
- {
- return FindNextWordOffset (doc, offset);
- }
-
- public virtual int FindPrevSubwordOffset (TextDocument doc, int offset)
- {
- return FindPrevWordOffset (doc, offset);
- }
-
- public virtual int FindCurrentWordStart (TextDocument doc, int offset)
- {
- return ScanWord (doc, offset, false);
- }
-
- public virtual int FindCurrentWordEnd (TextDocument doc, int offset)
- {
- return ScanWord (doc, offset, true);
- }
-
- internal static int ScanWord (TextDocument doc, int offset, bool forwardDirection)
- {
- if (offset < 0 || offset >= doc.TextLength)
- return offset;
- var line = doc.GetLineByOffset (offset);
- char first = doc.GetCharAt (offset);
- while (offset >= line.Offset && offset < line.Offset + line.Length) {
- char ch = doc.GetCharAt (offset);
- if (char.IsWhiteSpace (first) && !char.IsWhiteSpace (ch)
- || IsNoIdentifierPart (first) && !IsNoIdentifierPart (ch)
- || (char.IsLetterOrDigit (first) || first == '_') && !(char.IsLetterOrDigit (ch) || ch == '_'))
- break;
-
- offset = forwardDirection ? offset + 1 : offset - 1;
- }
- return System.Math.Min (line.Offset + line.Length,
- System.Math.Max (line.Offset, offset + (forwardDirection ? 0 : 1)));
- }
-
- static bool IsNoIdentifierPart (char ch)
- {
- return !char.IsWhiteSpace (ch) && !char.IsLetterOrDigit (ch) && ch != '_';
- }
+ int FindNextWordOffset (TextDocument doc, int offset);
+ int FindPrevWordOffset (TextDocument doc, int offset);
+ int FindNextSubwordOffset (TextDocument doc, int offset);
+ int FindPrevSubwordOffset (TextDocument doc, int offset);
+ int FindCurrentWordStart (TextDocument doc, int offset);
+ int FindCurrentWordEnd (TextDocument doc, int offset);
+ }
+
+ public abstract class WordFindStrategy : IWordFindStrategy
+ {
+ public enum CharacterClass {
+ Unknown,
+ Whitespace,
+ IdentifierPart,
+ UppercaseLetter,
+ LowercaseLetter,
+ Digit
+ }
+
+ public static CharacterClass GetCharacterClass (char ch)
+ {
+ return GetCharacterClass (ch, false, false);
+ }
+
+ public static CharacterClass GetCharacterClass (char ch, bool subword, bool treat_)
+ {
+ if (Char.IsWhiteSpace (ch))
+ return CharacterClass.Whitespace;
+ if (Char.IsDigit (ch))
+ return subword? CharacterClass.Digit : CharacterClass.IdentifierPart;
+ if (Char.IsLetter (ch)) {
+ if (!subword)
+ return CharacterClass.IdentifierPart;
+ else if (Char.IsUpper (ch))
+ return CharacterClass.UppercaseLetter;
+ else
+ return CharacterClass.LowercaseLetter;
+ }
+ if (!subword && treat_ && ch == '_')
+ return CharacterClass.IdentifierPart;
+ return CharacterClass.Unknown;
+ }
+
+ public abstract int FindNextWordOffset (TextDocument doc, int offset);
+ public abstract int FindPrevWordOffset (TextDocument doc, int offset);
+
+ public virtual int FindNextSubwordOffset (TextDocument doc, int offset)
+ {
+ return FindNextWordOffset (doc, offset);
+ }
+
+ public virtual int FindPrevSubwordOffset (TextDocument doc, int offset)
+ {
+ return FindPrevWordOffset (doc, offset);
+ }
+
+ public virtual int FindCurrentWordStart (TextDocument doc, int offset)
+ {
+ return ScanWord (doc, offset, false);
+ }
+
+ public virtual int FindCurrentWordEnd (TextDocument doc, int offset)
+ {
+ return ScanWord (doc, offset, true);
+ }
+
+ internal static int ScanWord (TextDocument doc, int offset, bool forwardDirection)
+ {
+ if (offset < 0 || offset >= doc.TextLength)
+ return offset;
+ var line = doc.GetLineByOffset (offset);
+ char first = doc.GetCharAt (offset);
+ while (offset >= line.Offset && offset < line.Offset + line.Length) {
+ char ch = doc.GetCharAt (offset);
+ if (char.IsWhiteSpace (first) && !char.IsWhiteSpace (ch)
+ || IsNoIdentifierPart (first) && !IsNoIdentifierPart (ch)
+ || (char.IsLetterOrDigit (first) || first == '_') && !(char.IsLetterOrDigit (ch) || ch == '_'))
+ break;
+
+ offset = forwardDirection ? offset + 1 : offset - 1;
+ }
+ return System.Math.Min (line.Offset + line.Length,
+ System.Math.Max (line.Offset, offset + (forwardDirection ? 0 : 1)));
+ }
+
+ internal static bool IsNoIdentifierPart (char ch)
+ {
+ return !char.IsWhiteSpace (ch) && !char.IsLetterOrDigit (ch) && ch != '_';
+ }
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
index 332f783..4d131e4 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
using System.Linq;
using Mono.TextEditor.Utils;
using System.Diagnostics;
+using ICSharpCode.NRefactory;
namespace Mono.TextEditor
{
@@ -242,15 +243,11 @@ namespace Mono.TextEditor
char* p = start + offset;
char* endPtr = start + text.Length;
while (p < endPtr) {
- switch (*p) {
- case '\r':
- char* nextp = p + 1;
- if (nextp < endPtr && *nextp == '\n')
- return new Delimiter ((int)(p - start), 2);
- return new Delimiter ((int)(p - start), 1);
- case '\n':
- return new Delimiter ((int)(p - start), 1);
- }
+ char* nextp = p + 1;
+ char nextChar = nextp < endPtr ? *nextp : '\0';
+ var nl = NewLine.GetDelimiterLength (*p, nextChar);
+ if (nl > 0)
+ return new Delimiter ((int)(p - start), nl);
p++;
}
return Delimiter.Invalid;
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
index 286e243..b425a75 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
@@ -327,6 +327,10 @@ namespace Mono.TextEditor
public char GetCharAt (int offset)
{
+ if (offset < 0)
+ throw new ArgumentException ("offset < 0");
+ if (offset >= TextLength)
+ throw new ArgumentException ("offset >= TextLength");
return buffer.GetCharAt (offset);
}
@@ -1529,7 +1533,7 @@ namespace Mono.TextEditor
public static bool IsWordSeparator (char ch)
{
- return Char.IsWhiteSpace (ch) || (Char.IsPunctuation (ch) && ch != '_');
+ return !(char.IsLetterOrDigit (ch) || ch == '_');
}
public bool IsWholeWordAt (int offset, int length)
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/ActionMargin.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/ActionMargin.cs
new file mode 100644
index 0000000..336a2b2
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/ActionMargin.cs
@@ -0,0 +1,128 @@
+//
+// ActionMargin.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.Linq;
+
+namespace Mono.TextEditor
+{
+ public class ActionMargin : Margin
+ {
+ readonly TextEditor editor;
+
+ double marginWidth;
+ public override double Width {
+ get {
+ return marginWidth;
+ }
+ }
+
+ public ActionMargin (TextEditor editor)
+ {
+ if (editor == null)
+ throw new ArgumentNullException ("editor");
+ this.editor = editor;
+ marginWidth = 20;
+ IsVisible = false;
+ this.editor.Caret.PositionChanged += HandlePositionChanged;;
+ }
+
+ void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
+ {
+ if (e.Location.Line == editor.Caret.Line)
+ return;
+ editor.RedrawMarginLine (this, e.Location.Line);
+ editor.RedrawMarginLine (this, editor.Caret.Line);
+ }
+
+ void DrawMarginBackground (Cairo.Context cr, int line, double x, double y, double lineHeight)
+ {
+ if (editor.Caret.Line == line) {
+ editor.TextViewMargin.DrawCaretLineMarker (cr, x, y, Width, lineHeight);
+ return;
+ }
+ cr.Rectangle (x, y, Width, lineHeight);
+ cr.Color = editor.ColorStyle.LineNumbers.Background;
+ cr.Fill ();
+ }
+
+ internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
+ {
+ var marker = lineSegment != null ? (MarginMarker)lineSegment.Markers.FirstOrDefault (m => m is MarginMarker && ((MarginMarker)m).CanDraw (this)) : null;
+ bool drawBackground = true;
+ if (marker != null && marker.CanDrawBackground (this))
+ drawBackground = !marker.DrawBackground (editor, cr, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+
+ if (drawBackground)
+ DrawMarginBackground (cr, line, x, y, lineHeight);
+
+ if (marker != null && marker.CanDrawForeground (this))
+ marker.DrawForeground (editor, cr, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ }
+
+ internal protected override void MousePressed (MarginMouseEventArgs args)
+ {
+ base.MousePressed (args);
+
+ DocumentLine lineSegment = args.LineSegment;
+ if (lineSegment != null) {
+ foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMousePress (editor, this, args);
+ }
+ }
+ }
+
+ internal protected override void MouseReleased (MarginMouseEventArgs args)
+ {
+ base.MouseReleased (args);
+
+ DocumentLine lineSegment = args.LineSegment;
+ if (lineSegment != null) {
+ foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMouseRelease (editor, this, args);
+ }
+ }
+ }
+
+ internal protected override void MouseHover (MarginMouseEventArgs args)
+ {
+ base.MouseHover (args);
+ args.Editor.TooltipText = null;
+ DocumentLine lineSegment = args.LineSegment;
+ if (lineSegment != null) {
+ foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMouseHover (editor, this, args);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/CodeSegmentEditorWindow.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/CodeSegmentEditorWindow.cs
index f670698..b461bc6 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/CodeSegmentEditorWindow.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/CodeSegmentEditorWindow.cs
@@ -83,6 +83,9 @@ namespace Mono.TextEditor
this.Decorated = false;
Gdk.Pointer.Grab (this.GdkWindow, true, Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask, null, null, Gtk.Global.CurrentEventTime);
Gtk.Grab.Add (this);
+ GrabBrokenEvent += delegate {
+ Destroy ();
+ };
codeSegmentEditor.GrabFocus ();
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldMarkerMargin.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldMarkerMargin.cs
index 03ed46c..69e0c56 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldMarkerMargin.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldMarkerMargin.cs
@@ -256,6 +256,8 @@ namespace Mono.TextEditor
StopTimer ();
editor.Document.FoldTreeUpdated -= HandleEditorDocumentFoldTreeUpdated;
layout = layout.Kill ();
+ foldings = null;
+ startFoldings = containingFoldings = endFoldings = null;
}
void DrawFoldSegment (Cairo.Context ctx, double x, double y, bool isOpen, bool isSelected)
@@ -293,6 +295,13 @@ namespace Mono.TextEditor
internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
{
+ var marker = lineSegment != null ? (MarginMarker)lineSegment.Markers.FirstOrDefault (m => m is MarginMarker && ((MarginMarker)m).CanDraw (this)) : null;
+ if (marker != null) {
+ bool hasDrawn = marker.DrawBackground (editor, cr, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ if (!hasDrawn)
+ marker = null;
+ }
+
foldSegmentSize = marginWidth * 4 / 6;
foldSegmentSize -= (foldSegmentSize) % 2;
@@ -330,21 +339,23 @@ namespace Mono.TextEditor
isEndSelected = this.lineHover != null && IsMouseHover (endFoldings);
}
- if (editor.Options.HighlightCaretLine && editor.Caret.Line == line) {
- editor.TextViewMargin.DrawCaretLineMarker (cr, x, y, Width, lineHeight);
- } else {
- var bgGC = foldBgGC;
- if (editor.TextViewMargin.BackgroundRenderer != null) {
- if (isContainingSelected || isStartSelected || isEndSelected) {
- bgGC = foldBgGC;
- } else {
- bgGC = foldLineHighlightedGCBg;
+ if (marker == null) {
+ if (editor.Options.HighlightCaretLine && editor.Caret.Line == line) {
+ editor.TextViewMargin.DrawCaretLineMarker (cr, x, y, Width, lineHeight);
+ } else {
+ var bgGC = foldBgGC;
+ if (editor.TextViewMargin.BackgroundRenderer != null) {
+ if (isContainingSelected || isStartSelected || isEndSelected) {
+ bgGC = foldBgGC;
+ } else {
+ bgGC = foldLineHighlightedGCBg;
+ }
}
+
+ cr.Rectangle (drawArea);
+ cr.Color = bgGC;
+ cr.Fill ();
}
-
- cr.Rectangle (drawArea);
- cr.Color = bgGC;
- cr.Fill ();
}
if (editor.Options.EnableQuickDiff) {
@@ -385,9 +396,7 @@ namespace Mono.TextEditor
if (isContaining || moreLinedOpenFold)
cr.DrawLine (isEndSelected || (isStartSelected && isVisible) || isContainingSelected ? foldLineHighlightedGC : foldLineGC, xPos, foldSegmentYPos + foldSegmentSize + 2, xPos, drawArea.Y + drawArea.Height);
} else {
-
if (isFoldEnd) {
-
double yMid = System.Math.Floor (drawArea.Y + drawArea.Height / 2) + 0.5;
cr.DrawLine (isEndSelected ? foldLineHighlightedGC : foldLineGC, xPos, yMid, x + marginWidth - 2, yMid);
cr.DrawLine (isContainingSelected || isEndSelected ? foldLineHighlightedGC : foldLineGC, xPos, drawArea.Y, xPos, yMid);
@@ -397,7 +406,6 @@ namespace Mono.TextEditor
} else if (isContaining) {
cr.DrawLine (isContainingSelected ? foldLineHighlightedGC : foldLineGC, xPos, drawArea.Y, xPos, drawArea.Y + drawArea.Height);
}
-
}
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
index 3258323..ddf8178 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
@@ -30,6 +30,7 @@ using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
+using Gtk;
namespace Mono.TextEditor
{
@@ -53,17 +54,44 @@ namespace Mono.TextEditor
static extern bool objc_msgSend_bool (IntPtr klass, IntPtr selector);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
- static extern bool objc_msgSend_int_int (IntPtr klass, IntPtr selector, int arg);
+ static extern int objc_msgSend_NSInt32_NSInt32 (IntPtr klass, IntPtr selector, int arg);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
+ static extern long objc_msgSend_NSInt64_NSInt64 (IntPtr klass, IntPtr selector, long arg);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
- static extern int objc_msgSend_int (IntPtr klass, IntPtr selector);
+ static extern uint objc_msgSend_NSUInt32 (IntPtr klass, IntPtr selector);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend")]
+ static extern ulong objc_msgSend_NSUInt64 (IntPtr klass, IntPtr selector);
[DllImport (LIBOBJC, EntryPoint = "objc_msgSend_stret")]
- static extern void objc_msgSend_RectangleF (out RectangleF rect, IntPtr klass, IntPtr selector);
+ static extern void objc_msgSend_CGRect32 (out CGRect32 rect, IntPtr klass, IntPtr selector);
+
+ [DllImport (LIBOBJC, EntryPoint = "objc_msgSend_stret")]
+ static extern void objc_msgSend_CGRect64 (out CGRect64 rect, IntPtr klass, IntPtr selector);
[DllImport ("libgtk-quartz-2.0.dylib")]
static extern IntPtr gdk_quartz_window_get_nswindow (IntPtr window);
+ struct CGRect32
+ {
+ public float X, Y, Width, Height;
+ }
+
+ struct CGRect64
+ {
+ public double X, Y, Width, Height;
+
+ public CGRect64 (CGRect32 rect32)
+ {
+ X = rect32.X;
+ Y = rect32.Y;
+ Width = rect32.Width;
+ Height = rect32.Height;
+ }
+ }
+
static IntPtr cls_NSScreen;
static IntPtr sel_screens, sel_objectEnumerator, sel_nextObject, sel_frame, sel_visibleFrame,
sel_requestUserAttention, sel_setHasShadow, sel_invalidateShadow;
@@ -140,7 +168,6 @@ namespace Mono.TextEditor
IntPtr iter = objc_msgSend_IntPtr (array, sel_objectEnumerator);
Gdk.Rectangle ygeometry = screen.GetMonitorGeometry (monitor);
Gdk.Rectangle xgeometry = screen.GetMonitorGeometry (0);
- RectangleF visible, frame;
IntPtr scrn;
int i = 0;
@@ -149,9 +176,19 @@ namespace Mono.TextEditor
if (scrn == IntPtr.Zero)
return screen.GetMonitorGeometry (monitor);
-
- objc_msgSend_RectangleF (out visible, scrn, sel_visibleFrame);
- objc_msgSend_RectangleF (out frame, scrn, sel_frame);
+
+ CGRect64 visible, frame;
+
+ if (IntPtr.Size == 8) {
+ objc_msgSend_CGRect64 (out visible, scrn, sel_visibleFrame);
+ objc_msgSend_CGRect64 (out frame, scrn, sel_frame);
+ } else {
+ CGRect32 visible32, frame32;
+ objc_msgSend_CGRect32 (out visible32, scrn, sel_visibleFrame);
+ objc_msgSend_CGRect32 (out frame32, scrn, sel_frame);
+ visible = new CGRect64 (visible32);
+ frame = new CGRect64 (frame32);
+ }
// Note: Frame and VisibleFrame rectangles are relative to monitor 0, but we need absolute
// coordinates.
@@ -164,11 +201,11 @@ namespace Mono.TextEditor
//
// We need to swap the Y offset with the menu height because our callers expect the Y offset
// to be from the top of the screen, not from the bottom of the screen.
- float x, y, width, height;
+ double x, y, width, height;
if (visible.Height < frame.Height) {
- float dockHeight = visible.Y - frame.Y;
- float menubarHeight = (frame.Height - visible.Height) - dockHeight;
+ double dockHeight = visible.Y - frame.Y;
+ double menubarHeight = (frame.Height - visible.Height) - dockHeight;
height = frame.Height - menubarHeight - dockHeight;
y = ygeometry.Y + menubarHeight;
@@ -187,7 +224,11 @@ namespace Mono.TextEditor
static void MacRequestAttention (bool critical)
{
int kind = critical? NSCriticalRequest : NSInformationalRequest;
- objc_msgSend_int_int (sharedApp, sel_requestUserAttention, kind);
+ if (IntPtr.Size == 8) {
+ objc_msgSend_NSInt64_NSInt64 (sharedApp, sel_requestUserAttention, kind);
+ } else {
+ objc_msgSend_NSInt32_NSInt32 (sharedApp, sel_requestUserAttention, kind);
+ }
}
// Note: we can't reuse RectangleF because the layout is different...
@@ -328,7 +369,12 @@ namespace Mono.TextEditor
{
if (Platform.IsMac) {
Gdk.ModifierType mtype = Gdk.ModifierType.None;
- int mod = objc_msgSend_int (cls_NSEvent, sel_modifierFlags);
+ ulong mod;
+ if (IntPtr.Size == 8) {
+ mod = objc_msgSend_NSUInt64 (cls_NSEvent, sel_modifierFlags);
+ } else {
+ mod = objc_msgSend_NSUInt32 (cls_NSEvent, sel_modifierFlags);
+ }
if ((mod & (1 << 17)) != 0)
mtype |= Gdk.ModifierType.ShiftMask;
if ((mod & (1 << 18)) != 0)
@@ -400,7 +446,8 @@ namespace Mono.TextEditor
if (parent != null) {
menu.AttachToWidget (parent, null);
menu.Hidden += (sender, e) => {
- menu.Detach ();
+ if (menu.AttachWidget != null)
+ menu.Detach ();
};
posFunc = delegate (Gtk.Menu m, out int x, out int y, out bool pushIn) {
Gdk.Window window = evt != null? evt.Window : parent.GdkWindow;
@@ -973,6 +1020,141 @@ namespace Mono.TextEditor
public string Url { get { return (string)base.Args [0]; } }
}
}
+
+ static bool canSetOverlayScrollbarPolicy = true;
+
+ [DllImport ("libgtk-quartz-2.0.dylib")]
+ static extern void gtk_scrolled_window_set_overlay_policy (IntPtr sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy);
+
+ [DllImport ("libgtk-quartz-2.0.dylib")]
+ static extern void gtk_scrolled_window_get_overlay_policy (IntPtr sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy);
+
+ public static void SetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy)
+ {
+ if (!canSetOverlayScrollbarPolicy) {
+ return;
+ }
+ try {
+ gtk_scrolled_window_set_overlay_policy (sw.Handle, hpolicy, vpolicy);
+ return;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ }
+
+ public static void GetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy)
+ {
+ if (!canSetOverlayScrollbarPolicy) {
+ hpolicy = vpolicy = 0;
+ return;
+ }
+ try {
+ gtk_scrolled_window_get_overlay_policy (sw.Handle, out hpolicy, out vpolicy);
+ return;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ hpolicy = vpolicy = 0;
+ canSetOverlayScrollbarPolicy = false;
+ }
+
+ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern bool gtk_tree_view_get_tooltip_context (IntPtr raw, ref int x, ref int y, bool keyboard_tip, out IntPtr model, out IntPtr path, IntPtr iter);
+
+ //the GTK# version of this has 'out' instead of 'ref', preventing passing the x,y values in
+ public static bool GetTooltipContext (this TreeView tree, ref int x, ref int y, bool keyboardTip,
+ out TreeModel model, out TreePath path, out Gtk.TreeIter iter)
+ {
+ IntPtr intPtr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof(TreeIter)));
+ IntPtr handle;
+ IntPtr intPtr2;
+ bool result = gtk_tree_view_get_tooltip_context (tree.Handle, ref x, ref y, keyboardTip, out handle, out intPtr2, intPtr);
+ model = TreeModelAdapter.GetObject (handle, false);
+ path = intPtr2 == IntPtr.Zero ? null : ((TreePath)GLib.Opaque.GetOpaque (intPtr2, typeof(TreePath), false));
+ iter = TreeIter.New (intPtr);
+ Marshal.FreeHGlobal (intPtr);
+ return result;
+ }
+
+ static bool supportsHiResIcons = false; // Disabled for now
+
+ [DllImport ("libgtk-quartz-2.0.dylib")]
+ static extern void gtk_icon_source_set_scale (IntPtr source, double scale);
+
+ [DllImport ("libgtk-quartz-2.0.dylib")]
+ static extern void gtk_icon_source_set_scale_wildcarded (IntPtr source, bool setting);
+
+ [DllImport (PangoUtil.LIBGTK)]
+ static extern double gtk_widget_get_scale_factor (IntPtr widget);
+
+ [DllImport (PangoUtil.LIBGOBJECT)]
+ static extern IntPtr g_object_get_data (IntPtr source, string name);
+
+ public static bool SetSourceScale (Gtk.IconSource source, double scale)
+ {
+ if (!supportsHiResIcons)
+ return false;
+
+ try {
+ gtk_icon_source_set_scale (source.Handle, scale);
+ return true;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return false;
+ }
+
+ public static bool SetSourceScaleWildcarded (Gtk.IconSource source, bool setting)
+ {
+ if (!supportsHiResIcons)
+ return false;
+
+ try {
+ gtk_icon_source_set_scale_wildcarded (source.Handle, setting);
+ return true;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return false;
+ }
+
+ public static Gdk.Pixbuf Get2xVariant (Gdk.Pixbuf px)
+ {
+ if (!supportsHiResIcons)
+ return null;
+
+ try {
+ IntPtr res = g_object_get_data (px.Handle, "gdk-pixbuf-2x-variant");
+ if (res != IntPtr.Zero && res != px.Handle)
+ return (Gdk.Pixbuf) GLib.Object.GetObject (res);
+ else
+ return null;
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return null;
+ }
+
+ public static void Set2xVariant (Gdk.Pixbuf px, Gdk.Pixbuf variant2x)
+ {
+ }
+
+ public static double GetScaleFactor (Gtk.Widget w)
+ {
+ if (!supportsHiResIcons)
+ return 1;
+
+ try {
+ return gtk_widget_get_scale_factor (w.Handle);
+ } catch (DllNotFoundException) {
+ } catch (EntryPointNotFoundException) {
+ }
+ supportsHiResIcons = false;
+ return 1;
+ }
}
public struct KeyboardShortcut : IEquatable<KeyboardShortcut>
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GutterMargin.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GutterMargin.cs
index 813b673..b660d68 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GutterMargin.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GutterMargin.cs
@@ -209,21 +209,33 @@ namespace Mono.TextEditor
CalculateWidth ();
}
- internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
+ void DrawGutterBackground (Cairo.Context cr, int line, double x, double y, double lineHeight)
{
- var gutterMarker = lineSegment != null ? (IGutterMarker)lineSegment.Markers.FirstOrDefault (marker => marker is IGutterMarker) : null;
- if (gutterMarker != null) {
- gutterMarker.DrawLineNumber (editor, Width, cr, area, lineSegment, line, x, y, lineHeight);
- return;
- }
if (editor.Caret.Line == line) {
editor.TextViewMargin.DrawCaretLineMarker (cr, x, y, Width, lineHeight);
+ return;
+ }
+ cr.Rectangle (x, y, Width, lineHeight);
+ cr.Color = lineNumberBgGC;
+ cr.Fill ();
+ }
+
+ internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
+ {
+ var gutterMarker = lineSegment != null ? (MarginMarker)lineSegment.Markers.FirstOrDefault (marker => marker is MarginMarker && ((MarginMarker)marker).CanDraw (this)) : null;
+ if (gutterMarker != null && gutterMarker.CanDrawBackground (this)) {
+ bool hasDrawn = gutterMarker.DrawBackground (editor, cr, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ if (!hasDrawn)
+ DrawGutterBackground (cr, line, x, y, lineHeight);
} else {
- cr.Rectangle (x, y, Width, lineHeight);
- cr.Color = lineNumberBgGC;
- cr.Fill ();
+ DrawGutterBackground (cr, line, x, y, lineHeight);
}
-
+
+ if (gutterMarker != null && gutterMarker.CanDrawForeground (this)) {
+ gutterMarker.DrawForeground (editor, cr, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ return;
+ }
+
if (line <= editor.Document.LineCount) {
// Due to a mac? gtk bug I need to re-create the layout here
// otherwise I get pango exceptions.
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
index 1087187..a1b735c 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
@@ -75,6 +75,10 @@ namespace Mono.TextEditor
DocumentLine lineSegment = args.LineSegment;
if (lineSegment != null) {
foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMousePress (editor, this, args);
+
if (marker is IIconBarMarker)
((IIconBarMarker)marker).MousePress (args);
}
@@ -88,6 +92,10 @@ namespace Mono.TextEditor
DocumentLine lineSegment = args.LineSegment;
if (lineSegment != null) {
foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMouseRelease (editor, this, args);
+
if (marker is IIconBarMarker)
((IIconBarMarker)marker).MouseRelease (args);
}
@@ -101,6 +109,9 @@ namespace Mono.TextEditor
DocumentLine lineSegment = args.LineSegment;
if (lineSegment != null) {
foreach (TextLineMarker marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null)
+ marginMarker.InformMouseHover (editor, this, args);
if (marker is IIconBarMarker)
((IIconBarMarker)marker).MouseHover (args);
}
@@ -109,17 +120,41 @@ namespace Mono.TextEditor
internal protected override void Draw (Cairo.Context ctx, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
{
- ctx.Rectangle (x, y, Width, lineHeight);
- ctx.Color = backgroundColor;
- ctx.Fill ();
-
- ctx.MoveTo (x + Width - 0.5, y);
- ctx.LineTo (x + Width - 0.5, y + lineHeight);
- ctx.Color = separatorColor;
- ctx.Stroke ();
-
+ bool backgroundIsDrawn = false;
+ if (lineSegment != null) {
+ foreach (var marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null && marginMarker.CanDrawBackground (this)) {
+ backgroundIsDrawn = marginMarker.DrawBackground (editor, ctx, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ }
+
+ var iconMarker = marker as IIconBarMarker;
+ if (iconMarker == null || !iconMarker.CanDrawBackground)
+ continue;
+ iconMarker.DrawBackground (editor, ctx, lineSegment, line, x, y, (int)Width, editor.LineHeight);
+ backgroundIsDrawn = true;
+ break;
+ }
+ }
+
+ if (!backgroundIsDrawn) {
+ ctx.Rectangle (x, y, Width, lineHeight);
+ ctx.Color = backgroundColor;
+ ctx.Fill ();
+
+ ctx.MoveTo (x + Width - 0.5, y);
+ ctx.LineTo (x + Width - 0.5, y + lineHeight);
+ ctx.Color = separatorColor;
+ ctx.Stroke ();
+ }
+
if (lineSegment != null && line <= editor.Document.LineCount) {
- foreach (TextLineMarker marker in lineSegment.Markers) {
+ foreach (var marker in lineSegment.Markers) {
+ var marginMarker = marker as MarginMarker;
+ if (marginMarker != null && marginMarker.CanDrawForeground (this)) {
+ marginMarker.DrawForeground (editor, ctx, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
+ }
+
if (marker is IIconBarMarker)
((IIconBarMarker)marker).DrawIcon (editor, ctx, lineSegment, line, x, y, (int)Width, editor.LineHeight);
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/PangoUtil.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/PangoUtil.cs
index 3918d02..f6a74bd 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/PangoUtil.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/PangoUtil.cs
@@ -120,6 +120,42 @@ namespace Mono.TextEditor
}
pango_attr_list_insert (list, attribute);
}
+
+ /// <summary>
+ /// Like Splice, except it only offsets/clamps the inserted items, doesn't affect items already in the list.
+ /// </summary>
+ public void InsertOffsetList (Pango.AttrList atts, uint startOffset, uint endOffset)
+ {
+ //HACK: atts.Iterator.Attrs broken (throws NRE), so manually P/Invoke
+ var iter = pango_attr_list_get_iterator (atts.Handle);
+ try {
+ do {
+ IntPtr list = pango_attr_iterator_get_attrs (iter);
+ try {
+ int len = g_slist_length (list);
+ for (uint i = 0; i < len; i++) {
+ IntPtr val = g_slist_nth_data (list, i);
+ AddOffsetCopy (val, startOffset, endOffset);
+ }
+ } finally {
+ g_slist_free (list);
+ }
+ } while (pango_attr_iterator_next (iter));
+ } finally {
+ pango_attr_iterator_destroy (iter);
+ }
+ }
+
+ void AddOffsetCopy (IntPtr attr, uint startOffset, uint endOffset)
+ {
+ var copy = pango_attribute_copy (attr);
+ unsafe {
+ PangoAttribute *attPtr = (PangoAttribute *) copy;
+ attPtr->start_index = startOffset + attPtr->start_index;
+ attPtr->end_index = System.Math.Min (endOffset, startOffset + attPtr->end_index);
+ }
+ pango_attr_list_insert (list, copy);
+ }
[DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr pango_attr_style_new (Pango.Style style);
@@ -153,7 +189,31 @@ namespace Mono.TextEditor
[DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
static extern void pango_attr_list_splice (IntPtr attr_list, IntPtr other, Int32 pos, Int32 len);
+
+ [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attribute_copy (IntPtr attr);
+
+ [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_list_get_iterator (IntPtr list);
+ [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern bool pango_attr_iterator_next (IntPtr iterator);
+
+ [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern void pango_attr_iterator_destroy (IntPtr iterator);
+
+ [DllImport (PangoUtil.LIBPANGO, CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr pango_attr_iterator_get_attrs (IntPtr iterator);
+
+ [DllImport (PangoUtil.LIBGLIB, CallingConvention = CallingConvention.Cdecl)]
+ private static extern int g_slist_length (IntPtr l);
+
+ [DllImport (PangoUtil.LIBGLIB, CallingConvention = CallingConvention.Cdecl)]
+ private static extern IntPtr g_slist_nth_data (IntPtr l, uint n);
+
+ [DllImport (PangoUtil.LIBGLIB, CallingConvention = CallingConvention.Cdecl)]
+ private static extern void g_slist_free (IntPtr l);
+
public void Splice (Pango.AttrList attrs, int pos, int len)
{
pango_attr_list_splice (list, attrs.Handle, pos, len);
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
index 75311f6..fb622eb 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
@@ -49,8 +49,8 @@ namespace Mono.TextEditor
TextEditorData textEditorData;
protected IconMargin iconMargin;
+ protected ActionMargin actionMargin;
protected GutterMargin gutterMargin;
-// protected DashedLineMargin dashedLineMargin;
protected FoldMarkerMargin foldMarkerMargin;
protected TextViewMargin textViewMargin;
@@ -323,15 +323,15 @@ namespace Mono.TextEditor
iconMargin = new IconMargin (editor);
gutterMargin = new GutterMargin (editor);
-// dashedLineMargin = new DashedLineMargin (this);
+ actionMargin = new ActionMargin (editor);
foldMarkerMargin = new FoldMarkerMargin (editor);
textViewMargin = new TextViewMargin (editor);
margins.Add (iconMargin);
margins.Add (gutterMargin);
+ margins.Add (actionMargin);
margins.Add (foldMarkerMargin);
-// margins.Add (dashedLineMargin);
-
+
margins.Add (textViewMargin);
this.textEditorData.SelectionChanged += TextEditorDataSelectionChanged;
this.textEditorData.UpdateAdjustmentsRequested += TextEditorDatahandleUpdateAdjustmentsRequested;
@@ -423,17 +423,17 @@ namespace Mono.TextEditor
window.ShowAll ();
}
- internal int preeditOffset, preeditLine, preeditCursorCharIndex;
+ internal int preeditOffset = -1, preeditLine, preeditCursorCharIndex;
internal string preeditString;
internal Pango.AttrList preeditAttrs;
internal bool preeditHeightChange;
- internal bool ContainsPreedit (int line, int length)
+ internal bool ContainsPreedit (int offset, int length)
{
if (string.IsNullOrEmpty (preeditString))
return false;
- return line <= preeditOffset && preeditOffset <= line + length;
+ return offset <= preeditOffset && preeditOffset <= offset + length;
}
void PreeditStringChanged (object sender, EventArgs e)
@@ -444,31 +444,41 @@ namespace Mono.TextEditor
preeditOffset = Caret.Offset;
preeditLine = Caret.Line;
}
+ if (UpdatePreeditLineHeight ())
+ QueueDraw ();
+ } else {
+ preeditOffset = -1;
+ preeditString = null;
+ preeditAttrs = null;
+ preeditCursorCharIndex = 0;
+ if (UpdatePreeditLineHeight ())
+ QueueDraw ();
+ }
+ this.textViewMargin.ForceInvalidateLine (preeditLine);
+ this.textEditorData.Document.CommitLineUpdate (preeditLine);
+ }
+
+ internal bool UpdatePreeditLineHeight ()
+ {
+ if (!string.IsNullOrEmpty (preeditString)) {
using (var preeditLayout = PangoUtil.CreateLayout (this)) {
preeditLayout.SetText (preeditString);
preeditLayout.Attributes = preeditAttrs;
int w, h;
preeditLayout.GetSize (out w, out h);
var calcHeight = System.Math.Ceiling (h / Pango.Scale.PangoScale);
- if (LineHeight != calcHeight) {
+ if (LineHeight < calcHeight) {
textEditorData.HeightTree.SetLineHeight (preeditLine, calcHeight);
preeditHeightChange = true;
- QueueDraw ();
+ return true;
}
}
- } else {
- preeditOffset = -1;
- preeditString = null;
- preeditAttrs = null;
- preeditCursorCharIndex = 0;
- if (preeditHeightChange) {
- preeditHeightChange = false;
- textEditorData.HeightTree.Rebuild ();
- QueueDraw ();
- }
+ } else if (preeditHeightChange) {
+ preeditHeightChange = false;
+ textEditorData.HeightTree.Rebuild ();
+ return true;
}
- this.textViewMargin.ForceInvalidateLine (preeditLine);
- this.textEditorData.Document.CommitLineUpdate (preeditLine);
+ return false;
}
void CaretPositionChanged (object sender, DocumentLocationEventArgs args)
@@ -777,6 +787,7 @@ namespace Mono.TextEditor
this.textEditorData.SelectionChanged -= TextEditorDataSelectionChanged;
this.textEditorData.Dispose ();
+ longestLine = null;
base.OnDestroyed ();
}
@@ -1102,8 +1113,11 @@ namespace Mono.TextEditor
ResetMouseState ();
return base.OnButtonReleaseEvent (e);
}
-
- protected void ResetMouseState ()
+
+ /// <summary>
+ /// Use this method with care.
+ /// </summary>
+ public void ResetMouseState ()
{
mouseButtonPressed = 0;
textViewMargin.inDrag = false;
@@ -1149,38 +1163,38 @@ namespace Mono.TextEditor
protected override void OnDragDataReceived (DragContext context, int x, int y, SelectionData selection_data, uint info, uint time_)
{
- using (var undo = OpenUndoGroup ()) {
- int dragOffset = Document.LocationToOffset (dragCaretPos);
- if (context.Action == DragAction.Move) {
- if (CanEdit (Caret.Line) && !selection.IsEmpty) {
- var selectionRange = selection.GetSelectionRange (textEditorData);
- if (selectionRange.Offset < dragOffset)
- dragOffset -= selectionRange.Length;
- Caret.PreserveSelection = true;
- textEditorData.DeleteSelection (selection);
- Caret.PreserveSelection = false;
-
- selection = Selection.Empty;
- }
+ var undo = OpenUndoGroup ();
+ int dragOffset = Document.LocationToOffset (dragCaretPos);
+ if (context.Action == DragAction.Move) {
+ if (CanEdit (Caret.Line) && !selection.IsEmpty) {
+ var selectionRange = selection.GetSelectionRange (textEditorData);
+ if (selectionRange.Offset < dragOffset)
+ dragOffset -= selectionRange.Length;
+ Caret.PreserveSelection = true;
+ textEditorData.DeleteSelection (selection);
+ Caret.PreserveSelection = false;
+
+ selection = Selection.Empty;
}
- if (selection_data.Length > 0 && selection_data.Format == 8) {
- Caret.Offset = dragOffset;
- if (CanEdit (dragCaretPos.Line)) {
- int offset = Caret.Offset;
- if (!selection.IsEmpty && selection.GetSelectionRange (textEditorData).Offset >= offset) {
- var start = Document.OffsetToLocation (selection.GetSelectionRange (textEditorData).Offset + selection_data.Text.Length);
- var end = Document.OffsetToLocation (selection.GetSelectionRange (textEditorData).Offset + selection_data.Text.Length + selection.GetSelectionRange (textEditorData).Length);
- selection = new Selection (start, end);
- }
- textEditorData.PasteText (offset, selection_data.Text, null);
- Caret.Offset = offset + selection_data.Text.Length;
- MainSelection = new Selection (Document.OffsetToLocation (offset), Document.OffsetToLocation (offset + selection_data.Text.Length));
+ }
+ if (selection_data.Length > 0 && selection_data.Format == 8) {
+ Caret.Offset = dragOffset;
+ if (CanEdit (dragCaretPos.Line)) {
+ int offset = Caret.Offset;
+ if (!selection.IsEmpty && selection.GetSelectionRange (textEditorData).Offset >= offset) {
+ var start = Document.OffsetToLocation (selection.GetSelectionRange (textEditorData).Offset + selection_data.Text.Length);
+ var end = Document.OffsetToLocation (selection.GetSelectionRange (textEditorData).Offset + selection_data.Text.Length + selection.GetSelectionRange (textEditorData).Length);
+ selection = new Selection (start, end);
}
- dragOver = false;
- context = null;
+ textEditorData.PasteText (offset, selection_data.Text, null, ref undo);
+ Caret.Offset = offset + selection_data.Text.Length;
+ MainSelection = new Selection (Document.OffsetToLocation (offset), Document.OffsetToLocation (offset + selection_data.Text.Length));
}
- mouseButtonPressed = 0;
+ dragOver = false;
+ context = null;
}
+ mouseButtonPressed = 0;
+ undo.Dispose ();
base.OnDragDataReceived (context, x, y, selection_data, info, time_);
}
@@ -1391,6 +1405,10 @@ namespace Mono.TextEditor
public Margin IconMargin {
get { return iconMargin; }
}
+
+ public ActionMargin ActionMargin {
+ get { return actionMargin; }
+ }
public DocumentLocation LogicalToVisualLocation (DocumentLocation location)
{
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
index 90dd4c8..a031ffd 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
@@ -441,6 +441,12 @@ namespace Mono.TextEditor
}
}
+ public ActionMargin ActionMargin {
+ get {
+ return textArea.ActionMargin;
+ }
+ }
+
public Margin IconMargin {
get { return textArea.IconMargin; }
}
@@ -583,14 +589,19 @@ namespace Mono.TextEditor
}
}
+ internal bool UpdatePreeditLineHeight ()
+ {
+ return textArea.UpdatePreeditLineHeight ();
+ }
+
internal void ResetIMContext ()
{
textArea.ResetIMContext ();
}
- internal bool ContainsPreedit (int line, int length)
+ internal bool ContainsPreedit (int offset, int length)
{
- return textArea.ContainsPreedit (line, length);
+ return textArea.ContainsPreedit (offset, length);
}
internal void FireLinkEvent (string link, uint button, ModifierType modifierState)
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
index 478cabe..be0a46d 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
@@ -36,6 +36,7 @@ using Mono.TextEditor.Highlighting;
using Gdk;
using Gtk;
using System.Timers;
+using ICSharpCode.NRefactory;
namespace Mono.TextEditor
{
@@ -44,7 +45,11 @@ namespace Mono.TextEditor
readonly TextEditor textEditor;
Pango.TabArray tabArray;
Pango.Layout markerLayout, defaultLayout;
- Pango.Layout macEolLayout, unixEolLayout, windowsEolLayout, eofEolLayout;
+ Pango.Layout eofEolLayout;
+ Pango.Rectangle eofEolLayoutRect;
+ Pango.Layout[] eolMarkerLayout;
+ Pango.Rectangle[] eolMarkerLayoutRect;
+
internal double charWidth;
int highlightBracketOffset = -1;
@@ -428,10 +433,37 @@ namespace Mono.TextEditor
highlightBracketWorker = null;
}
- Pango.Rectangle unixEolLayoutRect;
- Pango.Rectangle macEolLayoutRect;
- Pango.Rectangle windowsEolLayoutRect;
- Pango.Rectangle eofEolLayoutRect;
+ static readonly string[] markerTexts = {
+ "\\n",
+ "\\r",
+ "\\r\\n",
+ "<NEL>",
+ "<VT>",
+ "<FF>",
+ "<LS>",
+ "<PS>"
+ };
+
+ static int GetEolMarkerIndex (char ch)
+ {
+ switch (ch) {
+ case NewLine.LF:
+ return 0;
+ case NewLine.CR:
+ return 1;
+ case NewLine.NEL:
+ return 3;
+ case NewLine.VT:
+ return 4;
+ case NewLine.FF:
+ return 5;
+ case NewLine.LS:
+ return 6;
+ case NewLine.PS:
+ return 7;
+ }
+ return 0;
+ }
protected internal override void OptionsChanged ()
{
@@ -443,13 +475,6 @@ namespace Mono.TextEditor
markerLayout.FontDescription.Weight = Pango.Weight.Normal;
markerLayout.FontDescription.Style = Pango.Style.Normal;
- if (textEditor.preeditString != null && textEditor.preeditAttrs != null) {
- using (var preeditLayout = PangoUtil.CreateLayout (textEditor)) {
- preeditLayout.SetText (textEditor.preeditString);
- preeditLayout.Attributes = textEditor.preeditAttrs;
- }
- }
-
defaultLayout.FontDescription = textEditor.Options.Font;
using (var metrics = textEditor.PangoContext.GetMetrics (textEditor.Options.Font, textEditor.PangoContext.Language)) {
this.textEditor.GetTextEditorData ().LineHeight = System.Math.Ceiling (0.5 + (metrics.Ascent + metrics.Descent) / Pango.Scale.PangoScale);
@@ -463,27 +488,31 @@ namespace Mono.TextEditor
textEditor.LineHeight = System.Math.Max (1, LineHeight);
- if (unixEolLayout == null) {
- unixEolLayout = PangoUtil.CreateLayout (textEditor);
- macEolLayout = PangoUtil.CreateLayout (textEditor);
- windowsEolLayout = PangoUtil.CreateLayout (textEditor);
+ if (eolMarkerLayout == null) {
+ eolMarkerLayout = new Pango.Layout[8];
+ eolMarkerLayoutRect = new Pango.Rectangle[8];
+ for (int i = 0; i < eolMarkerLayout.Length; i++)
+ eolMarkerLayout[i] = PangoUtil.CreateLayout (textEditor);
eofEolLayout = PangoUtil.CreateLayout (textEditor);
}
var font = textEditor.Options.Font.Copy ();
font.Size = font.Size * 3 / 4;
- unixEolLayout.FontDescription = macEolLayout.FontDescription = windowsEolLayout.FontDescription = eofEolLayout.FontDescription = font;
- unixEolLayout.SetText ("\\n");
Pango.Rectangle logRect;
- unixEolLayout.GetPixelExtents (out logRect, out unixEolLayoutRect);
+ for (int i = 0; i < eolMarkerLayout.Length; i++) {
+ var layout = eolMarkerLayout [i];
+ layout.FontDescription = font;
- macEolLayout.SetText ("\\r");
- macEolLayout.GetPixelExtents (out logRect, out macEolLayoutRect);
+ layout.SetText (markerTexts [i]);
+
+ Pango.Rectangle tRect;
+ layout.GetPixelExtents (out logRect, out tRect);
+ eolMarkerLayoutRect [i] = tRect;
+ }
- windowsEolLayout.SetText ("\\r\\n");
- windowsEolLayout.GetPixelExtents (out logRect, out windowsEolLayoutRect);
+ eofEolLayout.FontDescription = font;
eofEolLayout.SetText ("<EOF>");
eofEolLayout.GetPixelExtents (out logRect, out eofEolLayoutRect);
@@ -505,6 +534,8 @@ namespace Mono.TextEditor
tabArray = new Pango.TabArray (1, false);
tabArray.SetTab (0, Pango.TabAlign.Left, tabWidth);
+ textEditor.UpdatePreeditLineHeight ();
+
DisposeLayoutDict ();
chunkDict.Clear ();
caretX = caretY = -LineHeight;
@@ -544,10 +575,10 @@ namespace Mono.TextEditor
if (defaultLayout!= null)
defaultLayout.Dispose ();
- if (unixEolLayout != null) {
- macEolLayout.Dispose ();
- unixEolLayout.Dispose ();
- windowsEolLayout.Dispose ();
+ if (eolMarkerLayout != null) {
+ foreach (var marker in eolMarkerLayout)
+ marker.Dispose ();
+ eolMarkerLayout = null;
eofEolLayout.Dispose ();
}
@@ -607,8 +638,7 @@ namespace Mono.TextEditor
}
#endregion
- internal double caretX;
- internal double caretY;
+ internal double caretX, caretY, nonPreeditX, nonPreeditY;
public Cairo.PointD CaretVisualLocation {
get {
@@ -616,19 +646,19 @@ namespace Mono.TextEditor
}
}
- void SetVisibleCaretPosition (double x, double y)
+ void SetVisibleCaretPosition (double x, double y, double nonPreeditX, double nonPreeditY)
{
- if (x == caretX && y == caretY)
+ if (x == caretX && y == caretY && this.nonPreeditX == nonPreeditX && this.nonPreeditY == nonPreeditY)
return;
caretX = x;
caretY = y;
-
- textEditor.ResetIMContext ();
-
+ this.nonPreeditX = nonPreeditX;
+ this.nonPreeditY = nonPreeditY;
+
GtkWorkarounds.SetImCursorLocation (
textEditor.IMContext,
textEditor.GdkWindow,
- new Rectangle ((int)caretX, (int)caretY, 0, (int)(LineHeight - 1)));
+ new Rectangle ((int)nonPreeditX, (int)nonPreeditY, 0, (int)(LineHeight - 1)));
}
public static Gdk.Rectangle EmptyRectangle = new Gdk.Rectangle (0, 0, 0, 0);
@@ -901,7 +931,11 @@ namespace Mono.TextEditor
uint preeditLength = 0;
if (containsPreedit) {
- lineText = lineText.Insert (textEditor.preeditOffset - offset, textEditor.preeditString);
+ if (textEditor.GetTextEditorData ().IsCaretInVirtualLocation) {
+ lineText = textEditor.GetTextEditorData ().GetIndentationString (textEditor.Caret.Location) + textEditor.preeditString;
+ } else {
+ lineText = lineText.Insert (textEditor.preeditOffset - offset, textEditor.preeditString);
+ }
preeditLength = (uint)textEditor.preeditString.Length;
}
char[] lineChars = lineText.ToCharArray ();
@@ -992,7 +1026,18 @@ namespace Mono.TextEditor
if (containsPreedit) {
var si = TranslateToUTF8Index (lineChars, (uint)(textEditor.preeditOffset - offset), ref curIndex, ref byteIndex);
var ei = TranslateToUTF8Index (lineChars, (uint)(textEditor.preeditOffset - offset + preeditLength), ref curIndex, ref byteIndex);
- atts.Splice (textEditor.preeditAttrs, (int)si, (int)(ei - si));
+
+ if (textEditor.GetTextEditorData ().IsCaretInVirtualLocation) {
+ uint len = (uint)textEditor.GetTextEditorData ().GetIndentationString (textEditor.Caret.Location).Length;
+ si += len;
+ ei += len;
+ }
+
+ atts.AddForegroundAttribute ((HslColor)ColorStyle.PlainText.Foreground, si, ei);
+ var hasBackground = wrapper.BackgroundColors.Any (bg => bg.FromIdx <= si && bg.ToIdx >= ei);
+ if (hasBackground)
+ atts.AddBackgroundAttribute ((HslColor)ColorStyle.PlainText.Background, si, ei);
+ atts.InsertOffsetList (textEditor.preeditAttrs, si, ei);
}
wrapper.LineChars = lineChars;
wrapper.Layout.SetText (lineText);
@@ -1261,6 +1306,11 @@ namespace Mono.TextEditor
backgroundColors = new List<BackgroundColor> ();
BackgroundColors.Add (new BackgroundColor (color, fromIdx, toIdx));
}
+
+ public uint TranslateToUTF8Index (uint textIndex, ref uint curIndex, ref uint byteIndex)
+ {
+ return TextViewMargin.TranslateToUTF8Index (LineChars, textIndex, ref curIndex, ref byteIndex);
+ }
}
ChunkStyle selectionColor;
@@ -1474,12 +1524,38 @@ namespace Mono.TextEditor
bool drawBg = true;
bool drawText = true;
+
+ LineMetrics metrics = new LineMetrics {
+ LineSegment = line,
+ Layout = layout,
+
+ SelectionStart = selectionStart,
+ SelectionEnd = selectionEnd,
+
+ TextStartOffset = offset,
+ TextEndOffset = offset + length,
+
+ TextRenderStartPosition = xPos,
+ TextRenderEndPosition = xPos + width,
+
+ LineHeight = _lineHeight,
+ WholeLineWidth = textEditor.Allocation.Width - xPos
+ };
+
foreach (TextLineMarker marker in line.Markers) {
- IBackgroundMarker bgMarker = marker as IBackgroundMarker;
- if (bgMarker == null || !marker.IsVisible)
+ if (!marker.IsVisible)
+ continue;
+
+ if (marker.DrawBackground (textEditor, cr, y, metrics)) {
+ isSelectionDrawn |= (marker.Flags & TextLineMarkerFlags.DrawsSelection) == TextLineMarkerFlags.DrawsSelection;
+ }
+
+ var bgMarker = marker as IBackgroundMarker;
+ if (bgMarker != null) {
+ isSelectionDrawn |= (marker.Flags & TextLineMarkerFlags.DrawsSelection) == TextLineMarkerFlags.DrawsSelection;
+ drawText &= bgMarker.DrawBackground (textEditor, cr, metrics.Layout, metrics.SelectionStart, metrics.SelectionEnd, metrics.TextStartOffset, metrics.TextEndOffset, y, metrics.TextRenderStartPosition, metrics.TextRenderEndPosition, ref drawBg);
continue;
- isSelectionDrawn |= (marker.Flags & TextLineMarkerFlags.DrawsSelection) == TextLineMarkerFlags.DrawsSelection;
- drawText &= bgMarker.DrawBackground (textEditor, cr, layout, selectionStart, selectionEnd, offset, offset + length, y, xPos, xPos + width, ref drawBg);
+ }
}
if (DecorateLineBg != null)
@@ -1561,6 +1637,10 @@ namespace Mono.TextEditor
}
if (Caret.Column > line.Length + 1 + virtualSpace.Length)
virtualSpace += new string (' ', Caret.Column - line.Length - 1 - virtualSpace.Length);
+
+ // predit layout already contains virtual space.
+ if (!string.IsNullOrEmpty (textEditor.preeditString))
+ virtualSpace = "";
LayoutWrapper wrapper = new LayoutWrapper (PangoUtil.CreateLayout (textEditor));
wrapper.LineChars = virtualSpace.ToCharArray ();
wrapper.Layout.SetText (virtualSpace);
@@ -1569,7 +1649,8 @@ namespace Mono.TextEditor
int vy, vx;
wrapper.Layout.GetSize (out vx, out vy);
- SetVisibleCaretPosition (((pangoPosition + vx + layout.PangoWidth) / Pango.Scale.PangoScale), y);
+ var x = ((pangoPosition + vx + layout.PangoWidth) / Pango.Scale.PangoScale);
+ SetVisibleCaretPosition (x, y, x, y);
xPos = (pangoPosition + layout.PangoWidth) / Pango.Scale.PangoScale;
if (!isSelectionDrawn && (selectionEnd == lineOffset + line.Length) && BackgroundRenderer == null) {
@@ -1601,28 +1682,33 @@ namespace Mono.TextEditor
wrapper.Dispose ();
pangoPosition += vx;
- } else if (index == length && textEditor.preeditString == null) {
- SetVisibleCaretPosition ((pangoPosition + layout.PangoWidth) / Pango.Scale.PangoScale, y);
+ } else if (index == length && string.IsNullOrEmpty (textEditor.preeditString)) {
+ var x = (pangoPosition + layout.PangoWidth) / Pango.Scale.PangoScale;
+ SetVisibleCaretPosition (x, y, x, y);
} else if (index >= 0 && index <= length) {
Pango.Rectangle strong_pos, weak_pos;
curIndex = byteIndex = 0;
int utf8ByteIndex = (int)TranslateToUTF8Index (layout.LineChars, (uint)index, ref curIndex, ref byteIndex);
- if (textEditor.preeditString != null && textEditor.preeditCursorCharIndex > 0) {
- curIndex = byteIndex = 0;
- int preeditUtf8ByteIndex = (int)TranslateToUTF8Index (textEditor.preeditString.ToCharArray (),
- (uint)textEditor.preeditCursorCharIndex,
- ref curIndex, ref byteIndex);
- utf8ByteIndex += preeditUtf8ByteIndex;
- }
layout.Layout.GetCursorPos (utf8ByteIndex, out strong_pos, out weak_pos);
- SetVisibleCaretPosition (xPos + (strong_pos.X / Pango.Scale.PangoScale), y + (strong_pos.Y / Pango.Scale.PangoScale));
+ var cx = xPos + (strong_pos.X / Pango.Scale.PangoScale);
+ var cy = y + (strong_pos.Y / Pango.Scale.PangoScale);
+ if (textEditor.preeditCursorCharIndex == 0) {
+ SetVisibleCaretPosition (cx, cy, cx, cy);
+ } else {
+ var preeditIndex = (uint)(index + textEditor.preeditCursorCharIndex);
+ utf8ByteIndex = (int)TranslateToUTF8Index (layout.LineChars, preeditIndex, ref curIndex, ref byteIndex);
+ layout.Layout.GetCursorPos (utf8ByteIndex, out strong_pos, out weak_pos);
+ var pcx = xPos + (strong_pos.X / Pango.Scale.PangoScale);
+ var pcy = y + (strong_pos.Y / Pango.Scale.PangoScale);
+ SetVisibleCaretPosition (pcx, pcy, cx, cy);
+ }
}
}
}
foreach (TextLineMarker marker in line.Markers.Where (m => m.IsVisible)) {
if (layout.Layout != null)
- marker.Draw (textEditor, cr, layout.Layout, false, /*selected*/offset, offset + length, y, xPos, xPos + width);
+ marker.Draw (textEditor, cr, y, metrics);
}
foreach (var marker in Document.GetTextSegmentMarkersAt (line).Where (m => m.IsVisible)) {
@@ -1682,17 +1768,13 @@ namespace Mono.TextEditor
rect = eofEolLayoutRect;
break;
case 1:
- if (Document.GetCharAt (line.Offset + line.Length) == '\n') {
- layout = unixEolLayout;
- rect = unixEolLayoutRect;
- } else {
- layout = macEolLayout;
- rect = macEolLayoutRect;
- }
+ var eolIndex = GetEolMarkerIndex (Document.GetCharAt (line.Offset + line.Length));
+ layout = eolMarkerLayout[eolIndex];
+ rect = eolMarkerLayoutRect[eolIndex];
break;
case 2:
- layout = windowsEolLayout;
- rect = windowsEolLayoutRect;
+ layout = eolMarkerLayout[2];
+ rect = eolMarkerLayoutRect[2];
break;
default:
throw new InvalidOperationException (); // other line endings are not known.
@@ -2052,6 +2134,27 @@ namespace Mono.TextEditor
handler (this, e);
}
+
+ static int ScanWord (TextDocument doc, int offset, bool forwardDirection)
+ {
+ if (offset < 0 || offset >= doc.TextLength)
+ return offset;
+ var line = doc.GetLineByOffset (offset);
+ char first = doc.GetCharAt (offset);
+ if (char.IsPunctuation (first))
+ return forwardDirection ? System.Math.Min (line.Offset + line.Length, offset + 1) : System.Math.Max (line.Offset, offset - 1);
+ while (offset >= line.Offset && offset < line.Offset + line.Length) {
+ char ch = doc.GetCharAt (offset);
+ if (char.IsWhiteSpace (first) && !char.IsWhiteSpace (ch)
+ || WordFindStrategy.IsNoIdentifierPart (first) && !WordFindStrategy.IsNoIdentifierPart (ch)
+ || (char.IsLetterOrDigit (first) || first == '_') && !(char.IsLetterOrDigit (ch) || ch == '_'))
+ break;
+ offset = forwardDirection ? offset + 1 : offset - 1;
+ }
+ return System.Math.Min (line.Offset + line.Length,
+ System.Math.Max (line.Offset, offset + (forwardDirection ? 0 : 1)));
+ }
+
List<IActionTextLineMarker> oldMarkers = new List<IActionTextLineMarker> ();
List<IActionTextLineMarker> newMarkers = new List<IActionTextLineMarker> ();
protected internal override void MouseHover (MarginMouseEventArgs args)
@@ -2122,32 +2225,36 @@ namespace Mono.TextEditor
switch (this.mouseSelectionMode) {
case MouseSelectionMode.SingleChar:
- if (!InSelectionDrag) {
- textEditor.SetSelection (loc, loc);
- } else {
- textEditor.ExtendSelectionTo (loc);
+ if (loc.Line != Caret.Line || !textEditor.GetTextEditorData ().IsCaretInVirtualLocation) {
+ if (!InSelectionDrag) {
+ textEditor.SetSelection (loc, loc);
+ } else {
+ textEditor.ExtendSelectionTo (loc);
+ }
+ Caret.Location = loc;
}
- Caret.Location = loc;
break;
case MouseSelectionMode.Word:
- int offset = textEditor.Document.LocationToOffset (loc);
- int start;
- int end;
- var data = textEditor.GetTextEditorData ();
- if (offset < textEditor.SelectionAnchor) {
- start = data.FindCurrentWordStart (offset);
- end = data.FindCurrentWordEnd (textEditor.SelectionAnchor);
- Caret.Offset = start;
- } else {
- start = data.FindCurrentWordStart (textEditor.SelectionAnchor);
- end = data.FindCurrentWordEnd (offset);
- Caret.Offset = end;
- }
- if (!textEditor.MainSelection.IsEmpty) {
- if (Caret.Offset < mouseWordStart) {
- textEditor.MainSelection = new Selection (Document.OffsetToLocation (mouseWordEnd), Caret.Location, textEditor.MainSelection.SelectionMode);
+ if (loc.Line != Caret.Line || !textEditor.GetTextEditorData ().IsCaretInVirtualLocation) {
+ int offset = textEditor.Document.LocationToOffset (loc);
+ int start;
+ int end;
+// var data = textEditor.GetTextEditorData ();
+ if (offset < textEditor.SelectionAnchor) {
+ start = ScanWord (Document, offset, false);
+ end = ScanWord (Document, textEditor.SelectionAnchor, true);
+ Caret.Offset = start;
} else {
- textEditor.MainSelection = new Selection (Document.OffsetToLocation (mouseWordStart), Caret.Location, textEditor.MainSelection.SelectionMode);
+ start = ScanWord (Document, textEditor.SelectionAnchor, false);
+ end = ScanWord (Document, offset, true);
+ Caret.Offset = end;
+ }
+ if (!textEditor.MainSelection.IsEmpty) {
+ if (Caret.Offset < mouseWordStart) {
+ textEditor.MainSelection = new Selection (Document.OffsetToLocation (mouseWordEnd), Caret.Location, textEditor.MainSelection.SelectionMode);
+ } else {
+ textEditor.MainSelection = new Selection (Document.OffsetToLocation (mouseWordStart), Caret.Location, textEditor.MainSelection.SelectionMode);
+ }
}
}
break;
@@ -2518,11 +2625,15 @@ namespace Mono.TextEditor
cr.ShowLayout (markerLayout);
cr.Restore ();
- if (caretOffset == foldOffset && !string.IsNullOrEmpty (folding.Description))
- SetVisibleCaretPosition ((int)(pangoPosition / Pango.Scale.PangoScale), y);
+ if (caretOffset == foldOffset && !string.IsNullOrEmpty (folding.Description)) {
+ var cx = (int)(pangoPosition / Pango.Scale.PangoScale);
+ SetVisibleCaretPosition (cx, y, cx, y);
+ }
pangoPosition += foldingRectangle.Width * Pango.Scale.PangoScale;
- if (caretOffset == foldOffset + folding.Length && !string.IsNullOrEmpty (folding.Description))
- SetVisibleCaretPosition ((int)(pangoPosition / Pango.Scale.PangoScale), y);
+ if (caretOffset == foldOffset + folding.Length && !string.IsNullOrEmpty (folding.Description)) {
+ var cx = (int)(pangoPosition / Pango.Scale.PangoScale);
+ SetVisibleCaretPosition (cx, y, cx, y);
+ }
if (folding.EndLine != line) {
line = folding.EndLine;
@@ -2604,7 +2715,7 @@ namespace Mono.TextEditor
DrawCaretLineMarker (cr, xPos, y, lineArea.X + lineArea.Width - xPos, _lineHeight);
}
}
-
+
if (textEditor.Options.ShowWhitespaces != ShowWhitespaces.Never) {
if (!isEolFolded && isEolSelected || textEditor.Options.ShowWhitespaces == ShowWhitespaces.Always)
if (!(BackgroundRenderer != null && textEditor.Options.ShowWhitespaces == ShowWhitespaces.Selection))
@@ -2614,7 +2725,18 @@ namespace Mono.TextEditor
var extendingMarker = Document.GetExtendingTextMarker (lineNr);
if (extendingMarker != null)
extendingMarker.Draw (textEditor, cr, lineNr, lineArea);
-
+
+ if (BackgroundRenderer == null) {
+ var metrics = new EndOfLineMetrics {
+ LineSegment = line,
+ TextRenderEndPosition = TextStartPosition + pangoPosition / Pango.Scale.PangoScale,
+ LineHeight = _lineHeight
+ };
+ foreach (var marker in line.Markers) {
+ marker.DrawAfterEol (textEditor, cr, y, metrics);
+ }
+ }
+
lastLineRenderWidth = pangoPosition / Pango.Scale.PangoScale;
if (textEditor.HAdjustment.Value > 0) {
cr.LineWidth = textEditor.Options.Zoom;
@@ -2855,6 +2977,12 @@ namespace Mono.TextEditor
uint curChunkIndex = 0, byteChunkIndex = 0;
List<Pango.Attribute> attributes = new List<Pango.Attribute> ();
uint oldEndIndex = 0;
+
+ Cairo.Color curFgColor = textEditor.ColorStyle.PlainText.Foreground;
+ Cairo.Color curBgColor = textEditor.ColorStyle.PlainText.Background;
+ var curWeight = Xwt.Drawing.FontWeight.Normal;
+ var curStyle = Xwt.Drawing.FontStyle.Normal;
+
foreach (Chunk chunk in startChunk) {
ChunkStyle chunkStyle = chunk != null ? textEditor.ColorStyle.GetChunkStyle (chunk) : null;
@@ -2878,33 +3006,46 @@ namespace Mono.TextEditor
HandleSelection (lineOffset, logicalRulerColumn, - 1, -1, chunk.Offset, chunk.EndOffset, delegate(int start, int end) {
var color = textEditor.ColorStyle.GetForeground (chunkStyle);
- Pango.AttrForeground foreGround = new Pango.AttrForeground (
- (ushort)(color.R * ushort.MaxValue),
- (ushort)(color.G * ushort.MaxValue),
- (ushort)(color.B * ushort.MaxValue));
- foreGround.StartIndex = TranslateToUTF8Index (lineChars, (uint)(startIndex + start - chunk.Offset), ref curIndex, ref byteIndex);
- foreGround.EndIndex = TranslateToUTF8Index (lineChars, (uint)(startIndex + end - chunk.Offset), ref curIndex, ref byteIndex);
- attributes.Add (foreGround);
- if (!chunkStyle.TransparentBackground) {
- color = chunkStyle.Background;
- var background = new Pango.AttrBackground (
+ var si = TranslateToUTF8Index (lineChars, (uint)(startIndex + start - chunk.Offset), ref curIndex, ref byteIndex);
+ var ei = TranslateToUTF8Index (lineChars, (uint)(startIndex + end - chunk.Offset), ref curIndex, ref byteIndex);
+ if (!color.Equals (curFgColor)) {
+ curFgColor = color;
+ var foreGround = new Pango.AttrForeground (
(ushort)(color.R * ushort.MaxValue),
(ushort)(color.G * ushort.MaxValue),
(ushort)(color.B * ushort.MaxValue));
- background.StartIndex = foreGround.StartIndex;
- background.EndIndex = foreGround.EndIndex;
- attributes.Add (background);
+ foreGround.StartIndex = si;
+ foreGround.EndIndex = ei;
+ attributes.Add (foreGround);
+ }
+ if (!chunkStyle.TransparentBackground) {
+ color = chunkStyle.Background;
+ if (!color.Equals (curBgColor)) {
+ var background = new Pango.AttrBackground (
+ (ushort)(color.R * ushort.MaxValue),
+ (ushort)(color.G * ushort.MaxValue),
+ (ushort)(color.B * ushort.MaxValue));
+ background.StartIndex = si;
+ background.EndIndex = ei;
+ attributes.Add (background);
+ }
}
}, delegate(int start, int end) {
Pango.AttrForeground selectedForeground;
if (!SelectionColor.TransparentForeground) {
var color = SelectionColor.Foreground;
+ if (color.Equals (curFgColor))
+ return;
+ curFgColor = color;
selectedForeground = new Pango.AttrForeground (
(ushort)(color.R * ushort.MaxValue),
(ushort)(color.G * ushort.MaxValue),
(ushort)(color.B * ushort.MaxValue));
} else {
var color = ColorStyle.GetForeground (chunkStyle);
+ if (color.Equals (curFgColor))
+ return;
+ curFgColor = color;
selectedForeground = new Pango.AttrForeground (
(ushort)(color.R * ushort.MaxValue),
(ushort)(color.G * ushort.MaxValue),
@@ -2918,14 +3059,16 @@ namespace Mono.TextEditor
var translatedStartIndex = TranslateToUTF8Index (lineChars, (uint)startIndex, ref curChunkIndex, ref byteChunkIndex);
var translatedEndIndex = TranslateToUTF8Index (lineChars, (uint)endIndex, ref curChunkIndex, ref byteChunkIndex);
- if (chunkStyle.FontWeight != Xwt.Drawing.FontWeight.Normal) {
- Pango.AttrWeight attrWeight = new Pango.AttrWeight ((Pango.Weight)chunkStyle.FontWeight);
+ if (chunkStyle.FontWeight != curWeight) {
+ curWeight = chunkStyle.FontWeight;
+ var attrWeight = new Pango.AttrWeight ((Pango.Weight)chunkStyle.FontWeight);
attrWeight.StartIndex = translatedStartIndex;
attrWeight.EndIndex = translatedEndIndex;
attributes.Add (attrWeight);
}
- if (chunkStyle.FontStyle != Xwt.Drawing.FontStyle.Normal) {
+ if (chunkStyle.FontStyle != curStyle) {
+ curStyle = chunkStyle.FontStyle;
Pango.AttrStyle attrStyle = new Pango.AttrStyle ((Pango.Style)chunkStyle.FontStyle);
attrStyle.StartIndex = translatedStartIndex;
attrStyle.EndIndex = translatedEndIndex;
@@ -2933,7 +3076,7 @@ namespace Mono.TextEditor
}
if (chunkStyle.Underline) {
- Pango.AttrUnderline attrUnderline = new Pango.AttrUnderline (Pango.Underline.Single);
+ var attrUnderline = new Pango.AttrUnderline (Pango.Underline.Single);
attrUnderline.StartIndex = translatedStartIndex;
attrUnderline.EndIndex = translatedEndIndex;
attributes.Add (attrUnderline);
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/HeightTree.cs b/src/core/Mono.Texteditor/Mono.TextEditor/HeightTree.cs
index 107ff9c..c1b47ad 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/HeightTree.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/HeightTree.cs
@@ -158,6 +158,8 @@ namespace Mono.TextEditor
public void Rebuild ()
{
lock (tree) {
+ if (editor.IsDisposed)
+ return;
rebuild = true;
try {
markers.Clear ();
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs
new file mode 100644
index 0000000..0657a4b
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs
@@ -0,0 +1,49 @@
+//
+// IBackgroundMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ /// <summary>
+ /// A specialized interface to draw text backgrounds.
+ /// </summary>
+ [Obsolete("This is obsolete - TextLineMarker now handles this")]
+ public interface IBackgroundMarker
+ {
+ /// <summary>
+ /// Draws the backround of a line part.
+ /// </summary>
+ /// <returns>
+ /// true, when the text view should draw the text, false when the text view should not draw the text.
+ /// </returns>
+ bool DrawBackground (TextEditor Editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg);
+ }
+
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs
new file mode 100644
index 0000000..63472f2
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs
@@ -0,0 +1,49 @@
+//
+// IIconBarMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ /// <summary>
+ /// A specialized text marker interface to draw icons in the bookmark margin.
+ /// </summary>
+ [Obsolete("Use MarginMarker instead.")]
+ public interface IIconBarMarker
+ {
+ bool CanDrawBackground { get; }
+ void DrawBackground (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height);
+
+ void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height);
+ void MousePress (MarginMouseEventArgs args);
+ void MouseRelease (MarginMouseEventArgs args);
+ void MouseHover (MarginMouseEventArgs args);
+ }
+
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/LineBackgroundMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/LineBackgroundMarker.cs
new file mode 100644
index 0000000..74f8582
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/LineBackgroundMarker.cs
@@ -0,0 +1,54 @@
+//
+// LineBackgroundMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ public class LineBackgroundMarker: TextLineMarker
+ {
+ Cairo.Color color;
+
+ public LineBackgroundMarker (Cairo.Color color)
+ {
+ this.color = color;
+ }
+
+ public override bool DrawBackground (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
+ {
+ if (metrics.SelectionStart > 0)
+ return true;
+ cr.Color = color;
+ cr.Rectangle (metrics.TextRenderStartPosition, y, metrics.TextRenderEndPosition - metrics.TextRenderStartPosition, editor.LineHeight);
+ cr.Fill ();
+ return true;
+ }
+ }
+
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/MarginMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/MarginMarker.cs
new file mode 100644
index 0000000..c8cd377
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/MarginMarker.cs
@@ -0,0 +1,174 @@
+//
+// MarginMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+ /// <summary>
+ /// Contains all information about a margin draw event. This class is used inside <see cref="MarginMarker"/>.
+ /// </summary>
+ public class MarginDrawMetrics
+ {
+ /// <summary>
+ /// The margin that should be drawn.
+ /// </summary>
+ public Margin Margin { get; private set; }
+
+ /// <summary>
+ /// The area that needs to be redrawn.
+ /// </summary>
+ public Cairo.Rectangle Area { get; private set; }
+
+ /// <summary>
+ /// The line segment the margin should draw (can be null).
+ /// </summary>
+ public DocumentLine LineSegment { get; private set; }
+
+ /// <summary>
+ /// The line number of the line segment (can be negative, if the line segment is null).
+ /// </summary>
+ public long LineNumber { get; private set; }
+
+ /// <summary>
+ /// The X position of the margin.
+ /// </summary>
+ public double X { get; private set; }
+
+ /// <summary>
+ /// The Y postion of the margin draw event.
+ /// </summary>
+ public double Y { get; private set; }
+
+ /// <summary>
+ /// The Width of the margin.
+ /// </summary>
+ public double Width { get { return Margin.Width; } }
+
+ /// <summary>
+ /// The height of the current line.
+ /// </summary>
+ public double Height { get; private set; }
+
+ /// <summary>
+ /// X + Width
+ /// </summary>
+ public double Right { get { return X + Width; } }
+
+ /// <summary>
+ /// Y + Height
+ /// </summary>
+ public double Bottom { get { return Y + Height; } }
+
+ internal MarginDrawMetrics (Margin margin, Cairo.Rectangle area, DocumentLine lineSegment, long lineNumber, double x, double y, double height)
+ {
+ this.Margin = margin;
+ this.Area = area;
+ this.LineSegment = lineSegment;
+ this.LineNumber = lineNumber;
+ this.X = x;
+ this.Y = y;
+ this.Height = height;
+ }
+ }
+
+ /// <summary>
+ /// The margin marker is a specialized text line marker used to change how a margins of a line are drawn.
+ /// (If the margin supports custom drawing plugins)
+ /// Note: This is not used for the text view margin, which is handled by the basic TextLineMarker class.
+ /// </summary>
+ public class MarginMarker : TextLineMarker
+ {
+ /// <summary>
+ /// Determines whether this margin marker can draw the background of the specified margin.
+ /// </summary>
+ public virtual bool CanDrawBackground (Margin margin)
+ {
+ return false;
+ }
+
+ /// <summary>
+ /// Determines whether this margin marker can draw the foreground of the specified margin.
+ /// </summary>
+ public virtual bool CanDrawForeground (Margin margin)
+ {
+ return false;
+ }
+
+ internal bool CanDraw (Margin margin)
+ {
+ return CanDrawForeground (margin) || CanDrawBackground (margin);
+ }
+
+ /// <summary>
+ /// Draws the foreground of the specified margin.
+ /// </summary>
+ public virtual void DrawForeground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ }
+
+ /// <summary>
+ /// Draws the background of the specified margin.
+ /// </summary>
+ /// <returns>true, if the background is drawn. false if the margin should fallback to the default background renderer. </returns>
+ public virtual bool DrawBackground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ return false;
+ }
+
+ /// <summary>
+ /// Informs the margin marker of a mouse press event.
+ /// </summary>
+ /// <param name="editor">The text editor in which the event press occured.</param>
+ /// <param name="margin">The margin in which the event occured.</param>
+ /// <param name="args">The event arguments.</param>
+ public virtual void InformMousePress (TextEditor editor, Margin margin, MarginMouseEventArgs args)
+ {
+ }
+
+ /// <summary>
+ /// Informs the margin marker of a mouse release event.
+ /// </summary>
+ /// <param name="editor">The text editor in which the event press occured.</param>
+ /// <param name="margin">The margin in which the event occured.</param>
+ /// <param name="args">The event arguments.</param>
+ public virtual void InformMouseRelease (TextEditor editor, Margin margin, MarginMouseEventArgs args)
+ {
+ }
+
+ /// <summary>
+ /// Informs the margin marker of a mouse hover event.
+ /// </summary>
+ /// <param name="editor">The text editor in which the event press occured.</param>
+ /// <param name="margin">The margin in which the event occured.</param>
+ /// <param name="args">The event arguments.</param>
+ public virtual void InformMouseHover (TextEditor editor, Margin margin, MarginMouseEventArgs args)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs b/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs
index 29c8530..31de150 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs
@@ -302,11 +302,13 @@ namespace Mono.TextEditor
action = CaretMoveActions.ToDocumentStart;
keyBindings.Add (GetKeyCode (Gdk.Key.KP_Home), action);
keyBindings.Add (GetKeyCode (Gdk.Key.Home), action);
-
+ keyBindings.Add (GetKeyCode (Gdk.Key.Up, Gdk.ModifierType.MetaMask), action);
+
action = SelectionActions.MoveToDocumentStart;
keyBindings.Add (GetKeyCode (Gdk.Key.KP_Home, Gdk.ModifierType.ShiftMask), action);
keyBindings.Add (GetKeyCode (Gdk.Key.Home, Gdk.ModifierType.ShiftMask), action);
-
+ keyBindings.Add (GetKeyCode (Gdk.Key.Up, Gdk.ModifierType.MetaMask | Gdk.ModifierType.ShiftMask), action);
+
// ==== End ====
action = CaretMoveActions.LineEnd;
@@ -321,11 +323,13 @@ namespace Mono.TextEditor
action = CaretMoveActions.ToDocumentEnd;
keyBindings.Add (GetKeyCode (Gdk.Key.KP_End), action);
keyBindings.Add (GetKeyCode (Gdk.Key.End), action);
-
+ keyBindings.Add (GetKeyCode (Gdk.Key.Down, Gdk.ModifierType.MetaMask), action);
+
action = SelectionActions.MoveToDocumentEnd;
keyBindings.Add (GetKeyCode (Gdk.Key.KP_End, Gdk.ModifierType.ShiftMask), action);
keyBindings.Add (GetKeyCode (Gdk.Key.End, Gdk.ModifierType.ShiftMask), action);
-
+ keyBindings.Add (GetKeyCode (Gdk.Key.Down, Gdk.ModifierType.MetaMask | Gdk.ModifierType.ShiftMask), action);
+
// ==== Cut, copy, paste ===
action = ClipboardActions.Cut;
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/Standalone/UnicodeNewline.cs b/src/core/Mono.Texteditor/Mono.TextEditor/Standalone/UnicodeNewline.cs
new file mode 100644
index 0000000..c490b80
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/Standalone/UnicodeNewline.cs
@@ -0,0 +1,255 @@
+//
+// UnicodeNewline.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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.
+
+#if STANDALONE
+
+using System;
+
+namespace ICSharpCode.NRefactory
+{
+ public enum UnicodeNewline {
+ Unknown,
+
+ /// <summary>
+ /// Line Feed, U+000A
+ /// </summary>
+ LF = 0x0A,
+
+
+ CRLF = 0x0D0A,
+
+ /// <summary>
+ /// Carriage Return, U+000D
+ /// </summary>
+ CR = 0x0D,
+
+ /// <summary>
+ /// Next Line, U+0085
+ /// </summary>
+ NEL = 0x85,
+
+ /// <summary>
+ /// Vertical Tab, U+000B
+ /// </summary>
+ VT = 0x0B,
+
+ /// <summary>
+ /// Form Feed, U+000C
+ /// </summary>
+ FF = 0x0C,
+
+ /// <summary>
+ /// Line Separator, U+2028
+ /// </summary>
+ LS = 0x2028,
+
+ /// <summary>
+ /// Paragraph Separator, U+2029
+ /// </summary>
+ PS = 0x2029
+ }
+
+
+ /// <summary>
+ /// Defines unicode new lines according to Unicode Technical Report #13
+ /// http://www.unicode.org/standard/reports/tr13/tr13-5.html
+ /// </summary>
+ public static class NewLine
+ {
+ /// <summary>
+ /// Carriage Return, U+000D
+ /// </summary>
+ public const char CR = (char)0x0D;
+
+ /// <summary>
+ /// Line Feed, U+000A
+ /// </summary>
+ public const char LF = (char)0x0A;
+
+ /// <summary>
+ /// Next Line, U+0085
+ /// </summary>
+ public const char NEL = (char)0x85;
+
+ /// <summary>
+ /// Vertical Tab, U+000B
+ /// </summary>
+ public const char VT = (char)0x0B;
+
+ /// <summary>
+ /// Form Feed, U+000C
+ /// </summary>
+ public const char FF = (char)0x0C;
+
+ /// <summary>
+ /// Line Separator, U+2028
+ /// </summary>
+ public const char LS = (char)0x2028;
+
+ /// <summary>
+ /// Paragraph Separator, U+2029
+ /// </summary>
+ public const char PS = (char)0x2029;
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">A callback getting the next character (may be null).</param>
+ public static int GetDelimiterLength (char curChar, Func<char> nextChar = null)
+ {
+ if (curChar == CR) {
+ if (nextChar != null && nextChar () == LF)
+ return 2;
+ return 1;
+ }
+
+ if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
+ return 1;
+ return 0;
+ }
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">The next character (if != LF then length will always be 0 or 1).</param>
+ public static int GetDelimiterLength (char curChar, char nextChar)
+ {
+ if (curChar == CR) {
+ if (nextChar == LF)
+ return 2;
+ return 1;
+ }
+
+ if (curChar == LF || curChar == NEL || curChar == VT || curChar == FF || curChar == LS || curChar == PS)
+ return 1;
+ return 0;
+ }
+
+ /// <summary>
+ /// Gets the new line type of a given char/next char.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">A callback getting the next character (may be null).</param>
+ public static UnicodeNewline GetDelimiterType (char curChar, Func<char> nextChar = null)
+ {
+ switch (curChar) {
+ case CR:
+ if (nextChar != null && nextChar () == LF)
+ return UnicodeNewline.CRLF;
+ return UnicodeNewline.CR;
+ case LF:
+ return UnicodeNewline.LF;
+ case NEL:
+ return UnicodeNewline.NEL;
+ case VT:
+ return UnicodeNewline.VT;
+ case FF:
+ return UnicodeNewline.FF;
+ case LS:
+ return UnicodeNewline.LS;
+ case PS:
+ return UnicodeNewline.PS;
+ }
+ return UnicodeNewline.Unknown;
+ }
+
+ /// <summary>
+ /// Gets the new line type of a given char/next char.
+ /// </summary>
+ /// <returns>0 == no new line, otherwise it returns either 1 or 2 depending of the length of the delimiter.</returns>
+ /// <param name="curChar">The current character.</param>
+ /// <param name="nextChar">The next character (if != LF then length will always be 0 or 1).</param>
+ public static UnicodeNewline GetDelimiterType (char curChar, char nextChar)
+ {
+ switch (curChar) {
+ case CR:
+ if (nextChar == LF)
+ return UnicodeNewline.CRLF;
+ return UnicodeNewline.CR;
+ case LF:
+ return UnicodeNewline.LF;
+ case NEL:
+ return UnicodeNewline.NEL;
+ case VT:
+ return UnicodeNewline.VT;
+ case FF:
+ return UnicodeNewline.FF;
+ case LS:
+ return UnicodeNewline.LS;
+ case PS:
+ return UnicodeNewline.PS;
+ }
+ return UnicodeNewline.Unknown;
+ }
+
+ /// <summary>
+ /// Determines if a char is a new line delimiter.
+ ///
+ /// Note that the only 2 char wide new line is CR LF and both chars are new line
+ /// chars on their own. For most cases GetDelimiterLength is the better choice.
+ /// </summary>
+ public static bool IsNewLine(char ch)
+ {
+ return GetDelimiterLength (ch) > 0;
+ }
+
+ /// <summary>
+ /// Gets the new line as a string.
+ /// </summary>
+ public static string GetString (UnicodeNewline newLine)
+ {
+ switch (newLine) {
+ case UnicodeNewline.Unknown:
+ return "";
+ case UnicodeNewline.LF:
+ return "\n";
+ case UnicodeNewline.CRLF:
+ return "\r\n";
+ case UnicodeNewline.CR:
+ return "\r";
+ case UnicodeNewline.NEL:
+ return "\u0085";
+ case UnicodeNewline.VT:
+ return "\u000B";
+ case UnicodeNewline.FF:
+ return "\u000C";
+ case UnicodeNewline.LS:
+ return "\u2028";
+ case UnicodeNewline.PS:
+ return "\u2029";
+ default:
+ throw new ArgumentOutOfRangeException ();
+ }
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/StyleTextLineMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/StyleTextLineMarker.cs
new file mode 100644
index 0000000..fbcc78e
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/StyleTextLineMarker.cs
@@ -0,0 +1,121 @@
+//
+// StyleTextLineMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ public class StyleTextLineMarker: TextLineMarker
+ {
+ [Flags]
+ public enum StyleFlag {
+ None = 0,
+ Color = 1,
+ BackgroundColor = 2,
+ Bold = 4,
+ Italic = 8
+ }
+
+ Cairo.Color color;
+ Cairo.Color backColor;
+ bool bold;
+ bool italic;
+
+ public bool Italic {
+ get {
+ return italic;
+ }
+ set {
+ italic = value;
+ IncludedStyles |= StyleFlag.Italic;
+ }
+ }
+
+ public virtual StyleFlag IncludedStyles {
+ get;
+ set;
+ }
+
+ public virtual Cairo.Color Color {
+ get {
+ return color;
+ }
+ set {
+ color = value;
+ IncludedStyles |= StyleFlag.Color;
+ }
+ }
+
+ public bool Bold {
+ get {
+ return bold;
+ }
+ set {
+ bold = value;
+ IncludedStyles |= StyleFlag.Bold;
+ }
+ }
+
+ public virtual Cairo.Color BackgroundColor {
+ get {
+ return backColor;
+ }
+ set {
+ backColor = value;
+ IncludedStyles |= StyleFlag.BackgroundColor;
+ }
+ }
+
+ protected virtual ChunkStyle CreateStyle (ChunkStyle baseStyle, Cairo.Color color, Cairo.Color bgColor)
+ {
+ var style = new ChunkStyle (baseStyle);
+ if ((IncludedStyles & StyleFlag.Color) != 0)
+ style.Foreground = color;
+
+ if ((IncludedStyles & StyleFlag.BackgroundColor) != 0) {
+ style.Background = bgColor;
+ }
+
+ if ((IncludedStyles & StyleFlag.Bold) != 0)
+ style.FontWeight = Xwt.Drawing.FontWeight.Bold;
+
+ if ((IncludedStyles & StyleFlag.Italic) != 0)
+ style.FontStyle = Xwt.Drawing.FontStyle.Italic;
+ return style;
+ }
+
+ public override ChunkStyle GetStyle (ChunkStyle baseStyle)
+ {
+ if (baseStyle == null || IncludedStyles == StyleFlag.None)
+ return baseStyle;
+
+ return CreateStyle (baseStyle, Color, BackgroundColor);
+ }
+ }
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs b/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs
index ffb05ff..3987d15 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs
@@ -43,7 +43,7 @@ namespace Mono.TextEditor
public class TextEditorData : IDisposable
{
ITextEditorOptions options;
- readonly TextDocument document;
+ TextDocument document;
readonly Caret caret;
static Adjustment emptyAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
@@ -89,13 +89,13 @@ namespace Mono.TextEditor
public string FileName {
get {
- return Document.FileName;
+ return Document != null ? Document.FileName : null;
}
}
public string MimeType {
get {
- return Document.MimeType;
+ return Document != null ? Document.MimeType : null;
}
}
@@ -487,6 +487,8 @@ namespace Mono.TextEditor
void DetachDocument ()
{
+ if (document == null)
+ return;
document.BeginUndo -= OnBeginUndo;
document.EndUndo -= OnEndUndo;
@@ -498,6 +500,7 @@ namespace Mono.TextEditor
document.TextSet -= HandleDocTextSet;
document.Folded -= HandleTextEditorDataDocumentFolded;
document.FoldTreeUpdated -= HandleFoldTreeUpdated;
+ document = null;
}
public void Dispose ()
@@ -509,6 +512,8 @@ namespace Mono.TextEditor
options = options.Kill ();
HeightTree.Dispose ();
DetachDocument ();
+ ClearTooltipProviders ();
+ tooltipProviders = null;
}
/// <summary>
@@ -1117,6 +1122,15 @@ namespace Mono.TextEditor
return EnsureIsNotVirtual (Caret.Location);
}
+ public bool IsCaretInVirtualLocation {
+ get {
+ DocumentLine documentLine = Document.GetLine (Caret.Line);
+ if (documentLine == null)
+ return true;
+ return Caret.Column > documentLine.Length + 1;
+ }
+ }
+
int EnsureIsNotVirtual (DocumentLocation loc)
{
return EnsureIsNotVirtual (loc.Line, loc.Column);
@@ -1185,10 +1199,20 @@ namespace Mono.TextEditor
set;
}
- public int PasteText (int offset, string text, byte[] copyData = null)
+ public int PasteText (int offset, string text, byte[] copyData, ref IDisposable undoGroup)
{
- if (TextPasteHandler != null)
- text = TextPasteHandler.FormatPlainText (offset, text, copyData);
+ if (TextPasteHandler != null) {
+ var newText = TextPasteHandler.FormatPlainText (offset, text, copyData);
+ if (newText != text) {
+ var inserted = Insert (offset, text);
+ undoGroup.Dispose ();
+ undoGroup = OpenUndoGroup ();
+ var result = Replace (offset, inserted, newText);
+ if (Paste != null)
+ Paste (offset, text, result);
+ return result;
+ }
+ }
var insertedChars = Insert (offset, text);
if (Paste != null)
Paste (offset, text, insertedChars);
@@ -1285,7 +1309,7 @@ namespace Mono.TextEditor
public int LineCount {
get {
- return Document.LineCount;
+ return Document != null ? Document.LineCount : 0;
}
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
index f77e060..9a3586a 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
@@ -72,7 +72,33 @@ namespace Mono.TextEditor
None = 0,
DrawsSelection = 1
}
-
+
+ public class LineMetrics
+ {
+ public DocumentLine LineSegment { get; internal set; }
+ public TextViewMargin.LayoutWrapper Layout { get; internal set; }
+
+ public int SelectionStart { get; internal set; }
+ public int SelectionEnd { get; internal set; }
+
+ public int TextStartOffset { get; internal set; }
+ public int TextEndOffset { get; internal set; }
+
+ public double TextRenderStartPosition { get; internal set; }
+ public double TextRenderEndPosition { get; internal set; }
+
+ public double LineHeight { get; internal set; }
+
+ public double WholeLineWidth { get; internal set; }
+ }
+
+ public class EndOfLineMetrics
+ {
+ public DocumentLine LineSegment { get; internal set; }
+ public double TextRenderEndPosition { get; internal set; }
+ public double LineHeight { get; internal set; }
+ }
+
public class TextLineMarker
{
DocumentLine lineSegment;
@@ -101,352 +127,41 @@ namespace Mono.TextEditor
public TextLineMarker ()
{
}
-
- public virtual void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
- {
- }
-
- public virtual ChunkStyle GetStyle (ChunkStyle baseStyle)
- {
- return baseStyle;
- }
- }
-
- public enum UrlType {
- Unknown,
- Url,
- Email
- }
-
- public class UrlMarker : TextLineMarker, IDisposable
- {
- string url;
- string style;
- int startColumn;
- int endColumn;
- DocumentLine line;
- UrlType urlType;
- TextDocument doc;
-
- public string Url {
- get {
- return url;
- }
- }
-
- public int StartColumn {
- get {
- return startColumn;
- }
- }
- public int EndColumn {
- get {
- return endColumn;
- }
- }
-
- public UrlType UrlType {
- get {
- return urlType;
- }
- }
-
- public UrlMarker (TextDocument doc, DocumentLine line, string url, UrlType urlType, string style, int startColumn, int endColumn)
- {
- this.doc = doc;
- this.line = line;
- this.url = url;
- this.urlType = urlType;
- this.style = style;
- this.startColumn = startColumn;
- this.endColumn = endColumn;
- doc.LineChanged += HandleDocLineChanged;
- }
-
- void HandleDocLineChanged (object sender, LineEventArgs e)
+ [Obsolete("Use Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics) instead.")]
+ public virtual void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
{
- if (line == e.Line)
- doc.RemoveMarker (this);
}
- public void Dispose ()
+ public virtual void Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
- doc.LineChanged -= HandleDocLineChanged;
+ Draw (editor, cr, metrics.Layout.Layout, false, metrics.TextStartOffset, metrics.TextEndOffset, y, metrics.TextRenderStartPosition, metrics.TextRenderEndPosition);
}
- public override void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
+ public virtual ChunkStyle GetStyle (ChunkStyle baseStyle)
{
- int markerStart = line.Offset + startColumn;
- int markerEnd = line.Offset + endColumn;
-
- if (markerEnd < startOffset || markerStart > endOffset)
- return;
-
- double @from;
- double to;
-
- if (markerStart < startOffset && endOffset < markerEnd) {
- @from = startXPos;
- to = endXPos;
- } else {
- int start = startOffset < markerStart ? markerStart : startOffset;
- int end = endOffset < markerEnd ? endOffset : markerEnd;
- int x_pos = layout.IndexToPos (start - startOffset).X;
-
- @from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
-
- x_pos = layout.IndexToPos (end - startOffset).X;
-
- to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
- }
-
- @from = System.Math.Max (@from, editor.TextViewMargin.XOffset);
- to = System.Math.Max (to, editor.TextViewMargin.XOffset);
- if (@from < to) {
- cr.DrawLine (selected ? editor.ColorStyle.SelectedText.Foreground : editor.ColorStyle.GetForeground (editor.ColorStyle.GetChunkStyle (style)), @from + 0.5, y + editor.LineHeight - 1.5, to + 0.5, y + editor.LineHeight - 1.5);
- }
+ return baseStyle;
}
- }
-
- /// <summary>
- /// A specialized text marker interface to draw icons in the bookmark margin.
- /// </summary>
- public interface IIconBarMarker
- {
- void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height);
- void MousePress (MarginMouseEventArgs args);
- void MouseRelease (MarginMouseEventArgs args);
- void MouseHover (MarginMouseEventArgs args);
- }
-
- /// <summary>
- /// A specialized interface to draw text backgrounds.
- /// </summary>
- public interface IBackgroundMarker
- {
+
/// <summary>
- /// Draws the backround of a line part.
+ /// Draws the background of the text.
/// </summary>
- /// <returns>
- /// true, when the text view should draw the text, false when the text view should not draw the text.
- /// </returns>
- bool DrawBackground (TextEditor Editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg);
- }
-
- public interface IGutterMarker
- {
- void DrawLineNumber (TextEditor editor, double marginWidth, Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight);
- }
-
- public class LineBackgroundMarker: TextLineMarker, IBackgroundMarker
- {
- Cairo.Color color;
-
- public LineBackgroundMarker (Cairo.Color color)
- {
- this.color = color;
- }
-
- public bool DrawBackground (TextEditor editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg)
- {
- drawBg = false;
- if (selectionStart > 0)
- return true;
- cr.Color = color;
- cr.Rectangle (startXPos, y, endXPos - startXPos, editor.LineHeight);
- cr.Fill ();
- return true;
- }
- }
-
- public class UnderlineMarker: TextLineMarker
- {
- protected UnderlineMarker ()
- {}
-
- public UnderlineMarker (string colorName, int start, int end)
+ /// <returns><c>true</c>, if background was drawn, <c>false</c> otherwise.</returns>
+ /// <param name="editor">The editor.</param>
+ /// <param name="cr">The cairo context.</param>
+ /// <param name="y">The y coordinate.</param>
+ /// <param name="metrics">The line metrics.</param>
+ public virtual bool DrawBackground (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
- this.ColorName = colorName;
- this.StartCol = start;
- this.EndCol = end;
- this.Wave = true;
+ return false;
}
- public UnderlineMarker (Cairo.Color color, int start, int end)
- {
- this.Color = color;
- this.StartCol = start;
- this.EndCol = end;
- this.Wave = false;
- }
-
- public string ColorName { get; set; }
- public Cairo.Color Color { get; set; }
- public int StartCol { get; set; }
- public int EndCol { get; set; }
- public bool Wave { get; set; }
-
- public override void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
- {
- int markerStart = LineSegment.Offset + System.Math.Max (StartCol - 1, 0);
- int markerEnd = LineSegment.Offset + (EndCol < 1 ? LineSegment.Length : EndCol - 1);
- if (markerEnd < startOffset || markerStart > endOffset)
- return;
-
-
- if (editor.IsSomethingSelected) {
- var range = editor.SelectionRange;
- if (range.Contains (markerStart)) {
- int end = System.Math.Min (markerEnd, range.EndOffset);
- InternalDraw (markerStart, end, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
- InternalDraw (range.EndOffset, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
- return;
- }
- if (range.Contains (markerEnd)) {
- InternalDraw (markerStart, range.Offset, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
- InternalDraw (range.Offset, markerEnd, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
- return;
- }
- if (markerStart <= range.Offset && range.EndOffset <= markerEnd) {
- InternalDraw (markerStart, range.Offset, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
- InternalDraw (range.Offset, range.EndOffset, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
- InternalDraw (range.EndOffset, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
- return;
- }
-
- }
-
- InternalDraw (markerStart, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
- }
-
- void InternalDraw (int markerStart, int markerEnd, TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
- {
- if (markerStart >= markerEnd)
- return;
- double @from;
- double to;
- if (markerStart < startOffset && endOffset < markerEnd) {
- @from = startXPos;
- to = endXPos;
- } else {
- int start = startOffset < markerStart ? markerStart : startOffset;
- int end = endOffset < markerEnd ? endOffset : markerEnd;
- int /*lineNr,*/ x_pos;
-
- x_pos = layout.IndexToPos (start - startOffset).X;
- @from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
-
- x_pos = layout.IndexToPos (end - startOffset).X;
-
- to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
- }
- @from = System.Math.Max (@from, editor.TextViewMargin.XOffset);
- to = System.Math.Max (to, editor.TextViewMargin.XOffset);
- if (@from >= to) {
- return;
- }
- double height = editor.LineHeight / 5;
- if (selected) {
- cr.Color = editor.ColorStyle.SelectedText.Foreground;
- } else {
- cr.Color = ColorName == null ? Color : editor.ColorStyle.GetChunkStyle (ColorName).Foreground;
- }
- if (Wave) {
- Pango.CairoHelper.ShowErrorUnderline (cr, @from, y + editor.LineHeight - height, to - @from, height);
- } else {
- cr.LineWidth = 1;
- cr.MoveTo (@from, y + editor.LineHeight - 1.5);
- cr.LineTo (to, y + editor.LineHeight - 1.5);
- cr.Stroke ();
- }
- }
- }
- public class StyleTextLineMarker: TextLineMarker
- {
- [Flags]
- public enum StyleFlag {
- None = 0,
- Color = 1,
- BackgroundColor = 2,
- Bold = 4,
- Italic = 8
- }
-
- Cairo.Color color;
- Cairo.Color backColor;
- bool bold;
- bool italic;
-
- public bool Italic {
- get {
- return italic;
- }
- set {
- italic = value;
- IncludedStyles |= StyleFlag.Italic;
- }
- }
-
- public virtual StyleFlag IncludedStyles {
- get;
- set;
- }
-
- public virtual Cairo.Color Color {
- get {
- return color;
- }
- set {
- color = value;
- IncludedStyles |= StyleFlag.Color;
- }
- }
-
- public bool Bold {
- get {
- return bold;
- }
- set {
- bold = value;
- IncludedStyles |= StyleFlag.Bold;
- }
- }
-
- public virtual Cairo.Color BackgroundColor {
- get {
- return backColor;
- }
- set {
- backColor = value;
- IncludedStyles |= StyleFlag.BackgroundColor;
- }
- }
-
- protected virtual ChunkStyle CreateStyle (ChunkStyle baseStyle, Cairo.Color color, Cairo.Color bgColor)
- {
- var style = new ChunkStyle (baseStyle);
- if ((IncludedStyles & StyleFlag.Color) != 0)
- style.Foreground = color;
-
- if ((IncludedStyles & StyleFlag.BackgroundColor) != 0) {
- style.Background = bgColor;
- }
-
- if ((IncludedStyles & StyleFlag.Bold) != 0)
- style.FontWeight = Xwt.Drawing.FontWeight.Bold;
-
- if ((IncludedStyles & StyleFlag.Italic) != 0)
- style.FontStyle = Xwt.Drawing.FontStyle.Italic;
- return style;
- }
-
- public override ChunkStyle GetStyle (ChunkStyle baseStyle)
+ /// <summary>
+ /// Is used to draw in the area after the visible text.
+ /// </summary>
+ public virtual void DrawAfterEol (TextEditor textEditor, Cairo.Context cr, double y, EndOfLineMetrics lineHeight)
{
- if (baseStyle == null || IncludedStyles == StyleFlag.None)
- return baseStyle;
-
- return CreateStyle (baseStyle, Color, BackgroundColor);
}
}
+
}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs b/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
index 3b18f0a..2825c85 100644
--- a/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
@@ -96,19 +96,18 @@ namespace Mono.TextEditor
public override string ToString ()
{
return string.Format ("[TextLink: Name={0}, Links={1}, IsEditable={2}, Tooltip={3}, CurrentText={4}, Values=({5})]",
- Name,
- Links.Count,
- IsEditable,
- Tooltip,
- CurrentText,
- Values.Count);
+ Name,
+ Links.Count,
+ IsEditable,
+ Tooltip,
+ CurrentText,
+ Values.Count);
}
public void AddLink (TextSegment segment)
{
links.Add (segment);
}
-
#region IListDataProvider implementation
public string GetText (int n)
{
@@ -134,7 +133,8 @@ namespace Mono.TextEditor
#endregion
}
- public enum TextLinkMode {
+ public enum TextLinkMode
+ {
EditIdentifier,
General
}
@@ -188,7 +188,7 @@ namespace Mono.TextEditor
TextLinkTooltipProvider tooltipProvider;
- public TextLinkEditMode (TextEditor editor,int baseOffset,List<TextLink> links)
+ public TextLinkEditMode (TextEditor editor, int baseOffset, List<TextLink> links)
{
this.editor = editor;
this.links = links;
@@ -288,7 +288,7 @@ namespace Mono.TextEditor
this.undoDepth = Editor.Document.GetCurrentUndoDepth ();
ShowHelpWindow ();
}
-
+
public bool HasChangedText {
get {
return undoDepth != Editor.Document.GetCurrentUndoDepth ();
@@ -303,7 +303,7 @@ namespace Mono.TextEditor
Editor.ScrollToCaret ();
Editor.Caret.Offset = baseOffset + link.PrimaryLink.EndOffset;
Editor.MainSelection = new Selection (Editor.Document.OffsetToLocation (baseOffset + link.PrimaryLink.Offset),
- Editor.Document.OffsetToLocation (baseOffset + link.PrimaryLink.EndOffset));
+ Editor.Document.OffsetToLocation (baseOffset + link.PrimaryLink.EndOffset));
Editor.Document.CommitUpdateAll ();
}
@@ -342,7 +342,7 @@ namespace Mono.TextEditor
int offset = e.Offset - baseOffset;
int delta = e.ChangeDelta;
if (!IsInUpdate && !links.Where (link => link.Links.Where (segment => segment.Contains (offset)
- || segment.EndOffset == offset).
+ || segment.EndOffset == offset).
Any ()).Any ()) {
SetCaretPosition = false;
ExitTextLinkMode ();
@@ -547,7 +547,6 @@ namespace Mono.TextEditor
{
this.mode = mode;
}
-
#region ITooltipProvider implementation
public override TooltipItem GetItem (TextEditor Editor, int offset)
{
@@ -578,10 +577,10 @@ namespace Mono.TextEditor
requiredWidth = win.SetMaxWidth (win.Screen.Width);
xalign = 0.5;
}
- #endregion
+ #endregion
}
- public class TextLinkMarker : TextLineMarker, IBackgroundMarker, IGutterMarker
+ public class TextLinkMarker : MarginMarker
{
TextLinkEditMode mode;
@@ -596,116 +595,38 @@ namespace Mono.TextEditor
IsVisible = true;
}
- /*
- void InternalDrawBackground (TextEditor Editor, Gdk.Drawable win, Pango.Layout layout, bool selected, int startOffset, int endOffset, int y, ref int startXPos, int endXPos, ref bool drawBg)
- {
- Gdk.Rectangle clipRectangle = new Gdk.Rectangle (mode.Editor.TextViewMargin.XOffset, 0,
- Editor.Allocation.Width - mode.Editor.TextViewMargin.XOffset, Editor.Allocation.Height);
-
- // draw default background
- using (Gdk.GC fillGc = new Gdk.GC (win)) {
- fillGc.ClipRectangle = clipRectangle;
- fillGc.RgbFgColor = selected ? Editor.ColorStyle.Selection.BackgroundColor : Editor.ColorStyle.Default.BackgroundColor;
- win.DrawRectangle (fillGc, true, startXPos, y, endXPos, Editor.LineHeight);
- }
-
- if (startOffset >= endOffset)
- return;
-
- int caretOffset = Editor.Caret.Offset - BaseOffset;
- foreach (TextLink link in mode.Links) {
- if (!link.IsEditable)
- continue;
- bool isPrimaryHighlighted = link.PrimaryLink.Offset <= caretOffset && caretOffset <= link.PrimaryLink.EndOffset;
-
- foreach (TextSegment segment in link.Links) {
-
- if ((BaseOffset + segment.Offset <= startOffset && startOffset < BaseOffset + segment.EndOffset) ||
- (startOffset <= BaseOffset + segment.Offset && BaseOffset + segment.Offset < endOffset)) {
- int strOffset = BaseOffset + segment.Offset - startOffset;
- int strEndOffset = BaseOffset + segment.EndOffset - startOffset;
-
- int lineNr, x_pos, x_pos2;
- layout.IndexToLineX (strOffset, false, out lineNr, out x_pos);
- layout.IndexToLineX (strEndOffset, false, out lineNr, out x_pos2);
- x_pos = (int)(x_pos / Pango.Scale.PangoScale);
- x_pos2 = (int)(x_pos2 / Pango.Scale.PangoScale);
- using (Gdk.GC rectangleGc = new Gdk.GC (win)) {
- rectangleGc.ClipRectangle = clipRectangle;
- using (Gdk.GC fillGc = new Gdk.GC (win)) {
- fillGc.ClipRectangle = clipRectangle;
- drawBg = false;
-
- if (segment == link.PrimaryLink) {
- fillGc.RgbFgColor = isPrimaryHighlighted ? Editor.ColorStyle.PrimaryTemplateHighlighted.BackgroundColor : Editor.ColorStyle.PrimaryTemplate.BackgroundColor;
- rectangleGc.RgbFgColor = isPrimaryHighlighted ? Editor.ColorStyle.PrimaryTemplateHighlighted.Color : Editor.ColorStyle.PrimaryTemplate.Color;
- } else {
- fillGc.RgbFgColor = isPrimaryHighlighted ? Editor.ColorStyle.SecondaryTemplateHighlighted.BackgroundColor : Editor.ColorStyle.SecondaryTemplate.BackgroundColor;
- rectangleGc.RgbFgColor = isPrimaryHighlighted ? Editor.ColorStyle.SecondaryTemplateHighlighted.Color : Editor.ColorStyle.SecondaryTemplate.Color;
- }
- // Draw segment
- if (!selected)
- win.DrawRectangle (fillGc, true, startXPos, y, x_pos2 - x_pos, Editor.LineHeight);
-
- int x1 = startXPos + x_pos - 1;
- int x2 = startXPos + x_pos2 - 1;
- int y2 = y + Editor.LineHeight - 1;
-
- win.DrawLine (rectangleGc, x1, y, x2, y);
- win.DrawLine (rectangleGc, x1, y2, x2, y2);
- win.DrawLine (rectangleGc, x1, y, x1, y2);
- win.DrawLine (rectangleGc, x2, y, x2, y2);
- }
- }
- }
- }
- }
- startXPos += Editor.GetWidth (Editor.Document.GetTextBetween (startOffset, endOffset));
- }
- */
- /* bool Overlaps (TextSegment segment, int start, int end)
+ public override bool DrawBackground (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
{
- return segment.Offset <= start && start < segment.EndOffset ||
- segment.Offset <= end && end < segment.EndOffset ||
- start <= segment.Offset && segment.Offset < end ||
- start < segment.EndOffset && segment.EndOffset < end;
- }*/
-
- public bool DrawBackground (TextEditor Editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg)
- {
- int caretOffset = Editor.Caret.Offset - BaseOffset;
+ int caretOffset = editor.Caret.Offset - BaseOffset;
- foreach (TextLink link in mode.Links) {
+ foreach (var link in mode.Links) {
if (!link.IsEditable)
continue;
bool isPrimaryHighlighted = link.PrimaryLink.Offset <= caretOffset && caretOffset <= link.PrimaryLink.EndOffset;
-
foreach (TextSegment segment in link.Links) {
+ if ((BaseOffset + segment.Offset <= metrics.TextStartOffset && metrics.TextStartOffset < BaseOffset + segment.EndOffset) || (metrics.TextStartOffset <= BaseOffset + segment.Offset && BaseOffset + segment.Offset < metrics.TextEndOffset)) {
+ int strOffset = BaseOffset + segment.Offset - metrics.TextStartOffset;
+ int strEndOffset = BaseOffset + segment.EndOffset - metrics.TextStartOffset;
- if ((BaseOffset + segment.Offset <= startOffset && startOffset < BaseOffset + segment.EndOffset) || (startOffset <= BaseOffset + segment.Offset && BaseOffset + segment.Offset < endOffset)) {
- int strOffset = BaseOffset + segment.Offset - startOffset;
- int strEndOffset = BaseOffset + segment.EndOffset - startOffset;
-
- int x_pos = layout.Layout.IndexToPos (strOffset).X;
- int x_pos2 = layout.Layout.IndexToPos (strEndOffset).X;
+ int x_pos = metrics.Layout.Layout.IndexToPos (strOffset).X;
+ int x_pos2 = metrics.Layout.Layout.IndexToPos (strEndOffset).X;
x_pos = (int)(x_pos / Pango.Scale.PangoScale);
x_pos2 = (int)(x_pos2 / Pango.Scale.PangoScale);
- drawBg = false;
Cairo.Color fillGc, rectangleGc;
if (segment == link.PrimaryLink) {
- fillGc = isPrimaryHighlighted ? Editor.ColorStyle.PrimaryTemplateHighlighted.SecondColor : Editor.ColorStyle.PrimaryTemplate.SecondColor;
- rectangleGc = isPrimaryHighlighted ? Editor.ColorStyle.PrimaryTemplateHighlighted.SecondColor : Editor.ColorStyle.PrimaryTemplate.SecondColor;
+ fillGc = isPrimaryHighlighted ? editor.ColorStyle.PrimaryTemplateHighlighted.SecondColor : editor.ColorStyle.PrimaryTemplate.SecondColor;
+ rectangleGc = isPrimaryHighlighted ? editor.ColorStyle.PrimaryTemplateHighlighted.SecondColor : editor.ColorStyle.PrimaryTemplate.SecondColor;
} else {
- fillGc = isPrimaryHighlighted ? Editor.ColorStyle.SecondaryTemplateHighlighted.SecondColor : Editor.ColorStyle.SecondaryTemplate.SecondColor;
- rectangleGc = isPrimaryHighlighted ? Editor.ColorStyle.SecondaryTemplateHighlighted.Color : Editor.ColorStyle.SecondaryTemplate.Color;
+ fillGc = isPrimaryHighlighted ? editor.ColorStyle.SecondaryTemplateHighlighted.SecondColor : editor.ColorStyle.SecondaryTemplate.SecondColor;
+ rectangleGc = isPrimaryHighlighted ? editor.ColorStyle.SecondaryTemplateHighlighted.Color : editor.ColorStyle.SecondaryTemplate.Color;
}
// Draw segment
- double x1 = startXPos + x_pos - 1;
- double x2 = startXPos + x_pos2 - 1 + 0.5;
+ double x1 = metrics.TextRenderStartPosition + x_pos - 1;
+ double x2 = metrics.TextRenderStartPosition + x_pos2 - 1 + 0.5;
- cr.Rectangle (x1 + 0.5, y + 0.5, x2 - x1, Editor.LineHeight - 1);
+ cr.Rectangle (x1 + 0.5, y + 0.5, x2 - x1, editor.LineHeight - 1);
cr.Color = fillGc;
cr.FillPreserve ();
@@ -717,27 +638,45 @@ namespace Mono.TextEditor
}
return true;
}
-
#region IGutterMarker implementation
- public void DrawLineNumber (TextEditor editor, double width, Cairo.Context cr, Cairo.Rectangle area, DocumentLine lineSegment, int line, double x, double y, double lineHeight)
+
+ public override bool CanDrawForeground (Margin margin)
{
- var lineNumberBgGC = editor.ColorStyle.LineNumbers.Background;
- var lineNumberGC = editor.ColorStyle.LineNumbers.Foreground;
+ return margin is GutterMargin;
+ }
+
+ public override bool CanDrawBackground (Margin margin)
+ {
+ return margin is GutterMargin;
+ }
- cr.Rectangle (x, y, width, lineHeight);
- cr.Color = editor.Caret.Line == line ? editor.ColorStyle.LineMarker.Color : lineNumberGC;
+ public override bool DrawBackground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ var width = metrics.Width;
+
+ cr.Rectangle (metrics.X, metrics.Y, metrics.Width, metrics.Height);
+ var lineNumberGC = editor.ColorStyle.LineNumbers.Foreground;
+ cr.Color = editor.Caret.Line == metrics.LineNumber ? editor.ColorStyle.LineMarker.Color : lineNumberGC;
cr.Fill ();
-
- if (line <= editor.Document.LineCount) {
+
+ return true;
+ }
+
+ public override void DrawForeground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
+ {
+ var width = metrics.Width;
+ var lineNumberBgGC = editor.ColorStyle.LineNumbers.Background;
+
+ if (metrics.LineNumber <= editor.Document.LineCount) {
// Due to a mac? gtk bug I need to re-create the layout here
// otherwise I get pango exceptions.
using (var layout = PangoUtil.CreateLayout (editor)) {
layout.FontDescription = editor.Options.Font;
layout.Width = (int)width;
layout.Alignment = Pango.Alignment.Right;
- layout.SetText (line.ToString ());
+ layout.SetText (metrics.LineNumber.ToString ());
cr.Save ();
- cr.Translate (x + (int)width + (editor.Options.ShowFoldMargin ? 0 : -2), y);
+ cr.Translate (metrics.X + (int)width + (editor.Options.ShowFoldMargin ? 0 : -2), metrics.Y);
cr.Color = lineNumberBgGC;
cr.ShowLayout (layout);
cr.Restore ();
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/UnderlineMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/UnderlineMarker.cs
new file mode 100644
index 0000000..1bd3401
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/UnderlineMarker.cs
@@ -0,0 +1,141 @@
+//
+// UnderlineMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ public class UnderlineMarker: TextLineMarker
+ {
+ protected UnderlineMarker ()
+ {}
+
+ public UnderlineMarker (string colorName, int start, int end)
+ {
+ this.ColorName = colorName;
+ this.StartCol = start;
+ this.EndCol = end;
+ this.Wave = true;
+ }
+ public UnderlineMarker (Cairo.Color color, int start, int end)
+ {
+ this.Color = color;
+ this.StartCol = start;
+ this.EndCol = end;
+ this.Wave = false;
+ }
+
+ public string ColorName { get; set; }
+ public Cairo.Color Color { get; set; }
+ public int StartCol { get; set; }
+ public int EndCol { get; set; }
+ public bool Wave { get; set; }
+
+ public override void Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
+ {
+ var startOffset = metrics.TextStartOffset;
+ int endOffset = metrics.TextEndOffset;
+ double startXPos = metrics.TextRenderStartPosition;
+ double endXPos = metrics.TextRenderEndPosition;
+ var layout = metrics.Layout.Layout;
+
+ int markerStart = LineSegment.Offset + System.Math.Max (StartCol - 1, 0);
+ int markerEnd = LineSegment.Offset + (EndCol < 1 ? LineSegment.Length : EndCol - 1);
+ if (markerEnd < startOffset || markerStart > endOffset)
+ return;
+
+ if (editor.IsSomethingSelected) {
+ var range = editor.SelectionRange;
+ if (range.Contains (markerStart)) {
+ int end = System.Math.Min (markerEnd, range.EndOffset);
+ InternalDraw (markerStart, end, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
+ InternalDraw (range.EndOffset, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
+ return;
+ }
+ if (range.Contains (markerEnd)) {
+ InternalDraw (markerStart, range.Offset, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
+ InternalDraw (range.Offset, markerEnd, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
+ return;
+ }
+ if (markerStart <= range.Offset && range.EndOffset <= markerEnd) {
+ InternalDraw (markerStart, range.Offset, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
+ InternalDraw (range.Offset, range.EndOffset, editor, cr, layout, true, startOffset, endOffset, y, startXPos, endXPos);
+ InternalDraw (range.EndOffset, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
+ return;
+ }
+
+ }
+
+ InternalDraw (markerStart, markerEnd, editor, cr, layout, false, startOffset, endOffset, y, startXPos, endXPos);
+ }
+
+ void InternalDraw (int markerStart, int markerEnd, TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
+ {
+ if (markerStart >= markerEnd)
+ return;
+ double @from;
+ double to;
+ if (markerStart < startOffset && endOffset < markerEnd) {
+ @from = startXPos;
+ to = endXPos;
+ } else {
+ int start = startOffset < markerStart ? markerStart : startOffset;
+ int end = endOffset < markerEnd ? endOffset : markerEnd;
+ int /*lineNr,*/ x_pos;
+
+ x_pos = layout.IndexToPos (start - startOffset).X;
+ @from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+
+ x_pos = layout.IndexToPos (end - startOffset).X;
+
+ to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+ }
+ @from = System.Math.Max (@from, editor.TextViewMargin.XOffset);
+ to = System.Math.Max (to, editor.TextViewMargin.XOffset);
+ if (@from >= to) {
+ return;
+ }
+ double height = editor.LineHeight / 5;
+ if (selected) {
+ cr.Color = editor.ColorStyle.SelectedText.Foreground;
+ } else {
+ cr.Color = ColorName == null ? Color : editor.ColorStyle.GetChunkStyle (ColorName).Foreground;
+ }
+ if (Wave) {
+ Pango.CairoHelper.ShowErrorUnderline (cr, @from, y + editor.LineHeight - height, to - @from, height);
+ } else {
+ cr.LineWidth = 1;
+ cr.MoveTo (@from, y + editor.LineHeight - 1.5);
+ cr.LineTo (to, y + editor.LineHeight - 1.5);
+ cr.Stroke ();
+ }
+ }
+ }
+
+}
diff --git a/src/core/Mono.Texteditor/Mono.TextEditor/UrlMarker.cs b/src/core/Mono.Texteditor/Mono.TextEditor/UrlMarker.cs
new file mode 100644
index 0000000..2a59827
--- /dev/null
+++ b/src/core/Mono.Texteditor/Mono.TextEditor/UrlMarker.cs
@@ -0,0 +1,141 @@
+//
+// UrlMarker.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 Gdk;
+using Mono.TextEditor.Highlighting;
+
+namespace Mono.TextEditor
+{
+
+ public enum UrlType {
+ Unknown,
+ Url,
+ Email
+ }
+
+
+ public class UrlMarker : TextLineMarker, IDisposable
+ {
+ string url;
+ string style;
+ int startColumn;
+ int endColumn;
+ DocumentLine line;
+ UrlType urlType;
+ TextDocument doc;
+
+ public string Url {
+ get {
+ return url;
+ }
+ }
+
+ public int StartColumn {
+ get {
+ return startColumn;
+ }
+ }
+
+ public int EndColumn {
+ get {
+ return endColumn;
+ }
+ }
+
+ public UrlType UrlType {
+ get {
+ return urlType;
+ }
+ }
+
+ public UrlMarker (TextDocument doc, DocumentLine line, string url, UrlType urlType, string style, int startColumn, int endColumn)
+ {
+ this.doc = doc;
+ this.line = line;
+ this.url = url;
+ this.urlType = urlType;
+ this.style = style;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ doc.LineChanged += HandleDocLineChanged;
+ }
+
+ void HandleDocLineChanged (object sender, LineEventArgs e)
+ {
+ if (line == e.Line)
+ doc.RemoveMarker (this);
+ }
+
+ public void Dispose ()
+ {
+ if (doc != null) {
+ doc.LineChanged -= HandleDocLineChanged;
+ doc = null;
+ }
+ line = null;
+ }
+
+ public override void Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics)
+ {
+ var startOffset = metrics.TextStartOffset;
+ int endOffset = metrics.TextEndOffset;
+ double startXPos = metrics.TextRenderStartPosition;
+ double endXPos = metrics.TextRenderEndPosition;
+ var layout = metrics.Layout.Layout;
+ int markerStart = line.Offset + startColumn;
+ int markerEnd = line.Offset + endColumn;
+
+ if (markerEnd < startOffset || markerStart > endOffset)
+ return;
+
+ double @from;
+ double to;
+
+ if (markerStart < startOffset && endOffset < markerEnd) {
+ @from = startXPos;
+ to = endXPos;
+ } else {
+ int start = startOffset < markerStart ? markerStart : startOffset;
+ int end = endOffset < markerEnd ? endOffset : markerEnd;
+ int x_pos = layout.IndexToPos (start - startOffset).X;
+
+ @from = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+
+ x_pos = layout.IndexToPos (end - startOffset).X;
+
+ to = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
+ }
+
+ @from = System.Math.Max (@from, editor.TextViewMargin.XOffset);
+ to = System.Math.Max (to, editor.TextViewMargin.XOffset);
+ if (@from < to) {
+ cr.DrawLine (editor.ColorStyle.GetForeground (editor.ColorStyle.GetChunkStyle (style)), @from + 0.5, y + editor.LineHeight - 1.5, to + 0.5, y + editor.LineHeight - 1.5);
+ }
+ }
+ }
+
+}
diff --git a/src/core/Mono.Texteditor/Styles/DefaultStyle.json b/src/core/Mono.Texteditor/Styles/DefaultStyle.json
index e9f9181..90be686 100644
--- a/src/core/Mono.Texteditor/Styles/DefaultStyle.json
+++ b/src/core/Mono.Texteditor/Styles/DefaultStyle.json
@@ -69,26 +69,36 @@
{ "name": "Quick Diff(Changed)", "color":"orangesicle" },
{ "name": "Brace Matching(Rectangle)", "color":"orangesicle", "secondcolor":"orangesicle-light" },
- { "name": "Usages(Rectangle)", "color":"orangesicle", "secondcolor":"orangesicle-light" },
+ { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9" },
+ { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"#AB616B", "secondcolor":"white" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "name": "Message Bubble Error", "color":"aluminium5", "secondcolor":"#f5eae7"},
- { "name": "Message Bubble Warning", "color":"aluminium5", "secondcolor":"#f4eeda"}
- ],
+ { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
+ { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "name": "Message Bubble Error Marker", "color":"#df6962"},
+ { "name": "Message Bubble Error Tag", "color":"#d83f3f", "secondcolor":"white"},
+ { "name": "Message Bubble Error Counter", "color":"white", "secondcolor":"#d83f3f"},
+ { "name": "Message Bubble Error IconMargin", "color":"#d83f3f", "bordercolor":"#b12a2"},
+ { "name": "Message Bubble Error Line", "color":"#fbe4e6"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#e68100", "secondcolor":"white"},
+ { "name": "Message Bubble Warning Counter", "color":"white", "secondcolor":"#e68100"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#e68100", "bordercolor":"#c76f00"},
+ { "name": "Message Bubble Warning Line", "color":"#fff1da"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"text-black", "back":"white" },
@@ -185,6 +195,8 @@
{ "name": "User Variable Usage", "fore":"text-black" },
{ "name": "User Variable Declaration", "fore":"text-black" },
+ { "name": "String Format Items", "fore":"#FF0000" },
+
{ "name": "Syntax Error", "fore":"invalid-red" },
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
diff --git a/src/core/Mono.Texteditor/Styles/MonokaiStyle.json b/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
index a0d33a8..b92ee2b 100644
--- a/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
+++ b/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
@@ -46,8 +46,8 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#bebebe" },
- { "name": "Bookmarks", "color":"#FDD99B", "secondcolor":"#816647 " },
-
+ { "name": "Bookmarks", "color":"#FDD99B", "secondcolor":"#816647 " },
+
{ "name": "Underline(Error)", "color":"red" },
{ "name": "Underline(Warning)", "color":"#FFA500" },
{ "name": "Underline(Suggestion)", "color":"#8FC68F" },
@@ -57,26 +57,36 @@
{ "name": "Quick Diff(Changed)", "color":"#A4E22E" },
{ "name": "Brace Matching(Rectangle)", "color":"#6699CC", "secondcolor":"#AACCEE" },
- { "name": "Usages(Rectangle)", "color":"monokai-selection", "secondcolor":"#383830" },
+ { "name": "Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99" },
+ { "name": "Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#762C2C" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#eddcdc" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"#3E3D31", "secondcolor":"#3E3D31"},
- { "name": "Current Line Marker(Inactive)", "color":"#323229", "secondcolor":"#323229"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffff00", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"monokai-white", "secondcolor":"#7f4a81"},
- { "name": "Primary Link(Highlighted)", "color":"monokai-white", "secondcolor":"#b167b3"},
- { "name": "Secondary Link", "color":"monokai-white", "secondcolor":"#262228"},
- { "name": "Secondary Link(Highlighted)", "color":"monokai-white", "secondcolor":"#4e4552"},
-
- { "name": "Message Bubble Error", "color":"#FFFFFF", "secondcolor":"#440000"},
- { "name": "Message Bubble Warning", "color":"#000000", "secondcolor":"#444400"}
- ],
+ { "name": "Current Line Marker", "color":"#323229", "secondcolor":"#323229"},
+ { "name": "Current Line Marker(Inactive)", "color":"#2F2F28", "secondcolor":"#2F2F28"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffff00", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"monokai-white", "secondcolor":"#7f4a81"},
+ { "name": "Primary Link(Highlighted)", "color":"monokai-white", "secondcolor":"#b167b3"},
+ { "name": "Secondary Link", "color":"monokai-white", "secondcolor":"#262228"},
+ { "name": "Secondary Link(Highlighted)", "color":"monokai-white", "secondcolor":"#4e4552"},
+
+ { "name": "Message Bubble Error Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name": "Message Bubble Error Line", "color":"#7b645c"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name": "Message Bubble Warning Line", "color":"#807e5c"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"monokai-white", "back":"monokai-background" },
@@ -175,6 +185,8 @@
{ "name": "Syntax Error", "fore":"monokai-invalid", "back":"monokai-invalidBackground" },
+ { "name": "String Format Items", "fore":"monokai-white" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
diff --git a/src/core/Mono.Texteditor/Styles/NightshadeStyle.json b/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
index d0fe5f4..247bf14 100644
--- a/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
+++ b/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
@@ -66,8 +66,8 @@
{ "name": "Search result background", "color":"VisualBGVim" },
{ "name": "Search result background (highlighted)", "color":"VisualBGVim" },
- { "name": "Column Ruler", "color":"aluminium5" },
-
+ { "name": "Column Ruler", "color":"aluminium5" },
+
{ "name": "Fold Square", "color":"white", "secondcolor":"BlackVim" },
{ "name": "Fold Cross", "color":"white", "secondcolor":"BlackVim" },
@@ -86,7 +86,7 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#666666" },
- { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
+ { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
{ "name": "Underline(Error)", "color":"invalid-red" },
{ "name": "Underline(Warning)", "color":"butter2" },
@@ -98,25 +98,35 @@
{ "name": "Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
{ "name": "Usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
+ { "name": "Changing usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
- { "name": "Current Line Marker(Inactive)", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chocolate1", "secondcolor":"chocolate3"},
- { "name": "Primary Link(Highlighted)", "color":"chocolate1", "secondcolor":"chocolate2"},
- { "name": "Secondary Link", "color":"white", "secondcolor":"aluminium6"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium1", "secondcolor":"aluminium5"},
-
- { "name": "Message Bubble Error", "color":"aluminium3", "secondcolor":"#440000"},
- { "name": "Message Bubble Warning", "color":"aluminium3", "secondcolor":"#444400"}
- ],
+ { "name": "Current Line Marker", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
+ { "name": "Current Line Marker(Inactive)", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chocolate1", "secondcolor":"chocolate3"},
+ { "name": "Primary Link(Highlighted)", "color":"chocolate1", "secondcolor":"chocolate2"},
+ { "name": "Secondary Link", "color":"white", "secondcolor":"aluminium6"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium1", "secondcolor":"aluminium5"},
+
+ { "name": "Message Bubble Error Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name": "Message Bubble Error Line", "color":"#7b645c"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name": "Message Bubble Warning Line", "color":"#807e5c"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"NormalVim", "back":"BlackVim" },
@@ -215,13 +225,14 @@
{ "name": "Syntax Error", "fore":"scarletred1" },
+ { "name": "String Format Items", "fore":"NormalVim" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
{ "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
{ "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
{ "name": "Diff Line(Added)", "fore":"butter2" },
{ "name": "Diff Line(Removed)", "fore":"skyblue1" },
{ "name": "Diff Line(Changed)", "fore":"plum1" },
diff --git a/src/core/Mono.Texteditor/Styles/OblivionStyle.json b/src/core/Mono.Texteditor/Styles/OblivionStyle.json
index f22b2cf..ccb9a6a 100644
--- a/src/core/Mono.Texteditor/Styles/OblivionStyle.json
+++ b/src/core/Mono.Texteditor/Styles/OblivionStyle.json
@@ -41,8 +41,8 @@
{ "name": "Search result background", "color":"#006060" },
{ "name": "Search result background (highlighted)", "color":"#008080" },
- { "name": "Column Ruler", "color":"aluminium5" },
-
+ { "name": "Column Ruler", "color":"aluminium5" },
+
{ "name": "Fold Square", "color":"white", "secondcolor":"aluminium7" },
{ "name": "Fold Cross", "color":"white", "secondcolor":"aluminium7" },
@@ -61,7 +61,7 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#bebebe" },
- { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
+ { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
{ "name": "Underline(Error)", "color":"scarletred2" },
{ "name": "Underline(Warning)", "color":"butter2" },
@@ -72,26 +72,36 @@
{ "name": "Quick Diff(Changed)", "color":"chameleon2" },
{ "name": "Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
- { "name": "Usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
+ { "name": "Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99" },
+ { "name": "Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"aluminium7", "secondcolor":"aluminium7"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium7", "secondcolor":"aluminium7"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chocolate1", "secondcolor":"chocolate3"},
- { "name": "Primary Link(Highlighted)", "color":"chocolate1", "secondcolor":"chocolate2"},
- { "name": "Secondary Link", "color":"white", "secondcolor":"aluminium6"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium1", "secondcolor":"aluminium5"},
-
- { "name": "Message Bubble Error", "color":"aluminium3", "secondcolor":"#440000"},
- { "name": "Message Bubble Warning", "color":"aluminium3", "secondcolor":"#444400"}
- ],
+ { "name": "Current Line Marker", "color":"aluminium7", "secondcolor":"aluminium7"},
+ { "name": "Current Line Marker(Inactive)", "color":"aluminium7", "secondcolor":"aluminium7"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chocolate1", "secondcolor":"chocolate3"},
+ { "name": "Primary Link(Highlighted)", "color":"chocolate1", "secondcolor":"chocolate2"},
+ { "name": "Secondary Link", "color":"white", "secondcolor":"aluminium6"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium1", "secondcolor":"aluminium5"},
+
+ { "name": "Message Bubble Error Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name": "Message Bubble Error Line", "color":"#7b645c"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name": "Message Bubble Warning Line", "color":"#807e5c"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"aluminium2", "back":"aluminium6" },
@@ -190,6 +200,8 @@
{ "name": "Syntax Error", "fore":"scarletred1" },
+ { "name": "String Format Items", "fore":"chocolate2" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
diff --git a/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json b/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
index b290661..f78088c 100644
--- a/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
+++ b/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
@@ -21,7 +21,7 @@
{ "name":"blue", "value":"#268bd2" },
{ "name":"cyan", "value":"#2aa198" },
{ "name":"green", "value":"#859900" },
- { "name":"invalid-red", "value":"#ff0000"}
+ { "name":"invalid-red", "value":"#ff0000"}
],
"colors":[
@@ -30,8 +30,8 @@
{ "name": "Search result background", "color":"base02" },
{ "name": "Search result background (highlighted)", "color":"base02" },
- { "name": "Column Ruler", "color":"base1" },
-
+ { "name": "Column Ruler", "color":"base1" },
+
{ "name": "Fold Square", "color":"base01", "secondcolor":"base02" },
{ "name": "Fold Cross", "color":"base01", "secondcolor":"base02" },
@@ -50,7 +50,7 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#bebebe" },
- { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
+ { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
{ "name": "Underline(Error)", "color":"red" },
{ "name": "Underline(Warning)", "color":"orange" },
@@ -62,25 +62,35 @@
{ "name": "Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base02" },
{ "name": "Usages(Rectangle)", "color":"base02", "secondcolor":"base02" },
+ { "name": "Changing usages(Rectangle)", "color":"base02", "secondcolor":"base02" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"base02", "secondcolor":"base02"},
- { "name": "Current Line Marker(Inactive)", "color":"base02", "secondcolor":"base02"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "name": "Message Bubble Error", "color":"red", "secondcolor":"base03"},
- { "name": "Message Bubble Warning", "color":"yellow", "secondcolor":"base03"}
- ],
+ { "name": "Current Line Marker", "color":"base02", "secondcolor":"base02"},
+ { "name": "Current Line Marker(Inactive)", "color":"base02", "secondcolor":"base02"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "name": "Message Bubble Error Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name": "Message Bubble Error Line", "color":"#7b645c"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name": "Message Bubble Warning Line", "color":"#807e5c"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"base00", "back":"base03" },
@@ -179,6 +189,8 @@
{ "name": "Syntax Error", "fore":"invalid-red" },
+ { "name": "String Format Items", "fore":"base00" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
diff --git a/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json b/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
index d68c006..3aba9cb 100644
--- a/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
+++ b/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
@@ -21,7 +21,7 @@
{ "name":"blue", "value":"#268bd2" },
{ "name":"cyan", "value":"#2aa198" },
{ "name":"green", "value":"#859900" },
- { "name":"invalid-red", "value":"#ff0000"}
+ { "name":"invalid-red", "value":"#ff0000"}
],
"colors":[
@@ -30,8 +30,8 @@
{ "name": "Search result background", "color":"base3" },
{ "name": "Search result background (highlighted)", "color":"base3" },
- { "name": "Column Ruler", "color":"base1" },
-
+ { "name": "Column Ruler", "color":"base1" },
+
{ "name": "Fold Square", "color":"base01", "secondcolor":"base3" },
{ "name": "Fold Cross", "color":"base01", "secondcolor":"base3" },
@@ -50,7 +50,7 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#bebebe" },
- { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
+ { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
{ "name": "Underline(Error)", "color":"red" },
{ "name": "Underline(Warning)", "color":"orange" },
@@ -62,25 +62,35 @@
{ "name": "Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base3" },
{ "name": "Usages(Rectangle)", "color":"base3", "secondcolor":"base3" },
-
+ { "name": "Changing usages(Rectangle)", "color":"base3", "secondcolor":"base3" },
+
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"base3", "secondcolor":"base3"},
- { "name": "Current Line Marker(Inactive)", "color":"base3", "secondcolor":"base3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "name": "Message Bubble Error", "color":"red", "secondcolor":"base3"},
- { "name": "Message Bubble Warning", "color":"yellow", "secondcolor":"base3"}
- ],
+ { "name": "Current Line Marker", "color":"base3", "secondcolor":"base3"},
+ { "name": "Current Line Marker(Inactive)", "color":"base3", "secondcolor":"base3"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "name": "Message Bubble Error Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name": "Message Bubble Error Line", "color":"#7b645c"},
+
+ { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name": "Message Bubble Warning Line", "color":"#807e5c"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"base00", "back":"base3" },
@@ -179,6 +189,8 @@
{ "name": "Syntax Error", "fore":"invalid-red" },
+ { "name": "String Format Items", "fore":"base00" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
diff --git a/src/core/Mono.Texteditor/Styles/TangoStyle.json b/src/core/Mono.Texteditor/Styles/TangoStyle.json
index a9a5451..5e1401e 100644
--- a/src/core/Mono.Texteditor/Styles/TangoStyle.json
+++ b/src/core/Mono.Texteditor/Styles/TangoStyle.json
@@ -17,6 +17,7 @@
{ "name":"chameleon1", "value":"#8ae234" },
{ "name":"chameleon2", "value":"#73d216" },
{ "name":"chameleon3", "value":"#4e9a06" },
+ { "name":"skyblue0", "value":"#92BfFf" },
{ "name":"skyblue1", "value":"#729fcf" },
{ "name":"skyblue2", "value":"#3465a4" },
{ "name":"skyblue3", "value":"#204a87" },
@@ -40,8 +41,8 @@
{ "name": "Search result background", "color":"#F6B94D" },
{ "name": "Search result background (highlighted)", "color":"#E5992F" },
- { "name": "Column Ruler", "color":"aluminium3" },
-
+ { "name": "Column Ruler", "color":"aluminium3" },
+
{ "name": "Fold Square", "color":"aluminium4", "secondcolor":"white" },
{ "name": "Fold Cross", "color":"aluminium4", "secondcolor":"white" },
@@ -61,7 +62,7 @@
{ "name": "Completion Border", "color":"#C9C9C9" },
{ "name": "Completion Border(Inactive)", "color":"#666666" },
- { "name": "Bookmarks", "color":"white", "secondcolor":"skyblue" },
+ { "name": "Bookmarks", "color":"white", "secondcolor":"skyblue" },
{ "name": "Underline(Error)", "color":"scarletred2" },
{ "name": "Underline(Warning)", "color":"butter2" },
@@ -72,69 +73,67 @@
{ "name": "Quick Diff(Changed)", "color":"chameleon2" },
{ "name": "Brace Matching(Rectangle)", "color":"aluminium1", "secondcolor":"aluminium2" },
- { "name": "Usages(Rectangle)", "color":"#f5f5f5", "secondcolor":"aluminium1" },
+ { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9" },
+ { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD" },
{ "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
{ "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
- { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "name": "Message Bubble Error", "color":"aluminium5", "secondcolor":"#f5eae7"},
- { "name": "Message Bubble Warning", "color":"aluminium5", "secondcolor":"#f4eeda"}
- ],
+ { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
+ { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
+
+ { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
+ { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
+
+ { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"}
+ ],
"text":[
{ "name": "Plain Text", "fore":"black", "back":"white" },
- { "name": "Selected Text", "fore":"aluminium1", "back":"skyblue1" },
- { "name": "Selected Text(Inactive)", "fore":"aluminium1", "back":"aluminium3" },
+ { "name": "Selected Text", "back":"skyblue0" },
+ { "name": "Selected Text(Inactive)", "back":"aluminium3" },
- { "name": "Collapsed Text", "fore":"aluminium3", "back":"white" },
+ { "name": "Collapsed Text", "fore":"aluminium4", "back":"white" },
{ "name": "Line Numbers", "fore":"aluminium4", "back":"white"},
{ "name": "Punctuation", "fore":"black" },
{ "name": "Punctuation(Brackets)", "fore":"black" },
- { "name": "Comment(Line)", "fore":"chameleon3" },
- { "name": "Comment(Block)", "fore":"chameleon3" },
- { "name": "Comment(Doc)", "fore":"chameleon3" },
- { "name": "Comment(DocTag)", "fore":"chameleon3" },
- { "name": "Comment Tag", "fore":"chameleon3" },
- { "name": "Excluded Code", "fore":"chameleon3" },
+ { "name": "Comment(Line)", "fore":"aluminium4" },
+ { "name": "Comment(Block)", "fore":"aluminium4" },
+ { "name": "Comment(Doc)", "fore":"aluminium4" },
+ { "name": "Comment(DocTag)", "fore":"aluminium3" },
+ { "name": "Comment Tag", "fore":"aluminium4" },
+ { "name": "Excluded Code", "fore":"aluminium4" },
- { "name": "String", "fore":"plum2"},
- { "name": "String(Escape)", "fore":"plum3"},
- { "name": "String(C# @ Verbatim)", "fore":"plum2"},
+ { "name": "String", "fore":"scarletred3"},
+ { "name": "String(Escape)", "fore":"scarletred3", "weight":"bold"},
+ { "name": "String(C# @ Verbatim)", "fore":"scarletred3"},
- { "name": "Number", "fore":"plum2"},
+ { "name": "Number", "fore":"scarletred3"},
- { "name": "Preprocessor", "fore":"orange2" },
+ { "name": "Preprocessor", "fore":"butter3" },
{ "name": "Xml Text", "fore":"black" },
{ "name": "Xml Delimiter", "fore":"black" },
{ "name": "Xml Name", "fore":"skyblue3" },
- { "name": "Xml Attribute", "fore":"skyblue3", "style":"italic" },
- { "name": "Xml Attribute Quotes", "fore":"plum2" },
- { "name": "Xml Attribute Value", "fore":"plum2" },
- { "name": "Xml Comment", "fore":"chameleon3" },
- { "name": "Xml CData Section", "fore":"plum2" },
+ { "name": "Xml Attribute", "fore":"orange2" },
+ { "name": "Xml Attribute Quotes", "fore":"scarletred3" },
+ { "name": "Xml Attribute Value", "fore":"scarletred3" },
+ { "name": "Xml Comment", "fore":"aluminium4" },
+ { "name": "Xml CData Section", "fore":"scarletred3" },
- { "name": "Html Attribute Name", "fore":"black" },
- { "name": "Html Attribute Value", "fore":"plum2" },
- { "name": "Html Comment", "fore":"chameleon3" },
- { "name": "Html Element Name", "fore":"skyblue2" },
+ { "name": "Html Attribute Name", "fore":"orange2" },
+ { "name": "Html Attribute Value", "fore":"scarletred3" },
+ { "name": "Html Comment", "fore":"aluminium4" },
+ { "name": "Html Element Name", "fore":"skyblue3" },
{ "name": "Html Entity", "fore":"#c12dad" },
- { "name": "Html Operator", "fore":"skyblue2" },
+ { "name": "Html Operator", "fore":"skyblue3" },
{ "name": "Html Server-Side Script", "fore":"black", "back":"#fdf0bd" },
{ "name": "Html Tag Delimiter", "fore":"skyblue2" },
{ "name": "Razor Code", "fore":"black", "back":"#fdfaed" },
@@ -145,42 +144,42 @@
{ "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
{ "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
- { "name": "Keyword(Access)", "fore":"black", "weight":"bold" },
- { "name": "Keyword(Type)", "fore":"chameleon3", "weight":"bold" },
- { "name": "Keyword(Operator)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Selection)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Iteration)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Jump)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Context)", "fore":"skyblue3" },
- { "name": "Keyword(Exception)", "fore":"scarletred3", "weight":"bold" },
- { "name": "Keyword(Modifiers)", "fore":"plum3", "weight":"bold" },
- { "name": "Keyword(Constants)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Void)", "fore":"chameleon3", "weight":"bold" },
- { "name": "Keyword(Namespace)", "fore":"plum3", "weight":"bold" },
- { "name": "Keyword(Property)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Declaration)", "fore":"plum3", "weight":"bold" },
- { "name": "Keyword(Parameter)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Operator Declaration)", "fore":"skyblue3", "weight":"bold" },
- { "name": "Keyword(Other)", "fore":"skyblue3" },
-
- { "name": "User Types", "fore":"skyblue2" },
- { "name": "User Types(Enums)", "fore":"skyblue2" },
- { "name": "User Types(Interfaces)", "fore":"skyblue2" },
- { "name": "User Types(Delegates)", "fore":"skyblue2" },
- { "name": "User Types(Value types)", "fore":"skyblue2" },
- { "name": "User Types(Type parameters)", "fore":"skyblue2" },
-
- { "name": "User Field Usage", "fore":"plum3" },
- { "name": "User Field Declaration", "fore":"plum3" },
-
- { "name": "User Property Usage", "fore":"plum3" },
- { "name": "User Property Declaration", "fore":"plum3" },
-
- { "name": "User Event Usage", "fore":"plum3" },
- { "name": "User Event Declaration", "fore":"plum3" },
-
- { "name": "User Method Usage", "fore":"plum3" },
- { "name": "User Method Declaration", "fore":"plum3" },
+ { "name": "Keyword(Access)", "fore":"skyblue2" },
+ { "name": "Keyword(Type)", "fore":"skyblue2" },
+ { "name": "Keyword(Operator)", "fore":"skyblue2" },
+ { "name": "Keyword(Selection)", "fore":"skyblue2" },
+ { "name": "Keyword(Iteration)", "fore":"skyblue2" },
+ { "name": "Keyword(Jump)", "fore":"skyblue2" },
+ { "name": "Keyword(Context)", "fore":"skyblue2" },
+ { "name": "Keyword(Exception)", "fore":"skyblue2" },
+ { "name": "Keyword(Modifiers)", "fore":"skyblue2" },
+ { "name": "Keyword(Constants)", "fore":"skyblue2" },
+ { "name": "Keyword(Void)", "fore":"skyblue2" },
+ { "name": "Keyword(Namespace)", "fore":"skyblue2" },
+ { "name": "Keyword(Property)", "fore":"skyblue2" },
+ { "name": "Keyword(Declaration)", "fore":"skyblue2" },
+ { "name": "Keyword(Parameter)", "fore":"skyblue2" },
+ { "name": "Keyword(Operator Declaration)", "fore":"skyblue2" },
+ { "name": "Keyword(Other)", "fore":"skyblue2" },
+
+ { "name": "User Types", "fore":"plum2" },
+ { "name": "User Types(Enums)", "fore":"plum2" },
+ { "name": "User Types(Interfaces)", "fore":"plum2" },
+ { "name": "User Types(Delegates)", "fore":"plum2" },
+ { "name": "User Types(Value types)", "fore":"plum2" },
+ { "name": "User Types(Type parameters)", "fore":"plum2" },
+
+ { "name": "User Field Usage", "fore":"black", "style":"oblique" },
+ { "name": "User Field Declaration", "fore":"black", "style":"oblique" },
+
+ { "name": "User Property Usage", "fore":"black" },
+ { "name": "User Property Declaration", "fore":"black" },
+
+ { "name": "User Event Usage", "fore":"orange3", "style":"oblique" },
+ { "name": "User Event Declaration", "fore":"orange3", "style":"oblique" },
+
+ { "name": "User Method Usage", "fore":"black" },
+ { "name": "User Method Declaration", "fore":"black" },
{ "name": "User Parameter Usage", "fore":"black" },
{ "name": "User Parameter Declaration", "fore":"black" },
@@ -188,8 +187,10 @@
{ "name": "User Variable Usage", "fore":"black" },
{ "name": "User Variable Declaration", "fore":"black" },
- { "name": "Syntax Error", "fore":"scarletred1" },
+ { "name": "Syntax Error", "fore":"white", "back":"scarletred3" },
+ { "name": "String Format Items", "fore":"chocolate2" },
+
{ "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
{ "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
@@ -215,8 +216,8 @@
{ "name": "Script Comment", "fore":"chameleon3" },
{ "name": "Script Identifier" },
{ "name": "Script Keyword", "fore":"skyblue2" },
- { "name": "Script Number", "fore":"plum2" },
+ { "name": "Script Number", "fore":"scarletred3" },
{ "name": "Script Operator" },
- { "name": "Script String", "fore":"plum2" }
+ { "name": "Script String", "fore":"scarletred3" }
]
}
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json b/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
index a1c6b42..ec7d1bb 100644
--- a/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
+++ b/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
@@ -20,15 +20,16 @@
{ "name": "Quick Diff(Dirty)", "color":"yellow" },
{ "name": "Quick Diff(Changed)", "color":"green" },
- { "name": "Current Line Marker", "color":"white", "secondcolor":"gray"},
- { "name": "Current Line Marker(Inactive)", "color":"white", "secondcolor":"gray"},
+ { "name": "Current Line Marker", "color":"white", "secondcolor":"gray"},
+ { "name": "Current Line Marker(Inactive)", "color":"white", "secondcolor":"gray"},
{"name": "Indicator Margin", "color":"#F0F0F0" },
{"name": "Indicator Margin(Separator)", "color":"#F0F0F0" },
{"name": "Underline(Error)", "color":"#FF0000" },
{"name": "Underline(Warning)", "color":"comment-green" },
{"name": "Brace Matching(Rectangle)", "color":"#DBE0CC", "secondcolor":"#00000000" },
- {"name": "Usages(Rectangle)", "color":"#DBE0CC", "secondcolor":"#DBE0CC" }
+ { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9" },
+ { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD" }
],
"text":[
diff --git a/src/core/Mono.Texteditor/SyntaxModes/CSharpSyntaxMode.xml b/src/core/Mono.Texteditor/SyntaxModes/CSharpSyntaxMode.xml
index e67a970..c9abfff 100644
--- a/src/core/Mono.Texteditor/SyntaxModes/CSharpSyntaxMode.xml
+++ b/src/core/Mono.Texteditor/SyntaxModes/CSharpSyntaxMode.xml
@@ -318,12 +318,10 @@
</Rule>
<Rule name = "String">
- <Delimiters></Delimiters>
<Match color ="String(Escape)">\\(['"\\abfnrtv]|x[0-9a-fA-F]{2,4}|0\d\d)</Match>
</Rule>
<Rule name = "VerbatimString">
- <Delimiters></Delimiters>
<Match color ="String(Escape)">""</Match>
</Rule>
diff --git a/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml b/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
index 71a8c27..b41ef56 100644
--- a/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
+++ b/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
@@ -1,4 +1,4 @@
-<!-- CSharpSyntaxMode.xml
+<!-- FSharpSyntaxMode.xml
Author:
Mike Krüger <mkrueger at novell.com>
@@ -29,7 +29,7 @@
<Property name="BlockCommentEnd">*)</Property>
<Property name="StringQuote">"</Property>
<Property name="StringQuote">'</Property>
-
+
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#if</EolSpan>
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#else</EolSpan>
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#elif</EolSpan>
@@ -58,11 +58,27 @@
<Begin>@"</Begin>
<End>"</End>
</Span>
-
+
+ <Span color="String(C# @ Verbatim)" rule="TripleQuotedString" stopateol="false">
+ <Begin>"""</Begin>
+ <End>"""</End>
+ </Span>
+
<Span color="String" rule="String" stopateol="true">
<Begin>"</Begin>
<End>"</End>
</Span>
+
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span rule="String" stopateol = "false">
+ <Begin color="Keyword(Iteration)" flags="NewWord">let</Begin>
+ <End>=</End>
+ </Span>
+
<!--
<Span color="String" rule="String" stopateol="true" escape='\'>
@@ -115,7 +131,6 @@
<Word>else</Word>
<Word>end</Word>
<Word>if</Word>
- <Word>let</Word>
<Word>match</Word>
<Word>return</Word>
<Word>then</Word>
@@ -240,6 +255,13 @@
</Rule>
<Rule name="MultiComment">
+
+ <!-- let a = (* let s = "*)" *) -->
+ <Span rule="String" stopateol="true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
<Span color="Comment(Block)" rule="MultiComment">
<Begin>(*®)</Begin>
<End>*)</End>
@@ -263,6 +285,10 @@
<Match color ="String(Escape)">""</Match>
</Rule>
+ <Rule name = "TripleQuotedString">
+ <Delimiters></Delimiters>
+ </Rule>
+
<Rule name="XmlDocumentation">
<Delimiters><></Delimiters>
<Span color = "Comment(DocTag)" rule = "XmlDocumentationTag">
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ActionScriptSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ActionScriptSyntaxMode.xml
new file mode 100644
index 0000000..59947e7
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ActionScriptSyntaxMode.xml
@@ -0,0 +1,122 @@
+<!-- ActionScriptSyntaxMode.xml
+
+ Author:
+ Federico Di Gregorio <fog at initd.org>
+
+ Copyright (c) 2009 Federico Di Gregorio <fog at initd.org>
+
+ 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. -->
+
+<SyntaxMode name = "ActionScript" mimeTypes="application/actionscript">
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+ <Span color = "Comment(Line)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" stopateol = "true" escape='\"'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" stopateol = "true" escape='\"'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>new</Word>
+ <Word>typeof</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>var</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>function</Word>
+ <Word>class</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ <Word>internal</Word>
+ <Word>static</Word>
+ <Word>override</Word>
+ <Word>extends</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>package</Word>
+ <Word>import</Word>
+ <Word>use</Word>
+ <Word>namespace</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetAshxSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetAshxSyntaxMode.xml
new file mode 100644
index 0000000..923d7f3
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetAshxSyntaxMode.xml
@@ -0,0 +1,80 @@
+<!-- AspNetSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "ASP.NET ASHX/ASMX/ASIX" mimeTypes="application/x-ashx;application/x-asmx;application/x-asix" extends="text/x-csharp">
+ <!-- directives -->
+ <Span color = "Html Server-Side Script" tagColor="Html Server-Side Script" rule = "InTag">
+ <Begin><%@</Begin>
+ <End>%></End>
+ </Span>
+
+ <!-- tag definitions -->
+ <Rule name = "InTag">
+ <Span tagColor = "Xml Attribute Quotes" color = "Xml Attribute Value" rule="InLiteral">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span tagColor = "Xml Attribute Quotes" color = "Xml Attribute Value" rule="InLiteral">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <!-- comments -->
+ <Span tagColor = "Xml Delimiter" color = "Xml Comment" rule = "Comment">
+ <Begin><%--</Begin>
+ <End>--%></End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script">
+ <Begin><%</Begin>
+ <End>%></End>
+ </Span>
+
+ <!-- attributes -->
+ <Match expression="([A-Za-z0-9_]+[:[A-Za-z0-9_]+]?)([\s\n\r]*=)">
+ <Group color = "Html Attribute Name"/>
+ <Group color = "Html Operator"/>
+ </Match>
+ </Rule>
+
+ <Rule name = "InLiteral">
+ <!-- entities -->
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script">
+ <Begin><%</Begin>
+ <End>%></End>
+ </Span>
+ </Rule>
+
+ <Rule name = "Comment">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetSyntaxMode.xml
new file mode 100644
index 0000000..5801cf9
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetSyntaxMode.xml
@@ -0,0 +1,141 @@
+<!-- AspNetSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Asp.Net" mimeTypes="application/x-aspx;application/x-ascx;application/x-master-page">
+ <!-- directives -->
+ <Span color = "Html Server-Side Script" tagColor="Html Server-Side Script" rule = "InTag">
+ <Begin><%@</Begin>
+ <End>%></End>
+ </Span>
+
+ <!-- comments -->
+ <Span color = "Html Comment" rule = "Comment">
+ <Begin><%--</Begin>
+ <End>--%></End>
+ </Span>
+
+ <Span color = "Html Comment" rule = "Comment">
+ <Begin><!--</Begin>
+ <End>--></End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script">
+ <Begin><%</Begin>
+ <End>%></End>
+ </Span>
+
+ <!-- entities -->
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Attribute Name" rule = "InDocType">
+ <Begin><!</Begin>
+ <End>></End>
+ </Span>
+
+ <!-- CDATA section -->
+ <Span tagColor = "Html Tag Delimiter" color = "Xml CData Section" rule = "Comment">
+ <Begin><![CDATA[</Begin>
+ <End>]]></End>
+ </Span>
+
+ <!-- processing instructions -->
+ <Span tagColor = "Keyword(Declaration)" color = "Html Element Name" rule = "InTag">
+ <Begin><?</Begin>
+ <End>?></End>
+ </Span>
+
+ <!-- tags -->
+ <Span tagColor = "Html Tag Delimiter" color = "Html Element Name" rule = "InTag">
+ <Begin></</Begin>
+ <End>></End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Element Name" rule = "InTag">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>
+
+ <!-- tag definitions -->
+ <Rule name = "InDocType">
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ <Keywords color = "Html Element Name">
+ <Word>DOCTYPE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "InTag">
+ <Span color = "Html Attribute Value" rule="InLiteral">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "Html Attribute Value" rule="InLiteral">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <!-- comments -->
+ <Span color = "Html Comment" rule = "Comment">
+ <Begin><%--</Begin>
+ <End>--%></End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script">
+ <Begin><%</Begin>
+ <End>%></End>
+ </Span>
+
+ <!-- attributes -->
+ <Match expression="([A-Za-z0-9_]+[:[A-Za-z0-9_]+]?)([\s\n\r]*=)">
+ <Group color = "Html Attribute Name"/>
+ <Group color = "Html Operator"/>
+ </Match>
+ </Rule>
+
+ <Rule name = "InLiteral">
+ <!-- entities -->
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+
+ <!-- expressions -->
+ <Span color = "Razor Code" tagColor="Html Server-Side Script">
+ <Begin><%</Begin>
+ <End>%></End>
+ </Span>
+ </Rule>
+
+ <Rule name = "Comment">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.BooSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.BooSyntaxMode.xml
new file mode 100644
index 0000000..9666b73
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.BooSyntaxMode.xml
@@ -0,0 +1,251 @@
+<!-- BooSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Boo" mimeTypes="text/x-boo">
+
+ <Property name="LineComment">#</Property>
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">#</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "false" escape='\'>
+ <Begin>"""</Begin>
+ <End>"""</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "false" escape='"'>
+ <Begin>@@/</Begin>
+ <End>/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\">
+ <Begin>@/</Begin>
+ <End>/</End>
+ </Span>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>self</Word>
+ <Word>super</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>is</Word>
<Word>isa</Word>
+ <Word>and</Word>
+ <Word>or</Word>
+ <Word>not</Word>
+
+ <Word>as</Word>
<Word>cast</Word>
</Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>elif</Word>
+ <Word>if</Word>
+ <Word>match</Word>
+ <Word>case</Word>
+ <Word>unless</Word>
<Word>otherwise</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>for</Word>
+ <Word>in</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
<Word>goto</Word>
+ <Word>return</Word>
+ <Word>yield</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>pass</Word>
+
+ <Word>assert</Word>
+ <Word>array</Word>
+ <Word>matrix</Word>
+ <Word>print</Word>
+ <Word>gets</Word>
+ <Word>prompt</Word>
+ <Word>enumerate</Word>
+ <Word>zip</Word>
+ <Word>filter</Word>
+ <Word>map</Word>
+ <Word>cat</Word>
+ <Word>__eval__</Word>
+ <Word>__switch__</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>raise</Word>
+ <Word>ensure</Word>
+ <Word>except</Word>
+ <Word>retry</Word>
+ <Word>success</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>override</Word>
+ <Word>static</Word>
+
+ <Word>virtual</Word>
+ <Word>abstract</Word>
+
+ <Word>final</Word>
+ <Word>transient</Word>
+
+ <Word>partial</Word>
+
+ <Word>public</Word>
+ <Word>private</Word>
+ <Word>protected</Word>
+ <Word>internal</Word>
+
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ <Word>byte</Word>
+ <Word>sbyte</Word>
+ <Word>char</Word>
+ <Word>decimal</Word>
+ <Word>double</Word>
+ <Word>single</Word>
+ <Word>short</Word>
+ <Word>ushort</Word>
+ <Word>long</Word>
+ <Word>ulong</Word>
+ <Word>int</Word>
+ <Word>uint</Word>
+
+ <Word>date</Word>
+ <Word>timespan</Word>
+
+ <Word>object</Word>
+ <Word>string</Word>
+ <Word>duck</Word>
+ <Word>regex</Word>
+
+ <Word>do</Word>
+ <Word>of</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>import</Word>
+ <Word>from</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
<Word>get</Word>
+ <Word>set</Word>
+ <Word>value</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>interface</Word>
+ <Word>delegate</Word>
+ <Word>callable</Word>
+ <Word>enum</Word>
+ <Word>struct</Word>
+ <Word>macro</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ <Word>ref</Word>
+ <Word>out</Word>
+
+ <Word>constructor</Word>
+ <Word>destructor</Word>
+ <Word>def</Word>
+ <Word>event</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ <Word>explicit</Word>
+ <Word>implicit</Word>
+
+ <Word>operator</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>checked</Word>
+ <Word>unchecked</Word>
+ <Word>fixed</Word>
+ <Word>unsafe</Word>
+
+ <Word>using</Word>
+ <Word>lock</Word>
+ <Word>getter</Word>
+ <Word>required</Word>
+ <Word>rawArrayIndexing</Word>
+ <Word>normalArrayIndexing</Word>
+ <Word>yieldAll</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CGSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CGSyntaxMode.xml
new file mode 100644
index 0000000..91f584d
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CGSyntaxMode.xml
@@ -0,0 +1,462 @@
+<!--
+
+CGSyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2011 Xamarin <http://xamarin.com>
+
+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.
+-->
+
+<SyntaxMode name = "Cg Shader" mimeTypes="text/x-cgsrc">
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <Span color = "Comment(Line)" rule="Comment" tagColor="Preprocessor">
+ <Begin>#if 0</Begin>
+ <End>#endif|#else</End>
+ </Span>
+
+ <EolSpan color = "Preprocessor" rule="text.preprocessor" continuation="\">#</EolSpan>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>asm</Word>
+ <Word>asm_fragment</Word>
+ <Word>auto</Word>
+ <Word>case</Word>
+ <Word>class</Word>
+ <Word>column_major</Word>
+ <Word>compile</Word>
+ <Word>const</Word>
+ <Word>const_cast</Word>
+ <Word>continue</Word>
+ <Word>decl</Word>
+ <Word>default</Word>
+ <Word>delete</Word>
+ <Word>discard</Word>
+ <Word>do</Word>
+ <Word>dword</Word>
+ <Word>dynamic_cast</Word>
+ <Word>else</Word>
+ <Word>emit</Word>
+ <Word>enum</Word>
+ <Word>explicit</Word>
+ <Word>extern</Word>
+ <Word>for</Word>
+ <Word>friend</Word>
+ <Word>get</Word>
+ <Word>if</Word>
+ <Word>inline</Word>
+ <Word>interface</Word>
+ <Word>matrix</Word>
+ <Word>mutable</Word>
+ <Word>new</Word>
+ <Word>operator</Word>
+ <Word>packed</Word>
+ <Word>pass</Word>
+ <Word>pixelfragment</Word>
+ <Word>pixelshader</Word>
+ <Word>private</Word>
+ <Word>protected</Word>
+ <Word>public</Word>
+ <Word>register</Word>
+ <Word>reinterpret_cast</Word>
+ <Word>row_major</Word>
+ <Word>shared</Word>
+ <Word>sizeof</Word>
+ <Word>static_cast</Word>
+ <Word>string</Word>
+ <Word>struct</Word>
+ <Word>switch</Word>
+ <Word>technique</Word>
+ <Word>template</Word>
+ <Word>texture</Word>
+ <Word>texture1D</Word>
+ <Word>texture2D</Word>
+ <Word>texture3D</Word>
+ <Word>textureCUBE</Word>
+ <Word>textureRECT</Word>
+ <Word>this</Word>
+ <Word>typedef</Word>
+ <Word>typeid</Word>
+ <Word>typename</Word>
+ <Word>union</Word>
+ <Word>vector</Word>
+ <Word>vertexfragment</Word>
+ <Word>vertexshader</Word>
+ <Word>virtual</Word>
+ <Word>volatile</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>catch</Word>
+ <Word>throw</Word>
+ <Word>try</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>NULL</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>using</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>const</Word>
+ <Word>extern</Word>
+ <Word>in</Word>
+ <Word>inline</Word>
+ <Word>inout</Word>
+ <Word>static</Word>
+ <Word>out</Word>
+ <Word>uniform</Word>
+ <Word>varying</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>float</Word>
+ <Word>float1</Word>
+ <Word>float2</Word>
+ <Word>float3</Word>
+ <Word>float4</Word>
+ <Word>float1x1</Word>
+ <Word>float1x2</Word>
+ <Word>float1x3</Word>
+ <Word>float1x4</Word>
+ <Word>float2x1</Word>
+ <Word>float2x2</Word>
+ <Word>float2x3</Word>
+ <Word>float2x4</Word>
+ <Word>float3x1</Word>
+ <Word>float3x2</Word>
+ <Word>float3x3</Word>
+ <Word>float3x4</Word>
+ <Word>float4x1</Word>
+ <Word>float4x2</Word>
+ <Word>float4x3</Word>
+ <Word>float4x4</Word>
+
+ <Word>half</Word>
+ <Word>half1</Word>
+ <Word>half2</Word>
+ <Word>half3</Word>
+ <Word>half4</Word>
+ <Word>half1x1</Word>
+ <Word>half1x2</Word>
+ <Word>half1x3</Word>
+ <Word>half1x4</Word>
+ <Word>half2x1</Word>
+ <Word>half2x2</Word>
+ <Word>half2x3</Word>
+ <Word>half2x4</Word>
+ <Word>half3x1</Word>
+ <Word>half3x2</Word>
+ <Word>half3x3</Word>
+ <Word>half3x4</Word>
+ <Word>half4x1</Word>
+ <Word>half4x2</Word>
+ <Word>half4x3</Word>
+ <Word>half4x4</Word>
+
+ <Word>int</Word>
+ <Word>int1</Word>
+ <Word>int2</Word>
+ <Word>int3</Word>
+ <Word>int4</Word>
+ <Word>int1x1</Word>
+ <Word>int1x2</Word>
+ <Word>int1x3</Word>
+ <Word>int1x4</Word>
+ <Word>int2x1</Word>
+ <Word>int2x2</Word>
+ <Word>int2x3</Word>
+ <Word>int2x4</Word>
+ <Word>int3x1</Word>
+ <Word>int3x2</Word>
+ <Word>int3x3</Word>
+ <Word>int3x4</Word>
+ <Word>int4x1</Word>
+ <Word>int4x2</Word>
+ <Word>int4x3</Word>
+ <Word>int4x4</Word>
+
+ <Word>fixed</Word>
+ <Word>fixed1</Word>
+ <Word>fixed2</Word>
+ <Word>fixed3</Word>
+ <Word>fixed4</Word>
+ <Word>fixed1x1</Word>
+ <Word>fixed1x2</Word>
+ <Word>fixed1x3</Word>
+ <Word>fixed1x4</Word>
+ <Word>fixed2x1</Word>
+ <Word>fixed2x2</Word>
+ <Word>fixed2x3</Word>
+ <Word>fixed2x4</Word>
+ <Word>fixed3x1</Word>
+ <Word>fixed3x2</Word>
+ <Word>fixed3x3</Word>
+ <Word>fixed3x4</Word>
+ <Word>fixed4x1</Word>
+ <Word>fixed4x2</Word>
+ <Word>fixed4x3</Word>
+ <Word>fixed4x4</Word>
+
+ <Word>bool</Word>
+ <Word>bool1</Word>
+ <Word>bool2</Word>
+ <Word>bool3</Word>
+ <Word>bool4</Word>
+ <Word>bool1x1</Word>
+ <Word>bool1x2</Word>
+ <Word>bool1x3</Word>
+ <Word>bool1x4</Word>
+ <Word>bool2x1</Word>
+ <Word>bool2x2</Word>
+ <Word>bool2x3</Word>
+ <Word>bool2x4</Word>
+ <Word>bool3x1</Word>
+ <Word>bool3x2</Word>
+ <Word>bool3x3</Word>
+ <Word>bool3x4</Word>
+ <Word>bool4x1</Word>
+ <Word>bool4x2</Word>
+ <Word>bool4x3</Word>
+ <Word>bool4x4</Word>
+
+ <Word>sampler</Word>
+ <Word>sampler1D</Word>
+ <Word>sampler1DARRAY</Word>
+ <Word>sampler2D</Word>
+ <Word>sampler2DARRAY</Word>
+ <Word>sampler3D</Word>
+ <Word>samplerRECT</Word>
+ <Word>samplerCUBE</Word>
+
+ <Word>unsigned</Word>
+ <Word>signed</Word>
+ <Word>char</Word>
+ <Word>short</Word>
+ <Word>long</Word>
+ <Word>double</Word>
+
+ <Word>cint</Word>
+ <Word>cfloat</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>enum</Word>
+ <Word>struct</Word>
+ <Word>class</Word>
+ <Word>union</Word>
+ <Word>typedef</Word>
+ <Word>packed</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <!-- Cg standard library http://http.developer.nvidia.com/Cg/index_stdlib.html -->
+ <Word>abs</Word>
+ <Word>acos</Word>
+ <Word>all</Word>
+ <Word>any</Word>
+ <Word>asin</Word>
+ <Word>atan</Word>
+ <Word>atan2</Word>
+ <Word>ceil</Word>
+ <Word>clamp</Word>
+ <Word>clip</Word>
+ <Word>cos</Word>
+ <Word>cosh</Word>
+ <Word>cross</Word>
+ <Word>ddx</Word>
+ <Word>ddy</Word>
+ <Word>degrees</Word>
+ <Word>determinant</Word>
+ <Word>distance</Word>
+ <Word>dot</Word>
+ <Word>exp</Word>
+ <Word>exp2</Word>
+ <Word>faceforward</Word>
+ <Word>floatToIntBits</Word>
+ <Word>floatToRawIntBits</Word>
+ <Word>floor</Word>
+ <Word>fmod</Word>
+ <Word>frac</Word>
+ <Word>frexp</Word>
+ <Word>fwidth</Word>
+ <Word>intBitsToFloat</Word>
+ <Word>isfinite</Word>
+ <Word>isinf</Word>
+ <Word>isnan</Word>
+ <Word>ldexp</Word>
+ <Word>length</Word>
+ <Word>lerp</Word>
+ <Word>lit</Word>
+ <Word>log</Word>
+ <Word>log10</Word>
+ <Word>log2</Word>
+ <Word>max</Word>
+ <Word>min</Word>
+ <Word>modf</Word>
+ <Word>mul</Word>
+ <Word>normalize</Word>
+ <Word>pow</Word>
+ <Word>radians</Word>
+ <Word>reflect</Word>
+ <Word>refract</Word>
+ <Word>round</Word>
+ <Word>rsqrt</Word>
+ <Word>saturate</Word>
+ <Word>sign</Word>
+ <Word>sin</Word>
+ <Word>sincos</Word>
+ <Word>sinh</Word>
+ <Word>smoothstep</Word>
+ <Word>sqrt</Word>
+ <Word>step</Word>
+ <Word>tan</Word>
+ <Word>tanh</Word>
+ <Word>tex1D</Word>
+ <Word>tex1DARRAY</Word>
+ <Word>tex1DARRAYbias</Word>
+ <Word>tex1DARRAYcmpbias</Word>
+ <Word>tex1DARRAYcmplod</Word>
+ <Word>tex1DARRAYfetch</Word>
+ <Word>tex1DARRAYlod</Word>
+ <Word>tex1DARRAYproj</Word>
+ <Word>tex1DARRAYsize</Word>
+ <Word>tex1Dbias</Word>
+ <Word>tex1Dcmpbias</Word>
+ <Word>tex1Dcmplod</Word>
+ <Word>tex1Dfetch</Word>
+ <Word>tex1Dlod</Word>
+ <Word>tex1Dproj</Word>
+ <Word>tex1Dsize</Word>
+ <Word>tex2D</Word>
+ <Word>tex2DARRAY</Word>
+ <Word>tex2DARRAYbias</Word>
+ <Word>tex2DARRAYfetch</Word>
+ <Word>tex2DARRAYlod</Word>
+ <Word>tex2DARRAYproj</Word>
+ <Word>tex2DARRAYsize</Word>
+ <Word>tex2Dbias</Word>
+ <Word>tex2Dcmpbias</Word>
+ <Word>tex2Dcmplod</Word>
+ <Word>tex2Dfetch</Word>
+ <Word>tex2Dlod</Word>
+ <Word>tex2Dproj</Word>
+ <Word>tex2Dsize</Word>
+ <Word>tex3D</Word>
+ <Word>tex3Dbias</Word>
+ <Word>tex3Dfetch</Word>
+ <Word>tex3Dlod</Word>
+ <Word>tex3Dproj</Word>
+ <Word>tex3Dsize</Word>
+ <Word>texBUF</Word>
+ <Word>texBUFsize</Word>
+ <Word>texCUBE</Word>
+ <Word>texCUBEARRAY</Word>
+ <Word>texCUBEARRAYbias</Word>
+ <Word>texCUBEARRAYlod</Word>
+ <Word>texCUBEARRAYsize</Word>
+ <Word>texCUBEbias</Word>
+ <Word>texCUBElod</Word>
+ <Word>texCUBEproj</Word>
+ <Word>texCUBEsize</Word>
+ <Word>texRECT</Word>
+ <Word>texRECTbias</Word>
+ <Word>texRECTfetch</Word>
+ <Word>texRECTlod</Word>
+ <Word>texRECTproj</Word>
+ <Word>texRECTsize</Word>
+ <Word>transpose</Word>
+ <Word>trunc</Word>
+ </Keywords>
+
+ <Rule name = "text.preprocessor">
+ <Keywords color="Preprocessor">
+ <Word>define</Word>
+ <Word>elif</Word>
+ <Word>else</Word>
+ <Word>endif</Word>
+ <Word>error</Word>
+ <Word>if</Word>
+ <Word>ifdef</Word>
+ <Word>ifndef</Word>
+ <Word>include</Word>
+ <Word>pragma</Word>
+ <Word>undef</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+ <Rule name = "String">
+ </Rule>
+</SyntaxMode>
+
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CPPSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CPPSyntaxMode.xml
new file mode 100644
index 0000000..ca4bc25
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CPPSyntaxMode.xml
@@ -0,0 +1,139 @@
+<!-- CPPSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "C++" mimeTypes="text/x-c++src;text/x-objc++src;text/x-c++hdr;text/x-chdr" extends="text/x-csrc">
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+
+
+ <Span color = "Comment(Line)" rule="Comment" tagColor="Preprocessor">
+ <Begin>#if 0</Begin>
+ <End>#endif|#else</End>
+ </Span>
+
+ <EolSpan color = "Preprocessor" rule="text.preprocessor" continuation="\">#</EolSpan>
+
+ <Span color = "Comment(Line)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ <Word>base</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>new</Word>
+ <Word>delete</Word>
+
+ <Word>const_cast</Word>
+ <Word>dynamic_cast</Word>
+ <Word>reinterpret_cast</Word>
+ <Word>static_cast</Word>
+ <Word>static_assert</Word>
+ <Word>slots</Word>
+ <Word>signals</Word>
+ <Word>typeid</Word>
+ <Word>typename</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>using</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>private</Word>
+ <Word>protected</Word>
+ <Word>public</Word>
+
+ <Word>virtual</Word>
+
+ <Word>explicit</Word>
+
+ <Word>export</Word>
+ <Word>friend</Word>
+ <Word>mutable</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>template</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ <Word>operator</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ </Keywords>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSharpSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSharpSyntaxMode.xml
new file mode 100644
index 0000000..c9abfff
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSharpSyntaxMode.xml
@@ -0,0 +1,342 @@
+<!-- CSharpSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "C#" mimeTypes="text/x-csharp">
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#if</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#else</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#elif</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#endif</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#define</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#undef</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#warning</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#error</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.line">#line</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#region</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#endregion</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor.empty">#pragma</EolSpan>
+
+
+
+ <EolSpan color = "Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String(C# @ Verbatim)" rule="VerbatimString" stopateol = "false" escape='""'>
+ <Begin>@"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <Keywords color = "Punctuation">
+ <Word>+</Word>
+ <Word>-</Word>
+ <Word>*</Word>
+ <Word>/</Word>
+ <Word>%</Word>
+ <Word>^</Word>
+
+ <Word>?</Word>
+ <Word>:</Word>
+
+ <Word>&</Word>
+
+ <Word>=</Word>
+ <Word>;</Word>
+ <Word>,</Word>
+ <Word>.</Word>
+ </Keywords>
+
+ <Keywords color = "Punctuation(Brackets)">
+ <Word>(</Word>
+ <Word>)</Word>
+ <Word><</Word>
+ <Word>></Word>
+ <Word>{</Word>
+ <Word>}</Word>
+ <Word>[</Word>
+ <Word>]</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ <Word>base</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>as</Word>
+ <Word>is</Word>
+ <Word>new</Word>
+ <Word>sizeof</Word>
+ <Word>typeof</Word>
+ <Word>stackalloc</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ <Word>switch</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>foreach</Word>
+ <Word>in</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>yield</Word>
+ <Word>partial</Word>
+ <Word>global</Word>
+ <Word>where</Word>
+ <Word>__arglist</Word>
+ <Word>__makeref</Word>
+ <Word>__reftype</Word>
+ <Word>__refvalue</Word>
+ <Word>by</Word>
+ <Word>descending</Word>
+ <Word>from</Word>
+ <Word>group</Word>
+ <Word>into</Word>
+ <Word>orderby</Word>
+ <Word>select</Word>
+ <Word>let</Word>
+ <Word>ascending</Word>
+ <Word>join</Word>
+ <Word>on</Word>
+ <Word>equals</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>abstract</Word>
+ <Word>async</Word>
+ <Word>await</Word>
+ <Word>const</Word>
+ <Word>event</Word>
+ <Word>extern</Word>
+ <Word>override</Word>
+ <Word>readonly</Word>
+ <Word>sealed</Word>
+ <Word>static</Word>
+ <Word>virtual</Word>
+ <Word>volatile</Word>
+
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ <Word>internal</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ <Word>byte</Word>
+ <Word>char</Word>
+ <Word>decimal</Word>
+ <Word>double</Word>
+ <Word>float</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+ <Word>sbyte</Word>
+ <Word>short</Word>
+ <Word>uint</Word>
+ <Word>ushort</Word>
+ <Word>ulong</Word>
+ <Word>object</Word>
+ <Word>string</Word>
+ <Word>var</Word>
+ <Word>dynamic</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>using</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
<Word>get</Word>
+ <Word>set</Word>
+ <Word>add</Word>
+ <Word>remove</Word>
+ <Word>value</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>interface</Word>
+ <Word>delegate</Word>
+ <Word>enum</Word>
+ <Word>struct</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ <Word>params</Word>
+ <Word>ref</Word>
+ <Word>out</Word>
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ <Word>explicit</Word>
+ <Word>implicit</Word>
+
+ <Word>operator</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>checked</Word>
+ <Word>unchecked</Word>
+ <Word>fixed</Word>
+ <Word>unsafe</Word>
+ <Word>lock</Word>
+ </Keywords>
+
+ <Rule name = "text.preprocessor" ignorecase="True">
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ </Keywords>
+
+ <Keywords color = "Punctuation">
+ <Word>==</Word>
+ <Word>!=</Word>
+ <Word>!</Word>
+ <Word>&&</Word>
+ <Word>||</Word>
+ </Keywords>
+
+ <Keywords color = "Punctuation(Brackets)">
+ <Word>(</Word>
+ <Word>)</Word>
+ </Keywords>
+
+
+ <EolSpan color = "Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+ </Rule>
+
+ <Rule name = "text.preprocessor.empty" ignorecase="True">
+ <EolSpan color = "Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+ </Rule>
+
+ <Rule name = "text.preprocessor.line" ignorecase="True">
+
+ <Keywords color = "Keyword(Context)">
+ <Word>hidden</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <EolSpan color = "Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+ </Rule>
+
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ <Match color ="String(Escape)">\\(['"\\abfnrtv]|x[0-9a-fA-F]{2,4}|0\d\d)</Match>
+ </Rule>
+
+ <Rule name = "VerbatimString">
+ <Match color ="String(Escape)">""</Match>
+ </Rule>
+
+ <Rule name = "XmlDocumentation">
+ <Delimiters><></Delimiters>
+
+ <Span color = "Comment(DocTag)" rule = "XmlDocumentationTag">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>
+ </Rule>
+
+ <Rule name = "XmlDocumentationTag">
+
+
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSyntaxMode.xml
new file mode 100644
index 0000000..76980a8
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSyntaxMode.xml
@@ -0,0 +1,154 @@
+<!-- CSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "C" mimeTypes="text/x-csrc;text/x-objcsrc"> <!-- The C++ syntax mode handles .h files since they're often C++ -->
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <Span color = "Comment(Line)" rule="Comment" tagColor="Preprocessor">
+ <Begin>#if 0</Begin>
+ <End>#endif|#else</End>
+ </Span>
+
+ <EolSpan color = "Preprocessor" rule="text.preprocessor" continuation="\">#</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+
+ <Span color = "Comment(Line)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>sizeof</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ <Word>switch</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>NULL</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>const</Word>
+ <Word>extern</Word>
+ <Word>static</Word>
+ <Word>volatile</Word>
+ <Word>inline</Word>
+ <Word>register</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>char</Word>
+
+ <Word>double</Word>
+ <Word>float</Word>
+
+ <Word>short</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+
+ <Word>signed</Word>
+ <Word>unsigned</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>enum</Word>
+ <Word>struct</Word>
+ <Word>union</Word>
+ <Word>typedef</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>asm</Word>
+ <Word>auto</Word>
+ <Word>_Bool</Word>
+ <Word>_Complex</Word>
+ <Word>_Pragma</Word>
+ <Word>_Imaginary</Word>
+ </Keywords>
+
+ <Rule name = "text.preprocessor">
+ <Keywords color="Preprocessor">
+ <Word>if</Word>
+ <Word>ifn</Word>
+ <Word>else</Word>
+ <Word>error</Word>
+ <Word>line</Word>
+ <Word>pragma</Word>
+ <Word>undef</Word>
+ <Word>warning</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+ <Rule name = "String">
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ChangeLogSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ChangeLogSyntaxMode.xml
new file mode 100644
index 0000000..cd48128
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ChangeLogSyntaxMode.xml
@@ -0,0 +1,44 @@
+<!-- ChangeLogSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Changelog" mimeTypes="text/x-changelog">
+ <Match color = "String">\d{4}-\d{2}-\d{2}</Match>
+
+ <Span color = "Xml Name" rule ="InEmail">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>
+
+ <Span color = "Comment(Line)" rule="Comment" tagColor="Preprocessor">
+ <Begin flags="FirstNonWs">* </Begin>
+ <End>:</End>
+ </Span>
+
+ <Rule name = "InEmail">
+ </Rule>
+
+ <Rule name = "Comment">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CssSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CssSyntaxMode.xml
new file mode 100644
index 0000000..637a22b
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CssSyntaxMode.xml
@@ -0,0 +1,377 @@
+<!-- CssSyntaxMode.xml
+
+ Author:
+ Martin Lundberg <martin.lundberg at gmail.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "CSS" mimeTypes="text/css">
+ <Delimiters>&<>~!@%^*()+=|\#/{}[]:;"' , ?</Delimiters>
+
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+
+ <Span rule="Comment" color="Css Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span rule="Ruleset">
+ <Begin>{</Begin>
+ <End>}</End>
+ </Span>
+
+ <Rule name="Ruleset">
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color="Number">\s*\d+\s*</Match>
+
+ <Keywords color = "Css Keyword">
+ <Word>align-content</Word>
+ <Word>align-items</Word>
+ <Word>align-self</Word>
+ <Word>alignment-adjust</Word>
+ <Word>alignment-baseline</Word>
+ <Word>all</Word>
+ <Word>anchor-point</Word>
+ <Word>animation</Word>
+ <Word>animation-delay</Word>
+ <Word>animation-direction</Word>
+ <Word>animation-duration</Word>
+ <Word>animation-iteration-count</Word>
+ <Word>animation-name</Word>
+ <Word>animation-play-state</Word>
+ <Word>animation-timing-function</Word>
+ <Word>appearance</Word>
+ <Word>azimuth</Word>
+ <Word>backface-visibility</Word>
+ <Word>background</Word>
+ <Word>background-attachment</Word>
+ <Word>background-clip</Word>
+ <Word>background-color</Word>
+ <Word>background-image</Word>
+ <Word>background-origin</Word>
+ <Word>background-position</Word>
+ <Word>background-repeat</Word>
+ <Word>background-size</Word>
+ <Word>baseline-shift</Word>
+ <Word>binding</Word>
+ <Word>bleed</Word>
+ <Word>bookmark-label</Word>
+ <Word>bookmark-level</Word>
+ <Word>bookmark-state</Word>
+ <Word>bookmark-target</Word>
+ <Word>border</Word>
+ <Word>border-bottom</Word>
+ <Word>border-bottom-color</Word>
+ <Word>border-bottom-left-radius</Word>
+ <Word>border-bottom-right-radius</Word>
+ <Word>border-bottom-style</Word>
+ <Word>border-bottom-width</Word>
+ <Word>border-collapse</Word>
+ <Word>border-color</Word>
+ <Word>border-image</Word>
+ <Word>border-image-outset</Word>
+ <Word>border-image-repeat</Word>
+ <Word>border-image-slice</Word>
+ <Word>border-image-source</Word>
+ <Word>border-image-width</Word>
+ <Word>border-left</Word>
+ <Word>border-left-color</Word>
+ <Word>border-left-style</Word>
+ <Word>border-left-width</Word>
+ <Word>border-radius</Word>
+ <Word>border-right</Word>
+ <Word>border-right-color</Word>
+ <Word>border-right-style</Word>
+ <Word>border-right-width</Word>
+ <Word>border-spacing</Word>
+ <Word>border-style</Word>
+ <Word>border-top</Word>
+ <Word>border-top-color</Word>
+ <Word>border-top-left-radius</Word>
+ <Word>border-top-right-radius</Word>
+ <Word>border-top-style</Word>
+ <Word>border-top-width</Word>
+ <Word>border-width</Word>
+ <Word>bottom</Word>
+ <Word>box-decoration-break</Word>
+ <Word>box-shadow</Word>
+ <Word>box-sizing</Word>
+ <Word>break-after</Word>
+ <Word>break-before</Word>
+ <Word>break-inside</Word>
+ <Word>caption-side</Word>
+ <Word>clear</Word>
+ <Word>clip</Word>
+ <Word>color</Word>
+ <Word>color-profile</Word>
+ <Word>column-count</Word>
+ <Word>column-fill</Word>
+ <Word>column-gap</Word>
+ <Word>column-rule</Word>
+ <Word>column-rule-color</Word>
+ <Word>column-rule-style</Word>
+ <Word>column-rule-width</Word>
+ <Word>column-span</Word>
+ <Word>column-width</Word>
+ <Word>columns</Word>
+ <Word>content</Word>
+ <Word>counter-increment</Word>
+ <Word>counter-reset</Word>
+ <Word>crop</Word>
+ <Word>cue</Word>
+ <Word>cue-after</Word>
+ <Word>cue-before</Word>
+ <Word>cursor</Word>
+ <Word>direction</Word>
+ <Word>display</Word>
+ <Word>dominant-baseline</Word>
+ <Word>drop-initial-after-adjust</Word>
+ <Word>drop-initial-after-align</Word>
+ <Word>drop-initial-before-adjust</Word>
+ <Word>drop-initial-before-align</Word>
+ <Word>drop-initial-size</Word>
+ <Word>drop-initial-value</Word>
+ <Word>elevation</Word>
+ <Word>empty-cells</Word>
+ <Word>fit</Word>
+ <Word>fit-position</Word>
+ <Word>flex</Word>
+ <Word>flex-basis</Word>
+ <Word>flex-direction</Word>
+ <Word>flex-flow</Word>
+ <Word>flex-grow</Word>
+ <Word>flex-shrink</Word>
+ <Word>flex-wrap</Word>
+ <Word>float</Word>
+ <Word>float-offset</Word>
+ <Word>font</Word>
+ <Word>font-feature-settings</Word>
+ <Word>font-family</Word>
+ <Word>font-kerning</Word>
+ <Word>font-language-override</Word>
+ <Word>font-size</Word>
+ <Word>font-size-adjust</Word>
+ <Word>font-stretch</Word>
+ <Word>font-style</Word>
+ <Word>font-synthesis</Word>
+ <Word>font-variant</Word>
+ <Word>font-variant-alternates</Word>
+ <Word>font-variant-caps</Word>
+ <Word>font-variant-east-asian</Word>
+ <Word>font-variant-ligatures</Word>
+ <Word>font-variant-numeric</Word>
+ <Word>font-variant-position</Word>
+ <Word>font-weight</Word>
+ <Word>grid-cell</Word>
+ <Word>grid-column</Word>
+ <Word>grid-column-align</Word>
+ <Word>grid-column-sizing</Word>
+ <Word>grid-column-span</Word>
+ <Word>grid-columns</Word>
+ <Word>grid-flow</Word>
+ <Word>grid-row</Word>
+ <Word>grid-row-align</Word>
+ <Word>grid-row-sizing</Word>
+ <Word>grid-row-span</Word>
+ <Word>grid-rows</Word>
+ <Word>grid-template</Word>
+ <Word>hanging-punctuation</Word>
+ <Word>height</Word>
+ <Word>hyphens</Word>
+ <Word>icon</Word>
+ <Word>image-orientation</Word>
+ <Word>image-rendering</Word>
+ <Word>image-resolution</Word>
+ <Word>ime-mode</Word>
+ <Word>inline-box-align</Word>
+ <Word>justify-content</Word>
+ <Word>left</Word>
+ <Word>letter-spacing</Word>
+ <Word>line-break</Word>
+ <Word>line-height</Word>
+ <Word>line-stacking</Word>
+ <Word>line-stacking-ruby</Word>
+ <Word>line-stacking-shift</Word>
+ <Word>line-stacking-strategy</Word>
+ <Word>list-style</Word>
+ <Word>list-style-image</Word>
+ <Word>list-style-position</Word>
+ <Word>list-style-type</Word>
+ <Word>margin</Word>
+ <Word>margin-bottom</Word>
+ <Word>margin-left</Word>
+ <Word>margin-right</Word>
+ <Word>margin-top</Word>
+ <Word>marker-offset</Word>
+ <Word>marks</Word>
+ <Word>marquee-direction</Word>
+ <Word>marquee-loop</Word>
+ <Word>marquee-play-count</Word>
+ <Word>marquee-speed</Word>
+ <Word>marquee-style</Word>
+ <Word>max-height</Word>
+ <Word>max-width</Word>
+ <Word>min-height</Word>
+ <Word>min-width</Word>
+ <Word>move-to</Word>
+ <Word>nav-down</Word>
+ <Word>nav-index</Word>
+ <Word>nav-left</Word>
+ <Word>nav-right</Word>
+ <Word>nav-up</Word>
+ <Word>opacity</Word>
+ <Word>order</Word>
+ <Word>orphans</Word>
+ <Word>outline</Word>
+ <Word>outline-color</Word>
+ <Word>outline-offset</Word>
+ <Word>outline-style</Word>
+ <Word>outline-width</Word>
+ <Word>overflow</Word>
+ <Word>overflow-style</Word>
+ <Word>overflow-wrap</Word>
+ <Word>overflow-x</Word>
+ <Word>overflow-y</Word>
+ <Word>padding</Word>
+ <Word>padding-bottom</Word>
+ <Word>padding-left</Word>
+ <Word>padding-right</Word>
+ <Word>padding-top</Word>
+ <Word>page</Word>
+ <Word>page-break-after</Word>
+ <Word>page-break-before</Word>
+ <Word>page-break-inside</Word>
+ <Word>page-policy</Word>
+ <Word>pause</Word>
+ <Word>pause-after</Word>
+ <Word>pause-before</Word>
+ <Word>perspective</Word>
+ <Word>perspective-origin</Word>
+ <Word>pitch</Word>
+ <Word>pitch-range</Word>
+ <Word>play-during</Word>
+ <Word>position</Word>
+ <Word>presentation-level</Word>
+ <Word>punctuation-trim</Word>
+ <Word>quotes</Word>
+ <Word>rendering-intent</Word>
+ <Word>resize</Word>
+ <Word>rest</Word>
+ <Word>rest-after</Word>
+ <Word>rest-before</Word>
+ <Word>richness</Word>
+ <Word>right</Word>
+ <Word>rotation</Word>
+ <Word>rotation-point</Word>
+ <Word>ruby-align</Word>
+ <Word>ruby-overhang</Word>
+ <Word>ruby-position</Word>
+ <Word>ruby-span</Word>
+ <Word>size</Word>
+ <Word>speak</Word>
+ <Word>speak-as</Word>
+ <Word>speak-header</Word>
+ <Word>speak-numeral</Word>
+ <Word>speak-punctuation</Word>
+ <Word>speech-rate</Word>
+ <Word>stress</Word>
+ <Word>string-set</Word>
+ <Word>tab-size</Word>
+ <Word>table-layout</Word>
+ <Word>target</Word>
+ <Word>target-name</Word>
+ <Word>target-new</Word>
+ <Word>target-position</Word>
+ <Word>text-align</Word>
+ <Word>text-align-last</Word>
+ <Word>text-decoration</Word>
+ <Word>text-decoration-color</Word>
+ <Word>text-decoration-line</Word>
+ <Word>text-decoration-skip</Word>
+ <Word>text-decoration-style</Word>
+ <Word>text-emphasis</Word>
+ <Word>text-emphasis-color</Word>
+ <Word>text-emphasis-position</Word>
+ <Word>text-emphasis-style</Word>
+ <Word>text-height</Word>
+ <Word>text-indent</Word>
+ <Word>text-justify</Word>
+ <Word>text-outline</Word>
+ <Word>text-overflow</Word>
+ <Word>text-shadow</Word>
+ <Word>text-space-collapse</Word>
+ <Word>text-transform</Word>
+ <Word>text-underline-position</Word>
+ <Word>text-wrap</Word>
+ <Word>top</Word>
+ <Word>transform</Word>
+ <Word>transform-origin</Word>
+ <Word>transform-style</Word>
+ <Word>transition</Word>
+ <Word>transition-delay</Word>
+ <Word>transition-duration</Word>
+ <Word>transition-property</Word>
+ <Word>transition-timing-function</Word>
+ <Word>unicode-bidi</Word>
+ <Word>vertical-align</Word>
+ <Word>visibility</Word>
+ <Word>voice-balance</Word>
+ <Word>voice-duration</Word>
+ <Word>voice-family</Word>
+ <Word>voice-pitch</Word>
+ <Word>voice-range</Word>
+ <Word>voice-rate</Word>
+ <Word>voice-stress</Word>
+ <Word>voice-volume</Word>
+ <Word>volume</Word>
+ <Word>white-space</Word>
+ <Word>widows</Word>
+ <Word>width</Word>
+ <Word>word-break</Word>
+ <Word>word-spacing</Word>
+ <Word>word-wrap</Word>
+ <Word>z-index</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.DiffSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.DiffSyntaxMode.xml
new file mode 100644
index 0000000..da52d55
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.DiffSyntaxMode.xml
@@ -0,0 +1,46 @@
+<!-- DiffSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Diff" mimeTypes="text/x-patch;text/x-diff">
+
+ <EolSpan color = "Diff Header(Separator)" rule ="InLocation" flags="StartsLine">====</EolSpan>
+ <EolSpan color = "Diff Line(Changed)" rule ="InLocation" flags="StartsLine">!</EolSpan>
+
+ <EolSpan color = "Diff Header(New)" rule ="InLocation" flags="StartsLine" >+++</EolSpan>
+ <EolSpan color = "Diff Line(Added)" rule ="InLocation" flags="StartsLine">+</EolSpan>
+ <EolSpan color = "Diff Line(Added)" rule ="InLocation" flags="StartsLine">></EolSpan>
+
+ <EolSpan color = "Diff Header(Old)" rule ="InLocation" flags="StartsLine">---</EolSpan>
+ <EolSpan color = "Diff Line(Removed)" rule ="InLocation" flags="StartsLine">-</EolSpan>
+ <EolSpan color = "Diff Line(Removed)" rule ="InLocation" flags="StartsLine"><</EolSpan>
+
+ <EolSpan color = "Diff Header" rule ="InLocation" flags="StartsLine">Index:</EolSpan>
+ <EolSpan color = "Diff Header" rule ="InLocation" flags="StartsLine">diff </EolSpan>
+
+ <EolSpan color = "Diff Location" rule ="InLocation">@@</EolSpan>
+
+ <Rule name = "InLocation">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.FSharpSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.FSharpSyntaxMode.xml
new file mode 100644
index 0000000..b41ef56
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.FSharpSyntaxMode.xml
@@ -0,0 +1,300 @@
+<!-- FSharpSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name="F#" mimeTypes="text/x-fsharp">
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">(*</Property>
+ <Property name="BlockCommentEnd">*)</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#if</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#else</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#elif</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#endif</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#load</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#r</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#reference</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#nowarn</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#time</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#q</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#quit</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#help</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#include</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#I</EolSpan>
+ <EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#light</EolSpan>
+
+ <EolSpan color="Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color="Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color="Comment(Block)" rule="MultiComment" tagColor="Comment(Line)">
+ <Begin>(*®)</Begin>
+ <End>*)</End>
+ </Span>
+
+ <Span color="String(C# @ Verbatim)" rule="VerbatimString" stopateol="false" escape='""'>
+ <Begin>@"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color="String(C# @ Verbatim)" rule="TripleQuotedString" stopateol="false">
+ <Begin>"""</Begin>
+ <End>"""</End>
+ </Span>
+
+ <Span color="String" rule="String" stopateol="true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span rule="String" stopateol = "false">
+ <Begin color="Keyword(Iteration)" flags="NewWord">let</Begin>
+ <End>=</End>
+ </Span>
+
+
+<!--
+ <Span color="String" rule="String" stopateol="true" escape='\'>
+ <Begin>[]</Begin>
+ <End>"</End>
+ </Span>
+ -->
+
+ <!-- ' is also used for type parameters therefore we need a regex match to find out if something is a string -->
+ <Match expression="('(.|(\\.+))')">
+ <Group color = "String"/>
+ <Group color = "String"/>
+ <Group color = "String"/>
+ </Match>
+
+ <Match color="Number">CSharpNumber</Match>
+
+ <!-- It is really impossible to do some intelligent grouping here, because
+ it looks weird no matter what we do... some things are context-sensitive,
+ some things may appear in unexpected place.. so just use single color -->
+
+ <Keywords color="Keyword(Jump)">
+ <!-- expressions that create some value -->
+ <Word>fun</Word>
+ <Word>function</Word>
+ <Word>new</Word>
+ </Keywords>
+
+ <Keywords color="Keyword(Iteration)">
+ <!-- control flow constructs -->
+ <Word>finally</Word>
+ <Word>try</Word>
+ <Word>with</Word>
+
+ <Word>val</Word>
+ <Word>use</Word>
+ <Word>yield</Word>
+ <Word>let!</Word>
+ <Word>use!</Word>
+ <Word>do!</Word>
+ <Word>yield!</Word>
+ <Word>return!</Word>
+ <Word>while</Word>
+ <Word>for</Word>
+
+ <Word>do</Word>
+ <Word>begin</Word>
+ <Word>done</Word>
+ <Word>elif</Word>
+ <Word>else</Word>
+ <Word>end</Word>
+ <Word>if</Word>
+ <Word>match</Word>
+ <Word>return</Word>
+ <Word>then</Word>
+ <Word>when</Word>
+
+ <!-- object model things -->
+ <Word>inline</Word>
+ <Word>static</Word>
+ <Word>abstract</Word>
+ <Word>override</Word>
+ <Word>private</Word>
+ <Word>public</Word>
+ <Word>extern</Word>
+ <Word>internal</Word>
+ <Word>mutable</Word>
+ <Word>rec</Word>
+ <Word>void</Word>
+
+ <Word>global</Word>
+ <Word>base</Word>
+ <Word>default</Word>
+ <Word>inherit</Word>
+ <Word>member</Word>
+ <Word>type</Word>
+
+ <Word>of</Word>
+ <Word>sig</Word>
+ <Word>class</Word>
+ <Word>delegate</Word>
+ <Word>exception</Word>
+ <Word>interface</Word>
+ <Word>struct</Word>
+ </Keywords>
+
+ <Keywords color="Keyword(Operator)">
+ <Word>as</Word>
+ <Word>assert</Word>
+ <Word>or</Word>
+ <Word>downto</Word>
+ <Word>in</Word>
+ <Word>to</Word>
+ <Word>upcast</Word>
+ <Word>lazy</Word>
+ <Word>and</Word>
+ <Word>downcast</Word>
+ </Keywords>
+
+ <Keywords color="Keyword(Constants)">
+ <Word>false</Word>
+ <Word>null</Word>
+ <Word>true</Word>
+
+ <Word>__LINE__</Word>
+ <Word>__SOURCE_DIRECTORY__</Word>
+ <Word>__SOURCE_FILE__</Word>
+ </Keywords>
+
+ <Keywords color="Keyword(Type)">
+ </Keywords>
+
+ <Keywords color="Keyword(Void)">
+ </Keywords>
+
+ <Keywords color="Keyword(Namespace)">
+ <Word>module</Word>
+ <Word>namespace</Word>
+ <Word>open</Word>
+ </Keywords>
+
+ <Keywords color="Keyword(Property)">
+ </Keywords>
+
+ <Keywords color="Keyword(Declaration)">
+ </Keywords>
+
+ <Keywords color="Keyword(Parameter)">
+ </Keywords>
+
+
+ <Keywords color="Keyword(Operator Declaration)">
+ </Keywords>
+
+ <Keywords color="Keyword(Other)">
+ </Keywords>
+
+ <Rule name="text.preprocessor" ignorecase="True">
+ <Span color = "String" rule="String" stopateol = "true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ </Keywords>
+
+ <Keywords color = "Punctuation">
+ <Word>==</Word>
+ <Word>!=</Word>
+ <Word>!</Word>
+ <Word>&&</Word>
+ <Word>||</Word>
+ </Keywords>
+
+ <Keywords color = "Punctuation(Brackets)">
+ <Word>(</Word>
+ <Word>)</Word>
+ </Keywords>
+
+
+ <EolSpan color = "Comment(Doc)" rule="XmlDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+ </Rule>
+
+ <Rule name="Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name="MultiComment">
+
+ <!-- let a = (* let s = "*)" *) -->
+ <Span rule="String" stopateol="true">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color="Comment(Block)" rule="MultiComment">
+ <Begin>(*®)</Begin>
+ <End>*)</End>
+ </Span>
+
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name="String">
+ <Delimiters></Delimiters>
+ <Match color ="String(Escape)">\\(["\\'ntbrafv]|u[0-9a-fA-F]{4,4}|U[0-9a-fA-F]{8,8}|\d\d\d)</Match>
+ </Rule>
+
+ <Rule name = "VerbatimString">
+ <Delimiters></Delimiters>
+ <Match color ="String(Escape)">""</Match>
+ </Rule>
+
+ <Rule name = "TripleQuotedString">
+ <Delimiters></Delimiters>
+ </Rule>
+
+ <Rule name="XmlDocumentation">
+ <Delimiters><></Delimiters>
+ <Span color = "Comment(DocTag)" rule = "XmlDocumentationTag">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>
+ </Rule>
+
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.HtmlSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.HtmlSyntaxMode.xml
new file mode 100644
index 0000000..2847416
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.HtmlSyntaxMode.xml
@@ -0,0 +1,191 @@
+<!--
+
+HtmlSyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<SyntaxMode name = "Html" mimeTypes="application/xhtml+xml;text/html">
+ <Property name="BlockCommentStart"><!--</Property>
+ <Property name="BlockCommentEnd">--></Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Xml Comment" rule = "Comment">
+ <Begin><!--</Begin>
+ <End>--></End>
+ </Span>
+
+ <Span color = "Html Entity" rule = "Comment">
+ <Begin>&</Begin>
+
+ <End>;</End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Attribute Name" rule = "InDocType">
+ <Begin><!</Begin>
+ <End>></End>
+ </Span>
+
+ <Span color = "Xml Delimiter" rule = "InJavascript" >
+ <Begin><script</Begin>
+ <End></script></End>
+ </Span>
+
+ <!-- processing instructions -->
+ <Span tagColor = "Keyword(Declaration)" color = "Html Tag Delimiter" rule = "InTag">
+ <Begin><?</Begin>
+ <End>?></End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Element Name" rule = "InTag">
+ <Begin></</Begin>
+ <End>></End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Element Name" rule = "InTag">
+ <Begin></</Begin>
+ <End>></End>
+ </Span>
+
+ <Span tagColor = "Html Tag Delimiter" color = "Html Element Name" rule = "InTag">
+ <Begin><</Begin>
+ <Exit>></Exit>
+ <End>/></End>
+ </Span>
+
+ <Rule name = "Comment">
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ </Rule>
+
+ <Rule name = "InDocType" >
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ <Keywords color = "Html Element Name">
+ <Word>DOCTYPE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "InTag">
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+
+ <Span color = "Html Attribute Value" rule="InLiteral">
+ <Begin>"</Begin>
+ <Exit><</Exit>
+ <End>"</End>
+ </Span>
+
+ <Span color = "Html Entity" rule="InLiteral">
+ <Begin>'</Begin>
+ <Exit><</Exit>
+ <End>'</End>
+ </Span>
+
+ <!-- attributes -->
+ <Match expression="([A-Za-z0-9_]+[:[A-Za-z0-9_]+]?)([\s\n\r]*=)">
+ <Group color = "Html Attribute Name"/>
+ <Group color = "Html Operator"/>
+ </Match>
+ </Rule>
+
+ <Rule name = "InLiteral">
+ <Span color = "Html Entity">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ </Rule>
+
+ <Rule name = "InJavascript">
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+ <Span color = "Comment(Line)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" stopateol = "true" escape="\">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" stopateol = "true" escape="\">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>new</Word>
+ <Word>typeof</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>var</Word>
+ <Word>function</Word>
+ </Keywords>
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ILSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ILSyntaxMode.xml
new file mode 100644
index 0000000..ee8cef4
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ILSyntaxMode.xml
@@ -0,0 +1,578 @@
+<!-- ILSyntaxMode.xml
+
+ Authors:
+ Mike Krüger <mkrueger at novell.com>
+ Alex Roenne Petersen <xtzgzorex at gmail.com>
+
+ Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+ Copyright (c) 2011 Xamarin, Inc (http://www.xamarin.com)
+
+ 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. -->
+
+<SyntaxMode name = "IL" mimeTypes="text/x-ilasm">
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+
+ <Delimiters>&<>~!@%^*()-+=|\#/{}[]:;"' , ?</Delimiters>
+
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>nop</Word>
+ <Word>break</Word>
+ <Word>ldarg.0</Word>
+ <Word>ldarg.1</Word>
+ <Word>ldarg.2</Word>
+ <Word>ldarg.3</Word>
+ <Word>ldloc.0</Word>
+ <Word>ldloc.1</Word>
+ <Word>ldloc.2</Word>
+ <Word>ldloc.3</Word>
+ <Word>stloc.0</Word>
+ <Word>stloc.1</Word>
+ <Word>stloc.2</Word>
+ <Word>stloc.3</Word>
+ <Word>ldnull</Word>
+ <Word>ldc.i4.m1</Word>
+ <Word>ldc.i4.M1</Word>
+ <Word>ldc.i4.0</Word>
+ <Word>ldc.i4.1</Word>
+ <Word>ldc.i4.2</Word>
+ <Word>ldc.i4.3</Word>
+ <Word>ldc.i4.4</Word>
+ <Word>ldc.i4.5</Word>
+ <Word>ldc.i4.6</Word>
+ <Word>ldc.i4.7</Word>
+ <Word>ldc.i4.8</Word>
+ <Word>dup</Word>
+ <Word>pop</Word>
+ <Word>ret</Word>
+ <Word>ldind.i1</Word>
+ <Word>ldind.u1</Word>
+ <Word>ldind.i2</Word>
+ <Word>ldind.u2</Word>
+ <Word>ldind.i4</Word>
+ <Word>ldind.u4</Word>
+ <Word>ldind.i</Word>
+ <Word>ldind.r4</Word>
+ <Word>ldind.r8</Word>
+ <Word>ldind.ref</Word>
+ <Word>stind.ref</Word>
+ <Word>stind.i1</Word>
+ <Word>stind.i2</Word>
+ <Word>stind.i4</Word>
+ <Word>stind.i8</Word>
+ <Word>stind.r4</Word>
+ <Word>stind.r8</Word>
+ <Word>add</Word>
+ <Word>sub</Word>
+ <Word>mul</Word>
+ <Word>div</Word>
+ <Word>div.un</Word>
+ <Word>rem</Word>
+ <Word>rem.un</Word>
+ <Word>and</Word>
+ <Word>or</Word>
+ <Word>xor</Word>
+ <Word>shl</Word>
+ <Word>shr</Word>
+ <Word>shr.un</Word>
+ <Word>neg</Word>
+ <Word>not</Word>
+ <Word>conv.i1</Word>
+ <Word>conv.i2</Word>
+ <Word>conv.i4</Word>
+ <Word>conv.i8</Word>
+ <Word>conv.r4</Word>
+ <Word>conv.r8</Word>
+ <Word>conv.u4</Word>
+ <Word>conv.u8</Word>
+ <Word>conv.r.un</Word>
+ <Word>throw</Word>
+ <Word>conv.ovf.i1.un</Word>
+ <Word>conv.ovf.i2.un</Word>
+ <Word>conv.ovf.i4.un</Word>
+ <Word>conv.ovf.i8.un</Word>
+ <Word>conv.ovf.u1.un</Word>
+ <Word>conv.ovf.u2.un</Word>
+ <Word>conv.ovf.u4.un</Word>
+ <Word>conv.ovf.u8.un</Word>
+ <Word>conv.ovf.i.un</Word>
+ <Word>conf.ovf.u.un</Word>
+ <Word>ldlen</Word>
+ <Word>ldelem.i1</Word>
+ <Word>ldelem.u1</Word>
+ <Word>ldelem.i2</Word>
+ <Word>ldelem.u2</Word>
+ <Word>ldelem.i4</Word>
+ <Word>ldelem.u4</Word>
+ <Word>ldelem.i8</Word>
+ <Word>ldelem.u8</Word>
+ <Word>ldelem.i</Word>
+ <Word>ldelem.r4</Word>
+ <Word>ldelem.r8</Word>
+ <Word>ldelem.ref</Word>
+ <Word>stelem.i</Word>
+ <Word>stelem.i1</Word>
+ <Word>stelem.i2</Word>
+ <Word>stelem.i4</Word>
+ <Word>stelem.i8</Word>
+ <Word>stelem.r4</Word>
+ <Word>stelem.r8</Word>
+ <Word>stelem.ref</Word>
+ <Word>conv.ovf.i1</Word>
+ <Word>conv.ovf.u1</Word>
+ <Word>conv.ovf.i2</Word>
+ <Word>conv.ovf.u2</Word>
+ <Word>conv.ovf.i4</Word>
+ <Word>conv.ovf.u4</Word>
+ <Word>conv.ovf.i8</Word>
+ <Word>conv.ovf.u8</Word>
+ <Word>ckfinite</Word>
+ <Word>conv.u2</Word>
+ <Word>conv.u1</Word>
+ <Word>conv.i</Word>
+ <Word>conv.ovf.i</Word>
+ <Word>conv.ovf.u</Word>
+ <Word>add.ovf</Word>
+ <Word>add.ovf.un</Word>
+ <Word>mul.ovf</Word>
+ <Word>mul.ovf.un</Word>
+ <Word>sub.ovf</Word>
+ <Word>sub.ovf.un</Word>
+ <Word>endfinally</Word>
+ <Word>endfault</Word>
+ <Word>stind.i</Word>
+ <Word>conv.u</Word>
+ <Word>arglist</Word>
+ <Word>ceq</Word>
+ <Word>cgt</Word>
+ <Word>cgt.un</Word>
+ <Word>clt</Word>
+ <Word>clt.un</Word>
+ <Word>localloc</Word>
+ <Word>endfilter</Word>
+ <Word>volatile.</Word>
+ <Word>tail.</Word>
+ <Word>cpblk</Word>
+ <Word>initblk</Word>
+ <Word>rethrow</Word>
+ <Word>refanytype</Word>
+ <Word>readonly.</Word>
+ <Word>ldarg</Word>
+ <Word>ldarga</Word>
+ <Word>starg</Word>
+ <Word>ldarg.s</Word>
+ <Word>ldarga.s</Word>
+ <Word>starg.s</Word>
+ <Word>ldloc</Word>
+ <Word>ldloca</Word>
+ <Word>stloc</Word>
+ <Word>ldloc.s</Word>
+ <Word>ldloca.s</Word>
+ <Word>stloc.s</Word>
+ <Word>ldc.i4.s</Word>
+ <Word>ldc.i4</Word>
+ <Word>unaligned.</Word>
+ <Word>cpobj</Word>
+ <Word>ldobj</Word>
+ <Word>castclass</Word>
+ <Word>isinst</Word>
+ <Word>unbox</Word>
+ <Word>unbox.any</Word>
+ <Word>stobj</Word>
+ <Word>box</Word>
+ <Word>newarr</Word>
+ <Word>ldelema</Word>
+ <Word>refanyval</Word>
+ <Word>mkrefany</Word>
+ <Word>initobj</Word>
+ <Word>sizeof</Word>
+ <Word>stelem</Word>
+ <Word>ldelem</Word>
+ <Word>stelem.any</Word>
+ <Word>ldelem.any</Word>
+ <Word>constrained.</Word>
+ <Word>jmp</Word>
+ <Word>call</Word>
+ <Word>callvirt</Word>
+ <Word>newobj</Word>
+ <Word>ldftn</Word>
+ <Word>ldvirtftn</Word>
+ <Word>ldfld</Word>
+ <Word>ldflda</Word>
+ <Word>stfld</Word>
+ <Word>ldsfld</Word>
+ <Word>ldsflda</Word>
+ <Word>stsfld</Word>
+ <Word>br</Word>
+ <Word>brfalse</Word>
+ <Word>brzero</Word>
+ <Word>brnull</Word>
+ <Word>brtrue</Word>
+ <Word>beq</Word>
+ <Word>bge</Word>
+ <Word>bgt</Word>
+ <Word>ble</Word>
+ <Word>blt</Word>
+ <Word>bne.un</Word>
+ <Word>bge.un</Word>
+ <Word>bgt.un</Word>
+ <Word>ble.un</Word>
+ <Word>blt.un</Word>
+ <Word>leave</Word>
+ <Word>br.s</Word>
+ <Word>brfalse.s</Word>
+ <Word>brtrue.s</Word>
+ <Word>beq.s</Word>
+ <Word>bge.s</Word>
+ <Word>bgt.s</Word>
+ <Word>ble.s</Word>
+ <Word>blt.s</Word>
+ <Word>bne.un.s</Word>
+ <Word>bge.un.s</Word>
+ <Word>bgt.un.s</Word>
+ <Word>ble.un.s</Word>
+ <Word>blt.un.s</Word>
+ <Word>leave.s</Word>
+ <Word>ldstr</Word>
+ <Word>ldc.r4</Word>
+ <Word>ldc.r8</Word>
+ <Word>ldc.i8</Word>
+ <Word>switch</Word>
+ <Word>calli</Word>
+ <Word>ldtoken</Word>
+ <Word>no.</Word>
+ <Word>prefix1</Word>
+ <Word>prefix2</Word>
+ <Word>prefix3</Word>
+ <Word>prefix4</Word>
+ <Word>prefix5</Word>
+ <Word>prefix6</Word>
+ <Word>prefix7</Word>
+ <Word>prefixref</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>void</Word>
+ <Word>object</Word>
+ <Word>bool</Word>
+ <Word>char</Word>
+ <Word>string</Word>
+ <Word>int</Word>
+ <Word>int8</Word>
+ <Word>int16</Word>
+ <Word>int32</Word>
+ <Word>int64</Word>
+ <Word>uint</Word>
+ <Word>uint8</Word>
+ <Word>uint16</Word>
+ <Word>uint32</Word>
+ <Word>uint64</Word>
+ <Word>float</Word>
+ <Word>float32</Word>
+ <Word>float64</Word>
+ <Word>typedref</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>at</Word>
+ <Word>as</Word>
+ <Word>implicitcom</Word>
+ <Word>implicitres</Word>
+ <Word>extern</Word>
+ <Word>instance</Word>
+ <Word>explicit</Word>
+ <Word>default</Word>
+ <Word>vararg</Word>
+ <Word>unmanaged</Word>
+ <Word>cdecl</Word>
+ <Word>stdcall</Word>
+ <Word>thiscall</Word>
+ <Word>fastcall</Word>
+ <Word>marshal</Word>
+ <Word>in</Word>
+ <Word>out</Word>
+ <Word>opt</Word>
+ <Word>static</Word>
+ <Word>public</Word>
+ <Word>private</Word>
+ <Word>family</Word>
+ <Word>initonly</Word>
+ <Word>rtspecialname</Word>
+ <Word>specialname</Word>
+ <Word>assembly</Word>
+ <Word>famandassem</Word>
+ <Word>famorassem</Word>
+ <Word>privatescope</Word>
+ <Word>literal</Word>
+ <Word>notserialized</Word>
+ <Word>value</Word>
+ <Word>not_in_gc_heap</Word>
+ <Word>interface</Word>
+ <Word>sealed</Word>
+ <Word>abstract</Word>
+ <Word>auto</Word>
+ <Word>sequential</Word>
+ <Word>ansi</Word>
+ <Word>unicode</Word>
+ <Word>autochar</Word>
+ <Word>bestfit</Word>
+ <Word>charmaperror</Word>
+ <Word>import</Word>
+ <Word>serializable</Word>
+ <Word>nested</Word>
+ <Word>extends</Word>
+ <Word>implements</Word>
+ <Word>final</Word>
+ <Word>virtual</Word>
+ <Word>hidebysig</Word>
+ <Word>newslot</Word>
+ <Word>unmanagedexp</Word>
+ <Word>pinvokeimpl</Word>
+ <Word>nomangle</Word>
+ <Word>lasterr</Word>
+ <Word>winapi</Word>
+ <Word>platformapi</Word>
+ <Word>native</Word>
+ <Word>il</Word>
+ <Word>cil</Word>
+ <Word>optil</Word>
+ <Word>managed</Word>
+ <Word>forwardref</Word>
+ <Word>runtime</Word>
+ <Word>internalcall</Word>
+ <Word>synchronized</Word>
+ <Word>noinlining</Word>
+ <Word>nooptimization</Word>
+ <Word>custom</Word>
+ <Word>fixed</Word>
+ <Word>sysstring</Word>
+ <Word>array</Word>
+ <Word>variant</Word>
+ <Word>currency</Word>
+ <Word>syschar</Word>
+ <Word>error</Word>
+ <Word>unsigned</Word>
+ <Word>decimal</Word>
+ <Word>date</Word>
+ <Word>bstr</Word>
+ <Word>lpstr</Word>
+ <Word>lpwstr</Word>
+ <Word>lptstr</Word>
+ <Word>objectref</Word>
+ <Word>iunknown</Word>
+ <Word>idispatch</Word>
+ <Word>struct</Word>
+ <Word>safearray</Word>
+ <Word>byvalstr</Word>
+ <Word>tbstr</Word>
+ <Word>lpvoid</Word>
+ <Word>any</Word>
+ <Word>lpstruct</Word>
+ <Word>null</Word>
+ <Word>vector</Word>
+ <Word>hresult</Word>
+ <Word>carray</Word>
+ <Word>userdefined</Word>
+ <Word>record</Word>
+ <Word>filetime</Word>
+ <Word>blob</Word>
+ <Word>stream</Word>
+ <Word>storage</Word>
+ <Word>streamed_object</Word>
+ <Word>stored_object</Word>
+ <Word>blob_object</Word>
+ <Word>cf</Word>
+ <Word>clsid</Word>
+ <Word>method</Word>
+ <Word>class</Word>
+ <Word>pinned</Word>
+ <Word>modreq</Word>
+ <Word>modopt</Word>
+ <Word>property</Word>
+ <Word>type</Word>
+ <Word>refany</Word>
+ <Word>wchar</Word>
+ <Word>fromunmanaged</Word>
+ <Word>callmostderived</Word>
+ <Word>retainappdomain</Word>
+ <Word>bytearray</Word>
+ <Word>with</Word>
+ <Word>init</Word>
+ <Word>to</Word>
+ <Word>catch</Word>
+ <Word>filter</Word>
+ <Word>finally</Word>
+ <Word>fault</Word>
+ <Word>handler</Word>
+ <Word>tls</Word>
+ <Word>field</Word>
+ <Word>nometadata</Word>
+ <Word>algorithm</Word>
+ <Word>retargetable</Word>
+ <Word>legacy</Word>
+ <Word>library</Word>
+ <Word>x86</Word>
+ <Word>amd64</Word>
+ <Word>ia64</Word>
+ <Word>preservesig</Word>
+ <Word>beforefieldinit</Word>
+ <Word>alignment</Word>
+ <Word>nullref</Word>
+ <Word>valuetype</Word>
+ <Word>compilercontrolled</Word>
+ <Word>reqsecobj</Word>
+ <Word>enum</Word>
+ <Word>on</Word>
+ <Word>off</Word>
+ <Word>strict</Word>
+ <Word>mdtoken</Word>
+ <Word>noappdomain</Word>
+ <Word>noprocess</Word>
+ <Word>nomachine</Word>
+ <Word>illegal</Word>
+ <Word>unused</Word>
+ <Word>wrapper</Word>
+ <Word>forwarder</Word>
+ <Word>callconv</Word>
+ <Word>flags</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>.assembly</Word>
+ <Word>.cctor</Word>
+ <Word>.class</Word>
+ <Word>.imagebase</Word>
+ <Word>.corflags</Word>
+ <Word>.ctor</Word>
+ <Word>.custom</Word>
+ <Word>.data</Word>
+ <Word>.emitbyte</Word>
+ <Word>.entrypoint</Word>
+ <Word>.event</Word>
+ <Word>.export</Word>
+ <Word>.field</Word>
+ <Word>.file</Word>
+ <Word>.fire</Word>
+ <Word>.get</Word>
+ <Word>.hash</Word>
+ <Word>.language</Word>
+ <Word>.line</Word>
+ <Word>.locale</Word>
+ <Word>.locals</Word>
+ <Word>.maxstack</Word>
+ <Word>.method</Word>
+ <Word>.module</Word>
+ <Word>.mresource</Word>
+ <Word>.manifestres</Word>
+ <Word>.namespace</Word>
+ <Word>.other</Word>
+ <Word>.override</Word>
+ <Word>.pack</Word>
+ <Word>.param</Word>
+ <Word>.permission</Word>
+ <Word>.permissionset</Word>
+ <Word>.property</Word>
+ <Word>.publickey</Word>
+ <Word>.publickeytoken</Word>
+ <Word>.addon</Word>
+ <Word>.removeon</Word>
+ <Word>.set</Word>
+ <Word>.size</Word>
+ <Word>.stackreserve</Word>
+ <Word>.subsystem</Word>
+ <Word>.try</Word>
+ <Word>.ver</Word>
+ <Word>.vtable</Word>
+ <Word>.vtentry</Word>
+ <Word>.vtfixup</Word>
+ <Word>.zeroinit</Word>
+ <Word>.this</Word>
+ <Word>.base</Word>
+ <Word>.nester</Word>
+ <Word>.typelist</Word>
+ <Word>.mscorlib</Word>
+ <Word>.localized</Word>
+ <Word>.pdirect</Word>
+ <Word>.typedef</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>request</Word>
+ <Word>demand</Word>
+ <Word>assert</Word>
+ <Word>deny</Word>
+ <Word>permitonly</Word>
+ <Word>linkcheck</Word>
+ <Word>inheritcheck</Word>
+ <Word>reqmin</Word>
+ <Word>reqopt</Word>
+ <Word>reqrefuse</Word>
+ <Word>prejitgrant</Word>
+ <Word>prejitdeny</Word>
+ <Word>noncasdemand</Word>
+ <Word>noncaslinkdemand</Word>
+ <Word>noncasinheritance</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>#line</Word>
+ <Word>#define</Word>
+ <Word>#undef</Word>
+ <Word>#ifdef</Word>
+ <Word>#ifndef</Word>
+ <Word>#else</Word>
+ <Word>#endif</Word>
+ <Word>#include</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavaSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavaSyntaxMode.xml
new file mode 100644
index 0000000..e8f9941
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavaSyntaxMode.xml
@@ -0,0 +1,169 @@
+<!-- JavaSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Java" mimeTypes="text/x-java">
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+ <Span color = "Comment(Line)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule = "String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ <Word>super</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>new</Word>
+ <Word>instanceof</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ <Word>switch</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>abstract</Word>
+ <Word>const</Word>
+ <Word>static</Word>
+ <Word>final</Word>
+ <Word>native</Word>
+ <Word>extends</Word>
+ <Word>implements</Word>
+ <Word>volatile</Word>
+ <Word>transient</Word>
+ <Word>throws</Word>
+ <Word>strictfp</Word>
+ <Word>synchronized</Word>
+
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ <Word>internal</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>boolean</Word>
+ <Word>byte</Word>
+ <Word>char</Word>
+ <Word>double</Word>
+ <Word>float</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+ <Word>short</Word>
+
+ <Word>object</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>package</Word>
+ <Word>import</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>interface</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>@author</Word>
+ <Word>@deprecated</Word>
+ <Word>@return</Word>
+ <Word>@exception</Word>
+ <Word>@throws</Word>
+ <Word>@see</Word>
+ <Word>@since</Word>
+ <Word>@serial</Word>
+ <Word>@serialField</Word>
+ <Word>@serialData</Word>
+ <Word>@param</Word>
+ <Word>@version</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavascriptSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavascriptSyntaxMode.xml
new file mode 100644
index 0000000..58de0b9
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavascriptSyntaxMode.xml
@@ -0,0 +1,84 @@
+<!-- JavaSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+ Federico Di Gregorio <fog at initd.org>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Javascript" mimeTypes="application/javascript;text/javascript">
+ <EolSpan color = "Script Comment" rule="Comment">//</EolSpan>
+ <Span color = "Script Comment" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "Script String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "Script String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Script Number">CSharpNumber</Match>
+
+ <Keywords color = "Script Keyword">
+ <Word>this</Word>
+
+ <Word>new</Word>
+ <Word>typeof</Word>
+
+ <Word>else</Word>
+ <Word>if</Word>
+
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>while</Word>
+
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>return</Word>
+
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+
+ <Word>var</Word>
+ <Word>function</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JaySyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JaySyntaxMode.xml
new file mode 100644
index 0000000..6d6bf19
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JaySyntaxMode.xml
@@ -0,0 +1,65 @@
+<!--
+
+JaySyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at novell.com>
+
+Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+
+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.
+-->
+
+<SyntaxMode name = "Jay" mimeTypes="text/x-jay" extends="text/x-csharp">
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <EolSpan color = "Preprocessor" rule="token">%token</EolSpan>
+ <EolSpan color = "Preprocessor" rule="token">%nonassoc</EolSpan>
+ <EolSpan color = "Preprocessor" rule="token">%left</EolSpan>
+ <EolSpan color = "Preprocessor" rule="token">%right</EolSpan>
+ <EolSpan color = "Preprocessor" rule="token">%start</EolSpan>
+ <EolSpan color = "Preprocessor" rule="token">%%</EolSpan>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "token">
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JsonSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JsonSyntaxMode.xml
new file mode 100644
index 0000000..6975644
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JsonSyntaxMode.xml
@@ -0,0 +1,76 @@
+<!--
+
+JsonSyntaxMode.xml
+
+Author:
+ Michael Hutchinson <mhutch at xamarin.com>
+
+Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+<SyntaxMode name = "Json" mimeTypes="application/json">
+ <Span rule="Object">
+ <Begin>{</Begin>
+ <End>}</End>
+ </Span>
+
+ <Rule name = "Object">
+ <Span rule="Object">
+ <Begin>{</Begin>
+ <End>}</End>
+ </Span>
+
+ <Span rule="String" color="User Types" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span rule="Value" tagColor="Plain Text">
+ <Begin>:</Begin>
+ <Exit>,|}</Exit>
+ </Span>
+ </Rule>
+
+ <Rule name = "Value">
+ <!-- array -->
+ <Span rule="Value">
+ <Begin>[</Begin>
+ <End>]</End>
+ </Span>
+ <Span rule="Object">
+ <Begin>{</Begin>
+ <End>}</End>
+ </Span>
+ <Span color = "String" rule="String" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+ <!-- this isn't quite accurate, the JSON number format is a subset of the C# format -->
+ <Match color = "Number">
+ CSharpNumber
+ </Match>
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+ </Rule>
+ <Rule name = "String" />
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LessSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LessSyntaxMode.xml
new file mode 100644
index 0000000..790faef
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LessSyntaxMode.xml
@@ -0,0 +1,395 @@
+<!-- LessSyntaxMode.xml
+
+ Author:
+ Martin Lundberg <martin.lundberg at gmail.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name="LESS" mimeTypes="text/x-less">
+ <Delimiters>&<>~!@%^*()+=|\#/{}[]:;"' , ?</Delimiters>
+
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+
+ <Span rule="Comment" color="Css Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <EolSpan color="Comment(Line)" rule="Comment">//</EolSpan>
+
+ <Span rule="Ruleset">
+ <Begin>{</Begin>
+ <End>}</End>
+ </Span>
+
+ <Match color="Keyword(Constants)">\s*@+[a-zA-Z\-]+\s*</Match>
+
+ <Span color="String" rule="String" stopateol="true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color="String" rule="String" stopateol="true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color="Number">\s*\d+\s*</Match>
+
+ <Rule name="Ruleset">
+
+ <Match color="Keyword(Constants)">\s*@+[a-zA-Z\-]+\s*</Match>
+
+ <Span color="String" rule="String" stopateol="true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color="String" rule="String" stopateol="true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color="Number">\s*\d+\s*</Match>
+
+ <Keywords color = "Css Keyword">
+ <Word>align-content</Word>
+ <Word>align-items</Word>
+ <Word>align-self</Word>
+ <Word>alignment-adjust</Word>
+ <Word>alignment-baseline</Word>
+ <Word>all</Word>
+ <Word>anchor-point</Word>
+ <Word>animation</Word>
+ <Word>animation-delay</Word>
+ <Word>animation-direction</Word>
+ <Word>animation-duration</Word>
+ <Word>animation-iteration-count</Word>
+ <Word>animation-name</Word>
+ <Word>animation-play-state</Word>
+ <Word>animation-timing-function</Word>
+ <Word>appearance</Word>
+ <Word>azimuth</Word>
+ <Word>backface-visibility</Word>
+ <Word>background</Word>
+ <Word>background-attachment</Word>
+ <Word>background-clip</Word>
+ <Word>background-color</Word>
+ <Word>background-image</Word>
+ <Word>background-origin</Word>
+ <Word>background-position</Word>
+ <Word>background-repeat</Word>
+ <Word>background-size</Word>
+ <Word>baseline-shift</Word>
+ <Word>binding</Word>
+ <Word>bleed</Word>
+ <Word>bookmark-label</Word>
+ <Word>bookmark-level</Word>
+ <Word>bookmark-state</Word>
+ <Word>bookmark-target</Word>
+ <Word>border</Word>
+ <Word>border-bottom</Word>
+ <Word>border-bottom-color</Word>
+ <Word>border-bottom-left-radius</Word>
+ <Word>border-bottom-right-radius</Word>
+ <Word>border-bottom-style</Word>
+ <Word>border-bottom-width</Word>
+ <Word>border-collapse</Word>
+ <Word>border-color</Word>
+ <Word>border-image</Word>
+ <Word>border-image-outset</Word>
+ <Word>border-image-repeat</Word>
+ <Word>border-image-slice</Word>
+ <Word>border-image-source</Word>
+ <Word>border-image-width</Word>
+ <Word>border-left</Word>
+ <Word>border-left-color</Word>
+ <Word>border-left-style</Word>
+ <Word>border-left-width</Word>
+ <Word>border-radius</Word>
+ <Word>border-right</Word>
+ <Word>border-right-color</Word>
+ <Word>border-right-style</Word>
+ <Word>border-right-width</Word>
+ <Word>border-spacing</Word>
+ <Word>border-style</Word>
+ <Word>border-top</Word>
+ <Word>border-top-color</Word>
+ <Word>border-top-left-radius</Word>
+ <Word>border-top-right-radius</Word>
+ <Word>border-top-style</Word>
+ <Word>border-top-width</Word>
+ <Word>border-width</Word>
+ <Word>bottom</Word>
+ <Word>box-decoration-break</Word>
+ <Word>box-shadow</Word>
+ <Word>box-sizing</Word>
+ <Word>break-after</Word>
+ <Word>break-before</Word>
+ <Word>break-inside</Word>
+ <Word>caption-side</Word>
+ <Word>clear</Word>
+ <Word>clip</Word>
+ <Word>color</Word>
+ <Word>color-profile</Word>
+ <Word>column-count</Word>
+ <Word>column-fill</Word>
+ <Word>column-gap</Word>
+ <Word>column-rule</Word>
+ <Word>column-rule-color</Word>
+ <Word>column-rule-style</Word>
+ <Word>column-rule-width</Word>
+ <Word>column-span</Word>
+ <Word>column-width</Word>
+ <Word>columns</Word>
+ <Word>content</Word>
+ <Word>counter-increment</Word>
+ <Word>counter-reset</Word>
+ <Word>crop</Word>
+ <Word>cue</Word>
+ <Word>cue-after</Word>
+ <Word>cue-before</Word>
+ <Word>cursor</Word>
+ <Word>direction</Word>
+ <Word>display</Word>
+ <Word>dominant-baseline</Word>
+ <Word>drop-initial-after-adjust</Word>
+ <Word>drop-initial-after-align</Word>
+ <Word>drop-initial-before-adjust</Word>
+ <Word>drop-initial-before-align</Word>
+ <Word>drop-initial-size</Word>
+ <Word>drop-initial-value</Word>
+ <Word>elevation</Word>
+ <Word>empty-cells</Word>
+ <Word>fit</Word>
+ <Word>fit-position</Word>
+ <Word>flex</Word>
+ <Word>flex-basis</Word>
+ <Word>flex-direction</Word>
+ <Word>flex-flow</Word>
+ <Word>flex-grow</Word>
+ <Word>flex-shrink</Word>
+ <Word>flex-wrap</Word>
+ <Word>float</Word>
+ <Word>float-offset</Word>
+ <Word>font</Word>
+ <Word>font-feature-settings</Word>
+ <Word>font-family</Word>
+ <Word>font-kerning</Word>
+ <Word>font-language-override</Word>
+ <Word>font-size</Word>
+ <Word>font-size-adjust</Word>
+ <Word>font-stretch</Word>
+ <Word>font-style</Word>
+ <Word>font-synthesis</Word>
+ <Word>font-variant</Word>
+ <Word>font-variant-alternates</Word>
+ <Word>font-variant-caps</Word>
+ <Word>font-variant-east-asian</Word>
+ <Word>font-variant-ligatures</Word>
+ <Word>font-variant-numeric</Word>
+ <Word>font-variant-position</Word>
+ <Word>font-weight</Word>
+ <Word>grid-cell</Word>
+ <Word>grid-column</Word>
+ <Word>grid-column-align</Word>
+ <Word>grid-column-sizing</Word>
+ <Word>grid-column-span</Word>
+ <Word>grid-columns</Word>
+ <Word>grid-flow</Word>
+ <Word>grid-row</Word>
+ <Word>grid-row-align</Word>
+ <Word>grid-row-sizing</Word>
+ <Word>grid-row-span</Word>
+ <Word>grid-rows</Word>
+ <Word>grid-template</Word>
+ <Word>hanging-punctuation</Word>
+ <Word>height</Word>
+ <Word>hyphens</Word>
+ <Word>icon</Word>
+ <Word>image-orientation</Word>
+ <Word>image-rendering</Word>
+ <Word>image-resolution</Word>
+ <Word>ime-mode</Word>
+ <Word>inline-box-align</Word>
+ <Word>justify-content</Word>
+ <Word>left</Word>
+ <Word>letter-spacing</Word>
+ <Word>line-break</Word>
+ <Word>line-height</Word>
+ <Word>line-stacking</Word>
+ <Word>line-stacking-ruby</Word>
+ <Word>line-stacking-shift</Word>
+ <Word>line-stacking-strategy</Word>
+ <Word>list-style</Word>
+ <Word>list-style-image</Word>
+ <Word>list-style-position</Word>
+ <Word>list-style-type</Word>
+ <Word>margin</Word>
+ <Word>margin-bottom</Word>
+ <Word>margin-left</Word>
+ <Word>margin-right</Word>
+ <Word>margin-top</Word>
+ <Word>marker-offset</Word>
+ <Word>marks</Word>
+ <Word>marquee-direction</Word>
+ <Word>marquee-loop</Word>
+ <Word>marquee-play-count</Word>
+ <Word>marquee-speed</Word>
+ <Word>marquee-style</Word>
+ <Word>max-height</Word>
+ <Word>max-width</Word>
+ <Word>min-height</Word>
+ <Word>min-width</Word>
+ <Word>move-to</Word>
+ <Word>nav-down</Word>
+ <Word>nav-index</Word>
+ <Word>nav-left</Word>
+ <Word>nav-right</Word>
+ <Word>nav-up</Word>
+ <Word>opacity</Word>
+ <Word>order</Word>
+ <Word>orphans</Word>
+ <Word>outline</Word>
+ <Word>outline-color</Word>
+ <Word>outline-offset</Word>
+ <Word>outline-style</Word>
+ <Word>outline-width</Word>
+ <Word>overflow</Word>
+ <Word>overflow-style</Word>
+ <Word>overflow-wrap</Word>
+ <Word>overflow-x</Word>
+ <Word>overflow-y</Word>
+ <Word>padding</Word>
+ <Word>padding-bottom</Word>
+ <Word>padding-left</Word>
+ <Word>padding-right</Word>
+ <Word>padding-top</Word>
+ <Word>page</Word>
+ <Word>page-break-after</Word>
+ <Word>page-break-before</Word>
+ <Word>page-break-inside</Word>
+ <Word>page-policy</Word>
+ <Word>pause</Word>
+ <Word>pause-after</Word>
+ <Word>pause-before</Word>
+ <Word>perspective</Word>
+ <Word>perspective-origin</Word>
+ <Word>pitch</Word>
+ <Word>pitch-range</Word>
+ <Word>play-during</Word>
+ <Word>position</Word>
+ <Word>presentation-level</Word>
+ <Word>punctuation-trim</Word>
+ <Word>quotes</Word>
+ <Word>rendering-intent</Word>
+ <Word>resize</Word>
+ <Word>rest</Word>
+ <Word>rest-after</Word>
+ <Word>rest-before</Word>
+ <Word>richness</Word>
+ <Word>right</Word>
+ <Word>rotation</Word>
+ <Word>rotation-point</Word>
+ <Word>ruby-align</Word>
+ <Word>ruby-overhang</Word>
+ <Word>ruby-position</Word>
+ <Word>ruby-span</Word>
+ <Word>size</Word>
+ <Word>speak</Word>
+ <Word>speak-as</Word>
+ <Word>speak-header</Word>
+ <Word>speak-numeral</Word>
+ <Word>speak-punctuation</Word>
+ <Word>speech-rate</Word>
+ <Word>stress</Word>
+ <Word>string-set</Word>
+ <Word>tab-size</Word>
+ <Word>table-layout</Word>
+ <Word>target</Word>
+ <Word>target-name</Word>
+ <Word>target-new</Word>
+ <Word>target-position</Word>
+ <Word>text-align</Word>
+ <Word>text-align-last</Word>
+ <Word>text-decoration</Word>
+ <Word>text-decoration-color</Word>
+ <Word>text-decoration-line</Word>
+ <Word>text-decoration-skip</Word>
+ <Word>text-decoration-style</Word>
+ <Word>text-emphasis</Word>
+ <Word>text-emphasis-color</Word>
+ <Word>text-emphasis-position</Word>
+ <Word>text-emphasis-style</Word>
+ <Word>text-height</Word>
+ <Word>text-indent</Word>
+ <Word>text-justify</Word>
+ <Word>text-outline</Word>
+ <Word>text-overflow</Word>
+ <Word>text-shadow</Word>
+ <Word>text-space-collapse</Word>
+ <Word>text-transform</Word>
+ <Word>text-underline-position</Word>
+ <Word>text-wrap</Word>
+ <Word>top</Word>
+ <Word>transform</Word>
+ <Word>transform-origin</Word>
+ <Word>transform-style</Word>
+ <Word>transition</Word>
+ <Word>transition-delay</Word>
+ <Word>transition-duration</Word>
+ <Word>transition-property</Word>
+ <Word>transition-timing-function</Word>
+ <Word>unicode-bidi</Word>
+ <Word>vertical-align</Word>
+ <Word>visibility</Word>
+ <Word>voice-balance</Word>
+ <Word>voice-duration</Word>
+ <Word>voice-family</Word>
+ <Word>voice-pitch</Word>
+ <Word>voice-range</Word>
+ <Word>voice-rate</Word>
+ <Word>voice-stress</Word>
+ <Word>voice-volume</Word>
+ <Word>volume</Word>
+ <Word>white-space</Word>
+ <Word>widows</Word>
+ <Word>width</Word>
+ <Word>word-break</Word>
+ <Word>word-spacing</Word>
+ <Word>word-wrap</Word>
+ <Word>z-index</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name="Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LuaSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LuaSyntaxMode.xml
new file mode 100644
index 0000000..439da53
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LuaSyntaxMode.xml
@@ -0,0 +1,132 @@
+<!-- LuaSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Lua" mimeTypes="text/x-lua">
+ <Property name="LineComment">--</Property>
+ <Property name="BlockCommentStart">--[</Property>
+ <Property name="BlockCommentEnd">]--</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment" tagColor="Comment(Line)">--</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment" tagColor="Comment(Line)">
+ <Begin>--[[</Begin>
+ <End>]]</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Number">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>and</Word>
+ <Word>not</Word>
+ <Word>or</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>elseif</Word>
+ <Word>end</Word>
+ <Word>if</Word>
+ <Word>in</Word>
+ <Word>then</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>repeat</Word>
+ <Word>until</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>return</Word>
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Context)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>false</Word>
+ <Word>nil</Word>
+ <Word>true</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>global</Word>
+ <Word>local</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>function</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ </Keywords>
+
+ <Rule name = "Comment">
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.MakefileSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.MakefileSyntaxMode.xml
new file mode 100644
index 0000000..7224f83
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.MakefileSyntaxMode.xml
@@ -0,0 +1,103 @@
+<!-- MakefileSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Makefile" mimeTypes="text/x-makefile">
+
+ <EolSpan color = "Comment(Line)" rule ="InLocation" flags="StartsLine">#</EolSpan>
+
+ <Span color = "Keyword(Other)" rule="InLocation" stopateol = "true">
+ <Begin>$(</Begin>
+ <End>)</End>
+ </Span>
+
+ <Span color = "Keyword(Other)" rule="InLocation" stopateol = "true">
+ <Begin>${</Begin>
+ <End>}</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape="\">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>`</Begin>
+ <End>`</End>
+ </Span>
+
+ <PrevMarker color = "Keyword(Property)">:</PrevMarker>
+
+ <PrevMarker color = "Keyword(Property)">=</PrevMarker>
+ <!--
+ <Keywords color = "Keyword(Operator)">
+ <Word>define</Word>
+ <Word>else</Word>
+ <Word>endef</Word>
+ <Word>endif</Word>
+ <Word>if</Word>
+ <Word>ifdef</Word>
+ <Word>ifeq</Word>
+ <Word>ifndef</Word>
+ <Word>ifneq</Word>
+ <Word>include</Word>
+ <Word>override</Word>
+ <Word>unexport</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>addprefix</Word>
+ <Word>addsuffix</Word>
+ <Word>basename</Word>
+ <Word>call</Word>
+ <Word>dir</Word>
+ <Word>error</Word>
+ <Word>filter</Word>
+ <Word>filter-out</Word>
+ <Word>findstring</Word>
+ <Word>firstword</Word>
+ <Word>foreach</Word>
+ <Word>join</Word>
+ <Word>notdir</Word>
+ <Word>origin</Word>
+ <Word>patsubst</Word>
+ <Word>shell</Word>
+ <Word>sort</Word>
+ <Word>strip</Word>
+ <Word>subst</Word>
+ <Word>suffix</Word>
+ <Word>warning</Word>
+ <Word>wildcard</Word>
+ <Word>word</Word>
+ <Word>words</Word>
+ </Keywords>-->
+
+ <Rule name = "InLocation">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.PythonSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.PythonSyntaxMode.xml
new file mode 100644
index 0000000..f7234ff
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.PythonSyntaxMode.xml
@@ -0,0 +1,384 @@
+<!-- PythonSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Python" mimeTypes="text/x-python">
+
+ <Property name="LineComment">#</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">#</EolSpan>
+
+ <Span color = "Xml Name" rule="Comment">
+ <Begin>"""</Begin>
+ <End>"""</End>
+ </Span>
+
+ <Span color = "Xml Name" rule="Comment">
+ <Begin>'''</Begin>
+ <End>'''</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Keywords color = "Keyword(Access)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>and</Word>
+ <Word>assert</Word>
+ <Word>break</Word>
+ <Word>class</Word>
+ <Word>continue</Word>
+ <Word>def</Word>
+ <Word>del</Word>
+ <Word>elif</Word>
+ <Word>else</Word>
+ <Word>except</Word>
+ <Word>exec</Word>
+ <Word>finally</Word>
+ <Word>for</Word>
+ <Word>global</Word>
+ <Word>if</Word>
+ <Word>in</Word>
+ <Word>is</Word>
+ <Word>lambda</Word>
+ <Word>not</Word>
+ <Word>or</Word>
+ <Word>pass</Word>
+ <Word>print</Word>
+ <Word>raise</Word>
+ <Word>return</Word>
+ <Word>try</Word>
+ <Word>while</Word>
+ <Word>yield</Word>
+ <Word>with</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>abs</Word>
+ <Word>all</Word>
+ <Word>any</Word>
+ <Word>apply</Word>
+ <Word>basestring</Word>
+ <Word>bool</Word>
+ <Word>buffer</Word>
+ <Word>callable</Word>
+ <Word>chr</Word>
+ <Word>classmethod</Word>
+ <Word>cmp</Word>
+ <Word>coerce</Word>
+ <Word>compile</Word>
+ <Word>complex</Word>
+ <Word>delattr</Word>
+ <Word>dict</Word>
+ <Word>dir</Word>
+ <Word>divmod</Word>
+ <Word>enumerate</Word>
+ <Word>eval</Word>
+ <Word>execfile</Word>
+ <Word>file</Word>
+ <Word>filter</Word>
+ <Word>float</Word>
+ <Word>frozenset</Word>
+ <Word>getattr</Word>
+ <Word>globals</Word>
+ <Word>hasattr</Word>
+ <Word>hash</Word>
+ <Word>hex</Word>
+ <Word>id</Word>
+ <Word>input</Word>
+ <Word>int</Word>
+ <Word>intern</Word>
+ <Word>isinstance</Word>
+ <Word>issubclass</Word>
+ <Word>iter</Word>
+ <Word>len</Word>
+ <Word>list</Word>
+ <Word>locals</Word>
+ <Word>long</Word>
+ <Word>map</Word>
+ <Word>max</Word>
+ <Word>min</Word>
+ <Word>object</Word>
+ <Word>oct</Word>
+ <Word>open</Word>
+ <Word>ord</Word>
+ <Word>pow</Word>
+ <Word>property</Word>
+ <Word>range</Word>
+ <Word>raw_input</Word>
+ <Word>reduce</Word>
+ <Word>reload</Word>
+ <Word>repr</Word>
+ <Word>reversed</Word>
+ <Word>round</Word>
+ <Word>setattr</Word>
+ <Word>set</Word>
+ <Word>slice</Word>
+ <Word>sorted</Word>
+ <Word>staticmethod</Word>
+ <Word>str</Word>
+ <Word>sum</Word>
+ <Word>super</Word>
+ <Word>tuple</Word>
+ <Word>type</Word>
+ <Word>unichr</Word>
+ <Word>unicode</Word>
+ <Word>vars</Word>
+ <Word>xrange</Word>
+ <Word>zip</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>False</Word>
+ <Word>None</Word>
+ <Word>True</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>ArithmeticError</Word>
+ <Word>AssertionError</Word>
+ <Word>AttributeError</Word>
+ <Word>EnvironmentError</Word>
+ <Word>EOFError</Word>
+ <Word>Exception</Word>
+ <Word>FloatingPointError</Word>
+ <Word>ImportError</Word>
+ <Word>IndentationError</Word>
+ <Word>IndexError</Word>
+ <Word>IOError</Word>
+ <Word>KeyboardInterrupt</Word>
+ <Word>KeyError</Word>
+ <Word>LookupError</Word>
+ <Word>MemoryError</Word>
+ <Word>NameError</Word>
+ <Word>NotImplementedError</Word>
+ <Word>OSError</Word>
+ <Word>OverflowError</Word>
+ <Word>ReferenceError</Word>
+ <Word>RuntimeError</Word>
+ <Word>StandardError</Word>
+ <Word>StopIteration</Word>
+ <Word>SyntaxError</Word>
+ <Word>SystemError</Word>
+ <Word>SystemExit</Word>
+ <Word>TabError</Word>
+ <Word>TypeError</Word>
+ <Word>UnboundLocalError</Word>
+ <Word>UnicodeDecodeError</Word>
+ <Word>UnicodeEncodeError</Word>
+ <Word>UnicodeError</Word>
+ <Word>UnicodeTranslateError</Word>
+ <Word>ValueError</Word>
+ <Word>WindowsError</Word>
+ <Word>ZeroDivisionError</Word>
+
+ <Word>Warning</Word>
+ <Word>UserWarning</Word>
+ <Word>DeprecationWarning</Word>
+ <Word>PendingDeprecationWarning</Word>
+ <Word>SyntaxWarning</Word>
+ <Word>OverflowWarning</Word>
+ <Word>RuntimeWarning</Word>
+ <Word>FutureWarning</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>BufferType</Word>
+ <Word>BuiltinFunctionType</Word>
+ <Word>BuiltinMethodType</Word>
+ <Word>ClassType</Word>
+ <Word>CodeType</Word>
+ <Word>ComplexType</Word>
+ <Word>DictProxyType</Word>
+ <Word>DictType</Word>
+ <Word>DictionaryType</Word>
+ <Word>EllipsisType</Word>
+ <Word>FileType</Word>
+ <Word>FloatType</Word>
+ <Word>FrameType</Word>
+ <Word>FunctionType</Word>
+ <Word>GeneratorType</Word>
+ <Word>InstanceType</Word>
+ <Word>IntType</Word>
+ <Word>LambdaType</Word>
+ <Word>ListType</Word>
+ <Word>LongType</Word>
+ <Word>MethodType</Word>
+ <Word>ModuleType</Word>
+ <Word>NoneType</Word>
+ <Word>ObjectType</Word>
+ <Word>SliceType</Word>
+ <Word>StringType</Word>
+ <Word>StringTypes</Word>
+ <Word>TracebackType</Word>
+ <Word>TupleType</Word>
+ <Word>TypeType</Word>
+ <Word>UnboundMethodType</Word>
+ <Word>UnicodeType</Word>
+ <Word>XRangeType</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>import</Word>
+ <Word>from</Word>
+ <Word>as</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
</Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>__abs__</Word>
+ <Word>__add__</Word>
+ <Word>__all__</Word>
+ <Word>__author__</Word>
+ <Word>__bases__</Word>
+ <Word>__builtins__</Word>
+ <Word>__call__</Word>
+ <Word>__class__</Word>
+ <Word>__cmp__</Word>
+ <Word>__coerce__</Word>
+ <Word>__contains__</Word>
+ <Word>__debug__</Word>
+ <Word>__del__</Word>
+ <Word>__delattr__</Word>
+ <Word>__delitem__</Word>
+ <Word>__delslice__</Word>
+ <Word>__dict__</Word>
+ <Word>__div__</Word>
+ <Word>__divmod__</Word>
+ <Word>__doc__</Word>
+ <Word>__docformat__</Word>
+ <Word>__eq__</Word>
+ <Word>__file__</Word>
+ <Word>__float__</Word>
+ <Word>__floordiv__</Word>
+ <Word>__future__</Word>
+ <Word>__ge__</Word>
+ <Word>__getattr__</Word>
+ <Word>__getattribute__</Word>
+ <Word>__getitem__</Word>
+ <Word>__getslice__</Word>
+ <Word>__gt__</Word>
+ <Word>__hash__</Word>
+ <Word>__hex__</Word>
+ <Word>__iadd__</Word>
+ <Word>__import__</Word>
+ <Word>__imul__</Word>
+ <Word>__init__</Word>
+ <Word>__int__</Word>
+ <Word>__invert__</Word>
+ <Word>__iter__</Word>
+ <Word>__le__</Word>
+ <Word>__len__</Word>
+ <Word>__long__</Word>
+ <Word>__lshift__</Word>
+ <Word>__lt__</Word>
+ <Word>__members__</Word>
+ <Word>__metaclass__</Word>
+ <Word>__mod__</Word>
+ <Word>__mro__</Word>
+ <Word>__mul__</Word>
+ <Word>__name__</Word>
+ <Word>__ne__</Word>
+ <Word>__neg__</Word>
+ <Word>__new__</Word>
+ <Word>__nonzero__</Word>
+ <Word>__oct__</Word>
+ <Word>__or__</Word>
+ <Word>__path__</Word>
+ <Word>__pos__</Word>
+ <Word>__pow__</Word>
+ <Word>__radd__</Word>
+ <Word>__rdiv__</Word>
+ <Word>__rdivmod__</Word>
+ <Word>__reduce__</Word>
+ <Word>__repr__</Word>
+ <Word>__rfloordiv__</Word>
+ <Word>__rlshift__</Word>
+ <Word>__rmod__</Word>
+ <Word>__rmul__</Word>
+ <Word>__ror__</Word>
+ <Word>__rpow__</Word>
+ <Word>__rrshift__</Word>
+ <Word>__rsub__</Word>
+ <Word>__rtruediv__</Word>
+ <Word>__rxor__</Word>
+ <Word>__setattr__</Word>
+ <Word>__setitem__</Word>
+ <Word>__setslice__</Word>
+ <Word>__self__</Word>
+ <Word>__slots__</Word>
+ <Word>__str__</Word>
+ <Word>__sub__</Word>
+ <Word>__truediv__</Word>
+ <Word>__version__</Word>
+ <Word>__xor__</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RazorSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RazorSyntaxMode.xml
new file mode 100644
index 0000000..5bf49ef
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RazorSyntaxMode.xml
@@ -0,0 +1,83 @@
+<!-- RazorSyntaxMode.xml
+
+ Author:
+ Piotr Dowgiallo <sparekd at gmail.com>
+
+ Copyright (c) 2012 Piotr Dowgiallo
+
+ 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. -->
+
+<SyntaxMode name = "Razor" mimeTypes="text/x-cshtml">
+
+ <!-- comments -->
+ <Span tagColor = "Xml Delimiter" color = "Xml Comment" rule = "Comment">
+ <Begin>@*</Begin>
+ <End>*@</End>
+ </Span>
+
+ <Span tagColor = "Xml Delimiter" color = "Xml Text" rule = "InTag">
+ <Begin><!DOCTYPE</Begin>
+ <End>></End>
+ </Span>
+
+ <!-- CDATA section -->
+ <Span tagColor = "Xml Delimiter" color = "Xml CData Section" rule = "Comment">
+ <Begin><![CDATA[</Begin>
+ <End>]]></End>
+ </Span>
+
+ <!-- tags -->
+ <!--<Span color = "xml.name" rule = "InTag">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>-->
+
+ <!-- tag definitions -->
+ <Rule name = "InTag">
+ <Span tagColor = "Xml Attribute Quotes" color = "Xml Attribute Value" rule="InLiteral">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span tagColor = "Xml Attribute Quotes" color = "Xml Attribute Value" rule="InLiteral">
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <!-- attributes -->
+ <Match color = "Keyword(Type)">[A-Za-z0-9_]+(:[A-Za-z0-9_]+)?[\s\n\r]*=</Match>
+
+ <!-- comments -->
+ <Span tagColor = "Xml Delimiter" color = "Xml Comment" rule = "Comment">
+ <Begin>@*</Begin>
+ <End>*@</End>
+ </Span>
+ </Rule>
+
+ <Rule name = "InLiteral">
+ <!-- entities -->
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ </Rule>
+
+ <Rule name = "Comment">
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RubySyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RubySyntaxMode.xml
new file mode 100644
index 0000000..080a127
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RubySyntaxMode.xml
@@ -0,0 +1,180 @@
+<!-- RubySyntaxMode.xml
+
+ Author:
+ Levi Bard <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+ Copyright (c) 2009 Levi Bard
+
+ 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. -->
+
+<SyntaxMode name = "Ruby" mimeTypes="text/x-ruby">
+ <Property name="LineComment">#</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">#</EolSpan>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>/</Begin>
+ <End>/</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <!-- :symbol -->
+ <Match color = "String">(^|[^\w\d:]):[\w\d]+</Match>
+
+ <!-- @@class_variable -->
+ <Match color = "Keyword(Modifiers)">(^|[^@\w\d])@@\w[\w\d]*</Match>
+
+ <!-- @instance_variable -->
+ <Match color = "Keyword(Type)">(^|[^@\w\d])@\w[\w\d]*</Match>
+
+ <!-- $global_variable -->
+ <Match color = "Keyword(Jump)">(^|[^\$\w\d])\$\w[\w\d]*</Match>
+
+ <!-- CONSTant -->
+ <Match color = "Keyword(Constants)">(^|[^\w\d])(?-i)[A-Z][\w\d]*</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>self</Word>
+ <Word>super</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>alias</Word>
+ <Word>and</Word>
+ <Word>or</Word>
+ <Word>not</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>if</Word>
+ <Word>elsif</Word>
+ <Word>else</Word>
+ <Word>when</Word>
+ <Word>then</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ <Word>unless</Word>
+ <Word>begin</Word>
+ <Word>BEGIN</Word>
+ <Word>end</Word>
+ <Word>END</Word>
+ <Word>defined</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>in</Word>
+ <Word>while</Word>
+ <Word>until</Word>
+ <Word>next</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>return</Word>
+ <Word>retry</Word>
+ <Word>redo</Word>
+ <Word>yield</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>raise</Word>
+ <Word>rescue</Word>
+ <Word>ensure</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>nil</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ </Keywords>
+
+ <!--
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ <Word>char</Word>
+ <Word>double</Word>
+ <Word>enum</Word>
+ <Word>float</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+ <Word>short</Word>
+ <Word>uint</Word>
+ <Word>ushort</Word>
+ <Word>ulong</Word>
+ <Word>uchar</Word>
+ <Word>string</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+ -->
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>module</Word>
+ <Word>require</Word>
+ <Word>include</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
+ <Word>attr_accessor</Word>
+ <Word>attr_reader</Word>
+ <Word>attr_writer</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>def</Word>
+ <Word>undef</Word>
+ </Keywords>
+
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ShellScriptSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ShellScriptSyntaxMode.xml
new file mode 100644
index 0000000..46fb17c
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ShellScriptSyntaxMode.xml
@@ -0,0 +1,90 @@
+<!--
+
+ShellScriptSyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2011 Xamarin <http://xamarin.com>
+
+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.
+-->
+
+<SyntaxMode name = "Bourne shell script" mimeTypes="application/x-sh">
+ <Property name="LineComment">#</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">#</EolSpan>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Span color = "Preprocessor" rule="String" stopateol = "true" escape='\'>
+ <Begin>${</Begin>
+ <End>}</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+ <Match color = "Preprocessor">\$\w+</Match>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>if</Word>
+ <Word>then</Word>
+ <Word>elif</Word>
+ <Word>else</Word>
+ <Word>fi</Word>
+ <Word>case</Word>
+ <Word>in</Word>
+ <Word>esac</Word>
+ <Word>local</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>while</Word>
+ <Word>for</Word>
+ <Word>do</Word>
+ <Word>done</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>return</Word>
+ <Word>continue</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+ <Rule name = "String">
+ <Match color = "Preprocessor">\$\w+</Match>
+ </Rule>
+</SyntaxMode>
+
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.StringsSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.StringsSyntaxMode.xml
new file mode 100644
index 0000000..7bf4a75
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.StringsSyntaxMode.xml
@@ -0,0 +1,55 @@
+<!--
+
+StringsSyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<SyntaxMode name = "Apple strings" mimeTypes="text/x-apple-strings">
+
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.TypescriptSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.TypescriptSyntaxMode.xml
new file mode 100644
index 0000000..36d7684
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.TypescriptSyntaxMode.xml
@@ -0,0 +1,108 @@
+<!--
+
+TypescriptSyntaxMode.xml
+
+Author:
+ Mike Krüger <mkrueger at xamarin.com>
+
+Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+
+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.
+-->
+
+<SyntaxMode name = "Typescript" mimeTypes="application/typescript;text/typescript">
+
+ <EolSpan color = "Script Comment" rule="Comment">//</EolSpan>
+
+ <Span color = "Script Comment" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "Script String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "Script String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "Script Number">CSharpNumber</Match>
+
+ <Keywords color = "Script Keyword">
+ <Word>any</Word>
+ <Word>bool</Word>
+ <Word>break</Word>
+ <Word>case</Word>
+ <Word>catch</Word>
+ <Word>class</Word>
+ <Word>constructor</Word>
+ <Word>continue</Word>
+ <Word>declare</Word>
+ <Word>default</Word>
+ <Word>delete</Word>
+ <Word>do</Word>
+ <Word>else</Word>
+ <Word>enum</Word>
+ <Word>export</Word>
+ <Word>extends</Word>
+ <Word>extern</Word>
+ <Word>false</Word>
+ <Word>finally</Word>
+ <Word>for</Word>
+ <Word>function</Word>
+ <Word>goto</Word>
+ <Word>if</Word>
+ <Word>implements</Word>
+ <Word>import</Word>
+ <Word>in</Word>
+ <Word>instanceof</Word>
+ <Word>interface</Word>
+ <Word>module</Word>
+ <Word>new</Word>
+ <Word>null</Word>
+ <Word>number</Word>
+ <Word>private</Word>
+ <Word>public</Word>
+ <Word>return</Word>
+ <Word>static</Word>
+ <Word>string</Word>
+ <Word>super</Word>
+ <Word>switch</Word>
+ <Word>this</Word>
+ <Word>throw</Word>
+ <Word>true</Word>
+ <Word>try</Word>
+ <Word>typeof</Word>
+ <Word>var</Word>
+ <Word>void</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
\ No newline at end of file
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.VBNetSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.VBNetSyntaxMode.xml
new file mode 100644
index 0000000..e7627b3
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.VBNetSyntaxMode.xml
@@ -0,0 +1,283 @@
+<!-- VBNetSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Visual Basic.NET" mimeTypes="text/x-vb" ignorecase="True">
+ <Property name="LineComment">REM</Property>
+ <Property name="LineComment">'</Property>
+ <Property name="StringQuote">"</Property>
+
+ <EolSpan color = "Preprocessor" rule="text.preprocessor">#</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment">'</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment">REM</EolSpan>
+
+ <Span color = "Comment(Block)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>Me</Word>
+ <Word>MyBase</Word>
+ <Word>MyClass</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>AddressOf</Word>
+ <Word>And</Word>
+ <Word>AndAlso</Word>
+ <Word>Is</Word>
+ <Word>IsNot</Word>
+ <Word>Like</Word>
+ <Word>Mod</Word>
+ <Word>New</Word>
+ <Word>Not</Word>
+ <Word>Or</Word>
+ <Word>OrElse</Word>
+ <Word>Xor</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>If</Word>
+ <Word>Then</Word>
+ <Word>Else</Word>
+ <Word>ElseIf</Word>
+ <Word>EndIf</Word>
+
+ <Word>Select</Word>
+ <Word>Case</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>For</Word>
+ <Word>To</Word>
+ <Word>Step</Word>
+ <Word>Each</Word>
+ <Word>In</Word>
+ <Word>Next</Word>
+
+ <Word>SyncLock</Word>
+ <Word>Using</Word>
+ <Word>With</Word>
+ <Word>Do</Word>
+ <Word>While</Word>
+ <Word>Loop</Word>
+ <Word>Wend</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>GoTo</Word>
+ <Word>GoSub</Word>
+ <Word>Call</Word>
+ <Word>Continue</Word>
+ <Word>Stop</Word>
+ <Word>Return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Context)">
+ <Word>Resume</Word>
+ <Word>AddHandler</Word>
+ <Word>RemoveHandler</Word>
+ <Word>Option</Word>
+ <Word>Let</Word>
+ <Word>Dim</Word>
+ <Word>ReDim</Word>
+ <Word>Erase</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>Try</Word>
+ <Word>Catch</Word>
+ <Word>When</Word>
+ <Word>Finally</Word>
+
+ <Word>Throw</Word>
+ <Word>RaiseEvent</Word>
+
+ <Word>On</Word>
+ <Word>Error</Word>
+ <Word>Exit</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>False</Word>
+ <Word>Nothing</Word>
+ <Word>True</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>Friend</Word>
+ <Word>Private</Word>
+ <Word>Protected</Word>
+ <Word>Public</Word>
+
+ <Word>Const</Word>
+ <Word>Custom</Word>
+ <Word>Default</Word>
+ <Word>Global</Word>
+ <Word>MustInherit</Word>
+ <Word>MustOverride</Word>
+ <Word>Narrowing</Word>
+ <Word>NotInheritable</Word>
+ <Word>NotOverridable</Word>
+ <Word>Overloads</Word>
+ <Word>Overridable</Word>
+ <Word>Overrides</Word>
+ <Word>Partial</Word>
+ <Word>ReadOnly</Word>
+ <Word>Shadows</Word>
+ <Word>Shared</Word>
+ <Word>Static</Word>
+ <Word>Widening</Word>
+ <Word>WithEvents</Word>
+ <Word>WriteOnly</Word>
+
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>Boolean</Word>
+ <Word>Byte</Word>
+ <Word>Char</Word>
+ <Word>Date</Word>
+ <Word>Decimal</Word>
+ <Word>Double</Word>
+ <Word>Integer</Word>
+ <Word>Long</Word>
+ <Word>Object</Word>
+ <Word>SByte</Word>
+ <Word>Short</Word>
+ <Word>Single</Word>
+ <Word>String</Word>
+ <Word>UInteger</Word>
+ <Word>ULong</Word>
+ <Word>UShort</Word>
+ <Word>Variant</Word>
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>Namespace</Word>
+ <Word>Imports</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
<Word>Sub</Word>
+ <Word>Function</Word>
+ <Word>Handles</Word>
+ <Word>Declare</Word>
+ <Word>Lib</Word>
+ <Word>Alias</Word>
+ <Word>Get</Word>
+ <Word>Set</Word>
+ <Word>Property</Word>
+ <Word>Operator</Word>
+ <Word>Event</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>Class</Word>
+ <Word>Implements</Word>
+ <Word>Inherits</Word>
+ <Word>Interface</Word>
+ <Word>Delegate</Word>
+ <Word>Module</Word>
+ <Word>Structure</Word>
+ <Word>Enum</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ <Word>ByRef</Word>
+ <Word>ByVal</Word>
+ <Word>Optional</Word>
+ <Word>ParamArray</Word>
+ </Keywords>
+
+
+ <Keywords color = "Keyword(Operator Declaration)">
+ <Word>Ansi</Word>
+ <Word>Auto</Word>
+ <Word>Unicode</Word>
+ <Word>Preserve</Word>
+ <Word>Until</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Other)">
+ <Word>As</Word>
+ <Word>Of</Word>
+ <Word>New</Word>
+ <Word>End</Word>
+
+ <Word>CBool</Word>
+ <Word>CByte</Word>
+ <Word>CChar</Word>
+ <Word>CDate</Word>
+ <Word>CDec</Word>
+ <Word>CDbl</Word>
+ <Word>CInt</Word>
+ <Word>CLng</Word>
+ <Word>CObj</Word>
+ <Word>CSByte</Word>
+ <Word>CShort</Word>
+ <Word>CSng</Word>
+ <Word>CStr</Word>
+ <Word>CType</Word>
+ <Word>CUInt</Word>
+ <Word>CULng</Word>
+ <Word>CUShort</Word>
+ <Word>DirectCast</Word>
+ <Word>GetType</Word>
+ <Word>TryCast</Word>
+ <Word>TypeOf</Word>
+ </Keywords>
+
+ <Rule name = "text.preprocessor">
+ <Keywords color="Preprocessor">
+ <Word>const</Word>
+ <Word>if</Word>
+ <Word>else</Word>
+ <Word>elseif</Word>
+ <Word>end</Word>
+ <Word>externalsource</Word>
+ <Word>region</Word>
+ <Word>externalchecksum</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ValaSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ValaSyntaxMode.xml
new file mode 100644
index 0000000..3b74a26
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ValaSyntaxMode.xml
@@ -0,0 +1,206 @@
+<!-- ValaSyntaxMode.xml
+
+ Author:
+ Levi Bard <taktaktaktaktaktaktaktaktaktak at gmail.com>
+
+ Copyright (c) 2008 Levi Bard
+ Based on CSharpSyntaxMode by Mike Krüger <mkrueger at novell.com>
+
+ 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. -->
+
+<SyntaxMode name = "Vala" mimeTypes="text/x-vala">
+ <Property name="LineComment">//</Property>
+ <Property name="BlockCommentStart">/*</Property>
+ <Property name="BlockCommentEnd">*/</Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <EolSpan color = "Comment(Line)" rule="DoxDocumentation" tagColor="Comment(DocTag)">///</EolSpan>
+ <EolSpan color = "Comment(Line)" rule="Comment">//</EolSpan>
+
+ <Span color = "Comment(Line)" rule="DoxDocumentation" tagColor="Comment(DocTag)" >
+ <Begin>/**</Begin>
+ <End>*/</End>
+ </Span>
+ <Span color = "Comment(Block)" rule="Comment">
+ <Begin>/*</Begin>
+ <End>*/</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+
+ <Span color = "String" rule="String" stopateol = "true" escape='\'>
+ <Begin>'</Begin>
+ <End>'</End>
+ </Span>
+
+ <Match color = "String">CSharpNumber</Match>
+
+ <Keywords color = "Keyword(Access)">
+ <Word>this</Word>
+ <Word>base</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Operator)">
+ <Word>as</Word>
+ <Word>new</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Selection)">
+ <Word>else</Word>
+ <Word>if</Word>
+ <Word>switch</Word>
+ <Word>case</Word>
+ <Word>default</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Iteration)">
+ <Word>do</Word>
+ <Word>for</Word>
+ <Word>foreach</Word>
+ <Word>in</Word>
+ <Word>while</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Jump)">
+ <Word>break</Word>
+ <Word>continue</Word>
+ <Word>goto</Word>
+ <Word>return</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Exception)">
+ <Word>try</Word>
+ <Word>throw</Word>
+ <Word>catch</Word>
+ <Word>finally</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Constants)">
+ <Word>true</Word>
+ <Word>false</Word>
+ <Word>null</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Modifiers)">
+ <Word>abstract</Word>
+ <Word>const</Word>
+ <Word>extern</Word>
+ <Word>override</Word>
+ <Word>static</Word>
+ <Word>virtual</Word>
+ <Word>weak</Word>
+
+ <Word>public</Word>
+ <Word>protected</Word>
+ <Word>private</Word>
+ <Word>construct</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Type)">
+ <Word>bool</Word>
+ <Word>char</Word>
+ <Word>double</Word>
+ <Word>enum</Word>
+ <Word>float</Word>
+ <Word>int</Word>
+ <Word>long</Word>
+ <Word>short</Word>
+ <Word>uint</Word>
+ <Word>ushort</Word>
+ <Word>ulong</Word>
+ <Word>uchar</Word>
+ <Word>string</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Void)">
+ <Word>void</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Namespace)">
+ <Word>namespace</Word>
+ <Word>using</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Property)">
+ <Word>get</Word>
+ <Word>set</Word>
+ <Word>value</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Declaration)">
+ <Word>class</Word>
+ <Word>interface</Word>
+ <Word>delegate</Word>
+ <Word>signal</Word>
+ <Word>struct</Word>
+ </Keywords>
+
+ <Keywords color = "Keyword(Parameter)">
+ <Word>ref</Word>
+ <Word>out</Word>
+ </Keywords>
+
+
+ <Rule name = "Comment">
+ <Keywords color="Comment Tag" ignorecase="True">
+ <Word>TODO</Word>
+ <Word>FIXME</Word>
+ <Word>HACK</Word>
+ <Word>UNDONE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "String">
+ </Rule>
+
+ <Rule name = "DoxDocumentation">
+ <Span color = "String" stopateol = "true" escape="\">
+ <Begin>"</Begin>
+ <End>"</End>
+ </Span>
+ <Keywords color="Comment(DocTag)">
+ <Word>c</Word>
+ <Word>code</Word>
+ <Word>example</Word>
+ <Word>exception</Word>
+ <Word>list</Word>
+ <Word>para</Word>
+ <Word>param</Word>
+ <Word>paramref</Word>
+ <Word>permission</Word>
+ <Word>remarks</Word>
+ <Word>return</Word>
+ <Word>see</Word>
+ <Word>seealso</Word>
+ <Word>summary</Word>
+ <Word>value</Word>
+ <Word>type</Word>
+ <Word>name</Word>
+ <Word>cref</Word>
+ <Word>item</Word>
+ <Word>term</Word>
+ <Word>description</Word>
+ <Word>listheader</Word>
+ </Keywords>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.XmlSyntaxMode.xml b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.XmlSyntaxMode.xml
new file mode 100644
index 0000000..424dfdb
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.XmlSyntaxMode.xml
@@ -0,0 +1,116 @@
+<!-- CSharpSyntaxMode.xml
+
+ Author:
+ Mike Krüger <mkrueger at novell.com>
+
+ Copyright (c) 2007 Novell, Inc (http://www.novell.com)
+
+ 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. -->
+
+<SyntaxMode name = "Xml" mimeTypes="application/xml;application/xaml+xml">
+ <Property name="BlockCommentStart"><!--</Property>
+ <Property name="BlockCommentEnd">--></Property>
+ <Property name="StringQuote">"</Property>
+ <Property name="StringQuote">'</Property>
+
+ <Span tagColor = "Xml Delimiter" color = "Xml Comment" rule = "Comment">
+ <Begin><!--</Begin>
+ <End>--></End>
+ </Span>
+
+ <Span color = "Xml Attribute" rule = "Comment">
+ <Begin>&</Begin>
+
+ <End>;</End>
+ </Span>
+
+ <Span tagColor = "Xml Delimiter" color = "Xml CData Section" rule = "Comment">
+ <Begin><![CDATA[</Begin>
+ <End>]]></End>
+ </Span>
+
+ <Span tagColor = "Xml Delimiter" color = "Xml Text" rule = "InDocType">
+ <Begin><!</Begin>
+ <End>></End>
+ </Span>
+
+ <!-- processing instructions -->
+ <Span tagColor = "Keyword(Declaration)" color = "Xml Delimiter" rule = "InTag">
+ <Begin><?</Begin>
+ <End>?></End>
+ </Span>
+
+ <Span tagColor = "Xml Delimiter" color = "Xml Name" rule = "InTag">
+ <Begin><</Begin>
+ <End>></End>
+ </Span>
+
+ <Rule name = "Comment">
+ <Span color = "Preprocessor">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ </Rule>
+
+ <Rule name = "InDocType" color = "Html Attribute Name" >
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ <Keywords color = "Html Element Name">
+ <Word>DOCTYPE</Word>
+ </Keywords>
+ </Rule>
+
+ <Rule name = "InTag">
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+
+ <Span tagColor = "Xml Attribute Quotes" color = "Xml Attribute Value" rule="InLiteral">
+ <Begin>"</Begin>
+ <Exit><</Exit>
+ <End>"</End>
+ </Span>
+
+ <Span color = "Xml Attribute" rule="InLiteral">
+ <Begin>'</Begin>
+ <Exit><</Exit>
+ <End>'</End>
+ </Span>
+
+ <Keywords color = "Xml Delimiter">
+ <Word>/</Word>
+ </Keywords>
+
+ <!-- attributes -->
+ <Match expression="([A-Za-z0-9_]+[:[A-Za-z0-9_]+]?)([\s\n\r]*=)">
+ <Group color = "Xml Attribute"/>
+ <Group color = "Xml Delimiter"/>
+ </Match>
+ </Rule>
+
+ <Rule name = "InLiteral">
+ <Span color = "Xml Attribute">
+ <Begin>&</Begin>
+ <End>;</End>
+ </Span>
+ </Rule>
+</SyntaxMode>
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.csproj.FilesWrittenAbsolute.txt b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..9cc61ba
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,44 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.MakefileSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.BooSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ChangeLogSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CPPSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSharpSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavascriptSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JavaSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.PythonSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ValaSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.XmlSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.VBNetSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.DiffSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LuaSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ILSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ActionScriptSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RubySyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CssSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JaySyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.CGSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.StringsSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.JsonSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.ShellScriptSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.RazorSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.FSharpSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.AspNetAshxSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.HtmlSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.TypescriptSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.SyntaxModes.LessSyntaxMode.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.DefaultStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.MonokaiStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.NightshadeStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.OblivionStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.SolarizedDarkStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.SolarizedLightStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.TangoStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.Styles.VisualStudioStyle.json
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/Mono.TextEditor.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/Mono.TextEditor.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/Mono.TextEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.dll.mdb
diff --git a/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.gtk-gui.gui.stetic b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.gtk-gui.gui.stetic
new file mode 100644
index 0000000..956b58b
--- /dev/null
+++ b/src/core/Mono.Texteditor/obj/Debug/Mono.TextEditor.gtk-gui.gui.stetic
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Core/Makefile.in b/src/core/MonoDevelop.Core/Makefile.in
index a88be18..bd716fd 100644
--- a/src/core/MonoDevelop.Core/Makefile.in
+++ b/src/core/MonoDevelop.Core/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
index d556edf..a4b9ac2 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
@@ -206,9 +206,13 @@ namespace MonoDevelop.Core.Assemblies
SystemAssembly found = null;
SystemAssembly gacFound = null;
foreach (SystemAssembly asm in GetAssembliesFromFullNameInternal (fullname)) {
+ if (asm.Package.IsFrameworkPackage && fx != null) {
+ if (fx.IncludesFramework (asm.Package.TargetFramework))
+ return asm;
+ else
+ continue;
+ }
found = asm;
- if (asm.Package.IsFrameworkPackage && fx != null && fx.IncludesFramework (asm.Package.TargetFramework))
- return asm;
if (asm.Package.IsGacPackage)
gacFound = asm;
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
index ff13170..22144cf 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
@@ -129,6 +129,19 @@ namespace MonoDevelop.Core.Assemblies
return false;
monoVersion = ver.Substring (i, j - i);
+
+ i = ver.IndexOf ('(');
+ if (i != -1) {
+ i++;
+ j = ver.IndexOf (' ', i);
+ if (j == -1)
+ j = ver.IndexOf (')', i);
+ if (j != -1) {
+ var rev = ver.Substring (i, j - i);
+ if (rev != "tarball")
+ monoVersion += " (" + rev + ")";
+ }
+ }
return true;
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MsNetFrameworkBackend.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MsNetFrameworkBackend.cs
index 5639fe4..f82b1d1 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MsNetFrameworkBackend.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MsNetFrameworkBackend.cs
@@ -60,6 +60,7 @@ namespace MonoDevelop.Core.Assemblies
yield return targetRuntime.RootDirectory.Combine (GetClrVersion (framework.ClrVersion));
break;
case "4.0":
+ case "4.5":
var fx40dir = targetRuntime.RootDirectory.Combine (GetClrVersion (framework.ClrVersion));
yield return fx40dir;
yield return fx40dir.Combine ("WPF");
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
index f9eb156..d757ed1 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
@@ -391,6 +391,24 @@ namespace MonoDevelop.Core.Assemblies
}
}
+ public static bool ContainsReferenceToSystemRuntime (string fileName)
+ {
+ using (var universe = new IKVM.Reflection.Universe ()) {
+ IKVM.Reflection.Assembly assembly;
+ try {
+ assembly = universe.LoadFile (fileName);
+ } catch {
+ return false;
+ }
+ foreach (var r in assembly.GetReferencedAssemblies ()) {
+ if (r.FullName.Equals ("System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public class ManifestResource
{
public string Name {
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs
index b29e6b0..0422512 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetRuntime.cs
@@ -281,7 +281,20 @@ namespace MonoDevelop.Core.Assemblies
{
return GetBackend (fx).GetFrameworkFolders ();
}
-
+
+ public IEnumerable<string> FindFacadeAssembliesForPCL (TargetFramework tx)
+ {
+ foreach (var folder in GetFrameworkFolders (tx)) {
+ var facades = Path.Combine (folder, "Facades");
+ if (!Directory.Exists (facades))
+ continue;
+
+ return Directory.GetFiles (facades, "*.dll");
+ }
+
+ return null;
+ }
+
/// <summary>
/// Returns a list of environment variables that should be set when running tools using this runtime
/// </summary>
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/DotNetCommandFactory.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/DotNetCommandFactory.cs
new file mode 100644
index 0000000..050629a
--- /dev/null
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/DotNetCommandFactory.cs
@@ -0,0 +1,42 @@
+//
+// DotNetCommandFactory.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace MonoDevelop.Core.Execution
+{
+ class DotNetCommandFactory: ICommandFactory
+ {
+ public ProcessExecutionCommand CreateCommand (string file)
+ {
+ string f = file.ToLower ();
+ if (f.EndsWith (".exe") || f.EndsWith (".dll"))
+ return new DotNetExecutionCommand (file);
+ else
+ return null;
+ }
+ }
+}
+
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ICommandFactory.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ICommandFactory.cs
new file mode 100644
index 0000000..43b2f23
--- /dev/null
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ICommandFactory.cs
@@ -0,0 +1,43 @@
+//
+// ICommandFactory.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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;
+
+namespace MonoDevelop.Core.Execution
+{
+ /// <summary>
+ /// Used to create commands from file paths
+ /// </summary>
+ public interface ICommandFactory
+ {
+ /// <summary>
+ /// Creates a command, or returns null if a command can't be created from the given path
+ /// </summary>
+ /// <returns>The command, or null if a command can't be created from the given path</returns>
+ /// <param name="path">Path.</param>
+ ProcessExecutionCommand CreateCommand (string path);
+ }
+}
+
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/LocalConsole.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/LocalConsole.cs
index 321ff3f..1c7c157 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/LocalConsole.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/LocalConsole.cs
@@ -58,6 +58,17 @@ namespace MonoDevelop.Core.Execution
clog.Dispose ();
cin.Dispose ();
}
+
+ /// <summary>
+ /// Flushes and closes the readers and writers
+ /// </summary>
+ public void SetDone ()
+ {
+ cout.SetDone ();
+ cerror.SetDone ();
+ clog.SetDone ();
+ cin.SetDone ();
+ }
/// <summary>
/// This writer can be used to provide the input of the console.
@@ -267,6 +278,11 @@ namespace MonoDevelop.Core.Execution
}
}
+ public void SetDone ()
+ {
+ data.SetDone ();
+ }
+
public override void Write (char value)
{
data.PushString (value.ToString ());
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
index 248b488..0d16a8c 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
@@ -51,6 +51,8 @@ namespace MonoDevelop.Core.Execution
IExecutionMode defaultExecutionMode = new DefaultExecutionMode ();
ExternalConsoleHandler externalConsoleHandler;
+ const string ExecutionModesExtensionPath = "/MonoDevelop/Core/ExecutionModes";
+
Dictionary<string, string> environmentVariableOverrides = null;
public IDictionary<string, string> EnvironmentVariableOverrides {
@@ -249,24 +251,38 @@ namespace MonoDevelop.Core.Execution
public ProcessExecutionCommand CreateCommand (string file)
{
- string f = file.ToLower ();
- if (f.EndsWith (".exe") || f.EndsWith (".dll"))
- return new DotNetExecutionCommand (file);
- else
- return new NativeExecutionCommand (file);
+ foreach (ICommandFactory f in AddinManager.GetExtensionObjects<ICommandFactory> ("/MonoDevelop/Core/CommandFactories")) {
+ var cmd = f.CreateCommand (file);
+ if (cmd != null)
+ return cmd;
+ }
+ return new NativeExecutionCommand (file);
}
-
+
public IEnumerable<IExecutionModeSet> GetExecutionModes ()
{
yield return defaultExecutionModeSet;
- foreach (ExtensionNode node in AddinManager.GetExtensionNodes ("/MonoDevelop/Core/ExecutionModes")) {
+ foreach (ExtensionNode node in AddinManager.GetExtensionNodes (ExecutionModesExtensionPath)) {
if (node is ExecutionModeSetNode)
yield return (ExecutionModeSetNode) node;
else if (!(node is ExecutionModeNode))
yield return (IExecutionModeSet) ((TypeExtensionNode)node).GetInstance (typeof (IExecutionModeSet));
}
}
-
+
+ /// <summary>
+ /// Returns the debug execution mode set
+ /// </summary>
+ /// <remarks>The returned mode set can be used to run applications in debug mode</remarks>
+ public IExecutionModeSet GetDebugExecutionMode ()
+ {
+ foreach (ExtensionNode node in AddinManager.GetExtensionNodes (ExecutionModesExtensionPath)) {
+ if (node.Id == "MonoDevelop.Debugger")
+ return (IExecutionModeSet) ((TypeExtensionNode)node).GetInstance (typeof (IExecutionModeSet));
+ }
+ return null;
+ }
+
public IExecutionHandler DefaultExecutionHandler {
get {
return defaultExecutionHandler;
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs
index 034dd62..c6667cd 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs
@@ -27,6 +27,7 @@
using System;
+using System.Linq;
using System.IO;
using MonoDevelop.Core;
using System.Collections.Generic;
@@ -104,9 +105,8 @@ namespace MonoDevelop.Core.FileSystem
Directory.Delete (path, true);
}
- public override bool RequestFileEdit (FilePath file)
+ public override void RequestFileEdit (IEnumerable<FilePath> files)
{
- return true;
}
public override void NotifyFilesChanged (IEnumerable<FilePath> file)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
index 0e3c3d5..6ff3108 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
@@ -70,8 +70,6 @@ namespace MonoDevelop.Core.FileSystem
public virtual void MoveFile (FilePath source, FilePath dest)
{
- GetNextForPath (source, false).MoveFile (source, dest);
-
FileSystemExtension srcExt = GetNextForPath (source, false);
FileSystemExtension dstExt = GetNextForPath (dest, false);
@@ -128,10 +126,24 @@ namespace MonoDevelop.Core.FileSystem
{
GetNextForPath (path, true).DeleteDirectory (path);
}
-
+
+ public virtual void RequestFileEdit (IEnumerable<FilePath> files)
+ {
+#pragma warning disable 618
+ foreach (var f in files) {
+ if (!RequestFileEdit (f))
+ throw new UserException (GettextCatalog.GetString ("File '{0}' can't be modified", f.FileName));
+ }
+#pragma warning restore 618
+
+ foreach (var fg in files.GroupBy (f => GetNextForPath (f, false)))
+ fg.Key.RequestFileEdit (fg);
+ }
+
+ [Obsolete ("This will be removed. Override RequestFileEdit (IEnumerable<FilePath>) instead")]
public virtual bool RequestFileEdit (FilePath file)
{
- return GetNextForPath (file, false).RequestFileEdit (file);
+ return true;
}
public virtual void NotifyFilesChanged (IEnumerable<FilePath> files)
@@ -140,4 +152,12 @@ namespace MonoDevelop.Core.FileSystem
fsFiles.Key.NotifyFilesChanged (files);
}
}
+
+ class DummyFileSystemExtension: FileSystemExtension
+ {
+ public override bool CanHandlePath (FilePath path, bool isDirectory)
+ {
+ return false;
+ }
+ }
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml b/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
index b93394f..0620a7c 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
@@ -6,7 +6,7 @@
description = "Provides the core services of the MonoDevelop platform"
category = "MonoDevelop Core"
isroot = "true"
- version = "4.0.5"
+ version = "4.0.12"
compatVersion = "4.0">
<ConditionType id="PackageInstalled" type="MonoDevelop.Core.AddIns.PackageInstalledCondition" />
@@ -30,6 +30,11 @@
<ExtensionNode name="ExecutionHandler"/>
</ExtensionPoint>
+ <ExtensionPoint path = "/MonoDevelop/Core/CommandFactories" name = "Command factories">
+ <Description>Command factories used to create commands from file paths. Specified types must implement ICommandFactory.</Description>
+ <ExtensionNode objectType = "MonoDevelop.Core.Execution.ICommandFactory" />
+ </ExtensionPoint>
+
<ExtensionPoint path = "/MonoDevelop/Core/FileSystemExtensions" name = "File system extensions">
<Description>File system extensions which can provide specific behavior when handling files. Specified classes must implement MonoDevelop.Core.FileSystem.FileSystemExtension.</Description>
<ExtensionNode name="Class" objectType="MonoDevelop.Core.FileSystem.FileSystemExtension"/>
@@ -193,6 +198,10 @@
class = "MonoDevelop.Core.Execution.NativePlatformExecutionHandler"/>
</Extension>
+ <Extension path = "/MonoDevelop/Core/CommandFactories">
+ <Type id="DotNet" class = "MonoDevelop.Core.Execution.DotNetCommandFactory"/>
+ </Extension>
+
<Extension path = "/MonoDevelop/Core/UserDataMigration">
<!-- 2.4 -->
<Migration sourceVersion="2.4" kind="Config" path="mono-runtimes.xml" />
@@ -249,6 +258,12 @@
<Class id="FinalStep" class = "MonoDevelop.Projects.ProjectServiceExtension" />
</Extension>
+ <Extension path = "/MonoDevelop/Core/FileSystemExtensions">
+ <Class id="InitialStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ <Class id="MidStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ <Class id="FinalStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ </Extension>
+
<Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
<SerializationMap resource="md1format.xml" />
</Extension>
@@ -280,9 +295,16 @@
<ProjectType guid = "{1C533B1C-72DD-4CB1-9F6B-BF11D93BCFBE}" name = "MonoMac" platforms="mac" addin = "MonoMac" />
<ProjectType guid = "{948B3504-5B70-4649-8FE4-BDE1FB46EC69}" name = "MonoMac" platforms="mac" addin = "MonoMac" />
<ProjectType guid = "{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23}" name = "Xamarin.Mac" platforms="mac" product = "Xamarin.Mac" />
- <ProjectType guid = "{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
- <ProjectType guid = "{6BC8ED88-2882-458C-8E55-DFD12B67127B}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
- <ProjectType guid = "{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ <Condition id="Platform" value="!windows">
+ <ProjectType guid = "{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ <ProjectType guid = "{6BC8ED88-2882-458C-8E55-DFD12B67127B}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ <ProjectType guid = "{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ </Condition>
+ <Condition id="Platform" value="windows">
+ <ProjectType guid = "{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ <ProjectType guid = "{6BC8ED88-2882-458C-8E55-DFD12B67127B}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ <ProjectType guid = "{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ </Condition>
<ProjectType guid = "{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}" name = "Xamarin.Android" platforms="win;mac" product = "Xamarin.Android" />
<ProjectType guid = "{10368E6C-D01B-4462-8E8B-01FC667A7035}" name = "Xamarin.Android" platforms="win;mac" product = "Xamarin.Android" />
<ProjectType guid = "{F85E285D-A4E0-4152-9332-AB1D724D3325}" name = "ASP.NET MVC 2" addin = "ASP.NET MVC" />
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj b/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
index 8ca9c05..d88b9c7 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
@@ -76,12 +76,6 @@
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
- <Reference Include="nunit.core">
- <HintPath>..\..\..\external\mdtestharness\lib\nunit.core.dll</HintPath>
- </Reference>
- <Reference Include="nunit.core.interfaces">
- <HintPath>..\..\..\external\mdtestharness\lib\nunit.core.interfaces.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MonoDevelop.Core\StringParserService.cs" />
@@ -445,7 +439,8 @@
<Compile Include="MonoDevelop.Core.Execution\ExecutionTarget.cs" />
<Compile Include="MonoDevelop.Core.Assemblies\SupportedFramework.cs" />
<Compile Include="MonoDevelop.Projects.Extensions\UnknownProjectTypeNode.cs" />
- <Compile Include="MonoDevelop.Core\InternalTestRunner.cs" />
+ <Compile Include="MonoDevelop.Core.Execution\ICommandFactory.cs" />
+ <Compile Include="MonoDevelop.Core.Execution\DotNetCommandFactory.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/ApplicationService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/ApplicationService.cs
index cbb00c4..2ea2fdc 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/ApplicationService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core/ApplicationService.cs
@@ -45,14 +45,7 @@ namespace MonoDevelop.Core
throw new Exception ("Invalid node type");
IApplication app = (IApplication) apnode.CreateInstance ();
-
- try {
- return app.Run (parameters);
- } catch (Exception ex) {
- Console.WriteLine (ex.Message);
- LoggingService.LogFatalError (ex.ToString ());
- return -1;
- }
+ return app.Run (parameters);
}
public IApplicationInfo[] GetApplications ()
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/FileEventArgs.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/FileEventArgs.cs
index 693c8ca..ce3c2b9 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/FileEventArgs.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core/FileEventArgs.cs
@@ -34,23 +34,35 @@ namespace MonoDevelop.Core
public FileEventArgs ()
{
}
-
+
public FileEventArgs (FilePath fileName, bool isDirectory)
{
- Add (new FileEventInfo (fileName, isDirectory));
+ Add (new FileEventInfo (fileName, isDirectory, false));
}
+ public FileEventArgs (FilePath fileName, bool isDirectory, bool autoReload)
+ {
+ Add (new FileEventInfo (fileName, isDirectory, autoReload));
+ }
+
public FileEventArgs (IEnumerable<FilePath> files, bool isDirectory)
{
foreach (var f in files)
- Add (new FileEventInfo (f, isDirectory));
+ Add (new FileEventInfo (f, isDirectory, false));
+ }
+
+ public FileEventArgs (IEnumerable<FilePath> files, bool isDirectory, bool autoReload)
+ {
+ foreach (var f in files)
+ Add (new FileEventInfo (f, isDirectory, autoReload));
}
}
public class FileEventInfo
{
FilePath fileName;
- bool isDirectory;
+ bool isDirectory;
+ bool autoReload;
public FilePath FileName {
get {
@@ -63,11 +75,18 @@ namespace MonoDevelop.Core
return isDirectory;
}
}
+
+ public bool AutoReload {
+ get {
+ return autoReload;
+ }
+ }
- public FileEventInfo (FilePath fileName, bool isDirectory)
+ public FileEventInfo (FilePath fileName, bool isDirectory, bool autoReload)
{
this.fileName = fileName;
this.isDirectory = isDirectory;
+ this.autoReload = autoReload;
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
index 4fba021..2d65d91 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
@@ -73,6 +73,12 @@ namespace MonoDevelop.Core
return new FilePath (!string.IsNullOrEmpty (fileName) ? Path.GetFullPath (fileName) : "");
}
}
+
+ public bool IsDirectory {
+ get {
+ return File.GetAttributes (FullPath).HasFlag(FileAttributes.Directory);
+ }
+ }
/// <summary>
/// Returns a path in standard form, which can be used to be compared
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
index 661a417..d6a5450 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
@@ -239,24 +239,64 @@ namespace MonoDevelop.Core
srcExt.DeleteDirectory (srcPath);
}
}
-
+
+ [Obsolete ("Replaced by RequestFileEdit(fileName,throwIfFails)")]
public static bool RequestFileEdit (string fileName)
{
+ return RequestFileEdit (fileName, false);
+ }
+
+ /// <summary>
+ /// Requests permission for modifying a file
+ /// </summary>
+ /// <param name="fileNames">Files</param>
+ /// <remarks>This method must be called before trying to write any file. It throws an exception if permission is not granted.</remarks>
+ public static bool RequestFileEdit (FilePath fileName, bool throwIfFails = true)
+ {
Debug.Assert (!String.IsNullOrEmpty (fileName));
- return GetFileSystemForPath (fileName, false).RequestFileEdit (fileName);
+ return RequestFileEdit (new FilePath[] { fileName }, throwIfFails);
}
-
+
+ /// <summary>
+ /// Requests permission for modifying a set of files
+ /// </summary>
+ /// <param name="fileNames">Files</param>
+ /// <remarks>This method must be called before trying to write any file. It throws an exception if permission is not granted.</remarks>
+ public static bool RequestFileEdit (IEnumerable<FilePath> fileNames, bool throwIfFails = true)
+ {
+ try {
+ foreach (var fg in fileNames.GroupBy (f => GetFileSystemForPath (f, false)))
+ fg.Key.RequestFileEdit (fg);
+ return true;
+ } catch (Exception ex) {
+ if (throwIfFails)
+ throw;
+ LoggingService.LogError ("File can't be written", ex);
+ return false;
+ }
+ }
+
public static void NotifyFileChanged (FilePath fileName)
{
- NotifyFilesChanged (new FilePath[] { fileName });
+ NotifyFileChanged (fileName, false);
+ }
+
+ public static void NotifyFileChanged (FilePath fileName, bool autoReload)
+ {
+ NotifyFilesChanged (new FilePath[] { fileName }, autoReload);
}
public static void NotifyFilesChanged (IEnumerable<FilePath> files)
{
+ NotifyFilesChanged (files, false);
+ }
+
+ public static void NotifyFilesChanged (IEnumerable<FilePath> files, bool autoReload)
+ {
try {
foreach (var fsFiles in files.GroupBy (f => GetFileSystemForPath (f, false)))
fsFiles.Key.NotifyFilesChanged (fsFiles);
- OnFileChanged (new FileEventArgs (files, false));
+ OnFileChanged (new FileEventArgs (files, false, autoReload));
} catch (Exception ex) {
LoggingService.LogError ("File change notification failed", ex);
}
@@ -332,8 +372,8 @@ namespace MonoDevelop.Core
if (!Path.IsPathRooted (absPath) || string.IsNullOrEmpty (baseDirectoryPath))
return absPath;
- absPath = Path.GetFullPath (absPath);
- baseDirectoryPath = Path.GetFullPath (baseDirectoryPath).TrimEnd (Path.DirectorySeparatorChar);
+ absPath = GetFullPath (absPath);
+ baseDirectoryPath = GetFullPath (baseDirectoryPath).TrimEnd (Path.DirectorySeparatorChar);
fixed (char* bPtr = baseDirectoryPath, aPtr = absPath) {
var bEnd = bPtr + baseDirectoryPath.Length;
@@ -435,9 +475,17 @@ namespace MonoDevelop.Core
{
if (path == null)
throw new ArgumentNullException ("path");
- // Note: It's not required for Path.GetFullPath (path) that path exists.
- return Path.GetFullPath (path);
+ if (!Platform.IsWindows || path.IndexOf ('*') == -1)
+ return Path.GetFullPath (path);
+ else {
+ // On Windows, GetFullPath doesn't work if the path contains wildcards.
+ path = path.Replace ("*", wildcardMarker);
+ path = Path.GetFullPath (path);
+ return path.Replace (wildcardMarker, "*");
+ }
}
+
+ static string wildcardMarker = "_" + Guid.NewGuid ().ToString () + "_";
public static string CreateTempDirectory ()
{
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/InternalTestRunner.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/InternalTestRunner.cs
deleted file mode 100644
index a8d3a89..0000000
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/InternalTestRunner.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// InternalTestRunner.cs
-//
-// Author:
-// Lluis Sanchez <lluis at xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// 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 Mono.Addins;
-
-namespace MonoDevelop.Core
-{
- /// <summary>
- /// This runner is used to run the MonoDevelop tests from inside MonoDevelop.
- /// The class has to be referenced in the csproj of all NUnit test projects.
- /// </summary>
- class InternalTestRunner: NUnit.Core.SimpleTestRunner
- {
- public InternalTestRunner ()
- {
- Runtime.Initialize (true);
- AddinManager.LoadAddin (null, "MonoDevelop.TestRunner");
- }
-
- public override NUnit.Core.TestResult EndRun ()
- {
- var r = base.EndRun ();
- Runtime.Shutdown ();
- return r;
- }
- }
-}
-
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Core/UserException.cs b/src/core/MonoDevelop.Core/MonoDevelop.Core/UserException.cs
index 7de9e73..9412ae4 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Core/UserException.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Core/UserException.cs
@@ -49,5 +49,11 @@ namespace MonoDevelop.Core
public string Details {
get { return details; }
}
+
+ /// <summary>
+ /// If true, it means that the error has already been reported to the user (for example, by showing a dialog), so it doesn't have to be reported again.
+ /// </summary>
+ /// <value><c>true</c> if already reported to user; otherwise, <c>false</c>.</value>
+ public bool AlreadyReportedToUser { get; set; }
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs
index d45a47d..becbcb3 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs
@@ -51,9 +51,14 @@ namespace MonoDevelop.Projects.Formats.MD1
DotNetProject Project {
get { return (DotNetProject) Item; }
}
-
+
protected override BuildResult OnBuild (IProgressMonitor monitor, ConfigurationSelector configuration)
{
+ if (!Project.InternalCheckNeedsBuild (configuration)) {
+ monitor.Log.WriteLine (GettextCatalog.GetString ("Skipping project since output files are up to date"));
+ return new BuildResult ();
+ }
+
DotNetProject project = Project;
if (!project.TargetRuntime.IsInstalled (project.TargetFramework)) {
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
index f1b70f2..2c4adcc 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
@@ -146,14 +146,14 @@ namespace MonoDevelop.Projects.Formats.MSBuild
ProjectWriter sw = new ProjectWriter (bom);
sw.NewLine = newLine;
doc.Save (sw);
-
+
string content = sw.ToString ();
if (endsWithEmptyLine && !content.EndsWith (newLine))
content += newLine;
-
+
TextFile.WriteFile (fileName, content, bom, true);
}
-
+
public string DefaultTargets {
get { return doc.DocumentElement.GetAttribute ("DefaultTargets"); }
set { doc.DocumentElement.SetAttribute ("DefaultTargets", value); }
@@ -675,21 +675,19 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return Element [name, MSBuildProject.Schema] != null;
}
- public void SetMetadata (string name, string value)
- {
- SetMetadata (name, value, true);
- }
-
- public void SetMetadata (string name, string value, bool isLiteral)
+ public void SetMetadata (string name, string value, bool isXml = false)
{
XmlElement elem = Element [name, MSBuildProject.Schema];
if (elem == null) {
elem = AddChildElement (name);
Element.AppendChild (elem);
}
- elem.InnerXml = value;
+ if (isXml)
+ elem.InnerXml = value;
+ else
+ elem.InnerText = value;
}
-
+
public void UnsetMetadata (string name)
{
XmlElement elem = Element [name, MSBuildProject.Schema];
@@ -700,15 +698,15 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- public string GetMetadata (string name)
+ public string GetMetadata (string name, bool isXml = false)
{
XmlElement elem = Element [name, MSBuildProject.Schema];
if (elem != null)
- return elem.InnerXml;
+ return isXml ? elem.InnerXml : elem.InnerText;
else
return null;
}
-
+
public bool GetMetadataIsFalse (string name)
{
return String.Compare (GetMetadata (name), "False", StringComparison.OrdinalIgnoreCase) == 0;
@@ -718,7 +716,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
foreach (XmlNode node in Element.ChildNodes) {
if (node is XmlElement)
- SetMetadata (node.LocalName, node.InnerXml);
+ SetMetadata (node.LocalName, node.InnerXml, true);
}
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
index bde34bb..bbefbad 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
@@ -548,15 +548,12 @@ namespace MonoDevelop.Projects.Formats.MSBuild
if (it == null) continue;
if (it is ProjectFile) {
- ProjectFile file = (ProjectFile)it;
+ var file = (ProjectFile)it;
- if (file.IsWildcard) {
- foreach (ProjectFile wildcardItem in file.ResolveWildcardItems ()) {
- EntityItem.Items.Add (wildcardItem);
-
- // Thanks to IsOriginatedFromWildcard, this item will not be saved back to disk.
- System.Diagnostics.Debug.Assert (wildcardItem.IsOriginatedFromWildcard);
- }
+ if (file.Name.IndexOf ('*') > -1) {
+ // Thanks to IsOriginatedFromWildcard, these expanded items will not be saved back to disk.
+ foreach (var expandedItem in ResolveWildcardItems (file))
+ EntityItem.Items.Add (expandedItem);
// Add to wildcard items (so it can be re-saved) instead of Items (where tools will
// try to compile and display these nonstandard items
@@ -697,6 +694,66 @@ namespace MonoDevelop.Projects.Formats.MSBuild
Item.NeedsReload = false;
}
+ const string RecursiveDirectoryWildcard = "**";
+ static readonly char[] directorySeparators = new [] {
+ Path.DirectorySeparatorChar,
+ Path.AltDirectorySeparatorChar
+ };
+
+ static string GetWildcardDirectoryName (string path)
+ {
+ int indexOfLast = path.LastIndexOfAny (directorySeparators);
+ if (indexOfLast < 0)
+ return String.Empty;
+ return path.Substring (0, indexOfLast);
+ }
+
+ static string GetWildcardFileName (string path)
+ {
+ int indexOfLast = path.LastIndexOfAny (directorySeparators);
+ if (indexOfLast < 0)
+ return path;
+ if (indexOfLast == path.Length)
+ return String.Empty;
+ return path.Substring (indexOfLast + 1, path.Length - (indexOfLast + 1));
+ }
+
+ static IEnumerable<string> ExpandWildcardFilePath (string filePath)
+ {
+ if (String.IsNullOrWhiteSpace (filePath))
+ throw new ArgumentException ("Not a wildcard path");
+
+ string dir = GetWildcardDirectoryName (filePath);
+ string file = GetWildcardFileName (filePath);
+
+ if (String.IsNullOrEmpty (dir) || String.IsNullOrEmpty (file))
+ return null;
+
+ SearchOption searchOption = SearchOption.TopDirectoryOnly;
+ if (dir.EndsWith (RecursiveDirectoryWildcard, StringComparison.Ordinal)) {
+ dir = dir.Substring (0, dir.Length - RecursiveDirectoryWildcard.Length);
+ searchOption = SearchOption.AllDirectories;
+ }
+
+ if (!Directory.Exists (dir))
+ return null;
+
+ return Directory.GetFiles (dir, file, searchOption);
+ }
+
+ static IEnumerable<ProjectFile> ResolveWildcardItems (ProjectFile wildcardFile)
+ {
+ var paths = ExpandWildcardFilePath (wildcardFile.Name);
+ if (paths == null)
+ yield break;
+ foreach (var resolvedFilePath in paths) {
+ var projectFile = (ProjectFile)wildcardFile.Clone ();
+ projectFile.Name = resolvedFilePath;
+ projectFile.IsOriginatedFromWildcard = true;
+ yield return projectFile;
+ }
+ }
+
MSBuildPropertyGroup ExtractMergedtoprojectProperties (MSBuildSerializer ser, MSBuildPropertySet pgroup, SolutionItemConfiguration ob)
{
XmlDocument doc = new XmlDocument ();
@@ -1149,10 +1206,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
msproject.SetProjectExtensions ("MonoDevelop", sw.ToString ());
} else
msproject.RemoveProjectExtensions ("MonoDevelop");
-
+
// Don't save the file to disk if the content did not change
msproject.Save (eitem.FileName);
-
+
if (projectBuilder != null)
projectBuilder.Refresh ();
}
@@ -1446,7 +1503,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
if (name == "Include")
ditem.ItemData.Add (new DataValue ("Include", buildItem.Include));
else if (buildItem.HasMetadata (name)) {
- string data = buildItem.GetMetadata (name);
+ string data = buildItem.GetMetadata (name, !prop.DataType.IsSimpleType);
ditem.ItemData.Add (GetDataNode (prop, data));
}
}
@@ -1712,7 +1769,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
string GetXmlString (DataNode node)
{
if (node is DataValue)
- return EscapeText (((DataValue)node).Value);
+ return ((DataValue)node).Value;
else {
StringWriter sw = new StringWriter ();
XmlTextWriter xw = new XmlTextWriter (sw);
@@ -1764,49 +1821,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
"BootstrapperFile", "AppDesigner", "WebReferences", "WebReferenceUrl", "Service"
};
- public static string EscapeText (string text)
- {
- var result = new StringBuilder ();
- foreach (char ch in text) {
- switch (ch) {
- case '<':
- result.Append ("<");
- break;
- case '>':
- result.Append (">");
- break;
- case '&':
- result.Append ("&");
- break;
- case '\'':
- result.Append ("'");
- break;
- case '"':
- result.Append (""");
- break;
- default:
- int charValue = (int)ch;
- if (IsSpecialChar (charValue)) {
- result.AppendFormat ("&#x{0:X};", charValue);
- } else {
- result.Append (ch);
- }
- break;
- }
- }
- return result.ToString ();
- }
-
- static bool IsSpecialChar (int charValue)
- {
- return
- 0x01 <= charValue && charValue <= 0x08 ||
- 0x0B <= charValue && charValue <= 0x0C ||
- 0x0E <= charValue && charValue <= 0x1F ||
- 0x7F <= charValue && charValue <= 0x84 ||
- 0x86 <= charValue && charValue <= 0x9F;
- }
-
public static string UnescapeText (string text)
{
var sb = new StringBuilder ();
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
index 8966bae..2f84ea6 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
@@ -300,12 +300,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
public static string ToMSBuildPath (string baseDirectory, string absPath)
{
- absPath = EscapeString (absPath);
if (baseDirectory != null) {
- absPath = FileService.NormalizeRelativePath (FileService.AbsoluteToRelativePath (
- baseDirectory, absPath));
+ absPath = FileService.NormalizeRelativePath (FileService.AbsoluteToRelativePath (baseDirectory, absPath));
}
- return absPath.Replace ('/', '\\');
+ return EscapeString (absPath).Replace ('/', '\\');
}
internal static string ToMSBuildPathRelative (string baseDirectory, string absPath)
@@ -369,7 +367,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
// If we're on Windows, don't need to fix file casing.
if (Platform.IsWindows) {
- resultPath = Path.GetFullPath (path);
+ resultPath = FileService.GetFullPath (path);
return true;
}
@@ -611,6 +609,8 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
if (type == typeof(bool))
return new MSBuildBoolDataType ();
+ else if (type == typeof(bool?))
+ return new MSBuildNullableBoolDataType ();
else
return base.CreateConfigurationDataType (type);
}
@@ -643,6 +643,37 @@ namespace MonoDevelop.Projects.Formats.MSBuild
public bool RawValue { get; private set; }
}
+
+ class MSBuildNullableBoolDataType: PrimitiveDataType
+ {
+ public MSBuildNullableBoolDataType (): base (typeof(bool))
+ {
+ }
+
+ internal protected override DataNode OnSerialize (SerializationContext serCtx, object mapData, object value)
+ {
+ return new MSBuildNullableBoolDataValue (Name, (bool?) value);
+ }
+
+ internal protected override object OnDeserialize (SerializationContext serCtx, object mapData, DataNode data)
+ {
+ var d = (DataValue)data;
+ if (string.IsNullOrEmpty (d.Value))
+ return (bool?) null;
+ return (bool?) String.Equals (d.Value, "true", StringComparison.OrdinalIgnoreCase);
+ }
+ }
+
+ class MSBuildNullableBoolDataValue : DataValue
+ {
+ public MSBuildNullableBoolDataValue (string name, bool? value)
+ : base (name, value.HasValue? (value.Value? "True" : "False") : null)
+ {
+ RawValue = value;
+ }
+
+ public bool? RawValue { get; private set; }
+ }
public class MSBuildResourceHandler: IResourceHandler
{
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
index e7f3464..eaad115 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
@@ -73,37 +73,39 @@ namespace MonoDevelop.Projects.Text
tf.Read (fileName, encoding);
return tf;
}
-
- public void Read (FilePath fileName, string encoding)
+
+ public static TextFile ReadFile (string path, Stream content)
+ {
+ TextFile tf = new TextFile ();
+ tf.name = path;
+ tf.Read (content, null);
+ return tf;
+ }
+
+ public void Read (Stream stream, string encoding)
{
- // Reads the file using the specified encoding.
- // If the encoding is null, it autodetects the
- // required encoding.
-
- this.name = fileName;
-
ByteOrderMark bom = null;
byte[] content = null;
long nread;
-
+
retry:
- using (FileStream stream = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) {
- if (encoding == null) {
- if (ByteOrderMark.TryParse (stream, out bom))
- stream.Seek (bom.Length, SeekOrigin.Begin);
- else
- stream.Seek (0, SeekOrigin.Begin);
- }
-
- content = new byte [bom != null ? stream.Length - bom.Length : stream.Length];
- nread = 0;
-
- int n;
- while ((n = stream.Read (content, (int) nread, (content.Length - (int) nread))) > 0)
- nread += n;
+ stream.Seek (0, SeekOrigin.Begin);
+
+ if (encoding == null) {
+ if (ByteOrderMark.TryParse (stream, out bom))
+ stream.Seek (bom.Length, SeekOrigin.Begin);
+ else
+ stream.Seek (0, SeekOrigin.Begin);
}
-
- if (encoding != null) {
+
+ content = new byte [bom != null ? stream.Length - bom.Length : stream.Length];
+ nread = 0;
+
+ int n;
+ while ((n = stream.Read (content, (int) nread, (content.Length - (int) nread))) > 0)
+ nread += n;
+
+ if (encoding != null) {
string s = ConvertFromEncoding (content, nread, encoding);
if (s == null) {
// The encoding provided was wrong, fall back to trying to use the BOM if it exists...
@@ -111,13 +113,14 @@ namespace MonoDevelop.Projects.Text
content = null;
goto retry;
}
-
+
text = new StringBuilder (s);
sourceEncoding = encoding;
return;
- } else if (bom != null) {
+ }
+ if (bom != null) {
string s = ConvertFromEncoding (content, nread, bom.Name);
-
+
if (s != null) {
HadBOM = true;
sourceEncoding = bom.Name;
@@ -125,7 +128,7 @@ namespace MonoDevelop.Projects.Text
return;
}
}
-
+
// Fall back to trying all the encodings...
foreach (TextEncoding co in TextEncoding.ConversionEncodings) {
string s = ConvertFromEncoding (content, nread, co.Id);
@@ -135,10 +138,22 @@ namespace MonoDevelop.Projects.Text
return;
}
}
-
throw new Exception ("Unknown text file encoding");
- }
-
+ }
+
+ public void Read (FilePath fileName, string encoding)
+ {
+ // Reads the file using the specified encoding.
+ // If the encoding is null, it autodetects the
+ // required encoding.
+
+ this.name = fileName;
+
+ using (FileStream stream = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) {
+ Read (stream, encoding);
+ }
+ }
+
public static string GetFileEncoding (FilePath fileName)
{
// Maybe this can be optimized later.
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildAction.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildAction.cs
index d3e1712..81ab41c 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildAction.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildAction.cs
@@ -43,6 +43,7 @@ namespace MonoDevelop.Projects
public const string Page = "Page";
public const string InterfaceDefinition = "InterfaceDefinition";
public const string BundleResource = "BundleResource";
+ public const string AtlasResource = "AtlasResource";
public const string Resource = "Resource";
public const string SplashScreen = "SplashScreen";
public const string EntityDeploy = "EntityDeploy";
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildTool.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildTool.cs
index 1a6e8a3..f9d0433 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildTool.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildTool.cs
@@ -109,44 +109,48 @@ namespace MonoDevelop.Projects
item = Services.ProjectService.ReadWorkspaceItem (monitor, solFile);
else
item = Services.ProjectService.ReadSolutionItem (monitor, itemFile);
-
- if (project != null) {
- Solution solution = item as Solution;
- item = null;
-
- if (solution != null) {
- item = solution.FindProjectByName (project);
- }
- if (item == null) {
- Console.WriteLine ("The project '" + project + "' could not be found in " + file);
- return 1;
+
+ using (var readItem = item) {
+ if (project != null) {
+ Solution solution = item as Solution;
+ item = null;
+
+ if (solution != null) {
+ item = solution.FindProjectByName (project);
+ }
+ if (item == null) {
+ Console.WriteLine ("The project '" + project + "' could not be found in " + file);
+ return 1;
+ }
}
- }
- IConfigurationTarget configTarget = item as IConfigurationTarget;
- if (config == null && configTarget != null)
- config = configTarget.DefaultConfigurationId;
-
- ConfigurationSelector configuration;
- if (item is SolutionEntityItem)
- configuration = new ItemConfigurationSelector (config);
- else
- configuration = new SolutionConfigurationSelector (config);
-
- monitor = new ConsoleProgressMonitor ();
- BuildResult res = item.RunTarget (monitor, command, configuration);
+ IConfigurationTarget configTarget = item as IConfigurationTarget;
+ if (config == null && configTarget != null)
+ config = configTarget.DefaultConfigurationId;
+
+ ConfigurationSelector configuration;
+ if (item is SolutionEntityItem)
+ configuration = new ItemConfigurationSelector (config);
+ else
+ configuration = new SolutionConfigurationSelector (config);
+
+ monitor = new ConsoleProgressMonitor ();
+ BuildResult res = item.RunTarget (monitor, command, configuration);
- if (targetRuntime != null)
- {
- Runtime.SystemAssemblyService.DefaultRuntime = defaultRuntime;
- MonoTargetRuntimeFactory.UnregisterRuntime((MonoTargetRuntime) targetRuntime);
- }
+ if (targetRuntime != null)
+ {
+ Runtime.SystemAssemblyService.DefaultRuntime = defaultRuntime;
+ MonoTargetRuntimeFactory.UnregisterRuntime((MonoTargetRuntime) targetRuntime);
+ }
- foreach (var err in res.Errors) {
- Console.Error.WriteLine (err);
- }
+ if (res != null) {
+ foreach (var err in res.Errors) {
+ Console.Error.WriteLine (err);
+ }
+ }
- return (res == null || res.ErrorCount == 0) ? 0 : 1;
+ return (res == null || res.ErrorCount == 0) ? 0 : 1;
+ }
}
void ReadArgument (string argument)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
index 9ed28a6..9589f02 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
@@ -53,8 +53,8 @@ namespace MonoDevelop.Projects
// Special frameworks such as Moonlight or MonoTouch must subclass DotNetProject directly.
if (!framework.CanReferenceAssembliesTargetingFramework (TargetFrameworkMoniker.NET_1_1))
return false;
- else
- return base.SupportsFramework (framework);
+
+ return base.SupportsFramework (framework);
}
public override TargetFrameworkMoniker GetDefaultTargetFrameworkForFormat (FileFormat format)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
index 2a04ce2..a28e7aa 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
@@ -1095,14 +1095,12 @@ namespace MonoDevelop.Projects
internal void NotifyReferenceRemovedFromProject (ProjectReference reference)
{
- SetNeedsBuilding (true);
NotifyModified ("References");
OnReferenceRemovedFromProject (new ProjectReferenceEventArgs (this, reference));
}
internal void NotifyReferenceAddedToProject (ProjectReference reference)
{
- SetNeedsBuilding (true);
NotifyModified ("References");
OnReferenceAddedToProject (new ProjectReferenceEventArgs (this, reference));
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs
index aad9c10..e668036 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/HelpService.cs
@@ -259,7 +259,7 @@ namespace MonoDevelop.Projects
public static XmlNode GetMonodocDocumentation (this IEntity member)
{
- if (member.EntityType == EntityType.TypeDefinition) {
+ if (member.SymbolKind == SymbolKind.TypeDefinition) {
var helpXml = HelpService.HelpTree != null ? HelpService.HelpTree.GetHelpXml (member.GetIdString ()) : null;
if (helpXml == null)
return null;
@@ -270,8 +270,8 @@ namespace MonoDevelop.Projects
if (declaringXml == null)
return null;
- switch (member.EntityType) {
- case EntityType.Method: {
+ switch (member.SymbolKind) {
+ case SymbolKind.Method: {
var nodes = declaringXml.SelectNodes ("/Type/Members/Member[@MemberName='" + member.Name + "']");
XmlNode node = nodes.Count == 1 ? nodes [0] : FindMatch ((IMethod)member, nodes);
if (node != null) {
@@ -280,7 +280,7 @@ namespace MonoDevelop.Projects
}
return null;
}
- case EntityType.Constructor: {
+ case SymbolKind.Constructor: {
var nodes = declaringXml.SelectNodes ("/Type/Members/Member[@MemberName='.ctor']");
XmlNode node = nodes.Count == 1 ? nodes [0] : FindMatch ((IMethod)member, nodes);
if (node != null) {
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
index 0851faa..6060ef0 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
@@ -53,7 +53,7 @@ namespace MonoDevelop.Projects
{
int version;
- if (!format.Id.StartsWith ("MSBuild"))
+ if (!format.Id.StartsWith ("MSBuild", StringComparison.Ordinal))
return false;
if (!int.TryParse (format.Id.Substring ("MSBuild".Length), out version))
@@ -86,8 +86,8 @@ namespace MonoDevelop.Projects
public override TargetFrameworkMoniker GetDefaultTargetFrameworkId ()
{
- // Profile1 is the most-inclusive subset of the profiles, so we'll default to that one.
- return new TargetFrameworkMoniker (".NETPortable", "4.0", "Profile1");
+ // Profile136 includes .NET 4.0+, Silverlight 5, Windows Phone 8, and Xamarin.iOS/Android, so make that our default.
+ return new TargetFrameworkMoniker (".NETPortable", "4.0", "Profile136");
}
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
index 6984053..e40fba1 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
@@ -60,7 +60,6 @@ namespace MonoDevelop.Projects
public abstract class Project : SolutionEntityItem
{
string[] buildActions;
- bool isDirty;
public Project ()
{
@@ -425,9 +424,7 @@ namespace MonoDevelop.Projects
StringParserService.Properties["Project"] = Name;
if (UsingMSBuildEngine ()) {
- var r = DoBuild (monitor, configuration);
- isDirty = false;
- return r;
+ return DoBuild (monitor, configuration);
}
string outputDir = conf.OutputDirectory;
@@ -447,8 +444,6 @@ namespace MonoDevelop.Projects
BuildResult res = DoBuild (monitor, configuration);
- isDirty = false;
-
if (res != null) {
string errorString = GettextCatalog.GetPluralString ("{0} error", "{0} errors", res.ErrorCount, res.ErrorCount);
string warningString = GettextCatalog.GetPluralString ("{0} warning", "{0} warnings", res.WarningCount, res.WarningCount);
@@ -648,8 +643,6 @@ namespace MonoDevelop.Projects
protected override void OnClean (IProgressMonitor monitor, ConfigurationSelector configuration)
{
- SetDirty ();
-
ProjectConfiguration config = GetConfiguration (configuration) as ProjectConfiguration;
if (config == null) {
monitor.ReportError (GettextCatalog.GetString ("Configuration '{0}' not found in project '{1}'", config.Id, Name), null);
@@ -725,22 +718,7 @@ namespace MonoDevelop.Projects
protected internal override bool OnGetNeedsBuilding (ConfigurationSelector configuration)
{
- if (!isDirty) {
- if (CheckNeedsBuild (configuration))
- SetDirty ();
- }
- return isDirty;
- }
-
- protected internal override void OnSetNeedsBuilding (bool value, ConfigurationSelector configuration)
- {
- isDirty = value;
- }
-
- void SetDirty ()
- {
- if (!Loading)
- isDirty = true;
+ return CheckNeedsBuild (configuration);
}
/// <summary>
@@ -770,7 +748,7 @@ namespace MonoDevelop.Projects
}
foreach (SolutionItem pref in GetReferencedItems (configuration)) {
- if (pref.GetLastBuildTime (configuration) > tim || pref.NeedsBuilding (configuration))
+ if (pref.GetLastBuildTime (configuration) > tim)
return true;
}
@@ -802,7 +780,6 @@ namespace MonoDevelop.Projects
foreach (FileEventInfo fi in e) {
ProjectFile file = GetProjectFile (fi.FileName);
if (file != null) {
- SetDirty ();
try {
NotifyFileChangedInProject (file);
} catch {
@@ -843,10 +820,10 @@ namespace MonoDevelop.Projects
OnFileChangedInProject (new ProjectFileEventArgs (this, file));
}
- internal void NotifyFilePropertyChangedInProject (ProjectFile file)
+ internal void NotifyFilePropertyChangedInProject (ProjectFile file, string property)
{
NotifyModified ("Files");
- OnFilePropertyChangedInProject (new ProjectFileEventArgs (this, file));
+ OnFilePropertyChangedInProject (new ProjectFileEventArgs (this, file, property));
}
// A collection of files that depend on other files for which the dependencies
@@ -873,7 +850,6 @@ namespace MonoDevelop.Projects
file.DependsOnFile = null;
}
}
- SetDirty ();
NotifyModified ("Files");
OnFileRemovedFromProject (args);
}
@@ -893,7 +869,6 @@ namespace MonoDevelop.Projects
ResolveDependencies (file);
}
- SetDirty ();
NotifyModified ("Files");
OnFileAddedToProject (args);
}
@@ -948,7 +923,6 @@ namespace MonoDevelop.Projects
internal void NotifyFileRenamedInProject (ProjectFileRenamedEventArgs args)
{
- SetDirty ();
NotifyModified ("Files");
OnFileRenamedInProject (args);
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
index ee51721..1734fe9 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
@@ -70,22 +70,22 @@ namespace MonoDevelop.Projects
}
[ItemProperty("subtype")]
- private Subtype subtype;
+ Subtype subtype;
public Subtype Subtype {
get { return subtype; }
set {
subtype = value;
- OnChanged ();
+ OnChanged ("Subtype");
}
}
[ItemProperty("data", DefaultValue = "")]
- private string data = "";
+ string data = "";
public string Data {
get { return data; }
set {
data = value;
- OnChanged ();
+ OnChanged ("Data");
}
}
@@ -104,6 +104,10 @@ namespace MonoDevelop.Projects
projectFile.dependsOn = Path.GetFileName (FilePath);
}
+ // If the file is a link, rename the link too
+ if (IsLink && Link.FileName == oldFileName.FileName)
+ link = Path.Combine (Path.GetDirectoryName (link), filename.FileName);
+
if (project != null)
project.NotifyFileRenamedInProject (new ProjectFileRenamedEventArgs (project, this, oldFileName));
}
@@ -116,7 +120,7 @@ namespace MonoDevelop.Projects
get { return buildaction; }
set {
buildaction = string.IsNullOrEmpty (value) ? MonoDevelop.Projects.BuildAction.None : value;
- OnChanged ();
+ OnChanged ("BuildAction");
}
}
@@ -139,120 +143,13 @@ namespace MonoDevelop.Projects
get { return FilePath; }
}
- internal bool IsWildcard {
- get {
- return Name.Contains("*");
- }
- }
-
/// <summary>
/// Set to true if this ProjectFile was created at load time by
/// a ProjectFile containing wildcards. If true, this instance
/// should not be saved to a csproj file.
/// </summary>
- internal bool IsOriginatedFromWildcard
- {
- get;
- private set;
- }
-
- private const string RecursiveDirectoryWildcard = "**";
-
- private string GetWildcardDirectoryName (string path)
- {
- int indexOfLast = path.LastIndexOfAny (new char[] {
- Path.DirectorySeparatorChar,
- Path.AltDirectorySeparatorChar });
-
- if (indexOfLast < 0)
- {
- return String.Empty;
- }
- else
- {
- return path.Substring (0, indexOfLast);
- }
- }
-
- private string GetWildcardFileName (string path)
- {
- int indexOfLast = path.LastIndexOfAny (new char[] {
- Path.DirectorySeparatorChar,
- Path.AltDirectorySeparatorChar });
-
- if (indexOfLast < 0)
- {
- return path;
- }
- else if(indexOfLast == path.Length)
- {
- return String.Empty;
- }
- else
- {
- return path.Substring (indexOfLast + 1, path.Length - (indexOfLast + 1));
- }
- }
-
- internal IEnumerable<string> ResolveWildcardFilePath ()
- {
- if (String.IsNullOrWhiteSpace(filename)) yield break;
-
- string dir = GetWildcardDirectoryName (filename);
- string file = GetWildcardFileName (filename);
-
- if (String.IsNullOrEmpty (dir)) yield break;
- if (String.IsNullOrEmpty (file)) yield break;
-
- if (dir.EndsWith (RecursiveDirectoryWildcard))
- {
- dir = dir.Substring (0, dir.Length - RecursiveDirectoryWildcard.Length);
-
- if (!Directory.Exists (dir))
- {
- yield break; // Invalid directory
- }
-
- List<string> directories = new List<string> ();
-
- RecursiveAddChildDirectories (directories, dir);
-
- foreach (var resolvedDir in directories)
- {
- foreach (var resolvedFile in Directory.GetFiles (resolvedDir, file))
- {
- yield return resolvedFile;
- }
- }
- }
- else
- {
- foreach (var resolvedFile in Directory.GetFiles (dir, file))
- {
- yield return resolvedFile;
- }
- }
- }
-
- private void RecursiveAddChildDirectories (List<string> directories, string directory)
- {
- directories.Add (directory);
-
- foreach (var child in Directory.GetDirectories (directory))
- {
- RecursiveAddChildDirectories (directories, child);
- }
- }
-
- internal IEnumerable<ProjectFile> ResolveWildcardItems ()
- {
- foreach (var resolvedFilePath in ResolveWildcardFilePath ())
- {
- ProjectFile projectFile = (ProjectFile) this.Clone ();
- projectFile.Name = resolvedFilePath;
- projectFile.IsOriginatedFromWildcard = true;
- yield return projectFile;
- }
+ internal bool IsOriginatedFromWildcard {
+ get; set;
}
/// <summary>
@@ -265,7 +162,7 @@ namespace MonoDevelop.Projects
return Link;
if (project != null) {
var rel = project.GetRelativeChildPath (FilePath);
- if (!rel.ToString ().StartsWith (".."))
+ if (!rel.ToString ().StartsWith ("..", StringComparison.Ordinal))
return rel;
}
return FilePath.FileName;
@@ -284,7 +181,7 @@ namespace MonoDevelop.Projects
get { return contentType; }
set {
contentType = value;
- OnChanged ();
+ OnChanged ("ContentType");
}
}
@@ -299,7 +196,7 @@ namespace MonoDevelop.Projects
set {
if (visible != value) {
visible = value;
- OnChanged ();
+ OnChanged ("Visible");
}
}
}
@@ -315,7 +212,7 @@ namespace MonoDevelop.Projects
set {
if (generator != value) {
generator = value;
- OnChanged ();
+ OnChanged ("Generator");
}
}
}
@@ -331,7 +228,7 @@ namespace MonoDevelop.Projects
set {
if (customToolNamespace != value) {
customToolNamespace = value;
- OnChanged ();
+ OnChanged ("CustomToolNamespace");
}
}
}
@@ -348,7 +245,7 @@ namespace MonoDevelop.Projects
set {
if (lastGenOutput != value) {
lastGenOutput = value;
- OnChanged ();
+ OnChanged ("LastGenOutput");
}
}
}
@@ -365,10 +262,14 @@ namespace MonoDevelop.Projects
get { return link; }
set {
if (link != value) {
- if (value.IsAbsolute || value.ToString ().StartsWith (".."))
+ if (value.IsAbsolute || value.ToString ().StartsWith ("..", StringComparison.Ordinal))
throw new ArgumentException ("value");
+
+ var oldLink = link;
link = value;
- OnChanged ();
+
+ OnVirtualPathChanged (oldLink, link);
+ OnChanged ("Link");
}
}
}
@@ -398,7 +299,7 @@ namespace MonoDevelop.Projects
set {
if (copyToOutputDirectory != value) {
copyToOutputDirectory = value;
- OnChanged ();
+ OnChanged ("CopyToOutputDirectory");
}
}
}
@@ -410,7 +311,9 @@ namespace MonoDevelop.Projects
set {
if (dependsOn != value) {
- var oldPath = !string.IsNullOrEmpty (dependsOn) ? FilePath.ParentDirectory.Combine (Path.GetFileName (dependsOn)) : FilePath.Empty;
+ var oldPath = !string.IsNullOrEmpty (dependsOn)
+ ? FilePath.ParentDirectory.Combine (Path.GetFileName (dependsOn))
+ : FilePath.Empty;
dependsOn = value;
if (dependsOnFile != null) {
@@ -421,7 +324,7 @@ namespace MonoDevelop.Projects
if (project != null && value != null)
project.UpdateDependency (this, oldPath);
- OnChanged ();
+ OnChanged ("DependsOn");
}
}
}
@@ -468,7 +371,10 @@ namespace MonoDevelop.Projects
//don't allow cyclic references
if (parentPath == FilePath) {
- MonoDevelop.Core.LoggingService.LogWarning ("Cyclic dependency in project '{0}': file '{1}' depends on '{2}'", project == null ? "(none)" : project.Name, FilePath, parentPath);
+ LoggingService.LogWarning (
+ "Cyclic dependency in project '{0}': file '{1}' depends on '{2}'",
+ project == null ? "(none)" : project.Name, FilePath, parentPath
+ );
return true;
}
@@ -497,13 +403,16 @@ namespace MonoDevelop.Projects
}
set {
resourceId = value;
- OnChanged ();
+ OnChanged ("ResourceId");
}
}
internal void SetProject (Project project)
{
this.project = project;
+
+ if (project != null)
+ OnVirtualPathChanged (FilePath.Null, ProjectVirtualPath);
}
public override string ToString ()
@@ -524,10 +433,40 @@ namespace MonoDevelop.Projects
{
}
- protected virtual void OnChanged ()
+ internal event EventHandler<ProjectFileVirtualPathChangedEventArgs> VirtualPathChanged;
+
+ void OnVirtualPathChanged (FilePath oldVirtualPath, FilePath newVirtualPath)
+ {
+ var handler = VirtualPathChanged;
+
+ if (handler != null)
+ handler (this, new ProjectFileVirtualPathChangedEventArgs (this, oldVirtualPath, newVirtualPath));
+ }
+
+ protected virtual void OnChanged (string property)
{
if (project != null)
- project.NotifyFilePropertyChangedInProject (this);
+ project.NotifyFilePropertyChangedInProject (this, property);
+ }
+
+ [Obsolete ("Use OnChanged(string property) instead.")]
+ protected virtual void OnChanged ()
+ {
+ OnChanged (null);
+ }
+ }
+
+ internal class ProjectFileVirtualPathChangedEventArgs : EventArgs
+ {
+ public ProjectFileVirtualPathChangedEventArgs (ProjectFile projectFile, FilePath oldPath, FilePath newPath)
+ {
+ ProjectFile = projectFile;
+ OldVirtualPath = oldPath;
+ NewVirtualPath = newPath;
}
+
+ public ProjectFile ProjectFile { get; private set; }
+ public FilePath OldVirtualPath { get; private set; }
+ public FilePath NewVirtualPath { get; private set; }
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileCollection.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileCollection.cs
index 2dab858..d36a484 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileCollection.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileCollection.cs
@@ -26,41 +26,204 @@
//
using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.IO;
+using System.Linq;
+using System.Collections.Generic;
+
using MonoDevelop.Core;
namespace MonoDevelop.Projects
{
+ class ProjectFileNode
+ {
+ public SortedList<string, ProjectFileNode> Children { get; private set; }
+ public ProjectFileNode Parent { get; private set; }
+
+ public ProjectFile ProjectFile { get; set; }
+ public string FileName { get; set; }
+
+ public ProjectFileNode () : this (null, string.Empty) { }
+
+ public ProjectFileNode (ProjectFileNode parent, ProjectFile file)
+ {
+ Children = new SortedList<string, ProjectFileNode> ();
+ FileName = file.ProjectVirtualPath.FileName;
+ ProjectFile = file;
+ Parent = parent;
+ }
+
+ public ProjectFileNode (ProjectFileNode parent, string fileName)
+ {
+ Children = new SortedList<string, ProjectFileNode> ();
+ FileName = fileName;
+ ProjectFile = null;
+ Parent = parent;
+ }
+
+ ProjectFileNode Find (string[] path, int pathIndex, bool create)
+ {
+ ProjectFileNode child;
+
+ if (Children.TryGetValue (path[pathIndex], out child)) {
+ if (pathIndex + 1 == path.Length)
+ return child;
+
+ return child.Find (path, pathIndex + 1, create);
+ }
+
+ if (create) {
+ child = new ProjectFileNode (this, path[pathIndex]);
+ Children.Add (child.FileName, child);
+
+ if (pathIndex + 1 == path.Length)
+ return child;
+
+ return child.Find (path, pathIndex + 1, create);
+ }
+
+ return null;
+ }
+
+ public ProjectFileNode Find (string vpath, bool create)
+ {
+ if (string.IsNullOrEmpty (vpath))
+ return this;
+
+ var path = vpath.Split (new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.None);
+
+ return Find (path, 0, create);
+ }
+
+ public IEnumerable<ProjectFile> EnumerateProjectFiles (bool recursive)
+ {
+ foreach (var child in Children.Select (x => x.Value)) {
+ if (child.ProjectFile != null)
+ yield return child.ProjectFile;
+
+ if (recursive) {
+ foreach (var pf in child.EnumerateProjectFiles (recursive))
+ yield return pf;
+ }
+ }
+
+ yield break;
+ }
+ }
+
[Serializable()]
- public class ProjectFileCollection : ProjectItemCollection<ProjectFile> {
-
+ public class ProjectFileCollection : ProjectItemCollection<ProjectFile>
+ {
+ Dictionary<FilePath, ProjectFile> files;
+ ProjectFileNode root;
+
public ProjectFileCollection ()
{
+ files = new Dictionary<FilePath, ProjectFile> ();
+ root = new ProjectFileNode ();
}
-
- public ProjectFile GetFile (FilePath fileName)
- {
- if (fileName.IsNull) return null;
- fileName = fileName.FullPath;
-
- foreach (ProjectFile file in this) {
- if (file.FilePath == fileName)
- return file;
+
+ void ProjectVirtualPathChanged (object sender, ProjectFileVirtualPathChangedEventArgs e)
+ {
+ ProjectFileNode node;
+
+ // Note: if the OldVirtualPath is null, then it means that a Project was just set on the ProjectFile
+ // which means that it hasn't yet been added to our VirtualProjectPath tree.
+ if (e.OldVirtualPath.IsNotNull) {
+ node = root.Find (e.OldVirtualPath, false);
+ if (node != null) {
+ node.Parent.Children.Remove (node.FileName);
+ PruneEmptyParents (node.Parent);
+ }
}
+
+ node = root.Find (e.NewVirtualPath, true);
+ node.ProjectFile = e.ProjectFile;
+ }
+
+ void AddProjectFile (ProjectFile item)
+ {
+ item.VirtualPathChanged += ProjectVirtualPathChanged;
+
+ if (item.Project != null) {
+ // Note: the ProjectVirtualPath is useless unless a Project is specified.
+ var node = root.Find (item.ProjectVirtualPath, true);
+ node.ProjectFile = item;
+ }
+
+ files[item.FilePath] = item;
+ }
+
+ void PruneEmptyParents (ProjectFileNode node)
+ {
+ if (node.Children.Count > 0 || node.ProjectFile != null || node.Parent == null)
+ return;
+
+ node.Parent.Children.Remove (node.FileName);
+ PruneEmptyParents (node.Parent);
+ }
+
+ void RemoveProjectFile (ProjectFile item)
+ {
+ var node = root.Find (item.ProjectVirtualPath, false);
+ if (node != null) {
+ node.Parent.Children.Remove (node.FileName);
+ PruneEmptyParents (node.Parent);
+ }
+
+ files.Remove (item.FilePath);
+
+ item.VirtualPathChanged -= ProjectVirtualPathChanged;
+ }
+
+ #region ItemCollection<T>
+ protected override void OnItemAdded (ProjectFile item)
+ {
+ AddProjectFile (item);
+ base.OnItemAdded (item);
+ }
+
+ protected override void OnItemRemoved (ProjectFile item)
+ {
+ RemoveProjectFile (item);
+ base.OnItemRemoved (item);
+ }
+ #endregion
+
+ #region ProjectItemCollection<T>
+ protected override void AddItem (ProjectFile item)
+ {
+ AddProjectFile (item);
+ base.AddItem (item);
+ }
+
+ protected override void RemoveItem (ProjectFile item)
+ {
+ RemoveProjectFile (item);
+ base.RemoveItem (item);
+ }
+ #endregion
+
+ public ProjectFile GetFile (FilePath path)
+ {
+ if (path.IsNull)
+ return null;
+
+ ProjectFile pf;
+ if (files.TryGetValue (path.FullPath, out pf))
+ return pf;
+
return null;
}
public ProjectFile GetFileWithVirtualPath (string virtualPath)
{
- if (String.IsNullOrEmpty (virtualPath))
+ if (string.IsNullOrEmpty (virtualPath))
return null;
-
- foreach (ProjectFile file in this) {
- if (file.ProjectVirtualPath == virtualPath)
- return file;
- }
+
+ var node = root.Find (virtualPath, false);
+ if (node != null && node.ProjectFile != null)
+ return node.ProjectFile;
+
return null;
}
@@ -68,14 +231,15 @@ namespace MonoDevelop.Projects
{
if (string.IsNullOrEmpty (virtualPath))
yield break;
-
- //saves a ton of string allocations in IsChildPathOf
- if (virtualPath[virtualPath.Length-1] != Path.DirectorySeparatorChar)
- virtualPath = virtualPath + Path.DirectorySeparatorChar;
-
- foreach (ProjectFile file in this)
- if (file.ProjectVirtualPath.IsChildPathOf (virtualPath))
- yield return file;
+
+ var node = root.Find (virtualPath, false);
+ if (node == null)
+ yield break;
+
+ foreach (var pf in node.EnumerateProjectFiles (true))
+ yield return pf;
+
+ yield break;
}
public ProjectFile[] GetFilesInPath (FilePath path)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileEventArgs.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileEventArgs.cs
index e995869..dd22ec2 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileEventArgs.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFileEventArgs.cs
@@ -40,6 +40,11 @@ namespace MonoDevelop.Projects
bool singleDir;
bool singleVirtualDir;
Project commonProject;
+
+ public ProjectFileEventArgs (Project project, ProjectFile file, string property)
+ {
+ Add (new ProjectFileEventInfo (project, file, property));
+ }
public ProjectFileEventArgs (Project project, ProjectFile file)
{
@@ -128,25 +133,27 @@ namespace MonoDevelop.Projects
public class ProjectFileEventInfo
{
- Project project;
- ProjectFile file;
-
public Project Project {
- get {
- return project;
- }
+ get; private set;
}
public ProjectFile ProjectFile {
- get {
- return file;
- }
+ get; private set;
+ }
+
+ public string Property {
+ get; private set;
+ }
+
+ public ProjectFileEventInfo (Project project, ProjectFile file, string property)
+ {
+ Property = property;
+ ProjectFile = file;
+ Project = project;
}
- public ProjectFileEventInfo (Project project, ProjectFile file)
+ public ProjectFileEventInfo (Project project, ProjectFile file) : this (project, file, null)
{
- this.project = project;
- this.file = file;
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs
index fb23c9e..cfdbd84 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs
@@ -63,19 +63,29 @@ namespace MonoDevelop.Projects
public ProjectItemCollection ()
{
}
+
+ protected virtual void AddItem (T item)
+ {
+ Items.Add (item);
+ }
public void AddRange (IEnumerable<T> items)
{
- foreach (T t in items)
- Items.Add (t);
+ foreach (var item in items)
+ AddItem (item);
NotifyAdded (items, false);
NotifyAdded (items, true);
}
+
+ protected virtual void RemoveItem (T item)
+ {
+ Items.Remove (item);
+ }
public void RemoveRange (IEnumerable<T> items)
{
- foreach (T t in items)
- Items.Remove (t);
+ foreach (var item in items)
+ RemoveItem (item);
NotifyRemoved (items, false);
NotifyRemoved (items, true);
}
@@ -120,18 +130,20 @@ namespace MonoDevelop.Projects
NotifyRemoved (items, false);
}
- void IItemListHandler.InternalAdd (IEnumerable<ProjectItem> objs, bool comesFromParent)
+ void IItemListHandler.InternalAdd (IEnumerable<ProjectItem> items, bool comesFromParent)
{
- foreach (T t in objs)
- Items.Add (t);
- NotifyAdded (objs, comesFromParent);
+ foreach (var item in items)
+ AddItem ((T) item);
+
+ NotifyAdded (items, comesFromParent);
}
- void IItemListHandler.InternalRemove (IEnumerable<ProjectItem> objs, bool comesFromParent)
+ void IItemListHandler.InternalRemove (IEnumerable<ProjectItem> items, bool comesFromParent)
{
- foreach (T t in objs)
- Items.Remove (t);
- NotifyRemoved (objs, comesFromParent);
+ foreach (var item in items)
+ RemoveItem ((T) item);
+
+ NotifyRemoved (items, comesFromParent);
}
bool IItemListHandler.CanHandle (ProjectItem obj)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
index 2bc5fd8..ed206d4 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
@@ -46,7 +46,7 @@ namespace MonoDevelop.Projects
Package,
Custom,
[Obsolete]
- Gac = Package
+ Gac
}
/// <summary>
@@ -104,6 +104,10 @@ namespace MonoDevelop.Projects
{
if (referenceType == ReferenceType.Assembly)
specificVersion = false;
+#pragma warning disable 612
+ if (referenceType == ReferenceType.Gac)
+ referenceType = ReferenceType.Package;
+#pragma warning restore 612
this.referenceType = referenceType;
this.reference = reference;
UpdatePackageReference ();
@@ -144,7 +148,15 @@ namespace MonoDevelop.Projects
public Project OwnerProject {
get { return ownerProject; }
}
-
+
+ // This property is used by the serializer. It ensures that the obsolete Gac value is not serialized
+ internal ReferenceType internalReferenceType {
+ get { return referenceType; }
+ #pragma warning disable 612
+ set { referenceType = value == ReferenceType.Gac ? ReferenceType.Package : value; }
+ #pragma warning restore 612
+ }
+
public ReferenceType ReferenceType {
get {
return referenceType;
@@ -229,10 +241,25 @@ namespace MonoDevelop.Projects
if (!IsExactVersion && SpecificVersion)
return GettextCatalog.GetString ("Specified version not found: expected {0}, found {1}", GetVersionNum (StoredReference), GetVersionNum (Reference));
if (notFound) {
- if (ownerProject != null)
- return GettextCatalog.GetString ("Assembly not available for {0} (in {1})", TargetFramework.Name, TargetRuntime.DisplayName);
- else
- return GettextCatalog.GetString ("Assembly not found");
+ if (ownerProject != null) {
+ bool isDefaultRuntime = Runtime.SystemAssemblyService.DefaultRuntime == TargetRuntime;
+ var hintPath = ExtendedProperties ["_OriginalMSBuildReferenceHintPath"] as string;
+ bool probablyFrameworkAssembly = string.IsNullOrEmpty (hintPath);
+
+ if (TargetRuntime.IsInstalled (TargetFramework) || !probablyFrameworkAssembly) {
+ if (isDefaultRuntime)
+ return GettextCatalog.GetString ("Assembly not found for framework {0}", TargetFramework.Name);
+
+ return GettextCatalog.GetString ("Assembly not found for framework {0} (in {1})", TargetFramework.Name, TargetRuntime.DisplayName);
+ }
+
+ if (isDefaultRuntime)
+ return GettextCatalog.GetString ("Framework {0} is not installed", TargetFramework.Name);
+
+ return GettextCatalog.GetString ("Framework {0} is not installed (in {1})", TargetFramework.Name, TargetRuntime.DisplayName);
+ }
+
+ return GettextCatalog.GetString ("Assembly not found");
}
} else if (ReferenceType == ReferenceType.Project) {
if (ownerProject != null && ownerProject.ParentSolution != null) {
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
index 3190c7d..57c2334 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
@@ -329,9 +329,8 @@ namespace MonoDevelop.Projects
file = format.GetValidFileName (item, file);
}
- if (!FileService.RequestFileEdit (file))
- throw new UserException (GettextCatalog.GetString ("The project could not be saved"), GettextCatalog.GetString ("Write permission has not been granted for file '{0}'", file));
-
+ FileService.RequestFileEdit (file);
+
format.Format.WriteFile (file, item, monitor);
return file;
}
@@ -644,6 +643,7 @@ namespace MonoDevelop.Projects
public override void Save (IProgressMonitor monitor, SolutionEntityItem entry)
{
+ FileService.RequestFileEdit (entry.GetItemFiles (false));
entry.OnSave (monitor);
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
index 5debb5d..b1c30d3 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
@@ -579,17 +579,7 @@ namespace MonoDevelop.Projects
monitor.EndTask ();
}
}
-
- protected internal override bool OnGetNeedsBuilding (ConfigurationSelector configuration)
- {
- return RootFolder.NeedsBuilding (configuration);
- }
-
- protected internal override void OnSetNeedsBuilding (bool val, ConfigurationSelector configuration)
- {
- RootFolder.SetNeedsBuilding (val, configuration);
- }
-
+
protected virtual void OnStartupItemChanged(EventArgs e)
{
if (StartupItemChanged != null)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs
index 8d0965e..a7d00f2 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionEntityItem.cs
@@ -327,10 +327,10 @@ namespace MonoDevelop.Projects
ItemHandler.Save (monitor);
}
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool value)
{
- foreach (string conf in GetConfigurations ())
- SetNeedsBuilding (value, new ItemConfigurationSelector (conf));
+ // Nothing to be done
}
public FilePath GetAbsoluteChildPath (FilePath relPath)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
index d7be559..4764f55 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
@@ -199,19 +199,6 @@ namespace MonoDevelop.Projects
SetItemHandler (new DummySolutionFolderHandler (this));
}
-
- protected internal override bool OnGetNeedsBuilding (ConfigurationSelector configuration)
- {
- foreach (SolutionItem item in Items)
- if (item.NeedsBuilding (configuration)) return true;
- return false;
- }
-
- protected internal override void OnSetNeedsBuilding (bool value, ConfigurationSelector configuration)
- {
- // Ignore
- }
-
public override void Dispose()
{
if (items != null) {
@@ -626,7 +613,7 @@ namespace MonoDevelop.Projects
}
try {
- List<SolutionItem> toBuild = new List<SolutionItem> (allProjects.Where (p => p.NeedsBuilding (configuration)));
+ List<SolutionItem> toBuild = new List<SolutionItem> (allProjects);
monitor.BeginTask (GettextCatalog.GetString ("Building Solution: {0} ({1})", Name, configuration.ToString ()), toBuild.Count);
@@ -715,8 +702,11 @@ namespace MonoDevelop.Projects
{
foreach (Project projectEntry in GetAllProjects()) {
foreach (ProjectFile fInfo in projectEntry.Files) {
- if (fInfo.FilePath == oldName)
+ if (fInfo.FilePath == oldName) {
+ if (fInfo.BuildAction == projectEntry.GetDefaultBuildAction (oldName))
+ fInfo.BuildAction = projectEntry.GetDefaultBuildAction (newName);
fInfo.Name = newName;
+ }
}
}
}
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
index 3b31ab2..71f75b3 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
@@ -540,9 +540,6 @@ namespace MonoDevelop.Projects
ITimeTracker tt = Counters.BuildProjectTimer.BeginTiming ("Building " + Name);
try {
if (!buildReferences) {
- if (!NeedsBuilding (solutionConfiguration))
- return new BuildResult (new CompilerResults (null), "");
-
//SolutionFolder's OnRunTarget handles the begin/end task itself, don't duplicate
if (this is SolutionFolder) {
return RunTarget (monitor, ProjectService.BuildTarget, solutionConfiguration);
@@ -577,7 +574,7 @@ namespace MonoDevelop.Projects
monitor.BeginTask (null, sortedReferenced.Count);
foreach (SolutionItem p in sortedReferenced) {
- if (p.NeedsBuilding (solutionConfiguration) && !p.ContainsReferences (failedItems, solutionConfiguration)) {
+ if (!p.ContainsReferences (failedItems, solutionConfiguration)) {
BuildResult res = p.Build (monitor, solutionConfiguration, false);
cres.Append (res);
if (res.ErrorCount > 0)
@@ -622,8 +619,7 @@ namespace MonoDevelop.Projects
if (!visited.Add(item))
return;
- if (item.NeedsBuilding (configuration))
- referenced.Add (item);
+ referenced.Add (item);
foreach (SolutionItem ritem in item.GetReferencedItems (configuration))
GetBuildableReferencedItems (visited, referenced, ritem, configuration);
@@ -690,18 +686,19 @@ namespace MonoDevelop.Projects
/// <param name='configuration'>
/// Configuration for which to do the check
/// </param>
+ [Obsolete ("This method will be removed in future releases")]
public bool NeedsBuilding (ConfigurationSelector configuration)
{
+ return true;
+ }
+
+ internal bool InternalCheckNeedsBuild (ConfigurationSelector configuration)
+ {
using (Counters.NeedsBuildingTimer.BeginTiming ("NeedsBuilding check for " + Name)) {
- if (ParentSolution != null && this is SolutionEntityItem) {
- SolutionConfiguration sconf = ParentSolution.GetConfiguration (configuration);
- if (sconf != null && !sconf.BuildEnabledForItem ((SolutionEntityItem) this))
- return false;
- }
return Services.ProjectService.GetExtensionChain (this).GetNeedsBuilding (this, configuration);
}
}
-
+
/// <summary>
/// States whether this solution item needs to be built or not
/// </summary>
@@ -711,9 +708,10 @@ namespace MonoDevelop.Projects
/// <param name='configuration'>
/// Configuration for which to set the flag
/// </param>
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool value, ConfigurationSelector configuration)
{
- Services.ProjectService.GetExtensionChain (this).SetNeedsBuilding (this, value, configuration);
+ // Nothing to be done.
}
/// <summary>
@@ -1015,7 +1013,10 @@ namespace MonoDevelop.Projects
/// <param name='configuration'>
/// Configuration for which to do the check
/// </param>
- internal protected abstract bool OnGetNeedsBuilding (ConfigurationSelector configuration);
+ internal protected virtual bool OnGetNeedsBuilding (ConfigurationSelector configuration)
+ {
+ return true;
+ }
/// <summary>
/// States whether this solution item needs to be built or not
@@ -1026,7 +1027,9 @@ namespace MonoDevelop.Projects
/// <param name='configuration'>
/// Configuration for which to set the flag
/// </param>
- internal protected abstract void OnSetNeedsBuilding (bool val, ConfigurationSelector configuration);
+ internal protected virtual void OnSetNeedsBuilding (bool val, ConfigurationSelector configuration)
+ {
+ }
/// <summary>
/// Gets the time of the last build
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
index 12ca617..02b51a6 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
@@ -166,21 +166,6 @@ namespace MonoDevelop.Projects
throw new NotImplementedException ();
}
- protected internal override bool OnGetNeedsBuilding (ConfigurationSelector configuration)
- {
- foreach (WorkspaceItem it in Items) {
- if (it.NeedsBuilding (configuration))
- return true;
- }
- return false;
- }
-
- protected internal override void OnSetNeedsBuilding (bool val, ConfigurationSelector configuration)
- {
- foreach (WorkspaceItem it in Items)
- it.SetNeedsBuilding (val, configuration);
- }
-
public WorkspaceItem ReloadItem (IProgressMonitor monitor, WorkspaceItem item)
{
if (Items.IndexOf (item) == -1)
diff --git a/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs b/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
index 544cfec..846112d 100644
--- a/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
+++ b/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
@@ -294,30 +294,31 @@ namespace MonoDevelop.Projects
return Services.ProjectService.GetExtensionChain (this).GetExecutionTargets (this, configuration);
}
+ [Obsolete ("This method will be removed in future releases")]
public bool NeedsBuilding (string configuration)
{
- return NeedsBuilding ((SolutionConfigurationSelector) configuration);
+ return true;
}
+ [Obsolete ("This method will be removed in future releases")]
public bool NeedsBuilding (ConfigurationSelector configuration)
{
- return Services.ProjectService.GetExtensionChain (this).GetNeedsBuilding (this, configuration);
+ return true;
}
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool value)
{
- foreach (string conf in GetConfigurations ())
- SetNeedsBuilding (value, new SolutionConfigurationSelector (conf));
}
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool needsBuilding, string configuration)
{
- SetNeedsBuilding (needsBuilding, (SolutionConfigurationSelector) configuration);
}
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool needsBuilding, ConfigurationSelector configuration)
{
- Services.ProjectService.GetExtensionChain (this).SetNeedsBuilding (this, needsBuilding, configuration);
}
public virtual FileFormat FileFormat {
@@ -427,7 +428,7 @@ namespace MonoDevelop.Projects
internal protected virtual bool OnGetNeedsBuilding (ConfigurationSelector configuration)
{
- return false;
+ return true;
}
internal protected virtual void OnSetNeedsBuilding (bool val, ConfigurationSelector configuration)
diff --git a/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml b/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
index cc35766..32e286e 100644
--- a/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
+++ b/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
@@ -1,4 +1,4 @@
-<TargetFramework id=".NETFramework,Version=v4.0,Profile=Client" _name="Mono / .NET 4.0" clrVersion="Net_4_0">
+<TargetFramework id=".NETFramework,Version=v4.0,Profile=Client" _name=".NET 4.0 Client Profile" clrVersion="Net_4_0">
<Assemblies>
<Assembly name="System" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
<Assembly name="System.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
diff --git a/src/core/MonoDevelop.Core/md1format.xml b/src/core/MonoDevelop.Core/md1format.xml
index f786629..f92a445 100644
--- a/src/core/MonoDevelop.Core/md1format.xml
+++ b/src/core/MonoDevelop.Core/md1format.xml
@@ -82,7 +82,7 @@
<ItemProperty member="generator" name="generator" defaultValue=""/>
</DataItem>
<DataItem class = "MonoDevelop.Projects.ProjectReference" fallbackType="MonoDevelop.Projects.UnknownProjectReference" customDataItem="MonoDevelop.Projects.Formats.MD1.MD1CustomDataItem">
- <ItemProperty member="referenceType" name="type" />
+ <ItemProperty member="internalReferenceType" name="type" />
<ItemProperty member="localCopy" name="localcopy" />
<ItemProperty member="SpecificVersion" name="specificVersion" defaultValue="True"/>
</DataItem>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.MonoDevelop.Core.addin.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.MonoDevelop.Core.addin.xml
new file mode 100644
index 0000000..0620a7c
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.MonoDevelop.Core.addin.xml
@@ -0,0 +1,349 @@
+<Addin id = "Core"
+ namespace = "MonoDevelop"
+ name = "MonoDevelop Runtime"
+ copyright = "MIT/X11"
+ url = "http://www.monodevelop.com"
+ description = "Provides the core services of the MonoDevelop platform"
+ category = "MonoDevelop Core"
+ isroot = "true"
+ version = "4.0.12"
+ compatVersion = "4.0">
+
+ <ConditionType id="PackageInstalled" type="MonoDevelop.Core.AddIns.PackageInstalledCondition" />
+ <ConditionType id="PackageNotInstalled" type="MonoDevelop.Core.AddIns.PackageNotInstalledCondition" />
+ <ConditionType id="Platform" type="MonoDevelop.Core.AddIns.PlatformCondition" />
+ <ConditionType id="AssemblyInstalled" type="MonoDevelop.Core.AddIns.AssemblyInstalledCondition" />
+
+
+ <!-- Extension points -->
+
+
+ <ExtensionPoint path = "/MonoDevelop/Core/ExecutionModes" name = "Execution modes">
+ <Description>Execution modes such as default, debug, profiler, etc.</Description>
+ <ExtensionNode name="Mode" type="MonoDevelop.Core.AddIns.ExecutionModeNode" />
+ <ExtensionNode name="ModeSet" type="MonoDevelop.Core.AddIns.ExecutionModeSetNode" />
+ <ExtensionNode name="ModeSetType" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/ExecutionHandlers" name = "Execution handlers">
+ <Description>Execution handlers for the default execution mode. Specified types must implement IExecutionHandler.</Description>
+ <ExtensionNode name="ExecutionHandler"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/CommandFactories" name = "Command factories">
+ <Description>Command factories used to create commands from file paths. Specified types must implement ICommandFactory.</Description>
+ <ExtensionNode objectType = "MonoDevelop.Core.Execution.ICommandFactory" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/FileSystemExtensions" name = "File system extensions">
+ <Description>File system extensions which can provide specific behavior when handling files. Specified classes must implement MonoDevelop.Core.FileSystem.FileSystemExtension.</Description>
+ <ExtensionNode name="Class" objectType="MonoDevelop.Core.FileSystem.FileSystemExtension"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/Applications" name = "Applications">
+ <Description>MonoDevelop tools.</Description>
+ <ExtensionNode name="Application" type="MonoDevelop.Core.AddIns.ApplicationExtensionNode" customAttributeType="MonoDevelop.Core.ApplicationExtensionAttribute"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/SupportPackages">
+ <ExtensionNode name="Package" type="MonoDevelop.Core.AddIns.PackageExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/Runtimes">
+ <Description>Runtime factories.</Description>
+ <ExtensionNode name="Class" objectType="MonoDevelop.Core.AddIns.ITargetRuntimeFactory"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/SystemInformation" name = "Adddional system information">
+ <ExtensionNode name = "Class" objectType = "MonoDevelop.Core.ISystemInformationProvider" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/PasswordProvider" name = "API for saving/retrieving passwords">
+ <ExtensionNode name = "Class" objectType = "MonoDevelop.Core.IPasswordProvider" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/WebCertificateProvider" name = "API for determining if an SSL Certificate should be trusted">
+ <ExtensionNode name = "Class" objectType = "MonoDevelop.Core.IWebCertificateProvider" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/Frameworks">
+ <Description>Target frameworks.</Description>
+ <ExtensionNode name="Framework" type="MonoDevelop.Core.AddIns.TargetFrameworkNode" objectType="MonoDevelop.Core.Assemblies.TargetFramework">
+ <Description>Definition of a framework. The list of assemblies of the framework is defined in the referenced resource file.</Description>
+ <ExtensionNode name="Backend" objectType="MonoDevelop.Core.Assemblies.TargetFrameworkBackend">
+ <Description>A framework backend. Provides support for a framework for a runtime.</Description>
+ </ExtensionNode>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/UserDataMigration">
+ <Description>Defines data to be migrated from the previous version of MonoDevelop.</Description>
+ <ExtensionNode name="Migration" type="MonoDevelop.Core.AddIns.UserDataMigrationNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/ProjectBindings" name = "Project bindings">
+ <Description>Project bindings</Description>
+ <ExtensionNode name="ProjectBinding" type="MonoDevelop.Projects.Extensions.ProjectBindingCodon">
+ <Description>A project binding. The specified class must implement MonoDevelop.Projects.IProjectBinding.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/FileFormats" name = "Solution file format handlers">
+ <Description>File format handlers for workspaces, solutions and projects</Description>
+ <ExtensionNode name="FileFormat" type="MonoDevelop.Projects.Extensions.FileFormatNode">
+ <Description>A file format handler. The specified class must implement MonoDevelop.Projects.IFileFormat.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/SerializableClasses" name = "Serializable classes">
+ <Description>Classes to be registered for serialization.</Description>
+ <ExtensionNode name="DataType" type="MonoDevelop.Projects.Extensions.DataTypeCodon" customAttributeType="MonoDevelop.Projects.ProjectModelDataItemAttribute">
+ <Description>A type name.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/ExtendedProperties" name = "Serializable classes">
+ <Description>Custom properties for projects and other types.</Description>
+ <ExtensionNode name="ItemProperty" type="MonoDevelop.Projects.Extensions.ItemPropertyCodon">
+ <Description>A custom property. The type specified in the 'class' property is the type to which the property has to be added. Only types which implement IExtendedDataItem can be extended in this way.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions" name = "Project service extensions">
+ <Description>Project service extensions. Specified classes must be a subclass of ProjectServiceExtension</Description>
+ <ConditionType id="ItemType" type="MonoDevelop.Core.Gui.Dialogs.OptionPanels.ItemTypeCondition">
+ <Description>Type of the item. If no namespace is provided, MonoDevelop.Projects is assumed.</Description>
+ </ConditionType>
+ <ConditionType id="ActiveLanguage" type="MonoDevelop.Projects.Extensions.ItemTypeCondition">
+ <Description>Language of the project. It will evaluate to false if the project is not a .NET project.</Description>
+ </ConditionType>
+ <ExtensionNode name="Class">
+ <Description>A subclass of ProjectServiceExtension.</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/LanguageBindings" name = "Language bindings">
+ <Description>Language bindings.</Description>
+ <ExtensionNode name="LanguageBinding" type="MonoDevelop.Projects.Extensions.LanguageBindingCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MSBuildItemTypes" name = "MSBuild item types">
+ <Description>Item types supported by MSBuild</Description>
+ <ExtensionNode name="SolutionItem" type="MonoDevelop.Projects.Extensions.SolutionItemNode"/>
+ <ExtensionNode name="DotNetProject" type="MonoDevelop.Projects.Extensions.DotNetProjectNode"/>
+ <ExtensionNode name="DotNetProjectSubtype" type="MonoDevelop.Projects.Extensions.DotNetProjectSubtypeNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <Description>Serialization maps for the MonoDevelop 1.0 file format</Description>
+ <ExtensionNode name="SerializationMap" type="MonoDevelop.Projects.Extensions.SerializationMapNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/PolicyTypes" name = "Policy types">
+ <Description>Types for per-project policies language binding. These types must be serializable.</Description>
+ <ExtensionNode name="PolicyType" customAttributeType="MonoDevelop.Projects.Policies.PolicyTypeAttribute" objectType="System.Object"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/PolicySets" name = "Named policy sets">
+ <ExtensionNode name="PolicySet" type="MonoDevelop.Projects.Extensions.PolicySetNode" >
+ <ExtensionNode name="Policies" type="MonoDevelop.Projects.Extensions.PolicyResourceNode" />
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MSBuildImportProviders" name = "MSBuild Import Providers">
+ <ExtensionNode objectType="MonoDevelop.Projects.Formats.MSBuild.IMSBuildImportProvider"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MonoDocSources" name = "MonoDoc Sources">
+ <ExtensionNode name="Source" type="MonoDevelop.Projects.Extensions.MonoDocSourceNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/DocumentationGenerator">
+ <ExtensionNode name="Class"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/UnknownMSBuildProjectTypes" name = "Unknown MSBuild project types">
+ <Description>Project types not supported by MonoDevelop</Description>
+ <ExtensionNode name="ProjectType" type="MonoDevelop.Projects.Extensions.UnknownProjectTypeNode"/>
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+
+ <Extension path = "/MonoDevelop/Core/ExecutionModes">
+<!-- <Mode id="Default" _name="Default" class="MonoDevelop.Core.Execution.DefaultExecutionHandlerFactory"/>-->
+ <ModeSetType class="MonoDevelop.Core.Assemblies.CustomRuntimeExecutionModeSet"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/Runtimes">
+ <Class class="MonoDevelop.Core.Assemblies.MsNetTargetRuntimeFactory"/>
+ <Class class="MonoDevelop.Core.Assemblies.MonoTargetRuntimeFactory"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/Frameworks">
+ <Framework id="Net_1.1" resource="framework_NET_1_1.xml"/>
+ <Framework id="Net_2.0" resource="framework_NET_2_0.xml"/>
+ <Framework id="Net_3.0" resource="framework_NET_3_0.xml"/>
+ <Framework id="Net_3.5" resource="framework_NET_3_5.xml"/>
+ <Framework id="Net_3.5_client" resource="framework_NET_3_5_client.xml"/>
+ <Framework id="Net_4.0" resource="framework_NET_4_0.xml"/>
+ <Framework id="Net_4.0_client" resource="framework_NET_4_0_client.xml"/>
+ <Framework id="Net_4.5" resource="framework_NET_4_5.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/ExecutionHandlers">
+ <ExecutionHandler id="Mono"
+ class = "MonoDevelop.Core.Execution.DotNetExecutionHandler"/>
+ <ExecutionHandler id="Native"
+ class = "MonoDevelop.Core.Execution.NativePlatformExecutionHandler"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/CommandFactories">
+ <Type id="DotNet" class = "MonoDevelop.Core.Execution.DotNetCommandFactory"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="Config" path="mono-runtimes.xml" />
+ <Migration sourceVersion="2.4" kind="UserData" path="DefaultPolicies.xml" targetPath="Policies/Default.mdpolicy.xml" />
+ <!-- the following file belongs to the instrumentation viewer but it's not an addin so can't register for migrations -->
+ <Migration sourceVersion="2.4" kind="Config" path="monitor-views.xml" />
+ <!-- 2.6 -->
+ <Migration sourceVersion="2.6+" kind="Config" targetKind="LocalConfig" path="mono-runtimes.xml" />
+ <Migration sourceVersion="2.6+" kind="UserData" path="Policies" isDirectory="true" />
+ <Migration sourceVersion="2.6+" kind="Config" path="monitor-views.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/Applications">
+ <Application id = "build" class = "MonoDevelop.Projects.BuildTool" description = "Project build tool"/>
+ <Application id = "dbgen" class = "MonoDevelop.Projects.Parser.DatabaseGeneratorTool" description = "Parser database generation tool"/>
+ <Application id = "project-export" class = "MonoDevelop.Projects.ProjectConvertTool" description = "Project conversion tool"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectBindings">
+ <ProjectBinding id = "DotNet" class = "MonoDevelop.Projects.DotNetProjectBinding" />
+ <ProjectBinding id = "GenericProject" class = "MonoDevelop.Projects.GenericProjectBinding" />
+ <ProjectBinding id = "PortableDotNet" class = "MonoDevelop.Projects.PortableDotNetProjectBinding" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/FileFormats">
+ <FileFormat id = "MSBuild08"
+ class = "MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormatVS08"
+ name = "MSBuild (Visual Studio 2008)"
+ canDefault = "true" />
+ <FileFormat id = "MSBuild05"
+ class = "MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormatVS05"
+ name = "MSBuild (Visual Studio 2005)"
+ canDefault = "true" />
+ <FileFormat id = "MSBuild10"
+ class = "MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormatVS10"
+ name = "MSBuild (Visual Studio 2010)"
+ canDefault = "true" />
+ <FileFormat id = "MSBuild12"
+ class = "MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormatVS12"
+ name = "MSBuild (Visual Studio 2012)"
+ canDefault = "true" />
+ <FileFormat id = "MD1"
+ class = "MonoDevelop.Projects.Formats.MD1.MD1FileFormat"
+ name = "MonoDevelop 1.0 (deprecated)" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ExtendedProperties">
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/ProjectServiceExtensions">
+ <Class id="InitialStep" class = "MonoDevelop.Projects.ProjectServiceExtension" />
+ <Class class = "MonoDevelop.Projects.CompiledAssemblyExtension" />
+ <Class id="MidStep" class = "MonoDevelop.Projects.ProjectServiceExtension" />
+ <Class id="FinalStep" class = "MonoDevelop.Projects.ProjectServiceExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/FileSystemExtensions">
+ <Class id="InitialStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ <Class id="MidStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ <Class id="FinalStep" class = "MonoDevelop.Core.FileSystem.DummyFileSystemExtension" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MD1SerializationMaps">
+ <SerializationMap resource="md1format.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="Mono" _name="Mono" allowDiffSerialize="true">
+ <!-- <Policies resource="" /> -->
+ </PolicySet>
+ <PolicySet id="VisualStudio" _name="Microsoft Visual Studio" allowDiffSerialize="true">
+ <!-- <Policies resource="" /> -->
+ </PolicySet>
+ <PolicySet id="Invariant" _name="Invariant" visible="false"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
+ <SolutionItem guid = "{8BC9CEB9-8B4A-11D0-8D11-00A0C91BC942}"
+ type = "MonoDevelop.Projects.CompiledAssemblyProject"
+ handlerType = "MonoDevelop.Projects.Formats.MSBuild.CompiledAssemblyProjectMSBuildHandler" />
+ </Extension>
+
+ <!--
+ Some info from:
+ http://www.mztools.com/articles/2008/mz2008017.aspx
+ http://msdn.microsoft.com/en-us/library/hb23x61k(v=vs.80).aspx
+ http://workblog.pilin.name/2012/11/visual-studio-project-type-guids.html
+ Names edited in some cases to be a little more generic.
+ -->
+ <Extension path = "/MonoDevelop/ProjectModel/UnknownMSBuildProjectTypes">
+ <ProjectType guid = "{1C533B1C-72DD-4CB1-9F6B-BF11D93BCFBE}" name = "MonoMac" platforms="mac" addin = "MonoMac" />
+ <ProjectType guid = "{948B3504-5B70-4649-8FE4-BDE1FB46EC69}" name = "MonoMac" platforms="mac" addin = "MonoMac" />
+ <ProjectType guid = "{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23}" name = "Xamarin.Mac" platforms="mac" product = "Xamarin.Mac" />
+ <Condition id="Platform" value="!windows">
+ <ProjectType guid = "{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ <ProjectType guid = "{6BC8ED88-2882-458C-8E55-DFD12B67127B}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ <ProjectType guid = "{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}" name = "Xamarin.iOS" platforms="mac" product = "Xamarin.iOS" />
+ </Condition>
+ <Condition id="Platform" value="windows">
+ <ProjectType guid = "{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ <ProjectType guid = "{6BC8ED88-2882-458C-8E55-DFD12B67127B}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ <ProjectType guid = "{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F}" name = "Xamarin.iOS" _instructions = "Xamarin.iOS projects are not supported in MonoDevelop on Windows. You need to use Visual Studio, or Xamarin Studio on Mac." />
+ </Condition>
+ <ProjectType guid = "{EFBA0AD7-5A72-4C68-AF49-83D382785DCF}" name = "Xamarin.Android" platforms="win;mac" product = "Xamarin.Android" />
+ <ProjectType guid = "{10368E6C-D01B-4462-8E8B-01FC667A7035}" name = "Xamarin.Android" platforms="win;mac" product = "Xamarin.Android" />
+ <ProjectType guid = "{F85E285D-A4E0-4152-9332-AB1D724D3325}" name = "ASP.NET MVC 2" addin = "ASP.NET MVC" />
+ <ProjectType guid = "{E53F8FEA-EAE0-44A6-8774-FFD645390401}" name = "ASP.NET MVC 3" addin = "ASP.NET MVC" />
+ <ProjectType guid = "{E3E379DF-F4C6-4180-9B81-6769533ABE47}" name = "ASP.NET MVC 4" addin = "ASP.NET MVC" />
+ <ProjectType guid = "{349C5851-65DF-11DA-9384-00065B846F21}" name = "ASP.NET Web Application" addin = "ASP.NET" />
+ <ProjectType guid = "{9B831FEF-F496-498F-9FE8-180DA5CB4258}" name = "MonoGame" addin = "MonoGame" />
+ <ProjectType guid = "{4925A630-B079-445d-BCD4-3A9C94FE9307}" name = "F#" addin = "F#" />
+ <ProjectType guid = "{C089C8C0-30E0-4E22-80C0-CE093F111A43}" name = "Windows Phone" />
+ <ProjectType guid = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}" name = "ASP.NET Web Site" />
+ <ProjectType guid = "{F135691A-BF7E-435D-8960-F99683D2D49C}" name = "MS Distributed System" />
+ <ProjectType guid = "{3D9AD99F-2412-4246-B90B-4EAA41C64699}" name = "Windows Communication Foundation (WCF)" />
+ <ProjectType guid = "{60DC8134-EBA5-43B8-BCC9-BB4BC16C2548}" name = "Windows Presentation Foundation (WPF)" />
+ <ProjectType guid = "{C252FEB5-A946-4202-B1D4-9916A0590387}" name = "MS Database" />
+ <ProjectType guid = "{A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124}" name = "MS Database" />
+ <ProjectType guid = "{4F174C21-8C12-11D0-8340-0000F80270F8}" name = "MS Database" />
+ <ProjectType guid = "{3AC096D0-A1C2-E12C-1390-A8335801FDAB}" name = "MS Test" />
+ <ProjectType guid = "{20D4826A-C6FA-45DB-90F4-C717570B9F32}" name = "Windows CE Smart Device" />
+ <ProjectType guid = "{CB4CE8C6-1BDB-4DC7-A4D3-65A1999772F8}" name = "Windows CE Smart Device" />
+ <ProjectType guid = "{4D628B5B-2FBC-4AA6-8C16-197242AEB884}" name = "Windows CE Smart Device" />
+ <ProjectType guid = "{68B1623D-7FB9-47D8-8664-7ECEA3297D4F}" name = "Windows CE Smart Device" />
+ <ProjectType guid = "{32F31D43-81CC-4C15-9DE6-3FC5453562B6}" name = "Workflow Foundation" />
+ <ProjectType guid = "{06A35CCD-C46D-44D5-987B-CF40FF872267}" name = "MS Deployment" />
+ <ProjectType guid = "{3EA9E505-35AC-4774-B492-AD1749C4943A}" name = "MS Deployment" />
+ <ProjectType guid = "{978C614F-708E-4E1A-B201-565925725DBA}" name = "MS Deployment" />
+ <ProjectType guid = "{AB322303-2255-48EF-A496-5904EB18DA55}" name = "MS Deployment" />
+ <ProjectType guid = "{A860303F-1F3F-4691-B57E-529FC101A107}" name = "Visual Studio Tools for Applications" />
+ <ProjectType guid = "{BAA0C2D2-18E2-41B9-852F-F413020CAA33}" name = "Visual Studio Tools for Office" />
+ <ProjectType guid = "{14822709-B5A1-4724-98CA-57A101D1B079}" name = "SharePoint Workflow" />
+ <ProjectType guid = "{D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8}" name = "SharePoint Workflow" />
+ <ProjectType guid = "{F8810EC1-6754-47FC-A15F-DFABD2E3FA90}" name = "SharePoint Workflow" />
+ <ProjectType guid = "{EC05E597-79D4-47f3-ADA0-324C4F7C7484}" name = "SharePoint" />
+ <ProjectType guid = "{593B0543-81F6-4436-BA1E-4747859CAAE2}" name = "SharePoint" />
+ <ProjectType guid = "{6D335F3A-9D43-41b4-9D22-F6F17C4BE596}" name = "XNA (Windows)" />
+ <ProjectType guid = "{2DF5C3F4-5A5F-47a9-8E94-23B4456F55E2}" name = "XNA (XBox)" />
+ <ProjectType guid = "{D399B71A-8929-442a-A9AC-8BEC78BB2433}" name = "XNA (Zune)" />
+ <ProjectType guid = "{A1591282-1198-4647-A2B1-27E5FF5F6F3B}" name = "Silverlight" />
+ <ProjectType guid = "{BC8A1FFA-BEE3-4634-8014-F334798102B3}" name = "Windows Store App" />
+ <ProjectType guid = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" name = "Visual C++" />
+ <ProjectType guid = "{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}" name = "Visual J#" />
+ </Extension>
+</Addin>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..adc8e89
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,15 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.MonoDevelop.Core.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_1_1.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_2_0.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_0.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.md1format.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_5.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5_client.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0_client.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Core.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Core.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Core.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.dll.mdb
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_1_1.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_1_1.xml
new file mode 100644
index 0000000..afa6744
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_1_1.xml
@@ -0,0 +1,60 @@
+<TargetFramework id=".NETFramework,Version=v1.1" _name="Mono / .NET 1.1" clrVersion="Net_1_1">
+<Assemblies>
+ <Assembly name="System" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="mscorlib" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="ICSharpCode.SharpZipLib" version="0.84.0.0" publicKeyToken="1b03e6acf1164f73" />
+ <Assembly name="Accessibility" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="cscompmgd" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" />
+ <Assembly name="Microsoft.VisualBasic" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Vsa" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Vsa" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Vsa.Vb.CodeDOMProcessor" version="7.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Mono.Data" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Sqlite" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.SqliteClient" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.SybaseClient" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Tds" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.TdsClient" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.GetOptions" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Posix" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebBrowser" version="0.5.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.CompilerServices.SymbolWriter" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Cairo" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Http" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Mozilla" />
+ <Assembly name="Mono.Security.Win32" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebServer" version="0.1.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Novell.Directory.Ldap" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Npgsql" version="1.0.5000.0" publicKeyToken="5d8b90d52f46fda7" />
+ <Assembly name="System.Configuration.Install" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.OracleClient" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Design" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" />
+ <Assembly name="System.Drawing.Design" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Mobile" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.RegularExpressions" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="1.0.5000.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Commons.Xml.Relaxng" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging.RabbitMQ" version="1.0.5000.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="RabbitMQ.Client" version="1.0.5000.0" publicKeyToken="b03f5f7f11d50a3a" />
+</Assemblies>
+</TargetFramework>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_2_0.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_2_0.xml
new file mode 100644
index 0000000..8cc32a0
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_2_0.xml
@@ -0,0 +1,78 @@
+<TargetFramework id=".NETFramework,Version=v2.0" _name="Mono / .NET 2.0" clrVersion="Net_2_0">
+<Assemblies>
+ <Assembly name="System.Configuration" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data.SqlXml" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Deployment" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Transactions" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build.Engine" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Framework" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Tasks" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Utilities" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="mscorlib" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="ICSharpCode.SharpZipLib" version="2.84.0.0" publicKeyToken="1b03e6acf1164f73" />
+ <Assembly name="Accessibility" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="cscompmgd" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Vsa" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Vsa" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Vsa.Vb.CodeDOMProcessor" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Mono.Data" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Sqlite" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.SqliteClient" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.SybaseClient" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Tds" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.TdsClient" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Debugger.Soft" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.GetOptions" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Posix" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebBrowser" version="0.5.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.CompilerServices.SymbolWriter" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Cairo" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Http" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Mozilla" />
+ <Assembly name="Mono.Security.Win32" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebServer" />
+ <Assembly name="Novell.Directory.Ldap" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Npgsql" version="2.0.0.0" publicKeyToken="5d8b90d52f46fda7" />
+ <Assembly name="System.Configuration.Install" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.OracleClient" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Design" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing.Design" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Mobile" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.RegularExpressions" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Commons.Xml.Relaxng" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.C5" version="1.1.0.0" publicKeyToken="ba07f434b1c35cbd" />
+ <Assembly name="Mono.CSharp" version="2.1.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Management" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging.RabbitMQ" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Simd" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Tasklets" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Web" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="RabbitMQ.Client" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+</Assemblies>
+</TargetFramework>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_0.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_0.xml
new file mode 100644
index 0000000..096054f
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_0.xml
@@ -0,0 +1,29 @@
+<TargetFramework id=".NETFramework,Version=v3.0" _name="Mono / .NET 3.0" clrVersion="Net_2_0" IncludesFramework="v2.0">
+<Assemblies>
+ <Assembly name="System.Workflow.Runtime" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationBuildTasks" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationCore" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationUI" package="olive" />
+ <Assembly name="PresentationFramework.Aero" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationFramework.Classic" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationFramework" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationFramework.Luna" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="PresentationFramework.Royale" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="ReachFramework" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="System.IdentityModel" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IdentityModel.Selectors" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Log" version="3.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Printing" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Runtime.Serialization" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Speech" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Workflow.Activities" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="System.Workflow.ComponentModel" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="UIAutomationClient" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClientsideProviders" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationProvider" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationTypes" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+ <Assembly name="WindowsFormsIntegration" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" package="olive" />
+</Assemblies>
+</TargetFramework>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5.xml
new file mode 100644
index 0000000..dceb5c2
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5.xml
@@ -0,0 +1,34 @@
+<TargetFramework id=".NETFramework,Version=v3.5" _name="Mono / .NET 3.5" clrVersion="Net_2_0" IncludesFramework="v3.0">
+<Assemblies>
+ <Assembly name="System.Core" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.AddIn.Contract" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.AddIn" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.DataAnnotations" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Data.DataSetExtensions" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity.Design" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Linq" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Client" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Design" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices.AccountManagement" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Management.Instrumentation" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceModel.Web" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Abstractions" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData.Design" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Entity.Design" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Entity" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Extensions.Design" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Extensions" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Routing" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Presentation" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.WorkflowServices" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xml.Linq" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build.Engine" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Framework" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Tasks.v3.5" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Utilities.v3.5" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+</Assemblies>
+</TargetFramework>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5_client.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5_client.xml
new file mode 100644
index 0000000..8527b25
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_3_5_client.xml
@@ -0,0 +1,58 @@
+<TargetFramework id=".NETFramework,Version=v3.5,Profile=Client" _name=".NET 3.5 Client Profile" clrVersion="Net_2_0">
+<Assemblies>
+ <Assembly name="System.Configuration" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data.SqlXml" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Deployment" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Transactions" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="mscorlib" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Accessibility" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Vsa" version="8.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Configuration.Install" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="2.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="CustomMarshalers" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="ISymWrapper" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="PresentationCore" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Aero" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Classic" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Luna" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Royale" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="ReachFramework" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.IdentityModel" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Printing" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Runtime.Serialization" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel" version="3.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="UIAutomationClient" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClientsideProviders" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationProvider" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationTypes" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsFormsIntegration" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Core" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.AddIn.Contract" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.AddIn" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.DataSetExtensions" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Linq" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Client" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net" version="3.5.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceModel.Web" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Presentation" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml.Linq" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+</Assemblies>
+</TargetFramework>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0.xml
new file mode 100644
index 0000000..9ab95c2
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0.xml
@@ -0,0 +1,155 @@
+<TargetFramework id=".NETFramework,Version=v4.0" _name="Mono / .NET 4.0" clrVersion="Net_4_0">
+<Assemblies>
+ <Assembly name="System" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Dynamic" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceModel.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Channels" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Discovery" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Routing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DataVisualization" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DataVisualization.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Forms.DataVisualization" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Forms.DataVisualization.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xaml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Core" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.AddIn" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.Composition" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.DataAnnotations" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Client" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices.AccountManagement" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Management.Instrumentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Numerics" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel.Web" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Abstractions" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.ApplicationServices" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Entity.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Entity" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Extensions.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Extensions" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Routing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Presentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.WorkflowServices" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Workflow.Runtime" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationBuildTasks" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationCore" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Aero" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Classic" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Luna" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Royale" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="ReachFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.IdentityModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IdentityModel.Selectors" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Log" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Printing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Runtime.Serialization" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Caching" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Workflow.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Workflow.ComponentModel" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClient" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClientsideProviders" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationProvider" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationTypes" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsBase" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsFormsIntegration" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Configuration" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data.SqlXml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Deployment" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Transactions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build.Engine" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Framework" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Tasks.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Utilities.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="mscorlib" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Accessibility" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.CSharp" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Configuration.Install" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.OracleClient" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Design" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing.Design" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Mobile" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.RegularExpressions" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="CustomMarshalers" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="ISymWrapper" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Conversion.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC.STLCLR" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="sysglobl" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Activities.Core.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.AddIn.Contract" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Device" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel.Activation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Speech" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Input.Manipulations" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="XamlBuildTask" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+
+ <!-- the following assemblies are not in the MS framework definition, but are added by Mono -->
+ <Assembly name="Commons.Xml.Relaxng" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="ICSharpCode.SharpZipLib" version="4.84.0.0" publicKeyToken="1b03e6acf1164f73" />
+ <Assembly name="Mono.Data.Sqlite" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Tds" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Debugger.Soft" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Posix" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebBrowser" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.CompilerServices.SymbolWriter" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Cairo" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Http" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security.Win32" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Novell.Directory.Ldap" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Npgsql" version="4.0.0.0" publicKeyToken="5d8b90d52f46fda7" />
+ <Assembly name="Mono.C5" version="1.1.0.0" publicKeyToken="ba07f434b1c35cbd" />
+ <Assembly name="Mono.CSharp" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Management" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging.RabbitMQ" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Simd" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Tasklets" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Web" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="RabbitMQ.Client" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+
+ <!-- the following assemblies were added by Mono, but don't seem to exist any more -->
+ <Assembly name="Mono.WebServer" />
+ <Assembly name="Mono.Mozilla" />
+ <Assembly name="Mono.Data.SybaseClient" />
+ <Assembly name="Mono.GetOptions" />
+ <Assembly name="Mono.Data.TdsClient" />
+ <Assembly name="Mono.Data.SqliteClient" />
+ <Assembly name="Mono.Data" />
+</Assemblies>
+</TargetFramework>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0_client.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0_client.xml
new file mode 100644
index 0000000..32e286e
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_0_client.xml
@@ -0,0 +1,84 @@
+<TargetFramework id=".NETFramework,Version=v4.0,Profile=Client" _name=".NET 4.0 Client Profile" clrVersion="Net_4_0">
+<Assemblies>
+ <Assembly name="System" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Dynamic" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceModel.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Channels" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Discovery" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Routing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Forms.DataVisualization" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xaml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Core" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.AddIn" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.Composition" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.DataAnnotations" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Client" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices.AccountManagement" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Management.Instrumentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Numerics" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.ApplicationServices" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Presentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="PresentationCore" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Aero" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Classic" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Luna" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Royale" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="ReachFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.IdentityModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IdentityModel.Selectors" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Log" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Printing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Runtime.Serialization" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="UIAutomationClient" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClientsideProviders" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationProvider" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationTypes" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsBase" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsFormsIntegration" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Configuration" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data.SqlXml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Deployment" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Transactions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="mscorlib" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Accessibility" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.CSharp" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Configuration.Install" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="CustomMarshalers" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="sysglobl" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Activities.Core.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.AddIn.Contract" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Device" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Speech" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Input.Manipulations" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+</Assemblies>
+</TargetFramework>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_5.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_5.xml
new file mode 100644
index 0000000..6d059ba
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.frameworks.framework_NET_4_5.xml
@@ -0,0 +1,171 @@
+<TargetFramework id=".NETFramework,Version=v4.5" _name="Mono / .NET 4.5" clrVersion="Net_4_5">
+<Assemblies>
+ <Assembly name="System" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Dynamic" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceModel.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Channels" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Discovery" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel.Routing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DataVisualization" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DataVisualization.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Forms.DataVisualization" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Forms.DataVisualization.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xaml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Core" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.AddIn.Contract" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.AddIn" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.Composition" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ComponentModel.DataAnnotations" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Entity" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Client" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.Services" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.DirectoryServices.AccountManagement" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Management.Instrumentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Numerics" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel.Web" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Abstractions" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.ApplicationServices" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.DynamicData" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Entity.Design" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Entity" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Web.Extensions.Design" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Extensions" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Web.Routing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Presentation" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.WorkflowServices" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Workflow.Runtime" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationBuildTasks" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationCore" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Aero" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Classic" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Luna" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.Royale" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="ReachFramework" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.IdentityModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IdentityModel.Selectors" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Log" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Printing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Runtime.Serialization" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Caching" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ServiceModel" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Speech" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Workflow.Activities" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Workflow.ComponentModel" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClient" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationClientsideProviders" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationProvider" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="UIAutomationTypes" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsBase" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="WindowsFormsIntegration" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Configuration" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data.SqlXml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Deployment" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices.Protocols" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Transactions" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Microsoft.Build.Engine" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Framework" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Tasks.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Build.Utilities.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="mscorlib" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="Accessibility" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.CSharp" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.JScript" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility.Data" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic.Compatibility" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualBasic" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC" version="10.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Configuration.Install" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Data" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Data.OracleClient" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Design" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.DirectoryServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing.Design" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Drawing" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.EnterpriseServices" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Management" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Messaging" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Runtime.Remoting" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Runtime.Serialization.Formatters.Soap" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Security" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.ServiceProcess" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Mobile" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.RegularExpressions" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Web.Services" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="CustomMarshalers" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="ISymWrapper" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.Activities.Build" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="Microsoft.Build.Conversion.v4.0" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="Microsoft.VisualC.STLCLR" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="PresentationFramework.Aero2" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="PresentationFramework.AeroLite" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="sysglobl" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Activities.Core.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.DurableInstancing" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.Presentation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Activities.Statements" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.ComponentModel.Composition.Registration" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Device" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IdentityModel.Services" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Compression" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.IO.Compression.FileSystem" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Net.Http" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Net.Http.WebRequest" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Reflection.Context" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.ServiceModel.Activation" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="System.Windows.Controls.Ribbon" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+ <Assembly name="System.Windows.Input.Manipulations" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="System.Xml.Serialization" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="XamlBuildTask" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
+
+ <!-- NOTE: we ignore the PCL facade assemblies, the IDE doesn't need to care about them -->
+
+ <!-- the following assemblies are not in the MS framework definition, but are added by Mono -->
+ <Assembly name="Commons.Xml.Relaxng" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="ICSharpCode.SharpZipLib" version="4.84.0.0" publicKeyToken="1b03e6acf1164f73" />
+ <Assembly name="Mono.Data.Sqlite" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Data.Tds" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Debugger.Soft" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Posix" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.WebBrowser" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.CompilerServices.SymbolWriter" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Cairo" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Http" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Security.Win32" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Novell.Directory.Ldap" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Npgsql" version="4.0.0.0" publicKeyToken="5d8b90d52f46fda7" />
+ <Assembly name="Mono.C5" version="1.1.0.0" publicKeyToken="ba07f434b1c35cbd" />
+ <Assembly name="Mono.CSharp" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Management" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Messaging.RabbitMQ" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Simd" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Tasklets" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="Mono.Web" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
+ <Assembly name="RabbitMQ.Client" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+
+ <!-- the following assemblies were added by Mono, but don't seem to exist any more -->
+ <Assembly name="Mono.WebServer" />
+ <Assembly name="Mono.Mozilla" />
+ <Assembly name="Mono.Data.SybaseClient" />
+ <Assembly name="Mono.GetOptions" />
+ <Assembly name="Mono.Data.TdsClient" />
+ <Assembly name="Mono.Data.SqliteClient" />
+ <Assembly name="Mono.Data" />
+</Assemblies>
+</TargetFramework>
diff --git a/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.md1format.xml b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.md1format.xml
new file mode 100644
index 0000000..f92a445
--- /dev/null
+++ b/src/core/MonoDevelop.Core/obj/Debug/MonoDevelop.Core.md1format.xml
@@ -0,0 +1,91 @@
+<SerializationMap>
+ <DataItem class = "MonoDevelop.Projects.Solution" name="Combine">
+ <LiteralProperty name="fileversion" value="2.0" />
+ <ItemProperty member="description" defaultValue="" />
+ <ItemProperty member="version" defaultValue="0.1"/>
+ <ItemProperty member="outputdir" name="outputpath" serializationDataType="MonoDevelop.Projects.PathDataType" />
+ <ItemMember name="CombineConfigurations" type="MonoDevelop.Projects.Formats.MD1.CombineConfigurationSet"/>
+ <ItemProperty member="CombineConfigurations" name="Configurations" />
+ <ItemMember name="StartMode" type="MonoDevelop.Projects.Formats.MD1.CombineStartupMode"/>
+ <ItemProperty member="StartMode" name="StartMode" />
+ <ItemProperty member="Policies" skipEmpty="true" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.SolutionFolder" name="SolutionFolder">
+ <ItemProperty member="name" />
+ <LiteralProperty name="fileversion" value="2.0" />
+ <ItemMember name="CombineConfigurations" type="MonoDevelop.Projects.Formats.MD1.CombineConfigurationSet"/>
+ <ItemProperty member="CombineConfigurations" name="Configurations" />
+ <ItemMember name="StartMode" type="MonoDevelop.Projects.Formats.MD1.CombineStartupMode"/>
+ <ItemProperty member="StartMode" name="StartMode" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.SolutionItem">
+ <ItemProperty member="Policies" skipEmpty="true" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.SolutionEntityItem" name="CombineEntry" fallbackType="MonoDevelop.Projects.UnknownSolutionItem" customDataItem="MonoDevelop.Projects.Formats.MD1.MD1CustomDataItem">
+ <ItemProperty member="releaseVersion" name = "releaseVersion" defaultValue="0.1"/>
+ <ItemProperty member="syncReleaseVersion" name = "syncReleaseVersion" defaultValue="true"/>
+ <ItemProperty member="Name" name="name"/>
+ <LiteralProperty name="fileversion" value="2.0" />
+ <ItemProperty member="Configurations"/>
+ <ItemProperty member="Configurations" scope="*" name="Configuration" valueType="MonoDevelop.Projects.SolutionItemConfiguration"/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.Project" fallbackType="MonoDevelop.Projects.UnknownProject">
+ <ItemProperty member="description" defaultValue=""/>
+ <ItemProperty member="newFileSearch" name="newfilesearch" defaultValue="None" />
+ <ItemProperty member="Files" name="Contents" />
+ <ItemProperty member="Files" scope="*" name="File" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.DotNetProject" name="AbstractDotNetProject">
+ <ItemProperty member="languageName" name="language"/>
+ <ItemProperty member="UsePartialTypes" defaultValue="true"/>
+ <ItemProperty member="defaultNamespace" name="DefaultNamespace" defaultValue="" />
+ <ItemProperty member="References" name="References" />
+ <ItemProperty member="LanguageParameters" skipEmpty="true" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.DotNetAssemblyProject" name="DotNetProject">
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.DotNetProjectConfiguration">
+ <ItemProperty member="assembly" name="Output/assembly"/>
+ <ItemProperty member="signAssembly" name="Output/signAssembly" defaultValue="false" />
+ <ItemProperty member="delaySign" name="Output/delaySign" defaultValue="false" />
+ <ItemProperty member="assemblyKeyFile" name="Output/assemblyKeyFile" defaultValue="" />
+ <LiteralProperty name="Execution/runtime" value="MsNet" />
+ <ItemMember name="md1_CompileTarget" type="System.String"/>
+ <ItemProperty member="md1_CompileTarget" name="Build/target"/>
+ <ItemProperty member="CompilationParameters" name="CodeGeneration" fallbackType="MonoDevelop.Projects.UnknownCompilationParameters"/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.ItemConfiguration">
+ <ItemProperty member="Id" name="name" />
+ <ItemProperty member="customCommands" name="CustomCommands" />
+ <ItemProperty member="customCommands" name="Command" scope="*" />
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.ProjectConfiguration">
+ <ItemProperty member="outputDirectory" name="Output/directory" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ <ItemProperty member="debugMode" name="Build/debugmode" />
+ <ItemProperty member="runWithWarnings" name="Execution/runwithwarnings" />
+ <ItemProperty member="commandLineParameters" name="Execution/commandlineparameters" defaultValue =""/>
+ <ItemProperty member="externalConsole" name="Execution/externalconsole" defaultValue="false" />
+ <ItemProperty member="pauseConsoleOutput" name="Execution/consolepause" />
+ <ItemProperty member="environmentVariables" name="EnvironmentVariables" skipEmpty="true" />
+ <ItemProperty member="environmentVariables" name="Variable" scope="item"/>
+ <ItemProperty member="environmentVariables" name="name" scope="key"/>
+ <ItemProperty member="environmentVariables" name="value" scope="value"/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.ProjectFile" customDataItem="MonoDevelop.Projects.Formats.MD1.MD1CustomDataItem">
+ <ItemProperty member="filename" name="name" serializationDataType="MonoDevelop.Projects.PathDataType"/>
+ <ItemProperty member="subtype" name="subtype"/>
+ <ItemProperty member="buildaction" name="buildaction" serializationDataType="MonoDevelop.Projects.Formats.MD1.BuildActionDataType" />
+ <ItemProperty member="dependsOn" name="dependson" defaultValue=""/>
+ <ItemProperty member="copyToOutputDirectory" name="copyToOutputDirectory" defaultValue="None"/>
+ <ItemProperty member="visible" name="visible" defaultValue="true"/>
+ <ItemProperty member="contentType" name="contentType" defaultValue=""/>
+ <ItemProperty member="generator" name="generator" defaultValue=""/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.ProjectReference" fallbackType="MonoDevelop.Projects.UnknownProjectReference" customDataItem="MonoDevelop.Projects.Formats.MD1.MD1CustomDataItem">
+ <ItemProperty member="internalReferenceType" name="type" />
+ <ItemProperty member="localCopy" name="localcopy" />
+ <ItemProperty member="SpecificVersion" name="specificVersion" defaultValue="True"/>
+ </DataItem>
+ <DataItem class = "MonoDevelop.Projects.SolutionConfiguration">
+ </DataItem>
+</SerializationMap>
diff --git a/src/core/MonoDevelop.Ide/BuildVariables.cs b/src/core/MonoDevelop.Ide/BuildVariables.cs
index 465a9b7..cf45f80 100644
--- a/src/core/MonoDevelop.Ide/BuildVariables.cs
+++ b/src/core/MonoDevelop.Ide/BuildVariables.cs
@@ -2,8 +2,8 @@ namespace MonoDevelop.Ide
{
internal class BuildVariables
{
- public static string PackageVersion = "4.0.5";
- public static string PackageVersionLabel = "4.0.5";
+ public static string PackageVersion = "4.0.12";
+ public static string PackageVersionLabel = "4.0.12";
}
}
diff --git a/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml b/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
index 504dd57..ae9bfce 100644
--- a/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
+++ b/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
@@ -319,6 +319,9 @@
<Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Reload"
_description = "Reload selected project or solution"
_label = "Reload" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.EditSolutionItem"
+ _description = "Edit selected item"
+ _label = "Edit File" />
<Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"
defaultHandler = "MonoDevelop.Ide.Commands.ExportSolutionHandler"
_description = "Convert selected solution to another format"
@@ -489,6 +492,10 @@
<Command id = "MonoDevelop.Ide.Commands.FileTabCommands.ToggleMaximize"
defaultHandler = "MonoDevelop.Ide.Commands.ToggleMaximizeHandler"
_label = "S_witch maximize/normal view"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileTabCommands.ReopenClosedTab"
+ defaultHandler = "MonoDevelop.Ide.Commands.ReopenClosedTabHandler"
+ _label = "Reopen Closed Tab"
+ _description = "Opens the last tab that has been closed"/>
</Category>
<!-- ViewCommands -->
@@ -681,7 +688,7 @@
<Category _name = "Help" id = "Help">
<Command id = "MonoDevelop.Ide.Commands.HelpCommands.Help"
- _label = "Help"
+ _label = "API Documentation"
icon = "gtk-help"
_description = "Show help"
defaultHandler = "MonoDevelop.Ide.Commands.HelpHandler"
@@ -704,7 +711,7 @@
_description = "Show about dialog" />
<Command id = "MonoDevelop.Ide.Updater.UpdateCommands.CheckForUpdates"
defaultHandler = "MonoDevelop.Ide.Updater.CheckForUpdatesHandler"
- _label = "_Check for Updates"
+ _label = "_Check for Updates..."
_description = "Check for updates to MonoDevelop and packages it requires" />
<Command id = "MonoDevelop.Ide.Commands.HelpCommands.SendFeedback"
defaultHandler = "MonoDevelop.Ide.Commands.SendFeedbackHandler"
diff --git a/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml b/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
index 5d446f2..63d186f 100644
--- a/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
+++ b/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
@@ -35,10 +35,10 @@
</Section>
<Section id="Build" _label="Build">
<Section id="General" _label="General" icon="md-build-combine">
- <Condition id="ItemType" value="Project">
+ <Condition id="ItemType" value="DotNetAssemblyProject">
<Panel id = "RuntimeOptionsPanel" _label = "Runtime Options" class = "MonoDevelop.Ide.Projects.OptionPanels.RuntimeOptionsPanel"/>
</Condition>
- <Condition id="ItemType" value="Project">
+ <Condition id="ItemType" value="PortableDotNetProject">
<Panel id = "PortableRuntimeOptionsPanel" _label = "Runtime Options" class = "MonoDevelop.Ide.Projects.OptionPanels.PortableRuntimeOptionsPanel"/>
</Condition>
<Condition id="ItemType" value="Solution">
diff --git a/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml b/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
index 5afdda9..36e512a 100644
--- a/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
+++ b/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
@@ -24,13 +24,10 @@
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAs" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ReloadFile" />
- <!-- Disabled printing on windows because gtk# printing support is broken on that platform. -->
- <Condition id = "Platform" value = "!windows">
- <SeparatorItem id = "SaveSeparator" />
- <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup" />
- <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument" />
- <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument" />
- </Condition>
+ <SeparatorItem id = "SaveSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument" />
<SeparatorItem id = "RecentSeparator" />
<ItemSet id = "RecentFiles" _label = "Recent _Files">
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.RecentFileList" />
diff --git a/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml b/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
index cc51d6b..5014d3d 100644
--- a/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
+++ b/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
@@ -7,7 +7,7 @@
description = "The MonoDevelop IDE application."
category = "MonoDevelop Core"
isroot = "true"
- version = "4.0.5"
+ version = "4.0.12"
compatVersion = "4.0">
<Runtime>
@@ -15,7 +15,7 @@
</Runtime>
<Dependencies>
- <Addin id="Core" version="4.0.5"/>
+ <Addin id="Core" version="4.0.12"/>
</Dependencies>
<!-- Extension ponts -->
@@ -255,10 +255,12 @@
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseFile" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseAllFiles" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.CloseAllButThis" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.ReopenClosedTab" />
<SeparatorItem id = "CloseSeparator" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Save" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
<SeparatorItem id = "SaveSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenContainingFolder" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.CopyPathName" />
<CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.ToggleMaximize" />
</Extension>
@@ -298,4 +300,12 @@
<Extension path = "/MonoDevelop/Core/WebCertificateProvider">
<Class class = "MonoDevelop.Ide.DefaultWebCertificateProvider" />
</Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CustomTools">
+ <Tool name="ResXFileCodeGenerator" type="MonoDevelop.Ide.CustomTools.ResXFileCodeGenerator" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/FileSystemExtensions">
+ <Class id="Ide" class = "MonoDevelop.Ide.Projects.IdeFileSystemExtensionExtension" insertafter = "FinalStep"/>
+ </Extension>
</Addin>
diff --git a/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml b/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
index 09edf3c..f0ea6f9 100644
--- a/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
+++ b/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
@@ -79,6 +79,7 @@
<StockIcon stockid = "md-InternalAndProtected-property" icon = "res:element-property-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
<StockIcon stockid = "md-InternalAndProtected-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
<StockIcon stockid = "md-InternalAndProtected-struct" icon = "res:element-structure-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-variable" resource = "variable-16.png" size="Menu" />
<StockIcon stockid = "md-literal" resource = "element-literal-16.png" size="Menu" />
<StockIcon stockid = "md-method" resource = "element-method-16.png" size="Menu" />
<StockIcon stockid = "md-static-method" icon = "res:element-method-16.png|res:static-16.png" size="Menu" />
@@ -292,6 +293,8 @@
<StockIcon stockid = "md-monkey" resource = "monkey-16.png" size="Menu" />
<StockIcon stockid = "md-locale" resource = "locale_16x16.png" size="Menu" />
<StockIcon stockid = "md-errors-list" resource = "errors-pad.png" size="Menu" />
+ <StockIcon stockid = "md-bubble-error" resource = "bubble-error-icon.png" size="Menu" />
+ <StockIcon stockid = "md-bubble-warning" resource = "bubble-warning-icon.png" size="Menu" />
</Extension>
</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/Makefile.in b/src/core/MonoDevelop.Ide/Makefile.in
index 796de8f..758bf11 100644
--- a/src/core/MonoDevelop.Ide/Makefile.in
+++ b/src/core/MonoDevelop.Ide/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -253,6 +252,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Chart/BasicChart.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Chart/BasicChart.cs
index 21e9fc9..10f60ed 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Chart/BasicChart.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Chart/BasicChart.cs
@@ -409,12 +409,13 @@ namespace MonoDevelop.Components.Chart
if (backgroundDisplay == BackgroundDisplay.Gradient) {
ctx.Rectangle (left - 1, top - 1, width + 2, height + 2);
- Cairo.Gradient pat = new Cairo.LinearGradient (left - 1, top - 1, left - 1, height + 2);
- pat.AddColorStop (0, backroundColor);
- Cairo.Color endc = new Cairo.Color (1,1,1);
- pat.AddColorStop (1, endc);
- ctx.Pattern = pat;
- ctx.Fill ();
+ using (var pat = new Cairo.LinearGradient (left - 1, top - 1, left - 1, height + 2)) {
+ pat.AddColorStop (0, backroundColor);
+ Cairo.Color endc = new Cairo.Color (1,1,1);
+ pat.AddColorStop (1, endc);
+ ctx.Pattern = pat;
+ ctx.Fill ();
+ }
} else {
ctx.Rectangle (left - 1, top - 1, width + 2, height + 2);
ctx.Color = backroundColor;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
index 4f5a4d8..a0fde12 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
@@ -174,5 +174,12 @@ namespace MonoDevelop.Components.Commands
updating = false;
}
+
+ protected override void OnDestroyed ()
+ {
+ base.OnDestroyed ();
+ initialTarget = null;
+ arrayDataItem = null;
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
index 7db790b..998932e 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
@@ -49,6 +49,7 @@ namespace MonoDevelop.Components.Commands
DateTime lastUserInteraction;
KeyboardShortcut[] chords;
string chord;
+ internal const int SlowCommandWarningTime = 50;
Dictionary<object,Command> cmds = new Dictionary<object,Command> ();
Hashtable handlerInfo = new Hashtable ();
@@ -1167,7 +1168,7 @@ namespace MonoDevelop.Components.Commands
NotifyCommandTargetScanStarted ();
CommandInfo info = new CommandInfo (cmd);
-
+
try {
bool multiCastEnabled = true;
bool multiCastVisible = false;
@@ -2024,13 +2025,25 @@ namespace MonoDevelop.Components.Commands
{
if (customHandlerChain != null) {
info.UpdateHandlerData = Method;
+
+ DateTime t = DateTime.Now;
customHandlerChain.CommandUpdate (cmdTarget, info);
+ var time = DateTime.Now - t;
+ if (time.TotalMilliseconds > CommandManager.SlowCommandWarningTime)
+ LoggingService.LogWarning ("Slow command update ({0}ms): Command:{1}, CustomUpdater:{2}", (int)time.TotalMilliseconds, CommandId, customHandlerChain);
} else {
if (Method == null)
throw new InvalidOperationException ("Invalid custom update handler. An implementation of ICommandUpdateHandler was expected.");
if (isArray)
throw new InvalidOperationException ("Invalid signature for command update handler: " + Method.DeclaringType + "." + Method.Name + "()");
+
+ DateTime t = DateTime.Now;
+
Method.Invoke (cmdTarget, new object[] {info} );
+
+ var time = DateTime.Now - t;
+ if (time.TotalMilliseconds > CommandManager.SlowCommandWarningTime)
+ LoggingService.LogWarning ("Slow command update ({0}ms): Command:{1}, Method:{2}", (int)time.TotalMilliseconds, CommandId, Method.DeclaringType + "." + Method.Name);
}
}
@@ -2044,7 +2057,14 @@ namespace MonoDevelop.Components.Commands
throw new InvalidOperationException ("Invalid custom update handler. An implementation of ICommandArrayUpdateHandler was expected.");
if (!isArray)
throw new InvalidOperationException ("Invalid signature for command update handler: " + Method.DeclaringType + "." + Method.Name + "()");
+
+ DateTime t = DateTime.Now;
+
Method.Invoke (cmdTarget, new object[] {info} );
+
+ var time = DateTime.Now - t;
+ if (time.TotalMilliseconds > CommandManager.SlowCommandWarningTime)
+ LoggingService.LogWarning ("Slow command update ({0}ms): Command:{1}, Method:{2}", (int)time.TotalMilliseconds, CommandId, Method.DeclaringType + "." + Method.Name);
}
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
index 91c0589..e266d5e 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
@@ -247,7 +247,15 @@ namespace MonoDevelop.Components.Commands
smenu.Add (item);
}
}
- }
+ }
+ }
+
+ protected override void OnDestroyed ()
+ {
+ base.OnDestroyed ();
+ itemArray = null;
+ initialTarget = null;
+ arrayDataItem = null;
}
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
index b94772b..a7993c7 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
@@ -34,12 +34,12 @@ using Gtk;
using Mono.TextEditor;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Components;
-
-using Animations = MonoDevelop.Components.AnimationExtensions;
+using Xwt.Motion;
+using Animations = Xwt.Motion.AnimationExtensions;
namespace MonoDevelop.Components.Docking
{
- class CrossfadeIcon: Gtk.Image, Animatable
+ class CrossfadeIcon: Gtk.Image, IAnimatable
{
// This class should be subclassed from Gtk.Misc, but there is no reasonable way to do that due to there being no bindings to gtk_widget_set_has_window
@@ -47,7 +47,7 @@ namespace MonoDevelop.Components.Docking
SurfaceWrapper secondarySurface;
Gdk.Pixbuf primary, secondary;
- float secondaryOpacity;
+ double secondaryOpacity;
public CrossfadeIcon (Gdk.Pixbuf primary, Gdk.Pixbuf secondary)
{
@@ -85,6 +85,9 @@ namespace MonoDevelop.Components.Docking
secondary = null;
}
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
+
public void ShowPrimary ()
{
AnimateCrossfade (false);
@@ -97,10 +100,10 @@ namespace MonoDevelop.Components.Docking
void AnimateCrossfade (bool toSecondary)
{
- this.Animate (name: "CrossfadeIconSwap",
- start: secondaryOpacity,
- end: toSecondary ? 1.0f : 0.0f,
- callback: x => secondaryOpacity = x);
+ this.Animate ("CrossfadeIconSwap",
+ x => secondaryOpacity = x,
+ secondaryOpacity,
+ toSecondary ? 1.0f : 0.0f);
}
protected override void OnSizeRequested (ref Requisition requisition)
@@ -124,7 +127,7 @@ namespace MonoDevelop.Components.Docking
return false;
}
- void RenderIcon (Cairo.Context context, SurfaceWrapper surface, float opacity)
+ void RenderIcon (Cairo.Context context, SurfaceWrapper surface, double opacity)
{
context.SetSourceSurface (surface.Surface,
Allocation.X + (Allocation.Width - surface.Width) / 2,
@@ -134,7 +137,7 @@ namespace MonoDevelop.Components.Docking
}
}
- class DockBarItem: EventBox, Animatable
+ class DockBarItem: EventBox, IAnimatable
{
DockBar bar;
DockItem it;
@@ -149,7 +152,7 @@ namespace MonoDevelop.Components.Docking
Gdk.Size lastFrameSize;
MouseTracker tracker;
CrossfadeIcon crossfade;
- float hoverProgress;
+ double hoverProgress;
public DockBarItem (DockBar bar, DockItem it, int size)
{
@@ -177,13 +180,16 @@ namespace MonoDevelop.Components.Docking
};
}
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
+
void AnimateHover (bool hovered)
{
this.Animate ("Hover",
- length: 100,
- start: hoverProgress,
- end: hovered ? 1.0f : 0.0f,
- callback: x => hoverProgress = x);
+ x => hoverProgress = x,
+ hoverProgress,
+ hovered ? 1.0f : 0.0f,
+ length: 100);
}
void HandleBarFrameSizeAllocated (object o, SizeAllocatedArgs args)
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrame.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrame.cs
index f322e17..2c1f016 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrame.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrame.cs
@@ -34,10 +34,11 @@ using System.Collections;
using System.Collections.Generic;
using Gtk;
using Gdk;
+using Xwt.Motion;
namespace MonoDevelop.Components.Docking
{
- public class DockFrame: HBox, Animatable
+ public class DockFrame: HBox, IAnimatable
{
internal const double ItemDockCenterArea = 0.4;
internal const int GroupDockSeparatorSize = 40;
@@ -167,19 +168,23 @@ namespace MonoDevelop.Components.Docking
int currentOverlayPosition;
- void ShowOverlayWidgetAnimation (float value)
+ void ShowOverlayWidgetAnimation (double value)
{
- currentOverlayPosition = Allocation.Y + (int)((float)Allocation.Height * (1f - value));
+ currentOverlayPosition = Allocation.Y + (int)((double)Allocation.Height * (1f - value));
overlayWidget.SizeAllocate (new Rectangle (Allocation.X, currentOverlayPosition, Allocation.Width, Allocation.Height));
}
- void HideOverlayWidgetAnimation (float value)
+ void HideOverlayWidgetAnimation (double value)
{
- currentOverlayPosition = Allocation.Y + (int)((float)Allocation.Height * value);
+ currentOverlayPosition = Allocation.Y + (int)((double)Allocation.Height * value);
overlayWidget.SizeAllocate (new Rectangle (Allocation.X, currentOverlayPosition, Allocation.Width, Allocation.Height));
}
- void Animatable.QueueDraw ()
+ void IAnimatable.BatchBegin ()
+ {
+ }
+
+ void IAnimatable.BatchCommit ()
{
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs
index b2757a5..d1ccf83 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItem.cs
@@ -566,6 +566,11 @@ namespace MonoDevelop.Components.Docking
menu.Append (citem);
}
+ if (menu.Children.Length == 0) {
+ menu.Destroy ();
+ return;
+ }
+
ShowingContextMemu = true;
menu.ShowAll ();
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemBehavior.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemBehavior.cs
index 1c62d92..d03991a 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemBehavior.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemBehavior.cs
@@ -43,6 +43,6 @@ namespace MonoDevelop.Components.Docking
CantAutoHide = 1 << 4,
NoGrip = 1 << 5,
Sticky = 1 << 6, // Visibility is the same for al layouts
- Locked = NoGrip,
+ Locked = NoGrip | NeverFloating | CantClose | CantAutoHide,
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemContainer.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemContainer.cs
index 06e6ea3..0bcede7 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemContainer.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemContainer.cs
@@ -275,14 +275,16 @@ namespace MonoDevelop.Components.Docking
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
- Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, bottom);
- pat.AddColorStop (0, bcolor.ToCairoColor ());
- HslColor gcol = bcolor;
- gcol.L -= 0.1;
- if (gcol.L < 0) gcol.L = 0;
- pat.AddColorStop (1, gcol);
- cr.Pattern = pat;
- cr.Fill ();
+ using (Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, bottom)) {
+ pat.AddColorStop (0, bcolor.ToCairoColor ());
+ HslColor gcol = bcolor;
+ gcol.L -= 0.1;
+ if (gcol.L < 0)
+ gcol.L = 0;
+ pat.AddColorStop (1, gcol);
+ cr.Pattern = pat;
+ cr.Fill ();
+ }
} else {
if (backgroundColorSet) {
Gdk.GC gc = new Gdk.GC (GdkWindow);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
index 11e34dc..09a6d37 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
@@ -278,10 +278,12 @@ namespace MonoDevelop.Components.Docking
{
if (tabActivated) {
tabActivated = false;
- if (item.Status == DockItemStatus.AutoHide)
- item.Status = DockItemStatus.Dockable;
- else
- item.Status = DockItemStatus.AutoHide;
+ if (!item.Behavior.HasFlag (DockItemBehavior.CantAutoHide)) {
+ if (item.Status == DockItemStatus.AutoHide)
+ item.Status = DockItemStatus.Dockable;
+ else
+ item.Status = DockItemStatus.AutoHide;
+ }
}
else if (!evnt.TriggersContextMenu () && evnt.Button == 1) {
frame.DockInPlaceholder (item);
@@ -297,7 +299,7 @@ namespace MonoDevelop.Components.Docking
protected override bool OnMotionNotifyEvent (Gdk.EventMotion evnt)
{
- if (tabPressed && Math.Abs (evnt.X - pressX) > 3 && Math.Abs (evnt.Y - pressY) > 3) {
+ if (tabPressed && !item.Behavior.HasFlag (DockItemBehavior.NoGrip) && Math.Abs (evnt.X - pressX) > 3 && Math.Abs (evnt.Y - pressY) > 3) {
frame.ShowPlaceholder (item);
GdkWindow.Cursor = fleurCursor;
frame.Toplevel.KeyPressEvent += HeaderKeyPress;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
index ced2952..003daa3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
@@ -51,6 +51,8 @@ namespace MonoDevelop.Components.MainToolbar
{
const string ToolbarExtensionPath = "/MonoDevelop/Ide/CommandBar";
+ EventHandler executionTargetsChanged;
+
HBox contentBox = new HBox (false, 0);
HBox configurationCombosBox;
@@ -109,7 +111,7 @@ namespace MonoDevelop.Components.MainToolbar
void SetSearchCategory (string category)
{
- matchEntry.Entry.Text = category +":";
+ matchEntry.Entry.Text = category + ":";
matchEntry.Entry.GrabFocus ();
var pos = matchEntry.Entry.Text.Length;
matchEntry.Entry.SelectRegion (pos, pos);
@@ -117,6 +119,8 @@ namespace MonoDevelop.Components.MainToolbar
public MainToolbar ()
{
+ executionTargetsChanged = DispatchService.GuiDispatch (new EventHandler (HandleExecutionTargetsChanged));
+
IdeApp.Workspace.ActiveConfigurationChanged += (sender, e) => UpdateCombos ();
IdeApp.Workspace.ConfigurationsChanged += (sender, e) => UpdateCombos ();
@@ -125,7 +129,6 @@ namespace MonoDevelop.Components.MainToolbar
IdeApp.ProjectOperations.CurrentSelectedSolutionChanged += HandleCurrentSelectedSolutionChanged;
-
WidgetFlags |= Gtk.WidgetFlags.AppPaintable;
AddWidget (button);
@@ -154,7 +157,7 @@ namespace MonoDevelop.Components.MainToolbar
AddWidget (configurationCombosBox);
buttonBarBox = new Alignment (0.5f, 0.5f, 0, 0);
- buttonBarBox.LeftPadding = 7;
+ buttonBarBox.LeftPadding = (uint) 7;
buttonBarBox.Add (buttonBar);
buttonBarBox.NoShowAll = true;
AddWidget (buttonBarBox);
@@ -263,13 +266,14 @@ namespace MonoDevelop.Components.MainToolbar
var align = new Gtk.Alignment (0, 0, 1f, 1f);
align.Show ();
- align.TopPadding = 5;
- align.LeftPadding = 9;
- align.RightPadding = 18;
- align.BottomPadding = 10;
+ align.TopPadding = (uint) 5;
+ align.LeftPadding = (uint) 9;
+ align.RightPadding = (uint) 18;
+ align.BottomPadding = (uint) 10;
align.Add (contentBox);
Add (align);
+ SetDefaultSizes (-1, 21);
UpdateCombos ();
button.Clicked += HandleStartButtonClicked;
@@ -314,14 +318,14 @@ namespace MonoDevelop.Components.MainToolbar
void TrackStartupProject ()
{
if (currentStartupProject != null && ((currentSolution != null && currentStartupProject != currentSolution.StartupItem) || currentSolution == null)) {
- currentStartupProject.ExecutionTargetsChanged -= HandleExecutionTargetsChanged;
+ currentStartupProject.ExecutionTargetsChanged -= executionTargetsChanged;
currentStartupProject.Saved -= HandleProjectSaved;
}
if (currentSolution != null) {
currentStartupProject = currentSolution.StartupItem;
if (currentStartupProject != null) {
- currentStartupProject.ExecutionTargetsChanged += HandleExecutionTargetsChanged;
+ currentStartupProject.ExecutionTargetsChanged += executionTargetsChanged;
currentStartupProject.Saved += HandleProjectSaved;
}
}
@@ -360,13 +364,7 @@ namespace MonoDevelop.Components.MainToolbar
}
}
- protected override void OnRealized ()
- {
- base.OnRealized ();
- UpdateSize (-1, 21);
- }
-
- void UpdateSize (int comboHeight, int height)
+ void SetDefaultSizes (int comboHeight, int height)
{
configurationCombo.SetSizeRequest (150, comboHeight);
runtimeCombo.SetSizeRequest (150, comboHeight);
@@ -782,6 +780,16 @@ namespace MonoDevelop.Components.MainToolbar
matchEntry.Sensitive = enabled;
}
#endregion
+
+ protected override void OnDestroyed ()
+ {
+ base.OnDestroyed ();
+
+ if (Background != null) {
+ ((IDisposable)Background).Dispose ();
+ Background = null;
+ }
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ProjectSearchCategory.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ProjectSearchCategory.cs
index b63d8ac..57bb329 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ProjectSearchCategory.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ProjectSearchCategory.cs
@@ -175,13 +175,13 @@ namespace MonoDevelop.Components.MainToolbar
return;
var member = t.Item2;
if (newResult.Tag != null) {
- if (newResult.Tag == "m" && member.EntityType != EntityType.Method)
+ if (newResult.Tag == "m" && member.SymbolKind != SymbolKind.Method)
continue;
- if (newResult.Tag == "p" && member.EntityType != EntityType.Property)
+ if (newResult.Tag == "p" && member.SymbolKind != SymbolKind.Property)
continue;
- if (newResult.Tag == "f" && member.EntityType != EntityType.Field)
+ if (newResult.Tag == "f" && member.SymbolKind != SymbolKind.Field)
continue;
- if (newResult.Tag == "evt" && member.EntityType != EntityType.Event)
+ if (newResult.Tag == "evt" && member.SymbolKind != SymbolKind.Event)
continue;
}
SearchResult curResult = newResult.CheckMember (t.Item1, member);
@@ -193,13 +193,13 @@ namespace MonoDevelop.Components.MainToolbar
} else {
Func<IUnresolvedMember, bool> mPred = member => {
if (newResult.Tag != null) {
- if (newResult.Tag == "m" && member.EntityType != EntityType.Method)
+ if (newResult.Tag == "m" && member.SymbolKind != SymbolKind.Method)
return false;
- if (newResult.Tag == "p" && member.EntityType != EntityType.Property)
+ if (newResult.Tag == "p" && member.SymbolKind != SymbolKind.Property)
return false;
- if (newResult.Tag == "f" && member.EntityType != EntityType.Field)
+ if (newResult.Tag == "f" && member.SymbolKind != SymbolKind.Field)
return false;
- if (newResult.Tag == "evt" && member.EntityType != EntityType.Event)
+ if (newResult.Tag == "evt" && member.SymbolKind != SymbolKind.Event)
return false;
}
return newResult.IsMatchingMember (member);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/RoundButton.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/RoundButton.cs
index 095a1b6..9a7b875 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/RoundButton.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/RoundButton.cs
@@ -34,7 +34,7 @@ using System.Reflection;
namespace MonoDevelop.Components.MainToolbar
{
- class LazyImage
+ class LazyImage : IDisposable
{
string resourceName;
@@ -57,6 +57,13 @@ namespace MonoDevelop.Components.MainToolbar
return lazy.Img;
}
+ public void Dispose ()
+ {
+ if (img != null) {
+ img.Dispose ();
+ img = null;
+ }
+ }
}
class RoundButton : Gtk.EventBox
@@ -237,6 +244,46 @@ namespace MonoDevelop.Components.MainToolbar
if (handler != null)
handler (this, e);
}
+
+ protected override void OnDestroyed ()
+ {
+ base.OnDestroyed ();
+
+ if (btnNormal != null) {
+ btnNormal.Dispose ();
+ btnNormal = null;
+ }
+
+ if (iconRunNormal != null) {
+ iconRunNormal.Dispose ();
+ iconRunNormal = null;
+ }
+
+ if (iconRunDisabled != null) {
+ iconRunDisabled.Dispose ();
+ iconRunDisabled = null;
+ }
+
+ if (iconStopNormal != null) {
+ iconStopNormal.Dispose ();
+ iconStopNormal = null;
+ }
+
+ if (iconStopDisabled != null) {
+ iconStopDisabled.Dispose ();
+ iconStopDisabled = null;
+ }
+
+ if (iconBuildNormal != null) {
+ iconBuildNormal.Dispose ();
+ iconBuildNormal = null;
+ }
+
+ if (iconBuildDisabled != null) {
+ iconBuildDisabled.Dispose ();
+ iconBuildDisabled = null;
+ }
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
index 356178a..4bc2e9b 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
@@ -512,7 +512,13 @@ namespace MonoDevelop.Components.MainToolbar
var token = tooltipSrc.Token;
ThreadPool.QueueUserWorkItem (delegate {
- var tooltip = currentSelectedItem.DataSource.GetTooltip (i);
+ TooltipInformation tooltip;
+ try {
+ tooltip = currentSelectedItem.DataSource.GetTooltip (i);
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while creating search popup window tooltip", e);
+ return;
+ }
if (tooltip == null || string.IsNullOrEmpty (tooltip.SignatureMarkup) || token.IsCancellationRequested)
return;
Application.Invoke (delegate {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchResult.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchResult.cs
index cbd35ca..58ee7b3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchResult.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchResult.cs
@@ -311,25 +311,25 @@ namespace MonoDevelop.Components.MainToolbar
get {
string loc = GettextCatalog.GetString ("type \"{0}\"", member.DeclaringTypeDefinition.Name);
- switch (member.EntityType) {
- case EntityType.Field:
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
return GettextCatalog.GetString ("field ({0})", loc);
- case EntityType.Property:
+ case SymbolKind.Property:
return GettextCatalog.GetString ("property ({0})", loc);
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
return GettextCatalog.GetString ("indexer ({0})", loc);
- case EntityType.Event:
+ case SymbolKind.Event:
return GettextCatalog.GetString ("event ({0})", loc);
- case EntityType.Method:
+ case SymbolKind.Method:
return GettextCatalog.GetString ("method ({0})", loc);
- case EntityType.Operator:
+ case SymbolKind.Operator:
return GettextCatalog.GetString ("operator ({0})", loc);
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
return GettextCatalog.GetString ("constructor ({0})", loc);
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
return GettextCatalog.GetString ("destrutcor ({0})", loc);
default:
- throw new NotSupportedException (member.EntityType + " is not supported.");
+ throw new NotSupportedException (member.SymbolKind + " is not supported.");
}
}
}
@@ -344,8 +344,8 @@ namespace MonoDevelop.Components.MainToolbar
public override string GetMarkupText (Widget widget)
{
if (useFullName)
- return HighlightMatch (widget, member.EntityType == EntityType.Constructor ? member.DeclaringTypeDefinition.FullName : member.FullName, match);
- return HighlightMatch (widget, member.EntityType == EntityType.Constructor ? member.DeclaringTypeDefinition.Name : member.Name, match);
+ return HighlightMatch (widget, member.SymbolKind == SymbolKind.Constructor ? member.DeclaringTypeDefinition.FullName : member.FullName, match);
+ return HighlightMatch (widget, member.SymbolKind == SymbolKind.Constructor ? member.DeclaringTypeDefinition.Name : member.Name, match);
}
internal Ambience Ambience {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
index 106fbbd..faa911f 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
@@ -37,10 +37,11 @@ using MonoDevelop.Core;
using MonoDevelop.Ide.Gui.Components;
using StockIcons = MonoDevelop.Ide.Gui.Stock;
+using Xwt.Motion;
namespace MonoDevelop.Components.MainToolbar
{
- class StatusArea : EventBox, StatusBar, Animatable
+ class StatusArea : EventBox, StatusBar, Xwt.Motion.IAnimatable
{
struct Message
{
@@ -59,23 +60,23 @@ namespace MonoDevelop.Components.MainToolbar
public struct RenderArg
{
public Gdk.Rectangle Allocation { get; set; }
- public float BuildAnimationProgress { get; set; }
- public float BuildAnimationOpacity { get; set; }
+ public double BuildAnimationProgress { get; set; }
+ public double BuildAnimationOpacity { get; set; }
public Gdk.Rectangle ChildAllocation { get; set; }
public Gdk.Pixbuf CurrentPixbuf { get; set; }
public string CurrentText { get; set; }
public bool CurrentTextIsMarkup { get; set; }
- public float ErrorAnimationProgress { get; set; }
- public float HoverProgress { get; set; }
+ public double ErrorAnimationProgress { get; set; }
+ public double HoverProgress { get; set; }
public string LastText { get; set; }
public bool LastTextIsMarkup { get; set; }
public Gdk.Pixbuf LastPixbuf { get; set; }
public Gdk.Point MousePosition { get; set; }
public Pango.Context Pango { get; set; }
- public float ProgressBarAlpha { get; set; }
+ public double ProgressBarAlpha { get; set; }
public float ProgressBarFraction { get; set; }
public bool ShowProgressBar { get; set; }
- public float TextAnimationProgress { get; set; }
+ public double TextAnimationProgress { get; set; }
}
StatusAreaTheme theme;
@@ -131,10 +132,10 @@ namespace MonoDevelop.Components.MainToolbar
Action<bool> animateProgressBar =
showing => this.Animate ("ProgressBarFade",
- easing: Easing.CubicInOut,
- start: renderArg.ProgressBarAlpha,
- end: showing ? 1.0f : 0.0f,
- callback: val => renderArg.ProgressBarAlpha = val);
+ val => renderArg.ProgressBarAlpha = val,
+ renderArg.ProgressBarAlpha,
+ showing ? 1.0f : 0.0f,
+ easing: Easing.CubicInOut);
ProgressBegin += delegate {
renderArg.ShowProgressBar = true;
@@ -192,10 +193,10 @@ namespace MonoDevelop.Components.MainToolbar
tracker.MouseMoved += (sender, e) => QueueDraw ();
tracker.HoveredChanged += (sender, e) => {
this.Animate ("Hovered",
- easing: Easing.SinInOut,
- start: renderArg.HoverProgress,
- end: tracker.Hovered ? 1.0f : 0.0f,
- callback: x => renderArg.HoverProgress = x);
+ x => renderArg.HoverProgress = x,
+ renderArg.HoverProgress,
+ tracker.Hovered ? 1.0f : 0.0f,
+ easing: Easing.SinInOut);
};
IdeApp.FocusIn += delegate {
@@ -214,6 +215,9 @@ namespace MonoDevelop.Components.MainToolbar
theme.Dispose ();
base.OnDestroyed ();
}
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
void StartBuildAnimation ()
{
@@ -231,9 +235,9 @@ namespace MonoDevelop.Components.MainToolbar
void StopBuildAnimation ()
{
this.Animate ("BuildOpacity",
- start: renderArg.BuildAnimationOpacity,
- end: 0.0f,
- callback: x => renderArg.BuildAnimationOpacity = x,
+ x => renderArg.BuildAnimationOpacity = x,
+ renderArg.BuildAnimationOpacity,
+ 0.0f,
finished: (val, aborted) => { if (!aborted) this.AbortAnimation ("Build"); });
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
index 757e3a7..0a702c8 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
@@ -117,7 +117,7 @@ namespace MonoDevelop.Components.MainToolbar
int text_x = progress_bar_x + Styles.ProgressBarInnerPadding;
int text_width = progress_bar_width - (Styles.ProgressBarInnerPadding * 2);
- float textTweenValue = arg.TextAnimationProgress;
+ double textTweenValue = arg.TextAnimationProgress;
if (arg.LastText != null) {
double opacity = Math.Max (0.0f, 1.0f - textTweenValue);
@@ -140,7 +140,7 @@ namespace MonoDevelop.Components.MainToolbar
CairoExtensions.RoundedRectangle (context, region.X + .5, region.Y + .5, region.Width - 1, region.Height - 1, rounding);
}
- void DrawBuildEffect (Cairo.Context context, Gdk.Rectangle area, float progress, float opacity)
+ void DrawBuildEffect (Cairo.Context context, Gdk.Rectangle area, double progress, double opacity)
{
context.Save ();
LayoutRoundedRectangle (context, area);
@@ -159,12 +159,12 @@ namespace MonoDevelop.Components.MainToolbar
new { Radius = 215, Thickness = 20, Speed = 2, ArcLength = Math.PI * 1.25 }
};
- float zmod = 1.0f;
- float zporg = progress;
+ double zmod = 1.0d;
+ double zporg = progress;
foreach (var arc in circles) {
- float zoom = 1.0f;
- zoom = (float) Math.Sin (zporg * Math.PI * 2 + zmod);
- zoom = ((zoom + 1) / 6.0f) + .05f;
+ double zoom = 1.0d;
+ zoom = (double) Math.Sin (zporg * Math.PI * 2 + zmod);
+ zoom = ((zoom + 1) / 6.0d) + .05d;
context.Rotate (Math.PI * 2 * progress * arc.Speed);
context.MoveTo (arc.Radius * zoom, 0);
@@ -260,15 +260,15 @@ namespace MonoDevelop.Components.MainToolbar
void DrawErrorAnimation (Cairo.Context context, StatusArea.RenderArg arg)
{
const int surfaceWidth = 2000;
- float opacity;
+ double opacity;
int progress;
if (arg.ErrorAnimationProgress < .5f) {
progress = (int) (arg.ErrorAnimationProgress * arg.Allocation.Width * 2.4);
- opacity = 1.0f;
+ opacity = 1.0d;
} else {
progress = (int) (arg.ErrorAnimationProgress * arg.Allocation.Width * 2.4);
- opacity = 1.0f - (arg.ErrorAnimationProgress - .5f) * 2;
+ opacity = 1.0d - (arg.ErrorAnimationProgress - .5d) * 2;
}
LayoutRoundedRectangle (context, arg.Allocation);
@@ -277,7 +277,7 @@ namespace MonoDevelop.Components.MainToolbar
context.CachedDraw (surface: ref errorSurface,
position: new Gdk.Point (arg.Allocation.X - surfaceWidth + progress, arg.Allocation.Y),
size: new Gdk.Size (surfaceWidth, arg.Allocation.Height),
- opacity: opacity,
+ opacity: (float)opacity,
draw: (c, o) => {
// The smaller the pixel range of our gradient the less error there will be in it.
using (var lg = new LinearGradient (surfaceWidth - 250, 0, surfaceWidth, 0)) {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
index 6b75d8e..5bdeddd 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
@@ -273,7 +273,7 @@ namespace MonoDevelop.Components.PropertyGrid
base.OnSizeAllocated (allocation);
int y = 0;
MeasureHeight (rows, ref y);
- if (currentEditorRow != null)
+ if (currentEditor != null && currentEditorRow != null)
children [currentEditor] = currentEditorRow.EditorBounds;
foreach (var cr in children) {
var r = cr.Value;
@@ -371,11 +371,12 @@ namespace MonoDevelop.Components.PropertyGrid
if (r.IsCategory) {
var rh = h + CategoryTopBottomPadding*2;
ctx.Rectangle (0, y, Allocation.Width, rh);
- Cairo.LinearGradient gr = new LinearGradient (0, y, 0, rh);
- gr.AddColorStop (0, new Cairo.Color (248d/255d, 248d/255d, 248d/255d));
- gr.AddColorStop (1, new Cairo.Color (240d/255d, 240d/255d, 240d/255d));
- ctx.Pattern = gr;
- ctx.Fill ();
+ using (var gr = new LinearGradient (0, y, 0, rh)) {
+ gr.AddColorStop (0, new Cairo.Color (248d/255d, 248d/255d, 248d/255d));
+ gr.AddColorStop (1, new Cairo.Color (240d/255d, 240d/255d, 240d/255d));
+ ctx.Pattern = gr;
+ ctx.Fill ();
+ }
if (lastCategory == null || lastCategory.Expanded || lastCategory.AnimatingExpand) {
ctx.MoveTo (0, y + 0.5);
@@ -572,9 +573,21 @@ namespace MonoDevelop.Components.PropertyGrid
if (row != null) {
tooltipWindow = new TooltipPopoverWindow ();
tooltipWindow.ShowArrow = true;
- var s = "<b>" + row.Property.DisplayName + "</b>\n\n";
- s += GLib.Markup.EscapeText (row.Property.Description);
- tooltipWindow.Markup = s;
+ var s = new System.Text.StringBuilder ("<b>" + row.Property.DisplayName + "</b>");
+ s.AppendLine ();
+ s.AppendLine ();
+ s.Append (GLib.Markup.EscapeText (row.Property.Description));
+ if (row.Property.Converter.CanConvertTo (typeof(string))) {
+ var value = Convert.ToString (row.Property.GetValue (row.Instace));
+ if (!string.IsNullOrEmpty (value)) {
+ const int chunkLength = 200;
+ var multiLineValue = string.Join (Environment.NewLine, Enumerable.Range (0, (int)Math.Ceiling ((double)value.Length / chunkLength)).Select (n => string.Concat (value.Skip (n * chunkLength).Take (chunkLength))));
+ s.AppendLine ();
+ s.AppendLine ();
+ s.Append ("Value: " + multiLineValue);
+ }
+ }
+ tooltipWindow.Markup = s.ToString ();
tooltipWindow.ShowPopup (this, new Gdk.Rectangle (0, row.EditorBounds.Y, Allocation.Width, row.EditorBounds.Height), PopupPosition.Right);
}
}
@@ -653,6 +666,7 @@ namespace MonoDevelop.Components.PropertyGrid
if (editSession != null) {
Remove (currentEditor);
currentEditor.Destroy ();
+ currentEditor = null;
editSession.Dispose ();
editSession = null;
currentEditorRow = null;
@@ -666,6 +680,9 @@ namespace MonoDevelop.Components.PropertyGrid
currentEditorRow = row;
var cell = GetCell (row);
editSession = cell.StartEditing (row.EditorBounds, State);
+ if (editSession == null)
+ return;
+
currentEditor = (Gtk.Widget) editSession.Editor;
Add (currentEditor);
SetAllocation (currentEditor, row.EditorBounds);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Theming/GtkTheme.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Theming/GtkTheme.cs
index 286ad26..4c3dd75 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components.Theming/GtkTheme.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components.Theming/GtkTheme.cs
@@ -158,40 +158,40 @@ namespace MonoDevelop.Components.Theming
public override void DrawColumnHighlight (Cairo.Context cr, Gdk.Rectangle alloc, Cairo.Color color)
{
- Cairo.Color light_color = CairoExtensions.ColorShade (color, 1.6);
- Cairo.Color dark_color = CairoExtensions.ColorShade (color, 1.3);
+ Color light_color = CairoExtensions.ColorShade (color, 1.6);
+ Color dark_color = CairoExtensions.ColorShade (color, 1.3);
- LinearGradient grad = new LinearGradient (alloc.X, alloc.Y, alloc.X, alloc.Bottom - 1);
- grad.AddColorStop (0, light_color);
- grad.AddColorStop (1, dark_color);
-
- cr.Pattern = grad;
- cr.Rectangle (alloc.X + 1.5, alloc.Y + 1.5, alloc.Width - 3, alloc.Height - 2);
- cr.Fill ();
- grad.Destroy ();
+ using (var grad = new LinearGradient (alloc.X, alloc.Y, alloc.X, alloc.Bottom - 1)) {
+ grad.AddColorStop (0, light_color);
+ grad.AddColorStop (1, dark_color);
+
+ cr.Pattern = grad;
+ cr.Rectangle (alloc.X + 1.5, alloc.Y + 1.5, alloc.Width - 3, alloc.Height - 2);
+ cr.Fill ();
+ }
}
public override void DrawHeaderBackground (Cairo.Context cr, Gdk.Rectangle alloc)
{
- Cairo.Color gtk_background_color = Colors.GetWidgetColor (GtkColorClass.Background, StateType.Normal);
- Cairo.Color light_color = CairoExtensions.ColorShade (gtk_background_color, 1.1);
- Cairo.Color dark_color = CairoExtensions.ColorShade (gtk_background_color, 0.95);
+ Color gtk_background_color = Colors.GetWidgetColor (GtkColorClass.Background, StateType.Normal);
+ Color light_color = CairoExtensions.ColorShade (gtk_background_color, 1.1);
+ Color dark_color = CairoExtensions.ColorShade (gtk_background_color, 0.95);
CairoCorners corners = CairoCorners.TopLeft | CairoCorners.TopRight;
- LinearGradient grad = new LinearGradient (alloc.X, alloc.Y, alloc.X, alloc.Bottom);
- grad.AddColorStop (0, light_color);
- grad.AddColorStop (0.75, dark_color);
- grad.AddColorStop (0, light_color);
-
- cr.Pattern = grad;
- CairoExtensions.RoundedRectangle (cr, alloc.X, alloc.Y, alloc.Width, alloc.Height, Context.Radius, corners);
- cr.Fill ();
+ using (LinearGradient grad = new LinearGradient (alloc.X, alloc.Y, alloc.X, alloc.Bottom)) {
+ grad.AddColorStop (0, light_color);
+ grad.AddColorStop (0.75, dark_color);
+ grad.AddColorStop (0, light_color);
+
+ cr.Pattern = grad;
+ CairoExtensions.RoundedRectangle (cr, alloc.X, alloc.Y, alloc.Width, alloc.Height, Context.Radius, corners);
+ cr.Fill ();
+ }
cr.Color = border_color;
cr.Rectangle (alloc.X, alloc.Bottom, alloc.Width, BorderWidth);
cr.Fill ();
- grad.Destroy ();
}
public override void DrawColumnHeaderFocus (Cairo.Context cr, Gdk.Rectangle alloc)
@@ -274,15 +274,15 @@ namespace MonoDevelop.Components.Theming
selection_fill_light.A = color.A;
selection_fill_dark.A = color.A;
- LinearGradient grad = new LinearGradient (x, y, x, y + height);
- grad.AddColorStop (0, selection_fill_light);
- grad.AddColorStop (0.4, selection_fill_dark);
- grad.AddColorStop (1, selection_fill_light);
-
- cr.Pattern = grad;
- CairoExtensions.RoundedRectangle (cr, x, y, width, height, Context.Radius, corners, true);
- cr.Fill ();
- grad.Destroy ();
+ using (LinearGradient grad = new LinearGradient (x, y, x, y + height)) {
+ grad.AddColorStop (0, selection_fill_light);
+ grad.AddColorStop (0.4, selection_fill_dark);
+ grad.AddColorStop (1, selection_fill_light);
+
+ cr.Pattern = grad;
+ CairoExtensions.RoundedRectangle (cr, x, y, width, height, Context.Radius, corners, true);
+ cr.Fill ();
+ }
}
if (filled && stroked) {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs
index d963b2e..9aeb429 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs
@@ -654,30 +654,72 @@ namespace MonoDevelop.Components
public class QuartzSurface : Cairo.Surface
{
+ const string CoreGraphics = "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics";
+
[DllImport ("libcairo-2.dll", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr cairo_quartz_surface_create(Cairo.Format format, uint width, uint height);
+ static extern IntPtr cairo_quartz_surface_create (Cairo.Format format, uint width, uint height);
[DllImport ("libcairo-2.dll", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr cairo_quartz_surface_get_cg_context(IntPtr surface);
+ static extern IntPtr cairo_quartz_surface_get_cg_context (IntPtr surface);
[DllImport ("libcairo-2.dll", CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr cairo_get_target(IntPtr context);
+ static extern IntPtr cairo_get_target (IntPtr context);
+
+ [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
+ static extern CGRect32 CGContextConvertRectToDeviceSpace32 (IntPtr contextRef, CGRect32 cgrect);
- [DllImport ("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics", CallingConvention = CallingConvention.Cdecl)]
- public static extern System.Drawing.RectangleF CGContextConvertRectToDeviceSpace (IntPtr contextRef, System.Drawing.RectangleF cgrect);
+ [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
+ static extern CGRect64 CGContextConvertRectToDeviceSpace64 (IntPtr contextRef, CGRect64 cgrect);
public static double GetRetinaScale (Cairo.Context context) {
if (!Platform.IsMac)
return 1;
- var rect = new System.Drawing.RectangleF ();
// Use C call to avoid dispose bug in cairo bindings for OSX
var cgContext = cairo_quartz_surface_get_cg_context (cairo_get_target (context.Handle));
- var unitRect = new System.Drawing.RectangleF (1, 1, 1, 1);
- rect = CGContextConvertRectToDeviceSpace (cgContext, unitRect);
+ if (IntPtr.Size == 8)
+ return CGContextConvertRectToDeviceSpace64 (cgContext, CGRect64.Unit).X;
+
+ return CGContextConvertRectToDeviceSpace32 (cgContext, CGRect32.Unit).X;
+ }
+
+ struct CGRect32
+ {
+ public CGRect32 (float x, float y, float width, float height)
+ {
+ this.X = x;
+ this.Y = y;
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public float X, Y, Width, Height;
+
+ public static CGRect32 Unit {
+ get {
+ return new CGRect32 (1, 1, 1, 1);
+ }
+ }
+ }
- return rect.X;
+ struct CGRect64
+ {
+ public CGRect64 (double x, double y, double width, double height)
+ {
+ this.X = x;
+ this.Y = y;
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public double X, Y, Width, Height;
+
+ public static CGRect64 Unit {
+ get {
+ return new CGRect64 (1, 1, 1, 1);
+ }
+ }
}
public QuartzSurface (Cairo.Format format, int width, int height)
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
index ed28f8b..1306e2c 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
@@ -88,6 +88,9 @@ namespace MonoDevelop.Components
base.OnMapped ();
Gdk.Pointer.Grab (this.GdkWindow, true, Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask | Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask, null, null, Gtk.Global.CurrentEventTime);
Gtk.Grab.Add (this);
+ this.GrabBrokenEvent += delegate {
+ Destroy ();
+ };
}
protected override void OnUnmapped ()
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/FixedWidthWrapLabel.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/FixedWidthWrapLabel.cs
index 532e571..ba06864 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/FixedWidthWrapLabel.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/FixedWidthWrapLabel.cs
@@ -86,18 +86,13 @@ namespace MonoDevelop.Components
layout = new Pango.Layout (PangoContext);
if (FontDescription != null)
layout.FontDescription = FontDescription;
- if (use_markup) {
- layout.SetMarkup (brokentext != null? brokentext : (text ?? string.Empty));
- } else {
- layout.SetText (brokentext != null? brokentext : (text ?? string.Empty));
- }
layout.Indent = (int) (indent * Pango.Scale.PangoScale);
layout.Wrap = wrapMode;
if (width >= 0)
layout.Width = (int)(width * Pango.Scale.PangoScale);
else
layout.Width = int.MaxValue;
- QueueResize ();
+ SetLayoutMarkupAndResize ();
}
protected override void OnDestroyed ()
@@ -236,12 +231,25 @@ namespace MonoDevelop.Components
}
}
}
+
+ void SetLayoutMarkupAndResize ()
+ {
+ if (layout != null) {
+ if (use_markup) {
+ layout.SetMarkup (brokentext ?? (text ?? string.Empty));
+ }
+ else {
+ layout.SetText (brokentext ?? (text ?? string.Empty));
+ }
+ }
+ QueueResize ();
+ }
void breakText ()
{
brokentext = null;
if ((!breakOnCamelCasing && !breakOnPunctuation) || string.IsNullOrEmpty (text)) {
- QueueResize ();
+ SetLayoutMarkupAndResize ();
return;
}
@@ -310,14 +318,7 @@ namespace MonoDevelop.Components
}
brokentext = sb.ToString ();
- if (layout != null) {
- if (use_markup) {
- layout.SetMarkup (brokentext != null? brokentext : (text ?? string.Empty));
- } else {
- layout.SetText (brokentext != null? brokentext : (text ?? string.Empty));
- }
- }
- QueueResize ();
+ SetLayoutMarkupAndResize ();
}
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
index c1ca184..3e2e8f4 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
@@ -71,7 +71,7 @@ namespace MonoDevelop.Components
public static Gtk.Widget ToGtkWidget (this Xwt.Widget widget)
{
- return (Gtk.Widget) Xwt.Engine.WidgetRegistry.GetNativeWidget (widget);
+ return (Gtk.Widget) Xwt.Toolkit.CurrentEngine.GetNativeWidget (widget);
}
public static void EnableAutoTooltips (this Gtk.TreeView tree)
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/HeaderBox.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/HeaderBox.cs
index 0b6d2ef..f8d3ac2 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/HeaderBox.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/HeaderBox.cs
@@ -170,14 +170,16 @@ namespace MonoDevelop.Components
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
- Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Bottom);
- Cairo.Color color1 = gcol;
- pat.AddColorStop (0, color1);
- gcol.L -= 0.1;
- if (gcol.L < 0) gcol.L = 0;
- pat.AddColorStop (1, gcol);
- cr.Pattern = pat;
- cr.FillPreserve ();
+ using (Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Bottom)) {
+ Cairo.Color color1 = gcol;
+ pat.AddColorStop (0, color1);
+ gcol.L -= 0.1;
+ if (gcol.L < 0)
+ gcol.L = 0;
+ pat.AddColorStop (1, gcol);
+ cr.Pattern = pat;
+ cr.FillPreserve ();
+ }
}
} else if (BackgroundColor != null) {
using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
@@ -214,11 +216,12 @@ namespace MonoDevelop.Components
if (showTopShadow) {
using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
cr.Rectangle (Allocation.X, Allocation.Y, Allocation.Width, shadowSize);
- Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Y + shadowSize);
- pat.AddColorStop (0, new Cairo.Color (0, 0, 0, shadowStrengh));
- pat.AddColorStop (1, new Cairo.Color (0, 0, 0, 0));
- cr.Pattern = pat;
- cr.Fill ();
+ using (Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Y + shadowSize)) {
+ pat.AddColorStop (0, new Cairo.Color (0, 0, 0, shadowStrengh));
+ pat.AddColorStop (1, new Cairo.Color (0, 0, 0, 0));
+ cr.Pattern = pat;
+ cr.Fill ();
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWidget.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWidget.cs
index e8d6b20..bbd72a8 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWidget.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWidget.cs
@@ -27,10 +27,11 @@
using System;
using Gtk;
using Gdk;
+using Xwt.Motion;
namespace MonoDevelop.Components
{
- public class PopoverWidget: Gtk.EventBox, Animatable
+ public class PopoverWidget: Gtk.EventBox, IAnimatable
{
PopoverWindowTheme theme;
@@ -66,6 +67,9 @@ namespace MonoDevelop.Components
UpdatePadding ();
}
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
public bool EnableAnimation { get; set; }
@@ -125,13 +129,13 @@ namespace MonoDevelop.Components
targetSize = size;
Gdk.Size start = paintSize;
- Func<float, Gdk.Size> transform = x => new Gdk.Size ((int)(start.Width + (size.Width - start.Width) * x),
+ Func<double, Gdk.Size> transform = x => new Gdk.Size ((int)(start.Width + (size.Width - start.Width) * x),
(int)(start.Height + (size.Height - start.Height) * x));
this.Animate ("Resize",
+ transform,
+ s => paintSize = s,
length: 150,
easing: Easing.SinInOut,
- transform: transform,
- callback: s => paintSize = s,
finished: (x, aborted) => { if (!aborted) MaybeReanimate(); });
QueueResize ();
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs
index 37a1627..a29e7b3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs
@@ -29,10 +29,11 @@ using MonoDevelop.Ide;
using MonoDevelop.Ide.Gui;
using Mono.TextEditor;
using Gdk;
+using Xwt.Motion;
namespace MonoDevelop.Components
{
- public class PopoverWindow : Gtk.Window, Animatable
+ public class PopoverWindow : Gtk.Window, IAnimatable
{
PopoverWindowTheme theme;
@@ -140,6 +141,9 @@ namespace MonoDevelop.Components
RepositionWindow ();
}
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
public void AnimatedResize ()
{
@@ -162,13 +166,13 @@ namespace MonoDevelop.Components
targetSize = size;
Gdk.Size start = paintSize;
- Func<float, Gdk.Size> transform = x => new Gdk.Size ((int)(start.Width + (size.Width - start.Width) * x),
+ Func<double, Gdk.Size> transform = x => new Gdk.Size ((int)(start.Width + (size.Width - start.Width) * x),
(int)(start.Height + (size.Height - start.Height) * x));
this.Animate ("Resize",
+ transform,
+ s => paintSize = s,
length: 150,
easing: Easing.SinInOut,
- transform: transform,
- callback: s => paintSize = s,
finished: (x, aborted) => { if (!aborted) MaybeReanimate(); });
QueueResize ();
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/SectionList.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/SectionList.cs
index 89d2541..8f31637 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/SectionList.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Components/SectionList.cs
@@ -303,54 +303,57 @@ namespace MonoDevelop.Components
cr.Translate (borderLineWidth, borderLineWidth);
w = w - (2 * borderLineWidth);
- var unselectedGrad = new LinearGradient (0, 0, 0, headerHeight);
- var unselectedCol = Convert (Style.Mid (StateType.Normal));
- var unselectedTextCol = Convert (Style.Text (StateType.Normal));
- unselectedCol.A = 0.6;
- unselectedGrad.AddColorStop (0, unselectedCol);
- unselectedCol.A = 1;
- unselectedGrad.AddColorStop (1, unselectedCol);
-
- var hoverGrad = new LinearGradient (0, 0, 0, headerHeight);
- var hoverCol = Convert (Style.Mid (StateType.Prelight));
- var hoverTextCol = Convert (Style.Text (StateType.Prelight));
- hoverCol.A = 0.6;
- hoverGrad.AddColorStop (0, unselectedCol);
- hoverCol.A = 1;
- hoverGrad.AddColorStop (1, unselectedCol);
-
- var selectedGrad = new LinearGradient (0, 0, 0, headerHeight);
- var selectedCol = Convert (Style.Mid (StateType.Normal));
- var selectedTextCol = Convert (Style.Text (StateType.Normal));
- selectedCol.A = 0.6;
- selectedGrad.AddColorStop (0, selectedCol);
- selectedCol.A = 1;
- selectedGrad.AddColorStop (1, selectedCol);
-
- for (int i = 0; i < sections.Count; i++) {
- var section = sections[i];
- bool isActive = activeIndex == i;
- bool isHover = hoverIndex == i;
-
- cr.Rectangle (0, 0, w, headerHeight);
- cr.Pattern = isActive? selectedGrad : (isHover? hoverGrad : unselectedGrad);
- cr.Fill ();
-
- cr.Color = isActive? selectedTextCol : (isHover? hoverTextCol : unselectedTextCol);
- layout.SetText (section.Title);
- layout.Ellipsize = Pango.EllipsizeMode.End;
- layout.Width = (int) ((w - headerPadding - headerPadding) * Pango.Scale.PangoScale);
- cr.MoveTo (headerPadding, headerPadding);
- PangoCairoHelper.ShowLayout (cr, layout);
-
- cr.MoveTo (-halfLineWidth, i > activeIndex? -halfLineWidth : headerHeight + halfLineWidth);
- cr.RelLineTo (w + borderLineWidth, 0.0);
- cr.Color = borderCol;
- cr.Stroke ();
+ using (LinearGradient unselectedGrad = new LinearGradient (0, 0, 0, headerHeight),
+ hoverGrad = new LinearGradient (0, 0, 0, headerHeight),
+ selectedGrad = new LinearGradient (0, 0, 0, headerHeight)
+ )
+ {
+ var unselectedCol = Convert (Style.Mid (StateType.Normal));
+ var unselectedTextCol = Convert (Style.Text (StateType.Normal));
+ unselectedCol.A = 0.6;
+ unselectedGrad.AddColorStop (0, unselectedCol);
+ unselectedCol.A = 1;
+ unselectedGrad.AddColorStop (1, unselectedCol);
+
+ var hoverCol = Convert (Style.Mid (StateType.Prelight));
+ var hoverTextCol = Convert (Style.Text (StateType.Prelight));
+ hoverCol.A = 0.6;
+ hoverGrad.AddColorStop (0, unselectedCol);
+ hoverCol.A = 1;
+ hoverGrad.AddColorStop (1, unselectedCol);
+
+ var selectedCol = Convert (Style.Mid (StateType.Normal));
+ var selectedTextCol = Convert (Style.Text (StateType.Normal));
+ selectedCol.A = 0.6;
+ selectedGrad.AddColorStop (0, selectedCol);
+ selectedCol.A = 1;
+ selectedGrad.AddColorStop (1, selectedCol);
- cr.Translate (0, headerHeight + borderLineWidth);
- if (isActive)
- cr.Translate (0, section.Child.Allocation.Height + borderLineWidth);
+ for (int i = 0; i < sections.Count; i++) {
+ var section = sections[i];
+ bool isActive = activeIndex == i;
+ bool isHover = hoverIndex == i;
+
+ cr.Rectangle (0, 0, w, headerHeight);
+ cr.Pattern = isActive? selectedGrad : (isHover? hoverGrad : unselectedGrad);
+ cr.Fill ();
+
+ cr.Color = isActive? selectedTextCol : (isHover? hoverTextCol : unselectedTextCol);
+ layout.SetText (section.Title);
+ layout.Ellipsize = Pango.EllipsizeMode.End;
+ layout.Width = (int) ((w - headerPadding - headerPadding) * Pango.Scale.PangoScale);
+ cr.MoveTo (headerPadding, headerPadding);
+ PangoCairoHelper.ShowLayout (cr, layout);
+
+ cr.MoveTo (-halfLineWidth, i > activeIndex? -halfLineWidth : headerHeight + halfLineWidth);
+ cr.RelLineTo (w + borderLineWidth, 0.0);
+ cr.Color = borderCol;
+ cr.Stroke ();
+
+ cr.Translate (0, headerHeight + borderLineWidth);
+ if (isActive)
+ cr.Translate (0, section.Child.Allocation.Height + borderLineWidth);
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tweener.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tweener.cs
deleted file mode 100644
index 31094c3..0000000
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tweener.cs
+++ /dev/null
@@ -1,430 +0,0 @@
-//
-// Tweener.cs
-//
-// Author:
-// Jason Smith <jason.smith at xamarin.com>
-//
-// Copyright (c) 2012 Xamarin Inc.
-//
-// 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.Diagnostics;
-
-namespace MonoDevelop.Components
-{
-
- public static class Easing
- {
- public static readonly Func<float, float> Linear = x => x;
-
- public static readonly Func<float, float> SinOut = x => (float)Math.Sin (x * Math.PI * 0.5f);
- public static readonly Func<float, float> SinIn = x => 1.0f - (float)Math.Cos (x * Math.PI * 0.5f);
- public static readonly Func<float, float> SinInOut = x => -(float)Math.Cos (Math.PI * x) / 2.0f + 0.5f;
-
- public static readonly Func<float, float> CubicIn = x => x * x * x;
- public static readonly Func<float, float> CubicOut = x => (float)Math.Pow (x - 1.0f, 3.0f) + 1.0f;
- public static readonly Func<float, float> CubicInOut = x => x < 0.5f ? (float)Math.Pow (x * 2.0f, 3.0f) / 2.0f :
- (float)(Math.Pow ((x-1)*2.0f, 3.0f) + 2.0f) / 2.0f;
-
- public static readonly Func<float, float> BounceOut;
- public static readonly Func<float, float> BounceIn;
-
- public static readonly Func<float, float> SpringIn = x => x * x * ((1.70158f + 1) * x - 1.70158f);
- public static readonly Func<float, float> SpringOut = x => (x - 1) * (x - 1) * ((1.70158f + 1) * (x - 1) + 1.70158f) + 1;
-
- static Easing ()
- {
- BounceOut = p => {
- if (p < (1 / 2.75f))
- {
- return 7.5625f * p * p;
- }
- else if (p < (2 / 2.75f))
- {
- p -= (1.5f / 2.75f);
-
- return 7.5625f * p * p + .75f;
- }
- else if (p < (2.5f / 2.75f))
- {
- p -= (2.25f / 2.75f);
-
- return 7.5625f * p * p + .9375f;
- }
- else
- {
- p -= (2.625f / 2.75f);
-
- return 7.5625f * p * p + .984375f;
- }
- };
-
- BounceIn = p => 1.0f - BounceOut (p);
- }
- }
-
- public interface Animatable
- {
- void QueueDraw ();
- }
-
- public class Animation : System.Collections.IEnumerable
- {
- float beginAt;
- float finishAt;
- Func<float, float> easing;
- Action<float> step;
- List<Animation> children;
- Action finished;
- bool finishedTriggered;
-
- public Animation ()
- {
- children = new List<Animation> ();
- easing = Easing.Linear;
- step = f => {};
- }
-
- public Animation (Action<float> callback, float start = 0.0f, float end = 1.0f, Func<float, float> easing = null, Action finished = null)
- {
- children = new List<Animation> ();
- this.easing = easing ?? Components.Easing.Linear;
- this.finished = finished;
-
- var transform = AnimationExtensions.Interpolate (start, end);
- step = f => callback (transform (f));
- }
-
- public System.Collections.IEnumerator GetEnumerator ()
- {
- return children.GetEnumerator ();
- }
-
- public Animation Insert (float beginAt, float finishAt, Animation animation)
- {
- Add (beginAt, finishAt, animation);
- return this;
- }
-
- public void Commit (Animatable owner, string name, uint rate = 16, uint length = 250,
- Func<float, float> easing = null, Action<float, bool> finished = null, Func<bool> repeat = null)
- {
- owner.Animate (name, this, rate, length, easing, finished, repeat);
- }
-
- public void Add (float beginAt, float finishAt, Animation animation)
- {
- if (beginAt < 0 || beginAt > 1)
- throw new ArgumentOutOfRangeException ("beginAt");
-
- if (finishAt < 0 || finishAt > 1)
- throw new ArgumentOutOfRangeException ("finishAt");
-
- if (finishAt <= beginAt)
- throw new ArgumentException ("finishAt must be greater than beginAt");
-
- animation.beginAt = beginAt;
- animation.finishAt = finishAt;
- children.Add (animation);
- }
-
- public Animation WithConcurrent (Animation animation, float beginAt = 0.0f, float finishAt = 1.0f)
- {
- animation.beginAt = beginAt;
- animation.finishAt = finishAt;
- children.Add (animation);
- return this;
- }
-
- public Animation WithConcurrent (Action<float> callback, float start = 0.0f, float end = 1.0f, Func<float, float> easing = null, float beginAt = 0.0f, float finishAt = 1.0f)
- {
- Animation child = new Animation (callback, start, end, easing);
- child.beginAt = beginAt;
- child.finishAt = finishAt;
- children.Add (child);
- return this;
- }
-
- public Action<float> GetCallback ()
- {
- Action<float> result = f => {
- step (easing (f));
- foreach (var animation in children) {
- if (animation.finishedTriggered)
- continue;
-
- float val = Math.Max (0.0f, Math.Min (1.0f, (f - animation.beginAt) / (animation.finishAt - animation.beginAt)));
-
- if (val <= 0.0f) // not ready to process yet
- continue;
-
- var callback = animation.GetCallback ();
- callback (val);
-
- if (val >= 1.0f) {
- animation.finishedTriggered = true;
- if (animation.finished != null)
- animation.finished ();
- }
- }
- };
- return result;
- }
- }
-
- public static class AnimationExtensions
- {
- class Info
- {
- public Func<float, float> Easing { get; set; }
- public uint Rate { get; set; }
- public uint Length { get; set; }
- public Animatable Owner { get; set; }
- public Action<float> callback;
- public Action<float, bool> finished;
- public Func<bool> repeat;
- public Tweener tweener;
- }
-
- static Dictionary<string, Info> animations;
-
- static AnimationExtensions ()
- {
- animations = new Dictionary<string, Info> ();
- }
-
- public static void Animate (this Animatable self, string name, Animation animation, uint rate = 16, uint length = 250,
- Func<float, float> easing = null, Action<float, bool> finished = null, Func<bool> repeat = null)
- {
- self.Animate (name, animation.GetCallback (), rate, length, easing, finished, repeat);
- }
-
- public static Func<float, float> Interpolate (float start, float end = 1.0f, float reverseVal = 0.0f, bool reverse = false)
- {
- float target = (reverse ? reverseVal : end);
- return x => start + (target - start) * x;
- }
-
- public static void Animate (this Animatable self, string name, Action<float> callback, float start, float end, uint rate = 16, uint length = 250,
- Func<float, float> easing = null, Action<float, bool> finished = null, Func<bool> repeat = null)
- {
- self.Animate<float> (name, Interpolate (start, end), callback, rate, length, easing, finished, repeat);
- }
-
- public static void Animate (this Animatable self, string name, Action<float> callback, uint rate = 16, uint length = 250,
- Func<float, float> easing = null, Action<float, bool> finished = null, Func<bool> repeat = null)
- {
- self.Animate<float> (name, x => x, callback, rate, length, easing, finished, repeat);
- }
-
- public static void Animate<T> (this Animatable self, string name, Func<float, T> transform, Action<T> callback, uint rate = 16, uint length = 250,
- Func<float, float> easing = null, Action<T, bool> finished = null, Func<bool> repeat = null)
- {
- if (transform == null)
- throw new ArgumentNullException ("transform");
- if (callback == null)
- throw new ArgumentNullException ("callback");
- if (self == null)
- throw new ArgumentNullException ("widget");
-
- self.AbortAnimation (name);
- name += self.GetHashCode ().ToString ();
-
- Action<float> step = f => callback (transform(f));
- Action<float, bool> final = null;
- if (finished != null)
- final = (f, b) => finished (transform(f), b);
-
- var info = new Info {
- Rate = rate,
- Length = length,
- Easing = easing ?? Easing.Linear
- };
-
- Tweener tweener = new Tweener (info.Length, info.Rate);
- tweener.Easing = info.Easing;
- tweener.Handle = name;
- tweener.ValueUpdated += HandleTweenerUpdated;
- tweener.Finished += HandleTweenerFinished;
-
- info.tweener = tweener;
- info.callback = step;
- info.finished = final;
- info.repeat = repeat ?? (() => false);
- info.Owner = self;
-
- animations[name] = info;
- tweener.Start ();
-
- info.callback (0.0f);
- }
-
- public static bool AbortAnimation (this Animatable self, string handle)
- {
- handle += self.GetHashCode ().ToString ();
- if (!animations.ContainsKey (handle))
- return false;
-
- Info info = animations[handle];
- info.tweener.ValueUpdated -= HandleTweenerUpdated;
- info.tweener.Finished -= HandleTweenerFinished;
- info.tweener.Stop ();
-
- animations.Remove (handle);
- if (info.finished != null)
- info.finished (1.0f, true);
- return true;
- }
-
- public static bool AnimationIsRunning (this Animatable self, string handle)
- {
- handle += self.GetHashCode ().ToString ();
- return animations.ContainsKey (handle);
- }
-
- static void HandleTweenerUpdated (object o, EventArgs args)
- {
- Tweener tweener = o as Tweener;
- Info info = animations[tweener.Handle];
-
- info.callback (tweener.Value);
- info.Owner.QueueDraw ();
- }
-
- static void HandleTweenerFinished (object o, EventArgs args)
- {
- Tweener tweener = o as Tweener;
- Info info = animations[tweener.Handle];
-
- bool repeat = info.repeat ();
-
- info.callback (tweener.Value);
-
- if (!repeat) {
- animations.Remove (tweener.Handle);
- tweener.ValueUpdated -= HandleTweenerUpdated;
- tweener.Finished -= HandleTweenerFinished;
- }
-
- if (info.finished != null)
- info.finished (tweener.Value, false);
- info.Owner.QueueDraw ();
-
- if (repeat) {
- tweener.Start ();
- }
- }
- }
-
- class Tweener
- {
- public uint Length { get; private set; }
- public uint Rate { get; private set; }
- public float Value { get; private set; }
- public Func<float, float> Easing { get; set; }
- public bool Loop { get; set; }
- public string Handle { get; set; }
-
- public bool IsRunning {
- get { return runningTime.IsRunning; }
- }
-
- public event EventHandler ValueUpdated;
- public event EventHandler Finished;
-
- Stopwatch runningTime;
- uint timeoutHandle;
-
- public Tweener (uint length, uint rate)
- {
- Value = 0.0f;
- Length = length;
- Loop = false;
- Rate = rate;
- runningTime = new Stopwatch ();
- Easing = Components.Easing.Linear;
- }
-
- ~Tweener ()
- {
- if (timeoutHandle > 0)
- GLib.Source.Remove (timeoutHandle);
- }
-
- public void Start ()
- {
- Pause ();
-
- runningTime.Start ();
- timeoutHandle = GLib.Timeout.Add (Rate, () => {
- float rawValue = Math.Min (1.0f, runningTime.ElapsedMilliseconds / (float) Length);
- Value = Easing (rawValue);
- if (ValueUpdated != null)
- ValueUpdated (this, EventArgs.Empty);
-
- if (rawValue >= 1.0f)
- {
- if (Loop) {
- Value = 0.0f;
- runningTime.Reset ();
- runningTime.Start ();
- return true;
- }
-
- runningTime.Stop ();
- runningTime.Reset ();
- timeoutHandle = 0;
- if (Finished != null)
- Finished (this, EventArgs.Empty);
- Value = 0.0f;
- return false;
- }
- return true;
- });
- }
-
- public void Stop ()
- {
- Pause ();
- runningTime.Reset ();
- Value = 1.0f;
- if (Finished != null)
- Finished (this, EventArgs.Empty);
- Value = 0.0f;
- }
-
- public void Reset ()
- {
- runningTime.Reset ();
- runningTime.Start ();
- }
-
- public void Pause ()
- {
- runningTime.Stop ();
-
- if (timeoutHandle > 0) {
- GLib.Source.Remove (timeoutHandle);
- timeoutHandle = 0;
- }
- }
- }
-}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
index d65a546..650db06 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
@@ -34,7 +34,7 @@ using ICSharpCode.NRefactory.Completion;
namespace MonoDevelop.Ide.CodeCompletion
{
- public class CompletionData : ICompletionData
+ public class CompletionData : ICompletionData, IComparable
{
protected CompletionData () {}
@@ -43,7 +43,21 @@ namespace MonoDevelop.Ide.CodeCompletion
public virtual string Description { get; set; }
public virtual string CompletionText { get; set; }
+ [Obsolete("Use GetDisplayDescription (bool isSelected)")]
public virtual string DisplayDescription { get; set; }
+
+ public virtual string GetDisplayDescription (bool isSelected)
+ {
+ return DisplayDescription;
+ }
+
+
+ public virtual string GetRightSideDescription (bool isSelected)
+ {
+ return "";
+ }
+
+
public virtual CompletionCategory CompletionCategory { get; set; }
public virtual DisplayFlags DisplayFlags { get; set; }
@@ -100,5 +114,26 @@ namespace MonoDevelop.Ide.CodeCompletion
{
return string.Format ("[CompletionData: Icon={0}, DisplayText={1}, Description={2}, CompletionText={3}, DisplayFlags={4}]", Icon, DisplayText, Description, CompletionText, DisplayFlags);
}
+
+ #region IComparable implementation
+
+ public virtual int CompareTo (object obj)
+ {
+ if (!(obj is ICompletionData))
+ return 0;
+ return Compare (this, (ICompletionData)obj);
+ }
+
+ public static int Compare (ICompletionData a, ICompletionData b)
+ {
+ var result = ((a.DisplayFlags & DisplayFlags.Obsolete) == (b.DisplayFlags & DisplayFlags.Obsolete))
+ ? StringComparer.OrdinalIgnoreCase.Compare (a.DisplayText, b.DisplayText)
+ : (a.DisplayFlags & DisplayFlags.Obsolete) != 0 ? 1 : -1;
+ if (result == 0)
+ result = StringComparer.OrdinalIgnoreCase.Compare (a.Description, b.Description);
+ return result;
+ }
+
+ #endregion
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
index 1d7e6a5..9d46bb1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
@@ -134,6 +134,9 @@ namespace MonoDevelop.Ide.CodeCompletion
HideDeclarationView ();
UpdateDeclarationView ();
};
+ List.WordsFiltered += delegate {
+ RepositionDeclarationViewWindow ();
+ };
}
bool completionListClosed;
@@ -145,6 +148,14 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
+ void ReleaseObjects ()
+ {
+ CompletionWidget = null;
+ CompletionDataList = null;
+
+ CodeCompletionContext = null;
+ }
+
protected override void OnDestroyed ()
{
if (declarationviewwindow != null) {
@@ -171,6 +182,7 @@ namespace MonoDevelop.Ide.CodeCompletion
declarationviewwindow.Destroy ();
declarationviewwindow = null;
}
+ ReleaseObjects ();
base.OnDestroyed ();
}
@@ -344,9 +356,9 @@ namespace MonoDevelop.Ide.CodeCompletion
{
public int Compare (ICompletionData a, ICompletionData b)
{
- return ((a.DisplayFlags & DisplayFlags.Obsolete) == (b.DisplayFlags & DisplayFlags.Obsolete))
- ? StringComparer.OrdinalIgnoreCase.Compare (a.DisplayText, b.DisplayText)
- : (a.DisplayFlags & DisplayFlags.Obsolete) != 0 ? 1 : -1;
+ if (a is IComparable && b is IComparable)
+ return ((IComparable)a).CompareTo (b);
+ return CompletionData.Compare (a, b);
}
}
@@ -367,7 +379,7 @@ namespace MonoDevelop.Ide.CodeCompletion
//which makes completion triggering noticeably more responsive
if (!completionDataList.IsSorted)
completionDataList.Sort (new DataItemComparer ());
-
+
Reposition (true);
return true;
}
@@ -469,6 +481,7 @@ namespace MonoDevelop.Ide.CodeCompletion
{
Hide ();
HideDeclarationView ();
+ ReleaseObjects ();
}
protected override void DoubleClick ()
@@ -530,6 +543,25 @@ namespace MonoDevelop.Ide.CodeCompletion
declarationViewTimer = 0;
}
}
+
+ void RepositionDeclarationViewWindow ()
+ {
+ if (declarationviewwindow == null || base.GdkWindow == null)
+ return;
+ var selectedItem = List.SelectedItem;
+ Gdk.Rectangle rect = List.GetRowArea (selectedItem);
+ if (rect.IsEmpty || rect.Bottom < (int)List.vadj.Value || rect.Y > List.Allocation.Height + (int)List.vadj.Value)
+ return;
+
+ declarationviewwindow.ShowArrow = true;
+ int ox;
+ int oy;
+ base.GdkWindow.GetOrigin (out ox, out oy);
+ declarationviewwindow.MaximumYTopBound = oy;
+ int y = rect.Y + Theme.Padding - (int)List.vadj.Value;
+ declarationviewwindow.ShowPopup (this, new Gdk.Rectangle (Gui.Styles.TooltipInfoSpacing, Math.Min (Allocation.Height, Math.Max (0, y)), Allocation.Width, rect.Height), PopupPosition.Left);
+ declarationViewHidden = false;
+ }
bool DelayedTooltipShow ()
{
@@ -571,24 +603,8 @@ namespace MonoDevelop.Ide.CodeCompletion
return false;
}
- Gdk.Rectangle rect = List.GetRowArea (selectedItem);
- if (rect.IsEmpty || rect.Bottom < (int)List.vadj.Value || rect.Y > List.Allocation.Height + (int)List.vadj.Value)
- return false;
-
if (declarationViewHidden && Visible) {
- declarationviewwindow.ShowArrow = true;
- int ox;
- int oy;
- base.GdkWindow.GetOrigin (out ox, out oy);
- declarationviewwindow.MaximumYTopBound = oy;
- int y = rect.Y + Theme.Padding - (int)List.vadj.Value;
- declarationviewwindow.ShowPopup (this,
- new Gdk.Rectangle (Gui.Styles.TooltipInfoSpacing,
- Math.Min (Allocation.Height, Math.Max (0, y)),
- Allocation.Width,
- rect.Height),
- PopupPosition.Left);
- declarationViewHidden = false;
+ RepositionDeclarationViewWindow ();
}
declarationViewTimer = 0;
@@ -619,11 +635,16 @@ namespace MonoDevelop.Ide.CodeCompletion
return completionDataList[n].DisplayText;
}
- string IListDataProvider.GetDescription (int n)
+ string IListDataProvider.GetDescription (int n, bool isSelected)
{
- return ((CompletionData)completionDataList[n]).DisplayDescription;
+ return ((CompletionData)completionDataList[n]).GetDisplayDescription (isSelected);
}
-
+
+ string IListDataProvider.GetRightSideDescription (int n, bool isSelected)
+ {
+ return ((CompletionData)completionDataList[n]).GetRightSideDescription (isSelected);
+ }
+
bool IListDataProvider.HasMarkup (int n)
{
return completionDataList[n].DisplayFlags.HasFlag (DisplayFlags.Obsolete);
@@ -643,6 +664,11 @@ namespace MonoDevelop.Ide.CodeCompletion
{
return completionDataList[n].CompletionText;
}
+ static DataItemComparer defaultComparer = new DataItemComparer ();
+ int IListDataProvider.CompareTo (int n, int m)
+ {
+ return defaultComparer.Compare (completionDataList [n], completionDataList [m]);
+ }
Gdk.Pixbuf IListDataProvider.GetIcon (int n)
{
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs
index 3c452be..df42eed 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs
@@ -36,7 +36,7 @@ namespace MonoDevelop.Ide.CodeCompletion
public static bool IsVisible {
get {
- return wnd != null /*&& wnd.Visible*/;
+ return wnd != null && wnd.Visible;
}
}
@@ -138,16 +138,20 @@ namespace MonoDevelop.Ide.CodeCompletion
{
if (!IsVisible)
return false;
+ if (keyChar != '\0') {
+ wnd.EndOffset = wnd.StartOffset + wnd.CurrentPartialWord.Length + 1;
+ }
return wnd.PreProcessKeyEvent (key, keyChar, modifier);
}
public static void UpdateCursorPosition ()
{
- if (!IsVisible)
+ if (!IsVisible)
return;
- if (wnd.CompletionWidget.CaretOffset < wnd.StartOffset)
- DestroyWindow ();
+ var caretOffset = wnd.CompletionWidget.CaretOffset;
+ if (caretOffset < wnd.StartOffset || caretOffset > wnd.EndOffset)
+ HideWindow ();
}
public static void UpdateWordSelection (string text)
@@ -179,9 +183,9 @@ namespace MonoDevelop.Ide.CodeCompletion
ParameterInformationWindowManager.UpdateWindow (wnd.Extension, wnd.CompletionWidget);
if (wnd.Extension != null)
wnd.Extension.document.Editor.FixVirtualIndentation ();
-// wnd.HideWindow ();
-// OnWindowClosed (EventArgs.Empty);
- DestroyWindow ();
+ wnd.HideWindow ();
+ OnWindowClosed (EventArgs.Empty);
+ //DestroyWindow ();
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
index 83af910..76b61c7 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
@@ -35,6 +35,7 @@ using Mono.TextEditor;
using Mono.TextEditor.Highlighting;
using MonoDevelop.Components;
using MonoDevelop.Ide.Fonts;
+using MonoDevelop.Ide.Gui.Content;
namespace MonoDevelop.Ide.CodeCompletion
{
@@ -320,12 +321,14 @@ namespace MonoDevelop.Ide.CodeCompletion
public void MoveCursor (int relative)
{
int newIndex = GetIndex (false, SelectedItem) + relative;
+ newIndex = Math.Min (filteredItems.Count - 1, Math.Max (0, newIndex));
+
int newSelection = GetItem (false, newIndex);
- if (newSelection < 0)
+ if (newSelection < 0)
return;
if (SelectedItem == newSelection && relative < 0) {
- SelectedItem = 0;
+ SelectedItem = GetItem (false, 0);
} else {
SelectedItem = newSelection;
}
@@ -482,16 +485,12 @@ namespace MonoDevelop.Ide.CodeCompletion
xpos = iconTextSpacing;
}
string markup = win.DataProvider.HasMarkup (item) ? (win.DataProvider.GetMarkup (item) ?? "<null>") : GLib.Markup.EscapeText (win.DataProvider.GetText (item) ?? "<null>");
- string description = win.DataProvider.GetDescription (item);
+ string description = win.DataProvider.GetDescription (item, item == SelectedItem);
if (string.IsNullOrEmpty (description)) {
layout.SetMarkup (markup);
} else {
- if (item == SelectedItem) {
- layout.SetMarkup (markup + " " + description);
- } else {
- layout.SetMarkup (markup + " <span foreground=\"darkgray\">" + description + "</span>");
- }
+ layout.SetMarkup (markup + " " + description);
}
string text = win.DataProvider.GetText (item);
@@ -550,6 +549,23 @@ namespace MonoDevelop.Ide.CodeCompletion
context.MoveTo (xpos + iconWidth + 2, typos);
PangoCairoHelper.ShowLayout (context, layout);
+ layout.SetMarkup ("");
+ if (layout.Attributes != null) {
+ layout.Attributes.Dispose ();
+ layout.Attributes = null;
+ }
+
+ string rightText = win.DataProvider.GetRightSideDescription (item, item == SelectedItem);
+ if (!string.IsNullOrEmpty (rightText)) {
+ layout.SetMarkup (rightText);
+ int w, h;
+ layout.GetPixelSize (out w, out h);
+ wi += w;
+ typos = h < rowHeight ? ypos + (rowHeight - h) / 2 : ypos;
+ context.MoveTo (Allocation.Width - w, typos);
+ PangoCairoHelper.ShowLayout (context, layout);
+ }
+
if (wi + xpos + iconWidth + 2 > listWidth) {
WidthRequest = listWidth = wi + xpos + iconWidth + 2 + iconTextSpacing;
win.ResetSizes ();
@@ -564,11 +580,6 @@ namespace MonoDevelop.Ide.CodeCompletion
}
- layout.SetMarkup ("");
- if (layout.Attributes != null) {
- layout.Attributes.Dispose ();
- layout.Attributes = null;
- }
return true;
});
@@ -631,12 +642,7 @@ namespace MonoDevelop.Ide.CodeCompletion
}
filteredItems.Sort (delegate (int left, int right) {
- var lt = win.DataProvider.GetText (left);
- var rt = win.DataProvider.GetText (right);
- var result = lt.CompareTo (rt);
- if (result == 0)
- return right.CompareTo (left);
- return result;
+ return win.DataProvider.CompareTo (left, right);
});
categories.Sort (delegate (Category left, Category right) {
return left.CompletionCategory != null ? left.CompletionCategory.CompareTo (right.CompletionCategory) : -1;
@@ -718,7 +724,6 @@ namespace MonoDevelop.Ide.CodeCompletion
requisition.Height += requisition.Height % rowHeight;
}
- const int maxVisibleRows = 7;
void CalcVisibleRows ()
{
@@ -727,7 +732,7 @@ namespace MonoDevelop.Ide.CodeCompletion
layout.GetPixelSize (out rowWidth, out rowHeight);
rowHeight = Math.Max (1, rowHeight * 3 / 2);
- int newHeight = rowHeight * maxVisibleRows;
+ int newHeight = rowHeight * CompletionTextEditorExtension.CompletionListRows;
if (Allocation.Height != listWidth || Allocation.Width != newHeight)
this.SetSizeRequest (listWidth, newHeight);
SetAdjustments ();
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWindow.cs
index 168a3be..f7dfb8d 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWindow.cs
@@ -123,7 +123,7 @@ namespace MonoDevelop.Ide.CodeCompletion
protected virtual void ResetState ()
{
HideWhenWordDeleted = false;
- endOffset = -1;
+ lastCommitCharEndoffset = -1;
list.ResetState ();
}
@@ -133,19 +133,21 @@ namespace MonoDevelop.Ide.CodeCompletion
{
list.CompletionString = PartialWord;
- if (IsRealized && !Visible)
+ var allocWidth = Allocation.Width;
+ if (IsRealized && !Visible) {
+ allocWidth = list.WidthRequest = WindowWidth;
Show ();
+ }
- int width = Math.Max (Allocation.Width, list.WidthRequest + Theme.CornerRadius * 2);
+ int width = Math.Max (allocWidth, list.WidthRequest + Theme.CornerRadius * 2);
int height = Math.Max (Allocation.Height, list.HeightRequest + 2 + (footer != null ? footer.Allocation.Height : 0) + Theme.CornerRadius * 2);
-
SetSizeRequest (width, height);
if (IsRealized)
Resize (width, height);
}
- public IListDataProvider DataProvider {
+ internal IListDataProvider DataProvider {
get;
set;
}
@@ -199,11 +201,22 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
+ int startOffset;
internal int StartOffset {
+ get {
+ return startOffset;
+ }
+ set {
+ startOffset = value;
+ EndOffset = value + 1;
+ }
+ }
+
+ public int EndOffset {
get;
set;
}
-
+
public ICompletionWidget CompletionWidget {
get {
return list.CompletionWidget;
@@ -213,10 +226,12 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
- int endOffset = -1;
+ int lastCommitCharEndoffset = -1;
public virtual string PartialWord {
get {
- return CompletionWidget.GetText (StartOffset, Math.Max (StartOffset, endOffset > 0 ? endOffset : CompletionWidget.CaretOffset));
+ if (CompletionWidget == null)
+ return "";
+ return CompletionWidget.GetText (StartOffset, Math.Max (StartOffset, lastCommitCharEndoffset > 0 ? lastCommitCharEndoffset : CompletionWidget.CaretOffset));
}
}
@@ -253,6 +268,7 @@ namespace MonoDevelop.Ide.CodeCompletion
{
if (StartOffset > CompletionWidget.CaretOffset)
return KeyActions.CloseWindow | KeyActions.Process;
+
if (HideWhenWordDeleted && StartOffset >= CompletionWidget.CaretOffset)
return KeyActions.CloseWindow | KeyActions.Process;
switch (key) {
@@ -262,7 +278,6 @@ namespace MonoDevelop.Ide.CodeCompletion
return KeyActions.Process;
}
-
const string commitChars = " <>()[]{}=+-*/%~&|!";
if (keyChar == '[' && CloseOnSquareBrackets)
return KeyActions.Process | KeyActions.CloseWindow;
@@ -279,7 +294,7 @@ namespace MonoDevelop.Ide.CodeCompletion
int match = FindMatchedEntry (curword, out hasMismatches);
if (match >= 0 && System.Char.IsPunctuation (keyChar)) {
string text = DataProvider.GetCompletionText (FilteredItems [match]);
- if (!text.ToUpper ().StartsWith (curword.ToUpper ()))
+ if (!text.ToUpper ().StartsWith (curword.ToUpper (), StringComparison.Ordinal))
match = -1;
}
if (match >= 0 && !hasMismatches && keyChar != '<') {
@@ -289,7 +304,7 @@ namespace MonoDevelop.Ide.CodeCompletion
}
if (keyChar == '.')
list.AutoSelect = list.AutoCompleteEmptyMatch = true;
- endOffset = CompletionWidget.CaretOffset - 1;
+ lastCommitCharEndoffset = CompletionWidget.CaretOffset - 1;
if (list.SelectionEnabled) {
if (keyChar == '{' && !list.AutoCompleteEmptyMatchOnCurlyBrace && string.IsNullOrEmpty (list.CompletionString))
return KeyActions.CloseWindow | KeyActions.Process;
@@ -345,7 +360,7 @@ namespace MonoDevelop.Ide.CodeCompletion
case Gdk.Key.ISO_Enter:
case Gdk.Key.Key_3270_Enter:
case Gdk.Key.KP_Enter:
- endOffset = CompletionWidget.CaretOffset;
+ lastCommitCharEndoffset = CompletionWidget.CaretOffset;
WasShiftPressed = (modifier & ModifierType.ShiftMask) == ModifierType.ShiftMask;
return KeyActions.Complete | KeyActions.Ignore | KeyActions.CloseWindow;
case Gdk.Key.Down:
@@ -374,6 +389,7 @@ namespace MonoDevelop.Ide.CodeCompletion
return KeyActions.Process;
if (list.filteredItems.Count < 2)
return KeyActions.CloseWindow | KeyActions.Process;
+ scrollbar.Vadjustment.Value = Math.Max (0, scrollbar.Vadjustment.Value - scrollbar.Vadjustment.PageSize);
list.MoveCursor (-8);
return KeyActions.Ignore;
@@ -382,6 +398,7 @@ namespace MonoDevelop.Ide.CodeCompletion
return KeyActions.Process;
if (list.filteredItems.Count < 2)
return KeyActions.CloseWindow | KeyActions.Process;
+ scrollbar.Vadjustment.Value = Math.Max (0, Math.Min (scrollbar.Vadjustment.Upper - scrollbar.Vadjustment.PageSize, scrollbar.Vadjustment.Value + scrollbar.Vadjustment.PageSize));
list.MoveCursor (8);
return KeyActions.Ignore;
@@ -654,7 +671,7 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
- public interface IListDataProvider
+ interface IListDataProvider
{
int ItemCount { get; }
string GetText (int n);
@@ -662,8 +679,10 @@ namespace MonoDevelop.Ide.CodeCompletion
CompletionCategory GetCompletionCategory (int n);
bool HasMarkup (int n);
string GetCompletionText (int n);
- string GetDescription (int n);
+ string GetDescription (int n, bool isSelected);
+ string GetRightSideDescription (int n, bool isSelected);
Gdk.Pixbuf GetIcon (int n);
+ int CompareTo (int n, int m);
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
index 1ab06a4..b597401 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
@@ -191,6 +191,8 @@ namespace MonoDevelop.Ide.CodeCompletion
{
ChangeOverload ();
Hide ();
+ Ext = null;
+ Widget = null;
}
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindowManager.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindowManager.cs
index b3cb4c5..64c53b4 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindowManager.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindowManager.cs
@@ -225,8 +225,8 @@ namespace MonoDevelop.Ide.CodeCompletion
if (methods.Count == 0) {
if (window != null) {
-// window.HideParameterInfo ();
- DestroyWindow ();
+ window.HideParameterInfo ();
+// DestroyWindow ();
wasAbove = false;
wasVisi = false;
lastW = -1;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
index 08d6214..17262d5 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
@@ -109,8 +109,11 @@ namespace MonoDevelop.Ide.CodeCompletion
if (current_overload >= 0 && current_overload < overloads.Count) {
var o = overloads[current_overload];
+ headlabel.BreakOnCamelCasing = false;
+ headlabel.BreakOnPunctuation = false;
headlabel.Markup = o.SignatureMarkup;
headlabel.Visible = true;
+
if (Theme.DrawPager && overloads.Count > 1) {
headlabel.WidthRequest = headlabel.RealWidth + 70;
} else {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
index 360b044..78bdb5f 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
@@ -167,7 +167,8 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
- IdeApp.Workbench.ActiveDocument.Close ();
+ if (IdeApp.Workbench.ActiveDocument != null)
+ IdeApp.Workbench.ActiveDocument.Close ();
}
protected override void Update (CommandInfo info)
@@ -217,9 +218,7 @@ namespace MonoDevelop.Ide.Commands
internal static bool CanPrint ()
{
IPrintable print;
- //HACK: disable printing on Windows while it doesn't work
- return !Platform.IsWindows
- && IdeApp.Workbench.ActiveDocument != null
+ return IdeApp.Workbench.ActiveDocument != null
&& (print = IdeApp.Workbench.ActiveDocument.GetContent<IPrintable> ()) != null
&& print.CanPrint;
}
@@ -235,6 +234,12 @@ namespace MonoDevelop.Ide.Commands
protected override void Update (CommandInfo info)
{
info.Enabled = PrintHandler.CanPrint ();
+
+ //HACK: disable print preview on Win32 because it doesn't work
+ if (Platform.IsWindows) {
+ info.Enabled = false;
+ info.Visible = false;
+ }
}
}
@@ -403,4 +408,5 @@ namespace MonoDevelop.Ide.Commands
// MonoDevelop.Ide.Commands.FileTabCommands.CloseAllButThis Implemented in FileTabCommands.cs
// MonoDevelop.Ide.Commands.CopyPathNameHandler Implemented in FileTabCommands.cs
// MonoDevelop.Ide.Commands.FileTabCommands.ToggleMaximize Implemented in FileTabCommands.cs
+ // MonoDevelop.Ide.Commands.FileTabCommands.ReopenClosedTab Implemented in FileTabCommands.cs
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileTabCommands.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileTabCommands.cs
index 87b46c1..8054fe3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileTabCommands.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileTabCommands.cs
@@ -32,6 +32,8 @@ using Gtk;
using MonoDevelop.Components.Commands;
using MonoDevelop.Ide.Gui;
+using MonoDevelop.Ide.Navigation;
+using MonoDevelop.Core;
namespace MonoDevelop.Ide.Commands
{
@@ -39,7 +41,8 @@ namespace MonoDevelop.Ide.Commands
{
CloseAllButThis,
CopyPathName,
- ToggleMaximize
+ ToggleMaximize,
+ ReopenClosedTab,
}
class CloseAllButThisHandler : CommandHandler
@@ -72,4 +75,17 @@ namespace MonoDevelop.Ide.Commands
clipboard.Text = document.FileName;
}
}
+
+ class ReopenClosedTabHandler : CommandHandler
+ {
+ protected override void Run ()
+ {
+ NavigationHistoryService.OpenLastClosedDocument ();
+ }
+
+ protected override void Update (CommandInfo info)
+ {
+ info.Enabled = NavigationHistoryService.HasClosedDocuments;
+ }
+ }
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
index c086625..869b9c2 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
@@ -85,7 +85,8 @@ namespace MonoDevelop.Ide.Commands
ExportSolution,
SpecificAssemblyVersion,
SelectActiveConfiguration,
- SelectActiveRuntime
+ SelectActiveRuntime,
+ EditSolutionItem
}
internal class SolutionOptionsHandler : CommandHandler
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
index a4cd581..48aedb5 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
@@ -220,7 +220,7 @@ namespace MonoDevelop.Ide.CustomTools
}
}
- public static void HandleRename (ProjectFileRenamedEventArgs e)
+ static void HandleRename (ProjectFileRenamedEventArgs e)
{
foreach (ProjectFileEventInfo args in e) {
var file = args.ProjectFile;
@@ -229,6 +229,17 @@ namespace MonoDevelop.Ide.CustomTools
continue;
}
}
+
+ public static string GetFileNamespace (ProjectFile file, string outputFile)
+ {
+ string ns = file.CustomToolNamespace;
+ if (string.IsNullOrEmpty (ns) && !string.IsNullOrEmpty (outputFile)) {
+ var dnp = file.Project as DotNetProject;
+ if (dnp != null)
+ ns = dnp.GetDefaultNamespace (outputFile);
+ }
+ return ns;
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
new file mode 100644
index 0000000..4e38662
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
@@ -0,0 +1,80 @@
+//
+// ResXFileCodeGenerator.cs
+//
+// Author:
+// Kenneth Skovhede <kenneth at hexad.dk>
+// Michael Hutchinson <m.j.hutchinson at gmail.com>
+//
+// Copyright (C) 2013 Kenneth Skovhede
+// Copyright (C) 2013 Xamarin Inc.
+//
+// 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.IO;
+using System.Text;
+using MonoDevelop.Core;
+using MonoDevelop.Projects;
+using MonoDevelop.Ide.CustomTools;
+using System.Resources.Tools;
+using System.CodeDom.Compiler;
+
+namespace MonoDevelop.Ide.CustomTools
+{
+ public class ResXFileCodeGenerator : ISingleFileCustomTool
+ {
+ public IAsyncOperation Generate (IProgressMonitor monitor, ProjectFile file, SingleFileCustomToolResult result)
+ {
+ return new ThreadAsyncOperation (delegate {
+ var dnp = file.Project as DotNetProject;
+ if (dnp == null) {
+ var err = "ResXFileCodeGenerator can only be used with .NET projects";
+ result.Errors.Add (new CompilerError (null, 0, 0, null, err));
+ return;
+ }
+
+ var provider = dnp.LanguageBinding.GetCodeDomProvider ();
+ if (provider == null) {
+ var err = "ResXFileCodeGenerator can only be used with languages that support CodeDOM";
+ result.Errors.Add (new CompilerError (null, 0, 0, null, err));
+ return;
+ }
+
+ var outputfile = file.FilePath.ChangeExtension (".Designer." + provider.FileExtension);
+ var ns = CustomToolService.GetFileNamespace (file, outputfile);
+ var cn = provider.CreateValidIdentifier (file.FilePath.FileNameWithoutExtension);
+
+ string[] unmatchable;
+ var ccu = StronglyTypedResourceBuilder.Create (file.FilePath, cn, ns, provider, true, out unmatchable);
+
+ foreach (var p in unmatchable) {
+ var msg = string.Format ("Could not generate property for resource ID '{0}'", p);
+ result.Errors.Add (new CompilerError (file.FilePath, 0, 0, null, msg));
+ }
+
+ using (var w = new StreamWriter (outputfile, false, Encoding.UTF8))
+ provider.GenerateCodeFromCompileUnit (ccu, w, new CodeGeneratorOptions ());
+
+ result.GeneratedFilePath = outputfile;
+ }, result);
+ }
+ }
+}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ThreadAsyncOperation.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ThreadAsyncOperation.cs
new file mode 100644
index 0000000..63fb2f9
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ThreadAsyncOperation.cs
@@ -0,0 +1,91 @@
+//
+// TextTemplatingFileGenerator.cs
+//
+// Author:
+// Michael Hutchinson <mhutchinson at novell.com>
+//
+// Copyright (c) 2010 Novell, Inc.
+//
+// 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 MonoDevelop.Ide.CustomTools;
+using MonoDevelop.Core;
+using System.Threading;
+
+namespace MonoDevelop.Ide.CustomTools
+{
+ public class ThreadAsyncOperation : IAsyncOperation
+ {
+ Thread thread;
+ bool cancelled;
+ SingleFileCustomToolResult result;
+ Action task;
+
+ public ThreadAsyncOperation (Action task, SingleFileCustomToolResult result)
+ {
+ if (result == null)
+ throw new ArgumentNullException ("result");
+
+ this.task = task;
+ this.result = result;
+ thread = new Thread (Run);
+ thread.Start ();
+ }
+
+ void Run ()
+ {
+ try {
+ task ();
+ } catch (ThreadAbortException ex) {
+ result.UnhandledException = ex;
+ Thread.ResetAbort ();
+ } catch (Exception ex) {
+ result.UnhandledException = ex;
+ }
+ if (Completed != null)
+ Completed (this);
+ }
+
+ public event OperationHandler Completed;
+
+ public void Cancel ()
+ {
+ cancelled = true;
+ thread.Abort ();
+ }
+
+ public void WaitForCompleted ()
+ {
+ thread.Join ();
+ }
+
+ public bool IsCompleted {
+ get { return !thread.IsAlive; }
+ }
+
+ public bool Success {
+ get { return !cancelled && result.Success; }
+ }
+
+ public bool SuccessWithWarnings {
+ get { return !cancelled && result.SuccessWithWarnings; }
+ }
+ }
+}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
index ea445fa..684c5c2 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
@@ -76,6 +76,15 @@ namespace MonoDevelop.Ide.Desktop
Process.Start (url);
}
+ /// <summary>
+ /// Loads the XWT toolkit backend for the native toolkit (Cocoa on Mac, WPF on Windows)
+ /// </summary>
+ /// <returns>The native toolkit.</returns>
+ public virtual Xwt.Toolkit LoadNativeToolkit ()
+ {
+ return Xwt.Toolkit.CurrentEngine;
+ }
+
public string GetMimeTypeForUri (string uri)
{
if (!String.IsNullOrEmpty (uri)) {
@@ -425,6 +434,12 @@ namespace MonoDevelop.Ide.Desktop
return ((bool?) window.Data ["isFullScreen"]) ?? false;
}
+ public virtual bool IsModalDialogRunning ()
+ {
+ var windows = Gtk.Window.ListToplevels ();
+ return windows.Any (w => w.Modal && w.Visible);
+ }
+
public virtual void SetIsFullscreen (Gtk.Window window, bool isFullscreen)
{
window.Data ["isFullScreen"] = isFullscreen;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FilterOptions.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FilterOptions.cs
index 189b23b..48f1c14 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FilterOptions.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FilterOptions.cs
@@ -31,10 +31,10 @@ namespace MonoDevelop.Ide.FindInFiles
{
public class FilterOptions
{
- private static readonly char [] separators = {';'};
+ static readonly char [] separators = {';'};
- private string file_mask;
- private string [] split_file_masks;
+ string file_mask;
+ string [] split_file_masks;
public string FileMask {
get {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
index 553c21f..7dd6852 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
@@ -770,7 +770,6 @@ namespace MonoDevelop.Ide.FindInFiles
string pattern = comboboxentryFind.Entry.Text;
FilterOptions options = GetFilterOptions ();
-
if (!find.ValidatePattern (options, pattern)) {
MessageService.ShowError (GettextCatalog.GetString ("Search pattern is invalid"));
return;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
index 12c7c66..34df47c 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
@@ -34,7 +34,6 @@ namespace MonoDevelop.Ide.FindInFiles
{
public static class MemberCollector
{
-
static bool MatchParameters (IMember a, IMember b)
{
return MatchParameters (a as IParameterizedMember, b as IParameterizedMember);
@@ -84,7 +83,7 @@ namespace MonoDevelop.Ide.FindInFiles
/* // Filter out shadowed members.
// class A { public string Foo { get; set; } } class B : A { public string Foo { get; set; } }
- if (member.EntityType == EntityType.Property || !(member is IParameterizedMember)) {
+ if (member.SymbolKind == SymbolKind.Property || !(member is IParameterizedMember)) {
members = members.Where (m => m == member || m.DeclaringType.Kind == TypeKind.Interface);
}*/
@@ -105,12 +104,12 @@ namespace MonoDevelop.Ide.FindInFiles
public static IEnumerable<IMember> CollectMembers (Solution solution, IMember member, ReferenceFinder.RefactoryScope scope,
bool includeOverloads = true, bool matchDeclaringType = false)
{
- if (solution == null || member.EntityType == EntityType.Destructor || member.EntityType == EntityType.Operator)
+ if (solution == null || member.SymbolKind == SymbolKind.Destructor || member.SymbolKind == SymbolKind.Operator)
return new [] { member };
- if (member.EntityType == EntityType.Constructor) {
+ if (member.SymbolKind == SymbolKind.Constructor) {
if (includeOverloads)
- return member.DeclaringType.GetMembers (m => m.EntityType == EntityType.Constructor, GetMemberOptions.IgnoreInheritedMembers);
+ return member.DeclaringType.GetMembers (m => m.SymbolKind == SymbolKind.Constructor, GetMemberOptions.IgnoreInheritedMembers);
return new [] { member };
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs
index f22de00..25024ed 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberReference.cs
@@ -28,6 +28,14 @@ using ICSharpCode.NRefactory.TypeSystem;
namespace MonoDevelop.Ide.FindInFiles
{
+ [Flags]
+ public enum ReferenceUsageType {
+ Unknown = 0,
+ Read = 1,
+ Write = 2,
+ ReadWrite = Read | Write
+ }
+
public class MemberReference : SearchResult
{
public override FileProvider FileProvider {
@@ -41,7 +49,8 @@ namespace MonoDevelop.Ide.FindInFiles
return Region.FileName;
}
}
-
+
+ public ReferenceUsageType ReferenceUsageType { get; set; }
public object EntityOrVariable { get; private set;}
public DomRegion Region { get; private set;}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
index 317632d..fed7531 100755
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
@@ -184,7 +184,7 @@ namespace MonoDevelop.Ide.FindInFiles
searchNodes = CollectMembers ((IType)member).ToList<object> ();
} else if (member is IEntity) {
var e = (IEntity)member;
- if (e.EntityType == EntityType.Destructor) {
+ if (e.SymbolKind == SymbolKind.Destructor) {
foreach (var r in FindReferences (solution, e.DeclaringType, searchForAllOverloads, scope, monitor)) {
yield return r;
}
@@ -244,7 +244,7 @@ namespace MonoDevelop.Ide.FindInFiles
internal static IEnumerable<IEntity> CollectMembers (IType type)
{
yield return (IEntity)type;
- foreach (var c in type.GetDefinition ().GetMembers (m => m.EntityType == EntityType.Constructor, GetMemberOptions.IgnoreInheritedMembers)) {
+ foreach (var c in type.GetDefinition ().GetMembers (m => m.SymbolKind == SymbolKind.Constructor, GetMemberOptions.IgnoreInheritedMembers)) {
if (!c.IsSynthetic)
yield return c;
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
index 2c0e126..2a7ada1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
@@ -183,7 +183,7 @@ namespace MonoDevelop.Ide.FindInFiles
{
foreach (Document document in IdeApp.Workbench.Documents) {
monitor.Log.WriteLine (GettextCatalog.GetString ("Looking in '{0}'", document.FileName));
- if (!string.IsNullOrEmpty (document.FileName))
+ if (!string.IsNullOrEmpty (document.FileName) && filterOptions.NameMatches (document.FileName))
yield return new FileProvider (document.FileName);
}
}
@@ -246,7 +246,8 @@ namespace MonoDevelop.Ide.FindInFiles
if (Path.GetFileName (fileName).StartsWith (".", StringComparison.Ordinal))
continue;
}
-
+ if (!filterOptions.NameMatches (fileName))
+ continue;
if (!IncludeBinaryFiles && !DesktopService.GetFileIsText (fileName))
continue;
yield return fileName;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
index ff8409c..3ee5310 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
@@ -122,7 +122,7 @@ namespace MonoDevelop.Ide.FindInFiles
this.ShowAll ();
var fileNameColumn = new TreeViewColumn {
- Resizable = false,
+ Resizable = true,
SortColumnId = 0,
Title = GettextCatalog.GetString("File")
};
@@ -145,14 +145,14 @@ namespace MonoDevelop.Ide.FindInFiles
TreeViewColumn textColumn = treeviewSearchResults.AppendColumn (GettextCatalog.GetString ("Text"),
treeviewSearchResults.TextRenderer, ResultTextDataFunc);
textColumn.SortColumnId = 2;
- textColumn.Resizable = false;
+ textColumn.Resizable = true;
textColumn.FixedWidth = 300;
TreeViewColumn pathColumn = treeviewSearchResults.AppendColumn (GettextCatalog.GetString ("Path"),
treeviewSearchResults.TextRenderer, ResultPathDataFunc);
pathColumn.SortColumnId = 3;
- pathColumn.Resizable = false;
+ pathColumn.Resizable = true;
pathColumn.FixedWidth = 500;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontDescriptionCodon.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontDescriptionCodon.cs
index 4aae160..8d8e079 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontDescriptionCodon.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontDescriptionCodon.cs
@@ -23,7 +23,6 @@
// 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 Mono.Addins;
@@ -50,12 +49,24 @@ namespace MonoDevelop.Ide.Fonts
[NodeAttribute("default", "Default font to use.")]
string fontDescription;
+
+ [NodeAttribute("defaultMac", "Default mac font to use.")]
+ string fontDescriptionMac;
+
+ [NodeAttribute("defaultWindows", "Default windows font to use.")]
+ string fontDescriptionWindows;
+
public string FontDescription {
get {
- return this.fontDescription;
+ if (MonoDevelop.Core.Platform.IsWindows)
+ return string.IsNullOrEmpty (fontDescriptionWindows) ? fontDescription : fontDescriptionWindows;
+ if (MonoDevelop.Core.Platform.IsMac)
+ return string.IsNullOrEmpty (fontDescriptionMac) ? fontDescription : fontDescriptionMac;
+ return fontDescription;
}
}
-
+
+
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
index 48c7431..4f8dd83 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
@@ -75,7 +75,8 @@ namespace MonoDevelop.Ide.Fonts
static FontDescription LoadFont (string name)
{
- return Pango.FontDescription.FromString (FilterFontName (name));
+ var fontName = FilterFontName (name);
+ return Pango.FontDescription.FromString (fontName);
}
public static string FilterFontName (string name)
@@ -88,7 +89,6 @@ namespace MonoDevelop.Ide.Fonts
label.Destroy ();
return result;
}
-
return name;
}
@@ -138,7 +138,13 @@ namespace MonoDevelop.Ide.Fonts
{
if (loadedFonts.ContainsKey (name))
loadedFonts.Remove (name);
- fontProperties.Set (name, value);
+
+ var font = GetFont (name);
+ if (font != null && font.FontDescription == value) {
+ fontProperties.Set (name, null);
+ } else {
+ fontProperties.Set (name, value);
+ }
List<Action> callbacks;
if (fontChangeCallbacks.TryGetValue (name, out callbacks)) {
callbacks.ForEach (c => c ());
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs
index 9d0385d..7d3c946 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs
@@ -47,7 +47,15 @@ namespace MonoDevelop.Ide.Gui.Content
public readonly static PropertyWrapper<bool> EnableCodeCompletion = PropertyService.Wrap ("EnableCodeCompletion", true);
public readonly static PropertyWrapper<bool> EnableParameterInsight = PropertyService.Wrap ("EnableParameterInsight", true);
public readonly static PropertyWrapper<bool> EnableAutoCodeCompletion = PropertyService.Wrap ("EnableAutoCodeCompletion", true);
-// public readonly static PropertyWrapper<bool> HideObsoleteItems = PropertyService.Wrap ("HideObsoleteItems", false);
+ public readonly static PropertyWrapper<bool> AddImportedItemsToCompletionList = PropertyService.Wrap ("AddImportedItemsToCompletionList", false);
+ public readonly static PropertyWrapper<bool> IncludeKeywordsInCompletionList = PropertyService.Wrap ("IncludeKeywordsInCompletionList", true);
+ public readonly static PropertyWrapper<bool> AddParenthesesAfterCompletion = PropertyService.Wrap ("AddParenthesesAfterCompletion", false);
+ public readonly static PropertyWrapper<bool> AddOpeningOnly = PropertyService.Wrap ("AddOpeningOnly", false);
+ public readonly static PropertyWrapper<int> CompletionListRows = PropertyService.Wrap ("CompletionListRows", 7);
+
+ public readonly static PropertyWrapper<bool> FilterCompletionListByEditorBrowsable = PropertyService.Wrap ("FilterCompletionListByEditorBrowsable", true);
+ public readonly static PropertyWrapper<bool> IncludeEditorBrowsableAdvancedMembers = PropertyService.Wrap ("IncludeEditorBrowsableAdvancedMembers", true);
+
#endregion
public ICompletionWidget CompletionWidget {
@@ -177,7 +185,6 @@ namespace MonoDevelop.Ide.Gui.Content
CompletionWindowManager.HideWindow ();
if (autoHideParameterWindow)
ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
- CompletionWindowManager.UpdateCursorPosition ();
ParameterInformationWindowManager.UpdateCursorPosition (this, CompletionWidget);
}
@@ -265,7 +272,7 @@ namespace MonoDevelop.Ide.Gui.Content
[CommandHandler (TextEditorCommands.ShowParameterCompletionWindow)]
public virtual void RunParameterCompletionCommand ()
{
- if (Document.Editor.SelectionMode == Mono.TextEditor.SelectionMode.Block)
+ if (Document.Editor.SelectionMode == Mono.TextEditor.SelectionMode.Block || CompletionWidget == null)
return;
ParameterDataProvider cp = null;
int cpos;
@@ -325,9 +332,6 @@ namespace MonoDevelop.Ide.Gui.Content
break;
pos++;
}
- // for named arguments invoke(arg:<Expr>);
- if (pos + 1 < len && Editor.GetCharAt (pos) == ':' && Editor.GetCharAt (pos + 1) != ':')
- pos++;
wlen = pos - cpos;
return true;
}
@@ -430,24 +434,34 @@ namespace MonoDevelop.Ide.Gui.Content
return -1;
}
+ void HandlePaste (int insertionOffset, string text, int insertedChars)
+ {
+ ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
+ CompletionWindowManager.HideWindow ();
+ }
+
+ void HandleFocusOutEvent (object o, Gtk.FocusOutEventArgs args)
+ {
+ ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
+ CompletionWindowManager.HideWindow ();
+ }
+
public override void Initialize ()
{
base.Initialize ();
-
CompletionWindowManager.WindowClosed += HandleWindowClosed;
CompletionWidget = Document.GetContent <ICompletionWidget> ();
if (CompletionWidget != null)
CompletionWidget.CompletionContextChanged += OnCompletionContextChanged;
- document.Editor.Paste += (insertionOffset, text, insertedChars) => {
- ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
- CompletionWindowManager.HideWindow ();
- };
- if (document.Editor.Parent != null) {
- document.Editor.Parent.TextArea.FocusOutEvent += delegate {
- ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
- CompletionWindowManager.HideWindow ();
- };
- }
+ document.Editor.Caret.PositionChanged += HandlePositionChanged;
+ document.Editor.Paste += HandlePaste;
+ if (document.Editor.Parent != null)
+ document.Editor.Parent.TextArea.FocusOutEvent += HandleFocusOutEvent;
+ }
+
+ void HandlePositionChanged (object sender, Mono.TextEditor.DocumentLocationEventArgs e)
+ {
+ CompletionWindowManager.UpdateCursorPosition ();
}
void HandleWindowClosed (object sender, EventArgs e)
@@ -463,6 +477,10 @@ namespace MonoDevelop.Ide.Gui.Content
ParameterInformationWindowManager.HideWindow (this, CompletionWidget);
disposed = true;
+ if (document.Editor.Parent != null)
+ document.Editor.Parent.TextArea.FocusOutEvent -= HandleFocusOutEvent;
+ document.Editor.Paste -= HandlePaste;
+ document.Editor.Caret.PositionChanged -= HandlePositionChanged;
CompletionWindowManager.WindowClosed -= HandleWindowClosed;
if (CompletionWidget != null)
CompletionWidget.CompletionContextChanged -= OnCompletionContextChanged;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
index aeb8319..b021f35 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
@@ -85,14 +85,14 @@ namespace MonoDevelop.Ide.Gui.Dialogs
Spacing = 0,
MarginLeft = 12
};
- cbox.PackStart (new Xwt.Label ("© 2011-2012 "));
+ cbox.PackStart (new Xwt.Label ("© 2011-2013 "));
cbox.PackStart (new Xwt.LinkLabel () {
Text = string.Format ("Xamarin Inc."),
Uri = new Uri ("http://www.xamarin.com")
});
infoBox.PackStart (cbox);
infoBox.PackStart (new Xwt.Label () {
- Text = "© 2004-2012 MonoDevelop contributors",
+ Text = "© 2004-2013 MonoDevelop contributors",
MarginLeft = 12
});
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
index dca07b4..03d6e1b 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
@@ -219,8 +219,11 @@ namespace MonoDevelop.Ide.Gui.Dialogs
if (closeWorkspaceCheck.Visible)
closeWorkspaceCheck.Active = true;
-
- selected = 0;
+
+ // Default exe/dll to AssemblyBrowser, solutions/projects to Solution Workbench.
+ // HACK: Couldn't make it a generic SolutionItemFile based conditional, .csproj fits under this category also.
+ if (!(Filename.EndsWith (".exe", StringComparison.OrdinalIgnoreCase) || Filename.EndsWith (".dll", StringComparison.OrdinalIgnoreCase)))
+ selected = 0;
i++;
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
index 9e2e662..3bbff60 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsPanel.cs
@@ -55,6 +55,8 @@ namespace MonoDevelop.Ide.Gui.Dialogs
PolicySet GetMatchingSet (IEnumerable<PolicySet> candidateSets);
bool Modified { get; }
bool HandlesPolicyType (Type type, string scope);
+
+ void PanelSelected ();
}
public abstract class MimeTypePolicyOptionsPanel<T>: ItemOptionsPanel, IMimeTypePolicyOptionsPanel where T : class, IEquatable<T>, new ()
@@ -70,7 +72,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
CheckButton defaultSettingsButton;
Widget panelWidget;
bool isExactMimeType;
-
+
void IMimeTypePolicyOptionsPanel.InitializePolicy (PolicyContainer policyContainer, string mimeType, bool isExactMimeType)
{
this.mimeType = mimeType;
@@ -99,7 +101,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
void IMimeTypePolicyOptionsPanel.LoadParentPolicy ()
{
T policy = GetInheritedPolicy (mimeTypeScopes);
-
+
if (loaded) {
UpdateDefaultSettingsButton (policyContainer.ParentPolicies);
LoadFrom ((T)policy);
@@ -277,6 +279,21 @@ namespace MonoDevelop.Ide.Gui.Dialogs
return !pol.Equals (GetCurrentPolicy ());
}
}
+
+ /// <summary>
+ /// Gets the current policy from the same section.
+ /// </summary>
+ protected S GetCurrentOtherPolicy<S> () where S : class, IEquatable<S>, new ()
+ {
+ foreach (IMimeTypePolicyOptionsPanel p in section.Panels) {
+ var panel = p as MimeTypePolicyOptionsPanel<S>;
+ if (panel == null)
+ continue;
+ return panel.GetCurrentPolicy ();
+ }
+
+ return policyContainer.Get<S> (mimeTypeScopes);
+ }
protected abstract void LoadFrom (T policy);
@@ -290,5 +307,9 @@ namespace MonoDevelop.Ide.Gui.Dialogs
{
section.UpdateSelectedNamedPolicy ();
}
+
+ public virtual void PanelSelected ()
+ {
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
index d8d9c7b..b21d6b7 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
@@ -55,6 +55,12 @@ namespace MonoDevelop.Ide.Gui.Dialogs
List<PolicySet> setsInCombo = new List<PolicySet> ();
bool synchingPoliciesCombo;
bool selectingPolicy;
+
+ public List<IMimeTypePolicyOptionsPanel> Panels {
+ get {
+ return panels;
+ }
+ }
public MimeTypePolicyOptionsSection ()
{
@@ -142,7 +148,10 @@ namespace MonoDevelop.Ide.Gui.Dialogs
notebook.AppendPage (align, tlabel);
panel.LoadCurrentPolicy ();
}
-
+ notebook.SwitchPage += delegate(object o, SwitchPageArgs args) {
+ if (notebook.Page >= 0 && notebook.Page < this.panels.Count)
+ this.panels[notebook.Page].PanelSelected ();
+ };
notebook.Show ();
vbox.PackEnd (notebook, true, true, 0);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MultiMessageDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MultiMessageDialog.cs
index cb201f5..533eac4 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MultiMessageDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MultiMessageDialog.cs
@@ -66,6 +66,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
lastImage = img;
box.PackStart (imgBox, false, false, 0);
Label lab = new Label (msg);
+ lab.UseUnderline = false;
lab.Xalign = 0;
lab.Yalign = 0;
lab.Wrap = true;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/TipOfTheDay.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/TipOfTheDay.cs
index de9041d..739f2f2 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/TipOfTheDay.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/TipOfTheDay.cs
@@ -10,10 +10,9 @@ namespace MonoDevelop.Ide.Gui.Dialogs
{
internal partial class TipOfTheDayWindow : Gtk.Window
{
- private List<string> tips = new List<string> ();
- private int currentTip;
-
- private string property = "MonoDevelop.Core.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup";
+ internal const string ShowTipsAtStartup = "MonoDevelop.Core.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup";
+ List<string> tips = new List<string> ();
+ int currentTip;
public TipOfTheDayWindow()
: base (WindowType.Toplevel)
@@ -21,7 +20,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
Build ();
TransientFor = IdeApp.Workbench.RootWindow;
- if (PropertyService.Get (property, false)) {
+ if (PropertyService.Get (ShowTipsAtStartup, false)) {
noshowCheckbutton.Active = true;
}
@@ -50,7 +49,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
void OnNoShow (object o, EventArgs e)
{
- PropertyService.Set (property, noshowCheckbutton.Active);
+ PropertyService.Set (ShowTipsAtStartup, noshowCheckbutton.Active);
}
void OnNextClicked (object o, EventArgs e)
@@ -64,8 +63,6 @@ namespace MonoDevelop.Ide.Gui.Dialogs
tipTextview.Buffer.Clear ();
tipTextview.Buffer.InsertAtCursor (tips[currentTip]);
-
-
}
void OnCloseClicked (object o, EventArgs e)
@@ -78,7 +75,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
class TipOfTheDayStartup : CommandHandler {
protected override void Run ()
{
- if (PropertyService.Get ("MonoDevelop.Core.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", false)) {
+ if (PropertyService.Get (TipOfTheDayWindow.ShowTipsAtStartup, false)) {
new TipOfTheDayWindow ().Show ();
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
index 2ea1b13..6627976 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
@@ -158,7 +158,12 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
if (path.IsNullOrEmpty) {
return null;
}
- path = path.FullPath;
+
+ try {
+ path = path.FullPath;
+ } catch {
+ return null;
+ }
//if it's a default path, blank it *unless* it overrides a higher priority default path
bool overridesHigherPriorityDefault = false;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ClassPad/SolutionNodeBuilder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ClassPad/SolutionNodeBuilder.cs
index b738dd5..6f6b22d 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ClassPad/SolutionNodeBuilder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ClassPad/SolutionNodeBuilder.cs
@@ -286,7 +286,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ClassPad
public void OnOpenFolder ()
{
Solution solution = (Solution) CurrentNode.DataItem;
- System.Diagnostics.Process.Start ("file://" + solution.BaseDirectory);
+ DesktopService.OpenFolder (solution.BaseDirectory);
}
[CommandHandler (SearchCommands.FindInFiles)]
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs
index de8e738..e99bcec 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs
@@ -123,15 +123,20 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
if (project.Files.Count > 500)
return true;
- ProjectFileCollection files;
- ArrayList folders;
-
- string path = GetFolderPath (dataObject);
-
- GetFolderContent (project, path, out files, out folders);
+ var folder = ((ProjectFolder) dataObject).Path;
+
+ foreach (var file in project.Files) {
+ FilePath path;
+
+ if (file.Subtype != Subtype.Directory)
+ path = file.IsLink ? project.BaseDirectory.Combine (file.ProjectVirtualPath) : file.FilePath;
+ else
+ path = file.FilePath;
+
+ if (path.IsChildPathOf (folder))
+ return true;
+ }
- if (files.Count > 0 || folders.Count > 0) return true;
-
return false;
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
index d63e53d..cf83a5a 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
@@ -167,7 +167,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
try {
if (file.Project != null)
newProjectFile = file.Project.Files.GetFileWithVirtualPath (newPath.ToRelative (file.Project.BaseDirectory));
-
+
if (!FileService.IsValidPath (newPath)) {
MessageService.ShowWarning (GettextCatalog.GetString ("The name you have chosen contains illegal characters. Please choose a different name."));
} else if (newProjectFile != null && newProjectFile != file) {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
index 8360dad..cdd0695 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
@@ -319,11 +319,12 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
}
}
-
+
+ static HashSet<string> propertiesThatAffectDisplay = new HashSet<string> (new string[] { null, "DependsOn", "Link", "Visible" });
void OnFilePropertyChanged (object sender, ProjectFileEventArgs e)
{
- foreach (ProjectFileEventInfo args in e) {
- ITreeBuilder tb = Context.GetTreeBuilder (args.Project);
+ foreach (var project in e.Where (x => propertiesThatAffectDisplay.Contains (x.Property)).Select (x => x.Project).Distinct ()) {
+ ITreeBuilder tb = Context.GetTreeBuilder (project);
if (tb != null) tb.UpdateAll ();
}
}
@@ -417,6 +418,20 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
}
}
+
+ [CommandHandler (ProjectCommands.EditSolutionItem)]
+ public void OnEditProject ()
+ {
+ Project project = (Project) CurrentNode.DataItem;
+ IdeApp.Workbench.OpenDocument (project.FileName);
+ }
+
+ [CommandUpdateHandler (ProjectCommands.EditSolutionItem)]
+ public void OnEditProjectUpdate (CommandInfo info)
+ {
+ var p = (Project) CurrentNode.DataItem;
+ info.Visible = !IdeApp.Workbench.Documents.Any (d => d.FileName == p.FileName);
+ }
public override DragOperation CanDragNode ()
{
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
index e1807c8..e185f41 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectPadContextMenu.addin.xml
@@ -98,6 +98,9 @@
<Condition id="ItemType" value="IFolderItem">
<CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenInTerminal" />
</Condition>
+ <Condition id="ItemType" value="Project|UnknownSolutionItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.EditSolutionItem" />
+ </Condition>
</ItemSet>
<Condition id="ItemType" value="IFolderItem">
<CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindInFiles" />
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs
index 51a5d5e..75db600 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/UnknownEntryNodeBuilder.cs
@@ -34,6 +34,7 @@ using MonoDevelop.Ide.Gui;
using MonoDevelop.Ide.Gui.Pads;
using MonoDevelop.Ide.Commands;
using MonoDevelop.Ide.Gui.Components;
+using System.Linq;
namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
{
@@ -113,6 +114,20 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
}
}
+
+ [CommandHandler (ProjectCommands.EditSolutionItem)]
+ public void OnEditUnknownSolutionItem ()
+ {
+ UnknownSolutionItem si = (UnknownSolutionItem) CurrentNode.DataItem;
+ IdeApp.Workbench.OpenDocument (si.FileName);
+ }
+
+ [CommandUpdateHandler (ProjectCommands.EditSolutionItem)]
+ public void OnEditUnknownSolutionItemUpdate (CommandInfo info)
+ {
+ var si = (UnknownSolutionItem) CurrentNode.DataItem;
+ info.Visible = !IdeApp.Workbench.Documents.Any (d => d.FileName == si.FileName);
+ }
public override void DeleteItem ()
{
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
index d662750..9d1f2b5 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
@@ -336,6 +336,7 @@ namespace MonoDevelop.Ide.Gui
return;
rootWidget.Remove (topMenu);
+ topMenu.Destroy ();
topMenu = null;
}
@@ -682,6 +683,9 @@ namespace MonoDevelop.Ide.Gui
if (content.Initialized)
content.PadContent.Dispose();
}
+
+ rootWidget.Destroy ();
+ Destroy ();
}
public bool Close()
@@ -1187,7 +1191,14 @@ namespace MonoDevelop.Ide.Gui
ignorePageSwitch = false;
}
}
-
+
+ internal void ReorderTab (int oldPlacement, int newPlacement)
+ {
+ DockNotebookTab tab = (DockNotebookTab)tabControl.GetTab (oldPlacement);
+ DockNotebookTab targetTab = (DockNotebookTab)tabControl.GetTab (newPlacement);
+ tabControl.ReorderTab (tab, targetTab);
+ }
+
#endregion
#region Dock Item management
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
index 609aae5..a32bb36 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
@@ -34,6 +34,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using Cairo;
using MonoDevelop.Components;
+using Xwt.Motion;
namespace MonoDevelop.Ide.Gui
{
@@ -233,18 +234,20 @@ namespace MonoDevelop.Ide.Gui
PageRemoved (this, EventArgs.Empty);
}
- internal void ReorderTab (DockNotebookTab tab, DockNotebookTab targetTabPosition)
+ internal void ReorderTab (DockNotebookTab tab, DockNotebookTab targetTab)
{
- if (tab == targetTabPosition)
+ if (tab == targetTab)
return;
- if (tab.Index > targetTabPosition.Index) {
+ int targetPos = targetTab.Index;
+ if (tab.Index > targetTab.Index) {
pages.RemoveAt (tab.Index);
- pages.Insert (targetTabPosition.Index, tab);
+ pages.Insert (targetPos, tab);
} else {
- pages.Insert (targetTabPosition.Index + 1, tab);
+ pages.Insert (targetPos + 1, tab);
pages.RemoveAt (tab.Index);
}
- UpdateIndexes (0);
+ IdeApp.Workbench.ReorderDocuments (tab.Index, targetPos);
+ UpdateIndexes (Math.Min (tab.Index, targetPos));
tabStrip.Update ();
}
@@ -289,7 +292,7 @@ namespace MonoDevelop.Ide.Gui
bool Dirty { get; set; }
}
- internal class DockNotebookTab: IDockNotebookTab, Animatable
+ internal class DockNotebookTab: IDockNotebookTab, IAnimatable
{
DockNotebook notebook;
TabStrip strip;
@@ -306,15 +309,18 @@ namespace MonoDevelop.Ide.Gui
public bool Notify { get; set; }
- public float WidthModifier { get; set; }
+ public double WidthModifier { get; set; }
- public float Opacity { get; set; }
+ public double Opacity { get; set; }
- public float GlowStrength { get; set; }
+ public double GlowStrength { get; set; }
public bool Hidden { get; set; }
- public float DirtyStrength { get; set; }
+ public double DirtyStrength { get; set; }
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
bool dirty;
public bool Dirty {
@@ -382,7 +388,7 @@ namespace MonoDevelop.Ide.Gui
}
internal Gdk.Rectangle SavedAllocation { get; private set; }
- internal float SaveStrength { get; set; }
+ internal double SaveStrength { get; set; }
internal void SaveAllocation ()
{
@@ -400,7 +406,7 @@ namespace MonoDevelop.Ide.Gui
public DockNotebookTab Tab { get; set; }
}
- class TabStrip: EventBox, Animatable
+ class TabStrip: EventBox, Xwt.Motion.IAnimatable
{
List<Gtk.Widget> children = new List<Widget> ();
DockNotebook notebook;
@@ -414,7 +420,7 @@ namespace MonoDevelop.Ide.Gui
bool draggingTab;
int dragX;
int dragOffset;
- float dragXProgress;
+ double dragXProgress;
int renderOffset;
int targetOffset;
@@ -454,10 +460,10 @@ namespace MonoDevelop.Ide.Gui
targetWidth = value;
if (TabWidth != value) {
this.Animate ("TabWidth",
- easing: Easing.CubicOut,
- start: TabWidth,
- end: value,
- callback: f => TabWidth = (int) f);
+ f => TabWidth = (int) f,
+ TabWidth,
+ value,
+ easing: Easing.CubicOut);
}
}
}
@@ -518,12 +524,15 @@ namespace MonoDevelop.Ide.Gui
closingTabs = new Dictionary<int, DockNotebookTab> ();
}
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
public void StartOpenAnimation (DockNotebookTab tab)
{
tab.WidthModifier = 0;
new Animation (f => tab.WidthModifier = f)
- .Insert (0.0f, 0.2f, new Animation (f => tab.Opacity = f))
+ .AddConcurrent (new Animation (f => tab.Opacity = f), 0.0d, 0.2d)
.Commit (tab, "Open", easing: Easing.CubicInOut);
}
@@ -531,7 +540,7 @@ namespace MonoDevelop.Ide.Gui
{
closingTabs[tab.Index] = tab;
new Animation (f => tab.WidthModifier = f, tab.WidthModifier, 0)
- .Insert (0.8f, 1.0f, new Animation (f => tab.Opacity = f, tab.Opacity, 0))
+ .AddConcurrent (new Animation (f => tab.Opacity = f, tab.Opacity, 0), 0.8d, 1.0d)
.Commit (tab, "Closing",
easing: Easing.CubicOut,
finished: (f, a) => { if (!a) closingTabs.Remove (tab.Index); });
@@ -540,10 +549,15 @@ namespace MonoDevelop.Ide.Gui
protected override void ForAll (bool include_internals, Callback callback)
{
base.ForAll (include_internals, callback);
- foreach (var c in children)
+ foreach (var c in children.ToArray ())
callback (c);
}
+ protected override void OnRemoved (Widget widget)
+ {
+ children.Remove (widget);
+ }
+
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
{
tabStartX = allocation.X + LeftBarPadding + LeanWidth / 2;
@@ -635,7 +649,7 @@ namespace MonoDevelop.Ide.Gui
// If the user clicks and drags on the 'x' which closes the current
// tab we can end up with a null tab here
if (t == null)
- return base.OnMotionNotifyEvent (evnt);;
+ return base.OnMotionNotifyEvent (evnt);
SetHighlightedTab (t);
var newOver = IsOverCloseButton (t, (int)evnt.X, (int)evnt.Y);
@@ -674,8 +688,8 @@ namespace MonoDevelop.Ide.Gui
t.Animate ("TabMotion",
f => t.SaveStrength = f,
- start: 1.0f,
- end: 0.0f,
+ 1.0f,
+ 0.0f,
easing: Easing.CubicInOut);
}
lastDragX = (int)evnt.X;
@@ -742,10 +756,10 @@ namespace MonoDevelop.Ide.Gui
allowDoubleClick = true;
if (dragX != 0)
this.Animate ("EndDrag",
+ f => dragXProgress = f,
+ 1.0d,
+ 0.0d,
easing: Easing.CubicOut,
- start: 1.0f,
- end: 0.0f,
- callback: f => dragXProgress = f,
finished: (f, a) => draggingTab = false);
QueueDraw ();
return base.OnButtonReleaseEvent (evnt);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
index 82aeec0..89b3f95 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
@@ -47,6 +47,7 @@ using MonoDevelop.Ide.Extensions;
using System.Linq;
using System.Threading;
using MonoDevelop.Ide.TypeSystem;
+using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
using System.Text;
@@ -60,7 +61,10 @@ namespace MonoDevelop.Ide.Gui
IWorkbenchWindow window;
TextEditorExtension editorExtension;
-
+ ParsedDocument parsedDocument;
+ IProjectContent singleFileContext;
+ Mono.TextEditor.ITextEditorDataProvider provider = null;
+
const int ParseDelay = 600;
public IWorkbenchWindow Window {
@@ -78,6 +82,8 @@ namespace MonoDevelop.Ide.Gui
public T GetContent<T> () where T : class
{
+ if (window == null)
+ return null;
//check whether the ViewContent can return the type directly
T ret = Window.ActiveViewContent.GetContent (typeof(T)) as T;
if (ret != null)
@@ -178,11 +184,11 @@ namespace MonoDevelop.Ide.Gui
}
public bool HasProject {
- get { return Window.ViewContent.Project != null; }
+ get { return Window != null ? Window.ViewContent.Project != null : false; }
}
public Project Project {
- get { return Window.ViewContent.Project; }
+ get { return Window != null ? Window.ViewContent.Project : null; }
/* set {
Window.ViewContent.Project = value;
if (value != null)
@@ -203,7 +209,6 @@ namespace MonoDevelop.Ide.Gui
}
}
- IProjectContent singleFileContext;
public IProjectContent ProjectContent {
get {
return Project != null ? TypeSystemService.GetProjectContext (Project) : GetProjectContext ();
@@ -216,7 +221,6 @@ namespace MonoDevelop.Ide.Gui
}
}
- ParsedDocument parsedDocument;
public virtual ParsedDocument ParsedDocument {
get {
return parsedDocument;
@@ -292,7 +296,6 @@ namespace MonoDevelop.Ide.Gui
}
}
- Mono.TextEditor.ITextEditorDataProvider provider = null;
public Mono.TextEditor.TextEditorData Editor {
get {
if (provider == null) {
@@ -338,8 +341,11 @@ namespace MonoDevelop.Ide.Gui
if (Window.ViewContent.ContentName == null) {
SaveAs ();
} else {
- if (!FileService.RequestFileEdit (Window.ViewContent.ContentName))
- MessageService.ShowMessage (GettextCatalog.GetString ("The file could not be saved. Write permission has not been granted."));
+ try {
+ FileService.RequestFileEdit (Window.ViewContent.ContentName, true);
+ } catch (Exception ex) {
+ MessageService.ShowException (ex, GettextCatalog.GetString ("The file could not be saved."));
+ }
FileAttributes attr = FileAttributes.ReadOnly | FileAttributes.Directory | FileAttributes.Offline | FileAttributes.System;
@@ -514,23 +520,13 @@ namespace MonoDevelop.Ide.Gui
CancelParseTimeout ();
ClearTasks ();
TypeSystemService.RemoveSkippedfile (FileName);
- if (window is SdiWorkspaceWindow)
- ((SdiWorkspaceWindow)window).DetachFromPathedDocument ();
- window.Closed -= OnClosed;
- window.ActiveViewContentChanged -= OnActiveViewContentChanged;
- if (IdeApp.Workspace != null)
- IdeApp.Workspace.ItemRemovedFromSolution -= OnEntryRemoved;
- // Unsubscribe project events
- if (window.ViewContent.Project != null)
- window.ViewContent.Project.Modified -= HandleProjectModified;
try {
OnClosed (a);
} catch (Exception ex) {
LoggingService.LogError ("Exception while calling OnClosed.", ex);
}
- DetachExtensionChain ();
// Parse the file when the document is closed. In this way if the document
// is closed without saving the changes, the saved compilation unit
@@ -545,9 +541,31 @@ namespace MonoDevelop.Ide.Gui
dom = null;
}*/
+ Counters.OpenDocuments--;
+ }
+
+ internal void DisposeDocument ()
+ {
+ DetachExtensionChain ();
+ ClearAnnotations ();
+ if (window is SdiWorkspaceWindow)
+ ((SdiWorkspaceWindow)window).DetachFromPathedDocument ();
+ window.Closed -= OnClosed;
+ window.ActiveViewContentChanged -= OnActiveViewContentChanged;
+ if (IdeApp.Workspace != null)
+ IdeApp.Workspace.ItemRemovedFromSolution -= OnEntryRemoved;
+
+ // Unsubscribe project events
+ if (window.ViewContent.Project != null)
+ window.ViewContent.Project.Modified -= HandleProjectModified;
+ window.ViewsChanged += HandleViewsChanged;
+ window = null;
+
parsedDocument = null;
+ singleFileContext = null;
provider = null;
- Counters.OpenDocuments--;
+ views = null;
+ viewsRO = null;
}
#region document tasks
object lockObj = new object ();
@@ -756,14 +774,15 @@ namespace MonoDevelop.Ide.Gui
singleFileContext = GetProjectContext ().AddOrUpdateFiles (parsedDocument.ParsedFile);
}
} finally {
+
OnDocumentParsed (EventArgs.Empty);
}
return this.parsedDocument;
}
- static readonly Lazy<IUnresolvedAssembly> mscorlib = new Lazy<IUnresolvedAssembly> ( () => new CecilLoader ().LoadAssemblyFile (typeof (object).Assembly.Location));
- static readonly Lazy<IUnresolvedAssembly> systemCore = new Lazy<IUnresolvedAssembly>( () => new CecilLoader ().LoadAssemblyFile (typeof (System.Linq.Enumerable).Assembly.Location));
- static readonly Lazy<IUnresolvedAssembly> system = new Lazy<IUnresolvedAssembly>( () => new CecilLoader ().LoadAssemblyFile (typeof (System.Uri).Assembly.Location));
+ static readonly Lazy<IUnresolvedAssembly> mscorlib = new Lazy<IUnresolvedAssembly> ( () => new IkvmLoader ().LoadAssemblyFile (typeof (object).Assembly.Location));
+ static readonly Lazy<IUnresolvedAssembly> systemCore = new Lazy<IUnresolvedAssembly>( () => new IkvmLoader ().LoadAssemblyFile (typeof (System.Linq.Enumerable).Assembly.Location));
+ static readonly Lazy<IUnresolvedAssembly> system = new Lazy<IUnresolvedAssembly>( () => new IkvmLoader ().LoadAssemblyFile (typeof (System.Uri).Assembly.Location));
static IUnresolvedAssembly Mscorlib { get { return mscorlib.Value; } }
static IUnresolvedAssembly SystemCore { get { return systemCore.Value; } }
@@ -799,6 +818,8 @@ namespace MonoDevelop.Ide.Gui
// very inefficient. Do it after a small delay instead, so several changes can
// be parsed at the same time.
string currentParseFile = FileName;
+ if (string.IsNullOrEmpty (currentParseFile))
+ return;
CancelParseTimeout ();
parseTimeout = GLib.Timeout.Add (ParseDelay, delegate {
@@ -904,7 +925,6 @@ namespace MonoDevelop.Ide.Gui
// return MonoDevelop.Projects.CodeGeneration.CodeGenerator.CreateGenerator (Editor.Document.MimeType,
// Editor.Options.TabsToSpaces, Editor.Options.TabSize, Editor.EolMarker);
// }
-
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
index 31737e9..be9c659 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
@@ -241,9 +241,9 @@ namespace MonoDevelop.Ide
cr.MoveTo (xPos + item.Icon.Width + 2 + itemPadding, yPos + (iconHeight - h) / 2);
layout.SetText (Ellipsize (item.ListTitle ?? item.Title, maxLength));
cr.ShowLayout (layout);
- e.Window.DrawPixbuf (Style.BaseGC (StateType.Normal), item.Icon, 0, 0, (int)xPos + itemPadding,
- (int)(yPos + (iconHeight - item.Icon.Height) / 2), item.Icon.Width, item.Icon.Height, RgbDither.None, 0, 0);
-
+ Gdk.CairoHelper.SetSourcePixbuf (cr, item.Icon, (int)xPos + itemPadding,
+ (int)(yPos + (iconHeight - item.Icon.Height) / 2));
+ cr.Paint ();
yPos += iconHeight;
if (++curItem >= maxItems) {
curItem = 0;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentToolbar.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentToolbar.cs
index 1ec291c..0b48895 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentToolbar.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentToolbar.cs
@@ -159,11 +159,12 @@ namespace MonoDevelop.Ide.Gui
{
using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
ctx.Rectangle (0, 0, Allocation.Width, Allocation.Height);
- Cairo.LinearGradient g = new Cairo.LinearGradient (0, 0, 0, Allocation.Height);
- g.AddColorStop (0, Styles.BreadcrumbBackgroundColor);
- g.AddColorStop (1, Styles.BreadcrumbGradientEndColor);
- ctx.Pattern = g;
- ctx.Fill ();
+ using (Cairo.LinearGradient g = new Cairo.LinearGradient (0, 0, 0, Allocation.Height)) {
+ g.AddColorStop (0, Styles.BreadcrumbBackgroundColor);
+ g.AddColorStop (1, Styles.BreadcrumbGradientEndColor);
+ ctx.Pattern = g;
+ ctx.Fill ();
+ }
ctx.MoveTo (0.5, Allocation.Height - 0.5);
ctx.RelLineTo (Allocation.Width, 0);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
index 4cf1e90..36a3fa9 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
@@ -346,7 +346,8 @@ namespace MonoDevelop.Ide.Gui
}
if (content.IsDirty) {
- IdeApp.ProjectOperations.MarkFileDirty (content.ContentName);
+ if (!String.IsNullOrEmpty (content.ContentName))
+ IdeApp.ProjectOperations.MarkFileDirty (content.ContentName);
} else if (content.IsReadOnly) {
newTitle += "+";
}
@@ -380,21 +381,35 @@ namespace MonoDevelop.Ide.Gui
OnClosed (args);
- foreach (IAttachableViewContent sv in SubViewContents) {
- sv.Dispose ();
- }
-
- content.ContentNameChanged -= new EventHandler(SetTitleEvent);
- content.DirtyChanged -= HandleDirtyChanged;
- content.BeforeSave -= new EventHandler(BeforeSave);
- content.ContentChanged -= new EventHandler (OnContentChanged);
- content.WorkbenchWindow = null;
- content.Dispose ();
-
- DetachFromPathedDocument ();
Destroy ();
return true;
}
+
+ protected override void OnDestroyed ()
+ {
+ base.OnDestroyed ();
+ if (viewContents != null) {
+ foreach (IAttachableViewContent sv in SubViewContents) {
+ sv.Dispose ();
+ }
+ viewContents = null;
+ }
+
+ if (content != null) {
+ content.ContentNameChanged -= new EventHandler(SetTitleEvent);
+ content.DirtyChanged -= HandleDirtyChanged;
+ content.BeforeSave -= new EventHandler(BeforeSave);
+ content.ContentChanged -= new EventHandler (OnContentChanged);
+ content.WorkbenchWindow = null;
+ content.Dispose ();
+ content = null;
+ }
+
+ DetachFromPathedDocument ();
+ commandHandler = null;
+ document = null;
+ extensionContext = null;
+ }
#region lazy UI element creation
@@ -611,8 +626,6 @@ namespace MonoDevelop.Ide.Gui
}
subViewContent = viewContents[newIndex] as IAttachableViewContent;
- if (subViewContent != null)
- subViewContent.Selected ();
DetachFromPathedDocument ();
@@ -628,6 +641,8 @@ namespace MonoDevelop.Ide.Gui
foreach (var t in documentToolbars)
t.Value.Container.Visible = ActiveViewContent == t.Key;
+ if (subViewContent != null)
+ subViewContent.Selected ();
OnActiveViewContentChanged (new ActiveViewContentEventArgs (this.ActiveViewContent));
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
index cc2e662..ba749ba 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
@@ -97,7 +97,22 @@ namespace MonoDevelop.Ide.Gui
{
info.Enabled = window.ViewContent.ContentName != null && !window.ViewContent.IsViewOnly;
}
+
+ [CommandHandler (FileCommands.OpenContainingFolder)]
+ protected void OnOpenFolder ()
+ {
+ // A tab will always hold a file, never a folder.
+ FilePath path = Path.GetDirectoryName (doc.FileName);
+ DesktopService.OpenFolder (path);
+ }
+ [CommandUpdateHandler (FileCommands.OpenContainingFolder)]
+ protected void OnUpdateOpenFolder (CommandInfo info)
+ {
+ info.Visible = doc != null && !doc.FileName.IsNullOrEmpty;
+ info.Enabled = info.Visible;
+ }
+
/*** Edit commands ***/
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
index 1593bd0..11e7234 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
@@ -186,15 +186,15 @@ namespace MonoDevelop.Ide.Gui
/// </summary>
public bool HasToplevelFocus {
get {
- var windows = Gtk.Window.ListToplevels ();
- if (windows.Any (w => w.Modal && w.Visible))
+ if (DesktopService.IsModalDialogRunning ())
return false;
+ var windows = Gtk.Window.ListToplevels ();
var toplevel = windows.FirstOrDefault (x => x.HasToplevelFocus);
if (toplevel == null)
return false;
if (toplevel == RootWindow)
return true;
- var dock = toplevel as MonoDevelop.Components.Docking.DockFloatingWindow;
+ var dock = toplevel as DockFloatingWindow;
return dock != null && dock.DockParent == RootWindow;
}
}
@@ -725,6 +725,7 @@ namespace MonoDevelop.Ide.Gui
window.Closed -= OnWindowClosed;
documents.Remove (doc);
OnDocumentClosed (doc);
+ doc.DisposeDocument ();
}
// When looking for the project to which the file belongs, look first
@@ -970,13 +971,18 @@ namespace MonoDevelop.Ide.Gui
return pad;
return null;
}
-
+
+ internal void ReorderTab (int oldPlacement, int newPlacement)
+ {
+ workbench.ReorderTab (oldPlacement, newPlacement);
+ }
+
internal void ReorderDocuments (int oldPlacement, int newPlacement)
{
IViewContent content = workbench.InternalViewContentCollection[oldPlacement];
workbench.InternalViewContentCollection.RemoveAt (oldPlacement);
workbench.InternalViewContentCollection.Insert (newPlacement, content);
-
+
Document doc = documents [oldPlacement];
documents.RemoveAt (oldPlacement);
documents.Insert (newPlacement, doc);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/ClosedDocumentNavigationPoint.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/ClosedDocumentNavigationPoint.cs
new file mode 100644
index 0000000..071514c
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/ClosedDocumentNavigationPoint.cs
@@ -0,0 +1,95 @@
+//
+// ClosedDocumentNavigationPoint.cs
+//
+// Author:
+// Therzok <therzok at gmail.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+
+namespace MonoDevelop.Ide.Navigation
+{
+ public class ClosedDocumentNavigationPoint : NavigationPoint
+ {
+ FilePath fileName;
+ int position;
+
+ public ClosedDocumentNavigationPoint (FilePath fileName, int position)
+ {
+ this.fileName = fileName;
+ this.position = position;
+ }
+
+ public override void Dispose ()
+ {
+ if (fileName != null) {
+ fileName = null;
+ }
+ base.Dispose ();
+ }
+
+ FilePath FileName {
+ get { return fileName; }
+ }
+
+ public override void Show ()
+ {
+ DoShow ();
+ Dispose ();
+ }
+
+ protected virtual Document DoShow ()
+ {
+ Document doc = IdeApp.Workbench.OpenDocument (fileName, true);
+ IdeApp.Workbench.ReorderTab (IdeApp.Workbench.Documents.IndexOf (doc), position);
+ return doc;
+ }
+
+ public override string DisplayName {
+ get {
+ return System.IO.Path.GetFileName ((string) fileName);
+ }
+ }
+
+ public override bool Equals (object o)
+ {
+ ClosedDocumentNavigationPoint dp = o as ClosedDocumentNavigationPoint;
+ return dp != null && ((FileName != FilePath.Null && FileName == dp.FileName));
+ }
+
+ public override int GetHashCode ()
+ {
+ return (FileName != FilePath.Null ? FileName.GetHashCode () : 0);
+ }
+
+ internal bool HandleRenameEvent (string oldName, string newName)
+ {
+ if (oldName == fileName) {
+ fileName = newName;
+ return true;
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryItem.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryItem.cs
index 7a1955a..a9f855e 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryItem.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryItem.cs
@@ -55,8 +55,10 @@ namespace MonoDevelop.Ide.Navigation
public void Show ()
{
- if (!NavigationHistoryService.IsCurrent (this))
- NavigationHistoryService.MoveTo (this);
+ if (NavigationPoint is DocumentNavigationPoint) {
+ if (!NavigationHistoryService.IsCurrent (this))
+ NavigationHistoryService.MoveTo (this);
+ }
NavigationPoint.Show ();
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
index 6b85e8c..9dbdeaa 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
@@ -40,6 +40,7 @@ namespace MonoDevelop.Ide.Navigation
public static class NavigationHistoryService
{
static HistoryList history = new HistoryList ();
+ static HistoryList closedHistory = new HistoryList ();
//used to prevent re-logging the current point during a switch
static bool switching;
@@ -59,7 +60,16 @@ namespace MonoDevelop.Ide.Navigation
history.Clear ();
OnHistoryChanged ();
};
-
+
+ IdeApp.Workbench.DocumentClosed += delegate(object sender, DocumentEventArgs e) {
+ ClosedDocumentNavigationPoint point = new ClosedDocumentNavigationPoint (
+ e.Document.FileName, IdeApp.Workbench.Documents.IndexOf (IdeApp.Workbench.ActiveDocument)
+ );
+ NavigationHistoryItem item = new NavigationHistoryItem (point);
+ closedHistory.AddPoint (item);
+ OnClosedHistoryChanged ();
+ };
+
//keep nav points up to date
TextEditorService.LineCountChanged += LineCountChanged;
TextEditorService.LineCountChangesCommitted += CommitCountChanges;
@@ -202,6 +212,20 @@ namespace MonoDevelop.Ide.Navigation
}
#endregion
+
+ #region Closed Document List
+
+ public static bool HasClosedDocuments {
+ get { return closedHistory.Current != null; }
+ }
+
+ public static void OpenLastClosedDocument () {
+ if (closedHistory.Current != null) {
+ closedHistory.Current.Show ();
+ }
+ }
+
+ #endregion
public static IList<NavigationHistoryItem> GetNavigationList (int desiredLength)
{
@@ -227,12 +251,19 @@ namespace MonoDevelop.Ide.Navigation
}
public static event EventHandler HistoryChanged;
+ public static event EventHandler ClosedHistoryChanged;
static void OnHistoryChanged ()
{
if (HistoryChanged != null)
HistoryChanged (null, EventArgs.Empty);
}
+
+ static void OnClosedHistoryChanged ()
+ {
+ if (ClosedHistoryChanged != null)
+ ClosedHistoryChanged (null, EventArgs.Empty);
+ }
#region Handling active doc change events
@@ -307,15 +338,22 @@ namespace MonoDevelop.Ide.Navigation
static void FileRenamed (object sender, ProjectFileRenamedEventArgs e)
{
- bool changed = false;
+ bool historyChanged = false;
+ bool closedHistoryChanged = false;
foreach (ProjectFileRenamedEventInfo args in e) {
foreach (NavigationHistoryItem point in history) {
DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint;
- changed &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName));
+ historyChanged &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName));
+ }
+ foreach (NavigationHistoryItem point in history) {
+ ClosedDocumentNavigationPoint cdp = point.NavigationPoint as ClosedDocumentNavigationPoint;
+ closedHistoryChanged &= (cdp != null && cdp.HandleRenameEvent (args.OldName, args.NewName));
}
}
- if (changed)
+ if (historyChanged)
OnHistoryChanged ();
+ if (closedHistoryChanged)
+ OnClosedHistoryChanged ();
}
#endregion
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
index d64122c..f015c19 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
@@ -44,11 +44,6 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
{
PortableRuntimeOptionsPanelWidget widget;
- public override bool IsVisible ()
- {
- return ConfiguredProject is PortableDotNetProject;
- }
-
public override Widget CreatePanelWidget ()
{
return (widget = new PortableRuntimeOptionsPanelWidget ((PortableDotNetProject) ConfiguredProject, ItemConfigurations));
@@ -72,6 +67,8 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
Dictionary<CheckButton, ComboBox> comboboxes = new Dictionary<CheckButton, ComboBox> ();
PortableDotNetProject project;
TargetFramework target;
+ HBox warningHBox;
+ Label warning;
static void InitProfiles ()
{
@@ -174,6 +171,9 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
AddSingleOptionCheckbox (kvp.Key, kvp.Value);
}
}
+
+ AddWarningLabel ();
+ UpdateWarning ();
}
IEnumerable<TargetFramework> GetPortableTargetFrameworks ()
@@ -292,6 +292,26 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
vbox1.PackStart (alignment, false, false, 0);
}
+ void AddWarningLabel ()
+ {
+ var alignment = new Alignment (0.0f, 0.5f, 1.0f, 1.0f) { LeftPadding = 18 };
+ var image = new Image (GetType ().Assembly, "warning-16.png");
+
+ warning = new Label ("");
+ warning.SetAlignment (0.0f, 0.5f);
+ warning.Show ();
+ image.Show ();
+
+ warningHBox = new HBox (false, 6);
+ warningHBox.PackStart (image, false, false, 0);
+ warningHBox.PackStart (warning, false, true, 0);
+
+ alignment.Child = warningHBox;
+ alignment.Show ();
+
+ vbox1.PackStart (alignment, false, false, 0);
+ }
+
List<TargetFramework> GetTargetFrameworks (ComboBox combo)
{
TreeIter iter;
@@ -357,12 +377,26 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
return smallest;
}
+ void UpdateWarning ()
+ {
+ if (target.SupportedFrameworks.Count > 0) {
+ warningHBox.Hide ();
+ return;
+ }
+
+ var moniker = target.Id.Profile == null ? TargetFrameworkMoniker.PORTABLE_4_0 : target.Id;
+ warning.LabelProp = GettextCatalog.GetString ("The {0} framework is not installed.", moniker);
+
+ warningHBox.Show ();
+ }
+
void TargetFrameworkChanged (CheckButton check, List<TargetFramework> targetFrameworks)
{
if (!check.Active)
targetFrameworks = new List<TargetFramework> (GetPortableTargetFrameworks ());
target = GetTargetFramework (check, targetFrameworks);
+ UpdateWarning ();
}
void TargetFrameworkChanged (CheckButton check, ComboBox combo)
@@ -375,6 +409,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
targetFrameworks = GetTargetFrameworks (combo);
target = GetTargetFramework (check, targetFrameworks);
+ UpdateWarning ();
}
public void Store ()
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/RuntimeOptionsPanel.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/RuntimeOptionsPanel.cs
index b0d43e2..5408c00 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/RuntimeOptionsPanel.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/RuntimeOptionsPanel.cs
@@ -46,12 +46,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
internal class RuntimeOptionsPanel : ItemOptionsPanel
{
RuntimeOptionsPanelWidget widget;
-
- public override bool IsVisible ()
- {
- return (ConfiguredProject is DotNetProject) && !(ConfiguredProject is PortableDotNetProject);
- }
-
+
public override Widget CreatePanelWidget()
{
return (widget = new RuntimeOptionsPanelWidget ((DotNetProject)ConfiguredProject, ItemConfigurations));
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
index 3306b6d..7b487a3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
@@ -25,13 +25,14 @@
// THE SOFTWARE.
using System;
+using System.Linq;
using System.IO;
using System.Collections.Generic;
using MonoDevelop.Core;
using MonoDevelop.Projects;
-
using Gtk;
+
namespace MonoDevelop.Ide.Projects
{
public partial class ConfirmProjectDeleteDialog : Gtk.Dialog
@@ -106,8 +107,17 @@ namespace MonoDevelop.Ide.Projects
}
}
}
+
+ if (item is SolutionItem) {
+ var sol = ((SolutionItem)item).ParentSolution;
+ var bdir = item.BaseDirectory;
+ if (sol.GetItemFiles (false).Any (f => f.IsChildPathOf (bdir)) || sol.GetAllSolutionItems<SolutionEntityItem> ().Any (it => it != item && it.GetItemFiles (true).Any (f => f.IsChildPathOf (bdir)))) {
+ radioDeleteAll.Sensitive = false;
+ labelProjectDir.Text = GettextCatalog.GetString ("Project directory can't be deleted since it contains files from other projects or solutions");
+ }
+ }
- if (item.BaseDirectory.FileName == item.Name) {
+ if (item.BaseDirectory.FileName == item.Name && radioDeleteAll.Sensitive) {
radioDeleteAll.Active = true;
fileList.Sensitive = false;
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/IdeFileSystemExtensionExtension.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/IdeFileSystemExtensionExtension.cs
new file mode 100644
index 0000000..85714f5
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/IdeFileSystemExtensionExtension.cs
@@ -0,0 +1,77 @@
+//
+// IdeProjectServiceExtension.cs
+//
+// Author:
+// Lluis Sanchez <lluis at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc.
+//
+// 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.Linq;
+using MonoDevelop.Projects;
+using MonoDevelop.Core.FileSystem;
+using System.Collections.Generic;
+using MonoDevelop.Core;
+using System.IO;
+
+namespace MonoDevelop.Ide.Projects
+{
+ class IdeFileSystemExtensionExtension: FileSystemExtension
+ {
+ public override bool CanHandlePath (FilePath path, bool isDirectory)
+ {
+ return !isDirectory;
+ }
+
+ public override void RequestFileEdit (System.Collections.Generic.IEnumerable<MonoDevelop.Core.FilePath> files)
+ {
+ base.RequestFileEdit (files);
+
+ if (!IdeApp.IsInitialized)
+ return;
+
+ List<FilePath> readOnlyFiles = new List<FilePath> ();
+ foreach (var f in files) {
+ if (File.Exists (f) && File.GetAttributes (f).HasFlag (FileAttributes.ReadOnly))
+ readOnlyFiles.Add (f);
+ }
+ string error;
+ if (readOnlyFiles.Count == 1)
+ error = GettextCatalog.GetString ("File {0} is read-only", readOnlyFiles [0].FileName);
+ else if (readOnlyFiles.Count > 1) {
+ var f1 = string.Join (", ", readOnlyFiles.Take (readOnlyFiles.Count - 1).ToArray ());
+ var f2 = readOnlyFiles [readOnlyFiles.Count - 1];
+ error = GettextCatalog.GetString ("Files {0} and {1} are read-only", f1, f2);
+ } else
+ return;
+
+ var btn = new AlertButton (readOnlyFiles.Count == 1 ? GettextCatalog.GetString ("Make Writtable") : GettextCatalog.GetString ("Make Writtable"));
+ var res = MessageService.AskQuestion (error, GettextCatalog.GetString ("Would you like MonoDevelop to attempt to make the file writable and try again?"), btn, AlertButton.Cancel);
+ if (res == AlertButton.Cancel)
+ throw new UserException (error) { AlreadyReportedToUser = true };
+
+ foreach (var f in readOnlyFiles) {
+ var atts = File.GetAttributes (f);
+ File.SetAttributes (f, atts & ~FileAttributes.ReadOnly);
+ }
+ }
+ }
+}
+
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
index 524c68e..3d8f4c8 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
@@ -377,7 +377,7 @@ namespace MonoDevelop.Ide.Projects
}
// Fill in a default name if text entry is empty or contains a default name
- if ((string.IsNullOrEmpty (filename) || (previousDefaultEntryText == filename)) && !string.IsNullOrEmpty (template.DefaultFilename)) {
+ if (string.IsNullOrEmpty (filename) || previousDefaultEntryText == filename) {
previousDefaultEntryText = template.DefaultFilename;
name = template.DefaultFilename;
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
index 5bcd566..8f0f3ae 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
@@ -26,6 +26,8 @@
using System;
using System.Collections.Generic;
+using System.Text.RegularExpressions;
+
using Gtk;
using MonoDevelop.Core;
using MonoDevelop.Projects;
@@ -256,12 +258,12 @@ namespace MonoDevelop.Ide.Projects
if (filters != null) {
pattern = filters[fileTypeCombo.Active].Patterns [0];
}
- pattern = System.Text.RegularExpressions.Regex.Escape (pattern);
+ pattern = Regex.Escape (pattern);
pattern = pattern.Replace ("\\*",".*");
pattern = pattern.Replace ("\\?",".");
pattern = pattern.Replace ("\\|","$|^");
pattern = "^" + pattern + "$";
- System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex (pattern);
+ var regex = new Regex (pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
string dir = GetSelectedDirectory ().ToString ();
foreach (ProjectFile pf in project.Files) {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
index b8b536c..d0a60c1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
@@ -38,6 +38,7 @@ using MonoDevelop.Components;
using MonoDevelop.Ide.Commands;
using MonoDevelop.Components.Commands;
using System.IO;
+using Mono.TextEditor;
namespace MonoDevelop.Ide.Projects
{
@@ -243,7 +244,6 @@ namespace MonoDevelop.Ide.Projects
void InsertFilterEntry ()
{
- filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)");
filterEntry.KeyPressEvent += HandleFilterEntryKeyPressEvent;
filterEntry.Activated += HandleFilterEntryActivated;
filterEntry.Changed += delegate {
@@ -275,10 +275,13 @@ namespace MonoDevelop.Ide.Projects
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
- if (evnt.Key == Gdk.Key.f && evnt.State == Gdk.ModifierType.ControlMask) {
+ bool complete;
+ var accels = KeyBindingManager.AccelsFromKey (evnt, out complete);
+ if (complete && accels.Any (a => a.Equals (combinedBox.SearchKeyShortcut))) {
filterEntry.HasFocus = true;
return false;
}
+
return base.OnKeyPressEvent (evnt);
}
@@ -435,6 +438,7 @@ namespace MonoDevelop.Ide.Projects
class CombinedBox: Gtk.EventBox
{
SearchEntry filterEntry;
+ KeyboardShortcut searchShortcut;
public SearchEntry FilterEntry {
get { return filterEntry; }
@@ -447,17 +451,38 @@ namespace MonoDevelop.Ide.Projects
filterEntry.Ready = true;
filterEntry.ForceFilterButtonVisible = true;
filterEntry.Entry.CanFocus = true;
- filterEntry.EmptyMessage = GettextCatalog.GetString ("Search (Control+F)");
filterEntry.RoundedShape = true;
filterEntry.HasFrame = true;
filterEntry.Parent = this;
filterEntry.Show ();
+
+ SearchKeyShortcut = new KeyboardShortcut (
+ Gdk.Key.f, Platform.IsMac? Gdk.ModifierType.MetaMask : Gdk.ModifierType.ControlMask
+ );
+ }
+
+ public KeyboardShortcut SearchKeyShortcut {
+ get { return searchShortcut; }
+ set {
+ searchShortcut = value;
+ var bindingLabel = KeyBindingManager.BindingToDisplayLabel (new KeyBinding (searchShortcut), false);
+ filterEntry.EmptyMessage = GettextCatalog.GetString ("Search ({0})", bindingLabel);
+ }
}
protected override void ForAll (bool include_internals, Callback callback)
{
base.ForAll (include_internals, callback);
- callback (filterEntry);
+ if (filterEntry != null)
+ callback (filterEntry);
+ }
+
+ protected override void OnRemoved (Widget widget)
+ {
+ if (widget == filterEntry)
+ filterEntry = null;
+ else
+ base.OnRemoved (widget);
}
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
index 31cb5f3..6d0fef6 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
@@ -108,6 +108,7 @@ namespace MonoDevelop.Ide.Tasks
{
parentObject = error.SourceTarget;
file = error.FileName;
+ this.owner = owner;
description = error.ErrorText;
column = error.Column;
line = error.Line;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/Ambience.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/Ambience.cs
index f11984c..6562136 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/Ambience.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/Ambience.cs
@@ -113,36 +113,36 @@ namespace MonoDevelop.Ide.TypeSystem
return "null entity: " + (trace != null && trace.Length > 2 ? trace [2] : "unknown location");
}
string result = null;
- switch (entity.EntityType) {
- case EntityType.Constructor:
+ switch (entity.SymbolKind) {
+ case SymbolKind.Constructor:
result = GetConstructorString ((IMethod)entity, settings);
break;
- case EntityType.Destructor:
+ case SymbolKind.Destructor:
result = GetDestructorString ((IMethod)entity, settings);
break;
- case EntityType.Event:
+ case SymbolKind.Event:
result = GetEventString ((IEvent)entity, settings);
break;
- case EntityType.Field:
+ case SymbolKind.Field:
result = GetFieldString ((IField)entity, settings);
break;
- case EntityType.Indexer:
+ case SymbolKind.Indexer:
result = GetPropertyString ((IProperty)entity, settings);
break;
- case EntityType.Method:
+ case SymbolKind.Method:
result = GetMethodString ((IMethod)entity, settings);
break;
- case EntityType.Operator:
+ case SymbolKind.Operator:
result = GetMethodString ((IMethod)entity, settings);
break;
- case EntityType.Property:
+ case SymbolKind.Property:
result = GetPropertyString ((IProperty)entity, settings);
break;
- case EntityType.TypeDefinition:
+ case SymbolKind.TypeDefinition:
result = GetTypeString ((ITypeDefinition)entity, settings);
break;
default:
- throw new ArgumentOutOfRangeException ("EntityType", "Unknown entity type:" + entity.EntityType);
+ throw new ArgumentOutOfRangeException ("SymbolKind", "Unknown entity type:" + entity.SymbolKind);
}
result = settings.PostProcess (entity, result);
return result;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
index bde503e..506f6b3 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
@@ -208,8 +208,8 @@ namespace MonoDevelop.Ide.TypeSystem
if (cref.Length < 2)
return cref;
try {
- var entity = new DocumentationComment ("", ctx).ResolveCref (cref);
-
+ var entity = new DocumentationComment ("", ctx).ResolveCref (cref.Replace("<", "{").Replace(">", "}"));
+
if (entity != null) {
var ambience = new ICSharpCode.NRefactory.CSharp.CSharpAmbience ();
ambience.ConversionFlags = ConversionFlags.ShowParameterList | ConversionFlags.ShowParameterNames | ConversionFlags.ShowTypeParameterList;
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/CodeGenerationService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/CodeGenerationService.cs
index 573b9e9..73f24a0 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/CodeGenerationService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/CodeGenerationService.cs
@@ -38,6 +38,7 @@ using ICSharpCode.NRefactory;
using MonoDevelop.Ide.TypeSystem;
using MonoDevelop.Ide;
using ICSharpCode.NRefactory.CSharp.TypeSystem;
+using System.Threading.Tasks;
namespace MonoDevelop.Ide.TypeSystem
{
@@ -106,6 +107,62 @@ namespace MonoDevelop.Ide.TypeSystem
}
}
}
+
+ public static Task<bool> InsertMemberWithCursor (
+ string operation, ITypeDefinition parentType, IUnresolvedTypeDefinition part,
+ IUnresolvedMember newMember, bool implementExplicit = false)
+ {
+ var tcs = new TaskCompletionSource<bool>();
+ if (parentType == null)
+ return tcs.Task;
+ part = part ?? parentType.Parts.FirstOrDefault ();
+ if (part == null)
+ return tcs.Task;
+
+ var loadedDocument = IdeApp.Workbench.OpenDocument (part.Region.FileName);
+ loadedDocument.RunWhenLoaded (delegate {
+ var editor = loadedDocument.Editor;
+ var loc = part.Region.Begin;
+ var parsedDocument = loadedDocument.UpdateParseDocument ();
+ var declaringType = parsedDocument.GetInnermostTypeDefinition (loc);
+ var mode = new InsertionCursorEditMode (
+ editor.Parent,
+ CodeGenerationService.GetInsertionPoints (loadedDocument, declaringType));
+ if (mode.InsertionPoints.Count == 0) {
+ MessageService.ShowError (
+ GettextCatalog.GetString ("No valid insertion point can be found in type '{0}'.", declaringType.Name)
+ );
+ return;
+ }
+ var suitableInsertionPoint = GetSuitableInsertionPoint (mode.InsertionPoints, part, newMember);
+ if (suitableInsertionPoint != null)
+ mode.CurIndex = mode.InsertionPoints.IndexOf (suitableInsertionPoint);
+ else
+ mode.CurIndex = 0;
+
+ var helpWindow = new Mono.TextEditor.PopupWindow.InsertionCursorLayoutModeHelpWindow () {
+ TransientFor = IdeApp.Workbench.RootWindow,
+ TitleText = operation
+ };
+ helpWindow.Shown += (s, a) => DesktopService.RemoveWindowShadow (helpWindow);
+ mode.HelpWindow = helpWindow;
+
+ mode.StartMode ();
+ mode.Exited += delegate(object s, InsertionCursorEventArgs iCArgs) {
+ if (!iCArgs.Success) {
+ tcs.SetResult (false);
+ return;
+ }
+ var generator = CreateCodeGenerator (editor, parentType.Compilation);
+ generator.IndentLevel = CalculateBodyIndentLevel (declaringType);
+ var generatedCode = generator.CreateMemberImplementation (parentType, part, newMember, implementExplicit);
+ mode.InsertionPoints[mode.CurIndex].Insert (editor, generatedCode.Code);
+ tcs.SetResult (true);
+ };
+ });
+
+ return tcs.Task;
+ }
public static int CalculateBodyIndentLevel (IUnresolvedTypeDefinition declaringType)
{
@@ -342,20 +399,20 @@ namespace MonoDevelop.Ide.TypeSystem
static InsertionPoint GetSuitableInsertionPoint (IEnumerable<InsertionPoint> points, IUnresolvedTypeDefinition cls, IUnresolvedMember member)
{
var mainPart = cls;
- switch (member.EntityType) {
- case EntityType.Field:
+ switch (member.SymbolKind) {
+ case SymbolKind.Field:
return GetNewFieldPosition (points, mainPart);
- case EntityType.Method:
- case EntityType.Constructor:
- case EntityType.Destructor:
- case EntityType.Operator:
+ case SymbolKind.Method:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
+ case SymbolKind.Operator:
return GetNewMethodPosition (points, mainPart);
- case EntityType.Event:
+ case SymbolKind.Event:
return GetNewEventPosition (points, mainPart);
- case EntityType.Property:
+ case SymbolKind.Property:
return GetNewPropertyPosition (points, mainPart);
}
- throw new InvalidOperationException ("Invalid member type: " + member.EntityType);
+ throw new InvalidOperationException ("Invalid member type: " + member.SymbolKind);
}
static InsertionPoint GetSuitableInsertionPoint (IEnumerable<InsertionPoint> points, IUnresolvedTypeDefinition cls, CodeTypeMember mem)
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDocDocumentationProvider.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDocDocumentationProvider.cs
index 9305ea2..67e8fd2 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDocDocumentationProvider.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDocDocumentationProvider.cs
@@ -66,7 +66,7 @@ namespace MonoDevelop.Ide.TypeSystem
var helpTree = MonoDevelop.Projects.HelpService.HelpTree;
if (helpTree == null)
return null;
- if (entity.EntityType == EntityType.TypeDefinition) {
+ if (entity.SymbolKind == SymbolKind.TypeDefinition) {
doc = helpTree.GetHelpXml (idString);
} else {
var parentId = entity.DeclaringTypeDefinition.GetIdString ();
@@ -95,20 +95,20 @@ namespace MonoDevelop.Ide.TypeSystem
public XmlNode SelectNode (XmlDocument doc, IEntity entity)
{
- switch (entity.EntityType) {
- case EntityType.None:
- case EntityType.TypeDefinition:
- case EntityType.Field:
- case EntityType.Property:
- case EntityType.Indexer:
- case EntityType.Event:
+ switch (entity.SymbolKind) {
+ case SymbolKind.None:
+ case SymbolKind.TypeDefinition:
+ case SymbolKind.Field:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
+ case SymbolKind.Event:
return doc.SelectSingleNode ("/Type/Members/Member[@MemberName='" + entity.Name + "']");
- case EntityType.Method:
- case EntityType.Operator:
- case EntityType.Destructor:
+ case SymbolKind.Method:
+ case SymbolKind.Operator:
+ case SymbolKind.Destructor:
return SelectOverload (doc.SelectNodes ("/Type/Members/Member[@MemberName='" + entity.Name + "']"), (IParameterizedMember)entity);
- case EntityType.Constructor:
+ case SymbolKind.Constructor:
return SelectOverload (doc.SelectNodes ("/Type/Members/Member[@MemberName='.ctor']"), (IParameterizedMember)entity);
default:
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/StockIcons.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/StockIcons.cs
index e5f9d72..bd7eea1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/StockIcons.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/StockIcons.cs
@@ -199,18 +199,18 @@ namespace MonoDevelop.Ide.TypeSystem
public static string GetStockIcon (this IEntity entity, bool showAccessibility = true)
{
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
return GetStockIcon ((IType)entity);
- case EntityType.Field:
+ case SymbolKind.Field:
if (showAccessibility)
return fieldIconTable [(int)entity.Accessibility];
else
return fieldIconTable [0];
- case EntityType.Method:
- case EntityType.Constructor:
- case EntityType.Destructor:
- case EntityType.Operator:
+ case SymbolKind.Method:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
+ case SymbolKind.Operator:
if (showAccessibility) {
if (((IMethod)entity).IsExtensionMethod)
return extensionMethodIconTable [(int)entity.Accessibility];
@@ -220,13 +220,13 @@ namespace MonoDevelop.Ide.TypeSystem
return extensionMethodIconTable [0];
return methodIconTable [0];
}
- case EntityType.Property:
- case EntityType.Indexer:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
if (showAccessibility)
return propertyIconTable [(int)entity.Accessibility];
else
return propertyIconTable [0];
- case EntityType.Event:
+ case SymbolKind.Event:
if (showAccessibility)
return eventIconTable [(int)entity.Accessibility];
else
@@ -236,29 +236,29 @@ namespace MonoDevelop.Ide.TypeSystem
}
public static string GetStockIcon (this IUnresolvedEntity entity, bool showAccessibility = true)
{
- switch (entity.EntityType) {
- case EntityType.TypeDefinition:
+ switch (entity.SymbolKind) {
+ case SymbolKind.TypeDefinition:
return GetStockIcon ((IUnresolvedTypeDefinition)entity);
- case EntityType.Field:
+ case SymbolKind.Field:
if (showAccessibility)
return fieldIconTable [(int)entity.Accessibility];
else
return fieldIconTable [0];
- case EntityType.Method:
- case EntityType.Constructor:
- case EntityType.Destructor:
- case EntityType.Operator:
+ case SymbolKind.Method:
+ case SymbolKind.Constructor:
+ case SymbolKind.Destructor:
+ case SymbolKind.Operator:
if (showAccessibility)
return methodIconTable [(int)entity.Accessibility];
else
return methodIconTable [0];
- case EntityType.Property:
- case EntityType.Indexer:
+ case SymbolKind.Property:
+ case SymbolKind.Indexer:
if (showAccessibility)
return propertyIconTable [(int)entity.Accessibility];
else
return propertyIconTable [0];
- case EntityType.Event:
+ case SymbolKind.Event:
if (showAccessibility)
return eventIconTable [(int)entity.Accessibility];
else
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
index 0f197ba..3a347c6 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
@@ -49,6 +49,8 @@ using ICSharpCode.NRefactory.CSharp;
using MonoDevelop.Ide.Extensions;
using MonoDevelop.Core.Assemblies;
using System.Text;
+using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.Completion;
namespace MonoDevelop.Ide.TypeSystem
{
@@ -168,7 +170,7 @@ namespace MonoDevelop.Ide.TypeSystem
public static class TypeSystemService
{
- const string CurrentVersion = "1.1.1";
+ const string CurrentVersion = "1.1.3";
static List<TypeSystemParserNode> parsers;
static string[] filesSkippedInParseThread = new string[0];
@@ -350,6 +352,8 @@ namespace MonoDevelop.Ide.TypeSystem
static object projectWrapperUpdateLock = new object ();
public static ParsedDocument ParseFile (Project project, string fileName, string mimeType, TextReader content)
{
+ if (fileName == null)
+ throw new ArgumentNullException ("fileName");
var parser = GetParser (mimeType);
if (parser == null)
return null;
@@ -513,6 +517,21 @@ namespace MonoDevelop.Ide.TypeSystem
return null;
}
+ /// <summary>
+ /// Gets the cache directory for a projects derived data cache directory.
+ /// If forceCreation is set to false the method may return null, if the cache doesn't exist.
+ /// </summary>
+ /// <returns>The cache directory.</returns>
+ /// <param name="project">The project to get the cache for.</param>
+ /// <param name="forceCreation">If set to <c>true</c> the creation is forced and the method doesn't return null.</param>
+ public static string GetCacheDirectory (Project project, bool forceCreation = false)
+ {
+ var result = GetCacheDirectory (project.FileName);
+ if (forceCreation && result == null)
+ result = CreateCacheDirectory (project.FileName);
+ return result;
+ }
+
struct CacheDirectoryInfo
{
public static readonly CacheDirectoryInfo Empty = new CacheDirectoryInfo ();
@@ -591,19 +610,22 @@ namespace MonoDevelop.Ide.TypeSystem
return null;
}
}
-
+
+ static FastSerializer sharedSerializer = new FastSerializer ();
+
static T DeserializeObject<T> (string path) where T : class
{
var t = Counters.ParserService.ObjectDeserialized.BeginTiming (path);
try {
using (var fs = new FileStream (path, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.SequentialScan)) {
using (var reader = new BinaryReaderWith7BitEncodedInts (fs)) {
- var s = new FastSerializer ();
- return (T)s.Deserialize (reader);
+ lock (sharedSerializer) {
+ return (T)sharedSerializer.Deserialize (reader);
+ }
}
}
} catch (Exception e) {
- LoggingService.LogError ("Error while reading type system cache.", e);
+ LoggingService.LogError ("Error while trying to deserialize " + typeof (T).FullName + ".", e);
return default(T);
} finally {
t.Dispose ();
@@ -619,8 +641,9 @@ namespace MonoDevelop.Ide.TypeSystem
try {
using (var fs = new FileStream (path, FileMode.Create, FileAccess.Write)) {
using (var writer = new BinaryWriterWith7BitEncodedInts (fs)) {
- FastSerializer s = new FastSerializer ();
- s.Serialize (writer, obj);
+ lock (sharedSerializer) {
+ sharedSerializer.Serialize (writer, obj);
+ }
}
}
} catch (Exception e) {
@@ -702,7 +725,7 @@ namespace MonoDevelop.Ide.TypeSystem
{
if (!wrapper.WasChanged)
return;
- string cacheDir = GetCacheDirectory (project.FileName) ?? CreateCacheDirectory (project.FileName);
+ string cacheDir = GetCacheDirectory (project, true);
TouchCache (cacheDir);
string fileName = Path.GetTempFileName ();
@@ -888,7 +911,7 @@ namespace MonoDevelop.Ide.TypeSystem
if (extensionObjects.TryGetValue (typeof (T), out result))
return (T)result;
- string cacheDir = GetCacheDirectory (Project.FileName);
+ string cacheDir = GetCacheDirectory (Project);
if (cacheDir == null)
return default(T);
@@ -906,6 +929,23 @@ namespace MonoDevelop.Ide.TypeSystem
return default (T);
}
+ void ClearCachedCompilations ()
+ {
+ // Need to clear this compilation & all compilations that reference this directly or indirectly
+ var stack = new Stack<ProjectContentWrapper> ();
+ stack.Push (this);
+ var cleared = new HashSet<ProjectContentWrapper> ();
+ while (stack.Count > 0) {
+ var cur = stack.Pop ();
+ if (cleared.Contains (cur))
+ continue;
+ cleared.Add (cur);
+ cur.compilation = null;
+ foreach (var project in cur.ReferencedProjects)
+ stack.Push (GetProjectContentWrapper (project));
+ }
+ }
+
public void UpdateContent (Func<IProjectContent, IProjectContent> updateFunc)
{
lock (this) {
@@ -913,9 +953,7 @@ namespace MonoDevelop.Ide.TypeSystem
((LazyProjectLoader)Content).ContextTask.Wait ();
}
Content = updateFunc (Content);
- // Need to clear this compilation & all compilations that reference this directly or indirectly
- foreach (var wrapper in projectContents.Values)
- wrapper.compilation = null;
+ ClearCachedCompilations ();
WasChanged = true;
}
}
@@ -1048,7 +1086,7 @@ namespace MonoDevelop.Ide.TypeSystem
static IProjectContent LoadProjectCache (Project project)
{
- string cacheDir = GetCacheDirectory (project.FileName);
+ string cacheDir = GetCacheDirectory (project);
if (cacheDir == null) {
return null;
}
@@ -1321,9 +1359,7 @@ namespace MonoDevelop.Ide.TypeSystem
});
if (dotNetProject != null) {
- Task.Factory.StartNew (delegate {
- GetFrameworkLookup (dotNetProject);
- });
+ StartFrameworkLookup (dotNetProject);
}
OnProjectContentLoaded (new ProjectContentEventArgs (project, wrapper.Content));
@@ -1523,7 +1559,7 @@ namespace MonoDevelop.Ide.TypeSystem
}
#endregion
-
+ /*
class SimpleAssemblyResolver : IAssemblyResolver
{
string lookupPath;
@@ -1606,20 +1642,16 @@ namespace MonoDevelop.Ide.TypeSystem
ReaderParameters parameters = new ReaderParameters ();
parameters.AssemblyResolver = new DefaultAssemblyResolver (); // new SimpleAssemblyResolver (Path.GetDirectoryName (fileName));
return AssemblyDefinition.ReadAssembly (fileName, parameters);
- }
+ }*/
static bool GetXml (string baseName, MonoDevelop.Core.Assemblies.TargetRuntime runtime, out FilePath xmlFileName)
{
- string filePattern = Path.GetFileNameWithoutExtension (baseName) + ".*";
try {
- foreach (string fileName in Directory.EnumerateFileSystemEntries (Path.GetDirectoryName (baseName), filePattern)) {
- if (fileName.ToLower ().EndsWith (".xml")) {
- xmlFileName = LookupLocalizedXmlDoc (fileName);
- return true;
- }
- }
+ xmlFileName = LookupLocalizedXmlDoc (baseName);
+ if (xmlFileName != null)
+ return true;
} catch (Exception e) {
- LoggingService.LogError ("Error while retrieving file system entries.", e);
+ LoggingService.LogError ("Error while looking up XML docs.", e);
}
if (MonoDevelop.Core.Platform.IsWindows) {
@@ -1941,16 +1973,13 @@ namespace MonoDevelop.Ide.TypeSystem
}
} catch (Exception) {
}
- var asm = ReadAssembly (fileName);
- if (asm == null)
- return null;
-
+
IUnresolvedAssembly assembly;
try {
- var loader = new CecilLoader ();
+ var loader = new IkvmLoader ();
loader.IncludeInternalMembers = true;
loader.DocumentationProvider = new CombinedDocumentationProvider (fileName);
- assembly = loader.LoadAssembly (asm);
+ assembly = loader.LoadAssemblyFile (fileName);
} catch (Exception e) {
LoggingService.LogError ("Can't convert assembly: " + fileName, e);
return null;
@@ -2100,131 +2129,6 @@ namespace MonoDevelop.Ide.TypeSystem
return result;
}
- public static readonly Version FrameworkLookupVersion = new Version (1, 0, 0);
-
- [Serializable]
- public class FrameworkLookup
- {
- public Version Version {
- get;
- set;
- }
-
- Dictionary<string, List<AssemblyLookup>> typeLookup = new Dictionary<string, List<AssemblyLookup>> ();
- Dictionary<string, List<AssemblyLookup>> extensionMethodLookup = new Dictionary<string, List<AssemblyLookup>> ();
-
- public int ItemCount {
- get {
- return typeLookup.Count + extensionMethodLookup.Count;
- }
- }
-
- public FrameworkLookup ()
- {
- this.Version = FrameworkLookupVersion;
- }
-
- void AddExtensionMethodlookup(IUnresolvedMethod method, SystemAssembly assembly)
- {
- List<AssemblyLookup> list;
- if (!extensionMethodLookup.TryGetValue (method.Name, out list)) {
- list = new List<AssemblyLookup> ();
- extensionMethodLookup [method.Name] = list;
- }
- var assemblyLookup = new AssemblyLookup (assembly, method.DeclaringTypeDefinition.Namespace);
- if (!list.Any (a => a.Equals (assemblyLookup))) {
- list.Add (assemblyLookup);
- }
-
- }
-
- public IEnumerable<AssemblyLookup> LookupExtensionMethod (string identifier)
- {
- List<AssemblyLookup> list;
- if (!extensionMethodLookup.TryGetValue (identifier, out list))
- return Enumerable.Empty<AssemblyLookup> ();
- return list;
- }
-
- public void AddLookup (IUnresolvedTypeDefinition type, SystemAssembly assembly)
- {
- List<AssemblyLookup> list;
- var id = GetIdentifier (type.Name, type.TypeParameters.Count);
- if (!typeLookup.TryGetValue (id, out list)) {
- list = new List<AssemblyLookup> ();
- typeLookup [id] = list;
- }
- var assemblyLookup = new AssemblyLookup (assembly, type.Namespace);
- if (!list.Any (a => a.Equals (assemblyLookup))) {
- list.Add (assemblyLookup);
-
- if (type.IsSealed || type.IsStatic) {
- foreach (var method in type.Methods) {
- var m = method as DefaultUnresolvedMethod;
- if (m == null || !m.IsExtensionMethod)
- continue;
- AddExtensionMethodlookup (method, assembly);
- }
- }
- }
- }
-
- static string GetIdentifier (string identifier, int tc)
- {
- if (tc == 0)
- return identifier;
- return identifier + "`" + tc;
- }
-
- public IEnumerable<AssemblyLookup> LookupIdentifier (string name, int typeParameterCount)
- {
- var identifier = GetIdentifier (name, typeParameterCount);
- List<AssemblyLookup> list;
- if (!typeLookup.TryGetValue (identifier, out list))
- return Enumerable.Empty<AssemblyLookup> ();
- return list;
- }
-
- [Serializable]
- public class AssemblyLookup
- {
- public string Namespace { get; set; }
- public string FullName { get; set; }
- public string Package { get; set; }
-
- public AssemblyLookup (SystemAssembly assembly, string ns)
- {
- FullName = assembly.FullName;
- Package = assembly.Package.Name;
- Namespace = ns;
- }
-
- public override string ToString ()
- {
- return string.Format ("[AssemblyLookup: Namespace={0}, FullName={1}, Package={2}]", Namespace, FullName, Package);
- }
-
- public override bool Equals (object obj)
- {
- if (obj == null)
- return false;
- if (ReferenceEquals (this, obj))
- return true;
- if (obj.GetType () != typeof(AssemblyLookup))
- return false;
- AssemblyLookup other = (AssemblyLookup)obj;
- return Namespace == other.Namespace && FullName == other.FullName && Package == other.Package;
- }
-
- public override int GetHashCode ()
- {
- unchecked {
- return (Namespace != null ? Namespace.GetHashCode () : 0) ^ (FullName != null ? FullName.GetHashCode () : 0) ^ (Package != null ? Package.GetHashCode () : 0);
- }
- }
- }
- }
-
static IEnumerable<SystemAssembly> GetFrameworkAssemblies (DotNetProject netProject)
{
var assemblies = new Dictionary<string, SystemAssembly> ();
@@ -2246,40 +2150,76 @@ namespace MonoDevelop.Ide.TypeSystem
return assemblies.Values;
}
- readonly static Dictionary<string, FrameworkLookup> frameworkLookup = new Dictionary<string, FrameworkLookup> ();
- public static FrameworkLookup GetFrameworkLookup (DotNetProject netProject)
+ readonly static Dictionary<string, Task<FrameworkLookup>> frameworkLookup = new Dictionary<string, Task<FrameworkLookup>> ();
+
+ static void StartFrameworkLookup (DotNetProject netProject)
{
- FrameworkLookup result;
- string fileName;
lock (frameworkLookup) {
+ Task<FrameworkLookup> result;
if (frameworkLookup.TryGetValue (netProject.TargetFramework.Name, out result))
- return result;
- var cache = GetCacheDirectory (netProject.TargetFramework);
- fileName = Path.Combine (cache, "FrameworkLookup_" + FrameworkLookupVersion + ".dat");
- try {
- if (File.Exists (fileName)) {
- result = DeserializeObject<FrameworkLookup> (fileName);
- if (result.ItemCount > 0) {
- frameworkLookup [netProject.TargetFramework.Name] = result;
- if (result.Version == FrameworkLookupVersion)
- return result;
- }
+ return;
+ frameworkLookup[netProject.TargetFramework.Name] = Task.Factory.StartNew (delegate {
+ return GetFrameworkLookup (netProject);
+ });
+ }
+ }
+
+ public static bool TryGetFrameworkLookup (DotNetProject project, out FrameworkLookup lookup)
+ {
+ lock (frameworkLookup) {
+ Task<FrameworkLookup> result;
+ if (frameworkLookup.TryGetValue (project.TargetFramework.Name, out result)) {
+ if (!result.IsCompleted) {
+ lookup = null;
+ return false;
}
- } catch (Exception e) {
- LoggingService.LogWarning ("Can't read framework cache - recreating...", e);
- }
- result = new FrameworkLookup ();
- frameworkLookup [netProject.TargetFramework.Name] = result;
- foreach (var assembly in GetFrameworkAssemblies (netProject)) {
- var ctx = LoadAssemblyContext (assembly.Location);
- foreach (var type in ctx.Ctx.GetAllTypeDefinitions ()) {
- if (!type.IsPublic)
- continue;
- result.AddLookup (type, assembly);
+ lookup = result.Result;
+ return true;
+ }
+ }
+ lookup = null;
+ return false;
+ }
+
+ static FrameworkLookup GetFrameworkLookup (DotNetProject netProject)
+ {
+ FrameworkLookup result;
+ string fileName;
+ var cache = GetCacheDirectory (netProject.TargetFramework);
+ fileName = Path.Combine (cache, "FrameworkLookup_" + FrameworkLookup.CurrentVersion + ".dat");
+ try {
+ if (File.Exists (fileName)) {
+ result = FrameworkLookup.Load (fileName);
+ if (result != null) {
+ return result;
}
}
- SerializeObject (fileName, result);
+ } catch (Exception e) {
+ LoggingService.LogWarning ("Can't read framework cache - recreating...", e);
+ }
+
+ try {
+ using (var creator = FrameworkLookup.Create (fileName)) {
+ foreach (var assembly in GetFrameworkAssemblies (netProject)) {
+ var ctx = LoadAssemblyContext (assembly.Location);
+ foreach (var type in ctx.Ctx.GetAllTypeDefinitions ()) {
+ if (!type.IsPublic)
+ continue;
+ creator.AddLookup (assembly.Package.Name, assembly.FullName, type);
+ }
+ }
+ }
+ } catch (Exception e){
+ LoggingService.LogError ("Error while storing framework lookup", e);
+ return FrameworkLookup.Empty;
+ }
+
+ try {
+ result = FrameworkLookup.Load (fileName);
return result;
+ } catch (Exception e) {
+ LoggingService.LogError ("Error loading framework lookup", e);
+ return FrameworkLookup.Empty;
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFirstRun.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFirstRun.cs
index 7a8011f..4d51c21 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFirstRun.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFirstRun.cs
@@ -30,10 +30,11 @@ using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Components;
using System.Collections.Generic;
+using Xwt.Motion;
namespace MonoDevelop.Ide.WelcomePage
{
- public class WelcomePageFirstRun : EventBox, Animatable
+ public class WelcomePageFirstRun : EventBox, IAnimatable
{
static readonly int Padding = 35;
static readonly Gdk.Size WidgetSize = new Gdk.Size (880 + 2 * Padding, 460 + 2 * Padding);
@@ -99,6 +100,9 @@ namespace MonoDevelop.Ide.WelcomePage
ButtonHovered = false;
};
}
+
+ void IAnimatable.BatchBegin () { }
+ void IAnimatable.BatchCommit () { QueueDraw (); }
protected override void OnMapped ()
{
@@ -111,14 +115,14 @@ namespace MonoDevelop.Ide.WelcomePage
GLib.Timeout.Add (750, () => {
new Animation ()
- .Insert (0, 0.5f, new Animation ((f) => TitleOffset.Y = (int) (40 * f), start: 1, end: 0, easing: Easing.CubicInOut))
- .Insert (0.1f, 0.6f, new Animation ((f) => TextOffset.Y = (int) (40 * f), start: 1, end: 0, easing: Easing.CubicInOut))
- .Insert (0, 0.5f, new Animation ((f) => TitleOpacity = f, easing: Easing.CubicInOut))
- .Insert (0.1f, 0.6f, new Animation ((f) => TextOpacity = f, easing: Easing.CubicInOut))
- .Insert (0.3f, 0.9f, new Animation ((f) => ButtonOpacity = f, easing: Easing.CubicInOut))
- .Insert (0, 0.2f, new Animation ((f) => BackgroundOpacity = f, easing: Easing.CubicInOut))
- .Insert (0.2f, 0.7f, new Animation ((f) => IconOpacity = f, easing: Easing.CubicInOut))
- .Insert (0.2f, 0.7f, new Animation ((f) => IconScale = f, start: 0.5f, end: 1, easing: Easing.SpringOut))
+ .AddConcurrent (new Animation ((f) => TitleOffset.Y = (int) (40 * f), start: 1, end: 0, easing: Easing.CubicInOut), 0, 0.5f)
+ .AddConcurrent (new Animation ((f) => TextOffset.Y = (int) (40 * f), start: 1, end: 0, easing: Easing.CubicInOut), 0.1f, 0.6f)
+ .AddConcurrent (new Animation ((f) => TitleOpacity = f, easing: Easing.CubicInOut), 0, 0.5f)
+ .AddConcurrent (new Animation ((f) => TextOpacity = f, easing: Easing.CubicInOut), 0.1f, 0.6f)
+ .AddConcurrent (new Animation ((f) => ButtonOpacity = f, easing: Easing.CubicInOut), 0.3f, 0.9f)
+ .AddConcurrent (new Animation ((f) => BackgroundOpacity = f, easing: Easing.CubicInOut), 0, 0.2f)
+ .AddConcurrent (new Animation ((f) => IconOpacity = f, easing: Easing.CubicInOut), 0.2f, 0.7f)
+ .AddConcurrent (new Animation ((f) => IconScale = f, start: 0.5f, end: 1, easing: Easing.SpringOut), 0.2f, 0.7f)
.Commit (this, "Intro", length: 1200);
return false;
});
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
index fc98025..016d7db 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
@@ -148,7 +148,16 @@ namespace MonoDevelop.Ide.WelcomePage
Gtk.Application.Invoke (delegate { LoadNews (); });
} catch (Exception ex) {
- LoggingService.LogWarning ("Welcome Page news file could not be downloaded.", ex);
+ var agg = ex as AggregateException;
+ if (agg != null) {
+ ex = agg.Flatten ().InnerException;
+ }
+ var wex = ex as WebException;
+ if (wex != null && wex.Status == WebExceptionStatus.NameResolutionFailure) {
+ LoggingService.LogWarning ("Welcome Page news server could not be reached.");
+ } else {
+ LoggingService.LogWarning ("Welcome Page news file could not be downloaded.", ex);
+ }
} finally {
lock (updateLock)
isUpdating = false;
@@ -161,7 +170,7 @@ namespace MonoDevelop.Ide.WelcomePage
//allow DTD but not try to resolve it from web
return new XmlReaderSettings () {
CloseInput = true,
- ProhibitDtd = false,
+ DtdProcessing = DtdProcessing.Parse,
XmlResolver = null,
};
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index 9d3e997..6f55be8 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -62,6 +62,7 @@
<Reference Include="Mono.Cairo" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Design" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoDevelop.Core\MonoDevelop.Core.csproj">
@@ -116,6 +117,18 @@
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\nrefactory\ICSharpCode.NRefactory.IKVM\ICSharpCode.NRefactory.IKVM.csproj">
+ <Project>{A727169F-D94F-443F-B305-B057D7F3B420}</Project>
+ <Name>ICSharpCode.NRefactory.IKVM</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\external\ikvm\reflect\IKVM.Reflection.csproj">
+ <Project>{4CB170EF-DFE6-4A56-9E1B-A85449E827A7}</Project>
+ <Name>IKVM.Reflection</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="templates\AppConfigFile.xft.xml">
@@ -1076,6 +1089,15 @@
<EmbeddedResource Include="icons\statusConnecting-06.png">
<LogicalName>statusConnecting-06.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\variable-16.png">
+ <LogicalName>variable-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\bubble-error-icon.png">
+ <LogicalName>bubble-error-icon.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\bubble-warning-icon.png">
+ <LogicalName>bubble-warning-icon.png</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="MonoDevelop.Ide.Commands\CustomStringTagProvider.cs" />
@@ -1812,7 +1834,6 @@
<Compile Include="MonoDevelop.Ide.WelcomePage\WelcomePageListButton.cs" />
<Compile Include="MonoDevelop.Ide.WelcomePage\WelcomePageButtonBar.cs" />
<Compile Include="MonoDevelop.Ide.WelcomePage\WelcomePageBarButton.cs" />
- <Compile Include="MonoDevelop.Components\Tweener.cs" />
<Compile Include="MonoDevelop.Components\MouseTracker.cs" />
<Compile Include="MonoDevelop.Components.MainToolbar\SearchPopupSearchPattern.cs" />
<Compile Include="MonoDevelop.Components\PopoverWindowTheme.cs" />
@@ -1854,6 +1875,10 @@
<Compile Include="MonoDevelop.Components.MainToolbar\MainStatusBarContextImpl.cs" />
<Compile Include="MonoDevelop.Ide.TypeSystem\MonoDevelopProjectContent.cs" />
<Compile Include="MonoDevelop.Components.Commands\ICommandDelegator.cs" />
+ <Compile Include="MonoDevelop.Ide.Navigation\ClosedDocumentNavigationPoint.cs" />
+ <Compile Include="MonoDevelop.Ide.CustomTools\ResXFileCodeGenerator.cs" />
+ <Compile Include="MonoDevelop.Ide.CustomTools\ThreadAsyncOperation.cs" />
+ <Compile Include="MonoDevelop.Ide.Projects\IdeFileSystemExtensionExtension.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
index 5b98137..99fea3e 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
@@ -37,6 +37,7 @@ namespace MonoDevelop.Ide
public static class DesktopService
{
static PlatformService platformService;
+ static Xwt.Toolkit nativeToolkit;
static PlatformService PlatformService {
get {
@@ -64,8 +65,24 @@ namespace MonoDevelop.Ide
new EventHandler<FileEventArgs> (NotifyFileRemoved));
FileService.FileRenamed += DispatchService.GuiDispatch (
new EventHandler<FileCopyEventArgs> (NotifyFileRenamed));
+
+ // Ensure we initialize the native toolkit on the UI thread immediately
+ // so that we can safely access this property later in other threads
+ GC.KeepAlive (NativeToolkit);
}
+ /// <summary>
+ /// Returns the XWT toolkit for the native toolkit (Cocoa on Mac, WPF on Windows)
+ /// </summary>
+ /// <returns>The native toolkit.</returns>
+ public static Xwt.Toolkit NativeToolkit {
+ get {
+ if (nativeToolkit == null)
+ nativeToolkit = platformService.LoadNativeToolkit ();
+ return nativeToolkit;
+ }
+ }
+
public static IEnumerable<DesktopApplication> GetApplications (string filename)
{
return PlatformService.GetApplications (filename);
@@ -129,6 +146,9 @@ namespace MonoDevelop.Ide
return GetMimeTypeIsText (mimeType);
}
+ if (!File.Exists (file))
+ return false;
+
using (var f = File.OpenRead (file)) {
var buf = new byte[8192];
var read = f.Read (buf, 0, buf.Length);
@@ -265,5 +285,10 @@ namespace MonoDevelop.Ide
{
PlatformService.SetIsFullscreen (window, isFullscreen);
}
+
+ public static bool IsModalDialogRunning ()
+ {
+ return PlatformService.IsModalDialogRunning ();
+ }
}
}
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
index 3e96e4a..70c2215 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
@@ -103,8 +103,7 @@ namespace MonoDevelop.Ide
FilePath p = typeof(IdeStartup).Assembly.Location;
Assembly.LoadFrom (p.ParentDirectory.Combine ("Xwt.Gtk.dll"));
- Xwt.Application.Initialize (Xwt.ToolkitType.Gtk);
- Xwt.Engine.Toolkit.ExitUserCode (null);
+ Xwt.Application.InitializeAsGuest (Xwt.ToolkitType.Gtk);
//default to Windows IME on Windows
if (Platform.IsWindows && Mono.TextEditor.GtkWorkarounds.GtkMinorVersion >= 16) {
@@ -426,7 +425,7 @@ namespace MonoDevelop.Ide
bool ValidateGtkTheme (string requestedTheme, out string validTheme)
{
foreach (var theme in FailingGtkThemes) {
- if (requestedTheme == theme) {
+ if (string.Equals (requestedTheme, theme, StringComparison.OrdinalIgnoreCase)) {
string msg = theme +" theme not supported";
string desc = "Your system is using the " + theme + " GTK+ theme. This theme is known to cause stability issues in MonoDevelop. Please select another theme in the GTK+ Theme Selector.\n\nIf you click on Proceed, MonoDevelop will switch to the default GTK+ theme.";
AlertButton res = MessageService.GenericAlert (Gtk.Stock.DialogWarning, msg, desc, AlertButton.Cancel, AlertButton.Proceed);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
index 68c1a2d..676b704 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
@@ -90,17 +90,30 @@ namespace MonoDevelop.Ide
static void LoadStockIcon (StockIconCodon iconCodon, bool forceWildcard)
{
try {
- Gdk.Pixbuf pixbuf = null;
+ Gdk.Pixbuf pixbuf = null, pixbuf2x = null;
AnimatedIcon animatedIcon = null;
if (!string.IsNullOrEmpty (iconCodon.Resource) || !string.IsNullOrEmpty (iconCodon.File)) {
// using the stream directly produces a gdk warning.
byte[] buffer;
- Stream stream;
- if (iconCodon.Resource != null)
+ Stream stream, stream2x = null;
+
+ if (iconCodon.Resource != null) {
stream = iconCodon.Addin.GetResource (iconCodon.Resource);
- else
- stream = File.OpenRead (iconCodon.Addin.GetFilePath (iconCodon.File));
+ stream2x = iconCodon.Addin.GetResource2x (iconCodon.Resource);
+ }
+ else {
+ var file = iconCodon.Addin.GetFilePath (iconCodon.File);
+ stream = File.OpenRead (file);
+ var file2x = Path.Combine (Path.GetDirectoryName (file), Path.GetFileNameWithoutExtension (file) + "@2x" + Path.GetExtension (file));
+ if (File.Exists (file2x))
+ stream2x = File.OpenRead (file2x);
+ else {
+ file2x = file + "@2x";
+ if (File.Exists (file2x))
+ stream2x = File.OpenRead (file2x);
+ }
+ }
using (stream) {
if (stream == null || stream.Length < 0) {
LoggingService.LogError ("Did not find resource '{0}' in addin '{1}' for icon '{2}'",
@@ -111,6 +124,15 @@ namespace MonoDevelop.Ide
stream.Read (buffer, 0, (int)stream.Length);
}
pixbuf = new Gdk.Pixbuf (buffer);
+
+ using (stream2x) {
+ if (stream2x != null && stream2x.Length >= 0) {
+ buffer = new byte [stream2x.Length];
+ stream2x.Read (buffer, 0, (int)stream2x.Length);
+ pixbuf2x = new Gdk.Pixbuf (buffer);
+ }
+ }
+
} else if (!string.IsNullOrEmpty (iconCodon.IconId)) {
var id = GetStockIdForImageSpec (iconCodon.Addin, iconCodon.IconId, iconCodon.IconSize);
pixbuf = GetPixbuf (id, iconCodon.IconSize);
@@ -125,9 +147,11 @@ namespace MonoDevelop.Ide
Gtk.IconSize size = forceWildcard? Gtk.IconSize.Invalid : iconCodon.IconSize;
if (pixbuf != null)
- AddToIconFactory (iconCodon.StockId, pixbuf, size);
+ AddToIconFactory (iconCodon.StockId, pixbuf, pixbuf2x, size);
+
if (animatedIcon != null)
AddToAnimatedIconFactory (iconCodon.StockId, animatedIcon);
+
} catch (Exception ex) {
LoggingService.LogError (string.Format ("Error loading icon '{0}'", iconCodon.StockId), ex);
}
@@ -138,12 +162,65 @@ namespace MonoDevelop.Ide
//forces static constructor to run
}
+ static Gdk.Pixbuf Get2xIconVariant (Gdk.Pixbuf px)
+ {
+ return Mono.TextEditor.GtkWorkarounds.Get2xVariant (px);
+ }
+
+ static void Set2xIconVariant (Gdk.Pixbuf px, Gdk.Pixbuf variant2x)
+ {
+ Mono.TextEditor.GtkWorkarounds.Set2xVariant (px, variant2x);
+ }
+
+ public static Gdk.Pixbuf ScaleIcon (Gdk.Pixbuf px, int width, int height)
+ {
+ var res = px.ScaleSimple (width, height, Gdk.InterpType.Bilinear);
+
+ var icon2x = Get2xIconVariant (px);
+ if (icon2x != null)
+ Set2xIconVariant (res, ScaleIcon (icon2x, width*2, height * 2));
+ return res;
+ }
+
+ //caller should check that sizes match
+ public static Gdk.Pixbuf MergeIcons (Gdk.Pixbuf icon1, Gdk.Pixbuf icon2)
+ {
+ if (icon2 == null)
+ return icon1;
+ if (icon1 == null)
+ return icon2;
+
+ Gdk.Pixbuf res = new Gdk.Pixbuf (icon1.Colorspace, icon1.HasAlpha, icon1.BitsPerSample, icon1.Width, icon1.Height);
+ res.Fill (0);
+ icon1.CopyArea (0, 0, icon1.Width, icon1.Height, res, 0, 0);
+ icon2.Composite (res, 0, 0, icon2.Width, icon2.Height, 0, 0, 1, 1, Gdk.InterpType.Bilinear, 255);
+
+ var icon1_2x = Get2xIconVariant (icon1);
+ var icon2_2x = Get2xIconVariant (icon2);
+
+ if (icon1_2x != null || icon2_2x != null) {
+ if (icon1_2x == null)
+ icon1_2x = ScaleIcon (icon1, icon1.Width * 2, icon1.Height * 2);
+ if (icon2_2x == null)
+ icon2_2x = ScaleIcon (icon2, icon2.Width * 2, icon2.Height * 2);
+ var res2x = MergeIcons (icon1_2x, icon2_2x);
+ Set2xIconVariant (res, res2x);
+ }
+
+ return res;
+ }
+
public static Gdk.Pixbuf MakeTransparent (Gdk.Pixbuf icon, double opacity)
{
Gdk.Pixbuf result = icon.Copy ();
result.Fill (0);
result = result.AddAlpha (true, 0, 0, 0);
icon.Composite (result, 0, 0, icon.Width, icon.Height, 0, 0, 1, 1, Gdk.InterpType.Bilinear, (int)(256 * opacity));
+
+ var icon2x = Get2xIconVariant (icon);
+ if (icon2x != null)
+ Set2xIconVariant (result, MakeTransparent (icon2x, opacity));
+
return result;
}
@@ -160,6 +237,11 @@ namespace MonoDevelop.Ide
{
Gdk.Pixbuf copy = icon.Copy ();
copy.SaturateAndPixelate (copy, 0, false);
+
+ var icon2x = Get2xIconVariant (icon);
+ if (icon2x != null)
+ Set2xIconVariant (copy, MakeGrayscale (icon2x));
+
return copy;
}
@@ -182,6 +264,11 @@ namespace MonoDevelop.Ide
pix = start + copy.Rowstride;
}
}
+
+ var icon2x = Get2xIconVariant (icon);
+ if (icon2x != null)
+ Set2xIconVariant (copy, MakeInverted (icon2x));
+
return copy;
}
@@ -407,7 +494,7 @@ namespace MonoDevelop.Ide
return id;
id = "__ni_" + namedIcons.Count;
namedIcons[pixbuf] = id;
- AddToIconFactory (id, pixbuf, size);
+ AddToIconFactory (id, pixbuf, null, size);
return id;
}
@@ -429,20 +516,38 @@ namespace MonoDevelop.Ide
return GetStockIdForImageSpec (addin, filename, iconSize);
}
- static void AddToIconFactory (string stockId, Gdk.Pixbuf pixbuf, Gtk.IconSize iconSize)
+ static void AddToIconFactory (string stockId, Gdk.Pixbuf pixbuf, Gdk.Pixbuf pixbuf2x, Gtk.IconSize iconSize)
{
Gtk.IconSet iconSet = iconFactory.Lookup (stockId);
if (iconSet == null) {
iconSet = new Gtk.IconSet ();
iconFactory.Add (stockId, iconSet);
}
-
+
Gtk.IconSource source = new Gtk.IconSource ();
-
+ Gtk.IconSource source2x = null;
+
source.Pixbuf = pixbuf;
source.Size = iconSize;
source.SizeWildcarded = iconSize == Gtk.IconSize.Invalid;
+
+ if (pixbuf2x != null) {
+ if (Mono.TextEditor.GtkWorkarounds.SetSourceScale (source, 1)) {
+ Mono.TextEditor.GtkWorkarounds.SetSourceScaleWildcarded (source, false);
+ source2x = new Gtk.IconSource ();
+ source2x.Pixbuf = pixbuf2x;
+ source2x.Size = iconSize;
+ source2x.SizeWildcarded = iconSize == Gtk.IconSize.Invalid;
+ Mono.TextEditor.GtkWorkarounds.SetSourceScale (source2x, 2);
+ Mono.TextEditor.GtkWorkarounds.SetSourceScaleWildcarded (source2x, false);
+ }
+ } else {
+ Mono.TextEditor.GtkWorkarounds.SetSourceScaleWildcarded (source, true);
+ }
+
iconSet.AddSource (source);
+ if (source2x != null)
+ iconSet.AddSource (source2x);
}
static void AddToAnimatedIconFactory (string stockId, AnimatedIcon aicon)
@@ -462,14 +567,30 @@ namespace MonoDevelop.Ide
if (!hash.ContainsKey (stockId)) {
System.IO.Stream stream = addin.GetResource (id);
if (stream != null) {
+ Gdk.Pixbuf pix1, pix2 = null;
using (stream) {
- AddToIconFactory (stockId, new Gdk.Pixbuf (stream), size);
+ pix1 = new Gdk.Pixbuf (stream);
+ }
+ stream = addin.GetResource2x (id);
+ if (stream != null) {
+ using (stream) {
+ pix2 = new Gdk.Pixbuf (stream);
+ }
}
+ AddToIconFactory (stockId, pix1, pix2, size);
}
hash[stockId] = stockId;
}
return stockId;
}
+
+ static Stream GetResource2x (this RuntimeAddin addin, string id)
+ {
+ var stream = addin.GetResource (Path.GetFileNameWithoutExtension (id) + "@2x" + Path.GetExtension (id));
+ if (stream == null)
+ stream = addin.GetResource (id + "@2x");
+ return stream;
+ }
static string InternalGetStockIdFromAnimation (RuntimeAddin addin, string id, Gtk.IconSize size)
{
@@ -491,7 +612,7 @@ namespace MonoDevelop.Ide
string stockId = "__asm" + addinId + "__" + id + "__" + size;
if (!hash.ContainsKey (stockId)) {
var aicon = new AnimatedIcon (addin, id, size);
- AddToIconFactory (stockId, aicon.FirstFrame, size);
+ AddToIconFactory (stockId, aicon.FirstFrame, null, size);
AddToAnimatedIconFactory (stockId, aicon);
hash[stockId] = stockId;
}
@@ -533,27 +654,17 @@ namespace MonoDevelop.Ide
}
if (icon.Width != px.Width || icon.Height != px.Height)
- px = px.ScaleSimple (icon.Width, icon.Height, Gdk.InterpType.Bilinear);
+ px = ScaleIcon (icon, icon.Width, icon.Height);
icon = MergeIcons (icon, px);
}
if (icon != null)
- AddToIconFactory (id, icon, sz);
+ AddToIconFactory (id, icon, null, sz);
}
composedIcons[id] = id;
return id;
}
- //caller should check null and that sizes match
- static Gdk.Pixbuf MergeIcons (Gdk.Pixbuf icon1, Gdk.Pixbuf icon2)
- {
- Gdk.Pixbuf res = new Gdk.Pixbuf (icon1.Colorspace, icon1.HasAlpha, icon1.BitsPerSample, icon1.Width, icon1.Height);
- res.Fill (0);
- icon1.CopyArea (0, 0, icon1.Width, icon1.Height, res, 0, 0);
- icon2.Composite (res, 0, 0, icon2.Width, icon2.Height, 0, 0, 1, 1, Gdk.InterpType.Bilinear, 255);
- return res;
- }
-
static string GetStockIdForImageSpec (string filename, Gtk.IconSize size)
{
return GetStockIdForImageSpec (null, filename, size);
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
index 9f72029..a1428a1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
@@ -442,6 +442,9 @@ namespace MonoDevelop.Ide
{
public AlertButton ShowException (Gtk.Window parent, string title, string message, Exception e, params AlertButton[] buttons)
{
+ if ((buttons == null || buttons.Length == 0) && (e is UserException) && ((UserException)e).AlreadyReportedToUser)
+ return AlertButton.Ok;
+
var exceptionDialog = new ExceptionDialog () {
Buttons = buttons ?? new AlertButton[] { AlertButton.Ok },
Title = title ?? GettextCatalog.GetString ("An error has occurred"),
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
index 0acbd61..b7969c1 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
@@ -527,10 +527,8 @@ namespace MonoDevelop.Ide
public void MarkFileDirty (string filename)
{
- Project entry = IdeApp.Workspace.GetProjectContainingFile (filename);
- if (entry != null) {
- entry.SetNeedsBuilding (true);
- }
+ FileInfo fi = new FileInfo (filename);
+ fi.LastWriteTime = DateTime.Now;
}
public void ShowOptions (IWorkspaceObject entry)
@@ -552,7 +550,6 @@ namespace MonoDevelop.Ide
optionsDialog.SelectPanel (panelId);
if (MessageService.RunCustomDialog (optionsDialog) == (int)Gtk.ResponseType.Ok) {
- selectedProject.SetNeedsBuilding (true);
foreach (object ob in optionsDialog.ModifiedObjects) {
if (ob is Solution) {
Save ((Solution)ob);
@@ -588,8 +585,6 @@ namespace MonoDevelop.Ide
if (panelId != null)
optionsDialog.SelectPanel (panelId);
if (MessageService.RunCustomDialog (optionsDialog) == (int) Gtk.ResponseType.Ok) {
- if (entry is IBuildTarget)
- ((IBuildTarget)entry).SetNeedsBuilding (true, IdeApp.Workspace.ActiveConfiguration);
if (entry is IWorkspaceFileObject)
Save ((IWorkspaceFileObject) entry);
else {
diff --git a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
index 7d918d3..b00735b 100644
--- a/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
+++ b/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
@@ -372,24 +372,21 @@ namespace MonoDevelop.Ide
throw new UserException (GettextCatalog.GetString ("No solution has been selected."));
}
+ [Obsolete ("This method will be removed in future releases")]
public bool NeedsBuilding ()
{
- return NeedsBuilding (IdeApp.Workspace.ActiveConfiguration) || IsDirtyFileInCombine;
+ return true;
}
+ [Obsolete ("This method will be removed in future releases")]
public bool NeedsBuilding (ConfigurationSelector configuration)
{
- foreach (WorkspaceItem it in Items) {
- if (it.NeedsBuilding (configuration))
- return true;
- }
- return false;
+ return true;
}
+ [Obsolete ("This method will be removed in future releases")]
public void SetNeedsBuilding (bool needsBuilding, ConfigurationSelector configuration)
{
- foreach (WorkspaceItem it in Items)
- it.SetNeedsBuilding (needsBuilding, configuration);
}
bool IsDirtyFileInCombine {
diff --git a/src/core/MonoDevelop.Ide/gtk-gui/generated.cs b/src/core/MonoDevelop.Ide/gtk-gui/generated.cs
index 0ada9fc..d23ef38 100644
--- a/src/core/MonoDevelop.Ide/gtk-gui/generated.cs
+++ b/src/core/MonoDevelop.Ide/gtk-gui/generated.cs
@@ -5,7 +5,7 @@ namespace Stetic
internal class Gui
{
private static bool initialized;
-
+
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
@@ -13,12 +13,12 @@ namespace Stetic
}
}
}
-
+
internal class BinContainer
{
private Gtk.Widget child;
private Gtk.UIManager uimanager;
-
+
public static BinContainer Attach (Gtk.Bin bin)
{
BinContainer bc = new BinContainer ();
@@ -27,32 +27,32 @@ namespace Stetic
bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc;
}
-
+
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{
if ((this.child != null)) {
args.Requisition = this.child.SizeRequest ();
}
}
-
+
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{
if ((this.child != null)) {
this.child.Allocation = args.Allocation;
}
}
-
+
private void OnAdded (object sender, Gtk.AddedArgs args)
{
this.child = args.Widget;
}
-
+
public void SetUiManager (Gtk.UIManager uim)
{
this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized);
}
-
+
private void OnRealized (object sender, System.EventArgs args)
{
if ((this.uimanager != null)) {
@@ -65,7 +65,7 @@ namespace Stetic
}
}
}
-
+
internal class IconLoader
{
public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
@@ -99,14 +99,14 @@ namespace Stetic
}
}
}
-
+
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
-
+
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;
diff --git a/src/core/MonoDevelop.Ide/icons/bubble-error-icon.png b/src/core/MonoDevelop.Ide/icons/bubble-error-icon.png
new file mode 100644
index 0000000..49af322
Binary files /dev/null and b/src/core/MonoDevelop.Ide/icons/bubble-error-icon.png differ
diff --git a/src/core/MonoDevelop.Ide/icons/bubble-warning-icon.png b/src/core/MonoDevelop.Ide/icons/bubble-warning-icon.png
new file mode 100644
index 0000000..566ffdf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/icons/bubble-warning-icon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Commands.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Commands.addin.xml
new file mode 100644
index 0000000..ae9bfce
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Commands.addin.xml
@@ -0,0 +1,988 @@
+<ExtensionModel>
+
+<ExtensionNodeSet id="MonoDevelop.Components.Commands.CommandSet">
+ <ExtensionNode name="Command" type="MonoDevelop.Components.Commands.ExtensionNodes.CommandCodon" />
+ <ExtensionNode name="Category" type="MonoDevelop.Components.Commands.ExtensionNodes.CommandCategoryCodon">
+ <ExtensionNode name="Command" type="MonoDevelop.Components.Commands.ExtensionNodes.CommandCodon" />
+ </ExtensionNode>
+</ExtensionNodeSet>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/Commands" name = "User interface commands">
+ <Description>User interface commands.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.CommandSet"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/Commands">
+
+ <!-- WARNING WARNING WARNING WARNING WARNING WARNING
+ Please don't change the default command shorcuts.
+ If a shortcut has to be changed, please create a new binding
+ scheme for the next MD version and do the change there.
+ -->
+
+ <!-- Hidden commands -->
+ <!-- The commands in the hidden category are not shown in the key bindings configuration panel -->
+ <Category id="Hidden" _name="Hidden">
+ <!-- The EditCommands.DeleteKey command can be used to easily bind the Delete key to a command handler -->
+ <!-- Notice that the EditCommands.Delete command is not bound to the Delete key since it is not always -->
+ <!-- convenient to fire the Delete command when pressing Delete (for example, while editing the name of -->
+ <!-- a file in the solution pad. -->
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.DeleteKey"
+ _label = "_Delete"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultDeleteKeyHandler"
+ shortcut = "Delete" macShortcut = "BackSpace" />
+ </Category>
+
+ <!-- EditCommands -->
+ <Category _name = "Edit" id="Edit">
+
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Copy"
+ _label = "_Copy"
+ icon = "gtk-copy"
+ _description = "Copy the selection"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultCopyHandler"
+ shortcut = "Control|C"
+ macShortcut = "Meta|C" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Cut"
+ _label = "Cu_t"
+ icon = "gtk-cut"
+ _description = "Cut the selection"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultCutHandler"
+ shortcut = "Control|X"
+ macShortcut = "Meta|X" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Paste"
+ _label = "_Paste"
+ icon = "gtk-paste"
+ _description = "Paste the clipboard"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultPasteHandler"
+ shortcut = "Control|V"
+ macShortcut = "Meta|V" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Delete"
+ _label = "_Delete"
+ _description = "Delete the selection"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultDeleteHandler"
+ icon = "gtk-delete" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Rename"
+ _label = "Re_name"
+ _description = "Rename the selection"
+ shortcut = "F2"
+ macShortcut = "Meta|R"/>
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Undo"
+ _label = "_Undo"
+ icon = "gtk-undo"
+ _description = "Undo last action"
+ shortcut = "Control|Z"
+ macShortcut = "Meta|Z" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.Redo"
+ _label = "_Redo"
+ icon = "gtk-redo"
+ _description = "Redo last undone action"
+ shortcut = "Control|Shift|Z"
+ macShortcut = "Meta|Shift|Z" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.SelectAll"
+ _label = "Select _All"
+ _description = "Select all text"
+ shortcut = "Control|A"
+ macShortcut = "Meta|A"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultSelectAllHandler"
+ icon = "md-select-all" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment"
+ shortcut = "Control|Alt|C"
+ macShortcut = "Meta|/"
+ _description = "Comment/Uncomment selected lines of code"
+ _label = "_Toggle Line Comment(s)"
+ icon = "md-comment" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.IndentSelection"
+ shortcut = "Control|Alt|End"
+ _description = "Indent selected lines of code"
+ _label = "_Indent Selection"
+ macShortcut = "Meta|]"
+ icon = "gtk-indent" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.UnIndentSelection"
+ shortcut = "Control|Alt|Home"
+ _description = "Unindent selected lines of code"
+ macShortcut = "Meta|["
+ _label = "_Unindent Selection"
+ icon = "gtk-unindent" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.UppercaseSelection"
+ _description = "Convert the selected text to uppercase"
+ _label = "_Uppercase Selection" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection"
+ _description = "Convert the selected text to lowercase"
+ _label = "_Lowercase Selection" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.RemoveTrailingWhiteSpaces"
+ description = "Remove trailing whitespace"
+ _label = "_Remove trailing whitespace" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.JoinWithNextLine"
+ shortcut = "Control|Shift|J"
+ _description = "Join the current line with the next line"
+ _label = "_Join Lines" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.WordCount"
+ _label = "_Word Count..."
+ description = "Count words in a text file"/>
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.InsertGuid"
+ _label = "_Insert Guid"
+ description = "Inserts a Guid at caret position"/>
+ <Condition id="Platform" value="windows">
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.MonodevelopPreferences"
+ defaultHandler = "MonoDevelop.Ide.Commands.MonodevelopPreferencesHandler"
+ _label = "_Options..."
+ icon = "gtk-preferences"
+ macShortcut = "Meta|,"
+ _description = "Show MonoDevelop options window" />
+ </Condition>
+ <Condition id="Platform" value="!windows">
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.MonodevelopPreferences"
+ defaultHandler = "MonoDevelop.Ide.Commands.MonodevelopPreferencesHandler"
+ _label = "Pr_eferences..."
+ icon = "gtk-preferences"
+ macShortcut = "Meta|,"
+ _description = "Show MonoDevelop preferences window" />
+ </Condition>
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.DefaultPolicies"
+ defaultHandler = "MonoDevelop.Ide.Commands.DefaultPoliciesHandler"
+ _label = "Custom Po_licies..."
+ _description = "Edit custom sets of policies which can be applied to solutions" />
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.InsertStandardHeader"
+ _label = "_Insert Standard Header"
+ defaultHandler = "MonoDevelop.Ide.Commands.InsertStandardHeaderHandler"
+ _description = "Add the user defined header to the top of the file"/>
+
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.ToggleFolding"
+ _label = "_Toggle Fold"
+ shortcut = "Control|Shift|M"
+ macShortcut = "Alt|Meta|Left"
+ _description = "Toggles the folding at caret position."/>
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.ToggleAllFoldings"
+ _label = "Toggle _All Folds"
+ shortcut = "Control|Shift|A"
+ macShortcut = "Alt|Shift|Meta|Right"
+ _description = "Toggles all the foldings in the document."/>
+ <Command id = "MonoDevelop.Ide.Commands.EditCommands.FoldDefinitions"
+ _label = "Toggle _Definitions"
+ macShortcut = "Alt|Shift|Meta|Left"
+ _description = "Toggles foldings of all method and property bodies."/>
+
+ <Command id = "MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatBuffer"
+ defaultHandler = "MonoDevelop.Ide.CodeFormatting.FormatBufferHandler"
+ _label = "_Format Document"
+ macShortcut = "Control|I" />
+ <Command id = "MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatSelection"
+ defaultHandler = "MonoDevelop.Ide.CodeFormatting.FormatSelectionHandler"
+ _label = "_Format Selection" />
+ </Category>
+
+ <!-- ProjectCommands -->
+ <Category _name = "Project" id = "Project">
+
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewProject"
+ _label = "_Add New Project..."
+ _description = "Add a new project to the selected solution"
+ icon = "md-new-project" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewWorkspace"
+ _label = "_Add New Workspace..."
+ _description = "Add a new child workspace to the selected workspace" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewSolution"
+ _label = "_Add New Solution..."
+ _description = "Add a new child solution to the selected workspace"
+ icon = "md-new-solution" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddSolutionFolder"
+ _label = "Add Solution _Folder"
+ _description = "Add a new solution folder to the selected solution"
+ icon = "md-new-solution-folder" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddProject"
+ _description = "Add a project to the selected solution"
+ _label = "Add Existing _Project..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddItem"
+ _description = "Add an existing item to the selected workspace"
+ _label = "Add Existing _Item..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.RemoveFromProject"
+ _label = "_Remove From Project"
+ _description = "Remove an item from the project"
+ icon = "gtk-delete" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Options"
+ defaultHandler = "MonoDevelop.Ide.Commands.SolutionItemOptionsHandler"
+ _label = "_Options"
+ _description = "Show options window" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.SolutionOptions"
+ defaultHandler = "MonoDevelop.Ide.Commands.SolutionOptionsHandler"
+ _label = "_Solution Options"
+ _description = "Show solution options window" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ProjectOptions"
+ defaultHandler = "MonoDevelop.Ide.Commands.ProjectOptionsHandler"
+ _label = "Project _Options"
+ _description = "Show project options window" />
+
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddReference"
+ _description = "Add and remove project references"
+ _label = "_Edit References..."
+ defaultHandler = "MonoDevelop.Ide.Commands.EditReferencesHandler" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles"
+ _label = "New _File..."
+ _description = "Create a new file"
+ icon = "gtk-new" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddFiles"
+ _description = "Add existing files to the project"
+ macShortcut = "Alt|Meta|A"
+ _label = "_Add Files..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddFilesFromFolder"
+ _description = "Adds files from a folder recursively"
+ _label = "_Add Files from Folder..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.AddExistingFolder"
+ _description = "Adds and existing folder and its contents"
+ _label = "_Add Existing Folder..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.NewFolder"
+ _label = "New _Folder"
+ _description = "Create a new folder"
+ icon = "md-new-folder-icon" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.IncludeToProject"
+ _description = "Add existing file to the project"
+ _label = "_Include To Project" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.BuildSolution"
+ defaultHandler = "MonoDevelop.Ide.Commands.BuildSolutionHandler"
+ _label = "_Build All"
+ shortcut = "F8"
+ macShortcut = "Meta|B"
+ _description = "Build all projects of all solutions"
+ icon = "md-build-combine" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Build"
+ defaultHandler = "MonoDevelop.Ide.Commands.BuildHandler"
+ _label = "Buil_d"
+ shortcut = "F7"
+ macShortcut = "Meta|K"
+ _description = "Build the current project"
+ icon = "md-build-current-selected-project" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.RebuildSolution"
+ defaultHandler = "MonoDevelop.Ide.Commands.RebuildSolutionHandler"
+ shortcut = "Control|F8"
+ macShortcut="Meta|Control|B"
+ _description = "Rebuild all projects of all solutions"
+ _label = "_Rebuild All" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Rebuild"
+ defaultHandler = "MonoDevelop.Ide.Commands.RebuildHandler"
+ shortcut = "Control|F7"
+ macShortcut="Meta|Control|K"
+ _description = "Rebuild the current project"
+ _label = "R_ebuild" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.SetAsStartupProject"
+ _label = "_Set As Startup Project" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Run"
+ defaultHandler = "MonoDevelop.Ide.Commands.RunHandler"
+ icon = "gtk-execute"
+ shortcut = "Control|F5"
+ macShortcut = "Alt|Meta|Return"
+ _description = "Start program without debugging"
+ _label = "Start Without Debugging" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.RunWithList"
+ defaultHandler = "MonoDevelop.Ide.Commands.RunWithHandler"
+ type="array"
+ _description = "Run With List"
+ _label = "Run With List" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.RunEntry"
+ defaultHandler = "MonoDevelop.Ide.Commands.RunEntryHandler"
+ icon = "gtk-execute"
+ _description = "Run current project"
+ _label = "_Run Item" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.RunEntryWithList"
+ defaultHandler = "MonoDevelop.Ide.Commands.RunEntryWithHandler"
+ type="array"
+ _description = "Run With List"
+ _label = "Run With List" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Clean"
+ defaultHandler = "MonoDevelop.Ide.Commands.CleanHandler"
+ _description = "Clean the selected project or solution"
+ macShortcut = "Shift|Meta|K"
+ _label = "C_lean" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.CleanSolution"
+ defaultHandler = "MonoDevelop.Ide.Commands.CleanSolutionHandler"
+ _description = "Clean all projects of all solutions"
+ _label = "_Clean All" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.LocalCopyReference"
+ type="check"
+ _description = "Copy the assembly to the output directory when building the project"
+ _label = "_Local Copy" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Stop"
+ defaultHandler = "MonoDevelop.Ide.Commands.StopHandler"
+ icon = "gtk-stop"
+ macShortcut = "Shift|Meta|Return"
+ shortcut = "Shift|F5"
+ _description = "Stop current build or application execution"
+ _label = "_Stop" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ConfigurationSelector"
+ type = "custom"
+ widget = "MonoDevelop.Ide.Gui.ConfigurationComboBox"
+ _label = "Active Configuration" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.CustomCommandList"
+ defaultHandler = "MonoDevelop.Ide.Commands.CustomCommandListHandler"
+ type="array"
+ _label = "Custom command list" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.Reload"
+ _description = "Reload selected project or solution"
+ _label = "Reload" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.EditSolutionItem"
+ _description = "Edit selected item"
+ _label = "Edit File" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution"
+ defaultHandler = "MonoDevelop.Ide.Commands.ExportSolutionHandler"
+ _description = "Convert selected solution to another format"
+ _label = "_Export..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.SelectActiveConfiguration"
+ type = "radio|array"
+ defaultHandler = "MonoDevelop.Ide.Commands.SelectActiveConfigurationHandler"
+ _label = "Active Configuration" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.SelectActiveRuntime"
+ type = "radio|array"
+ defaultHandler="MonoDevelop.Ide.Commands.SelectActiveRuntimeHandler"
+ _label = "Active Runtime" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy"
+ defaultHandler="MonoDevelop.Ide.Commands.ApplyPolicyHandler"
+ _label = "Apply Policy..." />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy"
+ defaultHandler="MonoDevelop.Ide.Commands.ExportPolicyHandler"
+ _label = "Export Policy..." />
+ </Category>
+
+
+ <!-- FileCommands -->
+ <Category _name = "File" id = "File">
+
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.OpenFile"
+ defaultHandler = "MonoDevelop.Ide.Commands.OpenFileHandler"
+ _label = "_Open..."
+ shortcut = "Control|O"
+ macShortcut = "Meta|O"
+ _description = "Open file or solution"
+ icon = "gtk-open" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.NewFile"
+ defaultHandler = "MonoDevelop.Ide.Commands.NewFileHandler"
+ _label = "_File..."
+ shortcut = "Control|N"
+ macShortcut = "Meta|N"
+ _description = "Create a new file"
+ icon = "gtk-new" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.Save"
+ icon = "gtk-save"
+ shortcut = "Control|S"
+ macShortcut = "Meta|S"
+ _description = "Save the active document"
+ _label = "_Save" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll"
+ defaultHandler = "MonoDevelop.Ide.Commands.SaveAllHandler"
+ icon = "md-save-all-icon"
+ shortcut = "Control|Shift|S"
+ macShortcut = "Meta|Shift|S"
+ _description = "Save all open files"
+ _label = "Save A_ll" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.NewProject"
+ defaultHandler = "MonoDevelop.Ide.Commands.NewProjectHandler"
+ _label = "_Solution..."
+ icon = "md-new-solution"
+ _description = "Create a new solution"
+ macShortcut = "Meta|Shift|N"
+ shortcut = "Control|Shift|N" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.NewWorkspace"
+ defaultHandler = "MonoDevelop.Ide.Commands.NewWorkspaceHandler"
+ _label = "_Workspace..."
+ _description = "Create a new workspace"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.CloseFile"
+ defaultHandler = "MonoDevelop.Ide.Commands.CloseFileHandler"
+ _label = "_Close File"
+ _description = "Close active file"
+ icon = "gtk-close"
+ shortcut = "Control|W"
+ macShortcut = "Meta|W" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.CloseAllFiles"
+ defaultHandler = "MonoDevelop.Ide.Commands.CloseAllFilesHandler"
+ _label = "Close _All"
+ _description = "Close All Files"
+ icon = "gtk-close"
+ shortcut = "Control|Shift|W"
+ macShortcut = "Meta|Shift|W" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.CloseWorkspace"
+ defaultHandler = "MonoDevelop.Ide.Commands.CloseWorkspaceHandler"
+ _label = "C_lose Workspace"
+ _description = "Close all solutions open in the current workspace"
+ icon = "md-close-combine-icon" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.CloseWorkspaceItem"
+ defaultHandler = "MonoDevelop.Ide.Commands.CloseWorkspaceHandler"
+ _label = "C_lose"
+ _description = "Close the active solution or workspace item"
+ icon = "md-close-combine-icon" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.ReloadFile"
+ _label = "_Revert"
+ _description = "Revert to a saved version of the file"
+ macShortcut = "Meta|U"
+ icon = "gtk-revert-to-saved" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.SaveAs"
+ _label = "Save _As..."
+ icon = "gtk-save-as"
+ _description = "Save the current file with a different name" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument"
+ defaultHandler = "MonoDevelop.Ide.Commands.PrintHandler"
+ _label = "_Print..."
+ _description = "Print current document"
+ icon = "gtk-print"
+ shortcut = "Control|P"
+ macShortcut = "Meta|P" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument"
+ defaultHandler = "MonoDevelop.Ide.Commands.PrintPreviewHandler"
+ _label = "Print Previe_w"
+ _description = "Show print preview"
+ icon = "gtk-print-preview"
+ shortcut = "Shift|Control|P" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup"
+ defaultHandler = "MonoDevelop.Ide.Commands.PrintPageSetupHandler"
+ _label = "Page Set_up"
+ _description = "Show page setup"
+ icon = "gtk-page-setup" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.RecentFileList"
+ defaultHandler = "MonoDevelop.Ide.Commands.RecentFileListHandler"
+ type="array"
+ _label = "Recent _Files" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.ClearRecentFiles"
+ defaultHandler = "MonoDevelop.Ide.Commands.ClearRecentFilesHandler"
+ _label = "_Clear"
+ icon = "gtk-clear"
+ _description = "Clear recent files" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.RecentProjectList"
+ defaultHandler = "MonoDevelop.Ide.Commands.RecentProjectListHandler"
+ type="array"
+ _label = "Recent Pro_jects" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.ClearRecentProjects"
+ defaultHandler = "MonoDevelop.Ide.Commands.ClearRecentProjectsHandler"
+ _label = "_Clear"
+ icon = "gtk-clear"
+ _description = "Clear recent solutions" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.Exit"
+ defaultHandler = "MonoDevelop.Ide.Commands.ExitHandler"
+ _label = "_Quit"
+ icon = "gtk-quit"
+ _description = "Quit MonoDevelop"
+ macShortcut = "Meta|Q"
+ shortcut = "Control|Q" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.OpenInTerminal"
+ _label = "_Open in Terminal"
+ _description = "Opens a terminal in this folder"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.OpenFolder"
+ _label = "_Open Folder"
+ _description = "Opens the folder in a file manager."/>
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.OpenContainingFolder"
+ _label = "O_pen Containing Folder"
+ _description = "Opens the folder that contains this file."/>
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.SetBuildAction"
+ type="radio|array"
+ _label = "Build action" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.ShowProperties"
+ icon="gtk-properties"
+ _label = "_Properties" />
+ <Command id = "MonoDevelop.Ide.Commands.FileCommands.CopyToOutputDirectory"
+ type = "check"
+ _label = "_Copy to Output Directory" />
+ <Command id = "MonoDevelop.Ide.Commands.ProjectCommands.SpecificAssemblyVersion"
+ type = "check"
+ _label = "Require Specific Version" />
+ <Command id = "MonoDevelop.Ide.Commands.FileTabCommands.CloseAllButThis"
+ defaultHandler = "MonoDevelop.Ide.Commands.CloseAllButThisHandler"
+ _label = "C_lose all but this"
+ _description = "Closes all opened files except for the active file"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileTabCommands.CopyPathName"
+ defaultHandler = "MonoDevelop.Ide.Commands.CopyPathNameHandler"
+ _description = "Copy the file path to the clipboard"
+ _label = "C_opy file path/name"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileTabCommands.ToggleMaximize"
+ defaultHandler = "MonoDevelop.Ide.Commands.ToggleMaximizeHandler"
+ _label = "S_witch maximize/normal view"/>
+ <Command id = "MonoDevelop.Ide.Commands.FileTabCommands.ReopenClosedTab"
+ defaultHandler = "MonoDevelop.Ide.Commands.ReopenClosedTabHandler"
+ _label = "Reopen Closed Tab"
+ _description = "Opens the last tab that has been closed"/>
+ </Category>
+
+ <!-- ViewCommands -->
+ <Category _name = "View" id = "View">
+
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ViewList"
+ defaultHandler = "MonoDevelop.Ide.Commands.ViewListHandler"
+ type="array"
+ _label = "View List" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.LayoutList"
+ defaultHandler = "MonoDevelop.Ide.Commands.LayoutListHandler"
+ type="radio|array"
+ _label = "Layout List" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.NewLayout"
+ defaultHandler = "MonoDevelop.Ide.Commands.NewLayoutHandler"
+ _label = "_New Layout..."
+ icon = "gtk-add"
+ _description = "Create new layout" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.DeleteCurrentLayout"
+ defaultHandler = "MonoDevelop.Ide.Commands.DeleteCurrentLayoutHandler"
+ _label = "_Delete Current Layout"
+ icon = "gtk-remove"
+ _description = "Delete current layout" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.LayoutSelector"
+ type = "custom"
+ widget = "MonoDevelop.Ide.Gui.LayoutComboBox"
+ _label = "Active Layout"
+ _description = "Switch active layout" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.FullScreen"
+ type="check"
+ defaultHandler = "MonoDevelop.Ide.Commands.FullScreenHandler"
+ _label = "_Full Screen"
+ icon = "gtk-fullscreen"
+ _description = "Set full screen mode" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.Open"
+ _description = "Open selected document"
+ _label = "_Open" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.TreeDisplayOptionList"
+ type = "array|check"
+ _label = "Display Options List" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ResetTreeDisplayOptions"
+ _label = "Reset Options" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.RefreshTree"
+ _description = "Refresh the tree"
+ _label = "Refresh" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.CollapseAllTreeNodes"
+ _label = "Collapse All Nodes" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.OpenWithList"
+ type = "array"
+ _label = "List of programs to open with" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ShowNext"
+ defaultHandler = "MonoDevelop.Ide.Commands.ShowNextHandler"
+ _label = "Show Next"
+ _description = "Move cursor to next error or search match"
+ macShortcut = "Alt|Meta|Down"
+ shortcut = "F4" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ShowPrevious"
+ defaultHandler = "MonoDevelop.Ide.Commands.ShowPreviousHandler"
+ _label = "Show Previous"
+ _description = "Move cursor to previous error or search match"
+ macShortcut = "Alt|Meta|Up"
+ shortcut = "Shift|F4" />
+
+ <Command id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateBack"
+ _label = "Navigate _Back"
+ icon = "md-navigate-back"
+ defaultHandler = "MonoDevelop.Ide.Commands.NavigateBack"
+ shortcut = "Control|Alt|Left"
+ macShortcut= "Control|Meta|Left"
+ _description = "Move to previous point in code navigation history"/>
+ <Command id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateForward"
+ _label = "Navigate _Forward"
+ icon = "md-navigate-forward"
+ defaultHandler = "MonoDevelop.Ide.Commands.NavigateForward"
+ shortcut = "Control|Alt|Right"
+ macShortcut= "Control|Meta|Right"
+ _description = "Move to next point in code navigation history"/>
+ <Command id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateHistory"
+ type="radio|array"
+ _label = "Navigate _History"
+ defaultHandler = "MonoDevelop.Ide.Commands.NavigateHistory"
+ _description = "Select a point from the navigation history"/>
+ <Command id = "MonoDevelop.Ide.Commands.NavigationCommands.ClearNavigationHistory"
+ _label = "_Clear Navigation History"
+ defaultHandler = "MonoDevelop.Ide.Commands.ClearNavigationHistory"
+ _description = "Clear the navigation history"/>
+
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomIn"
+ defaultHandler = "MonoDevelop.Ide.Commands.ZoomIn"
+ _label = "_Zoom In"
+ icon = "gtk-zoom-in"
+ shortcut = "Control|+"
+ macShortcut = "Meta|+"
+ _description = "Zooms view in" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomOut"
+ defaultHandler = "MonoDevelop.Ide.Commands.ZoomOut"
+ _label = "Zoom _Out"
+ icon = "gtk-zoom-out"
+ shortcut = "Control|-"
+ macShortcut = "Meta|-"
+ _description = "Zooms view out" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomReset"
+ defaultHandler = "MonoDevelop.Ide.Commands.ZoomReset"
+ _label = "_Normal Size"
+ icon = "gtk-zoom-100"
+ shortcut = "Control|0"
+ _description = "Resets zoom to default" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.FocusCurrentDocument"
+ defaultHandler = "MonoDevelop.Ide.Commands.FocusCurrentDocumentHandler"
+ _label = "_Focus Document"
+ shortcut = "Alt|C"
+ _description = "Focus current document" />
+ <Command id = "MonoDevelop.Ide.Commands.ViewCommands.ShowWelcomePage"
+ defaultHandler = "MonoDevelop.Ide.WelcomePage.ShowWelcomePageHandler"
+ _label = "Welcome Page"
+ icon = "gtk-home"/>
+ </Category>
+
+ <!-- ToolCommands -->
+ <Category _name = "Tools" id = "Tools">
+
+ <Command id = "MonoDevelop.Ide.Commands.ToolCommands.AddinManager"
+ defaultHandler = "MonoDevelop.Ide.Commands.AddinManagerHandler"
+ icon = "md-software-update"
+ _description = "Manage add-ins"
+ _label = "_Add-in Manager" />
+ <Command id = "MonoDevelop.Ide.Commands.ToolCommands.ToolList"
+ defaultHandler = "MonoDevelop.Ide.Commands.ToolListHandler"
+ type="array"
+ _label = "Tool List" />
+
+ <Command id = "MonoDevelop.Ide.Commands.ToolCommands.InstrumentationViewer"
+ defaultHandler = "MonoDevelop.Ide.Commands.InstrumentationViewerHandler"
+ _label = "Instrumentation Monitor" />
+
+ </Category>
+
+
+ <!-- WindowCommands -->
+ <Category _name = "Window" id = "Window">
+
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.NextWindow"
+ defaultHandler = "MonoDevelop.Ide.Commands.NextWindowHandler"
+ _label = "_Next Window"
+ icon = "gtk-go-forward"
+ _description = "Show next window"
+ shortcut = "Control|Page_Down"
+ macShortcut = "Meta|}" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.PrevWindow"
+ defaultHandler = "MonoDevelop.Ide.Commands.PrevWindowHandler"
+ _label = "_Previous Window"
+ icon = "gtk-go-back"
+ _description = "Show previous window"
+ shortcut = "Control|Page_Up"
+ macShortcut = "Meta|{" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.OpenWindowList"
+ defaultHandler = "MonoDevelop.Ide.Commands.OpenWindowListHandler"
+ type="radio|array"
+ _label = "Window List" />
+
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.SplitWindowVertically"
+ defaultHandler = "MonoDevelop.Ide.Commands.SplitWindowVertically"
+ _label = "Split _Vertically" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.SplitWindowHorizontally"
+ defaultHandler = "MonoDevelop.Ide.Commands.SplitWindowHorizontally"
+ _label = "Split _Horizontally" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.UnsplitWindow"
+ defaultHandler = "MonoDevelop.Ide.Commands.UnsplitWindow"
+ _label = "_Unsplit" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow"
+ defaultHandler = "MonoDevelop.Ide.Commands.SwitchSplitWindow"
+ shortcut = "Control|M"
+ _label = "_Switch Between Splits" />
+
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.SwitchNextDocument"
+ defaultHandler = "MonoDevelop.Ide.Commands.SwitchNextDocument"
+ shortcut = "Control|Tab"
+ macShortcut = "Control|Tab"
+ _label = "Switch to next document"
+ _description = "Switch to next document" />
+ <Command id = "MonoDevelop.Ide.Commands.WindowCommands.SwitchPreviousDocument"
+ defaultHandler = "MonoDevelop.Ide.Commands.SwitchPreviousDocument"
+ shortcut = "Control|Shift|Tab"
+ macShortcut = "Control|Shift|Tab"
+ _label = "Switch to previous document"
+ _description = "Switch to previous document" />
+ </Category>
+
+ <!-- HelpCommands -->
+ <Category _name = "Help" id = "Help">
+
+ <Command id = "MonoDevelop.Ide.Commands.HelpCommands.Help"
+ _label = "API Documentation"
+ icon = "gtk-help"
+ _description = "Show help"
+ defaultHandler = "MonoDevelop.Ide.Commands.HelpHandler"
+ shortcut = "F1"
+ macShortcut = "Meta|Alt|?" />
+ <Command id = "MonoDevelop.Ide.Commands.HelpCommands.TipOfTheDay"
+ defaultHandler = "MonoDevelop.Ide.Commands.TipOfTheDayHandler"
+ _label = "_Tip of the Day"
+ icon = "gtk-dialog-info"
+ _description = "Show tip of the day" />
+ <Command id = "MonoDevelop.Ide.Commands.HelpCommands.OpenLogDirectory"
+ defaultHandler = "MonoDevelop.Ide.Commands.OpenLogDirectoryHandler"
+ _label = "Open Log Directory"
+ icon = "gtk-dialog-info"
+ _description = "Opens the directory where the diagnostic logs are stored" />
+ <Command id = "MonoDevelop.Ide.Commands.HelpCommands.About"
+ defaultHandler = "MonoDevelop.Ide.Commands.AboutHandler"
+ _label = "_About"
+ icon = "gtk-about"
+ _description = "Show about dialog" />
+ <Command id = "MonoDevelop.Ide.Updater.UpdateCommands.CheckForUpdates"
+ defaultHandler = "MonoDevelop.Ide.Updater.CheckForUpdatesHandler"
+ _label = "_Check for Updates..."
+ _description = "Check for updates to MonoDevelop and packages it requires" />
+ <Command id = "MonoDevelop.Ide.Commands.HelpCommands.SendFeedback"
+ defaultHandler = "MonoDevelop.Ide.Commands.SendFeedbackHandler"
+ _label = "Send Feedback"
+ icon = "md-feedback"
+ _description = "Send feedback to the MonoDevelop development team" />
+ </Category>
+
+ <!-- SearchCommands -->
+ <Category _name = "Search" id = "Search">
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.Find"
+ _label = "_Find..."
+ icon = "gtk-find"
+ _description = "Search for text"
+ shortcut = "Control|F"
+ macShortcut = "Meta|F" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.Replace"
+ _label = "_Replace..."
+ icon = "gtk-find-and-replace"
+ _description = "Search for and replace text"
+ shortcut = "Control|H"
+ macShortcut = "Alt|Meta|F" />
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.FindNext"
+ _label = "Find _Next"
+ icon = "md-find-next-icon"
+ _description = "Search forwards for the same text"
+ shortcut = "Control|G"
+ macShortcut = "Meta|G" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.FindPrevious"
+ _label = "Find _Previous"
+ _description = "Search backwards for the same text"
+ shortcut = "Control|Shift|G"
+ macShortcut = "Meta|Shift|G" />
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.EmacsFindNext"
+ _label = "Find _Next (Emacs behavior)"
+ icon = "md-find-next-icon"
+ _description = "Search forwards for the same text with emacs behavior"/>
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.EmacsFindPrevious"
+ _label = "Find _Previous (Emacs behavior)"
+ _description = "Search backwards for the same text with emacs behavior"/>
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.FindNextSelection"
+ _label = "Find Next Selection"
+ _description = "Search forwards for the selected text"
+ shortcut = "Control|F3"
+ macShortcut = "Meta|E" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.FindPreviousSelection"
+ _label = "Find _Previous Selection"
+ _description = "Search backwards for the selected text"
+ shortcut = "Shift|Control|F3" />
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.FindInFiles"
+ defaultHandler = "MonoDevelop.Ide.FindInFiles.FindInFilesHandler"
+ _label = "F_ind in Files..."
+ icon = "md-find-in-files"
+ shortcut = "Control|Shift|F"
+ macShortcut = "Meta|Shift|F"
+ _description = "Search for text in all files of a directory" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.ReplaceInFiles"
+ defaultHandler = "MonoDevelop.Ide.FindInFiles.ReplaceInFilesHandler"
+ _label = "R_eplace in Files..."
+ icon = "md-replace-in-files"
+ shortcut = "Control|Shift|H"
+ macShortcut = "Alt|Meta|Shift|F"
+ _description = "Search for and replace text in all files of a directory" />
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.GotoType"
+ _label = "Go to Type..."
+ _description = "Jump to the declaration of type in the current workspace"
+ shortcut = "Control|Shift|T"
+ macShortcut = "Meta|Shift|T" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.GotoFile"
+ _label = "Go to File..."
+ shortcut = "Alt|Shift|O"
+ macShortcut = "Meta|Shift|D"
+ _description = "Jump to a file in the current workspace"
+ icon = "gtk-open" />
+ <Command id = "MonoDevelop.Components.MainToolbar.Commands.NavigateTo"
+ _label = "Navigate To..."
+ _description = "Jump to a item in the current workspace"
+ shortcut = "Control|,"
+ macShortcut = "Meta|."
+ icon = "gtk-open" />
+
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.ToggleBookmark"
+ icon = "md-toggle-bookmark"
+ shortcut = "Control|F2"
+ _description = "Toggle bookmark"
+ _label = "_Toggle Bookmark" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.PrevBookmark"
+ icon = "md-goto-prevbookmark"
+ shortcut = "Shift|F2"
+ _description = "Go to previous bookmark"
+ _label = "Pre_vious Bookmark" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.NextBookmark"
+ icon = "md-goto-nextbookmark"
+ shortcut = "F2"
+ _description = "Go to next bookmark"
+ _label = "Ne_xt Bookmark" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.ClearBookmarks"
+ icon = "md-clear-all-bookmarks"
+ _description = "Clear bookmarks"
+ _label = "_Clear Bookmarks" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.GotoLineNumber"
+ _label = "_Go to Line..."
+ _description = "Go to a specific line"
+ shortcut = "Control|I"
+ macShortcut = "Meta|L"
+ icon = "gtk-jump-to" />
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.UseSelectionForFind"
+ _label = "Use Selection for Find"
+ _description = "Uses the current selection as find string"/>
+ <Command id = "MonoDevelop.Ide.Commands.SearchCommands.UseSelectionForReplace"
+ _label = "Use Selection for Replace"
+ _description = "Uses the current selection as replace string"/>
+ </Category>
+
+
+
+ <!-- TextEditorCommands -->
+ <Category _name = "Text Editor" id = "TextEditor">
+
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowCompletionWindow"
+ _label = "Show Completion Window"
+ macShortcut="Control|space"
+ shortcut = "Control|space" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ToggleCompletionSuggestionMode"
+ defaultHandler = "MonoDevelop.Ide.Commands.ToggleCompletionSuggestionModeHandler"
+ _label = "Toggle Completion Suggestion Mode"
+ macShortcut="Alt|Shift|space"
+ shortcut = "Alt|Shift|space" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowCodeTemplateWindow"
+ _description="Inserts a template or when something is selected surrounds selection with a template"
+ _label = "I_nsert Template..."/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.LineEnd"
+ _label = "Go to end of line" macShortcut = "End"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.LineStart"
+ _label = "Go to beginning of line" macShortcut = "Home"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLeftChar"
+ _label = "Delete left character" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteRightChar"
+ _label = "Delete right character" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.CharLeft"
+ _label = "Go left one character" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.CharRight"
+ _label = "Go right one character" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.LineUp"
+ _label = "Go to previous line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.LineDown"
+ _label = "Go to next line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DocumentStart"
+ _label = "Go to beginning of document" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DocumentEnd"
+ _label = "Go to end of document" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.PageUp"
+ _label = "Go up one page" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.PageDown"
+ _label = "Go down one page" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ScrollLineUp"
+ _label = "Scroll line up"
+ shortcut = "Control|Up" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ScrollLineDown"
+ _label = "Scroll line down"
+ shortcut = "Control|Down" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ScrollPageUp"
+ _label = "Scroll page up"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ScrollPageDown"
+ _label = "Scroll page down"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine"
+ _label = "Delete entire line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteToLineEnd"
+ _label = "Delete to end of line"
+ _description="Deletes to end of line, or if at end, deletes line ending"
+ shortcut="Control|K"
+ macShortcut = "Control|K" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MoveBlockUp"
+ _label = "Move the line or highlighted selection up"
+ shortcut="Alt|Up"
+ macShortcut="Alt|Up" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MoveBlockDown"
+ _label = "Move the line or highlighted selection down"
+ shortcut="Alt|Down"
+ macShortcut="Alt|Down" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowParameterCompletionWindow"
+ _label = "Show Parameter List"
+ macShortcut = "Control|Shift|space"
+ shortcut = "Control|Shift|space" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.GotoMatchingBrace"
+ _label = "Go to Matching _Brace"
+ description = "Go to Matching Brace"
+ shortcut = "Control|B" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveLeft"
+ _label = "Expand selection to the left" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveRight"
+ _label = "Expand selection to the right" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MovePrevWord"
+ _label = "Go to previous word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MoveNextWord"
+ _label = "Go to next word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMovePrevWord"
+ _label = "Expand selection to previous word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveNextWord"
+ _label = "Expand selection to next word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MovePrevSubword"
+ _label = "Go to previous subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.MoveNextSubword"
+ _label = "Go to next subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMovePrevSubword"
+ _label = "Expand selection to previous subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveNextSubword"
+ _label = "Expand selection to next subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveUp"
+ _label = "Expand selection to previous line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveDown"
+ _label = "Expand selection to next line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveHome"
+ _label = "Expand selection to line start" macShortcut = "Shift|Home" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveEnd"
+ _label = "Expand selection to line end" macShortcut = "Shift|End"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveToDocumentStart"
+ _label = "Expand selection to document start" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveToDocumentEnd"
+ _label = "Expand selection to document end" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ExpandSelectionToLine"
+ _label = "Expand selection to line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SwitchCaretMode"
+ _label = "Switch caret mode"
+ description = "Switch between insert and overwrite caret modes"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.InsertTab"
+ _label = "Insert tab" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.RemoveTab"
+ _label = "Remove tab" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.InsertNewLine"
+ _label = "Insert new line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.InsertNewLinePreserveCaretPosition"
+ _label = "Insert line break after the caret"
+ macShortcut = "Control|O" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.InsertNewLineAtEnd"
+ _label = "Move caret to EOL and insert new line" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.CompleteStatement"
+ _label = "Completes the current statement"
+ shortcut = "Control|Shift|Return" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeletePrevWord"
+ _label = "Delete previous word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteNextWord"
+ _label = "Delete next word" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeletePrevSubword"
+ _label = "Delete previous subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DeleteNextSubword"
+ _label = "Delete next subword" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionPageDownAction"
+ _label = "Expand selection to page down" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.SelectionPageUpAction"
+ _label = "Expand selection to page up" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.TransposeCharacters"
+ _label = "Transpose characters"
+ _description = "Swaps the characters on either side of the caret"
+ macShortcut="Control|T" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.RecenterEditor"
+ _label = "Recenter editor"
+ _description = "Scrolls the editor so that the caret is centered"
+ macShortcut = "Control|L" />
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.ToggleBlockSelectionMode"
+ _label = "Toggle block selection mode"/>
+ <Command id = "MonoDevelop.Ide.Commands.TextEditorCommands.DuplicateLine"
+ _label = "Duplicate line"/>
+ </Category>
+
+</Extension>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.DefaultPolicyPanels.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.DefaultPolicyPanels.addin.xml
new file mode 100644
index 0000000..5609d08
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.DefaultPolicyPanels.addin.xml
@@ -0,0 +1,27 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels" name = "Default policy panels">
+ <Description>Panels for editing default policies. Must derive from PolicyOptionsPanel.
+ Should be the same policy panel registered for ItemOptionPanels.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels">
+ <Section id="Common" _label="General">
+ </Section>
+ <Section id="Build" _label="Build">
+ </Section>
+ <Section id="Run" _label="Run">
+ </Section>
+ <Section id="SourceCode" _label="Source Code">
+ <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies">
+ <Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
+ </Section>
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
+ <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ </Section>
+ <Section id="VersionControl" _label="Version Control" />
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.GlobalOptionsDialog.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.GlobalOptionsDialog.addin.xml
new file mode 100644
index 0000000..9c3fd3d
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.GlobalOptionsDialog.addin.xml
@@ -0,0 +1,53 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/GlobalOptionsDialog" name = "Global options panels">
+ <Description>Dialog panels for global MonoDevelop options.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog">
+ <Section id = "Preferences" _label = "Environment">
+ <Section id = "GeneralAuthorInfo" _label = "Author Information" icon="md-monkey" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.GlobalAuthorInformationPanel" />
+ <Section id = "Language" _label = "Language" icon="md-locale" class = "MonoDevelop.Ide.Gui.OptionPanels.IDEStyleOptionsPanel">
+<!-- <Panel _label = "Welcome Page" class = "MonoDevelop.Ide.WelcomePage.WelcomePageOptionPanel" />-->
+ </Section>
+ <Section id = "KeyBindings" _label = "Key Bindings" fill="true" icon="md-keyboard-shortcuts" class = "MonoDevelop.Ide.Gui.OptionPanels.KeyBindingsPanel" />
+ <Section id = "Fonts" _label = "Fonts" fill="true" icon = "md-letters" class = "MonoDevelop.Ide.Fonts.FontChooserPanel"/>
+ <Section id = "Updates" _label = "Updates" icon="md-software-update" class = "MonoDevelop.Ide.Gui.OptionPanels.AddInsOptionsPanel" />
+ <Section id = "TaskList" _label = "Tasks" icon="md-task-list-icon" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.TasksOptionsPanel" />
+ <Section id = "ExternalTools" _label = "External Tools" icon="md-external-tools" fill="true" class = "MonoDevelop.Ide.ExternalTools.ExternalToolPane" />
+ </Section>
+
+ <Section id = "Projects" _label = "Projects">
+ <Section id = "LoadSave" _label = "Load/Save" icon="md-drive" class = "MonoDevelop.Ide.Gui.OptionPanels.LoadSavePanel" />
+ <Section id = "Build" _label = "Build" icon="md-hammer" class = "MonoDevelop.Ide.Gui.OptionPanels.BuildPanel">
+ <Panel id = "BuildMessages" _label = "Errors and Warnings" class = "MonoDevelop.Ide.Gui.OptionPanels.BuildMessagePanel" />
+ <Panel id = "Directories" _label = "Assembly Folders" class = "MonoDevelop.Ide.Gui.OptionPanels.AssemblyFoldersPanel" />
+ </Section>
+ <Section id = "MonoRuntime" _label = ".NET Runtimes" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.MonoRuntimePanel" />
+ <Section id = "SdkLocations" _label = "SDK Locations" icon = "sdk-locations" />
+ </Section>
+
+ <Section id = "TextEditor" _label = "Text Editor">
+ <Section id = "Formatting" icon="md-formatting" _label = "Formatting" />
+ <Section id = "CodeTemplates" icon="md-code-template" _label = "Code Templates" fill="true" class = "MonoDevelop.Ide.CodeTemplates.CodeTemplatePane"/>
+ </Section>
+
+ <Section id="SourceCode" _label="Source Code">
+ <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies">
+ <Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
+ </Section>
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
+ <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ </Section>
+
+ <Section id = "VersionControl" _label = "Version Control" />
+
+ <Section id = "Other" _label = "Other">
+ <Section id = "LogAgent" _label = "Log Agent" class = "MonoDevelop.Ide.Gui.OptionPanels.LogAgentOptionsPanel" />
+ <Section id = "MonoDevelopMaintenance" _label = "MonoDevelop Maintenance" class = "MonoDevelop.Ide.Gui.OptionPanels.MaintenanceOptionsPanel" />
+ </Section>
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.ItemOptionPanels.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.ItemOptionPanels.addin.xml
new file mode 100644
index 0000000..63d186f
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.ItemOptionPanels.addin.xml
@@ -0,0 +1,98 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels" name="Dialog panels for item options">
+ <Description>Dialog panels for item options. Those panels will be shown for all kind of solution items, solutions and workspaces.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection"/>
+ <ConditionType id="ItemType" type="MonoDevelop.Projects.Extensions.ItemTypeCondition">
+ <Description>Type of the item. If no namespace is provided, MonoDevelop.Projects is assumed.</Description>
+ </ConditionType>
+ <ConditionType id="ActiveLanguage" type="MonoDevelop.Projects.Extensions.ProjectLanguageCondition">
+ <Description>Language of the project. It will evaluate to false if the project is not a .NET project.</Description>
+ </ConditionType>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/ProjectModel/Gui/ItemOptionPanels">
+ <Section id="Common" _label="General">
+ <Section id="General" _label="Main Settings">
+ <Condition id="ItemType" value="Project">
+ <Panel id = "GeneralProjectPanel" _label = "Project" class = "MonoDevelop.Ide.Projects.OptionPanels.GeneralProjectOptions" />
+ <Panel id = "BaseDirectoryPanel" _label = "Location of Project Files" class = "MonoDevelop.Ide.Projects.OptionPanels.BaseDirectoryPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="Solution">
+ <Panel id = "GeneralSolutionPanel" _label = "Solution" class = "MonoDevelop.Ide.Projects.OptionPanels.CombineInformationPanel" />
+ <Panel id = "BaseDirectoryPanel" _label = "Location of Project Files" class = "MonoDevelop.Ide.Projects.OptionPanels.BaseDirectoryPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="SolutionFolder">
+ <Panel id = "BaseDirectoryPanel" _label = "Location of Project Files" class = "MonoDevelop.Ide.Projects.OptionPanels.BaseDirectoryPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="Workspace">
+ <Panel id = "BaseDirectoryPanel" _label = "Location of Project Files" class = "MonoDevelop.Ide.Projects.OptionPanels.BaseDirectoryPanel"/>
+ </Condition>
+ </Section>
+ <Condition id="ItemType" value="Solution">
+ <Section id = "AuthorInfo" _label = "Author Information" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.AuthorInformationPanel" />
+ </Condition>
+ </Section>
+ <Section id="Build" _label="Build">
+ <Section id="General" _label="General" icon="md-build-combine">
+ <Condition id="ItemType" value="DotNetAssemblyProject">
+ <Panel id = "RuntimeOptionsPanel" _label = "Runtime Options" class = "MonoDevelop.Ide.Projects.OptionPanels.RuntimeOptionsPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="PortableDotNetProject">
+ <Panel id = "PortableRuntimeOptionsPanel" _label = "Runtime Options" class = "MonoDevelop.Ide.Projects.OptionPanels.PortableRuntimeOptionsPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="Solution">
+ <Panel id = "SolutionGeneral" _label = "Build" class = "MonoDevelop.Ide.Projects.OptionPanels.CombineBuildOptions"/>
+ </Condition>
+ </Section>
+ <Condition id="ItemType" value="SolutionEntityItem">
+ <Section id = "CustomCommands" _label = "Custom Commands" icon="md-custom-commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.BuildCustomCommandPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="Project">
+ <Section id = "ProjectConfigurations" _label = "Configurations" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.SolutionItemConfigurationsPanel"/>
+ <Section id = "Compiler" _label="Compiler" icon="md-compiler-options" />
+ <Section id = "SigningPreferences" _label = "Assembly Signing" class = "MonoDevelop.Ide.Projects.OptionPanels.CommonAssemblySigningPreferencesPanel"/>
+ <Section id = "OutputOptionsPanel" _label = "Output" class = "MonoDevelop.Ide.Projects.OptionPanels.OutputOptionsPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="Solution">
+ <Section id = "SolutionConfigurations" _label="Configurations">
+ <Panel id = "Configurations" _label = "Configurations" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.SolutionItemConfigurationsPanel"/>
+ <Panel id = "EntryConfigurations" _label = "Configuration Mappings" fill = "true" grouping="Tab" class = "MonoDevelop.Ide.Projects.OptionPanels.CombineConfigurationPanel"/>
+ </Section>
+ </Condition>
+ </Section>
+ <Section id="Run" _label="Run">
+ <Section id="General" _label="General" icon="gtk-execute">
+ <Condition id="ItemType" value="Project">
+ <Panel id = "RunOptionsPanel" _label = "Run" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.RunOptionsPanel"/>
+ </Condition>
+ </Section>
+ <Condition id="ItemType" value="Solution">
+ <Section id = "StartupOptionsPanel" _label = "Startup Project" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.StartupOptionsPanel"/>
+ </Condition>
+ <Condition id="ItemType" value="SolutionEntityItem">
+ <Section id = "CustomCommands" _label = "Custom Commands" icon="md-custom-commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.ExecutionCustomCommandPanel"/>
+ </Condition>
+ </Section>
+ <Section id="SourceCode" _label="Source Code">
+ <Section id="DotNetNamingPolicies" _label=".NET Naming Policies">
+ <Condition id="ItemType" value="Solution">
+ <Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
+ </Condition>
+ <Condition id="ItemType" value="SolutionItem">
+ <Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
+ </Condition>
+ </Section>
+ <Condition id="ItemType" value="Solution">
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
+ <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ </Condition>
+ <Condition id="ItemType" value="SolutionItem">
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
+ <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ </Condition>
+ </Section>
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainMenu.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainMenu.addin.xml
new file mode 100644
index 0000000..36e512a
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainMenu.addin.xml
@@ -0,0 +1,273 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/MainMenu" name = "Main menu">
+ <Description>Main menu items.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/AppMenu" name = "App menu">
+ <Description>App menu items.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/MainMenu">
+ <ItemSet id = "File" _label = "_File">
+ <ItemSet id = "New" _label = "_New">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.NewFile" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.NewProject" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.NewWorkspace" />
+ </ItemSet>
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenFile" />
+
+ <SeparatorItem id = "OpenSep" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Save" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAs" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ReloadFile" />
+ <SeparatorItem id = "SaveSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPageSetup" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintPreviewDocument" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.PrintDocument" />
+ <SeparatorItem id = "RecentSeparator" />
+ <ItemSet id = "RecentFiles" _label = "Recent _Files">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.RecentFileList" />
+ <SeparatorItem id = "RecentFilesSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ClearRecentFiles" />
+ </ItemSet>
+
+ <ItemSet id = "RecentProjects" _label = "Recent Solu_tions">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.RecentProjectList" />
+ <SeparatorItem id = "RecentProjectsSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ClearRecentProjects" />
+ </ItemSet>
+
+ <SeparatorItem id = "ExitSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseWorkspace" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseFile" _label = "_Close" />
+ <Condition id="Platform" value="!mac">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Exit" />
+ </Condition>
+ </ItemSet>
+
+ <ItemSet id = "Edit" _label = "_Edit">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Undo" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Redo" />
+
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Cut" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" />
+
+ <SeparatorItem id = "Separator2" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.SelectAll" />
+
+ <SeparatorItem id = "Separator4" />
+
+ <ItemSet id = "Format" _label = "_Format">
+ <CommandItem id = "MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatBuffer" />
+ <CommandItem id = "MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatSelection" />
+ <SeparatorItem id ="FormatSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.UppercaseSelection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.IndentSelection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.UnIndentSelection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.RemoveTrailingWhiteSpaces" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.JoinWithNextLine" />
+ </ItemSet>
+
+ <ItemSet id = "Folding" _label = "F_olding">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.ToggleFolding" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.ToggleAllFoldings" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.FoldDefinitions" />
+ </ItemSet>
+
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowCompletionWindow" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ToggleCompletionSuggestionMode" />
+
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowParameterCompletionWindow" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ShowCodeTemplateWindow" />
+ <SeparatorItem id = "Separator5" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.WordCount" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.InsertStandardHeader" />
+ <SeparatorItem id = "Separator6" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.ToggleBlockSelectionMode" />
+ <SeparatorItem id = "optionssep5" />
+ <Condition id="Platform" value="linux">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.MonodevelopPreferences" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.DefaultPolicies" />
+ </Condition>
+ </ItemSet>
+
+ <ItemSet id = "View" _label = "_View">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.LayoutList" />
+ <SeparatorItem id = "ViewSeparator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.NewLayout" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.DeleteCurrentLayout" />
+ <SeparatorItem id = "ViewSeparator2" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ViewList" />
+ <SeparatorItem id = "ViewSeparator3" />
+ <SeparatorItem id = "ViewItemsSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomIn" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomOut" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ZoomReset" />
+ <SeparatorItem id = "ViewItemsSeparator4" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.FocusCurrentDocument" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ShowWelcomePage" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.FullScreen" />
+ </ItemSet>
+
+ <ItemSet id = "Search" _label = "_Search">
+
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.Find" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindPrevious" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindNext" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindNextSelection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.Replace" />
+
+ <SeparatorItem id = "SearchSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindInFiles" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.ReplaceInFiles" />
+
+ <SeparatorItem id = "SearchInFilesSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.ToggleBookmark" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.PrevBookmark" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.NextBookmark" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.ClearBookmarks" />
+ <SeparatorItem id = "Separator2" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.GotoLineNumber" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.GotoFile" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.GotoType" />
+ <CommandItem id = "MonoDevelop.Components.MainToolbar.Commands.NavigateTo" />
+
+ <SeparatorItem id = "ViewItemsSeparator3" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateBack" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateForward" />
+ <ItemSet id = "NavigationList" _label = "Navigation _History"
+ _description = "Select a point from the navigation history" >
+ <CommandItem id = "MonoDevelop.Ide.Commands.NavigationCommands.NavigateHistory" />
+ <SeparatorItem id = "NavigationHistoryClearSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.NavigationCommands.ClearNavigationHistory" />
+ </ItemSet>
+ <SeparatorItem id = "ViewItemsSeparator4" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ShowPrevious" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.ShowNext" />
+ <SeparatorItem id = "Separator3" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.TextEditorCommands.GotoMatchingBrace" />
+ </ItemSet>
+
+ <ItemSet id = "Project" _label = "_Project">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddReference" />
+ <SeparatorItem id = "ExportSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.CustomCommandList" />
+ <SeparatorItem id = "OptionsSeparator" />
+ <ItemSet id = "SelectActiveConfiguration" _label = "Active Configuration" autohide = "true">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SelectActiveConfiguration" />
+ </ItemSet>
+ <ItemSet id = "SelectActiveRuntime" _label = "Active Runtime" autohide = "true">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SelectActiveRuntime" />
+ </ItemSet>
+ <SeparatorItem id = "PolicyToolsStart" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy" />
+ <SeparatorItem id = "PolicyToolsEnd" />
+ <SeparatorItem id = "OptionsSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SolutionOptions" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ProjectOptions" />
+ </ItemSet>
+
+ <ItemSet id = "Build" _label = "_Build">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.BuildSolution" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.RebuildSolution" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.CleanSolution" />
+ <SeparatorItem id = "Separator0" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Build" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Rebuild" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Clean" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Stop" />
+ </ItemSet>
+
+ <ItemSet id = "Run" _label = "_Run">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Run" />
+ <ItemSet id = "RunWith" _label = "Run With">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.RunWithList" />
+ </ItemSet>
+ <SeparatorItem id = "StopSection" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Stop" />
+ </ItemSet>
+
+ <ItemSet id = "Tools" _label = "_Tools">
+ <Condition id="Platform" value="!mac">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ToolCommands.AddinManager" />
+ </Condition>
+ <SeparatorItem id ="AddinManagerSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ToolCommands.ToolList" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ToolCommands.InstrumentationViewer" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.InsertGuid" />
+ <SeparatorItem id = "OptionsSection" />
+ <Condition id="Platform" value="windows">
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.MonodevelopPreferences" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.DefaultPolicies" />
+ </Condition>
+ </ItemSet>
+
+ <ItemSet id = "Window" _label = "_Window">
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.NextWindow" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.PrevWindow" />
+ <SeparatorItem id ="NxtPrvSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseAllFiles" />
+<!-- <SeparatorItem id ="SplitSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.SplitWindowVertically" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.SplitWindowHorizontally" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.UnsplitWindow" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" />-->
+ <SeparatorItem id = "contentSep" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.WindowCommands.OpenWindowList" />
+ </ItemSet>
+
+ <ItemSet id = "Help" _label = "_Help">
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.Help" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.TipOfTheDay" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.SendFeedback" />
+ <Condition id = "Platform" value = "!mac">
+ <CommandItem id = "MonoDevelop.Ide.Updater.UpdateCommands.CheckForUpdates" />
+ </Condition>
+ <SeparatorItem id = "Separator2" />
+ <ItemSet id = "Web" _label = "_Web">
+ <LinkItem id = "MonoDevelop" _label = "MonoDevelop" link = "http://www.monodevelop.com" />
+ <LinkItem id = "Mono" _label = "Mono Project" description = "A free .NET implementation effort, worth visiting" link = "http://www.mono-project.com" />
+ <ItemSet id = "C#" _label = "C#">
+ <LinkItem id = "C# Help" _label = "C# Help" link = "http://www.csharphelp.com" />
+ <LinkItem id = "C# Corner" _label = "C# Corner" link = "http://www.c-sharpcorner.com" />
+ <LinkItem id = "CodePlex" _label = "CodePlex" description = "Open Source Project Community." link = "http://www.codeplex.com" />
+ <LinkItem id = "MsCodeGallery" _label = "MSDN Code Gallery" description = "Download and share sample applications, code snippets, and other resources with the developer community." link = "http://code.msdn.microsoft.com" />
+ </ItemSet>
+ </ItemSet>
+ <SeparatorItem id = "Separator3" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.OpenLogDirectory" />
+ <LinkItem id = "ReportBug" _label = "Report a Bug" link = "http://xamar.in/r/file_studio_bug" />
+ <Condition id = "Platform" value = "!mac">
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.About" />
+ </Condition>
+ </ItemSet>
+</Extension>
+
+<Extension path="/MonoDevelop/Ide/AppMenu">
+ <Condition id = "Platform" value = "mac">
+ <CommandItem id = "MonoDevelop.Ide.Commands.HelpCommands.About" />
+ <CommandItem id = "MonoDevelop.Ide.Updater.UpdateCommands.CheckForUpdates" />
+ <SeparatorItem id = "PreferencesSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.MonodevelopPreferences" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.DefaultPolicies" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ToolCommands.AddinManager" />
+ <SeparatorItem id = "QuitSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Exit" />
+ </Condition>
+</Extension>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainToolbar.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainToolbar.addin.xml
new file mode 100644
index 0000000..5d392ab
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainToolbar.addin.xml
@@ -0,0 +1,11 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/CommandBar" name = "Main toolbar">
+ <Description>Main toolbar items.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/CommandBar">
+</Extension>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MimeTypes.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MimeTypes.addin.xml
new file mode 100644
index 0000000..009d34d
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MimeTypes.addin.xml
@@ -0,0 +1,83 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Core/MimeTypes" name = "Mime types">
+ <Description>Mime type to file extension mappings. Mime types defined here override the ones provided by the operating system.</Description>
+ <ExtensionNode name="MimeType" type="MonoDevelop.Ide.Extensions.MimeTypeNode"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="application/x-resource" _description=".NET binary resource" icon="md-resource-file-icon">
+ <File pattern="*.resources" />
+ </MimeType>
+ <MimeType id="text/microsoft-resx" _description=".NET XML resource" icon="md-resource-file-icon" baseType="application/xml">
+ <File pattern="*.resx" />
+ </MimeType>
+ <MimeType id="application/x-addin+xml" _description="Add-in manifest" icon="md-addin-file">
+ <File pattern="*.addin.xml" />
+ <File pattern="*.addin" />
+ </MimeType>
+ <MimeType id="application/xml" _description="XML document" icon="md-xml-file-icon" isText="true">
+ <File pattern="*.xml" />
+ </MimeType>
+ <MimeType id="application/config+xml" _description="Configuration File" baseType="application/xml">
+ <File pattern="*.config" />
+ </MimeType>
+ <MimeType id="application/glade+xml" _description="Glade File" baseType="application/xml">
+ <File pattern="*.glade" />
+ </MimeType>
+ <MimeType id="text/x-changelog" _description="ChangeLog document" isText="true">
+ <File pattern="ChangeLog|Changelog|CHANGELOG|Changelog"/>
+ </MimeType>
+ <MimeType id="application/x-executable" _description=".NET program" icon="md-empty-file-icon">
+ <File pattern="*.exe" />
+ <File pattern="*.dll" />
+ </MimeType>
+ <MimeType id="application/x-sln" _description="MonoDevelop/MSBuild Solution" icon="md-solution" isText="true">
+ <File pattern="*.sln" />
+ </MimeType>
+ <MimeType id="application/x-mds" _description="MonoDevelop 1.0 Solution" icon="md-solution" baseType="application/xml">
+ <File pattern="*.mds" />
+ </MimeType>
+
+ <MimeType id="text/x-patch" _description="diff files" isText="true">
+ <File pattern="*.patch" />
+ <File pattern="*.diff" />
+ </MimeType>
+
+ <MimeType id="text/x-makefile" _description="Makefile" isText="true">
+ <File pattern="Makefile|Makefile.am|Makefile.in"/>
+ </MimeType>
+
+ <MimeType id="text/x-lua" _description="lua files" isText="true">
+ <File pattern="*.lua" />
+ </MimeType>
+
+ <MimeType id="text/x-ilasm" _description="il files" isText="true">
+ <File pattern="*.il" />
+ </MimeType>
+
+ <MimeType id="text/x-jay" _description="jay files" isText="true">
+ <File pattern="*.jay" />
+ </MimeType>
+
+ <MimeType id="text/x-cgsrc" _description="Cg Shader files" isText="true">
+ <File pattern="*.cg" />
+ </MimeType>
+
+ <MimeType id="text/x-apple-strings" _description="Apple Strings" isText="true">
+ <File pattern="*.strings" />
+ </MimeType>
+ <MimeType id="application/json" _description="JSON files" isText="true">
+ <File pattern="*.json" />
+ </MimeType>
+ <MimeType id="application/x-sh" _description="Shell script" isText="true">
+ <File pattern="*.sh" />
+ </MimeType>
+ <MimeType id="text/x-fsharp" _description="f# files" isText="true">
+ <File pattern="*.fs" />
+ <File pattern="*.fsx" />
+ </MimeType>
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MonoDevelop.Ide.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MonoDevelop.Ide.addin.xml
new file mode 100644
index 0000000..5014d3d
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MonoDevelop.Ide.addin.xml
@@ -0,0 +1,311 @@
+<Addin id = "Ide"
+ namespace = "MonoDevelop"
+ name = "MonoDevelop Ide"
+ author = "Todd Berman, Pedro Abelleira Seco, John Luke, Daniel Kornhauser, Alex Graveley, nricciar, John Bou Antoun, Ben Maurer, Jeroen Zwartepoorte, Gustavo Giráldez, Miguel de Icaza, Inigo Illan, Iain McCoy, Nick Drochak, Paweł Różański, Richard Torkar, Paco Martinez, Lluis Sanchez Gual, Christian Hergert, Mike Krueger"
+ copyright = "LGPL"
+ url = "http://www.monodevelop.com"
+ description = "The MonoDevelop IDE application."
+ category = "MonoDevelop Core"
+ isroot = "true"
+ version = "4.0.12"
+ compatVersion = "4.0">
+
+ <Runtime>
+ <Import assembly="MonoDevelop.Ide.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="Core" version="4.0.12"/>
+ </Dependencies>
+
+ <!-- Extension ponts -->
+
+ <ConditionType id="combineopen" type="MonoDevelop.Ide.Codons.CombineOpenCondition" />
+ <ConditionType id="activeproject" type="MonoDevelop.Ide.Codons.ProjectActiveCondition" />
+ <ConditionType id="activelanguage" type="MonoDevelop.Ide.Codons.LanguageActiveCondition" />
+
+ <ExtensionNodeSet id="MonoDevelop.Ide.OptionsDialogSection">
+ <ExtensionNode name="Section" type="MonoDevelop.Ide.Extensions.OptionsDialogSection" />
+ </ExtensionNodeSet>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/PlatformService" name = "Platform Service">
+ <Description>Implementations of platform-dependent code wrapped in a platform-agnostic API. Specified classes must inherit from MonoDevelop.Ide.Desktop.PlatformService.</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Core/WebBrowsers" name = "Web Browsers">
+ <Description>Used optionally to provides a web browser widget. Must implement MonoDevelop.Ide.WebBrowser.IWebBrowserLoader</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.KeyBindingScheme">
+ <ExtensionNode name="Scheme" type="MonoDevelop.Components.Commands.ExtensionNodes.SchemeExtensionNode" />
+ </ExtensionNodeSet>
+
+ <ExtensionPoint path = "/MonoDevelop/Components/DialogHandlers" name = "Dialog Handlers">
+ <Description>Allows providing platform-specific implementations for common dialogs</Description>
+ <ExtensionNode name="Class" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/DisplayBindings" name = "Display bindings">
+ <Description>Display bindings.</Description>
+ <ExtensionNode name="DisplayBinding" type="MonoDevelop.Ide.Codons.DisplayBindingCodon" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/StartupHandlers" name = "Startup handlers">
+ <Description>Commands to be automatically executed when the IDE starts.</Description>
+ <ExtensionNode name="Class" objectType="MonoDevelop.Components.Commands.CommandHandler" customAttributeType="MonoDevelop.Ide.Extensions.StartupHandlerExtensionAttribute">
+ <Description>A subclass of MonoDevelop.Components.Commands.CommandHandler</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/InitCompleteHandlers" name = "Post inialization handlers">
+ <Description>Commands to be automatically executed when the IDE finishes initalization.</Description>
+ <ExtensionNode name="Class">
+ <Description>A subclass of MonoDevelop.Components.Commands.CommandHandler</Description>
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/KeyBindingSchemes" name = "Key binding schemes">
+ <Description>Key binding schemes.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.KeyBindingScheme"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/TaskList/View" name = "Task list views">
+ <Description>Task list views to be shown in the task list pad.</Description>
+ <ExtensionNode name="TaskListView" type="MonoDevelop.Ide.Codons.TaskListViewCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/WorkbenchContexts" name = "Workbench contexts">
+ <Description>Workbench contexts.</Description>
+ <ExtensionNode name="WorkbenchContext" type="MonoDevelop.Ide.Codons.WorkbenchContextCodon">
+ <ExtensionNode name ="ContextPad" type="MonoDevelop.Ide.Codons.ContextPadCodon" />
+ </ExtensionNode>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/ProjectFileFilters" name = "Combine file filters">
+ <Description>File filters to be shown in the Project Open dialog.</Description>
+ <ExtensionNode name="FileFilter" type="MonoDevelop.Ide.Codons.FileFilterCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/FileFilters" name = "File filters">
+ <Description>File filters to be shown in the File Open dialog.</Description>
+ <ExtensionNode name="FileFilter" type="MonoDevelop.Ide.Codons.FileFilterCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/TextEditorExtensions" name = "Text editor extensions">
+ <Description>Extensions to the text editor. Classes must be a subclass of TextEditorExtension.</Description>
+ <ExtensionNode name="Class" type="MonoDevelop.Ide.Extensions.TextEditorExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/ProjectFeatures" name = "Project feature editors">
+ <ExtensionNode name="Class"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/DocumentTab" name = "View Context Menu">
+ <Description>The context menu for all open files.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/ExecutionCommandEditors" name = "View Context Menu">
+ <Description>Widgets which allow editing the configuration of execution commands.</Description>
+ <ExtensionNode name="Customizer" type="MonoDevelop.Ide.Execution.ExecutionCommandCustomizer" objectType="MonoDevelop.Ide.Execution.IExecutionCommandCustomizer"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/CodeTemplates" name = "Code Templates">
+ <Description>Custom code templates.</Description>
+ <ExtensionNode name="CodeTemplate" type="MonoDevelop.Ide.CodeTemplates.CodeTemplateCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/TextEditorResolver" name = "Text Editor Resolver">
+ <Description>Text editor resolvers are responsible for getting resolve results inside text editor locations.</Description>
+ <ExtensionNode name="Resolver" type="MonoDevelop.Ide.Gui.Content.TextEditorResolverProviderCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/WorkbenchLayouts" name = "Workbench Layouts">
+ <Description>This extension point allows registering layouts and pads to be shown in each layout</Description>
+ <ExtensionNode name="Layout" type="MonoDevelop.Ide.Extensions.LayoutExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/CustomTools" name = "Custom code generation tools">
+ <Description>Extensions to the text editor. Classes must be a subclass of TextEditorExtension.</Description>
+ <ExtensionNode name="Tool" type="MonoDevelop.Ide.Extensions.CustomToolExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/Fonts" name = "IDE Fonts">
+ <Description>Addins can register own fonts to be configured.</Description>
+ <ExtensionNode name="Font" type="MonoDevelop.Ide.Fonts.FontDescriptionCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/FeedbackService" name = "Feedback reporting service">
+ <Description>Provides the webservice url to which MonoDevelop will send user feedback.</Description>
+ <ExtensionNode name="Service" type="MonoDevelop.Ide.Extensions.ServiceUrlExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/CodeFormatters" name = "Code formatters">
+ <ExtensionNode name="Formatter" type="MonoDevelop.Ide.CodeFormatting.CodeFormatterExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/ReferenceFinder" name = "Reference finders">
+ <Description>Reference finder.</Description>
+ <ExtensionNode name="ReferenceFinder" type="MonoDevelop.Ide.FindInFiles.ReferenceFinderCodon"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/Ide/Updater/UpdateHandlers" name = "Update handlers">
+ <ExtensionNode name="Type" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/TypeSystem/Parser" name = "TypeSystemParser">
+ <ExtensionNode name="Parser" type="MonoDevelop.Ide.TypeSystem.TypeSystemParserNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/TypeSystem/OutputTracking" name = "TypeSystemOutputTracker">
+ <ExtensionNode name="Track" type="MonoDevelop.Ide.TypeSystem.TypeSystemOutputTrackingNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/TypeSystem/FoldingParser">
+ <ExtensionNode name="Parser" type="MonoDevelop.Ide.Extensions.MimeTypeExtensionNode"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/TypeSystem/Ambiences" name = "Language ambiences">
+ <Description>Language ambiences. Specified classes must implement IAmbience.</Description>
+ <ExtensionNode name="Ambience" type="MonoDevelop.Ide.Extensions.MimeTypeExtensionNode" />
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/TypeSystem/CodeGenerators">
+ <ExtensionNode name="Generator" type="MonoDevelop.Ide.Extensions.MimeTypeExtensionNode"/>
+ </ExtensionPoint>
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Core/Applications">
+ <Application id = "gsetup"
+ description = "Graphical add-in setup utility"
+ class = "MonoDevelop.Ide.Gui.Dialogs.SetupApp"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/SystemInformation">
+ <Class class = "MonoDevelop.Ide.IdeVersionInfo" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding id = "DefaultDisplayBinding"
+ class = "MonoDevelop.Ide.Gui.DefaultDisplayBinding"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/StartupHandlers">
+ <Class class = "MonoDevelop.Ide.Updater.UpdateCheckHandler"/>
+ <Class class = "MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayStartup"/>
+ <Class class = "MonoDevelop.Ide.LogReportingStartup"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/KeyBindingSchemes">
+ <Scheme id="Emacs" _name = "GNU/Emacs" resource="KeyBindingSchemeEmacs.xml"/>
+ <Scheme id="VS05" _name = "Visual Studio" resource="KeyBindingSchemeVisualStudio.xml"/>
+ <Scheme id="MD1" _name = "MonoDevelop 1.0" resource="KeyBindingSchemeMonoDevelop1.xml"/>
+ <Scheme id="MD2" _name = "MonoDevelop 2.0" resource="KeyBindingSchemeMonoDevelop2.xml"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TaskList/View">
+ <TaskListView _label = "Comments" class = "MonoDevelop.Ide.Tasks.CommentTasksView" />
+ <TaskListView _label = "User Tasks" class = "MonoDevelop.Ide.Tasks.UserTasksView" />
+ </Extension>
+
+ <Extension path="/MonoDevelop/Ide/WorkbenchLayouts">
+ <Layout id="Solution" _name="Solution" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/FileFilters">
+ <FileFilter id = "Assemblies"
+ _label = "Assemblies"
+ extensions = "*.exe,*.dll"/>
+ <FileFilter id = "Xml"
+ _label = "XML Files"
+ extensions = "*.xml"/>
+ <FileFilter id = "Resources"
+ _label = ".NET Resource Files"
+ extensions = "*.resources,*.resx"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ProjectFileFilters">
+ <FileFilter id = "SlnCombine"
+ _label = "Solution Files"
+ extensions = "*.sln"/>
+ <FileFilter id = "MSBuildProject"
+ _label = "Project Files"
+ extensions = "*.*proj"/>
+ <FileFilter id = "Combine"
+ _label = "MD 1.0 Solution Files"
+ extensions = "*.mds"/>
+ <FileFilter id = "Project"
+ _label = "MD 1.0 Project Files"
+ extensions = "*.mdp"/>
+ <FileFilter id = "Workbench"
+ _label = "MD Workbench"
+ extensions = "*.mdw"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/TextEditorExtensions">
+ <Class id="InitialStep" class = "MonoDevelop.Ide.Gui.Content.TextEditorExtensionMarker" />
+ <Class id="MidStep" class = "MonoDevelop.Ide.Gui.Content.TextEditorExtensionMarker" />
+ <Class id="FinalStep" class = "MonoDevelop.Ide.Gui.Content.TextEditorExtensionMarker" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ContextMenu/DocumentTab">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseFile" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseAllFiles" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.CloseAllButThis" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.ReopenClosedTab" />
+ <SeparatorItem id = "CloseSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.Save" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
+ <SeparatorItem id = "SaveSeparator" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenContainingFolder" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.CopyPathName" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileTabCommands.ToggleMaximize" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/ExecutionCommandEditors">
+ <Customizer id="MonoDevelop.Ide.Execution.CustomArgsCustomizer" _name="Arguments" />
+ <Customizer id="MonoDevelop.Ide.Execution.MonoExecutionCustomizer" _name="Mono Options" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/Fonts">
+ <Font name ="Editor" _displayName="Text Editor" default ="_DEFAULT_MONOSPACE"/>
+ <Font name ="Editor(Gutter)" _displayName="Text Editor Line Numbers" default =""/>
+ <Font name ="Pad" _displayName="Pads" default ="_DEFAULT_SANS"/>
+ <Font name ="OutputPad" _displayName="Output Pads" default ="_DEFAULT_MONOSPACE"/>
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/UserDataMigration">
+ <!-- 2.4 -->
+ <Migration sourceVersion="2.4" kind="UserData" path="KeyBindings.xml" targetPath="KeyBindings/Custom.kb.xml" />
+ <Migration sourceVersion="2.4" kind="UserData" path="KeyBindingsMac.xml" targetPath="KeyBindings/Custom.kb-mac.xml" />
+ <Migration sourceVersion="2.4" kind="UserData" path="templates/code" targetPath="Snippets" isDirectory="true" />
+ <Migration sourceVersion="2.4" kind="Config" path="custom-command-modes.xml" />
+ <Migration sourceVersion="2.4" kind="Config" path="MonoDevelop-tools.xml" />
+ <Migration sourceVersion="2.4" kind="Config" path="EditingLayout2.xml" targetPath="EditingLayout.xml"/>
+ <!-- 2.6 and 2.7 incorrectly stored KeyBindings in Config despite migrating 2.4 ones to UserData -->
+ <Migration sourceVersion="2.6-2.7" kind="Config" targetKind="UserData" path="KeyBindings" isDirectory="true" />
+ <!-- 2.6+ -->
+ <Migration sourceVersion="2.8+" kind="UserData" path="KeyBindings" isDirectory="true" />
+ <Migration sourceVersion="2.6+" kind="UserData" path="Snippets" isDirectory="true" />
+ <Migration sourceVersion="2.6+" kind="Config" path="custom-command-modes.xml" />
+ <Migration sourceVersion="2.6+" kind="Config" path="MonoDevelop-tools.xml" />
+ <Migration sourceVersion="2.6+" kind="Config" path="EditingLayout.xml" />
+ <Migration sourceVersion="2.6+" kind="LocalConfig" path="RecentlyUsed.xml" />
+ <Migration sourceVersion="2.6+" kind="LocalConfig" path="Feedback.xml" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/WebCertificateProvider">
+ <Class class = "MonoDevelop.Ide.DefaultWebCertificateProvider" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/CustomTools">
+ <Tool name="ResXFileCodeGenerator" type="MonoDevelop.Ide.CustomTools.ResXFileCodeGenerator" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Core/FileSystemExtensions">
+ <Class id="Ide" class = "MonoDevelop.Ide.Projects.IdeFileSystemExtensionExtension" insertafter = "FinalStep"/>
+ </Extension>
+</Addin>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Pads.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Pads.addin.xml
new file mode 100644
index 0000000..66eff20
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Pads.addin.xml
@@ -0,0 +1,89 @@
+<ExtensionModel>
+
+<ExtensionNodeSet id="MonoDevelop.Ide.Pads">
+ <ExtensionNode name="Pad" type="MonoDevelop.Ide.Codons.PadCodon">
+ <ExtensionNode name="NodeBuilder" type="MonoDevelop.Ide.Codons.NodeBuilderCodon"/>
+ <ExtensionNode name="PadOption" type="MonoDevelop.Ide.Codons.PadOptionCodon"/>
+ </ExtensionNode>
+ <ExtensionNode name="SolutionPad" type="MonoDevelop.Ide.Codons.SolutionPadCodon">
+ <ExtensionNode name="NodeBuilder" type="MonoDevelop.Ide.Codons.NodeBuilderCodon"/>
+ <ExtensionNode name="PadOption" type="MonoDevelop.Ide.Codons.PadOptionCodon"/>
+ <ExtensionNode name="ContextMenu" type="MonoDevelop.Ide.Codons.PadContextMenuExtensionNode"/>
+ </ExtensionNode>
+ <ExtensionNode name="Category" type="MonoDevelop.Ide.Codons.CategoryNode">
+ <ExtensionNodeSet id="MonoDevelop.Ide.Pads"/>
+ </ExtensionNode>
+</ExtensionNodeSet>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/Pads" name = "Workbench pads">
+ <Description>Pads shown in the workbench.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Ide.Pads" />
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/Pads">
+ <Pad id = "MonoDevelop.Ide.Gui.Pads.ErrorListPad"
+ _label = "Errors"
+ icon="md-errors-list"
+ class = "MonoDevelop.Ide.Gui.Pads.ErrorListPad"
+ defaultPlacement = "Bottom"
+ defaultStatus="AutoHide"
+ defaultLayout="*"/>
+
+ <Pad id = "MonoDevelop.Ide.Gui.Pads.TaskListPad"
+ _label = "Tasks"
+ icon="md-task-list-icon"
+ class = "MonoDevelop.Ide.Gui.Pads.TaskListPad"
+ defaultPlacement = "Bottom"
+ defaultStatus="AutoHide"
+ defaultLayout="*"/>
+
+ <Pad id = "MonoDevelop.Ide.Gui.Pads.HelpTree"
+ defaultPlacement = "Left"
+ _label = "Help"
+ icon="gtk-help"
+ class = "MonoDevelop.Ide.Gui.Pads.HelpTree"/>
+
+ <SolutionPad id = "ProjectPad" _label = "Solution" icon = "md-solution" class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectSolutionPad" defaultLayout="*" defaultPlacement = "Left">
+ <ContextMenu path="/MonoDevelop/Ide/ContextMenu/ProjectPad" />
+ <PadOption id = "ShowAllFiles" _label = "Show All Files" defaultValue = "False" />
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.WorkspaceNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SolutionNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SolutionFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectReferenceFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectReferenceNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFileNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SystemFileNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ShowAllFilesBuilderExtension"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.FileOperationsBuilderExtension"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.UnknownEntryNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SolutionFolderFileNodeBuilder"/>
+ </SolutionPad>
+
+ <SolutionPad id = "ClassPad" _label = "Classes" icon = "md-class" class = "MonoDevelop.Ide.Gui.Pads.ClassBrowser.ClassBrowserPad" defaultPlacement = "Left" defaultStatus="AutoHide">
+ <PadOption id = "NestedNamespaces" _label = "Nested namespaces" defaultValue = "True" />
+ <PadOption id = "ShowProjects" _label = "Show project structure" defaultValue = "True" />
+ <PadOption id = "GroupByAccess" _label = "Group members by access" defaultValue = "False" />
+ <PadOption id = "GroupByType" _label = "Group members by member type" defaultValue = "True" />
+ <PadOption id = "PublicApiOnly" _label = "Show public members only" defaultValue = "False" />
+ <PadOption id = "PublicProtectedApiOnly" _label = "Show public and protected members only" defaultValue = "False" />
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.WorkspaceNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.SolutionNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.CombineNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.ProjectNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.NamespaceNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.ClassNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.EventNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.FieldNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.MethodNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.PropertyNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectReferenceFolderNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ClassPad.ReferenceNodeBuilder"/>
+ </SolutionPad>
+
+ <Category id="Other" _name="Other Pads">
+ </Category>
+</Extension>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Policies.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Policies.addin.xml
new file mode 100644
index 0000000..8603402
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Policies.addin.xml
@@ -0,0 +1,47 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels" name = "Mime Type policy panels">
+ <Description>Panels for editing mime type policies. Must derive from MimeTypePolicyOptionsPanel.</Description>
+ <ExtensionNode name="Panel" type="MonoDevelop.Ide.Extensions.MimeTypeOptionsPanelNode"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels">
+ <Panel id = "TextStylePolicy" mimeType="text/plain" _label = "Text Style" class = "MonoDevelop.Ide.Gui.OptionPanels.TextStylePolicyPanel" />
+</Extension>
+
+<Extension path = "/MonoDevelop/ProjectModel/PolicySets/Mono" >
+ <Policies resource="MonoTextStylePolicy.xml" />
+</Extension>
+<Extension path = "/MonoDevelop/ProjectModel/PolicySets/VisualStudio" >
+ <Policies resource="VisualStudioTextStylePolicy.xml" />
+</Extension>
+<Extension path = "/MonoDevelop/ProjectModel/PolicySets/Invariant" >
+ <Policies resource="InvariantTextStylePolicy.xml" />
+</Extension>
+
+<Extension path = "/MonoDevelop/ProjectModel/PolicySets" >
+ <PolicySet id="MITX11License" _name="MIT/X11 License">
+ <Policies resource="MITX11LicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="NewBSDLicense" _name="New BSD License">
+ <Policies resource="NewBSDLicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="Apache2License" _name="Apache 2.0 License">
+ <Policies resource="Apache2LicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="LGPLv2License" _name="LGPL 2.1 License">
+ <Policies resource="LGPL2-1LicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="GPLv2License" _name="GPL 2 License">
+ <Policies resource="GPL2LicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="GPLv3License" _name="GPL 3 License">
+ <Policies resource="GPL3LicencePolicy.xml" />
+ </PolicySet>
+ <PolicySet id="LGPLv3License" _name="LGPL 3 License">
+ <Policies resource="LGPL3LicencePolicy.xml" />
+ </PolicySet>
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.StockIcons.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.StockIcons.addin.xml
new file mode 100644
index 0000000..f0ea6f9
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.StockIcons.addin.xml
@@ -0,0 +1,301 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Core/StockIcons" name = "Stock icons">
+ <Description>Available from MonoDevelop.Ide.ImageService</Description>
+ <ExtensionNode name="StockIcon" type="MonoDevelop.Ide.Extensions.StockIconCodon" />
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Core/StockIcons">
+ <StockIcon stockid = "md-add-namespace" resource = "add-namespace-16.png"/>
+ <StockIcon stockid = "md-breakpoint" resource = "breakpoint-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-new" resource = "breakpoint-new-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-disabled" resource = "breakpoint-disabled-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-invalid" resource = "breakpoint-invalid-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-on-off" resource = "breakpoint-on-off-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-disable-all" resource = "breakpoint-disable-all-16.png" size="Menu"/>
+ <StockIcon stockid = "md-breakpoint-remove-all" resource = "breakpoint-remove-all-16.png" size="Menu"/>
+ <StockIcon stockid = "md-build-combine" resource = "build-solution-22.png" />
+ <StockIcon stockid = "md-build-combine" resource = "build-solution-16.png" size="Menu"/>
+ <StockIcon stockid = "md-build-current-selected-project" resource = "build-project-22.png" />
+ <StockIcon stockid = "md-build-current-selected-project" resource = "build-project-16.png" size="Menu"/>
+ <StockIcon stockid = "md-class" resource = "element-class-16.png" size="Menu" />
+ <StockIcon stockid = "md-clear-all-bookmarks" resource = "clear-all-bookmarks-16.png" size="Menu"/>
+ <StockIcon stockid = "md-clear-all-bookmarks" resource = "clear-all-bookmarks-22.png" />
+ <StockIcon stockid = "md-close-all-documents" resource = "close-all-documents-16.png" size="Menu" />
+ <StockIcon stockid = "md-close-combine-icon" resource = "close-solution-16.png" size="Menu" />
+ <StockIcon stockid = "md-closed-folder" resource = "closed-folder-16.png" size="Menu" />
+ <StockIcon stockid = "md-closed-reference-folder" icon = "md-project-item-group" size="Menu" />
+ <StockIcon stockid = "md-closed-resource-folder" resource = "closed-resource-folder-16.png" />
+ <StockIcon stockid = "md-solution" resource = "solution-16.png" size = "Menu" />
+ <StockIcon stockid = "md-solution" resource = "solution-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-delegate" resource = "element-delegate-16.png" size="Menu" />
+ <StockIcon stockid = "md-empty" resource = "empty-16.png" size="Menu" />
+ <StockIcon stockid = "md-magnify" resource = "magnify-16.png" size="Menu" />
+ <StockIcon stockid = "md-empty-file-icon" resource = "empty-file-32.png" />
+ <StockIcon stockid = "md-enum" resource = "element-enumeration-16.png" size="Menu" />
+ <StockIcon stockid = "md-enum-constant" resource = "element-enumeration-constant-16.png" size="Menu" />
+ <StockIcon stockid = "md-event" resource = "element-event-16.png" size="Menu" />
+ <StockIcon stockid = "md-static-event" icon = "res:element-event-16.png|res:static-16.png" size="Menu"/>
+ <StockIcon stockid = "md-execution-marker" resource = "ExecutionMarker.png" size="Menu" />
+ <StockIcon stockid = "md-extensionmethod" resource = "element-extensionmethod-16.png" size="Menu" />
+ <StockIcon stockid = "md-field" resource = "element-field-16.png" size="Menu" />
+ <StockIcon stockid = "md-static-field" icon = "res:element-field-16.png|res:static-16.png" size="Menu" />
+ <StockIcon stockid = "md-find-in-files" resource = "find-in-files-16.png" size="Menu" />
+ <StockIcon stockid = "md-find-next-icon" resource = "edit-find-next-16.png" size="Menu"/>
+ <StockIcon stockid = "md-find-next-icon" resource = "edit-find-next-24.png" />
+ <StockIcon stockid = "md-folder-overlay" resource = "folder-overlay-16.png" size="Menu" />
+ <StockIcon stockid = "md-fullscreen" resource = "view-fullscreen.png" size = "Menu" />
+ <StockIcon stockid = "md-fullscreen" resource = "view-fullscreen_22.png" />
+ <StockIcon stockid = "md-goto-nextbookmark" resource = "goto-next-bookmark-16.png" size="Menu"/>
+ <StockIcon stockid = "md-goto-nextbookmark" resource = "goto-next-bookmark-22.png"/>
+ <StockIcon stockid = "md-goto-prevbookmark" resource = "goto-prev-bookmark-16.png" size="Menu"/>
+ <StockIcon stockid = "md-goto-prevbookmark" resource = "goto-prev-bookmark-22.png" />
+ <StockIcon stockid = "md-interface" resource = "element-interface-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-class" icon = "res:element-class-16.png|res:visibility-internal-16.png" size="Menu"/>
+ <StockIcon stockid = "md-internal-delegate" icon = "res:element-delegate-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-enum" icon = "res:element-enumeration-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-event" icon = "res:element-event-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-static-event" icon = "res:element-event-16.png|res:static-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-extensionmethod" icon = "res:element-extensionmethod-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-field" icon = "res:element-field-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-static-field" icon = "res:element-field-16.png|res:static-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-interface" icon = "res:element-interface-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-method" icon = "res:element-method-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-static-method" icon = "res:element-method-16.png|res:static-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-property" icon = "res:element-property-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-internal-struct" icon = "res:element-structure-16.png|res:visibility-internal-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-class" icon = "res:element-class-16.png|res:visibility-InternalAndProtected-16.png" size="Menu"/>
+ <StockIcon stockid = "md-InternalAndProtected-delegate" icon = "res:element-delegate-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-enum" icon = "res:element-enumeration-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-event" icon = "res:element-event-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-static-event" icon = "res:element-event-16.png|res:static-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-extensionmethod" icon = "res:element-extensionmethod-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-field" icon = "res:element-field-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-static-field" icon = "res:element-field-16.png|res:static-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-interface" icon = "res:element-interface-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-method" icon = "res:element-method-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-static-method" icon = "res:element-method-16.png|res:static-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-property" icon = "res:element-property-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-InternalAndProtected-struct" icon = "res:element-structure-16.png|res:visibility-InternalAndProtected-16.png" size="Menu" />
+ <StockIcon stockid = "md-variable" resource = "variable-16.png" size="Menu" />
+ <StockIcon stockid = "md-literal" resource = "element-literal-16.png" size="Menu" />
+ <StockIcon stockid = "md-method" resource = "element-method-16.png" size="Menu" />
+ <StockIcon stockid = "md-static-method" icon = "res:element-method-16.png|res:static-16.png" size="Menu" />
+ <StockIcon stockid = "md-newmethod" resource = "element-method-new-16.png" size="Menu" />
+ <StockIcon stockid = "md-misc-files" resource = "misc-files-16.png" size="Menu" />
+ <StockIcon stockid = "md-name-space" resource = "element-namespace-16.png" size="Menu" />
+ <StockIcon stockid = "md-new-folder-icon" resource = "folder-new-16.png" size="Menu" />
+ <StockIcon stockid = "md-new-project" resource = "project-new-16.png" size="Menu" />
+ <StockIcon stockid = "md-new-solution" resource = "solution-new-16.png" size="Menu" />
+ <StockIcon stockid = "md-open-folder" resource = "open-folder-16.png" size="Menu" />
+ <StockIcon stockid = "md-open-project-icon" resource = "open-project-16.png" size="Menu" />
+ <StockIcon stockid = "md-open-reference-folder" icon = "md-project-item-group" size="Menu" />
+ <StockIcon stockid = "md-open-resource-folder" resource = "open-resource-folder-16.png" size="Menu" />
+ <StockIcon stockid = "md-output-icon" resource = "output-icon-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-class" icon = "res:element-class-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-delegate" icon = "res:element-delegate-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-enum" icon = "res:element-enumeration-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-event" icon = "res:element-event-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-static-event" icon = "res:element-event-16.png|res:static-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-extensionmethod" icon = "res:element-extensionmethod-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-field" icon = "res:element-field-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-static-field" icon = "res:element-field-16.png|res:visibility-private-16.png|res:static-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-interface" icon = "res:element-interface-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-method" icon = "res:element-method-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-static-method" icon = "res:element-method-16.png|res:static-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-property" icon = "res:element-property-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-private-struct" icon = "res:element-structure-16.png|res:visibility-private-16.png" size="Menu" />
+ <StockIcon stockid = "md-property" resource = "element-property-16.png" size="Menu" />
+ <StockIcon stockid = "md-static-property" icon = "res:element-property-16.png|res:static-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-class" icon = "res:element-class-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-delegate" icon = "res:element-delegate-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-enum" icon = "res:element-enumeration-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-event" icon = "res:element-event-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-static-event" icon = "res:element-event-16.png|res:static-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-extensionmethod" icon = "res:element-extensionmethod-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-field" icon = "res:element-field-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-static-field" icon = "res:element-field-16.png|res:static-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-interface" icon = "res:element-interface-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-method" icon = "res:element-method-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-static-method" icon = "res:element-method-16.png|res:static-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-property" icon = "res:element-property-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-protected-struct" icon = "res:element-structure-16.png|res:visibility-protected-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-class" icon = "res:element-class-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-delegate" icon = "res:element-delegate-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-enum" icon = "res:element-enumeration-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-event" icon = "res:element-event-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-static-event" icon = "res:element-event-16.png|res:static-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-extensionmethod" icon = "res:element-extensionmethod-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-field" icon = "res:element-field-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-static-field" icon = "res:element-field-16.png|res:static-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-interface" icon = "res:element-interface-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-method" icon = "res:element-method-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-static-method" icon = "res:element-method-16.png|res:static-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-property" icon = "res:element-property-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-static-property" icon = "res:element-property-16.png|res:static-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-ProtectedOrInternal-struct" icon = "res:element-structure-16.png|res:visibility-ProtectedOrInternal-16.png" size="Menu" />
+ <StockIcon stockid = "md-reference" resource = "project-reference-16.png" size="Menu" />
+ <StockIcon stockid = "md-reference-package" icon = "md-reference" size="Menu" />
+ <StockIcon stockid = "md-reference-folder" icon = "md-reference|md-folder-overlay" size="Menu" />
+ <StockIcon stockid = "md-reference-project" icon = "md-reference|md-project-overlay" size="Menu" />
+ <StockIcon stockid = "md-remove-namespace" resource = "remove-namespace-16.png" size="Menu" />
+ <StockIcon stockid = "md-warning-overlay" resource = "warning-overlay.png" size="Menu" />
+ <StockIcon stockid = "md-reference-warning" icon = "md-reference|res:warning-overlay.png" size = "Menu"/>
+ <StockIcon stockid = "md-replace-in-files" resource = "replace-in-files-16.png" size="Menu" />
+ <StockIcon stockid = "md-resource-file-icon" resource = "resource-file-16.png" size = "Menu" />
+ <StockIcon stockid = "md-resource-file-icon" resource = "resource-file-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-save-all-icon" resource = "save-all-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-save-all-icon" resource = "save-all-24.png" />
+ <StockIcon stockid = "md-searchbox-clear" resource = "searchbox-clear-16.png" size = "Menu" />
+ <StockIcon stockid = "md-searchbox-search" resource = "searchbox-search-16.png" size = "Menu" />
+ <StockIcon stockid = "md-monodevelop" resource = "monodevelop-16.png" size="Menu"/>
+ <StockIcon stockid = "md-monodevelop" resource = "monodevelop-22.png" />
+ <StockIcon stockid = "md-monodevelop" resource = "monodevelop-32.png" size="Dnd"/>
+ <StockIcon stockid = "md-monodevelop" resource = "monodevelop-22.png" size="Button"/>
+ <StockIcon stockid = "md-monodevelop" resource = "monodevelop-48.png" size="Dialog"/>
+ <StockIcon stockid = "md-project" resource = "project-16.png" size="Menu"/>
+ <StockIcon stockid = "md-project" resource = "project-32.png" size="Dnd" />
+ <StockIcon stockid = "md-project-gui" icon = "md-project|res:project-gui-32.png" size="Dnd" />
+ <StockIcon stockid = "md-project-console" icon = "md-project|res:project-console-32.png" size="Dnd" />
+ <StockIcon stockid = "md-project-item-group" resource = "project-item-group-16.png" size="Menu" />
+ <StockIcon stockid = "md-project-overlay" resource = "project-overlay-16.png" size="Menu" />
+ <StockIcon stockid = "md-library-overlay" resource = "project-library-32.png" size="Dnd" />
+ <StockIcon stockid = "md-web-overlay" resource = "web-overlay-32.png" size="Dnd" />
+ <StockIcon stockid = "md-project-library" icon = "md-project|md-library-overlay" size="Dnd" />
+ <StockIcon stockid = "md-project-web" icon = "md-project|md-web-overlay" size="Dnd" />
+ <StockIcon stockid = "md-sort-namespace" resource = "sort-namespace-16.png" size="Menu" />
+ <StockIcon stockid = "md-split-window" resource = "split-window-16.png" size="Menu" />
+ <StockIcon stockid = "md-struct" resource = "element-structure-16.png" size="Menu" />
+ <StockIcon stockid = "md-toolbar-run-button" resource = "toolbar-runButton.png" size="Menu" />
+ <StockIcon stockid = "md-toolbar-pause-button" resource = "toolbar-pauseButton.png" size="Menu" />
+ <StockIcon stockid = "md-toolbar-skip-button" resource = "toolbar-skipButton.png" size="Menu" />
+ <StockIcon stockid = "md-toolbar-stepIn-button" resource = "toolbar-stepInButton.png" size="Menu" />
+ <StockIcon stockid = "md-toolbar-stepOut-button" resource = "toolbar-stepOutButton.png" size="Menu" />
+ <StockIcon stockid = "md-task-list-icon" resource = "pad-task-list-16.png" size="Menu"/>
+ <StockIcon stockid = "md-task-list-icon" resource = "pad-task-list-24.png" />
+ <StockIcon stockid = "md-text-file-icon" resource = "text-file-16.png" size = "Menu" />
+ <StockIcon stockid = "md-text-file-icon" resource = "text-file-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-html-file-icon" icon = "md-text-file-icon|res:web-overlay-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-html-file-icon" icon = "md-text-file-icon|res:web-overlay-16.png" size = "Menu" />
+ <StockIcon stockid = "md-class-file" resource = "file-class-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-interface-file" resource = "file-interface-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-enum-file" resource = "file-enum-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-struct-file" resource = "file-struct-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-gui-file" icon = "md-text-file-icon|res:project-gui-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-tip-of-the-day" resource = "tip-of-the-day-16.png" size="Menu" />
+ <StockIcon stockid = "md-toggle-bookmark" resource = "toggle-bookmark-16.png" size="Menu"/>
+ <StockIcon stockid = "md-toggle-bookmark" resource = "toggle-bookmark-22.png" />
+ <StockIcon stockid = "md-web-search-icon" resource = "web-search-16.png" size="Menu" />
+ <StockIcon stockid = "md-xml-file-icon" resource = "file-xml-16.png" size = "Menu" />
+ <StockIcon stockid = "md-xml-file-icon" resource = "file-xml-32.png" size = "Dnd" />
+ <StockIcon stockid = "md-addin-file" resource = "file-addin-16.png" size = "Menu" />
+ <StockIcon stockid = "md-package" resource = "package-x-generic_22.png" />
+ <StockIcon stockid = "md-package" resource = "package-x-generic_32.png" size = "Dnd" />
+ <StockIcon stockid = "md-package" resource = "package-x-generic.png" size = "Dialog" />
+ <StockIcon stockid = "md-select-all" resource = "edit-select-all_22.png" />
+ <StockIcon stockid = "md-select-all" resource = "edit-select-all.png" size = "Menu" />
+ <StockIcon stockid = "md-software-update" resource = "system-software-update_22.png" />
+ <StockIcon stockid = "md-software-update" resource = "system-software-update_22.png" size = "Button" />
+ <StockIcon stockid = "md-software-update" resource = "system-software-update.png" size = "Dialog" />
+ <StockIcon stockid = "md-user-package" resource = "user-package.png" />
+ <StockIcon stockid = "md-visual-studio" resource = "visual-studio.png" size="Menu" />
+ <StockIcon stockid = "md-comment" resource = "comment.png" size="Menu" />
+ <StockIcon stockid = "md-uncomment" resource = "uncomment.png" size="Menu" />
+ <StockIcon stockid = "md-addin" resource = "plugin-16.png" />
+ <StockIcon stockid = "md-addin" resource = "plugin-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-addin" resource = "plugin-22.png" size = "Button"/>
+ <StockIcon stockid = "md-addin" resource = "plugin-32.png" size = "LargeToolbar"/>
+ <StockIcon stockid = "md-workspace" resource = "workspace-16.png" size="Menu"/>
+ <StockIcon stockid = "md-workspace" resource = "workspace-32.png" size="Dnd" />
+ <StockIcon stockid = "md-new-solution-folder" resource = "solution-folder-new-16.png" size="Menu"/>
+ <StockIcon stockid = "md-solution-folder-open" resource = "solution-folder-open-16.png" size="Menu"/>
+ <StockIcon stockid = "md-solution-folder-closed" resource = "solution-folder-closed-16.png" size="Menu"/>
+ <StockIcon stockid = "md-regular-file" resource = "gnome-fs-regular.png" />
+ <StockIcon stockid = "md-empty-category" resource = "empty-category-22.png" />
+ <StockIcon stockid = "md-empty-category" resource = "empty-category-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-keyword" resource = "keyword-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-template" resource = "template-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-template-surroundwith" resource = "template-surroundwith-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-code-template" resource = "code-template-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-code-template" resource = "code-template-24.png" />
+ <StockIcon stockid = "md-compiler-options" resource = "compiler-options-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-compiler-options" resource = "compiler-options-24.png" />
+ <StockIcon stockid = "md-custom-commands" resource = "custom-commands-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-custom-commands" resource = "custom-commands-24.png" />
+ <StockIcon stockid = "md-formatting" resource = "formatting-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-formatting" resource = "formatting-24.png" />
+ <StockIcon stockid = "md-markers-rulers" resource = "markers-rulers-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-markers-rulers" resource = "markers-rulers-24.png" />
+ <StockIcon stockid = "md-syntax-highlighting" resource = "syntax-highlighting-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-syntax-highlighting" resource = "syntax-highlighting-24.png" />
+ <StockIcon stockid = "md-text-editor-behavior" resource = "text-editor-behavior-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-text-editor-behavior" resource = "text-editor-behavior-24.png" />
+ <StockIcon stockid = "md-text-quickfix" resource = "text-quickfix-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-message-log" resource = "view-message-log-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-visual-style" resource = "visual-style-16.png" size = "Menu"/>
+ <StockIcon stockid = "md-visual-style" resource = "visual-style-24.png" />
+ <StockIcon stockid = "md-pin-active" resource = "hicolor_status_16x16_pin-active.png" size = "Menu"/>
+ <StockIcon stockid = "md-pin-down" resource = "hicolor_status_16x16_pin-down.png" size = "Menu"/>
+ <StockIcon stockid = "md-pin-up" resource = "hicolor_status_16x16_pin-up.png" size = "Menu"/>
+ <StockIcon stockid = "md-assembly-project" resource = "assembly-project-16.png" size="Menu" />
+ <StockIcon stockid = "md-parser" resource = "parsing.png" size="Menu" />
+ <!-- for some reason both pairs next/previous and forward/back are in use -->
+ <StockIcon stockid = "md-navigate-forward" resource = "navigate-next-16.png" size="Menu" />
+ <StockIcon stockid = "md-navigate-forward" resource = "navigate-next-24.png" />
+ <StockIcon stockid = "md-navigate-back" resource = "navigate-previous-16.png" size="Menu" />
+ <StockIcon stockid = "md-navigate-back" resource = "navigate-previous-24.png" />
+ <StockIcon stockid = "md-navigate-next" resource = "navigate-next-16.png" size="Menu" />
+ <StockIcon stockid = "md-navigate-next" resource = "navigate-next-24.png" />
+ <StockIcon stockid = "md-navigate-previous" resource = "navigate-previous-16.png" size="Menu" />
+ <StockIcon stockid = "md-navigate-previous" resource = "navigate-previous-24.png" />
+ <StockIcon stockid = "md-pin-up" resource = "pinup.png" size="Menu" />
+ <StockIcon stockid = "md-pin-down" resource = "pindown.png" size="Menu" />
+ <StockIcon stockid = "system-file-manager" resource = "system-file-manager.png" size="Menu" />
+ <StockIcon stockid = "sdk-locations" resource = "sdk-locations-16.png" size="Menu" />
+ <StockIcon stockid = "md-keyboard-shortcuts" resource = "keyboard-shortcuts-16.png" size="Menu"/>
+ <StockIcon stockid = "md-keyboard-shortcuts" resource = "keyboard-shortcuts-22.png" />
+ <StockIcon stockid = "md-text-editor" resource = "text-editor-16.png" size="Menu"/>
+ <StockIcon stockid = "md-text-editor" resource = "text-editor-22.png" />
+ <StockIcon stockid = "md-external-tools" resource = "tools-external-tools-16.png" size="Menu" />
+ <StockIcon stockid = "md-external-tools" resource = "tools-external-tools-24.png"/>
+ <StockIcon stockid = "md-feedback" resource = "balloon.png" size = "Menu" />
+ <StockIcon stockid = "md-software-update-available" resource = "software-update-available.png" size="Menu" />
+ <StockIcon stockid = "md-disclose-arrow-up" resource = "disclose-arrow-up.png" size="Menu" />
+ <StockIcon stockid = "md-disclose-arrow-down" resource = "disclose-arrow-down.png" size="Menu" />
+ <StockIcon stockid = "md-link-overlay" resource = "chain-overlay-16.png" size="Menu" />
+ <StockIcon stockid = "md-breadcrumb-next" resource = "breadcrumb-next-normal.png" size="Menu" />
+ <StockIcon stockid = "md-breadcrumb-prev" resource = "breadcrumb-prev-normal.png" size="Menu" />
+ <StockIcon stockid = "md-status-build" animation = "res:statusBuild-01.png;res:statusBuild-02.png;res:statusBuild-03.png;res:statusBuild-04.png;res:statusBuild-05.png" size="Menu" />
+ <StockIcon stockid = "md-status-download" animation = "res:statusPull-01.png;res:statusPull-02.png;res:statusPull-03.png;res:statusPull-04.png;res:statusPull-05.png;res:statusPull-06.png" size="Menu" />
+ <StockIcon stockid = "md-status-upload" animation = "res:statusPush-01.png;res:statusPush-02.png;res:statusPush-03.png;res:statusPush-04.png;res:statusPush-05.png;res:statusPush-06.png" size="Menu" />
+ <StockIcon stockid = "md-status-open" animation = "res:statusOpen-01.png;res:statusOpen-02.png;res:statusOpen-03.png;res:statusOpen-04.png;res:statusOpen-05.png;res:statusOpen-06.png" size="Menu" />
+ <StockIcon stockid = "md-status-search" animation = "res:statusSearch-01.png;res:statusSearch-02.png;res:statusSearch-03.png;res:statusSearch-04.png" size="Menu" />
+ <StockIcon stockid = "md-status-connecting" animation = "res:statusConnecting-01.png;res:statusConnecting-02.png;res:statusConnecting-03.png;res:statusConnecting-04.png;res:statusConnecting-05.png;res:statusConnecting-06.png" size="Menu" />
+ <StockIcon stockid = "md-status-steady" icon = "res:statusSteady.png" size="Menu" />
+ <StockIcon stockid = "md-status-success" icon = "res:statusSuccess.png" size="Menu" />
+ <StockIcon stockid = "md-status-warning" icon = "res:statusWarning.png" size="Menu" />
+ <StockIcon stockid = "md-status-error" icon = "res:statusError.png" size="Menu" />
+ <StockIcon stockid = "md-error" resource = "error-16.png" size="Menu" />
+ <StockIcon stockid = "md-error" icon = "gtk-dialog-error" size="Dialog" />
+ <StockIcon stockid = "md-warning" resource = "warning-16.png" size="Menu" />
+ <StockIcon stockid = "md-warning" icon = "gtk-dialog-warning" size="Dialog" />
+ <StockIcon stockid = "md-command" resource = "command.png" size="Menu" />
+ <StockIcon stockid = "md-clear" resource = "broom-16.png" size="Menu" />
+ <StockIcon stockid = "md-stop" resource = "stop-16.png" size="Menu" />
+ <StockIcon stockid = "md-console" resource = "console-16.png" size="Menu" />
+ <StockIcon stockid = "md-drive" resource = "drive-16.png" size="Menu" />
+ <StockIcon stockid = "md-letters" resource = "letters-16.png" size="Menu" />
+ <StockIcon stockid = "md-hammer" resource = "hammer-16.png" size="Menu" />
+ <StockIcon stockid = "md-monkey" resource = "monkey-16.png" size="Menu" />
+ <StockIcon stockid = "md-locale" resource = "locale_16x16.png" size="Menu" />
+ <StockIcon stockid = "md-errors-list" resource = "errors-pad.png" size="Menu" />
+ <StockIcon stockid = "md-bubble-error" resource = "bubble-error-icon.png" size="Menu" />
+ <StockIcon stockid = "md-bubble-warning" resource = "bubble-warning-icon.png" size="Menu" />
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Templates.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Templates.addin.xml
new file mode 100644
index 0000000..e53a3ea
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Templates.addin.xml
@@ -0,0 +1,58 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/FileTemplates" name = "File templates">
+ <Description>File templates to be shown in the New File dialog.</Description>
+ <ExtensionNode name="FileTemplate" type="MonoDevelop.Ide.Codons.ProjectTemplateCodon"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/FileTemplateTypes" name = "File template types">
+ <Description>Template types which can be used to create file templates.</Description>
+ <ExtensionNode name="FileTemplateType" type="MonoDevelop.Ide.Codons.FileTemplateTypeCodon"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/FileTemplateConditionTypes" name = "File template condition types">
+ <Description>Condition types which can be used to limit when file templates can be created.</Description>
+ <ExtensionNode name="FileTemplateConditionType" type="MonoDevelop.Ide.Codons.FileTemplateConditionTypeCodon"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ProjectTemplates" name = "File template types">
+ <Description>Project templates to be shown in the New Project dialog.</Description>
+ <ExtensionNode name="ProjectTemplate" type="MonoDevelop.Ide.Codons.ProjectTemplateCodon"/>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/FileTemplates">
+ <FileTemplate id = "EmptyClass" resource = "EmptyClass.xft.xml"/>
+ <FileTemplate id = "EmptyEnum" resource = "EmptyEnum.xft.xml"/>
+ <FileTemplate id = "EmptyInterface" resource = "EmptyInterface.xft.xml"/>
+ <FileTemplate id = "EmptyStruct" resource = "EmptyStruct.xft.xml"/>
+ <FileTemplate id = "EmptyHTMLFile" resource = "EmptyHTMLFile.xft.xml"/>
+ <FileTemplate id = "AppConfigFile" resource = "AppConfigFile.xft.xml"/>
+ <FileTemplate id = "EmptyResourceFile" resource = "EmptyResourceFile.xft.xml"/>
+ <FileTemplate id = "EmptyTextFile" resource = "EmptyTextFile.xft.xml"/>
+ <FileTemplate id = "EmptyXMLFile" resource = "EmptyXMLFile.xft.xml"/>
+</Extension>
+
+<Extension path = "/MonoDevelop/Ide/FileTemplateTypes">
+ <FileTemplateType name = "File" class = "MonoDevelop.Ide.Templates.TextFileDescriptionTemplate"/>
+ <FileTemplateType name = "RawFile" class = "MonoDevelop.Ide.Templates.RawFileDescriptionTemplate"/>
+ <FileTemplateType name = "CodeDomFile" class = "MonoDevelop.Ide.Templates.CodeDomFileDescriptionTemplate"/>
+ <FileTemplateType name = "ProjectResource" class = "MonoDevelop.Ide.Templates.ResourceFileDescriptionTemplate"/>
+ <FileTemplateType name = "CodeTranslationFile" class = "MonoDevelop.Ide.Templates.CodeTranslationFileDescriptionTemplate"/>
+ <FileTemplateType name = "FileTemplateReference" class = "MonoDevelop.Ide.Templates.FileTemplateReference"/>
+ <FileTemplateType name = "Directory" class = "MonoDevelop.Ide.Templates.DirectoryTemplate"/>
+</Extension>
+
+<Extension path = "/MonoDevelop/Ide/FileTemplateConditionTypes">
+ <FileTemplateConditionType name = "ClrVersion" class = "MonoDevelop.Ide.Templates.ClrVersionFileTemplateCondition"/>
+ <FileTemplateConditionType name = "PartialTypeSupport" class = "MonoDevelop.Ide.Templates.PartialTypeFileTemplateCondition"/>
+ <FileTemplateConditionType name = "ParentProject" class = "MonoDevelop.Ide.Templates.ParentProjectFileTemplateCondition"/>
+</Extension>
+
+<Extension path = "/MonoDevelop/Ide/ProjectTemplates">
+ <ProjectTemplate id = "MonoDevelop.BlankSolution" resource = "BlankCombine.xpt.xml"/>
+ <ProjectTemplate id = "MonoDevelop.Workspace" resource = "Workspace.xpt.xml"/>
+ <ProjectTemplate id = "MonoDevelop.GenericProject" resource = "GenericProject.xpt.xml"/>
+</Extension>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Commands.CommandsExtensionModel.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Commands.CommandsExtensionModel.addin.xml
new file mode 100644
index 0000000..41897c2
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Commands.CommandsExtensionModel.addin.xml
@@ -0,0 +1,15 @@
+<ExtensionModel>
+
+ <!-- This item set can be used to define extension points for extensible menus and toolbars -->
+
+<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet">
+ <ExtensionNode name="CommandItem" type="MonoDevelop.Components.Commands.ExtensionNodes.CommandItemCodon" />
+ <ExtensionNode name="SeparatorItem" type="MonoDevelop.Components.Commands.ExtensionNodes.SeparatorItemCodon" />
+ <ExtensionNode name="ItemSet" type="MonoDevelop.Components.Commands.ExtensionNodes.ItemSetCodon">
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet" />
+ </ExtensionNode>
+ <ExtensionNode name="LinkItem" type="MonoDevelop.Components.Commands.ExtensionNodes.LinkItemCodon" />
+ <ExtensionNode name="LocalCommandItem" type="MonoDevelop.Components.Commands.ExtensionNodes.LocalCommandItemCodon" />
+</ExtensionNodeSet>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-auto-hide.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-auto-hide.png
new file mode 100644
index 0000000..d77b395
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-auto-hide.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-close-12.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-close-12.png
new file mode 100644
index 0000000..71016e2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-close-12.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-dock.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-dock.png
new file mode 100644
index 0000000..225c2ab
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-dock.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-left-12.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-left-12.png
new file mode 100644
index 0000000..c1d3bef
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-left-12.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-right-12.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-right-12.png
new file mode 100644
index 0000000..df945cd
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-right-12.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Normal.png
new file mode 100644
index 0000000..6f85af3
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Pressed.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Pressed.png
new file mode 100644
index 0000000..cc28be2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Pressed.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Normal.png
new file mode 100644
index 0000000..02042a7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Pressed.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Pressed.png
new file mode 100644
index 0000000..dec57b1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Pressed.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Normal.png
new file mode 100644
index 0000000..bbc5eb0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Pressed.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Pressed.png
new file mode 100644
index 0000000..239fea9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Pressed.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Disabled.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Disabled.png
new file mode 100644
index 0000000..ae0f406
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Disabled.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Hover.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Hover.png
new file mode 100644
index 0000000..87316a7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Hover.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Normal.png
new file mode 100644
index 0000000..7ad68ea
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Pressed.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Pressed.png
new file mode 100644
index 0000000..ec052ae
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Pressed.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Disabled.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Disabled.png
new file mode 100644
index 0000000..d72cee4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Disabled.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Normal.png
new file mode 100644
index 0000000..246e639
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Disabled.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Disabled.png
new file mode 100644
index 0000000..612a67e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Disabled.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Normal.png
new file mode 100644
index 0000000..07fb252
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Disabled.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Disabled.png
new file mode 100644
index 0000000..bacd602
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Disabled.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Normal.png
new file mode 100644
index 0000000..eb1d497
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationBuildingIcon.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationBuildingIcon.png
new file mode 100644
index 0000000..622ba64
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationBuildingIcon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Active.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Active.png
new file mode 100644
index 0000000..8460b46
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Active.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Normal.png
new file mode 100644
index 0000000..0aa6af1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationErrorIcon.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationErrorIcon.png
new file mode 100644
index 0000000..889438c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationErrorIcon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.SearchEntry.cs b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.SearchEntry.cs
new file mode 100644
index 0000000..e9de7b1
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.SearchEntry.cs
@@ -0,0 +1,732 @@
+//
+// SearchEntry.cs
+//
+// Author:
+// Aaron Bockover <abockover at novell.com>
+// Gabriel Burt <gburt at novell.com>
+//
+// Copyright 2007-2010 Novell, Inc.
+//
+// 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 Gtk;
+using MonoDevelop.Ide.Gui;
+
+namespace MonoDevelop.Components
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public class SearchEntry : EventBox
+ {
+ Alignment alignment;
+ Alignment entryAlignment;
+ private HBox box;
+ private Entry entry;
+ private HoverImageButton filter_button;
+ private HoverImageButton clear_button;
+
+ private Menu menu;
+ private int active_filter_id = -1;
+
+ private uint changed_timeout_id = 0;
+
+ private string empty_message;
+ private bool ready = false;
+
+ private event EventHandler filter_changed;
+ private event EventHandler entry_changed;
+ EventHandler activated_event;
+ bool roundedShape;
+ bool hasFrame = true;
+ bool customRoundedShapeDrawing = false;
+
+ public event EventHandler Changed {
+ add { entry_changed += value; }
+ remove { entry_changed -= value; }
+ }
+
+ public event EventHandler Activated {
+ add { activated_event += value; }
+ remove { activated_event -= value; }
+ }
+
+ public event EventHandler FilterChanged {
+ add { filter_changed += value; }
+ remove { filter_changed -= value; }
+ }
+
+ bool forceFilterButtonVisible = true;
+ public bool ForceFilterButtonVisible {
+ get {
+ return forceFilterButtonVisible;
+ }
+ set {
+ forceFilterButtonVisible = value;
+ ShowHideButtons ();
+ }
+ }
+
+ public Menu Menu {
+ get { return menu; }
+ set { menu = value; menu.Deactivated += OnMenuDeactivated; }
+ }
+
+ public Entry Entry {
+ get { return this.entry; }
+ }
+
+ public bool HasFrame {
+ get { return hasFrame; }
+ set { hasFrame = value; QueueDraw (); }
+ }
+
+ public bool RoundedShape {
+ get { return roundedShape; }
+ set {
+ roundedShape = value;
+ if (value)
+ entry.Name = "search-entry";
+ else
+ entry.Name = "";
+ ShowHideButtons ();
+ QueueDraw ();
+ }
+ }
+
+ public SearchEntry ()
+ {
+ AppPaintable = true;
+
+ BuildWidget ();
+ BuildMenu ();
+
+ NoShowAll = true;
+ }
+ public Gdk.Pixbuf FilterButtonPixbuf {
+ get {
+ return filter_button.Pixbuf;
+ }
+ set {
+ filter_button.Pixbuf = value;
+ }
+ }
+
+ private void BuildWidget ()
+ {
+ alignment = new Alignment (0.5f, 0.5f, 1f, 0f);
+ alignment.SetPadding (1, 1, 3, 3);
+ VisibleWindow = false;
+
+ box = new HBox ();
+ entry = new FramelessEntry (this);
+ filter_button = new HoverImageButton (IconSize.Menu, "md-searchbox-search");
+ clear_button = new HoverImageButton (IconSize.Menu, "md-searchbox-clear");
+
+ entryAlignment = new Gtk.Alignment (0.5f, 0.5f, 1f, 1f);
+ alignment.SetPadding (0, 0, 3, 3);
+ entryAlignment.Add (entry);
+ box.PackStart (filter_button, false, false, 0);
+ box.PackStart (entryAlignment, true, true, 0);
+ box.PackStart (clear_button, false, false, 0);
+ alignment.Add (box);
+ Add (alignment);
+ alignment.ShowAll ();
+
+ entry.StyleSet += OnInnerEntryStyleSet;
+ entry.StateChanged += OnInnerEntryStateChanged;
+ entry.FocusInEvent += OnInnerEntryFocusEvent;
+ entry.FocusOutEvent += OnInnerEntryFocusEvent;
+ entry.Changed += OnInnerEntryChanged;
+ entry.Activated += delegate {
+ NotifyActivated ();
+ };
+
+ filter_button.Image.Xpad = 0;
+ clear_button.Image.Xpad = 0;
+ filter_button.CanFocus = false;
+ clear_button.CanFocus = false;
+
+ filter_button.ButtonReleaseEvent += OnButtonReleaseEvent;
+ clear_button.ButtonReleaseEvent += OnButtonReleaseEvent;
+ clear_button.Clicked += OnClearButtonClicked;
+
+ ShowHideButtons ();
+ }
+
+ protected override void OnSizeRequested (ref Requisition requisition)
+ {
+ if (HeightRequest != -1 && box.HeightRequest != HeightRequest)
+ box.HeightRequest = HeightRequest;
+ if (box.HeightRequest != -1 && HeightRequest == -1)
+ box.HeightRequest = -1;
+ base.OnSizeRequested (ref requisition);
+ }
+
+ Gtk.EventBox statusLabelEventBox;
+ public Gtk.EventBox AddLabelWidget (Gtk.Label label)
+ {
+ box.Remove (clear_button);
+ statusLabelEventBox = new Gtk.EventBox ();
+ statusLabelEventBox.Child = label;
+ box.PackStart (statusLabelEventBox, false, false, 0);
+ box.PackStart (clear_button, false, false, 0);
+ UpdateStyle ();
+ box.ShowAll ();
+ return statusLabelEventBox;
+ }
+
+ void NotifyActivated ()
+ {
+ if (activated_event != null)
+ activated_event (this, EventArgs.Empty);
+ }
+
+ private void BuildMenu ()
+ {
+ menu = new Menu ();
+ menu.Deactivated += OnMenuDeactivated;
+ }
+
+ public void PopupFilterMenu ()
+ {
+ ShowMenu (0);
+ }
+
+ void ShowMenu (uint time)
+ {
+ OnRequestMenu (EventArgs.Empty);
+ if (menu.Children.Length > 0) {
+ menu.Popup (null, null, OnPositionMenu, 0, time);
+ menu.ShowAll ();
+ }
+ }
+
+ private void ShowHideButtons ()
+ {
+ clear_button.Visible = entry.Text.Length > 0;
+ entryAlignment.RightPadding = (uint) (!clear_button.Visible && roundedShape ? 6 : 0);
+
+ filter_button.Visible = ForceFilterButtonVisible || (menu != null && menu.Children.Length > 0);
+ entryAlignment.LeftPadding = (uint) (!filter_button.Visible && roundedShape ? 6 : 0);
+ }
+
+ private void OnPositionMenu (Menu menu, out int x, out int y, out bool push_in)
+ {
+ int origin_x, origin_y, tmp;
+
+ filter_button.GdkWindow.GetOrigin (out origin_x, out tmp);
+ GdkWindow.GetOrigin (out tmp, out origin_y);
+
+ x = origin_x + filter_button.Allocation.X;
+ y = origin_y + SizeRequest ().Height;
+ push_in = true;
+ }
+
+ private void OnMenuDeactivated (object o, EventArgs args)
+ {
+ filter_button.QueueDraw ();
+ }
+
+ private bool toggling = false;
+ public bool IsCheckMenu { get; set; }
+ private void OnMenuItemToggled (object o, EventArgs args)
+ {
+ if (IsCheckMenu || toggling || !(o is FilterMenuItem)) {
+ return;
+ }
+
+ toggling = true;
+ FilterMenuItem item = (FilterMenuItem)o;
+
+ foreach (MenuItem child_item in menu) {
+ if (!(child_item is FilterMenuItem)) {
+ continue;
+ }
+
+ FilterMenuItem filter_child = (FilterMenuItem)child_item;
+ if (filter_child != item) {
+ filter_child.Active = false;
+ }
+ }
+
+ item.Active = true;
+ ActiveFilterID = item.ID;
+ toggling = false;
+ }
+
+ private void OnInnerEntryChanged (object o, EventArgs args)
+ {
+ ShowHideButtons ();
+
+ if (changed_timeout_id > 0) {
+ GLib.Source.Remove (changed_timeout_id);
+ }
+
+ if (Ready)
+ changed_timeout_id = GLib.Timeout.Add (25, OnChangedTimeout);
+ }
+
+ private bool OnChangedTimeout ()
+ {
+ OnChanged ();
+ return false;
+ }
+
+ private void UpdateStyle ()
+ {
+ Gdk.Color color = entry.Style.Base (entry.State);
+ filter_button.ModifyBg (entry.State, color);
+ clear_button.ModifyBg (entry.State, color);
+ if (statusLabelEventBox != null)
+ statusLabelEventBox.ModifyBg (entry.State, color);
+
+ box.BorderWidth = 0;
+ var h = entry.SizeRequest ().Height + entry.Style.Ythickness * 2;
+ var req = entry.SizeRequest ().Height;
+ req = Math.Max (req, filter_button.SizeRequest ().Height);
+ req = Math.Max (req, clear_button.SizeRequest ().Height);
+ var diff = h - req;
+ if (diff > 1)
+ box.BorderWidth = (uint)(diff / 2);
+ }
+
+ private void OnInnerEntryStyleSet (object o, StyleSetArgs args)
+ {
+ UpdateStyle ();
+ }
+
+ private void OnInnerEntryStateChanged (object o, EventArgs args)
+ {
+ UpdateStyle ();
+ }
+
+ private void OnInnerEntryFocusEvent (object o, EventArgs args)
+ {
+ QueueDraw ();
+ }
+
+ private void OnButtonReleaseEvent (object o, ButtonReleaseEventArgs args)
+ {
+ if (args.Event.Button != 1) {
+ return;
+ }
+
+ entry.HasFocus = true;
+
+ if (o == filter_button) {
+ ShowMenu (args.Event.Time);
+ }
+ }
+
+ protected virtual void OnRequestMenu (EventArgs e)
+ {
+ EventHandler handler = this.RequestMenu;
+ if (handler != null)
+ handler (this, e);
+ }
+
+ public event EventHandler RequestMenu;
+
+ public void GrabFocusEntry ()
+ {
+ this.entry.GrabFocus ();
+ }
+ private void OnClearButtonClicked (object o, EventArgs args)
+ {
+ active_filter_id = 0;
+ entry.Text = String.Empty;
+ NotifyActivated ();
+ }
+
+ protected override void OnDestroyed ()
+ {
+ if (menu != null) {
+ menu.Destroy ();
+ menu = null;
+ }
+ base.OnDestroyed ();
+ }
+
+ protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
+ {
+ if (evnt.Key == Gdk.Key.Escape) {
+ active_filter_id = 0;
+ entry.Text = String.Empty;
+ NotifyActivated ();
+ return true;
+ }
+ return base.OnKeyPressEvent (evnt);
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ var alloc = new Gdk.Rectangle (alignment.Allocation.X, box.Allocation.Y, alignment.Allocation.Width, box.Allocation.Height);
+
+ if (hasFrame && (!roundedShape || (roundedShape && !customRoundedShapeDrawing))) {
+ Style.PaintShadow (entry.Style, GdkWindow, StateType.Normal, ShadowType.In,
+ evnt.Area, entry, "entry", alloc.X, alloc.Y, alloc.Width, alloc.Height);
+/* using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
+ ctx.LineWidth = 1;
+ ctx.Rectangle (alloc.X + 0.5, alloc.Y + 0.5, alloc.Width - 1, alloc.Height - 1);
+ ctx.Color = new Cairo.Color (1,0,0);
+ ctx.Stroke ();
+ }*/
+ }
+ else if (!roundedShape) {
+ using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
+ CairoExtensions.RoundedRectangle (ctx, alloc.X + 0.5, alloc.Y + 0.5, alloc.Width - 1, alloc.Height - 1, 4);
+ ctx.Color = entry.Style.Base (Gtk.StateType.Normal).ToCairoColor ();
+ ctx.Fill ();
+ }
+ }
+ else {
+ using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
+ RoundBorder (ctx, alloc.X + 0.5, alloc.Y + 0.5, alloc.Width - 1, alloc.Height - 1);
+ ctx.Color = entry.Style.Base (Gtk.StateType.Normal).ToCairoColor ();
+ ctx.Fill ();
+ }
+ }
+
+ PropagateExpose (Child, evnt);
+
+ if (hasFrame && roundedShape && customRoundedShapeDrawing) {
+ using (var ctx = Gdk.CairoHelper.Create (GdkWindow)) {
+ RoundBorder (ctx, alloc.X + 0.5, alloc.Y + 0.5, alloc.Width - 1, alloc.Height - 1);
+ ctx.Color = Styles.WidgetBorderColor;
+ ctx.LineWidth = 1;
+ ctx.Stroke ();
+ }
+ }
+ return true;
+ }
+
+ static void RoundBorder (Cairo.Context ctx, double x, double y, double w, double h)
+ {
+ double r = h / 2;
+ ctx.Arc (x + r, y + r, r, Math.PI / 2, Math.PI + Math.PI / 2);
+ ctx.LineTo (x + w - r, y);
+
+ ctx.Arc (x + w - r, y + r, r, Math.PI + Math.PI / 2, Math.PI + Math.PI + Math.PI / 2);
+
+ ctx.LineTo (x + r, y + h);
+
+ ctx.ClosePath ();
+ }
+
+ protected override void OnShown ()
+ {
+ base.OnShown ();
+ ShowHideButtons ();
+ }
+
+ protected virtual void OnChanged ()
+ {
+ if (!Ready) {
+ return;
+ }
+
+ EventHandler handler = entry_changed;
+ if (handler != null) {
+ handler (this, EventArgs.Empty);
+ }
+ }
+
+ protected virtual void OnFilterChanged ()
+ {
+ EventHandler handler = filter_changed;
+ if (handler != null) {
+ handler (this, EventArgs.Empty);
+ }
+
+ if (IsQueryAvailable) {
+ OnInnerEntryChanged (this, EventArgs.Empty);
+ }
+ }
+
+ public CheckMenuItem AddFilterOption (int id, string label)
+ {
+ if (id < 0) {
+ throw new ArgumentException ("id", "must be >= 0");
+ }
+
+ FilterMenuItem item = new FilterMenuItem (id, label);
+
+ item.Toggled += OnMenuItemToggled;
+ menu.Append (item);
+
+ if (ActiveFilterID < 0) {
+ item.Toggle ();
+ }
+
+ filter_button.Visible = true;
+ return item;
+ }
+
+ public MenuItem AddMenuItem (string label)
+ {
+ var item = new MenuItem (label);
+ menu.Append (item);
+ return item;
+ }
+
+ public void AddFilterSeparator ()
+ {
+ menu.Append (new SeparatorMenuItem ());
+ }
+
+ public void RemoveFilterOption (int id)
+ {
+ FilterMenuItem item = FindFilterMenuItem (id);
+ if (item != null) {
+ menu.Remove (item);
+ }
+ }
+
+ public void ActivateFilter (int id)
+ {
+ FilterMenuItem item = FindFilterMenuItem (id);
+ if (item != null) {
+ item.Toggle ();
+ }
+ }
+
+ private FilterMenuItem FindFilterMenuItem (int id)
+ {
+ foreach (MenuItem item in menu) {
+ if (item is FilterMenuItem && ((FilterMenuItem)item).ID == id) {
+ return (FilterMenuItem)item;
+ }
+ }
+
+ return null;
+ }
+
+ public string GetLabelForFilterID (int id)
+ {
+ FilterMenuItem item = FindFilterMenuItem (id);
+ if (item == null) {
+ return null;
+ }
+
+ return item.Label;
+ }
+
+ public void CancelSearch ()
+ {
+ entry.Text = String.Empty;
+ ActivateFilter (0);
+ }
+
+ public int ActiveFilterID {
+ get { return active_filter_id; }
+ set {
+ if (value == active_filter_id) {
+ return;
+ }
+
+ active_filter_id = value;
+ OnFilterChanged ();
+ }
+ }
+
+ public string EmptyMessage {
+ get { return entry.Sensitive ? empty_message : String.Empty; }
+ set {
+ empty_message = value;
+ entry.QueueDraw ();
+ }
+ }
+
+ public string Query {
+ get { return entry.Text.Trim (); }
+ set { entry.Text = value.Trim (); }
+ }
+
+ public bool IsQueryAvailable {
+ get { return Query != null && Query != String.Empty; }
+ }
+
+ public bool Ready {
+ get { return ready; }
+ set { ready = value; }
+ }
+
+ public new bool HasFocus {
+ get { return entry.HasFocus; }
+ set { entry.HasFocus = true; }
+ }
+
+
+ public Entry InnerEntry {
+ get { return entry; }
+ }
+
+ protected override void OnStateChanged (Gtk.StateType previous_state)
+ {
+ base.OnStateChanged (previous_state);
+
+ entry.Sensitive = State != StateType.Insensitive;
+ filter_button.Sensitive = State != StateType.Insensitive;
+ clear_button.Sensitive = State != StateType.Insensitive;
+ }
+
+ private class FilterMenuItem : CheckMenuItem
+ {
+ private int id;
+ private string label;
+
+ public FilterMenuItem (int id, string label) : base(label)
+ {
+ this.id = id;
+ this.label = label;
+ DrawAsRadio = true;
+ }
+
+ public int ID {
+ get { return id; }
+ }
+
+ public string Label {
+ get { return label; }
+ }
+ /*
+ // FIXME: Remove when restored to CheckMenuItem
+ private bool active;
+ public bool Active {
+ get { return active; }
+ set { active = value; }
+ }*/
+
+ public new event EventHandler Toggled;
+ protected override void OnActivated ()
+ {
+ base.OnActivated ();
+ if (Toggled != null) {
+ Toggled (this, EventArgs.Empty);
+ }
+ }
+
+ }
+
+ private class FramelessEntry : Entry
+ {
+ private SearchEntry parent;
+ private Pango.Layout layout;
+ private Gdk.GC text_gc;
+
+ public FramelessEntry (SearchEntry parent) : base()
+ {
+ this.parent = parent;
+ HasFrame = false;
+
+ parent.StyleSet += OnParentStyleSet;
+ WidthChars = 1;
+ }
+
+ private void OnParentStyleSet (object o, EventArgs args)
+ {
+ RefreshGC ();
+ QueueDraw ();
+ }
+
+ private void RefreshGC ()
+ {
+ text_gc = null;
+ }
+
+ protected override void OnDestroyed ()
+ {
+ parent.StyleSet -= OnParentStyleSet;
+ base.OnDestroyed ();
+ }
+
+ public static Gdk.Color ColorBlend (Gdk.Color a, Gdk.Color b)
+ {
+ // at some point, might be nice to allow any blend?
+ double blend = 0.5;
+
+ if (blend < 0.0 || blend > 1.0) {
+ throw new ApplicationException ("blend < 0.0 || blend > 1.0");
+ }
+
+ double blendRatio = 1.0 - blend;
+
+ int aR = a.Red >> 8;
+ int aG = a.Green >> 8;
+ int aB = a.Blue >> 8;
+
+ int bR = b.Red >> 8;
+ int bG = b.Green >> 8;
+ int bB = b.Blue >> 8;
+
+ double mR = aR + bR;
+ double mG = aG + bG;
+ double mB = aB + bB;
+
+ double blR = mR * blendRatio;
+ double blG = mG * blendRatio;
+ double blB = mB * blendRatio;
+
+ Gdk.Color color = new Gdk.Color ((byte)blR, (byte)blG, (byte)blB);
+ Gdk.Colormap.System.AllocColor (ref color, true, true);
+ return color;
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+ {
+ // The Entry's GdkWindow is the top level window onto which
+ // the frame is drawn; the actual text entry is drawn into a
+ // separate window, so we can ensure that for themes that don't
+ // respect HasFrame, we never ever allow the base frame drawing
+ // to happen
+ if (evnt.Window == GdkWindow) {
+ return true;
+ }
+
+ bool ret = base.OnExposeEvent (evnt);
+
+ if (text_gc == null) {
+ text_gc = new Gdk.GC (evnt.Window);
+ text_gc.Copy (Style.TextGC (StateType.Normal));
+ Gdk.Color color_a = parent.Style.Base (StateType.Normal);
+ Gdk.Color color_b = parent.Style.Text (StateType.Normal);
+ text_gc.RgbFgColor = ColorBlend (color_a, color_b);
+ }
+
+ if (Text.Length > 0 || HasFocus || parent.EmptyMessage == null) {
+ return ret;
+ }
+
+ if (layout == null) {
+ layout = new Pango.Layout (PangoContext);
+ layout.FontDescription = PangoContext.FontDescription.Copy ();
+ }
+
+ int width, height;
+ layout.SetMarkup (parent.EmptyMessage);
+ layout.GetPixelSize (out width, out height);
+ evnt.Window.DrawLayout (text_gc, 2, (SizeRequest ().Height - height) / 2, layout);
+
+ return ret;
+ }
+ }
+ }
+}
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.InvariantTextStylePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.InvariantTextStylePolicy.xml
new file mode 100644
index 0000000..07c387f
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.InvariantTextStylePolicy.xml
@@ -0,0 +1,9 @@
+<TextStylePolicy scope="text/plain">
+ <FileWidth>120</FileWidth>
+ <TabWidth>4</TabWidth>
+ <IndentWidth>4</IndentWidth>
+ <TabsToSpaces>False</TabsToSpaces>
+ <NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
+ <RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
+ <EolMarker>Unix</EolMarker>
+</TextStylePolicy>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.MonoTextStylePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.MonoTextStylePolicy.xml
new file mode 100644
index 0000000..ed6a1bf
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.MonoTextStylePolicy.xml
@@ -0,0 +1,9 @@
+<TextStylePolicy scope="text/plain" allowDiffSerialize="True">
+ <FileWidth>80</FileWidth>
+ <TabWidth>8</TabWidth>
+ <IndentWidth>8</IndentWidth>
+ <TabsToSpaces>False</TabsToSpaces>
+ <NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
+ <RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
+ <EolMarker>Native</EolMarker>
+</TextStylePolicy>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.VisualStudioTextStylePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.VisualStudioTextStylePolicy.xml
new file mode 100644
index 0000000..2fb83f3
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.VisualStudioTextStylePolicy.xml
@@ -0,0 +1,9 @@
+<TextStylePolicy scope="text/plain" allowDiffSerialize="True">
+ <FileWidth>80</FileWidth>
+ <TabWidth>4</TabWidth>
+ <IndentWidth>4</IndentWidth>
+ <TabsToSpaces>True</TabsToSpaces>
+ <NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
+ <RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
+ <EolMarker>Native</EolMarker>
+</TextStylePolicy>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeTemplates.MonoDevelop-templates.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeTemplates.MonoDevelop-templates.xml
new file mode 100644
index 0000000..c0a7e46
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeTemplates.MonoDevelop-templates.xml
@@ -0,0 +1,1241 @@
+<CodeTemplates version="3.0">
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>~</Shortcut>
+ <_Description>Template for destructor</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="classname" isEditable="false">
+ <_ToolTip>Class name</_ToolTip>
+ <Function>GetCurrentClassName()</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[~$classname$ ()
+{
+ $end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>Attribute</Shortcut>
+ <_Description>Template for an attribute.</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>My</Default>
+ <_ToolTip>The name of the attribute</_ToolTip>
+ </Variable>
+ <Variable name="target">
+ <Default>All</Default>
+ <Values>
+ <Value icon="md-field">Assembly</Value>
+ <Value icon="md-field">Module</Value>
+ <Value icon="md-field">Class</Value>
+ <Value icon="md-field">Struct</Value>
+ <Value icon="md-field">Enum</Value>
+ <Value icon="md-field">Constructor</Value>
+ <Value icon="md-field">Method</Value>
+ <Value icon="md-field">Property</Value>
+ <Value icon="md-field">Field</Value>
+ <Value icon="md-field">Event</Value>
+ <Value icon="md-field">Interface</Value>
+ <Value icon="md-field">Parameter</Value>
+ <Value icon="md-field">Delegate</Value>
+ <Value icon="md-field">ReturnValue</Value>
+ <Value icon="md-field">GenericParameter</Value>
+ <Value icon="md-field">All</Value>
+ </Values>
+ </Variable>
+ <Variable name="inherited">
+ <Default>false</Default>
+ <Values>
+ <Value icon="md-keyword">true</Value>
+ <Value icon="md-keyword">false</Value>
+ </Values>
+ </Variable>
+ <Variable name="allowmultiple">
+ <Default>true</Default>
+ <Values>
+ <Value icon="md-keyword">true</Value>
+ <Value icon="md-keyword">false</Value>
+ </Values>
+ </Variable>
+ <Variable name="SystemAttribute" isEditable="false">
+ <Default>System.Attribute</Default>
+ <Function>GetSimpleTypeName("System#Attribute")</Function>
+ </Variable>
+ <Variable name="SystemAttributeUsage" isEditable="false">
+ <Default>System.AttributeUsage</Default>
+ <Function>GetSimpleTypeName("System#AttributeUsage")</Function>
+ </Variable>
+ <Variable name="SystemAttributeTargets" isEditable="false">
+ <Default>System.AttributeTargets</Default>
+ <Function>GetSimpleTypeName("System#AttributeTargets")</Function>
+ </Variable>
+ <Variable name="SystemNotImplementedException" isEditable="false">
+ <Default>System.NotImplementedException</Default>
+ <Function>GetSimpleTypeName("System#NotImplementedException")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[[$SystemAttributeUsage$ ($SystemAttributeTargets$.$target$, Inherited = $inherited$, AllowMultiple = $allowmultiple$)]
+public sealed class $name$Attribute : $SystemAttribute$
+{
+ readonly string positionalString;
+ public string PositionalString {
+ get {
+ return positionalString;
+ }
+ }
+
+ public int NamedInt { get; set; }
+
+ public $name$Attribute (string positionalString)
+ {
+ this.positionalString = positionalString;
+
+ // TODO: Implement code here
+ $end$throw new $SystemNotImplementedException$ ();
+ }
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>ctor</Shortcut>
+ <_Description>Template for constructor</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="classname" isEditable="false">
+ <_ToolTip>Class name</_ToolTip>
+ <Function>GetCurrentClassName()</Function>
+ </Variable>
+ <Variable name="modifier" isEditable="false">
+ <Function>GetConstructorModifier()</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[$modifier$$classname$ ()
+{
+ $end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>cw</Shortcut>
+ <_Description>Template for Console.WriteLine</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="SystemConsoleWriteLine" isEditable="false">
+ <Default>System.Console.WriteLine</Default>
+ <Function>GetSimpleTypeName("System#Console.WriteLine")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[$SystemConsoleWriteLine$ ($end$);]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>switch</Shortcut>
+ <_Description>Template for switch statement</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression">
+ <Default>switch_on</Default>
+ <_ToolTip>Expression to switch on</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[switch ($expression$) {
+default:
+break;
+}$end$]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>svm</Shortcut>
+ <_Description>Template for void Main method.</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[public static void Main (string[] args)
+{
+ $end$
+}]]></Code>
+
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>sim</Shortcut>
+ <_Description>Template for int Main method.</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[public static int Main (string[] args)
+{
+ $end$
+ return 0;
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>Exception</Shortcut>
+ <_Description>Template for exception</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>My</Default>
+ <_ToolTip>ExceptionName</_ToolTip>
+ </Variable>
+ <Variable name="SystemException" isEditable="false">
+ <Default>System.Exception</Default>
+ <Function>GetSimpleTypeName("System#Exception")</Function>
+ </Variable>
+ <Variable name="SystemSerializable" isEditable="false">
+ <Default>System.Serializable</Default>
+ <Function>GetSimpleTypeName("System#Serializable")</Function>
+ </Variable>
+ <Variable name="SystemRuntimeSerializationSerializationInfo" isEditable="false">
+ <Default>System.Runtime.Serialization.SerializationInfo</Default>
+ <Function>GetSimpleTypeName("System.Runtime.Serialization#SerializationInfo")</Function>
+ </Variable>
+ <Variable name="SystemRuntimeSerializationStreamingContext" isEditable="false">
+ <Default>System.Runtime.Serialization.StreamingContext</Default>
+ <Function>GetSimpleTypeName("System.Runtime.Serialization#StreamingContext")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[
+[$SystemSerializable$]
+public class $name$Exception : $SystemException$
+{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:$name$Exception"/> class
+ /// </summary>
+ public $name$Exception ()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:$name$Exception"/> class
+ /// </summary>
+ /// <param name="message">A <see cref="T:System.String"/> that describes the exception. </param>
+ public $name$Exception (string message) : base (message)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:$name$Exception"/> class
+ /// </summary>
+ /// <param name="message">A <see cref="T:System.String"/> that describes the exception. </param>
+ /// <param name="inner">The exception that is the cause of the current exception. </param>
+ public $name$Exception (string message, $SystemException$ inner) : base (message, inner)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:$name$Exception"/> class
+ /// </summary>
+ /// <param name="context">The contextual information about the source or destination.</param>
+ /// <param name="info">The object that holds the serialized object data.</param>
+ protected $name$Exception ($SystemRuntimeSerializationSerializationInfo$ info, $SystemRuntimeSerializationStreamingContext$ context) : base (info, context)
+ {
+ }
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>indexer</Shortcut>
+ <_Description>Template for an indexer</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="type" isIdentifier="true">
+ <Default>object</Default>
+ <_ToolTip>Return type of the indexer</_ToolTip>
+ </Variable>
+ <Variable name="indextype" isIdentifier="true">
+ <Default>int</Default>
+ <_ToolTip>Type to index with</_ToolTip>
+ </Variable>
+ <Variable name="SystemNotImplementedException" isEditable="false">
+ <Default>System.NotImplementedException</Default>
+ <Function>GetSimpleTypeName("System#NotImplementedException")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[public $type$ this [$indextype$ index] {
+ get {
+ $end$
+ }
+ set {
+ throw new $SystemNotImplementedException$ ();
+ }
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>prop</Shortcut>
+ <_Description>Template for a short property</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="type" isIdentifier="true">
+ <Default>object</Default>
+ <_ToolTip>Return type of the indexer</_ToolTip>
+ </Variable>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyProperty</Default>
+ <_ToolTip>Property name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[public $type$ $name$ {
+ get;
+ set;
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>propg</Shortcut>
+ <_Description>Template for a short property with private set.</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="type" isIdentifier="true">
+ <Default>object</Default>
+ <_ToolTip>Return type of the indexer</_ToolTip>
+ </Variable>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyProperty</Default>
+ <_ToolTip>Property name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[public $type$ $name$ {
+ get;
+ private set;
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>EventArgs</Shortcut>
+ <_Description>Template for event arguments</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>My</Default>
+ <_ToolTip>ExceptionName</_ToolTip>
+ </Variable>
+ <Variable name="SystemEventArgs" isEditable="false">
+ <Default>System.EventArgs</Default>
+ <Function>GetSimpleTypeName("System#EventArgs")</Function>
+ </Variable>
+ <Variable name="SystemSerializable" isEditable="false">
+ <Default>System.Serializable</Default>
+ <Function>GetSimpleTypeName("System#Serializable")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[[$SystemSerializable$]
+public sealed class $name$EventArgs : $SystemEventArgs$
+{
+ public $name$EventArgs ()
+ {
+ $end$
+ }
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>mn</Shortcut>
+ <_Description>Sets minimum value to a variable</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="var" isIdentifier="true">
+ <Default>var</Default>
+ <_ToolTip>Variable name</_ToolTip>
+ </Variable>
+ <Variable name="SystemMin" isEditable="false">
+ <Default>System.Min</Default>
+ <Function>GetSimpleTypeName("System#Min")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[$var$ = $SystemMin$ ($var$, $end$);]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>mx</Shortcut>
+ <_Description>Sets maximum value to a variable</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="var" isIdentifier="true">
+ <Default>var</Default>
+ <_ToolTip>Variable name</_ToolTip>
+ </Variable>
+ <Variable name="SystemMax" isEditable="false">
+ <Default>System.Max</Default>
+ <Function>GetSimpleTypeName("System#Max")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[$var$ = $SystemMax$ ($var$, $end$);]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>lst</Shortcut>
+ <_Description>Access last element of a collection</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="col" isIdentifier="true">
+ <Default>col</Default>
+ <_ToolTip>Collection name</_ToolTip>
+ <Function>GetCollections()</Function>
+ </Variable>
+ <Variable name="countorlength" isEditable="false">
+ <Default>Count</Default>
+ <Function>GetLengthProperty("col")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[$col$[$col$.$countorlength$ - 1]]]></Code>
+ </CodeTemplate>
+
+
+ <!-- Surround Templates -->
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>#region</Shortcut>
+ <_Description>Template for #region</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name">
+ <Default>MyRegion</Default>
+ <_ToolTip>Region name</_ToolTip>
+ </Variable>
+ </Variables>
+
+ <Code><![CDATA[#region $name$
+$selected$$end$
+#endregion]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>#if</Shortcut>
+ <_Description>Template for #if</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression" isIdentifier="true">
+ <Default>true</Default>
+ <_ToolTip>Preprocessor expression to evaluate</_ToolTip>
+ </Variable>
+ </Variables>
+
+ <Code><![CDATA[#if $expression$
+$selected$$end$
+#endif]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>checked</Shortcut>
+ <_Description>Template checked block</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[checked
+{
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>class</Shortcut>
+ <_Description>Template for class declaration</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyClass</Default>
+ <_ToolTip>Class name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[class $name$
+{
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>interface</Shortcut>
+ <_Description>Template for an Interface</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>IMyInterface</Default>
+ <_ToolTip>Interface name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[interface $name$
+{
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>struct</Shortcut>
+ <_Description>Template for a Struct</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyStruct</Default>
+ <_ToolTip>Struct name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[struct $name$
+{
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>enum</Shortcut>
+ <_Description>Template for an Enumeration</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyEnum</Default>
+ <_ToolTip>Enumeration name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[enum $name$
+{
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>for</Shortcut>
+ <_Description>Template for 'for' loop</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="i" isIdentifier="true">
+ <Default>i</Default>
+ <_ToolTip>Index</_ToolTip>
+ </Variable>
+ <Variable name="max">
+ <Default>max</Default>
+ <_ToolTip>Number of iterations</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[for (int $i$ = 0; $i$ < $max$; $i$++) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>forr</Shortcut>
+ <_Description>Template for reverse 'for' loop</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="i" isIdentifier="true">
+ <Default>i</Default>
+ <_ToolTip>Index</_ToolTip>
+ </Variable>
+ <Variable name="max">
+ <Default>max</Default>
+ <_ToolTip>Number of iterations</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[for (int $i$ = $max$ - 1; $i$ >= 0; $i$--) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>while</Shortcut>
+ <_Description>Template for 'while' loop</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression">
+ <Default>true</Default>
+ <_ToolTip>Expression to evaluate</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[while ($expression$) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>itar</Shortcut>
+ <_Description>Template for iterating through a collection</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="i" isIdentifier="true">
+ <Default>i</Default>
+ <_ToolTip>Index</_ToolTip>
+ </Variable>
+ <Variable name="collection" isIdentifier="true">
+ <Default>collection</Default>
+ <_ToolTip>Collection to iterate through</_ToolTip>
+ <Function>GetCollections()</Function>
+ </Variable>
+ <Variable name="varname" isIdentifier="true">
+ <Default>varname</Default>
+ <_ToolTip>Name of variable.</_ToolTip>
+ </Variable>
+ <Variable name="countorlength" isEditable="false">
+ <Default>Count</Default>
+ <Function>GetLengthProperty("collection")</Function>
+ </Variable>
+ <Variable name="type" isEditable="false">
+ <Default>var</Default>
+ <Function>GetComponentTypeOf("collection")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[for (int $i$ = 0; $i$ < $collection$.$countorlength$; $i$++) {
+ $type$ $varname$ = $collection$[$i$];
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>itarr</Shortcut>
+ <_Description>Template for iterating reverse through a collection</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="i" isIdentifier="true">
+ <Default>i</Default>
+ <_ToolTip>Index</_ToolTip>
+ </Variable>
+ <Variable name="collection" isIdentifier="true">
+ <Default>collection</Default>
+ <_ToolTip>Collection to iterate through</_ToolTip>
+ <Function>GetCollections()</Function>
+ </Variable>
+ <Variable name="varname" isIdentifier="true">
+ <Default>varname</Default>
+ <_ToolTip>Name of variable.</_ToolTip>
+ </Variable>
+ <Variable name="countorlength" isEditable="false">
+ <Default>Count</Default>
+ <Function>GetLengthProperty("collection")</Function>
+ </Variable>
+ <Variable name="type" isEditable="false">
+ <Default>var</Default>
+ <Function>GetComponentTypeOf("collection")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[for (int $i$ = $collection$.$countorlength$ - 1; $i$ >= 0 ; $i$--) {
+ $type$ $varname$ = $collection$[$i$];
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>do</Shortcut>
+ <_Description>Template for 'do...while' loop</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression">
+ <Default>true</Default>
+ <_ToolTip>Expression to evaluate</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[do {
+ $selected$$end$
+} while ($expression$);]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>else</Shortcut>
+ <_Description>Template for 'else'</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[else {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>foreach</Shortcut>
+ <_Description>Template for 'foreach' loop</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="id" isIdentifier="true">
+ <Default>item</Default>
+ <_ToolTip>Identifier for the current element</_ToolTip>
+ </Variable>
+ <Variable name="collection">
+ <Default>collection</Default>
+ <_ToolTip>Collection to iterate through</_ToolTip>
+ <Function>GetCollections()</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[foreach (var $id$ in $collection$) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>if</Shortcut>
+ <_Description>Template for 'if' statement</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression">
+ <Default>true</Default>
+ <_ToolTip>Expression to evaluate</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[if ($expression$) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>lock</Shortcut>
+ <_Description>Template for 'lock' statement</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression" isIdentifier="true">
+ <Default>this</Default>
+ <_ToolTip>Object to lock</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[lock ($expression$) {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>namespace</Shortcut>
+ <_Description>Template for namespace</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyNamespace</Default>
+ <_ToolTip>Namespace name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[namespace $name$ {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>try</Shortcut>
+ <_Description>Template for try...catch</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="SystemException" isEditable="false">
+ <Default>System.Exception</Default>
+ <Function>GetSimpleTypeName("System#Exception")</Function>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[try {
+ $selected$
+} catch ($SystemException$ ex) {
+ $end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Context>InExpression</Context>
+ <Shortcut>(...)</Shortcut>
+ <_Description>Template for parentheses</_Description>
+ <TemplateType>SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[($selected$)]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Context>InExpression</Context>
+ <Shortcut>((type)...)</Shortcut>
+ <_Description>Template for type cast</_Description>
+ <TemplateType>SurroundsWith</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="type" isEditable="true" isIdentifier="true">
+ <Default>cast_to</Default>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[(($type$)$selected$)]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>tryf</Shortcut>
+ <_Description>Template for try...finally</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[try {
+ $selected$
+} finally {
+ $end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>unchecked</Shortcut>
+ <_Description>Template for 'unchecked' block</_Description>
+ <TemplateType>SurroundsWith,Expansion</TemplateType>
+ </Header>
+ <Code><![CDATA[unchecked {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>C#</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-csharp</MimeType>
+ <Shortcut>unsafe</Shortcut>
+ <_Description>Template for 'unsafe' block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[unsafe {
+ $selected$$end$
+}]]></Code>
+ </CodeTemplate>
+
+ <!-- html -->
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>boldb</Shortcut>
+ <_Description>bold block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<b>$selected$$end$</b>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>commentb</Shortcut>
+ <_Description>comment block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<!--$selected$$end$-->]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>heading1b</Shortcut>
+ <_Description>heading 1 block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<h1>$selected$$end$</h1>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>heading2b</Shortcut>
+ <_Description>heading 2 block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<h2>$selected$$end$</h2>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>heading3b</Shortcut>
+ <_Description>heading 3 block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<h3>$selected$$end$</h3>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>heading4b</Shortcut>
+ <_Description>heading 4 block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<h4>$selected$$end$</h4>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>italicb</Shortcut>
+ <_Description>italic block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<i>$selected$$end$</i>]]></Code>
+ </CodeTemplate>
+
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Html</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/html</MimeType>
+ <Shortcut>parab</Shortcut>
+ <_Description>paragraph block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<p>$selected$$end$</p>]]></Code>
+ </CodeTemplate>
+
+ <!-- xml -->
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Xml</_Group>
+ <Version>1.0</Version>
+ <MimeType>application/xml</MimeType>
+ <Shortcut>commentb</Shortcut>
+ <_Description>Template for comment block</_Description>
+ <TemplateType>Expansion, SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[<!--$selected$$end$-->]]></Code>
+ </CodeTemplate>
+
+ <!-- python -->
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>while</Shortcut>
+ <_Description>Template for while block</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="expression">
+ <Default>True</Default>
+ <_ToolTip>Expression to evaluate</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[while $expression$:
+$selected$$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>def</Shortcut>
+ <_Description>Template for function block</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>name</Default>
+ <_ToolTip>Function name</_ToolTip>
+ </Variable>
+ <Variable name="args">
+ <Default>arg1</Default>
+ <_ToolTip>Function arguments</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[def $name$($args$):
+$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>cdef</Shortcut>
+ <_Description>Template for class function block</_Description>
+ <TemplateType>Expansion</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default></Default>
+ <_ToolTip>Function name</_ToolTip>
+ </Variable>
+ <Variable name="args">
+ <Default>, arg1</Default>
+ <_ToolTip>Function arguments</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[def $name$(self$args$):
+$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>if</Shortcut>
+ <_Description>Template for if block</_Description>
+ <TemplateType>Expansion,SurroundsWith</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="condition">
+ <Default>True</Default>
+ <_ToolTip>If condition</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[if $condition$:
+$selection$$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>main</Shortcut>
+ <_Description>Template for main block</_Description>
+ <TemplateType>Expansion,SurroundsWith</TemplateType>
+ </Header>
+ <Code><![CDATA[if __name__ == '__main__':
+ $selection$$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>gtkwindow</Shortcut>
+ <_Description>Template for a class deriving from gtk.Window</_Description>
+ <TemplateType>Expansion,SurroundsWith</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyWindow</Default>
+ <_ToolTip>Window class name</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[class $name$(gtk.Window):
+ def __init__(self):
+ # initialize window
+ gtk.Window.__init__(self)
+ self.set_title('$name$')
+ self.set_default_size(640, 480)
+
+$selection$$end$]]></Code>
+ </CodeTemplate>
+ <CodeTemplate version="2.0">
+ <Header>
+ <_Group>Python</_Group>
+ <Version>1.0</Version>
+ <MimeType>text/x-python</MimeType>
+ <Shortcut>gladewindow</Shortcut>
+ <_Description>Template for a class loading contents from a gtkbuilder file</_Description>
+ <TemplateType>Expansion,SurroundsWith</TemplateType>
+ </Header>
+ <Variables>
+ <Variable name="name" isIdentifier="true">
+ <Default>MyWindow</Default>
+ <_ToolTip>Window class name</_ToolTip>
+ </Variable>
+ <Variable name="path">
+ <Default>widgets.ui</Default>
+ <_ToolTip>Path to ui description file (widgets.ui)</_ToolTip>
+ </Variable>
+ <Variable name="childname" isIdentifier="true">
+ <Default>window_child</Default>
+ <_ToolTip>The top-most child of the window within the gtk.Builder file.</_ToolTip>
+ </Variable>
+ </Variables>
+ <Code><![CDATA[class $name$(gtk.Window):
+ def __init__(self):
+ gtk.Window.__init__(self)
+ self._build()
+
+ def _build(self):
+ # create builder to load widgets
+ self._builder = gtk.Builder()
+ self._builder.add_from_file('$path$')
+
+ # reparent child widget into our window
+ child = self._builder.get_object('$childname$')
+ parent = child.parent
+ child.reparent(self)
+
+ # copy settings from original parent window
+ self.set_title(parent.get_title() or '$name$')
+ self.set_default_size(*parent.get_default_size())
+
+ # copy objects from gtkbuilder and attach them
+ for obj in self._builder.get_objects():
+ if obj.get_name():
+ name = '_' + obj.get_name()
+ if not hasattr(self, name):
+ setattr(self, name, obj)
+
+$selection$$end$]]></Code>
+ </CodeTemplate>
+
+</CodeTemplates>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ClassPad.ClassPadContextMenu.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ClassPad.ClassPadContextMenu.addin.xml
new file mode 100644
index 0000000..db5bb42
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ClassPad.ClassPadContextMenu.addin.xml
@@ -0,0 +1,49 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Namespace" name = "Namespace node context menu in the class pad">
+ <Description>Context menu for namespaces in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Method" name = "Method node context menu in the class pad">
+ <Description>Context menu for methods in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Field" name = "Field node context menu in the class pad">
+ <Description>Context menu for fields in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Event" name = "Event node context menu in the class pad">
+ <Description>Context menu for events in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Combine" name = "Combine node context menu in the class pad">
+ <Description>Context menu for combines in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Class" name = "Class node context menu in the class pad">
+ <Description>Context menu for classes in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Property" name = "Property node context menu in the class pad">
+ <Description>Context menu for properties in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/Project" name = "Project node context menu in the class pad">
+ <Description>Context menu for projects in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ClassPad/References" name = "Reference node context menu in the class pad">
+ <Description>Context menu for references in the class pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
+</ExtensionModel>
+
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectPadContextMenu.addin.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectPadContextMenu.addin.xml
new file mode 100644
index 0000000..e185f41
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectPadContextMenu.addin.xml
@@ -0,0 +1,154 @@
+<ExtensionModel>
+
+<ExtensionPoint path = "/MonoDevelop/Ide/ContextMenu/ProjectPad" name = "Project pad context menu">
+ <Description>Context menu for nodes in the solution pad.</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+ <ConditionType id="ItemType" type="MonoDevelop.Projects.Extensions.ItemTypeCondition">
+ <Description>Type of the item. If no namespace is provided, MonoDevelop.Projects is assumed.</Description>
+ </ConditionType>
+</ExtensionPoint>
+
+<Extension path = "/MonoDevelop/Ide/ContextMenu/ProjectPad">
+
+ <!-- Build section -->
+
+ <SeparatorItem id = "BuildSectionStart" />
+ <Condition id="ItemType" value="IBuildTarget">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Build" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Rebuild" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Clean" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Reload" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.CustomCommandList" />
+ </Condition>
+ <SeparatorItem id = "BuildSectionEnd" />
+
+ <!-- Actions Section -->
+
+ <SeparatorItem id = "ActionsSectionStart" />
+ <Condition id="ItemType" value="ProjectReference|ProjectFile|SystemFile">
+ <ItemSet id = "OpenWith" _label = "Open _With" autohide="true">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ViewCommands.OpenWithList" />
+ </ItemSet>
+ <SeparatorItem id = "OpenSeparator" />
+ </Condition>
+ <Condition id="ItemType" value="SystemFile|ProjectFolder">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.IncludeToProject" />
+ </Condition>
+ <SeparatorItem id = "ActionsSectionEnd" />
+
+ <!-- Run section -->
+
+ <SeparatorItem id = "RunSectionStart" />
+ <Condition id="ItemType" value="IBuildTarget">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.RunEntry" />
+ <ItemSet id = "RunWith" _label = "Run With" autohide="True">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.RunEntryWithList" />
+ </ItemSet>
+ </Condition>
+ <Condition id="ItemType" value="Project">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SetAsStartupProject" />
+ </Condition>
+ <SeparatorItem id = "RunSectionEnd" />
+
+ <!-- Add section -->
+
+ <SeparatorItem id = "AddSectionStart" />
+ <ItemSet id = "Add" _label = "_Add" autohide="True">
+ <Condition id="ItemType" value="Workspace">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewSolution" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewWorkspace" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddItem" />
+ </Condition>
+ <Condition id="ItemType" value="Solution|SolutionFolder">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewProject" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddProject" />
+ <SeparatorItem id = "Separator1" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddSolutionFolder" />
+ </Condition>
+ <Condition id="ItemType" value="Project|ProjectFolder|Solution|SolutionFolder">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddFiles" />
+ </Condition>
+ <Condition id="ItemType" value="Project|ProjectFolder">
+ <SeparatorItem/>
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddFilesFromFolder" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddExistingFolder" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.NewFolder" />
+ </Condition>
+ </ItemSet>
+ <Condition id="ItemType" value="ProjectReferenceCollection">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.AddReference" />
+ </Condition>
+ <SeparatorItem id = "AddSectionEnd" />
+
+ <!-- Tools section -->
+
+ <SeparatorItem id = "ToolsSectionStart" />
+ <ItemSet id = "Tools" _label = "_Tools" autohide="True">
+ <Condition id="ItemType" value="Solution|Project">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportSolution" />
+ <SeparatorItem id = "ExportSeparator" />
+ </Condition>
+ <Condition id="ItemType" value="Solution|Project|SolutionFolder">
+ <SeparatorItem id = "PolicyToolsStart" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ApplyPolicy" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.ExportPolicy" />
+ <SeparatorItem id = "PolicyToolsEnd" />
+ </Condition>
+ <Condition id="ItemType" value="IFolderItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenInTerminal" />
+ </Condition>
+ <Condition id="ItemType" value="Project|UnknownSolutionItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.EditSolutionItem" />
+ </Condition>
+ </ItemSet>
+ <Condition id="ItemType" value="IFolderItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.SearchCommands.FindInFiles" />
+ </Condition>
+ <Condition id="ItemType" value="IFolderItem|IFileItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.OpenContainingFolder" />
+ </Condition>
+ <SeparatorItem id = "ToolsSectionEnd" />
+
+ <!-- Edit section -->
+
+ <SeparatorItem id = "EditSectionStart" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Copy" disabledVisible="False" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Cut" disabledVisible="False" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Paste" disabledVisible="False" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Delete" disabledVisible="False" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.EditCommands.Rename" disabledVisible="False" />
+ <SeparatorItem id = "EditSectionEnd" />
+
+ <Condition id="ItemType" value="WorkspaceItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CloseWorkspaceItem" />
+ </Condition>
+
+ <SeparatorItem id = "CombineOptionsSeparator" />
+
+ <!-- Properties Section -->
+
+ <SeparatorItem id = "PropertiesSectionStart" />
+ <Condition id="ItemType" value="ProjectFile">
+ <ItemSet id = "BuildActions" _label = "Build Action">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.SetBuildAction" />
+ </ItemSet>
+ <ItemSet id = "QuickProperties" _label = "_Quick Properties">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.CopyToOutputDirectory" />
+ </ItemSet>
+ </Condition>
+ <Condition id="ItemType" value="ProjectReference">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.LocalCopyReference" />
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.SpecificAssemblyVersion" />
+ </Condition>
+ <Condition id="ItemType" value="IBuildTarget">
+ <CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Options" />
+ </Condition>
+ <Condition id="ItemType" value="ProjectItem">
+ <CommandItem id = "MonoDevelop.Ide.Commands.FileCommands.ShowProperties" />
+ </Condition>
+ <SeparatorItem id = "PropertiesSectionEnd" />
+
+</Extension>
+
+</ExtensionModel>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.Apache2LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.Apache2LicencePolicy.xml
new file mode 100644
index 0000000..3df4295
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.Apache2LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
 Copyright ${Year} ${CopyrightHolder}

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on a [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL2LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL2LicencePolicy.xml
new file mode 100644
index 0000000..e0fdd59
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL2LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
 ${FileName}
 
 Author:
 ${AuthorName} <${AuthorEmail}>

 Copyright (c) ${Year} ${CopyrightHolder}

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL3LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL3LicencePolicy.xml
new file mode 100644
index 0000000..3ccd42b
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL3LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text=" 
 ${FileName}
 
 Author:
 ${AuthorName} <${AuthorEmail}>

 Copyright (c) ${Year} ${CopyrightHolder}

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in th [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL2-1LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL2-1LicencePolicy.xml
new file mode 100644
index 0000000..b874ef6
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL2-1LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
 ${FileName}
 
 Author:
 ${AuthorName} <${AuthorEmail}>

 Copyright (c) ${Year} ${CopyrightHolder}

 This library is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as
 published by the Free Software Foundation; either version 2.1 of the
 License, or (at your option) any later version.

 This library is distribut [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL3LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL3LicencePolicy.xml
new file mode 100644
index 0000000..d40e8f0
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL3LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
 ${FileName}
 
 Author:
 ${AuthorName} <${AuthorEmail}>
 
 Copyright (c) ${Year} ${CopyrightHolder}

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distribute [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.MITX11LicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.MITX11LicencePolicy.xml
new file mode 100644
index 0000000..7d93886
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.MITX11LicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
${FileName}
 
Author:
 ${AuthorName} <${AuthorEmail}>

Copyright (c) ${Year} ${CopyrightHolder}

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, [...]
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.NewBSDLicencePolicy.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.NewBSDLicencePolicy.xml
new file mode 100644
index 0000000..9cd0580
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.NewBSDLicencePolicy.xml
@@ -0,0 +1 @@
+<StandardHeader allowDiffSerialize="True" Text="
 Author:
 ${AuthorName} ${AuthorEmail}

 Copyright (c) ${Year}, ${CopyrightHolder}

 All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistri [...]
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-chat.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-chat.png
new file mode 100644
index 0000000..2c97dca
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-chat.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-cloud.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-cloud.png
new file mode 100644
index 0000000..c83a739
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-cloud.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-heart.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-heart.png
new file mode 100644
index 0000000..bffca62
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-heart.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-info.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-info.png
new file mode 100644
index 0000000..7bb2eda
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-info.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.new_solution.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.new_solution.png
new file mode 100644
index 0000000..c219738
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.new_solution.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.open_solution.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.open_solution.png
new file mode 100644
index 0000000..1116605
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.open_solution.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal-hover.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal-hover.png
new file mode 100644
index 0000000..6c18d26
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal-hover.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal.png
new file mode 100644
index 0000000..ff45f82
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned-hover.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned-hover.png
new file mode 100644
index 0000000..007244e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned-hover.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned.png
new file mode 100644
index 0000000..be4fad9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.starburst.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.starburst.png
new file mode 100644
index 0000000..857aa26
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.starburst.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.AboutImage.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.AboutImage.png
new file mode 100644
index 0000000..6b2c38e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.AboutImage.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.SplashScreen.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.SplashScreen.png
new file mode 100644
index 0000000..062acf7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.SplashScreen.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_Logo.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_Logo.png
new file mode 100644
index 0000000..e81972c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_Logo.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_TopBorderRepeat.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_TopBorderRepeat.png
new file mode 100644
index 0000000..c4ab964
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_TopBorderRepeat.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..92466bf
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,332 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.AppConfigFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.BlankCombine.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyClass.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyEnum.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyHTMLFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyInterface.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyResourceFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyStruct.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyTextFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyXMLFile.xft.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.GenericProject.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeEmacs.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeVisualStudio.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.Workspace.xpt.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop1.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop2.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.MITX11LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.Apache2LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL2LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.GPL3LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL2-1LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.NewBSDLicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeTemplates.MonoDevelop-templates.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.MonoTextStylePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.VisualStudioTextStylePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.StandardHeader.LGPL3LicencePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.CodeFormatting.InvariantTextStylePolicy.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectPadContextMenu.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Commands.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.DefaultPolicyPanels.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.GlobalOptionsDialog.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.ItemOptionPanels.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainMenu.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MainToolbar.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MimeTypes.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Pads.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.StockIcons.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Templates.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.MonoDevelop.Ide.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.ExtensionModel.Policies.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Commands.CommandsExtensionModel.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.Gui.Pads.ClassPad.ClassPadContextMenu.addin.xml
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.mono-powered.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.parsing.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-file-manager.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pindown.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pinup.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.add-namespace-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.assembly-project-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disable-all-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disabled-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-invalid-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-on-off-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-remove-all-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.comment.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all_22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-class-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-delegate-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-enumeration-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-event-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-extensionmethod-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-field-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-interface-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-literal-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-namespace-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-property-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-structure-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.ExecutionMarker.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-addin-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-class-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-enum-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-interface-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-struct-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.gnome-fs-regular.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-active.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-down.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-up.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyword-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-48.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-console-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-gui-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-library-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-reference-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.remove-namespace-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-closed-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-open-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-new-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sort-namespace-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.static-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update_22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-surroundwith-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.uncomment.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.letters-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hammer-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.drive-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monkey-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.user-package.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.view-message-log-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-internal-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-private-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-protected-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-studio.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-overlay.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.SortByCat.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-auto-hide.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-close-12.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-dock.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-left-12.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.Docking.stock-menu-right-12.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-quickfix-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.balloon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.software-update-available.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_Logo.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.WelcomePage_TopBorderRepeat.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.AboutImage.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.branding.SplashScreen.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Over.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.Over.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-runButton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepOutButton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepInButton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-skipButton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-pauseButton.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-LeftCap-Pressed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-MidCap-Pressed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btDebugBase-RightCap-Pressed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Disabled.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Hover.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.btExecuteBase-Pressed.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Disabled.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoExecute-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Disabled.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoStop-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationBuildingIcon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Active.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationDisclosure-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.notificationErrorIcon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-down.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-up.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.magnify-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-clear-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-search-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-all-documents-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-solution-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-folder-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-resource-folder-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.find-in-files-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.misc-files-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-folder-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-project-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-resource-folder-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.output-icon-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.replace-in-files-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-24.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.split-window-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tip-of-the-day-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-22.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-search-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-file-32.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-prev.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-next.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-prev-normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-next-normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-popdown.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-05.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-06.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-05.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-06.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-05.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-06.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-05.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.error-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-down.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.command.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Disabled.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.MainToolbar.Theme.icoBuild-Normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-hover.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.console-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.stop-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.broom-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSteady.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSuccess.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusWarning.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusError.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-chat.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-cloud.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-heart.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.link-info.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal-hover.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-normal.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned-hover.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.star-pinned.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.new_solution.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.open_solution.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.locale_16x16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-InternalAndProtected-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-ProtectedOrInternal-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.chain-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-overlay-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-item-group-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sdk-locations-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.errors-pad.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Ide.WelcomePage.icons.starburst.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-01.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-02.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-03.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-04.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-05.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-06.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.variable-16.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-error-icon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-warning-icon.png
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.DefaultPropertyTab.bmp
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.EventPropertyTab.bmp
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.MonoDevelop.Components.SearchEntry.cs
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/Xwt.Gtk.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Ide.dll.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/gtkrc.win32
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/gtkrc.mac
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/gtkrc
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Ide.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Ide.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.dll.mdb
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.gtk-gui.gui.stetic b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.gtk-gui.gui.stetic
new file mode 100644
index 0000000..c327ae2
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.gtk-gui.gui.stetic
@@ -0,0 +1,12022 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../external/xwt/Xwt.Gtk/bin/Debug/Xwt.Gtk.dll" />
+ <widget-library name="../../../../external/mono-addins/bin/Mono.Addins.Gui.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ExportSolutionDialog" design-size="496 154">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Events">ButtonPressMask</property>
+ <property name="Title" translatable="yes">Export Solution</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Resizable">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog_VBox">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboFormat">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target folder:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Current format:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelNewFormat">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="newFormatLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">New format:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="MonoDevelop.Ide.ExportProjectDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button51">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.CombineEntryFeatureSelector" design-size="513 356">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolled">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.NewProjectDialog" design-size="930 539">
+ <property name="MemberName" />
+ <property name="WidthRequest">930</property>
+ <property name="Visible">False</property>
+ <property name="Title">New Solution</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="WindowPosition">Center</property>
+ <property name="BorderWidth">6</property>
+ <property name="DestroyWithParent">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">0</property>
+ <property name="ShowBorder">False</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">7</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">188</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="lst_template_types">
+ <property name="MemberName" />
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HPaned" id="panedTemplates">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">430</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxTemplates">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledInfo">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <signal name="SizeAllocated" handler="OnScrolledInfoSizeAllocated" />
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxInfo">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <signal name="SizeAllocated" handler="OnBoxInfoSizeAllocated" />
+ <child>
+ <widget class="Gtk.Label" id="labelTemplateTitle">
+ <property name="MemberName" />
+ <property name="WidthRequest">30</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Console Project</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lbl_template_descr">
+ <property name="MemberName" />
+ <property name="WidthRequest">116</property>
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Creates a new C# Project</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="entry_location">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="txt_subdirectory">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="PathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="chk_combine_directory">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Create directory for solution</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="SolutionCheckChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lbl_location">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Location:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lbl_name">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">N_ame:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">txt_name</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lbl_subdirectory">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Solution name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">txt_subdirectory</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="txt_name">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="NameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="lbl_will_save_in">
+ <property name="MemberName" />
+ <property name="WidthRequest">580</property>
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp">Project will be saved in: /dev/null</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp">page1</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Project Features</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="WidthRequest">632</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><small>This list shows a set of features you can enable in the new project. After creating the project those features can be enabled or disabled in the Project Options dialog, or by adding new projects to the solution.</small></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp">page2</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog-action_area1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="btn_close">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <signal name="Clicked" handler="cancelClicked" />
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btn_new">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-forward</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OpenEvent" />
+ <property name="label">gtk-go-forward</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.FeatureSelectorDialog" design-size="585 435">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">New Project Features</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Project features</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Projects.CombineEntryFeatureSelector" id="featureList">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="GtkDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button1547">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label">button1547</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">0</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button1548">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label">button1548</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.KeyBindingsPanel" design-size="720 460">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelScheme">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Scheme:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="schemeCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Search:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">searchEntry</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="searchEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="clearFilterButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <child>
+ <widget class="Gtk.Image" id="image25">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-clear Menu</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="globalWarningBox">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="warningBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image3">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-warning Menu</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The current scheme has conflicting key bindings</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.MenuButton" id="conflicButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <property name="UseUnderline">False</property>
+ <property name="UseMarkup">False</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="keyTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="EnableSearch">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMessage">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelEditBinding">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Edit Binding</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="accelEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="updateButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-apply Button</property>
+ <property name="Label" translatable="yes">Apply</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">6</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.LoadSavePanelWidget" design-size="344 238">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox17">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox26">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Project file format to use when creating new projects:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboFileFormats">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="locationLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Default _Solution location</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox18">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="loadLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Load</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox14">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label25">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp"> </property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox10">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox65">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="loadUserDataCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Load user-specific settings with the document</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="loadPrevProjectCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Load previous solution on startup</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox19">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="saveLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Save</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox11">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label21">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp"> </property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox20">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="createBackupCopyCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Always create backup copy</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Window" id="MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow" design-size="500 285">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="Title">Tip of the Day</property>
+ <property name="WindowPosition">Center</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox7">
+ <property name="MemberName" />
+ <property name="Spacing">5</property>
+ <child>
+ <widget class="Gtk.Image" id="image5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="Pixbuf">stock:gtk-dialog-info Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="categoryLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Did you know...?</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="tipTextview">
+ <property name="MemberName" />
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes">Did you know that you can design lots of cool things with glade?</property>
+ <property name="WrapMode">Word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="noshowCheckbutton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Show at startup</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HButtonBox" id="hbuttonbox1">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="nextButton">
+ <property name="MemberName" />
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-forward Button</property>
+ <property name="Label" translatable="yes">_Next Tip</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="closeButton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.BuildPanelWidget" design-size="471 266">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox66">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="buildBeforeRunCheckBox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Build solution before running</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="runWithWarningsCheckBox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Run solution if build completed with warnings</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkXBuild">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Compile projects using MSBuild / XBuild
+(this is an experimental feature and may not work for some projects)</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">36</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Log _verbosity:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">msbuildVerbosity</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="verbosityCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Quiet
+Minimal
+Normal
+Detailed
+Diagnostic</property>
+ <property name="Active">2</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="buildAndRunOptionsLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>File Save Options Before Building</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox44">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label71">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp"> </property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox67">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="saveChangesRadioButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Save changes to open documents</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">saveChangesRadioButton</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="promptChangesRadioButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Prompt to save changes to open documents</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">saveChangesRadioButton</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="noSaveRadioButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Don't save changes to open documents </property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">saveChangesRadioButton</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.ExternalTools.ExternalToolPanelWidget" design-size="805 442">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox32">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox21">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow4">
+ <property name="MemberName" />
+ <property name="ShadowType">EtchedOut</property>
+ <child>
+ <widget class="Gtk.TreeView" id="toolListBox">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="HeightRequest">150</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="buttons">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="addButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label34">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp"> </property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="moveUpButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-up</property>
+ <property name="label">gtk-go-up</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="moveDownButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-down</property>
+ <property name="label">gtk-go-down</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="argumentLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Arguments:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="browseButton">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="commandLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Command:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">combo-entry2</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table3">
+ <property name="MemberName" />
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">4</property>
+ <child>
+ <widget class="Gtk.Entry" id="argumentTextBox">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorArgs">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">4</property>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorPath">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="workingDirTextBox">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="titleLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Title:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">titleTextBox</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="titleTextBox">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="workingDirLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Working directory:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="promptArgsCheckBox">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">_Prompt for arguments</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="saveCurrentFileCheckBox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Save current file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="useOutputPadCheckBox">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Use _output window</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.NewLayoutDialog" design-size="459 162">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">New Layout</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="BorderWidth">6</property>
+ <property name="Resizable">False</property>
+ <property name="AllowGrow">False</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox45">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label72">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Layout name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="layoutName">
+ <property name="MemberName" />
+ <property name="WidthRequest">320</property>
+ <property name="IsEditable">True</property>
+ <property name="ActivatesDefault">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="validationMessage">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="GtkDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button309">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="newButton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="HasDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-new Menu</property>
+ <property name="Label" translatable="yes">Create _Layout</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-5</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.AddInsPanelWidget" design-size="473 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox72">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Automatically check for updates:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="LeftPadding">24</property>
+ <property name="BottomPadding">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioHour">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Every hour</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioDay">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Every day</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioMonth">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Every month</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioNever">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Never</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkUnstable">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Install unstable developer updates</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckUnstableToggled" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox47">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Alignment" id="boxUnstable">
+ <property name="MemberName" />
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioBeta">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Beta updates (weekly)</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group2</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioAlpha">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Alpha updates (very often, very unstable)</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group2</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioTest">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Test</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group2</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonUpdateNow">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Check for Updates Now</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonUpdateNowClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.TasksPanelWidget" design-size="564 336">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox6">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">8</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox7">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="labelTokens">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Token List:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="WidthRequest">200</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tokensTreeView">
+ <property name="MemberName" />
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox14">
+ <property name="MemberName" />
+ <property name="Spacing">4</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxPriority">
+ <property name="MemberName" />
+ <property name="Spacing">4</property>
+ <child>
+ <widget class="Gtk.Label" id="label112">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">entryToken</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryToken">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="MaxLength">50</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label113">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Priority:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HButtonBox" id="hbuttonbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonChange">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label">
+ <property name="MemberName" />
+ <property name="Ypad">12</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes"><i><b>Note:</b> Only Letters, Digits and Underscore are allowed.</i></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ <property name="Justify">Center</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="frame1">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">12</property>
+ <property name="TopPadding">4</property>
+ <child>
+ <widget class="Gtk.Table" id="table6">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">4</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonHighPrio">
+ <property name="MemberName" />
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonLowPrio">
+ <property name="MemberName" />
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ColorButton" id="colorbuttonNormalPrio">
+ <property name="MemberName" />
+ <property name="Alpha">-1</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">High</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label11">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Normal</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label12">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">Low</property>
+ <property name="Justify">Center</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Task Priorities Foreground Colors</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.SelectEncodingsDialog" design-size="595 465">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title">Select Text Encodings</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">6</property>
+ <property name="DefaultWidth">700</property>
+ <property name="DefaultHeight">450</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <signal name="Response" handler="OnRespond" />
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Table" id="table5">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">4</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label106">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Available encodings:</property>
+ <property name="WidthChars">20</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label107">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Encodings shown in menu:</property>
+ <property name="WidthChars">20</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow10">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listAvail">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow11">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listSelected">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox74">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label108">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btnAdd">
+ <property name="MemberName" />
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-forward Button</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnAddClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btnRemove">
+ <property name="MemberName" />
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-back SmallToolbar</property>
+ <signal name="Clicked" handler="OnRemoveClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label109">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox75">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="btnUp">
+ <property name="MemberName" />
+ <property name="Type">Custom</property>
+ <signal name="Clicked" handler="OnUpClicked" />
+ <child>
+ <widget class="Gtk.Image" id="image9">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="Pixbuf">stock:gtk-go-up Button</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btnDown">
+ <property name="MemberName" />
+ <property name="Type">Custom</property>
+ <signal name="Clicked" handler="OnDownClicked" />
+ <child>
+ <widget class="Gtk.Image" id="image10">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="Pixbuf">stock:gtk-go-down Button</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">3</property>
+ <property name="RightAttach">4</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog-action_area5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="cancelbutton1">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okbutton1">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.AddinLoadErrorDialog" design-size="575 394">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" />
+ <property name="TypeHint">Dialog</property>
+ <property name="BorderWidth">6</property>
+ <property name="DefaultHeight">350</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="Pixbuf">stock:gtk-dialog-error Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">The following add-ins could not be started:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="errorTree">
+ <property name="MemberName" />
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="messageLabel">
+ <property name="MemberName" />
+ <property name="WidthRequest">479</property>
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="GtkDialog_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="noButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-no</property>
+ <property name="ResponseId">-9</property>
+ <property name="label">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="yesButton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-yes</property>
+ <property name="ResponseId">-8</property>
+ <property name="label">gtk-yes</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="closeButton">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.NewFileDialog" design-size="718 524">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">New File</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">192</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="catView">
+ <property name="MemberName" />
+ <property name="WidthRequest">160</property>
+ <property name="CanFocus">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HPaned" id="panedTemplates">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">292</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxTemplates">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledInfo">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <signal name="SizeAllocated" handler="OnScrolledInfoSizeAllocated" />
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxInfo">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTemplateTitle">
+ <property name="MemberName" />
+ <property name="WidthRequest">145</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Console Project</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="infoLabel">
+ <property name="MemberName" />
+ <property name="WidthRequest">145</property>
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Creates a new C# Project</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="WidthRequest">1</property>
+ <property name="HeightRequest">1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxProject">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="projectAddCheckbox">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Add to project:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="projectAddCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="projectPathLabel">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Path:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="projectFolderEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="cancelButton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okButton">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-new</property>
+ <property name="ResponseId">-1</property>
+ <property name="label">gtk-new</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.IDEStyleOptionsPanelWidget" design-size="315 285">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox13">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboLanguage">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboTheme">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">User Interface Language:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelTheme">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">User Interface Theme:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.AuthorInformationPanelWidget" design-size="370 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkCustom">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Use custom author information for this solution</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UseDefaultToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.Table" id="infoTable">
+ <property name="MemberName" />
+ <property name="NRows">5</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="companyEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="copyrightEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="emailEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">nameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Copyright:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Email:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">C_ompany:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Trademark:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="trademarkEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.GlobalAuthorInformationPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">5</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="companyEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="copyrightEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="emailEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">nameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Copyright:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Email:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">C_ompany:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Trademark:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="trademarkEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">4</property>
+ <property name="BottomAttach">5</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanelWidget" design-size="541 409">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="headerText">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="includeAutoCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Include standard header in new files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.TextStylePolicyPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Desired _file width:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="columnWidthSpin">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">1000</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">120</property>
+ <signal name="ValueChanged" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">columns</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Line endings:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="lineEndingCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="TopPadding">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Whitespace</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="indentWidthSpin">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Lower">1</property>
+ <property name="Upper">50</property>
+ <property name="PageIncrement">2</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">4</property>
+ <signal name="ValueChanged" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Tab width:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">tabWidthSpin</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label9">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">_Indent width:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">tabWidthSpin</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.SpinButton" id="tabWidthSpin">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Lower">1</property>
+ <property name="Upper">50</property>
+ <property name="PageIncrement">2</property>
+ <property name="StepIncrement">1</property>
+ <property name="ClimbRate">1</property>
+ <property name="Numeric">True</property>
+ <property name="Value">4</property>
+ <signal name="ValueChanged" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="tabsToSpaceCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Convert tabs to spaces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="tabsAfterNonTabsCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Allow tabs after non-tabs</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="removeTrailingWhitespaceCheck">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Remove trailing whitespace</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdateState" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.CodeTemplates.CodeTemplatePanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VPaned" id="vpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">127</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewCodeTemplates">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Preview:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonWhiteSpaces">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">S_how whitespaces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.CodeTemplates.EditTemplateDialog" design-size="859 494">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="SkipPagerHint">True</property>
+ <property name="SkipTaskbarHint">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">555</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table2">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryDescription">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Mime:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboboxentryMime">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryShortcut1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Text" translatable="yes"> </property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Group:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboboxentryGroups">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonExpansion">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Is _expandable template</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonSurroundWith">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Is _surround with template</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Shortcut:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes">_Description:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Template Text:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Fixed" id="fixed1">
+ <property name="MemberName" />
+ <property name="HasWindow">False</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonWhiteSpaces">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">S_how whitespaces</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxVariables">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewVariable">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.MonoRuntimePanelWidget" design-size="500 333">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="WidthRequest">500</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">If you have a parallel installation of Mono you can register it here, so you can use it for building and running projects. The <b>default runtime</b> is the .NET runtime to be used for building and running applications when none is specifically selected.</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonDefault">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Set as Default</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonDefaultClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelRunning">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">label1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.FindInFiles.FindInFilesDialog" design-size="456 348">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="DestroyWithParent">True</property>
+ <property name="SkipPagerHint">True</property>
+ <property name="SkipTaskbarHint">True</property>
+ <property name="Buttons">3</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="toggleFindInFiles">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Switch to Find in Files</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Find in Files</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">False</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <property name="Group">FindInFilesMode</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VSeparator" id="vseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="toggleReplaceInFiles">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Switch to Replace in Files</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Replace in Files</property>
+ <property name="DrawIndicator">False</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <property name="Group">FindInFilesMode</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="tableFindAndReplace">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboboxentryFind">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxScope">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelFind">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Find:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">comboboxentryFind</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelScope">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Look in:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">comboboxScope</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonCaseSensitive">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">C_ase sensitive</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonRegexSearch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Rege_x search</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkbuttonWholeWordsOnly">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Whole words only</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">3</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonStop">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-stop</property>
+ <property name="ResponseId">0</property>
+ <property name="label">gtk-stop</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonClose">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSearch">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-find</property>
+ <property name="ResponseId">0</property>
+ <property name="label">gtk-find</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Execution.CustomExecutionModeWidget" design-size="486 313">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">9</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryArgs">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Working Directory:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Arguments:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Environment Variables:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.EnvVarList" id="envVarList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Execution.CustomExecutionModeDialog" design-size="655 525">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Execution Arguments</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxEditor">
+ <property name="MemberName" />
+ <property name="Spacing">9</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxModeSelector">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Execution Mode:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.ExecutionModeComboBox" id="comboTargetMode">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <signal name="SelectionChanged" handler="OnComboTargetModeSelectionChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Notebook" id="notebook">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="CurrentPage">-1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxSave">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Save this configuration as a custom execution mode</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckSaveToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxName">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Custom Mode Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryModeName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryModeNameChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Available for:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboStore">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Only this project
+Only this solution
+All solutions</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkPrompt">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Always show the parameters window before running this custom mode</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.ExecutionModeComboBox" design-size="300 30">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboMode">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnComboModeChanged" />
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Execution.CustomExecutionModeManagerDialog" design-size="645 409">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Custom Execution Modes</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listModes">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Clicked" handler="OnButtonEditClicked" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog" design-size="512 387">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Delete Project</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Please select which files and folders you want to delete:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioDeleteAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Delete the project file and the whole project directory:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioDeleteAllToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">30</property>
+ <child>
+ <widget class="Gtk.Label" id="labelProjectDir">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label2</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioDeleteSel">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Delete the following files and folders:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">30</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="fileList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-delete</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-delete</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.SelectFileFormatDialog" design-size="638 246">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Select File Format</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image146">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-warning Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>File Format Incompatibility Detected</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelMessage">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The current file format for project {0} is not compatible with some settings of the project.</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelWarnings">
+ <property name="MemberName" />
+ <property name="WidthRequest">525</property>
+ <property name="Xalign">0</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Please select a new file format for the solution:</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">18</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment3">
+ <property name="MemberName" />
+ <property name="TopPadding">3</property>
+ <property name="BottomPadding">3</property>
+ <child>
+ <widget class="Gtk.Label" id="labelCurrentFormat">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">MonoDevelop</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboNewFormat">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Current Format:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">New Format:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.MaintenanceOptionsPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkInstr">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable MonoDevelop Instrumentation</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkAutoTest">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Enable automated test support</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.AssemblyFoldersPanelWidget" design-size="551 369">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Custom folders where MonoDevelop should look for assemblies and packages:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderListSelector" id="selector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.OptionPanels.BuildMessagePanelWidget" design-size="388 299">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table4">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxErrorPadAfter">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Never</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxJumpToFirst">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Never</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboboxMessageBubbles">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">Never</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Show error pad:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Show message bubbles:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Jump to first error or warning:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label10">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"> </property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.MultiTaskProgressDialog" design-size="491 418">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Progress</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <signal name="DeleteEvent" handler="DeleteActivated" />
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.Label" id="title">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Xalign">0</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="progressScroll">
+ <property name="MemberName" />
+ <property name="WidthRequest">400</property>
+ <property name="HeightRequest">150</property>
+ <property name="CanFocus">True</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="progressTreeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Details:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="detailsScroll">
+ <property name="MemberName" />
+ <property name="HeightRequest">120</property>
+ <property name="CanFocus">True</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="detailsTextView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Editable">False</property>
+ <property name="CursorVisible">False</property>
+ <property name="Text" translatable="yes" />
+ <property name="WrapMode">WordChar</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <signal name="Clicked" handler="OnCancel" />
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonClose">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <signal name="Clicked" handler="OnClose" />
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.MultiMessageDialog" design-size="563 346">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolled">
+ <property name="MemberName" />
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="msgBox">
+ <property name="MemberName" />
+ <property name="ShowScrollbars">True</property>
+ <property name="Spacing">12</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Gui.Dialogs.ProgressDialog" design-size="544 170">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp">label</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ProgressBar" id="progressBar">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btnCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <signal name="Clicked" handler="OnBtnCancelClicked" />
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="btnClose">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <signal name="Clicked" handler="OnBtnCloseClicked" />
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Expander" id="expander">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <signal name="Activated" handler="OnExpander1Activated" />
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="HeightRequest">250</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="detailsTextView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="expanderLabel">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Details</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button103">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">0</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CustomCommandWidget" design-size="492 175">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">FocusChangeMask</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Events">EnterNotifyMask, LeaveNotifyMask, FocusChangeMask</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboType">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsTextCombo">True</property>
+ <property name="Items" />
+ <signal name="Changed" handler="OnComboTypeChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="tableData">
+ <property name="MemberName" />
+ <property name="NRows">3</property>
+ <property name="NColumns">3</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryCommand">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryCommandChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorDirectory">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonBrowse">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Browse...</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonBrowseClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" id="tagSelectorCommand">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">2</property>
+ <property name="RightAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Working Directory:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Command:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelName">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="workingdirEntry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnWorkingdirEntryChanged" />
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="boxData">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkExternalCons">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Run on e_xternal console</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCheckExternalConsClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkPauseCons">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Pause _console output</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCheckPauseConsClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CustomCommandPanelWidget" design-size="486 335">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="WidthRequest">470</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">MonoDevelop can execute user specified commands or scripts before, after or as a replacement of common project operations. It is also possible to enter custom commands which will be available in the project or solution menu.</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="HscrollbarPolicy">Never</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="vboxCommands">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CommonAssemblySigningPreferences" design-size="363 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="signAssemblyCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Sign this assembly</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="strongNameFileLabel">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">S_trong Name File:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="strongNameFileEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="delaySignCheckbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Delay sign assembly</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CombineBuildOptionsWidget" design-size="249 74">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox68">
+ <property name="MemberName" />
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label73">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Output Directory</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox46">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label74">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"> </property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ <property name="Padding">6</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.OutputOptionsPanelWidget" design-size="328 168">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox66">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox67">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label93">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Output</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox57">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label91">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox69">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table10">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="assemblyNameEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label98">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Assembly _name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">assemblyNameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label99">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Output _path:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">combo-entry6</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="outputPathEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CombineConfigurationPanelWidget" design-size="402 300">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox74">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox60">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label104">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Select a target configuration for each solution item:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow11">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="configsList">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CombineEntryConfigurationsPanelWidget" design-size="465 331">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox75">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox61">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow12">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="configsList">
+ <property name="MemberName" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox76">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="addButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="copyButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-copy</property>
+ <property name="label">gtk-copy</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="removeButton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="renameButton">
+ <property name="MemberName" />
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Rename</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.NewConfigurationDialog" design-size="407 187">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">New Configuration</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox6">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox77">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">7</property>
+ <child>
+ <widget class="Gtk.Table" id="table1">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboName">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBoxEntry" id="comboPlatform">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Platform:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="createChildrenCheck">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Create configurations for all solution items</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog-action_area6">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="cancelbutton1">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okbutton1">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnOkbutton1Clicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.DeleteConfigDialog" design-size="381 128">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Delete Configuration</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox7">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox64">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Image" id="image6">
+ <property name="MemberName" />
+ <property name="Yalign">0</property>
+ <property name="Pixbuf">stock:gtk-dialog-question Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox80">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label107">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Are you sure you want to delete this configuration?</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="deleteChildrenCheck">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Delete also configurations in solution items</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog-action_area7">
+ <property name="MemberName" />
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button11">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-no</property>
+ <property name="ResponseId">-9</property>
+ <property name="label">gtk-no</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button12">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-yes</property>
+ <property name="ResponseId">-8</property>
+ <property name="label">gtk-yes</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.RuntimeOptionsPanelWidget" design-size="355 180">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox81">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox68">
+ <property name="MemberName" />
+ <property name="Spacing">7</property>
+ <child>
+ <widget class="Gtk.Label" id="label114">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target _framework:</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="runtimeVersionCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CombineInformationWidget" design-size="434 143">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox86">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Table" id="table14">
+ <property name="MemberName" />
+ <property name="NRows">2</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="descLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Description:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">scrolledwindow14</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow14">
+ <property name="MemberName" />
+ <property name="WidthRequest">350</property>
+ <property name="HeightRequest">100</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="descView">
+ <property name="MemberName" />
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="versEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="versLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Version:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">versEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.GeneralProjectOptionsWidget" design-size="561 389">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox40">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox47">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="informationHeaderLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Project Information</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox29">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label55">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox46">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table11">
+ <property name="MemberName" />
+ <property name="NRows">5</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="defaultNamespaceLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Default Namespace:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="descriptionLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">_Description:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">scrolledwindow5</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Entry" id="entryVersion">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSolutionVersion">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Get version from parent solution</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnCheckSolutionVersionClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Version:</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
+ <property name="AutoSize">True</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="nameLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Name:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">projectNameEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="projectDefaultNamespaceEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="TopAttach">3</property>
+ <property name="BottomAttach">4</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="projectNameEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow5">
+ <property name="MemberName" />
+ <property name="WidthRequest">350</property>
+ <property name="HeightRequest">100</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TextView" id="projectDescriptionTextView">
+ <property name="MemberName" />
+ <property name="Text" translatable="yes" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">True</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox41">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="onProjectLoadHeaderLabel">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>On Project Load</b></property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox26">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label49">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="newFilesOnLoadCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Search for new _files on load</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox27">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Label" id="label50">
+ <property name="MemberName" />
+ <property name="WidthRequest">18</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="autoInsertNewFilesCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Automatically _include found files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.BaseDirectoryPanelWidget" design-size="463 44">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes"><b>Location of Files</b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="WidthRequest">12</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Root directory:</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderentry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.StartupOptionsPanelWidget" design-size="458 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioSingle">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Single startup project:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioSingleToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="WidthRequest">12</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboItems">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioMulti">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Multiple startup projects:</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="WidthRequest">12</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeItems">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonUp">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-up</property>
+ <signal name="Clicked" handler="OnButtonUpClicked" />
+ <property name="label">gtk-go-up</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDown">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-down</property>
+ <signal name="Clicked" handler="OnButtonDownClicked" />
+ <property name="label">gtk-go-down</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.RunOptionsPanelWidget" design-size="473 371">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.VBox" id="vbox67">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox69">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Table" id="table10">
+ <property name="MemberName" />
+ <property name="NColumns">2</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label100">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Paramet_ers:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">parametersEntry</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">Fill</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="parametersEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">0</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">False</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="externalConsoleCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Run on e_xternal console</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="pauseConsoleOutputCheckButton">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Pause _console output</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Environment Variables:</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.EnvVarList" id="envVarList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ </widget>
+ <packing>
+ <property name="Position">5</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanelWidget" design-size="527 303">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkAssociateNamespacesDirectories">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Associate namespaces with directory names</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">24</property>
+ <child>
+ <widget class="Gtk.VBox" id="namespaceAssociationBox">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkDefaultAsRoot">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use _default namespace as root</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LabelProp" translatable="yes">Directory structure:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioFlat">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Flat</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioHierarch">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">_Hierarchical</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Frame" id="previewFrame">
+ <property name="MemberName" />
+ <property name="WidthRequest">400</property>
+ <property name="ShadowType">EtchedOut</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Preview</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkVSStyleResourceNames">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes"><b>Use _Visual Studio-style resource names</b>
+Visual Studio generates a default ID for embedded resources,
+instead of simply using the resource's filename.</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="UpdatePolicyNameList" />
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Use _Visual Studio-style resource names</b>
+Visual Studio generates a default ID for embedded resources, instead of simply using the resource's filename.</property>
+ <property name="UseMarkup">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanelWidget" design-size="511 338">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">This is a summary of all file types used in the project or solution:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="boxButtons">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonEdit">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-edit</property>
+ <signal name="Clicked" handler="OnButtonEditClicked" />
+ <property name="label">gtk-edit</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ProjectFileSelectorDialog" design-size="522 416">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Title" translatable="yes">Select Project File...</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">182</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="projectTree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="fileList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="AddFileButton">
+ <property name="MemberName" />
+ <property name="Tooltip" translatable="yes">Add existing files to the project</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-add Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnAddFileButtonClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="typeBox">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File _type:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">fileTypeCombo</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="fileTypeCombo">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.AddMimeTypeDialog" design-size="400 164">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Add File Type</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Enter a file extension or a mime type name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entry">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="Pixbuf">stock:gtk-dialog-error Menu</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="labelDesc">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Components.FolderListSelector" design-size="512 291">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="MonoDevelop.Components.FolderEntry" id="folderentry">
+ <property name="MemberName" />
+ <signal name="PathChanged" handler="OnFolderentryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="dirList">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonAdd">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <signal name="Clicked" handler="OnButtonAddClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <signal name="Clicked" handler="OnButtonRemoveClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonUpdate">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Update</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonUpdateClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonUp">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-up</property>
+ <signal name="Clicked" handler="OnButtonUpClicked" />
+ <property name="label">gtk-go-up</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDown">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-down</property>
+ <signal name="Clicked" handler="OnButtonDownClicked" />
+ <property name="label">gtk-go-down</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.RenameConfigDialog" design-size="371 149">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Rename Configuration</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="vbox78">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox79">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">7</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox63">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label106">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">New name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="nameEntry">
+ <property name="MemberName" />
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="renameChildrenCheck">
+ <property name="MemberName" />
+ <property name="Label" translatable="yes">Rename configurations in all solution items</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="hbuttonbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="button9">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.IncludeNewFilesDialog" design-size="410 323">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="BorderWidth">6</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Choose files to include in the project</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewFiles">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonExcludeAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">_Exclude All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonIncludeAll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">_Include All</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Execution.MonoExecutionParametersPreview" design-size="501 341">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Options Preview</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Modal">True</property>
+ <property name="Buttons">1</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="HscrollbarPolicy">Never</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Label" id="labelOps">
+ <property name="MemberName" />
+ <property name="ShowScrollbars">True</property>
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ <property name="Selectable">True</property>
+ <property name="WidthChars">50</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">1</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-close</property>
+ <property name="ResponseId">-7</property>
+ <property name="label">gtk-close</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Execution.MonoExecutionParametersWidget" design-size="587 403">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="MonoDevelop.Components.PropertyGrid.PropertyGrid" id="propertyGrid">
+ <property name="MemberName" />
+ <property name="ShowToolbar">False</property>
+ <property name="ShowHelp">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonReset">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-clear Menu</property>
+ <property name="Label" translatable="yes">Clear All Options</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonResetClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonPreview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Preview Options</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonPreviewClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.SelectReferenceDialog" design-size="889 551">
+ <property name="MemberName" />
+ <property name="WidthRequest">640</property>
+ <property name="HeightRequest">520</property>
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Edit References</property>
+ <property name="TypeHint">Dialog</property>
+ <property name="BorderWidth">6</property>
+ <property name="DestroyWithParent">True</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog-vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">12</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">590</property>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="RightPadding">3</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ <property name="Shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment2">
+ <property name="MemberName" />
+ <property name="LeftPadding">3</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxRefs">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.Alignment" id="selectedHeader">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label114">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Selected references:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="RemoveReferenceButton">
+ <property name="MemberName" />
+ <property name="Tooltip">Remove</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-delete Menu</property>
+ <property name="Label" />
+ <property name="UseUnderline">True</property>
+ <property name="FocusOnClick">False</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="RemoveReference" />
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="HeightRequest">150</property>
+ <property name="Spacing">12</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="ReferencesTreeView">
+ <property name="MemberName" />
+ <property name="HeadersVisible">False</property>
+ <signal name="KeyReleaseEvent" handler="OnReferencesTreeViewKeyReleaseEvent" />
+ <signal name="RowActivated" handler="OnReferencesTreeViewRowActivated" />
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Shrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog-action_area2">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="cancelbutton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="okbutton">
+ <property name="MemberName" />
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.StringTagSelectorButton" design-size="27 27">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.Button" id="button">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">Custom</property>
+ <signal name="Clicked" handler="OnButtonClicked" />
+ <child>
+ <widget class="Gtk.Arrow" id="arrow1">
+ <property name="MemberName" />
+ <property name="ArrowType">Down</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Fonts.FontChooserPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">_Fonts:</property>
+ <property name="UseUnderline">True</property>
+ <property name="MnemonicWidget">treeview1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeviewFonts">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.NewPolicySetDialog" design-size="429 200">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">New Policy</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Policy Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Copy Settings From:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="comboSets">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ExportProjectPolicyDialog" design-size="476 321">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Export Policies</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">16</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCustom">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Save project policies as a new custom policy set</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioCustomToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxCustom">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="WidthChars">40</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Export policies to a file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxFile">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileEntry">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelChangesTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Policies to export:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="policiesScroll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Export policies</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ApplyPolicyDialog" design-size="475 325">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Apply Policies</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">16</property>
+ <property name="BorderWidth">12</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCustom">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Apply stock or custom policy set</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <signal name="Toggled" handler="OnRadioCustomToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxCustom">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Policy:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="combPolicies">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ <signal name="Changed" handler="OnCombPoliciesChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioFile">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Apply policies from file</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="boxFile">
+ <property name="MemberName" />
+ <property name="LeftPadding">42</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label3">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">File:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Components.FileEntry" id="fileEntry">
+ <property name="MemberName" />
+ <property name="BrowserTitle">Select Policy Set File</property>
+ <signal name="PathChanged" handler="OnFileEntryPathChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelChangesTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Policies to set or replace:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="policiesScroll">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">_Apply policies</property>
+ <property name="UseUnderline">True</property>
+ <property name="ResponseId">-1</property>
+ <signal name="Clicked" handler="OnButtonOkClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ProjectSelectorDialog" design-size="492 466">
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTitle">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select a project or solution:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" id="selector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="ShowCheckboxes">False</property>
+ <property name="CascadeCheckboxSelection">False</property>
+ <signal name="SelectionChanged" handler="OnSelectorSelectionChanged" />
+ <signal name="ActiveChanged" handler="OnSelectorActiveChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ImportProjectPolicyDialog" design-size="501 447">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Policy Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ <signal name="Changed" handler="OnEntryNameChanged" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label8">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Select the project or solution from which to import the policies:</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="MonoDevelop.Ide.Gui.Components.ProjectSelectorWidget" id="selector">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="ShowCheckboxes">False</property>
+ <property name="CascadeCheckboxSelection">False</property>
+ <signal name="SelectionChanged" handler="OnSelectorSelectionChanged" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.ProgressMonitoring.ProgressBarMonitor" design-size="300 28">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">3</property>
+ <child>
+ <widget class="Gtk.ProgressBar" id="progressBar">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-cancel Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.AddExternalFileDialog" design-size="536 286">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Add File to Folder</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image23">
+ <property name="MemberName" />
+ <property name="Pixbuf">stock:gtk-dialog-question Dialog</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">18</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTitle">
+ <property name="MemberName" />
+ <property name="WidthRequest">450</property>
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">The file {0} is outside the target directory. What would you like to do?</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="alignment1">
+ <property name="MemberName" />
+ <property name="LeftPadding">20</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioKeep">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.Label" id="labelKeep">
+ <property name="MemberName" />
+ <property name="WidthRequest">376</property>
+ <property name="LabelProp" translatable="yes"><b>Keep</b> the file in its the current subdirectory ({0})</property>
+ <property name="UseMarkup">True</property>
+ <property name="Wrap">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioCopy">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Copy</b> the file to the directory</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioMove">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Move</b> the file to the directory</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="radioLink">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes" />
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">False</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ <child>
+ <widget class="Gtk.Label" id="label6">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Add a link</b> to the file</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkApplyAll">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Use the same action for all selected files</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">11</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Gui.Components.PriorityList" design-size="429 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="controls">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonUp">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-up</property>
+ <signal name="Clicked" handler="OnButtonUpClicked" />
+ <property name="label">gtk-go-up</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDown">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-go-down</property>
+ <signal name="Clicked" handler="OnButtonDownClicked" />
+ <property name="label">gtk-go-down</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="MonoDevelop.Ide.Projects.OptionPanels.PortableRuntimeOptionsPanelWidget" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="labelTargetFrameworks">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">Target Frameworks:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Over.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Over.png
new file mode 100644
index 0000000..b81bad4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Over.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.Over.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.Over.png
new file mode 100644
index 0000000..b5c1570
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.Over.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.png
new file mode 100644
index 0000000..bb21852
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.Selected.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.png
new file mode 100644
index 0000000..bb21852
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Close.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.DefaultPropertyTab.bmp b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.DefaultPropertyTab.bmp
new file mode 100644
index 0000000..27e525a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.DefaultPropertyTab.bmp differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.EventPropertyTab.bmp b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.EventPropertyTab.bmp
new file mode 100644
index 0000000..49b40fd
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.EventPropertyTab.bmp differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.SortByCat.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.SortByCat.png
new file mode 100755
index 0000000..5c28dc9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons-components.MonoDevelop.Components.PropertyGrid.SortByCat.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.ExecutionMarker.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.ExecutionMarker.png
new file mode 100644
index 0000000..ac0c51a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.ExecutionMarker.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.add-namespace-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.add-namespace-16.png
new file mode 100644
index 0000000..46da2c1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.add-namespace-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.assembly-project-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.assembly-project-16.png
new file mode 100644
index 0000000..00b7896
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.assembly-project-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.balloon.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.balloon.png
new file mode 100755
index 0000000..00dd28b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.balloon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-next-normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-next-normal.png
new file mode 100644
index 0000000..621c63f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-next-normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-prev-normal.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-prev-normal.png
new file mode 100644
index 0000000..a56a3fd
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breadcrumb-prev-normal.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-16.png
new file mode 100755
index 0000000..beb2ba2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disable-all-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disable-all-16.png
new file mode 100644
index 0000000..e3aed13
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disable-all-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disabled-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disabled-16.png
new file mode 100644
index 0000000..8cf1257
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-disabled-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-invalid-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-invalid-16.png
new file mode 100644
index 0000000..2099ced
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-invalid-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-new-16.png
new file mode 100644
index 0000000..0dda361
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-on-off-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-on-off-16.png
new file mode 100644
index 0000000..972cb77
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-on-off-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-remove-all-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-remove-all-16.png
new file mode 100644
index 0000000..dc112fe
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.breakpoint-remove-all-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.broom-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.broom-16.png
new file mode 100755
index 0000000..96d8cf8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.broom-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-error-icon.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-error-icon.png
new file mode 100644
index 0000000..49af322
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-error-icon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-warning-icon.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-warning-icon.png
new file mode 100644
index 0000000..566ffdf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.bubble-warning-icon.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-16.png
new file mode 100644
index 0000000..ce7c26e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-22.png
new file mode 100644
index 0000000..fa985a0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-project-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-16.png
new file mode 100644
index 0000000..e92f7e2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-22.png
new file mode 100644
index 0000000..88ea0ba
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.build-solution-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.chain-overlay-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.chain-overlay-16.png
new file mode 100644
index 0000000..c324312
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.chain-overlay-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-16.png
new file mode 100644
index 0000000..e66d664
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-22.png
new file mode 100644
index 0000000..5b12f2b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.clear-all-bookmarks-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-all-documents-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-all-documents-16.png
new file mode 100644
index 0000000..2b4c247
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-all-documents-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-solution-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-solution-16.png
new file mode 100644
index 0000000..68281f9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.close-solution-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-folder-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-folder-16.png
new file mode 100755
index 0000000..069ddf2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-folder-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-resource-folder-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-resource-folder-16.png
new file mode 100644
index 0000000..87ff120
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.closed-resource-folder-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-16.png
new file mode 100644
index 0000000..27e2751
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-24.png
new file mode 100644
index 0000000..a6114ac
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.code-template-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.command.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.command.png
new file mode 100644
index 0000000..8cde617
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.command.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.comment.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.comment.png
new file mode 100755
index 0000000..1502c80
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.comment.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-16.png
new file mode 100644
index 0000000..b78f93e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-24.png
new file mode 100644
index 0000000..26447f4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.compiler-options-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.console-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.console-16.png
new file mode 100755
index 0000000..e773d06
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.console-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-16.png
new file mode 100644
index 0000000..8cde617
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-24.png
new file mode 100644
index 0000000..a37de30
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.custom-commands-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-down.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-down.png
new file mode 100644
index 0000000..0fb46cc
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-down.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-up.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-up.png
new file mode 100644
index 0000000..025424e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.disclose-arrow-up.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.drive-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.drive-16.png
new file mode 100755
index 0000000..b682246
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.drive-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-16.png
new file mode 100644
index 0000000..6272944
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-24.png
new file mode 100644
index 0000000..6bf0caf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-find-next-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all.png
new file mode 100644
index 0000000..f4b0b19
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all_22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all_22.png
new file mode 100644
index 0000000..e6331c6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.edit-select-all_22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-class-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-class-16.png
new file mode 100644
index 0000000..d12ae36
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-class-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-delegate-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-delegate-16.png
new file mode 100644
index 0000000..f7cef7f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-delegate-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-enumeration-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-enumeration-16.png
new file mode 100644
index 0000000..de1e5d2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-enumeration-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-event-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-event-16.png
new file mode 100644
index 0000000..f8af222
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-event-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-extensionmethod-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-extensionmethod-16.png
new file mode 100644
index 0000000..022c06a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-extensionmethod-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-field-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-field-16.png
new file mode 100644
index 0000000..09bc634
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-field-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-interface-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-interface-16.png
new file mode 100644
index 0000000..f367572
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-interface-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-literal-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-literal-16.png
new file mode 100644
index 0000000..16a4fc7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-literal-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-16.png
new file mode 100644
index 0000000..82b48fb
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-new-16.png
new file mode 100644
index 0000000..18462cd
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-method-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-namespace-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-namespace-16.png
new file mode 100644
index 0000000..f2ad178
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-namespace-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-property-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-property-16.png
new file mode 100644
index 0000000..6afb028
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-property-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-structure-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-structure-16.png
new file mode 100644
index 0000000..770200a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.element-structure-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-16.png
new file mode 100644
index 0000000..a6ef313
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-16.png
new file mode 100644
index 0000000..8cde617
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-22.png
new file mode 100644
index 0000000..8cde617
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-category-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-file-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-file-32.png
new file mode 100644
index 0000000..a9de7cb
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.empty-file-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.error-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.error-16.png
new file mode 100755
index 0000000..91f8553
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.error-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.errors-pad.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.errors-pad.png
new file mode 100644
index 0000000..104a6b0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.errors-pad.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-addin-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-addin-16.png
new file mode 100644
index 0000000..baf4d5c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-addin-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-class-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-class-32.png
new file mode 100644
index 0000000..38ea621
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-class-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-enum-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-enum-32.png
new file mode 100644
index 0000000..50b430e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-enum-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-interface-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-interface-32.png
new file mode 100644
index 0000000..f067bc3
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-interface-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-struct-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-struct-32.png
new file mode 100644
index 0000000..3f720fe
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-struct-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-16.png
new file mode 100644
index 0000000..106f6f6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-32.png
new file mode 100644
index 0000000..2c8d1d7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.file-xml-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.find-in-files-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.find-in-files-16.png
new file mode 100644
index 0000000..c8fbe69
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.find-in-files-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-new-16.png
new file mode 100644
index 0000000..426e6e9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-overlay-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-overlay-16.png
new file mode 100644
index 0000000..6c0dd9b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.folder-overlay-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-16.png
new file mode 100644
index 0000000..e756df0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-24.png
new file mode 100644
index 0000000..30e521f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.formatting-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.gnome-fs-regular.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.gnome-fs-regular.png
new file mode 100644
index 0000000..b7cc851
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.gnome-fs-regular.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-16.png
new file mode 100644
index 0000000..f4f101c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-22.png
new file mode 100644
index 0000000..56bf42c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-next-bookmark-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-16.png
new file mode 100644
index 0000000..5fc1e5a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-22.png
new file mode 100644
index 0000000..160fd3d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.goto-prev-bookmark-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hammer-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hammer-16.png
new file mode 100755
index 0000000..970bdaa
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hammer-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-active.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-active.png
new file mode 100644
index 0000000..bf56fa3
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-active.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-down.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-down.png
new file mode 100644
index 0000000..133391f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-down.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-up.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-up.png
new file mode 100644
index 0000000..9d78dc9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.hicolor_status_16x16_pin-up.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-16.png
new file mode 100755
index 0000000..8b9c740
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-22.png
new file mode 100755
index 0000000..91d50c8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyboard-shortcuts-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyword-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyword-16.png
new file mode 100644
index 0000000..62a4abb
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.keyword-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.letters-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.letters-16.png
new file mode 100755
index 0000000..8f22ae6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.letters-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.locale_16x16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.locale_16x16.png
new file mode 100644
index 0000000..22b7913
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.locale_16x16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.magnify-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.magnify-16.png
new file mode 100755
index 0000000..5389af4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.magnify-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-16.png
new file mode 100755
index 0000000..f1ee975
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-24.png
new file mode 100644
index 0000000..4d2363d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.markers-rulers-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.misc-files-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.misc-files-16.png
new file mode 100644
index 0000000..a0cc462
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.misc-files-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monkey-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monkey-16.png
new file mode 100755
index 0000000..df60d4d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monkey-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.mono-powered.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.mono-powered.png
new file mode 100644
index 0000000..3e5c982
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.mono-powered.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-16.png
new file mode 100644
index 0000000..3c7a971
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-22.png
new file mode 100644
index 0000000..ddded6d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-32.png
new file mode 100644
index 0000000..e962101
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-48.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-48.png
new file mode 100644
index 0000000..fc88718
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.monodevelop-48.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-16.png
new file mode 100644
index 0000000..ea29532
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-24.png
new file mode 100644
index 0000000..bd71d1e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-next-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-16.png
new file mode 100644
index 0000000..d00ac80
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-24.png
new file mode 100644
index 0000000..3deb9b7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.navigate-previous-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-folder-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-folder-16.png
new file mode 100755
index 0000000..069ddf2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-folder-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-project-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-project-16.png
new file mode 100644
index 0000000..ab2df5e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-project-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-resource-folder-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-resource-folder-16.png
new file mode 100644
index 0000000..87ff120
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.open-resource-folder-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.output-icon-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.output-icon-16.png
new file mode 100644
index 0000000..7ae1f7a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.output-icon-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic.png
new file mode 100644
index 0000000..c6e58ae
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_22.png
new file mode 100644
index 0000000..dc76287
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_32.png
new file mode 100644
index 0000000..26cdd5d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.package-x-generic_32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-16.png
new file mode 100755
index 0000000..ad07d67
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-24.png
new file mode 100644
index 0000000..770b193
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pad-task-list-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.parsing.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.parsing.png
new file mode 100644
index 0000000..6b87d3e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.parsing.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pindown.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pindown.png
new file mode 100644
index 0000000..3a7e171
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pindown.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pinup.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pinup.png
new file mode 100755
index 0000000..947c1a7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.pinup.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-16.png
new file mode 100644
index 0000000..e2fb70d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-22.png
new file mode 100644
index 0000000..0d01ec4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-32.png
new file mode 100644
index 0000000..45bcfec
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.plugin-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-16.png
new file mode 100644
index 0000000..6e4c25c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-32.png
new file mode 100644
index 0000000..e38cc45
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-console-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-console-32.png
new file mode 100644
index 0000000..0d81698
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-console-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-gui-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-gui-32.png
new file mode 100644
index 0000000..5b18112
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-gui-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-item-group-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-item-group-16.png
new file mode 100644
index 0000000..87ff120
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-item-group-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-library-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-library-32.png
new file mode 100644
index 0000000..6328e11
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-library-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-new-16.png
new file mode 100644
index 0000000..99022e5
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-overlay-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-overlay-16.png
new file mode 100644
index 0000000..7510288
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-overlay-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-reference-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-reference-16.png
new file mode 100644
index 0000000..9720bf8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.project-reference-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.remove-namespace-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.remove-namespace-16.png
new file mode 100644
index 0000000..518e9ab
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.remove-namespace-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.replace-in-files-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.replace-in-files-16.png
new file mode 100644
index 0000000..a7d9b56
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.replace-in-files-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-16.png
new file mode 100644
index 0000000..d49309c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-32.png
new file mode 100644
index 0000000..57f314e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.resource-file-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-16.png
new file mode 100644
index 0000000..16a2642
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-24.png
new file mode 100644
index 0000000..3639d80
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.save-all-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sdk-locations-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sdk-locations-16.png
new file mode 100755
index 0000000..12f988e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sdk-locations-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-clear-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-clear-16.png
new file mode 100644
index 0000000..e44af16
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-clear-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-search-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-search-16.png
new file mode 100644
index 0000000..60c3ef6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.searchbox-search-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.software-update-available.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.software-update-available.png
new file mode 100755
index 0000000..e6740e0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.software-update-available.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-16.png
new file mode 100644
index 0000000..9715a88
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-32.png
new file mode 100644
index 0000000..6c1a34f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-closed-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-closed-16.png
new file mode 100644
index 0000000..347c307
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-closed-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-new-16.png
new file mode 100644
index 0000000..347c30e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-open-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-open-16.png
new file mode 100644
index 0000000..347c307
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-folder-open-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-new-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-new-16.png
new file mode 100644
index 0000000..deb9e85
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.solution-new-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sort-namespace-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sort-namespace-16.png
new file mode 100644
index 0000000..0ec3b9a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.sort-namespace-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.split-window-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.split-window-16.png
new file mode 100755
index 0000000..d184341
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.split-window-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.static-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.static-16.png
new file mode 100644
index 0000000..cff99cf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.static-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-01.png
new file mode 100644
index 0000000..7953234
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-02.png
new file mode 100644
index 0000000..f51714b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-03.png
new file mode 100644
index 0000000..165869f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-04.png
new file mode 100644
index 0000000..b6ccbaf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-05.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-05.png
new file mode 100644
index 0000000..886e047
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusBuild-05.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-01.png
new file mode 100644
index 0000000..992c7b2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-02.png
new file mode 100644
index 0000000..8419f4e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-03.png
new file mode 100644
index 0000000..53546c8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-04.png
new file mode 100644
index 0000000..c71e183
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-05.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-05.png
new file mode 100644
index 0000000..3ccd892
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-05.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-06.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-06.png
new file mode 100644
index 0000000..2e4b88a
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusConnecting-06.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusError.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusError.png
new file mode 100644
index 0000000..221efe1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusError.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-01.png
new file mode 100644
index 0000000..a556ea6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-02.png
new file mode 100644
index 0000000..76de0c8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-03.png
new file mode 100644
index 0000000..da48e21
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-04.png
new file mode 100644
index 0000000..d666915
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-05.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-05.png
new file mode 100644
index 0000000..3b6fc37
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-05.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-06.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-06.png
new file mode 100644
index 0000000..9321474
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusOpen-06.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-01.png
new file mode 100644
index 0000000..9977600
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-02.png
new file mode 100644
index 0000000..5ff169b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-03.png
new file mode 100644
index 0000000..610e641
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-04.png
new file mode 100644
index 0000000..a8c69ff
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-05.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-05.png
new file mode 100644
index 0000000..450fcf9
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-05.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-06.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-06.png
new file mode 100644
index 0000000..07fe6bc
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPull-06.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-01.png
new file mode 100644
index 0000000..7407c22
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-02.png
new file mode 100644
index 0000000..bedfdab
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-03.png
new file mode 100644
index 0000000..e5493e3
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-04.png
new file mode 100644
index 0000000..457e54e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-05.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-05.png
new file mode 100644
index 0000000..026d579
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-05.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-06.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-06.png
new file mode 100644
index 0000000..5bc21e2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusPush-06.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-01.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-01.png
new file mode 100644
index 0000000..13c0840
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-01.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-02.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-02.png
new file mode 100644
index 0000000..5e890e5
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-02.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-03.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-03.png
new file mode 100644
index 0000000..51ff9ec
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-03.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-04.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-04.png
new file mode 100644
index 0000000..ac74c2b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSearch-04.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSteady.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSteady.png
new file mode 100644
index 0000000..40c677c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSteady.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSuccess.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSuccess.png
new file mode 100644
index 0000000..36c584c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusSuccess.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusWarning.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusWarning.png
new file mode 100644
index 0000000..e5b57cf
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.statusWarning.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.stop-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.stop-16.png
new file mode 100755
index 0000000..5f6492b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.stop-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-16.png
new file mode 100644
index 0000000..449f0f7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-24.png
new file mode 100644
index 0000000..47a2965
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.syntax-highlighting-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-file-manager.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-file-manager.png
new file mode 100644
index 0000000..60cade4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-file-manager.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update.png
new file mode 100644
index 0000000..9f019ac
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update_22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update_22.png
new file mode 100644
index 0000000..5f7a362
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.system-software-update_22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-next.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-next.png
new file mode 100644
index 0000000..295156e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-next.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-popdown.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-popdown.png
new file mode 100644
index 0000000..7604d1e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-popdown.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-prev.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-prev.png
new file mode 100644
index 0000000..213416e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tabbar-prev.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-16.png
new file mode 100644
index 0000000..a29a09c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-surroundwith-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-surroundwith-16.png
new file mode 100644
index 0000000..a29a09c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.template-surroundwith-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-16.png
new file mode 100644
index 0000000..188e1c1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-22.png
new file mode 100644
index 0000000..c3d245d
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-16.png
new file mode 100644
index 0000000..007ab18
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-24.png
new file mode 100644
index 0000000..61abb6e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-editor-behavior-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-16.png
new file mode 100644
index 0000000..2d7f2d6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-32.png
new file mode 100644
index 0000000..a9de7cb
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-file-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-quickfix-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-quickfix-16.png
new file mode 100755
index 0000000..5f0e34f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.text-quickfix-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tip-of-the-day-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tip-of-the-day-16.png
new file mode 100755
index 0000000..d738233
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tip-of-the-day-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-16.png
new file mode 100644
index 0000000..bd2686e
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-22.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-22.png
new file mode 100644
index 0000000..101a95f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toggle-bookmark-22.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-pauseButton.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-pauseButton.png
new file mode 100644
index 0000000..dba25c1
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-pauseButton.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-runButton.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-runButton.png
new file mode 100644
index 0000000..333a35c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-runButton.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-skipButton.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-skipButton.png
new file mode 100644
index 0000000..6029867
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-skipButton.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepInButton.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepInButton.png
new file mode 100644
index 0000000..2cf2322
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepInButton.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepOutButton.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepOutButton.png
new file mode 100644
index 0000000..f24eea2
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.toolbar-stepOutButton.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-16.png
new file mode 100755
index 0000000..fe84285
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-24.png
new file mode 100644
index 0000000..40d2c21
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tools-external-tools-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-down.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-down.png
new file mode 100644
index 0000000..0ab0830
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-down.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-hover.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-hover.png
new file mode 100644
index 0000000..d8a6d7b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button-hover.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button.png
new file mode 100644
index 0000000..49b82d3
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.tree-popup-button.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.uncomment.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.uncomment.png
new file mode 100644
index 0000000..8f04020
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.uncomment.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.user-package.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.user-package.png
new file mode 100644
index 0000000..1c4a51c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.user-package.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.variable-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.variable-16.png
new file mode 100644
index 0000000..43023b0
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.variable-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.view-message-log-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.view-message-log-16.png
new file mode 100755
index 0000000..7b40e6c
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.view-message-log-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-InternalAndProtected-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-InternalAndProtected-16.png
new file mode 100644
index 0000000..e3baaa6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-InternalAndProtected-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-ProtectedOrInternal-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-ProtectedOrInternal-16.png
new file mode 100644
index 0000000..97fd1a4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-ProtectedOrInternal-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-internal-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-internal-16.png
new file mode 100644
index 0000000..97fd1a4
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-internal-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-private-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-private-16.png
new file mode 100644
index 0000000..ed4e2fb
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-private-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-protected-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-protected-16.png
new file mode 100644
index 0000000..12f2c79
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visibility-protected-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-studio.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-studio.png
new file mode 100644
index 0000000..633da4b
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-studio.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-16.png
new file mode 100755
index 0000000..0476be6
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-24.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-24.png
new file mode 100755
index 0000000..01bcb61
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.visual-style-24.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-16.png
new file mode 100755
index 0000000..21fd8f7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-overlay.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-overlay.png
new file mode 100644
index 0000000..b199b78
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.warning-overlay.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-16.png
new file mode 100644
index 0000000..39a27e7
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-32.png
new file mode 100644
index 0000000..621a6a8
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-overlay-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-search-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-search-16.png
new file mode 100755
index 0000000..2cef329
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.web-search-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-16.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-16.png
new file mode 100644
index 0000000..138b26f
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-16.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-32.png b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-32.png
new file mode 100644
index 0000000..2cc41ee
Binary files /dev/null and b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.icons.workspace-32.png differ
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeEmacs.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeEmacs.xml
new file mode 100644
index 0000000..ff4cfaa
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeEmacs.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<scheme version="1.0">
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Copy" shortcut="Alt+W" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Cut" shortcut="Control+W" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.IndentSelection" shortcut="Control+X|Tab" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" shortcut="Control+X|Control+L" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Paste" shortcut="Control+Y" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Redo" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.SelectAll" shortcut="Control+X|H" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Undo" shortcut="Control+_" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.UnIndentSelection" shortcut="Control+X|Shift+Tab" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.UppercaseSelection" shortcut="Control+X|Control+U" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.CloseFile" shortcut="Control+X|K" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.Exit" shortcut="Control+X|Control+C" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.NewFile" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.OpenFile" shortcut="Control+X|Control+F" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.ReloadFile" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.Save" shortcut="Control+X|Control+S" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAll" shortcut="Control+X|S" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAs" shortcut="Control+X|Control+W" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.Find" shortcut="Control+S" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.Replace" shortcut="Alt+%" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.CharLeft" shortcut="Control+B" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.CharRight" shortcut="Control+F" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLeftChar" shortcut="Control+H" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine" shortcut="Control+U" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteRightChar" shortcut="Control+D" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.LineDown" shortcut="Control+N" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.LineEnd" shortcut="Control+E" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.LineStart" shortcut="Control+A" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.LineUp" shortcut="Control+P" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.PageDown" shortcut="Control+X|]" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.PageUp" shortcut="Control+X|[" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SplitWindowHorizontally" shortcut="Control+X|2" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SplitWindowVertically" shortcut="Control+X|3" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" shortcut="Control+X|o" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.GotoLineNumber" shortcut="Control+X|G" />
+ <binding command="MonoDevelop.ChangeLogAddIn.ChangeLogCommands.InsertEntry" shortcut="Alt+N" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.PrintDocument" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.GotoMatchingBrace" shortcut="Control+]" />
+</scheme>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop1.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop1.xml
new file mode 100644
index 0000000..9be0858
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<scheme version="1.0">
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.Redo" shortcut="Control+Y" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.ReloadFile" shortcut="Control+U" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.FindNext" shortcut="F3" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.FindPrevious" shortcut="Shift+F3" />
+</scheme>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop2.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop2.xml
new file mode 100644
index 0000000..2ddbb64
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeMonoDevelop2.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<scheme version="1.0">
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.Debug" shortcut="F5" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.Run" shortcut="Control+F5" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.ClearBookmarks" shortcut="Control+M|C" />
+ <binding command="Pad|MonoDevelop.Debugger.BreakpointPad" shortcut="Control+D|B" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.Debug" shortcut="F5" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.StepInto" shortcut="F11" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.StepOver" shortcut="F10" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.StepOut" shortcut="Shift+F11" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.NextBookmark" shortcut="Control+M|N" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.PrevBookmark" shortcut="Control+M|P" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.ToggleBookmark" shortcut="Control+M|T" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" shortcut="Control+L" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.ErrorListPad" shortcut="Alt+Shift+E" />
+ <binding command="Pad|MonoDevelop.Debugger.LocalsPad" shortcut="Control+D|L" />
+ <binding command="Pad|MonoDevelop.Debugger.StackTracePad" shortcut="Control+D|C" />
+ <binding command="Pad|MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator" shortcut="Control+D|Q" />
+ <binding command="Pad|MonoDevelop.Debugger.WatchPad" shortcut="Control+D|W" />
+ <binding command="Pad|ClassPad" shortcut="Alt+Shift+C" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.PropertyPad" shortcut="Alt+Shift+P" />
+ <binding command="Pad|ProjectPad" shortcut="Alt+Shift+S" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.TaskListPad" shortcut="Alt+Shift+T" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.ToolboxPad" shortcut="Alt+Shift+B" />
+ <binding command="Pad|ConnectionManagerPad" shortcut="Alt+Shift+D" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.HelpTree" shortcut="Alt+Shift+F1" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.DocumentOutlinePad" shortcut="Control+R|U" />
+</scheme>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeVisualStudio.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeVisualStudio.xml
new file mode 100644
index 0000000..5946730
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.options.KeyBindingSchemeVisualStudio.xml
@@ -0,0 +1,58 @@
+<scheme version="1.0">
+ <binding command="MonoDevelop.Ide.Commands.DebugCommands.Pause" shortcut="Control+F8" />
+ <binding command="MonoDevelop.Ide.Commands.DebugCommands.StepInto" shortcut="F11" />
+ <binding command="MonoDevelop.Ide.Commands.DebugCommands.StepOut" shortcut="Shift+F11" />
+ <binding command="MonoDevelop.Ide.Commands.DebugCommands.StepOver" shortcut="F10" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" shortcut="Control+U" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.CloseFile" shortcut="Control+F4" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAll" shortcut="Control+Shift+S" />
+ <binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAs" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.NavigationCommands.NavigateBack" shortcut="Control+-" />
+ <binding command="MonoDevelop.Ide.Commands.NavigationCommands.NavigateForward" shortcut="Control+Shift+-" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.Build" shortcut="Shift+F6" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.BuildSolution" shortcut="F6" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.Debug" shortcut="F5" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.RebuildSolution" shortcut="Control+Alt+F7" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.Run" shortcut="Control+F5" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.FindNext" shortcut="F3" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.FindPrevious" shortcut="Shift+F3" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.ReplaceInFiles" shortcut="Control+Shift+H" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.ClearBookmarks" shortcut="Control+B|C" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.GotoLineNumber" shortcut="Control+G" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.GotoMatchingBrace" shortcut="Control+]" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.FoldDefinitions" shortcut="Control+M|Control+O" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleAllFoldings" shortcut="Control+M|Control+L" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleFolding" shortcut="Control+M|Control+M" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" shortcut="Control+K|Control+C" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" shortcut="Control+Shift+A" />
+ <binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddItem" shortcut="Alt+Shift+A" />
+ <binding command="MonoDevelop.Ide.Commands.ViewCommands.ShowNext" shortcut="F8" />
+ <binding command="MonoDevelop.Ide.Commands.ViewCommands.ShowPrevious" shortcut="Shift+F8" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.GotoType" shortcut="Control+K|Control+V" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" shortcut="" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.Debug" shortcut="F5" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.StepInto" shortcut="F11" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.StepOver" shortcut="F10" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteToLineEnd" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine" shortcut="Control+L" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.ErrorListPad" shortcut="Control+W|E" />
+ <binding command="Pad|MonoDevelop.Debugger.LocalsPad" shortcut="Control+D|L" />
+ <binding command="Pad|MonoDevelop.Debugger.StackTracePad" shortcut="Control+D|C" />
+ <binding command="Pad|MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator" shortcut="Control+D|Q" />
+ <binding command="Pad|MonoDevelop.Debugger.WatchPad" shortcut="Control+D|W" />
+ <binding command="Pad|ClassPad" shortcut="Control+W|C" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.PropertyPad" shortcut="Control+W|P" />
+ <binding command="Pad|ProjectPad" shortcut="Control+W|S" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.TaskListPad" shortcut="Control+W|T" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.ToolboxPad" shortcut="Control+W|X" />
+ <binding command="Pad|ConnectionManagerPad" shortcut="Alt+Shift+D" />
+ <binding command="Pad|MonoDevelop.Ide.Gui.Pads.HelpTree" shortcut="Control+W|F1" />
+ <binding command="Pad|OutputPad-MonoDevelop.Ide.ApplicationOutput-0" shortcut="Control+W|O" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.NextBookmark" shortcut="Control+B|N" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.PrevBookmark" shortcut="Control+B|P" />
+ <binding command="MonoDevelop.Ide.Commands.SearchCommands.ToggleBookmark" shortcut="Control+B|T" />
+ <binding command="Pad|MonoDevelop.DesignerSupport.DocumentOutlinePad" shortcut="Control+W|U" />
+ <binding command="MonoDevelop.Ide.Commands.ViewCommands.ZoomIn" shortcut="Control+Alt++" />
+ <binding command="MonoDevelop.Ide.Commands.ViewCommands.ZoomOut" shortcut="Control+Alt+-" />
+ <binding command="MonoDevelop.Refactoring.RefactoryCommands.QuickFix" shortcut="Control+." />
+</scheme>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.AppConfigFile.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.AppConfigFile.xft.xml
new file mode 100644
index 0000000..a13afa6
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.AppConfigFile.xft.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Template Originator="Fawad Halim" Language="XML" Created="10/14/2004" LastModified="05/01/2013">
+
+ <TemplateConfiguration>
+ <_Name>Application Configuration File</_Name>
+ <Icon>md-text-file-icon</Icon>
+ <_Category>Misc</_Category>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a .NET application configuration file.</_Description>
+ <DefaultFilename>app</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".config">
+ <![CDATA[<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+</configuration>]]>
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.BlankCombine.xpt.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.BlankCombine.xpt.xml
new file mode 100644
index 0000000..897815d
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.BlankCombine.xpt.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<Template originator = "Mike Krueger"
+ created = "07/06/2001"
+ lastModified = "07/01/2004">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Blank Solution</_Name>
+ <_Category>Other</_Category>
+ <Icon>md-solution</Icon>
+ <LanguageName/>
+ <_Description>A blank solution</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = "."/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyClass.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyClass.xft.xml
new file mode 100644
index 0000000..e97e5a5
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyClass.xft.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<Template Originator="Lluis Sanchez" Created="3/09/2001" LastModified="3/09/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty Class</_Name>
+ <Icon>md-class-file</Icon>
+ <_Category>General</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an empty class.</_Description>
+ <DefaultFilename>EmptyClass</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <CodeDomFile DefaultName="EmptyClass">
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsClass="true" Attributes="Public">
+ <Members>
+ <Constructor Attributes="Public" />
+ </Members>
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+ </CodeDomFile>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyEnum.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyEnum.xft.xml
new file mode 100644
index 0000000..10a7086
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyEnum.xft.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template Originator="John Luke" Created="12/16/2005" LastModified="12/16/2005">
+
+ <TemplateConfiguration>
+ <_Name>Empty Enumeration</_Name>
+ <Icon>md-enum-file</Icon>
+ <_Category>General</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an empty enum.</_Description>
+ <DefaultFilename>EmptyEnumeration</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <CodeDomFile DefaultName="EmptyEnumeration">
+
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsEnum="true">
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+
+ </CodeDomFile>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyHTMLFile.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyHTMLFile.xft.xml
new file mode 100644
index 0000000..f042d43
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyHTMLFile.xft.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Krueger" Language="HTML" Created="6/10/2001" LastModified="6/10/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty HTML File</_Name>
+ <Icon>md-html-file-icon</Icon>
+ <_Category>Web</_Category>
+ <_Description>Creates an empty HTML file.</_Description>
+ <DefaultFilename>EmptyHtmlFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".html"><![CDATA[
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ </body>
+</html>]]>
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyInterface.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyInterface.xft.xml
new file mode 100644
index 0000000..d8a8890
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyInterface.xft.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template Originator="John Luke" Created="12/16/2005" LastModified="12/16/2005">
+
+ <TemplateConfiguration>
+ <_Name>Empty Interface</_Name>
+ <Icon>md-interface-file</Icon>
+ <_Category>General</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an empty interface.</_Description>
+ <DefaultFilename>EmptyInterface</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <CodeDomFile DefaultName="EmptyInterface">
+
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsInterface="true">
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+
+ </CodeDomFile>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyResourceFile.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyResourceFile.xft.xml
new file mode 100644
index 0000000..b221cad
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyResourceFile.xft.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Krueger" Language="ResourceFiles" Created="6/10/2001" LastModified="6/10/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty Resource File</_Name>
+ <Icon>md-resource-file-icon</Icon>
+ <_Category>Misc</_Category>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates an empty resource file.</_Description>
+ <DefaultFilename>EmptyResourcefile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <ProjectResource>
+ <File name="${Name}.resx" CustomTool="ResXFileCodeGenerator">
+ <![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<root>
+</root>
+]]>
+ </File>
+ </ProjectResource>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyStruct.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyStruct.xft.xml
new file mode 100644
index 0000000..f4d7647
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyStruct.xft.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<Template Originator="John Luke" Created="12/16/2005" LastModified="12/16/2005">
+
+ <TemplateConfiguration>
+ <_Name>Empty Struct</_Name>
+ <Icon>md-struct-file</Icon>
+ <_Category>General</_Category>
+ <LanguageName>*</LanguageName>
+ <_Description>Creates an empty struct.</_Description>
+ <DefaultFilename>EmptyStruct</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <CodeDomFile DefaultName="EmptyStruct">
+
+ <CompileUnit>
+ <Namespaces>
+ <Namespace Name="">
+ <Imports>
+ <NamespaceImport Namespace="System" />
+ </Imports>
+ </Namespace>
+ <Namespace Name="${Namespace}">
+ <Types>
+ <TypeDeclaration Name="${Name}" IsStruct="true">
+ </TypeDeclaration>
+ </Types>
+ </Namespace>
+ </Namespaces>
+ </CompileUnit>
+
+ </CodeDomFile>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyTextFile.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyTextFile.xft.xml
new file mode 100644
index 0000000..48f5d0f
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyTextFile.xft.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Krueger" Language="Default" Created="6/10/2001" LastModified="6/10/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty Text File</_Name>
+ <Icon>md-text-file-icon</Icon>
+ <_Category>Misc</_Category>
+ <_Description>Creates an empty text file.</_Description>
+ <DefaultFilename>EmptyTextFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".txt" />
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyXMLFile.xft.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyXMLFile.xft.xml
new file mode 100644
index 0000000..25f4d2f
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.EmptyXMLFile.xft.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Template Originator="Mike Krueger" Language="XML" Created="6/10/2001" LastModified="6/10/2001">
+
+ <TemplateConfiguration>
+ <_Name>Empty XML File</_Name>
+ <Icon>md-xml-file-icon</Icon>
+ <_Category>XML</_Category>
+ <_Description>Creates an empty XML file.</_Description>
+ <DefaultFilename>EmptyXmlFile</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".xml">
+<![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
+]]>
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.GenericProject.xpt.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.GenericProject.xpt.xml
new file mode 100644
index 0000000..0bcbe1f
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.GenericProject.xpt.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<Template originator = "Lluis Sanchez"
+ created = "02/04/2007"
+ lastModified = "02/04/2007">
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Generic Project</_Name>
+ <_Category>Other</_Category>
+ <Icon>md-project</Icon>
+ <_Description>Creates a project which can contain any kind of file.</_Description>
+ </TemplateConfiguration>
+
+ <Combine name = "${ProjectName}" directory = ".">
+ <Project name = "${ProjectName}" type="GenericProject" directory = "."/>
+ </Combine>
+</Template>
diff --git a/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.Workspace.xpt.xml b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.Workspace.xpt.xml
new file mode 100644
index 0000000..c5577df
--- /dev/null
+++ b/src/core/MonoDevelop.Ide/obj/Debug/MonoDevelop.Ide.templates.Workspace.xpt.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<Template >
+
+ <!-- Template Header -->
+ <TemplateConfiguration>
+ <_Name>Workspace</_Name>
+ <_Category>Other</_Category>
+ <Icon>md-workspace</Icon>
+ <LanguageName/>
+ <_Description>A blank workspace</_Description>
+ </TemplateConfiguration>
+
+ <!-- Template Content -->
+ <Combine name = "${ProjectName}" directory = "." type = "MonoDevelop.Projects.Workspace, MonoDevelop.Core" />
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml b/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
index 3e90a1b..5946730 100644
--- a/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
+++ b/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
@@ -23,7 +23,7 @@
<binding command="MonoDevelop.Ide.Commands.EditCommands.FoldDefinitions" shortcut="Control+M|Control+O" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleAllFoldings" shortcut="Control+M|Control+L" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleFolding" shortcut="Control+M|Control+M" />
- <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" shortcut="Control+K|C" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" shortcut="Control+K|Control+C" />
<binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" shortcut="Control+Shift+A" />
<binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddItem" shortcut="Alt+Shift+A" />
<binding command="MonoDevelop.Ide.Commands.ViewCommands.ShowNext" shortcut="F8" />
diff --git a/src/core/MonoDevelop.Ide/templates/AppConfigFile.xft.xml b/src/core/MonoDevelop.Ide/templates/AppConfigFile.xft.xml
index e3e6275..a13afa6 100644
--- a/src/core/MonoDevelop.Ide/templates/AppConfigFile.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/AppConfigFile.xft.xml
@@ -1,22 +1,23 @@
-<?xml version="1.0"?>
-<Template Originator="Fawad Halim" Language="XML" Created="10/14/2004" LastModified="10/14/2004">
-
- <TemplateConfiguration>
- <_Name>Application Configuration File</_Name>
- <Icon>md-text-file-icon</Icon>
- <_Category>Misc</_Category>
- <ProjectType>DotNet</ProjectType>
- <_Description>Creates a .NET application configuration file.</_Description>
- </TemplateConfiguration>
-
- <TemplateFiles>
- <File DefaultExtension=".config" DefaultName="app">
- <![CDATA[<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-</configuration>]]>
- </File>
- </TemplateFiles>
-
- <FileOptions/>
-
-</Template>
+<?xml version="1.0"?>
+<Template Originator="Fawad Halim" Language="XML" Created="10/14/2004" LastModified="05/01/2013">
+
+ <TemplateConfiguration>
+ <_Name>Application Configuration File</_Name>
+ <Icon>md-text-file-icon</Icon>
+ <_Category>Misc</_Category>
+ <ProjectType>DotNet</ProjectType>
+ <_Description>Creates a .NET application configuration file.</_Description>
+ <DefaultFilename>app</DefaultFilename>
+ </TemplateConfiguration>
+
+ <TemplateFiles>
+ <File DefaultExtension=".config">
+ <![CDATA[<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+</configuration>]]>
+ </File>
+ </TemplateFiles>
+
+ <FileOptions/>
+
+</Template>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyClass.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyClass.xft.xml
index 01ec452..e97e5a5 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyClass.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyClass.xft.xml
@@ -7,6 +7,7 @@
<_Category>General</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates an empty class.</_Description>
+ <DefaultFilename>EmptyClass</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyEnum.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyEnum.xft.xml
index c619d98..10a7086 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyEnum.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyEnum.xft.xml
@@ -7,6 +7,7 @@
<_Category>General</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates an empty enum.</_Description>
+ <DefaultFilename>EmptyEnumeration</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyHTMLFile.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyHTMLFile.xft.xml
index 1bd5816..f042d43 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyHTMLFile.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyHTMLFile.xft.xml
@@ -6,10 +6,11 @@
<Icon>md-html-file-icon</Icon>
<_Category>Web</_Category>
<_Description>Creates an empty HTML file.</_Description>
+ <DefaultFilename>EmptyHtmlFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".html" DefaultName="EmptyHtmlfile"><![CDATA[
+ <File DefaultExtension=".html"><![CDATA[
<html>
<head>
<title></title>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyInterface.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyInterface.xft.xml
index 0e68724..d8a8890 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyInterface.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyInterface.xft.xml
@@ -7,6 +7,7 @@
<_Category>General</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates an empty interface.</_Description>
+ <DefaultFilename>EmptyInterface</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
index dacb131..b221cad 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
@@ -7,11 +7,17 @@
<_Category>Misc</_Category>
<ProjectType>DotNet</ProjectType>
<_Description>Creates an empty resource file.</_Description>
+ <DefaultFilename>EmptyResourcefile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
<ProjectResource>
- <File DefaultExtension=".resx" DefaultName="EmptyResourcefile"/>
+ <File name="${Name}.resx" CustomTool="ResXFileCodeGenerator">
+ <![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<root>
+</root>
+]]>
+ </File>
</ProjectResource>
</TemplateFiles>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyStruct.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyStruct.xft.xml
index cc71fed..f4d7647 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyStruct.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyStruct.xft.xml
@@ -7,6 +7,7 @@
<_Category>General</_Category>
<LanguageName>*</LanguageName>
<_Description>Creates an empty struct.</_Description>
+ <DefaultFilename>EmptyStruct</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyTextFile.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyTextFile.xft.xml
index f03ac02..48f5d0f 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyTextFile.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyTextFile.xft.xml
@@ -6,10 +6,11 @@
<Icon>md-text-file-icon</Icon>
<_Category>Misc</_Category>
<_Description>Creates an empty text file.</_Description>
+ <DefaultFilename>EmptyTextFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".txt" DefaultName="EmptyTextFile" />
+ <File DefaultExtension=".txt" />
</TemplateFiles>
<FileOptions/>
diff --git a/src/core/MonoDevelop.Ide/templates/EmptyXMLFile.xft.xml b/src/core/MonoDevelop.Ide/templates/EmptyXMLFile.xft.xml
index 4257807..25f4d2f 100644
--- a/src/core/MonoDevelop.Ide/templates/EmptyXMLFile.xft.xml
+++ b/src/core/MonoDevelop.Ide/templates/EmptyXMLFile.xft.xml
@@ -6,10 +6,11 @@
<Icon>md-xml-file-icon</Icon>
<_Category>XML</_Category>
<_Description>Creates an empty XML file.</_Description>
+ <DefaultFilename>EmptyXmlFile</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
- <File DefaultExtension=".xml" DefaultName="EmptyXmlFile">
+ <File DefaultExtension=".xml">
<![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
]]>
</File>
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile.in b/src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile.in
index 7416be9..2de5caa 100644
--- a/src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile.in
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs b/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
index a4d774a..1f44808 100644
--- a/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
@@ -94,7 +94,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
internal void UnloadProject (string file)
{
- RunSTA (delegate {
+ RunSTA (delegate {
foreach (var engine in engines.Values) {
//unloading projects modifies the collection, so copy it
var projects = engine.GetLoadedProjects (file).ToArray ();
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs b/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
index e9f5e91..b570e5b 100644
--- a/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
@@ -155,9 +155,9 @@ namespace MonoDevelop.Projects.Formats.MSBuild
Project ConfigureProject (string file, string configuration, string platform)
{
var p = engine.GetLoadedProjects (file).FirstOrDefault ();
- if (p == null)
- p = engine.LoadProject (file);
-
+ if (p == null)
+ p = engine.LoadProject (file);
+
p.SetProperty ("Configuration", configuration);
if (!string.IsNullOrEmpty (platform))
p.SetProperty ("Platform", platform);
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/2.0/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v2.0.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/2.0/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v2.0.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..5de7200
--- /dev/null
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/2.0/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v2.0.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/2.0/MonoDevelop.Projects.Formats.MSBuild.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/2.0/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/2.0/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/2.0/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/2.0/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v3.5.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v3.5.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..dde5f00
--- /dev/null
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v3.5.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/3.5/MonoDevelop.Projects.Formats.MSBuild.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/3.5/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/3.5/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..d075d41
--- /dev/null
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Projects.Formats.MSBuild.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
diff --git a/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..23fc688
--- /dev/null
+++ b/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/4.0/MonoDevelop.Projects.Formats.MSBuild.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/4.0/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MSBuild/4.0/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild/obj/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe.mdb
diff --git a/src/core/MonoDevelop.Startup/Makefile.in b/src/core/MonoDevelop.Startup/Makefile.in
index 30e5311..5d85a4f 100644
--- a/src/core/MonoDevelop.Startup/Makefile.in
+++ b/src/core/MonoDevelop.Startup/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/core/MonoDevelop.Startup/MonoDevelop.Startup.csproj b/src/core/MonoDevelop.Startup/MonoDevelop.Startup.csproj
index 8970c26..a4dd206 100644
--- a/src/core/MonoDevelop.Startup/MonoDevelop.Startup.csproj
+++ b/src/core/MonoDevelop.Startup/MonoDevelop.Startup.csproj
@@ -20,8 +20,8 @@
<WarningLevel>4</WarningLevel>
<EnvironmentVariables>
<EnvironmentVariables>
- <Variable name="MONO_ADDINS_REGISTRY" value="." />
<Variable name="MONODEVELOP_LOCALE_PATH" value="../locale" />
+ <Variable name="MONODEVELOP_TEST_PROFILE" value="./test-profile" />
</EnvironmentVariables>
</EnvironmentVariables>
<PlatformTarget>x86</PlatformTarget>
@@ -45,11 +45,8 @@
<WarningLevel>4</WarningLevel>
<EnvironmentVariables>
<EnvironmentVariables>
- <Variable name="MONO_ADDINS_REGISTRY" value="." />
<Variable name="MONODEVELOP_LOCALE_PATH" value="../locale" />
- <Variable name="XDG_DATA_HOME" value="./local" />
- <Variable name="XDG_CONFIG_HOME" value="./local" />
- <Variable name="XDG_CACHE_HOME" value="./local" />
+ <Variable name="MONODEVELOP_TEST_PROFILE" value="./test-profile" />
</EnvironmentVariables>
</EnvironmentVariables>
<Execution>
diff --git a/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs b/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
index 1d8e23b..e53efbd 100644
--- a/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
+++ b/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
@@ -11,6 +11,7 @@ namespace MonoDevelop.Startup
{
public class MonoDevelopMain
{
+ [STAThread]
public static int Main (string[] args)
{
return IdeStartup.Main (args);
diff --git a/src/core/MonoDevelop.Startup/obj/Debug/MonoDevelop.Startup.csproj.FilesWrittenAbsolute.txt b/src/core/MonoDevelop.Startup/obj/Debug/MonoDevelop.Startup.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..daa3f6a
--- /dev/null
+++ b/src/core/MonoDevelop.Startup/obj/Debug/MonoDevelop.Startup.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,6 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.exe.addins
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/MonoDevelop.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Startup/obj/Debug/MonoDevelop.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/core/MonoDevelop.Startup/obj/Debug/MonoDevelop.exe.mdb
diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in
index 1c4966f..8e6e158 100644
--- a/src/tools/Makefile.in
+++ b/src/tools/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -260,11 +259,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -328,6 +327,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -391,6 +394,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -550,21 +567,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/tools/SharpCoco/Makefile.in b/src/tools/SharpCoco/Makefile.in
index e2d2f37..b1a986c 100644
--- a/src/tools/SharpCoco/Makefile.in
+++ b/src/tools/SharpCoco/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -210,7 +209,7 @@ MD_LAUNCH_SETUP = \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN = $(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
all: all-am
@@ -253,6 +252,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/tools/mdhost/Makefile.in b/src/tools/mdhost/Makefile.in
index 326a6ce..2bd5350 100644
--- a/src/tools/mdhost/Makefile.in
+++ b/src/tools/mdhost/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/tools/mdhost/obj/x86/Debug/mdhost.csproj.FilesWrittenAbsolute.txt b/src/tools/mdhost/obj/x86/Debug/mdhost.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..54c4cb9
--- /dev/null
+++ b/src/tools/mdhost/obj/x86/Debug/mdhost.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdhost.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdhost.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdhost.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdhost/obj/x86/Debug/mdhost.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdhost/obj/x86/Debug/mdhost.exe.mdb
diff --git a/src/tools/mdmonitor/Makefile.in b/src/tools/mdmonitor/Makefile.in
index 44103c5..b2813c1 100644
--- a/src/tools/mdmonitor/Makefile.in
+++ b/src/tools/mdmonitor/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/tools/mdmonitor/obj/Debug/Mono.Instrumentation.Monitor.gtk-gui.gui.stetic b/src/tools/mdmonitor/obj/Debug/Mono.Instrumentation.Monitor.gtk-gui.gui.stetic
new file mode 100644
index 0000000..3016971
--- /dev/null
+++ b/src/tools/mdmonitor/obj/Debug/Mono.Instrumentation.Monitor.gtk-gui.gui.stetic
@@ -0,0 +1,1003 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/mdmonitor.exe" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="Mono.Instrumentation.Monitor.InstrumenationChartView" design-size="632 482">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned2">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">471</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="boxCharts">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hboxChartBar">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ToggleButton" id="toggleTimeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Time View</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Toggled" handler="OnToggleTimeViewToggled" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ToggleButton" id="toggleListView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">List View</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Toggled" handler="OnToggleListViewToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonZoomOut">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-zoom-out Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonZoomOutClicked" />
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonZoomIn">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-zoom-in Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonZoomInClicked" />
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="frameCharts">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.HScrollbar" id="chartScroller">
+ <property name="MemberName" />
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="PageSize">10</property>
+ <property name="StepIncrement">1</property>
+ <signal name="ValueChanged" handler="OnChartScrollerValueChanged" />
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hboxSeriesBar">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonRemoveCounter">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-remove</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonRemoveCounterClicked" />
+ <property name="label">gtk-remove</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonAddCounter">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-add</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonAddCounterClicked" />
+ <property name="label">gtk-add</property>
+ </widget>
+ <packing>
+ <property name="PackType">End</property>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="listSeries">
+ <property name="MemberName" />
+ <property name="WidthRequest">100</property>
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ <property name="Shrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Window" id="Mono.Instrumentation.Monitor.InstrumentationViewerDialog" design-size="942 587">
+ <action-group name="Default">
+ <action id="FileAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">File</property>
+ <property name="ShortLabel" translatable="yes">File</property>
+ </action>
+ <action id="openAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">_Open</property>
+ <property name="ShortLabel" translatable="yes">_Open</property>
+ <property name="StockId">gtk-open</property>
+ <signal name="Activated" handler="OnOpenActionActivated" />
+ </action>
+ <action id="connectAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">C_onnect</property>
+ <property name="ShortLabel" translatable="yes">C_onnect</property>
+ <property name="StockId">gtk-connect</property>
+ </action>
+ <action id="ExitAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Exit</property>
+ <property name="ShortLabel" translatable="yes">Exit</property>
+ <signal name="Activated" handler="OnExitActionActivated" />
+ </action>
+ <action id="ToolsAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Tools</property>
+ <property name="ShortLabel" translatable="yes">Tools</property>
+ </action>
+ <action id="FlushMemoryAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Flush Memory</property>
+ <property name="ShortLabel" translatable="yes">Flush Memory</property>
+ <signal name="Activated" handler="OnFlushMemoryActionActivated" />
+ </action>
+ </action-group>
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <signal name="DeleteEvent" handler="OnDeleteEvent" />
+ <child>
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.MenuBar" id="menubar1">
+ <property name="MemberName" />
+ <node name="menubar1" type="Menubar">
+ <node type="Menu" action="FileAction">
+ <node type="Menuitem" action="openAction" />
+ <node type="Menuitem" action="connectAction" />
+ <node type="Separator" />
+ <node type="Menuitem" action="ExitAction" />
+ </node>
+ <node type="Menu" action="ToolsAction">
+ <node type="Menuitem" action="FlushMemoryAction" />
+ </node>
+ </node>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">159</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeCounters">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ <property name="Shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.EventBox" id="headerBox">
+ <property name="MemberName" />
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">3</property>
+ <child>
+ <widget class="Gtk.Label" id="labelHeader">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="buttonsBox">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonSave">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-save Button</property>
+ <property name="Label" translatable="yes">Save</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonSaveClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonSaveAs">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-copy Button</property>
+ <property name="Label" translatable="yes">Copy</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonSaveAsClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonDelete">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-delete Button</property>
+ <property name="Label" translatable="yes">Delete</property>
+ <property name="UseUnderline">True</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonDeleteClicked" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Alignment" id="viewBox">
+ <property name="MemberName" />
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="Mono.Instrumentation.Monitor.NewProfile" design-size="392 136">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">New View</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.Label" id="label1">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="LabelProp" translatable="yes">View Name:</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Entry" id="entryName">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="IsEditable">True</property>
+ <property name="InvisibleChar">●</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="Mono.Instrumentation.Monitor.CounterSelectorDialog" design-size="445 540">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Select Counter</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeCounters">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="HeadersVisible">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="Mono.Instrumentation.Monitor.CounterSelectorDialog" design-size="445 540">
+ <property name="MemberName" />
+ <property name="Title" translatable="yes">Select Counter</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <property name="BorderWidth">9</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeCounters">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Window" id="Mono.Instrumentation.Monitor.TimeLineViewWindow" design-size="806 638">
+ <property name="MemberName" />
+ <property name="GeneratePublic">False</property>
+ <property name="Title" translatable="yes">Time Line</property>
+ <property name="WindowPosition">CenterOnParent</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <property name="BorderWidth">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonExpand">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Expand All</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonExpandClicked" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonCollapse">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Collapse All</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonCollapseClicked" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkSingleThread">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Single Thread</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckSingleThreadToggled" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Mono.Instrumentation.Monitor.TimeLineView" id="timeView">
+ <property name="MemberName" />
+ <property name="ShowScrollbars">True</property>
+ <property name="SingleThread">False</property>
+ <property name="TimeScale">0</property>
+ <property name="Zoom">0</property>
+ <property name="Scale">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-zoom-100 Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VScale" id="vscaleZoom">
+ <property name="MemberName" />
+ <property name="HeightRequest">150</property>
+ <property name="CanFocus">True</property>
+ <property name="Lower">10</property>
+ <property name="Upper">300</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="Value">100</property>
+ <property name="DrawValue">True</property>
+ <property name="Digits">0</property>
+ <property name="ValuePos">Top</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonResetScale">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:stock_draw-dimension-line Menu</property>
+ <property name="Label" translatable="yes" />
+ <property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnButtonResetScaleClicked" />
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VScale" id="vscaleScale">
+ <property name="MemberName" />
+ <property name="HeightRequest">150</property>
+ <property name="CanFocus">True</property>
+ <property name="Lower">10</property>
+ <property name="Upper">300</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="Value">100</property>
+ <property name="DrawValue">True</property>
+ <property name="Digits">0</property>
+ <property name="ValuePos">Top</property>
+ <signal name="ChangeValue" handler="OnVscaleScaleChangeValue" />
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="Mono.Instrumentation.Monitor.TimeStatisticsView" design-size="501 383">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonUpdate">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-refresh</property>
+ <property name="Relief">None</property>
+ <signal name="Clicked" handler="OnButtonUpdateClicked" />
+ <property name="label">gtk-refresh</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.CheckButton" id="checkShowCats">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Show Categories</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <signal name="Toggled" handler="OnCheckShowCatsToggled" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeView">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ <property name="RulesHint">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
\ No newline at end of file
diff --git a/src/tools/mdmonitor/obj/Debug/mdmonitor.csproj.FilesWrittenAbsolute.txt b/src/tools/mdmonitor/obj/Debug/mdmonitor.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..e50a318
--- /dev/null
+++ b/src/tools/mdmonitor/obj/Debug/mdmonitor.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdmonitor/obj/Debug/Mono.Instrumentation.Monitor.gtk-gui.gui.stetic
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdmonitor.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdmonitor.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdmonitor/obj/Debug/mdmonitor.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdmonitor/obj/Debug/mdmonitor.exe.mdb
diff --git a/src/tools/mdtool/Makefile.in b/src/tools/mdtool/Makefile.in
index 556f677..1e20c8d 100644
--- a/src/tools/mdtool/Makefile.in
+++ b/src/tools/mdtool/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/src/tools/mdtool/app.config b/src/tools/mdtool/app.config
index 6587006..e4a56c9 100644
--- a/src/tools/mdtool/app.config
+++ b/src/tools/mdtool/app.config
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
+ <startup useLegacyV2RuntimeActivationPolicy="true">
+ <supportedRuntime version="v4.0"/>
+ </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
diff --git a/src/tools/mdtool/obj/x86/Debug/mdtool.csproj.FilesWrittenAbsolute.txt b/src/tools/mdtool/obj/x86/Debug/mdtool.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..794e28e
--- /dev/null
+++ b/src/tools/mdtool/obj/x86/Debug/mdtool.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,5 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdtool.exe.config
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdtool.exe.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/bin/mdtool.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdtool/obj/x86/Debug/mdtool.exe
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/src/tools/mdtool/obj/x86/Debug/mdtool.exe.mdb
diff --git a/src/tools/mdtool/src/mdtool.cs b/src/tools/mdtool/src/mdtool.cs
index 9ec7c2d..fece250 100644
--- a/src/tools/mdtool/src/mdtool.cs
+++ b/src/tools/mdtool/src/mdtool.cs
@@ -70,9 +70,9 @@ public class MonoDevelopProcessHost
pi++;
logger.EnabledLevel = MonoDevelop.Core.Logging.EnabledLoggingLevel.UpToWarn;
} else {
- // Disable logging if verbose is not specified. Command line tools should alread be
- // providing feedback using the console
- logger.EnabledLevel = MonoDevelop.Core.Logging.EnabledLoggingLevel.None;
+ // Disable logging (except fatal errors) if verbose is not specified. Command line tools should already
+ // be providing feedback using the console.
+ logger.EnabledLevel = MonoDevelop.Core.Logging.EnabledLoggingLevel.Fatal;
}
string[] newArgs = new string [args.Length - 1 - pi];
@@ -85,7 +85,7 @@ public class MonoDevelopProcessHost
Console.WriteLine (ex.Message);
return -1;
} catch (Exception ex) {
- Console.WriteLine (ex);
+ LoggingService.LogFatalError (ex.ToString ());
return -1;
} finally {
try {
diff --git a/tests/MacPlatform.Tests/MacPlatform.Tests.csproj b/tests/MacPlatform.Tests/MacPlatform.Tests.csproj
index 8d049b3..104c7ff 100644
--- a/tests/MacPlatform.Tests/MacPlatform.Tests.csproj
+++ b/tests/MacPlatform.Tests/MacPlatform.Tests.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -9,6 +9,8 @@
<OutputType>Library</OutputType>
<RootNamespace>MacPlatform.Tests</RootNamespace>
<AssemblyName>MacPlatform.Tests</AssemblyName>
+ <TestRunnerCommand>..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
@@ -32,9 +34,11 @@
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\..\src\addins\NUnit\lib\nunit.framework.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="MonoMac">
<HintPath>..\..\external\monomac\src\MonoMac.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -46,34 +50,42 @@
<ProjectReference Include="..\..\src\addins\MacPlatform\MacPlatform.csproj">
<Project>{50D6768C-C072-4E79-AFC5-C1C40767EF45}</Project>
<Name>MacPlatform</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\src\core\MonoDevelop.Core\MonoDevelop.Core.csproj">
<Project>{7525BB88-6142-4A26-93B9-A30C6983390A}</Project>
<Name>MonoDevelop.Core</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\src\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj">
<Project>{27096E7F-C91C-4AC6-B289-6897A701DF21}</Project>
<Name>MonoDevelop.Ide</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\external\cecil\Mono.Cecil.csproj">
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\contrib\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj">
<Project>{984CC812-9470-4A13-AFF9-CC44068D666C}</Project>
<Name>ICSharpCode.Decompiler</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\src\core\Mono.Texteditor\Mono.TextEditor.csproj">
<Project>{A2329308-3751-4DBD-9A75-5F7B8B024625}</Project>
<Name>Mono.TextEditor</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\external\nrefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
<Name>ICSharpCode.NRefactory</Name>
+ <Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\external\nrefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">
<Project>{53DCA265-3C3C-42F9-B647-F72BA678122B}</Project>
<Name>ICSharpCode.NRefactory.CSharp</Name>
+ <Private>False</Private>
</ProjectReference>
</ItemGroup>
</Project>
diff --git a/tests/MacPlatform.Tests/Makefile.in b/tests/MacPlatform.Tests/Makefile.in
index 9008285..19ab7db 100644
--- a/tests/MacPlatform.Tests/Makefile.in
+++ b/tests/MacPlatform.Tests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cead8fb..e2dff8e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -17,11 +17,16 @@ TEST_PROJECTS_COMMON = \
$(EXTERNAL)/ngit/NGit.Test/NGit.Test.csproj
TEST_ASSEMBLIES_MAC = \
+ $(TEST_DIR)/MonoDevelop.VersionControl.Subversion.Tests.dll \
$(TEST_DIR)/MacPlatform.Tests.dll
TEST_ASSEMBLIES_COMMON = \
+ $(TEST_DIR)/MonoDevelop.VersionControl.Git.Tests.dll \
$(TEST_DIR)/UnitTests.dll \
$(TEST_DIR)/MonoDevelop.Debugger.Tests.dll \
+ $(TEST_DIR)/Mono.TextTemplating.Tests.dll \
+ $(TEST_DIR)/MonoDevelop.TextEditor.Tests.dll \
+ $(TEST_DIR)/MonoDevelop.XmlEditor.Tests.dll \
$(EXTERNAL)/ngit/bin/NGit.Test.dll
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 756747e..193397b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -364,11 +363,16 @@ TEST_PROJECTS_COMMON = \
$(EXTERNAL)/ngit/NGit.Test/NGit.Test.csproj
TEST_ASSEMBLIES_MAC = \
+ $(TEST_DIR)/MonoDevelop.VersionControl.Subversion.Tests.dll \
$(TEST_DIR)/MacPlatform.Tests.dll
TEST_ASSEMBLIES_COMMON = \
+ $(TEST_DIR)/MonoDevelop.VersionControl.Git.Tests.dll \
$(TEST_DIR)/UnitTests.dll \
$(TEST_DIR)/MonoDevelop.Debugger.Tests.dll \
+ $(TEST_DIR)/Mono.TextTemplating.Tests.dll \
+ $(TEST_DIR)/MonoDevelop.TextEditor.Tests.dll \
+ $(TEST_DIR)/MonoDevelop.XmlEditor.Tests.dll \
$(EXTERNAL)/ngit/bin/NGit.Test.dll
TEST_ASSEMBLIES = $(TEST_ASSEMBLIES_COMMON) $(am__append_2)
@@ -384,7 +388,7 @@ MD_LAUNCH_SETUP = \
DYLD_FALLBACK_LIBRARY_PATH="$(DYLD_FALLBACK_LIBRARY_PATH)" \
MONO_GAC_PREFIX="$(MONO_GAC_PREFIX)" \
MONODEVELOP_LOCALE_PATH="$(abs_top_builddir)/build/locale" \
- MONO_ADDINS_REGISTRY="$(MD_BIN_PATH)"
+ MONODEVELOP_TEST_PROFILE="$(MD_BIN_PATH)/test-profile"
MDTOOL_RUN = $(MD_LAUNCH_SETUP) exec -a "mdtool" $(RUNTIME) --debug "$(MD_BIN_PATH)/mdtool.exe"
all: all-recursive
@@ -423,11 +427,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -491,6 +495,10 @@ ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -554,6 +562,20 @@ GTAGS:
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -711,21 +733,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic ctags \
- ctags-recursive distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am
+ all all-am check check-am clean clean-generic cscopelist \
+ cscopelist-recursive ctags ctags-recursive distclean \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
all: csproj_build
diff --git a/tests/UnitTests/Makefile.in b/tests/UnitTests/Makefile.in
index 1cc3558..2e52893 100644
--- a/tests/UnitTests/Makefile.in
+++ b/tests/UnitTests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs b/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs
index b7f0c0a..523edfa 100644
--- a/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs
+++ b/tests/UnitTests/MonoDevelop.AspNet.Mvc.Completion/CompletionTests.cs
@@ -1,116 +1,121 @@
-//
-// CompletionTests.cs
-//
-// Author:
-// Piotr Dowgiallo <sparekd at gmail.com>
-//
-// Copyright (c) 2012 Piotr Dowgiallo
-//
-// 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 NUnit.Framework;
-
-namespace UnitTests.MonoDevelop.AspNet.Mvc.Completion
-{
- [TestFixture]
- public class CompletionTests : TestBase
- {
- [Test]
- public void HtmlTagsCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("<$", false);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("p"));
- Assert.IsNotNull (provider.Find ("div"));
- }
-
- [Test]
- public void NestedHtmlTagsCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("<div><ul><$ </ul></div>", false);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("li"));
- }
-
- [Test]
- public void RazorDirectivesAndStatementsCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("@m$", true);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("model"));
- Assert.IsNotNull (provider.Find ("sessionstate"));
- Assert.IsNotNull (provider.Find ("using"));
- Assert.IsNotNull (provider.Find ("layout"));
- Assert.IsNotNull (provider.Find ("section"));
- Assert.IsNotNull (provider.Find ("functions"));
- Assert.IsNotNull (provider.Find ("helper"));
- Assert.IsNotNull (provider.Find ("inherits"));
- Assert.IsNotNull (provider.Find ("for"));
- Assert.IsNotNull (provider.Find ("foreach"));
- Assert.IsNotNull (provider.Find ("while"));
- Assert.IsNotNull (provider.Find ("do"));
- Assert.IsNotNull (provider.Find ("lock"));
- Assert.IsNotNull (provider.Find ("switch"));
- Assert.IsNotNull (provider.Find ("if"));
- Assert.IsNotNull (provider.Find ("try"));
- }
-
- [Test]
- public void CSharpIdentifiersCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("@{ i$ }", true);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("int"));
- Assert.IsNotNull (provider.Find ("var"));
- }
-
- [Test]
- public void CSharpIdentifiersCtrlSpaceCompletion ()
- {
- var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider ("@{ $ }", true);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("int"));
- Assert.IsNotNull (provider.Find ("var"));
- }
-
- [Test]
- public void CSharpMembersCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("@{ Char.$ }", true);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("IsLetter"));
- }
-
- [Test]
- public void CSharpMembersCtrlSpaceCompletion ()
- {
- var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider ("@{ Char.Is$ }", true);
- Assert.IsNotNull (provider);
- Assert.IsNotNull (provider.Find ("IsLetter"));
- }
-
- [Test]
- public void CSharpParametersCompletion ()
- {
- var provider = RazorCompletionTesting.CreateProvider ("@{ Char.IsLetter($ }");
- Assert.IsNotNull (provider);
- Assert.AreEqual (2, provider.Count);
- }
- }
-}
+//
+// CompletionTests.cs
+//
+// Author:
+// Piotr Dowgiallo <sparekd at gmail.com>
+//
+// Copyright (c) 2012 Piotr Dowgiallo
+//
+// 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 NUnit.Framework;
+
+namespace UnitTests.MonoDevelop.AspNet.Mvc.Completion
+{
+ [TestFixture]
+ public class CompletionTests : TestBase
+ {
+ [Test]
+ public void HtmlTagsCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("<$", false);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("p"));
+ Assert.IsNotNull (provider.Find ("div"));
+ }
+
+ [Test]
+ public void NestedHtmlTagsCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("<div><ul><$ </ul></div>", false);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("li"));
+ }
+
+ [Ignore("ASP.NET completion broken.")]
+ [Test]
+ public void RazorDirectivesAndStatementsCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("@m$", true);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("model"));
+ Assert.IsNotNull (provider.Find ("sessionstate"));
+ Assert.IsNotNull (provider.Find ("using"));
+ Assert.IsNotNull (provider.Find ("layout"));
+ Assert.IsNotNull (provider.Find ("section"));
+ Assert.IsNotNull (provider.Find ("functions"));
+ Assert.IsNotNull (provider.Find ("helper"));
+ Assert.IsNotNull (provider.Find ("inherits"));
+ Assert.IsNotNull (provider.Find ("for"));
+ Assert.IsNotNull (provider.Find ("foreach"));
+ Assert.IsNotNull (provider.Find ("while"));
+ Assert.IsNotNull (provider.Find ("do"));
+ Assert.IsNotNull (provider.Find ("lock"));
+ Assert.IsNotNull (provider.Find ("switch"));
+ Assert.IsNotNull (provider.Find ("if"));
+ Assert.IsNotNull (provider.Find ("try"));
+ }
+
+ [Ignore("ASP.NET completion broken.")]
+ [Test]
+ public void CSharpIdentifiersCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("@{ i$ }", true);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("int"));
+ Assert.IsNotNull (provider.Find ("var"));
+ }
+
+ [Ignore("ASP.NET completion broken.")]
+ [Test]
+ public void CSharpIdentifiersCtrlSpaceCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider ("@{ $ }", true);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("int"));
+ Assert.IsNotNull (provider.Find ("var"));
+ }
+
+ [Ignore("ASP.NET completion broken.")]
+ [Test]
+ public void CSharpMembersCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("@{ Char.$ }", true);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("IsLetter"));
+ }
+
+ [Ignore("ASP.NET completion broken.")]
+ [Test]
+ public void CSharpMembersCtrlSpaceCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider ("@{ Char.Is$ }", true);
+ Assert.IsNotNull (provider);
+ Assert.IsNotNull (provider.Find ("IsLetter"));
+ }
+
+ [Test]
+ public void CSharpParametersCompletion ()
+ {
+ var provider = RazorCompletionTesting.CreateProvider ("@{ Char.IsLetter($ }");
+ Assert.IsNotNull (provider);
+ Assert.AreEqual (2, provider.Count);
+ }
+ }
+}
diff --git a/tests/UnitTests/MonoDevelop.CSharpBinding.Refactoring/ResolveNamespaceTests.cs b/tests/UnitTests/MonoDevelop.CSharpBinding.Refactoring/ResolveNamespaceTests.cs
index b7b7582..be08a74 100644
--- a/tests/UnitTests/MonoDevelop.CSharpBinding.Refactoring/ResolveNamespaceTests.cs
+++ b/tests/UnitTests/MonoDevelop.CSharpBinding.Refactoring/ResolveNamespaceTests.cs
@@ -39,6 +39,7 @@ using System.Linq;
namespace MonoDevelop.CSharpBinding.Refactoring
{
+ [Ignore("Ignored till the tests run inside md.")]
[TestFixture]
public class ResolveNamespaceTests : UnitTests.TestBase
{
diff --git a/tests/UnitTests/MonoDevelop.CSharpBinding/AutomaticBracketInsertionTests.cs b/tests/UnitTests/MonoDevelop.CSharpBinding/AutomaticBracketInsertionTests.cs
new file mode 100644
index 0000000..7626d5b
--- /dev/null
+++ b/tests/UnitTests/MonoDevelop.CSharpBinding/AutomaticBracketInsertionTests.cs
@@ -0,0 +1,330 @@
+//
+// AutomaticBracketInsertionTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+
+using MonoDevelop.CSharp.Parser;
+using Mono.TextEditor;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.CSharp.Formatting;
+using UnitTests;
+using MonoDevelop.Projects.Policies;
+using MonoDevelop.CSharpBinding.Tests;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.CSharp.Completion;
+using MonoDevelop.Ide.CodeCompletion;
+
+namespace MonoDevelop.CSharpBinding
+{
+ [TestFixture]
+ public class AutomaticBracketInsertionTests : TestBase
+ {
+ class TestCompletionWidget : ICompletionWidget
+ {
+ Document doc;
+
+ public TestCompletionWidget (Document doc)
+ {
+ this.doc = doc;
+ }
+
+ public string CompletedWord {
+ get;
+ set;
+ }
+ #region ICompletionWidget implementation
+ public event EventHandler CompletionContextChanged {
+ add { /* TODO */ }
+ remove { /* TODO */ }
+ }
+
+ public string GetText (int startOffset, int endOffset)
+ {
+ return doc.Editor.GetTextBetween (startOffset, endOffset);
+ }
+
+ public char GetChar (int offset)
+ {
+ return doc.Editor.GetCharAt (offset);
+ }
+
+ public CodeCompletionContext CreateCodeCompletionContext (int triggerOffset)
+ {
+ var line = doc.Editor.GetLineByOffset (triggerOffset);
+ return new CodeCompletionContext {
+ TriggerOffset = triggerOffset,
+ TriggerLine = line.LineNumber,
+ TriggerLineOffset = line.Offset,
+ TriggerXCoord = 0,
+ TriggerYCoord = 0,
+ TriggerTextHeight = 0,
+ TriggerWordLength = 0
+ };
+ }
+
+ public CodeCompletionContext CurrentCodeCompletionContext {
+ get {
+ return CreateCodeCompletionContext (doc.Editor.Caret.Offset);
+ }
+ }
+
+ public string GetCompletionText (CodeCompletionContext ctx)
+ {
+ return "";
+ }
+
+ public void SetCompletionText (CodeCompletionContext ctx, string partial_word, string complete_word)
+ {
+ this.CompletedWord = complete_word;
+ }
+
+ public void SetCompletionText (CodeCompletionContext ctx, string partial_word, string complete_word, int offset)
+ {
+ this.CompletedWord = complete_word;
+ }
+
+ public void Replace (int offset, int count, string text)
+ {
+ }
+
+ public int CaretOffset {
+ get {
+ return doc.Editor.Caret.Offset;
+ }
+ }
+
+ public int TextLength {
+ get {
+ return doc.Editor.Document.TextLength;
+ }
+ }
+
+ public int SelectedLength {
+ get {
+ return 0;
+ }
+ }
+
+ public Gtk.Style GtkStyle {
+ get {
+ return null;
+ }
+ }
+ #endregion
+ }
+
+
+ static CSharpCompletionTextEditorExtension Setup (string input, out TestViewContent content)
+ {
+ TestWorkbenchWindow tww = new TestWorkbenchWindow ();
+ content = new TestViewContent ();
+ tww.ViewContent = content;
+ content.ContentName = "a.cs";
+ content.GetTextEditorData ().Document.MimeType = "text/x-csharp";
+
+ Document doc = new Document (tww);
+
+ var text = input;
+ int endPos = text.IndexOf ('$');
+ if (endPos >= 0)
+ text = text.Substring (0, endPos) + text.Substring (endPos + 1);
+
+ content.Text = text;
+ content.CursorPosition = System.Math.Max (0, endPos);
+
+
+ var compExt = new CSharpCompletionTextEditorExtension ();
+ compExt.Initialize (doc);
+ content.Contents.Add (compExt);
+
+ doc.UpdateParseDocument ();
+ return compExt;
+ }
+
+ string Test(string input, string type, string member, Gdk.Key key = Gdk.Key.Return, bool isDelegateExpected = false)
+ {
+ TestViewContent content;
+ var ext = Setup (input, out content);
+
+ ListWindow.ClearHistory ();
+ var listWindow = new CompletionListWindow ();
+ var widget = new TestCompletionWidget (ext.Document);
+ listWindow.CompletionWidget = widget;
+ listWindow.CodeCompletionContext = widget.CurrentCodeCompletionContext;
+ var t = ext.Document.Compilation.FindType (new FullTypeName (type));
+ var method = member != null ? t.GetMembers (m => m.Name == member).First () : t.GetConstructors ().First ();
+ var data = new MemberCompletionData (ext, method, OutputFlags.ClassBrowserEntries);
+ data.IsDelegateExpected = isDelegateExpected;
+ KeyActions ka = KeyActions.Process;
+ data.InsertCompletionText (listWindow, ref ka, key, (char)key, Gdk.ModifierType.None, true, false);
+ return widget.CompletedWord;
+ }
+
+ [Test]
+ public void TestSimpleCase ()
+ {
+ string completion = Test (@"class MyClass
+{
+ void FooBar ()
+ {
+ $
+ }
+}", "MyClass", "FooBar");
+ Assert.AreEqual ("FooBar ();|", completion);
+ }
+
+ [Test]
+ public void TestBracketAlreadyThere ()
+ {
+ string completion = Test (@"class MyClass
+{
+ void FooBar ()
+ {
+ $ ();
+ }
+}", "MyClass", "FooBar");
+ Assert.AreEqual ("FooBar", completion);
+ }
+
+
+ [Test]
+ public void TestOverloads ()
+ {
+ string completion = Test (@"class MyClass
+{
+ void FooBar (int foo)
+ {
+ }
+ void FooBar ()
+ {
+ $
+ }
+}", "MyClass", "FooBar");
+ Assert.AreEqual ("FooBar (|);", completion);
+ }
+
+ [Test]
+ public void TestExpressionCase ()
+ {
+ string completion = Test (@"class MyClass
+{
+ int FooBar ()
+ {
+ int i;
+ i = $
+ }
+}", "MyClass", "FooBar");
+ Assert.AreEqual ("FooBar ()|", completion);
+ }
+
+ [Test]
+ public void TestExpressionCaseWithOverloads ()
+ {
+ string completion = Test (@"class MyClass
+{
+ int FooBar (int foo)
+ {
+ }
+
+ int FooBar ()
+ {
+ int i;
+ i = $
+ }
+}", "MyClass", "FooBar");
+ Assert.AreEqual ("FooBar (|)", completion);
+ }
+
+ [Test]
+ public void TestDelegateCase ()
+ {
+ string completion = Test (@"using System;
+class MyClass
+{
+ int FooBar ()
+ {
+ Func<int> i;
+ i = $
+ }
+}", "MyClass", "FooBar", Gdk.Key.Return, true);
+ Assert.AreEqual ("FooBar", completion);
+ }
+
+ [Test]
+ public void TestDotCompletion ()
+ {
+ string completion = Test (@"class MyClass
+{
+ void FooBar ()
+ {
+ $
+ }
+}", "MyClass", "FooBar", (Gdk.Key)'.');
+ Assert.AreEqual ("FooBar ().|", completion);
+ }
+
+
+
+ [Test]
+ public void TestConstructorSimple ()
+ {
+ string completion = Test (@"class MyClass
+{
+ public MyClass () {}
+
+ void FooBar ()
+ {
+ $
+ }
+}", "MyClass", null);
+ Assert.AreEqual ("MyClass ()|", completion);
+ }
+
+ [Test]
+ public void TestConstructorWithOverloads ()
+ {
+ string completion = Test (@"class MyClass
+{
+ public MyClass () {}
+ public MyClass (int x) {}
+
+ void FooBar ()
+ {
+ $
+ }
+}", "MyClass", null);
+ Assert.AreEqual ("MyClass (|)", completion);
+ }
+
+ }
+}
+
diff --git a/tests/UnitTests/MonoDevelop.CSharpBinding/CSharpTextEditorIndentationTests.cs b/tests/UnitTests/MonoDevelop.CSharpBinding/CSharpTextEditorIndentationTests.cs
index ab9f7f4..c8ce7c2 100644
--- a/tests/UnitTests/MonoDevelop.CSharpBinding/CSharpTextEditorIndentationTests.cs
+++ b/tests/UnitTests/MonoDevelop.CSharpBinding/CSharpTextEditorIndentationTests.cs
@@ -252,6 +252,19 @@ namespace MonoDevelop.CSharpBinding
{
TestGuessSemicolonInsertionOffset ("this.method($)~");
}
+
+ /// <summary>
+ /// Bug 11966 - Code Completion Errors with /// Comments
+ /// </summary>
+ [Test]
+ public void TestBug11966 ()
+ {
+ var data = Create ("///<summary>This is a long comment $ </summary>");
+ MiscActions.InsertNewLine (data);
+
+ CheckOutput (data, @"///<summary>This is a long comment
+/// $ </summary>");
+ }
}
}
diff --git a/tests/UnitTests/MonoDevelop.CSharpBinding/NamedArgumentCompletionTests.cs b/tests/UnitTests/MonoDevelop.CSharpBinding/NamedArgumentCompletionTests.cs
new file mode 100644
index 0000000..2380dcf
--- /dev/null
+++ b/tests/UnitTests/MonoDevelop.CSharpBinding/NamedArgumentCompletionTests.cs
@@ -0,0 +1,225 @@
+//
+// NamedArgumentCompletionTests.cs
+//
+// Author:
+// Mike Krüger <mkrueger at xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+//
+// 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 NUnit.Framework;
+
+using MonoDevelop.CSharp.Parser;
+using Mono.TextEditor;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Ide.TypeSystem;
+using MonoDevelop.Ide.Gui.Content;
+using MonoDevelop.CSharp.Formatting;
+using UnitTests;
+using MonoDevelop.Projects.Policies;
+using MonoDevelop.CSharpBinding.Tests;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.CSharp.Completion;
+using MonoDevelop.Ide.CodeCompletion;
+
+namespace MonoDevelop.CSharpBinding
+{
+ [TestFixture]
+ public class NamedArgumentCompletionTests : TestBase
+ {
+ class TestCompletionWidget : ICompletionWidget
+ {
+ Document doc;
+
+ public TestCompletionWidget (Document doc)
+ {
+ this.doc = doc;
+ }
+
+ public string CompletedWord {
+ get;
+ set;
+ }
+ #region ICompletionWidget implementation
+ public event EventHandler CompletionContextChanged {
+ add { /* TODO */ }
+ remove { /* TODO */ }
+ }
+
+ public string GetText (int startOffset, int endOffset)
+ {
+ return doc.Editor.GetTextBetween (startOffset, endOffset);
+ }
+
+ public char GetChar (int offset)
+ {
+ return doc.Editor.GetCharAt (offset);
+ }
+
+ public CodeCompletionContext CreateCodeCompletionContext (int triggerOffset)
+ {
+ var line = doc.Editor.GetLineByOffset (triggerOffset);
+ return new CodeCompletionContext {
+ TriggerOffset = triggerOffset,
+ TriggerLine = line.LineNumber,
+ TriggerLineOffset = line.Offset,
+ TriggerXCoord = 0,
+ TriggerYCoord = 0,
+ TriggerTextHeight = 0,
+ TriggerWordLength = 0
+ };
+ }
+
+ public CodeCompletionContext CurrentCodeCompletionContext {
+ get {
+ return CreateCodeCompletionContext (doc.Editor.Caret.Offset);
+ }
+ }
+
+ public string GetCompletionText (CodeCompletionContext ctx)
+ {
+ return "";
+ }
+
+ public void SetCompletionText (CodeCompletionContext ctx, string partial_word, string complete_word)
+ {
+ this.CompletedWord = complete_word;
+ }
+
+ public void SetCompletionText (CodeCompletionContext ctx, string partial_word, string complete_word, int offset)
+ {
+ this.CompletedWord = complete_word;
+ }
+
+ public void Replace (int offset, int count, string text)
+ {
+ }
+
+ public int CaretOffset {
+ get {
+ return doc.Editor.Caret.Offset;
+ }
+ }
+
+ public int TextLength {
+ get {
+ return doc.Editor.Document.TextLength;
+ }
+ }
+
+ public int SelectedLength {
+ get {
+ return 0;
+ }
+ }
+
+ public Gtk.Style GtkStyle {
+ get {
+ return null;
+ }
+ }
+ #endregion
+ }
+
+
+ static CSharpCompletionTextEditorExtension Setup (string input, out TestViewContent content)
+ {
+ TestWorkbenchWindow tww = new TestWorkbenchWindow ();
+ content = new TestViewContent ();
+ tww.ViewContent = content;
+ content.ContentName = "a.cs";
+ content.GetTextEditorData ().Document.MimeType = "text/x-csharp";
+
+ Document doc = new Document (tww);
+
+ var text = input;
+ int endPos = text.IndexOf ('$');
+ if (endPos >= 0)
+ text = text.Substring (0, endPos) + text.Substring (endPos + 1);
+
+ content.Text = text;
+ content.CursorPosition = System.Math.Max (0, endPos);
+
+
+ var compExt = new CSharpCompletionTextEditorExtension ();
+ compExt.Initialize (doc);
+ content.Contents.Add (compExt);
+
+ doc.UpdateParseDocument ();
+ return compExt;
+ }
+
+ string Test(string input, string type, string member, Gdk.Key key = Gdk.Key.Return)
+ {
+ TestViewContent content;
+ var ext = Setup (input, out content);
+
+ ListWindow.ClearHistory ();
+ var listWindow = new CompletionListWindow ();
+ var widget = new TestCompletionWidget (ext.Document);
+ listWindow.CompletionWidget = widget;
+ listWindow.CodeCompletionContext = widget.CurrentCodeCompletionContext;
+ var t = ext.Document.Compilation.FindType (new FullTypeName (type));
+ var foundMember = t.GetMembers (m => m.Name == member).First ();
+ var data = new MemberCompletionData (ext, foundMember, OutputFlags.ClassBrowserEntries);
+ data.DisplayFlags |= ICSharpCode.NRefactory.Completion.DisplayFlags.NamedArgument;
+ KeyActions ka = KeyActions.Process;
+ data.InsertCompletionText (listWindow, ref ka, key, (char)key, Gdk.ModifierType.None, true, false);
+ return widget.CompletedWord;
+ }
+
+
+ [Test]
+ public void TestSimpleCase ()
+ {
+ string completion = Test (@"class MyClass
+{
+ int foo;
+ void MyMethod ()
+ {
+ $
+ }
+}", "MyClass", "foo");
+ Assert.AreEqual ("foo = ", completion);
+ }
+
+
+ [Test]
+ public void TestNoAutoCase ()
+ {
+ string completion = Test (@"class MyClass
+{
+ int foo;
+ void MyMethod ()
+ {
+ $
+ }
+}", "MyClass", "foo", Gdk.Key.space);
+ Assert.AreEqual ("foo", completion);
+ }
+
+
+ }
+}
+
diff --git a/tests/UnitTests/MonoDevelop.Ide.FindInFiles/MemberCollectorTests.cs b/tests/UnitTests/MonoDevelop.Ide.FindInFiles/MemberCollectorTests.cs
index c288cab..d72293f 100644
--- a/tests/UnitTests/MonoDevelop.Ide.FindInFiles/MemberCollectorTests.cs
+++ b/tests/UnitTests/MonoDevelop.Ide.FindInFiles/MemberCollectorTests.cs
@@ -547,8 +547,8 @@ public A(int i) { }
var intParam = new [] { "Int32" };
var filters = new List<Predicate<IMember>>
{
- m => m.EntityType == EntityType.Constructor && MatchParameters(m, emptyParam),
- m => m.EntityType == EntityType.Constructor && MatchParameters(m, intParam)
+ m => m.SymbolKind == SymbolKind.Constructor && MatchParameters(m, emptyParam),
+ m => m.SymbolKind == SymbolKind.Constructor && MatchParameters(m, intParam)
};
foreach (var filter in filters) {
@@ -571,7 +571,7 @@ public A() { }
static A() { }
}";
var emptyParam = new string [] { };
- Predicate<IMember> filter = m => m.EntityType == EntityType.Constructor && MatchParameters(m, emptyParam);
+ Predicate<IMember> filter = m => m.SymbolKind == SymbolKind.Constructor && MatchParameters(m, emptyParam);
var result1 = CollectMembers (code, "A", m => true, filter, true, false);
Assert.AreEqual (2, result1.Count);
}
diff --git a/tests/UnitTests/MonoDevelop.Ide.FindInFiles/SearchCollectorTests.cs b/tests/UnitTests/MonoDevelop.Ide.FindInFiles/SearchCollectorTests.cs
index 65d89d8..b0fab9f 100755
--- a/tests/UnitTests/MonoDevelop.Ide.FindInFiles/SearchCollectorTests.cs
+++ b/tests/UnitTests/MonoDevelop.Ide.FindInFiles/SearchCollectorTests.cs
@@ -1,194 +1,196 @@
-//
-// SearchCollectorTests.cs
-//
-// Author:
-// Mansheng Yang <lightyang0 at gmail.com>
-//
-// Copyright (c) 2012 Mansheng Yang
-//
-// 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.Linq;
-using ICSharpCode.NRefactory.TypeSystem;
-using MonoDevelop.Core;
-using MonoDevelop.Projects;
-using MonoDevelop.Ide.TypeSystem;
-using NUnit.Framework;
-
-namespace MonoDevelop.Ide.FindInFiles
-{
- [TestFixture]
- public class SearchCollectorTests : UnitTests.TestBase
- {
-
- void VerifyResult<T> (List<T> result, List<T> expected)
- {
- Assert.AreEqual (expected.Count (), result.Count);
- foreach (var item in expected)
- Assert.AreEqual (true, result.Remove(item));
- }
-
- void TestCollectProjects (Solution solution, IEnumerable<IEntity> entities, IEnumerable<Project> expected)
- {
- VerifyResult (SearchCollector.CollectProjects (solution, entities).ToList (), expected.ToList ());
- }
-
- void VerifyResult (List<SearchCollector.FileList> result, List<Tuple<Project, IEnumerable<FilePath>>> expected)
- {
- Assert.AreEqual (expected.Count, result.Count);
- Console.WriteLine (result [0].Files.Count ());
- foreach (var item in expected ) {
- var tuple = item;
- Assert.AreEqual (1, result.RemoveAll (
- f => tuple.Item1 == f.Project && tuple.Item2.All (fileName => f.Files.Any (p => p == fileName))));
- }
- }
-
- void TestCollectFiles (Solution solution, IEnumerable<IEntity> entities, IEnumerable<Tuple<Project, IEnumerable<FilePath>>> expected)
- {
- VerifyResult (SearchCollector.CollectFiles (solution, entities).ToList (), expected.ToList ());
- }
-
- void TestCollectFiles (Project project, IEnumerable<IEntity> entities, IEnumerable<Tuple<Project, IEnumerable<FilePath>>> expected)
- {
- VerifyResult (SearchCollector.CollectFiles (project, entities).ToList (), expected.ToList ());
- }
-
- static Tuple<Project, IEnumerable<FilePath>> CreateTestTuple (Project project, IEnumerable<FilePath> files)
- {
- return Tuple.Create (project, files);
- }
-
- static Tuple<Project, IEnumerable<FilePath>> CreateTestTuple (Project project)
- {
- return Tuple.Create (project, project.Files.Select (f => f.FilePath));
- }
-
- [Test]
- public void TestCollectFiles ()
- {
- var code1 = @"
-namespace project1 {
- class A
- {
- private void Method1() { }
- public void Method2() { }
- }
- public class B
- { }
-}";
- var project1 = new UnknownProject { FileName = "projectc1.csproj" };
- var project2 = new DotNetAssemblyProject { FileName = "projectc2.csproj" };
- project2.References.Add (new MonoDevelop.Projects.ProjectReference (project1));
-
- var solution = new Solution ();
- solution.RootFolder.AddItem (project1);
- solution.RootFolder.AddItem (project2);
- solution.RootFolder.AddItem (new UnknownProject { FileName = "dummy.csproj" });
-
- project1.AddFile (new ProjectFile ("dummy.cs"));
- TypeSystemService.LoadProject (project1);
- TypeSystemService.ParseFile (project1, "test.cs", "text/x-csharp", code1);
- var compilation = TypeSystemService.GetCompilation (project1);
-
- var typeA = compilation.MainAssembly.GetTypeDefinition ("project1", "A", 0);
-
- TestCollectFiles (project1, typeA.GetMembers (m => m.Name == "Method1"),
- new [] { CreateTestTuple (project1, new [] { (FilePath)"test.cs" }) });
- TestCollectFiles (project1, new [] { typeA }, new [] { CreateTestTuple (project1) });
- TestCollectFiles (project1, typeA.GetMembers (m => m.Name == "Method2"), new [] { CreateTestTuple (project1) });
- TestCollectFiles (project1, typeA.GetMembers(), new [] { CreateTestTuple (project1) });
-
- TestCollectFiles (solution, typeA.GetMembers (m => m.Name == "Method1"),
- new [] { CreateTestTuple (project1, new [] { (FilePath)"test.cs" }) });
- TestCollectFiles (solution, typeA.GetMembers (), new [] { CreateTestTuple (project1) });
-
- var typeB = compilation.MainAssembly.GetTypeDefinition ("project1", "B", 0);
- TestCollectFiles (solution, new [] { typeB }, new [] { CreateTestTuple (project1), CreateTestTuple (project2) });
- TestCollectFiles (solution, new [] { typeA, typeB }, new [] { CreateTestTuple (project1), CreateTestTuple (project2) });
- }
-
- [Test]
- public void TestCollectProjects ()
- {
- var code = @"
-namespace project1 {
- class A
- {
- private void Method1() { }
- public void Method2() { }
- }
- public class B
- {
- private void Method1() { }
- protected void Method2() { }
- }
-}";
- var project1 = new UnknownProject { FileName = "project1.csproj" };
- var project2 = new DotNetAssemblyProject { FileName = "project2.csproj" };
- var solution = new Solution ();
- solution.RootFolder.AddItem (project1);
- solution.RootFolder.AddItem (project2);
- solution.RootFolder.AddItem (new UnknownProject { FileName = "project3.csproj" });
-
- TypeSystemService.LoadProject (project1);
- TypeSystemService.ParseFile (project1, "test.cs", "text/x-csharp", code);
- var compilation = TypeSystemService.GetCompilation (project1);
-
- var typeA = compilation.MainAssembly.GetTypeDefinition ("project1", "A", 0);
- TestCollectProjects (solution, new [] { typeA }, new [] { project1 });
- TestCollectProjects (solution, typeA.GetMembers (), new [] { project1 });
- TestCollectProjects (solution, typeA.GetMembers (m => m.Name == "Method1"), new [] { project1 });
- TestCollectProjects (solution, typeA.GetMembers (m => m.Name == "Method2"), new [] { project1 });
-
- project2.References.Add (new MonoDevelop.Projects.ProjectReference (project1));
- var typeB = compilation.MainAssembly.GetTypeDefinition ("project1", "B", 0);
- TestCollectProjects (solution, new [] { typeB }, new Project [] { project1, project2 });
- TestCollectProjects (solution, typeB.GetMembers (), new Project [] { project1, project2 });
- TestCollectProjects (solution, typeB.GetMembers (m => m.Name == "Method1"), new [] { project1 });
- TestCollectProjects (solution, typeB.GetMembers (m => m.Name == "Method2"), new Project [] { project1, project2 });
- }
-
- [Test]
- public void TestCollectForExternalReference ()
- {
- var projects = new List<Project> ();
- var solution = new Solution ();
- for (int i = 0; i < 3; i++) {
- var project = new DotNetAssemblyProject { FileName = String.Format ("projectx{0}.csproj", i) };
- projects.Add (project);
- solution.RootFolder.AddItem (project);
- project.AddFile (new ProjectFile (String.Format ("dummy{0}.cs", i)));
- project.AddReference (typeof (object).Assembly.Location);
- TypeSystemService.LoadProject (project);
- TypeSystemService.GetProjectContentWrapper (project).ReconnectAssemblyReferences ();
- }
- solution.RootFolder.AddItem (new UnknownProject { FileName = "test.csproj" });
-
- var compilation = TypeSystemService.GetCompilation (projects[0]);
- var intType = compilation.GetAllTypeDefinitions ().First(t => t.Name == "Int32");
- Assert.AreEqual (null, TypeSystemService.GetProject (intType));
- TestCollectProjects (solution, new [] { intType }, projects);
- TestCollectFiles (solution, new [] { intType }, projects.Select (CreateTestTuple));
- }
-
- }
-}
+//
+// SearchCollectorTests.cs
+//
+// Author:
+// Mansheng Yang <lightyang0 at gmail.com>
+//
+// Copyright (c) 2012 Mansheng Yang
+//
+// 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.Linq;
+using ICSharpCode.NRefactory.TypeSystem;
+using MonoDevelop.Core;
+using MonoDevelop.Projects;
+using MonoDevelop.Ide.TypeSystem;
+using NUnit.Framework;
+
+namespace MonoDevelop.Ide.FindInFiles
+{
+ [TestFixture]
+ public class SearchCollectorTests : UnitTests.TestBase
+ {
+
+ void VerifyResult<T> (List<T> result, List<T> expected)
+ {
+ Assert.AreEqual (expected.Count (), result.Count);
+ foreach (var item in expected)
+ Assert.AreEqual (true, result.Remove(item));
+ }
+
+ void TestCollectProjects (Solution solution, IEnumerable<IEntity> entities, IEnumerable<Project> expected)
+ {
+ VerifyResult (SearchCollector.CollectProjects (solution, entities).ToList (), expected.ToList ());
+ }
+
+ void VerifyResult (List<SearchCollector.FileList> result, List<Tuple<Project, IEnumerable<FilePath>>> expected)
+ {
+ Assert.AreEqual (expected.Count, result.Count);
+ Console.WriteLine (result [0].Files.Count ());
+ foreach (var item in expected ) {
+ var tuple = item;
+ Assert.AreEqual (1, result.RemoveAll (
+ f => tuple.Item1 == f.Project && tuple.Item2.All (fileName => f.Files.Any (p => p == fileName))));
+ }
+ }
+
+ void TestCollectFiles (Solution solution, IEnumerable<IEntity> entities, IEnumerable<Tuple<Project, IEnumerable<FilePath>>> expected)
+ {
+ VerifyResult (SearchCollector.CollectFiles (solution, entities).ToList (), expected.ToList ());
+ }
+
+ void TestCollectFiles (Project project, IEnumerable<IEntity> entities, IEnumerable<Tuple<Project, IEnumerable<FilePath>>> expected)
+ {
+ VerifyResult (SearchCollector.CollectFiles (project, entities).ToList (), expected.ToList ());
+ }
+
+ static Tuple<Project, IEnumerable<FilePath>> CreateTestTuple (Project project, IEnumerable<FilePath> files)
+ {
+ return Tuple.Create (project, files);
+ }
+
+ static Tuple<Project, IEnumerable<FilePath>> CreateTestTuple (Project project)
+ {
+ return Tuple.Create (project, project.Files.Select (f => f.FilePath));
+ }
+
+ [Test]
+ public void TestCollectFiles ()
+ {
+ var code1 = @"
+namespace project1 {
+ class A
+ {
+ private void Method1() { }
+ public void Method2() { }
+ }
+ public class B
+ { }
+}";
+ var project1 = new UnknownProject { FileName = "projectc1.csproj" };
+ var project2 = new DotNetAssemblyProject { FileName = "projectc2.csproj" };
+ project2.References.Add (new MonoDevelop.Projects.ProjectReference (project1));
+
+ var solution = new Solution ();
+ solution.RootFolder.AddItem (project1);
+ solution.RootFolder.AddItem (project2);
+ solution.RootFolder.AddItem (new UnknownProject { FileName = "dummy.csproj" });
+
+ project1.AddFile (new ProjectFile ("dummy.cs"));
+ TypeSystemService.LoadProject (project1);
+ TypeSystemService.ParseFile (project1, "test.cs", "text/x-csharp", code1);
+ var compilation = TypeSystemService.GetCompilation (project1);
+
+ var typeA = compilation.MainAssembly.GetTypeDefinition ("project1", "A", 0);
+
+ TestCollectFiles (project1, typeA.GetMembers (m => m.Name == "Method1"),
+ new [] { CreateTestTuple (project1, new [] { (FilePath)"test.cs" }) });
+ TestCollectFiles (project1, new [] { typeA }, new [] { CreateTestTuple (project1) });
+ TestCollectFiles (project1, typeA.GetMembers (m => m.Name == "Method2"), new [] { CreateTestTuple (project1) });
+ TestCollectFiles (project1, typeA.GetMembers(), new [] { CreateTestTuple (project1) });
+
+ TestCollectFiles (solution, typeA.GetMembers (m => m.Name == "Method1"),
+ new [] { CreateTestTuple (project1, new [] { (FilePath)"test.cs" }) });
+ TestCollectFiles (solution, typeA.GetMembers (), new [] { CreateTestTuple (project1) });
+
+ var typeB = compilation.MainAssembly.GetTypeDefinition ("project1", "B", 0);
+ TestCollectFiles (solution, new [] { typeB }, new [] { CreateTestTuple (project1), CreateTestTuple (project2) });
+ TestCollectFiles (solution, new [] { typeA, typeB }, new [] { CreateTestTuple (project1), CreateTestTuple (project2) });
+ }
+
+ [Test]
+ public void TestCollectProjects ()
+ {
+ var code = @"
+namespace project1 {
+ class A
+ {
+ private void Method1() { }
+ public void Method2() { }
+ }
+ public class B
+ {
+ private void Method1() { }
+ protected void Method2() { }
+ }
+}";
+ var project1 = new UnknownProject { FileName = "project1.csproj" };
+ var project2 = new DotNetAssemblyProject { FileName = "project2.csproj" };
+ var solution = new Solution ();
+ solution.RootFolder.AddItem (project1);
+ solution.RootFolder.AddItem (project2);
+ solution.RootFolder.AddItem (new UnknownProject { FileName = "project3.csproj" });
+
+ TypeSystemService.LoadProject (project1);
+ TypeSystemService.ParseFile (project1, "test.cs", "text/x-csharp", code);
+ var compilation = TypeSystemService.GetCompilation (project1);
+
+ var typeA = compilation.MainAssembly.GetTypeDefinition ("project1", "A", 0);
+ Assert.IsNotNull (typeA);
+ TestCollectProjects (solution, new [] { typeA }, new [] { project1 });
+ TestCollectProjects (solution, typeA.GetMembers (), new [] { project1 });
+ TestCollectProjects (solution, typeA.GetMembers (m => m.Name == "Method1"), new [] { project1 });
+ TestCollectProjects (solution, typeA.GetMembers (m => m.Name == "Method2"), new [] { project1 });
+
+ project2.References.Add (new MonoDevelop.Projects.ProjectReference (project1));
+ var typeB = compilation.MainAssembly.GetTypeDefinition ("project1", "B", 0);
+ Assert.IsNotNull (typeB);
+ TestCollectProjects (solution, new [] { typeB }, new Project [] { project1, project2 });
+ TestCollectProjects (solution, typeB.GetMembers (), new Project [] { project1, project2 });
+ TestCollectProjects (solution, typeB.GetMembers (m => m.Name == "Method1"), new [] { project1 });
+ TestCollectProjects (solution, typeB.GetMembers (m => m.Name == "Method2"), new Project [] { project1, project2 });
+ }
+
+ [Test]
+ public void TestCollectForExternalReference ()
+ {
+ var projects = new List<Project> ();
+ var solution = new Solution ();
+ for (int i = 0; i < 3; i++) {
+ var project = new DotNetAssemblyProject { FileName = String.Format ("projectx{0}.csproj", i) };
+ projects.Add (project);
+ solution.RootFolder.AddItem (project);
+ project.AddFile (new ProjectFile (String.Format ("dummy{0}.cs", i)));
+ project.AddReference (typeof (object).Assembly.Location);
+ TypeSystemService.LoadProject (project);
+ TypeSystemService.GetProjectContentWrapper (project).ReconnectAssemblyReferences ();
+ }
+ solution.RootFolder.AddItem (new UnknownProject { FileName = "test.csproj" });
+
+ var compilation = TypeSystemService.GetCompilation (projects[0]);
+ var intType = compilation.GetAllTypeDefinitions ().First(t => t.Name == "Int32");
+ Assert.AreEqual (null, TypeSystemService.GetProject (intType));
+ TestCollectProjects (solution, new [] { intType }, projects);
+ TestCollectFiles (solution, new [] { intType }, projects.Select (CreateTestTuple));
+ }
+
+ }
+}
diff --git a/tests/UnitTests/MonoDevelop.Projects/FileServiceTests.cs b/tests/UnitTests/MonoDevelop.Projects/FileServiceTests.cs
index 933193c..646f9a3 100644
--- a/tests/UnitTests/MonoDevelop.Projects/FileServiceTests.cs
+++ b/tests/UnitTests/MonoDevelop.Projects/FileServiceTests.cs
@@ -89,6 +89,18 @@ namespace MonoDevelop.Projects
}
[Test]
+ public void MoveFile ()
+ {
+ var tmp = System.IO.Path.GetTempFileName ();
+
+ FileService.MoveFile (tmp, tmp + ".tmp");
+ Assert.IsTrue (System.IO.File.Exists (tmp + ".tmp"), "#1");
+
+ FileService.DeleteFile (tmp + ".tmp");
+ Assert.IsFalse (System.IO.File.Exists (tmp + ".tmp"), "#2");
+ }
+
+ [Test]
public void TestGetRelativeBadInput ()
{
Assert.AreEqual (@"bbb", FileService.AbsoluteToRelativePath (@"aaa", @"bbb"));
diff --git a/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs b/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs
index 92085c6..9a98f7c 100644
--- a/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs
+++ b/tests/UnitTests/MonoDevelop.Projects/SolutionTests.cs
@@ -367,10 +367,7 @@ namespace MonoDevelop.Projects
Assert.AreEqual (0, res.ErrorCount);
Assert.AreEqual (0, res.WarningCount);
Assert.AreEqual (3, res.BuildCount);
- Assert.IsFalse (p.NeedsBuilding (config));
- Assert.IsFalse (lib1.NeedsBuilding (config));
- Assert.IsFalse (lib2.NeedsBuilding (config));
-
+
Assert.IsTrue (File.Exists (Util.Combine (p.BaseDirectory, "bin", "Debug", "console-with-libs-mdp.exe")));
Assert.IsTrue (File.Exists (Util.Combine (p.BaseDirectory, "bin", "Debug", GetMdb ("console-with-libs-mdp.exe"))));
Assert.IsTrue (File.Exists (Util.Combine (lib1.BaseDirectory, "bin", "Debug", "library1.dll")));
@@ -380,20 +377,10 @@ namespace MonoDevelop.Projects
// Build the project, but not the references
- p.SetNeedsBuilding (true);
- lib1.SetNeedsBuilding (true);
- lib2.SetNeedsBuilding (true);
- Assert.IsTrue (p.NeedsBuilding (config));
- Assert.IsTrue (lib1.NeedsBuilding (config));
- Assert.IsTrue (lib2.NeedsBuilding (config));
-
res = p.Build (Util.GetMonitor (), config, false);
Assert.AreEqual (0, res.ErrorCount);
Assert.AreEqual (0, res.WarningCount);
Assert.AreEqual (1, res.BuildCount);
- Assert.IsTrue (p.NeedsBuilding (config)); // True because references require building
- Assert.IsTrue (lib1.NeedsBuilding (config));
- Assert.IsTrue (lib2.NeedsBuilding (config));
}
[Test()]
diff --git a/tests/UnitTests/MonoDevelop.Projects/TestProjectsChecks.cs b/tests/UnitTests/MonoDevelop.Projects/TestProjectsChecks.cs
index d2c631a..1df04e1 100644
--- a/tests/UnitTests/MonoDevelop.Projects/TestProjectsChecks.cs
+++ b/tests/UnitTests/MonoDevelop.Projects/TestProjectsChecks.cs
@@ -225,6 +225,7 @@ namespace Foo {
DotNetProjectConfiguration pcDebug = project.AddNewConfiguration ("Debug") as DotNetProjectConfiguration;
CSharpCompilerParameters csparamsDebug = (CSharpCompilerParameters) pcDebug.CompilationParameters;
+ csparamsDebug.DebugType = "full";
pcDebug.OutputDirectory = Path.Combine (dir, "bin/Debug");
pcDebug.OutputAssembly = name;
pcDebug.DebugMode = true;
@@ -233,6 +234,7 @@ namespace Foo {
DotNetProjectConfiguration pcRelease = project.AddNewConfiguration ("Release") as DotNetProjectConfiguration;
CSharpCompilerParameters csparamsRelease = (CSharpCompilerParameters) pcRelease.CompilationParameters;
+ csparamsRelease.DebugType = "none";
pcRelease.OutputDirectory = Path.Combine (dir, "bin/Release");
pcRelease.OutputAssembly = name;
csparamsRelease.DefineSymbols = "TRACE";
diff --git a/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs b/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs
index f1fc6d2..c963c01 100644
--- a/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs
+++ b/tests/UnitTests/MonoDevelop.Xml.StateEngine/HtmlParsingTests.cs
@@ -55,6 +55,7 @@ namespace MonoDevelop.Xml.StateEngine
<p><a href =""http://mono-project.com/"" ><b>foo $ </a>
<p>
<p>$
+ <div><div>$</div></div>
</body>
</html>
",
@@ -69,6 +70,9 @@ namespace MonoDevelop.Xml.StateEngine
},
delegate {
parser.AssertPath ("//html/body/p");
+ },
+ delegate {
+ parser.AssertPath ("//html/body/div/div");
}
);
parser.AssertEmpty ();
diff --git a/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs b/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs
index 474f07d..bad66a1 100644
--- a/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs
+++ b/tests/UnitTests/MonoDevelop.Xml.StateEngine/ParsingTests.cs
@@ -32,6 +32,7 @@ using MonoDevelop.Ide.Gui.Content;
using System.Linq;
using NUnit.Framework;
+using ICSharpCode.NRefactory.TypeSystem;
namespace MonoDevelop.Xml.StateEngine
@@ -212,7 +213,7 @@ namespace MonoDevelop.Xml.StateEngine
Assert.AreEqual ("html", dt.RootElement.FullName);
Assert.AreEqual ("-//W3C//DTD XHTML 1.0 Strict//EN", dt.PublicFpi);
Assert.AreEqual ("DTD/xhtml1-strict.dtd", dt.Uri);
- Assert.AreEqual (dt.InternalDeclarationRegion.Start.Line, 4);
+ Assert.AreEqual (dt.InternalDeclarationRegion.Begin.Line, 4);
Assert.AreEqual (dt.InternalDeclarationRegion.End.Line, 7);
parser.AssertNoErrors ();
}
diff --git a/tests/UnitTests/UnitTests.csproj b/tests/UnitTests/UnitTests.csproj
index 0117546..dccde98 100644
--- a/tests/UnitTests/UnitTests.csproj
+++ b/tests/UnitTests/UnitTests.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -9,6 +9,8 @@
<OutputType>Library</OutputType>
<AssemblyName>UnitTests</AssemblyName>
<RootNamespace>UnitTests</RootNamespace>
+ <TestRunnerCommand>..\..\build\bin\mdtool.exe</TestRunnerCommand>
+ <TestRunnerArgs>run-md-tests</TestRunnerArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
@@ -39,17 +41,9 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Cairo" />
- <Reference Include="nunit.core">
- <HintPath>..\..\src\addins\NUnit\lib\nunit.core.dll</HintPath>
- </Reference>
- <Reference Include="nunit.core.interfaces">
- <HintPath>..\..\src\addins\NUnit\lib\nunit.core.interfaces.dll</HintPath>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\..\src\addins\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="nunit.util">
- <HintPath>..\..\src\addins\NUnit\lib\nunit.util.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Private>False</Private>
@@ -193,16 +187,6 @@
<Name>MonoDevelop.Deployment.Linux</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\..\src\core\Mono.Debugging\Mono.Debugging.csproj">
- <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
- <Name>Mono.Debugging</Name>
- <Private>False</Private>
- </ProjectReference>
- <ProjectReference Include="..\..\src\addins\MonoDevelop.Debugger.Soft\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
- <Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
- <Name>Mono.Debugging.Soft</Name>
- <Private>False</Private>
- </ProjectReference>
<ProjectReference Include="..\..\src\core\MonoDevelop.Projects.Formats.MSBuild\MonoDevelop.Projects.Formats.MSBuild.v3.5.csproj">
<Project>{40A31ADE-6F26-4D99-A3C7-87BB8236151D}</Project>
<Name>MonoDevelop.Projects.Formats.MSBuild.v3.5</Name>
@@ -233,6 +217,21 @@
<Name>ICSharpCode.Decompiler</Name>
<Private>False</Private>
</ProjectReference>
+ <ProjectReference Include="..\..\external\debugger-libs\Mono.Debugging\Mono.Debugging.csproj">
+ <Project>{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}</Project>
+ <Name>Mono.Debugging</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\external\debugger-libs\Mono.Debugging.Soft\Mono.Debugging.Soft.csproj">
+ <Project>{DE40756E-57F6-4AF2-B155-55E3A88CCED8}</Project>
+ <Name>Mono.Debugging.Soft</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\external\xwt\Xwt\Xwt.csproj">
+ <Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
+ <Name>Xwt</Name>
+ <Private>False</Private>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="MonoDevelop.AspNet.Mvc.Completion\CompletionTests.cs" />
@@ -280,12 +279,17 @@
<Compile Include="MonoDevelop.Core\BacktrackingStringMatcherTests.cs" />
<Compile Include="MonoDevelop.Ide.Gui\SearchPopupWindowTests.cs" />
<Compile Include="MonoDevelop.Core\LaneStringMatcherTests.cs" />
+ <Compile Include="MonoDevelop.Xml.StateEngine\HtmlParsingTests.cs" />
+ <Compile Include="MonoDevelop.Xml.StateEngine\AspNetParsingTests.cs" />
+ <Compile Include="MonoDevelop.Xml.StateEngine\ParsingTests.cs" />
+ <Compile Include="MonoDevelop.CSharpBinding\AutomaticBracketInsertionTests.cs" />
+ <Compile Include="MonoDevelop.CSharpBinding\NamedArgumentCompletionTests.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\md.targets" />
<ProjectExtensions>
<MonoDevelop>
- <Properties TestRunnerAssembly="..\..\build\bin\MonoDevelop.Core.dll" TestRunnerType="MonoDevelop.Core.InternalTestRunner">
+ <Properties>
<MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am" BuildTargetName="" CleanTargetName="" SyncReferences="True" IsAutotoolsProject="True" RelativeConfigureInPath="../..">
<BuildFilesVar Sync="True" Name="FILES" />
<DeployFilesVar />
@@ -305,9 +309,6 @@
<None Include="MonoDevelop.Projects\DomCompilationUnitTests.cs" />
<Compile Include="MonoDevelop.Xml.StateEngine\TestParser.cs" />
<None Include="MonoDevelop.Projects\DomTests.cs" />
- <None Include="MonoDevelop.Xml.StateEngine\ParsingTests.cs" />
- <None Include="MonoDevelop.Xml.StateEngine\AspNetParsingTests.cs" />
- <None Include="MonoDevelop.Xml.StateEngine\HtmlParsingTests.cs" />
<None Include="MonoDevelop.AspNet\AspNetCompletionTests.cs" />
<None Include="MonoDevelop.AspNet\AspNetTesting.cs" />
</ItemGroup>
diff --git a/tests/UnitTests/obj/Debug/UnitTests.csproj.FilesWrittenAbsolute.txt b/tests/UnitTests/obj/Debug/UnitTests.csproj.FilesWrittenAbsolute.txt
new file mode 100644
index 0000000..bd8ede1
--- /dev/null
+++ b/tests/UnitTests/obj/Debug/UnitTests.csproj.FilesWrittenAbsolute.txt
@@ -0,0 +1,4 @@
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/UnitTests.dll.mdb
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/build/tests/UnitTests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/tests/UnitTests/obj/Debug/UnitTests.dll
+/home/builder/data/lanes/monodevelop-linux-monodevelop-4.0.12-branch/593d7acb/source/monodevelop/main/tests/UnitTests/obj/Debug/UnitTests.dll.mdb
diff --git a/tests/UserInterfaceTests/Makefile.in b/tests/UserInterfaceTests/Makefile.in
index 6d6d8d5..fd84722 100644
--- a/tests/UserInterfaceTests/Makefile.in
+++ b/tests/UserInterfaceTests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -251,6 +250,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/tests/test-projects/csharp-console-mdp/csharp-console-mdp/csharp-console-mdp.mdp b/tests/test-projects/csharp-console-mdp/csharp-console-mdp/csharp-console-mdp.mdp
index 0c3ef46..512bdb8 100644
--- a/tests/test-projects/csharp-console-mdp/csharp-console-mdp/csharp-console-mdp.mdp
+++ b/tests/test-projects/csharp-console-mdp/csharp-console-mdp/csharp-console-mdp.mdp
@@ -18,6 +18,6 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/tests/test-projects/generated-console-project/TestProject.csproj b/tests/test-projects/generated-console-project/TestProject.csproj
index 0594150..5e74648 100644
--- a/tests/test-projects/generated-console-project/TestProject.csproj
+++ b/tests/test-projects/generated-console-project/TestProject.csproj
@@ -12,7 +12,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
- <Optimize>False</Optimize>
+ <Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
diff --git a/tests/test-projects/generated-console-project/TestProject.mdp b/tests/test-projects/generated-console-project/TestProject.mdp
index fec2933..99ab4dd 100644
--- a/tests/test-projects/generated-console-project/TestProject.mdp
+++ b/tests/test-projects/generated-console-project/TestProject.mdp
@@ -21,8 +21,8 @@
<File name="Nothing.xml" subtype="Code" buildaction="Nothing" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Gac" localcopy="True" refto="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/tests/test-projects/nested-solutions-mdp/console-project/console-project.mdp b/tests/test-projects/nested-solutions-mdp/console-project/console-project.mdp
index 02eba91..70f7e6b 100644
--- a/tests/test-projects/nested-solutions-mdp/console-project/console-project.mdp
+++ b/tests/test-projects/nested-solutions-mdp/console-project/console-project.mdp
@@ -18,7 +18,7 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Project" localcopy="True" refto="library1" />
<ProjectReference type="Project" localcopy="True" refto="library2" />
<ProjectReference type="Project" localcopy="True" refto="library3" />
diff --git a/tests/test-projects/nested-solutions-mdp/nested-solution1/library1/library1.mdp b/tests/test-projects/nested-solutions-mdp/nested-solution1/library1/library1.mdp
index 6c70ef6..6d634ea 100644
--- a/tests/test-projects/nested-solutions-mdp/nested-solution1/library1/library1.mdp
+++ b/tests/test-projects/nested-solutions-mdp/nested-solution1/library1/library1.mdp
@@ -18,6 +18,6 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/tests/test-projects/nested-solutions-mdp/nested-solution1/library2/library2.mdp b/tests/test-projects/nested-solutions-mdp/nested-solution1/library2/library2.mdp
index 979491f..2d87db3 100644
--- a/tests/test-projects/nested-solutions-mdp/nested-solution1/library2/library2.mdp
+++ b/tests/test-projects/nested-solutions-mdp/nested-solution1/library2/library2.mdp
@@ -18,6 +18,6 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/tests/test-projects/nested-solutions-mdp/nested-solution2/console-project2/console-project2.mdp b/tests/test-projects/nested-solutions-mdp/nested-solution2/console-project2/console-project2.mdp
index 690f28d..84fec53 100644
--- a/tests/test-projects/nested-solutions-mdp/nested-solution2/console-project2/console-project2.mdp
+++ b/tests/test-projects/nested-solutions-mdp/nested-solution2/console-project2/console-project2.mdp
@@ -18,7 +18,7 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Project" localcopy="True" refto="library3" />
<ProjectReference type="Project" localcopy="True" refto="library4" />
</References>
diff --git a/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library3/library3.mdp b/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library3/library3.mdp
index a47b2ad..ec7bc9f 100644
--- a/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library3/library3.mdp
+++ b/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library3/library3.mdp
@@ -18,6 +18,6 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library4/library4.mdp b/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library4/library4.mdp
index b0d41cf..2142543 100644
--- a/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library4/library4.mdp
+++ b/tests/test-projects/nested-solutions-mdp/nested-solution2/nested-solution3/library4/library4.mdp
@@ -18,6 +18,6 @@
<File name="Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>
diff --git a/theme-icons/Makefile.in b/theme-icons/Makefile.in
index 8909863..b112962 100644
--- a/theme-icons/Makefile.in
+++ b/theme-icons/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.12.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -250,6 +249,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/vcrevision b/vcrevision
index c5180b8..f8fb6cb 100644
--- a/vcrevision
+++ b/vcrevision
@@ -1 +1 @@
-5c86fd4af12c978b71fe8c62ff0f8846c6ab1ca8
+593d7acb1cb78ceeeb482d5133cf1fe514467e39
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/monodevelop.git
More information about the Pkg-cli-apps-commits
mailing list